summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore11
-rw-r--r--starmath/inc/action.hxx2
-rw-r--r--starmath/inc/applicat.hxx21
-rw-r--r--starmath/inc/caret.hxx480
-rw-r--r--starmath/inc/config.hxx2
-rw-r--r--starmath/inc/cursor.hxx482
-rwxr-xr-xstarmath/inc/dialog.hxx72
-rwxr-xr-xstarmath/inc/document.hxx72
-rw-r--r--starmath/inc/edit.hxx20
-rw-r--r--[-rwxr-xr-x]starmath/inc/format.hxx32
-rw-r--r--starmath/inc/node.hxx569
-rwxr-xr-xstarmath/inc/parse.hxx60
-rw-r--r--starmath/inc/pch/precompiled_starmath.cxx2
-rw-r--r--starmath/inc/pch/precompiled_starmath.hxx2
-rw-r--r--starmath/inc/rect.hxx30
-rw-r--r--starmath/inc/smdll.hxx4
-rw-r--r--starmath/inc/smmod.hxx8
-rwxr-xr-xstarmath/inc/starmath.hrc21
-rw-r--r--starmath/inc/symbol.hxx23
-rw-r--r--starmath/inc/toolbox.hxx8
-rw-r--r--starmath/inc/types.hxx8
-rw-r--r--starmath/inc/unomodel.hxx2
-rw-r--r--starmath/inc/utility.hxx122
-rw-r--r--starmath/inc/view.hxx66
-rw-r--r--starmath/inc/visitors.hxx495
-rw-r--r--starmath/prj/build.lst3
-rw-r--r--starmath/qa/cppunit/makefile.mk133
-rw-r--r--starmath/qa/cppunit/test_nodetotextvisitors.cxx688
-rw-r--r--starmath/qa/cppunit/test_starmath.cxx459
-rw-r--r--starmath/qa/cppunit/version.map34
-rwxr-xr-xstarmath/sdi/smath.sdi2
-rwxr-xr-xstarmath/sdi/smslots.sdi2
-rw-r--r--starmath/source/accessibility.cxx303
-rw-r--r--starmath/source/accessibility.hxx13
-rw-r--r--starmath/source/action.cxx2
-rw-r--r--starmath/source/caret.cxx66
-rw-r--r--starmath/source/cfgitem.cxx209
-rw-r--r--starmath/source/cfgitem.hxx70
-rwxr-xr-xstarmath/source/config.cxx6
-rw-r--r--starmath/source/cursor.cxx1646
-rw-r--r--starmath/source/detreg.cxx2
-rwxr-xr-xstarmath/source/dialog.cxx325
-rwxr-xr-xstarmath/source/document.cxx168
-rw-r--r--starmath/source/edit.cxx161
-rw-r--r--starmath/source/eqnolefilehdr.cxx2
-rw-r--r--starmath/source/eqnolefilehdr.hxx2
-rw-r--r--starmath/source/format.cxx26
-rwxr-xr-xstarmath/source/makefile.mk55
-rw-r--r--starmath/source/math_pch.cxx433
-rwxr-xr-xstarmath/source/mathmlexport.cxx124
-rw-r--r--starmath/source/mathmlexport.hxx3
-rwxr-xr-xstarmath/source/mathmlimport.cxx263
-rwxr-xr-xstarmath/source/mathmlimport.hxx3
-rw-r--r--starmath/source/mathtype.cxx267
-rw-r--r--starmath/source/mathtype.hxx15
-rw-r--r--[-rwxr-xr-x]starmath/source/node.cxx640
-rw-r--r--[-rwxr-xr-x]starmath/source/parse.cxx337
-rw-r--r--starmath/source/rect.cxx180
-rw-r--r--starmath/source/register.cxx2
-rw-r--r--starmath/source/smdetect.cxx38
-rw-r--r--starmath/source/smdetect.hxx5
-rw-r--r--starmath/source/smdll.cxx35
-rwxr-xr-xstarmath/source/smmod.cxx19
-rw-r--r--[-rwxr-xr-x]starmath/source/smres.src103
-rw-r--r--starmath/source/symbol.cxx62
-rw-r--r--starmath/source/symbol.src11
-rw-r--r--starmath/source/toolbox.cxx91
-rwxr-xr-xstarmath/source/toolbox.src60
-rw-r--r--starmath/source/typemap.cxx16
-rw-r--r--starmath/source/types.cxx5
-rw-r--r--starmath/source/unodoc.cxx6
-rw-r--r--[-rwxr-xr-x]starmath/source/unomodel.cxx91
-rw-r--r--starmath/source/utility.cxx25
-rw-r--r--[-rwxr-xr-x]starmath/source/view.cxx430
-rw-r--r--starmath/source/visitors.cxx2541
-rwxr-xr-xstarmath/uiconfig/smath/menubar/menubar.xml4
-rw-r--r--starmath/uiconfig/smath/statusbar/statusbar.xml2
-rw-r--r--starmath/visual-editor-todo44
-rwxr-xr-xstarmath/workben/smath-dump-watch.sh26
-rw-r--r--sw/Library_msword.mk7
-rw-r--r--sw/Library_sw.mk4
-rw-r--r--sw/Library_swui.mk1
-rw-r--r--sw/Library_vbaswobj.mk28
-rw-r--r--sw/inc/AnnotationWin.hxx7
-rw-r--r--sw/inc/EnhancedPDFExportHelper.hxx3
-rw-r--r--sw/inc/HandleAnchorNodeChg.hxx4
-rw-r--r--sw/inc/IDocumentChartDataProviderAccess.hxx2
-rw-r--r--sw/inc/IDocumentContentOperations.hxx85
-rw-r--r--[-rwxr-xr-x]sw/inc/IDocumentDeviceAccess.hxx3
-rw-r--r--sw/inc/IDocumentDrawModelAccess.hxx7
-rw-r--r--sw/inc/IDocumentExternalData.hxx7
-rw-r--r--sw/inc/IDocumentFieldsAccess.hxx61
-rw-r--r--sw/inc/IDocumentLayoutAccess.hxx3
-rw-r--r--sw/inc/IDocumentLineNumberAccess.hxx2
-rw-r--r--sw/inc/IDocumentLinksAdministration.hxx25
-rw-r--r--sw/inc/IDocumentListItems.hxx3
-rw-r--r--sw/inc/IDocumentListsAccess.hxx7
-rw-r--r--sw/inc/IDocumentMarkAccess.hxx3
-rw-r--r--sw/inc/IDocumentOutlineNodes.hxx3
-rw-r--r--sw/inc/IDocumentRedlineAccess.hxx80
-rw-r--r--sw/inc/IDocumentSettingAccess.hxx16
-rw-r--r--sw/inc/IDocumentState.hxx27
-rw-r--r--sw/inc/IDocumentStatistics.hxx13
-rw-r--r--sw/inc/IDocumentStylePoolAccess.hxx22
-rw-r--r--sw/inc/IDocumentTimerAccess.hxx3
-rw-r--r--sw/inc/IDocumentUndoRedo.hxx4
-rw-r--r--sw/inc/IGrammarContact.hxx2
-rw-r--r--sw/inc/IInterface.hxx3
-rw-r--r--sw/inc/IMark.hxx12
-rw-r--r--sw/inc/PostItMgr.hxx32
-rw-r--r--sw/inc/RefreshListenerContainer.hxx3
-rw-r--r--sw/inc/SidebarWin.hxx37
-rw-r--r--sw/inc/SidebarWindowsTypes.hxx7
-rw-r--r--sw/inc/SwAppletImpl.hxx7
-rw-r--r--sw/inc/SwCapObjType.hxx3
-rw-r--r--sw/inc/SwGetPoolIdFromName.hxx3
-rw-r--r--sw/inc/SwNodeNum.hxx18
-rw-r--r--sw/inc/SwNumberTree.hxx74
-rw-r--r--sw/inc/SwNumberTreeTypes.hxx3
-rw-r--r--sw/inc/SwRewriter.hxx12
-rw-r--r--sw/inc/SwSmartTagMgr.hxx10
-rw-r--r--sw/inc/SwStyleNameMapper.hxx7
-rw-r--r--sw/inc/SwUndoField.hxx3
-rw-r--r--sw/inc/SwXMLSectionList.hxx4
-rw-r--r--sw/inc/TextCursorHelper.hxx2
-rw-r--r--sw/inc/accessibilityoptions.hxx2
-rw-r--r--sw/inc/accmap.hxx45
-rw-r--r--sw/inc/acmplwrd.hxx9
-rw-r--r--sw/inc/anchoreddrawobject.hxx41
-rw-r--r--sw/inc/anchoredobject.hxx112
-rw-r--r--sw/inc/authfld.hxx27
-rw-r--r--sw/inc/authratr.hxx3
-rw-r--r--sw/inc/bparr.hxx50
-rw-r--r--sw/inc/breakit.hxx2
-rw-r--r--sw/inc/calbck.hxx94
-rw-r--r--sw/inc/calc.hxx89
-rw-r--r--sw/inc/ccoll.hxx9
-rw-r--r--sw/inc/cellatr.hxx19
-rw-r--r--sw/inc/cellfml.hxx42
-rw-r--r--sw/inc/charatr.hxx15
-rw-r--r--sw/inc/charfmt.hxx6
-rw-r--r--sw/inc/chcmprse.hxx6
-rw-r--r--sw/inc/checkit.hxx4
-rw-r--r--sw/inc/chpfld.hxx32
-rw-r--r--sw/inc/chrdlg.hrc5
-rw-r--r--sw/inc/cmdid.h1022
-rw-r--r--sw/inc/colwd.hxx5
-rw-r--r--sw/inc/comcore.hrc16
-rw-r--r--sw/inc/crsrsh.hxx436
-rw-r--r--sw/inc/crsskip.hxx3
-rw-r--r--sw/inc/crstate.hxx61
-rw-r--r--sw/inc/cshtyp.hxx44
-rw-r--r--sw/inc/dbfld.hxx81
-rw-r--r--sw/inc/dbgoutsw.hxx13
-rw-r--r--sw/inc/dbmgr.hxx51
-rw-r--r--sw/inc/dbui.hrc4
-rw-r--r--sw/inc/dcontact.hxx161
-rw-r--r--sw/inc/ddefld.hxx17
-rw-r--r--sw/inc/dialog.hrc2
-rw-r--r--sw/inc/dlelstnr.hxx2
-rw-r--r--sw/inc/dobjfac.hxx2
-rw-r--r--sw/inc/doc.hxx730
-rw-r--r--sw/inc/docary.hxx19
-rw-r--r--sw/inc/docfac.hxx4
-rw-r--r--sw/inc/docsh.hxx95
-rw-r--r--sw/inc/docstat.hxx4
-rw-r--r--sw/inc/docstyle.hxx29
-rw-r--r--sw/inc/docufld.hxx186
-rw-r--r--sw/inc/dpage.hxx4
-rw-r--r--sw/inc/drawdoc.hxx14
-rw-r--r--sw/inc/edglbldc.hxx7
-rw-r--r--sw/inc/edimp.hxx7
-rw-r--r--sw/inc/editsh.hxx506
-rw-r--r--sw/inc/envelp.hrc7
-rw-r--r--sw/inc/error.h50
-rw-r--r--sw/inc/expfld.hxx116
-rw-r--r--sw/inc/extinput.hxx2
-rw-r--r--sw/inc/fchrfmt.hxx12
-rw-r--r--sw/inc/fesh.hxx369
-rw-r--r--sw/inc/fldbas.hxx136
-rw-r--r--sw/inc/flddat.hxx22
-rw-r--r--sw/inc/flddropdown.hxx7
-rw-r--r--sw/inc/fldinit.hxx7
-rw-r--r--sw/inc/fldupde.hxx3
-rw-r--r--sw/inc/flyenum.hxx19
-rw-r--r--sw/inc/flypos.hxx15
-rw-r--r--sw/inc/fmtanchr.hxx24
-rw-r--r--sw/inc/fmtautofmt.hxx6
-rw-r--r--sw/inc/fmtclbl.hxx4
-rw-r--r--sw/inc/fmtclds.hxx87
-rw-r--r--sw/inc/fmtcnct.hxx13
-rw-r--r--sw/inc/fmtcntnt.hxx9
-rw-r--r--sw/inc/fmtcol.hxx106
-rw-r--r--sw/inc/fmtcolfunc.hxx9
-rw-r--r--sw/inc/fmteiro.hxx4
-rw-r--r--sw/inc/fmtflcnt.hxx16
-rw-r--r--sw/inc/fmtfld.hxx16
-rw-r--r--sw/inc/fmtfollowtextflow.hxx4
-rw-r--r--sw/inc/fmtfordr.hxx5
-rw-r--r--sw/inc/fmtfsize.hxx46
-rw-r--r--sw/inc/fmtftn.hxx16
-rw-r--r--sw/inc/fmtftntx.hxx13
-rw-r--r--sw/inc/fmthdft.hxx18
-rw-r--r--sw/inc/fmtinfmt.hxx24
-rw-r--r--sw/inc/fmtline.hxx12
-rw-r--r--sw/inc/fmtlsplt.hxx4
-rw-r--r--[-rwxr-xr-x]sw/inc/fmtmeta.hxx3
-rw-r--r--sw/inc/fmtornt.hxx23
-rw-r--r--sw/inc/fmtpdsc.hxx26
-rw-r--r--sw/inc/fmtrfmrk.hxx10
-rw-r--r--sw/inc/fmtrowsplt.hxx4
-rw-r--r--sw/inc/fmtruby.hxx20
-rw-r--r--sw/inc/fmtsrnd.hxx15
-rw-r--r--sw/inc/fmtsrndenum.hxx3
-rw-r--r--sw/inc/fmturl.hxx20
-rw-r--r--sw/inc/fmtwrapinfluenceonobjpos.hxx13
-rw-r--r--sw/inc/format.hxx126
-rw-r--r--sw/inc/frmatr.hxx19
-rw-r--r--sw/inc/frmfmt.hxx104
-rw-r--r--sw/inc/ftnidx.hxx12
-rw-r--r--sw/inc/ftninfo.hxx10
-rw-r--r--sw/inc/globals.hrc7
-rw-r--r--sw/inc/globdoc.hxx2
-rw-r--r--sw/inc/grfatr.hxx59
-rw-r--r--sw/inc/helpid.h18
-rw-r--r--sw/inc/hfspacingitem.hxx4
-rw-r--r--sw/inc/hhcwrp.hxx3
-rw-r--r--sw/inc/hintids.hxx121
-rw-r--r--sw/inc/hints.hxx105
-rw-r--r--sw/inc/htmltbl.hxx186
-rw-r--r--sw/inc/index.hxx33
-rw-r--r--sw/inc/inetfld.hxx22
-rw-r--r--sw/inc/init.hxx3
-rw-r--r--sw/inc/io.hxx52
-rw-r--r--sw/inc/iodetect.hxx33
-rw-r--r--sw/inc/istyleaccess.hxx3
-rw-r--r--sw/inc/itabenum.hxx4
-rw-r--r--sw/inc/lineinfo.hxx5
-rw-r--r--sw/inc/linkenum.hxx2
-rw-r--r--sw/inc/list.hxx7
-rw-r--r--sw/inc/listfunc.hxx3
-rw-r--r--sw/inc/mdiexp.hxx9
-rw-r--r--sw/inc/modcfg.hxx28
-rw-r--r--sw/inc/modeltoviewhelper.hxx3
-rw-r--r--sw/inc/ndarr.hxx129
-rw-r--r--sw/inc/ndgrf.hxx67
-rw-r--r--sw/inc/ndhints.hxx48
-rw-r--r--sw/inc/ndindex.hxx29
-rw-r--r--sw/inc/ndnotxt.hxx25
-rw-r--r--sw/inc/ndole.hxx35
-rw-r--r--sw/inc/ndtxt.hxx159
-rw-r--r--sw/inc/ndtyp.hxx17
-rw-r--r--sw/inc/newhdl.hxx4
-rw-r--r--sw/inc/node.hxx177
-rw-r--r--sw/inc/numrule.hxx106
-rw-r--r--sw/inc/pagedesc.hxx112
-rw-r--r--sw/inc/pageiter.hxx2
-rw-r--r--sw/inc/pagepreviewlayout.hxx65
-rw-r--r--sw/inc/pam.hxx50
-rw-r--r--sw/inc/paratr.hxx58
-rw-r--r--sw/inc/pausethreadstarting.hxx5
-rw-r--r--sw/inc/pch/precompiled_sw.cxx2
-rwxr-xr-xsw/inc/pch/precompiled_sw.hxx10
-rw-r--r--sw/inc/poolfmt.hxx14
-rw-r--r--sw/inc/postithelper.hxx24
-rw-r--r--sw/inc/printdata.hxx12
-rw-r--r--sw/inc/prtopt.hxx2
-rw-r--r--sw/inc/pvprtdat.hxx2
-rw-r--r--sw/inc/rcid.hrc7
-rw-r--r--sw/inc/redline.hxx4
-rw-r--r--sw/inc/redlnaut.hxx3
-rw-r--r--sw/inc/reffld.hxx22
-rw-r--r--sw/inc/ring.hxx3
-rw-r--r--sw/inc/rubylist.hxx3
-rw-r--r--sw/inc/section.hxx23
-rw-r--r--sw/inc/shellid.hxx4
-rw-r--r--sw/inc/shellio.hxx64
-rw-r--r--sw/inc/shellres.hxx20
-rw-r--r--sw/inc/sortopt.hxx3
-rw-r--r--sw/inc/splargs.hxx3
-rw-r--r--sw/inc/stringhash.hxx3
-rw-r--r--sw/inc/sw_primitivetypes2d.hxx5
-rw-r--r--sw/inc/swabstdlg.hxx13
-rw-r--r--sw/inc/swacorr.hxx2
-rw-r--r--sw/inc/swatrset.hxx24
-rw-r--r--sw/inc/swbaslnk.hxx2
-rw-r--r--sw/inc/swcalwrp.hxx2
-rw-r--r--sw/inc/swcli.hxx5
-rw-r--r--sw/inc/swcommands.h3
-rw-r--r--sw/inc/swcrsr.hxx13
-rw-r--r--sw/inc/swdbdata.hxx2
-rw-r--r--sw/inc/swdbtoolsclient.hxx6
-rw-r--r--sw/inc/swddetbl.hxx3
-rw-r--r--sw/inc/swdll.hxx15
-rw-r--r--sw/inc/swdllapi.h3
-rw-r--r--sw/inc/swerror.h14
-rw-r--r--sw/inc/swevent.hxx4
-rw-r--r--sw/inc/swfltopt.hxx3
-rw-r--r--sw/inc/swgstr.hxx3
-rw-r--r--sw/inc/swhints.hxx3
-rw-r--r--sw/inc/swmodule.hxx10
-rw-r--r--sw/inc/swrect.hxx31
-rw-r--r--sw/inc/swregion.hxx3
-rw-r--r--sw/inc/swserv.hxx2
-rw-r--r--sw/inc/swstyle.h2
-rw-r--r--sw/inc/swtable.hxx32
-rw-r--r--sw/inc/swtblfmt.hxx3
-rw-r--r--sw/inc/swtypes.hxx27
-rw-r--r--sw/inc/swundo.hxx13
-rw-r--r--sw/inc/swunodef.hxx3
-rw-r--r--sw/inc/swunohelper.hxx3
-rw-r--r--sw/inc/swurl.hxx3
-rw-r--r--sw/inc/swwait.hxx3
-rw-r--r--sw/inc/tabcol.hxx4
-rw-r--r--sw/inc/tblafmt.hxx10
-rw-r--r--sw/inc/tblenum.hxx3
-rw-r--r--sw/inc/tblsel.hxx3
-rw-r--r--sw/inc/tgrditem.hxx8
-rw-r--r--sw/inc/tox.hxx61
-rw-r--r--sw/inc/toxe.hxx4
-rw-r--r--sw/inc/toxinit.hxx3
-rw-r--r--sw/inc/toxwrap.hxx3
-rw-r--r--sw/inc/txatbase.hxx26
-rw-r--r--sw/inc/txatritr.hxx3
-rw-r--r--sw/inc/txtatr.hxx5
-rw-r--r--sw/inc/txtflcnt.hxx2
-rw-r--r--sw/inc/txtfld.hxx6
-rw-r--r--sw/inc/txtftn.hxx4
-rw-r--r--sw/inc/txtinet.hxx4
-rw-r--r--sw/inc/txtrfmrk.hxx4
-rw-r--r--sw/inc/txttxmrk.hxx4
-rw-r--r--sw/inc/undobj.hxx12
-rw-r--r--sw/inc/unoatxt.hxx11
-rw-r--r--sw/inc/unobaseclass.hxx18
-rw-r--r--sw/inc/unobookmark.hxx30
-rw-r--r--sw/inc/unochart.hxx2
-rw-r--r--sw/inc/unocoll.hxx45
-rw-r--r--sw/inc/unocrsr.hxx9
-rw-r--r--sw/inc/unocrsrhelper.hxx9
-rw-r--r--sw/inc/unodraw.hxx38
-rw-r--r--sw/inc/unoevent.hxx3
-rw-r--r--sw/inc/unoevtlstnr.hxx7
-rw-r--r--sw/inc/unofield.hxx18
-rw-r--r--sw/inc/unoflatpara.hxx3
-rw-r--r--sw/inc/unofootnote.hxx6
-rw-r--r--sw/inc/unoframe.hxx20
-rw-r--r--sw/inc/unoidx.hxx12
-rw-r--r--sw/inc/unomailmerge.hxx5
-rw-r--r--sw/inc/unomap.hxx12
-rw-r--r--sw/inc/unomid.h8
-rw-r--r--sw/inc/unomod.hxx37
-rw-r--r--sw/inc/unoparaframeenum.hxx9
-rw-r--r--sw/inc/unoparagraph.hxx8
-rw-r--r--sw/inc/unoport.hxx16
-rw-r--r--sw/inc/unoprnms.hxx72
-rw-r--r--sw/inc/unoredline.hxx11
-rw-r--r--sw/inc/unoredlines.hxx4
-rw-r--r--sw/inc/unorefmark.hxx6
-rw-r--r--sw/inc/unosection.hxx6
-rw-r--r--sw/inc/unosett.hxx20
-rw-r--r--sw/inc/unosrch.hxx6
-rw-r--r--sw/inc/unostyle.hxx51
-rw-r--r--sw/inc/unotbl.hxx47
-rw-r--r--sw/inc/unotext.hxx5
-rw-r--r--sw/inc/unotextbodyhf.hxx5
-rw-r--r--sw/inc/unotextcursor.hxx2
-rw-r--r--sw/inc/unotextmarkup.hxx2
-rw-r--r--sw/inc/unotextrange.hxx9
-rw-r--r--sw/inc/unotxdoc.hxx16
-rw-r--r--sw/inc/usrfld.hxx11
-rw-r--r--sw/inc/viewopt.hxx26
-rw-r--r--sw/inc/viewsh.hxx40
-rw-r--r--sw/inc/viscrs.hxx22
-rw-r--r--sw/inc/wdocsh.hxx2
-rw-r--r--sw/prj/build.lst3
-rw-r--r--[-rwxr-xr-x]sw/qa/complex/checkColor/CheckChangeColor.java0
-rw-r--r--[-rwxr-xr-x]sw/qa/complex/indeterminateState/CheckIndeterminateState.java0
-rw-r--r--[-rwxr-xr-x]sw/qa/complex/writer/CheckIndexedPropertyValues.java0
-rw-r--r--[-rwxr-xr-x]sw/qa/complex/writer/CheckNamedPropertyValues.java0
-rw-r--r--[-rwxr-xr-x]sw/qa/complex/writer/TextPortionEnumerationTest.java0
-rw-r--r--sw/qa/core/CVE/CVE-2006-3117-1.sxwbin0 -> 441416 bytes
-rw-r--r--sw/qa/core/CVE/CVE-2007-0245-1.rtf21
-rw-r--r--sw/qa/core/CVE/CVE-2009-0200-1.docbin0 -> 8192 bytes
-rw-r--r--sw/qa/core/CVE/CVE-2009-0201-1.docbin0 -> 8192 bytes
-rw-r--r--sw/qa/core/CVE/CVE-2009-3301-1.docbin0 -> 27648 bytes
-rw-r--r--sw/qa/core/CVE/CVE-2009-3302-1.docbin0 -> 27648 bytes
-rw-r--r--sw/qa/core/CVE/CVE-2009-3302-2.docbin0 -> 27648 bytes
-rw-r--r--sw/qa/core/CVE/CVE-2010-3451-1.rtf2072
-rw-r--r--sw/qa/core/CVE/CVE-2010-3452-1.rtf1
-rw-r--r--sw/qa/core/CVE/CVE-2010-3453-1.docbin0 -> 126464 bytes
-rw-r--r--sw/qa/core/CVE/CVE-2010-3454-1.docbin0 -> 126464 bytes
-rw-r--r--sw/qa/core/Test-BigPtrArray.cxx183
-rw-r--r--sw/qa/core/bigpointerarray-new.cxx3
-rw-r--r--sw/qa/core/bigpointerarray-new.hxx3
-rw-r--r--sw/qa/core/export.exp1
-rw-r--r--sw/qa/core/export.map2
-rw-r--r--sw/qa/core/filters-test.cxx243
-rw-r--r--sw/qa/core/swdoc-test.cxx241
-rw-r--r--[-rwxr-xr-x]sw/sdi/_annotsh.sdi0
-rw-r--r--sw/sdi/_basesh.sdi6
-rw-r--r--sw/sdi/_frmsh.sdi17
-rw-r--r--sw/sdi/_grfsh.sdi5
-rw-r--r--sw/sdi/_navsh.sdi49
-rw-r--r--[-rwxr-xr-x]sw/sdi/annotsh.sdi0
-rw-r--r--sw/sdi/navsh.sdi35
-rw-r--r--sw/sdi/swinterf.c2
-rw-r--r--sw/sdi/swriter.sdi151
-rw-r--r--sw/sdi/swslots.sdi2
-rw-r--r--sw/source/core/SwNumberTree/SwNodeNum.cxx146
-rw-r--r--sw/source/core/SwNumberTree/SwNumberTree.cxx237
-rw-r--r--sw/source/core/access/acccell.cxx47
-rw-r--r--sw/source/core/access/acccell.hxx2
-rw-r--r--sw/source/core/access/acccontext.cxx228
-rw-r--r--sw/source/core/access/acccontext.hxx50
-rw-r--r--sw/source/core/access/accdoc.cxx45
-rw-r--r--sw/source/core/access/accdoc.hxx6
-rw-r--r--sw/source/core/access/accembedded.cxx5
-rw-r--r--sw/source/core/access/accembedded.hxx3
-rw-r--r--sw/source/core/access/accfootnote.cxx13
-rw-r--r--sw/source/core/access/accfootnote.hxx2
-rw-r--r--sw/source/core/access/accframe.cxx15
-rw-r--r--sw/source/core/access/accframe.hxx5
-rw-r--r--sw/source/core/access/accframebase.cxx29
-rw-r--r--sw/source/core/access/accframebase.hxx3
-rw-r--r--sw/source/core/access/accfrmobj.cxx12
-rw-r--r--sw/source/core/access/accfrmobj.hxx8
-rw-r--r--sw/source/core/access/accfrmobjmap.cxx11
-rw-r--r--sw/source/core/access/accfrmobjmap.hxx2
-rw-r--r--sw/source/core/access/accfrmobjslist.cxx14
-rw-r--r--sw/source/core/access/accfrmobjslist.hxx3
-rw-r--r--sw/source/core/access/accgraphic.cxx5
-rw-r--r--sw/source/core/access/accgraphic.hxx3
-rw-r--r--sw/source/core/access/accheaderfooter.cxx15
-rw-r--r--sw/source/core/access/accheaderfooter.hxx4
-rw-r--r--sw/source/core/access/acchyperlink.cxx16
-rw-r--r--sw/source/core/access/acchyperlink.hxx6
-rw-r--r--sw/source/core/access/acchypertextdata.cxx3
-rw-r--r--sw/source/core/access/acchypertextdata.hxx2
-rw-r--r--sw/source/core/access/accmap.cxx338
-rw-r--r--sw/source/core/access/accnotextframe.cxx39
-rw-r--r--sw/source/core/access/accnotextframe.hxx10
-rw-r--r--sw/source/core/access/accpage.cxx23
-rw-r--r--sw/source/core/access/accpage.hxx4
-rw-r--r--sw/source/core/access/accpara.cxx255
-rw-r--r--sw/source/core/access/accpara.hxx50
-rw-r--r--sw/source/core/access/accportions.cxx17
-rw-r--r--sw/source/core/access/accportions.hxx4
-rw-r--r--sw/source/core/access/accpreview.cxx15
-rw-r--r--sw/source/core/access/accpreview.hxx2
-rw-r--r--sw/source/core/access/accselectionhelper.cxx34
-rw-r--r--sw/source/core/access/accselectionhelper.hxx4
-rw-r--r--sw/source/core/access/acctable.cxx209
-rw-r--r--sw/source/core/access/acctable.hxx14
-rw-r--r--sw/source/core/access/acctextframe.cxx26
-rw-r--r--sw/source/core/access/acctextframe.hxx8
-rw-r--r--sw/source/core/access/parachangetrackinginfo.cxx17
-rw-r--r--sw/source/core/access/parachangetrackinginfo.hxx5
-rw-r--r--sw/source/core/access/textmarkuphelper.cxx18
-rw-r--r--sw/source/core/access/textmarkuphelper.hxx13
-rw-r--r--sw/source/core/attr/calbck.cxx59
-rw-r--r--sw/source/core/attr/cellatr.cxx11
-rw-r--r--sw/source/core/attr/fmtfollowtextflow.cxx3
-rw-r--r--sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx38
-rw-r--r--sw/source/core/attr/format.cxx45
-rw-r--r--sw/source/core/attr/hints.cxx44
-rw-r--r--sw/source/core/attr/swatrset.cxx35
-rw-r--r--sw/source/core/bastyp/SwSmartTagMgr.cxx22
-rw-r--r--sw/source/core/bastyp/bparr.cxx12
-rw-r--r--sw/source/core/bastyp/breakit.cxx18
-rw-r--r--sw/source/core/bastyp/calc.cxx181
-rw-r--r--sw/source/core/bastyp/checkit.cxx4
-rw-r--r--sw/source/core/bastyp/index.cxx174
-rw-r--r--sw/source/core/bastyp/init.cxx86
-rw-r--r--sw/source/core/bastyp/ring.cxx17
-rw-r--r--sw/source/core/bastyp/swcache.cxx154
-rw-r--r--sw/source/core/bastyp/swrect.cxx36
-rw-r--r--sw/source/core/bastyp/swregion.cxx11
-rw-r--r--sw/source/core/bastyp/swtypes.cxx2
-rw-r--r--sw/source/core/bastyp/tabcol.cxx7
-rw-r--r--sw/source/core/crsr/BlockCursor.cxx2
-rw-r--r--sw/source/core/crsr/BlockCursor.hxx3
-rw-r--r--sw/source/core/crsr/IBlockCursor.hxx2
-rw-r--r--sw/source/core/crsr/bookmrk.cxx51
-rw-r--r--sw/source/core/crsr/callnk.cxx100
-rw-r--r--sw/source/core/crsr/callnk.hxx3
-rw-r--r--sw/source/core/crsr/crbm.cxx7
-rw-r--r--sw/source/core/crsr/crossrefbookmark.cxx10
-rw-r--r--sw/source/core/crsr/crsrsh.cxx179
-rw-r--r--sw/source/core/crsr/crstrvl.cxx40
-rw-r--r--sw/source/core/crsr/crstrvl1.cxx2
-rw-r--r--sw/source/core/crsr/findattr.cxx55
-rw-r--r--sw/source/core/crsr/findcoll.cxx2
-rw-r--r--sw/source/core/crsr/findfmt.cxx2
-rw-r--r--sw/source/core/crsr/findtxt.cxx10
-rw-r--r--sw/source/core/crsr/pam.cxx129
-rw-r--r--sw/source/core/crsr/paminit.cxx3
-rw-r--r--sw/source/core/crsr/swcrsr.cxx92
-rw-r--r--sw/source/core/crsr/trvlcol.cxx2
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx2
-rw-r--r--sw/source/core/crsr/trvlreg.cxx2
-rw-r--r--sw/source/core/crsr/trvltbl.cxx15
-rw-r--r--sw/source/core/crsr/unocrsr.cxx12
-rw-r--r--sw/source/core/crsr/viscrs.cxx342
-rw-r--r--sw/source/core/doc/SwStyleNameMapper.cxx30
-rw-r--r--sw/source/core/doc/acmplwrd.cxx75
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx12
-rw-r--r--sw/source/core/doc/doc.cxx197
-rw-r--r--sw/source/core/doc/docbasic.cxx18
-rw-r--r--sw/source/core/doc/docbm.cxx45
-rw-r--r--sw/source/core/doc/docchart.cxx9
-rw-r--r--sw/source/core/doc/doccomp.cxx103
-rw-r--r--sw/source/core/doc/doccorr.cxx2
-rw-r--r--sw/source/core/doc/docdde.cxx4
-rw-r--r--sw/source/core/doc/docdesc.cxx67
-rw-r--r--sw/source/core/doc/docdraw.cxx175
-rw-r--r--sw/source/core/doc/docedt.cxx98
-rw-r--r--sw/source/core/doc/docfld.cxx187
-rw-r--r--sw/source/core/doc/docfly.cxx107
-rw-r--r--sw/source/core/doc/docfmt.cxx156
-rw-r--r--sw/source/core/doc/docftn.cxx14
-rw-r--r--sw/source/core/doc/docglbl.cxx36
-rw-r--r--sw/source/core/doc/docglos.cxx6
-rw-r--r--sw/source/core/doc/doclay.cxx190
-rw-r--r--sw/source/core/doc/docnew.cxx155
-rw-r--r--sw/source/core/doc/docnum.cxx462
-rw-r--r--sw/source/core/doc/docredln.cxx151
-rw-r--r--sw/source/core/doc/docruby.cxx26
-rw-r--r--sw/source/core/doc/docsort.cxx68
-rw-r--r--sw/source/core/doc/docstat.cxx4
-rw-r--r--sw/source/core/doc/doctxm.cxx165
-rw-r--r--sw/source/core/doc/docxforms.cxx3
-rw-r--r--sw/source/core/doc/extinput.cxx4
-rw-r--r--sw/source/core/doc/fmtcol.cxx56
-rw-r--r--sw/source/core/doc/ftnidx.cxx2
-rw-r--r--sw/source/core/doc/gctable.cxx4
-rw-r--r--sw/source/core/doc/htmltbl.cxx143
-rw-r--r--sw/source/core/doc/lineinfo.cxx6
-rw-r--r--sw/source/core/doc/list.cxx14
-rw-r--r--sw/source/core/doc/notxtfrm.cxx98
-rw-r--r--sw/source/core/doc/number.cxx378
-rw-r--r--sw/source/core/doc/poolfmt.cxx229
-rw-r--r--sw/source/core/doc/sortopt.cxx11
-rw-r--r--sw/source/core/doc/swserv.cxx17
-rw-r--r--sw/source/core/doc/swstylemanager.cxx13
-rw-r--r--sw/source/core/doc/swstylemanager.hxx7
-rw-r--r--sw/source/core/doc/tblafmt.cxx32
-rw-r--r--sw/source/core/doc/tblcpy.cxx38
-rw-r--r--sw/source/core/doc/tblrwcl.cxx151
-rw-r--r--sw/source/core/doc/visiturl.cxx2
-rw-r--r--sw/source/core/docnode/cancellablejob.cxx3
-rw-r--r--sw/source/core/docnode/cancellablejob.hxx3
-rw-r--r--sw/source/core/docnode/finalthreadmanager.cxx62
-rw-r--r--sw/source/core/docnode/ndcopy.cxx108
-rw-r--r--sw/source/core/docnode/ndindex.cxx14
-rw-r--r--sw/source/core/docnode/ndnotxt.cxx29
-rw-r--r--sw/source/core/docnode/ndnum.cxx88
-rw-r--r--sw/source/core/docnode/ndsect.cxx68
-rw-r--r--sw/source/core/docnode/ndtbl.cxx366
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx43
-rw-r--r--sw/source/core/docnode/node.cxx117
-rw-r--r--sw/source/core/docnode/node2lay.cxx34
-rw-r--r--sw/source/core/docnode/nodes.cxx177
-rw-r--r--sw/source/core/docnode/observablethread.cxx5
-rw-r--r--sw/source/core/docnode/pausethreadstarting.cxx5
-rw-r--r--sw/source/core/docnode/retrievedinputstreamdata.cxx6
-rw-r--r--sw/source/core/docnode/retrieveinputstream.cxx9
-rw-r--r--sw/source/core/docnode/retrieveinputstreamconsumer.cxx4
-rw-r--r--sw/source/core/docnode/section.cxx109
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx50
-rw-r--r--sw/source/core/docnode/swthreadjoiner.cxx5
-rw-r--r--sw/source/core/docnode/swthreadmanager.cxx5
-rw-r--r--sw/source/core/docnode/threadlistener.cxx4
-rw-r--r--sw/source/core/docnode/threadmanager.cxx10
-rw-r--r--sw/source/core/draw/dcontact.cxx327
-rw-r--r--sw/source/core/draw/dflyobj.cxx76
-rw-r--r--sw/source/core/draw/dobjfac.cxx5
-rw-r--r--sw/source/core/draw/dpage.cxx17
-rw-r--r--sw/source/core/draw/drawdoc.cxx17
-rw-r--r--sw/source/core/draw/dview.cxx90
-rw-r--r--sw/source/core/edit/acorrect.cxx11
-rw-r--r--sw/source/core/edit/autofmt.cxx124
-rw-r--r--sw/source/core/edit/edatmisc.cxx20
-rw-r--r--sw/source/core/edit/edattr.cxx32
-rw-r--r--sw/source/core/edit/eddel.cxx6
-rw-r--r--sw/source/core/edit/edfcol.cxx11
-rw-r--r--sw/source/core/edit/edfld.cxx25
-rw-r--r--sw/source/core/edit/edfldexp.cxx9
-rw-r--r--sw/source/core/edit/edfmt.cxx11
-rw-r--r--sw/source/core/edit/edglbldc.cxx4
-rw-r--r--sw/source/core/edit/edglss.cxx6
-rw-r--r--sw/source/core/edit/editsh.cxx81
-rw-r--r--sw/source/core/edit/edlingu.cxx125
-rw-r--r--sw/source/core/edit/ednumber.cxx60
-rw-r--r--sw/source/core/edit/edredln.cxx2
-rw-r--r--sw/source/core/edit/edsect.cxx10
-rw-r--r--sw/source/core/edit/edtab.cxx10
-rw-r--r--sw/source/core/edit/edtox.cxx38
-rw-r--r--sw/source/core/edit/edundo.cxx16
-rw-r--r--sw/source/core/edit/edws.cxx6
-rw-r--r--sw/source/core/fields/authfld.cxx151
-rw-r--r--sw/source/core/fields/cellfml.cxx47
-rw-r--r--sw/source/core/fields/chpfld.cxx59
-rw-r--r--sw/source/core/fields/dbfld.cxx143
-rw-r--r--sw/source/core/fields/ddefld.cxx25
-rw-r--r--sw/source/core/fields/ddetbl.cxx18
-rw-r--r--sw/source/core/fields/docufld.cxx264
-rw-r--r--sw/source/core/fields/expfld.cxx77
-rw-r--r--sw/source/core/fields/fldbas.cxx76
-rw-r--r--sw/source/core/fields/flddat.cxx63
-rw-r--r--sw/source/core/fields/flddropdown.cxx19
-rw-r--r--sw/source/core/fields/fldlst.cxx4
-rw-r--r--sw/source/core/fields/macrofld.cxx24
-rw-r--r--sw/source/core/fields/postithelper.cxx22
-rw-r--r--sw/source/core/fields/reffld.cxx35
-rw-r--r--sw/source/core/fields/scrptfld.cxx22
-rw-r--r--sw/source/core/fields/tblcalc.cxx23
-rw-r--r--[-rwxr-xr-x]sw/source/core/fields/textapi.cxx3
-rw-r--r--sw/source/core/fields/usrfld.cxx32
-rw-r--r--sw/source/core/frmedt/fecopy.cxx51
-rw-r--r--sw/source/core/frmedt/fedesc.cxx22
-rw-r--r--sw/source/core/frmedt/fefly1.cxx157
-rw-r--r--sw/source/core/frmedt/feflyole.cxx7
-rw-r--r--sw/source/core/frmedt/feshview.cxx268
-rw-r--r--sw/source/core/frmedt/fetab.cxx112
-rw-r--r--sw/source/core/frmedt/fews.cxx92
-rw-r--r--sw/source/core/frmedt/tblsel.cxx127
-rw-r--r--sw/source/core/graphic/grfatr.cxx69
-rw-r--r--sw/source/core/graphic/ndgrf.cxx82
-rw-r--r--sw/source/core/inc/GetMetricVal.hxx3
-rw-r--r--sw/source/core/inc/MarkManager.hxx3
-rw-r--r--sw/source/core/inc/SwGrammarMarkUp.hxx3
-rw-r--r--sw/source/core/inc/SwPortionHandler.hxx3
-rw-r--r--sw/source/core/inc/SwUndoFmt.hxx4
-rw-r--r--sw/source/core/inc/SwUndoPageDesc.hxx7
-rw-r--r--sw/source/core/inc/SwUndoTOXChange.hxx3
-rw-r--r--sw/source/core/inc/SwXMLBlockExport.hxx3
-rw-r--r--sw/source/core/inc/SwXMLBlockImport.hxx3
-rw-r--r--sw/source/core/inc/SwXMLBlockListContext.hxx3
-rw-r--r--sw/source/core/inc/SwXMLTextBlocks.hxx3
-rw-r--r--sw/source/core/inc/SwXTextDefaults.hxx5
-rw-r--r--sw/source/core/inc/UndoNumbering.hxx22
-rw-r--r--sw/source/core/inc/UndoTable.hxx4
-rw-r--r--sw/source/core/inc/acorrect.hxx3
-rw-r--r--sw/source/core/inc/anchoredobjectposition.hxx58
-rw-r--r--sw/source/core/inc/ascharanchoredobjectposition.hxx3
-rw-r--r--sw/source/core/inc/blink.hxx2
-rw-r--r--sw/source/core/inc/bodyfrm.hxx5
-rw-r--r--sw/source/core/inc/bookmrk.hxx6
-rw-r--r--sw/source/core/inc/cellfrm.hxx3
-rw-r--r--sw/source/core/inc/cntfrm.hxx3
-rw-r--r--sw/source/core/inc/colfrm.hxx3
-rw-r--r--sw/source/core/inc/crossrefbookmark.hxx3
-rw-r--r--sw/source/core/inc/dbg_lay.hxx5
-rw-r--r--sw/source/core/inc/dflyobj.hxx5
-rw-r--r--sw/source/core/inc/docfld.hxx2
-rw-r--r--sw/source/core/inc/docsort.hxx4
-rw-r--r--sw/source/core/inc/doctxm.hxx5
-rw-r--r--sw/source/core/inc/drawdev.hxx5
-rw-r--r--sw/source/core/inc/drawfont.hxx102
-rw-r--r--sw/source/core/inc/dview.hxx2
-rw-r--r--sw/source/core/inc/environmentofanchoredobject.hxx21
-rw-r--r--sw/source/core/inc/finalthreadmanager.hxx3
-rw-r--r--sw/source/core/inc/flowfrm.hxx42
-rw-r--r--sw/source/core/inc/flyfrm.hxx48
-rw-r--r--sw/source/core/inc/flyfrms.hxx39
-rw-r--r--sw/source/core/inc/fntcache.hxx5
-rw-r--r--sw/source/core/inc/frame.hxx20
-rw-r--r--sw/source/core/inc/frminf.hxx2
-rw-r--r--sw/source/core/inc/frmtool.hxx64
-rw-r--r--sw/source/core/inc/ftnboss.hxx3
-rw-r--r--sw/source/core/inc/ftnfrm.hxx17
-rw-r--r--sw/source/core/inc/hffrm.hxx3
-rw-r--r--sw/source/core/inc/ifinishedthreadlistener.hxx3
-rw-r--r--sw/source/core/inc/ithreadlistenerowner.hxx3
-rw-r--r--sw/source/core/inc/layact.hxx7
-rw-r--r--sw/source/core/inc/laycache.hxx5
-rw-r--r--sw/source/core/inc/layfrm.hxx15
-rw-r--r--sw/source/core/inc/layouter.hxx36
-rw-r--r--sw/source/core/inc/movedfwdfrmsbyobjpos.hxx9
-rw-r--r--sw/source/core/inc/mvsave.hxx2
-rw-r--r--sw/source/core/inc/node2lay.hxx5
-rw-r--r--sw/source/core/inc/noteurl.hxx2
-rw-r--r--sw/source/core/inc/notxtfrm.hxx7
-rw-r--r--sw/source/core/inc/objectformatter.hxx60
-rw-r--r--sw/source/core/inc/observablethread.hxx5
-rw-r--r--sw/source/core/inc/pagefrm.hrc47
-rw-r--r--sw/source/core/inc/pagefrm.hxx96
-rw-r--r--sw/source/core/inc/pamtyp.hxx3
-rw-r--r--sw/source/core/inc/prevwpage.hxx7
-rw-r--r--sw/source/core/inc/ptqueue.hxx3
-rw-r--r--sw/source/core/inc/retrievedinputstreamdata.hxx9
-rw-r--r--sw/source/core/inc/retrieveinputstream.hxx8
-rw-r--r--sw/source/core/inc/retrieveinputstreamconsumer.hxx13
-rw-r--r--sw/source/core/inc/rolbck.hxx25
-rw-r--r--sw/source/core/inc/rootfrm.hxx12
-rw-r--r--sw/source/core/inc/rowfrm.hxx3
-rw-r--r--sw/source/core/inc/scriptinfo.hxx78
-rw-r--r--sw/source/core/inc/sectfrm.hxx3
-rw-r--r--sw/source/core/inc/setmapvirtdev.hxx2
-rw-r--r--sw/source/core/inc/sortedobjs.hxx14
-rw-r--r--sw/source/core/inc/sortedobjsimpl.hxx3
-rw-r--r--sw/source/core/inc/swblocks.hxx100
-rw-r--r--sw/source/core/inc/swcache.hxx23
-rw-r--r--sw/source/core/inc/swfntcch.hxx5
-rw-r--r--sw/source/core/inc/swfont.hxx14
-rw-r--r--sw/source/core/inc/swselectionlist.hxx3
-rw-r--r--sw/source/core/inc/swthreadjoiner.hxx3
-rw-r--r--sw/source/core/inc/swthreadmanager.hxx11
-rw-r--r--sw/source/core/inc/tabfrm.hxx3
-rw-r--r--sw/source/core/inc/tblrwcl.hxx5
-rw-r--r--[-rwxr-xr-x]sw/source/core/inc/textapi.hxx3
-rw-r--r--sw/source/core/inc/threadlistener.hxx3
-rw-r--r--sw/source/core/inc/threadmanager.hxx3
-rw-r--r--sw/source/core/inc/tocntntanchoredobjectposition.hxx14
-rw-r--r--sw/source/core/inc/tolayoutanchoredobjectposition.hxx11
-rw-r--r--sw/source/core/inc/toxhlp.hxx3
-rw-r--r--sw/source/core/inc/txmsrt.hxx3
-rw-r--r--sw/source/core/inc/txtfrm.hxx60
-rw-r--r--sw/source/core/inc/txttypes.hxx3
-rw-r--r--sw/source/core/inc/undoflystrattr.hxx3
-rw-r--r--sw/source/core/inc/unofldmid.h3
-rw-r--r--[-rwxr-xr-x]sw/source/core/inc/unometa.hxx2
-rw-r--r--sw/source/core/inc/viewimp.hxx34
-rw-r--r--sw/source/core/inc/visiturl.hxx9
-rw-r--r--sw/source/core/inc/wrong.hxx9
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx160
-rw-r--r--sw/source/core/layout/anchoredobject.cxx143
-rw-r--r--sw/source/core/layout/atrfrm.cxx280
-rw-r--r--sw/source/core/layout/calcmove.cxx141
-rw-r--r--sw/source/core/layout/colfrm.cxx21
-rw-r--r--sw/source/core/layout/dbg_lay.cxx47
-rw-r--r--sw/source/core/layout/findfrm.cxx104
-rw-r--r--sw/source/core/layout/flowfrm.cxx120
-rw-r--r--sw/source/core/layout/fly.cxx153
-rw-r--r--sw/source/core/layout/flycnt.cxx233
-rw-r--r--sw/source/core/layout/flyincnt.cxx31
-rw-r--r--sw/source/core/layout/flylay.cxx232
-rw-r--r--sw/source/core/layout/flypos.cxx2
-rw-r--r--sw/source/core/layout/frmtool.cxx139
-rw-r--r--sw/source/core/layout/ftnfrm.cxx287
-rw-r--r--sw/source/core/layout/hffrm.cxx25
-rw-r--r--sw/source/core/layout/layact.cxx118
-rw-r--r--sw/source/core/layout/laycache.cxx136
-rw-r--r--sw/source/core/layout/layhelp.hxx14
-rw-r--r--sw/source/core/layout/layouter.cxx36
-rw-r--r--sw/source/core/layout/movedfwdfrmsbyobjpos.cxx2
-rw-r--r--sw/source/core/layout/newfrm.cxx23
-rw-r--r--sw/source/core/layout/objectformatter.cxx69
-rw-r--r--sw/source/core/layout/objectformatterlayfrm.cxx11
-rw-r--r--sw/source/core/layout/objectformatterlayfrm.hxx3
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx181
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.hxx44
-rw-r--r--sw/source/core/layout/objstmpconsiderwrapinfl.cxx3
-rw-r--r--sw/source/core/layout/objstmpconsiderwrapinfl.hxx3
-rw-r--r--sw/source/core/layout/pagechg.cxx167
-rw-r--r--sw/source/core/layout/pagedesc.cxx42
-rw-r--r--sw/source/core/layout/pagefrm.src17
-rw-r--r--sw/source/core/layout/paintfrm.cxx513
-rw-r--r--sw/source/core/layout/sectfrm.cxx129
-rw-r--r--sw/source/core/layout/softpagebreak.cxx2
-rw-r--r--sw/source/core/layout/sortedobjs.cxx3
-rw-r--r--sw/source/core/layout/sortedobjsimpl.cxx10
-rw-r--r--sw/source/core/layout/ssfrm.cxx32
-rw-r--r--sw/source/core/layout/swselectionlist.cxx2
-rw-r--r--sw/source/core/layout/tabfrm.cxx283
-rw-r--r--sw/source/core/layout/trvlfrm.cxx114
-rw-r--r--sw/source/core/layout/unusedf.cxx23
-rw-r--r--sw/source/core/layout/virtoutp.cxx10
-rw-r--r--sw/source/core/layout/virtoutp.hxx3
-rw-r--r--sw/source/core/layout/wsfrm.cxx189
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx135
-rw-r--r--sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx12
-rw-r--r--sw/source/core/objectpositioning/environmentofanchoredobject.cxx23
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx144
-rw-r--r--sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx6
-rw-r--r--sw/source/core/ole/ndole.cxx52
-rw-r--r--sw/source/core/para/paratr.cxx40
-rw-r--r--sw/source/core/sw3io/sw3convert.cxx28
-rw-r--r--sw/source/core/sw3io/swacorr.cxx9
-rw-r--r--sw/source/core/swg/SwXMLBlockExport.cxx3
-rw-r--r--sw/source/core/swg/SwXMLBlockImport.cxx11
-rw-r--r--sw/source/core/swg/SwXMLBlockListContext.cxx3
-rw-r--r--sw/source/core/swg/SwXMLSectionList.cxx7
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks.cxx44
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks1.cxx62
-rw-r--r--sw/source/core/swg/swblocks.cxx169
-rw-r--r--sw/source/core/table/swnewtable.cxx283
-rw-r--r--sw/source/core/table/swtable.cxx121
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx60
-rw-r--r--sw/source/core/text/SwGrammarMarkUp.cxx2
-rw-r--r--sw/source/core/text/atrhndl.hxx9
-rw-r--r--sw/source/core/text/atrstck.cxx15
-rw-r--r--sw/source/core/text/blink.cxx2
-rw-r--r--sw/source/core/text/frmcrsr.cxx31
-rw-r--r--sw/source/core/text/frmform.cxx185
-rw-r--r--sw/source/core/text/frminf.cxx3
-rw-r--r--sw/source/core/text/frmpaint.cxx63
-rw-r--r--sw/source/core/text/guess.cxx28
-rw-r--r--sw/source/core/text/guess.hxx3
-rw-r--r--sw/source/core/text/inftxt.cxx105
-rw-r--r--sw/source/core/text/inftxt.hxx31
-rw-r--r--sw/source/core/text/itradj.cxx38
-rw-r--r--sw/source/core/text/itratr.cxx15
-rw-r--r--sw/source/core/text/itratr.hxx7
-rw-r--r--sw/source/core/text/itrcrsr.cxx38
-rw-r--r--sw/source/core/text/itrform2.cxx353
-rw-r--r--sw/source/core/text/itrform2.hxx7
-rw-r--r--sw/source/core/text/itrpaint.cxx24
-rw-r--r--sw/source/core/text/itrpaint.hxx3
-rw-r--r--sw/source/core/text/itrtxt.cxx30
-rw-r--r--sw/source/core/text/itrtxt.hxx12
-rw-r--r--sw/source/core/text/noteurl.cxx4
-rw-r--r--sw/source/core/text/pordrop.hxx3
-rw-r--r--sw/source/core/text/porexp.cxx2
-rw-r--r--sw/source/core/text/porexp.hxx3
-rw-r--r--sw/source/core/text/porfld.cxx49
-rw-r--r--sw/source/core/text/porfld.hxx11
-rw-r--r--sw/source/core/text/porfly.cxx22
-rw-r--r--sw/source/core/text/porfly.hxx3
-rw-r--r--sw/source/core/text/porftn.hxx5
-rw-r--r--sw/source/core/text/porglue.cxx11
-rw-r--r--sw/source/core/text/porglue.hxx4
-rw-r--r--sw/source/core/text/porhyph.hxx3
-rw-r--r--sw/source/core/text/porlay.cxx153
-rw-r--r--sw/source/core/text/porlay.hxx11
-rw-r--r--sw/source/core/text/porlin.cxx34
-rw-r--r--sw/source/core/text/porlin.hxx21
-rw-r--r--sw/source/core/text/pormulti.cxx95
-rw-r--r--sw/source/core/text/pormulti.hxx9
-rw-r--r--sw/source/core/text/porref.cxx3
-rw-r--r--sw/source/core/text/porref.hxx3
-rw-r--r--sw/source/core/text/porrst.cxx32
-rw-r--r--sw/source/core/text/porrst.hxx3
-rw-r--r--sw/source/core/text/portab.hxx3
-rw-r--r--sw/source/core/text/portox.cxx3
-rw-r--r--sw/source/core/text/portox.hxx4
-rw-r--r--sw/source/core/text/portxt.cxx33
-rw-r--r--sw/source/core/text/portxt.hxx7
-rw-r--r--sw/source/core/text/possiz.hxx2
-rw-r--r--sw/source/core/text/redlnitr.cxx21
-rw-r--r--sw/source/core/text/redlnitr.hxx6
-rw-r--r--sw/source/core/text/txtcache.cxx36
-rw-r--r--sw/source/core/text/txtcache.hxx3
-rw-r--r--sw/source/core/text/txtcfg.hxx54
-rw-r--r--sw/source/core/text/txtdrop.cxx29
-rw-r--r--sw/source/core/text/txtfld.cxx31
-rw-r--r--sw/source/core/text/txtfly.cxx79
-rw-r--r--sw/source/core/text/txtfly.hxx59
-rw-r--r--sw/source/core/text/txtfrm.cxx54
-rw-r--r--sw/source/core/text/txtftn.cxx63
-rw-r--r--sw/source/core/text/txthyph.cxx53
-rw-r--r--sw/source/core/text/txtinit.cxx8
-rw-r--r--sw/source/core/text/txtio.cxx238
-rw-r--r--sw/source/core/text/txtpaint.cxx6
-rw-r--r--sw/source/core/text/txtpaint.hxx5
-rw-r--r--sw/source/core/text/txttab.cxx26
-rw-r--r--sw/source/core/text/widorp.cxx16
-rw-r--r--sw/source/core/text/widorp.hxx3
-rw-r--r--sw/source/core/text/wrong.cxx8
-rw-r--r--sw/source/core/text/xmldump.cxx316
-rw-r--r--sw/source/core/tox/tox.cxx54
-rw-r--r--sw/source/core/tox/toxhlp.cxx33
-rw-r--r--sw/source/core/tox/txmsrt.cxx92
-rw-r--r--sw/source/core/txtnode/SwGrammarContact.cxx2
-rw-r--r--sw/source/core/txtnode/atrfld.cxx21
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx16
-rw-r--r--sw/source/core/txtnode/atrftn.cxx16
-rw-r--r--sw/source/core/txtnode/atrref.cxx4
-rw-r--r--sw/source/core/txtnode/atrtox.cxx3
-rw-r--r--sw/source/core/txtnode/chrfmt.cxx2
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx83
-rw-r--r--sw/source/core/txtnode/fntcache.cxx160
-rw-r--r--sw/source/core/txtnode/fntcap.cxx37
-rw-r--r--sw/source/core/txtnode/modeltoviewhelper.cxx3
-rw-r--r--sw/source/core/txtnode/ndhints.cxx86
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx412
-rw-r--r--sw/source/core/txtnode/swfntcch.cxx8
-rw-r--r--sw/source/core/txtnode/swfont.cxx31
-rw-r--r--sw/source/core/txtnode/thints.cxx114
-rw-r--r--sw/source/core/txtnode/txatbase.cxx2
-rw-r--r--sw/source/core/txtnode/txatritr.cxx4
-rw-r--r--sw/source/core/txtnode/txtatr2.cxx8
-rw-r--r--sw/source/core/txtnode/txtedt.cxx328
-rw-r--r--sw/source/core/undo/SwRewriter.cxx4
-rw-r--r--sw/source/core/undo/SwUndoField.cxx13
-rw-r--r--sw/source/core/undo/SwUndoFmt.cxx3
-rw-r--r--sw/source/core/undo/SwUndoPageDesc.cxx31
-rw-r--r--sw/source/core/undo/SwUndoTOXChange.cxx2
-rw-r--r--sw/source/core/undo/docundo.cxx4
-rw-r--r--sw/source/core/undo/rolbck.cxx50
-rw-r--r--sw/source/core/undo/unattr.cxx14
-rw-r--r--sw/source/core/undo/unbkmk.cxx3
-rw-r--r--sw/source/core/undo/undel.cxx17
-rw-r--r--sw/source/core/undo/undobj.cxx32
-rw-r--r--sw/source/core/undo/undobj1.cxx20
-rw-r--r--sw/source/core/undo/undoflystrattr.cxx5
-rw-r--r--sw/source/core/undo/undraw.cxx18
-rw-r--r--sw/source/core/undo/unfmco.cxx6
-rw-r--r--sw/source/core/undo/unins.cxx19
-rw-r--r--sw/source/core/undo/unmove.cxx2
-rw-r--r--sw/source/core/undo/unnum.cxx33
-rw-r--r--sw/source/core/undo/unoutl.cxx3
-rw-r--r--sw/source/core/undo/unovwr.cxx8
-rw-r--r--sw/source/core/undo/unredln.cxx5
-rw-r--r--sw/source/core/undo/unsect.cxx10
-rw-r--r--sw/source/core/undo/unsort.cxx3
-rw-r--r--sw/source/core/undo/unspnd.cxx4
-rw-r--r--sw/source/core/undo/untbl.cxx129
-rw-r--r--sw/source/core/undo/untblk.cxx4
-rw-r--r--sw/source/core/unocore/SwXTextDefaults.cxx15
-rw-r--r--sw/source/core/unocore/TextCursorHelper.cxx7
-rw-r--r--sw/source/core/unocore/XMLRangeHelper.cxx5
-rw-r--r--sw/source/core/unocore/XMLRangeHelper.hxx3
-rw-r--r--sw/source/core/unocore/swunohelper.cxx24
-rw-r--r--sw/source/core/unocore/unobkm.cxx135
-rw-r--r--sw/source/core/unocore/unochart.cxx264
-rw-r--r--sw/source/core/unocore/unocoll.cxx550
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx139
-rw-r--r--sw/source/core/unocore/unodraw.cxx560
-rw-r--r--sw/source/core/unocore/unoevent.cxx6
-rw-r--r--sw/source/core/unocore/unoevtlstnr.cxx17
-rw-r--r--sw/source/core/unocore/unofield.cxx319
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx34
-rw-r--r--sw/source/core/unocore/unoframe.cxx534
-rw-r--r--sw/source/core/unocore/unoftn.cxx136
-rw-r--r--sw/source/core/unocore/unoidx.cxx362
-rw-r--r--sw/source/core/unocore/unomap.cxx103
-rw-r--r--sw/source/core/unocore/unoobj.cxx359
-rw-r--r--sw/source/core/unocore/unoobj2.cxx178
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx198
-rw-r--r--sw/source/core/unocore/unoport.cxx167
-rw-r--r--sw/source/core/unocore/unoportenum.cxx91
-rw-r--r--sw/source/core/unocore/unoprnms.cxx9
-rw-r--r--sw/source/core/unocore/unoredline.cxx175
-rw-r--r--sw/source/core/unocore/unoredlines.cxx56
-rw-r--r--sw/source/core/unocore/unorefmk.cxx187
-rw-r--r--sw/source/core/unocore/unosect.cxx172
-rw-r--r--sw/source/core/unocore/unosett.cxx295
-rw-r--r--sw/source/core/unocore/unosrch.cxx100
-rw-r--r--sw/source/core/unocore/unostyle.cxx565
-rw-r--r--sw/source/core/unocore/unotbl.cxx805
-rw-r--r--sw/source/core/unocore/unotext.cxx262
-rw-r--r--sw/source/core/unocore/unotextmarkup.cxx20
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx251
-rw-r--r--sw/source/core/view/printdata.cxx9
-rw-r--r--sw/source/core/view/vdraw.cxx124
-rw-r--r--sw/source/core/view/viewimp.cxx186
-rw-r--r--sw/source/core/view/viewpg.cxx24
-rw-r--r--sw/source/core/view/viewsh.cxx589
-rw-r--r--sw/source/core/view/vnew.cxx124
-rw-r--r--sw/source/core/view/vprint.cxx139
-rw-r--r--sw/source/filter/ascii/ascatr.cxx2
-rw-r--r--sw/source/filter/ascii/parasc.cxx38
-rw-r--r--sw/source/filter/ascii/wrtasc.cxx5
-rw-r--r--sw/source/filter/ascii/wrtasc.hxx3
-rw-r--r--sw/source/filter/basflt/docfact.cxx15
-rw-r--r--sw/source/filter/basflt/fltini.cxx156
-rw-r--r--sw/source/filter/basflt/iodetect.cxx33
-rw-r--r--sw/source/filter/basflt/shellio.cxx76
-rw-r--r--sw/source/filter/html/SwAppletImpl.cxx18
-rw-r--r--sw/source/filter/html/css1atr.cxx124
-rw-r--r--sw/source/filter/html/css1kywd.cxx307
-rw-r--r--sw/source/filter/html/css1kywd.hxx306
-rw-r--r--sw/source/filter/html/htmlatr.cxx98
-rw-r--r--sw/source/filter/html/htmlbas.cxx20
-rw-r--r--sw/source/filter/html/htmlcss1.cxx79
-rw-r--r--sw/source/filter/html/htmlctxt.cxx17
-rw-r--r--sw/source/filter/html/htmldraw.cxx32
-rw-r--r--sw/source/filter/html/htmlfld.cxx32
-rw-r--r--sw/source/filter/html/htmlfld.hxx2
-rw-r--r--sw/source/filter/html/htmlfldw.cxx16
-rw-r--r--sw/source/filter/html/htmlfly.cxx46
-rw-r--r--sw/source/filter/html/htmlfly.hxx5
-rw-r--r--sw/source/filter/html/htmlflyt.cxx2
-rw-r--r--sw/source/filter/html/htmlform.cxx275
-rw-r--r--sw/source/filter/html/htmlform.hxx12
-rw-r--r--sw/source/filter/html/htmlforw.cxx126
-rw-r--r--sw/source/filter/html/htmlftn.cxx21
-rw-r--r--sw/source/filter/html/htmlgrin.cxx28
-rw-r--r--sw/source/filter/html/htmlnum.cxx76
-rw-r--r--sw/source/filter/html/htmlnum.hxx2
-rw-r--r--sw/source/filter/html/htmlplug.cxx144
-rw-r--r--sw/source/filter/html/htmlsect.cxx9
-rw-r--r--sw/source/filter/html/htmltab.cxx235
-rw-r--r--sw/source/filter/html/htmltabw.cxx47
-rw-r--r--sw/source/filter/html/htmlvsh.hxx2
-rw-r--r--sw/source/filter/html/parcss1.cxx28
-rw-r--r--sw/source/filter/html/parcss1.hxx2
-rw-r--r--sw/source/filter/html/svxcss1.cxx143
-rw-r--r--sw/source/filter/html/svxcss1.hxx4
-rw-r--r--sw/source/filter/html/swcss1.hxx2
-rw-r--r--sw/source/filter/html/swhtml.cxx229
-rw-r--r--sw/source/filter/html/swhtml.hxx16
-rw-r--r--sw/source/filter/html/wrthtml.cxx52
-rw-r--r--sw/source/filter/html/wrthtml.hxx8
-rw-r--r--sw/source/filter/inc/fltbase.hxx2
-rw-r--r--sw/source/filter/inc/fltglbls.hxx3
-rw-r--r--sw/source/filter/inc/fltini.hxx4
-rw-r--r--sw/source/filter/inc/fltshell.hxx19
-rw-r--r--sw/source/filter/inc/msfilter.hxx18
-rw-r--r--sw/source/filter/inc/rtf.hxx2
-rw-r--r--sw/source/filter/inc/wrt_fn.hxx3
-rw-r--r--sw/source/filter/inc/wrtswtbl.hxx4
-rw-r--r--sw/source/filter/inc/wwstyles.hxx6
-rw-r--r--sw/source/filter/rtf/rtffld.cxx66
-rw-r--r--sw/source/filter/rtf/rtffly.cxx110
-rw-r--r--sw/source/filter/rtf/rtfnum.cxx137
-rw-r--r--sw/source/filter/rtf/rtftbl.cxx124
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx315
-rw-r--r--sw/source/filter/rtf/swparrtf.hxx20
-rw-r--r--sw/source/filter/writer/writer.cxx27
-rw-r--r--sw/source/filter/writer/wrt_fn.cxx11
-rw-r--r--sw/source/filter/writer/wrtswtbl.cxx77
-rw-r--r--sw/source/filter/ww1/fltshell.cxx198
-rw-r--r--sw/source/filter/ww1/w1class.cxx30
-rw-r--r--sw/source/filter/ww1/w1class.hxx82
-rw-r--r--sw/source/filter/ww1/w1filter.cxx53
-rw-r--r--sw/source/filter/ww1/w1par.cxx8
-rw-r--r--sw/source/filter/ww1/w1par.hxx4
-rw-r--r--sw/source/filter/ww1/w1sprm.cxx85
-rw-r--r--sw/source/filter/ww1/w1struct.hxx79
-rw-r--r--sw/source/filter/ww8/README-rtf.txt30
-rw-r--r--sw/source/filter/ww8/WW8FFData.cxx2
-rw-r--r--sw/source/filter/ww8/WW8FFData.hxx3
-rw-r--r--sw/source/filter/ww8/WW8FibData.cxx4
-rw-r--r--sw/source/filter/ww8/WW8FibData.hxx5
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.cxx8
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.hxx4
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx33
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.hxx13
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx14
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx1314
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx53
-rw-r--r--sw/source/filter/ww8/docxexport.cxx110
-rw-r--r--sw/source/filter/ww8/docxexport.hxx34
-rw-r--r--sw/source/filter/ww8/docxexportfilter.cxx80
-rw-r--r--sw/source/filter/ww8/docxexportfilter.hxx15
-rw-r--r--sw/source/filter/ww8/docxfootnotes.hxx3
-rw-r--r--sw/source/filter/ww8/dump/dump8.cxx171
-rw-r--r--sw/source/filter/ww8/dump/dump8a.cxx2746
-rw-r--r--sw/source/filter/ww8/dump/msvbasic.cxx536
-rw-r--r--sw/source/filter/ww8/dump/msvbasic.hxx102
-rw-r--r--sw/source/filter/ww8/dump/ww8darr.cxx546
-rw-r--r--sw/source/filter/ww8/dump/ww8darr.hxx43
-rw-r--r--sw/source/filter/ww8/dump/ww8dout.cxx419
-rw-r--r--sw/source/filter/ww8/dump/ww8dout.hxx86
-rw-r--r--sw/source/filter/ww8/dump/ww8scan.cxx6667
-rw-r--r--sw/source/filter/ww8/dump/ww8scan.hxx1488
-rw-r--r--sw/source/filter/ww8/dump/ww8struc.hxx815
-rw-r--r--sw/source/filter/ww8/escher.hxx13
-rw-r--r--sw/source/filter/ww8/fields.cxx15
-rw-r--r--sw/source/filter/ww8/fields.hxx5
-rw-r--r--sw/source/filter/ww8/hash_wrap.hxx24
-rw-r--r--sw/source/filter/ww8/needed_cast.hxx7
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx125
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx34
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx65
-rw-r--r--sw/source/filter/ww8/rtfexport.hxx21
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.cxx62
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.hxx12
-rw-r--r--sw/source/filter/ww8/rtfimportfilter.cxx12
-rw-r--r--sw/source/filter/ww8/rtfimportfilter.hxx10
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx6
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.hxx5
-rw-r--r--sw/source/filter/ww8/sortedarray.hxx12
-rw-r--r--sw/source/filter/ww8/staticassert.hxx5
-rw-r--r--sw/source/filter/ww8/styles.cxx8
-rw-r--r--sw/source/filter/ww8/tracer.cxx4
-rw-r--r--sw/source/filter/ww8/tracer.hxx6
-rw-r--r--sw/source/filter/ww8/types.hxx6
-rw-r--r--sw/source/filter/ww8/typessw.hxx6
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx173
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx80
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx405
-rw-r--r--sw/source/filter/ww8/writerwordglue.hxx10
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx126
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx461
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx94
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx141
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx333
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx139
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx106
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx304
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx24
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx6
-rw-r--r--sw/source/filter/ww8/ww8glsy.hxx4
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx354
-rw-r--r--sw/source/filter/ww8/ww8graf.hxx14
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx70
-rw-r--r--sw/source/filter/ww8/ww8par.cxx941
-rw-r--r--sw/source/filter/ww8/ww8par.hxx61
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx385
-rw-r--r--sw/source/filter/ww8/ww8par2.hxx11
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx185
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx35
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx317
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx448
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx296
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx25
-rw-r--r--sw/source/filter/ww8/ww8struc.hxx65
-rw-r--r--sw/source/filter/ww8/ww8toolbar.cxx1332
-rw-r--r--sw/source/filter/ww8/ww8toolbar.hxx379
-rw-r--r--sw/source/filter/xml/DocSettingNames.hxx3
-rw-r--r--sw/source/filter/xml/ForbiddenCharactersEnum.hxx3
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx47
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.hxx2
-rw-r--r--sw/source/filter/xml/swxml.cxx83
-rw-r--r--sw/source/filter/xml/wrtxml.cxx60
-rw-r--r--sw/source/filter/xml/wrtxml.hxx2
-rw-r--r--sw/source/filter/xml/xmlbrsh.cxx5
-rw-r--r--sw/source/filter/xml/xmlbrshe.hxx2
-rw-r--r--sw/source/filter/xml/xmlbrshi.hxx2
-rw-r--r--sw/source/filter/xml/xmlexp.cxx59
-rw-r--r--sw/source/filter/xml/xmlexp.hxx20
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx31
-rw-r--r--sw/source/filter/xml/xmlexpit.hxx3
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx21
-rw-r--r--sw/source/filter/xml/xmlfmte.cxx18
-rw-r--r--sw/source/filter/xml/xmlfonte.cxx7
-rw-r--r--sw/source/filter/xml/xmlimp.cxx134
-rw-r--r--sw/source/filter/xml/xmlimp.hxx6
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx21
-rw-r--r--sw/source/filter/xml/xmlimpit.hxx3
-rw-r--r--sw/source/filter/xml/xmlitem.cxx2
-rw-r--r--sw/source/filter/xml/xmlitem.hxx2
-rw-r--r--sw/source/filter/xml/xmliteme.cxx4
-rw-r--r--sw/source/filter/xml/xmlitemi.cxx12
-rw-r--r--sw/source/filter/xml/xmlitemm.cxx5
-rw-r--r--sw/source/filter/xml/xmlithlp.cxx29
-rw-r--r--sw/source/filter/xml/xmlithlp.hxx3
-rw-r--r--sw/source/filter/xml/xmlitmap.hxx3
-rw-r--r--sw/source/filter/xml/xmlitmpr.cxx2
-rw-r--r--sw/source/filter/xml/xmlmeta.cxx22
-rw-r--r--sw/source/filter/xml/xmlscript.cxx4
-rw-r--r--sw/source/filter/xml/xmltble.cxx139
-rw-r--r--sw/source/filter/xml/xmltbli.cxx238
-rw-r--r--sw/source/filter/xml/xmltbli.hxx22
-rw-r--r--sw/source/filter/xml/xmltext.cxx5
-rw-r--r--sw/source/filter/xml/xmltexte.cxx72
-rw-r--r--sw/source/filter/xml/xmltexte.hxx3
-rw-r--r--sw/source/filter/xml/xmltexti.cxx90
-rw-r--r--sw/source/filter/xml/xmltexti.hxx4
-rw-r--r--sw/source/ui/app/app.src142
-rw-r--r--sw/source/ui/app/appenv.cxx126
-rw-r--r--sw/source/ui/app/apphdl.cxx88
-rw-r--r--sw/source/ui/app/applab.cxx108
-rw-r--r--sw/source/ui/app/appopt.cxx142
-rw-r--r--sw/source/ui/app/docsh.cxx239
-rw-r--r--sw/source/ui/app/docsh2.cxx441
-rw-r--r--sw/source/ui/app/docshdrw.cxx20
-rw-r--r--sw/source/ui/app/docshini.cxx143
-rw-r--r--sw/source/ui/app/docst.cxx202
-rw-r--r--sw/source/ui/app/docstyle.cxx335
-rw-r--r--sw/source/ui/app/error.src20
-rw-r--r--sw/source/ui/app/mainwn.cxx6
-rw-r--r--sw/source/ui/app/mn.src81
-rw-r--r--sw/source/ui/app/swdll.cxx39
-rw-r--r--sw/source/ui/app/swmodul1.cxx209
-rw-r--r--sw/source/ui/app/swmodule.cxx88
-rw-r--r--sw/source/ui/app/swwait.cxx2
-rw-r--r--sw/source/ui/cctrl/actctrl.cxx19
-rw-r--r--sw/source/ui/cctrl/popbox.cxx21
-rw-r--r--sw/source/ui/cctrl/swlbox.cxx78
-rw-r--r--sw/source/ui/chrdlg/break.cxx39
-rw-r--r--sw/source/ui/chrdlg/ccoll.cxx45
-rw-r--r--sw/source/ui/chrdlg/ccoll.src1
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx84
-rw-r--r--sw/source/ui/chrdlg/chrdlg.src1
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx121
-rw-r--r--sw/source/ui/chrdlg/drpcps.src1
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx55
-rw-r--r--sw/source/ui/chrdlg/numpara.src1
-rw-r--r--sw/source/ui/chrdlg/paradlg.src3
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx46
-rw-r--r--sw/source/ui/chrdlg/swbreak.src2
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx74
-rw-r--r--sw/source/ui/chrdlg/tblnumfm.cxx15
-rw-r--r--sw/source/ui/config/barcfg.cxx19
-rw-r--r--sw/source/ui/config/caption.cxx100
-rw-r--r--sw/source/ui/config/cfgitems.cxx109
-rw-r--r--sw/source/ui/config/config.hrc4
-rw-r--r--sw/source/ui/config/dbconfig.cxx20
-rw-r--r--sw/source/ui/config/fontcfg.cxx47
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx61
-rw-r--r--sw/source/ui/config/mailconfigpage.hrc1
-rw-r--r--sw/source/ui/config/mailconfigpage.src7
-rw-r--r--sw/source/ui/config/modcfg.cxx93
-rw-r--r--sw/source/ui/config/optcomp.cxx34
-rw-r--r--sw/source/ui/config/optdlg.hrc8
-rw-r--r--sw/source/ui/config/optdlg.src2
-rw-r--r--sw/source/ui/config/optload.cxx150
-rw-r--r--sw/source/ui/config/optload.hrc1
-rw-r--r--sw/source/ui/config/optload.src11
-rw-r--r--sw/source/ui/config/optpage.cxx288
-rw-r--r--sw/source/ui/config/prtopt.cxx14
-rw-r--r--sw/source/ui/config/uinums.cxx144
-rw-r--r--sw/source/ui/config/usrpref.cxx107
-rw-r--r--sw/source/ui/config/viewopt.cxx145
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx68
-rw-r--r--sw/source/ui/dbui/addresslistdialog.hxx10
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx85
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.hxx13
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.src6
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.cxx30
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.hxx8
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.src5
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx174
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx336
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.cxx28
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.hxx8
-rw-r--r--sw/source/ui/dbui/dbtree.cxx125
-rw-r--r--sw/source/ui/dbui/dbui.cxx18
-rw-r--r--sw/source/ui/dbui/dbui.src2
-rw-r--r--sw/source/ui/dbui/maildispatcher.cxx6
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.cxx116
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.hrc2
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.src14
-rw-r--r--sw/source/ui/dbui/mailmergehelper.cxx173
-rw-r--r--sw/source/ui/dbui/mailmergewizard.cxx34
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx170
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx24
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.src9
-rw-r--r--sw/source/ui/dbui/mmconfigitem.cxx281
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx20
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.hxx6
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx47
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hxx10
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx49
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hxx6
-rw-r--r--sw/source/ui/dbui/mmmergepage.cxx17
-rw-r--r--sw/source/ui/dbui/mmmergepage.hxx6
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx146
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hxx9
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx12
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.hxx6
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.cxx24
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.hxx6
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx16
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.hxx7
-rw-r--r--sw/source/ui/dbui/swdbtoolsclient.cxx28
-rw-r--r--sw/source/ui/dialog/SwSpellDialogChildWindow.cxx58
-rw-r--r--sw/source/ui/dialog/abstract.cxx17
-rw-r--r--sw/source/ui/dialog/abstract.src5
-rw-r--r--sw/source/ui/dialog/addrdlg.cxx17
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx30
-rw-r--r--sw/source/ui/dialog/dialog.src2
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx41
-rw-r--r--sw/source/ui/dialog/macassgn.cxx24
-rw-r--r--sw/source/ui/dialog/regionsw.cxx36
-rw-r--r--sw/source/ui/dialog/regionsw.hrc6
-rw-r--r--sw/source/ui/dialog/regionsw.src10
-rw-r--r--sw/source/ui/dialog/swabstdlg.cxx5
-rw-r--r--sw/source/ui/dialog/swdialmgr.cxx5
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx225
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx17
-rw-r--r--sw/source/ui/dialog/swuiexp.cxx3
-rw-r--r--sw/source/ui/dialog/swwrtshitem.cxx3
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx353
-rw-r--r--sw/source/ui/dialog/wordcountdialog.cxx17
-rw-r--r--sw/source/ui/dialog/wordcountdialog.hrc30
-rw-r--r--sw/source/ui/dialog/wordcountdialog.src42
-rw-r--r--[-rwxr-xr-x]sw/source/ui/dochdl/gloshdl.cxx212
-rw-r--r--sw/source/ui/dochdl/selglos.cxx9
-rw-r--r--sw/source/ui/dochdl/selglos.src2
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx492
-rw-r--r--sw/source/ui/docvw/AnchorOverlayObject.cxx5
-rw-r--r--sw/source/ui/docvw/AnchorOverlayObject.hxx7
-rw-r--r--sw/source/ui/docvw/AnnotationMenuButton.cxx7
-rw-r--r--sw/source/ui/docvw/AnnotationMenuButton.hxx7
-rw-r--r--sw/source/ui/docvw/AnnotationWin.cxx20
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx219
-rw-r--r--sw/source/ui/docvw/ShadowOverlayObject.cxx5
-rw-r--r--sw/source/ui/docvw/ShadowOverlayObject.hxx7
-rw-r--r--sw/source/ui/docvw/SidebarTxtControl.cxx6
-rw-r--r--sw/source/ui/docvw/SidebarTxtControl.hxx7
-rw-r--r--sw/source/ui/docvw/SidebarTxtControlAcc.cxx15
-rw-r--r--sw/source/ui/docvw/SidebarTxtControlAcc.hxx7
-rw-r--r--sw/source/ui/docvw/SidebarWin.cxx135
-rw-r--r--sw/source/ui/docvw/SidebarWinAcc.cxx13
-rw-r--r--sw/source/ui/docvw/SidebarWinAcc.hxx7
-rw-r--r--sw/source/ui/docvw/annotation.hrc3
-rw-r--r--sw/source/ui/docvw/annotation.src3
-rw-r--r--sw/source/ui/docvw/docvw.hrc2
-rw-r--r--sw/source/ui/docvw/docvw.src3
-rw-r--r--sw/source/ui/docvw/edtdd.cxx51
-rw-r--r--sw/source/ui/docvw/edtwin.cxx762
-rw-r--r--sw/source/ui/docvw/edtwin2.cxx89
-rw-r--r--sw/source/ui/docvw/edtwin3.cxx37
-rw-r--r--sw/source/ui/docvw/extedit.cxx150
-rw-r--r--sw/source/ui/docvw/frmsidebarwincontainer.cxx6
-rw-r--r--sw/source/ui/docvw/frmsidebarwincontainer.hxx5
-rw-r--r--sw/source/ui/docvw/romenu.cxx92
-rw-r--r--sw/source/ui/docvw/romenu.hxx12
-rw-r--r--sw/source/ui/docvw/srcedtw.cxx232
-rw-r--r--sw/source/ui/envelp/envelp.src1
-rw-r--r--sw/source/ui/envelp/envfmt.cxx147
-rw-r--r--sw/source/ui/envelp/envfmt.hrc8
-rw-r--r--sw/source/ui/envelp/envfmt.hxx8
-rw-r--r--sw/source/ui/envelp/envfmt.src1
-rw-r--r--sw/source/ui/envelp/envimg.cxx50
-rw-r--r--sw/source/ui/envelp/envlop.hrc8
-rw-r--r--sw/source/ui/envelp/envlop.src1
-rw-r--r--sw/source/ui/envelp/envlop1.cxx95
-rw-r--r--sw/source/ui/envelp/envprt.cxx90
-rw-r--r--sw/source/ui/envelp/envprt.hrc27
-rw-r--r--sw/source/ui/envelp/envprt.hxx4
-rw-r--r--sw/source/ui/envelp/envprt.src79
-rw-r--r--sw/source/ui/envelp/label.hrc8
-rw-r--r--sw/source/ui/envelp/label.src1
-rw-r--r--sw/source/ui/envelp/label1.cxx162
-rw-r--r--sw/source/ui/envelp/labelcfg.cxx31
-rw-r--r--sw/source/ui/envelp/labelexp.cxx18
-rw-r--r--sw/source/ui/envelp/labfmt.cxx133
-rw-r--r--sw/source/ui/envelp/labfmt.hrc8
-rw-r--r--sw/source/ui/envelp/labfmt.hxx4
-rw-r--r--sw/source/ui/envelp/labfmt.src1
-rw-r--r--sw/source/ui/envelp/labimg.cxx26
-rw-r--r--sw/source/ui/envelp/labimp.hxx2
-rw-r--r--sw/source/ui/envelp/labprt.cxx55
-rw-r--r--sw/source/ui/envelp/labprt.hrc6
-rw-r--r--sw/source/ui/envelp/labprt.hxx6
-rw-r--r--sw/source/ui/envelp/labprt.src1
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx99
-rw-r--r--sw/source/ui/envelp/mailmrge.hrc4
-rw-r--r--sw/source/ui/envelp/mailmrge.src2
-rw-r--r--sw/source/ui/envelp/swuilabimp.hxx9
-rw-r--r--sw/source/ui/envelp/syncbtn.cxx20
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.cxx9
-rw-r--r--sw/source/ui/fldui/FldRefTreeListBox.cxx3
-rw-r--r--sw/source/ui/fldui/FldRefTreeListBox.hxx2
-rw-r--r--sw/source/ui/fldui/changedb.cxx67
-rw-r--r--sw/source/ui/fldui/changedb.hrc2
-rw-r--r--sw/source/ui/fldui/flddb.cxx73
-rw-r--r--sw/source/ui/fldui/flddb.hxx8
-rw-r--r--sw/source/ui/fldui/flddinf.cxx60
-rw-r--r--sw/source/ui/fldui/flddinf.hxx5
-rw-r--r--sw/source/ui/fldui/flddok.cxx70
-rw-r--r--sw/source/ui/fldui/flddok.hxx8
-rw-r--r--sw/source/ui/fldui/fldedt.cxx69
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx67
-rw-r--r--sw/source/ui/fldui/fldfunc.hxx7
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx113
-rw-r--r--sw/source/ui/fldui/fldpage.cxx30
-rw-r--r--sw/source/ui/fldui/fldpage.hxx6
-rw-r--r--sw/source/ui/fldui/fldref.cxx63
-rw-r--r--sw/source/ui/fldui/fldref.hxx8
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx36
-rw-r--r--sw/source/ui/fldui/fldtdlg.hrc4
-rw-r--r--sw/source/ui/fldui/fldui.src6
-rw-r--r--sw/source/ui/fldui/fldvar.cxx84
-rw-r--r--sw/source/ui/fldui/fldvar.hxx12
-rw-r--r--sw/source/ui/fldui/fldwrap.cxx54
-rw-r--r--sw/source/ui/fldui/inpdlg.cxx4
-rw-r--r--sw/source/ui/fldui/javaedit.cxx62
-rw-r--r--sw/source/ui/fldui/javaedit.src1
-rw-r--r--sw/source/ui/fldui/xfldui.cxx14
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx140
-rw-r--r--sw/source/ui/fmtui/tmpdlg.src5
-rw-r--r--sw/source/ui/frmdlg/colex.cxx27
-rw-r--r--sw/source/ui/frmdlg/colmgr.cxx55
-rw-r--r--sw/source/ui/frmdlg/column.cxx142
-rw-r--r--sw/source/ui/frmdlg/cption.cxx26
-rw-r--r--sw/source/ui/frmdlg/cption.src2
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx19
-rw-r--r--sw/source/ui/frmdlg/frmmgr.cxx28
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx329
-rw-r--r--sw/source/ui/frmdlg/frmpage.hrc1
-rw-r--r--sw/source/ui/frmdlg/frmpage.src4
-rw-r--r--sw/source/ui/frmdlg/frmui.src2
-rw-r--r--sw/source/ui/frmdlg/pattern.cxx4
-rw-r--r--sw/source/ui/frmdlg/uiborder.cxx4
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx103
-rw-r--r--sw/source/ui/frmdlg/wrap.hrc49
-rw-r--r--sw/source/ui/frmdlg/wrap.src8
-rw-r--r--sw/source/ui/globdoc/globdoc.cxx10
-rw-r--r--sw/source/ui/inc/DropDownFieldDialog.hxx6
-rw-r--r--sw/source/ui/inc/SidebarWindowsConsts.hxx7
-rw-r--r--sw/source/ui/inc/SwSpellDialogChildWindow.hxx4
-rw-r--r--sw/source/ui/inc/SwXFilterOptions.hxx6
-rw-r--r--sw/source/ui/inc/abstract.hxx12
-rw-r--r--sw/source/ui/inc/actctrl.hxx13
-rw-r--r--sw/source/ui/inc/addrdlg.hxx2
-rw-r--r--[-rwxr-xr-x]sw/source/ui/inc/annotsh.hxx3
-rw-r--r--sw/source/ui/inc/app.hrc186
-rw-r--r--sw/source/ui/inc/ascfldlg.hxx4
-rw-r--r--sw/source/ui/inc/autoedit.hxx4
-rw-r--r--sw/source/ui/inc/barcfg.hxx3
-rw-r--r--sw/source/ui/inc/basesh.hxx3
-rw-r--r--sw/source/ui/inc/beziersh.hxx3
-rw-r--r--sw/source/ui/inc/bmpwin.hxx11
-rw-r--r--sw/source/ui/inc/bookctrl.hxx2
-rw-r--r--sw/source/ui/inc/bookmark.hxx13
-rw-r--r--sw/source/ui/inc/break.hxx10
-rw-r--r--sw/source/ui/inc/caption.hxx9
-rw-r--r--sw/source/ui/inc/cfgdesc.hxx4
-rw-r--r--sw/source/ui/inc/cfgid.h3
-rw-r--r--sw/source/ui/inc/cfgitems.hxx14
-rw-r--r--sw/source/ui/inc/changedb.hxx13
-rw-r--r--sw/source/ui/inc/chartins.hxx2
-rw-r--r--sw/source/ui/inc/chldwrap.hxx2
-rw-r--r--sw/source/ui/inc/chrdlg.hxx14
-rw-r--r--sw/source/ui/inc/cnttab.hxx13
-rw-r--r--sw/source/ui/inc/colex.hxx15
-rw-r--r--sw/source/ui/inc/colmgr.hxx10
-rw-r--r--sw/source/ui/inc/column.hxx22
-rw-r--r--sw/source/ui/inc/conarc.hxx2
-rw-r--r--sw/source/ui/inc/concustomshape.hxx2
-rw-r--r--sw/source/ui/inc/condedit.hxx23
-rw-r--r--sw/source/ui/inc/conform.hxx2
-rw-r--r--sw/source/ui/inc/conpoly.hxx2
-rw-r--r--sw/source/ui/inc/conrect.hxx2
-rw-r--r--sw/source/ui/inc/content.hxx4
-rw-r--r--sw/source/ui/inc/conttree.hxx8
-rw-r--r--sw/source/ui/inc/convert.hxx5
-rw-r--r--sw/source/ui/inc/cption.hxx12
-rw-r--r--sw/source/ui/inc/dbconfig.hxx2
-rw-r--r--sw/source/ui/inc/dbinsdlg.hxx11
-rw-r--r--sw/source/ui/inc/dbtree.hxx3
-rw-r--r--sw/source/ui/inc/dbui.hxx4
-rw-r--r--sw/source/ui/inc/dialmgr.hxx3
-rw-r--r--sw/source/ui/inc/docfnote.hxx3
-rw-r--r--sw/source/ui/inc/docstdlg.hxx6
-rw-r--r--sw/source/ui/inc/drawbase.hxx2
-rw-r--r--sw/source/ui/inc/drawsh.hxx3
-rw-r--r--sw/source/ui/inc/drformsh.hxx3
-rw-r--r--sw/source/ui/inc/drpcps.hxx12
-rw-r--r--sw/source/ui/inc/drwbassh.hxx3
-rw-r--r--sw/source/ui/inc/drwtxtsh.hxx3
-rw-r--r--sw/source/ui/inc/dselect.hxx2
-rw-r--r--sw/source/ui/inc/edtwin.hxx2
-rw-r--r--sw/source/ui/inc/envimg.hxx10
-rw-r--r--sw/source/ui/inc/envlop.hxx16
-rw-r--r--sw/source/ui/inc/extedit.hxx50
-rw-r--r--sw/source/ui/inc/fldedt.hxx8
-rw-r--r--sw/source/ui/inc/fldmgr.hxx5
-rw-r--r--sw/source/ui/inc/fldtdlg.hxx7
-rw-r--r--sw/source/ui/inc/fldwrap.hxx4
-rw-r--r--sw/source/ui/inc/fontcfg.hxx5
-rw-r--r--sw/source/ui/inc/formatclipboard.hxx3
-rw-r--r--sw/source/ui/inc/formedt.hxx12
-rw-r--r--sw/source/ui/inc/frmdlg.hxx5
-rw-r--r--sw/source/ui/inc/frmmgr.hxx3
-rw-r--r--sw/source/ui/inc/frmpage.hxx10
-rw-r--r--sw/source/ui/inc/frmsh.hxx3
-rw-r--r--sw/source/ui/inc/globals.h3
-rw-r--r--sw/source/ui/inc/glosbib.hxx12
-rw-r--r--sw/source/ui/inc/glosdoc.hxx3
-rw-r--r--sw/source/ui/inc/gloshdl.hxx3
-rw-r--r--sw/source/ui/inc/gloslst.hxx2
-rw-r--r--sw/source/ui/inc/glossary.hxx18
-rw-r--r--sw/source/ui/inc/glshell.hxx2
-rw-r--r--sw/source/ui/inc/grfsh.hxx3
-rw-r--r--sw/source/ui/inc/hidfunc.h3
-rw-r--r--sw/source/ui/inc/hyp.hxx3
-rw-r--r--sw/source/ui/inc/idxmrk.hxx8
-rw-r--r--sw/source/ui/inc/imaildsplistener.hxx3
-rw-r--r--sw/source/ui/inc/initui.hxx3
-rw-r--r--sw/source/ui/inc/inpdlg.hxx7
-rw-r--r--sw/source/ui/inc/inputwin.hxx2
-rw-r--r--sw/source/ui/inc/insfnote.hxx7
-rw-r--r--sw/source/ui/inc/insrule.hxx4
-rw-r--r--sw/source/ui/inc/instable.hxx11
-rw-r--r--sw/source/ui/inc/javaedit.hxx10
-rw-r--r--sw/source/ui/inc/label.hxx2
-rw-r--r--sw/source/ui/inc/labelcfg.hxx2
-rw-r--r--sw/source/ui/inc/labimg.hxx5
-rw-r--r--[-rwxr-xr-x]sw/source/ui/inc/langhelper.hxx3
-rw-r--r--sw/source/ui/inc/linenum.hxx7
-rw-r--r--sw/source/ui/inc/listsh.hxx3
-rw-r--r--sw/source/ui/inc/macassgn.hxx4
-rw-r--r--sw/source/ui/inc/mailconfigpage.hxx15
-rw-r--r--sw/source/ui/inc/maildispatcher.hxx6
-rw-r--r--sw/source/ui/inc/mailmergechildwindow.hxx9
-rw-r--r--sw/source/ui/inc/mailmergehelper.hxx26
-rw-r--r--sw/source/ui/inc/mailmergewizard.hxx2
-rw-r--r--sw/source/ui/inc/mailmrge.hxx20
-rw-r--r--sw/source/ui/inc/mediash.hxx3
-rw-r--r--sw/source/ui/inc/mergetbl.hxx6
-rw-r--r--sw/source/ui/inc/misc.hrc1
-rw-r--r--sw/source/ui/inc/mmconfigitem.hxx8
-rw-r--r--sw/source/ui/inc/multmrk.hxx12
-rw-r--r--sw/source/ui/inc/navicfg.hxx5
-rw-r--r--sw/source/ui/inc/navicont.hxx3
-rw-r--r--sw/source/ui/inc/navipi.hxx10
-rw-r--r--sw/source/ui/inc/navmgr.hxx74
-rw-r--r--sw/source/ui/inc/navsh.hxx51
-rw-r--r--sw/source/ui/inc/num.hxx34
-rw-r--r--sw/source/ui/inc/numberingtypelistbox.hxx2
-rw-r--r--sw/source/ui/inc/numfmtlb.hxx2
-rw-r--r--sw/source/ui/inc/numpara.hxx4
-rw-r--r--sw/source/ui/inc/numprevw.hxx5
-rw-r--r--sw/source/ui/inc/olesh.hxx2
-rw-r--r--sw/source/ui/inc/olmenu.hxx2
-rw-r--r--sw/source/ui/inc/optcomp.hxx3
-rw-r--r--sw/source/ui/inc/optload.hxx20
-rw-r--r--sw/source/ui/inc/optpage.hxx38
-rw-r--r--sw/source/ui/inc/outline.hxx21
-rw-r--r--sw/source/ui/inc/pardlg.hxx3
-rw-r--r--sw/source/ui/inc/pattern.hxx2
-rw-r--r--sw/source/ui/inc/pgfnote.hxx10
-rw-r--r--sw/source/ui/inc/pggrid.hxx16
-rw-r--r--sw/source/ui/inc/popbox.hxx5
-rw-r--r--sw/source/ui/inc/prcntfld.hxx4
-rw-r--r--sw/source/ui/inc/pview.hxx7
-rw-r--r--sw/source/ui/inc/redlndlg.hxx13
-rw-r--r--sw/source/ui/inc/regionsw.hxx21
-rw-r--r--sw/source/ui/inc/rowht.hxx16
-rw-r--r--sw/source/ui/inc/scroll.hxx5
-rw-r--r--sw/source/ui/inc/selglos.hxx9
-rw-r--r--sw/source/ui/inc/sharedconnection.hxx3
-rw-r--r--sw/source/ui/inc/shdwcrsr.hxx2
-rw-r--r--sw/source/ui/inc/shells.hrc4
-rw-r--r--sw/source/ui/inc/split.hxx11
-rw-r--r--sw/source/ui/inc/splittbl.hxx2
-rw-r--r--sw/source/ui/inc/srcedtw.hxx5
-rw-r--r--sw/source/ui/inc/srcview.hxx27
-rw-r--r--sw/source/ui/inc/srtdlg.hxx10
-rw-r--r--sw/source/ui/inc/stmenu.hxx6
-rw-r--r--sw/source/ui/inc/swcont.hxx3
-rw-r--r--sw/source/ui/inc/swdtflvr.hxx3
-rw-r--r--sw/source/ui/inc/swlbox.hxx10
-rw-r--r--sw/source/ui/inc/swmodalredlineacceptdlg.hxx3
-rw-r--r--sw/source/ui/inc/swrenamexnameddlg.hxx10
-rw-r--r--sw/source/ui/inc/swtablerep.hxx2
-rw-r--r--sw/source/ui/inc/swuiccoll.hxx2
-rw-r--r--sw/source/ui/inc/swuicnttab.hxx64
-rw-r--r--sw/source/ui/inc/swuiidxmrk.hxx28
-rw-r--r--sw/source/ui/inc/swuipardlg.hxx3
-rw-r--r--sw/source/ui/inc/swvset.hxx3
-rw-r--r--sw/source/ui/inc/swwrtshitem.hxx3
-rw-r--r--sw/source/ui/inc/syncbtn.hxx12
-rw-r--r--sw/source/ui/inc/tabledlg.hxx3
-rw-r--r--sw/source/ui/inc/tablemgr.hxx3
-rw-r--r--sw/source/ui/inc/tabsh.hxx5
-rw-r--r--sw/source/ui/inc/tautofmt.hxx12
-rw-r--r--sw/source/ui/inc/tblctrl.hxx2
-rw-r--r--sw/source/ui/inc/tblnumfm.hxx2
-rw-r--r--sw/source/ui/inc/tbxanchr.hxx2
-rw-r--r--sw/source/ui/inc/textcontrolcombo.hxx5
-rw-r--r--sw/source/ui/inc/textsh.hxx7
-rw-r--r--sw/source/ui/inc/titlepage.hxx102
-rw-r--r--sw/source/ui/inc/tmpdlg.hxx4
-rw-r--r--sw/source/ui/inc/tmplctrl.hxx6
-rw-r--r--sw/source/ui/inc/toxmgr.hxx9
-rw-r--r--sw/source/ui/inc/uiborder.hxx2
-rw-r--r--sw/source/ui/inc/uiitems.hxx18
-rw-r--r--sw/source/ui/inc/uinums.hxx11
-rw-r--r--sw/source/ui/inc/uitool.hxx6
-rw-r--r--sw/source/ui/inc/uivwimp.hxx11
-rw-r--r--sw/source/ui/inc/unodispatch.hxx12
-rw-r--r--sw/source/ui/inc/unotools.hxx13
-rw-r--r--sw/source/ui/inc/unotxvw.hxx11
-rw-r--r--sw/source/ui/inc/usrpref.hxx28
-rw-r--r--sw/source/ui/inc/utlui.hrc14
-rw-r--r--sw/source/ui/inc/view.hxx21
-rw-r--r--sw/source/ui/inc/viewlayoutctrl.hxx4
-rw-r--r--sw/source/ui/inc/wformsh.hxx2
-rw-r--r--sw/source/ui/inc/wfrmsh.hxx2
-rw-r--r--sw/source/ui/inc/wgrfsh.hxx2
-rw-r--r--sw/source/ui/inc/wlistsh.hxx3
-rw-r--r--sw/source/ui/inc/wolesh.hxx2
-rw-r--r--sw/source/ui/inc/wordcountdialog.hxx9
-rw-r--r--sw/source/ui/inc/workctrl.hxx10
-rw-r--r--sw/source/ui/inc/wrap.hxx10
-rw-r--r--sw/source/ui/inc/wrtsh.hxx20
-rw-r--r--sw/source/ui/inc/wtabsh.hxx3
-rw-r--r--sw/source/ui/inc/wtextsh.hxx2
-rw-r--r--sw/source/ui/inc/wview.hxx7
-rw-r--r--sw/source/ui/inc/zoomctrl.hxx2
-rw-r--r--sw/source/ui/index/cntex.cxx75
-rw-r--r--sw/source/ui/index/cnttab.cxx1010
-rw-r--r--sw/source/ui/index/cnttab.hrc2
-rw-r--r--sw/source/ui/index/cnttab.src10
-rw-r--r--sw/source/ui/index/idxmrk.cxx36
-rw-r--r--sw/source/ui/index/idxmrk.src1
-rw-r--r--sw/source/ui/index/multmrk.cxx4
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx162
-rw-r--r--sw/source/ui/index/toxmgr.cxx30
-rw-r--r--sw/source/ui/lingu/hhcwrp.cxx74
-rw-r--r--sw/source/ui/lingu/hyp.cxx4
-rw-r--r--sw/source/ui/lingu/olmenu.cxx83
-rw-r--r--sw/source/ui/lingu/sdrhhcwrap.cxx15
-rw-r--r--sw/source/ui/lingu/sdrhhcwrap.hxx2
-rw-r--r--sw/source/ui/misc/bookmark.cxx41
-rw-r--r--sw/source/ui/misc/bookmark.src2
-rw-r--r--sw/source/ui/misc/docfnote.cxx33
-rw-r--r--sw/source/ui/misc/docfnote.src1
-rw-r--r--sw/source/ui/misc/glosbib.cxx58
-rw-r--r--sw/source/ui/misc/glosbib.src1
-rw-r--r--sw/source/ui/misc/glosdoc.cxx75
-rw-r--r--sw/source/ui/misc/glossary.cxx122
-rw-r--r--sw/source/ui/misc/glossary.src100
-rw-r--r--sw/source/ui/misc/glshell.cxx66
-rw-r--r--sw/source/ui/misc/impfnote.hxx11
-rw-r--r--sw/source/ui/misc/insfnote.cxx58
-rw-r--r--sw/source/ui/misc/insfnote.src1
-rw-r--r--sw/source/ui/misc/insrule.cxx33
-rw-r--r--sw/source/ui/misc/linenum.cxx67
-rw-r--r--sw/source/ui/misc/num.cxx148
-rw-r--r--sw/source/ui/misc/num.src1
-rw-r--r--sw/source/ui/misc/numberingtypelistbox.cxx26
-rw-r--r--sw/source/ui/misc/outline.cxx212
-rw-r--r--sw/source/ui/misc/pgfnote.cxx39
-rw-r--r--sw/source/ui/misc/pggrid.cxx101
-rw-r--r--sw/source/ui/misc/pggrid.hrc2
-rw-r--r--sw/source/ui/misc/pggrid.src12
-rw-r--r--sw/source/ui/misc/redlndlg.cxx164
-rw-r--r--sw/source/ui/misc/redlndlg.src1
-rw-r--r--sw/source/ui/misc/srtdlg.cxx17
-rw-r--r--sw/source/ui/misc/srtdlg.src4
-rw-r--r--sw/source/ui/misc/swmodalredlineacceptdlg.cxx34
-rw-r--r--sw/source/ui/misc/titlepage.cxx367
-rw-r--r--sw/source/ui/misc/titlepage.hrc50
-rw-r--r--sw/source/ui/misc/titlepage.src248
-rw-r--r--sw/source/ui/ribbar/conarc.cxx7
-rw-r--r--sw/source/ui/ribbar/concustomshape.cxx15
-rw-r--r--sw/source/ui/ribbar/conform.cxx4
-rw-r--r--sw/source/ui/ribbar/conpoly.cxx2
-rw-r--r--sw/source/ui/ribbar/conrect.cxx2
-rw-r--r--sw/source/ui/ribbar/drawbase.cxx26
-rw-r--r--sw/source/ui/ribbar/dselect.cxx2
-rwxr-xr-xsw/source/ui/ribbar/inputwin.cxx52
-rw-r--r--sw/source/ui/ribbar/inputwin.src10
-rw-r--r--sw/source/ui/ribbar/tblctrl.cxx3
-rw-r--r--sw/source/ui/ribbar/tbxanchr.cxx32
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx184
-rw-r--r--sw/source/ui/ribbar/workctrl.hrc3
-rw-r--r--sw/source/ui/ribbar/workctrl.src58
-rw-r--r--[-rwxr-xr-x]sw/source/ui/shells/annotsh.cxx49
-rw-r--r--sw/source/ui/shells/basesh.cxx160
-rw-r--r--sw/source/ui/shells/beziersh.cxx24
-rw-r--r--sw/source/ui/shells/drawdlg.cxx38
-rw-r--r--sw/source/ui/shells/drawsh.cxx44
-rw-r--r--sw/source/ui/shells/drformsh.cxx8
-rw-r--r--sw/source/ui/shells/drwbassh.cxx58
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx73
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx106
-rw-r--r--sw/source/ui/shells/frmsh.cxx210
-rw-r--r--sw/source/ui/shells/grfsh.cxx58
-rw-r--r--sw/source/ui/shells/grfshex.cxx4
-rwxr-xr-xsw/source/ui/shells/langhelper.cxx14
-rw-r--r--sw/source/ui/shells/listsh.cxx11
-rw-r--r--sw/source/ui/shells/mediash.cxx17
-rw-r--r--sw/source/ui/shells/navsh.cxx139
-rw-r--r--sw/source/ui/shells/olesh.cxx14
-rw-r--r--sw/source/ui/shells/shells.src1
-rw-r--r--sw/source/ui/shells/slotadd.cxx6
-rw-r--r--sw/source/ui/shells/tabsh.cxx138
-rw-r--r--sw/source/ui/shells/textdrw.cxx11
-rw-r--r--sw/source/ui/shells/textfld.cxx40
-rw-r--r--sw/source/ui/shells/textglos.cxx14
-rw-r--r--sw/source/ui/shells/textidx.cxx29
-rw-r--r--sw/source/ui/shells/textsh.cxx90
-rw-r--r--sw/source/ui/shells/textsh1.cxx142
-rw-r--r--sw/source/ui/shells/textsh2.cxx22
-rw-r--r--sw/source/ui/shells/txtattr.cxx105
-rw-r--r--sw/source/ui/shells/txtcrsr.cxx41
-rw-r--r--sw/source/ui/shells/txtnum.cxx28
-rw-r--r--sw/source/ui/smartmenu/stmenu.cxx9
-rw-r--r--sw/source/ui/table/chartins.cxx28
-rw-r--r--sw/source/ui/table/chartins.src2
-rw-r--r--sw/source/ui/table/colwd.cxx14
-rw-r--r--sw/source/ui/table/convert.cxx7
-rw-r--r--sw/source/ui/table/instable.cxx9
-rw-r--r--sw/source/ui/table/mergetbl.cxx6
-rw-r--r--sw/source/ui/table/rowht.cxx12
-rw-r--r--sw/source/ui/table/rowht.src2
-rw-r--r--sw/source/ui/table/splittbl.cxx7
-rw-r--r--sw/source/ui/table/swtablerep.cxx46
-rw-r--r--sw/source/ui/table/tabledlg.cxx144
-rw-r--r--sw/source/ui/table/tabledlg.src1
-rw-r--r--sw/source/ui/table/tablemgr.cxx26
-rw-r--r--sw/source/ui/table/tablepg.hxx9
-rw-r--r--sw/source/ui/table/tautofmt.cxx48
-rw-r--r--sw/source/ui/table/tautofmt.src2
-rw-r--r--sw/source/ui/uiview/formatclipboard.cxx44
-rw-r--r--sw/source/ui/uiview/pview.cxx424
-rw-r--r--sw/source/ui/uiview/pview.src1
-rw-r--r--sw/source/ui/uiview/scroll.cxx20
-rw-r--r--sw/source/ui/uiview/srcview.cxx105
-rw-r--r--sw/source/ui/uiview/swcli.cxx9
-rw-r--r--sw/source/ui/uiview/uivwimp.cxx41
-rw-r--r--sw/source/ui/uiview/view.cxx227
-rw-r--r--sw/source/ui/uiview/view0.cxx29
-rw-r--r--sw/source/ui/uiview/view1.cxx34
-rw-r--r--sw/source/ui/uiview/view2.cxx194
-rw-r--r--sw/source/ui/uiview/viewcoll.cxx12
-rw-r--r--sw/source/ui/uiview/viewdlg.cxx7
-rw-r--r--sw/source/ui/uiview/viewdlg2.cxx24
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx93
-rw-r--r--sw/source/ui/uiview/viewfunc.hxx3
-rw-r--r--[-rwxr-xr-x]sw/source/ui/uiview/viewling.cxx208
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx160
-rw-r--r--sw/source/ui/uiview/viewport.cxx82
-rw-r--r--sw/source/ui/uiview/viewprt.cxx56
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx71
-rw-r--r--sw/source/ui/uiview/viewstat.cxx21
-rw-r--r--sw/source/ui/uiview/viewtab.cxx139
-rw-r--r--sw/source/ui/uno/RefreshListenerContainer.cxx3
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.cxx50
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.hxx7
-rw-r--r--sw/source/ui/uno/SwXFilterOptions.cxx39
-rw-r--r--sw/source/ui/uno/detreg.cxx2
-rw-r--r--sw/source/ui/uno/dlelstnr.cxx40
-rw-r--r--sw/source/ui/uno/swdet2.cxx31
-rw-r--r--sw/source/ui/uno/swdetect.cxx40
-rw-r--r--sw/source/ui/uno/swdetect.hxx5
-rw-r--r--sw/source/ui/uno/unoatxt.cxx268
-rw-r--r--sw/source/ui/uno/unodefaults.cxx11
-rw-r--r--sw/source/ui/uno/unodefaults.hxx2
-rw-r--r--sw/source/ui/uno/unodispatch.cxx52
-rw-r--r--sw/source/ui/uno/unodoc.cxx10
-rw-r--r--sw/source/ui/uno/unofreg.cxx6
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx76
-rw-r--r--sw/source/ui/uno/unomod.cxx71
-rw-r--r--sw/source/ui/uno/unomodule.cxx10
-rw-r--r--sw/source/ui/uno/unomodule.hxx3
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx579
-rw-r--r--sw/source/ui/uno/unotxvw.cxx359
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx30
-rw-r--r--sw/source/ui/utlui/attrdesc.src14
-rw-r--r--sw/source/ui/utlui/bookctrl.cxx22
-rw-r--r--sw/source/ui/utlui/condedit.cxx12
-rw-r--r--sw/source/ui/utlui/content.cxx512
-rw-r--r--sw/source/ui/utlui/glbltree.cxx153
-rw-r--r--sw/source/ui/utlui/gloslst.cxx29
-rw-r--r--sw/source/ui/utlui/initui.cxx35
-rw-r--r--sw/source/ui/utlui/initui.src3
-rw-r--r--sw/source/ui/utlui/navicfg.cxx20
-rw-r--r--sw/source/ui/utlui/navipi.cxx155
-rw-r--r--sw/source/ui/utlui/navipi.hrc1
-rw-r--r--sw/source/ui/utlui/navipi.src31
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx58
-rw-r--r--sw/source/ui/utlui/prcntfld.cxx76
-rw-r--r--sw/source/ui/utlui/shdwcrsr.cxx2
-rw-r--r--sw/source/ui/utlui/swrenamexnameddlg.cxx15
-rw-r--r--sw/source/ui/utlui/textcontrolcombo.cxx4
-rw-r--r--sw/source/ui/utlui/tmplctrl.cxx22
-rw-r--r--sw/source/ui/utlui/uiitems.cxx59
-rw-r--r--sw/source/ui/utlui/uitool.cxx60
-rw-r--r--sw/source/ui/utlui/unotools.cxx97
-rw-r--r--sw/source/ui/utlui/utlui.src99
-rw-r--r--sw/source/ui/utlui/viewlayoutctrl.cxx48
-rw-r--r--sw/source/ui/utlui/zoomctrl.cxx16
-rw-r--r--sw/source/ui/vba/service.cxx7
-rw-r--r--sw/source/ui/vba/vbaaddin.cxx2
-rw-r--r--sw/source/ui/vba/vbaaddin.hxx3
-rw-r--r--sw/source/ui/vba/vbaaddins.cxx5
-rw-r--r--sw/source/ui/vba/vbaaddins.hxx3
-rw-r--r--sw/source/ui/vba/vbaapplication.cxx14
-rw-r--r--sw/source/ui/vba/vbaapplication.hxx4
-rw-r--r--sw/source/ui/vba/vbaautotextentry.cxx31
-rw-r--r--sw/source/ui/vba/vbaautotextentry.hxx3
-rw-r--r--sw/source/ui/vba/vbabookmark.cxx9
-rw-r--r--sw/source/ui/vba/vbabookmark.hxx3
-rw-r--r--sw/source/ui/vba/vbabookmarks.cxx17
-rw-r--r--sw/source/ui/vba/vbabookmarks.hxx5
-rw-r--r--sw/source/ui/vba/vbaborders.cxx14
-rw-r--r--sw/source/ui/vba/vbaborders.hxx2
-rw-r--r--sw/source/ui/vba/vbacell.cxx119
-rw-r--r--sw/source/ui/vba/vbacell.hxx67
-rw-r--r--sw/source/ui/vba/vbacells.cxx223
-rw-r--r--sw/source/ui/vba/vbacells.hxx75
-rw-r--r--sw/source/ui/vba/vbacheckbox.cxx97
-rw-r--r--sw/source/ui/vba/vbacheckbox.hxx58
-rw-r--r--sw/source/ui/vba/vbacolumn.cxx165
-rw-r--r--sw/source/ui/vba/vbacolumn.hxx68
-rw-r--r--sw/source/ui/vba/vbacolumns.cxx160
-rw-r--r--sw/source/ui/vba/vbacolumns.hxx75
-rw-r--r--sw/source/ui/vba/vbadialog.cxx3
-rw-r--r--sw/source/ui/vba/vbadialog.hxx3
-rw-r--r--sw/source/ui/vba/vbadialogs.cxx2
-rw-r--r--sw/source/ui/vba/vbadialogs.hxx3
-rw-r--r--sw/source/ui/vba/vbadocument.cxx165
-rw-r--r--sw/source/ui/vba/vbadocument.hxx22
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.cxx24
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.hxx5
-rw-r--r--sw/source/ui/vba/vbadocuments.cxx5
-rw-r--r--sw/source/ui/vba/vbadocuments.hxx3
-rw-r--r--[-rwxr-xr-x]sw/source/ui/vba/vbaeventshelper.cxx3
-rw-r--r--[-rwxr-xr-x]sw/source/ui/vba/vbaeventshelper.hxx2
-rw-r--r--sw/source/ui/vba/vbafield.cxx121
-rw-r--r--sw/source/ui/vba/vbafield.hxx5
-rw-r--r--sw/source/ui/vba/vbafind.cxx9
-rw-r--r--sw/source/ui/vba/vbafind.hxx6
-rw-r--r--sw/source/ui/vba/vbafont.cxx9
-rw-r--r--sw/source/ui/vba/vbafont.hxx3
-rw-r--r--sw/source/ui/vba/vbaformfield.cxx138
-rw-r--r--sw/source/ui/vba/vbaformfield.hxx61
-rw-r--r--sw/source/ui/vba/vbaformfields.cxx205
-rw-r--r--sw/source/ui/vba/vbaformfields.hxx60
-rw-r--r--sw/source/ui/vba/vbaframe.cxx74
-rw-r--r--sw/source/ui/vba/vbaframe.hxx57
-rw-r--r--sw/source/ui/vba/vbaframes.cxx109
-rw-r--r--sw/source/ui/vba/vbaframes.hxx61
-rw-r--r--sw/source/ui/vba/vbaglobals.cxx14
-rw-r--r--sw/source/ui/vba/vbaglobals.hxx4
-rw-r--r--sw/source/ui/vba/vbaheaderfooter.cxx3
-rw-r--r--sw/source/ui/vba/vbaheaderfooter.hxx3
-rw-r--r--sw/source/ui/vba/vbaheaderfooterhelper.cxx131
-rw-r--r--sw/source/ui/vba/vbaheaderfooterhelper.hxx23
-rw-r--r--sw/source/ui/vba/vbaheadersfooters.cxx150
-rw-r--r--sw/source/ui/vba/vbaheadersfooters.hxx62
-rw-r--r--sw/source/ui/vba/vbainformationhelper.cxx3
-rw-r--r--sw/source/ui/vba/vbainformationhelper.hxx3
-rw-r--r--sw/source/ui/vba/vbalistformat.cxx120
-rw-r--r--sw/source/ui/vba/vbalistformat.hxx60
-rw-r--r--sw/source/ui/vba/vbalistgalleries.cxx115
-rw-r--r--sw/source/ui/vba/vbalistgalleries.hxx61
-rw-r--r--sw/source/ui/vba/vbalistgallery.cxx72
-rw-r--r--sw/source/ui/vba/vbalistgallery.hxx58
-rw-r--r--sw/source/ui/vba/vbalisthelper.cxx705
-rw-r--r--sw/source/ui/vba/vbalisthelper.hxx77
-rw-r--r--sw/source/ui/vba/vbalistlevel.cxx400
-rw-r--r--sw/source/ui/vba/vbalistlevel.hxx81
-rw-r--r--sw/source/ui/vba/vbalistlevels.cxx118
-rw-r--r--sw/source/ui/vba/vbalistlevels.hxx62
-rw-r--r--sw/source/ui/vba/vbalisttemplate.cxx79
-rw-r--r--sw/source/ui/vba/vbalisttemplate.hxx60
-rw-r--r--sw/source/ui/vba/vbalisttemplates.cxx112
-rw-r--r--sw/source/ui/vba/vbalisttemplates.hxx62
-rw-r--r--sw/source/ui/vba/vbaoptions.cxx7
-rw-r--r--sw/source/ui/vba/vbaoptions.hxx3
-rw-r--r--sw/source/ui/vba/vbapagesetup.cxx10
-rw-r--r--sw/source/ui/vba/vbapagesetup.hxx3
-rw-r--r--sw/source/ui/vba/vbapalette.cxx5
-rw-r--r--sw/source/ui/vba/vbapalette.hxx3
-rw-r--r--sw/source/ui/vba/vbapane.cxx2
-rw-r--r--sw/source/ui/vba/vbapane.hxx3
-rw-r--r--sw/source/ui/vba/vbapanes.cxx3
-rw-r--r--sw/source/ui/vba/vbapanes.hxx3
-rw-r--r--sw/source/ui/vba/vbaparagraph.cxx19
-rw-r--r--sw/source/ui/vba/vbaparagraph.hxx5
-rw-r--r--sw/source/ui/vba/vbaparagraphformat.cxx12
-rw-r--r--sw/source/ui/vba/vbaparagraphformat.hxx3
-rw-r--r--sw/source/ui/vba/vbarange.cxx122
-rw-r--r--sw/source/ui/vba/vbarange.hxx23
-rw-r--r--sw/source/ui/vba/vbarangehelper.cxx33
-rw-r--r--sw/source/ui/vba/vbarangehelper.hxx6
-rw-r--r--sw/source/ui/vba/vbareplacement.cxx8
-rw-r--r--sw/source/ui/vba/vbareplacement.hxx6
-rw-r--r--sw/source/ui/vba/vbarevision.cxx104
-rw-r--r--sw/source/ui/vba/vbarevision.hxx60
-rw-r--r--sw/source/ui/vba/vbarevisions.cxx188
-rw-r--r--sw/source/ui/vba/vbarevisions.hxx66
-rw-r--r--sw/source/ui/vba/vbarow.cxx135
-rw-r--r--sw/source/ui/vba/vbarow.hxx69
-rw-r--r--sw/source/ui/vba/vbarows.cxx368
-rw-r--r--sw/source/ui/vba/vbarows.hxx87
-rw-r--r--sw/source/ui/vba/vbasection.cxx17
-rw-r--r--sw/source/ui/vba/vbasection.hxx7
-rw-r--r--sw/source/ui/vba/vbasections.cxx16
-rw-r--r--sw/source/ui/vba/vbasections.hxx5
-rw-r--r--sw/source/ui/vba/vbaselection.cxx804
-rw-r--r--sw/source/ui/vba/vbaselection.hxx38
-rw-r--r--sw/source/ui/vba/vbastyle.cxx146
-rw-r--r--sw/source/ui/vba/vbastyle.hxx23
-rw-r--r--sw/source/ui/vba/vbastyles.cxx163
-rw-r--r--sw/source/ui/vba/vbastyles.hxx3
-rw-r--r--sw/source/ui/vba/vbasystem.cxx142
-rw-r--r--sw/source/ui/vba/vbasystem.hxx3
-rw-r--r--sw/source/ui/vba/vbatable.cxx26
-rw-r--r--sw/source/ui/vba/vbatable.hxx8
-rw-r--r--sw/source/ui/vba/vbatablehelper.cxx295
-rw-r--r--sw/source/ui/vba/vbatablehelper.hxx70
-rw-r--r--sw/source/ui/vba/vbatableofcontents.cxx124
-rw-r--r--sw/source/ui/vba/vbatableofcontents.hxx70
-rw-r--r--sw/source/ui/vba/vbatables.cxx103
-rw-r--r--sw/source/ui/vba/vbatables.hxx3
-rw-r--r--sw/source/ui/vba/vbatablesofcontents.cxx195
-rw-r--r--sw/source/ui/vba/vbatablesofcontents.hxx64
-rw-r--r--sw/source/ui/vba/vbatabstop.cxx62
-rw-r--r--sw/source/ui/vba/vbatabstop.hxx54
-rw-r--r--sw/source/ui/vba/vbatabstops.cxx280
-rw-r--r--sw/source/ui/vba/vbatabstops.hxx65
-rw-r--r--sw/source/ui/vba/vbatemplate.cxx63
-rw-r--r--sw/source/ui/vba/vbatemplate.hxx6
-rw-r--r--sw/source/ui/vba/vbavariable.cxx2
-rw-r--r--sw/source/ui/vba/vbavariable.hxx3
-rw-r--r--sw/source/ui/vba/vbavariables.cxx3
-rw-r--r--sw/source/ui/vba/vbavariables.hxx3
-rw-r--r--sw/source/ui/vba/vbaview.cxx49
-rw-r--r--sw/source/ui/vba/vbaview.hxx3
-rw-r--r--sw/source/ui/vba/vbawindow.cxx46
-rw-r--r--sw/source/ui/vba/vbawindow.hxx5
-rw-r--r--sw/source/ui/vba/vbawrapformat.cxx2
-rw-r--r--sw/source/ui/vba/vbawrapformat.hxx3
-rw-r--r--sw/source/ui/vba/wordvbahelper.cxx101
-rw-r--r--sw/source/ui/vba/wordvbahelper.hxx18
-rw-r--r--sw/source/ui/web/wdocsh.cxx14
-rw-r--r--sw/source/ui/web/wformsh.cxx6
-rw-r--r--sw/source/ui/web/wfrmsh.cxx19
-rw-r--r--sw/source/ui/web/wgrfsh.cxx2
-rw-r--r--sw/source/ui/web/wlistsh.cxx4
-rw-r--r--sw/source/ui/web/wolesh.cxx4
-rw-r--r--sw/source/ui/web/wtabsh.cxx4
-rw-r--r--sw/source/ui/web/wtextsh.cxx18
-rw-r--r--sw/source/ui/web/wview.cxx21
-rw-r--r--sw/source/ui/wrtsh/delete.cxx14
-rw-r--r--sw/source/ui/wrtsh/move.cxx97
-rw-r--r--sw/source/ui/wrtsh/navmgr.cxx224
-rw-r--r--sw/source/ui/wrtsh/select.cxx5
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx147
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx26
-rw-r--r--sw/source/ui/wrtsh/wrtsh3.cxx12
-rw-r--r--sw/source/ui/wrtsh/wrtsh4.cxx29
-rw-r--r--sw/source/ui/wrtsh/wrtundo.cxx3
-rw-r--r--sw/uiconfig/sglobal/menubar/menubar.xml10
-rw-r--r--sw/uiconfig/sglobal/statusbar/statusbar.xml2
-rw-r--r--sw/uiconfig/sweb/menubar/menubar.xml11
-rw-r--r--sw/uiconfig/sweb/statusbar/statusbar.xml2
-rw-r--r--sw/uiconfig/swform/menubar/menubar.xml10
-rw-r--r--sw/uiconfig/swform/statusbar/statusbar.xml2
-rw-r--r--sw/uiconfig/swreport/menubar/menubar.xml10
-rw-r--r--sw/uiconfig/swreport/statusbar/statusbar.xml2
-rw-r--r--sw/uiconfig/swriter/menubar/menubar.xml11
-rw-r--r--sw/uiconfig/swriter/statusbar/statusbar.xml2
-rw-r--r--sw/uiconfig/swriter/toolbar/navigationobjectbar.xml6
-rw-r--r--sw/uiconfig/swxform/menubar/menubar.xml10
-rw-r--r--sw/uiconfig/swxform/statusbar/statusbar.xml2
-rw-r--r--sw/xml/writer.xml2
1921 files changed, 53224 insertions, 69730 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..e9cb034c107e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+# backup and temporary files
+*~
+.*.sw[op]
+
+# the build directories
+/*/unxlng??
+/*/unxlng??.pro
+/*/wntmsc???
+/*/wntmsc???.pro
+/*/unxmac??.pro
+/*/unxmac??
diff --git a/starmath/inc/action.hxx b/starmath/inc/action.hxx
index c59765ee45ac..2463edc983f0 100644
--- a/starmath/inc/action.hxx
+++ b/starmath/inc/action.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/applicat.hxx b/starmath/inc/applicat.hxx
index 9aad8d41b59e..d708d3d76c2d 100644
--- a/starmath/inc/applicat.hxx
+++ b/starmath/inc/applicat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,7 +26,6 @@
*
************************************************************************/
-
#ifndef APPLICAT_HXX
#define APPLICAT_HXX
@@ -33,23 +33,10 @@ class SvxErrorHandler;
#include <sfx2/app.hxx>
-/**************************************************************************/
-/*
-**
-** MACRO DEFINITION
-**
-**/
-
-#define SMDLL 1
-#define APPLICATIONNAME "smath3"
+#define SMDLL 1
+#define APPLICATIONNAME "smath3"
-/**************************************************************************/
-/*
-**
-** CLASS DEFINITION
-**
-**/
#ifdef PM2
#define RELEASE "PM304"
@@ -76,5 +63,7 @@ public:
#endif
+
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/caret.hxx b/starmath/inc/caret.hxx
new file mode 100644
index 000000000000..be40598982c7
--- /dev/null
+++ b/starmath/inc/caret.hxx
@@ -0,0 +1,480 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Jonas Finnemann Jensen <jopsen@gmail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jonas Finnemann Jensen <jopsen@gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef CARET_H
+#define CARET_H
+
+#include "node.hxx"
+
+/** Representation of caret position with an equantion */
+struct SmCaretPos{
+ SmCaretPos(SmNode* selectedNode = NULL, int iIndex = 0) {
+ pSelectedNode = selectedNode;
+ Index = iIndex;
+ }
+ /** Selected node */
+ SmNode* pSelectedNode;
+ /** Index within the selected node
+ *
+ * 0: Position infront of a node
+ * 1: Position after a node or after first char in SmTextNode
+ * n: Position after n char in SmTextNode
+ *
+ * Notice how there's special cases for SmTextNode.
+ */
+ //TODO: Special cases for SmBlankNode is needed
+ //TODO: Consider forgetting about the todo above... As it's really unpleasent.
+ int Index;
+ /** True, if this is a valid caret position */
+ bool IsValid() { return pSelectedNode != NULL; }
+ bool operator!=(SmCaretPos pos) const {
+ return pos.pSelectedNode != pSelectedNode || Index != pos.Index;
+ }
+ bool operator==(SmCaretPos pos) const {
+ return pos.pSelectedNode == pSelectedNode && Index == pos.Index;
+ }
+ /** Get the caret position after pNode, regardless of pNode
+ *
+ * Gets the caret position following pNode, this is SmCaretPos(pNode, 1).
+ * Unless pNode is an instance of SmTextNode, then the index is the text length.
+ */
+ static SmCaretPos GetPosAfter(SmNode* pNode) {
+ if(pNode && pNode->GetType() == NTEXT)
+ return SmCaretPos(pNode, ((SmTextNode*)pNode)->GetText().Len());
+ return SmCaretPos(pNode, 1);
+ }
+};
+
+/** A line that represents a caret */
+class SmCaretLine{
+public:
+ SmCaretLine(long left = 0, long top = 0, long height = 0) {
+ _top = top;
+ _left = left;
+ _height = height;
+ }
+ long GetTop() const {return _top;}
+ long GetLeft() const {return _left;}
+ long GetHeight() const {return _height;}
+ long SquaredDistanceX(SmCaretLine line) const{
+ return (GetLeft() - line.GetLeft()) * (GetLeft() - line.GetLeft());
+ }
+ long SquaredDistanceX(Point pos) const{
+ return (GetLeft() - pos.X()) * (GetLeft() - pos.X());
+ }
+ long SquaredDistanceY(SmCaretLine line) const{
+ long d = GetTop() - line.GetTop();
+ if(d < 0)
+ d = (d * -1) - GetHeight();
+ else
+ d = d - line.GetHeight();
+ if(d < 0)
+ return 0;
+ return d * d;
+ }
+ long SquaredDistanceY(Point pos) const{
+ long d = GetTop() - pos.Y();
+ if(d < 0)
+ d = (d * -1) - GetHeight();
+ if(d < 0)
+ return 0;
+ return d * d;
+ }
+private:
+ long _top;
+ long _left;
+ long _height;
+};
+
+/////////////////////////////// SmCaretPosGraph////////////////////////////////
+
+/** An entry in SmCaretPosGraph */
+struct SmCaretPosGraphEntry{
+ SmCaretPosGraphEntry(SmCaretPos pos = SmCaretPos(),
+ SmCaretPosGraphEntry* left = NULL,
+ SmCaretPosGraphEntry* right = NULL){
+ CaretPos = pos;
+ Left = left;
+ Right = right;
+ }
+ /** Caret position */
+ SmCaretPos CaretPos;
+ /** Entry to the left visually */
+ SmCaretPosGraphEntry* Left;
+ /** Entry to the right visually */
+ SmCaretPosGraphEntry* Right;
+ void SetRight(SmCaretPosGraphEntry* right){
+ Right = right;
+ }
+ void SetLeft(SmCaretPosGraphEntry* left){
+ Left = left;
+ }
+};
+
+/** Define SmCaretPosGraph to be less than one page 4096 */
+#define SmCaretPosGraphSize 255
+
+class SmCaretPosGraph;
+
+/** Iterator for SmCaretPosGraph */
+class SmCaretPosGraphIterator{
+public:
+ SmCaretPosGraphIterator(SmCaretPosGraph* graph){
+ pGraph = graph;
+ nOffset = 0;
+ pEntry = NULL;
+ }
+ /** Get the next entry, NULL if none */
+ SmCaretPosGraphEntry* Next();
+ /** Get the current entry, NULL if none */
+ SmCaretPosGraphEntry* Current(){
+ return pEntry;
+ }
+ /** Get the current entry, NULL if none */
+ SmCaretPosGraphEntry* operator->(){
+ return pEntry;
+ }
+private:
+ /** Next entry to return */
+ int nOffset;
+ /** Current graph */
+ SmCaretPosGraph* pGraph;
+ /** Current entry */
+ SmCaretPosGraphEntry* pEntry;
+};
+
+
+/** A graph over all caret positions
+ * @remarks Graphs can only grow, entries cannot be removed!
+ */
+class SmCaretPosGraph{
+public:
+ SmCaretPosGraph(){
+ pNext = NULL;
+ nOffset = 0;
+ }
+ ~SmCaretPosGraph();
+ /** Add a caret position
+ * @remarks If Left and/or Right are set NULL, they will point back to the entry.
+ */
+ SmCaretPosGraphEntry* Add(SmCaretPosGraphEntry entry);
+ /** Add a caret position
+ * @remarks If left and/or right are set NULL, they will point back to the entry.
+ */
+ SmCaretPosGraphEntry* Add(SmCaretPos pos,
+ SmCaretPosGraphEntry* left = NULL,
+ SmCaretPosGraphEntry* right = NULL){
+ j_assert(pos.Index >= 0, "Index shouldn't be -1!");
+ return Add(SmCaretPosGraphEntry(pos, left, right));
+ }
+ /** Get an iterator for this graph */
+ SmCaretPosGraphIterator GetIterator(){
+ return SmCaretPosGraphIterator(this);
+ }
+ friend class SmCaretPosGraphIterator;
+private:
+ /** Next graph, to be used when this graph is full */
+ SmCaretPosGraph* pNext;
+ /** Next free entry in graph */
+ int nOffset;
+ /** Entries in this graph segment */
+ SmCaretPosGraphEntry Graph[SmCaretPosGraphSize];
+};
+
+/** \page visual_formula_editing Visual Formula Editing
+ * A visual formula editor allows users to easily edit formulas without having to learn and
+ * use complicated commands. A visual formula editor is a WYSIWYG editor. For OpenOffice Math
+ * this essentially means that you can click on the formula image, to get a caret, which you
+ * can move with arrow keys, and use to modify the formula by entering text, clicking buttons
+ * or using shortcuts.
+ *
+ * \subsection formula_trees Formula Trees
+ * A formula in OpenOffice Math is a tree of nodes, take for instance the formula
+ * "A + {B cdot C} over D", it looks like this
+ * \f$ \mbox{A} + \frac{\mbox{B} \cdot \mbox{C}}{\mbox{D}} \f$. The tree for this formula
+ * looks like this:
+ *
+ * \dot
+ * digraph {
+ * labelloc = "t";
+ * label= "Equation: \"A + {B cdot C} over D\"";
+ * size = "9,9";
+ * n0 [label="SmTableNode (1)"];
+ * n0 -> n1 [label="0"];
+ * n1 [label="SmLineNode (2)"];
+ * n1 -> n2 [label="0"];
+ * n2 [label="SmExpressionNode (3)"];
+ * n2 -> n3 [label="0"];
+ * n3 [label="SmBinHorNode (4)"];
+ * n3 -> n4 [label="0"];
+ * n4 [label="SmTextNode: A (5)"];
+ * n3 -> n5 [label="1"];
+ * n5 [label="SmMathSymbolNode:  (6)"];
+ * n3 -> n6 [label="2"];
+ * n6 [label="SmBinVerNode (7)"];
+ * n6 -> n7 [label="0"];
+ * n7 [label="SmExpressionNode (8)"];
+ * n7 -> n8 [label="0"];
+ * n8 [label="SmBinHorNode (9)"];
+ * n8 -> n9 [label="0"];
+ * n9 [label="SmTextNode: B (10)"];
+ * n8 -> n10 [label="1"];
+ * n10 [label="SmMathSymbolNode: â‹… (11)"];
+ * n8 -> n11 [label="2"];
+ * n11 [label="SmTextNode: C (12)"];
+ * n6 -> n12 [label="1"];
+ * n12 [label="SmRectangleNode (13)"];
+ * n6 -> n13 [label="2"];
+ * n13 [label="SmTextNode: D (14)"];
+ * }
+ * \enddot
+ *
+ * The vertices are nodes, their label says what kind of node and the number in parentheses is
+ * the identifier of the node (In practices a pointer is used instead of the id). The direction
+ * of the edges tells which node is parent and which is child. The label of the edges are the
+ * child node index number, given to SmNode::GetSubNode() of the parent to get the child node.
+ *
+ *
+ * \subsection visual_lines Visual Lines
+ *
+ * Inorder to do caret movement in visual lines, we need a definition of caret position and
+ * visual line. In a tree such as the above there are three visual lines. There's the outer most
+ * line, with entries such as
+ * \f$\mbox{A}\f$, \f$ + \f$ and \f$ \frac{\mbox{B} \cdot \mbox{C}}{\mbox{D}} \f$. Then there's
+ * the numerator line of the fraction it has entries \f$ \mbox{B} \f$, \f$ \cdot \f$ and \f$ \mbox{C} \f$.
+ * And last by not least there's the denominator line of the fraction it's only entry is \f$ \mbox{D} \f$.
+ *
+ * For visual editing it should be possible to place a caret on both sides of any line entry,
+ * consider a line entry a character or construction that in a line is treated as a character.
+ * Imagine the caret is placed to the right of the plus sign (id: 6), now if user presses
+ * backspace this should delete the plus sign (id: 6), and if the user presses delete this
+ * should delete the entire fraction (id: 7). This is because the caret is in the outer most
+ * line where the fraction is considered a line entry.
+ *
+ * However, inorder to prevent users from accidentally deleting large subtrees, just because
+ * they logically placed there caret a in the wrong line, require that complex constructions
+ * such as a fraction is selected before it is deleted. Thus in this case it wouldn't be
+ * deleted, but only selected and then deleted if the user hit delete again. Anyway, this is
+ * slightly off topic for now.
+ *
+ * Important about visual lines is that they don't always have an SmExpressionNode as root
+ * and the entries in a visual line is all the nodes of a subtree ordered left to right that
+ * isn't either an SmExpressionNode, SmBinHorNode or SmUnHorNode.
+ *
+ *
+ * \subsection caret_positions Caret Positions
+ *
+ * A caret position in OpenOffice Math is representated by an instance of SmCaretPos.
+ * That is a caret position is a node and an index related to this node. For most nodes the
+ * index 0, means caret is infront of this node, the index 1 means caret is after this node.
+ * For SmTextNode the index is the caret position after the specified number of characters,
+ * imagine an SmTextNode with the number 1337. The index 3 in such SmTextNode would mean a
+ * caret placed right before 7, e.g. "133|7".
+ *
+ * For SmExpressionNode, SmBinHorNode and SmUnHorNode the only legal index is 0, which means
+ * infront of the node. Actually the index 0 may only because for the first caret position
+ * in a visual line. From the example above, consider the following subtree that constitutes
+ * a visual line:
+ *
+ * \dot
+ * digraph {
+ * labelloc = "t";
+ * label= "Subtree that constitutes a visual line";
+ * size = "7,5";
+ * n7 [label="SmExpressionNode (8)"];
+ * n7 -> n8 [label="0"];
+ * n8 [label="SmBinHorNode (9)"];
+ * n8 -> n9 [label="0"];
+ * n9 [label="SmTextNode: B (10)"];
+ * n8 -> n10 [label="1"];
+ * n10 [label="SmMathSymbolNode: â‹… (11)"];
+ * n8 -> n11 [label="2"];
+ * n11 [label="SmTextNode: C (12)"];
+ * }
+ * \enddot
+ * Here the caret positions are:
+ *
+ * <TABLE>
+ * <TR><TD><B>Caret position:</B></TD><TD><B>Example:</B></TD>
+ * </TR><TR>
+ * <TD>{id: 8, index: 0}</TD>
+ * <TD>\f$ \mid \mbox{C} \cdot \mbox{C} \f$</TD>
+ * </TR><TR>
+ * <TD>{id: 10, index: 1}</TD>
+ * <TD>\f$ \mbox{C} \mid \cdot \mbox{C} \f$</TD>
+ * </TR><TR>
+ * <TD>{id: 11, index: 1}</TD>
+ * <TD>\f$ \mbox{C} \cdot \mid \mbox{C} \f$</TD>
+ * </TR><TR>
+ * <TD>{id: 12, index: 1}</TD>
+ * <TD>\f$ \mbox{C} \cdot \mbox{C} \mid \f$</TD>
+ * </TR><TR>
+ * </TABLE>
+ *
+ * Where \f$ \mid \f$ is used to denote caret position.
+ *
+ * With these exceptions included in the definition the id and index: {id: 11, index: 0} does
+ * \b not constitute a caret position in the given context. Note the method
+ * SmCaretPos::IsValid() does not check if this invariant holds true, but code in SmCaret,
+ * SmSetSelectionVisitor and other places depends on this invariant to hold.
+ *
+ *
+ * \subsection caret_movement Caret Movement
+ *
+ * As the placement of caret positions depends very much on the context within which a node
+ * appears it is not trivial to find all caret positions and determine which follows which.
+ * In OpenOffice Math this is done by the SmCaretPosGraphBuildingVisitor. This visitor builds
+ * graph (an instnce of SmCaretPosGraph) over the caret positions. For details on how this
+ * graph is build, and how new methods should be implemented see SmCaretPosGraphBuildingVisitor.
+ *
+ * The result of the SmCaretPosGraphBuildingVisitor is a graph over the caret positions in a
+ * formula, representated by an instance of SmCaretPosGraph. Each entry (instances of SmCaretPosGraphEntry)
+ * has a pointer to the entry to the left and right of itself. This way we can easily find
+ * the caret position to a right or left of a given caret position. Note each caret position
+ * only appears once in this graph.
+ *
+ * When searching for a caret position after a left click on the formula this map is also used.
+ * We simply iterate over all entries, uses the SmCaretPos2LineVisitor to find a line for each
+ * caret position. Then the distance from the click to the line is computed and we choose the
+ * caret position closest to the click.
+ *
+ * For up and down movement, we also iterator over all caret positions and use SmCaretPos2LineVisitor
+ * to find a line for each caret position. Then we compute the distance from the current
+ * caret position to every other caret position and chooses the one closest that is either
+ * above or below the current caret position, depending on wether we're doing up or down movement.
+ *
+ * This result of this approach to caret movement is that we have logically predictable
+ * movement for left and right, whilst leftclick, up and down movement depends on the sizes
+ * and placement of all node and may be less logically predictable. This solution also means
+ * that we only have one complex visitor generating the graph, imagine the nightmare if we
+ * had a visitor for movement in each direction.
+ *
+ * Making up and down movement independent of node sizes and placement wouldn't necessarily
+ * be a good thing either. Consider the formula \f$ \frac{1+2+3+4+5}{6} \f$, if the caret is
+ * placed as displayed here: \f$ \frac{1+2+3+4+5}{6 \mid} \f$, up movement should move to right
+ * after "3": \f$ \frac{1+2+3|+4+5}{6} \f$. However, such a move depends on the sizes and placement
+ * of all nodes in the fraction.
+ *
+ *
+ * \subsubsection caretpos_graph_example Example of Caret Position Graph
+ *
+ * If we consider the formula
+ * \f$ \mbox{A} + \frac{\mbox{B} \cdot \mbox{C}}{\mbox{D}} \f$ from \ref formula_trees.
+ * It has the following caret positions:
+ *
+ * <TABLE>
+ * <TR>
+ * <TD><B>Caret position:</B></TD>
+ * <TD><B>Example:</B></TD>
+ * </TR><TR>
+ * <TD>{id: 3, index: 0}</TD>
+ * <TD>\f$ \mid\mbox{A} + \frac{\mbox{B} \cdot \mbox{C}}{\mbox{D}} \f$</TD>
+ * </TR><TR>
+ * <TD>{id: 5, index: 1}</TD>
+ * <TD>\f$ \mbox{A}\mid + \frac{\mbox{B} \cdot \mbox{C}}{\mbox{D}} \f$</TD>
+ * </TR><TR>
+ * <TD>{id: 6, index: 1}</TD>
+ * <TD>\f$ \mbox{A} + \mid \frac{\mbox{B} \cdot \mbox{C}}{\mbox{D}} \f$</TD>
+ * </TR><TR>
+ * <TD>{id: 8, index: 0}</TD>
+ * <TD>\f$ \mbox{A} + \frac{ \mid \mbox{B} \cdot \mbox{C}}{\mbox{D}} \f$</TD>
+ * </TR><TR>
+ * <TD>{id: 10, index: 1}</TD>
+ * <TD>\f$ \mbox{A} + \frac{\mbox{B} \mid \cdot \mbox{C}}{\mbox{D}} \f$</TD>
+ * </TR><TR>
+ * <TD>{id: 11, index: 1}</TD>
+ * <TD>\f$ \mbox{A} + \frac{\mbox{B} \cdot \mid \mbox{C}}{\mbox{D}} \f$</TD>
+ * </TR><TR>
+ * <TD>{id: 12, index: 1}</TD>
+ * <TD>\f$ \mbox{A} + \frac{\mbox{B} \cdot \mbox{C} \mid}{\mbox{D}} \f$</TD>
+ * </TR><TR>
+ * <TD>{id: 14, index: 0}</TD>
+ * <TD>\f$ \mbox{A} + \frac{\mbox{B} \cdot \mbox{C}}{\mid \mbox{D}} \f$</TD>
+ * </TR><TR>
+ * <TD>{id: 14, index: 1}</TD>
+ * <TD>\f$ \mbox{A} + \frac{\mbox{B} \cdot \mbox{C}}{\mbox{D} \mid} \f$</TD>
+ * </TR><TR>
+ * <TD>{id: 7, index: 1}</TD>
+ * <TD>\f$ \mbox{A} + \frac{\mbox{B} \cdot \mbox{C}}{\mbox{D}} \mid \f$</TD>
+ * </TR>
+ * </TABLE>
+ *
+ * Below is a directed graph over the caret postions and how you can move between them.
+ * \dot
+ * digraph {
+ * labelloc = "t";
+ * label= "Caret Position Graph";
+ * size = "4,6";
+ * p0 [label = "{id: 3, index: 0}"];
+ * p0 -> p1 [fontsize = 10.0, label = "right"];
+ * p1 [label = "{id: 5, index: 1}"];
+ * p1 -> p0 [fontsize = 10.0, label = "left"];
+ * p1 -> p2 [fontsize = 10.0, label = "right"];
+ * p2 [label = "{id: 6, index: 1}"];
+ * p2 -> p1 [fontsize = 10.0, label = "left"];
+ * p2 -> p3 [fontsize = 10.0, label = "right"];
+ * p3 [label = "{id: 8, index: 0}"];
+ * p3 -> p2 [fontsize = 10.0, label = "left"];
+ * p3 -> p4 [fontsize = 10.0, label = "right"];
+ * p4 [label = "{id: 10, index: 1}"];
+ * p4 -> p3 [fontsize = 10.0, label = "left"];
+ * p4 -> p5 [fontsize = 10.0, label = "right"];
+ * p5 [label = "{id: 11, index: 1}"];
+ * p5 -> p4 [fontsize = 10.0, label = "left"];
+ * p5 -> p6 [fontsize = 10.0, label = "right"];
+ * p6 [label = "{id: 12, index: 1}"];
+ * p6 -> p5 [fontsize = 10.0, label = "left"];
+ * p6 -> p9 [fontsize = 10.0, label = "right"];
+ * p7 [label = "{id: 14, index: 0}"];
+ * p7 -> p2 [fontsize = 10.0, label = "left"];
+ * p7 -> p8 [fontsize = 10.0, label = "right"];
+ * p8 [label = "{id: 14, index: 1}"];
+ * p8 -> p7 [fontsize = 10.0, label = "left"];
+ * p8 -> p9 [fontsize = 10.0, label = "right"];
+ * p9 [label = "{id: 7, index: 1}"];
+ * p9 -> p6 [fontsize = 10.0, label = "left"];
+ * }
+ * \enddot
+ */
+
+/* TODO: Write documentation about the following keywords:
+ *
+ * Visual Selections:
+ * - Show images
+ * - Talk about how the visitor does this
+ *
+ * Modifying a Visual Line:
+ * - Find top most non-compo of the line (e.g. The subtree that constitutes a line)
+ * - Make the line into a list
+ * - Edit the list, add/remove/modify nodes
+ * - Parse the list back into a subtree
+ * - Insert the new subtree where the old was taken
+ */
+
+#endif /* CARET_H */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/config.hxx b/starmath/inc/config.hxx
index 99f4fd4a9489..9fc397eca0cc 100644
--- a/starmath/inc/config.hxx
+++ b/starmath/inc/config.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx
new file mode 100644
index 000000000000..0de8931673d9
--- /dev/null
+++ b/starmath/inc/cursor.hxx
@@ -0,0 +1,482 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Jonas Finnemann Jensen <jopsen@gmail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jonas Finnemann Jensen <jopsen@gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef SMCURSOR_H
+#define SMCURSOR_H
+
+#include "node.hxx"
+#include "caret.hxx"
+
+/** Factor to multiple the squared horizontical distance with
+ * Used for Up and Down movement.
+ */
+#define HORIZONTICAL_DISTANCE_FACTOR 10
+
+/** Enum of direction for movement */
+enum SmMovementDirection{
+ MoveUp,
+ MoveDown,
+ MoveLeft,
+ MoveRight
+};
+
+/** Enum of elements that can inserted into a formula */
+enum SmFormulaElement{
+ BlankElement,
+ FactorialElement,
+ PlusElement,
+ MinusElement,
+ CDotElement,
+ EqualElement,
+ LessThanElement,
+ GreaterThanElement,
+ PercentElement
+};
+
+/** Bracket types that can be inserted */
+enum SmBracketType {
+ /** None brackets, left command "none" */
+ NoneBrackets,
+ /** Round brackets, left command "(" */
+ RoundBrackets,
+ /**Square brackets, left command "[" */
+ SquareBrackets,
+ /** Double square brackets, left command "ldbracket" */
+ DoubleSquareBrackets,
+ /** Line brackets, left command "lline" */
+ LineBrackets,
+ /** Double line brackets, left command "ldline" */
+ DoubleLineBrackets,
+ /** Curly brackets, left command "lbrace" */
+ CurlyBrackets,
+ /** Angle brackets, left command "langle" */
+ AngleBrackets,
+ /** Ceiling brackets, left command "lceil" */
+ CeilBrackets,
+ /** Floor brackets, left command "lfloor" */
+ FloorBrackets
+};
+
+/** A list of nodes */
+typedef std::list<SmNode*> SmNodeList;
+
+class SmDocShell;
+
+/** Formula cursor
+ *
+ * This class is used to represent a cursor in a formula, which can be used to manipulate
+ * an formula programmatically.
+ * @remarks This class is a very intimite friend of SmDocShell.
+ */
+class SmCursor{
+public:
+ SmCursor(SmNode* tree, SmDocShell* pShell){
+ //Initialize members
+ pTree = tree;
+ anchor = NULL;
+ position = NULL;
+ pGraph = NULL;
+ pDocShell = pShell;
+ pClipboard = NULL;
+ nEditSections = 0;
+ //Build graph
+ BuildGraph();
+ }
+
+ ~SmCursor(){
+ SetClipboard();
+ if(pGraph)
+ delete pGraph;
+ pGraph = NULL;
+ }
+
+ /** Gets the anchor */
+ SmCaretPos GetAnchor(){ return anchor->CaretPos; }
+
+ /** Get position */
+ SmCaretPos GetPosition() { return position->CaretPos; }
+
+ /** True, if the cursor has a selection */
+ bool HasSelection() { return anchor != position; }
+
+ /** Move the position of this cursor */
+ void Move(OutputDevice* pDev, SmMovementDirection direction, bool bMoveAnchor = true);
+
+ /** Move to the caret position closet to a given point */
+ void MoveTo(OutputDevice* pDev, Point pos, bool bMoveAnchor = true);
+
+ /** Delete the current selection or do nothing */
+ void Delete();
+
+ /** Delete selection, previous element or merge lines
+ *
+ * This method implements the behaviour of backspace.
+ */
+ void DeletePrev(OutputDevice* pDev);
+
+ /** Insert text at the current position */
+ void InsertText(XubString aString);
+
+ /** Insert an element into the formula */
+ void InsertElement(SmFormulaElement element);
+
+ /** Insert a command specified in commands.src*/
+ void InsertCommand(sal_uInt16 nCommand);
+
+ /** Insert command text translated into line entries at position
+ *
+ * Note: This method uses the parser to translate a command text into a
+ * tree, then it copies line entries from this tree into the current tree.
+ * Will not work for commands such as newline or ##, if position is in a matrix.
+ * This will work for stuff like "A intersection B". But stuff spaning multiple lines
+ * or dependent on the context which position is placed in will not work!
+ */
+ void InsertCommandText(String aCommandText);
+
+ /** Insert a special node created from aString
+ *
+ * Used for handling insert request from the "catalog" dialog.
+ * The provided string should be formatet as the desired command: %phi
+ * Note: this method ONLY supports commands defined in Math.xcu
+ *
+ * For more complex expressions use InsertCommandText, this method doesn't
+ * use SmParser, this means that it's faster, but not as strong.
+ */
+ void InsertSpecial(XubString aString);
+
+ /** Create sub-/super script
+ *
+ * If there's a selection, it will be move into the appropriate sub-/super scription
+ * of the node infront of it. If there's no node infront of position (or the selection),
+ * a sub-/super scription of a new SmPlaceNode will be made.
+ *
+ * If there's is an existing subscription of the node, the caret will be moved into it,
+ * and any selection will replace it.
+ */
+ void InsertSubSup(SmSubSup eSubSup);
+
+ /** Create a limit on an SmOperNode
+ *
+ * This this method only work if the caret is inside an SmOperNode, or to the right of one.
+ * Notice also that this method ignores any selection made.
+ *
+ * @param bMoveCaret If true that caret will be moved into the limit.
+ *
+ * @returns True, if the caret was in a context where this operation was possible.
+ */
+ bool InsertLimit(SmSubSup eSubSup, bool bMoveCaret = true);
+
+ /** Insert a new row or newline
+ *
+ * Inserts a new row if position is in an matrix or stack command.
+ * Otherwise a newline is inserted if we're in a toplevel line.
+ *
+ * @returns True, if a new row/line could be inserted.
+ *
+ * @remarks If the caret is placed in a subline of a command that doesn't support
+ * this operator the method returns FALSE, and doesn't do anything.
+ */
+ bool InsertRow();
+
+ /** Insert a fraction, use selection as numerator */
+ void InsertFraction();
+
+ /** Create brackets around current selection, or new SmPlaceNode */
+ void InsertBrackets(SmBracketType eBracketType);
+
+ /** Copy the current selection */
+ void Copy();
+ /** Cut the current selection */
+ void Cut(){
+ Copy();
+ Delete();
+ }
+ /** Paste the clipboard */
+ void Paste();
+
+ /** Returns true if more than one node is selected
+ *
+ * This method is used for implementing backspace and delete.
+ * If one of these causes a complex selection, e.g. a node with
+ * subnodes or similar, this should not be deleted imidiately.
+ */
+ bool HasComplexSelection();
+
+ /** Finds the topmost node in a visual line
+ *
+ * If MoveUpIfSelected is true, this will move up to the parent line
+ * if the parent of the current line is selected.
+ */
+ static SmNode* FindTopMostNodeInLine(SmNode* pSNode, bool MoveUpIfSelected = false);
+
+ /** Draw the caret */
+ void Draw(OutputDevice& pDev, Point Offset, bool isCaretVisible);
+
+private:
+ friend class SmDocShell;
+
+ SmCaretPosGraphEntry *anchor,
+ *position;
+ /** Formula tree */
+ SmNode* pTree;
+ /** Owner of the formula tree */
+ SmDocShell* pDocShell;
+ /** Graph over caret position in the current tree */
+ SmCaretPosGraph* pGraph;
+ /** Clipboard holder */
+ SmNodeList* pClipboard;
+
+ /** Returns a node that is selected, if any could be found */
+ SmNode* FindSelectedNode(SmNode* pNode);
+
+ /** Is this one of the nodes used to compose a line
+ *
+ * These are SmExpression, SmBinHorNode, SmUnHorNode etc.
+ */
+ static bool IsLineCompositionNode(SmNode* pNode);
+
+ /** Count number of selected nodes, excluding line composition nodes
+ *
+ * Note this function doesn't count line composition nodes and it
+ * does count all subnodes as well as the owner nodes.
+ *
+ * Used by SmCursor::HasComplexSelection()
+ */
+ int CountSelectedNodes(SmNode* pNode);
+
+ /** Convert a visual line to a list
+ *
+ * Note this method will delete all the nodes that will no longer be needed.
+ * that includes pLine!
+ * This method also deletes SmErrorNode's as they're just meta info in the line.
+ */
+ static SmNodeList* LineToList(SmStructureNode* pLine, SmNodeList* pList = new SmNodeList());
+
+ /** Auxiliary function for calling LineToList on a node
+ *
+ * This method sets pNode = NULL and remove it from it's parent.
+ * (Assuming it has a parent, and is a child of it).
+ */
+ static SmNodeList* NodeToList(SmNode*& rpNode, SmNodeList* pList = new SmNodeList()){
+ //Remove from parent and NULL rpNode
+ SmNode* pNode = rpNode;
+ if(rpNode && rpNode->GetParent()){ //Don't remove this, correctness relies on it
+ int index = rpNode->GetParent()->IndexOfSubNode(rpNode);
+ if(index != -1)
+ rpNode->GetParent()->SetSubNode(index, NULL);
+ }
+ rpNode = NULL;
+ //Create line from node
+ if(pNode && IsLineCompositionNode(pNode))
+ return LineToList((SmStructureNode*)pNode, pList);
+ if(pNode)
+ pList->push_front(pNode);
+ return pList;
+ }
+
+ /** Clone a visual line to a list
+ *
+ * Doesn't clone SmErrorNode's these are ignored, as they are context dependent metadata.
+ */
+ static SmNodeList* CloneLineToList(SmStructureNode* pLine,
+ bool bOnlyIfSelected = false,
+ SmNodeList* pList = new SmNodeList());
+
+ /** Build pGraph over caret positions */
+ void BuildGraph();
+
+ /** Insert new nodes in the tree after position */
+ void InsertNodes(SmNodeList* pNewNodes);
+
+ /** tries to set position to a specific SmCaretPos
+ *
+ * @returns false on failure to find the position in pGraph.
+ */
+ bool SetCaretPosition(SmCaretPos pos, bool moveAnchor = false);
+
+ /** Set selected on nodes of the tree */
+ void AnnotateSelection();
+
+ /** Set the clipboard, and release current clipboard
+ *
+ * Call this method with NULL to reset the clipboard
+ * @remarks: This method takes ownership of pList.
+ */
+ void SetClipboard(SmNodeList* pList = NULL);
+
+ /** Clone list of nodes (creates a deep clone) */
+ static SmNodeList* CloneList(SmNodeList* pList);
+
+ /** Find an iterator pointing to the node in pLineList following aCaretPos
+ *
+ * If aCaretPos::pSelectedNode cannot be found it is assumed that it's infront of pLineList,
+ * thus not an element in pLineList. In this case this method returns an iterator to the
+ * first element in pLineList.
+ *
+ * If the current position is inside an SmTextNode, this node will be split in two, for this
+ * reason you should beaware that iterators to elements in pLineList may be invalidated, and
+ * that you should call PatchLineList() with this iterator if no action is taken.
+ */
+ static SmNodeList::iterator FindPositionInLineList(SmNodeList* pLineList, SmCaretPos aCaretPos);
+
+ /** Patch a line list after modification, merge SmTextNode, remove SmPlaceNode etc.
+ *
+ * @param pLineList The line list to patch
+ * @param aIter Iterator pointing to the element that needs to be patched with it's previous.
+ *
+ * When the list is patched text nodes before and after aIter will be merged.
+ * If there's an, in the context, inappropriate SmPlaceNode before or after aIter it will also be
+ * removed.
+ *
+ * @returns A caret position equivalent to one selecting the node before aIter, the method returns
+ * an invalid SmCaretPos to indicate placement infront of the line.
+ */
+ static SmCaretPos PatchLineList(SmNodeList* pLineList, SmNodeList::iterator aIter);
+
+ /** Take selected nodes from a list
+ *
+ * Puts the selected nodes into pSelectedNodes, or if pSelectedNodes is NULL deletes
+ * the selected nodes.
+ * Note: If there's a selection inside an SmTextNode this node will be split, and it
+ * will not be merged when the selection have been taken. Use PatchLineList on the
+ * iterator returns to fix this.
+ *
+ * @returns An iterator pointing to the element following the selection taken.
+ */
+ static SmNodeList::iterator TakeSelectedNodesFromList(SmNodeList *pLineList,
+ SmNodeList *pSelectedNodes = NULL);
+
+ /** Create an instance of SmMathSymbolNode usable for brackets */
+ static SmNode *CreateBracket(SmBracketType eBracketType, bool bIsLeft);
+
+ /** The number of times BeginEdit have been called
+ * Used to allow nesting of BeginEdit() and EndEdit() sections
+ */
+ int nEditSections;
+ /** Holds data for BeginEdit() and EndEdit() */
+ bool bIsEnabledSetModifiedSmDocShell;
+ /** Begin edit section where the tree will be modified */
+ void BeginEdit();
+ /** End edit section where the tree will be modified */
+ void EndEdit();
+ /** Finish editing
+ *
+ * Finishes editing by parsing pLineList and inserting back into pParent at nParentIndex.
+ * This method also rebuilts the graph, annotates the selection, sets caret position and
+ * Calls EndEdit.
+ *
+ * @remarks Please note that this method will delete pLineList, as the elements are taken.
+ *
+ * @param pLineList List the constitutes the edited line.
+ * @param pParent Parent to which the line should be inserted.
+ * @param nParentIndex Index in parent where the line should be inserted.
+ * @param PosAfterEdit Caret position to look for after rebuilding graph.
+ * @param pStartLine Line to take first position in, if PosAfterEdit cannot be found,
+ * leave it NULL for pLineList.
+ */
+ void FinishEdit(SmNodeList* pLineList,
+ SmStructureNode* pParent,
+ int nParentIndex,
+ SmCaretPos PosAfterEdit,
+ SmNode* pStartLine = NULL);
+ /** Request the formula is repainted */
+ void RequestRepaint();
+};
+
+/** Minimalistic recursive decent SmNodeList parser
+ *
+ * This parser is used to take a list of nodes that constitues a line
+ * and parse them to a tree of SmBinHorNode, SmUnHorNode and SmExpression.
+ *
+ * Please note, this will not handle all kinds of nodes, only nodes that
+ * constitues and entry in a line.
+ *
+ * Below is an EBNF representation of the grammar used for this parser:
+ * \code
+ * Expression -> Relation*
+ * Relation -> Sum [(=|<|>|...) Sum]*
+ * Sum -> Product [(+|-) Product]*
+ * Product -> Factor [(*|/) Factor]*
+ * Factor -> [+|-|-+|...]* Factor | Postfix
+ * Postfix -> node [!]*
+ * \endcode
+ */
+class SmNodeListParser{
+public:
+ /** Create an instance of SmNodeListParser */
+ SmNodeListParser(){
+ pList = NULL;
+ }
+ /** Parse a list of nodes to an expression
+ *
+ * If bDeleteErrorNodes is true, old error nodes will be deleted.
+ */
+ SmNode* Parse(SmNodeList* list, bool bDeleteErrorNodes = true);
+ /** True, if the token is an operator */
+ static bool IsOperator(const SmToken &token);
+ /** True, if the token is a relation operator */
+ static bool IsRelationOperator(const SmToken &token);
+ /** True, if the token is a sum operator */
+ static bool IsSumOperator(const SmToken &token);
+ /** True, if the token is a product operator */
+ static bool IsProductOperator(const SmToken &token);
+ /** True, if the token is a unary operator */
+ static bool IsUnaryOperator(const SmToken &token);
+ /** True, if the token is a postfix operator */
+ static bool IsPostfixOperator(const SmToken &token);
+private:
+ SmNodeList* pList;
+ /** Get the current terminal */
+ SmNode* Terminal(){
+ if(pList->size() > 0)
+ return pList->front();
+ return NULL;
+ }
+ /** Move to next terminal */
+ SmNode* Next(){
+ pList->pop_front();
+ return Terminal();
+ }
+ /** Take the current terminal */
+ SmNode* Take(){
+ SmNode* pRetVal = Terminal();
+ Next();
+ return pRetVal;
+ }
+ SmNode* Expression();
+ SmNode* Relation();
+ SmNode* Sum();
+ SmNode* Product();
+ SmNode* Factor();
+ SmNode* Postfix();
+ SmNode* Error();
+};
+
+
+#endif /* SMCURSOR_H */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 806bfbf4e4a2..316d1fb7ca62 100755
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,6 @@
#include <vcl/dialog.hxx>
#include <vcl/fixed.hxx>
#include <vcl/button.hxx>
-#include <vcl/image.hxx>
#include <sfx2/tabdlg.hxx>
#include <vcl/combobox.hxx>
#include <svx/charmap.hxx>
@@ -53,7 +53,6 @@ class SubsetMap;
/**************************************************************************/
-const XubString GetFontStyleName(const Font &rFont);
void SetFontStyle(const XubString &rStyleName, Font &rFont);
/**************************************************************************/
@@ -121,7 +120,7 @@ class SmFontDialog : public ModalDialog
virtual void DataChanged( const DataChangedEvent& rDCEvt );
public:
- SmFontDialog(Window * pParent, OutputDevice *pFntListDevice, sal_Bool bHideCheckboxes, sal_Bool bFreeRes = sal_True);
+ SmFontDialog(Window * pParent, OutputDevice *pFntListDevice, bool bHideCheckboxes, bool bFreeRes = true);
const Font& GetFont() const { return Face; }
void SetFont(const Font &rFont);
@@ -151,7 +150,7 @@ class SmFontSizeDialog : public ModalDialog
DECL_LINK(DefaultButtonClickHdl, Button *);
public:
- SmFontSizeDialog(Window *pParent, sal_Bool bFreeRes = sal_True);
+ SmFontSizeDialog(Window *pParent, bool bFreeRes = true);
void ReadFrom(const SmFormat &rFormat);
void WriteTo (SmFormat &rFormat) const;
@@ -188,7 +187,7 @@ class SmFontTypeDialog : public ModalDialog
DECL_LINK(DefaultButtonClickHdl, Button *);
public:
- SmFontTypeDialog(Window *pParent, OutputDevice *pFntListDevice, sal_Bool bFreeRes = sal_True);
+ SmFontTypeDialog(Window *pParent, OutputDevice *pFntListDevice, bool bFreeRes = true);
void ReadFrom(const SmFormat &rFormat);
void WriteTo (SmFormat &rFormat) const;
@@ -203,11 +202,9 @@ class SmCategoryDesc : public Resource
XubString Name;
XubString *Strings[4];
Bitmap *Graphics[4]; /* regular bitmaps */
- Bitmap *GraphicsH[4]; /* high contrast bitmaps */
sal_uInt16 Minimum[4];
sal_uInt16 Maximum[4];
sal_uInt16 Value[4];
- sal_Bool bIsHighContrast;
public:
SmCategoryDesc(const ResId &rResId, sal_uInt16 nCategoryIdx);
@@ -220,10 +217,9 @@ public:
sal_uInt16 GetValue(sal_uInt16 Index) const { return Value[Index]; }
void SetValue(sal_uInt16 Index, sal_uInt16 nVal) { Value[Index] = nVal;}
- void SetHighContrast( sal_Bool bVal ) { bIsHighContrast = bVal; }
const Bitmap * GetGraphic(sal_uInt16 Index) const
{
- return bIsHighContrast ? GraphicsH[Index] : Graphics[Index];
+ return Graphics[Index];
}
};
@@ -248,7 +244,7 @@ class SmDistanceDialog : public ModalDialog
SmCategoryDesc *Categories[NOCATEGORIES];
sal_uInt16 nActiveCategory;
- sal_Bool bScaleAllBrackets;
+ bool bScaleAllBrackets;
DECL_LINK(GetFocusHdl, Control *);
DECL_LINK(MenuSelectHdl, Menu *);
@@ -259,10 +255,8 @@ class SmDistanceDialog : public ModalDialog
void SetHelpId(MetricField &rField, const rtl::OString& sHelpId);
void SetCategory(sal_uInt16 Category);
- void ApplyImages();
-
public:
- SmDistanceDialog(Window *pParent, sal_Bool bFreeRes = sal_True);
+ SmDistanceDialog(Window *pParent, bool bFreeRes = true);
~SmDistanceDialog();
void ReadFrom(const SmFormat &rFormat);
@@ -289,7 +283,7 @@ class SmAlignDialog : public ModalDialog
DECL_LINK(DefaultButtonClickHdl, Button *);
public:
- SmAlignDialog(Window *pParent, sal_Bool bFreeRes = sal_True);
+ SmAlignDialog(Window *pParent, bool bFreeRes = true);
void ReadFrom(const SmFormat &rFormat);
void WriteTo (SmFormat &rFormat) const;
@@ -373,7 +367,7 @@ class SmSymbolDialog : public ModalDialog
DECL_LINK(EditClickHdl, Button *);
DECL_LINK(GetClickHdl, Button *);
- void FillSymbolSets(sal_Bool bDeleteText = sal_True);
+ void FillSymbolSets(bool bDeleteText = true);
void SetSymbolSetManager(SmSymbolManager &rMgr);
const SmSym *GetSymbol() const;
void InitColor_Impl();
@@ -382,10 +376,10 @@ class SmSymbolDialog : public ModalDialog
public:
SmSymbolDialog(Window * pParent, OutputDevice *pFntListDevice,
- SmSymbolManager &rSymbolMgr, SmViewShell &rViewShell, sal_Bool bFreeRes = sal_True);
+ SmSymbolManager &rSymbolMgr, SmViewShell &rViewShell, bool bFreeRes = true);
virtual ~SmSymbolDialog();
- sal_Bool SelectSymbolSet(const XubString &rSymbolSetName);
+ bool SelectSymbolSet(const XubString &rSymbolSetName);
void SelectSymbol(sal_uInt16 nSymbolPos);
sal_uInt16 GetSelectedSymbol() const { return aSymbolSetDisplay.GetSelectSymbol(); }
};
@@ -438,7 +432,6 @@ class SmSymDefineDialog : public ModalDialog
PushButton aDeleteBtn;
FixedImage aRightArrow;
Image aRigthArrow_Im;
- Image aRigthArrow_Im_HC; // hi-contrast version
SmSymbolManager aSymbolMgrCopy,
&rSymbolMgr;
@@ -458,22 +451,22 @@ class SmSymDefineDialog : public ModalDialog
DECL_LINK(ChangeClickHdl, Button *);
DECL_LINK(DeleteClickHdl, Button *);
- void FillSymbols(ComboBox &rComboBox, sal_Bool bDeleteText = sal_True);
- void FillSymbolSets(ComboBox &rComboBox, sal_Bool bDeleteText = sal_True);
- void FillFonts(sal_Bool bDeleteText = sal_True);
- void FillStyles(sal_Bool bDeleteText = sal_True);
+ void FillSymbols(ComboBox &rComboBox, bool bDeleteText = true);
+ void FillSymbolSets(ComboBox &rComboBox, bool bDeleteText = true);
+ void FillFonts(bool bDeleteText = true);
+ void FillStyles(bool bDeleteText = true);
void SetSymbolSetManager(const SmSymbolManager &rMgr);
void SetFont(const XubString &rFontName, const XubString &rStyleName);
void SetOrigSymbol(const SmSym *pSymbol, const XubString &rSymbolSetName);
void UpdateButtons();
- sal_Bool SelectSymbolSet(ComboBox &rComboBox, const XubString &rSymbolSetName,
- sal_Bool bDeleteText);
- sal_Bool SelectSymbol(ComboBox &rComboBox, const XubString &rSymbolName,
- sal_Bool bDeleteText);
- sal_Bool SelectFont(const XubString &rFontName, sal_Bool bApplyFont);
- sal_Bool SelectStyle(const XubString &rStyleName, sal_Bool bApplyFont);
+ bool SelectSymbolSet(ComboBox &rComboBox, const XubString &rSymbolSetName,
+ bool bDeleteText);
+ bool SelectSymbol(ComboBox &rComboBox, const XubString &rSymbolName,
+ bool bDeleteText);
+ bool SelectFont(const XubString &rFontName, bool bApplyFont);
+ bool SelectStyle(const XubString &rStyleName, bool bApplyFont);
SmSym * GetSymbol(const ComboBox &rComboBox);
const SmSym * GetSymbol(const ComboBox &rComboBox) const
@@ -486,7 +479,7 @@ class SmSymDefineDialog : public ModalDialog
virtual void DataChanged( const DataChangedEvent& rDCEvt );
public:
- SmSymDefineDialog(Window *pParent, OutputDevice *pFntListDevice, SmSymbolManager &rMgr, sal_Bool bFreeRes = sal_True);
+ SmSymDefineDialog(Window *pParent, OutputDevice *pFntListDevice, SmSymbolManager &rMgr, bool bFreeRes = true);
~SmSymDefineDialog();
using OutputDevice::SetFont;
@@ -494,28 +487,28 @@ public:
// Dialog
virtual short Execute();
- sal_Bool SelectOldSymbolSet(const XubString &rSymbolSetName)
+ bool SelectOldSymbolSet(const XubString &rSymbolSetName)
{
- return SelectSymbolSet(aOldSymbolSets, rSymbolSetName, sal_False);
+ return SelectSymbolSet(aOldSymbolSets, rSymbolSetName, false);
}
- sal_Bool SelectOldSymbol(const XubString &rSymbolName)
+ bool SelectOldSymbol(const XubString &rSymbolName)
{
- return SelectSymbol(aOldSymbols, rSymbolName, sal_False);
+ return SelectSymbol(aOldSymbols, rSymbolName, false);
}
- sal_Bool SelectSymbolSet(const XubString &rSymbolSetName)
+ bool SelectSymbolSet(const XubString &rSymbolSetName)
{
- return SelectSymbolSet(aSymbolSets, rSymbolSetName, sal_False);
+ return SelectSymbolSet(aSymbolSets, rSymbolSetName, false);
}
- sal_Bool SelectSymbol(const XubString &rSymbolName)
+ bool SelectSymbol(const XubString &rSymbolName)
{
- return SelectSymbol(aSymbols, rSymbolName, sal_False);
+ return SelectSymbol(aSymbols, rSymbolName, false);
}
- sal_Bool SelectFont(const XubString &rFontName) { return SelectFont(rFontName, sal_True); }
- sal_Bool SelectStyle(const XubString &rStyleName) { return SelectStyle(rStyleName, sal_True); };
+ bool SelectFont(const XubString &rFontName) { return SelectFont(rFontName, true); }
+ bool SelectStyle(const XubString &rStyleName) { return SelectStyle(rStyleName, true); };
void SelectChar(xub_Unicode cChar);
};
@@ -523,3 +516,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index f31a53801120..97753d9446e1 100755
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,6 +25,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
#ifndef DOCUMENT_HXX
#define DOCUMENT_HXX
@@ -48,6 +50,7 @@ class SmNode;
class SfxMenuBarManager;
class SfxPrinter;
class Printer;
+class SmCursor;
#define HINT_DATACHANGED 1004
@@ -55,8 +58,8 @@ class Printer;
#define SM30IDENT ((sal_uLong)0x30334d53L)
#define SM304AIDENT ((sal_uLong)0x34303330L)
#define SM30VERSION ((sal_uLong)0x00010000L)
-#define SM50VERSION ((sal_uLong)0x00010001L) //Unterschied zur SM30VERSION ist
- //der neue Border im Format.
+#define SM50VERSION ((ULONG)0x00010001L) //Difference to SM30VERSION is
+ //the new border in the format.
#define FRMIDENT ((sal_uLong)0x03031963L)
#define FRMVERSION ((sal_uLong)0x00010001L)
@@ -64,20 +67,19 @@ class Printer;
#define STAROFFICE_XML "StarOffice XML (Math)"
#define MATHML_XML "MathML XML (Math)"
-/* Zugriff auf den Drucker sollte ausschliesslich ueber diese Klasse erfolgen
+/* Access to printer should happen through this class only
* ==========================================================================
*
- * Der Drucker kann dem Dokument oder auch dem OLE-Container gehoeren. Wenn
- * das Dokument also eine OLE-Dokument ist, so gehoert der Drucker auch
- * grundsaetzlich dem Container. Der Container arbeitet aber eventuell mit
- * einer anderen MapUnit als der Server. Der Drucker wird bezueglich des MapMode
- * im Konstruktor entsprechend eingestellt und im Destruktor wieder restauriert.
- * Das bedingt natuerlich, das diese Klasse immer nur kurze Zeit existieren darf
- * (etwa waehrend des Paints).
- * Die Kontrolle darueber ob der Drucker selbst angelegt, vom Server besorgt
- * oder dann auch NULL ist, uebernimmt die DocShell in der Methode GetPrt(),
- * fuer die der Access auch Friend der DocShell ist.
-*/
+ * The printer can belong to the document or the OLE-Container. If the document
+ * is an OLE-Document the printer generally belongs to the container too.
+ * But the container mayby works with a different MapUnit than the server.
+ * Referring to the MapMode the printer will be accordingly adjusted in the
+ * constructor and restored in the destructor. This brings that this class
+ * is always allowed to exists only a short time (e.g. while painting).
+ * The control whether the printer is self-generated, gotten from the server
+ * or is NULL then, is taken by the DocShell in the method GetPrt(), for
+ * which the access is friend of the DocShell too.
+ */
class SmDocShell;
class EditEngine;
@@ -108,6 +110,7 @@ class SmDocShell : public SfxObjectShell, public SfxListener
{
friend class SmPrinterAccess;
friend class SmModel;
+ friend class SmCursor;
String aText;
SmFormat aFormat;
@@ -117,15 +120,15 @@ class SmDocShell : public SfxObjectShell, public SfxListener
SfxMenuBarManager *pMenuMgr;
SfxItemPool *pEditEngineItemPool;
EditEngine *pEditEngine;
- SfxPrinter *pPrinter; //Siehe Kommentar zum SmPrinter Access!
- Printer *pTmpPrinter; //ebenfalls
+ SfxPrinter *pPrinter; //q.v. comment to SmPrinter Access!
+ Printer *pTmpPrinter; //ditto
long nLeftBorder,
nRightBorder,
nTopBorder,
nBottomBorder;
sal_uInt16 nModifyCount;
- sal_Bool bIsFormulaArranged;
-
+ bool bIsFormulaArranged;
+ SmCursor *pCursor;
std::set< rtl::OUString > aUsedSymbols; // to export used symbols only when saving
@@ -133,7 +136,7 @@ class SmDocShell : public SfxObjectShell, public SfxListener
virtual void SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType);
- sal_Bool WriteAsMathType3( SfxMedium& );
+ bool WriteAsMathType3( SfxMedium& );
virtual void Draw(OutputDevice *pDevice,
const JobSetup & rSetup,
@@ -161,11 +164,16 @@ class SmDocShell : public SfxObjectShell, public SfxListener
Printer *GetPrt();
OutputDevice* GetRefDev();
- sal_Bool IsFormulaArranged() const { return bIsFormulaArranged; }
- void SetFormulaArranged(sal_Bool bVal) { bIsFormulaArranged = bVal; }
+ bool IsFormulaArranged() const { return bIsFormulaArranged; }
+ void SetFormulaArranged(bool bVal) { bIsFormulaArranged = bVal; }
virtual sal_Bool ConvertFrom(SfxMedium &rMedium);
+ /** Called whenever the formula is changed
+ * Deletes the current cursor
+ */
+ void InvalidateCursor();
+
public:
TYPEINFO();
SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START+1)
@@ -180,11 +188,10 @@ public:
void ArrangeFormula();
- //Zugriff fuer die View. Diese Zugriffe sind nur fuer den nicht OLE-Fall!
- //und fuer die Kommunikation mit dem SFX!
- //Alle internen Verwendungen des Printers sollten ausschlieslich uber
- //den SmPrinterAccess funktionieren.
- sal_Bool HasPrinter() { return 0 != pPrinter; }
+ //Access for the View. This access is not for the OLE-case!
+ //and for the communication with the SFX!
+ //All internal printer uses should work with the SmPrinterAccess only
+ bool HasPrinter() { return 0 != pPrinter; }
SfxPrinter *GetPrinter() { GetPrt(); return pPrinter; }
void SetPrinter( SfxPrinter * );
@@ -211,7 +218,7 @@ public:
EditEngine & GetEditEngine();
SfxItemPool & GetEditEngineItemPool();
- void Draw(OutputDevice &rDev, Point &rPosition);
+ void DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSelection = false);
Size GetSize();
void Repaint();
@@ -225,8 +232,17 @@ public:
virtual void SetVisArea (const Rectangle & rVisArea);
virtual void SetModified(sal_Bool bModified);
-};
+ /** Get a cursor for modifying this document
+ * @remarks Don't store this reference, a new cursor may be made...
+ */
+ SmCursor& GetCursor();
+ /** True, if cursor have previously been requested and thus
+ * has some sort of position.
+ */
+ bool HasCursor() { return pCursor != NULL; }
+};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index 2de69a5924ed..454877dcaa7e 100644
--- a/starmath/inc/edit.hxx
+++ b/starmath/inc/edit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,10 +34,6 @@
#include <editeng/editdata.hxx>
#include <svtools/colorcfg.hxx>
-//#ifndef _ACCESSIBILITY_HXX_
-//#include "accessibility.hxx"
-//#endif
-
class SmDocShell;
class SmViewShell;
class EditView;
@@ -52,7 +49,7 @@ class CommandEvent;
/**************************************************************************/
- void SmGetLeftSelectionPart(const ESelection aSelection,
+ void SmGetLeftSelectionPart(const ESelection &rSelection,
sal_uInt16 &nPara, sal_uInt16 &nPos);
/**************************************************************************/
@@ -117,9 +114,9 @@ public:
ESelection GetSelection() const;
void SetSelection(const ESelection &rSel);
- sal_Bool IsEmpty() const;
- sal_Bool IsSelected() const;
- sal_Bool IsAllSelected() const;
+ bool IsEmpty() const;
+ bool IsSelected() const;
+ bool IsAllSelected() const;
void Cut();
void Copy();
void Paste();
@@ -130,14 +127,16 @@ public:
void MarkError(const Point &rPos);
void SelNextMark();
void SelPrevMark();
- sal_Bool HasMark(const String &rText) const;
+ bool HasMark(const String &rText) const;
void Flush();
void DeleteEditView( SmViewShell &rView );
void ApplyColorConfigValues( const svtools::ColorConfig &rColorCfg );
- sal_Bool HandleWheelCommands( const CommandEvent &rCEvt );
+ bool HandleWheelCommands( const CommandEvent &rCEvt );
+ bool IsInlineEditEnabled();
+ void StartCursorMove();
// for Accessibility
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
@@ -149,3 +148,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx
index de12c8af8891..98c34c4f4dc2 100755..100644
--- a/starmath/inc/format.hxx
+++ b/starmath/inc/format.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,14 +104,14 @@ String GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent );
class SmFormat : public SfxBroadcaster
{
SmFace vFont[FNT_END + 1];
- sal_Bool bDefaultFont[FNT_END + 1];
+ bool bDefaultFont[FNT_END + 1];
Size aBaseSize;
long nVersion;
sal_uInt16 vSize[SIZ_END + 1];
sal_uInt16 vDist[DIS_END + 1];
SmHorAlign eHorAlign;
sal_Int16 nGreekCharStyle;
- sal_Bool bIsTextmode,
+ bool bIsTextmode,
bScaleNormalBrackets;
public:
@@ -121,29 +122,29 @@ public:
void SetBaseSize(const Size &rSize) { aBaseSize = rSize; }
const SmFace & GetFont(sal_uInt16 nIdent) const { return vFont[nIdent]; }
- void SetFont(sal_uInt16 nIdent, const SmFace &rFont, sal_Bool bDefault = sal_False);
+ void SetFont(sal_uInt16 nIdent, const SmFace &rFont, bool bDefault = false);
void SetFontSize(sal_uInt16 nIdent, const Size &rSize) { vFont[nIdent].SetSize( rSize ); }
- void SetDefaultFont(sal_uInt16 nIdent, sal_Bool bVal) { bDefaultFont[nIdent] = bVal; }
- sal_Bool IsDefaultFont(sal_uInt16 nIdent) const { return bDefaultFont[nIdent]; }
+ void SetDefaultFont(sal_uInt16 nIdent, bool bVal) { bDefaultFont[nIdent] = bVal; }
+ bool IsDefaultFont(sal_uInt16 nIdent) const { return bDefaultFont[nIdent]; }
- sal_uInt16 GetRelSize(sal_uInt16 nIdent) const { return vSize[nIdent]; }
+ sal_uInt16 GetRelSize(sal_uInt16 nIdent) const { return vSize[nIdent]; }
void SetRelSize(sal_uInt16 nIdent, sal_uInt16 nVal) { vSize[nIdent] = nVal;}
- sal_uInt16 GetDistance(sal_uInt16 nIdent) const { return vDist[nIdent]; }
+ sal_uInt16 GetDistance(sal_uInt16 nIdent) const { return vDist[nIdent]; }
void SetDistance(sal_uInt16 nIdent, sal_uInt16 nVal) { vDist[nIdent] = nVal; }
SmHorAlign GetHorAlign() const { return eHorAlign; }
void SetHorAlign(SmHorAlign eAlign) { eHorAlign = eAlign; }
- sal_Bool IsTextmode() const { return bIsTextmode; }
- void SetTextmode(sal_Bool bVal) { bIsTextmode = bVal; }
+ bool IsTextmode() const { return bIsTextmode; }
+ void SetTextmode(bool bVal) { bIsTextmode = bVal; }
- sal_Int16 GetGreekCharStyle() const { return nGreekCharStyle; }
+ sal_Int16 GetGreekCharStyle() const { return nGreekCharStyle; }
void SetGreekCharStyle(sal_Int16 nVal) { nGreekCharStyle = nVal; }
- sal_Bool IsScaleNormalBrackets() const { return bScaleNormalBrackets; }
- void SetScaleNormalBrackets(sal_Bool bVal) { bScaleNormalBrackets = bVal; }
+ bool IsScaleNormalBrackets() const { return bScaleNormalBrackets; }
+ void SetScaleNormalBrackets(bool bVal) { bScaleNormalBrackets = bVal; }
long GetVersion() const { return nVersion; }
@@ -152,8 +153,8 @@ public:
SmFormat & operator = (const SmFormat &rFormat);
- sal_Bool operator == (const SmFormat &rFormat) const;
- inline sal_Bool operator != (const SmFormat &rFormat) const;
+ bool operator == (const SmFormat &rFormat) const;
+ inline bool operator != (const SmFormat &rFormat) const;
void RequestApplyChanges() const
{
@@ -162,10 +163,11 @@ public:
};
-inline sal_Bool SmFormat::operator != (const SmFormat &rFormat) const
+inline bool SmFormat::operator != (const SmFormat &rFormat) const
{
return !(*this == rFormat);
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index e10f2c095507..45589683c39f 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,12 +26,15 @@
*
************************************************************************/
-
#ifndef NODE_HXX
#define NODE_HXX
-
#include <vector>
+#include <fstream>
+#include <iostream>
+#include <stdio.h>
+
+#define j_assert(cond, msg) DBG_ASSERT(cond, msg)
#include "parse.hxx"
#include "types.hxx"
@@ -41,6 +45,7 @@
#define ATTR_BOLD 0x0001
#define ATTR_ITALIC 0x0002
+
#define FNTSIZ_ABSOLUT 1
#define FNTSIZ_PLUS 2
#define FNTSIZ_MINUS 3
@@ -59,6 +64,7 @@
extern SmFormat *pActiveFormat;
+class SmVisitor;
class SmDocShell;
class SmNode;
class SmStructureNode;
@@ -87,16 +93,19 @@ enum SmNodeType
class SmNode : public SmRect
{
- SmFace aFace;
+ SmFace aFace;
- SmToken aNodeToken;
+ SmToken aNodeToken;
SmNodeType eType;
SmScaleMode eScaleMode;
RectHorAlign eRectHorAlign;
sal_uInt16 nFlags,
nAttributes;
- sal_Bool bIsPhantom,
+ bool bIsPhantom,
bIsDebug;
+
+ bool bIsSelected;
+
protected:
SmNode(SmNodeType eNodeType, const SmToken &rNodeToken);
@@ -106,7 +115,7 @@ protected:
public:
virtual ~SmNode();
- virtual sal_Bool IsVisible() const;
+ virtual bool IsVisible() const;
virtual sal_uInt16 GetNumSubNodes() const;
virtual SmNode * GetSubNode(sal_uInt16 nIndex);
@@ -124,9 +133,9 @@ public:
sal_uInt16 & Flags() { return nFlags; }
sal_uInt16 & Attributes() { return nAttributes; }
- sal_Bool IsDebug() const { return bIsDebug; }
- sal_Bool IsPhantom() const { return bIsPhantom; }
- void SetPhantom(sal_Bool bIsPhantom);
+ bool IsDebug() const { return bIsDebug; }
+ bool IsPhantom() const { return bIsPhantom; }
+ void SetPhantom(bool bIsPhantom);
void SetColor(const Color &rColor);
void SetAttribut(sal_uInt16 nAttrib);
@@ -146,7 +155,7 @@ public:
void ToggleDebug() const;
#endif
- void SetRectHorAlign(RectHorAlign eHorAlign, sal_Bool bApplyToSubTree = sal_True );
+ void SetRectHorAlign(RectHorAlign eHorAlign, bool bApplyToSubTree = true );
RectHorAlign GetRectHorAlign() const { return eRectHorAlign; }
const SmRect & GetRect() const { return *this; }
@@ -157,11 +166,6 @@ public:
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
virtual void CreateTextFromNode(String &rText);
-#ifdef SM_RECT_DEBUG
- using SmRect::Draw;
-#endif
- virtual void Draw(OutputDevice &rDev, const Point &rPosition) const;
-
virtual void GetAccessibleText( String &rText ) const;
sal_Int32 GetAccessibleIndex() const { return nAccIndex; }
const SmNode * FindNodeWithAccessibleIndex(xub_StrLen nAccIndex) const;
@@ -181,15 +185,129 @@ public:
const SmNode * FindTokenAt(sal_uInt16 nRow, sal_uInt16 nCol) const;
const SmNode * FindRectClosestTo(const Point &rPoint) const;
- // --> 4.7.2010 #i972#
- virtual long GetFormulaBaseline() const;
- // <--
-};
+ virtual long GetFormulaBaseline() const;
+
+ /** Accept a visitor
+ * Calls the method for this class on the visitor
+ */
+ virtual void Accept(SmVisitor* pVisitor);
+
+ /** True if this node is selected */
+ bool IsSelected() const {return bIsSelected;}
+ void SetSelected(bool Selected = true) {bIsSelected = Selected;}
+
+#ifdef DEBUG_ENABLE_DUMPASDOT
+ /** The tree as dot graph for graphviz, usable for debugging
+ * Convert the output to a image using $ dot graph.gv -Tpng > graph.png
+ */
+ inline void DumpAsDot(std::ostream &out, String* label = NULL) const{
+ int id = 0;
+ DumpAsDot(out, label, -1, id, -1);
+ }
+#endif /* DEBUG_ENABLE_DUMPASDOT */
+
+ /** Get the parent node of this node */
+ SmStructureNode* GetParent(){ return aParentNode; }
+ /** Set the parent node */
+ void SetParent(SmStructureNode* parent){
+ aParentNode = parent;
+ }
+ /** Get the index of a child node
+ *
+ * Returns -1, if pSubNode isn't a subnode of this.
+ */
+ int IndexOfSubNode(SmNode* pSubNode){
+ sal_uInt16 nSize = GetNumSubNodes();
+ for(sal_uInt16 i = 0; i < nSize; i++)
+ if(pSubNode == GetSubNode(i))
+ return i;
+ return -1;
+ }
+ /** Set the token for this node */
+ void SetToken(SmToken& token){
+ aNodeToken = token;
+ }
+protected:
+ /** Sets parent on children of this node */
+ void ClaimPaternity(){
+ SmNode* pNode;
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
+ if (NULL != (pNode = GetSubNode(i)))
+ pNode->SetParent((SmStructureNode*)this); //Cast is valid if we have children
+ }
+private:
+ SmStructureNode* aParentNode;
+ void DumpAsDot(std::ostream &out, String* label, int number, int& id, int parent) const;
+};
////////////////////////////////////////////////////////////////////////////////
+/** A simple auxiliary iterator class for SmNode
+ *
+ * Example of iteration over children of pMyNode:
+ * \code
+ * //Node to iterate over:
+ * SmNode* pMyNode = 0;// A pointer from somewhere
+ * //The iterator:
+ * SmNodeIterator it(pMyNode);
+ * //The iteration:
+ * while(it.Next()) {
+ * it->SetSelected(true);
+ * }
+ * \endcode
+ */
+class SmNodeIterator{
+public:
+ SmNodeIterator(SmNode* node, bool bReverse = false){
+ pNode = node;
+ nSize = pNode->GetNumSubNodes();
+ nIndex = 0;
+ pChildNode = NULL;
+ bIsReverse = bReverse;
+ }
+ /** Get the subnode or NULL if none */
+ SmNode* Next(){
+ while(!bIsReverse && nIndex < nSize){
+ if(NULL != (pChildNode = pNode->GetSubNode(nIndex++)))
+ return pChildNode;
+ }
+ while(bIsReverse && nSize > 0){
+ if(NULL != (pChildNode = pNode->GetSubNode((nSize--)-1)))
+ return pChildNode;
+ }
+ pChildNode = NULL;
+ return NULL;
+ }
+ /** Get the current child node, NULL if none */
+ SmNode* Current(){
+ return pChildNode;
+ }
+ /** Get the current child node, NULL if none */
+ SmNode* operator->(){
+ return pChildNode;
+ }
+private:
+ /** Current child */
+ SmNode* pChildNode;
+ /** Node whos children we're iterating over */
+ SmNode* pNode;
+ /** Size of the node */
+ sal_uInt16 nSize;
+ /** Current index in the node */
+ sal_uInt16 nIndex;
+ /** Move reverse */
+ bool bIsReverse;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+/** Abstract baseclass for all composite node
+ *
+ * Subclasses of this class can have subnodes. Nodes that doesn't derivate from
+ * this class does not have subnodes.
+ */
class SmStructureNode : public SmNode
{
SmNodeArray aSubNodes;
@@ -203,7 +321,7 @@ public:
SmStructureNode( const SmStructureNode &rNode );
virtual ~SmStructureNode();
- virtual sal_Bool IsVisible() const;
+ virtual bool IsVisible() const;
virtual sal_uInt16 GetNumSubNodes() const;
void SetNumSubNodes(sal_uInt16 nSize) { aSubNodes.resize(nSize); }
@@ -216,12 +334,31 @@ public:
virtual SmStructureNode & operator = ( const SmStructureNode &rNode );
virtual void GetAccessibleText( String &rText ) const;
+
+ void SetSubNode(size_t nIndex, SmNode* pNode)
+ {
+ size_t size = aSubNodes.size();
+ if (size <= nIndex)
+ {
+ //Resize subnodes array
+ aSubNodes.resize(nIndex + 1);
+ //Set new slots to NULL
+ for (size_t i = size; i < nIndex+1; i++)
+ aSubNodes[i] = NULL;
+ }
+ aSubNodes[nIndex] = pNode;
+ ClaimPaternity();
+ }
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Abstract base class for all visible node
+ *
+ * Nodes that doesn't derivate from this class doesn't draw anything, but their
+ * children.
+ */
class SmVisibleNode : public SmNode
{
protected:
@@ -231,7 +368,7 @@ protected:
public:
- virtual sal_Bool IsVisible() const;
+ virtual bool IsVisible() const;
virtual sal_uInt16 GetNumSubNodes() const;
using SmNode::GetSubNode;
virtual SmNode * GetSubNode(sal_uInt16 nIndex);
@@ -256,7 +393,10 @@ public:
////////////////////////////////////////////////////////////////////////////////
-
+/** Draws a rectangle
+ *
+ * Used for drawing the line in the OVER and OVERSTRIKE commands.
+ */
class SmRectangleNode : public SmGraphicNode
{
Size aToSize;
@@ -271,18 +411,17 @@ public:
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
-#ifdef SM_RECT_DEBUG
- using SmRect::Draw;
-#endif
- virtual void Draw(OutputDevice &rDev, const Point &rPosition) const;
-
void CreateTextFromNode(String &rText);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Polygon line node
+ *
+ * Used to draw the slash of the WIDESLASH command by SmBinDiagonalNode.
+ */
class SmPolyLineNode : public SmGraphicNode
{
Polygon aPoly;
@@ -293,26 +432,36 @@ public:
SmPolyLineNode(const SmToken &rNodeToken);
long GetWidth() const { return nWidth; }
+ Size GetToSize() const { return aToSize; }
+ Polygon &GetPolygon() { return aPoly; }
virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth);
virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
-#ifdef SM_RECT_DEBUG
- using SmRect::Draw;
-#endif
- virtual void Draw(OutputDevice &rDev, const Point &rPosition) const;
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Text node
+ *
+ * @remarks This class also serves as baseclass for all nodes that contains text.
+ */
class SmTextNode : public SmVisibleNode
{
XubString aText;
sal_uInt16 nFontDesc;
+ /** Index within text where the selection starts
+ * @remarks Only valid if SmNode::IsSelected() is true
+ */
+ xub_StrLen nSelectionStart;
+ /** Index within text where the selection ends
+ * @remarks Only valid if SmNode::IsSelected() is true
+ */
+ xub_StrLen nSelectionEnd;
protected:
SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 nFontDescP );
@@ -323,23 +472,47 @@ public:
sal_uInt16 GetFontDesc() const { return nFontDesc; }
void SetText(const XubString &rText) { aText = rText; }
const XubString & GetText() const { return aText; }
+ /** Change the text of this node, including the underlying token */
+ void ChangeText(const XubString &rText) {
+ aText = rText;
+ SmToken token = GetToken();
+ token.aText = rText;
+ SetToken(token); //TODO: Merge this with AdjustFontDesc for better performance
+ AdjustFontDesc();
+ }
+ /** Try to guess the correct FontDesc, used during visual editing */
+ void AdjustFontDesc();
+ /** Index within GetText() where the selection starts
+ * @remarks Only valid of SmNode::IsSelected() is true
+ */
+ xub_StrLen GetSelectionStart() const {return nSelectionStart;}
+ /** Index within GetText() where the selection end
+ * @remarks Only valid of SmNode::IsSelected() is true
+ */
+ xub_StrLen GetSelectionEnd() const {return nSelectionEnd;}
+ /** Set the index within GetText() where the selection starts */
+ void SetSelectionStart(xub_StrLen index) {nSelectionStart = index;}
+ /** Set the index within GetText() where the selection end */
+ void SetSelectionEnd(xub_StrLen index) {nSelectionEnd = index;}
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
virtual void CreateTextFromNode(String &rText);
-#ifdef SM_RECT_DEBUG
- using SmRect::Draw;
-#endif
- virtual void Draw(OutputDevice &rDev, const Point &rPosition) const;
-
virtual void GetAccessibleText( String &rText ) const;
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Special node for user defined characters
+ *
+ * Node used for pre- and user-defined characters from:
+ * officecfg/registry/data/org/openoffice/Office/Math.xcu
+ *
+ * This is just single characters, I think.
+ */
class SmSpecialNode : public SmTextNode
{
bool bIsFromGreekSymbolSet;
@@ -353,16 +526,21 @@ public:
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
-#ifdef SM_RECT_DEBUG
- using SmRect::Draw;
-#endif
- virtual void Draw(OutputDevice &rDev, const Point &rPosition) const;
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Glyph node for custom operators
+ *
+ * This node is used with commands: oper, uoper and boper.
+ * E.g. in "A boper op B", "op" will be an instance of SmGlyphSpecialNode.
+ * "boper" simply inteprets "op", the following token, as an binary operator.
+ * The command "uoper" interprets the following token as unary operator.
+ * For these commands an instance of SmGlyphSpecialNode is used for the
+ * operator token, following the command.
+ */
class SmGlyphSpecialNode : public SmSpecialNode
{
public:
@@ -371,12 +549,16 @@ public:
{}
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Math symbol node
+ *
+ * Use for math symbols such as plus, minus and integrale in the INT command.
+ */
class SmMathSymbolNode : public SmSpecialNode
{
protected:
@@ -397,12 +579,18 @@ public:
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
void CreateTextFromNode(String &rText);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Root symbol node
+ *
+ * Root symbol node used by SmRootNode to create the root symbol, infront of
+ * the line with the line above. I don't think this node should be used for
+ * anything else.
+ */
class SmRootSymbolNode : public SmMathSymbolNode
{
sal_uLong nBodyWidth; // width of body (argument) of root sign
@@ -412,19 +600,22 @@ public:
: SmMathSymbolNode(NROOTSYMBOL, rNodeToken)
{}
- virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth);
+ sal_uLong GetBodyWidth() const {return nBodyWidth;};
+ virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nHeight);
virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight);
-#ifdef SM_RECT_DEBUG
- using SmRect::Draw;
-#endif
- virtual void Draw(OutputDevice &rDev, const Point &rPosition) const;
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Place node
+ *
+ * Used to create the <?> command, that denotes place where something can be
+ * written.
+ * It is drawn as a square with a shadow.
+ */
class SmPlaceNode : public SmMathSymbolNode
{
public:
@@ -432,15 +623,21 @@ public:
: SmMathSymbolNode(NPLACE, rNodeToken)
{
}
+ SmPlaceNode() : SmMathSymbolNode(NPLACE, SmToken(TPLACE, MS_PLACE, "<?>")) {};
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Error node, for parsing errors
+ *
+ * This node is used for parsing errors and draws an questionmark turned upside
+ * down (inverted question mark).
+ */
class SmErrorNode : public SmMathSymbolNode
{
public:
@@ -452,17 +649,22 @@ public:
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Table node
+ *
+ * This is the root node for the formula tree. This node is also used for the
+ * STACK and BINOM commands. When used for root node, its
+ * children are instances of SmLineNode, and in some obscure cases the a child
+ * can be an instance of SmExpressionNode, mainly when errors occur.
+ */
class SmTableNode : public SmStructureNode
{
- // --> 4.7.2010 #i972#
long nFormulaBaseline;
- // <--
public:
SmTableNode(const SmToken &rNodeToken)
: SmStructureNode(NTABLE, rNodeToken)
@@ -473,41 +675,53 @@ public:
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
virtual long GetFormulaBaseline() const;
+
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** A line
+ *
+ * Used as child of SmTableNode when the SmTableNode is the root node of the
+ * formula tree.
+ */
class SmLineNode : public SmStructureNode
{
- sal_Bool bUseExtraSpaces;
+ bool bUseExtraSpaces;
protected:
SmLineNode(SmNodeType eNodeType, const SmToken &rNodeToken)
: SmStructureNode(eNodeType, rNodeToken)
{
- bUseExtraSpaces = sal_True;
+ bUseExtraSpaces = true;
}
public:
SmLineNode(const SmToken &rNodeToken)
: SmStructureNode(NLINE, rNodeToken)
{
- bUseExtraSpaces = sal_True;
+ bUseExtraSpaces = true;
}
- void SetUseExtraSpaces(sal_Bool bVal) { bUseExtraSpaces = bVal; }
- sal_Bool IsUseExtraSpaces() const { return bUseExtraSpaces; };
+ void SetUseExtraSpaces(bool bVal) { bUseExtraSpaces = bVal; }
+ bool IsUseExtraSpaces() const { return bUseExtraSpaces; };
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Expression node
+ *
+ * Used whenever you have an expression such as "A OVER {B + C}", here there is
+ * an expression node that allows "B + C" to be the denominator of the
+ * SmBinVerNode, that the OVER command creates.
+ */
class SmExpressionNode : public SmLineNode
{
public:
@@ -517,12 +731,16 @@ public:
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
void CreateTextFromNode(String &rText);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Unary horizontical node
+ *
+ * The same as SmBinHorNode except this is for unary operators.
+ */
class SmUnHorNode : public SmStructureNode
{
public:
@@ -533,12 +751,23 @@ public:
}
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Root node
+ *
+ * Used for create square roots and other roots, example:
+ * \f$ \sqrt[\mbox{[Argument]}]{\mbox{[Body]}} \f$.
+ *
+ * Children:<BR>
+ * 0: Argument (optional)<BR>
+ * 1: Symbol (instance of SmRootSymbolNode)<BR>
+ * 2: Body<BR>
+ * Where argument is optinal and may be NULL.
+ */
class SmRootNode : public SmStructureNode
{
protected:
@@ -555,12 +784,23 @@ public:
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
void CreateTextFromNode(String &rText);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Binary horizontial node
+ *
+ * This node is used for binary operators. In a formula such as "A + B".
+ *
+ * Children:<BR>
+ * 0: Left operand<BR>
+ * 1: Binary operator<BR>
+ * 2: Right operand<BR>
+ *
+ * None of the children may be NULL.
+ */
class SmBinHorNode : public SmStructureNode
{
public:
@@ -571,12 +811,24 @@ public:
}
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Binary horizontical node
+ *
+ * This node is used for creating the OVER command, consider the formula:
+ * "numerator OVER denominator", which looks like
+ * \f$ \frac{\mbox{numerator}}{\mbox{denominator}} \f$
+ *
+ * Children:<BR>
+ * 0: Numerator<BR>
+ * 1: Line (instance of SmRectangleNode)<BR>
+ * 2: Denominator<BR>
+ * None of the children may be NULL.
+ */
class SmBinVerNode : public SmStructureNode
{
public:
@@ -591,15 +843,25 @@ public:
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
void CreateTextFromNode(String &rText);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Binary diagonal node
+ *
+ * Used for implementing the WIDESLASH command, example: "A WIDESLASH B".
+ *
+ * Children:<BR>
+ * 0: Left operand<BR>
+ * 1: right operand<BR>
+ * 2: Line (instance of SmPolyLineNode).<BR>
+ * None of the children may be NULL.
+ */
class SmBinDiagonalNode : public SmStructureNode
{
- sal_Bool bAscending;
+ bool bAscending;
void GetOperPosSize(Point &rPos, Size &rSize,
const Point &rDiagPoint, double fAngleDeg) const;
@@ -607,71 +869,113 @@ class SmBinDiagonalNode : public SmStructureNode
public:
SmBinDiagonalNode(const SmToken &rNodeToken);
- sal_Bool IsAscending() const { return bAscending; }
- void SetAscending(sal_Bool bVal) { bAscending = bVal; }
+ bool IsAscending() const { return bAscending; }
+ void SetAscending(bool bVal) { bAscending = bVal; }
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-// enums used to index sub-/supscripts in the 'aSubNodes' array
-// in 'SmSubSupNode'
-// See graphic for positions at char:
-//
-// CSUP
-//
-// LSUP H H RSUP
-// H H
-// HHHH
-// H H
-// LSUB H H RSUB
-//
-// CSUB
-//
+/** Enum used to index sub-/supscripts in the 'aSubNodes' array
+ * in 'SmSubSupNode'
+ *
+ * See graphic for positions at char:
+ *
+ * \code
+ * CSUP
+ *
+ * LSUP H H RSUP
+ * H H
+ * HHHH
+ * H H
+ * LSUB H H RSUB
+ *
+ * CSUB
+ * \endcode
+ */
enum SmSubSup
{ CSUB, CSUP, RSUB, RSUP, LSUB, LSUP
};
-// numbers of entries in the above enum (that is: the number of possible
-// sub-/supscripts)
+/** numbers of entries in the above enum (that is: the number of possible
+ * sub-/supscripts)
+ */
#define SUBSUP_NUM_ENTRIES 6
-
+/** Super- and subscript node
+ *
+ * Used for creating super- and subscripts for commands such as:
+ * "^", "_", "lsup", "lsub", "csup" and "csub".
+ * Example: "A^2" which looks like: \f$ A^2 \f$
+ *
+ * This node is also used for creating limits on SmOperNode, when
+ * "FROM" and "TO" commands are used with "INT", "SUM" or similar.
+ *
+ * Children of this node can be enumerated using the SmSubSup enum.
+ * Please note that children may be NULL, except for the body.
+ * It is recommended that you access children using GetBody() and
+ * GetSubSup().
+ */
class SmSubSupNode : public SmStructureNode
{
- sal_Bool bUseLimits;
+ bool bUseLimits;
public:
SmSubSupNode(const SmToken &rNodeToken)
: SmStructureNode(NSUBSUP, rNodeToken)
{
SetNumSubNodes(1 + SUBSUP_NUM_ENTRIES);
- bUseLimits = sal_False;
+ bUseLimits = false;
}
+ /** Get body (Not NULL) */
SmNode * GetBody() { return GetSubNode(0); }
+ /** Get body (Not NULL) */
const SmNode * GetBody() const
{
return ((SmSubSupNode *) this)->GetBody();
}
- void SetUseLimits(sal_Bool bVal) { bUseLimits = bVal; }
- sal_Bool IsUseLimits() const { return bUseLimits; };
+ void SetUseLimits(bool bVal) { bUseLimits = bVal; }
+ bool IsUseLimits() const { return bUseLimits; };
+ /** Get super- or subscript
+ * @remarks this method may return NULL.
+ */
SmNode * GetSubSup(SmSubSup eSubSup) { return GetSubNode( sal::static_int_cast< sal_uInt16 >(1 + eSubSup) ); };
+ /** Set the body */
+ void SetBody(SmNode* pBody) { SetSubNode(0, pBody); }
+ void SetSubSup(SmSubSup eSubSup, SmNode* pScript) { SetSubNode( 1 + eSubSup, pScript); }
+
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
void CreateTextFromNode(String &rText);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Node for brace construction
+ *
+ * Used for "lbrace [body] rbrace" and similar constructions.
+ * Should look like \f$ \{\mbox{[body]}\} \f$
+ *
+ * Children:<BR>
+ * 0: Opening brace<BR>
+ * 1: Body (usually SmBracebodyNode)<BR>
+ * 2: Closing brace<BR>
+ * None of the children can be NULL.
+ *
+ * Note that child 1 (Body) is usually SmBracebodyNode, I don't know if it can
+ * be an SmExpressionNode, haven't seen the case. But didn't quite read parser.cxx
+ * enought to exclude this possibility.
+ */
class SmBraceNode : public SmStructureNode
{
public:
@@ -683,12 +987,21 @@ public:
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
void CreateTextFromNode(String &rText);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Body of an SmBraceNode
+ *
+ * This usually only has one child an SmExpressionNode, however, it can also
+ * have other children.
+ * Consider the formula "lbrace [body1] mline [body2] rbrace", looks like:
+ * \f$ \{\mbox{[body1] | [body2]}\} \f$.
+ * In this case SmBracebodyNode will have three children, "[body1]", "|" and
+ * [body2].
+ */
class SmBracebodyNode : public SmStructureNode
{
long nBodyHeight;
@@ -698,6 +1011,7 @@ public:
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
long GetBodyHeight() const { return nBodyHeight; }
+ void Accept(SmVisitor* pVisitor);
};
@@ -710,13 +1024,25 @@ inline SmBracebodyNode::SmBracebodyNode(const SmToken &rNodeToken) :
////////////////////////////////////////////////////////////////////////////////
-
+/** Node for vertical brace construction
+ *
+ * Used to implement commands "[body] underbrace [script]" and
+ * "[body] overbrace [script]".
+ * Underbrace should look like this \f$ \underbrace{\mbox{body}}_{\mbox{script}}\f$.
+ *
+ * Children:<BR>
+ * 0: body<BR>
+ * 1: brace<BR>
+ * 2: script<BR>
+ * (None of these children are optional, e.g. they must all be not NULL).
+ */
class SmVerticalBraceNode : public SmStructureNode
{
public:
inline SmVerticalBraceNode(const SmToken &rNodeToken);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ void Accept(SmVisitor* pVisitor);
};
@@ -730,6 +1056,18 @@ inline SmVerticalBraceNode::SmVerticalBraceNode(const SmToken &rNodeToken) :
////////////////////////////////////////////////////////////////////////////////
+/** Operation Node
+ *
+ * Used for commands like SUM, INT and similar.
+ *
+ * Children:<BR>
+ * 0: Operation (instance of SmMathSymbolNode)<BR>
+ * 1: Body<BR>
+ * None of the children may be NULL.
+ *
+ * If there are boundaries on the operation the body will an instance of
+ * SmSubSupNode.
+ */
class SmOperNode : public SmStructureNode
{
public:
@@ -748,12 +1086,14 @@ public:
long CalcSymbolHeight(const SmNode &rSymbol, const SmFormat &rFormat) const;
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Node used for alignment
+ */
class SmAlignNode : public SmStructureNode
{
public:
@@ -762,12 +1102,22 @@ public:
{}
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Attribute node
+ *
+ * Used to give an attribute to another node. Used for commands such as:
+ * UNDERLINE, OVERLINE, OVERSTRIKE, WIDEVEC, WIDEHAT and WIDETILDE.
+ *
+ * Children:<BR>
+ * 0: Attribute<BR>
+ * 1: Body<BR>
+ * None of these may be NULL.
+ */
class SmAttributNode : public SmStructureNode
{
public:
@@ -777,12 +1127,16 @@ public:
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
void CreateTextFromNode(String &rText);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Font node
+ *
+ * Used to change the font of it's children.
+ */
class SmFontNode : public SmStructureNode
{
sal_uInt16 nSizeType;
@@ -803,12 +1157,17 @@ public:
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
void CreateTextFromNode(String &rText);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Matrix node
+ *
+ * Used to implement the MATRIX command, example:
+ * "matrix{ 1 # 2 ## 3 # 4}".
+ */
class SmMatrixNode : public SmStructureNode
{
sal_uInt16 nNumRows,
@@ -830,12 +1189,16 @@ public:
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
void CreateTextFromNode(String &rText);
+ void Accept(SmVisitor* pVisitor);
};
////////////////////////////////////////////////////////////////////////////////
-
+/** Node for whitespace
+ *
+ * Used to implement the "~" command. This node is just a blank space.
+ */
class SmBlankNode : public SmGraphicNode
{
sal_uInt16 nNum;
@@ -849,9 +1212,12 @@ public:
void IncreaseBy(const SmToken &rToken);
void Clear() { nNum = 0; }
+ sal_uInt16 GetBlankNum() const { return nNum; }
+ void SetBlankNum(sal_uInt16 nNumber) { nNum = nNumber; }
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ void Accept(SmVisitor* pVisitor);
};
@@ -860,3 +1226,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index 04c226291538..cc17e951df28 100755
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,6 @@
#include <vcl/svapp.hxx>
#include <tools/stack.hxx>
-#include <tools/list.hxx>
#include <tools/string.hxx>
#include <set>
@@ -39,6 +39,8 @@
#include "types.hxx"
+#include <vector>
+
class SmNode;
class SmDocShell;
@@ -121,7 +123,7 @@ struct SmToken
String aText; // token text
SmTokenType eType; // token info
- sal_Unicode cMathChar;
+ sal_Unicode cMathChar;
// parse-help info
sal_uLong nGroup;
@@ -132,6 +134,11 @@ struct SmToken
xub_StrLen nCol;
SmToken();
+ SmToken(SmTokenType eTokenType,
+ sal_Unicode cMath,
+ const sal_Char* pText,
+ sal_uLong nTokenGroup = 0,
+ sal_uInt16 nTokenLevel = 0);
};
@@ -160,7 +167,7 @@ struct SmErrorDesc
DECLARE_STACK(SmNodeStack, SmNode *)
-DECLARE_LIST(SmErrDescList, SmErrorDesc *)
+typedef ::std::vector< SmErrorDesc* > SmErrDescList;
/**************************************************************************/
@@ -174,6 +181,14 @@ enum SmConvert
CONVERT_60_TO_50
};
+struct SmTokenTableEntry
+{
+ const sal_Char* pIdent;
+ SmTokenType eType;
+ sal_Unicode cMathChar;
+ sal_uLong nGroup;
+ sal_uInt16 nLevel;
+};
class SmParser
{
@@ -188,7 +203,7 @@ class SmParser
sal_uInt16 m_Row,
m_nColOff;
SmConvert m_eConversion;
- sal_Bool m_bImportSymNames,
+ bool bImportSymNames,
m_bExportSymNames;
// map of used symbols (used to reduce file size by exporting only actually used symbols)
@@ -200,14 +215,14 @@ class SmParser
protected:
#if OSL_DEBUG_LEVEL
- sal_Bool IsDelimiter( const String &rTxt, xub_StrLen nPos );
+ bool IsDelimiter( const String &rTxt, xub_StrLen nPos );
#endif
void NextToken();
xub_StrLen GetTokenIndex() const { return m_nTokenIndex; }
void Insert(const String &rText, sal_uInt16 nPos);
void Replace( sal_uInt16 nPos, sal_uInt16 nLen, const String &rText );
- inline sal_Bool TokenInGroup(sal_uLong nGroup);
+ inline bool TokenInGroup( sal_uLong nGroup );
// grammar
void Table();
@@ -232,7 +247,7 @@ protected:
void FontSize();
void Color();
void Brace();
- void Bracebody(sal_Bool bIsLeftRight);
+ void Bracebody(bool bIsLeftRight);
void Function();
void Binom();
void Stack();
@@ -252,34 +267,37 @@ protected:
public:
SmParser();
+ /** Parse rBuffer to formula tree */
SmNode *Parse(const String &rBuffer);
+ /** Parse rBuffer to formula subtree that constitutes an expression */
+ SmNode *ParseExpression(const String &rBuffer);
const String & GetText() const { return m_aBufferString; };
- SmConvert GetConversion() const { return m_eConversion; }
- void SetConversion(SmConvert eConv) { m_eConversion = eConv; }
-
- sal_Bool IsImportSymbolNames() const { return m_bImportSymNames; }
- void SetImportSymbolNames(sal_Bool bVal) { m_bImportSymNames = bVal; }
- sal_Bool IsExportSymbolNames() const { return m_bExportSymNames; }
- void SetExportSymbolNames(sal_Bool bVal) { m_bExportSymNames = bVal; }
-
- sal_uInt16 AddError(SmParseError Type, SmNode *pNode);
+ SmConvert GetConversion() const { return m_eConversion; }
+ void SetConversion(SmConvert eConv) { m_eConversion = eConv; }
- const SmErrorDesc * NextError();
- const SmErrorDesc * PrevError();
- const SmErrorDesc * GetError(sal_uInt16 i = 0xFFFF);
+ bool IsImportSymbolNames() const { return bImportSymNames; }
+ void SetImportSymbolNames(bool bVal) { bImportSymNames = bVal; }
+ bool IsExportSymbolNames() const { return m_bExportSymNames; }
+ void SetExportSymbolNames(bool bVal) { m_bExportSymNames = bVal; }
+ size_t AddError(SmParseError Type, SmNode *pNode);
+ const SmErrorDesc* NextError();
+ const SmErrorDesc* PrevError();
+ const SmErrorDesc* GetError(size_t i = size_t(-1) );
+ static const SmTokenTableEntry* GetTokenTableEntry( const String &rName );
bool IsUsedSymbol( const String &rSymbolName ) const { return m_aUsedSymbols.find( rSymbolName ) != m_aUsedSymbols.end(); }
std::set< rtl::OUString > GetUsedSymbols() const { return m_aUsedSymbols; }
};
-inline sal_Bool SmParser::TokenInGroup(sal_uLong nGroup)
+inline bool SmParser::TokenInGroup( sal_uLong nGroup)
{
- return (m_aCurToken.nGroup & nGroup) ? sal_True : sal_False;
+ return (m_aCurToken.nGroup & nGroup) ? true : false;
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/pch/precompiled_starmath.cxx b/starmath/inc/pch/precompiled_starmath.cxx
index e47f70d5909d..c25af02d9f18 100644
--- a/starmath/inc/pch/precompiled_starmath.cxx
+++ b/starmath/inc/pch/precompiled_starmath.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,3 +28,4 @@
#include "precompiled_starmath.hxx"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/pch/precompiled_starmath.hxx b/starmath/inc/pch/precompiled_starmath.hxx
index 51f5fa1fed8c..7d2363e50a94 100644
--- a/starmath/inc/pch/precompiled_starmath.hxx
+++ b/starmath/inc/pch/precompiled_starmath.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,3 +31,4 @@
#ifdef PRECOMPILED_HEADERS
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index a92500c2f667..e486b1f7c7d5 100644
--- a/starmath/inc/rect.hxx
+++ b/starmath/inc/rect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,6 @@
#include <new>
-
#include <tools/gen.hxx>
#include <vcl/outdev.hxx>
#include <vcl/metric.hxx>
@@ -39,10 +39,10 @@
#include "format.hxx"
-sal_Bool SmGetGlyphBoundRect(const OutputDevice &rDev,
+bool SmGetGlyphBoundRect(const OutputDevice &rDev,
const XubString &rText, Rectangle &rRect);
-sal_Bool SmIsMathAlpha(const XubString &rText);
+bool SmIsMathAlpha(const XubString &rText);
inline long SmFromTo(long nFrom, long nTo, double fRelDist)
@@ -105,7 +105,7 @@ class SmRect
nLoAttrFence,
nHiAttrFence;
sal_uInt16 nBorderWidth;
- sal_Bool bHasBaseline,
+ bool bHasBaseline,
bHasAlignInfo;
protected:
@@ -114,7 +114,7 @@ protected:
void Init(const OutputDevice &rDev, const SmFormat *pFormat,
const XubString &rText, sal_uInt16 nBorderWidth);
- void ClearBaseline() { bHasBaseline = sal_False; };
+ void ClearBaseline() { bHasBaseline = false; };
inline void CopyMBL(const SmRect& rRect);
void CopyAlignInfo(const SmRect& rRect);
@@ -164,7 +164,7 @@ public:
long GetItalicRight() const { return GetRight() + GetItalicRightSpace(); }
long GetItalicWidth() const { return GetWidth() + GetItalicLeftSpace() + GetItalicRightSpace(); }
- sal_Bool HasBaseline() const { return bHasBaseline; }
+ bool HasBaseline() const { return bHasBaseline; }
inline long GetBaseline() const;
long GetBaselineOffset() const { return GetBaseline() - GetTop(); }
@@ -187,12 +187,12 @@ public:
void Move (const Point &rPosition);
void MoveTo(const Point &rPosition) { Move(rPosition - GetTopLeft()); }
- sal_Bool IsEmpty() const
+ bool IsEmpty() const
{
return GetWidth() == 0 || GetHeight() == 0;
}
- sal_Bool HasAlignInfo() const { return bHasAlignInfo; }
+ bool HasAlignInfo() const { return bHasAlignInfo; }
const Point AlignTo(const SmRect &rRect, RectPos ePos,
RectHorAlign eHor, RectVerAlign eVer) const;
@@ -201,20 +201,16 @@ public:
SmRect & ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
long nNewAlignM);
SmRect & ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
- sal_Bool bKeepVerAlignParams);
+ bool bKeepVerAlignParams);
long OrientedDist(const Point &rPoint) const;
- sal_Bool IsInsideRect(const Point &rPoint) const;
- sal_Bool IsInsideItalicRect(const Point &rPoint) const;
+ bool IsInsideRect(const Point &rPoint) const;
+ bool IsInsideItalicRect(const Point &rPoint) const;
inline SmRect & operator = (const SmRect &rRect);
inline Rectangle AsRectangle() const;
SmRect AsGlyphRect() const;
-
-#ifdef SM_RECT_DEBUG
- void Draw(OutputDevice &rDev, const Point &rPosition, int nFlags) const;
-#endif
};
@@ -255,6 +251,6 @@ inline Rectangle SmRect::AsRectangle() const
return Rectangle(Point(GetItalicLeft(), GetTop()), GetItalicSize());
}
-
-
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/smdll.hxx b/starmath/inc/smdll.hxx
index 6634badc2f94..3894c67e144d 100644
--- a/starmath/inc/smdll.hxx
+++ b/starmath/inc/smdll.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,7 +38,7 @@ class SfxFilter;
class SmDLL
{
- static sal_Bool bInitialized;
+ static bool bInitialized;
public:
static void Init();
static void Exit();
@@ -48,3 +49,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx
index a41bcc20f909..a75aee02c0a5 100644
--- a/starmath/inc/smmod.hxx
+++ b/starmath/inc/smmod.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,14 @@
#ifndef _SMMOD_HXX
#define _SMMOD_HXX
-#ifndef _SV_RESARY_HXX
#include <tools/resary.hxx>
-#endif
#include <svl/lstner.hxx>
#include <svtools/colorcfg.hxx>
#include <tools/shl.hxx>
#include <sfx2/module.hxx>
-#ifndef _STARMATH_HRC
#include "starmath.hrc"
-#endif
#include <unotools/options.hxx>
@@ -168,7 +165,7 @@ public:
return *pVirtualDev;
}
- //virtuelle Methoden fuer den Optionendialog
+ //virtual methods for options dialog
virtual SfxItemSet* CreateItemSet( sal_uInt16 nId );
virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet );
virtual SfxTabPage* CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet );
@@ -178,3 +175,4 @@ public:
#endif // _SDMOD_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index 7acefec94808..f7aa0f21f03f 100755
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -53,13 +53,15 @@
#define SID_ALIGN (SID_SMA_START + 53)
#define SID_AUTO_REDRAW (SID_SMA_START + 55)
-#define SID_SYMBOLS (SID_SMA_START + 56) // Muss erstmal wieder aufgenommen werden !
+#define SID_SYMBOLS (SID_SMA_START + 56) // Has to be picked up again for now!
#define SID_TEXTMODE (SID_SMA_START + 57)
#define SID_IMPORT_FORMULA (SID_SMA_START + 58)
#define SID_TEXT (SID_SMA_START + 100)
#define SID_GAPHIC_SM (SID_SMA_START + 101)
#define SID_FITINWINDOW (SID_SMA_START + 103)
-#define SID_INSERTTEXT (SID_SMA_START + 104)
+/** Command for inserting a symbol specified by a string (Inserts an SmSpecialNode) */
+#define SID_INSERTSYMBOL (SID_SMA_START + 104)
+/** Command for inserting a math construction specified in commands.src */
#define SID_INSERTCOMMAND (SID_SMA_START + 105)
#define SID_LOADSYMBOLS (SID_SMA_START + 107)
@@ -158,27 +160,16 @@
#define RID_ERR_OVERFLOW (RID_APP_START + 937)
// toolbox image lists for 'Selection' window
-//!! RID_ILH_XYZ = RID_IL_XYZ + 1 !!
#define RID_IL_CATALOG (RID_APP_START + 950)
-#define RID_ILH_CATALOG (RID_APP_START + 951)
#define RID_IL_UNBINOPS (RID_APP_START + 952)
-#define RID_ILH_UNBINOPS (RID_APP_START + 953)
#define RID_IL_RELATIONS (RID_APP_START + 954)
-#define RID_ILH_RELATIONS (RID_APP_START + 955)
#define RID_IL_SETOPERATIONS (RID_APP_START + 956)
-#define RID_ILH_SETOPERATIONS (RID_APP_START + 957)
#define RID_IL_FUNCTIONS (RID_APP_START + 958)
-#define RID_ILH_FUNCTIONS (RID_APP_START + 959)
#define RID_IL_OPERATORS (RID_APP_START + 960)
-#define RID_ILH_OPERATORS (RID_APP_START + 961)
#define RID_IL_ATTRIBUTES (RID_APP_START + 962)
-#define RID_ILH_ATTRIBUTES (RID_APP_START + 963)
#define RID_IL_BRACKETS (RID_APP_START + 964)
-#define RID_ILH_BRACKETS (RID_APP_START + 965)
#define RID_IL_FORMAT (RID_APP_START + 966)
-#define RID_ILH_FORMAT (RID_APP_START + 967)
#define RID_IL_MISC (RID_APP_START + 968)
-#define RID_ILH_MISC (RID_APP_START + 969)
#define RID_UNBINOPS_CAT (RID_APP_START + 1101)
#define RID_RELATIONS_CAT (RID_APP_START + 1102)
@@ -464,8 +455,8 @@
#define MN_SUB_SPELLING 34
#define MN_SUB_TEMPLATES 35
-// 342 == SCH_IF_SMAVIEWSHELL, da SFX_INTERFACE_LIB kein
-// Define sondern neuerdings ein Enum ist
+// 342 == SCH_IF_SMAVIEWSHELL, because SFX_INTERFACE_LIB is no
+// Define but latterly an Enum
#define HID_SMA_VIEWSHELL_DOCUMENT (342)
#endif
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index 9d142f1c12b9..aa6264989bcd 100644
--- a/starmath/inc/symbol.hxx
+++ b/starmath/inc/symbol.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,12 +25,11 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
#ifndef SYMBOL_HXX
#define SYMBOL_HXX
-#include <vos/refernce.hxx>
#include <vcl/font.hxx>
-#include <tools/list.hxx>
#include <tools/debug.hxx>
#include <tools/dynary.hxx>
#include <svl/lstner.hxx>
@@ -46,7 +46,7 @@
#include "smmod.hxx"
-#define SYMBOLSET_NONE 0xFFFF
+#define SYMBOLSET_NONE 0xFFFF
#define SYMBOL_NONE 0xFFFF
@@ -78,18 +78,19 @@ inline const String GetUiSymbolSetName( const String &rExportSymbolSetName )
class SmSym
{
+private:
SmFace m_aFace;
String m_aName;
String m_aExportName;
String m_aSetName;
sal_UCS4 m_cChar;
- sal_Bool m_bPredefined;
- sal_Bool m_bDocSymbol;
+ bool m_bPredefined;
+ bool m_bDocSymbol;
public:
SmSym();
SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar,
- const String& rSet, sal_Bool bIsPredefined = sal_False);
+ const String& rSet, bool bIsPredefined = false);
SmSym(const SmSym& rSymbol);
SmSym& operator = (const SmSym& rSymbol);
@@ -105,14 +106,14 @@ public:
//! because ten the key would not be the same as its supposed copy here
// void SetName( const String &rTxt ) { m_aName = rTxt; }
- sal_Bool IsPredefined() const { return m_bPredefined; }
+ bool IsPredefined() const { return m_bPredefined; }
const String & GetSymbolSetName() const { return m_aSetName; }
void SetSymbolSetName( const String &rName ) { m_aSetName = rName; }
const String & GetExportName() const { return m_aExportName; }
void SetExportName( const String &rName ) { m_aExportName = rName; }
- sal_Bool IsDocSymbol() const { return m_bDocSymbol; }
- void SetDocSymbol( sal_Bool bVal ) { m_bDocSymbol = bVal; }
+ bool IsDocSymbol() const { return m_bDocSymbol; }
+ void SetDocSymbol( bool bVal ) { m_bDocSymbol = bVal; }
// true if rSymbol has the same name, font and character
bool IsEqualInUI( const SmSym& rSymbol ) const;
@@ -138,7 +139,7 @@ typedef std::vector< const SmSym * > SymbolPtrVec_t;
struct lt_SmSymPtr : public std::binary_function< const SmSym *, const SmSym *, bool >
{
- bool operator() ( const SmSym *pSym1, const SmSym *pSym2 )
+ bool operator() ( const SmSym *pSym1, const SmSym *pSym2 ) const
{
return pSym1->GetCharacter() < pSym2->GetCharacter();
}
@@ -147,6 +148,7 @@ struct lt_SmSymPtr : public std::binary_function< const SmSym *, const SmSym *,
class SmSymbolManager : public SfxListener
{
+private:
SymbolMap_t m_aSymbols;
bool m_bModified;
@@ -187,3 +189,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/toolbox.hxx b/starmath/inc/toolbox.hxx
index 6ea7bd1a860f..4242867f3130 100644
--- a/starmath/inc/toolbox.hxx
+++ b/starmath/inc/toolbox.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,6 +25,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
#ifndef TOOLBOX_HXX
#define TOOLBOX_HXX
@@ -44,7 +46,6 @@ protected:
ToolBox *pToolBoxCmd;
ToolBox *vToolBoxCategories[NUM_TBX_CATEGORIES];
ImageList *aImageLists [NUM_TBX_CATEGORIES + 1]; /* regular */
- ImageList *aImageListsH[NUM_TBX_CATEGORIES + 1]; /* high contrast */
sal_uInt16 nActiveCategoryRID;
virtual sal_Bool Close();
@@ -56,7 +57,7 @@ protected:
DECL_LINK( CmdSelectHdl, ToolBox* );
SmViewShell * GetView();
- const ImageList * GetImageList( sal_uInt16 nResId, sal_Bool bHighContrast );
+ const ImageList * GetImageList( sal_uInt16 nResId );
public:
SmToolBoxWindow(SfxBindings *pBindings,
@@ -68,7 +69,7 @@ public:
virtual void StateChanged( StateChangedType nStateChange );
virtual void DataChanged( const DataChangedEvent &rEvt );
- void AdjustPosSize( sal_Bool bSetPos );
+ void AdjustPosSize( bool bSetPos );
void SetCategory(sal_uInt16 nCategory);
};
@@ -85,3 +86,4 @@ protected:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/types.hxx b/starmath/inc/types.hxx
index 2ad899f37cc7..818b114f2de6 100644
--- a/starmath/inc/types.hxx
+++ b/starmath/inc/types.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,6 +25,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
#ifndef TYPES_HXX
#define TYPES_HXX
@@ -196,9 +198,11 @@ enum MathSymbol
MS_SETZ = (sal_Unicode) 0x2124,
MS_SETQ = (sal_Unicode) 0x211A,
MS_SETR = (sal_Unicode) 0x211D,
- MS_SETC = (sal_Unicode) 0x2102
-};
+ MS_SETC = (sal_Unicode) 0x2102,
+ MS_PERCENT = (sal_Unicode) 0x0025
+};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx
index c5377a48cf6b..693ea3bc9b2e 100644
--- a/starmath/inc/unomodel.hxx
+++ b/starmath/inc/unomodel.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107,3 +108,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx
index 3c2f8b1f61c8..a4e70e1b648d 100644
--- a/starmath/inc/utility.hxx
+++ b/starmath/inc/utility.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#define UTILITY_HXX
#include <sfx2/minarray.hxx>
-#ifndef _FONT_HXX //autogen
#include <vcl/font.hxx>
-#endif
#include <vcl/fixed.hxx>
#include <vcl/combobox.hxx>
#include <vcl/lstbox.hxx>
@@ -93,8 +92,8 @@ SmViewShell * SmGetActiveView();
// SmFace
//
-sal_Bool IsItalic( const Font &rFont );
-sal_Bool IsBold( const Font &rFont );
+bool IsItalic( const Font &rFont );
+bool IsBold( const Font &rFont );
class SmFace : public Font
{
@@ -130,29 +129,6 @@ public:
SmFace & operator *= (SmFace &rFace, const Fraction &rFrac);
-#ifdef NEVER
-////////////////////////////////////////////////////////////
-//
-// SmInfoText
-//
-
-class SmInfoText : public FixedText
-{
-protected:
- sal_uInt16 nMaxLen;
- String aText;
-
-public:
- SmInfoText(Window* pParent, WinBits nWinStyle = 0, sal_uInt16 nMax = 128);
- SmInfoText(Window* pParent, const ResId& rResId, sal_uInt16 nMax = 128);
-
- void SetText(const String& rStr);
-
- XubString GetText() const { return (aText); }
-};
-#endif
-
-
////////////////////////////////////////////////////////////
//
// SmPickList
@@ -167,7 +143,7 @@ protected:
virtual void *CreateItem(const void *pItem) = 0;
virtual void DestroyItem(void *pItem) = 0;
- virtual sal_Bool CompareItem(const void *pFirstItem, const void *pSecondItem) const = 0;
+ virtual bool CompareItem(const void *pFirstItem, const void *pSecondItem) const = 0;
virtual String GetStringItem(void *pItem) = 0;
@@ -201,63 +177,6 @@ public:
////////////////////////////////////////////////////////////
//
-// SmStringPickList
-//
-#ifdef NEVER
-class SmStringPickList : public SmPickList
-{
-protected:
- virtual void *CreateItem(const String& rString);
- virtual void *CreateItem(const void *pItem);
- virtual void DestroyItem(void *pItem);
-
- virtual sal_Bool CompareItem(const void *pFirstItem, const void *pSecondItem) const;
-
- virtual String GetStringItem(void *pItem);
-
-public:
- SmStringPickList()
- : SmPickList(0, 5) {}
- SmStringPickList(sal_uInt16 nInitSize, sal_uInt16 nMaxSize)
- : SmPickList(nInitSize, nMaxSize) {}
- SmStringPickList(const SmPickList& rOrig )
- : SmPickList(rOrig) {}
- virtual ~SmStringPickList() { Clear(); }
-
- virtual void Insert(const String &rString);
- virtual void Update(const String &rString, const String &rNewString);
- virtual void Remove(const String &rString);
-
- inline sal_Bool Contains(const String &rString) const;
- inline String Get(sal_uInt16 nPos = 0) const;
-
- inline SmStringPickList& operator = (const SmStringPickList& rList);
- inline String operator [] (sal_uInt16 nPos) const;
-};
-
-inline SmStringPickList& SmStringPickList::operator = (const SmStringPickList& rList)
-{
- *(SmPickList *)this = *(SmPickList *)&rList; return *this;
-}
-
-inline String SmStringPickList::operator [] (sal_uInt16 nPos) const
-{
- return *((String *)SmPickList::operator[](nPos));
-}
-
-inline String SmStringPickList::Get(sal_uInt16 nPos) const
-{
- return nPos < Count() ? *((String *)SmPickList::Get(nPos)) : String();
-}
-
-inline sal_Bool SmStringPickList::Contains(const String &rString) const
-{
- return SmPickList::Contains((void *)&rString);
-}
-#endif
-
-////////////////////////////////////////////////////////////
-//
// SmFontPickList
//
@@ -270,7 +189,7 @@ protected:
virtual void *CreateItem(const void *pItem);
virtual void DestroyItem(void *pItem);
- virtual sal_Bool CompareItem(const void *pFirstItem, const void *pSecondItem) const;
+ virtual bool CompareItem(const void *pFirstItem, const void *pSecondItem) const;
virtual String GetStringItem(void *pItem);
@@ -291,7 +210,7 @@ public:
virtual void Remove(const Font &rFont);
using SmPickList::Contains;
- inline sal_Bool Contains(const Font &rFont) const;
+ inline bool Contains(const Font &rFont) const;
inline Font Get(sal_uInt16 nPos = 0) const;
inline SmFontPickList& operator = (const SmFontPickList& rList);
@@ -317,7 +236,7 @@ inline Font SmFontPickList::Get(sal_uInt16 nPos) const
return nPos < Count() ? *((Font *)SmPickList::Get(nPos)) : Font();
}
-inline sal_Bool SmFontPickList::Contains(const Font &rFont) const
+inline bool SmFontPickList::Contains(const Font &rFont) const
{
return SmPickList::Contains((void *)&rFont);
}
@@ -325,32 +244,6 @@ inline sal_Bool SmFontPickList::Contains(const Font &rFont) const
////////////////////////////////////////////////////////////
//
-// SmStringPickComboBox
-//
-#ifdef NEVER
-class SmStringPickComboBox : public SmStringPickList, public ComboBox
-{
-protected:
- virtual void LoseFocus();
-
- DECL_LINK(SelectHdl, ComboBox *);
-
-public:
- SmStringPickComboBox(Window* pParent, WinBits nWinStyle = 0, sal_uInt16 nMax = 4);
- SmStringPickComboBox(Window* pParent, const ResId& rResId, sal_uInt16 nMax = 4);
-
- SmStringPickComboBox& operator = (const SmStringPickList& rList);
-
- void SetText(const String& rStr);
-
- virtual void Insert(const String &rString);
- virtual void Update(const String &rString, const String &rNewString);
- virtual void Remove(const String &rString);
-};
-#endif
-
-////////////////////////////////////////////////////////////
-//
// SmFontPickListBox
//
@@ -374,3 +267,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index ae3c14d84e5c..d1d9e7e99b1d 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,10 +35,10 @@
#include <sfx2/shell.hxx>
#include <sfx2/viewfac.hxx>
#include <sfx2/viewfrm.hxx>
+#include <vcl/timer.hxx>
#include <svtools/colorcfg.hxx>
#include "edit.hxx"
#include "node.hxx"
-#include "accessibility.hxx"
class Menu;
class DataChangedEvent;
@@ -45,14 +46,33 @@ class SmClipboardChangeListener;
class SmDocShell;
class SmViewShell;
class SmPrintUIOptions;
+class SmGraphicAccessible;
/**************************************************************************/
class SmGraphicWindow : public ScrollableWindow
{
- Point aFormulaDrawPos;
- Rectangle aCursorRect;
+ Point aFormulaDrawPos;
+ // old style editing pieces
+ Rectangle aCursorRect;
+ bool bIsCursorVisible;
+ bool bIsLineVisible;
+ AutoTimer aCaretBlinkTimer;
+public:
+ bool IsCursorVisible() const { return bIsCursorVisible; }
+ void ShowCursor(bool bShow);
+ bool IsLineVisible() const { return bIsLineVisible; }
+ void ShowLine(bool bShow);
+ const SmNode * SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol);
+protected:
+ void SetIsCursorVisible(bool bVis) { bIsCursorVisible = bVis; }
+ using Window::SetCursor;
+ void SetCursor(const SmNode *pNode);
+ void SetCursor(const Rectangle &rRect);
+ bool IsInlineEditEnabled() const;
+
+private:
::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible > xAccessible;
SmGraphicAccessible * pAccessible;
@@ -60,14 +80,9 @@ class SmGraphicWindow : public ScrollableWindow
SmViewShell *pViewShell;
sal_uInt16 nZoom;
short nModifyCount;
- sal_Bool bIsCursorVisible;
protected:
void SetFormulaDrawPos(const Point &rPos) { aFormulaDrawPos = rPos; }
- void SetIsCursorVisible(sal_Bool bVis) { bIsCursorVisible = bVis; }
- using Window::SetCursor;
- void SetCursor(const SmNode *pNode);
- void SetCursor(const Rectangle &rRect);
virtual void DataChanged( const DataChangedEvent& );
virtual void Paint(const Rectangle&);
@@ -76,6 +91,12 @@ protected:
virtual void StateChanged( StateChangedType eChanged );
DECL_LINK(MenuSelectHdl, Menu *);
+private:
+ void RepaintViewShellDoc();
+ DECL_LINK(CaretBlinkTimerHdl, AutoTimer *);
+ void CaretBlinkInit();
+ void CaretBlinkStart();
+ void CaretBlinkStop();
public:
SmGraphicWindow(SmViewShell* pShell);
~SmGraphicWindow();
@@ -98,10 +119,6 @@ public:
using ScrollableWindow::SetTotalSize;
void SetTotalSize();
- sal_Bool IsCursorVisible() const { return bIsCursorVisible; }
- void ShowCursor(sal_Bool bShow);
- const SmNode * SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol);
-
void ApplyColorConfigValues( const svtools::ColorConfig &rColorCfg );
// for Accessibility
@@ -148,7 +165,7 @@ class SmCmdBoxWindow : public SfxDockingWindow
{
SmEditWindow aEdit;
SmEditController aController;
- sal_Bool bExiting;
+ bool bExiting;
Timer aInitialFocusTimer;
@@ -224,11 +241,16 @@ class SmViewShell: public SfxViewShell
::com::sun::star::lang:: XEventListener > xClipEvtLstnr;
SmClipboardChangeListener* pClipEvtLstnr;
SmViewShell_Impl* pImpl;
- sal_Bool bPasteState;
+ bool bPasteState;
DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+ /** Used to determine whether insertions using SID_INSERTSYMBOL and SID_INSERTCOMMAND
+ * should be inserted into SmEditWindow or directly into the SmDocShell as done if the
+ * visual editor was last to have focus.
+ */
+ bool bInsertIntoEditWindow;
protected:
Size GetTextLineSize(OutputDevice& rDevice,
@@ -249,8 +271,8 @@ protected:
virtual sal_uInt16 SetPrinter(SfxPrinter *pNewPrinter,
sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false);
- sal_Bool Insert( SfxMedium& rMedium );
- sal_Bool InsertFrom(SfxMedium &rMedium);
+ bool Insert( SfxMedium& rMedium );
+ bool InsertFrom(SfxMedium &rMedium);
virtual SfxTabPage *CreatePrintOptionsPage(Window *pParent,
const SfxItemSet &rOptions);
@@ -292,7 +314,19 @@ public:
void Impl_Print( OutputDevice &rOutDev, const SmPrintUIOptions &rPrintUIOptions,
Rectangle aOutRect, Point aZeroPoint );
+
+ /** Set bInsertIntoEditWindow so we know where to insert
+ *
+ * This method is called whenever SmGraphicWindow or SmEditWindow gets focus,
+ * so that when text is inserted from catalog or elsewhere we know whether to
+ * insert for the visual editor, or the text editor.
+ */
+ void SetInsertIntoEditWindow(bool bEditWindowHadFocusLast = true){
+ bInsertIntoEditWindow = bEditWindowHadFocusLast;
+ }
+ bool IsInlineEditEnabled() const;
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx
new file mode 100644
index 000000000000..3dbe887cf53d
--- /dev/null
+++ b/starmath/inc/visitors.hxx
@@ -0,0 +1,495 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Jonas Finnemann Jensen <jopsen@gmail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jonas Finnemann Jensen <jopsen@gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef SMVISITORS_H
+#define SMVISITORS_H
+
+#include "node.hxx"
+#include "caret.hxx"
+
+/** Base class for visitors that visits a tree of SmNodes
+ * @remarks all methods have been left abstract to ensure that implementers
+ * don't forget to implement one.
+ */
+class SmVisitor
+{
+public:
+ virtual void Visit( SmTableNode* pNode ) = 0;
+ virtual void Visit( SmBraceNode* pNode ) = 0;
+ virtual void Visit( SmBracebodyNode* pNode ) = 0;
+ virtual void Visit( SmOperNode* pNode ) = 0;
+ virtual void Visit( SmAlignNode* pNode ) = 0;
+ virtual void Visit( SmAttributNode* pNode ) = 0;
+ virtual void Visit( SmFontNode* pNode ) = 0;
+ virtual void Visit( SmUnHorNode* pNode ) = 0;
+ virtual void Visit( SmBinHorNode* pNode ) = 0;
+ virtual void Visit( SmBinVerNode* pNode ) = 0;
+ virtual void Visit( SmBinDiagonalNode* pNode ) = 0;
+ virtual void Visit( SmSubSupNode* pNode ) = 0;
+ virtual void Visit( SmMatrixNode* pNode ) = 0;
+ virtual void Visit( SmPlaceNode* pNode ) = 0;
+ virtual void Visit( SmTextNode* pNode ) = 0;
+ virtual void Visit( SmSpecialNode* pNode ) = 0;
+ virtual void Visit( SmGlyphSpecialNode* pNode ) = 0;
+ virtual void Visit( SmMathSymbolNode* pNode ) = 0;
+ virtual void Visit( SmBlankNode* pNode ) = 0;
+ virtual void Visit( SmErrorNode* pNode ) = 0;
+ virtual void Visit( SmLineNode* pNode ) = 0;
+ virtual void Visit( SmExpressionNode* pNode ) = 0;
+ virtual void Visit( SmPolyLineNode* pNode ) = 0;
+ virtual void Visit( SmRootNode* pNode ) = 0;
+ virtual void Visit( SmRootSymbolNode* pNode ) = 0;
+ virtual void Visit( SmRectangleNode* pNode ) = 0;
+ virtual void Visit( SmVerticalBraceNode* pNode ) = 0;
+};
+
+/** Simple visitor for testing SmVisitor */
+class SmVisitorTest : public SmVisitor
+{
+public:
+ void Visit( SmTableNode* pNode );
+ void Visit( SmBraceNode* pNode );
+ void Visit( SmBracebodyNode* pNode );
+ void Visit( SmOperNode* pNode );
+ void Visit( SmAlignNode* pNode );
+ void Visit( SmAttributNode* pNode );
+ void Visit( SmFontNode* pNode );
+ void Visit( SmUnHorNode* pNode );
+ void Visit( SmBinHorNode* pNode );
+ void Visit( SmBinVerNode* pNode );
+ void Visit( SmBinDiagonalNode* pNode );
+ void Visit( SmSubSupNode* pNode );
+ void Visit( SmMatrixNode* pNode );
+ void Visit( SmPlaceNode* pNode );
+ void Visit( SmTextNode* pNode );
+ void Visit( SmSpecialNode* pNode );
+ void Visit( SmGlyphSpecialNode* pNode );
+ void Visit( SmMathSymbolNode* pNode );
+ void Visit( SmBlankNode* pNode );
+ void Visit( SmErrorNode* pNode );
+ void Visit( SmLineNode* pNode );
+ void Visit( SmExpressionNode* pNode );
+ void Visit( SmPolyLineNode* pNode );
+ void Visit( SmRootNode* pNode );
+ void Visit( SmRootSymbolNode* pNode );
+ void Visit( SmRectangleNode* pNode );
+ void Visit( SmVerticalBraceNode* pNode );
+private:
+ /** Auxiliary method for visiting the children of a pNode */
+ void VisitChildren( SmNode* pNode );
+};
+
+/////////////////////////////// SmDefaultingVisitor ////////////////////////////////
+
+
+/** Visitor that uses DefaultVisit for handling visits by default
+ *
+ * This abstract baseclass is useful for visitors where many methods share the same
+ * implementation.
+ */
+class SmDefaultingVisitor : public SmVisitor
+{
+public:
+ void Visit( SmTableNode* pNode );
+ void Visit( SmBraceNode* pNode );
+ void Visit( SmBracebodyNode* pNode );
+ void Visit( SmOperNode* pNode );
+ void Visit( SmAlignNode* pNode );
+ void Visit( SmAttributNode* pNode );
+ void Visit( SmFontNode* pNode );
+ void Visit( SmUnHorNode* pNode );
+ void Visit( SmBinHorNode* pNode );
+ void Visit( SmBinVerNode* pNode );
+ void Visit( SmBinDiagonalNode* pNode );
+ void Visit( SmSubSupNode* pNode );
+ void Visit( SmMatrixNode* pNode );
+ void Visit( SmPlaceNode* pNode );
+ void Visit( SmTextNode* pNode );
+ void Visit( SmSpecialNode* pNode );
+ void Visit( SmGlyphSpecialNode* pNode );
+ void Visit( SmMathSymbolNode* pNode );
+ void Visit( SmBlankNode* pNode );
+ void Visit( SmErrorNode* pNode );
+ void Visit( SmLineNode* pNode );
+ void Visit( SmExpressionNode* pNode );
+ void Visit( SmPolyLineNode* pNode );
+ void Visit( SmRootNode* pNode );
+ void Visit( SmRootSymbolNode* pNode );
+ void Visit( SmRectangleNode* pNode );
+ void Visit( SmVerticalBraceNode* pNode );
+protected:
+ /** Method invoked by Visit methods by default */
+ virtual void DefaultVisit( SmNode* pNode ) = 0;
+};
+
+/////////////////////////////// SmCaretDrawingVisitor ////////////////////////////////
+
+/** Visitor for drawing a caret position */
+class SmCaretDrawingVisitor : public SmDefaultingVisitor
+{
+public:
+ /** Given position and device this constructor will draw the caret */
+ SmCaretDrawingVisitor( OutputDevice& rDevice, SmCaretPos position, Point offset, bool caretVisible );
+ void Visit( SmTextNode* pNode );
+private:
+ OutputDevice &rDev;
+ SmCaretPos pos;
+ /** Offset to draw from */
+ Point Offset;
+ bool isCaretVisible;
+protected:
+ /** Default method for drawing pNodes */
+ void DefaultVisit( SmNode* pNode );
+};
+
+/////////////////////////////// SmCaretPos2LineVisitor ////////////////////////////////
+
+/** Visitor getting a line from a caret position */
+class SmCaretPos2LineVisitor : public SmDefaultingVisitor
+{
+public:
+ /** Given position and device this constructor will compute a line for the caret */
+ SmCaretPos2LineVisitor( OutputDevice *pDevice, SmCaretPos position ) {
+ pDev = pDevice;
+ pos = position;
+ j_assert( position.IsValid( ), "Cannot draw invalid position!" );
+
+ pos.pSelectedNode->Accept( this );
+ }
+ void Visit( SmTextNode* pNode );
+ SmCaretLine GetResult( ){
+ return line;
+ }
+private:
+ SmCaretLine line;
+ OutputDevice *pDev;
+ SmCaretPos pos;
+protected:
+ /** Default method for computing lines for pNodes */
+ void DefaultVisit( SmNode* pNode );
+};
+
+/////////////////////////////// SmDrawingVisitor ////////////////////////////////
+
+/** Visitor for drawing SmNodes to OutputDevice */
+class SmDrawingVisitor : public SmVisitor
+{
+public:
+ /** Create an instance of SmDrawingVisitor, and use it to draw a formula
+ * @param rDevice Device to draw on
+ * @param position Offset on device to draw the formula
+ * @param pTree Formula tree to draw
+ * @remarks This constructor will do the drawing, no need to anything more.
+ */
+ SmDrawingVisitor( OutputDevice &rDevice, Point position, SmNode* pTree )
+ : rDev( rDevice ) {
+ this->Position = position;
+ pTree->Accept( this );
+ }
+ void Visit( SmTableNode* pNode );
+ void Visit( SmBraceNode* pNode );
+ void Visit( SmBracebodyNode* pNode );
+ void Visit( SmOperNode* pNode );
+ void Visit( SmAlignNode* pNode );
+ void Visit( SmAttributNode* pNode );
+ void Visit( SmFontNode* pNode );
+ void Visit( SmUnHorNode* pNode );
+ void Visit( SmBinHorNode* pNode );
+ void Visit( SmBinVerNode* pNode );
+ void Visit( SmBinDiagonalNode* pNode );
+ void Visit( SmSubSupNode* pNode );
+ void Visit( SmMatrixNode* pNode );
+ void Visit( SmPlaceNode* pNode );
+ void Visit( SmTextNode* pNode );
+ void Visit( SmSpecialNode* pNode );
+ void Visit( SmGlyphSpecialNode* pNode );
+ void Visit( SmMathSymbolNode* pNode );
+ void Visit( SmBlankNode* pNode );
+ void Visit( SmErrorNode* pNode );
+ void Visit( SmLineNode* pNode );
+ void Visit( SmExpressionNode* pNode );
+ void Visit( SmPolyLineNode* pNode );
+ void Visit( SmRootNode* pNode );
+ void Visit( SmRootSymbolNode* pNode );
+ void Visit( SmRectangleNode* pNode );
+ void Visit( SmVerticalBraceNode* pNode );
+private:
+ /** Draw the children of a pNode
+ * This the default method, use by most pNodes
+ */
+ void DrawChildren( SmNode* pNode );
+
+ /** Draw an SmTextNode or a subclass of this */
+ void DrawTextNode( SmTextNode* pNode );
+ /** Draw an SmSpecialNode or a subclass of this */
+ void DrawSpecialNode( SmSpecialNode* pNode );
+ /** OutputDevice to draw on */
+ OutputDevice& rDev;
+ /** Position to draw on the rDev
+ * @remarks This variable is used to pass parameters in DrawChildren( ), this means
+ that after a call to DrawChildren( ) the contents of this method is undefined
+ so if needed cache it locally on the stack.
+ */
+ Point Position;
+};
+
+/////////////////////////////// SmSetSelectionVisitor ////////////////////////////////
+
+/** Set Selection Visitor
+ * Sets the IsSelected( ) property on all SmNodes of the tree
+ */
+class SmSetSelectionVisitor : public SmDefaultingVisitor
+{
+public:
+ SmSetSelectionVisitor( SmCaretPos startPos, SmCaretPos endPos, SmNode* pNode);
+ void Visit( SmBinHorNode* pNode );
+ void Visit( SmUnHorNode* pNode );
+ void Visit( SmFontNode* pNode );
+ void Visit( SmTextNode* pNode );
+ void Visit( SmExpressionNode* pNode );
+ void Visit( SmLineNode* pNode );
+ void Visit( SmAlignNode* pNode );
+ /** Set IsSelected on all pNodes of pSubTree */
+ static void SetSelectedOnAll( SmNode* pSubTree, bool IsSelected = true );
+private:
+ /** Visit a selectable pNode
+ * Can be used to handle pNodes that can be selected, that doesn't have more SmCaretPos'
+ * than 0 and 1 inside them. SmTextNode should be handle seperately!
+ * Also note that pNodes such as SmBinVerNode cannot be selected, don't this method for
+ * it.
+ */
+ void DefaultVisit( SmNode* pNode );
+ void VisitCompositionNode( SmNode* pNode );
+ /** Caret position where the selection starts */
+ SmCaretPos StartPos;
+ /** Caret position where the selection ends */
+ SmCaretPos EndPos;
+ /** The current state of this visitor
+ * This property changes when the visitor meets either StartPos
+ * or EndPos. This means that anything visited in between will be
+ * selected.
+ */
+ bool IsSelecting;
+};
+
+
+/////////////////////////////// SmCaretPosGraphBuildingVisitor ////////////////////////////////
+
+
+/** A visitor for building a SmCaretPosGraph
+ *
+ * Visit invariant:
+ * Each pNode, except SmExpressionNode, SmBinHorNode and a few others, constitues an entry
+ * in a line. Consider the line entry "H", this entry creates one carat position, here
+ * denoted by | in "H|".
+ *
+ * Parameter variables:
+ * The following variables are used to transfer parameters in to calls and results out
+ * of calls.
+ * pRightMost : SmCaretPosGraphEntry*
+ *
+ * Prior to a Visit call:
+ * pRightMost: A pointer to right most position infront of the current line entry.
+ *
+ * After a Visit call:
+ * pRightMost: A pointer to the right most position in the called line entry, if no there's
+ * no caret positions in called line entry don't change this variable.
+ */
+class SmCaretPosGraphBuildingVisitor : public SmVisitor
+{
+public:
+ /** Builds a caret position graph for pRootNode */
+ SmCaretPosGraphBuildingVisitor( SmNode* pRootNode );
+ void Visit( SmTableNode* pNode );
+ void Visit( SmBraceNode* pNode );
+ void Visit( SmBracebodyNode* pNode );
+ void Visit( SmOperNode* pNode );
+ void Visit( SmAlignNode* pNode );
+ void Visit( SmAttributNode* pNode );
+ void Visit( SmFontNode* pNode );
+ void Visit( SmUnHorNode* pNode );
+ void Visit( SmBinHorNode* pNode );
+ void Visit( SmBinVerNode* pNode );
+ void Visit( SmBinDiagonalNode* pNode );
+ void Visit( SmSubSupNode* pNode );
+ void Visit( SmMatrixNode* pNode );
+ void Visit( SmPlaceNode* pNode );
+ void Visit( SmTextNode* pNode );
+ void Visit( SmSpecialNode* pNode );
+ void Visit( SmGlyphSpecialNode* pNode );
+ void Visit( SmMathSymbolNode* pNode );
+ void Visit( SmBlankNode* pNode );
+ void Visit( SmErrorNode* pNode );
+ void Visit( SmLineNode* pNode );
+ void Visit( SmExpressionNode* pNode );
+ void Visit( SmPolyLineNode* pNode );
+ void Visit( SmRootNode* pNode );
+ void Visit( SmRootSymbolNode* pNode );
+ void Visit( SmRectangleNode* pNode );
+ void Visit( SmVerticalBraceNode* pNode );
+ SmCaretPosGraph* Graph( ){
+ return pGraph;
+ }
+private:
+ SmCaretPosGraphEntry* pRightMost;
+ SmCaretPosGraph* pGraph;
+};
+
+/////////////////////////////// SmCloningVisitor ///////////////////////////////
+
+/** Visitor for cloning a pNode
+ *
+ * This visitor creates deep clones.
+ */
+class SmCloningVisitor : public SmVisitor
+{
+public:
+ SmCloningVisitor( ){ pResult = NULL; }
+ void Visit( SmTableNode* pNode );
+ void Visit( SmBraceNode* pNode );
+ void Visit( SmBracebodyNode* pNode );
+ void Visit( SmOperNode* pNode );
+ void Visit( SmAlignNode* pNode );
+ void Visit( SmAttributNode* pNode );
+ void Visit( SmFontNode* pNode );
+ void Visit( SmUnHorNode* pNode );
+ void Visit( SmBinHorNode* pNode );
+ void Visit( SmBinVerNode* pNode );
+ void Visit( SmBinDiagonalNode* pNode );
+ void Visit( SmSubSupNode* pNode );
+ void Visit( SmMatrixNode* pNode );
+ void Visit( SmPlaceNode* pNode );
+ void Visit( SmTextNode* pNode );
+ void Visit( SmSpecialNode* pNode );
+ void Visit( SmGlyphSpecialNode* pNode );
+ void Visit( SmMathSymbolNode* pNode );
+ void Visit( SmBlankNode* pNode );
+ void Visit( SmErrorNode* pNode );
+ void Visit( SmLineNode* pNode );
+ void Visit( SmExpressionNode* pNode );
+ void Visit( SmPolyLineNode* pNode );
+ void Visit( SmRootNode* pNode );
+ void Visit( SmRootSymbolNode* pNode );
+ void Visit( SmRectangleNode* pNode );
+ void Visit( SmVerticalBraceNode* pNode );
+ /** Clone a pNode */
+ SmNode* Clone( SmNode* pNode );
+private:
+ SmNode* pResult;
+ /** Clone children of pSource and give them to pTarget */
+ void CloneKids( SmStructureNode* pSource, SmStructureNode* pTarget );
+ /** Clone attributes on a pNode */
+ void CloneNodeAttr( SmNode* pSource, SmNode* pTarget );
+};
+
+
+/////////////////////////////// SmSelectionDrawingVisitor ///////////////////////////////
+
+class SmSelectionDrawingVisitor : public SmDefaultingVisitor
+{
+public:
+ /** Draws a selection on rDevice for the selection on pTree */
+ SmSelectionDrawingVisitor( OutputDevice& rDevice, SmNode* pTree, Point Offset );
+ void Visit( SmTextNode* pNode );
+private:
+ /** Reference to drawing device */
+ OutputDevice& rDev;
+ /** True if aSelectionArea have been initialized */
+ bool bHasSelectionArea;
+ /** The current area that is selected */
+ Rectangle aSelectionArea;
+ /** Extend the area that must be selected */
+ void ExtendSelectionArea( Rectangle aArea );
+ /** Default visiting method */
+ void DefaultVisit( SmNode* pNode );
+ /** Visit the children of a given pNode */
+ void VisitChildren( SmNode* pNode );
+};
+
+/////////////////////////////// SmNodeToTextVisitor ///////////////////////////////
+
+/** Extract command text from pNodes */
+class SmNodeToTextVisitor : public SmVisitor
+{
+public:
+ SmNodeToTextVisitor( SmNode* pNode, String &rText )
+ : rCmdText( rText ) {
+ pNode->Accept( this );
+ }
+ void Visit( SmTableNode* pNode );
+ void Visit( SmBraceNode* pNode );
+ void Visit( SmBracebodyNode* pNode );
+ void Visit( SmOperNode* pNode );
+ void Visit( SmAlignNode* pNode );
+ void Visit( SmAttributNode* pNode );
+ void Visit( SmFontNode* pNode );
+ void Visit( SmUnHorNode* pNode );
+ void Visit( SmBinHorNode* pNode );
+ void Visit( SmBinVerNode* pNode );
+ void Visit( SmBinDiagonalNode* pNode );
+ void Visit( SmSubSupNode* pNode );
+ void Visit( SmMatrixNode* pNode );
+ void Visit( SmPlaceNode* pNode );
+ void Visit( SmTextNode* pNode );
+ void Visit( SmSpecialNode* pNode );
+ void Visit( SmGlyphSpecialNode* pNode );
+ void Visit( SmMathSymbolNode* pNode );
+ void Visit( SmBlankNode* pNode );
+ void Visit( SmErrorNode* pNode );
+ void Visit( SmLineNode* pNode );
+ void Visit( SmExpressionNode* pNode );
+ void Visit( SmPolyLineNode* pNode );
+ void Visit( SmRootNode* pNode );
+ void Visit( SmRootSymbolNode* pNode );
+ void Visit( SmRectangleNode* pNode );
+ void Visit( SmVerticalBraceNode* pNode );
+private:
+ /** Extract text from a pNode that constitues a line */
+ void LineToText( SmNode* pNode ) {
+ Separate( );
+ if( pNode )
+ pNode->Accept( this );
+ Separate( );
+ }
+ inline void Append( const sal_Char* pCharStr ) {
+ rCmdText.AppendAscii( pCharStr );
+ }
+ inline void Append( const String &rText ) {
+ rCmdText.Append( rText );
+ }
+ /** Append a blank for separation, if needed */
+ inline void Separate( ){
+ if( rCmdText.GetChar( rCmdText.Len( ) - 1 ) != ' ' )
+ rCmdText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " " ) );
+ }
+ /** Output text generated from the pNodes */
+ String &rCmdText;
+};
+
+#endif /* SMVISITORS_H */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/prj/build.lst b/starmath/prj/build.lst
index bfecbc4a7f6d..70de9d63d427 100644
--- a/starmath/prj/build.lst
+++ b/starmath/prj/build.lst
@@ -6,4 +6,5 @@ sm starmath\res get - all sm_res NULL
sm starmath\sdi nmake - all sm_sdi NULL
sm starmath\source nmake - all sm_sorce sm_sdi sm_inc NULL
sm starmath\util nmake - all sm_util sm_sorce NULL
-sm starmath\qa\unoapi nmake - all sm_qa_unoapi NULL
+sm starmath\qa\unoapi nmake - all sm_qa_unoapi NULL
+sm starmath\qa\cppunit nmake - all sm_qa_cppunit sm_util NULL
diff --git a/starmath/qa/cppunit/makefile.mk b/starmath/qa/cppunit/makefile.mk
new file mode 100644
index 000000000000..cd31ef6d4042
--- /dev/null
+++ b/starmath/qa/cppunit/makefile.mk
@@ -0,0 +1,133 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General 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=starmath
+TARGET=qa_cppunit
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
+# --- Libs ---------------------------------------------------------
+
+SHL1OBJS= \
+ $(SLO)/test_starmath.obj \
+ $(SLO)/test_nodetotextvisitors.obj
+
+
+SHL1STDLIBS= \
+ $(CPPUNITLIB) \
+ $(EDITENGLIB) \
+ $(SVXCORELIB) \
+ $(SVXLIB) \
+ $(SFX2LIB) \
+ $(XMLOFFLIB) \
+ $(SVTOOLLIB) \
+ $(TKLIB) \
+ $(VCLLIB) \
+ $(SVLLIB) \
+ $(I18NPAPERLIB) \
+ $(SOTLIB) \
+ $(UNOTOOLSLIB) \
+ $(TOOLSLIB) \
+ $(COMPHELPERLIB) \
+ $(CPPUHELPERLIB) \
+ $(CPPULIB) \
+ $(SALLIB)
+
+SHL1LIBS=$(SLB)$/starmath.lib
+
+SHL1TARGET= test_starmath
+SHL1RPATH = NONE
+SHL1IMPLIB= i$(SHL1TARGET)
+# SHL1DEF= $(MISC)/$(SHL1TARGET).def
+DEF1NAME=$(SHL1TARGET)
+# DEF1EXPORTFILE= export.exp
+SHL1VERSIONMAP= version.map
+
+# --- All object files ---------------------------------------------
+
+SLOFILES= \
+ $(SHL1OBJS) \
+
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.IF "$(OS)" == "WNT"
+my_file = file:///
+.ELSE
+my_file = file://
+.END
+
+ALLTAR: test
+
+$(MISC)$/$(TARGET)$/types.rdb .ERRREMOVE : $(SOLARBINDIR)$/types.rdb
+ $(MKDIRHIER) $(@:d)
+ $(GNUCOPY) $? $@
+
+$(MISC)/$(TARGET)/udkapi.rdb .ERRREMOVE : $(SOLARBINDIR)$/udkapi.rdb
+ $(MKDIRHIER) $(@:d)
+ $(GNUCOPY) $? $@
+
+#Make a services.rdb with the services we know we need to get up and running
+$(MISC)/$(TARGET)/services.rdb .ERRREMOVE : $(MISC)/$(TARGET)/udkapi.rdb makefile.mk
+ $(MKDIRHIER) $(@:d)
+ $(REGCOMP) -register -br $(MISC)/$(TARGET)/udkapi.rdb -r $@ -wop \
+ -c $(DLLPRE)fwk$(DLLPOSTFIX)$(DLLPOST) \
+ -c $(DLLPRE)tk$(DLLPOSTFIX)$(DLLPOST) \
+ -c $(DLLPRE)sfx$(DLLPOSTFIX)$(DLLPOST) \
+ -c $(DLLPRE)vcl$(DLLPOSTFIX)$(DLLPOST) \
+ -c $(DLLPRE)mcnttype$(DLLPOST) \
+ -c i18npool.uno$(DLLPOST)
+.IF "$(OS)" == "WNT"
+ $(REGCOMP) -register -br $(MISC)/$(TARGET)/udkapi.rdb -r $@ -wop \
+ -c $(DLLPRE)sysdtrans$(DLLPOST) \
+ -c $(DLLPRE)ftransl$(DLLPOST)
+.ENDIF
+
+
+#Tweak things so that we use the .res files in the solver
+STAR_RESOURCEPATH:=$(PWD)/$(BIN)$(PATH_SEPERATOR)$(SOLARBINDIR)
+.EXPORT : STAR_RESOURCEPATH
+
+test .PHONY: $(SHL1TARGETN) $(MISC)/$(TARGET)/services.rdb $(MISC)$/$(TARGET)$/types.rdb $(MISC)/$(TARGET)/udkapi.rdb
+ @echo ----------------------------------------------------------
+ @echo - start unit test \#1 on library $(SHL1TARGETN)
+ @echo ----------------------------------------------------------
+ $(CPPUNITTESTER) $(SHL1TARGETN) -headless -invisible \
+ -env:UNO_SERVICES=$(my_file)$(PWD)/$(MISC)/$(TARGET)/services.rdb \
+ -env:UNO_TYPES="$(my_file)$(PWD)/$(MISC)/$(TARGET)/types.rdb $(my_file)$(PWD)/$(MISC)/$(TARGET)/udkapi.rdb" \
+ -env:OOO_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
+ -env:BRAND_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
+ -env:UNO_USER_PACKAGES_CACHE="$(my_file)$(PWD)/$(MISC)/$(TARGET)"
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
new file mode 100644
index 000000000000..18180ede69cf
--- /dev/null
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -0,0 +1,688 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Luke Dixon <6b8b4567@gmail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_starmath.hxx"
+
+#ifdef WNT
+#include <prewin.h>
+#include <postwin.h>
+#endif
+
+#include <cppunit/TestSuite.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/TestCase.h>
+#include <cppunit/plugin/TestPlugIn.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestAssert.h>
+
+#include <sal/config.h>
+
+#include <cppuhelper/bootstrap.hxx>
+#include <comphelper/processfactory.hxx>
+
+#include <vcl/svapp.hxx>
+#include <smdll.hxx>
+
+#include <document.hxx>
+#include <node.hxx>
+#include <visitors.hxx>
+#include <cursor.hxx>
+
+namespace CppUnit {
+template<>
+struct assertion_traits<String>
+{
+ static bool equal(const String& x, const String& y)
+ {
+ return x == y;
+ }
+
+ static std::string toString(const String& x)
+ {
+ std::string text = ByteString(x, RTL_TEXTENCODING_UTF8).GetBuffer();
+ OStringStream ost;
+ ost << text;
+ return ost.str();
+ }
+};
+}
+
+SO2_DECL_REF(SmDocShell)
+SO2_IMPL_REF(SmDocShell)
+
+class TestOutputDevice : public OutputDevice
+{
+public:
+ TestOutputDevice()
+ {
+ }
+};
+
+using namespace ::com::sun::star;
+
+namespace {
+
+class Test : public CppUnit::TestFixture {
+public:
+ Test();
+ ~Test();
+
+ // init
+ virtual void setUp();
+ virtual void tearDown();
+
+ // tests
+ void SimpleUnaryOp();
+ void SimpleBinaryOp();
+ void SimpleRelationalOp();
+ void SimpleSetOp();
+ void SimpleFunctions();
+ void SimpleOperators();
+ void SimpleAttributes();
+ void SimpleMisc();
+ void SimpleBrackets();
+ void SimpleFormats();
+ void SimpleGreekChars();
+ void SimpleSpecialChars();
+ void testBinomInBinHor();
+ void testBinVerInUnary();
+ void testBinHorInSubSup();
+ void testUnaryInMixedNumberAsNumerator();
+
+ CPPUNIT_TEST_SUITE(Test);
+ CPPUNIT_TEST(SimpleUnaryOp);
+ CPPUNIT_TEST(SimpleBinaryOp);
+ CPPUNIT_TEST(SimpleRelationalOp);
+ CPPUNIT_TEST(SimpleSetOp);
+ CPPUNIT_TEST(SimpleFunctions);
+ CPPUNIT_TEST(SimpleOperators);
+ CPPUNIT_TEST(SimpleAttributes);
+ CPPUNIT_TEST(SimpleMisc);
+ CPPUNIT_TEST(SimpleBrackets);
+ CPPUNIT_TEST(SimpleFormats);
+ CPPUNIT_TEST(SimpleGreekChars);
+ CPPUNIT_TEST(SimpleSpecialChars);
+ CPPUNIT_TEST(testBinomInBinHor);
+ CPPUNIT_TEST(testBinVerInUnary);
+ CPPUNIT_TEST(testBinHorInSubSup);
+ CPPUNIT_TEST(testUnaryInMixedNumberAsNumerator);
+ CPPUNIT_TEST_SUITE_END();
+
+private:
+ uno::Reference< uno::XComponentContext > m_context;
+ SmDocShellRef xDocShRef;
+ void parseandparseagain(const char *input, const char *test_name);
+ void ParseAndCheck(const char *input, const char *expected, const char *test_name);
+};
+
+Test::Test()
+{
+ m_context = cppu::defaultBootstrap_InitialComponentContext();
+
+ uno::Reference<lang::XMultiComponentFactory> xFactory(m_context->getServiceManager());
+ uno::Reference<lang::XMultiServiceFactory> xSM(xFactory, uno::UNO_QUERY_THROW);
+
+ //Without this we're crashing because callees are using
+ //getProcessServiceFactory. In general those should be removed in favour
+ //of retaining references to the root ServiceFactory as its passed around
+ comphelper::setProcessServiceFactory(xSM);
+
+ InitVCL(xSM);
+
+ SmDLL::Init();
+}
+
+void Test::setUp()
+{
+ xDocShRef = new SmDocShell(SFXOBJECTSHELL_STD_NORMAL);
+}
+
+void Test::tearDown()
+{
+ xDocShRef.Clear();
+}
+
+Test::~Test()
+{
+}
+
+/*
+ * Most of the formula commands in this file came from:
+ * http://wiki.services.openoffice.org/wiki/Template:Math_commands_reference
+ * which was licensed with a
+ * Creative Common Attribution 3.0 license and written by:
+ * Jeanweber, Weegreenblobbie, Jdpipe, TJFrazier, Ysangkok, B michaelsen, Spellbreaker
+ */
+
+void Test::SimpleUnaryOp()
+{
+ parseandparseagain("+1", "Positive (plus)");
+ parseandparseagain("-2", "Negative (minus)");
+ parseandparseagain("+-3", "Plus/minus");
+ parseandparseagain("-+4", "Minus/plus");
+ parseandparseagain("neg a", "Boolean 'not'");
+ parseandparseagain("fact a", "Factorial");
+ parseandparseagain(" - { 1 over 2 } ", "BinVer in Unary 1");
+ ParseAndCheck(" - { 1 over 2 } ", " - { 1 over 2 } ", "BinVer in Unary 1");
+ parseandparseagain(" { - { 1 over 2 } } ", "BinVer in Unary 2");
+ parseandparseagain(" - 1 over 2 ", "Unary in BinVer as numerator 1");
+ parseandparseagain(" { - 1 } over 2 ", "Unary in BinVer as numerator 2");
+ parseandparseagain(" 1 over - 2 ", "Unary in BinVer as denominator 1");
+ parseandparseagain(" 1 over { - 2 } ", "Unary in BinVer as denominator 2");
+ parseandparseagain(" 2 { - 1 over 2 } ", "Mixed number with Unary in denominator 1");
+ parseandparseagain(" 2 { - 1 } over 2 ", "Mixed number with Unary in denominator 2");
+ parseandparseagain(" - 1 + 2 ", "Unary in BinHor");
+}
+
+void Test::SimpleBinaryOp()
+{
+ parseandparseagain("a + b", "Addition");
+ parseandparseagain("a cdot b", "Dot product");
+ parseandparseagain("a times b", "Cross product");
+ parseandparseagain("a * b", "Multiplication (asterisk)");
+ parseandparseagain("a and b", "Boolean 'and'");
+ parseandparseagain("a - b", "Subtraction");
+ parseandparseagain("a over b", "Division (as a fraction)");
+ parseandparseagain("a div b", "Division (as an operator)");
+ parseandparseagain("a / b", "Division (with a slash)");
+ parseandparseagain("a or b", "Boolean 'or'");
+ parseandparseagain("a circ b", "Concatenation");
+}
+
+void Test::SimpleRelationalOp()
+{
+ parseandparseagain("a = b", "Is equal");
+ parseandparseagain("a <> b", "Is not equal");
+ parseandparseagain("a approx 2", "Approximately");
+ parseandparseagain("a divides b", "Divides");
+ parseandparseagain("a ndivides b", "Does not divide");
+ parseandparseagain("a < 2", "Less than");
+ parseandparseagain("a > 2", "Greater than");
+ parseandparseagain("a simeq b", "Similar to or equal");
+ parseandparseagain("a parallel b", "Parallel");
+ parseandparseagain("a ortho b", "Orthogonal to");
+ parseandparseagain("a leslant b", "Less than or equal to");
+ parseandparseagain("a geslant b", "Greater than or equal to");
+ parseandparseagain("a sim b", "Similar to");
+ parseandparseagain("a equiv b", "Congruent");
+ parseandparseagain("a <= b", "Less than or equal to");
+ parseandparseagain("a >= b", "Greater than or equal to");
+ parseandparseagain("a prop b", "Proportional");
+ parseandparseagain("a toward b", "Toward");
+ parseandparseagain("a dlarrow b", "Arrow left");
+ parseandparseagain("a dlrarrow b", "Double arrow left and right");
+ parseandparseagain("drarrow b", "Arrow right");
+}
+
+void Test::SimpleSetOp()
+{
+ parseandparseagain("a in B", "Is in");
+ parseandparseagain("a notin B", "Is not in");
+ parseandparseagain("A owns b", "Owns");
+ parseandparseagain("emptyset", "Empty set");
+ parseandparseagain("A intersection B", "Intersection");
+ parseandparseagain("A union B", "Union");
+ parseandparseagain("A setminus B", "Difference");
+ parseandparseagain("A slash B", "Quotient");
+ parseandparseagain("aleph", "Aleph");
+ parseandparseagain("A subset B", "Subset");
+ parseandparseagain("A subseteq B", "Subset or equal to");
+ parseandparseagain("A supset B", "Superset");
+ parseandparseagain("A supseteq B", "Superset or equal to");
+ parseandparseagain("A nsubset B", "Not subset");
+ parseandparseagain("A nsubseteq B", "Not subset or equal");
+ parseandparseagain("A nsupset B", "Not superset");
+ parseandparseagain("A nsupseteq B", "Not superset or equal");
+ parseandparseagain("setN", "Set of natural numbers");
+ parseandparseagain("setZ", "Set of integers");
+ parseandparseagain("setQ", "Set of rational numbers");
+ parseandparseagain("setR", "Set of real numbers");
+ parseandparseagain("setC", "Set of complex numbers");
+}
+
+void Test::SimpleFunctions()
+{
+ parseandparseagain("func e^{a}", "Exponential");
+ parseandparseagain("ln(a)", "Natural logarithm");
+ parseandparseagain("exp(a)", "Exponential function");
+ parseandparseagain("log(a)", "Logarithm");
+ parseandparseagain("a^{b}", "Power");
+ parseandparseagain("sin(a)", "Sine");
+ parseandparseagain("cos(a)", "Cosine");
+ parseandparseagain("tan(a)", "Tangent");
+ parseandparseagain("cot(a)", "Cotangent");
+ parseandparseagain("sqrt{a}", "Square root");
+ parseandparseagain("arcsin(a)", "Arcsine");
+ parseandparseagain("arccos(a)", "Arccosine");
+ parseandparseagain("arctan(a)", "Arctangent");
+ parseandparseagain("arccot(a)", "Arc cotangent");
+ parseandparseagain("nroot{a}{b}", "nth root");
+ parseandparseagain("sinh(a)", "Hyperbolic sine");
+ parseandparseagain("cosh(a)", "Hyperbolic cosine");
+ parseandparseagain("tanh(a)", "Hyperbolic tangent");
+ parseandparseagain("coth(a)", "Hyperbolic cotangent");
+ parseandparseagain("abs{a}", "Absolute value");
+ parseandparseagain("arsinh(a)", "Arc hyperbolic sine");
+ parseandparseagain("arcosh(a)", "Arc hyperbolic cosine");
+ parseandparseagain("artanh(a)", "Arc hyperbolic tangent");
+ parseandparseagain("arcoth(a)", "Arc hyperbolic cotangent");
+}
+
+void Test::SimpleOperators()
+{
+ parseandparseagain("lim{a}", "Limit");
+ parseandparseagain("sum{a}", "Sum");
+ parseandparseagain("prod{a}", "Product");
+ parseandparseagain("coprod{a}", "Coproduct");
+ parseandparseagain("int from {r_0} to {r_t} a", "Upper and lower bounds shown with integral (from & to)");
+ ParseAndCheck("int csup {r_0} csub {r_t} a", "int csup { r rsub 0 } csub { r rsub t } a ", "Upper and lower bounds shown with integral (csub & csup)");
+ ParseAndCheck("sum csup { size 8 { x - 1 } } csub { size 8 a } b ", "sum csup { size 8 { x - 1 } } csub { size 8 a } b ", "Sum with sized upper and lower bounds");
+ parseandparseagain("int{a}", "Integral");
+ parseandparseagain("iint{a}", "Double integral");
+ parseandparseagain("iiint{a}", "Triple integral");
+ parseandparseagain("sum from{3}b", "Lower bound shown with summation symbol");
+ parseandparseagain("lint a", "Contour integral");
+ parseandparseagain("llint a", "Double curved integral");
+ parseandparseagain("lllint a", "Triple curved integral");
+ parseandparseagain("prod from {i=1} to {n} {(i+1)}", "Product with range");
+}
+
+void Test::SimpleAttributes()
+{
+ parseandparseagain("acute a", "Acute accent");
+ parseandparseagain("grave a", "Grave accent");
+ parseandparseagain("check a", "Reverse circumflex");
+ parseandparseagain("breve a", "Breve");
+ parseandparseagain("circle a", "Circle");
+ parseandparseagain("vec a", "Vector arrow");
+ parseandparseagain("tilde a", "Tilde");
+ parseandparseagain("hat a", "Circumflex");
+ parseandparseagain("bar a", "Line above");
+ parseandparseagain("dot a", "Dot");
+ parseandparseagain("widevec abc", "Wide vector arrow");
+ parseandparseagain("widetilde abc", "Wide tilde");
+ parseandparseagain("widehat abc", "Wide circumflex");
+ parseandparseagain("ddot a", "Double dot");
+ parseandparseagain("overline abc", "Line over");
+ parseandparseagain("underline abc", "Line under");
+ parseandparseagain("overstrike abc", "Line through");
+ parseandparseagain("dddot a", "Triple dot");
+ parseandparseagain("phantom a", "Transparent (useful to get a placeholder of a given size)");
+ parseandparseagain("bold a", "Bold font");
+ parseandparseagain("ital a", "Italic font");
+ parseandparseagain("nitalic a", "Roman (non-italic) font 1");
+ parseandparseagain("\"a\"", "Roman (non-italic) font 2");
+ parseandparseagain("size 16 qv", "Resize font");
+ parseandparseagain("font sans qv", "Sans serif font");
+ parseandparseagain("font serif qv", "Serif font");
+ parseandparseagain("font fixed qv", "Fixed font");
+ parseandparseagain("color cyan qv", "Cyan color");
+ parseandparseagain("color yellow qv", "Yellow color");
+ parseandparseagain("color white qv", "White color");
+ parseandparseagain("color green qv", "Green color");
+ parseandparseagain("color blue qv", "Blue color");
+ parseandparseagain("color red qv", "Red color");
+ parseandparseagain("color green X qv", "Green color changes back");
+ parseandparseagain("color green {X qv}", "Green color, more than one item");
+}
+
+void Test::SimpleMisc()
+{
+ parseandparseagain("infinity", "Infinity");
+ parseandparseagain("partial", "Partial");
+ parseandparseagain("nabla", "Nabla");
+ parseandparseagain("exists", "There exists");
+ parseandparseagain("forall", "For all");
+ parseandparseagain("hbar", "H bar");
+ parseandparseagain("lambdabar", "Lambda bar");
+ parseandparseagain("re", "Real part");
+ parseandparseagain("im", "Imaginary part");
+ parseandparseagain("wp", "Weierstrass p");
+ parseandparseagain("leftarrow", "Left arrow");
+ parseandparseagain("rightarrow", "Right arrow");
+ parseandparseagain("uparrow", "Up arrow");
+ parseandparseagain("downarrow", "Down arrow");
+ parseandparseagain("dotslow", "Dots at bottom");
+ parseandparseagain("dotsaxis", "Dots at middle");
+ parseandparseagain("dotsvert", "Dots vertical");
+ parseandparseagain("dotsup", "Dots diagonal upward");
+ parseandparseagain("dotsdown", "Dots diagonal downward");
+}
+
+void Test::SimpleBrackets()
+{
+ parseandparseagain("(a)", "Round Brackets");
+ parseandparseagain("[b]", "Square Brackets");
+ parseandparseagain("ldbracket c rdbracket", "Double Square Brackets");
+ parseandparseagain("lline a rline", "Single line or absolute");
+ parseandparseagain("abs a", "Single line or absolute 2");
+ parseandparseagain("ldline a rdline", "Double line");
+ parseandparseagain("lbrace w rbrace", "Braces");
+ parseandparseagain("left lbrace stack{0, n <> 0 # 1, n = 1} right none", "Single left brace");
+ parseandparseagain("langle d rangle", "Angle Brackets");
+ parseandparseagain("langle a mline b rangle", "Operator Brackets");
+ parseandparseagain("{a}", "Group brackets (used for program control)");
+ parseandparseagain("left ( stack{a # b # z} right )", "Round brackets scalable");
+ parseandparseagain("left [ stack{x # y} right ]", "Square brackets scalable");
+ parseandparseagain("left ldbracket c right rdbracket", "Double square brackets scalable");
+ parseandparseagain("left lline a right rline", "Line scalable");
+ parseandparseagain("left ldline d right rdline", "Double line scalable");
+ parseandparseagain("left lbrace e right rbrace", "Brace scalable");
+ parseandparseagain("left langle f right rangle", "Angle bracket scalable");
+ parseandparseagain("left langle g mline h right rangle", "Operator brackets scalable");
+ parseandparseagain("{a} overbrace b", "Over brace scalable");
+ parseandparseagain("{b} underbrace a", "Under brace scalable");
+}
+
+void Test::SimpleFormats()
+{
+ parseandparseagain("a lsup{b}", "Left superscript");
+ parseandparseagain("a csup{b}", "Center superscript");
+ parseandparseagain("a^{b}", "Right superscript");
+ parseandparseagain("a lsub{b}", "Left subscript");
+ parseandparseagain("a csub{b}", "Center subscript");
+ parseandparseagain("a_{b}", "Right subscript");
+ parseandparseagain("stack { Hello world # alignl (a) }", "Align character to left");
+ parseandparseagain("stack{Hello world # alignc(a)}", "Align character to center");
+ parseandparseagain("stack { Hello world # alignr(a)}", "Align character to right");
+ parseandparseagain("binom{a}{b}", "Vertical stack of 2");
+ parseandparseagain("stack{a # b # z}", "Vertical stack, more than 2");
+ parseandparseagain("matrix{a # b ## c # d}", "Matrix");
+ parseandparseagain("matrix{a # \"=\" # alignl{b} ## {} # \"=\" # alignl{c+1}}", "Equations aligned at '=' (using 'matrix') ");
+ parseandparseagain("stack{alignl{a} = b # alignl{phantom{a} = c+1}}", "Equations aligned at '=' (using 'phantom') ");
+ parseandparseagain("asldkfjo newline sadkfj", "New line");
+ parseandparseagain("stuff `stuff", "Small gap (grave)");
+ parseandparseagain("stuff~stuff", "Large gap (tilde)");
+}
+
+void Test::SimpleGreekChars()
+{
+ parseandparseagain("%ALPHA", "Capital alpha");
+ parseandparseagain("%BETA", "Capital beta");
+ parseandparseagain("%CHI", "Capital chi");
+ parseandparseagain("%DELTA", "Capital delta");
+ parseandparseagain("%EPSILON", "Capital epsilon");
+ parseandparseagain("%ETA", "Capital eta");
+ parseandparseagain("%GAMMA", "Capital gamma");
+ parseandparseagain("%IOTA", "Capital iota");
+ parseandparseagain("%LAMBDA", "Capital lambda");
+ parseandparseagain("%MU", "Capital mu");
+ parseandparseagain("%NU", "Capital nu");
+ parseandparseagain("%OMEGA", "Capital omega");
+ parseandparseagain("%OMICRON", "Capital omicron");
+ parseandparseagain("%PHI", "Capital phi");
+ parseandparseagain("%PI", "Capital pi");
+ parseandparseagain("%PSI", "Capital psi");
+ parseandparseagain("%RHO", "Capital rho");
+ parseandparseagain("%SIGMA", "Capital sigma");
+ parseandparseagain("%TAU", "Capital tau");
+ parseandparseagain("%THETA", "Capital theta");
+ parseandparseagain("%UPSILON", "Capital upsilon");
+ parseandparseagain("%XI", "Capital xi");
+ parseandparseagain("%ZETA", "Capital zeta");
+ parseandparseagain("%alpha", "lowercase alpha");
+ parseandparseagain("%beta", "lowercase beta");
+ parseandparseagain("%chi", "lowercase chi");
+ parseandparseagain("%delta", "lowercase delta");
+ parseandparseagain("%epsilon", "lowercase epsilon");
+ parseandparseagain("%eta", "lowercase eta");
+ parseandparseagain("%gamma", "lowercase gamma");
+ parseandparseagain("%iota", "lowercase iota");
+ parseandparseagain("%kappa", "lowercase kappa");
+ parseandparseagain("%lambda", "lowercase lambda");
+ parseandparseagain("%mu", "lowercase mu");
+ parseandparseagain("%nu", "lowercase nu");
+ parseandparseagain("%omega", "lowercase omega");
+ parseandparseagain("%omicron", "lowercase omicron");
+ parseandparseagain("%phi", "lowercase phi");
+ parseandparseagain("%pi", "lowercase pi");
+ parseandparseagain("%psi", "lowercase psi");
+ parseandparseagain("%rho", "lowercase rho");
+ parseandparseagain("%sigma", "lowercase sigma");
+ parseandparseagain("%tau", "lowercase tau");
+ parseandparseagain("%theta", "lowercase theta");
+ parseandparseagain("%upsilon", "lowercase upsilon");
+ parseandparseagain("%varepsilon", "Varepsilon");
+ parseandparseagain("%varphi", "Varphi");
+ parseandparseagain("%varpi", "Varpi");
+ parseandparseagain("%varrho", "Varrho");
+ parseandparseagain("%varsigma", "Varsigma");
+ parseandparseagain("%vartheta", "Vartheta");
+ parseandparseagain("%xi", "lowercase xi");
+ parseandparseagain("%zeta", "lowercase zeta");
+}
+
+void Test::SimpleSpecialChars()
+{
+ parseandparseagain("%and", "And");
+ parseandparseagain("%angle", "Angle");
+ parseandparseagain("%element", "Element");
+ parseandparseagain("%identical", "Identical");
+ parseandparseagain("%infinite", "Infinite");
+ parseandparseagain("%noelement", "No element");
+ parseandparseagain("%notequal", "Not equal");
+ parseandparseagain("%or", "Or");
+ parseandparseagain("%perthousand", "Per thousand");
+ parseandparseagain("%strictlygreaterthan", "Strictly greater than");
+ parseandparseagain("%strictlylessthan", "Strictly less than");
+ parseandparseagain("%tendto", "Tend to");
+}
+
+/* This test takes a formula command, parses it, converts the node to text,
+ * parses it again, converts it to text again, and compares the values.
+ * Doing this doesn't prove that it is correct, but it should prove that the
+ * meaning of the original command is not being changed.
+ */
+void Test::parseandparseagain(const char *formula, const char *test_name)
+{
+ String input, output1, output2;
+ SmNode *pNode1, *pNode2;
+
+ // parse 1
+ input.AppendAscii(formula);
+ pNode1 = SmParser().ParseExpression(input);
+ pNode1->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ SmNodeToTextVisitor(pNode1, output1);
+
+ // parse 2
+ pNode2 = SmParser().ParseExpression(output1);
+ pNode2->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ SmNodeToTextVisitor(pNode2, output2);
+
+ // compare
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(test_name,
+ output1,
+ output2);
+
+ delete pNode1;
+ delete pNode2;
+}
+
+void Test::ParseAndCheck(const char *formula, const char * expected, const char *test_name)
+{
+ String sInput, sOutput, sExpected;
+ SmNode *pNode;
+
+ // parse
+ sInput.AppendAscii(formula);
+ pNode = SmParser().ParseExpression(sInput);
+ pNode->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ SmNodeToTextVisitor(pNode, sOutput);
+
+ // compare
+ sExpected.AppendAscii(expected);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(test_name,
+ sExpected,
+ sOutput);
+
+ delete pNode;
+}
+
+void Test::testBinomInBinHor()
+{
+ String sInput, sExpected, sOutput;
+ SmNode* pTree;
+
+ // set up a binom (table) node
+ sInput.AppendAscii("binom a b + c");
+ pTree = SmParser().Parse(sInput);
+ pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+
+ SmCursor aCursor(pTree, xDocShRef);
+ TestOutputDevice aOutputDevice;
+
+ // move forward (more than) enough places to be at the end
+ int i;
+ for (i = 0; i < 8; ++i)
+ aCursor.Move(&aOutputDevice, MoveRight);
+
+ // tack +d on the end, which will put the binom into an SmBinHorNode
+ aCursor.InsertElement(PlusElement);
+ aCursor.InsertText('d');
+
+ sExpected.AppendAscii(" { { binom a b + c } + d } ");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Binom Node in BinHor Node", sExpected, xDocShRef->GetText());
+
+ delete pTree;
+}
+
+void Test::testBinVerInUnary()
+{
+ String sInput, sExpected, sOutput;
+ SmNode* pTree;
+
+ // set up a unary operator with operand
+ sInput.AppendAscii("- 1");
+ pTree = SmParser().Parse(sInput);
+ pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+
+ SmCursor aCursor(pTree, xDocShRef);
+ TestOutputDevice aOutputDevice;
+
+ // move forward (more than) enough places to be at the end
+ int i;
+ for (i = 0; i < 3; ++i)
+ aCursor.Move(&aOutputDevice, MoveRight);
+
+ // select the operand
+ aCursor.Move(&aOutputDevice, MoveLeft, false);
+ // set up a fraction
+ aCursor.InsertFraction();
+ aCursor.Move(&aOutputDevice, MoveDown);
+ aCursor.InsertText('2');
+
+ sExpected.AppendAscii(" - { 1 over 2 } ");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Binary Vertical in Unary Operator", sExpected, xDocShRef->GetText());
+
+ delete pTree;
+}
+
+void Test::testBinHorInSubSup()
+{
+ String sInput, sExpected, sOutput;
+ SmNode* pTree;
+
+ // set up a blank formula
+ sInput.AppendAscii("");
+ pTree = SmParser().Parse(sInput);
+ pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+
+ SmCursor aCursor(pTree, xDocShRef);
+ TestOutputDevice aOutputDevice;
+
+ // Insert an RSup expression with a BinHor for the exponent
+ aCursor.InsertText('a');
+ aCursor.InsertSubSup(RSUP);
+ aCursor.InsertText('b');
+ aCursor.InsertElement(PlusElement);
+ aCursor.InsertText('c');
+
+ // Move to the end and add d to the expression
+ aCursor.Move(&aOutputDevice, MoveRight);
+ aCursor.InsertElement(PlusElement);
+ aCursor.InsertText('d');
+
+ sExpected.AppendAscii(" { a rsup { b + c } + d } ");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("BinHor in SubSup", sExpected, xDocShRef->GetText());
+
+ delete pTree;
+}
+
+void Test::testUnaryInMixedNumberAsNumerator()
+{
+ String sInput, sExpected, sOutput;
+ SmNode* pTree;
+
+ // set up a unary operator
+ sInput.AppendAscii("- 1");
+ pTree = SmParser().Parse(sInput);
+ pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+
+ SmCursor aCursor(pTree, xDocShRef);
+ TestOutputDevice aOutputDevice;
+
+ // move forward (more than) enough places to be at the end
+ int i;
+ for (i = 0; i < 3; ++i)
+ aCursor.Move(&aOutputDevice, MoveRight);
+
+ // Select the whole Unary Horizontal Node
+ aCursor.Move(&aOutputDevice, MoveLeft, false);
+ aCursor.Move(&aOutputDevice, MoveLeft, false);
+
+ // Set up a fraction
+ aCursor.InsertFraction();
+ aCursor.Move(&aOutputDevice, MoveDown);
+ aCursor.InsertText('2');
+
+ // Move left and turn this into a mixed number
+ // (bad form, but this could happen right?)
+ aCursor.Move(&aOutputDevice, MoveLeft);
+ aCursor.Move(&aOutputDevice, MoveLeft);
+ aCursor.InsertText('2');
+
+ // move forward (more than) enough places to be at the end
+ for (i = 0; i < 8; ++i)
+ aCursor.Move(&aOutputDevice, MoveRight);
+
+ // add 4 to the end
+ aCursor.InsertElement(PlusElement);
+ aCursor.InsertText('4');
+
+ sExpected.AppendAscii(" { 2 { - 1 over 2 } + 4 } ");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unary in mixed number as Numerator", sExpected, xDocShRef->GetText());
+
+ delete pTree;
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(Test);
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx
new file mode 100644
index 000000000000..0ad96525e532
--- /dev/null
+++ b/starmath/qa/cppunit/test_starmath.cxx
@@ -0,0 +1,459 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Caolán McNamara <caolanm@redhat.com> (Red Hat, Inc.)
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Caolán McNamara <caolanm@redhat.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_starmath.hxx"
+
+#ifdef WNT
+#include <prewin.h>
+#include <windows.h>
+#include <postwin.h>
+#endif
+
+#include <cppunit/TestSuite.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/TestCase.h>
+#include <cppunit/plugin/TestPlugIn.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <sal/config.h>
+
+#include <cppuhelper/bootstrap.hxx>
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XDesktop.hpp>
+
+#include <vcl/svapp.hxx>
+#include <smdll.hxx>
+#include <document.hxx>
+#include <view.hxx>
+
+#include <sfx2/sfxmodelfactory.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/dispatch.hxx>
+
+#include <svl/stritem.hxx>
+
+#include <editeng/editeng.hxx>
+#include <editeng/editview.hxx>
+
+#include <svx/zoomitem.hxx>
+
+SO2_DECL_REF(SmDocShell)
+SO2_IMPL_REF(SmDocShell)
+
+using namespace ::com::sun::star;
+
+namespace {
+
+class Test : public CppUnit::TestFixture {
+public:
+ Test();
+ ~Test();
+
+ // init
+ virtual void setUp();
+ virtual void tearDown();
+
+ // tests
+ void tmEditUndoRedo();
+ void tmEditAllClipboard();
+ void tmEditMarker();
+ void tmEditFailure();
+
+ void tViewZoom();
+
+ CPPUNIT_TEST_SUITE(Test);
+ CPPUNIT_TEST(tmEditUndoRedo);
+ CPPUNIT_TEST(tmEditAllClipboard);
+ CPPUNIT_TEST(tmEditMarker);
+ CPPUNIT_TEST(tmEditFailure);
+ CPPUNIT_TEST(tViewZoom);
+ CPPUNIT_TEST_SUITE_END();
+
+private:
+ uno::Reference<uno::XComponentContext> m_xContext;
+ uno::Reference<lang::XMultiComponentFactory> m_xFactory;
+
+ SfxBindings m_aBindings;
+ SfxDispatcher *m_pDispatcher;
+ SmCmdBoxWindow *m_pSmCmdBoxWindow;
+ SmEditWindow *m_pEditWindow;
+ SmDocShellRef m_xDocShRef;
+ SmViewShell *m_pViewShell;
+};
+
+Test::Test()
+ : m_pDispatcher(NULL)
+ , m_pSmCmdBoxWindow(NULL)
+ , m_pEditWindow(NULL)
+ , m_pViewShell(NULL)
+{
+ m_xContext = cppu::defaultBootstrap_InitialComponentContext();
+ m_xFactory = m_xContext->getServiceManager();
+
+ uno::Reference<lang::XMultiServiceFactory> xSM(m_xFactory, uno::UNO_QUERY_THROW);
+
+ //Without this we're crashing because callees are using
+ //getProcessServiceFactory. In general those should be removed in favour
+ //of retaining references to the root ServiceFactory as its passed around
+ comphelper::setProcessServiceFactory(xSM);
+
+ InitVCL(xSM);
+
+ SmDLL::Init();
+}
+
+void Test::setUp()
+{
+ m_xDocShRef = new SmDocShell(
+ SFXMODEL_STANDARD |
+ SFXMODEL_DISABLE_EMBEDDED_SCRIPTS |
+ SFXMODEL_DISABLE_DOCUMENT_RECOVERY);
+ m_xDocShRef->DoInitNew(0);
+
+ SfxViewFrame *pViewFrame = SfxViewFrame::LoadHiddenDocument(*m_xDocShRef, 0);
+
+ CPPUNIT_ASSERT_MESSAGE("Should have a SfxViewFrame", pViewFrame);
+
+ m_pDispatcher = new SfxDispatcher(pViewFrame);
+ m_aBindings.SetDispatcher(m_pDispatcher);
+ m_pSmCmdBoxWindow = new SmCmdBoxWindow(&m_aBindings, NULL, NULL);
+ m_pEditWindow = new SmEditWindow(*m_pSmCmdBoxWindow);
+ m_pViewShell = m_pEditWindow->GetView();
+ CPPUNIT_ASSERT_MESSAGE("Should have a SmViewShell", m_pViewShell);
+}
+
+void Test::tearDown()
+{
+ delete m_pEditWindow;
+ delete m_pSmCmdBoxWindow;
+ delete m_pDispatcher;
+ m_xDocShRef.Clear();
+}
+
+Test::~Test()
+{
+}
+
+void Test::tmEditMarker()
+{
+ {
+ rtl::OUString sMarkedText(RTL_CONSTASCII_USTRINGPARAM("<?> under <?> under <?>"));
+ m_pEditWindow->SetText(sMarkedText);
+ m_pEditWindow->Flush();
+ rtl::OUString sFinalText = m_pEditWindow->GetText();
+ CPPUNIT_ASSERT_MESSAGE("Should be equal text", sFinalText == sMarkedText);
+ }
+
+ {
+ rtl::OUString sTargetText(RTL_CONSTASCII_USTRINGPARAM("a under b under c"));
+
+ m_pEditWindow->SelNextMark();
+ m_pEditWindow->Cut();
+ m_pEditWindow->InsertText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("a")));
+
+ m_pEditWindow->SelNextMark();
+ m_pEditWindow->SelNextMark();
+ m_pEditWindow->Cut();
+ m_pEditWindow->InsertText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("c")));
+
+ m_pEditWindow->SelPrevMark();
+ m_pEditWindow->Cut();
+ m_pEditWindow->InsertText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("b")));
+
+ m_pEditWindow->Flush();
+ rtl::OUString sFinalText = m_pEditWindow->GetText();
+ CPPUNIT_ASSERT_MESSAGE("Should be a under b under c", sFinalText == sTargetText);
+ }
+
+ {
+ m_pEditWindow->SetText(rtl::OUString());
+ m_pEditWindow->Flush();
+ }
+}
+
+void Test::tmEditAllClipboard()
+{
+ rtl::OUString sOriginalText(RTL_CONSTASCII_USTRINGPARAM("a over b"));
+
+ {
+ m_pEditWindow->SetText(sOriginalText);
+ m_pEditWindow->Flush();
+ rtl::OUString sFinalText = m_pEditWindow->GetText();
+ CPPUNIT_ASSERT_MESSAGE("Should be equal text", sFinalText == sOriginalText);
+ }
+
+ {
+ m_pEditWindow->SelectAll();
+ m_pEditWindow->Cut();
+ m_pEditWindow->Flush();
+ rtl::OUString sFinalText = m_pEditWindow->GetText();
+ CPPUNIT_ASSERT_MESSAGE("Should be empty", !sFinalText.getLength());
+ }
+
+ {
+ m_pEditWindow->Paste();
+ m_pEditWindow->Flush();
+ rtl::OUString sFinalText = m_pEditWindow->GetText();
+ CPPUNIT_ASSERT_MESSAGE("Should be equal text", sFinalText == sOriginalText);
+ }
+
+ {
+ m_pEditWindow->SelectAll();
+ m_pEditWindow->Copy();
+ }
+
+ {
+ rtl::OUString sExpectedText(RTL_CONSTASCII_USTRINGPARAM("a over ba over b"));
+
+ m_pEditWindow->Paste();
+ m_pEditWindow->Paste();
+ m_pEditWindow->Flush();
+ rtl::OUString sFinalText = m_pEditWindow->GetText();
+ CPPUNIT_ASSERT_MESSAGE("Should be equal text", sFinalText == sExpectedText);
+ }
+
+ {
+ m_pEditWindow->SetText(rtl::OUString());
+ m_pEditWindow->Flush();
+ }
+}
+
+void Test::tmEditFailure()
+{
+ m_xDocShRef->SetText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("color a b over {a/}")));
+
+ const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser().NextError();
+
+ CPPUNIT_ASSERT_MESSAGE("Should be a PE_COLOR_EXPECTED",
+ pErrorDesc && pErrorDesc->Type == PE_COLOR_EXPECTED);
+
+ pErrorDesc = m_xDocShRef->GetParser().PrevError();
+
+ CPPUNIT_ASSERT_MESSAGE("Should be a PE_UNEXPECTED_CHAR",
+ pErrorDesc && pErrorDesc->Type == PE_UNEXPECTED_CHAR);
+
+ pErrorDesc = m_xDocShRef->GetParser().PrevError();
+
+ CPPUNIT_ASSERT_MESSAGE("Should be a PE_RGROUP_EXPECTED",
+ pErrorDesc && pErrorDesc->Type == PE_RGROUP_EXPECTED);
+
+ const SmErrorDesc *pLastErrorDesc = m_xDocShRef->GetParser().PrevError();
+
+ CPPUNIT_ASSERT_MESSAGE("Should be three syntax errors",
+ pLastErrorDesc && pLastErrorDesc == pErrorDesc);
+}
+
+void Test::tmEditUndoRedo()
+{
+ EditEngine &rEditEngine = m_xDocShRef->GetEditEngine();
+
+ rtl::OUString sStringOne(RTL_CONSTASCII_USTRINGPARAM("a under b"));
+ {
+ rEditEngine.SetText(0, sStringOne);
+ m_xDocShRef->UpdateText();
+ rtl::OUString sFinalText = m_xDocShRef->GetText();
+ CPPUNIT_ASSERT_MESSAGE("Strings must match", sStringOne == sFinalText);
+ }
+
+ rtl::OUString sStringTwo(RTL_CONSTASCII_USTRINGPARAM("a over b"));
+ {
+ rEditEngine.SetText(0, sStringTwo);
+ m_xDocShRef->UpdateText();
+ rtl::OUString sFinalText = m_xDocShRef->GetText();
+ CPPUNIT_ASSERT_MESSAGE("Strings must match", sStringTwo == sFinalText);
+ }
+
+ SfxRequest aUndo(SID_UNDO, SFX_CALLMODE_SYNCHRON, m_xDocShRef->GetPool());
+
+ {
+ m_xDocShRef->Execute(aUndo);
+ rtl::OUString sFoo = rEditEngine.GetText();
+ m_xDocShRef->UpdateText();
+ rtl::OUString sFinalText = m_xDocShRef->GetText();
+ CPPUNIT_ASSERT_MESSAGE("Strings much match", sStringOne == sFinalText);
+ }
+
+ {
+ m_xDocShRef->Execute(aUndo);
+ rtl::OUString sFoo = rEditEngine.GetText();
+ m_xDocShRef->UpdateText();
+ rtl::OUString sFinalText = m_xDocShRef->GetText();
+ CPPUNIT_ASSERT_MESSAGE("Must now be empty", !sFinalText.getLength());
+ }
+
+ SfxRequest aRedo(SID_REDO, SFX_CALLMODE_SYNCHRON, m_xDocShRef->GetPool());
+ {
+ m_xDocShRef->Execute(aRedo);
+ rtl::OUString sFoo = rEditEngine.GetText();
+ m_xDocShRef->UpdateText();
+ rtl::OUString sFinalText = m_xDocShRef->GetText();
+ CPPUNIT_ASSERT_MESSAGE("Strings much match", sStringOne == sFinalText);
+ }
+
+ {
+ rEditEngine.SetText(0, rtl::OUString());
+ m_xDocShRef->UpdateText();
+ rEditEngine.ClearModifyFlag();
+ rtl::OUString sFinalText = m_xDocShRef->GetText();
+ CPPUNIT_ASSERT_MESSAGE("Must be empty", !sFinalText.getLength());
+ }
+
+}
+
+void Test::tViewZoom()
+{
+ sal_uInt16 nOrigZoom, nNextZoom, nFinalZoom;
+
+ EditEngine &rEditEngine = m_xDocShRef->GetEditEngine();
+
+ rtl::OUString sStringOne(RTL_CONSTASCII_USTRINGPARAM("a under b"));
+ {
+ rEditEngine.SetText(0, sStringOne);
+ m_xDocShRef->UpdateText();
+ rtl::OUString sFinalText = m_xDocShRef->GetText();
+ CPPUNIT_ASSERT_MESSAGE("Strings must match", sStringOne == sFinalText);
+ }
+
+ SmGraphicWindow &rGraphicWindow = m_pViewShell->GetGraphicWindow();
+ rGraphicWindow.SetSizePixel(Size(1024, 800));
+ nOrigZoom = rGraphicWindow.GetZoom();
+
+ {
+ SfxRequest aZoomIn(SID_ZOOMIN, SFX_CALLMODE_SYNCHRON, m_pViewShell->GetPool());
+ m_pViewShell->Execute(aZoomIn);
+ nNextZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should be bigger", nNextZoom > nOrigZoom);
+ }
+
+ {
+ SfxRequest aZoomOut(SID_ZOOMOUT, SFX_CALLMODE_SYNCHRON, m_pViewShell->GetPool());
+ m_pViewShell->Execute(aZoomOut);
+ nFinalZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should be equal", nFinalZoom == nOrigZoom);
+ }
+
+ sal_uInt16 nOptimalZoom=0;
+
+ {
+ SfxRequest aZoom(SID_FITINWINDOW, SFX_CALLMODE_SYNCHRON, m_pViewShell->GetPool());
+ m_pViewShell->Execute(aZoom);
+ nOptimalZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should be about 800%", nOptimalZoom > nOrigZoom);
+ }
+
+ {
+ SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ aSet.Put(SvxZoomItem(SVX_ZOOM_OPTIMAL, 0));
+ SfxRequest aZoom(SID_ATTR_ZOOM, SFX_CALLMODE_SYNCHRON, aSet);
+ m_pViewShell->Execute(aZoom);
+ nFinalZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should be optimal zoom", nFinalZoom == nOptimalZoom);
+ }
+
+//To-Do: investigate GetPrinter logic of SVX_ZOOM_PAGEWIDTH/SVX_ZOOM_WHOLEPAGE to ensure
+//consistent value regardless of
+#if 0
+ {
+ SfxRequest aZoomOut(SID_ZOOMOUT, SFX_CALLMODE_SYNCHRON, m_pViewShell->GetPool());
+ m_pViewShell->Execute(aZoomOut);
+ nFinalZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should not be optimal zoom", nFinalZoom != nOptimalZoom);
+
+ SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ aSet.Put(SvxZoomItem(SVX_ZOOM_PAGEWIDTH, 0));
+ SfxRequest aZoom(SID_ATTR_ZOOM, SFX_CALLMODE_SYNCHRON, aSet);
+ m_pViewShell->Execute(aZoom);
+ nFinalZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should be same as optimal zoom", nFinalZoom == nOptimalZoom);
+ }
+
+ {
+ SfxRequest aZoomOut(SID_ZOOMOUT, SFX_CALLMODE_SYNCHRON, m_pViewShell->GetPool());
+ m_pViewShell->Execute(aZoomOut);
+ nFinalZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should not be optimal zoom", nFinalZoom != nOptimalZoom);
+
+ SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ aSet.Put(SvxZoomItem(SVX_ZOOM_WHOLEPAGE, 0));
+ SfxRequest aZoom(SID_ATTR_ZOOM, SFX_CALLMODE_SYNCHRON, aSet);
+ m_pViewShell->Execute(aZoom);
+ nFinalZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should be same as optimal zoom", nFinalZoom == nOptimalZoom);
+ }
+#endif
+
+ {
+ SfxRequest aZoomOut(SID_ZOOMOUT, SFX_CALLMODE_SYNCHRON, m_pViewShell->GetPool());
+ m_pViewShell->Execute(aZoomOut);
+ nFinalZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should not be optimal zoom", nFinalZoom != nOptimalZoom);
+
+ SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ aSet.Put(SvxZoomItem(SVX_ZOOM_PERCENT, 50));
+ SfxRequest aZoom(SID_ATTR_ZOOM, SFX_CALLMODE_SYNCHRON, aSet);
+ m_pViewShell->Execute(aZoom);
+ nFinalZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should be 50%", nFinalZoom == 50);
+ }
+
+ {
+ SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ aSet.Put(SvxZoomItem(SVX_ZOOM_PERCENT, 5));
+ SfxRequest aZoom(SID_ATTR_ZOOM, SFX_CALLMODE_SYNCHRON, aSet);
+ m_pViewShell->Execute(aZoom);
+ nFinalZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should be Clipped to 25%", nFinalZoom == 25);
+ }
+
+ {
+ SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ aSet.Put(SvxZoomItem(SVX_ZOOM_PERCENT, 1000));
+ SfxRequest aZoom(SID_ATTR_ZOOM, SFX_CALLMODE_SYNCHRON, aSet);
+ m_pViewShell->Execute(aZoom);
+ nFinalZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should be Clipped to 800%", nFinalZoom == 800);
+ }
+
+ {
+ SfxRequest aZoom(SID_ADJUST, SFX_CALLMODE_SYNCHRON, m_pViewShell->GetPool());
+ m_pViewShell->Execute(aZoom);
+ nFinalZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should be the same as optimal", nOptimalZoom == nFinalZoom);
+ }
+
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(Test);
+
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/qa/cppunit/version.map b/starmath/qa/cppunit/version.map
new file mode 100644
index 000000000000..3308588ef6f8
--- /dev/null
+++ b/starmath/qa/cppunit/version.map
@@ -0,0 +1,34 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+UDK_3_0_0 {
+ global:
+ cppunitTestPlugIn;
+
+ local:
+ *;
+};
diff --git a/starmath/sdi/smath.sdi b/starmath/sdi/smath.sdi
index 4b9eaedac599..8779706b08e2 100755
--- a/starmath/sdi/smath.sdi
+++ b/starmath/sdi/smath.sdi
@@ -378,7 +378,7 @@ SfxVoidItem InsertCommand SID_INSERTCOMMAND
]
//--------------------------------------------------------------------------
-SfxVoidItem InsertConfigName SID_INSERTTEXT
+SfxVoidItem InsertConfigName SID_INSERTSYMBOL
()
[
/* flags: */
diff --git a/starmath/sdi/smslots.sdi b/starmath/sdi/smslots.sdi
index 69cecf25f308..cc259af5d117 100755
--- a/starmath/sdi/smslots.sdi
+++ b/starmath/sdi/smslots.sdi
@@ -270,7 +270,7 @@ interface FormulaView
StateMethod = GetState ;
]
//idlpp kein Menueeintrag , also keine Texte
- SID_INSERTTEXT //idlpp ole : no , status : no
+ SID_INSERTSYMBOL //idlpp ole : no , status : no
[
ExecMethod = Execute ;
StateMethod = GetState ;
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index e8310d12098c..590d3fa5eb68 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,12 +43,12 @@
#include <com/sun/star/i18n/WordType.hpp>
#include <unotools/accessiblestatesethelper.hxx>
#include <comphelper/accessibleeventnotifier.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
#include <vcl/unohelp2.hxx>
#include <tools/gen.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <svl/itemset.hxx>
#include <editeng/editobj.hxx>
@@ -60,17 +61,16 @@
#include "accessibility.hxx"
#include <applicat.hxx>
+#include <unomodel.hxx>
#include <document.hxx>
#include <view.hxx>
-using namespace rtl;
+using rtl::OUString;
using namespace com::sun::star;
using namespace com::sun::star::lang;
using namespace com::sun::star::uno;
using namespace com::sun::star::accessibility;
-#define A2OU(cChar) rtl::OUString::createFromAscii(cChar)
-
//////////////////////////////////////////////////////////////////////
static awt::Rectangle lcl_GetBounds( Window *pWin )
@@ -121,8 +121,7 @@ SmGraphicAccessible::SmGraphicAccessible( SmGraphicWindow *pGraphicWin ) :
nClientId (0),
pWin (pGraphicWin)
{
- DBG_ASSERT( pWin, "SmGraphicAccessible: window missing" );
- //++aRefCount;
+ OSL_ENSURE( pWin, "SmGraphicAccessible: window missing" );
}
@@ -131,21 +130,13 @@ SmGraphicAccessible::SmGraphicAccessible( const SmGraphicAccessible &rSmAcc ) :
aAccName ( String(SmResId(RID_DOCUMENTSTR)) ),
nClientId (0)
{
- //vos::OGuard aGuard(Application::GetSolarMutex());
pWin = rSmAcc.pWin;
- DBG_ASSERT( pWin, "SmGraphicAccessible: window missing" );
- //++aRefCount;
+ OSL_ENSURE( pWin, "SmGraphicAccessible: window missing" );
}
SmGraphicAccessible::~SmGraphicAccessible()
{
-/*
- vos::OGuard aGuard(Application::GetSolarMutex());
- if (--aRefCount == 0)
- {
- }
-*/
}
@@ -194,7 +185,7 @@ void SmGraphicAccessible::LaunchEvent(
uno::Reference< XAccessibleContext > SAL_CALL SmGraphicAccessible::getAccessibleContext()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return this;
}
@@ -204,7 +195,7 @@ sal_Bool SAL_CALL SmGraphicAccessible::containsPoint( const awt::Point& aPoint )
//! the arguments coordinates are relativ to the current window !
//! Thus the top-left point is (0, 0)
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
@@ -217,7 +208,7 @@ uno::Reference< XAccessible > SAL_CALL SmGraphicAccessible::getAccessibleAtPoint
const awt::Point& aPoint )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
XAccessible *pRes = 0;
if (containsPoint( aPoint ))
pRes = this;
@@ -227,10 +218,10 @@ uno::Reference< XAccessible > SAL_CALL SmGraphicAccessible::getAccessibleAtPoint
awt::Rectangle SAL_CALL SmGraphicAccessible::getBounds()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
- DBG_ASSERT(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
+ OSL_ENSURE(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
"mismatch of window parent and accessible parent" );
return lcl_GetBounds( pWin );
}
@@ -238,10 +229,10 @@ awt::Rectangle SAL_CALL SmGraphicAccessible::getBounds()
awt::Point SAL_CALL SmGraphicAccessible::getLocation()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
- DBG_ASSERT(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
+ OSL_ENSURE(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
"mismatch of window parent and accessible parent" );
awt::Rectangle aRect( lcl_GetBounds( pWin ) );
return awt::Point( aRect.X, aRect.Y );
@@ -250,10 +241,10 @@ awt::Point SAL_CALL SmGraphicAccessible::getLocation()
awt::Point SAL_CALL SmGraphicAccessible::getLocationOnScreen()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
- DBG_ASSERT(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
+ OSL_ENSURE(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
"mismatch of window parent and accessible parent" );
return lcl_GetLocationOnScreen( pWin );
}
@@ -261,17 +252,17 @@ awt::Point SAL_CALL SmGraphicAccessible::getLocationOnScreen()
awt::Size SAL_CALL SmGraphicAccessible::getSize()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
- DBG_ASSERT(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
+ OSL_ENSURE(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
"mismatch of window parent and accessible parent" );
Size aSz( pWin->GetSizePixel() );
#if OSL_DEBUG_LEVEL > 1
awt::Rectangle aRect( lcl_GetBounds( pWin ) );
Size aSz2( aRect.Width, aRect.Height );
- DBG_ASSERT( aSz == aSz2, "mismatch in width" );
+ OSL_ENSURE( aSz == aSz2, "mismatch in width" );
#endif
return awt::Size( aSz.Width(), aSz.Height() );
}
@@ -279,7 +270,7 @@ awt::Size SAL_CALL SmGraphicAccessible::getSize()
void SAL_CALL SmGraphicAccessible::grabFocus()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
@@ -289,7 +280,7 @@ void SAL_CALL SmGraphicAccessible::grabFocus()
sal_Int32 SAL_CALL SmGraphicAccessible::getForeground()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
@@ -299,7 +290,7 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getForeground()
sal_Int32 SAL_CALL SmGraphicAccessible::getBackground()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
@@ -315,7 +306,7 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getBackground()
sal_Int32 SAL_CALL SmGraphicAccessible::getAccessibleChildCount()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return 0;
}
@@ -323,27 +314,26 @@ Reference< XAccessible > SAL_CALL SmGraphicAccessible::getAccessibleChild(
sal_Int32 /*i*/ )
throw (IndexOutOfBoundsException, RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
throw IndexOutOfBoundsException(); // there is no child...
- /*return 0;*/
}
Reference< XAccessible > SAL_CALL SmGraphicAccessible::getAccessibleParent()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
Window *pAccParent = pWin->GetAccessibleParentWindow();
- DBG_ASSERT( pAccParent, "accessible parent missing" );
+ OSL_ENSURE( pAccParent, "accessible parent missing" );
return pAccParent ? pAccParent->GetAccessible() : Reference< XAccessible >();
}
sal_Int32 SAL_CALL SmGraphicAccessible::getAccessibleIndexInParent()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int32 nIdx = -1;
Window *pAccParent = pWin ? pWin->GetAccessibleParentWindow() : 0;
if (pAccParent)
@@ -359,14 +349,14 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getAccessibleIndexInParent()
sal_Int16 SAL_CALL SmGraphicAccessible::getAccessibleRole()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return AccessibleRole::DOCUMENT;
}
OUString SAL_CALL SmGraphicAccessible::getAccessibleDescription()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SmDocShell *pDoc = GetDoc_Impl();
return pDoc ? OUString(pDoc->GetText()) : OUString();
}
@@ -374,14 +364,14 @@ OUString SAL_CALL SmGraphicAccessible::getAccessibleDescription()
OUString SAL_CALL SmGraphicAccessible::getAccessibleName()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return aAccName;
}
Reference< XAccessibleRelationSet > SAL_CALL SmGraphicAccessible::getAccessibleRelationSet()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Reference< XAccessibleRelationSet > xRelSet = new utl::AccessibleRelationSetHelper();
return xRelSet; // empty relation set
}
@@ -389,7 +379,7 @@ Reference< XAccessibleRelationSet > SAL_CALL SmGraphicAccessible::getAccessibleR
Reference< XAccessibleStateSet > SAL_CALL SmGraphicAccessible::getAccessibleStateSet()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
::utl::AccessibleStateSetHelper *pStateSet =
new ::utl::AccessibleStateSetHelper;
@@ -399,9 +389,6 @@ Reference< XAccessibleStateSet > SAL_CALL SmGraphicAccessible::getAccessibleStat
pStateSet->AddState( AccessibleStateType::DEFUNC );
else
{
- //pStateSet->AddState( AccessibleStateType::EDITABLE );
- //pStateSet->AddState( AccessibleStateType::HORIZONTAL );
- //pStateSet->AddState( AccessibleStateType::TRANSIENT );
pStateSet->AddState( AccessibleStateType::ENABLED );
pStateSet->AddState( AccessibleStateType::FOCUSABLE );
if (pWin->HasFocus())
@@ -422,7 +409,7 @@ Reference< XAccessibleStateSet > SAL_CALL SmGraphicAccessible::getAccessibleStat
Locale SAL_CALL SmGraphicAccessible::getLocale()
throw (IllegalAccessibleComponentStateException, RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// should be the document language...
// We use the language of the localized symbol names here.
return Application::GetSettings().GetUILocale();
@@ -435,7 +422,7 @@ void SAL_CALL SmGraphicAccessible::addEventListener(
{
if (xListener.is())
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (pWin)
{
if (!nClientId)
@@ -451,7 +438,7 @@ void SAL_CALL SmGraphicAccessible::removeEventListener(
{
if (xListener.is())
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( nClientId, xListener );
if ( !nListenerCount )
{
@@ -468,7 +455,7 @@ void SAL_CALL SmGraphicAccessible::removeEventListener(
sal_Int32 SAL_CALL SmGraphicAccessible::getCaretPosition()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return 0;
}
@@ -477,7 +464,7 @@ sal_Bool SAL_CALL SmGraphicAccessible::setCaretPosition( sal_Int32 nIndex )
{
xub_StrLen nIdx = (xub_StrLen) nIndex;
String aTxt( GetAccessibleText_Impl() );
- if (!(/*0 <= nIdx &&*/ nIdx < aTxt.Len()))
+ if (!(nIdx < aTxt.Len()))
throw IndexOutOfBoundsException();
return sal_False;
}
@@ -485,11 +472,11 @@ sal_Bool SAL_CALL SmGraphicAccessible::setCaretPosition( sal_Int32 nIndex )
sal_Unicode SAL_CALL SmGraphicAccessible::getCharacter( sal_Int32 nIndex )
throw (IndexOutOfBoundsException, RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
xub_StrLen nIdx = (xub_StrLen) nIndex;
String aTxt( GetAccessibleText_Impl() );
- if (!(/*0 <= nIdx &&*/ nIdx < aTxt.Len()))
+ if (!(nIdx < aTxt.Len()))
throw IndexOutOfBoundsException();
return aTxt.GetChar( nIdx );
}
@@ -499,7 +486,7 @@ Sequence< beans::PropertyValue > SAL_CALL SmGraphicAccessible::getCharacterAttri
const uno::Sequence< ::rtl::OUString > & /*rRequestedAttributes*/ )
throw (IndexOutOfBoundsException, RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int32 nLen = GetAccessibleText_Impl().Len();
if (!(0 <= nIndex && nIndex < nLen))
throw IndexOutOfBoundsException();
@@ -509,7 +496,7 @@ Sequence< beans::PropertyValue > SAL_CALL SmGraphicAccessible::getCharacterAttri
awt::Rectangle SAL_CALL SmGraphicAccessible::getCharacterBounds( sal_Int32 nIndex )
throw (IndexOutOfBoundsException, RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
awt::Rectangle aRes;
@@ -523,10 +510,10 @@ awt::Rectangle SAL_CALL SmGraphicAccessible::getCharacterBounds( sal_Int32 nInde
if (!pDoc)
throw RuntimeException();
String aTxt( GetAccessibleText_Impl() );
- if (!(0 <= nIndex && nIndex <= aTxt.Len())) // #108812# aTxt.Len() is valid
+ if (!(0 <= nIndex && nIndex <= aTxt.Len())) // aTxt.Len() is valid
throw IndexOutOfBoundsException();
- // #108812# find a reasonable rectangle for position aTxt.Len().
+ // find a reasonable rectangle for position aTxt.Len().
bool bWasBehindText = (nIndex == aTxt.Len());
if (bWasBehindText && nIndex)
--nIndex;
@@ -538,8 +525,8 @@ awt::Rectangle SAL_CALL SmGraphicAccessible::getCharacterBounds( sal_Int32 nInde
if (pNode)
{
sal_Int32 nAccIndex = pNode->GetAccessibleIndex();
- DBG_ASSERT( nAccIndex >= 0, "invalid accessible index" );
- DBG_ASSERT( nIndex >= nAccIndex, "index out of range" );
+ OSL_ENSURE( nAccIndex >= 0, "invalid accessible index" );
+ OSL_ENSURE( nIndex >= nAccIndex, "index out of range" );
String aNodeText;
pNode->GetAccessibleText( aNodeText );
@@ -549,8 +536,6 @@ awt::Rectangle SAL_CALL SmGraphicAccessible::getCharacterBounds( sal_Int32 nInde
// get appropriate rectangle
Point aOffset(pNode->GetTopLeft() - pTree->GetTopLeft());
Point aTLPos (pWin->GetFormulaDrawPos() + aOffset);
-// aTLPos.X() -= pNode->GetItalicLeftSpace();
-// Size aSize (pNode->GetItalicSize());
aTLPos.X() -= 0;
Size aSize (pNode->GetSize());
@@ -574,7 +559,7 @@ awt::Rectangle SAL_CALL SmGraphicAccessible::getCharacterBounds( sal_Int32 nInde
}
}
- // #108812# take rectangle from last character and move it to the right
+ // take rectangle from last character and move it to the right
if (bWasBehindText)
aRes.X += aRes.Width;
}
@@ -585,14 +570,14 @@ awt::Rectangle SAL_CALL SmGraphicAccessible::getCharacterBounds( sal_Int32 nInde
sal_Int32 SAL_CALL SmGraphicAccessible::getCharacterCount()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return GetAccessibleText_Impl().Len();
}
sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( const awt::Point& aPoint )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int32 nRes = -1;
if (pWin)
@@ -617,9 +602,7 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( const awt::Point& aPoin
{
// get appropriate rectangle
Point aOffset( pNode->GetTopLeft() - pTree->GetTopLeft() );
- Point aTLPos ( /*pWin->GetFormulaDrawPos() +*/ aOffset );
-// aTLPos.X() -= pNode->GetItalicLeftSpace();
-// Size aSize( pNode->GetItalicSize() );
+ Point aTLPos ( aOffset );
aTLPos.X() -= 0;
Size aSize( pNode->GetSize() );
#if OSL_DEBUG_LEVEL > 1
@@ -630,10 +613,10 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( const awt::Point& aPoin
Rectangle aRect( aTLPos, aSize );
if (aRect.IsInside( aPos ))
{
- DBG_ASSERT( pNode->IsVisible(), "node is not a leaf" );
+ OSL_ENSURE( pNode->IsVisible(), "node is not a leaf" );
String aTxt;
pNode->GetAccessibleText( aTxt );
- DBG_ASSERT( aTxt.Len(), "no accessible text available" );
+ OSL_ENSURE( aTxt.Len(), "no accessible text available" );
long nNodeX = pNode->GetLeft();
@@ -646,8 +629,8 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( const awt::Point& aPoin
nRes = i;
}
delete[] pXAry;
- DBG_ASSERT( nRes >= 0 && nRes < aTxt.Len(), "index out of range" );
- DBG_ASSERT( pNode->GetAccessibleIndex() >= 0,
+ OSL_ENSURE( nRes >= 0 && nRes < aTxt.Len(), "index out of range" );
+ OSL_ENSURE( pNode->GetAccessibleIndex() >= 0,
"invalid accessible index" );
nRes = pNode->GetAccessibleIndex() + nRes;
@@ -660,21 +643,21 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( const awt::Point& aPoin
OUString SAL_CALL SmGraphicAccessible::getSelectedText()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return OUString();
}
sal_Int32 SAL_CALL SmGraphicAccessible::getSelectionStart()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return -1;
}
sal_Int32 SAL_CALL SmGraphicAccessible::getSelectionEnd()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return -1;
}
@@ -683,7 +666,7 @@ sal_Bool SAL_CALL SmGraphicAccessible::setSelection(
sal_Int32 nEndIndex )
throw (IndexOutOfBoundsException, RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int32 nLen = GetAccessibleText_Impl().Len();
if (!(0 <= nStartIndex && nStartIndex < nLen) ||
!(0 <= nEndIndex && nEndIndex < nLen))
@@ -694,7 +677,7 @@ sal_Bool SAL_CALL SmGraphicAccessible::setSelection(
OUString SAL_CALL SmGraphicAccessible::getText()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return GetAccessibleText_Impl();
}
@@ -707,23 +690,23 @@ OUString SAL_CALL SmGraphicAccessible::getTextRange(
//!! text should be copied exclusive that end index though. And arguments
//!! may be switched.
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
String aTxt( GetAccessibleText_Impl() );
xub_StrLen nStart = (xub_StrLen) Min(nStartIndex, nEndIndex);
xub_StrLen nEnd = (xub_StrLen) Max(nStartIndex, nEndIndex);
- if (!(/*0 <= nStart &&*/ nStart <= aTxt.Len()) ||
- !(/*0 <= nEnd &&*/ nEnd <= aTxt.Len()))
+ if (!(nStart <= aTxt.Len()) ||
+ !(nEnd <= aTxt.Len()))
throw IndexOutOfBoundsException();
return aTxt.Copy( nStart, nEnd - nStart );
}
::com::sun::star::accessibility::TextSegment SAL_CALL SmGraphicAccessible::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
String aTxt( GetAccessibleText_Impl() );
xub_StrLen nIdx = (xub_StrLen) nIndex;
//!! nIndex is allowed to be the string length
- if (!(/*0 <= nIdx &&*/ nIdx <= aTxt.Len()))
+ if (!(nIdx <= aTxt.Len()))
throw IndexOutOfBoundsException();
::com::sun::star::accessibility::TextSegment aResult;
@@ -740,11 +723,11 @@ OUString SAL_CALL SmGraphicAccessible::getTextRange(
::com::sun::star::accessibility::TextSegment SAL_CALL SmGraphicAccessible::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
String aTxt( GetAccessibleText_Impl() );
xub_StrLen nIdx = (xub_StrLen) nIndex;
//!! nIndex is allowed to be the string length
- if (!(/*0 <= nIdx &&*/ nIdx <= aTxt.Len()))
+ if (!(nIdx <= aTxt.Len()))
throw IndexOutOfBoundsException();
::com::sun::star::accessibility::TextSegment aResult;
@@ -762,11 +745,11 @@ OUString SAL_CALL SmGraphicAccessible::getTextRange(
::com::sun::star::accessibility::TextSegment SAL_CALL SmGraphicAccessible::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
String aTxt( GetAccessibleText_Impl() );
xub_StrLen nIdx = (xub_StrLen) nIndex;
//!! nIndex is allowed to be the string length
- if (!(/*0 <= nIdx &&*/ nIdx <= aTxt.Len()))
+ if (!(nIdx <= aTxt.Len()))
throw IndexOutOfBoundsException();
::com::sun::star::accessibility::TextSegment aResult;
@@ -788,7 +771,7 @@ sal_Bool SAL_CALL SmGraphicAccessible::copyText(
sal_Int32 nEndIndex )
throw (IndexOutOfBoundsException, RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bReturn = sal_False;
if (!pWin)
@@ -820,7 +803,6 @@ sal_Bool SAL_CALL SmGraphicAccessible::copyText(
OUString SAL_CALL SmGraphicAccessible::getImplementationName()
throw (RuntimeException)
{
- //vos::OGuard aGuard(Application::GetSolarMutex());
return A2OU("SmGraphicAccessible");
}
@@ -828,7 +810,6 @@ sal_Bool SAL_CALL SmGraphicAccessible::supportsService(
const OUString& rServiceName )
throw (RuntimeException)
{
- //vos::OGuard aGuard(Application::GetSolarMutex());
return rServiceName == A2OU( "com::sun::star::accessibility::Accessible" ) ||
rServiceName == A2OU( "com::sun::star::accessibility::AccessibleComponent" ) ||
rServiceName == A2OU( "com::sun::star::accessibility::AccessibleContext" ) ||
@@ -838,7 +819,6 @@ sal_Bool SAL_CALL SmGraphicAccessible::supportsService(
Sequence< OUString > SAL_CALL SmGraphicAccessible::getSupportedServiceNames()
throw (RuntimeException)
{
- //vos::OGuard aGuard(Application::GetSolarMutex());
Sequence< OUString > aNames(4);
OUString *pNames = aNames.getArray();
pNames[0] = A2OU( "com::sun::star::accessibility::Accessible" );
@@ -867,7 +847,6 @@ SmEditSource::SmEditSource( const SmEditSource &rSrc ) :
aEditViewFwd(rSrc.rEditAcc),
rEditAcc (rSrc.rEditAcc)
{
- //aBroadCaster; can be completely new
}
SmEditSource::~SmEditSource()
@@ -1038,7 +1017,7 @@ String SmTextForwarder::GetText( const ESelection& rSel ) const
SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
- DBG_ASSERT( pEditEngine, "EditEngine missing" );
+ OSL_ENSURE( pEditEngine, "EditEngine missing" );
if( rSel.nStartPara == rSel.nEndPara )
{
sal_uInt8 nFlags = 0;
@@ -1054,7 +1033,7 @@ SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHa
nFlags = GETATTRIBS_CHARATTRIBS;
break;
default:
- DBG_ERROR("unknown flags for SmTextForwarder::GetAttribs");
+ OSL_FAIL("unknown flags for SmTextForwarder::GetAttribs");
}
return pEditEngine->GetAttribs( rSel.nStartPara, rSel.nStartPos, rSel.nEndPos, nFlags );
@@ -1068,7 +1047,7 @@ SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHa
SfxItemSet SmTextForwarder::GetParaAttribs( sal_uInt16 nPara ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
- DBG_ASSERT( pEditEngine, "EditEngine missing" );
+ OSL_ENSURE( pEditEngine, "EditEngine missing" );
SfxItemSet aSet( pEditEngine->GetParaAttribs( nPara ) );
@@ -1188,8 +1167,8 @@ sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection&
// get list of char attribs
rEditEngine.GetCharAttribs( nPara, aAttribs );
- sal_Bool bEmpty = sal_True; // we found no item inside the selektion of this paragraph
- sal_Bool bGaps = sal_False; // we found items but theire gaps between them
+ bool bEmpty = true; // we found no item inside the selektion of this paragraph
+ bool bGaps = false; // we found items but theire gaps between them
sal_uInt16 nLastEnd = nPos;
const SfxPoolItem* pParaItem = NULL;
@@ -1197,7 +1176,7 @@ sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection&
for( sal_uInt16 nAttrib = 0; nAttrib < aAttribs.Count(); nAttrib++ )
{
struct EECharAttrib aAttrib = aAttribs.GetObject( nAttrib );
- DBG_ASSERT( aAttrib.pAttr, "GetCharAttribs gives corrupt data" );
+ OSL_ENSURE( aAttrib.pAttr, "GetCharAttribs gives corrupt data" );
const sal_Bool bEmptyPortion = aAttrib.nStart == aAttrib.nEnd;
if( (!bEmptyPortion && (aAttrib.nStart >= nEndPos)) || (bEmptyPortion && (aAttrib.nStart > nEndPos)) )
@@ -1222,55 +1201,16 @@ sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection&
}
if( bEmpty )
- bEmpty = sal_False;
+ bEmpty = false;
if( !bGaps && aAttrib.nStart > nLastEnd )
- bGaps = sal_True;
+ bGaps = true;
nLastEnd = aAttrib.nEnd;
}
if( !bEmpty && !bGaps && nLastEnd < ( nEndPos - 1 ) )
- bGaps = sal_True;
-/*
- // since we have no portion with our item or if there were gaps
- if( bEmpty || bGaps )
- {
- // we need to check the paragraph item
- const SfxItemSet& rParaSet = rEditEngine.GetParaAttribs( nPara );
- if( rParaSet.GetItemState( nWhich ) == SFX_ITEM_SET )
- {
- eState = SFX_ITEM_SET;
- // get item from the paragraph
- const SfxPoolItem* pTempItem = rParaSet.GetItem( nWhich );
- if( pParaItem )
- {
- if( *pParaItem != *pTempItem )
- return SFX_ITEM_DONTCARE;
- }
- else
- {
- pParaItem = pTempItem;
- }
-
- // set if theres no last item or if its the same
- eParaState = SFX_ITEM_SET;
- }
- else if( bEmpty )
- {
- eParaState = SFX_ITEM_DEFAULT;
- }
- else if( bGaps )
- {
- // gaps and item not set in paragraph, thats a dont care
- return SFX_ITEM_DONTCARE;
- }
- }
- else
- {
- eParaState = SFX_ITEM_SET;
- }
-*/
+ bGaps = true;
if( bEmpty )
eParaState = SFX_ITEM_DEFAULT;
else if( bGaps )
@@ -1345,7 +1285,7 @@ Rectangle SmTextForwarder::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex )
if (pEditEngine)
{
- // #108900# Handle virtual position one-past-the end of the string
+ // Handle virtual position one-past-the end of the string
if( nIndex >= pEditEngine->GetTextLen(nPara) )
{
if( nIndex )
@@ -1708,8 +1648,7 @@ SmEditAccessible::SmEditAccessible( SmEditWindow *pEditWin ) :
pTextHelper (0),
pWin (pEditWin)
{
- DBG_ASSERT( pWin, "SmEditAccessible: window missing" );
- //++aRefCount;
+ OSL_ENSURE( pWin, "SmEditAccessible: window missing" );
}
@@ -1717,26 +1656,18 @@ SmEditAccessible::SmEditAccessible( const SmEditAccessible &rSmAcc ) :
SmEditAccessibleBaseClass(),
aAccName ( String(SmResId(STR_CMDBOXWINDOW)) )
{
- //vos::OGuard aGuard(Application::GetSolarMutex());
pWin = rSmAcc.pWin;
- DBG_ASSERT( pWin, "SmEditAccessible: window missing" );
- //++aRefCount;
+ OSL_ENSURE( pWin, "SmEditAccessible: window missing" );
}
SmEditAccessible::~SmEditAccessible()
{
delete pTextHelper;
-/*
- vos::OGuard aGuard(Application::GetSolarMutex());
- if (--aRefCount == 0)
- {
- }
-*/
}
void SmEditAccessible::Init()
{
- DBG_ASSERT( pWin, "SmEditAccessible: window missing" );
+ OSL_ENSURE( pWin, "SmEditAccessible: window missing" );
if (pWin)
{
EditEngine *pEditEngine = pWin->GetEditEngine();
@@ -1751,17 +1682,9 @@ void SmEditAccessible::Init()
}
}
-#ifdef TL_NOT_YET_USED
-SmDocShell * SmEditAccessible::GetDoc_Impl()
-{
- SmViewShell *pView = pWin ? pWin->GetView() : 0;
- return pView ? pView->GetDoc() : 0;
-}
-#endif // TL_NOT_YET_USED
-
void SmEditAccessible::ClearWin()
{
- // #112565# remove handler before current object gets destroyed
+ // remove handler before current object gets destroyed
// (avoid handler being called for already dead object)
EditEngine *pEditEngine = GetEditEngine();
if (pEditEngine)
@@ -1781,7 +1704,7 @@ void SmEditAccessible::ClearWin()
uno::Reference< XAccessibleContext > SAL_CALL SmEditAccessible::getAccessibleContext( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return this;
}
@@ -1792,7 +1715,7 @@ sal_Bool SAL_CALL SmEditAccessible::containsPoint( const awt::Point& aPoint )
//! the arguments coordinates are relativ to the current window !
//! Thus the top left-point is (0, 0)
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
@@ -1804,7 +1727,7 @@ sal_Bool SAL_CALL SmEditAccessible::containsPoint( const awt::Point& aPoint )
uno::Reference< XAccessible > SAL_CALL SmEditAccessible::getAccessibleAtPoint( const awt::Point& aPoint )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pTextHelper)
throw RuntimeException();
return pTextHelper->GetAt( aPoint );
@@ -1813,10 +1736,10 @@ uno::Reference< XAccessible > SAL_CALL SmEditAccessible::getAccessibleAtPoint( c
awt::Rectangle SAL_CALL SmEditAccessible::getBounds( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
- DBG_ASSERT(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
+ OSL_ENSURE(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
"mismatch of window parent and accessible parent" );
return lcl_GetBounds( pWin );
}
@@ -1824,10 +1747,10 @@ awt::Rectangle SAL_CALL SmEditAccessible::getBounds( )
awt::Point SAL_CALL SmEditAccessible::getLocation( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
- DBG_ASSERT(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
+ OSL_ENSURE(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
"mismatch of window parent and accessible parent" );
awt::Rectangle aRect( lcl_GetBounds( pWin ) );
return awt::Point( aRect.X, aRect.Y );
@@ -1836,10 +1759,10 @@ awt::Point SAL_CALL SmEditAccessible::getLocation( )
awt::Point SAL_CALL SmEditAccessible::getLocationOnScreen( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
- DBG_ASSERT(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
+ OSL_ENSURE(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
"mismatch of window parent and accessible parent" );
return lcl_GetLocationOnScreen( pWin );
}
@@ -1847,17 +1770,17 @@ awt::Point SAL_CALL SmEditAccessible::getLocationOnScreen( )
awt::Size SAL_CALL SmEditAccessible::getSize( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
- DBG_ASSERT(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
+ OSL_ENSURE(pWin->GetParent()->GetAccessible() == getAccessibleParent(),
"mismatch of window parent and accessible parent" );
Size aSz( pWin->GetSizePixel() );
#if OSL_DEBUG_LEVEL > 1
awt::Rectangle aRect( lcl_GetBounds( pWin ) );
Size aSz2( aRect.Width, aRect.Height );
- DBG_ASSERT( aSz == aSz2, "mismatch in width" );
+ OSL_ENSURE( aSz == aSz2, "mismatch in width" );
#endif
return awt::Size( aSz.Width(), aSz.Height() );
}
@@ -1865,7 +1788,7 @@ awt::Size SAL_CALL SmEditAccessible::getSize( )
void SAL_CALL SmEditAccessible::grabFocus( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
@@ -1875,7 +1798,7 @@ void SAL_CALL SmEditAccessible::grabFocus( )
sal_Int32 SAL_CALL SmEditAccessible::getForeground()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
@@ -1885,7 +1808,7 @@ sal_Int32 SAL_CALL SmEditAccessible::getForeground()
sal_Int32 SAL_CALL SmEditAccessible::getBackground()
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
@@ -1902,7 +1825,7 @@ sal_Int32 SAL_CALL SmEditAccessible::getBackground()
sal_Int32 SAL_CALL SmEditAccessible::getAccessibleChildCount( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pTextHelper)
throw RuntimeException();
return pTextHelper->GetChildCount();
@@ -1911,7 +1834,7 @@ sal_Int32 SAL_CALL SmEditAccessible::getAccessibleChildCount( )
uno::Reference< XAccessible > SAL_CALL SmEditAccessible::getAccessibleChild( sal_Int32 i )
throw (IndexOutOfBoundsException, RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pTextHelper)
throw RuntimeException();
return pTextHelper->GetChild( i );
@@ -1920,19 +1843,19 @@ uno::Reference< XAccessible > SAL_CALL SmEditAccessible::getAccessibleChild( sal
uno::Reference< XAccessible > SAL_CALL SmEditAccessible::getAccessibleParent( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!pWin)
throw RuntimeException();
Window *pAccParent = pWin->GetAccessibleParentWindow();
- DBG_ASSERT( pAccParent, "accessible parent missing" );
+ OSL_ENSURE( pAccParent, "accessible parent missing" );
return pAccParent ? pAccParent->GetAccessible() : Reference< XAccessible >();
}
sal_Int32 SAL_CALL SmEditAccessible::getAccessibleIndexInParent( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int32 nIdx = -1;
Window *pAccParent = pWin ? pWin->GetAccessibleParentWindow() : 0;
if (pAccParent)
@@ -1948,21 +1871,21 @@ sal_Int32 SAL_CALL SmEditAccessible::getAccessibleIndexInParent( )
sal_Int16 SAL_CALL SmEditAccessible::getAccessibleRole( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return AccessibleRole::PANEL /*TEXT ?*/;
}
rtl::OUString SAL_CALL SmEditAccessible::getAccessibleDescription( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return OUString(); // empty as agreed with product-management
}
rtl::OUString SAL_CALL SmEditAccessible::getAccessibleName( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// same name as displayed by the window when not docked
return aAccName;
}
@@ -1970,7 +1893,7 @@ rtl::OUString SAL_CALL SmEditAccessible::getAccessibleName( )
uno::Reference< XAccessibleRelationSet > SAL_CALL SmEditAccessible::getAccessibleRelationSet( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Reference< XAccessibleRelationSet > xRelSet = new utl::AccessibleRelationSetHelper();
return xRelSet; // empty relation set
}
@@ -1978,7 +1901,7 @@ uno::Reference< XAccessibleRelationSet > SAL_CALL SmEditAccessible::getAccessibl
uno::Reference< XAccessibleStateSet > SAL_CALL SmEditAccessible::getAccessibleStateSet( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
::utl::AccessibleStateSetHelper *pStateSet =
new ::utl::AccessibleStateSetHelper;
@@ -1988,10 +1911,7 @@ uno::Reference< XAccessibleStateSet > SAL_CALL SmEditAccessible::getAccessibleSt
pStateSet->AddState( AccessibleStateType::DEFUNC );
else
{
- //pStateSet->AddState( AccessibleStateType::EDITABLE );
pStateSet->AddState( AccessibleStateType::MULTI_LINE );
- //pStateSet->AddState( AccessibleStateType::HORIZONTAL );
- //pStateSet->AddState( AccessibleStateType::TRANSIENT );
pStateSet->AddState( AccessibleStateType::ENABLED );
pStateSet->AddState( AccessibleStateType::FOCUSABLE );
if (pWin->HasFocus())
@@ -2012,7 +1932,7 @@ uno::Reference< XAccessibleStateSet > SAL_CALL SmEditAccessible::getAccessibleSt
Locale SAL_CALL SmEditAccessible::getLocale( )
throw (IllegalAccessibleComponentStateException, RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// should be the document language...
// We use the language of the localized symbol names here.
return Application::GetSettings().GetUILocale();
@@ -2023,14 +1943,13 @@ Locale SAL_CALL SmEditAccessible::getLocale( )
void SAL_CALL SmEditAccessible::addEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
throw (RuntimeException)
{
- //vos::OGuard aGuard(Application::GetSolarMutex()); if (pTextHelper) // not disposing (about to destroy view shell)
+ if (pTextHelper) // not disposing (about to destroy view shell)
pTextHelper->AddEventListener( xListener );
}
void SAL_CALL SmEditAccessible::removeEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
throw (RuntimeException)
{
- //vos::OGuard aGuard(Application::GetSolarMutex());
if (pTextHelper) // not disposing (about to destroy view shell)
pTextHelper->RemoveEventListener( xListener );
}
@@ -2038,7 +1957,6 @@ void SAL_CALL SmEditAccessible::removeEventListener( const uno::Reference< XAcce
OUString SAL_CALL SmEditAccessible::getImplementationName()
throw (RuntimeException)
{
- //vos::OGuard aGuard(Application::GetSolarMutex());
return A2OU("SmEditAccessible");
}
@@ -2046,7 +1964,6 @@ sal_Bool SAL_CALL SmEditAccessible::supportsService(
const OUString& rServiceName )
throw (RuntimeException)
{
- //vos::OGuard aGuard(Application::GetSolarMutex());
return rServiceName == A2OU( "com::sun::star::accessibility::Accessible" ) ||
rServiceName == A2OU( "com::sun::star::accessibility::AccessibleComponent" ) ||
rServiceName == A2OU( "com::sun::star::accessibility::AccessibleContext" );
@@ -2055,7 +1972,6 @@ sal_Bool SAL_CALL SmEditAccessible::supportsService(
Sequence< OUString > SAL_CALL SmEditAccessible::getSupportedServiceNames()
throw (RuntimeException)
{
- //vos::OGuard aGuard(Application::GetSolarMutex());
Sequence< OUString > aNames(3);
OUString *pNames = aNames.getArray();
pNames[0] = A2OU( "com::sun::star::accessibility::Accessible" );
@@ -2066,3 +1982,4 @@ Sequence< OUString > SAL_CALL SmEditAccessible::getSupportedServiceNames()
//////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx
index 5601ca670448..a6b682b706fb 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,18 +33,13 @@
#ifndef _ACCESSIBILITY_HXX_
#define _ACCESSIBILITY_HXX_
-//#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_
-//#include <com/sun/star/lang/XComponent.hpp>
-//#endif
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
#include <com/sun/star/accessibility/XAccessibleText.hpp>
#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-#ifndef _COM_SUN_STAR_lang_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
#include <com/sun/star/uno/Reference.h>
#include <osl/mutex.hxx>
#include <cppuhelper/interfacecontainer.h>
@@ -85,7 +81,6 @@ SmGraphicAccessibleBaseClass;
class SmGraphicAccessible :
public SmGraphicAccessibleBaseClass
{
- //vos::ORefCount aRefCount; // number of references to object
osl::Mutex aListenerMutex;
String aAccName;
/// client id in the AccessibleEventNotifier queue
@@ -349,11 +344,6 @@ class SmEditAccessible :
SmEditAccessible( const SmEditAccessible & );
SmEditAccessible & operator = ( const SmEditAccessible & );
-protected:
-#ifdef TL_NOT_YET_USED
- SmDocShell * GetDoc_Impl();
-#endif //TL_NOT_YET_USED
-
public:
SmEditAccessible( SmEditWindow *pEditWin );
virtual ~SmEditAccessible();
@@ -409,3 +399,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/action.cxx b/starmath/source/action.cxx
index cef82f23b5f3..a7fbbc2a33bf 100644
--- a/starmath/source/action.cxx
+++ b/starmath/source/action.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,4 @@ UniString SmFormatAction::GetComment() const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/caret.cxx b/starmath/source/caret.cxx
new file mode 100644
index 000000000000..0fd781eb44b7
--- /dev/null
+++ b/starmath/source/caret.cxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Jonas Finnemann Jensen <jopsen@gmail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jonas Finnemann Jensen <jopsen@gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "caret.hxx"
+
+/////////////////////////////// SmCaretPosGraph ////////////////////////////////
+
+SmCaretPosGraphEntry* SmCaretPosGraphIterator::Next(){
+ if(nOffset >= pGraph->nOffset){
+ if(pGraph->pNext){
+ pGraph = pGraph->pNext;
+ nOffset = 0;
+ pEntry = Next();
+ }else
+ pEntry = NULL;
+ }else
+ pEntry = pGraph->Graph + nOffset++;
+ return pEntry;
+}
+
+SmCaretPosGraphEntry* SmCaretPosGraph::Add(SmCaretPosGraphEntry entry){
+ if(nOffset >= SmCaretPosGraphSize){
+ if(!pNext)
+ pNext = new SmCaretPosGraph();
+ return pNext->Add(entry);
+ }else{
+ //Set Left and Right to point to the entry itself if they are NULL
+ entry.Left = entry.Left ? entry.Left : Graph + nOffset;
+ entry.Right = entry.Right ? entry.Right : Graph + nOffset;
+ //Save the entry
+ Graph[nOffset] = entry;
+ return Graph + nOffset++;
+ }
+}
+
+SmCaretPosGraph::~SmCaretPosGraph(){
+ if(pNext)
+ delete pNext;
+ pNext = NULL;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 9a39ee55c0dd..89c42aa68731 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,18 +31,19 @@
#include <vcl/svapp.hxx>
-
+#include <sal/macros.h>
#include "cfgitem.hxx"
#include "starmath.hrc"
#include "smdll.hxx"
#include "format.hxx"
-using namespace rtl;
using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::beans;
+using ::rtl::OUString;
+
static const char* aRootName = "Office.Math";
@@ -72,7 +74,6 @@ static Sequence< OUString > lcl_GetFontPropertyNames()
{
pNames[i] = A2OU( *ppPropName );
}
- //aNames.realloc( i );
return aNames;
}
@@ -98,7 +99,6 @@ static Sequence< OUString > lcl_GetSymbolPropertyNames()
{
pNames[i] = A2OU( *ppPropName );
}
- //aNames.realloc( i );
return aNames;
}
@@ -180,21 +180,20 @@ static Sequence< OUString > lcl_GetPropertyNames(
{
pNames[i] = A2OU( *ppPropName );
}
- //aNames.realloc( i );
return aNames;
}
static Sequence< OUString > GetFormatPropertyNames()
{
- sal_uInt16 nCnt = sizeof(aFormatPropNames) / sizeof(aFormatPropNames[0]);
+ sal_uInt16 nCnt = SAL_N_ELEMENTS(aFormatPropNames);
return lcl_GetPropertyNames( aFormatPropNames, nCnt );
}
static Sequence< OUString > GetOtherPropertyNames()
{
- sal_uInt16 nCnt = sizeof(aMathPropNames) / sizeof(aMathPropNames[0]);
+ sal_uInt16 nCnt = SAL_N_ELEMENTS(aMathPropNames);
return lcl_GetPropertyNames( aMathPropNames, nCnt );
}
@@ -204,14 +203,14 @@ struct SmCfgOther
{
SmPrintSize ePrintSize;
sal_uInt16 nPrintZoomFactor;
- sal_Bool bPrintTitle;
- sal_Bool bPrintFormulaText;
- sal_Bool bPrintFrame;
- sal_Bool bIsSaveOnlyUsedSymbols;
- sal_Bool bIgnoreSpacesRight;
- sal_Bool bToolboxVisible;
- sal_Bool bAutoRedraw;
- sal_Bool bFormulaCursor;
+ bool bPrintTitle;
+ bool bPrintFormulaText;
+ bool bPrintFrame;
+ bool bIsSaveOnlyUsedSymbols;
+ bool bIgnoreSpacesRight;
+ bool bToolboxVisible;
+ bool bAutoRedraw;
+ bool bFormulaCursor;
//sal_Bool bNoSymbolsWarning;
SmCfgOther();
@@ -225,7 +224,7 @@ SmCfgOther::SmCfgOther()
bPrintTitle = bPrintFormulaText =
bPrintFrame = bIgnoreSpacesRight =
bToolboxVisible = bAutoRedraw =
- bFormulaCursor = bIsSaveOnlyUsedSymbols = sal_True;
+ bFormulaCursor = bIsSaveOnlyUsedSymbols = true;
}
/////////////////////////////////////////////////////////////////
@@ -266,7 +265,7 @@ const Font SmFontFormat::GetFont() const
}
-sal_Bool SmFontFormat::operator == ( const SmFontFormat &rFntFmt ) const
+bool SmFontFormat::operator == ( const SmFontFormat &rFntFmt ) const
{
return aName == rFntFmt.aName &&
nCharSet == rFntFmt.nCharSet &&
@@ -288,7 +287,7 @@ SmFntFmtListEntry::SmFntFmtListEntry( const String &rId, const SmFontFormat &rFn
SmFontFormatList::SmFontFormatList()
{
- bModified = sal_False;
+ bModified = false;
}
@@ -297,7 +296,7 @@ void SmFontFormatList::Clear()
if (!aEntries.empty())
{
aEntries.clear();
- SetModified( sal_True );
+ SetModified( true );
}
}
@@ -306,12 +305,12 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId,
const SmFontFormat &rFntFmt )
{
const SmFontFormat *pFntFmt = GetFontFormat( rFntFmtId );
- DBG_ASSERT( !pFntFmt, "FontFormatId already exists" );
+ OSL_ENSURE( !pFntFmt, "FontFormatId already exists" );
if (!pFntFmt)
{
SmFntFmtListEntry aEntry( rFntFmtId, rFntFmt );
aEntries.push_back( aEntry );
- SetModified( sal_True );
+ SetModified( true );
}
}
@@ -326,7 +325,7 @@ void SmFontFormatList::RemoveFontFormat( const String &rFntFmtId )
{
// remove entry if found
aEntries.erase( aEntries.begin() + i );
- SetModified( sal_True );
+ SetModified( true );
break;
}
}
@@ -377,7 +376,7 @@ const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt ) co
}
-const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt, sal_Bool bAdd )
+const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt, bool bAdd )
{
String aRes( GetFontFormatId( rFntFmt) );
if (0 == aRes.Len() && bAdd)
@@ -404,7 +403,7 @@ const String SmFontFormatList::GetNewFontFormatId() const
String aRes;
- String aPrefix( RTL_CONSTASCII_STRINGPARAM( "Id" ) );
+ String aPrefix( RTL_CONSTASCII_USTRINGPARAM( "Id" ) );
sal_Int32 nCnt = GetCount();
for (sal_Int32 i = 1; i <= nCnt + 1; ++i)
{
@@ -416,7 +415,7 @@ const String SmFontFormatList::GetNewFontFormatId() const
break;
}
}
- DBG_ASSERT( 0 != aRes.Len(), "failed to create new FontFormatId" );
+ OSL_ENSURE( 0 != aRes.Len(), "failed to create new FontFormatId" );
return aRes;
}
@@ -431,7 +430,7 @@ SmMathConfig::SmMathConfig() :
pFontFormatList = 0;
pSymbolMgr = 0;
- bIsOtherModified = bIsFormatModified = sal_False;
+ bIsOtherModified = bIsFormatModified = false;
}
@@ -445,19 +444,19 @@ SmMathConfig::~SmMathConfig()
}
-void SmMathConfig::SetOtherModified( sal_Bool bVal )
+void SmMathConfig::SetOtherModified( bool bVal )
{
bIsOtherModified = bVal;
}
-void SmMathConfig::SetFormatModified( sal_Bool bVal )
+void SmMathConfig::SetFormatModified( bool bVal )
{
bIsFormatModified = bVal;
}
-void SmMathConfig::SetFontFormatListModified( sal_Bool bVal )
+void SmMathConfig::SetFontFormatListModified( bool bVal )
{
if (pFontFormatList)
pFontFormatList->SetModified( bVal );
@@ -492,37 +491,37 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
Font aFont;
sal_UCS4 cChar = '\0';
String aSet;
- sal_Bool bPredefined = sal_False;
+ bool bPredefined = false;
OUString aTmpStr;
sal_Int32 nTmp32 = 0;
- sal_Bool bTmp = sal_False;
+ bool bTmp = false;
- sal_Bool bOK = sal_True;
+ bool bOK = true;
if (pValue->hasValue() && (*pValue >>= nTmp32))
cChar = static_cast< sal_UCS4 >( nTmp32 );
else
- bOK = sal_False;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= aTmpStr))
aSet = aTmpStr;
else
- bOK = sal_False;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= bTmp))
bPredefined = bTmp;
else
- bOK = sal_False;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= aTmpStr))
{
const SmFontFormat *pFntFmt = GetFontFormatList().GetFontFormat( aTmpStr );
- DBG_ASSERT( pFntFmt, "unknown FontFormat" );
+ OSL_ENSURE( pFntFmt, "unknown FontFormat" );
if (pFntFmt)
aFont = pFntFmt->GetFont();
}
else
- bOK = sal_False;
+ bOK = false;
++pValue;
if (bOK)
@@ -533,11 +532,11 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
{
String aTmp;
aTmp = GetUiSymbolName( rSymbolName );
- DBG_ASSERT( aTmp.Len(), "localized symbol-name not found" );
+ OSL_ENSURE( aTmp.Len(), "localized symbol-name not found" );
if (aTmp.Len())
aUiName = aTmp;
aTmp = GetUiSymbolSetName( aSet );
- DBG_ASSERT( aTmp.Len(), "localized symbolset-name not found" );
+ OSL_ENSURE( aTmp.Len(), "localized symbolset-name not found" );
if (aTmp.Len())
aUiSetName = aTmp;
}
@@ -548,7 +547,7 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
}
else
{
- DBG_ERROR( "symbol read error" );
+ OSL_FAIL( "symbol read error" );
}
}
}
@@ -613,7 +612,6 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
while (aIt != aEnd)
{
const SmSym &rSymbol = *aIt++;
- //const Font &rFont = rSymbol.GetFace();
OUString aNodeNameDelim( A2OU( SYMBOL_LIST ) );
aNodeNameDelim += aDelim;
aNodeNameDelim += rSymbol.GetExportName();
@@ -641,14 +639,14 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
pVal++;
// FontFormatId
SmFontFormat aFntFmt( rSymbol.GetFace() );
- String aFntFmtId( GetFontFormatList().GetFontFormatId( aFntFmt, sal_True ) );
- DBG_ASSERT( aFntFmtId.Len(), "FontFormatId not found" );
+ String aFntFmtId( GetFontFormatList().GetFontFormatId( aFntFmt, true ) );
+ OSL_ENSURE( aFntFmtId.Len(), "FontFormatId not found" );
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
pVal->Value <<= OUString( aFntFmtId );
pVal++;
}
- DBG_ASSERT( pVal - pValues == sal::static_int_cast< ptrdiff_t >(nCount * nSymbolProps), "properties missing" );
+ OSL_ENSURE( pVal - pValues == sal::static_int_cast< ptrdiff_t >(nCount * nSymbolProps), "properties missing" );
ReplaceSetProperties( A2OU( SYMBOL_LIST ) , aValues );
StripFontFormatList( rNewSymbols );
@@ -683,12 +681,12 @@ void SmMathConfig::LoadFontFormatList()
ReadFontFormat( aFntFmt, pNode[i], A2OU( FONT_FORMAT_LIST ) );
if (!pFontFormatList->GetFontFormat( pNode[i] ))
{
- DBG_ASSERT( 0 == pFontFormatList->GetFontFormat( pNode[i] ),
+ OSL_ENSURE( 0 == pFontFormatList->GetFontFormat( pNode[i] ),
"FontFormat ID already exists" );
pFontFormatList->AddFontFormat( pNode[i], aFntFmt );
}
}
- pFontFormatList->SetModified( sal_False );
+ pFontFormatList->SetModified( false );
}
@@ -720,39 +718,40 @@ void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
OUString aTmpStr;
sal_Int16 nTmp16 = 0;
- sal_Bool bOK = sal_True;
+ bool bOK = true;
if (pValue->hasValue() && (*pValue >>= aTmpStr))
rFontFormat.aName = aTmpStr;
else
- bOK = sal_False;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nCharSet = nTmp16; // 6.0 file-format GetSOLoadTextEncoding not needed
else
- bOK = sal_False;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nFamily = nTmp16;
else
- bOK = sal_False;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nPitch = nTmp16;
else
- bOK = sal_False;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nWeight = nTmp16;
else
- bOK = sal_False;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nItalic = nTmp16;
else
- bOK = sal_False;
+ bOK = false;
++pValue;
- DBG_ASSERT( bOK, "read FontFormat failed" );
+ OSL_ENSURE( bOK, "read FontFormat failed" );
+ (void)bOK;
}
}
@@ -817,11 +816,10 @@ void SmMathConfig::SaveFontFormatList()
pVal->Value <<= (sal_Int16) aFntFmt.nItalic;
pVal++;
}
- DBG_ASSERT( static_cast<size_t>(pVal - pValues) == (nCount * nSymbolProps),
- "properties missing" );
+ OSL_ENSURE( pVal - pValues == nCount * nSymbolProps, "properties missing" );
ReplaceSetProperties( A2OU( FONT_FORMAT_LIST ) , aValues );
- rFntFmtList.SetModified( sal_False );
+ rFntFmtList.SetModified( false );
}
@@ -834,13 +832,13 @@ void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
SmFontFormatList aUsedList;
for (i = 0; i < rSymbols.size(); ++i)
{
- DBG_ASSERT( rSymbols[i].GetName().Len() > 0, "non named symbol" );
- aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , sal_True );
+ OSL_ENSURE( rSymbols[i].GetName().Len() > 0, "non named symbol" );
+ aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , true );
}
const SmFormat & rStdFmt = GetStandardFormat();
for (i = FNT_BEGIN; i <= FNT_END; ++i)
{
- aUsedList.GetFontFormatId( SmFontFormat( rStdFmt.GetFont( i ) ) , sal_True );
+ aUsedList.GetFontFormatId( SmFontFormat( rStdFmt.GetFont( i ) ) , true );
}
// remove unused font-formats from list
@@ -881,7 +879,7 @@ void SmMathConfig::LoadOther()
const Any *pVal = pValues;
sal_Int16 nTmp16 = 0;
- sal_Bool bTmp = sal_False;
+ bool bTmp = false;
// Print/Title
if (pVal->hasValue() && (*pVal >>= bTmp))
@@ -906,11 +904,6 @@ void SmMathConfig::LoadOther()
// LoadSave/IsSaveOnlyUsedSymbols
if (pVal->hasValue() && (*pVal >>= bTmp))
pOther->bIsSaveOnlyUsedSymbols = bTmp;
-/* ++pVal;
- // Misc/NoSymbolsWarning
- if (pVal->hasValue() && (*pVal >>= bTmp))
- pOther->bNoSymbolsWarning = bTmp;
-*/
++pVal;
// Misc/IgnoreSpacesRight
if (pVal->hasValue() && (*pVal >>= bTmp))
@@ -929,8 +922,8 @@ void SmMathConfig::LoadOther()
pOther->bFormulaCursor = bTmp;
++pVal;
- DBG_ASSERT( pVal - pValues == nProps, "property mismatch" );
- SetOtherModified( sal_False );
+ OSL_ENSURE( pVal - pValues == nProps, "property mismatch" );
+ SetOtherModified( false );
}
}
@@ -959,9 +952,6 @@ void SmMathConfig::SaveOther()
*pValue++ <<= (sal_Int16) pOther->nPrintZoomFactor;
// LoadSave/IsSaveOnlyUsedSymbols
*pValue++ <<= (sal_Bool) pOther->bIsSaveOnlyUsedSymbols;
-/* // Misc/NoSymbolsWarning
- *pValue++ <<= (sal_Bool) pOther->bNoSymbolsWarning;
-*/
// Misc/IgnoreSpacesRight
*pValue++ <<= (sal_Bool) pOther->bIgnoreSpacesRight;
// View/ToolboxVisible
@@ -971,10 +961,10 @@ void SmMathConfig::SaveOther()
// View/FormulaCursor
*pValue++ <<= (sal_Bool) pOther->bFormulaCursor;
- DBG_ASSERT( pValue - pValues == nProps, "property mismatch" );
+ OSL_ENSURE( pValue - pValues == nProps, "property mismatch" );
PutProperties( aNames , aValues );
- SetOtherModified( sal_False );
+ SetOtherModified( false );
}
void SmMathConfig::LoadFormat()
@@ -994,7 +984,7 @@ void SmMathConfig::LoadFormat()
OUString aTmpStr;
sal_Int16 nTmp16 = 0;
- sal_Bool bTmp = sal_False;
+ bool bTmp = false;
// StandardFormat/Textmode
if (pVal->hasValue() && (*pVal >>= bTmp))
@@ -1036,7 +1026,7 @@ void SmMathConfig::LoadFormat()
for (i = FNT_BEGIN; i < FNT_END; ++i)
{
Font aFnt;
- sal_Bool bUseDefaultFont = sal_True;
+ bool bUseDefaultFont = true;
if (pVal->hasValue() && (*pVal >>= aTmpStr))
{
bUseDefaultFont = 0 == aTmpStr.getLength();
@@ -1048,7 +1038,7 @@ void SmMathConfig::LoadFormat()
else
{
const SmFontFormat *pFntFmt = GetFontFormatList().GetFontFormat( aTmpStr );
- DBG_ASSERT( pFntFmt, "unknown FontFormat" );
+ OSL_ENSURE( pFntFmt, "unknown FontFormat" );
if (pFntFmt)
aFnt = pFntFmt->GetFont();
}
@@ -1059,8 +1049,8 @@ void SmMathConfig::LoadFormat()
pFormat->SetFont( i, aFnt, bUseDefaultFont );
}
- DBG_ASSERT( pVal - pValues == nProps, "property mismatch" );
- SetFormatModified( sal_False );
+ OSL_ENSURE( pVal - pValues == nProps, "property mismatch" );
+ SetFormatModified( false );
}
}
@@ -1103,17 +1093,17 @@ void SmMathConfig::SaveFormat()
if (!pFormat->IsDefaultFont( i ))
{
SmFontFormat aFntFmt( pFormat->GetFont( i ) );
- aFntFmtId = GetFontFormatList().GetFontFormatId( aFntFmt, sal_True );
- DBG_ASSERT( aFntFmtId.getLength(), "FontFormatId not found" );
+ aFntFmtId = GetFontFormatList().GetFontFormatId( aFntFmt, true );
+ OSL_ENSURE( aFntFmtId.getLength(), "FontFormatId not found" );
}
*pValue++ <<= aFntFmtId;
}
- DBG_ASSERT( pValue - pValues == nProps, "property mismatch" );
+ OSL_ENSURE( pValue - pValues == nProps, "property mismatch" );
PutProperties( aNames , aValues );
- SetFormatModified( sal_False );
+ SetFormatModified( false );
}
@@ -1125,20 +1115,20 @@ const SmFormat & SmMathConfig::GetStandardFormat() const
}
-void SmMathConfig::SetStandardFormat( const SmFormat &rFormat, sal_Bool bSaveFontFormatList )
+void SmMathConfig::SetStandardFormat( const SmFormat &rFormat, bool bSaveFontFormatList )
{
if (!pFormat)
LoadFormat();
if (rFormat != *pFormat)
{
*pFormat = rFormat;
- SetFormatModified( sal_True );
+ SetFormatModified( true );
SaveFormat();
if (bSaveFontFormatList)
{
// needed for SmFontTypeDialog's DefaultButtonClickHdl
- SetFontFormatListModified( sal_True );
+ SetFontFormatListModified( true );
SaveFontFormatList();
}
}
@@ -1160,7 +1150,7 @@ void SmMathConfig::SetPrintSize( SmPrintSize eSize )
if (eSize != pOther->ePrintSize)
{
pOther->ePrintSize = eSize;
- SetOtherModified( sal_True );
+ SetOtherModified( true );
}
}
@@ -1180,22 +1170,22 @@ void SmMathConfig::SetPrintZoomFactor( sal_uInt16 nVal )
if (nVal != pOther->nPrintZoomFactor)
{
pOther->nPrintZoomFactor = nVal;
- SetOtherModified( sal_True );
+ SetOtherModified( true );
}
}
-void SmMathConfig::SetOtherIfNotEqual( sal_Bool &rbItem, sal_Bool bNewVal )
+void SmMathConfig::SetOtherIfNotEqual( bool &rbItem, bool bNewVal )
{
if (bNewVal != rbItem)
{
rbItem = bNewVal;
- SetOtherModified( sal_True );
+ SetOtherModified( true );
}
}
-sal_Bool SmMathConfig::IsPrintTitle() const
+bool SmMathConfig::IsPrintTitle() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1203,7 +1193,7 @@ sal_Bool SmMathConfig::IsPrintTitle() const
}
-void SmMathConfig::SetPrintTitle( sal_Bool bVal )
+void SmMathConfig::SetPrintTitle( bool bVal )
{
if (!pOther)
LoadOther();
@@ -1211,7 +1201,7 @@ void SmMathConfig::SetPrintTitle( sal_Bool bVal )
}
-sal_Bool SmMathConfig::IsPrintFormulaText() const
+bool SmMathConfig::IsPrintFormulaText() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1219,39 +1209,37 @@ sal_Bool SmMathConfig::IsPrintFormulaText() const
}
-void SmMathConfig::SetPrintFormulaText( sal_Bool bVal )
+void SmMathConfig::SetPrintFormulaText( bool bVal )
{
if (!pOther)
LoadOther();
SetOtherIfNotEqual( pOther->bPrintFormulaText, bVal );
}
-
-sal_Bool SmMathConfig::IsPrintFrame() const
+bool SmMathConfig::IsSaveOnlyUsedSymbols() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
- return pOther->bPrintFrame;
+ return pOther->bIsSaveOnlyUsedSymbols;
}
-
-void SmMathConfig::SetPrintFrame( sal_Bool bVal )
+bool SmMathConfig::IsPrintFrame() const
{
if (!pOther)
- LoadOther();
- SetOtherIfNotEqual( pOther->bPrintFrame, bVal );
+ ((SmMathConfig *) this)->LoadOther();
+ return pOther->bPrintFrame;
}
-sal_Bool SmMathConfig::IsSaveOnlyUsedSymbols() const
+void SmMathConfig::SetPrintFrame( bool bVal )
{
if (!pOther)
- ((SmMathConfig *) this)->LoadOther();
- return pOther->bIsSaveOnlyUsedSymbols;
+ LoadOther();
+ SetOtherIfNotEqual( pOther->bPrintFrame, bVal );
}
-void SmMathConfig::SetSaveOnlyUsedSymbols( sal_Bool bVal )
+void SmMathConfig::SetSaveOnlyUsedSymbols( bool bVal )
{
if (!pOther)
LoadOther();
@@ -1259,7 +1247,7 @@ void SmMathConfig::SetSaveOnlyUsedSymbols( sal_Bool bVal )
}
-sal_Bool SmMathConfig::IsIgnoreSpacesRight() const
+bool SmMathConfig::IsIgnoreSpacesRight() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1267,7 +1255,7 @@ sal_Bool SmMathConfig::IsIgnoreSpacesRight() const
}
-void SmMathConfig::SetIgnoreSpacesRight( sal_Bool bVal )
+void SmMathConfig::SetIgnoreSpacesRight( bool bVal )
{
if (!pOther)
LoadOther();
@@ -1275,7 +1263,7 @@ void SmMathConfig::SetIgnoreSpacesRight( sal_Bool bVal )
}
-sal_Bool SmMathConfig::IsAutoRedraw() const
+bool SmMathConfig::IsAutoRedraw() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1283,7 +1271,7 @@ sal_Bool SmMathConfig::IsAutoRedraw() const
}
-void SmMathConfig::SetAutoRedraw( sal_Bool bVal )
+void SmMathConfig::SetAutoRedraw( bool bVal )
{
if (!pOther)
LoadOther();
@@ -1291,7 +1279,7 @@ void SmMathConfig::SetAutoRedraw( sal_Bool bVal )
}
-sal_Bool SmMathConfig::IsShowFormulaCursor() const
+bool SmMathConfig::IsShowFormulaCursor() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1299,7 +1287,7 @@ sal_Bool SmMathConfig::IsShowFormulaCursor() const
}
-void SmMathConfig::SetShowFormulaCursor( sal_Bool bVal )
+void SmMathConfig::SetShowFormulaCursor( bool bVal )
{
if (!pOther)
LoadOther();
@@ -1311,3 +1299,4 @@ void SmMathConfig::Notify( const com::sun::star::uno::Sequence< rtl::OUString >&
/////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index e87f75063645..e3fb818d4c4c 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,7 +71,7 @@ struct SmFontFormat
SmFontFormat( const Font &rFont );
const Font GetFont() const;
- sal_Bool operator == ( const SmFontFormat &rFntFmt ) const;
+ bool operator == ( const SmFontFormat &rFntFmt ) const;
};
@@ -85,7 +86,7 @@ struct SmFntFmtListEntry
class SmFontFormatList
{
std::deque<SmFntFmtListEntry> aEntries;
- sal_Bool bModified;
+ bool bModified;
// disallow copy-constructor and assignment-operator for now
SmFontFormatList( const SmFontFormatList & );
@@ -101,13 +102,13 @@ public:
const SmFontFormat * GetFontFormat( const String &rFntFmtId ) const;
const SmFontFormat * GetFontFormat( size_t nPos ) const;
const String GetFontFormatId( const SmFontFormat &rFntFmt ) const;
- const String GetFontFormatId( const SmFontFormat &rFntFmt, sal_Bool bAdd );
+ const String GetFontFormatId( const SmFontFormat &rFntFmt, bool bAdd );
const String GetFontFormatId( size_t nPos ) const;
const String GetNewFontFormatId() const;
size_t GetCount() const { return aEntries.size(); }
- sal_Bool IsModified() const { return bModified; }
- void SetModified( sal_Bool bVal ) { bModified = bVal; }
+ bool IsModified() const { return bModified; }
+ void SetModified( bool bVal ) { bModified = bVal; }
};
@@ -119,8 +120,8 @@ class SmMathConfig : public utl::ConfigItem
SmCfgOther * pOther;
SmFontFormatList * pFontFormatList;
SmSymbolManager * pSymbolMgr;
- sal_Bool bIsOtherModified;
- sal_Bool bIsFormatModified;
+ bool bIsOtherModified;
+ bool bIsFormatModified;
// disallow copy-constructor and assignment-operator for now
SmMathConfig( const SmMathConfig & );
@@ -139,7 +140,7 @@ class SmMathConfig : public utl::ConfigItem
const rtl::OUString &rSymbolName,
const rtl::OUString &rBaseNode ) const;
- void SetOtherIfNotEqual( sal_Bool &rbItem, sal_Bool bNewVal );
+ void SetOtherIfNotEqual( bool &rbItem, bool bNewVal );
protected:
void LoadOther();
@@ -149,12 +150,12 @@ protected:
void LoadFontFormatList();
void SaveFontFormatList();
- void SetOtherModified( sal_Bool bVal );
- inline sal_Bool IsOtherModified() const { return bIsOtherModified; }
- void SetFormatModified( sal_Bool bVal );
- inline sal_Bool IsFormatModified() const { return bIsFormatModified; }
- void SetFontFormatListModified( sal_Bool bVal );
- inline sal_Bool IsFontFormatListModified() const { return pFontFormatList ? pFontFormatList->IsModified(): sal_False; }
+ void SetOtherModified( bool bVal );
+ inline bool IsOtherModified() const { return bIsOtherModified; }
+ void SetFormatModified( bool bVal );
+ inline bool IsFormatModified() const { return bIsFormatModified; }
+ void SetFontFormatListModified( bool bVal );
+ inline bool IsFontFormatListModified() const { return pFontFormatList ? pFontFormatList->IsModified(): false; }
SmFontFormatList & GetFontFormatList();
const SmFontFormatList & GetFontFormatList() const
@@ -170,44 +171,37 @@ public:
virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString > &rPropertyNames );
virtual void Commit();
- // make some protected functions of utl::ConfigItem public
- //using utl::ConfigItem::GetNodeNames;
- //using utl::ConfigItem::GetProperties;
- //using utl::ConfigItem::PutProperties;
- //using utl::ConfigItem::SetSetProperties;
- //using utl::ConfigItem::ReplaceSetProperties;
- //using utl::ConfigItem::GetReadOnlyStates;
-
SmSymbolManager & GetSymbolManager();
void GetSymbols( std::vector< SmSym > &rSymbols ) const;
void SetSymbols( const std::vector< SmSym > &rNewSymbols );
const SmFormat & GetStandardFormat() const;
- void SetStandardFormat( const SmFormat &rFormat, sal_Bool bSaveFontFormatList = sal_False );
-
- sal_Bool IsPrintTitle() const;
- void SetPrintTitle( sal_Bool bVal );
- sal_Bool IsPrintFormulaText() const;
- void SetPrintFormulaText( sal_Bool bVal );
- sal_Bool IsPrintFrame() const;
- void SetPrintFrame( sal_Bool bVal );
+ void SetStandardFormat( const SmFormat &rFormat, bool bSaveFontFormatList = false );
+
+ bool IsPrintTitle() const;
+ void SetPrintTitle( bool bVal );
+ bool IsPrintFormulaText() const;
+ void SetPrintFormulaText( bool bVal );
+ bool IsPrintFrame() const;
+ void SetPrintFrame( bool bVal );
SmPrintSize GetPrintSize() const;
void SetPrintSize( SmPrintSize eSize );
sal_uInt16 GetPrintZoomFactor() const;
void SetPrintZoomFactor( sal_uInt16 nVal );
- sal_Bool IsSaveOnlyUsedSymbols() const;
- void SetSaveOnlyUsedSymbols( sal_Bool bVal );
-
- sal_Bool IsIgnoreSpacesRight() const;
- void SetIgnoreSpacesRight( sal_Bool bVal );
- sal_Bool IsAutoRedraw() const;
+ bool IsSaveOnlyUsedSymbols() const;
+ void SetSaveOnlyUsedSymbols( bool bVal );
+ bool IsIgnoreSpacesRight() const;
+ void SetIgnoreSpacesRight( bool bVal );
+ bool IsAutoRedraw() const;
+ void SetAutoRedraw( bool bVal );
+ bool IsShowFormulaCursor() const;
+ void SetShowFormulaCursor( bool bVal );
void SetAutoRedraw( sal_Bool bVal );
- sal_Bool IsShowFormulaCursor() const;
- void SetShowFormulaCursor( sal_Bool bVal );
};
/////////////////////////////////////////////////////////////////
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/config.cxx b/starmath/source/config.cxx
index 45fed7d0ad18..2bcfb43a0d1f 100755
--- a/starmath/source/config.cxx
+++ b/starmath/source/config.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,9 +45,7 @@
#include "config.hxx"
#include "format.hxx"
#include "smmod.hxx"
-#ifndef _STARMATH_HRC
#include "starmath.hrc"
-#endif
/////////////////////////////////////////////////////////////////
@@ -65,7 +64,7 @@ void SmConfig::ItemSetToConfig(const SfxItemSet &rSet)
const SfxPoolItem *pItem = NULL;
sal_uInt16 nU16;
- sal_Bool bVal;
+ bool bVal;
if (rSet.GetItemState(SID_PRINTSIZE, sal_True, &pItem) == SFX_ITEM_SET)
{ nU16 = ((const SfxUInt16Item *) pItem)->GetValue();
SetPrintSize( (SmPrintSize) nU16 );
@@ -131,3 +130,4 @@ void SmConfig::ConfigToItemSet(SfxItemSet &rSet) const
/////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
new file mode 100644
index 000000000000..558d305ab4d4
--- /dev/null
+++ b/starmath/source/cursor.cxx
@@ -0,0 +1,1646 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Jonas Finnemann Jensen <jopsen@gmail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jonas Finnemann Jensen <jopsen@gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "cursor.hxx"
+#include "parse.hxx"
+#include "visitors.hxx"
+#include "document.hxx"
+#include "view.hxx"
+#include "accessibility.hxx"
+
+void SmCursor::Move(OutputDevice* pDev, SmMovementDirection direction, bool bMoveAnchor){
+ SmCaretPosGraphEntry* NewPos = NULL;
+ switch(direction){
+ case MoveLeft:
+ {
+ NewPos = position->Left;
+ j_assert(NewPos, "NewPos shouldn't be NULL here!");
+ }break;
+ case MoveRight:
+ {
+ NewPos = position->Right;
+ j_assert(NewPos, "NewPos shouldn't be NULL here!");
+ }break;
+ case MoveUp:
+ //Implementation is practically identical to MoveDown, except for a single if statement
+ //so I've implemented them together and added a direction == MoveDown to the if statements.
+ case MoveDown:
+ {
+ SmCaretLine from_line = SmCaretPos2LineVisitor(pDev, position->CaretPos).GetResult(),
+ best_line, //Best approximated line found so far
+ curr_line; //Current line
+ long dbp_sq = 0; //Distance squared to best line
+ SmCaretPosGraphIterator it = pGraph->GetIterator();
+ while(it.Next()){
+ //Reject it if it's the current position
+ if(it->CaretPos == position->CaretPos) continue;
+ //Compute caret line
+ curr_line = SmCaretPos2LineVisitor(pDev, it->CaretPos).GetResult();
+ //Reject anything above if we're moving down
+ if(curr_line.GetTop() <= from_line.GetTop() && direction == MoveDown) continue;
+ //Reject anything below if we're moving up
+ if(curr_line.GetTop() + curr_line.GetHeight() >= from_line.GetTop() + from_line.GetHeight()
+ && direction == MoveUp) continue;
+ //Compare if it to what we have, if we have anything yet
+ if(NewPos){
+ //Compute distance to current line squared, multiplied with a horizontial factor
+ long dp_sq = curr_line.SquaredDistanceX(from_line) * HORIZONTICAL_DISTANCE_FACTOR +
+ curr_line.SquaredDistanceY(from_line);
+ //Discard current line if best line is closer
+ if(dbp_sq <= dp_sq) continue;
+ }
+ //Take current line as the best
+ best_line = curr_line;
+ NewPos = it.Current();
+ //Update distance to best line
+ dbp_sq = best_line.SquaredDistanceX(from_line) * HORIZONTICAL_DISTANCE_FACTOR +
+ best_line.SquaredDistanceY(from_line);
+ }
+ }break;
+ default:
+ j_assert(false, "Movement direction not supported!");
+ }
+ if(NewPos){
+ position = NewPos;
+ if(bMoveAnchor)
+ anchor = NewPos;
+ RequestRepaint();
+ }
+}
+
+void SmCursor::MoveTo(OutputDevice* pDev, Point pos, bool bMoveAnchor){
+ SmCaretLine best_line, //Best line found so far, when iterating
+ curr_line; //Current line, when iterating
+ SmCaretPosGraphEntry* NewPos = NULL;
+ long dp_sq = 0, //Distance to current line squared
+ dbp_sq = 1; //Distance to best line squared
+ SmCaretPosGraphIterator it = pGraph->GetIterator();
+ while(it.Next()){
+ j_assert(it->CaretPos.IsValid(), "The caret position graph may not have invalid positions!");
+ //Compute current line
+ curr_line = SmCaretPos2LineVisitor(pDev, it->CaretPos).GetResult();
+ //If we have a position compare to it
+ if(NewPos){
+ //Compute squared distance to current line
+ dp_sq = curr_line.SquaredDistanceX(pos) + curr_line.SquaredDistanceY(pos);
+ //If best line is closer, reject current line
+ if(dbp_sq <= dp_sq) continue;
+ }
+ //Accept current position as the best
+ best_line = curr_line;
+ NewPos = it.Current();
+ //Update distance to best line
+ dbp_sq = best_line.SquaredDistanceX(pos) + best_line.SquaredDistanceY(pos);
+ }
+ if(NewPos){
+ position = NewPos;
+ if(bMoveAnchor)
+ anchor = NewPos;
+ RequestRepaint();
+ }
+}
+
+void SmCursor::BuildGraph(){
+ //Save the current anchor and position
+ SmCaretPos _anchor, _position;
+ //Release pGraph if allocated
+ if(pGraph){
+ if(anchor)
+ _anchor = anchor->CaretPos;
+ if(position)
+ _position = position->CaretPos;
+ delete pGraph;
+ //Reset anchor and position as they point into an old graph
+ anchor = NULL;
+ position = NULL;
+ }
+ pGraph = NULL;
+
+ //Build the new graph
+ pGraph = SmCaretPosGraphBuildingVisitor(pTree).Graph();
+
+ //Restore anchor and position pointers
+ if(_anchor.IsValid() || _position.IsValid()){
+ SmCaretPosGraphIterator it = pGraph->GetIterator();
+ while(it.Next()){
+ if(_anchor == it->CaretPos)
+ anchor = it.Current();
+ if(_position == it->CaretPos)
+ position = it.Current();
+ }
+ }
+ //Set position and anchor to first caret position
+ SmCaretPosGraphIterator it = pGraph->GetIterator();
+ if(!position)
+ position = it.Next();
+ if(!anchor)
+ anchor = position;
+
+ j_assert(position->CaretPos.IsValid(), "Position must be valid");
+ j_assert(anchor->CaretPos.IsValid(), "Anchor must be valid");
+}
+
+bool SmCursor::SetCaretPosition(SmCaretPos pos, bool moveAnchor){
+ SmCaretPosGraphIterator it = pGraph->GetIterator();
+ while(it.Next()){
+ if(it->CaretPos == pos){
+ position = it.Current();
+ if(moveAnchor)
+ anchor = it.Current();
+ return true;
+ }
+ }
+ return false;
+}
+
+void SmCursor::AnnotateSelection(){
+ //TODO: Manage a state, reset it upon modification and optimize this call
+ SmSetSelectionVisitor(anchor->CaretPos, position->CaretPos, pTree);
+}
+
+void SmCursor::Draw(OutputDevice& pDev, Point Offset, bool isCaretVisible){
+ SmCaretDrawingVisitor(pDev, GetPosition(), Offset, isCaretVisible);
+}
+
+void SmCursor::DeletePrev(OutputDevice* pDev){
+ //Delete only a selection if there's a selection
+ if(HasSelection()){
+ Delete();
+ return;
+ }
+
+ SmNode* pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode);
+ SmStructureNode* pLineParent = pLine->GetParent();
+ int nLineOffset = pLineParent->IndexOfSubNode(pLine);
+
+ //If we're in front of a node who's parent is a TABLE
+ if(pLineParent->GetType() == NTABLE && position->CaretPos.Index == 0 && nLineOffset > 0){
+ //Now we can merge with nLineOffset - 1
+ BeginEdit();
+ //Line to merge things into, so we can delete pLine
+ SmNode* pMergeLine = pLineParent->GetSubNode(nLineOffset-1);
+ j_assert(pMergeLine, "pMergeLine cannot be NULL!");
+ //Convert first line to list
+ SmNodeList *pLineList = NodeToList(pMergeLine);
+ //Find iterator to patch
+ SmNodeList::iterator patchPoint = pLineList->end();
+ --patchPoint;
+ //Convert second line to list
+ NodeToList(pLine, pLineList);
+ //Patch the line list
+ ++patchPoint;
+ SmCaretPos PosAfterDelete = PatchLineList(pLineList, patchPoint);
+ //Parse the line
+ pLine = SmNodeListParser().Parse(pLineList);
+ delete pLineList;
+ pLineParent->SetSubNode(nLineOffset-1, pLine);
+ //Delete the removed line slot
+ SmNodeArray lines(pLineParent->GetNumSubNodes()-1);
+ for(int i = 0; i < pLineParent->GetNumSubNodes(); i++){
+ if(i < nLineOffset)
+ lines[i] = pLineParent->GetSubNode(i);
+ else if(i > nLineOffset)
+ lines[i-1] = pLineParent->GetSubNode(i);
+ }
+ pLineParent->SetSubNodes(lines);
+ //Rebuild graph
+ anchor = NULL;
+ position = NULL;
+ BuildGraph();
+ AnnotateSelection();
+ //Set caret position
+ if(!SetCaretPosition(PosAfterDelete, true))
+ SetCaretPosition(SmCaretPos(pLine, 0), true);
+ //Finish editing
+ EndEdit();
+
+ //TODO: If we're in an empty (sub/super/*) script
+ /*}else if(pLineParent->GetType() == NSUBSUP &&
+ nLineOffset != 0 &&
+ pLine->GetType() == NEXPRESSION &&
+ pLine->GetNumSubNodes() == 0){
+ //There's a (sub/super) script we can delete
+ //Consider selecting the entire script if GetNumSubNodes() != 0 or pLine->GetType() != NEXPRESSION
+ //TODO: Handle case where we delete a limit
+ */
+
+ //Else move select, and delete if not complex
+ }else{
+ this->Move(pDev, MoveLeft, false);
+ if(!this->HasComplexSelection())
+ Delete();
+ }
+}
+
+void SmCursor::Delete(){
+ //Return if we don't have a selection to delete
+ if(!HasSelection())
+ return;
+
+ //Enter edit setion
+ BeginEdit();
+
+ //Set selected on nodes
+ AnnotateSelection();
+
+ //Find an arbitrary selected node
+ SmNode* pSNode = FindSelectedNode(pTree);
+ j_assert(pSNode != NULL, "There must be a selection when HasSelection is true!");
+
+ //Find the topmost node of the line that holds the selection
+ SmNode* pLine = FindTopMostNodeInLine(pSNode, true);
+ j_assert(pLine != pTree, "Shouldn't be able to select the entire tree");
+
+ //Get the parent of the line
+ SmStructureNode* pLineParent = pLine->GetParent();
+ //Find line offset in parent
+ int nLineOffset = pLineParent->IndexOfSubNode(pLine);
+ j_assert(nLineOffset != -1, "pLine must be a child of it's parent!");
+
+ //Position after delete
+ SmCaretPos PosAfterDelete;
+
+ SmNodeList* pLineList = NodeToList(pLine);
+
+ //Take the selected nodes and delete them...
+ SmNodeList::iterator patchIt = TakeSelectedNodesFromList(pLineList);
+
+ //Get teh position to set after delete
+ PosAfterDelete = PatchLineList(pLineList, patchIt);
+
+ //Finish editing
+ FinishEdit(pLineList, pLineParent, nLineOffset, PosAfterDelete);
+}
+
+void SmCursor::InsertNodes(SmNodeList* pNewNodes){
+ if(pNewNodes->size() == 0){
+ delete pNewNodes;
+ return;
+ }
+
+ //Begin edit section
+ BeginEdit();
+
+ //Position after insert should be after pNewNode
+ SmCaretPos PosAfterInsert = SmCaretPos(pNewNodes->back(), 1);
+
+ //Get the current position
+ const SmCaretPos pos = position->CaretPos;
+
+ //Find top most of line that holds position
+ SmNode* pLine = FindTopMostNodeInLine(pos.pSelectedNode, false);
+
+ //Find line parent and line index in parent
+ SmStructureNode* pLineParent = pLine->GetParent();
+ int nParentIndex = pLineParent->IndexOfSubNode(pLine);
+ j_assert(nParentIndex != -1, "pLine must be a subnode of pLineParent!");
+
+ //Convert line to list
+ SmNodeList* pLineList = NodeToList(pLine);
+
+ //Find iterator for place to insert nodes
+ SmNodeList::iterator it = FindPositionInLineList(pLineList, pos);
+
+ //Insert all new nodes
+ SmNodeList::iterator newIt,
+ patchIt = it, // (pointless default value, fixes compiler warnings)
+ insIt;
+ for(newIt = pNewNodes->begin(); newIt != pNewNodes->end(); ++newIt){
+ insIt = pLineList->insert(it, *newIt);
+ if(newIt == pNewNodes->begin())
+ patchIt = insIt;
+ if((*newIt)->GetType() == NTEXT)
+ PosAfterInsert = SmCaretPos(*newIt, ((SmTextNode*)*newIt)->GetText().Len());
+ else
+ PosAfterInsert = SmCaretPos(*newIt, 1);
+ }
+ //Patch the places we've changed stuff
+ PatchLineList(pLineList, patchIt);
+ PosAfterInsert = PatchLineList(pLineList, it);
+ //Release list, we've taken the nodes
+ delete pNewNodes;
+ pNewNodes = NULL;
+
+ //Finish editing
+ FinishEdit(pLineList, pLineParent, nParentIndex, PosAfterInsert);
+}
+
+SmNodeList::iterator SmCursor::FindPositionInLineList(SmNodeList* pLineList, SmCaretPos aCaretPos) {
+ //Find iterator for position
+ SmNodeList::iterator it;
+ for(it = pLineList->begin(); it != pLineList->end(); ++it){
+ if(*it == aCaretPos.pSelectedNode){
+ if((*it)->GetType() == NTEXT){
+ //Split textnode if needed
+ if(aCaretPos.Index > 0){
+ SmTextNode* pText = (SmTextNode*)aCaretPos.pSelectedNode;
+ XubString str1 = pText->GetText().Copy(0, aCaretPos.Index);
+ XubString str2 = pText->GetText().Copy(aCaretPos.Index);
+ pText->ChangeText(str1);
+ ++it;
+ //Insert str2 as new text node
+ if(str2.Len() > 0){
+ SmTextNode* pNewText = new SmTextNode(pText->GetToken(), pText->GetFontDesc());
+ pNewText->ChangeText(str2);
+ it = pLineList->insert(it, pNewText);
+ }
+ }
+ }else
+ ++it;
+ //it now pointer to the node following pos, so pLineList->insert(it, ...) will insert correctly
+ return it;
+
+ }
+ }
+ //If we didn't find pSelectedNode, it must be because the caret is infront of the line
+ return pLineList->begin();
+}
+
+SmCaretPos SmCursor::PatchLineList(SmNodeList* pLineList, SmNodeList::iterator aIter) {
+ //The nodes we should consider merging
+ SmNode *prev = NULL,
+ *next = NULL;
+ if(aIter != pLineList->end())
+ next = *aIter;
+ if(aIter != pLineList->begin()) {
+ --aIter;
+ prev = *aIter;
+ ++aIter;
+ }
+
+ //Check if there's textnodes to merge
+ if( prev &&
+ next &&
+ prev->GetType() == NTEXT &&
+ next->GetType() == NTEXT &&
+ ( prev->GetToken().eType != TNUMBER ||
+ next->GetToken().eType == TNUMBER) ){
+ SmTextNode *pText = (SmTextNode*)prev,
+ *pOldN = (SmTextNode*)next;
+ SmCaretPos retval(pText, pText->GetText().Len());
+ String newText;
+ newText += pText->GetText();
+ newText += pOldN->GetText();
+ pText->ChangeText(newText);
+ delete pOldN;
+ pLineList->erase(aIter);
+ return retval;
+ }
+
+ //Check if there's a SmPlaceNode to remove:
+ if(prev && next && prev->GetType() == NPLACE && !SmNodeListParser::IsOperator(next->GetToken())){
+ --aIter;
+ aIter = pLineList->erase(aIter);
+ delete prev;
+ //Return caret pos infront of aIter
+ if(aIter != pLineList->begin())
+ --aIter; //Thus find node before aIter
+ if(aIter == pLineList->begin())
+ return SmCaretPos();
+ if((*aIter)->GetType() == NTEXT)
+ return SmCaretPos(*aIter, ((SmTextNode*)*aIter)->GetText().Len());
+ return SmCaretPos(*aIter, 1);
+ }
+ if(prev && next && next->GetType() == NPLACE && !SmNodeListParser::IsOperator(prev->GetToken())){
+ aIter = pLineList->erase(aIter);
+ delete next;
+ if(prev->GetType() == NTEXT)
+ return SmCaretPos(prev, ((SmTextNode*)prev)->GetText().Len());
+ return SmCaretPos(prev, 1);
+ }
+
+ //If we didn't do anything return
+ if(!prev) //return an invalid to indicate we're infront of line
+ return SmCaretPos();
+ if(prev->GetType() == NTEXT)
+ return SmCaretPos(prev, ((SmTextNode*)prev)->GetText().Len());
+ return SmCaretPos(prev, 1);
+}
+
+SmNodeList::iterator SmCursor::TakeSelectedNodesFromList(SmNodeList *pLineList,
+ SmNodeList *pSelectedNodes) {
+ SmNodeList::iterator retval;
+ SmNodeList::iterator it = pLineList->begin();
+ while(it != pLineList->end()){
+ if((*it)->IsSelected()){
+ //Split text nodes
+ if((*it)->GetType() == NTEXT) {
+ SmTextNode* pText = (SmTextNode*)*it;
+ String aText = pText->GetText();
+ //Start and lengths of the segments, 2 is the selected segment
+ int start2 = pText->GetSelectionStart(),
+ start3 = pText->GetSelectionEnd(),
+ len1 = start2 - 0,
+ len2 = start3 - start2,
+ len3 = aText.Len() - start3;
+ SmToken aToken = pText->GetToken();
+ sal_uInt16 eFontDesc = pText->GetFontDesc();
+ //If we need make segment 1
+ if(len1 > 0) {
+ int start1 = 0;
+ String str = aText.Copy(start1, len1);
+ pText->ChangeText(str);
+ ++it;
+ } else {//Remove it if not needed
+ it = pLineList->erase(it);
+ delete pText;
+ }
+ //Set retval to be right after the selection
+ retval = it;
+ //if we need make segment 3
+ if(len3 > 0) {
+ String str = aText.Copy(start3, len3);
+ SmTextNode* pSeg3 = new SmTextNode(aToken, eFontDesc);
+ pSeg3->ChangeText(str);
+ retval = pLineList->insert(it, pSeg3);
+ }
+ //If we need to save the selected text
+ if(pSelectedNodes && len2 > 0) {
+ String str = aText.Copy(start2, len2);
+ SmTextNode* pSeg2 = new SmTextNode(aToken, eFontDesc);
+ pSeg2->ChangeText(str);
+ pSelectedNodes->push_back(pSeg2);
+ }
+ } else { //if it's not textnode
+ SmNode* pNode = *it;
+ retval = it = pLineList->erase(it);
+ if(pSelectedNodes)
+ pSelectedNodes->push_back(pNode);
+ else
+ delete pNode;
+ }
+ } else
+ ++it;
+ }
+ return retval;
+}
+
+void SmCursor::InsertSubSup(SmSubSup eSubSup) {
+ AnnotateSelection();
+
+ //Find line
+ SmNode *pLine;
+ if(HasSelection()) {
+ SmNode *pSNode = FindSelectedNode(pTree);
+ j_assert(pSNode != NULL, "There must be a selected node when HasSelection is true!");
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
+ } else
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
+
+ //Find Parent and offset in parent
+ SmStructureNode *pLineParent = pLine->GetParent();
+ int nParentIndex = pLineParent->IndexOfSubNode(pLine);
+ j_assert(nParentIndex != -1, "pLine must be a subnode of pLineParent!");
+
+ //TODO: Consider handling special cases where parent is an SmOperNode,
+ // Maybe this method should be able to add limits to an SmOperNode...
+
+ //We begin modifying the tree here
+ BeginEdit();
+
+ //Convert line to list
+ SmNodeList* pLineList = NodeToList(pLine);
+
+ //Take the selection, and/or find iterator for current position
+ SmNodeList* pSelectedNodesList = new SmNodeList();
+ SmNodeList::iterator it;
+ if(HasSelection())
+ it = TakeSelectedNodesFromList(pLineList, pSelectedNodesList);
+ else
+ it = FindPositionInLineList(pLineList, position->CaretPos);
+
+ //Find node that this should be applied to
+ SmNode* pSubject;
+ bool bPatchLine = pSelectedNodesList->size() > 0; //If the line should be patched later
+ if(it != pLineList->begin()) {
+ --it;
+ pSubject = *it;
+ ++it;
+ } else {
+ //Create a new place node
+ pSubject = new SmPlaceNode();
+ pSubject->Prepare(pDocShell->GetFormat(), *pDocShell);
+ it = pLineList->insert(it, pSubject);
+ ++it;
+ bPatchLine = true; //We've modified the line it should be patched later.
+ }
+
+ //Wrap the subject in a SmSubSupNode
+ SmSubSupNode* pSubSup;
+ if(pSubject->GetType() != NSUBSUP){
+ SmToken token;
+ token.nGroup = TGPOWER;
+ pSubSup = new SmSubSupNode(token);
+ pSubSup->SetBody(pSubject);
+ *(--it) = pSubSup;
+ ++it;
+ }else
+ pSubSup = (SmSubSupNode*)pSubject;
+ //pSubject shouldn't be referenced anymore, pSubSup is the SmSubSupNode in pLineList we wish to edit.
+ //and it pointer to the element following pSubSup in pLineList.
+ pSubject = NULL;
+
+ //Patch the line if we noted that was needed previously
+ if(bPatchLine)
+ PatchLineList(pLineList, it);
+
+ //Convert existing, if any, sub-/superscript line to list
+ SmNode *pScriptLine = pSubSup->GetSubSup(eSubSup);
+ SmNodeList* pScriptLineList = NodeToList(pScriptLine);
+
+ //Add selection to pScriptLineList
+ unsigned int nOldSize = pScriptLineList->size();
+ pScriptLineList->insert(pScriptLineList->end(), pSelectedNodesList->begin(), pSelectedNodesList->end());
+ delete pSelectedNodesList;
+ pSelectedNodesList = NULL;
+
+ //Patch pScriptLineList if needed
+ if(0 < nOldSize && nOldSize < pScriptLineList->size()) {
+ SmNodeList::iterator iPatchPoint = pScriptLineList->begin();
+ std::advance(iPatchPoint, nOldSize);
+ PatchLineList(pScriptLineList, iPatchPoint);
+ }
+
+ //Find caret pos, that should be used after sub-/superscription.
+ SmCaretPos PosAfterScript; //Leave invalid for first position
+ if(pScriptLineList->size() > 0)
+ PosAfterScript = SmCaretPos::GetPosAfter(pScriptLineList->back());
+
+ //Parse pScriptLineList
+ pScriptLine = SmNodeListParser().Parse(pScriptLineList);
+ delete pScriptLineList;
+ pScriptLineList = NULL;
+
+ //Insert pScriptLine back into the tree
+ pSubSup->SetSubSup(eSubSup, pScriptLine);
+
+ //Finish editing
+ FinishEdit(pLineList, pLineParent, nParentIndex, PosAfterScript, pScriptLine);
+}
+
+bool SmCursor::InsertLimit(SmSubSup eSubSup, bool bMoveCaret) {
+ //Find a subject to set limits on
+ SmOperNode *pSubject = NULL;
+ //Check if pSelectedNode might be a subject
+ if(position->CaretPos.pSelectedNode->GetType() == NOPER)
+ pSubject = (SmOperNode*)position->CaretPos.pSelectedNode;
+ else {
+ //If not, check if parent of the current line is a SmOperNode
+ SmNode *pLineNode = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
+ if(pLineNode->GetParent() && pLineNode->GetParent()->GetType() == NOPER)
+ pSubject = (SmOperNode*)pLineNode->GetParent();
+ }
+
+ //Abort operation if we're not in the appropriate context
+ if(!pSubject)
+ return false;
+
+ BeginEdit();
+
+ //Find the sub sup node
+ SmSubSupNode *pSubSup = NULL;
+ //Check if there's already one there...
+ if(pSubject->GetSubNode(0)->GetType() == NSUBSUP)
+ pSubSup = (SmSubSupNode*)pSubject->GetSubNode(0);
+ else { //if not create a new SmSubSupNode
+ SmToken token;
+ token.nGroup = TGLIMIT;
+ pSubSup = new SmSubSupNode(token);
+ //Set it's body
+ pSubSup->SetBody(pSubject->GetSubNode(0));
+ //Replace the operation of the SmOperNode
+ pSubject->SetSubNode(0, pSubSup);
+ }
+
+ //Create the limit, if needed
+ SmCaretPos PosAfterLimit;
+ SmNode *pLine = NULL;
+ if(!pSubSup->GetSubSup(eSubSup)){
+ pLine = new SmPlaceNode();
+ pSubSup->SetSubSup(eSubSup, pLine);
+ PosAfterLimit = SmCaretPos(pLine, 1);
+ //If it's already there... let's move the caret
+ } else if(bMoveCaret){
+ pLine = pSubSup->GetSubSup(eSubSup);
+ SmNodeList* pLineList = NodeToList(pLine);
+ if(pLineList->size() > 0)
+ PosAfterLimit = SmCaretPos::GetPosAfter(pLineList->back());
+ pLine = SmNodeListParser().Parse(pLineList);
+ delete pLineList;
+ pSubSup->SetSubSup(eSubSup, pLine);
+ }
+
+ //Rebuild graph of caret positions
+ BuildGraph();
+ AnnotateSelection();
+
+ //Set caret position
+ if(bMoveCaret)
+ if(!SetCaretPosition(PosAfterLimit, true))
+ SetCaretPosition(SmCaretPos(pLine, 0), true);
+
+ EndEdit();
+
+ return true;
+}
+
+void SmCursor::InsertBrackets(SmBracketType eBracketType) {
+ BeginEdit();
+
+ AnnotateSelection();
+
+ //Find line
+ SmNode *pLine;
+ if(HasSelection()) {
+ SmNode *pSNode = FindSelectedNode(pTree);
+ j_assert(pSNode != NULL, "There must be a selected node if HasSelection()");
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
+ } else
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
+
+ //Find parent and offset in parent
+ SmStructureNode *pLineParent = pLine->GetParent();
+ int nParentIndex = pLineParent->IndexOfSubNode(pLine);
+ j_assert( nParentIndex != -1, "pLine must be a subnode of pLineParent!");
+
+ //Convert line to list
+ SmNodeList *pLineList = NodeToList(pLine);
+
+ //Take the selection, and/or find iterator for current position
+ SmNodeList *pSelectedNodesList = new SmNodeList();
+ SmNodeList::iterator it;
+ if(HasSelection())
+ it = TakeSelectedNodesFromList(pLineList, pSelectedNodesList);
+ else
+ it = FindPositionInLineList(pLineList, position->CaretPos);
+
+ //If there's no selected nodes, create a place node
+ SmCaretPos PosAfterInsert;
+ if(pSelectedNodesList->size() == 0) {
+ SmNode* pPlace = new SmPlaceNode();
+ PosAfterInsert = SmCaretPos(pPlace, 1);
+ pSelectedNodesList->push_front(pPlace);
+ }
+
+ //Parse body nodes
+ SmNode *pBodyNode = SmNodeListParser().Parse(pSelectedNodesList);
+ delete pSelectedNodesList;
+
+ //Create SmBraceNode
+ SmToken aTok(TLEFT, '\0', "left", 0, 5);
+ SmBraceNode *pBrace = new SmBraceNode(aTok);
+ pBrace->SetScaleMode(SCALE_HEIGHT);
+ SmNode *pLeft = CreateBracket(eBracketType, true),
+ *pRight = CreateBracket(eBracketType, false);
+ SmBracebodyNode *pBody = new SmBracebodyNode(SmToken());
+ pBody->SetSubNodes(pBodyNode, NULL);
+ pBrace->SetSubNodes(pLeft, pBody, pRight);
+ pBrace->Prepare(pDocShell->GetFormat(), *pDocShell);
+
+ //Insert into line
+ pLineList->insert(it, pBrace);
+ //Patch line (I think this is good enough)
+ SmCaretPos pAfter = PatchLineList(pLineList, it);
+ if( !PosAfterInsert.IsValid() )
+ PosAfterInsert = pAfter;
+
+ //Finish editing
+ FinishEdit(pLineList, pLineParent, nParentIndex, PosAfterInsert);
+}
+
+SmNode *SmCursor::CreateBracket(SmBracketType eBracketType, bool bIsLeft) {
+ SmToken aTok;
+ if(bIsLeft){
+ switch(eBracketType){
+ case NoneBrackets:
+ aTok = SmToken(TNONE, '\0', "none", TGLBRACES | TGRBRACES, 0);
+ break;
+ case RoundBrackets:
+ aTok = SmToken(TLPARENT, MS_LPARENT, "(", TGLBRACES, 5);
+ break;
+ case SquareBrackets:
+ aTok = SmToken(TLBRACKET, MS_LBRACKET, "[", TGLBRACES, 5);
+ break;
+ case DoubleSquareBrackets:
+ aTok = SmToken(TLDBRACKET, MS_LDBRACKET, "ldbracket", TGLBRACES, 5);
+ break;
+ case LineBrackets:
+ aTok = SmToken(TLLINE, MS_LINE, "lline", TGLBRACES, 5);
+ break;
+ case DoubleLineBrackets:
+ aTok = SmToken(TLDLINE, MS_DLINE, "ldline", TGLBRACES, 5);
+ break;
+ case CurlyBrackets:
+ aTok = SmToken(TLBRACE, MS_LBRACE, "lbrace", TGLBRACES, 5);
+ break;
+ case AngleBrackets:
+ aTok = SmToken(TLANGLE, MS_LANGLE, "langle", TGLBRACES, 5);
+ break;
+ case CeilBrackets:
+ aTok = SmToken(TLCEIL, MS_LCEIL, "lceil", TGLBRACES, 5);
+ break;
+ case FloorBrackets:
+ aTok = SmToken(TLFLOOR, MS_LFLOOR, "lfloor", TGLBRACES, 5);
+ break;
+ }
+ } else {
+ switch(eBracketType) {
+ case NoneBrackets:
+ aTok = SmToken(TNONE, '\0', "none", TGLBRACES | TGRBRACES, 0);
+ break;
+ case RoundBrackets:
+ aTok = SmToken(TRPARENT, MS_RPARENT, ")", TGRBRACES, 5);
+ break;
+ case SquareBrackets:
+ aTok = SmToken(TRBRACKET, MS_RBRACKET, "]", TGRBRACES, 5);
+ break;
+ case DoubleSquareBrackets:
+ aTok = SmToken(TRDBRACKET, MS_RDBRACKET, "rdbracket", TGRBRACES, 5);
+ break;
+ case LineBrackets:
+ aTok = SmToken(TRLINE, MS_LINE, "rline", TGRBRACES, 5);
+ break;
+ case DoubleLineBrackets:
+ aTok = SmToken(TRDLINE, MS_DLINE, "rdline", TGRBRACES, 5);
+ break;
+ case CurlyBrackets:
+ aTok = SmToken(TRBRACE, MS_RBRACE, "rbrace", TGRBRACES, 5);
+ break;
+ case AngleBrackets:
+ aTok = SmToken(TRANGLE, MS_RANGLE, "rangle", TGRBRACES, 5);
+ break;
+ case CeilBrackets:
+ aTok = SmToken(TRCEIL, MS_RCEIL, "rceil", TGRBRACES, 5);
+ break;
+ case FloorBrackets:
+ aTok = SmToken(TRFLOOR, MS_RFLOOR, "rfloor", TGRBRACES, 5);
+ break;
+ }
+ }
+ SmNode* pRetVal = new SmMathSymbolNode(aTok);
+ pRetVal->SetScaleMode(SCALE_HEIGHT);
+ return pRetVal;
+}
+
+bool SmCursor::InsertRow() {
+ AnnotateSelection();
+
+ //Find line
+ SmNode *pLine;
+ if(HasSelection()) {
+ SmNode *pSNode = FindSelectedNode(pTree);
+ j_assert(pSNode != NULL, "There must be a selected node if HasSelection()");
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
+ } else
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
+
+ //Find parent and offset in parent
+ SmStructureNode *pLineParent = pLine->GetParent();
+ int nParentIndex = pLineParent->IndexOfSubNode(pLine);
+ j_assert( nParentIndex != -1, "pLine must be a subnode of pLineParent!");
+
+ //Discover the context of this command
+ SmTableNode *pTable = NULL;
+ SmMatrixNode *pMatrix = NULL;
+ int nTableIndex = nParentIndex;
+ if(pLineParent->GetType() == NTABLE)
+ pTable = (SmTableNode*)pLineParent;
+ //If it's warped in a SmLineNode, we can still insert a newline
+ else if(pLineParent->GetType() == NLINE &&
+ pLineParent->GetParent() &&
+ pLineParent->GetParent()->GetType() == NTABLE) {
+ //NOTE: This hack might give problems if we stop ignoring SmAlignNode
+ pTable = (SmTableNode*)pLineParent->GetParent();
+ nTableIndex = pTable->IndexOfSubNode(pLineParent);
+ j_assert(nTableIndex != -1, "pLineParent must be a child of its parent!");
+ }
+ if(pLineParent->GetType() == NMATRIX)
+ pMatrix = (SmMatrixNode*)pLineParent;
+
+ //If we're not in a context that supports InsertRow, return sal_False
+ if(!pTable && !pMatrix)
+ return false;
+
+ //Now we start editing
+ BeginEdit();
+
+ //Convert line to list
+ SmNodeList *pLineList = NodeToList(pLine);
+
+ //Find position in line
+ SmNodeList::iterator it;
+ if(HasSelection()) {
+ //Take the selected nodes and delete them...
+ it = TakeSelectedNodesFromList(pLineList);
+ } else
+ it = FindPositionInLineList(pLineList, position->CaretPos);
+
+ //New caret position after inserting the newline/row in whatever context
+ SmCaretPos PosAfterInsert;
+
+ //If we're in the context of a table
+ if(pTable) {
+ SmNodeList *pNewLineList = new SmNodeList();
+ //Move elements from pLineList to pNewLineList
+ pNewLineList->splice(pNewLineList->begin(), *pLineList, it, pLineList->end());
+ //Make sure it is valid again
+ it = pLineList->end();
+ if(it != pLineList->begin())
+ --it;
+ if(pNewLineList->size() == 0)
+ pNewLineList->push_front(new SmPlaceNode());
+ //Parse new line
+ SmNode *pNewLine = SmNodeListParser().Parse(pNewLineList);
+ delete pNewLineList;
+ //Wrap pNewLine in SmLineNode if needed
+ if(pLineParent->GetType() == NLINE) {
+ SmLineNode *pNewLineNode = new SmLineNode(SmToken(TNEWLINE, '\0', "newline"));
+ pNewLineNode->SetSubNodes(pNewLine, NULL);
+ pNewLine = pNewLineNode;
+ }
+ //Get position
+ PosAfterInsert = SmCaretPos(pNewLine, 0);
+ //Move other nodes if needed
+ for( int i = pTable->GetNumSubNodes(); i > nTableIndex + 1; i--)
+ pTable->SetSubNode(i, pTable->GetSubNode(i-1));
+
+ //Insert new line
+ pTable->SetSubNode(nTableIndex + 1, pNewLine);
+
+ //Check if we need to change token type:
+ if(pTable->GetNumSubNodes() > 2 && pTable->GetToken().eType == TBINOM) {
+ SmToken tok = pTable->GetToken();
+ tok.eType = TSTACK;
+ pTable->SetToken(tok);
+ }
+ }
+ //If we're in the context of a matrix
+ else if(pMatrix) {
+ //Find position after insert and patch the list
+ PosAfterInsert = PatchLineList(pLineList, it);
+ //Move other children
+ sal_uInt16 rows = pMatrix->GetNumRows();
+ sal_uInt16 cols = pMatrix->GetNumCols();
+ int nRowStart = (nParentIndex - nParentIndex % cols) + cols;
+ for( int i = pMatrix->GetNumSubNodes() + cols - 1; i >= nRowStart + cols; i--)
+ pMatrix->SetSubNode(i, pMatrix->GetSubNode(i - cols));
+ for( int i = nRowStart; i < nRowStart + cols; i++) {
+ SmPlaceNode *pNewLine = new SmPlaceNode();
+ if(i == nParentIndex + cols)
+ PosAfterInsert = SmCaretPos(pNewLine, 0);
+ pMatrix->SetSubNode(i, pNewLine);
+ }
+ pMatrix->SetRowCol(rows + 1, cols);
+ } else
+ j_assert(sal_False, "We must be either the context of a table or matrix!");
+
+ //Finish editing
+ FinishEdit(pLineList, pLineParent, nParentIndex, PosAfterInsert);
+ //FinishEdit is actually used to handle siturations where parent is an instance of
+ //SmSubSupNode. In this case parent should always be a table or matrix, however, for
+ //code reuse we just use FinishEdit() here too.
+ return true;
+}
+
+void SmCursor::InsertFraction() {
+ AnnotateSelection();
+
+ //Find line
+ SmNode *pLine;
+ if(HasSelection()) {
+ SmNode *pSNode = FindSelectedNode(pTree);
+ j_assert(pSNode != NULL, "There must be a selected node when HasSelection is true!");
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
+ } else
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
+
+ //Find Parent and offset in parent
+ SmStructureNode *pLineParent = pLine->GetParent();
+ int nParentIndex = pLineParent->IndexOfSubNode(pLine);
+ j_assert(nParentIndex != -1, "pLine must be a subnode of pLineParent!");
+
+ //We begin modifying the tree here
+ BeginEdit();
+
+ //Convert line to list
+ SmNodeList* pLineList = NodeToList(pLine);
+
+ //Take the selection, and/or find iterator for current position
+ SmNodeList* pSelectedNodesList = new SmNodeList();
+ SmNodeList::iterator it;
+ if(HasSelection())
+ it = TakeSelectedNodesFromList(pLineList, pSelectedNodesList);
+ else
+ it = FindPositionInLineList(pLineList, position->CaretPos);
+
+ //Create pNum, and pDenom
+ if(pSelectedNodesList->size() == 0)
+ pSelectedNodesList->push_front(new SmPlaceNode());
+ SmNode *pNum = SmNodeListParser().Parse(pSelectedNodesList),
+ *pDenom = new SmPlaceNode();
+ delete pSelectedNodesList;
+ pSelectedNodesList = NULL;
+
+ //Create new fraction
+ SmBinVerNode *pFrac = new SmBinVerNode(SmToken(TOVER, '\0', "over", TGPRODUCT, 0));
+ SmNode *pRect = new SmRectangleNode(SmToken());
+ pFrac->SetSubNodes(pNum, pRect, pDenom);
+
+ //Insert in pLineList
+ SmNodeList::iterator patchIt = pLineList->insert(it, pFrac);
+ PatchLineList(pLineList, patchIt);
+ PatchLineList(pLineList, it);
+
+ //Finish editing
+ FinishEdit(pLineList, pLineParent, nParentIndex, SmCaretPos(pDenom, 1));
+}
+
+void SmCursor::InsertText(XubString aString){
+ BeginEdit();
+
+ Delete();
+
+ SmToken token;
+ token.eType = TIDENT;
+ token.cMathChar = '\0';
+ token.nGroup = 0;
+ token.nLevel = 5;
+ token.aText = aString;
+
+ SmTextNode* pText = new SmTextNode(token, FNT_VARIABLE);
+
+ //Prepare the new node
+ pText->Prepare(pDocShell->GetFormat(), *pDocShell);
+ pText->AdjustFontDesc();
+
+ SmNodeList* pList = new SmNodeList();
+ pList->push_front(pText);
+ InsertNodes(pList);
+
+ EndEdit();
+}
+
+void SmCursor::InsertElement(SmFormulaElement element){
+ BeginEdit();
+
+ Delete();
+
+ //Create new node
+ SmNode* pNewNode = NULL;
+ switch(element){
+ case BlankElement:
+ {
+ SmToken token;
+ token.nGroup = TGBLANK;
+ token.aText.AssignAscii("~");
+ pNewNode = new SmBlankNode(token);
+ }break;
+ case FactorialElement:
+ {
+ SmToken token(TFACT, MS_FACT, "fact", TGUNOPER, 5);
+ pNewNode = new SmMathSymbolNode(token);
+ }break;
+ case PlusElement:
+ {
+ SmToken token;
+ token.eType = TPLUS;
+ token.cMathChar = MS_PLUS;
+ token.nGroup = TGUNOPER | TGSUM;
+ token.nLevel = 5;
+ token.aText.AssignAscii("+");
+ pNewNode = new SmMathSymbolNode(token);
+ }break;
+ case MinusElement:
+ {
+ SmToken token;
+ token.eType = TMINUS;
+ token.cMathChar = MS_MINUS;
+ token.nGroup = MS_PLUS;
+ token.nLevel = 5;
+ token.aText.AssignAscii("-");
+ pNewNode = new SmMathSymbolNode(token);
+ }break;
+ case CDotElement:
+ {
+ SmToken token;
+ token.eType = TCDOT;
+ token.cMathChar = MS_CDOT;
+ token.nGroup = TGPRODUCT;
+ token.aText.AssignAscii("cdot");
+ pNewNode = new SmMathSymbolNode(token);
+ }break;
+ case EqualElement:
+ {
+ SmToken token;
+ token.eType = TASSIGN;
+ token.cMathChar = MS_ASSIGN;
+ token.nGroup = TGRELATION;
+ token.aText.AssignAscii("=");
+ pNewNode = new SmMathSymbolNode(token);
+ }break;
+ case LessThanElement:
+ {
+ SmToken token;
+ token.eType = TLT;
+ token.cMathChar = MS_LT;
+ token.nGroup = TGRELATION;
+ token.aText.AssignAscii("<");
+ pNewNode = new SmMathSymbolNode(token);
+ }break;
+ case GreaterThanElement:
+ {
+ SmToken token;
+ token.eType = TGT;
+ token.cMathChar = MS_GT;
+ token.nGroup = TGRELATION;
+ token.aText.AssignAscii(">");
+ pNewNode = new SmMathSymbolNode(token);
+ }break;
+ case PercentElement:
+ {
+ SmToken token;
+ token.eType = TTEXT;
+ token.cMathChar = MS_PERCENT;
+ token.nGroup = 0;
+ token.aText.AssignAscii("\"%\"");
+ pNewNode = new SmMathSymbolNode(token);
+ }break;
+ default:
+ j_assert(false, "Element unknown!");
+ }
+ j_assert(pNewNode != NULL, "No new node was created!");
+ if(!pNewNode)
+ return;
+
+ //Prepare the new node
+ pNewNode->Prepare(pDocShell->GetFormat(), *pDocShell);
+
+ //Insert new node
+ SmNodeList* pList = new SmNodeList();
+ pList->push_front(pNewNode);
+ InsertNodes(pList);
+
+ EndEdit();
+}
+
+void SmCursor::InsertSpecial(XubString aString) {
+ BeginEdit();
+ Delete();
+
+ aString.EraseLeadingAndTrailingChars();
+ aString.EraseLeadingChars('%');
+
+ //Create instance of special node
+ SmToken token;
+ token.eType = TSPECIAL;
+ token.cMathChar = '\0';
+ token.nGroup = 0;
+ token.nLevel = 5;
+ token.aText = aString; //Don't know if leading "%" should be removed
+ SmSpecialNode* pSpecial = new SmSpecialNode(token);
+
+ //Prepare the special node
+ pSpecial->Prepare(pDocShell->GetFormat(), *pDocShell);
+
+ //Insert the node
+ SmNodeList* pList = new SmNodeList();
+ pList->push_front(pSpecial);
+ InsertNodes(pList);
+
+ EndEdit();
+}
+
+void SmCursor::InsertCommand(sal_uInt16 nCommand) {
+ switch(nCommand){
+ case RID_NEWLINE:
+ InsertRow();
+ break;
+ case RID_FROMX:
+ InsertLimit(CSUB, true);
+ break;
+ case RID_TOX:
+ InsertLimit(CSUP, true);
+ break;
+ case RID_FROMXTOY:
+ if(InsertLimit(CSUB, true))
+ InsertLimit(CSUP, true);
+ break;
+ default:
+ InsertCommandText(SmResId(nCommand));
+ break;
+ }
+}
+
+void SmCursor::InsertCommandText(XubString aCommandText) {
+ //Parse the the sub expression
+ SmNode* pSubExpr = SmParser().ParseExpression(aCommandText);
+
+ //Prepare the subtree
+ pSubExpr->Prepare(pDocShell->GetFormat(), *pDocShell);
+
+ //Convert subtree to list
+ SmNodeList* pLineList = NodeToList(pSubExpr);
+
+ BeginEdit();
+
+ //Delete any selection
+ Delete();
+
+ //Insert it
+ InsertNodes(pLineList);
+
+ EndEdit();
+}
+
+void SmCursor::Copy(){
+ if(!HasSelection())
+ return;
+
+ //Find selected node
+ SmNode* pSNode = FindSelectedNode(pTree);
+ //Find visual line
+ SmNode* pLine = FindTopMostNodeInLine(pSNode, true);
+
+ //Clone selected nodes
+ SmNodeList* pList;
+ if(IsLineCompositionNode(pLine))
+ pList = CloneLineToList((SmStructureNode*)pLine, true);
+ else{
+ pList = new SmNodeList();
+ //Special care to only clone selected text
+ if(pLine->GetType() == NTEXT) {
+ SmTextNode *pText = (SmTextNode*)pLine;
+ SmTextNode *pClone = new SmTextNode( pText->GetToken(), pText->GetFontDesc() );
+ int start = pText->GetSelectionStart(),
+ length = pText->GetSelectionEnd() - pText->GetSelectionStart();
+ pClone->ChangeText(pText->GetText().Copy(start, length));
+ pClone->SetScaleMode(pText->GetScaleMode());
+ pList->push_front(pClone);
+ } else {
+ SmCloningVisitor aCloneFactory;
+ pList->push_front(aCloneFactory.Clone(pLine));
+ }
+ }
+
+ //Set clipboard
+ if(pList->size() > 0)
+ SetClipboard(pList);
+}
+
+void SmCursor::Paste() {
+ BeginEdit();
+ Delete();
+
+ if(pClipboard && pClipboard->size() > 0)
+ InsertNodes(CloneList(pClipboard));
+
+ EndEdit();
+}
+
+SmNodeList* SmCursor::CloneList(SmNodeList* pList){
+ SmCloningVisitor aCloneFactory;
+ SmNodeList* pClones = new SmNodeList();
+
+ SmNodeList::iterator it;
+ for(it = pList->begin(); it != pList->end(); ++it){
+ SmNode *pClone = aCloneFactory.Clone(*it);
+ pClones->push_back(pClone);
+ }
+
+ return pClones;
+}
+
+void SmCursor::SetClipboard(SmNodeList* pList){
+ if(pClipboard){
+ //Delete all nodes on the clipboard
+ SmNodeList::iterator it;
+ for(it = pClipboard->begin(); it != pClipboard->end(); ++it)
+ delete (*it);
+ delete pClipboard;
+ }
+ pClipboard = pList;
+}
+
+SmNode* SmCursor::FindTopMostNodeInLine(SmNode* pSNode, bool MoveUpIfSelected){
+ //If we haven't got a subnode
+ if(!pSNode)
+ return NULL;
+
+ //Move up parent untill we find a node who's
+ //parent is NULL or isn't selected and not a type of:
+ // SmExpressionNode
+ // SmLineNode
+ // SmBinHorNode
+ // SmUnHorNode
+ // SmAlignNode
+ // SmFontNode
+ while(pSNode->GetParent() &&
+ ((MoveUpIfSelected &&
+ pSNode->GetParent()->IsSelected()) ||
+ IsLineCompositionNode(pSNode->GetParent())))
+ pSNode = pSNode->GetParent();
+ //Now we have the selection line node
+ return pSNode;
+}
+
+SmNode* SmCursor::FindSelectedNode(SmNode* pNode){
+ SmNodeIterator it(pNode);
+ while(it.Next()){
+ if(it->IsSelected())
+ return it.Current();
+ SmNode* pRetVal = FindSelectedNode(it.Current());
+ if(pRetVal)
+ return pRetVal;
+ }
+ return NULL;
+}
+
+SmNodeList* SmCursor::LineToList(SmStructureNode* pLine, SmNodeList* list){
+ SmNodeIterator it(pLine);
+ while(it.Next()){
+ switch(it->GetType()){
+ case NLINE:
+ case NUNHOR:
+ case NEXPRESSION:
+ case NBINHOR:
+ case NALIGN:
+ case NFONT:
+ LineToList((SmStructureNode*)it.Current(), list);
+ break;
+ case NERROR:
+ delete it.Current();
+ break;
+ default:
+ list->push_back(it.Current());
+ }
+ }
+ SmNodeArray emptyArray(0);
+ pLine->SetSubNodes(emptyArray);
+ delete pLine;
+ return list;
+}
+
+SmNodeList* SmCursor::CloneLineToList(SmStructureNode* pLine, bool bOnlyIfSelected, SmNodeList* pList){
+ SmCloningVisitor aCloneFactory;
+ SmNodeIterator it(pLine);
+ while(it.Next()){
+ if( IsLineCompositionNode( it.Current() ) )
+ CloneLineToList( (SmStructureNode*)it.Current(), bOnlyIfSelected, pList );
+ else if( (!bOnlyIfSelected || it->IsSelected()) && it->GetType() != NERROR ) {
+ //Only clone selected text from SmTextNode
+ if(it->GetType() == NTEXT) {
+ SmTextNode *pText = (SmTextNode*)it.Current();
+ SmTextNode *pClone = new SmTextNode( it->GetToken(), pText->GetFontDesc() );
+ int start = pText->GetSelectionStart(),
+ length = pText->GetSelectionEnd() - pText->GetSelectionStart();
+ pClone->ChangeText(pText->GetText().Copy(start, length));
+ pClone->SetScaleMode(pText->GetScaleMode());
+ pList->push_back(pClone);
+ } else
+ pList->push_back(aCloneFactory.Clone(it.Current()));
+ }
+ }
+ return pList;
+}
+
+bool SmCursor::IsLineCompositionNode(SmNode* pNode){
+ switch(pNode->GetType()){
+ case NLINE:
+ case NUNHOR:
+ case NEXPRESSION:
+ case NBINHOR:
+ case NALIGN:
+ case NFONT:
+ return true;
+ default:
+ return false;
+ }
+ return false;
+}
+
+int SmCursor::CountSelectedNodes(SmNode* pNode){
+ int nCount = 0;
+ SmNodeIterator it(pNode);
+ while(it.Next()){
+ if(it->IsSelected() && !IsLineCompositionNode(it.Current()))
+ nCount++;
+ nCount += CountSelectedNodes(it.Current());
+ }
+ return nCount;
+}
+
+bool SmCursor::HasComplexSelection(){
+ if(!HasSelection())
+ return false;
+ AnnotateSelection();
+
+ return CountSelectedNodes(pTree) > 1;
+}
+
+void SmCursor::FinishEdit(SmNodeList* pLineList,
+ SmStructureNode* pParent,
+ int nParentIndex,
+ SmCaretPos PosAfterEdit,
+ SmNode* pStartLine) {
+ //Store number of nodes in line for later
+ int entries = pLineList->size();
+
+ //Parse list of nodes to a tree
+ SmNodeListParser parser;
+ SmNode* pLine = parser.Parse(pLineList);
+ delete pLineList;
+
+ //Check if we're making the body of a subsup node bigger than one
+ if(pParent->GetType() == NSUBSUP &&
+ nParentIndex == 0 &&
+ entries > 1) {
+ //Wrap pLine in scalable round brackets
+ SmToken aTok(TLEFT, '\0', "left", 0, 5);
+ SmBraceNode *pBrace = new SmBraceNode(aTok);
+ pBrace->SetScaleMode(SCALE_HEIGHT);
+ SmNode *pLeft = CreateBracket(RoundBrackets, true),
+ *pRight = CreateBracket(RoundBrackets, false);
+ SmBracebodyNode *pBody = new SmBracebodyNode(SmToken());
+ pBody->SetSubNodes(pLine, NULL);
+ pBrace->SetSubNodes(pLeft, pBody, pRight);
+ pBrace->Prepare(pDocShell->GetFormat(), *pDocShell);
+ pLine = pBrace;
+ //TODO: Consider the following alternative behavior:
+ //Consider the line: A + {B + C}^D lsub E
+ //Here pLineList is B, + and C and pParent is a subsup node with
+ //both RSUP and LSUB set. Imagine the user just inserted "B +" in
+ //the body of the subsup node...
+ //The most natural thing to do would be to make the line like this:
+ //A + B lsub E + C ^ D
+ //E.g. apply LSUB and LSUP to the first element in pLineList and RSUP
+ //and RSUB to the last eleent in pLineList. But how should this act
+ //for CSUP and CSUB ???
+ //For this reason and because brackets was faster to implement, this solution
+ //have been choosen. It might be worth working on the other solution later...
+ }
+
+ //Set pStartLine if NULL
+ if(!pStartLine)
+ pStartLine = pLine;
+
+ //Insert it back into the parent
+ pParent->SetSubNode(nParentIndex, pLine);
+
+ //Rebuild graph of caret position
+ anchor = NULL;
+ position = NULL;
+ BuildGraph();
+ AnnotateSelection(); //Update selection annotation!
+
+ //Set caret position
+ if(!SetCaretPosition(PosAfterEdit, true))
+ SetCaretPosition(SmCaretPos(pStartLine, 0), true);
+
+ //End edit section
+ EndEdit();
+}
+
+void SmCursor::BeginEdit(){
+ if(nEditSections++ > 0) return;
+
+ bIsEnabledSetModifiedSmDocShell = pDocShell->IsEnableSetModified();
+ if( bIsEnabledSetModifiedSmDocShell )
+ pDocShell->EnableSetModified( sal_False );
+}
+
+void SmCursor::EndEdit(){
+ if(--nEditSections > 0) return;
+
+ pDocShell->SetFormulaArranged(sal_False);
+ //Okay, I don't know what this does... :)
+ //It's used in SmDocShell::SetText and with places where everything is modified.
+ //I think it does some magic, with sfx, but everything is totally undocumented so
+ //it's kinda hard to tell...
+ if ( bIsEnabledSetModifiedSmDocShell )
+ pDocShell->EnableSetModified( bIsEnabledSetModifiedSmDocShell );
+ //I think this notifies people around us that we've modified this document...
+ pDocShell->SetModified(sal_True);
+ //I think SmDocShell uses this value when it sends an update graphics event
+ //Anyway comments elsewhere suggests it need to be updated...
+ pDocShell->nModifyCount++;
+
+ //TODO: Consider copying the update accessability code from SmDocShell::SetText in here...
+ //This somehow updates the size of SmGraphicView if it is running in embedded mode
+ if( pDocShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ pDocShell->OnDocumentPrinterChanged(0);
+
+ //Request a replaint...
+ RequestRepaint();
+
+ //Update the edit engine and text of the document
+ String formula;
+ SmNodeToTextVisitor(pTree, formula);
+ //pTree->CreateTextFromNode(formula);
+ pDocShell->aText = formula;
+ pDocShell->GetEditEngine().QuickInsertText( formula, ESelection( 0, 0, EE_PARA_ALL, EE_PARA_ALL ) );
+ pDocShell->GetEditEngine().QuickFormatDoc();
+}
+
+void SmCursor::RequestRepaint(){
+ SmViewShell *pViewSh = SmGetActiveView();
+ if( pViewSh ) {
+ if ( SFX_CREATE_MODE_EMBEDDED == pDocShell->GetCreateMode() )
+ pDocShell->Repaint();
+ else
+ pViewSh->GetGraphicWindow().Invalidate();
+ }
+}
+
+/////////////////////////////////////// SmNodeListParser ///////////////////////////////////////
+
+SmNode* SmNodeListParser::Parse(SmNodeList* list, bool bDeleteErrorNodes){
+ pList = list;
+ if(bDeleteErrorNodes){
+ //Delete error nodes
+ SmNodeList::iterator it = pList->begin();
+ while(it != pList->end()) {
+ if((*it)->GetType() == NERROR){
+ //Delete and erase
+ delete *it;
+ it = pList->erase(it);
+ }else
+ ++it;
+ }
+ }
+ SmNode* retval = Expression();
+ pList = NULL;
+ return retval;
+}
+
+SmNode* SmNodeListParser::Expression(){
+ SmNodeArray NodeArray;
+ //Accept as many relations as there is
+ while(Terminal())
+ NodeArray.push_back(Relation());
+
+ //Create SmExpressionNode, I hope SmToken() will do :)
+ SmStructureNode* pExpr = new SmExpressionNode(SmToken());
+ pExpr->SetSubNodes(NodeArray);
+ return pExpr;
+}
+
+SmNode* SmNodeListParser::Relation(){
+ //Read a sum
+ SmNode* pLeft = Sum();
+ //While we have tokens and the next is a relation
+ while(Terminal() && IsRelationOperator(Terminal()->GetToken())){
+ //Take the operator
+ SmNode* pOper = Take();
+ //Find the right side of the relation
+ SmNode* pRight = Sum();
+ //Create new SmBinHorNode
+ SmStructureNode* pNewNode = new SmBinHorNode(SmToken());
+ pNewNode->SetSubNodes(pLeft, pOper, pRight);
+ pLeft = pNewNode;
+ }
+ return pLeft;
+}
+
+SmNode* SmNodeListParser::Sum(){
+ //Read a product
+ SmNode* pLeft = Product();
+ //While we have tokens and the next is a sum
+ while(Terminal() && IsSumOperator(Terminal()->GetToken())){
+ //Take the operator
+ SmNode* pOper = Take();
+ //Find the right side of the sum
+ SmNode* pRight = Product();
+ //Create new SmBinHorNode
+ SmStructureNode* pNewNode = new SmBinHorNode(SmToken());
+ pNewNode->SetSubNodes(pLeft, pOper, pRight);
+ pLeft = pNewNode;
+ }
+ return pLeft;
+}
+
+SmNode* SmNodeListParser::Product(){
+ //Read a Factor
+ SmNode* pLeft = Factor();
+ //While we have tokens and the next is a product
+ while(Terminal() && IsProductOperator(Terminal()->GetToken())){
+ //Take the operator
+ SmNode* pOper = Take();
+ //Find the right side of the operation
+ SmNode* pRight = Factor();
+ //Create new SmBinHorNode
+ SmStructureNode* pNewNode = new SmBinHorNode(SmToken());
+ pNewNode->SetSubNodes(pLeft, pOper, pRight);
+ pLeft = pNewNode;
+ }
+ return pLeft;
+}
+
+SmNode* SmNodeListParser::Factor(){
+ //Read unary operations
+ if(!Terminal())
+ return Error();
+ //Take care of unary operators
+ else if(IsUnaryOperator(Terminal()->GetToken()))
+ {
+ SmStructureNode *pUnary = new SmUnHorNode(SmToken());
+ SmNode *pOper = Terminal(),
+ *pArg;
+
+ if(Next())
+ pArg = Factor();
+ else
+ pArg = Error();
+
+ pUnary->SetSubNodes(pOper, pArg);
+ return pUnary;
+ }
+ return Postfix();
+}
+
+SmNode* SmNodeListParser::Postfix(){
+ if(!Terminal())
+ return Error();
+ SmNode *pArg = NULL;
+ if(IsPostfixOperator(Terminal()->GetToken()))
+ pArg = Error();
+ else if(IsOperator(Terminal()->GetToken()))
+ return Error();
+ else
+ pArg = Take();
+ while(Terminal() && IsPostfixOperator(Terminal()->GetToken())) {
+ SmStructureNode *pUnary = new SmUnHorNode(SmToken());
+ SmNode *pOper = Take();
+ pUnary->SetSubNodes(pArg, pOper);
+ pArg = pUnary;
+ }
+ return pArg;
+}
+
+SmNode* SmNodeListParser::Error(){
+ return new SmErrorNode(PE_UNEXPECTED_TOKEN, SmToken());
+}
+
+bool SmNodeListParser::IsOperator(const SmToken &token) {
+ return IsRelationOperator(token) ||
+ IsSumOperator(token) ||
+ IsProductOperator(token) ||
+ IsUnaryOperator(token) ||
+ IsPostfixOperator(token);
+}
+
+bool SmNodeListParser::IsRelationOperator(const SmToken &token) {
+ return token.nGroup & TGRELATION;
+}
+
+bool SmNodeListParser::IsSumOperator(const SmToken &token) {
+ return token.nGroup & TGSUM;
+}
+
+bool SmNodeListParser::IsProductOperator(const SmToken &token) {
+ return token.nGroup & TGPRODUCT &&
+ token.eType != TWIDESLASH &&
+ token.eType != TWIDEBACKSLASH &&
+ token.eType != TUNDERBRACE &&
+ token.eType != TOVERBRACE &&
+ token.eType != TOVER;
+}
+
+bool SmNodeListParser::IsUnaryOperator(const SmToken &token) {
+ return token.nGroup & TGUNOPER &&
+ (token.eType == TPLUS ||
+ token.eType == TMINUS ||
+ token.eType == TPLUSMINUS ||
+ token.eType == TMINUSPLUS ||
+ token.eType == TNEG ||
+ token.eType == TUOPER);
+}
+
+bool SmNodeListParser::IsPostfixOperator(const SmToken &token) {
+ return token.eType == TFACT;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/detreg.cxx b/starmath/source/detreg.cxx
index ef4b261ce0b3..f5725275e6cf 100644
--- a/starmath/source/detreg.cxx
+++ b/starmath/source/detreg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,4 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 153dce3f5a03..11c0e6e8e638 100755
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,7 +47,7 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/sfx.hrc>
#include <tools/string.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <svx/ucsubset.hxx>
@@ -92,7 +93,6 @@ SmFontStyles::SmFontStyles() :
aBold ( ResId( RID_FONTBOLD, *SM_MOD()->GetResMgr() ) ),
aItalic ( ResId( RID_FONTITALIC, *SM_MOD()->GetResMgr() ) )
{
-// SM_MOD()->GetResMgr().FreeResource();
aBoldItalic = aBold;
aBoldItalic.AppendAscii( ", " );
@@ -103,7 +103,7 @@ SmFontStyles::SmFontStyles() :
const String & SmFontStyles::GetStyleName( const Font &rFont ) const
{
//! compare also SmSpecialNode::Prepare
- sal_Bool bBold = IsBold( rFont ),
+ bool bBold = IsBold( rFont ),
bItalic = IsItalic( rFont );
if (bBold && bItalic)
@@ -123,7 +123,7 @@ const String & SmFontStyles::GetStyleName( sal_uInt16 nIdx ) const
// 2 = "bold", 3 = "bold italic"
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT( nIdx < GetCount(), "index out of range" );
+ OSL_ENSURE( nIdx < GetCount(), "index out of range" );
#endif
switch (nIdx)
{
@@ -157,7 +157,7 @@ void SetFontStyle(const XubString &rStyleName, Font &rFont)
if (rStyleName.CompareTo( rStyles.GetStyleName(i) ) == COMPARE_EQUAL)
break;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(i < rStyles.GetCount(), "style-name unknown");
+ OSL_ENSURE(i < rStyles.GetCount(), "style-name unknown");
#endif
nIndex = i;
}
@@ -220,7 +220,7 @@ sal_Bool SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
rSet.Put(SfxBoolItem(GetWhich(SID_NO_RIGHT_SPACES), aNoRightSpaces.IsChecked()));
rSet.Put(SfxBoolItem(GetWhich(SID_SAVE_ONLY_USED_SYMBOLS), aSaveOnlyUsedSymbols.IsChecked()));
- return sal_True;
+ return true;
}
@@ -330,7 +330,7 @@ void SmFontDialog::SetFont(const Font &rFont)
SmFontDialog::SmFontDialog(Window * pParent,
- OutputDevice *pFntListDevice, sal_Bool bHideCheckboxes, sal_Bool bFreeRes)
+ OutputDevice *pFntListDevice, bool bHideCheckboxes, bool bFreeRes)
: ModalDialog(pParent,SmResId(RID_FONTDIALOG)),
aFixedText1 (this, SmResId(1)),
aFontBox (this, SmResId(1)),
@@ -359,7 +359,7 @@ SmFontDialog::SmFontDialog(Window * pParent,
Face.SetFamily(FAMILY_DONTKNOW);
Face.SetPitch(PITCH_DONTKNOW);
Face.SetCharSet(RTL_TEXTENCODING_DONTKNOW);
- Face.SetTransparent(sal_True);
+ Face.SetTransparent(true);
InitColor_Impl();
@@ -374,13 +374,13 @@ SmFontDialog::SmFontDialog(Window * pParent,
if (bHideCheckboxes)
{
- aBoldCheckBox.Check( sal_False );
- aBoldCheckBox.Enable( sal_False );
- aBoldCheckBox.Show( sal_False );
- aItalicCheckBox.Check( sal_False );
- aItalicCheckBox.Enable( sal_False );
- aItalicCheckBox.Show( sal_False );
- aFixedText2.Show( sal_False );
+ aBoldCheckBox.Check( false );
+ aBoldCheckBox.Enable( false );
+ aBoldCheckBox.Show( false );
+ aItalicCheckBox.Check( false );
+ aItalicCheckBox.Enable( false );
+ aItalicCheckBox.Show( false );
+ aFixedText2.Show( false );
Size aSize( aFontBox.GetSizePixel() );
long nComboBoxBottom = aFontBox.GetPosPixel().Y() + aFontBox.GetSizePixel().Height();
@@ -441,7 +441,7 @@ IMPL_LINK( SmFontSizeDialog, DefaultButtonClickHdl, Button *, EMPTYARG /*pButton
}
-SmFontSizeDialog::SmFontSizeDialog(Window * pParent, sal_Bool bFreeRes)
+SmFontSizeDialog::SmFontSizeDialog(Window * pParent, bool bFreeRes)
: ModalDialog(pParent, SmResId(RID_FONTSIZEDIALOG)),
aFixedText1(this, SmResId(1)),
aBaseSize(this, SmResId(1)),
@@ -506,16 +506,16 @@ IMPL_LINK( SmFontTypeDialog, MenuSelectHdl, Menu *, pMenu )
{
SmFontPickListBox *pActiveListBox;
- sal_Bool bHideCheckboxes = sal_False;
+ bool bHideCheckboxes = false;
switch (pMenu->GetCurItemId())
{
case 1: pActiveListBox = &aVariableFont; break;
case 2: pActiveListBox = &aFunctionFont; break;
case 3: pActiveListBox = &aNumberFont; break;
case 4: pActiveListBox = &aTextFont; break;
- case 5: pActiveListBox = &aSerifFont; bHideCheckboxes = sal_True; break;
- case 6: pActiveListBox = &aSansFont; bHideCheckboxes = sal_True; break;
- case 7: pActiveListBox = &aFixedFont; bHideCheckboxes = sal_True; break;
+ case 5: pActiveListBox = &aSerifFont; bHideCheckboxes = true; break;
+ case 6: pActiveListBox = &aSansFont; bHideCheckboxes = true; break;
+ case 7: pActiveListBox = &aFixedFont; bHideCheckboxes = true; break;
default:pActiveListBox = NULL;
}
@@ -540,7 +540,7 @@ IMPL_LINK_INLINE_START( SmFontTypeDialog, DefaultButtonClickHdl, Button *, EMPTY
SmModule *pp = SM_MOD();
SmFormat aFmt( pp->GetConfig()->GetStandardFormat() );
WriteTo( aFmt );
- pp->GetConfig()->SetStandardFormat( aFmt, sal_True );
+ pp->GetConfig()->SetStandardFormat( aFmt, true );
}
delete pQueryBox;
@@ -549,7 +549,7 @@ IMPL_LINK_INLINE_START( SmFontTypeDialog, DefaultButtonClickHdl, Button *, EMPTY
IMPL_LINK_INLINE_END( SmFontTypeDialog, DefaultButtonClickHdl, Button *, pButton )
-SmFontTypeDialog::SmFontTypeDialog(Window * pParent, OutputDevice *pFntListDevice, sal_Bool bFreeRes)
+SmFontTypeDialog::SmFontTypeDialog(Window * pParent, OutputDevice *pFntListDevice, bool bFreeRes)
: ModalDialog(pParent, SmResId(RID_FONTTYPEDIALOG)),
aFixedText1 (this, SmResId(1)),
aVariableFont (this, SmResId(1)),
@@ -660,8 +660,7 @@ static const FieldMinMax pMinMaxData[10][4] =
};
SmCategoryDesc::SmCategoryDesc(const ResId& rResId, sal_uInt16 nCategoryIdx) :
- Resource(rResId),
- bIsHighContrast(sal_False)
+ Resource(rResId)
{
if (IsAvailableRes(ResId(1,*rResId.GetResMgr()).SetRT(RSC_STRING)))
{
@@ -676,13 +675,11 @@ SmCategoryDesc::SmCategoryDesc(const ResId& rResId, sal_uInt16 nCategoryIdx) :
{
Strings [i] = new XubString(ResId(nI2,*rResId.GetResMgr()));
Graphics [i] = new Bitmap(ResId(10*nI2,*rResId.GetResMgr()));
- GraphicsH[i] = new Bitmap(ResId(10*nI2+1,*rResId.GetResMgr()));
}
else
{
Strings [i] = 0;
Graphics [i] = 0;
- GraphicsH[i] = 0;
}
}
@@ -704,7 +701,6 @@ SmCategoryDesc::~SmCategoryDesc()
{
delete Strings [i];
delete Graphics [i];
- delete GraphicsH[i];
}
}
@@ -760,7 +756,7 @@ IMPL_LINK( SmDistanceDialog, CheckBoxClickHdl, CheckBox *, pCheckBox )
{
aCheckBox1.Toggle();
- sal_Bool bChecked = aCheckBox1.IsChecked();
+ bool bChecked = aCheckBox1.IsChecked();
aFixedText4 .Enable( bChecked );
aMetricField4.Enable( bChecked );
}
@@ -776,7 +772,7 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, const rtl::OString& sHelpI
const XubString aEmptyText;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(aEmptyText.Len() == 0, "Sm: Ooops...");
+ OSL_ENSURE(aEmptyText.Len() == 0, "Sm: Ooops...");
#endif
rField.SetHelpId(sHelpId);
@@ -797,16 +793,16 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, const rtl::OString& sHelpI
void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
{
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(/*0 <= nCategory &&*/ nCategory < NOCATEGORIES,
- "Sm: falsche Kategorienummer in SmDistanceDialog");
+ OSL_ENSURE(/*0 <= nCategory &&*/ nCategory < NOCATEGORIES,
+ "Sm: wrong category number in SmDistanceDialog");
#endif
// array to convert category- and metricfield-number in help ids.
// 0 is used in case of unused combinations.
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(NOCATEGORIES == 10, "Sm : Array passt nicht zu Anzahl der Kategorien");
+ OSL_ENSURE(NOCATEGORIES == 10, "Sm : array doesn't fit into the number of categories");
#endif
- const char* __READONLY_DATA aCatMf2Hid[10][4] =
+ static const char * aCatMf2Hid[10][4] =
{
{ HID_SMA_DEFAULT_DIST, HID_SMA_LINE_DIST, HID_SMA_ROOT_DIST, 0 },
{ HID_SMA_SUP_DIST, HID_SMA_SUB_DIST , 0, 0 },
@@ -821,7 +817,7 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
};
// array to help iterate over the controls
- Window * __READONLY_DATA aWin[4][2] =
+ Window * const aWin[4][2] =
{
{ &aFixedText1, &aMetricField1 },
{ &aFixedText2, &aMetricField2 },
@@ -844,12 +840,12 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
if (nActiveCategory == 5)
bScaleAllBrackets = aCheckBox1.IsChecked();
- aMenuButton.GetPopupMenu()->CheckItem(nActiveCategory + 1, sal_False);
+ aMenuButton.GetPopupMenu()->CheckItem(nActiveCategory + 1, false);
}
// aktivieren/deaktivieren der zugehoerigen Controls in Abhaengigkeit von der
// gewaehlten Kategorie.
- sal_Bool bActive;
+ bool bActive;
for (sal_uInt16 i = 0; i < 4; i++)
{
FixedText *pFT = (FixedText * const) aWin[i][0];
@@ -902,12 +898,12 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
{
aCheckBox1.Check( bScaleAllBrackets );
- sal_Bool bChecked = aCheckBox1.IsChecked();
+ bool bChecked = aCheckBox1.IsChecked();
aFixedText4 .Enable( bChecked );
aMetricField4.Enable( bChecked );
}
- aMenuButton.GetPopupMenu()->CheckItem(nCategory + 1, sal_True);
+ aMenuButton.GetPopupMenu()->CheckItem(nCategory + 1, true);
aFixedLine.SetText(Categories[nCategory]->GetName());
nActiveCategory = nCategory;
@@ -918,7 +914,7 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
}
-SmDistanceDialog::SmDistanceDialog(Window *pParent, sal_Bool bFreeRes)
+SmDistanceDialog::SmDistanceDialog(Window *pParent, bool bFreeRes)
: ModalDialog(pParent, SmResId(RID_DISTANCEDIALOG)),
aFixedText1 (this, SmResId(1)),
aMetricField1 (this, SmResId(1)),
@@ -939,13 +935,11 @@ SmDistanceDialog::SmDistanceDialog(Window *pParent, sal_Bool bFreeRes)
for (sal_uInt16 i = 0; i < NOCATEGORIES; i++)
Categories[i] = new SmCategoryDesc(SmResId(i + 1), i);
nActiveCategory = CATEGORY_NONE;
- bScaleAllBrackets = sal_False;
+ bScaleAllBrackets = false;
if (bFreeRes)
FreeResource();
- ApplyImages();
-
// preview like controls should have a 2D look
aBitmap.SetBorderStyle( WINDOW_BORDER_MONO );
@@ -967,22 +961,8 @@ SmDistanceDialog::~SmDistanceDialog()
DELETEZ(Categories[i]);
}
-void SmDistanceDialog::ApplyImages()
-{
- sal_Bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
- for (int i = 0; i < NOCATEGORIES; ++i)
- {
- SmCategoryDesc *pCat = Categories[i];
- if (pCat)
- pCat->SetHighContrast( bHighContrast );
- }
-}
-
void SmDistanceDialog::DataChanged( const DataChangedEvent &rEvt )
{
- if ( (rEvt.GetType() == DATACHANGED_SETTINGS) && (rEvt.GetFlags() & SETTINGS_STYLE) )
- ApplyImages();
-
ModalDialog::DataChanged( rEvt );
}
@@ -1079,7 +1059,7 @@ IMPL_LINK( SmAlignDialog, DefaultButtonClickHdl, Button *, EMPTYARG /*pButton*/
}
-SmAlignDialog::SmAlignDialog(Window * pParent, sal_Bool bFreeRes)
+SmAlignDialog::SmAlignDialog(Window * pParent, bool bFreeRes)
: ModalDialog(pParent, SmResId(RID_ALIGNDIALOG)),
aLeft (this, SmResId(1)),
aCenter (this, SmResId(2)),
@@ -1101,21 +1081,21 @@ void SmAlignDialog::ReadFrom(const SmFormat &rFormat)
switch (rFormat.GetHorAlign())
{
case AlignLeft:
- aLeft .Check(sal_True);
- aCenter.Check(sal_False);
- aRight .Check(sal_False);
+ aLeft .Check(true);
+ aCenter.Check(false);
+ aRight .Check(false);
break;
case AlignCenter:
- aLeft .Check(sal_False);
- aCenter.Check(sal_True);
- aRight .Check(sal_False);
+ aLeft .Check(false);
+ aCenter.Check(true);
+ aRight .Check(false);
break;
case AlignRight:
- aLeft .Check(sal_False);
- aCenter.Check(sal_False);
- aRight .Check(sal_True);
+ aLeft .Check(false);
+ aCenter.Check(false);
+ aRight .Check(true);
break;
}
}
@@ -1260,8 +1240,8 @@ SmShowSymbolSet::SmShowSymbolSet(Window *pParent, const ResId& rResId) :
nColumns--;
nRows = sal::static_int_cast< sal_uInt16 >(aOutputSize.Height() / nLen);
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(nColumns > 0, "Sm : keine Spalten");
- DBG_ASSERT(nRows > 0, "Sm : keine Zeilen");
+ OSL_ENSURE(nColumns > 0, "Sm : no columns");
+ OSL_ENSURE(nRows > 0, "Sm : no rows");
#endif
// genau passend machen
@@ -1270,7 +1250,7 @@ SmShowSymbolSet::SmShowSymbolSet(Window *pParent, const ResId& rResId) :
aVScrollBar.SetPosSizePixel(Point(aOutputSize.Width() + 1, -1),
Size(nScrollBarWidth, aOutputSize.Height() + 2));
- aVScrollBar.Enable(sal_False);
+ aVScrollBar.Enable(false);
aVScrollBar.Show();
aVScrollBar.SetScrollHdl(LINK(this, SmShowSymbolSet, ScrollHdl));
@@ -1288,12 +1268,12 @@ void SmShowSymbolSet::SetSymbolSet(const SymbolPtrVec_t& rSymbolSet)
if (static_cast< sal_uInt16 >(aSymbolSet.size()) > (nColumns * nRows))
{
aVScrollBar.SetRange(Range(0, ((aSymbolSet.size() + (nColumns - 1)) / nColumns) - nRows));
- aVScrollBar.Enable(sal_True);
+ aVScrollBar.Enable(true);
}
else
{
aVScrollBar.SetRange(Range(0,0));
- aVScrollBar.Enable (sal_False);
+ aVScrollBar.Enable (false);
}
Invalidate();
@@ -1376,7 +1356,7 @@ void SmShowSymbol::SetSymbol(const SmSym *pSymbol)
////////////////////////////////////////////////////////////////////////////////
-void SmSymbolDialog::FillSymbolSets(sal_Bool bDeleteText)
+void SmSymbolDialog::FillSymbolSets(bool bDeleteText)
// fuellt die Eintraege der moeglichen 'SymbolsSet's im Dialog mit den
// aktuellen Werten des SymbolSet Managers, selektiert aber keinen.
{
@@ -1395,7 +1375,7 @@ IMPL_LINK( SmSymbolDialog, SymbolSetChangeHdl, ListBox *, EMPTYARG pListBox )
{
(void) pListBox;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pListBox == &aSymbolSets, "Sm : falsches Argument");
+ OSL_ENSURE(pListBox == &aSymbolSets, "Sm : wrong argument");
#endif
SelectSymbolSet(aSymbolSets.GetSelectEntry());
@@ -1407,7 +1387,7 @@ IMPL_LINK( SmSymbolDialog, SymbolChangeHdl, SmShowSymbolSet *, EMPTYARG pShowSym
{
(void) pShowSymbolSet;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pShowSymbolSet == &aSymbolSetDisplay, "Sm : falsches Argument");
+ OSL_ENSURE(pShowSymbolSet == &aSymbolSetDisplay, "Sm : wrong argument");
#endif
SelectSymbol(aSymbolSetDisplay.GetSelectSymbol());
@@ -1418,7 +1398,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
{
(void) pButton;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pButton == &aEditBtn, "Sm : falsches Argument");
+ OSL_ENSURE(pButton == &aEditBtn, "Sm : wrong argument");
#endif
SmSymDefineDialog *pDialog = new SmSymDefineDialog(this, pFontListDev, rSymbolMgr);
@@ -1450,7 +1430,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
else
{
// just update display of current symbol set
- DBG_ASSERT( aSymSetName == aSymSetName, "unexpected change in symbol set name" );
+ OSL_ENSURE( aSymSetName == aSymSetName, "unexpected change in symbol set name" );
aSymbolSet = rSymbolMgr.GetSymbolSet( aSymbolSetName );
aSymbolSetDisplay.SetSymbolSet( aSymbolSet );
}
@@ -1468,7 +1448,7 @@ IMPL_LINK( SmSymbolDialog, SymbolDblClickHdl, SmShowSymbolSet *, EMPTYARG pShowS
{
(void) pShowSymbolSet;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pShowSymbolSet == &aSymbolSetDisplay, "Sm : falsches Argument");
+ OSL_ENSURE(pShowSymbolSet == &aSymbolSetDisplay, "Sm : wrong argument");
#endif
GetClickHdl(&aGetBtn);
@@ -1481,7 +1461,7 @@ IMPL_LINK( SmSymbolDialog, GetClickHdl, Button *, EMPTYARG pButton )
{
(void) pButton;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pButton == &aGetBtn, "Sm : falscher Button");
+ OSL_ENSURE(pButton == &aGetBtn, "Sm : wrong button");
#endif
const SmSym *pSym = GetSymbol();
@@ -1492,8 +1472,8 @@ IMPL_LINK( SmSymbolDialog, GetClickHdl, Button *, EMPTYARG pButton )
aText += (sal_Unicode)' ';
rViewSh.GetViewFrame()->GetDispatcher()->Execute(
- SID_INSERTTEXT, SFX_CALLMODE_STANDARD,
- new SfxStringItem(SID_INSERTTEXT, aText), 0L);
+ SID_INSERTSYMBOL, SFX_CALLMODE_STANDARD,
+ new SfxStringItem(SID_INSERTSYMBOL, aText), 0L);
}
return 0;
@@ -1504,17 +1484,17 @@ IMPL_LINK_INLINE_START( SmSymbolDialog, CloseClickHdl, Button *, EMPTYARG pButto
{
(void) pButton;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pButton == &aCloseBtn, "Sm : falscher Button");
+ OSL_ENSURE(pButton == &aCloseBtn, "Sm : wrong button");
#endif
- EndDialog(sal_True);
+ EndDialog(true);
return 0;
}
IMPL_LINK_INLINE_END( SmSymbolDialog, CloseClickHdl, Button *, pButton )
SmSymbolDialog::SmSymbolDialog(Window *pParent, OutputDevice *pFntListDevice,
- SmSymbolManager &rMgr, SmViewShell &rViewShell, sal_Bool bFreeRes) :
+ SmSymbolManager &rMgr, SmViewShell &rViewShell, bool bFreeRes) :
ModalDialog (pParent, SmResId(RID_SYMBOLDIALOG)),
aSymbolSetText (this, SmResId(1)),
aSymbolSets (this, SmResId(1)),
@@ -1591,9 +1571,9 @@ void SmSymbolDialog::DataChanged( const DataChangedEvent& rDCEvt )
}
-sal_Bool SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
+bool SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
sal_uInt16 nPos = aSymbolSets.GetEntryPos(rSymbolSetName);
aSymbolSetName = String();
@@ -1612,7 +1592,7 @@ sal_Bool SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
if (aSymbolSet.size() > 0)
SelectSymbol(0);
- bRet = sal_True;
+ bRet = true;
}
else
aSymbolSets.SetNoSelection();
@@ -1677,6 +1657,7 @@ void SmShowChar::SetSymbol( sal_UCS4 cChar, const Font &rFont )
aFont.SetSize( Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3) );
aFont.SetAlign(ALIGN_BASELINE);
SetFont(aFont);
+ aFont.SetTransparent(true);
String aText( OUString( &cChar, 1) );
SetText( aText );
@@ -1687,11 +1668,11 @@ void SmShowChar::SetSymbol( sal_UCS4 cChar, const Font &rFont )
////////////////////////////////////////////////////////////////////////////////
-void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, sal_Bool bDeleteText)
+void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, bool bDeleteText)
{
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
- "Sm : falsche ComboBox");
+ OSL_ENSURE(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
+ "Sm : wrong ComboBox");
#endif
rComboBox.Clear();
@@ -1705,10 +1686,10 @@ void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, sal_Bool bDeleteText)
}
-void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, sal_Bool bDeleteText)
+void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, bool bDeleteText)
{
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(&rComboBox == &aOldSymbolSets || &rComboBox == &aSymbolSets,
+ OSL_ENSURE(&rComboBox == &aOldSymbolSets || &rComboBox == &aSymbolSets,
"Sm : falsche ComboBox");
#endif
@@ -1723,7 +1704,7 @@ void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, sal_Bool bDeleteText
}
-void SmSymDefineDialog::FillFonts(sal_Bool bDelete)
+void SmSymDefineDialog::FillFonts(bool bDelete)
{
aFonts.Clear();
if (bDelete)
@@ -1741,7 +1722,7 @@ void SmSymDefineDialog::FillFonts(sal_Bool bDelete)
}
-void SmSymDefineDialog::FillStyles(sal_Bool bDeleteText)
+void SmSymDefineDialog::FillStyles(bool bDeleteText)
{
aStyles.Clear();
if (bDeleteText)
@@ -1750,14 +1731,13 @@ void SmSymDefineDialog::FillStyles(sal_Bool bDeleteText)
XubString aText (aFonts.GetSelectEntry());
if (aText.Len() != 0)
{
- //aStyles.Fill(aText, &aFontList);
// eigene StyleName's verwenden
const SmFontStyles &rStyles = GetFontStyles();
for (sal_uInt16 i = 0; i < rStyles.GetCount(); i++)
aStyles.InsertEntry( rStyles.GetStyleName(i) );
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(aStyles.GetEntryCount() > 0, "Sm : keine Styles vorhanden");
+ OSL_ENSURE(aStyles.GetEntryCount() > 0, "Sm : no styles available");
#endif
aStyles.SetText( aStyles.GetEntry(0) );
}
@@ -1767,8 +1747,8 @@ void SmSymDefineDialog::FillStyles(sal_Bool bDeleteText)
SmSym * SmSymDefineDialog::GetSymbol(const ComboBox &rComboBox)
{
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
- "Sm : falsche ComboBox");
+ OSL_ENSURE(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
+ "Sm : wrong combobox");
#endif
return aSymbolMgrCopy.GetSymbolByName(rComboBox.GetText());
}
@@ -1778,9 +1758,9 @@ IMPL_LINK( SmSymDefineDialog, OldSymbolChangeHdl, ComboBox *, EMPTYARG pComboBox
{
(void) pComboBox;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pComboBox == &aOldSymbols, "Sm : falsches Argument");
+ OSL_ENSURE(pComboBox == &aOldSymbols, "Sm : wrong argument");
#endif
- SelectSymbol(aOldSymbols, aOldSymbols.GetText(), sal_False);
+ SelectSymbol(aOldSymbols, aOldSymbols.GetText(), false);
return 0;
}
@@ -1789,9 +1769,9 @@ IMPL_LINK( SmSymDefineDialog, OldSymbolSetChangeHdl, ComboBox *, EMPTYARG pCombo
{
(void) pComboBox;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pComboBox == &aOldSymbolSets, "Sm : falsches Argument");
+ OSL_ENSURE(pComboBox == &aOldSymbolSets, "Sm : wrong argument");
#endif
- SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), sal_False);
+ SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), false);
return 0;
}
@@ -1802,22 +1782,22 @@ IMPL_LINK( SmSymDefineDialog, ModifyHdl, ComboBox *, pComboBox )
Selection aSelection (pComboBox->GetSelection());
if (pComboBox == &aSymbols)
- SelectSymbol(aSymbols, aSymbols.GetText(), sal_False);
+ SelectSymbol(aSymbols, aSymbols.GetText(), false);
else if (pComboBox == &aSymbolSets)
- SelectSymbolSet(aSymbolSets, aSymbolSets.GetText(), sal_False);
+ SelectSymbolSet(aSymbolSets, aSymbolSets.GetText(), false);
else if (pComboBox == &aOldSymbols)
// nur Namen aus der Liste erlauben
- SelectSymbol(aOldSymbols, aOldSymbols.GetText(), sal_True);
+ SelectSymbol(aOldSymbols, aOldSymbols.GetText(), true);
else if (pComboBox == &aOldSymbolSets)
// nur Namen aus der Liste erlauben
- SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), sal_True);
+ SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), true);
else if (pComboBox == &aStyles)
// nur Namen aus der Liste erlauben (ist hier eh immer der Fall)
- SelectStyle(aStyles.GetText(), sal_True);
+ SelectStyle(aStyles.GetText(), true);
else
{
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(0, "Sm : falsche ComboBox Argument");
+ OSL_ENSURE(0, "Sm : wrong combobox argument");
#endif
}
@@ -1833,7 +1813,7 @@ IMPL_LINK( SmSymDefineDialog, FontChangeHdl, ListBox *, EMPTYARG pListBox )
{
(void) pListBox;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pListBox == &aFonts, "Sm : falsches Argument");
+ OSL_ENSURE(pListBox == &aFonts, "Sm : wrong argument");
#endif
SelectFont(aFonts.GetSelectEntry());
@@ -1861,7 +1841,7 @@ IMPL_LINK( SmSymDefineDialog, StyleChangeHdl, ComboBox *, EMPTYARG pComboBox )
{
(void) pComboBox;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pComboBox == &aStyles, "Sm : falsches Argument");
+ OSL_ENSURE(pComboBox == &aStyles, "Sm : falsches Argument");
#endif
SelectStyle(aStyles.GetText());
@@ -1874,7 +1854,7 @@ IMPL_LINK( SmSymDefineDialog, CharHighlightHdl, Control *, EMPTYARG )
sal_UCS4 cChar = aCharsetDisplay.GetSelectCharacter();
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT( pSubsetMap, "SubsetMap missing" );
+ OSL_ENSURE( pSubsetMap, "SubsetMap missing" );
#endif
if (pSubsetMap)
{
@@ -1905,14 +1885,14 @@ IMPL_LINK( SmSymDefineDialog, AddClickHdl, Button *, EMPTYARG pButton )
{
(void) pButton;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pButton == &aAddBtn, "Sm : falsches Argument");
- DBG_ASSERT(aAddBtn.IsEnabled(), "Sm : Voraussetzungen erfuellt ??");
+ OSL_ENSURE(pButton == &aAddBtn, "Sm : wrong argument");
+ OSL_ENSURE(aAddBtn.IsEnabled(), "Sm : requirements met ??");
#endif
// add symbol
const SmSym aNewSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(),
aCharsetDisplay.GetSelectCharacter(), aSymbolSets.GetText() );
- //DBG_ASSERT( aSymbolMgrCopy.GetSymbolByName(aTmpSymbolName) == NULL, "symbol already exists" );
+ //OSL_ENSURE( aSymbolMgrCopy.GetSymbolByName(aTmpSymbolName) == NULL, "symbol already exists" );
aSymbolMgrCopy.AddOrReplaceSymbol( aNewSymbol );
// update display of new symbol
@@ -1921,10 +1901,10 @@ IMPL_LINK( SmSymDefineDialog, AddClickHdl, Button *, EMPTYARG pButton )
aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
// update list box entries
- FillSymbolSets(aOldSymbolSets, sal_False);
- FillSymbolSets(aSymbolSets, sal_False);
- FillSymbols(aOldSymbols ,sal_False);
- FillSymbols(aSymbols ,sal_False);
+ FillSymbolSets(aOldSymbolSets, false);
+ FillSymbolSets(aSymbolSets, false);
+ FillSymbols(aOldSymbols ,false);
+ FillSymbols(aSymbols ,false);
UpdateButtons();
@@ -1936,8 +1916,8 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton )
{
(void) pButton;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pButton == &aChangeBtn, "Sm : falsches Argument");
- DBG_ASSERT(aChangeBtn.IsEnabled(), "Sm : Voraussetzungen erfuellt ??");
+ OSL_ENSURE(pButton == &aChangeBtn, "Sm : wrong argument");
+ OSL_ENSURE(aChangeBtn.IsEnabled(), "Sm : requirements met ??");
#endif
// get new Sybol to use
@@ -1947,7 +1927,6 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton )
aCharsetDisplay.GetSelectCharacter(), aSymbolSets.GetText() );
// remove old symbol if the name was changed then add new one
-// const bool bSetNameChanged = aOldSymbolSets.GetText() != aSymbolSets.GetText();
const bool bNameChanged = aOldSymbols.GetText() != aSymbols.GetText();
if (bNameChanged)
aSymbolMgrCopy.RemoveSymbol( aOldSymbols.GetText() );
@@ -1963,10 +1942,10 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton )
aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
// update list box entries
- FillSymbolSets(aOldSymbolSets, sal_False);
- FillSymbolSets(aSymbolSets, sal_False);
- FillSymbols(aOldSymbols ,sal_False);
- FillSymbols(aSymbols ,sal_False);
+ FillSymbolSets(aOldSymbolSets, false);
+ FillSymbolSets(aSymbolSets, false);
+ FillSymbols(aOldSymbols ,false);
+ FillSymbols(aSymbols ,false);
UpdateButtons();
@@ -1978,8 +1957,8 @@ IMPL_LINK( SmSymDefineDialog, DeleteClickHdl, Button *, EMPTYARG pButton )
{
(void) pButton;
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pButton == &aDeleteBtn, "Sm : falsches Argument");
- DBG_ASSERT(aDeleteBtn.IsEnabled(), "Sm : Voraussetzungen erfuellt ??");
+ OSL_ENSURE(pButton == &aDeleteBtn, "Sm : wrong argument");
+ OSL_ENSURE(aDeleteBtn.IsEnabled(), "Sm : requirements met ??");
#endif
if (pOrigSymbol)
@@ -1990,10 +1969,10 @@ IMPL_LINK( SmSymDefineDialog, DeleteClickHdl, Button *, EMPTYARG pButton )
SetOrigSymbol(NULL, XubString());
// update list box entries
- FillSymbolSets(aOldSymbolSets, sal_False);
- FillSymbolSets(aSymbolSets, sal_False);
- FillSymbols(aOldSymbols ,sal_False);
- FillSymbols(aSymbols ,sal_False);
+ FillSymbolSets(aOldSymbolSets, false);
+ FillSymbolSets(aSymbolSets, false);
+ FillSymbols(aOldSymbols ,false);
+ FillSymbols(aSymbols ,false);
}
UpdateButtons();
@@ -2004,10 +1983,9 @@ IMPL_LINK( SmSymDefineDialog, DeleteClickHdl, Button *, EMPTYARG pButton )
void SmSymDefineDialog::UpdateButtons()
{
- sal_Bool bAdd = sal_False,
- bChange = sal_False,
- bDelete = sal_False,
- bEqual;
+ bool bAdd = false,
+ bChange = false,
+ bDelete = false;
XubString aTmpSymbolName (aSymbols.GetText()),
aTmpSymbolSetName (aSymbolSets.GetText());
@@ -2015,7 +1993,7 @@ void SmSymDefineDialog::UpdateButtons()
{
// alle Einstellungen gleich?
//! (Font-, Style- und SymbolSet Name werden nicht case sensitiv verglichen)
- bEqual = pOrigSymbol
+ bool bEqual = pOrigSymbol
&& aTmpSymbolSetName.EqualsIgnoreCaseAscii(aOldSymbolSetName.GetText())
&& aTmpSymbolName.Equals(pOrigSymbol->GetName())
&& aFonts.GetSelectEntry().EqualsIgnoreCaseAscii(
@@ -2030,15 +2008,9 @@ void SmSymDefineDialog::UpdateButtons()
// loeschen nur wenn alle Einstellungen gleich sind
bDelete = pOrigSymbol != NULL;
- // aendern wenn bei gleichem Namen mindestens eine Einstellung anders ist
- // oder wenn es noch kein Symbol des neuen Namens gibt (wuerde implizites
- // loeschen des bereits vorhandenen Symbols erfordern)
-// sal_Bool bEqualName = pOrigSymbol && aTmpSymbolName == pOrigSymbol->GetName();
-// bChange = pOrigSymbol && ( (bEqualName && !bEqual) || (!bEqualName && bAdd) );
-
// aendern nur falls altes Symbol vorhanden und am neuen etwas anders ist
bChange = pOrigSymbol && !bEqual;
-}
+ }
aAddBtn .Enable(bAdd);
aChangeBtn.Enable(bChange);
@@ -2047,7 +2019,7 @@ void SmSymDefineDialog::UpdateButtons()
SmSymDefineDialog::SmSymDefineDialog(Window * pParent,
- OutputDevice *pFntListDevice, SmSymbolManager &rMgr, sal_Bool bFreeRes) :
+ OutputDevice *pFntListDevice, SmSymbolManager &rMgr, bool bFreeRes) :
ModalDialog (pParent, SmResId(RID_SYMDEFINEDIALOG)),
aOldSymbolText (this, SmResId(1)),
aOldSymbols (this, SmResId(1)),
@@ -2077,7 +2049,6 @@ SmSymDefineDialog::SmSymDefineDialog(Window * pParent,
aDeleteBtn (this, SmResId(3)),
aRightArrow (this, SmResId(1)),
aRigthArrow_Im (SmResId(1)),
- aRigthArrow_Im_HC (SmResId(2)), // hi-contrast version
rSymbolMgr (rMgr),
pSubsetMap (NULL),
pFontList (NULL)
@@ -2091,8 +2062,8 @@ SmSymDefineDialog::SmSymDefineDialog(Window * pParent,
// auto completion is troublesome since that symbols character also gets automatically selected in the
// display and if the user previously selected a character to define/redefine that one this is bad
- aOldSymbols.EnableAutocomplete( sal_False, sal_True );
- aSymbols .EnableAutocomplete( sal_False, sal_True );
+ aOldSymbols.EnableAutocomplete( false, true );
+ aSymbols .EnableAutocomplete( false, true );
FillFonts();
if (aFonts.GetEntryCount() > 0)
@@ -2136,7 +2107,7 @@ void SmSymDefineDialog::InitColor_Impl()
#endif
ColorData nBgCol = COL_WHITE,
nTxtCol = COL_BLACK;
- sal_Bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
if (bHighContrast)
{
const StyleSettings &rS = GetSettings().GetStyleSettings();
@@ -2154,7 +2125,7 @@ void SmSymDefineDialog::InitColor_Impl()
aSymbolDisplay .SetBackground( aWall );
aSymbolDisplay .SetTextColor( aTxtColor );
- const Image &rArrowRight = bHighContrast ? aRigthArrow_Im_HC : aRigthArrow_Im;
+ const Image &rArrowRight = aRigthArrow_Im;
aRightArrow.SetImage( rArrowRight );
}
@@ -2184,13 +2155,10 @@ short SmSymDefineDialog::Execute()
void SmSymDefineDialog::SetSymbolSetManager(const SmSymbolManager &rMgr)
{
aSymbolMgrCopy = rMgr;
-#ifdef DEBUG
-// sal_uInt16 nS = aSymbolMgrCopy.GetSymbolSetCount();
-#endif
- // Das modified Flag der Kopie auf sal_False setzen, damit man spaeter damit
+ // Das modified Flag der Kopie auf false setzen, damit man spaeter damit
// testen kann ob sich was geaendert hat.
- aSymbolMgrCopy.SetModified(sal_False);
+ aSymbolMgrCopy.SetModified(false);
FillSymbolSets(aOldSymbolSets);
if (aOldSymbolSets.GetEntryCount() > 0)
@@ -2209,12 +2177,12 @@ void SmSymDefineDialog::SetSymbolSetManager(const SmSymbolManager &rMgr)
}
-sal_Bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
- const XubString &rSymbolSetName, sal_Bool bDeleteText)
+bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
+ const XubString &rSymbolSetName, bool bDeleteText)
{
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(&rComboBox == &aOldSymbolSets || &rComboBox == &aSymbolSets,
- "Sm : falsche ComboBox");
+ OSL_ENSURE(&rComboBox == &aOldSymbolSets || &rComboBox == &aSymbolSets,
+ "Sm : wrong ComboBox");
#endif
// 'Normalisieren' des SymbolNamens (ohne leading und trailing Leerzeichen)
@@ -2224,18 +2192,18 @@ sal_Bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
// und evtl Abweichungen in der Eingabe beseitigen
rComboBox.SetText(aNormName);
- sal_Bool bRet = sal_False;
+ bool bRet = false;
sal_uInt16 nPos = rComboBox.GetEntryPos(aNormName);
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
rComboBox.SetText(rComboBox.GetEntry(nPos));
- bRet = sal_True;
+ bRet = true;
}
else if (bDeleteText)
rComboBox.SetText(XubString());
- sal_Bool bIsOld = &rComboBox == &aOldSymbolSets;
+ bool bIsOld = &rComboBox == &aOldSymbolSets;
// setzen des SymbolSet Namens an der zugehoerigen Darstellung
FixedText &rFT = bIsOld ? aOldSymbolSetName : aSymbolSetName;
@@ -2244,7 +2212,7 @@ sal_Bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
// setzen der zum SymbolSet gehoerenden Symbol Namen an der zugehoerigen
// Auswahbox
ComboBox &rCB = bIsOld ? aOldSymbols : aSymbols;
- FillSymbols(rCB, sal_False);
+ FillSymbols(rCB, false);
// bei Wechsel des SymbolSets fuer das alte Zeichen ein gueltiges
// Symbol bzw keins zur Anzeige bringen
@@ -2253,7 +2221,7 @@ sal_Bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
XubString aTmpOldSymbolName;
if (aOldSymbols.GetEntryCount() > 0)
aTmpOldSymbolName = aOldSymbols.GetEntry(0);
- SelectSymbol(aOldSymbols, aTmpOldSymbolName, sal_True);
+ SelectSymbol(aOldSymbols, aTmpOldSymbolName, true);
}
UpdateButtons();
@@ -2290,12 +2258,12 @@ void SmSymDefineDialog::SetOrigSymbol(const SmSym *pSymbol,
}
-sal_Bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
- const XubString &rSymbolName, sal_Bool bDeleteText)
+bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
+ const XubString &rSymbolName, bool bDeleteText)
{
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
- "Sm : falsche ComboBox");
+ OSL_ENSURE(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
+ "Sm : wrong ComboBox");
#endif
// 'Normalisieren' des SymbolNamens (ohne Leerzeichen)
@@ -2304,10 +2272,10 @@ sal_Bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
// und evtl Abweichungen in der Eingabe beseitigen
rComboBox.SetText(aNormName);
- sal_Bool bRet = sal_False;
+ bool bRet = false;
sal_uInt16 nPos = rComboBox.GetEntryPos(aNormName);
- sal_Bool bIsOld = &rComboBox == &aOldSymbols;
+ bool bIsOld = &rComboBox == &aOldSymbols;
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
@@ -2320,8 +2288,8 @@ sal_Bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
{
// Font und Style entsprechend waehlen
const Font &rFont = pSymbol->GetFace();
- SelectFont(rFont.GetName(), sal_False);
- SelectStyle(GetFontStyles().GetStyleName(rFont), sal_False);
+ SelectFont(rFont.GetName(), false);
+ SelectStyle(GetFontStyles().GetStyleName(rFont), false);
// da das setzen des Fonts ueber den Style Namen des SymbolsFonts nicht
// so gut klappt (er kann zB leer sein obwohl der Font selbst 'bold' und
@@ -2339,7 +2307,7 @@ sal_Bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
}
}
- bRet = sal_True;
+ bRet = true;
}
else if (bDeleteText)
rComboBox.SetText(XubString());
@@ -2382,7 +2350,7 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
if (pSubsetMap)
delete pSubsetMap;
pSubsetMap = new SubsetMap( &aFontCharMap );
- //
+
aFontsSubsetLB.Clear();
bool bFirst = true;
const Subset* pSubset;
@@ -2401,9 +2369,9 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
}
-sal_Bool SmSymDefineDialog::SelectFont(const XubString &rFontName, sal_Bool bApplyFont)
+bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
sal_uInt16 nPos = aFonts.GetEntryPos(rFontName);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
@@ -2414,7 +2382,7 @@ sal_Bool SmSymDefineDialog::SelectFont(const XubString &rFontName, sal_Bool bApp
if (bApplyFont)
{
SetFont(aFonts.GetSelectEntry(), aStyles.GetText());
- // update preview to use new font
+ bRet = true;
aSymbolDisplay.SetSymbol( aCharsetDisplay.GetSelectCharacter(), aCharsetDisplay.GetFont() );
}
bRet = sal_True;
@@ -2429,9 +2397,9 @@ sal_Bool SmSymDefineDialog::SelectFont(const XubString &rFontName, sal_Bool bApp
}
-sal_Bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, sal_Bool bApplyFont)
+bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, bool bApplyFont)
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
sal_uInt16 nPos = aStyles.GetEntryPos(rStyleName);
// falls der Style nicht zur Auswahl steht nehmen wir den erst moeglichen
@@ -2445,7 +2413,7 @@ sal_Bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, sal_Bool bA
if (bApplyFont)
{
SetFont(aFonts.GetSelectEntry(), aStyles.GetText());
- // update preview to use new font
+ bRet = true;
aSymbolDisplay.SetSymbol( aCharsetDisplay.GetSelectCharacter(), aCharsetDisplay.GetFont() );
}
bRet = sal_True;
@@ -2470,3 +2438,4 @@ void SmSymDefineDialog::SelectChar(xub_Unicode cChar)
/**************************************************************************/
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 6075b9325cf0..337e038df69e 100755
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98,7 +99,10 @@
#include "mathmlexport.hxx"
#include <sfx2/sfxsids.hrc>
#include <svx/svxids.hrc>
+#include "cursor.hxx"
#include <tools/diagnose_ex.h>
+#include "visitors.hxx"
+#include "accessibility.hxx"
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -109,7 +113,7 @@ using namespace ::com::sun::star::uno;
#define DOCUMENT_BUFFER_SIZE (sal_uInt16)32768
-static const char __FAR_DATA pStarMathDoc[] = "StarMathDocument";
+static const char pStarMathDoc[] = "StarMathDocument";
#define SmDocShell
#include "smslots.hxx"
@@ -133,7 +137,7 @@ void SmDocShell::SFX_NOTIFY(SfxBroadcaster&, const TypeId&,
switch (((SfxSimpleHint&)rHint).GetId())
{
case HINT_FORMATCHANGED:
- SetFormulaArranged(sal_False);
+ SetFormulaArranged(false);
nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
@@ -168,15 +172,14 @@ void SmDocShell::SetText(const String& rBuffer)
if (rBuffer != aText)
{
- sal_Bool bIsEnabled = IsEnableSetModified();
+ bool bIsEnabled = IsEnableSetModified();
if( bIsEnabled )
- EnableSetModified( sal_False );
+ EnableSetModified( false );
aText = rBuffer;
- SetFormulaArranged( sal_False );
+ SetFormulaArranged( false );
Parse();
- //Repaint();
SmViewShell *pViewSh = SmGetActiveView();
if( pViewSh )
@@ -197,7 +200,7 @@ void SmDocShell::SetText(const String& rBuffer)
if ( bIsEnabled )
EnableSetModified( bIsEnabled );
- SetModified(sal_True);
+ SetModified(true);
// launch accessible event if necessary
SmGraphicAccessible *pAcc = pViewSh ? pViewSh->GetGraphicWindow().GetAccessible_Impl() : 0;
@@ -221,8 +224,8 @@ void SmDocShell::SetFormat(SmFormat& rFormat)
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetFormat" );
aFormat = rFormat;
- SetFormulaArranged( sal_False );
- SetModified( sal_True );
+ SetFormulaArranged( false );
+ SetModified( true );
nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
@@ -244,7 +247,7 @@ String SmDocShell::GetAccessibleText()
ArrangeFormula();
if (0 == aAccText.Len())
{
- DBG_ASSERT( pTree, "Tree missing" );
+ OSL_ENSURE( pTree, "Tree missing" );
if (pTree)
pTree->GetAccessibleText( aAccText );
}
@@ -260,8 +263,8 @@ void SmDocShell::Parse()
ReplaceBadChars();
pTree = aInterpreter.Parse(aText);
nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
- SetFormulaArranged( sal_False );
-
+ SetFormulaArranged( false );
+ InvalidateCursor();
aUsedSymbols = aInterpreter.GetUsedSymbols();
}
@@ -276,13 +279,12 @@ void SmDocShell::ArrangeFormula()
//! Nur f�r die Dauer der Existenz dieses Objekts sind am Drucker die
//! richtigen Einstellungen garantiert.
SmPrinterAccess aPrtAcc(*this);
-// OutputDevice *pOutDev = aPrtAcc.GetPrinter();
OutputDevice* pOutDev = aPrtAcc.GetRefDev();
if (!pOutDev)
{
#if OSL_DEBUG_LEVEL > 1
- DBG_ERROR("!! SmDocShell::ArrangeFormula: reference device missing !!");
+ OSL_FAIL("!! SmDocShell::ArrangeFormula: reference device missing !!");
#endif
}
@@ -298,7 +300,7 @@ void SmDocShell::ArrangeFormula()
pOutDev->SetMapMode( MapMode(MAP_100TH_MM) );
}
}
- DBG_ASSERT(pOutDev->GetMapMode().GetMapUnit() == MAP_100TH_MM,
+ OSL_ENSURE(pOutDev->GetMapMode().GetMapUnit() == MAP_100TH_MM,
"Sm : falscher MapMode");
const SmFormat &rFormat = GetFormat();
@@ -316,7 +318,7 @@ void SmDocShell::ArrangeFormula()
pOutDev->SetLayoutMode( nLayoutMode );
pOutDev->SetDigitLanguage( nDigitLang );
- SetFormulaArranged(sal_True);
+ SetFormulaArranged(true);
// invalidate accessible text
aAccText = String();
@@ -361,18 +363,6 @@ void SetEditEngineDefaultFonts(
rFntDta.nFallbackLang : rFntDta.nLang;
Font aFont = Application::GetDefaultDevice()->GetDefaultFont(
rFntDta.nFontType, nLang, DEFAULTFONT_FLAGS_ONLYONE );
-#ifdef DEBUG_TL
- ByteString aFntName( aFont.GetName(), 1 );
- int eFntFamily = aFont.GetFamily();
- ByteString aFntStyleName( aFont.GetStyleName(), 1 );
- int ePitch = aFont.GetPitch();
- int eCharSet = aFont.GetCharSet();
- fprintf(stderr, "\nFontName %s \n", aFntName.GetBuffer() );
- fprintf(stderr, "StyleName %s \n", aFntStyleName.GetBuffer() );
- fprintf(stderr, "eFntFamily %d \n", eFntFamily );
- fprintf(stderr, "ePitch %d \n", ePitch );
- fprintf(stderr, "eCharSet %d \n", eCharSet );
-#endif
rEditEngineItemPool.SetPoolDefaultItem(
SvxFontItem( aFont.GetFamily(), aFont.GetName(),
aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(),
@@ -408,7 +398,7 @@ EditEngine& SmDocShell::GetEditEngine()
pEditEngine = new EditEngine( pEditEngineItemPool );
- pEditEngine->EnableUndo( sal_True );
+ pEditEngine->EnableUndo( true );
pEditEngine->SetDefTab( sal_uInt16(
Application::GetDefaultDevice()->GetTextWidth( C2S("XXXX") ) ) );
@@ -432,9 +422,6 @@ EditEngine& SmDocShell::GetEditEngine()
pEditEngine->ClearModifyFlag();
- // forces new settings to be used if the itempool was modified
- // after cthe creation of the EditEngine
- //pEditEngine->Clear(); //#77957 incorrect font size
}
return *pEditEngine;
}
@@ -446,18 +433,17 @@ SfxItemPool& SmDocShell::GetEditEngineItemPool()
if (!pEditEngineItemPool)
GetEditEngine();
- DBG_ASSERT( pEditEngineItemPool, "EditEngineItemPool missing" );
+ OSL_ENSURE( pEditEngineItemPool, "EditEngineItemPool missing" );
return *pEditEngineItemPool;
}
-
-void SmDocShell::Draw(OutputDevice &rDev, Point &rPosition)
+void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSelection)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Draw" );
if (!pTree)
Parse();
- DBG_ASSERT(pTree, "Sm : NULL pointer");
+ OSL_ENSURE(pTree, "Sm : NULL pointer");
if (!IsFormulaArranged())
ArrangeFormula();
@@ -477,13 +463,13 @@ void SmDocShell::Draw(OutputDevice &rDev, Point &rPosition)
//! Math for example in Calc in "a over b" the fraction bar may not
//! be visible else. More generally: the FillColor may have been changed.
sal_uLong nOldDrawMode = DRAWMODE_DEFAULT;
- sal_Bool bRestoreDrawMode = sal_False;
+ bool bRestoreDrawMode = false;
if (OUTDEV_WINDOW == rDev.GetOutDevType() &&
((Window &) rDev).GetSettings().GetStyleSettings().GetHighContrastMode())
{
nOldDrawMode = rDev.GetDrawMode();
rDev.SetDrawMode( DRAWMODE_DEFAULT );
- bRestoreDrawMode = sal_True;
+ bRestoreDrawMode = true;
}
// format/draw formulas always from left to right
@@ -492,8 +478,16 @@ void SmDocShell::Draw(OutputDevice &rDev, Point &rPosition)
rDev.SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
sal_Int16 nDigitLang = rDev.GetDigitLanguage();
rDev.SetDigitLanguage( LANGUAGE_ENGLISH );
- //
- pTree->Draw(rDev, rPosition);
+
+ //Set selection if any
+ if(pCursor && bDrawSelection){
+ pCursor->AnnotateSelection();
+ SmSelectionDrawingVisitor(rDev, pTree, rPosition);
+ }
+
+ //Drawing using visitor
+ SmDrawingVisitor(rDev, rPosition, pTree);
+
//
rDev.SetLayoutMode( nLayoutMode );
rDev.SetDigitLanguage( nDigitLang );
@@ -534,6 +528,17 @@ Size SmDocShell::GetSize()
return aRet;
}
+void SmDocShell::InvalidateCursor(){
+ delete pCursor;
+ pCursor = NULL;
+}
+
+SmCursor& SmDocShell::GetCursor(){
+ if(!pCursor)
+ pCursor = new SmCursor(pTree, this);
+ return *pCursor;
+}
+
////////////////////////////////////////
SmPrinterAccess::SmPrinterAccess( SmDocShell &rDocShell )
@@ -658,7 +663,7 @@ void SmDocShell::SetPrinter( SfxPrinter *pNew )
delete pPrinter;
pPrinter = pNew; //Eigentumsuebergang!
pPrinter->SetMapMode( MapMode(MAP_100TH_MM) );
- SetFormulaArranged(sal_False);
+ SetFormulaArranged(false);
Repaint();
}
@@ -667,11 +672,11 @@ void SmDocShell::OnDocumentPrinterChanged( Printer *pPrt )
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::OnDocumentPrinterChanged" );
pTmpPrinter = pPrt;
- SetFormulaArranged(sal_False);
+ SetFormulaArranged(false);
Size aOldSize = GetVisArea().GetSize();
Repaint();
if( aOldSize != GetVisArea().GetSize() && aText.Len() )
- SetModified( sal_True );
+ SetModified( true );
pTmpPrinter = 0;
}
@@ -679,11 +684,11 @@ void SmDocShell::Repaint()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Repaint" );
- sal_Bool bIsEnabled = IsEnableSetModified();
+ bool bIsEnabled = IsEnableSetModified();
if ( bIsEnabled )
- EnableSetModified( sal_False );
+ EnableSetModified( false );
- SetFormulaArranged( sal_False );
+ SetFormulaArranged( false );
Size aVisSize = GetSize();
SetVisAreaSize( aVisSize );
@@ -704,8 +709,9 @@ SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
pPrinter ( 0 ),
pTmpPrinter ( 0 ),
nModifyCount ( 0 ),
- bIsFormulaArranged ( sal_False )
+ bIsFormulaArranged ( false )
{
+ pCursor = NULL;
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SmDocShell" );
SetPool(&SFX_APP()->GetPool());
@@ -730,6 +736,11 @@ SmDocShell::~SmDocShell()
EndListening(aFormat);
EndListening(*pp->GetConfig());
+
+ if(pCursor)
+ delete pCursor;
+ pCursor = NULL;
+
delete pEditEngine;
SfxItemPool::Free(pEditEngineItemPool);
delete pTree;
@@ -742,7 +753,7 @@ sal_Bool SmDocShell::SetData( const String& rData )
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetData" );
SetText( rData );
- return sal_True;
+ return true;
}
@@ -750,10 +761,10 @@ sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertFrom" );
- sal_Bool bSuccess = sal_False;
+ bool bSuccess = false;
const String& rFltName = rMedium.GetFilter()->GetFilterName();
- DBG_ASSERT( !rFltName.EqualsAscii( STAROFFICE_XML ), "Wrong filter!");
+ OSL_ENSURE( !rFltName.EqualsAscii( STAROFFICE_XML ), "Wrong filter!");
if ( rFltName.EqualsAscii( MATHML_XML ) )
{
@@ -761,6 +772,7 @@ sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
{
delete pTree;
pTree = 0;
+ InvalidateCursor();
}
Reference<com::sun::star::frame::XModel> xModel(GetModel());
SmXMLImportWrapper aEquation(xModel);
@@ -773,26 +785,21 @@ sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
{
if ( SotStorage::IsStorageFile( pStream ) )
{
- SvStorageRef aStorage = new SotStorage( pStream, sal_False );
+ SvStorageRef aStorage = new SotStorage( pStream, false );
if ( aStorage->IsStream( C2S( "Equation Native" ) ) )
{
// is this a MathType Storage?
MathType aEquation( aText );
- if ( sal_True == (bSuccess = (1 == aEquation.Parse( aStorage )) ))
+ if ( true == (bSuccess = (1 == aEquation.Parse( aStorage )) ))
Parse();
}
}
- else
- {
- //bSuccess = ImportSM20File( pStream );
- }
}
}
if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
{
- //???OnDocumentPrinterChanged(0);
- SetFormulaArranged( sal_False );
+ SetFormulaArranged( false );
Repaint();
}
@@ -805,10 +812,10 @@ sal_Bool SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::InitNew" );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if ( SfxObjectShell::InitNew( xStorage ) )
{
- bRet = sal_True;
+ bRet = true;
SetVisArea(Rectangle(Point(0, 0), Size(2000, 1000)));
}
return bRet;
@@ -819,7 +826,7 @@ sal_Bool SmDocShell::Load( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Load" );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( SfxObjectShell::Load( rMedium ))
{
uno::Reference < embed::XStorage > xStorage = GetMedium()->GetStorage();
@@ -846,8 +853,7 @@ sal_Bool SmDocShell::Load( SfxMedium& rMedium )
if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
{
- //???OnDocumentPrinterChanged(0);
- SetFormulaArranged( sal_False );
+ SetFormulaArranged( false );
Repaint();
}
@@ -877,7 +883,7 @@ sal_Bool SmDocShell::Save()
return aEquation.Export(*GetMedium());
}
- return sal_False;
+ return false;
}
/*
@@ -932,7 +938,7 @@ sal_Bool SmDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveAs" );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
//! apply latest changes if necessary
UpdateText();
@@ -956,7 +962,7 @@ sal_Bool SmDocShell::ConvertTo( SfxMedium &rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertTo" );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
const SfxFilter* pFlt = rMedium.GetFilter();
if( pFlt )
{
@@ -991,9 +997,9 @@ sal_Bool SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::co
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveCompleted" );
if( SfxObjectShell::SaveCompleted( xStorage ))
- return sal_True;
+ return true;
- return sal_False;
+ return false;
}
@@ -1022,7 +1028,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
case SID_AUTO_REDRAW :
{
SmModule *pp = SM_MOD();
- sal_Bool bRedraw = pp->GetConfig()->IsAutoRedraw();
+ bool bRedraw = pp->GetConfig()->IsAutoRedraw();
pp->GetConfig()->SetAutoRedraw(!bRedraw);
}
break;
@@ -1041,7 +1047,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
OutputDevice *pDev = GetPrinter();
if (!pDev || pDev->GetDevFontCount() == 0)
pDev = &SM_MOD()->GetDefaultVirtualDev();
- DBG_ASSERT (pDev, "device for font list missing" );
+ OSL_ENSURE (pDev, "device for font list missing" );
SmFontTypeDialog *pFontTypeDialog = new SmFontTypeDialog( NULL, pDev );
@@ -1158,7 +1164,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
sal_uInt16 nId = rReq.GetSlot(), nCnt = 1;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem ))
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, false, &pItem ))
nCnt = ((SfxUInt16Item*)pItem)->GetValue();
sal_Bool (::svl::IUndoManager:: *fnDo)();
@@ -1186,6 +1192,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
}
}
Repaint();
+ UpdateText();
SfxViewFrame* pFrm = SfxViewFrame::GetFirst( this );
while( pFrm )
{
@@ -1225,7 +1232,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
case SID_AUTO_REDRAW :
{
SmModule *pp = SM_MOD();
- sal_Bool bRedraw = pp->GetConfig()->IsAutoRedraw();
+ bool bRedraw = pp->GetConfig()->IsAutoRedraw();
rSet.Put(SfxBoolItem(SID_AUTO_REDRAW, bRedraw));
}
@@ -1330,7 +1337,7 @@ void SmDocShell::Draw(OutputDevice *pDevice,
pDevice->IntersectClipRegion(GetVisArea());
Point atmppoint;
- Draw(*pDevice, atmppoint);
+ DrawFormula(*pDevice, atmppoint);
}
SfxItemPool& SmDocShell::GetPool() const
@@ -1349,21 +1356,21 @@ void SmDocShell::SetVisArea(const Rectangle & rVisArea)
if (! aNewRect.Right()) aNewRect.Right() = 2000;
if (! aNewRect.Bottom()) aNewRect.Bottom() = 1000;
- sal_Bool bIsEnabled = IsEnableSetModified();
+ bool bIsEnabled = IsEnableSetModified();
if ( bIsEnabled )
- EnableSetModified( sal_False );
+ EnableSetModified( false );
//TODO/LATER: it's unclear how this interacts with the SFX code
// If outplace editing, then dont resize the OutplaceWindow. But the
// ObjectShell has to resize. Bug 56470
- sal_Bool bUnLockFrame;
+ bool bUnLockFrame;
if( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && !IsInPlaceActive() && GetFrame() )
{
GetFrame()->LockAdjustPosSizePixel();
- bUnLockFrame = sal_True;
+ bUnLockFrame = true;
}
else
- bUnLockFrame = sal_False;
+ bUnLockFrame = false;
SfxObjectShell::SetVisArea( aNewRect );
@@ -1418,14 +1425,15 @@ void SmDocShell::SetModified(sal_Bool bModified)
}
}
-sal_Bool SmDocShell::WriteAsMathType3( SfxMedium& rMedium )
+bool SmDocShell::WriteAsMathType3( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::WriteAsMathType3" );
MathType aEquation( aText, pTree );
- sal_Bool bRet = 0 != aEquation.ConvertFromStarMath( rMedium );
+ bool bRet = 0 != aEquation.ConvertFromStarMath( rMedium );
return bRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 8d2140863bb3..bfc0309ebe71 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,6 +64,7 @@
#include "view.hxx"
#include "document.hxx"
#include "config.hxx"
+#include "accessibility.hxx"
#define SCROLL_LINE 24
@@ -79,22 +81,28 @@ using namespace com::sun::star::uno;
////////////////////////////////////////
-void SmGetLeftSelectionPart(const ESelection aSel,
+void SmGetLeftSelectionPart(const ESelection &rSel,
sal_uInt16 &nPara, sal_uInt16 &nPos)
// returns paragraph number and position of the selections left part
{
// compare start and end of selection and use the one that comes first
- if ( aSel.nStartPara < aSel.nEndPara
- || (aSel.nStartPara == aSel.nEndPara && aSel.nStartPos < aSel.nEndPos) )
- { nPara = aSel.nStartPara;
- nPos = aSel.nStartPos;
+ if ( rSel.nStartPara < rSel.nEndPara
+ || (rSel.nStartPara == rSel.nEndPara && rSel.nStartPos < rSel.nEndPos) )
+ { nPara = rSel.nStartPara;
+ nPos = rSel.nStartPos;
}
else
- { nPara = aSel.nEndPara;
- nPos = aSel.nEndPos;
+ { nPara = rSel.nEndPara;
+ nPos = rSel.nEndPos;
}
}
+bool SmEditWindow::IsInlineEditEnabled()
+{
+ SmViewShell *pView = GetView();
+ return pView ? pView->IsInlineEditEnabled() : false;
+}
+
////////////////////////////////////////
SmEditWindow::SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ) :
@@ -111,7 +119,7 @@ SmEditWindow::SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ) :
SetMapMode(MAP_PIXEL);
// Even RTL languages don't use RTL for math
- rCmdBox.GetEditWindow()->EnableRTL( sal_False );
+ rCmdBox.GetEditWindow()->EnableRTL( false );
ApplyColorConfigValues( SM_MOD()->GetColorConfig() );
@@ -121,8 +129,11 @@ SmEditWindow::SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ) :
aModifyTimer.SetTimeoutHdl(LINK(this, SmEditWindow, ModifyTimerHdl));
aModifyTimer.SetTimeout(500);
- aCursorMoveTimer.SetTimeoutHdl(LINK(this, SmEditWindow, CursorMoveTimerHdl));
- aCursorMoveTimer.SetTimeout(500);
+ if (!IsInlineEditEnabled())
+ {
+ aCursorMoveTimer.SetTimeoutHdl(LINK(this, SmEditWindow, CursorMoveTimerHdl));
+ aCursorMoveTimer.SetTimeout(500);
+ }
// if not called explicitly the this edit window within the
// command window will just show an empty gray panel.
@@ -132,11 +143,11 @@ SmEditWindow::SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ) :
SmEditWindow::~SmEditWindow()
{
- aCursorMoveTimer.Stop();
aModifyTimer.Stop();
+ StartCursorMove();
- // #112565# clean up of classes used for accessibility
+ // clean up of classes used for accessibility
// must be done before EditView (and thus EditEngine) is no longer
// available for those classes.
if (pAccessible)
@@ -159,6 +170,12 @@ SmEditWindow::~SmEditWindow()
delete pScrollBox;
}
+void SmEditWindow::StartCursorMove()
+{
+ if (!IsInlineEditEnabled())
+ aCursorMoveTimer.Stop();
+}
+
void SmEditWindow::InvalidateSlots()
{
SfxBindings& rBind = GetView()->GetViewFrame()->GetBindings();
@@ -239,7 +256,7 @@ void SmEditWindow::DataChanged( const DataChangedEvent& )
// unfortunately this resets the whole edit engine
// thus we need to save at least the text
String aTxt( pEditEngine->GetText( LINEEND_LF ) );
- pEditEngine->Clear(); //#77957 incorrect font size
+ pEditEngine->Clear(); //incorrect font size
pEditEngine->SetText( aTxt );
}
@@ -256,17 +273,19 @@ IMPL_LINK( SmEditWindow, ModifyTimerHdl, Timer *, EMPTYARG /*pTimer*/ )
return 0;
}
-
IMPL_LINK(SmEditWindow, CursorMoveTimerHdl, Timer *, EMPTYARG /*pTimer*/)
// every once in a while check cursor position (selection) of edit
// window and if it has changed (try to) set the formula-cursor
// according to that.
{
- ESelection aNewSelection (GetSelection());
+ if (IsInlineEditEnabled())
+ return 0;
- if (!aNewSelection.IsEqual(aOldSelection))
- { SmViewShell *pView = rCmdBox.GetView();
+ ESelection aNewSelection(GetSelection());
+ if (!aNewSelection.IsEqual(aOldSelection))
+ {
+ SmViewShell *pView = rCmdBox.GetView();
if (pView)
{
// get row and column to look for
@@ -274,9 +293,7 @@ IMPL_LINK(SmEditWindow, CursorMoveTimerHdl, Timer *, EMPTYARG /*pTimer*/)
SmGetLeftSelectionPart(aNewSelection, nRow, nCol);
nRow++;
nCol++;
-
pView->GetGraphicWindow().SetCursorPos(nRow, nCol);
-
aOldSelection = aNewSelection;
}
}
@@ -285,7 +302,6 @@ IMPL_LINK(SmEditWindow, CursorMoveTimerHdl, Timer *, EMPTYARG /*pTimer*/)
return 0;
}
-
void SmEditWindow::Resize()
{
if (!pEditView)
@@ -296,7 +312,7 @@ void SmEditWindow::Resize()
pEditView->SetOutputArea(AdjustScrollBars());
pEditView->ShowCursor();
- DBG_ASSERT( pEditView->GetEditEngine(), "EditEngine missing" );
+ OSL_ENSURE( pEditView->GetEditEngine(), "EditEngine missing" );
const long nMaxVisAreaStart = pEditView->GetEditEngine()->GetTextHeight() -
pEditView->GetOutputArea().GetHeight();
if (pEditView->GetVisArea().Top() > nMaxVisAreaStart)
@@ -319,8 +335,8 @@ void SmEditWindow::MouseButtonUp(const MouseEvent &rEvt)
else
Window::MouseButtonUp (rEvt);
- // ggf FormulaCursor neu positionieren
- CursorMoveTimerHdl(&aCursorMoveTimer);
+ if (!IsInlineEditEnabled())
+ CursorMoveTimerHdl(&aCursorMoveTimer);
InvalidateSlots();
}
@@ -336,7 +352,7 @@ void SmEditWindow::MouseButtonDown(const MouseEvent &rEvt)
void SmEditWindow::Command(const CommandEvent& rCEvt)
{
- sal_Bool bForwardEvt = sal_True;
+ bool bForwardEvt = true;
if (rCEvt.GetCommand() == COMMAND_CONTEXTMENU)
{
GetParent()->ToTop();
@@ -344,7 +360,7 @@ void SmEditWindow::Command(const CommandEvent& rCEvt)
Point aPoint = rCEvt.GetMousePosPixel();
PopupMenu* pPopupMenu = new PopupMenu(SmResId(RID_COMMANDMENU));
- // added for replaceability of context menus #96085, #93782
+ // added for replaceability of context menus
Menu* pMenu = NULL;
::com::sun::star::ui::ContextMenuExecuteEvent aEvent;
aEvent.SourceWindow = VCLUnoHelper::GetInterface( this );
@@ -364,7 +380,7 @@ void SmEditWindow::Command(const CommandEvent& rCEvt)
pPopupMenu->Execute( this, aPoint );
delete pPopupMenu;
- bForwardEvt = sal_False;
+ bForwardEvt = false;
}
else if (rCEvt.GetCommand() == COMMAND_WHEEL)
bForwardEvt = !HandleWheelCommands( rCEvt );
@@ -379,9 +395,9 @@ void SmEditWindow::Command(const CommandEvent& rCEvt)
}
-sal_Bool SmEditWindow::HandleWheelCommands( const CommandEvent &rCEvt )
+bool SmEditWindow::HandleWheelCommands( const CommandEvent &rCEvt )
{
- sal_Bool bCommandHandled = sal_False; // true if the CommandEvent needs not
+ bool bCommandHandled = false; // true if the CommandEvent needs not
// to be passed on (because it has fully
// been taken care of).
@@ -389,7 +405,7 @@ sal_Bool SmEditWindow::HandleWheelCommands( const CommandEvent &rCEvt )
if (pWData)
{
if (COMMAND_WHEEL_ZOOM == pWData->GetMode())
- bCommandHandled = sal_True; // no zooming in Command window
+ bCommandHandled = true; // no zooming in Command window
else
bCommandHandled = HandleScrollCommand( rCEvt, pHScrollBar, pVScrollBar);
}
@@ -413,7 +429,7 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt)
{
if (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE)
{
- sal_Bool bCallBase = sal_True;
+ bool bCallBase = true;
SfxViewShell* pViewShell = GetView();
if ( pViewShell && pViewShell->ISA(SmViewShell) )
{
@@ -425,11 +441,8 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt)
}
else
{
- // Timer neu starten, um den Handler (auch bei laengeren Eingaben)
- // moeglichst nur einmal am Ende aufzurufen.
- aCursorMoveTimer.Start();
+ StartCursorMove();
- DBG_ASSERT( pEditView, "EditView missing (NULL pointer)" );
if (!pEditView)
CreateEditView();
if ( !pEditView->PostKeyEvent(rKEvt) )
@@ -496,8 +509,8 @@ void SmEditWindow::CreateEditView()
pScrollBox = new ScrollBarBox(this);
pVScrollBar->SetScrollHdl(LINK(this, SmEditWindow, ScrollHdl));
pHScrollBar->SetScrollHdl(LINK(this, SmEditWindow, ScrollHdl));
- pVScrollBar->EnableDrag( sal_True );
- pHScrollBar->EnableDrag( sal_True );
+ pVScrollBar->EnableDrag( true );
+ pHScrollBar->EnableDrag( true );
pEditView->SetOutputArea(AdjustScrollBars());
@@ -505,7 +518,7 @@ void SmEditWindow::CreateEditView()
pEditView->SetSelection(eSelection);
Update();
- pEditView->ShowCursor(sal_True, sal_True);
+ pEditView->ShowCursor(true, true);
pEditEngine->SetStatusEventHdl( LINK(this, SmEditWindow, EditStatusHdl) );
SetPointer(pEditView->GetPointer());
@@ -528,7 +541,7 @@ IMPL_LINK( SmEditWindow, EditStatusHdl, EditStatus *, EMPTYARG /*pStat*/ )
IMPL_LINK_INLINE_START( SmEditWindow, ScrollHdl, ScrollBar *, EMPTYARG /*pScrollBar*/ )
{
- DBG_ASSERT(pEditView, "EditView missing");
+ OSL_ENSURE(pEditView, "EditView missing");
if (pEditView)
{
pEditView->SetVisArea(Rectangle(Point(pHScrollBar->GetThumbPos(),
@@ -607,7 +620,7 @@ String SmEditWindow::GetText() const
{
String aText;
EditEngine *pEditEngine = const_cast< SmEditWindow* >(this)->GetEditEngine();
- DBG_ASSERT( pEditEngine, "EditEngine missing" );
+ OSL_ENSURE( pEditEngine, "EditEngine missing" );
if (pEditEngine)
aText = pEditEngine->GetText( LINEEND_LF );
return aText;
@@ -617,7 +630,7 @@ String SmEditWindow::GetText() const
void SmEditWindow::SetText(const XubString& rText)
{
EditEngine *pEditEngine = GetEditEngine();
- DBG_ASSERT( pEditEngine, "EditEngine missing" );
+ OSL_ENSURE( pEditEngine, "EditEngine missing" );
if (pEditEngine && !pEditEngine->IsModified())
{
if (!pEditView)
@@ -631,7 +644,6 @@ void SmEditWindow::SetText(const XubString& rText)
//! Hier die Timer neu zu starten verhindert, dass die Handler fuer andere
//! (im Augenblick nicht mehr aktive) Math Tasks aufgerufen werden.
aModifyTimer.Start();
- aCursorMoveTimer.Start();
pEditView->SetSelection(eSelection);
}
@@ -655,6 +667,10 @@ void SmEditWindow::GetFocus()
EditEngine *pEditEngine = GetEditEngine();
if (pEditEngine)
pEditEngine->SetStatusEventHdl( LINK(this, SmEditWindow, EditStatusHdl) );
+
+ //Let SmViewShell know we got focus
+ if(GetView() && IsInlineEditEnabled())
+ GetView()->SetInsertIntoEditWindow(true);
}
@@ -676,12 +692,12 @@ void SmEditWindow::LoseFocus()
}
-sal_Bool SmEditWindow::IsAllSelected() const
+bool SmEditWindow::IsAllSelected() const
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
EditEngine *pEditEngine = ((SmEditWindow *) this)->GetEditEngine();
- DBG_ASSERT( pEditView, "NULL pointer" );
- DBG_ASSERT( pEditEngine, "NULL pointer" );
+ OSL_ENSURE( pEditView, "NULL pointer" );
+ OSL_ENSURE( pEditEngine, "NULL pointer" );
if (pEditEngine && pEditView)
{
ESelection eSelection( pEditView->GetSelection() );
@@ -701,7 +717,7 @@ sal_Bool SmEditWindow::IsAllSelected() const
void SmEditWindow::SelectAll()
{
- DBG_ASSERT( pEditView, "NULL pointer" );
+ OSL_ENSURE( pEditView, "NULL pointer" );
if (pEditView)
{
// 0xFFFF as last two parameters refers to the end of the text
@@ -711,7 +727,7 @@ void SmEditWindow::SelectAll()
void SmEditWindow::InsertCommand(sal_uInt16 nCommand)
{
- DBG_ASSERT( pEditView, "EditView missing" );
+ OSL_ENSURE( pEditView, "EditView missing" );
if (pEditView)
{
//Anfang der Selektion merken und hinterher den Cursor daraufsetzen. Nur so
@@ -720,7 +736,7 @@ void SmEditWindow::InsertCommand(sal_uInt16 nCommand)
aSelection.nEndPos = aSelection.nStartPos;
aSelection.nEndPara = aSelection.nStartPara;
- DBG_ASSERT( pEditView, "NULL pointer" );
+ OSL_ENSURE( pEditView, "NULL pointer" );
String aText = String(SmResId(nCommand));
pEditView->InsertText(aText);
@@ -737,15 +753,14 @@ void SmEditWindow::InsertCommand(sal_uInt16 nCommand)
}
aModifyTimer.Start();
- aCursorMoveTimer.Start();
-
+ StartCursorMove();
GrabFocus();
}
}
void SmEditWindow::MarkError(const Point &rPos)
{
- DBG_ASSERT( pEditView, "EditView missing" );
+ OSL_ENSURE( pEditView, "EditView missing" );
if (pEditView)
{
const xub_StrLen nCol = sal::static_int_cast< xub_StrLen >(rPos.X());
@@ -759,8 +774,8 @@ void SmEditWindow::MarkError(const Point &rPos)
void SmEditWindow::SelNextMark()
{
EditEngine *pEditEngine = GetEditEngine();
- DBG_ASSERT( pEditView, "NULL pointer" );
- DBG_ASSERT( pEditEngine, "NULL pointer" );
+ OSL_ENSURE( pEditView, "NULL pointer" );
+ OSL_ENSURE( pEditEngine, "NULL pointer" );
if (pEditEngine && pEditView)
{
ESelection eSelection = pEditView->GetSelection();
@@ -789,8 +804,8 @@ void SmEditWindow::SelNextMark()
void SmEditWindow::SelPrevMark()
{
EditEngine *pEditEngine = GetEditEngine();
- DBG_ASSERT( pEditEngine, "NULL pointer" );
- DBG_ASSERT( pEditView, "NULL pointer" );
+ OSL_ENSURE( pEditEngine, "NULL pointer" );
+ OSL_ENSURE( pEditView, "NULL pointer" );
if (pEditEngine && pEditView)
{
ESelection eSelection = pEditView->GetSelection();
@@ -827,7 +842,7 @@ void SmEditWindow::SelPrevMark()
}
}
-sal_Bool SmEditWindow::HasMark(const String& rText) const
+bool SmEditWindow::HasMark(const String& rText) const
// returns true iff 'rText' contains a mark
{
return rText.SearchAscii("<?>", 0) != STRING_NOTFOUND;
@@ -853,7 +868,7 @@ ESelection SmEditWindow::GetSelection() const
{
// pointer may be 0 when reloading a document and the old view
// was already destroyed
- //(DBG_ASSERT( pEditView, "NULL pointer" );
+ //(OSL_ENSURE( pEditView, "NULL pointer" );
ESelection eSel;
if (pEditView)
eSel = pEditView->GetSelection();
@@ -862,70 +877,69 @@ ESelection SmEditWindow::GetSelection() const
void SmEditWindow::SetSelection(const ESelection &rSel)
{
- DBG_ASSERT( pEditView, "NULL pointer" );
+ OSL_ENSURE( pEditView, "NULL pointer" );
if (pEditView)
pEditView->SetSelection(rSel);
InvalidateSlots();
}
-sal_Bool SmEditWindow::IsEmpty() const
+bool SmEditWindow::IsEmpty() const
{
EditEngine *pEditEngine = ((SmEditWindow *) this)->GetEditEngine();
- sal_Bool bEmpty = sal::static_int_cast< sal_Bool >(
- pEditEngine ? pEditEngine->GetTextLen() == 0 : sal_False);
+ bool bEmpty = ( pEditEngine ? pEditEngine->GetTextLen() == 0 : false);
return bEmpty;
}
-sal_Bool SmEditWindow::IsSelected() const
+bool SmEditWindow::IsSelected() const
{
- return pEditView ? pEditView->HasSelection() : sal_False;
+ return pEditView ? pEditView->HasSelection() : false;
}
void SmEditWindow::Cut()
{
- DBG_ASSERT( pEditView, "EditView missing" );
+ OSL_ENSURE( pEditView, "EditView missing" );
if (pEditView)
{
pEditView->Cut();
- GetDoc()->SetModified( sal_True );
+ GetDoc()->SetModified( true );
}
}
void SmEditWindow::Copy()
{
- DBG_ASSERT( pEditView, "EditView missing" );
+ OSL_ENSURE( pEditView, "EditView missing" );
if (pEditView)
pEditView->Copy();
}
void SmEditWindow::Paste()
{
- DBG_ASSERT( pEditView, "EditView missing" );
+ OSL_ENSURE( pEditView, "EditView missing" );
if (pEditView)
{
pEditView->Paste();
- GetDoc()->SetModified( sal_True );
+ GetDoc()->SetModified( true );
}
}
void SmEditWindow::Delete()
{
- DBG_ASSERT( pEditView, "EditView missing" );
+ OSL_ENSURE( pEditView, "EditView missing" );
if (pEditView)
{
pEditView->DeleteSelected();
- GetDoc()->SetModified( sal_True );
+ GetDoc()->SetModified( true );
}
}
void SmEditWindow::InsertText(const String& Text)
{
- DBG_ASSERT( pEditView, "EditView missing" );
+ OSL_ENSURE( pEditView, "EditView missing" );
if (pEditView)
{
pEditView->InsertText(Text);
aModifyTimer.Start();
- aCursorMoveTimer.Start();
+ StartCursorMove();
}
}
@@ -943,11 +957,9 @@ void SmEditWindow::Flush()
new SfxStringItem(SID_TEXT, GetText()), 0L);
}
}
-
if (aCursorMoveTimer.IsActive())
{
aCursorMoveTimer.Stop();
- // ggf noch die (neue) FormulaCursor Position setzen
CursorMoveTimerHdl(&aCursorMoveTimer);
}
}
@@ -980,3 +992,4 @@ uno::Reference< XAccessible > SmEditWindow::CreateAccessible()
return xAccessible;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/eqnolefilehdr.cxx b/starmath/source/eqnolefilehdr.cxx
index ed898bb982f1..2a553fb862e4 100644
--- a/starmath/source/eqnolefilehdr.cxx
+++ b/starmath/source/eqnolefilehdr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,4 @@ sal_Bool GetMathTypeVersion( SotStorage* pStor, sal_uInt8 &nVersion )
//////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/eqnolefilehdr.hxx b/starmath/source/eqnolefilehdr.hxx
index 330f5767384c..cdc592d8ea0c 100644
--- a/starmath/source/eqnolefilehdr.hxx
+++ b/starmath/source/eqnolefilehdr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,4 @@ sal_Bool GetMathTypeVersion( SotStorage* pStor, sal_uInt8 &nVersion );
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx
index 948b2061fdce..0e612126b00f 100644
--- a/starmath/source/format.cxx
+++ b/starmath/source/format.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,7 +82,7 @@ static const sal_uInt16 aCTLDefFnts[FNT_END] =
String GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent )
{
- DBG_ASSERT( /*FNT_BEGIN <= nIdent &&*/ nIdent <= FNT_END,
+ OSL_ENSURE( /*FNT_BEGIN <= nIdent &&*/ nIdent <= FNT_END,
"index out opd range" );
if (FNT_MATH == nIdent)
@@ -96,7 +97,7 @@ String GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent )
case SCRIPTTYPE_COMPLEX : pTable = aCTLDefFnts; break;
default :
pTable = aLatinDefFnts;
- DBG_ERROR( "unknown script-type" );
+ OSL_FAIL( "unknown script-type" );
}
return Application::GetDefaultDevice()->GetDefaultFont(
@@ -114,7 +115,7 @@ SmFormat::SmFormat()
eHorAlign = AlignCenter;
nGreekCharStyle = 0;
- bIsTextmode = bScaleNormalBrackets = sal_False;
+ bIsTextmode = bScaleNormalBrackets = false;
vSize[SIZ_TEXT] = 100;
vSize[SIZ_INDEX] = 60;
@@ -169,18 +170,18 @@ SmFormat::SmFormat()
for ( sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++ )
{
SmFace &rFace = vFont[i];
- rFace.SetTransparent( sal_True );
+ rFace.SetTransparent( true );
rFace.SetAlign( ALIGN_BASELINE );
rFace.SetColor( COL_AUTO );
- bDefaultFont[i] = sal_False;
+ bDefaultFont[i] = false;
}
}
-void SmFormat::SetFont(sal_uInt16 nIdent, const SmFace &rFont, sal_Bool bDefault )
+void SmFormat::SetFont(sal_uInt16 nIdent, const SmFace &rFont, bool bDefault )
{
vFont[nIdent] = rFont;
- vFont[nIdent].SetTransparent( sal_True );
+ vFont[nIdent].SetTransparent( true );
vFont[nIdent].SetAlign( ALIGN_BASELINE );
bDefaultFont[nIdent] = bDefault;
@@ -210,9 +211,9 @@ SmFormat & SmFormat::operator = (const SmFormat &rFormat)
}
-sal_Bool SmFormat::operator == (const SmFormat &rFormat) const
+bool SmFormat::operator == (const SmFormat &rFormat) const
{
- sal_Bool bRes = aBaseSize == rFormat.aBaseSize &&
+ bool bRes = aBaseSize == rFormat.aBaseSize &&
eHorAlign == rFormat.eHorAlign &&
nGreekCharStyle == rFormat.nGreekCharStyle &&
bIsTextmode == rFormat.bIsTextmode &&
@@ -222,21 +223,22 @@ sal_Bool SmFormat::operator == (const SmFormat &rFormat) const
for (i = 0; i <= SIZ_END && bRes; ++i)
{
if (vSize[i] != rFormat.vSize[i])
- bRes = sal_False;
+ bRes = false;
}
for (i = 0; i <= DIS_END && bRes; ++i)
{
if (vDist[i] != rFormat.vDist[i])
- bRes = sal_False;
+ bRes = false;
}
for (i = 0; i <= FNT_END && bRes; ++i)
{
if (vFont[i] != rFormat.vFont[i] ||
bDefaultFont[i] != rFormat.bDefaultFont[i])
- bRes = sal_False;
+ bRes = false;
}
return bRes;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk
index c9f0226c8df4..520708b5552d 100755
--- a/starmath/source/makefile.mk
+++ b/starmath/source/makefile.mk
@@ -25,8 +25,6 @@
#
#*************************************************************************
-#MKDEPENDSOLVER=YES
-
PRJ=..
PRJNAME=starmath
@@ -45,41 +43,44 @@ ENABLE_EXCEPTIONS=TRUE
SMDLL=TRUE
SRS2NAME =smres
-SRC2FILES = smres.src \
- symbol.src \
+SRC2FILES = smres.src \
+ symbol.src \
toolbox.src \
commands.src
-SLO1FILES = \
+SLO1FILES = \
$(SLO)$/accessibility.obj \
- $(SLO)$/action.obj \
- $(SLO)$/cfgitem.obj \
- $(SLO)$/config.obj \
- $(SLO)$/dialog.obj \
- $(SLO)$/document.obj \
- $(SLO)$/edit.obj \
+ $(SLO)$/caret.obj \
+ $(SLO)$/cursor.obj \
+ $(SLO)$/edit.obj \
$(SLO)$/eqnolefilehdr.obj \
- $(SLO)$/format.obj \
- $(SLO)$/mathmlexport.obj \
- $(SLO)$/mathmlimport.obj \
+ $(SLO)$/mathmlexport.obj \
+ $(SLO)$/mathmlimport.obj \
+ $(SLO)$/symbol.obj \
+ $(SLO)$/types.obj \
+ $(SLO)$/unodoc.obj \
+ $(SLO)$/action.obj \
+ $(SLO)$/cfgitem.obj \
+ $(SLO)$/config.obj \
+ $(SLO)$/dialog.obj \
+ $(SLO)$/document.obj \
+ $(SLO)$/format.obj \
$(SLO)$/mathtype.obj \
$(SLO)$/node.obj \
$(SLO)$/parse.obj \
- $(SLO)$/rect.obj \
- $(SLO)$/register.obj \
- $(SLO)$/smdll.obj \
- $(SLO)$/smmod.obj \
- $(SLO)$/symbol.obj \
- $(SLO)$/toolbox.obj \
- $(SLO)$/typemap.obj \
- $(SLO)$/types.obj \
- $(SLO)$/unodoc.obj \
+ $(SLO)$/register.obj \
+ $(SLO)$/smdll.obj \
+ $(SLO)$/toolbox.obj \
+ $(SLO)$/typemap.obj \
+ $(SLO)$/smmod.obj \
$(SLO)$/utility.obj \
- $(SLO)$/view.obj \
- $(SLO)$/unomodel.obj
+ $(SLO)$/rect.obj \
+ $(SLO)$/unomodel.obj \
+ $(SLO)$/view.obj \
+ $(SLO)$/visitors.obj
-SLO2FILES = \
- $(SLO)$/register.obj \
+SLO2FILES = \
+ $(SLO)$/register.obj \
$(SLO)$/detreg.obj
SLOFILES = \
diff --git a/starmath/source/math_pch.cxx b/starmath/source/math_pch.cxx
new file mode 100644
index 000000000000..e61a9c377291
--- /dev/null
+++ b/starmath/source/math_pch.cxx
@@ -0,0 +1,433 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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_starmath.hxx"
+
+#define SMDLL 1
+
+#include "starmath.hrc"
+
+#define ITEMID_FONT 1
+#define ITEMID_FONTHEIGHT 2
+#define ITEMID_LRSPACE 3
+#define ITEMID_WEIGHT 4
+
+//--------- ab hier die "generierten"
+#include <tools/string.hxx>
+#include <tools/solar.h>
+#include <tools/contnr.hxx>
+#include <tools/rtti.hxx>
+#include <tools/ref.hxx>
+#include <tools/link.hxx>
+#include <svl/brdcst.hxx>
+#include <svl/svarray.hxx>
+#include <osl/diagnose.h>
+#include <svl/hint.hxx>
+#include <svl/smplhint.hxx>
+#include <sot/sotref.hxx>
+#include <tools/globname.hxx>
+#include <sot/factory.hxx>
+#include <vcl/sv.h>
+#include <basic/sbxdef.hxx>
+#include <tools/time.hxx>
+#include <tools/gen.hxx>
+#include <tools/stream.hxx>
+#include <tools/errinf.hxx>
+#include <tools/errcode.hxx>
+#include <sot/object.hxx>
+#include <sot/sotdata.hxx>
+#include <sfx2/shell.hxx>
+#include <sal/types.h>
+#include <sal/config.h>
+#include <tools/date.hxx>
+#include <tools/ownlist.hxx>
+#include <vcl/accel.hxx>
+#include <tools/resid.hxx>
+#include <tools/rc.hxx>
+#include <i18npool/lang.h>
+#include <tools/resmgr.hxx>
+#include <vcl/keycod.hxx>
+#include <vcl/keycodes.hxx>
+#include <vcl/vclenum.hxx>
+#include <vcl/cmdevt.hxx>
+#include <vcl/font.hxx>
+#include <tools/color.hxx>
+#include <vcl/region.hxx>
+#include <vcl/mapmod.hxx>
+#include <tools/fract.hxx>
+#include <vcl/wall.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/bitmap.hxx>
+#include <vcl/pointr.hxx>
+#include <vcl/ptrstyle.hxx>
+#include <vcl/wintypes.hxx>
+#include <vcl/inputctx.hxx>
+#include <vcl/event.hxx>
+#include <format.hxx>
+#include <utility.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/ctrl.hxx>
+#include <vcl/window.hxx>
+#include <sfx2/minarray.hxx>
+#include <vcl/combobox.hxx>
+#include <vcl/combobox.h>
+#include <vcl/menu.hxx>
+#include <vcl/bitmapex.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/lstbox.h>
+#include <usr/guid.hxx>
+#include <usr/sequ.hxx>
+#include <uno/types.h>
+#include <uno/macros.h>
+#include <osl/mutex.h>
+#include <tools/shl.hxx>
+#include <sfx2/module.hxx>
+#include <sfx2/imgdef.hxx>
+#include <usr/uno.hxx>
+#include <usr/xiface.hxx>
+#include <usr/ustring.hxx>
+#include <salhelper/simplereferenceobject.hxx>
+#include <osl/types.h>
+#include <osl/interlck.h>
+#include <smdll.hxx>
+#include <sfx2/sfxsids.hrc>
+#include <chaos/cntids.hrc>
+#include <svl/cntwids.hrc>
+#include <svl/solar.hrc>
+#include <svl/lstner.hxx>
+#include <starmath.hrc>
+#include <basic/sbx.hxx>
+#include <basic/sbxform.hxx>
+#include <basic/sbxobj.hxx>
+#include <basic/sbxvar.hxx>
+#include <basic/sbxcore.hxx>
+#include <basic/sbxprop.hxx>
+#include <basic/sbxmeth.hxx>
+#include <tools/unqid.hxx>
+#include <tools/unqidx.hxx>
+#include <svl/poolitem.hxx>
+#include <svtools/args.hxx>
+#include <smmod.hxx>
+#include <osl/thread.hxx>
+#include <osl/thread.h>
+#include <vcl/apptypes.hxx>
+#include <tools/dynary.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/timer.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/sfx.hrc>
+#include <svl/memberid.hrc>
+#include <vcl/syswin.hxx>
+#include <tools/datetime.hxx>
+#include <tools/wldcrd.hxx>
+#include <parse.hxx>
+#include <tools/stack.hxx>
+#include <types.hxx>
+#include <config.hxx>
+#include <svtools/confitem.hxx>
+#include <tools/poly.hxx>
+#include <svx/xpoly.hxx>
+#include <rect.hxx>
+#include <vcl/outdev.hxx>
+#include <smart/com/sun/star/frame/XDispatchProviderInterceptor.hxx>
+#include <smart/com/sun/star/frame/XDispatch.hxx>
+#include <smart/com/sun/star/frame/XDispatchProvider.hxx>
+#include <smart/com/sun/star/frame/XStatusListener.hxx>
+#include <smart/com/sun/star/frame/FrameSearchFlag.hxx>
+#include <smart/com/sun/star/frame/XDispatchProviderInterception.hxx>
+#include <smart/com/sun/star/frame/FeatureStateEvent.hxx>
+#include <smart/com/sun/star/frame/DispatchDescriptor.hxx>
+#include <smart/com/sun/star/frame/XFrameActionListener.hxx>
+#include <smart/com/sun/star/frame/XComponentLoader.hxx>
+#include <smart/com/sun/star/frame/XFrame.hxx>
+#include <smart/com/sun/star/frame/FrameActionEvent.hxx>
+#include <smart/com/sun/star/frame/FrameAction.hxx>
+#include <smart/com/sun/star/util/XURLTransformer.hxx>
+#include <smart/com/sun/star/task/XStatusIndicatorFactory.hxx>
+#include <smart/com/sun/star/task/XStatusIndicatorSupplier.hxx>
+#include <smart/com/sun/star/task/XStatusIndicator.hxx>
+#include <smart/com/sun/star/frame/XBrowseHistoryRegistry.hxx>
+#include <smart/com/sun/star/io/BufferSizeExceededException.hxx>
+#include <smart/com/sun/star/io/NotConnectedException.hxx>
+#include <smart/com/sun/star/io/IOException.hxx>
+#include <smart/com/sun/star/io/UnexpectedEOFException.hxx>
+#include <smart/com/sun/star/io/WrongFormatException.hxx>
+#include <smart/com/sun/star/lang/ServiceNotRegisteredException.hxx>
+#include <smart/com/sun/star/lang/NullPointerException.hxx>
+#include <smart/com/sun/star/lang/ClassNotFoundException.hxx>
+#include <smart/com/sun/star/lang/NoSuchMethodException.hxx>
+#include <smart/com/sun/star/lang/SecurityException.hxx>
+#include <smart/com/sun/star/lang/NoSuchFieldException.hxx>
+#include <smart/com/sun/star/lang/DisposedException.hxx>
+#include <smart/com/sun/star/lang/ArrayIndexOutOfBoundsException.hxx>
+#include <smart/com/sun/star/lang/IllegalAccessException.hxx>
+#include <smart/com/sun/star/lang/IndexOutOfBoundsException.hxx>
+#include <smart/com/sun/star/lang/IllegalArgumentException.hxx>
+#include <smart/com/sun/star/lang/NoSupportException.hxx>
+#include <smart/com/sun/star/lang/WrappedTargetException.hxx>
+#include <smart/com/sun/star/reflection/ParamInfo.hxx>
+#include <smart/com/sun/star/reflection/XIdlArray.hxx>
+#include <smart/com/sun/star/reflection/XIdlClassProvider.hxx>
+#include <smart/com/sun/star/reflection/FieldAccessMode.hxx>
+#include <smart/com/sun/star/reflection/XIdlClass.hxx>
+#include <smart/com/sun/star/reflection/XIdlField.hxx>
+#include <smart/com/sun/star/reflection/ParamMode.hxx>
+#include <smart/com/sun/star/reflection/MethodMode.hxx>
+#include <smart/com/sun/star/reflection/XIdlMember.hxx>
+#include <smart/com/sun/star/reflection/XIdlReflection.hxx>
+#include <smart/com/sun/star/reflection/XIdlMethod.hxx>
+#include <smart/com/sun/star/reflection/InvocationTargetException.hxx>
+#include <smart/com/sun/star/beans/PropertyValues.hxx>
+#include <smart/com/sun/star/beans/XPropertySet.hxx>
+#include <smart/com/sun/star/beans/PropertyValue.hxx>
+#include <smart/com/sun/star/beans/PropertyState.hxx>
+#include <smart/com/sun/star/beans/XPropertySetInfo.hxx>
+#include <smart/com/sun/star/beans/XMultiPropertySet.hxx>
+#include <smart/com/sun/star/beans/XFastPropertySet.hxx>
+#include <smart/com/sun/star/beans/XVetoableChangeListener.hxx>
+#include <smart/com/sun/star/beans/XPropertyState.hxx>
+#include <smart/com/sun/star/beans/XPropertyStateChangeListener.hxx>
+#include <smart/com/sun/star/beans/PropertyAttribute.hxx>
+#include <smart/com/sun/star/beans/XPropertiesChangeListener.hxx>
+#include <smart/com/sun/star/beans/XPropertyChangeListener.hxx>
+#include <smart/com/sun/star/beans/XPropertyAccess.hxx>
+#include <smart/com/sun/star/beans/XPropertyContainer.hxx>
+#include <smart/com/sun/star/beans/PropertyStateChangeEvent.hxx>
+#include <smart/com/sun/star/beans/PropertyChangeEvent.hxx>
+#include <smart/com/sun/star/beans/UnknownPropertyException.hxx>
+#include <smart/com/sun/star/beans/IntrospectionException.hxx>
+#include <smart/com/sun/star/beans/PropertyExistException.hxx>
+#include <smart/com/sun/star/beans/IllegalTypeException.hxx>
+#include <smart/com/sun/star/beans/PropertyVetoException.hxx>
+#include <smart/com/sun/star/container/XEnumerationAccess.hxx>
+#include <smart/com/sun/star/container/XHierarchicalNameAccess.hxx>
+#include <smart/com/sun/star/container/XNameAccess.hxx>
+#include <smart/com/sun/star/container/XContentEnumerationAccess.hxx>
+#include <smart/com/sun/star/container/XEnumeration.hxx>
+#include <smart/com/sun/star/container/XElementAccess.hxx>
+#include <smart/com/sun/star/container/XIndexAccess.hxx>
+#include <smart/com/sun/star/lang/XEventListener.hxx>
+#include <smart/com/sun/star/lang/EventObject.hxx>
+#include <smart/com/sun/star/script/XAllListenerAdapterService.hxx>
+#include <smart/com/sun/star/script/XAllListener.hxx>
+#include <smart/com/sun/star/script/AllEventObject.hxx>
+#include <smart/com/sun/star/container/XComponentEnumeration.hxx>
+#include <smart/com/sun/star/lang/XComponent.hxx>
+#include <smart/com/sun/star/container/XComponentEnumerationAccess.hxx>
+#include <smart/com/sun/star/lang/ListenerExistException.hxx>
+#include <smart/com/sun/star/container/ElementExistException.hxx>
+#include <smart/com/sun/star/lang/InvalidListenerException.hxx>
+#include <smart/com/sun/star/container/NoSuchElementException.hxx>
+#include <smart/com/sun/star/awt/XKeyListener.hxx>
+#include <smart/com/sun/star/awt/XPaintListener.hxx>
+#include <smart/com/sun/star/awt/KeyEvent.hxx>
+#include <smart/com/sun/star/awt/KeyModifier.hxx>
+#include <smart/com/sun/star/awt/XMouseMotionListener.hxx>
+#include <smart/com/sun/star/awt/FocusEvent.hxx>
+#include <smart/com/sun/star/awt/XWindowListener.hxx>
+#include <smart/com/sun/star/awt/XActivateListener.hxx>
+#include <smart/com/sun/star/awt/MouseEvent.hxx>
+#include <smart/com/sun/star/awt/XTopWindowListener.hxx>
+#include <smart/com/sun/star/awt/PaintEvent.hxx>
+#include <smart/com/sun/star/awt/InputEvent.hxx>
+#include <smart/com/sun/star/awt/KeyGroup.hxx>
+#include <smart/com/sun/star/awt/Key.hxx>
+#include <smart/com/sun/star/awt/WindowEvent.hxx>
+#include <smart/com/sun/star/awt/XMouseListener.hxx>
+#include <smart/com/sun/star/awt/KeyFunction.hxx>
+#include <smart/com/sun/star/awt/FocusChangeReason.hxx>
+#include <smart/com/sun/star/awt/MouseButton.hxx>
+#include <smart/com/sun/star/awt/XFocusListener.hxx>
+#include <smart/com/sun/star/awt/XAdjustmentListener.hxx>
+#include <smart/com/sun/star/awt/XActionListener.hxx>
+#include <smart/com/sun/star/awt/XTextListener.hxx>
+#include <smart/com/sun/star/awt/XSpinListener.hxx>
+#include <smart/com/sun/star/awt/XItemListener.hxx>
+#include <smart/com/sun/star/awt/XVclContainerListener.hxx>
+#include <smart/com/sun/star/awt/XFileDialog.hxx>
+#include <smart/com/sun/star/awt/XTextComponent.hxx>
+#include <smart/com/sun/star/awt/XListBox.hxx>
+#include <smart/com/sun/star/awt/XProgressMonitor.hxx>
+#include <smart/com/sun/star/awt/TextAlign.hxx>
+#include <smart/com/sun/star/awt/XScrollBar.hxx>
+#include <smart/com/sun/star/awt/XVclContainerPeer.hxx>
+#include <smart/com/sun/star/awt/XTabControllerModel.hxx>
+#include <smart/com/sun/star/awt/XMessageBox.hxx>
+#include <smart/com/sun/star/awt/XTextEditField.hxx>
+#include <smart/com/sun/star/awt/Style.hxx>
+#include <smart/com/sun/star/awt/XTimeField.hxx>
+#include <smart/com/sun/star/awt/XVclWindowPeer.hxx>
+#include <smart/com/sun/star/awt/XControlModel.hxx>
+#include <smart/com/sun/star/awt/XSpinField.hxx>
+#include <smart/com/sun/star/awt/XUnoControlContainer.hxx>
+#include <smart/com/sun/star/awt/XTextLayoutConstrains.hxx>
+#include <smart/com/sun/star/awt/XNumericField.hxx>
+#include <smart/com/sun/star/awt/XButton.hxx>
+#include <smart/com/sun/star/awt/XTextArea.hxx>
+#include <smart/com/sun/star/awt/XImageButton.hxx>
+#include <smart/com/sun/star/awt/XFixedText.hxx>
+#include <smart/com/sun/star/awt/XControlContainer.hxx>
+#include <smart/com/sun/star/awt/XDialog.hxx>
+#include <smart/com/sun/star/awt/ScrollBarOrientation.hxx>
+#include <smart/com/sun/star/awt/XRadioButton.hxx>
+#include <smart/com/sun/star/awt/XCurrencyField.hxx>
+#include <smart/com/sun/star/awt/XPatternField.hxx>
+#include <smart/com/sun/star/awt/VclWindowPeerAttribute.hxx>
+#include <smart/com/sun/star/awt/XTabController.hxx>
+#include <smart/com/sun/star/awt/XVclContainer.hxx>
+#include <smart/com/sun/star/awt/XDateField.hxx>
+#include <smart/com/sun/star/awt/XComboBox.hxx>
+#include <smart/com/sun/star/awt/XControl.hxx>
+#include <smart/com/sun/star/awt/XCheckBox.hxx>
+#include <smart/com/sun/star/awt/MessageBoxCommand.hxx>
+#include <smart/com/sun/star/awt/XLayoutConstrains.hxx>
+#include <smart/com/sun/star/awt/XProgressBar.hxx>
+#include <smart/com/sun/star/awt/SimpleFontMetric.hxx>
+#include <smart/com/sun/star/awt/FontWeight.hxx>
+#include <smart/com/sun/star/awt/FontSlant.hxx>
+#include <smart/com/sun/star/awt/CharSet.hxx>
+#include <smart/com/sun/star/awt/FontDescriptor.hxx>
+#include <smart/com/sun/star/awt/FontWidth.hxx>
+#include <smart/com/sun/star/awt/XFont.hxx>
+#include <smart/com/sun/star/awt/FontType.hxx>
+#include <smart/com/sun/star/awt/FontUnderline.hxx>
+#include <smart/com/sun/star/awt/FontStrikeout.hxx>
+#include <smart/com/sun/star/awt/FontFamily.hxx>
+#include <smart/com/sun/star/awt/FontPitch.hxx>
+#include <smart/com/sun/star/awt/XTopWindow.hxx>
+#include <smart/com/sun/star/awt/XWindow.hxx>
+#include <smart/com/sun/star/awt/PosSize.hxx>
+#include <smart/com/sun/star/awt/VclContainerEvent.hxx>
+#include <smart/com/sun/star/awt/ItemEvent.hxx>
+#include <smart/com/sun/star/awt/SpinEvent.hxx>
+#include <smart/com/sun/star/awt/TextEvent.hxx>
+#include <smart/com/sun/star/awt/AdjustmentType.hxx>
+#include <smart/com/sun/star/awt/ActionEvent.hxx>
+#include <smart/com/sun/star/awt/AdjustmentEvent.hxx>
+#include <smart/com/sun/star/awt/Rectangle.hxx>
+#include <smart/com/sun/star/awt/Selection.hxx>
+#include <smart/com/sun/star/awt/Size.hxx>
+#include <smart/com/sun/star/awt/WindowDescriptor.hxx>
+#include <smart/com/sun/star/awt/InvalidateStyle.hxx>
+#include <smart/com/sun/star/awt/XToolkit.hxx>
+#include <smart/com/sun/star/awt/XWindowPeer.hxx>
+#include <smart/com/sun/star/awt/WindowClass.hxx>
+#include <smart/com/sun/star/awt/XSystemDependentWindowPeer.hxx>
+#include <smart/com/sun/star/awt/WindowAttribute.hxx>
+#include <smart/com/sun/star/awt/XPointer.hxx>
+#include <smart/com/sun/star/awt/SystemPointer.hxx>
+#include <smart/com/sun/star/awt/XView.hxx>
+#include <usr/refl.hxx>
+#include <sfx2/msg.hxx>
+#include <svl/itemset.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/frame.hxx>
+#include <sfx2/objface.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <symbol.hxx>
+#include <svl/itempool.hxx>
+#include <vcl/image.hxx>
+#include <vcl/metric.hxx>
+#include <sfx2/inimgr.hxx>
+#include <node.hxx>
+#include <tools/pstm.hxx>
+#include <tools/table.hxx>
+#include <sfx2/docfac.hxx>
+#include <svl/ownlist.hxx>
+#include <sfx2/objsh.hxx>
+#include <svl/stritem.hxx>
+#include <sfx2/ipfrm.hxx>
+#include <vcl/dialog.hxx>
+#include <sfx2/dispatch.hxx>
+#include <svl/svstdarr.hxx>
+#include <sfx2/bindings.hxx>
+#include <dialog.hxx>
+#include <vcl/symbol.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <vcl/button.hxx>
+#include <vcl/tabdlg.hxx>
+#include <vcl/tabpage.hxx>
+#include <vcl/tabctrl.hxx>
+#include <svx/optgenrl.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/group.hxx>
+#include <document.hxx>
+#include <vcl/spinfld.hxx>
+#include <vcl/menubtn.hxx>
+#include <svtools/ctrlbox.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/field.hxx>
+#include <svtools/ctrltool.hxx>
+#include <sfx2/interno.hxx>
+#include <sfx2/sfxdefs.hxx>
+#include <sfx2/childwin.hxx>
+#include <sfx2/chalign.hxx>
+#include <vcl/floatwin.hxx>
+#include <sot/storage.hxx>
+#include <rsc/rscsfx.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/btndlg.hxx>
+#include <uno/uno.h>
+#include <uno/string.h>
+#include <uno/sequence.h>
+#include <uno/any.h>
+#include <uno/exceptn.h>
+#include <uno/intrface.h>
+#include <uno/factory.h>
+#include <uno/api.h>
+#include <svx/svxids.hrc>
+#include <view.hxx>
+#include <sfx2/dockwin.hxx>
+#include <sfx2/viewsh.hxx>
+#include <sfx2/clientsh.hxx>
+#include <svtools/scrwin.hxx>
+#include <vcl/scrbar.hxx>
+#include <sfx2/ctrlitem.hxx>
+#include <sfx2/viewfac.hxx>
+#include <edit.hxx>
+#include <editeng/editdata.hxx>
+#include <toolbox.hxx>
+#include <vcl/toolbox.hxx>
+#include <vcl/dockwin.hxx>
+#include <smslots.hxx>
+#include <svl/undo.hxx>
+#include <sfx2/request.hxx>
+#include <svl/whiter.hxx>
+#include <vcl/prntypes.hxx>
+#include <vcl/jobset.hxx>
+#include <vcl/gdimtf.hxx>
+#include <sot/exchange.hxx>
+#include <vcl/wrkwin.hxx>
+#include <action.hxx>
+#include <sfx2/filedlg.hxx>
+#include <sfx2/iodlg.hxx>
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index f4198010f3d8..279f0b2786f3 100755
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,7 +56,7 @@
#include <rtl/math.hxx>
#include <sfx2/frame.hxx>
#include <sfx2/docfile.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <tools/urlobj.hxx>
#include <svtools/sfxecode.hxx>
#include <unotools/saveopt.hxx>
@@ -104,7 +105,7 @@ sal_Bool SmXMLExportWrapper::Export(SfxMedium &rMedium)
sal_Bool bRet=sal_True;
uno::Reference<lang::XMultiServiceFactory>
xServiceFactory(utl::getProcessServiceFactory());
- DBG_ASSERT(xServiceFactory.is(),"got no service manager");
+ OSL_ENSURE(xServiceFactory.is(),"got no service manager");
//Get model
uno::Reference< lang::XComponent > xModelComp(xModel, uno::UNO_QUERY );
@@ -126,7 +127,7 @@ sal_Bool SmXMLExportWrapper::Export(SfxMedium &rMedium)
{
if (pDocShell /*&& pDocShell->GetMedium()*/)
{
- DBG_ASSERT( pDocShell->GetMedium() == &rMedium,
+ OSL_ENSURE( pDocShell->GetMedium() == &rMedium,
"different SfxMedium found" );
SfxItemSet* pSet = rMedium.GetItemSet();
@@ -269,16 +270,16 @@ sal_Bool SmXMLExportWrapper::WriteThroughComponent(
Reference<beans::XPropertySet> & rPropSet,
const sal_Char* pComponentName )
{
- DBG_ASSERT(xOutputStream.is(), "I really need an output stream!");
- DBG_ASSERT(xComponent.is(), "Need component!");
- DBG_ASSERT(NULL != pComponentName, "Need component name!");
+ OSL_ENSURE(xOutputStream.is(), "I really need an output stream!");
+ OSL_ENSURE(xComponent.is(), "Need component!");
+ OSL_ENSURE(NULL != pComponentName, "Need component name!");
// get component
Reference< io::XActiveDataSource > xSaxWriter(
rFactory->createInstance(
- OUString::createFromAscii("com.sun.star.xml.sax.Writer") ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer") )),
UNO_QUERY );
- DBG_ASSERT( xSaxWriter.is(), "can't instantiate XML writer" );
+ OSL_ENSURE( xSaxWriter.is(), "can't instantiate XML writer" );
if (!xSaxWriter.is())
return sal_False;
@@ -296,7 +297,7 @@ sal_Bool SmXMLExportWrapper::WriteThroughComponent(
Reference< document::XExporter > xExporter(
rFactory->createInstanceWithArguments(
OUString::createFromAscii(pComponentName), aArgs), UNO_QUERY);
- DBG_ASSERT( xExporter.is(),
+ OSL_ENSURE( xExporter.is(),
"can't instantiate export filter component" );
if ( !xExporter.is() )
return sal_False;
@@ -331,8 +332,8 @@ sal_Bool SmXMLExportWrapper::WriteThroughComponent(
sal_Bool bCompress
)
{
- DBG_ASSERT(xStorage.is(), "Need storage!");
- DBG_ASSERT(NULL != pStreamName, "Need stream name!");
+ OSL_ENSURE(xStorage.is(), "Need storage!");
+ OSL_ENSURE(NULL != pStreamName, "Need stream name!");
// open stream
Reference < io::XStream > xStream;
@@ -344,7 +345,7 @@ sal_Bool SmXMLExportWrapper::WriteThroughComponent(
}
catch ( uno::Exception& )
{
- DBG_ERROR( "Can't create output stream in package!" );
+ OSL_FAIL( "Can't create output stream in package!" );
return sal_False;
}
@@ -381,16 +382,11 @@ sal_Bool SmXMLExportWrapper::WriteThroughComponent(
sal_Bool bRet = WriteThroughComponent( xStream->getOutputStream(), xComponent, rFactory,
rPropSet, pComponentName );
- // stream is closed by SAX parser
- //if ( bRet )
- // xStream->getOutputStream()->closeOutput();
-
return bRet;
}
////////////////////////////////////////////////////////////
-// #110680#
SmXMLExport::SmXMLExport(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
sal_uInt16 nExportFlags)
@@ -445,8 +441,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLExport_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
- // #110680#
- // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_ALL );
// EXPORT_OASIS is required here allthough there is no differrence between
// OOo and OASIS, because without the flag, a transformation to OOo would
// be chained in.
@@ -472,8 +466,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLExportMetaOOO_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
- // #110680#
- // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_META );
return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_META );
}
@@ -496,8 +488,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLExportMeta_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
- // #110680#
- // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_META );
return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_OASIS|EXPORT_META );
}
@@ -520,8 +510,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLExportSettingsOOO_createInstance
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
- // #110680#
- // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_SETTINGS );
return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_SETTINGS );
}
@@ -544,8 +532,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLExportSettings_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
- // #110680#
- // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_SETTINGS );
return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_OASIS|EXPORT_SETTINGS );
}
@@ -568,8 +554,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLExportContent_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
- // #110680#
- // return (cppu::OWeakObject*)new SmXMLExport( EXPORT_CONTENT );
// The EXPORT_OASIS flag is only required to avoid that a transformer is
// chanied in
return (cppu::OWeakObject*)new SmXMLExport( rSMgr, EXPORT_OASIS|EXPORT_CONTENT );
@@ -631,7 +615,7 @@ sal_uInt32 SmXMLExport::exportDoc(enum XMLTokenEnum eClass)
// make use of a default namespace
ResetNamespaceMap(); // Math doesn't need namespaces from xmloff, since it now uses default namespaces (because that is common with current MathML usage in the web)
- _GetNamespaceMap().Add( OUString::createFromAscii(""), GetXMLToken(XML_N_MATH), XML_NAMESPACE_MATH );
+ _GetNamespaceMap().Add( OUString(), GetXMLToken(XML_N_MATH), XML_NAMESPACE_MATH );
rList.AddAttribute(GetNamespaceMap().GetAttrNameByKey(XML_NAMESPACE_MATH_IDX),
GetNamespaceMap().GetNameByKey( XML_NAMESPACE_MATH_IDX));
@@ -668,12 +652,12 @@ void SmXMLExport::_ExportContent()
(xTunnel->getSomething(SmModel::getUnoTunnelId()));
SmDocShell *pDocShell = pModel ?
static_cast<SmDocShell*>(pModel->GetObjectShell()) : 0;
- DBG_ASSERT( pDocShell, "doc shell missing" );
+ OSL_ENSURE( pDocShell, "doc shell missing" );
if (pDocShell)
{
SmParser &rParser = pDocShell->GetParser();
- sal_Bool bVal = rParser.IsExportSymbolNames();
- rParser.SetExportSymbolNames( sal_True );
+ bool bVal = rParser.IsExportSymbolNames();
+ rParser.SetExportSymbolNames( true );
SmNode *pTmpTree = rParser.Parse( aText );
aText = rParser.GetText();
delete pTmpTree;
@@ -799,30 +783,16 @@ void SmXMLExport::ExportExpression(const SmNode *pNode, int nLevel)
if (nSize > 1 || (pNode && pNode->GetType() == NEXPRESSION))
pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MROW, sal_True, sal_True);
- //if (nSize)
- //{
for (sal_uInt16 i = 0; i < nSize; i++)
- if (const SmNode *pTemp = pNode->GetSubNode(i))
- ExportNodes(pTemp, nLevel+1);
- //}
-#if 0
- else
- {
- //This saves us from situations like "a newline" where the
- //lack of a term following the newline would otherwise create
- //a incorrect token like <mtr/>
- SvXMLElementExport aDummy(*this, XML_NAMESPACE_MATH, XML_MI, sal_True, sal_False);
- sal_Unicode nArse[2] = {'\n','\0'};
- GetDocHandler()->characters(nArse);
- }
-#endif
+ if (const SmNode *pTemp = pNode->GetSubNode(i))
+ ExportNodes(pTemp, nLevel+1);
delete pRow;
}
void SmXMLExport::ExportBinaryVertical(const SmNode *pNode, int nLevel)
{
- DBG_ASSERT(pNode->GetNumSubNodes()==3,"Bad Fraction");
+ OSL_ENSURE(pNode->GetNumSubNodes()==3,"Bad Fraction");
SvXMLElementExport aFraction(*this, XML_NAMESPACE_MATH, XML_MFRAC, sal_True, sal_True);
ExportNodes(pNode->GetSubNode(0), nLevel);
ExportNodes(pNode->GetSubNode(2), nLevel);
@@ -873,7 +843,7 @@ void SmXMLExport::ExportMath(const SmNode *pNode, int /*nLevel*/)
sal_Unicode cTmp = ConvertMathToMathML( nArse[0] );
if (cTmp != 0)
nArse[0] = cTmp;
- DBG_ASSERT(nArse[0] != 0xffff,"Non existant symbol");
+ OSL_ENSURE(nArse[0] != 0xffff,"Non existant symbol");
nArse[1] = 0;
GetDocHandler()->characters(nArse);
}
@@ -915,7 +885,6 @@ void SmXMLExport::ExportBlank(const SmNode * /*pNode*/, int /*nLevel*/)
//!! <msub> tag in MathML !!
SvXMLElementExport *pText;
- //const SmBlankNode *pTemp = static_cast<const SmBlankNode *>(pNode);
pText = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MI, sal_True, sal_False);
@@ -1077,11 +1046,11 @@ void SmXMLExport::ExportBrace(const SmNode *pNode, int nLevel)
nArse[1] = 0;
nArse[0] = static_cast<
const SmMathSymbolNode* >(pLeft)->GetText().GetChar(0);
- DBG_ASSERT(nArse[0] != 0xffff,"Non existant symbol");
+ OSL_ENSURE(nArse[0] != 0xffff,"Non existant symbol");
AddAttribute(XML_NAMESPACE_MATH, XML_OPEN,nArse);
nArse[0] = static_cast<
const SmMathSymbolNode* >(pRight)->GetText().GetChar(0);
- DBG_ASSERT(nArse[0] != 0xffff,"Non existant symbol");
+ OSL_ENSURE(nArse[0] != 0xffff,"Non existant symbol");
AddAttribute(XML_NAMESPACE_MATH, XML_CLOSE,nArse);
pFences = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MFENCED,
sal_True,sal_True);
@@ -1136,14 +1105,6 @@ void SmXMLExport::ExportOperator(const SmNode *pNode, int nLevel)
{
/*we need to either use content or font and size attributes
*here*/
-#if 0
- {
- SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO,
- sal_True,sal_False);
- SmTextNode *pTemp = (SmTextNode *)pNode->GetSubNode(0);
- GetDocHandler()->characters(pTemp->GetText());
- }
-#endif
SvXMLElementExport aRow(*this, XML_NAMESPACE_MATH, XML_MROW,
sal_True, sal_True);
ExportNodes(pNode->GetSubNode(0), nLevel+1);
@@ -1177,12 +1138,7 @@ void SmXMLExport::ExportAttributes(const SmNode *pNode, int nLevel)
//proper entity support required
SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO,
sal_True,sal_True);
-#if 0
- GetDocHandler()->characters(
- OUString(RTL_CONSTASCII_USTRINGPARAM("&overbar;")));
-#else
sal_Unicode nArse[2] = {0xAF,0x00};
-#endif
GetDocHandler()->characters(nArse);
}
break;
@@ -1191,12 +1147,7 @@ void SmXMLExport::ExportAttributes(const SmNode *pNode, int nLevel)
//proper entity support required
SvXMLElementExport aMath(*this, XML_NAMESPACE_MATH, XML_MO,
sal_True,sal_True);
-#if 0
- GetDocHandler()->characters(
- OUString(RTL_CONSTASCII_USTRINGPARAM("&underbar;")));
-#else
sal_Unicode nArse[2] = {0x0332,0x00};
-#endif
GetDocHandler()->characters(nArse);
}
break;
@@ -1240,7 +1191,7 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel)
case TSERIF : nSansSerifFixed = 1; break;
case TFIXED : nSansSerifFixed = 2; break;
default:
- DBG_ASSERT( 0, "unexpected case" );
+ OSL_ENSURE( 0, "unexpected case" );
}
// According to the parser every node that is to be evaluated heres
// has a single non-zero subnode at index 1!! Thus we only need to check
@@ -1374,7 +1325,7 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel)
pText = "monospace"; // no modifiers allowed for monospace ...
else
{
- DBG_ASSERT( 0, "unexpected case" );
+ OSL_ENSURE( 0, "unexpected case" );
}
AddAttribute(XML_NAMESPACE_MATH, XML_MATHVARIANT, A2OU(pText));
}
@@ -1383,11 +1334,6 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel)
break;
}
-#if 0
- if (pNode->GetNumSubNodes() > 1) //or in the future is a node that
- //cannot take the currently supported
- //properties
-#endif
//for now we will just always export with a style and not worry about
//anyone else for the moment.
{
@@ -1395,10 +1341,6 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel)
SvXMLElementExport aStyle(*this, XML_NAMESPACE_MATH, XML_MSTYLE, sal_True,sal_True);
ExportExpression(pNode, nLevel);
}
-#if 0
- else
- ExportNodes(pNode->GetSubNode(0), nLevel+1);
-#endif
delete pElement;
}
@@ -1423,13 +1365,12 @@ void SmXMLExport::ExportVerticalBrace(const SmNode *pNode, int nLevel)
break;
}
- DBG_ASSERT(pNode->GetNumSubNodes()==3,"Bad Vertical Brace");
+ OSL_ENSURE(pNode->GetNumSubNodes()==3,"Bad Vertical Brace");
SvXMLElementExport aOver1(*this, XML_NAMESPACE_MATH,which, sal_True, sal_True);
{//Scoping
// using accents will draw the over-/underbraces too close to the base
// see http://www.w3.org/TR/MathML2/chapter3.html#id.3.4.5.2
// also XML_ACCENT is illegal with XML_MUNDER. Thus no XML_ACCENT attribut here!
-// AddAttribute(XML_NAMESPACE_MATH, XML_ACCENT, XML_sal_True);
SvXMLElementExport aOver2(*this, XML_NAMESPACE_MATH,which, sal_True, sal_True);
ExportNodes(pNode->GetSubNode(0), nLevel);
ExportNodes(pNode->GetSubNode(1), nLevel);
@@ -1556,21 +1497,12 @@ void SmXMLExport::ExportNodes(const SmNode *pNode, int nLevel)
ExportBlank(pNode, nLevel);
break;
default:
- DBG_ASSERT( 0, "Warning: failed to export a node?" );
+ OSL_ENSURE( 0, "Warning: failed to export a node?" );
break;
-#if 0
- default:
- {
- sal_uLong nSize = pNode->GetNumSubNodes();
- for (sal_uLong i = 0; i < nSize; i++)
- if (SmNode *pTemp = pNode->GetSubNode(i))
- ExportNodes(pTemp, nLevel+1);
- }
- break;
-#endif
}
}
////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/mathmlexport.hxx b/starmath/source/mathmlexport.hxx
index 361d97e054b0..4ab602bad8b3 100644
--- a/starmath/source/mathmlexport.hxx
+++ b/starmath/source/mathmlexport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,7 +114,6 @@ protected:
void ExportBlank(const SmNode *pNode, int nLevel);
public:
- // #110680#
SmXMLExport(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
sal_uInt16 nExportFlags=EXPORT_ALL);
@@ -141,3 +141,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 98b0ad5edbf3..e3308e59cc62 100755
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,7 +52,7 @@ one go*/
#include <rtl/math.hxx>
#include <sfx2/frame.hxx>
#include <sfx2/docfile.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <tools/urlobj.hxx>
#include <svtools/sfxecode.hxx>
#include <unotools/saveopt.hxx>
@@ -99,13 +100,13 @@ sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
uno::Reference<lang::XMultiServiceFactory> xServiceFactory(
utl::getProcessServiceFactory());
- DBG_ASSERT(xServiceFactory.is(), "XMLReader::Read: got no service manager");
+ OSL_ENSURE(xServiceFactory.is(), "XMLReader::Read: got no service manager");
if ( !xServiceFactory.is() )
return nError;
//Make a model component from our SmModel
uno::Reference< lang::XComponent > xModelComp( xModel, uno::UNO_QUERY );
- DBG_ASSERT( xModelComp.is(), "XMLReader::Read: got no model" );
+ OSL_ENSURE( xModelComp.is(), "XMLReader::Read: got no model" );
// try to get an XStatusIndicator from the Medium
uno::Reference<task::XStatusIndicator> xStatusIndicator;
@@ -120,19 +121,16 @@ sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
static_cast<SmDocShell*>(pModel->GetObjectShell()) : 0;
if (pDocShell)
{
-// if (pDocShell->GetMedium())
- {
- DBG_ASSERT( pDocShell->GetMedium() == &rMedium,
- "different SfxMedium found" );
+ OSL_ENSURE( pDocShell->GetMedium() == &rMedium,
+ "different SfxMedium found" );
- SfxItemSet* pSet = rMedium.GetItemSet();
- if (pSet)
- {
- const SfxUnoAnyItem* pItem = static_cast<const SfxUnoAnyItem*>(
- pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL) );
- if (pItem)
- pItem->GetValue() >>= xStatusIndicator;
- }
+ SfxItemSet* pSet = rMedium.GetItemSet();
+ if (pSet)
+ {
+ const SfxUnoAnyItem* pItem = static_cast<const SfxUnoAnyItem*>(
+ pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL) );
+ if (pItem)
+ pItem->GetValue() >>= xStatusIndicator;
}
if ( SFX_CREATE_MODE_EMBEDDED == pDocShell->GetCreateMode() )
@@ -244,7 +242,7 @@ sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
xStatusIndicator->setValue(nSteps++);
nError = ReadThroughComponent( xInputStream, xModelComp,
- xServiceFactory, xInfoSet, "com.sun.star.comp.Math.XMLImporter", sal_False );
+ xServiceFactory, xInfoSet, "com.sun.star.comp.Math.XMLImporter", false );
}
if (xStatusIndicator.is())
@@ -263,10 +261,10 @@ sal_uLong SmXMLImportWrapper::ReadThroughComponent(
sal_Bool bEncrypted )
{
sal_uLong nError = ERRCODE_SFX_DOLOADFAILED;
- DBG_ASSERT(xInputStream.is(), "input stream missing");
- DBG_ASSERT(xModelComponent.is(), "document missing");
- DBG_ASSERT(rFactory.is(), "factory missing");
- DBG_ASSERT(NULL != pFilterName,"I need a service name for the component!");
+ OSL_ENSURE(xInputStream.is(), "input stream missing");
+ OSL_ENSURE(xModelComponent.is(), "document missing");
+ OSL_ENSURE(rFactory.is(), "factory missing");
+ OSL_ENSURE(NULL != pFilterName,"I need a service name for the component!");
// prepare ParserInputSrouce
xml::sax::InputSource aParserInput;
@@ -275,9 +273,9 @@ sal_uLong SmXMLImportWrapper::ReadThroughComponent(
// get parser
Reference< xml::sax::XParser > xParser(
rFactory->createInstance(
- OUString::createFromAscii("com.sun.star.xml.sax.Parser") ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) ),
UNO_QUERY );
- DBG_ASSERT( xParser.is(), "Can't create parser" );
+ OSL_ENSURE( xParser.is(), "Can't create parser" );
if ( !xParser.is() )
return nError;
@@ -289,7 +287,7 @@ sal_uLong SmXMLImportWrapper::ReadThroughComponent(
rFactory->createInstanceWithArguments(
OUString::createFromAscii(pFilterName), aArgs ),
UNO_QUERY );
- DBG_ASSERT( xFilter.is(), "Can't instantiate filter component." );
+ OSL_ENSURE( xFilter.is(), "Can't instantiate filter component." );
if ( !xFilter.is() )
return nError;
@@ -367,8 +365,8 @@ sal_uLong SmXMLImportWrapper::ReadThroughComponent(
Reference<beans::XPropertySet> & rPropSet,
const sal_Char* pFilterName )
{
- DBG_ASSERT(xStorage.is(), "Need storage!");
- DBG_ASSERT(NULL != pStreamName, "Please, please, give me a name!");
+ OSL_ENSURE(xStorage.is(), "Need storage!");
+ OSL_ENSURE(NULL != pStreamName, "Please, please, give me a name!");
// open stream (and set parser input)
OUString sStreamName = OUString::createFromAscii(pStreamName);
@@ -471,8 +469,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLImport_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
- // #110680#
- // return (cppu::OWeakObject*)new SmXMLImport(IMPORT_ALL);
return (cppu::OWeakObject*)new SmXMLImport(rSMgr, IMPORT_ALL);
}
@@ -495,8 +491,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLImportMeta_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
- // #110680#
- // return (cppu::OWeakObject*)new SmXMLImport( IMPORT_META );
return (cppu::OWeakObject*)new SmXMLImport( rSMgr, IMPORT_META );
}
@@ -519,8 +513,6 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLImportSettings_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
- // #110680#
- // return (cppu::OWeakObject*)new SmXMLImport( IMPORT_SETTINGS );
return (cppu::OWeakObject*)new SmXMLImport( rSMgr, IMPORT_SETTINGS );
}
@@ -596,8 +588,8 @@ void SmXMLImport::endDocument(void)
// Convert symbol names
SmParser &rParser = pDocShell->GetParser();
- sal_Bool bVal = rParser.IsImportSymbolNames();
- rParser.SetImportSymbolNames( sal_True );
+ bool bVal = rParser.IsImportSymbolNames();
+ rParser.SetImportSymbolNames( true );
SmNode *pTmpTree = rParser.Parse( aText );
aText = rParser.GetText();
delete pTmpTree;
@@ -605,7 +597,7 @@ void SmXMLImport::endDocument(void)
pDocShell->SetText( aText );
}
- DBG_ASSERT(pModel,"So there *was* a uno problem after all");
+ OSL_ENSURE(pModel,"So there *was* a uno problem after all");
bSuccess = sal_True;
}
@@ -926,62 +918,7 @@ public:
void SmXMLStyleContext_Impl::StartElement(const uno::Reference<
xml::sax::XAttributeList > & xAttrList )
{
-#if 1
aStyleHelper.RetrieveAttrs(xAttrList);
-#else
- sal_Int8 nOldIsBold=nIsBold;
- sal_Int8 nOldIsItalic=nIsItalic;
- double nOldFontSize=nFontSize;
- sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
- OUString sOldFontFamily = sFontFamily;
- for (sal_Int16 i=0;i<nAttrCount;i++)
- {
- OUString sAttrName = xAttrList->getNameByIndex(i);
- OUString aLocalName;
- sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
- GetKeyByAttrName(sAttrName,&aLocalName);
- OUString sValue = xAttrList->getValueByIndex(i);
- const SvXMLTokenMap &rAttrTokenMap =
- GetSmImport().GetPresLayoutAttrTokenMap();
- switch(rAttrTokenMap.Get(nPrefix,aLocalName))
- {
- case XML_TOK_FONTWEIGHT:
- nIsBold = sValue.equals(GetXMLToken(XML_BOLD));
- break;
- case XML_TOK_FONTSTYLE:
- nIsItalic = sValue.equals(GetXMLToken(XML_ITALIC));
- break;
- case XML_TOK_FONTSIZE:
- SvXMLUnitConverter::convertDouble(nFontSize,sValue);
- GetSmImport().GetMM100UnitConverter().
- setXMLMeasureUnit(MAP_POINT);
- if (-1 == sValue.indexOf(GetXMLToken(XML_UNIT_PT)))
- if (-1 == sValue.indexOf('%'))
- nFontSize=0.0;
- else
- {
- GetSmImport().GetMM100UnitConverter().
- setXMLMeasureUnit(MAP_RELATIVE);
- }
- break;
- case XML_TOK_FONTFAMILY:
- sFontFamily = sValue;
- break;
- case XML_TOK_COLOR:
- sColor = sValue;
- break;
- default:
- break;
- }
- }
-
- if ((nOldIsBold!=nIsBold) || (nOldIsItalic!=nIsItalic) ||
- (nOldFontSize!=nFontSize) || (sOldFontFamily!=sFontFamily)
- || sColor.getLength())
- bFontNodeNeeded=sal_True;
- else
- bFontNodeNeeded=sal_False;
-#endif
}
@@ -995,96 +932,7 @@ void SmXMLStyleContext_Impl::EndElement()
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
if (rNodeStack.Count() - nElementCount > 1)
SmXMLRowContext_Impl::EndElement();
-#if 1
aStyleHelper.ApplyAttrs();
-#else
- if (bFontNodeNeeded)
- {
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 5;
-
- if (nIsBold != -1)
- {
- if (nIsBold)
- aToken.eType = TBOLD;
- else
- aToken.eType = TNBOLD;
- SmStructureNode *pFontNode = static_cast<SmStructureNode *>
- (new SmFontNode(aToken));
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- if (nIsItalic != -1)
- {
- if (nIsItalic)
- aToken.eType = TITALIC;
- else
- aToken.eType = TNITALIC;
- SmStructureNode *pFontNode = static_cast<SmStructureNode *>
- (new SmFontNode(aToken));
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- if (nFontSize != 0.0)
- {
- aToken.eType = TSIZE;
- SmFontNode *pFontNode = new SmFontNode(aToken);
-
- if (MAP_RELATIVE == GetSmImport().GetMM100UnitConverter().
- getXMLMeasureUnit())
- {
- if (nFontSize < 100.00)
- pFontNode->SetSizeParameter(Fraction(100.00/nFontSize),
- FNTSIZ_DIVIDE);
- else
- pFontNode->SetSizeParameter(Fraction(nFontSize/100.00),
- FNTSIZ_MULTIPLY);
- }
- else
- pFontNode->SetSizeParameter(Fraction(nFontSize),FNTSIZ_ABSOLUT);
-
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- if (sFontFamily.getLength())
- {
- if (sFontFamily.equalsIgnoreCase(GetXMLToken(XML_FIXED)))
- aToken.eType = TFIXED;
- else if (sFontFamily.equalsIgnoreCase(OUString(
- RTL_CONSTASCII_USTRINGPARAM("sans"))))
- aToken.eType = TSANS;
- else if (sFontFamily.equalsIgnoreCase(OUString(
- RTL_CONSTASCII_USTRINGPARAM("serif"))))
- aToken.eType = TSERIF;
- else //Just give up, we need to extend our font mechanism to be
- //more general
- return;
-
- aToken.aText = sFontFamily;
- SmFontNode *pFontNode = new SmFontNode(aToken);
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- if (sColor.getLength())
- {
- //Again we can only handle a small set of colours in
- //StarMath for now.
- const SvXMLTokenMap& rTokenMap =
- GetSmImport().GetColorTokenMap();
- aToken.eType = static_cast<SmTokenType>(rTokenMap.Get(
- XML_NAMESPACE_MATH, sColor));
- if (aToken.eType != -1)
- {
- SmFontNode *pFontNode = new SmFontNode(aToken);
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- }
-
- }
-#endif
}
////////////////////////////////////////////////////////////
@@ -1614,7 +1462,7 @@ void SmXMLSubContext_Impl::GenericEndElement(SmTokenType eType, SmSubSup eSubSup
{
/*The <msub> element requires exactly 2 arguments.*/
const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
- DBG_ASSERT( bNodeCheck, "Sub has not two arguments" );
+ OSL_ENSURE( bNodeCheck, "Sub has not two arguments" );
if (!bNodeCheck)
return;
@@ -1676,7 +1524,7 @@ void SmXMLSubSupContext_Impl::GenericEndElement(SmTokenType eType,
{
/*The <msub> element requires exactly 3 arguments.*/
const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 3;
- DBG_ASSERT( bNodeCheck, "SubSup has not three arguments" );
+ OSL_ENSURE( bNodeCheck, "SubSup has not three arguments" );
if (!bNodeCheck)
return;
@@ -1727,7 +1575,7 @@ void SmXMLUnderContext_Impl::StartElement(const uno::Reference<
void SmXMLUnderContext_Impl::HandleAccent()
{
const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
- DBG_ASSERT( bNodeCheck, "Sub has not two arguments" );
+ OSL_ENSURE( bNodeCheck, "Sub has not two arguments" );
if (!bNodeCheck)
return;
@@ -1766,12 +1614,6 @@ void SmXMLUnderContext_Impl::EndElement()
GenericEndElement(TCSUB,CSUB);
else
HandleAccent();
-#if 0
- //UnderBrace trick
- SmStructureNode *pNode = rNodeStack.Pop();
- if (pNode->GetSubNode(1)->GetToken().cMathChar == (0x0332|0xf000))
- if (pNode->GetSubNode(0)->GetToken().cMathChar == (0x0332|0xf000))
-#endif
}
////////////////////////////////////////////////////////////
@@ -1811,7 +1653,7 @@ void SmXMLOverContext_Impl::EndElement()
void SmXMLOverContext_Impl::HandleAccent()
{
const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
- DBG_ASSERT( bNodeCheck, "Sub has not two arguments" );
+ OSL_ENSURE (bNodeCheck, "Sub has not two arguments");
if (!bNodeCheck)
return;
@@ -1853,13 +1695,13 @@ public:
class SmXMLMultiScriptsContext_Impl : public SmXMLSubSupContext_Impl
{
- sal_Bool bHasPrescripts;
+ bool bHasPrescripts;
public:
SmXMLMultiScriptsContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
const OUString& rLName) :
SmXMLSubSupContext_Impl(rImport,nPrefix,rLName),
- bHasPrescripts(sal_False) {}
+ bHasPrescripts(false) {}
void EndElement();
void MiddleElement();
@@ -2065,7 +1907,7 @@ SvXMLImportContext *SmXMLFlatDocContext_Impl::CreateChildContext(
////////////////////////////////////////////////////////////
-static __FAR_DATA SvXMLTokenMapEntry aPresLayoutElemTokenMap[] =
+static SvXMLTokenMapEntry aPresLayoutElemTokenMap[] =
{
{ XML_NAMESPACE_MATH, XML_SEMANTICS, XML_TOK_SEMANTICS },
{ XML_NAMESPACE_MATH, XML_MATH, XML_TOK_MATH },
@@ -2090,7 +1932,7 @@ static __FAR_DATA SvXMLTokenMapEntry aPresLayoutElemTokenMap[] =
XML_TOKEN_MAP_END
};
-static __FAR_DATA SvXMLTokenMapEntry aPresLayoutAttrTokenMap[] =
+static SvXMLTokenMapEntry aPresLayoutAttrTokenMap[] =
{
{ XML_NAMESPACE_MATH, XML_FONTWEIGHT, XML_TOK_FONTWEIGHT },
{ XML_NAMESPACE_MATH, XML_FONTSTYLE, XML_TOK_FONTSTYLE },
@@ -2100,27 +1942,27 @@ static __FAR_DATA SvXMLTokenMapEntry aPresLayoutAttrTokenMap[] =
XML_TOKEN_MAP_END
};
-static __FAR_DATA SvXMLTokenMapEntry aFencedAttrTokenMap[] =
+static SvXMLTokenMapEntry aFencedAttrTokenMap[] =
{
{ XML_NAMESPACE_MATH, XML_OPEN, XML_TOK_OPEN },
{ XML_NAMESPACE_MATH, XML_CLOSE, XML_TOK_CLOSE },
XML_TOKEN_MAP_END
};
-static __FAR_DATA SvXMLTokenMapEntry aOperatorAttrTokenMap[] =
+static SvXMLTokenMapEntry aOperatorAttrTokenMap[] =
{
{ XML_NAMESPACE_MATH, XML_STRETCHY, XML_TOK_STRETCHY },
XML_TOKEN_MAP_END
};
-static __FAR_DATA SvXMLTokenMapEntry aAnnotationAttrTokenMap[] =
+static SvXMLTokenMapEntry aAnnotationAttrTokenMap[] =
{
{ XML_NAMESPACE_MATH, XML_ENCODING, XML_TOK_ENCODING },
XML_TOKEN_MAP_END
};
-static __FAR_DATA SvXMLTokenMapEntry aPresElemTokenMap[] =
+static SvXMLTokenMapEntry aPresElemTokenMap[] =
{
{ XML_NAMESPACE_MATH, XML_ANNOTATION, XML_TOK_ANNOTATION },
{ XML_NAMESPACE_MATH, XML_MI, XML_TOK_MI },
@@ -2133,21 +1975,21 @@ static __FAR_DATA SvXMLTokenMapEntry aPresElemTokenMap[] =
XML_TOKEN_MAP_END
};
-static __FAR_DATA SvXMLTokenMapEntry aPresScriptEmptyElemTokenMap[] =
+static SvXMLTokenMapEntry aPresScriptEmptyElemTokenMap[] =
{
{ XML_NAMESPACE_MATH, XML_MPRESCRIPTS, XML_TOK_MPRESCRIPTS },
{ XML_NAMESPACE_MATH, XML_NONE, XML_TOK_NONE },
XML_TOKEN_MAP_END
};
-static __FAR_DATA SvXMLTokenMapEntry aPresTableElemTokenMap[] =
+static SvXMLTokenMapEntry aPresTableElemTokenMap[] =
{
{ XML_NAMESPACE_MATH, XML_MTR, XML_TOK_MTR },
{ XML_NAMESPACE_MATH, XML_MTD, XML_TOK_MTD },
XML_TOKEN_MAP_END
};
-static __FAR_DATA SvXMLTokenMapEntry aColorTokenMap[] =
+static SvXMLTokenMapEntry aColorTokenMap[] =
{
{ XML_NAMESPACE_MATH, XML_BLACK, TBLACK},
{ XML_NAMESPACE_MATH, XML_WHITE, TWHITE},
@@ -2239,8 +2081,6 @@ SvXMLImportContext *SmXMLDocContext_Impl::CreateChildContext(
const SvXMLTokenMap& rTokenMap = GetSmImport().GetPresLayoutElemTokenMap();
- //sal_uInt32 nTest = rTokenMap.Get(nPrefix, rLocalName);
-
switch(rTokenMap.Get(nPrefix, rLocalName))
{
//Consider semantics a dummy except for any starmath annotations
@@ -2364,7 +2204,7 @@ void SmXMLFracContext_Impl::EndElement()
{
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
const bool bNodeCheck = rNodeStack.Count() - nElementCount == 2;
- DBG_ASSERT( bNodeCheck, "Fraction (mfrac) tag is missing component" );
+ OSL_ENSURE( bNodeCheck, "Fraction (mfrac) tag is missing component" );
if (!bNodeCheck)
return;
@@ -2385,7 +2225,7 @@ void SmXMLRootContext_Impl::EndElement()
{
/*The <mroot> element requires exactly 2 arguments.*/
const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
- DBG_ASSERT( bNodeCheck, "Root tag is missing component" );
+ OSL_ENSURE( bNodeCheck, "Root tag is missing component");
if (!bNodeCheck)
return;
@@ -2622,10 +2462,12 @@ SvXMLImportContext *SmXMLMultiScriptsContext_Impl::CreateChildContext(
void SmXMLMultiScriptsContext_Impl::MiddleElement()
{
- bHasPrescripts=sal_True;
+ bHasPrescripts=true;
+
+ OSL_ENSURE( GetSmImport().GetNodeStack().Count() - nElementCount > 0,
+ "Sub has no arguments");
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- DBG_ASSERT( rNodeStack.Count() - nElementCount > 0, "Sub has no arguments" );
if (rNodeStack.Count()-nElementCount > 1)
{
SmToken aToken;
@@ -2655,7 +2497,6 @@ void SmXMLMultiScriptsContext_Impl::MiddleElement()
/*On each loop the base and its sub sup pair becomes the
base for the next loop to which the next sub sup pair is
attached, i.e. wheels within wheels*/
- //if (nCount == 0)
aSubNodes[0] = aReverseStack.Pop();
SmNode *pScriptNode = aReverseStack.Pop();
@@ -2809,7 +2650,6 @@ void SmXMLMultiScriptsContext_Impl::EndElement()
/*On each loop the base and its sub sup pair becomes the
base for the next loop to which the next sub sup pair is
attached, i.e. wheels within wheels*/
- //if (nCount == 0)
aSubNodes[0] = aReverseStack.Pop();
SmNode *pScriptNode = aReverseStack.Pop();
@@ -2851,8 +2691,8 @@ SvXMLImportContext *SmXMLImport::CreateContext(sal_uInt16 nPrefix,
{
uno::Reference<xml::sax::XDocumentHandler> xDocBuilder(
mxServiceFactory->createInstance(
- ::rtl::OUString::createFromAscii(
- "com.sun.star.xml.dom.SAXDocumentBuilder")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.xml.dom.SAXDocumentBuilder"))),
uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
GetModel(), uno::UNO_QUERY_THROW);
@@ -3120,7 +2960,6 @@ void SmXMLImport::SetViewSettings(const Sequence<PropertyValue>& aViewProps)
const PropertyValue *pValue = aViewProps.getConstArray();
long nTmp = 0;
- //sal_Bool bShowDeletes = sal_False, bShowInserts = sal_False, bShowFooter = sal_False, bShowHeader = sal_False;
for (sal_Int32 i = 0; i < nCount ; i++)
{
@@ -3186,8 +3025,7 @@ void SmXMLImport::SetConfigurationSettings(const Sequence<PropertyValue>& aConfP
}
catch( Exception& e)
{
- (void) e;
- DBG_ERROR( "SmXMLImport::SetConfigurationSettings: Exception!" );
+ OSL_FAIL( "SmXMLImport::SetConfigurationSettings: Exception!" );
}
}
@@ -3201,3 +3039,4 @@ void SmXMLImport::SetConfigurationSettings(const Sequence<PropertyValue>& aConfP
////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx
index fb397e87f736..db44e4a336ea 100755
--- a/starmath/source/mathmlimport.hxx
+++ b/starmath/source/mathmlimport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,7 +96,6 @@ class SmXMLImport : public SvXMLImport
String aText;
public:
- // #110680#
SmXMLImport(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
sal_uInt16 nImportFlags=IMPORT_ALL);
@@ -345,3 +345,4 @@ enum SmXMLAnnotationAttrTokenMap
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 0f73d7a2e753..970a6e475128 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,137 +29,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_starmath.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <mathtype.hxx>
-
-#ifndef _TOOLS_DEBUG_H
-#include <tools/debug.hxx>
-#endif
-
+#include <osl/diagnose.h>
#include <sfx2/docfile.hxx>
#define APPEND(str,ascii) str.AppendAscii(RTL_CONSTASCII_STRINGPARAM(ascii))
-#if 0
-String aEmbelList[21] =
-{
- " ",
- " ",
- "single dot",
- "double dot",
- "triple dot",
- "single prime",
- "double prime",
- "backwards prime (left of character)",
- "tilde",
- "hat (circumflex)",
- "diagonal slash through character",
- "right arrow",
- "left arrow",
- "double-headed arrow",
- "right single-barbed arrow",
- "left single-barbed arrow",
- "mid-height horizontal bar",
- "over-bar",
- "triple prime",
- "over-arc, concave downward",
- "over-arc, concave upward"
-};
-
-String aSelectorList[49] =
-{
- "angle brackets",
- "parentheses",
- "braces (curly brackets)",
- "square brackets",
- "vertical bars",
- "double vertical bars",
- "floor brackets",
- "ceiling brackets",
- "left brace, left brace",
- "right brace, right brace",
- "right brace, left brace",
- "left brace, right parenthesis",
- "left parenthesis, right brace",
- "radical",
- "fractions",
- "subscript/superscript",
- "underbar",
- "overbar",
- "left-pointing arrow",
- "right-pointing arrow",
- "left- and right-pointing arrow",
- "single integral",
- "double integral",
- "triple integral",
- "single summation-style integral",
- "double summation-style integral",
- "triple summation-style integral",
- "upper horizontal brace",
- "lower horizontal brace",
- "summation",
- "summation (integral-style limits)",
- "product",
- "product (integral-style limits)",
- "coproduct",
- "coproduct (integral-style limits)",
- "union",
- "union (integral-style limits)",
- "intersection",
- "intersection (integral-style limits)",
- "limit",
- "long division",
- "slash fractions",
- "big integral-style operators",
- "big summation-style operators",
- "leading sub- and superscripts",
- "Dirac delta",
- "under arrow",
- "over arrow",
- "over arc"
-};
-
-String aIntegralOpt[2] =
-{
- "fixed-size integral",
- "integral expands vertically to fit its contents"
-};
-
-String aFenceOpt[3] =
-{
- "center fence on math axis",
- "center fence on contents, place math axis of contents on math axis of containing line",
- "center fence on contents, center contents on math axis of containing line"
-};
-
-String aTypeFaces[12] =
-{
- "",
- "fnTEXT",
- "fnFUNCTION",
- "fnVARIABLE",
- "fnLCGREEK",
- "fnUCGREEK",
- "fnSYMBOL",
- "fnVECTOR",
- "fnNUMBER",
- "fnUSER1",
- "fnUSER2",
- "fnMTEXTRA"
-};
-
-String aSizes[7] =
-{
- "full",
- "subscript",
- "sub-subscript",
- "symbol",
- "sub-symbol",
- "user 1",
- "user 2"
-};
-#endif
-
static sal_Unicode Convert(sal_Unicode nIn)
{
//Find the best match in accepted unicode for our private area symbols
@@ -246,7 +122,7 @@ void MathType::Init()
sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
sal_uInt8 nTypeFace)
{
- sal_Bool bRet=sal_False;
+ bool bRet=false;
const char *pC = NULL;
switch(nChar)
{
@@ -280,56 +156,56 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=sal_True;
+ bRet=true;
}
break;
case 0x00fb:
if ((nVersion < 3) && (nTypeFace == 0x81))
nChar = 0xDF;
rRet.Append(nChar);
- bRet=sal_True;
+ bRet=true;
break;
case 'a':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3b1;
rRet.Append(nChar);
- bRet=sal_True;
+ bRet=true;
break;
case 'b':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3b2;
rRet.Append(nChar);
- bRet=sal_True;
+ bRet=true;
break;
case 'l':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3bb;
rRet.Append(nChar);
- bRet=sal_True;
+ bRet=true;
break;
case 'n':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3bd;
rRet.Append(nChar);
- bRet=sal_True;
+ bRet=true;
break;
case 'r':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3c1;
rRet.Append(nChar);
- bRet=sal_True;
+ bRet=true;
break;
case 'D':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x394;
rRet.Append(nChar);
- bRet=sal_True;
+ bRet=true;
break;
case 0xa9:
if ((nVersion < 3) && (nTypeFace == 0x82))
nChar = '\'';
rRet.Append(nChar);
- bRet=sal_True;
+ bRet=true;
break;
case 0x00f1:
if ((nVersion < 3) && (nTypeFace == 0x86))
@@ -337,7 +213,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=sal_True;
+ bRet=true;
}
break;
case 0x00a3:
@@ -346,7 +222,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=sal_True;
+ bRet=true;
}
break;
case 0x00de:
@@ -355,7 +231,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=sal_True;
+ bRet=true;
}
break;
case 0x0057:
@@ -364,7 +240,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=sal_True;
+ bRet=true;
}
break;
case 0x007b:
@@ -620,7 +496,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
break;
case 0xe083:
rRet.Append('+');
- bRet=sal_True;
+ bRet=true;
break;
case '^':
case 0xe091:
@@ -640,7 +516,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
break;
case 0xeb01: //no space
case 0xeb08: //normal space
- bRet=sal_True;
+ bRet=true;
break;
case 0xef04: //tiny space
case 0xef05: //tiny space
@@ -656,7 +532,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
break;
default:
rRet.Append(nChar);
- bRet=sal_True;
+ bRet=true;
break;
}
if (pC)
@@ -740,7 +616,7 @@ int MathType::Parse(SotStorage *pStor)
//sigh, theres no point! MathType (in some bizarre subvarient) pads
//the end of the formula with ENDs (0)'s
sal_uLong nEnd = pS->Tell();
- DBG_ASSERT(nEnd == pS->Seek(STREAM_SEEK_TO_END),
+ OSL_ENSURE(nEnd == pS->Seek(STREAM_SEEK_TO_END),
"Possibly unfully parsed formula");
# endif
#endif
@@ -761,7 +637,7 @@ static void lcl_PrependDummyTerm(String &rRet, xub_StrLen &rTextStart)
static void lcl_AppendDummyTerm(String &rRet)
{
- sal_Bool bOk=sal_False;
+ bool bOk=false;
for(int nI=rRet.Len()-1;nI >= 0; nI--)
{
xub_StrLen nIdx = sal::static_int_cast< xub_StrLen >(nI);
@@ -769,7 +645,7 @@ static void lcl_AppendDummyTerm(String &rRet)
if (nChar == ' ')
continue;
if (rRet.GetChar(nIdx) != '{')
- bOk=sal_True;
+ bOk=true;
break;
}
if (!bOk) //No term, use dummy
@@ -801,12 +677,12 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
sal_Char nChar8;
String sFontName;
int i,nRet=1,newline=0;
- sal_Bool bSilent=sal_False;
+ bool bSilent=false;
int nPart=0;
String sPush,sMainTerm;
int nSetSize=0,nSetAlign=0;
int nCurRow=0,nCurCol=0;
- sal_Bool bOpenString=sal_False;
+ bool bOpenString=false;
xub_StrLen nTextStart = 0;
xub_StrLen nSubSupStartPos = 0;
xub_StrLen nLastTemplateBracket=STRING_NOTFOUND;
@@ -828,12 +704,12 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
*/
if ((nRecord == CHAR) && (!bIsSilent) && (!bOpenString))
{
- bOpenString=sal_True;
+ bOpenString=true;
nTextStart = rRet.Len();
}
else if ((nRecord != CHAR) && (bOpenString))
{
- bOpenString=sal_False;
+ bOpenString=false;
if ((rRet.Len() - nTextStart) > 1)
{
String aStr;
@@ -862,8 +738,6 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
{
if (xfLMOVE(nTag))
HandleNudge();
- //if (xfLSPACE(nTag))
- //if (xfRULER(nTag))
if (newline>0)
APPEND(rRet,"\nnewline\n");
@@ -1408,19 +1282,19 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
nRet = HandleRecords(nLevel+1);
while (nSetSize)
{
- sal_Bool bOk=sal_False;
+ bool bOk=false;
xub_StrLen nI = rRet.SearchBackward('{');
if (nI != STRING_NOTFOUND)
{
for(nI=nI+1;nI<rRet.Len();nI++)
if (rRet.GetChar(nI) != ' ')
{
- bOk=sal_True;
+ bOk=true;
break;
}
}
else
- bOk=sal_True;
+ bOk=true;
if (bOk)
APPEND(rRet,"} ");
@@ -1533,19 +1407,19 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
((nVariation == 2) || (nVariation == 1)))
newline--;
- sal_Bool bOk=sal_False;
+ bool bOk=false;
xub_StrLen nI = rRet.SearchBackward('{');
if (nI != STRING_NOTFOUND)
{
for(nI=nI+1;nI<rRet.Len();nI++)
if (rRet.GetChar(nI) != ' ')
{
- bOk=sal_True;
+ bOk=true;
break;
}
}
else
- bOk=sal_True;
+ bOk=true;
if (bOk)
APPEND(rRet,"} ");
@@ -1827,7 +1701,7 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
default:
break;
}
- bSilent = sal_True; //Skip the optional brackets and/or
+ bSilent = true; //Skip the optional brackets and/or
//symbols that follow some of these
//records. Foo Data.
@@ -1874,7 +1748,7 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
*pS >> nTabType;
*pS >> nTabOffset;
}
- DBG_ASSERT(sal_False,"Not seen in the wild Equation Ruler Field");
+ OSL_ENSURE(false,"Not seen in the wild Equation Ruler Field");
break;
case FONT:
{
@@ -1972,12 +1846,6 @@ void MathType::HandleAlign(sal_uInt8 nHorAlign, sal_uInt8 /*nVAlign*/, int &rSet
APPEND(rRet,"alignr {");
break;
}
-#if 0
- switch(nVAlign)
- {
- }
- rSetAlign+=2;
-#endif
rSetAlign++;
}
@@ -1985,7 +1853,7 @@ void MathType::HandleAlign(sal_uInt8 nHorAlign, sal_uInt8 /*nVAlign*/, int &rSet
* indicator by mathtype file format*/
sal_Bool MathType::HandleSize(sal_Int16 nLstSize,sal_Int16 nDefSize, int &rSetSize)
{
- sal_Bool bRet=sal_False;
+ bool bRet=false;
if (nLstSize < 0)
{
if ((-nLstSize/32 != nDefaultSize) && (-nLstSize/32 != nCurSize))
@@ -1994,7 +1862,7 @@ sal_Bool MathType::HandleSize(sal_Int16 nLstSize,sal_Int16 nDefSize, int &rSetSi
{
rSetSize--;
rRet += '}';
- bRet=sal_True;
+ bRet=true;
}
if (-nLstSize/32 != nLastSize)
{
@@ -2002,7 +1870,7 @@ sal_Bool MathType::HandleSize(sal_Int16 nLstSize,sal_Int16 nDefSize, int &rSetSi
APPEND(rRet," size ");
rRet += String::CreateFromInt32(-nLstSize/32);
rRet += '{';
- bRet=sal_True;
+ bRet=true;
rSetSize++;
}
nCurSize = -nLstSize/32;
@@ -2017,14 +1885,13 @@ sal_Bool MathType::HandleSize(sal_Int16 nLstSize,sal_Int16 nDefSize, int &rSetSi
itself anyway in which case the size setting could be ignored*/
nLstSize = aSizeTable[nLstSize];
nLstSize = nLstSize + nDefSize;
- //if (nLstSize != nDefaultSize)
if (nLstSize != nCurSize)
{
if (rSetSize)
{
rSetSize--;
rRet += '}';
- bRet=sal_True;
+ bRet=true;
}
if (nLstSize != nLastSize)
{
@@ -2032,7 +1899,7 @@ sal_Bool MathType::HandleSize(sal_Int16 nLstSize,sal_Int16 nDefSize, int &rSetSi
APPEND(rRet," size ");
rRet += String::CreateFromInt32(nLstSize);
rRet += '{';
- bRet=sal_True;
+ bRet=true;
rSetSize++;
}
nCurSize = nLstSize;
@@ -2049,13 +1916,13 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium )
SvStream *pStream = rMedium.GetOutStream();
if ( pStream )
{
- SvStorageRef pStor = new SotStorage( pStream, sal_False );
+ SvStorageRef pStor = new SotStorage( pStream, false );
SvGlobalName aGName(0x0002ce02L, 0x0000, 0x0000,0xc0,0x00,
0x00,0x00,0x00,0x00,0x00,0x46 );
pStor->SetClass( aGName, 0, C2S("Microsoft Equation 3.0"));
- static sal_uInt8 __READONLY_DATA aCompObj[] = {
+ static sal_uInt8 const aCompObj[] = {
0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x02, 0xCE, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,
@@ -2073,7 +1940,7 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium )
SvStorageStreamRef xStor( pStor->OpenSotStream( C2S("\1CompObj")));
xStor->Write(aCompObj,sizeof(aCompObj));
- static sal_uInt8 __READONLY_DATA aOle[] = {
+ static sal_uInt8 const aOle[] = {
0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
@@ -2116,7 +1983,7 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium )
sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
{
- sal_Bool bRet=sal_False;
+ bool bRet=false;
switch(pNode->GetType())
{
case NATTRIBUT:
@@ -2297,7 +2164,6 @@ void MathType::HandleTable(SmNode *pNode,int nLevel)
void MathType::HandleRoot(SmNode *pNode,int nLevel)
{
- //sal_uInt16 nSize = pNode->GetNumSubNodes();
SmNode *pTemp;
*pS << sal_uInt8(TMPL); //Template
*pS << sal_uInt8(0x0D); //selector
@@ -2307,10 +2173,6 @@ void MathType::HandleRoot(SmNode *pNode,int nLevel)
*pS << sal_uInt8(0x00); //variation
*pS << sal_uInt8(0x00); //options
- /*
- if (pTemp = pNode->GetSubNode(1))
- HandleNodes(pTemp,nLevel+1);
- */
if (NULL != (pTemp = pNode->GetSubNode(2)))
{
*pS << sal_uInt8(LINE); //line
@@ -2397,7 +2259,6 @@ sal_uInt8 MathType::HandleCScript(SmNode *pNode,SmNode *pContent,int nLevel,
*/
void MathType::HandleSubSupScript(SmNode *pNode,int nLevel)
{
- //sal_uInt16 nSize = pNode->GetNumSubNodes();
SmNode *pTemp;
sal_uInt8 nVariation=0xff;
@@ -2443,10 +2304,7 @@ void MathType::HandleSubSupScript(SmNode *pNode,int nLevel)
if (NULL != (pTemp = pNode->GetSubNode(0)))
{
-// *pS << sal_uInt8(0x0A);
-// *pS << sal_uInt8(LINE);
HandleNodes(pTemp,nLevel+1);
-// *pS << sal_uInt8(END);
}
if (nVariation2 != 0xff)
@@ -2496,7 +2354,6 @@ void MathType::HandleSubSupScript(SmNode *pNode,int nLevel)
void MathType::HandleFractions(SmNode *pNode,int nLevel)
{
- //sal_uInt16 nSize = pNode->GetNumSubNodes();
SmNode *pTemp;
*pS << sal_uInt8(TMPL); //Template
*pS << sal_uInt8(0x0E); //selector
@@ -2521,7 +2378,6 @@ void MathType::HandleFractions(SmNode *pNode,int nLevel)
void MathType::HandleBrace(SmNode *pNode,int nLevel)
{
- //sal_uInt16 nSize = pNode->GetNumSubNodes();
SmNode *pTemp;
SmNode *pLeft=pNode->GetSubNode(0);
SmNode *pRight=pNode->GetSubNode(2);
@@ -2632,8 +2488,6 @@ void MathType::HandleVerticalBrace(SmNode *pNode,int nLevel)
void MathType::HandleOperator(SmNode *pNode,int nLevel)
{
- //sal_uInt16 nSize = pNode->GetNumSubNodes();
-
if (HandleLim(pNode,nLevel))
return;
@@ -2875,27 +2729,27 @@ int MathType::HandleTemplate(int nLevel,sal_uInt8 &rSelector,
*pS >> rSelector;
*pS >> rVariation;
*pS >> nOption;
- DBG_ASSERT(rSelector < 48,"Selector out of range");
+ OSL_ENSURE(rSelector < 48,"Selector out of range");
if ((rSelector >= 21) && (rSelector <=26))
{
- DBG_ASSERT(nOption < 2,"Option out of range");
+ OSL_ENSURE(nOption < 2,"Option out of range");
}
else if (/*(rSelector >= 0) &&*/ (rSelector <=12))
{
- DBG_ASSERT(nOption < 3,"Option out of range");
+ OSL_ENSURE(nOption < 3,"Option out of range");
}
//For the (broken) case where one subscript template ends, and there is
//another one after it, mathtype handles it as if the second one was
//inside the first one and renders it as sub of sub
- sal_Bool bRemove=sal_False;
+ bool bRemove=false;
if ( (rSelector == 0xf) && (rLastTemplateBracket != STRING_NOTFOUND) )
{
- bRemove=sal_True;
+ bRemove=true;
for (xub_StrLen nI = rLastTemplateBracket+1; nI < rRet.Len(); nI++ )
if (rRet.GetChar(nI) != ' ')
{
- bRemove=sal_False;
+ bRemove=false;
break;
}
}
@@ -2990,7 +2844,7 @@ void MathType::HandleEmblishments()
APPEND(rRet," breve ");
break;
default:
- DBG_ASSERT(nEmbel < 21,"Embel out of range");
+ OSL_ENSURE(nEmbel < 21,"Embel out of range");
break;
}
if (nVersion < 3)
@@ -3045,7 +2899,6 @@ int MathType::HandleChar(xub_StrLen &rTextStart,int &rSetSize,int nLevel,
*pS >> nChar;
/*
- ##912##
bad character, old mathtype < 3 has these
*/
if (nChar < 0x20)
@@ -3092,7 +2945,6 @@ int MathType::HandleChar(xub_StrLen &rTextStart,int &rSetSize,int nLevel,
if (!bSilent)
{
xub_StrLen nOldLen = rRet.Len();
- //nLastSize = nCurSize;
if (
HandleSize(nLSize,nDSize,rSetSize) ||
(nOldTypeFace != nTypeFace)
@@ -3136,7 +2988,7 @@ int MathType::HandleChar(xub_StrLen &rTextStart,int &rSetSize,int nLevel,
sal_Bool MathType::HandleLim(SmNode *pNode,int nLevel)
{
- sal_Bool bRet=0;
+ bool bRet=false;
//Special case for the "lim" option in StarMath
if ((pNode->GetToken().eType == TLIM)
|| (pNode->GetToken().eType == TLIMSUP)
@@ -3205,7 +3057,7 @@ sal_Bool MathType::HandleLim(SmNode *pNode,int nLevel)
}
HandleNodes(pNode->GetSubNode(1),nLevel+1);
//*pS << sal_uInt8(END); //options
- bRet = 1;
+ bRet = true;
}
}
return bRet;
@@ -3344,13 +3196,9 @@ void MathType::HandleMath(SmNode *pNode, int /*nLevel*/)
void MathType::HandleAttributes(SmNode *pNode,int nLevel)
{
int nOldPending = 0;
- //sal_uInt16 nSize = pNode->GetNumSubNodes();
SmNode *pTemp = 0;
SmTextNode *pIsText = 0;
- //SmTextNode *pTemp=(SmTextNode *)pNode;
- //for(int i=0;i<pTemp->GetText().Len();i++)
-
if (NULL != (pTemp = pNode->GetSubNode(0)))
{
pIsText = (SmTextNode *)pNode->GetSubNode(1);
@@ -3481,22 +3329,13 @@ void MathType::HandleText(SmNode *pNode, int /*nLevel*/)
}
else
*pS << sal_uInt8(CHAR);
- //*pS << sal_uInt8(CHAR|0x10); //char with formula recognition
-#if 1
sal_uInt8 nFace = 0x1;
if (pNode->GetFont().GetItalic() == ITALIC_NORMAL)
nFace = 0x3;
else if (pNode->GetFont().GetWeight() == WEIGHT_BOLD)
nFace = 0x7;
*pS << sal_uInt8(nFace+128); //typeface
-#else
- if ((pTemp->GetText().GetChar(i) >= '0') &&
- (pTemp->GetText().GetChar(i) <= '9'))
- *pS << sal_uInt8(0x8+128); //typeface
- else
- *pS << sal_uInt8(0x3+128); //typeface
-#endif
sal_uInt16 nChar = pTemp->GetText().GetChar(i);
*pS << Convert(nChar);
@@ -3530,4 +3369,4 @@ void MathType::HandleText(SmNode *pNode, int /*nLevel*/)
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx
index d39b0443753c..cfacad560290 100644
--- a/starmath/source/mathtype.hxx
+++ b/starmath/source/mathtype.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107,12 +108,12 @@ private:
sal_uInt8 nTag,sal_uInt8 nSelector,sal_uInt8 nVariation,
sal_Bool bSilent);
void HandleNudge();
- int xfLMOVE(sal_uInt8 nTest) {return nTest&0x80;}
- int xfAUTO(sal_uInt8 nTest) {return nTest&0x10;}
- int xfEMBELL(sal_uInt8 nTest) {return nTest&0x20;}
- int xfNULL(sal_uInt8 nTest) {return nTest&0x10;}
- int xfLSPACE(sal_uInt8 nTest) {return nTest&0x40;}
- int xfRULER(sal_uInt8 nTest) {return nTest&0x20;}
+ int xfLMOVE(sal_uInt8 nTest) const {return nTest&0x80;}
+ int xfAUTO(sal_uInt8 nTest) const {return nTest&0x10;}
+ int xfEMBELL(sal_uInt8 nTest) const {return nTest&0x20;}
+ int xfNULL(sal_uInt8 nTest) const {return nTest&0x10;}
+ int xfLSPACE(sal_uInt8 nTest) const {return nTest&0x40;}
+ int xfRULER(sal_uInt8 nTest) const {return nTest&0x20;}
sal_uInt8 HandleNodes(SmNode *pNode,int nLevel=0);
int StartTemplate(sal_uInt16 nSelector,sal_uInt16 nVariation=0);
@@ -172,3 +173,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index c4e731de932c..2a048a309ab8 100755..100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,6 +36,7 @@
#include "document.hxx"
#include "view.hxx"
#include "mathtype.hxx"
+#include "visitors.hxx"
#include <tools/gen.hxx>
#include <tools/fract.hxx>
@@ -51,9 +53,6 @@
#define APPEND(str,ascii) str.AppendAscii(RTL_CONSTASCII_STRINGPARAM(ascii))
-// define this to draw rectangles for debugging
-//#define SM_RECT_DEBUG
-
using ::rtl::OUString;
@@ -79,7 +78,7 @@ class SmTmpDevice
Color Impl_GetColor( const Color& rColor );
public:
- SmTmpDevice(OutputDevice &rTheDev, sal_Bool bUseMap100th_mm);
+ SmTmpDevice(OutputDevice &rTheDev, bool bUseMap100th_mm);
~SmTmpDevice() { rOutDev.Pop(); }
void SetFont(const Font &rNewFont);
@@ -92,14 +91,14 @@ public:
};
-SmTmpDevice::SmTmpDevice(OutputDevice &rTheDev, sal_Bool bUseMap100th_mm) :
+SmTmpDevice::SmTmpDevice(OutputDevice &rTheDev, bool bUseMap100th_mm) :
rOutDev(rTheDev)
{
rOutDev.Push( PUSH_FONT | PUSH_MAPMODE |
PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_TEXTCOLOR );
if (bUseMap100th_mm && MAP_100TH_MM != rOutDev.GetMapMode().GetMapUnit())
{
- DBG_ERROR( "incorrect MapMode?" );
+ OSL_FAIL( "incorrect MapMode?" );
rOutDev.SetMapMode( MAP_100TH_MM ); //Immer fuer 100% fomatieren
}
}
@@ -147,6 +146,8 @@ SmNode::SmNode(SmNodeType eNodeType, const SmToken &rNodeToken)
eScaleMode = SCALE_NONE;
aNodeToken = rNodeToken;
nAccIndex = -1;
+ SetSelected(false);
+ aParentNode = NULL;
}
@@ -155,9 +156,9 @@ SmNode::~SmNode()
}
-sal_Bool SmNode::IsVisible() const
+bool SmNode::IsVisible() const
{
- return sal_False;
+ return false;
}
@@ -185,7 +186,7 @@ SmNode * SmNode::GetLeftMost()
}
-void SmNode::SetPhantom(sal_Bool bIsPhantomP)
+void SmNode::SetPhantom(bool bIsPhantomP)
{
if (! (Flags() & FLG_VISIBLE))
bIsPhantom = bIsPhantomP;
@@ -269,7 +270,6 @@ void SmNode::SetFontSize(const Fraction &rSize, sal_uInt16 nType)
{
Fraction aVal (SmPtsTo100th_mm(rSize.GetNumerator()),
rSize.GetDenominator());
- //long nHeight = ::rtl::math::round(aVal);
long nHeight = (long)aVal;
aFntSize = GetFont().GetSize();
@@ -301,7 +301,7 @@ void SmNode::SetFontSize(const Fraction &rSize, sal_uInt16 nType)
}
// check the requested size against maximum value
- static int __READONLY_DATA nMaxVal = SmPtsTo100th_mm(128);
+ static int const nMaxVal = SmPtsTo100th_mm(128);
if (aFntSize.Height() > nMaxVal)
aFntSize.Height() = nMaxVal;
@@ -328,7 +328,7 @@ void SmNode::SetSize(const Fraction &rSize)
}
-void SmNode::SetRectHorAlign(RectHorAlign eHorAlign, sal_Bool bApplyToSubTree )
+void SmNode::SetRectHorAlign(RectHorAlign eHorAlign, bool bApplyToSubTree )
{
if (!(Flags() & FLG_HORALIGN))
eRectHorAlign = eHorAlign;
@@ -354,11 +354,11 @@ void SmNode::PrepareAttributes()
void SmNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
{
#if OSL_DEBUG_LEVEL > 1
- bIsDebug = sal_True;
+ bIsDebug = true;
#else
- bIsDebug = sal_False;
+ bIsDebug = false;
#endif
- bIsPhantom = sal_False;
+ bIsPhantom = false;
nFlags = 0;
nAttributes = 0;
@@ -369,8 +369,7 @@ void SmNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
}
GetFont() = rFormat.GetFont(FNT_MATH);
- //GetFont().SetCharSet(RTL_TEXTENCODING_SYMBOL);
- DBG_ASSERT( GetFont().GetCharSet() == RTL_TEXTENCODING_UNICODE,
+ OSL_ENSURE( GetFont().GetCharSet() == RTL_TEXTENCODING_UNICODE,
"unexpected CharSet" );
GetFont().SetWeight(WEIGHT_NORMAL);
GetFont().SetItalic(ITALIC_NONE);
@@ -389,7 +388,7 @@ void SmNode::ToggleDebug() const
{
SmNode *pThis = (SmNode *) this;
- pThis->bIsDebug = bIsDebug ? sal_False : sal_True;
+ pThis->bIsDebug = bIsDebug ? false : true;
SmNode *pNode;
sal_uInt16 nSize = GetNumSubNodes();
@@ -451,28 +450,6 @@ void SmNode::AdaptToY(const OutputDevice &/*rDev*/, sal_uLong /*nHeight*/)
}
-void SmNode::Draw(OutputDevice &rDev, const Point &rPosition) const
-{
- if (IsPhantom())
- return;
-
- const SmNode *pNode;
- sal_uInt16 nSize = GetNumSubNodes();
- for (sal_uInt16 i = 0; i < nSize; i++)
- if (NULL != (pNode = GetSubNode(i)))
- { Point aOffset (pNode->GetTopLeft() - GetTopLeft());
- pNode->Draw(rDev, rPosition + aOffset);
- }
-
-#ifdef SM_RECT_DEBUG
- if (!IsDebug())
- return;
-
- int nRFlags = SM_RECT_CORE | SM_RECT_ITALIC | SM_RECT_LINES | SM_RECT_MID;
- SmRect::Draw(rDev, rPosition, nRFlags);
-#endif
-}
-
const SmNode * SmNode::FindTokenAt(sal_uInt16 nRow, sal_uInt16 nCol) const
// returns (first) ** visible ** (sub)node with the tokens text at
// position 'nRow', 'nCol'.
@@ -540,7 +517,7 @@ const SmNode * SmNode::FindRectClosestTo(const Point &rPoint) const
void SmNode::GetAccessibleText( String &/*rText*/ ) const
{
- DBG_ERROR( "SmNode: GetAccessibleText not overloaded" );
+ OSL_FAIL( "SmNode: GetAccessibleText not overloaded" );
}
const SmNode * SmNode::FindNodeWithAccessibleIndex(xub_StrLen nAccIdx) const
@@ -573,6 +550,99 @@ const SmNode * SmNode::FindNodeWithAccessibleIndex(xub_StrLen nAccIdx) const
return pResult;
}
+#ifdef DEBUG_ENABLE_DUMPASDOT
+void SmNode::DumpAsDot(std::ostream &out, String* label, int number, int& id, int parent) const
+{
+ //If this is the root start the file
+ if(number == -1){
+ out<<"digraph {"<<std::endl;
+ if(label){
+ out<<"labelloc = \"t\";"<<std::endl;
+ String eq(*label);
+ //CreateTextFromNode(eq);
+ eq.SearchAndReplaceAll(String::CreateFromAscii("\n"), String::CreateFromAscii(" "));
+ eq.SearchAndReplaceAll(String::CreateFromAscii("\\"), String::CreateFromAscii("\\\\"));
+ eq.SearchAndReplaceAll(String::CreateFromAscii("\""), String::CreateFromAscii("\\\""));
+ out<<"label= \"Equation: \\\"";
+ out<<ByteString( eq, RTL_TEXTENCODING_UTF8).GetBuffer();
+ out<<"\\\"\";"<<std::endl;
+ }
+ }
+
+ //Some how out<<(int)this; doesn't work... So we do this nasty workaround...
+ char strid[100];
+ sprintf(strid, "%i", id);
+
+ char strnr[100];
+ sprintf(strnr, "%i", number);
+
+ //Dump connection to this node
+ if( parent != -1 ){
+ char pid[100];
+ sprintf(pid, "%i", parent);
+ out<<"n"<<pid<<" -> n"<<strid<<" [label=\""<<strnr<<"\"];"<<std::endl;
+ //If doesn't have parent and isn't a rootnode:
+ } else if(number != -1) {
+ out<<"orphaned -> n"<<strid<<" [label=\""<<strnr<<"\"];"<<std::endl;
+ }
+
+ //Dump this node
+ out<<"n"<< strid<<" [label=\"";
+ switch( GetType() ) {
+ case NTABLE: out<<"SmTableNode"; break;
+ case NBRACE: out<<"SmBraceNode"; break;
+ case NBRACEBODY: out<<"SmBracebodyNode"; break;
+ case NOPER: out<<"SmOperNode"; break;
+ case NALIGN: out<<"SmAlignNode"; break;
+ case NATTRIBUT: out<<"SmAttributNode"; break;
+ case NFONT: out<<"SmFontNode"; break;
+ case NUNHOR: out<<"SmUnHorNode"; break;
+ case NBINHOR: out<<"SmBinHorNode"; break;
+ case NBINVER: out<<"SmBinVerNode"; break;
+ case NBINDIAGONAL: out<<"SmBinDiagonalNode"; break;
+ case NSUBSUP: out<<"SmSubSupNode"; break;
+ case NMATRIX: out<<"SmMatrixNode"; break;
+ case NPLACE: out<<"SmPlaceNode"; break;
+ case NTEXT:
+ out<<"SmTextNode: ";
+ out<< ByteString( ((SmTextNode*)this)->GetText(), RTL_TEXTENCODING_UTF8).GetBuffer();
+ break;
+ case NSPECIAL: out<<"SmSpecialNode"; break;
+ case NGLYPH_SPECIAL: out<<"SmGlyphSpecialNode"; break;
+ case NMATH:
+ out<<"SmMathSymbolNode: ";
+ out<< ByteString( ((SmMathSymbolNode*)this)->GetText(), RTL_TEXTENCODING_UTF8).GetBuffer();
+ break;
+ case NBLANK: out<<"SmBlankNode"; break;
+ case NERROR: out<<"SmErrorNode"; break;
+ case NLINE: out<<"SmLineNode"; break;
+ case NEXPRESSION: out<<"SmExpressionNode"; break;
+ case NPOLYLINE: out<<"SmPolyLineNode"; break;
+ case NROOT: out<<"SmRootNode"; break;
+ case NROOTSYMBOL: out<<"SmRootSymbolNode"; break;
+ case NRECTANGLE: out<<"SmRectangleNode"; break;
+ case NVERTICAL_BRACE: out<<"SmVerticalBraceNode"; break;
+ default:
+ out<<"Unknown Node";
+ }
+ out<<"\"";
+ if(IsSelected())
+ out<<", style=dashed";
+ out<<"];"<<std::endl;
+
+ //Dump subnodes
+ int myid = id;
+ const SmNode *pNode;
+ USHORT nSize = GetNumSubNodes();
+ for (USHORT i = 0; i < nSize; i++)
+ if (NULL != (pNode = GetSubNode(i)))
+ pNode->DumpAsDot(out, NULL, i, ++id, myid);
+
+ //If this is the root end the file
+ if( number == -1 )
+ out<<"}"<<std::endl;
+}
+#endif /* DEBUG_ENABLE_DUMPASDOT */
long SmNode::GetFormulaBaseline() const
{
@@ -597,6 +667,7 @@ SmStructureNode::SmStructureNode( const SmStructureNode &rNode ) :
SmNode *pNode = rNode.aSubNodes[i];
aSubNodes[i] = pNode ? new SmNode( *pNode ) : 0;
}
+ ClaimPaternity();
}
@@ -627,6 +698,8 @@ SmStructureNode & SmStructureNode::operator = ( const SmStructureNode &rNode )
aSubNodes[i] = pNode ? new SmNode( *pNode ) : 0;
}
+ ClaimPaternity();
+
return *this;
}
@@ -641,18 +714,21 @@ void SmStructureNode::SetSubNodes(SmNode *pFirst, SmNode *pSecond, SmNode *pThir
aSubNodes[1] = pSecond;
if (pThird)
aSubNodes[2] = pThird;
+
+ ClaimPaternity();
}
void SmStructureNode::SetSubNodes(const SmNodeArray &rNodeArray)
{
aSubNodes = rNodeArray;
+ ClaimPaternity();
}
-sal_Bool SmStructureNode::IsVisible() const
+bool SmStructureNode::IsVisible() const
{
- return sal_False;
+ return false;
}
@@ -679,8 +755,6 @@ void SmStructureNode::GetAccessibleText( String &rText ) const
if (pNode->IsVisible())
((SmStructureNode *) pNode)->nAccIndex = rText.Len();
pNode->GetAccessibleText( rText );
-// if (rText.Len() && ' ' != rText.GetChar( rText.Len() - 1 ))
-// rText += String::CreateFromAscii( " " );
}
}
}
@@ -688,9 +762,9 @@ void SmStructureNode::GetAccessibleText( String &rText ) const
///////////////////////////////////////////////////////////////////////////
-sal_Bool SmVisibleNode::IsVisible() const
+bool SmVisibleNode::IsVisible() const
{
- return sal_True;
+ return true;
}
@@ -775,7 +849,6 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{ if (NULL != (pNode = GetSubNode(i)))
{ const SmRect &rNodeRect = pNode->GetRect();
const SmNode *pCoNode = pNode->GetLeftMost();
- //SmTokenType eType = pCoNode->GetToken().eType;
RectHorAlign eHorAlign = pCoNode->GetRectHorAlign();
aPos = rNodeRect.AlignTo(*this, RP_BOTTOM,
@@ -844,7 +917,7 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
if (NULL != (pNode = GetSubNode(i)))
pNode->Arrange(rDev, rFormat);
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
if (nSize < 1)
@@ -898,7 +971,7 @@ void SmExpressionNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat
// copy alignment of leftmost subnode if any
SmNode *pNode = GetLeftMost();
if (pNode)
- SetRectHorAlign(pNode->GetRectHorAlign(), sal_False);
+ SetRectHorAlign(pNode->GetRectHorAlign(), false);
}
@@ -907,12 +980,12 @@ void SmExpressionNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat
void SmUnHorNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
- sal_Bool bIsPostfix = GetToken().eType == TFACT;
+ bool bIsPostfix = GetToken().eType == TFACT;
SmNode *pOper = GetSubNode(bIsPostfix ? 1 : 0),
*pBody = GetSubNode(bIsPostfix ? 0 : 1);
- DBG_ASSERT(pOper, "Sm: NULL pointer");
- DBG_ASSERT(pBody, "Sm: NULL pointer");
+ OSL_ENSURE(pOper, "Sm: NULL pointer");
+ OSL_ENSURE(pBody, "Sm: NULL pointer");
pOper->SetSize(Fraction (rFormat.GetRelSize(SIZ_OPERATOR), 100));
pOper->Arrange(rDev, rFormat);
@@ -950,8 +1023,8 @@ void SmRootNode::GetHeightVerOffset(const SmRect &rRect,
rVerOffset = (rRect.GetBottom() - rRect.GetAlignB()) / 2;
rHeight = rRect.GetHeight() - rVerOffset;
- DBG_ASSERT(rHeight >= 0, "Sm : Ooops...");
- DBG_ASSERT(rVerOffset >= 0, "Sm : Ooops...");
+ OSL_ENSURE(rHeight >= 0, "Sm : Ooops...");
+ OSL_ENSURE(rVerOffset >= 0, "Sm : Ooops...");
}
@@ -987,8 +1060,8 @@ void SmRootNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SmNode *pExtra = GetSubNode(0),
*pRootSym = GetSubNode(1),
*pBody = GetSubNode(2);
- DBG_ASSERT(pRootSym, "Sm: NULL pointer");
- DBG_ASSERT(pBody, "Sm: NULL pointer");
+ OSL_ENSURE(pRootSym, "Sm: NULL pointer");
+ OSL_ENSURE(pBody, "Sm: NULL pointer");
pBody->Arrange(rDev, rFormat);
@@ -1021,7 +1094,7 @@ void SmRootNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SmRect::operator = (*pBody);
ExtendBy(*pRootSym, RCP_THIS);
if (pExtra)
- ExtendBy(*pExtra, RCP_THIS, (sal_Bool) sal_True);
+ ExtendBy(*pExtra, RCP_THIS, true);
}
@@ -1047,9 +1120,9 @@ void SmBinHorNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SmNode *pLeft = GetSubNode(0),
*pOper = GetSubNode(1),
*pRight = GetSubNode(2);
- DBG_ASSERT(pLeft != NULL, "Sm: NULL pointer");
- DBG_ASSERT(pOper != NULL, "Sm: NULL pointer");
- DBG_ASSERT(pRight != NULL, "Sm: NULL pointer");
+ OSL_ENSURE(pLeft != NULL, "Sm: NULL pointer");
+ OSL_ENSURE(pOper != NULL, "Sm: NULL pointer");
+ OSL_ENSURE(pRight != NULL, "Sm: NULL pointer");
pOper->SetSize(Fraction (rFormat.GetRelSize(SIZ_OPERATOR), 100));
@@ -1086,11 +1159,11 @@ void SmBinVerNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SmNode *pNum = GetSubNode(0),
*pLine = GetSubNode(1),
*pDenom = GetSubNode(2);
- DBG_ASSERT(pNum, "Sm : NULL pointer");
- DBG_ASSERT(pLine, "Sm : NULL pointer");
- DBG_ASSERT(pDenom, "Sm : NULL pointer");
+ OSL_ENSURE(pNum, "Sm : NULL pointer");
+ OSL_ENSURE(pLine, "Sm : NULL pointer");
+ OSL_ENSURE(pDenom, "Sm : NULL pointer");
- sal_Bool bIsTextmode = rFormat.IsTextmode();
+ bool bIsTextmode = rFormat.IsTextmode();
if (bIsTextmode)
{
Fraction aFraction(rFormat.GetRelSize(SIZ_INDEX), 100);
@@ -1141,7 +1214,6 @@ void SmBinVerNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmBinVerNode::CreateTextFromNode(String &rText)
{
SmNode *pNum = GetSubNode(0),
- // *pLine = GetSubNode(1),
*pDenom = GetSubNode(2);
pNum->CreateTextFromNode(rText);
APPEND(rText,"over ");
@@ -1166,14 +1238,14 @@ double Det(const Point &rHeading1, const Point &rHeading2)
}
-sal_Bool IsPointInLine(const Point &rPoint1,
+bool IsPointInLine(const Point &rPoint1,
const Point &rPoint2, const Point &rHeading2)
- // ergibt sal_True genau dann, wenn der Punkt 'rPoint1' zu der Gerade gehoert die
+ // ergibt true genau dann, wenn der Punkt 'rPoint1' zu der Gerade gehoert die
// durch den Punkt 'rPoint2' geht und den Richtungsvektor 'rHeading2' hat
{
- DBG_ASSERT(rHeading2 != Point(), "Sm : 0 vector");
+ OSL_ENSURE(rHeading2 != Point(), "Sm : 0 vector");
- sal_Bool bRes = sal_False;
+ bool bRes = false;
const double eps = 5.0 * DBL_EPSILON;
double fLambda;
@@ -1196,8 +1268,8 @@ sal_uInt16 GetLineIntersectionPoint(Point &rResult,
const Point& rPoint1, const Point &rHeading1,
const Point& rPoint2, const Point &rHeading2)
{
- DBG_ASSERT(rHeading1 != Point(), "Sm : 0 vector");
- DBG_ASSERT(rHeading2 != Point(), "Sm : 0 vector");
+ OSL_ENSURE(rHeading1 != Point(), "Sm : 0 vector");
+ OSL_ENSURE(rHeading2 != Point(), "Sm : 0 vector");
sal_uInt16 nRes = 1;
const double eps = 5.0 * DBL_EPSILON;
@@ -1228,7 +1300,7 @@ sal_uInt16 GetLineIntersectionPoint(Point &rResult,
SmBinDiagonalNode::SmBinDiagonalNode(const SmToken &rNodeToken)
: SmStructureNode(NBINDIAGONAL, rNodeToken)
{
- bAscending = sal_False;
+ bAscending = false;
SetNumSubNodes(3);
}
@@ -1368,17 +1440,17 @@ void SmBinDiagonalNode::Arrange(const OutputDevice &rDev, const SmFormat &rForma
//! (vgl SmRootNode)
SmNode *pLeft = GetSubNode(0),
*pRight = GetSubNode(1);
- DBG_ASSERT(pLeft, "Sm : NULL pointer");
- DBG_ASSERT(pRight, "Sm : NULL pointer");
+ OSL_ENSURE(pLeft, "Sm : NULL pointer");
+ OSL_ENSURE(pRight, "Sm : NULL pointer");
- DBG_ASSERT(GetSubNode(2)->GetType() == NPOLYLINE, "Sm : falscher Nodetyp");
+ OSL_ENSURE(GetSubNode(2)->GetType() == NPOLYLINE, "Sm : wrong node type");
SmPolyLineNode *pOper = (SmPolyLineNode *) GetSubNode(2);
- DBG_ASSERT(pOper, "Sm : NULL pointer");
+ OSL_ENSURE(pOper, "Sm : NULL pointer");
//! some routines being called extract some info from the OutputDevice's
//! font (eg the space to be used for borders OR the font name(!!)).
//! Thus the font should reflect the needs and has to be set!
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
pLeft->Arrange(aTmpDev, rFormat);
@@ -1430,11 +1502,11 @@ void SmBinDiagonalNode::Arrange(const OutputDevice &rDev, const SmFormat &rForma
void SmSubSupNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
- DBG_ASSERT(GetNumSubNodes() == 1 + SUBSUP_NUM_ENTRIES,
- "Sm: falsche Anzahl von subnodes");
+ OSL_ENSURE(GetNumSubNodes() == 1 + SUBSUP_NUM_ENTRIES,
+ "Sm: wrong number of subnodes");
SmNode *pBody = GetBody();
- DBG_ASSERT(pBody, "Sm: NULL pointer");
+ OSL_ENSURE(pBody, "Sm: NULL pointer");
long nOrigHeight = pBody->GetFont().GetSize().Height();
@@ -1479,7 +1551,7 @@ void SmSubSupNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
pSubSup->Arrange(rDev, rFormat);
- sal_Bool bIsTextmode = rFormat.IsTextmode();
+ bool bIsTextmode = rFormat.IsTextmode();
nDist = 0;
//! be sure that CSUB, CSUP are handled before the other cases!
@@ -1527,12 +1599,12 @@ void SmSubSupNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
aPos.Y() -= nDist;
break;
default :
- DBG_ASSERT(sal_False, "Sm: unbekannter Fall");
+ OSL_ENSURE(false, "Sm: unknown case");
break;
}
pSubSup->MoveTo(aPos);
- ExtendBy(*pSubSup, RCP_THIS, (sal_Bool) sal_True);
+ ExtendBy(*pSubSup, RCP_THIS, true);
// update rectangle to which RSUB, RSUP, LSUB, LSUP
// will be aligned to
@@ -1639,13 +1711,13 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SmNode *pLeft = GetSubNode(0),
*pBody = GetSubNode(1),
*pRight = GetSubNode(2);
- DBG_ASSERT(pLeft, "Sm: NULL pointer");
- DBG_ASSERT(pBody, "Sm: NULL pointer");
- DBG_ASSERT(pRight, "Sm: NULL pointer");
+ OSL_ENSURE(pLeft, "Sm: NULL pointer");
+ OSL_ENSURE(pBody, "Sm: NULL pointer");
+ OSL_ENSURE(pRight, "Sm: NULL pointer");
pBody->Arrange(rDev, rFormat);
- sal_Bool bIsScaleNormal = rFormat.IsScaleNormalBrackets(),
+ bool bIsScaleNormal = rFormat.IsScaleNormalBrackets(),
bScale = pBody->GetHeight() > 0 &&
(GetScaleMode() == SCALE_HEIGHT || bIsScaleNormal),
bIsABS = GetToken().eType == TABS;
@@ -1681,8 +1753,8 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
if (bScale)
{
Size aTmpSize (pLeft->GetFont().GetSize());
- DBG_ASSERT(pRight->GetFont().GetSize() == aTmpSize,
- "Sm : unterschiedliche Fontgroessen");
+ OSL_ENSURE(pRight->GetFont().GetSize() == aTmpSize,
+ "Sm : different font sizes");
aTmpSize.Width() = Min((long) nBraceHeight * 60L / 100L,
rFormat.GetBaseSize().Height() * 3L / 2L);
// correction factor since change from StarMath to OpenSymbol font
@@ -1749,7 +1821,7 @@ void SmBracebodyNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
nBodyHeight = aRefRect.GetHeight();
// scale separators to required height and arrange them
- sal_Bool bScale = GetScaleMode() == SCALE_HEIGHT || rFormat.IsScaleNormalBrackets();
+ bool bScale = GetScaleMode() == SCALE_HEIGHT || rFormat.IsScaleNormalBrackets();
long nHeight = bScale ? aRefRect.GetHeight() : GetFont().GetSize().Height();
sal_uInt16 nIndex = GetScaleMode() == SCALE_HEIGHT ?
DIS_BRACKETSIZE : DIS_NORMALBRACKETSIZE;
@@ -1771,7 +1843,7 @@ void SmBracebodyNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SmRect::operator = (*pLeft);
for (i = 1; i < nNumSubNodes; i++)
{
- sal_Bool bIsSeparator = i % 2 != 0;
+ bool bIsSeparator = i % 2 != 0;
RectVerAlign eVerAlign = bIsSeparator ? RVA_CENTERY : RVA_BASELINE;
SmNode *pRight = GetSubNode(i);
@@ -1795,11 +1867,11 @@ void SmVerticalBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFor
SmNode *pBody = GetSubNode(0),
*pBrace = GetSubNode(1),
*pScript = GetSubNode(2);
- DBG_ASSERT(pBody, "Sm: NULL pointer!");
- DBG_ASSERT(pBrace, "Sm: NULL pointer!");
- DBG_ASSERT(pScript, "Sm: NULL pointer!");
+ OSL_ENSURE(pBody, "Sm: NULL pointer!");
+ OSL_ENSURE(pBrace, "Sm: NULL pointer!");
+ OSL_ENSURE(pScript, "Sm: NULL pointer!");
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
pBody->Arrange(aTmpDev, rFormat);
@@ -1854,12 +1926,12 @@ void SmVerticalBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFor
SmNode * SmOperNode::GetSymbol()
{
SmNode *pNode = GetSubNode(0);
- DBG_ASSERT(pNode, "Sm: NULL pointer!");
+ OSL_ENSURE(pNode, "Sm: NULL pointer!");
if (pNode->GetType() == NSUBSUP)
pNode = ((SmSubSupNode *) pNode)->GetBody();
- DBG_ASSERT(pNode, "Sm: NULL pointer!");
+ OSL_ENSURE(pNode, "Sm: NULL pointer!");
return pNode;
}
@@ -1897,8 +1969,8 @@ void SmOperNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SmNode *pOper = GetSubNode(0);
SmNode *pBody = GetSubNode(1);
- DBG_ASSERT(pOper, "Sm: Subnode fehlt");
- DBG_ASSERT(pBody, "Sm: Subnode fehlt");
+ OSL_ENSURE(pOper, "Sm: missing subnode");
+ OSL_ENSURE(pBody, "Sm: missing subnode");
SmNode *pSymbol = GetSymbol();
pSymbol->SetSize(Fraction(CalcSymbolHeight(*pSymbol, rFormat),
@@ -1926,7 +1998,7 @@ void SmOperNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmAlignNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// setzt im ganzen subtree (incl aktuellem node) das alignment
{
- DBG_ASSERT(GetNumSubNodes() > 0, "Sm: SubNode fehlt");
+ OSL_ENSURE(GetNumSubNodes() > 0, "Sm: missing subnode");
SmNode *pNode = GetSubNode(0);
@@ -1954,8 +2026,8 @@ void SmAttributNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
SmNode *pAttr = GetSubNode(0),
*pBody = GetSubNode(1);
- DBG_ASSERT(pBody, "Sm: Body fehlt");
- DBG_ASSERT(pAttr, "Sm: Attribut fehlt");
+ OSL_ENSURE(pBody, "Sm: body missing");
+ OSL_ENSURE(pAttr, "Sm: attribute missing");
pBody->Arrange(rDev, rFormat);
@@ -1984,7 +2056,7 @@ void SmAttributNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
pAttr->MoveTo(aPos);
SmRect::operator = (*pBody);
- ExtendBy(*pAttr, RCP_THIS, (sal_Bool) sal_True);
+ ExtendBy(*pAttr, RCP_THIS, true);
}
@@ -2108,7 +2180,7 @@ void SmFontNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
SmNode *pNode = GetSubNode(1);
- DBG_ASSERT(pNode, "Sm: SubNode fehlt");
+ OSL_ENSURE(pNode, "Sm: missing subnode");
switch (GetToken().eType)
{ case TSIZE :
@@ -2121,7 +2193,7 @@ void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
break;
case TUNKNOWN : break; // no assertion on "font <?> <?>"
- case TPHANTOM : SetPhantom(sal_True); break;
+ case TPHANTOM : SetPhantom(true); break;
case TBOLD : SetAttribut(ATTR_BOLD); break;
case TITALIC : SetAttribut(ATTR_ITALIC); break;
case TNBOLD : ClearAttribut(ATTR_BOLD); break;
@@ -2137,7 +2209,7 @@ void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
case TYELLOW : SetColor(Color(COL_YELLOW)); break;
default:
- DBG_ASSERT(sal_False, "Sm: unbekannter Fall");
+ OSL_ENSURE(false, "Sm: unknown case");
}
pNode->Arrange(rDev, rFormat);
@@ -2182,7 +2254,7 @@ void SmPolyLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
//! some routines being called extract some info from the OutputDevice's
//! font (eg the space to be used for borders OR the font name(!!)).
//! Thus the font should reflect the needs and has to be set!
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
long nBorderwidth = GetFont().GetBorderWidth();
@@ -2190,7 +2262,7 @@ void SmPolyLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
//
// Das Polygon mit den beiden Endpunkten bilden
//
- DBG_ASSERT(aPoly.GetSize() == 2, "Sm : falsche Anzahl von Punkten");
+ OSL_ENSURE(aPoly.GetSize() == 2, "Sm : wrong number of points");
Point aPointA, aPointB;
if (GetToken().eType == TWIDESLASH)
{
@@ -2201,7 +2273,7 @@ void SmPolyLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
else
{
- DBG_ASSERT(GetToken().eType == TWIDEBACKSLASH, "Sm : unerwartetes Token");
+ OSL_ENSURE(GetToken().eType == TWIDEBACKSLASH, "Sm : unexpected token");
aPointA.X() =
aPointA.Y() = nBorderwidth;
aPointB.X() = aToSize.Width() - nBorderwidth;
@@ -2218,36 +2290,6 @@ void SmPolyLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
-void SmPolyLineNode::Draw(OutputDevice &rDev, const Point &rPosition) const
-{
- if (IsPhantom())
- return;
-
- long nBorderwidth = GetFont().GetBorderWidth();
-
- LineInfo aInfo;
- aInfo.SetWidth(nWidth - 2 * nBorderwidth);
-
- Point aOffset (Point() - aPoly.GetBoundRect().TopLeft()
- + Point(nBorderwidth, nBorderwidth)),
- aPos (rPosition + aOffset);
- ((Polygon &) aPoly).Move(aPos.X(), aPos.Y());
-
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_False);
- aTmpDev.SetLineColor( GetFont().GetColor() );
-
- rDev.DrawPolyLine(aPoly, aInfo);
-
-#ifdef SM_RECT_DEBUG
- if (!IsDebug())
- return;
-
- int nRFlags = SM_RECT_CORE | SM_RECT_ITALIC | SM_RECT_LINES | SM_RECT_MID;
- SmRect::Draw(rDev, rPosition, nRFlags);
-#endif
-}
-
-
/**************************************************************************/
void SmRootSymbolNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong nWidth)
@@ -2264,49 +2306,6 @@ void SmRootSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
}
-void SmRootSymbolNode::Draw(OutputDevice &rDev, const Point &rPosition) const
-{
- if (IsPhantom())
- return;
-
- // draw root-sign itself
- SmMathSymbolNode::Draw(rDev, rPosition);
-
- SmTmpDevice aTmpDev( (OutputDevice &) rDev, sal_True );
- aTmpDev.SetFillColor(GetFont().GetColor());
- rDev.SetLineColor();
- aTmpDev.SetFont( GetFont() );
-
- // since the width is always unscaled it corresponds ot the _original_
- // _unscaled_ font height to be used, we use that to calculate the
- // bar height. Thus it is independent of the arguments height.
- // ( see display of sqrt QQQ versus sqrt stack{Q#Q#Q#Q} )
- long nBarHeight = GetWidth() * 7L / 100L;
- long nBarWidth = nBodyWidth + GetBorderWidth();
- Point aBarOffset( GetWidth(), +GetBorderWidth() );
- Point aBarPos( rPosition + aBarOffset );
-
- Rectangle aBar(aBarPos, Size( nBarWidth, nBarHeight) );
- //! avoid GROWING AND SHRINKING of drawn rectangle when constantly
- //! increasing zoomfactor.
- // This is done by shifting it's output-position to a point that
- // corresponds exactly to a pixel on the output device.
- Point aDrawPos( rDev.PixelToLogic(rDev.LogicToPixel(aBar.TopLeft())) );
- //aDrawPos.X() = aBar.Left(); //! don't change X position
- aBar.SetPos( aDrawPos );
-
- rDev.DrawRect( aBar );
-
-#ifdef SM_RECT_DEBUG
- if (!IsDebug())
- return;
-
- int nRFlags = SM_RECT_CORE | SM_RECT_ITALIC | SM_RECT_LINES | SM_RECT_MID;
- SmRect::Draw(rDev, rPosition, nRFlags);
-#endif
-}
-
-
/**************************************************************************/
@@ -2333,61 +2332,19 @@ void SmRectangleNode::Arrange(const OutputDevice &rDev, const SmFormat &/*rForma
if (nWidth == 0)
nWidth = nFontHeight / 3;
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
// add some borderspace
sal_uLong nTmpBorderWidth = GetFont().GetBorderWidth();
- //nWidth += nTmpBorderWidth;
nHeight += 2 * nTmpBorderWidth;
- //! use this method in order to have 'SmRect::HasAlignInfo() == sal_True'
+ //! use this method in order to have 'SmRect::HasAlignInfo() == true'
//! and thus having the attribut-fences updated in 'SmRect::ExtendBy'
SmRect::operator = (SmRect(nWidth, nHeight));
}
-void SmRectangleNode::Draw(OutputDevice &rDev, const Point &rPosition) const
-{
- if (IsPhantom())
- return;
-
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_False);
- aTmpDev.SetFillColor(GetFont().GetColor());
- rDev.SetLineColor();
- aTmpDev.SetFont(GetFont());
-
- sal_uLong nTmpBorderWidth = GetFont().GetBorderWidth();
-
- // get rectangle and remove borderspace
- Rectangle aTmp (AsRectangle() + rPosition - GetTopLeft());
- aTmp.Left() += nTmpBorderWidth;
- aTmp.Right() -= nTmpBorderWidth;
- aTmp.Top() += nTmpBorderWidth;
- aTmp.Bottom() -= nTmpBorderWidth;
-
- DBG_ASSERT(aTmp.GetHeight() > 0 && aTmp.GetWidth() > 0,
- "Sm: leeres Rechteck");
-
- //! avoid GROWING AND SHRINKING of drawn rectangle when constantly
- //! increasing zoomfactor.
- // This is done by shifting it's output-position to a point that
- // corresponds exactly to a pixel on the output device.
- Point aPos (rDev.PixelToLogic(rDev.LogicToPixel(aTmp.TopLeft())));
- aTmp.SetPos(aPos);
-
- rDev.DrawRect(aTmp);
-
-#ifdef SM_RECT_DEBUG
- if (!IsDebug())
- return;
-
- int nRFlags = SM_RECT_CORE | SM_RECT_ITALIC | SM_RECT_LINES | SM_RECT_MID;
- SmRect::Draw(rDev, rPosition, nRFlags);
-#endif
-}
-
-
/**************************************************************************/
@@ -2439,7 +2396,7 @@ void SmTextNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SIZ_FUNCTION : SIZ_TEXT;
GetFont() *= Fraction (rFormat.GetRelSize(nSizeDesc), 100);
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, aText, GetFont().GetBorderWidth()));
@@ -2447,17 +2404,17 @@ void SmTextNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmTextNode::CreateTextFromNode(String &rText)
{
- sal_Bool bQuoted=sal_False;
+ bool bQuoted=false;
if (GetToken().eType == TTEXT)
{
rText.Append('\"');
- bQuoted=sal_True;
+ bQuoted=true;
}
else
{
SmParser aParseTest;
SmNode *pTable = aParseTest.Parse(GetToken().aText);
- bQuoted=sal_True;
+ bQuoted=true;
if ( (pTable->GetType() == NTABLE) && (pTable->GetNumSubNodes() == 1) )
{
SmNode *pResult = pTable->GetSubNode(0);
@@ -2470,7 +2427,7 @@ void SmTextNode::CreateTextFromNode(String &rText)
{
pResult = pResult->GetSubNode(0);
if (pResult->GetType() == NTEXT)
- bQuoted=sal_False;
+ bQuoted=false;
}
}
}
@@ -2496,41 +2453,43 @@ void SmTextNode::CreateTextFromNode(String &rText)
rText.Append(' ');
}
-void SmTextNode::Draw(OutputDevice &rDev, const Point& rPosition) const
-{
- if (IsPhantom() || aText.Len() == 0 || aText.GetChar(0) == xub_Unicode('\0'))
- return;
-
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_False);
- aTmpDev.SetFont(GetFont());
-
- Point aPos (rPosition);
- aPos.Y() += GetBaselineOffset();
- // auf Pixelkoordinaten runden
- aPos = rDev.PixelToLogic( rDev.LogicToPixel(aPos) );
-
-#if OSL_DEBUG_LEVEL > 1
- sal_Int32 nPos = 0;
- sal_UCS4 cChar = OUString( aText ).iterateCodePoints( &nPos );
- (void) cChar;
-#endif
-
- rDev.DrawStretchText(aPos, GetWidth(), aText);
-
-#ifdef SM_RECT_DEBUG
- if (!IsDebug())
- return;
-
- int nRFlags = SM_RECT_CORE | SM_RECT_ITALIC | SM_RECT_LINES | SM_RECT_MID;
- SmRect::Draw(rDev, rPosition, nRFlags);
-#endif
-}
void SmTextNode::GetAccessibleText( String &rText ) const
{
rText += aText;
}
+void SmTextNode::AdjustFontDesc()
+{
+ if (GetToken().eType == TTEXT)
+ nFontDesc = FNT_TEXT;
+ else if(GetToken().eType == TFUNC)
+ nFontDesc = FNT_FUNCTION;
+ else {
+ SmTokenType nTok;
+ const SmTokenTableEntry *pEntry = SmParser::GetTokenTableEntry( aText );
+ if (pEntry && pEntry->nGroup == TGFUNCTION) {
+ nTok = pEntry->eType;
+ nFontDesc = FNT_FUNCTION;
+ } else {
+ sal_Unicode firstChar = aText.GetChar(0);
+ if( ('0' <= firstChar && firstChar <= '9') || firstChar == '.' || firstChar == ',') {
+ nFontDesc = FNT_NUMBER;
+ nTok = TNUMBER;
+ } else if (aText.Len() > 1) {
+ nFontDesc = FNT_VARIABLE;
+ nTok = TIDENT;
+ } else {
+ nFontDesc = FNT_VARIABLE;
+ nTok = TCHARACTER;
+ }
+ }
+ SmToken tok = GetToken();
+ tok.eType = nTok;
+ SetToken(tok);
+ }
+}
+
/**************************************************************************/
void SmMatrixNode::CreateTextFromNode(String &rText)
@@ -2602,7 +2561,7 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{ aLineRect = SmRect();
for (j = 0; j < nNumCols; j++)
{ SmNode *pTmpNode = GetSubNode(i * nNumCols + j);
- DBG_ASSERT(pTmpNode, "Sm: NULL pointer");
+ OSL_ENSURE(pTmpNode, "Sm: NULL pointer");
const SmRect &rNodeRect = pTmpNode->GetRect();
@@ -2687,7 +2646,7 @@ void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, sal_uLong nWidth)
aFntSize.Width() = nWidth;
GetFont().SetSize(aFntSize);
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
// get denominator of error factor for width
@@ -2716,14 +2675,14 @@ void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
aFntSize.Width() = rDev.GetFontMetric().GetSize().Width();
rDevNC.Pop();
}
- DBG_ASSERT(aFntSize.Width() != 0, "Sm: ");
+ OSL_ENSURE(aFntSize.Width() != 0, "Sm: ");
//! however the result is a bit better with 'nHeight' as initial
//! font height
aFntSize.Height() = nHeight;
GetFont().SetSize(aFntSize);
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
// get denominator of error factor for height
@@ -2746,9 +2705,9 @@ void SmMathSymbolNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocSh
// use same font size as is used for variables
GetFont().SetSize( rFormat.GetFont( FNT_VARIABLE ).GetSize() );
- DBG_ASSERT(GetFont().GetCharSet() == RTL_TEXTENCODING_SYMBOL ||
+ OSL_ENSURE(GetFont().GetCharSet() == RTL_TEXTENCODING_SYMBOL ||
GetFont().GetCharSet() == RTL_TEXTENCODING_UNICODE,
- "incorrect charset for character from StarMath/OpenSymbol font");
+ "wrong charset for character from StarMath/OpenSymbol font");
Flags() |= FLG_FONT | FLG_ITALIC;
};
@@ -2767,7 +2726,7 @@ void SmMathSymbolNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat
GetFont() *= Fraction (rFormat.GetRelSize(SIZ_TEXT), 100);
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, rText, GetFont().GetBorderWidth()));
@@ -2802,7 +2761,7 @@ void SmAttributNode::CreateTextFromNode(String &rText)
{
SmNode *pNode;
sal_uInt16 nSize = GetNumSubNodes();
- DBG_ASSERT(nSize == 2, "Node missing members");
+ OSL_ENSURE(nSize == 2, "Node missing members");
rText.Append('{');
sal_Unicode nLast=0;
if (NULL != (pNode = GetSubNode(0)))
@@ -2924,10 +2883,10 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell
if (bIsFromGreekSymbolSet)
{
- DBG_ASSERT( GetText().Len() == 1, "a symbol should only consist of 1 char!" );
+ OSL_ENSURE( GetText().Len() == 1, "a symbol should only consist of 1 char!" );
bool bItalic = false;
sal_Int16 nStyle = rFormat.GetGreekCharStyle();
- DBG_ASSERT( nStyle >= 0 && nStyle <= 2, "unexpected value for GreekCharStyle" );
+ OSL_ENSURE( nStyle >= 0 && nStyle <= 2, "unexpected value for GreekCharStyle" );
if (nStyle == 1)
bItalic = true;
else if (nStyle == 2)
@@ -2955,23 +2914,12 @@ void SmSpecialNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes();
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, GetText(), GetFont().GetBorderWidth()));
}
-
-void SmSpecialNode::Draw(OutputDevice &rDev, const Point& rPosition) const
-{
- //! since this chars might come from any font, that we may not have
- //! set to ALIGN_BASELINE yet, we do it now.
- ((SmSpecialNode *)this)->GetFont().SetAlign(ALIGN_BASELINE);
-
- SmTextNode::Draw(rDev, rPosition);
-}
-
-
/**************************************************************************/
@@ -2979,7 +2927,7 @@ void SmGlyphSpecialNode::Arrange(const OutputDevice &rDev, const SmFormat &rForm
{
PrepareAttributes();
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, GetText(),
@@ -3003,7 +2951,7 @@ void SmPlaceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes();
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, GetText(), GetFont().GetBorderWidth()));
@@ -3027,7 +2975,7 @@ void SmErrorNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes();
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
const XubString &rText = GetText();
@@ -3065,7 +3013,7 @@ void SmBlankNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
void SmBlankNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
// Abstand von der Fonthoehe abhaengig machen
@@ -3082,5 +3030,123 @@ void SmBlankNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SetWidth(nSpace);
}
+/**************************************************************************/
+//Implementation of all accept methods for SmVisitor
+
+void SmNode::Accept(SmVisitor*){
+ //This method is only implemented to avoid making SmNode abstract because an
+ //obscure copy constructor is used... I can't find it's implementation, and
+ //don't want to figure out how to fix it... If you want to, just delete this
+ //method, making SmNode abstract, and see where you can an problem with that.
+ j_assert(false, "SmNode should not be visitable!");
+}
+
+void SmTableNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmBraceNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmBracebodyNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmOperNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmAlignNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmAttributNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmFontNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmUnHorNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmBinHorNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmBinVerNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmBinDiagonalNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmSubSupNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmMatrixNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmPlaceNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmTextNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmSpecialNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmGlyphSpecialNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+void SmMathSymbolNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmBlankNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmErrorNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmLineNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmExpressionNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmPolyLineNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmRootNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmRootSymbolNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmRectangleNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+
+void SmVerticalBraceNode::Accept(SmVisitor* pVisitor) {
+ pVisitor->Visit(this);
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 4a85ccbaac56..3f7d8e35867b 100755..100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,13 +39,10 @@
#include <unotools/charclass.hxx>
#include <editeng/unolingu.hxx>
#include <unotools/syslocale.hxx>
+#include <sal/macros.h>
#include "parse.hxx"
-#ifndef _STARMATH_HRC
#include "starmath.hrc"
-#endif
-#ifndef _SMDLL_HXX
#include "smdll.hxx"
-#endif
#include "smmod.hxx"
#include "config.hxx"
@@ -55,7 +53,7 @@ using namespace ::com::sun::star::i18n;
///////////////////////////////////////////////////////////////////////////
-static inline sal_Bool strnccmp(const String &u1, xub_StrLen nIdx,
+static inline bool strnccmp(const String &u1, xub_StrLen nIdx,
const sal_Char *s2, xub_StrLen nLen)
{
return u1.EqualsIgnoreCaseAscii( s2, nIdx, nLen );
@@ -70,7 +68,7 @@ static const sal_Unicode aDelimiterTable[] =
};
-static inline sal_Bool IsDigit( sal_Unicode cChar )
+static inline bool IsDigit( sal_Unicode cChar )
{
return '0' <= cChar && cChar <= '9';
}
@@ -84,40 +82,24 @@ SmToken::SmToken() :
nGroup = nCol = nRow = nLevel = 0;
}
+SmToken::SmToken(SmTokenType eTokenType,
+ sal_Unicode cMath,
+ const sal_Char* pText,
+ sal_uLong nTokenGroup,
+ sal_uInt16 nTokenLevel) {
+ eType = eTokenType;
+ cMathChar = cMath;
+ aText.AssignAscii(pText);
+ nGroup = nTokenGroup;
+ nLevel = nTokenLevel;
+ nCol = nRow = 0;
+}
+
///////////////////////////////////////////////////////////////////////////
-struct SmTokenTableEntry
-{
- const sal_Char* pIdent;
- SmTokenType eType;
- sal_Unicode cMathChar;
- sal_uLong nGroup;
- sal_uInt16 nLevel;
-};
static const SmTokenTableEntry aTokenTable[] =
{
-// { "#", TPOUND, '\0', 0, 0 },
-// { "##", TDPOUND, '\0', 0, 0 },
-// { "&", TAND, MS_AND, TGPRODUCT, 0 },
-// { "(", TLPARENT, MS_LPARENT, TGLBRACES, 5 }, //! 5 to continue expression
-// { ")", TRPARENT, MS_RPARENT, TGRBRACES, 0 }, //! 0 to terminate expression
-// { "*", TMULTIPLY, MS_MULTIPLY, TGPRODUCT, 0 },
-// { "+", TPLUS, MS_PLUS, TGUNOPER | TGSUM, 5 },
-// { "+-", TPLUSMINUS, MS_PLUSMINUS, TGUNOPER | TGSUM, 5 },
-// { "-", TMINUS, MS_MINUS, TGUNOPER | TGSUM, 5 },
-// { "-+", TMINUSPLUS, MS_MINUSPLUS, TGUNOPER | TGSUM, 5 },
-// { ".", TPOINT, '\0', 0, 0 },
-// { "/", TDIVIDEBY, MS_SLASH, TGPRODUCT, 0 },
-// { "<", TLT, MS_LT, TGRELATION, 0 },
-// { "<<", TLL, MS_LL, TGRELATION, 0 },
-// { "<=", TLE, MS_LE, TGRELATION, 0 },
-// { "<>", TNEQ, MS_NEQ, TGRELATION, 0},
-// { "<?>", TPLACE, MS_PLACE, 0, 5 },
-// { "=", TASSIGN, MS_ASSIGN, TGRELATION, 0},
-// { ">", TGT, MS_GT, TGRELATION, 0 },
-// { ">=", TGE, MS_GE, TGRELATION, 0 },
-// { ">>", TGG, MS_GG, TGRELATION, 0 },
{ "Im" , TIM, MS_IM, TGSTANDALONE, 5 },
{ "MZ23", TDEBUG, '\0', TGATTRIBUT, 0 },
{ "Re" , TRE, MS_RE, TGSTANDALONE, 5 },
@@ -325,26 +307,15 @@ static const SmTokenTableEntry aTokenTable[] =
{ "widevec", TWIDEVEC, MS_VEC, TGATTRIBUT, 5},
{ "wp" , TWP, MS_WP, TGSTANDALONE, 5},
{ "yellow", TYELLOW, '\0', TGCOLOR, 0},
-// { "[", TLBRACKET, MS_LBRACKET, TGLBRACES, 5}, //! 5 to continue expression
-// { "\\", TESCAPE, '\0', 0, 5},
-// { "]", TRBRACKET, MS_RBRACKET, TGRBRACES, 0}, //! 0 to terminate expression
-// { "^", TRSUP, '\0', TGPOWER, 0},
-// { "_", TRSUB, '\0', TGPOWER, 0},
-// { "`", TSBLANK, '\0', TGBLANK, 5},
-// { "{", TLGROUP, MS_LBRACE, 0, 5}, //! 5 to continue expression
-// { "|", TOR, MS_OR, TGSUM, 0},
-// { "}", TRGROUP, MS_RBRACE, 0, 0}, //! 0 to terminate expression
-// { "~", TBLANK, '\0', TGBLANK, 5},
{ "", TEND, '\0', 0, 0}
};
-
-static const SmTokenTableEntry * GetTokenTableEntry( const String &rName )
+const SmTokenTableEntry * SmParser::GetTokenTableEntry( const String &rName )
{
const SmTokenTableEntry * pRes = 0;
if (rName.Len())
{
- sal_Int32 nEntries = sizeof( aTokenTable ) / sizeof( aTokenTable[0] );
+ sal_Int32 nEntries = SAL_N_ELEMENTS(aTokenTable);
for (sal_Int32 i = 0; i < nEntries; ++i)
{
if (rName.EqualsIgnoreCaseAscii( aTokenTable[i].pIdent ))
@@ -364,14 +335,14 @@ static const SmTokenTableEntry * GetTokenTableEntry( const String &rName )
#if OSL_DEBUG_LEVEL
-sal_Bool SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
- // returns 'sal_True' iff cChar is '\0' or a delimeter
+bool SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
+ // returns 'true' iff cChar is '\0' or a delimeter
{
- DBG_ASSERT( nPos <= rTxt.Len(), "index out of range" );
+ OSL_ENSURE( nPos <= rTxt.Len(), "index out of range" );
sal_Unicode cChar = rTxt.GetChar( nPos );
if(!cChar)
- return sal_True;
+ return true;
// check if 'cChar' is in the delimeter table
const sal_Unicode *pDelim = &aDelimiterTable[0];
@@ -379,11 +350,11 @@ sal_Bool SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
if (*pDelim == cChar)
break;
- sal_Bool bIsDelim = *pDelim != 0;
sal_Int16 nTypJp = SM_MOD()->GetSysLocale().GetCharClass().getType( rTxt, nPos );
- bIsDelim |= nTypJp == com::sun::star::i18n::UnicodeType::SPACE_SEPARATOR ||
- nTypJp == com::sun::star::i18n::UnicodeType::CONTROL;
+ bool bIsDelim = (*pDelim != 0 ||
+ nTypJp == com::sun::star::i18n::UnicodeType::SPACE_SEPARATOR ||
+ nTypJp == com::sun::star::i18n::UnicodeType::CONTROL);
return bIsDelim;
}
@@ -402,7 +373,7 @@ void SmParser::Insert(const String &rText, sal_uInt16 nPos)
void SmParser::Replace( sal_uInt16 nPos, sal_uInt16 nLen, const String &rText )
{
- DBG_ASSERT( nPos + nLen <= m_aBufferString.Len(), "argument mismatch" );
+ OSL_ENSURE( nPos + nLen <= m_aBufferString.Len(), "argument mismatch" );
m_aBufferString.Replace( nPos, nLen, rText );
sal_Int16 nChg = rText.Len() - nLen;
@@ -437,8 +408,8 @@ void SmParser::NextToken()
xub_StrLen nBufLen = m_aBufferString.Len();
ParseResult aRes;
xub_StrLen nRealStart;
- sal_Bool bCont;
- sal_Bool bNumStart = sal_False;
+ bool bCont;
+ bool bNumStart = false;
CharClass aCC(SM_MOD()->GetSysLocale().GetCharClass().getLocale());
do
{
@@ -450,15 +421,6 @@ void SmParser::NextToken()
sal_Int32 nStartFlags = coStartFlags;
sal_Int32 nContFlags = coContFlags;
sal_Unicode cFirstChar = m_aBufferString.GetChar( m_nBufferIndex );
-/*
- removed because of #i11752#
- bNumStart = cFirstChar == '.' || ('0' <= cFirstChar && cFirstChar <= '9');
- if (bNumStart)
- {
- nStartFlags = coNumStartFlags;
- nContFlags = coNumContFlags;
- }
-*/
aRes = aCC.parseAnyToken( m_aBufferString, m_nBufferIndex,
nStartFlags, aEmptyStr,
nContFlags, aEmptyStr );
@@ -487,7 +449,7 @@ void SmParser::NextToken()
nRealStart = m_nBufferIndex + sal::static_int_cast< xub_StrLen >(aRes.LeadingWhiteSpace);
m_nBufferIndex = nRealStart;
- bCont = sal_False;
+ bCont = false;
if ( aRes.TokenType == 0 &&
nRealStart < nBufLen &&
'\n' == m_aBufferString.GetChar( nRealStart ) )
@@ -495,7 +457,7 @@ void SmParser::NextToken()
// keep data needed for tokens row and col entry up to date
++m_Row;
m_nBufferIndex = m_nColOff = nRealStart + 1;
- bCont = sal_True;
+ bCont = true;
}
else if (aRes.TokenType & KParseType::ONE_SINGLE_CHAR)
{
@@ -507,7 +469,7 @@ void SmParser::NextToken()
while (m_nBufferIndex < nBufLen &&
'\n' != m_aBufferString.GetChar( m_nBufferIndex ))
++m_nBufferIndex;
- bCont = sal_True;
+ bCont = true;
}
}
@@ -519,7 +481,7 @@ void SmParser::NextToken()
m_aCurToken.nRow = m_Row;
m_aCurToken.nCol = nRealStart - m_nColOff + 1;
- sal_Bool bHandled = sal_True;
+ bool bHandled = true;
if (nRealStart >= nBufLen)
{
m_aCurToken.eType = TEND;
@@ -532,7 +494,7 @@ void SmParser::NextToken()
|| (bNumStart && (aRes.TokenType & KParseType::IDENTNAME)))
{
sal_Int32 n = aRes.EndPos - nRealStart;
- DBG_ASSERT( n >= 0, "length < 0" );
+ OSL_ENSURE( n >= 0, "length < 0" );
m_aCurToken.eType = TNUMBER;
m_aCurToken.cMathChar = '\0';
m_aCurToken.nGroup = 0;
@@ -559,7 +521,7 @@ void SmParser::NextToken()
else if (aRes.TokenType & KParseType::IDENTNAME)
{
sal_Int32 n = aRes.EndPos - nRealStart;
- DBG_ASSERT( n >= 0, "length < 0" );
+ OSL_ENSURE( n >= 0, "length < 0" );
String aName( m_aBufferString.Copy( nRealStart, sal::static_int_cast< xub_StrLen >(n) ) );
const SmTokenTableEntry *pEntry = GetTokenTableEntry( aName );
@@ -698,7 +660,7 @@ void SmParser::NextToken()
}
break;
default:
- bHandled = sal_False;
+ bHandled = false;
}
}
}
@@ -717,7 +679,7 @@ void SmParser::NextToken()
{
//! modifies aRes.EndPos
- DBG_ASSERT( rnEndPos >= nBufLen ||
+ OSL_ENSURE( rnEndPos >= nBufLen ||
'%' != m_aBufferString.GetChar( sal::static_int_cast< xub_StrLen >(rnEndPos) ),
"unexpected comment start" );
@@ -750,7 +712,7 @@ void SmParser::NextToken()
m_aCurToken.eType = TSPECIAL;
m_aCurToken.aText = m_aBufferString.Copy( sal::static_int_cast< xub_StrLen >(nTmpStart-1), n+1 );
- DBG_ASSERT( aTmpRes.EndPos > rnEndPos,
+ OSL_ENSURE( aTmpRes.EndPos > rnEndPos,
"empty identifier" );
if (aTmpRes.EndPos > rnEndPos)
rnEndPos = aTmpRes.EndPos;
@@ -991,12 +953,12 @@ void SmParser::NextToken()
}
break;
default:
- bHandled = sal_False;
+ bHandled = false;
}
}
}
else
- bHandled = sal_False;
+ bHandled = false;
if (!bHandled)
{
@@ -1050,7 +1012,7 @@ void SmParser::Align()
// parse alignment info (if any), then go on with rest of expression
{
SmStructureNode *pSNode = 0;
- sal_Bool bNeedGroupClose = sal_False;
+ bool bNeedGroupClose = false;
if (TokenInGroup(TGALIGN))
{
@@ -1058,7 +1020,7 @@ void SmParser::Align()
// encapsulate expression to be aligned in group braces
// (here group-open brace)
{ Insert('{', GetTokenIndex());
- bNeedGroupClose = sal_True;
+ bNeedGroupClose = true;
// get first valid align statement in sequence
// (the dominant one in 4.0) and erase all others (especially old
@@ -1127,6 +1089,12 @@ void SmParser::Line()
ExpressionArray[n - 1] = m_aNodeStack.Pop();
}
+ //If there's no expression, add an empty one.
+ //this is to avoid a formula tree without any caret
+ //positions, in visual formula editor.
+ if(ExpressionArray.size() == 0)
+ ExpressionArray.push_back(new SmExpressionNode(SmToken()));
+
SmStructureNode *pSNode = new SmLineNode(m_aCurToken);
pSNode->SetSubNodes(ExpressionArray);
m_aNodeStack.Push(pSNode);
@@ -1135,12 +1103,12 @@ void SmParser::Line()
void SmParser::Expression()
{
- sal_Bool bUseExtraSpaces = sal_True;
+ bool bUseExtraSpaces = true;
SmNode *pNode = m_aNodeStack.Pop();
if (pNode)
{
if (pNode->GetToken().eType == TNOSPACE)
- bUseExtraSpaces = sal_False;
+ bUseExtraSpaces = false;
else
m_aNodeStack.Push(pNode); // push the node from above again (now to be used as argument to this current 'nospace' node)
}
@@ -1213,7 +1181,7 @@ void SmParser::Product()
{ SmStructureNode *pSNode;
SmNode *pFirst = m_aNodeStack.Pop(),
*pOper;
- sal_Bool bSwitchArgs = sal_False;
+ bool bSwitchArgs = false;
SmTokenType eType = m_aCurToken.eType;
switch (eType)
@@ -1229,6 +1197,10 @@ void SmParser::Product()
NextToken();
+ //Let the glyph node know it's a binary operation
+ m_aCurToken.eType = TBOPER;
+ m_aCurToken.nGroup = TGPRODUCT;
+
GlyphSpecial();
pOper = m_aNodeStack.Pop();
break;
@@ -1251,7 +1223,7 @@ void SmParser::Product()
pOper = new SmPolyLineNode(m_aCurToken);
NextToken();
- bSwitchArgs =sal_True;
+ bSwitchArgs = true;
break;
}
@@ -1276,8 +1248,8 @@ void SmParser::Product()
void SmParser::SubSup(sal_uLong nActiveGroup)
{
- DBG_ASSERT(nActiveGroup == TGPOWER || nActiveGroup == TGLIMIT,
- "Sm: falsche Tokengruppe");
+ OSL_ENSURE(nActiveGroup == TGPOWER || nActiveGroup == TGLIMIT,
+ "Sm: wrong token group");
if (!TokenInGroup(nActiveGroup))
// already finish
@@ -1325,10 +1297,10 @@ void SmParser::SubSup(sal_uLong nActiveGroup)
case TLSUB : nIndex = (int) LSUB; break;
case TLSUP : nIndex = (int) LSUP; break;
default :
- DBG_ASSERT(sal_False, "Sm: unbekannter Fall");
+ OSL_ENSURE(false, "Sm: unknown case");
}
nIndex++;
- DBG_ASSERT(1 <= nIndex && nIndex <= 1 + SUBSUP_NUM_ENTRIES,
+ OSL_ENSURE(1 <= nIndex && nIndex <= 1 + SUBSUP_NUM_ENTRIES,
"SmParser::Power() : sub-/supscript index falsch");
// set sub-/supscript if not already done
@@ -1365,7 +1337,7 @@ void SmParser::Power()
void SmParser::Blank()
{
- DBG_ASSERT(TokenInGroup(TGBLANK), "Sm : falsches Token");
+ OSL_ENSURE(TokenInGroup(TGBLANK), "Sm : wrong token");
SmBlankNode *pBlankNode = new SmBlankNode(m_aCurToken);
while (TokenInGroup(TGBLANK))
@@ -1529,9 +1501,9 @@ void SmParser::Term()
|| TokenInGroup(TGFONTATTR))
{ SmStructureNodeArray aArray;
- sal_Bool bIsAttr;
+ bool bIsAttr;
sal_uInt16 n = 0;
- while (sal_True == (bIsAttr = TokenInGroup(TGATTRIBUT))
+ while (true == (bIsAttr = TokenInGroup(TGATTRIBUT))
|| TokenInGroup(TGFONTATTR))
{ aArray.resize(n + 1);
@@ -1541,7 +1513,7 @@ void SmParser::Term()
FontAttribut();
// check if casting in following line is ok
- DBG_ASSERT(!m_aNodeStack.Top()->IsVisible(), "Sm : Ooops...");
+ OSL_ENSURE(!NodeStack.Top()->IsVisible(), "Sm : Ooops...");
aArray[n] = (SmStructureNode *) m_aNodeStack.Pop();
n++;
@@ -1598,28 +1570,29 @@ void SmParser::Escape()
{
NextToken();
- sal_Unicode cChar;
switch (m_aCurToken.eType)
- { case TLPARENT : cChar = MS_LPARENT; break;
- case TRPARENT : cChar = MS_RPARENT; break;
- case TLBRACKET : cChar = MS_LBRACKET; break;
- case TRBRACKET : cChar = MS_RBRACKET; break;
- case TLDBRACKET : cChar = MS_LDBRACKET; break;
- case TRDBRACKET : cChar = MS_RDBRACKET; break;
+ {
+ case TLPARENT :
+ case TRPARENT :
+ case TLBRACKET :
+ case TRBRACKET :
+ case TLDBRACKET :
+ case TRDBRACKET :
case TLBRACE :
- case TLGROUP : cChar = MS_LBRACE; break;
+ case TLGROUP :
case TRBRACE :
- case TRGROUP : cChar = MS_RBRACE; break;
- case TLANGLE : cChar = MS_LANGLE; break;
- case TRANGLE : cChar = MS_RANGLE; break;
- case TLCEIL : cChar = MS_LCEIL; break;
- case TRCEIL : cChar = MS_RCEIL; break;
- case TLFLOOR : cChar = MS_LFLOOR; break;
- case TRFLOOR : cChar = MS_RFLOOR; break;
+ case TRGROUP :
+ case TLANGLE :
+ case TRANGLE :
+ case TLCEIL :
+ case TRCEIL :
+ case TLFLOOR :
+ case TRFLOOR :
case TLLINE :
- case TRLINE : cChar = MS_LINE; break;
+ case TRLINE :
case TLDLINE :
- case TRDLINE : cChar = MS_DLINE; break;
+ case TRDLINE :
+ break;
default:
Error(PE_UNEXPECTED_TOKEN);
}
@@ -1698,12 +1671,12 @@ void SmParser::Oper()
case TOPER :
NextToken();
- DBG_ASSERT(m_aCurToken.eType == TSPECIAL, "Sm: falsches Token");
+ OSL_ENSURE(CurToken.eType == TSPECIAL, "Sm: wrong token");
pNode = new SmGlyphSpecialNode(m_aCurToken);
break;
default :
- DBG_ASSERT(0, "Sm: unbekannter Fall");
+ OSL_ENSURE(0, "Sm: unknown case");
}
m_aNodeStack.Push(pNode);
@@ -1713,11 +1686,11 @@ void SmParser::Oper()
void SmParser::UnOper()
{
- DBG_ASSERT(TokenInGroup(TGUNOPER), "Sm: falsches Token");
+ OSL_ENSURE(TokenInGroup(TGUNOPER), "Sm: wrong token");
SmToken aNodeToken = m_aCurToken;
SmTokenType eType = m_aCurToken.eType;
- sal_Bool bIsPostfix = eType == TFACT;
+ bool bIsPostfix = eType == TFACT;
SmStructureNode *pSNode;
SmNode *pOper = 0,
@@ -1739,6 +1712,9 @@ void SmParser::UnOper()
case TUOPER :
NextToken();
+ //Let the glyph know what it is...
+ m_aCurToken.eType = TUOPER;
+ m_aCurToken.nGroup = TGUNOPER;
GlyphSpecial();
pOper = m_aNodeStack.Pop();
break;
@@ -1799,7 +1775,7 @@ void SmParser::UnOper()
void SmParser::Attribut()
{
- DBG_ASSERT(TokenInGroup(TGATTRIBUT), "Sm: falsche Tokengruppe");
+ OSL_ENSURE(TokenInGroup(TGATTRIBUT), "Sm: wrong token group");
SmStructureNode *pSNode = new SmAttributNode(m_aCurToken);
SmNode *pAttr;
@@ -1835,7 +1811,7 @@ void SmParser::Attribut()
void SmParser::FontAttribut()
{
- DBG_ASSERT(TokenInGroup(TGFONTATTR), "Sm: falsche Tokengruppe");
+ OSL_ENSURE(TokenInGroup(TGFONTATTR), "Sm: wrong token group");
switch (m_aCurToken.eType)
{
@@ -1861,14 +1837,14 @@ void SmParser::FontAttribut()
break;
default :
- DBG_ASSERT(0, "Sm: unbekannter Fall");
+ OSL_ENSURE(0, "Sm: unknown case");
}
}
void SmParser::Color()
{
- DBG_ASSERT(m_aCurToken.eType == TCOLOR, "Sm : Ooops...");
+ OSL_ENSURE(CurToken.eType == TCOLOR, "Sm : Ooops...");
// last color rules, get that one
SmToken aToken;
@@ -1889,7 +1865,7 @@ void SmParser::Color()
void SmParser::Font()
{
- DBG_ASSERT(m_aCurToken.eType == TFONT, "Sm : Ooops...");
+ OSL_ENSURE(CurToken.eType == TFONT, "Sm : Ooops...");
// last font rules, get that one
SmToken aToken;
@@ -1910,9 +1886,9 @@ void SmParser::Font()
// gets number used as arguments in Math formulas (e.g. 'size' command)
// Format: no negative numbers, must start with a digit, no exponent notation, ...
-sal_Bool lcl_IsNumber(const UniString& rText)
+bool lcl_IsNumber(const UniString& rText)
{
- sal_Bool bPoint = sal_False;
+ bool bPoint = false;
const sal_Unicode* pBuffer = rText.GetBuffer();
for(xub_StrLen nPos = 0; nPos < rText.Len(); nPos++, pBuffer++)
{
@@ -1920,19 +1896,19 @@ sal_Bool lcl_IsNumber(const UniString& rText)
if(cChar == '.')
{
if(bPoint)
- return sal_False;
+ return false;
else
- bPoint = sal_True;
+ bPoint = true;
}
else if ( !IsDigit( cChar ) )
- return sal_False;
+ return false;
}
- return sal_True;
+ return true;
}
void SmParser::FontSize()
{
- DBG_ASSERT(m_aCurToken.eType == TSIZE, "Sm : Ooops...");
+ OSL_ENSURE(CurToken.eType == TSIZE, "Sm : Ooops...");
sal_uInt16 Type;
SmFontNode *pFontNode = new SmFontNode(m_aCurToken);
@@ -2001,7 +1977,7 @@ void SmParser::FontSize()
void SmParser::Brace()
{
- DBG_ASSERT(m_aCurToken.eType == TLEFT || TokenInGroup(TGLBRACES),
+ OSL_ENSURE(CurToken.eType == TLEFT || TokenInGroup(TGLBRACES),
"Sm: kein Klammer Ausdruck");
SmStructureNode *pSNode = new SmBraceNode(m_aCurToken);
@@ -2022,7 +1998,7 @@ void SmParser::Brace()
pLeft = new SmMathSymbolNode(m_aCurToken);
NextToken();
- Bracebody(sal_True);
+ Bracebody(true);
pBody = m_aNodeStack.Pop();
if (m_aCurToken.eType == TRIGHT)
@@ -2050,7 +2026,7 @@ void SmParser::Brace()
pLeft = new SmMathSymbolNode(m_aCurToken);
NextToken();
- Bracebody(sal_False);
+ Bracebody(false);
pBody = m_aNodeStack.Pop();
SmTokenType eExpectedType = TUNKNOWN;
@@ -2065,7 +2041,7 @@ void SmParser::Brace()
case TLFLOOR : eExpectedType = TRFLOOR; break;
case TLCEIL : eExpectedType = TRCEIL; break;
default :
- DBG_ASSERT(0, "Sm: unbekannter Fall");
+ OSL_ENSURE(0, "Sm: unknown case");
}
if (m_aCurToken.eType == eExpectedType)
@@ -2081,8 +2057,8 @@ void SmParser::Brace()
}
if (eError == PE_NONE)
- { DBG_ASSERT(pLeft, "Sm: NULL pointer");
- DBG_ASSERT(pRight, "Sm: NULL pointer");
+ { OSL_ENSURE(pLeft, "Sm: NULL pointer");
+ OSL_ENSURE(pRight, "Sm: NULL pointer");
pSNode->SetSubNodes(pLeft, pBody, pRight);
pSNode->SetScaleMode(eScaleMode);
m_aNodeStack.Push(pSNode);
@@ -2098,7 +2074,7 @@ void SmParser::Brace()
}
-void SmParser::Bracebody(sal_Bool bIsLeftRight)
+void SmParser::Bracebody(bool bIsLeftRight)
{
SmStructureNode *pBody = new SmBracebodyNode(m_aCurToken);
SmNodeArray aNodes;
@@ -2238,7 +2214,11 @@ void SmParser::Stack()
NextToken();
- SmStructureNode *pSNode = new SmTableNode(m_aCurToken);
+ //We need to let the table node know it context
+ //it's used in SmNodeToTextVisitor
+ SmToken aTok = m_aCurToken;
+ aTok.eType = TSTACK;
+ SmStructureNode *pSNode = new SmTableNode(aTok);
pSNode->SetSubNodes(ExpressionArray);
m_aNodeStack.Push(pSNode);
}
@@ -2310,7 +2290,7 @@ void SmParser::Matrix()
void SmParser::Special()
{
- sal_Bool bReplace = sal_False;
+ bool bReplace = false;
String &rName = m_aCurToken.aText;
String aNewName;
@@ -2325,13 +2305,13 @@ void SmParser::Special()
{
const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData();
aNewName = rLSD.GetUiSymbolName( rName.Copy( 1 ) );
- bReplace = sal_True;
+ bReplace = true;
}
else if (IsExportSymbolNames())
{
const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData();
aNewName = rLSD.GetExportSymbolName( rName.Copy( 1 ) );
- bReplace = sal_True;
+ bReplace = true;
}
}
if( aNewName.Len() )
@@ -2355,7 +2335,7 @@ void SmParser::Special()
}
if (pFrom && pTo)
{
- DBG_ASSERT( pFrom->Count() == pTo->Count(),
+ OSL_ENSURE( pFrom->Count() == pTo->Count(),
"array length mismatch" );
sal_uInt16 nCount = sal::static_int_cast< sal_uInt16 >(pFrom->Count());
for (sal_uInt16 i = 0; i < nCount; ++i)
@@ -2363,7 +2343,7 @@ void SmParser::Special()
if (pFrom->GetString(i) == rName)
{
aNewName = pTo->GetString(i);
- bReplace = sal_True;
+ bReplace = true;
}
}
}
@@ -2418,27 +2398,25 @@ void SmParser::Error(SmParseError eError)
SmParser::SmParser()
{
m_eConversion = CONVERT_NONE;
- m_bImportSymNames = m_bExportSymNames = sal_False;
+ bImportSymNames = m_bExportSymNames = false;
m_nLang = Application::GetSettings().GetUILanguage();
}
-
SmNode *SmParser::Parse(const String &rBuffer)
{
ClearUsedSymbols();
m_aBufferString = rBuffer;
m_aBufferString.ConvertLineEnd( LINEEND_LF );
- m_nBufferIndex =
- m_nTokenIndex = 0;
- m_Row = 1;
- m_nColOff = 0;
- m_nCurError = -1;
-
- for (sal_uInt16 i = 0; i < m_aErrDescList.Count(); i++)
- delete m_aErrDescList.Remove(i);
+ m_nBufferIndex = 0;
+ m_nTokenIndex = 0;
+ m_Row = 1;
+ m_nColOff = 0;
+ m_nCurError = -1;
- m_aErrDescList.Clear();
+ for ( size_t i = 0, n = m_aErrDescList.size(); i < n; ++i )
+ delete m_aErrDescList[ i ];
+ m_aErrDescList.clear();
m_aNodeStack.Clear();
@@ -2449,8 +2427,31 @@ SmNode *SmParser::Parse(const String &rBuffer)
return m_aNodeStack.Pop();
}
+SmNode *SmParser::ParseExpression(const String &rBuffer)
+{
+ m_aBufferString = rBuffer;
+ m_aBufferString.ConvertLineEnd( LINEEND_LF );
+ m_nBufferIndex = 0;
+ m_nTokenIndex = 0;
+ m_Row = 1;
+ m_nColOff = 0;
+ m_nCurError = -1;
+
+ for ( size_t i = 0, n = m_aErrDescList.size(); i < n; ++i )
+ delete m_aErrDescList[ i ];
+ m_aErrDescList.clear();
-sal_uInt16 SmParser::AddError(SmParseError Type, SmNode *pNode)
+ m_aNodeStack.Clear();
+
+ SetLanguage( Application::GetSettings().GetUILanguage() );
+ NextToken();
+ Expression();
+
+ return m_aNodeStack.Pop();
+}
+
+
+size_t SmParser::AddError(SmParseError Type, SmNode *pNode)
{
SmErrorDesc *pErrDesc = new SmErrorDesc;
@@ -2480,43 +2481,43 @@ sal_uInt16 SmParser::AddError(SmParseError Type, SmNode *pNode)
}
pErrDesc->Text += SmResId(nRID);
- m_aErrDescList.Insert(pErrDesc);
+ m_aErrDescList.push_back( pErrDesc );
- return (sal_uInt16) m_aErrDescList.GetPos(pErrDesc);
+ return m_aErrDescList.size()-1;
}
-const SmErrorDesc *SmParser::NextError()
+const SmErrorDesc *SmParser::NextError()
{
- if (m_aErrDescList.Count())
- if (m_nCurError > 0) return m_aErrDescList.Seek(--m_nCurError);
+ if ( !m_aErrDescList.empty() )
+ if (m_nCurError > 0) return m_aErrDescList[ --m_nCurError ];
else
{
m_nCurError = 0;
- return m_aErrDescList.Seek(m_nCurError);
+ return m_aErrDescList[ m_nCurError ];
}
- else return 0;
+ else return NULL;
}
-const SmErrorDesc *SmParser::PrevError()
+const SmErrorDesc *SmParser::PrevError()
{
- if (m_aErrDescList.Count())
- if (m_nCurError < (int) (m_aErrDescList.Count() - 1)) return m_aErrDescList.Seek(++m_nCurError);
+ if ( !m_aErrDescList.empty() )
+ if (m_nCurError < (int) (m_aErrDescList.size() - 1)) return m_aErrDescList[ ++m_nCurError ];
else
{
- m_nCurError = (int) (m_aErrDescList.Count() - 1);
- return m_aErrDescList.Seek(m_nCurError);
+ m_nCurError = (int) (m_aErrDescList.size() - 1);
+ return m_aErrDescList[ m_nCurError ];
}
- else return 0;
+ else return NULL;
}
-const SmErrorDesc *SmParser::GetError(sal_uInt16 i)
+const SmErrorDesc *SmParser::GetError(size_t i)
{
- return (/*i >= 0 &&*/ i < m_aErrDescList.Count())
- ? m_aErrDescList.Seek(i)
- : m_aErrDescList.Seek(m_nCurError);
+ return ( i < m_aErrDescList.size() )
+ ? m_aErrDescList[ i ]
+ : m_aErrDescList[ m_nCurError ];
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 90e336b9fa5e..3ebdfbc4f0ee 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <tools/string.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/virdev.hxx>
@@ -45,10 +46,10 @@
////////////////////////////////////////////////////////////////////////////////
-// '\0' terminiertes Array mit Zeichen, die im StarMath Font als Buchstaben
-// betrachtet werden sollen, (um im Gegensatz zu den anderen Operatoren
-// und Symbolen ein "normales"(ungecliptes) SmRect zu erhalten).
-static xub_Unicode __READONLY_DATA aMathAlpha[] =
+// '\0' terminated Array with symbol, which should be treat as letters in
+// StarMath Font, (to get a normal (non-clipped) SmRect in contrast to the
+// other operators and symbols).
+static xub_Unicode const aMathAlpha[] =
{
MS_ALEPH, MS_IM, MS_RE,
MS_WP, xub_Unicode(0xE070), MS_EMPTYSET,
@@ -61,22 +62,21 @@ static xub_Unicode __READONLY_DATA aMathAlpha[] =
xub_Unicode('\0')
};
-sal_Bool SmIsMathAlpha(const XubString &rText)
- // ergibt genau dann sal_True, wenn das Zeichen (aus dem StarMath Font) wie ein
- // Buchstabe behandelt werden soll.
+bool SmIsMathAlpha(const XubString &rText)
+ // true iff symbol (from StarMath Font) should be treated as letter
{
if (rText.Len() == 0)
- return sal_False;
+ return false;
- DBG_ASSERT(rText.Len() == 1, "Sm : String enthaelt nicht genau ein Zeichen");
+ OSL_ENSURE(rText.Len() == 1, "Sm : string must be exactly one character long");
xub_Unicode cChar = rText.GetChar(0);
- // ist es ein griechisches Zeichen ?
+ // is it a greek symbol?
if (xub_Unicode(0xE0AC) <= cChar && cChar <= xub_Unicode(0xE0D4))
- return sal_True;
+ return true;
else
{
- // kommt es in 'aMathAlpha' vor ?
+ // appears it in 'aMathAlpha'?
const xub_Unicode *pChar = aMathAlpha;
while (*pChar && *pChar != cChar)
pChar++;
@@ -94,10 +94,10 @@ sal_Bool SmIsMathAlpha(const XubString &rText)
SmRect::SmRect()
// constructs empty rectangle at (0, 0) with width and height 0.
{
- DBG_ASSERT(aTopLeft == Point(0, 0), "Sm: ooops...");
- DBG_ASSERT(aSize == Size(0, 0), "Sm: ooops...");
+ OSL_ENSURE(aTopLeft == Point(0, 0), "Sm: ooops...");
+ OSL_ENSURE(aSize == Size(0, 0), "Sm: ooops...");
- bHasBaseline = bHasAlignInfo = sal_False;
+ bHasBaseline = bHasAlignInfo = false;
nBaseline = nAlignT = nAlignM = nAlignB =
nGlyphTop = nGlyphBottom =
nItalicLeftSpace = nItalicRightSpace =
@@ -142,18 +142,18 @@ void SmRect::CopyAlignInfo(const SmRect &rRect)
void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
const XubString &rText, sal_uInt16 nBorder)
{
- DBG_ASSERT(aTopLeft == Point(0, 0), "Sm: Ooops...");
+ OSL_ENSURE(aTopLeft == Point(0, 0), "Sm: Ooops...");
aSize = Size(rDev.GetTextWidth(rText), rDev.GetTextHeight());
const FontMetric aFM (rDev.GetFontMetric());
- sal_Bool bIsMath = aFM.GetName().EqualsIgnoreCaseAscii( FONTNAME_MATH );
- sal_Bool bAllowSmaller = bIsMath && !SmIsMathAlpha(rText);
+ bool bIsMath = aFM.GetName().EqualsIgnoreCaseAscii( FONTNAME_MATH );
+ bool bAllowSmaller = bIsMath && !SmIsMathAlpha(rText);
const long nFontHeight = rDev.GetFont().GetSize().Height();
nBorderWidth = nBorder;
- bHasAlignInfo = sal_True;
- bHasBaseline = sal_True;
+ bHasAlignInfo = true;
+ bHasBaseline = true;
nBaseline = aFM.GetAscent();
nAlignT = nBaseline - nFontHeight * 750L / 1000L;
nAlignM = nBaseline - nFontHeight * 121L / 422L;
@@ -175,8 +175,8 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
long nDelta = pWindow->GetFontMetric().GetIntLeading();
if (nDelta == 0)
- { // dieser Wert entspricht etwa einem Leading von 80 bei einer
- // Fonthoehe von 422 (12pt)
+ { // this value approx. fits a Leading of 80 at a
+ // Fontheight of 422 (12pt)
nDelta = nFontHeight * 8L / 43;
}
SetTop(GetTop() - nDelta);
@@ -187,13 +187,13 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
// get GlyphBoundRect
Rectangle aGlyphRect;
#if OSL_DEBUG_LEVEL > 1
- sal_Bool bSuccess =
+ bool bSuccess =
#endif
SmGetGlyphBoundRect(rDev, rText, aGlyphRect);
#if OSL_DEBUG_LEVEL > 1
if (!bSuccess)
{
- DBG_ERROR( "Sm : Ooops... (fehlt evtl. der Font?)");
+ OSL_FAIL( "Sm : Ooops... (fehlt evtl. der Font?)");
}
#endif
@@ -217,8 +217,8 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
if (bAllowSmaller)
{
- // fuer Symbole und Operatoren aus dem StarMath Font passen wir den
- // oberen und unteren Rand dem Zeichen an.
+ // for symbols and operators from the StarMath Font
+ // we adjust upper and lower margin of the symbol
SetTop(nGlyphTop);
SetBottom(nGlyphBottom);
}
@@ -229,8 +229,8 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
if (nLoAttrFence > GetBottom())
nLoAttrFence = GetBottom();
- DBG_ASSERT(rText.Len() == 0 || !IsEmpty(),
- "Sm: leeres Rechteck erzeugt");
+ OSL_ENSURE(rText.Len() == 0 || !IsEmpty(),
+ "Sm: empty rectangle created");
}
@@ -245,7 +245,7 @@ void SmRect::Init(const OutputDevice &rDev, const SmFormat *pFormat,
SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
const XubString &rText, long nEBorderWidth)
{
- DBG_ASSERT( nEBorderWidth >= 0, "BorderWidth negativ" );
+ OSL_ENSURE( nEBorderWidth >= 0, "BorderWidth is negative" );
if (nEBorderWidth < 0)
nEBorderWidth = 0;
Init(rDev, pFormat, rText, (sal_uInt16) nEBorderWidth);
@@ -259,10 +259,10 @@ SmRect::SmRect(long nWidth, long nHeight)
// as used in 'SmBinVerNode'.
: aSize(nWidth, nHeight)
{
- DBG_ASSERT(aTopLeft == Point(0, 0), "Sm: ooops...");
+ OSL_ENSURE(aTopLeft == Point(0, 0), "Sm: ooops...");
- bHasBaseline = sal_False;
- bHasAlignInfo = sal_True;
+ bHasBaseline = false;
+ bHasAlignInfo = true;
nBaseline = 0;
nAlignT = GetTop();
nAlignB = GetBottom();
@@ -349,7 +349,7 @@ const Point SmRect::AlignTo(const SmRect &rRect, RectPos ePos,
+ GetItalicLeftSpace();
break;
default :
- DBG_ASSERT(sal_False, "Sm: unbekannter Fall");
+ OSL_ENSURE(false, "Sm: unknown case");
}
// check if horizontal position is already set
@@ -386,7 +386,7 @@ const Point SmRect::AlignTo(const SmRect &rRect, RectPos ePos,
aPos.Y() += rRect.GetLoAttrFence() - GetTop();
break;
default :
- DBG_ASSERT(sal_False, "Sm: unbekannter Fall");
+ OSL_ENSURE(false, "Sm: unknown case");
}
// check if vertical position is already set
@@ -403,7 +403,7 @@ const Point SmRect::AlignTo(const SmRect &rRect, RectPos ePos,
aPos.X() += rRect.GetItalicRight() - GetItalicRight();
break;
default :
- DBG_ASSERT(sal_False, "Sm: unbekannter Fall");
+ OSL_ENSURE(false, "Sm: unknown case");
}
return aPos;
@@ -476,7 +476,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode)
nAlignB = Max(GetAlignB(), rRect.GetAlignB());
nHiAttrFence = Min(GetHiAttrFence(), rRect.GetHiAttrFence());
nLoAttrFence = Max(GetLoAttrFence(), rRect.GetLoAttrFence());
- DBG_ASSERT(HasAlignInfo(), "Sm: ooops...");
+ OSL_ENSURE(HasAlignInfo(), "Sm: ooops...");
switch (eCopyMode)
{ case RCP_THIS:
@@ -494,7 +494,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode)
CopyMBL(rRect);
break;
default :
- DBG_ASSERT(sal_False, "Sm: unbekannter Fall");
+ OSL_ENSURE(false, "Sm: unknown case");
}
}
@@ -509,7 +509,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
// align eg "{a over b} over c" correctly where AlignM should not
// be (AlignT + AlignB) / 2)
{
- DBG_ASSERT(HasAlignInfo(), "Sm: keine Align Info");
+ OSL_ENSURE(HasAlignInfo(), "Sm: no align info");
ExtendBy(rRect, eCopyMode);
nAlignM = nNewAlignM;
@@ -519,7 +519,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
- sal_Bool bKeepVerAlignParams)
+ bool bKeepVerAlignParams)
// as 'ExtendBy' but keeps original values for AlignT, -M and -B and
// baseline.
// (this is used in 'SmSupSubNode' where the sub-/supscripts shouldn't
@@ -529,7 +529,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
nOldAlignM = GetAlignM(),
nOldAlignB = GetAlignB(),
nOldBaseline = nBaseline; //! depends not on 'HasBaseline'
- sal_Bool bOldHasAlignInfo = HasAlignInfo();
+ bool bOldHasAlignInfo = HasAlignInfo();
ExtendBy(rRect, eCopyMode);
@@ -551,7 +551,7 @@ long SmRect::OrientedDist(const Point &rPoint) const
// rectangle.
// For simplicity the maximum-norm is used.
{
- sal_Bool bIsInside = IsInsideItalicRect(rPoint);
+ bool bIsInside = IsInsideItalicRect(rPoint);
// build reference point to define the distance
Point aRef;
@@ -589,7 +589,7 @@ long SmRect::OrientedDist(const Point &rPoint) const
}
-sal_Bool SmRect::IsInsideRect(const Point &rPoint) const
+bool SmRect::IsInsideRect(const Point &rPoint) const
{
return rPoint.Y() >= GetTop()
&& rPoint.Y() <= GetBottom()
@@ -598,7 +598,7 @@ sal_Bool SmRect::IsInsideRect(const Point &rPoint) const
}
-sal_Bool SmRect::IsInsideItalicRect(const Point &rPoint) const
+bool SmRect::IsInsideItalicRect(const Point &rPoint) const
{
return rPoint.Y() >= GetTop()
&& rPoint.Y() <= GetBottom()
@@ -614,88 +614,7 @@ SmRect SmRect::AsGlyphRect() const
return aRect;
}
-#ifdef SM_RECT_DEBUG
-
-// forward declaration
-void SmDrawFrame(OutputDevice &rDev, const Rectangle &rRec,
- const Color aCol = COL_BLACK);
-
-void SmRect::Draw(OutputDevice &rDev, const Point &rPosition, int nFlags) const
-{
- if (IsEmpty())
- return;
-
- rDev.Push(PUSH_LINECOLOR);
-
- if (nFlags & SM_RECT_LINES)
- { long nLeftSpace = 0,
- nRightSpace = 0;
-
- if (nFlags & SM_RECT_ITALIC)
- { nLeftSpace = GetItalicLeftSpace();
- nRightSpace = GetItalicRightSpace();
- }
-
- long nLeft = GetLeft() - nLeftSpace,
- nRight = GetRight() + nRightSpace;
-
- Point aOffset (rPosition - GetTopLeft());
-
- rDev.SetLineColor(COL_LIGHTBLUE);
- rDev.DrawLine(Point(nLeft, GetAlignB()) += aOffset,
- Point(nRight, GetAlignB()) += aOffset);
- rDev.DrawLine(Point(nLeft, GetAlignT()) += aOffset,
- Point(nRight, GetAlignT()) += aOffset);
- if (HasBaseline())
- rDev.DrawLine(Point(nLeft, GetBaseline()) += aOffset,
- Point(nRight, GetBaseline()) += aOffset);
-
- rDev.SetLineColor(COL_GRAY);
- rDev.DrawLine(Point(nLeft, GetHiAttrFence()) += aOffset,
- Point(nRight, GetHiAttrFence()) += aOffset);
- }
-
- if (nFlags & SM_RECT_MID)
- { Point aCenter = rPosition
- + (Point(GetItalicCenterX(), GetAlignM()) -= GetTopLeft()),
- aLenX (GetWidth() / 5, 0),
- aLenY (0, GetHeight() / 16);
-
- rDev.SetLineColor(COL_LIGHTGREEN);
- rDev.DrawLine(aCenter - aLenX, aCenter + aLenX);
- rDev.DrawLine(aCenter - aLenY, aCenter + aLenY);
- }
-
- if (nFlags & SM_RECT_ITALIC)
- SmDrawFrame(rDev, Rectangle(rPosition - Point(GetItalicLeftSpace(), 0),
- GetItalicSize()));
-
- if (nFlags & SM_RECT_CORE)
- SmDrawFrame(rDev, Rectangle(rPosition, GetSize()), COL_LIGHTRED);
-
- rDev.Pop();
-}
-
-
-void SmDrawFrame(OutputDevice &rDev, const Rectangle &rRec,
- const Color aCol)
-{
- rDev.Push(PUSH_LINECOLOR);
-
- rDev.SetLineColor(aCol);
-
- rDev.DrawLine(rRec.TopLeft(), rRec.BottomLeft());
- rDev.DrawLine(rRec.BottomLeft(), rRec.BottomRight());
- rDev.DrawLine(rRec.BottomRight(), rRec.TopRight());
- rDev.DrawLine(rRec.TopRight(), rRec.TopLeft());
-
- rDev.Pop();
-}
-
-#endif //SM_RECT_DEBUG
-
-
-sal_Bool SmGetGlyphBoundRect(const OutputDevice &rDev,
+bool SmGetGlyphBoundRect(const OutputDevice &rDev,
const XubString &rText, Rectangle &rRect)
// basically the same as 'GetTextBoundRect' (in class 'OutputDevice')
// but with a string as argument.
@@ -704,7 +623,7 @@ sal_Bool SmGetGlyphBoundRect(const OutputDevice &rDev,
xub_StrLen nLen = rText.Len();
if (nLen == 0)
{ rRect.SetEmpty();
- return sal_True;
+ return true;
}
// get a device where 'OutputDevice::GetTextBoundRect' will be successful
@@ -729,7 +648,7 @@ sal_Bool SmGetGlyphBoundRect(const OutputDevice &rDev,
// in significant incorrect bounding rectangles for some charcters.
Size aFntSize = aFnt.GetSize();
- // HDU: workaround to avoid HUGE font sizes and resulting problems (#112783#)
+ // HDU: workaround to avoid HUGE font sizes and resulting problems
long nScaleFactor = 1;
while( aFntSize.Height() > 2000 * nScaleFactor )
nScaleFactor *= 2;
@@ -742,8 +661,8 @@ sal_Bool SmGetGlyphBoundRect(const OutputDevice &rDev,
Rectangle aResult (aPoint, Size(nTextWidth, rDev.GetTextHeight())),
aTmp;
- sal_Bool bSuccess = pGlyphDev->GetTextBoundRect(aTmp, rText, 0, 0);
- DBG_ASSERT( bSuccess, "GetTextBoundRect failed" );
+ bool bSuccess = pGlyphDev->GetTextBoundRect(aTmp, rText, 0, 0);
+ OSL_ENSURE( bSuccess, "GetTextBoundRect failed" );
if (!aTmp.IsEmpty())
@@ -774,3 +693,4 @@ sal_Bool SmGetGlyphBoundRect(const OutputDevice &rDev,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/register.cxx b/starmath/source/register.cxx
index a7e7ea2110a6..5d68f35e9f16 100644
--- a/starmath/source/register.cxx
+++ b/starmath/source/register.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -231,3 +232,4 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index aba7432cc6ed..4c8e0075a4ef 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,10 +38,7 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
#include <comphelper/processfactory.hxx>
-#endif
-#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
@@ -48,11 +46,8 @@
#include <com/sun/star/ucb/InteractiveAppException.hpp>
#include <com/sun/star/ucb/XContent.hpp>
#include <com/sun/star/packages/zip/ZipIOException.hpp>
-#include <framework/interaction.hxx>
-#ifndef _TOOLKIT_UNOHLP_HXX
#include <toolkit/helper/vclunohelper.hxx>
-#endif
#include <ucbhelper/simpleinteractionrequest.hxx>
#include <rtl/ustring.h>
@@ -62,7 +57,7 @@
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
#include <tools/urlobj.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <svtools/sfxecode.hxx>
#include <svtools/ehdl.hxx>
#include <sot/storinfo.hxx>
@@ -121,7 +116,6 @@ SmFilterDetect::~SmFilterDetect()
// now some parameters that can already be in the array, but may be overwritten or new inserted here
// remember their indices in the case new values must be added to the array
sal_Int32 nPropertyCount = lDescriptor.getLength();
- sal_Int32 nIndexOfFilterName = -1;
sal_Int32 nIndexOfInputStream = -1;
sal_Int32 nIndexOfContent = -1;
sal_Int32 nIndexOfReadOnlyFlag = -1;
@@ -150,10 +144,6 @@ SmFilterDetect::~SmFilterDetect()
{
lDescriptor[nProperty].Value >>= sTemp;
aPreselectedFilterName = sTemp;
-
- // if the preselected filter name is not correct, it must be erased after detection
- // remember index of property to get access to it later
- nIndexOfFilterName = nProperty;
}
else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream")) )
nIndexOfInputStream = nProperty;
@@ -175,8 +165,7 @@ SmFilterDetect::~SmFilterDetect()
}
// can't check the type for external filters, so set the "dont" flag accordingly
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- //SfxFilterFlags nMust = SFX_FILTER_IMPORT, nDont = SFX_FILTER_NOTINSTALLED;
+ SolarMutexGuard aGuard;
SfxApplication* pApp = SFX_APP();
SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() );
@@ -203,9 +192,9 @@ SmFilterDetect::~SmFilterDetect()
{
// ctor of SfxMedium uses owner transition of ItemSet
SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet );
- aMedium.UseInteractionHandler( sal_True );
+ aMedium.UseInteractionHandler( true );
- sal_Bool bIsStorage = aMedium.IsStorage();
+ bool bIsStorage = aMedium.IsStorage();
if ( aMedium.GetErrorCode() == ERRCODE_NONE )
{
// remember input stream and content and put them into the descriptor later
@@ -362,7 +351,7 @@ SmFilterDetect::~SmFilterDetect()
{
// if input stream wasn't part of the descriptor, now it should be, otherwise the content would be opend twice
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("InputStream");
+ lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream"));
lDescriptor[nPropertyCount].Value <<= xStream;
nPropertyCount++;
}
@@ -371,7 +360,7 @@ SmFilterDetect::~SmFilterDetect()
{
// if input stream wasn't part of the descriptor, now it should be, otherwise the content would be opend twice
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("UCBContent");
+ lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UCBContent"));
lDescriptor[nPropertyCount].Value <<= xContent;
nPropertyCount++;
}
@@ -381,7 +370,7 @@ SmFilterDetect::~SmFilterDetect()
if ( nIndexOfReadOnlyFlag == -1 )
{
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("ReadOnly");
+ lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
lDescriptor[nPropertyCount].Value <<= bReadOnly;
nPropertyCount++;
}
@@ -392,7 +381,7 @@ SmFilterDetect::~SmFilterDetect()
if ( !bRepairPackage && bRepairAllowed )
{
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("RepairPackage");
+ lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage"));
lDescriptor[nPropertyCount].Value <<= bRepairAllowed;
nPropertyCount++;
@@ -406,7 +395,7 @@ SmFilterDetect::~SmFilterDetect()
if ( nIndexOfTemplateFlag == -1 )
{
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("AsTemplate");
+ lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate"));
lDescriptor[nPropertyCount].Value <<= bOpenAsTemplate;
nPropertyCount++;
}
@@ -420,7 +409,7 @@ SmFilterDetect::~SmFilterDetect()
if ( nIndexOfDocumentTitle == -1 )
{
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("DocumentTitle");
+ lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle"));
lDescriptor[nPropertyCount].Value <<= aDocumentTitle;
nPropertyCount++;
}
@@ -468,14 +457,14 @@ UNOSEQUENCE< UNOOUSTRING > SmFilterDetect::impl_getStaticSupportedServiceNames()
{
UNOMUTEXGUARD aGuard( UNOMUTEX::getGlobalMutex() );
UNOSEQUENCE< UNOOUSTRING > seqServiceNames( 1 );
- seqServiceNames.getArray() [0] = UNOOUSTRING::createFromAscii( "com.sun.star.frame.ExtendedTypeDetection" );
+ seqServiceNames.getArray() [0] = UNOOUSTRING(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ExtendedTypeDetection" ));
return seqServiceNames ;
}
/* Helper for XServiceInfo */
UNOOUSTRING SmFilterDetect::impl_getStaticImplementationName()
{
- return UNOOUSTRING::createFromAscii( "com.sun.star.comp.math.FormatDetector" );
+ return UNOOUSTRING(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.math.FormatDetector" ));
}
/* Helper for registry */
@@ -484,3 +473,4 @@ UNOREFERENCE< UNOXINTERFACE > SAL_CALL SmFilterDetect::impl_createInstance( cons
return UNOREFERENCE< UNOXINTERFACE >( *new SmFilterDetect( xServiceManager ) );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/smdetect.hxx b/starmath/source/smdetect.hxx
index b9302260d8bd..ae5fc38852ce 100644
--- a/starmath/source/smdetect.hxx
+++ b/starmath/source/smdetect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#define _SM_TYPEDETECT_HXX
#include <rtl/ustring.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <com/sun/star/document/XExtendedFilterDetection.hpp>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/Reference.h>
@@ -93,3 +94,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/smdll.cxx b/starmath/source/smdll.cxx
index 4d3a6740b0fb..00ea0f5d49b2 100644
--- a/starmath/source/smdll.cxx
+++ b/starmath/source/smdll.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <sot/factory.hxx>
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
#include <svx/modctrl.hxx>
#include <svx/zoomctrl.hxx>
#include <sfx2/docfac.hxx>
@@ -42,34 +41,28 @@
#include <sfx2/app.hxx>
#include <sfx2/taskpane.hxx>
-#ifndef _SMDLL_HXX
#include <smdll.hxx>
-#endif
#include <document.hxx>
#include <toolbox.hxx>
#include <view.hxx>
-#ifndef _STARMATH_HRC
#include <starmath.hrc>
-#endif
#include <svx/xmlsecctrl.hxx>
-sal_Bool SmDLL::bInitialized = sal_False;
+bool SmDLL::bInitialized = false;
+
+
+// Initialization
-/*************************************************************************
-|*
-|* Initialisierung
-|*
-\************************************************************************/
void SmDLL::Init()
{
if ( bInitialized )
return;
- bInitialized = sal_True;
+ bInitialized = true;
SfxObjectFactory& rFactory = SmDocShell::Factory();
@@ -93,17 +86,15 @@ void SmDLL::Init()
SvxUndoRedoControl::RegisterControl( SID_REDO, pp );
XmlSecStatusBarControl::RegisterControl( SID_SIGNATURE, pp );
- SmToolBoxWrapper::RegisterChildWindow(sal_True);
- SmCmdBoxWrapper::RegisterChildWindow(sal_True);
+ SmToolBoxWrapper::RegisterChildWindow(true);
+ SmCmdBoxWrapper::RegisterChildWindow(true);
- ::sfx2::TaskPaneWrapper::RegisterChildWindow( sal_False, pp );
+ ::sfx2::TaskPaneWrapper::RegisterChildWindow( false, pp );
}
-/*************************************************************************
-|*
-|* Deinitialisierung
-|*
-\************************************************************************/
+
+// Deinitialization
+
void SmDLL::Exit()
{
// the SdModule must be destroyed
@@ -113,3 +104,5 @@ void SmDLL::Exit()
*GetAppData(SHL_SM) = 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 0a0630151fdf..669a26ab39ef 100755
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,9 +40,7 @@
#include <sfx2/sfx.hrc>
#include <sfx2/viewsh.hxx>
#include <vcl/wrkwin.hxx>
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
#include <vcl/msgbox.hxx>
#include <vcl/virdev.hxx>
#include <unotools/syslocale.hxx>
@@ -49,12 +48,11 @@
#include "smmod.hxx"
#include "symbol.hxx"
#include "config.hxx"
-#ifndef _DIALOG_HXX
#include "dialog.hxx"
-#endif
#include "edit.hxx"
#include "view.hxx"
#include "starmath.hrc"
+#include "svx/modctrl.hxx"
TYPEINIT1( SmModule, SfxModule );
@@ -242,6 +240,8 @@ SmModule::SmModule(SfxObjectFactory* pObjFact) :
pVirtualDev( 0 )
{
SetName( C2S("StarMath" ));
+
+ SvxModifyControl::RegisterControl(SID_DOC_MODIFIED, this);
}
@@ -336,9 +336,6 @@ void SmModule::GetState(SfxItemSet &rSet)
}
}
-/* -----------------15.02.99 12:45-------------------
- *
- * --------------------------------------------------*/
SfxItemSet* SmModule::CreateItemSet( sal_uInt16 nId )
{
SfxItemSet* pRet = 0;
@@ -359,9 +356,6 @@ SfxItemSet* SmModule::CreateItemSet( sal_uInt16 nId )
}
return pRet;
}
-/* -----------------15.02.99 12:45-------------------
- *
- * --------------------------------------------------*/
void SmModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
{
if(nId == SID_SM_EDITOPTIONS)
@@ -369,9 +363,6 @@ void SmModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
GetConfig()->ItemSetToConfig(rSet);
}
}
-/* -----------------15.02.99 12:45-------------------
- *
- * --------------------------------------------------*/
SfxTabPage* SmModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet )
{
SfxTabPage* pRet = 0;
@@ -380,3 +371,5 @@ SfxTabPage* SmModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const Sfx
return pRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/smres.src b/starmath/source/smres.src
index 41edb1790198..dd616848f277 100755..100644
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
@@ -34,8 +34,6 @@
#include "smcommands.h"
#define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x0000; Blue = 0xff00; }
-#define IMAGE_STDBTN_COLOR_HC IMAGE_STDBTN_COLOR
-
#define MN_SUB_TOOLBAR 32
#define WORKARROUND_1 1
#define WORKARROUND_3 3
@@ -595,10 +593,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist11.bmp" ;
};
- Bitmap 21
- {
- File = "dist11_h.bmp" ;
- };
String 3
{
Text [ en-US ] = "~Line spacing";
@@ -607,10 +601,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist12.bmp" ;
};
- Bitmap 31
- {
- File = "dist12_h.bmp" ;
- };
String 4
{
Text [ en-US ] = "~Root spacing";
@@ -619,10 +609,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist13.bmp" ;
};
- Bitmap 41
- {
- File = "dist13_h.bmp" ;
- };
};
Resource 2
{
@@ -638,10 +624,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist21.bmp" ;
};
- Bitmap 21
- {
- File = "dist21_h.bmp" ;
- };
String 3
{
Text [ en-US ] = "S~ubscript";
@@ -650,10 +632,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist22.bmp" ;
};
- Bitmap 31
- {
- File = "dist22_h.bmp" ;
- };
};
Resource 3
{
@@ -669,10 +647,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist31.bmp" ;
};
- Bitmap 21
- {
- File = "dist31_h.bmp" ;
- };
String 3
{
Text [ en-US ] = "~Denominator";
@@ -681,10 +655,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist32.bmp" ;
};
- Bitmap 31
- {
- File = "dist32_h.bmp" ;
- };
};
Resource 4
{
@@ -700,10 +670,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist41.bmp" ;
};
- Bitmap 21
- {
- File = "dist41_h.bmp" ;
- };
String 3
{
Text [ en-US ] = "~Weight";
@@ -712,10 +678,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist42.bmp" ;
};
- Bitmap 31
- {
- File = "dist42_h.bmp" ;
- };
};
Resource 5
{
@@ -731,10 +693,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist51.bmp" ;
};
- Bitmap 21
- {
- File = "dist51_h.bmp" ;
- };
String 3
{
Text [ en-US ] = "~Lower limit";
@@ -743,10 +701,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist52.bmp" ;
};
- Bitmap 31
- {
- File = "dist52_h.bmp" ;
- };
};
Resource 6
{
@@ -762,10 +716,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist61.bmp" ;
};
- Bitmap 21
- {
- File = "dist61_h.bmp" ;
- };
String 3
{
Text [ en-US ] = "~Spacing";
@@ -774,10 +724,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist62.bmp" ;
};
- Bitmap 31
- {
- File = "dist62_h.bmp" ;
- };
String 5
{
Text [ en-US ] = "~Excess size";
@@ -786,10 +732,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist61.bmp" ;
};
- Bitmap 51
- {
- File = "dist61_h.bmp" ;
- };
};
Resource 7
{
@@ -805,10 +747,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist71.bmp" ;
};
- Bitmap 21
- {
- File = "dist71_h.bmp" ;
- };
String 3
{
Text [ en-US ] = "~Column spacing";
@@ -817,10 +755,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist72.bmp" ;
};
- Bitmap 31
- {
- File = "dist72_h.bmp" ;
- };
};
Resource 8
{
@@ -836,10 +770,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist81.bmp" ;
};
- Bitmap 21
- {
- File = "dist81_h.bmp" ;
- };
String 3
{
Text [ en-US ] = "~Minimum spacing";
@@ -848,10 +778,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist82.bmp" ;
};
- Bitmap 31
- {
- File = "dist82_h.bmp" ;
- };
};
Resource 9
{
@@ -867,10 +793,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist91.bmp" ;
};
- Bitmap 21
- {
- File = "dist91_h.bmp" ;
- };
String 3
{
Text [ en-US ] = "~Spacing";
@@ -879,10 +801,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist92.bmp" ;
};
- Bitmap 31
- {
- File = "dist92_h.bmp" ;
- };
};
Resource 10
{
@@ -898,10 +816,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist101.bmp" ;
};
- Bitmap 21
- {
- File = "dist101_h.bmp" ;
- };
String 3
{
Text [ en-US ] = "~Right";
@@ -910,10 +824,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist102.bmp" ;
};
- Bitmap 31
- {
- File = "dist102_h.bmp" ;
- };
String 4
{
Text [ en-US ] = "~Top";
@@ -922,10 +832,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist103.bmp" ;
};
- Bitmap 41
- {
- File = "dist103_h.bmp" ;
- };
String 5
{
Text [ en-US ] = "~Bottom";
@@ -934,10 +840,6 @@ ModalDialog RID_DISTANCEDIALOG
{
File = "dist104.bmp" ;
};
- Bitmap 51
- {
- File = "dist104_h.bmp" ;
- };
};
};
@@ -1338,11 +1240,6 @@ ModalDialog RID_SYMDEFINEDIALOG
ImageBitmap = Bitmap { File = "ar_right.bmp" ; };
MaskColor = IMAGE_STDBTN_COLOR ;
};
- Image 2
- {
- ImageBitmap = Bitmap { File = "ar_right_h.bmp" ; };
- MaskColor = IMAGE_STDBTN_COLOR ;
- };
FixedImage BMP_ARROW_RIGHT
{
Pos = MAP_APPFONT ( 252 , 142 ) ;
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index 7347dbcd705f..c32f23cfb285 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#include "precompiled_starmath.hxx"
-#include <vector>
#include <osl/mutex.hxx>
#include <ucbhelper/content.hxx>
#include <vcl/msgbox.hxx>
@@ -63,11 +63,11 @@ SmSym::SmSym() :
m_aName(C2S("unknown")),
m_aSetName(C2S("unknown")),
m_cChar('\0'),
- m_bPredefined(sal_False),
- m_bDocSymbol(sal_False)
+ m_bPredefined(false),
+ m_bDocSymbol(false)
{
m_aExportName = m_aName;
- m_aFace.SetTransparent(sal_True);
+ m_aFace.SetTransparent(true);
m_aFace.SetAlign(ALIGN_BASELINE);
}
@@ -79,29 +79,18 @@ SmSym::SmSym(const SmSym& rSymbol)
SmSym::SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar,
- const String& rSet, sal_Bool bIsPredefined)
+ const String& rSet, bool bIsPredefined)
{
m_aName = m_aExportName = rName;
m_aFace = rFont;
- m_aFace.SetTransparent(sal_True);
+ m_aFace.SetTransparent(true);
m_aFace.SetAlign(ALIGN_BASELINE);
- m_cChar = cChar;
-//! according to HDU this should not be used anymore now
-//! since this was necessary in the early days but should
-//! not be done now since this is handled now at a more
-//! bottom layer by HDU.
-//! He can still imagine scenarios where this will be wrong
-//! now though, for example when importing *some* old documents.
-//! But overall it should be a large improvement, and
-//! likely everything will still work... #_- (eyes shut and "go"!)
-//
-// if (RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet())
-// Character |= 0xF000;
+ m_cChar = cChar;
m_aSetName = rSet;
m_bPredefined = bIsPredefined;
- m_bDocSymbol = sal_False;
+ m_bDocSymbol = false;
}
@@ -195,7 +184,7 @@ const SymbolPtrVec_t SmSymbolManager::GetSymbols() const
SymbolMap_t::const_iterator aIt( m_aSymbols.begin() );
for ( ; aIt != m_aSymbols.end(); ++aIt)
aRes.push_back( &aIt->second );
-// DBG_ASSERT( sSymbols.size() == m_aSymbols.size(), "number of symbols mismatch " );
+// OSL_ENSURE( sSymbols.size() == m_aSymbols.size(), "number of symbols mismatch " );
return aRes;
}
@@ -219,14 +208,14 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang
else if (pFound && !bForceChange && bSymbolConflict)
{
// TODO: to solve this a document owned symbol manager would be required ...
- // But for now we have a global one to easily support availability of all
+ OSL_ENSURE( 0, "symbol conflict, different symbol with same name found!" );
// symbols in all formulas. A copy of the global one would be needed here
// and then the new symbol has to be forcefully applied. This would keep
// the current formula intact but will leave the set of symbols in the
// global symbol manager somewhat to chance.
- DBG_ASSERT( 0, "symbol conflict, different symbol with same name found!" );
}
+ OSL_ENSURE( bAdded, "failed to add symbol" );
if (bAdded)
m_bModified = true;
DBG_ASSERT( bAdded || (pFound && !bSymbolConflict), "AddOrReplaceSymbol: unresolved symbol conflict" );
@@ -284,7 +273,7 @@ void SmSymbolManager::Load()
for (size_t i = 0; i < nSymbolCount; ++i)
{
const SmSym &rSym = aSymbols[i];
- DBG_ASSERT( rSym.GetName().Len() > 0, "symbol without name!" );
+ OSL_ENSURE( rSym.GetName().Len() > 0, "symbol without name!" );
if (rSym.GetName().Len() > 0)
AddOrReplaceSymbol( rSym );
}
@@ -292,7 +281,7 @@ void SmSymbolManager::Load()
if (0 == nSymbolCount)
{
- DBG_ERROR( "no symbol set found" );
+ OSL_FAIL( "no symbol set found" );
m_bModified = false;
}
@@ -308,12 +297,12 @@ void SmSymbolManager::Load()
// make the new symbol a copy but with ITALIC_NORMAL, and add it to iGreek
const SmSym &rSym = *aGreekSymbols[i];
Font aFont( rSym.GetFace() );
- DBG_ASSERT( aFont.GetItalic() == ITALIC_NONE, "expected Font with ITALIC_NONE, failed." );
+ OSL_ENSURE( aFont.GetItalic() == ITALIC_NONE, "expected Font with ITALIC_NONE, failed." );
aFont.SetItalic( ITALIC_NORMAL );
String aSymbolName( (sal_Unicode)'i' );
aSymbolName += rSym.GetName();
SmSym aSymbol( aSymbolName, aFont, rSym.GetCharacter(),
- aSymbolSetName, sal_True /*bIsPredefined*/ );
+ aSymbolSetName, true /*bIsPredefined*/ );
AddOrReplaceSymbol( aSymbol );
}
@@ -325,23 +314,6 @@ void SmSymbolManager::Save()
{
SmMathConfig &rCfg = *SM_MOD()->GetConfig();
-#if 0
- sal_uInt16 nSymbolCount = GetSymbolCount();
- sal_uInt16 nSaveSymbolCnt = 0;
- const SmSym **pSymbols = new const SmSym* [ nSymbolCount ];
- const SmSym **pSym = pSymbols;
- for (sal_uInt16 j = 0; j < nSymbolCount; ++j)
- {
- const SmSym &rSym = *pSymSet->GetSymbol( j );
- if (!rSym.IsDocSymbol())
- {
- *pSym++ = &rSym;
- ++nSaveSymbolCnt;
- }
- }
- DBG_ASSERT(pSym - pSymbols == nSaveSymbolCnt, "wrong number of symbols" );
-#endif
-
// prepare to skip symbols from iGreek on saving
SmLocalizedSymbolData aLocalizedData;
String aSymbolSetName( (sal_Unicode) 'i' );
@@ -357,12 +329,10 @@ void SmSymbolManager::Save()
aSymbols.push_back( *aTmp[i] );
}
rCfg.SetSymbols( aSymbols );
-#if 0
- delete [] pSymbols;
-#endif
m_bModified = false;
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/symbol.src b/starmath/source/symbol.src
index c4cab66a8212..7f8e15a15817 100644
--- a/starmath/source/symbol.src
+++ b/starmath/source/symbol.src
@@ -191,13 +191,12 @@ Resource RID_LOCALIZED_NAMES
};
StringArray RID_UI_SYMBOLSET_NAMES
{
- ItemList [ en-US ] =
- {
- < "Greek" ; > ;
- < "Special" ; > ;
- };
+ ItemList [ en-US ] =
+ {
+ < "Greek" ; > ;
+ < "Special" ; > ;
+ };
};
-
StringArray RID_EXPORT_SYMBOL_NAMES
{
ItemList =
diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx
index d895c0f71994..e398e6313114 100644
--- a/starmath/source/toolbox.cxx
+++ b/starmath/source/toolbox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,18 +39,14 @@
#include <sfx2/imgmgr.hxx>
#include <vcl/wrkwin.hxx>
#include "toolbox.hxx"
-#ifndef _STARMATH_HRC
#include "starmath.hrc"
-#endif
-#ifndef _TOOLBOX_HRC_
#include "toolbox.hrc"
-#endif
#include "view.hxx"
////////////////////////////////////////////////////////////
-static sal_uInt16 GetImageListRID( sal_uInt16 nCategoryRID, sal_Bool bHighContrast )
+static sal_uInt16 GetImageListRID( sal_uInt16 nCategoryRID )
{
sal_uInt16 nRes = 0xFFFF;
switch (nCategoryRID)
@@ -64,10 +61,8 @@ static sal_uInt16 GetImageListRID( sal_uInt16 nCategoryRID, sal_Bool bHighContr
case RID_FORMAT_CAT : nRes = RID_IL_FORMAT; break;
case RID_MISC_CAT : nRes = RID_IL_MISC; break;
default :
- DBG_ERROR( "unkown category" );
+ OSL_FAIL( "unkown category" );
}
- if (nRes != 0xFFFF && bHighContrast)
- ++nRes; //! the resource ID for the high contrast image list is just +1 compared to the regular ones
return nRes;
}
@@ -98,29 +93,20 @@ static sal_uInt16 GetCategoryRID( sal_uInt16 nResId )
sal_uInt16 nRes = 0xFFFF;
switch (nResId)
{
- case RID_IL_UNBINOPS :
- case RID_ILH_UNBINOPS : nRes = RID_UNBINOPS_CAT; break;
- case RID_IL_RELATIONS :
- case RID_ILH_RELATIONS : nRes = RID_RELATIONS_CAT; break;
- case RID_IL_SETOPERATIONS :
- case RID_ILH_SETOPERATIONS : nRes = RID_SETOPERATIONS_CAT; break;
- case RID_IL_FUNCTIONS :
- case RID_ILH_FUNCTIONS : nRes = RID_FUNCTIONS_CAT; break;
- case RID_IL_OPERATORS :
- case RID_ILH_OPERATORS : nRes = RID_OPERATORS_CAT; break;
- case RID_IL_ATTRIBUTES :
- case RID_ILH_ATTRIBUTES : nRes = RID_ATTRIBUTES_CAT; break;
- case RID_IL_BRACKETS :
- case RID_ILH_BRACKETS : nRes = RID_BRACKETS_CAT; break;
- case RID_IL_FORMAT :
- case RID_ILH_FORMAT : nRes = RID_FORMAT_CAT; break;
- case RID_IL_MISC :
- case RID_ILH_MISC : nRes = RID_MISC_CAT; break;
+ case RID_IL_UNBINOPS : nRes = RID_UNBINOPS_CAT; break;
+ case RID_IL_RELATIONS : nRes = RID_RELATIONS_CAT; break;
+ case RID_IL_SETOPERATIONS : nRes = RID_SETOPERATIONS_CAT; break;
+ case RID_IL_FUNCTIONS : nRes = RID_FUNCTIONS_CAT; break;
+ case RID_IL_OPERATORS : nRes = RID_OPERATORS_CAT; break;
+ case RID_IL_ATTRIBUTES : nRes = RID_ATTRIBUTES_CAT; break;
+ case RID_IL_BRACKETS : nRes = RID_BRACKETS_CAT; break;
+ case RID_IL_FORMAT : nRes = RID_FORMAT_CAT; break;
+ case RID_IL_MISC : nRes = RID_MISC_CAT; break;
default :
- if (nResId != RID_IL_CATALOG && nResId != RID_ILH_CATALOG)
+ if (nResId != RID_IL_CATALOG)
{
#if OSL_DEBUG_LEVEL > 1
- DBG_ERROR( "unkown category" );
+ OSL_FAIL( "unkown category" );
#endif
}
}
@@ -157,10 +143,7 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pTmpBindings,
pToolBoxCmd = vToolBoxCategories[0];
for (i = 0; i <= NUM_TBX_CATEGORIES; ++i)
- {
aImageLists [i] = 0;
- aImageListsH[i] = 0;
- }
FreeResource();
}
@@ -174,10 +157,7 @@ SmToolBoxWindow::~SmToolBoxWindow()
delete pBox;
}
for (i = 0; i < NUM_TBX_CATEGORIES + 1; ++i)
- {
delete aImageLists[i];
- delete aImageListsH[i];
- }
}
@@ -188,7 +168,7 @@ SmViewShell * SmToolBoxWindow::GetView()
}
-const ImageList * SmToolBoxWindow::GetImageList( sal_uInt16 nResId, sal_Bool bHighContrast )
+const ImageList * SmToolBoxWindow::GetImageList( sal_uInt16 nResId )
{
// creates the image list via its resource id and stores that
// list for later use in the respective array.
@@ -198,37 +178,35 @@ const ImageList * SmToolBoxWindow::GetImageList( sal_uInt16 nResId, sal_Bool bHi
// get index to use
sal_uInt16 nCategoryRID = GetCategoryRID( nResId );
sal_Int16 nIndex = GetToolBoxCategoriesIndex( nCategoryRID );
- if (nIndex == -1 && (nResId == RID_IL_CATALOG || nResId == RID_ILH_CATALOG))
+ if (nIndex == -1 && (nResId == RID_IL_CATALOG))
nIndex = NUM_TBX_CATEGORIES;
if (nIndex >= 0)
{
- ImageList **pImgList = bHighContrast ? aImageListsH : aImageLists;
+ ImageList **pImgList = aImageLists;
if (!pImgList[ nIndex ])
pImgList[ nIndex ] = new ImageList( SmResId(nResId) );
pIL = pImgList[ nIndex ];
}
- DBG_ASSERT( pIL, "image list not found!" );
+ OSL_ENSURE( pIL, "image list not found!" );
return pIL;
}
void SmToolBoxWindow::ApplyImageLists( sal_uInt16 nCategoryRID )
{
- sal_Bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
-
// set image list for toolbox 'catalog'
- const ImageList *pImageList = GetImageList( bHighContrast ? RID_ILH_CATALOG : RID_IL_CATALOG, bHighContrast );
- DBG_ASSERT( pImageList, "image list missing" );
+ const ImageList *pImageList = GetImageList( RID_IL_CATALOG );
+ OSL_ENSURE( pImageList, "image list missing" );
if (pImageList)
aToolBoxCat.SetImageList( *pImageList );
// set image list for active (visible) category of 'catalog'
sal_Int16 nIdx = GetToolBoxCategoriesIndex( nCategoryRID );
- sal_uInt16 nResId = GetImageListRID( nCategoryRID, bHighContrast );
- pImageList = GetImageList( nResId, bHighContrast );
- DBG_ASSERT( pImageList && nIdx >= 0, "image list or index missing" );
+ sal_uInt16 nResId = GetImageListRID( nCategoryRID );
+ pImageList = GetImageList( nResId );
+ OSL_ENSURE( pImageList && nIdx >= 0, "image list or index missing" );
if (pImageList && nIdx >= 0)
vToolBoxCategories[ nIdx ]->SetImageList( *pImageList );
}
@@ -243,25 +221,25 @@ void SmToolBoxWindow::DataChanged( const DataChangedEvent &rEvt )
void SmToolBoxWindow::StateChanged( StateChangedType nStateChange )
{
- static sal_Bool bSetPosition = sal_True;
+ static bool bSetPosition = true;
if (STATE_CHANGE_INITSHOW == nStateChange)
{
SetCategory( nActiveCategoryRID == USHRT_MAX ? RID_UNBINOPS_CAT : nActiveCategoryRID );
// calculate initial position to be used after creation of the window...
AdjustPosSize( bSetPosition );
- bSetPosition = sal_False;
+ bSetPosition = false;
}
//... otherwise the base class will remember the last position of the window
SfxFloatingWindow::StateChanged( nStateChange );
}
-void SmToolBoxWindow::AdjustPosSize( sal_Bool bSetPos )
+void SmToolBoxWindow::AdjustPosSize( bool bSetPos )
{
Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) );
Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( 4 /* see nLines in SetCategory*/ ) );
- DBG_ASSERT( aCatSize.Width() == aCmdSize.Width(), "width mismatch" );
+ OSL_ENSURE( aCatSize.Width() == aCmdSize.Width(), "width mismatch" );
// catalog settings
aToolBoxCat.SetPosPixel( Point(0, 3) );
@@ -285,7 +263,7 @@ void SmToolBoxWindow::AdjustPosSize( sal_Bool bSetPos )
if (bSetPos)
{
SmViewShell *pView = GetView();
- DBG_ASSERT( pView, "view shell missing" );
+ OSL_ENSURE( pView, "view shell missing" );
Point aPos( 50, 75 );
if (pView)
{
@@ -308,8 +286,8 @@ sal_Bool SmToolBoxWindow::Close()
if (pViewSh)
pViewSh->GetViewFrame()->GetDispatcher()->Execute(
SID_TOOLBOX, SFX_CALLMODE_STANDARD,
- new SfxBoolItem(SID_TOOLBOX, sal_False), 0L);
- return sal_True;
+ new SfxBoolItem(SID_TOOLBOX, false), 0L);
+ return true;
}
void SmToolBoxWindow::GetFocus()
@@ -345,22 +323,22 @@ void SmToolBoxWindow::SetCategory(sal_uInt16 nCategoryRID)
pToolBoxCmd->Hide();
sal_Int16 nIdx = GetToolBoxCategoriesIndex( nCategoryRID );
- DBG_ASSERT( nIdx >= 0, "unkown category" );
+ OSL_ENSURE( nIdx >= 0, "unkown category" );
if (nIdx >= 0)
pToolBoxCmd = vToolBoxCategories[nIdx];
// calculate actual size of window to use
Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) );
Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( nLines ) );
- DBG_ASSERT( aCatSize.Width() == aCmdSize.Width(), "width mismatch" );
+ OSL_ENSURE( aCatSize.Width() == aCmdSize.Width(), "width mismatch" );
// main window settings
Size aWndSize ( aCatSize.Width(), pToolBoxCmd->GetPosPixel().Y() + aCmdSize.Height() + 3);
SetOutputSizePixel( aWndSize );
if (nActiveCategoryRID)
- aToolBoxCat.CheckItem(nActiveCategoryRID, sal_False);
+ aToolBoxCat.CheckItem(nActiveCategoryRID, false);
nActiveCategoryRID = nCategoryRID;
- aToolBoxCat.CheckItem(nActiveCategoryRID, sal_True);
+ aToolBoxCat.CheckItem(nActiveCategoryRID, true);
pToolBoxCmd->Show();
}
@@ -402,3 +380,4 @@ SmToolBoxWrapper::SmToolBoxWrapper(Window *pParentWindow,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/toolbox.src b/starmath/source/toolbox.src
index ead1b32810c3..07e728f1e6cb 100755
--- a/starmath/source/toolbox.src
+++ b/starmath/source/toolbox.src
@@ -1489,12 +1489,6 @@ FloatingWindow RID_TOOLBOXWINDOW
MaskColor = IMAGE_STDBTN_COLOR ;
UNBINOPS_IDLIST
};
- ImageList RID_ILH_UNBINOPS
- {
- Prefix = "unh";
- MaskColor = IMAGE_STDBTN_COLOR_HC ;
- UNBINOPS_IDLIST
- };
#define RELATIONS_IDLIST \
IdList = \
@@ -1529,12 +1523,6 @@ FloatingWindow RID_TOOLBOXWINDOW
MaskColor = IMAGE_STDBTN_COLOR ;
RELATIONS_IDLIST
};
- ImageList RID_ILH_RELATIONS
- {
- Prefix = "bih";
- MaskColor = IMAGE_STDBTN_COLOR_HC ;
- RELATIONS_IDLIST
- };
#define SETOPERATIONS_IDLIST \
IdList = \
@@ -1570,12 +1558,6 @@ FloatingWindow RID_TOOLBOXWINDOW
MaskColor = IMAGE_STDBTN_COLOR ;
SETOPERATIONS_IDLIST
};
- ImageList RID_ILH_SETOPERATIONS
- {
- Prefix = "oph";
- MaskColor = IMAGE_STDBTN_COLOR_HC ;
- SETOPERATIONS_IDLIST
- };
#define FUNCTIONS_IDLIST \
IdList = \
@@ -1614,12 +1596,6 @@ FloatingWindow RID_TOOLBOXWINDOW
MaskColor = IMAGE_STDBTN_COLOR ;
FUNCTIONS_IDLIST
};
- ImageList RID_ILH_FUNCTIONS
- {
- Prefix = "fuh";
- MaskColor = IMAGE_STDBTN_COLOR_HC ;
- FUNCTIONS_IDLIST
- };
#define OPERATORS_IDLIST \
IdList = \
@@ -1646,12 +1622,6 @@ FloatingWindow RID_TOOLBOXWINDOW
MaskColor = IMAGE_STDBTN_COLOR ;
OPERATORS_IDLIST
};
- ImageList RID_ILH_OPERATORS
- {
- Prefix = "foh";
- MaskColor = IMAGE_STDBTN_COLOR_HC ;
- OPERATORS_IDLIST
- };
#define ATTRIBUTES_IDLIST \
IdList = \
@@ -1688,12 +1658,6 @@ FloatingWindow RID_TOOLBOXWINDOW
MaskColor = IMAGE_STDBTN_COLOR ;
ATTRIBUTES_IDLIST
};
- ImageList RID_ILH_ATTRIBUTES
- {
- Prefix = "ath";
- MaskColor = IMAGE_STDBTN_COLOR_HC ;
- ATTRIBUTES_IDLIST
- };
#define BRACKETS_IDLIST \
IdList = \
@@ -1726,12 +1690,6 @@ FloatingWindow RID_TOOLBOXWINDOW
MaskColor = IMAGE_STDBTN_COLOR ;
BRACKETS_IDLIST
};
- ImageList RID_ILH_BRACKETS
- {
- Prefix = "alh";
- MaskColor = IMAGE_STDBTN_COLOR_HC ;
- BRACKETS_IDLIST
- };
#define FORMAT_IDLIST \
IdList = \
@@ -1760,12 +1718,6 @@ FloatingWindow RID_TOOLBOXWINDOW
MaskColor = IMAGE_STDBTN_COLOR ;
FORMAT_IDLIST
};
- ImageList RID_ILH_FORMAT
- {
- Prefix = "coh";
- MaskColor = IMAGE_STDBTN_COLOR_HC ;
- FORMAT_IDLIST
- };
#define MISC_IDLIST \
IdList = \
@@ -1798,12 +1750,6 @@ FloatingWindow RID_TOOLBOXWINDOW
MaskColor = IMAGE_STDBTN_COLOR ;
MISC_IDLIST
};
- ImageList RID_ILH_MISC
- {
- Prefix = "mih";
- MaskColor = IMAGE_STDBTN_COLOR_HC ;
- MISC_IDLIST
- };
#define CATALOG_IDLIST \
IdList = \
@@ -1826,12 +1772,6 @@ FloatingWindow RID_TOOLBOXWINDOW
MaskColor = IMAGE_STDBTN_COLOR ;
CATALOG_IDLIST
};
- ImageList RID_ILH_CATALOG
- {
- Prefix = "imh";
- MaskColor = IMAGE_STDBTN_COLOR_HC ;
- CATALOG_IDLIST
- };
diff --git a/starmath/source/typemap.cxx b/starmath/source/typemap.cxx
index e98e0b5d85a4..767e29dcad34 100644
--- a/starmath/source/typemap.cxx
+++ b/starmath/source/typemap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,14 +45,9 @@
#define ITEMID_HYPHENREGION 0
#define ITEMID_FONT 0
#define ITEMID_FONTHEIGHT 0
-#define ITEMID_COLOR 0
-#define ITEMID_BRUSH 0
#define ITEMID_BRUSH 0
#define ITEMID_BOX 0
#define ITEMID_LINE 0
-#define ITEMID_BRUSH 0
-#define ITEMID_SPELLCHECK 0
-#define ITEMID_HYPHENREGION 0
#define ITEMID_LINESPACING 0
#define ITEMID_ADJUST 0
#define ITEMID_WIDOWS 0
@@ -61,10 +57,8 @@
#define ITEMID_FMTSPLIT 0
#define ITEMID_PAGEMODEL 0
#define ITEMID_FONTLIST 0
-#define ITEMID_FONT 0
#define ITEMID_POSTURE 0
#define ITEMID_WEIGHT 0
-#define ITEMID_FONTHEIGHT 0
#define ITEMID_FONTWIDTH 0
#define ITEMID_UNDERLINE 0
#define ITEMID_CROSSEDOUT 0
@@ -81,9 +75,6 @@
#define ITEMID_LANGUAGE 0
#define ITEMID_NOLINEBREAK 0
#define ITEMID_NOHYPHENHERE 0
-#define ITEMID_COLOR 0
-#define ITEMID_FONT 0
-#define ITEMID_FONTHEIGHT 0
#define ITEMID_SEARCH 0
#define ITEMID_COLOR_TABLE 0
#define ITEMID_GRADIENT_LIST 0
@@ -98,7 +89,6 @@
#define ITEMID_CHARTTEXTORDER 0
#define ITEMID_CHARTTEXTORIENT 0
#define ITEMID_DOUBLE 0
-#define ITEMID_TABSTOP 0
#define ITEMID_PAPERBIN 0
#define ITEMID_SIZE 0
#define ITEMID_LRSPACE 0
@@ -107,12 +97,9 @@
#define ITEMID_OPAQUE 0
#define ITEMID_PROTECT 0
#define ITEMID_MACRO 0
-#define ITEMID_BOX 0
#define ITEMID_BOXINFO 0
#define ITEMID_FMTBREAK 0
#define ITEMID_FMTKEEP 0
-#define ITEMID_LINE 0
-#define ITEMID_BRUSH 0
#define CharSetItem SfxVoidItem
#define FontFamilyItem SfxVoidItem
@@ -148,3 +135,4 @@
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/types.cxx b/starmath/source/types.cxx
index e63d46c79e9b..aeb06d7eb5a9 100644
--- a/starmath/source/types.cxx
+++ b/starmath/source/types.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,6 +31,7 @@
#include <types.hxx>
+#include <osl/diagnose.h>
sal_Unicode ConvertMathPrivateUseAreaToUnicode( sal_Unicode cChar )
@@ -37,7 +39,7 @@ sal_Unicode ConvertMathPrivateUseAreaToUnicode( sal_Unicode cChar )
sal_Unicode cRes = cChar;
if (IsInPrivateUseArea( cChar ))
{
- DBG_ASSERT( 0, "Error: private use area characters should no longer be in use!" );
+ OSL_ENSURE( 0, "Error: private use area characters should no longer be in use!" );
cRes = (sal_Unicode) '@'; // just some character that should easily be notice as odd in the context
}
return cRes;
@@ -50,3 +52,4 @@ sal_Unicode ConvertMathToMathML( sal_Unicode cChar )
return cRes;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/unodoc.cxx b/starmath/source/unodoc.cxx
index 52c362748868..4f0205f5cd38 100644
--- a/starmath/source/unodoc.cxx
+++ b/starmath/source/unodoc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,7 +38,7 @@
#include "smdll.hxx"
#include "document.hxx"
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
@@ -57,7 +58,7 @@ uno::Sequence< rtl::OUString > SAL_CALL SmDocument_getSupportedServiceNames() th
uno::Reference< uno::XInterface > SAL_CALL SmDocument_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & /*rSMgr*/, const sal_uInt64 _nCreationFlags ) throw( uno::Exception )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if ( !SM_MOD() )
SmDLL::Init();
@@ -69,3 +70,4 @@ uno::Reference< uno::XInterface > SAL_CALL SmDocument_createInstance(
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 7c316144962b..d3d41c36ee40 100755..100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#include "precompiled_starmath.hxx"
-#include <vos/mutex.hxx>
#include <osl/mutex.hxx>
#include <sfx2/printer.hxx>
#include <vcl/svapp.hxx>
@@ -59,8 +59,6 @@
#include <config.hxx>
#include <smdll.hxx>
-using namespace ::vos;
-using namespace ::rtl;
using namespace ::cppu;
using namespace ::std;
using namespace ::comphelper;
@@ -73,6 +71,8 @@ using namespace ::com::sun::star::view;
using namespace ::com::sun::star::script;
+using rtl::OUString;
+
#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
#define MM100_TO_TWIP(MM100) ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L))
@@ -81,13 +81,13 @@ using namespace ::com::sun::star::script;
SmPrintUIOptions::SmPrintUIOptions()
{
ResStringArray aLocalizedStrings( SmResId( RID_PRINTUIOPTIONS ) );
- DBG_ASSERT( aLocalizedStrings.Count() >= 9, "resource incomplete" );
+ OSL_ENSURE( aLocalizedStrings.Count() >= 18, "resource incomplete" );
if( aLocalizedStrings.Count() < 9 ) // bad resource ?
return;
SmModule *pp = SM_MOD();
SmConfig *pConfig = pp->GetConfig();
- DBG_ASSERT( pConfig, "SmConfig not found" );
+ OSL_ENSURE( pConfig, "SmConfig not found" );
if (!pConfig)
return;
@@ -155,15 +155,6 @@ SmPrintUIOptions::SmPrintUIOptions()
aHintNoLayoutPage[0].Value = makeAny( sal_True );
m_aUIProperties[8].Value <<= aHintNoLayoutPage;
-// IsIgnoreSpacesRight is a parser option! Thus we don't add it to the printer UI.
-//
-// // create subgroup for misc options
-// m_aUIProperties[8].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 9 ) );
-//
-// // create a bool option for ignore spacing (matches to SID_NO_RIGHT_SPACES)
-// m_aUIProperties[9].Value = getBoolControlOpt( aLocalizedStrings.GetString( 10 ),
-// rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_NO_RIGHT_SPACE ) ),
-// pConfig->IsIgnoreSpacesRight() );
}
@@ -238,13 +229,11 @@ enum SmModelPropertyHandles
HANDLE_PRINTER_SETUP,
HANDLE_SYMBOLS,
HANDLE_USED_SYMBOLS,
- HANDLE_BASIC_LIBRARIES, /* #93295# */
+ HANDLE_BASIC_LIBRARIES,
HANDLE_RUNTIME_UID,
- // --> PB 2004-08-25 #i33095# Security Options
- HANDLE_LOAD_READONLY,
- // <--
- HANDLE_DIALOG_LIBRARIES, // #i73329#
- HANDLE_BASELINE // 3.7.2010 #i972#
+ HANDLE_LOAD_READONLY, // Security Options
+ HANDLE_DIALOG_LIBRARIES, // #i73329#
+ HANDLE_BASELINE
};
PropertySetInfo * lcl_createModelPropertyInfo ()
@@ -325,7 +314,7 @@ PropertySetInfo * lcl_createModelPropertyInfo ()
PropertySetInfo *pInfo = new PropertySetInfo ( aModelPropertyInfoMap );
return pInfo;
}
-//-----------------------------------------------------------------------
+
SmModel::SmModel( SfxObjectShell *pObjSh )
: SfxBaseModel(pObjSh)
, PropertySetHelper ( lcl_createModelPropertyInfo () )
@@ -333,14 +322,12 @@ SmModel::SmModel( SfxObjectShell *pObjSh )
{
}
-//-----------------------------------------------------------------------
+
SmModel::~SmModel() throw ()
{
delete m_pPrintUIOptions;
}
-/*-- 28.03.00 14:18:17---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL SmModel::queryInterface( const uno::Type& rType ) throw(uno::RuntimeException)
{
uno::Any aRet = ::cppu::queryInterface ( rType,
@@ -358,26 +345,20 @@ uno::Any SAL_CALL SmModel::queryInterface( const uno::Type& rType ) throw(uno::R
aRet = SfxBaseModel::queryInterface ( rType );
return aRet;
}
-/*-- 28.03.00 14:18:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SmModel::acquire() throw()
{
OWeakObject::acquire();
}
-/*-- 28.03.00 14:18:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SmModel::release() throw()
{
OWeakObject::release();
}
-/*-- 28.03.00 14:18:19---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< uno::Type > SAL_CALL SmModel::getTypes( ) throw(uno::RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< uno::Type > aTypes = SfxBaseModel::getTypes();
sal_Int32 nLen = aTypes.getLength();
aTypes.realloc(nLen + 4);
@@ -387,15 +368,9 @@ uno::Sequence< uno::Type > SAL_CALL SmModel::getTypes( ) throw(uno::RuntimeExce
pTypes[nLen++] = ::getCppuType((Reference<XMultiPropertySet>*)0);
pTypes[nLen++] = ::getCppuType((Reference<XRenderable>*)0);
- // XPropertyState not supported?? (respective virtual functions from
- // PropertySetHelper not overloaded)
- //pTypes[nLen++] = ::getCppuType((Reference<XPropertyState>*)0);
-
return aTypes;
}
-/* -----------------------------28.03.00 14:23--------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SmModel::getUnoTunnelId()
{
static osl::Mutex aCreateMutex;
@@ -408,9 +383,8 @@ const uno::Sequence< sal_Int8 > & SmModel::getUnoTunnelId()
rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
}
return aSeq;
-} /* -----------------------------28.03.00 14:23--------------------------------
+}
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SmModel::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -423,12 +397,7 @@ sal_Int64 SAL_CALL SmModel::getSomething( const uno::Sequence< sal_Int8 >& rId )
return SfxBaseModel::getSomething( rId );
}
-/*-- 07.01.00 16:32:59---------------------------------------------------
- -----------------------------------------------------------------------*/
-/*-- 07.01.00 16:33:00---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Int16 lcl_AnyToINT16(const uno::Any& rAny)
{
uno::TypeClass eType = rAny.getValueType().getTypeClass();
@@ -442,7 +411,6 @@ sal_Int16 lcl_AnyToINT16(const uno::Any& rAny)
rAny >>= nRet;
return nRet;
}
-//-----------------------------------------------------------------------------
OUString SmModel::getImplementationName(void) throw( uno::RuntimeException )
{
@@ -452,12 +420,9 @@ OUString SmModel::getImplementationName(void) throw( uno::RuntimeException )
::rtl::OUString SmModel::getImplementationName_Static()
{
- return rtl::OUString::createFromAscii("com.sun.star.comp.math.FormulaDocument");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.math.FormulaDocument"));
}
-/*-- 20.01.04 11:21:00---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SmModel::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return (
@@ -465,9 +430,7 @@ sal_Bool SmModel::supportsService(const OUString& rServiceName) throw( uno::Runt
rServiceName == A2OU("com.sun.star.formula.FormulaProperties")
);
}
-/*-- 20.01.04 11:21:00---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SmModel::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
return getSupportedServiceNames_Static();
@@ -475,7 +438,7 @@ uno::Sequence< OUString > SmModel::getSupportedServiceNames(void) throw( uno::Ru
uno::Sequence< OUString > SmModel::getSupportedServiceNames_Static(void)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< OUString > aRet(2);
OUString* pArray = aRet.getArray();
@@ -487,7 +450,7 @@ uno::Sequence< OUString > SmModel::getSupportedServiceNames_Static(void)
void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* pValues)
throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SmDocShell *pDocSh = static_cast < SmDocShell * > (GetObjectShell());
@@ -545,7 +508,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
{
if((*pValues).getValueType() != ::getBooleanCppuType())
throw IllegalArgumentException();
- sal_Bool bVal = *(sal_Bool*)(*pValues).getValue();
+ bool bVal = *(sal_Bool*)(*pValues).getValue();
Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId));
aNewFont.SetItalic((bVal) ? ITALIC_NORMAL : ITALIC_NONE);
aFormat.SetFont((*ppEntries)->mnMemberId, aNewFont);
@@ -561,7 +524,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
{
if((*pValues).getValueType() != ::getBooleanCppuType())
throw IllegalArgumentException();
- sal_Bool bVal = *(sal_Bool*)(*pValues).getValue();
+ bool bVal = *(sal_Bool*)(*pValues).getValue();
Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId));
aNewFont.SetWeight((bVal) ? WEIGHT_BOLD : WEIGHT_NORMAL);
aFormat.SetFont((*ppEntries)->mnMemberId, aNewFont);
@@ -695,7 +658,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
sal_uInt32 nSize = aSequence.getLength();
SvMemoryStream aStream ( aSequence.getArray(), nSize, STREAM_READ );
aStream.Seek ( STREAM_SEEK_TO_BEGIN );
- static sal_uInt16 __READONLY_DATA nRange[] =
+ static sal_uInt16 const nRange[] =
{
SID_PRINTSIZE, SID_PRINTSIZE,
SID_PRINTZOOM, SID_PRINTZOOM,
@@ -805,7 +768,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
case HANDLE_FONT_TEXT_POSTURE :
{
const SmFace & rFace = aFormat.GetFont((*ppEntries)->mnMemberId);
- sal_Bool bVal = IsItalic( rFace );
+ bool bVal = IsItalic( rFace );
(*pValue).setValue(&bVal, *(*ppEntries)->mpType);
}
break;
@@ -818,7 +781,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
case HANDLE_FONT_TEXT_WEIGHT :
{
const SmFace & rFace = aFormat.GetFont((*ppEntries)->mnMemberId);
- sal_Bool bVal = IsBold( rFace ); // bold?
+ bool bVal = IsBold( rFace ); // bold?
(*pValue).setValue(&bVal, *(*ppEntries)->mpType);
}
break;
@@ -997,7 +960,7 @@ sal_Int32 SAL_CALL SmModel::getRendererCount(
const uno::Sequence< beans::PropertyValue >& /*xOptions*/ )
throw (IllegalArgumentException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return 1;
}
@@ -1030,7 +993,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SmModel::getRenderer(
const uno::Sequence< beans::PropertyValue >& /*rxOptions*/ )
throw (IllegalArgumentException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (0 != nRenderer)
throw IllegalArgumentException();
@@ -1041,7 +1004,6 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SmModel::getRenderer(
SmPrinterAccess aPrinterAccess( *pDocSh );
Printer *pPrinter = aPrinterAccess.GetPrinter();
- //Point aPrtPageOffset( pPrinter->GetPageOffset() );
Size aPrtPaperSize ( pPrinter->GetPaperSize() );
// if paper size is 0 (usually if no 'real' printer is found),
@@ -1068,7 +1030,7 @@ void SAL_CALL SmModel::render(
const uno::Sequence< beans::PropertyValue >& rxOptions )
throw (IllegalArgumentException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (0 != nRenderer)
throw IllegalArgumentException();
@@ -1106,7 +1068,7 @@ void SAL_CALL SmModel::render(
while (pViewSh && pViewSh->GetObjectShell() != pDocSh)
pViewSh = SfxViewShell::GetNext( *pViewSh, &aTypeId, sal_False /* search non-visible views as well*/ );
SmViewShell *pView = PTR_CAST( SmViewShell, pViewSh );
- DBG_ASSERT( pView, "SmModel::render : no SmViewShell found" );
+ OSL_ENSURE( pView, "SmModel::render : no SmViewShell found" );
if (pView)
{
@@ -1165,7 +1127,7 @@ void SAL_CALL SmModel::render(
void SAL_CALL SmModel::setParent( const uno::Reference< uno::XInterface >& xParent)
throw( lang::NoSupportException, uno::RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
SfxBaseModel::setParent( xParent );
uno::Reference< lang::XUnoTunnel > xParentTunnel( xParent, uno::UNO_QUERY );
if ( xParentTunnel.is() )
@@ -1178,3 +1140,4 @@ void SAL_CALL SmModel::setParent( const uno::Reference< uno::XInterface >& xPare
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx
index 3045d4812ebd..a5e4cc3d6ccd 100644
--- a/starmath/source/utility.cxx
+++ b/starmath/source/utility.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -140,7 +141,6 @@ void SmPickList::Clear()
/**************************************************************************/
-/**************************************************************************/
void * SmFontPickList::CreateItem(const String& /*rString*/)
{
@@ -157,7 +157,7 @@ void SmFontPickList::DestroyItem(void *pItem)
delete (Font *)pItem;
}
-sal_Bool SmFontPickList::CompareItem(const void *pFirstItem, const void *pSecondItem) const
+bool SmFontPickList::CompareItem(const void *pFirstItem, const void *pSecondItem) const
{
Font *pFirstFont, *pSecondFont;
@@ -169,9 +169,9 @@ sal_Bool SmFontPickList::CompareItem(const void *pFirstItem, const void *pSecond
(pFirstFont->GetCharSet() == pSecondFont->GetCharSet()) &&
(pFirstFont->GetWeight() == pSecondFont->GetWeight()) &&
(pFirstFont->GetItalic() == pSecondFont->GetItalic()))
- return (sal_True);
+ return (true);
- return sal_False;
+ return false;
}
String SmFontPickList::GetStringItem(void *pItem)
@@ -189,7 +189,7 @@ String SmFontPickList::GetStringItem(void *pItem)
aString.AppendAscii( pDelim );
aString += String(SmResId(RID_FONTITALIC));
}
- if (IsBold( *pFont )) // bold?
+ if (IsBold( *pFont ))
{
aString.AppendAscii( pDelim );
aString += String(SmResId(RID_FONTBOLD));
@@ -228,8 +228,6 @@ void SmFontPickList::WriteTo(SmFontDialog& rDialog) const
/**************************************************************************/
-/**************************************************************************/
-
IMPL_LINK( SmFontPickListBox, SelectHdl, ListBox *, /*pListBox*/ )
{
sal_uInt16 nPos;
@@ -293,8 +291,6 @@ void SmFontPickListBox::Update(const Font &rFont, const Font &rNewFont)
{
SmFontPickList::Update(rFont, rNewFont);
- // ********************** hier fehlt noch was
-
return;
}
@@ -303,14 +299,12 @@ void SmFontPickListBox::Remove(const Font &rFont)
{
SmFontPickList::Remove(rFont);
- // ********************** hier fehlt noch was
-
return;
}
////////////////////////////////////////
-sal_Bool IsItalic( const Font &rFont )
+bool IsItalic( const Font &rFont )
{
FontItalic eItalic = rFont.GetItalic();
// the code below leaves only _NONE and _DONTKNOW as not italic
@@ -318,7 +312,7 @@ sal_Bool IsItalic( const Font &rFont )
}
-sal_Bool IsBold( const Font &rFont )
+bool IsBold( const Font &rFont )
{
FontWeight eWeight = rFont.GetWeight();
return eWeight != WEIGHT_DONTKNOW && eWeight > WEIGHT_NORMAL;
@@ -328,7 +322,7 @@ sal_Bool IsBold( const Font &rFont )
void SmFace::Impl_Init()
{
SetSize( GetSize() );
- SetTransparent( sal_True );
+ SetTransparent( true );
SetAlign( ALIGN_BASELINE );
SetColor( COL_AUTO );
}
@@ -338,7 +332,7 @@ void SmFace::SetSize(const Size& rSize)
Size aSize (rSize);
// check the requested size against minimum value
- static int __READONLY_DATA nMinVal = SmPtsTo100th_mm(2);
+ static int const nMinVal = SmPtsTo100th_mm(2);
if (aSize.Height() < nMinVal)
aSize.Height() = nMinVal;
@@ -381,3 +375,4 @@ SmFace & operator *= (SmFace &rFace, const Fraction &rFrac)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 7dc10ad5ecea..62c9c8afc01c 100755..100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,6 +59,7 @@
#include <svl/ptitem.hxx>
#include <svl/stritem.hxx>
#include <svtools/transfer.hxx>
+#include <svtools/miscopt.hxx>
#include <svl/undo.hxx>
#include <svl/whiter.hxx>
#include <svx/dialogs.hrc>
@@ -68,6 +70,7 @@
#include <vcl/menu.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/wrkwin.hxx>
+#include <fstream>
#include "unomodel.hxx"
#include "view.hxx"
@@ -77,15 +80,16 @@
#include "starmath.hrc"
#include "toolbox.hxx"
#include "mathmlimport.hxx"
-
+#include "cursor.hxx"
+#include "accessibility.hxx"
#define MINWIDTH 200
#define MINHEIGHT 200
#define MINSPLIT 40
-#define SPLITTERWIDTH 2
+#define SPLITTERWIDTH 2
-#define MINZOOM 25
-#define MAXZOOM 800
+#define MINZOOM 25
+#define MAXZOOM 800
#define SmViewShell
#include "smslots.hxx"
@@ -100,8 +104,7 @@ SmGraphicWindow::SmGraphicWindow(SmViewShell* pShell):
ScrollableWindow(&pShell->GetViewFrame()->GetWindow(), 0),
pAccessible(0),
pViewShell(pShell),
- nZoom(100),
- bIsCursorVisible(sal_False)
+ nZoom(100)
{
// docking windows are usually hidden (often already done in the
// resource) and will be shown by the sfx framework.
@@ -116,6 +119,9 @@ SmGraphicWindow::SmGraphicWindow(SmViewShell* pShell):
SetHelpId(HID_SMA_WIN_DOCUMENT);
SetUniqueId(HID_SMA_WIN_DOCUMENT);
+
+ ShowLine(false);
+ CaretBlinkInit();
}
SmGraphicWindow::~SmGraphicWindow()
@@ -124,6 +130,7 @@ SmGraphicWindow::~SmGraphicWindow()
pAccessible->ClearWin(); // make Accessible defunctional
// Note: memory for pAccessible will be freed when the reference
// xAccessible is released.
+ CaretBlinkStop();
}
void SmGraphicWindow::StateChanged( StateChangedType eType )
@@ -158,25 +165,31 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent& rMEvt)
{
ScrollableWindow::MouseButtonDown(rMEvt);
+ GrabFocus();
+
//
// set formula-cursor and selection of edit window according to the
// position clicked at
//
DBG_ASSERT(rMEvt.GetClicks() > 0, "Sm : 0 clicks");
- if ( rMEvt.IsLeft() && pViewShell->GetEditWindow() )
+ if ( rMEvt.IsLeft() )
{
- const SmNode *pTree = pViewShell->GetDoc()->GetFormulaTree();
- //! kann NULL sein! ZB wenn bereits beim laden des Dokuments (bevor der
- //! Parser angeworfen wurde) ins Fenster geklickt wird.
- if (!pTree)
- return;
-
// get click position relativ to formula
Point aPos (PixelToLogic(rMEvt.GetPosPixel())
- GetFormulaDrawPos());
- // if it was clicked inside the formula then get the appropriate node
+ const SmNode *pTree = pViewShell->GetDoc()->GetFormulaTree();
+ if (!pTree)
+ return;
+
+ if (IsInlineEditEnabled()) {
+ // if it was clicked inside the formula then get the appropriate node
+ if (pTree->OrientedDist(aPos) <= 0)
+ pViewShell->GetDoc()->GetCursor().MoveTo(this, aPos, !rMEvt.IsShift());
+ return;
+ }
const SmNode *pNode = 0;
+ // if it was clicked inside the formula then get the appropriate node
if (pTree->OrientedDist(aPos) <= 0)
pNode = pTree->FindRectClosestTo(aPos);
@@ -184,21 +197,6 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent& rMEvt)
{ SmEditWindow *pEdit = pViewShell->GetEditWindow();
const SmToken aToken (pNode->GetToken());
-#ifdef notnow
- // include introducing symbols of special char and text
- // (ie '%' and '"')
- sal_uInt16 nExtra = (aToken.eType == TSPECIAL || aToken.eType == TTEXT) ? 1 : 0;
-
- // set selection to the beginning of the token
- ESelection aSel (aToken.nRow - 1, aToken.nCol - 1 - nExtra);
-
- if (rMEvt.GetClicks() != 1)
- { // select whole token
- // for text include terminating symbol (ie '"')
- aSel.nEndPos += aToken.aText.Len() + nExtra
- + (aToken.eType == TTEXT ? 1 : 0);
- }
-#endif
// set selection to the beginning of the token
ESelection aSel (aToken.nRow - 1, aToken.nCol - 1);
@@ -215,18 +213,22 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent& rMEvt)
}
}
+bool SmGraphicWindow::IsInlineEditEnabled() const
+{
+ return pViewShell->IsInlineEditEnabled();
+}
+
void SmGraphicWindow::GetFocus()
{
-/*
- if (xAccessible.is())
- {
- uno::Any aOldValue, aNewValue;
- // aOldValue remains empty
- aNewValue <<= AccessibleStateType::FOCUSED;
- pAccessible->LaunchEvent( AccessibleEventId::STATE_CHANGED,
- aOldValue, aNewValue );
- }
-*/
+ if (!IsInlineEditEnabled())
+ return;
+ pViewShell->GetEditWindow()->Flush();
+ //Let view shell know what insertions should be done in visual editor
+ pViewShell->SetInsertIntoEditWindow(false);
+ SetIsCursorVisible(true);
+ ShowLine(true);
+ CaretBlinkStart();
+ RepaintViewShellDoc();
}
void SmGraphicWindow::LoseFocus()
@@ -240,12 +242,60 @@ void SmGraphicWindow::LoseFocus()
pAccessible->LaunchEvent( AccessibleEventId::STATE_CHANGED,
aOldValue, aNewValue );
}
+ if (!IsInlineEditEnabled())
+ return;
+ SetIsCursorVisible(false);
+ ShowLine(false);
+ CaretBlinkStop();
+ RepaintViewShellDoc();
+}
+
+void SmGraphicWindow::RepaintViewShellDoc()
+{
+ SmDocShell &rDoc = *pViewShell->GetDoc();
+ rDoc.Repaint();
}
-void SmGraphicWindow::ShowCursor(sal_Bool bShow)
- // shows or hides the formula-cursor depending on 'bShow' is sal_True or not
+IMPL_LINK( SmGraphicWindow, CaretBlinkTimerHdl, AutoTimer *, EMPTYARG )
{
- sal_Bool bInvert = bShow != IsCursorVisible();
+ if (IsCursorVisible())
+ SetIsCursorVisible(false);
+ else
+ SetIsCursorVisible(true);
+
+ RepaintViewShellDoc();
+
+ return 0;
+}
+
+void SmGraphicWindow::CaretBlinkInit()
+{
+ aCaretBlinkTimer.SetTimeoutHdl(LINK(this, SmGraphicWindow, CaretBlinkTimerHdl));
+ aCaretBlinkTimer.SetTimeout( ScrollableWindow::GetSettings().GetStyleSettings().GetCursorBlinkTime() );
+}
+
+void SmGraphicWindow::CaretBlinkStart()
+{
+ if (!IsInlineEditEnabled())
+ return;
+ if ( aCaretBlinkTimer.GetTimeout() != STYLE_CURSOR_NOBLINKTIME )
+ aCaretBlinkTimer.Start();
+}
+
+void SmGraphicWindow::CaretBlinkStop()
+{
+ if (!IsInlineEditEnabled())
+ return;
+ aCaretBlinkTimer.Stop();
+}
+
+void SmGraphicWindow::ShowCursor(bool bShow)
+ // shows or hides the formula-cursor depending on 'bShow' is true or not
+{
+ if (IsInlineEditEnabled())
+ return;
+
+ bool bInvert = bShow != IsCursorVisible();
if (bInvert)
InvertTracking(aCursorRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW);
@@ -253,9 +303,19 @@ void SmGraphicWindow::ShowCursor(sal_Bool bShow)
SetIsCursorVisible(bShow);
}
+void SmGraphicWindow::ShowLine(bool bShow)
+{
+ if (!IsInlineEditEnabled())
+ return;
+
+ bIsLineVisible = bShow;
+}
void SmGraphicWindow::SetCursor(const SmNode *pNode)
{
+ if (IsInlineEditEnabled())
+ return;
+
const SmNode *pTree = pViewShell->GetDoc()->GetFormulaTree();
// get appropriate rectangle
@@ -273,13 +333,16 @@ void SmGraphicWindow::SetCursor(const Rectangle &rRect)
// The old cursor will be removed, and the new one will be shown if
// that is activated in the ConfigItem
{
+ if (IsInlineEditEnabled())
+ return;
+
SmModule *pp = SM_MOD();
if (IsCursorVisible())
- ShowCursor(sal_False); // clean up remainings of old cursor
+ ShowCursor(false); // clean up remainings of old cursor
aCursorRect = rRect;
if (pp->GetConfig()->IsShowFormulaCursor())
- ShowCursor(sal_True); // draw new cursor
+ ShowCursor(true); // draw new cursor
}
const SmNode * SmGraphicWindow::SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol)
@@ -290,6 +353,9 @@ const SmNode * SmGraphicWindow::SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol)
// rectangle. If not the formula-cursor will be hidden.
// In any case the search result is being returned.
{
+ if (IsInlineEditEnabled())
+ return NULL;
+
// find visible node with token at nRow, nCol
const SmNode *pTree = pViewShell->GetDoc()->GetFormulaTree(),
*pNode = 0;
@@ -299,24 +365,27 @@ const SmNode * SmGraphicWindow::SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol)
if (pNode)
SetCursor(pNode);
else
- ShowCursor(sal_False);
+ ShowCursor(false);
return pNode;
}
-
void SmGraphicWindow::Paint(const Rectangle&)
{
- DBG_ASSERT(pViewShell, "Sm : NULL pointer");
+ OSL_ENSURE(pViewShell, "Sm : NULL pointer");
SmDocShell &rDoc = *pViewShell->GetDoc();
Point aPoint;
- rDoc.Draw(*this, aPoint); //! modifies aPoint to be the topleft
+ rDoc.DrawFormula(*this, aPoint, true); //! modifies aPoint to be the topleft
//! corner of the formula
SetFormulaDrawPos(aPoint);
-
- SetIsCursorVisible(sal_False); // (old) cursor must be drawn again
+ if(IsInlineEditEnabled()) {
+ //Draw cursor if any...
+ if(pViewShell->GetDoc()->HasCursor() && IsLineVisible())
+ pViewShell->GetDoc()->GetCursor().Draw(*this, aPoint, IsCursorVisible());
+ } else {
+ SetIsCursorVisible(false); // (old) cursor must be drawn again
const SmEditWindow *pEdit = pViewShell->GetEditWindow();
if (pEdit)
@@ -329,7 +398,8 @@ void SmGraphicWindow::Paint(const Rectangle&)
SmModule *pp = SM_MOD();
if (pFound && pp->GetConfig()->IsShowFormulaCursor())
- ShowCursor(sal_True);
+ ShowCursor(true);
+ }
}
}
@@ -342,17 +412,133 @@ void SmGraphicWindow::SetTotalSize ()
ScrollableWindow::SetTotalSize( aTmp );
}
-
void SmGraphicWindow::KeyInput(const KeyEvent& rKEvt)
{
- if (! (GetView() && GetView()->KeyInput(rKEvt)) )
- ScrollableWindow::KeyInput(rKEvt);
+ if (!IsInlineEditEnabled()) {
+ if (! (GetView() && GetView()->KeyInput(rKEvt)) )
+ ScrollableWindow::KeyInput(rKEvt);
+ return;
+ }
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
+ SmCursor& rCursor = pViewShell->GetDoc()->GetCursor();
+ switch(nCode)
+ {
+ case KEY_LEFT:
+ {
+ rCursor.Move(this, MoveLeft, !rKEvt.GetKeyCode().IsShift());
+ }break;
+ case KEY_RIGHT:
+ {
+ rCursor.Move(this, MoveRight, !rKEvt.GetKeyCode().IsShift());
+ }break;
+ case KEY_UP:
+ {
+ rCursor.Move(this, MoveUp, !rKEvt.GetKeyCode().IsShift());
+ }break;
+ case KEY_DOWN:
+ {
+ rCursor.Move(this, MoveDown, !rKEvt.GetKeyCode().IsShift());
+ }break;
+ case KEY_RETURN:
+ {
+ if(!rKEvt.GetKeyCode().IsShift())
+ rCursor.InsertRow();
+#ifdef DEBUG_ENABLE_DUMPASDOT
+ else {
+ SmNode *pTree = (SmNode*)pViewShell->GetDoc()->GetFormulaTree();
+ std::fstream file("/tmp/smath-dump.gv", std::fstream::out);
+ String label(pViewShell->GetDoc()->GetText());
+ pTree->DumpAsDot(file, &label);
+ file.close();
+ }
+#endif /* DEBUG_ENABLE_DUMPASDOT */
+ }break;
+ case KEY_DELETE:
+ {
+ if(!rCursor.HasSelection()){
+ rCursor.Move(this, nCode == KEY_DELETE ? MoveRight : MoveLeft, false);
+ if(rCursor.HasComplexSelection()) break;
+ }
+ rCursor.Delete();
+ }break;
+ case KEY_BACKSPACE:
+ {
+ rCursor.DeletePrev(this);
+ }break;
+ case KEY_ADD:
+ rCursor.InsertElement(PlusElement);
+ break;
+ case KEY_SUBTRACT:
+ if(rKEvt.GetKeyCode().IsShift())
+ rCursor.InsertSubSup(RSUB);
+ else
+ rCursor.InsertElement(MinusElement);
+ break;
+ case KEY_MULTIPLY:
+ rCursor.InsertElement(CDotElement);
+ break;
+ case KEY_DIVIDE:
+ rCursor.InsertFraction();
+ break;
+ case KEY_LESS:
+ rCursor.InsertElement(LessThanElement);
+ break;
+ case KEY_GREATER:
+ rCursor.InsertElement(GreaterThanElement);
+ break;
+ case KEY_EQUAL:
+ rCursor.InsertElement(EqualElement);
+ break;
+ case KEY_COPY:
+ rCursor.Copy();
+ break;
+ case KEY_CUT:
+ rCursor.Cut();
+ break;
+ case KEY_PASTE:
+ rCursor.Paste();
+ break;
+ default:
+ {
+ sal_Unicode code = rKEvt.GetCharCode();
+ if(code == ' ') {
+ rCursor.InsertElement(BlankElement);
+ }else if(code == 'c' && rKEvt.GetKeyCode().IsMod1()) {
+ rCursor.Copy();
+ }else if(code == 'x' && rKEvt.GetKeyCode().IsMod1()) {
+ rCursor.Cut();
+ }else if(code == 'v' && rKEvt.GetKeyCode().IsMod1()) {
+ rCursor.Paste();
+ }else if(code == '^') {
+ rCursor.InsertSubSup(RSUP);
+ }else if(code == '(') {
+ rCursor.InsertBrackets(RoundBrackets);
+ }else if(code == '[') {
+ rCursor.InsertBrackets(SquareBrackets);
+ }else if(code == '{') {
+ rCursor.InsertBrackets(CurlyBrackets);
+ }else if(code == '!') {
+ rCursor.InsertElement(FactorialElement);
+ }else if(code == '%') {
+ rCursor.InsertElement(PercentElement);
+ }else{
+ if(code != 0){
+ rCursor.InsertText(code);
+ }else if (! (GetView() && GetView()->KeyInput(rKEvt)) )
+ ScrollableWindow::KeyInput(rKEvt);
+ }
+ }
+ }
+ CaretBlinkStop();
+ CaretBlinkStart();
+ SetIsCursorVisible(true);
+ RepaintViewShellDoc();
}
void SmGraphicWindow::Command(const CommandEvent& rCEvt)
{
- sal_Bool bCallBase = sal_True;
+ bool bCallBase = true;
if ( !pViewShell->GetViewFrame()->GetFrame().IsInPlace() )
{
switch ( rCEvt.GetCommand() )
@@ -366,15 +552,14 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
Point aPos(5, 5);
if (rCEvt.IsMouseEvent())
aPos = rCEvt.GetMousePosPixel();
- DBG_ASSERT( pViewShell, "view shell missing" );
+ OSL_ENSURE( pViewShell, "view shell missing" );
- // added for replaceability of context menus #96085, #93782
+ // added for replaceability of context menus
pViewShell->GetViewFrame()->GetBindings().GetDispatcher()
->ExecutePopup( aResId, this, &aPos );
- //pPopupMenu->Execute( this, aPos );
delete pPopupMenu;
- bCallBase = sal_False;
+ bCallBase = false;
}
break;
@@ -389,7 +574,7 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
else
nTmpZoom += 10;
SetZoom( nTmpZoom );
- bCallBase = sal_False;
+ bCallBase = false;
}
}
break;
@@ -507,7 +692,7 @@ SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings *pBindings_, SfxChildWindow *pChildWi
SfxDockingWindow(pBindings_, pChildWindow, pParent, SmResId(RID_CMDBOXWINDOW)),
aEdit (*this),
aController (aEdit, SID_TEXT, *pBindings_),
- bExiting (sal_False)
+ bExiting (false)
{
Hide ();
@@ -519,13 +704,14 @@ SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings *pBindings_, SfxChildWindow *pChildWi
SmCmdBoxWindow::~SmCmdBoxWindow ()
{
aInitialFocusTimer.Stop();
- bExiting = sal_True;
+ bExiting = true;
}
SmViewShell * SmCmdBoxWindow::GetView()
{
- SfxViewShell *pView = GetBindings().GetDispatcher()->GetFrame()->GetViewShell();
+ SfxDispatcher *pDispatcher = GetBindings().GetDispatcher();
+ SfxViewShell *pView = pDispatcher ? pDispatcher->GetFrame()->GetViewShell() : NULL;
return PTR_CAST(SmViewShell, pView);
}
@@ -634,18 +820,12 @@ void SmCmdBoxWindow::StateChanged( StateChangedType nStateChange )
{
if (STATE_CHANGE_INITSHOW == nStateChange)
{
- Resize(); // #98848# avoid SmEditWindow not being painted correctly
+ Resize(); // avoid SmEditWindow not being painted correctly
// set initial position of window in floating mode
- if (sal_True == IsFloatingMode())
+ if (true == IsFloatingMode())
AdjustPosition(); //! don't change pos in docking-mode !
-// // make sure the formula can be edited right away
-// aEdit.GrabFocus();
-
- // grab focus as above does not work...
- // Thus we implement a timer based solution to get the inital
- // focus in the Edit window.
aInitialFocusTimer.Start();
}
@@ -765,6 +945,7 @@ struct SmViewShell_Impl
{
sfx2::DocumentInserter* pDocInserter;
SfxRequest* pRequest;
+ SvtMiscOptions aOpts;
SmViewShell_Impl() :
pDocInserter( NULL )
@@ -785,6 +966,7 @@ SFX_IMPL_INTERFACE(SmViewShell, SfxViewShell, SmResId(0))
SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_TOOLS | SFX_VISIBILITY_STANDARD |
SFX_VISIBILITY_FULLSCREEN | SFX_VISIBILITY_SERVER,
SmResId(RID_MATH_TOOLBOX ));
+ //Dummy-Objectbar, to avoid quiver while activating
SFX_CHILDWINDOW_REGISTRATION(SID_TASKPANE);
SFX_CHILDWINDOW_REGISTRATION(SmToolBoxWrapper::GetChildWindowId());
@@ -859,8 +1041,8 @@ void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY )
const Fraction &rFrac = rX < rY ? rX : rY;
GetGraphicWindow().SetZoom( (sal_uInt16) long(rFrac * Fraction( 100, 1 )) );
- //Um Rundungsfehler zu minimieren lassen wir von der Basisklasse ggf.
- //auch die krummen Werte einstellen
+ //To avoid rounding errors base class regulates crooked values too
+ //if necessary
SfxViewShell::SetZoomFactor( rX, rY );
}
@@ -1061,8 +1243,6 @@ void SmViewShell::Impl_Print(
const bool bIsPrintFormulaText = rPrintUIOptions.getBoolValue( PRTUIOPT_FORMULA_TEXT, sal_True );
SmPrintSize ePrintSize( static_cast< SmPrintSize >( rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_FORMAT, PRINT_SIZE_NORMAL ) ));
const sal_uInt16 nZoomFactor = static_cast< sal_uInt16 >(rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_SCALE, 100 ));
-// IsIgnoreSpacesRight is a parser option! Thus it does not get evaluated here anymore (too late).
-// const bool bNoRightSpaces = rPrintUIOptions.getBoolValue( PRTUIOPT_NO_RIGHT_SPACE, sal_True );
rOutDev.Push();
rOutDev.SetLineColor( Color(COL_BLACK) );
@@ -1197,7 +1377,7 @@ void SmViewShell::Impl_Print(
rOutDev.SetMapMode(OutputMapMode);
rOutDev.SetClipRegion(Region(aOutRect));
- GetDoc()->Draw(rOutDev, aPos);
+ GetDoc()->DrawFormula(rOutDev, aPos, false);
rOutDev.SetClipRegion();
rOutDev.Pop();
@@ -1206,7 +1386,7 @@ void SmViewShell::Impl_Print(
sal_uInt16 SmViewShell::Print(SfxProgress & /*rProgress*/, sal_Bool /*bIsAPI*/)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Print" );
- DBG_ASSERT( 0, "SmViewShell::Print: no longer used with new UI print dialog. Should be removed!!" );
+ OSL_ENSURE( 0, "SmViewShell::Print: no longer used with new UI print dialog. Should be removed!!" );
return 0;
}
@@ -1260,7 +1440,7 @@ SmEditWindow *SmViewShell::GetEditWindow()
if (pWrapper != NULL)
{
SmEditWindow *pEditWin = pWrapper->GetEditWindow();
- DBG_ASSERT( pEditWin, "SmEditWindow missing" );
+ OSL_ENSURE( pEditWin, "SmEditWindow missing" );
return pEditWin;
}
@@ -1281,7 +1461,7 @@ void SmViewShell::ShowError( const SmErrorDesc *pErrorDesc )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::ShowError" );
- DBG_ASSERT(GetDoc(), "Sm : Document missing");
+ OSL_ENSURE(GetDoc(), "Sm : Document missing");
if (pErrorDesc || 0 != (pErrorDesc = GetDoc()->GetParser().GetError(0)) )
{
SetStatusText( pErrorDesc->Text );
@@ -1295,7 +1475,7 @@ void SmViewShell::NextError()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::NextError" );
- DBG_ASSERT(GetDoc(), "Sm : Document missing");
+ OSL_ENSURE(GetDoc(), "Sm : Document missing");
const SmErrorDesc *pErrorDesc = GetDoc()->GetParser().NextError();
if (pErrorDesc)
@@ -1307,7 +1487,7 @@ void SmViewShell::PrevError()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::PrevError" );
- DBG_ASSERT(GetDoc(), "Sm : Document missing");
+ OSL_ENSURE(GetDoc(), "Sm : Document missing");
const SmErrorDesc *pErrorDesc = GetDoc()->GetParser().PrevError();
if (pErrorDesc)
@@ -1315,14 +1495,14 @@ void SmViewShell::PrevError()
}
-sal_Bool SmViewShell::Insert( SfxMedium& rMedium )
+bool SmViewShell::Insert( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Insert" );
SmDocShell *pDoc = GetDoc();
String aText( pDoc->GetText() );
String aTemp = aText;
- sal_Bool bRet = sal_False, bChkOldVersion = sal_True;
+ bool bRet = false;
uno::Reference < embed::XStorage > xStorage = rMedium.GetStorage();
uno::Reference< container::XNameAccess > xNameAccess( xStorage, uno::UNO_QUERY );
@@ -1330,7 +1510,6 @@ sal_Bool SmViewShell::Insert( SfxMedium& rMedium )
{
if ( xNameAccess->hasByName( C2S( "content.xml" ) ) || xNameAccess->hasByName( C2S( "Content.xml" ) ))
{
- bChkOldVersion = sal_False;
// is this a fabulous math package ?
Reference<com::sun::star::frame::XModel> xModel(pDoc->GetModel());
SmXMLImportWrapper aEquation(xModel); //!! modifies the result of pDoc->GetText() !!
@@ -1346,13 +1525,13 @@ sal_Bool SmViewShell::Insert( SfxMedium& rMedium )
pEditWin->InsertText( aText );
else
{
- DBG_ERROR( "EditWindow missing" );
+ OSL_FAIL( "EditWindow missing" );
aTemp += aText;
aText = aTemp;
}
pDoc->Parse();
- pDoc->SetModified(sal_True);
+ pDoc->SetModified(true);
SfxBindings &rBnd = GetViewFrame()->GetBindings();
rBnd.Invalidate(SID_GAPHIC_SM);
@@ -1362,11 +1541,11 @@ sal_Bool SmViewShell::Insert( SfxMedium& rMedium )
}
-sal_Bool SmViewShell::InsertFrom(SfxMedium &rMedium)
+bool SmViewShell::InsertFrom(SfxMedium &rMedium)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::InsertFrom" );
- sal_Bool bSuccess = sal_False;
+ bool bSuccess = false;
SmDocShell *pDoc = GetDoc();
SvStream *pStream = rMedium.GetInStream();
String aText( pDoc->GetText() );
@@ -1381,10 +1560,6 @@ sal_Bool SmViewShell::InsertFrom(SfxMedium &rMedium)
SmXMLImportWrapper aEquation(xModel); //!! modifies the result of pDoc->GetText() !!
bSuccess = 0 == aEquation.Import(rMedium);
}
- else
- {
- //bSuccess = ImportSM20File( pStream );
- }
}
if( bSuccess )
@@ -1395,13 +1570,13 @@ sal_Bool SmViewShell::InsertFrom(SfxMedium &rMedium)
pEditWin->InsertText( aText );
else
{
- DBG_ERROR( "EditWindow missing" );
+ OSL_FAIL( "EditWindow missing" );
aTemp += aText;
aText = aTemp;
}
pDoc->Parse();
- pDoc->SetModified(sal_True);
+ pDoc->SetModified(true);
SfxBindings &rBnd = GetViewFrame()->GetBindings();
rBnd.Invalidate(SID_GAPHIC_SM);
@@ -1427,15 +1602,16 @@ void SmViewShell::Execute(SfxRequest& rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem *pItem;
- sal_Bool bVal;
+ bool bVal;
if ( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState( SID_FORMULACURSOR, sal_False, &pItem))
+ SFX_ITEM_SET == pArgs->GetItemState( SID_FORMULACURSOR, false, &pItem))
bVal = ((SfxBoolItem *) pItem)->GetValue();
else
bVal = !pp->GetConfig()->IsShowFormulaCursor();
pp->GetConfig()->SetShowFormulaCursor(bVal);
- GetGraphicWindow().ShowCursor(bVal);
+ if (!IsInlineEditEnabled())
+ GetGraphicWindow().ShowCursor(bVal);
break;
}
case SID_DRAW:
@@ -1470,7 +1646,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
break;
case SID_ZOOMOUT:
- DBG_ASSERT(aGraphic.GetZoom() >= 25, "Sm: falsches sal_uInt16 Argument");
+ OSL_ENSURE(aGraphic.GetZoom() >= 25, "Sm: incorrect sal_uInt16 argument");
aGraphic.SetZoom(aGraphic.GetZoom() - 25);
break;
@@ -1515,7 +1691,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
}
catch (uno::Exception &)
{
- DBG_ERROR( "SmViewShell::Execute (SID_PASTEOBJECT): failed to get storage from input stream" );
+ OSL_FAIL( "SmViewShell::Execute (SID_PASTEOBJECT): failed to get storage from input stream" );
}
}
}
@@ -1543,7 +1719,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
case SID_PASTE:
{
- sal_Bool bCallExec = 0 == pWin;
+ bool bCallExec = 0 == pWin;
if( !bCallExec )
{
TransferableDataHelper aDataHelper(
@@ -1554,7 +1730,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
aDataHelper.HasFormat( FORMAT_STRING ))
pWin->Paste();
else
- bCallExec = sal_True;
+ bCallExec = true;
}
if( bCallExec )
{
@@ -1580,17 +1756,24 @@ void SmViewShell::Execute(SfxRequest& rReq)
const SfxInt16Item& rItem =
(const SfxInt16Item&)rReq.GetArgs()->Get(SID_INSERTCOMMAND);
- if (pWin)
+ if (pWin && (bInsertIntoEditWindow || !IsInlineEditEnabled()))
pWin->InsertCommand(rItem.GetValue());
+ if (IsInlineEditEnabled() && (GetDoc() && !bInsertIntoEditWindow)) {
+ GetDoc()->GetCursor().InsertCommand(rItem.GetValue());
+ GetGraphicWindow().GrabFocus();
+ }
break;
}
- case SID_INSERTTEXT:
+ case SID_INSERTSYMBOL:
{
const SfxStringItem& rItem =
- (const SfxStringItem&)rReq.GetArgs()->Get(SID_INSERTTEXT);
- if (pWin)
+ (const SfxStringItem&)rReq.GetArgs()->Get(SID_INSERTSYMBOL);
+
+ if (pWin && (bInsertIntoEditWindow || !IsInlineEditEnabled()))
pWin->InsertText(rItem.GetValue());
+ if (IsInlineEditEnabled() && (GetDoc() && !bInsertIntoEditWindow))
+ GetDoc()->GetCursor().InsertSpecial(rItem.GetValue());
break;
}
@@ -1655,23 +1838,21 @@ void SmViewShell::Execute(SfxRequest& rReq)
{
if ( !GetViewFrame()->GetFrame().IsInPlace() )
{
- //CHINA001 SvxZoomDialog *pDlg = 0;
AbstractSvxZoomDialog *pDlg = 0;
const SfxItemSet *pSet = rReq.GetArgs();
if ( !pSet )
{
SfxItemSet aSet( GetDoc()->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
aSet.Put( SvxZoomItem( SVX_ZOOM_PERCENT, aGraphic.GetZoom()));
- //CHINA001 pDlg = new SvxZoomDialog( &GetViewFrame()->GetWindow(), aSet);
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
pDlg = pFact->CreateSvxZoomDialog(&GetViewFrame()->GetWindow(), aSet);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
+ pDlg->SetLimits( MINZOOM, MAXZOOM );
+ if( pDlg->Execute() != RET_CANCEL )
+ pSet = pDlg->GetOutputItemSet();
}
- pDlg->SetLimits( MINZOOM, MAXZOOM );
- if( pDlg->Execute() != RET_CANCEL )
- pSet = pDlg->GetOutputItemSet();
}
if ( pSet )
{
@@ -1690,7 +1871,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
case SVX_ZOOM_WHOLEPAGE:
{
const MapMode aMap( MAP_100TH_MM );
- SfxPrinter *pPrinter = GetPrinter( sal_True );
+ SfxPrinter *pPrinter = GetPrinter( true );
Point aPoint;
Rectangle OutputRect(aPoint, pPrinter->GetOutputSize());
Size OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(),
@@ -1724,7 +1905,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
OutputDevice *pDev = pDoc->GetPrinter();
if (!pDev || pDev->GetDevFontCount() == 0)
pDev = &SM_MOD()->GetDefaultVirtualDev();
- DBG_ASSERT (pDev, "device for font list missing" );
+ OSL_ENSURE (pDev, "device for font list missing" );
SmModule *pp = SM_MOD();
SmSymbolDialog( NULL, pDev, pp->GetSymbolManager(), *this ).Execute();
@@ -1809,11 +1990,11 @@ void SmViewShell::GetState(SfxItemSet &rSet)
case SID_TOOLBOX:
{
- sal_Bool bState = sal_False;
+ bool bState = false;
SfxChildWindow *pChildWnd = GetViewFrame()->
GetChildWindow( SmToolBoxWrapper::GetChildWindowId() );
if (pChildWnd && pChildWnd->GetWindow()->IsVisible())
- bState = sal_True;
+ bState = true;
rSet.Put(SfxBoolItem(SID_TOOLBOX, bState));
}
break;
@@ -1831,8 +2012,6 @@ SmViewShell::SmViewShell(SfxViewFrame *pFrame_, SfxViewShell *):
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::SmViewShell" );
-// pViewFrame = &pFrame_->GetWindow();
-
SetStatusText(String());
SetWindow(&aGraphic);
SfxShell::SetName(C2S("SmView"));
@@ -1887,16 +2066,13 @@ void SmViewShell::Activate( sal_Bool bIsMDIActivate )
}
}
-//------------------------------------------------------------------
-
IMPL_LINK( SmViewShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
{
- DBG_ASSERT( _pFileDlg, "SmViewShell::DialogClosedHdl(): no file dialog" );
- DBG_ASSERT( pImpl->pDocInserter, "ScDocShell::DialogClosedHdl(): no document inserter" );
+ OSL_ENSURE( _pFileDlg, "SmViewShell::DialogClosedHdl(): no file dialog" );
+ OSL_ENSURE( pImpl->pDocInserter, "ScDocShell::DialogClosedHdl(): no document inserter" );
if ( ERRCODE_NONE == _pFileDlg->GetError() )
{
- //sal_uInt16 nSlot = pImpl->pRequest->GetSlot();
SfxMedium* pMedium = pImpl->pDocInserter->CreateMedium();
if ( pMedium != NULL )
@@ -1916,7 +2092,7 @@ IMPL_LINK( SmViewShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
}
}
- pImpl->pRequest->SetReturnValue( SfxBoolItem( pImpl->pRequest->GetSlot(), sal_True ) );
+ pImpl->pRequest->SetReturnValue( SfxBoolItem( pImpl->pRequest->GetSlot(), true ) );
pImpl->pRequest->Done();
return 0;
}
@@ -1929,7 +2105,7 @@ void SmViewShell::Notify( SfxBroadcaster& , const SfxHint& rHint )
{
case SFX_HINT_MODECHANGED:
case SFX_HINT_DOCCHANGED:
- GetViewFrame()->GetBindings().InvalidateAll(sal_False);
+ GetViewFrame()->GetBindings().InvalidateAll(false);
break;
default:
break;
@@ -1937,3 +2113,9 @@ void SmViewShell::Notify( SfxBroadcaster& , const SfxHint& rHint )
}
}
+bool SmViewShell::IsInlineEditEnabled() const
+{
+ return pImpl->aOpts.IsExperimentalMode();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
new file mode 100644
index 000000000000..4a69d851622b
--- /dev/null
+++ b/starmath/source/visitors.cxx
@@ -0,0 +1,2541 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Jonas Finnemann Jensen <jopsen@gmail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jonas Finnemann Jensen <jopsen@gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "visitors.hxx"
+#include "cursor.hxx"
+
+///////////////////////////////////// SmVisitorTest /////////////////////////////////////
+
+void SmVisitorTest::Visit( SmTableNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NTABLE, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmBraceNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NBRACE, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmBracebodyNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NBRACEBODY, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmOperNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NOPER, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmAlignNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NALIGN, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmAttributNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NATTRIBUT, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmFontNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NFONT, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmUnHorNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NUNHOR, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmBinHorNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NBINHOR, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmBinVerNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NBINVER, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmBinDiagonalNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NBINDIAGONAL, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmSubSupNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NSUBSUP, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmMatrixNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NMATRIX, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmPlaceNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NPLACE, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmTextNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NTEXT, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmSpecialNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NSPECIAL, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmGlyphSpecialNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NGLYPH_SPECIAL, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmMathSymbolNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NMATH, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmBlankNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NBLANK, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmErrorNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NERROR, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmLineNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NLINE, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmExpressionNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NEXPRESSION, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmPolyLineNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NPOLYLINE, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmRootNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NROOT, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmRootSymbolNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NROOTSYMBOL, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmRectangleNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NRECTANGLE, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::Visit( SmVerticalBraceNode* pNode )
+{
+ j_assert( pNode->GetType( ) == NVERTICAL_BRACE, "the visitor-patterns isn't implemented correctly" );
+ VisitChildren( pNode );
+}
+
+void SmVisitorTest::VisitChildren( SmNode* pNode )
+{
+ SmNodeIterator it( pNode );
+ while( it.Next( ) )
+ it->Accept( this );
+}
+
+/////////////////////////////// SmDefaultingVisitor ////////////////////////////////
+
+void SmDefaultingVisitor::Visit( SmTableNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmBraceNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmBracebodyNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmOperNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmAlignNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmAttributNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmFontNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmUnHorNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmBinHorNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmBinVerNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmBinDiagonalNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmSubSupNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmMatrixNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmPlaceNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmTextNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmSpecialNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmGlyphSpecialNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmMathSymbolNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmBlankNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmErrorNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmLineNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmExpressionNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmPolyLineNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmRootNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmRootSymbolNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmRectangleNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+void SmDefaultingVisitor::Visit( SmVerticalBraceNode* pNode )
+{
+ DefaultVisit( pNode );
+}
+
+/////////////////////////////// SmCaretDrawingVisitor ////////////////////////////////
+
+SmCaretDrawingVisitor::SmCaretDrawingVisitor( OutputDevice& rDevice,
+ SmCaretPos position,
+ Point offset,
+ bool caretVisible )
+ : rDev( rDevice )
+{
+ pos = position;
+ Offset = offset;
+ isCaretVisible = caretVisible;
+ j_assert( position.IsValid( ), "Cannot draw invalid position!" );
+ if( !position.IsValid( ) )
+ return;
+
+ //Save device state
+ rDev.Push( PUSH_FONT | PUSH_MAPMODE | PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_TEXTCOLOR );
+
+ pos.pSelectedNode->Accept( this );
+ //Restore device state
+ rDev.Pop( );
+}
+
+void SmCaretDrawingVisitor::Visit( SmTextNode* pNode )
+{
+ long i = pos.Index;
+
+ rDev.SetFont( pNode->GetFont( ) );
+
+ //Find the line
+ SmNode* pLine = SmCursor::FindTopMostNodeInLine( pNode );
+
+ //Find coordinates
+ long left = pNode->GetLeft( ) + rDev.GetTextWidth( pNode->GetText( ), 0, i ) + Offset.X( );
+ long top = pLine->GetTop( ) + Offset.Y( );
+ long height = pLine->GetHeight( );
+ long left_line = pLine->GetLeft( ) + Offset.X( );
+ long right_line = pLine->GetRight( ) + Offset.X( );
+
+ //Set color
+ rDev.SetLineColor( Color( COL_BLACK ) );
+
+ if ( isCaretVisible ) {
+ //Draw vertical line
+ Point p1( left, top );
+ Point p2( left, top + height );
+ rDev.DrawLine( p1, p2 );
+ }
+
+ //Underline the line
+ Point pLeft( left_line, top + height );
+ Point pRight( right_line, top + height );
+ rDev.DrawLine( pLeft, pRight );
+}
+
+void SmCaretDrawingVisitor::DefaultVisit( SmNode* pNode )
+{
+ rDev.SetLineColor( Color( COL_BLACK ) );
+
+ //Find the line
+ SmNode* pLine = SmCursor::FindTopMostNodeInLine( pNode );
+
+ //Find coordinates
+ long left = pNode->GetLeft( ) + Offset.X( ) + ( pos.Index == 1 ? pNode->GetWidth( ) : 0 );
+ long top = pLine->GetTop( ) + Offset.Y( );
+ long height = pLine->GetHeight( );
+ long left_line = pLine->GetLeft( ) + Offset.X( );
+ long right_line = pLine->GetRight( ) + Offset.X( );
+
+ //Set color
+ rDev.SetLineColor( Color( COL_BLACK ) );
+
+ if ( isCaretVisible ) {
+ //Draw vertical line
+ Point p1( left, top );
+ Point p2( left, top + height );
+ rDev.DrawLine( p1, p2 );
+ }
+
+ //Underline the line
+ Point pLeft( left_line, top + height );
+ Point pRight( right_line, top + height );
+ rDev.DrawLine( pLeft, pRight );
+}
+
+/////////////////////////////// SmCaretPos2LineVisitor ////////////////////////////////
+
+void SmCaretPos2LineVisitor::Visit( SmTextNode* pNode )
+{
+ //Save device state
+ pDev->Push( PUSH_FONT | PUSH_TEXTCOLOR );
+
+ long i = pos.Index;
+
+ pDev->SetFont( pNode->GetFont( ) );
+
+ //Find coordinates
+ long left = pNode->GetLeft( ) + pDev->GetTextWidth( pNode->GetText( ), 0, i );
+ long top = pNode->GetTop( );
+ long height = pNode->GetHeight( );
+
+ line = SmCaretLine( left, top, height );
+
+ //Restore device state
+ pDev->Pop( );
+}
+
+void SmCaretPos2LineVisitor::DefaultVisit( SmNode* pNode )
+{
+ //Vertical line ( code from SmCaretDrawingVisitor )
+ Point p1 = pNode->GetTopLeft( );
+ if( pos.Index == 1 )
+ p1.Move( pNode->GetWidth( ), 0 );
+
+ line = SmCaretLine( p1.X( ), p1.Y( ), pNode->GetHeight( ) );
+}
+
+/////////////////////////////// Nasty temporary device!!! ////////////////////////////////
+
+#include <tools/gen.hxx>
+#include <tools/fract.hxx>
+#include <rtl/math.hxx>
+#include <tools/color.hxx>
+#include <vcl/metric.hxx>
+#include <vcl/lineinfo.hxx>
+#include <vcl/outdev.hxx>
+#include <sfx2/module.hxx>
+#include "symbol.hxx"
+#include "smmod.hxx"
+
+class SmTmpDevice2
+{
+ OutputDevice &rOutDev;
+
+ // disallow use of copy-constructor and assignment-operator
+ SmTmpDevice2( const SmTmpDevice2 &rTmpDev );
+ SmTmpDevice2 & operator = ( const SmTmpDevice2 &rTmpDev );
+
+ Color Impl_GetColor( const Color& rColor );
+
+public:
+ SmTmpDevice2( OutputDevice &rTheDev, bool bUseMap100th_mm );
+ ~SmTmpDevice2( ) { rOutDev.Pop( ); }
+
+ void SetFont( const Font &rNewFont );
+
+ void SetLineColor( const Color& rColor ) { rOutDev.SetLineColor( Impl_GetColor( rColor ) ); }
+ void SetFillColor( const Color& rColor ) { rOutDev.SetFillColor( Impl_GetColor( rColor ) ); }
+ void SetTextColor( const Color& rColor ) { rOutDev.SetTextColor( Impl_GetColor( rColor ) ); }
+
+ operator OutputDevice & ( ) { return rOutDev; }
+};
+
+SmTmpDevice2::SmTmpDevice2( OutputDevice &rTheDev, bool bUseMap100th_mm ) :
+ rOutDev( rTheDev )
+{
+ rOutDev.Push( PUSH_FONT | PUSH_MAPMODE |
+ PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_TEXTCOLOR );
+ if ( bUseMap100th_mm && MAP_100TH_MM != rOutDev.GetMapMode( ).GetMapUnit( ) )
+ {
+ OSL_FAIL( "incorrect MapMode?" );
+ rOutDev.SetMapMode( MAP_100TH_MM ); //format for 100% always
+ }
+}
+
+Color SmTmpDevice2::Impl_GetColor( const Color& rColor )
+{
+ ColorData nNewCol = rColor.GetColor( );
+ if ( COL_AUTO == nNewCol )
+ {
+ if ( OUTDEV_PRINTER == rOutDev.GetOutDevType( ) )
+ nNewCol = COL_BLACK;
+ else
+ {
+ Color aBgCol( rOutDev.GetBackground( ).GetColor( ) );
+ if ( OUTDEV_WINDOW == rOutDev.GetOutDevType( ) )
+ aBgCol = ( ( Window & ) rOutDev ).GetDisplayBackground( ).GetColor( );
+
+ nNewCol = SM_MOD( )->GetColorConfig( ).GetColorValue( svtools::FONTCOLOR ).nColor;
+
+ Color aTmpColor( nNewCol );
+ if ( aBgCol.IsDark( ) && aTmpColor.IsDark( ) )
+ nNewCol = COL_WHITE;
+ else if ( aBgCol.IsBright( ) && aTmpColor.IsBright( ) )
+ nNewCol = COL_BLACK;
+ }
+ }
+ return Color( nNewCol );
+}
+
+void SmTmpDevice2::SetFont( const Font &rNewFont )
+{
+ rOutDev.SetFont( rNewFont );
+ rOutDev.SetTextColor( Impl_GetColor( rNewFont.GetColor( ) ) );
+}
+
+/////////////////////////////// SmDrawingVisitor ////////////////////////////////
+
+void SmDrawingVisitor::Visit( SmTableNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmBraceNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmBracebodyNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmOperNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmAlignNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmAttributNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmFontNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmUnHorNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmBinHorNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmBinVerNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmBinDiagonalNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmSubSupNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmMatrixNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmPlaceNode* pNode )
+{
+ DrawSpecialNode( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmTextNode* pNode )
+{
+ DrawTextNode( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmSpecialNode* pNode )
+{
+ DrawSpecialNode( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmGlyphSpecialNode* pNode )
+{
+ DrawSpecialNode( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmMathSymbolNode* pNode )
+{
+ DrawSpecialNode( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmBlankNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmErrorNode* pNode )
+{
+ DrawSpecialNode( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmLineNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmExpressionNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmRootNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmVerticalBraceNode* pNode )
+{
+ DrawChildren( pNode );
+}
+
+void SmDrawingVisitor::Visit( SmRootSymbolNode* pNode )
+{
+ if ( pNode->IsPhantom( ) )
+ return;
+
+ // draw root-sign itself
+ DrawSpecialNode( pNode );
+
+ SmTmpDevice2 aTmpDev( ( OutputDevice & ) rDev, true );
+ aTmpDev.SetFillColor( pNode->GetFont( ).GetColor( ) );
+ rDev.SetLineColor( );
+ aTmpDev.SetFont( pNode->GetFont( ) );
+
+ // since the width is always unscaled it corresponds ot the _original_
+ // _unscaled_ font height to be used, we use that to calculate the
+ // bar height. Thus it is independent of the arguments height.
+ // ( see display of sqrt QQQ versus sqrt stack{Q#Q#Q#Q} )
+ long nBarHeight = pNode->GetWidth( ) * 7L / 100L;
+ long nBarWidth = pNode->GetBodyWidth( ) + pNode->GetBorderWidth( );
+ Point aBarOffset( pNode->GetWidth( ), +pNode->GetBorderWidth( ) );
+ Point aBarPos( Position + aBarOffset );
+
+ Rectangle aBar( aBarPos, Size( nBarWidth, nBarHeight ) );
+ //! avoid GROWING AND SHRINKING of drawn rectangle when constantly
+ //! increasing zoomfactor.
+ // This is done by shifting it's output-position to a point that
+ // corresponds exactly to a pixel on the output device.
+ Point aDrawPos( rDev.PixelToLogic( rDev.LogicToPixel( aBar.TopLeft( ) ) ) );
+ aBar.SetPos( aDrawPos );
+
+ rDev.DrawRect( aBar );
+}
+
+void SmDrawingVisitor::Visit( SmPolyLineNode* pNode )
+{
+ if ( pNode->IsPhantom( ) )
+ return;
+
+ long nBorderwidth = pNode->GetFont( ).GetBorderWidth( );
+
+ LineInfo aInfo;
+ aInfo.SetWidth( pNode->GetWidth( ) - 2 * nBorderwidth );
+
+ Point aOffset ( Point( ) - pNode->GetPolygon( ).GetBoundRect( ).TopLeft( )
+ + Point( nBorderwidth, nBorderwidth ) ),
+ aPos ( Position + aOffset );
+ pNode->GetPolygon( ).Move( aPos.X( ), aPos.Y( ) ); //Works because Polygon wraps a pointer
+
+ SmTmpDevice2 aTmpDev ( ( OutputDevice & ) rDev, false );
+ aTmpDev.SetLineColor( pNode->GetFont( ).GetColor( ) );
+
+ rDev.DrawPolyLine( pNode->GetPolygon( ), aInfo );
+}
+
+void SmDrawingVisitor::Visit( SmRectangleNode* pNode )
+{
+ if ( pNode->IsPhantom( ) )
+ return;
+
+ SmTmpDevice2 aTmpDev ( ( OutputDevice & ) rDev, false );
+ aTmpDev.SetFillColor( pNode->GetFont( ).GetColor( ) );
+ rDev.SetLineColor( );
+ aTmpDev.SetFont( pNode->GetFont( ) );
+
+ sal_uLong nTmpBorderWidth = pNode->GetFont( ).GetBorderWidth( );
+
+ // get rectangle and remove borderspace
+ Rectangle aTmp ( pNode->AsRectangle( ) + Position - pNode->GetTopLeft( ) );
+ aTmp.Left( ) += nTmpBorderWidth;
+ aTmp.Right( ) -= nTmpBorderWidth;
+ aTmp.Top( ) += nTmpBorderWidth;
+ aTmp.Bottom( ) -= nTmpBorderWidth;
+
+ DBG_ASSERT( aTmp.GetHeight( ) > 0 && aTmp.GetWidth( ) > 0,
+ "Sm: leeres Rechteck" );
+
+ //! avoid GROWING AND SHRINKING of drawn rectangle when constantly
+ //! increasing zoomfactor.
+ // This is done by shifting it's output-position to a point that
+ // corresponds exactly to a pixel on the output device.
+ Point aPos ( rDev.PixelToLogic( rDev.LogicToPixel( aTmp.TopLeft( ) ) ) );
+ aTmp.SetPos( aPos );
+
+ rDev.DrawRect( aTmp );
+}
+
+void SmDrawingVisitor::DrawTextNode( SmTextNode* pNode )
+{
+ if ( pNode->IsPhantom( ) || pNode->GetText( ).Len( ) == 0 || pNode->GetText( ).GetChar( 0 ) == xub_Unicode( '\0' ) )
+ return;
+
+ SmTmpDevice2 aTmpDev ( ( OutputDevice & ) rDev, false );
+ aTmpDev.SetFont( pNode->GetFont( ) );
+
+ Point aPos ( Position );
+ aPos.Y( ) += pNode->GetBaselineOffset( );
+ // auf Pixelkoordinaten runden
+ aPos = rDev.PixelToLogic( rDev.LogicToPixel( aPos ) );
+
+ rDev.DrawStretchText( aPos, pNode->GetWidth( ), pNode->GetText( ) );
+}
+
+void SmDrawingVisitor::DrawSpecialNode( SmSpecialNode* pNode )
+{
+ //! since this chars might come from any font, that we may not have
+ //! set to ALIGN_BASELINE yet, we do it now.
+ pNode->GetFont( ).SetAlign( ALIGN_BASELINE );
+
+ DrawTextNode( pNode );
+}
+
+void SmDrawingVisitor::DrawChildren( SmNode* pNode )
+{
+ if ( pNode->IsPhantom( ) )
+ return;
+
+ Point rPosition = Position;
+
+ SmNodeIterator it( pNode );
+ while( it.Next( ) )
+ {
+ Point aOffset ( it->GetTopLeft( ) - pNode->GetTopLeft( ) );
+ Position = rPosition + aOffset;
+ it->Accept( this );
+ }
+}
+
+/////////////////////////////// SmSetSelectionVisitor ////////////////////////////////
+
+SmSetSelectionVisitor::SmSetSelectionVisitor( SmCaretPos startPos, SmCaretPos endPos, SmNode* pTree) {
+ StartPos = startPos;
+ EndPos = endPos;
+ IsSelecting = false;
+
+ //Assume that pTree is a SmTableNode
+ j_assert(pTree->GetType() == NTABLE, "pTree should be a SmTableNode!");
+ //Visit root node, this is special as this node cannot be selected, but it's children can!
+ if(pTree->GetType() == NTABLE){
+ //Change state if StartPos is infront of this node
+ if( StartPos.pSelectedNode == pTree && StartPos.Index == 0 )
+ IsSelecting = !IsSelecting;
+ //Change state if EndPos is infront of this node
+ if( EndPos.pSelectedNode == pTree && EndPos.Index == 0 )
+ IsSelecting = !IsSelecting;
+ j_assert(!IsSelecting, "Caret positions needed to set IsSelecting about, shouldn't be possible!");
+
+ //Visit lines
+ SmNodeIterator it( pTree );
+ while( it.Next( ) ) {
+ it->Accept( this );
+ //If we started a selection in this line and it haven't ended, we do that now!
+ if(IsSelecting) {
+ IsSelecting = false;
+ SetSelectedOnAll(it.Current(), true);
+ //Set StartPos and EndPos to invalid positions, this ensures that an unused
+ //start or end (because we forced end above), doesn't start a new selection.
+ StartPos = EndPos = SmCaretPos();
+ }
+ }
+ //Check if pTree isn't selected
+ j_assert(!pTree->IsSelected(), "pTree should never be selected!");
+ //Discard the selection if there's a bug (it's better than crashing)
+ if(pTree->IsSelected())
+ SetSelectedOnAll(pTree, false);
+ }else //This shouldn't happen, but I don't see any reason to die if it does
+ pTree->Accept(this);
+}
+
+void SmSetSelectionVisitor::SetSelectedOnAll( SmNode* pSubTree, bool IsSelected ) {
+ pSubTree->SetSelected( IsSelected );
+
+ //Quick BFS to set all selections
+ SmNodeIterator it( pSubTree );
+ while( it.Next( ) )
+ SetSelectedOnAll( it.Current( ), IsSelected );
+}
+
+void SmSetSelectionVisitor::DefaultVisit( SmNode* pNode ) {
+ //Change state if StartPos is infront of this node
+ if( StartPos.pSelectedNode == pNode && StartPos.Index == 0 )
+ IsSelecting = !IsSelecting;
+ //Change state if EndPos is infront of this node
+ if( EndPos.pSelectedNode == pNode && EndPos.Index == 0 )
+ IsSelecting = !IsSelecting;
+
+ //Cache current state
+ bool WasSelecting = IsSelecting;
+ bool ChangedState = false;
+
+ //Set selected
+ pNode->SetSelected( IsSelecting );
+
+ //Visit children
+ SmNodeIterator it( pNode );
+ while( it.Next( ) )
+ {
+ it->Accept( this );
+ ChangedState = ( WasSelecting != IsSelecting ) || ChangedState;
+ }
+
+ //If state changed
+ if( ChangedState )
+ {
+ //Select this node and all of it's children
+ //(Make exception for SmBracebodyNode)
+ if( pNode->GetType() != NBRACEBODY ||
+ !pNode->GetParent() ||
+ pNode->GetParent()->GetType() != NBRACE )
+ SetSelectedOnAll( pNode, true );
+ else
+ SetSelectedOnAll( pNode->GetParent(), true );
+ /* If the equation is: sqrt{2 + 4} + 5
+ * And the selection is: sqrt{2 + [4} +] 5
+ * Where [ denotes StartPos and ] denotes EndPos
+ * Then the sqrt node should be selected, so that the
+ * effective selection is: [sqrt{2 + 4} +] 5
+ * The same is the case if we swap StartPos and EndPos.
+ */
+ }
+
+ //Change state if StartPos is after this node
+ if( StartPos.pSelectedNode == pNode && StartPos.Index == 1 )
+ {
+ IsSelecting = !IsSelecting;
+ }
+ //Change state if EndPos is after of this node
+ if( EndPos.pSelectedNode == pNode && EndPos.Index == 1 )
+ {
+ IsSelecting = !IsSelecting;
+ }
+}
+
+void SmSetSelectionVisitor::VisitCompositionNode( SmNode* pNode ) {
+ //Change state if StartPos is infront of this node
+ if( StartPos.pSelectedNode == pNode && StartPos.Index == 0 )
+ IsSelecting = !IsSelecting;
+ //Change state if EndPos is infront of this node
+ if( EndPos.pSelectedNode == pNode && EndPos.Index == 0 )
+ IsSelecting = !IsSelecting;
+
+ //Cache current state
+ bool WasSelecting = IsSelecting;
+
+ //Visit children
+ SmNodeIterator it( pNode );
+ while( it.Next( ) )
+ it->Accept( this );
+
+ //Set selected, if everything was selected
+ pNode->SetSelected( WasSelecting && IsSelecting );
+
+ //Change state if StartPos is after this node
+ if( StartPos.pSelectedNode == pNode && StartPos.Index == 1 )
+ IsSelecting = !IsSelecting;
+ //Change state if EndPos is after of this node
+ if( EndPos.pSelectedNode == pNode && EndPos.Index == 1 )
+ IsSelecting = !IsSelecting;
+}
+
+void SmSetSelectionVisitor::Visit( SmTextNode* pNode ) {
+ long i1 = -1,
+ i2 = -1;
+ if( StartPos.pSelectedNode == pNode )
+ i1 = StartPos.Index;
+ if( EndPos.pSelectedNode == pNode )
+ i2 = EndPos.Index;
+
+ long start, end;
+ pNode->SetSelected( true );
+ if( i1 != -1 && i2 != -1 ) {
+ start = i1 < i2 ? i1 : i2; //MIN
+ end = i1 > i2 ? i1 : i2; //MAX
+ } else if( IsSelecting && i1 != -1 ) {
+ start = 0;
+ end = i1;
+ IsSelecting = false;
+ } else if( IsSelecting && i2 != -1 ) {
+ start = 0;
+ end = i2;
+ IsSelecting = false;
+ } else if( !IsSelecting && i1 != -1 ) {
+ start = i1;
+ end = pNode->GetText( ).Len( );
+ IsSelecting = true;
+ } else if( !IsSelecting && i2 != -1 ) {
+ start = i2;
+ end = pNode->GetText( ).Len( );
+ IsSelecting = true;
+ } else if( IsSelecting ) {
+ start = 0;
+ end = pNode->GetText( ).Len( );
+ } else {
+ pNode->SetSelected( false );
+ start = 0;
+ end = 0;
+ }
+ pNode->SetSelected( start != end );
+ pNode->SetSelectionStart( start );
+ pNode->SetSelectionEnd( end );
+}
+
+void SmSetSelectionVisitor::Visit( SmExpressionNode* pNode ) {
+ VisitCompositionNode( pNode );
+}
+
+void SmSetSelectionVisitor::Visit( SmLineNode* pNode ) {
+ VisitCompositionNode( pNode );
+}
+
+void SmSetSelectionVisitor::Visit( SmAlignNode* pNode ) {
+ VisitCompositionNode( pNode );
+}
+
+void SmSetSelectionVisitor::Visit( SmBinHorNode* pNode ) {
+ VisitCompositionNode( pNode );
+}
+
+void SmSetSelectionVisitor::Visit( SmUnHorNode* pNode ) {
+ VisitCompositionNode( pNode );
+}
+
+void SmSetSelectionVisitor::Visit( SmFontNode* pNode ) {
+ VisitCompositionNode( pNode );
+}
+
+/////////////////////////////// SmCaretPosGraphBuildingVisitor ////////////////////////////////
+
+SmCaretPosGraphBuildingVisitor::SmCaretPosGraphBuildingVisitor( SmNode* pRootNode ) {
+ pRightMost = NULL;
+ pGraph = new SmCaretPosGraph( );
+ //pRootNode should always be a table
+ j_assert( pRootNode->GetType( ) == NTABLE, "pRootNode must be a table node");
+ //Handle the special case where NTABLE is used a rootnode
+ if( pRootNode->GetType( ) == NTABLE ){
+ //Children are SmLineNodes
+ //Or so I thought... Aparently, the children can be instances of SmExpression
+ //especially if there's a error in the formula... So he we go, a simple work around.
+ SmNodeIterator it( pRootNode );
+ while( it.Next( ) ){
+ //There's a special invariant between this method and the Visit( SmLineNode* )
+ //Usually pRightMost may not be NULL, to avoid this pRightMost should here be
+ //set to a new SmCaretPos infront of it.Current( ), however, if it.Current( ) is
+ //an instance of SmLineNode we let SmLineNode create this position infront of
+ //the visual line.
+ //The argument for doing this is that we now don't have to worry about SmLineNode
+ //being a visual line composition node. Thus, no need for yet another special case
+ //in SmCursor::IsLineCompositionNode and everywhere this method is used.
+ //if( it->GetType( ) != NLINE )
+ pRightMost = pGraph->Add( SmCaretPos( it.Current( ), 0 ) );
+ it->Accept( this );
+ }
+ }else
+ pRootNode->Accept(this);
+}
+
+void SmCaretPosGraphBuildingVisitor::Visit( SmLineNode* pNode ){
+ SmNodeIterator it( pNode );
+ while( it.Next( ) ){
+ it->Accept( this );
+ }
+}
+
+/** Build SmCaretPosGraph for SmTableNode
+ * This method covers cases where SmTableNode is used in a binom or stack,
+ * the special case where it is used as root node for the entire formula is
+ * handled in the constructor.
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmTableNode* pNode ){
+ SmCaretPosGraphEntry *left = pRightMost,
+ *right = pGraph->Add( SmCaretPos( pNode, 1) );
+ bool bIsFirst = true;
+ SmNodeIterator it( pNode );
+ while( it.Next() ){
+ pRightMost = pGraph->Add( SmCaretPos( it.Current(), 0 ), left);
+ if(bIsFirst)
+ left->SetRight(pRightMost);
+ it->Accept( this );
+ pRightMost->SetRight(right);
+ if(bIsFirst)
+ right->SetLeft(pRightMost);
+ bIsFirst = false;
+ }
+ pRightMost = right;
+}
+
+/** Build SmCaretPosGraph for SmSubSupNode
+ *
+ * The child positions in a SubSupNode, where H is the body:
+ * \code
+ * CSUP
+ *
+ * LSUP H H RSUP
+ * H H
+ * HHHH
+ * H H
+ * LSUB H H RSUB
+ *
+ * CSUB
+ * \endcode
+ *
+ * Graph over these, where "left" is before the SmSubSupNode and "right" is after:
+ * \dot
+ * digraph Graph{
+ * left -> H;
+ * H -> right;
+ * LSUP -> H;
+ * LSUB -> H;
+ * CSUP -> right;
+ * CSUB -> right;
+ * RSUP -> right;
+ * RSUB -> right;
+ * };
+ * \enddot
+ *
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmSubSupNode* pNode )
+{
+ SmCaretPosGraphEntry *left,
+ *right,
+ *bodyLeft,
+ *bodyRight;
+
+ left = pRightMost;
+ j_assert( pRightMost, "pRightMost shouldn't be NULL here!" );
+
+ //Create bodyLeft
+ j_assert( pNode->GetBody( ), "SmSubSupNode Doesn't have a body!" );
+ bodyLeft = pGraph->Add( SmCaretPos( pNode->GetBody( ), 0 ), left );
+ left->SetRight( bodyLeft ); //TODO: Don't make this if LSUP or LSUB are NULL ( not sure??? )
+
+ //Create right
+ right = pGraph->Add( SmCaretPos( pNode, 1 ) );
+
+ //Visit the body, to get bodyRight
+ pRightMost = bodyLeft;
+ pNode->GetBody( )->Accept( this );
+ bodyRight = pRightMost;
+ bodyRight->SetRight( right );
+ right->SetLeft( bodyRight );
+
+ SmNode* pChild;
+ //If there's an LSUP
+ if( ( pChild = pNode->GetSubSup( LSUP ) ) ){
+ SmCaretPosGraphEntry *cLeft; //Child left
+ cLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left );
+
+ pRightMost = cLeft;
+ pChild->Accept( this );
+
+ pRightMost->SetRight( bodyLeft );
+ }
+ //If there's an LSUB
+ if( ( pChild = pNode->GetSubSup( LSUB ) ) ){
+ SmCaretPosGraphEntry *cLeft; //Child left
+ cLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left );
+
+ pRightMost = cLeft;
+ pChild->Accept( this );
+
+ pRightMost->SetRight( bodyLeft );
+ }
+ //If there's an CSUP
+ if( ( pChild = pNode->GetSubSup( CSUP ) ) ){
+ SmCaretPosGraphEntry *cLeft; //Child left
+ cLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left );
+
+ pRightMost = cLeft;
+ pChild->Accept( this );
+
+ pRightMost->SetRight( right );
+ }
+ //If there's an CSUB
+ if( ( pChild = pNode->GetSubSup( CSUB ) ) ){
+ SmCaretPosGraphEntry *cLeft; //Child left
+ cLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left );
+
+ pRightMost = cLeft;
+ pChild->Accept( this );
+
+ pRightMost->SetRight( right );
+ }
+ //If there's an RSUP
+ if( ( pChild = pNode->GetSubSup( RSUP ) ) ){
+ SmCaretPosGraphEntry *cLeft; //Child left
+ cLeft = pGraph->Add( SmCaretPos( pChild, 0 ), bodyRight );
+
+ pRightMost = cLeft;
+ pChild->Accept( this );
+
+ pRightMost->SetRight( right );
+ }
+ //If there's an RSUB
+ if( ( pChild = pNode->GetSubSup( RSUB ) ) ){
+ SmCaretPosGraphEntry *cLeft; //Child left
+ cLeft = pGraph->Add( SmCaretPos( pChild, 0 ), bodyRight );
+
+ pRightMost = cLeft;
+ pChild->Accept( this );
+
+ pRightMost->SetRight( right );
+ }
+
+ //Set return parameters
+ pRightMost = right;
+}
+
+/** Build caret position for SmOperNode
+ *
+ * If first child is an SmSubSupNode we will ignore it's
+ * body, as this body is a SmMathSymbol, for SUM, INT or similar
+ * that shouldn't be subject to modification.
+ * If first child is not a SmSubSupNode, ignore it completely
+ * as it is a SmMathSymbol.
+ *
+ * The child positions in a SmOperNode, where H is symbol, e.g. int, sum or similar:
+ * \code
+ * TO
+ *
+ * LSUP H H RSUP BBB BB BBB B B
+ * H H B B B B B B B B
+ * HHHH BBB B B B B B
+ * H H B B B B B B B
+ * LSUB H H RSUB BBB BB BBB B
+ *
+ * FROM
+ * \endcode
+ * Notice, CSUP, etc. are actually granchildren, but inorder to ignore H, these are visited
+ * from here. If they are present, that is if pOper is an instance of SmSubSupNode.
+ *
+ * Graph over these, where "left" is before the SmOperNode and "right" is after:
+ * \dot
+ * digraph Graph{
+ * left -> BODY;
+ * BODY -> right;
+ * LSUP -> BODY;
+ * LSUB -> BODY;
+ * TO -> BODY;
+ * FROM -> BODY;
+ * RSUP -> BODY;
+ * RSUB -> BODY;
+ * };
+ * \enddot
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmOperNode* pNode )
+{
+ SmNode *pOper = pNode->GetSubNode( 0 ),
+ *pBody = pNode->GetSubNode( 1 );
+
+ SmCaretPosGraphEntry *left = pRightMost,
+ *bodyLeft,
+ *bodyRight,
+ *right;
+ //Create body left
+ bodyLeft = pGraph->Add( SmCaretPos( pBody, 0 ), left );
+ left->SetRight( bodyLeft );
+
+ //Visit body, get bodyRight
+ pRightMost = bodyLeft;
+ pBody->Accept( this );
+ bodyRight = pRightMost;
+
+ //Create right
+ right = pGraph->Add( SmCaretPos( pNode, 1 ), bodyRight );
+ bodyRight->SetRight( right );
+
+ //Get subsup pNode if any
+ SmSubSupNode* pSubSup = pOper->GetType( ) == NSUBSUP ? ( SmSubSupNode* )pOper : NULL;
+
+ SmNode* pChild;
+ SmCaretPosGraphEntry *childLeft;
+ if( pSubSup && ( pChild = pSubSup->GetSubSup( LSUP ) ) ) {
+ //Create position infront of pChild
+ childLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left );
+ //Visit pChild
+ pRightMost = childLeft;
+ pChild->Accept( this );
+ //Set right on pRightMost from pChild
+ pRightMost->SetRight( bodyLeft );
+ }
+ if( pSubSup && ( pChild = pSubSup->GetSubSup( LSUB ) ) ) {
+ //Create position infront of pChild
+ childLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left );
+ //Visit pChild
+ pRightMost = childLeft;
+ pChild->Accept( this );
+ //Set right on pRightMost from pChild
+ pRightMost->SetRight( bodyLeft );
+ }
+ if( pSubSup && ( pChild = pSubSup->GetSubSup( CSUP ) ) ) {//TO
+ //Create position infront of pChild
+ childLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left );
+ //Visit pChild
+ pRightMost = childLeft;
+ pChild->Accept( this );
+ //Set right on pRightMost from pChild
+ pRightMost->SetRight( bodyLeft );
+ }
+ if( pSubSup && ( pChild = pSubSup->GetSubSup( CSUB ) ) ) { //FROM
+ //Create position infront of pChild
+ childLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left );
+ //Visit pChild
+ pRightMost = childLeft;
+ pChild->Accept( this );
+ //Set right on pRightMost from pChild
+ pRightMost->SetRight( bodyLeft );
+ }
+ if( pSubSup && ( pChild = pSubSup->GetSubSup( RSUP ) ) ) {
+ //Create position infront of pChild
+ childLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left );
+ //Visit pChild
+ pRightMost = childLeft;
+ pChild->Accept( this );
+ //Set right on pRightMost from pChild
+ pRightMost->SetRight( bodyLeft );
+ }
+ if( pSubSup && ( pChild = pSubSup->GetSubSup( RSUB ) ) ) {
+ //Create position infront of pChild
+ childLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left );
+ //Visit pChild
+ pRightMost = childLeft;
+ pChild->Accept( this );
+ //Set right on pRightMost from pChild
+ pRightMost->SetRight( bodyLeft );
+ }
+
+ //Return right
+ pRightMost = right;
+}
+
+void SmCaretPosGraphBuildingVisitor::Visit( SmMatrixNode* pNode )
+{
+ SmCaretPosGraphEntry *left = pRightMost,
+ *right = pGraph->Add( SmCaretPos( pNode, 1 ) );
+
+ for ( sal_uInt16 i = 0; i < pNode->GetNumRows( ); i++ ) {
+ SmCaretPosGraphEntry* r = left;
+ for ( sal_uInt16 j = 0; j < pNode->GetNumCols( ); j++ ){
+ SmNode* pSubNode = pNode->GetSubNode( i * pNode->GetNumCols( ) + j );
+
+ pRightMost = pGraph->Add( SmCaretPos( pSubNode, 0 ), r );
+ if( j != 0 || ( pNode->GetNumRows( ) - 1 ) / 2 == i )
+ r->SetRight( pRightMost );
+
+ pSubNode->Accept( this );
+
+ r = pRightMost;
+ }
+ pRightMost->SetRight( right );
+ if( ( pNode->GetNumRows( ) - 1 ) / 2 == i )
+ right->SetLeft( pRightMost );
+ }
+
+ pRightMost = right;
+}
+
+/** Build SmCaretPosGraph for SmTextNode
+ *
+ * Lines in an SmTextNode:
+ * \code
+ * A B C
+ * \endcode
+ * Where A B and C are characters in the text.
+ *
+ * Graph over these, where "left" is before the SmTextNode and "right" is after:
+ * \dot
+ * digraph Graph{
+ * left -> A;
+ * A -> B
+ * B -> right;
+ * };
+ * \enddot
+ * Notice that C and right is the same position here.
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmTextNode* pNode )
+{
+ j_assert( pNode->GetText( ).Len( ) > 0, "Empty SmTextNode is bad" );
+
+ int size = pNode->GetText( ).Len( );
+ for( int i = 1; i <= size; i++ ){
+ SmCaretPosGraphEntry* pRight = pRightMost;
+ pRightMost = pGraph->Add( SmCaretPos( pNode, i ), pRight );
+ pRight->SetRight( pRightMost );
+ }
+}
+
+/** Build SmCaretPosGraph for SmBinVerNode
+ *
+ * Lines in an SmBinVerNode:
+ * \code
+ * A
+ * -----
+ * B
+ * \endcode
+ *
+ * Graph over these, where "left" is before the SmBinVerNode and "right" is after:
+ * \dot
+ * digraph Graph{
+ * left -> A;
+ * A -> right;
+ * B -> right;
+ * };
+ * \enddot
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmBinVerNode* pNode )
+{
+ //None if these children can be NULL, see SmBinVerNode::Arrange
+ SmNode *pNum = pNode->GetSubNode( 0 ),
+ *pDenom = pNode->GetSubNode( 2 );
+
+ SmCaretPosGraphEntry *left,
+ *right,
+ *numLeft,
+ *denomLeft;
+
+ //Set left
+ left = pRightMost;
+ j_assert( pRightMost, "There must be a position infront of this" );
+
+ //Create right
+ right = pGraph->Add( SmCaretPos( pNode, 1 ) );
+
+ //Create numLeft
+ numLeft = pGraph->Add( SmCaretPos( pNum, 0 ), left );
+ left->SetRight( numLeft );
+
+ //Visit pNum
+ pRightMost = numLeft;
+ pNum->Accept( this );
+ pRightMost->SetRight( right );
+ right->SetLeft( pRightMost );
+
+ //Create denomLeft
+ denomLeft = pGraph->Add( SmCaretPos( pDenom, 0 ), left );
+
+ //Visit pDenom
+ pRightMost = denomLeft;
+ pDenom->Accept( this );
+ pRightMost->SetRight( right );
+
+ //Set return parameter
+ pRightMost = right;
+}
+
+/** Build SmCaretPosGraph for SmVerticalBraceNode
+ *
+ * Lines in an SmVerticalBraceNode:
+ * \code
+ * pScript
+ * ________
+ * / \
+ * pBody
+ * \endcode
+ *
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmVerticalBraceNode* pNode )
+{
+ SmNode *pBody = pNode->GetSubNode( 0 ),
+ *pScript = pNode->GetSubNode( 2 );
+ //None of these children can be NULL
+
+ SmCaretPosGraphEntry *left,
+ *bodyLeft,
+ *scriptLeft,
+ *right;
+
+ left = pRightMost;
+
+ //Create right
+ right = pGraph->Add( SmCaretPos( pNode, 1 ) );
+
+ //Create bodyLeft
+ bodyLeft = pGraph->Add( SmCaretPos( pBody, 0 ), left );
+ left->SetRight( bodyLeft );
+ pRightMost = bodyLeft;
+ pBody->Accept( this );
+ pRightMost->SetRight( right );
+ right->SetLeft( pRightMost );
+
+ //Create script
+ scriptLeft = pGraph->Add( SmCaretPos( pScript, 0 ), left );
+ pRightMost = scriptLeft;
+ pScript->Accept( this );
+ pRightMost->SetRight( right );
+
+ //Set return value
+ pRightMost = right;
+}
+
+/** Build SmCaretPosGraph for SmBinDiagonalNode
+ *
+ * Lines in an SmBinDiagonalNode:
+ * \code
+ * A /
+ * /
+ * / B
+ * \endcode
+ * Where A and B are lines.
+ *
+ * Used in formulas such as "A wideslash B"
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmBinDiagonalNode* pNode )
+{
+ SmNode *A = pNode->GetSubNode( 0 ),
+ *B = pNode->GetSubNode( 1 );
+
+ SmCaretPosGraphEntry *left,
+ *leftA,
+ *rightA,
+ *leftB,
+ *right;
+ left = pRightMost;
+
+ //Create right
+ right = pGraph->Add( SmCaretPos( pNode, 1 ) );
+
+ //Create left A
+ leftA = pGraph->Add( SmCaretPos( A, 0 ), left );
+ left->SetRight( leftA );
+
+ //Visit A
+ pRightMost = leftA;
+ A->Accept( this );
+ rightA = pRightMost;
+
+ //Create left B
+ leftB = pGraph->Add( SmCaretPos( B, 0 ), rightA );
+ rightA->SetRight( leftB );
+
+ //Visit B
+ pRightMost = leftB;
+ B->Accept( this );
+ pRightMost->SetRight( right );
+ right->SetLeft( pRightMost );
+
+ //Set return value
+ pRightMost = right;
+}
+
+//Straigt forward ( I think )
+void SmCaretPosGraphBuildingVisitor::Visit( SmBinHorNode* pNode )
+{
+ SmNodeIterator it( pNode );
+ while( it.Next( ) )
+ it->Accept( this );
+}
+void SmCaretPosGraphBuildingVisitor::Visit( SmUnHorNode* pNode )
+{
+ // Unary operator node
+ SmNodeIterator it( pNode );
+ while( it.Next( ) )
+ it->Accept( this );
+
+}
+
+void SmCaretPosGraphBuildingVisitor::Visit( SmExpressionNode* pNode )
+{
+ SmNodeIterator it( pNode );
+ while( it.Next( ) )
+ it->Accept( this );
+}
+
+void SmCaretPosGraphBuildingVisitor::Visit( SmFontNode* pNode )
+{
+ //Has only got one child, should act as an expression if possible
+ SmNodeIterator it( pNode );
+ while( it.Next( ) )
+ it->Accept( this );
+}
+
+/** Build SmCaretPosGraph for SmBracebodyNode
+ * Acts as an SmExpressionNode
+ *
+ * Below is an example of a formula tree that has multiple children for SmBracebodyNode
+ * \dot
+ * digraph {
+ * labelloc = "t";
+ * label= "Equation: \"lbrace i mline i in setZ rbrace\"";
+ * n0 [label="SmTableNode"];
+ * n0 -> n1 [label="0"];
+ * n1 [label="SmLineNode"];
+ * n1 -> n2 [label="0"];
+ * n2 [label="SmExpressionNode"];
+ * n2 -> n3 [label="0"];
+ * n3 [label="SmBraceNode"];
+ * n3 -> n4 [label="0"];
+ * n4 [label="SmMathSymbolNode: {"];
+ * n3 -> n5 [label="1"];
+ * n5 [label="SmBracebodyNode"];
+ * n5 -> n6 [label="0"];
+ * n6 [label="SmExpressionNode"];
+ * n6 -> n7 [label="0"];
+ * n7 [label="SmTextNode: i"];
+ * n5 -> n8 [label="1"];
+ * n8 [label="SmMathSymbolNode: ∣"];
+ * n5 -> n9 [label="2"];
+ * n9 [label="SmExpressionNode"];
+ * n9 -> n10 [label="0"];
+ * n10 [label="SmBinHorNode"];
+ * n10 -> n11 [label="0"];
+ * n11 [label="SmTextNode: i"];
+ * n10 -> n12 [label="1"];
+ * n12 [label="SmMathSymbolNode: ∈"];
+ * n10 -> n13 [label="2"];
+ * n13 [label="SmMathSymbolNode: ℤ"];
+ * n3 -> n14 [label="2"];
+ * n14 [label="SmMathSymbolNode: }"];
+ * }
+ * \enddot
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmBracebodyNode* pNode )
+{
+ SmNodeIterator it( pNode );
+ while( it.Next( ) ) {
+ SmCaretPosGraphEntry* pStart = pGraph->Add( SmCaretPos( it.Current(), 0), pRightMost );
+ pRightMost->SetRight( pStart );
+ pRightMost = pStart;
+ it->Accept( this );
+ }
+}
+
+/** Build SmCaretPosGraph for SmAlignNode
+ * Acts as an SmExpressionNode, as it only has one child this okay
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmAlignNode* pNode )
+{
+ SmNodeIterator it( pNode );
+ while( it.Next( ) )
+ it->Accept( this );
+}
+
+/** Build SmCaretPosGraph for SmRootNode
+ *
+ * Lines in an SmRootNode:
+ * \code
+ * _________
+ * A/
+ * \/ B
+ *
+ * \endcode
+ * A: pExtra ( optional, can be NULL ),
+ * B: pBody
+ *
+ * Graph over these, where "left" is before the SmRootNode and "right" is after:
+ * \dot
+ * digraph Graph{
+ * left -> B;
+ * B -> right;
+ * A -> B;
+ * }
+ * \enddot
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmRootNode* pNode )
+{
+ SmNode *pExtra = pNode->GetSubNode( 0 ), //Argument, NULL for sqrt, and SmTextNode if cubicroot
+ *pBody = pNode->GetSubNode( 2 ); //Body of the root
+ j_assert( pBody, "pBody cannot be NULL" );
+
+ SmCaretPosGraphEntry *left,
+ *right,
+ *bodyLeft,
+ *bodyRight;
+
+ //Get left and save it
+ j_assert( pRightMost, "There must be a position infront of this" );
+ left = pRightMost;
+
+ //Create body left
+ bodyLeft = pGraph->Add( SmCaretPos( pBody, 0 ), left );
+ left->SetRight( bodyLeft );
+
+ //Create right
+ right = pGraph->Add( SmCaretPos( pNode, 1 ) );
+
+ //Visit body
+ pRightMost = bodyLeft;
+ pBody->Accept( this );
+ bodyRight = pRightMost;
+ bodyRight->SetRight( right );
+ right->SetLeft( bodyRight );
+
+ //Visit pExtra
+ if( pExtra ){
+ pRightMost = pGraph->Add( SmCaretPos( pExtra, 0 ), left );
+ pExtra->Accept( this );
+ pRightMost->SetRight( bodyLeft );
+ }
+
+ pRightMost = right;
+}
+
+/** Build SmCaretPosGraph for SmPlaceNode
+ * Consider this a single character.
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmPlaceNode* pNode )
+{
+ SmCaretPosGraphEntry* right = pGraph->Add( SmCaretPos( pNode, 1 ), pRightMost );
+ pRightMost->SetRight( right );
+ pRightMost = right;
+}
+
+/** SmErrorNode is context dependent metadata, it can't be selected
+ *
+ * @remarks There's no point in deleting, copying and/or moving an instance
+ * of SmErrorNode as it may not exist in an other context! Thus there are no
+ * positions to select an SmErrorNode.
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmErrorNode* )
+{
+}
+
+/** Build SmCaretPosGraph for SmBlankNode
+ * Consider this a single character, as it is only a blank space
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmBlankNode* pNode )
+{
+ SmCaretPosGraphEntry* right = pGraph->Add( SmCaretPos( pNode, 1 ), pRightMost );
+ pRightMost->SetRight( right );
+ pRightMost = right;
+}
+
+/** Build SmCaretPosGraph for SmBraceNode
+ *
+ * Lines in an SmBraceNode:
+ * \code
+ * | |
+ * | B |
+ * | |
+ * \endcode
+ * B: Body
+ *
+ * Graph over these, where "left" is before the SmBraceNode and "right" is after:
+ * \dot
+ * digraph Graph{
+ * left -> B;
+ * B -> right;
+ * }
+ * \enddot
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmBraceNode* pNode )
+{
+ SmNode* pBody = pNode->GetSubNode( 1 );
+
+ SmCaretPosGraphEntry *left = pRightMost,
+ *right = pGraph->Add( SmCaretPos( pNode, 1 ) );
+
+ if( pBody->GetType() != NBRACEBODY ) {
+ pRightMost = pGraph->Add( SmCaretPos( pBody, 0 ), left );
+ left->SetRight( pRightMost );
+ }else
+ pRightMost = left;
+
+ pBody->Accept( this );
+ pRightMost->SetRight( right );
+ right->SetLeft( pRightMost );
+
+ pRightMost = right;
+}
+
+/** Build SmCaretPosGraph for SmAttributNode
+ *
+ * Lines in an SmAttributNode:
+ * \code
+ * Attr
+ * Body
+ * \endcode
+ *
+ * There's a body and an attribute, the construction is used for "widehat A", where "A" is the body
+ * and "^" is the attribute ( note GetScaleMode( ) on SmAttributNode tells how the attribute should be
+ * scaled ).
+ */
+void SmCaretPosGraphBuildingVisitor::Visit( SmAttributNode* pNode )
+{
+ SmNode *pAttr = pNode->GetSubNode( 0 ),
+ *pBody = pNode->GetSubNode( 1 );
+ //None of the children can be NULL
+
+ SmCaretPosGraphEntry *left = pRightMost,
+ *attrLeft,
+ *bodyLeft,
+ *bodyRight,
+ *right;
+
+ //Creating bodyleft
+ bodyLeft = pGraph->Add( SmCaretPos( pBody, 0 ), left );
+ left->SetRight( bodyLeft );
+
+ //Creating right
+ right = pGraph->Add( SmCaretPos( pNode, 1 ) );
+
+ //Visit the body
+ pRightMost = bodyLeft;
+ pBody->Accept( this );
+ bodyRight = pRightMost;
+ bodyRight->SetRight( right );
+ right->SetLeft( bodyRight );
+
+ //Create attrLeft
+ attrLeft = pGraph->Add( SmCaretPos( pAttr, 0 ), left );
+
+ //Visit attribute
+ pRightMost = attrLeft;
+ pAttr->Accept( this );
+ pRightMost->SetRight( right );
+
+ //Set return value
+ pRightMost = right;
+}
+
+//Consider these single symboles
+void SmCaretPosGraphBuildingVisitor::Visit( SmSpecialNode* pNode )
+{
+ SmCaretPosGraphEntry* right = pGraph->Add( SmCaretPos( pNode, 1 ), pRightMost );
+ pRightMost->SetRight( right );
+ pRightMost = right;
+}
+void SmCaretPosGraphBuildingVisitor::Visit( SmGlyphSpecialNode* pNode )
+{
+ SmCaretPosGraphEntry* right = pGraph->Add( SmCaretPos( pNode, 1 ), pRightMost );
+ pRightMost->SetRight( right );
+ pRightMost = right;
+}
+void SmCaretPosGraphBuildingVisitor::Visit( SmMathSymbolNode* pNode )
+{
+ SmCaretPosGraphEntry* right = pGraph->Add( SmCaretPos( pNode, 1 ), pRightMost );
+ pRightMost->SetRight( right );
+ pRightMost = right;
+}
+
+void SmCaretPosGraphBuildingVisitor::Visit( SmRootSymbolNode* )
+{
+ //Do nothing
+}
+void SmCaretPosGraphBuildingVisitor::Visit( SmRectangleNode* )
+{
+ //Do nothing
+}
+void SmCaretPosGraphBuildingVisitor::Visit( SmPolyLineNode* )
+{
+ //Do nothing
+}
+
+/////////////////////////////// SmCloningVisitor ///////////////////////////////
+
+SmNode* SmCloningVisitor::Clone( SmNode* pNode )
+{
+ SmNode* pCurrResult = pResult;
+ pNode->Accept( this );
+ SmNode* pClone = pResult;
+ pResult = pCurrResult;
+ return pClone;
+}
+
+void SmCloningVisitor::CloneNodeAttr( SmNode* pSource, SmNode* pTarget )
+{
+ pTarget->SetScaleMode( pSource->GetScaleMode( ) );
+ //Other attributes are set when prepare or arrange is executed
+ //and may depend on stuff not being cloned here.
+}
+
+void SmCloningVisitor::CloneKids( SmStructureNode* pSource, SmStructureNode* pTarget )
+{
+ //Cache current result
+ SmNode* pCurrResult = pResult;
+
+ //Create array for holding clones
+ sal_uInt16 nSize = pSource->GetNumSubNodes( );
+ SmNodeArray aNodes( nSize );
+
+ //Clone children
+ SmNode* pKid;
+ for( sal_uInt16 i = 0; i < nSize; i++ ){
+ if( NULL != ( pKid = pSource->GetSubNode( i ) ) )
+ pKid->Accept( this );
+ else
+ pResult = NULL;
+ aNodes[i] = pResult;
+ }
+
+ //Set subnodes of pTarget
+ pTarget->SetSubNodes( aNodes );
+
+ //Restore result as where prior to call
+ pResult = pCurrResult;
+}
+
+void SmCloningVisitor::Visit( SmTableNode* pNode )
+{
+ SmTableNode* pClone = new SmTableNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmBraceNode* pNode )
+{
+ SmBraceNode* pClone = new SmBraceNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmBracebodyNode* pNode )
+{
+ SmBracebodyNode* pClone = new SmBracebodyNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmOperNode* pNode )
+{
+ SmOperNode* pClone = new SmOperNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmAlignNode* pNode )
+{
+ SmAlignNode* pClone = new SmAlignNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmAttributNode* pNode )
+{
+ SmAttributNode* pClone = new SmAttributNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmFontNode* pNode )
+{
+ SmFontNode* pClone = new SmFontNode( pNode->GetToken( ) );
+ pClone->SetSizeParameter( pNode->GetSizeParameter( ), pNode->GetSizeType( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmUnHorNode* pNode )
+{
+ SmUnHorNode* pClone = new SmUnHorNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmBinHorNode* pNode )
+{
+ SmBinHorNode* pClone = new SmBinHorNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmBinVerNode* pNode )
+{
+ SmBinVerNode* pClone = new SmBinVerNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmBinDiagonalNode* pNode )
+{
+ SmBinDiagonalNode *pClone = new SmBinDiagonalNode( pNode->GetToken( ) );
+ pClone->SetAscending( pNode->IsAscending( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmSubSupNode* pNode )
+{
+ SmSubSupNode *pClone = new SmSubSupNode( pNode->GetToken( ) );
+ pClone->SetUseLimits( pNode->IsUseLimits( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmMatrixNode* pNode )
+{
+ SmMatrixNode *pClone = new SmMatrixNode( pNode->GetToken( ) );
+ pClone->SetRowCol( pNode->GetNumRows( ), pNode->GetNumCols( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmPlaceNode* pNode )
+{
+ pResult = new SmPlaceNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pResult );
+}
+
+void SmCloningVisitor::Visit( SmTextNode* pNode )
+{
+ SmTextNode* pClone = new SmTextNode( pNode->GetToken( ), pNode->GetFontDesc( ) );
+ pClone->ChangeText( pNode->GetText( ) );
+ CloneNodeAttr( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmSpecialNode* pNode )
+{
+ pResult = new SmSpecialNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pResult );
+}
+
+void SmCloningVisitor::Visit( SmGlyphSpecialNode* pNode )
+{
+ pResult = new SmGlyphSpecialNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pResult );
+}
+
+void SmCloningVisitor::Visit( SmMathSymbolNode* pNode )
+{
+ pResult = new SmMathSymbolNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pResult );
+}
+
+void SmCloningVisitor::Visit( SmBlankNode* pNode )
+{
+ SmBlankNode* pClone = new SmBlankNode( pNode->GetToken( ) );
+ pClone->SetBlankNum( pNode->GetBlankNum( ) );
+ pResult = pClone;
+ CloneNodeAttr( pNode, pResult );
+}
+
+void SmCloningVisitor::Visit( SmErrorNode* pNode )
+{
+ //PE_NONE is used the information have been discarded and isn't used
+ pResult = new SmErrorNode( PE_NONE, pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pResult );
+}
+
+void SmCloningVisitor::Visit( SmLineNode* pNode )
+{
+ SmLineNode* pClone = new SmLineNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmExpressionNode* pNode )
+{
+ SmExpressionNode* pClone = new SmExpressionNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmPolyLineNode* pNode )
+{
+ pResult = new SmPolyLineNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pResult );
+}
+
+void SmCloningVisitor::Visit( SmRootNode* pNode )
+{
+ SmRootNode* pClone = new SmRootNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+void SmCloningVisitor::Visit( SmRootSymbolNode* pNode )
+{
+ pResult = new SmRootSymbolNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pResult );
+}
+
+void SmCloningVisitor::Visit( SmRectangleNode* pNode )
+{
+ pResult = new SmRectangleNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pResult );
+}
+
+void SmCloningVisitor::Visit( SmVerticalBraceNode* pNode )
+{
+ SmVerticalBraceNode* pClone = new SmVerticalBraceNode( pNode->GetToken( ) );
+ CloneNodeAttr( pNode, pClone );
+ CloneKids( pNode, pClone );
+ pResult = pClone;
+}
+
+/////////////////////////////// SmSelectionDrawingVisitor ///////////////////////////////
+
+SmSelectionDrawingVisitor::SmSelectionDrawingVisitor( OutputDevice& rDevice, SmNode* pTree, Point Offset )
+ : rDev( rDevice ) {
+ bHasSelectionArea = false;
+
+ //Visit everything
+ j_assert( pTree, "pTree can't be null!" );
+ if( pTree )
+ pTree->Accept( this );
+
+ //Draw selection if there's any
+ if( bHasSelectionArea ){
+ aSelectionArea.Move( Offset.X( ), Offset.Y( ) );
+
+ //Save device state
+ rDev.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ //Change colors
+ rDev.SetLineColor( );
+ rDev.SetFillColor( Color( COL_LIGHTGRAY ) );
+
+ //Draw rectangle
+ rDev.DrawRect( aSelectionArea );
+
+ //Restore device state
+ rDev.Pop( );
+ }
+}
+
+void SmSelectionDrawingVisitor::ExtendSelectionArea( Rectangle aArea )
+{
+ if ( ! bHasSelectionArea ) {
+ aSelectionArea = aArea;
+ bHasSelectionArea = true;
+ } else
+ aSelectionArea.Union( aArea );
+}
+
+void SmSelectionDrawingVisitor::DefaultVisit( SmNode* pNode )
+{
+ if( pNode->IsSelected( ) )
+ ExtendSelectionArea( pNode->AsRectangle( ) );
+ VisitChildren( pNode );
+}
+
+void SmSelectionDrawingVisitor::VisitChildren( SmNode* pNode )
+{
+ SmNodeIterator it( pNode );
+ while( it.Next( ) )
+ it->Accept( this );
+}
+
+void SmSelectionDrawingVisitor::Visit( SmTextNode* pNode )
+{
+ if( pNode->IsSelected( ) ){
+ rDev.Push( PUSH_TEXTCOLOR | PUSH_FONT );
+
+ rDev.SetFont( pNode->GetFont( ) );
+ Point Position = pNode->GetTopLeft( );
+ long left = Position.getX( ) + rDev.GetTextWidth( pNode->GetText( ), 0, pNode->GetSelectionStart( ) );
+ long right = Position.getX( ) + rDev.GetTextWidth( pNode->GetText( ), 0, pNode->GetSelectionEnd( ) );
+ long top = Position.getY( );
+ long bottom = top + pNode->GetHeight( );
+ Rectangle rect( left, top, right, bottom );
+
+ ExtendSelectionArea( rect );
+
+ rDev.Pop( );
+ }
+}
+
+/////////////////////////////// SmNodeToTextVisitor ///////////////////////////////
+
+void SmNodeToTextVisitor::Visit( SmTableNode* pNode )
+{
+ if( pNode->GetToken( ).eType == TBINOM ) {
+ Append( "{ binom" );
+ LineToText( pNode->GetSubNode( 0 ) );
+ LineToText( pNode->GetSubNode( 1 ) );
+ Append("} ");
+ } else if( pNode->GetToken( ).eType == TSTACK ) {
+ Append( "stack{ " );
+ SmNodeIterator it( pNode );
+ it.Next( );
+ while( true ) {
+ LineToText( it.Current( ) );
+ if( it.Next( ) ) {
+ Separate( );
+ Append( "# " );
+ }else
+ break;
+ }
+ Separate( );
+ Append( "}" );
+ } else { //Assume it's a toplevel table, containing lines
+ SmNodeIterator it( pNode );
+ it.Next( );
+ while( true ) {
+ Separate( );
+ it->Accept( this );
+ if( it.Next( ) ) {
+ Separate( );
+ Append( "newline" );
+ }else
+ break;
+ }
+ }
+}
+
+void SmNodeToTextVisitor::Visit( SmBraceNode* pNode )
+{
+ SmNode *pLeftBrace = pNode->GetSubNode( 0 ),
+ *pBody = pNode->GetSubNode( 1 ),
+ *pRightBrace = pNode->GetSubNode( 2 );
+ //Handle special case where it's absolute function
+ if( pNode->GetToken( ).eType == TABS ) {
+ Append( "abs" );
+ LineToText( pBody );
+ } else {
+ if( pNode->GetScaleMode( ) == SCALE_HEIGHT )
+ Append( "left " );
+ pLeftBrace->Accept( this );
+ Separate( );
+ pBody->Accept( this );
+ Separate( );
+ if( pNode->GetScaleMode( ) == SCALE_HEIGHT )
+ Append( "right " );
+ pRightBrace->Accept( this );
+ }
+}
+
+void SmNodeToTextVisitor::Visit( SmBracebodyNode* pNode )
+{
+ SmNodeIterator it( pNode );
+ while( it.Next( ) ){
+ Separate( );
+ it->Accept( this );
+ }
+}
+
+void SmNodeToTextVisitor::Visit( SmOperNode* pNode )
+{
+ Append( pNode->GetToken( ).aText );
+ Separate( );
+ if( pNode->GetToken( ).eType == TOPER ){
+ //There's an SmGlyphSpecialNode if eType == TOPER
+ if( pNode->GetSubNode( 0 )->GetType( ) == NSUBSUP )
+ Append( pNode->GetSubNode( 0 )->GetSubNode( 0 )->GetToken( ).aText );
+ else
+ Append( pNode->GetSubNode( 0 )->GetToken( ).aText );
+ }
+ if( pNode->GetSubNode( 0 )->GetType( ) == NSUBSUP ) {
+ SmSubSupNode *pSubSup = ( SmSubSupNode* )pNode->GetSubNode( 0 );
+ SmNode* pChild;
+ if( ( pChild = pSubSup->GetSubSup( LSUP ) ) ) {
+ Separate( );
+ Append( "lsup { " );
+ LineToText( pChild );
+ Append( "} " );
+ }
+ if( ( pChild = pSubSup->GetSubSup( LSUB ) ) ) {
+ Separate( );
+ Append( "lsub { " );
+ LineToText( pChild );
+ Append( "} " );
+ }
+ if( ( pChild = pSubSup->GetSubSup( RSUP ) ) ) {
+ Separate( );
+ Append( "rsup { " );
+ LineToText( pChild );
+ Append( "} " );
+ }
+ if( ( pChild = pSubSup->GetSubSup( RSUB ) ) ) {
+ Separate( );
+ Append( "rsub { " );
+ LineToText( pChild );
+ Append( "} " );
+ }
+ if( ( pChild = pSubSup->GetSubSup( CSUP ) ) ) {
+ Separate( );
+ Append( "csup { " );
+ LineToText( pChild );
+ Append( "} " );
+ }
+ if( ( pChild = pSubSup->GetSubSup( CSUB ) ) ) {
+ Separate( );
+ Append( "csub { " );
+ LineToText( pChild );
+ Append( "} " );
+ }
+ }
+ LineToText( pNode->GetSubNode( 1 ) );
+}
+
+void SmNodeToTextVisitor::Visit( SmAlignNode* pNode )
+{
+ Append( pNode->GetToken( ).aText );
+ LineToText( pNode->GetSubNode( 0 ) );
+}
+
+void SmNodeToTextVisitor::Visit( SmAttributNode* pNode )
+{
+ Append( pNode->GetToken( ).aText );
+ LineToText( pNode->GetSubNode( 1 ) );
+}
+
+void SmNodeToTextVisitor::Visit( SmFontNode* pNode )
+{
+ switch ( pNode->GetToken( ).eType )
+ {
+ case TBOLD:
+ Append( "bold " );
+ break;
+ case TNBOLD:
+ Append( "nbold " );
+ break;
+ case TITALIC:
+ Append( "italic " );
+ break;
+ case TNITALIC:
+ Append( "nitalic " );
+ break;
+ case TPHANTOM:
+ Append( "phantom " );
+ break;
+ case TSIZE:
+ {
+ Append( "size " );
+ switch ( pNode->GetSizeType( ) )
+ {
+ case FNTSIZ_PLUS:
+ Append( "+" );
+ break;
+ case FNTSIZ_MINUS:
+ Append( "-" );
+ break;
+ case FNTSIZ_MULTIPLY:
+ Append( "*" );
+ break;
+ case FNTSIZ_DIVIDE:
+ Append( "/" );
+ break;
+ case FNTSIZ_ABSOLUT:
+ default:
+ break;
+ }
+ Append( String( ::rtl::math::doubleToUString(
+ static_cast<double>( pNode->GetSizeParameter( ) ),
+ rtl_math_StringFormat_Automatic,
+ rtl_math_DecimalPlaces_Max, '.', sal_True ) ) );
+ Append( " " );
+ }
+ break;
+ case TBLACK:
+ Append( "color black " );
+ break;
+ case TWHITE:
+ Append( "color white " );
+ break;
+ case TRED:
+ Append( "color red " );
+ break;
+ case TGREEN:
+ Append( "color green " );
+ break;
+ case TBLUE:
+ Append( "color blue " );
+ break;
+ case TCYAN:
+ Append( "color cyan " );
+ break;
+ case TMAGENTA:
+ Append( "color magenta " );
+ break;
+ case TYELLOW:
+ Append( "color yellow " );
+ break;
+ case TSANS:
+ Append( "font sans " );
+ break;
+ case TSERIF:
+ Append( "font serif " );
+ break;
+ case TFIXED:
+ Append( "font fixed " );
+ break;
+ default:
+ break;
+ }
+ LineToText( pNode->GetSubNode( 1 ) );
+}
+
+void SmNodeToTextVisitor::Visit( SmUnHorNode* pNode )
+{
+ SmNodeIterator it( pNode, pNode->GetSubNode( 1 )->GetToken( ).eType == TFACT );
+ while( it.Next( ) ) {
+ Separate( );
+ it->Accept( this );
+ }
+}
+
+void SmNodeToTextVisitor::Visit( SmBinHorNode* pNode )
+{
+ SmNode *pLeft = pNode->GetSubNode( 0 ),
+ *pOper = pNode->GetSubNode( 1 ),
+ *pRight = pNode->GetSubNode( 2 );
+ Separate( );
+ pLeft->Accept( this );
+ Separate( );
+ pOper->Accept( this );
+ Separate( );
+ pRight->Accept( this );
+ Separate( );
+}
+
+void SmNodeToTextVisitor::Visit( SmBinVerNode* pNode )
+{
+ SmNode *pNum = pNode->GetSubNode( 0 ),
+ *pDenom = pNode->GetSubNode( 2 );
+ Append( "{ " );
+ LineToText( pNum );
+ Append( "over" );
+ LineToText( pDenom );
+ Append( "} " );
+}
+
+void SmNodeToTextVisitor::Visit( SmBinDiagonalNode* pNode )
+{
+ SmNode *pLeftOperand = pNode->GetSubNode( 0 ),
+ *pRightOperand = pNode->GetSubNode( 1 );
+ Append( "{ " );
+ LineToText( pLeftOperand );
+ Separate( );
+ Append( "wideslash " );
+ LineToText( pRightOperand );
+ Append( "} " );
+}
+
+void SmNodeToTextVisitor::Visit( SmSubSupNode* pNode )
+{
+ LineToText( pNode->GetBody( ) );
+ SmNode *pChild;
+ if( ( pChild = pNode->GetSubSup( LSUP ) ) ) {
+ Separate( );
+ Append( "lsup " );
+ LineToText( pChild );
+ }
+ if( ( pChild = pNode->GetSubSup( LSUB ) ) ) {
+ Separate( );
+ Append( "lsub " );
+ LineToText( pChild );
+ }
+ if( ( pChild = pNode->GetSubSup( RSUP ) ) ) {
+ Separate( );
+ Append( "rsup " );
+ LineToText( pChild );
+ }
+ if( ( pChild = pNode->GetSubSup( RSUB ) ) ) {
+ Separate( );
+ Append( "rsub " );
+ LineToText( pChild );
+ }
+ if( ( pChild = pNode->GetSubSup( CSUP ) ) ) {
+ Separate( );
+ Append( "csup " );
+ LineToText( pChild );
+ }
+ if( ( pChild = pNode->GetSubSup( CSUB ) ) ) {
+ Separate( );
+ Append( "csub " );
+ LineToText( pChild );
+ }
+}
+
+void SmNodeToTextVisitor::Visit( SmMatrixNode* pNode )
+{
+ Append( "matrix{" );
+ for ( sal_uInt16 i = 0; i < pNode->GetNumRows( ); i++ ) {
+ for ( sal_uInt16 j = 0; j < pNode->GetNumCols( ); j++ ) {
+ SmNode* pSubNode = pNode->GetSubNode( i * pNode->GetNumCols( ) + j );
+ Separate( );
+ pSubNode->Accept( this );
+ Separate( );
+ if( j != pNode->GetNumCols( ) - 1 )
+ Append( "#" );
+ }
+ Separate( );
+ if( i != pNode->GetNumRows( ) - 1 )
+ Append( "##" );
+ }
+ Append( "} " );
+}
+
+void SmNodeToTextVisitor::Visit( SmPlaceNode* )
+{
+ Append( "<?>" );
+}
+
+void SmNodeToTextVisitor::Visit( SmTextNode* pNode )
+{
+ //TODO: This method might need improvements, see SmTextNode::CreateTextFromNode
+ if( pNode->GetToken( ).eType == TTEXT )
+ Append( "\"" );
+ Append( pNode->GetText( ) );
+ if( pNode->GetToken( ).eType == TTEXT )
+ Append( "\"" );
+}
+
+void SmNodeToTextVisitor::Visit( SmSpecialNode* pNode )
+{
+ Append( pNode->GetToken( ).aText );
+}
+
+void SmNodeToTextVisitor::Visit( SmGlyphSpecialNode* pNode )
+{
+ if( pNode->GetToken( ).eType == TBOPER )
+ Append( "boper " );
+ else
+ Append( "uoper " );
+ Append( pNode->GetToken( ).aText );
+}
+
+void SmNodeToTextVisitor::Visit( SmMathSymbolNode* pNode )
+{
+ Append( pNode->GetToken( ).aText );
+}
+
+void SmNodeToTextVisitor::Visit( SmBlankNode* pNode )
+{
+ Append( pNode->GetToken( ).aText );
+}
+
+void SmNodeToTextVisitor::Visit( SmErrorNode* )
+{
+}
+
+void SmNodeToTextVisitor::Visit( SmLineNode* pNode )
+{
+ SmNodeIterator it( pNode );
+ while( it.Next( ) ){
+ Separate( );
+ it->Accept( this );
+ }
+}
+
+void SmNodeToTextVisitor::Visit( SmExpressionNode* pNode )
+{
+ bool bracketsNeeded = pNode->GetNumSubNodes() != 1 || pNode->GetSubNode(0)->GetType() == NBINHOR;
+ if (bracketsNeeded) {
+ Append( "{ " );
+ }
+ SmNodeIterator it( pNode );
+ while( it.Next( ) ) {
+ it->Accept( this );
+ Separate( );
+ }
+ if (bracketsNeeded) {
+ Append( "} " );
+ }
+}
+
+void SmNodeToTextVisitor::Visit( SmPolyLineNode* )
+{
+}
+
+void SmNodeToTextVisitor::Visit( SmRootNode* pNode )
+{
+ SmNode *pExtra = pNode->GetSubNode( 0 ),
+ *pBody = pNode->GetSubNode( 2 );
+ if( pExtra ) {
+ Append( "nroot" );
+ LineToText( pExtra );
+ } else
+ Append( "sqrt" );
+ LineToText( pBody );
+}
+
+void SmNodeToTextVisitor::Visit( SmRootSymbolNode* )
+{
+}
+
+void SmNodeToTextVisitor::Visit( SmRectangleNode* )
+{
+}
+
+void SmNodeToTextVisitor::Visit( SmVerticalBraceNode* pNode )
+{
+ SmNode *pBody = pNode->GetSubNode( 0 ),
+ *pScript = pNode->GetSubNode( 2 );
+ LineToText( pBody );
+ Append( pNode->GetToken( ).aText );
+ LineToText( pScript );
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/uiconfig/smath/menubar/menubar.xml b/starmath/uiconfig/smath/menubar/menubar.xml
index 7c82d733fa70..dcb68e740718 100755
--- a/starmath/uiconfig/smath/menubar/menubar.xml
+++ b/starmath/uiconfig/smath/menubar/menubar.xml
@@ -112,9 +112,9 @@
<menu:menuitem menu:id=".uno:HelpIndex"/>
<menu:menuitem menu:id=".uno:ExtendedHelp"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/starmath/uiconfig/smath/statusbar/statusbar.xml b/starmath/uiconfig/smath/statusbar/statusbar.xml
index 7d95fbbb2975..33e4e4888f2a 100644
--- a/starmath/uiconfig/smath/statusbar/statusbar.xml
+++ b/starmath/uiconfig/smath/statusbar/statusbar.xml
@@ -3,6 +3,6 @@
<statusbar:statusbar xmlns:statusbar="http://openoffice.org/2001/statusbar" xmlns:xlink="http://www.w3.org/1999/xlink">
<statusbar:statusbaritem xlink:href=".uno:TextStatus" statusbar:align="left" statusbar:width="300" statusbar:helpid="helpid:30367"/>
<statusbar:statusbaritem xlink:href=".uno:Zoom" statusbar:align="center" statusbar:width="54" statusbar:helpid="helpid:10000"/>
- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="14" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="14" statusbar:helpid="helpid:5584"/>
<statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
</statusbar:statusbar> \ No newline at end of file
diff --git a/starmath/visual-editor-todo b/starmath/visual-editor-todo
new file mode 100644
index 000000000000..3be3fd2fa40e
--- /dev/null
+++ b/starmath/visual-editor-todo
@@ -0,0 +1,44 @@
+Visual Formula Editor for LibreOffice Math
+==========================================
+
+This file contains a list of things to do for the visual formula editor.
+The visual formula editor hack was started by Jonas during GSoC...
+He is, as of writing this, still working on this features, but do by all
+means feel free to help out.
+
+Here is the list of things to be done. They are organized by complexity and necessity, note that
+some of the items are wishful thinking... If you have questions please feel free to ping me (Jonas)
+on IRC (jopsen) or e-mail me at jopsen@gmail.com.
+
+Easy
+----
+1. SmGraphicWindow::KeyInput relies on comparison of sal_Char, a better way must be available for CTRL+c
+2. Code style (missing spaces, linebreaks and a few renames)
+3. More documentation
+4. Replace j_assert with DBG_ASSERT (don't do this yet).
+5. Remove the CreateTextFromNode methods and replace calls to it with NodeToTextVisitor
+6. Extend NodeToTextVisitor to update token offsets so SmNode::GetRow and SmNode::GetColumn will work.
+ (These methods can be used to enable synchronization of caret positions between visual and non-visual editor).
+
+Medium
+------
+1. SmCursor::InsertCol() method for added columns to matrices should be implemented.
+2. SmCursor` should support deletion of lines, rows, cols and sub-/superscripts.
+3. SmCursor::InsertSubSup() should wrap the body in a SmBraceNode if the body is an SmOperNode, SmBinVerNode, etc.
+4. When OpenOffice Math runs in standalone mode it centers the current formula, this is not nice for visual editing.
+
+Complex
+-------
+1. SmAlignNode and SmFontNode are ignored by visual editor, figure out how these should work.
+2. Solve the flickering issue when drawing formulas (See dev@gsl.OpenOffice.org)
+3. Make " a shortcut for creating an SmTextNode with FNT_TEXT, also check that SmNodeToTextVisitor supports this.
+4. parse.cxx merges multiple blanks into one SmBlankNode, the visual editor doesn't...
+
+Complex and non-essential
+-------------------------
+* Global clipboard integration
+* Consider improving GUI for "Formula Elements"-dialog, most buttons work with visual editor
+* Consider allowing users to enter commands in visual editor, by prefixing the command...
+* Optimize things, for instance SmCursor::AnnotateSelection() is called way too many places...
+* Improve handling of MoveUp and MoveDown in SmCursor::Move, SmCaretPos2LineVisitor might need improvement.
+* Synchronized command text caret and visual editor caret.
diff --git a/starmath/workben/smath-dump-watch.sh b/starmath/workben/smath-dump-watch.sh
new file mode 100755
index 000000000000..21ec5f14ad35
--- /dev/null
+++ b/starmath/workben/smath-dump-watch.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+
+# Watches for formula dumps by starmath and renders them
+# If starmath is compiled with the macro DEBUG_ENABLE_DUMPASDOT defined.
+# shift+enter, in the visual formula editor will make starmath dump a
+# graphviz graph of the formula tree structure. This is very useful when
+# debugging. The formula is dumped to /tmp/smath-dump.gv-
+# This script monitors this file and renders the graph when written,
+# after which the formula is displayed using feh.
+#
+# Usage: Let this script run in the background, e.g. start it in a terminal
+# (and don't close the terminal). Then compile starmath with DEBUG_ENABLE_DUMPASDOT
+# defined, use the visual formula editor to write something and hit shift+enter.
+#
+# Note: This won't work on Windows as the /tmp/ folder will be missing.
+#
+# Author: "Jonas Finnemann Jensen" <jopsen@gmail.com>
+
+touch /tmp/smath-dump.gv;
+while inotifywait -q -e close_write /tmp/smath-dump.gv;
+do
+ dot -Tpng < /tmp/smath-dump.gv > /tmp/smath-dump.png; > /dev/null
+ kill `pidof -s feh`; > /dev/null
+ feh /tmp/smath-dump.png & > /dev/null
+done
diff --git a/sw/Library_msword.mk b/sw/Library_msword.mk
index 530fa53908b7..507802ecdc47 100644
--- a/sw/Library_msword.mk
+++ b/sw/Library_msword.mk
@@ -57,6 +57,9 @@ $(eval $(call gb_Library_add_linked_libs,msword,\
icuuc \
msfilter \
sal \
+ sax \
+ sb \
+ oox \
sfx \
sot \
stl \
@@ -80,6 +83,9 @@ $(eval $(call gb_Library_add_exception_objects,msword,\
sw/source/filter/rtf/rtfnum \
sw/source/filter/rtf/rtftbl \
sw/source/filter/rtf/swparrtf \
+ sw/source/filter/ww8/docxattributeoutput \
+ sw/source/filter/ww8/docxexport \
+ sw/source/filter/ww8/docxexportfilter \
sw/source/filter/ww8/rtfattributeoutput \
sw/source/filter/ww8/rtfexport \
sw/source/filter/ww8/rtfexportfilter \
@@ -111,6 +117,7 @@ $(eval $(call gb_Library_add_exception_objects,msword,\
sw/source/filter/ww8/ww8par5 \
sw/source/filter/ww8/ww8par6 \
sw/source/filter/ww8/ww8scan \
+ sw/source/filter/ww8/ww8toolbar \
))
# vim: set noet sw=4 ts=4:
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index d097896087ba..b79e71d1d7e6 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -79,7 +79,6 @@ $(eval $(call gb_Library_add_linked_libs,sw,\
utl \
vbahelper \
vcl \
- vos3 \
xo \
$(gb_STDLIBS) \
))
@@ -587,6 +586,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/ui/docvw/edtwin \
sw/source/ui/docvw/edtwin2 \
sw/source/ui/docvw/edtwin3 \
+ sw/source/ui/docvw/extedit \
sw/source/ui/docvw/frmsidebarwincontainer \
sw/source/ui/docvw/romenu \
sw/source/ui/docvw/srcedtw \
@@ -637,6 +637,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/ui/shells/langhelper \
sw/source/ui/shells/listsh \
sw/source/ui/shells/mediash \
+ sw/source/ui/shells/navsh \
sw/source/ui/shells/olesh \
sw/source/ui/shells/slotadd \
sw/source/ui/shells/tabsh \
@@ -719,6 +720,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/ui/web/wview \
sw/source/ui/wrtsh/delete \
sw/source/ui/wrtsh/move \
+ sw/source/ui/wrtsh/navmgr \
sw/source/ui/wrtsh/select \
sw/source/ui/wrtsh/wrtsh1 \
sw/source/ui/wrtsh/wrtsh2 \
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index f7b3f529c80f..9991435f151c 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -154,6 +154,7 @@ $(eval $(call gb_Library_add_exception_objects,swui,\
sw/source/ui/misc/pggrid \
sw/source/ui/misc/srtdlg \
sw/source/ui/misc/swmodalredlineacceptdlg \
+ sw/source/ui/misc/titlepage \
sw/source/ui/table/colwd \
sw/source/ui/table/convert \
sw/source/ui/table/instable \
diff --git a/sw/Library_vbaswobj.mk b/sw/Library_vbaswobj.mk
index 140dd38d623d..f5cd44dc8ae5 100644
--- a/sw/Library_vbaswobj.mk
+++ b/sw/Library_vbaswobj.mk
@@ -66,16 +66,33 @@ $(eval $(call gb_Library_add_linked_libs,vbaswobj,\
$(eval $(call gb_Library_add_exception_objects,vbaswobj,\
sw/source/ui/vba/service \
+ sw/source/ui/vba/vbarange \
+ sw/source/ui/vba/vbacell \
+ sw/source/ui/vba/vbacells \
+ sw/source/ui/vba/vbacolumn \
+ sw/source/ui/vba/vbacolumns \
+ sw/source/ui/vba/vbaframe \
+ sw/source/ui/vba/vbaframes \
+ sw/source/ui/vba/vbalistformat \
+ sw/source/ui/vba/vbalistgallery \
+ sw/source/ui/vba/vbalistgalleries \
+ sw/source/ui/vba/vbalisthelper \
+ sw/source/ui/vba/vbalistlevel \
+ sw/source/ui/vba/vbalistlevels \
+ sw/source/ui/vba/vbalisttemplate \
+ sw/source/ui/vba/vbalisttemplates \
+ sw/source/ui/vba/vbarevision \
+ sw/source/ui/vba/vbarevisions \
+ sw/source/ui/vba/vbarow \
+ sw/source/ui/vba/vbarows \
sw/source/ui/vba/vbadocument \
sw/source/ui/vba/vbasections \
sw/source/ui/vba/vbadialog \
sw/source/ui/vba/vbawrapformat \
sw/source/ui/vba/vbafont \
- sw/source/ui/vba/vbaheaderfooterhelper \
sw/source/ui/vba/vbarangehelper \
sw/source/ui/vba/vbaaddin \
sw/source/ui/vba/vbaautotextentry \
- sw/source/ui/vba/vbarange \
sw/source/ui/vba/vbadocumentproperties \
sw/source/ui/vba/vbaeventshelper \
sw/source/ui/vba/vbastyle \
@@ -85,6 +102,8 @@ $(eval $(call gb_Library_add_exception_objects,vbaswobj,\
sw/source/ui/vba/vbaaddins \
sw/source/ui/vba/vbaview \
sw/source/ui/vba/vbaheaderfooter \
+ sw/source/ui/vba/vbaheadersfooters \
+ sw/source/ui/vba/vbaheaderfooterhelper \
sw/source/ui/vba/vbabookmarks \
sw/source/ui/vba/vbaoptions \
sw/source/ui/vba/vbadialogs \
@@ -97,12 +116,17 @@ $(eval $(call gb_Library_add_exception_objects,vbaswobj,\
sw/source/ui/vba/vbawindow \
sw/source/ui/vba/vbareplacement \
sw/source/ui/vba/vbatable \
+ sw/source/ui/vba/vbatablehelper \
+ sw/source/ui/vba/vbatabstop \
+ sw/source/ui/vba/vbatabstops \
sw/source/ui/vba/vbaselection \
sw/source/ui/vba/vbasystem \
sw/source/ui/vba/vbainformationhelper \
sw/source/ui/vba/vbapagesetup \
sw/source/ui/vba/vbafield \
sw/source/ui/vba/vbatables \
+ sw/source/ui/vba/vbatableofcontents \
+ sw/source/ui/vba/vbatablesofcontents \
sw/source/ui/vba/vbavariable \
sw/source/ui/vba/vbadocuments \
sw/source/ui/vba/vbaparagraphformat \
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index ef39ad6e4c8f..1a0a05bb8db6 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,10 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- *
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -81,3 +78,5 @@ class SwAnnotationWin : public sw::sidebarwindows::SwSidebarWin
} } // end of namespace sw::annotation
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx
index 209fea22da72..e8befb722fc0 100644
--- a/sw/inc/EnhancedPDFExportHelper.hxx
+++ b/sw/inc/EnhancedPDFExportHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -254,3 +255,5 @@ class SwEnhancedPDFExportHelper
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/HandleAnchorNodeChg.hxx b/sw/inc/HandleAnchorNodeChg.hxx
index 910ae4405f4b..bc76cb0cf859 100644
--- a/sw/inc/HandleAnchorNodeChg.hxx
+++ b/sw/inc/HandleAnchorNodeChg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,6 @@ class SwFlyFrmFmt;
class SwFmtAnchor;
class SwFlyFrm;
-// OD 2006-02-28 #125892#
// helper class to track change of anchor node of at-paragraph respectively
// at-character anchored fly frames
// if such a change happens, it has to be checked, if the count of the anchor
@@ -79,3 +79,5 @@ private:
void operator=( const SwHandleAnchorNodeChg );
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentChartDataProviderAccess.hxx b/sw/inc/IDocumentChartDataProviderAccess.hxx
index 46fa17feaa2e..18c0aba92b2f 100644
--- a/sw/inc/IDocumentChartDataProviderAccess.hxx
+++ b/sw/inc/IDocumentChartDataProviderAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,4 @@ class SwChartLockController_Helper;
#endif // IDOCUMENTCHARTDATAPROVIDER_HXX_INCLUDED
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx
index 3b2c5deaa556..01091e92e9d6 100644
--- a/sw/inc/IDocumentContentOperations.hxx
+++ b/sw/inc/IDocumentContentOperations.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,77 +74,71 @@
};
public:
- /** Kopieren eines Bereiches im oder in ein anderes Dokument !
- Die Position kann auch im Bereich liegen !!
- */
+ /** Copying of a range within or to another document.
+ The position can also be within the range!
+ */
virtual bool CopyRange(SwPaM&, SwPosition&, const bool bCopyAll ) const = 0;
- /** Loesche die Section, in der der Node steht.
+ /** Delete section containing the node.
*/
virtual void DeleteSection(SwNode* pNode) = 0;
- /** loeschen eines BereichesSwFlyFrmFmt
+ /** Delete a range SwFlyFrmFmt.
*/
virtual bool DeleteRange(SwPaM&) = 0;
- /** loeschen gesamter Absaetze
+ /** Delete full paragraphs.
*/
virtual bool DelFullPara(SwPaM&) = 0;
/** complete delete of a given PaM
- OD 2009-08-20 #i100466#
+ #i100466#
Add optional parameter <bForceJoinNext>, default value <false>
Needed for hiding of deletion redlines
*/
virtual bool DeleteAndJoin( SwPaM&,
const bool bForceJoinNext = false ) = 0;
- /** verschieben eines Bereiches
- */
virtual bool MoveRange(SwPaM&, SwPosition&, SwMoveFlags) = 0;
- /** verschieben ganzer Nodes
- */
virtual bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags) = 0;
- /** verschieben eines Bereiches
+ /** Move a range.
*/
virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags) = 0;
- /** Ueberschreiben eines Strings in einem bestehenden Textnode.
+ /** Overwrite string in an existing text node.
*/
virtual bool Overwrite(const SwPaM &rRg, const String& rStr) = 0;
/** Insert string into existing text node at position rRg.Point().
- */
+ */
virtual bool InsertString(const SwPaM &rRg, const String&,
const enum InsertFlags nInsertMode = INS_EMPTYEXPAND ) = 0;
/** change text to Upper/Lower/Hiragana/Katagana/...
- */
+ */
virtual void TransliterateText(const SwPaM& rPaM, utl::TransliterationWrapper&) = 0;
- /** Einfuegen einer Grafik, Formel. Die XXXX werden kopiert.
- */
+ /** Insert graphic or formula. The XXXX are copied.
+ */
virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const String& rGrfName, const String& rFltName, const Graphic* pGraphic,
const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
- /**
- */
virtual SwFlyFrmFmt* Insert(const SwPaM& rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet,
const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
- /** austauschen einer Grafik (mit Undo)
- */
+ /** Transpose graphic (with undo)
+ */
virtual void ReRead(SwPaM&, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj) = 0;
- /** Einfuegen eines DrawObjectes. Das Object muss bereits im DrawModel
- angemeldet sein.
+ /** Insert a DrawObject. The object must be already registered
+ in DrawModel.
*/
virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*) = 0;
- /** Einfuegen von OLE-Objecten.
+ /** Insert OLE-objects.
*/
virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet,
const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
@@ -151,43 +146,36 @@
virtual SwFlyFrmFmt* InsertOLE(const SwPaM &rRg, const String& rObjName, sal_Int64 nAspect, const SfxItemSet* pFlyAttrSet,
const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
- /** Aufspalten eines Nodes an rPos (nur fuer den TxtNode implementiert)
+ /** Split a node at rPos (implemented only for TxtNode).
*/
virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart) = 0;
- /**
- */
virtual bool AppendTxtNode(SwPosition& rPos) = 0;
- /** Ersetz einen selektierten Bereich in einem TextNode mit dem
- String. Ist fuers Suchen&Ersetzen gedacht.
- bRegExpRplc - ersetze Tabs (\\t) und setze den gefundenen String
- ein ( nicht \& )
- z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
- --> "xx\t<Tab>..zzz..&"
+ /** Replace selected range in a TxtNode with string.
+ Intended for search & replace.
+ bRegExpRplc - replace tabs (\\t) and insert the found string
+ ( not \& ). E.g.: Find: "zzz", Replace: "xx\t\\t..&..\&"
+ --> "xx\t<Tab>..zzz..&"
*/
virtual bool ReplaceRange(SwPaM& rPam, const String& rNewStr,
const bool bRegExReplace) = 0;
- /** Einfuegen eines Attributs. Erstreckt sich rRg ueber
- mehrere Nodes, wird das Attribut aufgespaltet, sofern
- dieses Sinn macht. Nodes, in denen dieses Attribut keinen
- Sinn macht, werden ignoriert. In vollstaendig in der
- Selektion eingeschlossenen Nodes wird das Attribut zu
- harter Formatierung, in den anderen (Text-)Nodes wird das
- Attribut in das Attributearray eingefuegt. Bei einem
- Zeichenattribut wird ein "leerer" Hint eingefuegt,
- wenn keine Selektion
- vorliegt; andernfalls wird das Attribut als harte
- Formatierung dem durch rRg.Start() bezeichneten Node
- hinzugefuegt. Wenn das Attribut nicht eingefuegt werden
- konnte, liefert die Methode sal_False.
+ /** Insert an attribute. If rRg spans several nodes the
+ attribute is split, provided it makes sense.
+ Nodes, where this attribute does not make sense are ignored.
+ In nodes completely enclosed in the selection the attribute
+ becomes hard-formated, in all other (text-) nodes the attribute
+ is inserted into the attribute array.
+ For a character attribute, in cases where no selection exists
+ an "empty" hint is inserted. If there is a selection the attribute
+ is hard-formated and added to the node at rRg.Start().
+ If the attribute could not be inserted, the method returns
+ sal_False.
*/
virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&,
const sal_uInt16 nFlags) = 0;
- /**
- */
virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&,
const sal_uInt16 nFlags) = 0;
@@ -201,3 +189,4 @@
#endif // IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentDeviceAccess.hxx b/sw/inc/IDocumentDeviceAccess.hxx
index 42923a2fadf4..40c680bb597f 100755..100644
--- a/sw/inc/IDocumentDeviceAccess.hxx
+++ b/sw/inc/IDocumentDeviceAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -143,3 +144,5 @@
};
#endif // IDOCUMENTDEVICEACCESS_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentDrawModelAccess.hxx b/sw/inc/IDocumentDrawModelAccess.hxx
index 916554b69770..36e1d354321d 100644
--- a/sw/inc/IDocumentDrawModelAccess.hxx
+++ b/sw/inc/IDocumentDrawModelAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,13 +54,11 @@ public:
virtual SdrLayerID GetInvisibleControlsId() const = 0;
/** method to notify drawing page view about the invisible layers
- OD 26.06.2003 #108784#
@author OD
*/
virtual void NotifyInvisibleLayers( SdrPageView& _rSdrPageView ) = 0;
/** method to determine, if a layer ID belongs to the visible ones.
- OD 25.06.2003 #108784#
Note: If given layer ID is unknown, method asserts and returns <false>.
@author OD
@@ -73,7 +72,6 @@ public:
/** method to determine, if the corresponding visible layer ID for a invisible one.
- OD 25.06.2003 #108784#
Note: If given layer ID is a visible one, method returns given layer ID.
Note: If given layer ID is unknown, method returns given layer ID.
@@ -89,7 +87,6 @@ public:
/** method to determine, if the corresponding invisible layer ID for a visible one.
- OD 25.06.2003 #108784#
Note: If given layer ID is a invisible one, method returns given layer ID.
Note: If given layer ID is unknown, method returns given layer ID.
@@ -109,3 +106,5 @@ protected:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentExternalData.hxx b/sw/inc/IDocumentExternalData.hxx
index 51051e4fa020..8abdeae369c5 100644
--- a/sw/inc/IDocumentExternalData.hxx
+++ b/sw/inc/IDocumentExternalData.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,7 @@
#ifndef INCLUDED_I_DOCUMENT_EXTERNAL_DATA_HXX
#define INCLUDED_I_DOCUMENT_EXTERNAL_DATA_HXX
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <boost/shared_ptr.hpp>
namespace sw
@@ -53,7 +54,7 @@ typedef ::boost::shared_ptr<ExternalData> tExternalDataPointer;
class IDocumentExternalData
{
protected:
- typedef ::std::hash_map<sw::tExternalDataType, sw::tExternalDataPointer, sw::ExternalDataTypeHash>
+ typedef ::boost::unordered_map<sw::tExternalDataType, sw::tExternalDataPointer, sw::ExternalDataTypeHash>
tExternalData;
tExternalData m_externalData;
@@ -67,3 +68,5 @@ public:
};
#endif //INCLUDED_I_DOCUMENT_EXTERNAL_DATA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx
index be17fb7636f5..4cc0318cd852 100644
--- a/sw/inc/IDocumentFieldsAccess.hxx
+++ b/sw/inc/IDocumentFieldsAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,35 +54,20 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } }
class IDocumentFieldsAccess
{
public:
- /**
- */
virtual const SwFldTypes *GetFldTypes() const = 0;
- /**
- */
virtual SwFieldType *InsertFldType(const SwFieldType &) = 0;
- /**
- */
virtual SwFieldType *GetSysFldType( const sal_uInt16 eWhich ) const = 0;
- /**
- */
virtual SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName, bool bDbFieldMatching) const = 0;
- /**
- */
virtual void RemoveFldType(sal_uInt16 nFld) = 0;
- /**
- */
virtual void UpdateFlds( SfxPoolItem* pNewHt, bool bCloseDB) = 0;
- /**
- */
virtual void InsDeletedFldType(SwFieldType &) = 0;
- // #111840#
/**
Puts a value into a field at a certain position.
@@ -96,9 +82,7 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } }
*/
virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich) = 0;
- // rufe das Update der Expression Felder auf; alle Ausdruecke werden
- // neu berechnet.
- // #111840#
+ // Call update of expression fields. All expressions are re-evaluated.
/** Updates a field.
@@ -112,39 +96,22 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } }
*/
virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds) = 0;
- /**
- */
virtual void UpdateRefFlds(SfxPoolItem* pHt) = 0;
- /**
- */
virtual void UpdateTblFlds(SfxPoolItem* pHt) = 0;
- /**
- */
virtual void UpdateExpFlds(SwTxtFld* pFld, bool bUpdateRefFlds) = 0;
- /**
- */
virtual void UpdateUsrFlds() = 0;
- /**
- */
virtual void UpdatePageFlds(SfxPoolItem*) = 0;
- /**
- */
virtual void LockExpFlds() = 0;
- /**
- */
virtual void UnlockExpFlds() = 0;
- /**
- */
virtual bool IsExpFldsLocked() const = 0;
-
virtual SwDocUpdtFld& GetUpdtFlds() const = 0;
/* @@@MAINTAINABILITY-HORROR@@@
@@ -153,35 +120,23 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } }
*/
virtual bool SetFieldsDirty(bool b, const SwNode* pChk, sal_uLong nLen) = 0;
- /**
- */
virtual void SetFixFields(bool bOnlyTimeDate, const DateTime* pNewDateTime) = 0;
- // Setze im Calculator alle SetExpresion Felder, die bis zur
- // angegebenen Position (Node [ + ::com::sun::star::ucb::Content]) gueltig sind. Es kann
- // eine erzeugte Liste aller Felder mit uebergegeben werden.
- // (ist die Adresse != 0, und der Pointer == 0 wird eine neue
- // Liste returnt.)
+
+ // In Calculator set all SetExpression fields that are valid up to the indicated position
+ // (Node [ + ::com::sun::star::ucb::Content]).
+ // A generated list of all fields may be passed along too
+ // (if the addreess != 0 and the pointer == 0 a new list will be returned).
virtual void FldsToCalc(SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt) = 0;
- /**
- */
virtual void FldsToCalc(SwCalc& rCalc, const _SetGetExpFld& rToThisFld) = 0;
- /**
- */
virtual void FldsToExpand(SwHash**& ppTbl, sal_uInt16& rTblSize, const _SetGetExpFld& rToThisFld) = 0;
- /**
- */
virtual bool IsNewFldLst() const = 0;
- /**
- */
virtual void SetNewFldLst( bool bFlag) = 0;
- /**
- */
virtual void InsDelFldInFldLst(bool bIns, const SwTxtFld& rFld) = 0;
protected:
@@ -189,3 +144,5 @@ protected:
};
#endif // IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentLayoutAccess.hxx b/sw/inc/IDocumentLayoutAccess.hxx
index 8ff2f4c52588..7593aa670a99 100644
--- a/sw/inc/IDocumentLayoutAccess.hxx
+++ b/sw/inc/IDocumentLayoutAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,5 @@ protected:
};
#endif // IDOCUMENTLAYOUTACCESS_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentLineNumberAccess.hxx b/sw/inc/IDocumentLineNumberAccess.hxx
index 77c4c9e02307..b4a6327dcc33 100644
--- a/sw/inc/IDocumentLineNumberAccess.hxx
+++ b/sw/inc/IDocumentLineNumberAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,3 +50,4 @@ class SwLineNumberInfo;
#endif // IDOCUMENTLINENUMBERACCESS_HXX_INCLUDED
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentLinksAdministration.hxx b/sw/inc/IDocumentLinksAdministration.hxx
index 44fd8c148044..fb3d3c8c89e0 100644
--- a/sw/inc/IDocumentLinksAdministration.hxx
+++ b/sw/inc/IDocumentLinksAdministration.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,49 +40,35 @@ namespace sfx2 { class SvLinkSource; class LinkManager; }
class IDocumentLinksAdministration
{
public:
- /** Links un-/sichtbar in LinkManager einfuegen (gelinkte Bereiche)
+ /** Insert links in-/visibly into LinkManager (linked ranges).
*/
virtual bool IsVisibleLinks() const = 0;
- /**
- */
virtual void SetVisibleLinks(bool bFlag) = 0;
- /**
- */
virtual sfx2::LinkManager& GetLinkManager() = 0;
- /**
- */
virtual const sfx2::LinkManager& GetLinkManager() const = 0;
- /** FME 2005-02-25 #i42634# Moved common code of SwReader::Read() and
+ /** #i42634# Moved common code of SwReader::Read() and
SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks():
*/
virtual void UpdateLinks(sal_Bool bUI) = 0;
- /** SS fuers Linken von Dokumentteilen
+ /** SS fuers Linken von Dokumentteilen / ?? for linking of parts of documents.
*/
virtual bool GetData(const String& rItem, const String& rMimeType, ::com::sun::star::uno::Any& rValue) const = 0;
- /**
- */
virtual bool SetData(const String& rItem, const String& rMimeType, const ::com::sun::star::uno::Any& rValue) = 0;
- /**
- */
virtual ::sfx2::SvLinkSource* CreateLinkSource(const String& rItem) = 0;
- /** embedded alle lokalen Links (Bereiche/Grafiken)
+ /** Embed all local links (ranges/graphics).
*/
virtual bool EmbedAllLinks() = 0;
- /**
- */
virtual void SetLinksUpdated(const bool bNewLinksUpdated) = 0;
- /**
- */
virtual bool LinksUpdated() const = 0;
protected:
@@ -89,3 +76,5 @@ protected:
};
#endif // IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentListItems.hxx b/sw/inc/IDocumentListItems.hxx
index 0232fc86f104..8031993f17e4 100644
--- a/sw/inc/IDocumentListItems.hxx
+++ b/sw/inc/IDocumentListItems.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,5 @@ protected:
};
#endif // IDOCUMENTLISTITEMS_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentListsAccess.hxx b/sw/inc/IDocumentListsAccess.hxx
index e811496edc56..7685a0bd6568 100644
--- a/sw/inc/IDocumentListsAccess.hxx
+++ b/sw/inc/IDocumentListsAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,13 +46,13 @@ class IDocumentListsAccess
virtual SwList* createListForListStyle( const String sListStyleName ) = 0;
virtual SwList* getListForListStyle( const String sListStyleName ) const = 0;
virtual void deleteListForListStyle( const String sListStyleName ) = 0;
- // --> OD 2008-07-08 #i91400#
+ // #i91400#
virtual void trackChangeOfListStyleName( const String sListStyleName,
const String sNewListStyleName ) = 0;
- // <--
-
protected:
virtual ~IDocumentListsAccess() {};
};
#endif // IDOCUMENTLISTSACCESS_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx
index 55fc0901a7e0..e3cff0189cf4 100644
--- a/sw/inc/IDocumentMarkAccess.hxx
+++ b/sw/inc/IDocumentMarkAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -249,3 +250,5 @@ class IDocumentMarkAccess
};
#endif // IDOCUMENTBOOKMARKACCESS_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentOutlineNodes.hxx b/sw/inc/IDocumentOutlineNodes.hxx
index 88a8148a2a52..9468fa9c14bb 100644
--- a/sw/inc/IDocumentOutlineNodes.hxx
+++ b/sw/inc/IDocumentOutlineNodes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,5 @@ protected:
};
#endif // IDOCUMENTOUTLINENODES_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentRedlineAccess.hxx b/sw/inc/IDocumentRedlineAccess.hxx
index 97570f0d0461..ffa24645181b 100644
--- a/sw/inc/IDocumentRedlineAccess.hxx
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,31 +60,31 @@ namespace nsRedlineMode_t
const RedlineMode_t REDLINE_SHOW_DELETE = 0x20;// show all delets
const RedlineMode_t REDLINE_SHOW_MASK = REDLINE_SHOW_INSERT | REDLINE_SHOW_DELETE;
- // fuer die interne Verwaltung:
- // die originalen Redlines inclusive des Contents entfernen
- // (ClipBoard/Textbausteine)
+ // For internal management:
+ // remove the original Redlines together with their content
+ // (Clipboard/text modules).
const RedlineMode_t REDLINE_DELETE_REDLINES = 0x100;
- // beim Loeschen innerhalb ein RedlineObjectes, waehrend des Appends,
- // das DeleteRedline ignorieren
+ // When deleting within a RedlineObject
+ // ignore the DeleteRedline during Append.
const RedlineMode_t REDLINE_IGNOREDELETE_REDLINES = 0x200;
- // don't combine any readlines. This flags is may only used in the Undo.
+ // don't combine any redlines. This flag may be only used in Undo.
const RedlineMode_t REDLINE_DONTCOMBINE_REDLINES = 0x400;
}
typedef sal_uInt16 RedlineType_t;
namespace nsRedlineType_t
{
- // die RedlineTypen gehen von 0 bis 127
- const RedlineType_t REDLINE_INSERT = 0x0;// Inhalt wurde eingefuegt
- const RedlineType_t REDLINE_DELETE = 0x1;// Inhalt wurde geloescht
- const RedlineType_t REDLINE_FORMAT = 0x2;// Attributierung wurde angewendet
- const RedlineType_t REDLINE_TABLE = 0x3;// TabellenStruktur wurde veraendert
- const RedlineType_t REDLINE_FMTCOLL = 0x4;// FormatVorlage wurde veraendert (Autoformat!)
-
- // ab 128 koennen Flags hineinverodert werden
+ // Range of RedlineTypes is 0 to 127.
+ const RedlineType_t REDLINE_INSERT = 0x0;// Content has been inserted.
+ const RedlineType_t REDLINE_DELETE = 0x1;// Content has been deleted.
+ const RedlineType_t REDLINE_FORMAT = 0x2;// Attributes have been applied.
+ const RedlineType_t REDLINE_TABLE = 0x3;// Table structure has been altered.
+ const RedlineType_t REDLINE_FMTCOLL = 0x4;// Style has been altered (Autoformat!).
+
+ // When larger than 128, flags can be inserted.
const RedlineType_t REDLINE_NO_FLAG_MASK = 0x7F;
//const RedlineType_t REDLINE_FLAG_MASK = 0xFF80;
- const RedlineType_t REDLINE_FORM_AUTOFMT = 0x80;// kann als Flag im RedlineType stehen
+ const RedlineType_t REDLINE_FORM_AUTOFMT = 0x80;// Can be a flag in RedlineType.
}
/** IDocumentRedlineAccess
@@ -138,18 +139,11 @@ public:
*/
virtual bool IsRedlineOn() const = 0;
- /**
- */
virtual bool IsIgnoreRedline() const = 0;
- /**
- */
virtual const SwRedlineTbl& GetRedlineTbl() const = 0;
-
- /*
- */
- virtual bool IsInRedlines(const SwNode& rNode) const = 0;
+ virtual bool IsInRedlines(const SwNode& rNode) const = 0;
/***************************************************
Manipulation
@@ -165,90 +159,60 @@ public:
*/
virtual bool AppendRedline(/*[in]*/SwRedline* pPtr, /*[in]*/bool bCallDelete) = 0;
- /**
- */
virtual bool SplitRedline(/*[in]*/const SwPaM& rPam) = 0;
- /**
- */
virtual bool DeleteRedline(
/*[in]*/const SwPaM& rPam,
/*[in]*/bool bSaveInUndo,
/*[in]*/sal_uInt16 nDelType) = 0;
- /**
- */
virtual bool DeleteRedline(
/*[in]*/const SwStartNode& rSection,
/*[in]*/bool bSaveInUndo,
/*[in]*/sal_uInt16 nDelType) = 0;
- /**
- */
virtual sal_uInt16 GetRedlinePos(
/*[in]*/const SwNode& rNode,
/*[in]*/sal_uInt16 nType) const = 0;
virtual void CompressRedlines() = 0;
- /**
- */
virtual const SwRedline* GetRedline(
/*[in]*/const SwPosition& rPos,
/*[in]*/sal_uInt16* pFndPos) const = 0;
- /**
- */
virtual bool IsRedlineMove() const = 0;
- /**
- */
virtual void SetRedlineMove(/*[in]*/bool bFlag) = 0;
- /**
- */
virtual bool AcceptRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete) = 0;
- /**
- */
virtual bool AcceptRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete) = 0;
- /**
- */
virtual bool RejectRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete) = 0;
- /**
- */
virtual bool RejectRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete) = 0;
- /**
- */
virtual const SwRedline* SelNextRedline(/*[in]*/SwPaM& rPam) const = 0;
- /**
- */
virtual const SwRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const = 0;
- // alle Redline invalidieren, die Darstellung hat sich geaendert
+ // Representation has changed, invalidate all Redlines.
virtual void UpdateRedlineAttr() = 0;
- // legt gegebenenfalls einen neuen Author an
+ // Create a new Author if required.
virtual sal_uInt16 GetRedlineAuthor() = 0;
- // fuer die Reader usw. - neuen Author in die Tabelle eintragen
+ // For Readers etc.: register new Author in table.
virtual sal_uInt16 InsertRedlineAuthor(const String& rAuthor) = 0;
- // Kommentar am Redline an der Position setzen
+ // Place a comment at Redline at given position.
virtual bool SetRedlineComment(
/*[in]*/const SwPaM& rPam,
/*[in]*/const String& rComment) = 0;
- /**
- */
virtual const ::com::sun::star::uno::Sequence <sal_Int8>& GetRedlinePassword() const = 0;
- /**
- */
virtual void SetRedlinePassword(
/*[in]*/const ::com::sun::star::uno::Sequence <sal_Int8>& rNewPassword) = 0;
@@ -257,3 +221,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx
index 214b9769ed32..76e3d977d447 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#define IDOCUMENTSETTINGACCESS_HXX_INCLUDED
#include <tools/solar.h>
-#ifndef _VOS_REF_HXX
-#include <vos/ref.hxx>
-#endif
+#include <rtl/ref.hxx>
#include <chcmprse.hxx>
#include <fldupde.hxx>
@@ -78,9 +77,10 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
USE_OLD_PRINTER_METRICS,
TABS_RELATIVE_TO_INDENT,
PROTECT_FORM,
- // --> OD 2008-06-05 #i89181#
+ // #i89181#
TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
- // <--
+ INVERT_BORDER_SPACING,
+ COLLAPSE_EMPTY_CELL_PARA,
// COMPATIBILITY FLAGS END
BROWSE_MODE,
@@ -147,14 +147,14 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
@returns
the forbidden characters table.
*/
- virtual vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
+ virtual rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
/** Get the forbidden character table.
@returns
the forbidden characters table.
*/
- virtual const vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const = 0;
+ virtual const rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const = 0;
/** Get the current link update mode.
@@ -211,3 +211,5 @@ protected:
};
#endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentState.hxx b/sw/inc/IDocumentState.hxx
index 6362f6213290..83322b9f9d56 100644
--- a/sw/inc/IDocumentState.hxx
+++ b/sw/inc/IDocumentState.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,49 +36,33 @@
class IDocumentState
{
public:
- /** Bei Formataenderungen muss das zu Fuss gerufen werden!
+ /** Must be called manually at changes of format.
*/
virtual void SetModified() = 0;
- /**
- */
virtual void ResetModified() = 0;
- /** Dokumentaenderungen?
+ /** Changes of document?
*/
virtual bool IsModified() const = 0;
- /** Zustaende ueber Ladezustand
- frueher DocInfo
+ /** State of being loaded or not.
+ Formerly DocInfo.
*/
virtual bool IsLoaded() const = 0;
- /**
- */
virtual bool IsUpdateExpFld() const = 0;
- /**
- */
virtual bool IsNewDoc() const = 0;
- /**
- */
virtual bool IsPageNums() const = 0;
- /**
- */
virtual void SetPageNums(bool b) = 0;
- /**
- */
virtual void SetNewDoc(bool b) = 0;
- /**
- */
virtual void SetUpdateExpFldStat(bool b) = 0;
- /**
- */
virtual void SetLoaded(bool b = sal_True) = 0;
protected:
@@ -85,3 +70,5 @@
};
#endif // IDOCUMENTSTATE_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentStatistics.hxx b/sw/inc/IDocumentStatistics.hxx
index 25c2d54d71e9..152d382f998e 100644
--- a/sw/inc/IDocumentStatistics.hxx
+++ b/sw/inc/IDocumentStatistics.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,21 +37,17 @@
{
public:
- /** die DocInfo hat siche geaendert (Notify ueber die DocShell)
- stosse die entsp. Felder zum Updaten an.
+ /** DocInfo has changed (notify via DocShell):
+ make required fields update.
*/
virtual void DocInfoChgd() = 0;
- /** Dokument - Statistics
+ /** Document - Statistics
*/
virtual const SwDocStat &GetDocStat() const = 0;
- /**
- */
virtual void SetDocStat(const SwDocStat& rStat) = 0;
- /**
- */
virtual void UpdateDocStat(SwDocStat& rStat) = 0;
protected:
@@ -58,3 +55,5 @@ protected:
};
#endif // IDOCUMENTSTATISTICS_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentStylePoolAccess.hxx b/sw/inc/IDocumentStylePoolAccess.hxx
index 743b0d3304e4..8848a7daa3d0 100644
--- a/sw/inc/IDocumentStylePoolAccess.hxx
+++ b/sw/inc/IDocumentStylePoolAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,34 +47,30 @@
{
public:
- /** Gebe die "Auto-Collection" mit der Id zurueck. Existiert
- sie noch nicht, dann erzuege sie
- Ist der String-Pointer definiert, dann erfrage nur die
- Beschreibung der Attribute, !! es legt keine Vorlage an !!
+ /** Return "Auto-Collection with ID.
+ Create, if it does not yet exist.
+ If string pointer is defined request only description
+ of attributes, do not create style sheet!
*/
virtual SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage = true ) = 0;
- /** return das geforderte automatische Format - Basis-Klasse !
+ /** Return required automatic format base class.
*/
virtual SwFmt* GetFmtFromPool( sal_uInt16 nId ) = 0;
- /** returne das geforderte automatische Format
+ /** Return required automatic format.
*/
virtual SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId ) = 0;
- /**
- */
virtual SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId ) = 0;
- /** returne die geforderte automatische Seiten-Vorlage
+ /** Return required automatic page style.
*/
virtual SwPageDesc* GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage = true ) = 0;
- /**
- */
virtual SwNumRule* GetNumRuleFromPool( sal_uInt16 nId ) = 0;
- /** pruefe, ob diese "Auto-Collection" in Dokument schon/noch benutzt wird
+ /** Check whether this "auto-collection" is used in document.
*/
virtual bool IsPoolTxtCollUsed( sal_uInt16 nId ) const = 0;
virtual bool IsPoolFmtUsed( sal_uInt16 nId ) const = 0;
@@ -85,3 +82,4 @@
#endif // IDOCUMENTSTYLEPOOLACCESS_HXX_INCLUDED
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentTimerAccess.hxx b/sw/inc/IDocumentTimerAccess.hxx
index f0d69e942af3..c918edc074d4 100644
--- a/sw/inc/IDocumentTimerAccess.hxx
+++ b/sw/inc/IDocumentTimerAccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,3 +59,5 @@
};
#endif // IDOCUMENTTIMERACCESS_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentUndoRedo.hxx b/sw/inc/IDocumentUndoRedo.hxx
index 0d78d3b361c9..33ae7efb8e64 100644
--- a/sw/inc/IDocumentUndoRedo.hxx
+++ b/sw/inc/IDocumentUndoRedo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -139,7 +140,7 @@ public:
virtual SwUndoId EndUndo(SwUndoId const eUndoId,
SwRewriter const*const pRewriter) = 0;
- /** <- #111827#
+ /**
Delete all Undo actions.
Of course Undo will be disabled during deletion.
*/
@@ -281,3 +282,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IGrammarContact.hxx b/sw/inc/IGrammarContact.hxx
index 44c54b55fe9f..dbaf3867d496 100644
--- a/sw/inc/IGrammarContact.hxx
+++ b/sw/inc/IGrammarContact.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,3 +86,4 @@ void finishGrammarCheck( SwTxtNode& );
#endif // IGRAMMARCONTACT_HXX_INCLUDED
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IInterface.hxx b/sw/inc/IInterface.hxx
index 52b691c4aa85..1fbdf7947732 100644
--- a/sw/inc/IInterface.hxx
+++ b/sw/inc/IInterface.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,5 @@ protected:
};
#endif // IDOCUMENT_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IMark.hxx b/sw/inc/IMark.hxx
index 6a46ae01d49e..66d1dc6d19df 100644
--- a/sw/inc/IMark.hxx
+++ b/sw/inc/IMark.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,6 +33,7 @@
#include <pam.hxx>
#include <boost/operators.hpp>
#include <map>
+#include "swdll.hxx"
#ifndef SW_DECL_SWSERVEROBJECT_DEFINED
#define SW_DECL_SWSERVEROBJECT_DEFINED
@@ -43,7 +45,7 @@ struct SwPosition;
namespace sw { namespace mark
{
- class IMark
+ class SAL_DLLPUBLIC_EXPORT IMark
: virtual public SwModify // inherited as interface
, public ::boost::totally_ordered<IMark>
{
@@ -81,7 +83,7 @@ namespace sw { namespace mark
virtual rtl::OUString ToString( ) const =0;
};
- class IBookmark
+ class SAL_DLLPUBLIC_EXPORT IBookmark
: virtual public IMark
{
public:
@@ -91,7 +93,7 @@ namespace sw { namespace mark
virtual void SetKeyCode(const KeyCode&) =0;
};
- class IFieldmark
+ class SAL_DLLPUBLIC_EXPORT IFieldmark
: virtual public IMark
{
public:
@@ -108,7 +110,7 @@ namespace sw { namespace mark
virtual void Invalidate() = 0;
};
- class ICheckboxFieldmark
+ class SAL_DLLPUBLIC_EXPORT ICheckboxFieldmark
: virtual public IFieldmark
{
public:
@@ -117,3 +119,5 @@ namespace sw { namespace mark
};
}}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 17000a4657c7..96c5d74a319e 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -111,7 +112,7 @@ class SwNoteProps: public utl::ConfigItem
bool bIsShowAnchor;
public:
SwNoteProps()
- : ConfigItem(::rtl::OUString::createFromAscii("Office.Writer/Notes"))
+ : ConfigItem(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Writer/Notes")))
, bIsShowAnchor(false)
{
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames = GetPropertyNames();
@@ -126,23 +127,17 @@ class SwNoteProps: public utl::ConfigItem
{
return bIsShowAnchor;
}
- ::com::sun::star::uno::Sequence< ::rtl::OUString >& GetPropertyNames()
- {
+ ::com::sun::star::uno::Sequence< ::rtl::OUString >& GetPropertyNames()
+ {
static ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames;
- if(!aNames.getLength())
- {
- static const char* aPropNames[] =
- {
- "ShowAnkor"
- };
- const int nCount = sizeof(aPropNames)/sizeof(const char*);
- aNames.realloc(nCount);
- ::rtl::OUString* pNames = aNames.getArray();
- for(int i = 0; i < nCount; i++)
- pNames[i] = ::rtl::OUString::createFromAscii(aPropNames[i]);
- }
- return aNames;
+ if(!aNames.getLength())
+ {
+ aNames.realloc(1);
+ ::rtl::OUString* pNames = aNames.getArray();
+ pNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowAnkor"));
}
+ return aNames;
+ }
virtual void Commit();
virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
@@ -174,7 +169,6 @@ class SwPostItMgr: public SfxListener
typedef std::list<sw::sidebarwindows::SwSidebarWin*>::iterator SwSidebarWin_iterator;
void AddPostIts(bool bCheckExistance = true,bool bFocus = true);
- //void AddRedlineComments(bool bCheckExistance, bool bFocus);
void RemoveSidebarWin();
void PreparePageContainer();
void Scroll(const long lScroll,const unsigned long aPage );
@@ -234,9 +228,6 @@ class SwPostItMgr: public SfxListener
void Delete(String aAuthor);
void Delete();
-#if 0
- void Hide( SwPostItField* pPostItField );
-#endif
void Hide( const String& rAuthor );
void Hide();
void Show();
@@ -305,3 +296,4 @@ class SwPostItMgr: public SfxListener
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/RefreshListenerContainer.hxx b/sw/inc/RefreshListenerContainer.hxx
index 8860787a8abf..cc9506d843b1 100644
--- a/sw/inc/RefreshListenerContainer.hxx
+++ b/sw/inc/RefreshListenerContainer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,3 +37,5 @@ public:
void Refreshed();
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx
index 00649f211f51..24f3fd11cc30 100644
--- a/sw/inc/SidebarWin.hxx
+++ b/sw/inc/SidebarWin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,7 +51,6 @@ class SwEditWin;
class SwView;
class Edit;
class MenuButton;
-//class SwRedline;
class SwFrm;
@@ -146,9 +146,6 @@ class SwSidebarWin : public Window
void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow; };
virtual bool CalcFollow() = 0;
-#if 0
-#endif
-
sal_Int32 GetMetaHeight();
sal_Int32 GetMinimumSizeWithMeta();
sal_Int32 GetMinimumSizeWithoutMeta();
@@ -241,34 +238,6 @@ class SwSidebarWin : public Window
} } // eof namespace sw::sidebarwindows
-
-// implementation for change tracking comments, fully functional, but not yet used
-/*
-class SwRedComment : public SwSidebarWin
-{
- private:
- SwRedline* pRedline;
-
- protected:
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- public:
- SwRedComment( Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits,SwRedline* pRed);
- virtual ~SwRedComment() {};
-
- virtual void UpdateData();
- virtual void SetPostItText();
- virtual void Delete();
- virtual void GotoPos();
- virtual void SetPopup();
- virtual void ActivatePostIt();
- virtual void DeactivatePostIt();
-
- virtual String GetAuthor();
- virtual Date GetDate();
- virtual Time GetTime();
-
- virtual bool IsProtected();
-};
-*/
-
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/SidebarWindowsTypes.hxx b/sw/inc/SidebarWindowsTypes.hxx
index 8b86f87edf87..8e9ce8a3dadd 100644
--- a/sw/inc/SidebarWindowsTypes.hxx
+++ b/sw/inc/SidebarWindowsTypes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,10 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- *
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,3 +48,5 @@ enum SidebarPosition
} } // end of namespace sw::sidebarwindows
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx
index 0ad636adf67f..3c936b3a14f9 100644
--- a/sw/inc/SwAppletImpl.hxx
+++ b/sw/inc/SwAppletImpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,9 +40,7 @@
#include <tools/string.hxx>
#include <sfx2/frmhtml.hxx>
#include <sfx2/frmhtmlw.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <sot/storage.hxx>
#include <svl/itemset.hxx>
@@ -54,7 +53,7 @@ class SfxItemSet;
class SwApplet_Impl
{
com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > xApplet;
- SvCommandList aCommandList; // und die szugehorige Command-List
+ SvCommandList aCommandList;
SfxItemSet aItemSet;
String sAlt;
@@ -77,3 +76,5 @@ public:
void SetAltText( const String& rAlt ) {sAlt = rAlt;}
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/SwCapObjType.hxx b/sw/inc/SwCapObjType.hxx
index b256b51c6a53..e0f194f5cdbb 100644
--- a/sw/inc/SwCapObjType.hxx
+++ b/sw/inc/SwCapObjType.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,3 +34,5 @@ enum SwCapObjType
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/SwGetPoolIdFromName.hxx b/sw/inc/SwGetPoolIdFromName.hxx
index 1bb40de8ba91..f1f91524530e 100644
--- a/sw/inc/SwGetPoolIdFromName.hxx
+++ b/sw/inc/SwGetPoolIdFromName.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,5 @@ namespace nsSwGetPoolIdFromName
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/SwNodeNum.hxx b/sw/inc/SwNodeNum.hxx
index 56fef5d0a558..e9ca0ea05871 100644
--- a/sw/inc/SwNodeNum.hxx
+++ b/sw/inc/SwNodeNum.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,10 +39,9 @@ class SwNumFmt;
class SW_DLLPUBLIC SwNodeNum : public SwNumberTreeNode
{
public:
- // --> OD 2008-02-19 #refactorlists#
+
explicit SwNodeNum( SwTxtNode* pTxtNode );
explicit SwNodeNum( SwNumRule* pNumRule );
- // <--
virtual ~SwNodeNum();
SwNumRule* GetNumRule() const;
@@ -60,11 +60,8 @@ public:
virtual SwNumberTree::tSwNumTreeNumber GetStartValue() const;
-// String ToString() const;
-
SwPosition GetPosition() const;
- // --> OD 2006-03-07 #131436#
// The number tree root node is deleted, when the corresponding numbering
// rule is deleted. In this situation the number tree should be empty -
// still registered text nodes aren't allowed. But it is possible, that
@@ -73,11 +70,10 @@ public:
// Text nodes of the document nodes array aren't allowed to be registered
// in this situation - this will be asserted.
static void HandleNumberTreeRootNodeDelete( SwNodeNum& rNodeNum );
- // <--
/** determines the <SwNodeNum> instance, which is preceding the given text node
- OD 2007-09-06 #i81002#
+ #i81002#
@author OD
*/
@@ -86,24 +82,20 @@ public:
protected:
virtual SwNumberTreeNode * Create() const;
- // --> OD 2006-04-26 #i64010#
+ // --> #i64010#
virtual bool HasCountedChildren() const;
virtual bool IsCountedForNumbering() const;
// <--
- // --> OD 2008-02-19 #refactorlists#
// method called before this tree node has been added to the list tree
virtual void PreAdd();
// method called at a child after this child has been removed from the list tree
virtual void PostRemove();
- // <--
private:
SwTxtNode * mpTxtNode;
SwNumRule * mpNumRule;
- // --> OD 2006-03-07 #131436#
static void _UnregisterMeAndChildrenDueToRootDelete( SwNodeNum& rNodeNum );
- // <--
SwNodeNum( const SwNodeNum& ); // no copy constructor
SwNodeNum& operator=( const SwNodeNum& ); // no assignment operator
@@ -116,3 +108,5 @@ private:
};
#endif // _SW_NODE_NUM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx
index 58c5f38a5696..f57103fc4ada 100644
--- a/sw/inc/SwNumberTree.hxx
+++ b/sw/inc/SwNumberTree.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -143,8 +144,6 @@ public:
/**
Remove a child.
- OD 2008-02-19 #refactorlists# - no longer virtual
-
@param pChild child to be removed
*/
void RemoveChild( SwNumberTreeNode* pChild );
@@ -173,9 +172,7 @@ public:
*/
SwNumberTree::tSwNumTreeNumber GetNumber( bool bValidate = true ) const;
- // --> OD 2008-11-26 #158694#
bool IsContinueingPreviousSubTree() const;
- // <--
/**
Returns level numbers of this node.
@@ -240,7 +237,6 @@ public:
/** set level of this node
- OD 2008-03-13 #refactorlists#
precondition: node is already member of a list tree
@author OD
@@ -276,13 +272,13 @@ public:
All iterators holding the last valid node in the according list
of childs are set to the end of this list, thereby stating all
children in the list are invalid.
- OD 2007-10-26 #i83479# - made public
+ #i83479# - made public
*/
void InvalidateTree() const;
/**
Notifies all invalid children of this node.
- OD 2007-10-26 #i83479# - made public
+ #i83479# - made public
*/
void NotifyInvalidChildren();
@@ -312,15 +308,14 @@ public:
*/
void NotifyInvalidSiblings();
- /** notification of all nodes in the list tree on certain list level
-
- OD 2008-04-17 #refactorlists#
+ /**
+ notification of all nodes in the list tree on certain list level
*/
void NotifyNodesOnListLevel( const int nListLevel );
/** Invalidation and notification of complete numbering tree
- OD 2006-04-26 #i64010#
+ #i64010#
Usage: on <IsCounted()> state change its needed to invalidate the
complete numbering tree due to wide influence of this change.
*/
@@ -343,7 +338,7 @@ public:
/** determines the node, which is preceding the node
- OD 2007-09-06 #i81002#
+ #i81002#
The search for the preceding node is performed for the tree below the
<this> node. To search the complete tree, the method has been called for
the root of the tree.
@@ -352,30 +347,7 @@ public:
*/
const SwNumberTreeNode* GetPrecedingNodeOf( const SwNumberTreeNode& rNode ) const;
-// /**
-// Returns a string representation of this node.
-
-// @return the string representation of this node
-// */
-// virtual String ToString() const = 0;
-
-// /**
-// Print this subtree.
-
-// @param o output stream to direct output to
-// @param rIndent additional indent for the children of this node
-// @param rMyIndent indent to use for this node
-// @param nDepth number of levels to print (-1 means all levels)
-
-// @return output stream after output of this subtree
-// */
-// String print(const String & rIndent = String(" ",
-// RTL_TEXTENCODING_ASCII_US),
-// const String & rMyIndent = String(" ",
-// RTL_TEXTENCODING_ASCII_US),
-// int nDepth = -1) const;
-
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
static unsigned long GetInstances();
unsigned long GetSerial();
#endif
@@ -422,20 +394,16 @@ protected:
*/
tSwNumberTreeChildren::size_type GetChildCount() const;
- // --> OD 2006-04-26 #i64010# - made pure virtual
+ // #i64010# - made pure virtual
virtual bool HasCountedChildren() const = 0;
- // <--
- // --> OD 2006-04-26 #i64010#
+ // #i64010#
virtual bool IsCountedForNumbering() const = 0;
- // <--
- // --> OD 2008-02-19 #refactorlists#
// method called before this tree node has been added to the list tree
virtual void PreAdd() = 0;
// method called after this tree node has been removed from the list tree
virtual void PostRemove() = 0;
- // <--
#ifdef __SW_NUMBER_TREE_SANITY_CHECK
/**
@@ -460,7 +428,6 @@ protected:
*/
mutable SwNumberTree::tSwNumTreeNumber mnNumber;
- // --> OD 2008-11-26 #158694#
// boolean indicating, that a node of a not counted parent node is continueing
// the numbering of parent's previous node sub tree.
// Example:
@@ -469,7 +436,6 @@ protected:
// sdfjlksaf <-- not counted parent node
// 1.2. lfjlaskf <-- <mbContinueingPreviousSubTree = true>
mutable bool mbContinueingPreviousSubTree;
- // <--
/**
true this node is a phantom
@@ -482,9 +448,9 @@ protected:
than or equal to the referenced child are valid. All children
greater than the referenced child are invalid.
*/
- mutable tSwNumberTreeChildren::iterator mItLastValid;
+ mutable tSwNumberTreeChildren::const_iterator mItLastValid;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
/**
Counter for the number of created instances.
*/
@@ -521,7 +487,6 @@ protected:
/** Invalidation of all children
- OD 2005-10-19 #126009#
Usage: on <IsCounted()> state change the children have to be invalidated
*/
inline void InvalidateChildren()
@@ -531,7 +496,6 @@ protected:
/** Invalidation of parent node, if its not counted.
- OD 2005-10-19 #126009#
Usage: on <IsCounted()> state change the parent have to be invalidated
*/
inline void InvalidateNotCountedParent()
@@ -551,7 +515,7 @@ protected:
- false only set if aItLastValid is preceeding
the current last valid node
*/
- void SetLastValid(tSwNumberTreeChildren::iterator aItLastValid,
+ void SetLastValid(tSwNumberTreeChildren::const_iterator aItLastValid,
bool bValidating = false) const;
/**
@@ -586,7 +550,6 @@ protected:
/** Notification of parent node siblings, if its not counted.
- OD 2005-10-19 #126009#
Usage: on <IsCounted()> state change the parent node and its siblings
have to be notified.
*/
@@ -600,8 +563,6 @@ protected:
/** notification of children nodes on certain depth
- OD 2008-04-17 #refactorlists#
-
@author OD
*/
void NotifyChildrenOnDepth( const int nDepth );
@@ -679,8 +640,6 @@ protected:
/**
Return if phantoms are counted.
- OD 2008-02-19 #refactorlists# - pure virtual now
-
@retval true phantoms are counted
@retval false else
*/
@@ -694,9 +653,7 @@ protected:
*/
bool HasOnlyPhantoms() const;
- // --> OD 2005-10-27 #126009#
bool HasPhantomCountedParent() const;
- // <--
/**
HB, OD : return node, if it isn't a phantom, otherwise return first
@@ -715,7 +672,7 @@ protected:
*/
void ClearObsoletePhantoms();
- tSwNumberTreeChildren::iterator GetIterator(const SwNumberTreeNode * pChild) const;
+ tSwNumberTreeChildren::const_iterator GetIterator(const SwNumberTreeNode * pChild) const;
/**
Moves all children to a given destination node.
@@ -727,7 +684,6 @@ protected:
/** Moves all children of this node that are greater than a given node
to the destination node.
- OD 2005-10-14 #125991#
distinguish between node for comparing, whose children are greater,
and the destination node.
@@ -765,3 +721,5 @@ struct SwNumberTreeNodeIsLessThan
{ return SwNumberTreeNodeLessThan(_pNode, pNode); }
};
#endif // _SW_NUMBER_TREE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/SwNumberTreeTypes.hxx b/sw/inc/SwNumberTreeTypes.hxx
index 39e5acd776cc..a50140d96c27 100644
--- a/sw/inc/SwNumberTreeTypes.hxx
+++ b/sw/inc/SwNumberTreeTypes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,3 +38,5 @@ namespace SwNumberTree
}
#endif // _SW_NUMBER_TREE_TYPES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/SwRewriter.hxx b/sw/inc/SwRewriter.hxx
index 5c98db3807ab..7e581cfcc854 100644
--- a/sw/inc/SwRewriter.hxx
+++ b/sw/inc/SwRewriter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,12 +31,11 @@
#include <vector>
#include <tools/string.hxx>
+#include <swdllapi.h>
-
-String const UNDO_ARG1("$1", RTL_TEXTENCODING_ASCII_US);
-String const UNDO_ARG2("$2", RTL_TEXTENCODING_ASCII_US);
-String const UNDO_ARG3("$3", RTL_TEXTENCODING_ASCII_US);
-
+extern SW_DLLPUBLIC String const UNDO_ARG1;
+extern SW_DLLPUBLIC String const UNDO_ARG2;
+extern SW_DLLPUBLIC String const UNDO_ARG3;
typedef std::pair<String, String> SwRewriteRule;
@@ -54,3 +54,5 @@ public:
};
#endif // _SW_REWRITER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/SwSmartTagMgr.hxx b/sw/inc/SwSmartTagMgr.hxx
index 1a2ecb9c9fd6..cd184928726c 100644
--- a/sw/inc/SwSmartTagMgr.hxx
+++ b/sw/inc/SwSmartTagMgr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,11 +56,6 @@ public:
virtual void SAL_CALL changesOccurred( const ::com::sun::star::util::ChangesEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
};
-/*
-namespace SwSmartTagMgr
-{
- SmartTagMgr& Get();
-}
-*/
-
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/SwStyleNameMapper.hxx b/sw/inc/SwStyleNameMapper.hxx
index 688b066bc75a..4d334d559383 100644
--- a/sw/inc/SwStyleNameMapper.hxx
+++ b/sw/inc/SwStyleNameMapper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,7 +34,7 @@
#include "swdllapi.h"
#ifndef INCLUDED_HASH_MAP
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#define INCLUDED_HASH_MAP
#endif
#include <stringhash.hxx>
@@ -87,7 +88,7 @@ class String;
struct SwTableEntry;
-typedef ::std::hash_map < const String*, sal_uInt16, StringHash, StringEq > NameToIdHash;
+typedef ::boost::unordered_map < const String*, sal_uInt16, StringHash, StringEq > NameToIdHash;
class SwStyleNameMapper
{
@@ -202,3 +203,5 @@ public:
static const SvStringsDtor& GetNumRuleProgNameArray();
};
#endif // _NAME_MAPPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx
index 2f78cab966de..dceb43a16c69 100644
--- a/sw/inc/SwUndoField.hxx
+++ b/sw/inc/SwUndoField.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,3 +92,5 @@ public:
};
#endif // SW_UNDO_FIELD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/SwXMLSectionList.hxx b/sw/inc/SwXMLSectionList.hxx
index ea3aff8b2ebd..046786473813 100644
--- a/sw/inc/SwXMLSectionList.hxx
+++ b/sw/inc/SwXMLSectionList.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,7 +45,6 @@ protected:
public:
SvStrings & rSectionList;
- // #110680#
SwXMLSectionList(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
SvStrings & rNewSectionList );
@@ -87,3 +87,5 @@ public:
~SvXMLIgnoreSectionListContext ( void );
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/TextCursorHelper.hxx b/sw/inc/TextCursorHelper.hxx
index cd7e185f3c4c..731cccf33c58 100644
--- a/sw/inc/TextCursorHelper.hxx
+++ b/sw/inc/TextCursorHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,4 @@ public:
#endif // _SW_TEXTCURSORHELPER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/accessibilityoptions.hxx b/sw/inc/accessibilityoptions.hxx
index 08256b4c5e79..ff5c934a89da 100644
--- a/sw/inc/accessibilityoptions.hxx
+++ b/sw/inc/accessibilityoptions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,4 @@ struct SwAccessibilityOptions
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index 01c4593fe636..21165327e3b3 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,8 +30,8 @@
#include <cppuhelper/weakref.hxx>
#include <com/sun/star/accessibility/XAccessible.hpp>
-#include <vos/ref.hxx>
-#include <vos/mutex.hxx>
+#include <rtl/ref.hxx>
+#include <osl/mutex.hxx>
#include <svx/IAccessibleViewForwarder.hxx>
#include <svx/IAccessibleParent.hxx>
#include <tools/debug.hxx>
@@ -66,12 +67,8 @@ class Window;
#define ACC_STATE_OPAQUE 0x02
// pseudo states for events
-// --> OD 2009-01-07 #i88069# - pseudo state for event TEXT_ATTRIBUTE_CHANGED
#define ACC_STATE_TEXT_ATTRIBUTE_CHANGED 0x0200
-// <--
-// --> OD 2005-12-12 #i27301# - pseudo state for event TEXT_SELECTION_CHANGED
#define ACC_STATE_TEXT_SELECTION_CHANGED 0x0100
-// <--
#define ACC_STATE_CARET 0x80
#define ACC_STATE_RELATION_FROM 0x40
#define ACC_STATE_RELATION_TO 0x20
@@ -80,24 +77,21 @@ class Window;
#define ACC_STATE_MASK 0x1F
-// --> OD 2005-12-12 #i27301# - introduce type definition of states
typedef sal_uInt16 tAccessibleStates;
-// <--
class SwAccessibleMap : public accessibility::IAccessibleViewForwarder,
public accessibility::IAccessibleParent
{
- mutable ::vos::OMutex maMutex;
- ::vos::OMutex maEventMutex;
+ mutable ::osl::Mutex maMutex;
+ ::osl::Mutex maEventMutex;
SwAccessibleContextMap_Impl *mpFrmMap;
SwAccessibleShapeMap_Impl *mpShapeMap;
SwShapeList_Impl *mpShapes;
SwAccessibleEventList_Impl *mpEvents;
SwAccessibleEventMap_Impl *mpEventMap;
- // --> OD 2005-12-13 #i27301# - data structure to keep information about
+ // #i27301 data structure to keep information about
// accessible paragraph, which have a selection.
SwAccessibleSelectedParas_Impl* mpSelectedParas;
- // <--
ViewShell *mpVSh;
/// for page preview: store preview data, VisArea, and mapping of
/// preview-to-display coordinates
@@ -132,7 +126,6 @@ class SwAccessibleMap : public accessibility::IAccessibleViewForwarder,
/** method to build up a new data structure of the accessible pararaphs,
which have a selection
- OD 2005-12-13 #i27301#
Important note: method has to used inside a mutual exclusive section
@author OD
@@ -147,8 +140,6 @@ public:
::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible> GetDocumentView();
- // OD 15.01.2003 #103492# - complete re-factoring of method due to new
- // page/print preview functionality.
::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible> GetDocumentPreview(
const std::vector<PrevwPage*>& _rPrevwPages,
@@ -156,7 +147,7 @@ public:
const SwPageFrm* _pSelectedPageFrm,
const Size& _rPrevwWinSize );
- ::vos::ORef < SwAccessibleContext > GetContextImpl(
+ ::rtl::Reference < SwAccessibleContext > GetContextImpl(
const SwFrm *pFrm,
sal_Bool bCreate = sal_True );
::com::sun::star::uno::Reference<
@@ -164,7 +155,7 @@ public:
const SwFrm *pFrm,
sal_Bool bCreate = sal_True );
- ::vos::ORef < ::accessibility::AccessibleShape > GetContextImpl(
+ ::rtl::Reference < ::accessibility::AccessibleShape > GetContextImpl(
const SdrObject *pObj,
SwAccessibleContext *pParentImpl,
sal_Bool bCreate = sal_True );
@@ -183,10 +174,6 @@ public:
/** get size of a dedicated preview page
- OD 15.01.2003 #103492#
- complete re-factoring of previous method due to new page/print preview
- functionality.
-
@author OD
@param _nPrevwPageNum
@@ -212,19 +199,16 @@ public:
void InvalidateContent( const SwFrm *pFrm );
- // --> OD 2009-01-06 #i88069#
void InvalidateAttr( const SwTxtFrm& rTxtFrm );
- // <--
void InvalidateCursorPosition( const SwFrm *pFrm );
void InvalidateFocus();
void SetCursorContext(
- const ::vos::ORef < SwAccessibleContext >& rCursorContext );
+ const ::rtl::Reference < SwAccessibleContext >& rCursorContext );
// Invalidate state of whole tree. If an action is open, this call
// is processed when the last action ends.
- // --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
void InvalidateStates( tAccessibleStates _nStates,
const SwFrm* _pFrm = 0 );
@@ -232,8 +216,6 @@ public:
/** invalidation CONTENT_FLOWS_FROM/_TO relation of a paragraph
- OD 2005-12-01 #i27138#
-
@author OD
@param _rTxtFrm
@@ -249,16 +231,12 @@ public:
/** invalidation of text selection of a paragraph
- OD 2005-12-12 #i27301#
-
@author OD
*/
void InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm );
/** invalidation of text selection of all paragraphs
- OD 2005-12-13 #i27301#
-
@author OD
*/
void InvalidateTextSelectionOfAllParas();
@@ -267,8 +245,6 @@ public:
Window& rChild ) const;
// update preview data (and fire events if necessary)
- // OD 15.01.2003 #103492# - complete re-factoring of method due to new
- // page/print preview functionality.
void UpdatePreview( const std::vector<PrevwPage*>& _rPrevwPages,
const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm,
@@ -305,7 +281,6 @@ public:
private:
/** get mapping mode for LogicToPixel and PixelToLogic conversions
- OD 15.01.2003 #103492#
Replacement method <PreviewAdjust(..)> by new method <GetMapMode>.
Method returns mapping mode of current output device and adjusts it,
if the shell is in page/print preview.
@@ -327,3 +302,5 @@ private:
MapMode& _orMapMode ) const;
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx
index af0cb98e4e6f..ad7a0de42414 100644
--- a/sw/inc/acmplwrd.hxx
+++ b/sw/inc/acmplwrd.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,7 +45,7 @@ class SwAutoCompleteWord
SwAutoCompleteWord_Impl* pImpl;
sal_uInt16 nMaxCount, nMinWrdLen;
- sal_Bool bLockWordLst;
+ bool bLockWordLst;
void DocumentDying(const SwDoc& rDoc);
public:
@@ -57,8 +58,8 @@ public:
const String& operator[]( sal_uInt16 n ) const { return *aWordLst[ n ]; }
- sal_Bool IsLockWordLstLocked() const { return bLockWordLst; }
- void SetLockWordLstLocked( sal_Bool bFlag ) { bLockWordLst = bFlag; }
+ bool IsLockWordLstLocked() const { return bLockWordLst; }
+ void SetLockWordLstLocked( bool bFlag ) { bLockWordLst = bFlag; }
void SetMaxCount( sal_uInt16 n );
@@ -71,3 +72,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/anchoreddrawobject.hxx b/sw/inc/anchoreddrawobject.hxx
index 11b637957f8e..ae3a3b1592e3 100644
--- a/sw/inc/anchoreddrawobject.hxx
+++ b/sw/inc/anchoreddrawobject.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,8 +33,6 @@
/** class for the positioning of drawing objects
- OD 2004-03-25 #i26791#
-
@author OD
*/
class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
@@ -44,7 +43,6 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
bool mbValidPos;
// rectangle, keeping the last object rectangle after the postioning
- // --> OD 2004-09-29 #i34748# - change <maLastObjRect> to a pointer
Rectangle* mpLastObjRect;
// boolean, indicating that anchored drawing object hasn't been attached
@@ -52,23 +50,21 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
// boolean changes its state.
bool mbNotYetAttachedToAnchorFrame;
- // --> OD 2004-08-09 #i28749# - boolean, indicating that anchored
+ // boolean, indicating that anchored
// drawing object hasn't been positioned yet. Once, it's positioned the
// boolean changes its state.
bool mbNotYetPositioned;
- // --> OD 2006-03-17 #i62875#
// boolean, indicating that after change of layout direction the
// anchored drawing object has to be captured on the page, if it exceeds
// the left or right page margin.
// Needed for compatibility option <DoNotCaptureDrawObjsOnPage>
bool mbCaptureAfterLayoutDirChange;
- // <--
/** method for the intrinsic positioning of a at-paragraph|at-character
anchored drawing object
- OD 2004-08-12 #i32795# - helper method for method <MakeObjPos>
+ helper method for method <MakeObjPos>
@author OD
*/
@@ -77,7 +73,7 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
/** method for the intrinsic positioning of a at-page|at-frame anchored
drawing object
- OD 2004-08-12 #i32795# - helper method for method <MakeObjPos>
+ helper method for method <MakeObjPos>
@author OD
*/
@@ -85,7 +81,6 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
/** method to set positioning attributes (not for as-character anchored)
- OD 2004-10-20 #i35798#
During load the positioning attributes aren't set.
Thus, the positioning attributes are set by the current object geometry.
This method is also used for the conversion for drawing objects
@@ -103,7 +98,7 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
instance has to be set.
Note: This adjustment is not be done for as-character anchored
drawing object - the positioning code takes care of this.
- OD 2004-07-29 #i31698# - API for drawing objects in Writer has
+ #i31698# - API for drawing objects in Writer has
been adjusted. Thus, this method will only set the internal anchor
position of the <SdrObject> instance to the anchor position given
by its anchor frame.
@@ -114,8 +109,6 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
/** method to invalidate the given page frame
- OD 2004-07-02 #i28701#
-
@author OD
*/
void _InvalidatePage( SwPageFrm* _pPageFrm );
@@ -126,20 +119,15 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
/** method to assure that anchored object is registered at the correct
page frame
- OD 2004-07-02 #i28701#
-
@author OD
*/
virtual void RegisterAtCorrectPage();
- // --> OD 2006-08-10 #i68520#
virtual bool _SetObjTop( const SwTwips _nTop);
virtual bool _SetObjLeft( const SwTwips _nLeft);
- // <--
- // --> OD 2006-10-05 #i70122#
virtual const SwRect GetObjBoundRect() const;
- // <--
+
public:
TYPEINFO();
@@ -160,23 +148,18 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
// accessors to the object area and its position
virtual const SwRect GetObjRect() const;
- // --> OD 2004-09-29 #i34748# - change return type to a pointer.
// Return value can be NULL.
const Rectangle* GetLastObjRect() const;
- // <--
- // --> OD 2004-09-29 #i34748# - change method
+
void SetLastObjRect( const Rectangle& _rNewObjRect );
- // <--
/** adjust positioning and alignment attributes for new anchor frame
- OD 2004-04-21
Set horizontal and vertical position/alignment to manual position
relative to anchor frame area using the anchor position of the
new anchor frame and the current absolute drawing object position.
Note: For correct Undo/Redo method should only be called inside a
Undo-/Redo-action.
- OD 2004-08-24 #i33313# - add second optional parameter <_pNewObjRect>
@author OD
@@ -192,32 +175,26 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
/** method to notify background of drawing object
- OD 2004-06-30 #i28701#
-
@author OD
*/
virtual void NotifyBackground( SwPageFrm* _pPageFrm,
const SwRect& _rRect,
PrepareHint _eHint );
- // --> OD 2005-08-16 #i53320#
inline bool NotYetPositioned() const
{
return mbNotYetPositioned;
}
- // <--
- // --> OD 2006-03-17 #i62875#
// change of layout direction needs to be tracked
// for setting <mbCaptureAfterLayoutDirChange>.
virtual void UpdateLayoutDir();
- // <--
- // --> OD 2006-03-17 #i62875#
bool IsOutsidePage() const;
- // <--
// new Loop control
void ValidateThis() { mbValidPos = true; }
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx
index c9f53e51f069..ce5ef72c4445 100644
--- a/sw/inc/anchoredobject.hxx
+++ b/sw/inc/anchoredobject.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,19 +35,16 @@
class SdrObject;
class SwFrm;
class SwLayoutFrm;
-// --> OD 2004-07-14 #117380#
class SwTxtFrm;
-// <--
-// --> OD 2004-06-30 #i28701#
+
class SwPageFrm;
class SwObjPositioningInProgress;
-// <--
+
class SwFrmFmt;
class SwFmtAnchor;
/** wrapper class for the positioning of Writer fly frames and drawing objects
- OD 2004-03-22 #i26791#
Purpose of this class is to provide a unified interface for the positioning
of Writer fly frames (derived classes of <SwFlyFrm>) and of drawing objects
(derived classes of <SwDrawFrm>).
@@ -60,10 +58,9 @@ class SW_DLLPUBLIC SwAnchoredObject
SdrObject* mpDrawObj;
// frame the object is anchored at
SwFrm* mpAnchorFrm;
- // --> OD 2004-06-30 #i28701# - page frame the object is registered at
+ // #i28701 - page frame the object is registered at
// note: no page frame for as-character anchored objects
SwPageFrm* mpPageFrm;
- // <--
// current relative position (relative to anchor position of anchor frame)
Point maRelPos;
@@ -85,34 +82,32 @@ class SW_DLLPUBLIC SwAnchoredObject
// a following layout frame in the text flow.
const SwLayoutFrm* mpVertPosOrientFrm;
- // --> OD 2004-06-30 #i28701# - boolean, indicating that the object
+ // i#i28701 boolean, indicating that the object
// positioning algorithm is in progress.
bool mbPositioningInProgress;
- // <--
- // --> OD 2004-06-29 #i28701# - Booleans needed for the layout process.
+ // Booleans needed for the layout process.
// Values only of relevance for to-paragraph and to-character anchored
// floating screen object, for whose the 'straight-forward positioning
// process are applied
// Otherwise value of <mbConsiderForTextWrap> is treated as <true>,
// value of <mbPositionLocked> is treated as <false> and
// value of <mbRestartLayoutProcess> is treated as <false>.
- // --> OD 2004-10-22 #i35911# - add boolean <mbClearEnvironment>
+ // i#35911 - add boolean <mbClearEnvironment>
// Indicates that due to its position and wrapping style its layout
// environment is cleared - all content is moved forward.
// Treated as <false>, if not the 'straight-forward positioning process"
// is applied.
bool mbConsiderForTextWrap;
bool mbPositionLocked;
- // --> OD 2005-01-10 #i40147# - boolean needed to keep position of
+ // boolean needed to keep position of
// anchored object locked due to special object positioning for sections.
bool mbKeepPositionLockedForSection;
- // <--
+
bool mbRestartLayoutProcess;
bool mbClearedEnvironment;
- // <--
- // --> OD 2004-08-25 #i3317# - boolean, indicating that temporarly
+ // i#i3317 - boolean, indicating that temporarly
// the wrapping style influence of the anchored object has to be
// considered during its positioning.
// This boolean is used, if compatibility option 'Consider wrapping style
@@ -122,13 +117,10 @@ class SW_DLLPUBLIC SwAnchoredObject
// The boolean is reset to <false>, when the layout process for a
// page frame starts - see class <NotifyLayoutOfPageInProgress>.
bool mbTmpConsiderWrapInfluence;
- // <--
- // --> OD 2006-06-21 #i68520#
mutable SwRect maObjRectWithSpaces;
mutable bool mbObjRectWithSpacesValid;
mutable SwRect maLastObjRect;
- // <--
/** method to indicate, that positioning of anchored object is in progress
@@ -145,12 +137,10 @@ class SW_DLLPUBLIC SwAnchoredObject
/** check anchor character rectangle
- OD 2004-03-25 #i26791#
helper method for method <CheckCharRectAndTopOfLine()>
For to-character anchored Writer fly frames the member <maLastCharRect>
is updated. This is checked for change and depending on the applied
positioning, it's decided, if the Writer fly frame has to be invalidated.
- OD 2004-07-14 #117380#
improvement - add second parameter <_rAnchorCharFrm>
@author OD
@@ -167,13 +157,10 @@ class SW_DLLPUBLIC SwAnchoredObject
/** check top of line
- OD 2004-03-25 #i26791#
helper method for method <CheckCharRectAndTopOfLine()>
For to-character anchored Writer fly frames the member <mnLastTopOfLine>
is updated. This is checked for change and depending on the applied
positioning, it's decided, if the Writer fly frame has to be invalidated.
- OD 2004-07-14 #117380#
- improvement - add second parameter <_rAnchorCharFrm>
@author OD
@@ -187,7 +174,6 @@ class SW_DLLPUBLIC SwAnchoredObject
void _CheckTopOfLine( const SwFmtAnchor& _rAnch,
const SwTxtFrm& _rAnchorCharFrm );
- // --> OD 2005-03-30 #120729# - needed for the hotfix
// method <lcl_HideObj(..)> sets needed data structure values for the
// object positioning
friend bool lcl_HideObj( const SwTxtFrm& _rFrm,
@@ -203,8 +189,6 @@ class SW_DLLPUBLIC SwAnchoredObject
/** method to assure that anchored object is registered at the correct
page frame
- OD 2004-07-02 #i28701#
-
@author OD
*/
virtual void RegisterAtCorrectPage() = 0;
@@ -218,8 +202,6 @@ class SW_DLLPUBLIC SwAnchoredObject
/** method to determine, if other anchored objects, also attached at
to the anchor frame, have to consider its wrap influence.
- // --> OD 2005-02-22 #i43255#
-
@author OD
*/
bool ConsiderObjWrapInfluenceOfOtherObjs() const;
@@ -227,20 +209,14 @@ class SW_DLLPUBLIC SwAnchoredObject
/** method to apply temporary consideration of wrapping style influence
to the anchored objects, which are anchored at the same anchor frame
- OD 2006-07-24 #b6449874#
-
@author OD
*/
void SetTmpConsiderWrapInfluenceOfOtherObjs( const bool bTmpConsiderWrapInfluence );
- // --> OD 2006-08-10 #i68520#
virtual bool _SetObjTop( const SwTwips _nTop) = 0;
virtual bool _SetObjLeft( const SwTwips _nLeft) = 0;
- // <--
- // --> OD 2006-10-05 #i70122#
virtual const SwRect GetObjBoundRect() const = 0;
- // <--
public:
TYPEINFO();
@@ -257,7 +233,6 @@ class SW_DLLPUBLIC SwAnchoredObject
void ChgAnchorFrm( SwFrm* _pNewAnchorFrm );
/** determine anchor frame containing the anchor position
- OD 2004-10-08 #i26945#
the anchor frame, which is determined, is <mpAnchorFrm>
for an at-page, at-frame or at-paragraph anchored object
and the anchor character frame for an at-character and as-character
@@ -267,17 +242,13 @@ class SW_DLLPUBLIC SwAnchoredObject
*/
SwFrm* GetAnchorFrmContainingAnchPos();
- // --> OD 2004-06-30 #i28701# - accessors to member <mpPageFrm>
SwPageFrm* GetPageFrm();
const SwPageFrm* GetPageFrm() const;
void SetPageFrm( SwPageFrm* _pNewPageFrm );
- // <--
/** method to determine the page frame, on which the 'anchor' of
the given anchored object is.
- OD 2004-07-02 #i28701#
- OD 2004-09-23 #i33751#, #i34060#
Adjust meaning of method and thus its name: If the anchored object
or its anchor isn't correctly inserted in the layout, no page frame
can be found. Thus, the return type changed to be a pointer and can
@@ -297,8 +268,6 @@ class SW_DLLPUBLIC SwAnchoredObject
/** get frame, which contains the anchor character, if the object
is anchored at-character or as-character.
- OD 2004-10-04 #i26945#
-
@author OD
@return SwTxtFrm*
@@ -313,22 +282,18 @@ class SW_DLLPUBLIC SwAnchoredObject
{
return mpVertPosOrientFrm;
}
- // --> OD 2004-11-29 #115759# - method to clear member <mpVertPosOrientFrm>
+ // method to clear member <mpVertPosOrientFrm>
inline void ClearVertPosOrientFrm()
{
mpVertPosOrientFrm = 0L;
}
- // <--
/** check anchor character rectangle and top of line
- OD 2004-03-25 #i26791#
For to-character anchored Writer fly frames the members <maLastCharRect>
and <maLastTopOfLine> are updated. These are checked for change and
depending on the applied positioning, it's decided, if the Writer fly
frame has to be invalidated.
- OD 2004-07-15 #117380#
- add parameter <_bCheckForParaPorInf>, default value <true>
@author OD
@@ -347,13 +312,10 @@ class SW_DLLPUBLIC SwAnchoredObject
// accessor to member <nmLastTopOfLine>
SwTwips GetLastTopOfLine() const;
- // OD 2004-05-18 #i28701# - follow-up of #i22341#
void AddLastTopOfLineY( SwTwips _nDiff );
/** reset members <maLastCharRect> and <mnLastTopOfLine>
- OD 2004-06-29 #i27801#
-
@author OD
*/
void ClearCharRectAndTopOfLine();
@@ -376,8 +338,6 @@ class SW_DLLPUBLIC SwAnchoredObject
/** method to determine, if invalidation of position is allowed
- OD 2004-07-01 #i28701#
-
@author OD
*/
bool InvalidationOfPosAllowed() const;
@@ -392,16 +352,12 @@ class SW_DLLPUBLIC SwAnchoredObject
objects, for whose the wrapping style influence has to be considered
on the object positioning.
- OD 2004-06-30 #i28701#
-
@author OD
*/
void InvalidateObjPosForConsiderWrapInfluence( const bool _bNotifyBackgrd );
/** method to trigger notification of 'background'
- OD 2004-07-01 #i28701#
-
@author OD
*/
virtual void NotifyBackground( SwPageFrm* _pPageFrm,
@@ -419,19 +375,15 @@ class SW_DLLPUBLIC SwAnchoredObject
// accessors to the object area and its position
virtual const SwRect GetObjRect() const = 0;
- // --> OD 2006-08-10 #i68520#
+
void SetObjTop( const SwTwips _nTop);
void SetObjLeft( const SwTwips _nLeft);
- // <--
/** method update layout direction the layout direction, the anchored
object is assigned to
- OD 2004-07-27 #i31698#
method has typically to be called, if the anchored object gets its
anchor frame assigned and if the anchor frame changes its layout direction
- OD 2006-03-17 #i62875#
- made virtual, because it's needed to be overloaded by <SwAnchoredDrawObject>
@author OD
*/
@@ -439,24 +391,18 @@ class SW_DLLPUBLIC SwAnchoredObject
/** method to determine object area inclusive its spacing
- OD 2004-06-30 #i28701#
- OD 2006-08-10 #i68520# - return constant reference
-
@author OD
*/
const SwRect& GetObjRectWithSpaces() const;
- // --> OD 2006-08-10 #i68520#
inline void InvalidateObjRectWithSpaces() const
{
mbObjRectWithSpacesValid = false;
}
- // <--
/** method to determine, if wrapping style influence of the anchored
object has to be considered on the object positioning
- OD 2004-06-30 #i28701#
Note: result of this method also decides, if the boolean for the
layout process are of relevance.
@@ -464,7 +410,7 @@ class SW_DLLPUBLIC SwAnchoredObject
*/
bool ConsiderObjWrapInfluenceOnObjPos() const;
- // --> OD 2004-06-29 #i28701# - accessors to booleans for layout process
+ // accessors to booleans for layout process
bool ConsiderForTextWrap() const;
void SetConsiderForTextWrap( const bool _bConsiderForTextWrap );
bool PositionLocked() const;
@@ -479,19 +425,19 @@ class SW_DLLPUBLIC SwAnchoredObject
mbPositionLocked = false;
}
}
- // --> OD 2005-01-10 #i40147#
+
inline void SetKeepPosLocked( const bool _bKeepPosLocked )
{
mbKeepPositionLockedForSection = _bKeepPosLocked;
}
- // <--
+
bool RestartLayoutProcess() const;
void SetRestartLayoutProcess( const bool _bRestartLayoutProcess );
- // --> OD 2004-10-22 #i35911# - accessors for <mbClearedEnvironment>
+ // accessors for <mbClearedEnvironment>
bool ClearedEnvironment() const;
void SetClearedEnvironment( const bool _bClearedEnvironment );
- // <--
- // --> OD 2005-03-03 #i43913# - reset booleans for layout process
+
+ // reset booleans for layout process
inline void ResetLayoutProcessBools()
{
mbPositioningInProgress = false;
@@ -502,20 +448,16 @@ class SW_DLLPUBLIC SwAnchoredObject
mbClearedEnvironment = false;
mbTmpConsiderWrapInfluence = false;
}
- // <--
/** method to determine, if due to anchored object size and wrapping
style, its layout environment is cleared.
- OD 2004-10-22 #i35911#
-
@author OD
*/
bool HasClearedEnvironment() const;
/** method to update anchored object in the <SwSortedObjs> lists
- OD 2004-07-01 #i28701#
Method is not proposed to be called during a layout process is
running. It has been used on the change of the anchored object
attributes, which belongs the sort criteria of <SwSortedObjs>.
@@ -530,7 +472,6 @@ class SW_DLLPUBLIC SwAnchoredObject
/** method to determine, if a format on the anchored object is possible
- OD 2004-07-23 #i28701#
A format isn't possible, if anchored object is in an invisible layer.
Note: method is virtual to refine the conditions for the sub-classes.
@@ -538,15 +479,13 @@ class SW_DLLPUBLIC SwAnchoredObject
*/
virtual bool IsFormatPossible() const;
- // --> OD 2004-08-25 #i3317# - accessors to member <mbTmpConsiderWrapInfluence>
+ // accessors to member <mbTmpConsiderWrapInfluence>
void SetTmpConsiderWrapInfluence( const bool _bTmpConsiderWrapInfluence );
bool IsTmpConsiderWrapInfluence() const;
- // <--
/** method to determine, if the anchored object is overlapping with a
previous column
- OD 2004-08-25 #i3317#
overlapping with a previous column means, that the object overlaps
with a column, which is a previous one of the column its anchor
frame is in.
@@ -559,7 +498,6 @@ class SW_DLLPUBLIC SwAnchoredObject
/** method to determine position of anchored object relative to
anchor frame
- OD 2005-01-06 #i30669#
Usage: Needed layout information for WW8 export
@author OD
@@ -571,10 +509,8 @@ class SW_DLLPUBLIC SwAnchoredObject
/** method to determine position of anchored object relative to
page frame
- OD 2005-01-06 #i30669#
Usage: Needed layout information for WW8 export
- OD 2005-01-27 #i33818# - add parameters <_bFollowTextFlow> and
- <_obRelToTableCell>
+
If <_bFollowTextFlow> is set and object is anchored inside table,
the position relative to the table cell is determined. Output
parameter <_obRelToTableCell> reflects this situation
@@ -597,7 +533,6 @@ class SW_DLLPUBLIC SwAnchoredObject
/** method to determine position of anchored object relative to
anchor character
- OD 2005-01-06 #i30669#
Usage: Needed layout information for WW8 export
@author OD
@@ -609,7 +544,6 @@ class SW_DLLPUBLIC SwAnchoredObject
/** method to determine position of anchored object relative to
top of line
- OD 2005-01-06 #i30669#
Usage: Needed layout information for WW8 export
@author OD
@@ -620,18 +554,16 @@ class SW_DLLPUBLIC SwAnchoredObject
};
// ============================================================================
-// OD 2004-04-13 #i26791#, #i28701#
// helper class for notify that positioning of an anchored object is in progress
// ============================================================================
class SwObjPositioningInProgress
{
private:
SwAnchoredObject* mpAnchoredObj;
- // --> OD 2005-08-09 #i52904# - introduce boolean indicating old state
+ // boolean indicating old state
// of anchored object regarding positioning in progress in order to
// consider nested usage of class <SwObjPositioningInProgress>
bool mbOldObjPositioningInProgress;
- // <--
public:
SwObjPositioningInProgress( SdrObject& _rSdrObj );
@@ -640,3 +572,5 @@ class SwObjPositioningInProgress
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index 03ef2af83cea..ebac43554a44 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,14 +31,10 @@
#include "swdllapi.h"
#include <fldbas.hxx>
#include <toxe.hxx>
-
-#define _SVSTDARR_LONGS
-#include <svl/svstdarr.hxx>
+#include <vector>
class SwAuthDataArr;
-/* -----------------21.09.99 13:32-------------------
- --------------------------------------------------*/
class SwAuthEntry
{
String aAuthFields[AUTH_FIELD_END];
@@ -55,9 +52,7 @@ public:
void RemoveRef() { --nRefCount; }
sal_uInt16 GetRefCount() { return nRefCount; }
};
-/* -----------------20.10.99 16:49-------------------
- --------------------------------------------------*/
struct SwTOXSortKey
{
ToxAuthorityField eField;
@@ -67,9 +62,6 @@ struct SwTOXSortKey
bSortAscending(sal_True){}
};
-/* -----------------14.09.99 16:15-------------------
-
- --------------------------------------------------*/
class SwAuthorityField;
class SortKeyArr;
@@ -77,7 +69,7 @@ class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType
{
SwDoc* m_pDoc;
SwAuthDataArr* m_pDataArr;
- SvLongs* m_pSequArr;
+ std::vector<long> m_SequArr;
SortKeyArr* m_pSortKeyArr;
sal_Unicode m_cPrefix;
sal_Unicode m_cSuffix;
@@ -97,8 +89,8 @@ public:
virtual SwFieldType* Copy() const;
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; }
SwDoc* GetDoc(){ return m_pDoc; }
@@ -107,7 +99,7 @@ public:
sal_Bool AddField(long nHandle);
void DelSequenceArray()
{
- m_pSequArr->Remove(0, m_pSequArr->Count());
+ m_SequArr.clear();
}
const SwAuthEntry* GetEntryByHandle(long nHandle) const;
@@ -159,9 +151,7 @@ public:
void SetSortAlgorithm(const String& rSet) {m_sSortAlgorithm = rSet;}
};
-/* -----------------14.09.99 16:15-------------------
- --------------------------------------------------*/
class SwAuthorityField : public SwField
{
long m_nHandle;
@@ -180,8 +170,8 @@ public:
virtual void SetPar1(const String& rStr);
virtual SwFieldType* ChgTyp( SwFieldType* );
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
long GetHandle() const { return m_nHandle; }
@@ -203,3 +193,4 @@ inline void SwAuthEntry::SetAuthorField(ToxAuthorityField ePos, const String& rF
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/authratr.hxx b/sw/inc/authratr.hxx
index 06ffbe633ac2..b4a3e0dde9b4 100644
--- a/sw/inc/authratr.hxx
+++ b/sw/inc/authratr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx
index 731dddd2e3fe..236cc46fc1d0 100644
--- a/sw/inc/bparr.hxx
+++ b/sw/inc/bparr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,41 +54,40 @@ typedef BigPtrEntry* ElementPtr;
typedef sal_Bool (*FnForEach)( const ElementPtr&, void* pArgs );
-// 1000 Eintr„ge pro Block = etwas weniger als 4K
+// 1000 entries per Block = a bit less then 4K
#define MAXENTRY 1000
-// Anzahl Eintraege, die bei der Kompression frei bleiben duerfen
-// dieser Wert ist fuer den Worst Case, da wir MAXBLOCK mit ca 25%
-// Overhead definiert haben, reichen 80% = 800 Eintraege vollkommen aus
-// Will mann voellige Kompression haben, muss eben 100 angegeben werden.
-
+// number of entries that may remain free during compression
+// this value is for the worst case; because we defined MAXBLOCK with ca 25%
+// overhead, 80% = 800 entries are enough
+// if complete compression is desired, 100 has to be specified
#define COMPRESSLVL 80
-struct BlockInfo { // Block-Info:
- BigPtrArray* pBigArr; // in diesem Array steht der Block
- ElementPtr* pData; // Datenblock
- sal_uLong nStart, nEnd; // Start- und EndIndex
- sal_uInt16 nElem; // Anzahl Elemente
+struct BlockInfo { // block info:
+ BigPtrArray* pBigArr; // in this array the block is located
+ ElementPtr* pData; // data block
+ sal_uLong nStart, nEnd; // start- and end index
+ sal_uInt16 nElem; // number of elements
};
class SW_DLLPUBLIC BigPtrArray
{
- BlockInfo** ppInf; // Block-Infos
- sal_uLong nSize; // Anzahl Elemente
- sal_uInt16 nMaxBlock; // akt. max Anzahl Bloecke
- sal_uInt16 nBlock; // Anzahl Bloecke
- sal_uInt16 nCur; // letzter Block
+ BlockInfo** ppInf; // block info
+ sal_uLong nSize; // number of elements
+ sal_uInt16 nMaxBlock; // current max. number of blocks
+ sal_uInt16 nBlock; // number of blocks
+ sal_uInt16 nCur; // last block
- sal_uInt16 Index2Block( sal_uLong ) const; // Blocksuche
- BlockInfo* InsBlock( sal_uInt16 ); // Block einfuegen
- void BlockDel( sal_uInt16 ); // es wurden Bloecke geloescht
- void UpdIndex( sal_uInt16 ); // Indexe neu berechnen
+ sal_uInt16 Index2Block( sal_uLong ) const; // block search
+ BlockInfo* InsBlock( sal_uInt16 ); // insert block
+ void BlockDel( sal_uInt16 ); // some blocks were deleted
+ void UpdIndex( sal_uInt16 ); // recalculate indices
protected:
- // fuelle alle Bloecke auf.
- // Der short gibt in Prozent an, wie voll die Bloecke werden sollen.
- // Der ReturnWert besagt, das irgendetwas "getan" wurde
+ // fill all blocks
+ // the short parameter specifies in percent, how full the blocks should be
+ // made
sal_uInt16 Compress( short = COMPRESSLVL );
public:
@@ -113,7 +113,7 @@ public:
inline sal_uLong BigPtrEntry::GetPos() const
{
- DBG_ASSERT( this == pBlock->pData[ nOffset ], "Element nicht im Block" );
+ DBG_ASSERT( this == pBlock->pData[ nOffset ], "element not in the block" );
return pBlock->nStart + nOffset;
}
@@ -124,3 +124,5 @@ inline BigPtrArray& BigPtrEntry::GetArray() const
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx
index 9427b4d26c6e..ae05468aa16b 100644
--- a/sw/inc/breakit.hxx
+++ b/sw/inc/breakit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -120,3 +121,4 @@ SW_DLLPUBLIC extern SwBreakIt* pBreakIt;
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 407688df2a5f..e778e0366007 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,23 +27,19 @@
************************************************************************/
/*************************************************************
-#* Service-Klassen
+#* service classes
*************************************************************/
/*
-#* Aendert sich ein Attribut in einem Format, so muss diese
-#* Aenderung an alle abhaengigen Formate und ueber sie an
-#* alle betroffenen Nodes propagiert werden. Dabei muss
-#* festgestellt werden, ob die Aenderung einen Effekt haben
-#* kann, oder ob das geaenderte Attribut von dem abhaengigen
-#* Format ueberdefiniert wird (so dass ohnehin der
-#* Attributwert des abhaengigen Formates den geaenderten
-#* Wert verdeckt). Weiterhin kann der betroffene Node
-#* feststellen, ob er von dem geaenderten Attribut Gebrauch
-#* macht (Beispiel: Linienabstand fuer Unterstreichung wurde
-#* geaendert, das Attribut Unterstreichung wurde aber nicht
-#* verwendet). So wird bei Aenderungen der minimale Aufwand
-#* zum Reformatieren erkannt.
+ * When an attribute in a format is changed, this change has to be propagated
+ * to all dependent formats and over them to all concerned nodes.
+ * In doing so it has to be decided whether the change can have an effect or
+ * whether the dependent format redefines the changed attribute (such that the
+ * attribute value of the dependent format occludes the changed value).
+ * Furthermore, the concerned node can decide whether it makes use of the
+ * changed attribute (for example: line distance for underlining was changed,
+ * but the underlining attribute was not used). This way, the minimal effort
+ * for reformatting is identified.
*/
#ifndef _CALBCK_HXX
#define _CALBCK_HXX
@@ -64,15 +61,17 @@ class SW_DLLPUBLIC SwClient
friend class SwModify;
friend class SwClientIter;
- SwClient *pLeft, *pRight; // fuer die AVL-Sortierung
- sal_Bool bModifyLocked : 1; // wird in SwModify::Modify benutzt,
- // eigentlich ein Member des SwModify
- // aber aus Platzgruenden hier.
- sal_Bool bInModify : 1; // ist in einem Modify. (Debug!!!)
- sal_Bool bInDocDTOR : 1; // Doc wird zerstoert, nicht "abmelden"
- sal_Bool bInCache : 1; // Ist im BorderAttrCache des Layout,
- // Traegt sich dann im Modify aus!
- sal_Bool bInSwFntCache : 1; // Ist im SwFont-Cache der Formatierung
+ SwClient *pLeft, *pRight; // for AVL sorting
+ sal_Bool bModifyLocked : 1; // used in SwModify::Modify,
+ // is really a member of SwModify
+ // but here for lack of space
+
+ sal_Bool bInModify : 1; // is in a modify. (Debug!!!)
+ sal_Bool bInDocDTOR : 1; // Doc gets destroyed,
+ // do not "unsubscribe"
+ sal_Bool bInCache : 1; // is in BorderAttrCache of the layout,
+ // unsubscribes itself then in Modify!
+ sal_Bool bInSwFntCache : 1; // is in SwFont cache of the formatting
protected:
SwModify *pRegisteredIn;
@@ -87,9 +86,8 @@ public:
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
const SwModify* GetRegisteredIn() const { return pRegisteredIn; }
- //rtti, abgeleitete moegens gleichtun oder nicht. Wenn sie es gleichtun
- //kann ueber die Abhaengigkeitsliste eines Modify typsicher gecastet
- //werden.
+ //rtti, derived classes may do likewise or not. When they do, it can be
+ //casted typesafely via the dependency list of a Modify
TYPEINFO();
void LockModify() { bModifyLocked = sal_True; }
@@ -101,7 +99,7 @@ public:
sal_Bool IsInCache() const { return bInCache; }
sal_Bool IsInSwFntCache() const { return bInSwFntCache; }
- // erfrage vom Client Informationen
+ // get client Information
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
private:
@@ -118,7 +116,7 @@ inline SwClient::SwClient() :
// SwModify
// ----------
-// Klasse hat eine doppelt Verkette Liste fuer die Abhaengigen.
+// class has a doubly linked list for dependencies
class SW_DLLPUBLIC SwModify: public SwClient
{
@@ -143,7 +141,7 @@ public:
const SwClient* GetDepends() const { return pRoot; }
- // erfrage vom Client Informationen
+ // get client information
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
void SetInDocDTOR() { bInDocDTOR = sal_True; }
@@ -169,9 +167,9 @@ protected:
// ----------
/*
- * Sehr sinnvolle Klasse, wenn ein Objekt von mehreren Objekten
- * abhaengig ist. Diese sollte fuer jede Abhaengigkeit ein Objekt
- * der Klasse SwDepend als Member haben.
+ * Very useful class when an object depends on multiple objects.
+ * This should have an object of the class SwDepend as member for each
+ * dependency.
*/
class SW_DLLPUBLIC SwDepend: public SwClient
{
@@ -184,7 +182,7 @@ public:
SwClient* GetToTell() { return pToTell; }
virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
- // erfrage vom Client Informationen
+ // get Client information
virtual sal_Bool GetInfo( SfxPoolItem & ) const;
private:
@@ -196,18 +194,18 @@ private:
class SwClientIter
{
- friend SwClient* SwModify::_Remove(SwClient *); // fuer Ptr-Korrektur
- friend void SwModify::Add(SwClient *); // nur fuer ASSERT !
+ friend SwClient* SwModify::_Remove(SwClient *); // for ptr correction
+ friend void SwModify::Add(SwClient *); // only for OSL_ENSURE !
SwModify const& rRoot;
SwClient *pAkt, *pDelNext;
- // fuers Updaten der aller Iteratoren beim Einfuegen/Loeschen von
- // Clients, wenn der Iterator gerade draufsteht.
+ // for updating of all iterators when inserting/deleting clients, while the
+ // iterator points on it
SwClientIter *pNxtIter;
SwClient* mpWatchClient; // if set, SwModify::_Remove checks if this client is removed
- TypeId aSrchId; // fuer First/Next - suche diesen Type
+ TypeId aSrchId; // for First/Next - look for this type
public:
SW_DLLPUBLIC SwClientIter( SwModify const& );
@@ -215,17 +213,15 @@ public:
const SwModify& GetModify() const { return rRoot; }
-#ifndef CFRONT
- SwClient* operator++(int); // zum Naechsten
- SwClient* operator--(int); // zum Vorherigen
-#endif
- SwClient* operator++(); // zum Naechsten
- SwClient* operator--(); // zum Vorherigen
+ SwClient* operator++(int);
+ SwClient* operator--(int);
+ SwClient* operator++();
+ SwClient* operator--();
- SwClient* GoStart(); // zum Anfang
- SwClient* GoEnd(); // zum Ende
+ SwClient* GoStart();
+ SwClient* GoEnd();
- inline SwClient* GoRoot(); // wieder ab Root (==Start) anfangen
+ inline SwClient* GoRoot(); // restart from root
SwClient* operator()() const
{ return pDelNext == pAkt ? pAkt : pDelNext; }
@@ -239,7 +235,7 @@ public:
void SetWatchClient( SwClient* pWatch ) { mpWatchClient = pWatch; }
};
-inline SwClient* SwClientIter::GoRoot() // wieder ab Root anfangen
+inline SwClient* SwClientIter::GoRoot()
{
pAkt = rRoot.pRoot;
return (pDelNext = pAkt);
@@ -248,3 +244,5 @@ inline SwClient* SwClientIter::GoRoot() // wieder ab Root anfangen
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 996f6edb2b2a..69ab36a84e38 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,7 @@ class LocaleDataWrapper;
class SwFieldType;
class SwDoc;
-#define TBLSZ 47 // sollte Primzahl sein, wegen HashTable
+#define TBLSZ 47 // should be a prime, because of hash table
const sal_Unicode cListDelim = '|';
@@ -69,36 +70,36 @@ enum SwCalcOper
//-- Calculate Operations Strings -----------------------------------------
-extern const sal_Char __FAR_DATA sCalc_Add[];
-extern const sal_Char __FAR_DATA sCalc_Sub[];
-extern const sal_Char __FAR_DATA sCalc_Mul[];
-extern const sal_Char __FAR_DATA sCalc_Div[];
-extern const sal_Char __FAR_DATA sCalc_Phd[];
-extern const sal_Char __FAR_DATA sCalc_Sqrt[];
-extern const sal_Char __FAR_DATA sCalc_Pow[];
-extern const sal_Char __FAR_DATA sCalc_Or[];
-extern const sal_Char __FAR_DATA sCalc_Xor[];
-extern const sal_Char __FAR_DATA sCalc_And[];
-extern const sal_Char __FAR_DATA sCalc_Not[];
-extern const sal_Char __FAR_DATA sCalc_Eq[];
-extern const sal_Char __FAR_DATA sCalc_Neq[];
-extern const sal_Char __FAR_DATA sCalc_Leq[];
-extern const sal_Char __FAR_DATA sCalc_Geq[];
-extern const sal_Char __FAR_DATA sCalc_L[];
-extern const sal_Char __FAR_DATA sCalc_G[];
-extern const sal_Char __FAR_DATA sCalc_Sum[];
-extern const sal_Char __FAR_DATA sCalc_Mean[];
-extern const sal_Char __FAR_DATA sCalc_Min[];
-extern const sal_Char __FAR_DATA sCalc_Max[];
-extern const sal_Char __FAR_DATA sCalc_Sin[];
-extern const sal_Char __FAR_DATA sCalc_Cos[];
-extern const sal_Char __FAR_DATA sCalc_Tan[];
-extern const sal_Char __FAR_DATA sCalc_Asin[];
-extern const sal_Char __FAR_DATA sCalc_Acos[];
-extern const sal_Char __FAR_DATA sCalc_Atan[];
-extern const sal_Char __FAR_DATA sCalc_Tdif[];
-extern const sal_Char __FAR_DATA sCalc_Round[];
-extern const sal_Char __FAR_DATA sCalc_Date[];
+extern const sal_Char sCalc_Add[];
+extern const sal_Char sCalc_Sub[];
+extern const sal_Char sCalc_Mul[];
+extern const sal_Char sCalc_Div[];
+extern const sal_Char sCalc_Phd[];
+extern const sal_Char sCalc_Sqrt[];
+extern const sal_Char sCalc_Pow[];
+extern const sal_Char sCalc_Or[];
+extern const sal_Char sCalc_Xor[];
+extern const sal_Char sCalc_And[];
+extern const sal_Char sCalc_Not[];
+extern const sal_Char sCalc_Eq[];
+extern const sal_Char sCalc_Neq[];
+extern const sal_Char sCalc_Leq[];
+extern const sal_Char sCalc_Geq[];
+extern const sal_Char sCalc_L[];
+extern const sal_Char sCalc_G[];
+extern const sal_Char sCalc_Sum[];
+extern const sal_Char sCalc_Mean[];
+extern const sal_Char sCalc_Min[];
+extern const sal_Char sCalc_Max[];
+extern const sal_Char sCalc_Sin[];
+extern const sal_Char sCalc_Cos[];
+extern const sal_Char sCalc_Tan[];
+extern const sal_Char sCalc_Asin[];
+extern const sal_Char sCalc_Acos[];
+extern const sal_Char sCalc_Atan[];
+extern const sal_Char sCalc_Tdif[];
+extern const sal_Char sCalc_Round[];
+extern const sal_Char sCalc_Date[];
/******************************************************************************
* Calculate ErrorCodes
@@ -106,22 +107,20 @@ extern const sal_Char __FAR_DATA sCalc_Date[];
enum SwCalcError
{
CALC_NOERR=0,
- CALC_SYNTAX, // Syntax Fehler
- CALC_ZERODIV, // Division durch Null
- CALC_BRACK, // Fehlerhafte Klammerung
- CALC_POWERR, // Ueberlauf in Quadratfunktion
- CALC_VARNFND, // Variable wurde nicht gefunden
- CALC_OVERFLOW, // Ueberlauf
- CALC_WRONGTIME // falsches Zeitformat
+ CALC_SYNTAX, // syntax error
+ CALC_ZERODIV, // division by zero
+ CALC_BRACK, // faulty brackets
+ CALC_POWERR, // overflow in power function
+ CALC_VARNFND, // variable was not found
+ CALC_OVERFLOW, // overflow
+ CALC_WRONGTIME // wrong time format
};
class SwSbxValue : public SbxValue
{
bool bVoid;
public:
- //JP 03.02.99: immer auf eine Zahl defaulten, damit auch gerechnet wird.
- // Ansonsten wird daraus ein SbxEMPTY und damit ist nichts
- // anzufangen.
+ // always default to a number. otherwise it will become a SbxEMPTY
SwSbxValue( long n = 0 ) : bVoid(false) { PutLong( n ); }
SwSbxValue( const double& rD ) : bVoid(false) { PutDouble( rD ); }
SwSbxValue( const SwSbxValue& rVal ) :
@@ -132,9 +131,7 @@ public:
virtual ~SwSbxValue();
- // Strings sonderbehandeln
sal_Bool GetBool() const;
- // Strings sonderbehandeln BOOLs sonderbehandeln
double GetDouble() const;
SwSbxValue& MakeDouble();
@@ -143,7 +140,7 @@ public:
};
/******************************************************************************
- * Calculate HashTables fuer VarTable und Operations
+ * Calculate HashTables for VarTable und Operations
******************************************************************************/
struct SwHash
{
@@ -167,7 +164,7 @@ SwHash* Find( const String& rSrch, SwHash** ppTable,
void DeleteHashTable( SwHash** ppTable, sal_uInt16 nTblSize );
-// falls _CalcOp != 0, dann ist das ein gueltiger Operator
+// if _CalcOp != 0, this is a valid operator
struct _CalcOp;
_CalcOp* FindOperator( const String& rSearch );
@@ -241,3 +238,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx
index 8e99f943360f..35ea265e13d1 100644
--- a/sw/inc/ccoll.hxx
+++ b/sw/inc/ccoll.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,18 +32,12 @@
#include <tools/string.hxx>
#include <sfx2/tabdlg.hxx>
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <svtools/svtabbx.hxx>
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
#include <tools/resary.hxx>
#include "swdllapi.h"
#include "cmdid.h"
@@ -52,7 +47,6 @@
//***********************************************************
struct CollName {
-// const char* pStr;
sal_uLong nCnd;
sal_uLong nSubCond;
};
@@ -98,3 +92,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx
index 30f5f3bdc925..e081375a5495 100644
--- a/sw/inc/cellatr.hxx
+++ b/sw/inc/cellatr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,12 +37,12 @@
class SW_DLLPUBLIC SwTblBoxNumFormat : public SfxUInt32Item
{
- sal_Bool bAuto; // automatisch vergebenes Flag
+ sal_Bool bAuto; // automatically given flag
public:
SwTblBoxNumFormat( sal_uInt32 nFormat = NUMBERFORMAT_TEXT,
sal_Bool bAuto = sal_False );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
@@ -58,21 +59,19 @@ public:
class SwTblBoxFormula : public SfxPoolItem, public SwTableFormula
{
- SwModify* pDefinedIn; // Modify-Object, in dem die Formel steht
- // kann nur TablenBoxFormat sein
+ SwModify* pDefinedIn; // Modify object where the formula is located
+ // can only be TableBoxFormat
public:
SwTblBoxFormula( const String& rFormula );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- // erfrage und setze den Modify-Pointer
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
inline void ChgDefinedIn( const SwModify* pNew )
{ pDefinedIn = (SwModify*)pNew; }
- // suche den Node, in dem die Formel steht:
// BoxAttribut -> BoxStartNode
virtual const SwNode* GetNodeOfFormula() const;
@@ -80,9 +79,7 @@ public:
const SwTableBox* GetTableBox() const
{ return ((SwTblBoxFormula*)this)->GetTableBox(); }
- // Status aendern
void ChangeState( const SfxPoolItem* pItem );
- // berechne die Formel
void Calc( SwTblCalcPara& rCalcPara, double& rValue );
};
@@ -93,7 +90,7 @@ public:
SwTblBoxValue();
SwTblBoxValue( const double aVal );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
@@ -127,3 +124,5 @@ inline const SwTblBoxValue &SwFmt::GetTblBoxValue(sal_Bool bInP) const
{ return aSet.GetTblBoxValue(bInP); }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx
index 169058938f56..3a8566f14ecc 100644
--- a/sw/inc/cellfml.hxx
+++ b/sw/inc/cellfml.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,9 +47,9 @@ class SwTblCalcPara
sal_uInt16 nStackCnt, nMaxSize;
public:
- SwTableSortBoxes *pBoxStk; // Stack fuers erkennen von Rekursionen !
- SwCalc& rCalc; // akt. Calculator
- const SwTable* pTbl; // akt. Tabelle
+ SwTableSortBoxes *pBoxStk; // stack for recognizing recursion
+ SwCalc& rCalc; // current Calculator
+ const SwTable* pTbl; // current table
SwTblCalcPara( SwCalc& rCalculator, const SwTable& rTable );
~SwTblCalcPara();
@@ -96,14 +97,14 @@ typedef void (SwTableFormula:: *FnScanFormel)( const SwTable&, String&,
protected:
enum NameType { EXTRNL_NAME, INTRNL_NAME, REL_NAME };
- String sFormel; // akt. Formel
- NameType eNmType; // akt. Darstellungs Art
- sal_Bool bValidValue; // sal_True: Formel neu berechnen
+ String sFormel; // current formula
+ NameType eNmType; // current display method
+ sal_Bool bValidValue; // sal_True: recalculate formula
- // suche den Node, in dem die Formel steht:
+ // find the node in which the formula is located
// TextFeld -> TextNode,
// BoxAttribut -> BoxStartNode
- // !!! MUSS VON JEDER ABLEITUNG UEBERLADEN WERDEN !!!
+ // !!! has to be overloaded by every derivation !!!
virtual const SwNode* GetNodeOfFormula() const = 0;
SwTableFormula( const String& rFormel );
@@ -128,37 +129,36 @@ public:
return *this;
}
- // erzeuge aus der internen (fuer CORE) die externe (fuer UI) Formel
+ // create from the internal formula (for CORE) the external formula (for UI)
void PtrToBoxNm( const SwTable* pTbl );
- // erzeuge aus der externen (fuer UI) die interne (fuer CORE) Formel
+ // create from the external formula the internal
void BoxNmToPtr( const SwTable* pTbl );
- // erzeuge aus der externen/internen Formel die relative Formel
+ // create from the external/internal formula the relative formula
void ToRelBoxNm( const SwTable* pTbl );
- // wird vorm/nach dem mergen/splitten von Tabellen rerufen
+ // gets called before/after merging/splitting of tables
void ToSplitMergeBoxNm( SwTableFmlUpdate& rTblUpd );
- // ist gerade eine intern Darstellung aktiv
- sal_Bool IsIntrnlName() const { return eNmType == INTRNL_NAME; }
- // erfrage die akt. Darstellung der Formel
+ bool IsIntrnlName() const { return eNmType == INTRNL_NAME; }
NameType GetNameType() const { return eNmType; }
- // erfrage/setze das Flag, ob der akt. Wert gueltig ist
- sal_Bool IsValid() const { return bValidValue; }
- inline void ChgValid( sal_Bool bNew ) { bValidValue = bNew; }
+ bool IsValid() const { return bValidValue; }
+ inline void ChgValid( bool bNew ) { bValidValue = bNew; }
const String& GetFormula() const { return sFormel; }
void SetFormula( const String& rNew )
{
sFormel = rNew;
- bValidValue = sal_False;
+ bValidValue = false;
eNmType = EXTRNL_NAME;
}
sal_uInt16 GetBoxesOfFormula( const SwTable& rTbl, SwSelBoxes& rBoxes );
- // sind alle Boxen gueltig, auf die sich die Formel bezieht?
- sal_Bool HasValidBoxes() const;
+ // are all boxes valid which this formula relies on?
+ bool HasValidBoxes() const;
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/charatr.hxx b/sw/inc/charatr.hxx
index ba0040797a74..ed45ed922c46 100644
--- a/sw/inc/charatr.hxx
+++ b/sw/inc/charatr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,13 +29,10 @@
#define _CHARATR_HXX
#include <format.hxx>
-#include <hintids.hxx> // fuer die WhichIds
+#include <hintids.hxx>
-/******************************************************************************
- * Implementierung der Charakter-Attribut Methoden vom SwAttrSet
- * AMA 12.10.94: Umstellung auf SvxItems.
- ******************************************************************************/
+// implementation of the character attribute methods of SwAttrSet
inline const SvxPostureItem &SwAttrSet::GetPosture(sal_Bool bInP) const
{ return (const SvxPostureItem&)Get( RES_CHRATR_POSTURE,bInP); }
@@ -111,10 +109,7 @@ inline const SvxCharReliefItem &SwAttrSet::GetCharRelief( sal_Bool bInP ) const
inline const SvxCharHiddenItem &SwAttrSet::GetCharHidden( sal_Bool bInP ) const
{ return (const SvxCharHiddenItem&)Get( RES_CHRATR_HIDDEN, bInP ); }
-/******************************************************************************
- * Implementierung der Charakter-Attribut Methoden vom SwFmt
- * AMA: 12.10.94: Umstellung auf SvxItems.
- ******************************************************************************/
+// implementation of the character attribute methods of SwFmt
inline const SvxPostureItem &SwFmt::GetPosture(sal_Bool bInP) const
{ return aSet.GetPosture(bInP); }
@@ -176,3 +171,5 @@ inline const SvxCharHiddenItem &SwFmt::GetCharHidden( sal_Bool bInP ) const
{ return aSet.GetCharHidden(bInP); }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/charfmt.hxx b/sw/inc/charfmt.hxx
index 3b018fcff186..f40029d7290b 100644
--- a/sw/inc/charfmt.hxx
+++ b/sw/inc/charfmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include <format.hxx>
-class SwCharFmt : public SwFmt
+class SW_DLLPUBLIC SwCharFmt : public SwFmt
{
friend class SwDoc;
friend class SwTxtFmtColl;
@@ -45,7 +46,7 @@ class SwCharFmt : public SwFmt
public:
- TYPEINFO(); //Bereits in Basisklasse Client drin.
+ TYPEINFO(); // already in base class Client
};
namespace CharFmt
@@ -59,3 +60,4 @@ namespace CharFmt
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/chcmprse.hxx b/sw/inc/chcmprse.hxx
index 04a87435eadb..1a1d79b7e10b 100644
--- a/sw/inc/chcmprse.hxx
+++ b/sw/inc/chcmprse.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,4 @@ enum SwCharCompressType{ CHARCOMPRESS_NONE,
#endif
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/checkit.hxx b/sw/inc/checkit.hxx
index ed6293dcd787..1b3380a82156 100644
--- a/sw/inc/checkit.hxx
+++ b/sw/inc/checkit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <com/sun/star/uno/Reference.h>
-#ifndef _COM_SUN_STAR_I18N_XEXTENDEDINPUTSEQUENCECHECKER_HDL_
#include <com/sun/star/i18n/XExtendedInputSequenceChecker.hpp>
-#endif
/*************************************************************************
* class SwCheckIt
@@ -52,3 +51,4 @@ extern SwCheckIt* pCheckIt;
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx
index 195b76f163d1..cf45a3412569 100644
--- a/sw/inc/chpfld.hxx
+++ b/sw/inc/chpfld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,18 +39,14 @@ class SwTxtNode;
enum SwChapterFormat
{
CF_BEGIN,
- CF_NUMBER = CF_BEGIN, // nur die Kapitelnummer
- CF_TITLE, // nur die "Ueberschrift"
- CF_NUM_TITLE, // Kapitelnummer und "Ueberschrift"
- CF_NUMBER_NOPREPST, // nur die Kapitelnummer ohne Post/Prefix
- CF_NUM_NOPREPST_TITLE, // Kapitelnummer ohne Post/Prefix und "Ueberschrift"
+ CF_NUMBER = CF_BEGIN, // only the chapter number
+ CF_TITLE, // only the title
+ CF_NUM_TITLE, // number and title
+ CF_NUMBER_NOPREPST, // only chapter number without post-/prefix
+ CF_NUM_NOPREPST_TITLE, // chapter number without post-/prefix and title
CF_END
};
-/*--------------------------------------------------------------------
- Beschreibung: Kapitel
- --------------------------------------------------------------------*/
-
class SwChapterFieldType : public SwFieldType
{
public:
@@ -59,11 +56,6 @@ public:
};
-
-
-/*--------------------------------------------------------------------
- Beschreibung: Kapitelnummer
- --------------------------------------------------------------------*/
class SW_DLLPUBLIC SwChapterField : public SwField
{
friend class SwChapterFieldType;
@@ -76,14 +68,10 @@ class SW_DLLPUBLIC SwChapterField : public SwField
public:
SwChapterField(SwChapterFieldType*, sal_uInt32 nFmt = 0);
- // --> OD 2008-02-14 #i53420#
-// void ChangeExpansion( const SwFrm*,
-// const SwTxtNode*,
-// sal_Bool bSrchNum = sal_False);
+ // #i53420#
void ChangeExpansion( const SwFrm*,
const SwCntntNode*,
sal_Bool bSrchNum = sal_False);
- // <--
void ChangeExpansion(const SwTxtNode &rNd, sal_Bool bSrchNum);
inline sal_uInt8 GetLevel() const;
@@ -91,8 +79,8 @@ public:
inline const String& GetNumber() const;
inline const String& GetTitle() const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
inline sal_uInt8 SwChapterField::GetLevel() const { return nLevel; }
@@ -101,3 +89,5 @@ inline const String& SwChapterField::GetNumber() const { return sNumber; }
inline const String& SwChapterField::GetTitle() const { return sTitle; }
#endif // SW_CHPFLD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/chrdlg.hrc b/sw/inc/chrdlg.hrc
index 447229eb8965..9b94db2029ff 100644
--- a/sw/inc/chrdlg.hrc
+++ b/sw/inc/chrdlg.hrc
@@ -40,19 +40,18 @@
#define DLG_DRAWCHAR (RC_CHRDLG_BEGIN + 9)
#define DLG_DRAWPARA (RC_CHRDLG_BEGIN + 10)
-// Tabpages -> jetzt in globals.hrc
+// Tabpages -> now in globals.hrc
#define STR_TEXTCOLL_HEADER (RC_CHRDLG_BEGIN + 2)
#define STR_PAGEFMT_HEADER (RC_CHRDLG_BEGIN + 4)
#define SW_STR_NONE (RC_CHRDLG_BEGIN + 5)
-//#define STR_NUMFMT (RC_CHRDLG_BEGIN + 6)
#define MSG_ILLEGAL_PAGENUM (RC_CHRDLG_BEGIN + 1)
#define CHRDLG_ACT_END DLG_DRAWPARA
#if CHRDLG_ACT_END > RC_CHRDLG_END
-#error Resource-Id Ueberlauf in #file, #line
+#error Resource-Id overflow in #file, #line
#endif
#define DLG_SWDROPCAPS (RC_CHRDLG_BEGIN + 11)
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index c07652eed352..5c5ab9a71505 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,8 +27,8 @@
************************************************************************/
/******************************************************************************
-Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
- erlaubt, da es von swicli.c included wird!
+Attention : "In this file C++ style // comments are not allowed as it will be
+included in c-context files, so c++ style stuff will cause problems.
******************************************************************************/
#ifndef INCLUDED_SW_CMDID_H
@@ -39,12 +40,10 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#include <unomid.h>
#endif
-/* Flags die mittels des Disable-Features in den Slot-Definitionen ausgenutzt
- * werden */
+/* Flags that are being used in the slot definitions for the disable-features */
#define SW_DISABLE_ON_PROTECTED_CURSOR 0x00000001
#define SW_DISABLE_ON_MAILBOX_EDITOR 0x00000002
-
#define FN_FILE SID_SW_START
#define FN_EDIT (SID_SW_START + 100)
#define FN_VIEW (SID_SW_START + 200)
@@ -78,137 +77,126 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_UNO_RANGE_BEGIN FN_FORMAT2
#define FN_UNO_RANGE_END (FN_PARAM2 + 199)
-
#define HELP_OFFSET 1100
#define CMD_STR_OFFSET 2200
#define CMD_STR_OFFSET_MULTILANG 3300
#define CMDID_END 5500
/*--------------------------------------------------------------------
- Bereich: Datei
+ Region: File
--------------------------------------------------------------------*/
-#define FN_CLOSE_FILE (FN_FILE + 1 ) /* Schliessen */
-#define FN_LAUNCH_REGISTRY (FN_FILE + 2 ) /* Ablage */
+#define FN_CLOSE_FILE (FN_FILE + 1 ) /* Close */
+#define FN_LAUNCH_REGISTRY (FN_FILE + 2 ) /* Registry */
-
-#define FN_NEW_GLOBAL_DOC (FN_FILE + 4 ) /* Globaldokument erzeugen */
-#define FN_NEW_FILE (FN_FILE + 5 ) /* Neu */
-#define FN_NEW_FILE_DLG (FN_FILE + 6 ) /* Neu Dialog */
-#define FN_OPEN_FILE (FN_FILE + 7 ) /* Oeffnen */
-#define FN_EDIT_FILE (FN_FILE + 8 ) /* Oeffnen oder ToTop */
+#define FN_NEW_GLOBAL_DOC (FN_FILE + 4 ) /* Create Global Document */
+#define FN_NEW_FILE (FN_FILE + 5 ) /* New */
+#define FN_NEW_FILE_DLG (FN_FILE + 6 ) /* New dialog */
+#define FN_OPEN_FILE (FN_FILE + 7 ) /* Open */
+#define FN_EDIT_FILE (FN_FILE + 8 ) /* Open or ToTop */
#define FN_INETFILE (FN_FILE + 9 ) /* Internet File-Dialog */
-#define FN_PRINT_FILE (FN_FILE + 10) /* Drucken */
-#define FN_PRINT_FILE_OPTIONS (FN_FILE + 11) /* Drucken Optionen */
-#define FN_SAVE_FILE_AS (FN_FILE + 12) /* Speichern unter */
-#define FN_SAVE_FILE (FN_FILE + 13) /* Speichern */
-#define FN_SETUP_PRINTER (FN_FILE + 14) /* Druckereinstellung */
-#define FN_SETUP_PRINTER_DLG (FN_FILE + 15) /* Druckereinstellung */
-#define FN_SHOW_PREVIEW (FN_FILE + 16) /* Druckbild */
-#define FN_EXIT (FN_FILE + 17) /* Writer beenden */
-#define FN_PRINT_CFG_DLG (FN_FILE + 18) /* Optionen Drucken */
-
+#define FN_PRINT_FILE (FN_FILE + 10) /* Print */
+#define FN_PRINT_FILE_OPTIONS (FN_FILE + 11) /* Print file options */
+#define FN_SAVE_FILE_AS (FN_FILE + 12) /* Save as */
+#define FN_SAVE_FILE (FN_FILE + 13) /* Save */
+#define FN_SETUP_PRINTER (FN_FILE + 14) /* Printer setup */
+#define FN_SETUP_PRINTER_DLG (FN_FILE + 15) /* Printer setup dialog */
+#define FN_SHOW_PREVIEW (FN_FILE + 16) /* Print preview */
+#define FN_EXIT (FN_FILE + 17) /* Close Writer */
+#define FN_PRINT_CFG_DLG (FN_FILE + 18) /* Print configuration dialog */
+#define FN_SAVE_ALL (FN_FILE + 23) /* Save all files */
+#define FN_NEW_FILE_DEFAULT (FN_FILE + 24) /* New file with default template */
+#define FN_PRINT_FILE_DEFAULT (FN_FILE + 25) /* Print with default settings */
+#define FN_LAUNCH_EQ_EDITOR (FN_FILE + 26) /* Equation editor */
+#define FN_CHANGE_PRINTER (FN_FILE + 27) /* Select printer */
+#define FN_FAX_END (FN_FILE + 29) /* Ready to fax, Id for PostMessage */
-#define FN_SAVE_ALL (FN_FILE + 23) /* Alle Files speichern */
-#define FN_NEW_FILE_DEFAULT (FN_FILE + 24) /* Neue Datei mit Standardvorlage */
-#define FN_PRINT_FILE_DEFAULT (FN_FILE + 25) /* Drucken mit Defaults */
-#define FN_LAUNCH_EQ_EDITOR (FN_FILE + 26) /* Formel Editor */
-#define FN_CHANGE_PRINTER (FN_FILE + 27) /* Drucker einstellen */
-#define FN_FAX_END (FN_FILE + 29) /* Faxen fertig, Id fuer PostMessage */
+#define FN_SELECT_DATABASE (FN_FILE + 30) /* Database selection */
+#define FN_DOC_INFO_DLG (FN_FILE + 31) /* Document information dialog */
+#define FN_DOC_MGR_DLG (FN_FILE + 32) /* Document-Manager */
-#define FN_SELECT_DATABASE (FN_FILE + 30) /* Selektion Datenbank */
-#define FN_DOC_INFO_DLG (FN_FILE + 31) /* Dokumentinfo */
-#define FN_DOC_MGR_DLG (FN_FILE + 32) /* Dokument-Manager */
+#define FN_GET_DOCSTAT (FN_FILE + 33) /* Get document statistics */
-#define FN_GET_DOCSTAT (FN_FILE + 33) /* Dokumentstatistik einzeln auslesen */
+#define FN_SAVE_SELECTION (FN_FILE + 35) /* Save selection */
+#define FN_OUTLINE_TO_IMPRESS (FN_FILE + 36) /* Send outline to impress */
+#define FN_OUTLINE_TO_CLIPBOARD (FN_FILE + 37) /* Send outline to clipboard */
-#define FN_SAVE_SELECTION (FN_FILE + 35) /* Selektion speichern */
+#define FN_NEW_HTML_DOC (FN_FILE + 40 ) /* Create HTML document */
-#define FN_OUTLINE_TO_IMPRESS (FN_FILE + 36) /* Outline zu StarImpress senden */
-#define FN_OUTLINE_TO_CLIPBOARD (FN_FILE + 37) /* Outline in das Clipboad copieren */
-
-#define FN_NEW_HTML_DOC (FN_FILE + 40 ) /* HTML-Dokument "erzeugen" */
-
-#define FN_APP_START (FN_FILE + 98) /* fuer Makro bei App.Start */
-#define FN_APP_END (FN_FILE + 99) /* fuer Makro bei App.Ende */
+#define FN_APP_START (FN_FILE + 98) /* Macro for App.Start */
+#define FN_APP_END (FN_FILE + 99) /* Macro for App.End */
/*--------------------------------------------------------------------
- Bereich: Bearbeiten
+ Region: Edit
--------------------------------------------------------------------*/
-#define FN_CLEAR (FN_EDIT + 1 ) /* Loeschen */
-#define FN_COPY (FN_EDIT + 2 ) /* Kopieren */
-#define FN_CUT (FN_EDIT + 3 ) /* Ausschneiden */
-#define FN_EDIT_FIELD (FN_EDIT + 4 ) /* Textbefehl bearbeiten */
-#define FN_EDIT_FIELD_DLG (FN_EDIT + 5 ) /* Textbefehl bearbeiten */
-#define FN_EDIT_FILE_INFO (FN_EDIT + 6 ) /* Dokumentinfo */
-#define FN_EDIT_FILE_INFO_DLG (FN_EDIT + 7 ) /* Dokumentinfo Dialog */
-#define FN_EDIT_LINK (FN_EDIT + 8 ) /* Verknuepfungen */
-#define FN_EDIT_LINK_DLG (FN_EDIT + 9 ) /* Verknuepfungen */
-#define FN_GOTO (FN_EDIT + 11) /* Gehe zu */
-
-#define FN_PASTE (FN_EDIT + 13) /* Einfuegen */
-#define FN_PASTESPECIAL_DLG (FN_EDIT + 15) /* Verknuepfung einfuegen */
+#define FN_CLEAR (FN_EDIT + 1 ) /* Clear */
+#define FN_COPY (FN_EDIT + 2 ) /* Copy */
+#define FN_CUT (FN_EDIT + 3 ) /* Cut */
+#define FN_EDIT_FIELD (FN_EDIT + 4 ) /* Edit field */
+#define FN_EDIT_FIELD_DLG (FN_EDIT + 5 ) /* Edit field dialog */
+#define FN_EDIT_FILE_INFO (FN_EDIT + 6 ) /* Document information */
+#define FN_EDIT_FILE_INFO_DLG (FN_EDIT + 7 ) /* Document information Dialog */
+#define FN_EDIT_LINK (FN_EDIT + 8 ) /* Edit link */
+#define FN_EDIT_LINK_DLG (FN_EDIT + 9 ) /* Edit link dialog */
+#define FN_GOTO (FN_EDIT + 11) /* Go to */
+
+#define FN_PASTE (FN_EDIT + 13) /* Paste */
+#define FN_PASTESPECIAL_DLG (FN_EDIT + 15) /* Paste special dialog */
#define FN_NUMBER_BULLETS (FN_EDIT + 21) /* Bullets */
-#define FN_REPEAT (FN_EDIT + 22) /* Letzten Befehl wiederholen */
-#define FN_EDIT_IDX_ENTRY_DLG (FN_EDIT + 23) /* Index-Entry bearbeiten */
-#define FN_UPDATE_FIELDS (FN_EDIT + 26) /* Feldinhalte erneuern */
-#define FN_EXECUTE_MACROFIELD (FN_EDIT + 27) /* Macrofeld ausfuehren */
-#define FN_EDIT_FORMULA (FN_EDIT + 28) /* Formel in RibbonBar bearbeiten */
-#define FN_CALC_TABLE (FN_EDIT + 29) /* Tabelle durchrechnen */
+#define FN_REPEAT (FN_EDIT + 22) /* Repeat last */
+#define FN_EDIT_IDX_ENTRY_DLG (FN_EDIT + 23) /* Edit Index-Entry */
+#define FN_UPDATE_FIELDS (FN_EDIT + 26) /* Update fields */
+#define FN_EXECUTE_MACROFIELD (FN_EDIT + 27) /* Execute macrofield */
+#define FN_EDIT_FORMULA (FN_EDIT + 28) /* Edit formula in RibbonBar */
+#define FN_CALC_TABLE (FN_EDIT + 29)
/*--------------------------------------------------------------------
- Bereich: Bullets
+ Region: Bullets
--------------------------------------------------------------------*/
-#define FN_NUM_BULLET_DOWN (FN_EDIT + 30) /* Runterstufen */
-#define FN_NUM_BULLET_UP (FN_EDIT + 31) /* Raufstufen */
-#define FN_NUM_BULLET_PREV (FN_EDIT + 32) /* zum vorigen Eintrag */
-#define FN_NUM_BULLET_NEXT (FN_EDIT + 33) /* zum naechsten Eintrag */
-#define FN_NUM_BULLET_MOVEUP (FN_EDIT + 34) /* nach oben schieben */
-#define FN_NUM_BULLET_MOVEDOWN (FN_EDIT + 35) /* nach unten schieben */
-#define FN_NUM_BULLET_NONUM (FN_EDIT + 36) /* Eintrag ohne Nummer */
+#define FN_NUM_BULLET_DOWN (FN_EDIT + 30) /* Bullet down */
+#define FN_NUM_BULLET_UP (FN_EDIT + 31) /* Bullet up */
+#define FN_NUM_BULLET_PREV (FN_EDIT + 32) /* to previous bullet */
+#define FN_NUM_BULLET_NEXT (FN_EDIT + 33) /* to next bullet */
+#define FN_NUM_BULLET_MOVEUP (FN_EDIT + 34) /* move bullet up */
+#define FN_NUM_BULLET_MOVEDOWN (FN_EDIT + 35) /* move bullet down */
+#define FN_NUM_BULLET_NONUM (FN_EDIT + 36) /* bullet without number */
#ifndef FN_NUM_BULLET_OFF //in SVX already
-#define FN_NUM_BULLET_OFF (FN_EDIT + 37) /* Numerierung aus */
+#define FN_NUM_BULLET_OFF (FN_EDIT + 37) /* turn off numbering */
#endif
+#define FN_NUM_BULLET_OUTLINE_DOWN (FN_EDIT + 39) /* reduce in rank with sub points */
+#define FN_NUM_BULLET_OUTLINE_UP (FN_EDIT + 40) /* increase in rank with sub-items */
+#define FN_NUM_BULLET_OUTLINE_MOVEUP (FN_EDIT + 41) /* Push up with sub-items */
+#define FN_NUM_BULLET_OUTLINE_MOVEDOWN (FN_EDIT + 42) /* Push down with sub-items */
+#define FN_UPDATE_INPUTFIELDS (FN_EDIT + 43) /* Update input fields */
-// schon im SVX
-//#define FN_NUM_BULLET_ON (FN_EDIT + 38) /* Numerierung mit Bullets an */
-
-#define FN_NUM_BULLET_OUTLINE_DOWN (FN_EDIT + 39) /* Runterstufen mit Unterpunkten */
-#define FN_NUM_BULLET_OUTLINE_UP (FN_EDIT + 40) /* Raufstufen mit Unterpunkten */
-#define FN_NUM_BULLET_OUTLINE_MOVEUP (FN_EDIT + 41) /* nach oben schieben mit Unterpunkten */
-#define FN_NUM_BULLET_OUTLINE_MOVEDOWN (FN_EDIT + 42) /* nach unten schieben mit Unterpunkten */
-#define FN_UPDATE_INPUTFIELDS (FN_EDIT + 43) /* Eingabefelder updaten */
-// schon im SVX
-//#define FN_NUM_NUMBERING_ON (FN_EDIT + 44) /* Numerierung an */
-
-#define FN_NUM_OR_NONUM (FN_EDIT + 46) /* Nummer ein-/aus */
+#define FN_NUM_OR_NONUM (FN_EDIT + 46) /* Number on/off */
-#define FN_GOTO_NEXT_INPUTFLD (FN_EDIT + 47) /* zum naechsten EingabeFeld */
-#define FN_GOTO_PREV_INPUTFLD (FN_EDIT + 48) /* zum vorherigen EingabeFeld */
+#define FN_GOTO_NEXT_INPUTFLD (FN_EDIT + 47) /* go to next inputfield */
+#define FN_GOTO_PREV_INPUTFLD (FN_EDIT + 48) /* go to previous inputfield */
-#define FN_REPEAT_SEARCH (FN_EDIT + 50) /* Suche wiederholen */
-#define FN_REPEAT_REPLACE (FN_EDIT + 51) /* Ersetzen wiederholen */
-#define FN_UPDATE_GRAFIC (FN_EDIT + 53) /* Grafik aendern */
-#define FN_SETTAB_ATCURPOS (FN_EDIT + 54) /* Tab an der aktuellen Pos setzen */
-#define FN_SET_LR_IND_ATCURPOS (FN_EDIT + 55) /* EZE und LR setzen */
-#define FN_FRMCNT_TO_BODY (FN_EDIT + 56) /* Rahmeninhalt zu Text */
-#define FN_UPDATE_TOXBASE (FN_EDIT + 57) /* Naechstes Verzeichnis erneuern */
+#define FN_REPEAT_SEARCH (FN_EDIT + 50) /* Search again */
+#define FN_REPEAT_REPLACE (FN_EDIT + 51) /* Repeat replace */
+#define FN_UPDATE_GRAFIC (FN_EDIT + 53) /* Change graphic */
+#define FN_SETTAB_ATCURPOS (FN_EDIT + 54) /* Set Tab at the current position */
+#define FN_SET_LR_IND_ATCURPOS (FN_EDIT + 55) /* EZE and LR set */
+#define FN_FRMCNT_TO_BODY (FN_EDIT + 56) /* Frame content to text */
+#define FN_UPDATE_TOXBASE (FN_EDIT + 57) /* Next TOC list refresh */
-#define FN_REPAGINATE (FN_EDIT + 61) /* Neuformatierung erzwingen */
-#define FN_EDIT_FOOTNOTE (FN_EDIT + 62) /* Fussnote bearbeiten */
+#define FN_REPAGINATE (FN_EDIT + 61) /* Force repagination */
+#define FN_EDIT_FOOTNOTE (FN_EDIT + 62) /* Edit footnote */
-#define FN_EDIT_REGION (FN_EDIT + 65) /* Bereiche bearbeiten */
-#define FN_GOTO_REFERENCE (FN_EDIT + 66) /* Von der Refmark zur Referenz */
+#define FN_EDIT_REGION (FN_EDIT + 65) /* Edit region */
+#define FN_GOTO_REFERENCE (FN_EDIT + 66) /* From Refmark to the reference */
-// schon im Svx definiert
+// already defined in SVX
#define FN_NEXT_BOOKMARK (FN_EDIT + 68) /* */
#define FN_PREV_BOOKMARK (FN_EDIT + 69) /* */
-/*Navigator ToolBoxen*/
+/*Navigator ToolBoxes*/
#define FN_SELECT_BOOKMARK (FN_EDIT + 70) /**/
#define FN_ITEM_DOWN (FN_EDIT + 71) /**/
#define FN_ITEM_LEFT (FN_EDIT + 72) /**/
@@ -227,31 +215,22 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_SELECT_INDEX (FN_EDIT + 85) /**/
#define FN_UP (FN_EDIT + 86) /**/
+#define FN_SELECT_PARA (FN_EDIT + 97) /* select paragraph*/
-//#define FN_DELETE_REGION (FN_EDIT + 89) /* Bereiche loeschen */
+#define FN_SELECT_CONTENT (FN_EDIT + 99) /* Navigator - Content Type */
+#define FN_UPDATE_ALL_LINKS (FN_EDIT2 + 24) /* update all links */
-#define FN_SELECT_PARA (FN_EDIT + 97) /* Absatz selektieren */
-
-#define FN_SELECT_CONTENT (FN_EDIT + 99) /* Navigator - Inhaltstyp */
-
-
-
-
-//#define FN_REDLINE_PROTECT (FN_EDIT2 + 23) /* Redlining password */ ->moved to SVX
-#define FN_UPDATE_ALL_LINKS (FN_EDIT2 + 24) /* alle Links updaten */
-
-//#define FN_REDLINE_ON (FN_EDIT2 + 25) /* Redlining anschalten */ -> moved to SVX
-#define FN_REDLINE_SHOW (FN_EDIT2 + 26) /* Redlining anzeigen */
-#define FN_REDLINE_COMMENT (FN_EDIT2 + 27) /* Redlining kommentieren */
+#define FN_REDLINE_SHOW (FN_EDIT2 + 26) /* show Redlining */
+#define FN_REDLINE_COMMENT (FN_EDIT2 + 27) /* comment Redlining */
#define FN_UPDATE_ALL (FN_EDIT2 + 28) /* FN_UPDATE_ALL_LINKS,
FN_UPDATE_FIELDS,
FN_UPDATE_TOX,
CalcLayout */
-#define FN_REDLINE_ACCEPT (FN_EDIT2 + 29) /* Redlining annehmen/ablehnen */
-#define FN_ATTR_COLUMNS (FN_EDIT2 + 31) /* SlotId fuer SwFmtCol */
+#define FN_REDLINE_ACCEPT (FN_EDIT2 + 29) /* Redlining Accept/Reject */
+#define FN_ATTR_COLUMNS (FN_EDIT2 + 31) /* SlotId for SwFmtCol */
#define FN_EDIT_CURRENT_TOX (FN_EDIT2 + 32) /* edit current index */
#define FN_EDIT_AUTH_ENTRY_DLG (FN_EDIT2 + 33) /* edit authorities entry*/
#define FN_UPDATE_CHARTS (FN_EDIT2 + 34) /* update all charts */
@@ -264,155 +243,146 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_COPY_HYPERLINK_LOCATION (FN_EDIT2 + 40) /* copy hyperlink URL to clipboard */
/*--------------------------------------------------------------------
- Bereich: Bearbeiten
+ Region: Edit
--------------------------------------------------------------------*/
#define FN_REFRESH_VIEW (FN_VIEW + 1) /* Refresh/Redraw */
-#define FN_SHOW_OUTLINE_VIEW (FN_VIEW + 2) /* Gliederungsansicht */
+#define FN_SHOW_OUTLINE_VIEW (FN_VIEW + 2) /* Show outline */
#define FN_DRAW_WRAP_DLG (FN_VIEW + 3) /* Draw Umlauf-Dlg */
-#define FN_RULER (FN_VIEW + 11) /* Horizontales Lineal */
+#define FN_RULER (FN_VIEW + 11) /* Horizontal ruler */
-#define FN_VIEW_GRAPHIC (FN_VIEW + 13) /* Grafiken anzeigen */
-#define FN_VIEW_BOUNDS (FN_VIEW + 14) /* Begrenzungen */
-#define FN_VIEW_FIELDS (FN_VIEW + 15) /* Textbefehle */
-#define FN_VLINEAL (FN_VIEW + 16) /* Vertikales Lineal */
-#define FN_VSCROLLBAR (FN_VIEW + 17) /* Vertikaler Scrollbar */
-#define FN_HSCROLLBAR (FN_VIEW + 18) /* Horizontaler Scrollbar */
-#define FN_TOOLBOX_TOGGLE (FN_VIEW + 19) /* Toolboxinhalte umschalten */
-#define FN_VIEWOPTIONS_ON (FN_VIEW + 20) /* Gruppe Viewoptions an */
-#define FN_VIEWOPTIONS_OFF (FN_VIEW + 21) /* Gruppe Viewoptions aus */
-#define FN_CONTROLS_ON (FN_VIEW + 22) /* Gruppe Bedienelemte an */
-#define FN_CONTROLS_OFF (FN_VIEW + 23) /* Gruppe Bedienelemte aus */
+#define FN_VIEW_GRAPHIC (FN_VIEW + 13) /* View graphic */
+#define FN_VIEW_BOUNDS (FN_VIEW + 14) /* View bounds */
+#define FN_VIEW_FIELDS (FN_VIEW + 15) /* View fields */
+#define FN_VLINEAL (FN_VIEW + 16) /* Vertical Liner */
+#define FN_VSCROLLBAR (FN_VIEW + 17) /* Vertical Scrollbar */
+#define FN_HSCROLLBAR (FN_VIEW + 18) /* Horizontal Scrollbar */
+#define FN_TOOLBOX_TOGGLE (FN_VIEW + 19) /* Toggle toolbox */
+#define FN_VIEWOPTIONS_ON (FN_VIEW + 20) /* Viewoptions group on */
+#define FN_VIEWOPTIONS_OFF (FN_VIEW + 21) /* Viewoptions group off */
+#define FN_CONTROLS_ON (FN_VIEW + 22) /* Controls group on */
+#define FN_CONTROLS_OFF (FN_VIEW + 23) /* Controls group off */
-#define FN_VIEW_META_CHARS (FN_VIEW + 24) /* Sonderzeichen anzeigen */
-#define FN_VIEW_MARKS (FN_VIEW + 25) /* Markierungen anzeigen */
-#define FN_VIEW_FIELDNAME (FN_VIEW + 26) /* Feldname anzeigen */
-#define FN_VIEW_TABLEGRID (FN_VIEW + 27) /* Tabellenbegrenzungen anzeigen */
+#define FN_VIEW_META_CHARS (FN_VIEW + 24) /* View meta chars */
+#define FN_VIEW_MARKS (FN_VIEW + 25) /* View marks */
+#define FN_VIEW_FIELDNAME (FN_VIEW + 26) /* View field names */
+#define FN_VIEW_TABLEGRID (FN_VIEW + 27) /* View tablegrid */
-#define FN_SET_PAGE (FN_VIEW + 29) /* Seitenvorlage am Absatz setzen */
+#define FN_SET_PAGE (FN_VIEW + 29) /* Set page template to paragraph */
-#define FN_TOOLBOX_SWITCH (FN_VIEW + 30) /* Auf Textshell umschalten */
+#define FN_TOOLBOX_SWITCH (FN_VIEW + 30) /* Shell switch to text */
-
-//noch mehr Navigator
+// more Navigator
#define FN_CONTENT_LB (FN_VIEW + 32) /**/
#define FN_SHOW_CONTENT_BOX (FN_VIEW + 33) /**/
#define FN_SHOW_ROOT (FN_VIEW + 34) /**/
#define FN_DROP_REGION (FN_VIEW + 35) /**/
#define FN_OUTLINE_LEVEL (FN_VIEW + 36) /**/
-#define FN_PRINT_LAYOUT (FN_VIEW + 37) /* invertierter BrowseMode */
+#define FN_PRINT_LAYOUT (FN_VIEW + 37) /* print layout */
#define FN_DROP_REGION_LINK (FN_VIEW + 38) /**/
#define FN_DROP_REGION_COPY (FN_VIEW + 39) /**/
-#define FN_SCROLL_NAVIGATION (FN_VIEW + 40) /* Navigationscontroller am Scrollbar*/
-#define FN_SCROLL_NEXT_PREV (FN_VIEW + 41) /* arbeitet den MoveType ab */
+#define FN_SCROLL_NAVIGATION (FN_VIEW + 40) /* Navigation Controller in the scrollbar */
+#define FN_SCROLL_NEXT_PREV (FN_VIEW + 41) /* processes MoveType */
-#define FN_VIEW_HIDDEN_PARA (FN_VIEW + 42) /* Versteckte Absaetze */
+#define FN_VIEW_HIDDEN_PARA (FN_VIEW + 42) /* View hidden paragraphs */
#define FN_VIEW_SMOOTH_SCROLL (FN_VIEW + 43)
-#define FN_GLOBAL_SWITCH (FN_VIEW + 44) /* umschalten zw. Global und Inhalt*/
-#define FN_GLOBAL_EDIT (FN_VIEW + 45) /* bearbeiten */
-#define FN_GLOBAL_UPDATE (FN_VIEW + 46) /* aktualisieren */
-#define FN_GLOBAL_OPEN (FN_VIEW + 47) /* oeffnen */
-#define FN_GLOBAL_SAVE_CONTENT (FN_VIEW + 48) /* Inhalt der Verknuepfung mitspeichern */
-#define FN_CREATE_NAVIGATION (FN_VIEW + 49) /* Navigations-Controller erzeugen */
-#define FN_PREVIEW_ZOOM (FN_VIEW + 51) /* der Tabellencontroller fuer den Zoom */
+#define FN_GLOBAL_SWITCH (FN_VIEW + 44) /* Toggle between Global and Content */
+#define FN_GLOBAL_EDIT (FN_VIEW + 45) /* edit */
+#define FN_GLOBAL_UPDATE (FN_VIEW + 46) /* update */
+#define FN_GLOBAL_OPEN (FN_VIEW + 47) /* open */
+#define FN_GLOBAL_SAVE_CONTENT (FN_VIEW + 48) /* save content of link */
+#define FN_CREATE_NAVIGATION (FN_VIEW + 49) /* create Navigations-Controller */
+#define FN_PREVIEW_ZOOM (FN_VIEW + 51) /* create table controller for zoom */
-#define FN_SET_MODOPT_TBLNUMFMT (FN_VIEW + 52) /* Zahlenerkennung in Tabellen */
+#define FN_SET_MODOPT_TBLNUMFMT (FN_VIEW + 52) /* Number recognition in tables */
#define FN_HSCROLL_METRIC (FN_VIEW + 53) /* Metric horizontal scrollbar */
#define FN_VSCROLL_METRIC (FN_VIEW + 54) /* Metric vertical scrollbar */
#define FN_VIEW_NOTES (FN_VIEW + 55)
/*--------------------------------------------------------------------
- Bereich: Einfuegen
+ Region: Insert
--------------------------------------------------------------------*/
-// schon im Svx definiert
-#define FN_INSERT_BOOKMARK (FN_INSERT + 2 ) /* Sprungmarke einfuegen */
-// schon im SVX unter der gleichen Id
-//#define FN_INSERT_BREAK (FN_INSERT + 3 ) /* Umbruch */
+#define FN_INSERT_BOOKMARK (FN_INSERT + 2 ) /* Bookmark */
-#define FN_INSERT_BREAK_DLG (FN_INSERT + 4 ) /* Umbruch */
-#define FN_INSERT_COLUMN_BREAK (FN_INSERT + 5 ) /* Spaltenumbruch */
-#define FN_INSERT_DATE_TIME (FN_INSERT + 6 ) /* Datum/Uhrzeit */
+#define FN_INSERT_BREAK_DLG (FN_INSERT + 4 ) /* Break */
+#define FN_INSERT_COLUMN_BREAK (FN_INSERT + 5 ) /* Column break */
+#define FN_INSERT_DATE_TIME (FN_INSERT + 6 ) /* Date / Time */
#define FN_INSERT_FIELD (FN_INSERT + 8 ) /* Textbefehl */
-#define FN_CHANGE_DBFIELD (FN_INSERT + 9 ) /* Datenbankfeld aendern */
+#define FN_CHANGE_DBFIELD (FN_INSERT + 9 ) /* Change the database field */
-#define FN_INSERT_CAPTION (FN_INSERT + 10) /* Beschriftung */
-#define FN_INSERT_DBFIELD (FN_INSERT + 11) /* Insert database field - for recording */
-#define FN_INSERT_FOOTNOTE_DLG (FN_INSERT + 12) /* Dialog Fussnote */
+#define FN_INSERT_CAPTION (FN_INSERT + 10) /* Caption */
+#define FN_INSERT_DBFIELD (FN_INSERT + 11) /* Insert database field - for recording */
+#define FN_INSERT_FOOTNOTE_DLG (FN_INSERT + 12) /* Footnote Dialog */
-#define FN_INSERT_REF_FIELD (FN_INSERT + 13) /* Refernzfeld einfuegen */
+#define FN_INSERT_REF_FIELD (FN_INSERT + 13) /* Insert Reference Field */
-#define FN_INSERT_HYPERLINK (FN_INSERT + 14) /* Zeichendialog/HyperlinkPage*/
+#define FN_INSERT_HYPERLINK (FN_INSERT + 14) /* Character dialogue / hyperlink page */
-#define FN_INSERT_INDEX (FN_INSERT + 16) /* Stichworteintrag */
-#define FN_INSERT_INDEX_DLG (FN_INSERT + 17) /* Stichworteintrag */
-#define FN_INSERT_LINEBREAK (FN_INSERT + 18) /* Zeilenumbruch */
-#define FN_INSERT_FIELD_DATA_ONLY (FN_INSERT + 19) /* field dialog for mail merge*/
+#define FN_INSERT_INDEX (FN_INSERT + 16) /* Index entry */
+#define FN_INSERT_INDEX_DLG (FN_INSERT + 17) /* Index entry */
+#define FN_INSERT_LINEBREAK (FN_INSERT + 18) /* Newline */
+#define FN_INSERT_FIELD_DATA_ONLY (FN_INSERT + 19) /* Field dialog for mail merge*/
#define FN_INSERT_OBJECT (FN_INSERT + 21) /* Object */
#define FN_INSERT_OBJECT_DLG (FN_INSERT + 22) /* Object */
-#define FN_INSERT_PAGEBREAK (FN_INSERT + 23) /* Seitenumbruch */
-#define FN_INSERT_PAGENO (FN_INSERT + 24) /* Seitennummer */
-#define FN_INSERT_PARAGRAPH (FN_INSERT + 25) /* Absatz */
-#define FN_INSERT_RECORD (FN_INSERT + 26) /* Datensatz einfuegen */
-#define FN_MERGE_RECORD (FN_INSERT + 27) /* Datensatz mischen */
-#define FN_INSERT_SYMBOL (FN_INSERT + 28) /* Sonderzeichen */
-#define FN_POSTIT (FN_INSERT + 29) /* PostIt einfuegen/bearbeiten */
-#define FN_INSERT_TABLE (FN_INSERT + 30) /* Tabelle */
+#define FN_INSERT_PAGEBREAK (FN_INSERT + 23) /* Page break*/
+#define FN_INSERT_PAGENO (FN_INSERT + 24) /* Page Number */
+#define FN_INSERT_PARAGRAPH (FN_INSERT + 25) /* Paragraph */
+#define FN_INSERT_RECORD (FN_INSERT + 26) /* Insert record */
+#define FN_MERGE_RECORD (FN_INSERT + 27) /* Merge record */
+#define FN_INSERT_SYMBOL (FN_INSERT + 28) /* Special characters */
+#define FN_POSTIT (FN_INSERT + 29) /* Insert/edit PostIt */
+#define FN_INSERT_TABLE (FN_INSERT + 30) /* Insert Table */
#define FN_INSERT_STRING (FN_INSERT+31)
-#define FN_INSERT_COLS (FN_INSERT + 32) /* Spalten einfuegen */
-#define FN_INSERT_FRAME_INTERACT (FN_INSERT + 33) /* Rahmen einfuegen aktiv */
-#define FN_INSERT_FRAME (FN_INSERT + 34) /* Rahmen einfuegen */
+#define FN_INSERT_COLS (FN_INSERT + 32) /* Insert Columns */
+#define FN_INSERT_FRAME_INTERACT (FN_INSERT + 33) /* Insert interactive frame */
+#define FN_INSERT_FRAME (FN_INSERT + 34) /* Insert Frame */
-#define FN_INSERT_IDX_ENTRY_DLG (FN_INSERT + 35) /* Verzeichniseintrag einfuegen */
+#define FN_INSERT_IDX_ENTRY_DLG (FN_INSERT + 35) /* insert index entry */
#define FN_INSERT_FRAME_INTERACT_NOCOL (FN_INSERT + 36) /*insert interactive non column frame*/
-//#define FN_INSERT_SOFT_HYPHEN (FN_INSERT + 43) /* weicher Trenner */
-//#define FN_INSERT_HARD_SPACE (FN_INSERT + 44) /* hartes Space */
-
+#define FN_TOOL_GROUP (FN_INSERT + 47) /* Group objects */
+#define FN_TOOL_UNGROUP (FN_INSERT + 48) /* Remove Grouping */
-#define FN_TOOL_GROUP (FN_INSERT + 47) /* Objekte gruppieren */
-#define FN_TOOL_UNGROUP (FN_INSERT + 48) /* Gruppierng aufheben */
-
-#define FN_TOOL_ANKER (FN_INSERT + 49) /* Draw-Objekt umankern */
-#define FN_TOOL_ANKER_PAGE (FN_INSERT + 50) /* Draw-Objekt an Seite verankern */
-#define FN_TOOL_ANKER_PARAGRAPH (FN_INSERT + 51) /* Draw-Objekt am Absatz verankern */
-#define FN_TOOL_HIERARCHIE (FN_INSERT + 52) /* Hierarchie aendern */
+#define FN_TOOL_ANKER (FN_INSERT + 49) /* Draw Anchor for object */
+#define FN_TOOL_ANKER_PAGE (FN_INSERT + 50) /* anchor Draw object to page */
+#define FN_TOOL_ANKER_PARAGRAPH (FN_INSERT + 51) /* anchor Draw object to paragraph */
+#define FN_TOOL_HIERARCHIE (FN_INSERT + 52) /* change hierarchy */
#define FN_MAILMERGE_WIZARD (FN_INSERT + 64) /* mail merge wizard */
-#define FN_QRY_OPEN_TABLE (FN_INSERT + 65) /* Datenbank oeffnen (Basic) */
-#define FN_TOOL_ANKER_FRAME (FN_INSERT + 66) /* Draw-Objekt am Rahmen verankern */
-#define FN_QRY_MERGE (FN_INSERT + 67) /* Datensatz einfuegen (Serienbrief) */
+#define FN_QRY_OPEN_TABLE (FN_INSERT + 65) /* open database (Basic) */
+#define FN_TOOL_ANKER_FRAME (FN_INSERT + 66) /* anchor Draw-Object to frame*/
+#define FN_QRY_MERGE (FN_INSERT + 67) /* insert record (serial letter) */
#define FN_MAILMERGE_CHILDWINDOW (FN_INSERT + 68) /* back-to-mail-merge-wizard child window*/
-#define FN_INSERT_SMA (FN_INSERT + 69) /* Einfuegen StarMath */
+#define FN_INSERT_SMA (FN_INSERT + 69) /* insert StarMath */
-#define FN_QRY_GET_COLUMN_NAME (FN_INSERT + 70) /* Anzahl der Spalten (Basic) */
-#define FN_QRY_GET_COLUMN_TYPE (FN_INSERT + 71) /* Type des Datenbankfeldes ermitteln (Basic) */
-#define FN_QRY_GET_COLUMN_TEXT (FN_INSERT + 72) /* Inhalt des aktuellen Datensatzes (Basic) */
-#define FN_QRY_DEL_DEFINED_DB (FN_INSERT + 75) /* Datenbankdefinition loeschen (Basic) */
+#define FN_QRY_GET_COLUMN_NAME (FN_INSERT + 70) /* number of columns (Basic) */
+#define FN_QRY_GET_COLUMN_TYPE (FN_INSERT + 71) /* retrieve type of database field (Basic) */
+#define FN_QRY_GET_COLUMN_TEXT (FN_INSERT + 72) /* content of current record (Basic) */
+#define FN_QRY_DEL_DEFINED_DB (FN_INSERT + 75) /* delete database definition */
-#define FN_DRAWTEXT_ATTR_DLG (FN_INSERT + 76) /* DrawText positionieren */
+#define FN_DRAWTEXT_ATTR_DLG (FN_INSERT + 76) /* position DrawText */
-#define FN_QRY_APPEND_RECORD (FN_INSERT + 77) /* Neuen Datensatz anhaengen */
-#define FN_QRY_UPDATE_RECORD (FN_INSERT + 78) /* Datensatzspalte aendern */
-#define FN_QRY_DELETE_RECORD (FN_INSERT + 79) /* Datensatz loeschen */
-#define FN_QRY_GET_PHYS_RECORD_ID (FN_INSERT + 80) /* Physikalische (absolute) Datensatznummer erfragen (Basic) */
+#define FN_QRY_APPEND_RECORD (FN_INSERT + 77) /* append new record */
+#define FN_QRY_UPDATE_RECORD (FN_INSERT + 78) /* change record row */
+#define FN_QRY_DELETE_RECORD (FN_INSERT + 79) /* delete record */
+#define FN_QRY_GET_PHYS_RECORD_ID (FN_INSERT + 80) /* get physical (absolute) record number (Basic) */
-#define FN_TOOL_ANKER_CHAR (FN_INSERT + 84) /* DrawObject zeichengebunden */
-//#define FN_INSERT_HARDHYPHEN (FN_INSERT + 85) /* Bindestrich ohne Umbruch*/
+#define FN_TOOL_ANKER_CHAR (FN_INSERT + 84) /* anchor Draw object to charater */
-#define FN_QRY_INSERT (FN_INSERT + 86) /* Datensatz-Selektion in Text einfuegen */
-#define FN_QRY_MERGE_FIELD (FN_INSERT + 87) /* Datensatz-Selektion in Felder einfuegen */
-#define FN_QRY_INSERT_FIELD (FN_INSERT + 88) /* Datenbankfeld einfuegen */
+#define FN_QRY_INSERT (FN_INSERT + 86) /* insert record selection in to text */
+#define FN_QRY_MERGE_FIELD (FN_INSERT + 87) /* insert record selection into fields */
+#define FN_QRY_INSERT_FIELD (FN_INSERT + 88) /* insert database field */
-#define FN_INSERT_CTRL (FN_INSERT + 89) /* Werkzeugleistencontroller Einfuegen*/
-#define FN_INSERT_OBJ_CTRL (FN_INSERT + 90) /* Werkzeugleistencontroller Einfuegen/Objekt*/
-#define FN_INSERT_FIELD_CTRL (FN_INSERT + 91) /* Werkzeugleistencontroller Einfuegen/Feldbefehle*/
+#define FN_INSERT_CTRL (FN_INSERT + 89) /* toolbar controller insert*/
+#define FN_INSERT_OBJ_CTRL (FN_INSERT + 90) /* toolbar controller (insert/object) */
+#define FN_INSERT_FIELD_CTRL (FN_INSERT + 91) /* toolbar controller insert/field commands */
#define FN_INSERT_FLD_DATE (FN_INSERT + 92)
#define FN_INSERT_FLD_TIME (FN_INSERT + 93)
@@ -424,251 +394,243 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_INSERT_FOOTNOTE (FN_INSERT + 99)
/*--------------------------------------------------------------------
- Bereich: Einfuegen (2.Teil)
+ Region: Paste (Part 2)
--------------------------------------------------------------------*/
-#define FN_QRY_GET_ALL_DBNAME (FN_INSERT2 + 1) /* Alle konfigurierten Datenabanknamen ermitteln */
-#define FN_QRY_GET_DBNAME_COUNT (FN_INSERT2 + 2) /* Anzahl aller konfigurierten Datenabanknamen */
-#define FN_QRY_GET_TABLE_NAME (FN_INSERT2 + 3) /* Tabellenname einer Datenbank ermitteln */
-#define FN_QRY_GET_TABLE_COUNT (FN_INSERT2 + 4) /* Anzahl aller Tabellen einer Datenbank ermitteln */
+#define FN_QRY_GET_ALL_DBNAME (FN_INSERT2 + 1) /* retrieve all configured database names */
+#define FN_QRY_GET_DBNAME_COUNT (FN_INSERT2 + 2) /* retrieve number of all configured database names */
+#define FN_QRY_GET_TABLE_NAME (FN_INSERT2 + 3) /* retrieve table name of a database */
+#define FN_QRY_GET_TABLE_COUNT (FN_INSERT2 + 4) /* retrieve number of tables of a database */
#define FN_MAILMERGE_SENDMAIL_CHILDWINDOW (FN_INSERT2 + 5) /* child window provided by mailmerge */
+#define FN_SBA_BRW_UPDATE (FN_INSERT2 + 7) /* insert records into fields */
+#define FN_SBA_BRW_INSERT (FN_INSERT2 + 8) /* insert records into text */
+#define FN_SBA_BRW_MERGE (FN_INSERT2 + 9) /* serial letter print */
+#define FN_JAVAEDIT (FN_INSERT2 + 10) /* edit script field */
+#define FN_INSERT_HRULER (FN_INSERT2 + 11) /* insert horizontal ruler */
+#define FN_TOOL_ANKER_AT_CHAR (FN_INSERT2 + 12) /* anchor object to character*/
-#define FN_SBA_BRW_UPDATE (FN_INSERT2 + 7) /* Datensaetze in Felder einfuegen */
-#define FN_SBA_BRW_INSERT (FN_INSERT2 + 8) /* Datensaetze in Text einfuegen */
-#define FN_SBA_BRW_MERGE (FN_INSERT2 + 9) /* Serienbriefdruck */
-#define FN_JAVAEDIT (FN_INSERT2 + 10) /* Scriptfeld bearbeiten */
-#define FN_INSERT_HRULER (FN_INSERT2 + 11) /* horiz. Grafiklinie einfuegen */
-#define FN_TOOL_ANKER_AT_CHAR (FN_INSERT2 + 12) /* Object zeichengebunden */
-
-#define FN_INSERT_PAGEHEADER (FN_INSERT2 + 13) /* Standard Kopfzeile einfuegen */
-#define FN_INSERT_PAGEFOOTER (FN_INSERT2 + 14) /* Standard Fusszeile einfuegen */
+#define FN_INSERT_PAGEHEADER (FN_INSERT2 + 13) /* insert default header */
+#define FN_INSERT_PAGEFOOTER (FN_INSERT2 + 14) /* insert default footer */
-#define FN_INSERT_ENDNOTE (FN_INSERT2 + 18) /* Endnote einfuegen*/
+#define FN_INSERT_ENDNOTE (FN_INSERT2 + 18) /* insert endnote*/
#define FN_INSERT_REGION (FN_INSERT2 + 19) /* Insert section */
#define FN_INSERT_MULTI_TOX (FN_INSERT2 + 20) /* insert any TOX */
#define FN_INSERT_AUTH_ENTRY_DLG (FN_INSERT2 + 21) /* insert entry for table of authorities*/
/*--------------------------------------------------------------------
- Bereich: Format
+ Region: Format
--------------------------------------------------------------------*/
-#define FN_AUTOFORMAT_APPLY (FN_FORMAT + 1 ) /* Autoformat-Optionen anwenden */
-#define FN_AUTOFORMAT_AUTO (FN_FORMAT + 2 ) /* Autoformat waehrend der Eingabe */
-#define FN_GROW_FONT_SIZE (FN_FORMAT + 3 ) /* Groesse */
-#define FN_SHRINK_FONT_SIZE (FN_FORMAT + 4 ) /* Groesse */
-#define FN_UNDERLINE_DOUBLE (FN_FORMAT + 5 ) /* Doppelt unterstreichen */
-#define FN_AUTOFORMAT_REDLINE_APPLY (FN_FORMAT + 6 ) /* Autoformat mit Redlining anwenden */
-#define FN_SET_SUPER_SCRIPT (FN_FORMAT + 11) /* Hochstellung */
-#define FN_SET_SUB_SCRIPT (FN_FORMAT + 12) /* Tiefstellung */
+#define FN_AUTOFORMAT_APPLY (FN_FORMAT + 1 ) /* apply autoformat options */
+#define FN_AUTOFORMAT_AUTO (FN_FORMAT + 2 ) /* apply autoformat during user input */
+#define FN_GROW_FONT_SIZE (FN_FORMAT + 3 ) /* size */
+#define FN_SHRINK_FONT_SIZE (FN_FORMAT + 4 ) /* size */
+#define FN_UNDERLINE_DOUBLE (FN_FORMAT + 5 ) /* double underline */
+#define FN_AUTOFORMAT_REDLINE_APPLY (FN_FORMAT + 6 ) /* apply autoformat with Redlining */
+#define FN_SET_SUPER_SCRIPT (FN_FORMAT + 11) /* superscript */
+#define FN_SET_SUB_SCRIPT (FN_FORMAT + 12) /* subscript */
#define FN_SET_CASEMAP (FN_FORMAT + 14) /* CaseMap */
-#define FN_SET_LANGUAGE (FN_FORMAT + 15) /* Sprache */
+#define FN_SET_LANGUAGE (FN_FORMAT + 15) /* language */
#define FN_SET_KERNING (FN_FORMAT + 16) /* Kerning */
-#define FN_INDENT_TO_TABSTOP (FN_FORMAT + 17) /* Einrueckung auf die naechste Tabpostion */
-//schon in svxids.hrc
-//#define FN_SET_JUSTIFY_PARA (FN_FORMAT + 21) /* Ausrichtung Absatz */
-#define FN_FLIP_HORZ_GRAFIC (FN_FORMAT + 25) /* Spiegeln horizontal */
-#define FN_FLIP_VERT_GRAFIC (FN_FORMAT + 26) /* Spiegeln vertikal */
-#define FN_SET_LINE_SPACE (FN_FORMAT + 27) /* Zeilenabstand parametrisiert */
-#define FN_SET_ADJUST (FN_FORMAT + 28) /* Ausrichtung parametrisiert */
-#define FN_SET_LRMARGIN (FN_FORMAT + 29) /* linker/rechter Rand */
-#define FN_SET_ULMARGIN (FN_FORMAT + 30) /* oberer/unterer Rand */
-#define FN_UNINDENT_TO_TABSTOP (FN_FORMAT + 31) /* Einrueckung auf die vorgige Tabpostion */
-
-#define FN_SET_HYPHEN_ZONE (FN_FORMAT + 32) /* Silbentrennung */
-#define FN_SET_KEEP_TOGETHER (FN_FORMAT + 34) /* nicht trennen */
-#define FN_SET_KEEP_WITH_NEXT (FN_FORMAT + 35) /* mit folgendem zus. */
+#define FN_INDENT_TO_TABSTOP (FN_FORMAT + 17) /* indent to tabstop */
+#define FN_FLIP_HORZ_GRAFIC (FN_FORMAT + 25) /* mirror horizontally */
+#define FN_FLIP_VERT_GRAFIC (FN_FORMAT + 26) /* mirror vertically */
+#define FN_SET_LINE_SPACE (FN_FORMAT + 27) /* parametrized line distance */
+#define FN_SET_ADJUST (FN_FORMAT + 28) /* parametrized alignemnt */
+#define FN_SET_LRMARGIN (FN_FORMAT + 29) /* left/right margin */
+#define FN_SET_ULMARGIN (FN_FORMAT + 30) /* upper/lower margin */
+#define FN_UNINDENT_TO_TABSTOP (FN_FORMAT + 31) /* indent to previous tabstop */
+
+#define FN_SET_HYPHEN_ZONE (FN_FORMAT + 32) /* hyphenation */
+#define FN_SET_KEEP_TOGETHER (FN_FORMAT + 34) /* no hyphenation */
+#define FN_SET_KEEP_WITH_NEXT (FN_FORMAT + 35) /* keep together with following */
#define FN_SET_WIDOW (FN_FORMAT + 36) /* Widows */
#define FN_SET_ORPHAN (FN_FORMAT + 37) /* Orphans */
-
#define FN_REGISTER_COLLECTION (FN_FORMAT + 43) /* Referenzvorlage an der Seite */
-#define FN_REGISTER_MODE (FN_FORMAT + 44) /* Registermodus an/aus */
-#define FN_NUM_FORMAT_TABLE_DLG (FN_FORMAT + 45) /* Zahlenformat in Tabelle */
-#define FN_FORMAT_BORDER_DLG (FN_FORMAT + 48) /* Umrandung */
-#define FN_FORMAT_PAGE_COLUMN_DLG (FN_FORMAT + 49) /* Spalten pro Seite */
-#define FN_FORMAT_BACKGROUND_DLG (FN_FORMAT + 50) /* Hintergrund */
-#define FN_FORMAT_PAGE (FN_FORMAT + 51) /* Seite */
-#define FN_FORMAT_PAGE_DLG (FN_FORMAT + 52) /* Seite */
-#define FN_FORMAT_COLUMN (FN_FORMAT + 53) /* Spalten */
-#define FN_FORMAT_DROPCAPS (FN_FORMAT + 54) /* Initialien */
-#define FN_FORMAT_FRAME (FN_FORMAT + 55) /* Rahmen */
-#define FN_FORMAT_FRAME_DLG (FN_FORMAT + 56) /* Rahmen */
-#define FN_FORMAT_GRAFIC (FN_FORMAT + 57) /* Grafik */
-#define FN_FORMAT_GRAFIC_DLG (FN_FORMAT + 58) /* Grafik */
-#define FN_FORMAT_TABLE (FN_FORMAT + 59) /* Tabelle */
-#define FN_FORMAT_TABLE_DLG (FN_FORMAT + 60) /* Tabelle */
-#define FN_FORMAT_OLE_DLG (FN_FORMAT + 61) /* OLE bearbeiten */
-
-#define FN_NEW_STYLE_BY_EXAMPLE (FN_FORMAT + 62) /* Vorlage erzeugen by Example */
-#define FN_UPDATE_STYLE_BY_EXAMPLE (FN_FORMAT + 63) /* Vorlage aktualisieren */
-#define FN_STYLE_SHEET_FRAME_DLG (FN_FORMAT + 64) /* Rahmenvorlage */
-#define FN_STYLE_SHEET_DOC_DLG (FN_FORMAT + 65) /* Dokumentvorlage */
-#define FN_STYLE_SHEET_GRAFIK_DLG (FN_FORMAT + 66) /* Dokumentvorlage */
-#define FN_FORMAT_FOOTNOTE (FN_FORMAT + 67) /* Fussnoten */
-#define FN_FORMAT_FOOTNOTE_DLG (FN_FORMAT + 68) /* Fussnoten-Dialog */
-
-// schon im Svx definiert
-//#define FN_FORMAT_RESET (FN_FORMAT + 69) /* Format zuruecksetzen */
-
-#define FN_FRAME_TO_TOP (FN_FORMAT + 70) /* Rahmen nach oben */
-#define FN_FRAME_TO_BOTTOM (FN_FORMAT + 71) /* Rahmen nach unten */
-
-#define FN_FRAME_NOWRAP (FN_FORMAT + 72) /* Rahmen kein Umlauf */
-#define FN_FRAME_WRAP (FN_FORMAT + 73) /* Rahmen Umlauf */
-#define FN_FRAME_WRAPTHRU (FN_FORMAT + 74) /* Rahmen Durchlauf */
-
-#define FN_FRAME_ALIGN_HORZ_LEFT (FN_FORMAT + 75) /* Rahmen horz. links */
-#define FN_FRAME_ALIGN_HORZ_RIGHT (FN_FORMAT + 76) /* Rahmen horz. rechts */
-#define FN_FRAME_ALIGN_HORZ_CENTER (FN_FORMAT + 77) /* Rahmen horz. zentriert */
-#define FN_FRAME_ALIGN_VERT_TOP (FN_FORMAT + 78) /* Rahmen vert. oben */
-#define FN_FRAME_ALIGN_VERT_BOTTOM (FN_FORMAT + 79) /* Rahmen vert. unten */
-#define FN_FRAME_ALIGN_VERT_CENTER (FN_FORMAT + 80) /* Rahmen vert. zentriert */
-
-#define FN_SET_FRM_POSITION (FN_FORMAT + 82)/* Rahmenposition -- " -- */
-#define FN_SET_FRM_OPTIONS (FN_FORMAT + 86)/* Rahmenoptionen -- " -- */
-
-#define FN_SET_PAGE_STYLE (FN_FORMAT + 93) /* Anwenden Seitenv. */
-
+#define FN_REGISTER_MODE (FN_FORMAT + 44) /* Register mode on/off */
+#define FN_NUM_FORMAT_TABLE_DLG (FN_FORMAT + 45) /* number format in table */
+#define FN_FORMAT_BORDER_DLG (FN_FORMAT + 48) /* */
+#define FN_FORMAT_PAGE_COLUMN_DLG (FN_FORMAT + 49) /* columns per page */
+#define FN_FORMAT_BACKGROUND_DLG (FN_FORMAT + 50) /* background */
+#define FN_FORMAT_PAGE (FN_FORMAT + 51) /* page */
+#define FN_FORMAT_PAGE_DLG (FN_FORMAT + 52) /* page */
+#define FN_FORMAT_COLUMN (FN_FORMAT + 53) /* columns */
+#define FN_FORMAT_DROPCAPS (FN_FORMAT + 54) /* initials */
+#define FN_FORMAT_FRAME (FN_FORMAT + 55) /* frame */
+#define FN_FORMAT_FRAME_DLG (FN_FORMAT + 56) /* frame */
+#define FN_FORMAT_GRAFIC (FN_FORMAT + 57) /* graphic */
+#define FN_FORMAT_GRAFIC_DLG (FN_FORMAT + 58) /* graphic */
+#define FN_FORMAT_TABLE (FN_FORMAT + 59) /* table */
+#define FN_FORMAT_TABLE_DLG (FN_FORMAT + 60) /* table */
+#define FN_FORMAT_OLE_DLG (FN_FORMAT + 61) /* edit OLE */
+
+#define FN_NEW_STYLE_BY_EXAMPLE (FN_FORMAT + 62) /* create style by example */
+#define FN_UPDATE_STYLE_BY_EXAMPLE (FN_FORMAT + 63) /* update style */
+#define FN_STYLE_SHEET_FRAME_DLG (FN_FORMAT + 64) /* frame style */
+#define FN_STYLE_SHEET_DOC_DLG (FN_FORMAT + 65) /* document style */
+#define FN_STYLE_SHEET_GRAFIK_DLG (FN_FORMAT + 66) /* document style */
+#define FN_FORMAT_FOOTNOTE (FN_FORMAT + 67) /* footnotes */
+#define FN_FORMAT_FOOTNOTE_DLG (FN_FORMAT + 68) /* footnote dialog */
+
+// already defined in Svx
+//#define FN_FORMAT_RESET (FN_FORMAT + 69)
+
+#define FN_FRAME_TO_TOP (FN_FORMAT + 70)
+#define FN_FRAME_TO_BOTTOM (FN_FORMAT + 71)
+
+#define FN_FRAME_NOWRAP (FN_FORMAT + 72)
+#define FN_FRAME_WRAP (FN_FORMAT + 73)
+#define FN_FRAME_WRAPTHRU (FN_FORMAT + 74)
+
+#define FN_FRAME_ALIGN_HORZ_LEFT (FN_FORMAT + 75)
+#define FN_FRAME_ALIGN_HORZ_RIGHT (FN_FORMAT + 76)
+#define FN_FRAME_ALIGN_HORZ_CENTER (FN_FORMAT + 77)
+#define FN_FRAME_ALIGN_VERT_TOP (FN_FORMAT + 78)
+#define FN_FRAME_ALIGN_VERT_BOTTOM (FN_FORMAT + 79)
+#define FN_FRAME_ALIGN_VERT_CENTER (FN_FORMAT + 80)
+
+#define FN_SET_FRM_POSITION (FN_FORMAT + 82)/* frame position -- " -- */
+#define FN_SET_FRM_OPTIONS (FN_FORMAT + 86)/* frame position -- " -- */
+
+#define FN_SET_PAGE_STYLE (FN_FORMAT + 93) /* apply page style */
+
+#define FN_FORMAT_TITLEPAGE_DLG (FN_FORMAT + 98) /* Title Page */
#define FN_TABLE_REP (FN_FORMAT + 99) /* TableRepresentation */
-#define FN_CONVERT_TEXT_TABLE (FN_FORMAT + 100) /* Konvertierung Text <-> Tabelle */
-#define FN_TABLE_INSERT_ROW (FN_FORMAT + 101) /* Tabelle: Zeile einfuegen */
-#define FN_TABLE_INSERT_COL (FN_FORMAT + 102) /* Tabelle: Spalte einfuegen */
-#define FN_TABLE_DELETE_ROW (FN_FORMAT + 103) /* Tabelle: Zeile loeschen */
-#define FN_TABLE_DELETE_COL (FN_FORMAT + 104) /* Tabelle: Spalte loeschen */
-#define FN_TABLE_SPLIT_CELLS (FN_FORMAT + 105) /* Tabelle: Zellen teilen */
-#define FN_TABLE_MERGE_CELLS (FN_FORMAT + 106) /* Tabelle: Zellen verbinden */
-#define FN_TABLE_SET_ROW_HEIGHT (FN_FORMAT + 107) /* Tabelle: Zeilenhoehe setzen */
-#define FN_TABLE_SET_COL_WIDTH (FN_FORMAT + 108) /* Tabelle: Spaltenbreite setzen */
-#define FN_TABLE_SET_ULSPACE (FN_FORMAT + 109) /* Tabelle: oberen / unteren Abstand einstellen */
-#define FN_OPTIMIZE_TABLE (FN_FORMAT + 110) /* ToolBoxItem fuer Optimierung in Tabellen */
-#define FN_TABLE_SET_SHADOW (FN_FORMAT + 111) /* Tabelle: Schatten einstellen */
-#define FN_TABLE_GOTO_CELL (FN_FORMAT + 112) /* Tabelle: Zelle anspringen */
-#define FN_TABLE_SELECT_ROW (FN_FORMAT + 113) /* Tabelle: Zeile selektieren */
-#define FN_TABLE_SELECT_COL (FN_FORMAT + 114) /* Tabelle: Spalte selektieren */
-#define FN_TABLE_SELECT_ALL (FN_FORMAT + 115) /* Tabelle: Tabelle selektieren */
-#define FN_TABLE_SET_READ_ONLY (FN_FORMAT + 116) /* Tabelle: Tabelle schuetzen */
-#define FN_TABLE_SET_READ_ONLY_CELLS (FN_FORMAT + 117) /* Tabelle: Tabellezellen schuetzen */
-#define FN_TABLE_UNSET_READ_ONLY_CELLS (FN_FORMAT + 119) /* Tabelle: Tabellezellen schuetzen aufheben */
+#define FN_CONVERT_TEXT_TABLE (FN_FORMAT + 100) /* convert text <-> table */
+#define FN_TABLE_INSERT_ROW (FN_FORMAT + 101) /* */
+#define FN_TABLE_INSERT_COL (FN_FORMAT + 102) /* */
+#define FN_TABLE_DELETE_ROW (FN_FORMAT + 103) /* */
+#define FN_TABLE_DELETE_COL (FN_FORMAT + 104) /* */
+#define FN_TABLE_SPLIT_CELLS (FN_FORMAT + 105) /* */
+#define FN_TABLE_MERGE_CELLS (FN_FORMAT + 106) /* */
+#define FN_TABLE_SET_ROW_HEIGHT (FN_FORMAT + 107) /* */
+#define FN_TABLE_SET_COL_WIDTH (FN_FORMAT + 108) /* */
+#define FN_TABLE_SET_ULSPACE (FN_FORMAT + 109) /* table: set upper / lower offset */
+#define FN_OPTIMIZE_TABLE (FN_FORMAT + 110) /* ToolBoxItem for optimizing tables */
+#define FN_TABLE_SET_SHADOW (FN_FORMAT + 111) /* */
+#define FN_TABLE_GOTO_CELL (FN_FORMAT + 112) /* */
+#define FN_TABLE_SELECT_ROW (FN_FORMAT + 113) /* */
+#define FN_TABLE_SELECT_COL (FN_FORMAT + 114) /* */
+#define FN_TABLE_SELECT_ALL (FN_FORMAT + 115) /* */
+#define FN_TABLE_SET_READ_ONLY (FN_FORMAT + 116) /* protect table */
+#define FN_TABLE_SET_READ_ONLY_CELLS (FN_FORMAT + 117) /* protect table cells */
+#define FN_TABLE_UNSET_READ_ONLY_CELLS (FN_FORMAT + 119) /* undo table cell protection */
#define FN_TABLE_HEADLINE_REPEAT (FN_FORMAT + 120) /* also used in SwXTextTable*/
-#define FN_TABLE_ADJUST_CELLS (FN_FORMAT + 121) /* Tabelle: Zellen anpassen */
+#define FN_TABLE_ADJUST_CELLS (FN_FORMAT + 121) /* */
-#define FN_FRAME_UP (FN_FORMAT + 122) /* Rahmen um eine Ebene nach oben */
-#define FN_FRAME_DOWN (FN_FORMAT + 123) /* Rahmen um eine Ebene nach unten */
+#define FN_FRAME_UP (FN_FORMAT + 122) /* frame by one level up */
+#define FN_FRAME_DOWN (FN_FORMAT + 123) /* frame by one level down */
#define FN_TABLE_INSERT_CHART (FN_FORMAT + 124)
-#define FN_SET_FRM_LRSPACE (FN_FORMAT + 125) /* Rahmen Seitenabstand */
-#define FN_SET_FRM_ULSPACE (FN_FORMAT + 126) /* Rahmen Kopf-/Fussabstand */
+#define FN_SET_FRM_LRSPACE (FN_FORMAT + 125) /* frame page offset */
+#define FN_SET_FRM_ULSPACE (FN_FORMAT + 126) /* frame head-/foot offset */
#define FN_TABLE_SET_LRSPACE (FN_FORMAT + 127) /* Tabelle: linker / rechter Abstand einstellen */
-#define FN_TABLE_OPTIMAL_HEIGHT (FN_FORMAT + 128) /* Zellenhoehe optimal*/
+#define FN_TABLE_OPTIMAL_HEIGHT (FN_FORMAT + 128) /* optimal cell height */
#define FN_TABLE_DELETE_TABLE (FN_FORMAT + 129) /* remove current table*/
#define FN_TABLE_SELECT_CELL (FN_FORMAT + 130) /* selects the current table cell */
#define FN_CONVERT_TEXT_TO_TABLE (FN_FORMAT + 131) /* convert selected text to table */
#define FN_CONVERT_TABLE_TO_TEXT (FN_FORMAT + 132) /* convert a table to text */
#define FN_TABLE_SORT_DIALOG (FN_FORMAT + 133) /* sorting in tables*/
+
/*--------------------------------------------------------------------
- Bereich: Seitenvorlage
+ Region: Page Template
--------------------------------------------------------------------*/
-
-#define FN_NEW_PAGE_STYLE (FN_FORMAT + 129) /* Anlegen Seitenvorlage */
-#define FN_PAGE_STYLE_SET_LR_MARGIN (FN_FORMAT + 130) /* linker / rechter Rand */
-#define FN_PAGE_STYLE_SET_UL_MARGIN (FN_FORMAT + 131) /* oberer / unterer Rand */
-#define FN_PAGE_STYLE_SET_PAGE (FN_FORMAT + 134) /* linke, rechte... */
-#define FN_PAGE_STYLE_SET_PAPER_SIZE (FN_FORMAT + 135) /* Papiergroesse */
-#define FN_PAGE_STYLE_SET_PAPER_BIN (FN_FORMAT + 136) /* Druckerschacht */
-#define FN_PAGE_STYLE_SET_NUMBER_FORMAT (FN_FORMAT + 137) /* Numerierungsart */
-#define FN_PAGE_STYLE_SET_COLS (FN_FORMAT + 138) /* Spaltenanzahl */
-
-
-/* OS: Diese Ids werden nur noch fuer die Hilfe benoetigt und sind fuer den
- Dialog durch die Ids ohne _DLG ersetzt*/
-#define FN_TABLE_INSERT_COL_DLG (FN_FORMAT + 142) /* Tabelle: Dlg. Spalte einfuegen */
-#define FN_TABLE_INSERT_ROW_DLG (FN_FORMAT + 143) /* Tabelle: Dlg. Zeile einfuegen */
+#define FN_NEW_PAGE_STYLE (FN_FORMAT + 129) /* create page style */
+#define FN_PAGE_STYLE_SET_LR_MARGIN (FN_FORMAT + 130) /* left / right margin */
+#define FN_PAGE_STYLE_SET_UL_MARGIN (FN_FORMAT + 131) /* upper / lower margin */
+#define FN_PAGE_STYLE_SET_PAGE (FN_FORMAT + 134) /* */
+#define FN_PAGE_STYLE_SET_PAPER_SIZE (FN_FORMAT + 135) /* */
+#define FN_PAGE_STYLE_SET_PAPER_BIN (FN_FORMAT + 136) /* paper tray */
+#define FN_PAGE_STYLE_SET_NUMBER_FORMAT (FN_FORMAT + 137) /* */
+#define FN_PAGE_STYLE_SET_COLS (FN_FORMAT + 138) /* number of columns */
+
+/* these Ids are only required by Help and are replaced by the Ids without _DLG
+ * for the dialog */
+#define FN_TABLE_INSERT_COL_DLG (FN_FORMAT + 142) /* */
+#define FN_TABLE_INSERT_ROW_DLG (FN_FORMAT + 143) /* */
#define FN_GOTO_NEXT_CELL (FN_FORMAT + 145) /* Table: go to next cell */
#define FN_GOTO_PREV_CELL (FN_FORMAT + 146) /* Table: go to previous cell */
-
#define FN_TABLE_HEADLINE_COUNT (FN_FORMAT + 147) /* number of repeated headlines of tables */
-//hier geht's weiter !
+
/*--------------------------------------------------------------------
- Bereich: Ribbon
+ Region: Ribbon
--------------------------------------------------------------------*/
-#define FN_SET_BACKGROUND_COLOR (FN_FORMAT + 150) /* Hintergrundfarbe */
-
-#define FN_SET_BORDER_POS (FN_FORMAT + 152) /* Position Umrandung */
-#define FN_SET_BORDER_LINES (FN_FORMAT + 153) /* Linienart Umrandung */
-#define FN_SET_BORDER_COLOR (FN_FORMAT + 154) /* Farbe Umrandung */
-
-#define FN_FORMULA_CALC (FN_FORMAT + 156) /* Formelauswahl */
-#define FN_FORMULA_CANCEL (FN_FORMAT + 157) /* Formel nicht uebernehmen */
-#define FN_FORMULA_APPLY (FN_FORMAT + 158) /* Formel uebernehmen */
+#define FN_SET_BACKGROUND_COLOR (FN_FORMAT + 150) /* */
-#define FN_TABLE_UNSET_READ_ONLY (FN_FORMAT + 159) /* Zellenschutz fuer Tab. aufheben */
+#define FN_SET_BORDER_POS (FN_FORMAT + 152) /* */
+#define FN_SET_BORDER_LINES (FN_FORMAT + 153) /* */
+#define FN_SET_BORDER_COLOR (FN_FORMAT + 154) /* */
-#define FN_FORMULA_POSITION (FN_FORMAT + 160) /* Positionsanzeige */
-#define FN_FORMULA_EDIT (FN_FORMAT + 161) /* Editfeld */
+#define FN_FORMULA_CALC (FN_FORMAT + 156) /* select formula */
+#define FN_FORMULA_CANCEL (FN_FORMAT + 157) /* don't apply formula */
+#define FN_FORMULA_APPLY (FN_FORMAT + 158) /* apply formula */
+#define FN_TABLE_UNSET_READ_ONLY (FN_FORMAT + 159) /* undo cell protection for table */
-#define FN_FRAME_WRAP_IDEAL (FN_FORMAT + 163) /* Rahmen Idealer Umlauf */
-#define FN_FRAME_WRAPTHRU_TRANSP (FN_FORMAT + 164) /* Rahmen Transparenter Durchlauf */
+#define FN_FORMULA_POSITION (FN_FORMAT + 160) /* position display*/
+#define FN_FORMULA_EDIT (FN_FORMAT + 161) /* edit-field */
-#define FN_FRAME_ALIGN_VERT_ROW_TOP (FN_FORMAT + 165) /* Rahmen vert. Zeile oben */
-#define FN_FRAME_ALIGN_VERT_ROW_BOTTOM (FN_FORMAT + 166) /* Rahmen vert. Zeile unten */
-#define FN_FRAME_ALIGN_VERT_ROW_CENTER (FN_FORMAT + 167) /* Rahmen vert. Zeile zentriert */
+#define FN_FRAME_WRAP_IDEAL (FN_FORMAT + 163) /* frame ideal wrapping */
+#define FN_FRAME_WRAPTHRU_TRANSP (FN_FORMAT + 164) /* frame transparent wrapping */
-#define FN_FRAME_ALIGN_VERT_CHAR_TOP (FN_FORMAT + 168) /* Rahmen vert. Zeichen oben */
-#define FN_FRAME_ALIGN_VERT_CHAR_BOTTOM (FN_FORMAT + 169) /* Rahmen vert. Zeichen unten */
-#define FN_FRAME_ALIGN_VERT_CHAR_CENTER (FN_FORMAT + 170) /* Rahmen vert. Zeichen zentriert */
+#define FN_FRAME_ALIGN_VERT_ROW_TOP (FN_FORMAT + 165) /* */
+#define FN_FRAME_ALIGN_VERT_ROW_BOTTOM (FN_FORMAT + 166) /* */
+#define FN_FRAME_ALIGN_VERT_ROW_CENTER (FN_FORMAT + 167) /* */
-#define FN_TABLE_SET_DEF_BORDER (FN_FORMAT + 171) /* vordefinierte Umrandungen setzen */
+#define FN_FRAME_ALIGN_VERT_CHAR_TOP (FN_FORMAT + 168) /* */
+#define FN_FRAME_ALIGN_VERT_CHAR_BOTTOM (FN_FORMAT + 169) /* */
+#define FN_FRAME_ALIGN_VERT_CHAR_CENTER (FN_FORMAT + 170) /* */
-#define FN_FRAME_WRAP_LEFT (FN_FORMAT + 172) /* Rahmen Umlauf links */
-#define FN_FRAME_WRAP_RIGHT (FN_FORMAT + 173) /* Rahmen Umlauf links */
+#define FN_TABLE_SET_DEF_BORDER (FN_FORMAT + 171) /* set predefined border */
-#define FN_TABLE_SET_ROW_AUTOHEIGHT (FN_FORMAT + 174) /* Tabelle: Minimale automatische Zeilenhoehe setzen */
+#define FN_FRAME_WRAP_LEFT (FN_FORMAT + 172) /* */
+#define FN_FRAME_WRAP_RIGHT (FN_FORMAT + 173) /* */
+#define FN_TABLE_SET_ROW_AUTOHEIGHT (FN_FORMAT + 174) /* table: set minimal automatic row height */
-#define FN_WRAP_ANCHOR_ONLY (FN_FORMAT + 181) /* Umlauf nur fuer ersten Absatz */
+#define FN_WRAP_ANCHOR_ONLY (FN_FORMAT + 181) /* wrap only for first paragraph */
-#define FN_TABLE_BALANCE_CELLS (FN_FORMAT + 182) /* Spalten gleichmaessig verteilen */
-#define FN_TABLE_BALANCE_ROWS (FN_FORMAT + 183) /* Zeilen gleichmaessig verteilen */
+#define FN_TABLE_BALANCE_CELLS (FN_FORMAT + 182) /* evenly distribute columns */
+#define FN_TABLE_BALANCE_ROWS (FN_FORMAT + 183) /* evenly distribute rows */
-#define FN_FRAME_WRAP_CONTOUR (FN_FORMAT + 184) /* Rahmen Kunturumlauf */
+#define FN_FRAME_WRAP_CONTOUR (FN_FORMAT + 184) /* */
-#define FN_TABLE_VERT_NONE (FN_FORMAT + 185) /* vertikale Ausrichtung in Tabellenzellen */
-#define FN_TABLE_VERT_CENTER (FN_FORMAT + 186) /* -"- */
+#define FN_TABLE_VERT_NONE (FN_FORMAT + 185) /* vertical alignment in table cells */
+#define FN_TABLE_VERT_CENTER (FN_FORMAT + 186) /* -"- */
#define FN_TABLE_VERT_BOTTOM (FN_FORMAT + 187) /* -"- */
#define FN_TABLE_SET_VERT_ALIGN (FN_FORMAT + 188) /* -"- */
-#define FN_TABLE_MODE_FIX (FN_FORMAT + 189) /* Tabellenmodus */
+#define FN_TABLE_MODE_FIX (FN_FORMAT + 189) /* table mode */
#define FN_TABLE_MODE_FIX_PROP (FN_FORMAT + 190) /* -"- */
#define FN_TABLE_MODE_VARIABLE (FN_FORMAT + 191) /* -"- */
#define FN_TABLE_BOX_TEXTDIRECTION (FN_FORMAT + 192) /* text direction of table cells */
-#define FN_TABLE_AUTOSUM (FN_FORMAT + 195) /* Autosumme*/
-#define FN_SET_CONTROL_HANDLER (FN_FORMAT + 199) /* Macro setzen */
+#define FN_TABLE_AUTOSUM (FN_FORMAT + 195) /* */
+#define FN_SET_CONTROL_HANDLER (FN_FORMAT + 199) /* set macro */
-#define FN_IS_IMAGE (FN_FORMAT2 + 6) /* Numerierung : mit Grafik?*/
+#define FN_IS_IMAGE (FN_FORMAT2 + 6) /* numbering: with graphic? */
-#define FN_GOTO_NEXT_REGION (FN_FORMAT2 + 9) /* Naechsten Bereich anspringen */
-#define FN_GOTO_PREV_REGION (FN_FORMAT2 + 10) /* Vorherigen " */
+#define FN_GOTO_NEXT_REGION (FN_FORMAT2 + 9) /* */
+#define FN_GOTO_PREV_REGION (FN_FORMAT2 + 10) /* */
+
+#define FN_GET_SBXCONTROL (FN_FORMAT2 + 11) /* */
+#define FN_ABSTRACT_NEWDOC (FN_FORMAT2 + 12) /* abstract in new document */
+#define FN_ABSTRACT_STARIMPRESS (FN_FORMAT2 + 13) /* abstract to StarImpress */
-#define FN_GET_SBXCONTROL (FN_FORMAT2 + 11) /* SbxObject rausreichen */
-#define FN_ABSTRACT_NEWDOC (FN_FORMAT2 + 12) /* Abstract in neuem Doc */
-#define FN_ABSTRACT_STARIMPRESS (FN_FORMAT2 + 13) /* Abstract an StarImpress */
-/* OD 2006-03-09 #i51726# - all drawing objects can be named now. */
#define FN_NAME_SHAPE (FN_FORMAT2 + 14) /* Name shapes */
-// #i68101#
#define FN_TITLE_DESCRIPTION_SHAPE (FN_FORMAT2 + 15) /* shape title and description */
-#define FN_NUMBER_FORMAT (FN_FORMAT2 + 120) /* Boxen/NumberFormatter eistellen */
+#define FN_NUMBER_FORMAT (FN_FORMAT2 + 120) /* set Boxen/NumberFormatter */
#define FN_NUMBER_STANDARD (FN_FORMAT2 + 121)
#define FN_NUMBER_TWODEC (FN_FORMAT2 + 123)
#define FN_NUMBER_SCIENTIFIC (FN_FORMAT2 + 124)
@@ -677,7 +639,9 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_NUMBER_CURRENCY (FN_FORMAT2 + 127)
#define FN_NUMBER_PERCENT (FN_FORMAT2 + 128)
-
+#define FN_EXPORT_OLE (FN_FORMAT2 + 129) /* Export menu item */
+#define FN_EXPORT_OLE_AS_PDF (FN_FORMAT2 + 130) /* Export as PDF */
+#define FN_EXPORT_OLE_AS_GRAPHIC (FN_FORMAT2 + 131) /* Export as JPG */
#define FN_FRAME_CHAIN (FN_FORMAT2 + 136)
#define FN_FRAME_UNCHAIN (FN_FORMAT2 + 137)
@@ -693,9 +657,9 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_FORMAT_LINENUMBER (FN_FORMAT2 + 144)
-#define FN_TABLE_RELATIVE_WIDTH (FN_FORMAT2 + 147) /* Tabelle: relative Breite - UNO */
-#define FN_TABLE_WIDTH (FN_FORMAT2 + 148) /* Tabelle: Breite - UNO */
-#define FN_TABLE_IS_RELATIVE_WIDTH (FN_FORMAT2 + 149) /* Tabelle: ist Breite relativ?- UNO */
+#define FN_TABLE_RELATIVE_WIDTH (FN_FORMAT2 + 147) /* UNO */
+#define FN_TABLE_WIDTH (FN_FORMAT2 + 148) /* UNO */
+#define FN_TABLE_IS_RELATIVE_WIDTH (FN_FORMAT2 + 149) /* UNO */
#define FN_INC_INDENT_OFFSET (FN_FORMAT2 + 150)
#define FN_DEC_INDENT_OFFSET (FN_FORMAT2 + 151)
@@ -713,84 +677,75 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_SAVE_GRAPHIC (FN_FORMAT2 + 160)
/*--------------------------------------------------------------------
- Bereich: Extras
+ Region: Extras
--------------------------------------------------------------------*/
-#define FN_LINE_NUMBERING_DLG (FN_EXTRA + 2 ) /* Zeilennumerierung */
-#define FN_HYPHENATE_OPT_DLG (FN_EXTRA + 5 ) /* Silbentrennung */
-#define FN_ADD_UNKNOWN (FN_EXTRA + 6 ) /* Woerter lernen */
-#define FN_DICTIONARY_DLG (FN_EXTRA + 8 ) /* Woerterbuecher */
-#define FN_NUMBERING (FN_EXTRA + 9 ) /* Nummerierung/Bullets */
-#define FN_NUMBERING_DLG (FN_EXTRA + 10) /* Nummerierung/Bullets */
-#define FN_NUMBERING_OUTLINE (FN_EXTRA + 11) /* Gliederungsnumerierung */
-#define FN_NUMBERING_OUTLINE_DLG (FN_EXTRA + 12) /* Gliederungsnumerierung */
-#define FN_SORTING_DLG (FN_EXTRA + 14) /* Sortieren */
-#define FN_CALCULATE (FN_EXTRA + 15) /* Berechnen */
-#define FN_GENERATE_TOC_DLG (FN_EXTRA + 16) /* Inhaltsverzeichnis */
-#define FN_GENERATE_INDEX_DLG (FN_EXTRA + 17) /* Stichwortverzeichnis */
-#define FN_GENERATE_DIR_DLG (FN_EXTRA + 18) /* Verzeichnis */
-#define FN_GLOSSARY_DLG (FN_EXTRA + 20) /* Textbausteine */
-#define FN_MACRO_CHOOSER (FN_EXTRA + 21) /* Makro aufnehmen */
-
-
-#define FN_PLAY_MACRO (FN_EXTRA + 23) /* Makro abspielen */
-#define FN_LAUNCH_BASIC (FN_EXTRA + 25) /* Makro abspielen */
-#define FN_EXPAND_GLOSSARY (FN_EXTRA + 28) /* Textbausteine expandieren */
-#define FN_CONFIG_TOOLBOX (FN_EXTRA + 29) /* Konfiguration Toolbox */
-#define FN_CONFIG_MENU (FN_EXTRA + 30) /* Konfiguration Menu */
-#define FN_CONFIG_KEY (FN_EXTRA + 31) /* Konfiguration Tastatur */
-#define FN_CHANGE_PAGENUM (FN_EXTRA + 34) /* Seitennummer aendern */
-
-#define FN_MACRO_POPUP (FN_EXTRA + 37) /* Alle Macrofunktionen */
-#define FN_BULLET (FN_EXTRA + 38) /* Bullet-Liste */
-
-
-// Bereich: Gloassaries
-
-// schon im Svx definiert
-
-//#define FN_GET_GLOSSARY_GROUP_COUNT (FN_EXTRA + 42) /* Anzahl der Bausteingruppen */
-
-#define FN_AUTO_CORRECT (FN_EXTRA + 49 ) /* Autocorrect aus Basic */
-
-
-#define FN_UPDATE_TOX (FN_EXTRA + 53) /* alle Verzeichnisse aktualisieren */
-#define FN_UPDATE_CUR_TOX (FN_EXTRA + 54) /* aktuelles Verzeichnisse aktualisieren */
+#define FN_LINE_NUMBERING_DLG (FN_EXTRA + 2 ) /* */
+#define FN_HYPHENATE_OPT_DLG (FN_EXTRA + 5 ) /* */
+#define FN_ADD_UNKNOWN (FN_EXTRA + 6 ) /* learn words */
+#define FN_DICTIONARY_DLG (FN_EXTRA + 8 ) /* dictionaries */
+#define FN_NUMBERING (FN_EXTRA + 9 ) /* numbering/bullets*/
+#define FN_NUMBERING_DLG (FN_EXTRA + 10) /* numbering/bullets */
+#define FN_NUMBERING_OUTLINE (FN_EXTRA + 11) /* */
+#define FN_NUMBERING_OUTLINE_DLG (FN_EXTRA + 12) /* */
+#define FN_SORTING_DLG (FN_EXTRA + 14) /* */
+#define FN_CALCULATE (FN_EXTRA + 15) /* */
+#define FN_GENERATE_TOC_DLG (FN_EXTRA + 16) /* table of contents */
+#define FN_GENERATE_INDEX_DLG (FN_EXTRA + 17) /* index */
+#define FN_GENERATE_DIR_DLG (FN_EXTRA + 18) /* */
+#define FN_GLOSSARY_DLG (FN_EXTRA + 20) /* text building blocks */
+#define FN_MACRO_CHOOSER (FN_EXTRA + 21) /* record macro */
+
+#define FN_PLAY_MACRO (FN_EXTRA + 23) /* run macro */
+#define FN_LAUNCH_BASIC (FN_EXTRA + 25) /* run macro */
+#define FN_EXPAND_GLOSSARY (FN_EXTRA + 28) /* expand text building blocks */
+#define FN_CONFIG_TOOLBOX (FN_EXTRA + 29) /* configure toolbox*/
+#define FN_CONFIG_MENU (FN_EXTRA + 30) /* configure menu */
+#define FN_CONFIG_KEY (FN_EXTRA + 31) /* configure keyboard */
+#define FN_CHANGE_PAGENUM (FN_EXTRA + 34) /* change page numbers*/
+
+#define FN_MACRO_POPUP (FN_EXTRA + 37) /* all macro functions*/
+#define FN_BULLET (FN_EXTRA + 38) /* bullet list */
+
+// Region: Glossary
+
+#define FN_AUTO_CORRECT (FN_EXTRA + 49 ) /* Autocorrect from Basic */
+
+#define FN_UPDATE_TOX (FN_EXTRA + 53) /* update all indices */
+#define FN_UPDATE_CUR_TOX (FN_EXTRA + 54) /* update current index */
#define FN_REMOVE_CUR_TOX (FN_EXTRA + 55) /* remove the current TOX*/
-#define FN_NAVIGATION_PI_GOTO_PAGE (FN_EXTRA + 59 ) /* Seitenanwahl aus Navi-PI */
-
+#define FN_NAVIGATION_PI_GOTO_PAGE (FN_EXTRA + 59 ) /* goto page from navigation-PI */
#define FN_LETTER_WIZZARD (FN_EXTRA + 60 )
#define FN_FAX_WIZZARD (FN_EXTRA + 61 )
#define FN_MEMO_WIZZARD (FN_EXTRA + 62 )
#define FN_AGENDA_WIZZARD (FN_EXTRA + 63 )
-#define FN_SET_BASIC_METRIC (FN_EXTRA + 80) /* Defaultmetrik Basic setzen */
+#define FN_SET_BASIC_METRIC (FN_EXTRA + 80) /* set default metric Basic */
-#define FN_RESERVED_9 (FN_EXTRA + 86) /* Platzhalter */
-#define FN_RESERVED_8 (FN_EXTRA + 87) /* Platzhalter */
-#define FN_RESERVED_7 (FN_EXTRA + 88) /* Platzhalter */
-#define FN_RESERVED_6 (FN_EXTRA + 89) /* Platzhalter */
-#define FN_RESERVED_5 (FN_EXTRA + 90) /* Platzhalter */
-#define FN_RESERVED_4 (FN_EXTRA + 91) /* Platzhalter */
-#define FN_RESERVED_3 (FN_EXTRA + 92) /* Platzhalter */
-#define FN_RESERVED_2 (FN_EXTRA + 93) /* Platzhalter */
-#define FN_RESERVED_1 (FN_EXTRA + 94) /* Platzhalter */
+#define FN_RESERVED_9 (FN_EXTRA + 86) /* place holder */
+#define FN_RESERVED_8 (FN_EXTRA + 87) /* place holder */
+#define FN_RESERVED_7 (FN_EXTRA + 88) /* place holder */
+#define FN_RESERVED_6 (FN_EXTRA + 89) /* place holder */
+#define FN_RESERVED_5 (FN_EXTRA + 90) /* place holder */
+#define FN_RESERVED_4 (FN_EXTRA + 91) /* place holder */
+#define FN_RESERVED_3 (FN_EXTRA + 92) /* place holder */
+#define FN_RESERVED_2 (FN_EXTRA + 93) /* place holder */
+#define FN_RESERVED_1 (FN_EXTRA + 94) /* place holder */
#define FN_COLLECTION_GROUP_CNT (FN_EXTRA + 96)
#define FN_COLLECTION_GROUP_IDX (FN_EXTRA + 97)
-#define FN_COLL_TYPE (FN_EXTRA + 98) /* Typ fuer GlobalDoc-Collection*/
+#define FN_COLL_TYPE (FN_EXTRA + 98) /* type for GlobalDoc-Collection*/
#define FN_COLL_ADD (FN_EXTRA + 99)
-#define FN_COLL_TITLE (FN_EXTRA2 + 1) /* Bereichsname oder Index-Title */
-#define FN_SHADOWCURSOR (FN_EXTRA2 + 4) /* Shadow Cursor ein/ausschalten */
-
+#define FN_COLL_TITLE (FN_EXTRA2 + 1) /* area name or index title */
+#define FN_SHADOWCURSOR (FN_EXTRA2 + 4) /* enable/disable Shadow Cursor */
-#define FN_VIEW_IN_FRAME (FN_EXTRA2 + 8) /* die View befindet sich in einem FrameDoc*/
+#define FN_VIEW_IN_FRAME (FN_EXTRA2 + 8) /* the view is in a FrameDoc */
-#define FN_UNO_PARA_STYLE (FN_EXTRA2 + 9) // jetzt kommen diverse UNO-Ids fuer die
-#define FN_UNO_PAGE_STYLE (FN_EXTRA2 + 10) // PropertyMap
+#define FN_UNO_PARA_STYLE (FN_EXTRA2 + 9) // starting here are UNI-Ids for the PropertyMap listed
+#define FN_UNO_PAGE_STYLE (FN_EXTRA2 + 10)
#define FN_UNO_FRAME_STYLE_NAME (FN_EXTRA2 + 12)
#define FN_UNO_NUM_START_VALUE (FN_EXTRA2 + 13)
@@ -885,8 +840,6 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_UNO_COMPONENT (FN_EXTRA2 + 97)
#define FN_WORDCOUNT_DIALOG (FN_EXTRA2 + 98)
-//#define FN_UNO_DEFAULT_OUTLINE_LEVEL (FN_EXTRA2 + 99)//#outline level,removed by zahojianwei
-
#define FN_XFORMS_DESIGN_MODE (FN_EXTRA2 + 100)
#define FN_UNO_PARA_STYLE_CONDITIONS (FN_EXTRA2 + 101)
@@ -897,9 +850,7 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_UNO_TABLE_BORDER_DISTANCES (FN_EXTRA2 + 104)
#define FN_SPELL_GRAMMAR_DIALOG (FN_EXTRA2 + 105)
#define FN_UNO_STREAM_NAME (FN_EXTRA2 + 106)
-// --> OD 2008-07-14 #i91601#
#define FN_UNO_LIST_ID (FN_EXTRA2 + 107)
-// <--
#define FN_UNO_REPLACEMENT_GRAPHIC (FN_EXTRA2 + 108)
#define FN_UNO_PARA_CONT_PREV_SUBTREE (FN_EXTRA2 + 109)
@@ -907,6 +858,13 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_UNO_TABLE_NAME (FN_EXTRA2 + 111)
#define FN_UNO_META (FN_EXTRA2 + 112)
#define FN_UNO_NESTED_TEXT_CONTENT (FN_EXTRA2 + 113)
+/* Edit Graphic with External Tool */
+#define FN_EXTERNAL_EDIT (FN_EXTRA2 + 114)
+
+/* Navigation buttons */
+#define FN_NAVIGATION_BACK (FN_EXTRA2 + 115)
+#define FN_NAVIGATION_FORWARD (FN_EXTRA2 + 116)
+
// #i972: bool items to be passed to SwFrmPage for evaluation
#define FN_OLE_IS_MATH (FN_EXTRA2 + 114)
@@ -914,14 +872,12 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_EMBEDDED_OBJECT (FN_EXTRA2 + 116)
-/*--------------------------------------------------------------------
- Bereich: Hilfe
- --------------------------------------------------------------------*/
-
-/*--------------------------------------------------------------------
- Bereich: Traveling & Selektion
- --------------------------------------------------------------------*/
-
+/*------------------------------------------------ --------------------
+ Area: Help
+ -------------------------------------------------- ------------------*/
+/*------------------------------------------------ --------------------
+ Region: Traveling & Selection
+ -------------------------------------------------- ------------------*/
#define FN_CHAR_LEFT (FN_SELECTION + 1 ) /* */
#define FN_CHAR_RIGHT (FN_SELECTION + 2 ) /* */
#define FN_LINE_UP (FN_SELECTION + 3 ) /* */
@@ -929,8 +885,6 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_START_OF_LINE (FN_SELECTION + 5 ) /* StartOfLine */
#define FN_END_OF_LINE (FN_SELECTION + 6 ) /* EndOfLine */
#define FN_START_OF_DOCUMENT (FN_SELECTION + 7 ) /* StartOfDocument */
-//schon in svxids.hrc
-//#define FN_END_OF_DOCUMENT (FN_SELECTION + 8 ) /* EndOfDocument */
#define FN_START_OF_NEXT_PAGE (FN_SELECTION + 9 ) /* StartOfNextPage ??? */
#define FN_END_OF_NEXT_PAGE (FN_SELECTION + 10) /* ??? */
#define FN_START_OF_PREV_PAGE (FN_SELECTION + 11) /* StartOfPrevPage ??? */
@@ -958,62 +912,56 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_DELETE_PARA (FN_SELECTION + 33) /* DeleteToEndOfPara */
#define FN_DELETE_BACK_PARA (FN_SELECTION + 34) /* DeleteToStartOfPara */
#define FN_DELETE_WHOLE_LINE (FN_SELECTION + 35) /* DeleteLine ??? */
-#define FN_SET_INS_MODE (FN_SELECTION + 36) /* Einfuegemodus / Overwrite */
+#define FN_SET_INS_MODE (FN_SELECTION + 36) /* Insertmode / Overwrite */
#define FN_PAGEUP (FN_SELECTION + 37) /* PageUpWithCursor */
#define FN_PAGEDOWN (FN_SELECTION + 38) /* PageDownWithCursor */
#define FN_SET_ADD_MODE (FN_SELECTION + 39) /* Selektionsmodus */
#define FN_SET_EXT_MODE (FN_SELECTION + 40) /* Selektionsmodus */
#define FN_ESCAPE (FN_SELECTION + 41) /* Normal */
-#define FN_SHIFT_BACKSPACE (FN_SELECTION + 42) /* wie Backspace */
-#define FN_SELECT_WORD (FN_SELECTION + 43) /* Wort selektieren */
+#define FN_SHIFT_BACKSPACE (FN_SELECTION + 42) /* like Backspace */
+#define FN_SELECT_WORD (FN_SELECTION + 43) /* select word*/
-#define FN_GOTO_NEXT_OBJ (FN_SELECTION + 44) /* N�chstes Objekt anspringen */
-#define FN_GOTO_PREV_OBJ (FN_SELECTION + 45) /* Vorhergehendes Objekt anspringen */
+#define FN_GOTO_NEXT_OBJ (FN_SELECTION + 44) /* Goto next object */
+#define FN_GOTO_PREV_OBJ (FN_SELECTION + 45) /* Go to previous object */
-#define FN_START_TABLE (FN_SELECTION + 47) /* an den Anfang der Tabelle */
-#define FN_END_TABLE (FN_SELECTION + 48) /* an das Ende der Tabelle */
-#define FN_NEXT_TABLE (FN_SELECTION + 49) /* zur vorhergehenden Tabelle */
-#define FN_PREV_TABLE (FN_SELECTION + 50) /* zur naechsten Tabelle */
+#define FN_START_TABLE (FN_SELECTION + 47) /* to the beginning of the table */
+#define FN_END_TABLE (FN_SELECTION + 48) /* to the end of the table */
+#define FN_NEXT_TABLE (FN_SELECTION + 49) /* to the next table */
+#define FN_PREV_TABLE (FN_SELECTION + 50) /* to the previous table */
-#define FN_START_OF_NEXT_COLUMN (FN_SELECTION + 51) /* zum Anfang der naechsten Spalte */
-#define FN_END_OF_NEXT_COLUMN (FN_SELECTION + 52) /* zum Ende der naechsten Spalte */
-#define FN_START_OF_PREV_COLUMN (FN_SELECTION + 53) /* zum Anfang der vorhergehenden Spalte */
-#define FN_END_OF_PREV_COLUMN (FN_SELECTION + 54) /* zum Ende der vorhergehenden Spalte */
+#define FN_START_OF_NEXT_COLUMN (FN_SELECTION + 51) /* to the start of the next column */
+#define FN_END_OF_NEXT_COLUMN (FN_SELECTION + 52) /* to the end of the next column */
+#define FN_START_OF_PREV_COLUMN (FN_SELECTION + 53) /* to the start of the previous column */
+#define FN_END_OF_PREV_COLUMN (FN_SELECTION + 54) /* to the end of the previous column */
-#define FN_FOOTNOTE_TO_ANCHOR (FN_SELECTION + 55) /* aus der Fussnote zum Anchor */
-#define FN_NEXT_FOOTNOTE (FN_SELECTION + 56) /* zur naechsten Fussnote */
-#define FN_PREV_FOOTNOTE (FN_SELECTION + 57) /* zur vorhergehenden Fussnote */
+#define FN_FOOTNOTE_TO_ANCHOR (FN_SELECTION + 55) /* from the footnote to the anchor */
+#define FN_NEXT_FOOTNOTE (FN_SELECTION + 56) /* to the next footnote */
+#define FN_PREV_FOOTNOTE (FN_SELECTION + 57) /* to the previous footnote */
-#define FN_CNTNT_TO_NEXT_FRAME (FN_SELECTION + 58) /* aus dem Inhalt zum naechsten Rahmen */
-#define FN_FRAME_TO_ANCHOR (FN_SELECTION + 59) /* vom Rahmen zum Anker */
+#define FN_CNTNT_TO_NEXT_FRAME (FN_SELECTION + 58) /* from content to the next frame */
+#define FN_FRAME_TO_ANCHOR (FN_SELECTION + 59) /* from frame to the anchor */
-#define FN_TO_HEADER (FN_SELECTION + 60) /* Toggle zwischen Content und Kopfzeile */
-#define FN_TO_FOOTER (FN_SELECTION + 61) /* Toggle zwischen Content und Fusszeile */
+#define FN_TO_HEADER (FN_SELECTION + 60) /* toggle between content and header */
+#define FN_TO_FOOTER (FN_SELECTION + 61) /* toggle between content and footer */
-#define FN_IDX_MARK_TO_IDX (FN_SELECTION + 62) /* von der Verzeichnismarkierung zum Verzeichnis */
+#define FN_IDX_MARK_TO_IDX (FN_SELECTION + 62) /* from the index mark to the index */
#define FN_TO_FOOTNOTE_AREA (FN_SELECTION + 63) /* jump into the appropriate footnote area */
#define FN_SET_BLOCK_MODE (FN_SELECTION + 64) /* selection mode: block */
-
-
#define FN_PREV_PARA (FN_SELECTION + 74)
#define FN_NEXT_PARA (FN_SELECTION + 75)
-#define FN_GOTO_NEXT_MARK (FN_SELECTION + 76) /* N�chsten Platzhalter anspringen */
-#define FN_GOTO_PREV_MARK (FN_SELECTION + 77) /* Vorhergehenden Platzhalter anspringen */
-
-// schon im SVX unter der gleichen Id
-//#define FN_START_DOC_DIRECT (FN_SELECTION + 78) /* Direkt zum Dokanfang springen */
-//#define FN_END_DOC_DIRECT (FN_SELECTION + 79) /* Direkt zum Dokanfang springen */
+#define FN_GOTO_NEXT_MARK (FN_SELECTION + 76) /* Go to next marker */
+#define FN_GOTO_PREV_MARK (FN_SELECTION + 77) /* Go to previous marker */
-#define FN_NEXT_TOXMARK (FN_SELECTION + 83) /* zur naechsten Verz. Markierung */
-#define FN_PREV_TOXMARK (FN_SELECTION + 84) /* zur vorherigen Verz. Markierung */
-#define FN_NEXT_TBLFML (FN_SELECTION + 85) /* zur naechsten Tabellenformel */
-#define FN_PREV_TBLFML (FN_SELECTION + 86) /* zur vorherigen Tabellenformel */
-#define FN_NEXT_TBLFML_ERR (FN_SELECTION + 87) /* zur naechsten fehl. Tabellenformel */
-#define FN_PREV_TBLFML_ERR (FN_SELECTION + 88) /* zur vorherigen fehl. Tabellenformel */
+#define FN_NEXT_TOXMARK (FN_SELECTION + 83) /* to the next index mark */
+#define FN_PREV_TOXMARK (FN_SELECTION + 84) /* to the previous index mark */
+#define FN_NEXT_TBLFML (FN_SELECTION + 85) /* to the next table formula */
+#define FN_PREV_TBLFML (FN_SELECTION + 86) /* to the previous table formula */
+#define FN_NEXT_TBLFML_ERR (FN_SELECTION + 87) /* to the next broken table formula */
+#define FN_PREV_TBLFML_ERR (FN_SELECTION + 88) /* to the previous broken table formula */
#define FN_READONLY_SELECTION_MODE (FN_SELECTION + 89) /* switches text selection mode in readonly documents*/
#define FN_SELECTION_MODE_DEFAULT (FN_SELECTION + 90) /* use default selection mode - not block mode */
@@ -1023,28 +971,19 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
QUERY-Block
--------------------------------------------------------------------*/
-
-
-#define FN_IS_MODIFIED (FN_QUERY +16) /* Dokument geaendert? */
-#define FN_RESET_MODIFIED (FN_QUERY +17) /* Geaendert-Flag zuruecksetzen */
+#define FN_IS_MODIFIED (FN_QUERY +16) /* Was the document modified? */
+#define FN_RESET_MODIFIED (FN_QUERY +17) /* Reset modified flag */
#define FN_GET_DOC_INFO (FN_QUERY +22) /* Wert Dokumentinfo erfragen */
-#define FN_GET_ERRNO (FN_QUERY +26) /* Error-Nummer abfragen */
-#define FN_GET_DOCMAN_PATH (FN_QUERY +27) /* Pfad zu einer Gruppe im Docmgr erfragen */
+#define FN_GET_ERRNO (FN_QUERY +26) /* Get error number */
+#define FN_GET_DOCMAN_PATH (FN_QUERY +27) /* Get path to a group in Docmgr */
#define FN_TXTATR_INET (FN_QUERY +29) /* INet-Attribut */
-#define FN_EXECUTE_DRAG (FN_QUERY +30) /* D&D starten */
+#define FN_EXECUTE_DRAG (FN_QUERY +30) /* Start drag and drop */
-#define FN_GET_PRINT_AREA (FN_QUERY +32) /* Attribut fuer druckbaren Seitenbereich besorgen */
+#define FN_GET_PRINT_AREA (FN_QUERY +32) /* Get attribute for printable area of page */
-
-
-// #define FN_IS_START_OF_PAGE (FN_QUERY +40) /**/
-// #define FN_IS_END_OF_PAGE (FN_QUERY +41) /**/
-
-#define FN_GET_PARAGRAPH (FN_QUERY +48) /* Paragraph-Object von der Textshell
- an die View weiterreichen*/
-// hier ist Schluss!!!
+#define FN_GET_PARAGRAPH (FN_QUERY +48) /* Get Paragraph-Object from the text shell to the view */
#define FN_DB_FORM_LETTER (FN_QUERY2 + 0) /* form letter */
#define FN_DB_INSERT_CONTENT (FN_QUERY2 + 1) /* merge data into fields*/
@@ -1059,7 +998,7 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_DB_DATA_CURSOR_ANY (FN_QUERY2 + 10)
/*--------------------------------------------------------------------
- Bereich: Envelope
+ Region: Envelope
--------------------------------------------------------------------*/
#define FN_ENVELOP (FN_ENVELP )
@@ -1074,9 +1013,8 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_DELETE_COMMENT (FN_NOTES+6)
#define FN_REPLY (FN_NOTES+7)
-
/*--------------------------------------------------------------------
- Bereich: Parameter
+ Region: Parameter
--------------------------------------------------------------------*/
#define FN_PARAM_TABLE_COLS (FN_PARAM)
@@ -1111,7 +1049,6 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_PARAM_REGION_EDIT_IN_READONLY (FN_PARAM+28)
#define FN_PARAM_INSERT_AFTER (FN_PARAM+29)
-//#define FN_PARAM_FILTER (FN_PARAM+30) already defined in svx/svxids.hrc
#define FN_PARAM_INDEX_NAME (FN_PARAM+31)
#define FN_PARAM_INDEX_OPTIONS (FN_PARAM+32)
#define FN_PARAM_INDEX_FORMAT (FN_PARAM+33)
@@ -1138,11 +1075,9 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_PARAM_GRF_CONNECT (FN_PARAM+53)
#define FN_PARAM_FIELD_TYPE (FN_PARAM+54)
-//already defined in svxids.hrc: #define FN_PARAM_FIELD_CONTENT (FN_PARAM+55)
#define FN_PARAM_FIELD_SUBTYPE (FN_PARAM+56)
#define FN_PARAM_FIELD_FORMAT (FN_PARAM+57)
-
#define FN_PARAM_EVENT (FN_PARAM+68)
#define FN_PARAM_URL (FN_PARAM+69)
#define FN_PARAM_GRF_REALSIZE (FN_PARAM+70)
@@ -1150,34 +1085,33 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_PARAM_GRF_CLIENTMAP (FN_PARAM+74) /* ClientMap */
#define FN_PARAM_GRF_SERVERMAP (FN_PARAM+75) /* ServerMap */
#define FN_PARAM_GRF_TARGETFRAME (FN_PARAM+76) /* TargetFrame */
-#define FN_INET_FIELD_MACRO (FN_PARAM+77) /* Id fuer URL-Feld-Macros*/
+#define FN_INET_FIELD_MACRO (FN_PARAM+77) /* Id for URL-Field-Macros*/
-#define FN_PARAM_PRINTER (FN_PARAM+78) /* Drucker* */
+#define FN_PARAM_PRINTER (FN_PARAM+78) /* Printer */
#define FN_PARAM_STDFONTS (FN_PARAM+79) /* ConfigItem Standardfonts */
#define FN_PARAM_WRTSHELL (FN_PARAM2) /* SwWrtShell */
-#define FN_COND_COLL (FN_PARAM2+1) /* Item fuer bed. Vorlagen */
-#define FN_PARAM_SELECTION (FN_PARAM2+2) /* selektiertes Wort fuer Format/Zeichen/Hyperlink */
+#define FN_COND_COLL (FN_PARAM2+1) /* Item for conditional templates */
+#define FN_PARAM_SELECTION (FN_PARAM2+2) /* selected word for format/character/hyperlink */
#define FN_PARAM_ACT_NUMBER (FN_PARAM2+3) /* PointerItem die aktuelle NumRule */
-#define FN_PARAM_CHILD_LEVELS (FN_PARAM2+4) /* Werden Child-Levels benutzt ?*/
+#define FN_PARAM_CHILD_LEVELS (FN_PARAM2+4) /* are child levels used? */
-#define FN_PARAM_NUM_PRESET (FN_PARAM2+5) /* vorgewaehlte Numerierung*/
+#define FN_PARAM_NUM_PRESET (FN_PARAM2+5) /* predefined numbering */
-#define FN_PARAM_HEIGHT (FN_PARAM2+6) /* Param fuer Hoehe */
-#define FN_PARAM_DIST (FN_PARAM2+7) /* und Breite, wg. metrischer Umwandlung */
+#define FN_PARAM_HEIGHT (FN_PARAM2+6) /* Param for height */
+#define FN_PARAM_DIST (FN_PARAM2+7) /* and width, for metric transformation */
-#define FN_PARAM_SHADOWCURSOR (FN_PARAM2+8) /* Fuer ShadowCursor Optionen */
+#define FN_PARAM_SHADOWCURSOR (FN_PARAM2+8) /* for ShadowCursor options */
-#define FN_PARAM_ACT_NUMLEVEL (FN_PARAM2+9) /* sal_uInt8-Item mit aktuellen NumLevel */
+#define FN_PARAM_ACT_NUMLEVEL (FN_PARAM2+9) /* BYTE-Item with current NumLevel */
-#define FN_PARAM_9 (FN_PARAM2+10)
#define FN_PARAM_10 (FN_PARAM2+11)
#define FN_TEXT_RANGE (FN_PARAM2+12) /* TextRange Property*/
-#define FN_PARAM_CRSR_IN_PROTECTED (FN_PARAM2+13) /* Cursor in geschuetzten Bereichen*/
+#define FN_PARAM_CRSR_IN_PROTECTED (FN_PARAM2+13) /* Cursor in protected areas */
#define FN_PARAM_TOX_TYPE (FN_PARAM2+14) /* TOX type in tox dialog*/
#define FN_PARAM_LINK_DISPLAY_NAME (FN_PARAM2+15) /* LinkDisplayName property*/
#define FN_PARAM_NUM_LEVEL (FN_PARAM2+16) /* rtf filter*/
@@ -1189,17 +1123,11 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_PARAM_CHAIN_PREVIOUS (FN_PARAM2+20) /* Name of frame to be added as chain successor */
#define FN_PARAM_CHAIN_NEXT (FN_PARAM2+21) /* Name of frame to be added as chain predecessor */
#define FN_PARAM_DATABASE_PROPERTIES (FN_PARAM2+22) /* transport a Sequence<PropertyValue> containing database properties*/
-// --> OD 2004-08-06 #i28749#
-// com::sun::star::text::Shape::TransformationInHoriL2R property
#define FN_SHAPE_TRANSFORMATION_IN_HORI_L2R (FN_PARAM2+23)
-// com::sun::star::text::Shape::PositionLayoutDir property
#define FN_SHAPE_POSITION_LAYOUT_DIR (FN_PARAM2+24)
-// <--
-// --> OD 2004-10-28 #i36248#
#define FN_SHAPE_STARTPOSITION_IN_HORI_L2R (FN_PARAM2+25)
#define FN_SHAPE_ENDPOSITION_IN_HORI_L2R (FN_PARAM2+26)
-// <--
/*--------------------------------------------------------------------
Bereich: Druckoptionen
--------------------------------------------------------------------*/
@@ -1216,7 +1144,7 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_PRNOPT_END FN_PRNOPT_POSTITS
/*--------------------------------------------------------------------
- Beschreibung: Status : nicht mehr als 19!
+ Description: Status: not more than 19!
--------------------------------------------------------------------*/
#define FN_STAT_PAGE (FN_STAT + 1)
@@ -1225,14 +1153,13 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_STAT_INSOVER (FN_STAT + 4)
#define FN_STAT_SELMODE (FN_STAT + 5)
#define FN_STAT_CONTEXT (FN_STAT + 7)
-#define FN_STAT_BOOKMARK (FN_STAT + 8) /* Fuer Popup Bookmarks*/
+#define FN_STAT_BOOKMARK (FN_STAT + 8) /* For Popup Bookmarks*/
/*--------------------------------------------------------------------
- Bereich: Seitenvorschau
+ Region: Page preview
--------------------------------------------------------------------*/
#define FN_SHOW_TWO_PAGES (FN_PGPREVIEW + 1)
-//already in svx/svxids.hrc
#ifndef FN_SHOW_MULTIPLE_PAGES
#define FN_SHOW_MULTIPLE_PAGES (FN_PGPREVIEW + 2)
#endif
@@ -1241,7 +1168,7 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_SHOW_BOOKVIEW (FN_PGPREVIEW + 5)
/*--------------------------------------------------------------------
- Bereich: Rahmenattribute
+ Region: Setting Attributes
--------------------------------------------------------------------*/
#define FN_OPAQUE (FN_FRAME + 1)
@@ -1260,13 +1187,10 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_IID_COLRIGHT (FN_FRAME + 17)
#define FN_SET_FRM_ALT_NAME (FN_FRAME + 18)
-// --> OD 2009-07-13 #i73249#
#define FN_UNO_TITLE (FN_FRAME + 19)
#define FN_UNO_DESCRIPTION (FN_FRAME + 20)
-// <--
-
-//Member-Ids fuer Fill/SetVariable an Items
+//Member IDs for Fill / SetVariable of items
#define MID_STYLE 0xe0
#define MID_PWIDTH 0xe1
#define MID_ADJUST 0xe2
@@ -1300,11 +1224,11 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define SID_SW_DOCMAN_PATH (SID_OFASLOTS_START + 6)
#endif
-// defines fuer Event-Zuweisung per Macro
+// defines for Event-assignments per Macro
#define MAC_EVENT_MOUSEOVER 0x01 //
-#define MAC_EVENT_MOUSECLICK 0x02 // Hyperlink ausloesen
+#define MAC_EVENT_MOUSECLICK 0x02 //
#define MAC_EVENT_MOUSEOUT 0x03 //
-#define MAC_EVENT_OBJECT_SELECT 0x04 // Obj. selektieren
+#define MAC_EVENT_OBJECT_SELECT 0x04 //
#define MAC_EVENT_KEYINPUT_ALPHA 0x05 //
#define MAC_EVENT_KEYINPUT_NOALPHA 0x06 //
#define MAC_EVENT_FRM_RESIZE 0x07 //
@@ -1314,3 +1238,5 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define MAC_EVENT_IMAGE_ERROR 0x0b //
#endif /* INCLUDED_SW_CMDID_H */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/colwd.hxx b/sw/inc/colwd.hxx
index 54df3b1b9f24..f42fe3c2b695 100644
--- a/sw/inc/colwd.hxx
+++ b/sw/inc/colwd.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <svx/stddlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
@@ -60,3 +59,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/comcore.hrc b/sw/inc/comcore.hrc
index 981c89ef37db..494baae50466 100644
--- a/sw/inc/comcore.hrc
+++ b/sw/inc/comcore.hrc
@@ -30,7 +30,7 @@
#include "rcid.hrc"
// ---------------
-// die Strings
+// Strings
// ---------------
#define STR_COMCORE_READERROR (RC_COMCORE_BEGIN + 0)
@@ -52,7 +52,7 @@
#define STR_HYPH_TITLE (RC_COMCORE_BEGIN + 16)
#define MSG_DISABLE_UNDO_QUESTION (RC_COMCORE_BEGIN + 17)
#define MSG_DISABLE_READLINE_QUESTION (RC_COMCORE_BEGIN + 18)
-// -> #111827#
+
#define STR_REDLINE_INSERT (RC_COMCORE_BEGIN + 19)
#define STR_REDLINE_DELETE (RC_COMCORE_BEGIN + 20)
#define STR_REDLINE_FORMAT (RC_COMCORE_BEGIN + 21)
@@ -68,8 +68,7 @@
#define STR_REDLINE_MULTIPLE (RC_COMCORE_BEGIN + 31)
#define STR_N_REDLINES (RC_COMCORE_BEGIN + 32)
#define STR_FIELD (RC_COMCORE_BEGIN + 33)
-// <- #111827#
-// -> #115575#
+
#define STR_FRAME (RC_COMCORE_BEGIN + 34)
#define STR_OLE (RC_COMCORE_BEGIN + 35)
#define STR_MATH_FORMULA (RC_COMCORE_BEGIN + 36)
@@ -84,13 +83,8 @@
#define STR_DRAWING_OBJECTS (RC_COMCORE_BEGIN + 45)
#define STR_TABLE_NAME (RC_COMCORE_BEGIN + 46)
#define STR_PARAGRAPH_UNDO (RC_COMCORE_BEGIN + 47)
-// <- #115575#
-// -> PB #146850#
-#define RID_GRAPHIC_REPLACEBMP_HC (RC_COMCORE_BEGIN + 48)
-#define RID_GRAPHIC_ERRORBMP_HC (RC_COMCORE_BEGIN + 49)
-// <- #146850#
-// defines fuer die Autoformat Redline Kommentare
+// defines for the Autoformat Redline Comments
#define STR_AUTOFMTREDL_DEL_EMPTY_PARA 0
#define STR_AUTOFMTREDL_USE_REPLACE 1
#define STR_AUTOFMTREDL_CPTL_STT_WORD 2
@@ -113,7 +107,7 @@
#define STR_AUTOFMTREDL_SET_NUMBULET 19
#define STR_AUTOFMTREDL_DEL_MORELINES 20
#define STR_AUTOFMTREDL_NON_BREAK_SPACE 21
-// !!!!!!!!!!!!!!!!!!!!!!!!!! das Ende immer richtig setzen !!!!!!!!!!!!
+// !!!!!!!!!!!!!!!!!!!!!!!!!! alwats set the correct end !!!!!!!!!!!!
#define STR_AUTOFMTREDL_END 22
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 4ae1650e8538..9d69a0be7f12 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,21 +36,18 @@
#include <IShellCursorSupplier.hxx>
#include "swdllapi.h"
-#include <swtypes.hxx> // fuer SWPOSDOC
-#include <viewsh.hxx> // fuer ViewShell
-#include <calbck.hxx> // fuer SwClient
-#include <cshtyp.hxx> // fuer die CursorShell Typen
-#include <crstate.hxx> // fuer die CursorMove-Staties
+#include <swtypes.hxx> // for SWPOSDOC
+#include <viewsh.hxx> // for ViewShell
+#include <calbck.hxx> // for SwClient
+#include <cshtyp.hxx> // for CursorShell types
+#include <crstate.hxx> // for CursorMove-States
#include <toxe.hxx> // SwTOXSearchDir
-#include <tblsel.hxx> //SwTblSearchType
+#include <tblsel.hxx> // SwTblSearchType
#include <viscrs.hxx>
#include <node.hxx>
#include <tblsel.hxx>
#include <IDocumentMarkAccess.hxx>
-
-// einige Forward Deklarationen
-
class KeyCode;
class SfxItemSet;
class SfxPoolItem;
@@ -75,10 +73,10 @@ class SwCellFrms;
class SwTOXMark;
class SwRedline;
class IBlockCursor;
-class SwCntntNode; // #i23726#
-// --> OD 2008-06-19 #i90516#
+class SwCntntNode;
+
class SwPostItField;
-// <--
+
struct SwPosition;
namespace com { namespace sun { namespace star { namespace util {
@@ -93,7 +91,7 @@ namespace com { namespace sun { namespace star { namespace container {
class XStringKeyMap;
}}}}
-// enum und struktur, um ueber die Doc-Position Informationen zu erfragen
+// enum and struct to get informations via the Doc-Position
struct SwContentAtPos
{
@@ -109,13 +107,13 @@ struct SwContentAtPos
SW_OUTLINE = 0x0040,
SW_TOXMARK = 0x0080,
SW_REFMARK = 0x0100,
- SW_NUMLABEL = 0x0200, // #i23726#
- SW_CONTENT_CHECK = 0x0400, // --> FME 2005-05-13 #i43742# <--
+ SW_NUMLABEL = 0x0200,
+ SW_CONTENT_CHECK = 0x0400,
SW_SMARTTAG = 0x0800,
SW_FORMCTRL = 0x1000
-#ifndef PRODUCT
- ,SW_CURR_ATTRS = 0x4000 // nur zum Debuggen
- ,SW_TABLEBOXVALUE = 0x8000 // nur zum Debuggen
+#if OSL_DEBUG_LEVEL > 1
+ ,SW_CURR_ATTRS = 0x4000 // only for debugging
+ ,SW_TABLEBOXVALUE = 0x8000 // only for debugging
#endif
} eCntntAtPos;
@@ -123,11 +121,11 @@ struct SwContentAtPos
const SwField* pFld;
const SfxPoolItem* pAttr;
const SwRedline* pRedl;
- SwCntntNode * pNode; // #i23726#
+ SwCntntNode * pNode;
const sw::mark::IFieldmark* pFldmark;
} aFnd;
- int nDist; // #i23726#
+ int nDist;
String sStr;
const SwTxtAttr* pFndTxtAttr;
@@ -140,20 +138,18 @@ struct SwContentAtPos
nDist = 0; // #i23726#
}
- // befindet sich der Node in einem geschuetzten Bereich?
sal_Bool IsInProtectSect() const;
bool IsInRTLText()const;
};
-// ReturnWerte von SetCrsr (werden verodert)
-const int CRSR_POSOLD = 0x01, // Cursor bleibt an alter Doc-Position
- CRSR_POSCHG = 0x02; // Position vom Layout veraendert
+// return values of SetCrsr (can be combined via ||)
+const int CRSR_POSOLD = 0x01, // cursor stays at old position
+ CRSR_POSCHG = 0x02; // position changed by the layout
// Helperfunction to resolve backward references in regular expressions
String *ReplaceBackReferences( const com::sun::star::util::SearchOptions& rSearchOpt, SwPaM* pPam );
-// die Cursor - Shell
class SW_DLLPUBLIC SwCrsrShell
: public ViewShell
, public SwModify
@@ -164,50 +160,47 @@ class SW_DLLPUBLIC SwCrsrShell
friend class SwSelPaintRects;
friend class SwChgLinkFlag;
- //Braucht den Crsr als IntrnlCrsr.
+ // requires the Crsr as InternalCrsr
friend sal_Bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
-public: // public, damit defaultet werden kann !!
+public:
- /* ein enum fuer den Aufruf von UpdateCrsr */
+ /* for calling UpdateCrsr */
enum CrsrFlag {
- UPDOWN = (1 << 0), // Up/Down auf Spalte halten
- SCROLLWIN = (1 << 1), // Window Scrollen
- CHKRANGE = (1 << 2), // ueberpruefen von ueberlappenden PaM's
- NOCALRECT = (1 << 3), // CharRect nicht neu berechnen
- READONLY = (1 << 4) // Sichtbar machen trotz Readonly
+ UPDOWN = (1 << 0), // keep Up/Down on columns
+ SCROLLWIN = (1 << 1), // scroll window
+ CHKRANGE = (1 << 2), // check overlapping PaMs
+ NOCALRECT = (1 << 3), // don't recalculate CharRect
+ READONLY = (1 << 4) // make visible in spite of Readonly
};
private:
- SwRect aCharRect; // Char-SRectangle auf dem der Cursor steht
- Point aCrsrHeight; // Hohe&Offset von sichtbaren Cursor
- Point aOldRBPos; // Right/Bottom von letzter VisArea
- // (wird im Invalidate vom Cursor benutzt)
-
+ SwRect aCharRect; // Char-SRectangle on which the cursor is located
+ Point aCrsrHeight; // height & offset from visible Cursor
+ Point aOldRBPos; // Right/Bottom of last VisArea
+ // (used in Invalidate by Cursor)
- // um event. Macro was anhaengt auszufuehren.
Link aFlyMacroLnk; // Link will be called, if the Crsr is set
// into a fly. A macro can be then becalled
Link aChgLnk; // link will be called by every attribut/
// format changes at cursor position.
- Link aGrfArrivedLnk; // Link calls to UI if a grafik is arrived
-
+ Link aGrfArrivedLnk; // Link calls to UI if a graphic is arrived
- SwShellCrsr* pCurCrsr; // der aktuelle Cursor
- SwShellCrsr* pCrsrStk; // Stack fuer den Cursor
- SwVisCrsr *pVisCrsr; // der Sichtbare-Cursor
+ SwShellCrsr* pCurCrsr; // current cursor
+ SwShellCrsr* pCrsrStk; // stack for the cursor
+ SwVisCrsr *pVisCrsr; // the visible cursor
IBlockCursor *pBlockCrsr; // interface of cursor for block (=rectangular) selection
- SwShellTableCrsr* pTblCrsr; // Tabellen-Crsr; nur in Tabellen, wenn
- // die Selection ueber 2 Spalten liegt
+ SwShellTableCrsr* pTblCrsr; // table Crsr; only in tables when the
+ // selection lays over 2 columns
- SwNodeIndex* pBoxIdx; // fuers erkennen der veraenderten
- SwTableBox* pBoxPtr; // Tabellen-Zelle
+ SwNodeIndex* pBoxIdx; // for recognizing of the changed
+ SwTableBox* pBoxPtr; // table row
- long nUpDownX; // versuche den Cursor bei Up/Down immer in
- // der gleichen Spalte zu bewegen
+ long nUpDownX; // try to move the cursor on up/down always
+ // in the same column
long nLeftFrmPos;
sal_uLong nAktNode; // save CursorPos at Start-Action
xub_StrLen nAktCntnt;
@@ -215,44 +208,40 @@ private:
bool bAktSelection;
/*
- * Mit den Methoden SttCrsrMove und EndCrsrMove wird dieser Zaehler
- * Inc-/Decrementiert. Solange der Zaehler ungleich 0 ist, erfolgt
- * auf den akt. Cursor kein Update. Dadurch koennen "komplizierte"
- * Cursorbewegungen (ueber Find()) realisiert werden.
+ * Via the Method SttCrsrMove and EndCrsrMove this counter gets
+ * incremented/decremented. As long as the counter is inequal to 0, the
+ * current Cursor gets no update. This way, "complicated" cursor movements
+ * (via Find()) can be realised.
*/
sal_uInt16 nCrsrMove;
- sal_uInt16 nBasicActionCnt; // Actions, die vom Basic geklammert wurden
- CrsrMoveState eMvState; // Status fuers Crsr-Travelling - GetCrsrOfst
+ sal_uInt16 nBasicActionCnt; // Actions which are parenthesized by Basic
+ CrsrMoveState eMvState; // Status for Crsr-Travelling - GetCrsrOfst
- // --> OD 2008-04-02 #refactorlists#
String sMarkedListId;
int nMarkedListLevel;
- // <--
-
- sal_Bool bHasFocus : 1; // Shell ist in einem Window "aktiv"
- sal_Bool bSVCrsrVis : 1; // SV-Cursor Un-/Sichtbar
- sal_Bool bChgCallFlag : 1; // Attributaenderung innerhalb von
- // Start- und EndAction
- sal_Bool bVisPortChgd : 1; // befindet sich im VisPortChg-Aufruf
- // (wird im Invalidate vom Cursor benutzt)
-
- sal_Bool bCallChgLnk : 1; // Flag fuer abgeleitete Klassen:
- // sal_True -> ChgLnk callen
- // Zugriff nur ueber SwChgLinkFlag
- sal_Bool bAllProtect : 1; // Flag fuer Bereiche
- // sal_True -> alles geschuetzt / versteckt
- sal_Bool bInCMvVisportChgd : 1; // Flag fuer CrsrMoves
- // sal_True -> die Sicht wurde verschoben
- sal_Bool bGCAttr : 1; // sal_True -> es existieren nichtaufgespannte Attr.
- sal_Bool bIgnoreReadonly : 1; // sal_True -> Beim naechsten EndAction trotz
- // Readonly den Crsr sichtbar machen.
- sal_Bool bSelTblCells : 1; // sal_True -> Zellen uebers InputWin selektieren
- sal_Bool bAutoUpdateCells : 1; // sal_True -> Zellen werden autoformatiert
- sal_Bool bBasicHideCrsr : 1; // sal_True -> HideCrsr vom Basic
- sal_Bool bSetCrsrInReadOnly : 1;// sal_True -> Cursor darf in ReadOnly-Bereiche
+
+ sal_Bool bHasFocus : 1; // Shell is "active" in a window
+ sal_Bool bSVCrsrVis : 1; // SV-Cursor visible/invisible
+ sal_Bool bChgCallFlag : 1; // attribute change inside Start- and EndAction
+ sal_Bool bVisPortChgd : 1; // in VisPortChg-Call
+ // (used in Invalidate by the Cursor)
+
+ sal_Bool bCallChgLnk : 1; // flag for derived classes
+ // TRUE -> call ChgLnk
+ // access only via SwChgLinkFlag
+ sal_Bool bAllProtect : 1; // Flag for areas
+ // TRUE -> everything protected / hidden
+ sal_Bool bInCMvVisportChgd : 1; // Flag for CrsrMoves
+ // TRUE -> view was moved
+ sal_Bool bGCAttr : 1; // TRUE -> non expanded attributes exist.
+ sal_Bool bIgnoreReadonly : 1; // TRUE -> make the cursor visible on next
+ // EndAction in spite of Readonly
+ sal_Bool bSelTblCells : 1; // TRUE -> select cells over the InputWin
+ sal_Bool bAutoUpdateCells : 1; // TRUE -> autoformat cells
+ sal_Bool bBasicHideCrsr : 1; // TRUE -> HideCrsr from Basic
+ sal_Bool bSetCrsrInReadOnly : 1;// TRUE -> Cursor is allowed in ReadOnly-Areas
sal_Bool bOverwriteCrsr : 1; // sal_True -> show Overwrite Crsr
- // OD 11.02.2003 #100556# - flag to allow/avoid execution of marcos (default: true)
bool mbMacroExecAllowed : 1;
SW_DLLPRIVATE void UpdateCrsr( sal_uInt16 eFlags
@@ -261,11 +250,8 @@ private:
SW_DLLPRIVATE void _ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing );
- // -> #i27615#
-
/** Mark a certain list level of a certain list
- OD 2008-04-02 #refactorlists#
levels of a certain lists are marked now
@param sListId list Id of the list whose level is marked
@@ -275,7 +261,6 @@ private:
*/
SW_DLLPRIVATE void MarkListLevel( const String& sListId,
const int nLevel );
- // <- #i27615#
// private method(s) accessed from public inline method(s) must be exported.
sal_Bool LeftRight( sal_Bool, sal_uInt16, sal_uInt16, sal_Bool );
@@ -309,17 +294,13 @@ protected:
};
int CompareCursor( CrsrCompareType eType ) const;
- // Setzt alle PaMs in OldNode auf NewPos + Offset
+ // set all PaMs in OldNode to NewPos + Offset
void PaMCorrAbs(const SwNodeIndex &rOldNode, const SwPosition &rNewPos,
const xub_StrLen nOffset = 0 );
- // --> FME 2004-07-30 #i32329# Enhanced table selection
sal_Bool _SelTblRowOrCol( bool bRow, bool bRowSimple = false );
- // <--
- // --> FME 2005-01-31 #i41424# Only update the marked number levels if necessary
bool SetInFrontOfLabel( sal_Bool bNew );
- // <--
void RefreshBlockCursor();
@@ -330,21 +311,20 @@ protected:
public:
TYPEINFO();
SwCrsrShell( SwDoc& rDoc, Window *pWin, const SwViewOption *pOpt = 0 );
- // verkleideter Copy-Constructor
+ // disguised copy constructor
SwCrsrShell( SwCrsrShell& rShell, Window *pWin );
virtual ~SwCrsrShell();
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
- // IShellCursorSupplier
+ // create new cursor and append the old one
virtual SwPaM & CreateNewShellCursor();
virtual SwPaM & GetCurrentShellCursor();
- // neuen Cusror erzeugen und den alten anhaengen
SwPaM * CreateCrsr();
- // loesche den aktuellen Cursor und der folgende wird zum Aktuellen
+ // delete the current cursor and make the following into the current
sal_Bool DestroyCrsr();
- // TableCursor in normale Cursor verwandeln, Tablemode aufheben
+ // transform TableCursor to normal cursor, nullify Tablemode
void TblCrsrToCursor();
// enter block mode, change normal cursor into block cursor
void CrsrToBlockCrsr();
@@ -358,27 +338,26 @@ public:
SwPaM* GetCrsr( sal_Bool bMakeTblCrsr = sal_True ) const;
inline SwCursor* GetSwCrsr( sal_Bool bMakeTblCrsr = sal_True ) const;
- // nur den akt. Cursor returnen
+ // return only the current cursor
SwShellCrsr* _GetCrsr() { return pCurCrsr; }
const SwShellCrsr* _GetCrsr() const { return pCurCrsr; }
- // uebergebenen Cursor anzeigen - fuer UNO
+ // show passed cursor - for UNO
void SetSelection(const SwPaM& rCrsr);
- // alle Cursor aus den ContentNodes entfernen und auf 0 setzen.
- // Wurde aus der FEShell hierher verschoben.
+ // remove all cursors from ContentNodes and set to 0
void ParkCrsr( const SwNodeIndex &rIdx );
- // gebe den akt. Cursor-Stack zurueck.
- // ( Wird in der EditShell beim Loeschen von Inhalten benoetigt! )
+ // return the current cursor stack
+ // (required in EditShell when deleting contents)
inline SwPaM* GetStkCrsr() const;
- // Start der Klammerung, SV-Cursor und selektierte Bereiche hiden
+ // start parenthesing, hide SV-Cursor and selected areas
void StartAction();
- // Ende der Klammerung, SV-Cursor und selektierte Bereiche anzeigen
+ // end parenthesing, show SV-Cursor and selected areas
void EndAction( const sal_Bool bIdleEnd = sal_False );
- // Basiscursortravelling
+ // basic cursor travelling
long GetUpDownX() const { return nUpDownX; }
sal_Bool Left( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual = sal_False )
@@ -398,7 +377,6 @@ public:
sal_Bool MoveColumn( SwWhichColumn, SwPosColumn );
sal_Bool MoveRegion( SwWhichRegion, SwPosRegion );
- // die Suchfunktionen
sal_uLong Find( const com::sun::star::util::SearchOptions& rSearchOpt,
sal_Bool bSearchInNotes,
SwDocPositions eStart, SwDocPositions eEnde,
@@ -417,28 +395,25 @@ public:
const com::sun::star::util::SearchOptions* pSearchOpt = 0,
const SfxItemSet* rReplSet = 0 );
- // Positionieren des Cursors
- // returnt
- // CRSR_POSCHG: wenn der ob der SPoint vom Layout korrigiert wurde.
- // CRSR_POSOLD: wenn der Crsr nicht veraendert wurde
+ // Position the Cursor
+ // return values:
+ // CRSR_POSCHG: when cursor was corrected from SPoint by the layout
+ // CRSR_POSOLD: when the cursor was not changed
int SetCrsr( const Point &rPt, sal_Bool bOnlyText = sal_False, bool bBlock = true );
-
/*
- * Benachrichtung, dass der sichtbare Bereich sich geaendert
- * hat. aVisArea wird neu gesetzt, anschliessend wird
- * gescrollt. Das uebergebene Rectangle liegt auf
- * Pixelgrenzen, um Pixelfehler beim Scrollen zu vermeiden.
+ * Notification that the visible area was changed. aVisArea is reset, then
+ * scrolling is done. The passed Rectangle lays on pixel borders to avoid
+ * pixel errors.
*/
virtual void VisPortChgd( const SwRect & );
/*
- * Virtuelle PaintMethode, damit die Selection nach dem Paint wieder
- * sichtbar wird.
+ * virtual paint method to make selection visible again after Paint
*/
void Paint( const Rectangle & rRect );
- // Bereiche
+ // Areas
inline void SetMark();
inline sal_Bool HasMark();
@@ -455,131 +430,130 @@ public:
void SwapPam();
sal_Bool ChgCurrPam( const Point & rPt,
- sal_Bool bTstOnly = sal_True, //Nur testen, nicht setzen
- sal_Bool bTstHit = sal_False ); //Nur genaue Treffer
+ sal_Bool bTstOnly = sal_True, // test only, don't set
+ sal_Bool bTstHit = sal_False ); // only exact matches
void KillPams();
- // erzeuge eine Kopie vom Cursor und speicher diese im Stack
+ // story a copy of the cursor in the stack
void Push();
/*
- * Loescht einen Cursor (gesteuert durch bOldCrsr)
- * - vom Stack oder ( bOldCrsr = sal_True )
- * - den aktuellen und der auf dem Stack stehende wird zum aktuellen
- *
- * Return: es war auf dem Stack noch einer vorhanden
+ * Delete a cursor (controlled by bOldCrsr)
+ * - from stack or (bOldCrsr = TRUE)
+ * - delete the current one and replace it with the cursor from the
+ * stack
+ * Return: whether there was one left one the stack
*/
sal_Bool Pop( sal_Bool bOldCrsr = sal_True );
/*
- * Verbinde zwei Cursor miteinander.
- * Loesche vom Stack den obersten und setzen dessen Mark im Aktuellen.
+ * Combine 2 Cursors.
+ * Delete the topmost from the stack and move its Mark into the current.
*/
void Combine();
-#if !defined(DBG_UTIL)
+#if OSL_DEBUG_LEVEL > 1
+ void SttCrsrMove();
+ void EndCrsrMove( const sal_Bool bIdleEnd = FALSE );
+#else
void SttCrsrMove() { ++nCrsrMove; StartAction(); }
void EndCrsrMove( const sal_Bool bIdleEnd = sal_False )
{ EndAction( bIdleEnd ); --nCrsrMove; }
-#else
- void SttCrsrMove();
- void EndCrsrMove( const sal_Bool bIdleEnd = sal_False );
#endif
/*
- * Beim Abgeben des Focuses werden die selektierten Bereiche nicht mehr
- * angezeigt; andererseits beim Erhalten des Focuses, werden alle selek-
- * tierten Bereiche wieder angezeigt. (Bereiche muessen neu berechnet
- * werden!)
+ * When the focus is lost the selected ranges are not displayed anymore.
+ * On the other hand, on receiving the focus all selected ranges are displayed again
+ * (ranges must be recalculated!).
*/
sal_Bool HasShFcs() const { return bHasFocus; }
void ShLooseFcs();
void ShGetFcs( sal_Bool bUpdate = sal_True );
- // Methoden zum Anzeigen bzw. Verstecken des sichtbaren Text-Cursors
+ // Methods for displaying or hiding the visible text cursor.
void ShowCrsr();
void HideCrsr();
- // Methoden zum Anzeigen bzw. Verstecken der selektierten Bereiche mit
- // dem sichtbaren Cursor
+ // Methods for displaying or hiding the selected ranges with visible cursor.
void ShowCrsrs( sal_Bool bCrsrVis );
void HideCrsrs();
sal_Bool IsOverwriteCrsr() const { return bOverwriteCrsr; }
void SetOverwriteCrsr( sal_Bool bFlag ) { bOverwriteCrsr = bFlag; }
- // gebe den aktuellen Frame, in dem der Cursor steht, zurueck
+ // Return current frame in which the cursor is placed.
SwCntntFrm *GetCurrFrm( const sal_Bool bCalcFrm = sal_True ) const;
- //sal_True wenn der Crsr wenn der Crsr wegen Readonly gehidet ist,
- //sal_False wenn der arbeitet (trotz Readonly).
+ //TRUE if cursor is hidden because of readonly.
+ //FALSE if it is working despite readonly.
sal_Bool IsCrsrReadonly() const;
- // Cursor steht in etwas geschuetztem oder in die Selektion umspannt
- // etwas geschuetztes.
+
+ // Cursor is placed in something that is protected or selection contains
+ // something that is protected.
sal_Bool HasReadonlySel() const;
- // darf der Cursor in ReadOnlyBereiche?
+
+ // Can the cursor be set to read only ranges?
sal_Bool IsReadOnlyAvailable() const { return bSetCrsrInReadOnly; }
void SetReadOnlyAvailable( sal_Bool bFlag );
sal_Bool IsOverReadOnlyPos( const Point& rPt ) const;
- // Methoden fuer aFlyMacroLnk
+ // Methods for aFlyMacroLnk.
void SetFlyMacroLnk( const Link& rLnk ) { aFlyMacroLnk = rLnk; }
const Link& GetFlyMacroLnk() const { return aFlyMacroLnk; }
- // Methoden geben/aendern den Link fuer die Attribut/Format-Aenderungen
+ // Methods returning/altering link for changes of attributes/formates.
void SetChgLnk( const Link &rLnk ) { aChgLnk = rLnk; }
const Link& GetChgLnk() const { return aChgLnk; }
- // Methoden geben/aendern den Link fuers "Grafik vollstaendig geladen"
+ // Methods returning/altering ling for "graphic completely loaded".
void SetGrfArrivedLnk( const Link &rLnk ) { aGrfArrivedLnk = rLnk; }
const Link& GetGrfArrivedLnk() const { return aGrfArrivedLnk; }
- //ChgLink callen, innerhalb einer Action wird der Ruf verzoegert.
+ //Call ChgLink. When within an action calling will be delayed.
void CallChgLnk();
- // Abfrage, ob der aktuelle Cursor eine Selektion aufspannt,
- // also, ob Mark gesetzt und SPoint und Mark unterschiedlich sind.
+ // Check if the current cursor contains a selection, i.e.
+ // if Mark is set and SPoint and Mark are different.
sal_Bool HasSelection() const;
- // Abfrage, ob ueberhaupt eine Selektion existiert, sprich der akt. Cursor
- // aufgespannt oder nicht der einzigste ist.
+ // Check if a selection exists, i.e. if the current cursor comprises a selection.
inline sal_Bool IsSelection() const;
// returns if multiple cursors are available
inline sal_Bool IsMultiSelection() const;
- // Abfrage, ob ein kompletter Absatz selektiert wurde
+ // Check if a complete paragraph was selected.
sal_Bool IsSelFullPara() const;
- // Abfrage, ob die Selektion in einem Absatz ist
- inline sal_Bool IsSelOnePara() const;
- //Sollte fuer das Clipboard der WaitPtr geschaltet werden.
+ // Check if selection is within one paragraph.
+
+ //Should WaitPtr be activated for Clipboard.
sal_Bool ShouldWait() const;
+ // Check if selection is within one paragraph.
+ inline sal_Bool IsSelOnePara() const;
+
/*
- * liefert das SRectangle, auf dem der Cursor steht.
+ * Returns SRectangle, at which the cursor is located.
*/
const SwRect &GetCharRect() const { return aCharRect; }
/*
- * liefert zurueck, ob der Cursor sich ganz oder teilweise im
- * sichtbaren Bereich befindet.
+ * Returns if cursor is wholly or partly within visible range.
*/
sal_Bool IsCrsrVisible() const { return VisArea().IsOver( GetCharRect() ); }
- // gebe die aktuelle Seitennummer zurueck:
- // sal_True: in der der Cursor steht
- // sal_False: die am oberen Rand sichtbar ist
+ // Return current page number:
+ // TRUE: in which cursor is located.
+ // FALSE: which is visible at the upper margin.
void GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum,
sal_Bool bAtCrsrPos = sal_True, const sal_Bool bCalcFrm = sal_True );
- // bestimme in welche Richtung "leere Seiten" behandelt werden!
- // (wird benutzt im PhyPage.. )
+ // Determine how "empty pages" are handled
+ // (used in PhyPage).
sal_uInt16 GetNextPrevPageNum( sal_Bool bNext = sal_True );
- // setze den Cursor auf die Seite "nPage" an den Anfang
+ // Move cursor at the bginning of page "nPage".
sal_Bool GotoPage( sal_uInt16 nPage );
- // gebe alle Dokumentseiten zurueck
sal_uInt16 GetPageCnt();
- // Gehe zur naechsten Selection
sal_Bool GoNextCrsr();
- // gehe zur vorherigen Selection
+
sal_Bool GoPrevCrsr();
// at CurCrsr.SPoint
@@ -599,21 +573,20 @@ public:
::sw::mark::IFieldmark* GetFieldmarkBefore();
bool GotoFieldmark( const ::sw::mark::IFieldmark* const pMark );
- // aktualisiere den Crsrs, d.H. setze ihn wieder in den Content.
- // Das sollte nur aufgerufen werden, wenn der Cursor z.B. beim
- // Loeschen von Rahmen irgendwohin gesetzt wurde. Die Position
- // ergibt sich aus seiner aktuellen Position im Layout !!
+ // update Cursr, i.e. reset it into content should only be called when the
+ // cursor was set to a random position e.g. when deleting frames
void UpdateCrsrPos();
- // returne den am akt. Cursor selektierten Text. Dieser wird mit
- // Felder etc. aufgefuellt!!
+ // get the selected text at the current cursor. it will be filled with
+ // fields etc.
String GetSelTxt() const;
- // gebe nur den Text ab der akt. Cursor Position zurueck (bis zum NodeEnde)
+ // return only the text starting from the current cursor position (to the
+ // end of the node)
String GetText() const;
- // pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
+ // Check of SPoint or Mark of current cursor are placed within a table.
inline const SwTableNode* IsCrsrInTbl( sal_Bool bIsPtInTbl = sal_True ) const;
- // erfrage die Document - Layout - Position vom akt. Crsr
+
inline Point& GetCrsrDocPos( sal_Bool bPoint = sal_True ) const;
inline sal_Bool IsCrsrPtAtEnd() const;
@@ -622,41 +595,37 @@ public:
sal_Bool IsTblComplex() const;
sal_Bool IsTblComplexForChart();
- // erfrage die akt. TabellenSelektion als Text
+ // get current table selection as text
String GetBoxNms() const;
- // setze Crsr in die naechsten/vorherigen Celle
+ // set Crsr to the next/previous cell
sal_Bool GoNextCell( sal_Bool bAppendLine = sal_True );
sal_Bool GoPrevCell();
- // gehe zu dieser Box (wenn vorhanden und in Tabelle!)
+ // go to this box (if available and inside of table)
sal_Bool GotoTable( const String& rName );
// select a table row, column or box (based on the current cursor)
sal_Bool SelTblRow() { return _SelTblRowOrCol( true ); }
sal_Bool SelTblCol() { return _SelTblRowOrCol( false ); }
sal_Bool SelTblBox();
- // --> FME 2004-07-30 #i32329# Enhanced table selection
+
sal_Bool SelTbl();
- // <--
- // zum naechsten/vorhergehenden Punkt auf gleicher Ebene
sal_Bool GotoNextNum();
sal_Bool GotoPrevNum();
- // zu diesem Gliederungspunkt
sal_Bool GotoOutline( const String& rName );
- // zum naechsten/vorhergehenden oder angegebenen OultineNode
+ // to the next/previous or the given OutlineNode
void GotoOutline( sal_uInt16 nIdx );
- // suche die "Outline-Position" im Nodes-Array vom akt. Kaiptel
+ // find the "outline position" in the nodes array of the current chapter
sal_uInt16 GetOutlinePos( sal_uInt8 nLevel = UCHAR_MAX );
- // selektiere den angeben Bereich von OutlineNodes. Optional
- // inclusive der Childs. Die sal_uInt16 sind die Positionen im
- // OutlineNds-Array!! (EditShell)
+ // select the given range of OutlineNodes. Optionally including the children
+ // the sal_uInt16s are the positions in OutlineNodes-Array (EditShell)
sal_Bool MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos,
sal_Bool bWithChilds = sal_False );
- sal_Bool GotoNextOutline(); // naechster Node mit Outline-Num.
- sal_Bool GotoPrevOutline(); // vorheriger Node mit Outline-Num.
+ sal_Bool GotoNextOutline();
+ sal_Bool GotoPrevOutline();
/** Delivers the current shell cursor
@@ -676,78 +645,72 @@ public:
const SwShellCrsr* getShellCrsr( bool bBlock ) const
{ return (const_cast<SwCrsrShell*>(this))->getShellCrsr( bBlock ); }
- FASTBOOL IsBlockMode() const { return 0 != pBlockCrsr; }
+ bool IsBlockMode() const { return 0 != pBlockCrsr; }
const IBlockCursor* GetBlockCrsr() const { return pBlockCrsr; }
IBlockCursor* GetBlockCrsr() { return pBlockCrsr; }
- // ist der Crsr in einer Tabelle und ist die Selection ueber
- // zwei Spalten
+ // is the Crsr in a table and is the selection over 2 columns
sal_Bool IsTableMode() const { return 0 != pTblCrsr; }
- // erfrage den Tabellen Crsr; ausserhalb von Tabellen immer 0
const SwShellTableCrsr* GetTableCrsr() const { return pTblCrsr; }
SwShellTableCrsr* GetTableCrsr() { return pTblCrsr; }
sal_uInt16 UpdateTblSelBoxes();
- sal_Bool GotoFtnTxt(); // springe aus dem Content zur Fussnote
- sal_Bool GotoFtnAnchor(); // springe aus der Fussnote zum Anker
+ sal_Bool GotoFtnTxt(); // jump from content to footnote
+ sal_Bool GotoFtnAnchor(); // jump from footnote to anchor
sal_Bool GotoPrevFtnAnchor();
sal_Bool GotoNextFtnAnchor();
- sal_Bool GotoFlyAnchor(); // springe aus dem Rahmen zum Anker
- sal_Bool GotoHeaderTxt(); // springe aus dem Content zum Header
- sal_Bool GotoFooterTxt(); // springe aus dem Content zum Footer
- // springe in den Header/Footer des angegebenen oder akt. PageDesc
+ sal_Bool GotoFlyAnchor(); // jump from the frame to the anchor
+ sal_Bool GotoHeaderTxt(); // jump from the content to the header
+ sal_Bool GotoFooterTxt(); // jump from the content to the footer
+ // jump to the header/footer of the given or current PageDesc
sal_Bool SetCrsrInHdFt( sal_uInt16 nDescNo = USHRT_MAX,
sal_Bool bInHeader = sal_True );
// is point of cursor in header/footer. pbInHeader return sal_True if it is
// in a headerframe otherwise in a footerframe
sal_Bool IsInHeaderFooter( sal_Bool* pbInHeader = 0 ) const;
- // springe zum naechsten Verzeichnis [mit dem Namen]
sal_Bool GotoNextTOXBase( const String* = 0 );
- // springe zum vorherigen Verzeichnis [mit dem Namen]
sal_Bool GotoPrevTOXBase( const String* = 0 );
- sal_Bool GotoTOXMarkBase(); // springe zum Verzeichnis vom TOXMark
- // springe zum naechsten (vorherigen) Verzeichniseintrag
+ sal_Bool GotoTOXMarkBase();
+ // jump to the next or previous index entry
sal_Bool GotoNxtPrvTOXMark( sal_Bool bNext = sal_True );
- // Zur naechsten/ vorherigen Verzeichnismarke dieses Typs traveln
+ // jump to the next/previous index mark of this type
const SwTOXMark& GotoTOXMark( const SwTOXMark& rStart, SwTOXSearch eDir );
- // springe zum naechsten (vorherigen) Tabellenformel
- // optional auch nur zu kaputten Formeln springen
+ // jump to the next or previous table formula
+ // optionally only to broken formulas
sal_Bool GotoNxtPrvTblFormula( sal_Bool bNext = sal_True,
sal_Bool bOnlyErrors = sal_False );
// jump to the next / previous hyperlink - inside text and also
// on graphics
sal_Bool SelectNxtPrvHyperlink( sal_Bool bNext = sal_True );
- // springe zu dieser Refmark
sal_Bool GotoRefMark( const String& rRefMark, sal_uInt16 nSubType = 0,
sal_uInt16 nSeqNo = 0 );
- // hole vom Start/Ende der akt. Selection das nte Zeichen
+ // get the nth character from the start or end of the current selection
sal_Unicode GetChar( sal_Bool bEnd = sal_True, long nOffset = 0 );
- // erweiter die akt. Selection am Anfang/Ende um n Zeichen
sal_Bool ExtendSelection( sal_Bool bEnd = sal_True, xub_StrLen nCount = 1 );
- // setze nur den sichtbaren Cursor an die angegebene Dokument-Pos.
- // returnt sal_False: wenn der ob der SPoint vom Layout korrigiert wurde.
- // (wird zum Anzeigen von Drag&Drop/Copy-Cursor benoetigt)
+
+ // Place only the visible cursor at the given position in the document.
+ // Return FALSE if SPoint was corrected by layout.
+ // (This is needed for displaying the Drag&Drop/Copy-Cursor.)
sal_Bool SetVisCrsr( const Point &rPt );
inline void UnSetVisCrsr();
- // springe zum nachsten/vorherigen Feld des entsprechenden Types
+ // jump to the next or previous field of the corresponding type
sal_Bool MoveFldType( const SwFieldType* pFldType, sal_Bool bNext,
sal_uInt16 nSubType = USHRT_MAX,
sal_uInt16 nResType = USHRT_MAX );
- // springe genau zu diesem Feld
sal_Bool GotoFld( const SwFmtFld& rFld );
- // returne die Anzahl der Cursor im Ring (Flag besagt ob man nur
- // aufgepspannte haben will - sprich etwas selektiert ist (Basic))
+ // Return number of cursors in ring (The flag indicates whether
+ // only cursors containing selections are requested).
sal_uInt16 GetCrsrCnt( sal_Bool bAll = sal_True ) const;
- // Char Travelling - Methoden (in crstrvl1.cxx)
+ // Char Travelling - methods (in crstrvl1.cxx)
sal_Bool GoStartWord();
sal_Bool GoEndWord();
sal_Bool GoNextWord();
@@ -759,7 +722,7 @@ public:
sal_Bool SelectWord( const Point* pPt = 0 );
sal_Bool ExpandToSentenceBorders();
- // Position vom akt. Cursor erfragen
+ // get position from current cursor
sal_Bool IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES )const;
sal_Bool IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
sal_Bool IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
@@ -773,35 +736,34 @@ public:
sal_Bool IsAtLeftMargin() const { return IsAtLRMargin( sal_True ); }
sal_Bool IsAtRightMargin(sal_Bool bAPI = sal_False) const { return IsAtLRMargin( sal_False, bAPI ); }
- // loesche alle erzeugten Crsr, setze den Tabellen-Crsr und den letzten
- // Cursor auf seinen TextNode (oder StartNode?).
- // Beim naechsten ::GetCrsr werden sie wieder alle erzeugt.
- // Wird fuers Drag&Drop/ClipBorad-Paste in Tabellen benoetigt.
+ // delete all created cursors, set the table cursor and the last cursor to
+ // its TextNode (or StartNode?)
+ // They all get created on the next ::GetCrsr again
+ // Used for Drag&Drop/Clipboard-Paste in tables
sal_Bool ParkTblCrsr();
- // gibt es nicht aufgespannte Attribute?
+ // Non expanded attributes?
sal_Bool IsGCAttr() const { return bGCAttr; }
void ClearGCAttr() { bGCAttr = sal_False; }
void UpdateAttr() { bGCAttr = sal_True; }
- // ist das gesamte Dokument geschuetzt/versteckt?? (fuer UI,..)
+ // is the whole document protected/hidden (for UI...)
sal_Bool IsAllProtect() const { return bAllProtect; }
#ifdef SW_CRSR_TIMER
- // setze das Flag am VisCrsr, ob dieser ueber Timer getriggert (sal_True)
- // oder direkt (sal_False) angezeigt wird. (default ist Timer getriggert)
+ // Set flag at VisCrsr. Is it triggered by Timer (TRUE) or directly (FALSE).
+ // Default is triggert by Timer.
sal_Bool ChgCrsrTimerFlag( sal_Bool bTimerOn = sal_True );
#endif
sal_Bool BasicActionPend() const { return nBasicActionCnt != nStartAction; }
- // springe zum benannten Bereich
sal_Bool GotoRegion( const String& rName );
- // zeige die aktuelle Selektion an
+ // show the current selection
virtual void MakeSelVisible();
- // setzte den Cursor auf einen NICHT geschuetzten/versteckten Node
+ // set the cursor to a NOT protected/hidden node
sal_Bool FindValidCntntNode( sal_Bool bOnlyText = sal_False );
sal_Bool GetContentAtPos( const Point& rPt,
@@ -809,9 +771,7 @@ public:
sal_Bool bSetCrsr = sal_False,
SwRect* pFldRect = 0 );
- // --> OD 2008-06-19 #i90516#
const SwPostItField* GetPostItFieldAtCursor() const;
- // <--
// get smart tags at point position
void GetSmartTagTerm( const Point& rPt,
@@ -827,7 +787,6 @@ public:
sal_Bool IsPageAtPos( const Point &rPt ) const;
- // Attribut selelktieren
sal_Bool SelectTxtAttr( sal_uInt16 nWhich, sal_Bool bExpand, const SwTxtAttr* pAttr = 0 );
sal_Bool GotoINetAttr( const SwTxtINetFmt& rAttr );
const SwFmtINetFmt* FindINetAttr( const String& rName ) const;
@@ -837,8 +796,8 @@ public:
void ClearTblBoxCntnt();
sal_Bool EndAllTblBoxEdit();
- // wird gerufen, wenn eine Tabellenselektion im UpdateCrsr erzeugt wird,
- // ohne das die UI davon etaws weiss
+ // gets called when a table selection gets created in UpdateCrsr without
+ // the UI knowing of it
virtual void NewCoreSelection();
void SetSelTblCells( sal_Bool bFlag ) { bSelTblCells = bFlag; }
@@ -867,7 +826,6 @@ public:
// remove all invalid cursors
void ClearUpCrsrs();
- // OD 11.02.2003 #100556# - set/get flag to allow/avoid execution of macros
inline void SetMacroExecAllowed( const bool _bMacroExecAllowed )
{
mbMacroExecAllowed = _bMacroExecAllowed;
@@ -877,7 +835,6 @@ public:
return mbMacroExecAllowed;
}
- // #111827#
/**
Returns textual description of the current selection.
@@ -892,7 +849,6 @@ public:
SwRect GetRectOfCurrentChar();
};
-
// Cursor Inlines:
inline SwMoveFnCollection* SwCrsrShell::MakeFindRange(
sal_uInt16 nStt, sal_uInt16 nEnd, SwPaM* pPam ) const
@@ -959,3 +915,5 @@ inline void SwCrsrShell::UnSetVisCrsr()
}
#endif // _CRSRSH_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/crsskip.hxx b/sw/inc/crsskip.hxx
index c89d871c9940..8393174b7837 100644
--- a/sw/inc/crsskip.hxx
+++ b/sw/inc/crsskip.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,3 +41,5 @@ const sal_uInt16 CRSR_SKIP_CELLS = 1;
const sal_uInt16 CRSR_SKIP_HIDDEN = 2;
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx
index cf2e55118ab7..53a449e7e804 100644
--- a/sw/inc/crstate.hxx
+++ b/sw/inc/crstate.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,21 +36,21 @@
enum SwFillMode
{
- FILL_TAB, // default, Auffuellen mit Tabulatoren
- FILL_SPACE, // ... mit Tabulatoren und Spaces
- FILL_MARGIN, // nur links, zentriert, rechts Ausrichten
- FILL_INDENT // durch linken Absatzeinzug
+ FILL_TAB, // default, fill with tabs
+ FILL_SPACE, // fill with spaces and tabs
+ FILL_MARGIN, // only align left, center, right
+ FILL_INDENT // by left paragraph indention
};
struct SwFillCrsrPos
{
- SwRect aCrsr; // Position und Groesse des Shadowcursors
- sal_uInt16 nParaCnt; // Anzahl der einzufuegenden Absaetze
- sal_uInt16 nTabCnt; // Anzahl der Tabs bzw. Groesse des Einzugs
- sal_uInt16 nSpaceCnt; // Anzahl der einzufuegenden Leerzeichen
- sal_uInt16 nColumnCnt; // Anzahl der notwendigen Spaltenumbrueche
- sal_Int16 eOrient; // Absatzausrichtung
- SwFillMode eMode; // Gewuenschte Auffuellregel
+ SwRect aCrsr; // position and size of the ShadowCursor
+ sal_uInt16 nParaCnt; // number of paragraphs to insert
+ sal_uInt16 nTabCnt; // number of tabs respectively size of indentation
+ sal_uInt16 nSpaceCnt; // number of spaces to insert
+ sal_uInt16 nColumnCnt; // number of necessary column breaks
+ sal_Int16 eOrient; // paragraph alignment
+ SwFillMode eMode; // desired fill-up rule
SwFillCrsrPos( SwFillMode eMd = FILL_TAB ) :
nParaCnt( 0 ), nTabCnt( 0 ), nSpaceCnt( 0 ), nColumnCnt( 0 ),
eOrient( com::sun::star::text::HoriOrientation::NONE ), eMode( eMd )
@@ -119,36 +120,35 @@ struct SwSpecialPos
{}
};
-// CrsrTravelling-Staties (fuer GetCrsrOfst)
+// CrsrTravelling-States (for GetCrsrOfst)
enum CrsrMoveState
{
MV_NONE, // default
MV_UPDOWN, // Crsr Up/Down
- MV_RIGHTMARGIN, // an rechten Rand
- MV_LEFTMARGIN, // an linken Rand
- MV_SETONLYTEXT, // mit dem Cursr nur im Text bleiben
- MV_TBLSEL // nicht in wiederholte Headlines
+ MV_RIGHTMARGIN, // at right margin
+ MV_LEFTMARGIN, // at left margin
+ MV_SETONLYTEXT, // stay with the cursor inside text
+ MV_TBLSEL // not in repeated headlines
};
-// struct fuer spaetere Erweiterungen
+// struct for later extensions
struct SwCrsrMoveState
{
- SwFillCrsrPos *pFill; // fuer das automatische Auffuellen mit Tabs etc.
+ SwFillCrsrPos *pFill; // for automatic filling with tabs etc
Sw2LinesPos *p2Lines; // for selections inside/around 2line portions
SwSpecialPos* pSpecialPos; // for positions inside fields
- Point aRealHeight; // enthaelt dann die Position/Hoehe des Cursors
+ Point aRealHeight; // contains then the position/height of the cursor
CrsrMoveState eState;
sal_uInt8 nCursorBidiLevel;
sal_Bool bStop :1;
- sal_Bool bRealHeight :1; // Soll die reale Hoehe berechnet werden?
- sal_Bool bFieldInfo :1; // Sollen Felder erkannt werden?
- sal_Bool bPosCorr :1; // Point musste korrigiert werden
- sal_Bool bFtnNoInfo :1; // Fussnotennumerierung erkannt
- sal_Bool bExactOnly :1; // GetCrsrOfst nur nach Exakten Treffern
- // suchen lassen, sprich niemals in das
- // GetCntntPos laufen.
- sal_Bool bFillRet :1; // wird nur im FillModus temp. genutzt
- sal_Bool bSetInReadOnly :1; // ReadOnlyBereiche duerfen betreten werden
+ sal_Bool bRealHeight :1; // should the real height be calculated?
+ sal_Bool bFieldInfo :1; // should be fields recognized?
+ sal_Bool bPosCorr :1; // Point had to be corrected
+ sal_Bool bFtnNoInfo :1; // recognized footnote numbering
+ sal_Bool bExactOnly :1; // let GetCrsrOfst look for exact matches only,
+ // i.e. never let it run into GetCntntPos
+ sal_Bool bFillRet :1; // only used temporary in FillMode
+ sal_Bool bSetInReadOnly :1; // ReadOnly areas may be entered
sal_Bool bRealWidth :1; // Calculation of the width required
sal_Bool b2Lines :1; // Check 2line portions and fill p2Lines
sal_Bool bNoScroll :1; // No scrolling of undersized textframes
@@ -183,7 +183,7 @@ struct SwCrsrMoveState
b2Lines( sal_False ),
bNoScroll( sal_False ),
bPosMatchesBounds( sal_False ),
- bCntntCheck( sal_False ), // --> FME 2005-05-13 #i43742# <--
+ bCntntCheck( sal_False ), // #i43742#
bInFrontOfLabel( sal_False ), // #i27615#
bInNumPortion(sal_False), // #i26726#
nInNumPostionOffset(0) // #i26726#
@@ -204,7 +204,7 @@ struct SwCrsrMoveState
b2Lines( sal_False ),
bNoScroll( sal_False ),
bPosMatchesBounds( sal_False ),
- bCntntCheck( sal_False ), // --> FME 2005-05-13 #i43742# <--
+ bCntntCheck( sal_False ), // #i43742#
bInFrontOfLabel( sal_False ), // #i27615#
bInNumPortion(sal_False), // #i23726#
nInNumPostionOffset(0) // #i23726#
@@ -215,3 +215,4 @@ struct SwCrsrMoveState
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx
index b015337b4085..a28f146123a0 100644
--- a/sw/inc/cshtyp.hxx
+++ b/sw/inc/cshtyp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,67 +35,64 @@ class SwPaM;
class SwCntntFrm;
class SwLayoutFrm;
-// eine Struktur fuer den SwPaM. In dieser stehen die Methoden-Pointer
-// fuer das richtungsabhaengige Bewegen des Cursors.
+// Structure for SwPaM. Contains the method-pointers for cursor movement.
struct SwMoveFnCollection;
typedef SwMoveFnCollection* SwMoveFn;
-// Type-Definition fuer die CrsrShell
-// Richtungsparameter fuer MovePage ( wird in SwCntntFrm initialisiert )
+// Type definition for CrsrShell.
+// Direction-parameter for MovePage (initialized in SwCntntFrm).
typedef SwLayoutFrm * (*SwWhichPage)( const SwLayoutFrm * );
typedef SwCntntFrm * (*SwPosPage)( const SwLayoutFrm * );
extern SwWhichPage fnPagePrev, fnPageCurr, fnPageNext;
extern SwPosPage fnPageStart, fnPageEnd;
-// Richtungsparameter fuer MovePara ( wird in SwPaM initialisiert )
+// Direction-parameter for MovePara (initialized in SwCntntFrm).
typedef SwMoveFnCollection* SwPosPara;
typedef sal_Bool (*SwWhichPara)( SwPaM&, SwPosPara );
extern SwWhichPara fnParaPrev, fnParaCurr, fnParaNext;
extern SwPosPara fnParaStart, fnParaEnd;
-// Richtungsparameter fuer MoveSection
+// Direction-parameter for MoveSection.
typedef SwMoveFnCollection* SwPosSection;
typedef sal_Bool (*SwWhichSection)( SwPaM&, SwPosSection );
extern SwWhichSection fnSectionPrev, fnSectionCurr, fnSectionNext;
extern SwPosSection fnSectionStart, fnSectionEnd;
-// Richtungsparameter fuer MoveTable
+// Direction-parameter for MoveTable
typedef SwMoveFnCollection* SwPosTable;
typedef sal_Bool (*SwWhichTable)( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
extern SwWhichTable fnTablePrev, fnTableCurr, fnTableNext;
extern SwPosTable fnTableStart, fnTableEnd;
-// Richtungsparameter fuer MoveColumn
+// Direction-parameter for MoveColumn
typedef SwLayoutFrm * (*SwWhichColumn)( const SwLayoutFrm * );
typedef SwCntntFrm * (*SwPosColumn)( const SwLayoutFrm * );
extern SwWhichColumn fnColumnPrev, fnColumnCurr, fnColumnNext;
extern SwPosColumn fnColumnStart, fnColumnEnd;
-// Richtungsparameter fuer MoveRegion (Bereiche!)
+// Direction-parameter for MoveRegion (ranges!)
typedef SwMoveFnCollection* SwPosRegion;
typedef sal_Bool (*SwWhichRegion)( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
extern SwWhichRegion fnRegionPrev, fnRegionCurr, fnRegionNext, fnRegionCurrAndSkip;
extern SwPosRegion fnRegionStart, fnRegionEnd;
-
/*
- * folgende Kombinationen sind erlaubt:
- * - suche einen im Body: -> FND_IN_BODY
- * - suche alle im Body: -> FND_IN_BODYONLY | FND_IN_SELALL
- * - suche in Selectionen: einen / alle -> FND_IN_SEL [ | FND_IN_SELALL ]
- * - suche im nicht Body: einen / alle -> FND_IN_OTHER [ | FND_IN_SELALL ]
- * - suche ueberall alle: -> FND_IN_SELALL
+ * The following combinations are allowed:
+ * - find one in body -> FND_IN_BODY
+ * - find all in body: -> FND_IN_BODYONLY | FND_IN_SELALL
+ * - find in selections: one/all -> FND_IN_SEL [ | FND_IN_SELALL ]
+ * - find not in body: one/all -> FND_IN_OTHER [ | FND_IN_SELALL ]
+ * - find all everywhere -> FND_IN_SELALL
*/
enum FindRanges
{
- FND_IN_BODY = 0x00, // suche "eins" mur im Body-Text
- FND_IN_OTHER = 0x02, // suche "alles" in Footer/Header/Fly...
- FND_IN_SEL = 0x04, // suche in Selectionen
- FND_IN_BODYONLY = 0x08, // suche nur im Body - nur in Verbindung mit
- // FND_IN_SELALL !!!
- FND_IN_SELALL = 0x01 // - alle ( nur im nicht Body und Selectionen)
+ FND_IN_BODY = 0x00, // Find "one" only in body text.
+ FND_IN_OTHER = 0x02, // Find "all" in Footer/Header/Fly...
+ FND_IN_SEL = 0x04, // Find in selections.
+ FND_IN_BODYONLY = 0x08, // Find only in body - only in combination with FND_IN_SELALL !!!
+ FND_IN_SELALL = 0x01 // All (only in non-body and selections).
};
@@ -117,3 +115,5 @@ SW_DLLPUBLIC SwPosTable GetfnTableStart();
SW_DLLPUBLIC SwPosTable GetfnTableEnd();
#endif // _CSHTYP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx
index 135553da1b64..8273b39ce119 100644
--- a/sw/inc/dbfld.hxx
+++ b/sw/inc/dbfld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,7 @@ class SwTxtFld;
class SwFrm;
/*--------------------------------------------------------------------
- Beschreibung: Datenbankfeld
+ Database field.
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwDBFieldType : public SwValueFieldType
@@ -60,14 +61,13 @@ public:
const String& GetColumnName() const {return sColumn;}
const SwDBData& GetDBData() const {return aDBData;}
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
- Beschreibung:
- von SwFields abgeleitete Klassen. Sie ueberlagern die Expand-Funktion.
- Der Inhalt wird entsprechend dem Format, soweit vorhanden, formatiert.
+ Classes derived from SwFields. They overlay the expand-function.
+ Content is formated according to the format (if available).
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwDBField : public SwValueField
@@ -88,7 +88,7 @@ public:
virtual SwFieldType* ChgTyp( SwFieldType* );
- // Der aktuelle Text
+ // Current text.
inline void SetExpansion(const String& rStr);
virtual sal_uInt16 GetSubType() const;
@@ -96,13 +96,13 @@ public:
virtual String GetFieldName() const;
- // fuer Berechnungen in Ausdruecken
+ // For calculations in expressions.
void ChgValue( double d, sal_Bool bVal );
- // Evaluierung ueber den DBMgr String rauspulen
+ // Get the evaluation via DBMgr string.
void Evaluate();
- // Evaluierung fuer Kopf und Fusszeilen
+ // Evaluation for header and footer.
void ChangeExpansion( const SwFrm*, const SwTxtFld* );
void InitContent();
void InitContent(const String& rExpansion);
@@ -113,7 +113,7 @@ public:
inline void ClearInitialized() { bInitialized = sal_False; }
inline void SetInitialized() { bInitialized = sal_True; }
- // Name erfragen
+ // Get name.
virtual const String& GetPar1() const;
// access to the command string
@@ -124,19 +124,19 @@ public:
// DBName
inline const SwDBData& GetDBData() const { return ((SwDBFieldType*)GetTyp())->GetDBData(); }
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
inline void SwDBField::SetExpansion(const String& rStr)
{ aContent = rStr; }
-// wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
+// set from UpdateExpFlds (the Node-Position is known there)
inline void SwDBField::ChgBodyTxtFlag( sal_Bool bIsInBody )
{ bIsInBodyTxt = bIsInBody; }
/*--------------------------------------------------------------------
- Beschreibung: Basisklasse fuer alle weiteren Datenbankfelder
+ Base class for all other database fields.
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwDBNameInfField : public SwField
@@ -155,19 +155,18 @@ public:
inline const SwDBData& GetRealDBData() { return aDBData; }
SwDBData GetDBData(SwDoc* pDoc);
- void SetDBData(const SwDBData& rDBData); // #111840#
+ void SetDBData(const SwDBData& rDBData);
virtual String GetFieldName() const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
virtual sal_uInt16 GetSubType() const;
virtual void SetSubType(sal_uInt16 nType);
};
-
/*--------------------------------------------------------------------
- Beschreibung: Datenbankfeld Naechster Satz
+ Database field next record.
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwDBNextSetFieldType : public SwFieldType
@@ -178,9 +177,8 @@ public:
virtual SwFieldType* Copy() const;
};
-
/*--------------------------------------------------------------------
- Beschreibung: Naechsten Datensatz mit Bedingung
+ Next data record with condition.
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwDBNextSetField : public SwDBNameInfField
@@ -202,8 +200,8 @@ public:
// Condition
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
inline sal_Bool SwDBNextSetField::IsCondValid() const
@@ -213,7 +211,7 @@ inline void SwDBNextSetField::SetCondValid(sal_Bool bCond)
{ bCondValid = bCond; }
/*--------------------------------------------------------------------
- Beschreibung: Datenbankfeld Naechster Satz
+ Database field next record.
--------------------------------------------------------------------*/
class SwDBNumSetFieldType : public SwFieldType
@@ -224,11 +222,9 @@ public:
virtual SwFieldType* Copy() const;
};
-
/*--------------------------------------------------------------------
- Beschreibung: Datensatz mit Nummer xxx
- Die Nummer steht in nFormat
- ! kleiner Missbrauch
+ Data record with number xxx.
+ Number is in nFormat (bit of a misuse!)
--------------------------------------------------------------------*/
class SwDBNumSetField : public SwDBNameInfField
@@ -251,13 +247,13 @@ public:
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
- // Datensatznummer
+ // Number of data record.
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- // Die Datensatznummer steht in nFormat !!
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ // Number of data record is in nFormat!!
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
inline sal_Bool SwDBNumSetField::IsCondValid() const
@@ -267,7 +263,7 @@ inline void SwDBNumSetField::SetCondValid(sal_Bool bCond)
{ bCondValid = bCond; }
/*--------------------------------------------------------------------
- Beschreibung: Datenbankname
+ Database name.
--------------------------------------------------------------------*/
class SwDBNameFieldType : public SwFieldType
@@ -281,7 +277,7 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: Datenbankfeld
+ Database field.
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwDBNameField : public SwDBNameInfField
@@ -291,12 +287,12 @@ public:
virtual String Expand() const;
virtual SwField* Copy() const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
- Beschreibung: Datensatznummer
+ Number of data record.
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwDBSetNumberFieldType : public SwFieldType
@@ -308,7 +304,7 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: Datenbankfeld
+ Database field.
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwDBSetNumberField : public SwDBNameInfField
@@ -324,8 +320,8 @@ public:
inline long GetSetNumber() const;
inline void SetSetNumber(long nNum);
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
inline long SwDBSetNumberField::GetSetNumber() const
@@ -334,5 +330,6 @@ inline long SwDBSetNumberField::GetSetNumber() const
inline void SwDBSetNumberField::SetSetNumber(long nNum)
{ nNumber = nNum; }
-
#endif // SW_DBFLD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx
index 1a33f41f69d3..fdedacbb5232 100644
--- a/sw/inc/dbgoutsw.hxx
+++ b/sw/inc/dbgoutsw.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,8 +30,9 @@
#ifdef DEBUG
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <tox.hxx>
+#include <cstdio>
class String;
namespace rtl
@@ -80,7 +82,6 @@ SW_DLLPUBLIC const char * dbg_out(const SfxPoolItem & rItem);
SW_DLLPUBLIC const char * dbg_out(const SfxPoolItem * pItem);
SW_DLLPUBLIC const char * dbg_out(const SfxItemSet & rSet);
SW_DLLPUBLIC const char * dbg_out(SwNodes & rNodes);
-// const char * dbg_out(SwOutlineNodes & rNodes);
SW_DLLPUBLIC const char * dbg_out(const SwPosition & rPos);
SW_DLLPUBLIC const char * dbg_out(const SwPaM & rPam);
SW_DLLPUBLIC const char * dbg_out(const SwNodeNum & rNum);
@@ -93,11 +94,11 @@ SW_DLLPUBLIC const char * dbg_out(const SwNumRuleTbl & rTbl);
SW_DLLPUBLIC const char * dbg_out(const SwNodeRange & rRange);
template<typename tKey, typename tMember, typename fHashFunction>
-String lcl_dbg_out(const std::hash_map<tKey, tMember, fHashFunction> & rMap)
+String lcl_dbg_out(const boost::unordered_map<tKey, tMember, fHashFunction> & rMap)
{
String aResult("[", RTL_TEXTENCODING_ASCII_US);
- typename std::hash_map<tKey, tMember, fHashFunction>::const_iterator aIt;
+ typename boost::unordered_map<tKey, tMember, fHashFunction>::const_iterator aIt;
for (aIt = rMap.begin(); aIt != rMap.end(); aIt++)
{
@@ -117,7 +118,7 @@ String lcl_dbg_out(const std::hash_map<tKey, tMember, fHashFunction> & rMap)
}
template<typename tKey, typename tMember, typename fHashFunction>
-const char * dbg_out(const std::hash_map<tKey, tMember, fHashFunction> & rMap)
+const char * dbg_out(const boost::unordered_map<tKey, tMember, fHashFunction> & rMap)
{
return dbg_out(lcl_dbg_out(rMap));
}
@@ -125,3 +126,5 @@ SW_DLLPUBLIC const char * dbg_out(const SwFormToken & rToken);
SW_DLLPUBLIC const char * dbg_out(const SwFormTokens & rTokens);
#endif // DEBUG
#endif // __DBGOUTSW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index bc017ddbec5b..3c16000c5f89 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,19 +86,19 @@ class SwMailMergeConfigItem;
enum DBMgrOptions
{
- DBMGR_MERGE, // Datensaetze in Felder
- DBMGR_INSERT, // Datensaetze in Text
- DBMGR_MERGE_MAILMERGE, // Serienbriefe drucken
- DBMGR_MERGE_MAILING, // Serienbriefe als email versenden
- DBMGR_MERGE_MAILFILES, // Serienbriefe als Datei(en) speichern
- DBMGR_MERGE_DOCUMENTS, // Print merged documents
- DBMGR_MERGE_SINGLE_FILE // save merge as single file
+ DBMGR_MERGE, // Data records in fields.
+ DBMGR_INSERT, // Data records in text.
+ DBMGR_MERGE_MAILMERGE, // Print mail merge.
+ DBMGR_MERGE_MAILING, // Send mail merge as email.
+ DBMGR_MERGE_MAILFILES, // Save mail merg as files.
+ DBMGR_MERGE_DOCUMENTS, // Print merged documents.
+ DBMGR_MERGE_SINGLE_FILE // Save merge as single file.
};
// -----------------------------------------------------------------------
/*--------------------------------------------------------------------
- Beschreibung: (neue) Logische Datenbanken verwalten
+ Administration of (new) logical databases.
--------------------------------------------------------------------*/
#define SW_DB_SELECT_UNKNOWN 0
#define SW_DB_SELECT_TABLE 1
@@ -152,7 +153,7 @@ struct SwMergeDescriptor
SwWrtShell& rSh;
const ::svx::ODataAccessDescriptor& rDescriptor;
String sSaveToFilter; //export filter to save resulting files
- String sSaveToFilterOptions; //
+ String sSaveToFilterOptions;
com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSaveToFilterData;
String sSubject;
@@ -197,13 +198,13 @@ friend class SwConnectionDisposedListener_Impl;
static SwDbtoolsClient* pDbtoolsClient;
- String sEMailAddrFld; // Mailing: Spaltenname der E-Mail Adresse
- String sSubject; // Mailing: Subject
- String sAttached; // Mailing: Attachte Files
+ String sEMailAddrFld; // Mailing: Column name of email address.
+ String sSubject; // Mailing: Subject
+ String sAttached; // Mailing: Attached Files.
sal_uInt16 nMergeType;
- sal_Bool bInitDBFields : 1; // sal_True: Datenbank an Feldern beim Mergen
- sal_Bool bSingleJobs : 1; // Einzelne Druckjobs bei Aufruf aus Basic
- sal_Bool bCancel : 1; // Serienbrief-Save abgebrochen
+ sal_Bool bInitDBFields : 1;
+ sal_Bool bSingleJobs : 1; // Printing job when called from Basic.
+ sal_Bool bCancel : 1; // Mail merge save canceled.
sal_Bool bInMerge : 1; //merge process active
sal_Bool bMergeSilent : 1; // suppress display of dialogs/boxes (used when called over API)
@@ -219,10 +220,10 @@ friend class SwConnectionDisposedListener_Impl;
SW_DLLPRIVATE DECL_LINK( PrtCancelHdl, Button * );
- // Datensaetze als Text ins Dokument einfuegen
+ // Insert data record as text into document.
SW_DLLPRIVATE void ImportFromConnection( SwWrtShell* pSh);
- // Einzelnen Datensatz als Text ins Dokument einfuegen
+ // Insert a single data record as text into document.
SW_DLLPRIVATE void ImportDBEntry(SwWrtShell* pSh);
// merge to file _and_ merge to e-Mail
@@ -234,7 +235,7 @@ public:
SwNewDBMgr();
~SwNewDBMgr();
- // Art des aktellen Mergens. Siehe DBMgrOptions-enum
+ // Current merge type. Cf. DBMgrOptions-enum.
inline sal_uInt16 GetMergeType() const { return nMergeType; }
inline void SetMergeType( sal_uInt16 nTyp ) { nMergeType = nTyp; }
@@ -245,29 +246,28 @@ public:
inline sal_Bool IsMergeSilent() const { return bMergeSilent != 0; }
inline void SetMergeSilent( sal_Bool bVal ) { bMergeSilent = bVal; }
- // Mischen von Datensaetzen in Felder
+ // Merging of data records into fields.
sal_Bool MergeNew( const SwMergeDescriptor& rMergeDesc );
sal_Bool Merge(SwWrtShell* pSh);
- // Datenbankfelder mit fehlendem Datenbankname initialisieren
+ // Initialize data fields that lack name of database.
inline sal_Bool IsInitDBFields() const { return bInitDBFields; }
inline void SetInitDBFields(sal_Bool b) { bInitDBFields = b; }
- // Serienbriefe einzelnd oder alle zusammen drucken/speichern
+ // Print / Save mail merge one by one or all together.
inline sal_Bool IsSingleJobs() const { return bSingleJobs; }
inline void SetSingleJobs(sal_Bool b) { bSingleJobs = b; }
- // Mailing
- // email-Daten setzen
+ // Mailing: Set email data.
inline void SetEMailColumn(const String& sColName) { sEMailAddrFld = sColName; }
inline void SetSubject(const String& sSbj) { sSubject = sSbj; }
inline void SetAttachment(const String& sAtt) { sAttached = sAtt; }
- // Listbox mit allen Tabellennamen einer Datenbank fuellen
+ // Fill listbox with all table names of a database.
sal_Bool GetTableNames(ListBox* pListBox, const String& rDBName );
- // Listbox mit allen Spaltennamen einer Datenbanktabelle fuellen
+ // Fill listbox with all column names of a database table.
sal_Bool GetColumnNames(ListBox* pListBox,
const String& rDBName, const String& rTableName, sal_Bool bAppend = sal_False);
sal_Bool GetColumnNames(ListBox* pListBox,
@@ -396,3 +396,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index 2afc70221e3d..29b4327ab2ae 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -28,8 +28,6 @@
#ifndef _DBUI_HRC
#define _DBUI_HRC
-// #include *****************************************************************
-
#include "rcid.hrc"
// Dialoge --------------------------------------------------------------------
@@ -85,7 +83,7 @@
// Bitmaps ------------------------------------------------------------------
-// Elemente -----------------------------------------------------------------
+// Elements -----------------------------------------------------------------
#define TLB_DBLIST 1
#define BTN_OK 2
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index 7d5fec3e37c0..07044bce0182 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,14 +29,10 @@
#define _DCONTACT_HXX
#include <svx/svdobj.hxx>
-// OD 14.05.2003 #108784#
#include <svx/svdovirt.hxx>
-// OD 2004-01-16 #110582#
#include <swtypes.hxx>
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
-
-// OD 17.06.2003 #108784#
#include <list>
#include "calbck.hxx"
@@ -50,20 +47,17 @@ class SwVirtFlyDrawObj;
class SwFmtAnchor;
class SwFlyDrawObj;
class SwRect;
-// OD 17.06.2003 #108784# - forward declaration for class <SwDrawVirtObj>
+// forward declaration for class <SwDrawVirtObj>
class SwDrawContact;
-// OD 2004-01-16 #110582#
struct SwPosition;
class SwIndex;
-// OD 2004-03-25 #i26791#
#include <anchoreddrawobject.hxx>
-//Der Umgekehrte Weg: Sucht das Format zum angegebenen Objekt.
-//Wenn das Object ein SwVirtFlyDrawObj ist so wird das Format von
-//selbigem besorgt.
-//Anderfalls ist es eben ein einfaches Zeichenobjekt. Diese hat einen
-//UserCall und der ist Client vom gesuchten Format.
-//Implementierung in dcontact.cxx
+// The other way round: Search format for given object.
+// If object is a SwVirtFlyDrawObj the format will be obtained from it.
+// If not it is a simple DrawObject. It has a UserCall which
+// is client of the format we are looking for.
+// Implementation in dcontact.cxx.
SW_DLLPUBLIC SwFrmFmt *FindFrmFmt( SdrObject *pObj );
inline const SwFrmFmt *FindFrmFmt( const SdrObject *pObj )
{ return ::FindFrmFmt( (SdrObject*)pObj ); }
@@ -71,33 +65,29 @@ sal_Bool HasWrap( const SdrObject* pObj );
void setContextWritingMode( SdrObject* pObj, SwFrm* pAnchor );
-//Bei Aenderungen das Objekt aus dem ContourCache entfernen.
-//Implementierung in TxtFly.Cxx
+// When changes occur remove object from ContourCache.
+// Implementation in TxtFly.cxx.
void ClrContourCache( const SdrObject *pObj );
-// liefert BoundRect inklusive Abstand
-// --> OD 2006-08-15 #i68520# - change naming
+// Returns BoundRect plus distance.
SwRect GetBoundRectOfAnchoredObj( const SdrObject* pObj );
-// <--
-//Liefert den UserCall ggf. vom Gruppenobjekt
-// OD 2004-03-31 #i26791# - change return type
+// Returns UserCall of goup object (if applicable).
SwContact* GetUserCall( const SdrObject* );
-// liefert sal_True falls das SrdObject ein Marquee-Object (Lauftext) ist
+// Returns TRUE if the SrdObject is a Marquee object.
sal_Bool IsMarqueeTextObj( const SdrObject& rObj );
-//Basisklasse fuer die folgenden KontaktObjekte (Rahmen+Zeichenobjekte)
+// Base class for the following contact objects (frame + draw objects).
class SwContact : public SdrObjUserCall, public SwClient
{
- // OD 05.09.2003 #112039# - boolean, indicating destruction of contact object
+ // boolean, indicating destruction of contact object
// important note: boolean has to be set at the beginning of each destructor
// in the subclasses using method <SetInDTOR()>.
bool mbInDTOR;
/** method to move object to visible/invisible layer
- OD 21.08.2003 #i18447#
Implementation for the public method <MoveObjToVisibleLayer(..)>
and <MoveObjToInvisibleLayer(..)>
If object is in invisble respectively visible layer, its moved to
@@ -107,7 +97,6 @@ class SwContact : public SdrObjUserCall, public SwClient
aren't on the same layer as the group object, and
<SdrObjGroup::SetLayer(..)|NbcSetLayer(..)> sets also the layer of
the members.
- OD 2004-01-15 #110582# - moved from subclass <SwDrawContact>
@author OD
@@ -123,22 +112,18 @@ class SwContact : public SdrObjUserCall, public SwClient
SdrObject* _pDrawObj );
protected:
- // OD 05.09.2003 #112039# - accessor to set member <mbInDTOR>
void SetInDTOR();
public:
TYPEINFO();
- //Fuer den Reader, es wir nur die Verbindung hergestellt.
+ //For reader. Only the connection is created.
SwContact( SwFrmFmt *pToRegisterIn );
virtual ~SwContact();
- // OD 2004-03-29 #i26791#
virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const = 0;
virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj ) = 0;
- // OD 13.05.2003 #108784# - made methods virtual and not inline
- // OD 2004-04-01 #i26791# - made methods pure virtual
virtual const SdrObject *GetMaster() const = 0;
virtual SdrObject *GetMaster() = 0;
virtual void SetMaster( SdrObject* _pNewMaster ) = 0;
@@ -147,14 +132,11 @@ public:
const SwFrmFmt *GetFmt() const
{ return (const SwFrmFmt*)GetRegisteredIn(); }
- // OD 05.09.2003 #112039# - accessor for member <mbInDTOR>
bool IsInDTOR() const;
/** method to move drawing object to corresponding visible layer
- OD 21.08.2003 #i18447#
uses method <_MoveObjToLayer(..)>
- OD 2004-01-15 #110582# - moved from subclass <SwDrawContact> and made virtual
@author OD
@@ -165,9 +147,7 @@ public:
/** method to move drawing object to corresponding invisible layer
- OD 21.08.2003 #i18447#
uses method <_MoveObjToLayer(..)>
- OD 2004-01-15 #110582# - moved from subclass <SwDrawContact> and made virtual.
@author OD
@@ -177,11 +157,11 @@ public:
virtual void MoveObjToInvisibleLayer( SdrObject* _pDrawObj );
// -------------------------------------------------------------------------
- // OD 2004-01-16 #110582# - some virtual helper methods for information
+ // some virtual helper methods for information
// about the object (Writer fly frame resp. drawing object)
const SwFmtAnchor& GetAnchorFmt() const
{
- ASSERT( GetFmt(),
+ OSL_ENSURE( GetFmt(),
"<SwContact::GetAnchorFmt()> - no frame format -> crash" );
return GetFmt()->GetAnchor();
@@ -196,7 +176,7 @@ public:
const SwPosition& GetCntntAnchor() const
{
- ASSERT( GetAnchorFmt().GetCntntAnchor(),
+ OSL_ENSURE( GetAnchorFmt().GetCntntAnchor(),
"<SwContact::GetCntntAnchor()> - no content anchor -> crash" );
return *(GetAnchorFmt().GetCntntAnchor());
@@ -208,41 +188,30 @@ public:
/** get data collection of anchored objects, handled by with contact
- OD 2004-08-23 #110810#
-
- @author
*/
virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const = 0;
/** get minimum order number of anchored objects handled by with contact
- OD 2004-08-24 #110810#
-
- @author
*/
sal_uInt32 GetMinOrdNum() const;
/** get maximum order number of anchored objects handled by with contact
- OD 2004-08-24 #110810#
-
- @author
*/
sal_uInt32 GetMaxOrdNum() const;
};
-//KontactObjekt fuer die Verbindung zwischen Rahmen bzw. deren Formaten
-//im StarWriter (SwClient) und den Zeichenobjekten des Drawing (SdrObjUserCall)
+// ContactObject for connection between frames (or their formats respectively)
+// in SwClient and the drawobjects of Drawing (DsrObjUserCall).
class SW_DLLPUBLIC SwFlyDrawContact : public SwContact
{
private:
- // OD 2004-04-01 #i26791#
SwFlyDrawObj* mpMasterObj;
/** method to determine new order number for new instance of <SwVirtFlyDrawObj>
- OD 2004-08-16 #i27030#
Used in method <CreateNewRef(..)>.
@author OD
@@ -252,46 +221,40 @@ private:
public:
TYPEINFO();
- //Legt das DrawObjekt an und meldet es beim Model an.
+ // Creates DrawObject and registers it with the Model.
SwFlyDrawContact( SwFlyFrmFmt* pToRegisterIn, SdrModel* pMod );
virtual ~SwFlyDrawContact();
- // OD 2004-03-29 #i26791#
virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const;
virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj );
- // OD 2004-04-01 #i26791#
virtual const SdrObject* GetMaster() const;
virtual SdrObject* GetMaster();
virtual void SetMaster( SdrObject* _pNewMaster );
SwVirtFlyDrawObj* CreateNewRef( SwFlyFrm* pFly );
- // virtuelle Methoden von SwClient
+ // virtual methods from SwClient
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
- // OD 2004-01-16 #110582# - override methods to control Writer fly frames,
+ // override methods to control Writer fly frames,
// which are linked, and to assure that all objects anchored at/inside the
// Writer fly frame are also made visible/invisible.
virtual void MoveObjToVisibleLayer( SdrObject* _pDrawObj );
virtual void MoveObjToInvisibleLayer( SdrObject* _pDrawObj );
/** get data collection of anchored objects handled by with contact
-
- OD 2004-08-23 #110810#
-
- @author
*/
virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const;
};
-// OD 16.05.2003 #108784# - new class for re-direct methods calls at a 'virtual'
+// new class for re-direct methods calls at a 'virtual'
// drawing object to its referenced object.
class SwDrawVirtObj : public SdrVirtObj
{
private:
// data for connection to writer layout
- // OD 2004-03-25 #i26791# - anchored drawing object instance for the
+ // anchored drawing object instance for the
// 'virtual' drawing object
SwAnchoredDrawObject maAnchoredDrawObj;
@@ -316,14 +279,12 @@ class SwDrawVirtObj : public SdrVirtObj
virtual ~SwDrawVirtObj();
// access to offset
- // OD 30.06.2003 #108784# - virtual!!!
virtual const Point GetOffset() const;
virtual SdrObject* Clone() const;
virtual void operator=( const SdrObject& rObj );
// connection to writer layout
- // OD 2004-03-29 #i26791#
const SwAnchoredObject* GetAnchoredObj() const;
SwAnchoredObject* AnchoredObj();
const SwFrm* GetAnchorFrm() const;
@@ -340,7 +301,6 @@ class SwDrawVirtObj : public SdrVirtObj
virtual void NbcSetAnchorPos(const Point& rPnt);
- // #108784#
// All overloaded methods which need to use the offset
virtual void RecalcBoundRect();
virtual ::basegfx::B2DPolyPolygon TakeXorPoly() const;
@@ -351,12 +311,12 @@ class SwDrawVirtObj : public SdrVirtObj
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs);
virtual void NbcMirror(const Point& rRef1, const Point& rRef2);
- virtual void NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear);
+ virtual void NbcShear(const Point& rRef, long nWink, double tn, bool bVShear);
virtual void Move(const Size& rSiz);
virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
virtual void Rotate(const Point& rRef, long nWink, double sn, double cs);
virtual void Mirror(const Point& rRef1, const Point& rRef2);
- virtual void Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear);
+ virtual void Shear(const Point& rRef, long nWink, double tn, bool bVShear);
virtual void RecalcSnapRect();
virtual const Rectangle& GetSnapRect() const;
virtual void SetSnapRect(const Rectangle& rRect);
@@ -368,10 +328,8 @@ class SwDrawVirtObj : public SdrVirtObj
virtual Point GetPoint(sal_uInt32 i) const;
virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i);
- // #108784#
- virtual FASTBOOL HasTextEdit() const;
+ virtual bool HasTextEdit() const;
- // OD 17.06.2003 #108784# - overload 'layer' methods
virtual SdrLayerID GetLayer() const;
virtual void NbcSetLayer(SdrLayerID nLayer);
virtual void SetLayer(SdrLayerID nLayer);
@@ -380,43 +338,37 @@ class SwDrawVirtObj : public SdrVirtObj
virtual bool supportsFullDrag() const;
virtual SdrObject* getFullDragClone() const;
- // #i97197#
virtual void SetBoundRectDirty();
virtual const Rectangle& GetCurrentBoundRect() const;
virtual const Rectangle& GetLastBoundRect() const;
};
-// OD 26.06.2003 #108784#
bool CheckControlLayer( const SdrObject *pObj );
-//KontactObjekt fuer die Verbindung von Formaten als Repraesentanten der
-//Zeichenobjekte im StarWriter (SwClient) und den Objekten selbst im Drawing
-//(SdrObjUserCall).
-// --> OD 2006-01-18 #129959#
+// ContactObject for connection of formats as representatives of draw objects
+// in SwClient and the objects themselves in Drawing (SDrObjUserCall).
class NestedUserCallHdl;
-// <--
class SwDrawContact : public SwContact
{
private:
- // OD 2004-03-25 #i26791# - anchored drawing object instance for the
+ // anchored drawing object instance for the
// 'master' drawing object
SwAnchoredDrawObject maAnchoredDrawObj;
- // OD 16.05.2003 #108784# - data structure for collecting 'virtual'
+ // data structure for collecting 'virtual'
// drawing object supporting drawing objects in headers/footers.
std::list<SwDrawVirtObj*> maDrawVirtObjs;
- // OD 2004-04-01 #i26791# - boolean indicating set 'master' drawing
+ // boolean indicating set 'master' drawing
// object has been cleared.
bool mbMasterObjCleared : 1;
- // OD 10.10.2003 #112299# - internal flag to indicate that disconnect
+ // internal flag to indicate that disconnect
// from layout is in progress
bool mbDisconnectInProgress : 1;
- // --> OD 2006-01-18 #129959#
// Needed data for handling of nested <SdrObjUserCall> events in
// method <_Changed(..)>
bool mbUserCallActive : 1;
@@ -425,7 +377,6 @@ class SwDrawContact : public SwContact
SdrUserCallType meEventTypeOfCurrentUserCall;
friend class NestedUserCallHdl;
- // <--
// unary function used by <list> iterator to find a disconnected 'virtual'
// drawing object
@@ -455,41 +406,32 @@ class SwDrawContact : public SwContact
bool operator() ( const SwDrawVirtObj* _pDrawVirtObj );
};
- // OD 16.05.2003 #108784# - method for adding/removing 'virtual' drawing object.
+ // method for adding/removing 'virtual' drawing object.
SwDrawVirtObj* CreateVirtObj();
void DestroyVirtObj( SwDrawVirtObj* pVirtObj );
void RemoveAllVirtObjs();
- // OD 2004-03-31 #i26791#
void _InvalidateObjs( const bool _bUpdateSortedObjsList = false );
- // --> OD 2006-01-23 #124157#
// no copy-constructor and no assignment operator
SwDrawContact( const SwDrawContact& );
SwDrawContact& operator=( const SwDrawContact& );
- // <--
public:
TYPEINFO();
SwDrawContact( SwFrmFmt *pToRegisterIn, SdrObject *pObj );
virtual ~SwDrawContact();
- // OD 2004-03-29 #i26791#
- // --> OD 2005-01-06 #i30669# - no default value for parameter <_pSdrObj>
virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const;
virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj );
- // <--
- // OD 2004-04-01 #i26791#
virtual const SdrObject* GetMaster() const;
virtual SdrObject* GetMaster();
virtual void SetMaster( SdrObject* _pNewMaster );
- // OD 2004-03-29 #i26791#
const SwFrm* GetAnchorFrm( const SdrObject* _pDrawObj = 0L ) const;
SwFrm* GetAnchorFrm( SdrObject* _pDrawObj = 0L );
- // --> OD 2004-06-30 #i28701# - page frame is now stored at member <maAnchoredDrawObj>
inline const SwPageFrm* GetPageFrm() const
{
return maAnchoredDrawObj.GetPageFrm();
@@ -502,23 +444,22 @@ class SwDrawContact : public SwContact
{
return maAnchoredDrawObj.SetPageFrm( _pNewPageFrm );
}
- // <--
void ChkPage();
SwPageFrm* FindPage( const SwRect &rRect );
- //Fuegt das SdrObject in die Arrays (SwPageFrm und SwFrm) des Layouts ein.
- //Der Anker wird Anhand des Attributes SwFmtAnchor bestimmt.
- //Das Objekt wird ggf. beim alten Anker abgemeldet.
+ // Inserts SdrObject in the arrays of the layout ((SwPageFrm and SwFrm).
+ // The anchor is determined according to the attribute SwFmtAnchor.
+ // If required the object gets unregistered with the old anchor.
void ConnectToLayout( const SwFmtAnchor *pAnch = 0 );
- // OD 27.06.2003 #108784# - method to insert 'master' drawing object
+ // method to insert 'master' drawing object
// into drawing page
void InsertMasterIntoDrawPage();
void DisconnectFromLayout( bool _bMoveMasterToInvisibleLayer = true );
- // OD 19.06.2003 #108784# - disconnect for a dedicated drawing object -
+ // disconnect for a dedicated drawing object -
// could be 'master' or 'virtual'.
void DisconnectObjFromLayout( SdrObject* _pDrawObj );
- // OD 26.06.2003 #108784# - method to remove 'master' drawing object
+ // method to remove 'master' drawing object
// from drawing page.
// To be used by the undo for delete of object. Call it after method
// <DisconnectFromLayout( bool = true )> is already performed.
@@ -526,36 +467,32 @@ class SwDrawContact : public SwContact
// drawing object from drawing page.
void RemoveMasterFromDrawPage();
- // OD 19.06.2003 #108784# - get drawing object ('master' or 'virtual')
+ // get drawing object ('master' or 'virtual')
// by frame.
SdrObject* GetDrawObjectByAnchorFrm( const SwFrm& _rAnchorFrm );
- // virtuelle Methoden von SwClient
+ // Virtual methods of SwClient.
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
- // virtuelle Methoden von SdrObjUserCall
+ // Virtual methods of SdrObjUserCall.
virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect);
- // wird von Changed() und auch vom UndoDraw benutzt, uebernimmt
- // das Notifien von Absaetzen, die ausweichen muessen
+ // Used by Changed() and by UndoDraw.
+ // Notifies paragraphs that have to get out of the way.
void _Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle* pOldBoundRect);
- //Moved alle SW-Verbindungen zu dem neuen Master.
+ //Moves all SW-connections to new Master)
void ChangeMasterObject( SdrObject *pNewMaster );
- // OD 19.06.2003 #108784#
SwDrawVirtObj* AddVirtObj();
- // OD 20.06.2003 #108784#
void NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect );
/** get data collection of anchored objects, handled by with contact
-
- OD 2004-08-23 #110810#
-
- @author
*/
virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const;
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx
index 6fb7a76c3728..877377ab3d74 100644
--- a/sw/inc/ddefld.hxx
+++ b/sw/inc/ddefld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,7 @@
class SwDoc;
/*--------------------------------------------------------------------
- Beschreibung: FieldType fuer DDE
+ FieldType for DDE
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwDDEFieldType : public SwFieldType
@@ -63,8 +64,8 @@ public:
virtual SwFieldType* Copy() const;
virtual const String& GetName() const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
String GetCmd() const;
void SetCmd( const String& rStr );
@@ -92,7 +93,7 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: DDE-Feld
+ DDE-field
--------------------------------------------------------------------*/
class SwDDEField : public SwField
@@ -105,14 +106,16 @@ public:
SwDDEField(SwDDEFieldType*);
~SwDDEField();
- // ueber Typen Parameter ermitteln
- // Name kann nicht geaendert werden
+ // Get parameter via types.
+ // Name cannot be changed.
virtual const String& GetPar1() const;
- // Commando
+ // Command
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
};
#endif // SW_DDEFLD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dialog.hrc b/sw/inc/dialog.hrc
index bc11b017e13f..f630cf9d7c41 100644
--- a/sw/inc/dialog.hrc
+++ b/sw/inc/dialog.hrc
@@ -28,8 +28,6 @@
#ifndef _DIALOG_HRC
#define _DIALOG_HRC
-// #include *****************************************************************
-
#include "rcid.hrc"
// Dialoge ******************************************************************
diff --git a/sw/inc/dlelstnr.hxx b/sw/inc/dlelstnr.hxx
index 225f470b44b0..c60f6e7040bf 100644
--- a/sw/inc/dlelstnr.hxx
+++ b/sw/inc/dlelstnr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dobjfac.hxx b/sw/inc/dobjfac.hxx
index 8b25b38bb74b..02078a05b624 100644
--- a/sw/inc/dobjfac.hxx
+++ b/sw/inc/dobjfac.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,3 +46,4 @@ extern SwObjectFactory aSwObjectFactory;
#endif // _DOBJFAC_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 8ac03ff109bd..44480a7012b7 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,21 +46,19 @@
#include <IDocumentLayoutAccess.hxx>
#include <IDocumentTimerAccess.hxx>
#include <IDocumentChartDataProviderAccess.hxx>
-// --> OD 2007-10-26 #i83479#
#include <IDocumentOutlineNodes.hxx>
#include <IDocumentListItems.hxx>
-#include <set>
-// <--
-// --> OD 2008-03-12 #refactorlists#
+
#include <IDocumentListsAccess.hxx>
class SwList;
-// <--
+
#include <IDocumentExternalData.hxx>
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <vcl/timer.hxx>
+#include <sal/macros.h>
#include "swdllapi.h"
#include <swtypes.hxx>
#include <swatrset.hxx>
@@ -70,7 +69,7 @@ class SwList;
#include <chcmprse.hxx>
#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
#include <svx/svdtypes.hxx>
#include <sfx2/objsh.hxx>
#include <svl/style.hxx>
@@ -78,11 +77,9 @@ class SwList;
#include "comphelper/implementationreference.hxx"
#include <com/sun/star/chart2/data/XDataProvider.hpp>
#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
-#ifdef FUTURE_VBA
#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
-#endif
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <stringhash.hxx>
#include <svtools/embedhlp.hxx>
@@ -244,11 +241,11 @@ namespace sfx2 {
class LinkManager;
}
-//PageDescriptor-Schnittstelle, Array hier wegen inlines.
+// PageDescriptor-interface, Array because of inlines.
typedef SwPageDesc* SwPageDescPtr;
SV_DECL_PTRARR_DEL( SwPageDescs, SwPageDescPtr, 4, 4 )
-// forward declartion
+// forward declaration
void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem );
// global function to start grammar checking in the document
@@ -270,13 +267,9 @@ class SW_DLLPUBLIC SwDoc :
public IDocumentLayoutAccess,
public IDocumentTimerAccess,
public IDocumentChartDataProviderAccess,
- // --> OD 2007-10-26 #i83479#
public IDocumentListItems,
public IDocumentOutlineNodes,
- // <--
- // --> OD 2008-03-12 #refactorlists#
public IDocumentListsAccess,
- // <--
public IDocumentExternalData
{
@@ -288,17 +281,17 @@ class SW_DLLPUBLIC SwDoc :
// -------------------------------------------------------------------
::boost::scoped_ptr<SwNodes> m_pNodes; /// document content (Nodes Array)
SwAttrPool* mpAttrPool; // der Attribut Pool
- SwPageDescs aPageDescs; // PageDescriptoren
- Link aOle2Link; // OLE 2.0-Benachrichtigung
+ SwPageDescs aPageDescs; // PageDescriptors
+ Link aOle2Link; // OLE 2.0-notification
/* @@@MAINTAINABILITY-HORROR@@@
Timer should not be members of the model
*/
- Timer aIdleTimer; // der eigene IdleTimer
+ Timer aIdleTimer; // Own IdleTimer
Timer aOLEModifiedTimer; // Timer for update modified OLE-Objecs
SwDBData aDBData; // database descriptor
::com::sun::star::uno::Sequence <sal_Int8 > aRedlinePasswd;
String sTOIAutoMarkURL; // ::com::sun::star::util::URL of table of index AutoMark file
- SvStringsDtor aPatternNms; // Array fuer die Namen der Dokument-Vorlagen
+ SvStringsDtor aPatternNms; // Array for names of document-templates
com::sun::star::uno::Reference<com::sun::star::container::XNameContainer>
xXForms; // container with XForms models
mutable com::sun::star::uno::Reference< com::sun::star::linguistic2::XProofreadingIterator > m_xGCIterator;
@@ -308,80 +301,76 @@ class SW_DLLPUBLIC SwDoc :
const ::boost::scoped_ptr< ::sw::UndoManager > m_pUndoManager;
// -------------------------------------------------------------------
- // die Pointer
- //Defaultformate
+ // Pointer
+ //Default formats.
SwFrmFmt *pDfltFrmFmt;
- SwFrmFmt *pEmptyPageFmt; // Format fuer die Default-Leerseite.
- SwFrmFmt *pColumnContFmt; // Format fuer Spaltencontainer
+ SwFrmFmt *pEmptyPageFmt; // Format for the default empty page
+ SwFrmFmt *pColumnContFmt; // Format for column container
SwCharFmt *pDfltCharFmt;
SwTxtFmtColl *pDfltTxtFmtColl; // Defaultformatcollections
SwGrfFmtColl *pDfltGrfFmtColl;
- SwFrmFmts *pFrmFmtTbl; // Formattabellen
+ SwFrmFmts *pFrmFmtTbl; // Format table
SwCharFmts *pCharFmtTbl;
SwSpzFrmFmts *pSpzFrmFmtTbl;
SwSectionFmts *pSectionFmtTbl;
- SwFrmFmts *pTblFrmFmtTbl; // spz. fuer Tabellen
+ SwFrmFmts *pTblFrmFmtTbl; // For tables
SwTxtFmtColls *pTxtFmtCollTbl; // FormatCollections
SwGrfFmtColls *pGrfFmtCollTbl;
- SwTOXTypes *pTOXTypes; // Verzeichnisse
+ SwTOXTypes *pTOXTypes; // Tables/indices
SwDefTOXBase_Impl * pDefTOXBases; // defaults of SwTOXBase's
- SwRootFrm *pLayout; // Rootframe des spezifischen Layouts.
+ SwRootFrm *pLayout; // Rootframe of the specific layout.
SdrModel *pDrawModel; // StarView Drawing
- SwDocUpdtFld *pUpdtFlds; // Struktur zum Field-Update
- SwFldTypes *pFldTypes; // Feldtypen
- SwNewDBMgr *pNewDBMgr; // Pointer auf den neuen DBMgr fuer
- // Evaluierung der DB-Fields
+ SwDocUpdtFld *pUpdtFlds; // Struct for updating fields
+ SwFldTypes *pFldTypes;
+ SwNewDBMgr *pNewDBMgr; // Pointer to the new DBMgr for
+ // evaluation of DB-fields.
VirtualDevice *pVirDev; // can be used for formatting
SfxPrinter *pPrt; // can be used for formatting
SwPrintData *pPrtData; // Print configuration
- SwDoc *pGlossaryDoc; // Pointer auf das Glossary-Dokument. Dieses
+ SwDoc *pGlossaryDoc; // Pointer to glossary-document.
SwNumRule *pOutlineRule;
SwFtnInfo *pFtnInfo;
SwEndNoteInfo *pEndNoteInfo;
SwLineNumberInfo*pLineNumberInfo;
SwFtnIdxs *pFtnIdxs;
- SwDocStat *pDocStat; // Statistic Informationen
- SvxMacroTableDtor *pMacroTable; // Tabelle der dokumentglobalen Macros
+ SwDocStat *pDocStat; // Statistics information.
+ SvxMacroTableDtor *pMacroTable; // table of macros.
- SwDocShell *pDocShell; // Ptr auf die SfxDocShell vom Doc
+ SwDocShell *pDocShell; // Ptr to SfxDocShell of Doc.
SfxObjectShellLock xTmpDocShell; // A temporary shell that is used to copy OLE-Nodes
- sfx2::LinkManager *pLinkMgr; // Liste von Verknuepften (Grafiken/DDE/OLE)
- SwAutoCorrExceptWord *pACEWord; // fuer die automatische Uebernahme von
- // autokorrigierten Woertern, die "zurueck"
- // verbessert werden
- SwURLStateChanged *pURLStateChgd; // SfxClient fuer Aenderungen in der
- // INetHistory
- SvNumberFormatter *pNumberFormatter; // NumFormatter fuer die Tabellen/Felder
+ sfx2::LinkManager *pLinkMgr; // List of linked stuff (graphics/DDE/OLE).
+
+ SwAutoCorrExceptWord *pACEWord; // For the automated takeover of
+ // auto-corrected words that are "re-corrected".
+ SwURLStateChanged *pURLStateChgd; // SfxClient for changes in INetHistory
+ SvNumberFormatter *pNumberFormatter;// NumFormatter for tables / fields
- mutable SwNumRuleTbl *pNumRuleTbl; // Liste aller benannten NumRules
+ mutable SwNumRuleTbl *pNumRuleTbl; // List of all named NumRules.
// Hash map to find numrules by name
- mutable std::hash_map<String, SwNumRule *, StringHash> maNumRuleMap;
+ mutable boost::unordered_map<String, SwNumRule *, StringHash> maNumRuleMap;
- // --> OD 2008-03-12 #refactorlists#
- typedef std::hash_map< String, SwList*, StringHash > tHashMapForLists;
+ typedef boost::unordered_map< String, SwList*, StringHash > tHashMapForLists;
// container to hold the lists of the text document
tHashMapForLists maLists;
// relation between list style and its default list
tHashMapForLists maListStyleLists;
- // <--
- SwRedlineTbl *pRedlineTbl; // Liste aller Redlines
- String *pAutoFmtRedlnComment; // Kommentar fuer Redlines, die
- // uebers Autoformat eingefuegt werden
+ SwRedlineTbl *pRedlineTbl; // List of all Redlines.
+ String *pAutoFmtRedlnComment; // Comment for Redlines inserted via AutoFormat.
+
SwUnoCrsrTbl *pUnoCrsrTbl;
- SwPagePreViewPrtData *pPgPViewPrtData; // Einzuege/Abstaende fuers
- // Drucken der Seitenansicht
+ SwPagePreViewPrtData *pPgPViewPrtData; // Indenting / spacing for printing of page view.
SwPaM *pExtInputRing;
SwLayouter *pLayouter; // ::com::sun::star::frame::Controller for complex layout formatting
@@ -399,11 +388,9 @@ class SW_DLLPUBLIC SwDoc :
SwChartLockController_Helper *pChartControllerHelper;
// table of forbidden characters of this document
- vos::ORef<SvxForbiddenCharactersTable> xForbiddenCharsTable;
-#ifdef FUTURE_VBA
+ rtl::Reference<SvxForbiddenCharactersTable> xForbiddenCharsTable;
com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > mxVbaEvents;
-#endif
- // --> OD 2007-10-26 #i83479#
+ com::sun::star::uno::Reference<com::sun::star::container::XNameContainer> m_xTemplateToProjectCache;
public:
struct lessThanNodeNum
{
@@ -414,29 +401,31 @@ public:
typedef ::std::set< const SwNodeNum*, lessThanNodeNum > tImplSortedNodeNumList;
private:
tImplSortedNodeNumList* mpListItemsList;
- // <--
::std::auto_ptr< ::sfx2::IXmlIdRegistry > m_pXmlIdRegistry;
// -------------------------------------------------------------------
- // sonstige
-
- sal_uInt16 nAutoFmtRedlnCommentNo; // SeqNo fuers UI-seitige zusammenfassen
- // von AutoFmt-Redlines. Wird vom SwAutoFmt
- // verwaltet!
- sal_uInt16 nLinkUpdMode; // UpdateMode fuer Links
- SwFldUpdateFlags eFldUpdMode; // Mode fuer Felder/Charts automatisch aktualisieren
- RedlineMode_t eRedlineMode; // aktueller Redline Modus
+ // other
+
+ sal_uInt16 nUndoCnt; // Count of Undo Actions.
+ sal_uInt16 nUndoSttEnd; // != 0 -> within parentheses.
+
+ sal_uInt16 nAutoFmtRedlnCommentNo; // SeqNo for conjoining of AutoFmt-Redlines.
+ // by the UI. Managed by SwAutoFmt!
+
+ sal_uInt16 nLinkUpdMode; // UpdateMode for links.
+ SwFldUpdateFlags eFldUpdMode; // Automatically Update Mode for fields/charts.
+ RedlineMode_t eRedlineMode; // Current Redline Mode.
SwCharCompressType eChrCmprType; // for ASIAN: compress punctuation/kana
sal_Int32 mReferenceCount;
sal_Int32 mIdleBlockCount;
- sal_Int8 nLockExpFld; // Wenn != 0 hat UpdateExpFlds() keine Wirkung
+ sal_Int8 nLockExpFld; // If != 0 UpdateExpFlds() has no effect!
/* Draw Model Layer IDs
- * LayerIds, Heaven == ueber dem Dokument
- * Hell == unter dem Dokument
- * Controls == ganz oben
+ * LayerIds, Heaven == above document
+ * Hell == below document
+ * Controls == at the very top
*/
SdrLayerID nHeaven;
SdrLayerID nHell;
@@ -445,58 +434,56 @@ private:
SdrLayerID nInvisibleHell;
SdrLayerID nInvisibleControls;
- bool mbGlossDoc : 1; //sal_True: ist ein Textbaustein Dokument
- bool mbModified : 1; //sal_True: Dokument ist veraendert
- bool mbDtor : 1; //sal_True: ist im SwDoc DTOR
- // leider auch temporaer von
- // SwSwgReader::InLayout(), wenn fehlerhafte
- // Frames geloescht werden muessen
- bool mbPageNums : 1; // TRUE: es gibt virtuelle Seitennummern
- bool mbLoaded : 1; // TRUE: ein geladenes Doc
- bool mbUpdateExpFld : 1; // TRUE: Expression-Felder updaten
- bool mbNewDoc : 1; // TRUE: neues Doc
- bool mbNewFldLst : 1; // TRUE: Felder-Liste neu aufbauen
- bool mbCopyIsMove : 1; // TRUE: Copy ist ein verstecktes Move
- bool mbVisibleLinks : 1; // TRUE: Links werden sichtbar eingefuegt
- bool mbBrowseMode : 1; // TRUE: Dokument im BrowseModus anzeigen
- bool mbInReading : 1; // TRUE: Dokument wird gerade gelesen
- bool mbInXMLImport : 1; // TRUE: During xml import, attribute portion building is not necessary
- bool mbUpdateTOX : 1; // TRUE: nach Dokument laden die TOX Updaten
- bool mbInLoadAsynchron : 1; // TRUE: Dokument wird gerade asynchron geladen
- bool mbHTMLMode : 1; // TRUE: Dokument ist im HTMLMode
- bool mbInCallModified : 1; // TRUE: im Set/Reset-Modified Link
- bool mbIsGlobalDoc : 1; // TRUE: es ist ein GlobalDokument
- bool mbGlblDocSaveLinks : 1; // TRUE: im GlobalDoc. gelinkte Sect. mit speichern
- bool mbIsLabelDoc : 1; // TRUE: es ist ein Etiketten-Dokument
- bool mbIsAutoFmtRedline : 1; // TRUE: die Redlines werden vom Autoformat aufgezeichnet
- bool mbOLEPrtNotifyPending : 1; // TRUE: Printer ist geaendert und beim
- // Erzeugen der ::com::sun::star::sdbcx::View ist eine Benachrichtigung
- // der OLE-Objekte PrtOLENotify() notwendig.
- bool mbAllOLENotify : 1; // True: Benachrichtigung aller Objekte ist notwendig
- bool mbIsRedlineMove : 1; // True: die Redlines werden in/aus der Section verschoben
+ bool mbGlossDoc : 1; //TRUE: glossary document.
+ bool mbModified : 1; //TRUE: document has changed.
+ bool mbDtor : 1; //TRUE: is in SwDoc DTOR.
+ // and unfortunately temorarily also in
+ // SwSwgReader::InLayout() when flawed
+ // frames need deletion.
+ bool mbPageNums : 1; // TRUE: There are virtual page numbers.
+ bool mbLoaded : 1; // TRUE: Doc loaded.
+ bool mbUpdateExpFld : 1; // TRUE: Update expression fields.
+ bool mbNewDoc : 1; // TRUE: new Doc.
+ bool mbNewFldLst : 1; // TRUE: Rebuild field-list.
+ bool mbCopyIsMove : 1; // TRUE: Copy is a hidden Move.
+ bool mbVisibleLinks : 1; // TRUE: Links are inserted visibly.
+ bool mbBrowseMode : 1; // TRUE: Show document in browser mode.
+ bool mbInReading : 1; // TRUE: Document is in the process of being read.
+ bool mbInXMLImport : 1; // TRUE: During xml import, attribute portion building is not necessary.
+ bool mbUpdateTOX : 1; // TRUE: After loading document, update TOX.
+ bool mbInLoadAsynchron : 1; // TRUE: Document is in the process of being loaded asynchronously.
+ bool mbHTMLMode : 1; // TRUE: Document is in HTMLMode.
+ bool mbInCallModified : 1; // TRUE: in Set/Reset-Modified link.
+ bool mbIsGlobalDoc : 1; // TRUE: It's a global document.
+ bool mbGlblDocSaveLinks : 1; // TRUE: Save sections linked in global document.
+ bool mbIsLabelDoc : 1; // TRUE: It's a label document.
+ bool mbIsAutoFmtRedline : 1; // TRUE: Redlines are recorded by Autoformat.
+ bool mbOLEPrtNotifyPending : 1; // TRUE: Printer has changed. At creation of
+ // ::com::sun::star::sdbcx::View
+ // notification of OLE-Objects PrtOLENotify() is required.
+ bool mbAllOLENotify : 1; // True: Notification of all objects is required.
+ bool mbIsRedlineMove : 1; // True: Redlines are moved into to / out of the section.
bool mbInsOnlyTxtGlssry : 1; // True: insert 'only text' glossary into doc
bool mbContains_MSVBasic : 1; // True: MS-VBasic exist is in our storage
bool mbPurgeOLE : 1; // sal_True: Purge OLE-Objects
bool mbKernAsianPunctuation : 1; // sal_True: kerning also for ASIAN punctuation
bool mbReadlineChecked : 1; // sal_True: if the query was already shown
- bool mbLinksUpdated : 1; // OD 2005-02-11 #i38810#
+ bool mbLinksUpdated : 1; // #i38810#
// flag indicating, that the links have been updated.
- bool mbClipBoard : 1; // true: this document represents the clipboard
- bool mbColumnSelection : 1; // true: this content has bee created by a column selection
+ bool mbClipBoard : 1; // TRUE: this document represents the clipboard
+ bool mbColumnSelection : 1; // TRUE: this content has bee created by a column selection
// (clipboard docs only)
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bool mbXMLExport : 1; // sal_True: during XML export
#endif
- // --> OD 2006-03-21 #b6375613#
// Document flag to trigger conversion, which applys the workaround for documents,
// which uses a certain layout defect in OOo 1.x to layout the documents.
// This conversion is performed, when the frames for the layout are created.
// Thus, this document flag has to be set after load a document and before
// creating the document view.
bool mbApplyWorkaroundForB6375613 : 1;
- // <--
//
// COMPATIBILITY FLAGS START
@@ -566,51 +553,55 @@ private:
bool mbAddFlyOffsets : 1;
bool mbAddExternalLeading : 1;
bool mbUseHiResolutionVirtualDevice : 1;
- bool mbOldLineSpacing : 1; // OD 2004-01-06 #i11859#
- bool mbAddParaSpacingToTableCells : 1; // OD 2004-02-16 #106629#
- bool mbUseFormerObjectPos : 1; // OD 2004-03-12 #i11860#
- bool mbUseFormerTextWrapping : 1; // FME 2005-05-11 #108724#
- bool mbConsiderWrapOnObjPos : 1; // OD 2004-05-05 #i28701#
+ bool mbOldLineSpacing : 1; // #i11859#
+ bool mbAddParaSpacingToTableCells : 1;
+ bool mbUseFormerObjectPos : 1; // #i11860#
+ bool mbUseFormerTextWrapping : 1;
+ bool mbConsiderWrapOnObjPos : 1; // #i28701#
// sal_True: object positioning algorithm has consider the wrapping style of // the floating screen objects as given by its attribute 'WrapInfluenceOnObjPos'
+ // floating screen objects as given by its
+ // attribute 'WrapInfluenceOnObjPos'.
bool mbMathBaselineAlignment : 1; // TL 2010-10-29 #i972#
// non-ui-compatibility flags:
- bool mbOldNumbering : 1; // HBRINKM #111955#
- bool mbIgnoreFirstLineIndentInNumbering : 1; // FME 2005-05-30# i47448#
- bool mbDoNotJustifyLinesWithManualBreak : 1; // FME 2005-06-08 #i49277#
- bool mbDoNotResetParaAttrsForNumFont : 1; // FME 2005-08-11 #i53199#
- bool mbTableRowKeep : 1; // FME 2006-02-10 #131283#
- bool mbIgnoreTabsAndBlanksForLineCalculation : 1; // FME 2006-03-01 #i3952#
- bool mbDoNotCaptureDrawObjsOnPage : 1; // OD 2006-03-14 #i62875#
+ bool mbOldNumbering : 1;
+ bool mbIgnoreFirstLineIndentInNumbering : 1; // #i47448#
+ bool mbDoNotJustifyLinesWithManualBreak : 1; // #i49277#
+ bool mbDoNotResetParaAttrsForNumFont : 1; // #i53199#
+ bool mbTableRowKeep : 1;
+ bool mbIgnoreTabsAndBlanksForLineCalculation : 1; // #i3952#
+ bool mbDoNotCaptureDrawObjsOnPage : 1; // #i62875#
bool mbOutlineLevelYieldsOutlineRule : 1;
- bool mbClipAsCharacterAnchoredWriterFlyFrames : 1; // OD 2006-04-13 #b6402800#
- bool mbUnixForceZeroExtLeading : 1; // FME 2006-10-09 #i60945#
- bool mbOldPrinterMetrics : 1; // FME 2007-05-14 #147385#
+ bool mbClipAsCharacterAnchoredWriterFlyFrames : 1;
+ bool mbUnixForceZeroExtLeading : 1; // #i60945#
+ bool mbOldPrinterMetrics : 1;
bool mbTabRelativeToIndent : 1; // #i24363# tab stops relative to indent
bool mbProtectForm : 1;
- bool mbTabAtLeftIndentForParagraphsInList; // OD 2008-06-05 #i89181# - see above
+ bool mbInvertBorderSpacing : 1;
+ bool mbCollapseEmptyCellPara : 1;
+ bool mbTabAtLeftIndentForParagraphsInList; // #i89181# - see above
- // #i78591#
sal_uInt32 n32DummyCompatabilityOptions1;
sal_uInt32 n32DummyCompatabilityOptions2;
//
// COMPATIBILITY FLAGS END
//
- sal_Bool mbStartIdleTimer ; // idle timer mode start/stop
+ sal_Bool mbStartIdleTimer; // idle timer mode start/stop
- static SwAutoCompleteWord *pACmpltWords; // Liste aller Worte fuers AutoComplete
+ static SwAutoCompleteWord *pACmpltWords; // List of all words for AutoComplete
- //---------------- private Methoden ------------------------------
+ //---------------- private methods ------------------------------
void checkRedlining(RedlineMode_t& _rReadlineMode);
+
DECL_LINK( AddDrawUndo, SdrUndoAction * );
// DrawModel
- void DrawNotifyUndoHdl(); // wegen CLOOKs
+ void DrawNotifyUndoHdl(); // Because of CLOOKs
- // nur fuer den internen Gebrauch deshalb privat.
- // Kopieren eines Bereiches im oder in ein anderes Dokument !
- // Die Position darf nicht im Bereich liegen !!
+ // Only for internal use and therefore private.
+ // Copy a range within the same or to another document.
+ // Position may not lie within range!
bool CopyImpl( SwPaM&, SwPosition&, const bool MakeNewFrms /*= true */,
const bool bCopyAll, SwPaM *const pCpyRng /*= 0*/ ) const;
@@ -630,9 +621,7 @@ private:
const bool bCopyFlyAtFly = false ) const;
sal_Int8 SetFlyFrmAnchor( SwFrmFmt& rFlyFmt, SfxItemSet& rSet, sal_Bool bNewFrms );
- // --> OD 2005-01-13 #i40550#
typedef SwFmt* (SwDoc:: *FNCopyFmt)( const String&, SwFmt*, sal_Bool, sal_Bool );
- // <--
SwFmt* CopyFmt( const SwFmt& rFmt, const SvPtrarr& rFmtArr,
FNCopyFmt fnCopyFmt, const SwFmt& rDfltFmt );
void CopyFmtArr( const SvPtrarr& rSourceArr, SvPtrarr& rDestArr,
@@ -644,18 +633,18 @@ private:
VirtualDevice& CreateVirtualDevice_() const;
SfxPrinter& CreatePrinter_() const;
- void PrtDataChanged(); //Printer oder JobSetup geandert, es muss
- //fuer entsprechende Invalidierungen und
- //Benachrichtigungen gesorgt werden.
+ void PrtDataChanged(); // Printer or JobSetup altered.
+ // Care has to be taken of the necessary
+ // invalidations and notifications.
- // gcc: aFtnInfo::CopyCtor ist private, also muessen wir uns auch schuetzen
+ // gcc: aFtnInfo::CopyCtor is private, therefore we too have to protect ourselves.
SwDoc( const SwDoc &);
- // fuer Felder:
- void _InitFieldTypes(); // wird vom CTOR gerufen!!
+ // For fields:
+ void _InitFieldTypes(); // Called by CTOR!!
void _MakeFldList( int eMode );
- // Datenbankfelder:
+ // Database fields:
void UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc );
void AddUsedDBToList( SvStringsDtor& rDBNameList,
const SvStringsDtor& rUsedDBNames );
@@ -675,22 +664,21 @@ private:
sal_Bool _UnProtectTblCells( SwTable& rTbl );
- // erzeuge Anhand der vorgebenen Collection Teildokumente
- // falls keine angegeben ist, nehme die Kapitelvorlage der 1. Ebene
+ // Create sub-documents according to the given collection.
+ // If no collection is given, take chapter style of the 1st level.
sal_Bool SplitDoc( sal_uInt16 eDocType, const String& rPath,
const SwTxtFmtColl* pSplitColl );
- sal_Bool SplitDoc( sal_uInt16 eDocType, const String& rPath, int nOutlineLevel = 0 ); //#outline level,add by zhaijianwei.
-
+ sal_Bool SplitDoc( sal_uInt16 eDocType, const String& rPath, int nOutlineLevel = 0 );
- // Charts der angegebenen Tabelle updaten
+ // Update charts of given table.
void _UpdateCharts( const SwTable& rTbl, ViewShell& rVSh ) const;
sal_Bool _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry,
sal_uInt16 nMode );
- // unser eigener 'IdlTimer' ruft folgende Methode
+ // Our own 'IdleTimer' calls the following method
DECL_LINK( DoIdleJobs, Timer * );
- // der CharTimer ruft diese Methode
+ // CharTimer calls this method.
DECL_LINK( DoUpdateAllCharts, Timer * );
DECL_LINK( DoUpdateModifiedOLE, Timer * );
@@ -733,8 +721,8 @@ public:
virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value);
virtual const com::sun::star::i18n::ForbiddenCharacters* getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const;
virtual void setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters );
- virtual vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable();
- virtual const vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const;
+ virtual rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable();
+ virtual const rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const;
virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const;
virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode );
virtual SwFldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const;
@@ -857,12 +845,11 @@ public:
virtual void DeleteSection(SwNode* pNode);
virtual bool DeleteRange(SwPaM&);
virtual bool DelFullPara(SwPaM&);
- // --> OD 2009-08-20 #i100466#
// Add optional parameter <bForceJoinNext>, default value <false>
// Needed for hiding of deletion redlines
virtual bool DeleteAndJoin( SwPaM&,
const bool bForceJoinNext = false );
- // <--
+
virtual bool MoveRange(SwPaM&, SwPosition&, SwMoveFlags);
virtual bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags);
virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags);
@@ -972,8 +959,6 @@ public:
virtual SwChartLockController_Helper & GetChartControllerHelper();
/** IDocumentListItems
-
- OD 2007-10-26 #i83479#
*/
virtual void addListItem( const SwNodeNum& rNodeNum );
virtual void removeListItem( const SwNodeNum& rNodeNum );
@@ -984,8 +969,6 @@ public:
virtual void getNumItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const;
/** IDocumentOutlineNodes
-
- OD 2007-11-15 #i83479#
*/
virtual sal_Int32 getOutlineNodesCount() const;
virtual int getOutlineLevel( const sal_Int32 nIdx ) const;
@@ -996,8 +979,6 @@ public:
virtual void getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOutlineNodeList ) const;
/** IDocumentListsAccess
-
- OD 2008-03-26 #refactorlists#
*/
virtual SwList* createList( String sListId,
const String sDefaultListStyleName );
@@ -1006,17 +987,14 @@ public:
virtual SwList* createListForListStyle( const String sListStyleName );
virtual SwList* getListForListStyle( const String sListStyleName ) const;
virtual void deleteListForListStyle( const String sListStyleName );
- // --> OD 2008-07-08 #i91400#
virtual void trackChangeOfListStyleName( const String sListStyleName,
const String sNewListStyleName );
- // <--
/** IDocumentExternalData */
virtual void setExternalData(::sw::tExternalDataType eType,
::sw::tExternalDataPointer pPayload);
virtual ::sw::tExternalDataPointer getExternalData(::sw::tExternalDataType eType);
-
/** INextInterface here
*/
@@ -1027,30 +1005,30 @@ public:
*/
bool IsOLEPrtNotifyPending() const { return mbOLEPrtNotifyPending; }
inline void SetOLEPrtNotifyPending( bool bSet = true );
- void PrtOLENotify( sal_Bool bAll ); //Alle oder nur Markierte
+ void PrtOLENotify( sal_Bool bAll ); //All or only marked
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bool InXMLExport() const { return mbXMLExport; }
void SetXMLExport( bool bFlag ) { mbXMLExport = bFlag; }
#endif
- // liefert zu allen fliegenden Rahmen die Position im Dokument.
- // Wird ein Pam-Pointer uebergeben, muessen die absatzgebundenen
- // FlyFrames von der ::com::sun::star::awt::Selection vollstaendig umschlossen sein
+ // Returns positions of all FlyFrames in the document.
+ // If a Pam-Pointer is passed the FlyFrames attached to paragraphes
+ // have to be surrounded completely by ::com::sun::star::awt::Selection.
// ( Start < Pos < End ) !!!
- // (wird fuer die Writer benoetigt)
+ // (Required for Writers.)
void GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts, const SwPaM* = 0,
sal_Bool bDrawAlso = sal_False ) const;
- // wegen swrtf.cxx und define private public, jetzt hier
+ // Because swrtf.cxx and define private public here now.
SwFlyFrmFmt *MakeFlyFrmFmt (const String &rFmtName, SwFrmFmt *pDerivedFrom);
SwDrawFrmFmt *MakeDrawFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom);
- // JP 08.05.98: fuer Flys muss jetzt diese Schnittstelle benutzt
- // werden. pAnchorPos muss gesetzt sein, wenn keine
- // Seitenbindung vorliegt UND der ::com::sun::star::chaos::Anchor nicht schon
- // im FlySet/FrmFmt mit gueltiger CntntPos gesetzt ist
- /* #109161# new parameter bCalledFromShell
+ // From now on this interface has to be used for Flys.
+ // pAnchorPos must be set, if they are not attached to pages AND
+ // ::com::sun::star::chaos::Anchor is not already set at valid CntntPos
+ // in FlySet/FrmFmt.
+ /* new parameter bCalledFromShell
sal_True: An existing adjust item at pAnchorPos is propagated to
the content node of the new fly section. That propagation only
@@ -1079,16 +1057,14 @@ public:
sal_Bool SetFrmFmtToFly( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFmt,
SfxItemSet* pSet = 0, sal_Bool bKeepOrient = sal_False );
- // --> OD 2009-07-20 #i73249#
void SetFlyFrmTitle( SwFlyFrmFmt& rFlyFrmFmt,
const String& sNewTitle );
void SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt,
const String& sNewDescription );
- // <--
/** Footnotes
*/
- // Fussnoten Informationen
+ // Footnote information
const SwFtnInfo& GetFtnInfo() const { return *pFtnInfo; }
void SetFtnInfo(const SwFtnInfo& rInfo);
const SwEndNoteInfo& GetEndNoteInfo() const { return *pEndNoteInfo; }
@@ -1116,14 +1092,10 @@ public:
// count words in pam
void CountWords( const SwPaM& rPaM, SwDocStat& rStat ) const;
-
- /** ???
- */
- // Textbaustein Dokument?
+ // Glossary Document
void SetGlossDoc( bool bGlssDc = true ) { mbGlossDoc = bGlssDc; }
bool IsInsOnlyTextGlossary() const { return mbInsOnlyTxtGlssry; }
- // Abstakt fuellen
void Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, sal_Bool bImpress );
void ChangeAuthorityData(const SwAuthEntry* pNewData);
@@ -1134,16 +1106,16 @@ public:
const Point* pPt = 0 ) const;
sal_Bool IsInVerticalText( const SwPosition& rPos,
const Point* pPt = 0 ) const;
- /** Database ???
- */
- /* Datenbank && DB-Manager */
+ /** Database and DB-Manager
+ */
void SetNewDBMgr( SwNewDBMgr* pNewMgr ) { pNewDBMgr = pNewMgr; }
SwNewDBMgr* GetNewDBMgr() const { return pNewDBMgr; }
void ChangeDBFields( const SvStringsDtor& rOldNames,
const String& rNewName );
void SetInitDBFields(sal_Bool b);
- // Von Feldern verwendete Datenbanken herausfinden
+
+ // Find out which databases are used by fields.
void GetAllUsedDB( SvStringsDtor& rDBNameList,
const SvStringsDtor* pAllDBNames = 0 );
@@ -1164,49 +1136,45 @@ public:
void GetGrfNms( const SwFlyFrmFmt& rFmt, String* pGrfName,
String* pFltName ) const;
- // setze bei allen Flys ohne Namen einen gueltigen (Wird von den Readern
- // nach dem Einlesen gerufen )
+ // Set a valid name for all Flys that have none (Called by Readers after reading).
void SetAllUniqueFlyNames();
- //Zuruecksetzen der Attribute; es werden alle TxtHints und bei
- //vollstaendiger Selektion harte Formatierung (AUTO-Formate) entfernt
- // --> OD 2008-11-28 #i96644#
- // introduce new optional parameter <bSendDataChangedEvents> in order to
+ // Reset attributes. All TxtHints and (if completely selected) all hard-
+ // formated stuff (auto-formats) are removed.
+ // Introduce new optional parameter <bSendDataChangedEvents> in order to
// control, if the side effect "send data changed events" is triggered or not.
void ResetAttrs( const SwPaM &rRg,
sal_Bool bTxtAttr = sal_True,
const SvUShortsSort* = 0,
const bool bSendDataChangedEvents = true );
- // <--
void RstTxtAttrs(const SwPaM &rRg, sal_Bool bInclRefToxMark = sal_False );
- // Setze das Attribut im angegebenen Format. Ist Undo aktiv, wird
- // das alte in die Undo-History aufgenommen
+ // Set attribute in given format.
+ // If Undo is activated, the old one is listed in Undo-History.
void SetAttr( const SfxPoolItem&, SwFmt& );
void SetAttr( const SfxItemSet&, SwFmt& );
- // --> OD 2008-02-12 #newlistlevelattrs#
// method to reset a certain attribute at the given format
void ResetAttrAtFormat( const sal_uInt16 nWhichId,
SwFmt& rChangedFormat );
- // <--
- // Setze das Attribut als neues default Attribut in diesem Dokument.
- // Ist Undo aktiv, wird das alte in die Undo-History aufgenommen
+ // Set attribute as new default attribute in current document.
+ // If Undo is activated, the old one is listed in Undo-History.
void SetDefault( const SfxPoolItem& );
void SetDefault( const SfxItemSet& );
- // Erfrage das Default Attribut in diesem Dokument.
+ // Query default attribute in this document.
const SfxPoolItem& GetDefault( sal_uInt16 nFmtHint ) const;
- // TextAttribute nicht mehr aufspannen lassen
+
+ // Do not expand text attributes.
sal_Bool DontExpandFmt( const SwPosition& rPos, sal_Bool bFlag = sal_True );
- /* Formate */
+ /* Formats */
const SwFrmFmts* GetFrmFmts() const { return pFrmFmtTbl; }
SwFrmFmts* GetFrmFmts() { return pFrmFmtTbl; }
const SwCharFmts* GetCharFmts() const { return pCharFmtTbl;}
- /* LayoutFormate (Rahmen, DrawObjecte), mal const mal nicht */
+ /* LayoutFormats (frames, DrawObjects), sometimes const sometimes not */
const SwSpzFrmFmts* GetSpzFrmFmts() const { return pSpzFrmFmtTbl; }
SwSpzFrmFmts* GetSpzFrmFmts() { return pSpzFrmFmtTbl; }
@@ -1231,32 +1199,27 @@ public:
SwFrmFmt* FindFrmFmtByName( const String& rName ) const
{ return (SwFrmFmt*)FindFmtByName( (SvPtrarr&)*pFrmFmtTbl, rName ); }
- // --> OD 2005-01-13 #i40550#
SwCharFmt *MakeCharFmt(const String &rFmtName, SwCharFmt *pDerivedFrom,
sal_Bool bBroadcast = sal_False,
sal_Bool bAuto = sal_True );
- // <--
void DelCharFmt(sal_uInt16 nFmt, sal_Bool bBroadcast = sal_False);
void DelCharFmt(SwCharFmt* pFmt, sal_Bool bBroadcast = sal_False);
SwCharFmt* FindCharFmtByName( const String& rName ) const
{ return (SwCharFmt*)FindFmtByName( (SvPtrarr&)*pCharFmtTbl, rName ); }
- /* Formatcollections (Vorlagen) */
+ /* Formatcollections (styles) */
// TXT
const SwTxtFmtColl* GetDfltTxtFmtColl() const { return pDfltTxtFmtColl; }
const SwTxtFmtColls *GetTxtFmtColls() const { return pTxtFmtCollTbl; }
- // --> OD 2005-01-13 #i40550#
SwTxtFmtColl *MakeTxtFmtColl( const String &rFmtName,
SwTxtFmtColl *pDerivedFrom,
sal_Bool bBroadcast = sal_False,
sal_Bool bAuto = sal_True );
- // <--
SwConditionTxtFmtColl* MakeCondTxtFmtColl( const String &rFmtName,
SwTxtFmtColl *pDerivedFrom,
sal_Bool bBroadcast = sal_False);
void DelTxtFmtColl(sal_uInt16 nFmt, sal_Bool bBroadcast = sal_False);
void DelTxtFmtColl( SwTxtFmtColl* pColl, sal_Bool bBroadcast = sal_False );
- // --> OD 2007-11-06 #i62675#
// Add 4th optional parameter <bResetListAttrs>.
// 'side effect' of <SetTxtFmtColl> with <bReset = true> is that the hard
// attributes of the affected text nodes are cleared, except the break
@@ -1267,13 +1230,12 @@ public:
sal_Bool SetTxtFmtColl( const SwPaM &rRg, SwTxtFmtColl *pFmt,
bool bReset = true,
bool bResetListAttrs = false );
- // <--
SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const
{ return (SwTxtFmtColl*)FindFmtByName( (SvPtrarr&)*pTxtFmtCollTbl, rName ); }
void ChkCondColls();
- // GRF
+ // GRF
const SwGrfFmtColl* GetDfltGrfFmtColl() const { return pDfltGrfFmtColl; }
const SwGrfFmtColls *GetGrfFmtColls() const { return pGrfFmtCollTbl; }
SwGrfFmtColl *MakeGrfFmtColl(const String &rFmtName,
@@ -1281,7 +1243,7 @@ public:
SwGrfFmtColl* FindGrfFmtCollByName( const String& rName ) const
{ return (SwGrfFmtColl*)FindFmtByName( (SvPtrarr&)*pGrfFmtCollTbl, rName ); }
- // Tabellen-Formate
+ // Table formating
const SwFrmFmts* GetTblFrmFmts() const { return pTblFrmFmtTbl; }
SwFrmFmts* GetTblFrmFmts() { return pTblFrmFmtTbl; }
sal_uInt16 GetTblFrmFmtCount( sal_Bool bUsed ) const;
@@ -1290,34 +1252,34 @@ public:
void DelTblFrmFmt( SwTableFmt* pFmt );
SwTableFmt* FindTblFmtByName( const String& rName, sal_Bool bAll = sal_False ) const;
- //Rahmenzugriff
- //iterieren ueber Flys - fuer Basic-Collections
+ //Access to frames.
+ //Iterate over Flys - forr Basic-Collections.
sal_uInt16 GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL) const;
SwFrmFmt* GetFlyNum(sal_uInt16 nIdx, FlyCntType eType = FLYCNTTYPE_ALL);
-
- // kopiere die Formate in die eigenen Arrays und returne diese
+ // Copy formats in own arrays and return them.
SwFrmFmt *CopyFrmFmt ( const SwFrmFmt& );
SwCharFmt *CopyCharFmt( const SwCharFmt& );
SwTxtFmtColl* CopyTxtColl( const SwTxtFmtColl& rColl );
SwGrfFmtColl* CopyGrfColl( const SwGrfFmtColl& rColl );
- // ersetze alle Formate mit denen aus rSource
+ // Replace all formats with those from rSource.
void ReplaceStyles( SwDoc& rSource );
- // erfrage ob die Absatz-/Zeichen-/Rahmen-/Seiten - Vorlage benutzt wird
+ // Query if style (paragraph- / character- / frame- / page-) is used.
sal_Bool IsUsed( const SwModify& ) const;
sal_Bool IsUsed( const SwNumRule& ) const;
- // setze den Namen der neu geladenen Dokument-Vorlage
+ // Set name of newly loaded document template.
sal_uInt16 SetDocPattern( const String& rPatternName );
- // gebe den Dok-VorlagenNamen zurueck. !!! Kann auch 0 sein !!!
+
+ // Return name of document template. Can be 0!
String* GetDocPattern( sal_uInt16 nPos ) const { return aPatternNms[nPos]; }
- // Loesche alle nicht referenzierten FeldTypen
- void GCFieldTypes(); // impl. in docfld.cxx
+ // Delete all unreferenced field types.
+ void GCFieldTypes(); // impl. in docfld.cxx
- // akt. Dokument mit Textbausteindokument verbinden/erfragen
+ // Query / connect current document with glossary document.
void SetGlossaryDoc( SwDoc* pDoc ) { pGlossaryDoc = pDoc; }
// travel over PaM Ring
@@ -1336,61 +1298,56 @@ public:
sal_uInt16 GetPageCount() const;
const Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
- //PageDescriptor-Schnittstelle
+ // PageDescriptor interface.
sal_uInt16 GetPageDescCnt() const { return aPageDescs.Count(); }
const SwPageDesc& GetPageDesc( const sal_uInt16 i ) const { return *aPageDescs[i]; }
SwPageDesc* FindPageDescByName( const String& rName,
sal_uInt16* pPos = 0 ) const;
- // kopiere den gesamten PageDesc - ueber Dokumentgrenzen und "tief"!
- // optional kann das kopieren der PoolFmtId, -HlpId verhindert werden
+ // Copy the complete PageDesc - beyond document and "deep"!
+ // Optionally copying of PoolFmtId, -HlpId can be prevented.
void CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
sal_Bool bCopyPoolIds = sal_True );
- // kopiere die Kopzeile (mit dem Inhalt!) aus dem SrcFmt
- // ins DestFmt ( auch ueber Doc grenzen hinaus!)
+ // Copy header (with contents) from SrcFmt to DestFmt
+ // (can also be copied into other document).
void CopyHeader( const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt )
{ CopyPageDescHeaderFooterImpl( true, rSrcFmt, rDestFmt ); }
- // kopiere die Fusszeile (mit dem Inhalt!) aus dem SrcFmt
- // ins DestFmt ( auch ueber Doc grenzen hinaus!)
+
+ // Copy footer (with contents) from SrcFmt to DestFmt.
+ // (can also be copied into other document).
void CopyFooter( const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt )
{ CopyPageDescHeaderFooterImpl( false, rSrcFmt, rDestFmt ); }
- //fuer Reader
+ //For Reader.
SwPageDesc * GetPageDesc( const String & rName );
SwPageDesc& _GetPageDesc( sal_uInt16 i ) const { return *aPageDescs[i]; }
void ChgPageDesc( const String & rName, const SwPageDesc& );
void ChgPageDesc( sal_uInt16 i, const SwPageDesc& );
sal_Bool FindPageDesc( const String & rName, sal_uInt16 * pFound );
- // -> #116530#
void DelPageDesc( const String & rName, sal_Bool bBroadcast = sal_False);
void DelPageDesc( sal_uInt16 i, sal_Bool bBroadcast = sal_False );
- // <- #116530#
- void PreDelPageDesc(SwPageDesc * pDel); // #i7983#
- // -> #116530#
+ void PreDelPageDesc(SwPageDesc * pDel);
sal_uInt16 MakePageDesc( const String &rName, const SwPageDesc* pCpy = 0,
sal_Bool bRegardLanguage = sal_True,
sal_Bool bBroadcast = sal_False);
void BroadcastStyleOperation(String rName, SfxStyleFamily eFamily,
sal_uInt16 nOp);
- // <- #116530#
-
- // --> FME 2005-03-16 #i44963# The html import sometimes overwrites the
+ // The html import sometimes overwrites the
// page sizes set in the page descriptions. This function is used to
// correct this.
void CheckDefaultPageFmt();
- // <--
- // Methoden fuer die Verzeichnisse:
- // - Verzeichnismarke einfuegen loeschen travel
+ // Methods for tables/indices.
+
sal_uInt16 GetCurTOXMark( const SwPosition& rPos, SwTOXMarks& ) const;
void DeleteTOXMark( const SwTOXMark* pTOXMark );
const SwTOXMark& GotoTOXMark( const SwTOXMark& rCurTOXMark,
SwTOXSearch eDir, sal_Bool bInReadOnly );
- // - Verzeichnis einfuegen, und bei Bedarf erneuern
+ //Insert/Renew table/indes.
const SwTOXBaseSection* InsertTableOf( const SwPosition& rPos,
const SwTOXBase& rTOX,
const SfxItemSet* pSet = 0,
@@ -1408,7 +1365,7 @@ public:
sal_Bool SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName);
void SetTOXBaseProtection(const SwTOXBase& rTOXBase, sal_Bool bProtect);
- // nach einlesen einer Datei alle Verzeichnisse updaten
+ // After reading file update all tables/indices.
void SetUpdateTOX( bool bFlag = true ) { mbUpdateTOX = bFlag; }
bool IsUpdateTOX() const { return mbUpdateTOX; }
@@ -1429,7 +1386,7 @@ public:
bool IsInXMLImport() const { return mbInXMLImport; }
void SetInXMLImport( bool bNew ) { mbInXMLImport = bNew; }
- // - Verzeichnis-Typen verwalten
+ // Manage types of tables/indices.
sal_uInt16 GetTOXTypeCount( TOXTypes eTyp ) const;
const SwTOXType* GetTOXType( TOXTypes eTyp, sal_uInt16 nId ) const;
sal_Bool DeleteTOXType( TOXTypes eTyp, sal_uInt16 nId );
@@ -1439,57 +1396,55 @@ public:
const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate = sal_False );
void SetDefaultTOXBase(const SwTOXBase& rBase);
- // - Schluessel fuer die Indexverwaltung
+ // Key for management of index.
sal_uInt16 GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const;
- // Sortieren Tabellen Text
+ // Sort table text.
sal_Bool SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions&);
sal_Bool SortText(const SwPaM&, const SwSortOptions&);
- // korrigiere die im Dokument angemeldeten SwPosition-Objecte,
- // wie z.B. die ::com::sun::star::text::Bookmarks oder die Verzeichnisse.
- // JP 22.06.95: ist bMoveCrsr gesetzt, verschiebe auch die Crsr
+ // Correct the SwPosition-Objects that are registered with the document
+ // e. g. ::com::sun::star::text::Bookmarks or tables/indices.
+ // If bMoveCrsr is set move Crsr too.
- // Setzt alles in rOldNode auf rNewPos + Offset
+ // Set everything in rOldNode on rNewPos + Offset.
void CorrAbs( const SwNodeIndex& rOldNode, const SwPosition& rNewPos,
const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False );
- // Setzt alles im Bereich von [rStartNode, rEndNode] nach rNewPos
+
+ // Set everything in the range of [rStartNode, rEndNode] to rNewPos.
void CorrAbs( const SwNodeIndex& rStartNode, const SwNodeIndex& rEndNode,
const SwPosition& rNewPos, sal_Bool bMoveCrsr = sal_False );
- // Setzt alles im Bereich von rRange nach rNewPos
+
+ // Set everything in this range from rRange to rNewPos.
void CorrAbs( const SwPaM& rRange, const SwPosition& rNewPos,
sal_Bool bMoveCrsr = sal_False );
- // Setzt alles in rOldNode auf relative Pos
+
+ // Set everything in rOldNode to relative Pos.
void CorrRel( const SwNodeIndex& rOldNode, const SwPosition& rNewPos,
const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False );
- // GliederungsRegeln erfragen / setzen
- // --> OD 2005-11-02 #i51089 - TUNING#
+ // Query / set rules for Outline.
inline SwNumRule* GetOutlineNumRule() const
{
return pOutlineRule;
}
- // <--
void SetOutlineNumRule( const SwNumRule& rRule );
void PropagateOutlineRule();
- // Gliederung - hoch-/runterstufen
+ // Outline - promote / demote.
sal_Bool OutlineUpDown( const SwPaM& rPam, short nOffset = 1 );
- // Gliederung - hoch-/runtermoven
+
+ // Ountline - move up / move down.
sal_Bool MoveOutlinePara( const SwPaM& rPam, short nOffset = 1);
- // zu diesem Gliederungspunkt
+
sal_Bool GotoOutline( SwPosition& rPos, const String& rName ) const;
- // die Aenderungen an den Gliederungsvorlagen in die OutlineRule uebernehmen
- // setzt, wenn noch keine Numerierung, sonst wird geaendert
- // arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren
- // --> OD 2005-02-18 #i42921# - re-use unused 3rd parameter
- // --> OD 2008-02-08 #newlistlevelattrs#
+ // Accept changes of outline styles for OUtlineRule.
+ // re-use unused 3rd parameter
// Add optional parameter <bResetIndentAttrs> - default value sal_False.
// If <bResetIndentAttrs> equals true, the indent attributes "before text"
// and "first line indent" are additionally reset at the provided PaM, if
// the list style makes use of the new list level attributes.
- // --> OD 2008-03-17 #refactorlists#
// introduce parameters <bCreateNewList> and <sContinuedListId>
// <bCreateNewList> indicates, if a new list is created by applying the
// given list style.
@@ -1499,20 +1454,8 @@ public:
const String sContinuedListId = String(),
sal_Bool bSetItem = sal_True,
const bool bResetIndentAttrs = false );
- // <--
void SetCounted( const SwPaM&, bool bCounted);
- // --> OD 2009-08-25 #i86492#
- // no longer needed.
- // SwDoc::SetNumRule( rPaM, rNumRule, false, <ListId>, sal_True, true ) have to be used instead.
-// /**
-// Replace numbering rules in a PaM by another numbering rule.
-
-// \param rPaM PaM to replace the numbering rules in
-// \param rNumRule numbering rule to replace the present numbering rules
-// */
-// void ReplaceNumRule(const SwPaM & rPaM, const SwNumRule & rNumRule);
-
void MakeUniqueNumRules(const SwPaM & rPaM);
void SetNumRuleStart( const SwPosition& rPos, sal_Bool bFlag = sal_True );
@@ -1522,7 +1465,6 @@ public:
const SwNumRuleTbl& GetNumRuleTbl() const { return *pNumRuleTbl; }
- // #i36749#
/**
Add numbering rule to document.
@@ -1530,41 +1472,36 @@ public:
*/
void AddNumRule(SwNumRule * pRule);
- // --> OD 2008-02-11 #newlistlevelattrs#
// add optional parameter <eDefaultNumberFormatPositionAndSpaceMode>
sal_uInt16 MakeNumRule( const String &rName,
const SwNumRule* pCpy = 0,
sal_Bool bBroadcast = sal_False,
const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode =
SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
- // <--
sal_uInt16 FindNumRule( const String& rName ) const;
SwNumRule* FindNumRulePtr( const String& rName ) const;
- // loeschen geht nur, wenn die ::com::sun::star::chaos::Rule niemand benutzt!
- // #106897#
+ // Deletion only possible if ::com::sun::star::chaos::Rule is not used!
sal_Bool RenameNumRule(const String & aOldName, const String & aNewName,
sal_Bool bBroadcast = sal_False);
sal_Bool DelNumRule( const String& rName, sal_Bool bBroadCast = sal_False );
String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const;
- void UpdateNumRule(); // alle invaliden Updaten
- // #106897#
+ void UpdateNumRule(); // Update all invalids.
void ChgNumRuleFmts( const SwNumRule& rRule, const String * pOldName = 0 );
sal_Bool ReplaceNumRule( const SwPosition& rPos, const String& rOldRule,
const String& rNewRule );
- // zum naechsten/vorhergehenden Punkt auf gleicher Ebene
+ // Goto next/previous on same level.
sal_Bool GotoNextNum( SwPosition&, sal_Bool bOverUpper = sal_True,
sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 );
sal_Bool GotoPrevNum( SwPosition&, sal_Bool bOverUpper = sal_True,
sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 );
- // #i23731#
/** Searches for a text node with a numbering rule.
- OD 2005-10-24 #i55391# - add optional parameter <bInvestigateStartNode>
- OD 2008-03-18 #refactorlists# - add output parameter <sListId>
+ add optional parameter <bInvestigateStartNode>
+ add output parameter <sListId>
\param rPos position to start search
\param bForward - sal_True: search forward
@@ -1592,31 +1529,29 @@ public:
String& sListId,
const bool bInvestigateStartNode = false );
- // Absaetze ohne Numerierung, aber mit Einzuegen
+ // Paragraphs without numbering but with indents.
sal_Bool NoNum( const SwPaM& );
- // Loeschen, Splitten der Aufzaehlungsliste
+
+ // Delete, splitting of numbering list.
void DelNumRules( const SwPaM& );
// Invalidates all numrules
void InvalidateNumRules();
- // Hoch-/Runterstufen
sal_Bool NumUpDown( const SwPaM&, sal_Bool bDown = sal_True );
- // Bewegt selektierte Absaetze (nicht nur Numerierungen)
- // entsprechend des Offsets. (negativ: zum Doc-Anf.)
+
+ // Move selected paragraphes (not only numberings)
+ // according to offsets. (if negative: go to doc start).
sal_Bool MoveParagraph( const SwPaM&, long nOffset = 1, sal_Bool bIsOutlMv = sal_False );
- // No-/Numerierung ueber Delete/Backspace ein/abschalten #115901#
+
sal_Bool NumOrNoNum( const SwNodeIndex& rIdx, sal_Bool bDel = sal_False);
- // Animation der Grafiken stoppen
+
void StopNumRuleAnimations( OutputDevice* );
- // fuege eine neue Tabelle auf der Position rPos ein. (es
- // wird vor dem Node eingefuegt !!)
- //JP 28.10.96:
- // fuer AutoFormat bei der Eingabe: dann muessen die Spalten
- // auf die vordefinierten Breite gesetzt werden. Im Array stehen die
- // Positionen der Spalten!! (nicht deren Breite!)
- /* #109161# new parameter bCalledFromShell:
+ // Insert new table at position rPos (will be inserted before Node!).
+ // For AutoFormat at input: columns have to be set at predefined width.
+ // The array holds the positions of the columns (not their widths).
+ /* new parameter bCalledFromShell:
sal_True: called from shell -> propagate existing adjust item at
rPos to every new cell. A existing adjust item in the table
@@ -1633,20 +1568,22 @@ public:
sal_Bool bCalledFromShell = sal_False,
sal_Bool bNewModel = sal_True );
- // steht der Index in einer Tabelle, dann returne den TableNode sonst 0
+ // If index is in a table, return TableNode, else 0.
SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx );
inline const SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx ) const;
- // erzeuge aus dem makierten Bereich eine ausgeglichene Tabelle
+ // Create a balanced table out of the selected range.
const SwTable* TextToTable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER,
const SwPaM& rRange, sal_Unicode cCh,
short eAdjust,
const SwTableAutoFmt* = 0 );
+
// text to table conversion - API support
const SwTable* TextToTable( const std::vector< std::vector<SwNodeRange> >& rTableNodes );
- // erzeuge aus der Tabelle wieder normalen Text
+
sal_Bool TableToText( const SwTableNode* pTblNd, sal_Unicode cCh );
- // einfuegen von Spalten/Zeilen in der Tabelle
+
+ // Create columns / rows in table.
sal_Bool InsertCol( const SwCursor& rCursor,
sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
sal_Bool InsertCol( const SwSelBoxes& rBoxes,
@@ -1655,21 +1592,24 @@ public:
sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
sal_Bool InsertRow( const SwSelBoxes& rBoxes,
sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
- // loeschen von Spalten/Zeilen in der Tabelle
+
+ // Delete Colums/Rows in table.
sal_Bool DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn = false );
sal_Bool DeleteRow( const SwCursor& rCursor );
sal_Bool DeleteCol( const SwCursor& rCursor );
- // teilen / zusammenfassen von Boxen in der Tabelle
+
+ // Split / concatenate boxes in table.
sal_Bool SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert = sal_True,
sal_uInt16 nCnt = 1, sal_Bool bSameHeight = sal_False );
- // returnt den enum TableMergeErr
+
+ // Return enum TableMergeErr.
sal_uInt16 MergeTbl( SwPaM& rPam );
String GetUniqueTblName() const;
sal_Bool IsInsTblFormatNum() const;
sal_Bool IsInsTblChangeNumFormat() const;
sal_Bool IsInsTblAlignNum() const;
- // aus der FEShell wg.. Undo und bModified
+ // From FEShell (for Undo and BModified).
void GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr,
const SwCellFrm* pBoxFrm = 0 ) const;
void SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly,
@@ -1679,29 +1619,30 @@ public:
void SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const SwCursor* pCrsr,
const SwCellFrm* pBoxFrm = 0 );
-
- // Direktzugriff fuer Uno
+ // Direct access for UNO.
void SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld,
const SwTableBox *pStart, sal_Bool bCurRowOnly);
void SetRowsToRepeat( SwTable &rTable, sal_uInt16 nSet );
- // AutoFormat fuer die Tabelle/TabellenSelection
+ // AutoFormat for table/table selection.
sal_Bool SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew );
- // Erfrage wie attributiert ist
+
+ // Query attributes.
sal_Bool GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet );
- // setze das InsertDB als Tabelle Undo auf:
+
void AppendUndoForInsertFromDB( const SwPaM& rPam, sal_Bool bIsTable );
- // setze die Spalten/Zeilen/ZTellen Breite/Hoehe
+
sal_Bool SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff );
SwTableBoxFmt* MakeTableBoxFmt();
SwTableLineFmt* MakeTableLineFmt();
- // teste ob die Box ein numerischen Wert darstellt und aender dann ggfs.
- // das Format der Box
+
+ // Check if box has numerical valule. Change format of box if required.
void ChkBoxNumFmt( SwTableBox& rAktBox, sal_Bool bCallUpdate );
void SetTblBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet );
void ClearBoxNumAttrs( const SwNodeIndex& rNode );
+ void ClearLineNumAttrs( SwPosition & rPos );
sal_Bool InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
const SwTable* pCpyTbl = 0, sal_Bool bCpyName = sal_False,
@@ -1714,34 +1655,35 @@ public:
const String* pTblName = 0,
sal_Bool* pFullTblProtection = 0 );
- // Tabelle an der Position in der GrundLine aufsplitten, sprich eine
- // neue Tabelle erzeugen.
+ // Split table at baseline position, i.e. create a new table.
sal_Bool SplitTable( const SwPosition& rPos, sal_uInt16 eMode = 0,
sal_Bool bCalcNewSize = sal_False );
- // und die Umkehrung davon. rPos muss in der Tabelle stehen, die bestehen
- // bleibt. Das Flag besagt ob die aktuelle mit der davor oder dahinter
- // stehenden vereint wird.
+
+ // And vice versa: rPos must be in the table that remains. The flag indicates
+ // whether the current table is merged with the one before or behind it.
sal_Bool MergeTable( const SwPosition& rPos, sal_Bool bWithPrev = sal_True,
sal_uInt16 nMode = 0 );
- // Charts der angegebenen Tabelle zum Update bewegen
+ // Make charts of given table update.
void UpdateCharts( const String &rName ) const;
- // update all charts, for that exists any table
+
+ // Update all charts, for that exists any table.
void UpdateAllCharts() { DoUpdateAllCharts( 0 ); }
- // Tabelle wird umbenannt und aktualisiert die Charts
+
+ // Table is renamed and refreshes charts.
void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName );
- // returne zum Namen die im Doc gesetzte Referenz
+ // Return the reference in document that is set for name.
const SwFmtRefMark* GetRefMark( const String& rName ) const;
- // returne die RefMark per Index - fuer Uno
+
+ // Return RefMark via index - for UNO.
const SwFmtRefMark* GetRefMark( sal_uInt16 nIndex ) const;
- // returne die Namen aller im Doc gesetzten Referenzen.
- // Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine RefMark
- // gesetzt ist
+
+ // Return names of all references that are set in document.
+ // If array pointer is 0 return only whether a RefMark is set in document.
sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const;
- //Einfuegen einer Beschriftung - falls ein FlyFormat erzeugt wird, so
- // returne dieses.
+ // Insert label. If a FlyFormat is created, return it.
SwFlyFrmFmt* InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
const String& rNumberingSeparator,
const sal_Bool bBefore, const sal_uInt16 nId, const sal_uLong nIdx,
@@ -1751,15 +1693,15 @@ public:
const String &rTxt, const String& rSeparator, const String& rNumberSeparator,
const sal_uInt16 nId, const String& rCharacterStyle, SdrObject& rObj );
- // erfrage den Attribut Pool
+ // Query attribute pool.
const SwAttrPool& GetAttrPool() const { return *mpAttrPool; }
SwAttrPool& GetAttrPool() { return *mpAttrPool; }
- // suche ueber das Layout eine EditShell und ggfs. eine ViewShell
+ // Search an EditShell or, if appropriate, a ViewShell via layout.
SwEditShell* GetEditShell( ViewShell** ppSh = 0 ) const;
::sw::IShellCursorSupplier * GetIShellCursorSupplier();
- // OLE 2.0-Benachrichtung
+ // OLE 2.0-notification.
inline void SetOle2Link(const Link& rLink) {aOle2Link = rLink;}
inline const Link& GetOle2Link() const {return aOle2Link;}
@@ -1782,7 +1724,8 @@ public:
The model should not have anything to do with a shell.
Unnecessary compile/link time dependency.
*/
- // Pointer auf die SfxDocShell vom Doc, kann 0 sein !!!
+
+ // Pointer to SfxDocShell from Doc. Can be 0!!
SwDocShell* GetDocShell() { return pDocShell; }
const SwDocShell* GetDocShell() const { return pDocShell; }
void SetDocShell( SwDocShell* pDSh );
@@ -1792,22 +1735,20 @@ public:
void SetTmpDocShell( SfxObjectShellLock rLock ) { xTmpDocShell = rLock; }
SfxObjectShellLock GetTmpDocShell() { return xTmpDocShell; }
- // fuer die TextBausteine - diese habe nur ein SvPersist zur
- // Verfuegung
+ // For Autotexts? (Textbausteine) They have only one SVPersist at their disposal.
SfxObjectShell* GetPersist() const;
- // Pointer auf den Storage des SfxDocShells, kann 0 sein !!!
+ // Pointer to storage of SfxDocShells. Can be 0!!!
::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetDocStorage();
- // abfrage/setze Flag, ob das Dokument im asynchronen Laden ist
+ // Query / set flag indicating if document is loaded asynchronously at this moment.
bool IsInLoadAsynchron() const { return mbInLoadAsynchron; }
void SetInLoadAsynchron( bool bFlag ) { mbInLoadAsynchron = bFlag; }
- // erzeuge um das zu Servende Object eine Selektion
sal_Bool SelectServerObj( const String& rStr, SwPaM*& rpPam,
SwNodeRange*& rpRange ) const;
- // fuer Drag&Move: ( z.B. RefMarks "verschieben" erlauben )
+ // For Drag&Move: (e.g. allow "moving" of RefMarks)
bool IsCopyIsMove() const { return mbCopyIsMove; }
void SetCopyIsMove( bool bFlag ) { mbCopyIsMove = bFlag; }
@@ -1815,38 +1756,39 @@ public:
void UnGroupSelection( SdrView& );
sal_Bool DeleteSelection( SwDrawView& );
- // Invalidiert OnlineSpell-WrongListen
+ // Invalidates OnlineSpell-WrongLists.
void SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong, sal_Bool bSmartTags );
void InvalidateAutoCompleteFlag();
- // <--
void SetCalcFieldValueHdl(Outliner* pOutliner);
- // erfrage ob die ::com::sun::star::util::URL besucht war. Uebers Doc, falls nur ein ::com::sun::star::text::Bookmark
- // angegeben ist. Dann muss der Doc. Name davor gesetzt werden!
+ // Query if ::com::sun::star::util::URL was visited.
+ // Query via Doc, if only a ::com::sun::star::text::Bookmark has been given.
+ // In this case the document name has to be set in front.
sal_Bool IsVisitedURL( const String& rURL ) const;
- // speicher die akt. Werte fuer die automatische Aufnahme von Ausnahmen
- // in die Autokorrektur
+ // Save current values for automatic registration of exceptions in Autocorrection.
void SetAutoCorrExceptWord( SwAutoCorrExceptWord* pNew );
SwAutoCorrExceptWord* GetAutoCorrExceptWord() { return pACEWord; }
const SwFmtINetFmt* FindINetAttr( const String& rName ) const;
- // rufe ins dunkle Basic, mit evt. Return String
+ // Call into intransparent Basic; expect possible Return String.
sal_Bool ExecMacro( const SvxMacro& rMacro, String* pRet = 0, SbxArray* pArgs = 0 );
- // rufe ins dunkle Basic/JavaScript
+
+ // Call into intransparent Basic / JavaScript.
sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
sal_Bool bChkPtr = sal_False, SbxArray* pArgs = 0,
const Link* pCallBack = 0 );
+ // Adjust left margin via object bar.
// linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von
// Numerierungen), optional kann man "um" den Offset stufen oder "auf"
- // die Position gestuft werden (bModulus = sal_True)
+ // die Position gestuft werden (bModulus = sal_True).
void MoveLeftMargin( const SwPaM& rPam, sal_Bool bRight = sal_True,
sal_Bool bModulus = sal_True );
- // Numberformatter erfragen
+ // Query NumberFormatter.
inline SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True );
inline const SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True ) const;
@@ -1855,58 +1797,59 @@ public:
bool RemoveInvisibleContent();
/// restore the invisible content if it's available on the undo stack
bool RestoreInvisibleContent();
- // replace fields by text - mailmerge support
+
sal_Bool ConvertFieldsToText();
- // erzeuge Anhand der vorgebenen Collection Teildokumente
- // falls keine angegeben ist, nehme die Kapitelvorlage der 1. Ebene
+ // Create sub-documents according to given collection.
+ // If no collection is given, use chapter styles for 1st level.
sal_Bool GenerateGlobalDoc( const String& rPath,
const SwTxtFmtColl* pSplitColl = 0 );
- sal_Bool GenerateGlobalDoc( const String& rPath, int nOutlineLevel = 0 ); //#outline level,add by zhaojianwei
+ sal_Bool GenerateGlobalDoc( const String& rPath, int nOutlineLevel = 0 );
sal_Bool GenerateHTMLDoc( const String& rPath,
const SwTxtFmtColl* pSplitColl = 0 );
- sal_Bool GenerateHTMLDoc( const String& rPath, int nOutlineLevel = 0 ); //#outline level,add by zhaojianwei
+ sal_Bool GenerateHTMLDoc( const String& rPath, int nOutlineLevel = 0 );
- // vergleiche zwei Dokument miteinander
+ // Compare two documents.
long CompareDoc( const SwDoc& rDoc );
- // merge zweier Dokumente
+
+ // Merge two documents.
long MergeDoc( const SwDoc& rDoc );
- // setze Kommentar-Text fuers Redline, das dann per AppendRedline
- // hereinkommt. Wird vom Autoformat benutzt. 0-Pointer setzt den Modus
- // wieder zurueck. Die SequenceNummer ist fuers UI-seitige zusammen-
- // fassen von Redlines.
+
+ // Set comment-text for Redline. It then comes in via AppendRedLine.
+ // Used by AutoFormat. 0-pointer resets mode.
+ // Sequence number is for conjoining of Redlines by the UI.
void SetAutoFmtRedlineComment( const String* pTxt, sal_uInt16 nSeqNo = 0 );
bool IsAutoFmtRedline() const { return mbIsAutoFmtRedline; }
void SetAutoFmtRedline( bool bFlag ) { mbIsAutoFmtRedline = bFlag; }
- // fuer AutoFormat: mit Undo/Redlining - Behandlung
+ // For AutoFormat: with Undo/Redlining.
void SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId,
const SfxItemSet* pSet = 0 );
void SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxItemSet& );
- // !!!NUR fuer die SW-Textblocks!! beachtet kein LAYOUT!!!
- void ClearDoc(); // loescht den gesamten Inhalt.
+ // Only for SW-textbloxks! Does not pay any attention to layout!
+ void ClearDoc(); // Deletes all content!
- // erfrage / setze die Daten fuer die PagePreView
+ // Query /set data for PagePreView.
const SwPagePreViewPrtData* GetPreViewPrtData() const { return pPgPViewPrtData; }
- // wenn der Pointer == 0 ist, dann wird im Doc der Pointer zerstoert,
- // ansonsten wird das Object kopiert.
- // Der Pointer geht NICHT in den Besitz des Doc's!!
+
+ // If pointer == 0 destroy pointer in document.
+ // Else copy object.
+ // Pointer is not transferred to ownership by document!
void SetPreViewPrtData( const SwPagePreViewPrtData* pData );
// update all modified OLE-Objects. The modification is called over the
- // StarOne - Interface --> Bug 67026
+ // StarOne - Interface
void SetOLEObjModified()
{ if( GetRootFrm() ) aOLEModifiedTimer.Start(); }
- // -------------------- Uno - Schnittstellen ---------------------------
+ // -------------------- Uno - Interfaces ---------------------------
const SwUnoCrsrTbl& GetUnoCrsrTbl() const { return *pUnoCrsrTbl; }
SwUnoCrsr* CreateUnoCrsr( const SwPosition& rPos, sal_Bool bTblCrsr = sal_False );
- // -------------------- Uno - Schnittstellen ---------------------------
- // -------------------- FeShell - Schnittstellen -----------------------
- // !!!!! diese gehen immer davon aus, das ein Layout existiert !!!!
+ // -------------------- FeShell - Interfaces -----------------------
+ // !!! These assume always an existing layout !!!
sal_Bool ChgAnchor( const SdrMarkList& _rMrkList,
RndStdIds _eAnchorType,
const sal_Bool _bSameOnly,
@@ -1934,23 +1877,21 @@ public:
int Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest );
void Unchain( SwFrmFmt &rFmt );
- // fuers Copy/Move aus der FrmShell
+ // For Copy/Move from FrmShell.
SdrObject* CloneSdrObj( const SdrObject&, sal_Bool bMoveWithinDoc = sal_False,
sal_Bool bInsInPage = sal_True );
//
- // -------------------- FeShell - Schnittstellen Ende ------------------
+ // -------------------- FeShell - Interface end ------------------
-
- // Schnittstelle fuer die TextInputDaten - ( fuer die Texteingabe
- // von japanischen/chinesischen Zeichen)
+ // Interface for TextInputData - for text input of Chinese and Japanese.
SwExtTextInput* CreateExtTextInput( const SwPaM& rPam );
void DeleteExtTextInput( SwExtTextInput* pDel );
SwExtTextInput* GetExtTextInput( const SwNode& rNd,
xub_StrLen nCntntPos = STRING_NOTFOUND) const;
SwExtTextInput* GetExtTextInput() const;
- // Schnistelle fuer den Zugriff auf die AutoComplete-Liste
+ // Interface for access to AutoComplete-List.
static SwAutoCompleteWord& GetAutoCompleteWords() { return *pACmpltWords; }
bool ContainsMSVBasic() const { return mbContains_MSVBasic; }
@@ -1977,10 +1918,8 @@ public:
IGrammarContact* getGrammarContact() const { return mpGrammarContact; }
- // -> #i27615#
/** Marks/Unmarks a list level of a certain list
- OD 2008-04-02 #refactorlists#
levels of a certain lists are marked now
@param sListId list Id of the list whose level has to be marked/unmarked
@@ -1994,7 +1933,6 @@ public:
/** Marks/Unmarks a list level of a certain list
- OD 2008-04-02 #refactorlists#
levels of a certain lists are marked now
@param rList list whose level has to be marked/unmarked
@@ -2005,7 +1943,6 @@ public:
void MarkListLevel( SwList& rList,
const int nListLevel,
const sal_Bool bValue );
- // <- #i27615#
// Change a format undoable.
void ChgFmt(SwFmt & rFmt, const SfxItemSet & rSet);
@@ -2016,7 +1953,6 @@ public:
// Change a TOX undoable.
void ChgTOX(SwTOXBase & rTOX, const SwTOXBase & rNew);
- // #111827#
/**
Returns a textual description of a PaM.
@@ -2036,11 +1972,9 @@ public:
*/
String GetPaMDescr(const SwPaM & rPaM) const;
- // -> #i23726#
sal_Bool IsFirstOfNumRule(SwPosition & rPos);
- // <- #i23726#
- // --> #i31958# access methods for XForms model(s)
+ // access methods for XForms model(s)
/// access container for XForms model; will be NULL if !isXForms()
com::sun::star::uno::Reference<com::sun::star::container::XNameContainer>
@@ -2053,21 +1987,18 @@ public:
/// initialize XForms models; turn this into an XForms document
void initXForms( bool bCreateDefaultModel );
- // <-- #i31958# access methods for XForms model(s)
+ // access methods for XForms model(s)
- // --> OD 2006-03-21 #b6375613#
inline bool ApplyWorkaroundForB6375613() const
{
return mbApplyWorkaroundForB6375613;
}
void SetApplyWorkaroundForB6375613( bool p_bApplyWorkaroundForB6375613 );
- // <--
//Update all the page masters
void SetDefaultPageMode(bool bSquaredPageMode);
sal_Bool IsSquaredPageMode() const;
- // i#78591#
void Setn32DummyCompatabilityOptions1( sal_uInt32 CompatabilityOptions1 )
{
n32DummyCompatabilityOptions1 = CompatabilityOptions1;
@@ -2084,9 +2015,9 @@ public:
{
return n32DummyCompatabilityOptions2;
}
-#ifdef FUTURE_VBA
com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > GetVbaEventProcessor();
-#endif
+ void SetVBATemplateToProjectCache( com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >& xCache ) { m_xTemplateToProjectCache = xCache; };
+ com::sun::star::uno::Reference< com::sun::star::container::XNameContainer > GetVBATemplateToProjectCache() { return m_xTemplateToProjectCache; };
::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
::sw::MetaFieldManager & GetMetaFieldManager();
::sw::UndoManager & GetUndoManager();
@@ -2094,14 +2025,9 @@ public:
SfxObjectShell* CreateCopy(bool bCallInitNew) const;
};
-
-// Diese Methode wird im Dtor vom SwDoc gerufen und loescht den Cache
-// der Konturobjekte
+// This method is called in Dtor of SwDoc and deletes cache of ContourObjects.
void ClrContourCache();
-
-//------------------ inline impl. ---------------------------------
-
inline const SwTableNode* SwDoc::IsIdxInTbl( const SwNodeIndex& rIdx ) const
{
return ((SwDoc*)this)->IsIdxInTbl( rIdx );
@@ -2126,14 +2052,11 @@ inline void SwDoc::SetOLEPrtNotifyPending( bool bSet )
mbAllOLENotify = sal_False;
}
-// --> OD 2006-03-14 #i62875#
// namespace <docfunc> for functions and procedures working on a Writer document.
namespace docfunc
{
/** method to check, if given Writer document contains at least one drawing object
- OD 2006-03-17 #i62875#
-
@author OD
@param p_rDoc
@@ -2144,8 +2067,6 @@ namespace docfunc
/** method to check, if given Writer document contains only drawing objects,
which are completely on its page.
- OD 2006-03-17 #i62875#
-
@author OD
@param p_rDoc
@@ -2155,7 +2076,7 @@ namespace docfunc
/** method to check, if the outline style has to written as a normal list style
- OD 2006-09-27 #i69627#
+ #i69627#
The outline style has to written as a normal list style, if a parent
paragraph style of one of the paragraph styles, which are assigned to
the list levels of the outline style, has a list style set or inherits
@@ -2172,5 +2093,6 @@ namespace docfunc
*/
bool HasOutlineStyleToBeWrittenAsNormalListStyle( SwDoc& rDoc );
}
-// <--
#endif //_DOC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index f2318fb2ddb4..52c2fe08df5e 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,23 +45,21 @@ namespace com { namespace sun { namespace star { namespace i18n {
struct ForbiddenCharacters; // comes from the I18N UNO interface
}}}}
-#ifndef _TABLE_HXX //autogen
#include <tools/table.hxx>
-#endif
#include <swtypes.hxx>
#include <svl/svarray.hxx>
typedef SwFieldType* SwFldTypePtr;
#define GROW_FLDTYPES 16
-//PageDescriptor-Schnittstelle
-//typedef SwPageDesc * SwPageDescPtr;
-//SV_DECL_PTRARR_DEL(SwPageDescs, SwPageDescPtr,1,1);
+// PageDescriptor-interface
+// typedef SwPageDesc * SwPageDescPtr;
+// SV_DECL_PTRARR_DEL(SwPageDescs, SwPageDescPtr,1,1);
typedef SwFrmFmt* SwFrmFmtPtr;
SV_DECL_PTRARR_DEL(SwFrmFmts,SwFrmFmtPtr,4,4)
-//Spezifische Frameformate (Rahmen, DrawObjecte)
+// Specific frame formats (frames, DrawObjects).
SV_DECL_PTRARR_DEL(SwSpzFrmFmts,SwFrmFmtPtr,0,4)
typedef SwCharFmt* SwCharFmtPtr;
@@ -71,6 +70,7 @@ SV_DECL_PTRARR_DEL( SwFldTypes, SwFldTypePtr, INIT_FLDTYPES, GROW_FLDTYPES )
typedef SwTOXType* SwTOXTypePtr;
SV_DECL_PTRARR_DEL( SwTOXTypes, SwTOXTypePtr, 0, 1 )
+// Array of Undo-history.
typedef SwSectionFmt* SwSectionFmtPtr;
SV_DECL_PTRARR_DEL(SwSectionFmts,SwSectionFmtPtr,0,4)
@@ -97,9 +97,9 @@ public:
void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );
void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 );
- // suche den naechsten oder vorherigen Redline mit dergleichen Seq.No
- // Mit dem Lookahead kann die Suche eingeschraenkt werden. 0 oder
- // USHRT_MAX suchen im gesamten Array.
+ // Search next or previous Redline with the same Seq. No.
+ // Search can be restricted via Lookahaed.
+ // Using 0 or USHRT_MAX makes search the whole array.
sal_uInt16 FindNextOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead = 20 ) const;
sal_uInt16 FindPrevOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead = 20 ) const;
sal_uInt16 FindNextSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos,
@@ -123,3 +123,4 @@ SV_DECL_PTRARR(SwOLENodes,SwOLENodePtr,16,16)
#endif //_DOCARY_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/docfac.hxx b/sw/inc/docfac.hxx
index 697da8692b4d..12025fd546d8 100644
--- a/sw/inc/docfac.hxx
+++ b/sw/inc/docfac.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,9 +41,10 @@ public:
SwDocFac( SwDoc *pDoc = 0 );
~SwDocFac();
- // Das Dokument ist nach dem Aufruf von Read(..) angelegt
+ // Document is created after calling Read(...).
SwDoc* GetDoc();
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 1b6091668c67..a20d9d54f7a4 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,31 +64,31 @@ class IDocumentChartDataProviderAccess;
class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener
{
- SwDoc* pDoc; // Document
- rtl::Reference< SfxStyleSheetBasePool > mxBasePool; // Durchreiche fuer Formate
- FontList* pFontList; // aktuelle FontListe
-
- // Nix geht ohne die WrtShell (historische Gruende)
- // RuekwaertsPointer auf die View (historische Gruende)
- // Dieser gilt solange bis im Activate ein neuer gesetzt wird
- // oder dieser im Dtor der View geloescht wird
- //
+ SwDoc* pDoc; // Document.
+ rtl::Reference< SfxStyleSheetBasePool > mxBasePool; // Passing through for formats.
+ FontList* pFontList; // Current Fontlist.
+
+ // For "historical reasons" nothing can be done without the WrtShell.
+ // Back-pointer on View (again "for historical reasons").
+ // Back-pointer is valid until in Activate a new one is set
+ // or until it is deleted in the View's Dtor.
+
SwView* pView;
SwWrtShell* pWrtShell;
- Timer aFinishedTimer; // Timer fuers ueberpriefen der
- // Grafik-Links. Sind alle da,
- // dann ist Doc voll. geladen
+ Timer aFinishedTimer; // Timer for checking graphics-links.
+ // If all are present, the doc is loaded completely.
- //SvPersistRef xOLEChildList; // fuers RemoveOLEObjects
comphelper::EmbeddedObjectContainer* pOLEChildList;
- sal_Int16 nUpdateDocMode; // contains the com::sun::star::document::UpdateDocMode
+ sal_Int16 nUpdateDocMode; // contains the com::sun::star::document::UpdateDocMode
bool bInUpdateFontList; //prevent nested calls of UpdateFontList
- // Methoden fuer den Zugriff aufs Doc
+ bool bIsATemplate; //prevent nested calls of UpdateFontList
+
+ // Methods for access to doc.
SW_DLLPRIVATE void AddLink();
SW_DLLPRIVATE void RemoveLink();
- // Hint abfangen fuer DocInfo
+ // Catch hint for DocInfo.
SW_DLLPRIVATE virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
// FileIO
@@ -101,14 +102,14 @@ class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener
SW_DLLPRIVATE virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
- // DocInfo dem Doc melden
- //
+
+ // Make DocInfo known to the Doc.
SW_DLLPRIVATE virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog(
Window *pParent, const SfxItemSet &);
- // OLE-Geraffel
+ // OLE-stuff
SW_DLLPRIVATE virtual void Draw( OutputDevice*, const JobSetup&, sal_uInt16);
- // Methoden fuer StyleSheets
+ // Methods for StyleSheets
SW_DLLPRIVATE sal_uInt16 Edit( const String &rName, const String& rParent, sal_uInt16 nFamily,
sal_uInt16 nMask, sal_Bool bNew,
sal_Bool bColumn = sal_False,
@@ -123,7 +124,7 @@ class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener
sal_uInt16 nFamily, sal_uInt16 nMask, SwWrtShell* pShell = 0);
SW_DLLPRIVATE void InitDraw();
- SW_DLLPRIVATE void SubInitNew(); // fuer InitNew und HtmlSourceModus
+ SW_DLLPRIVATE void SubInitNew(); // for InitNew and HtmlSourceMode.
SW_DLLPRIVATE void RemoveOLEObjects();
SW_DLLPRIVATE void CalcLayoutForOLEObjects();
@@ -142,7 +143,7 @@ protected:
public:
using SotObject::GetInterface;
- // aber selbst implementieren
+ // but we implement this ourselves.
SFX_DECL_INTERFACE(SW_DOCSHELL)
SFX_DECL_OBJECTFACTORY()
TYPEINFO();
@@ -151,16 +152,16 @@ public:
static rtl::OUString GetEventName( sal_Int32 nId );
- //Das Doc wird fuer SO-Datenaustausch benoetigt!
+ //Doc is required for SO data exchange!
SwDocShell( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED );
SwDocShell( const sal_uInt64 i_nSfxCreationFlags );
SwDocShell( SwDoc *pDoc, SfxObjectCreateMode eMode = SFX_CREATE_MODE_STANDARD );
~SwDocShell();
- // OLE 2.0-Benachrichtigung
+ // OLE 2.0-notification.
DECL_LINK( Ole2ModifiedHdl, void * );
- // OLE-Geraffel
+ // OLE-stuff.
virtual void SetVisArea( const Rectangle &rRect );
virtual Rectangle GetVisArea( sal_uInt16 nAspect ) const;
virtual Printer *GetDocumentPrinter();
@@ -180,7 +181,7 @@ public:
void StateAlways(SfxItemSet &);
void StateStyleSheet(SfxItemSet&, SwWrtShell* pSh = 0 );
- // Doc rausreichen aber VORSICHT
+ // returns Doc. But be careful!
inline SwDoc* GetDoc() { return pDoc; }
inline const SwDoc* GetDoc() const { return pDoc; }
IDocumentDeviceAccess* getIDocumentDeviceAccess();
@@ -191,13 +192,13 @@ public:
void UpdateFontList();
void UpdateChildWindows();
- // globaler IO
+ // global IO.
virtual sal_Bool Save();
- // fuer VorlagenPI
+ // For Style PI.
virtual SfxStyleSheetBasePool* GetStyleSheetPool();
- // Fuer Organizer
+ // For Organizer.
virtual sal_Bool Insert(SfxObjectShell &rSource,
sal_uInt16 nSourceIdx1,
sal_uInt16 nSourceIdx2,
@@ -211,24 +212,24 @@ public:
sal_uInt16 nIdx2 = INDEX_IGNORE,
sal_uInt16 nIdx3 = INDEX_IGNORE);
- virtual Bitmap GetStyleFamilyBitmap( SfxStyleFamily eFamily, BmpColorMode eColorMode );
+ virtual Bitmap GetStyleFamilyBitmap( SfxStyleFamily eFamily );
- // View setzen fuer Aktionen ueber Shell
+ // Set View for actions via Shell.
void SetView(SwView* pVw);
const SwView *GetView() const { return pView; }
SwView *GetView() { return pView; }
- // Zugriff auf die zur SwView gehoerige SwWrtShell
+ // Accress to the SwWrtShell belonging to SwView.
SwWrtShell *GetWrtShell() { return pWrtShell; }
const SwWrtShell *GetWrtShell() const { return pWrtShell; }
- // fuer die Core - die kennt die DocShell aber keine WrtShell!
+ // For Core - it knows the DocShell but not the WrtShell!
SwFEShell *GetFEShell();
const SwFEShell *GetFEShell() const
{ return ((SwDocShell*)this)->GetFEShell(); }
- // Fuer Einfuegen Dokument
+ // For inserting document.
Reader* StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
SwCrsrShell* pCrsrSh = 0, SwPaM* pPaM = 0);
@@ -237,6 +238,8 @@ public:
virtual long DdeSetData( const String& rItem, const String& rMimeType,
const ::com::sun::star::uno::Any & rValue );
virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const String& rItem );
+ virtual void ReconnectDdeLink(SfxObjectShell& rServer);
+
virtual void FillClass( SvGlobalName * pClassName,
sal_uInt32 * pClipFormat,
String * pAppName,
@@ -249,25 +252,22 @@ public:
void _LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrentDocument );
- // Seitenvorlagedialog anzeigen, ggf. auf Spaltenpage
+ // Display dialog for page style. If required display column page.
void FormatPage( const String& rPage,
sal_Bool bColumn = sal_False,
SwWrtShell* pActShell = 0 );
- // --> OD 2006-11-07 #i59688#
+ // #i59688#
// linked graphics are now loaded on demand.
// Thus, loading of linked graphics no longer needed and necessary for
// the load of document being finished.
-// // Timer starten fuers ueberpruefen der Grafik-Links. Sind alle
-// // vollstaendig geladen, dann ist das Doc fertig
-// void StartLoadFinishedTimer();
+
void LoadingFinished();
- // <--
- // eine Uebertragung wird abgebrochen (wird aus dem SFX gerufen)
+ // Cancel transfer (called from SFX).
virtual void CancelTransfers();
- // Doc aus Html-Source neu laden
+ // Re-read Doc from Html-source.
void ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView );
sal_Int16 GetUpdateDocMode() const {return nUpdateDocMode;}
@@ -287,20 +287,21 @@ public:
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > GetEventNames();
- // --> FME 2004-08-05 #i20883# Digital Signatures and Encryption
+ // #i20883# Digital Signatures and Encryption
virtual sal_uInt16 GetHiddenInformationState( sal_uInt16 nStates );
- // <--
- // --> FME 2005-02-25 #i42634# Overwrites SfxObjectShell::UpdateLinks
+
+ // #i42634# Overwrites SfxObjectShell::UpdateLinks
// This new function is necessary to trigger update of links in docs
// read by the binary filter:
virtual void UpdateLinks();
- // <--
::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >
GetController();
SfxInPlaceClient* GetIPClient( const ::svt::EmbeddedObjectRef& xObjRef );
+ SW_DLLPRIVATE sal_Bool IsTemplate() { return bIsATemplate; }
+ SW_DLLPRIVATE void SetIsTemplate( bool bValue ) { bIsATemplate = bValue; }
virtual const ::sfx2::IXmlIdRegistry* GetXmlIdRegistry() const;
@@ -318,3 +319,5 @@ class Graphic;
String ExportGraphic( const Graphic &rGraphic, const String &rGrfName );
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/docstat.hxx b/sw/inc/docstat.hxx
index 5d40357524c8..554d506be414 100644
--- a/sw/inc/docstat.hxx
+++ b/sw/inc/docstat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,6 +44,7 @@ struct SW_DLLPUBLIC SwDocStat
sal_uLong nAllPara;
sal_uLong nWord;
sal_uLong nChar;
+ sal_uLong nCharExcludingSpaces;
sal_Bool bModified;
SwDocStat();
@@ -50,3 +52,5 @@ struct SW_DLLPUBLIC SwDocStat
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index d8840a72a8d7..620074a7efbb 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,7 +47,7 @@ class SwFrmFmt;
class SwNumRule;
/*--------------------------------------------------------------------
- Beschreibung: Lokale Hilfsklasse
+ Local helper class.
--------------------------------------------------------------------*/
class SwPoolFmtList : public SvStringsDtor
{
@@ -58,7 +59,7 @@ public:
/*--------------------------------------------------------------------
- Beschreibung: temp. StyleSheet
+ Temporary StyleSheet.
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwDocStyleSheet : public SfxStyleSheetBase
{
@@ -77,10 +78,10 @@ class SW_DLLPUBLIC SwDocStyleSheet : public SfxStyleSheetBase
sal_Bool bPhysical;
- // leere Huelse zum richtigen StyleSheet (Core) machen
+ // Make empty shell a real StyleSheet (Core).
SW_DLLPRIVATE void Create();
- // den StyleSheet mit Daten fuellen
+ // Fill StyleSheet with data.
enum FillStyleType {
FillOnlyName,
FillAllInfo,
@@ -109,30 +110,25 @@ public:
sal_Bool IsPhysical() const { return bPhysical; }
void SetPhysical(sal_Bool bPhys);
- // --> OD 2008-02-11 #newlistlevelattrs#
// add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value sal_False,
// which indicates that the indent attributes at a paragraph style should
// be reset in case that a list style is applied to the paragraph style and
// no indent attributes are applied.
void SetItemSet( const SfxItemSet& rSet,
const bool bResetIndentAttrsAtParagraphStyle = false );
- // <--
virtual SfxItemSet& GetItemSet();
- // --> OD 2008-02-12 #newlistlevelattrs#
// new method for paragraph styles to merge indent attributes of applied list
// style into the given item set, if the list style indent attributes are applicable.
void MergeIndentAttrsOfListStyle( SfxItemSet& rSet );
- // <--
virtual const String& GetParent() const;
virtual const String& GetFollow() const;
virtual sal_uLong GetHelpId( String& rFile );
virtual void SetHelpId( const String& r, sal_uLong nId );
- // Vorbelegen der member ohne physikalischen Zugriff
- // wird vom StyleSheetPool benutzt
- //
+ // Preset the members without physical access.
+ // Used by StyleSheetPool.
void PresetName(const String& rName) { aName = rName; }
void PresetNameAndFamily(const String& rName);
void PresetParent(const String& rName){ aParent = rName; }
@@ -159,7 +155,7 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: Iterator fuer den Pool
+ Iterator for Pool.
--------------------------------------------------------------------*/
class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener
@@ -189,15 +185,12 @@ public:
virtual void Notify( SfxBroadcaster&, const SfxHint& );
};
-/*--------------------------------------------------------------------
- Beschreibung: Pool fuer
- --------------------------------------------------------------------*/
class SwDocStyleSheetPool : public SfxStyleSheetBasePool
{
rtl::Reference< SwDocStyleSheet > mxStyleSheet;
SwDoc& rDoc;
- sal_Bool bOrganizer : 1; // sal_True: fuer den Organizer
+ sal_Bool bOrganizer : 1; // Organizer
virtual SfxStyleSheetBase* Create( const String&, SfxStyleFamily, sal_uInt16 nMask);
@@ -236,10 +229,12 @@ public:
protected:
virtual ~SwDocStyleSheetPool();
- //Fuer die daemlicheren Compiler
+ //For not-so-clever compilers.
private:
SwDocStyleSheetPool( const SwDocStyleSheetPool& );
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index af61eeec61dd..177229930bdb 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,7 +54,7 @@ enum SwAuthorFormat
};
/*--------------------------------------------------------------------
- Beschreibung: Untertyp der Dokumentstatistik
+ Subtype of document statistics.
--------------------------------------------------------------------*/
enum SwDocStatSubType
@@ -98,7 +99,7 @@ namespace nsSwDocInfoSubType
}
-enum RegInfoFormat // Nur noch zum laden alter Dokumente!!!
+enum RegInfoFormat // Only for loading of old documents!!!
{
RF_AUTHOR,
RF_TIME,
@@ -115,18 +116,18 @@ enum SwPageNumSubType
enum SwExtUserSubType
{
- EU_COMPANY /*EU_FIRMA*/,
- EU_FIRSTNAME /*EU_VORNAME*/,
- EU_NAME /*EU_NAME*/,
- EU_SHORTCUT /*EU_ABK*/,
- EU_STREET /*EU_STRASSE*/,
- EU_COUNTRY /*EU_LAND*/,
- EU_ZIP /*EU_PLZ*/,
- EU_CITY /*EU_ORT*/,
- EU_TITLE /*EU_TITEL*/,
- EU_POSITION /*EU_POS*/,
- EU_PHONE_PRIVATE /*EU_TELPRIV*/,
- EU_PHONE_COMPANY /*EU_TELFIRMA*/,
+ EU_COMPANY,
+ EU_FIRSTNAME,
+ EU_NAME,
+ EU_SHORTCUT,
+ EU_STREET,
+ EU_COUNTRY,
+ EU_ZIP,
+ EU_CITY,
+ EU_TITLE,
+ EU_POSITION,
+ EU_PHONE_PRIVATE,
+ EU_PHONE_COMPANY,
EU_FAX,
EU_EMAIL,
EU_STATE,
@@ -144,7 +145,7 @@ enum SwJumpEditFormat
};
/*--------------------------------------------------------------------
- Beschreibung: Seitennummer
+ Page number.
--------------------------------------------------------------------*/
class SwPageNumberFieldType : public SwFieldType
@@ -163,7 +164,7 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: Seitennummerierung
+ Page numbering.
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwPageNumberField : public SwField
@@ -183,16 +184,15 @@ public:
virtual void SetPar2(const String& rStr);
virtual sal_uInt16 GetSubType() const;
- // virtual void SetSubType(sal_uInt16 nSub); // OM: entfernt, da unbenoetigt und gefaehrlich
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
const String& GetUserString() const { return sUserStr; }
void SetUserString( const String& rS ) { sUserStr = rS; }
};
/*--------------------------------------------------------------------
- Beschreibung: Autoren
+ Authors.
--------------------------------------------------------------------*/
class SwAuthorFieldType : public SwFieldType
@@ -205,7 +205,7 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: AutorenFeld
+ Author field.
--------------------------------------------------------------------*/
class SwAuthorField : public SwField
@@ -221,12 +221,12 @@ public:
inline void SetExpansion(const String& rStr) { aContent = rStr; }
inline const String& GetContent() const { return aContent; }
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
- Beschreibung: Filename
+ Filename
--------------------------------------------------------------------*/
class SwFileNameFieldType : public SwFieldType
@@ -240,7 +240,7 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: FileName
+ FileNameField
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwFileNameField : public SwField
@@ -256,12 +256,12 @@ public:
inline void SetExpansion(const String& rStr) { aContent = rStr; }
inline const String& GetContent() const { return aContent; }
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
- Beschreibung: TemplName
+ TemplName
--------------------------------------------------------------------*/
class SwTemplNameFieldType : public SwFieldType
@@ -275,7 +275,7 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: TemplName
+ TemplNameField
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwTemplNameField : public SwField
@@ -285,13 +285,13 @@ public:
virtual String Expand() const;
virtual SwField* Copy() const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
- Beschreibung: Docstatistik
+ Document statistics
--------------------------------------------------------------------*/
class SwDocStatFieldType : public SwFieldType
@@ -308,7 +308,7 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: Dokumentstatistik
+ DocStatField
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwDocStatField : public SwField
@@ -326,12 +326,12 @@ public:
virtual sal_uInt16 GetSubType() const;
virtual void SetSubType(sal_uInt16 nSub);
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
- Beschreibung: versteckter Text
+ Hidden text.
--------------------------------------------------------------------*/
class SwHiddenTxtFieldType : public SwFieldType
@@ -347,7 +347,7 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: Versteckter Text
+ HiddenTxtField
--------------------------------------------------------------------*/
class SwHiddenTxtField : public SwField
@@ -398,13 +398,13 @@ public:
virtual sal_uInt16 GetSubType() const;
- // virtual void SetSubType(sal_uInt16 nSub); // OM: entfernt, da unbenoetigt und gefaehrlich
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
- Beschreibung: Feld das zu einer Leerzeile (ohne Hoehe) expandiert
+ Field that expands to an empty line (without height).
--------------------------------------------------------------------*/
class SwHiddenParaFieldType : public SwFieldType
@@ -416,7 +416,7 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: Versteckter Absatz
+ Hidded paragraph.
--------------------------------------------------------------------*/
class SwHiddenParaField : public SwField
@@ -424,7 +424,7 @@ class SwHiddenParaField : public SwField
String aCond;
sal_Bool bIsHidden:1;
public:
- // Direkte Eingabe alten Wert loeschen
+ // Direct input, delete old value.
SwHiddenParaField(SwHiddenParaFieldType*, const String& rCond);
virtual String Expand() const;
@@ -433,15 +433,15 @@ public:
void SetHidden(sal_Bool bHidden) { bIsHidden = bHidden; }
sal_Bool IsHidden() const { return bIsHidden; }
- // Bedingung erfragen/setzen
+ //Query, set condition.
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
- Beschreibung: Macro ausfuehren
+ Run Macro.
--------------------------------------------------------------------*/
class SwMacroFieldType : public SwFieldType
@@ -455,7 +455,7 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: Macrofeld
+ MacroField.
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwMacroField : public SwField
@@ -468,7 +468,7 @@ class SW_DLLPUBLIC SwMacroField : public SwField
virtual SwField* Copy() const;
public:
- // Direkte Eingabe alten Wert loeschen
+ // Direct input, delete old value.
SwMacroField( SwMacroFieldType*, const String& rLibAndName,
const String& rTxt);
@@ -479,15 +479,15 @@ public:
virtual String GetFieldName() const;
- // Library und FileName
+ // Library and FileName
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
// Macrotext
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
static void CreateMacroString( String& rMacro,
const String& rMacroName,
@@ -498,7 +498,7 @@ public:
/*--------------------------------------------------------------------
- Beschreibung: PostIts
+ PostIts
--------------------------------------------------------------------*/
class SwPostItFieldType : public SwFieldType
@@ -513,14 +513,14 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: PostIt
+ PostItField
--------------------------------------------------------------------*/
class SW_DLLPUBLIC SwPostItField : public SwField
{
- String sTxt; // die Anmerkung
- String sAuthor; // der Author
- DateTime aDateTime; // Datum und Zeit der Anmerkung
+ String sTxt;
+ String sAuthor;
+ DateTime aDateTime;
OutlinerParaObject* mpText;
SwTextAPIObject* m_pTextObject;
@@ -549,13 +549,13 @@ public:
sal_uInt32 GetNumberOfParagraphs() const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
virtual String GetDescription() const;
};
/*--------------------------------------------------------------------
- Beschreibung: DokumentInfo
+ DocumentInfo
--------------------------------------------------------------------*/
class SwDocInfoFieldType : public SwValueFieldType
@@ -587,12 +587,12 @@ public:
String GetName() const { return aName; }
void SetName( const String& rName ) { aName = rName; }
inline void SetExpansion(const String& rStr) { aContent = rStr; }
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
- Beschreibung: erweiterte Benutzereinstellung
+ Extended User settings.
--------------------------------------------------------------------*/
@@ -624,13 +624,13 @@ public:
inline void SetExpansion(const String& rStr) { aContent = rStr; }
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
- Beschreibung: Relatives Seitennummern - Feld
+ Relative page numbers - field.
--------------------------------------------------------------------*/
class SwRefPageSetFieldType : public SwFieldType
@@ -639,12 +639,12 @@ public:
SwRefPageSetFieldType();
virtual SwFieldType* Copy() const;
- // ueberlagert, weil es nichts zum Updaten gibt!
+ // Overlay, because there is nothing to update!
virtual void Modify( SfxPoolItem *, SfxPoolItem * );
};
/*--------------------------------------------------------------------
- Beschreibung: Relative Seitennummerierung
+ Relative page numbering.
--------------------------------------------------------------------*/
class SwRefPageSetField : public SwField
@@ -666,12 +666,12 @@ public:
short GetOffset() const { return nOffset; }
void SetOffset( short nOff ) { nOffset = nOff; }
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
- Beschreibung: relatives Seitennummern - Abfrage Feld
+ Relative page numbers - query field.
--------------------------------------------------------------------*/
class SwRefPageGetFieldType : public SwFieldType
@@ -685,7 +685,7 @@ public:
SwRefPageGetFieldType( SwDoc* pDoc );
virtual SwFieldType* Copy() const;
- // ueberlagert, um alle RefPageGet-Felder zu updaten
+ // Overlay in order to update all RefPageGet-fields.
virtual void Modify( SfxPoolItem *, SfxPoolItem * );
sal_uInt16 MakeSetList( _SetGetExpFlds& rTmpLst );
@@ -693,7 +693,7 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: Relative Seitennummerierung Abfragen
+ Query relative page numbering.
--------------------------------------------------------------------*/
class SwRefPageGetField : public SwField
@@ -708,12 +708,12 @@ public:
void SetText( const String& rTxt ) { sTxt = rTxt; }
void ChangeExpansion( const SwFrm* pFrm, const SwTxtFld* pFld );
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
- Beschreibung: Feld zum Anspringen und Editieren
+ Field to jump to and edit.
--------------------------------------------------------------------*/
class SwJumpEditFieldType : public SwFieldType
@@ -738,22 +738,22 @@ public:
virtual String Expand() const;
virtual SwField* Copy() const;
- // Platzhalter-Text
+ // Placeholder-Text
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
- // HinweisText
+ // Hint-Text
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
SwCharFmt* GetCharFmt() const
{ return ((SwJumpEditFieldType*)GetTyp())->GetCharFmt(); }
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
- Beschreibung: Script Fieldtype
+ Script Fieldtype.
--------------------------------------------------------------------*/
class SwScriptFieldType : public SwFieldType
@@ -766,16 +766,16 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: Script Field
+ ScriptField.
--------------------------------------------------------------------*/
class SwScriptField : public SwField
{
- String sType; // Type von Code (Java/VBScript/...)
- String sCode; // der Code als Text
- // der Code als JavaCode ?
+ String sType; // Type of Code (Java/VBScript/...)
+ String sCode; // Code as text.
+ // Code as JavaCode ?
- sal_Bool bCodeURL; // Code enthaelt URL eines Scripts
+ sal_Bool bCodeURL; // Code contains URL of a script.
public:
SwScriptField( SwScriptFieldType*, const String& rType,
@@ -795,12 +795,12 @@ public:
sal_Bool IsCodeURL() const { return bCodeURL; }
void SetCodeURL( sal_Bool bURL ) { bCodeURL = bURL; }
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
- Beschreibung: Combined Character Fieldtype
+ Combined Character Fieldtype
--------------------------------------------------------------------*/
class SwCombinedCharFieldType : public SwFieldType
@@ -812,7 +812,7 @@ public:
};
/*--------------------------------------------------------------------
- Beschreibung: Script Field
+ ScriptField
--------------------------------------------------------------------*/
#define MAX_COMBINED_CHARACTERS 6
@@ -831,9 +831,11 @@ public:
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
#endif // SW_DOCUFLD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx
index 84a1b2c99ba1..6c25476e1293 100644
--- a/sw/inc/dpage.hxx
+++ b/sw/inc/dpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef _DPAGE_HXX
#define _DPAGE_HXX
-#ifndef _FM_FMPAGE_HXX
#include <svx/fmpage.hxx>
-#endif
#include <svx/svdobj.hxx>
class SdrPageGridFrameList;
@@ -62,3 +61,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/drawdoc.hxx b/sw/inc/drawdoc.hxx
index cca6390e9198..4c699c3b2591 100644
--- a/sw/inc/drawdoc.hxx
+++ b/sw/inc/drawdoc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef _DRAWDOC_HXX
#define _DRAWDOC_HXX
-#ifndef _FM_FMMODEL_HXX
#include <svx/fmmodel.hxx>
-#endif
class SwDoc;
class SwDocShell;
@@ -46,20 +45,21 @@ public:
const SwDoc& GetDoc() const { return *pDoc; }
SwDoc& GetDoc() { return *pDoc; }
- virtual SdrPage* AllocPage(FASTBOOL bMasterPage);
+ virtual SdrPage* AllocPage(bool bMasterPage);
+
- // fuers "load on demand" von Grafiken im DrawingLayer
+ // For "load on demand" of graphics in DrawingLayer.
virtual SvStream* GetDocumentStream( SdrDocumentStreamInfo& rInfo ) const;
- // fuers Speicher von Rechtecken als Control-Ersatz fuker Versionen < 5.0
+ // For saving of rectangles as control-replacement for versions < 5.0.
virtual SdrLayerID GetControlExportLayerId( const SdrObject & ) const;
protected:
- // --> OD 2006-03-01 #b6382898#
// overload of <SdrModel::createUnoModel()> is needed to provide corresponding uno model.
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel();
- // <--
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/edglbldc.hxx b/sw/inc/edglbldc.hxx
index 23e63a8483d8..ef46ae19bb42 100644
--- a/sw/inc/edglbldc.hxx
+++ b/sw/inc/edglbldc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,7 +54,7 @@ public:
SwGlblDocContent( const SwTOXBaseSection* pTOX );
SwGlblDocContent( const SwSection* pSect );
- // Inhalte abfragen
+ // Query contents.
GlobalDocContentType GetType() const { return eType; }
const SwSection* GetSection() const
{ return GLBLDOC_SECTION == eType ? PTR.pSect : 0; }
@@ -61,7 +62,7 @@ public:
{ return GLBLDOC_TOXBASE == eType ? PTR.pTOX : 0; }
sal_uLong GetDocPos() const { return nDocPos; }
- // fuers Sortieren
+ // For sorting.
inline int operator==( const SwGlblDocContent& rCmp ) const
{ return GetDocPos() == rCmp.GetDocPos(); }
inline int operator<( const SwGlblDocContent& rCmp ) const
@@ -75,3 +76,5 @@ SV_DECL_PTRARR_SORT_DEL( SwGlblDocContents, SwGlblDocContentPtr, 10, 10 )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/edimp.hxx b/sw/inc/edimp.hxx
index 16a2a3ecb2f5..8fc4f8fe2f20 100644
--- a/sw/inc/edimp.hxx
+++ b/sw/inc/edimp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,9 +35,7 @@
class SwPaM;
class SwNodeIndex;
-/*
- * MACROS um ueber alle Bereiche zu iterieren
- */
+// Macros to iterate over all ranges.
#define PCURCRSR (_pStartCrsr)
#define FOREACHPAM_START(pCURSH) \
@@ -81,3 +80,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index d75839f5736c..b9c747b22ffd 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,7 @@
#include <vcl/font.hxx>
#include <editeng/swafopt.hxx>
#include "swdllapi.h"
-#include <crsrsh.hxx> // fuer Basisklasse
+#include <crsrsh.hxx> // For base class.
#include <itabenum.hxx>
#include <swdbdata.hxx>
#include <com/sun/star/linguistic2/XSpellAlternatives.hpp>
@@ -58,7 +59,7 @@ class SfxPoolItem;
class SfxItemSet;
class SvxAutoCorrect;
-class SwField; // fuer Felder
+class SwField;
class SwFieldType;
class SwDDEFieldType;
class SwNewDBMgr;
@@ -70,22 +71,21 @@ class SwAutoCompleteWord;
class SwFmtRefMark;
-class SwNumRule; // Numerierung
-//class SwNodeNum; // Numerierung
+class SwNumRule;
class SwTxtFmtColl;
class SwGrfNode;
class SwFlyFrmFmt;
-class SwFrmFmt; // fuer GetTxtNodeFmts()
+class SwFrmFmt; // For GetTxtNodeFmts().
class SwCharFmt;
class SwExtTextInput;
-class SwRootFrm; // fuer CTOR
-class Graphic; // fuer GetGraphic
-class GraphicObject; // fuer GetGraphicObj
-class SwFmtINetFmt; // InsertURL
+class SwRootFrm; // For CTOR.
+class Graphic;
+class GraphicObject;
+class SwFmtINetFmt; // InsertURL.
class SwTable;
-class SwTextBlocks; // fuer GlossaryRW
+class SwTextBlocks; // For GlossaryRW.
class SwFmtFtn;
class SwSection;
class SwSectionData;
@@ -130,9 +130,8 @@ namespace sw {
#define GETSELTXT_PARABRK_KEEP 1
#define GETSELTXT_PARABRK_TO_ONLYCR 2
-/****************************************************************
- * zum Abfragen der INet-Attribute fuer den Navigator
- ****************************************************************/
+
+// For querying the INet-attributes for Navigator.
struct SwGetINetAttr
{
String sText;
@@ -144,13 +143,12 @@ struct SwGetINetAttr
};
SV_DECL_PTRARR_DEL( SwGetINetAttrs, SwGetINetAttr*, 0, 5 )
-/****************************************************************
- * Typen der Inhaltsformen
- ****************************************************************/
+// Types of forms of content.
#define CNT_TXT 0x0001
#define CNT_GRF 0x0002
#define CNT_OLE 0x0010
-/* Teste einen sal_uInt16 auf eine bestimmte Inhaltsform */
+
+// Test USHORT for a defined form of content.
#define CNT_HasTxt(USH) ((USH)&CNT_TXT)
#define CNT_HasGrf(USH) ((USH)&CNT_GRF)
#define CNT_HasOLE(USH) ((USH)&CNT_OLE)
@@ -159,19 +157,17 @@ class SW_DLLPUBLIC SwEditShell: public SwCrsrShell
{
static SvxSwAutoFmtFlags* pAutoFmtFlags;
- // fuer die privaten Methoden DelRange und die vom AutoCorrect
+ // For the private methods DelRange and those of AutoCorrect.
friend class SwAutoFormat;
friend void _InitCore();
friend void _FinitCore();
- // fuer die PamCorrAbs/-Rel Methoden
+ // For the PamCorrAbs/-Rel methods.
friend class SwUndo;
SW_DLLPRIVATE SfxPoolItem& _GetChrFmt( SfxPoolItem& ) const;
- /*
- * liefert einen Pointer auf einen SwGrfNode; dieser wird von
- * GetGraphic() und GetGraphicSize() verwendet.
- */
+ // Returns pointer to a SwGrfNode
+ // that will be used by GetGraphic() and GetGraphicSize().
SW_DLLPRIVATE SwGrfNode *_GetGrfNode() const ;
SW_DLLPRIVATE void DeleteSel( SwPaM& rPam, sal_Bool* pUndo = 0 );
@@ -182,76 +178,70 @@ class SW_DLLPUBLIC SwEditShell: public SwCrsrShell
using SwModify::GetInfo;
public:
- // Editieren (immer auf allen selektierten Bereichen)
+ // Edit (all selected ranges).
void Insert( sal_Unicode, sal_Bool bOnlyCurrCrsr = sal_False );
void Insert2( const String &, const bool bForceExpandHints = false );
void Overwrite( const String & );
- // Ersetz einen selektierten Bereich in einem TextNode mit dem
- // String. Ist fuers Suchen&Ersetzen gedacht.
- // bRegExpRplc - ersetze Tabs (\\t) und setze den gefundenen String
- // ein ( nicht \& )
- // z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
- // --> "xx\t<Tab>..zzz..&"
+ // Replace a selected range in a TextNode by given string.
+ // Meant for Search & Replace.
+ // bRegExpRplc - replace tabs (\\t) and insert found string (not \&).
+ // E.g.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
+ // --> "xx\t<Tab>..zzz..&"
sal_Bool Replace( const String& rNewStr, sal_Bool bRegExpRplc = sal_False );
- // loescht den Inhalt aller Bereiche;
- // werden ganze Nodes selektiert, werden die Nodes geloescht
+ // Delete content of all ranges.
+ // If whole nodes are selected, these nodes get deleted.
long Delete();
- // remove a complete paragraph
+ // Remove a complete paragraph.
sal_Bool DelFullPara();
- // change text to Upper/Lower/Hiragana/Katagana/...
+ // Change text to Upper/Lower/Hiragana/Katagana/...
void TransliterateText( sal_uInt32 nType );
- // count words in current selection
+ // Count words in current selection.
void CountWords( SwDocStat& rStat ) const;
- // loesche den nicht sichtbaren Content aus dem Document, wie z.B.:
- // versteckte Bereiche, versteckte Absaetze
+ // Delete non-visible content in the document.
+ // E.g. hidden ranges, hidden paragraphs.
sal_Bool RemoveInvisibleContent();
- // replace fields by text - mailmerge support
+ // Replace fields by text - mailmerge support.
sal_Bool ConvertFieldsToText();
- // set all numbering start points to a fixed value - mailmerge support
+
+ // Set all numbering start points to a fixed value - mailmerge support.
void SetNumberingRestart();
- // embedded alle lokalen Links (Bereiche/Grafiken)
+ // Embedds all local links (ranges/graphics).
sal_uInt16 GetLinkUpdMode(sal_Bool bDocSettings = sal_False) const;
void SetLinkUpdMode( sal_uInt16 nMode );
- // kopiere den Inhalt aller Bereiche an die akt. Cursor-Position
- // in die angegebene Shell
+ // Copy content of all ranges at current position of cursor to given Shell.
long Copy( SwEditShell* pDestShell = 0 );
- // fuers Kopieren uebers ClipBoard:
- // wird Tabelle in Tabelle kopiert, verschiebe aus dieser dann
- // alle Cursor. Copy und Paste muss aufgrund der FlyFrames in
- // der FEShell stehen!
- // kopiere alle Selectionen und das Doc
- //JP 21.10.96: und fuer die SVX-Autokorrektur
+ // For copying via ClipBoard:
+ // If table is copied into table, move all cursors away from it.
+ // Copy and Paste must be in FEShell because of FlyFrames!
+ // Copy all selections and the document.
sal_Bool _CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pNdInsPos = 0 );
long SplitNode( sal_Bool bAutoFormat = sal_False, sal_Bool bCheckTableStart = sal_True );
sal_Bool AppendTxtNode();
void AutoFmtBySplitNode();
- // ist der Cursor in einem INetAttribut, dann wird das komplett
- // geloescht; inclusive des Hinweistextes (wird beim Drag&Drop gebraucht)
+ // If cursor is in a INetAttribute it will be deleted completely
+ // including the descriptive text (needed at drag & drop).
sal_Bool DelINetAttrWithText();
- // ist der Cursor am Ende einer Zeichenvorlage, an der das DontExpand-Flag
- // noch nicht gesetzt ist, wird dies gesetzt ( => return sal_True; )
+ // If Cursor is at the end of a character style in which the DontExpand-flag
+ // is not yet set, the latter will be set (==> return TRUE).
sal_Bool DontExpandFmt();
- // Anwenden / Entfernen von Attributen
- // liefert Attribute im angeforderten AttributSet. Wenn nicht eindeutig
- // steht im Set ein DONT_CARE !!
- // --> OD 2008-01-16 #newlistlevelattrs#
- // Renaming method to <GetCurAttr(..)> indicating that the attributes at
- // the current cursors are retrieved.
- // Introduce 2nd optional parameter <bMergeIndentValuesOfNumRule>.
+ // Apply / remove attributes.
+ // Returns attributs in required AttributeSet.
+ // When not unambiguous the set has a DONT_CARE !!
+ // 2nd optional parameter <bMergeIndentValuesOfNumRule>.
// If <bMergeIndentValuesOfNumRule> == sal_True, the indent attributes of
// the corresponding list level of an applied list style is merged into
// the requested item set as a LR-SPACE item, if corresponding node has not
@@ -259,23 +249,22 @@ public:
// level is SvxNumberFormat::LABEL_ALIGNMENT.
sal_Bool GetCurAttr( SfxItemSet& ,
const bool bMergeIndentValuesOfNumRule = false ) const;
- // <--
void SetAttr( const SfxPoolItem&, sal_uInt16 nFlags = 0 );
void SetAttr( const SfxItemSet&, sal_uInt16 nFlags = 0 );
- // Setze das Attribut als neues default Attribut im Dokument.
+ // Set attribute as new default attribute in document.
void SetDefault( const SfxPoolItem& );
- // Erfrage das Default Attribut vom Dokument.
+ // Query default attribute of document.
const SfxPoolItem& GetDefault( sal_uInt16 nFmtHint ) const;
void ResetAttr( const SvUShortsSort* pAttrs = 0 );
void GCAttr();
- // returns the scripttpye of the selection
+ // Returns the scripttpye of the selection.
sal_uInt16 GetScriptType() const;
- // returns the language at current cursor position
+ // Returns the language at current cursor position.
sal_uInt16 GetCurLang() const;
// TABLE
@@ -292,14 +281,14 @@ public:
SwCharFmt* FindCharFmtByName( const String& rName ) const;
- /* Formatcollections, neu */
- /* GetXXXCount() liefert die Anzahl der im Dokument vorhandenen XXX
- * GetXXX(i) liefert das i-te XXX (ERR_RAISE bei Ueberindizierung!)
- * DelXXX(i) loescht das i-te XXX (ERR_RAISE bei Ueberindizierung!)
- * GetCurXXX() liefert das am Cursor oder in den Bereichen
- * geltende XXX (0, wenn nicht eindeutig!)
- * SetXXX() setzt am Cursor oder in den Bereichen das XXX
- * MakeXXX() macht ein XXX, abgeleitet vom pDerivedFrom
+ /* FormatCollections (new) - Explaining the general naming pattern:
+ * GetXXXCount() returns the count of xxx in the document.
+ * GetXXX(i) returns i-th xxx (ERR_RAISE if beyond range!).
+ * DelXXX(i) delets i-th xxx (ERR_RAISE if beyond range!).
+ * GetCurXXX() returns xxx that is valid at cursor or in ranges.
+ * returns 0, if not unanimuous.
+ * SetXXX() sets xxx at cursor or in ranges.
+ * MakeXXX() makes a xxx, derived from pDerivedFrom.
*/
// TXT
@@ -307,38 +296,38 @@ public:
sal_uInt16 GetTxtFmtCollCount() const;
SwTxtFmtColl& GetTxtFmtColl( sal_uInt16 nTxtFmtColl) const;
SwTxtFmtColl* GetCurTxtFmtColl() const;
- // --> OD 2007-11-06 #i62675#
+
+ // #i62675#
// Add 2nd optional parameter <bResetListAttrs> - see also <SwDoc::SetTxtFmtColl(..)>
void SetTxtFmtColl( SwTxtFmtColl*,
bool bResetListAttrs = false );
- // <--
SwTxtFmtColl *MakeTxtFmtColl(const String &rFmtCollName,
SwTxtFmtColl *pDerivedFrom = 0);
void FillByEx(SwTxtFmtColl*, sal_Bool bReset = sal_False);
SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const;
- // Gebe die "Auto-Collection" mit der Id zurueck. Existiert
- // sie noch nicht, dann erzuege sie
+ // Return "Auto-Collection" with given Id. If it does not exist create it.
SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId );
- // return das geforderte automatische Format - Basis-Klasse !
+
+ // Return required automatic format base class.
SwFmt* GetFmtFromPool( sal_uInt16 nId );
- // returne die geforderte automatische Seiten-Vorlage
+
+ // Return required automatic page style.
SwPageDesc* GetPageDescFromPool( sal_uInt16 nId );
- // erfrage ob die Absatz-/Zeichen-/Rahmen-/Seiten - Vorlage benutzt wird
+ // Query if the paragraph-/character-/frame-/page-style is used.
sal_Bool IsUsed( const SwModify& ) const;
- // returne das geforderte automatische Format
+ // Return required automatic format.
SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId )
{ return (SwFrmFmt*)SwEditShell::GetFmtFromPool( nId ); }
SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId )
{ return (SwCharFmt*)SwEditShell::GetFmtFromPool( nId ); }
- // Felder
void Insert2(SwField&, const bool bForceExpandHints = false);
SwField* GetCurFld() const;
- void UpdateFlds( SwField & ); // ein einzelnes Feld
+ void UpdateFlds( SwField & ); // One single field.
sal_uInt16 GetFldTypeCount(sal_uInt16 nResId = USHRT_MAX, sal_Bool bUsed = sal_False) const;
SwFieldType* GetFldType(sal_uInt16 nId, sal_uInt16 nResId = USHRT_MAX, sal_Bool bUsed = sal_False) const;
@@ -351,7 +340,7 @@ public:
void ChangeAuthorityData(const SwAuthEntry* pNewData);
- // Datenbankinfo
+ // Database information.
SwDBData GetDBData() const;
const SwDBData& GetDBDesc() const;
void ChgDBData(const SwDBData& SwDBData);
@@ -361,7 +350,8 @@ public:
SvStringsDtor* pAllDBNames = 0 );
sal_Bool IsAnyDatabaseFieldInDoc()const;
- //check whether DB fields point to an available data source and returns it
+
+ // Check whether DB fields point to an available data source and returns it.
sal_Bool IsFieldDataSourceAvailable(String& rUsedDataSource) const;
void UpdateExpFlds(sal_Bool bCloseDB = sal_False);// nur alle ExpressionFelder updaten
void SetFixFields( sal_Bool bOnlyTimeDate = sal_False,
@@ -372,28 +362,28 @@ public:
SwFldUpdateFlags GetFldUpdateFlags(sal_Bool bDocSettings = sal_False) const;
void SetFldUpdateFlags( SwFldUpdateFlags eFlags );
- // fuer die Evaluierung der DBFelder (neuer DB-Manager)
+ // For evaluation of DB fields (new DB-manager).
SwNewDBMgr* GetNewDBMgr() const;
SwFieldType* InsertFldType(const SwFieldType &);
- // Aenderungen am Dokument?
+ // Changes in document?
sal_Bool IsModified() const;
void SetModified();
void ResetModified();
void SetUndoNoResetModified();
- // Dokument - Statistics
+ // Document - Statistics
void UpdateDocStat( SwDocStat& rStat );
- // Verzeichnismarke einfuegen loeschen
void Insert(const SwTOXMark& rMark);
+
void DeleteTOXMark(SwTOXMark* pMark);
- // Alle Markierungen am aktuellen SPoint ermitteln
+ // Get all marks at current SPoint.
sal_uInt16 GetCurTOXMarks(SwTOXMarks& rMarks) const ;
- // Verzeichnis einfuegen, und bei Bedarf erneuern
+ // Insert content table. Renew if required.
void InsertTableOf(const SwTOXBase& rTOX,
const SfxItemSet* pSet = 0);
sal_Bool UpdateTableOf(const SwTOXBase& rTOX,
@@ -409,110 +399,106 @@ public:
const SwTOXBase* GetTOX( sal_uInt16 nPos ) const;
sal_Bool DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes = sal_False );
- // nach einlesen einer Datei alle Verzeichnisse updaten
+ // After reading file update all content tables.
void SetUpdateTOX( sal_Bool bFlag = sal_True );
sal_Bool IsUpdateTOX() const;
- // Verzeichnis-Typen verwalten
+ // Manage types of content tables.
sal_uInt16 GetTOXTypeCount(TOXTypes eTyp) const;
const SwTOXType* GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const;
void InsertTOXType(const SwTOXType& rTyp);
- //AutoMark file
+ // AutoMark file
const String& GetTOIAutoMarkURL() const;
void SetTOIAutoMarkURL(const String& rSet);
void ApplyAutoMark();
- // Schluessel fuer die Indexverwaltung
+ // Key for managing index.
sal_uInt16 GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const;
void SetOutlineNumRule(const SwNumRule&);
const SwNumRule* GetOutlineNumRule() const;
- // Gliederung - hoch-/runterstufen
+
sal_Bool OutlineUpDown( short nOffset = 1 );
- // Gliederung - hoch-/runtermoven
+
sal_Bool MoveOutlinePara( short nOffset = 1);
- // Outlines and SubOutline are protected ?
+
sal_Bool IsProtectedOutlinePara() const;
- // Numerierung Aufzaehlunglisten
- // liefert Regelwerk der aktuellen Aufzaehlung (sal_False sonst)
+ // Returns numbering rulse pf current enumeration list (else FALSE).
const SwNumRule* GetCurNumRule() const;
- // setzt, wenn noch keine Numerierung, sonst wird geaendert
- // arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren
- // --> OD 2008-02-08 #newlistlevelattrs#
+ // If there is not already a numbering, set one, else change.
+ // Works with old and new rules. Update only differences.
// Add optional parameter <bResetIndentAttrs> (default value sal_False).
// If <bResetIndentAttrs> equals true, the indent attributes "before text"
// and "first line indent" are additionally reset at the current selection,
// if the list style makes use of the new list level attributes.
- // --> OD 2008-03-17 #refactorlists#
// introduce parameters <bCreateNewList> and <sContinuedListId>
// <bCreateNewList> indicates, if a new list is created by applying the
// given list style.
// If <bCreateNewList> equals sal_False, <sContinuedListId> may contain the
- // list Id of a list, which has to be continued by applying the given list style
+ // list Id of a list, which has to be continued by applying the given list style.
void SetCurNumRule( const SwNumRule&,
const bool bCreateNewList /*= false*/,
const String sContinuedListId = String(),
const bool bResetIndentAttrs = false );
- // <--
- // Absaetze ohne Numerierung, aber mit Einzuegen
+
+ // Paragraphs without enumeration but with indents.
sal_Bool NoNum();
- // Loeschen, Splitten der Aufzaehlungsliste
+
+ // Delete, split enumeration list.
void DelNumRules();
- // Hoch-/Runterstufen
+
sal_Bool NumUpDown( sal_Bool bDown = sal_True );
- // Hoch-/Runtermoven sowohl innerhalb als auch ausserhalb von Numerierungen
+
sal_Bool MoveParagraph( long nOffset = 1);
sal_Bool MoveNumParas( sal_Bool bUpperLower, sal_Bool bUpperLeft );
- // No-/Numerierung ueber Delete/Backspace ein/abschalten #115901#
+
+ // Switch on/off of numbering via Delete/Backspace.
sal_Bool NumOrNoNum( sal_Bool bDelete = sal_False, sal_Bool bChkStart = sal_True);
- // -> #i23726#
- // --> OD 2008-06-09 #i90078#
+
+ // #i23726#
+ // #i90078#
// Remove unused default parameter <nLevel> and <bRelative>.
// Adjust method name and parameter name
void ChangeIndentOfAllListLevels( short nDiff );
// Adjust method name
void SetIndent(short nIndent, const SwPosition & rPos);
- // <--
sal_Bool IsFirstOfNumRule() const;
sal_Bool IsFirstOfNumRule(const SwPaM & rPaM) const;
- // <- #i23726#
sal_Bool IsNoNum( sal_Bool bChkStart = sal_True ) const;
- // returne den Num-Level des Nodes, in dem sich der Point vom
- // Cursor befindet. Return kann sein :
- // - NO_NUMBERING, 0..MAXLEVEL-1, NO_NUMLEVEL .. NO_NUMLEVEL|MAXLEVEL-1
- // --> OD 2008-02-29 #refactorlists# - removed <pHasChilds>
-// sal_uInt8 GetNumLevel( sal_Bool* pHasChilds = 0 ) const;
+
+ // Return Num-Level of the node in which point of cursor is.
+ // Return values can be: NO_NUMBERING,
+ // 0..MAXLEVEL-1, NO_NUMLEVEL .. NO_NUMLEVEL|MAXLEVEL-1
sal_uInt8 GetNumLevel() const;
- // <--
- // detect highest and lowest level to check moving of outline levels
+
+ // Detect highest and lowest level to check moving of outline levels.
void GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower );
- // get Outline level of current paragraph
+ // Get Outline level of current paragraph.
int GetCurrentParaOutlineLevel( ) const;// #outlinelevel add by zhaojianwei
- // -> i29560
+ // i29560
sal_Bool HasNumber() const;
sal_Bool HasBullet() const;
- // <- i29560
String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const;
void ChgNumRuleFmts( const SwNumRule& rRule );
- // setze und erfrage, ob an aktueller PointPos eine Numerierung mit
- // dem StartFlag startet
+
+ // Set (and query if) a numbering with StartFlag starts at current PointPos.
void SetNumRuleStart( sal_Bool bFlag = sal_True );
sal_Bool IsNumRuleStart() const;
void SetNodeNumStart( sal_uInt16 nStt );
- // --> OD 2008-02-29 #refactorlists#
+
sal_uInt16 GetNodeNumStart() const;
- // <--
+
sal_Bool ReplaceNumRule( const String& rOldRule, const String& rNewRule );
+
// Searches for a text node with a numbering rule.
- // --> OD 2008-03-18 #refactorlists# - add output parameter <sListId>
// in case a list style is found, <sListId> holds the list id, to which the
// text node belongs, which applies the found list style.
const SwNumRule * SearchNumRule(const bool bForward,
@@ -520,21 +506,20 @@ public:
const bool bOutline,
int nNonEmptyAllowed,
String& sListId );
- // <--
- // Undo
- // UndoHistory am Dokument pflegen
- // bei Save, SaveAs, Create wird UndoHistory zurueckgesetzt ???
+ // Undo.
+ // Maintain UndoHistory in Document.
+ // Reset UndoHistory at Save, SaveAs, Create ???
void DoUndo( sal_Bool bOn = sal_True );
sal_Bool DoesUndo() const;
void DoGroupUndo( sal_Bool bUn = sal_True );
sal_Bool DoesGroupUndo() const;
void DelAllUndoObj();
- // macht rueckgaengig:
- // setzt Undoklammerung auf, liefert nUndoId der Klammerung
+ // Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
SwUndoId StartUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 );
- // schliesst Klammerung der nUndoId, nicht vom UI benutzt
+
+ // Closes parenthesis of nUndoId, not used by UI.
SwUndoId EndUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 );
bool GetLastUndoInfo(::rtl::OUString *const o_pStr,
@@ -552,36 +537,35 @@ public:
bool Redo(sal_uInt16 const nCount = 1);
bool Repeat(sal_uInt16 const nCount);
- // fuer alle Sichten auf dieses Dokument
+
+ // For all views of this document.
void StartAllAction();
void EndAllAction();
- //Damit Start-/EndActions aufgesetzt werden koennen.
+ // To enable set up of StartActions and EndActions.
void CalcLayout();
- // Inhaltsform bestimmen, holen, liefert Type am CurCrsr->SPoint
+ // Determine form of content. Return Type at CurCrsr->SPoint.
sal_uInt16 GetCntType() const;
- sal_Bool HasOtherCnt() const; // gibt es Rahmen, Fussnoten, ...
- /* Anwenden der ViewOptions mit Start-/EndAction */
+ // Are there frames, footnotes, etc.
+ sal_Bool HasOtherCnt() const;
+
+ // Apply ViewOptions with Start-/EndAction.
inline void ApplyViewOptions( const SwViewOption &rOpt );
- // Text innerhalb der Selektion erfragen
- // Returnwert liefert sal_False, wenn der selektierte Bereich
- // zu gross ist, um in den Stringpuffer kopiert zu werden
- // oder andere Fehler auftreten
+ // Query text within selection.
+ // Returns FALSE, if selected range is too large to be copied
+ // into string buffer or if other errors occur.
sal_Bool GetSelectedText( String &rBuf,
int nHndlParaBreak = GETSELTXT_PARABRK_TO_BLANK );
- /*
- * liefert eine Graphic, wenn CurCrsr->Point() auf einen
- * SwGrfNode zeigt (und Mark nicht gesetzt ist oder auf die
- * gleiche Graphic zeigt), sonst gibt's was auf die Finger
- */
- // --> OD 2005-02-09 #119353# - robust
+ // Returns graphic, if CurCrsr->Point() points to a SwGrfNode
+ // (and mark is not set or points to the same graphic).
+
const Graphic* GetGraphic( sal_Bool bWait = sal_True ) const;
const GraphicObject* GetGraphicObj() const;
- // <--
+
sal_Bool IsGrfSwapOut( sal_Bool bOnlyLinked = sal_False ) const;
sal_uInt16 GetGraphicType() const;
@@ -592,85 +576,74 @@ public:
// notxtnode, it has to be deleted, e.g. cause the object has changed.
void ClearAutomaticContour();
- /*
- * liefert die Groesse einer Graphic in Twips, wenn der Cursor
- * auf einer Graphic steht; sal_Bool liefert sal_False, wenn s.o.
- */
+ // Returns the size of a graphic in Twips if cursor is in a graphic.
sal_Bool GetGrfSize(Size&) const;
- /*
- * liefert den Namen und den Filter einer Graphic, wenn der Cursor
- * auf einer Graphic steht, sonst gibt's was auf die Finger!
- * Ist ein String-Ptr != 0 dann returne den entsp. Namen
- */
+
+ // Returns name and filter of a graphic if the cursor is in a graphic,
+ // else give a rap on the knuckles!
+ // If a string-ptr != 0 return the respective name.
void GetGrfNms( String* pGrfName, String* pFltName,
const SwFlyFrmFmt* = 0 ) const;
- /*
- * erneutes Einlesen, falls Graphic nicht Ok ist. Die
- * aktuelle wird durch die neue ersetzt.
- */
+
+ // Re-read if graphic is not ok. Current graphic is replaced by the new one.
void ReRead( const String& rGrfName, const String& rFltName,
const Graphic* pGraphic = 0,
const GraphicObject* pGrafObj = 0 );
-// // alternativen Text einer Grafik/OLe-Objectes abfragen/setzen
-// const String& GetAlternateText() const;
-// void SetAlternateText( const String& rTxt );
-
- //eindeutige Identifikation des Objektes (fuer ImageMapDlg)
+ // Unique identification of object (for ImageMapDlg).
void *GetIMapInventor() const;
- // --> OD 2007-03-01 #i73788#
- // remove default parameter, because method always called this default value
- Graphic GetIMapGraphic() const; //liefert eine Graphic fuer alle Flys!
- // <--
+
+ // #i73788#
+ // Remove default parameter, because method always called this default value.
+ Graphic GetIMapGraphic() const; // Returns a graphic for all Flys!
const SwFlyFrmFmt* FindFlyByName( const String& rName, sal_uInt8 nNdTyp = 0 ) const;
- //liefert ein ClientObject, wenn CurCrsr->Point() auf einen
- //SwOLENode zeigt (und Mark nicht gesetzt ist oder auf das
- //gleiche ClientObject zeigt), sonst gibt's was auf die
- //Finger.
+ // Returns a ClientObject, if CurCrsr->Point() points to a SwOLENode
+ // (and mark is neither set not pointint to same ClientObject)
+ // else give rap on the knuckles.
svt::EmbeddedObjectRef& GetOLEObject() const;
- //Gibt es ein OleObject mit diesem Namen (SwFmt)?
+
+ // Is there an OLEObject with this name (SwFmt)?
sal_Bool HasOLEObj( const String &rName ) const;
- //Liefert den Pointer auf die Daten des Chart, indem sich der Crsr
- //befindet.
+ // Returns pointer to the data of the chart in which Cursr is.
void SetChartName( const String &rName );
- //Updaten der Inhalte aller Charts zu der Tabelle mit dem angegeben Namen
+ // Update content of all charts for table with given name.
void UpdateCharts( const String &rName );
- // aktuelles Wort erfragen
String GetCurWord();
- // Textbaustein aus dem Textbausteindokument in
- // das aktuelle Dokument, Vorlagen nur wenn es nicht schon gibt
+ // Glossary from glossary document in current document.
+ // Styles only if not already existent.
void InsertGlossary( SwTextBlocks& rGlossary, const String& );
- // aktuelle Selektion zum Textbaustein machen und ins
- // Textbausteindokument einfuegen, einschliesslich Vorlagen
+
+ // Make current selection glossary and insert into glossary document
+ // including styles.
sal_uInt16 MakeGlossary( SwTextBlocks& rToFill, const String& rName,
const String& rShortName, sal_Bool bSaveRelFile = sal_False,
const String* pOnlyTxt=0 );
- // speicher den gesamten Inhalt des Docs als Textbaustein
+
+ // Save complete content of doc as glossary.
sal_uInt16 SaveGlossaryDoc( SwTextBlocks& rGlossary, const String& rName,
const String& rShortName,
sal_Bool bSaveRelFile = sal_False,
sal_Bool bOnlyTxt = sal_False );
- // Linguistik
- // Selektionen sichern
+ // Linguistics...
+ // Save selections.
void HyphStart( SwDocPositions eStart, SwDocPositions eEnde );
- // Selektionen wiederherstellen
+
+ // restore selections.
void HyphEnd();
com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
HyphContinue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt );
- // zu trennendes Wort ignorieren
+
void HyphIgnore();
- // zum Einfuegen des SoftHyphens, Position ist der Offset
- // innerhalb des getrennten Wortes.
+ // For Inserting SoftHyphen. Position is offset within the syllabificated word.
void InsertSoftHyph( const xub_StrLen nHyphPos );
- //Tabelle
const SwTable& InsertTable( const SwInsertTableOptions& rInsTblOpts, // ALL_TBL_INS_ATTR
sal_uInt16 nRows, sal_uInt16 nCols,
sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL,
@@ -698,49 +671,53 @@ public:
sal_Bool IsTableBoxTextFormat() const;
String GetTableBoxText() const;
- // Change Modus erfragen/setzen
TblChgMode GetTblChgMode() const;
void SetTblChgMode( TblChgMode eMode );
- // Tabelle an der Cursor Position aufsplitten
+ // Split table at cursor position.
sal_Bool SplitTable( sal_uInt16 eMode );
- // Tabellen verbinden
- // CanMerge kann feststellen, ob Prev oder Next moeglich ist. Wird
- // der Pointer pChkNxtPrv uebergeben, wird festgestellt in welche
- // Richtung es moeglich ist.
+
+ // Merge tables.
+
+ // Can Merge checks if Prev or Next are possible.
+ // If pointer pChkNxtPrv is passed possible direction is given.
sal_Bool CanMergeTable( sal_Bool bWithPrev = sal_True, sal_Bool* pChkNxtPrv = 0 ) const;
sal_Bool MergeTable( sal_Bool bWithPrev = sal_True, sal_uInt16 nMode = 0 );
- // setze das InsertDB als Tabelle Undo auf:
+
+ // Set up InsertDB as table Undo.
void AppendUndoForInsertFromDB( sal_Bool bIsTable );
- /*
- functions used for spell checking and text conversion
- */
+ // Functions used for spell checking and text conversion.
- // Selektionen sichern
+ // Save selections.
void SpellStart( SwDocPositions eStart, SwDocPositions eEnde,
SwDocPositions eCurr, SwConversionArgs *pConvArgs = 0 );
- // Selektionen wiederherstellen
+
+ // Restore selections.
void SpellEnd( SwConversionArgs *pConvArgs = 0, bool bRestoreSelection = true );
::com::sun::star::uno::Any SpellContinue(
sal_uInt16* pPageCnt, sal_uInt16* pPageSt,
SwConversionArgs *pConvArgs = 0 );
- // spells on a sentence basis - the SpellPortions are needed
- // returns false if no error could be found
+ // Spells on a sentence basis - the SpellPortions are needed
+ // returns false if no error could be found.
bool SpellSentence(::svx::SpellPortions& rToFill, bool bIsGrammarCheck );
- // make SpellIter start with the current sentence when called next time
+
+ // Make SpellIter start with the current sentence when called next time.
void PutSpellingToSentenceStart();
- // moves the continuation position to the end of the currently checked sentence
+
+ // Moves the continuation position to the end of the currently checked sentence.
void MoveContinuationPosToEndOfCheckedSentence();
- //applies a changed sentence
- void ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck);
+ // Applies a changed sentence.
+ void ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck);
- // check SwSpellIter data to see if the last sentence got grammar checked
+ // Check SwSpellIter data to see if the last sentence got grammar checked.
bool HasLastSentenceGotGrammarChecked() const;
+
// Is text conversion active somewhere else?
sal_Bool HasConvIter() const;
+
// Is hyphenation active somewhere else?
sal_Bool HasHyphIter() const;
@@ -758,59 +735,59 @@ public:
void IgnoreGrammarErrorAt( SwPaM& rErrorPosition );
void SetLinguRange( SwDocPositions eStart, SwDocPositions eEnde );
- // returne zum Namen die im Doc gesetzte Referenz
+ // Return reference set in document according to given name.
const SwFmtRefMark* GetRefMark( const String& rName ) const;
- // returne die Namen aller im Doc gesetzten Referenzen
- // Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine RefMark
- // gesetzt ist
+
+ // Return names of all references set in document.
+ // If ArrayPointer == 0 then return only whether a RefMark is set in document.
sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const;
- // rufe die Autokorrektur auf
+ // Call AutoCorrect
void AutoCorrect( SvxAutoCorrect& rACorr, sal_Bool bInsertMode = sal_True,
sal_Unicode cChar = ' ' );
sal_Bool GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, String& rWord );
- // dann setze nach entsprechenden Regeln unsere Vorlagen
+ // Set our styles according to the respective rules.
void AutoFormat( const SvxSwAutoFmtFlags* pAFlags = 0 );
static SvxSwAutoFmtFlags* GetAutoFmtFlags();
static void SetAutoFmtFlags(SvxSwAutoFmtFlags *);
- // errechnet die Selektion
+ // Calculates selection.
String Calculate();
sal_Bool InsertURL( const SwFmtINetFmt& rFmt, const String& rStr,
sal_Bool bKeepSelection = sal_False );
sal_uInt16 GetINetAttrs( SwGetINetAttrs& rArr );
- //SS Fuer holen/ersetzen DropCap-Inhalt
String GetDropTxt( const sal_uInt16 nChars ) const;
void ReplaceDropTxt( const String &rStr );
- // may an outline be moved or copied?
- // Check whether it's in text body, not in table, and not read-only (move)
+ // May an outline be moved or copied?
+ // Check whether it's in text body, not in table, and not read-only (move).
sal_Bool IsOutlineMovable( sal_uInt16 nIdx ) const;
sal_Bool IsOutlineCopyable( sal_uInt16 nIdx ) const;
sal_uInt16 GetLineCount( sal_Bool bActPos = sal_True );
- // erfrage und setze den Fussnoten-Text/Nummer. Set.. auf akt. SSelection!
+ // Query and set footnote-text/number. Set.. to current SSelection!
sal_Bool GetCurFtn( SwFmtFtn* pToFillFtn = 0 );
bool SetCurFtn( const SwFmtFtn& rFillFtn );
bool HasFtns( bool bEndNotes = false ) const;
-//z.Zt nicht benoetigt sal_uInt16 GetFtnCnt( sal_Bool bEndNotes = sal_False ) const;
- // gebe Liste aller Fussnoten und deren Anfangstexte
+
sal_uInt16 GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes = false );
+ // Return list of all footnotes and their first portions of text.
SwSection const* InsertSection(
SwSectionData & rNewData, SfxItemSet const*const = 0 );
sal_Bool IsInsRegionAvailable() const;
const SwSection* GetCurrSection() const;
- // liefert wie GetCurrSection() den aktuellen Bereich, allerdings geht diese Funktion
- // ueber die Frames und erwischt dabei auch den Bereich, wenn der Cursor in einer
- // Fussnote steht, deren Referenz in einem spaltigen Bereich steckt.
- // Wenn man bOutOfTab setzt, wird der Bereich gesucht,
- // der die Tabelle umfasst, nicht etwa ein innerer.
+
+ // Returns current range like Cet CurrSection(). But this function iterates
+ // also over frames and catches the range even if the cursor is positioned in
+ // a footnote the reference of which is in a columned range.
+ // If bOutOfTab is set, the range comprising the table is searched
+ // and not an inner one.
const SwSection* GetAnySection( sal_Bool bOutOfTab = sal_False, const Point* pPt = 0 ) const;
sal_uInt16 GetSectionFmtCount() const;
@@ -825,15 +802,15 @@ public:
String GetUniqueSectionName( const String* pChkStr = 0 ) const;
- //Attribute setzen
+ // Set attributes.
void SetSectionAttr(const SfxItemSet& rSet, SwSectionFmt* pSectFmt = 0);
- // search inside the cursor selection for full selected sections.
+ // Search inside the cursor selection for full selected sections.
// if any part of section in the selection return 0.
- // if more than one in the selection return the count
+ // if more than one in the selection return the count.
sal_uInt16 GetFullSelectedSectionCount() const;
- // special insert: Insert a new text node just before or after a section or
+ // Special insert: Insert a new text node just before or after a section or
// table, if the cursor is positioned at the start/end of said
// section/table. The purpose of the method is to allow users to inert text
// at certain 'impossible' position, e.g. before a table at the document
@@ -841,7 +818,7 @@ public:
bool DoSpecialInsert();
bool CanSpecialInsert() const;
- // Optimierung UI
+ // Optimizing UI.
void SetNewDoc(sal_Bool bNew = sal_True);
sfx2::LinkManager& GetLinkManager();
@@ -853,12 +830,12 @@ public:
sal_Bool IsMoveLeftMargin( sal_Bool bRight = sal_True, sal_Bool bModulus = sal_True ) const;
void MoveLeftMargin( sal_Bool bRight = sal_True, sal_Bool bModulus = sal_True );
- // Numberformatter vom Doc erfragen
+ // Query NumberFormater from document.
SvNumberFormatter* GetNumberFormatter();
const SvNumberFormatter* GetNumberFormatter() const
{ return ((SwEditShell*)this)->GetNumberFormatter(); }
- // Schnitstellen fuers GlobalDokument
+ // Interfaces for GlobalDocument.
sal_Bool IsGlobalDoc() const;
void SetGlblDocSaveLinks( sal_Bool bFlag = sal_True );
sal_Bool IsGlblDocSaveLinks() const;
@@ -875,7 +852,7 @@ public:
sal_uInt16 nNewPos );
sal_Bool GotoGlobalDocContent( const SwGlblDocContent& rPos );
- // alles fuers Redlining
+ // For Redlining.
sal_uInt16 GetRedlineMode() const;
void SetRedlineMode( sal_uInt16 eMode );
sal_Bool IsRedlineOn() const;
@@ -883,59 +860,60 @@ public:
const SwRedline& GetRedline( sal_uInt16 nPos ) const;
sal_Bool AcceptRedline( sal_uInt16 nPos );
sal_Bool RejectRedline( sal_uInt16 nPos );
- // suche das Redline zu diesem Data und returne die Pos im Array
- // USHRT_MAX wird returnt, falls nicht vorhanden
+
+
+ // Search Redline for this Data and return position in array.
+ // If not found, return USHRT_MAX.
sal_uInt16 FindRedlineOfData( const SwRedlineData& ) const;
- // Kommentar am Redline an der Position setzen
+
+ // Set comment to Redline at position.
sal_Bool SetRedlineComment( const String& rS );
const SwRedline* GetCurrRedline() const;
- // Redline Anzeigeattribute wurden geaendert, Views updaten
+ // Redline attributes have been changed. Updated views.
void UpdateRedlineAttr();
- // vergleiche zwei Dokument mit einander
+ // Compare two documents.
long CompareDoc( const SwDoc& rDoc );
- // merge zweier Dokumente
+
+ // Merge two documents.
long MergeDoc( const SwDoc& rDoc );
- // Dokumentglobale Fussnoteneigenschaften
+ // Footnote attributes global to document.
const SwFtnInfo& GetFtnInfo() const;
void SetFtnInfo(const SwFtnInfo& rInfo);
const SwEndNoteInfo& GetEndNoteInfo() const;
void SetEndNoteInfo(const SwEndNoteInfo& rInfo);
- //Einstellungen fuer Zeilennummierung
const SwLineNumberInfo &GetLineNumberInfo() const;
void SetLineNumberInfo( const SwLineNumberInfo& rInfo);
- // Etiketten: Bereiche synchronisieren
+ // Labels: Synchronize ranges.
void SetLabelDoc( sal_Bool bFlag = sal_True );
sal_Bool IsLabelDoc() const;
- // Schnittstelle fuer die TextInputDaten - ( fuer die Texteingabe
- // von japanischen/chinesischen Zeichen)
+ // Interface for TextInputData - (for input of Japanese/Chinese chars.)
SwExtTextInput* CreateExtTextInput(LanguageType eInputLanguage);
String DeleteExtTextInput( SwExtTextInput* pDel = 0, sal_Bool bInsText = sal_True);
-// SwExtTextInput* GetExtTextInput() const;
void SetExtTextInputData( const CommandExtTextInputData& );
- // Schnistelle fuer den Zugriff auf die AutoComplete-Liste
+ // Interface for access to AutoComplete-list.
static SwAutoCompleteWord& GetAutoCompleteWords();
- // returns a scaling factor of selected text. Used for the rotated
+ // Returns a scaling factor of selected text. Used for the rotated
// character attribut dialog.
sal_uInt16 GetScalingOfSelectedText() const;
- // ctor/dtor
+ // Ctor/Dtor.
SwEditShell( SwDoc&, Window*, const SwViewOption *pOpt = 0 );
- // verkleideter Copy-Constructor
+
+ // Copy-Constructor in disguise.
SwEditShell( SwEditShell&, Window* );
virtual ~SwEditShell();
private:
- // fuer METWARE:
- // es wird nicht kopiert und nicht zugewiesen
+ // For METWARE: no copying and no assignment.
SwEditShell(const SwEditShell &);
const SwEditShell &operator=(const SwEditShell &);
};
@@ -950,10 +928,7 @@ inline void SwEditShell::ApplyViewOptions( const SwViewOption &rOpt )
inline const sfx2::LinkManager& SwEditShell::GetLinkManager() const
{ return ((SwEditShell*)this)->GetLinkManager(); }
-/*
- * Klasse fuer den automatisierten Aufruf von Start- und
- * EndAction();
- */
+// Class for automated call of Start- and EndAction().
class SwActKontext {
SwEditShell *pSh;
public:
@@ -963,10 +938,7 @@ public:
#define ACT_KONTEXT(x) SwActKontext _aActKontext_(x)
-/*
- * Klasse fuer den automatisierten Aufruf von Start- und
- * EndCrsrMove();
- */
+// Class for automated call of Start- and EndCrsrMove().
class SwMvKontext {
SwEditShell *pSh;
public:
@@ -979,3 +951,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/envelp.hrc b/sw/inc/envelp.hrc
index ce210d4b6f2b..b77e92e86cce 100644
--- a/sw/inc/envelp.hrc
+++ b/sw/inc/envelp.hrc
@@ -28,8 +28,6 @@
#ifndef _ENVELP_HRC
#define _ENVELP_HRC
-// #include -------------------------------------------------------------------
-
#include "rcid.hrc"
// Dialoge --------------------------------------------------------------------
@@ -81,14 +79,11 @@
#define STR_BTN_NEWDOC (RC_ENVLOP_BEGIN + 65)
#define STR_SENDER_TOKENS (RC_ENVLOP_BEGIN + 66)
-#define RC_ENVPRT_HC_BEGIN (RC_ENVLOP_BEGIN + 70)
-#define RC_ENVPRT_HC_END (RC_ENVLOP_BEGIN + 82)
-
// Ueberlaufpruefung ----------------------------------------------------------
#define ENVELP_ACT_END STR_SENDER_TOKENS
-#if ENVELP_ACT_END > RC_ENVPRT_HC_END
+#if ENVELP_ACT_END > STR_SENDER_TOKENS
#error Resource-Ueberlauf in #file, #line
#endif
diff --git a/sw/inc/error.h b/sw/inc/error.h
deleted file mode 100644
index 649deeb8a5be..000000000000
--- a/sw/inc/error.h
+++ /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.
- *
- ************************************************************************/
-
-#ifndef _SWERROR_H
-#define _SWERROR_H
-
-#define ERR_SWGBASE 25000
-
-/*** Error Codes **********************************************************/
-#define ERR_VAR_IDX (ERR_SWGBASE+ 0)
-#define ERR_OUTOFSCOPE (ERR_SWGBASE+ 1)
-
-/* Error Codes fuer Numerierungsregeln */
-#define ERR_NUMLEVEL (ERR_SWGBASE+ 2)
-
-/* Error Codes fuer TxtNode */
-#define ERR_NOHINTS (ERR_SWGBASE+ 3)
-
-// von _START bis _END sind in der COREDL.DLL entsprechende Strings
-// abgelegt, die erfragt werden koennen.
-#define ERR_SWGMSG_START (ERR_VAR_IDX)
-#define ERR_SWGMSG_END (ERR_NOHINTS)
-
-
-
-#endif
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index 38d9c56b3213..e80b2c264578 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,11 +43,10 @@ class SwFmtFld;
class _SetGetExpFlds;
class SwEditShell;
-// Vorwaertsdeklaration: besorge den "Body-TextNode", fuer Exp.Fld in Fly's
-// Header/Footers/Footnodes
+// Forward declaration: get "BodyTxtNode" for exp.fld in Fly's headers/footers/footnotes.
const SwTxtNode* GetBodyTxtNode( const SwDoc& pDoc, SwPosition& rPos,
const SwFrm& rFrm );
-// Wandlung Address -> Adressen
+
void ReplacePoint(String& sTmpName, sal_Bool bWithCommandType = sal_False);
struct _SeqFldLstElem
@@ -69,27 +69,18 @@ public:
sal_Bool SeekEntry( const _SeqFldLstElem& , sal_uInt16* pPos = 0 );
};
-/*--------------------------------------------------------------------
- Beschreibung: Ausdruck
- --------------------------------------------------------------------*/
-
class SwGetExpFieldType : public SwValueFieldType
{
public:
SwGetExpFieldType(SwDoc* pDoc);
virtual SwFieldType* Copy() const;
- // ueberlagert, weil das Get-Field nicht veraendert werden kann
- // und dann auch nicht aktualisiert werden muss. Aktualisierung
- // erfolgt beim Aendern von Set-Werten !
+ // Overlay, because get-field cannot be changed and therefore
+ // does not need to be updated. Update at changing of set-values!
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
};
-/*--------------------------------------------------------------------
- Beschreibung: GetExperession
- --------------------------------------------------------------------*/
-
class SW_DLLPUBLIC SwGetExpField : public SwFormulaField
{
String sExpand;
@@ -111,24 +102,26 @@ public:
inline const String& GetExpStr() const;
inline void ChgExpStr(const String& rExpand);
- // wird von der Formatierung abgefragt
+ // Called by formating.
inline sal_Bool IsInBodyTxt() const;
- // wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
+
+ // Set by UpdateExpFlds where node position is known.
inline void ChgBodyTxtFlag( sal_Bool bIsInBody );
- // fuer Felder in Header/Footer/Footnotes/Flys:
- // (wird nur von der Formatierung aufgerufen!!)
+
+ // For fields in header/footer/footnotes/flys:
+ // Only called by formating!!
void ChangeExpansion( const SwFrm&, const SwTxtFld& );
virtual String GetFieldName() const;
- // Die Formel aendern
+ // Change formula.
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
virtual sal_uInt16 GetSubType() const;
virtual void SetSubType(sal_uInt16 nType);
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
static sal_uInt16 GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc);
// #i82544#
@@ -141,26 +134,20 @@ inline void SwGetExpField::ChgExpStr(const String& rExpand)
inline const String& SwGetExpField::GetExpStr() const
{ return sExpand; }
-// wird von der Formatierung abgefragt
+// Called by formating.
inline sal_Bool SwGetExpField::IsInBodyTxt() const
{ return bIsInBodyTxt; }
-// wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
+// Set by UpdateExpFlds where node position is known.
inline void SwGetExpField::ChgBodyTxtFlag( sal_Bool bIsInBody )
{ bIsInBodyTxt = bIsInBody; }
-
-/*--------------------------------------------------------------------
- Beschreibung: Ausdruck setzen
- --------------------------------------------------------------------*/
-
class SwSetExpField;
class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType
{
String sName;
const SwNode* pOutlChgNd;
-// sal_Unicode cDelim;
String sDelim;
sal_uInt16 nType;
sal_uInt8 nLevel;
@@ -181,8 +168,7 @@ public:
sal_Bool IsDeleted() const { return bDeleted; }
void SetDeleted( sal_Bool b ) { bDeleted = b; }
- // ueberlagert, weil das Set-Field selbst dafuer sorgt, das
- // es aktualisiert wird.
+ // Overlay, because set-field takes care for its being updated by itself.
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
inline const String& GetSetRefName() const;
@@ -191,21 +177,20 @@ public:
sal_uInt16 GetSeqFldList( SwSeqFldList& rList );
String MakeSeqName( sal_uInt16 nSeqNo );
- // Seqencefelder ggfs. Kapitelweise numerieren
-// sal_Unicode GetDelimiter() const { return cDelim; }
-// void SetDelimiter( sal_Unicode c ) { cDelim = c; }
+ // Number sequence fields chapterwise if required.
const String& GetDelimiter() const { return sDelim; }
void SetDelimiter( const String& s ) { sDelim = s; }
sal_uInt8 GetOutlineLvl() const { return nLevel; }
void SetOutlineLvl( sal_uInt8 n ) { nLevel = n; }
void SetChapter( SwSetExpField& rFld, const SwNode& rNd );
- // Member nur fuers SwDoc::UpdateExpFld - wird nur waehrend der Laufzeit
- // von SequencefeldTypen benoetigt!!!
+
+ // Member only for SwDoc::UpdateExpFld.
+ // It is needed only at runtime of sequence field types!
const SwNode* GetOutlineChgNd() const { return pOutlChgNd; }
void SetOutlineChgNd( const SwNode* p ) { pOutlChgNd = p; }
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
inline void SwSetExpFieldType::SetType( sal_uInt16 nTyp )
@@ -221,10 +206,6 @@ inline const String& SwSetExpFieldType::GetSetRefName() const
{ return sName; }
-/*--------------------------------------------------------------------
- Beschreibung: Ausdruck
- --------------------------------------------------------------------*/
-
class SW_DLLPUBLIC SwSetExpField : public SwFormulaField
{
String sExpand;
@@ -259,18 +240,18 @@ public:
inline sal_Bool IsSequenceFld() const;
- // fuer SequenceFelder - logische Nummer
+ // Logical number, sequence fields.
inline void SetSeqNumber( sal_uInt16 n ) { nSeqNo = n; }
inline sal_uInt16 GetSeqNumber() const { return nSeqNo; }
- // Der Name nur erfragen
+ // Query name only.
virtual const String& GetPar1() const;
- // Die Formel
+ // Query formula.
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
inline const String& SwSetExpField::GetExpStr() const
@@ -294,9 +275,6 @@ inline sal_Bool SwSetExpField::GetInputFlag() const
inline sal_Bool SwSetExpField::IsSequenceFld() const
{ return 0 != (nsSwGetSetExpType::GSE_SEQ & ((SwSetExpFieldType*)GetTyp())->GetType()); }
-/*--------------------------------------------------------------------
- Beschreibung: Eingabe im Text/Variable setzen
- --------------------------------------------------------------------*/
class SwInputFieldType : public SwFieldType
{
@@ -309,9 +287,6 @@ public:
SwDoc* GetDoc() const { return pDoc; }
};
-/*--------------------------------------------------------------------
- Beschreibung: Eingabefeld
- --------------------------------------------------------------------*/
class SW_DLLPUBLIC SwInputField : public SwField
{
@@ -325,7 +300,7 @@ class SW_DLLPUBLIC SwInputField : public SwField
virtual SwField* Copy() const;
public:
- // Direkte Eingabe ueber Dialog alten Wert loeschen
+ // Direct input via dialog; delete old value.
SwInputField(SwInputFieldType*, const String& rContent ,
const String& rPrompt, sal_uInt16 nSubType = 0,
sal_uLong nFmt = 0);
@@ -350,8 +325,8 @@ public:
virtual sal_uInt16 GetSubType() const;
virtual void SetSubType(sal_uInt16 nSub);
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -371,12 +346,11 @@ public:
void PushCrsr();
void PopCrsr();
- // vergleiche TmpLst mit akt Feldern. Alle neue kommen in die SortLst
- // damit sie geupdatet werden koennen. Returnt die Anzahl.
- // (Fuer Textbausteine: nur seine Input-Felder aktualisieren)
+ // Put all that are new into SortLst for updating. Returns count.
+ // (For Glossary: only update its input-fields).
+ // Compare TmpLst with current fields.
sal_uInt16 BuildSortLst();
- // Alle unselektierten Felder aus Liste entfernen
void RemoveUnselectedFlds();
private:
@@ -385,11 +359,7 @@ private:
SvPtrarr aTmpLst;
};
-/*--------------------------------------------------------------------
- Beschreibung: Tabellen-Formelfeld
- (Implementierung steht in tblcalc.cxx)
- --------------------------------------------------------------------*/
-
+// Implementation in tblcalc.cxx.
class SwTblFieldType : public SwValueFieldType
{
public:
@@ -398,11 +368,6 @@ public:
};
-// MSC will den hier nicht
-//typedef void (SwField:: *FnScanFormel)( const SwTable&, String&,
-// String&, String* = 0, void* = 0 );
-
-
class SwTblField : public SwValueField, public SwTableFormula
{
String sExpand;
@@ -411,7 +376,7 @@ class SwTblField : public SwValueField, public SwTableFormula
virtual String Expand() const;
virtual SwField* Copy() const;
- // suche den TextNode, in dem das Feld steht
+ // Search TextNode containing the field.
virtual const SwNode* GetNodeOfFormula() const;
String GetCommand();
@@ -427,17 +392,18 @@ public:
const String& GetExpStr() const { return sExpand; }
void ChgExpStr(const String& rStr) { sExpand = rStr; }
- // berechne sich selbst
void CalcField( SwTblCalcPara& rCalcPara );
virtual String GetFieldName() const;
- // Die Formel
+ // The formula.
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
#endif // SW_EXPFLD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/extinput.hxx b/sw/inc/extinput.hxx
index dba9bb5b5e2c..9ce347e37902 100644
--- a/sw/inc/extinput.hxx
+++ b/sw/inc/extinput.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,4 @@ public:
#endif //_EXTINPUT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx
index 0b9cc9150227..48c7590dec11 100644
--- a/sw/inc/fchrfmt.hxx
+++ b/sw/inc/fchrfmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,7 +43,7 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtCharFmt: public SfxPoolItem, public SwClient
{
friend class SwTxtCharFmt;
- SwTxtCharFmt* pTxtAttr; // mein TextAttribut
+ SwTxtCharFmt* pTxtAttr; // My text attribute.
public:
SwFmtCharFmt() : pTxtAttr(0) {}
@@ -60,7 +61,7 @@ public:
TYPEINFO();
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -69,10 +70,10 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
- // an das SwTxtCharFmt weiterleiten (vom SwClient)
+ // Pass to SwTxtCharFmt (from SwClient).
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
@@ -81,3 +82,4 @@ public:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 0d659aee244d..d7b646c678b6 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,6 @@
#include <editsh.hxx>
#include <flyenum.hxx>
-// OD 25.06.2003 #108784#
#include <svx/svdtypes.hxx>
#include <svtools/embedhlp.hxx>
@@ -102,16 +102,15 @@ namespace svx
#define GOTOOBJ_GOTO_ANY (sal_uInt16) 31
//! values can be combined via logival or
-#define FLYPROTECT_CONTENT (sal_uInt16) 1 // kann verodert werden!
+#define FLYPROTECT_CONTENT (sal_uInt16) 1
#define FLYPROTECT_SIZE (sal_uInt16) 2
#define FLYPROTECT_POS (sal_uInt16) 4
-#define FLYPROTECT_PARENT (sal_uInt16) 8 // nur Parents untersuchen
-#define FLYPROTECT_FIXED (sal_uInt16) 16 // nur nicht aufhebbarer Schutz
- // z.B. durch OLE-Server, gilt auch
- // fuer Dialog
+#define FLYPROTECT_PARENT (sal_uInt16) 8 // Check only parents.
+#define FLYPROTECT_FIXED (sal_uInt16) 16 // Only protection that cannot be withdrawn
+ // e.g. by OLE-server; also relevant for dialog.
-
-enum ObjCntType //Fuer das Ermitteln des Cntnts per Positon (D&D)
+// For figuring out contents by position (D&D)
+enum ObjCntType
{
OBJCNT_NONE,
OBJCNT_FLY,
@@ -122,26 +121,24 @@ enum ObjCntType //Fuer das Ermitteln des Cntnts per Positon (D&D)
OBJCNT_URLBUTTON,
OBJCNT_GROUPOBJ,
- OBJCNT_DONTCARE // nicht bestimmbar - unterschiedliche Objecte selektiert
+ OBJCNT_DONTCARE // Not determinable - different objects are selected.
};
-//fuer GetAnyCurRect
+//For GetAnyCurRect
enum CurRectType
{
- RECT_PAGE, //Rect der aktuellen Seite.
- RECT_PAGE_CALC, //... Seite wird ggf. Formatiert
- RECT_PAGE_PRT, //Rect der aktuellen PrtArea der Seite
- RECT_FRM, //Rect des aktuellen Rahmen
- RECT_FLY_EMBEDDED, //Rect des aktuellen FlyFrm
- RECT_FLY_PRT_EMBEDDED, //Rect der PrtArea des FlyFrm
- RECT_SECTION, //Rect des aktuellen Bereichs
- RECT_OUTTABSECTION, //Rect des aktuellen Bereichs,
- // aber ausserhalb der Tabelle
- RECT_SECTION_PRT, //Rect der aktuellen PrtArea des Bereichs
- RECT_OUTTABSECTION_PRT, //Rect der aktuellen PrtArea des Bereichs,
- // aber ausserhalb der Tabelle
- RECT_HEADERFOOTER, //Rect des aktuellen Headers/Footer
- RECT_HEADERFOOTER_PRT, //Rect der PrtArea des aktuellen Headers/Footers
+ RECT_PAGE, // Rect of current page.
+ RECT_PAGE_CALC, // ... page will be formated if required.
+ RECT_PAGE_PRT, // Rect of current PrtArea of page.
+ RECT_FRM, // Rect of current frame.
+ RECT_FLY_EMBEDDED, // Rect of current FlyFrm.
+ RECT_FLY_PRT_EMBEDDED, // Rect of PrtArea of FlyFrm
+ RECT_SECTION, // Rect of current section.
+ RECT_OUTTABSECTION, // Rect of current section but outside of table.
+ RECT_SECTION_PRT, // Rect of current PrtArea of section.
+ RECT_OUTTABSECTION_PRT, // Rect of current PrtArea of section but outside table.
+ RECT_HEADERFOOTER, // Rect of current header/footer
+ RECT_HEADERFOOTER_PRT, // Rect of PrtArea of current headers/footers
RECT_PAGES_AREA //Rect covering the pages area
};
@@ -171,7 +168,7 @@ struct SwGetCurColNumPara
#define SW_TABCOL_VERT 2
#define SW_TABROW_HORI 3
#define SW_TABROW_VERT 4
-// --> FME 2004-07-30 #i32329# Enhanced table selection
+
#define SW_TABSEL_HORI 5
#define SW_TABSEL_HORI_RTL 6
#define SW_TABROWSEL_HORI 7
@@ -180,7 +177,6 @@ struct SwGetCurColNumPara
#define SW_TABSEL_VERT 10
#define SW_TABROWSEL_VERT 11
#define SW_TABCOLSEL_VERT 12
-// <--
class SdrDropMarkerOverlay;
@@ -192,19 +188,18 @@ class SW_DLLPUBLIC SwFEShell : public SwEditShell
SW_DLLPRIVATE SwFlyFrm *FindFlyFrm() const;
SW_DLLPRIVATE SwFlyFrm *FindFlyFrm( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const;
- //Actions fuer alle Shells beenden und ChangeLink rufen.
+ // Terminate actions for all shells and call ChangeLink.
SW_DLLPRIVATE void EndAllActionAndCall();
SW_DLLPRIVATE void ScrollTo( const Point &rPt );
- // OD 25.06.2003 #108784# - correct type of 1st parameter
SW_DLLPRIVATE void ChangeOpaque( SdrLayerID nLayerId );
// Used for mouse operations on a table:
// Returns a cell frame that is 'close' to rPt.
SW_DLLPRIVATE const SwFrm *GetBox( const Point &rPt, bool* pbRow = 0, bool* pbCol = 0 ) const;
- //0 == in keiner Spalte
+ // 0 == not in any column.
SW_DLLPRIVATE sal_uInt16 _GetCurColNum( const SwFrm *pFrm,
SwGetCurColNumPara* pPara ) const;
@@ -215,13 +210,13 @@ class SW_DLLPUBLIC SwFEShell : public SwEditShell
SW_DLLPRIVATE ObjCntType GetObjCntType( const SdrObject& rObj ) const;
- // Methoden fuers kopieren von DrawObjecten
+ // Methods for copying of draw objects.
SW_DLLPRIVATE sal_Bool CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
const Point& rInsPt, sal_Bool bIsMove,
sal_Bool bSelectInsert );
- // get list of marked SdrObjects;
- // helper method for GetSelFrmType, IsSelContainsControl
+ // Get list of marked SdrObjects;
+ // helper method for GetSelFrmType, IsSelContainsControl.
SW_DLLPRIVATE const SdrMarkList* _GetMarkList() const;
SW_DLLPRIVATE sal_Bool CheckHeadline( bool bRepeat ) const;
@@ -237,43 +232,43 @@ public:
SwFEShell( SwEditShell& rShell, Window *pWin );
virtual ~SwFEShell();
- // Copy und Paste Methoden fuer das interne Clipboard
+ // Copy and Paste methods for internal clipboard.
sal_Bool Copy( SwDoc* pClpDoc, const String* pNewClpTxt = 0 );
sal_Bool Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames = sal_False);
- //paste some pages into another doc - used in mailmerge
+
+ //Paste some pages into another doc - used in mailmerge.
sal_Bool PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage);
- // Copy-Methode fuer Drag&Drop
+
+ // Copy-Method for Drag&Drop
sal_Bool Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt,
sal_Bool bIsMove = sal_False, sal_Bool bSelectInsert = sal_True );
void SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew = sal_False );
- // befindet sich der selektierte Rahmen innerhalb eines anderen?
+ // Is selected frame within another frame?
const SwFrmFmt* IsFlyInFly();
-//SS fuer DrawObjekte und Rahmen-----------------------------
- //Wenn ein Objekt angegeben wurde, so wird genau diese Markiert (anstatt
- //ueber die Position zu suchen.
+ // If an object as been given, exactly this object is selected
+ // (instead of searching over position).
sal_Bool SelectObj( const Point& rSelPt, sal_uInt8 nFlag = 0, SdrObject *pObj = 0 );
void DelSelectedObj();
- //Selektion nach oben unten bewegen (Z-Order).
- //sal_True == ganz nach oben/unten
- //sal_False == einen ueberholen
+ // Move selection upwards or downwards (Z-Order).
+ // TRUE = to top or bottom.
+ // FALSE = run past one other.
void SelectionToTop ( sal_Bool bTop = sal_True );
void SelectionToBottom( sal_Bool bBottom = sal_True );
- short GetLayerId() const; //1 Heaven, 0 Hell, -1 Uneindeutig
- void SelectionToHeaven(); //Ueber dem Dokument
- void SelectionToHell(); //Unter dem Dokument
+ short GetLayerId() const; // 1 Heaven, 0 Hell, -1 Ambiguous.
+ void SelectionToHeaven(); // Above document.
+ void SelectionToHell(); // Below document.
- // folgende zwei Methoden returnen den enum SdrHdlKind, um sich ein
- // includen von SVDRAW.HXX zu ersparen als int deklariert.
+ // The following two methods return enum SdrHdlKind.
+ // Declared as int in order to spare including SVDRAW.HXX.
bool IsObjSelectable( const Point& rPt );
int IsInsideSelectedObj( const Point& rPt ); //!! returns enum values
- // #107513#
// Test if there is a draw object at that position and if it should be selected.
// The 'should' is aimed at Writer text fly frames which may be in front of
// the draw object.
@@ -286,14 +281,14 @@ public:
// sophisticated one day.
bool IsDirectlyInSection() const;
- //Returnwerte siehe oben FrmType.
- //pPt: Crsr bzw. DocPos; bStopAtFly: Bei Flys anhalten oder ueber den Anchor weitergehen
- // Obgleich (0,sal_True) eine Art Standard ist, sind die Parameter nicht defaultet, damit
- // bei jeder Benutzung insbesondere das bStopAtFly bewusst genutzt wird.
+ // For return valies see above FrmType.
+ // pPt: Cursr or DocPos respectively; bStopAtFly: Stop at flys or continue over anchor.
+ // Although (0,TRUE) is kind of a standard, the parameters are not defaulted here
+ // in order to force more conscious use especially of bStopAtFly.
sal_uInt16 GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const;
sal_uInt16 GetSelFrmType() const; //Selektion (Drawing)
- /** #108784# check whether selected frame contains a control;
+ /** check whether selected frame contains a control;
* companion method to GetSelFrmType, used for preventing
* drag&drop of controls into header */
bool IsSelContainsControl() const;
@@ -301,15 +296,15 @@ public:
ObjCntType GetObjCntType( const Point &rPt, SdrObject *&rpObj ) const;
ObjCntType GetObjCntTypeOfSelection( SdrObject** ppObj = 0 ) const;
- //Zum Anpassen der PosAttr bei Ankerwechseln.
+ // For adjustment of PosAttr when anchor changes.
SwRect GetObjRect() const;
- //Zum Verschieben von Flys mit der Tastatur
+
+ // For moving flys with keyboard.
SwRect GetFlyRect() const;
- // OD 18.09.2003 #i17567#, #108749#, #110354# - adjustments to allow
- // negative vertical positions for fly frames anchored
+ // i#17567 - adjustments to allow negative vertical positions for fly frames anchored
// to paragraph or to character.
- // OD 02.10.2003 #i18732# - adjustments for new option 'FollowTextFlow'
- // OD 12.11.2003 #i22341# - adjustments for new vertical alignment at top of line
+ // i#18732 - adjustments for new option 'FollowTextFlow'
+ // i#22341 - adjustments for new vertical alignment at top of line
void CalcBoundRect( SwRect& _orRect,
const RndStdIds _nAnchorId,
const sal_Int16 _eHoriRelOrient = com::sun::star::text::RelOrientation::FRAME,
@@ -320,7 +315,7 @@ public:
Point* _opRef = NULL,
Size* _opPercent = NULL ) const;
- // Groesse von Drawobjekten setzen
+ // Set size of draw objects.
void SetObjRect( const SwRect& rRect );
long BeginDrag( const Point *pPt, sal_Bool bProp );
@@ -328,42 +323,39 @@ public:
long EndDrag ( const Point *pPt, sal_Bool bProp );
void BreakDrag();
- //Methoden fuer die Statuszeile.
- Point GetAnchorObjDiff() const; //Abstand zum Anker
- Point GetObjAbsPos() const; //Absolute Position
- Size GetObjSize() const; //Groesse, ggf. die umschliessende
+ //Methods for status line.
+ Point GetAnchorObjDiff() const;
+ Point GetObjAbsPos() const;
+ Size GetObjSize() const;
- //SS fuer die BriefUmschlaege: hole alle Seitengebundenen Objekte
- //und setze diese auf eine neue Seite.
+ // SS for envelopes: get all page-bound objects and set them to new page.
void GetPageObjs( SvPtrarr& rFillArr );
void SetPageObjsNewPage( SvPtrarr& rFillArr, int nOffset = 1 );
- // zeige die aktuelle Selektion an ( ggfs. den Rahmen/DrawObject)
+ // Show current selection (frame / draw object as required).
virtual void MakeSelVisible();
- // returne das FrmFmt von dem evt. unter dem Point stehenden Object.
- // Das Object wird nicht selektiert!
+ // Return FrmFmt of object that may be under Point.
+ // Object does not become selected!
const SwFrmFmt* GetFmtFromObj( const Point& rPt, SwRect** pRectToFill = 0 ) const;
- // returns a format too, if the point is over the text of any fly
+
+ // Returns a format too, if the point is over the text of any fly.
const SwFrmFmt* GetFmtFromAnyObj( const Point& rPt ) const;
- //Welcher Schutz ist am selektierten Objekt gesetzt?
+ // Which Protection is set at selected object?
//!! returns several flags in sal_uInt8
sal_uInt8 IsSelObjProtected( sal_uInt16 /*FLYPROTECT_...*/ eType ) const;
- //Liefert neben der Grafik in rName bei gelinkten Grafiken den Namen mit
- //Pfad und sonst den Grafiknamen. rbLink ist TRU bei gelinkten Grafiken.
+ // Deliver graphic in rName besides graphic name. If graphic is
+ // linked give name with path. rbLink is TRUE if graphic is linked.
const Graphic *GetGrfAtPos( const Point &rDocPos,
String &rName, sal_Bool &rbLink ) const;
- // --> OD 2009-07-13 #i73249#
const String GetObjTitle() const;
void SetObjTitle( const String& rTitle );
const String GetObjDescription() const;
void SetObjDescription( const String& rDescription );
- // <--
-//SS fuer Rahmen --------------------------------------------
sal_Bool IsFrmSelected() const;
sal_Bool GetFlyFrmAttr( SfxItemSet &rSet ) const;
@@ -373,91 +365,89 @@ public:
SwFrmFmt *pParent = 0 );
void SetFlyPos( const Point &rAbsPos);
Point FindAnchorPos( const Point &rAbsPos, sal_Bool bMoveIt = sal_False );
- // determines whether a frame or its environment is vertically formatted and right-to-left
- // --> OD 2009-08-31 #mongolianlayout#
+
+ // Determines whether a frame or its environment is vertically formatted and right-to-left.
// also determines, if frame or its environmane is in mongolianlayout (vertical left-to-right)
// - add output parameter <bVertL2R>
sal_Bool IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRightToLeft, sal_Bool& bVertL2R) const;
- SwFrmFmt* GetCurFrmFmt() const; //Wenn Rahmen, dann Rahmenvorlage, sonst 0
- void SetFrmFmt( SwFrmFmt *pFmt, sal_Bool bKeepOrient = sal_False, Point* pDocPos = 0 ); //Wenn Rahmen, dann Rahmenvorlage setzen
+ SwFrmFmt* GetCurFrmFmt() const; //If frame then frame style, else 0.
+ void SetFrmFmt( SwFrmFmt *pFmt, sal_Bool bKeepOrient = sal_False, Point* pDocPos = 0 ); //If frame then set frame style.
const SwFlyFrm *GetCurrFlyFrm() const { return FindFlyFrm(); }
- // finde/loeschen den Fly, in dem der Cursor steht
+ // Find/delete fly containing the cursor.
SwFrmFmt* WizzardGetFly();
- //Selebstaendiges selektieren von Flys
+ // Independent selecting of flys.
sal_Bool GotoNextFly( sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY )
{ return GotoObj( sal_True, eType ); }
sal_Bool GotoPrevFly( sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY)
{ return GotoObj( sal_False, eType); }
- //iterieren ueber Flys - fuer Basic-Collections
+ // Iterate over flys - for Basic-collections.
sal_uInt16 GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL ) const;
const SwFrmFmt* GetFlyNum(sal_uInt16 nIdx, FlyCntType eType = FLYCNTTYPE_ALL) const;
- //Wenn ein fly selectiert ist, zieht er den Crsr in den ersten CntntFrm
+ // If a fly is selected, it draws cursor into the first CntntFrm.
const SwFrmFmt* SelFlyGrabCrsr();
//Get FlyFrameFormat; fuer UI Macro Anbindung an Flys
const SwFrmFmt* GetFlyFrmFmt() const;
SwFrmFmt* GetFlyFrmFmt();
- //OLE, Server fordert neue Groesse an, die gewuenschten Werte werden
- //als Rahmenattribute eingestellt. Wenn die Werte nicht erlaubt sind,
- //so wird von der Formatierung geclippt und eine Scalierung eingestellt.
- //siehe CalcAndSetScale().
+ // OLE. Server requires new size. Desired values are adjusted as frame attributes.
+ // If the values are not allowed, the formating clips and determines scaling.
+ // See CalcAndSetScale().
// The return value is the applied size.
Size RequestObjectResize( const SwRect &rRect, const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& );
//The layout has been changed, so the active object has to be moved after that
virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset );
- //Der Client fuer das OleObject muss bezueglich der Scalierung auf dem
- //neuesten Stand gehalten werden. Impl in der WrtShell.
- //Wird ein Pointer auf eine Size uebergeben, so ist diese die aktuelle
- //Core-Groesse des Objectes. Anderfalls wird die Groesse per GetCurFlyRect()
- //besorgt.
+ // Client for OleObject has to be up-to-date regarding scaling.
+ // Implemented in WrtShell.
+ // If a pointer is passed on a size, this is the object's current core-size.
+ // Else the size is provided via GetCurFlyRect().
virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
const SwRect *pFlyPrtRect = 0,
const SwRect *pFlyFrmRect = 0 ) = 0;
- //Objekte mit ActivateWhenVisible werden beim Paint Connected.
- //gerufen von notxtfrm::Paint, impl in wrtsh
+ // Connect objects with ActivateWhenVisible at Paint.
+ // Called by notxtfrm::Paint, implemented in wrtsh.
virtual void ConnectObj( svt::EmbeddedObjectRef&,
const SwRect &rPrt,
const SwRect &rFrm ) = 0;
- //Sichbaren Bereich auf das Object setzen, wenn es noch nicht sichtbar ist.
+ // Set visible range on object, if it is not yet visible.
void MakeObjVisible( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const;
- // check resize of OLE-Object
+ // Check resize of OLE-Object.
sal_Bool IsCheckForOLEInCaption() const { return bCheckForOLEInCaption; }
void SetCheckForOLEInCaption( sal_Bool bFlag ) { bCheckForOLEInCaption = bFlag; }
- // setze am selektierten FlyFrame einen Namen
+ // Set name at selected FlyFrame.
void SetFlyName( const String& rName );
const String& GetFlyName() const;
// get reference to OLE object (if there is one) for selected FlyFrame
const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef() const;
- // erezeuge eindeutige Namen fuer Rahmen
+ // Created unique name for frame.
String GetUniqueGrfName() const;
String GetUniqueOLEName() const;
String GetUniqueFrameName() const;
- // springe zum benannten Rahmen (Grafik/OLE)
+ // Jump to named Fly (graphic/OLE).
sal_Bool GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL,
sal_Bool bSelFrame = sal_True );
- // steht an der Position eine Grafik mit einer URL ?
+
+ // Position is a graphic with URL?
const SwFrmFmt* IsURLGrfAtPos( const Point& rPt, String* pURL = 0,
String *pTargetFrameName = 0,
String *pURLDescription = 0 ) const;
- //Fuer das Chain wird immer der durch das Format spezifizierte Fly
- //mit dem durch den Point getroffenen verbunden.
- //In rRect wird das Rect des Flys geliefert (fuer Highlight desselben)
+ // For Chain always connect Fly specified by format with that hit by point.
+ // rRect contains rect of Fly (for its highlight).
int Chainable( SwRect &rRect, const SwFrmFmt &rSource, const Point &rPt ) const;
int Chain( SwFrmFmt &rSource, const Point &rPt );
int Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest );
@@ -467,38 +457,33 @@ public:
Size GetGraphicDefaultSize() const;
-//SS fuer DrawObjekte ---------------------
-
- //Temporaer um Bug zu umgehen.
+ // Temporary work around for bug.
void CheckUnboundObjects();
- //Achtung: Uneindeutikeiten bei Mehrfachselektionen.
+ // Attention: Ambiguities if multiple selections.
sal_Bool GetObjAttr( SfxItemSet &rSet ) const;
sal_Bool SetObjAttr( const SfxItemSet &rSet );
const SdrObject* GetBestObject( sal_Bool bNext, sal_uInt16 eType = GOTOOBJ_DRAW_ANY, sal_Bool bFlat = sal_True, const ::svx::ISdrObjectFilter* pFilter = NULL );
sal_Bool GotoObj( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_DRAW_ANY);
- //Setzen vom DragMode (z.B. Rotate), tut nix bei Rahmenselektion.
+ // Set DragMode (e.g. Rotae), but do nothing when frame is selected.
void SetDragMode( sal_uInt16 eSdrDragMode );
- sal_uInt16 IsObjSelected() const; //Liefert gleich die Anzahl der Objekte,
- //zaehlt aber nicht die Objekte in Gruppen.
+ sal_uInt16 IsObjSelected() const; // Returns object count, but doesn't count the objects in groups.
sal_Bool IsObjSelected( const SdrObject& rObj ) const;
- void EndTextEdit(); //Loescht ggf. das Objekt.
+ void EndTextEdit(); // Deletes object if required.
- //Ankertyp des selektierten Objektes, -1 bei Uneindeutigkeit oder
- //Rahmenselektion; FLY_AT_PAGE bzw. FLY_AT_PARA aus frmatr.hxx sonst.
+ // Anchor type of selected object, -1 if ambiguous or in case of frame selection.
+ // Else FLY_AT_PAGE or FLY_AT_PARA resp. from frmatr.hxx.
short GetAnchorId() const;
- //Erzeugen von DrawObjekten, beim Begin wird der Objekttyp mitgegeben.
- //Beim End kann ein Cmd mitgegeben werden, hier ist ggf.
- //SDRCREATE_RESTRAINTEND fuer Ende oder SDRCREATE_NEXTPOINT fuer ein
- //Polygon relevant. Nach dem RESTRAINTEND ist das Objekt erzeugt und
- //selektiert.
- //Mit BreakCreate wird der Vorgang abgebrochen, dann ist kein Objekt
- //mehr selektiert.
+ // Process of creating draw objects. At the beginning object type is passed.
+ // At the end a Cmd can be passed. Here, SDRCREATE_RESTRAINTEND for end
+ // or SDRCREATE_NEXTPOINT for a polygon may be relevant.
+ // After RESTRAINTEND the object is created and selected.
+ // BreakCreate interrupts the process. In this case no object is selected.
sal_Bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos );
sal_Bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sal_uInt32 eObjInventor, const Point &);
void MoveCreate ( const Point &rPos );
@@ -507,33 +492,32 @@ public:
sal_Bool IsDrawCreate() const;
void CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect, sal_uInt16 nSlotId);
- // Funktionen f�r Rubberbox, um Draw-Objekte zu selektieren
+ // Functions for Rubberbox, ti select Draw-Objects
sal_Bool BeginMark( const Point &rPos );
void MoveMark ( const Point &rPos );
sal_Bool EndMark ();
void BreakMark();
- //Gruppe erzeugen, aufloesen, nix bei Rahmenselektion.
- sal_Bool IsGroupSelected(); //Kann auch eine Mischselektion sein!
- void GroupSelection(); //Hinterher ist die Gruppe selektiert.
- void UnGroupSelection(); //Die Einzelobjekte sind Selektiert
- //Es koennen noch immer Gruppen dabei sein.
+ // Create and destroy group, don't when frame is selected.
+ sal_Bool IsGroupSelected(); // Can be a mixed selection!
+ void GroupSelection(); // Afterwards the group is selected.
+ void UnGroupSelection(); // The individual objects are selected, but
+ // it is possible that there are groups included.
- // OD 27.06.2003 #108784# - change return type.
bool IsGroupAllowed() const;
- void MirrorSelection( sal_Bool bHorizontal ); //Bei sal_False Vertikal
+ void MirrorSelection( sal_Bool bHorizontal ); //Vertical if FALSE.
- //frmatr.hxx. Hier kein enum wg. Abhaengigkeiten
- //Der sal_Bool ist nur fuer internen Gebrauch! Anker wird nur - anhand der
- //aktuellen Dokumentposition - neu gesetzt aber nicht umgesetzt.
+ // frmatr.hxx. Here no enum because of dependencies.
+ // bool value only for internal use! Anchor is newly set according
+ // to current document position. Anchor is not re-set.
void ChgAnchor( int eAnchorId, sal_Bool bSameOnly = sal_False,
sal_Bool bPosCorr = sal_True );
sal_Bool SetDrawingAttr( SfxItemSet &rSet );
- // hole die selectierten DrawObj als Grafik (MetaFile/Bitmap)
- // Return-Wert besagt ob konvertiert wurde!!
+ // Get selected DrawObj as graphics (MetaFile/Bitmap).
+ // Return value indicates if it was converted.
sal_Bool GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const;
void Paste( SvStream& rStm, sal_uInt16 nAction, const Point* pPt = 0 );
@@ -550,7 +534,7 @@ public:
const SfxItemSet* pGrfAttrSet = 0,
SwFrmFmt* = 0 );
- // Insertion of a drawing object which have to be already inserted in the DrawModel
+ // Insertion of a drawing object which have to be already inserted in the DrawModel.
void InsertDrawObj( SdrObject& rDrawObj,
const Point& rInsertPosition );
@@ -566,19 +550,19 @@ public:
void AlignAllFormulasToBaseline();
// <--
-//------------------------------------------
- //Auskunft ueber naechstliegenden Inhalt zum uebergebenen Point
+
+ // Provide information about content situated closes to given Point.
Point GetCntntPos( const Point& rPoint, sal_Bool bNext ) const;
- //convert document position into position relative to the current page
+ // Convert document position into position relative to the current page.
Point GetRelativePagePosition(const Point& rDocPos);
- //Layout-Selektion Hiden/Zeigen und aufruf an die CrsrSh weiterreichen.
+ // Hide or show layout-selection and pass call to CrsrSh.
void ShLooseFcs();
void ShGetFcs( sal_Bool bUpdate = sal_True );
- //PageDescriptor-Schnittstelle
+ // PageDescriptor-interface
void ChgCurPageDesc( const SwPageDesc& );
sal_uInt16 GetCurPageDesc( const sal_Bool bCalcFrm = sal_True ) const;
sal_uInt16 GetMousePageDesc( const Point &rPt ) const;
@@ -598,8 +582,8 @@ public:
const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& =
::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >() ) const;
- //Seitennummer der Seite in der der Point liegt, 0 wenn keine
- //getroffen ist.
+
+ // Page number of the page containing Point, O if no page.
sal_uInt16 GetPageNumber( const Point &rPoint ) const;
sal_Bool GetPageNumber( long nYPos, sal_Bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, String &rDisplay ) const;
@@ -607,43 +591,42 @@ public:
const SfxItemSet* pFlyAttrSet = 0,
const SfxItemSet* pGrfAttrSet = 0,
SwFrmFmt* = 0 );
- sal_Bool FinishOLEObj(); // Server wird beendet
+ sal_Bool FinishOLEObj(); //Shutdown server.
- //Attribute der Tabelle besorgen/setzen.
void GetTblAttr( SfxItemSet & ) const;
void SetTblAttr( const SfxItemSet & );
- //Tabelle vollstaendig selektiert?
sal_Bool HasWholeTabSelection() const;
- //Ist der Inhalt einer Tabellenzelle oder mindestens eine Tabellenzelle
- //vollstaendig selektiert ist
+
+ // Is content of a table cell or at least a table cell completely selected?
sal_Bool HasBoxSelection() const;
sal_Bool InsertRow( sal_uInt16 nCnt, sal_Bool bBehind );
- sal_Bool InsertCol( sal_uInt16 nCnt, sal_Bool bBehind ); // 0 == am Ende
+ sal_Bool InsertCol( sal_uInt16 nCnt, sal_Bool bBehind ); // 0 == at the end.
sal_Bool DeleteCol();
sal_Bool DeleteRow();
- sal_Bool DeleteTblSel(); //Aktuelle Selektion, ggf. die ganze Tabelle.
+ sal_Bool DeleteTblSel(); // Current selection, may be whole table.
- sal_uInt16 MergeTab(); //Merged selektierte Tabellenteile zusammen
- //Fehler ueber enum zurueck
- // Zelle Vertikal oder Horizontal splitten.
+ sal_uInt16 MergeTab(); // Merge selected parts of table.
+ // Return error via enum.
+
+ // Split cell vertically or horizontally.
sal_Bool SplitTab( sal_Bool nVert = sal_True, sal_uInt16 nCnt = 1, sal_Bool bSameHeight = sal_False );
sal_Bool Sort(const SwSortOptions&); //Sortieren.
void SetRowHeight( const SwFmtFrmSize &rSz );
- //Der Pointer muss vom Aufrufer zerstoert werden wenn != 0
+
+ // Pointer must be detroyed by caller != 0.
void GetRowHeight( SwFmtFrmSize *&rpSz ) const;
void SetRowSplit( const SwFmtRowSplit &rSz );
void GetRowSplit( SwFmtRowSplit *&rpSz ) const;
void SetBoxAlign( sal_uInt16 nOrient );
- sal_uInt16 GetBoxAlign() const; //USHRT_MAX fuer uneindeutig!
+ sal_uInt16 GetBoxAlign() const; // USHRT_MAX if ambiguous.
- //Ausgleichen der Zeilenhoehen. Mit bTstOnly festellen ob mehr als eine
- //Zeile markiert ist.
+ // Adjustment of Rowheights. Determine via bTstOnly if more than one row is selected.
sal_Bool BalanceRowHeight( sal_Bool bTstOnly );
void SetTabBorders( const SfxItemSet& rSet );
@@ -654,36 +637,33 @@ public:
void GetTabBackground( SvxBrushItem &rToFill ) const;
void SetBoxBackground( const SvxBrushItem &rNew );
- sal_Bool GetBoxBackground( SvxBrushItem &rToFill ) const; //sal_False uneindeutig
+ sal_Bool GetBoxBackground( SvxBrushItem &rToFill ) const; //FALSE ambiguous.
void SetBoxDirection( const SvxFrameDirectionItem& rNew );
- sal_Bool GetBoxDirection( SvxFrameDirectionItem& rToFill ) const; //sal_False uneindeutig
+ sal_Bool GetBoxDirection( SvxFrameDirectionItem& rToFill ) const; //FALSE ambiguous.
void SetRowBackground( const SvxBrushItem &rNew );
- sal_Bool GetRowBackground( SvxBrushItem &rToFill ) const; //sal_False uneindeutig
+ sal_Bool GetRowBackground( SvxBrushItem &rToFill ) const; //FALSE ambiguous.
sal_uInt8 WhichMouseTabCol( const Point &rPt ) const;
- void GetTabCols( SwTabCols &rToFill ) const; //Spalten- und Randinfo.
+ void GetTabCols( SwTabCols &rToFill ) const; // Info about columns and margins.
void SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly = sal_True );
void GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const;
void SetMouseTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly,
const Point &rPt );
- // --> FME 2004-07-30 #i20126# Enhanced table selection
// pEnd will be used during MouseMove
bool SelTblRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false );
- // <--
- // #i24134# adjustment of table rows via Ruler
void GetTabRows( SwTabCols &rToFill ) const;
void SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly );
void GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const;
void SetMouseTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const Point &rPt );
- void ProtectCells(); //Falls eine Tabselektion besteht, wird sie ver-
- // nichtet, wenn der Cursor nicht in Readonly darf
- void UnProtectCells(); // auf die Tabellenselektin
- void UnProtectTbls(); //bei allen Tabellen in der Selektion den Schutz aufheben
+ void ProtectCells(); // If a table selection exists it is destroyed in case
+ // cursor is not allowed in readonly.
+ void UnProtectCells(); // Refers to table selection.
+ void UnProtectTbls(); // Unprotect all tables in selection.
sal_Bool HasTblAnyProtection( const String* pTblName = 0,
sal_Bool* pFullTblProtection = 0 );
sal_Bool CanUnProtectCells() const;
@@ -691,63 +671,63 @@ public:
sal_uInt16 GetRowsToRepeat() const;
void SetRowsToRepeat( sal_uInt16 nNumOfRows );
sal_uInt16 GetVirtPageNum( const sal_Bool bCalcFrm = sal_True );
- //returns the number of table rows currently selected
- //if the selection start at the top of the table
+
+ //Returns the number of table rows currently selected
+ //if the selection start at the top of the table.
sal_uInt16 GetRowSelectionFromTop() const;
sal_Bool IsInRepeatedHeadline() const { return CheckHeadline( true ); }
sal_Bool IsInHeadline() const { return CheckHeadline( false ); }
- //Stellt die Breiten der Zellen so ein, dass der Inhalt moeglichst
- //nicht umgebrochen werden muss.
- //bBalance sorgt fuer einen Ausgleich der markierten Spalten.
+ // Adjusts cell widths in such a way, that their content
+ // does not need to be wrapped (if possible).
+ // bBalance provides for adjustment of selected columns.
void AdjustCellWidth( sal_Bool bBalance = sal_False );
- //Nicht erlaubt, wenn nur leere Zellen selektiert sind.
+
+ // Not allowed if only empty cells are selected.
sal_Bool IsAdjustCellWidthAllowed( sal_Bool bBalance = sal_False ) const;
- //Ausgleich der Zellenbreiten, mit bTstOnly feststellen, ob mehr als
- //eine Zelle markiert ist.
+ // Adjustment of cell-widths; determine via bTstOnly if more than one cell is selected.
sal_Bool BalanceCellWidth( sal_Bool bTstOnly );
- // AutoFormat fuer die Tabelle/TabellenSelection
+ // AutoFormat for table/ table selection.
sal_Bool SetTableAutoFmt( const SwTableAutoFmt& rNew );
- // Erfrage wie attributiert ist
+
sal_Bool GetTableAutoFmt( SwTableAutoFmt& rGet );
- // aender eine Zellenbreite/-Hoehe/Spaltenbreite/Zeilenhoehe
+
sal_Bool SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff = 283 );
- // Autosumme
+
sal_Bool GetAutoSum( String& rFml ) const;
- //Phy: Tatsaechliche Seitenanzahl.
- //Virt: Vom User evtl. gesetzten Offset mit einbeziehen.
+ // Phy: real page count.
+ // Virt: consider offset that may have been set by user.
sal_uInt16 GetPhyPageNum();
- // Setzt an der aktuellen Postion einen neuen Page Offset
void SetNewPageOffset( sal_uInt16 nOffset );
- void SetPageOffset( sal_uInt16 nOffset ); //Aendert den letzten Page Offset
- sal_uInt16 GetPageOffset() const; //Liefert den letzten Page Offset
+ void SetPageOffset( sal_uInt16 nOffset ); //Changes last page offset.
+ sal_uInt16 GetPageOffset() const; //Returns last page offset.
- //SS fuer Beschriftungen
void InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
const String& rNumberSeparator,
const sal_Bool bBefore, const sal_uInt16 nId,
const String& rCharacterStyle,
const sal_Bool bCpyBrd = sal_True );
- //Das Lineal will auch noch etwas von uns wissen.
- sal_uInt16 GetCurColNum( SwGetCurColNumPara* pPara = 0 ) const; //0 == in keiner Spalte
+ // The ruler needs some information too.
+ sal_uInt16 GetCurColNum( SwGetCurColNumPara* pPara = 0 ) const; //0 == not in any column.
sal_uInt16 GetCurMouseColNum( const Point &rPt,
SwGetCurColNumPara* pPara = 0 ) const;
- sal_uInt16 GetCurTabColNum() const; //0 == in keiner Tabelle
+ sal_uInt16 GetCurTabColNum() const; //0 == not in any table.
sal_uInt16 GetCurMouseTabColNum( const Point &rPt ) const;
- sal_uInt16 GetCurOutColNum( SwGetCurColNumPara* pPara = 0 ) const; // aktuelle aeussere Spalte
+ sal_uInt16 GetCurOutColNum( SwGetCurColNumPara* pPara = 0 ) const; // Current outer column.
sal_Bool IsTableRightToLeft() const;
sal_Bool IsMouseTableRightToLeft( const Point &rPt ) const;
sal_Bool IsTableVertical() const;
sal_Bool IsLastCellInRow() const;
- // Die Breite des aktuellen Bereichs fuer Spaltendialog
+
+ // Width of current range for column-dialog.
long GetSectionWidth( SwFmt& rFmt ) const;
void GetConnectableFrmFmts
@@ -759,7 +739,6 @@ public:
/** SwFEShell::GetShapeBackgrd
- OD 02.09.2002 for #102450#:
method determines background color of the page the selected drawing
object is on and returns this color.
If no color is found, because no drawing object is selected or ...,
@@ -774,7 +753,6 @@ public:
/** Is default horizontal text direction for selected drawing object right-to-left
- OD 09.12.2002 #103045#
Because drawing objects only painted for each page only, the default
horizontal text direction of a drawing object is given by the corresponding
page property.
@@ -788,15 +766,14 @@ public:
void ParkCursorInTab();
- // -> #i23726#
SwTxtNode * GetNumRuleNodeAtPos(const Point &rPot);
sal_Bool IsNumLabel( const Point &rPt, int nMaxOffset = -1 );
- // <- #i23726#
- // --> OD 2005-02-21 #i42921#
+
bool IsVerticalModeAtNdAndPos( const SwTxtNode& _rTxtNode,
const Point& _rDocPos ) const;
- // <--
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index fc375b3401c3..8c6c925d5bdf 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,13 +40,9 @@ class SvStringsDtor;
class SvNumberFormatter;
-/*--------------------------------------------------------------------
- Beschreibung: die ID's fuer die Feldtypen
- --------------------------------------------------------------------*/
-
enum RES_FIELDS
{
-// Fuer die alten Dokumente muessen die Field-Which IDS erhalten bleiben !!!!
+// For old documents the Field-Which IDs must be preserved !!!
RES_FIELDS_BEGIN,
RES_DBFLD = RES_FIELDS_BEGIN,
RES_USERFLD,
@@ -90,10 +87,7 @@ enum RES_FIELDS
RES_FIELDS_END
};
-/*--------------------------------------------------------------------
- Beschreibung: Liste der FieldTypes am UI
- --------------------------------------------------------------------*/
-
+// List of FieldTypes at UI.
enum SwFldTypesEnum
{
TYP_BEGIN,
@@ -159,28 +153,28 @@ enum SwFileNameFormat
enum SwVarFormat
{
- VVF_CMD = 0x0010, // Kommando anzeigen
- VVF_INVISIBLE = 0x0040, // unsichtbar
+ VVF_CMD = 0x0010, // Show command.
+ VVF_INVISIBLE = 0x0040, // Invisible.
VVF_XXP = 0x0400, // 1234%
VVF_XX_XXP = 0x0800, // 1.234,56%
VVF_CLEAR = 0x000f,
-// ab hier neue Formate
- VVF_SYS = 0x2000, //Zahlenformat aus der Systemeinstellung
+// From here new formats:
+ VVF_SYS = 0x2000, // Format for numbers from system.
VVF_X = 0x2100, // 1234
- VVF_X_X = 0x2200, // 1234,5
- VVF_X_XX = 0x2300, // 1245,56
- VVF_XX_X = 0x2400, // 1.234,5
- VVF_XX_XX = 0x2500, // 1.234,56
- VVF_XX_XXX = 0x2600, // 1.234,567
- VVF_SYS_CUR = 0x2700, // W???hrungsformat aus der Systemeinstellung
- VVF_CUR_X = 0x2800, // DM 1234
- VVF_CUR_XX_XX = 0x2900, // DM 1234,56 DM 1234,00
- VVF_CUR_XX_X0 = 0x2a00, // DM 1234,56 DM 1234,--
- VVF_X_CUR = 0x2b00, // 1234 DM
- VVF_XX_XX_CUR = 0x2c00, // 1234,56 DM 1234,00 DM
- VVF_XX_X0_CUR = 0x2d00, // 1234,56 DM 1234,-- DM
-// Kompatibilitaet:
+ VVF_X_X = 0x2200, // 1234.5
+ VVF_X_XX = 0x2300, // 1245.56
+ VVF_XX_X = 0x2400, // 1.234.5
+ VVF_XX_XX = 0x2500, // 1.234.56
+ VVF_XX_XXX = 0x2600, // 1.234.567
+ VVF_SYS_CUR = 0x2700, // Format for currency from system.
+ VVF_CUR_X = 0x2800, // EUR 1234
+ VVF_CUR_XX_XX = 0x2900, // EUR 1234.56 EUR 1234.00
+ VVF_CUR_XX_X0 = 0x2a00, // EUR 1234.56 EUR 1234.--
+ VVF_X_CUR = 0x2b00, // 1234 EUR
+ VVF_XX_XX_CUR = 0x2c00, // 1234.56 EUR 1234.00 EUR
+ VVF_XX_X0_CUR = 0x2d00, // 1234.56 EUR 1234.-- EUR
+// Compatibility:
VF_CMD = VVF_CMD,
VF_INVISIBLE = VVF_INVISIBLE,
VF_XXP = VVF_XXP,
@@ -200,16 +194,15 @@ namespace nsSwGetSetExpType
const SwGetSetExpType GSE_EXPR = 0x0002; // Expression
const SwGetSetExpType GSE_INP = 0x0004; // InputField
const SwGetSetExpType GSE_SEQ = 0x0008; // Sequence
- const SwGetSetExpType GSE_FORMULA = 0x0010; // Formel
+ const SwGetSetExpType GSE_FORMULA = 0x0010; // Formula
}
typedef sal_uInt16 SwExtendedSubType;
namespace nsSwExtendedSubType
{
- const SwExtendedSubType SUB_CMD = 0x0100; // Kommando anzeigen
- const SwExtendedSubType SUB_INVISIBLE = 0x0200; // unsichtbar
- const SwExtendedSubType SUB_OWN_FMT = 0x0400; // SwDBField: Uebernimmt Formatierung nicht
- // aus Datenbank
+ const SwExtendedSubType SUB_CMD = 0x0100; // Show command.
+ const SwExtendedSubType SUB_INVISIBLE = 0x0200; // Invisible.
+ const SwExtendedSubType SUB_OWN_FMT = 0x0400; // SwDBField: Don't accept formating from database.
}
enum SwInputFieldSubType
@@ -234,52 +227,43 @@ enum SwDateTimeSubType
};
-extern sal_uInt16 __FAR_DATA aTypeTab[];
-
-/*--------------------------------------------------------------------
- Beschreibung: Allgemeine Tools
- --------------------------------------------------------------------*/
+extern sal_uInt16 aTypeTab[];
+// General tools.
String GetResult(double nVal, sal_uInt32 nNumFmt, sal_uInt16 nLang = LANGUAGE_SYSTEM);
void SetErrorStr(const String& rStr);
-//String ExpandDate(const Date& rDate, sal_uLong nFmt, sal_uInt16 nLang);
-//String ExpandTime(const Time& rTime, sal_uLong nFmt, sal_uInt16 nLang);
String FormatNumber(sal_uInt16 nNum, sal_uInt32 nFormat);
-/*--------------------------------------------------------------------
- Beschreibung: Instanzen von SwFields und Abgeleiteten kommen 0-n mal vor.
- Zu jeder Klasse SwFields existiert
- 1 Instanz der zugehoerigen Typenklasse
- Basisklasse aller Feldtypen ist SwFieldType
- --------------------------------------------------------------------*/
-
+// Instances of SwFields and those derived from it occur 0 to n times.
+// For each class there is one instance of the associated type class.
+// Base class of all field types is SwFieldType.
DBG_NAMEEX(SwFieldType)
class SW_DLLPUBLIC SwFieldType : public SwModify
{
sal_uInt16 nWhich;
- friend void _FinitUI(); // um den Pointer zu loeschen!
+ friend void _FinitUI(); // In order to delete pointer!
static SvStringsDtor* pFldNames;
- static void _GetFldName(); // legt die FldNames an, fldmgr.cxx!
+ static void _GetFldName(); // Sets up FldNames; fldmgr.cxx!
protected:
- // single argument ctors shall be explicit.
+ // Single argument ctors shall be explicit.
explicit SwFieldType( sal_uInt16 nWhichId );
public:
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
virtual ~SwFieldType();
#endif
static const String& GetTypeStr( sal_uInt16 nTypeId );
- // nur in abgeleiteten Klassen
+ // Only in derived classes.
virtual const String& GetName() const;
virtual SwFieldType* Copy() const = 0;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
sal_uInt16 Which() const { return nWhich; }
@@ -291,18 +275,14 @@ inline void SwFieldType::UpdateFlds() const
((SwFieldType*)this)->Modify( 0, 0 );
}
-/*--------------------------------------------------------------------
- Beschreibung: Basisklasse aller Felder.
- Ueber Which wird der Typ des Feldes abgefragt.
- Ueber Expand() wird der expandierte Inhalt
- des Feldes in Erfahrung gebracht.
- --------------------------------------------------------------------*/
-
+// Base class of all fields.
+// Type of field is queried via Which.
+// Expanded content of field is queried via Expand().
class SW_DLLPUBLIC SwField
{
private:
- mutable String m_Cache; /// #i85766# cached expansion (for clipboard)
- sal_uInt16 nLang; // Immer ueber SetLanguage aendern!
+ mutable String m_Cache; // Cached expansion (for clipboard).
+ sal_uInt16 nLang; // Always change via SetLanguage!
sal_Bool bIsAutomaticLanguage;
sal_uInt32 nFormat;
@@ -319,10 +299,9 @@ protected:
public:
virtual ~SwField();
- // Typ feststellen
inline SwFieldType* GetTyp() const;
- // neuen Typ setzen (wird fuer das Kopieren zwischen Dokumenten benutzt)
+ // Set new type (used for copying among documents).
virtual SwFieldType* ChgTyp( SwFieldType* );
/** expand the field.
@@ -335,16 +314,17 @@ public:
*/
String ExpandField(bool const bCached) const;
+ // Returns name or content.
virtual String GetFieldName() const;
SwField * CopyField() const;
// ResId
sal_uInt16 Which() const
-#ifndef DBG_UTIL
- { return pType->Which(); }
+#if OSL_DEBUG_LEVEL > 1
+ ; // implemented in fldbas.cxx
#else
- ; // in fldbas.cxx implementiert
+ { return pType->Which(); }
#endif
// TYP_ID
@@ -352,11 +332,11 @@ public:
virtual sal_uInt16 GetSubType() const;
virtual void SetSubType(sal_uInt16);
- // Sprache an der Feldposition
+ // Language at field position.
inline sal_uInt16 GetLanguage() const;
virtual void SetLanguage(sal_uInt16 nLng);
- // Parameter fuer Dialog und BASIC erfragen
+ // Query parameters for dialog and for BASIC.
inline sal_uInt32 GetFormat() const;
virtual const String& GetPar1() const;
virtual String GetPar2() const;
@@ -367,11 +347,11 @@ public:
virtual void SetPar1(const String& rStr);
virtual void SetPar2(const String& rStr);
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
- // hat das Feld eine Action auf dem ClickHandler ? (z.B. INetFelder,..)
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
+
+ // Does the field possess an action on its ClickHandler? (e.g. INetFields, ...).
sal_Bool HasClickHdl() const;
- // ist es ein Fix-Feld?
sal_Bool IsFixed() const;
sal_Bool IsAutomaticLanguage() const { return bIsAutomaticLanguage;}
@@ -389,15 +369,12 @@ inline sal_uInt32 SwField::GetFormat() const
inline sal_uInt16 SwField::GetLanguage() const
{ return nLang; }
-/*--------------------------------------------------------------------
- Beschreibung: Felder mit Values, die ueber der Numberformatter
- formatiert werden muessen
- --------------------------------------------------------------------*/
+//Fields containing values that have to be formated via number formatter.
class SwValueFieldType : public SwFieldType
{
SwDoc* pDoc;
- sal_Bool bUseFormat; // Numberformatter verwenden
+ sal_Bool bUseFormat; // Use number formatter.
protected:
SwValueFieldType( SwDoc* pDocPtr, sal_uInt16 nWhichId );
@@ -418,7 +395,6 @@ public:
class SW_DLLPUBLIC SwValueField : public SwField
{
double fValue;
-// String sExpand;
protected:
SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, sal_uInt16 nLang = LANGUAGE_SYSTEM, const double fVal = 0.0 );
@@ -429,8 +405,6 @@ public:
virtual SwFieldType* ChgTyp( SwFieldType* );
virtual void SetLanguage(sal_uInt16 nLng);
-// os: wozu war das denn da?
-// virtual void ChangeFormat(sal_uLong n);
inline SwDoc* GetDoc() const { return ((SwValueFieldType*)GetTyp())->GetDoc(); }
@@ -460,3 +434,5 @@ public:
};
#endif // SW_FLDBAS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx
index b5f7292d32ba..7ef3ce69d87c 100644
--- a/sw/inc/flddat.hxx
+++ b/sw/inc/flddat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,14 +37,11 @@ class DateTime;
class Date;
class Time;
-/*--------------------------------------------------------------------
- Beschreibung: Formate
- --------------------------------------------------------------------*/
enum SwDateFormat
{
DF_BEGIN,
- //neue Formate:
+ // new formats
DFF_SSYS = DF_BEGIN,
DFF_LSYS ,
DFF_DMY ,
@@ -62,7 +60,7 @@ enum SwDateFormat
DFF_YMD ,
DFF_YYMD ,
DF_END ,
-// Kompatibilitaet:
+ // Compatibility
DF_SSYS = DFF_SSYS,
DF_LSYS = DFF_LSYS,
DF_SHORT = DFF_DMY,
@@ -94,9 +92,6 @@ enum SwDateSubFormat
DATE_VAR
};
-/*--------------------------------------------------------------------
- Beschreibung: Datum/Uhrzeitfeld
- --------------------------------------------------------------------*/
class SwDateTimeFieldType : public SwValueFieldType
{
@@ -106,14 +101,11 @@ public:
virtual SwFieldType* Copy() const;
};
-/*--------------------------------------------------------------------
- Beschreibung: Datum/Uhrzeitfeld
- --------------------------------------------------------------------*/
class SW_DLLPUBLIC SwDateTimeField : public SwValueField
{
sal_uInt16 nSubType;
- long nOffset; // Offset in Minuten
+ long nOffset; // Offset in minutes.
virtual String Expand() const;
virtual SwField* Copy() const;
@@ -141,8 +133,10 @@ public:
void SetDateTime(const DateTime& rDT);
static double GetDateTime(SwDoc* pDoc, const DateTime& rDT);
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nMId ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nMId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nMId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nMId );
};
#endif // SW_FLDDAT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx
index b18a8fa22b9b..c0c9113566af 100644
--- a/sw/inc/flddropdown.hxx
+++ b/sw/inc/flddropdown.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -256,7 +257,7 @@ public:
- FIELD_PROP_PAR3 Get the help text of the field.
- FIELD_PROP_PAR4 Get the tool tip of the field.
*/
- virtual sal_Bool QueryValue(com::sun::star::uno::Any &rVal, sal_uInt16 nWhichId) const;
+ virtual bool QueryValue(com::sun::star::uno::Any &rVal, sal_uInt16 nWhichId) const;
/**
API: Sets a property value on the dropdown field.
@@ -268,7 +269,9 @@ public:
- FIELD_PROP_PAR3 Set the help text of the field.
- FIELD_PROP_PAR4 Set the tool tip of the field.
*/
- virtual sal_Bool PutValue(const com::sun::star::uno::Any &rVal, sal_uInt16 nWhichId);
+ virtual bool PutValue(const com::sun::star::uno::Any &rVal, sal_uInt16 nWhichId);
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fldinit.hxx b/sw/inc/fldinit.hxx
index 40fbac692444..5252e038923b 100644
--- a/sw/inc/fldinit.hxx
+++ b/sw/inc/fldinit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,12 @@
#ifndef _FLDINIT_HXX
#define _FLDINIT_HXX
-/*--------------------------------------------------------------------
- Beschreibung: Tabelle aller FeldInfos
- --------------------------------------------------------------------*/
+//Table for FieldInfo.
void InitFieldInfo();
void FinitFieldInfo();
#endif // _FLDINIT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fldupde.hxx b/sw/inc/fldupde.hxx
index 79443e092d61..aa764c03e31f 100644
--- a/sw/inc/fldupde.hxx
+++ b/sw/inc/fldupde.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,3 +38,5 @@ enum SwFldUpdateFlags
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/flyenum.hxx b/sw/inc/flyenum.hxx
index 765a23cda0b1..286325246062 100644
--- a/sw/inc/flyenum.hxx
+++ b/sw/inc/flyenum.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,19 +38,19 @@ enum FlyCntType
};
-//Returnwerte fuer Chainable und Chain
+// Return values for chainable and chain.
#define SW_CHAIN_OK 0
-#define SW_CHAIN_NOT_EMPTY 1 //Nur leere Frames duerfen connected werden
-#define SW_CHAIN_IS_IN_CHAIN 2 //Destination ist bereits in einer chain
-#define SW_CHAIN_WRONG_AREA 3 //Destination steht in einer nicht erlaubten
- //Section (Kopf-/Fusszeile)
-#define SW_CHAIN_NOT_FOUND 4 //Destination und/oder Source nicht gefunden
-#define SW_CHAIN_SOURCE_CHAINED 5 //Source hat bereits einen Follow
-#define SW_CHAIN_SELF 6 //Sich selbst zu verketten ist
- //natuerlich nicht erleubt.
+#define SW_CHAIN_NOT_EMPTY 1 // Only empty frames may be connected.
+#define SW_CHAIN_IS_IN_CHAIN 2 // Destination already in chain.
+#define SW_CHAIN_WRONG_AREA 3 // Destination in section where it shouldn't be
+ // (header, footer).
+#define SW_CHAIN_NOT_FOUND 4 // Destination and/or source not found.
+#define SW_CHAIN_SOURCE_CHAINED 5 // Source already has a follow.
+#define SW_CHAIN_SELF 6 // Self-chaining is not allowed.
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/flypos.hxx b/sw/inc/flypos.hxx
index 488e49ad2f9e..9640afb8a675 100644
--- a/sw/inc/flypos.hxx
+++ b/sw/inc/flypos.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,18 +35,18 @@
class SwFrmFmt;
class SwNodeIndex;
-// Struktur zum Erfragen der akt. freifliegenden Rahmen am Dokument.
+
+// For querying current flys in document.
class SW_DLLPUBLIC SwPosFlyFrm
{
- const SwFrmFmt* pFrmFmt; // das FlyFrmFmt
-// SwPosition* pPos; // Position in den ContentNode
- SwNodeIndex* pNdIdx; // es reicht ein Index auf den Node
+ const SwFrmFmt* pFrmFmt; // FlyFrmFmt
+ SwNodeIndex* pNdIdx; // Index for node is sufficient.
sal_uInt32 nOrdNum;
public:
SwPosFlyFrm( const SwNodeIndex& , const SwFrmFmt*, sal_uInt16 nArrPos );
- virtual ~SwPosFlyFrm(); // virtual fuer die Writer (DLL !!)
+ virtual ~SwPosFlyFrm(); // Virtual for Writer (DLL !!)
- // operatoren fuer das Sort-Array
+ // Operators for sort array.
sal_Bool operator==( const SwPosFlyFrm& );
sal_Bool operator<( const SwPosFlyFrm& );
@@ -58,3 +59,5 @@ typedef SwPosFlyFrm* SwPosFlyFrmPtr;
SV_DECL_PTRARR_SORT_VISIBILITY( SwPosFlyFrms, SwPosFlyFrmPtr, 0, 40, SW_DLLPUBLIC )
#endif // _FLYPOS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx
index 3c91bad86b60..6595991eda1d 100644
--- a/sw/inc/fmtanchr.hxx
+++ b/sw/inc/fmtanchr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,17 +38,16 @@ struct SwPosition;
class IntlWrapper;
#define IVER_FMTANCHOR_LONGIDX ((sal_uInt16)1)
-//FlyAnchor, Anker des Freifliegenden Rahmen ----
-
+// FlyAnchors
class SW_DLLPUBLIC SwFmtAnchor: public SfxPoolItem
{
- SwPosition *pCntntAnchor; //0 Fuer Seitengebundene Rahmen.
- //Index fuer Absatzgebundene Rahmen.
- //Position fuer Zeichengebundene Rahmen
+ SwPosition *pCntntAnchor; // 0 for page-bound frames.
+ // Index for paragraph-bound frames.
+ // Position for character-bound frames.
RndStdIds nAnchorId;
- sal_uInt16 nPageNum; //Seitennummer bei Seitengeb. Rahmen.
+ sal_uInt16 nPageNum; // Page number for page-bound frames.
- // OD 2004-05-05 #i28701# - getting anchor positions ordered
+ // #i28701# - getting anchor positions ordered
sal_uInt32 mnOrder;
static sal_uInt32 mnOrderCounter;
@@ -56,10 +56,9 @@ public:
SwFmtAnchor( const SwFmtAnchor &rCpy );
~SwFmtAnchor();
- // Zuweisungsoperator
SwFmtAnchor &operator=( const SwFmtAnchor& );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -68,13 +67,13 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
RndStdIds GetAnchorId() const { return nAnchorId; }
sal_uInt16 GetPageNum() const { return nPageNum; }
const SwPosition *GetCntntAnchor() const { return pCntntAnchor; }
- // OD 2004-05-05 #i28701#
+ // #i28701#
sal_uInt32 GetOrder() const;
void SetType( RndStdIds nRndId ) { nAnchorId = nRndId; }
@@ -90,3 +89,4 @@ inline const SwFmtAnchor &SwAttrSet::GetAnchor(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtautofmt.hxx b/sw/inc/fmtautofmt.hxx
index ce16b775b82d..ddcd2505735e 100644
--- a/sw/inc/fmtautofmt.hxx
+++ b/sw/inc/fmtautofmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,8 +64,8 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
void SetStyleHandle( boost::shared_ptr<SfxItemSet> pHandle ) { mpHandle = pHandle; }
const boost::shared_ptr<SfxItemSet> GetStyleHandle() const { return mpHandle; }
@@ -73,3 +74,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtclbl.hxx b/sw/inc/fmtclbl.hxx
index 8feb5293c141..aacb8a50562b 100644
--- a/sw/inc/fmtclbl.hxx
+++ b/sw/inc/fmtclbl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,7 @@ public:
SwFmtNoBalancedColumns( sal_Bool bFlag = sal_False )
: SfxBoolItem( RES_COLUMNBALANCE, bFlag ) {}
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
};
@@ -52,3 +53,4 @@ inline const SwFmtNoBalancedColumns &SwFmt::GetBalancedColumns(sal_Bool bInP) co
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx
index 8a649ed5b80f..2ab58323b7c8 100644
--- a/sw/inc/fmtclds.hxx
+++ b/sw/inc/fmtclds.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,17 +34,16 @@
#include <hintids.hxx>
#include <format.hxx>
-//Der ColumnDescriptor --------------------------
-
+// ColumnDescriptor
class SwColumn
{
- sal_uInt16 nWish; //Wunschbreite incl. Raender.
- //Verhaelt sich proportional zum Verhaeltniss:
- //Wunschbreite der Umgebung / aktuelle Breite der Spalte
- sal_uInt16 nUpper; //Oberer Rand
- sal_uInt16 nLower; //Unterer Rand
- sal_uInt16 nLeft; //Linker Rand
- sal_uInt16 nRight; //Rechter Rand
+ sal_uInt16 nWish; // Desired width, borders included.
+ // It is inversely proportional to the ratio of
+ // desired width environment / current width column.
+ sal_uInt16 nUpper; // Top border.
+ sal_uInt16 nLower; // Bottom border.
+ sal_uInt16 nLeft; // Left border.
+ sal_uInt16 nRight; // Right border.
public:
SwColumn();
@@ -77,25 +77,22 @@ enum SwColLineAdj
class SW_DLLPUBLIC SwFmtCol : public SfxPoolItem
{
-// Pen aPen; //Pen fuer die Linine zwischen den Spalten
- sal_uLong nLineWidth; //width of the separator line
+ sal_uLong nLineWidth; // Width of the separator line.
Color aLineColor; //color of the separator line
- sal_uInt8 nLineHeight; //Prozentuale Hoehe der Linien
- //(Relativ zu der Hoehe der Spalten incl. UL).
- SwColLineAdj eAdj; //Linie wird oben, mittig oder unten ausgerichtet.
+ sal_uInt16 nLineHeight; // Percentile height of lines.
+ // (Based on height of columns including UL).
+
+ SwColLineAdj eAdj; // Line will be adjusted top, centered or bottom.
- SwColumns aColumns; //Informationen fuer die einzelnen Spalten.
- sal_uInt16 nWidth; //Gesamtwunschbreite aller Spalten.
+ SwColumns aColumns; // Information concerning the columns.
+ sal_uInt16 nWidth; // Total desired width of all columns.
- sal_Bool bOrtho; //Nur wenn dieses Flag gesetzt ist wird beim setzen
- //der GutterWidth eine 'optische Verteilung'
- //vorgenommen.
- //Es muss zurueckgesetzt werden wenn an den
- //Spaltenbreiten bzw. den Raendern gedreht wird.
- //Wenn es wieder gesetzt wird wird automatisch neu
- //gemischt (optisch verteilt).
- //Das Flag ist initial gesetzt.
+ sal_Bool bOrtho; // Only if this flag is set, the setting of GutterWidth will
+ // be accompanied by a "visual rearrangement".
+ // The flag must be reset if widths of columns or borders are changed.
+ // When it is set (again) the visual arrangement is recalculated.
+ // The flag is initially set.
SW_DLLPRIVATE void Calc( sal_uInt16 nGutterWidth, sal_uInt16 nAct );
@@ -106,7 +103,7 @@ public:
SwFmtCol& operator=( const SwFmtCol& );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -115,13 +112,13 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
const SwColumns &GetColumns() const { return aColumns; }
SwColumns &GetColumns() { return aColumns; }
sal_uInt16 GetNumCols() const { return aColumns.Count(); }
-// const Pen& GetLinePen() const { return aPen; }
+
sal_uLong GetLineWidth() const { return nLineWidth;}
const Color& GetLineColor() const { return aLineColor;}
@@ -131,41 +128,40 @@ public:
sal_uInt16 GetWishWidth() const { return nWidth; }
sal_uInt8 GetLineHeight()const { return nLineHeight; }
- //Return USHRT_MAX wenn uneindeutig.
- //Return die kleinste Breite wenn bMin True ist.
+ // Return USHRT_MAX if ambiguous.
+ // Return smallest width if bMin is true.
sal_uInt16 GetGutterWidth( sal_Bool bMin = sal_False ) const;
-// void SetLinePen( const Pen& rNew ) { aPen = rNew; }
void SetLineWidth(sal_uLong nLWidth) { nLineWidth = nLWidth;}
void SetLineColor(const Color& rCol ) { aLineColor = rCol;}
void SetLineHeight( sal_uInt8 nNew ) { nLineHeight = nNew; }
void SetLineAdj( SwColLineAdj eNew ){ eAdj = eNew; }
void SetWishWidth( sal_uInt16 nNew ) { nWidth = nNew; }
- //Mit dieser Funktion koennen die Spalten (immer wieder) initialisert
- //werden. Das Ortho Flag wird automatisch gesetzt.
+ // This function allows to (repeatedly) initialize the columns.
+ // The Ortho flag is set automatically.
void Init( sal_uInt16 nNumCols, sal_uInt16 nGutterWidth, sal_uInt16 nAct );
- //Stellt die Raender fuer die Spalten in aColumns ein.
- //Wenn das Flag bOrtho gesetzt ist, werden die Spalten neu optisch
- //verteilt. Ist das Flag nicht gesetzt werden die Spaltenbreiten nicht
- //veraendert und die Raender werden einfach eingestellt.
+ // Adjusts borders for columns in aColumns.
+ // If flag bOrtho is set, columns are visually re-arranged.
+ // If the flag is not set, columns widths are not changed and
+ // borders are adjusted.
void SetGutterWidth( sal_uInt16 nNew, sal_uInt16 nAct );
- //Verteilt ebenfalls automatisch neu wenn das Flag gesetzt wird;
- //nur dann wird auch der zweite Param. benoetigt und beachtet.
+ // This too re-arranges columns automatically if flag is set.
+ // Only in this case the second parameter is needed and evaluated.
void SetOrtho( sal_Bool bNew, sal_uInt16 nGutterWidth, sal_uInt16 nAct );
- //Fuer den Reader
+ //For the reader
void _SetOrtho( sal_Bool bNew ) { bOrtho = bNew; }
- //Berechnet die aktuelle Breite der Spalte nCol.
- //Das Verhaeltniss von Wunschbreite der Spalte zum Returnwert ist
- //proportional zum Verhaeltniss des Gesamtwunschwertes zu nAct.
+ // Calculates current width of column nCol.
+ // The ratio of desired width of this column to return value is
+ // proportional to ratio of total desired value to nAct.
sal_uInt16 CalcColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const;
- //Wie oben, aber es wir die Breite der PrtArea - also das was fuer
- //den Anwender die Spalte ist - geliefert.
+ // As above except that it returns the width of PrtArea -
+ // that corresponds to what constitutes the column for the user.
sal_uInt16 CalcPrtColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const;
};
@@ -177,3 +173,4 @@ inline const SwFmtCol &SwFmt::GetCol(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx
index 28252ff1c99c..e7f526d8bca7 100644
--- a/sw/inc/fmtcnct.hxx
+++ b/sw/inc/fmtcnct.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,12 +37,11 @@
class SwFlyFrmFmt;
class IntlWrapper;
-//Verbindung (Textfluss) zwischen zwei FlyFrms
-
+// Connection (text flow) between two FlyFrms.
class SW_DLLPUBLIC SwFmtChain: public SfxPoolItem
{
- SwClient aPrev, //Vorgaenger (SwFlyFrmFmt), wenn es diesen gibt.
- aNext; //Nachfolger (SwFlyFrmFmt), wenn es diesen gibt.
+ SwClient aPrev, // Previous SwFlyFrmFmt (if existent).
+ aNext; // Next SwFlyFrmFmt (if existent).
public:
@@ -50,7 +50,7 @@ public:
inline SwFmtChain &operator=( const SwFmtChain& );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -59,7 +59,7 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
SwFlyFrmFmt* GetPrev() const { return (SwFlyFrmFmt*)aPrev.GetRegisteredIn(); }
SwFlyFrmFmt* GetNext() const { return (SwFlyFrmFmt*)aNext.GetRegisteredIn(); }
@@ -85,3 +85,4 @@ inline const SwFmtChain &SwFmt::GetChain(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtcntnt.hxx b/sw/inc/fmtcntnt.hxx
index af4e8a3f3b8f..501da07db0e3 100644
--- a/sw/inc/fmtcntnt.hxx
+++ b/sw/inc/fmtcntnt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,21 +35,20 @@
class SwNodeIndex;
class SwStartNode;
-//Cntnt, Inhalt des Frame (Header, Footer, Fly) ----
+// Cntnt, content of frame (header, footer, fly).
class SW_DLLPUBLIC SwFmtCntnt: public SfxPoolItem
{
SwNodeIndex *pStartNode;
- SwFmtCntnt &operator=( const SwFmtCntnt & ); //Kopieren verboten
+ SwFmtCntnt &operator=( const SwFmtCntnt & ); // Copying not allowed.
public:
-// SwFmtCntnt( const SwNodeIndex *pStartNodeIdx = 0 );
SwFmtCntnt( const SwStartNode* pStartNode = 0 );
SwFmtCntnt( const SwFmtCntnt &rCpy );
~SwFmtCntnt();
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
@@ -64,3 +64,4 @@ inline const SwFmtCntnt &SwFmt::GetCntnt(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx
index f7725cb6294a..4f941e084132 100644
--- a/sw/inc/fmtcol.hxx
+++ b/sw/inc/fmtcol.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,9 @@
#include <svl/svarray.hxx>
#include "swdllapi.h"
#include <format.hxx>
-#include <swtypes.hxx> // fuer MAXLEVEL
+#include <swtypes.hxx> // For MAXLEVEL.
-class SwDoc; // fuer friend
+class SwDoc; // For friend.
class SwFmtColl : public SwFmt
{
@@ -49,27 +50,24 @@ protected:
: SwFmt( rPool, rFmtName, pWhichRanges, pDerFrom, nFmtWhich )
{ SetAuto( sal_False ); }
-
private:
- // erstmal wird nicht kopiert und nicht zugewiesen
+
+ // For now don't copy and don't assign.
SwFmtColl(const SwFmtColl & );
const SwFmtColl &operator=(const SwFmtColl &);
};
-
class SW_DLLPUBLIC SwTxtFmtColl: public SwFmtColl
{
friend class SwDoc;
SwTxtFmtColl(const SwTxtFmtColl & rRef);
- // --> OD 2007-01-24 #i73790#
bool mbStayAssignedToListLevelOfOutlineStyle;
- // <--
protected:
- //sal_uInt8 nOutlineLevel; //<-#outline level, removed by zhaojianwei
- bool mbAssignedToOutlineStyle;//<-#outline level added by zhaojianwei
+
+ bool mbAssignedToOutlineStyle;
SwTxtFmtColl *pNextTxtFmtColl;
@@ -78,11 +76,9 @@ protected:
sal_uInt16 nFmtWh = RES_TXTFMTCOLL )
: SwFmtColl( rPool, pFmtCollName, aTxtFmtCollSetRange,
pDerFrom, nFmtWh ),
- // --> OD 2007-01-24 #i73790#
mbStayAssignedToListLevelOfOutlineStyle( false ),
- // <--
- //nOutlineLevel( NO_NUMBERING ) //<-#outline level,removed by zhaojianwei
- mbAssignedToOutlineStyle(false) //<-#outline level,added by zhaojianwei
+
+ mbAssignedToOutlineStyle(false)
{ pNextTxtFmtColl = this; }
SwTxtFmtColl( SwAttrPool& rPool, const String &rFmtCollName,
@@ -90,26 +86,23 @@ protected:
sal_uInt16 nFmtWh = RES_TXTFMTCOLL )
: SwFmtColl( rPool, rFmtCollName, aTxtFmtCollSetRange,
pDerFrom, nFmtWh ),
- // --> OD 2007-01-24 #i73790#
+
mbStayAssignedToListLevelOfOutlineStyle( false ),
- // <--
- //nOutlineLevel( NO_NUMBERING ) //<-#outline level,removed by zhaojianwei
- mbAssignedToOutlineStyle(false) //<-#outline level,added by zhaojianwei
+
+ mbAssignedToOutlineStyle(false)
{ pNextTxtFmtColl = this; }
public:
- // zum "abfischen" von UL-/LR-/FontHeight Aenderungen
+ // To get UL- / LR- / FontHeight-changes.
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- TYPEINFO(); //Bereits in Basisklasse Client drin.
+ TYPEINFO(); // Already in base class Client.
inline void SetNextTxtFmtColl(SwTxtFmtColl& rNext);
SwTxtFmtColl& GetNextTxtFmtColl() const { return *pNextTxtFmtColl; }
sal_Bool IsAtDocNodeSet() const;
- // --> OD 2006-11-22 #i71574#
- //<-#outline level,zhaojianwei
void SetAttrOutlineLevel( int );
int GetAttrOutlineLevel() const;
int GetAssignedOutlineStyleLevel() const;
@@ -119,38 +112,28 @@ public:
}
void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel);
void DeleteAssignmentToListLevelOfOutlineStyle();
- //<-end
- // <--
- // --> OD 2008-03-04 #refactorlists#
- // override to recognize changes on the <SwNumRuleItem> and register/unregister
- // the paragragh style at the corresponding <SwNumRule> instance
+ // Override to recognize changes on the <SwNumRuleItem> and register/unregister
+ // the paragragh style at the corresponding <SwNumRule> instance.
virtual sal_Bool SetFmtAttr( const SfxPoolItem& rAttr );
virtual sal_Bool SetFmtAttr( const SfxItemSet& rSet );
virtual sal_Bool ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
- // <--
- // --> OD 2007-01-24 #i73790#
- // override <ResetAllFmtAttr()> to stay assigned to list level of outline style
+ // Override <ResetAllFmtAttr()> to stay assigned to list level of outline style.
virtual sal_uInt16 ResetAllFmtAttr();
inline bool StayAssignedToListLevelOfOutlineStyle() const
{
return mbStayAssignedToListLevelOfOutlineStyle;
}
- // <--
- // --> OD 2008-02-13 #newlistleveattrs#
bool AreListLevelIndentsApplicable() const;
- // <--
-/*----------------- JP 09.08.94 17:36 -------------------
- wird die Funktionalitaet von Zeichenvorlagen an Absatzvorlagen
- ueberhaupt benoetigt ??
-
- Wenn, ja dann muessen im TextNode und hier in der TxtCollection ein 2.
- Attset fuer die Char-Attribute angelegt werden; damit die Vererbung
- und der Zugriff auf die gesetzen Attribute richtig funktioniert!!
+/*
+ Is the functionality of character styles at paragraph styles needed?
+ If so, a second Attset for char-attributes has to be created
+ in TextNode and here in TxtCollection in order to make both
+ the inheritance of and the access to set attributes function correctly!
virtual sal_Bool SetDerivedFrom( SwFmtColl* pDerFrom = 0 );
@@ -158,21 +141,20 @@ public:
inline sal_Bool IsCharFmtSet() const;
void SetCharFmt(SwCharFmt *);
void ResetCharFmt();
-inline sal_Bool SwTxtFmtColl::IsCharFmtSet() const
-{
- return aCharDepend.GetRegisteredIn() ? sal_True : sal_False;
-}
-inline SwCharFmt* SwTxtFmtColl::GetCharFmt() const
-{
- return (SwCharFmt*)aCharDepend.GetRegisteredIn();
-}
---------------------------------------------------*/
+ inline sal_Bool SwTxtFmtColl::IsCharFmtSet() const
+ {
+ return aCharDepend.GetRegisteredIn() ? sal_True : sal_False;
+ }
+ inline SwCharFmt* SwTxtFmtColl::GetCharFmt() const
+ {
+ return (SwCharFmt*)aCharDepend.GetRegisteredIn();
+ }
+*/
};
typedef SwTxtFmtColl* SwTxtFmtCollPtr;
SV_DECL_PTRARR(SwTxtFmtColls,SwTxtFmtCollPtr,2,4)
-
class SwGrfFmtColl: public SwFmtColl
{
friend class SwDoc;
@@ -190,17 +172,14 @@ protected:
{}
public:
- TYPEINFO(); //Bereits in Basisklasse Client drin.
+ TYPEINFO(); // Already in base class Client.
};
typedef SwGrfFmtColl* SwGrfFmtCollPtr;
SV_DECL_PTRARR(SwGrfFmtColls,SwGrfFmtCollPtr,2,4)
-
-
-//FEATURE::CONDCOLL
-// --------- Bedingte Vorlagen -------------------------------
-
+// FEATURE::CONDCOLL
+// Conditional styles.
enum Master_CollConditions
{
PARA_IN_LIST = 0x0001,
@@ -217,7 +196,6 @@ enum Master_CollConditions
USRFLD_EXPRESSION = (int)0x8000
};
-
class SW_DLLPUBLIC SwCollCondition : public SwClient
{
sal_uLong nCondition;
@@ -228,8 +206,7 @@ class SW_DLLPUBLIC SwCollCondition : public SwClient
} aSubCondition;
public:
- TYPEINFO(); //Bereits in Basisklasse Client drin.
-
+ TYPEINFO(); // Already in base class Client.
SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond,
sal_uLong nSubCond = 0 );
@@ -257,7 +234,6 @@ public:
SwTxtFmtColl* GetTxtFmtColl() const { return (SwTxtFmtColl*)GetRegisteredIn(); }
};
-
typedef SwCollCondition* SwCollConditionPtr;
SV_DECL_PTRARR_DEL( SwFmtCollConditions, SwCollConditionPtr, 0, 5 )
@@ -277,13 +253,10 @@ protected:
{}
public:
- TYPEINFO(); //Bereits in Basisklasse Client drin.
+ TYPEINFO(); // Already in base class Client.
virtual ~SwConditionTxtFmtColl();
- // zum "abfischen" von Aenderungen
-// virtual void Modify( SfxPoolItem*, SfxPoolItem* );
-
const SwCollCondition* HasCondition( const SwCollCondition& rCond ) const;
const SwFmtCollConditions& GetCondColls() const { return aCondColls; }
void InsertCondition( const SwCollCondition& rCond );
@@ -292,13 +265,12 @@ public:
void SetConditions( const SwFmtCollConditions& );
};
-//FEATURE::CONDCOLL
-
-// ------------- Inline Implementierungen --------------------
-
+// FEATURE::CONDCOLL
+// Inline implementations.
inline void SwTxtFmtColl::SetNextTxtFmtColl( SwTxtFmtColl& rNext )
{
pNextTxtFmtColl = &rNext;
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtcolfunc.hxx b/sw/inc/fmtcolfunc.hxx
index 4cb10c468fd0..296a45c79791 100644
--- a/sw/inc/fmtcolfunc.hxx
+++ b/sw/inc/fmtcolfunc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,7 +38,7 @@ namespace TxtFmtCollFunc
/** Checks, if assignment of paragraph style to list level of outline style
has to be deleted, and deletes the assignment, if needed.
- OD 2006-11-22 #i71574#
+ #i71574#
The assignment of a paragraph style to a list level of the outline style
has to be deleted, if the numbering rule, which is set at the paragraph
style isn't the outline style.
@@ -50,8 +51,6 @@ namespace TxtFmtCollFunc
/** determines the list style, which directly set at the given paragraph style
- OD 2008-03-04 #refactorlists#
-
@author OD
@param rTxtFmtColl
@@ -64,7 +63,6 @@ namespace TxtFmtCollFunc
/** adds the given paragraph style at the directly set list style
- OD 2008-03-04 #refactorlists#
Note: If the given paragraph style has no directly set list style, nothing happens
@param rTxtFmtColl
@@ -76,7 +74,6 @@ namespace TxtFmtCollFunc
/** removes te given paragraph style from the directly set list style
- OD 2008-03-04 #refactorlists#
Note: If the given paragraph style has no directly set list style, nothing happens
@param rTxtFmtColl
@@ -87,3 +84,5 @@ namespace TxtFmtCollFunc
void RemoveFromNumRule( SwTxtFmtColl& rTxtFmtColl );
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx
index 476708948e60..dd56f0cf7b4b 100644
--- a/sw/inc/fmteiro.hxx
+++ b/sw/inc/fmteiro.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,7 @@ public:
SwFmtEditInReadonly( sal_uInt16 nId = RES_EDIT_IN_READONLY,
sal_Bool bPrt = sal_False ) : SfxBoolItem( nId, bPrt ) {}
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methos" of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -58,3 +59,4 @@ inline const SwFmtEditInReadonly &SwFmt::GetEditInReadonly(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtflcnt.hxx b/sw/inc/fmtflcnt.hxx
index a1fbc11feb54..116f18dcea07 100644
--- a/sw/inc/fmtflcnt.hxx
+++ b/sw/inc/fmtflcnt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,33 +33,32 @@
class SwFrmFmt;
class SwTxtFlyCnt;
-// ATT_FLYCNT *******************************************************
+// ATT_FLYCNT
class SwFmtFlyCnt : public SfxPoolItem
{
friend class SwTxtFlyCnt;
- SwTxtFlyCnt* pTxtAttr; // mein TextAttribut
- SwFrmFmt* pFmt; // mein Fly/DrawFrame-Format
- // geschuetzter CopyCtor
+ SwTxtFlyCnt* pTxtAttr;
+ SwFrmFmt* pFmt; // My Fly/DrawFrame-format.
+ // protected CopyCtor
SwFmtFlyCnt& operator=(const SwFmtFlyCnt& rFlyCnt);
public:
SwFmtFlyCnt( SwFrmFmt *pFrmFmt );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
inline SwFrmFmt *GetFrmFmt() const { return pFmt; }
- // fuer Undo: loesche "logisch" das FlyFrmFormat, wird sich im
- // Undo-Object gemerkt.
+ // For Undo: delete the FlyFrmFormat "logically"; it is kept in Undo-object.
inline void SetFlyFmt( SwFrmFmt* pNew = 0 ) { pFmt = pNew; }
const SwTxtFlyCnt *GetTxtFlyCnt() const { return pTxtAttr; }
SwTxtFlyCnt *GetTxtFlyCnt() { return pTxtAttr; }
- // OD 27.06.2003 #108784#
bool Sw3ioExportAllowed() const;
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index a6289406c505..c6edb55fe82f 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,25 +39,25 @@ class SwField;
class SwTxtFld;
class SwView;
-// ATT_FLD ***********************************
+// ATT_FLD
class SW_DLLPUBLIC SwFmtFld : public SfxPoolItem, public SwClient, public SfxBroadcaster
{
friend class SwTxtFld;
friend void _InitCore();
SwField *pField;
- SwTxtFld* pTxtAttr; // mein TextAttribut
+ SwTxtFld* pTxtAttr;
- SwFmtFld(); // das default-Attibut
+ SwFmtFld(); // Default attibute.
- // geschuetzter CopyCtor
+ // Protected CopyCtor.
// @@@ copy construction allowed, but copy assignment is not? @@@
SwFmtFld& operator=(const SwFmtFld& rFld);
public:
TYPEINFO();
- // single argument constructors shall be explicit.
+ // Single argument constructors shall be explicit.
explicit SwFmtFld( const SwField &rFld );
// @@@ copy construction allowed, but copy assignment is not? @@@
@@ -64,7 +65,7 @@ public:
virtual ~SwFmtFld();
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
@@ -74,7 +75,6 @@ public:
const SwField *GetFld() const { return pField; }
SwField *GetFld() { return pField; }
- // #111840#
/**
Sets current field.
@@ -117,3 +117,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtfollowtextflow.hxx b/sw/inc/fmtfollowtextflow.hxx
index 878b59e5ccf6..7f079d3ca9b2 100644
--- a/sw/inc/fmtfollowtextflow.hxx
+++ b/sw/inc/fmtfollowtextflow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,7 +44,7 @@ public:
TYPEINFO();
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -64,3 +65,4 @@ inline const SwFmtFollowTextFlow &SwFmt::GetFollowTextFlow(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtfordr.hxx b/sw/inc/fmtfordr.hxx
index 04647edc1e68..9e8a05dd95cf 100644
--- a/sw/inc/fmtfordr.hxx
+++ b/sw/inc/fmtfordr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,6 @@
#include <hintids.hxx>
#include <format.hxx>
-//Die FillOrder ---------------------------------
enum SwFillOrder
{
@@ -49,7 +49,7 @@ public:
SwFmtFillOrder( SwFillOrder = ATT_TOP_DOWN );
inline SwFmtFillOrder &operator=( const SwFmtFillOrder &rCpy );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual sal_uInt16 GetValueCount() const;
@@ -70,3 +70,4 @@ inline const SwFmtFillOrder &SwFmt::GetFillOrder(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx
index ec3b7458ef6a..e3ef199d66cf 100644
--- a/sw/inc/fmtfsize.hxx
+++ b/sw/inc/fmtfsize.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,15 +37,14 @@
class IntlWrapper;
-//Die Framesize ---------------------------------
+//Frame size.
enum SwFrmSize
{
- ATT_VAR_SIZE, //Frm ist in der Var-Richtung variabel
- ATT_FIX_SIZE, //Frm ist in der Var-Richtung unbeweglich
- ATT_MIN_SIZE //Der Wert in der Var-Richtung beschreibt eine
- //Minimalgroesse, die nicht unter- wohl aber
- //ueberschritten werden kann.
+ ATT_VAR_SIZE, // Frame is variable in Var-direction.
+ ATT_FIX_SIZE, // Frame cannot be moved in Var-direction.
+ ATT_MIN_SIZE // Value in Var-direction gives minimum
+ // (can be exceeded but not be less).
};
class SW_DLLPUBLIC SwFmtFrmSize: public SfxPoolItem
@@ -54,25 +54,26 @@ class SW_DLLPUBLIC SwFmtFrmSize: public SfxPoolItem
SwFrmSize eFrmWidthType;
sal_uInt8 nWidthPercent; //Fuer Tabellen kann die Breite in Prozent
sal_uInt8 nHeightPercent; //angegeben sein.
- //Fuer Rahmen koennen Hoehe und/oder Breite
- //in Prozent angegeben sein. Wenn nur eine
- //der Angaben in Prozent angeben ist, kann
- //durch den ausgezeichneten Wert 0xFF in der
- //anderen Prozentangabe bestimmt werden, das
- //sich diese Richtung proportional zur anderen
- //verhaelt. Basis fuer die Umrechnung sind fuer
- //diesen Fall die Angaben in der Size.
- //Die Prozentwerte beziehen sich immer auf die
- //Umgebung in der das Objekt steht (PrtArea)
- //Auf die Bildschirmbreite abzueglich Raender
- //in der BrowseView wenn die Umgebung die Seite
- //ist.
+
+ // For tables: width can be given in percent.
+
+ // For frames: height and/or width may be given in percent.
+ // If only one of these percentage values is given, the value 0xFF
+ // used instead of the missing percentage value indicates this side
+ // being proportional to the given one.
+ // The calculation in this case is based upon the values in Size.
+ // Percentages are always related to the environment in which
+ // the object is placed (PrtArea) and to the screen width
+ // minus borders in BrowseView if the environment is the page.
+
+
+
public:
SwFmtFrmSize( SwFrmSize eSize = ATT_VAR_SIZE,
SwTwips nWidth = 0, SwTwips nHeight = 0 );
SwFmtFrmSize& operator=( const SwFmtFrmSize& rCpy );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -80,8 +81,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
SwFrmSize GetHeightSizeType() const { return eFrmHeightType; }
void SetHeightSizeType( SwFrmSize eSize ) { eFrmHeightType = eSize; }
@@ -111,3 +112,4 @@ inline const SwFmtFrmSize &SwFmt::GetFrmSize(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx
index 9a470ddfa1df..8c1315f8efb0 100644
--- a/sw/inc/fmtftn.hxx
+++ b/sw/inc/fmtftn.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,17 +35,17 @@
class SwDoc;
class SwTxtFtn;
-// ATT_FTN **********************************************************
+// ATT_FTN
class SW_DLLPUBLIC SwFmtFtn: public SfxPoolItem
{
friend class SwTxtFtn;
- SwTxtFtn* pTxtAttr; //mein TextAttribut
- String aNumber; //Benutzerdefinierte 'Nummer'
+ SwTxtFtn* pTxtAttr; // My TextAttribute.
+ String aNumber; // User-defined 'Number'.
sal_uInt16 nNumber; //Automatische Nummerierung
- bool m_bEndNote; // is it an End note?
+ bool m_bEndNote; // Is it an End note?
- // geschuetzter CopyCtor
+ // Protected CopyCtor.
SwFmtFtn& operator=(const SwFmtFtn& rFtn);
SwFmtFtn( const SwFmtFtn& );
@@ -52,7 +53,7 @@ public:
SwFmtFtn( bool bEndNote = false );
virtual ~SwFmtFtn();
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
@@ -72,10 +73,11 @@ public:
void GetFtnText( String& rStr ) const;
- // returnt den anzuzeigenden String der Fuss-/Endnote
+ // Returns string to be displayed of footnote / endnote.
String GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrs = sal_False ) const;
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx
index f3472108de97..c7ecbafc2b10 100644
--- a/sw/inc/fmtftntx.hxx
+++ b/sw/inc/fmtftntx.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,16 +66,9 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
-// will be used at time??
-// void FillVariable( SbxVariable &rVar,
-// SfxMapUnit eCoreMetric,
-// SfxMapUnit eUserMetric ) const;
-// virtual SfxArgumentError SetVariable( const SbxVariable &rVal,
-// SfxMapUnit eCoreMetric,
-// SfxMapUnit eUserMetric );
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
@@ -135,3 +129,4 @@ inline const SwFmtEndAtTxtEnd &SwFmt::GetEndAtTxtEnd(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
index c8773d61d1d5..67134aabd75d 100644
--- a/sw/inc/fmthdft.hxx
+++ b/sw/inc/fmthdft.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,12 +37,12 @@ class SwFrmFmt;
class IntlWrapper;
-//Kopfzeile, fuer Seitenformate
-//Client von FrmFmt das den Header beschreibt.
+//Header, for PageFormats
+//Client of FrmFmt discribing the header.
class SW_DLLPUBLIC SwFmtHeader: public SfxPoolItem, public SwClient
{
- sal_Bool bActive; //Nur zur Steuerung (Erzeugung des Inhaltes)
+ sal_Bool bActive; // Only for controlling (creation of content).
public:
SwFmtHeader( sal_Bool bOn = sal_False );
@@ -52,7 +53,7 @@ public:
TYPEINFO();
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -68,12 +69,12 @@ public:
void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; }
};
-//Fusszeile, fuer Seitenformate
-//Client von FrmFmt das den Footer beschreibt.
+//Footer, for pageformats
+//Client of FrmFmt describing the footer
class SW_DLLPUBLIC SwFmtFooter: public SfxPoolItem, public SwClient
{
- sal_Bool bActive; //Nur zur Steuerung (Erzeugung des Inhaltes)
+ sal_Bool bActive; // Only for controlling (creation of content).
public:
SwFmtFooter( sal_Bool bOn = sal_False );
@@ -84,7 +85,7 @@ public:
TYPEINFO();
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -112,3 +113,4 @@ inline const SwFmtFooter &SwFmt::GetFooter(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtinfmt.hxx b/sw/inc/fmtinfmt.hxx
index bfb6d35d2e76..ae33b2ab492c 100644
--- a/sw/inc/fmtinfmt.hxx
+++ b/sw/inc/fmtinfmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,30 +37,30 @@ class SvxMacroTableDtor;
class SwTxtINetFmt;
class IntlWrapper;
-// ATT_INETFMT *********************************************
+// ATT_INETFMT
class SW_DLLPUBLIC SwFmtINetFmt: public SfxPoolItem
{
friend class SwTxtINetFmt;
- String aURL; // die URL
- String aTargetFrame; // in diesen Frame soll die URL
+ String aURL; // URL.
+ String aTargetFrame; // Target frame for URL.
String aINetFmt;
String aVisitedFmt;
- String aName; // Name des Links
+ String aName; // Name of the link.
SvxMacroTableDtor* pMacroTbl;
- SwTxtINetFmt* pTxtAttr; // mein TextAttribut
+ SwTxtINetFmt* pTxtAttr; // My TextAttribute.
sal_uInt16 nINetId;
sal_uInt16 nVisitedId;
public:
SwFmtINetFmt( const String& rURL, const String& rTarget );
SwFmtINetFmt( const SwFmtINetFmt& rAttr );
- SwFmtINetFmt(); // for TypeInfo
+ SwFmtINetFmt(); // For TypeInfo.
virtual ~SwFmtINetFmt();
TYPEINFO();
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -68,9 +69,9 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal,
sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal,
sal_uInt8 nMemberId = 0 );
@@ -96,11 +97,11 @@ public:
sal_uInt16 GetVisitedFmtId() const { return nVisitedId; }
void SetVisitedFmtId( sal_uInt16 nNew ) { nVisitedId = nNew; }
- // setze eine neue oder loesche die akt. MakroTabelle
+ // Set a new MacroTable or clear the current one.
void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
- // setze / erfrage ein Makro
+ // Macro getter and setter.
void SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro );
const SvxMacro* GetMacro( sal_uInt16 nEvent ) const;
};
@@ -108,3 +109,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx
index fb04ec8ed94d..a98e90b8732d 100644
--- a/sw/inc/fmtline.hxx
+++ b/sw/inc/fmtline.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,8 +38,8 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtLineNumber: public SfxPoolItem
{
- sal_uLong nStartValue :24; //Startwert fuer den Absatz, 0 == kein Startwert
- sal_uLong bCountLines :1; //Zeilen des Absatzes sollen mitgezaehlt werden.
+ sal_uLong nStartValue :24; // Starting value for the paragraph. 0 == no starting value.
+ sal_uLong bCountLines :1; // Also count lines of paragraph.
public:
SwFmtLineNumber();
@@ -46,7 +47,7 @@ public:
TYPEINFO();
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -54,8 +55,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
sal_uLong GetStartValue() const { return nStartValue; }
sal_Bool IsCount() const { return bCountLines != 0; }
@@ -69,3 +70,4 @@ inline const SwFmtLineNumber &SwAttrSet::GetLineNumber(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtlsplt.hxx b/sw/inc/fmtlsplt.hxx
index 1ac109d067ef..23914d3b067b 100644
--- a/sw/inc/fmtlsplt.hxx
+++ b/sw/inc/fmtlsplt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,7 @@ class SW_DLLPUBLIC SwFmtLayoutSplit : public SfxBoolItem
public:
SwFmtLayoutSplit( sal_Bool bSplit = sal_True ) : SfxBoolItem( RES_LAYOUT_SPLIT, bSplit ) {}
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -56,3 +57,4 @@ inline const SwFmtLayoutSplit &SwFmt::GetLayoutSplit(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index b486434d19df..459220c6007f 100755..100644
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,7 +120,6 @@ public:
// SfxPoolItem
virtual int operator==( const SfxPoolItem & ) const;
virtual SfxPoolItem * Clone( SfxItemPool *pPool = 0 ) const;
-// TYPEINFO();
/// notify clients registered at m_pMeta that this meta is being (re-)moved
void NotifyChangeTxtNode(SwTxtNode *const pTxtNode);
@@ -227,3 +227,4 @@ public:
#endif // SW_FMTMETA_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx
index aa6389992a3d..ac196412fba5 100644
--- a/sw/inc/fmtornt.hxx
+++ b/sw/inc/fmtornt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,7 +44,7 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtVertOrient: public SfxPoolItem
{
- SwTwips nYPos; //Enthaelt _immer_ die aktuelle RelPos.
+ SwTwips nYPos; // Contains *always* the current RelPos.
sal_Int16 eOrient;
sal_Int16 eRelation;
public:
@@ -52,7 +53,7 @@ public:
sal_Int16 eRel = com::sun::star::text::RelOrientation::PRINT_AREA );
inline SwFmtVertOrient &operator=( const SwFmtVertOrient &rCpy );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -60,8 +61,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
sal_Int16 GetVertOrient() const { return eOrient; }
sal_Int16 GetRelationOrient() const { return eRelation; }
@@ -72,25 +73,24 @@ public:
void SetPos( SwTwips nNew ) { nYPos = nNew; }
};
-//SwFmtHoriOrient, wie und woran orientiert --
-// sich der FlyFrm in der Hoizontalen ----------
+// SwFmtHoriOrient; how and towards what does the FlyFrm orient itself horizontally?
#define IVER_HORIORIENT_TOGGLE ((sal_uInt16)0x0001)
#define IVER_HORIORIENT_REL ((sal_uInt16)0x0002)
class SW_DLLPUBLIC SwFmtHoriOrient: public SfxPoolItem
{
- SwTwips nXPos; //Enthaelt _immer_ die aktuelle RelPos.
+ SwTwips nXPos; // Contains *always* the current RelPos.
sal_Int16 eOrient;
sal_Int16 eRelation;
- sal_Bool bPosToggle : 1; // auf geraden Seiten Position spiegeln
+ sal_Bool bPosToggle : 1; // Flip position on even pages.
public:
TYPEINFO();
SwFmtHoriOrient( SwTwips nX = 0, sal_Int16 eHori = com::sun::star::text::HoriOrientation::NONE,
sal_Int16 eRel = com::sun::star::text::RelOrientation::PRINT_AREA, sal_Bool bPos = sal_False );
inline SwFmtHoriOrient &operator=( const SwFmtHoriOrient &rCpy );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -98,8 +98,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
sal_Int16 GetHoriOrient() const { return eOrient; }
sal_Int16 GetRelationOrient() const { return eRelation; }
@@ -141,3 +141,4 @@ inline const SwFmtHoriOrient &SwFmt::GetHoriOrient(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
index 8305b9b98954..307fcb6576ab 100644
--- a/sw/inc/fmtpdsc.hxx
+++ b/sw/inc/fmtpdsc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,22 +40,22 @@ class SwHistory;
class SwPaM;
class IntlWrapper;
-//Pagedescriptor
-//Client vom SwPageDesc der durch das Attribut "beschrieben" wird.
+// Pagedescriptor
+// Client of SwPageDesc that is "described" by the attribute.
#define IVER_FMTPAGEDESC_NOAUTO ((sal_uInt16)0x0001)
#define IVER_FMTPAGEDESC_LONGPAGE ((sal_uInt16)0x0002)
class SW_DLLPUBLIC SwFmtPageDesc : public SfxPoolItem, public SwClient
{
- // diese "Doc"-Funktion ist friend, um nach dem kopieren das
- // Auto-Flag setzen zu koennen !!
+ // This "Doc"-function is made friend in order to be able
+ // to set the auto-flag after copying!!
friend sal_Bool InsAttr( SwDoc*, const SwPaM &, const SfxItemSet&, sal_uInt16,
SwHistory* );
- sal_uInt16 nNumOffset; // Seitennummer Offset
- sal_uInt16 nDescNameIdx; // SW3-Reader: Stringpool-Index des Vorlagennamens
- SwModify* pDefinedIn; // Verweis auf das Objekt, in dem das
- // Attribut gesetzt wurde (CntntNode/Format)
+ sal_uInt16 nNumOffset; // Offset page number.
+ sal_uInt16 nDescNameIdx; // SW3-Reader: stringpool-index of style name.
+ SwModify* pDefinedIn; // Points to the object in which the
+ // attribute was set (CntntNode/Format).
public:
SwFmtPageDesc( const SwPageDesc *pDesc = 0 );
@@ -64,7 +65,7 @@ public:
TYPEINFO();
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -72,8 +73,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
@@ -83,7 +84,7 @@ public:
sal_uInt16 GetNumOffset() const { return nNumOffset; }
void SetNumOffset( sal_uInt16 nNum ) { nNumOffset = nNum; }
- // erfrage/setze, wo drin das Attribut verankert ist
+ // Query / set where attribute is anchored.
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
void ChgDefinedIn( const SwModify* pNew ) { pDefinedIn = (SwModify*)pNew; }
};
@@ -97,3 +98,4 @@ inline const SwFmtPageDesc &SwFmt::GetPageDesc(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtrfmrk.hxx b/sw/inc/fmtrfmrk.hxx
index 9f97282d8e10..65beae6cd1ea 100644
--- a/sw/inc/fmtrfmrk.hxx
+++ b/sw/inc/fmtrfmrk.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,14 +34,14 @@
class SwTxtRefMark;
-// ATT_REFMARK *******************************************************
+// ATT_REFMARK
class SwFmtRefMark : public SfxPoolItem
{
friend class SwTxtRefMark;
- SwTxtRefMark* pTxtAttr; // mein TextAttribut
+ SwTxtRefMark* pTxtAttr;
- // geschuetzter CopyCtor
+ // Protected CopyCtor.
SwFmtRefMark& operator=(const SwFmtRefMark& rRefMark);
String aRefName;
@@ -49,7 +50,7 @@ public:
SwFmtRefMark( const SwFmtRefMark& rRefMark );
~SwFmtRefMark( );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
@@ -62,3 +63,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtrowsplt.hxx b/sw/inc/fmtrowsplt.hxx
index 8f0606b87ac2..4d6cdfe8f47f 100644
--- a/sw/inc/fmtrowsplt.hxx
+++ b/sw/inc/fmtrowsplt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,7 @@ class SW_DLLPUBLIC SwFmtRowSplit : public SfxBoolItem
public:
SwFmtRowSplit( sal_Bool bSplit = sal_True ) : SfxBoolItem( RES_ROW_SPLIT, bSplit ) {}
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -56,3 +57,4 @@ inline const SwFmtRowSplit &SwFmt::GetRowSplit(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx
index 76f2156bcfdd..bee5b6a3137b 100644
--- a/sw/inc/fmtruby.hxx
+++ b/sw/inc/fmtruby.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,12 +38,12 @@ class SW_DLLPUBLIC SwFmtRuby : public SfxPoolItem
{
friend class SwTxtRuby;
- String sRubyTxt; // the ruby txt
- String sCharFmtName; // name of the charformat
- SwTxtRuby* pTxtAttr; // the TextAttribut
- sal_uInt16 nCharFmtId; // PoolId of the charformat
- sal_uInt16 nPosition; // Position of the Ruby-Character
- sal_uInt16 nAdjustment; // specific adjustment of the Ruby-Ch.
+ String sRubyTxt; // The ruby txt.
+ String sCharFmtName; // Name of the charformat.
+ SwTxtRuby* pTxtAttr; // The TextAttribute.
+ sal_uInt16 nCharFmtId; // PoolId of the charformat.
+ sal_uInt16 nPosition; // Position of the Ruby-character.
+ sal_uInt16 nAdjustment; // Specific adjustment of the Ruby-ch.
public:
SwFmtRuby( const String& rRubyTxt );
@@ -51,7 +52,7 @@ public:
SwFmtRuby& operator=( const SwFmtRuby& rAttr );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
@@ -61,9 +62,9 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal,
sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal,
sal_uInt8 nMemberId = 0 );
@@ -89,3 +90,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx
index f9ceb522a2c5..b8edae5a58c8 100644
--- a/sw/inc/fmtsrnd.hxx
+++ b/sw/inc/fmtsrnd.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,15 +33,10 @@
#include <format.hxx>
#include <svl/eitem.hxx>
-// --> OD 2006-08-15 #i68520# - refactoring
-// separate enumeration <SwSurround> in own header file
#include <fmtsrndenum.hxx>
-// <--
class IntlWrapper;
-//SwFmtSurround, wie soll sich der ---------------
-// Dokumentinhalt unter dem Rahmen verhalten ---
-
+// SwFmtSurround: How document content under the frame shall behave.
class SW_DLLPUBLIC SwFmtSurround: public SfxEnumItem
{
sal_Bool bAnchorOnly :1;
@@ -51,7 +47,7 @@ public:
SwFmtSurround( const SwFmtSurround & );
inline SwFmtSurround &operator=( const SwFmtSurround &rCpy );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual Methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual sal_uInt16 GetValueCount() const;
@@ -60,8 +56,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
SwSurround GetSurround()const { return SwSurround( GetValue() ); }
@@ -91,3 +87,4 @@ inline const SwFmtSurround &SwFmt::GetSurround(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtsrndenum.hxx b/sw/inc/fmtsrndenum.hxx
index 688d89a236ea..a4160047953f 100644
--- a/sw/inc/fmtsrndenum.hxx
+++ b/sw/inc/fmtsrndenum.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,3 +40,5 @@ enum SwSurround {
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx
index 86241fb60649..667f0f1d8cac 100644
--- a/sw/inc/fmturl.hxx
+++ b/sw/inc/fmturl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,12 +40,12 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtURL: public SfxPoolItem
{
- String sTargetFrameName; // in diesen Frame soll die URL
- String sURL; //Einfache URL
- String sName; // Name des Anchors
- ImageMap *pMap; //ClientSide Images
+ String sTargetFrameName; // Target frame for URL.
+ String sURL; // Simple URL.
+ String sName; // Name of the anchor.
+ ImageMap *pMap; // ClientSide images.
- sal_Bool bIsServerMap; //mit der URL eine ServerSideImageMap
+ sal_Bool bIsServerMap; // A ServerSideImageMap with the URL.
SwFmtURL& operator=( const SwFmtURL& );
@@ -56,7 +57,7 @@ public:
virtual ~SwFmtURL();
- // "pure virtual Methoden" vom SfxPoolItem
+ // "Pure virtual methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -64,12 +65,12 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
void SetTargetFrameName( const String& rStr ) { sTargetFrameName = rStr; }
void SetURL( const String &rURL, sal_Bool bServerMap );
- void SetMap( const ImageMap *pM ); //Pointer wird kopiert!
+ void SetMap( const ImageMap *pM ); // Pointer will be copied.
const String &GetTargetFrameName()const { return sTargetFrameName; }
const String &GetURL() const { return sURL; }
@@ -90,3 +91,4 @@ inline const SwFmtURL &SwFmt::GetURL(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/fmtwrapinfluenceonobjpos.hxx b/sw/inc/fmtwrapinfluenceonobjpos.hxx
index 1959ff1abf9f..91418b49e24d 100644
--- a/sw/inc/fmtwrapinfluenceonobjpos.hxx
+++ b/sw/inc/fmtwrapinfluenceonobjpos.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,11 +41,10 @@ private:
public:
TYPEINFO();
- // --> OD 2004-10-18 #i35017# - constant name has changed
+ // #i35017# - constant name has changed
SwFmtWrapInfluenceOnObjPos(
sal_Int16 _nWrapInfluenceOnPosition =
com::sun::star::text::WrapInfluenceOnPosition::ONCE_CONCURRENT );
- // <--
SwFmtWrapInfluenceOnObjPos(
const SwFmtWrapInfluenceOnObjPos& _rCpy );
~SwFmtWrapInfluenceOnObjPos();
@@ -56,16 +56,15 @@ public:
virtual int operator==( const SfxPoolItem& _rAttr ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
// direct accessors to data
void SetWrapInfluenceOnObjPos( sal_Int16 _nWrapInfluenceOnPosition );
- // --> OD 2004-10-18 #i35017# - add parameter <_bIterativeAsOnceConcurrent>
+ // #i35017# - add parameter <_bIterativeAsOnceConcurrent>
// to control, if value <ITERATIVE> has to be treated as <ONCE_CONCURRENT>
sal_Int16 GetWrapInfluenceOnObjPos(
const bool _bIterativeAsOnceConcurrent = false ) const;
- // <--
};
inline const SwFmtWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(sal_Bool bInP) const
@@ -75,3 +74,5 @@ inline const SwFmtWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(sal
{ return aSet.GetWrapInfluenceOnObjPos(bInP); }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index d6e51aa6a617..6f7e9b84f428 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,8 @@
#include <tools/solar.h>
#include "swdllapi.h"
-#include <errhdl.hxx> // fuer ASSERT
-#include <swatrset.hxx> // fuer SfxItemPool/-Set, Attr forward decl.
-#include <calbck.hxx> // fuer SwModify
+#include <swatrset.hxx> // For SfxItemPool/-Set, Attr forward decl.
+#include <calbck.hxx> // For SwModify.
#include <hintids.hxx>
class IDocumentSettingAccess;
@@ -44,25 +44,23 @@ class SwDoc;
class SW_DLLPUBLIC SwFmt : public SwModify
{
-// friend class SwSwgReader;
-// friend class SwSwgWriter;
String aFmtName;
SwAttrSet aSet;
sal_uInt16 nWhichId;
- sal_uInt16 nFmtId; // Format-ID fuer Lesen/Schreiben
- sal_uInt16 nPoolFmtId; // Id-fuer "automatich" erzeugte Formate
- // (ist keine harte Attributierung !!)
- sal_uInt16 nPoolHelpId; // HelpId fuer diese Pool-Vorlage
- sal_uInt8 nPoolHlpFileId; // FilePos ans Doc auf die Vorlagen-Hilfen
- sal_Bool bWritten : 1; // sal_True: bereits geschrieben
- sal_Bool bAutoFmt : 1; // sal_False: es handelt sich um eine Vorlage
- // ist dflt immer auf sal_True !
- sal_Bool bFmtInDTOR : 1; // sal_True: das Format wird geloscht. Damit man in
- // der FmtChg-Message das erkennen kann!!!
- sal_Bool bAutoUpdateFmt : 1; // sal_True: am Format werden die Attribute
- // eines kompletten Absatzes gesetzt (UI-seitig!)
+ sal_uInt16 nFmtId; // Format-ID for reading / writing.
+ sal_uInt16 nPoolFmtId; // Id for "automatically" created formats.
+ // (is not hard attribution!!!)
+ sal_uInt16 nPoolHelpId; // HelpId for this Pool-style.
+ sal_uInt8 nPoolHlpFileId; // FilePos to Doc to these style helps.
+ sal_Bool bWritten : 1; // TRUE: already written.
+ sal_Bool bAutoFmt : 1; // FALSE: it is a template.
+ // default is true!
+ sal_Bool bFmtInDTOR : 1; // TRUE: Format becomes deleted. In order to be able
+ // to recognize this in FmtChg-message!!
+ sal_Bool bAutoUpdateFmt : 1;// TRUE: Set attributes of a whole paragraph
+ // at format (UI-side!).
protected:
SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
@@ -72,47 +70,41 @@ protected:
SwFmt( const SwFmt& rFmt );
public:
- TYPEINFO(); //Bereits in Basisklasse Client drin.
+ TYPEINFO(); // Already in base class Client.
virtual ~SwFmt();
SwFmt &operator=(const SwFmt&);
- // fuer die Abfrage der Writer-Funktionen
+ // for Querying of Writer-functions.
sal_uInt16 Which() const { return nWhichId; }
virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
- // erfrage vom Format Informationen
+
+ // Query format information.
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
- // kopiere Attribute; auch ueber Dokumentgrenzen hinweg
+ // Copy attributes even among documents.
void CopyAttrs( const SwFmt&, sal_Bool bReplace=sal_True );
- // loesche alle Attribute, die nicht in rFmt stehen
+ // Delete all attributes that are not in rFmt.
void DelDiffs( const SfxItemSet& rSet );
void DelDiffs( const SwFmt& rFmt ) { DelDiffs( rFmt.GetAttrSet() ); }
- // Umhaengen des Formats (0 = Default)
+ // 0 is Default.
sal_Bool SetDerivedFrom(SwFmt *pDerivedFrom = 0);
- // Ist bInParents sal_False,
- // wird nur in diesem Format nach dem Attribut gesucht.
+ // If bInParents is FALSE, search only in this format for attribute.
inline const SfxPoolItem& GetFmtAttr( sal_uInt16 nWhich,
sal_Bool bInParents = sal_True ) const;
inline SfxItemState GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInParent = sal_True,
const SfxPoolItem **ppItem = 0 ) const;
- // --> OD 2008-03-03 #refactorlists#
- // methods renamed and made virtual
virtual sal_Bool SetFmtAttr( const SfxPoolItem& rAttr );
virtual sal_Bool SetFmtAttr( const SfxItemSet& rSet );
virtual sal_Bool ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
- // <--
- // --> OD 2007-01-24 #i73790#
- // Method renamed and made virtual
- // Nimmt alle Hints aus dem Delta-Array,
- // liefert die Anzahl der geloeschten Hints
+ // Takes all hints from Delta-Array,
+ // returns count of deleted hints.
virtual sal_uInt16 ResetAllFmtAttr();
- // <--
inline SwFmt* DerivedFrom() const { return (SwFmt*)pRegisteredIn; }
inline sal_Bool IsDefault() const { return DerivedFrom() == 0; }
@@ -122,7 +114,7 @@ public:
inline void SetName( const sal_Char* pNewName,
sal_Bool bBroadcast=sal_False);
- // zur Abfrage des Attribute Arrays
+ // For querying the attribute array.
inline const SwAttrSet& GetAttrSet() const { return aSet; }
// Das Doc wird jetzt am SwAttrPool gesetzt. Dadurch hat man es immer
@@ -130,63 +122,59 @@ public:
const SwDoc *GetDoc() const { return aSet.GetDoc(); }
SwDoc *GetDoc() { return aSet.GetDoc(); }
- /** Provides access to the document settings interface
- */
+ /// Provides access to the document settings interface.
const IDocumentSettingAccess* getIDocumentSettingAccess() const;
- /** Provides access to the document draw model interface
- */
+ /// Provides access to the document draw model interface.
const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const;
IDocumentDrawModelAccess* getIDocumentDrawModelAccess();
- /** Provides access to the document layout interface
- */
+ /// Provides access to the document layout interface.
const IDocumentLayoutAccess* getIDocumentLayoutAccess() const;
IDocumentLayoutAccess* getIDocumentLayoutAccess();
- /** Provides access to the document idle timer interface
- */
- IDocumentTimerAccess* getIDocumentTimerAccess();
+ /// Provides access to the document idle timer interface.
+ IDocumentTimerAccess* getIDocumentTimerAccess();
- /** Provides access to the document idle timer interface
- */
+ /// Provides access to the document idle timer interface.
IDocumentFieldsAccess* getIDocumentFieldsAccess();
- /** gives access to the chart data-provider
- */
+ /// Gives access to the chart data-provider.
IDocumentChartDataProviderAccess* getIDocumentChartDataProviderAccess();
- // erfragen und setzen der Poolvorlagen-Id's
+ // Get and set Pool style IDs.
sal_uInt16 GetPoolFmtId() const { return nPoolFmtId; }
void SetPoolFmtId( sal_uInt16 nId ) { nPoolFmtId = nId; }
- // erfragen und setzen der Hilfe-Id's fuer die Document-Vorlagen
+ // Get and set Help-IDs for document templates.
sal_uInt16 GetPoolHelpId() const { return nPoolHelpId; }
void SetPoolHelpId( sal_uInt16 nId ) { nPoolHelpId = nId; }
sal_uInt8 GetPoolHlpFileId() const { return nPoolHlpFileId; }
void SetPoolHlpFileId( sal_uInt8 nId ) { nPoolHlpFileId = nId; }
- // erfrage die Attribut-Beschreibung, returnt den reingereichten String
+
+ // Get attribute-description. Returns passed string.
void GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText ) const
{ aSet.GetPresentation( ePres, eCoreMetric, ePresMetric, rText ); }
- // Das Format-ID fuer Lesen/Schreiben:
+
+ // Format-ID for reading/writing:
void ResetWritten() { bWritten = sal_False; }
- // Abfragen/Setzen vom AutoFmt-Flag
+ // Query / set AutoFmt-flag.
sal_Bool IsAuto() const { return bAutoFmt; }
void SetAuto( sal_Bool bNew = sal_False ) { bAutoFmt = bNew; }
- // Abfragen/Setzen vom bAutoUpdateFmt-Flag
+ // Query / set bAutoUpdateFmt-flag.
sal_Bool IsAutoUpdateFmt() const { return bAutoUpdateFmt; }
void SetAutoUpdateFmt( sal_Bool bNew = sal_True ) { bAutoUpdateFmt = bNew; }
sal_Bool IsFmtInDTOR() const { return bFmtInDTOR; }
- // GetMethoden: das Bool gibt an, ob nur im Set (sal_False) oder auch in
- // den Parents gesucht werden soll. Wird nichts gefunden,
- // wird das deflt. Attribut returnt.
- // Charakter-Attribute - impl. steht im charatr.hxx
- // AMA 12.10.94: Umstellung von SwFmt... auf Svx...
+ // GetMethods: Bool indicates whether to search only in Set (FALSE)
+ // or also in Parents.
+ // If nothing is found the defaulted attribute is returned.
+
+ // Character-attributes - implemented in charatr.hxx
inline const SvxPostureItem &GetPosture( sal_Bool = sal_True ) const;
inline const SvxWeightItem &GetWeight( sal_Bool = sal_True ) const;
inline const SvxShadowedItem &GetShadowed( sal_Bool = sal_True ) const;
@@ -227,7 +215,7 @@ public:
inline const SvxCharReliefItem &GetCharRelief( sal_Bool = sal_True ) const;
inline const SvxCharHiddenItem &GetCharHidden( sal_Bool = sal_True ) const;
- // Frame-Attribute - impl. steht im frmatr.hxx,
+ // Frame-attributes - implemented in frmatr.hxx.
inline const SwFmtFillOrder &GetFillOrder( sal_Bool = sal_True ) const;
inline const SwFmtFrmSize &GetFrmSize( sal_Bool = sal_True ) const;
inline const SwFmtHeader &GetHeader( sal_Bool = sal_True ) const;
@@ -263,12 +251,12 @@ public:
inline const SvxFrameDirectionItem &GetFrmDir( sal_Bool = sal_True ) const;
inline const SwTextGridItem &GetTextGrid( sal_Bool = sal_True ) const;
inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( sal_Bool = sal_True ) const;
- // OD 18.09.2003 #i18732#
+ // #i18732#
inline const SwFmtFollowTextFlow &GetFollowTextFlow(sal_Bool = sal_True) const;
- // OD 2004-05-05 #i28701#
+ // #i28701#
inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(sal_Bool = sal_True) const;
- // Grafik-Attribute - impl. steht im grfatr.hxx
+ // Graphics-attributes - implemented in grfatr.hxx
inline const SwMirrorGrf &GetMirrorGrf( sal_Bool = sal_True ) const;
inline const SwCropGrf &GetCropGrf( sal_Bool = sal_True ) const;
inline const SwRotationGrf &GetRotationGrf(sal_Bool = sal_True ) const;
@@ -282,7 +270,7 @@ public:
inline const SwTransparencyGrf &GetTransparencyGrf(sal_Bool = sal_True ) const;
inline const SwDrawModeGrf &GetDrawModeGrf(sal_Bool = sal_True ) const;
- // Paragraph-Attribute - impl. steht im paratr.hxx
+ // Paragraph-attributes - implemented in paratr.hxx.
inline const SvxLineSpacingItem &GetLineSpacing( sal_Bool = sal_True ) const;
inline const SvxAdjustItem &GetAdjust( sal_Bool = sal_True ) const;
inline const SvxFmtSplitItem &GetSplit( sal_Bool = sal_True ) const;
@@ -300,14 +288,13 @@ public:
inline const SvxParaGridItem &GetParaGrid(sal_Bool = sal_True) const;
inline const SwParaConnectBorderItem &GetParaConnectBorder(sal_Bool = sal_True ) const;
- // TabellenBox-Attribute - impl. steht im cellatr.hxx
+ // TableBox attributes - implemented in cellatr.hxx.
inline const SwTblBoxNumFormat &GetTblBoxNumFmt( sal_Bool = sal_True ) const;
inline const SwTblBoxFormula &GetTblBoxFormula( sal_Bool = sal_True ) const;
inline const SwTblBoxValue &GetTblBoxValue( sal_Bool = sal_True ) const;
- /** SwFmt::IsBackgroundTransparent - for feature #99657#
+ /** SwFmt::IsBackgroundTransparent
- OD 22.08.2002
Virtual method to determine, if background of format is transparent.
Default implementation returns false. Thus, subclasses have to overload
method, if the specific subclass can have a transparent background.
@@ -318,9 +305,8 @@ public:
*/
virtual sal_Bool IsBackgroundTransparent() const;
- /** SwFmt::IsShadowTransparent - for feature #99657#
+ /** SwFmt::IsShadowTransparent
- OD 22.08.2002
Virtual method to determine, if shadow of format is transparent.
Default implementation returns false. Thus, subclasses have to overload
method, if the specific subclass can have a transparent shadow.
@@ -332,7 +318,7 @@ public:
virtual sal_Bool IsShadowTransparent() const;
};
-// --------------- inline Implementierungen ------------------------
+// --------------- inline Implementations ------------------------
inline const SfxPoolItem& SwFmt::GetFmtAttr( sal_uInt16 nWhich,
sal_Bool bInParents ) const
@@ -356,3 +342,5 @@ inline SfxItemState SwFmt::GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInPare
#undef inline
#endif // _FORMAT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/frmatr.hxx b/sw/inc/frmatr.hxx
index 94deef35e018..b0f5afd28c4b 100644
--- a/sw/inc/frmatr.hxx
+++ b/sw/inc/frmatr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,16 +28,13 @@
#ifndef _FRMATR_HXX
#define _FRMATR_HXX
-#include <hintids.hxx> //die Ids der Attribute, vor frmitems damit die
-#include <format.hxx> //fuer Implementierung der inlines
+#include <hintids.hxx> // IDs of attributes before frmitems to make sure
+#include <format.hxx> // they are available for implementation of the inlines.
-//------------------------ Inlines ---------------------------------
+// Inlines
-/******************************************************************************
- * Implementierung der FrameAttribut Methoden vom SwAttrSet
- ******************************************************************************/
-
+// Implementation of FrameAttribute methods of SwAttrSet.
inline const SvxPaperBinItem &SwAttrSet::GetPaperBin(sal_Bool bInP) const
{ return (const SvxPaperBinItem&)Get( RES_PAPER_BIN,bInP); }
inline const SvxLRSpaceItem &SwAttrSet::GetLRSpace(sal_Bool bInP) const
@@ -65,10 +63,7 @@ inline const SvxFrameDirectionItem &SwAttrSet::GetFrmDir(sal_Bool bInP) const
{ return (const SvxFrameDirectionItem&)Get( RES_FRAMEDIR,bInP); }
-/******************************************************************************
- * Implementierung der FrameAttribut Methoden vom SwFmt
- ******************************************************************************/
-
+// Implementation of FrameAttribute methods of SwFmt.
inline const SvxPaperBinItem &SwFmt::GetPaperBin(sal_Bool bInP) const
{ return aSet.GetPaperBin(bInP); }
inline const SvxLRSpaceItem &SwFmt::GetLRSpace(sal_Bool bInP) const
@@ -97,3 +92,5 @@ inline const SvxFrameDirectionItem &SwFmt::GetFrmDir(sal_Bool bInP) const
{ return aSet.GetFrmDir(bInP); }
#endif //_FRMATR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 16c72e1a9d19..229d482b34e1 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef _FRMFMT_HXX
#define _FRMFMT_HXX
-// --> OD 2004-08-06 #i28749#
#include <com/sun/star/text/PositionLayoutDir.hpp>
-// <--
#include <cppuhelper/weakref.hxx>
#include <tools/gen.hxx>
@@ -51,7 +50,7 @@ class SdrObject;
class SW_DLLPUBLIC SwFrmFmt: public SwFmt
{
friend class SwDoc;
- friend class SwPageDesc; //darf den protected CTor rufen.
+ friend class SwPageDesc; // Is allowed to call protected CTor.
::com::sun::star::uno::WeakReference<
::com::sun::star::uno::XInterface> m_wXObject;
@@ -72,39 +71,40 @@ protected:
{}
public:
- TYPEINFO(); //Bereits in Basisklasse Client drin.
+ TYPEINFO(); // Already in base class Client.
- //Vernichtet alle Frms in aDepend (Frms werden per PTR_CAST erkannt).
+ // Destroys all Frms in aDepend (Frms are identified via PTR_CAST).
virtual void DelFrms();
- //Erzeugt die Ansichten
+ // Creates the views.
virtual void MakeFrms();
virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
- // returnt das IMapObject, das an dem Format (Fly), in der ImageMap
- // an der Point Position definiert ist.
- // rPoint - teste auf der DocPosition
- // pFly - optionaler FlyFrame, falls der schon bekannt ist.
+ // Returns the IMapObject defined at format (Fly)
+ // in the ImageMap at position Point.
+ // rPoint - test on DocPosition.
+ // pFly - optional FlyFrame, in case it is already known.
IMapObject* GetIMapObject( const Point& rPoint,
const SwFlyFrm *pFly = 0 ) const;
- // Gibt die tatsaechlche Groesse des Frames zurueck bzw. ein leeres
- // Rechteck, wenn kein Layout existiert. Wird pPoint angegeben, dann
- // wird der am dichtesten liegende Frame gesucht.
+
+ // Returns the real size of the frame - or an empty rectangle
+ // if no layout exists.
+ // If pPoint is given, look for the frame closest to it.
SwRect FindLayoutRect( const sal_Bool bPrtArea = sal_False,
const Point* pPoint = 0,
const sal_Bool bCalcFrm = sal_False ) const;
- // Sucht das SdrObject. Der SdrObjUserCall ist Client vom Format.
- // Der UserCall kennt sein SdrObject.
+ // Searches SdrObject. SdrObjUserCall is client of the format.
+ // The UserCall knows its SdrObject.
SwContact *FindContactObj();
const SwContact *FindContactObj() const
{ return ((SwFrmFmt*)this)->FindContactObj(); }
- // returns the SdrObject, that ist connected to the ContactObject.
+ // Returns the SdrObject, that ist connected to the ContactObject.
// Only DrawFrmFmts are connected to the "real SdrObject". FlyFrmFmts
// are connected to a Master and all FlyFrms has the "real SdrObject".
// "Real SdrObject" has position and a Z-order.
@@ -118,23 +118,19 @@ public:
sal_Bool IsLowerOf( const SwFrmFmt& rFmt ) const;
- // --> OD 2004-07-27 #i31698#
enum tLayoutDir
{
HORI_L2R,
HORI_R2L,
VERT_R2L,
- VERT_L2R // not supported yet
+ VERT_L2R // Not supported yet.
};
virtual SwFrmFmt::tLayoutDir GetLayoutDir() const;
virtual void SetLayoutDir( const SwFrmFmt::tLayoutDir _eLayoutDir );
- // <--
- // --> OD 2004-08-06 #i28749#
virtual sal_Int16 GetPositionLayoutDir() const;
virtual void SetPositionLayoutDir( const sal_Int16 _nPositionLayoutDir );
- // <--
virtual String GetDescription() const;
@@ -148,19 +144,18 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL_DLL(SwFrmFmt)
};
-//Das FlyFrame-Format ------------------------------
+// The FlyFrame-Format
class SW_DLLPUBLIC SwFlyFrmFmt: public SwFrmFmt
{
friend class SwDoc;
- // #i972:
+ // Both not existent.
// it stores the previous position of Prt rectangle from RequestObjectResize
// so it can be used to move frames of non-resizable objects to align them correctly
// when they get borders (this is done in SwWrtShell::CalcAndGetScale)
Point m_aLastFlyFrmPrtRectPos;
- //Beide nicht vorhanden.
SwFlyFrmFmt( const SwFlyFrmFmt &rCpy );
SwFlyFrmFmt &operator=( const SwFlyFrmFmt &rCpy );
@@ -178,7 +173,7 @@ public:
TYPEINFO();
~SwFlyFrmFmt();
- //Erzeugt die Ansichten
+ // Creates the views.
virtual void MakeFrms();
SwFlyFrm* GetFrm( const Point* pDocPos = 0,
@@ -191,18 +186,16 @@ public:
virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
- // --> OD 2009-07-14 #i73249#
const String GetObjTitle() const;
void SetObjTitle( const String& rTitle,
bool bBroadcast = false );
const String GetObjDescription() const;
void SetObjDescription( const String& rDescription,
bool bBroadcast = false );
- // <--
- /** SwFlyFrmFmt::IsBackgroundTransparent - for #99657#
+ /** SwFlyFrmFmt::IsBackgroundTransparent
- OD 22.08.2002 - overloading virtual method and its default implementation,
+ Overloading virtual method and its default implementation,
because format of fly frame provides transparent backgrounds.
Method determines, if background of fly frame is transparent.
@@ -213,9 +206,9 @@ public:
*/
virtual sal_Bool IsBackgroundTransparent() const;
- /** SwFlyFrmFmt::IsBackgroundBrushInherited - for #103898#
+ /** SwFlyFrmFmt::IsBackgroundBrushInherited
- OD 08.10.2002 - method to determine, if the brush for drawing the
+ Method to determine, if the brush for drawing the
background is "inherited" from its parent/grandparent.
This is the case, if no background graphic is set and the background
color is "no fill"/"auto fill"
@@ -232,7 +225,7 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL(SwFlyFrmFmt)
};
-//Das DrawFrame-Format -----------------------------
+//The DrawFrame-Format
class SW_DLLPUBLIC SwDrawFrmFmt: public SwFrmFmt
{
@@ -241,87 +234,67 @@ class SW_DLLPUBLIC SwDrawFrmFmt: public SwFrmFmt
mutable const SdrObject * pSdrObjCached;
mutable String sSdrObjCachedComment;
- //Beide nicht vorhanden.
+ // Both not existent.
SwDrawFrmFmt( const SwDrawFrmFmt &rCpy );
SwDrawFrmFmt &operator=( const SwDrawFrmFmt &rCpy );
- // --> OD 2004-07-27 #i31698#
SwFrmFmt::tLayoutDir meLayoutDir;
- // <--
- // --> OD 2004-08-06 #i28749#
+
sal_Int16 mnPositionLayoutDir;
- // <--
- // --> OD 2005-03-11 #i44334#, #i44681#
+
bool mbPosAttrSet;
- // <--
+
protected:
SwDrawFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
SwFrmFmt *pDrvdFrm )
: SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_DRAWFRMFMT ),
pSdrObjCached(NULL),
- // --> OD 2004-07-28 #i31698#
+
meLayoutDir( SwFrmFmt::HORI_L2R ),
- // <--
- // --> OD 2004-08-06 #i28749#
- // --> OD 2005-03-10 #i44344#, #i44681# - undo change of issue #i36010#
+
mnPositionLayoutDir( com::sun::star::text::PositionLayoutDir::PositionInLayoutDirOfAnchor ),
- // <--
- // --> OD 2005-03-11 #i44334#, #i44681#
+
mbPosAttrSet( false )
- // <--
{}
SwDrawFrmFmt( SwAttrPool& rPool, const String &rFmtNm,
SwFrmFmt *pDrvdFrm )
: SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_DRAWFRMFMT ),
pSdrObjCached(NULL),
- // --> OD 2004-07-28 #i31698#
meLayoutDir( SwFrmFmt::HORI_L2R ),
- // <--
- // --> OD 2004-08-06 #i28749#
- // --> OD 2005-03-10 #i44344#, #i44681# - undo change of issue #i36010#
+
mnPositionLayoutDir( com::sun::star::text::PositionLayoutDir::PositionInLayoutDirOfAnchor ),
- // <--
- // --> OD 2005-03-11 #i44334#, #i44681#
+
mbPosAttrSet( false )
- // <--
{}
public:
TYPEINFO();
~SwDrawFrmFmt();
- //DrawObjecte werden aus den Arrays am Layout entfernt. Die DrawObjecte
- //werden als geloescht gekennzeichnet.
+ // DrawObjects are removed from the arrays at the layout.
+ // The DrawObjects are marked as deleted.
virtual void DelFrms();
- //Anmelden der DrawObjecte in den Arrays am Layout. Loeschkennzeichen
- //werden zurueckgesetzt.
+ // Register DrawObjects in the arrays at layout.
+ // Reset delete marks.
virtual void MakeFrms();
virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
- // --> OD 2004-07-27 #i31698#
virtual SwFrmFmt::tLayoutDir GetLayoutDir() const;
virtual void SetLayoutDir( const SwFrmFmt::tLayoutDir _eLayoutDir );
- // <--
- // --> OD 2004-08-06 #i28749#
virtual sal_Int16 GetPositionLayoutDir() const;
virtual void SetPositionLayoutDir( const sal_Int16 _nPositionLayoutDir );
- // <--
- // --> OD 2005-03-11 #i44334#, #i44681#
inline bool IsPosAttrSet() const { return mbPosAttrSet; }
inline void PosAttrSet() { mbPosAttrSet = true; }
- // <--
- // --> OD 2005-08-16 #i53320#
inline void ResetPosAttr()
{
mbPosAttrSet = false;
}
- // <--
virtual String GetDescription() const;
@@ -331,3 +304,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx
index 9e645ee32e3c..e2d6fcfd1138 100644
--- a/sw/inc/ftnidx.hxx
+++ b/sw/inc/ftnidx.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,9 +36,9 @@ class SwTxtFtn;
class SwNodeIndex;
class SwSectionNode;
-// ueberall, wo der NodeIndex gebraucht wird, werden die hier fehlenden
-// Headerfiles schon includes. Darum hier nur als define und nicht als
-// inline Methode (spart Compile-Zeit)
+// Everywhere where NodeIndex is used, the header files missing here
+// are already included. Therefore put here as defines only and
+// not as inline methods (saves compile time).
#define _SwTxtFtn_GetIndex( pFIdx ) (pFIdx->GetTxtNode().GetIndex())
@@ -49,8 +50,8 @@ class SwFtnIdxs : public _SwFtnIdxs
public:
SwFtnIdxs() {}
- void UpdateFtn( const SwNodeIndex& rStt ); // ab Pos. alle Updaten
- void UpdateAllFtn(); // alle Fussnoten updaten
+ void UpdateFtn( const SwNodeIndex& rStt ); // Update all from pos.
+ void UpdateAllFtn(); // Update all footnotes.
SwTxtFtn* SeekEntry( const SwNodeIndex& rIdx, sal_uInt16* pPos = 0 ) const;
};
@@ -77,3 +78,4 @@ public:
#endif // _FTNIDX_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx
index 6a5a5c583eba..adfeda9975d2 100644
--- a/sw/inc/ftninfo.hxx
+++ b/sw/inc/ftninfo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,6 @@
#include <tools/string.hxx>
#include "swdllapi.h"
-//#ifndef _NUMRULE_HXX
-//#include <numrule.hxx>
-//#endif
#include <calbck.hxx>
#include <editeng/numitem.hxx>
@@ -57,7 +55,7 @@ public:
SwClient *GetPageDescDep() const { return (SwClient*)&aPageDescDep; }
void SetFtnTxtColl(SwTxtFmtColl& rColl);
- SwTxtFmtColl* GetFtnTxtColl() const { return (SwTxtFmtColl*) GetRegisteredIn(); } // kann 0 sein
+ SwTxtFmtColl* GetFtnTxtColl() const { return (SwTxtFmtColl*) GetRegisteredIn(); } // can be 0.
SwCharFmt* GetCharFmt(SwDoc &rDoc) const;
void SetCharFmt( SwCharFmt* );
@@ -84,7 +82,7 @@ public:
enum SwFtnPos
{
- //Derzeit nur PAGE und CHAPTER. CHAPTER == Dokumentendenoten.
+ // Momentarily only PAGE and CHAPTER. CHAPTER == document-endnotes.
FTNPOS_PAGE = 1,
FTNPOS_CHAPTER = 8
};
@@ -115,3 +113,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index b64494b847ae..e2ab03362728 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -29,8 +29,6 @@
#define _GLOBALS_HRC
-// Versions-Definition wie in solar.h und swtypes.hxx
-//#define SW_FILEFORMAT_40 3580
#include "rcid.hrc"
@@ -275,7 +273,9 @@
#define TP_SECTION_INDENTS (RC_GLOBALS_BEGIN + 102)
#define TP_OPTCOMPATIBILITY_PAGE (RC_GLOBALS_BEGIN + 103)
#define TP_MAILCONFIG (RC_GLOBALS_BEGIN + 104)
-//maximum: RC_GLOBALS_BEGIN + 119
+#define TP_TITLEPAGE (RC_GLOBALS_BEGIN + 105)
+//maximum: RC_GLOBALS_BEGIN + 120
+
#if STR_DOC_STAT > RC_GLOBALS_END
#error Resource-Id Ueberlauf in #file, #line
@@ -287,4 +287,5 @@
#define SID_WRT_SHELL (RC_GLOBALS_BEGIN + 117)
#define DLG_LINE_NUMBERING (RC_GLOBALS_BEGIN + 118)
+#define DLG_TITLEPAGE (RC_GLOBALS_BEGIN + 119)
#endif // _GLOBALS_HRC
diff --git a/sw/inc/globdoc.hxx b/sw/inc/globdoc.hxx
index 201f999cc2ce..4876cd79e57d 100644
--- a/sw/inc/globdoc.hxx
+++ b/sw/inc/globdoc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx
index 28c24e16b48a..4626b1839001 100644
--- a/sw/inc/grfatr.hxx
+++ b/sw/inc/grfatr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,14 +28,14 @@
#ifndef _GRFATR_HXX
#define _GRFATR_HXX
-#include <hintids.hxx> // fuer die WhichIds @@@ must be included first @@@
+#include <hintids.hxx> // For the WhichIds @@@ must be included first @@@
#include <tools/gen.hxx>
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
#include <svx/grfcrop.hxx>
#include "swdllapi.h"
-#include <swatrset.hxx> // fuer inlines
-#include <format.hxx> // fuer inlines
+#include <swatrset.hxx> // For inlines.
+#include <format.hxx> // For inlines.
/******************************************************************************
* class SwMirrorGrf
@@ -52,7 +53,7 @@ RES_MIRROR_GRAPH_END
class SW_DLLPUBLIC SwMirrorGrf : public SfxEnumItem
{
- sal_Bool bGrfToggle; // auf geraden Seiten Grafiken spiegeln
+ sal_Bool bGrfToggle; // Flip graphics on even pages.
public:
SwMirrorGrf( MirrorGraph eMiro = RES_MIRROR_GRAPH_DONT )
@@ -63,10 +64,10 @@ public:
bGrfToggle( rMirrorGrf.IsGrfToggle() )
{}
- // pure virtual-Methoden von SfxPoolItem
+ // pure virtual methods of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- // pure virtual-Methiden von SfxEnumItem
+ // pure virtual methods of SfxEnumItem
virtual sal_uInt16 GetValueCount() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -75,9 +76,9 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal,
sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal,
sal_uInt8 nMemberId = 0 );
inline SwMirrorGrf& operator=( const SwMirrorGrf& rMirrorGrf )
@@ -104,7 +105,7 @@ public:
SwCropGrf( sal_Int32 nLeft, sal_Int32 nRight,
sal_Int32 nTop, sal_Int32 nBottom );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
};
@@ -119,7 +120,7 @@ public:
: SfxUInt16Item( RES_GRFATR_ROTATION, nVal ), aUnrotatedSize( rSz )
{}
- // pure virtual-Methiden from SfxInt16Item
+ // pure virtual methods from SfxInt16Item
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -127,9 +128,9 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal,
sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal,
sal_uInt8 nMemberId = 0 );
void SetUnrotatedSize( const Size& rSz ) { aUnrotatedSize = rSz; }
@@ -143,7 +144,7 @@ public:
: SfxInt16Item( RES_GRFATR_LUMINANCE, nVal )
{}
- // pure virtual-Methiden from SfxInt16Item
+ // pure virtual methods from SfxInt16Item
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -159,7 +160,7 @@ public:
: SfxInt16Item( RES_GRFATR_CONTRAST, nVal )
{}
- // pure virtual-Methiden from SfxInt16Item
+ // pure virtual methods from SfxInt16Item
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -176,7 +177,7 @@ protected:
{}
public:
- // pure virtual-Methiden from SfxInt16Item
+ // pure virtual methods from SfxInt16Item
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
@@ -227,7 +228,7 @@ public:
return *this;
}
- // pure virtual-Methiden von SfxEnumItem
+ // pure virtual methods from SfxEnumItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -236,9 +237,9 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal,
sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal,
sal_uInt8 nMemberId = 0 );
@@ -253,7 +254,7 @@ public:
: SfxBoolItem( RES_GRFATR_INVERT, bVal )
{}
- // pure virtual-Methiden from SfxInt16Item
+ // pure virtual methods from SfxInt16Item
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -269,16 +270,16 @@ public:
: SfxByteItem( RES_GRFATR_TRANSPARENCY, nVal )
{}
- // pure virtual-Methiden from SfxInt16Item
+ // pure virtual methods from SfxInt16Item
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal,
sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal,
sal_uInt8 nMemberId = 0 );
};
@@ -289,10 +290,10 @@ public:
: SfxEnumItem( RES_GRFATR_DRAWMODE, nMode )
{}
- // pure virtual-Methoden von SfxPoolItem
+ // pure virtual methods of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- // pure virtual-Methiden von SfxEnumItem
+ // pure virtual methods of SfxEnumItem
virtual sal_uInt16 GetValueCount() const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -300,16 +301,16 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal,
sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal,
sal_uInt8 nMemberId = 0 );
};
/******************************************************************************
- * Implementierung der GrafikAttribut Methoden vom SwAttrSet
+ * Implementation of graphics attributes methods of SwAttr
******************************************************************************/
inline const SwMirrorGrf &SwAttrSet::GetMirrorGrf(sal_Bool bInP) const
@@ -338,7 +339,7 @@ inline const SwDrawModeGrf &SwAttrSet::GetDrawModeGrf(sal_Bool bInP) const
{ return (const SwDrawModeGrf&)Get( RES_GRFATR_DRAWMODE,bInP); }
/******************************************************************************
- * Implementierung der GrafikAttribut Methoden vom SwFmt
+ * Implementation of graphics attributes methods of SwFmt
******************************************************************************/
inline const SwMirrorGrf &SwFmt::GetMirrorGrf(sal_Bool bInP) const
@@ -368,3 +369,5 @@ inline const SwDrawModeGrf &SwFmt::GetDrawModeGrf(sal_Bool bInP) const
#endif // _GRFATR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 38b50dfdab3e..90fa81818f9f 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,7 +106,7 @@
#define HID_PAGEPREVIEW "SW_HID_PAGEPREVIEW"
#define HID_SOURCE_EDITWIN "SW_HID_SOURCE_EDITWIN"
-// Dialog Help-IDs **********************************************************
+// Dialog Help-IDs
#define HID_CONVERT_FROM "SW_HID_CONVERT_FROM"
#define HID_CONVERT_TO "SW_HID_CONVERT_TO"
@@ -217,11 +218,11 @@
#define HID_MULTI_TOX_DLG "SW_HID_MULTI_TOX_DLG"
#define HID_ASCII_FILTER "SW_HID_ASCII_FILTER"
#define HID_GLBLTREE_EDIT_LINK "SW_HID_GLBLTREE_EDIT_LINK"
-#define HID_FORMAT_NAME_OBJECT_NAME "SW_HID_FORMAT_NAME_OBJECT_NAME"// #100286#
+#define HID_FORMAT_NAME_OBJECT_NAME "SW_HID_FORMAT_NAME_OBJECT_NAME"
#define HID_REFSELECTION_TOOLTIP "SW_HID_REFSELECTION_TOOLTIP" // #i83479#
-// TabPage Help-IDs *********************************************************
+// TabPage Help-IDs
#define HID_DROPCAPS "SW_HID_DROPCAPS"
#define HID_FRM_EXT "SW_HID_FRM_EXT"
@@ -309,7 +310,7 @@
#define HID_OPTCOMPATIBILITY_PAGE "SW_HID_OPTCOMPATIBILITY_PAGE"
#define HID_COMPATIBILITY_OPTIONS_BOX "SW_HID_COMPATIBILITY_OPTIONS_BOX"
-// AutoPilot Help-IDs *********************************************************
+// AutoPilot Help-IDs
#define HID_LETTER_PAGE1 "SW_HID_LETTER_PAGE1"
#define HID_LETTER_PAGE2 "SW_HID_LETTER_PAGE2"
@@ -347,7 +348,7 @@
#define HID_AUTOPILOT_PREV "SW_HID_AUTOPILOT_PREV"
#define HID_AUTOPILOT_OK "SW_HID_AUTOPILOT_OK"
-// HelpIds fuers Menue *****************************************************
+// HelpIds for Menu
#define HID_MN_SUB_TBLROW "SW_HID_MN_SUB_TBLROW"
#define HID_MN_SUB_TBLCOL "SW_HID_MN_SUB_TBLCOL"
@@ -428,7 +429,7 @@
#define HID_SMARTTAG_MAIN "SW_HID_SMARTTAG_MAIN" // SMARTTAGS
#define HID_LINGU_IGNORE_SELECTION "SW_HID_LINGU_IGNORE_SELECTION" // grammar check context menu
-// Weiter Help-IDs **********************************************************
+// More Help-IDs
#define HID_CLOSE_FILE "SW_HID_CLOSE_FILE"
#define HID_LAUNCH_REGISTRY "SW_HID_LAUNCH_REGISTRY"
@@ -990,3 +991,8 @@
#define HID_TBX_FORMULA_CANCEL "SW_HID_TBX_FORMULA_CANCEL"
#define HID_TBX_FORMULA_APPLY "SW_HID_TBX_FORMULA_APPLY"
+#define HID_TITLEPAGE (HID_BASE + 2281)
+
+#define HID_NAVIGATION_TOOLBOX (HID_BASE + 2282)
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/hfspacingitem.hxx b/sw/inc/hfspacingitem.hxx
index 0a4103688335..116335cbb74e 100644
--- a/sw/inc/hfspacingitem.hxx
+++ b/sw/inc/hfspacingitem.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,7 @@ public:
SwHeaderAndFooterEatSpacingItem( sal_uInt16 nId = RES_HEADER_FOOTER_EAT_SPACING,
sal_Bool bPrt = sal_False ) : SfxBoolItem( nId, bPrt ) {}
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -57,3 +58,4 @@ inline const SwHeaderAndFooterEatSpacingItem &SwFmt::GetHeaderAndFooterEatSpacin
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx
index 7b60590db033..1b2e682d4df4 100644
--- a/sw/inc/hhcwrp.hxx
+++ b/sw/inc/hhcwrp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,7 +64,6 @@ class SwHHCWrapper : public editeng::HangulHanjaConversion
sal_Bool bIsConvSpecial; // true if special regions: header, footer, ... should be converted
sal_Bool bStartDone;
sal_Bool bEndDone;
-// sal_Bool bLastRet;
// from SvxSpellWrapper copied and modified
sal_Bool ConvNext_impl(); // former SpellNext
@@ -119,3 +119,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index c7aa3638d90a..afd57f3bfb4a 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,12 @@
#ifndef _HINTIDS_HXX
#define _HINTIDS_HXX
-#include <tools/solar.h> // fuer __FAR_DATA
+#include <tools/solar.h>
#include <sal/types.h> // for sal_Unicode
#include "swdllapi.h"
-// fuer SwTxtHints ohne Endindex wird folgendes Zeichen eingefuegt:
-//JP 24.05.00: for the new UniCode Version:
+// For SwTxtHints without end index the following char is added:
+
#define CH_TXTATR_BREAKWORD ((sal_Unicode)0x01)
#define CH_TXTATR_INWORD ((sal_Unicode)0x02)
#define CH_TXTATR_TAB ((sal_Unicode)'\t')
@@ -44,7 +45,7 @@
#define CH_TXT_ATR_FORMELEMENT ((sal_Unicode)0x06)
/*
- * Hier kommen erst mal die enums fuer die Hints
+ * Enums for the hints
*/
#define HINT_BEGIN 1
@@ -52,8 +53,8 @@
#define POOLATTR_BEGIN HINT_BEGIN
#define POOLATTR_END RES_UNKNOWNATR_END
-// Bereiche fuer die Id's der einzelnen Format-Attribute
-// die Which-Werte fuer die Charakter-Format Attribute
+// Ranges for the IDs of the format-attributes.
+// Which-values for character-format attributes.
enum RES_CHRATR
{
RES_CHRATR_BEGIN = HINT_BEGIN,
@@ -100,7 +101,7 @@ RES_CHRATR_BEGIN = HINT_BEGIN,
RES_CHRATR_END
};
-// diese Attribute stehen nur im SwpAttr-Array vom TextNode
+// this Attribute used only in a TextNodes SwpAttr-Array
enum RES_TXTATR
{
RES_TXTATR_BEGIN = RES_CHRATR_END,
@@ -134,7 +135,7 @@ RES_TXTATR_WITHEND_BEGIN = RES_TXTATR_BEGIN ,
RES_TXTATR_DUMMY5, // 50
RES_TXTATR_WITHEND_END,
-// alle TextAttribute ohne ein Ende
+// all TextAttributes without an end
RES_TXTATR_NOEND_BEGIN = RES_TXTATR_WITHEND_END,
RES_TXTATR_FIELD = RES_TXTATR_NOEND_BEGIN, // 51
RES_TXTATR_FLYCNT, // 52
@@ -170,7 +171,6 @@ RES_PARATR_BEGIN = RES_TXTATR_END,
RES_PARATR_END
};
-// --> OD 2008-02-25 #refactorlists#
// list attributes for paragraphs.
// intentionally these list attributes are not contained in paragraph styles
enum RES_PARATR_LIST
@@ -183,7 +183,6 @@ RES_PARATR_LIST_BEGIN = RES_PARATR_END,
RES_PARATR_LIST_ISCOUNTED, // 79
RES_PARATR_LIST_END
};
-// <--
enum RES_FRMATR
{
@@ -223,12 +222,8 @@ RES_FRMATR_BEGIN = RES_PARATR_LIST_END,
RES_FRAMEDIR, // 112
RES_HEADER_FOOTER_EAT_SPACING, // 113
RES_ROW_SPLIT, // 114
- // OD 18.09.2003 #i18732# - insert new item and 5 dummies
RES_FOLLOW_TEXT_FLOW, // 115
-// --> collapsing borders FME 2005-05-27 #i29550#
RES_COLLAPSING_BORDERS, // 116
-// <-- collapsing
- // OD 2004-05-04 #i28701# - use dummy1 for new item
RES_WRAP_INFLUENCE_ON_OBJPOS, // 117
RES_AUTO_STYLE, // 118
RES_FRMATR_STYLE_NAME, // 119
@@ -279,7 +274,7 @@ RES_UNKNOWNATR_END
-// ID-s fuer die Formate
+// Format IDs
enum RES_FMT
{
RES_FMT_BEGIN = RES_UNKNOWNATR_END,
@@ -293,7 +288,7 @@ RES_FMT_BEGIN = RES_UNKNOWNATR_END,
RES_FMT_END
};
-// die ID's fuer Messages in den Formaten
+// ID's for Messages in the Formats
enum RES_MSG
{
RES_MSG_BEGIN = RES_FMT_END,
@@ -324,9 +319,6 @@ RES_MSG_BEGIN = RES_FMT_END,
RES_HIDDENPARA_PRINT,
RES_CONDCOLL_CONDCHG,
RES_VIRTPAGENUM_INFO,
- // --> OD 2008-02-25 #refactorlists#
-// RES_GETNUMNODES,
- // <--
RES_GETLOWERNUMLEVEL,
RES_RESET_FMTWRITTEN,
RES_REMOVE_UNO_OBJECT,
@@ -347,12 +339,10 @@ RES_MSG_BEGIN = RES_FMT_END,
RES_MSG_END
};
-
-// eine ID fuer den RTF-Reader. Die Stylesheets werden wie
-// Attribute behandelt, d.H. es gibt ein StyleSheet Attribut. Um
-// nicht mit anderen Which()-Werten zu kollidieren, ist der Wert
-// hier mit aufgefuehrt. (Auch das Hilfesystem definiert neue
-// Attribute !!)
+// An ID for the RTF-reader. The stylesheets are treated like attributes,
+// i.e. there is a StyleSheet-attribute. To avoid collision with other
+// Which()-values, the value is listed here. (The help system too defines
+// new attributes!)
enum RES_FLTRATTR
{
RES_FLTRATTR_BEGIN = RES_MSG_END,
@@ -374,7 +364,7 @@ RES_FLTRATTR_END
#define HINT_END RES_TBX_DUMMY
-// Fehler-Erkennung !!
+// Error recognition!!
#define INVALID_HINT HINT_END
#define RES_WHICHHINT_END HINT_END
@@ -426,61 +416,60 @@ inline bool isUNKNOWNATR(const sal_uInt16 nWhich)
}
-/*
- * hole aus der statischen Default-Attribut Tabelle ueber den Which-Wert
- * das entsprechende default Attribut.
- * Ist keines vorhanden, returnt ein 0-Pointer !!!
- *
- * Diese Funktion ist im Init.CXX implementiert. Damit die Formate darauf
- * zugreifen koennen, ist sie hier als extern deklariert.
- * Im PRODUCT ist das Teil inline.
- */
+// Take the respective default attribute from the statistical default
+// attributes table over the Which-value.
+// If none exists, return a 0 pointer!!!
+// This function is implemented in Init.cxx. It is declared here as external
+// in order to allow the formats to access it.
+// Inline in PRODUCT.
class SfxPoolItem;
struct SfxItemInfo;
typedef SfxPoolItem* SwDfltAttrTab[ POOLATTR_END - POOLATTR_BEGIN ];
-extern SwDfltAttrTab __FAR_DATA aAttrTab;
-extern SfxItemInfo __FAR_DATA aSlotTab[];
+extern SwDfltAttrTab aAttrTab;
+extern SfxItemInfo aSlotTab[];
SW_DLLPUBLIC const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich );
SW_DLLPUBLIC sal_uInt16 GetWhichOfScript( sal_uInt16 nWhich, sal_uInt16 nScript );
-// return for the given TextAttribut without an end the correct character.
+// return for the given TextAttribute without an end the correct character.
// This function returns
-// CH_TXTATR_BREAKWORD for Textattribut which breaks a word (default)
-// CH_TXTATR_INWORD for Textattribut which dont breaks a word
+// CH_TXTATR_BREAKWORD for Textattribute which breaks a word (default)
+// CH_TXTATR_INWORD for Textattribute which dont breaks a word
class SwTxtAttr;
sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr );
-// alle Sets stehen im init.cxx
-
-// AttrSet-Range fuer die 3 Break-Attribute
-extern sal_uInt16 __FAR_DATA aBreakSetRange[];
-// AttrSet-Range fuer die TxtFmtColl
-extern sal_uInt16 __FAR_DATA aTxtFmtCollSetRange[];
-// AttrSet-Range fuer die GrfFmtColl
-extern sal_uInt16 __FAR_DATA aGrfFmtCollSetRange[];
-// AttrSet-Range fuer die TextNode
-SW_DLLPUBLIC extern sal_uInt16 __FAR_DATA aTxtNodeSetRange[];
-// AttrSet-Range fuer die NoTxtNode
-extern sal_uInt16 __FAR_DATA aNoTxtNodeSetRange[];
-// AttrSet-Range fuer die SwTable
-extern sal_uInt16 __FAR_DATA aTableSetRange[];
-// AttrSet-Range fuer die SwTableLine
-extern sal_uInt16 __FAR_DATA aTableLineSetRange[];
-// AttrSet-Range fuer die SwTableBox
-extern sal_uInt16 __FAR_DATA aTableBoxSetRange[];
-// AttrSet-Range fuer die SwFrmFmt
-SW_DLLPUBLIC extern sal_uInt16 __FAR_DATA aFrmFmtSetRange[];
-// AttrSet-Range fuer die SwCharFmt
-extern sal_uInt16 __FAR_DATA aCharFmtSetRange[];
-// AttrSet-Range fuer die character autostyles
-extern sal_uInt16 __FAR_DATA aCharAutoFmtSetRange[];
-// AttrSet-Range fuer die SwPageDescFmt
-extern sal_uInt16 __FAR_DATA aPgFrmFmtSetRange[];
+// all Sets defined in init.cxx
+
+// AttrSet-Range for the 3 Break-Attribute
+extern sal_uInt16 aBreakSetRange[];
+// AttrSet-Range for TxtFmtColl
+extern sal_uInt16 aTxtFmtCollSetRange[];
+// AttrSet-Range for GrfFmtColl
+extern sal_uInt16 aGrfFmtCollSetRange[];
+// AttrSet-Range for TextNode
+SW_DLLPUBLIC extern sal_uInt16 aTxtNodeSetRange[];
+// AttrSet-Range for NoTxtNode
+extern sal_uInt16 aNoTxtNodeSetRange[];
+// AttrSet-Range for SwTable
+extern sal_uInt16 aTableSetRange[];
+// AttrSet-Range for SwTableLine
+extern sal_uInt16 aTableLineSetRange[];
+// AttrSet-Range for SwTableBox
+extern sal_uInt16 aTableBoxSetRange[];
+// AttrSet-Range for SwFrmFmt
+SW_DLLPUBLIC extern sal_uInt16 aFrmFmtSetRange[];
+// AttrSet-Range for SwCharFmt
+extern sal_uInt16 aCharFmtSetRange[];
+// AttrSet-Range for the autostyles
+extern sal_uInt16 aCharAutoFmtSetRange[];
+// AttrSet-Range for SwPageDescFmt
+extern sal_uInt16 aPgFrmFmtSetRange[];
// check if ID is InRange of AttrSet-Ids
sal_Bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId );
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index 8476d8542f70..fb064c19a468 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef _HINTS_HXX
#define _HINTS_HXX
-#ifndef _TABLE_HXX //autogen
#include <tools/table.hxx>
-#endif
#include <swatrset.hxx>
class SwFmt;
@@ -43,21 +42,21 @@ class SwFrm;
class SwTxtNode;
class SwHistory;
-// Basis-Klasse fuer alle Message-Hints:
-// "Overhead" vom SfxPoolItem wird hier behandelt
+// Base class for all Message-Hints:
+// "Overhead" of SfxPoolItem is handled here
class SwMsgPoolItem : public SfxPoolItem
{
public:
SwMsgPoolItem( sal_uInt16 nWhich );
- // "Overhead" vom SfxPoolItem
+ // "Overhead" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
};
// ---------------------------------------
-// SwPtrMsgPoolItem (altes SwObjectDying!)
+// SwPtrMsgPoolItem (old SwObjectDying!)
// ---------------------------------------
class SwPtrMsgPoolItem : public SwMsgPoolItem
@@ -73,9 +72,8 @@ public:
/*
- * SwFmtChg wird verschickt, wenn ein Format gegen ein anderes
- * Format ausgewechselt worden ist. Es werden immer 2. Hints verschickt,
- * das alte und neue Format.
+ * SwFmtChg is sent when a format has changed to another format. 2 Hints are always sent
+ * the old and the new format
*/
class SwFmtChg: public SwMsgPoolItem
{
@@ -121,21 +119,18 @@ public:
};
-// SwRefMarkFldUpdate wird verschickt, wenn sich die ReferenzMarkierungen
-// Updaten sollen. Um Seiten-/KapitelNummer feststellen zu koennen, muss
-// der akt. Frame befragt werden. Dafuer wird das akt. OutputDevice benoetigt.
+// SwRefMarkFldUpdate is sent when the referencemarks should be updated.
+// To determine Page- / chapternumbers the current frame has to be asked.
+// For this we need the current outputdevice
class SwRefMarkFldUpdate : public SwMsgPoolItem
{
public:
- const OutputDevice* pOut; // Pointer auf das aktuelle Output-Device
+ const OutputDevice* pOut; // pointer to the current output device
SwRefMarkFldUpdate( const OutputDevice* );
};
-// SwDocPosUpdate wird verschickt, um zu signalisieren, dass nur die
-// Frames ab oder bis zu einer bestimmten dokument-globalen Position
-// geupdated werden brauchen. Zur Zeit wird dies nur beim Updaten
-// von Seitennummernfeldern benoetigt.
-
+// SwDocPosUpdate is sent to signal that only the frames from or to a specified document-global position
+// have to be updated. At the moment this is only needed when updating pagenumber fields.
class SwDocPosUpdate : public SwMsgPoolItem
{
public:
@@ -143,8 +138,7 @@ public:
SwDocPosUpdate( const long nDocPos );
};
-// SwTableFmlUpdate wird verschickt, wenn sich die Tabelle neu berechnen soll
-// JP 16.02.99: oder wenn die Tabelle selbst gemergt oder gesplittet wird
+// SwTableFmlUpdate is sent when the table has to be newly calculated or when a table itself is merged or splitted
enum TableFmlUpdtFlags { TBL_CALC = 0,
TBL_BOXNAME,
TBL_BOXPTR,
@@ -155,13 +149,13 @@ enum TableFmlUpdtFlags { TBL_CALC = 0,
class SwTableFmlUpdate : public SwMsgPoolItem
{
public:
- const SwTable* pTbl; // Pointer auf die zu aktuelle Tabelle
+ const SwTable* pTbl; // Pointer to the current table
union {
- const SwTable* pDelTbl; // Merge: Ptr auf die zu loeschende Tabelle
- const String* pNewTblNm; // Split: der Name der neuen Tabelle
+ const SwTable* pDelTbl; // Merge: Pointer to the table to be removed
+ const String* pNewTblNm; // Split: the name of the new table
} DATA;
SwHistory* pHistory;
- sal_uInt16 nSplitLine; // Split: ab dieser BaseLine wird gespl.
+ sal_uInt16 nSplitLine; // Split: from this BaseLine on will be splitted
TableFmlUpdtFlags eFlags;
sal_Bool bModified : 1;
sal_Bool bBehindSplitLine : 1;
@@ -180,33 +174,32 @@ public:
};
/*
- * SwAttrSetChg wird verschicht, wenn sich in dem SwAttrSet rTheChgdSet
- * etwas veraendert hat. Es werden immer 2. Hints
- * verschickt, die alten und neuen Items in dem rTheChgdSet.
+ * SwAttrSetChg is sent when something has changed in the SwAttrSet rTheChgdSet.
+ * 2 Hints are always sent, the old and the new items in the rTheChgdSet.
*/
class SwAttrSetChg: public SwMsgPoolItem
{
sal_Bool bDelSet;
- SwAttrSet* pChgSet; // was sich veraendert hat
- const SwAttrSet* pTheChgdSet; // wird nur zum Vergleichen gebraucht !!
+ SwAttrSet* pChgSet; // what has changed
+ const SwAttrSet* pTheChgdSet; // is only used to compare
public:
SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet );
SwAttrSetChg( const SwAttrSetChg& );
~SwAttrSetChg();
- // was sich veraendert hat
- const SwAttrSet* GetChgSet() const { return pChgSet; }
- SwAttrSet* GetChgSet() { return pChgSet; }
+ // What has changed
+ const SwAttrSet* GetChgSet() const { return pChgSet; }
+ SwAttrSet* GetChgSet() { return pChgSet; }
- // wo es sich geaendert hat
- const SwAttrSet* GetTheChgdSet() const { return pTheChgdSet; }
+ // Where it has changed
+ const SwAttrSet* GetTheChgdSet() const { return pTheChgdSet; }
sal_uInt16 Count() const { return pChgSet->Count(); }
void ClearItem( sal_uInt16 nWhichL = 0 )
-#ifndef DBG_UTIL
- { pChgSet->ClearItem( nWhichL ); }
-#else
+#if OSL_DEBUG_LEVEL > 1
;
+#else
+ { pChgSet->ClearItem( nWhichL ); }
#endif
};
@@ -221,11 +214,9 @@ class SwVirtPageNumInfo: public SwMsgPoolItem
{
const SwPageFrm *pPage;
const SwPageFrm *pOrigPage;
- const SwFrm *pFrm; //An einem Absatz/Tabelle koennen mehrere
- //Attribute sitzen. Der Frame muss dann
- //muss dann letztlich bei bestimmen
- //welches Attribut gilt und um welche physikalische
- //Seite es sich handelt.
+ const SwFrm *pFrm;
+ // Multiple attributes can be attached to a single paragraph / table
+ // The frame, in the end, has to decide which attribute takes effect and which physical page it involves
public:
SwVirtPageNumInfo( const SwPageFrm *pPg );
@@ -233,32 +224,9 @@ public:
const SwPageFrm *GetOrigPage() { return pOrigPage;}
const SwFrm *GetFrm() { return pFrm; }
void SetInfo( const SwPageFrm *pPg,
- const SwFrm *pF ) { pFrm = pF, pPage = pPg; }
+ const SwFrm *pF ) { pFrm = pF, pPage = pPg; }
};
-
-// --> OD 2008-02-19 #refactorlists#
-//DECLARE_TABLE( SwTxtNodeTable, SwTxtNode* )
-
-//class SwNumRuleInfo : public SwMsgPoolItem
-//{
-// SwTxtNodeTable aList;
-// const String& rName;
-//public:
-// SwNumRuleInfo( const String& rRuleName );
-
-// const String& GetName() const { return rName; }
-// void AddNode( SwTxtNode& rNd );
-
-// // erzeuge die Liste aller Nodes der NumRule in dem angegebenem Doc
-// // Der Code steht im docnum.cxx
-// // #111955#
-// void MakeList( SwDoc& rDoc, sal_Bool bOutline = sal_False );
-
-// const SwTxtNodeTable& GetTxtNodeList() const { return aList; }
-//};
-// <--
-
class SwFindNearestNode : public SwMsgPoolItem
{
const SwNode *pNd, *pFnd;
@@ -266,7 +234,7 @@ public:
SwFindNearestNode( const SwNode& rNd );
void CheckNode( const SwNode& rNd );
- const SwNode* GetFoundNode() const { return pFnd; }
+ const SwNode* GetFoundNode() const { return pFnd; }
};
class SwStringMsgPoolItem : public SwMsgPoolItem
@@ -280,5 +248,6 @@ public:
: SwMsgPoolItem( nId ), sStr( rStr )
{}
};
-
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx
index cf95a232d9df..4016dba7f833 100644
--- a/sw/inc/htmltbl.hxx
+++ b/sw/inc/htmltbl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,7 +34,7 @@
#include <editeng/svxenum.hxx>
#include "swtypes.hxx"
-#include "node.hxx" // Fuer SwStartNode
+#include "node.hxx" // For SwStartNode
class SwTableBox;
@@ -46,24 +47,24 @@ class SwFrmFmt;
class SwHTMLTableLayoutCnts
{
- SwHTMLTableLayoutCnts *pNext; // der naechste Inhalt
+ SwHTMLTableLayoutCnts *pNext; // The next content.
- // von den beiden naechsten Pointern darf nur einer gesetzt sein!
- SwTableBox *pBox; // ein Box
- SwHTMLTableLayout *pTable; // eine "Tabelle in der Tabelle"
+ // Only one of the following two pointers may be set!
+ SwTableBox *pBox; // A Box.
+ SwHTMLTableLayout *pTable; // A "table within a table".
- // Beim ersten Durchlauf gibt es noch keine Boxen. Es wird dann
- // pStartNode anstelle von pBox verwendet.
+ // During first run there are still no boxes. In this case
+ // pStartNode is used instead of pBox.
const SwStartNode *pStartNode;
- // Die folgenden Zahler geben an, wie oft ein Pass bereits fuer diesen
- // Inhalt durchgefuehrt wurde. Dazu werden sie mit einer Soll-Vorgabe
- // verglichen. Wird 255 erreicht laufen sie bei 0 weiter. So wird
- // eine Reinitialisierung bei jedem Resize vermieden.
- sal_uInt8 nPass1Done; // Wieoft wurde Pass 1 aufgerufen?
- sal_uInt8 nWidthSet; // Wieoft wurde die Breite gesetzt?
+ // The following counters indicate how often a pass has been
+ // done for this content. Therefore they are compared against
+ // a reference value. If 255 is reached the continue with 0.
+ // This avoids reinitialization on every resize.
+ sal_uInt8 nPass1Done; // How many times has Pass 1 been called?
+ sal_uInt8 nWidthSet; // How many times has the width been set?
- sal_Bool bNoBreakTag; // <NOBR>-Tag ueber gesamten Inhalt
+ sal_Bool bNoBreakTag; // <NOBR>-Tag over complete content.
public:
@@ -79,7 +80,7 @@ public:
const SwStartNode *GetStartNode() const;
- // Ermitteln des naechsten Knotens
+ // Calculation of next node.
SwHTMLTableLayoutCnts *GetNext() const { return pNext; }
void SetWidthSet( sal_uInt8 nRef ) { nWidthSet = nRef; }
@@ -91,18 +92,16 @@ public:
sal_Bool HasNoBreakTag() const { return bNoBreakTag; }
};
-/* */
-
class SwHTMLTableLayoutCell
{
- SwHTMLTableLayoutCnts *pContents; // der Inhalt der Zelle
+ SwHTMLTableLayoutCnts *pContents; // Content of cell.
- sal_uInt16 nRowSpan; // ROWSPAN der Zelle
- sal_uInt16 nColSpan; // COLSPAN der Zelle
- sal_uInt16 nWidthOption;// angegebene Breite der Zelle in Twip oder %
+ sal_uInt16 nRowSpan; // ROWSPAN of cell.
+ sal_uInt16 nColSpan; // COLSPAN of cell.
+ sal_uInt16 nWidthOption;// Given width of cell in Twip or %.
- sal_Bool bPrcWidthOption : 1;// nWidth ist %-Angabe
- sal_Bool bNoWrapOption : 1; // NOWRAP-Option
+ sal_Bool bPrcWidthOption : 1;// nWidth is %-value.
+ sal_Bool bNoWrapOption : 1; // NOWRAP-option.
public:
@@ -113,13 +112,13 @@ public:
~SwHTMLTableLayoutCell();
- // Setzen/Ermitteln des Inhalts einer Zelle
+ // Set or get content of a cell.
void SetContents( SwHTMLTableLayoutCnts *pCnts ) { pContents = pCnts; }
SwHTMLTableLayoutCnts *GetContents() const { return pContents; }
inline void SetProtected();
- // ROWSPAN/COLSPAN der Zelle Setzen/Ermitteln
+ // Set or get ROWSPAN/COLSPAN of cell.
void SetRowSpan( sal_uInt16 nRSpan ) { nRowSpan = nRSpan; }
sal_uInt16 GetRowSpan() const { return nRowSpan; }
sal_uInt16 GetColSpan() const { return nColSpan; }
@@ -130,21 +129,20 @@ public:
sal_Bool HasNoWrapOption() const { return bNoWrapOption; }
};
-/* */
-
class SwHTMLTableLayoutColumn
{
- // Zwischenwerte von AutoLayoutPass1
+
+ // Interim values of AutoLayoutPass1,
sal_uLong nMinNoAlign, nMaxNoAlign, nAbsMinNoAlign;
- // Ergebnisse von AutoLayoutPass1
+ // Results of AutoLayoutPass1
sal_uLong nMin, nMax;
- // Ergibnisse von Pass 2
- sal_uInt16 nAbsColWidth; // in Twips
- sal_uInt16 nRelColWidth; // in Twips bzw. relativ zu USHRT_MAX
+ // Results of Pass 2.
+ sal_uInt16 nAbsColWidth; // In Twips.
+ sal_uInt16 nRelColWidth; // In Twips or relative to USHRT_MAX.
- sal_uInt16 nWidthOption; // Optionen von <COL> oder <TD>/<TH>
+ sal_uInt16 nWidthOption; // Options of <COL> or <TD>/<TH>.
sal_Bool bRelWidthOption : 1;
sal_Bool bLeftBorder : 1;
@@ -184,41 +182,39 @@ public:
sal_Bool HasLeftBorder() const { return bLeftBorder; }
};
-/* */
-
class SwHTMLTableLayout
{
- Timer aResizeTimer; // Timer fuer DelayedResize
+ Timer aResizeTimer; // Timer for DelayedResize.
SwHTMLTableLayoutColumn **aColumns;
SwHTMLTableLayoutCell **aCells;
- const SwTable *pSwTable; // die SwTable (nur Top-Table)
- SwTableBox *pLeftFillerBox; // linke Filler-Zelle (nur Tab in Tab)
- SwTableBox *pRightFillerBox; // rechte Filler-Zelle (nur Tab-in Tab)
+ const SwTable *pSwTable; // SwTable (Top-Table only).
+ SwTableBox *pLeftFillerBox; // Left filler-box (table in table only).
+ SwTableBox *pRightFillerBox; // Right filler-box (table in Table only).
- sal_uLong nMin; // minimale Breite der Tabelle (Twips)
- sal_uLong nMax; // maximale Breite der Tabelle (Twips)
+ sal_uLong nMin; // Minimal width of table (Twips).
+ sal_uLong nMax; // Maximal width of table (Twips).
- sal_uInt16 nRows; // Anzahl Zeilen
- sal_uInt16 nCols; // Anzahl Spalten
+ sal_uInt16 nRows; // Row count.
+ sal_uInt16 nCols; // Column count.
- sal_uInt16 nLeftMargin; // Abstand zum linken Rand (aus Absatz)
- sal_uInt16 nRightMargin; // Abstand zum rechten Rand (aus Absatz)
+ sal_uInt16 nLeftMargin; // Space to left margin (from paragraph).
+ sal_uInt16 nRightMargin; // Space to left margin (from paragraph).
- sal_uInt16 nInhAbsLeftSpace; // von umgebender Zelle geerbter Abstand,
- sal_uInt16 nInhAbsRightSpace; // der Zellen zugeschlagen wurde
+ sal_uInt16 nInhAbsLeftSpace; // Space inherited from surrounding box
+ sal_uInt16 nInhAbsRightSpace; // that was added to boxes.
- sal_uInt16 nRelLeftFill; // relative Breiten der Zellen zur
- sal_uInt16 nRelRightFill; // Ausrichtung von Tabellen in Tabellen
+ sal_uInt16 nRelLeftFill; // Width of boxes relative to alignment
+ sal_uInt16 nRelRightFill; // of tables in tables.
- sal_uInt16 nRelTabWidth; // Die relative Breite der Tabelle
+ sal_uInt16 nRelTabWidth; // Relative width of table.
- sal_uInt16 nWidthOption; // die Breite der Tabelle (in Twip oder %)
- sal_uInt16 nCellPadding; // Abstand zum Inhalt (in Twip)
- sal_uInt16 nCellSpacing; // Absatnd zwischen Zellen (in Twip)
- sal_uInt16 nBorder; // Dicke der ausseren Umrandung bzw.
- // Platz, den Netscape hierfuer einrechnet.
+ sal_uInt16 nWidthOption; // Width of table (in Twips oder %).
+ sal_uInt16 nCellPadding; // Space to contents (in Twips).
+ sal_uInt16 nCellSpacing; // Cell spacing (in Twips).
+ sal_uInt16 nBorder; // Line strength of outer border, or rather the
+ // space needed for it as calculated by Netscape.
sal_uInt16 nLeftBorderWidth;
sal_uInt16 nRightBorderWidth;
@@ -226,31 +222,27 @@ class SwHTMLTableLayout
sal_uInt16 nInhRightBorderWidth;
sal_uInt16 nBorderWidth;
- sal_uInt16 nDelayedResizeAbsAvail; // Param fuer's verzoegerte Resize
+ sal_uInt16 nDelayedResizeAbsAvail; // Param for delayed Resize.
sal_uInt16 nLastResizeAbsAvail;
- sal_uInt8 nPass1Done; // Vorgabe-Werte fuer die einzelen
- sal_uInt8 nWidthSet; // Schleifen-Durchlauefe
-
- SvxAdjust eTableAdjust; // Die Ausrichtung der Tabelle
+ sal_uInt8 nPass1Done; // Reference-values for
+ sal_uInt8 nWidthSet; // the runs through loop.
- sal_Bool bColsOption : 1; // Tabelle besitzt eine COLS-Option
- sal_Bool bColTags : 1; // Tabelle besitzt COL/COLGRP-Tags
- sal_Bool bPrcWidthOption : 1; // Breite ist eine %-Angabe
- sal_Bool bUseRelWidth : 1; // SwTable bekommt relative Breite
+ SvxAdjust eTableAdjust; // Alignment of table.
- sal_Bool bMustResize : 1; // Tabelle muss in der Breite ang. werden
- sal_Bool bExportable : 1; // Layout kann zum Export genutzt werden
- sal_Bool bBordersChanged : 1; // Umrandung wurde geaendert
- sal_Bool bMayBeInFlyFrame : 1; // Die Tabelle koennte im Rahmen sein
+ sal_Bool bColsOption : 1; // Table has a COLS-option.
+ sal_Bool bColTags : 1; // Tabelle has COL/COLGRP-tags.
+ sal_Bool bPrcWidthOption : 1; // Width is given in percent.
+ sal_Bool bUseRelWidth : 1; // SwTable gets relative width.
- sal_Bool bDelayedResizeRecalc : 1; // Param fuer's verzoegerte Resize
- sal_Bool bMustNotResize : 1; // Die Tabelle darf nicht reseized werden
- sal_Bool bMustNotRecalc : 1; // Tabelle darf nicht an Inhalt angepasst
- // werden
+ sal_Bool bMustResize : 1; // Table width must be defined.
+ sal_Bool bExportable : 1; // Layout may be used for export.
+ sal_Bool bBordersChanged : 1; // Borders have been changed.
+ sal_Bool bMayBeInFlyFrame : 1; // Table could be within frame.
-// sal_uInt16 GetLeftBorderWidth( sal_uInt16 nCol ) const;
-// sal_uInt16 GetRightBorderWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
+ sal_Bool bDelayedResizeRecalc : 1; // Param for delayed Resize.
+ sal_Bool bMustNotResize : 1; // Table may not be resized.
+ sal_Bool bMustNotRecalc : 1; // Table may not be adapted to its contents.
void AddBorderWidth( sal_uLong &rMin, sal_uLong &rMax, sal_uLong& rAbsMin,
sal_uInt16 nCol, sal_uInt16 nColSpan,
@@ -326,38 +318,34 @@ public:
void SetMustNotResize( sal_Bool bSet ) { bMustNotResize = bSet; }
void SetMustNotRecalc( sal_Bool bSet ) { bMustNotRecalc = bSet; }
- // Neueberechnung der Tabellenbreiten fuer die uebergebene verfuegbare
- // Breite.
- // - Wenn bRecalc gesetzt ist, werden auch der Inhalt der Boxen
- // zur Berechnung herangezogen.
- // neu berechnet.
- // - Wenn bForce gesetzt ist, wird die Tabelle auch neu berechnet, wenn
- // dies mit SetMustNotResize unterdrueckt werden soll.
- // - Wenn nDelay>0 wird die Berechnung entsprechend verzoegert.
- // Innerhalb der Verzeoegerung auftretende Resize-Aufrufe werden
- // ignoriert, die Verzeogerung wird aber ggf. uebernommen.
- // - Wenn nDelay==HTMLTABLE_RESIZE_NOW ist, wird sofort Resized und
- // eventuell noch asstehende Resize-Aufrufe werden nicht mehr
- // ausgefuehrt.
- // - Der Rueckgabewert gibt an, ob sich die Tabelle geaendert hat.
+ // Recalculation of table widths for available width that has been passed.
+ // - If bRecalc is set, contents of boxes are included into calculation.
+ // - If bForce is set, table will be recalculated even if this was
+ // disallowed by SetMustNotResize.
+ // - If nDelay > 0 the calculation is delayed accordingly. Resizing calls
+ // occuring during delay-time are ignored, but the delay may be counted
+ // under certain circumstances.
+ // - If nDelay == HTMLTABLE_RESIZE_NOW, resize immediately and do not
+ // consider any resize-calls that might possibly be in order.
+ // - The return value indicates whether the table has been changed.
sal_Bool Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False, sal_Bool bForce=sal_False,
sal_uLong nDelay=0 );
void BordersChanged( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False );
- // Ermitteln der verfuegbaren Breite. Das geht nur, wenn ein Layout
- // oder eine ViewShell vorhanden ist. Sonst wird 0 zurueckgegeben.
- // (Wird vom HTML-Filter benoetigt, da der nicht an das Layout kommt.)
+ // Calculate available width. This works only if a layout or a
+ // ViewShell exists. Otherwise returns 0.
+ // This is needed by HTML-filter because it doesn't have access to the layout.)
static sal_uInt16 GetBrowseWidth( const SwDoc& rDoc );
- // Ermitteln der verfuegbaren Breite uber den Tabellen-Frame
+ // Calculates available width by table-frame.
sal_uInt16 GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const;
- // Ermitteln der verfuegbaren Breite uber den Tabellen-Frame oder
- // das statische GetBrowseWidth, wenn kein Layout existiert.
+ // Calculates available width by the table-frame or
+ // static GetBrowseWidth if no layout exists.
sal_uInt16 GetBrowseWidthByTable( const SwDoc& rDoc ) const;
- // Fuer Export
+ // For Export.
sal_uInt16 GetWidthOption() const { return nWidthOption; }
sal_Bool HasPrcWidthOption() const { return bPrcWidthOption; }
@@ -377,8 +365,6 @@ public:
sal_Bool MayBeInFlyFrame() const { return bMayBeInFlyFrame; }
};
-/* */
-
inline void SwHTMLTableLayoutCell::SetProtected()
{
nRowSpan = 1;
@@ -387,8 +373,6 @@ inline void SwHTMLTableLayoutCell::SetProtected()
pContents = 0;
}
-/* */
-
inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( sal_uLong nCMin,
sal_uLong nCMax, sal_uLong nAbsMin )
{
@@ -428,8 +412,6 @@ inline void SwHTMLTableLayoutColumn::SetMinMax( sal_uLong nMn, sal_uLong nMx )
nMax = nMx;
}
-/* */
-
inline sal_uInt16 SwHTMLTableLayout::GetInhCellSpace( sal_uInt16 nCol,
sal_uInt16 nColSpan ) const
{
@@ -489,3 +471,5 @@ void SwHTMLTableLayout::SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx
index fd5ba88b0a69..551e31df3af8 100644
--- a/sw/inc/index.hxx
+++ b/sw/inc/index.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,22 +36,22 @@
#define INVALID_INDEX STRING_NOTFOUND
-// Maximale Anzahl von Indizies im IndexArray (zum Abtesten auf Ueberlaeufe)
+// Maximal count of indices in IndexArray (for testing on overflows).
class SwIndex;
class SwIndexReg;
struct SwPosition;
-#ifndef DBG_UTIL
-#define INLINE inline
-#else
+#if OSL_DEBUG_LEVEL > 1
#define INLINE
+#else
+#define INLINE inline
#endif
class SW_DLLPUBLIC SwIndex
{
friend class SwIndexReg;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
static int nSerial;
int MySerial;
#endif
@@ -60,7 +61,7 @@ class SW_DLLPUBLIC SwIndex
SwIndex *pNext, *pPrev;
SwIndex& ChgValue( const SwIndex& rIdx, xub_StrLen nNewValue );
- void Remove(); // Ausketten
+ void Remove();
public:
explicit SwIndex(SwIndexReg *const pReg, xub_StrLen const nIdx = 0);
@@ -70,10 +71,8 @@ public:
INLINE xub_StrLen operator++();
INLINE xub_StrLen operator--();
-#ifndef CFRONT
INLINE xub_StrLen operator++(int);
INLINE xub_StrLen operator--(int);
-#endif
INLINE xub_StrLen operator+=( xub_StrLen );
INLINE xub_StrLen operator-=( xub_StrLen );
@@ -100,15 +99,12 @@ public:
INLINE SwIndex& operator=( xub_StrLen );
SwIndex& operator=( const SwIndex & );
- // gebe den Wert vom Index als xub_StrLen zurueck
xub_StrLen GetIndex() const { return nIndex; }
- // ermoeglicht Zuweisungen ohne Erzeugen eines temporaeren
- // Objektes
+ // Assignments without creating a temporary object.
SwIndex &Assign(SwIndexReg *,xub_StrLen);
- // Herausgabe des Pointers auf das IndexArray,
- // (fuers RTTI am SwIndexReg)
+ // Returns pointer to IndexArray (for RTTI at SwIndexReg).
const SwIndexReg* GetIdxReg() const { return pArray; }
};
@@ -121,9 +117,8 @@ class SwIndexReg
const SwIndex *pFirst, *pLast, *pMiddle;
- // ein globales Array, in das Indizies verschoben werden, die mal
- // temporaer "ausgelagert" werden muessen; oder die zum Zeitpunkt des
- // anlegens kein gueltiges Array kennen (SwPaM/SwPosition!)
+ // A global array for holding indices that need to be "swapped" temporarily
+ // or do not know a valid array (SwPaM/SwPosition!).
friend void _InitCore();
friend void _FinitCore();
static SwIndexReg* pEmptyIndexArray;
@@ -147,7 +142,7 @@ public:
void MoveTo( SwIndexReg& rArr );
};
-#ifndef DBG_UTIL
+#if !defined(OSL_DEBUG_LEVEL) || OSL_DEBUG_LEVEL < 2
inline xub_StrLen SwIndex::operator++()
{
@@ -157,7 +152,6 @@ inline xub_StrLen SwIndex::operator--()
{
return ChgValue( *this, nIndex-1 ).nIndex;
}
-#ifndef CFRONT
inline xub_StrLen SwIndex::operator++(int)
{
xub_StrLen nOldIndex = nIndex;
@@ -170,7 +164,6 @@ inline xub_StrLen SwIndex::operator--(int)
ChgValue( *this, nIndex-1 );
return nOldIndex;
}
-#endif
inline xub_StrLen SwIndex::operator+=( xub_StrLen nWert )
{
@@ -215,3 +208,5 @@ inline SwIndex& SwIndex::operator=( xub_StrLen nWert )
#endif // PRODUCT
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/inetfld.hxx b/sw/inc/inetfld.hxx
index 4160928ea8ce..8cb71f655f6b 100644
--- a/sw/inc/inetfld.hxx
+++ b/sw/inc/inetfld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,9 +37,7 @@ class SwINetField;
class SwCharFmt;
class SwDoc;
-/*--------------------------------------------------------------------
- Beschreibung: InterNet-FieldType -> Lade Document mit der URL
- --------------------------------------------------------------------*/
+// InterNet-FieldType -> Load document with URL
class SwINetFieldType : public SwFieldType
{
@@ -56,15 +55,14 @@ public:
SwDoc* GetDoc() const { return pDoc; }
};
-/*--------------------------------------------------------------------
- Beschreibung: InterNet-Field -> Lade Document mit der URL
- --------------------------------------------------------------------*/
+
+// InterNet-Field -> Load document with URL
class SwINetField : public SwField
{
friend class SwINetFieldType;
- String sTargetFrameName; // in diesen Frame soll die URL
+ String sTargetFrameName; // Frame to put the URL.
String sURL;
String sText;
SvxMacroTableDtor* pMacroTbl;
@@ -73,7 +71,7 @@ class SwINetField : public SwField
virtual SwField* Copy() const;
public:
- // Direkte Eingabe alten Wert loeschen
+ // Direct input, delete old value.
SwINetField( SwINetFieldType* pTyp, sal_uInt16 nFmt,
const String& rURL, const String& rText );
virtual ~SwINetField();
@@ -84,11 +82,11 @@ public:
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
- // HinweisText
+ // Information text.
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- // das ist das akt. Zeichenformat
+ // Current character format.
SwCharFmt* GetCharFmt();
const SwCharFmt* GetCharFmt() const
{ return ((SwINetField*)this)->GetCharFmt(); }
@@ -96,11 +94,10 @@ public:
const String& GetTargetFrameName() const { return sTargetFrameName; }
void SetTargetFrameName( const String& rNm ) { sTargetFrameName = rNm; }
- // setze eine neue oder loesche die akt. MakroTabelle
+ // Set new or delete old MacroTable.
void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
- // setze / erfrage ein Makro
void SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro );
const SvxMacro* GetMacro( sal_uInt16 nEvent ) const;
};
@@ -108,3 +105,4 @@ public:
#endif // SW_INETFLD_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/init.hxx b/sw/inc/init.hxx
index 55f6a1860459..42f540615c9c 100644
--- a/sw/inc/init.hxx
+++ b/sw/inc/init.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,5 @@ void _TextFinit();
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/io.hxx b/sw/inc/io.hxx
index 66af95e9a28a..832bd946b165 100644
--- a/sw/inc/io.hxx
+++ b/sw/inc/io.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,9 +25,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-// eigene Klasse fuer IO, die die systemunabhaengige Darstellung
-// uebernimmt (bytes dreht, Character konvertiert)
-// das Schreiben erfolgt aus Effizienzgruenden binaer
+
+// Special class for IO. Used for system-independent representation
+// (change of byte-order, conversion of characters)
+// Writes in binary format for efficiency.
#ifndef _IO_HXX
#define _IO_HXX
@@ -42,36 +44,15 @@
#include <sys/stat.h>
-#ifndef _KEYCOD_HXX //autogen
#include <vcl/keycod.hxx>
-#endif
#include <tools/stream.hxx>
-/*$
-class BinaryFile {
- int fd;
-public:
- enum IO_OpenMode {
- BF_READ = O_RDONLY,
- BF_WRITE = O_RDWR,
- BF_CREATE = O_CREAT,
- BF_TRUNC = O_TRUNC
- };
- // ctor oeffnet File im BinearMode, dtor schliesst es
- BinaryFile(const String &, int eOpenMode);
- ~BinaryFile();
- sal_Bool Ok() const {
- return -1 != fd;
- }
- operator int() const { return fd; }
-};
-*/
class SwIOin {
private:
SvFileStream aStr; //$ ifstream
public:
- // Stream wird im entsprechenden Mode erzeugt.
+ // Stream is created in respective mode.
SwIOin(const String &rFilename, StreamMode nMode =
STREAM_READ | STREAM_NOCREATE );
@@ -85,8 +66,8 @@ public:
SwIOin& operator>>(unsigned long& val);
String ReadString();
KeyCode ReadKeyCode();
- // kann erweitert werden fuer weitere Arrays von
- // Basistypen; nLen ist die Anzahl der Elemente
+ // Can be extended for more arrays of base types.
+ // nLen is count of elements.
SwIOin& Read(char *buf, unsigned nLen);
int operator!() { return aStr.GetError() != SVSTREAM_OK; }
@@ -100,7 +81,7 @@ private:
void _write(const char *buf, unsigned size);
SvFileStream aStr; //$ ofstream
public:
- // Stream wird im entsprechenden Mode erzeugt.
+ // Stream is created in respective mode.
SwIOout( const String &rFilename, StreamMode nMode =
STREAM_WRITE | STREAM_NOCREATE );
SwIOout& operator<<(char val);
@@ -113,8 +94,8 @@ public:
SwIOout& operator<<(unsigned long val);
SwIOout& operator<<(const String &);
SwIOout& operator<<(const KeyCode &);
- // kann erweitert werden fuer weitere Arrays von
- // Basistypen; nLen ist die Anzahl der Elemente
+ // Can be extended for more arrays of base types.
+ // nLen is count of elements.
SwIOout& Write(const char *buf, unsigned nLen);
int operator!() { return aStr.GetError() != SVSTREAM_OK; }
@@ -129,7 +110,7 @@ private:
SvFileStream aStr; //$ fstream
public:
- // Stream wird im entsprechenden Mode erzeugt.
+ // Stream is created in respective mode.
SwIOinout(const String &rFilename, StreamMode nMode =
STREAM_READWRITE | STREAM_NOCREATE );
@@ -143,8 +124,8 @@ public:
SwIOinout& operator>>(unsigned long& val);
String ReadString();
KeyCode ReadKeyCode();
- // kann erweitert werden fuer weitere Arrays von
- // Basistypen; nLen ist die Anzahl der Elemente
+ // Can be extended for more arrays of base types.
+ // nLen is count of elements.
SwIOinout& Read(char *buf, unsigned nLen);
SwIOinout& Read(unsigned short *buf, unsigned nLen );
@@ -158,8 +139,8 @@ public:
SwIOinout& operator<<(unsigned long val);
SwIOinout& operator<<(const String &);
SwIOinout& operator<<(const KeyCode &);
- // kann erweitert werden fuer weitere Arrays von
- // Basistypen; nLen ist die Anzahl der Elemente
+ // Can be extended for more arrays of base types.
+ // nLen is count of elements.
SwIOinout& Write(const char *buf, unsigned nLen);
int operator!() { return aStr.GetError() != SVSTREAM_OK; }
@@ -174,3 +155,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx
index 2fb66559b98d..b16560ae9c9c 100644
--- a/sw/inc/iodetect.hxx
+++ b/sw/inc/iodetect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,15 +33,14 @@
#include <sfx2/docfile.hxx>
#include <sfx2/fcontnr.hxx>
#include <osl/endian.h>
-#include <errhdl.hxx> // for ASSERT
#include <tools/string.hxx>
#include <swdllapi.h>
-#define FILTER_RTF "RTF" // RTF-Filter
+#define FILTER_RTF "RTF" // RTF filter
#define sRtfWH "WH_RTF"
-#define FILTER_TEXT "TEXT" // Text-Filter mit Default-CodeSet
-#define FILTER_BAS "BAS" // StarBasic (identisch mit ANSI)
-#define FILTER_WW8 "CWW8" // WinWord 97-Filter
+#define FILTER_TEXT "TEXT" // text filter with default codeset
+#define FILTER_BAS "BAS" // StarBasic (identical to ANSI)
+#define FILTER_WW8 "CWW8" // WinWord 97 filter
#define FILTER_TEXT_DLG "TEXT_DLG" // text filter with encoding dialog
#define FILTER_XML "CXML" // XML filter
#define FILTER_XMLV "CXMLV" // XML filter
@@ -88,27 +88,27 @@ enum ReaderWriterEnum {
extern SwIoDetect aFilterDetect[];
-// Die folgende Klasse ist ein Wrappe fuer die Basic-I/O-Funktionen
-// des Writer 3.0. Alles ist statisch. Alle u.a. Filternamen sind die
-// Writer-internen Namen, d.h. die namen, die in INSTALL.INI vor dem
-// Gleichheitszeichen stehen, z.b. SWG oder ASCII.
+// The following class is a wrapper for basic i/o functions of Writer 3.0.
+// Everything is static. All filter names mentioned are Writer-internal
+// names, i.e. the names in front of the equality sign in INSTALL.INI, like SWG
+// or ASCII.
class SwIoSystem
{
public:
- // suche ueber den internen FormatNamen den Filtereintrag
+ // find for an internal format name the corresponding filter entry
SW_DLLPUBLIC static const SfxFilter* GetFilterOfFormat( const String& rFormat,
const SfxFilterContainer* pCnt = 0 );
- // Feststellen des zu verwendenden Filters fuer die uebergebene
- // Datei. Der Filtername wird zurueckgeliefert. Konnte kein Filter
- // zurueckgeliefert werden, wird der Name des ASCII-Filters geliefert!
+ // Detect for the given file which filter should be used. The filter name
+ // is returned. If no filter could be found, the name of the ASCII filter
+ // is returned!
static const SfxFilter* GetFileFilter( const String& rFileName,
const String& rPrefFltName,
SfxMedium* pMedium = 0 );
- // Feststellen ob das File in dem vorgegebenen Format vorliegt.
- // Z.z werden nur unsere eigene Filter unterstuetzt!!
+ // Detect whether the given file is in the given format.
+ // For now, only our own filters are supported!
static sal_Bool IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
const SfxFilter** ppFlt = 0 );
@@ -117,7 +117,6 @@ public:
static bool IsDetectableText( const sal_Char* pBuf, sal_uLong &rLen,
CharSet *pCharSet=0, bool *pSwap=0, LineEnd *pLineEnd=0, bool bEncodedFilter = false );
- // static bool IsDetectableW4W(const String& rFileName, const String& rUserData);
static const SfxFilter* GetTextFilter( const sal_Char* pBuf, sal_uLong nLen );
@@ -125,3 +124,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/istyleaccess.hxx b/sw/inc/istyleaccess.hxx
index af19caec9252..491bc239d635 100644
--- a/sw/inc/istyleaccess.hxx
+++ b/sw/inc/istyleaccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,5 @@ public:
};
#endif // _ISTYLEACCESS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/itabenum.hxx b/sw/inc/itabenum.hxx
index 9dfa8c3a43b7..4c7af27a13f3 100644
--- a/sw/inc/itabenum.hxx
+++ b/sw/inc/itabenum.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,8 +34,6 @@ namespace tabopts
{
const sal_uInt16 DEFAULT_BORDER = 0x01;
const sal_uInt16 HEADLINE = 0x02;
-// const sal_uInt16 REPEAT = 0x04;
-// const sal_uInt16 HEADLINE_REPEAT = 0x06; // Headline + Repeat
const sal_uInt16 SPLIT_LAYOUT = 0x08;
const sal_uInt16 HEADLINE_NO_BORDER = HEADLINE | SPLIT_LAYOUT;
const sal_uInt16 ALL_TBL_INS_ATTR = DEFAULT_BORDER | HEADLINE | SPLIT_LAYOUT;
@@ -52,3 +51,4 @@ struct SwInsertTableOptions
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx
index 51d6a8c18c9a..17f78e950ce5 100644
--- a/sw/inc/lineinfo.hxx
+++ b/sw/inc/lineinfo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,6 @@
#define SW_LINEINFO_HXX
#include "calbck.hxx"
-//#ifndef _NUMRULE_HXX
-//#include <numrule.hxx>
-//#endif
#include <editeng/numitem.hxx>
#include "swdllapi.h"
@@ -107,3 +105,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/linkenum.hxx b/sw/inc/linkenum.hxx
index 08fbb23654b3..7f832368a539 100644
--- a/sw/inc/linkenum.hxx
+++ b/sw/inc/linkenum.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,3 +38,4 @@ enum UpdateLinks
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/list.hxx b/sw/inc/list.hxx
index a080440a55ea..5629540126ee 100644
--- a/sw/inc/list.hxx
+++ b/sw/inc/list.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,10 +61,6 @@ class SwList
bool IsListLevelMarked( const int nListLevel ) const;
-// void ContinueList( SwList& rList );
-// const SwList* GetContinuedList() const;
-// void ClearContinuation();
-
private:
// no copy constructor and no assignment operator
SwList( const SwList& );
@@ -72,3 +69,5 @@ class SwList
SwListImpl* mpListImpl;
};
#endif // LIST_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/listfunc.hxx b/sw/inc/listfunc.hxx
index b82ce6424249..fc883875b3fd 100644
--- a/sw/inc/listfunc.hxx
+++ b/sw/inc/listfunc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,3 +37,5 @@ namespace listfunc
}
#endif // LISTFUNC_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx
index 7a3f27bb0eed..e7af13ecdf54 100644
--- a/sw/inc/mdiexp.hxx
+++ b/sw/inc/mdiexp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,7 +45,7 @@ extern void ScrollMDI(ViewShell* pVwSh, const SwRect &, sal_uInt16 nRangeX, sal_
extern sal_Bool IsScrollMDI(ViewShell* pVwSh, const SwRect &);
extern void SizeNotify(ViewShell* pVwSh, const Size &);
-//Update der Statusleiste, waehrend einer Action.
+// Update of status bar during an action.
extern void PageNumNotify( ViewShell* pVwSh,
sal_uInt16 nPhyNum,
sal_uInt16 nVirtNum,
@@ -66,13 +67,15 @@ LAYOUT_NS Dialog* GetSearchDialog();
void RepaintPagePreview( ViewShell* pVwSh, const SwRect& rRect );
// ndgrf.cxx
-// alle QuickDraw-Bitmaps des speziellen Docs loeschen
+// Delete all QuickDraw-bitmaps of the specific Document.
void DelAllGrfCacheEntries( SwDoc* pDoc );
-// ChgMode fuer Tabellen aus der Konfiguration lesen
+// Read ChgMode for tables from configuration.
TblChgMode GetTblChgDefaultMode();
sal_Bool JumpToSwMark( ViewShell* pVwSh, const UniString& rMark );
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
index 59b513965ed9..e45a3e39657f 100644
--- a/sw/inc/modcfg.hxx
+++ b/sw/inc/modcfg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,6 @@
#include <tools/globname.hxx>
class SwModuleOptions;
-//-----------------------------------------------------------------------------
class InsCaptionOpt;
typedef InsCaptionOpt* InsCaptionOptPtr;
SV_DECL_PTRARR_SORT_DEL(InsCapOptArr, InsCaptionOptPtr, 0, 5)
@@ -53,9 +53,6 @@ protected:
InsCaptionOpt* Find(const SwCapObjType eType, const SvGlobalName *pOleId = 0) const;
};
-/* -----------------------------10.10.00 16:14--------------------------------
-
- ---------------------------------------------------------------------------*/
class SwRevisionConfig : public utl::ConfigItem
{
friend class SwModuleOptions;
@@ -79,9 +76,7 @@ class SwRevisionConfig : public utl::ConfigItem
void Load();
void SetModified(){ConfigItem::SetModified();}
};
-/* -----------------------------11.10.00 09:00--------------------------------
- ---------------------------------------------------------------------------*/
class SwInsertConfig : public utl::ConfigItem
{
friend class SwModuleOptions;
@@ -91,12 +86,9 @@ class SwInsertConfig : public utl::ConfigItem
SvGlobalName aGlobalNames[5];
- sal_Bool bInsWithCaption; //Insert/Caption/Automatic // Objekte beschriftet einfuegen
+ sal_Bool bInsWithCaption; //Insert/Caption/Automatic
sal_Bool bCaptionOrderNumberingFirst; //#i61007# caption order starting with numbering
-// sal_uInt16 nInsTblFlags; //Insert/Table/Header // Flags fuer Tabellen einfuegen
- //Insert/Table/RepeatHeader
- //Insert/Table/Split
- //Insert/Table/Border
+
SwInsertTableOptions aInsTblOpts;
sal_Bool bIsWeb;
@@ -110,9 +102,7 @@ class SwInsertConfig : public utl::ConfigItem
void Load();
void SetModified(){ConfigItem::SetModified();}
};
-/* -----------------------------11.10.00 09:00--------------------------------
- ---------------------------------------------------------------------------*/
class SwTableConfig : public utl::ConfigItem
{
friend class SwModuleOptions;
@@ -123,9 +113,9 @@ class SwTableConfig : public utl::ConfigItem
sal_uInt16 nTblVInsert; //int Table/Insert/Column
TblChgMode eTblChgMode; //int Table/Change/Effect
- sal_Bool bInsTblFormatNum; // Table/Input/NumberRecognition // Automatische Zahlenerkennung
- sal_Bool bInsTblChangeNumFormat; // Table/Input/NumberFormatRecognition // Automatische Zahlenformaterkennung
- sal_Bool bInsTblAlignNum; // Table/Input/Alignment // Zahlen ausrichten
+ sal_Bool bInsTblFormatNum; // Table/Input/NumberRecognition // Automatic recognition of numbers.
+ sal_Bool bInsTblChangeNumFormat; // Table/Input/NumberFormatRecognition // Automatic recognition of number formats.
+ sal_Bool bInsTblAlignNum; // Table/Input/Alignment // Align numbers.
const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
public:
@@ -137,9 +127,7 @@ class SwTableConfig : public utl::ConfigItem
void Load();
void SetModified(){ConfigItem::SetModified();}
};
-/* -----------------------------18.01.01 16:57--------------------------------
- ---------------------------------------------------------------------------*/
class SwMiscConfig : public utl::ConfigItem
{
friend class SwModuleOptions;
@@ -168,9 +156,6 @@ class SwMiscConfig : public utl::ConfigItem
void SetModified(){ConfigItem::SetModified();}
};
-/* ---------------------------------------------------------------------------
-
- ---------------------------------------------------------------------------*/
class SW_DLLPUBLIC SwModuleOptions
{
SwRevisionConfig aRevisionConfig;
@@ -341,3 +326,4 @@ public:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/modeltoviewhelper.hxx b/sw/inc/modeltoviewhelper.hxx
index 2d97ca9b32fc..cf09567ef7f0 100644
--- a/sw/inc/modeltoviewhelper.hxx
+++ b/sw/inc/modeltoviewhelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,3 +110,5 @@ namespace ModelToViewHelper
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index cea112f655a0..71c447ab7c0b 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,6 @@
#include <bparr.hxx>
#include <ndtyp.hxx>
-
class Graphic;
class GraphicObject;
class String;
@@ -74,7 +74,6 @@ class SwUndoTblToTxt;
class SwUndoTxtToTbl;
struct SwPosition;
-
// --------------------
// class SwNodes
// --------------------
@@ -92,42 +91,39 @@ class SW_DLLPUBLIC SwNodes
friend class SwNode;
friend class SwNodeIndex;
- SwNodeIndex* pRoot; // Liste aller Indizies auf Nodes
+ SwNodeIndex* pRoot; // List of all indices on nodes.
- // --> OD 2008-05-14 #refactorlists# - removed <bSyncNumberAndNumRule>
void InsertNode( const SwNodePtr pNode,
const SwNodeIndex& rPos );
void InsertNode( const SwNodePtr pNode,
sal_uLong nPos );
- // <--
-
- SwDoc* pMyDoc; // in diesem Doc ist das Nodes-Array
+ SwDoc* pMyDoc; // This Doc contains the nodes-array.
- SwNode *pEndOfPostIts, *pEndOfInserts, // das sind die festen Bereiche
+ SwNode *pEndOfPostIts, *pEndOfInserts, // These are the fixed ranges.
*pEndOfAutotext, *pEndOfRedlines,
*pEndOfContent;
- mutable SwOutlineNodes* pOutlineNds; // Array aller GliederiungsNodes
+ mutable SwOutlineNodes* pOutlineNds; // Array of all outline nodes.
- sal_Bool bInNodesDel : 1; // falls rekursiv aufgerufen wird
- // Num/Outline nicht aktualisierem
- sal_Bool bInDelUpdOutl : 1; // Flags fuers aktualisieren von Outl.
- sal_Bool bInDelUpdNum : 1; // Flags fuers aktualisieren von Outl.
+ sal_Bool bInNodesDel : 1; // In Case of recursive calling.
+ // Do not update Num/Outline.
+ sal_Bool bInDelUpdOutl : 1; // Flag for updating of Outline.
+ sal_Bool bInDelUpdNum : 1; // Flag for updating of Outline.
- // fuer dier Verwaltung der Indizies
+ // For administering indices.
void RegisterIndex( SwNodeIndex& rIdx );
void DeRegisterIndex( SwNodeIndex& rIdx );
void RemoveNode( sal_uLong nDelPos, sal_uLong nLen, sal_Bool bDel );
- // Aktionen auf die Nodes
+ // Actions on the nodes.
void SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEnd );
void DelNodes( const SwNodeIndex& rStart, sal_uLong nCnt = 1 );
void ChgNode( SwNodeIndex& rDelPos, sal_uLong nSize,
SwNodeIndex& rInsPos, sal_Bool bNewFrms );
- void UpdtOutlineIdx( const SwNode& ); // Update ab Node alle OutlineNodes
+ void UpdtOutlineIdx( const SwNode& ); // Update all OutlineNodes starting from Node.
void _CopyNodes( const SwNodeRange&, const SwNodeIndex&,
sal_Bool bNewFrms = sal_True, sal_Bool bTblInsDummyNode = sal_False ) const;
@@ -158,22 +154,22 @@ public:
void ForEach( const SwNodeIndex& rStart, const SwNodeIndex& rEnd,
FnForEach_SwNodes fnForEach, void* pArgs = 0 );
- // eine noch leere Section
+ // A still empty section.
SwNode& GetEndOfPostIts() const { return *pEndOfPostIts; }
- // Section fuer alle Fussnoten
+ // Section fpr all footnotes.
SwNode& GetEndOfInserts() const { return *pEndOfInserts; }
- // Section fuer alle Flys/Header/Footers
+ // Section for all Flys/Header/Footers.
SwNode& GetEndOfAutotext() const { return *pEndOfAutotext; }
- // Section fuer alle Redlines
+ // Section for all Redlines.
SwNode& GetEndOfRedlines() const { return *pEndOfRedlines; }
- // das ist der letzte EndNode einer SonderSection. Hier nach kommt nur
- // noch die normale ContentSection (also der BodyText)
+ // This is the last EndNode of a special section. After it
+ // there is only the regular ContentSection (i.e. the BodyText).
SwNode& GetEndOfExtras() const { return *pEndOfRedlines; }
- // die normale ContentSection (also der BodyText)
+ // Regular ContentSection (i.e. the BodyText).
SwNode& GetEndOfContent() const { return *pEndOfContent; }
- // ist das NodesArray das normale vom Doc? (nicht das UndoNds, .. )
- // Implementierung steht im doc.hxx (weil man dazu Doc kennen muss) !
+ // Is the NodesArray the regular one of Doc? (and not the UndoNds, ...)
+ // Implementation in doc.hxx (because one needs to know Doc for it) !
sal_Bool IsDocNodes() const;
sal_uInt16 GetSectionLevel(const SwNodeIndex &rIndex) const;
@@ -198,25 +194,25 @@ public:
SwCntntNode* GoNext(SwNodeIndex *) const;
SwCntntNode* GoPrevious(SwNodeIndex *) const;
- //Gehe zum naechsten/vorherigen Cntnt/Tabellennode, fuer den
- //es LayoutFrames gibt, dabei Kopf-/Fusszeilen/Rahmen etc. nicht verlassen
+ // Go to next/previous Cntnt/Table-node for which LayoutFrames exist.
+ // While doing this do not leave Header/Footer/Frame etc.
SwNode* GoNextWithFrm(SwNodeIndex *) const;
SwNode* GoPreviousWithFrm(SwNodeIndex *) const;
- // zum naechsten Content-Node, der nicht geschuetzt oder versteckt ist
- // (beides auf sal_False ==> GoNext/GoPrevious!!!)
+ // Go to next content-node that is not protected or hidden
+ // (Both set FALSE ==> GoNext/GoPrevious!!!).
SwCntntNode* GoNextSection( SwNodeIndex *, int bSkipHidden = sal_True,
int bSkipProtect = sal_True ) const;
SwCntntNode* GoPrevSection( SwNodeIndex *, int bSkipHidden = sal_True,
int bSkipProtect = sal_True ) const;
- // erzeuge ein leere Section von Start und EndNode. Darf nur gerufen
- // werden, wenn eine neue Section mit Inhalt erzeugt werden soll.
- // Zum Beispiel bei den Filtern/Undo/...
+ // Create an empty section of Start- and EndNote. It may be called
+ // only if a new section with content is to be created,
+ // e.g. at filters/Undo/...
SwStartNode* MakeEmptySection( const SwNodeIndex& rIdx,
SwStartNodeType = SwNormalStartNode );
- // die Impl. von "Make...Node" stehen in den angegebenen .ccx-Files
+ // Implementations of "Make...Node" are in the given .cxx-files.
SwTxtNode *MakeTxtNode( const SwNodeIndex & rWhere,
SwTxtFmtColl *pColl,
SwAttrSet* pAutoAttr = 0 ); // in ndtxt.cxx
@@ -248,31 +244,29 @@ public:
SwGrfFmtColl *pColl,
SwAttrSet* pAutoAttr ); // in ndole.cxx
- // Array aller GliederiungsNodes;
+ // Array of all OutlineNodes.
const SwOutlineNodes& GetOutLineNds() const;
//void UpdateOutlineNode( const SwNode&, sal_uInt8 nOldLevel, sal_uInt8 nNewLevel );//#outline level,removed by zhaojianwei
- // alle Nodes Updaten - Rule/Format-Aenderung
+
+ // Update all Nodes - Rule/Format-Change.
void UpdateOutlineNode(SwNode & rNd);
- // fuege die Nodes fuer die Tabelle ein
- // wenn Lines angegeben, erzeuge die Matrix aus Lines & Boxen
- // ansonsten nur die Anzahl von Boxen.
- /* #109161#
+ // Insert nodes for tables. If Lines is given, create the matrix
+ // from lines and boxes, else only the count of boxes.
- New parameter pAttrSet: If pAttrSet is non-null and contains an
- adjust item it is propagated to the table cells. If there is an
- adjust in pCntntTxtColl or pHeadlineTxtColl this adjust item
- overrides the item in pAttrSet.
+ // New parameter pAttrSet: If pAttrSet is non-null and contains an
+ // adjust item it is propagated to the table cells. If there is an
+ // adjust in pCntntTxtColl or pHeadlineTxtColl this adjust item
+ // overrides the item in pAttrSet.
- */
SwTableNode* InsertTable( const SwNodeIndex& rNdIdx,
sal_uInt16 nBoxes, SwTxtFmtColl* pCntntTxtColl,
sal_uInt16 nLines = 0, sal_uInt16 nRepeat = 0,
SwTxtFmtColl* pHeadlineTxtColl = 0,
const SwAttrSet * pAttrSet = 0);
- // erzeuge aus dem makierten Bereich eine ausgeglichene Tabelle
+ // Create balanced table from selected range.
SwTableNode* TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
SwTableFmt* pTblFmt,
SwTableLineFmt* pLineFmt,
@@ -290,33 +284,34 @@ public:
SwTxtFmtColl* pTxtColl
/*, SwUndo... pUndo*/ );
- // erzeuge aus der Tabelle wieder normalen Text
+
+ // Create regular text from what was table.
sal_Bool TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
SwUndoTblToTxt* = 0 );
- // steht im untbl.cxx und darf nur vom Undoobject gerufen werden
+ // Is in untbl.cxx and may called only by Undo-object.
SwTableNode* UndoTableToText( sal_uLong nStt, sal_uLong nEnd,
const SwTblToTxtSaves& rSavedData );
- // fuege in der Line, vor der InsPos eine neue Box ein. Das Format
- // wird von der nachfolgenden (vorhergenden;wenn an Ende) genommen
- // in der Line muss schon eine Box vorhanden sein !
+ // Insert a new box in the line before InsPos. Its format
+ // is taken from the following one (or from the previous one if we are
+ // at the end). In the line there must be a box already.
sal_Bool InsBoxen( SwTableNode*, SwTableLine*, SwTableBoxFmt*,
- // Formate fuer den TextNode der Box
+ // Formats for TextNode of box.
SwTxtFmtColl*, const SfxItemSet* pAutoAttr,
sal_uInt16 nInsPos, sal_uInt16 nCnt = 1 );
- // Splittet eine Tabelle in der Grund-Zeile, in der der Index steht.
- // Alle GrundZeilen dahinter wandern in eine neue Tabelle/-Node.
- // Ist das Flag bCalcNewSize auf sal_True, wird fuer beide neuen Tabellen
- // die neue SSize aus dem Max der Boxen errechnet; vorrausgesetzt,
- // die SSize ist "absolut" gesetzt (LONG_MAX)
- // (Wird zur Zeit nur fuer den RTF-Parser benoetigt)
+ // Splits a table at the base-line which contains the index.
+ // All base lines behind it are moved to a new table/ -node.
+ // Is the flag bCalcNewSize set to TRUE, the new SSize for both
+ // tables is calculated from the Maximum of the boxes, provided
+ // SSize is set "absolute" (LONG_MAX).
+ // (Momentarily this is needed only for the RTF-parser.)
SwTableNode* SplitTable( const SwNodeIndex& rPos, sal_Bool bAfter = sal_True,
sal_Bool bCalcNewSize = sal_False );
- // fuegt 2 Tabellen, die hintereinander stehen, wieder zusammen
+ // Two Tables that are following one another are merged.
sal_Bool MergeTable( const SwNodeIndex& rPos, sal_Bool bWithPrev = sal_True,
sal_uInt16 nMode = 0, SwHistory* pHistory = 0 );
- // fuege eine neue SwSection ein
+ // Insert a new SwSection.
SwSectionNode* InsertTextSection(SwNodeIndex const& rNdIdx,
SwSectionFmt& rSectionFmt,
SwSectionData const&,
@@ -325,23 +320,21 @@ public:
bool const bInsAtStart = true,
bool const bCreateFrms = true);
- // in welchem Doc steht das Nodes-Array ?
+ // Which Doc contains the nodes-array?
SwDoc* GetDoc() { return pMyDoc; }
const SwDoc* GetDoc() const { return pMyDoc; }
- // suche den vorhergehenden [/nachfolgenden ] ContentNode oder
- // TabellenNode mit Frames. Wird kein Ende angeben, dann wird mit
- // dem FrameIndex begonnen; ansonsten, wird mit dem vor rFrmIdx und
- // dem hintern pEnd die Suche gestartet. Sollte kein gueltiger Node
- // gefunden werden, wird 0 returnt. rFrmIdx zeigt auf dem Node mit
- // Frames
+ // Search previous / next content node or table node with frames.
+ // If no end is given begin with the FrameIndex, else start search
+ // with that before rFrmIdx and pEnd at the back.
+ // If no valid node is found, return 0. rFrmIdx points to the node with frames.
SwNode* FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
const SwNode* pEnd = 0 ) const;
- //-> #112139#
SwNode * DocumentSectionStartNode(SwNode * pNode) const;
SwNode * DocumentSectionEndNode(SwNode * pNode) const;
- //<- #112139#
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index fb1c1d4c8c33..2dbcdea62697 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,34 +30,27 @@
#include <sfx2/lnkbase.hxx>
#include <svtools/grfmgr.hxx>
#include <ndnotxt.hxx>
-// --> OD, MAV 2005-08-17 #i53025#
#include <com/sun/star/embed/XStorage.hpp>
-// <--
-// --> OD 2007-03-28 #i73788#
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
class SwAsyncRetrieveInputStreamThreadConsumer;
-// <--
class SwGrfFmtColl;
class SwDoc;
class GraphicAttr;
class SvStorage;
-// --------------------
+
// SwGrfNode
-// --------------------
class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
{
friend class SwNodes;
GraphicObject aGrfObj;
- ::sfx2::SvBaseLinkRef refLink; // falls Grafik nur als Link, dann Pointer gesetzt
+ ::sfx2::SvBaseLinkRef refLink; // If graphics only as link then pointer is set.
Size nGrfSize;
-// String aStrmName; // SW3: Name des Storage-Streams fuer Embedded
String aNewStrmName; // SW3/XML: new stream name (either SW3 stream
// name or package url)
- String aLowResGrf; // HTML: LowRes Grafik (Ersatzdarstellung bis
- // die normale (HighRes) geladen ist.
+ String aLowResGrf; // HTML: LowRes graphics (substitute until regular HighRes graphics is loaded).
sal_Bool bTransparentFlagValid :1;
sal_Bool bInSwapIn :1;
@@ -64,23 +58,20 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
sal_Bool bChgTwipSize :1;
sal_Bool bChgTwipSizeFromPixel :1;
sal_Bool bLoadLowResGrf :1;
- sal_Bool bFrameInPaint :1; //Um Start-/EndActions im Paint (ueber
- //SwapIn zu verhindern.
- sal_Bool bScaleImageMap :1; //Image-Map in SetTwipSize skalieren
+ sal_Bool bFrameInPaint :1; // To avoid Start-/EndActions in Paint via SwapIn.
+ sal_Bool bScaleImageMap :1; // Scale image map in SetTwipSize.
- // --> OD 2007-01-19 #i73788#
boost::shared_ptr< SwAsyncRetrieveInputStreamThreadConsumer > mpThreadConsumer;
bool mbLinkedInputStreamReady;
com::sun::star::uno::Reference<com::sun::star::io::XInputStream> mxInputStream;
sal_Bool mbIsStreamReadOnly;
- // <--
SwGrfNode( const SwNodeIndex& rWhere,
const String& rGrfName, const String& rFltName,
const Graphic* pGraphic,
SwGrfFmtColl* pGrfColl,
SwAttrSet* pAutoAttr = 0 );
- // Ctor fuer Einlesen (SW/G) ohne Grafik
+ // Ctor for reading (SW/G) without graphics.
SwGrfNode( const SwNodeIndex& rWhere,
const String& rGrfName, const String& rFltName,
SwGrfFmtColl* pGrfColl,
@@ -93,21 +84,19 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
void InsertLink( const String& rGrfName, const String& rFltName );
sal_Bool ImportGraphic( SvStream& rStrm );
sal_Bool HasStreamName() const { return aGrfObj.HasUserData(); }
- // --> OD 2005-05-04 #i48434# - adjust return type and rename method to
+ // adjust return type and rename method to
// indicate that its an private one.
- // --> OD 2005-08-17 #i53025#
+
// embedded graphic stream couldn't be inside a 3.1 - 5.2 storage any more.
// Thus, return value isn't needed any more.
void _GetStreamStorageNames( String& rStrmName, String& rStgName ) const;
- // <--
+
void DelStreamName();
DECL_LINK( SwapGraphic, GraphicObject* );
/** helper method to determine stream for the embedded graphic.
- OD 2005-05-04 #i48434#
Important note: caller of this method has to handle the thrown exceptions
- OD, MAV 2005-08-17 #i53025#
Storage, which should contain the stream of the embedded graphic, is
provided via parameter. Otherwise the returned stream will be closed
after the the method returns, because its parent stream is closed and deleted.
@@ -132,7 +121,6 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
/** helper method to get a substorage of the document storage for readonly access.
- OD, MAV 2005-08-17 #i53025#
A substorage with the specified name will be opened readonly. If the provided
name is empty the root storage will be returned.
@@ -174,33 +162,34 @@ public:
inline sal_Bool IsScaleImageMap() const { return bScaleImageMap; }
inline void SetScaleImageMap( sal_Bool b ) { bScaleImageMap = b; }
#endif
- // steht in ndcopy.cxx
+ // in ndcopy.cxx
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
- // erneutes Einlesen, falls Graphic nicht Ok ist. Die
- // aktuelle wird durch die neue ersetzt.
+ // Re-read in case graphic was not OK. The current one
+ // gets replaced by the new one.
sal_Bool ReRead( const String& rGrfName, const String& rFltName,
const Graphic* pGraphic = 0,
const GraphicObject* pGrfObj = 0,
sal_Bool bModify = sal_True );
- // Laden der Grafik unmittelbar vor der Anzeige
+ // Loading of graphic immediately before displaying.
short SwapIn( sal_Bool bWaitForData = sal_False );
- // Entfernen der Grafik, um Speicher freizugeben
+ // Remove graphic in order to free memory.
short SwapOut();
- // Zugriff auf den Storage-Streamnamen
+ // Access to storage stream-name.
void SetStreamName( const String& r ) { aGrfObj.SetUserData( r ); }
void SetNewStreamName( const String& r ) { aNewStrmName = r; }
- // is this node selected by any shell?
+ // Is this node selected by any shell?
sal_Bool IsSelected() const;
#endif
- // Der Grafik sagen, dass sich der Node im Undobereich befindet
+ // Communicate to graphic that node is in Undo-range.
virtual sal_Bool SavePersistentData();
virtual sal_Bool RestorePersistentData();
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
- // Abfrage der Link-Daten
+
+ // Query link-data.
sal_Bool IsGrfLink() const { return refLink.Is(); }
inline sal_Bool IsLinkedFile() const;
inline sal_Bool IsLinkedDDE() const;
@@ -208,15 +197,14 @@ public:
sal_Bool GetFileFilterNms( String* pFileNm, String* pFilterNm ) const;
void ReleaseLink();
- // Skalieren einer Image-Map: Die Image-Map wird um den Faktor
- // zwischen Grafik-Groesse und Rahmen-Groesse vergroessert/verkleinert
+ // Scale an image-map: the image-map becomes zoomed in / out by
+ // factor between graphic-size and border-size.
void ScaleImageMap();
- // returns the with our graphic attributes filled Graphic-Attr-Structure
+ // Returns the with our graphic attributes filled Graphic-Attr-Structure.
GraphicAttr& GetGraphicAttr( GraphicAttr&, const SwFrm* pFrm ) const;
#endif
- // --> OD 2007-01-18 #i73788#
boost::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > GetThreadConsumer();
bool IsLinkedInputStreamReady() const;
void TriggerAsyncRetrieveInputStream();
@@ -224,15 +212,11 @@ public:
com::sun::star::uno::Reference<com::sun::star::io::XInputStream> xInputStream,
const sal_Bool bIsStreamReadOnly );
void UpdateLinkWithInputStream();
- // <--
- // --> OD 2008-07-21 #i90395#
bool IsAsyncRetrieveInputStreamPossible() const;
- // <--
};
-// ----------------------------------------------------------------------
-// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
+// Inline methods from Node.hxx - it is only now that we know TxtNode!!
inline SwGrfNode *SwNode::GetGrfNode()
{
return ND_GRFNODE == nNodeType ? (SwGrfNode*)this : 0;
@@ -253,5 +237,6 @@ inline sal_Bool SwGrfNode::IsLinkedDDE() const
}
#endif
-
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx
index f24dce137463..58aa4c2d3037 100644
--- a/sw/inc/ndhints.hxx
+++ b/sw/inc/ndhints.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,10 +34,8 @@
#include "swtypes.hxx"
-//#include "numrule.hxx"
-
class SwTxtNode;
-class SwRegHistory; // steht im RolBck.hxx
+class SwRegHistory; // Is in RolBck.hxx.
class SwTxtAttr;
class SwTxtAttrNesting;
@@ -56,26 +55,21 @@ SW_DLLPRIVATE SwTxtAttr*
MakeRedlineTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr );
-/*
- * Ableitung der Klasse SwpHints ueber den Umweg ueber SwpHts, da
- * lediglich die Klasse SwTxtNode Attribute einfuegen und
- * loeschen koennen soll. Anderen Klassen wie den Frames steht
- * lediglich ein lesender Zugriff ueber den Index-Operator zur
- * Verfuegung.
- * Groesse beim Anlegen gleich 1, weil nur dann ein Array erzeug wird, wenn
- * auch ein Hint eingefuegt wird.
- */
+// Class SwpHints is derived indirectly via SwpHts, because only the
+// class SwTxtNode should be allowed to insert and remove attributes.
+// Other classes like the Frames are given only reading access via
+// the index-operator.
+// Size when created is 1 because an array is created only if
+// also a hint is inserted.
+
+ // Class SwpHtStart/End
-/*************************************************************************
- * class SwpHtStart/End
- *************************************************************************/
SV_DECL_PTRARR_SORT(SwpHtStart,SwTxtAttr*,1,1)
SV_DECL_PTRARR_SORT(SwpHtEnd,SwTxtAttr*,1,1)
-/*************************************************************************
- * class SwpHintsArr
- *************************************************************************/
+// Class SwpHintsArr
+
/// the Hints array
class SwpHintsArray
@@ -114,14 +108,14 @@ public:
{ return m_HintStarts[nIdx]; }
inline sal_uInt16 Count() const { return m_HintStarts.Count(); }
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bool Check() const;
#endif
};
-/*************************************************************************
- * class SwpHints
- *************************************************************************/
+
+// Class SwpHints
+
// public interface
class SwpHints : public SwpHintsArray
@@ -195,12 +189,12 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL(SwpHints)
};
-// Ausgabeoperator fuer die Texthints
+// Output operator for text hints.
SvStream &operator<<(SvStream &aS, const SwpHints &rHints); //$ ostream
-/*************************************************************************
- * Inline Implementations
- *************************************************************************/
+
+// Inline Implementations
+
inline sal_uInt16 SwpHintsArray::GetStartOf( const SwTxtAttr *pHt ) const
{
@@ -221,3 +215,5 @@ inline SwTxtAttr *SwpHintsArray::Cut( const sal_uInt16 nPosInStart )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ndindex.hxx b/sw/inc/ndindex.hxx
index 695560bf7878..15bbfe57f55f 100644
--- a/sw/inc/ndindex.hxx
+++ b/sw/inc/ndindex.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,7 +44,7 @@ class SW_DLLPUBLIC SwNodeIndex
friend void SwNodes::DeRegisterIndex( SwNodeIndex& );
friend void SwNodes::RemoveNode( sal_uLong, sal_uLong, sal_Bool );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
static int nSerial;
int MySerial;
#endif
@@ -51,9 +52,9 @@ class SW_DLLPUBLIC SwNodeIndex
SwNode* pNd;
SwNodeIndex *pNext, *pPrev;
- void Remove(); // Ausketten
+ void Remove();
- // diese sind nicht erlaubt!
+ // These are not allowed!
SwNodeIndex( SwNodes& rNds, sal_uInt16 nIdx );
SwNodeIndex( SwNodes& rNds, int nIdx );
@@ -65,10 +66,8 @@ public:
inline sal_uLong operator++();
inline sal_uLong operator--();
-#ifndef CFRONT
inline sal_uLong operator++(int);
inline sal_uLong operator--(int);
-#endif
inline sal_uLong operator+=( sal_uLong );
inline sal_uLong operator-=( sal_uLong );
@@ -93,23 +92,22 @@ public:
SwNodeIndex& operator=( const SwNodeIndex& );
SwNodeIndex& operator=( const SwNode& );
- // gebe den Wert vom Index als sal_uLong zurueck
+ // Return value of index as sal_uLong.
inline sal_uLong GetIndex() const;
- // ermoeglicht Zuweisungen ohne Erzeugen eines temporaeren Objektes
+ // Enables assignments without creation of a temporary object.
SwNodeIndex& Assign( SwNodes& rNds, sal_uLong );
SwNodeIndex& Assign( const SwNode& rNd, long nOffset = 0 );
- // Herausgabe des Pointers auf das NodesArray,
+ // Gets pointer on NodesArray.
inline const SwNodes& GetNodes() const;
inline SwNodes& GetNodes();
SwNode& GetNode() const { return *pNd; }
};
-/*
- * SwRange
- */
+// SwRange
+
class SW_DLLPUBLIC SwNodeRange
{
public:
@@ -129,9 +127,8 @@ public:
-// fuer die inlines wird aber der node.hxx benoetigt. Dieses braucht aber
-// auch wieder dieses. Also alle Inlines, die auf pNd zugreifen werden
-// hier implementiert.
+// For inlines node.hxx is needed which in turn needs this one.
+// Therefore all inlines accessing pNd are implemented here.
inline sal_uLong SwNodeIndex::GetIndex() const
{
@@ -202,7 +199,6 @@ inline sal_uLong SwNodeIndex::operator--()
{
return ( pNd = GetNodes()[ pNd->GetIndex()-1 ] )->GetIndex();
}
-#ifndef CFRONT
inline sal_uLong SwNodeIndex::operator++(int)
{
sal_uLong nOldIndex = pNd->GetIndex();
@@ -215,7 +211,6 @@ inline sal_uLong SwNodeIndex::operator--(int)
pNd = GetNodes()[ nOldIndex - 1 ];
return nOldIndex;
}
-#endif
inline sal_uLong SwNodeIndex::operator+=( sal_uLong nWert )
{
@@ -241,3 +236,5 @@ inline SwNodeIndex& SwNodeIndex::operator=( sal_uLong nWert )
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx
index b61e46325bc5..70081fcac7ee 100644
--- a/sw/inc/ndnotxt.hxx
+++ b/sw/inc/ndnotxt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,30 +32,26 @@
class PolyPolygon;
-// --------------------
// SwNoTxtNode
-// --------------------
class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode
{
friend class SwNodes;
friend class SwNoTxtFrm;
-// String aAlternateText; // alternativer Text (HTML)
-
- PolyPolygon *pContour; // Polygon fuer Konturumlauf
+ PolyPolygon *pContour;
sal_Bool bAutomaticContour : 1; // automatic contour polygon, not manipulated
sal_Bool bContourMapModeValid : 1; // contour map mode is not the graphics's
// prefered map mode, but either
// MM100 or or pixel
sal_Bool bPixelContour : 1; // contour map mode is invalid and pixel.
- // erzeugt fuer alle Ableitungen einen AttrSet mit Bereichen
- // fuer Frame- und Grafik-Attributen (wird nur vom SwCntntNode gerufen)
+ // Creates for all derivations an AttrSet with ranges for frame- and
+ // graphics-attributes (only called by SwCntntNode).
virtual void NewAttrSet( SwAttrPool& );
- SwNoTxtNode( const SwNoTxtNode& ); //nicht erlaubt
- SwNoTxtNode &operator=( const SwNoTxtNode& ); //nicht erlaubt
+ SwNoTxtNode( const SwNoTxtNode& ); // Not allowed.
+ SwNoTxtNode &operator=( const SwNoTxtNode& ); // Not allowed.
protected:
SwNoTxtNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
@@ -79,10 +76,6 @@ public:
void SetDescription( const String& rDescription,
bool bBroadcast = false );
-// const String GetAlternateText() const;
-// void SetAlternateText( const String& rTxt,
-// sal_Bool bBroadcast=sal_False );
-
void SetContour( const PolyPolygon *pPoly,
sal_Bool bAutomatic = sal_False );
const PolyPolygon *HasContour() const;
@@ -104,11 +97,11 @@ public:
sal_Bool IsContourMapModeValid() const { return bContourMapModeValid; }
- //Besorgt die Graphic, mit SwapIn fuer GrfNode, per GetData fuer OLE.
+ // Obtains the graphic with SwapIn for GrfNode via GetData for OLE.
Graphic GetGraphic() const;
};
-// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
+// Inline methods from Node.hxx - we know TxtNode only here!!
inline SwNoTxtNode *SwNode::GetNoTxtNode()
{
return ND_NOTXTNODE & nNodeType ? (SwNoTxtNode*)this : 0;
@@ -119,3 +112,5 @@ inline const SwNoTxtNode *SwNode::GetNoTxtNode() const
}
#endif // _NDNOTXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index 0199d2e399bb..5291a6ae8757 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,12 +45,12 @@ class SW_DLLPUBLIC SwOLEObj
const SwOLENode* pOLENd;
SwOLEListener_Impl* pListener;
- //Entweder Ref oder Name sind bekannt, wenn nur der Name bekannt ist, wird
- //dir Ref bei Anforderung durch GetOleRef() vom Sfx besorgt.
+ // Either ref or name are known. If only name is known, ref is obtained
+ // on demand by GetOleRef() from Sfx.
svt::EmbeddedObjectRef xOLERef;
String aName;
- SwOLEObj( const SwOLEObj& rObj ); //nicht erlaubt.
+ SwOLEObj( const SwOLEObj& rObj ); // Not allowed.
SwOLEObj();
void SetNode( SwOLENode* pNode );
@@ -70,24 +71,22 @@ public:
const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef();
svt::EmbeddedObjectRef& GetObject();
const String& GetCurrentPersistName() const { return aName; }
- sal_Bool IsOleRef() const; //Damit das Objekt nicht unnoetig geladen werden muss.
+ sal_Bool IsOleRef() const; // To avoid unneccessary loading of object.
#endif
};
-// --------------------
+
// SwOLENode
-// --------------------
class SW_DLLPUBLIC SwOLENode: public SwNoTxtNode
{
friend class SwNodes;
mutable SwOLEObj aOLEObj;
Graphic* pGraphic;
- String sChartTblName; // bei Chart Objecten: Name der ref. Tabelle
- sal_Bool bOLESizeInvalid; //Soll beim SwDoc::PrtOLENotify beruecksichtig
- //werden (zum Beispiel kopiert). Ist nicht
- //Persistent.
+ String sChartTblName; // with chart objects: name of referenced table.
+ sal_Bool bOLESizeInvalid; // Should be considered at SwDoc::PrtOLENotify
+ // (e.g. copied). Is not persistent.
SwEmbedObjectLink* mpObjectLink;
String maLinkURL;
@@ -103,7 +102,7 @@ class SW_DLLPUBLIC SwOLENode: public SwNoTxtNode
SwGrfFmtColl *pGrfColl,
SwAttrSet* pAutoAttr = 0 );
- // aOLEObj besitzt einen privaten Copy-CTOR, wir brauchen auch einen:
+ // aOLEObj has a private Copy-Ctor. We need one too:
SwOLENode( const SwOLENode & );
using SwNoTxtNode::GetGraphic;
@@ -114,14 +113,14 @@ public:
~SwOLENode();
virtual SwCntntNode *SplitCntntNode( const SwPosition & );
- // steht in ndcopy.cxx
+
+ // Is in ndcopy.cxx.
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
virtual Size GetTwipSize() const;
Graphic* GetGraphic();
- Graphic* GetHCGraphic(); // tries to retrieve HighContrast representation if possible
void GetNewReplacement();
virtual sal_Bool SavePersistentData();
@@ -136,7 +135,7 @@ public:
sal_Int64 GetAspect() const { return aOLEObj.GetObject().GetViewAspect(); }
void SetAspect( sal_Int64 nAspect) { aOLEObj.GetObject().SetViewAspect( nAspect ); }
- // OLE-Object aus dem "Speicher" entfernen
+ // Remove OLE-object from "memory".
// inline void Unload() { aOLEObj.Unload(); }
String GetDescription() const { return aOLEObj.GetDescription(); }
@@ -146,9 +145,9 @@ public:
void CheckFileLink_Impl();
- // --> OD 2009-03-05 #i99665#
+ // #i99665#
bool IsChart() const;
- // <--
+
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
const String& GetChartTblName() const { return sChartTblName; }
@@ -157,7 +156,7 @@ public:
};
-// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
+// Inline methods from Node.hxx - we know TxtNode only here!!
inline SwOLENode *SwNode::GetOLENode()
{
return ND_OLENODE == nNodeType ? (SwOLENode*)this : 0;
@@ -168,3 +167,5 @@ inline const SwOLENode *SwNode::GetOLENode() const
}
#endif // _NDOLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 5ccaf0329f70..61838cf20a15 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,29 +31,23 @@
#include <cppuhelper/weakref.hxx>
#include "swdllapi.h"
-#include <error.h>
#include <node.hxx>
#include <hintids.hxx>
#include <ndhints.hxx>
-#include <errhdl.hxx>
#include <modeltoviewhelper.hxx>
#include <SwNumberTreeTypes.hxx>
#include <IDocumentContentOperations.hxx>
+#include <osl/diagnose.h>
#include <sfx2/Metadatable.hxx>
#include <vector>
#include <set>
-
class SwNumRule;
class SwNodeNum;
-// --> OD 2008-05-06 #refactorlists#
class SwList;
-// <--
-// --> OD 2008-12-02 #i96772#
class SvxLRSpaceItem;
-// <--
namespace utl {
class TransliterationWrapper;
@@ -60,15 +55,14 @@ namespace utl {
class SwTxtFmtColl;
class SwCntntFrm;
-class SwTxtFld; // Fuer GetTxtFld()
+class SwTxtFld; // For GetTxtFld().
class SfxItemSet;
class SwUndoTransliterate;
-
struct SwSpellArgs; // for Spell(), splargs.hxx
struct SwConversionArgs; // for Convert(), splargs.hxx
class SwInterHyphInfo; // for Hyphenate(), splargs.hxx
-class SwWrongList; // fuer OnlineSpelling
+class SwWrongList; // For OnlineSpelling.
class SwGrammarMarkUp;
class OutputDevice;
class SwScriptInfo;
@@ -84,25 +78,22 @@ namespace com { namespace sun { namespace star {
typedef std::set< xub_StrLen > SwSoftPageBreakList;
-// --------------------
// SwTxtNode
-// --------------------
class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
{
- // fuer das Erzeugen des ersten TextNode
- friend class SwDoc; // CTOR und AppendTxtNode()
+ // For creating the first TextNode.
+ friend class SwDoc; // CTOR and AppendTxtNode()
friend class SwNodes;
friend class SwTxtFrm;
friend class SwScriptInfo;
- //Kann 0 sein, nur dann nicht 0 wenn harte Attribute drin stehen.
- //Also niemals direkt zugreifen!
+ // May be 0. It is only then not 0 if it contains hard attributes.
+ // Therefore: never access directly!
SwpHints *m_pSwpHints;
- // --> OD 2005-11-02 #i51089 - TUNING#
- mutable SwNodeNum* mpNodeNum; // Numerierung fuer diesen Absatz
- // <--
+ mutable SwNodeNum* mpNodeNum; // Numbering for this paragraph.
+
XubString m_Text;
SwParaIdleData_Impl* m_pParaIdleData_Impl;
@@ -119,21 +110,16 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
bool m_bNotifiable;
// sal_uInt8 nOutlineLevel; //#outline level, removed by zhaojianwei.
- // --> OD 2008-11-19 #i70748#
bool mbEmptyListStyleSetDueToSetOutlineLevelAttr;
- // <--
- // --> OD 2008-03-27 #refactorlists#
// boolean, indicating that a <SetAttr(..)> or <ResetAttr(..)> or
// <ResetAllAttr(..)> method is running.
// Needed to avoid duplicate handling of attribute change actions.
bool mbInSetOrResetAttr;
- // <--
- // --> OD 2008-05-06 #refactorlists#
+
// pointer to the list, to whose the text node is added to
SwList* mpList;
- // <--
- /// #i111677# cached expansion (for clipboard)
+
::std::auto_ptr< ::rtl::OUString > m_pNumStringCache;
::com::sun::star::uno::WeakReference<
@@ -142,7 +128,7 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
SW_DLLPRIVATE SwTxtNode( const SwNodeIndex &rWhere, SwTxtFmtColl *pTxtColl,
const SfxItemSet* pAutoAttr = 0 );
- // Kopiert die Attribute an nStart nach pDest.
+ // Copies the attributes at nStart to pDest.
SW_DLLPRIVATE void CopyAttr( SwTxtNode *pDest, const xub_StrLen nStart, const xub_StrLen nOldPos);
SW_DLLPRIVATE SwTxtNode* _MakeNewTxtNode( const SwNodeIndex&, sal_Bool bNext = sal_True,
@@ -153,10 +139,10 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
const SwIndex & rStart, /*const*/ xub_StrLen nLen,
const bool bUpdate = true );
- // Verlagere alles umfassende harte Attribute in den AttrSet des Absatzes
- SW_DLLPRIVATE void MoveTxtAttr_To_AttrSet(); // wird von SplitNode gerufen.
+ // Move all comprising hard attributes to the AttrSet of the paragraph.
+ SW_DLLPRIVATE void MoveTxtAttr_To_AttrSet(); // Called by SplitNode.
- // lege den spz. AttrSet an
+ // Create the specific AttrSet.
SW_DLLPRIVATE virtual void NewAttrSet( SwAttrPool& );
SW_DLLPRIVATE void Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
@@ -188,13 +174,12 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
SW_DLLPRIVATE sal_uLong GetParaNumberOfWords() const;
SW_DLLPRIVATE void SetParaNumberOfChars( sal_uLong nTmpChars ) const;
SW_DLLPRIVATE sal_uLong GetParaNumberOfChars() const;
+ SW_DLLPRIVATE void SetParaNumberOfCharsExcludingSpaces( sal_uLong nTmpChars ) const;
+ SW_DLLPRIVATE sal_uLong GetParaNumberOfCharsExcludingSpaces() const;
SW_DLLPRIVATE void InitSwParaStatistics( bool bNew );
/** create number for this text node, if not already existing
- OD 2005-11-02 #i51089 - TUNING#
- OD 2007-10-26 #i83479# - made private
-
@return number of this node
*/
SwNodeNum* CreateNum() const;
@@ -216,9 +201,7 @@ public:
void SetAutoCompleteWordDirty( bool bNew ) const;
void SetWrong( SwWrongList* pNew, bool bDelete = true );
SwWrongList* GetWrong();
- // --> OD 2008-05-23 #i71360#
const SwWrongList* GetWrong() const;
- // <--
void SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete = true );
SwGrammarMarkUp* GetGrammarCheck();
// SMARTTAGS
@@ -246,18 +229,16 @@ public:
virtual xub_StrLen Len() const;
- // steht in itratr
+ // Is in itratr.
void GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs,
OutputDevice* pOut = 0 ) const;
- // --> OD 2008-03-13 #refactorlists#
// overriding to handle change of certain paragraph attributes
virtual sal_Bool SetAttr( const SfxPoolItem& );
virtual sal_Bool SetAttr( const SfxItemSet& rSet );
virtual sal_Bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
virtual sal_Bool ResetAttr( const SvUShorts& rWhichArr );
virtual sal_uInt16 ResetAllAttr();
- // <--
/// insert text content
void InsertText( const XubString & rStr, const SwIndex & rIdx,
@@ -287,10 +268,10 @@ public:
const SfxItemSet* pSet = 0, sal_Bool bInclRefToxMark = sal_False );
void GCAttr();
- // loesche das Text-Attribut (muss beim Pool abgemeldet werden!)
+ // Delete text attribute (needs to be deregistered at Pool!)
void DestroyAttr( SwTxtAttr* pAttr );
- // loesche alle Attribute aus dem SwpHintsArray.
+ // delete all attributes from SwpHintsArray.
void ClearSwpHintsArr( bool bDelFields );
/// Insert pAttr into hints array. @return true iff inserted successfully
@@ -302,13 +283,12 @@ public:
const xub_StrLen nStart, const xub_StrLen nEnd,
const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
- // setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt,
- // dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr)
+ // Set these attributes at TextNode. If the whole range is comprised
+ // set them only in AutoAttrSet (SwCntntNode::SetAttr).
sal_Bool SetAttr( const SfxItemSet& rSet,
xub_StrLen nStt, xub_StrLen nEnd,
const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
- // erfrage die Attribute vom TextNode ueber den Bereich
- // --> OD 2008-01-16 #newlistlevelattrs#
+ // Query the attributes of textnode over the range.
// Introduce 4th optional parameter <bMergeIndentValuesOfNumRule>.
// If <bMergeIndentValuesOfNumRule> == sal_True, the indent attributes of
// the corresponding list level of an applied list style is merged into
@@ -319,9 +299,8 @@ public:
sal_Bool bOnlyTxtAttr = sal_False,
sal_Bool bGetFromChrFmt = sal_True,
const bool bMergeIndentValuesOfNumRule = false ) const;
- // <--
- // uebertrage Attribute eines AttrSets ( AutoFmt ) in das SwpHintsArray
+ // Convey attributes of an AttrSet (AutoFmt) to SwpHintsArray.
void FmtToTxtAttr( SwTxtNode* pNd );
/// delete all attributes of type nWhich at nStart (opt. end nEnd)
@@ -330,8 +309,7 @@ public:
/// delete the attribute pTxtAttr
void DeleteAttribute ( SwTxtAttr * const pTxtAttr );
- // Aktionen auf Text und Attributen
- // --> OD 2008-11-18 #i96213#
+ // Actions on text and attributes.
// introduce optional parameter to control, if all attributes have to be copied.
void CopyText( SwTxtNode * const pDest,
const SwIndex &rStart,
@@ -342,7 +320,6 @@ public:
const SwIndex &rStart,
xub_StrLen nLen,
const bool bForceCopyOfAllAttrs = false );
- // <--
void CutText(SwTxtNode * const pDest,
const SwIndex & rStart, const xub_StrLen nLen);
@@ -355,7 +332,7 @@ public:
void ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen, const XubString& rText,
const ::com::sun::star::uno::Sequence<sal_Int32>& rOffsets );
- // virtuelle Methoden aus dem CntntNode
+ // Virtual methods from CntntNode.
virtual SwCntntFrm *MakeFrm();
virtual SwCntntNode *SplitCntntNode( const SwPosition & );
virtual SwCntntNode *JoinNext();
@@ -363,7 +340,7 @@ public:
SwCntntNode *AppendNode( const SwPosition & );
- // setze ggf. das DontExpand-Flag an INet bzw. Zeichenvorlagen
+ // When appropriate set DontExpand-flag at INet or character styles respectively.
sal_Bool DontExpandFmt( const SwIndex& rIdx, bool bFlag = true,
sal_Bool bFmtToTxtAttributes = sal_True );
@@ -402,7 +379,6 @@ public:
SwTxtAttr *GetTxtAttrForCharAt( const xub_StrLen nIndex,
const RES_TXTATR nWhich = RES_TXTATR_END ) const;
- // Aktuelles Wort zurueckliefern
XubString GetCurWord(xub_StrLen) const;
sal_uInt16 Spell(SwSpellArgs*);
sal_uInt16 Convert( SwConversionArgs & );
@@ -412,9 +388,9 @@ public:
void _ChgTxtCollUpdateNum( const SwTxtFmtColl* pOld,
const SwTxtFmtColl* pNew );
- // kopiere die Collection mit allen Autoformaten zum Dest-Node
- // dieser kann auch in einem anderen Dokument stehen!
- // (Methode steht im ndcopy.cxx!!)
+ // Copy collection with all auto formats to dest-node.
+ // The latter might be in an other document!
+ // (Method in ndcopy.cxx!!).
void CopyCollFmt( SwTxtNode& rDestNd );
//const SwNodeNum* _GetNodeNum() const { return pNdNum; }
@@ -451,9 +427,7 @@ public:
void UpdateOutlineState();
- /** -> #i23730#
-
- Returns if this text node may be numbered.
+ /** Returns if this text node may be numbered.
A text node may be numbered if
- it has no SwNodeNum
@@ -472,7 +446,6 @@ public:
/** Returns outline of numbering string
- OD 2005-11-17 #128041#
Introduce parameter <_bInclPrefixAndSuffixStrings> in order to control,
if the prefix and the suffix strings have to been included or not.
@@ -508,17 +481,12 @@ public:
*/
sal_Bool GetFirstLineOfsWithNum( short& rFirstOffset ) const;
- // --> OD 2010-01-05 #b6884103#
SwTwips GetAdditionalIndentForStartingNewList() const;
- // <--
- // --> OD 2008-12-02 #i96772#
void ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpaceItem ) const;
- // <--
/** return left margin for tab stop position calculation
- OD 2008-06-30 #i91133#
Needed for text formatting
Method considers new list level attributes, which also can provide a left margin value
@@ -526,8 +494,7 @@ public:
*/
long GetLeftMarginForTabCalculation() const;
- /** -> #i29560
- Returns if this text node has a number.
+ /** Returns if this text node has a number.
This text node has a number if it has a SwNodeNum and a
numbering rule and the numbering format specified for the
@@ -538,8 +505,7 @@ public:
*/
sal_Bool HasNumber() const;
- /** -> #i29560
- Returns if this text node has a bullet.
+ /** Returns if this text node has a bullet.
This text node has a bullet if it has a SwNodeNum and a
numbering rule and the numbering format specified for the
@@ -550,8 +516,7 @@ public:
*/
sal_Bool HasBullet() const;
- /** -> #i27615#
- Returns is this text node is numbered.
+ /** Returns is this text node is numbered.
This node is numbered if it has a SwNodeNum and it has a
numbering rule and has not a hidden SwNodeNum.
@@ -564,8 +529,7 @@ public:
*/
sal_Bool IsNumbered() const;
- /** -> #i27615#
- Returns if this text node has a marked label.
+ /** Returns if this text node has a marked label.
@retval true This text node has a marked label.
@retval false else
@@ -628,14 +592,11 @@ public:
NOTE: This is subject to change, see GetOutlineLevel.
*/
- //void SetOutlineLevel(int nLevel);
- void SetAttrOutlineLevel(int nLevel);//#OutlineLevel,added by zhaojianwei
+ void SetAttrOutlineLevel(int nLevel);//#OutlineLevel,added by zhaojianwei
- // --> OD 2008-11-19 #i70748#
bool IsEmptyListStyleDueToSetOutlineLevelAttr();
void SetEmptyListStyleDueToSetOutlineLevelAttr();
void ResetEmptyListStyleDueToResetOutlineLevelAttr();
- // <--
/**
Returns the width of leading tabs/blanks in this paragraph.
@@ -646,7 +607,6 @@ public:
*/
sal_uInt16 GetWidthOfLeadingTabs() const;
-
/**
Returns if the paragraph has a visible numbering or bullet.
This includes all kinds of numbering/bullet/outlines.
@@ -657,15 +617,12 @@ public:
*/
bool HasVisibleNumberingOrBullet() const;
- // --> OD 2008-02-19 #refactorlists#
void SetListId( const String sListId );
String GetListId() const;
- // <--
/** Determines, if the list level indent attributes can be applied to the
paragraph.
- OD 2008-01-17 #newlistlevelattrs#
The list level indents can be applied to the paragraph under the one
of following conditions:
- the list style is directly applied to the paragraph and the paragraph
@@ -684,8 +641,6 @@ public:
/** Retrieves the list tab stop position, if the paragraph's list level defines
one and this list tab stop has to merged into the tap stops of the paragraph
- OD 2008-01-17 #newlistlevelattrs#
-
@author OD
@param nListTabStopPosition
@@ -698,8 +653,6 @@ public:
/** Retrieves the character following the list label, if the paragraph's
list level defines one.
- OD 2008-01-17 #newlistlevelattrs#
-
@author OD
@return XubString - the list tab stop position
@@ -715,15 +668,14 @@ public:
sal_uInt16 GetLang( const xub_StrLen nBegin, const xub_StrLen nLen = 0,
sal_uInt16 nScript = 0 ) const;
- // steht in ndcopy.cxx
- sal_Bool IsSymbol( const xub_StrLen nBegin ) const; // steht in itratr.cxx
+ // in ndcopy.cxx
+ sal_Bool IsSymbol( const xub_StrLen nBegin ) const; // In itratr.cxx.
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
- // interaktive Trennung: wir finden den TxtFrm und rufen sein CalcHyph
+ // Interactive hyphenation: we find TxtFrm and call its CalcHyph.
sal_Bool Hyphenate( SwInterHyphInfo &rHyphInf );
void DelSoftHyph( const xub_StrLen nStart, const xub_StrLen nEnd );
- // --> OD 2007-11-15 #i83479#
// add 4th optional parameter <bAddSpaceAfterListLabelStr> indicating,
// when <bWithNum = true> that a space is inserted after the string for
// the list label.
@@ -735,15 +687,11 @@ public:
const bool bWithNum = false,
const bool bAddSpaceAfterListLabelStr = false,
const bool bWithSpacesForLevel = false ) const;
- // <--
sal_Bool GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx = 0,
xub_StrLen nIdx = 0, xub_StrLen nLen = STRING_LEN,
sal_Bool bWithNum = sal_False, sal_Bool bWithFtn = sal_True,
sal_Bool bReplaceTabsWithSpaces = sal_False ) const;
- /*
- *
- */
const ModelToViewHelper::ConversionMap*
BuildConversionMap( rtl::OUString& rExpandText ) const;
@@ -751,8 +699,9 @@ public:
xub_StrLen nLen = STRING_LEN,
sal_Bool bExpandFlds = sal_False,
sal_Bool bWithNum = sal_False ) const;
- //Liefert fuer die Initalfunktion tatsaechliche Anzahl der Initialzeichen
- //bei nWishLen == 0 die des ersten Wortes
+
+ // Returns actual count of initial chars for initial-function.
+ // If nWishLen == 0 that of first word.
sal_uInt16 GetDropLen( sal_uInt16 nWishLen) const;
// Passes back info needed on the dropcap dimensions
@@ -782,7 +731,6 @@ public:
inline void SetCalcHiddenCharFlags() const
{ m_bRecalcHiddenCharFlags = true; }
-// --> FME 2004-06-08 #i12836# enhanced pdf
//
// Returns if the node is hidden due to
// 1. HiddenParaField
@@ -790,11 +738,10 @@ public:
// 3. HiddenSection
//
bool IsHidden() const;
-// <--
TYPEINFO(); // fuer rtti
- // fuers Umhaengen der TxtFmtCollections (Outline-Nummerierung!!)
+ // For re-arranging TxtFmtCollections (outline-numbering!!).
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
// override SwIndexReg
@@ -817,9 +764,7 @@ public:
bool IsNotifiable() const;
void SetListRestart( bool bRestart );
- // --> OD 2005-11-02 #i51089 - TUNING#
bool IsListRestart() const;
- // <--
void SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNum );
bool HasAttrListRestartValue() const;
@@ -829,13 +774,9 @@ public:
void SetCountedInList( bool bCounted );
bool IsCountedInList() const;
- // --> OD 2008-03-13 #refactorlists#
-// void SyncNumberAndNumRule();
-// void UnregisterNumber();
void AddToList();
void RemoveFromList();
bool IsInList() const;
- // <--
bool IsFirstOfNumRule() const;
@@ -856,6 +797,8 @@ public:
virtual ::com::sun::star::uno::Reference<
::com::sun::star::rdf::XMetadatable > MakeUnoObject();
+ bool IsCollapse() const;
+
DECL_FIXEDMEMPOOL_NEWDEL(SwTxtNode)
};
@@ -863,12 +806,12 @@ public:
inline SwpHints & SwTxtNode::GetSwpHints()
{
- ASSERT_ID( m_pSwpHints, ERR_NOHINTS);
+ OSL_ASSERT( m_pSwpHints );
return *m_pSwpHints;
}
inline const SwpHints &SwTxtNode::GetSwpHints() const
{
- ASSERT_ID( m_pSwpHints, ERR_NOHINTS);
+ OSL_ASSERT( m_pSwpHints );
return *m_pSwpHints;
}
@@ -894,9 +837,9 @@ inline SwTxtFmtColl* SwTxtNode::GetTxtColl() const
return static_cast<SwTxtFmtColl*>(const_cast<SwModify*>(GetRegisteredIn()));
}
-// fuer den IBM-Compiler nicht inlinen wg. 42876
+// For IBM-Compiler do not inline this because of 42876
#ifndef ICC
-// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
+// Inline methods from Node.hxx - we know TxtNode only now!!
inline SwTxtNode *SwNode::GetTxtNode()
{
return ND_TEXTNODE == nNodeType ? static_cast<SwTxtNode*>(this) : 0;
@@ -915,3 +858,5 @@ SwTxtNode::CutText(SwTxtNode * const pDest, const SwIndex & rDestStart,
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ndtyp.hxx b/sw/inc/ndtyp.hxx
index 6fb429980703..9b37b350afa5 100644
--- a/sw/inc/ndtyp.hxx
+++ b/sw/inc/ndtyp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,8 +31,8 @@
#include <tools/solar.h>
-// Ids fuer die verschiedenden Nodes; in der Basisklasse steht der Member,
-// der angibt, um was fuer einen es sich handelt
+// IDs for different nodes. The member indicating the type of node is
+// in base class.
const sal_uInt8 ND_ENDNODE = 0x01;
const sal_uInt8 ND_STARTNODE = 0x02;
const sal_uInt8 ND_TABLENODE = 0x06;
@@ -39,15 +40,15 @@ const sal_uInt8 ND_TEXTNODE = 0x08;
const sal_uInt8 ND_GRFNODE = 0x10;
const sal_uInt8 ND_OLENODE = 0x20;
-const sal_uInt8 ND_CONTENTNODE = 0x38; // ContentNode (eines von den 3 Bits)
-const sal_uInt8 ND_NOTXTNODE = 0x30; // NoTxtNode (eines von den 2 Bits)
+const sal_uInt8 ND_CONTENTNODE = 0x38; // ContentNode (one of the 3 bits).
+const sal_uInt8 ND_NOTXTNODE = 0x30; // NoTxtNode (one of the 2 bits).
const sal_uInt8 ND_SECTIONNODE = 0x42;
-// nur fuer internen Gebrauch!!
+// For internal use only!!
const sal_uInt8 ND_SECTIONDUMMY = 0x40; //(ND_SECTIONNODE & ~ND_STARTNODE);
-// spezielle Types der StartNodes, die keine Ableitungen sind, aber
-// "Bereiche" zusammenhalten.
+// Special types of StartNodes that are not derivations but keep
+// "sections" together.
enum SwStartNodeType
{
SwNormalStartNode = 0,
@@ -67,3 +68,5 @@ const sal_uInt8 ND_HAS_NEXT_LAYNODE = 0x02;
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/newhdl.hxx b/sw/inc/newhdl.hxx
index 574dc3f9167a..8391f9a31f21 100644
--- a/sw/inc/newhdl.hxx
+++ b/sw/inc/newhdl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,8 +30,6 @@
#include <tools/link.hxx>
-#include "errhdl.hxx" // hier kommt auch swtypes rein, was ich brauche
-
// ----------------------------------------------------------------------------
extern void SW_NEW_HDL();
@@ -71,3 +70,4 @@ inline void SwNewHdl::SetErrLnk( const Link &rLink )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 9ee05188898c..f666b70d7536 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,7 +44,7 @@
#include <fmtcol.hxx>
// ---------------------
-// forward Deklarationen
+// forward declarations
// ---------------------
class SvUShorts;
@@ -81,9 +82,7 @@ class IDocumentLineNumberAccess;
class IDocumentLinksAdministration;
class IDocumentFieldsAccess;
class IDocumentContentOperations;
-// --> OD 2007-10-31 #i83479#
class IDocumentListItems;
-// <--
// --------------------
// class SwNode
@@ -92,18 +91,16 @@ class SW_DLLPUBLIC SwNode : private /* public*/ BigPtrEntry
{
friend class SwNodes;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
static long nSerial;
long nMySerial;
#endif
sal_uInt8 nNodeType;
- // JP 28.03.96
- // fuer Textnodes: Stufungslevel der Autoformatierung. Ist erstmal hier
- // gelandet, weil noch Bits frei sind
+ // For text nodes: level of auto format. Was put here because we had still free bits.
sal_uInt8 nAFmtNumLvl : 3;
- sal_Bool bSetNumLSpace : 1; // fuer Numerierung: sal_True Einzug setzen
+ sal_Bool bSetNumLSpace : 1; // For numbering: TRUE: set indent.
sal_Bool bIgnoreDontExpand : 1; // for Text Attributes - ignore the flag
protected:
@@ -111,13 +108,13 @@ protected:
SwNode( const SwNodeIndex &rWhere, const sal_uInt8 nNodeId );
- // fuer den initialen StartNode
+ // for the initial StartNode
SwNode( SwNodes& rNodes, sal_uLong nPos, const sal_uInt8 nNodeId );
public:
virtual ~SwNode();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
long int GetSerial() const { return nMySerial; }
#endif
@@ -186,13 +183,13 @@ public:
*/
sal_Bool IsInRedlines() const;
- // suche den TabellenNode, in dem dieser steht. Wenn in keiner
- // Tabelle wird 0 returnt.
+ // Search table node, in which it is. If it is in no table
+ // return 0.
SwTableNode *FindTableNode();
inline const SwTableNode *FindTableNode() const;
- // suche den SectionNode, in dem dieser steht. Wenn es in keiner
- // Section steht wird 0 returnt.
+ // Search section node, in which it is. If it is in no section
+ // return 0.
SwSectionNode *FindSectionNode();
inline const SwSectionNode *FindSectionNode() const;
@@ -210,7 +207,7 @@ public:
const SwStartNode* FindFooterStartNode() const
{ return FindSttNodeByType( SwFooterStartNode ); }
- // in welchem Nodes-Array/Doc steht der Node ?
+ // Node is in which nodes-array/doc?
inline SwNodes& GetNodes();
inline const SwNodes& GetNodes() const;
inline SwDoc* GetDoc();
@@ -269,32 +266,27 @@ public:
/** Provides access to the document's numbered items interface
- OD 2007-10-31 #i83479#
-
@author OD
*/
IDocumentListItems& getIDocumentListItems();
- // liegt der Node im Sichtbarenbereich der Shell ?
+ // Is node in the visible area of the Shell?
sal_Bool IsInVisibleArea( ViewShell* pSh = 0 ) const;
- // befindet sich der Node in einem geschuetzten Bereich?
+ // Is node in an protected area?
sal_Bool IsInProtectSect() const;
- // befindet sich der Node in irgendetwas geschuetzten ?
- // (Bereich/Rahmen/Tabellenzellen/... incl. des Ankers bei
- // Rahmen/Fussnoten/..)
+ // Is node in something that is protected (range, frame,
+ // table cells ... including anchor in case of frames or footnotes)?
sal_Bool IsProtect() const;
- // suche den PageDesc, mit dem dieser Node formatiert ist. Wenn das
- // Layout vorhanden ist wird ueber das gesucht, ansonsten gibt es nur
- // die harte Tour ueber die Nodes nach vorne suchen!!
- // OD 18.03.2003 #106326#
+
+ // Search PageDesc with which this node is formated. If layout is existent
+ // search over layout, else only the hard way is left: search over the nodes
+ // to the front!!
const SwPageDesc* FindPageDesc( sal_Bool bCalcLay, sal_uInt32* pPgDescNdIdx = 0 ) const;
- // falls der Node in einem Fly steht, dann wird das entsprechende Format
- // returnt
+ // If node is in a fly return the respective format.
SwFrmFmt* GetFlyFmt() const;
- // falls der Node in einer Tabelle steht, dann wird die entsprechende
- // TabellenBox returnt
+ // If node is in a table return the respective table box.
SwTableBox* GetTblBox() const;
inline sal_uLong GetIndex() const { return GetPos(); }
@@ -304,7 +296,7 @@ public:
sal_uInt8 HasPrevNextLayNode() const;
private:
- // privater Constructor, weil nie kopiert werden darf !!
+ // Private constructor because copying is never allowed!!
SwNode( const SwNode & rNodes );
SwNode & operator= ( const SwNode & rNodes );
};
@@ -316,12 +308,12 @@ class SwStartNode: public SwNode
{
friend class SwNode;
friend class SwNodes;
- friend class SwEndNode; // um theEndOfSection zu setzen !!
+ friend class SwEndNode; // to set the theEndOfSection !!
SwEndNode* pEndOfSection;
SwStartNodeType eSttNdTyp;
- // fuer den initialen StartNode
+ // for the initial StartNode
SwStartNode( SwNodes& rNodes, sal_uLong nPos );
protected:
@@ -333,11 +325,11 @@ public:
SwStartNodeType GetStartNodeType() const { return eSttNdTyp; }
- // an alle ContentNodes der Section das ChkCondColl rufen
+ // Call ChkCondcoll to all ContentNodes of section.
void CheckSectionCondColl() const;
private:
- // privater Constructor, weil nie kopiert werden darf !!
+ // Private constructor because copying is never allowed!!
SwStartNode( const SwStartNode & rNode );
SwStartNode & operator= ( const SwStartNode & rNode );
};
@@ -349,10 +341,10 @@ private:
class SwEndNode : public SwNode
{
friend class SwNodes;
- friend class SwTableNode; // um seinen EndNode anlegen zukoennen
- friend class SwSectionNode; // um seinen EndNode anlegen zukoennen
+ friend class SwTableNode; // To enable creation of its EndNote.
+ friend class SwSectionNode; // To enable creation of its EndNote.
- // fuer den initialen StartNode
+ // for the initial StartNode
SwEndNode( SwNodes& rNodes, sal_uLong nPos, SwStartNode& rSttNd );
protected:
@@ -361,7 +353,7 @@ protected:
DECL_FIXEDMEMPOOL_NEWDEL(SwEndNode)
private:
- // privater Constructor, weil nie kopiert werden darf !!
+ // Private constructor because copying is never allowed!!
SwEndNode( const SwEndNode & rNode );
SwEndNode & operator= ( const SwEndNode & rNode );
};
@@ -372,9 +364,6 @@ private:
// --------------------
class SW_DLLPUBLIC SwCntntNode: public SwModify, public SwNode, public SwIndexReg
{
- // Der Reader darf NewAttrSet() aufrufen!
-// friend class SwSwgReader;
-// friend class Sw3IoImp;
//FEATURE::CONDCOLL
SwDepend* pCondColl;
@@ -386,11 +375,11 @@ protected:
SwFmtColl *pFmtColl );
virtual ~SwCntntNode();
- // Attribut-Set fuer alle AUTO-Attribute eines CntntNodes
- // ( z.B: TxtNode oder NoTxtNode
+ // Attribute-set for all auto attributes of a CntntNode.
+ // (e.g. TxtNode or NoTxtNode).
boost::shared_ptr<const SfxItemSet> mpAttrSet;
- // lasse von den entsprechenden Nodes die spz. AttrSets anlegen
+ // Make respective nodes create the specific AttrSets.
virtual void NewAttrSet( SwAttrPool& ) = 0;
// There some functions that like to remove items from the internal
@@ -398,7 +387,7 @@ protected:
sal_uInt16 ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rWhichIds );
public:
- TYPEINFO(); //Bereits in Basisklasse Client drin.
+ TYPEINFO(); //Already contained in base class Client.
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
@@ -406,8 +395,8 @@ public:
virtual SwCntntNode *SplitCntntNode(const SwPosition & ) = 0;
virtual SwCntntNode *JoinNext();
virtual SwCntntNode *JoinPrev();
- // koennen 2 Nodes zusammengefasst werden ?
- // in pIdx kann die 2. Position returnt werden.
+ // Is it possible to join two nodes?
+ // In pIdx the second position can be returned.
int CanJoinNext( SwNodeIndex* pIdx =0 ) const;
int CanJoinPrev( SwNodeIndex* pIdx =0 ) const;
@@ -420,58 +409,49 @@ public:
SwCntntFrm *GetFrm( const Point* pDocPos = 0,
const SwPosition *pPos = 0,
const sal_Bool bCalcFrm = sal_True ) const;
- // Gibt die tatsaechlcheGroesse des Frames zurueck bzw. ein leeres
- // Rechteck, wenn kein Layout existiert.
- // Wird fuer die Export Filter benoetigt.
+ // Returns the real size of the frame or an empty rectangle if
+ // no layout exists. Needed for export filters.
SwRect FindLayoutRect( const sal_Bool bPrtArea = sal_False,
const Point* pPoint = 0,
const sal_Bool bCalcFrm = sal_False ) const;
SwRect FindPageFrmRect( const sal_Bool bPrtArea = sal_False,
const Point* pPoint = 0,
const sal_Bool bCalcFrm = sal_False ) const;
- /*
- * Methode erzeugt fuer den angegebenen Node alle Ansichten vom
- * Dokument. Die erzeugten Contentframes werden in das entsprechende
- * Layout gehaengt.
- */
+
+ // Method creates all views of document for given node. The content
+ // frames that are created are put in the respective layout.
void MakeFrms( SwCntntNode& rNode );
- /*
- * Methode loescht fuer den Node alle Ansichten vom
- * Dokument. Die Contentframes werden aus dem entsprechenden
- * Layout ausgehaengt.
- */
+
+ // Method deletes all vies of document for the node. The content-
+ // frames are removed from the respective layout.
void DelFrms();
- /*
- * liefert die Anzahl der Elemente des Inhalts des Nodes;
- * Default ist 1, Unterschiede gibt es beim TextNode und beim
- * Formelnode.
- */
+ // Returns count of elements of node content. Default is 1.
+ // There are differences between text node and formula node.
virtual xub_StrLen Len() const;
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const = 0;
- // erfrage vom Client Informationen
+
+ // Get information from Client.
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
- // SS fuer die PoolItems: (Harte-(Fmt)Attrbutierung)
+ // SS for PoolItems: hard attributation.
- // Ist bInParent sal_False, wird nur in diesem Node nach dem Attribut gesucht.
+ // If bInParent is FALSE search for attribute only in this node.
const SfxPoolItem& GetAttr( sal_uInt16 nWhich, sal_Bool bInParent=sal_True ) const;
sal_Bool GetAttr( SfxItemSet& rSet, sal_Bool bInParent=sal_True ) const;
- // --> OD 2008-03-13 #refactorlists#
// made virtual
virtual sal_Bool SetAttr( const SfxPoolItem& );
virtual sal_Bool SetAttr( const SfxItemSet& rSet );
virtual sal_Bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
virtual sal_Bool ResetAttr( const SvUShorts& rWhichArr );
virtual sal_uInt16 ResetAllAttr();
- // <--
- // liefert das Attribut, das nicht ueber die bedingte Vorlage kommt!
+ // Obtains attribute that is not delivered via conditional style!
const SfxPoolItem* GetNoCondAttr( sal_uInt16 nWhich, sal_Bool bInParents ) const;
- // hat der Node schon eigene Auto-Attribute ?
- // Zugriff auf SwAttrSet
+ // Does node has already its own auto-attributes?
+ // Access to SwAttrSet.
inline const SwAttrSet &GetSwAttrSet() const;
inline const SwAttrSet *GetpSwAttrSet() const { return static_cast<const SwAttrSet*>(mpAttrSet.get()); }
inline sal_Bool HasSwAttrSet() const { return mpAttrSet ? sal_True : sal_False; }
@@ -488,21 +468,20 @@ public:
void ChkCondColl();
//FEATURE::CONDCOLL
- // invalidiert die am Node gesetzte NumRule. Diese wird
- // spaetestend in EndAction einer Shell geupdatet
+ // Invalidates NumRule at the node. NumRule is updated
+ // on EndAction of a Shell at the latest.
sal_Bool InvalidateNumRule();
- // --> OD 2005-02-21 #i42921# - determines the text direction for a certain
+ // determines the text direction for a certain
// position. Return -1, if text direction could *not* be determined.
short GetTextDirection( const SwPosition& rPos,
const Point* pPt ) const;
- // <--
inline void SetModifyAtAttr( bool bSetModifyAtAttr ) const { mbSetModifyAtAttr = bSetModifyAtAttr; }
inline bool GetModifyAtAttr() const { return mbSetModifyAtAttr; }
private:
- // privater Constructor, weil nie kopiert werden darf !!
+ // Private constructor because copying is never allowed!!
SwCntntNode( const SwCntntNode & rNode );
SwCntntNode & operator= ( const SwCntntNode & rNode );
@@ -527,24 +506,22 @@ public:
SwTable& GetTable() { return *pTable; }
SwTabFrm *MakeFrm();
- //Legt die Frms fuer den TableNode (also die TabFrms) an.
+ // Creates the frms for the table node (i.e. the TabFrms).
void MakeFrms( SwNodeIndex* pIdxBehind );
- //Methode loescht fuer den Node alle Ansichten vom
- //Dokument. Die Contentframes werden aus dem entsprechenden
- //Layout ausgehaengt.
+ // Method deletes all views of document for the node.
+ // The content frames are removed from the respective layout.
void DelFrms();
- //Methode erzeugt fuer den vorhergehenden Node alle Ansichten vom
- //Dokument. Die erzeugten Contentframes werden in das entsprechende
- //Layout gehaengt.
+ // Method creates all views of the document for the previous node.
+ // The content frames that are created are put into the respective layout.
void MakeFrms( const SwNodeIndex & rIdx );
SwTableNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
void SetNewTable( SwTable* , sal_Bool bNewFrames=sal_True );
private:
- // privater Constructor, weil nie kopiert werden darf !!
+ // Private constructor because copying is never allowed!!
SwTableNode( const SwTableNode & rNode );
SwTableNode & operator= ( const SwTableNode & rNode );
};
@@ -574,36 +551,36 @@ public:
SwFrm *MakeFrm();
- //Legt die Frms fuer den SectionNode (also die SectionFrms) an.
- //Im Defaultfall wird bis die Frames bis zum Ende des Bereichs angelegt,
- //uebergibt man einen weiteren NodeIndex pEnd, so wird bis zu diesem
- //ein MakeFrms gerufen, genutzt wird dies von TableToText
+ // Creates the frms for the SectionNode (i.e. the SectionFrms).
+ // On default the frames are created until the end of the range.
+ // When another NodeIndex pEnd is passed a MakeFrms is called up to it.
+ // Used by TableToText.
void MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEnd = NULL );
- //Methode loescht fuer den Node alle Ansichten vom
- //Dokument. Die Contentframes werden aus dem entsprechenden
- //Layout ausgehaengt.
+ // Method deletes all views of document for the node. The
+ // content frames are removed from the respective layout.
void DelFrms();
- //Methode erzeugt fuer den vorhergehenden Node alle Ansichten vom
- //Dokument. Die erzeugten Contentframes werden in das entsprechende
- //Layout gehaengt.
+ // Method creates all views of document for the previous node.
+ // The content frames created are put into the respective layout.
void MakeFrms( const SwNodeIndex & rIdx );
SwSectionNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
- // setze den Verweis im Format der Section auf sich selbst
+ // Set pointer in format of section on itself.
void NodesArrChgd();
// ueberprueft bei _nicht_ versteckten Bereichen, ob es Inhalt gibt, der
// _nicht_ in einem versteckten (Unter-)Bereich liegt
+ // Check for not hidden areas whether there is content that is not in
+ // a hidden sub-area.
sal_Bool IsCntntHidden() const;
+
};
-// ---------------------- einige inline Methoden ----------------------
inline SwEndNode *SwNode::GetEndNode()
{
return ND_ENDNODE == nNodeType ? (SwEndNode*)this : 0;
@@ -759,3 +736,5 @@ inline const SfxPoolItem& SwCntntNode::GetAttr( sal_uInt16 nWhich,
return GetSwAttrSet().Get( nWhich, bInParents );
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index d1125a0f4130..beb6b1fe8e5c 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,22 +36,14 @@
#include "swdllapi.h"
#include <swtypes.hxx>
#include <calbck.hxx>
-#include <errhdl.hxx> // Fuer die inline-ASSERTs
-#include <error.h> // Fuer die inline-ASSERTs
#include <hints.hxx>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <stringhash.hxx>
-// --> OD 2008-02-21 #refactorlists#
class SwNodeNum;
#include <SwNumberTreeTypes.hxx>
-// <--
-// --> OD 2008-02-19 #refactorlists#
#include <vector>
class SwTxtFmtColl;
-// <--
-// --> OD 2008-07-08 #i91400#
class IDocumentListsAccess;
-// <--
class Font;
class SvxBrushItem;
@@ -60,7 +53,7 @@ class SwDoc;
class SwFmtVertOrient;
class SwTxtNode;
-const sal_Unicode cBulletChar = 0x2022; // Charakter fuer Aufzaehlungen
+const sal_Unicode cBulletChar = 0x2022; // Character for lists.
class SW_DLLPUBLIC SwNumFmt : public SvxNumberFormat, public SwClient
{
@@ -105,74 +98,54 @@ class SwPaM;
enum SwNumRuleType { OUTLINE_RULE = 0, NUM_RULE = 1, RULE_END = 2 };
class SW_DLLPUBLIC SwNumRule
{
-// --> OD 2008-02-19 #refactorlists#
+
public:
typedef std::vector< SwTxtNode* > tTxtNodeList;
typedef std::vector< SwTxtFmtColl* > tParagraphStyleList;
-// <--
private:
friend void _FinitCore();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
long int nSerial;
static long int nInstances;
#endif
static SwNumFmt* aBaseFmts [ RULE_END ][ MAXLEVEL ];
static sal_uInt16 aDefNumIndents[ MAXLEVEL ];
- // --> OD 2008-02-11 #newlistlevelattrs#
// default list level properties for position-and-space mode LABEL_ALIGNMENT
static SwNumFmt* aLabelAlignmentBaseFmts [ RULE_END ][ MAXLEVEL ];
- // <--
static sal_uInt16 nRefCount;
static char* pDefOutlineName;
SwNumFmt* aFmts[ MAXLEVEL ];
- /** container for associated text nodes
-
- */
- // --> OD 2008-02-19 #refactorlists#
-// SwTxtNodeTable* pTxtNodeList;
+ /** container for associated text nodes */
tTxtNodeList maTxtNodeList;
- // <--
-
- /** container for associated paragraph styles
- OD 2008-03-03 #refactorlists#
- */
+ /** container for associated paragraph styles */
tParagraphStyleList maParagraphStyleList;
- // #i36749#
- /**
- hash_map containing "name->rule" relation
- */
- std::hash_map<String, SwNumRule *, StringHash> * pNumRuleMap;
+ /** boost::unordered_map containing "name->rule" relation */
+ boost::unordered_map<String, SwNumRule *, StringHash> * pNumRuleMap;
String sName;
SwNumRuleType eRuleType;
- sal_uInt16 nPoolFmtId; // Id-fuer "automatich" erzeugte NumRules
- sal_uInt16 nPoolHelpId; // HelpId fuer diese Pool-Vorlage
- sal_uInt8 nPoolHlpFileId; // FilePos ans Doc auf die Vorlagen-Hilfen
+ sal_uInt16 nPoolFmtId; // Id-for NumRules created "automatically"
+ sal_uInt16 nPoolHelpId; // HelpId for this Pool-style.
+ sal_uInt8 nPoolHlpFileId; // FilePos at Doc on style helps.
sal_Bool bAutoRuleFlag : 1;
sal_Bool bInvalidRuleFlag : 1;
- sal_Bool bContinusNum : 1; // Fortlaufende Numerierung - ohne Ebenen
- sal_Bool bAbsSpaces : 1; // die Ebenen repraesentieren absol. Einzuege
+ sal_Bool bContinusNum : 1; // Continuous numbering without levels.
+ sal_Bool bAbsSpaces : 1; // Levels represent absolute indents.
bool mbCountPhantoms;
- // --> OD 2008-02-11 #newlistlevelattrs#
const SvxNumberFormat::SvxNumPositionAndSpaceMode meDefaultNumberFormatPositionAndSpaceMode;
- // <--
-
- // --> OD 2008-04-03 #refactorlists#
String msDefaultListId;
- // <--
// forbidden and not implemented.
SwNumRule();
public:
- // --> OD 2008-02-08 #newlistlevelattrs#
// add parameter <eDefaultNumberFormatPositionAndSpaceMode>
SwNumRule( const String& rNm,
const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode,
@@ -193,42 +166,30 @@ public:
void Set( sal_uInt16 i, const SwNumFmt& );
String MakeNumString( const SwNodeNum&, sal_Bool bInclStrings = sal_True,
sal_Bool bOnlyArabic = sal_False ) const;
- // --> OD 2005-10-17 #126238#
// - add optional parameter <_nRestrictToThisLevel> in order to
// restrict returned string to this level.
String MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
const sal_Bool bInclStrings = sal_True,
const sal_Bool bOnlyArabic = sal_False,
const unsigned int _nRestrictToThisLevel = MAXLEVEL ) const;
- // <--
- // --> OD 2007-08-24 #i81002#
String MakeRefNumString( const SwNodeNum& rNodeNum,
const bool bInclSuperiorNumLabels = false,
const sal_uInt8 nRestrictInclToThisLevel = 0 ) const;
- // <--
/** Returns list of associated text nodes.
- OD 2008-02-19 #refactorlists#
-
@return list of associated text nodes
*/
-// const SwTxtNodeTable * GetTxtNodeList() const { return pTxtNodeList; }
void GetTxtNodeList( SwNumRule::tTxtNodeList& rTxtNodeList ) const;
SwNumRule::tTxtNodeList::size_type GetTxtNodeListSize() const;
- // --> OD 2008-02-19 #refactorlists#
void AddTxtNode( SwTxtNode& rTxtNode );
void RemoveTxtNode( SwTxtNode& rTxtNode );
- // <--
- // --> OD 2008-03-03 #refactorlists#
SwNumRule::tParagraphStyleList::size_type GetParagraphStyleListSize() const;
void AddParagraphStyle( SwTxtFmtColl& rTxtFmtColl );
void RemoveParagraphStyle( SwTxtFmtColl& rTxtFmtColl );
- // <--
- // --> OD 2008-04-03 #refactorlists#
inline void SetDefaultListId( const String sDefaultListId )
{
msDefaultListId = sDefaultListId;
@@ -237,15 +198,13 @@ public:
{
return msDefaultListId;
}
- // <--
- // #i36749#
/**
Register this rule in a "name->numrule" map.
@param pNumRuleMap map to register in
*/
void SetNumRuleMap(
- std::hash_map<String, SwNumRule *, StringHash>* pNumRuleMap );
+ boost::unordered_map<String, SwNumRule *, StringHash>* pNumRuleMap );
static char* GetOutlineRuleName() { return pDefOutlineName; }
@@ -256,20 +215,19 @@ public:
void SetRuleType( SwNumRuleType eNew ) { eRuleType = eNew;
bInvalidRuleFlag = sal_True; }
- // eine Art Copy-Constructor, damit die Num-Formate auch an den
- // richtigen CharFormaten eines Dokumentes haengen !!
- // (Kopiert die NumFormate und returnt sich selbst)
+ // A kind of copy-constructor to make sure the num formats are
+ // attached to the correctCharFormats of a document!!
+ // (Copies the NumFormats and returns itself).
SwNumRule& CopyNumRule( SwDoc*, const SwNumRule& );
- // testet ob die CharFormate aus dem angegeben Doc sind und kopiert
- // die gegebenfalls
+ // Tests whether the CharFormats are from the given doc
+ // and copies them if appropriate.
void CheckCharFmts( SwDoc* pDoc );
const String& GetName() const { return sName; }
- // --> OD 2008-07-08 #i91400#
+
void SetName( const String& rNm,
- IDocumentListsAccess& rDocListAccess ); // #i36749#
- // <--
+ IDocumentListsAccess& rDocListAccess );
sal_Bool IsAutoRule() const { return bAutoRuleFlag; }
void SetAutoRule( sal_Bool bFlag ) { bAutoRuleFlag = bFlag; }
@@ -283,17 +241,16 @@ public:
sal_Bool IsAbsSpaces() const { return bAbsSpaces; }
void SetAbsSpaces( sal_Bool bFlag ) { bAbsSpaces = bFlag; }
- // #115901#
sal_Bool IsOutlineRule() const { return eRuleType == OUTLINE_RULE; }
bool IsCountPhantoms() const;
void SetCountPhantoms(bool bCountPhantoms);
- // erfragen und setzen der Poolvorlagen-Id's
+ // Query and set PoolFormat IDs.
sal_uInt16 GetPoolFmtId() const { return nPoolFmtId; }
void SetPoolFmtId( sal_uInt16 nId ) { nPoolFmtId = nId; }
- // erfragen und setzen der Hilfe-Id's fuer die Document-Vorlagen
+ // Query and set Help-IDs for document styles.
sal_uInt16 GetPoolHelpId() const { return nPoolHelpId; }
void SetPoolHelpId( sal_uInt16 nId ) { nPoolHelpId = nId; }
sal_uInt8 GetPoolHlpFileId() const { return nPoolHlpFileId; }
@@ -302,12 +259,6 @@ public:
void SetSvxRule(const SvxNumRule&, SwDoc* pDoc);
SvxNumRule MakeSvxNumRule() const;
- // #i23726#, #i23725#
- // --> OD 2008-06-09 #i90078#
- // refactoring: provide certain method for certain purpose
-// void Indent(short aAmount, int nLevel = -1,
-// int nReferenceLevel = -1, sal_Bool bRelative = sal_True,
-// sal_Bool bFirstLine = sal_True, sal_Bool bCheckGtZero = sal_True);
// change indent of all list levels by given difference
void ChangeIndent( const short nDiff );
// set indent of certain list level to given value
@@ -316,12 +267,10 @@ public:
// set indent of first list level to given value and change other list level's
// indents accordingly
void SetIndentOfFirstListLevelAndChangeOthers( const short nNewIndent );
- // <--
void Validate();
};
-// --> OD 2006-06-27 #b6440955#
// namespace for static functions and methods for numbering and bullets
namespace numfunc
{
@@ -333,7 +282,6 @@ namespace numfunc
/** determine if default bullet font is user defined
- OD 2008-06-06 #i63395#
The default bullet font is user defined, if it is given in the user configuration
@author OD
@@ -357,18 +305,16 @@ namespace numfunc
The same for <SHIFT-TAB>-key at the same position for decreasing the
indent of the complete list or only promotes this list item.
- OD 2007-10-01 #b6600435#
-
@author OD
*/
sal_Bool ChangeIndentOnTabAtFirstPosOfFirstListItem();
/**
- OD 2008-06-06 #i89178#
-
@author OD
*/
SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode();
}
#endif // _NUMRULE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 8ba32064c3ba..0690a3d1b7ed 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,18 +32,15 @@
#include <tools/color.hxx>
#include <tools/string.hxx>
#include "swdllapi.h"
-#include <swtypes.hxx> //fuer SwTwips
+#include <swtypes.hxx> // For SwTwips.
#include <frmfmt.hxx>
-//#ifndef _NUMRULE_HXX
-//#include <numrule.hxx>
-//#endif
#include <editeng/numitem.hxx>
class SfxPoolItem;
class SwTxtFmtColl;
class SwNode;
-//Separator line adjustment
+// Separator line adjustment.
enum SwFtnAdj
{
FTNADJ_LEFT,
@@ -50,16 +48,16 @@ enum SwFtnAdj
FTNADJ_RIGHT
};
-//footnote information
+// Footnote information.
class SW_DLLPUBLIC SwPageFtnInfo
{
- SwTwips nMaxHeight; //maximum height of the footnote area.
- sal_uLong nLineWidth; //width of separator line
- Color aLineColor; //color of the separator line
- Fraction aWidth; //percentage width of the separator line.
- SwFtnAdj eAdj; //line adjustment.
- SwTwips nTopDist; //distance between body and separator.
- SwTwips nBottomDist; //distance between separator and first footnote
+ SwTwips nMaxHeight; // Maximum height of the footnote area.
+ sal_uLong nLineWidth; // Width of separator line.
+ Color aLineColor; // Color of the separator line.
+ Fraction aWidth; // Percentage width of the separator line.
+ SwFtnAdj eAdj; // Line adjustment.
+ SwTwips nTopDist; // Distance between body and separator.
+ SwTwips nBottomDist; // Distance between separator and first footnote.
public:
SwTwips GetHeight() const { return nMaxHeight; }
@@ -86,51 +84,51 @@ public:
};
/*
- * Verwendung des UseOnPage (eUse) und der FrmFmt'e
+ * Use of UseOnPage (eUse) and of FrmFmts
*
- * RIGHT - aMaster nur fuer rechte Seiten, linke Seiten immer leer.
- * LEFT - aLeft fuer linke Seiten, rechte Seiten immer leer.
- * aLeft ist eine Kopie des Master.
- * ALL - aMaster fuer rechte Seiten, aLeft fuer Linke Seiten.
- * aLeft ist eine Kopie des Master.
- * MIRROR - aMaster fuer rechte Seiten, aLeft fuer linke Seiten.
- * aLeft ist eine Kopie des Master, Raender sind gespiegelt.
+ * RIGHT - aMaster only for right hand (odd) pages, left hand (even) pages
+ * always empty.
+ * LEFT - aLeft for left-hand pages, right-hand pages always empty.
+ * aLeft is a copy of master.
+ * ALL - aMaster for right hand pages, aLeft for left hand pages.
+ * - aLeft is a copy of master.
+ * MIRROR - aMaster for right hand pages, aLeft for left hand pagers.
+ * aLeft is a copy of master, margins are mirrored.
*
- * UI dreht auschliesslich am Master! aLeft wird beim Chg am Dokument
- * enstprechend dem eUse eingestellt.
+ * UI works exclusively on master! aLeft is adjusted on Chg at document
+ * according to eUse.
*
- * Damit es die Filter etwas einfacher haben werden weitere Werte im
- * eUse untergebracht:
+ * In order to simplify the work of the filters some more values are placed
+ * into eUse:
*
- * HEADERSHARE - Headerinhalt auf beiden Seiten gleich
- * FOOTERSHARE - Footerinhalt auf beiden Seiten gleich
+ * HEADERSHARE - Content of header is equal on left and right hand pages.
+ * FOOTERSHARE - Content of footer is equal on left and right hand pages.
*
- * Die Werte werden bei den entsprechenden Get-/Set-Methden ausmaskiert.
- * Zugriff auf das volle eUse inclusive der Header-Footer information
- * per ReadUseOn(), WriteUseOn() (fuer Filter und CopyCTor)!
- *
- * Die FrmFormate fuer Header/Footer werden anhand der Attribute fuer
- * Header/Footer vom UI am Master eingestellt (Hoehe, Raender, Hintergrund...);
- * Header/Footer fuer die Linke Seite werden entsprechen kopiert bzw.
- * gespielt (Chg am Dokument).
- * Das jew. Attribut fuer den Inhalt wird automatisch beim Chg am
- * Dokument versorgt (entsprechen den SHARE-informationen werden Inhalte
- * erzeugt bzw. entfernt).
+ * The values are masked out in the respective getter and setter methods.
+ * Access to complete eUse including the information on header and footer
+ * via ReadUseOn(), WriteUseOn() (fuer Filter und CopyCTor)!
*
+ * The Frmformats for header/footer are adjusted by the UI according to
+ * the attributes for header and footer at master (height, margin, back-
+ * ground ...)
+ * Header/footer for left hand pages are copied or mirrored (Chg at
+ * document).
+ * The respective attribute for content is cared for automatically on Chg at
+ * document (contents are created or removed according to SHARE-information).
*/
typedef sal_uInt16 UseOnPage;
namespace nsUseOnPage
{
- const UseOnPage PD_NONE = 0x0000; //for internal use only.
+ const UseOnPage PD_NONE = 0x0000; // For internal use only.
const UseOnPage PD_LEFT = 0x0001;
const UseOnPage PD_RIGHT = 0x0002;
const UseOnPage PD_ALL = 0x0003;
const UseOnPage PD_MIRROR = 0x0007;
const UseOnPage PD_HEADERSHARE = 0x0040;
const UseOnPage PD_FOOTERSHARE = 0x0080;
- const UseOnPage PD_NOHEADERSHARE = 0x00BF; //for internal use only
- const UseOnPage PD_NOFOOTERSHARE = 0x007F; //for internal use only
+ const UseOnPage PD_NOHEADERSHARE = 0x00BF; // For internal use only.
+ const UseOnPage PD_NOFOOTERSHARE = 0x007F; // For internal use only.
}
class SW_DLLPUBLIC SwPageDesc : public SwModify
@@ -142,18 +140,18 @@ class SW_DLLPUBLIC SwPageDesc : public SwModify
SvxNumberType aNumType;
SwFrmFmt aMaster;
SwFrmFmt aLeft;
- SwDepend aDepend; // wg. Registerhaltigkeit
+ SwDepend aDepend; // Because of grid alignment (Registerhaltigkeit).
SwPageDesc *pFollow;
- sal_uInt16 nRegHeight; // Zeilenabstand und Fontascent der Vorlage
- sal_uInt16 nRegAscent; // fuer die Registerhaltigkeit
+ sal_uInt16 nRegHeight; // Sentence spacing and fontascent of style.
+ sal_uInt16 nRegAscent; // For grid alignment (Registerhaltigkeit).
UseOnPage eUse;
sal_Bool bLandscape;
- //Fussnoteninformationen
+ // Footnote information.
SwPageFtnInfo aFtnInfo;
- //Wird zum Spiegeln vom Chg (Doc) gerufen.
- //Kein Abgleich an anderer Stelle.
+ // Called for mirroring of Chg (doc).
+ // No adjustment at any other place.
SW_DLLPRIVATE void Mirror();
SW_DLLPRIVATE void ResetAllAttr( sal_Bool bLeft );
@@ -195,8 +193,8 @@ public:
inline void ResetAllMasterAttr();
inline void ResetAllLeftAttr();
- //Mit den folgenden Methoden besorgt sich das Layout ein Format
- //um eine Seite erzeugen zu koennen
+ // Layout uses the following methods to obtain a format in order
+ // to be able to create a page.
inline SwFrmFmt *GetRightFmt();
inline const SwFrmFmt *GetRightFmt() const;
inline SwFrmFmt *GetLeftFmt();
@@ -216,7 +214,7 @@ public:
virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
void RegisterChange();
- // erfragen und setzen der PoolFormat-Id
+ // Query and set PoolFormat-Id.
sal_uInt16 GetPoolFmtId() const { return aMaster.GetPoolFmtId(); }
void SetPoolFmtId( sal_uInt16 nId ) { aMaster.SetPoolFmtId( nId ); }
sal_uInt16 GetPoolHelpId() const { return aMaster.GetPoolHelpId(); }
@@ -224,7 +222,7 @@ public:
sal_uInt8 GetPoolHlpFileId() const { return aMaster.GetPoolHlpFileId(); }
void SetPoolHlpFileId( sal_uInt8 nId ) { aMaster.SetPoolHlpFileId( nId ); }
- // erfrage vom Client Informationen
+ // Query information from Client.
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
const SwFrmFmt* GetPageFmtOfNode( const SwNode& rNd,
@@ -257,39 +255,31 @@ inline void SwPageDesc::ChgHeaderShare( sal_Bool bNew )
{
if ( bNew )
eUse = (UseOnPage) (eUse | nsUseOnPage::PD_HEADERSHARE);
- // (sal_uInt16&)eUse |= (sal_uInt16)nsUseOnPage::PD_HEADERSHARE;
else
eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOHEADERSHARE);
- // (sal_uInt16&)eUse &= (sal_uInt16)nsUseOnPage::PD_NOHEADERSHARE;
}
inline void SwPageDesc::ChgFooterShare( sal_Bool bNew )
{
if ( bNew )
eUse = (UseOnPage) (eUse | nsUseOnPage::PD_FOOTERSHARE);
- // (sal_uInt16&)eUse |= (sal_uInt16)nsUseOnPage::PD_FOOTERSHARE;
else
eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOFOOTERSHARE);
- // (sal_uInt16&)eUse &= (sal_uInt16)nsUseOnPage::PD_NOFOOTERSHARE;
}
inline void SwPageDesc::SetUseOn( UseOnPage eNew )
{
UseOnPage eTmp = nsUseOnPage::PD_NONE;
if ( eUse & nsUseOnPage::PD_HEADERSHARE )
eTmp = nsUseOnPage::PD_HEADERSHARE;
- // (sal_uInt16&)eTmp |= (sal_uInt16)nsUseOnPage::PD_HEADERSHARE;
if ( eUse & nsUseOnPage::PD_FOOTERSHARE )
eTmp = (UseOnPage) (eTmp | nsUseOnPage::PD_FOOTERSHARE);
- // (sal_uInt16&)eTmp |= (sal_uInt16)nsUseOnPage::PD_FOOTERSHARE;
eUse = (UseOnPage) (eTmp | eNew);
- // (sal_uInt16&)eUse = eTmp | eNew;
+
}
inline UseOnPage SwPageDesc::GetUseOn() const
{
UseOnPage eRet = eUse;
eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOHEADERSHARE);
- // (sal_uInt16&)eRet &= (sal_uInt16)nsUseOnPage::PD_NOHEADERSHARE;
eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOFOOTERSHARE);
- // (sal_uInt16&)eRet &= (sal_uInt16)nsUseOnPage::PD_NOFOOTERSHARE;
return eRet;
}
@@ -345,3 +335,5 @@ public:
SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName);
#endif //_PAGEDESC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/pageiter.hxx b/sw/inc/pageiter.hxx
index 2280ae414093..c0c6b6576b7c 100644
--- a/sw/inc/pageiter.hxx
+++ b/sw/inc/pageiter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx
index 01d83afae52e..200ad618279d 100644
--- a/sw/inc/pagepreviewlayout.hxx
+++ b/sw/inc/pagepreviewlayout.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef _PAGEPREVIEWLAYOUT_HXX
#define _PAGEPREVIEWLAYOUT_HXX
@@ -19,8 +20,6 @@ struct PrevwPage;
// =============================================================================
/** page preview functionality in the writer
- OD 11.12.2002 #103492# - class <SwPagePreviewLayout>
-
@author OD
*/
class SwPagePreviewLayout
@@ -54,8 +53,7 @@ private:
sal_uInt16 mnCols;
sal_uInt16 mnRows;
sal_uInt16 mnPages;
- // OD 19.02.2003 #107369# - new flag for leaving blank left-top-corner
- // OD 2004-03-05 #i18143# - the book preview is controlled by this flag
+ // #i18143# - the book preview is controlled by this flag
bool mbBookPreview;
bool mbBookPreviewModeToggled;
@@ -80,7 +78,7 @@ private:
std::vector<PrevwPage*> maPrevwPages;
- // OD 07.11.2003 #i22014# - internal booleans to indicate, that a new print
+ // #i22014# - internal booleans to indicate, that a new print
// preview layout has been created during a paint.
mutable bool mbInPaint;
mutable bool mbNewLayoutDuringPaint;
@@ -89,40 +87,30 @@ private:
/** clear internal data about current page preview
- OD 11.12.2002 #103492#
-
@author OD
*/
void _Clear();
/** helper method to clear preview page layout sizes
- OD 18.12.2002 #103492#
-
@author OD
*/
void _ClearPrevwLayoutSizes();
/** helper method to clear data in preview page vectors
- OD 13.12.2002 #103492#
-
@author OD
*/
void _ClearPrevwPageData();
/** calculate page preview layout sizes
- OD 18.12.2002 #103492#
-
@author OD
*/
void _CalcPrevwLayoutSizes();
/** apply new zoom at given view shell
- OD 11.12.2002 #103492#
-
@author OD
@param _aNewZoom
@@ -132,7 +120,6 @@ private:
/** calculate additional paint offset
- OD 12.12.2002 #103492#
helper method called by <Prepare> in order to calculate an additional
paint offset to center output in given window size.
The booleans <mbDoesLayoutRowsFitIntoWindow> and <mbDoesLayoutColsFitIntoWindow>
@@ -149,7 +136,6 @@ private:
/** calculate painted preview document rectangle
- OD 12.12.2002 #103492#
helper method called by <Prepare> in order to calculate the rectangle,
which will be painted for the document arranged by the given preview
layout.
@@ -164,7 +150,6 @@ private:
/** determines preview data for a given page and a given preview offset
- OD 13.12.2002 #103492#
@author OD
@@ -188,7 +173,6 @@ private:
/** calculate preview pages
- OD 12.12.2002 #103492#
helper method called by <Prepare> in order to determine which pages
will be visible in the current preview and calculate the data needed
to paint these pages. Also the accessible pages with its needed data
@@ -200,8 +184,6 @@ private:
/** get preview page by physical page number
- OD 17.12.2002 #103492#
-
@author OD
@param _nPageNum
@@ -215,8 +197,6 @@ private:
/** paint selection mark at page
- OD 17.12.2002 #103492#
-
@author OD
*/
void _PaintSelectMarkAtPage( const PrevwPage* _aSelectedPrevwPage ) const;
@@ -224,8 +204,6 @@ private:
public:
/** constructor of <SwPagePreviewLayout>
- OD 11.12.2002 #103492#
-
@author OD
@param _rParentViewShell
@@ -246,8 +224,6 @@ public:
/** destructor of <SwPagePreviewLayout>
- OD 17.12.2002 #103492#
-
@author
*/
inline ~SwPagePreviewLayout()
@@ -257,7 +233,6 @@ public:
/** init page preview layout
- OD 11.12.2002 #103492#
initialize the page preview settings for a given layout.
side effects:
(1) If parameter <_bCalcScale> is true, mapping mode with calculated
@@ -291,8 +266,6 @@ public:
/** method to adjust page preview layout to document changes
- OD 18.12.2002 #103492#
-
@author OD
@return boolean, indicating, if preview layout is successful initialized.
@@ -301,7 +274,6 @@ public:
/** prepare paint of page preview
- OD 12.12.2002 #103492#
With the valid preview layout settings - calculated and set by method
<Init(..)> - the paint of a specific part of the virtual preview
document is prepared. The corresponding part is given by either
@@ -309,7 +281,6 @@ public:
(parameter <_aProposedStartPoint>).
The accessibility preview will also be updated via a corresponding
method call.
- OD 21.03.2003 #108282# - delete parameter _onStartPageVirtNum
@author OD
@@ -350,8 +321,6 @@ public:
/** get selected page number
- OD 13.12.2002 #103492#
-
@author OD
*/
inline sal_uInt16 SelectedPage()
@@ -361,8 +330,6 @@ public:
/** set selected page number
- OD 14.01.2003 #103492#
-
@author OD
*/
inline void SetSelectedPage( sal_uInt16 _nSelectedPageNum )
@@ -372,8 +339,6 @@ public:
/** paint prepared preview
- OD 12.12.2002 #103492#
-
@author OD
@param _aOutRect
@@ -385,7 +350,6 @@ public:
/** repaint pages on page preview
- OD 18.12.2002 #103492#
method to invalidate visible pages due to changes in a different
view shell.
@@ -395,7 +359,6 @@ public:
/** paint to mark new selected page
- OD 17.12.2002 #103492#
Perform paint for current selected page in order to unmark it.
Set new selected page and perform paint to mark this page.
@@ -408,7 +371,6 @@ public:
/** calculate start position for new scale
- OD 12.12.2002 #103492#
calculate new start position for a new scale. Calculation bases on the
current visible part of the document arranged in the given preview layout.
preconditions:
@@ -424,8 +386,6 @@ public:
/** determines, if page with given page number is visible in preview
- OD 12.12.2002 #103492#
-
@author OD
@param _nPageNum
@@ -439,8 +399,6 @@ public:
/** calculate data to bring new selected page into view.
- OD 12.12.2002 #103492#
-
@author OD
@param _nHoriMove
@@ -470,8 +428,6 @@ public:
/** checks, if given position is inside a shown document page
- OD 17.12.2002 #103492#
-
@author OD
@param _aPrevwPos
@@ -516,8 +472,6 @@ public:
/** determine preview window page scroll amount
- OD 17.12.2002 #103492#
-
@author OD
@param _nWinPagesToScroll
@@ -531,8 +485,6 @@ public:
/** determine row the page with the given number is in
- OD 17.01.2003 #103492#
-
@author OD
@param _nPageNum
@@ -545,8 +497,6 @@ public:
/** determine column the page with the given number is in
- OD 17.01.2003 #103492#
-
@author OD
@param _nPageNum
@@ -557,13 +507,10 @@ public:
*/
sal_uInt16 GetColOfPage( sal_uInt16 _nPageNum ) const;
- // OD 18.12.2002 #103492#
Size GetPrevwDocSize() const;
/** get size of a preview page by its physical page number
- OD 15.01.2003 #103492#
-
@author OD
@param _nPageNum
@@ -576,8 +523,6 @@ public:
/** get virtual page number by its physical page number
- OD 21.03.2003 #108282#
-
@author OD
@param _nPageNum
@@ -591,8 +536,6 @@ public:
/** enable/disable book preview
- OD 2004-03-04 #i18143#
-
@author OD
*/
bool SetBookPreviewMode( const bool _bEnableBookPreview,
@@ -619,3 +562,5 @@ public:
};
#endif // _PAGEPREVIEWLAYOUT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index 995246f8d9e9..9d839475dbd5 100644
--- a/sw/inc/pam.hxx
+++ b/sw/inc/pam.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,13 +28,13 @@
#ifndef _PAM_HXX
#define _PAM_HXX
-#include <stddef.h> // fuer MemPool
+#include <stddef.h> // For MemPool.
#include <tools/gen.hxx>
#include <tools/mempool.hxx>
-#include <cshtyp.hxx> // fuer die Funktions-Definitionen
-#include <ring.hxx> // Superklasse
-#include <index.hxx> // fuer SwIndex
-#include <ndindex.hxx> // fuer SwNodeIndex
+#include <cshtyp.hxx> // For function definitions.
+#include <ring.hxx> // Super class.
+#include <index.hxx> // For SwIndex.
+#include <ndindex.hxx> // For SwNodeIndex.
#include "swdllapi.h"
class SwFmt;
@@ -65,7 +66,6 @@ struct SW_DLLPUBLIC SwPosition
SwPosition( const SwPosition & );
SwPosition &operator=(const SwPosition &);
- // #111827#
/**
Returns the document this position is in.
@@ -82,17 +82,17 @@ struct SW_DLLPUBLIC SwPosition
};
-// das Ergebnis eines Positions Vergleiches
+// Result of comparing positions.
enum SwComparePosition {
- POS_BEFORE, // Pos1 liegt vor Pos2
- POS_BEHIND, // Pos1 liegt hinter Pos2
- POS_INSIDE, // Pos1 liegt vollstaendig in Pos2
- POS_OUTSIDE, // Pos2 liegt vollstaendig in Pos1
- POS_EQUAL, // Pos1 ist genauso gross wie Pos2
- POS_OVERLAP_BEFORE, // Pos1 ueberlappt Pos2 am Anfang
- POS_OVERLAP_BEHIND, // Pos1 ueberlappt Pos2 am Ende
- POS_COLLIDE_START, // Pos1 Start stoesst an Pos2 Ende
- POS_COLLIDE_END // Pos1 End stoesst an Pos2 Start
+ POS_BEFORE, // Pos1 before Pos2.
+ POS_BEHIND, // Pos1 behind Pos2.
+ POS_INSIDE, // Pos1 completely contained in Pos2.
+ POS_OUTSIDE, // Pos2 completely contained in Pos1.
+ POS_EQUAL, // Pos1 is as large as Pos2.
+ POS_OVERLAP_BEFORE, // Pos1 overlaps Pos2 at the beginning.
+ POS_OVERLAP_BEHIND, // Pos1 overlaps Pos2 at the end.
+ POS_COLLIDE_START, // Pos1 start touches at Pos2 end.
+ POS_COLLIDE_END // Pos1 end touches at Pos2 start.
};
SwComparePosition ComparePosition(
const SwPosition& rStt1, const SwPosition& rEnd1,
@@ -150,11 +150,11 @@ public:
// @@@ semantic: no copy assignment for super class Ring.
SwPaM& operator=( const SwPaM & );
- // Bewegen des Cursors
+ // Movement of cursor.
sal_Bool Move( SwMoveFn fnMove = fnMoveForward,
SwGoInDoc fnGo = fnGoCntnt );
- // Suchen
+ // Search.
sal_uInt8 Find( const com::sun::star::util::SearchOptions& rSearchOpt,
sal_Bool bSearchInNotes,
utl::TextSearch& rSTxt,
@@ -189,8 +189,10 @@ public:
m_pMark = m_pPoint;
}
}
-#ifndef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
+ void Exchange();
+#else
void Exchange()
{
if (m_pPoint != m_pMark)
@@ -200,8 +202,6 @@ public:
m_pMark = pTmp;
}
}
-#else
- void Exchange();
#endif
/** A PaM marks a selection if Point and Mark are distinct positions.
@@ -252,11 +252,11 @@ public:
const SwPosition& GetBound( bool bOne = true ) const
{ return bOne ? m_Bound1 : m_Bound2; }
- // erfrage die Seitennummer auf der der Cursor steht
+ // Get number of page which contains cursor.
sal_uInt16 GetPageNum( sal_Bool bAtPoint = sal_True, const Point* pLayPos = 0 );
- // steht in etwas geschuetztem oder in die Selektion umspannt
- // etwas geschuetztes.
+ // Is in something protected (readonly) or selection contains
+ // something protected.
sal_Bool HasReadonlySel( bool bFormView ) const;
sal_Bool ContainsPosition(const SwPosition & rPos)
@@ -278,3 +278,5 @@ sal_Bool GoInCntnt( SwPaM & rPam, SwMoveFn fnMove );
#endif // _PAM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx
index bdd4a0155614..54eff6a7cd26 100644
--- a/sw/inc/paratr.hxx
+++ b/sw/inc/paratr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,28 +39,23 @@
class SwCharFmt;
class IntlWrapper;
-/*************************************************************************
-|* class SwFmtDrop
-*************************************************************************/
-
#define DROP_WHOLEWORD ((sal_uInt16)0x0001)
-//Wenn ein SwFmtDrop Client ist, so ist dies das CharFmt welches den Font fuer
-//die DropCaps beschreibt. Ist es kein Client, so wird von der Formatierung
-//das CharFmt des Absatzes benutzt.
-//Wird das CharFmt verandert, so wird diese Aenderung ueber das Modify des
-//SwFmtDrop an die Absatze propagiert.
+// If SwFmtDrop is a Client, it is the CharFmt that describes the font for the
+// DropCaps. If it is not a Client, formating uses the CharFmt of the paragraph.
+// If the CharFmt is modified, this change is propagated to the paragraphs
+// via the Modify of SwFmtDrop.
class SW_DLLPUBLIC SwFmtDrop: public SfxPoolItem, public SwClient
{
- SwModify* pDefinedIn; // Modify-Object, in dem der DropCaps steht
- // kann nur TxtFmtCollection/TxtNode sein
- sal_uInt16 nDistance; // Abstand zum Textbeginn
- sal_uInt16 nReadFmt; // fuer den Sw3-Reader: CharFormat-Id (Pool laden!)
- sal_uInt8 nLines; // Anzahl der Zeilen
- sal_uInt8 nChars; // Anzahl der Zeichen
- sal_Bool bWholeWord; // Erstes Wort als Initialen
+ SwModify* pDefinedIn; // Modify-Object, that contains DropCaps.
+ // Can only be TxtFmtCollection/TxtNode.
+ sal_uInt16 nDistance; // Distance to beginning of text.
+ sal_uInt16 nReadFmt; // For Sw3-Reader: CharFormat-Id (load Pool!).
+ sal_uInt8 nLines; // Line count.
+ sal_uInt8 nChars; // Character count.
+ sal_Bool bWholeWord; // First word with initials.
public:
- TYPEINFO(); //Bereits in der Basisklasse SwClient
+ TYPEINFO(); // Already in base class SwClient.
SwFmtDrop();
virtual ~SwFmtDrop();
@@ -71,7 +67,7 @@ private:
SwFmtDrop & operator= (const SwFmtDrop &);
public:
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -79,8 +75,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
inline sal_uInt8 GetLines() const { return nLines; }
inline sal_uInt8 &GetLines() { return nLines; }
@@ -98,10 +94,10 @@ public:
inline SwCharFmt *GetCharFmt() { return (SwCharFmt*)pRegisteredIn; }
void SetCharFmt( SwCharFmt *pNew );
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- // erfrage vom Client Informationen
+ // Get information from Client.
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
- // erfrage und setze den Modify-Pointer
+ // Get and set Modify pointer.
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
inline void ChgDefinedIn( const SwModify* pNew )
{ pDefinedIn = (SwModify*)pNew; }
@@ -117,7 +113,7 @@ public:
// @@@ public copy assignment, but no copy ctor?
inline SwRegisterItem& operator=( const SwRegisterItem& rRegister );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -142,7 +138,6 @@ class SW_DLLPUBLIC SwNumRuleItem : public SfxStringItem
public:
TYPEINFO();
- // --> OD 2008-03-04 #refactorlists# - removed <pDefinedIn>
SwNumRuleItem()
: SfxStringItem( RES_PARATR_NUMRULE, aEmptyStr ) {}
@@ -154,9 +149,8 @@ public:
SwNumRuleItem& operator=( const SwNumRuleItem& rCpy )
{ SetValue( rCpy.GetValue() ); return *this; }
- // <--
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -165,8 +159,8 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId );
};
class SwParaConnectBorderItem : public SfxBoolItem
@@ -179,7 +173,7 @@ public:
// @@@ public copy assignment, but no copy ctor?
inline SwParaConnectBorderItem& operator=( const SwParaConnectBorderItem& rConnect );
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -202,7 +196,7 @@ inline SwParaConnectBorderItem& SwParaConnectBorderItem::operator=(
/******************************************************************************
- * Implementierung der Paragraph-Attribut Methoden vom SwAttrSet
+ * Implementation of paragraph-attributes methods of SwAttrSet
******************************************************************************/
inline const SvxLineSpacingItem &SwAttrSet::GetLineSpacing(sal_Bool bInP) const
@@ -239,7 +233,7 @@ inline const SwParaConnectBorderItem &SwAttrSet::GetParaConnectBorder(sal_Bool b
{ return (const SwParaConnectBorderItem&)Get( RES_PARATR_CONNECT_BORDER, bInP ); }
/******************************************************************************
- * Implementierung der Paragraph-Attribut Methoden vom SwFmt
+ * Implementation of paragraph-attributes methods of SwFmt
******************************************************************************/
inline const SvxLineSpacingItem &SwFmt::GetLineSpacing(sal_Bool bInP) const
@@ -276,3 +270,5 @@ inline const SwParaConnectBorderItem &SwFmt::GetParaConnectBorder(sal_Bool bInP)
{ return (const SwParaConnectBorderItem&)aSet.Get( RES_PARATR_CONNECT_BORDER, bInP ); }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/pausethreadstarting.hxx b/sw/inc/pausethreadstarting.hxx
index 14bb9b56b5b1..55e9fd712cf2 100644
--- a/sw/inc/pausethreadstarting.hxx
+++ b/sw/inc/pausethreadstarting.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
/** Helper class to pause starting of threads during existence of an instance
of this class
- OD 2007-03-16 #i73788#
+ #i73788#
@author OD
*/
@@ -46,3 +47,5 @@ class SwPauseThreadStarting
bool mbPausedThreadStarting;
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/pch/precompiled_sw.cxx b/sw/inc/pch/precompiled_sw.cxx
index 04a4242b04f2..e5e35c1cf17f 100644
--- a/sw/inc/pch/precompiled_sw.cxx
+++ b/sw/inc/pch/precompiled_sw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,3 +28,4 @@
#include "precompiled_sw.hxx"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 13e8cb3ddbdd..63fef819d135 100755
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -685,7 +686,6 @@
#include "svtools/svtabbx.hxx"
#include "svtools/svtreebx.hxx"
#include "unotools/syslocale.hxx"
-#include "svtools/templdlg.hxx"
#include "svtools/textview.hxx"
#include "svtools/transfer.hxx"
#include "svtools/txtattr.hxx"
@@ -751,14 +751,12 @@
#include "svtools/htmlcfg.hxx"
#include "svx/htmlmode.hxx"
#include "svx/hyperdlg.hxx"
-#include "svx/hyprlink.hxx"
#include "svx/imapdlg.hxx"
#include "editeng/itemtype.hxx"
#include "svx/langbox.hxx"
#include "svx/layctrl.hxx"
#include "svx/lboxctrl.hxx"
#include "svx/linectrl.hxx"
-#include "sfx2/linkmgr.hxx"
#include "filter/msfilter/mscodec.hxx"
#include "filter/msfilter/msdffimp.hxx"
#include "filter/msfilter/msfiltertracer.hxx"
@@ -853,7 +851,6 @@
#include "tools/gen.hxx"
#include "tools/globname.hxx"
#include "tools/link.hxx"
-#include "tools/list.hxx"
#include "tools/mempool.hxx"
#include "tools/multisel.hxx"
#include "tools/poly.hxx"
@@ -952,8 +949,7 @@
#include "tools/wintypes.hxx"
#include "vcl/wrkwin.hxx"
-#include "vos/mutex.hxx"
-#include "vos/ref.hxx"
+#include "rtl/ref.hxx"
#include "xmloff/DocumentSettingsContext.hxx"
#include "xmloff/ProgressBarHelper.hxx"
@@ -1000,3 +996,5 @@
//---MARKER---
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx
index e3dec80e22a8..d222cf3c2234 100644
--- a/sw/inc/poolfmt.hxx
+++ b/sw/inc/poolfmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,7 +54,7 @@
// 3 - Absatzformate (?)
// 4 - Grafikformate (?)
-// Fr alle IDs gilt:
+// F�r alle IDs gilt:
// Herkunft: 0 -Pool
// 1 -Benutzer
// Offset: innerhalb der Gruppe
@@ -90,7 +91,6 @@ const sal_uInt16 POOLGRP_CHARFMT = (0 << 11) + POOLGRP_NOCOLLID;
const sal_uInt16 POOLGRP_FRAMEFMT = (1 << 11) + POOLGRP_NOCOLLID;
const sal_uInt16 POOLGRP_PAGEDESC = (2 << 11) + POOLGRP_NOCOLLID;
const sal_uInt16 POOLGRP_NUMRULE = (3 << 11) + POOLGRP_NOCOLLID;
-//const sal_uInt16 POOLGRP_GRFFMT = (4 << 11) + POOLGRP_NOCOLLID; // ?
// fuer Erkennung ob Benutzer-Vorlage oder nicht:
const sal_uInt16 POOL_IDUSER_FMT =
@@ -431,13 +431,7 @@ inline sal_Bool IsConditionalByPoolId(sal_uInt16 nId)
{
return RES_POOLCOLL_TEXT == nId;
}
-// die Id's fuer die Grafik-Formate
-/*enum RES_POOL_GRFFMT_TYPE
-{
-RES_POOLGRF_BEGIN = RES_POOLPAR_END,
-RES_POOLGRF_1 = RES_POOLGRF_BEGIN,
-RES_POOLGRF_END
-};
-*/
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
index 620936cdcf5b..6552a5680a9e 100644
--- a/sw/inc/postithelper.hxx
+++ b/sw/inc/postithelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -111,27 +112,6 @@ public:
SwPostItMgr& aMgr,
SwPostItBits aBits) = 0;
};
-/*
-class SwRedCommentItem: public SwSidebarItem
-{
-private:
- SwRedline* pRedline;
-public:
-
- SwRedCommentItem( SwRedline* pRed, bool aShow, bool aFocus)
- : SwSidebarItem(aShow,aFocus),
- pRedline(pRed) {}
- virtual ~SwRedCommentItem() {}
- virtual SwPosition GetAnchorPosition() const;
- virtual bool UseElement();
- virtual SwFmtFld* GetFmtFld() const {return 0; }
- virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pRedline); }
- virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
- WinBits nBits,
- SwPostItMgr& aMgr,
- SwPostItBits aBits);
-};
-*/
class SwAnnotationItem: public SwSidebarItem
{
@@ -157,3 +137,5 @@ class SwAnnotationItem: public SwSidebarItem
};
#endif // _POSTITHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
index 02df0280cdbf..a93ff9957695 100644
--- a/sw/inc/printdata.hxx
+++ b/sw/inc/printdata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,9 +70,9 @@ public:
bPrintLeftPages, bPrintRightPages, bPrintReverse, bPrintProspect,
bPrintProspectRTL,
bPrintSingleJobs, bPaperFromSetup,
- // --> FME 2005-12-13 #b6354161# Print empty pages
+ // Print empty pages
bPrintEmptyPages,
- // <--
+
// #i56195# no field update while printing mail merge documents
bUpdateFieldsInPrinting,
bModified;
@@ -205,7 +206,7 @@ public:
bool IsPrintWithBlackTextColor() const { return getBoolValue( "PrintBlackFonts", m_rDefaultPrintData.bPrintBlackFont ); }
sal_Int16 GetPrintPostItsType() const { return static_cast< sal_Int16 >(getIntValue( "PrintAnnotationMode", m_rDefaultPrintData.nPrintPostIts )); }
bool IsPaperFromSetup() const { return getBoolValue( "PrintPaperFromSetup", m_rDefaultPrintData.bPaperFromSetup ); }
- bool IsPrintReverse() const { return false; /*handled by print dialog now*/ /*getBoolValue( "PrintReversed", m_rDefaultPrintData.bPrintReverse );*/ }
+ bool IsPrintReverse() const { return false; /*handled by print dialog now*/ }
bool IsPrintLeftPages() const;
bool IsPrintRightPages() const;
@@ -261,7 +262,7 @@ public:
~SwRenderData();
- bool HasPostItData() const { return m_pPostItShell != 0 && m_pPostItDoc != 0 && m_pPostItShell != 0; }
+ bool HasPostItData() const { return m_pPostItShell != 0 && m_pPostItDoc != 0; }
void CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev );
void DeletePostItData();
@@ -320,7 +321,6 @@ public:
////////////////////////////////////////////////////////////
// last remnants of swprtopt.hxx:
-
#define POSTITS_NONE 0
#define POSTITS_ONLY 1
#define POSTITS_ENDDOC 2
@@ -333,3 +333,5 @@ void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb);
} // namespace sw
#endif // SW_PRINTDATA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/prtopt.hxx b/sw/inc/prtopt.hxx
index 75f0520e35e8..a2c47fd47066 100644
--- a/sw/inc/prtopt.hxx
+++ b/sw/inc/prtopt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/pvprtdat.hxx b/sw/inc/pvprtdat.hxx
index 14b20f147714..99f1e7ef52cc 100644
--- a/sw/inc/pvprtdat.hxx
+++ b/sw/inc/pvprtdat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc
index 8a788933dc4e..f392c05a07db 100644
--- a/sw/inc/rcid.hrc
+++ b/sw/inc/rcid.hrc
@@ -79,6 +79,7 @@
#define RC_SMARTTAG (RC_BASE + 3950) // SMARTTAGS
#define RC_UNOCORE (RC_BASE + 4050)
#define RC_ANNOTATION (RC_BASE + 4150)
+#define RC_PAGEFRM (RC_BASE + 4250)
/*--------------------------------------------------------------------
Beschreibung: Bereiche ausspannen
@@ -100,6 +101,10 @@
#define RC_ANNOTATION_BEGIN RC_ANNOTATION
#define RC_ANNOTATION_END (RC_ANNOTATION_BEGIN + 99)
+// Page frame
+#define RC_PAGEFRM_BEGIN RC_PAGEFRM
+#define RC_PAGEFRM_EN (RC_PAGEFRM + 99)
+
// SW/Web
#define RC_WEB_BEGIN RC_WEB
#define RC_WEB_END (RC_WEB_BEGIN + 199)
@@ -130,7 +135,7 @@
// globale Ressourcen
#define RC_GLOBALS_BEGIN RC_GLOBALS
-#define RC_GLOBALS_END (RC_GLOBALS_BEGIN + 119)
+#define RC_GLOBALS_END (RC_GLOBALS_BEGIN + 120)
// Format-Vorlagen
#define RC_FMTUI_BEGIN RC_FMTUI
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index d4242d35f383..ac1140820877 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -267,7 +268,6 @@ public:
void PushData( const SwRedline& rRedl, sal_Bool bOwnAsNext = sal_True );
sal_Bool PopData();
- // #111827#
/**
Returns textual description of this a redline data element of
this redline.
@@ -312,3 +312,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/redlnaut.hxx b/sw/inc/redlnaut.hxx
index e1a238f0704b..1764333b5d5d 100644
--- a/sw/inc/redlnaut.hxx
+++ b/sw/inc/redlnaut.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index fcd8ba2c70b8..06b897576279 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,7 +56,7 @@ enum REFERENCEMARK
REF_ONLYNUMBER,
REF_ONLYCAPTION,
REF_ONLYSEQNO,
- // --> OD 2007-08-24 #i81002#
+ // --> #i81002#
// new reference format types for referencing bookmarks and set references
REF_NUMBER,
REF_NUMBER_NO_CONTEXT,
@@ -102,11 +103,11 @@ private:
virtual String Expand() const;
virtual SwField* Copy() const;
- // --> OD 2007-08-24 #i81002#
+ // #i81002#
String MakeRefNumStr( const SwTxtNode& rTxtNodeOfField,
const SwTxtNode& rTxtNodeOfReferencedItem,
const sal_uInt32 nRefNumFormat ) const;
- // <--
+
public:
SwGetRefField( SwGetRefFieldType*, const String& rSetRef,
sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_uLong nFmt );
@@ -117,7 +118,7 @@ public:
const String& GetSetRefName() const { return sSetRefName; }
- // --> OD 2007-09-06 #i81002#
+ // #i81002#
// The <SwTxtFld> instance, which represents the text attribute for the
// <SwGetRefField> instance, has to be passed to the method.
// This <SwTxtFld> instance is needed for the reference format type REF_UPDOWN
@@ -125,21 +126,21 @@ public:
// Note: This instance may be NULL (field in Undo/Redo). This will cause
// no update for these reference format types.
void UpdateField( const SwTxtFld* pFldTxtAttr );
- // <--
+
void SetExpand( const String& rStr ) { sTxt = rStr; }
// SubType erfragen/setzen
virtual sal_uInt16 GetSubType() const;
virtual void SetSubType( sal_uInt16 n );
- // --> OD 2007-11-09 #i81002#
+ // --> #i81002#
bool IsRefToHeadingCrossRefBookmark() const;
bool IsRefToNumItemCrossRefBookmark() const;
const SwTxtNode* GetReferencedTxtNode() const;
// <--
- // --> OD 2008-01-09 #i85090#
+ // #i85090#
String GetExpandedTxtOfReferencedTxtNode() const;
- // <--
+
// SequenceNo erfragen/setzen (nur fuer REF_SEQUENCEFLD interressant)
sal_uInt16 GetSeqNo() const { return nSeqNo; }
@@ -150,8 +151,8 @@ public:
virtual void SetPar1(const String& rStr);
virtual String GetPar2() const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
void ConvertProgrammaticToUIName();
@@ -161,3 +162,4 @@ public:
#endif // SW_REFFLD_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx
index db9fe273a229..8637f4d43cd3 100644
--- a/sw/inc/ring.hxx
+++ b/sw/inc/ring.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/rubylist.hxx b/sw/inc/rubylist.hxx
index 7ade01996237..baf5faf6cdbf 100644
--- a/sw/inc/rubylist.hxx
+++ b/sw/inc/rubylist.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,5 @@ SV_DECL_PTRARR_DEL( SwRubyList, SwRubyListEntryPtr, 0, 32 )
#endif //_RUBYLIST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index 98948c228678..5a30cc0b502d 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,12 +65,6 @@ enum SectionType { CONTENT_SECTION,
TOX_CONTENT_SECTION,
DDE_LINK_SECTION = OBJECT_CLIENT_DDE,
FILE_LINK_SECTION = OBJECT_CLIENT_FILE
-/*
-// verbleiben noch:
- OBJECT_CLIENT_SO = 0x80,
- OBJECT_CLIENT_OLE = 0x82,
- OBJECT_CLIENT_OLE_CACHE = 0x83,
-*/
};
enum LinkCreateType
@@ -87,7 +82,7 @@ private:
String m_sSectionName;
String m_sCondition;
String m_sLinkFileName;
- String m_sLinkFilePassword; // JP 27.02.2001: must be changed to Sequence
+ String m_sLinkFilePassword; // must be changed to Sequence
::com::sun::star::uno::Sequence <sal_Int8> m_Password;
/// it seems this flag caches the current final "hidden" state
@@ -97,9 +92,9 @@ private:
/// format attr has value for this section, while flag is
/// effectively ORed with parent sections!
bool m_bProtectFlag : 1;
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
bool m_bEditInReadonlyFlag : 1;
- // <--
+
bool m_bHidden : 1; // all paragraphs hidden?
bool m_bCondHiddenFlag : 1; // Hiddenflag for condition
bool m_bConnectFlag : 1; // connected to server?
@@ -126,11 +121,9 @@ public:
bool IsProtectFlag() const { return m_bProtectFlag; }
SW_DLLPRIVATE void
SetProtectFlag(bool const bFlag) { m_bProtectFlag = bFlag; }
- // --> FME 2004-06-22 #114856# edit in readonly sections
bool IsEditInReadonlyFlag() const { return m_bEditInReadonlyFlag; }
void SetEditInReadonlyFlag(bool const bFlag)
{ m_bEditInReadonlyFlag = bFlag; }
- // <--
void SetCondHidden(bool const bFlag = true) { m_bCondHiddenFlag = bFlag; };
bool IsCondHidden() const { return m_bCondHiddenFlag; }
@@ -204,18 +197,14 @@ public:
void SetHidden (bool const bFlag = true);
bool IsProtect() const;
void SetProtect(bool const bFlag = true);
- // --> FME 2004-06-22 #114856# edit in readonly sections
bool IsEditInReadonly() const;
void SetEditInReadonly(bool const bFlag = true);
- // <--
// erfrage die internen Flags (Zustand inklusive Parents nicht, was
// aktuell an der Section gesetzt ist!!)
bool IsHiddenFlag() const { return m_Data.IsHiddenFlag(); }
bool IsProtectFlag() const { return m_Data.IsProtectFlag(); }
- // --> FME 2004-06-22 #114856# edit in readonly sections
bool IsEditInReadonlyFlag() const { return m_Data.IsEditInReadonlyFlag(); }
- // <--
void SetCondHidden(bool const bFlag = true);
bool IsCondHidden() const { return m_Data.IsCondHidden(); }
@@ -274,9 +263,7 @@ public:
// return the TOX base class if the section is a TOX section
const SwTOXBase* GetTOXBase() const;
- // --> OD 2007-02-14 #b6521322#
void BreakLink();
- // <--
};
@@ -387,3 +374,5 @@ inline SwSection* SwSectionFmt::GetParentSection() const
#endif /* _SECTION_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/shellid.hxx b/sw/inc/shellid.hxx
index 7ca50ff1e183..a8f247ef2a7d 100644
--- a/sw/inc/shellid.hxx
+++ b/sw/inc/shellid.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,4 +71,7 @@
#define SW_MEDIASHELL (SFX_INTERFACE_SW_START + 31)
#define SW_ANNOTATIONSHELL (SFX_INTERFACE_SW_START + 32)
+#define SW_NAVIGATIONSHELL (SFX_INTERFACE_SW_START + 33)
#endif // _UIPARAM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index acfb213911db..d87d1b2ca4ad 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,7 +47,6 @@
#include <swdllapi.h>
#include <swtypes.hxx>
#include <docfac.hxx> // SwDocFac
-#include <errhdl.hxx>
#include <iodetect.hxx>
// einige Forward - Deklarationen
@@ -60,7 +60,6 @@ class SvStream;
class SvStrings;
class SvxFontItem;
class SvxMacroTableDtor;
-//class Sw3Io;
class SwCntntNode;
class SwCrsrShell;
class SwDoc;
@@ -174,18 +173,15 @@ class SwReader: public SwDocFac
public:
/*
* Initiales Einlesen. Dokument wird erst beim Read(..) angelegt.
- * JP 25.04.95: oder falls es mitgegeben wird, in dieses.
+ * oder falls es mitgegeben wird, in dieses.
* Sonderfall fuer Load mit Sw3Reader
*/
- //SwReader( SotStorage&, const String& rFilename, SwDoc *pDoc = 0 );
- //SwReader( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFilename, SwDoc *pDoc = 0 );
SwReader( SfxMedium&, const String& rFilename, SwDoc *pDoc = 0 );
/*
* In ein existierendes Dokument einlesen, Dokument und
* Position im Dokument werden aus dem SwPaM uebernommen.
*/
SwReader( SvStream&, const String& rFilename, const String& rBaseURL, SwPaM& );
- //SwReader( SotStorage&, const String& rFilename, SwPaM& );
SwReader( SfxMedium&, const String& rFilename, SwPaM& );
SwReader( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFilename, SwPaM& );
@@ -208,7 +204,6 @@ protected:
-/* */
/**************** SPEZIELLE Reader ************************/
// spezielle - Reader koennen beides sein !! (Excel, W4W, .. )
@@ -220,7 +215,6 @@ class SW_DLLPUBLIC Reader
friend class SwReader;
SwDoc* pTemplate;
String aTemplateNm;
- //String sBaseURL;
Date aDStamp;
Time aTStamp;
@@ -305,18 +299,12 @@ public:
AsciiReader(): Reader() {}
};
-/*class SwgReader: public Reader
-{
- virtual sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
-};
-*/
class SW_DLLPUBLIC StgReader : public Reader
{
String aFltName;
protected:
sal_uLong OpenMainStream( SotStorageStreamRef& rRef, sal_uInt16& rBuffSize );
-
public:
virtual int GetReaderType();
const String& GetFltName() { return aFltName; }
@@ -324,22 +312,6 @@ public:
};
-/*class Sw3Reader : public StgReader
-{
- Sw3Io* pIO;
- virtual sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
-public:
- Sw3Reader() : pIO( 0 ) {}
-
- void SetSw3Io( Sw3Io* pIo ) { pIO = pIo; }
-
- // read the sections of the document, which is equal to the medium.
- // returns the count of it
- virtual sal_uInt16 GetSectionList( SfxMedium& rMedium,
- SvStrings& rStrings ) const;
-};*/
-
-/* */
////////////////////////////////////////////////////////////////////////////
// Der uebergebene Stream muss dynamisch angelegt werden und
@@ -350,8 +322,6 @@ class SwImpBlocks;
class SW_DLLPUBLIC SwTextBlocks
{
-// friend class Sw2TextBlocks;
-// friend class Sw3IoImp;
SwImpBlocks* pImp;
sal_uLong nErr;
@@ -412,7 +382,6 @@ extern void _FinitFilter();
extern SwRead ReadAscii, /*ReadSwg, ReadSw3, */ReadHTML, ReadXML;
-//SW_DLLPUBLIC SwRead SwGetReaderSw3();
SW_DLLPUBLIC SwRead SwGetReaderXML();
// END source/filter/basflt/fltini.cxx
@@ -421,7 +390,6 @@ SW_DLLPUBLIC SwRead SwGetReaderXML();
extern sal_Bool SetHTMLTemplate( SwDoc &rDoc ); //Fuer Vorlagen aus HTML.vor laden shellio.cxx
-/* */
/////////////////////////////////////////////////////////////////////////////
/*
@@ -494,7 +462,6 @@ public:
virtual void SetPasswd( const String& );
virtual void SetVersion( const String&, long );
virtual sal_Bool IsStgWriter() const;
-// virtual sal_Bool IsSw3Writer() const;
void SetShowProgress( sal_Bool bFlag = sal_False ) { bShowProgress = bFlag; }
@@ -577,22 +544,6 @@ public:
SotStorage& GetStorage() const { return *pStg; }
};
-/*class Sw3Writer : public StgWriter
-{
- Sw3Io* pIO;
- sal_Bool bSaveAs : 1;
-
- virtual sal_uLong WriteStorage();
- virtual sal_uLong WriteMedium( SfxMedium& );
-
-public:
- Sw3Writer() : pIO( 0 ), bSaveAs( sal_False ) {}
-
- virtual sal_Bool IsSw3Writer() const;
-};
-
-*/
-
// Schnittstellenklasse fuer den allgemeinen Zugriff auf die
// speziellen Writer
@@ -607,8 +558,6 @@ class SwWriter
SwCrsrShell *pShell;
SwDoc &rDoc;
- //String sBaseURL;
-
sal_Bool bWriteAll;
public:
@@ -618,19 +567,13 @@ public:
SwWriter( SvStream&, SwDoc & );
SwWriter( SvStream&, SwPaM &, sal_Bool bWriteAll = sal_False );
-// SwWriter( SotStorage&, SwCrsrShell &,sal_Bool bWriteAll = sal_False );
SwWriter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, SwDoc& );
-// SwWriter( SotStorage&, SwPaM&, sal_Bool bWriteAll = sal_False );
SwWriter( SfxMedium&, SwCrsrShell &,sal_Bool bWriteAll = sal_False );
SwWriter( SfxMedium&, SwDoc & );
-// SwWriter( SfxMedium&, SwPaM&, sal_Bool bWriteAll = sal_False );
-
- //const String& GetBaseURL() const { return sBaseURL;}
};
-/* */
/////////////////////////////////////////////////////////////////////////////
typedef Reader* (*FnGetReader)();
@@ -670,9 +613,10 @@ namespace SwReaderWriter
void GetRTFWriter( const String&, const String&, WriterRef& );
void GetASCWriter( const String&, const String&, WriterRef& );
-//void GetSw3Writer( const String&, const String&, WriterRef& );
void GetHTMLWriter( const String&, const String&, WriterRef& );
void GetXMLWriter( const String&, const String&, WriterRef& );
void GetWW8Writer( const String&, const String&, WriterRef& );
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx
index 02f9742016ad..4af688fd89f0 100644
--- a/sw/inc/shellres.hxx
+++ b/sw/inc/shellres.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <tools/string.hxx>
-#ifndef _BITMAP_HXX //autogen
#include <vcl/bitmap.hxx>
-#endif
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
@@ -59,10 +58,8 @@ struct SW_DLLPUBLIC ShellResource : public Resource
// fuers GetRefFeld - oben/unten
String aGetRefFld_Up;
String aGetRefFld_Down;
- // --> OD 2007-09-13 #i81002#
// for GetRefField - referenced item not found
String aGetRefFld_RefItemNotFound;
- // <--
// fuer dynamisches Menu - String "alle"
String aStrAllPageHeadFoot;
// fuer einige Listboxen - String "keine"
@@ -85,18 +82,19 @@ struct SW_DLLPUBLIC ShellResource : public Resource
SvStringsDtor aDocInfoLst;
- // Fly-Anker Bmps
-// Bitmap aAnchorBmp;
-// Bitmap aDragAnchorBmp;
-
// die AutoFormat-Redline-Kommentare
inline const SvStringsDtor& GetAutoFmtNameLst() const;
+ enum PageNameMode
+ {
+ NORMAL_PAGE,
+ FIRST_PAGE,
+ FOLLOW_PAGE
+ };
// returns for the specific filter the new names of pagedescs
// This method is for the old code of the specific filters with
// now localized names
- String GetPageDescName( sal_uInt16 nNo, sal_Bool bFirst = sal_False,
- sal_Bool bFollow = sal_False );
+ String GetPageDescName( sal_uInt16 nNo, PageNameMode eMode );
ShellResource();
~ShellResource();
@@ -118,3 +116,5 @@ inline const SvStringsDtor& ShellResource::GetAutoFmtNameLst() const
#endif //_SHELLRES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/sortopt.hxx b/sw/inc/sortopt.hxx
index dbb58486f879..128ba771881b 100644
--- a/sw/inc/sortopt.hxx
+++ b/sw/inc/sortopt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,5 @@ struct SW_DLLPUBLIC SwSortOptions
};
#endif // _SORTOPT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
index 6de36a6ee245..a2c370a8b12f 100644
--- a/sw/inc/splargs.hxx
+++ b/sw/inc/splargs.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -178,3 +179,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/stringhash.hxx b/sw/inc/stringhash.hxx
index 12c7dc28b857..27a3b26327bc 100644
--- a/sw/inc/stringhash.hxx
+++ b/sw/inc/stringhash.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,5 @@ struct StringHashRef
}
};
#endif // _STRINGHASH_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/sw_primitivetypes2d.hxx b/sw/inc/sw_primitivetypes2d.hxx
index 12e245791f4c..5c03627704ec 100644
--- a/sw/inc/sw_primitivetypes2d.hxx
+++ b/sw/inc/sw_primitivetypes2d.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef INCLUDED_SW_PRIMITIVETYPES2D_HXX
#define INCLUDED_SW_PRIMITIVETYPES2D_HXX
-#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PRIMITIVETYPES2D_HXX
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
-#endif
//////////////////////////////////////////////////////////////////////////////
@@ -44,3 +43,5 @@
//////////////////////////////////////////////////////////////////////////////
// eof
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 2768cc50bc82..d5219da395ba 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,9 +35,7 @@
#include <sfx2/sfxdlg.hxx>
#include <svx/svxdlg.hxx>
#include <vcl/syswin.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/frame/XModel.hpp>
@@ -257,14 +256,14 @@ public:
virtual void SetWindowState( const ByteString& rStr ) =0;//this method inherit from SystemWindow
};
-class AbstarctSwLabDlg : public SfxAbstractTabDialog //add for SwLabDlg
+class AbstractSwLabDlg : public SfxAbstractTabDialog //add for SwLabDlg
{
public:
virtual const String& GetBusinessCardStr() const = 0;
virtual Printer *GetPrt() =0;
};
-class AbstarctSwSelGlossaryDlg : public VclAbstractDialog //add for SwSelGlossaryDlg
+class AbstractSwSelGlossaryDlg : public VclAbstractDialog //add for SwSelGlossaryDlg
{
public:
virtual void InsertGlos(const String &rRegion, const String &rGlosName) = 0; // inline
@@ -373,7 +372,7 @@ public:
virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert,int nResId ) = 0; //add for SwEnvDlg
- virtual AbstarctSwLabDlg* CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
+ virtual AbstractSwLabDlg* CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId ) = 0;
virtual SwLabDlgMethod GetSwLabDlgStaticMethod () =0;//add for SwLabDlg
@@ -387,7 +386,7 @@ public:
sal_Bool bDraw = sal_False,
sal_uInt16 nDefPage = 0) = 0;
- virtual AbstarctSwSelGlossaryDlg * CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId ) = 0; //add for SwSelGlossaryDlg
+ virtual AbstractSwSelGlossaryDlg * CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId ) = 0; //add for SwSelGlossaryDlg
virtual VclAbstractDialog * CreateVclAbstractDialog ( Window * pParent, SwWrtShell &rSh, int nResId ) = 0; //add for SwTableHeightDlg SwSortDlg
virtual AbstractSplitTableDialog * CreateSplitTblDialog ( Window * pParent, SwWrtShell &rSh ) = 0; //add for SwSplitTblDlg
@@ -435,6 +434,7 @@ public:
SwField* pField, sal_Bool bNextButton = sal_False ) = 0; //add for SwFldInputDlg
virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId,
Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False) = 0; //add for SwInsFootNoteDlg
+ virtual VclAbstractDialog* CreateTitlePageDlg ( Window * pParent ) = 0;
virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
SwView& rView, sal_Bool bCol = sal_False ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
@@ -496,3 +496,4 @@ public:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swacorr.hxx b/sw/inc/swacorr.hxx
index c83bc740ea0a..f3086864ae7c 100644
--- a/sw/inc/swacorr.hxx
+++ b/sw/inc/swacorr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx
index cc2f1532a6fc..3bce308ee1d4 100644
--- a/sw/inc/swatrset.hxx
+++ b/sw/inc/swatrset.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,12 +101,10 @@ class SwFmtNoBalancedColumns;
class SvxFrameDirectionItem;
class SwTextGridItem;
class SwHeaderAndFooterEatSpacingItem;
-// OD 18.09.2003 #i18732#
class SwFmtFollowTextFlow;
-// OD 2004-05-05 #i28701#
class SwFmtWrapInfluenceOnObjPos;
-// Grafik-Attribute
+// Graphic attributes
class SwMirrorGrf;
class SwCropGrf;
class SwRotationGrf;
@@ -119,7 +118,7 @@ class SwInvertGrf;
class SwTransparencyGrf;
class SwDrawModeGrf;
-// Paragraph-Attribute
+// Paragraph attributes
class SvxLineSpacingItem;
class SvxAdjustItem;
class SvxFmtSplitItem;
@@ -137,7 +136,7 @@ class SvxParaVertAlignItem;
class SvxParaGridItem;
class SwParaConnectBorderItem;
-// TabellenBox-Attribute
+// TableBox attributes
class SwTblBoxNumFormat;
class SwTblBoxFormula;
class SwTblBoxValue;
@@ -150,7 +149,7 @@ class SwAttrPool : public SfxItemPool
static sal_uInt16* pVersionMap2;
static sal_uInt16* pVersionMap3;
static sal_uInt16* pVersionMap4;
- // OD 2004-01-21 #i18732# - due to extension of attribute set a new version
+ // due to extension of attribute set a new version
// map for binary filter is necessary (version map 5).
static sal_uInt16* pVersionMap5;
static sal_uInt16* pVersionMap6;
@@ -175,7 +174,7 @@ public:
class SW_DLLPUBLIC SwAttrSet : public SfxItemSet
{
- // Pointer fuers Modify-System
+ // Pointer for Modify-System
SwAttrSet *pOldSet, *pNewSet;
// Notification-Callback
@@ -225,7 +224,6 @@ public:
// den Parents gesucht werden soll. Wird nichts gefunden,
// wird das deflt. Attribut returnt.
// Charakter-Attribute - impl. steht im charatr.hxx
- // AMA 12.10.94: Umstellung von SwFmt... auf Svx...
inline const SvxPostureItem &GetPosture( sal_Bool = sal_True ) const;
inline const SvxWeightItem &GetWeight( sal_Bool = sal_True ) const;
inline const SvxShadowedItem &GetShadowed( sal_Bool = sal_True ) const;
@@ -301,12 +299,10 @@ public:
inline const SvxFrameDirectionItem &GetFrmDir( sal_Bool = sal_True ) const;
inline const SwTextGridItem &GetTextGrid( sal_Bool = sal_True ) const;
inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( sal_Bool = sal_True ) const;
- // OD 18.09.2003 #i18732#
inline const SwFmtFollowTextFlow &GetFollowTextFlow(sal_Bool = sal_True) const;
- // OD 2004-05-05 #i28701#
inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(sal_Bool = sal_True) const;
- // Grafik-Attribute - impl. steht im grfatr.hxx
+ // Graphic attributes - implementation in grfatr.hxx
inline const SwMirrorGrf &GetMirrorGrf( sal_Bool = sal_True ) const;
inline const SwCropGrf &GetCropGrf( sal_Bool = sal_True ) const;
inline const SwRotationGrf &GetRotationGrf(sal_Bool = sal_True ) const;
@@ -320,7 +316,7 @@ public:
inline const SwTransparencyGrf &GetTransparencyGrf(sal_Bool = sal_True ) const;
inline const SwDrawModeGrf &GetDrawModeGrf(sal_Bool = sal_True ) const;
- // Paragraph-Attribute - impl. steht im paratr.hxx
+ // Paragraph attributes - implementation in paratr.hxx
inline const SvxLineSpacingItem &GetLineSpacing( sal_Bool = sal_True ) const;
inline const SvxAdjustItem &GetAdjust( sal_Bool = sal_True ) const;
inline const SvxFmtSplitItem &GetSplit( sal_Bool = sal_True ) const;
@@ -338,7 +334,7 @@ public:
inline const SvxParaGridItem &GetParaGrid(sal_Bool = sal_True) const;
inline const SwParaConnectBorderItem &GetParaConnectBorder(sal_Bool = sal_True ) const;
- // TabellenBox-Attribute - impl. steht im cellatr.hxx
+ // Tablebox attributes - implementation in cellatr.hxx
inline const SwTblBoxNumFormat &GetTblBoxNumFmt( sal_Bool = sal_True ) const;
inline const SwTblBoxFormula &GetTblBoxFormula( sal_Bool = sal_True ) const;
inline const SwTblBoxValue &GetTblBoxValue( sal_Bool = sal_True ) const;
@@ -351,3 +347,5 @@ SW_DLLPUBLIC long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentS
const SwAttrSet &rSet,
const OutputDevice &rOut, sal_Int16 nScript);
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swbaslnk.hxx b/sw/inc/swbaslnk.hxx
index 46fbb36df723..b558aa19ca9f 100644
--- a/sw/inc/swbaslnk.hxx
+++ b/sw/inc/swbaslnk.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swcalwrp.hxx b/sw/inc/swcalwrp.hxx
index f7def58ab211..0adf78ebf2fa 100644
--- a/sw/inc/swcalwrp.hxx
+++ b/sw/inc/swcalwrp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,4 @@ salhelper::SingletonRef<SwCalendarWrapper>* s_getCalendarWrapper();
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swcli.hxx b/sw/inc/swcli.hxx
index 86a42512475f..f0a186047907 100644
--- a/sw/inc/swcli.hxx
+++ b/sw/inc/swcli.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <svtools/embedhlp.hxx>
-#ifndef _SFX_CLIENTSH_HXX //autogen
#include <sfx2/ipclient.hxx>
-#endif
class SwView;
class SwEditWin;
@@ -58,3 +57,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swcommands.h b/sw/inc/swcommands.h
index 8d3fe63b75bb..77b30ca59f7a 100644
--- a/sw/inc/swcommands.h
+++ b/sw/inc/swcommands.h
@@ -163,6 +163,9 @@
#define CMD_FN_VIEW_GRAPHIC ".uno:Graphic"
#define CMD_FN_FORMAT_GRAFIC_DLG ".uno:GraphicDialog"
#define CMD_FN_SAVE_GRAPHIC ".uno:SaveGraphic"
+#define CMD_FN_EXTERNAL_EDIT ".uno:ExternalEdit"
+#define CMD_FN_EXPORT_OLE_AS_PDF ".uno:ExportOleAsPDF"
+#define CMD_FN_EXPORT_OLE_AS_GRAPHIC ".uno:ExportOleAsGraphic"
#define CMD_FN_GROW_FONT_SIZE ".uno:Grow"
#define CMD_FN_HSCROLLBAR ".uno:HScroll"
#define CMD_SID_HTML_MODE ".uno:HtmlMode"
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index daa33e4f232a..57c41714e75a 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -206,7 +207,8 @@ public:
sal_Bool bChgCrsr = sal_True );
sal_Bool IsNoCntnt() const;
- void RestoreSavePos(); // Point auf die SavePos setzen
+ /** Restore cursor state to the one saved by SwCrsrSaveState **/
+ void RestoreSavePos();
// sal_True: an die Position kann der Cursor gesetzt werden
virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
@@ -230,6 +232,13 @@ public:
};
+/**
+ A helper class to save cursor state (position). Create SwCrsrSaveState
+ object to save current state, use SwCursor::RestoreSavePos() to actually
+ restore cursor state to the saved state (SwCrsrSaveState destructor only
+ removes the saved state from an internal stack). It is possible to stack
+ several SwCrsrSaveState objects.
+**/
class SwCrsrSaveState
{
SwCursor& rCrsr;
@@ -238,6 +247,7 @@ public:
~SwCrsrSaveState() { rCrsr.RestoreState(); }
};
+// internal, used by SwCursor::SaveState() etc.
struct _SwCursor_SavePos
{
sal_uLong nNode;
@@ -310,3 +320,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swdbdata.hxx b/sw/inc/swdbdata.hxx
index a19cd67e8783..82b2c645eb78 100644
--- a/sw/inc/swdbdata.hxx
+++ b/sw/inc/swdbdata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,4 @@ struct SwDBData
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swdbtoolsclient.hxx b/sw/inc/swdbtoolsclient.hxx
index 067e58cbcf52..0174125cec5f 100644
--- a/sw/inc/swdbtoolsclient.hxx
+++ b/sw/inc/swdbtoolsclient.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,9 +33,9 @@
#include <osl/module.h>
#include "swdllapi.h"
-/* -----------------------------30.08.2001 11:01------------------------------
+/*
Client to use the dbtools library as load-on-call
- ---------------------------------------------------------------------------*/
+*/
class SW_DLLPUBLIC SwDbtoolsClient
{
private:
@@ -74,3 +75,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx
index f7e7bb56f97d..57e000a998c5 100644
--- a/sw/inc/swddetbl.hxx
+++ b/sw/inc/swddetbl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,5 @@ inline const SwDDEFieldType* SwDDETable::GetDDEFldType() const
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swdll.hxx b/sw/inc/swdll.hxx
index dd033fdea760..503aedfe6559 100644
--- a/sw/inc/swdll.hxx
+++ b/sw/inc/swdll.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,13 +39,12 @@ class StatusBar;
class SwDLL
-/* [Description]
-
- This class is a wrapper for a Load-On-Demand-DLL. One instance
- per SfxApplication will be created for the runtime of
- SfxApplication-subclass::Main().
-
- Remember: Do export this class! It is used by the application.
+/**
+ * This class is a wrapper for a Load-On-Demand-DLL. One instance
+ * per SfxApplication will be created for the runtime of
+ * SfxApplication-subclass::Main().
+ *
+ * Remember: Do export this class! It is used by the application.
*/
{
@@ -67,3 +67,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swdllapi.h b/sw/inc/swdllapi.h
index f4c9e30020e6..a17f20ac165f 100644
--- a/sw/inc/swdllapi.h
+++ b/sw/inc/swdllapi.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef INCLUDED_SWDLLAPI_H
#define INCLUDED_SWDLLAPI_H
@@ -11,3 +12,5 @@
#define SW_DLLPRIVATE SAL_DLLPRIVATE
#endif /* INCLUDED_SWDLLAPI_H */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swerror.h b/sw/inc/swerror.h
index 74755e45b74b..5453c32cc74b 100644
--- a/sw/inc/swerror.h
+++ b/sw/inc/swerror.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,7 @@
#define WARN_SW_WRITE_BASE (WARN_SW_BASE | ERRCODE_CLASS_WRITE )
-// Import Fehler
+// Import Errors
#define ERR_SWG_FILE_FORMAT_ERROR (ERROR_SW_READ_BASE | 1 )
#define ERR_SWG_READ_ERROR (ERROR_SW_READ_BASE | 2 )
@@ -58,17 +59,17 @@
#define ERR_FORMAT_FILE_ROWCOL (ERROR_SW_READ_BASE | 15)
-// Export Fehler
+// Export errors
#define ERR_SWG_WRITE_ERROR (ERROR_SW_WRITE_BASE | 30 )
#define ERR_SWG_OLD_GLOSSARY (ERROR_SW_WRITE_BASE | 31 )
#define ERR_WRITE_ERROR_FILE (ERROR_SW_WRITE_BASE | 35 )
-// Import/Export Fehler
+// Import/Export errors
#define ERR_SWG_INTERNAL_ERROR (ERROR_SW_BASE | 50 )
#define ERR_TXTBLOCK_NEWFILE_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_LOCKING | 55 )
-// weitere Fehler und Fehlerklassen
+// other errors and errorclasses
#define ERR_AUTOPATH_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_PATH | 55 )
#define ERR_TBLSPLIT_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 56 )
#define ERR_TBLINSCOL_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 57 )
@@ -95,12 +96,12 @@
#ifndef __RSC
-inline FASTBOOL IsWarning( sal_uLong nErr )
+inline bool IsWarning( sal_uLong nErr )
{
return 0 != ( nErr & ERRCODE_WARNING_MASK & nErr );
}
-inline FASTBOOL IsError( sal_uLong nErr )
+inline bool IsError( sal_uLong nErr )
{
return nErr && 0 == ( ERRCODE_WARNING_MASK & nErr );
}
@@ -110,3 +111,4 @@ inline FASTBOOL IsError( sal_uLong nErr )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx
index 4194042d2327..5ab89f70dc9b 100644
--- a/sw/inc/swevent.hxx
+++ b/sw/inc/swevent.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,8 +29,6 @@
#ifndef _SWEVENT_HXX
#define _SWEVENT_HXX
-// #include *****************************************************************
-
#include <tools/solar.h>
#include <sfx2/sfx.hrc>
@@ -127,3 +126,4 @@ struct SwCallMouseEvent
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swfltopt.hxx b/sw/inc/swfltopt.hxx
index 50f645db8cfb..8049260f4a02 100644
--- a/sw/inc/swfltopt.hxx
+++ b/sw/inc/swfltopt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swgstr.hxx b/sw/inc/swgstr.hxx
index 8b65028166a3..8f3fb8ea4464 100644
--- a/sw/inc/swgstr.hxx
+++ b/sw/inc/swgstr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -146,3 +147,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swhints.hxx b/sw/inc/swhints.hxx
index c4a29135abcb..47dda0d67fd1 100644
--- a/sw/inc/swhints.hxx
+++ b/sw/inc/swhints.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,3 +35,5 @@
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx
index 2682d2c9eaf1..c30c33d47889 100644
--- a/sw/inc/swmodule.hxx
+++ b/sw/inc/swmodule.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,6 @@
#include <sfx2/module.hxx>
#include <tools/shl.hxx>
-#include <svl/lstner.hxx>
#include "swdllapi.h"
#include "shellid.hxx"
#include <fldupde.hxx>
@@ -169,6 +169,8 @@ public:
//default page mode for text grid
void ApplyDefaultPageMode(sal_Bool bIsSquaredPageMode);
+ void ApplyUserCharUnit(sal_Bool bApplyChar, sal_Bool bWeb); // apply_char_unit
+
// ConfigItems erzeugen
SwModuleOptions* GetModuleConfig() { return pModuleConfig;}
SwPrintOptions* GetPrtOptions(sal_Bool bWeb);
@@ -266,9 +268,9 @@ inline void SwModule::SetLngSvcEvtListener(
}
-/*-----------------08.07.97 10.33-------------------
+/*
Zugriff auf das SwModule, die ::com::sun::star::sdbcx::View und die Shell
---------------------------------------------------*/
+*/
#define SW_MOD() ( *(SwModule**) GetAppData(SHL_WRITER))
@@ -276,3 +278,5 @@ SW_DLLPUBLIC SwView* GetActiveView();
SW_DLLPUBLIC SwWrtShell* GetActiveWrtShell();
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
index 1cf85bfd5c42..1209a200a6d4 100644
--- a/sw/inc/swrect.hxx
+++ b/sw/inc/swrect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,7 +27,7 @@
************************************************************************/
#ifndef _SWRECT_HXX
#define _SWRECT_HXX
-#include "errhdl.hxx"
+#include <osl/diagnose.h>
#include <tools/gen.hxx>
class SvStream;
@@ -43,10 +44,10 @@ public:
inline SwRect( const Point& rLT, const Point& rRB );
inline SwRect( long X, long Y, long Width, long Height );
- //SV-SS z.B. SwRect( pWin->GetClipRect() );
+ //SV-SS e.g. SwRect( pWin->GetClipRect() );
SwRect( const Rectangle &rRect );
- //Set-Methoden
+ //Set-Methods
inline void Chg( const Point& rNP, const Size &rNS );
inline void Pos( const Point& rNew );
inline void Pos( const long nNewX, const long nNewY );
@@ -59,7 +60,7 @@ public:
inline void Top( const long nTop );
inline void Bottom( const long nBottom );
- //Get-Methoden
+ //Get-Methods
inline const Point &Pos() const;
inline const Size &SSize() const;
inline long Width() const;
@@ -103,13 +104,9 @@ public:
inline SwRect &operator+=( const Size &rSz );
inline SwRect &operator-=( const Size &rSz );
- //SV-SS z.B. pWin->DrawRect( aSwRect.SVRect() );
+ //SV-SS e.g. pWin->DrawRect( aSwRect.SVRect() );
inline Rectangle SVRect() const;
- //Zortech wuerde hier fehlerhaften Code erzeugen.
-// inline operator SRectangle() const;
-// inline operator Rectangle() const { return Rectangle( aPos, aSize ); }
-
// Ausgabeoperator fuer die Debugging-Gemeinde
friend SvStream &operator<<( SvStream &rStream, const SwRect &rRect );
@@ -157,7 +154,7 @@ public:
sal_Bool OverStepRight( long ) const;
};
-// Implementation in in swrect.cxx
+// Implementation in swrect.cxx
extern SvStream &operator<<( SvStream &rStream, const SwRect &rRect );
typedef void (SwRect:: *SwRectSet)( const long nNew );
@@ -169,7 +166,7 @@ typedef long (SwRect:: *SwRectDist)( long ) const;
typedef void (SwRect:: *SwRectSetTwice)( long, long );
typedef void (SwRect:: *SwRectSetPos)( const Point& );
-//---------------------------------- Set-Methoden
+// Set-Methods
inline void SwRect::Chg( const Point& rNP, const Size &rNS )
{
m_Point = rNP;
@@ -220,7 +217,7 @@ inline void SwRect::Bottom( const long nBottom )
m_Size.setHeight(nBottom - m_Point.getY() + 1);
}
-//----------------------------------- Get-Methoden
+// Get-Methods
inline const Point &SwRect::Pos() const
{
return m_Point;
@@ -262,7 +259,7 @@ inline long SwRect::Bottom() const
return m_Size.getHeight() ? m_Point.getY() + m_Size.getHeight() - 1 : m_Point.getY();
}
-//----------------------------------- operatoren
+// operators
inline SwRect &SwRect::operator = ( const SwRect &rRect )
{
m_Point = rRect.m_Point;
@@ -303,10 +300,10 @@ inline SwRect &SwRect::operator-=( const Size &rSz )
}
-//--------------------------- Sonstiges
+// other
inline Rectangle SwRect::SVRect() const
{
- ASSERT( !IsEmpty(), "SVRect() without Width or Height" );
+ OSL_ENSURE( !IsEmpty(), "SVRect() without Width or Height" );
return Rectangle( m_Point.getX(), m_Point.getY(),
m_Point.getX() + m_Size.getWidth() - 1, //Right()
m_Point.getY() + m_Size.getHeight() - 1 ); //Bottom()
@@ -333,7 +330,7 @@ inline void SwRect::Clear()
m_Size.setHeight(0);
}
-//-------------------------- CToren
+// constructors
inline SwRect::SwRect() :
m_Point( 0, 0 ),
m_Size( 0, 0 )
@@ -362,3 +359,5 @@ inline SwRect::SwRect( long X, long Y, long W, long H ) :
#endif //_SWRECT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swregion.hxx b/sw/inc/swregion.hxx
index 5693622409aa..981391e0f61a 100644
--- a/sw/inc/swregion.hxx
+++ b/sw/inc/swregion.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,5 @@ public:
};
#endif //_SWREGION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swserv.hxx b/sw/inc/swserv.hxx
index 797c57db44d7..d9fd298fab02 100644
--- a/sw/inc/swserv.hxx
+++ b/sw/inc/swserv.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,3 +92,4 @@ SV_DECL_REF( SwServerObject )
#endif // _SWSERV_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swstyle.h b/sw/inc/swstyle.h
index cd266fb3d68d..b93510c9abf0 100644
--- a/sw/inc/swstyle.h
+++ b/sw/inc/swstyle.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,3 +40,4 @@
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 2dd3bfaf7467..7df49e2cd355 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,20 +28,19 @@
#ifndef _SWTABLE_HXX
#define _SWTABLE_HXX
#include <tools/mempool.hxx>
-#ifndef _TOOLS_REF_HXX
#include <tools/ref.hxx>
-#endif
#include <svl/svarray.hxx>
#include <tblenum.hxx>
#include <swtypes.hxx>
#include <calbck.hxx>
#include <swrect.hxx>
-#ifndef DBG_UTIL
-#include <node.hxx> // fuer StartNode->GetMyIndex
-#else
+
+#if OSL_DEBUG_LEVEL > 1
class SwStartNode;
#include <memory>
#include <boost/noncopyable.hpp>
+#else
+#include <node.hxx> // fuer StartNode->GetMyIndex
#endif
class Color;
@@ -110,7 +110,7 @@ protected:
sal_Bool bModifyLocked :1;
sal_Bool bNewModel :1; // sal_False: old SubTableModel; sal_True: new RowSpanModel
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bool bDontChangeModel; // This is set by functions (like Merge()) to forbid a laet model change
#endif
@@ -209,7 +209,7 @@ public:
sal_Bool Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, const SwSelBoxes& rMerged,
SwTableBox* pMergeBox, SwUndoTblMerge* pUndo = 0 )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bDontChangeModel = true;
#endif
return bNewModel ? NewMerge( pDoc, rBoxes, rMerged, pMergeBox, pUndo ) :
@@ -218,7 +218,7 @@ public:
sal_Bool SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1,
sal_Bool bSameHeight = sal_False )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bDontChangeModel = true;
#endif
return bNewModel ? NewSplitRow( pDoc, rBoxes, nCnt, bSameHeight ) :
@@ -250,19 +250,17 @@ public:
// lese die 1. Nummer und loesche sie aus dem String
// (wird von GetTblBox und SwTblFld benutzt)
- // --> OD 2007-08-03 #i80314#
+ // #i80314#
// add 3rd parameter in order to control validation check on <rStr>
static sal_uInt16 _GetBoxNum( String& rStr,
sal_Bool bFirst = sal_False,
const bool bPerformValidCheck = false );
- // <--
// suche die Inhaltstragende Box mit dem Namen
- // --> OD 2007-08-03 #i80314#
+ // #i80314#
// add 2nd parameter in order to control validation check in called method
// <_GetBoxNum(..)>
const SwTableBox* GetTblBox( const String& rName,
const bool bPerformValidCheck = false ) const;
- // <--
// kopiere die selektierten Boxen in ein anderes Dokument.
sal_Bool MakeCopy( SwDoc*, const SwPosition&, const SwSelBoxes&,
sal_Bool bCpyNds = sal_True, sal_Bool bCpyName = sal_False ) const;
@@ -322,7 +320,7 @@ public:
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
sal_Bool SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
void CheckConsistency() const;
#endif
};
@@ -411,10 +409,10 @@ public:
const SwStartNode *GetSttNd() const { return pSttNd; }
sal_uLong GetSttIdx() const
-#ifndef DBG_UTIL
- { return pSttNd ? pSttNd->GetIndex() : 0; }
-#else
+#if OSL_DEBUG_LEVEL > 1
;
+#else
+ { return pSttNd ? pSttNd->GetIndex() : 0; }
#endif
// suche nach der naechsten/vorherigen Box mit Inhalt
@@ -488,3 +486,5 @@ public:
};
#endif //_SWTABLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx
index 96479197cde6..fb7a63efb9b4 100644
--- a/sw/inc/swtblfmt.hxx
+++ b/sw/inc/swtblfmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,3 +98,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
index 1f417052638d..87399c808ef6 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,8 +41,6 @@
#include <com/sun/star/uno/Reference.h>
#include "swdllapi.h"
#include <i18npool/lang.h>
-// wenn das hier geaendert wird, dann auch im globals.hrc aendern!!!
-//#define SW_FILEFORMAT_40 SOFFICE_FILEFORMAT_40
namespace com { namespace sun { namespace star {
namespace linguistic2{
@@ -74,7 +73,7 @@ typedef long SwTwips;
#define TWIPS_MAX (LONG_MAX - 1)
#define MM50 283 // 1/2 cm in TWIPS
-// --> OD 2004-06-18 #i19922# - constant for minimal page header/footer height of 1mm
+
const SwTwips cMinHdFtHeight = 56;
#define MINFLY 23 //Minimalgroesse fuer FlyFrms
@@ -119,8 +118,6 @@ enum SwLabelType
const sal_uInt8 OLD_MAXLEVEL = 5;
const sal_uInt8 MAXLEVEL = 10; //Ehemals numrule.hxx
const sal_uInt8 NO_NUM = 200; //Ehemals numrule.hxx
-//const sal_uInt8 NO_NUMBERING = 201; //Ehemals numrule.hxx //#outline level,removed by zhaojianwei
-//const sal_uInt8 NO_INIT = 202; //Ehemals numrule.hxx
// fuer Absaetze mit NO_NUM aber auf unterschiedlichen Leveln
// DAMIT entfaellt das NO_NUM !!!!
@@ -144,13 +141,11 @@ extern SwPathFinder *pPathFinder;
// (fuer die weiteren Ebenen sind die Werte mit den Ebenen+1 zu
// multiplizieren; Ebenen 0..4 !!!)
-// -> #i30312#
const sal_uInt16 lBullIndent = 1440/4;
const short lBullFirstLineOffset = -lBullIndent;
const sal_uInt16 lNumIndent = 1440/4;
const short lNumFirstLineOffset = -lNumIndent;
const short lOutlineMinTextDistance = 216; // 0.15 inch = 0.38 cm
-// <- #i30312#
// Anzahl der SystemField-Types vom SwDoc
#define INIT_FLDTYPES 32
@@ -199,13 +194,13 @@ SW_DLLPUBLIC Size GetGraphicSizeTwip( const Graphic&, OutputDevice* pOutDev );
// Seperator fuer Sprunge im Dokument auf verschiedene Inhalttype
const sal_Unicode cMarkSeperator = '|';
-extern const sal_Char* __FAR_DATA pMarkToTable; // Strings stehen
-extern const sal_Char* __FAR_DATA pMarkToFrame; // im Init.cxx
-extern const sal_Char* __FAR_DATA pMarkToRegion;
-SW_DLLPUBLIC extern const sal_Char* __FAR_DATA pMarkToOutline;
-extern const sal_Char* __FAR_DATA pMarkToText;
-extern const sal_Char* __FAR_DATA pMarkToGraphic;
-extern const sal_Char* __FAR_DATA pMarkToOLE;
+extern const sal_Char* pMarkToTable; // Strings stehen
+extern const sal_Char* pMarkToFrame; // im Init.cxx
+extern const sal_Char* pMarkToRegion;
+SW_DLLPUBLIC extern const sal_Char* pMarkToOutline;
+extern const sal_Char* pMarkToText;
+extern const sal_Char* pMarkToGraphic;
+extern const sal_Char* pMarkToOLE;
#ifndef DB_DELIM // Ist in OFA definiert!!!
#define DB_DELIM ((sal_Unicode)0xff) // Datenbank <-> Tabellen-Trenner
@@ -277,7 +272,6 @@ SW_DLLPUBLIC CollatorWrapper& GetAppCaseCollator();
SW_DLLPUBLIC const ::utl::TransliterationWrapper& GetAppCmpStrIgnore();
-// --> OD 2004-06-30 #i28701# - moved from <frame.hxx>
//fuer Prepare() zur Benachrichtigung des Inhaltes durch das Layout auf
//dem kurzen Dienstweg.
//Der Inhalt sorgt dafuer, dass beim naechsten Aufruf von ::Format() das
@@ -333,6 +327,7 @@ enum PrepareHint
PREP_ERGOSUM, //wg. Bewegung in FtnFrms QuoVadis/ErgoSum pruefen
PREP_END //END
};
-// <--
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx
index 3506a7e176b9..f2785d32cb26 100644
--- a/sw/inc/swundo.hxx
+++ b/sw/inc/swundo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,10 +83,8 @@ enum SwUndoId
UNDO_MERGE_TABLE, // 38
UNDO_TRANSLITERATE, // 39
- // -> #111827#
- UNDO_PASTE_CLIPBOARD, // 40
+ UNDO_PASTE_CLIPBOARD, // 40
UNDO_TYPING, // 41
- // <- #111827#
UNDO_REPEAT_DUMMY_6, // 42
UNDO_REPEAT_DUMMY_7, // 43
UNDO_REPEAT_DUMMY_8, // 44
@@ -133,13 +132,13 @@ enum SwUndoId
UNDO_SETFLYFRMFMT, // 84
UNDO_SETRUBYATTR, // 85
- UNDO_TMPAUTOCORR, // 86 #102505#
+ UNDO_TMPAUTOCORR, // 86
UNDO_TOXCHANGE, // 87
UNDO_CREATE_PAGEDESC, // 88
UNDO_CHANGE_PAGEDESC, // 89
UNDO_DELETE_PAGEDESC, // 90
UNDO_HEADER_FOOTER, // 91 #i7983#
- UNDO_FIELD, // 92 #111840#
+ UNDO_FIELD, // 92
UNDO_TXTFMTCOL_CREATE, // 93
UNDO_TXTFMTCOL_DELETE, // 94
UNDO_TXTFMTCOL_RENAME, // 95
@@ -159,7 +158,7 @@ enum SwUndoId
UNDO_ROW_DELETE, // 109
UNDO_RENAME_PAGEDESC, // 110
UNDO_NUMDOWN, // 111
- // --> OD 2009-07-16 #i73249#
+ // --> #i73249#
UNDO_FLYFRMFMT_TITLE, // 112
UNDO_FLYFRMFMT_DESCRIPTION, // 113
// <--
@@ -184,3 +183,5 @@ enum SwUndoId
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swunodef.hxx b/sw/inc/swunodef.hxx
index e63514e11f1a..011abcd95a06 100644
--- a/sw/inc/swunodef.hxx
+++ b/sw/inc/swunodef.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,3 +35,5 @@
#define STAR_REFERENCE(aType) UNO_NMSPC::Reference< STAR_NMSPC::aType >
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swunohelper.hxx b/sw/inc/swunohelper.hxx
index f2623f48aa3b..9f7b05ba8b13 100644
--- a/sw/inc/swunohelper.hxx
+++ b/sw/inc/swunohelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,5 @@ sal_Bool UCB_IsDirectory( const String& rURL );
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swurl.hxx b/sw/inc/swurl.hxx
index 07f4b0631d78..550e0850ba4e 100644
--- a/sw/inc/swurl.hxx
+++ b/sw/inc/swurl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,3 +45,5 @@ void LoadURL( const UniString& rName, ViewShell* pSh,
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swwait.hxx b/sw/inc/swwait.hxx
index 19fb6cfb40a3..f2890c092c67 100644
--- a/sw/inc/swwait.hxx
+++ b/sw/inc/swwait.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx
index abbb7dcf9933..1ae2b0c287f1 100644
--- a/sw/inc/tabcol.hxx
+++ b/sw/inc/tabcol.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_LONGS
-#define _SVSTDARR_BOOLS
#include <svl/svstdarr.hxx>
#endif
@@ -105,3 +105,5 @@ public:
};
#endif //_TABCOL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index 99324909e20c..a6c8b9fed177 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
/*************************************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-JP 20.07.95:
+
Die akt. Struktur der Autoformatierung darf nicht mehr veraendert werden.
Diese wird durch unterschiedlichen Code vom StartWriter und vom StarCalc
@@ -53,14 +54,13 @@ JP 20.07.95:
#include <editeng/postitem.hxx>
#include <editeng/udlnitem.hxx>
#include <editeng/crsditem.hxx>
-#ifndef _SVX_CNTRTITEM_HXX //autogen
#include <editeng/cntritem.hxx>
-#endif
#include <editeng/shdditem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/brshitem.hxx>
#include <editeng/adjitem.hxx>
+#include <editeng/justifyitem.hxx>
#include <svx/rotmodit.hxx>
#include <svl/intitem.hxx>
#include <editeng/bolnitem.hxx>
@@ -247,7 +247,7 @@ public:
sal_Bool Save( SvStream& rStream ) const;
#ifdef READ_OLDVERS
- // lade alte Version
+ // load old versions
sal_Bool LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] );
#endif
};
@@ -268,3 +268,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/tblenum.hxx b/sw/inc/tblenum.hxx
index e5ca58c3df78..5c7bc06808c3 100644
--- a/sw/inc/tblenum.hxx
+++ b/sw/inc/tblenum.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,5 @@ enum TableMergeErr
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
index f284c1597ed9..bdab7f0ad805 100644
--- a/sw/inc/tblsel.hxx
+++ b/sw/inc/tblsel.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -228,3 +229,5 @@ SW_DLLPUBLIC sal_Bool _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara )
#endif // _TBLSEL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/tgrditem.hxx b/sw/inc/tgrditem.hxx
index 267aeacb7793..0c6b9da9e243 100644
--- a/sw/inc/tgrditem.hxx
+++ b/sw/inc/tgrditem.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,7 +56,7 @@ public:
SwTextGridItem();
virtual ~SwTextGridItem();
- // "pure virtual Methoden" vom SfxPoolItem
+ // "pure virtual methods" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -63,8 +64,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
SwTextGridItem& operator=( const SwTextGridItem& );
@@ -118,3 +119,4 @@ inline const SwTextGridItem &SwFmt::GetTextGrid(sal_Bool bInP) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index f8bdb12f113b..1f5bf0530f9b 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,6 +32,7 @@
#include <i18npool/lang.h>
#include <tools/string.hxx>
+#include <osl/diagnose.h>
#include <editeng/svxenum.hxx>
#include <svl/svarray.hxx>
@@ -39,7 +41,6 @@
#include <swtypes.hxx>
#include <toxe.hxx>
#include <calbck.hxx>
-#include <errhdl.hxx>
#ifndef INCLUDED_VECTOR
#include <vector> // #i21237#
@@ -249,16 +250,6 @@ struct SW_DLLPUBLIC SwFormToken
String GetString() const;
};
-// -> #i21237#
-/**
- Functor that is true when a given token has a certain token type.
-
- @param _eType the type to check for
- @param rToken the token to check
-
- @retval sal_True the token has the given type
- @retval sal_False else
-*/
struct SwFormTokenEqualToFormTokenType
{
FormTokenType eType;
@@ -353,7 +344,6 @@ public:
*/
const SwFormTokens & GetTokens() const { return aTokens; }
};
-// <- #i21237#
class SW_DLLPUBLIC SwForm
{
@@ -363,8 +353,6 @@ class SW_DLLPUBLIC SwForm
TOXTypes eType;
sal_uInt16 nFormMaxLevel;
- //sal_uInt16 nFirstTabPos; -> Value in tab token
-// sal_Bool bHasFirstTabPos : 1;
sal_Bool bGenerateTabPos : 1;
sal_Bool bIsRelTabPos : 1;
sal_Bool bCommaSeparated : 1;
@@ -465,11 +453,10 @@ namespace nsSwTOOElements
const SwTOOElements TOO_CHART = 0x02;
const SwTOOElements TOO_CALC = 0x08;
const SwTOOElements TOO_DRAW_IMPRESS = 0x10;
-// const SwTOOElements TOO_IMPRESS = 0x20;
const SwTOOElements TOO_OTHER = 0x80;
}
-#define TOX_STYLE_DELIMITER ((sal_Unicode)0x01) //JP 19.07.00: use a control char
+#define TOX_STYLE_DELIMITER ((sal_Unicode)0x01)
/*--------------------------------------------------------------------
Description: Class for all indexes
@@ -618,73 +605,73 @@ inline void SwTOXMark::SetAlternativeText(const String& rAlt)
inline void SwTOXMark::SetLevel( sal_uInt16 nLvl )
{
- ASSERT( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
nLevel = nLvl;
}
inline void SwTOXMark::SetPrimaryKey( const String& rKey )
{
- ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE( GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
aPrimaryKey = rKey;
}
inline void SwTOXMark::SetSecondaryKey( const String& rKey )
{
- ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
aSecondaryKey = rKey;
}
inline void SwTOXMark::SetTextReading( const String& rTxt )
{
- ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
aTextReading = rTxt;
}
inline void SwTOXMark::SetPrimaryKeyReading( const String& rKey )
{
- ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
aPrimaryKeyReading = rKey;
}
inline void SwTOXMark::SetSecondaryKeyReading( const String& rKey )
{
- ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
aSecondaryKeyReading = rKey;
}
inline sal_uInt16 SwTOXMark::GetLevel() const
{
- ASSERT( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
return nLevel;
}
inline const String& SwTOXMark::GetPrimaryKey() const
{
- ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
return aPrimaryKey;
}
inline const String& SwTOXMark::GetSecondaryKey() const
{
- ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
return aSecondaryKey;
}
inline const String& SwTOXMark::GetTextReading() const
{
- ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
return aTextReading;
}
inline const String& SwTOXMark::GetPrimaryKeyReading() const
{
- ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
return aPrimaryKeyReading;
}
inline const String& SwTOXMark::GetSecondaryKeyReading() const
{
- ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
return aSecondaryKeyReading;
}
@@ -693,13 +680,13 @@ inline const String& SwTOXMark::GetSecondaryKeyReading() const
//
inline void SwForm::SetTemplate(sal_uInt16 nLevel, const String& rTemplate)
{
- ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
+ OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX");
aTemplate[nLevel] = rTemplate;
}
inline const String& SwForm::GetTemplate(sal_uInt16 nLevel) const
{
- ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
+ OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX");
return aTemplate[nLevel];
}
@@ -757,37 +744,35 @@ inline TOXTypes SwTOXBase::GetType() const
inline void SwTOXBase::SetLevel(sal_uInt16 nLev)
{
- ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
aData.nLevel = nLev;
}
inline sal_uInt16 SwTOXBase::GetLevel() const
{
- ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
return aData.nLevel;
}
inline void SwTOXBase::SetTemplateName(const String& rName)
{
-// ASSERT(GetTOXType()->GetType() == TOX_USER, "Falscher Feldtyp");
-// ASSERT(aData.pTemplateName, "pTemplateName == 0");
-// (*aData.pTemplateName) = rName;
DBG_WARNING("SwTOXBase::SetTemplateName obsolete");
aStyleNames[0] = rName;
-
}
inline sal_uInt16 SwTOXBase::GetOptions() const
{
- ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
return aData.nOptions;
}
inline void SwTOXBase::SetOptions(sal_uInt16 nOpt)
{
- ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
aData.nOptions = nOpt;
}
#endif // SW_TOX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/toxe.hxx b/sw/inc/toxe.hxx
index 064c2e0aac9f..121fae2981eb 100644
--- a/sw/inc/toxe.hxx
+++ b/sw/inc/toxe.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,7 +98,6 @@ enum ToxAuthorityField
AUTH_FIELD_HOWPUBLISHED,
AUTH_FIELD_INSTITUTION,
AUTH_FIELD_JOURNAL,
-// AUTH_FIELD_KEY, // BiBTeX - Field
AUTH_FIELD_MONTH,
AUTH_FIELD_NOTE,
AUTH_FIELD_NUMBER,
@@ -123,3 +123,5 @@ enum ToxAuthorityField
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/toxinit.hxx b/sw/inc/toxinit.hxx
index 8546f04b830c..4c7fdbf2601d 100644
--- a/sw/inc/toxinit.hxx
+++ b/sw/inc/toxinit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,3 +36,5 @@ void SetTOUOLEStr(const UniString& rStr);
#endif // _TOXINIT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/toxwrap.hxx b/sw/inc/toxwrap.hxx
index f38cd15c877c..9d641c4a01f0 100644
--- a/sw/inc/toxwrap.hxx
+++ b/sw/inc/toxwrap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,3 +76,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
index 4829b1bcb012..9ea9b8376295 100644
--- a/sw/inc/txatbase.hxx
+++ b/sw/inc/txatbase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,6 @@
#include <tools/solar.h>
#include <svl/poolitem.hxx>
#include <hintids.hxx>
-#include <errhdl.hxx>
#include <boost/utility.hpp>
@@ -151,7 +151,7 @@ inline const xub_StrLen* SwTxtAttr::GetAnyEnd() const
inline const SfxPoolItem& SwTxtAttr::GetAttr() const
{
- ASSERT( m_pAttr, "SwTxtAttr: where is my attribute?" );
+ OSL_ENSURE( m_pAttr, "SwTxtAttr: where is my attribute?" );
return *m_pAttr;
}
@@ -173,72 +173,74 @@ inline void SwTxtAttr::SetDontExpand( bool bDontExpand )
inline const SwFmtCharFmt& SwTxtAttr::GetCharFmt() const
{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_CHARFMT,
+ OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_CHARFMT,
"Wrong attribute" );
return (const SwFmtCharFmt&)(*m_pAttr);
}
inline const SwFmtAutoFmt& SwTxtAttr::GetAutoFmt() const
{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_AUTOFMT,
+ OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_AUTOFMT,
"Wrong attribute" );
return (const SwFmtAutoFmt&)(*m_pAttr);
}
inline const SwFmtFld& SwTxtAttr::GetFld() const
{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FIELD,
+ OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_FIELD,
"Wrong attribute" );
return (const SwFmtFld&)(*m_pAttr);
}
inline const SwFmtFtn& SwTxtAttr::GetFtn() const
{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FTN, "Wrong attribute" );
+ OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_FTN, "Wrong attribute" );
return (const SwFmtFtn&)(*m_pAttr);
}
inline const SwFmtFlyCnt& SwTxtAttr::GetFlyCnt() const
{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FLYCNT,
+ OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_FLYCNT,
"Wrong attribute" );
return (const SwFmtFlyCnt&)(*m_pAttr);
}
inline const SwTOXMark& SwTxtAttr::GetTOXMark() const
{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_TOXMARK,
+ OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_TOXMARK,
"Wrong attribute" );
return (const SwTOXMark&)(*m_pAttr);
}
inline const SwFmtRefMark& SwTxtAttr::GetRefMark() const
{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_REFMARK,
+ OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_REFMARK,
"Wrong attribute" );
return (const SwFmtRefMark&)(*m_pAttr);
}
inline const SwFmtINetFmt& SwTxtAttr::GetINetFmt() const
{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_INETFMT,
+ OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_INETFMT,
"Wrong attribute" );
return (const SwFmtINetFmt&)(*m_pAttr);
}
inline const SwFmtRuby& SwTxtAttr::GetRuby() const
{
- ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_CJK_RUBY,
+ OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_CJK_RUBY,
"Wrong attribute" );
return (const SwFmtRuby&)(*m_pAttr);
}
inline const SwFmtMeta& SwTxtAttr::GetMeta() const
{
- ASSERT( m_pAttr && (m_pAttr->Which() == RES_TXTATR_META ||
+ OSL_ENSURE( m_pAttr && (m_pAttr->Which() == RES_TXTATR_META ||
m_pAttr->Which() == RES_TXTATR_METAFIELD),
"Wrong attribute" );
return (const SwFmtMeta&)(*m_pAttr);
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx
index 6c6b354a7b59..ada4c2fc1097 100644
--- a/sw/inc/txatritr.hxx
+++ b/sw/inc/txatritr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,3 +98,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx
index f074a8696fdf..c3b816cc0d88 100644
--- a/sw/inc/txtatr.hxx
+++ b/sw/inc/txtatr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -111,8 +112,10 @@ public:
inline const SwTxtNode& SwTxtRuby::GetTxtNode() const
{
- ASSERT( m_pTxtNode, "SwTxtRuby: where is my TxtNode?" );
+ OSL_ENSURE( m_pTxtNode, "SwTxtRuby: where is my TxtNode?" );
return *m_pTxtNode;
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/txtflcnt.hxx b/sw/inc/txtflcnt.hxx
index 8a9dfecb422b..f4fb06a8e2f0 100644
--- a/sw/inc/txtflcnt.hxx
+++ b/sw/inc/txtflcnt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,3 +67,4 @@ inline const SwFlyInCntFrm *SwTxtFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm ) cons
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index 6dd556a84436..3ecabb8889bc 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,18 +56,16 @@ public:
// enable notification that field content has changed and needs reformatting
void NotifyContentChange(SwFmtFld& rFmtFld);
- // #111840#
/**
Returns position of this field.
@return position of this field. Has to be deleted explicitly.
*/
-// SwPosition * GetPosition() const;
};
inline SwTxtNode& SwTxtFld::GetTxtNode() const
{
- ASSERT( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" );
+ OSL_ENSURE( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" );
return *m_pTxtNode;
}
@@ -78,3 +77,4 @@ inline void SwTxtFld::ExpandAlways()
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
index 4f19924172ef..36fbfb0ee269 100644
--- a/sw/inc/txtftn.hxx
+++ b/sw/inc/txtftn.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,9 +74,10 @@ public:
inline const SwTxtNode& SwTxtFtn::GetTxtNode() const
{
- ASSERT( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" );
+ OSL_ENSURE( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" );
return *m_pTxtNode;
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx
index 62d48320bf06..d09792c915cf 100644
--- a/sw/inc/txtinet.hxx
+++ b/sw/inc/txtinet.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,9 +74,10 @@ public:
inline const SwTxtNode& SwTxtINetFmt::GetTxtNode() const
{
- ASSERT( m_pTxtNode, "SwTxtINetFmt: where is my TxtNode?" );
+ OSL_ENSURE( m_pTxtNode, "SwTxtINetFmt: where is my TxtNode?" );
return *m_pTxtNode;
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/txtrfmrk.hxx b/sw/inc/txtrfmrk.hxx
index 75a5305041f0..c7507798be87 100644
--- a/sw/inc/txtrfmrk.hxx
+++ b/sw/inc/txtrfmrk.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,9 +54,10 @@ public:
inline const SwTxtNode& SwTxtRefMark::GetTxtNode() const
{
- ASSERT( m_pTxtNode, "SwTxtRefMark: where is my TxtNode?" );
+ OSL_ENSURE( m_pTxtNode, "SwTxtRefMark: where is my TxtNode?" );
return *m_pTxtNode;
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx
index efa88329c73b..e70c28305082 100644
--- a/sw/inc/txttxmrk.hxx
+++ b/sw/inc/txttxmrk.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,9 +58,10 @@ public:
inline const SwTxtNode& SwTxtTOXMark::GetTxtNode() const
{
- ASSERT( m_pTxtNode, "SwTxtTOXMark: where is my TxtNode?" );
+ OSL_ENSURE( m_pTxtNode, "SwTxtTOXMark: where is my TxtNode?" );
return *m_pTxtNode;
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index 9d447c18034f..dda46d6ef8b5 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,6 @@
#include <SwRewriter.hxx>
#include <swundo.hxx>
-
class SwHistory;
class SwIndex;
class SwPaM;
@@ -54,7 +54,6 @@ namespace sw {
class RepeatContext;
}
-
class SwUndo
: public SfxUndoAction
{
@@ -73,7 +72,6 @@ protected:
const SwRedlineSaveDatas& rCheck,
sal_Bool bCurrIsEnd );
- // #111827#
/**
Returns the rewriter for this object.
@@ -105,7 +103,6 @@ public:
SwUndo(SwUndoId const nId);
virtual ~SwUndo();
- // #111827#
/**
Returns textual comment for this undo object.
@@ -186,7 +183,6 @@ public:
~SwUndoSaveCntnt();
};
-
// sicher eine vollstaendige Section im Nodes-Array
class SwUndoSaveSection : private SwUndoSaveCntnt
{
@@ -212,7 +208,6 @@ public:
SwHistory* GetHistory() { return pHistory; }
};
-
// Diese Klasse speichert den Pam als sal_uInt16's und kann diese wieder zu
// einem PaM zusammensetzen
class SwUndRng
@@ -231,7 +226,6 @@ public:
};
-
class SwUndoInsLayFmt;
// base class for insertion of Document, Glossaries and Copy
@@ -272,8 +266,6 @@ public:
SwUndoCpyDoc( const SwPaM& );
};
-
-
//--------------------------------------------------------------------
class SwUndoFlyBase : public SwUndo, private SwUndoSaveSection
@@ -333,3 +325,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoatxt.hxx b/sw/inc/unoatxt.hxx
index 01033eb856ec..b0d73c249132 100644
--- a/sw/inc/unoatxt.hxx
+++ b/sw/inc/unoatxt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104,9 +105,6 @@ public:
};
-/* -----------------26.05.98 15:55-------------------
- *
- * --------------------------------------------------*/
class SwXAutoTextGroup : public cppu::WeakImplHelper6
<
::com::sun::star::text::XAutoTextGroup,
@@ -126,7 +124,7 @@ protected:
virtual ~SwXAutoTextGroup(); // ref-counted objects are not to be deleted from outside -> protected dtor
public:
- SwXAutoTextGroup(const rtl::OUString& rName, SwGlossaries* pGloss/*SwTextBlocks* pGroup*/);
+ SwXAutoTextGroup(const rtl::OUString& rName, SwGlossaries* pGloss);
static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
@@ -175,9 +173,6 @@ public:
void Invalidate();
};
-/* -----------------17.06.98 12:03-------------------
- *
- * --------------------------------------------------*/
class SwXAutoTextEntry
:public SfxListener
,public cppu::WeakImplHelper5
@@ -304,3 +299,5 @@ protected:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx
index 6c12a01b0d47..e49568b6256f 100644
--- a/sw/inc/unobaseclass.hxx
+++ b/sw/inc/unobaseclass.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,10 +46,6 @@ typedef ::cppu::WeakImplHelper2
>
SwSimpleEnumeration_Base;
-
-/* -----------------29.04.98 07:35-------------------
- *
- * --------------------------------------------------*/
enum CursorType
{
CURSOR_INVALID,
@@ -66,9 +63,9 @@ enum CursorType
CURSOR_META, // meta/meta-field
};
-/*-----------------04.03.98 11:54-------------------
+/*
Start/EndAction or Start/EndAllAction
- -------------------------------------------------- */
+*/
class UnoActionContext
{
private:
@@ -81,9 +78,9 @@ class UnoActionContext
void InvalidateDocument() { m_pDoc = 0; }
};
-/* -----------------07.07.98 12:03-------------------
+/*
interrupt Actions for a little while
- -------------------------------------------------- */
+*/
class UnoActionRemoveContext
{
private:
@@ -103,7 +100,7 @@ void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew);
#include <boost/utility.hpp>
#include <osl/diagnose.h>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
namespace sw {
@@ -123,7 +120,7 @@ namespace sw {
~UnoImplPtr()
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
delete m_p; // #i105557#: call dtor with locked solar mutex
m_p = 0;
}
@@ -172,3 +169,4 @@ namespace sw {
#endif // SW_UNOBASECLASS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unobookmark.hxx b/sw/inc/unobookmark.hxx
index fdd5df4c8a6c..4d76fca66849 100644
--- a/sw/inc/unobookmark.hxx
+++ b/sw/inc/unobookmark.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,6 +81,8 @@ protected:
const ::sw::mark::IMark* GetBookmark() const;
+ void registerInMark( SwXBookmark& rXMark, ::sw::mark::IMark* const pMarkBase );
+
virtual ~SwXBookmark();
/// @param pDoc and pMark != 0, but not & because of ImplInheritanceHelper
@@ -234,11 +237,14 @@ class SwXFieldmark
{
private:
-
+ ::sw::mark::ICheckboxFieldmark* getCheckboxFieldmark();
bool isReplacementObject;
-
public:
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent>
+ CreateXFieldmark( SwDoc & rDoc, ::sw::mark::IMark & rMark );
+
SwXFieldmark(bool isReplacementObject,
::sw::mark::IMark* pBkm = 0, SwDoc* pDoc = 0);
@@ -253,8 +259,28 @@ public:
throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL getParameters( )
throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Any& rValue)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
};
+class SwXODFCheckboxField : public SwXFieldmark
+{
+public:
+ SwXODFCheckboxField( ::sw::mark::IMark* pBkm = 0, SwDoc* pDoc = 0) : SwXFieldmark(true,
+ pBkm, pDoc) {}
+};
#endif // SW_UNOBOOKMARK_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
index 01e45671a3c0..c88d62be1d9e 100644
--- a/sw/inc/unochart.hxx
+++ b/sw/inc/unochart.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -431,3 +432,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx
index 8b799ad98b9b..0449babb17f5 100644
--- a/sw/inc/unocoll.hxx
+++ b/sw/inc/unocoll.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,9 +63,7 @@ class SwSectionFmt;
class SwFmtRefMark;
class SwXReferenceMark;
class SwXBookmark;
-/*-----------------11.03.98 11:19-------------------
---------------------------------------------------*/
class SwUnoCollection
{
SwDoc* pDoc;
@@ -82,9 +81,6 @@ class SwUnoCollection
SwDoc* GetDoc() const {return pDoc;}
};
-/******************************************************************************
- *
- ******************************************************************************/
#define SW_SERVICE_TYPE_TEXTTABLE 0
#define SW_SERVICE_TYPE_TEXTFRAME 1
#define SW_SERVICE_TYPE_GRAPHIC 2
@@ -195,8 +191,12 @@ class SwUnoCollection
#define SW_SERVICE_TYPE_FIELDMARK 107
#define SW_SERVICE_TYPE_FORMFIELDMARK 108
#define SW_SERVICE_TYPE_META 109
+#define SW_SERVICE_VBAOBJECTPROVIDER 110
+#define SW_SERVICE_VBACODENAMEPROVIDER 111
+#define SW_SERVICE_VBAPROJECTNAMEPROVIDER 112
+#define SW_SERVICE_VBAGLOBALS 113
-#define SW_SERVICE_LAST SW_SERVICE_TYPE_META
+#define SW_SERVICE_LAST SW_SERVICE_VBAGLOBALS
#define SW_SERVICE_INVALID USHRT_MAX
@@ -271,9 +271,7 @@ public:
static ::com::sun::star::uno::Sequence<rtl::OUString> GetAllServiceNames();
};
-/*-----------------11.12.97 09:38-------------------
---------------------------------------------------*/
typedef
cppu::WeakImplHelper3
<
@@ -305,7 +303,7 @@ public:
virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
//XServiceInfo
-virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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 );
@@ -356,9 +354,6 @@ public:
};
-/*-----------------20.02.98 10:51-------------------
-
---------------------------------------------------*/
class SwXTextFrames : public SwXFrames
{
protected:
@@ -367,8 +362,6 @@ public:
SwXTextFrames(SwDoc* pDoc);
-// SMART_UNO_DECLARATION( SwXTextFrames, UsrObject );
-
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
@@ -376,9 +369,6 @@ public:
};
-/*-----------------20.02.98 10:55-------------------
-
---------------------------------------------------*/
class SwXTextGraphicObjects : public SwXFrames
{
protected:
@@ -386,9 +376,6 @@ protected:
public:
SwXTextGraphicObjects(SwDoc* pDoc);
-
-// SMART_UNO_DECLARATION( SwXTextGraphicObjects, UsrObject );
-
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
@@ -396,9 +383,6 @@ public:
};
-/*-----------------20.02.98 10:57-------------------
-
---------------------------------------------------*/
class SwXTextEmbeddedObjects : public SwXFrames
{
protected:
@@ -407,8 +391,6 @@ public:
SwXTextEmbeddedObjects(SwDoc* pDoc);
-// SMART_UNO_DECLARATION( SwXTextEmbeddedObjects, UsrObject );
-
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
@@ -416,9 +398,6 @@ public:
};
-/*-----------------12.02.98 07:58-------------------
-
---------------------------------------------------*/
class SwXTextSections : public SwCollectionBaseClass,
public SwUnoCollection
{
@@ -448,9 +427,7 @@ public:
static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection> GetObject( SwSectionFmt& rFmt );
};
-/*-----------------12.02.98 07:51-------------------
---------------------------------------------------*/
class SwXBookmarks : public SwCollectionBaseClass,
public SwUnoCollection
{
@@ -501,10 +478,6 @@ public:
virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
};
-/*-----------------12.02.98 08:01-------------------
-
---------------------------------------------------*/
-
typedef
cppu::WeakImplHelper2
<
@@ -539,9 +512,6 @@ public:
static ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote> GetObject( SwDoc& rDoc, const SwFmtFtn& rFmt );
};
-/* -----------------27.08.98 13:10-------------------
- *
- * --------------------------------------------------*/
class SwXReferenceMarks : public SwCollectionBaseClass,
public SwUnoCollection
{
@@ -579,3 +549,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
index 91fbc0a1d552..0fc9b61b557a 100644
--- a/sw/inc/unocrsr.hxx
+++ b/sw/inc/unocrsr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,8 +44,6 @@ public:
// @@@ semantic: no copy ctor.
SwUnoCrsr( SwUnoCrsr& );
private:
- // forbidden and not implemented.
- //SwUnoCrsr( const SwUnoCrsr& );
SwUnoCrsr & operator= ( const SwUnoCrsr& );
protected:
@@ -55,8 +54,6 @@ protected:
public:
-// virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
-
// gibt es eine Selection vom Content in die Tabelle
// Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
virtual sal_Bool IsSelOvr( int eFlags =
@@ -100,8 +97,6 @@ public:
SwUnoTableCrsr( const SwPosition& rPos );
virtual ~SwUnoTableCrsr();
-// virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
-
// gibt es eine Selection vom Content in die Tabelle
// Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
virtual sal_Bool IsSelOvr( int eFlags =
@@ -120,3 +115,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
index f2f8ca922b8c..efbc46173350 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,9 +61,6 @@ namespace com{ namespace sun{ namespace star{
}
}}}
-/* -----------------03.12.98 12:16-------------------
- *
- * --------------------------------------------------*/
enum SwGetPropertyStatesCaller
{
SW_PROPERTY_STATE_CALLER_DEFAULT,
@@ -71,9 +69,6 @@ enum SwGetPropertyStatesCaller
SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT
};
-/* -----------------------------14.12.00 15:06--------------------------------
-
- ---------------------------------------------------------------------------*/
namespace SwUnoCursorHelper
{
// keep Any's mapped by (WhichId << 16 ) + (MemberId)
@@ -216,3 +211,5 @@ namespace SwUnoCursorHelper
} // namespace SwUnoCursorHelper
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
index f0168d632f51..d45b83e9d6cf 100644
--- a/sw/inc/unodraw.hxx
+++ b/sw/inc/unodraw.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,20 +32,16 @@
#include <calbck.hxx>
#include <frmfmt.hxx>
#include <com/sun/star/text/XTextContent.hpp>
-// --> OD 2009-01-13 #i59051#
#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
-// <--
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
#include <cppuhelper/implbase3.hxx> // helper for implementations
#include <cppuhelper/implbase4.hxx> // helper for implementations
-// --> OD 2004-07-22 #i31698#
#include <cppuhelper/implbase6.hxx> // helper for implementations
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/drawing/HomogenMatrix3.hpp>
-// <--
#include <svl/itemprop.hxx>
class SdrMarkList;
@@ -69,7 +66,6 @@ public:
const SdrMarkList& PreGroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > & xShapes);
void PreUnGroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > xShapeGroup);
-// void PostGroup(); ?? wird es noch gebraucht ??
SdrView* GetDrawView() {return mpView;}
SdrPageView* GetPageView();
@@ -130,9 +126,7 @@ public:
// renamed and outlined to detect where it's called
void InvalidateSwDoc(); // {pDoc = 0;}
};
-/* -----------------22.01.99 10:20-------------------
- *
- * --------------------------------------------------*/
+
class SwShapeDescriptor_Impl;
class SwXGroupShape;
typedef
@@ -143,9 +137,7 @@ cppu::WeakAggImplHelper6
::com::sun::star::text::XTextContent,
::com::sun::star::lang::XServiceInfo,
::com::sun::star::lang::XUnoTunnel,
- // --> OD 2004-07-22 #i31698#
::com::sun::star::drawing::XShape
- // <--
>
SwXShapeBaseClass;
class SwXShape : public SwXShapeBaseClass,
@@ -157,10 +149,9 @@ class SwXShape : public SwXShapeBaseClass,
friend class SwXDrawPage;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > xShapeAgg;
- // --> OD 2004-07-23 #i31698# - reference to <XShape>, determined in the
+ // reference to <XShape>, determined in the
// constructor by <queryAggregation> at <xShapeAgg>.
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxShape;
- // <--
const SfxItemPropertySet* m_pPropSet;
const SfxItemPropertyMapEntry* m_pPropertyMapEntries;
@@ -176,16 +167,12 @@ class SwXShape : public SwXShapeBaseClass,
/** method to determine top group object
- OD 2004-08-03 #i31698#
-
@author OD
*/
SdrObject* _GetTopGroupObj( SvxShape* _pSvxShape = 0L );
/** method to determine position according to the positioning attributes
- OD 2004-08-03 #i31698#
-
@author OD
*/
com::sun::star::awt::Point _GetAttrPosition();
@@ -193,8 +180,6 @@ class SwXShape : public SwXShapeBaseClass,
/** method to convert the position (translation) of the drawing object to
the layout direction horizontal left-to-right.
- OD 2004-07-27 #i31698#
-
@author OD
*/
::com::sun::star::awt::Point _ConvertPositionToHoriL2R(
@@ -204,8 +189,6 @@ class SwXShape : public SwXShapeBaseClass,
/** method to convert the transformation of the drawing object to the layout
direction, the drawing object is in
- OD 2004-07-27 #i31698#
-
@author OD
*/
::com::sun::star::drawing::HomogenMatrix3 _ConvertTransformationToLayoutDir(
@@ -213,8 +196,6 @@ class SwXShape : public SwXShapeBaseClass,
/** method to adjust the positioning properties
- OD 2004-08-02 #i31698#
-
@author OD
@param _aPosition
@@ -227,8 +208,6 @@ class SwXShape : public SwXShapeBaseClass,
/** method to convert start or end position of the drawing object to the
Writer specific position, which is the attribute position in layout direction
- OD 2009-01-12 #i59051#
-
@author OD
*/
::com::sun::star::awt::Point _ConvertStartOrEndPosToLayoutDir(
@@ -237,8 +216,6 @@ class SwXShape : public SwXShapeBaseClass,
/** method to convert PolyPolygonBezier of the drawing object to the
Writer specific position, which is the attribute position in layout direction
- OD 2009-01-13 #i59051#
-
@author OD
*/
::com::sun::star::drawing::PolyPolygonBezierCoords _ConvertPolyPolygonBezierToLayoutDir(
@@ -246,8 +223,6 @@ class SwXShape : public SwXShapeBaseClass,
/** method to get property from aggregation object
- OD 2004-10-28 #i36248#
-
@author OD
*/
::com::sun::star::uno::Any _getPropAtAggrObj( const ::rtl::OUString& _rPropertyName )
@@ -300,15 +275,11 @@ public:
virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
- // --> OD 2004-07-22 #i31698# XShape
virtual ::com::sun::star::awt::Point SAL_CALL getPosition( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
- // <--
- // --> OD 2004-07-22 #i31698# XShapeDescriptor - superclass of XShape
virtual ::rtl::OUString SAL_CALL getShapeType( ) throw (::com::sun::star::uno::RuntimeException);
- // <--
//SwClient
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
@@ -319,9 +290,7 @@ public:
// helper
static void AddExistingShapeToFmt( SdrObject& _rObj );
};
-/* -----------------------------31.05.01 09:54--------------------------------
- ---------------------------------------------------------------------------*/
class SwXGroupShape :
public SwXShape,
public ::com::sun::star::drawing::XShapes
@@ -351,3 +320,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoevent.hxx b/sw/inc/unoevent.hxx
index 6a9087519e68..d99b926a646b 100644
--- a/sw/inc/unoevent.hxx
+++ b/sw/inc/unoevent.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -116,3 +117,5 @@ protected:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoevtlstnr.hxx b/sw/inc/unoevtlstnr.hxx
index 3b56ff6c3d33..86c8918f571b 100644
--- a/sw/inc/unoevtlstnr.hxx
+++ b/sw/inc/unoevtlstnr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,9 +37,9 @@ namespace com{namespace sun{namespace star{
class XEventListener;
}
}}}
-/* -----------------22.04.99 11:18-------------------
+/*
* Verwaltung der EventListener
- * --------------------------------------------------*/
+ * */
typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > * XEventListenerPtr;
SV_DECL_PTRARR(SwEvtLstnrArray, XEventListenerPtr, 4, 4)
@@ -56,3 +57,5 @@ class SwEventListenerContainer
void Disposing();
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx
index 66fe2cb92a99..ed36b278a652 100644
--- a/sw/inc/unofield.hxx
+++ b/sw/inc/unofield.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,9 +47,6 @@ class SwField;
class SwSetExpField;
class SwTextAPIObject;
-/* -----------------04.12.98 12:49-------------------
- *
- * --------------------------------------------------*/
class SwXFieldMaster : public cppu::WeakImplHelper4
<
::com::sun::star::beans::XPropertySet,
@@ -122,9 +120,6 @@ public:
sal_uInt16 GetResId() const {return nResTypeId;}
};
-/* -----------------04.12.98 12:49-------------------
- *
- * --------------------------------------------------*/
struct SwFieldProperties_Impl;
class SwXTextField : public cppu::WeakImplHelper5
<
@@ -212,10 +207,6 @@ public:
/// @return a SwXTextField, either an already existing one or a new one
SwXTextField * CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt);
-
-/* -----------------21.12.98 10:26-------------------
- *
- * --------------------------------------------------*/
typedef
cppu::WeakImplHelper2
<
@@ -250,9 +241,6 @@ public:
static sal_Bool getInstanceName(const SwFieldType& rFldType, String& rName);
};
-/* -----------------21.12.98 10:26-------------------
- *
- * --------------------------------------------------*/
typedef
cppu::WeakImplHelper3
<
@@ -292,9 +280,6 @@ public:
virtual void Invalidate();
};
-/* -----------------21.12.98 14:49-------------------
- *
- * --------------------------------------------------*/
class SwXFieldEnumeration : public cppu::WeakImplHelper2
<
::com::sun::star::container::XEnumeration,
@@ -328,3 +313,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoflatpara.hxx b/sw/inc/unoflatpara.hxx
index b69fb448c102..9eb36c20c1b3 100644
--- a/sw/inc/unoflatpara.hxx
+++ b/sw/inc/unoflatpara.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -143,3 +144,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unofootnote.hxx b/sw/inc/unofootnote.hxx
index 784a72098e87..51675722a765 100644
--- a/sw/inc/unofootnote.hxx
+++ b/sw/inc/unofootnote.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,10 +45,6 @@ class SwDoc;
class SwModify;
class SwFmtFtn;
-
-/*-----------------12.02.98 08:01-------------------
-
---------------------------------------------------*/
typedef ::cppu::WeakImplHelper5
< ::com::sun::star::lang::XUnoTunnel
, ::com::sun::star::lang::XServiceInfo
@@ -227,3 +224,4 @@ public:
#endif // SW_UNOFOOTNOTE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx
index 269401e3d28f..903ed043ac74 100644
--- a/sw/inc/unoframe.hxx
+++ b/sw/inc/unoframe.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,9 +57,6 @@ class SwFmt;
class SwFlyFrmFmt;
-/*-----------------12.02.98 11:21-------------------
-
---------------------------------------------------*/
class BaseFrameProperties_Impl;
class SwXFrame : public cppu::WeakImplHelper6
<
@@ -79,7 +77,7 @@ class SwXFrame : public cppu::WeakImplHelper6
// Descriptor-interface
BaseFrameProperties_Impl* pProps;
- sal_Bool bIsDescriptor;
+ bool bIsDescriptor;
String sName;
SwPaM* m_pCopySource;
@@ -132,7 +130,7 @@ public:
//XShapeDescriptor
virtual rtl::OUString SAL_CALL getShapeType(void) throw( ::com::sun::star::uno::RuntimeException );
- //Basisimplementierung
+ //Base implementation
//XComponent
virtual void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
@@ -157,15 +155,13 @@ public:
}
FlyCntType GetFlyCntType()const {return eType;}
- sal_Bool IsDescriptor() const {return bIsDescriptor;}
+ bool IsDescriptor() const {return bIsDescriptor;}
void ResetDescriptor();
//copy text from a given source PaM
void SetSelection(SwPaM& rCopySource);
static SW_DLLPUBLIC SdrObject *GetOrCreateSdrObject( SwFlyFrmFmt *pFmt );
};
-/*-----------------20.02.98 11:28-------------------
---------------------------------------------------*/
typedef cppu::WeakImplHelper3
<
::com::sun::star::text::XTextFrame,
@@ -244,9 +240,7 @@ public:
void * SAL_CALL operator new( size_t ) throw();
void SAL_CALL operator delete( void * ) throw();
};
-/*-----------------20.02.98 11:28-------------------
---------------------------------------------------*/
typedef cppu::WeakImplHelper2
<
::com::sun::star::text::XTextContent,
@@ -290,9 +284,7 @@ public:
void * SAL_CALL operator new( size_t ) throw();
void SAL_CALL operator delete( void * ) throw();
};
-/*-----------------20.02.98 11:28-------------------
---------------------------------------------------*/
class SwOLENode;
typedef cppu::WeakImplHelper3
<
@@ -356,8 +348,7 @@ class SwXOLEListener : public cppu::WeakImplHelper1
public SwClient
{
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xOLEModel;
-// SfxObjectShell* GetObjShell( const SwFmt& rFmt,
-// SwOLENode** ppNd = 0 ) const;
+
SwFmt* GetFmt() const { return (SwFmt*)GetRegisteredIn(); }
public:
SwXOLEListener(SwFmt& rOLEFmt, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xOLE);
@@ -377,3 +368,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx
index fe42330685a6..a975cdac55a8 100644
--- a/sw/inc/unoidx.hxx
+++ b/sw/inc/unoidx.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,10 +47,6 @@ class SwTOXBaseSection;
class SwTOXMark;
class SwTOXType;
-/* -----------------07.12.98 10:08-------------------
- *
- * --------------------------------------------------*/
-
typedef ::cppu::ImplInheritanceHelper5
< ::sfx2::MetadatableMixin
, ::com::sun::star::lang::XUnoTunnel
@@ -190,9 +187,6 @@ public:
};
-/* -----------------07.12.98 10:08-------------------
- *
- * --------------------------------------------------*/
typedef ::cppu::WeakImplHelper4
< ::com::sun::star::lang::XUnoTunnel
, ::com::sun::star::lang::XServiceInfo
@@ -318,9 +312,6 @@ public:
};
-/* -----------------05.05.99 12:27-------------------
- *
- * --------------------------------------------------*/
class SwXDocumentIndexes
: public SwCollectionBaseClass
, public SwUnoCollection
@@ -373,3 +364,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unomailmerge.hxx b/sw/inc/unomailmerge.hxx
index d7f19640ab09..b81056e21307 100644
--- a/sw/inc/unomailmerge.hxx
+++ b/sw/inc/unomailmerge.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,8 +44,6 @@
#include <svl/itemprop.hxx>
#include <sfx2/objsh.hxx>
-#include <functional>
-
namespace com { namespace sun { namespace star {
namespace sdbc {
@@ -105,7 +104,6 @@ class SwXMailMerge :
cppu::OInterfaceContainerHelper aMergeListeners;
OPropertyListenerContainerHelper aPropListeners;
- //SfxItemPropertySet aPropSet;
const SfxItemPropertySet* pPropSet;
SfxObjectShellRef xDocSh; // the document
@@ -204,3 +202,4 @@ extern com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CAL
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx
index 6f085bf0d26a..cfc373e9887b 100644
--- a/sw/inc/unomap.hxx
+++ b/sw/inc/unomap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -190,7 +191,6 @@
#define WID_LEVEL_FORMAT 1021
#define WID_LEVEL_PARAGRAPH_STYLES 1022
#define WID_RECALC_TAB_STOPS 1023
-//#define WID_??? 1024
#define WID_MAIN_ENTRY_CHARACTER_STYLE_NAME 1025
#define WID_CREATE_FROM_TABLES 1026
#define WID_CREATE_FROM_TEXT_FRAMES 1027
@@ -251,9 +251,7 @@
#define WID_DOC_HAS_VALID_SIGNATURES 1017
#define WID_DOC_BUILDID 1024
#define WID_DOC_ISTEMPLATEID 1025
-// --> OD 2006-03-21 #b6375613#
#define WID_APPLY_WORKAROUND_FOR_B6375613 1070
-// <--
//MailMerge
#define WID_SELECTION 1071
@@ -319,9 +317,6 @@
#define WID_TXTCOL_IS_AUTOMATIC 5
#define WID_TXTCOL_AUTO_DISTANCE 6
-/* -----------------04.07.98 11:41-------------------
- *
- * --------------------------------------------------*/
class SwItemPropertySet : public SfxItemPropertySet
{
protected:
@@ -330,9 +325,6 @@ public:
SwItemPropertySet( const SfxItemPropertyMapEntry *pMap ) :
SfxItemPropertySet( pMap ){}
};
-/* -----------------04.07.98 11:41-------------------
- *
- * --------------------------------------------------*/
class SwUnoPropertyMapProvider
{
SfxItemPropertyMapEntry* aMapEntriesArr[PROPERTY_MAP_END];
@@ -349,3 +341,5 @@ public:
extern SwUnoPropertyMapProvider aSwMapProvider;
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unomid.h b/sw/inc/unomid.h
index 8f35f4146c59..d32ab9d329b7 100644
--- a/sw/inc/unomid.h
+++ b/sw/inc/unomid.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,8 @@
#define SW_UNOMID_HXX
#define C2S(cChar) String::CreateFromAscii( cChar )
-#define C2U(cChar) rtl::OUString::createFromAscii( cChar )
+//#define C2U(cChar) rtl::OUString::createFromAscii( cChar )
+#define C2U(cChar) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( cChar ))
#define MID_MIRROR_VERT 0
#define MID_MIRROR_HORZ_EVEN_PAGES 1
@@ -151,7 +153,9 @@
#define MID_ENV_SHIFT_RIGHT 12
#define MID_ENV_SHIFT_DOWN 13
-// OD 2004-05-04 #i28701# - SwFmtWrapInfluenceOnObjPos
+// SwFmtWrapInfluenceOnObjPos
#define MID_WRAP_INFLUENCE 0
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unomod.hxx b/sw/inc/unomod.hxx
index b65ae69d49fe..983e16908086 100644
--- a/sw/inc/unomod.hxx
+++ b/sw/inc/unomod.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,10 +49,6 @@ class SwDoc;
/******************************************************************************
*
******************************************************************************/
-/*-----------------15.03.98 13:21-------------------
-
---------------------------------------------------*/
-
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SwXModule_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & );
class SwXModule : public cppu::WeakImplHelper4
@@ -132,9 +129,7 @@ public:
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void)
throw( ::com::sun::star::uno::RuntimeException );
};
-/*-----------------15.03.98 13:21-------------------
---------------------------------------------------*/
class SwXViewSettings : public comphelper::ChainableHelperNoState
{
@@ -178,33 +173,7 @@ public:
sal_Bool IsValid() const {return bObjectValid;}
void Invalidate() {bObjectValid = sal_False;}
};
-/* -----------------24.09.98 10:47-------------------
- *
- * --------------------------------------------------*/
-/*class SwXTerminateListener : public ::com::sun::star::frame::XTerminateListener,
- public UsrObject
-{
-public:
- SwXTerminateListener();
- virtual ~SwXTerminateListener();
-
- SMART_UNO_DECLARATION( SwXTerminateListener, UsrObject );
-
- virtual UString getClassName();
-// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
-// virtual ::com::sun::star::uno::XInterface * queryInterface( ::com::sun::star::uno::Uik aUik);
-// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
-// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void);
-
-
- //XTerminateListener
- virtual void queryTermination(const ::com::sun::star::lang::EventObject& aEvent);
- virtual void notifyTermination(const ::com::sun::star::lang::EventObject& aEvent);
-
- //XEventListener
- virtual void disposing(const ::com::sun::star::lang::EventObject& Source);
-};
-
-*/
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoparaframeenum.hxx b/sw/inc/unoparaframeenum.hxx
index 90b1f8141902..686f00f6e5be 100644
--- a/sw/inc/unoparaframeenum.hxx
+++ b/sw/inc/unoparaframeenum.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,16 +66,11 @@ typedef ::std::deque< ::boost::shared_ptr<SwDepend> >
FrameDependList_t;
-// OD 2004-05-07 #i28701# - adjust 4th parameter
+// #i28701# - adjust 4th parameter
void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
FrameDependSortList_t & rFrames,
const bool _bAtCharAnchoredObjs );
-
-/* -----------------23.03.99 12:57-------------------
- *
- * --------------------------------------------------*/
-
enum ParaFrameMode
{
PARAFRAME_PORTION_PARAGRAPH,
@@ -125,3 +121,4 @@ public:
#endif // SW_UNOPARAFRAMEENUM_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx
index 5093efaf65a3..95e47ae29755 100644
--- a/sw/inc/unoparagraph.hxx
+++ b/sw/inc/unoparagraph.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,9 +58,6 @@ class SwTable;
class SwXText;
-/*-----------------07.04.98 08:15-------------------
-
---------------------------------------------------*/
typedef ::cppu::ImplInheritanceHelper10
< ::sfx2::MetadatableMixin
, ::com::sun::star::lang::XUnoTunnel
@@ -316,9 +314,6 @@ public:
};
-/*-----------------07.04.98 08:10-------------------
-
---------------------------------------------------*/
class SwXParagraphEnumeration
: public SwSimpleEnumeration_Base
{
@@ -363,3 +358,4 @@ public:
#endif // SW_UNOPARAGRAPH_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoport.hxx b/sw/inc/unoport.hxx
index 9071a388a5b8..4b4f95abaee8 100644
--- a/sw/inc/unoport.hxx
+++ b/sw/inc/unoport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,17 +61,12 @@ typedef ::std::deque<
::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > >
TextRangeList_t;
-
-/* -----------------29.05.98 14:42-------------------
- *
- * --------------------------------------------------*/
enum SwTextPortionType
{
PORTION_TEXT,
PORTION_FIELD,
PORTION_FRAME,
PORTION_FOOTNOTE,
-// obsolete! PORTION_CONTROL_CHAR,
PORTION_REFMARK_START,
PORTION_REFMARK_END,
PORTION_TOXMARK_START,
@@ -135,7 +131,6 @@ private:
protected:
- //SfxItemPropertySet& GetPropSet() { return aPropSet; }
void SAL_CALL SetPropertyValues_Impl(
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames,
@@ -145,9 +140,6 @@ protected:
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames )
throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-// ::com::sun::star::uno::Any GetPropertyValue( const SfxItemPropertyMap *pEntry,
-// SwUnoCrsr *pUnoCrsr,
-// SfxItemSet *pSet );
void GetPropertyValues( const ::rtl::OUString *pPropertyNames,
::com::sun::star::uno::Any *pValues,
sal_Int32 nLength );
@@ -185,7 +177,6 @@ public:
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL getDirectPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
//XMultiPropertySet
-// virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
@@ -265,9 +256,6 @@ public:
{return static_cast<SwUnoCrsr*>(const_cast<SwModify*>(GetRegisteredIn()));}
};
-/* -----------------29.05.98 14:42-------------------
- *
- * --------------------------------------------------*/
class SwXTextPortionEnumeration
: public ::cppu::WeakImplHelper3
< ::com::sun::star::container::XEnumeration
@@ -323,3 +311,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index d0edd92e8e06..e9a2deb5e8c9 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,6 @@
#ifndef _UNOPRNMS_HXX
#define _UNOPRNMS_HXX
-
#include <sal/types.h>
#include <tools/solar.h>
#include "swdllapi.h"
@@ -704,27 +704,25 @@ enum SwPropNameIds
/* 0662 */ UNO_NAME_SELITEM,
/* 0663 */ UNO_NAME_IS_SPLIT_ALLOWED,
/* 0664 */ UNO_NAME_CHAR_HIDDEN,
-// OD 18.09.2003 #i18732#
+
/* 0665 */ UNO_NAME_IS_FOLLOWING_TEXT_FLOW,
/* 0666 */ UNO_NAME_WIDTH_TYPE,
/* 0667 */ UNO_NAME_SCRIPT_URL,
/* 0668 */ UNO_NAME_RUNTIME_UID,
/* 0669 */ UNO_NAME_COLLAPSING_BORDERS,
-// OD 2004-05-05 #i28701#
+
/* 0670 */ UNO_NAME_WRAP_INFLUENCE_ON_POSITION,
/* 0671 */ UNO_NAME_DATA_BASE_URL,
/* 0672 */ UNO_NAME_DATA_BASE_RESOURCE,
-// --> OD 2004-08-06 #i28749#
+
/* 0673 */ UNO_NAME_TRANSFORMATION_IN_HORI_L2R,
/* 0674 */ UNO_NAME_POSITION_LAYOUT_DIR,
-// <--
+
/* 0675 */ UNO_NAME_NUMBERING_IS_OUTLINE,
-///* 0676 */ UNO_NAME_DEFAULT_OUTLINE_LEVEL, //#outline level, removed by zhaojianwei
-// --> OD 2004-10-28 #i36248#
+
/* 0677 */ UNO_NAME_STARTPOSITION_IN_HORI_L2R,
/* 0678 */ UNO_NAME_ENDPOSITION_IN_HORI_L2R,
-// <--
-// --> OS 2004-12-13 #30916#
+
/* 0679 */ UNO_NAME_SUBJECT,
/* 0680 */ UNO_NAME_ADDRESS_FROM_COLUMN,
/* 0681 */ UNO_NAME_SEND_AS_HTML,
@@ -739,77 +737,78 @@ enum SwPropNameIds
/* 0690 */ UNO_NAME_BLIND_COPIES_TO,
/* 0691 */ UNO_NAME_IN_SERVER_PASSWORD,
/* 0692 */ UNO_NAME_OUT_SERVER_PASSWORD,
-// <--
+
/* 0693 */ UNO_NAME_SAVE_FILTER_OPTIONS,
/* 0694 */ UNO_NAME_SAVE_FILTER_DATA,
/* 0695 */ UNO_NAME_LOCK_UPDATES,
-// --> TL 2005-02-14 #i37766#
+
/* 0696 */ UNO_NAME_PAGE_COUNT,
/* 0697 */ UNO_NAME_LINE_COUNT,
/* 0698 */ UNO_NAME_IS_CONSTANT_SPELLCHECK,
/* 0699 */ UNO_NAME_IS_HIDE_SPELL_MARKS, // deprecated #i91949
-// <--
+
/* 0700 */ UNO_NAME_IS_FIELD_USED,
/* 0701 */ UNO_NAME_IS_FIELD_DISPLAYED,
/* 0702 */ UNO_NAME_BUILDID,
/* 0703 */ UNO_NAME_PARA_STYLE_CONDITIONS,
-// --> FME 2005-12-13 #b6354161# Print empty pages
+
/* 0704 */ UNO_NAME_PRINT_EMPTY_PAGES,
-// <--
-// --> BM 2006 New Chart (chart2)
+
/* 0705 */ UNO_NAME_ROLE,
-// <--
+
/* 0706 */ UNO_NAME_FIELD_CODE,
/* 0707 */ UNO_NAME_HAS_VALID_SIGNATURES,
-// --> AMA #i65476# automatic styles
+
/* 0708 */ UNO_NAME_CHAR_AUTO_STYLE_NAME,
/* 0709 */ UNO_NAME_PARA_AUTO_STYLE_NAME,
-// --> OD 2006-03-21 #b6375613#
+
/* 0710 */ UNO_NAME_APPLY_WORKAROUND_FOR_B6375613,
/* 0711 */ UNO_NAME_LAYOUT_SIZE,
-// --> HB #144146#
+
/* 0712 */ UNO_NAME_HELP,
/* 0713 */ UNO_NAME_TOOLTIP,
-// --> #i73329# / 2007-01-11 / frank.schoenheit@sun.com
+
/* 0714 */ UNO_NAME_DIALOG_LIBRARIES,
/* 0715 */ UNO_NAME_HEADER_ROW_COUNT,
/* 0716 */ UNO_NAME_INPUT,
/* 0717 */ UNO_NAME_ROW_SPAN,
-// --> OD 2008-01-15 #newlistlevelattrs#
+
/* 0718 */ UNO_NAME_POSITION_AND_SPACE_MODE,
/* 0719 */ UNO_NAME_LABEL_FOLLOWED_BY,
/* 0720 */ UNO_NAME_LISTTAB_STOP_POSITION,
/* 0721 */ UNO_NAME_FIRST_LINE_INDENT,
/* 0722 */ UNO_NAME_INDENT_AT,
-// --> #i52420# / 2008-02-07 / beppec56@openoffice.org
+
/* 0723 */ UNO_NAME_CHAPTER_LEVEL,
-// --> 2007-03-27 text grid enhancement for better CJK support
+
/* 0724 */ UNO_NAME_GRID_BASE_WIDTH,
/* 0725 */ UNO_NAME_GRID_SNAP_TO_CHARS,
/* 0726 */ UNO_NAME_GRID_STANDARD_PAGE_MODE,
/* 0727 */ UNO_NAME_TABLE_BORDER_DISTANCES,
-// --> OD 2008-04-22 #refactorlists#
+
/* 0728 */ UNO_NAME_LIST_ID,
/* 0729 */ UNO_NAME_DEFAULT_LIST_ID,
-// <--
+
/* 0730 */ UNO_NAME_STREAM_NAME,
-// --> OD 2008-11-26 #158694#
+
/* 0731 */ UNO_NAME_PARA_CONTINUEING_PREVIOUS_SUB_TREE,
/* 0732 */ UNO_NAME_PARA_LIST_LABEL_STRING,
-// <--
+
/* 0733 */ UNO_NAME_CHAR_OVERLINE,
/* 0734 */ UNO_NAME_CHAR_OVERLINE_COLOR,
/* 0735 */ UNO_NAME_CHAR_OVERLINE_HAS_COLOR,
-/* 0736 */ UNO_NAME_OUTLINE_LEVEL, //#outline level,add<-zhaojianwei outlinelevel
-// --> OD 2009-07-13 #i73249#
+/* 0736 */ UNO_NAME_OUTLINE_LEVEL,
+
/* 0737 */ UNO_NAME_DESCRIPTION,
-// <--
-/* 0738 */ UNO_NAME_META, // #i91565#
-/* 0739 */ UNO_NAME_NESTED_TEXT_CONTENT, // #i109601#
/* 0740 */ UNO_NAME_EMBEDDED_OBJECT,
-/* 0741 */ SW_PROPNAME_END
-};
+// FIXME: these number comments cannot be right post merge - fix them up ...
+/* 0738 */ UNO_NAME_META,
+/* 0739 */ UNO_NAME_IS_TEMPLATE,
+/* 0740 */ UNO_NAME_VBA_DOCOBJ,
+/* 0741 */ UNO_NAME_NESTED_TEXT_CONTENT,
+/* 0742 */ SW_PROPNAME_END
+};
struct SwPropNameLen
{
@@ -818,8 +817,6 @@ struct SwPropNameLen
operator const char*() const { return pName; }
};
-
-
typedef const SwPropNameLen SwPropNameTab[ SW_PROPNAME_END - SW_PROPNAME_BEGIN ];
extern const SwPropNameTab aPropNameTab;
@@ -838,5 +835,6 @@ SW_DLLPUBLIC const SwPropNameLen& SwGetPropName( sal_uInt16 nId );
#define SW_PROP_NAME_STR(nId) \
GetPropName( nId ).pName
-
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoredline.hxx b/sw/inc/unoredline.hxx
index 65c14d82bbbf..bf0a0173808f 100644
--- a/sw/inc/unoredline.hxx
+++ b/sw/inc/unoredline.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,10 +34,6 @@
class SwRedline;
-/* -----------------------------19.12.00 11:35--------------------------------
-
- ---------------------------------------------------------------------------*/
-
/**
* SwXRedlineText provides an XText which may be used to write
* directly into a redline node. It got implemented to enable XML
@@ -71,9 +68,7 @@ public:
virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
};
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
class SwXRedlinePortion : public SwXTextPortion
{
const SwRedline* pRedline;
@@ -99,9 +94,7 @@ public:
static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > CreateRedlineProperties( const SwRedline& rRedline, sal_Bool bIsStart ) throw();
};
-/* -----------------------------11.01.01 16:52--------------------------------
- ---------------------------------------------------------------------------*/
typedef
cppu::WeakImplHelper1
<
@@ -154,3 +147,5 @@ public:
const SwRedline* GetRedline() const {return pRedline;}
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoredlines.hxx b/sw/inc/unoredlines.hxx
index 49db8cf27761..56ba53446922 100644
--- a/sw/inc/unoredlines.hxx
+++ b/sw/inc/unoredlines.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,9 +73,7 @@ public:
static ::com::sun::star::beans::XPropertySet* GetObject( SwRedline& rRedline, SwDoc& rDoc );
};
-/* -----------------------------12.01.01 14:58--------------------------------
- ---------------------------------------------------------------------------*/
class SwXRedlineEnumeration
: public SwSimpleEnumeration_Base
, public SwClient
@@ -103,3 +102,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unorefmark.hxx b/sw/inc/unorefmark.hxx
index ba8ca8e8b45c..e0c88758cf4b 100644
--- a/sw/inc/unorefmark.hxx
+++ b/sw/inc/unorefmark.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,10 +44,6 @@ class SwDoc;
class SwModify;
class SwFmtRefMark;
-
-/* -----------------27.08.98 15:11-------------------
- *
- * --------------------------------------------------*/
typedef ::cppu::WeakImplHelper5
< ::com::sun::star::lang::XUnoTunnel
, ::com::sun::star::lang::XServiceInfo
@@ -172,3 +169,4 @@ public:
#endif // SW_UNOREFMARK_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unosection.hxx b/sw/inc/unosection.hxx
index e54bdd5775af..d1447b0750d9 100644
--- a/sw/inc/unosection.hxx
+++ b/sw/inc/unosection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,10 +48,6 @@
class SwSectionFmt;
-/*-----------------09.03.98 13:57-------------------
-
---------------------------------------------------*/
-
struct SwTextSectionProperties_Impl;
@@ -253,3 +250,4 @@ public:
#endif // SW_UNOSECTION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
index 4c2d66868420..6b2cd2048f96 100644
--- a/sw/inc/unosett.hxx
+++ b/sw/inc/unosett.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,6 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/container/XNamed.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase4.hxx>
#include <cppuhelper/implbase5.hxx>
@@ -50,9 +50,6 @@ class SwNumRule;
/******************************************************************************
*
******************************************************************************/
-/* -----------------04.05.98 12:28-------------------
- *
- * --------------------------------------------------*/
class SwXFootnoteProperties : public cppu::WeakAggImplHelper2
<
::com::sun::star::beans::XPropertySet,
@@ -84,9 +81,6 @@ public:
void Invalidate() {pDoc = 0;}
};
-/* -----------------04.05.98 12:28-------------------
- *
- * --------------------------------------------------*/
class SwXEndnoteProperties : public cppu::WeakAggImplHelper2
<
::com::sun::star::beans::XPropertySet,
@@ -118,9 +112,6 @@ public:
void Invalidate() {pDoc = 0;}
};
-/* -----------------04.05.98 12:28-------------------
- *
- * --------------------------------------------------*/
class SwXLineNumberingProperties : public cppu::WeakAggImplHelper2
<
::com::sun::star::beans::XPropertySet,
@@ -152,9 +143,6 @@ public:
void Invalidate() {pDoc = 0;}
};
-/* -----------------25.05.98 08:21-------------------
- *
- * --------------------------------------------------*/
class SwXNumberingRules : public cppu::WeakAggImplHelper5
<
::com::sun::star::container::XIndexReplace,
@@ -234,9 +222,7 @@ public:
void Invalidate() {pDocShell = 0;}
const String& GetCreatedNumRuleName() const{return sCreatedNumRuleName; }
};
-/*-----------------12.02.98 08:27-------------------
---------------------------------------------------*/
class SwXChapterNumbering : public SwXNumberingRules
{
protected:
@@ -254,9 +240,6 @@ public:
};
-/* -----------------27.05.98 15:44-------------------
- *
- * --------------------------------------------------*/
class SwXTextColumns : public cppu::WeakAggImplHelper4
<
@@ -324,3 +307,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unosrch.hxx b/sw/inc/unosrch.hxx
index a4021761925f..ed683626f175 100644
--- a/sw/inc/unosrch.hxx
+++ b/sw/inc/unosrch.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,9 +47,6 @@ namespace com{namespace sun{namespace star{namespace util{
}}}}
-/*-----------------19.12.97 12:58-------------------
-
---------------------------------------------------*/
class SwXTextSearch : public cppu::WeakImplHelper3
<
::com::sun::star::util::XPropertyReplace,
@@ -71,7 +69,6 @@ class SwXTextSearch : public cppu::WeakImplHelper3
sal_Bool bBack : 1;
sal_Bool bExpr : 1;
sal_Bool bCase : 1;
-// sal_Bool bInSel: 1; // wie geht Suchen in Selektionen?
sal_Bool bStyles:1;
sal_Bool bSimilarity : 1;
sal_Bool bLevRelax :1;
@@ -134,3 +131,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
index 740b909f1f7a..919c930f1fe6 100644
--- a/sw/inc/unostyle.hxx
+++ b/sw/inc/unostyle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,7 +45,6 @@
#include <com/sun/star/document/XEventsSupplier.hpp>
#include <calbck.hxx>
-
#include <com/sun/star/style/XAutoStyleFamily.hpp>
#include <com/sun/star/style/XAutoStyles.hpp>
#include <com/sun/star/style/XAutoStyle.hpp>
@@ -63,9 +63,7 @@ typedef boost::shared_ptr<SfxItemSet> SfxItemSet_Pointer_t;
/******************************************************************************
*
******************************************************************************/
-/*-----------------12.02.98 08:27-------------------
---------------------------------------------------*/
class SwXStyleFamilies : public cppu::WeakImplHelper4
<
::com::sun::star::container::XIndexAccess,
@@ -87,7 +85,6 @@ protected:
public:
SwXStyleFamilies(SwDocShell& rDocShell);
-
//XNameAccess
virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
@@ -105,16 +102,12 @@ public:
virtual void SAL_CALL loadStylesFromURL(const rtl::OUString& rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aOptions) throw( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getStyleLoaderOptions(void) throw( ::com::sun::star::uno::RuntimeException );
-
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
};
-/* -----------------26.05.98 10:56-------------------
- *
- * --------------------------------------------------*/
class SwXStyleFamily : public cppu::WeakImplHelper4
<
::com::sun::star::container::XNameContainer,
@@ -124,9 +117,8 @@ class SwXStyleFamily : public cppu::WeakImplHelper4
>,
public SfxListener
{
- SfxStyleFamily eFamily; // Familie
+ SfxStyleFamily eFamily;
SfxStyleSheetBasePool* pBasePool;
-// const SfxItemPropertyMap* _pPropMap;
SwDocShell* pDocShell;
SwXStyle* _FindStyle(const String& rStyleName) const;
@@ -169,9 +161,7 @@ public:
virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
};
-/* -----------------20.05.98 09:51-------------------
- *
- * --------------------------------------------------*/
+
class SwXStyle : public cppu::WeakImplHelper7
<
::com::sun::star::style::XStyle,
@@ -189,7 +179,7 @@ class SwXStyle : public cppu::WeakImplHelper7
SwDoc* m_pDoc;
String sStyleName;
SfxStyleSheetBasePool* pBasePool;
- SfxStyleFamily eFamily; // fuer Notify
+ SfxStyleFamily eFamily; // for Notify
sal_Bool bIsDescriptor : 1;
sal_Bool bIsConditional : 1;
@@ -215,8 +205,8 @@ public:
SwXStyle(SwDoc* pDoc, SfxStyleFamily eFam = SFX_STYLE_FAMILY_PARA, sal_Bool bConditional = sal_False);
SwXStyle(SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam,
SwDoc* pDoc,
- const String& rStyleName);//,
- //const SfxItemPropertyMap* _pMap);
+ const String& rStyleName);
+
~SwXStyle();
TYPEINFO();
@@ -246,7 +236,6 @@ public:
virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
//XMultiPropertySet
-// virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
@@ -260,7 +249,6 @@ public:
virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
//XMultiPropertyStates
- //virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
@@ -288,9 +276,7 @@ public:
SwDoc* GetDoc() const { return m_pDoc; }
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
};
-/* -----------------------------15.12.00 14:25--------------------------------
- ---------------------------------------------------------------------------*/
class SwXFrameStyle : public SwXStyle,
public com::sun::star::document::XEventsSupplier
{
@@ -312,9 +298,7 @@ public:
friend class SwFrameStyleEventDescriptor;
};
-/* -----------------24.08.98 16:04-------------------
- *
- * --------------------------------------------------*/
+
class SwXPageStyle : public SwXStyle
{
SwDocShell* pDocShell;
@@ -325,8 +309,7 @@ protected:
public:
SwXPageStyle(SfxStyleSheetBasePool& rPool, SwDocShell* pDocSh, SfxStyleFamily eFam,
- const String& rStyleName);//,
- //const SfxItemPropertyMap* _pMap);
+ const String& rStyleName);
SwXPageStyle(SwDocShell* pDocSh);
~SwXPageStyle();
@@ -337,9 +320,8 @@ public:
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException);
};
-/*-- 19.05.2006 11:20:22---------------------------------------------------
- access to all automatic style families
- -----------------------------------------------------------------------*/
+
+// access to all automatic style families
class SwXAutoStyles :
public cppu::WeakImplHelper1< ::com::sun::star::style::XAutoStyles >,
public SwUnoCollection
@@ -368,9 +350,8 @@ public:
virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
};
-/*-- 19.05.2006 11:20:12---------------------------------------------------
- access to a family of automatic styles (character or paragraph or ...)
- -----------------------------------------------------------------------*/
+
+// access to a family of automatic styles (character or paragraph or ...)
class SwXAutoStyleFamily : public cppu::WeakImplHelper1< com::sun::star::style::XAutoStyleFamily >,
public SwClient
{
@@ -407,10 +388,8 @@ public:
virtual ::com::sun::star::uno::Any SAL_CALL nextElement( ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
};
-/*-- 19.05.2006 11:20:02---------------------------------------------------
- an automatic style
- -----------------------------------------------------------------------*/
+// an automatic style
class SwXAutoStyle : public cppu::WeakImplHelper3
<
::com::sun::star::beans::XPropertySet,
@@ -440,7 +419,6 @@ public:
virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
//XMultiPropertySet
- // virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
@@ -454,7 +432,6 @@ public:
virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
//XMultiPropertyStates
- // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
@@ -464,4 +441,4 @@ public:
};
#endif
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index e359726f94dc..72c5c6a76865 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,9 +65,6 @@ class SwChartDataProvider;
class SwFrmFmt;
-/* -----------------------------22.09.00 11:10--------------------------------
-
- ---------------------------------------------------------------------------*/
class SwChartEventListenerContainer : public SwEventListenerContainer
{
public:
@@ -74,9 +72,7 @@ class SwChartEventListenerContainer : public SwEventListenerContainer
SwEventListenerContainer(pxParentL){}
void ChartDataChanged();
};
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
typedef
cppu::WeakImplHelper4
<
@@ -178,9 +174,7 @@ public:
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
};
-/* -----------------27.06.98 15:40-------------------
- *
- * --------------------------------------------------*/
+
class SwXTextTableRow : public cppu::WeakImplHelper2
<
::com::sun::star::beans::XPropertySet,
@@ -220,9 +214,7 @@ public:
const SwTableLine* GetTblRow() const {return pLine;}
static SwTableLine* FindLine(SwTable* pTable, SwTableLine* pLine);
};
-/* -----------------20.07.98 13:03-------------------
- *
- * --------------------------------------------------*/
+
typedef cppu::WeakImplHelper3<
::com::sun::star::text::XTextTableCursor,
::com::sun::star::lang::XServiceInfo,
@@ -235,8 +227,6 @@ class SW_DLLPUBLIC SwXTextTableCursor : public SwXTextTableCursor_Base
SwDepend aCrsrDepend;
const SfxItemPropertySet* m_pPropSet;
- // SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)aCrsrDepend.GetRegisteredIn(); }
-
protected:
virtual ~SwXTextTableCursor();
public:
@@ -287,9 +277,6 @@ public:
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
};
-/*-----------------11.12.97 09:38-------------------
-
---------------------------------------------------*/
struct SwRangeDescriptor
{
sal_Int32 nTop;
@@ -337,7 +324,7 @@ public:
SwXTextTable(SwFrmFmt& rFrmFmt);
- static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+ SW_DLLPUBLIC static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
//XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
@@ -423,9 +410,6 @@ public:
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
};
-/* -----------------27.04.98 16:41-------------------
- *
- * --------------------------------------------------*/
class SwXCellRange : public cppu::WeakImplHelper7
<
::com::sun::star::table::XCellRange,
@@ -519,9 +503,7 @@ public:
sal_Bool bForceNumberResults = sal_False ) throw (::com::sun::star::uno::RuntimeException);
};
-/* -----------------03.02.99 07:31-------------------
- *
- * --------------------------------------------------*/
+
class SwXTableRows : public cppu::WeakImplHelper2
<
::com::sun::star::table::XTableRows,
@@ -539,14 +521,6 @@ public:
TYPEINFO();
-// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
-// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void) throw( ::com::sun::star::uno::RuntimeException );
-
-// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
-// virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut );
-
-// SMART_UNO_DECLARATION( SwXTableRows, UsrObject );
-
//XIndexAccess
virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
@@ -568,9 +542,6 @@ public:
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
};
-/* -----------------03.02.99 07:31-------------------
- *
- * --------------------------------------------------*/
class SwXTableColumns : public cppu::WeakImplHelper2
<
::com::sun::star::table::XTableColumns,
@@ -587,13 +558,6 @@ public:
TYPEINFO();
-// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
-// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void) throw( ::com::sun::star::uno::RuntimeException );
-
-// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
-// virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut );
-
-// SMART_UNO_DECLARATION( SwXTableColumns, UsrObject );
//XIndexAccess
virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
@@ -621,3 +585,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unotext.hxx b/sw/inc/unotext.hxx
index d6ada94d5396..5e1543acfcde 100644
--- a/sw/inc/unotext.hxx
+++ b/sw/inc/unotext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,9 +55,6 @@ class OTextCursorHelper;
class SwXTextRange;
-/* -----------------03.12.98 12:22-------------------
- *
- * --------------------------------------------------*/
class SwXText
: public ::com::sun::star::lang::XTypeProvider
@@ -344,3 +342,4 @@ public:
#endif // SW_UNOTEXT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx
index dd5fa736fe17..4a4ca2cb2913 100644
--- a/sw/inc/unotextbodyhf.hxx
+++ b/sw/inc/unotextbodyhf.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,9 +120,6 @@ public:
};
-/* -----------------25.08.98 11:02-------------------
- *
- * --------------------------------------------------*/
typedef ::cppu::WeakImplHelper2
< ::com::sun::star::lang::XServiceInfo
, ::com::sun::star::container::XEnumerationAccess
@@ -208,3 +206,4 @@ public:
#endif // SW_UNOTEXTBODYHF_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx
index fe04602377c0..8d51aef6420b 100644
--- a/sw/inc/unotextcursor.hxx
+++ b/sw/inc/unotextcursor.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -345,3 +346,4 @@ public:
#endif // SW_UNOTEXTCURSOR_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unotextmarkup.hxx b/sw/inc/unotextmarkup.hxx
index 98bb3416d385..4b015b95405e 100644
--- a/sw/inc/unotextmarkup.hxx
+++ b/sw/inc/unotextmarkup.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108,3 +109,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx
index 4a10c7acf513..feeb227a3d65 100644
--- a/sw/inc/unotextrange.hxx
+++ b/sw/inc/unotextrange.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,9 +52,6 @@ class SwPaM;
class SwUnoCrsr;
class SwFrmFmt;
-/* -----------------29.04.98 07:35-------------------
- *
- * --------------------------------------------------*/
class SwUnoInternalPaM
: public SwPaM
{
@@ -274,10 +272,6 @@ public:
};
-/* -----------------15.05.98 08:29-------------------
- *
- * --------------------------------------------------*/
-
typedef ::cppu::WeakImplHelper3
< ::com::sun::star::lang::XUnoTunnel
, ::com::sun::star::lang::XServiceInfo
@@ -336,3 +330,4 @@ public:
#endif // SW_UNOTEXTRANGE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index f51e4a7892f0..82512aa9af5e 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -329,9 +330,6 @@ public:
// css::text::XTextEmbeddedObjectsSupplier
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getEmbeddedObjects(void) throw( css::uno::RuntimeException );
-// // css::text::XTextShapesSupplier
-// virtual css::uno::Reference< css::container::XIndexAccess > getShapes(void) throw( css::uno::RuntimeException );
-
// css::text::XBookmarksSupplier
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getBookmarks(void) throw( css::uno::RuntimeException );
@@ -442,9 +440,7 @@ public:
void SAL_CALL operator delete( void * ) throw();
};
-/* -----------------25.10.99 11:02-------------------
- --------------------------------------------------*/
class SwXLinkTargetSupplier : public cppu::WeakImplHelper2
<
css::container::XNameAccess,
@@ -481,9 +477,7 @@ public:
//
void Invalidate() {pxDoc = 0;}
};
-/* -----------------26.10.99 09:05-------------------
- --------------------------------------------------*/
class SwXLinkNameAccessWrapper : public cppu::WeakImplHelper4
<
css::beans::XPropertySet,
@@ -534,9 +528,7 @@ public:
virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
};
-/* -----------------26.10.99 15:46-------------------
- --------------------------------------------------*/
class SwXOutlineTarget : public cppu::WeakImplHelper2
<
css::beans::XPropertySet,
@@ -587,8 +579,7 @@ public:
};
-/*-- 06.01.2004 15:08:34---------------------------------------------------
- The class SwViewOptionAdjust_Impl is used to adjust the SwViewOption of
+/* The class SwViewOptionAdjust_Impl is used to adjust the SwViewOption of
the current ViewShell so that fields are not printed as commands and
hidden characters are always invisible. Hidden text and place holders
should be printed according to the current print options.
@@ -598,8 +589,6 @@ class SwViewOptionAdjust_Impl
{
SwWrtShell & m_rShell;
SwViewOption m_aOldViewOptions;
-// SwViewOption m_aRenderViewOptions; // view options to use when rendering for PDF export or printing
-// bool m_bRestoreViewOptions;
public:
SwViewOptionAdjust_Impl( SwWrtShell& rSh, const SwViewOption &rViewOptions );
@@ -612,3 +601,4 @@ public:
};
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx
index 21243589daf1..5b041e620d9a 100644
--- a/sw/inc/usrfld.hxx
+++ b/sw/inc/usrfld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,8 +74,8 @@ public:
sal_Bool IsDeleted() const { return bDeleted; }
void SetDeleted( sal_Bool b ) { bDeleted = b; }
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nMId ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nMId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nMId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nMId );
};
inline sal_Bool SwUserFieldType::IsValid() const
@@ -126,8 +127,10 @@ public:
// Inhalt
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
};
#endif // SW_USRFLD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 8bacf2ee8f67..af12afe42bbc 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,6 @@ class ViewShell;
class SwDocShell;
namespace svtools{ class ColorConfig;}
-//#define VIEWOPT_1_IDLE 0x00000001L no longer used, see new member 'bIdle'
#define VIEWOPT_1_TAB 0x00000002L
#define VIEWOPT_1_BLANK 0x00000004L
#define VIEWOPT_1_HARDBLANK 0x00000008L
@@ -53,8 +53,6 @@ namespace svtools{ class ColorConfig;}
#define VIEWOPT_1_REF 0x00000400L
#define VIEWOPT_1_FLDNAME 0x00000800L
-//#define 0x00001000L
-//#define 0x00002000L
#define VIEWOPT_1_POSTITS 0x00004000L
#define VIEWOPT_1_FLD_HIDDEN 0x00008000L
#define VIEWOPT_1_CHAR_HIDDEN 0x00010000L
@@ -62,13 +60,11 @@ namespace svtools{ class ColorConfig;}
#define VIEWOPT_1_TABLE 0x00040000L
#define VIEWOPT_1_DRAW 0x00080000L
#define VIEWOPT_1_CONTROL 0x00100000L
-//#define 0x00200000L
#define VIEWOPT_1_CROSSHAIR 0x00400000L
#define VIEWOPT_1_SNAP 0x00800000L
#define VIEWOPT_1_SYNCHRONIZE 0x01000000L
#define VIEWOPT_1_GRIDVISIBLE 0x02000000L
#define VIEWOPT_1_ONLINESPELL 0x04000000L
-//#define VIEWOPT_1_HIDESPELL 0x08000000L /* removed #i91949 */
#define VIEWOPT_1_RESERVED1 0x10000000L
#define VIEWOPT_1_VIEWMETACHARS 0x20000000L
#define VIEWOPT_1_PAGEBACK 0x40000000L
@@ -114,6 +110,7 @@ namespace svtools{ class ColorConfig;}
#define VIEWOPT_VISITED_LINKS 0x0020
#define VIEWOPT_FIELD_SHADINGS 0x0040
#define VIEWOPT_SECTION_BOUNDARIES 0x0080
+#define VIEWOPT_SHADOW 0x0100
// Implementierung in core/text/txtpaint.cxx
extern void SyncVout( const OutputDevice *pOut );
@@ -137,6 +134,7 @@ class SwViewOption
static Color aSectionBoundColor;
static Color aPageBreakColor;
static Color aScriptIndicatorColor;
+ static Color aShadowColor;
static sal_Int32 nAppearanceFlags; //
protected:
@@ -158,9 +156,7 @@ protected:
sal_Bool bStarOneSetting : 1;// prevent from UI automatics (no scrollbars in readonly documents)
sal_Bool bIsPagePreview : 1; // the preview mustn't print field/footnote/... shadings
sal_Bool bSelectionInReadonly : 1; //determines whether selection is switched on in readonly documents
- // --> FME 2004-06-29 #114856# Formular view
sal_Bool bFormView : 1;
- // <--
sal_Bool bBookview : 1; // view mode for page preview
sal_Bool mbViewLayoutBookMode : 1; // book view mode for edit view
sal_Bool bShowPlaceHolderFields : 1; //only used in printing!
@@ -172,7 +168,7 @@ protected:
sal_uInt8 nTblDest; // Ziel fuer Tabellenhintergrund
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// korrespondieren zu den Angaben in ui/config/cfgvw.src
sal_Bool bTest1 :1; // Test-Flag "Layout not loading"
sal_Bool bTest2 :1; // Test-Flag "WYSIWYG++"
@@ -389,11 +385,6 @@ public:
inline void SetPrinting(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PRINTING) : (nCore2Options &= ~VIEWOPT_CORE2_PRINTING);}
-/*---------------------------------------------------------------------------
-
-----------------------------------------------------------------------------*/
-
-
inline short GetDivisionX() const { return nDivisionX; }
inline void SetDivisionX( short n ){ nDivisionX = n; }
inline short GetDivisionY() const { return nDivisionY; }
@@ -409,23 +400,20 @@ public:
sal_Bool IsSelectionInReadonly() const {return bSelectionInReadonly;}
void SetSelectionInReadonly(sal_Bool bSet) {bSelectionInReadonly = bSet;}
- // --> FME 2004-06-29 #114856# Formular view
sal_Bool IsFormView() const { return bFormView; }
void SetFormView( sal_Bool bSet ) { bFormView = bSet; }
- // <--
inline sal_Bool IsPagePrevBookview() const { return bBookview; }
inline void SetPagePrevBookview(sal_Bool bSet) { bBookview = bSet; }
sal_Bool IsAutoCompleteWords() const;
- // PAGES01
bool IsViewLayoutBookMode() const { return mbViewLayoutBookMode; }
void SetViewLayoutBookMode( bool bNew ) { mbViewLayoutBookMode = bNew; }
sal_uInt16 GetViewLayoutColumns() const { return mnViewLayoutColumns; }
void SetViewLayoutColumns( sal_uInt16 nNew ) { mnViewLayoutColumns = nNew; }
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// korrespondieren zu den Angaben in ui/config/cfgvw.src
inline sal_Bool IsTest1() const { return bTest1; }
inline void SetTest1( sal_Bool b ) { bTest1 = b; }
@@ -571,6 +559,7 @@ public:
static Color& GetTextGridColor();
static Color& GetSpellColor();
static Color& GetSmarttagColor();
+ static Color& GetShadowColor();
SW_DLLPUBLIC static Color& GetFontColor();
static Color& GetFieldShadingsColor();
static Color& GetSectionBoundColor();
@@ -586,6 +575,7 @@ public:
static sal_Bool IsVisitedLinks() {return IsAppearanceFlag(VIEWOPT_VISITED_LINKS );}
static sal_Bool IsFieldShadings() {return IsAppearanceFlag(VIEWOPT_FIELD_SHADINGS);}
static sal_Bool IsSectionBoundaries() {return IsAppearanceFlag(VIEWOPT_SECTION_BOUNDARIES);}
+ static sal_Bool IsShadow() {return IsAppearanceFlag(VIEWOPT_SHADOW );}
static void SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bSaveInConfig = sal_False);
@@ -613,3 +603,5 @@ SW_DLLPUBLIC sal_uInt16 GetHtmlMode(const SwDocShell*);
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index fd1224e41d32..7e07979f47a0 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,6 @@
#include <swtypes.hxx>
#include <ring.hxx>
#include <swrect.hxx>
-#include <errhdl.hxx>
#include <vcl/mapmod.hxx>
#include <vcl/print.hxx>
@@ -55,10 +55,8 @@ class IDocumentContentOperations;
class IDocumentStylePoolAccess;
class IDocumentStatistics;
class IDocumentUndoRedo;
-// --> OD 2007-11-14 #i83479#
class IDocumentListItems;
class IDocumentOutlineNodes;
-// <--
class SfxPrinter;
class SfxProgress;
class SwRootFrm;
@@ -93,7 +91,6 @@ namespace vcl
}
-//JP 19.07.98: - Bug 52312
// define fuer Flags, die im CTOR oder den darunter liegenden Schichten
// benoetigt werden.
// Zur Zeit wird fuer die DrawPage das PreView Flag benoetigt
@@ -109,17 +106,15 @@ class SW_DLLPUBLIC ViewShell : public Ring
friend class SwViewImp;
friend class SwLayIdle;
- // OD 12.12.2002 #103492# - for setting visible area for page preview paint
+ // for setting visible area for page preview paint
friend class SwPagePreviewLayout;
//Umsetzen der SwVisArea, damit vor dem Drucken sauber formatiert
//werden kann.
friend void SetSwVisArea( ViewShell *pSh, const SwRect &, sal_Bool bPDFExport = sal_False );
- // --> PB 2007-05-30 #146850#
static BitmapEx* pReplaceBmp; // replaced display of still loaded images
static BitmapEx* pErrorBmp; // error display of missed images
- // <--
static sal_Bool bLstAct; // sal_True wenn Das EndAction der letzten Shell
// laeuft; also die EndActions der
@@ -163,10 +158,9 @@ class SW_DLLPUBLIC ViewShell : public Ring
//Device (etwa beim Browsen)
- // OD 2004-06-01 #i26791# - boolean, indicating that class in in constructor
+ // boolean, indicating that class in in constructor
bool mbInConstructor:1;
- // #i74769#
SdrPaintWindow* mpTargetPaintWindow;
OutputDevice* mpBufferedOut;
@@ -338,7 +332,6 @@ public:
IDocumentUndoRedo const& GetIDocumentUndoRedo() const;
IDocumentUndoRedo & GetIDocumentUndoRedo();
- // --> OD 2007-11-14 #i83479#
const IDocumentListItems* getIDocumentListItemsAccess() const;
const IDocumentOutlineNodes* getIDocumentOutlineNodesAccess() const;
// <--
@@ -402,26 +395,22 @@ public:
// formatting by virtual device or printer
void SetUseVirDev( bool nNew );
- // OD 2004-02-16 #106629# - adding paragraph and table spacing at bottom
+ // adding paragraph and table spacing at bottom
// of table cells
void SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells );
- // OD 06.01.2004 #i11859# - former formatting of text lines with
+ // former formatting of text lines with
// proportional line spacing or not
void SetUseFormerLineSpacing( bool _bUseFormerLineSpacing );
- // OD 2004-03-12 #i11860# - former object positioning
+ // former object positioning
void SetUseFormerObjectPositioning( bool _bUseFormerObjPos );
- // OD 2004-05-05 #i28701#
void SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos );
- // --> FME #108724#
void SetUseFormerTextWrapping( bool _bUseFormerTextWrapping );
- // -> PB 2007-06-11 #i45491#
void SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak );
- // <--
//
// DOCUMENT COMPATIBILITY FLAGS END
@@ -454,12 +443,10 @@ public:
// Selektion der Draw ::com::sun::star::script::Engine geaendert
virtual void DrawSelChanged();
- // OD 12.12.2002 #103492#
SwPagePreviewLayout* PagePreviewLayout();
/** adjust view options for page preview
- OD 09.01.2003 #i6467#
Because page preview should show the document as it is printed -
page preview is print preview -, the view options are adjusted to the
same as for printing.
@@ -512,8 +499,6 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
- // OD 15.01.2003 #103492# - change method signature due to new page preview
- // functionality.
::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible >
CreateAccessiblePreview();
@@ -526,8 +511,6 @@ public:
/** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
- OD 2005-12-01 #i27138#
-
@author OD
@param _pFromTxtFrm
@@ -545,16 +528,13 @@ public:
/** invalidate text selection for paragraphs
- OD 2005-12-12 #i27301#
-
@author OD
*/
void InvalidateAccessibleParaTextSelection();
/** invalidate attributes for paragraphs and paragraph's characters
- OD 2009-01-06 #i88069#
- OD 2010-02-16 #i104008# - usage also for changes of the attributes of
+ usage also for changes of the attributes of
paragraph's characters.
@author OD
@@ -573,16 +553,12 @@ public:
long nFlags = 0 );
virtual ~ViewShell();
- // --> FME 2004-06-15 #i12836# enhanced pdf export
sal_Int32 GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const;
- // <--
inline bool IsInConstructor() const { return mbInConstructor; }
- // --> PB 2007-05-30 #146850#
static const BitmapEx& GetReplacementBitmap( bool bIsErrorState );
static void DeleteReplacementBitmaps();
- // <--
const SwPostItMgr* GetPostItMgr() const { return (const_cast<ViewShell*>(this))->GetPostItMgr(); }
SwPostItMgr* GetPostItMgr();
@@ -635,3 +611,5 @@ inline const SfxItemPool& ViewShell::GetAttrPool() const
#endif // SW_VIEWSH_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index 0dc52572d40e..e8e917b888ff 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,7 +79,6 @@ public:
// ------ Ab hier Klassen / Methoden fuer die Selectionen -------
-// #i75172# predefines
namespace sdr { namespace overlay { class OverlayObject; }}
class SwSelPaintRects : public SwRects
@@ -89,16 +89,14 @@ class SwSelPaintRects : public SwRects
static long nPixPtX, nPixPtY;
static MapMode *pMapMode;
- // die Shell
const SwCrsrShell* pCShell;
virtual void Paint( const Rectangle& rRect );
virtual void FillRects() = 0;
- // #i75172#
sdr::overlay::OverlayObject* mpCursorOverlay;
- // #i75172# access to mpCursorOverlay for swapContent
+ // access to mpCursorOverlay for swapContent
sdr::overlay::OverlayObject* getCursorOverlay() const { return mpCursorOverlay; }
void setCursorOverlay(sdr::overlay::OverlayObject* pNew) { mpCursorOverlay = pNew; }
@@ -106,7 +104,7 @@ public:
SwSelPaintRects( const SwCrsrShell& rCSh );
virtual ~SwSelPaintRects();
- // #i75172# in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To
+ // in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To
// make a complete swap access to mpCursorOverlay is needed there
void swapContent(SwSelPaintRects& rSwap);
@@ -164,9 +162,9 @@ public:
// sal_True: an die Position kann der Cursor gesetzt werden
virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
-#ifdef DBG_UTIL
-// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
-// am sichtbaren Cursor
+#if OSL_DEBUG_LEVEL > 1
+ // zum Testen des UNO-Crsr Verhaltens hier die Implementierung
+ // am sichtbaren Cursor
virtual sal_Bool IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
@@ -208,9 +206,9 @@ public:
// sal_True: an die Position kann der Cursor gesetzt werden
virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
-#ifdef DBG_UTIL
-// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
-// am sichtbaren Cursor
+#if OSL_DEBUG_LEVEL > 1
+ // zum Testen des UNO-Crsr Verhaltens hier die Implementierung
+ // am sichtbaren Cursor
virtual sal_Bool IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
@@ -221,3 +219,5 @@ public:
#endif // _VISCRS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/wdocsh.hxx b/sw/inc/wdocsh.hxx
index 7b97317bc23b..74ca5f098854 100644
--- a/sw/inc/wdocsh.hxx
+++ b/sw/inc/wdocsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/prj/build.lst b/sw/prj/build.lst
index c491c7f4e726..8d5bca1e945a 100644
--- a/sw/prj/build.lst
+++ b/sw/prj/build.lst
@@ -1,2 +1,3 @@
-sw sw : filter L10N:l10n connectivity OOo:writerperfect vbahelper svx stoc writerfilter LIBXSLT:libxslt NULL
+sw sw : filter L10N:l10n connectivity writerperfect lotuswordpro vbahelper svx stoc writerfilter unoxml fileaccess package comphelper LIBXSLT:libxslt NULL
sw sw\prj nmake - all sw_prj NULL
+sw sw\qa\core nmake - all sw_qa_cppunit sw_util NULL
diff --git a/sw/qa/complex/checkColor/CheckChangeColor.java b/sw/qa/complex/checkColor/CheckChangeColor.java
index a072072e18c8..a072072e18c8 100755..100644
--- a/sw/qa/complex/checkColor/CheckChangeColor.java
+++ b/sw/qa/complex/checkColor/CheckChangeColor.java
diff --git a/sw/qa/complex/indeterminateState/CheckIndeterminateState.java b/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
index 23a6d89ccf51..23a6d89ccf51 100755..100644
--- a/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
+++ b/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
diff --git a/sw/qa/complex/writer/CheckIndexedPropertyValues.java b/sw/qa/complex/writer/CheckIndexedPropertyValues.java
index c381cd5825c4..c381cd5825c4 100755..100644
--- a/sw/qa/complex/writer/CheckIndexedPropertyValues.java
+++ b/sw/qa/complex/writer/CheckIndexedPropertyValues.java
diff --git a/sw/qa/complex/writer/CheckNamedPropertyValues.java b/sw/qa/complex/writer/CheckNamedPropertyValues.java
index b2541954ce9f..b2541954ce9f 100755..100644
--- a/sw/qa/complex/writer/CheckNamedPropertyValues.java
+++ b/sw/qa/complex/writer/CheckNamedPropertyValues.java
diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java
index 114359bc3581..114359bc3581 100755..100644
--- a/sw/qa/complex/writer/TextPortionEnumerationTest.java
+++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java
diff --git a/sw/qa/core/CVE/CVE-2006-3117-1.sxw b/sw/qa/core/CVE/CVE-2006-3117-1.sxw
new file mode 100644
index 000000000000..49acb42d81e8
--- /dev/null
+++ b/sw/qa/core/CVE/CVE-2006-3117-1.sxw
Binary files differ
diff --git a/sw/qa/core/CVE/CVE-2007-0245-1.rtf b/sw/qa/core/CVE/CVE-2007-0245-1.rtf
new file mode 100644
index 000000000000..a166c56e1bd6
--- /dev/null
+++ b/sw/qa/core/CVE/CVE-2007-0245-1.rtf
@@ -0,0 +1,21 @@
+{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang2057\deflangfe2057{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f37\froman\fcharset238\fprq2 Times New Roman CE;}
+{\f38\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}{\f41\froman\fcharset162\fprq2 Times New Roman Tur;}{\f42\froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\f43\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;
+\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;
+\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 \snext0 Normal;}{\*\cs10 \additive \ssemihidden
+Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
+\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{\s15\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
+\fs20\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 \sbasedon0 \snext15 \ssemihidden \styrsid4263288 footnote text;}{\*\cs16 \additive \super \sbasedon10 \ssemihidden \styrsid4263288 footnote reference;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}
+{\*\rsidtbl \rsid163671\rsid4263288\rsid7694566\rsid13791612\rsid15955330}{\*\generator Microsoft Word 11.0.6359;}{\info{\title }{\author John}{\operator John}{\version2}{\edmins1}
+{\nofpages1}{\nofwords0}{\nofchars1}{\*\company NGS}{\nofcharsws1}{\vern24703}}{\*\userprops {\propname _DocHome}\proptype3{\staticval -1428762290}}\paperw11906\paperh16838
+\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1800\dgvorigin1440\dghshow1\dgvshow1
+\jexpand\viewkind1\viewscale86\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
+\asianbrkrule\rsidroot163671\newtblstyruls\nogrowautofit \fet0{\*\ftnsep \pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\insrsid4263288 \chftnsep
+\par }}{\*\ftnsepc \pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\insrsid4263288 \chftnsepc
+\par }}{\*\aftnsep \pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\insrsid4263288 \chftnsep
+\par }}{\*\aftnsepc \pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\insrsid4263288 \chftnsepc
+\par }}\sectd \linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3
+\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}
+{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain
+\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid163671 \fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\cs16\super\insrsid4263288 \chftn {\prtdata0 616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161}}{\insrsid13791612\charrsid163671
+\par }}
diff --git a/sw/qa/core/CVE/CVE-2009-0200-1.doc b/sw/qa/core/CVE/CVE-2009-0200-1.doc
new file mode 100644
index 000000000000..a142fec96b19
--- /dev/null
+++ b/sw/qa/core/CVE/CVE-2009-0200-1.doc
Binary files differ
diff --git a/sw/qa/core/CVE/CVE-2009-0201-1.doc b/sw/qa/core/CVE/CVE-2009-0201-1.doc
new file mode 100644
index 000000000000..bc6182d1d528
--- /dev/null
+++ b/sw/qa/core/CVE/CVE-2009-0201-1.doc
Binary files differ
diff --git a/sw/qa/core/CVE/CVE-2009-3301-1.doc b/sw/qa/core/CVE/CVE-2009-3301-1.doc
new file mode 100644
index 000000000000..8f1c2de02016
--- /dev/null
+++ b/sw/qa/core/CVE/CVE-2009-3301-1.doc
Binary files differ
diff --git a/sw/qa/core/CVE/CVE-2009-3302-1.doc b/sw/qa/core/CVE/CVE-2009-3302-1.doc
new file mode 100644
index 000000000000..8f1c2de02016
--- /dev/null
+++ b/sw/qa/core/CVE/CVE-2009-3302-1.doc
Binary files differ
diff --git a/sw/qa/core/CVE/CVE-2009-3302-2.doc b/sw/qa/core/CVE/CVE-2009-3302-2.doc
new file mode 100644
index 000000000000..0cd7a7dcd1f7
--- /dev/null
+++ b/sw/qa/core/CVE/CVE-2009-3302-2.doc
Binary files differ
diff --git a/sw/qa/core/CVE/CVE-2010-3451-1.rtf b/sw/qa/core/CVE/CVE-2010-3451-1.rtf
new file mode 100644
index 000000000000..88f84f12fe9a
--- /dev/null
+++ b/sw/qa/core/CVE/CVE-2010-3451-1.rtf
@@ -0,0 +1,2072 @@
+{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1031\deflangfe1031{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
+{\f35\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Tahoma;}{\f36\froman\fcharset238\fprq2 Times New Roman CE;}{\f37\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f39\froman\fcharset161\fprq2 Times New Roman Greek;}
+{\f40\froman\fcharset162\fprq2 Times New Roman Tur;}{\f41\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f42\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f43\froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\f44\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f46\fswiss\fcharset238\fprq2 Arial CE;}{\f47\fswiss\fcharset204\fprq2 Arial Cyr;}{\f49\fswiss\fcharset161\fprq2 Arial Greek;}{\f50\fswiss\fcharset162\fprq2 Arial Tur;}
+{\f51\fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f52\fswiss\fcharset178\fprq2 Arial (Arabic);}{\f53\fswiss\fcharset186\fprq2 Arial Baltic;}{\f54\fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f386\fswiss\fcharset238\fprq2 Tahoma CE;}
+{\f387\fswiss\fcharset204\fprq2 Tahoma Cyr;}{\f389\fswiss\fcharset161\fprq2 Tahoma Greek;}{\f390\fswiss\fcharset162\fprq2 Tahoma Tur;}{\f391\fswiss\fcharset177\fprq2 Tahoma (Hebrew);}{\f392\fswiss\fcharset178\fprq2 Tahoma (Arabic);}
+{\f393\fswiss\fcharset186\fprq2 Tahoma Baltic;}{\f394\fswiss\fcharset163\fprq2 Tahoma (Vietnamese);}{\f395\fswiss\fcharset222\fprq2 Tahoma (Thai);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;
+\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;
+\red192\green192\blue192;\red255\green255\blue255;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1031\langfe1031\cgrid\langnp1031\langfenp1031 \snext0 Normal;}{\*\cs10 \additive \ssemihidden
+Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
+\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{\s15\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \cbpat9
+\f35\fs20\lang1031\langfe1031\cgrid\langnp1031\langfenp1031 \sbasedon0 \snext15 \ssemihidden \styrsid15755787 Document Map;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\revtbl {Unknown;}}{\*\rsidtbl \rsid15755787}{\*\generator Microsoft Word 11.0.5604;}{\info
+{\title Report title}{\author CA-RET}{\operator Heidrun}{\creatim\yr2007\mo9\dy25\hr11\min47}{\revtim\yr2007\mo9\dy25\hr11\min47}{\version2}{\edmins0}{\nofpages9}{\nofwords3088}{\nofchars19458}{\*\company TRFV}{\nofcharsws22501}{\vern24689}}
+\paperw11909\paperh16834\margl854\margr567\margt850\margb850 \widowctrl\ftnbj\aenddoc\hyphhotz425\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3
+\jcompress\viewkind1\viewscale100\nolnhtadjtbl\rsidroot15755787 \fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3
+\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}
+{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs24\lang1031\langfe1031\cgrid\langnp1031\langfenp1031 {\f1\insrsid15755787
+\par }\pard \qc \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\b\f1\fs40\ul\insrsid15755787 'Veranstaltung: 600738002 - Uder,PLS vom 22.-23.09.2007'}{\f1\insrsid15755787
+\par
+\par }\pard \qc \li0\ri0\nowidctlpar\faauto\outlinelevel0\rin0\lin0\itap0\pararsid15755787 {\b\f1\fs28\insrsid15755787 Die Ergebnisse auf einen Blick}{\f1\insrsid15755787
+\par }{\f1\fs16\insrsid15755787 (Stand: 24.09.2007 , 14:57 Uhr)}{\f1\insrsid15755787
+\par }\pard \ql \li0\ri0\nowidctlpar\faauto\outlinelevel0\rin0\lin0\itap0\pararsid15755787 {\f1\fs12\insrsid15755787 * = Stechen}{\f1\insrsid15755787
+\par }\pard \qc \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 1}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 F\'fchrz\'fcgelklassen WB (E)}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0112}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Marko 161}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 N\'f6rthen, Marie}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0091}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Cak Treas Golden Tequila}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Weckm\'fcller, Celine}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Bad Sooden-Allendorf e.V.}{\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trfts×idth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0123}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Sultan}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Wamser, Max}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Bad Sooden-Allendorf e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.70}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawn)l \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0105}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Instanz 4}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Zorn, Sandra}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Helbetal Gro\'dfberndten e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.50}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth216t\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0046}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Lagos 46}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Steinbr\'fcck, Lena}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Gro\'dfbr\'fcchter e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.20}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6
+\t{11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshd2awnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0128}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Trixi}{\f1\insrsid15755787 \cell
+}{\f1\fs16\insrsid15755787 Hellmold, Nils}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter ReiAAlub e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.00}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspal0ha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trgwd \irow7\irowband7\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0139}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Napoleon}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Graul, Jennifer}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5.90}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow8\irowband8\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0084}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Anne}{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 Helbich, Lucy}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Worbis-Siegfriederode e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5.80}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0084}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Anne}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Reschwamm, Chantal}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Worbis-Siegfriederode e.V}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow10\irowband10\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0122}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Shary}{\f1\insrsid15755787 \cell
+}{\f1\fs16\insrsid15755787 H\'fcbler, Alina}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Worbis-Siegfriederode e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5.80}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow11\irowband11\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 2}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Reiter WB (E) 93+ j\'fcng.}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0104}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Hogewald`s Francess}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Eigenbrodt,Nina}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Bad Sooden-Allendorf e.V.}{\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.70}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0097}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fire boy 3}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Cortis, Viviane}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Bad Sooden-Allendorf e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.60}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0125}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Sunshine}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rittmeier, Kira}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.50}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0067}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Ronaldo 156}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'fcller, Frederike}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck Reitabteilung}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.40}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0117}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Paul'chen}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Karel,Emmely}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RC Drei\'dfigacker e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 7.30}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0182}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Jumper}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Baum, Johanna}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Wanfried e.V.}{\f1\insrsid15755787
+\cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.20}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0083}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Amadeus}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gieschler, Pauline}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RC Nesselr\'f6der Warte e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.10}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0134}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pila}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rohde, Sophia}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0087}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Berkathal`s Billbery}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 J\'fcnemann, Katharina}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow10\irowband10
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0163}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Lorbas 255}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gro\'dfe, Franziska}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow11\irowband11\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 3}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Dressurwettbewerb Kl. E (E) Aufgabe E 5}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0117}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Paul'chen}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Karel,Emmely}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RC Drei\'dfigacker e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 7.50}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0181}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Saint Laurent}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 B\'f6dicker, Jana}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Wanfried e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.30}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow3\irowband3\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0018}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Don 325}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gieschler,Louisa}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.30}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0133}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fanny}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Weber, Anja}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.20}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0179}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Grande}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 J\'fcnemann,Sarah}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck Reitabteilung}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.10}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0042}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Keitano}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Ropeter,Louissa Tahnee}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck Reitabteilung}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0013}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Cleopatra 176
+}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Weinrich,Susan}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0115}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 My Domenica}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rink,Marlena}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.90}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0180}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gyront}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Wamser, Anna}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Bad Sooden-Allendorf e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.90}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow10\irowband10
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 10. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0057}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Picasso 179}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gassmann,Patricia}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.70}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow11\irowband11\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 4}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Springreiter WB (E)}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0125}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Sunshine}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rittmeier, Kira}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.40}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0117}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Paul'chen}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Karel,Emmely}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RC Drei\'dfigacker e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 7.20}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0106}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kleiner Onkel}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schrader, Milena}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow4\irowband4\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0083}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Amadeus}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gieschler, Pauline}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RC Nesselr\'f6der Warte e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0134}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pila}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rohde, Sophia}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.90}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0127}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Tremolo}{\f1\insrsid15755787
+\cell }{\f1\fs16\insrsid15755787 Bein, Jessica}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Lengenfeld unterm Stein e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.80}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0046}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Lagos 46}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Hesse, Anna Lena}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Gro\'dfbr\'fcchter e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow8\irowband8\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0032}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gina 1594}{\f1\insrsid15755787
+\cell }{\f1\fs16\insrsid15755787 Reiter, Cecile}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.70}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 9. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0087}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Berkathal`s Billbery}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 J\'fcnemann, Katharina}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.50}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {
+\f1\insrsid15755787 \trowd \irow10\irowband10\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil
+\cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 10. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0184}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gamon}{\f1\insrsid15755787
+\cell }{\f1\fs16\insrsid15755787 Kehl, Isabell}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Sontra-Berneburg-Nentershausen}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.40}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow11\irowband11\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 5}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Stilspringpr\'fcfung Kl. E (E)}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0061}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Primus K 2}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Hartleib,Bianca}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Breitenholz e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 7.30}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0098}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Flying Girl 5}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Herold,Phillipp}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Wingerode e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.10}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow3\irowband3\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0132}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Leo}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Lehmann,Anja}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0184}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gamon}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kehl, Isabell}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Sontra-Berneburg-Nentershausen}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.90}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0033}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gismo 347}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Becker,Justina}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0108}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Larissa 528}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schneemann, Luca}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0133}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fanny}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Weber, Anja}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.60}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0050}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Lester 152}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Siese,Jennifer}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RC Wollersleben e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 6.60}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 9. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0018}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Don 325}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gieschler,Louisa}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.50}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow10\irowband10\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 10. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0057}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Picasso 179}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gassmann,Patricia}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.40}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow11\irowband11
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 10. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0013}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Cleopatra 176}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Weinrich,Susan}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.40}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow12\irowband12\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA738\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787
+6 / 1 .}{\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Dressurpr\'fcfung Kl. A (E+150,00, ZP) Aufg. A 5/1}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA738\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA738\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx5051
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx10192\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\fs16\insrsid15755787 Seite 1}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx5051\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx10192\row }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787 \page
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787
+6 / 1 .}{\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Dressurpr\'fcfung Kl. A (E+150,00, ZP) Aufg. A 5/1}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0171}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Resi 78}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Predatsch,Anna}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Dingelst\'e4dt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.20
+}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0037}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Grand Graphit}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'fcller,Felicia}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow3\irowband3\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0019}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Donna Lady 5}
+{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 N\'f6rthemann, Vicky}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.70}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0070}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Silas M}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Nordmann,Nadin}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck Reitabteilung}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.50}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0167}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Magic Life}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Bindbeutel,Susann}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Wingerode e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 6.40}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0005}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Benny 406}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fredershausen,Lena}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.40}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow7\irowband7\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0060}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Primeur 69}{\f1\insrsid15755787
+\cell }{\f1\fs16\insrsid15755787 W\'fcstefeld,Karla}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.30}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0078}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Wendy 391}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'f6ller,Martin}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 LRV Duderstadt e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.30}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow9\irowband9\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 9. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0038}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Index 31}{\f1\insrsid15755787
+\cell }{\f1\fs16\insrsid15755787 Reinhardt,Ute}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Fuhrbach}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.20}{\f1\insrsid15755787
+\cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow10\irowband10\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 10. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0169}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Antaro}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 S\'f6hle,Carola}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.10}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow11\irowband11\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 10. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0026}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Farouche 50}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Borchard,Iris}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.10}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow12\irowband12\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787
+6 / 2 .}{\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Dressurpr\'fcfung Kl. A (E+150,00, ZP) Aufg. A 5/1}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0073}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Tribut S}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Behler,Susa}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RG Bremke}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.70}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0028}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fleur Rouge 4}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schiweck,Luisa}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RG Bremke}{\f1\insrsid15755787
+\cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0077}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Watt Nu 4}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'fcller,Isabel}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0112}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Marko 161}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 N\'f6rthen,Anne}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.70}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0088}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Bijou-Balou}{\f1\insrsid15755787
+\cell }{\f1\fs16\insrsid15755787 N\'f6rthen,Anne}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.60}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0055}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pegasus 345}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Hartleib,Bettina}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Breitenholz e.V}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.40}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow7\irowband7\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0062}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rantanplan 21}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schiweck,Philip}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RG Bremke}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5.70}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787
+7 / 1 .}{\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Stilspringpr\'fcfung Kl. A (E+150,00, ZP) Jun./ JR}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0007}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Bolero 311}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gilbert,Hilke}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RG Bremke}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.60}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0066}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rok 2}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schultz,Gordon}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RC Wollersleben e.V}{\f1\insrsid15755787
+\cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.50}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0171}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Resi 78}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Predatsch,Anna}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Dingelst\'e4dt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.50
+}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0080}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 William 157}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schultz,Gordon}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RC Wollersleben e.V}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.30}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow5\irowband5\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0053}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Marie-Luise}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 J\'fcnemann,Maike}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck Reitabteilung}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.10}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0050}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Lester 152}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Siese,Jennifer}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RC Wollersleben e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 7.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0064}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Reverenz 2}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schultz,Gordon}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RC Wollersleben e.V}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.90}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow8\irowband8\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0149}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Promise to Care}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fredershausen,Kathleen}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.90}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0029}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Garry M}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fredershausen,Kathleen}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.90}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow10\irowband10
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 10. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0063}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rest Assured}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Emmerich,Lea}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Sottrum u.U.e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.80
+}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow11\irowband11\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 10. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0037}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Grand Graphit}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'fcller,Felicia}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow12\irowband12\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 10. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0098}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Flying Girl 5}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Herold,Phillipp}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Wingerode e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 6.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow13\irowband13\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787
+7 / 2 .}{\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Stilspringpr\'fcfung Kl. A (E+150,00, ZP) Rei/ Sen}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0172}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rusty 296}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Richter,Manuela}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Wingerode e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 7.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0076}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Wawch Me 27}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Macke,Anja}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.60}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow3\irowband3\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0145}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Marc Aurel 38
+}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Mecke, Mario}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Fuhrbach}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.40}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0043}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Klitschko 8}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rittmeier,Arnold}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.20}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow5\irowband5\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0167}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Magic Life}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Bindbeutel,Susann}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Wingerode e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 7.10}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0073}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Tribut S}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Behler,Susa}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RG Bremke}{\f1\insrsid15755787 \cell
+}\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7.10}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0048}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 L\'e4tizia 4}
+{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Faupel,Maximilian}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Gro\'dfwechsungen e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0150}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kastell 12}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Stade, Tino}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Am Kirchholz Rippersroda}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 7.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 9. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0166}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Candyboy 5}{\f1\insrsid15755787
+\cell }{\f1\fs16\insrsid15755787 Bindbeutel,Susann}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Wingerode e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.90}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow10\irowband10\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 9. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0026}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Farouche 50}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Borchard,Iris}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6.90}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow11\irowband11\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787
+8 / 1 .}{\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Springpr\'fcfung Kl. A m. Stechen (E+150,00, ZP) RLP 0-30}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0145}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Marc Aurel 38
+}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Mecke, Mario}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Fuhrbach}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+* 0.00 / 37.48}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0014}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Cool is Back}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Polle,Nicola}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+RFV Fuhrbach}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 * 0.00 / 39.58}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {
+\f1\insrsid15755787 \trowd \irow3\irowband3\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil
+\cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0029}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Garry M}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fredershausen,Kathleen}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 * 0.00 / 40.46}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0026}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Farouche 50}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Borchard,Iris}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 * 0.00 / 43.21}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0037}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Grand Graphit
+}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'fcller,Felicia}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 * 0.00 / 44.14}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0005}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Benny 406}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fredershausen,Lena}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 * 0.00 / 44.97}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0072}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Tocata}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kaiser,Andre}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck Reitabteilung}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 * 4.00 / 38.78}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0070}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Silas M}{\f1\insrsid15755787
+\cell }{\f1\fs16\insrsid15755787 Nordmann,Nadin}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck Reitabteilung}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3.00 / 65.50}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 9. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0141}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Indira 105}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 J\'fcnemann,Isabell}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Wingerode e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3.00 / 68.68}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow10\irowband10\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 10. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0167}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Magic Life}{\f1\insrsid15755787
+\cell }{\f1\fs16\insrsid15755787 Bindbeutel,Susann}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Wingerode e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3.00 / 73.48}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow11\irowband11\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787
+8 / 2 .}{\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Springpr\'fcfung Kl. A m. Stechen (E+150,00, ZP)RLP 31-}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0174}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Showtime de Luxe}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fiege,Peter}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Lengenfeld unterm Stein e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 * 0.00 / 34.87}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0175}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Capitano's Boy}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Enders,Juliane}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RC K\'f6nigstuhl Ellrich e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 * 0.00 / 35.40}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0186}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Li Ann}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fieker,Mario}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Kleinbodungen e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+* 0.00 / 36.30}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0043}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Klitschko 8}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rittmeier,Arnold}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+RV St.Georg Nesselr\'f6den}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 * 0.00 / 40.75}{\f1\insrsid15755787 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+0166}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Candyboy 5}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Bindbeutel,Susann}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Wingerode e.V.}{\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 * 0.00 / 41.35}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0062}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rantanplan 21
+}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schiweck,Philip}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RG Bremke}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+* 0.00 / 43.10}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. P }{\f1\fs14\insrsid15755787 }{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0094}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Dimaris}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schulze,Frank}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+RC Wollersleben e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 * 0.00 / 43.97}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {
+\f1\insrsid15755787 \trowd \irow8\irowband8\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil
+\cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0007}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Bolero 311}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gilbert,Hilke}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RG Bremke}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 * 4.00 / 41.87
+}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 9. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0156}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Naomi 277}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Senft,Stefanie}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Wingerode e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 * 4.00 / 42.12}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow10\irowband10\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 10. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0150}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kastell 12}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Zimmer, Sabrina}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Turnierstall Grabsleben e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 * 4.00 / 43.31}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow11\irowband11\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA738\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 9}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Mannschaftsspringpr\'fcfung Kl. A m. 1 Umlauf (E+ 150,00, ZP)}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA738\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA738\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx5051
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx10192\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\fs16\insrsid15755787 Seite 2}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx5051\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx10192\row }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787 \page
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 9}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Mannschaftsspringpr\'fcfung Kl. A m. 1 Umlauf (E+ 150,00, ZP)}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0141}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Indira 105}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 J\'fcnemann,Isabell}{\f1\insrsid15755787 \cell }{\b\i\f1\fs16\insrsid15755787 Wingerode}{\f1\insrsid15755787
+\par }{\f1\fs16\insrsid15755787 RV Wingerode e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 Su MA: 0.00/157.28}{\f1\insrsid15755787 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+0167}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Magic Life}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Bindbeutel,Susann}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Wingerode e.V.}{\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0156}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Naomi 277}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Senft,Stefanie}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV Wingerode e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0026}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Farouche 50}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Borchard,Iris}{\f1\insrsid15755787 \cell }{\b\i\f1\fs16\insrsid15755787 RV Nesselr\'f6den}{
+\f1\insrsid15755787
+\par }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 Su MA: 3.00/161.32}{\f1\insrsid15755787 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+0022}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Dubbel Six}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Huntgeburth,Sonja}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{\f1\insrsid15755787 \cell
+}\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0043}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Klitschko 8}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rittmeier,Arnold}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0019}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Donna Lady 5}
+{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 N\'f6rthemann, Vicky}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RV St.Georg Nesselr\'f6den}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0037}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Grand Graphit
+}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'fcller,Felicia}{\f1\insrsid15755787 \cell }{\b\i\f1\fs16\insrsid15755787 Duderst\'e4dter Reivclub 1}{\f1\insrsid15755787
+\par }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 Su MA: 3.00/177.12}{\f1\insrsid15755787 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+0060}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Primeur 69}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 W\'fcstefeld,Karla}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell
+}\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow10\irowband10
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0076}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Wauch Me 27}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Macke,Anja}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow11\irowband11\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0029}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Garry M}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fredershausen,Kathleen}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow12\irowband12\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0072}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Tocata}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kaiser,Andre}{\f1\insrsid15755787 \cell }{\b\i\f1\fs16\insrsid15755787 Krebeck 1}{\f1\insrsid15755787
+\par }{\f1\fs16\insrsid15755787 DJK Krebeck Reitabteilung}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 Su MA: 4.00/151.88}{\f1\insrsid15755787 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow13\irowband13\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+0059}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pretty Design}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kopp,Melanie}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck Reitabteilung}{\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow14\irowband14
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0065}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rieke 102}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Bergemann,Markus}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck Reitabteilung}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow15\irowband15
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0053}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Marie-Luise}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 J\'fcnemann,Maike}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck Reitabteilung}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow16\irowband16
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0044}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Komtess 86}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Maulhardt,Holger}{\f1\insrsid15755787 \cell }{\b\i\f1\fs16\insrsid15755787 Uder}{\f1\insrsid15755787
+\par }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 Su MA: 4.00/156.23}{\f1\insrsid15755787 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow17\irowband17\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+0075}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Waitaki's Little Sunshine}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Volkmar,Florian}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow18\irowband18\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0001}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Adana 48}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Dornieden,Dionys}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow19\irowband19
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0049}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Leonardo 718}
+{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 B\'f6duel,Christian}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow20\irowband20
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0005}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Benny 406}{\f1\insrsid15755787
+\cell }{\f1\fs16\insrsid15755787 Fredershausen,Lena}{\f1\insrsid15755787 \cell }{\b\i\f1\fs16\insrsid15755787 RC Duderstadt}{\f1\insrsid15755787
+\par }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 Su MA: 7.00/173.01}{\f1\insrsid15755787 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow21\irowband21\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0036}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Grace M 4}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rink,Marlena}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow22\irowband22
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0018}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Don 325}{\f1\insrsid15755787
+\cell }{\f1\fs16\insrsid15755787 Gieschler,Louisa}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow23\irowband23\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 6. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0033}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gismo 347}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Becker,Justina}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Duderst\'e4dter RC 78 e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow24\irowband24\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0145}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Marc Aurel 38}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Mecke, Mario}{\f1\insrsid15755787 \cell }{\b\i\f1\fs16\insrsid15755787 RFV Fuhrbach}{\f1\insrsid15755787
+\par }{\f1\fs16\insrsid15755787 RFV Fuhrbach}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 Su MA: 17.00/169.01}{\f1\insrsid15755787 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow25\irowband25\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0014}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Cool is Back}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Polle,Nicola}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Fuhrbach}{\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow26\irowband26
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 7. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0147}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gran Coeur 3}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Monecke- Mecke, Silvia}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Fuhrbach}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }
+{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow27\irowband27\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0079}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Wessly 4}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 S\'f6hle,Carola}{\f1\insrsid15755787 \cell }{\b\i\f1\fs16\insrsid15755787 Uder 2}{\f1\insrsid15755787
+
+\par }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 Su MA: 56.75/220.27}{\f1\insrsid15755787 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow28\irowband28\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0027}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Feuerstein 33}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Weinrich,Susan}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow29\irowband29
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0057}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Picasso 179}{\f1\insrsid15755787
+\cell }{\f1\fs16\insrsid15755787 Gassmann,Patricia}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow30\irowband30\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 8. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0023}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Durella One}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 J\'fcnemann,Ivonne}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow31\irowband31\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 9. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0073}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Tribut S}{\f1\insrsid15755787
+\cell }{\f1\fs16\insrsid15755787 Behler,Susa}{\f1\insrsid15755787 \cell }{\b\i\f1\fs16\insrsid15755787 Bremke}{\f1\insrsid15755787
+\par }{\f1\fs16\insrsid15755787 RG Bremke}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 Su MA: 64.00/191.89}{\f1\insrsid15755787 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow32\irowband32\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 9. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0028}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fleur Rouge 4}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schiweck,Luisa}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RG Bremke}{\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow33\irowband33
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 9. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0062}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rantanplan 21}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schiweck,Philip}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RG Bremke}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 }{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow34\irowband34\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 10. }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{
+\f1\fs16\insrsid15755787 0070}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Silas M}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Nordmann,Nadin}{\f1\insrsid15755787 \cell }{\b\i\f1\fs16\insrsid15755787 Krebeck 2}{\f1\insrsid15755787
+
+\par }{\f1\fs16\insrsid15755787 DJK Krebeck Reitabteilung}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 Su MA: 0.00/48.25}{\f1\insrsid15755787 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow35\irowband35\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone
+\clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil
+\cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 10}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Dressurfahr-WB KL:E (E)- Pony Einsp\'e4nner}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0054}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Nica 6}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gebhardt,Thomas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Breitenholz e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 5.90}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0021}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Dorette 168}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Bro\'dfmann,Corinna}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony SV Wenigenauma e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow3\irowband3\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0039}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Jolly 140}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Zimmermann, Ilka}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Janism\'fchle e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.50}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0024}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Emma 126}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gebhardt,Christian}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony-,RFZV W\'fclfingerode e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.40}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0118}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Picasso}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Freund, Jacqueline}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony SV Wenigenauma e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.30}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 11}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Dressurfahr- WB Kl. E (E) Pferde Einsp\'e4nner}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0111}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Luna}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Da\'dfler, Heidi}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony SV Wenigenauma e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.30}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0008}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Burzan}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schreiner,Marc}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony SV Wenigenauma e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0142}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Donna}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Ga\'dfmann, Armin}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Eschwege e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 5.60}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 12}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Hindernisfahren Kl E Pony- Einsp\'e4nner (E)}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0024}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Emma 126}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gebhardt,Christian}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony-,RFZV W\'fclfingerode e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.00 / 74.11}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0054}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Nica 6}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gebhardt,Thomas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Breitenholz e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 5.00 / 83.40}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0021}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Dorette 168}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Bro\'dfmann,Corinna}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Pony SV Wenigenauma e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5.00 / 84.90}{\f1\insrsid15755787 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+0118}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Picasso}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Freund, Jacqueline}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony SV Wenigenauma e.V.}{\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5.00 / 86.38}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0039}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Jolly 140}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Zimmermann, Ilka}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Janism\'fchle e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.00 / 89.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 13}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Hindernisfahren Kl. E Pferde- Einsp\'e4nner (E)}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0142}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Donna}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Ga\'dfmann, Armin}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Eschwege e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 0.00 / 82.54}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0111}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Luna}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Da\'dfler, Heidi}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Pony SV Wenigenauma e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 0.00 / 83.76}{\f1\insrsid15755787 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+0008}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Burzan}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schreiner,Marc}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony SV Wenigenauma e.V.}{\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5.00 / 81.98}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 14}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Gel\'e4ndefahren Kl. E Pony Einsp\'e4nner (E)}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0021}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Dorette 168}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Bro\'dfmann,Corinna}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony SV Wenigenauma e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 21.93}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0024}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Emma 126}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gebhardt,Christian}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony-,RFZV W\'fclfingerode e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 24.61}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0039}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Jolly 140}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Zimmermann, Ilka}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Janism\'fchle e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 24.84}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\trowd \irow5\irowband5\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA24\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx5051\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx10192\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\fs16\insrsid15755787 Seite 3}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA24\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx5051\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx10192\row }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787 \page
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 14}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Gel\'e4ndefahren Kl. E Pony Einsp\'e4nner (E)}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0118}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Picasso}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Freund, Jacqueline}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony SV Wenigenauma e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 30.46}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0054}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Nica 6}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gebhardt,Thomas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Breitenholz e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 49.69}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 15}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Gel\'e4ndefahren Kl. E Pferde Einsp\'e4nner (E)}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0142}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Donna}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Ga\'dfmann, Armin}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Eschwege e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 18.72}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0111}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Luna}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Da\'dfler, Heidi}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony SV Wenigenauma e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 24.88}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow3\irowband3\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0008}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Burzan}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schreiner,Marc}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony SV Wenigenauma e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 42.16}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 16}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Komb. Wettbewerb Pony-Einsp\'e4nner Kl. E (E)}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0021}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Dorette 168}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Bro\'dfmann,Corinna}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony SV Wenigenauma e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 77.33}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0039}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Jolly 140}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Zimmermann, Ilka}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Janism\'fchle e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 83.84}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0024}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Emma 126}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gebhardt,Christian}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony-,RFZV W\'fclfingerode e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 84.81}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0118}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Picasso}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Freund, Jacqueline}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony SV Wenigenauma e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 91.86}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0054}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Nica 6}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Gebhardt,Thomas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Breitenholz e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 103.89}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 17}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Komb. Wettbewerb Pferde- Einsp\'e4nner Kl. E (E)}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0111}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Luna}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Da\'dfler, Heidi}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony SV Wenigenauma e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 69.28}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0142}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Donna}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Ga\'dfmann, Armin}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Eschwege e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+71.52}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0008}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Burzan}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schreiner,Marc}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Pony SV Wenigenauma e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 97.56}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow4\irowband4\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 18}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Dressurfahr- WB Kl. E (E) Pony- Zweispanner}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0089}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Birkenstein`s Arino}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'fcller, Dorothee}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Breitenholz e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.10}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0090}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Birkenstein`s Ascot}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'fcller, Dorothee}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Breitenholz e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.10}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0096}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fanni 43}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schrader, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 G\'f6ttinger Pony-RFC}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0121}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Sella 7}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schrader, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 G\'f6ttinger Pony-RFC}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0144}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Casi}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 John, Knut}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Eschwege e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5.40}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0143}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Nora}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 John, Knut}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Eschwege e.V.}{\f1\insrsid15755787 \cell
+}\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5.40}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0082}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Adonis}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Henke, Stefan}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.30}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0113}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Mira}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Henke, Stefan}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.30}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0160}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Cl\'e4rchen}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rudolph, Adelbert}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5.20}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow10\irowband10\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0159}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Jogi}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rudolph, Adelbert}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck}{\f1\insrsid15755787 \cell
+}\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5.20}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow11\irowband11\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 19}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Dessurfahr- WB Kl. E (E) Pferde- Zweisp\'e4nner}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0099}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Georg}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Funke, Heinz}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0095}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Erasmus}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Funke, Heinz}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.00}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0107}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Lady}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rinke, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.90}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0085}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Arcor}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rinke, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.90}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0136}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Agal}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kaspari, Markus}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0135}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Anne}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kaspari, Markus}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0165}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Egbert}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Volkmar, Uwe}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.50}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0164}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Elmo}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Volkmar, Uwe}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.50}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 20}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Hindernisfahren Kl. E (E) Pony- Zweisp\'e4nner}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0159}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Jogi}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rudolph, Adelbert}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 0.00 / 69.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0160}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Cl\'e4rchen}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rudolph, Adelbert}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+DJK Krebeck}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 0.00 / 69.80}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {
+\f1\insrsid15755787 \trowd \irow3\irowband3\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil
+\cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0089}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Birkenstein`s Arino}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'fcller, Dorothee}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Breitenholz e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 0.00 / 78.11}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0090}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Birkenstein`s Ascot}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'fcller, Dorothee}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Breitenholz e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 0.00 / 78.11}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0144}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Casi}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 John, Knut}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Eschwege e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787
+ 0.00 / 89.71}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0143}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Nora}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 John, Knut}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Eschwege e.V.}{
+\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 0.00 / 89.71}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow7\irowband7\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0096}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fanni 43}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schrader, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 G\'f6ttinger Pony-RFC}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.00 / 78.86}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0121}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Sella 7}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schrader, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 G\'f6ttinger Pony-RFC}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.00 / 78.86}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 21}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Hindernisfahren Kl. E (E) Pferde- Zweisp\'e4nner}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0136}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Agal}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kaspari, Markus}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 0.00 / 87.76}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0135}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Anne}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kaspari, Markus}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 0.00 / 87.76}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0107}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Lady}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rinke, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.00 / 87.61}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0085}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Arcor}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rinke, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 5.00 / 87.61}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0165}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Egbert}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Volkmar, Uwe}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.50 / 104.73}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0164}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Elmo}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Volkmar, Uwe}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 6.50 / 104.73}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0095}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Erasmus}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Funke, Heinz}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 10.00 / 99.96}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0099}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Georg}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Funke, Heinz}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 10.00 / 99.96}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 22}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Gel\'e4ndefahren Kl. E (E) Pony- Zweisp\'e4n ner}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0096}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fanni 43}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schrader, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 G\'f6ttinger Pony-RFC}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 20.53}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0121}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Sella 7}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schrader, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 G\'f6ttinger Pony-RFC}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 20.53}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brärnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0089}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Birkenstein`s Arino}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'fcller, Dorothee}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Breitenholz e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 21.09}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0090}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Birkenstein`s Ascot}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'fcller, Dorothee}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Breitenholz e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 21.09}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0160}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Cl\'e4rchen}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rudolph, Adelbert}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 22.93}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0159}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Jogi}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rudolph, Adelbert}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 DJK Krebeck}{\f1\insrsid15755787 \cell
+}\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 22.93}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0143}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Nora}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 John, Knut}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Eschwege e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 25.38}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0144}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Casi}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 John, Knut}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Eschwege e.V.}{\f1\insrsid15755787 \cell
+}\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 25.38}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0082}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Adonis}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Henke, Stefan}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 40.50}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow10\irowband10
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\trowd \irow11\irowband11\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA24\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx5051\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx10192\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\fs16\insrsid15755787 Seite 4}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow11\irowband11\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA24\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx5051\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx10192\row }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787 \page
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 22}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Gel\'e4ndefahren Kl. E (E) Pony- Zweisp\'e4n ner}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 5. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0113}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Mira}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Henke, Stefan}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 40.50}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 23}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Gel\'e4ndefahren Kl. E (E) Pferde- Zweisp\'e4nner}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0136}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Agal}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kaspari, Markus}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 27.45}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0135}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Anne}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kaspari, Markus}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 27.45}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0165}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Egbert}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Volkmar, Uwe}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 31.73}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0164}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Elmo}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Volkmar, Uwe}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 31.73}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0107}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Lady}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rinke, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 37.69}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0085}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Arcor}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rinke, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 37.69}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0095}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Erasmus}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Funke, Heinz}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 38.23}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0099}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Georg}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Funke, Heinz}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 38.23}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 24}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Komb. Wettbewerb Kl. E (E) Pony- Zweisp\'e4nner}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0
+\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0090}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Birkenstein`s Ascot}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'fcller, Dorothee}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Breitenholz e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 67.89}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0089}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787
+Birkenstein`s Arino}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 M\'fcller, Dorothee}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Breitenholz e.V}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 67.89}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0096}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Fanni 43}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schrader, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 G\'f6ttinger Pony-RFC}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 75.93}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0121}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Sella 7}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Schrader, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 G\'f6ttinger Pony-RFC}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 75.93}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0143}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Nora}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 John, Knut}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Eschwege e.V.}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 80.58}{
+\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
+\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil
+\cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }
+{\f1\fs16\insrsid15755787 0144}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Casi}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 John, Knut}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV Eschwege e.V.}{\f1\insrsid15755787 \cell
+}\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 80.58}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\pard \ql \li0\ri0\nowidctlpar\intbl\brdrb\brdrs\brdrw20 \faauto\rin0\lin0 {\b\f1\fs20\insrsid15755787 25}{
+\f1\insrsid15755787 \cell }{\b\f1\fs20\insrsid15755787 Komb. Wettbewerb Kl. E(E) Pferde- Zweisp\'e4nner}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787
+\trowd \irow0\irowband0\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil
+\cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row }\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow1\irowband1\ts11\trgaph90\trleft-90\trftsWidth1\trftsWidthA3\trwWidthA762\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone
+\clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth860\clshdrawnil \cellx770\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth8684\clshdrawnil \cellx9454\row
+}\trowd \irow2\irowband2\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb
+\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0136}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Agal}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kaspari, Markus}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 77.85}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow2\irowband2
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 1. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0135}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Anne}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Kaspari, Markus}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 77.85}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow3\irowband3
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0085}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Arcor}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rinke, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 91.89}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow4\irowband4
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 2. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0107}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Lady}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Rinke, Andreas}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 91.89}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow5\irowband5
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0164}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Elmo}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Volkmar, Uwe}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 92.23}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow6\irowband6
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 3. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0165}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Egbert}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Volkmar, Uwe}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 92.23}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow7\irowband7
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0095}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Erasmus}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Funke, Heinz}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 96.23}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow8\irowband8
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\b\f1\fs16\insrsid15755787 4. P }{\f1\fs14\insrsid15755787 }{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 0099}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Georg}{
+\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 Funke, Heinz}{\f1\insrsid15755787 \cell }{\f1\fs16\insrsid15755787 RFV St.Martin Heiligenstadt}{\f1\insrsid15755787 \cell }\pard \qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {
+\b\f1\fs16\insrsid15755787 96.23}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow9\irowband9\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1314\clshdrawnil \cellx1224\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth747\clshdrawnil \cellx1971\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth2164\clshdrawnil \cellx4135\clvertalt
+\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1881\clshdrawnil \cellx6016\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone
+\cltxlrtb\clftsWidth3\clwWidth2400\clshdrawnil \cellx8416\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth1800\clshdrawnil \cellx10216\row }\pard
+\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\insrsid15755787
+\par }\trowd \irow0\irowband0\lastrow \ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx5051
+\clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx10192\pard \ql \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\insrsid15755787 \cell }\pard
+\qr \li0\ri0\nowidctlpar\intbl\faauto\rin0\lin0 {\f1\fs16\insrsid15755787 Seite 5}{\f1\insrsid15755787 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\insrsid15755787 \trowd \irow0\irowband0\lastrow
+\ts11\trgaph90\trleft-90\trftsWidth1\trpaddl90\trpaddr90\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt\brdrnone \clbrdrl\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx5051\clvertalt\clbrdrt\brdrnone \clbrdrl
+\brdrnone \clbrdrb\brdrnone \clbrdrr\brdrnone \cltxlrtb\clftsWidth3\clwWidth5141\clshdrawnil \cellx10192\row }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\insrsid15755787
+\par }} \ No newline at end of file
diff --git a/sw/qa/core/CVE/CVE-2010-3452-1.rtf b/sw/qa/core/CVE/CVE-2010-3452-1.rtf
new file mode 100644
index 000000000000..b2800b5edbb0
--- /dev/null
+++ b/sw/qa/core/CVE/CVE-2010-3452-1.rtf
@@ -0,0 +1 @@
+{\rtf1\ansi{\*\pnseclvlÿ}}
diff --git a/sw/qa/core/CVE/CVE-2010-3453-1.doc b/sw/qa/core/CVE/CVE-2010-3453-1.doc
new file mode 100644
index 000000000000..22cd8eebbe54
--- /dev/null
+++ b/sw/qa/core/CVE/CVE-2010-3453-1.doc
Binary files differ
diff --git a/sw/qa/core/CVE/CVE-2010-3454-1.doc b/sw/qa/core/CVE/CVE-2010-3454-1.doc
new file mode 100644
index 000000000000..33706c2c3393
--- /dev/null
+++ b/sw/qa/core/CVE/CVE-2010-3454-1.doc
Binary files differ
diff --git a/sw/qa/core/Test-BigPtrArray.cxx b/sw/qa/core/Test-BigPtrArray.cxx
index 4e828bb980b9..a5699f0a386f 100644
--- a/sw/qa/core/Test-BigPtrArray.cxx
+++ b/sw/qa/core/Test-BigPtrArray.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,43 +28,49 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
+#ifdef WNT
+#include <prewin.h>
+#include <postwin.h>
+#endif
+
#define TIMELOG
-#include <testshl/simpleheader.hxx>
+#include <cppunit/TestSuite.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/TestCase.h>
+#include <cppunit/plugin/TestPlugIn.h>
+#include <cppunit/extensions/HelperMacros.h>
+
#include <bparr.hxx>
-#include <string>
+#include <string.h>
#include <stdlib.h>
#include <rtl/logfile.hxx>
-#undef ENABLE_DEBUG_OUTPUT
-
using namespace std;
namespace /* private */
{
- const int NUM_ENTRIES = 100000;
+ const sal_uLong NUM_ENTRIES = 10;
class BigPtrEntryMock : public BigPtrEntry
{
public:
- BigPtrEntryMock(int count) : count_(count)
+ BigPtrEntryMock(sal_uLong count) : count_(count)
{
}
~BigPtrEntryMock()
{
- #ifdef ENABLE_DEBUG_OUTPUT
- printf("Destructor called (%i)\n", count_);
- #endif
}
- int getCount() const
+ sal_uLong getCount() const
{
return count_;
}
- void setCount(int newCount)
+ void setCount(sal_uLong newCount)
{
count_ = newCount;
}
@@ -74,7 +81,7 @@ namespace /* private */
}
private:
- int count_;
+ sal_uLong count_;
};
sal_Bool AddToCount(const ElementPtr& rElem, void* pArgs)
@@ -86,30 +93,23 @@ namespace /* private */
void dumpBigPtrArray(const BigPtrArray& bparr)
{
- #ifdef ENABLE_DEBUG_OUTPUT
- for (int i = 0; i < bparr.Count(); i++)
- printf("bparr[%i,%i]: %i\n", i, static_cast<BigPtrEntryMock*>(bparr[i])->Position(), static_cast<BigPtrEntryMock*>(bparr[i])->getCount());
-
- printf("\n");
- #endif
+ (void)bparr;
}
void fillBigPtrArray(BigPtrArray& bparr, sal_uLong numEntries)
{
- for (int i = 0; i < numEntries; i++)
+ for (sal_uLong i = 0; i < numEntries; i++)
bparr.Insert(new BigPtrEntryMock(i), bparr.Count());
}
void printMethodName(const char* name)
{
- #ifdef ENABLE_DEBUG_OUTPUT
- printf(name);
- #endif
+ (void)name;
}
bool checkElementPositions(const BigPtrArray& bparr)
{
- for (int i = 0; i < bparr.Count(); i++)
+ for (sal_uLong i = 0; i < bparr.Count(); i++)
{
if (static_cast<BigPtrEntryMock*>(bparr[i])->Position() != i)
return false;
@@ -119,7 +119,7 @@ namespace /* private */
void releaseBigPtrArrayContent(BigPtrArray& bparr)
{
- for (int i = 0; i < bparr.Count(); i++)
+ for (sal_uLong i = 0; i < bparr.Count(); i++)
delete bparr[i];
}
@@ -160,7 +160,7 @@ public:
BigPtrArray bparr;
- for (int i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
sal_uLong oldCount = bparr.Count();
bparr.Insert(new BigPtrEntryMock(i), 0);
@@ -168,25 +168,25 @@ public:
(
"test_insert_entries_at_front failed",
(bparr.Count() == oldCount + 1)
- )
+ );
}
RTL_LOGFILE_CONTEXT_TRACE(logFile, "END: test_insert_entries_at_front");
- for (int i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
+ for (sal_uLong i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
{
CPPUNIT_ASSERT_MESSAGE
(
"test_insert_entries_at_front failed",
static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == j
- )
+ );
}
CPPUNIT_ASSERT_MESSAGE
(
"test_insert_entries_at_front failed",
checkElementPositions(bparr)
- )
+ );
releaseBigPtrArrayContent(bparr);
dumpBigPtrArray(bparr);
@@ -213,13 +213,13 @@ public:
(
"test_insert_entries_in_the_middle failed",
(oldCount + 1 == bparr.Count() && static_cast<BigPtrEntryMock*>(bparr[bparr.Count() / 2])->getCount() == NUM_ENTRIES)
- )
+ );
CPPUNIT_ASSERT_MESSAGE
(
"test_insert_entries_in_the_middle failed",
checkElementPositions(bparr)
- )
+ );
releaseBigPtrArrayContent(bparr);
dumpBigPtrArray(bparr);
@@ -236,9 +236,9 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- int oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
- for (int i = 0, j = -5; i < 5; i++, j++)
+ for (sal_uLong i = 0, j = -5; i < 5; i++, j++)
bparr.Insert(new BigPtrEntryMock(j), i);
RTL_LOGFILE_CONTEXT_TRACE(logFile, "END: test_insert_at_already_used_index");
@@ -247,22 +247,22 @@ public:
(
"test_insert_at_already_used_index failed",
(oldCount + 5 == bparr.Count())
- )
+ );
- for (int i = 0, j = -5; i < bparr.Count(); i++, j++)
+ for (sal_uLong i = 0, j = -5; i < bparr.Count(); i++, j++)
{
CPPUNIT_ASSERT_MESSAGE
(
"test_insert_at_already_used_index failed",
static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == j
- )
+ );
}
CPPUNIT_ASSERT_MESSAGE
(
"test_insert_at_already_used_index failed",
checkElementPositions(bparr)
- )
+ );
releaseBigPtrArrayContent(bparr);
dumpBigPtrArray(bparr);
@@ -284,13 +284,13 @@ public:
(
"test_insert_at_end failed",
(oldCount + 1 == bparr.Count() && static_cast<BigPtrEntryMock*>(bparr[bparr.Count()-1])->getCount() == NUM_ENTRIES)
- )
+ );
CPPUNIT_ASSERT_MESSAGE
(
"test_insert_at_end failed",
checkElementPositions(bparr)
- )
+ );
releaseBigPtrArrayContent(bparr);
dumpBigPtrArray(bparr);
@@ -307,7 +307,7 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- for (int i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
sal_uLong oldCount = bparr.Count();
@@ -318,22 +318,22 @@ public:
(
"test_remove_at_front failed (wrong count)",
(oldCount - 1 == bparr.Count())
- )
+ );
- for (int j = 0, k = i + 1; j < bparr.Count(); j++, k++)
+ for (sal_uLong j = 0, k = i + 1; j < bparr.Count(); j++, k++)
{
CPPUNIT_ASSERT_MESSAGE
(
"test_remove_at_front failed",
static_cast<BigPtrEntryMock*>(bparr[j])->getCount() == k
- )
+ );
}
CPPUNIT_ASSERT_MESSAGE
(
"test_remove_at_front failed",
checkElementPositions(bparr)
- )
+ );
dumpBigPtrArray(bparr);
}
@@ -360,22 +360,22 @@ public:
(
"test_remove_at_back failed (wrong count)",
(oldCount - 1 == bparr.Count())
- )
+ );
- for (int j = 0; j < bparr.Count(); j++)
+ for (sal_uLong j = 0; j < bparr.Count(); j++)
{
CPPUNIT_ASSERT_MESSAGE
(
"test_remove_at_back failed",
static_cast<BigPtrEntryMock*>(bparr[j])->getCount() == j
- )
+ );
}
CPPUNIT_ASSERT_MESSAGE
(
"test_remove_at_back failed",
checkElementPositions(bparr)
- )
+ );
dumpBigPtrArray(bparr);
}
@@ -395,7 +395,7 @@ public:
while (bparr.Count())
{
sal_uLong oldCount = bparr.Count();
- int oldElement = static_cast<BigPtrEntryMock*>(bparr[bparr.Count() / 2])->getCount();
+ sal_uLong oldElement = static_cast<BigPtrEntryMock*>(bparr[bparr.Count() / 2])->getCount();
delete bparr[bparr.Count() / 2];
bparr.Remove(bparr.Count() / 2);
@@ -404,22 +404,22 @@ public:
(
"test_remove_in_the_middle failed (wrong count)",
(oldCount - 1 == bparr.Count())
- )
+ );
- for (int i = 0; i < bparr.Count(); i++)
+ for (sal_uLong i = 0; i < bparr.Count(); i++)
{
CPPUNIT_ASSERT_MESSAGE
(
"test_remove_in_the_middle failed",
static_cast<BigPtrEntryMock*>(bparr[i])->getCount() != oldElement
- )
+ );
}
CPPUNIT_ASSERT_MESSAGE
(
"test_remove_in_the_middle failed",
checkElementPositions(bparr)
- )
+ );
dumpBigPtrArray(bparr);
}
@@ -440,7 +440,7 @@ public:
sal_uLong nRemove = (bparr.Count() > 3) ? 3 : bparr.Count();
sal_uLong oldCount = bparr.Count();
- for (int i = 0; i < nRemove; i++)
+ for (sal_uLong i = 0; i < nRemove; i++)
delete bparr[i];
bparr.Remove(0, nRemove);
@@ -449,13 +449,13 @@ public:
(
"test_remove_multiple_elements_at_once failed",
(oldCount - nRemove == bparr.Count())
- )
+ );
CPPUNIT_ASSERT_MESSAGE
(
"test_remove_multiple_elements_at_once failed",
checkElementPositions(bparr)
- )
+ );
dumpBigPtrArray(bparr);
}
@@ -477,7 +477,7 @@ public:
(
"test_remove_all_elements_at_once failed",
bparr.Count() == 0
- )
+ );
dumpBigPtrArray(bparr);
}
@@ -491,32 +491,32 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- for (int i = 0; i < NUM_ENTRIES - 1; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES - 1; i++)
{
bparr.Move(i, i + 2);
dumpBigPtrArray(bparr);
}
- for (int i = 0; i < (NUM_ENTRIES - 1); i++)
+ for (sal_uLong i = 0; i < (NUM_ENTRIES - 1); i++)
{
CPPUNIT_ASSERT_MESSAGE
(
"test_move_elements_from_lower_to_higher_pos failed",
static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (i + 1)
- )
+ );
}
CPPUNIT_ASSERT_MESSAGE
(
"test_move_elements_from_lower_to_higher_pos failed",
static_cast<BigPtrEntryMock*>(bparr[NUM_ENTRIES -1])->getCount() == 0
- )
+ );
CPPUNIT_ASSERT_MESSAGE
(
"test_move_elements_from_lower_to_higher_pos failed",
checkElementPositions(bparr)
- )
+ );
releaseBigPtrArrayContent(bparr);
}
@@ -540,22 +540,22 @@ public:
(
"test_move_elements_from_higher_to_lower_pos failed",
static_cast<BigPtrEntryMock*>(bparr[0])->getCount() == (NUM_ENTRIES - 1)
- )
+ );
- for (int i = 1; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 1; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
"test_move_elements_from_higher_to_lower_pos failed",
static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (i - 1)
- )
+ );
}
CPPUNIT_ASSERT_MESSAGE
(
"test_move_elements_from_higher_to_lower_pos failed",
checkElementPositions(bparr)
- )
+ );
releaseBigPtrArrayContent(bparr);
}
@@ -569,27 +569,27 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- for (int i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
bparr.Move(i, i);
}
dumpBigPtrArray(bparr);
- for (int i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
"test_move_to_same_position failed",
static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == i
- )
+ );
}
CPPUNIT_ASSERT_MESSAGE
(
"test_move_to_same_position failed",
checkElementPositions(bparr)
- )
+ );
releaseBigPtrArrayContent(bparr);
dumpBigPtrArray(bparr);
@@ -604,27 +604,27 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- for (int i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
+ for (sal_uLong i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
{
delete bparr[i];
bparr.Replace(i, new BigPtrEntryMock(j));
dumpBigPtrArray(bparr);
}
- for (int i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
"test_replace_elements failed",
static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (NUM_ENTRIES - i - 1)
- )
+ );
}
CPPUNIT_ASSERT_MESSAGE
(
"test_replace_elements failed",
checkElementPositions(bparr)
- )
+ );
releaseBigPtrArrayContent(bparr);
}
@@ -641,13 +641,13 @@ public:
int addCount = 1;
bparr.ForEach(AddToCount, &addCount);
- for (int i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
"test_for_each failed",
static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (i+1)
- )
+ );
}
releaseBigPtrArrayContent(bparr);
@@ -656,24 +656,24 @@ public:
void test_for_some1()
{
- printMethodName("test_for_some1\n");
+ printMethodName("test_for_some1\n");
BigPtrArray bparr;
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- int addCount = 1;
+ sal_uLong addCount = 1;
bparr.ForEach(0, NUM_ENTRIES / 2, AddToCount, &addCount);
- int i = 0;
+ sal_uLong i = 0;
for (/* */; i < NUM_ENTRIES / 2; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
"test_for_some1 failed",
static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (i+1)
- )
+ );
}
for (/* */; i < NUM_ENTRIES; i++)
@@ -682,7 +682,7 @@ public:
(
"test_for_some1 failed",
static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (i)
- )
+ );
}
releaseBigPtrArrayContent(bparr);
@@ -701,14 +701,14 @@ public:
int addCount = 1;
bparr.ForEach(NUM_ENTRIES / 2, NUM_ENTRIES, AddToCount, &addCount);
- int i = 0;
+ sal_uLong i = 0;
for (/* */; i < NUM_ENTRIES / 2; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
"test_for_some2 failed",
static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (i)
- )
+ );
}
for (/* */; i < NUM_ENTRIES; i++)
@@ -717,7 +717,7 @@ public:
(
"test_for_some2 failed",
static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (i+1)
- )
+ );
}
releaseBigPtrArrayContent(bparr);
@@ -733,16 +733,16 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- int addCount = 1;
+ sal_uLong addCount = 1;
bparr.ForEach(0, 0, AddToCount, &addCount);
- for (int i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
"test_for_some3 failed",
static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == i
- )
+ );
}
releaseBigPtrArrayContent(bparr);
}
@@ -867,11 +867,10 @@ private:
}
};
-
-//#####################################
// register test suites
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(BigPtrArrayUnittest, "BigPtrArrayUnittest");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(BigPtrArrayPerformanceTest, "BigPtrArrayPerformanceTest");
+CPPUNIT_TEST_SUITE_REGISTRATION(BigPtrArrayUnittest);
+CPPUNIT_TEST_SUITE_REGISTRATION(BigPtrArrayPerformanceTest);
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/bigpointerarray-new.cxx b/sw/qa/core/bigpointerarray-new.cxx
index a769a8e3fae0..aee3e2e4807e 100644
--- a/sw/qa/core/bigpointerarray-new.cxx
+++ b/sw/qa/core/bigpointerarray-new.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108,3 +109,5 @@ void BigPtrArray::FixElementIndizes(Container_t::const_iterator begin, Container
for (int i = 0; iter != end; ++iter, i++)
(*iter)->pos_ = i;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/bigpointerarray-new.hxx b/sw/qa/core/bigpointerarray-new.hxx
index af6805880fe8..2f2792d40b92 100644
--- a/sw/qa/core/bigpointerarray-new.hxx
+++ b/sw/qa/core/bigpointerarray-new.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -157,3 +158,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/export.exp b/sw/qa/core/export.exp
deleted file mode 100644
index a13529da5876..000000000000
--- a/sw/qa/core/export.exp
+++ /dev/null
@@ -1 +0,0 @@
-registerAllTestFunction
diff --git a/sw/qa/core/export.map b/sw/qa/core/export.map
index 7321bbca16ad..3308588ef6f8 100644
--- a/sw/qa/core/export.map
+++ b/sw/qa/core/export.map
@@ -27,7 +27,7 @@
UDK_3_0_0 {
global:
- registerAllTestFunction;
+ cppunitTestPlugIn;
local:
*;
diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx
new file mode 100644
index 000000000000..737c7bd3a1a5
--- /dev/null
+++ b/sw/qa/core/filters-test.cxx
@@ -0,0 +1,243 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Caolán McNamara <caolanm@redhat.com>
+ * Portions created by the Initial Developer are Copyright (C) 2011 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Caolán McNamara <caolanm@redhat.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "precompiled_sw.hxx"
+
+#ifdef WNT
+#include <prewin.h>
+#include <postwin.h>
+#endif
+
+#include <cppunit/TestSuite.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/TestCase.h>
+#include <cppunit/plugin/TestPlugIn.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <osl/file.hxx>
+#include <osl/process.h>
+#include <cppuhelper/compbase1.hxx>
+#include <cppuhelper/bootstrap.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <comphelper/processfactory.hxx>
+#include <vcl/svapp.hxx>
+
+#include <sfx2/app.hxx>
+#include <sfx2/docfilt.hxx>
+#include <sfx2/docfile.hxx>
+#include <sfx2/sfxmodelfactory.hxx>
+
+#include <tools/urlobj.hxx>
+#include <unotools/tempfile.hxx>
+#include <ucbhelper/contentbroker.hxx>
+
+#include "init.hxx"
+#include "swtypes.hxx"
+#include "doc.hxx"
+#include "docsh.hxx"
+#include "shellres.hxx"
+#include "docufld.hxx"
+
+SO2_DECL_REF(SwDocShell)
+SO2_IMPL_REF(SwDocShell)
+
+using namespace ::com::sun::star;
+
+static sal_uInt16 aWndFunc(Window *, sal_uInt16, const String &, const String &)
+{
+ return ERRCODE_BUTTON_OK;
+}
+
+/* Implementation of Filters test */
+
+class FiltersTest : public CppUnit::TestFixture
+{
+public:
+ FiltersTest();
+ ~FiltersTest();
+
+ virtual void setUp();
+ virtual void tearDown();
+
+ bool testLoad(const rtl::OUString &rFilter,
+ const rtl::OUString &rUserData,
+ const rtl::OUString &rURL);
+
+ /**
+ * Ensure CVEs remain unbroken
+ */
+ void testCVEs();
+
+ CPPUNIT_TEST_SUITE(FiltersTest);
+ CPPUNIT_TEST(testCVEs);
+ CPPUNIT_TEST_SUITE_END();
+
+private:
+ uno::Reference<uno::XComponentContext> m_xContext;
+ uno::Reference<lang::XMultiComponentFactory> m_xFactory;
+ uno::Reference<uno::XInterface> m_xWriterComponent;
+ ::rtl::OUString m_aPWDURL;
+};
+
+bool FiltersTest::testLoad(const rtl::OUString &rFilter,
+ const rtl::OUString &rUserData,
+ const rtl::OUString &rURL)
+{
+ SfxFilter aFilter(
+ rFilter,
+ rtl::OUString(), 0, 0, rtl::OUString(), 0, rtl::OUString(),
+ rUserData, rtl::OUString() );
+
+ SwDocShellRef xDocShRef = new SwDocShell;
+ SfxMedium aSrcMed(rURL, STREAM_STD_READ, true);
+ aSrcMed.SetFilter(&aFilter);
+ return xDocShRef->DoLoad(&aSrcMed);
+}
+
+void FiltersTest::testCVEs()
+{
+//To-Do: I know this works on Linux, please check if this test works under
+//windows and enable it if so
+#ifndef WNT
+ bool bResult;
+
+ bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StarOffice XML (Writer)")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CXML")),
+ m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2006-3117-1.sxw")));
+ CPPUNIT_ASSERT_MESSAGE("CVE-2006-3117 regression", bResult == false);
+
+ bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Rich Text Format")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RTF")),
+ m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2007-0245-1.rtf")));
+ CPPUNIT_ASSERT_MESSAGE("CVE-2007-0245 regression", bResult == true);
+
+ bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MS Word 97")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CWW8")),
+ m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2009-0200-1.doc")));
+ CPPUNIT_ASSERT_MESSAGE("CVE-2009-0200 regression", bResult == true);
+
+ bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MS Word 97")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CWW8")),
+ m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2009-0201-1.doc")));
+ CPPUNIT_ASSERT_MESSAGE("CVE-2009-0201 regression", bResult == true);
+
+ bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MS Word 97")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CWW8")),
+ m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2009-3301-1.doc")));
+ CPPUNIT_ASSERT_MESSAGE("CVE-2009-3301 regression", bResult == true);
+
+ bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MS Word 97")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CWW8")),
+ m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2009-3302-1.doc")));
+ CPPUNIT_ASSERT_MESSAGE("CVE-2009-3302 regression", bResult == true);
+
+ bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MS Word 97")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CWW8")),
+ m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2009-3302-2.doc")));
+ CPPUNIT_ASSERT_MESSAGE("CVE-2009-3302 regression", bResult == true);
+
+ bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Rich Text Format")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RTF")),
+ m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2010-3451-1.rtf")));
+ CPPUNIT_ASSERT_MESSAGE("CVE-2010-3451 regression", bResult == false);
+
+ bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Rich Text Format")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RTF")),
+ m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2010-3452-1.rtf")));
+ CPPUNIT_ASSERT_MESSAGE("CVE-2010-3452 regression", bResult == true);
+
+ bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MS Word 97")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CWW8")),
+ m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2010-3453-1.doc")));
+ CPPUNIT_ASSERT_MESSAGE("CVE-2010-3453 regression", bResult == true);
+
+ bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MS Word 97")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CWW8")),
+ m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2010-3454-1.doc")));
+ CPPUNIT_ASSERT_MESSAGE("CVE-2010-3454 regression", bResult == true);
+#endif
+}
+
+FiltersTest::FiltersTest()
+{
+ m_xContext = cppu::defaultBootstrap_InitialComponentContext();
+ m_xFactory = m_xContext->getServiceManager();
+
+ uno::Reference<lang::XMultiServiceFactory> xSM(m_xFactory, uno::UNO_QUERY_THROW);
+
+ //Without this we're crashing because callees are using
+ //getProcessServiceFactory. In general those should be removed in favour
+ //of retaining references to the root ServiceFactory as its passed around
+ comphelper::setProcessServiceFactory(xSM);
+
+ // initialise UCB-Broker
+ uno::Sequence<uno::Any> aUcbInitSequence(2);
+ aUcbInitSequence[0] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Local"));
+ aUcbInitSequence[1] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office"));
+ bool bInitUcb = ucbhelper::ContentBroker::initialize(xSM, aUcbInitSequence);
+ CPPUNIT_ASSERT_MESSAGE("Should be able to initialize UCB", bInitUcb);
+
+ uno::Reference<ucb::XContentProviderManager> xUcb =
+ ucbhelper::ContentBroker::get()->getContentProviderManagerInterface();
+ uno::Reference<ucb::XContentProvider> xFileProvider(xSM->createInstance(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContentProvider"))), uno::UNO_QUERY);
+ xUcb->registerContentProvider(xFileProvider, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file")), sal_True);
+
+
+ InitVCL(xSM);
+
+ //This is a bit of a fudge, we do this to ensure that SwDLL::Init, which is
+ //a private symbol to us, gets called
+ m_xWriterComponent =
+ xSM->createInstance(rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Writer.TextDocument")));
+ CPPUNIT_ASSERT_MESSAGE("no PWD!", m_xWriterComponent.is());
+
+ ErrorHandler::RegisterDisplay(&aWndFunc);
+
+ oslProcessError err = osl_getProcessWorkingDir(&m_aPWDURL.pData);
+ CPPUNIT_ASSERT_MESSAGE("no PWD!", err == osl_Process_E_None);
+}
+
+void FiltersTest::setUp()
+{
+}
+
+FiltersTest::~FiltersTest()
+{
+}
+
+void FiltersTest::tearDown()
+{
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(FiltersTest);
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/swdoc-test.cxx b/sw/qa/core/swdoc-test.cxx
new file mode 100644
index 000000000000..ae399b80b3d7
--- /dev/null
+++ b/sw/qa/core/swdoc-test.cxx
@@ -0,0 +1,241 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Thorsten Behrens <tbehrens@novell.com>
+ * Portions created by the Initial Developer are Copyright (C) 2011 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Thorsten Behrens <tbehrens@novell.com>
+ * Caolán McNamara <caolanm@redhat.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "precompiled_sw.hxx"
+
+#ifdef WNT
+#include <prewin.h>
+#include <postwin.h>
+#endif
+
+#include <cppunit/TestSuite.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/TestCase.h>
+#include <cppunit/plugin/TestPlugIn.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <osl/file.hxx>
+#include <osl/process.h>
+#include <cppuhelper/compbase1.hxx>
+#include <cppuhelper/bootstrap.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <comphelper/processfactory.hxx>
+#include <vcl/svapp.hxx>
+
+#include <sfx2/app.hxx>
+#include <sfx2/docfilt.hxx>
+#include <sfx2/docfile.hxx>
+#include <sfx2/sfxmodelfactory.hxx>
+
+#include <tools/urlobj.hxx>
+#include <unotools/tempfile.hxx>
+#include <ucbhelper/contentbroker.hxx>
+
+#include "init.hxx"
+#include "swtypes.hxx"
+#include "doc.hxx"
+#include "docsh.hxx"
+#include "shellres.hxx"
+#include "docufld.hxx"
+
+SO2_DECL_REF(SwDocShell)
+SO2_IMPL_REF(SwDocShell)
+
+using namespace ::com::sun::star;
+
+static sal_uInt16 aWndFunc(Window *, sal_uInt16, const String &, const String &)
+{
+ return ERRCODE_BUTTON_OK;
+}
+
+/* Implementation of Swdoc-Test class */
+
+class SwDocTest : public CppUnit::TestFixture
+{
+public:
+ SwDocTest();
+ ~SwDocTest();
+
+ virtual void setUp();
+ virtual void tearDown();
+
+ void randomTest();
+ void testPageDescName();
+ void testFileNameFields();
+
+ CPPUNIT_TEST_SUITE(SwDocTest);
+ CPPUNIT_TEST(randomTest);
+ CPPUNIT_TEST(testPageDescName);
+ CPPUNIT_TEST(testFileNameFields);
+ CPPUNIT_TEST_SUITE_END();
+
+private:
+ uno::Reference<uno::XComponentContext> m_xContext;
+ uno::Reference<lang::XMultiComponentFactory> m_xFactory;
+ SwDoc *m_pDoc;
+ SwDocShellRef m_xDocShRef;
+};
+
+void SwDocTest::testPageDescName()
+{
+ ShellResource aShellResources;
+
+ std::vector<rtl::OUString> aResults;
+
+ //These names must be unique for each different combination, otherwise
+ //duplicate page description names may exist, which will causes lookup
+ //by name to be incorrect, and so the corresponding export to .odt
+ aResults.push_back(aShellResources.GetPageDescName(1, ShellResource::NORMAL_PAGE));
+ aResults.push_back(aShellResources.GetPageDescName(1, ShellResource::FIRST_PAGE));
+ aResults.push_back(aShellResources.GetPageDescName(1, ShellResource::FOLLOW_PAGE));
+
+ std::sort(aResults.begin(), aResults.end());
+ aResults.erase(std::unique(aResults.begin(), aResults.end()), aResults.end());
+
+ CPPUNIT_ASSERT_MESSAGE("GetPageDescName results must be unique", aResults.size() == 3);
+}
+
+//See https://bugs.freedesktop.org/show_bug.cgi?id=32463 for motivation
+void SwDocTest::testFileNameFields()
+{
+ //Here's a file name with some chars in it that will be %% encoded, when expanding
+ //SwFileNameFields we want to restore the original readable filename
+ utl::TempFile aTempFile(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("demo [name]")));
+ aTempFile.EnableKillingFile();
+
+ INetURLObject aTempFileURL(aTempFile.GetURL());
+ String sFileURL = aTempFileURL.GetMainURL(INetURLObject::NO_DECODE);
+ SfxMedium aDstMed(sFileURL, STREAM_STD_READWRITE, true);
+
+ SfxFilter aFilter(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Text")),
+ rtl::OUString(), 0, 0, rtl::OUString(), 0, rtl::OUString(),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TEXT")), rtl::OUString() );
+ aDstMed.SetFilter(&aFilter);
+
+ m_xDocShRef->DoSaveAs(aDstMed);
+ m_xDocShRef->DoSaveCompleted(&aDstMed);
+
+ const INetURLObject &rUrlObj = m_xDocShRef->GetMedium()->GetURLObject();
+
+ SwFileNameFieldType aNameField(m_pDoc);
+
+ {
+ rtl::OUString sResult(aNameField.Expand(FF_NAME));
+ rtl::OUString sExpected(rUrlObj.getName(INetURLObject::LAST_SEGMENT,
+ true,INetURLObject::DECODE_WITH_CHARSET));
+ CPPUNIT_ASSERT_MESSAGE("Expected Readable FileName", sResult == sExpected);
+ }
+
+ {
+ rtl::OUString sResult(aNameField.Expand(FF_PATHNAME));
+ rtl::OUString sExpected(rUrlObj.GetFull());
+ CPPUNIT_ASSERT_MESSAGE("Expected Readable FileName", sResult == sExpected);
+ }
+
+ {
+ rtl::OUString sResult(aNameField.Expand(FF_PATH));
+ INetURLObject aTemp(rUrlObj);
+ aTemp.removeSegment();
+ rtl::OUString sExpected(aTemp.PathToFileName());
+ CPPUNIT_ASSERT_MESSAGE("Expected Readable FileName", sResult == sExpected);
+ }
+
+ {
+ rtl::OUString sResult(aNameField.Expand(FF_NAME_NOEXT));
+ rtl::OUString sExpected(rUrlObj.getName(INetURLObject::LAST_SEGMENT,
+ true,INetURLObject::DECODE_WITH_CHARSET));
+ //Chop off .tmp
+ sExpected = sExpected.copy(0, sExpected.getLength() - 4);
+ CPPUNIT_ASSERT_MESSAGE("Expected Readable FileName", sResult == sExpected);
+ }
+
+ m_xDocShRef->DoInitNew(0);
+}
+
+void SwDocTest::randomTest()
+{
+ CPPUNIT_ASSERT_MESSAGE("SwDoc::IsRedlineOn()", !m_pDoc->IsRedlineOn());
+}
+
+SwDocTest::SwDocTest()
+{
+ m_xContext = cppu::defaultBootstrap_InitialComponentContext();
+ m_xFactory = m_xContext->getServiceManager();
+
+ uno::Reference<lang::XMultiServiceFactory> xSM(m_xFactory, uno::UNO_QUERY_THROW);
+
+ //Without this we're crashing because callees are using
+ //getProcessServiceFactory. In general those should be removed in favour
+ //of retaining references to the root ServiceFactory as its passed around
+ comphelper::setProcessServiceFactory(xSM);
+
+ // initialise UCB-Broker
+ uno::Sequence<uno::Any> aUcbInitSequence(2);
+ aUcbInitSequence[0] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Local"));
+ aUcbInitSequence[1] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office"));
+ bool bInitUcb = ucbhelper::ContentBroker::initialize(xSM, aUcbInitSequence);
+ CPPUNIT_ASSERT_MESSAGE("Should be able to initialize UCB", bInitUcb);
+
+ uno::Reference<ucb::XContentProviderManager> xUcb =
+ ucbhelper::ContentBroker::get()->getContentProviderManagerInterface();
+ uno::Reference<ucb::XContentProvider> xFileProvider(xSM->createInstance(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContentProvider"))), uno::UNO_QUERY);
+ xUcb->registerContentProvider(xFileProvider, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file")), sal_True);
+
+
+ InitVCL(xSM);
+
+ SwDLL::Init();
+
+ ErrorHandler::RegisterDisplay(&aWndFunc);
+}
+
+void SwDocTest::setUp()
+{
+ m_pDoc = new SwDoc;
+ m_xDocShRef = new SwDocShell(m_pDoc, SFX_CREATE_MODE_EMBEDDED);
+ m_xDocShRef->DoInitNew(0);
+}
+
+SwDocTest::~SwDocTest()
+{
+}
+
+void SwDocTest::tearDown()
+{
+ m_xDocShRef.Clear();
+ delete m_pDoc;
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SwDocTest);
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/sdi/_annotsh.sdi b/sw/sdi/_annotsh.sdi
index d77df897a95a..d77df897a95a 100755..100644
--- a/sw/sdi/_annotsh.sdi
+++ b/sw/sdi/_annotsh.sdi
diff --git a/sw/sdi/_basesh.sdi b/sw/sdi/_basesh.sdi
index 52e59e9e5fed..115029d3c5d1 100644
--- a/sw/sdi/_basesh.sdi
+++ b/sw/sdi/_basesh.sdi
@@ -247,6 +247,12 @@ interface BaseTextSelection
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ FN_FORMAT_TITLEPAGE_DLG // status(final|play)
+ [
+ ExecMethod = ExecDlg ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
FN_FORMAT_PAGE_COLUMN_DLG // status(final|play)
[
ExecMethod = ExecDlg ;
diff --git a/sw/sdi/_frmsh.sdi b/sw/sdi/_frmsh.sdi
index a83270a6d196..de898acb3522 100644
--- a/sw/sdi/_frmsh.sdi
+++ b/sw/sdi/_frmsh.sdi
@@ -173,6 +173,20 @@ interface BaseTextFrame
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ FN_EXPORT_OLE_AS_PDF // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_EXPORT_OLE_AS_GRAPHIC // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
SID_FRAME_LINESTYLE // status()
[
ExecMethod = ExecFrameStyle ;
@@ -248,14 +262,13 @@ interface BaseTextFrame
[
ExecMethod = Execute ;
]
- // --> OD 2009-07-08 #i73249#
+ // #i73249#
FN_TITLE_DESCRIPTION_SHAPE
[
ExecMethod = Execute ;
StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
- // <--
/*****************************************************
diff --git a/sw/sdi/_grfsh.sdi b/sw/sdi/_grfsh.sdi
index 3d7fd41af98d..d60dc39d4b36 100644
--- a/sw/sdi/_grfsh.sdi
+++ b/sw/sdi/_grfsh.sdi
@@ -58,6 +58,11 @@ interface BaseTextGraphic
StateMethod = GetAttrState ;
]
+ FN_EXTERNAL_EDIT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetAttrState ;
+ ]
SID_INSERT_GRAPHIC // zeigt auf FN_FORMAT_GRAFIC_DLG
[
ExecMethod = Execute ;
diff --git a/sw/sdi/_navsh.sdi b/sw/sdi/_navsh.sdi
new file mode 100644
index 000000000000..6bd62d9b8188
--- /dev/null
+++ b/sw/sdi/_navsh.sdi
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * [ Maja Djordjevic < ovcica@gmail.com > ]
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Cédric Bosdonnat <cbosdonnat@novell.com>
+ * Caolan McNamara <caolanm@redhat.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+interface _Navigation
+[ Automation = FALSE; ]
+{
+ SfxVoidItem NavigateBack FN_NAVIGATION_BACK
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SfxVoidItem NavigateForward FN_NAVIGATION_FORWARD
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/sdi/annotsh.sdi b/sw/sdi/annotsh.sdi
index 349e17b9d985..349e17b9d985 100755..100644
--- a/sw/sdi/annotsh.sdi
+++ b/sw/sdi/annotsh.sdi
diff --git a/sw/sdi/navsh.sdi b/sw/sdi/navsh.sdi
new file mode 100644
index 000000000000..a81c4686ee2b
--- /dev/null
+++ b/sw/sdi/navsh.sdi
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * [ Maja Djordjevic < ovcica@gmail.com > ]
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Cédric Bosdonnat <cbosdonnat@novell.com>
+ * Caolan McNamara <caolanm@redhat.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+shell SwNavigationShell
+{
+ import _Navigation[Automation];
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/sdi/swinterf.c b/sw/sdi/swinterf.c
index 01a741cc04b5..74eb8efdbdba 100644
--- a/sw/sdi/swinterf.c
+++ b/sw/sdi/swinterf.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -247,3 +248,4 @@ short SwParagrDlg(void *pHandle)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 64f52343cb7b..36c45e495cc4 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -2034,6 +2034,54 @@ SfxVoidItem FormatColumns FN_FORMAT_COLUMN
GroupId = GID_FORMAT;
]
+SfxVoidItem ExportPDF FN_EXPORT_OLE_AS_PDF
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerItem;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+SfxVoidItem ExportGraphic FN_EXPORT_OLE_AS_GRAPHIC
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerItem;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
//--------------------------------------------------------------------------
SwFmtDrop FormatDropcap FN_FORMAT_DROPCAPS
@@ -3462,6 +3510,33 @@ SfxVoidItem SaveGraphic FN_SAVE_GRAPHIC
GroupId = GID_GRAPHIC;
]
+//------------------------------------------------------------------------
+SfxVoidItem ExternalEdit FN_EXTERNAL_EDIT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_GRAPHIC;
+]
+//------------------------------------------------------------------------
+
+
//--------------------------------------------------------------------------
SfxVoidItem Grow FN_GROW_FONT_SIZE
()
@@ -6329,6 +6404,31 @@ SfxVoidItem PageDialog FN_FORMAT_PAGE_DLG
]
//--------------------------------------------------------------------------
+SfxVoidItem TitlePageDialog FN_FORMAT_TITLEPAGE_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerItem;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
SfxVoidItem PageDown FN_PAGEDOWN
()
[
@@ -10266,3 +10366,54 @@ SfxVoidItem CopyHyperlinkLocation FN_COPY_HYPERLINK_LOCATION
ToolBoxConfig = TRUE,
GroupId = GID_EDIT;
]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NavigateBack FN_NAVIGATION_BACK
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATION;
+]
+//--------------------------------------------------------------------------
+SfxVoidItem NavigateForward FN_NAVIGATION_FORWARD
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATION;
+]
diff --git a/sw/sdi/swslots.sdi b/sw/sdi/swslots.sdi
index 0b59ebb0c211..6730333f695f 100644
--- a/sw/sdi/swslots.sdi
+++ b/sw/sdi/swslots.sdi
@@ -120,6 +120,8 @@ ModulePrefix( "Sw" )
include "_annotsh.sdi"
include "annotsh.sdi"
+ include "_navsh.sdi"
+ include "navsh.sdi"
}
diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx
index cec279e73096..100cc9ffda9d 100644
--- a/sw/source/core/SwNumberTree/SwNodeNum.cxx
+++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,12 +38,8 @@
// --> OD 2007-10-31 #i83479#
#include <IDocumentListItems.hxx>
// <--
-// --> OD 2010-01-13 #b6912256#
-//#include <svtools/svstdarr.hxx>
#include <doc.hxx>
-// <--
-// --> OD 2008-02-19 #refactorlists#
SwNodeNum::SwNodeNum( SwTxtNode* pTxtNode )
: SwNumberTreeNode(),
mpTxtNode( pTxtNode ),
@@ -56,7 +53,6 @@ SwNodeNum::SwNodeNum( SwNumRule* pNumRule )
mpNumRule( pNumRule )
{
}
-// <--
SwNodeNum::~SwNodeNum()
{
@@ -74,7 +70,7 @@ SwNumRule * SwNodeNum::GetNumRule() const
void SwNodeNum::ChangeNumRule( SwNumRule& rNumRule )
{
- ASSERT( GetNumRule() && GetTxtNode(),
+ OSL_ENSURE( GetNumRule() && GetTxtNode(),
"<SwNodeNum::ChangeNumRule(..)> - missing list style and/or text node. Serious defect -> please informm OD." );
if ( GetNumRule() && GetTxtNode() )
{
@@ -91,32 +87,27 @@ void SwNodeNum::ChangeNumRule( SwNumRule& rNumRule )
SwPosition SwNodeNum::GetPosition() const
{
- ASSERT( GetTxtNode(),
+ OSL_ENSURE( GetTxtNode(),
"<SwNodeNum::GetPosition()> - no text node set at <SwNodeNum> instance" );
return SwPosition(*mpTxtNode);
}
SwNumberTreeNode * SwNodeNum::Create() const
{
- // --> OD 2008-02-19 #refactorlists#
-// SwNodeNum * pResult = new SwNodeNum();
-// pResult->SetNumRule(mpNumRule);
SwNodeNum * pResult = new SwNodeNum( GetNumRule() );
- // <--
return pResult;
}
-// --> OD 2008-02-19 #refactorlists#
void SwNodeNum::PreAdd()
{
- ASSERT( GetTxtNode(),
+ OSL_ENSURE( GetTxtNode(),
"<SwNodeNum::PreAdd()> - no text node set at <SwNodeNum> instance" );
if ( !GetNumRule() && GetTxtNode() )
{
mpNumRule = GetTxtNode()->GetNumRule();
}
- ASSERT( GetNumRule(),
+ OSL_ENSURE( GetNumRule(),
"<SwNodeNum::PreAdd()> - no list style set at <SwNodeNum> instance" );
if ( GetNumRule() && GetTxtNode() )
{
@@ -135,9 +126,9 @@ void SwNodeNum::PreAdd()
void SwNodeNum::PostRemove()
{
- ASSERT( GetTxtNode(),
+ OSL_ENSURE( GetTxtNode(),
"<SwNodeNum::PostRemove()> - no text node set at <SwNodeNum> instance" );
- ASSERT( GetNumRule(),
+ OSL_ENSURE( GetNumRule(),
"<SwNodeNum::PostRemove()> - no list style set at <SwNodeNum> instance" );
if ( GetTxtNode() )
@@ -191,7 +182,7 @@ bool SwNodeNum::IsContinuous() const
}
else
{
- ASSERT( false, "<SwNodeNum::IsContinuous()> - OD debug" );
+ OSL_ENSURE( false, "<SwNodeNum::IsContinuous()> - OD debug" );
}
// <--
@@ -206,13 +197,6 @@ bool SwNodeNum::IsCounted() const
{
// --> OD 2006-01-25 #i59559#
// <SwTxtNode::IsCounted()> determines, if a text node is counted for numbering
-// const SwNumFmt * pNumFmt = GetNumFmt();
-// if (pNumFmt)
-// {
-// sal_Int16 nType = pNumFmt->GetNumberingType();
-// if ( nType != SVX_NUM_NUMBER_NONE)
-// aResult = mpTxtNode->IsCounted();
-// }
aResult = GetTxtNode()->IsCountedInList();
// <--
}
@@ -227,12 +211,12 @@ bool SwNodeNum::HasCountedChildren() const
{
bool bResult = false;
- tSwNumberTreeChildren::iterator aIt;
+ tSwNumberTreeChildren::const_iterator aIt;
- for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
+ for (aIt = mChildren.begin(); aIt != mChildren.end(); ++aIt)
{
SwNodeNum* pChild( dynamic_cast<SwNodeNum*>(*aIt) );
- ASSERT( pChild,
+ OSL_ENSURE( pChild,
"<SwNodeNum::HasCountedChildren()> - unexcepted type of child -> please inform OD" );
if ( pChild &&
( pChild->IsCountedForNumbering() ||
@@ -280,9 +264,6 @@ bool SwNodeNum::LessThan(const SwNumberTreeNode & rNode) const
{
// --> OD 2007-10-31 #i83479# - refactoring
// simplify comparison by comparing the indexes of the text nodes
-// SwPosition aMyPos(*mpTxtNode);
-// SwPosition aHisPos(*rTmpNode.mpTxtNode);
-// bResult = (aMyPos < aHisPos) ? true : false;
bResult = ( mpTxtNode->GetIndex() < rTmpNode.mpTxtNode->GetIndex() ) ? true : false;
// <--
}
@@ -290,24 +271,6 @@ bool SwNodeNum::LessThan(const SwNumberTreeNode & rNode) const
return bResult;
}
-//void SwNodeNum::SetRestart(bool bRestart)
-//{
-// // --> OD 2005-10-19 #126009#
-// // - improvement: invalidation only, if <IsRestart()> state changes.
-// const bool bInvalidate( mbRestart != bRestart );
-// // <--
-// mbRestart = bRestart;
-
-// // --> OD 2005-10-19 #126009#
-// if ( bInvalidate )
-// {
-// InvalidateMe();
-// NotifyInvalidSiblings();
-// }
-// // <--
-//}
-
-// --> OD 2008-02-25 #refactorlists#
bool SwNodeNum::IsRestart() const
{
bool bIsRestart = false;
@@ -319,23 +282,6 @@ bool SwNodeNum::IsRestart() const
return bIsRestart;
}
-// <--
-
-//void SwNodeNum::SetStart(SwNumberTree::tSwNumTreeNumber nStart)
-//{
-// // --> OD 2005-10-19 #126009#
-// // - improvement: invalidation only, if <IsRestart()> state changes.
-// const bool bInvalidate( mnStart != nStart );
-// // <--
-// mnStart = nStart;
-
-// // --> OD 2005-10-19 #126009#
-// if ( bInvalidate )
-// {
-// InvalidateMe();
-// NotifyInvalidSiblings();
-// }
-//}
bool SwNodeNum::IsCountPhantoms() const
{
@@ -348,7 +294,7 @@ bool SwNodeNum::IsCountPhantoms() const
mpNumRule->IsCountPhantoms();
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwNodeNum::IsCountPhantoms(): missing numbering rule - please inform OD" );
}
// <--
@@ -356,9 +302,7 @@ bool SwNodeNum::IsCountPhantoms() const
return bResult;
}
-// --> OD 2008-02-25 #refactorlists#
SwNumberTree::tSwNumTreeNumber SwNodeNum::GetStartValue() const
-//SwNumberTree::tSwNumTreeNumber SwNodeNum::GetStart() const
{
SwNumberTree::tSwNumTreeNumber aResult = 1;
@@ -387,63 +331,6 @@ SwNumberTree::tSwNumTreeNumber SwNodeNum::GetStartValue() const
return aResult;
}
-//String SwNodeNum::ToString() const
-//{
-// String aResult("[ ", RTL_TEXTENCODING_ASCII_US);
-
-// if (GetTxtNode())
-// {
-// char aBuffer[256];
-
-// sprintf(aBuffer, "%p ", GetTxtNode());
-
-// aResult += String(aBuffer, RTL_TEXTENCODING_ASCII_US);
-// aResult += String::CreateFromInt32(GetPosition().nNode.GetIndex());
-// }
-// else
-// aResult += String("*", RTL_TEXTENCODING_ASCII_US);
-
-// aResult += String(" ", RTL_TEXTENCODING_ASCII_US);
-
-// unsigned int nLvl = GetLevel();
-// aResult += String::CreateFromInt32(nLvl);
-
-// aResult += String(": ", RTL_TEXTENCODING_ASCII_US);
-
-// tNumberVector aNumVector;
-
-// _GetNumberVector(aNumVector, false);
-
-// for (unsigned int n = 0; n < aNumVector.size(); n++)
-// {
-// if (n > 0)
-// aResult += String(", ", RTL_TEXTENCODING_ASCII_US);
-
-// aResult += String::CreateFromInt32(aNumVector[n]);
-// }
-
-// if (IsCounted())
-//// aResult += String(" counted", RTL_TEXTENCODING_ASCII_US);
-// aResult += String(" C", RTL_TEXTENCODING_ASCII_US);
-
-// if (IsRestart())
-// {
-//// aResult += String(" restart(", RTL_TEXTENCODING_ASCII_US);
-// aResult += String(" R(", RTL_TEXTENCODING_ASCII_US);
-// aResult += String::CreateFromInt32(GetStart());
-// aResult += String(")", RTL_TEXTENCODING_ASCII_US);
-// }
-
-// if (! IsValid())
-//// aResult += String(" invalid", RTL_TEXTENCODING_ASCII_US);
-// aResult += String(" I", RTL_TEXTENCODING_ASCII_US);
-
-// aResult += String(" ]", RTL_TEXTENCODING_ASCII_US);
-
-// return aResult;
-//}
-
-// --> OD 2006-03-07 #131436#
void SwNodeNum::HandleNumberTreeRootNodeDelete( SwNodeNum& rNodeNum )
{
SwNodeNum* pRootNode = rNodeNum.GetParent()
@@ -471,7 +358,7 @@ void SwNodeNum::_UnregisterMeAndChildrenDueToRootDelete( SwNodeNum& rNodeNum )
SwNodeNum* pChildNode( dynamic_cast<SwNodeNum*>((*rNodeNum.mChildren.begin())) );
if ( !pChildNode )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwNodeNum::_UnregisterMeAndChildrenDueToRootDelete(..)> - unknown number tree node child" );
++nAllowedChildCount;
continue;
@@ -494,8 +381,7 @@ void SwNodeNum::_UnregisterMeAndChildrenDueToRootDelete( SwNodeNum& rNodeNum )
if ( pTxtNode )
{
pTxtNode->RemoveFromList();
- // --> OD 2010-01-13 #b6912256#
- // clear all list attributes and the list style
+ // --> clear all list attributes and the list style
SvUShortsSort aResetAttrsArray;
aResetAttrsArray.Insert( RES_PARATR_LIST_ID );
aResetAttrsArray.Insert( RES_PARATR_LIST_LEVEL );
@@ -519,8 +405,6 @@ const SwNodeNum* SwNodeNum::GetPrecedingNodeNumOf( const SwTxtNode& rTxtNode ) c
const SwNodeNum* pPrecedingNodeNum( 0 );
// --> OD 2007-10-31 #i83479#
-// SwNodeNum aNodeNumForTxtNode;
-// aNodeNumForTxtNode.SetTxtNode( const_cast<SwTxtNode*>(&rTxtNode) );
SwNodeNum aNodeNumForTxtNode( const_cast<SwTxtNode*>(&rTxtNode) );
// <--
@@ -532,3 +416,5 @@ const SwNodeNum* SwNodeNum::GetPrecedingNodeNumOf( const SwTxtNode& rTxtNode ) c
return pPrecedingNodeNum;
}
// <--
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx
index 05c30aa97f5b..c19d969d09b1 100644
--- a/sw/source/core/SwNumberTree/SwNumberTree.cxx
+++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,13 +31,12 @@
#include <algorithm>
#include <functional>
-#include <errhdl.hxx>
#include <SwNumberTree.hxx>
using std::vector;
using std::find;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
unsigned long SwNumberTreeNode::nInstances = 0;
#endif
@@ -44,15 +44,13 @@ SwNumberTreeNode::SwNumberTreeNode()
: mChildren(),
mpParent( 0 ),
mnNumber( 0 ),
- // --> OD 2008-11-26 #158694#
mbContinueingPreviousSubTree( false ),
- // <--
mbPhantom( false ),
mItLastValid()
{
mItLastValid = mChildren.end();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
mnSerial = nInstances;
nInstances++;
#endif
@@ -71,19 +69,19 @@ SwNumberTreeNode::~SwNumberTreeNode()
}
else
{
- ASSERT(false, "lost children!");
+ OSL_ENSURE(false, "lost children!");
}
}
- ASSERT( IsPhantom() || mpParent == NULL, ": I'm not supposed to have a parent.");
+ OSL_ENSURE( IsPhantom() || mpParent == NULL, ": I'm not supposed to have a parent.");
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
nInstances--;
#endif
mpParent = (SwNumberTreeNode *) 0xdeadbeef;
- ASSERT(mChildren.empty(), "children left!");
+ OSL_ENSURE(mChildren.empty(), "children left!");
}
SwNumberTreeNode * SwNumberTreeNode::CreatePhantom()
@@ -93,7 +91,7 @@ SwNumberTreeNode * SwNumberTreeNode::CreatePhantom()
if (! mChildren.empty() &&
(*mChildren.begin())->IsPhantom())
{
- ASSERT(false, "phantom already present");
+ OSL_ENSURE(false, "phantom already present");
}
else
{
@@ -106,7 +104,7 @@ SwNumberTreeNode * SwNumberTreeNode::CreatePhantom()
if (! aInsert.second)
{
- ASSERT(false, "insert of phantom failed!");
+ OSL_ENSURE(false, "insert of phantom failed!");
delete pNew;
pNew = NULL;
@@ -152,16 +150,16 @@ void SwNumberTreeNode::ClearObsoletePhantoms()
void SwNumberTreeNode::ValidateHierarchical(const SwNumberTreeNode * pNode) const
{
- tSwNumberTreeChildren::iterator aValidateIt =
+ tSwNumberTreeChildren::const_iterator aValidateIt =
GetIterator(pNode);
if (aValidateIt != mChildren.end())
{
- ASSERT((*aValidateIt)->mpParent == this, "wrong parent");
+ OSL_ENSURE((*aValidateIt)->mpParent == this, "wrong parent");
- tSwNumberTreeChildren::iterator aIt = mItLastValid;
+ tSwNumberTreeChildren::const_iterator aIt = mItLastValid;
- // --> OD 2005-10-19 #126009#
+ // -->
// improvement:
// - Only one time checked for <mChildren.end()>.
// - Less checks for each loop run.
@@ -171,32 +169,13 @@ void SwNumberTreeNode::ValidateHierarchical(const SwNumberTreeNode * pNode) cons
// of the previous node determines the start value for the following
// children loop, if all children have to be validated and the first
// one doesn't restart the counting.
-// tSwNumTreeNumber nTmpNumber = 0;
-// if (aIt != mChildren.end())
-// nTmpNumber = (*aIt)->mnNumber;
-// while (aIt != aValidateIt)
-// {
-// if (aIt == mChildren.end())
-// aIt = mChildren.begin();
-// else
-// {
-// aIt++;
-// if ((*aIt)->IsCounted())
-// nTmpNumber++;
-// }
-// if ((*aIt)->IsRestart() || aIt == mChildren.begin())
-// nTmpNumber = (*aIt)->GetStart();
-// (*aIt)->mnNumber = nTmpNumber;
-// }
SwNumberTree::tSwNumTreeNumber nTmpNumber( 0 );
if (aIt != mChildren.end())
nTmpNumber = (*aIt)->mnNumber;
else
{
aIt = mChildren.begin();
- // --> OD 2008-11-26 #158694#
(*aIt)->mbContinueingPreviousSubTree = false;
- // <--
// determine default start value
// consider the case that the first child isn't counted.
@@ -210,15 +189,13 @@ void SwNumberTreeNode::ValidateHierarchical(const SwNumberTreeNode * pNode) cons
// determine special start value for the case that first child
// doesn't restart the numbering and the parent node isn't counted
// and isn't the first child.
- // --> OD 2005-10-27 #126009#
const bool bParentCounted( IsCounted() &&
( !IsPhantom() ||
HasPhantomCountedParent() ) );
- // <--
if ( !(*aIt)->IsRestart() &&
GetParent() && !bParentCounted )
{
- tSwNumberTreeChildren::iterator aParentChildIt =
+ tSwNumberTreeChildren::const_iterator aParentChildIt =
GetParent()->GetIterator( this );
while ( aParentChildIt != GetParent()->mChildren.begin() )
{
@@ -226,15 +203,11 @@ void SwNumberTreeNode::ValidateHierarchical(const SwNumberTreeNode * pNode) cons
SwNumberTreeNode* pPrevNode( *aParentChildIt );
if ( pPrevNode->GetChildCount() > 0 )
{
- // --> OD 2008-11-26 #158694#
(*aIt)->mbContinueingPreviousSubTree = true;
- // <--
nTmpNumber = (*(pPrevNode->mChildren.rbegin()))->GetNumber();
- // --> OD 2005-10-27 #126009#
if ( (*aIt)->IsCounted() &&
( !(*aIt)->IsPhantom() ||
(*aIt)->HasPhantomCountedParent() ) )
- // <--
{
++nTmpNumber;
}
@@ -258,11 +231,9 @@ void SwNumberTreeNode::ValidateHierarchical(const SwNumberTreeNode * pNode) cons
while (aIt != aValidateIt)
{
++aIt;
- // --> OD 2008-11-26 #158694#
(*aIt)->mbContinueingPreviousSubTree = false;
- // <--
- // --> OD 2005-10-19 #126009# - only for counted nodes the number
+ // --> only for counted nodes the number
// has to be adjusted, compared to the previous node.
// this condition is hold also for nodes, which restart the numbering.
if ( (*aIt)->IsCounted() )
@@ -284,7 +255,7 @@ void SwNumberTreeNode::ValidateHierarchical(const SwNumberTreeNode * pNode) cons
void SwNumberTreeNode::ValidateContinuous(const SwNumberTreeNode * pNode) const
{
- tSwNumberTreeChildren::iterator aIt = mItLastValid;
+ tSwNumberTreeChildren::const_iterator aIt = mItLastValid;
SwNumberTree::tSwNumTreeNumber nTmpNumber = 0;
@@ -297,7 +268,7 @@ void SwNumberTreeNode::ValidateContinuous(const SwNumberTreeNode * pNode) const
nTmpNumber = GetStartValue();
}
else
- aIt++;
+ ++aIt;
if (aIt != mChildren.end())
{
@@ -341,7 +312,6 @@ void SwNumberTreeNode::ValidateContinuous(const SwNumberTreeNode * pNode) const
// --> OD 2008-05-21 #i74748# - applied patch from garnier_romain
// number tree node has to be validated.
-// SetLastValid(aIt);
SetLastValid( aIt, true );
// <--
}
@@ -370,7 +340,7 @@ void SwNumberTreeNode::ValidateTree()
{
tSwNumberTreeChildren::iterator aIt;
- for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
+ for (aIt = mChildren.begin(); aIt != mChildren.end(); ++aIt)
(*aIt)->ValidateTree();
}
}
@@ -403,8 +373,6 @@ SwNumberTreeNode * SwNumberTreeNode::GetFirstNonPhantomChild()
/** Moves all children of this node that are greater than a given node
to the destination node.
-
- OD 2005-10-14 #125991#
*/
void SwNumberTreeNode::MoveGreaterChildren( SwNumberTreeNode& _rCompareNode,
SwNumberTreeNode& _rDestNode )
@@ -428,7 +396,7 @@ void SwNumberTreeNode::MoveGreaterChildren( SwNumberTreeNode& _rCompareNode,
if (aItUpper != mChildren.end())
{
tSwNumberTreeChildren::iterator aIt;
- for (aIt = aItUpper; aIt != mChildren.end(); aIt++)
+ for (aIt = aItUpper; aIt != mChildren.end(); ++aIt)
(*aIt)->mpParent = &_rDestNode;
_rDestNode.mChildren.insert(aItUpper, mChildren.end());
@@ -488,22 +456,20 @@ void SwNumberTreeNode::MoveChildren(SwNumberTreeNode * pDest)
}
tSwNumberTreeChildren::iterator aIt;
- for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
+ for (aIt = mChildren.begin(); aIt != mChildren.end(); ++aIt)
(*aIt)->mpParent = pDest;
pDest->mChildren.insert(mChildren.begin(), mChildren.end());
mChildren.clear();
- // --> OD 2006-03-08 #131436#
// <stl::set.clear()> destroys all existing iterators.
// Thus, <mItLastValid> is also destroyed and reset becomes necessary
mItLastValid = mChildren.end();
- // <--
}
- ASSERT (mChildren.empty(), "MoveChildren failed!");
+ OSL_ENSURE(mChildren.empty(), "MoveChildren failed!");
#ifdef __SW_NUMBER_TREE_SANITY_CHECK
- ASSERT(IsSane(false) && pDest->IsSane(false), "insanity!");
+ OSL_ENSURE(IsSane(false) && pDest->IsSane(false), "insanity!");
#endif
}
@@ -535,18 +501,16 @@ void SwNumberTreeNode::AddChild( SwNumberTreeNode * pChild,
*/
- // --> OD 2008-03-13 #refactorlists#
if ( nDepth < 0 )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwNumberTreeNode::AddChild(..)> - parameter <nDepth> out of valid range. Serious defect -> please inform OD." );
return;
}
- // <--
if ( pChild->GetParent() != NULL || pChild->GetChildCount() > 0 )
{
- ASSERT(false, "only orphans allowed.");
+ OSL_ENSURE(false, "only orphans allowed.");
return;
}
@@ -555,7 +519,7 @@ void SwNumberTreeNode::AddChild( SwNumberTreeNode * pChild,
tSwNumberTreeChildren::iterator aInsertDeepIt =
mChildren.upper_bound(pChild);
- ASSERT(! (aInsertDeepIt != mChildren.end() &&
+ OSL_ENSURE(! (aInsertDeepIt != mChildren.end() &&
(*aInsertDeepIt)->IsPhantom()), " unexspected phantom");
@@ -570,16 +534,14 @@ void SwNumberTreeNode::AddChild( SwNumberTreeNode * pChild,
}
else
{
- aInsertDeepIt--;
+ --aInsertDeepIt;
(*aInsertDeepIt)->AddChild(pChild, nDepth - 1);
}
}
else
{
- // --> OD 2008-02-19 #refactorlists#
pChild->PreAdd();
- // <--
std::pair<tSwNumberTreeChildren::iterator, bool> aResult =
mChildren.insert(pChild);
@@ -592,9 +554,9 @@ void SwNumberTreeNode::AddChild( SwNumberTreeNode * pChild,
if (aInsertedIt != mChildren.begin())
{
tSwNumberTreeChildren::iterator aPredIt = aInsertedIt;
- aPredIt--;
+ --aPredIt;
- // --> OD 2005-10-14 #125991#
+ // -->
// Move greater children of previous node to new child.
// This has to be done recursively on the children levels.
// Initialize loop variables <pPrevChildNode> and <pDestNode>
@@ -649,14 +611,13 @@ void SwNumberTreeNode::AddChild( SwNumberTreeNode * pChild,
if( bNotification )
{
- // --> OD 2005-10-20 #126009# - invalidation of not counted parent
+ // invalidation of not counted parent
// and notification of its siblings.
if ( !IsCounted() )
{
InvalidateMe();
NotifyInvalidSiblings();
}
- // <--
NotifyInvalidChildren();
}
}
@@ -683,12 +644,12 @@ void SwNumberTreeNode::RemoveChild(SwNumberTreeNode * pChild)
if (pChild->IsPhantom())
{
- ASSERT(false, "not applicable to phantoms!");
+ OSL_ENSURE(false, "not applicable to phantoms!");
return;
}
- tSwNumberTreeChildren::iterator aRemoveIt = GetIterator(pChild);
+ tSwNumberTreeChildren::const_iterator aRemoveIt = GetIterator(pChild);
if (aRemoveIt != mChildren.end())
{
@@ -696,7 +657,7 @@ void SwNumberTreeNode::RemoveChild(SwNumberTreeNode * pChild)
pRemove->mpParent = NULL;
- tSwNumberTreeChildren::iterator aItPred = mChildren.end();
+ tSwNumberTreeChildren::const_iterator aItPred = mChildren.end();
if (aRemoveIt == mChildren.begin())
{
@@ -710,17 +671,14 @@ void SwNumberTreeNode::RemoveChild(SwNumberTreeNode * pChild)
else
{
aItPred = aRemoveIt;
-
- aItPred--;
+ --aItPred;
}
if (! pRemove->mChildren.empty())
{
pRemove->MoveChildren(*aItPred);
- // --> OD 2008-04-04 #refactorlists#
(*aItPred)->InvalidateTree();
(*aItPred)->NotifyInvalidChildren();
- // <--
}
// --> OD 2006-01-17 #i60652#
@@ -735,20 +693,14 @@ void SwNumberTreeNode::RemoveChild(SwNumberTreeNode * pChild)
mChildren.erase(aRemoveIt);
- // --> OD 2008-04-04 #refactorlists#
-// if (aItPred != mChildren.end())
-// NotifyInvalidChildren();
NotifyInvalidChildren();
- // <--
}
else
{
- ASSERT(false, "RemoveChild: failed!");
+ OSL_ENSURE(false, "RemoveChild: failed!");
}
- // --> OD 2008-02-19 #refactorlists#
pChild->PostRemove();
- // <--
}
void SwNumberTreeNode::RemoveMe()
@@ -787,12 +739,10 @@ SwNumberTree::tSwNumTreeNumber SwNumberTreeNode::GetNumber(bool bValidate)
return mnNumber;
}
-// --> OD 2008-11-26 #158694#
bool SwNumberTreeNode::IsContinueingPreviousSubTree() const
{
return mbContinueingPreviousSubTree;
}
-// <--
vector<SwNumberTree::tSwNumTreeNumber> SwNumberTreeNode::GetNumberVector() const
@@ -851,12 +801,11 @@ bool SwNumberTreeNode::IsCounted() const
( IsCountPhantoms() && HasCountedChildren() );
}
-// --> OD 2005-10-27 #126009#
bool SwNumberTreeNode::HasPhantomCountedParent() const
{
bool bRet( false );
- ASSERT( IsPhantom(),
+ OSL_ENSURE( IsPhantom(),
"<SwNumberTreeNode::HasPhantomCountedParent()> - wrong usage of method - it's only for phantoms" );
if ( IsPhantom() && mpParent )
{
@@ -876,14 +825,13 @@ bool SwNumberTreeNode::HasPhantomCountedParent() const
return bRet;
}
-// <--
bool SwNumberTreeNode::IsFirst(const SwNumberTreeNode * pNode) const
{
- tSwNumberTreeChildren::iterator aIt = mChildren.begin();
+ tSwNumberTreeChildren::const_iterator aIt = mChildren.begin();
if ((*aIt)->IsPhantom())
- aIt++;
+ ++aIt;
return *aIt == pNode;
}
@@ -909,7 +857,6 @@ bool SwNumberTreeNode::IsFirst() const
pNode = pNode->GetParent();
}
- // --> OD 2007-10-02 #b6600435#
// If node isn't the first child, it is the second child and the
// first child is a phanton. In this case check, if the first phantom
// child have only phanton childs
@@ -919,7 +866,6 @@ bool SwNumberTreeNode::IsFirst() const
{
bResult = false;
}
- // <--
}
else
bResult = false;
@@ -928,24 +874,23 @@ bool SwNumberTreeNode::IsFirst() const
return bResult;
}
-// --> OD 2008-03-13 #refactorlists#
void SwNumberTreeNode::SetLevelInListTree( const int nLevel )
{
if ( nLevel < 0 )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwNumberTreeNode::SetLevelInListTree(..)> - parameter <nLevel> out of valid range. Serious defect -> please inform OD." );
return;
}
- ASSERT( GetParent(),
+ OSL_ENSURE( GetParent(),
"<SwNumberTreeNode::SetLevelInListTree(..)> - can only be called for number tree nodes in a list tree" );
if ( GetParent() )
{
if ( nLevel != GetLevelInListTree() )
{
SwNumberTreeNode* pRootTreeNode = GetRoot();
- ASSERT( pRootTreeNode,
+ OSL_ENSURE( pRootTreeNode,
"<SwNumberTreeNode::SetLevelInListTree(..)> - no root tree node found. Serious defect -> please inform OD." );
RemoveMe();
@@ -953,7 +898,6 @@ void SwNumberTreeNode::SetLevelInListTree( const int nLevel )
}
}
}
-// <--
int SwNumberTreeNode::GetLevelInListTree() const
{
@@ -987,14 +931,14 @@ bool SwNumberTreeNode::IsSane(bool bRecursive,
if (find(rParents.begin(), rParents.end(), this) != rParents.end())
{
- ASSERT(false, " I'm my own ancestor!");
+ OSL_ENSURE(false, " I'm my own ancestor!");
bResult = false;
}
if (! rParents.empty() && rParents.back() != mpParent)
{
- ASSERT(false, " I'm a bastard!");
+ OSL_ENSURE(false, " I'm a bastard!");
bResult = false;
}
@@ -1002,7 +946,7 @@ bool SwNumberTreeNode::IsSane(bool bRecursive,
rParents.push_back(this);
bool bFirst = true;
- for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
+ for (aIt = mChildren.begin(); aIt != mChildren.end(); ++aIt)
{
if (*aIt)
{
@@ -1015,7 +959,7 @@ bool SwNumberTreeNode::IsSane(bool bRecursive,
if (! bFirst)
{
- ASSERT(false, " found phantom not at first position.");
+ OSL_ENSURE(false, " found phantom not at first position.");
bResult = false;
}
@@ -1023,7 +967,7 @@ bool SwNumberTreeNode::IsSane(bool bRecursive,
if ((*aIt)->mpParent != (SwNumberTreeNode *) this)
{
- ASSERT(false, "found a bastard");
+ OSL_ENSURE(false, "found a bastard");
bResult = false;
}
@@ -1032,7 +976,7 @@ bool SwNumberTreeNode::IsSane(bool bRecursive,
{
if (!(*aIt)->IsPhantom() && (*aIt)->LessThan(*this))
{
- ASSERT(false, " found child less than me");
+ OSL_ENSURE(false, " found child less than me");
bResult = false;
}
@@ -1040,7 +984,7 @@ bool SwNumberTreeNode::IsSane(bool bRecursive,
}
else
{
- ASSERT(false, "found child that is NULL");
+ OSL_ENSURE(false, "found child that is NULL");
bResult = false;
}
@@ -1054,45 +998,19 @@ bool SwNumberTreeNode::IsSane(bool bRecursive,
}
#endif // __SW_NUMBER_TREE_SANITY_CHECK
-SwNumberTreeNode::tSwNumberTreeChildren::iterator
+SwNumberTreeNode::tSwNumberTreeChildren::const_iterator
SwNumberTreeNode::GetIterator(const SwNumberTreeNode * pChild) const
{
- tSwNumberTreeChildren::iterator aItResult =
+ tSwNumberTreeChildren::const_iterator aItResult =
mChildren.find(const_cast<SwNumberTreeNode *>(pChild));
- ASSERT( aItResult != mChildren.end(),
+ OSL_ENSURE( aItResult != mChildren.end(),
"something went wrong getting the iterator for a child");
return aItResult;
}
-//String SwNumberTreeNode::print(const String & rIndent,
-// const String & rMyIndent,
-// int nDepth) const
-//{
-// String aStr = rIndent;
-// aStr += ToString();
-// aStr += String("\n", RTL_TEXTENCODING_ASCII_US);
-
-// if (nDepth != 0)
-// {
-// if (nDepth < 0)
-// nDepth = -1;
-
-// tSwNumberTreeChildren::const_iterator aIt;
-// for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
-// {
-// String aTmpStr(rIndent);
-
-// aTmpStr += rMyIndent;
-// aStr += (*aIt)->print(aTmpStr, rMyIndent, nDepth - 1);
-// }
-// }
-
-// return aStr;
-//}
-
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
unsigned long SwNumberTreeNode::GetInstances()
{
return nInstances;
@@ -1120,7 +1038,7 @@ bool SwNumberTreeNodeLessThan(const SwNumberTreeNode * pA,
SwNumberTreeNode * SwNumberTreeNode::GetLastDescendant() const
{
SwNumberTreeNode * pResult = NULL;
- tSwNumberTreeChildren::reverse_iterator aIt = mChildren.rbegin();
+ tSwNumberTreeChildren::const_reverse_iterator aIt = mChildren.rbegin();
if (aIt != mChildren.rend())
{
@@ -1144,7 +1062,7 @@ SwNumberTreeNode * SwNumberTreeNode::GetPred(bool bSibling) const
if (mpParent)
{
- tSwNumberTreeChildren::iterator aIt =
+ tSwNumberTreeChildren::const_iterator aIt =
mpParent->GetIterator(this);
if ( aIt == mpParent->mChildren.begin() )
@@ -1156,7 +1074,7 @@ SwNumberTreeNode * SwNumberTreeNode::GetPred(bool bSibling) const
}
else
{
- aIt--;
+ --aIt;
if ( !bSibling )
pResult = (*aIt)->GetLastDescendant();
@@ -1172,10 +1090,10 @@ SwNumberTreeNode * SwNumberTreeNode::GetPred(bool bSibling) const
}
void SwNumberTreeNode::SetLastValid
- ( SwNumberTreeNode::tSwNumberTreeChildren::iterator aItValid,
+ ( SwNumberTreeNode::tSwNumberTreeChildren::const_iterator aItValid,
bool bValidating ) const
{
- ASSERT( (aItValid == mChildren.end() || GetIterator(*aItValid) != mChildren.end()),
+ OSL_ENSURE( (aItValid == mChildren.end() || GetIterator(*aItValid) != mChildren.end()),
"last-valid iterator");
if (
@@ -1186,11 +1104,10 @@ void SwNumberTreeNode::SetLastValid
)
{
mItLastValid = aItValid;
- // --> OD 2005-10-19 #126009# - invalidation of children of next not
- // counted is needed
+ // invalidation of children of next not counted is needed
if ( GetParent() )
{
- tSwNumberTreeChildren::iterator aParentChildIt =
+ tSwNumberTreeChildren::const_iterator aParentChildIt =
GetParent()->GetIterator( this );
++aParentChildIt;
if ( aParentChildIt != GetParent()->mChildren.end() )
@@ -1202,16 +1119,15 @@ void SwNumberTreeNode::SetLastValid
}
}
}
- // <--
}
{
if (IsContinuous())
{
- tSwNumberTreeChildren::iterator aIt = mItLastValid;
+ tSwNumberTreeChildren::const_iterator aIt = mItLastValid;
if (aIt != mChildren.end())
- aIt++;
+ ++aIt;
else
aIt = mChildren.begin();
@@ -1219,7 +1135,7 @@ void SwNumberTreeNode::SetLastValid
{
(*aIt)->InvalidateTree();
- aIt++;
+ ++aIt;
}
SetLastValid(bValidating);
@@ -1231,7 +1147,7 @@ void SwNumberTreeNode::SetLastValid(bool bValidating) const
{
if (mpParent)
{
- tSwNumberTreeChildren::iterator aIt = mpParent->GetIterator(this);
+ tSwNumberTreeChildren::const_iterator aIt = mpParent->GetIterator(this);
mpParent->SetLastValid(aIt, bValidating);
}
@@ -1242,9 +1158,9 @@ void SwNumberTreeNode::InvalidateTree() const
// do not call SetInvalid, would cause loop !!!
mItLastValid = mChildren.end();
- tSwNumberTreeChildren::iterator aIt;
+ tSwNumberTreeChildren::const_iterator aIt;
- for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
+ for (aIt = mChildren.begin(); aIt != mChildren.end(); ++aIt)
(*aIt)->InvalidateTree();
}
@@ -1252,10 +1168,10 @@ void SwNumberTreeNode::Invalidate(SwNumberTreeNode * pChild)
{
if (pChild->IsValid())
{
- tSwNumberTreeChildren::iterator aIt = GetIterator(pChild);
+ tSwNumberTreeChildren::const_iterator aIt = GetIterator(pChild);
if (aIt != mChildren.begin())
- aIt--;
+ --aIt;
else
aIt = mChildren.end();
@@ -1285,7 +1201,7 @@ void SwNumberTreeNode::Notify()
tSwNumberTreeChildren::iterator aIt;
- for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
+ for (aIt = mChildren.begin(); aIt != mChildren.end(); ++aIt)
(*aIt)->Notify();
}
}
@@ -1294,24 +1210,23 @@ void SwNumberTreeNode::NotifyInvalidChildren()
{
if (IsNotifiable())
{
- tSwNumberTreeChildren::iterator aIt = mItLastValid;
+ tSwNumberTreeChildren::const_iterator aIt = mItLastValid;
if (aIt == mChildren.end())
aIt = mChildren.begin();
else
- aIt++;
+ ++aIt;
while (aIt != mChildren.end())
{
(*aIt)->Notify();
- aIt++;
+ ++aIt;
}
- // --> OD 2005-10-19 #126009# - notification of next not counted node
- // is also needed.
+ // notification of next not counted node is also needed.
if ( GetParent() )
{
- tSwNumberTreeChildren::iterator aParentChildIt =
+ tSwNumberTreeChildren::const_iterator aParentChildIt =
GetParent()->GetIterator( this );
++aParentChildIt;
if ( aParentChildIt != GetParent()->mChildren.end() )
@@ -1370,12 +1285,11 @@ const SwNumberTreeNode* SwNumberTreeNode::GetPrecedingNodeOf(
}
// <--
-// --> OD 2008-04-17 #refactorlists#
void SwNumberTreeNode::NotifyNodesOnListLevel( const int nListLevel )
{
if ( nListLevel < 0 )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwNumberTreeNode::NotifyNodesOnListLevel(..)> - invalid list level provided" );
return;
}
@@ -1387,7 +1301,7 @@ void SwNumberTreeNode::NotifyNodesOnListLevel( const int nListLevel )
void SwNumberTreeNode::NotifyChildrenOnDepth( const int nDepth )
{
- ASSERT( nDepth >= 0,
+ OSL_ENSURE( nDepth >= 0,
"<SwNumberTreeNode::NotifyChildrenOnDepth(..)> - misusage" );
SwNumberTreeNode::tSwNumberTreeChildren::iterator aChildIter =
@@ -1406,4 +1320,5 @@ void SwNumberTreeNode::NotifyChildrenOnDepth( const int nDepth )
++aChildIter;
}
}
-// <--
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index f4cf864b7217..dbd1b5196593 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include "precompiled_sw.hxx"
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
@@ -99,8 +100,8 @@ void SwAccessibleCell::GetStates( ::utl::AccessibleStateSetHelper& rStateSet )
if( IsSelected() )
{
rStateSet.AddState( AccessibleStateType::SELECTED );
- ASSERT( bIsSelected, "bSelected out of sync" );
- ::vos::ORef < SwAccessibleContext > xThis( this );
+ OSL_ENSURE( bIsSelected, "bSelected out of sync" );
+ ::rtl::Reference < SwAccessibleContext > xThis( this );
GetMap()->SetCursorContext( xThis );
}
}
@@ -110,7 +111,7 @@ SwAccessibleCell::SwAccessibleCell( SwAccessibleMap *pInitMap,
: SwAccessibleContext( pInitMap, AccessibleRole::TABLE_CELL, pCellFrm )
, bIsSelected( sal_False )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
OUString sBoxName( pCellFrm->GetTabBox()->GetName() );
SetName( sBoxName );
@@ -122,7 +123,7 @@ sal_Bool SwAccessibleCell::_InvalidateMyCursorPos()
sal_Bool bNew = IsSelected();
sal_Bool bOld;
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
bOld = bIsSelected;
bIsSelected = bNew;
}
@@ -130,7 +131,7 @@ sal_Bool SwAccessibleCell::_InvalidateMyCursorPos()
{
// remember that object as the one that has the caret. This is
// neccessary to notify that object if the cursor leaves it.
- ::vos::ORef < SwAccessibleContext > xThis( this );
+ ::rtl::Reference < SwAccessibleContext > xThis( this );
GetMap()->SetCursorContext( xThis );
}
@@ -155,14 +156,14 @@ sal_Bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm )
{
if( rLower.IsAccessible( GetMap()->GetShell()->IsPreView() ) )
{
- ::vos::ORef< SwAccessibleContext > xAccImpl(
+ ::rtl::Reference< SwAccessibleContext > xAccImpl(
GetMap()->GetContextImpl( pLower, sal_False ) );
- if( xAccImpl.isValid() )
+ if( xAccImpl.is() )
{
- ASSERT( xAccImpl->GetFrm()->IsCellFrm(),
- "table child is not a cell frame" )
+ OSL_ENSURE( xAccImpl->GetFrm()->IsCellFrm(),
+ "table child is not a cell frame" );
bChanged |= static_cast< SwAccessibleCell *>(
- xAccImpl.getBodyPtr() )->_InvalidateMyCursorPos();
+ xAccImpl.get() )->_InvalidateMyCursorPos();
}
else
bChanged = sal_True; // If the context is not know we
@@ -185,7 +186,7 @@ void SwAccessibleCell::_InvalidateCursorPos()
{
const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() );
- ASSERT( pParent->IsTabFrm(), "parent is not a tab frame" );
+ OSL_ENSURE( pParent->IsTabFrm(), "parent is not a tab frame" );
const SwTabFrm *pTabFrm = static_cast< const SwTabFrm * >( pParent );
if( pTabFrm->IsFollow() )
pTabFrm = pTabFrm->FindMaster();
@@ -195,9 +196,9 @@ void SwAccessibleCell::_InvalidateCursorPos()
sal_Bool bChanged = _InvalidateChildrenCursorPos( pTabFrm );
if( bChanged )
{
- ::vos::ORef< SwAccessibleContext > xAccImpl(
+ ::rtl::Reference< SwAccessibleContext > xAccImpl(
GetMap()->GetContextImpl( pTabFrm, sal_False ) );
- if( xAccImpl.isValid() )
+ if( xAccImpl.is() )
{
AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
@@ -211,7 +212,7 @@ void SwAccessibleCell::_InvalidateCursorPos()
sal_Bool SwAccessibleCell::HasCursor()
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
return bIsSelected;
}
@@ -254,9 +255,9 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleCell::getSupportedServiceNames()
void SwAccessibleCell::Dispose( sal_Bool bRecursive )
{
const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() );
- ::vos::ORef< SwAccessibleContext > xAccImpl(
+ ::rtl::Reference< SwAccessibleContext > xAccImpl(
GetMap()->GetContextImpl( pParent, sal_False ) );
- if( xAccImpl.isValid() )
+ if( xAccImpl.is() )
xAccImpl->DisposeChild( SwAccessibleChild(GetFrm()), bRecursive );
SwAccessibleContext::Dispose( bRecursive );
}
@@ -264,9 +265,9 @@ void SwAccessibleCell::Dispose( sal_Bool bRecursive )
void SwAccessibleCell::InvalidatePosOrSize( const SwRect& rOldBox )
{
const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() );
- ::vos::ORef< SwAccessibleContext > xAccImpl(
+ ::rtl::Reference< SwAccessibleContext > xAccImpl(
GetMap()->GetContextImpl( pParent, sal_False ) );
- if( xAccImpl.isValid() )
+ if( xAccImpl.is() )
xAccImpl->InvalidateChildPosOrSize( SwAccessibleChild(GetFrm()), rOldBox );
SwAccessibleContext::InvalidatePosOrSize( rOldBox );
}
@@ -308,7 +309,7 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleCell::getTypes()
uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleCell::getImplementationId()
throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -334,7 +335,7 @@ SwFrmFmt* SwAccessibleCell::GetTblBoxFormat() const
uno::Any SwAccessibleCell::getCurrentValue( )
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleValue );
uno::Any aAny;
@@ -345,7 +346,7 @@ uno::Any SwAccessibleCell::getCurrentValue( )
sal_Bool SwAccessibleCell::setCurrentValue( const uno::Any& aNumber )
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleValue );
double fValue = 0;
@@ -373,3 +374,5 @@ uno::Any SwAccessibleCell::getMinimumValue( )
aAny <<= -DBL_MAX;
return aAny;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/acccell.hxx b/sw/source/core/access/acccell.hxx
index db3d7d5fd5cb..0983f8ccc4d1 100644
--- a/sw/source/core/access/acccell.hxx
+++ b/sw/source/core/access/acccell.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -135,3 +136,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index 1b5e66071b84..60b0921324fe 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,14 +39,13 @@
#endif // #if (OSL_DEBUG_LEVEL > 1) && defined TEST_MIB
#include <tools/debug.hxx>
#include <vcl/window.hxx>
-#include <errhdl.hxx>
#include <swtypes.hxx>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
@@ -105,7 +105,7 @@ void SwAccessibleContext::InitStates()
void SwAccessibleContext::SetParent( SwAccessibleContext *pParent )
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
uno::Reference < XAccessible > xParent( pParent );
xWeakParent = xParent;
@@ -113,7 +113,7 @@ void SwAccessibleContext::SetParent( SwAccessibleContext *pParent )
uno::Reference< XAccessible > SwAccessibleContext::GetWeakParent() const
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
uno::Reference< XAccessible > xParent( xWeakParent );
return xParent;
@@ -126,11 +126,11 @@ Window *SwAccessibleContext::GetWindow()
if( GetMap() )
{
const ViewShell *pVSh = GetMap()->GetShell();
- ASSERT( pVSh, "no view shell" );
+ OSL_ENSURE( pVSh, "no view shell" );
if( pVSh )
pWin = pVSh->GetWin();
- ASSERT( pWin, "no window" );
+ OSL_ENSURE( pWin, "no window" );
}
return pWin;
@@ -141,7 +141,7 @@ SwCrsrShell* SwAccessibleContext::GetCrsrShell()
{
SwCrsrShell* pCrsrShell;
ViewShell* pViewShell = GetMap() ? GetMap()->GetShell() : 0;
- ASSERT( pViewShell, "no view shell" );
+ OSL_ENSURE( pViewShell, "no view shell" );
if( pViewShell && pViewShell->ISA( SwCrsrShell ) )
pCrsrShell = static_cast<SwCrsrShell*>( pViewShell );
else
@@ -155,7 +155,7 @@ const SwCrsrShell* SwAccessibleContext::GetCrsrShell() const
// just like non-const GetCrsrShell
const SwCrsrShell* pCrsrShell;
const ViewShell* pViewShell = GetMap() ? GetMap()->GetShell() : 0;
- ASSERT( pViewShell, "no view shell" );
+ OSL_ENSURE( pViewShell, "no view shell" );
if( pViewShell && pViewShell->ISA( SwCrsrShell ) )
pCrsrShell = static_cast<const SwCrsrShell*>( pViewShell );
else
@@ -225,13 +225,13 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
{
if ( rLower.GetSwFrm() )
{
- ASSERT( !rLower.AlwaysIncludeAsChild(),
+ OSL_ENSURE( !rLower.AlwaysIncludeAsChild(),
"<SwAccessibleContext::ChildrenScrolled(..)> - always included child not considered!" );
const SwFrm* pLower( rLower.GetSwFrm() );
- ::vos::ORef< SwAccessibleContext > xAccImpl =
+ ::rtl::Reference< SwAccessibleContext > xAccImpl =
GetMap()->GetContextImpl( pLower, SCROLLED_OUT == eAction ||
SCROLLED_IN == eAction );
- if( xAccImpl.isValid() )
+ if( xAccImpl.is() )
{
switch( eAction )
{
@@ -258,14 +258,14 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
}
else if ( rLower.GetDrawObject() )
{
- ASSERT( !rLower.AlwaysIncludeAsChild(),
+ OSL_ENSURE( !rLower.AlwaysIncludeAsChild(),
"<SwAccessibleContext::ChildrenScrolled(..)> - always included child not considered!" );
- ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+ ::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl =
GetMap()->GetContextImpl( rLower.GetDrawObject(),
this,
SCROLLED_OUT == eAction ||
SCROLLED_IN == eAction );
- if( xAccImpl.isValid() )
+ if( xAccImpl.is() )
{
switch( eAction )
{
@@ -277,7 +277,7 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
break;
case SCROLLED_IN:
ScrolledInShape( rLower.GetDrawObject(),
- xAccImpl.getBodyPtr() );
+ xAccImpl.get() );
break;
case SCROLLED_OUT:
{
@@ -285,7 +285,7 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
::accessibility::IAccessibleViewForwarderListener::VISIBLE_AREA,
GetMap() );
DisposeShape( rLower.GetDrawObject(),
- xAccImpl.getBodyPtr() );
+ xAccImpl.get() );
}
break;
case NONE:
@@ -296,7 +296,7 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
else if ( rLower.GetWindow() )
{
// nothing to do - as such children are always included as children.
- ASSERT( rLower.AlwaysIncludeAsChild(),
+ OSL_ENSURE( rLower.AlwaysIncludeAsChild(),
"<SwAccessibleContext::ChildrenScrolled(..)> - not always included child not considered!" );
}
}
@@ -322,7 +322,7 @@ void SwAccessibleContext::Scrolled( const SwRect& rOldVisArea )
sal_Bool bIsOldShowingState;
sal_Bool bIsNewShowingState = IsShowing( *(GetMap()) );
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
bIsOldShowingState = bIsShowingState;
bIsShowingState = bIsNewShowingState;
}
@@ -346,24 +346,24 @@ void SwAccessibleContext::ScrolledIn()
// This accessible should be freshly created, because it
// was not visisble before. Therefor, its vis area must already
// reflect the scrolling.
- ASSERT( GetVisArea() == GetMap()->GetVisArea(),
+ OSL_ENSURE( GetVisArea() == GetMap()->GetVisArea(),
"Vis area of child is wrong. Did it exist already?" );
// Send child event at parent. That's all we have to do here.
const SwFrm* pParent = GetParent();
- ::vos::ORef< SwAccessibleContext > xParentImpl(
+ ::rtl::Reference< SwAccessibleContext > xParentImpl(
GetMap()->GetContextImpl( pParent, sal_False ) );
uno::Reference < XAccessibleContext > xThis( this );
- if( xParentImpl.isValid() )
+ if( xParentImpl.is() )
{
- SetParent( xParentImpl.getBodyPtr() );
+ SetParent( xParentImpl.get() );
AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::CHILD;
aEvent.NewValue <<= xThis;
xParentImpl->FireAccessibleEvent( aEvent );
- DBG_MSG_PARAM( "AccessibleChild (added)", xChildImpl.getBodyPtr() );
+ DBG_MSG_PARAM( "AccessibleChild (added)", xChildImpl.get() );
if( HasCursor() )
{
@@ -398,7 +398,7 @@ void SwAccessibleContext::ScrolledOut( const SwRect& rOldVisArea )
Dispose( sal_True );
}
-// --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
+// #i27301# - use new type definition for <_nStates>
void SwAccessibleContext::InvalidateChildrenStates( const SwFrm* _pFrm,
tAccessibleStates _nStates )
{
@@ -411,10 +411,10 @@ void SwAccessibleContext::InvalidateChildrenStates( const SwFrm* _pFrm,
const SwFrm* pLower = rLower.GetSwFrm();
if( pLower )
{
- ::vos::ORef< SwAccessibleContext > xAccImpl;
+ ::rtl::Reference< SwAccessibleContext > xAccImpl;
if( rLower.IsAccessible( GetShell()->IsPreView() ) )
xAccImpl = GetMap()->GetContextImpl( pLower, sal_False );
- if( xAccImpl.isValid() )
+ if( xAccImpl.is() )
xAccImpl->InvalidateStates( _nStates );
else
InvalidateChildrenStates( pLower, _nStates );
@@ -444,21 +444,21 @@ void SwAccessibleContext::DisposeChildren( const SwFrm *pFrm,
const SwFrm* pLower = rLower.GetSwFrm();
if( pLower )
{
- ::vos::ORef< SwAccessibleContext > xAccImpl;
+ ::rtl::Reference< SwAccessibleContext > xAccImpl;
if( rLower.IsAccessible( GetShell()->IsPreView() ) )
xAccImpl = GetMap()->GetContextImpl( pLower, sal_False );
- if( xAccImpl.isValid() )
+ if( xAccImpl.is() )
xAccImpl->Dispose( bRecursive );
else if( bRecursive )
DisposeChildren( pLower, bRecursive );
}
else if ( rLower.GetDrawObject() )
{
- ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl(
+ ::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl(
GetMap()->GetContextImpl( rLower.GetDrawObject(),
this, sal_False ) );
- if( xAccImpl.isValid() )
- DisposeShape( rLower.GetDrawObject(), xAccImpl.getBodyPtr() );
+ if( xAccImpl.is() )
+ DisposeShape( rLower.GetDrawObject(), xAccImpl.get() );
}
else if ( rLower.GetWindow() )
{
@@ -482,7 +482,7 @@ void SwAccessibleContext::_InvalidateFocus()
void SwAccessibleContext::FireAccessibleEvent( AccessibleEventObject& rEvent )
{
- ASSERT( GetFrm(), "fire event for diposed frame?" );
+ OSL_ENSURE( GetFrm(), "fire event for diposed frame?" );
if( !GetFrm() )
return;
@@ -523,7 +523,7 @@ void SwAccessibleContext::FireStateChangedEvent( sal_Int16 nState,
void SwAccessibleContext::GetStates(
::utl::AccessibleStateSetHelper& rStateSet )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// SHOWING
if( bIsShowingState )
@@ -551,7 +551,7 @@ sal_Bool SwAccessibleContext::IsEditableState()
{
sal_Bool bRet;
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
bRet = bIsEditableState;
}
@@ -575,7 +575,7 @@ SwAccessibleContext::SwAccessibleContext( SwAccessibleMap *pM,
SwAccessibleContext::~SwAccessibleContext()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
DBG_MSG_CD( "destructed" )
RemoveFrmFromAccessibleMap();
@@ -592,7 +592,7 @@ uno::Reference< XAccessibleContext > SAL_CALL
sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleChildCount( void )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext )
@@ -603,7 +603,7 @@ uno::Reference< XAccessible> SAL_CALL
SwAccessibleContext::getAccessibleChild( sal_Int32 nIndex )
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext )
@@ -620,21 +620,21 @@ uno::Reference< XAccessible> SAL_CALL
uno::Reference< XAccessible > xChild;
if( aChild.GetSwFrm() )
{
- ::vos::ORef < SwAccessibleContext > xChildImpl(
+ ::rtl::Reference < SwAccessibleContext > xChildImpl(
GetMap()->GetContextImpl( aChild.GetSwFrm(), !bDisposing ) );
- if( xChildImpl.isValid() )
+ if( xChildImpl.is() )
{
xChildImpl->SetParent( this );
- xChild = xChildImpl.getBodyPtr();
+ xChild = xChildImpl.get();
}
}
else if ( aChild.GetDrawObject() )
{
- ::vos::ORef < ::accessibility::AccessibleShape > xChildImpl(
+ ::rtl::Reference < ::accessibility::AccessibleShape > xChildImpl(
GetMap()->GetContextImpl( aChild.GetDrawObject(),
this, !bDisposing ) );
- if( xChildImpl.isValid() )
- xChild = xChildImpl.getBodyPtr();
+ if( xChildImpl.is() )
+ xChild = xChildImpl.get();
}
else if ( aChild.GetWindow() )
{
@@ -647,22 +647,22 @@ uno::Reference< XAccessible> SAL_CALL
uno::Reference< XAccessible> SAL_CALL SwAccessibleContext::getAccessibleParent (void)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext )
const SwFrm *pUpper = GetParent();
- ASSERT( pUpper != 0 || bDisposing, "no upper found" );
+ OSL_ENSURE( pUpper != 0 || bDisposing, "no upper found" );
uno::Reference< XAccessible > xAcc;
if( pUpper )
xAcc = GetMap()->GetContext( pUpper, !bDisposing );
- ASSERT( xAcc.is() || bDisposing, "no parent found" );
+ OSL_ENSURE( xAcc.is() || bDisposing, "no parent found" );
// Remember the parent as weak ref.
{
- vos::OGuard aWeakParentGuard( aMutex );
+ osl::MutexGuard aWeakParentGuard( aMutex );
xWeakParent = xAcc;
}
@@ -672,20 +672,20 @@ uno::Reference< XAccessible> SAL_CALL SwAccessibleContext::getAccessibleParent (
sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleIndexInParent (void)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext )
const SwFrm *pUpper = GetParent();
- ASSERT( pUpper != 0 || bDisposing, "no upper found" );
+ OSL_ENSURE( pUpper != 0 || bDisposing, "no upper found" );
sal_Int32 nIndex = -1;
if( pUpper )
{
- ::vos::ORef < SwAccessibleContext > xAccImpl(
+ ::rtl::Reference < SwAccessibleContext > xAccImpl(
GetMap()->GetContextImpl( pUpper, !bDisposing ) );
- ASSERT( xAccImpl.isValid() || bDisposing, "no parent found" );
- if( xAccImpl.isValid() )
+ OSL_ENSURE( xAccImpl.is() || bDisposing, "no parent found" );
+ if( xAccImpl.is() )
nIndex = xAccImpl->GetChildIndex( *(GetMap()), SwAccessibleChild(GetFrm()) );
}
@@ -701,7 +701,7 @@ sal_Int16 SAL_CALL SwAccessibleContext::getAccessibleRole (void)
OUString SAL_CALL SwAccessibleContext::getAccessibleDescription (void)
throw (uno::RuntimeException)
{
- ASSERT( !this, "description needs to be overloaded" );
+ OSL_ENSURE( !this, "description needs to be overloaded" );
THROW_RUNTIME_EXCEPTION( XAccessibleContext, "internal error (method must be overloaded)" );
}
@@ -724,7 +724,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
SwAccessibleContext::getAccessibleStateSet (void)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext )
@@ -740,7 +740,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
lang::Locale SAL_CALL SwAccessibleContext::getLocale (void)
throw (IllegalAccessibleComponentStateException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
lang::Locale aLoc( Application::GetSettings().GetLocale() );
return aLoc;
@@ -754,7 +754,7 @@ void SAL_CALL SwAccessibleContext::addEventListener(
if (xListener.is())
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!nClientId)
nClientId = comphelper::AccessibleEventNotifier::registerClient( );
comphelper::AccessibleEventNotifier::addEventListener( nClientId, xListener );
@@ -769,7 +769,7 @@ void SAL_CALL SwAccessibleContext::removeEventListener(
if (xListener.is())
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( nClientId, xListener );
if ( !nListenerCount )
{
@@ -810,7 +810,7 @@ uno::Reference< XAccessible > SAL_CALL SwAccessibleContext::getAccessibleAtPoint
const awt::Point& aPoint )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleComponent )
@@ -867,12 +867,12 @@ uno::Reference< XAccessible > SAL_CALL SwAccessibleContext::getAccessibleAtPoint
awt::Rectangle SAL_CALL SwAccessibleContext::getBoundsImpl(sal_Bool bRelative)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleComponent )
const SwFrm *pParent = GetParent();
- ASSERT( pParent, "no Parent found" );
+ OSL_ENSURE( pParent, "no Parent found" );
Window *pWin = GetWindow();
CHECK_FOR_WINDOW( XAccessibleComponent, pWin && pParent )
@@ -882,10 +882,10 @@ awt::Rectangle SAL_CALL SwAccessibleContext::getBoundsImpl(sal_Bool bRelative)
if( GetFrm()->IsPageFrm() &&
static_cast < const SwPageFrm * >( GetFrm() )->IsEmptyPage() )
{
- ASSERT( GetShell()->IsPreView(), "empty page accessible?" );
+ OSL_ENSURE( GetShell()->IsPreView(), "empty page accessible?" );
if( GetShell()->IsPreView() )
{
- // OD 15.01.2003 #103492# - adjust method call <GetMap()->GetPreViewPageSize()>
+ // adjust method call <GetMap()->GetPreViewPageSize()>
sal_uInt16 nPageNum =
static_cast < const SwPageFrm * >( GetFrm() )->GetPhyPageNum();
aLogBounds.SSize( GetMap()->GetPreViewPageSize( nPageNum ) );
@@ -953,7 +953,7 @@ awt::Size SAL_CALL SwAccessibleContext::getSize()
void SAL_CALL SwAccessibleContext::grabFocus()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext );
@@ -1015,7 +1015,7 @@ sal_Int32 SAL_CALL SwAccessibleContext::getBackground()
OUString SAL_CALL SwAccessibleContext::getImplementationName()
throw( uno::RuntimeException )
{
- ASSERT( !this, "implementation name needs to be overloaded" );
+ OSL_ENSURE( !this, "implementation name needs to be overloaded" );
THROW_RUNTIME_EXCEPTION( lang::XServiceInfo, "implementation name needs to be overloaded" )
}
@@ -1024,27 +1024,27 @@ sal_Bool SAL_CALL
SwAccessibleContext::supportsService (const ::rtl::OUString& )
throw (uno::RuntimeException)
{
- ASSERT( !this, "supports service needs to be overloaded" );
+ OSL_ENSURE( !this, "supports service needs to be overloaded" );
THROW_RUNTIME_EXCEPTION( lang::XServiceInfo, "supports service needs to be overloaded" )
}
uno::Sequence< OUString > SAL_CALL SwAccessibleContext::getSupportedServiceNames()
throw( uno::RuntimeException )
{
- ASSERT( !this, "supported services names needs to be overloaded" );
+ OSL_ENSURE( !this, "supported services names needs to be overloaded" );
THROW_RUNTIME_EXCEPTION( lang::XServiceInfo, "supported services needs to be overloaded" )
}
void SwAccessibleContext::DisposeShape( const SdrObject *pObj,
::accessibility::AccessibleShape *pAccImpl )
{
- ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl( pAccImpl );
- if( !xAccImpl.isValid() )
+ ::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl( pAccImpl );
+ if( !xAccImpl.is() )
xAccImpl = GetMap()->GetContextImpl( pObj, this, sal_True );
AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::CHILD;
- uno::Reference< XAccessible > xAcc( xAccImpl.getBodyPtr() );
+ uno::Reference< XAccessible > xAcc( xAccImpl.get() );
aEvent.OldValue <<= xAcc;
FireAccessibleEvent( aEvent );
@@ -1078,10 +1078,10 @@ void SwAccessibleContext::ScrolledInShape( const SdrObject* ,
void SwAccessibleContext::Dispose( sal_Bool bRecursive )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
- ASSERT( GetFrm() && GetMap(), "already disposed" );
- ASSERT( GetMap()->GetVisArea() == GetVisArea(),
+ OSL_ENSURE( GetFrm() && GetMap(), "already disposed" );
+ OSL_ENSURE( GetMap()->GetVisArea() == GetVisArea(),
"invalid vis area for dispose" );
bDisposing = sal_True;
@@ -1109,7 +1109,7 @@ void SwAccessibleContext::Dispose( sal_Bool bRecursive )
// set defunc state (its not required to broadcast a state changed
// event if the object is diposed afterwards)
{
- vos::OGuard aDefuncStateGuard( aMutex );
+ osl::MutexGuard aDefuncStateGuard( aMutex );
bIsDefuncState = sal_True;
}
@@ -1131,7 +1131,7 @@ void SwAccessibleContext::Dispose( sal_Bool bRecursive )
void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrmOrObj,
sal_Bool bRecursive )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if ( IsShowing( *(GetMap()), rChildFrmOrObj ) ||
rChildFrmOrObj.AlwaysIncludeAsChild() ||
@@ -1142,18 +1142,18 @@ void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrmOrObj,
// get notified of the movement.
if( rChildFrmOrObj.GetSwFrm() )
{
- ::vos::ORef< SwAccessibleContext > xAccImpl =
+ ::rtl::Reference< SwAccessibleContext > xAccImpl =
GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm(),
sal_True );
xAccImpl->Dispose( bRecursive );
}
else if ( rChildFrmOrObj.GetDrawObject() )
{
- ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+ ::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl =
GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(),
this, sal_True );
DisposeShape( rChildFrmOrObj.GetDrawObject(),
- xAccImpl.getBodyPtr() );
+ xAccImpl.get() );
}
else if ( rChildFrmOrObj.GetWindow() )
{
@@ -1171,14 +1171,14 @@ void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrmOrObj,
void SwAccessibleContext::InvalidatePosOrSize( const SwRect& )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
- ASSERT( GetFrm() && !GetFrm()->Frm().IsEmpty(), "context should have a size" );
+ OSL_ENSURE( GetFrm() && !GetFrm()->Frm().IsEmpty(), "context should have a size" );
sal_Bool bIsOldShowingState;
sal_Bool bIsNewShowingState = IsShowing( *(GetMap()) );
{
- vos::OGuard aShowingStateGuard( aMutex );
+ osl::MutexGuard aShowingStateGuard( aMutex );
bIsOldShowingState = bIsShowingState;
bIsShowingState = bIsNewShowingState;
}
@@ -1210,9 +1210,9 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
const SwAccessibleChild& rChildFrmOrObj,
const SwRect& rOldFrm )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
- ASSERT( !rChildFrmOrObj.GetSwFrm() ||
+ OSL_ENSURE( !rChildFrmOrObj.GetSwFrm() ||
!rChildFrmOrObj.GetSwFrm()->Frm().IsEmpty(),
"child context should have a size" );
@@ -1235,25 +1235,25 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
if( rChildFrmOrObj.GetSwFrm() )
{
// The frame becomes visible. A child event must be send.
- ::vos::ORef< SwAccessibleContext > xAccImpl =
+ ::rtl::Reference< SwAccessibleContext > xAccImpl =
GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm(),
sal_True );
xAccImpl->ScrolledIn();
}
else if ( rChildFrmOrObj.GetDrawObject() )
{
- ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+ ::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl =
GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(),
this, sal_True );
- // --> OD 2004-11-29 #i37790#
- if ( xAccImpl.isValid() )
+ // #i37790#
+ if ( xAccImpl.is() )
{
ScrolledInShape( rChildFrmOrObj.GetDrawObject(),
- xAccImpl.getBodyPtr() );
+ xAccImpl.get() );
}
else
{
- ASSERT( false ,
+ OSL_ENSURE( false ,
"<SwAccessibleContext::InvalidateChildPosOrSize(..)> - no accessible shape found." );
}
// <--
@@ -1278,7 +1278,7 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
{
if( rChildFrmOrObj.GetSwFrm() )
{
- ::vos::ORef< SwAccessibleContext > xAccImpl =
+ ::rtl::Reference< SwAccessibleContext > xAccImpl =
GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm(),
sal_True );
xAccImpl->SetParent( this );
@@ -1286,15 +1286,15 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
}
else if ( rChildFrmOrObj.GetDrawObject() )
{
- ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+ ::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl =
GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(),
this, sal_True );
DisposeShape( rChildFrmOrObj.GetDrawObject(),
- xAccImpl.getBodyPtr() );
+ xAccImpl.get() );
}
else if ( rChildFrmOrObj.GetWindow() )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwAccessibleContext::InvalidateChildPosOrSize(..)> - not expected to handle dispose of child of type <Window>." );
}
}
@@ -1303,26 +1303,26 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
void SwAccessibleContext::InvalidateContent()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
_InvalidateContent( sal_False );
}
void SwAccessibleContext::InvalidateCursorPos()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
_InvalidateCursorPos();
}
void SwAccessibleContext::InvalidateFocus()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
_InvalidateFocus();
}
-// --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
+// #i27301# - use new type definition for <_nStates>
void SwAccessibleContext::InvalidateStates( tAccessibleStates _nStates )
{
if( GetMap() )
@@ -1335,7 +1335,7 @@ void SwAccessibleContext::InvalidateStates( tAccessibleStates _nStates )
sal_Bool bIsOldEditableState;
sal_Bool bIsNewEditableState = IsEditable( pVSh );
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
bIsOldEditableState = bIsEditableState;
bIsEditableState = bIsNewEditableState;
}
@@ -1349,7 +1349,7 @@ void SwAccessibleContext::InvalidateStates( tAccessibleStates _nStates )
sal_Bool bIsOldOpaqueState;
sal_Bool bIsNewOpaqueState = IsOpaque( pVSh );
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
bIsOldOpaqueState = bIsOpaqueState;
bIsOpaqueState = bIsNewOpaqueState;
}
@@ -1373,12 +1373,7 @@ void SwAccessibleContext::InvalidateRelation( sal_uInt16 nType )
FireAccessibleEvent( aEvent );
}
-/** text selection has changed
-
- OD 2005-12-14 #i27301#
-
- @author OD
-*/
+/** #i27301# - text selection has changed */
void SwAccessibleContext::InvalidateTextSelection()
{
AccessibleEventObject aEvent;
@@ -1387,12 +1382,7 @@ void SwAccessibleContext::InvalidateTextSelection()
FireAccessibleEvent( aEvent );
}
-/** attributes has changed
-
- OD 2009-01-06 #i88069#
-
- @author OD
-*/
+/** #i88069# - attributes has changed */
void SwAccessibleContext::InvalidateAttr()
{
AccessibleEventObject aEvent;
@@ -1459,7 +1449,7 @@ OUString SwAccessibleContext::GetResource( sal_uInt16 nResId,
{
String sStr;
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sStr = SW_RES( nResId );
}
@@ -1501,12 +1491,7 @@ bool SwAccessibleContext::HasAdditionalAccessibleChildren()
return bRet;
}
-/** get additional accessible child by index
-
- OD 2010-01-27 #i88070#
-
- @author OD
-*/
+/** #i88070# - get additional accessible child by index */
Window* SwAccessibleContext::GetAdditionalAccessibleChild( const sal_Int32 nIndex )
{
Window* pAdditionalAccessibleChild( 0 );
@@ -1524,12 +1509,7 @@ Window* SwAccessibleContext::GetAdditionalAccessibleChild( const sal_Int32 nInde
return pAdditionalAccessibleChild;
}
-/** get all additional accessible children
-
- OD 2010-01-27 #i88070#
-
- @author OD
-*/
+/** #i88070# - get all additional accessible children */
void SwAccessibleContext::GetAdditionalAccessibleChildren( std::vector< Window* >* pChildren )
{
if ( GetFrm()->IsTxtFrm() )
@@ -1602,3 +1582,5 @@ void lcl_SwAccessibleContext_DbgMsg( SwAccessibleContext *pThisAcc,
aStrm.Flush();
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx
index 8bad4ab9074b..d9fd0e113d55 100644
--- a/sw/source/core/access/acccontext.hxx
+++ b/sw/source/core/access/acccontext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,7 +71,7 @@ class SwAccessibleContext :
protected:
mutable ::osl::Mutex aListenerMutex;
- mutable ::vos::OMutex aMutex;
+ mutable ::osl::Mutex aMutex;
private:
@@ -95,11 +96,9 @@ private:
// Are we currently disposing that object (protected by solar mutex)?
sal_Bool bDisposing : 1;
- // --> OD 2008-03-10 #i85634#
- // boolean, indicating if the accessible context is in general registered at
- // the accessible map.
+ // #i85634# - boolean, indicating if the accessible context is
+ // in general registered at the accessible map.
bool bRegisteredAtAccessibleMap;
- // <--
void InitStates();
@@ -154,7 +153,7 @@ protected:
// Invalidate the states of all children of the specified SwFrm. The
// SwFrm might belong the the current object or to any child or grandchild!
- // --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
+ // #i27301# - use new type definition for <_nStates>
void InvalidateChildrenStates( const SwFrm* _pFrm,
tAccessibleStates _nStates );
// <--
@@ -197,13 +196,12 @@ protected:
getBoundsImpl(sal_Bool bRelative)
throw (::com::sun::star::uno::RuntimeException);
- // --> OD 2008-03-10 #i85634#
+ // #i85634#
inline void NotRegisteredAtAccessibleMap()
{
bRegisteredAtAccessibleMap = false;
}
void RemoveFrmFromAccessibleMap();
- // <--
virtual ~SwAccessibleContext();
@@ -364,48 +362,23 @@ public:
void InvalidateFocus();
// Check states
- // --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
+ // #i27301# - use new type definition for <_nStates>
void InvalidateStates( tAccessibleStates _nStates );
- // <--
// the XAccessibleRelationSet may have changed
void InvalidateRelation( sal_uInt16 nType );
- /** text selection has changed
-
- OD 2005-12-14 #i27301#
-
- @author OD
- */
- void InvalidateTextSelection();
-
- /** attributes has changed
-
- OD 2009-01-06 #i88069#
-
- @author OD
- */
- void InvalidateAttr();
+ void InvalidateTextSelection(); // #i27301# - text selection has changed
+ void InvalidateAttr(); // #i88069# - attributes has changed
bool HasAdditionalAccessibleChildren();
- /** get additional child by index
-
- OD 2010-01-27 #i88070#
-
- @author OD
- */
+ // #i88070# - get additional child by index
Window* GetAdditionalAccessibleChild( const sal_Int32 nIndex );
- /** get all additional accessible children
-
- OD 2010-01-27 #i88070#
-
- @author OD
- */
+ // #i88070# - get all additional accessible children
void GetAdditionalAccessibleChildren( std::vector< Window* >* pChildren );
-
const ::rtl::OUString& GetName() const { return sName; }
virtual sal_Bool HasCursor(); // required by map to remember that object
@@ -457,3 +430,4 @@ const sal_Char sMissingWindow[] = "window is missing";
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 4d9fb4d60e2e..7e13c561bc8b 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,15 +39,13 @@
#include <unotools/accessiblestatesethelper.hxx>
#include <tools/link.hxx>
#include <sfx2/viewsh.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <viewsh.hxx>
#include <doc.hxx>
#include <accmap.hxx>
#include <accdoc.hxx>
-#ifndef _ACCESS_HRC
#include "access.hrc"
-#endif
#include <pagefrm.hxx>
const sal_Char sServiceName[] = "com.sun.star.text.AccessibleTextDocumentView";
@@ -80,27 +79,25 @@ SwAccessibleDocumentBase::~SwAccessibleDocumentBase()
void SwAccessibleDocumentBase::SetVisArea()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwRect aOldVisArea( GetVisArea() );
const SwRect& rNewVisArea = GetMap()->GetVisArea();
if( aOldVisArea != rNewVisArea )
{
SwAccessibleFrame::SetVisArea( GetMap()->GetVisArea() );
- // --> OD 2007-12-07 #i58139#
- // showing state of document view needs also be updated.
+ // #i58139# - showing state of document view needs also be updated.
// Thus, call method <Scrolled(..)> instead of <ChildrenScrolled(..)>
// ChildrenScrolled( GetFrm(), aOldVisArea );
Scrolled( aOldVisArea );
- // <--
}
}
void SwAccessibleDocumentBase::AddChild( Window *pWin, sal_Bool bFireEvent )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
- ASSERT( !mpChildWin, "only one child window is supported" );
+ OSL_ENSURE( !mpChildWin, "only one child window is supported" );
if( !mpChildWin )
{
mpChildWin = pWin;
@@ -117,9 +114,9 @@ void SwAccessibleDocumentBase::AddChild( Window *pWin, sal_Bool bFireEvent )
void SwAccessibleDocumentBase::RemoveChild( Window *pWin )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
- ASSERT( !mpChildWin || pWin == mpChildWin, "invalid child window to remove" );
+ OSL_ENSURE( !mpChildWin || pWin == mpChildWin, "invalid child window to remove" );
if( mpChildWin && pWin == mpChildWin )
{
AccessibleEventObject aEvent;
@@ -134,7 +131,7 @@ void SwAccessibleDocumentBase::RemoveChild( Window *pWin )
sal_Int32 SAL_CALL SwAccessibleDocumentBase::getAccessibleChildCount( void )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// CHECK_FOR_DEFUNC is called by parent
@@ -150,7 +147,7 @@ uno::Reference< XAccessible> SAL_CALL
throw (uno::RuntimeException,
lang::IndexOutOfBoundsException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if( mpChildWin )
{
@@ -174,7 +171,7 @@ uno::Reference< XAccessible> SAL_CALL SwAccessibleDocumentBase::getAccessiblePar
sal_Int32 SAL_CALL SwAccessibleDocumentBase::getAccessibleIndexInParent (void)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference < XAccessibleContext > xAcc( mxParent->getAccessibleContext() );
uno::Reference < XAccessible > xThis( this );
@@ -197,7 +194,7 @@ OUString SAL_CALL SwAccessibleDocumentBase::getAccessibleDescription (void)
awt::Rectangle SAL_CALL SwAccessibleDocumentBase::getBounds()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Window *pWin = GetWindow();
@@ -214,7 +211,7 @@ awt::Rectangle SAL_CALL SwAccessibleDocumentBase::getBounds()
awt::Point SAL_CALL SwAccessibleDocumentBase::getLocation()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Window *pWin = GetWindow();
@@ -230,7 +227,7 @@ awt::Point SAL_CALL SwAccessibleDocumentBase::getLocation()
::com::sun::star::awt::Point SAL_CALL SwAccessibleDocumentBase::getLocationOnScreen()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Window *pWin = GetWindow();
@@ -246,7 +243,7 @@ awt::Point SAL_CALL SwAccessibleDocumentBase::getLocation()
::com::sun::star::awt::Size SAL_CALL SwAccessibleDocumentBase::getSize()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Window *pWin = GetWindow();
@@ -262,7 +259,7 @@ sal_Bool SAL_CALL SwAccessibleDocumentBase::containsPoint(
const awt::Point& aPoint )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Window *pWin = GetWindow();
@@ -279,7 +276,7 @@ uno::Reference< XAccessible > SAL_CALL SwAccessibleDocumentBase::getAccessibleAt
const awt::Point& aPoint )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if( mpChildWin )
{
@@ -339,7 +336,7 @@ SwAccessibleDocument::~SwAccessibleDocument()
void SwAccessibleDocument::Dispose( sal_Bool bRecursive )
{
- ASSERT( GetFrm() && GetMap(), "already disposed" );
+ OSL_ENSURE( GetFrm() && GetMap(), "already disposed" );
Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : 0;
if( pWin )
@@ -450,7 +447,7 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleDocument::getTypes()
uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleDocument::getImplementationId()
throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -505,7 +502,7 @@ uno::Reference<XAccessible> SwAccessibleDocument::getSelectedAccessibleChild(
return maSelectionHelper.getSelectedAccessibleChild(nSelectedChildIndex);
}
-// --> OD 2004-11-16 #111714# - index has to be treated as global child index.
+// index has to be treated as global child index.
void SwAccessibleDocument::deselectAccessibleChild(
sal_Int32 nChildIndex )
throw ( lang::IndexOutOfBoundsException,
@@ -513,3 +510,5 @@ void SwAccessibleDocument::deselectAccessibleChild(
{
maSelectionHelper.deselectAccessibleChild( nChildIndex );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx
index 3e2153876219..2a4e125b7fb4 100644
--- a/sw/source/core/access/accdoc.hxx
+++ b/sw/source/core/access/accdoc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,9 +27,7 @@
************************************************************************/
#ifndef _ACCDOC_HXX
#define _ACCDOC_HXX
-#ifndef _ACCCONTEXT_HXX
#include "acccontext.hxx"
-#endif
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
#include <accselectionhelper.hxx>
@@ -197,7 +196,7 @@ public:
throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
::com::sun::star::uno::RuntimeException);
- // --> OD 2004-11-16 #111714# - index has to be treated as global child index.
+ // index has to be treated as global child index.
virtual void SAL_CALL deselectAccessibleChild(
sal_Int32 nChildIndex )
throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
@@ -211,3 +210,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accembedded.cxx b/sw/source/core/access/accembedded.cxx
index 33a32dc5c9ca..5ccbc03f3339 100644
--- a/sw/source/core/access/accembedded.cxx
+++ b/sw/source/core/access/accembedded.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,7 +86,7 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleEmbeddedObject::getSupportedServi
uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleEmbeddedObject::getImplementationId()
throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -95,3 +96,5 @@ uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleEmbeddedObject::getImplementation
}
return aId;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accembedded.hxx b/sw/source/core/access/accembedded.hxx
index cd7205293ed0..94f8e2d43c20 100644
--- a/sw/source/core/access/accembedded.hxx
+++ b/sw/source/core/access/accembedded.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accfootnote.cxx b/sw/source/core/access/accfootnote.cxx
index 1fb553d58120..2efd6cf6d78f 100644
--- a/sw/source/core/access/accfootnote.cxx
+++ b/sw/source/core/access/accfootnote.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include "precompiled_sw.hxx"
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <unotools/accessiblestatesethelper.hxx>
@@ -41,9 +42,7 @@
#include <viewsh.hxx>
#include <accmap.hxx>
#include "accfootnote.hxx"
-#ifndef _ACCESS_HRC
#include "access.hrc"
-#endif
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -65,7 +64,7 @@ SwAccessibleFootnote::SwAccessibleFootnote(
bIsEndnote ? AccessibleRole::END_NOTE : AccessibleRole::FOOTNOTE,
pFtnFrm )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_uInt16 nResId = bIsEndnote ? STR_ACCESS_ENDNOTE_NAME
: STR_ACCESS_FOOTNOTE_NAME;
@@ -80,7 +79,7 @@ SwAccessibleFootnote::~SwAccessibleFootnote()
OUString SAL_CALL SwAccessibleFootnote::getAccessibleDescription (void)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext )
@@ -139,7 +138,7 @@ Sequence< OUString > SAL_CALL SwAccessibleFootnote::getSupportedServiceNames()
Sequence< sal_Int8 > SAL_CALL SwAccessibleFootnote::getImplementationId()
throw(RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -155,3 +154,5 @@ sal_Bool SwAccessibleFootnote::IsEndnote( const SwFtnFrm *pFtnFrm )
const SwTxtFtn *pTxtFtn = pFtnFrm ->GetAttr();
return pTxtFtn && pTxtFtn->GetFtn().IsEndNote() ;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accfootnote.hxx b/sw/source/core/access/accfootnote.hxx
index 1c7330bc694d..521247685a16 100644
--- a/sw/source/core/access/accfootnote.hxx
+++ b/sw/source/core/access/accfootnote.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,3 +87,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx
index 043e40bb943b..c19c7cf8ef1d 100644
--- a/sw/source/core/access/accframe.cxx
+++ b/sw/source/core/access/accframe.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,6 @@
#include <rootfrm.hxx>
#include <txtfrm.hxx>
#include <sectfrm.hxx>
-#include <pagefrm.hxx>
#include <section.hxx>
#include <viewsh.hxx>
#include <viewopt.hxx>
@@ -254,7 +254,7 @@ SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea,
aRet = GetChildAtPixel( rVisArea, *(rLower.GetSwFrm()), rPixPos,
bInPagePreview, rAccMap );
}
- aRIter++;
+ ++aRIter;
}
}
else
@@ -360,7 +360,7 @@ sal_Bool SwAccessibleFrame::IsEditable( ViewShell *pVSh ) const
if( !pFrm )
return sal_False;
- ASSERT( pVSh, "no view shell" );
+ OSL_ENSURE( pVSh, "no view shell" );
if( pVSh && (pVSh->GetViewOptions()->IsReadonly() ||
pVSh->IsPreView()) )
return sal_False;
@@ -377,7 +377,7 @@ sal_Bool SwAccessibleFrame::IsOpaque( ViewShell *pVSh ) const
if( !aFrm.GetSwFrm() )
return sal_False;
- ASSERT( pVSh, "no view shell" );
+ OSL_ENSURE( pVSh, "no view shell" );
if( !pVSh )
return sal_False;
@@ -396,10 +396,8 @@ sal_Bool SwAccessibleFrame::IsOpaque( ViewShell *pVSh ) const
rBack.GetGraphicPos() != GPOS_NONE )
return sal_True;
- /// OD 20.08.2002 #99657#
- /// If a fly frame has a transparent background color, we have
- /// to consider the background.
- /// But a background color "no fill"/"auto fill" has *not* to be considered.
+ // If a fly frame has a transparent background color, we have to consider the background.
+ // But a background color "no fill"/"auto fill" has *not* to be considered.
if( pFrm->IsFlyFrm() &&
(rBack.GetColor().GetTransparency() != 0) &&
(rBack.GetColor() != COL_TRANSPARENT)
@@ -495,3 +493,4 @@ sal_Bool SwAccessibleFrame::IsShowing( const SwAccessibleMap& rAccMap,
return IsShowing( rFrmOrObj.GetBox( rAccMap ) );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accframe.hxx b/sw/source/core/access/accframe.hxx
index 48da1bdbb9cb..7aa7e42f9e0c 100644
--- a/sw/source/core/access/accframe.hxx
+++ b/sw/source/core/access/accframe.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,8 +52,7 @@ class SwAccessibleFrame
const sal_Bool mbIsInPagePreview;
protected:
- // --> OD 2007-06-29 #i77106#
- // method needs to be called by new class <SwAccessibleTableColHeaders>
+ // #i77106# - method needs to be called by new class <SwAccessibleTableColHeaders>
static sal_Int32 GetChildCount( SwAccessibleMap& rAccMap,
const SwRect& rVisArea,
const SwFrm *pFrm,
@@ -173,3 +173,4 @@ inline const SwFrm *SwAccessibleFrame::GetParent() const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
index 221c7e1650a2..5ab12b068678 100644
--- a/sw/source/core/access/accframebase.cxx
+++ b/sw/source/core/access/accframebase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,7 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <unotools/accessiblestatesethelper.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
#include <frmfmt.hxx>
@@ -89,8 +90,8 @@ void SwAccessibleFrameBase::GetStates(
if( IsSelected() )
{
rStateSet.AddState( AccessibleStateType::SELECTED );
- ASSERT( bIsSelected, "bSelected out of sync" );
- ::vos::ORef < SwAccessibleContext > xThis( this );
+ OSL_ENSURE( bIsSelected, "bSelected out of sync" );
+ ::rtl::Reference < SwAccessibleContext > xThis( this );
GetMap()->SetCursorContext( xThis );
Window *pWin = GetWindow();
@@ -136,7 +137,7 @@ SwAccessibleFrameBase::SwAccessibleFrameBase(
SwAccessibleContext( pInitMap, nInitRole, pFlyFrm ),
bIsSelected( sal_False )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const SwFrmFmt *pFrmFmt = pFlyFrm->GetFmt();
const_cast< SwFrmFmt * >( pFrmFmt )->Add( this );
@@ -152,7 +153,7 @@ void SwAccessibleFrameBase::_InvalidateCursorPos()
sal_Bool bOldSelected;
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
bOldSelected = bIsSelected;
bIsSelected = bNewSelected;
}
@@ -161,7 +162,7 @@ void SwAccessibleFrameBase::_InvalidateCursorPos()
{
// remember that object as the one that has the caret. This is
// neccessary to notify that object if the cursor leaves it.
- ::vos::ORef < SwAccessibleContext > xThis( this );
+ ::rtl::Reference < SwAccessibleContext > xThis( this );
GetMap()->SetCursorContext( xThis );
}
@@ -195,10 +196,10 @@ void SwAccessibleFrameBase::_InvalidateFocus()
sal_Bool bSelected;
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
bSelected = bIsSelected;
}
- ASSERT( bSelected, "focus object should be selected" );
+ OSL_ENSURE( bSelected, "focus object should be selected" );
FireStateChangedEvent( AccessibleStateType::FOCUSED,
pWin->HasFocus() && bSelected );
@@ -207,7 +208,7 @@ void SwAccessibleFrameBase::_InvalidateFocus()
sal_Bool SwAccessibleFrameBase::HasCursor()
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
return bIsSelected;
}
@@ -226,16 +227,16 @@ void SwAccessibleFrameBase::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
if( pFlyFrm )
{
const SwFrmFmt *pFrmFmt = pFlyFrm->GetFmt();
- ASSERT( pFrmFmt == GetRegisteredIn(), "invalid frame" );
+ OSL_ENSURE( pFrmFmt == GetRegisteredIn(), "invalid frame" );
OUString sOldName( GetName() );
- ASSERT( !pOld ||
+ OSL_ENSURE( !pOld ||
static_cast < SwStringMsgPoolItem * >( pOld )->GetString() == String( sOldName ),
"invalid old name" );
const String& rNewName = pFrmFmt->GetName();
SetName( rNewName );
- ASSERT( !pNew ||
+ OSL_ENSURE( !pNew ||
static_cast < SwStringMsgPoolItem * >( pNew )->GetString() == rNewName,
"invalid new name" );
@@ -268,10 +269,12 @@ void SwAccessibleFrameBase::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
void SwAccessibleFrameBase::Dispose( sal_Bool bRecursive )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if( GetRegisteredIn() )
pRegisteredIn->Remove( this );
SwAccessibleContext::Dispose( bRecursive );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accframebase.hxx b/sw/source/core/access/accframebase.hxx
index faa4bb492697..4f0b17d0898e 100644
--- a/sw/source/core/access/accframebase.hxx
+++ b/sw/source/core/access/accframebase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,3 +71,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
index 47b4007c1496..1e72847fbe3f 100644
--- a/sw/source/core/access/accfrmobj.cxx
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,7 +98,7 @@ SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm,
{
Init( pWindow );
}
- ASSERT( (!pFrm || pFrm == mpFrm) &&
+ OSL_ENSURE( (!pFrm || pFrm == mpFrm) &&
(!pDrawObj || pDrawObj == mpDrawObj) &&
(!pWindow || pWindow == mpWindow),
"invalid frame/object/window combination" );
@@ -346,7 +347,7 @@ 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 ),
+ OSL_ENSURE( SwAccessibleChild( pParent ).IsAccessible( bInPagePreview ),
"parent is not accessible" );
}
else
@@ -373,16 +374,16 @@ const SwFrm* SwAccessibleChild::GetParent( const sal_Bool bInPagePreview ) const
{
const SwDrawContact *pContact =
static_cast< const SwDrawContact* >( GetUserCall( mpDrawObj ) );
- ASSERT( pContact, "sdr contact is missing" );
+ OSL_ENSURE( pContact, "sdr contact is missing" );
if( pContact )
{
const SwFrmFmt *pFrmFmt = pContact->GetFmt();
- ASSERT( pFrmFmt, "frame format is missing" );
+ OSL_ENSURE( 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 ),
+ OSL_ENSURE( SwAccessibleChild( pParent ).IsAccessible( bInPagePreview ),
"parent is not accessible" );
}
@@ -426,3 +427,4 @@ const SwFrm* SwAccessibleChild::GetParent( const sal_Bool bInPagePreview ) const
} } // eof of namespace sw::access
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accfrmobj.hxx b/sw/source/core/access/accfrmobj.hxx
index 76113c62eae3..8b196711277e 100644
--- a/sw/source/core/access/accfrmobj.hxx
+++ b/sw/source/core/access/accfrmobj.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,10 +74,7 @@ class SwAccessibleChild
SwRect GetBounds( const SwAccessibleMap& rAccMap ) const;
/** indicating, if accessible child is included even, if the corresponding
- object is not visible.
-
- @author OD
- */
+ object is not visible. */
bool AlwaysIncludeAsChild() const;
private:
@@ -93,3 +91,5 @@ class SwAccessibleChild
} } // eof of namespace sw::access
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx
index 11834ee89963..e7fd8644da77 100644
--- a/sw/source/core/access/accfrmobjmap.cxx
+++ b/sw/source/core/access/accfrmobjmap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,7 +71,7 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea,
if ( rFrm.IsPageFrm() )
{
- ASSERT( bVisibleChildrenOnly, "page frame within tab frame???" );
+ OSL_ENSURE( bVisibleChildrenOnly, "page frame within tab frame???" );
const SwPageFrm *pPgFrm =
static_cast< const SwPageFrm * >( &rFrm );
const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs();
@@ -105,11 +106,11 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea,
}
{
- ::vos::ORef < SwAccessibleContext > xAccImpl =
+ ::rtl::Reference < SwAccessibleContext > xAccImpl =
rAccMap.GetContextImpl( &rFrm, sal_False );
- if( xAccImpl.isValid() )
+ if( xAccImpl.is() )
{
- SwAccessibleContext* pAccImpl = xAccImpl.getBodyPtr();
+ SwAccessibleContext* pAccImpl = xAccImpl.get();
if ( pAccImpl &&
pAccImpl->HasAdditionalAccessibleChildren() )
{
@@ -166,3 +167,5 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea,
( rFrm.IsTxtFrm() &&
rFrm.GetDrawObjs() );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx
index 91365ed9c258..441202e6acb9 100644
--- a/sw/source/core/access/accfrmobjmap.hxx
+++ b/sw/source/core/access/accfrmobjmap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -94,3 +95,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accfrmobjslist.cxx b/sw/source/core/access/accfrmobjslist.cxx
index 2f3e8399187a..846e06a0435c 100644
--- a/sw/source/core/access/accfrmobjslist.cxx
+++ b/sw/source/core/access/accfrmobjslist.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,11 +73,11 @@ SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator(
}
if ( !aCurr.IsValid() )
{
- ::vos::ORef < SwAccessibleContext > xAccImpl =
+ ::rtl::Reference < SwAccessibleContext > xAccImpl =
rAccMap.GetContextImpl( &rFrm, sal_False );
- if( xAccImpl.isValid() )
+ if( xAccImpl.is() )
{
- SwAccessibleContext* pAccImpl = xAccImpl.getBodyPtr();
+ SwAccessibleContext* pAccImpl = xAccImpl.get();
aCurr = SwAccessibleChild( pAccImpl->GetAdditionalAccessibleChild( 0 ) );
++nNextObj;
}
@@ -138,11 +139,11 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::ne
}
if ( !aCurr.IsValid() )
{
- ::vos::ORef < SwAccessibleContext > xAccImpl =
+ ::rtl::Reference < SwAccessibleContext > xAccImpl =
rList.GetAccMap().GetContextImpl( &rFrm, sal_False );
- if( xAccImpl.isValid() )
+ if( xAccImpl.is() )
{
- SwAccessibleContext* pAccImpl = xAccImpl.getBodyPtr();
+ SwAccessibleContext* pAccImpl = xAccImpl.get();
aCurr = SwAccessibleChild( pAccImpl->GetAdditionalAccessibleChild( nNextObj - nObjsCount ) );
++nNextObj;
}
@@ -171,3 +172,4 @@ SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::op
return rList.IsVisibleChildrenOnly() ? next_visible() : next();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accfrmobjslist.hxx b/sw/source/core/access/accfrmobjslist.hxx
index f81cfc85a9d7..78052177fbac 100644
--- a/sw/source/core/access/accfrmobjslist.hxx
+++ b/sw/source/core/access/accfrmobjslist.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -143,3 +144,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accgraphic.cxx b/sw/source/core/access/accgraphic.cxx
index 40888f4b3738..4c389e2f85c1 100644
--- a/sw/source/core/access/accgraphic.cxx
+++ b/sw/source/core/access/accgraphic.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,7 +86,7 @@ Sequence< OUString > SAL_CALL SwAccessibleGraphic::getSupportedServiceNames()
Sequence< sal_Int8 > SAL_CALL SwAccessibleGraphic::getImplementationId()
throw(RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -95,3 +96,5 @@ Sequence< sal_Int8 > SAL_CALL SwAccessibleGraphic::getImplementationId()
}
return aId;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accgraphic.hxx b/sw/source/core/access/accgraphic.hxx
index aa64ee0df7e1..18c0f67b68dc 100644
--- a/sw/source/core/access/accgraphic.hxx
+++ b/sw/source/core/access/accgraphic.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accheaderfooter.cxx b/sw/source/core/access/accheaderfooter.cxx
index dada1083c810..6472f75e9fe5 100644
--- a/sw/source/core/access/accheaderfooter.cxx
+++ b/sw/source/core/access/accheaderfooter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include "precompiled_sw.hxx"
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <unotools/accessiblestatesethelper.hxx>
@@ -37,9 +38,7 @@
#include <vcl/svapp.hxx>
#include <hffrm.hxx>
#include "accheaderfooter.hxx"
-#ifndef _ACCESS_HRC
#include "access.hrc"
-#endif
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
@@ -57,7 +56,7 @@ SwAccessibleHeaderFooter::SwAccessibleHeaderFooter(
const SwHeaderFrm* pHdFrm ) :
SwAccessibleContext( pInitMap, AccessibleRole::HEADER, pHdFrm )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
OUString sArg( OUString::valueOf( (sal_Int32)pHdFrm->GetPhyPageNum() ) );
SetName( GetResource( STR_ACCESS_HEADER_NAME, &sArg ) );
@@ -68,7 +67,7 @@ SwAccessibleHeaderFooter::SwAccessibleHeaderFooter(
const SwFooterFrm* pFtFrm ) :
SwAccessibleContext( pInitMap, AccessibleRole::FOOTER, pFtFrm )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
OUString sArg( OUString::valueOf( (sal_Int32)pFtFrm->GetPhyPageNum() ) );
SetName( GetResource( STR_ACCESS_FOOTER_NAME, &sArg ) );
@@ -81,7 +80,7 @@ SwAccessibleHeaderFooter::~SwAccessibleHeaderFooter()
OUString SAL_CALL SwAccessibleHeaderFooter::getAccessibleDescription (void)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext )
@@ -133,7 +132,7 @@ Sequence< OUString > SAL_CALL SwAccessibleHeaderFooter::getSupportedServiceNames
Sequence< sal_Int8 > SAL_CALL SwAccessibleHeaderFooter::getImplementationId()
throw(RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -143,3 +142,5 @@ Sequence< sal_Int8 > SAL_CALL SwAccessibleHeaderFooter::getImplementationId()
}
return aId;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accheaderfooter.hxx b/sw/source/core/access/accheaderfooter.hxx
index 8a0bbb84b6e5..210657e7602a 100644
--- a/sw/source/core/access/accheaderfooter.hxx
+++ b/sw/source/core/access/accheaderfooter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,9 +27,7 @@
************************************************************************/
#ifndef _ACCHEADERFOOTER_HXX
#define _ACCHEADERFOOTER_HXX
-#ifndef _ACCCONTEXT_HXX
#include "acccontext.hxx"
-#endif
class SwHeaderFrm;
class SwFooterFrm;
@@ -83,3 +82,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/acchyperlink.cxx b/sw/source/core/access/acchyperlink.cxx
index 6d252488c792..6b239b04e0e2 100644
--- a/sw/source/core/access/acchyperlink.cxx
+++ b/sw/source/core/access/acchyperlink.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include "precompiled_sw.hxx"
#include <comphelper/accessiblekeybindinghelper.hxx>
#include <swurl.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <ndtxt.hxx>
#include <txtinet.hxx>
@@ -52,7 +53,7 @@ SwAccessibleHyperlink::SwAccessibleHyperlink( sal_uInt16 nHPos,
const SwTxtAttr *SwAccessibleHyperlink::GetTxtAttr() const
{
const SwTxtAttr *pTxtAttr = 0;
- if( xPara.isValid() && xPara->GetMap() )
+ if( xPara.is() && xPara->GetMap() )
{
const SwTxtNode *pTxtNd = xPara->GetTxtNode();
const SwpHints *pHints = pTxtNd->GetpSwpHints();
@@ -78,7 +79,7 @@ sal_Int32 SAL_CALL SwAccessibleHyperlink::getAccessibleActionCount()
sal_Bool SAL_CALL SwAccessibleHyperlink::doAccessibleAction( sal_Int32 nIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
@@ -93,7 +94,7 @@ sal_Bool SAL_CALL SwAccessibleHyperlink::doAccessibleAction( sal_Int32 nIndex )
{
LoadURL( rINetFmt.GetValue(), pVSh, URLLOAD_NOFILTER,
&rINetFmt.GetTargetFrame() );
- ASSERT( pTxtAttr == rINetFmt.GetTxtINetFmt(),
+ OSL_ENSURE( pTxtAttr == rINetFmt.GetTxtINetFmt(),
"lost my txt attr" );
const SwTxtINetFmt* pTxtAttr2 = rINetFmt.GetTxtINetFmt();
if( pTxtAttr2 )
@@ -178,13 +179,14 @@ sal_Int32 SAL_CALL SwAccessibleHyperlink::getEndIndex()
sal_Bool SAL_CALL SwAccessibleHyperlink::isValid( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
- return xPara.isValid();
+ SolarMutexGuard aGuard;
+ return xPara.is();
}
void SwAccessibleHyperlink::Invalidate()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
xPara = 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/acchyperlink.hxx b/sw/source/core/access/acchyperlink.hxx
index ed81feb9deb3..ecbaff3ec383 100644
--- a/sw/source/core/access/acchyperlink.hxx
+++ b/sw/source/core/access/acchyperlink.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,7 @@
#ifndef _ACCHYPERLINK_HXX
#define _ACCHYPERLINK_HXX
#include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
#include <cppuhelper/implbase1.hxx>
#include <fmtinfmt.hxx>
@@ -41,7 +42,7 @@ class SwAccessibleHyperlink :
friend class SwAccessibleParagraph;
friend class SwAccessibleHyperTextData;
sal_uInt16 nHintPos;
- ::vos::ORef< SwAccessibleParagraph > xPara;
+ ::rtl::Reference< SwAccessibleParagraph > xPara;
sal_Int32 nStartIdx;
sal_Int32 nEndIdx;
@@ -89,3 +90,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/acchypertextdata.cxx b/sw/source/core/access/acchypertextdata.cxx
index 5a6193489255..2e233522aa64 100644
--- a/sw/source/core/access/acchypertextdata.cxx
+++ b/sw/source/core/access/acchypertextdata.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,5 @@ SwAccessibleHyperTextData::~SwAccessibleHyperTextData()
++aIter;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/acchypertextdata.hxx b/sw/source/core/access/acchypertextdata.hxx
index fde1809fef1b..d3d49e4e211b 100644
--- a/sw/source/core/access/acchypertextdata.hxx
+++ b/sw/source/core/access/acchypertextdata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,3 +50,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index df33bbeaf2fa..3ca75ead3523 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include "precompiled_sw.hxx"
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
#include <cppuhelper/weakref.hxx>
#include <vcl/window.hxx>
#include <svx/svdmodel.hxx>
@@ -68,12 +69,9 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <cppuhelper/implbase1.hxx>
-// OD 15.01.2003 #103492#
#include <pagepreviewlayout.hxx>
-// --> OD 2005-12-13 #i27301#
#include <pam.hxx>
#include <ndtxt.hxx>
-// <--
#include <dflyobj.hxx>
#include <prevwpage.hxx>
@@ -97,12 +95,12 @@ class SwAccessibleContextMap_Impl: public _SwAccessibleContextMap_Impl
{
public:
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool mbLocked;
#endif
SwAccessibleContextMap_Impl()
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
: mbLocked( sal_False )
#endif
{}
@@ -157,10 +155,6 @@ void SwDrawModellListener_Impl::Notify( SfxBroadcaster& /*rBC*/,
{
// do not broadcast notifications for writer fly frames, because there
// are no shapes that need to know about them.
- // OD 01.07.2003 #110554# - correct condition in order not to broadcast
- // notifications for writer fly frames.
- // OD 01.07.2003 #110554# - do not broadcast notifications for plane
- // <SdrObject>objects
const SdrHint *pSdrHint = PTR_CAST( SdrHint, &rHint );
if ( !pSdrHint ||
( pSdrHint->GetObject() &&
@@ -171,7 +165,7 @@ void SwDrawModellListener_Impl::Notify( SfxBroadcaster& /*rBC*/,
return;
}
- ASSERT( mpDrawModel, "draw model listener is disposed" );
+ OSL_ENSURE( mpDrawModel, "draw model listener is disposed" );
if( !mpDrawModel )
return;
@@ -215,7 +209,7 @@ struct SwShapeFunc
}
};
typedef ::std::map < const SdrObject *, uno::WeakReference < XAccessible >, SwShapeFunc > _SwAccessibleShapeMap_Impl;
-typedef ::std::pair < const SdrObject *, ::vos::ORef < ::accessibility::AccessibleShape > > SwAccessibleObjShape_Impl;
+typedef ::std::pair < const SdrObject *, ::rtl::Reference < ::accessibility::AccessibleShape > > SwAccessibleObjShape_Impl;
class SwAccessibleShapeMap_Impl: public _SwAccessibleShapeMap_Impl
@@ -224,22 +218,20 @@ class SwAccessibleShapeMap_Impl: public _SwAccessibleShapeMap_Impl
public:
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool mbLocked;
#endif
SwAccessibleShapeMap_Impl( SwAccessibleMap *pMap )
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
: mbLocked( sal_False )
#endif
{
maInfo.SetSdrView( pMap->GetShell()->GetDrawView() );
maInfo.SetWindow( pMap->GetShell()->GetWin() );
maInfo.SetViewForwarder( pMap );
- // --> OD 2005-08-08 #i52858# - method name changed
uno::Reference < document::XEventBroadcaster > xModelBroadcaster =
new SwDrawModellListener_Impl(
pMap->GetShell()->getIDocumentDrawModelAccess()->GetOrCreateDrawModel() );
- // <--
maInfo.SetControllerBroadcaster( xModelBroadcaster );
}
@@ -304,7 +296,7 @@ SwAccessibleObjShape_Impl
}
++aIter;
}
- ASSERT( pSelShape == pShape, "copying shapes went wrong!" );
+ OSL_ENSURE( pSelShape == pShape, "copying shapes went wrong!" );
}
if( pSelStart )
@@ -333,9 +325,7 @@ private:
// the same as xAcc for any other
// event type
EventType meType; // The event type
- // --> OD 2005-12-12 #i27301# - use new type definition for <mnStates>
tAccessibleStates mnStates; // check states or update caret pos
- // <--
SwAccessibleEvent_Impl& operator==( const SwAccessibleEvent_Impl& );
@@ -355,7 +345,7 @@ public:
meType( eT ),
mnStates( 0 )
{
- ASSERT( SwAccessibleEvent_Impl::DISPOSE == meType,
+ OSL_ENSURE( SwAccessibleEvent_Impl::DISPOSE == meType,
"wrong event constructor, DISPOSE only" );
}
@@ -363,7 +353,7 @@ public:
: meType( eT ),
mnStates( 0 )
{
- ASSERT( SwAccessibleEvent_Impl::SHAPE_SELECTION == meType,
+ OSL_ENSURE( SwAccessibleEvent_Impl::SHAPE_SELECTION == meType,
"wrong event constructor, SHAPE_SELECTION only" );
}
@@ -377,12 +367,11 @@ public:
meType( eT ),
mnStates( 0 )
{
- ASSERT( SwAccessibleEvent_Impl::CHILD_POS_CHANGED == meType ||
+ OSL_ENSURE( SwAccessibleEvent_Impl::CHILD_POS_CHANGED == meType ||
SwAccessibleEvent_Impl::POS_CHANGED == meType,
"wrong event constructor, (CHILD_)POS_CHANGED only" );
}
- // --> OD 2005-12-12 #i27301# - use new type definition for parameter <_nStates>
SwAccessibleEvent_Impl( EventType eT,
SwAccessibleContext *pA,
const SwAccessibleChild& rFrmOrObj,
@@ -392,7 +381,7 @@ public:
meType( eT ),
mnStates( _nStates )
{
- ASSERT( SwAccessibleEvent_Impl::CARET_OR_STATES == meType,
+ OSL_ENSURE( SwAccessibleEvent_Impl::CARET_OR_STATES == meType,
"wrong event constructor, CARET_OR_STATES only" );
}
@@ -406,10 +395,10 @@ public:
return meType;
}
- inline ::vos::ORef < SwAccessibleContext > GetContext() const
+ inline ::rtl::Reference < SwAccessibleContext > GetContext() const
{
uno::Reference < XAccessible > xTmp( mxAcc );
- ::vos::ORef < SwAccessibleContext > xAccImpl(
+ ::rtl::Reference < SwAccessibleContext > xAccImpl(
static_cast<SwAccessibleContext*>( xTmp.get() ) );
return xAccImpl;
@@ -431,12 +420,10 @@ public:
}
// <SetStates(..)> only used in method <SwAccessibleMap::AppendEvent(..)>
- // --> OD 2005-12-12 #i27301# - use new type definition for parameter <_nStates>
inline void SetStates( tAccessibleStates _nStates )
{
mnStates |= _nStates;
}
- // <--
inline sal_Bool IsUpdateCursorPos() const
{
@@ -450,32 +437,26 @@ public:
{
return (mnStates & ACC_STATE_RELATION_MASK) != 0;
}
- // --> OD 2005-12-12 #i27301# - new event TEXT_SELECTION_CHANGED
inline sal_Bool IsInvalidateTextSelection() const
{
return ( mnStates & ACC_STATE_TEXT_SELECTION_CHANGED ) != 0;
}
- // <--
- // --> OD 2009-01-07 #i88069# - new event TEXT_ATTRIBUTE_CHANGED
+
inline sal_Bool IsInvalidateTextAttrs() const
{
return ( mnStates & ACC_STATE_TEXT_ATTRIBUTE_CHANGED ) != 0;
}
- // <--
- // --> OD 2005-12-12 #i27301# - use new type definition <tAccessibleStates>
- // for return value
+
inline tAccessibleStates GetStates() const
{
return mnStates & ACC_STATE_MASK;
}
- // <--
- // --> OD 2005-12-12 #i27301# - use new type definition <tAccessibleStates>
- // for return value
+
inline tAccessibleStates GetAllStates() const
{
return mnStates;
}
- // <--
+
};
//------------------------------------------------------------------------------
@@ -550,9 +531,7 @@ class SwAccessibleEventMap_Impl: public _SwAccessibleEventMap_Impl
};
//------------------------------------------------------------------------------
-// --> OD 2005-12-13 #i27301# - map containing the accessible paragraph, which
-// have a selection. Needed to keep this information to submit corresponding
-// TEXT_SELECTION_CHANGED events.
+
struct SwAccessibleParaSelection
{
xub_StrLen nStartOfSelection;
@@ -580,7 +559,6 @@ typedef ::std::map< uno::WeakReference < XAccessible >,
class SwAccessibleSelectedParas_Impl: public _SwAccessibleSelectedParas_Impl
{};
-// <--
// helper class that stores preview data
class SwAccPreviewData
@@ -596,10 +574,6 @@ 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.
@@ -620,16 +594,12 @@ 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;
@@ -640,7 +610,6 @@ 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;
@@ -658,8 +627,6 @@ 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,
@@ -709,12 +676,10 @@ 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;
- ASSERT( mpSelPage, "selected page not found" );
+ OSL_ENSURE( mpSelPage, "selected page not found" );
}
struct ContainsPredicate
@@ -761,12 +726,7 @@ void SwAccPreviewData::DisposePage(const SwPageFrm *pPageFrm )
mpSelPage = 0;
}
-/** adjust logic page retangle to its visible part
-
- OD 17.01.2003 #103492#
-
- @author OD
-*/
+// adjust logic page retangle to its visible part
void SwAccPreviewData::AdjustLogicPgRectToVisibleArea(
SwRect& _iorLogicPgSwRect,
const SwRect& _rPrevwPgSwRect,
@@ -830,20 +790,18 @@ static sal_Bool AreInSameTable( const uno::Reference< XAccessible >& rAcc,
void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent )
{
- ::vos::ORef < SwAccessibleContext > xAccImpl( rEvent.GetContext() );
+ ::rtl::Reference < SwAccessibleContext > xAccImpl( rEvent.GetContext() );
if( SwAccessibleEvent_Impl::SHAPE_SELECTION == rEvent.GetType() )
{
DoInvalidateShapeSelection();
}
- else if( xAccImpl.isValid() && xAccImpl->GetFrm() )
+ else if( xAccImpl.is() && xAccImpl->GetFrm() )
{
- // --> OD 2009-01-07 #i88069#
if ( rEvent.GetType() != SwAccessibleEvent_Impl::DISPOSE &&
rEvent.IsInvalidateTextAttrs() )
{
xAccImpl->InvalidateAttr();
}
- // <--
switch( rEvent.GetType() )
{
case SwAccessibleEvent_Impl::INVALID_CONTENT:
@@ -857,14 +815,12 @@ void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent )
rEvent.GetOldBox() );
break;
case SwAccessibleEvent_Impl::DISPOSE:
- ASSERT( xAccImpl.isValid(),
+ OSL_ENSURE( xAccImpl.is(),
"dispose event has been stored" );
break;
- // --> OD 2009-01-06 #i88069#
case SwAccessibleEvent_Impl::INVALID_ATTR:
// nothing to do here - handled above
break;
- // <--
default:
break;
}
@@ -876,7 +832,6 @@ void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent )
xAccImpl->InvalidateStates( rEvent.GetStates() );
if( rEvent.IsInvalidateRelation() )
{
- // --> OD 2005-12-01 #i27138#
// both events CONTENT_FLOWS_FROM_RELATION_CHANGED and
// CONTENT_FLOWS_TO_RELATION_CHANGED are possible
if ( rEvent.GetAllStates() & ACC_STATE_RELATION_FROM )
@@ -889,21 +844,19 @@ void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent )
xAccImpl->InvalidateRelation(
AccessibleEventId::CONTENT_FLOWS_TO_RELATION_CHANGED );
}
- // <--
}
- // --> OD 2005-12-12 #i27301# - submit event TEXT_SELECTION_CHANGED
+
if ( rEvent.IsInvalidateTextSelection() )
{
xAccImpl->InvalidateTextSelection();
}
- // <--
}
}
}
void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent )
{
- vos::OGuard aGuard( maEventMutex );
+ osl::MutexGuard aGuard( maEventMutex );
if( !mpEvents )
mpEvents = new SwAccessibleEventList_Impl;
@@ -914,7 +867,7 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent )
{
// While events are fired new ones are generated. They have to be fired
// now. This does not work for DISPOSE events!
- ASSERT( rEvent.GetType() != SwAccessibleEvent_Impl::DISPOSE,
+ OSL_ENSURE( rEvent.GetType() != SwAccessibleEvent_Impl::DISPOSE,
"dispose event while firing events" );
FireEvent( rEvent );
}
@@ -926,7 +879,7 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent )
if( aIter != mpEventMap->end() )
{
SwAccessibleEvent_Impl aEvent( *(*aIter).second );
- ASSERT( aEvent.GetType() != SwAccessibleEvent_Impl::DISPOSE,
+ OSL_ENSURE( aEvent.GetType() != SwAccessibleEvent_Impl::DISPOSE,
"dispose events should not be stored" );
sal_Bool bAppendEvent = sal_True;
switch( rEvent.GetType() )
@@ -935,7 +888,7 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent )
// A CARET_OR_STATES event is added to any other
// event only. It is broadcasted after any other event, so the
// event should be put to the back.
- ASSERT( aEvent.GetType() != SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
+ OSL_ENSURE( aEvent.GetType() != SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
"invalid event combination" );
aEvent.SetStates( rEvent.GetAllStates() );
break;
@@ -945,7 +898,7 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent )
// POS_CHANGED event.
// Therefor, the event's type has to be adapted and the event
// has to be put at the end.
- ASSERT( aEvent.GetType() != SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
+ OSL_ENSURE( aEvent.GetType() != SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
"invalid event combination" );
if( aEvent.GetType() == SwAccessibleEvent_Impl::CARET_OR_STATES )
aEvent.SetType( SwAccessibleEvent_Impl::INVALID_CONTENT );
@@ -955,7 +908,7 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent )
// flags) as well as INVALID_CONTENT. The old box position
// has to be stored however if the old event is not a
// POS_CHANGED itself.
- ASSERT( aEvent.GetType() != SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
+ OSL_ENSURE( aEvent.GetType() != SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
"invalid event combination" );
if( aEvent.GetType() != SwAccessibleEvent_Impl::POS_CHANGED )
aEvent.SetOldBox( rEvent.GetOldBox() );
@@ -966,11 +919,11 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent )
// events. The only action that needs to be done again is
// to put the old event to the back. The new one cannot be used,
// because we are interested in the old frame bounds.
- ASSERT( aEvent.GetType() == SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
+ OSL_ENSURE( aEvent.GetType() == SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
"invalid event combination" );
break;
case SwAccessibleEvent_Impl::SHAPE_SELECTION:
- ASSERT( aEvent.GetType() == SwAccessibleEvent_Impl::SHAPE_SELECTION,
+ OSL_ENSURE( aEvent.GetType() == SwAccessibleEvent_Impl::SHAPE_SELECTION,
"invalid event combination" );
break;
case SwAccessibleEvent_Impl::DISPOSE:
@@ -980,12 +933,10 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent )
// remove all events for the frame in question.
bAppendEvent = sal_False;
break;
- // --> OD 2009-01-06 #i88069#
case SwAccessibleEvent_Impl::INVALID_ATTR:
- ASSERT( aEvent.GetType() == SwAccessibleEvent_Impl::INVALID_ATTR,
+ OSL_ENSURE( aEvent.GetType() == SwAccessibleEvent_Impl::INVALID_ATTR,
"invalid event combination" );
break;
- // <--
}
if( bAppendEvent )
{
@@ -1012,8 +963,8 @@ void SwAccessibleMap::InvalidateCursorPosition(
{
SwAccessibleContext *pAccImpl =
static_cast< SwAccessibleContext *>( rAcc.get() );
- ASSERT( pAccImpl, "no caret context" );
- ASSERT( pAccImpl->GetFrm(), "caret context is disposed" );
+ OSL_ENSURE( pAccImpl, "no caret context" );
+ OSL_ENSURE( pAccImpl->GetFrm(), "caret context is disposed" );
if( GetShell()->ActionPend() )
{
SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES,
@@ -1061,7 +1012,7 @@ void SwAccessibleMap::DoInvalidateShapeSelection()
sal_uInt16 nSelShapes = pFESh ? pFESh->IsObjSelected() : 0;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( mpShapeMap )
pShapes = mpShapeMap->Copy( nShapes, pFESh, &pSelShape );
}
@@ -1074,7 +1025,7 @@ void SwAccessibleMap::DoInvalidateShapeSelection()
SwAccessibleObjShape_Impl *pShape = pShapes;
while( nShapes )
{
- if( pShape->second.isValid() )
+ if( pShape->second.is() )
{
sal_Bool bChanged;
if( pShape >= pSelShape )
@@ -1110,9 +1061,9 @@ void SwAccessibleMap::DoInvalidateShapeSelection()
::std::list< const SwFrm * >::const_iterator aEndIter = aParents.end();
while( aIter != aEndIter )
{
- ::vos::ORef< SwAccessibleContext > xParentAccImpl;
+ ::rtl::Reference< SwAccessibleContext > xParentAccImpl;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( mpFrmMap )
{
SwAccessibleContextMap_Impl::const_iterator aMapIter =
@@ -1125,7 +1076,7 @@ void SwAccessibleMap::DoInvalidateShapeSelection()
}
}
}
- if( xParentAccImpl.isValid() )
+ if( xParentAccImpl.is() )
{
AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
@@ -1156,7 +1107,7 @@ void SwAccessibleMap::DoInvalidateShapeFocus()
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( mpShapeMap )
pShapes = mpShapeMap->Copy( nShapes, pFESh, &pSelShape );
}
@@ -1168,7 +1119,7 @@ void SwAccessibleMap::DoInvalidateShapeFocus()
SwAccessibleObjShape_Impl *pShape = pShapes;
while( nShapes )
{
- if( pShape->second.isValid() )
+ if( pShape->second.is() )
{
if( bFocused && pShape >= pSelShape )
pShape->second->SetState( AccessibleStateType::FOCUSED );
@@ -1191,9 +1142,7 @@ SwAccessibleMap::SwAccessibleMap( ViewShell *pSh ) :
mpShapes( 0 ),
mpEvents( 0 ),
mpEventMap( 0 ),
- // --> OD 2005-12-13 #i27301#
mpSelectedParas( 0 ),
- // <--
mpVSh( pSh ),
mpPreview( 0 ),
mnPara( 1 ),
@@ -1208,7 +1157,7 @@ SwAccessibleMap::~SwAccessibleMap()
{
uno::Reference < XAccessible > xAcc;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( mpFrmMap )
{
const SwRootFrm *pRootFrm = GetShell()->GetLayout();
@@ -1225,9 +1174,9 @@ SwAccessibleMap::~SwAccessibleMap()
pAcc->Dispose( sal_True );
{
- vos::OGuard aGuard( maMutex );
-#ifdef DBG_UTIL
- ASSERT( !mpFrmMap || mpFrmMap->empty(),
+ osl::MutexGuard aGuard( maMutex );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( !mpFrmMap || mpFrmMap->empty(),
"Frame map should be empty after disposing the root frame" );
if( mpFrmMap )
{
@@ -1244,7 +1193,7 @@ SwAccessibleMap::~SwAccessibleMap()
++aIter;
}
}
- ASSERT( !mpShapeMap || mpShapeMap->empty(),
+ OSL_ENSURE( !mpShapeMap || mpShapeMap->empty(),
"Object map should be empty after disposing the root frame" );
if( mpShapeMap )
{
@@ -1268,19 +1217,17 @@ SwAccessibleMap::~SwAccessibleMap()
mpShapeMap = 0;
delete mpShapes;
mpShapes = 0;
- // --> OD 2005-12-13 #i27301#
delete mpSelectedParas;
mpSelectedParas = 0;
- // <--
}
delete mpPreview;
mpPreview = NULL;
{
- vos::OGuard aGuard( maEventMutex );
-#ifdef DBG_UTIL
- ASSERT( !(mpEvents || mpEventMap), "pending events" );
+ osl::MutexGuard aGuard( maEventMutex );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( !(mpEvents || mpEventMap), "pending events" );
if( mpEvents )
{
SwAccessibleEventList_Impl::iterator aIter = mpEvents->begin();
@@ -1313,18 +1260,18 @@ uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView(
sal_Bool bSetVisArea = sal_False;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( !mpFrmMap )
{
mpFrmMap = new SwAccessibleContextMap_Impl;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
mpFrmMap->mbLocked = sal_False;
#endif
}
-#ifdef DBG_UTIL
- ASSERT( !mpFrmMap->mbLocked, "Map is locked" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( !mpFrmMap->mbLocked, "Map is locked" );
mpFrmMap->mbLocked = sal_True;
#endif
@@ -1355,7 +1302,7 @@ uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView(
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
mpFrmMap->mbLocked = sal_False;
#endif
}
@@ -1375,8 +1322,6 @@ uno::Reference< XAccessible > SwAccessibleMap::GetDocumentView( )
return _GetDocumentView( sal_False );
}
-// OD 14.01.2003 #103492# - complete re-factoring of method due to new page/print
-// preview functionality.
uno::Reference<XAccessible> SwAccessibleMap::GetDocumentPreview(
const std::vector<PrevwPage*>& _rPrevwPages,
const Fraction& _rScale,
@@ -1400,7 +1345,7 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm,
sal_Bool bOldShapeSelected = sal_False;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( !mpFrmMap && bCreate )
mpFrmMap = new SwAccessibleContextMap_Impl;
@@ -1473,7 +1418,7 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm,
}
xAcc = pAcc;
- ASSERT( xAcc.is(), "unknown frame type" );
+ OSL_ENSURE( xAcc.is(), "unknown frame type" );
if( xAcc.is() )
{
if( aIter != mpFrmMap->end() )
@@ -1523,13 +1468,13 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm,
return xAcc;
}
-::vos::ORef < SwAccessibleContext > SwAccessibleMap::GetContextImpl(
+::rtl::Reference < SwAccessibleContext > SwAccessibleMap::GetContextImpl(
const SwFrm *pFrm,
sal_Bool bCreate )
{
uno::Reference < XAccessible > xAcc( GetContext( pFrm, bCreate ) );
- ::vos::ORef < SwAccessibleContext > xAccImpl(
+ ::rtl::Reference < SwAccessibleContext > xAccImpl(
static_cast< SwAccessibleContext * >( xAcc.get() ) );
return xAccImpl;
@@ -1544,7 +1489,7 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext(
uno::Reference < XAccessible > xOldCursorAcc;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( !mpShapeMap && bCreate )
mpShapeMap = new SwAccessibleShapeMap_Impl( this );
@@ -1574,7 +1519,7 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext(
}
xAcc = pAcc;
- ASSERT( xAcc.is(), "unknown shape type" );
+ OSL_ENSURE( xAcc.is(), "unknown shape type" );
if( xAcc.is() )
{
pAcc->Init();
@@ -1601,14 +1546,14 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext(
return xAcc;
}
-::vos::ORef < ::accessibility::AccessibleShape > SwAccessibleMap::GetContextImpl(
+::rtl::Reference < ::accessibility::AccessibleShape > SwAccessibleMap::GetContextImpl(
const SdrObject *pObj,
SwAccessibleContext *pParentImpl,
sal_Bool bCreate )
{
uno::Reference < XAccessible > xAcc( GetContext( pObj, pParentImpl, bCreate ) );
- ::vos::ORef < ::accessibility::AccessibleShape > xAccImpl(
+ ::rtl::Reference < ::accessibility::AccessibleShape > xAccImpl(
static_cast< ::accessibility::AccessibleShape* >( xAcc.get() ) );
return xAccImpl;
@@ -1617,7 +1562,7 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext(
void SwAccessibleMap::RemoveContext( const SwFrm *pFrm )
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( mpFrmMap )
{
@@ -1635,7 +1580,7 @@ void SwAccessibleMap::RemoveContext( const SwFrm *pFrm )
{
SwAccessibleContext *pOldAccImpl =
static_cast< SwAccessibleContext *>( xOldAcc.get() );
- ASSERT( pOldAccImpl->GetFrm(), "old caret context is disposed" );
+ OSL_ENSURE( pOldAccImpl->GetFrm(), "old caret context is disposed" );
if( pOldAccImpl->GetFrm() == pFrm )
{
xOldAcc.clear(); // get an empty ref
@@ -1654,7 +1599,7 @@ void SwAccessibleMap::RemoveContext( const SwFrm *pFrm )
void SwAccessibleMap::RemoveContext( const SdrObject *pObj )
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( mpShapeMap )
{
@@ -1689,17 +1634,17 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm,
// because that's the one that is evaluated in the layout. The frame
// might not be accessible anyway. That's the case for cell frames that
// contain further cells.
- ASSERT( !aFrmOrObj.GetSwFrm() || aFrmOrObj.GetSwFrm()->IsAccessibleFrm(),
+ OSL_ENSURE( !aFrmOrObj.GetSwFrm() || aFrmOrObj.GetSwFrm()->IsAccessibleFrm(),
"non accessible frame should be disposed" );
if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
{
- ::vos::ORef< SwAccessibleContext > xAccImpl;
- ::vos::ORef< SwAccessibleContext > xParentAccImpl;
- ::vos::ORef< ::accessibility::AccessibleShape > xShapeAccImpl;
+ ::rtl::Reference< SwAccessibleContext > xAccImpl;
+ ::rtl::Reference< SwAccessibleContext > xParentAccImpl;
+ ::rtl::Reference< ::accessibility::AccessibleShape > xShapeAccImpl;
// get accessible context for frame
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
// First of all look for an accessible context for a frame
if( aFrmOrObj.GetSwFrm() && mpFrmMap )
@@ -1713,7 +1658,7 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm,
static_cast< SwAccessibleContext *>( xAcc.get() );
}
}
- if( !xAccImpl.isValid() && mpFrmMap )
+ if( !xAccImpl.is() && mpFrmMap )
{
// If there is none, look if the parent is accessible.
const SwFrm *pParent =
@@ -1732,7 +1677,7 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm,
}
}
}
- if( !xParentAccImpl.isValid() && !aFrmOrObj.GetSwFrm() &&
+ if( !xParentAccImpl.is() && !aFrmOrObj.GetSwFrm() &&
mpShapeMap )
{
SwAccessibleShapeMap_Impl::iterator aIter =
@@ -1745,7 +1690,7 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm,
}
}
if( pObj && GetShell()->ActionPend() &&
- (xParentAccImpl.isValid() || xShapeAccImpl.isValid()) )
+ (xParentAccImpl.is() || xShapeAccImpl.is()) )
{
// Keep a reference to the XShape to avoid that it
// is deleted with a SwFrmFmt::Modify.
@@ -1763,7 +1708,7 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm,
// remove events stored for the frame
{
- vos::OGuard aGuard( maEventMutex );
+ osl::MutexGuard aGuard( maEventMutex );
if( mpEvents )
{
SwAccessibleEventMap_Impl::iterator aIter =
@@ -1781,11 +1726,11 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm,
// the frame. If the frame is no context for it but disposing should
// take place recursive, the frame's children have to be disposed
// anyway, so we have to create the context then.
- if( xAccImpl.isValid() )
+ if( xAccImpl.is() )
{
xAccImpl->Dispose( bRecursive );
}
- else if( xParentAccImpl.isValid() )
+ else if( xParentAccImpl.is() )
{
// If the frame is a cell frame, the table must be notified.
// If we are in an action, a table model change event will
@@ -1794,7 +1739,7 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm,
xParentAccImpl->DisposeChild( aFrmOrObj, bRecursive );
}
- else if( xShapeAccImpl.isValid() )
+ else if( xShapeAccImpl.is() )
{
RemoveContext( aFrmOrObj.GetDrawObject() );
xShapeAccImpl->dispose();
@@ -1813,10 +1758,10 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
SwAccessibleChild aFrmOrObj( pFrm, pObj, pWindow );
if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
{
- ::vos::ORef< SwAccessibleContext > xAccImpl;
- ::vos::ORef< SwAccessibleContext > xParentAccImpl;
+ ::rtl::Reference< SwAccessibleContext > xAccImpl;
+ ::rtl::Reference< SwAccessibleContext > xParentAccImpl;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( mpFrmMap )
{
@@ -1833,7 +1778,7 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
static_cast< SwAccessibleContext *>( xAcc.get() );
}
}
- if( !xAccImpl.isValid() )
+ if( !xAccImpl.is() )
{
// Otherwise we look if the parent is accessible.
// If not, there is nothing to do.
@@ -1856,12 +1801,12 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
}
}
- if( xAccImpl.isValid() )
+ if( xAccImpl.is() )
{
if( GetShell()->ActionPend() )
{
SwAccessibleEvent_Impl aEvent(
- SwAccessibleEvent_Impl::POS_CHANGED, xAccImpl.getBodyPtr(),
+ SwAccessibleEvent_Impl::POS_CHANGED, xAccImpl.get(),
aFrmOrObj, rOldBox );
AppendEvent( aEvent );
}
@@ -1871,13 +1816,13 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
xAccImpl->InvalidatePosOrSize( rOldBox );
}
}
- else if( xParentAccImpl.isValid() )
+ else if( xParentAccImpl.is() )
{
if( GetShell()->ActionPend() )
{
SwAccessibleEvent_Impl aEvent(
SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
- xParentAccImpl.getBodyPtr(), aFrmOrObj, rOldBox );
+ xParentAccImpl.get(), aFrmOrObj, rOldBox );
AppendEvent( aEvent );
}
else
@@ -1897,7 +1842,7 @@ void SwAccessibleMap::InvalidateContent( const SwFrm *pFrm )
{
uno::Reference < XAccessible > xAcc;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( mpFrmMap )
{
@@ -1928,7 +1873,6 @@ void SwAccessibleMap::InvalidateContent( const SwFrm *pFrm )
}
}
-// --> OD 2009-01-06 #i88069#
void SwAccessibleMap::InvalidateAttr( const SwTxtFrm& rTxtFrm )
{
SwAccessibleChild aFrmOrObj( &rTxtFrm );
@@ -1936,7 +1880,7 @@ void SwAccessibleMap::InvalidateAttr( const SwTxtFrm& rTxtFrm )
{
uno::Reference < XAccessible > xAcc;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( mpFrmMap )
{
@@ -1966,7 +1910,6 @@ void SwAccessibleMap::InvalidateAttr( const SwTxtFrm& rTxtFrm )
}
}
}
-// <--
void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm )
{
@@ -1983,16 +1926,15 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm )
}
else if( pVSh->ISA( SwFEShell ) )
{
- sal_uInt16 nObjCount;
const SwFEShell *pFESh = static_cast< const SwFEShell * >( pVSh );
const SwFrm *pFlyFrm = pFESh->GetCurrFlyFrm();
if( pFlyFrm )
{
- ASSERT( !pFrm || pFrm->FindFlyFrm() == pFlyFrm,
+ OSL_ENSURE( !pFrm || pFrm->FindFlyFrm() == pFlyFrm,
"cursor is not contained in fly frame" );
aFrmOrObj = pFlyFrm;
}
- else if( (nObjCount = pFESh->IsObjSelected()) > 0 )
+ else if( pFESh->IsObjSelected() > 0 )
{
bShapeSelected = sal_True;
aFrmOrObj = static_cast<const SwFrm *>( 0 );
@@ -2000,7 +1942,7 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm )
}
}
- ASSERT( bShapeSelected || aFrmOrObj.IsAccessible(GetShell()->IsPreView()),
+ OSL_ENSURE( bShapeSelected || aFrmOrObj.IsAccessible(GetShell()->IsPreView()),
"frame is not accessible" );
uno::Reference < XAccessible > xOldAcc;
@@ -2008,7 +1950,7 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm )
sal_Bool bOldShapeSelected = sal_False;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
xOldAcc = mxCursorContext;
mxCursorContext = xAcc; // clear reference
@@ -2065,7 +2007,7 @@ void SwAccessibleMap::InvalidateFocus()
uno::Reference < XAccessible > xAcc;
sal_Bool bShapeSelected;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
xAcc = mxCursorContext;
bShapeSelected = mbShapeSelected;
@@ -2084,14 +2026,13 @@ void SwAccessibleMap::InvalidateFocus()
}
void SwAccessibleMap::SetCursorContext(
- const ::vos::ORef < SwAccessibleContext >& rCursorContext )
+ const ::rtl::Reference < SwAccessibleContext >& rCursorContext )
{
- vos::OGuard aGuard( maMutex );
- uno::Reference < XAccessible > xAcc( rCursorContext.getBodyPtr() );
+ osl::MutexGuard aGuard( maMutex );
+ uno::Reference < XAccessible > xAcc( rCursorContext.get() );
mxCursorContext = xAcc;
}
-// --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
void SwAccessibleMap::InvalidateStates( tAccessibleStates _nStates,
const SwFrm* _pFrm )
{
@@ -2120,7 +2061,6 @@ void SwAccessibleMap::InvalidateStates( tAccessibleStates _nStates,
pAccImpl->InvalidateStates( _nStates );
}
}
-// <--
void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm,
sal_Bool bFrom )
@@ -2131,7 +2071,7 @@ void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm,
{
uno::Reference < XAccessible > xAcc;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( mpFrmMap )
{
@@ -2176,24 +2116,14 @@ void SwAccessibleMap::InvalidateRelationSet( const SwFrm* pMaster,
_InvalidateRelationSet( pFollow, sal_True );
}
-/** invalidation CONTENT_FLOW_FROM/_TO relation of a paragraph
-
- OD 2005-12-01 #i27138#
-
- @author OD
-*/
+// invalidation of CONTENT_FLOW_FROM/_TO relation of a paragraph
void SwAccessibleMap::InvalidateParaFlowRelation( const SwTxtFrm& _rTxtFrm,
const bool _bFrom )
{
_InvalidateRelationSet( &_rTxtFrm, _bFrom );
}
-/** invalidation of text selection of a paragraph
-
- OD 2005-12-12 #i27301#
-
- @author OD
-*/
+// invalidation of text selection of a paragraph
void SwAccessibleMap::InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm )
{
// first, see if this frame is accessible, and if so, get the respective
@@ -2202,7 +2132,7 @@ void SwAccessibleMap::InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm )
{
uno::Reference < XAccessible > xAcc;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( mpFrmMap )
{
@@ -2248,7 +2178,7 @@ sal_Int32 SwAccessibleMap::GetChildIndex( const SwFrm& rParentFrm,
{
uno::Reference < XAccessible > xAcc;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( mpFrmMap )
{
@@ -2274,9 +2204,6 @@ sal_Int32 SwAccessibleMap::GetChildIndex( const SwFrm& rParentFrm,
return nIndex;
}
-
-// OD 15.01.2003 #103492# - complete re-factoring of method due to new page/print
-// preview functionality.
void SwAccessibleMap::UpdatePreview( const std::vector<PrevwPage*>& _rPrevwPages,
const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm,
@@ -2285,20 +2212,19 @@ void SwAccessibleMap::UpdatePreview( const std::vector<PrevwPage*>& _rPrevwPages
DBG_ASSERT( GetShell()->IsPreView(), "no preview?" );
DBG_ASSERT( mpPreview != NULL, "no preview data?" );
- // OD 15.01.2003 #103492# - adjustments for changed method signature
mpPreview->Update( *this, _rPrevwPages, _rScale, _pSelectedPageFrm, _rPrevwWinSize );
// propagate change of VisArea through the document's
// accessibility tree; this will also send appropriate scroll
// events
SwAccessibleContext* pDoc =
- GetContextImpl( GetShell()->GetLayout() ).getBodyPtr();
+ GetContextImpl( GetShell()->GetLayout() ).get();
static_cast<SwAccessibleDocumentBase*>( pDoc )->SetVisArea();
uno::Reference < XAccessible > xOldAcc;
uno::Reference < XAccessible > xAcc;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
xOldAcc = mxCursorContext;
@@ -2323,13 +2249,12 @@ void SwAccessibleMap::InvalidatePreViewSelection( sal_uInt16 nSelPage )
DBG_ASSERT( GetShell()->IsPreView(), "no preview?" );
DBG_ASSERT( mpPreview != NULL, "no preview data?" );
- // OD 16.01.2003 #103492# - changed metthod call due to method signature change.
mpPreview->InvalidateSelection( GetShell()->GetLayout()->GetPageByPageNum( nSelPage ) );
uno::Reference < XAccessible > xOldAcc;
uno::Reference < XAccessible > xAcc;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
xOldAcc = mxCursorContext;
@@ -2359,7 +2284,7 @@ sal_Bool SwAccessibleMap::IsPageSelected( const SwPageFrm *pPageFrm ) const
void SwAccessibleMap::FireEvents()
{
{
- vos::OGuard aGuard( maEventMutex );
+ osl::MutexGuard aGuard( maEventMutex );
if( mpEvents )
{
mpEvents->SetFiring();
@@ -2378,7 +2303,7 @@ void SwAccessibleMap::FireEvents()
}
}
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( mpShapes )
{
delete mpShapes;
@@ -2413,7 +2338,6 @@ Point SwAccessibleMap::LogicToPixel( const Point& rPoint ) const
Window *pWin = GetShell()->GetWin();
if( pWin )
{
- // OD 16.01.2003 #103492# - get mapping mode for LogicToPixel conversion
MapMode aMapMode;
GetMapMode( aPoint, aMapMode );
aPoint = pWin->LogicToPixel( aPoint, aMapMode );
@@ -2430,7 +2354,6 @@ Size SwAccessibleMap::LogicToPixel( const Size& rSize ) const
Size aSize( OutputDevice::LogicToLogic( rSize, aSrc, aDest ) );
if( GetShell()->GetWin() )
{
- // OD 16.01.2003 #103492# - get mapping mode for LogicToPixel conversion
MapMode aMapMode;
GetMapMode( Point(0,0), aMapMode );
aSize = GetShell()->GetWin()->LogicToPixel( aSize, aMapMode );
@@ -2446,7 +2369,6 @@ Point SwAccessibleMap::PixelToLogic( const Point& rPoint ) const
if( pWin )
{
aPoint = pWin->ScreenToOutputPixel( rPoint );
- // OD 16.01.2003 #103492# - get mapping mode for PixelToLogic conversion
MapMode aMapMode;
GetMapMode( aPoint, aMapMode );
aPoint = pWin->PixelToLogic( aPoint, aMapMode );
@@ -2463,7 +2385,6 @@ Size SwAccessibleMap::PixelToLogic( const Size& rSize ) const
Size aSize;
if( GetShell()->GetWin() )
{
- // OD 16.01.2003 #103492# - get mapping mode for PixelToLogic conversion
MapMode aMapMode;
GetMapMode( Point(0,0), aMapMode );
aSize = GetShell()->GetWin()->PixelToLogic( rSize, aMapMode );
@@ -2484,7 +2405,7 @@ sal_Bool SwAccessibleMap::ReplaceChild (
{
const SdrObject *pObj = 0;
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( mpShapeMap )
{
SwAccessibleShapeMap_Impl::const_iterator aIter = mpShapeMap->begin();
@@ -2514,7 +2435,7 @@ sal_Bool SwAccessibleMap::ReplaceChild (
Dispose( 0, pObj, 0 );
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if( !mpShapeMap )
mpShapeMap = new SwAccessibleShapeMap_Impl( this );
@@ -2558,7 +2479,6 @@ Point SwAccessibleMap::PixelToCore( const Point& rPoint ) const
Point aPoint;
if( GetShell()->GetWin() )
{
- // OD 15.01.2003 #103492# - replace <PreviewAdjust(..)> by <GetMapMode(..)>
MapMode aMapMode;
GetMapMode( rPoint, aMapMode );
aPoint = GetShell()->GetWin()->PixelToLogic( rPoint, aMapMode );
@@ -2604,7 +2524,6 @@ Rectangle SwAccessibleMap::CoreToPixel( const Rectangle& rRect ) const
Rectangle aRect;
if( GetShell()->GetWin() )
{
- // OD 15.01.2003 #103492# - replace <PreviewAdjust(..)> by <GetMapMode(..)>
MapMode aMapMode;
GetMapMode( rRect.TopLeft(), aMapMode );
aRect = GetShell()->GetWin()->LogicToPixel( rRect, aMapMode );
@@ -2618,15 +2537,11 @@ Rectangle SwAccessibleMap::CoreToPixel( const Rectangle& rRect ) const
/** get mapping mode for LogicToPixel and PixelToLogic conversions
- OD 15.01.2003 #103492#
- Replacement method <PreviewAdjust(..)> by new method <GetMapMode>.
Method returns mapping mode of current output device and adjusts it,
if the shell is in page/print preview.
Necessary, because <PreviewAdjust(..)> changes mapping mode at current
output device for mapping logic document positions to page preview window
positions and vice versa and doesn't take care to recover its changes.
-
- @author OD
*/
void SwAccessibleMap::GetMapMode( const Point& _rPoint,
MapMode& _orMapMode ) const
@@ -2641,12 +2556,6 @@ void SwAccessibleMap::GetMapMode( const Point& _rPoint,
_orMapMode = aMapMode;
}
-/** get size of a dedicated preview page
-
- OD 15.01.2003 #103492#
-
- @author OD
-*/
Size SwAccessibleMap::GetPreViewPageSize( sal_uInt16 _nPrevwPageNum ) const
{
DBG_ASSERT( mpVSh->IsPreView(), "no page preview accessible." );
@@ -2664,11 +2573,7 @@ Size SwAccessibleMap::GetPreViewPageSize( sal_uInt16 _nPrevwPageNum ) const
/** method to build up a new data structure of the accessible pararaphs,
which have a selection
-
- OD 2005-12-13 #i27301#
Important note: method has to used inside a mutual exclusive section
-
- @author OD
*/
SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas()
{
@@ -2727,7 +2632,7 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas()
pFrm;
pFrm = (SwFrm*)aIter.Next() )
{
- ASSERT( dynamic_cast<SwTxtFrm*>(pFrm),
+ OSL_ENSURE( dynamic_cast<SwTxtFrm*>(pFrm),
"<SwAccessibleMap::_BuildSelectedParas()> - unexpected frame type" );
SwTxtFrm* pTxtFrm( dynamic_cast<SwTxtFrm*>(pFrm) );
if ( pTxtFrm )
@@ -2767,15 +2672,9 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas()
return pRetSelectedParas;
}
-/** invalidation of text selection of all paragraphs
-
- OD 2005-12-13 #i27301#
-
- @author OD
-*/
void SwAccessibleMap::InvalidateTextSelectionOfAllParas()
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
// keep previously known selected paragraphs
SwAccessibleSelectedParas_Impl* pPrevSelectedParas( mpSelectedParas );
@@ -2828,13 +2727,13 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas()
uno::Reference < XAccessible > xAcc( (*aIter).first );
if ( xAcc.is() )
{
- ::vos::ORef < SwAccessibleContext > xAccImpl(
+ ::rtl::Reference < SwAccessibleContext > xAccImpl(
static_cast<SwAccessibleContext*>( xAcc.get() ) );
- if ( xAccImpl.isValid() && xAccImpl->GetFrm() )
+ if ( xAccImpl.is() && xAccImpl->GetFrm() )
{
const SwTxtFrm* pTxtFrm(
dynamic_cast<const SwTxtFrm*>(xAccImpl->GetFrm()) );
- ASSERT( pTxtFrm,
+ OSL_ENSURE( pTxtFrm,
"<SwAccessibleMap::_SubmitTextSelectionChangedEvents()> - unexcepted type of frame" );
if ( pTxtFrm )
{
@@ -2856,13 +2755,13 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas()
uno::Reference < XAccessible > xAcc( (*aIter).first );
if ( xAcc.is() )
{
- ::vos::ORef < SwAccessibleContext > xAccImpl(
+ ::rtl::Reference < SwAccessibleContext > xAccImpl(
static_cast<SwAccessibleContext*>( xAcc.get() ) );
- if ( xAccImpl.isValid() && xAccImpl->GetFrm() )
+ if ( xAccImpl.is() && xAccImpl->GetFrm() )
{
const SwTxtFrm* pTxtFrm(
dynamic_cast<const SwTxtFrm*>(xAccImpl->GetFrm()) );
- ASSERT( pTxtFrm,
+ OSL_ENSURE( pTxtFrm,
"<SwAccessibleMap::_SubmitTextSelectionChangedEvents()> - unexcepted type of frame" );
if ( pTxtFrm )
{
@@ -2886,3 +2785,4 @@ const SwRect& SwAccessibleMap::GetVisArea() const
: GetShell()->VisArea();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index fea47cb212e5..86910db5aa07 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include "precompiled_sw.hxx"
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
@@ -39,9 +40,7 @@
#include <ndnotxt.hxx>
#include <flyfrm.hxx>
#include <cntfrm.hxx>
-// --> OD 2009-07-14 #i73249#
-#include <hints.hxx>
-// <--
+#include <hints.hxx> //#i73249#
#include "accnotextframe.hxx"
using namespace ::com::sun::star;
@@ -72,7 +71,7 @@ SwAccessibleNoTextFrame::SwAccessibleNoTextFrame(
msDesc()
{
const SwNoTxtNode* pNd = GetNoTxtNode();
- // --> OD 2009-07-14 #i73249#
+ // #i73249#
// consider new attributes Title and Description
if( pNd )
{
@@ -95,7 +94,7 @@ SwAccessibleNoTextFrame::~SwAccessibleNoTextFrame()
void SwAccessibleNoTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
- // --> OD 2009-07-14 #i73249#
+ // #i73249#
// suppress handling of RES_NAME_CHANGED in case that attribute Title is
// used as the accessible name.
if ( nWhich != RES_NAME_CHANGED ||
@@ -105,10 +104,10 @@ void SwAccessibleNoTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
}
const SwNoTxtNode *pNd = GetNoTxtNode();
- ASSERT( pNd == aDepend.GetRegisteredIn(), "invalid frame" );
+ OSL_ENSURE( pNd == aDepend.GetRegisteredIn(), "invalid frame" );
switch( nWhich )
{
- // --> OD 2009-07-14 #i73249#
+ // #i73249#
case RES_TITLE_CHANGED:
{
const String& sOldTitle(
@@ -157,26 +156,12 @@ void SwAccessibleNoTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
break;
- // <--
- /*
- case RES_OBJECTDYING:
- if( aDepend.GetRegisteredIn() ==
- static_cast< SwModify *>( static_cast< SwPtrMsgPoolItem * >( pOld )->pObject ) )
- const_cast < SwModify *>( aDepend.GetRegisteredIn()->Remove( aDepend );
- break;
-
- case RES_FMT_CHG:
- if( static_cast< SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
- static_cast< SwFmtChg * >(pOld)->pChangedFmt->IsFmtInDTOR() )
- pRegisteredIn->Remove( this );
- break;
- */
}
}
void SwAccessibleNoTextFrame::Dispose( sal_Bool bRecursive )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if( aDepend.GetRegisteredIn() )
const_cast < SwModify *>( aDepend.GetRegisteredIn() )->Remove( &aDepend );
@@ -184,11 +169,11 @@ void SwAccessibleNoTextFrame::Dispose( sal_Bool bRecursive )
SwAccessibleFrameBase::Dispose( bRecursive );
}
-// --> OD 2009-07-14 #i73249#
+// #i73249#
OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleName (void)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext )
@@ -204,7 +189,7 @@ OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleName (void)
OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleDescription (void)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext )
@@ -273,3 +258,5 @@ sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageWidth( )
{
return getSize().Width;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accnotextframe.hxx b/sw/source/core/access/accnotextframe.hxx
index 6e070c6dd864..f5e3e536d11a 100644
--- a/sw/source/core/access/accnotextframe.hxx
+++ b/sw/source/core/access/accnotextframe.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,9 +37,7 @@ class SwAccessibleNoTextFrame : public SwAccessibleFrameBase,
public ::com::sun::star::accessibility::XAccessibleImage
{
SwDepend aDepend;
- // --> OD 2009-07-14 #i73249#
- ::rtl::OUString msTitle;
- // <--
+ ::rtl::OUString msTitle; // #i73249#
::rtl::OUString msDesc;
protected:
@@ -57,8 +56,7 @@ public:
//===== XAccessibleContext ==============================================
- // --> OD 2009-07-14 #i73249#
- /// Return the object's current name.
+ // #i73249# - Return the object's current name.
virtual ::rtl::OUString SAL_CALL
getAccessibleName (void)
throw (::com::sun::star::uno::RuntimeException);
@@ -108,3 +106,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accpage.cxx b/sw/source/core/access/accpage.cxx
index d5feca2e0ba9..2b5886e026d2 100644
--- a/sw/source/core/access/accpage.cxx
+++ b/sw/source/core/access/accpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,9 +38,7 @@
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include "accpage.hxx"
-#ifndef _ACCESS_HRC
#include "access.hrc"
-#endif
#include <pagefrm.hxx>
using namespace ::com::sun::star;
@@ -70,8 +69,8 @@ void SwAccessiblePage::GetStates(
// FOCUSED
if( IsSelected() )
{
- ASSERT( bIsSelected, "bSelected out of sync" );
- ::vos::ORef < SwAccessibleContext > xThis( this );
+ OSL_ENSURE( bIsSelected, "bSelected out of sync" );
+ ::rtl::Reference < SwAccessibleContext > xThis( this );
GetMap()->SetCursorContext( xThis );
Window *pWin = GetWindow();
@@ -86,7 +85,7 @@ void SwAccessiblePage::_InvalidateCursorPos()
sal_Bool bOldSelected;
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
bOldSelected = bIsSelected;
bIsSelected = bNewSelected;
}
@@ -95,7 +94,7 @@ void SwAccessiblePage::_InvalidateCursorPos()
{
// remember that object as the one that has the caret. This is
// neccessary to notify that object if the cursor leaves it.
- ::vos::ORef < SwAccessibleContext > xThis( this );
+ ::rtl::Reference < SwAccessibleContext > xThis( this );
GetMap()->SetCursorContext( xThis );
}
@@ -115,10 +114,10 @@ void SwAccessiblePage::_InvalidateFocus()
sal_Bool bSelected;
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
bSelected = bIsSelected;
}
- ASSERT( bSelected, "focus object should be selected" );
+ OSL_ENSURE( bSelected, "focus object should be selected" );
FireStateChangedEvent( AccessibleStateType::FOCUSED,
pWin->HasFocus() && bSelected );
@@ -134,7 +133,7 @@ SwAccessiblePage::SwAccessiblePage( SwAccessibleMap* pInitMap,
DBG_ASSERT( pInitMap != NULL, "need map" );
DBG_ASSERT( pFrame->IsPageFrm(), "need page frame" );
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
OUString sPage = OUString::valueOf(
static_cast<sal_Int32>(
@@ -148,7 +147,7 @@ SwAccessiblePage::~SwAccessiblePage()
sal_Bool SwAccessiblePage::HasCursor()
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
return bIsSelected;
}
@@ -179,7 +178,7 @@ Sequence<OUString> SwAccessiblePage::getSupportedServiceNames( )
Sequence< sal_Int8 > SAL_CALL SwAccessiblePage::getImplementationId()
throw(RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -198,3 +197,5 @@ OUString SwAccessiblePage::getAccessibleDescription( )
OUString sArg( GetFormattedPageNumber() );
return GetResource( STR_ACCESS_PAGE_DESC, &sArg );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accpage.hxx b/sw/source/core/access/accpage.hxx
index f8972060ecb3..ebb96cf8948f 100644
--- a/sw/source/core/access/accpage.hxx
+++ b/sw/source/core/access/accpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef _ACCPAGE_HXX
#define _ACCPAGE_HXX
-#ifndef _ACCCONTEXT_HXX
#include "acccontext.hxx"
-#endif
/**
@@ -97,3 +96,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 1a1d7312de02..87a59379fb38 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,7 +39,7 @@
#include <accmap.hxx>
#include <fesh.hxx>
#include <viewopt.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
#include <rtl/ustrbuf.hxx>
@@ -61,7 +62,6 @@
#include <unotools/charclass.hxx> // for GetWordBoundary
// for get/setCharacterAttribute(...)
#include <unocrsr.hxx>
-//#include <unoobj.hxx>
#include <unoport.hxx>
#include <doc.hxx>
#include <crsskip.hxx>
@@ -78,13 +78,11 @@
#include <viewimp.hxx>
#include <boost/scoped_ptr.hpp>
#include <textmarkuphelper.hxx>
-// --> OD 2010-02-22 #i10825#
+// #i10825#
#include <parachangetrackinginfo.hxx>
#include <com/sun/star/text/TextMarkupType.hpp>
// <--
-// --> OD 2010-03-08 #i92233#
-#include <comphelper/stlunosequence.hxx>
-// <--
+#include <comphelper/stlunosequence.hxx> // #i92233#
#include <algorithm>
@@ -128,9 +126,7 @@ const SwTxtNode* SwAccessibleParagraph::GetTxtNode() const
::rtl::OUString SwAccessibleParagraph::GetDescription()
{
- // --> OD 2004-09-29 #117933# - provide empty description for paragraphs
- return ::rtl::OUString();
- // <--
+ return ::rtl::OUString(); // provide empty description for paragraphs
}
sal_Int32 SwAccessibleParagraph::GetCaretPos()
@@ -138,9 +134,9 @@ sal_Int32 SwAccessibleParagraph::GetCaretPos()
sal_Int32 nRet = -1;
// get the selection's point, and test whether it's in our node
- // --> OD 2005-12-20 #i27301# - consider adjusted method signature
+ // #i27301# - consider adjusted method signature
SwPaM* pCaret = GetCursor( false ); // caret is first PaM in PaM-ring
- // <--
+
if( pCaret != NULL )
{
const SwTxtNode* pNode = GetTxtNode();
@@ -155,7 +151,6 @@ sal_Int32 SwAccessibleParagraph::GetCaretPos()
if( GetPortionData().IsValidCorePosition( nIndex ) )
{
// Yes, it's us!
- // --> OD 2006-10-19 #70538#
// consider that cursor/caret is in front of the list label
if ( pCaret->IsInFrontOfLabel() )
{
@@ -165,7 +160,6 @@ sal_Int32 SwAccessibleParagraph::GetCaretPos()
{
nRet = GetPortionData().GetAccessiblePosition( nIndex );
}
- // <--
DBG_ASSERT( nRet >= 0, "invalid cursor?" );
DBG_ASSERT( nRet <= GetPortionData().GetAccessibleString().
@@ -188,9 +182,7 @@ sal_Bool SwAccessibleParagraph::GetSelection(
nEnd = -1;
// get the selection, and test whether it affects our text node
- // --> OD 2005-12-20 #i27301# - consider adjusted method signature
- SwPaM* pCrsr = GetCursor( true );
- // <--
+ SwPaM* pCrsr = GetCursor( true ); // #i27301# - consider adjusted method signature
if( pCrsr != NULL )
{
// get SwPosition for my node
@@ -309,16 +301,15 @@ sal_Bool SwAccessibleParagraph::GetSelection(
return bRet;
}
-// --> OD 2005-12-20 #i27301# - new parameter <_bForSelection>
+// #i27301# - new parameter <_bForSelection>
SwPaM* SwAccessibleParagraph::GetCursor( const bool _bForSelection )
{
// get the cursor shell; if we don't have any, we don't have a
// cursor/selection either
SwPaM* pCrsr = NULL;
SwCrsrShell* pCrsrShell = SwAccessibleParagraph::GetCrsrShell();
- // --> OD 2005-12-20 #i27301#
- // - if cursor is retrieved for selection, the cursors for a table selection
- // has to be returned.
+ // #i27301# - if cursor is retrieved for selection, the cursors for
+ // a table selection has to be returned.
if ( pCrsrShell != NULL &&
( _bForSelection || !pCrsrShell->IsTableMode() ) )
// <--
@@ -360,9 +351,7 @@ void SwAccessibleParagraph::GetStates(
rStateSet.AddState( AccessibleStateType::FOCUSABLE );
// FOCUSED (simulates node index of cursor)
- // --> OD 2005-12-20 #i27301# - consider adjusted method signature
- SwPaM* pCaret = GetCursor( false );
- // <--
+ SwPaM* pCaret = GetCursor( false ); // #i27301# - consider adjusted method signature
const SwTxtNode* pTxtNd = GetTxtNode();
if( pCaret != 0 && pTxtNd != 0 &&
pTxtNd->GetIndex() == pCaret->GetPoint()->nNode.GetIndex() &&
@@ -371,7 +360,7 @@ void SwAccessibleParagraph::GetStates(
Window *pWin = GetWindow();
if( pWin && pWin->HasFocus() )
rStateSet.AddState( AccessibleStateType::FOCUSED );
- ::vos::ORef < SwAccessibleContext > xThis( this );
+ ::rtl::Reference < SwAccessibleContext > xThis( this );
GetMap()->SetCursorContext( xThis );
}
}
@@ -405,7 +394,7 @@ void SwAccessibleParagraph::_InvalidateContent( sal_Bool bVisibleDataFired )
sal_Bool bNewIsHeading = IsHeading();
sal_Bool bOldIsHeading;
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
bOldIsHeading = bIsHeading;
if( bIsHeading != bNewIsHeading )
bIsHeading = bNewIsHeading;
@@ -417,7 +406,7 @@ void SwAccessibleParagraph::_InvalidateContent( sal_Bool bVisibleDataFired )
::rtl::OUString sNewDesc( GetDescription() );
::rtl::OUString sOldDesc;
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
sOldDesc = sDesc;
if( sDesc != sNewDesc )
sDesc = sNewDesc;
@@ -442,7 +431,7 @@ void SwAccessibleParagraph::_InvalidateCursorPos()
sal_Int32 nNew = GetCaretPos();
sal_Int32 nOld;
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
nOld = nOldCaretPos;
nOldCaretPos = nNew;
}
@@ -450,7 +439,7 @@ void SwAccessibleParagraph::_InvalidateCursorPos()
{
// remember that object as the one that has the caret. This is
// neccessary to notify that object if the cursor leaves it.
- ::vos::ORef < SwAccessibleContext > xThis( this );
+ ::rtl::Reference < SwAccessibleContext > xThis( this );
GetMap()->SetCursorContext( xThis );
}
@@ -481,10 +470,10 @@ void SwAccessibleParagraph::_InvalidateFocus()
{
sal_Int32 nPos;
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
nPos = nOldCaretPos;
}
- ASSERT( nPos != -1, "focus object should be selected" );
+ OSL_ENSURE( nPos != -1, "focus object should be selected" );
FireStateChangedEvent( AccessibleStateType::FOCUSED,
pWin->HasFocus() && nPos != -1 );
@@ -494,9 +483,7 @@ void SwAccessibleParagraph::_InvalidateFocus()
SwAccessibleParagraph::SwAccessibleParagraph(
SwAccessibleMap& rInitMap,
const SwTxtFrm& rTxtFrm )
- // --> OD 2010-02-24 #i108125#
- : SwClient( const_cast<SwTxtNode*>(rTxtFrm.GetTxtNode()) )
- // <--
+ : SwClient( const_cast<SwTxtNode*>(rTxtFrm.GetTxtNode()) ) // #i108125#
, SwAccessibleContext( &rInitMap, AccessibleRole::PARAGRAPH, &rTxtFrm )
, sDesc()
, pPortionData( NULL )
@@ -504,16 +491,12 @@ SwAccessibleParagraph::SwAccessibleParagraph(
, nOldCaretPos( -1 )
, bIsHeading( sal_False )
, aSelectionHelper( *this )
- // --> OD 2010-02-19 #i108125#
- , mpParaChangeTrackInfo( new SwParaChangeTrackingInfo( rTxtFrm ) )
- // <--
+ , mpParaChangeTrackInfo( new SwParaChangeTrackingInfo( rTxtFrm ) ) // #i108125#
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
bIsHeading = IsHeading();
- // --> OD 2004-09-27 #117970# - set an empty accessibility name for paragraphs
- SetName( ::rtl::OUString() );
- // <--
+ SetName( ::rtl::OUString() ); // set an empty accessibility name for paragraphs
// If this object has the focus, then it is remembered by the map itself.
nOldCaretPos = GetCaretPos();
@@ -521,18 +504,16 @@ SwAccessibleParagraph::SwAccessibleParagraph(
SwAccessibleParagraph::~SwAccessibleParagraph()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
delete pPortionData;
delete pHyperTextData;
- // --> OD 2010-02-22 #i108125#
- delete mpParaChangeTrackInfo;
- // <--
+ delete mpParaChangeTrackInfo; // #i108125#
}
sal_Bool SwAccessibleParagraph::HasCursor()
{
- vos::OGuard aGuard( aMutex );
+ osl::MutexGuard aGuard( aMutex );
return nOldCaretPos != -1;
}
@@ -834,11 +815,11 @@ sal_Bool SwAccessibleParagraph::GetTextBoundary(
::rtl::OUString SAL_CALL SwAccessibleParagraph::getAccessibleDescription (void)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext );
- vos::OGuard aGuard2( aMutex );
+ osl::MutexGuard aGuard2( aMutex );
if( !sDesc.getLength() )
sDesc = GetDescription();
@@ -848,7 +829,7 @@ sal_Bool SwAccessibleParagraph::GetTextBoundary(
lang::Locale SAL_CALL SwAccessibleParagraph::getLocale (void)
throw (IllegalAccessibleComponentStateException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTxtFrm *pTxtFrm = PTR_CAST( SwTxtFrm, GetFrm() );
if( !pTxtFrm )
@@ -862,22 +843,17 @@ lang::Locale SAL_CALL SwAccessibleParagraph::getLocale (void)
return aLoc;
}
-/** paragraphs are in relation CONTENT_FLOWS_FROM and/or CONTENT_FLOWS_TO
-
- OD 2005-12-02 #i27138#
-
- @author OD
-*/
+/** #i27138# - paragraphs are in relation CONTENT_FLOWS_FROM and/or CONTENT_FLOWS_TO */
uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleParagraph::getAccessibleRelationSet()
throw ( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext );
utl::AccessibleRelationSetHelper* pHelper = new utl::AccessibleRelationSetHelper();
const SwTxtFrm* pTxtFrm = dynamic_cast<const SwTxtFrm*>(GetFrm());
- ASSERT( pTxtFrm,
+ OSL_ENSURE( pTxtFrm,
"<SwAccessibleParagraph::getAccessibleRelationSet()> - missing text frame");
if ( pTxtFrm )
{
@@ -908,15 +884,13 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleParagraph::getAccess
void SAL_CALL SwAccessibleParagraph::grabFocus()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext );
// get cursor shell
SwCrsrShell *pCrsrSh = GetCrsrShell();
- // --> OD 2005-12-20 #i27301# - consider new method signature
- SwPaM *pCrsr = GetCursor( false );
- // <--
+ SwPaM *pCrsr = GetCursor( false ); // #i27301# - consider new method signature
const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm*>( GetFrm() );
const SwTxtNode* pTxtNd = pTxtFrm->GetTxtNode();
@@ -945,7 +919,7 @@ void SAL_CALL SwAccessibleParagraph::grabFocus()
/* <-#i13955# */
}
-// --> OD 2007-01-17 #i71385#
+// #i71385#
bool lcl_GetBackgroundColor( Color & rColor,
const SwFrm* pFrm,
SwCrsrShell* pCrsrSh )
@@ -1064,7 +1038,7 @@ uno::Any SwAccessibleParagraph::queryInterface( const uno::Type& rType )
uno::Reference<XAccessibleHypertext> aAccHyp = this;
aRet <<= aAccHyp;
}
- // --> OD 2006-07-13 #i63870#
+ // #i63870#
// add interface com::sun:star:accessibility::XAccessibleTextAttributes
else if ( rType == ::getCppuType((uno::Reference<XAccessibleTextAttributes> *)0) )
{
@@ -1072,7 +1046,7 @@ uno::Any SwAccessibleParagraph::queryInterface( const uno::Type& rType )
aRet <<= aAccTextAttr;
}
// <--
- // --> OD 2008-06-10 #i89175#
+ // #i89175#
// add interface com::sun:star:accessibility::XAccessibleTextMarkup
else if ( rType == ::getCppuType((uno::Reference<XAccessibleTextMarkup> *)0) )
{
@@ -1100,10 +1074,9 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleParagraph::getTypes() throw(uno:
uno::Sequence< uno::Type > aTypes( SwAccessibleContext::getTypes() );
sal_Int32 nIndex = aTypes.getLength();
- // --> OD 2006-07-13 #i63870#
- // add type accessibility::XAccessibleTextAttributes
- // --> OD 2008-06-10 #i89175#
- // add type accessibility::XAccessibleTextMarkup and accessibility::XAccessibleMultiLineText
+ // #i63870# - add type accessibility::XAccessibleTextAttributes
+ // #i89175# - add type accessibility::XAccessibleTextMarkup and
+ // accessibility::XAccessibleMultiLineText
aTypes.realloc( nIndex + 6 );
uno::Type* pTypes = aTypes.getArray();
@@ -1121,7 +1094,7 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleParagraph::getTypes() throw(uno:
uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleParagraph::getImplementationId()
throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -1140,19 +1113,19 @@ uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleParagraph::getImplementationId()
sal_Int32 SwAccessibleParagraph::getCaretPosition()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
sal_Int32 nRet = GetCaretPos();
{
- vos::OGuard aOldCaretPosGuard( aMutex );
- ASSERT( nRet == nOldCaretPos, "caret pos out of sync" );
+ osl::MutexGuard aOldCaretPosGuard( aMutex );
+ OSL_ENSURE( nRet == nOldCaretPos, "caret pos out of sync" );
nOldCaretPos = nRet;
}
if( -1 != nRet )
{
- ::vos::ORef < SwAccessibleContext > xThis( this );
+ ::rtl::Reference < SwAccessibleContext > xThis( this );
GetMap()->SetCursorContext( xThis );
}
@@ -1162,7 +1135,7 @@ sal_Int32 SwAccessibleParagraph::getCaretPosition()
sal_Bool SAL_CALL SwAccessibleParagraph::setCaretPosition( sal_Int32 nIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
@@ -1195,7 +1168,7 @@ sal_Bool SAL_CALL SwAccessibleParagraph::setCaretPosition( sal_Int32 nIndex )
sal_Unicode SwAccessibleParagraph::getCharacter( sal_Int32 nIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
@@ -1210,16 +1183,15 @@ sal_Unicode SwAccessibleParagraph::getCharacter( sal_Int32 nIndex )
throw lang::IndexOutOfBoundsException();
}
-// --> OD 2006-07-20 #i63870#
-// re-implement method on behalf of methods <_getDefaultAttributesImpl(..)> and
-// <_getRunAttributesImpl(..)>
+// #i63870# - re-implement method on behalf of methods
+// <_getDefaultAttributesImpl(..)> and <_getRunAttributesImpl(..)>
uno::Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes(
sal_Int32 nIndex,
const uno::Sequence< ::rtl::OUString >& aRequestedAttributes )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
const ::rtl::OUString& rText = GetString();
@@ -1256,41 +1228,10 @@ uno::Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes(
++i;
}
-// // create a (dummy) text portion for the sole purpose of calling
-// // getPropertyValues on it
-// Reference<XMultiPropertySet> xPortion = CreateUnoPortion( nIndex, nIndex + 1 );
-
-// // get values
-// Sequence<OUString> aNames = getAttributeNames();
-// sal_Int32 nLength = aNames.getLength();
-// Sequence<Any> aAnys( nLength );
-// aAnys = xPortion->getPropertyValues( aNames );
-
-// // copy names + anys into return sequence
-// Sequence<PropertyValue> aValues( aNames.getLength() );
-// const OUString* pNames = aNames.getConstArray();
-// const Any* pAnys = aAnys.getConstArray();
-// PropertyValue* pValues = aValues.getArray();
-// for( sal_Int32 i = 0; i < nLength; i++ )
-// {
-// PropertyValue& rValue = pValues[i];
-// rValue.Name = pNames[i];
-// rValue.Value = pAnys[i];
-// rValue.Handle = -1; // handle not supported
-// rValue.State = PropertyState_DIRECT_VALUE; // states not supported
-// }
-
-// // adjust background color if we're in a gray portion
-// DBG_ASSERT( pValues[CHAR_BACK_COLOR_POS].Name.
-// equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CharBackColor")),
-// "Please adjust CHAR_BACK_COLOR_POS constant." );
-// if( GetPortionData().IsInGrayPortion( nIndex ) )
-// pValues[CHAR_BACK_COLOR_POS].Value <<= SwViewOption::GetFieldShadingsColor().GetColor();
-
return aValues;
}
-// --> OD 2006-07-11 #i63870#
+// #i63870#
void SwAccessibleParagraph::_getDefaultAttributesImpl(
const uno::Sequence< ::rtl::OUString >& aRequestedAttributes,
tAccParaPropValMap& rDefAttrSeq,
@@ -1313,9 +1254,8 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
0 ) );
}
- // --> OD 2007-11-12 #i82637#
- // From the perspective of the a11y API the default character attributes
- // are the character attributes, which are set at the paragraph style
+ // #i82637# - From the perspective of the a11y API the default character
+ // attributes are the character attributes, which are set at the paragraph style
// of the paragraph. The character attributes set at the automatic paragraph
// style of the paragraph are treated as run attributes.
// pTxtNode->SwCntntNode::GetAttr( *pSet );
@@ -1330,7 +1270,7 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
pSet->Put( aParaSet );
}
// get default character attributes and merge these into <pSet>
- ASSERT( pTxtNode->GetTxtColl(),
+ OSL_ENSURE( pTxtNode->GetTxtColl(),
"<SwAccessibleParagraph::_getDefaultAttributesImpl(..)> - missing paragraph style. Serious defect, please inform OD!" );
if ( pTxtNode->GetTxtColl() )
{
@@ -1368,7 +1308,7 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
++aPropIt;
}
- // --> OD 2007-01-15 #i72800#
+ // #i72800#
// add property value entry for the paragraph style
if ( !bOnlyCharAttrs && pTxtNode->GetTxtColl() )
{
@@ -1389,7 +1329,7 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
}
// <--
- // --> OD 2007-01-15 #i73371#
+ // #i73371#
// resolve value text::WritingMode2::PAGE of property value entry WritingMode
if ( !bOnlyCharAttrs && GetFrm() )
{
@@ -1464,14 +1404,14 @@ uno::Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes(
const uno::Sequence< ::rtl::OUString >& aRequestedAttributes )
throw ( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
tAccParaPropValMap aDefAttrSeq;
_getDefaultAttributesImpl( aRequestedAttributes, aDefAttrSeq );
- // --> OD 2010-03-08 #i92233#
- static rtl::OUString sMMToPixelRatio( rtl::OUString::createFromAscii( "MMToPixelRatio" ) );
+ // #i92233#
+ static rtl::OUString sMMToPixelRatio(RTL_CONSTASCII_USTRINGPARAM("MMToPixelRatio"));
bool bProvideMMToPixelRatio( false );
{
if ( aRequestedAttributes.getLength() == 0 )
@@ -1504,7 +1444,7 @@ uno::Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes(
++i;
}
- // --> OD 2010-03-08 #i92233#
+ // #i92233#
if ( bProvideMMToPixelRatio )
{
PropertyValue rPropVal;
@@ -1546,7 +1486,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
SfxItemSet aSet( pPaM->GetDoc()->GetAttrPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END -1,
0 );
- // --> OD 2007-11-12 #i82637#
+ // #i82637#
// From the perspective of the a11y API the character attributes, which
// are set at the automatic paragraph style of the paragraph are treated
// as run attributes.
@@ -1577,11 +1517,9 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
{
tAccParaPropValMap aRunAttrSeq;
{
- // --> OD 2007-11-12 #i82637#
tAccParaPropValMap aDefAttrSeq;
uno::Sequence< ::rtl::OUString > aDummy;
- _getDefaultAttributesImpl( aDummy, aDefAttrSeq, true );
- // <--
+ _getDefaultAttributesImpl( aDummy, aDefAttrSeq, true ); // #i82637#
const SfxItemPropertyMap* pPropMap =
aSwMapProvider.GetPropertySet( PROPERTY_MAP_TEXT_CURSOR )->getPropertyMap();
@@ -1590,8 +1528,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
while ( aPropIt != aPropertyEntries.end() )
{
const SfxPoolItem* pItem( 0 );
- // --> OD 2007-11-12 #i82637#
- // Found character attributes, whose value equals the value of
+ // #i82637# - Found character attributes, whose value equals the value of
// the corresponding default character attributes, are excluded.
if ( aSet.GetItemState( aPropIt->nWID, sal_True, &pItem ) == SFX_ITEM_SET )
{
@@ -1645,7 +1582,7 @@ uno::Sequence< PropertyValue > SwAccessibleParagraph::getRunAttributes(
throw ( lang::IndexOutOfBoundsException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
{
@@ -1678,7 +1615,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds(
sal_Int32 nIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
@@ -1741,7 +1678,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds(
sal_Int32 SwAccessibleParagraph::getCharacterCount()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
@@ -1751,7 +1688,7 @@ sal_Int32 SwAccessibleParagraph::getCharacterCount()
sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
@@ -1828,7 +1765,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint )
::rtl::OUString SwAccessibleParagraph::getSelectedText()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
@@ -1842,7 +1779,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint )
sal_Int32 SwAccessibleParagraph::getSelectionStart()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
@@ -1854,7 +1791,7 @@ sal_Int32 SwAccessibleParagraph::getSelectionStart()
sal_Int32 SwAccessibleParagraph::getSelectionEnd()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
@@ -1866,7 +1803,7 @@ sal_Int32 SwAccessibleParagraph::getSelectionEnd()
sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
@@ -1902,7 +1839,7 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n
::rtl::OUString SwAccessibleParagraph::getText()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
@@ -1913,7 +1850,7 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n
sal_Int32 nStartIndex, sal_Int32 nEndIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
@@ -1930,7 +1867,7 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n
/*accessibility::*/TextSegment SwAccessibleParagraph::getTextAtIndex( sal_Int32 nIndex, sal_Int16 nTextType ) throw (lang::IndexOutOfBoundsException, lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
@@ -1966,7 +1903,7 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n
/*accessibility::*/TextSegment SwAccessibleParagraph::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 nTextType ) throw (lang::IndexOutOfBoundsException, lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
@@ -2010,7 +1947,7 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n
/*accessibility::*/TextSegment SwAccessibleParagraph::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 nTextType ) throw (lang::IndexOutOfBoundsException, lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
@@ -2052,7 +1989,7 @@ sal_Bool SwAccessibleParagraph::copyText( sal_Int32 nStartIndex, sal_Int32 nEndI
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// select and copy (through dispatch mechanism)
setSelection( nStartIndex, nEndIndex );
@@ -2069,7 +2006,7 @@ sal_Bool SwAccessibleParagraph::cutText( sal_Int32 nStartIndex, sal_Int32 nEndIn
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
CHECK_FOR_DEFUNC( XAccessibleEditableText );
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if( !IsEditableState() )
return sal_False;
@@ -2084,7 +2021,7 @@ sal_Bool SwAccessibleParagraph::pasteText( sal_Int32 nIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
CHECK_FOR_DEFUNC( XAccessibleEditableText );
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if( !IsEditableState() )
return sal_False;
@@ -2112,7 +2049,7 @@ sal_Bool SwAccessibleParagraph::replaceText(
const ::rtl::OUString& sReplacement )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleEditableText );
@@ -2174,7 +2111,7 @@ sal_Bool SwAccessibleParagraph::setAttributes(
const uno::Sequence<PropertyValue>& rAttributeSet )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleEditableText );
const ::rtl::OUString& rText = GetString();
@@ -2219,7 +2156,7 @@ sal_Bool SwAccessibleParagraph::setAttributes(
{
xPortion->setPropertyValues( aNames, aValues );
}
- catch( UnknownPropertyException e )
+ catch( UnknownPropertyException &e )
{
// error handling through return code!
bRet = sal_False;
@@ -2290,7 +2227,7 @@ uno::Reference<XAccessible> SwAccessibleParagraph::getSelectedAccessibleChild(
return aSelectionHelper.getSelectedAccessibleChild(nSelectedChildIndex);
}
-// --> OD 2004-11-16 #111714# - index has to be treated as global child index.
+// index has to be treated as global child index.
void SwAccessibleParagraph::deselectAccessibleChild(
sal_Int32 nChildIndex )
throw ( lang::IndexOutOfBoundsException,
@@ -2357,12 +2294,12 @@ const SwTxtAttr *SwHyperlinkIter_Impl::next()
sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkCount()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleHypertext );
sal_Int32 nCount = 0;
- // --> OD 2007-06-27 #i77108# - provide hyperlinks also in editable documents.
+ // #i77108# - provide hyperlinks also in editable documents.
// if( !IsEditableState() )
// <--
{
@@ -2379,14 +2316,12 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
SwAccessibleParagraph::getHyperLink( sal_Int32 nLinkIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleHypertext );
uno::Reference< XAccessibleHyperlink > xRet;
- // --> OD 2007-06-27 #i77108# - provide hyperlinks also in editable documents.
-// if( !IsEditableState() )
- // <--
+ // #i77108#
{
const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm*>( GetFrm() );
SwHyperlinkIter_Impl aHIter( pTxtFrm );
@@ -2434,7 +2369,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleHypertext );
// parameter checking
@@ -2445,9 +2380,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharInde
}
sal_Int32 nRet = -1;
- // --> OD 2007-06-27 #i77108# - provide hyperlinks also in editable documents.
-// if( !IsEditableState() )
- // <--
+ // #i77108#
{
const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm*>( GetFrm() );
SwHyperlinkIter_Impl aHIter( pTxtFrm );
@@ -2469,8 +2402,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharInde
return nRet;
}
-// --> OD 2008-05-26 #i71360#
-// --> OD 2010-02-22 #i108125# - adjustments for change tracking text markup
+// #i71360#, #i108125# - adjustments for change tracking text markup
sal_Int32 SAL_CALL SwAccessibleParagraph::getTextMarkupCount( sal_Int32 nTextMarkupType )
throw (lang::IllegalArgumentException,
uno::RuntimeException)
@@ -2560,7 +2492,7 @@ uno::Sequence< /*accessibility::*/TextSegment > SAL_CALL
}
// <--
-// --> OD 2008-05-29 #i89175#
+// #i89175#
sal_Int32 SAL_CALL SwAccessibleParagraph::getLineNumberAtIndex( sal_Int32 nIndex )
throw (lang::IndexOutOfBoundsException,
uno::RuntimeException)
@@ -2668,11 +2600,12 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret()
return nLineNo;
}
-// --> OD 2010-02-19 #i108125#
+// #i108125#
void SwAccessibleParagraph::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
mpParaChangeTrackInfo->reset();
SwClient::Modify( pOld, pNew );
}
-// <--
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx
index 3d3f0bed687f..062af1aa8940 100644
--- a/sw/source/core/access/accpara.hxx
+++ b/sw/source/core/access/accpara.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,11 +35,9 @@
#include <com/sun/star/accessibility/XAccessibleTextMarkup.hpp>
#include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp>
#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <accselectionhelper.hxx>
-// --> OD 2010-02-19 #i108125#
-#include <calbck.hxx>
-// <--
+#include <calbck.hxx> // #i108125#
class SwTxtFrm;
class SwTxtNode;
@@ -46,9 +45,7 @@ class SwPaM;
class SwAccessiblePortionData;
class SwAccessibleHyperTextData;
class SwXTextPortion;
-// --> OD 2010-02-19 #i108125#
-class SwParaChangeTrackingInfo;
-// <--
+class SwParaChangeTrackingInfo; //#i108125#
namespace rtl { class OUString; }
namespace com { namespace sun { namespace star {
@@ -56,15 +53,13 @@ namespace com { namespace sun { namespace star {
namespace accessibility { class XAccessibleHyperlink; }
} } }
-typedef ::std::hash_map< ::rtl::OUString,
+typedef ::boost::unordered_map< ::rtl::OUString,
::com::sun::star::beans::PropertyValue,
::rtl::OUStringHash,
::std::equal_to< ::rtl::OUString > > tAccParaPropValMap;
class SwAccessibleParagraph :
- // --> OD 2010-02-19 #i108125#
- public SwClient,
- // <--
+ public SwClient, // #i108125#
public SwAccessibleContext,
public ::com::sun::star::accessibility::XAccessibleEditableText,
public com::sun::star::accessibility::XAccessibleSelection,
@@ -94,9 +89,7 @@ class SwAccessibleParagraph :
// implementation for XAccessibleSelection
SwAccessibleSelectionHelper aSelectionHelper;
- // --> OD 2010-02-19 #i108125#
- SwParaChangeTrackingInfo* mpParaChangeTrackInfo;
- // <--
+ SwParaChangeTrackingInfo* mpParaChangeTrackInfo; // #i108125#
/// get the SwTxtNode (requires frame; check before)
const SwTxtNode* GetTxtNode() const;
@@ -114,9 +107,8 @@ class SwAccessibleParagraph :
sal_Bool GetSelection(sal_Int32& nStart, sal_Int32& nEnd);
// helper for GetSelection and getCaretPosition
- // --> OD 2005-12-20 #i27301#
- // - add parameter <_bForSelection>, which indicates, if the cursor is
- // retrieved for selection or for caret position.
+ // #i27301# - add parameter <_bForSelection>, which indicates,
+ // if the cursor is retrieved for selection or for caret position.
SwPaM* GetCursor( const bool _bForSelection );
/// for cut/copy/paste: execute a particular slot at the view shell
@@ -148,7 +140,7 @@ class SwAccessibleParagraph :
}
}
- // --> OD 2006-07-13 #i63870#
+ // #i63870#
void _getDefaultAttributesImpl(
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes,
tAccParaPropValMap& rDefAttrSeq,
@@ -243,9 +235,7 @@ public:
virtual sal_Bool HasCursor(); // required by map to remember that object
- // --> OD 2010-02-19 #i108125#
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew);
- // <--
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew); // #i108125#
//===== XAccessibleContext ==============================================
@@ -261,12 +251,7 @@ public:
getLocale (void)
throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
- /** paragraphs are in relation CONTENT_FLOWS_FROM and/or CONTENT_FLOWS_TO
-
- OD 2005-12-02 #i27138#
-
- @author OD
- */
+ /** #i27138# - paragraphs are in relation CONTENT_FLOWS_FROM and/or CONTENT_FLOWS_TO */
virtual ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL
getAccessibleRelationSet (void)
@@ -276,7 +261,7 @@ public:
virtual void SAL_CALL grabFocus()
throw (::com::sun::star::uno::RuntimeException);
- // --> OD 2007-01-17 #i71385#
+ // #i71385#
virtual sal_Int32 SAL_CALL getForeground()
throw (::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getBackground()
@@ -374,7 +359,7 @@ public:
throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
::com::sun::star::uno::RuntimeException);
- // --> OD 2004-11-16 #111714# - index has to be treated as global child index.
+ // index has to be treated as global child index.
virtual void SAL_CALL deselectAccessibleChild(
sal_Int32 nChildIndex )
throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
@@ -392,7 +377,7 @@ public:
throw (::com::sun::star::lang::IndexOutOfBoundsException,
::com::sun::star::uno::RuntimeException);
- // --> OD 2008-05-19 #i71360#
+ // #i71360#
//===== XAccesibleTextMarkup ============================================
virtual sal_Int32 SAL_CALL getTextMarkupCount( sal_Int32 nTextMarkupType )
throw (::com::sun::star::lang::IllegalArgumentException,
@@ -413,7 +398,7 @@ public:
::com::sun::star::uno::RuntimeException);
// <--
- // --> OD 2008-05-29 #i89175#
+ // #i89175#
//===== XAccessibleMultiLineText ========================================
virtual sal_Int32 SAL_CALL getLineNumberAtIndex( sal_Int32 nIndex )
throw (::com::sun::star::lang::IndexOutOfBoundsException,
@@ -432,7 +417,7 @@ public:
throw (::com::sun::star::uno::RuntimeException);
// <--
- // --> OD 2006-07-11 #i63870#
+ // #i63870#
//===== XAccesibleTextAttributes ========================================
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getDefaultAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRunAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
@@ -447,3 +432,4 @@ inline SwAccessibleParagraph::operator ::com::sun::star::accessibility::XAccessi
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index c90fa9d4e34d..0142391027b8 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,9 +35,7 @@
#include <txttypes.hxx>
// for portion replacement in Special()
-#ifndef _ACCESS_HRC
#include "access.hrc"
-#endif
#include <tools/resid.hxx>
#include "viewopt.hxx"
@@ -173,7 +172,7 @@ void SwAccessiblePortionData::Special(
sDisplay = aTmpBuffer.makeStringAndClear();
break;
}
- // --> OD 2010-06-04 #i111768# - apply patch from kstribley:
+ // #i111768# - apply patch from kstribley:
// Include the control characters.
case POR_CONTROLCHAR:
{
@@ -316,7 +315,7 @@ void SwAccessiblePortionData::GetLineBoundary(
FindBreak( aLineBreaks, nPos ) );
}
-// --> OD 2008-05-30 #i89175#
+// #i89175#
sal_Int32 SwAccessiblePortionData::GetLineCount() const
{
size_t nBreaks = aLineBreaks.size();
@@ -467,9 +466,7 @@ size_t SwAccessiblePortionData::FindLastBreak(
size_t nResult = FindBreak( rPositions, nValue );
// skip 'zero-length' portions
- // --> OD 2006-10-19 #i70538#
- // consider size of <rPosition> and ignore last entry
-// while( rPositions[nResult+1] <= nValue )
+ // #i70538# consider size of <rPosition> and ignore last entry
while ( nResult < rPositions.size() - 2 &&
rPositions[nResult+1] <= nValue )
{
@@ -553,11 +550,9 @@ sal_Int32 SwAccessiblePortionData::GetAccessiblePosition( sal_uInt16 nPos ) cons
DBG_ASSERT( nPos <= pTxtNode->GetTxt().Len(), "illegal position" );
// find the portion number
- // --> OD 2006-10-19 #i70538#
- // consider "empty" model portions - e.g. number portion
+ // #i70538# - consider "empty" model portions - e.g. number portion
size_t nPortionNo = FindLastBreak( aModelPositions,
static_cast<sal_Int32>(nPos) );
- // <--
sal_Int32 nRet = aAccessiblePositions[nPortionNo];
@@ -751,3 +746,5 @@ sal_uInt16 SwAccessiblePortionData::GetLastValidCorePosition() const
{
return static_cast<sal_uInt16>( aModelPositions[ aModelPositions.size()-1 ] );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx
index 1e147ff2d99b..ef04e7ff56eb 100644
--- a/sw/source/core/access/accportions.hxx
+++ b/sw/source/core/access/accportions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -121,7 +122,7 @@ public:
// get start and end position of the last line
void GetLastLineBoundary( com::sun::star::i18n::Boundary& rBound ) const;
- // --> OD 2008-05-30 #i89175#
+ // #i89175#
sal_Int32 GetLineCount() const;
sal_Int32 GetLineNo( const sal_Int32 nPos ) const;
void GetBoundaryOfLine( const sal_Int32 nLineNo,
@@ -173,3 +174,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accpreview.cxx b/sw/source/core/access/accpreview.cxx
index b8fabc3d5f25..c656b4000d05 100644
--- a/sw/source/core/access/accpreview.cxx
+++ b/sw/source/core/access/accpreview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,29 +29,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <vcl/svapp.hxx>
#include <rtl/uuid.h>
-#ifndef _ACCESS_HRC
#include "access.hrc"
-#endif
#include <accpreview.hxx>
-
const sal_Char sServiceName[] = "com.sun.star.text.AccessibleTextDocumentPageView";
const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleDocumentPageView";
-
-// using namespace accessibility;
-
using ::com::sun::star::lang::IndexOutOfBoundsException;
using ::com::sun::star::uno::RuntimeException;
using ::com::sun::star::uno::Sequence;
using ::rtl::OUString;
-
-
-
//
// SwAccessiblePreview
//
@@ -92,7 +83,7 @@ Sequence<OUString> SwAccessiblePreview::getSupportedServiceNames( )
Sequence< sal_Int8 > SAL_CALL SwAccessiblePreview::getImplementationId()
throw(RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -102,3 +93,5 @@ Sequence< sal_Int8 > SAL_CALL SwAccessiblePreview::getImplementationId()
}
return aId;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accpreview.hxx b/sw/source/core/access/accpreview.hxx
index aab14dc80026..589811e927c9 100644
--- a/sw/source/core/access/accpreview.hxx
+++ b/sw/source/core/access/accpreview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx
index 8e4593377c63..c3beba54da6e 100644
--- a/sw/source/core/access/accselectionhelper.cxx
+++ b/sw/source/core/access/accselectionhelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96,7 +97,7 @@ void SwAccessibleSelectionHelper::selectAccessibleChild(
throw ( lang::IndexOutOfBoundsException,
RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// Get the respective child as SwFrm (also do index checking), ...
const SwAccessibleChild aChild = rContext.GetChild( *(rContext.GetMap()),
@@ -106,19 +107,14 @@ void SwAccessibleSelectionHelper::selectAccessibleChild(
// we can only select fly frames, so we ignore (should: return
// false) all other attempts at child selection
- sal_Bool bRet = sal_False;
SwFEShell* pFEShell = GetFEShell();
if( pFEShell != NULL )
{
const SdrObject *pObj = aChild.GetDrawObject();
if( pObj )
- {
- bRet = rContext.Select( const_cast< SdrObject *>( pObj ), 0==aChild.GetSwFrm());
- }
+ rContext.Select( const_cast< SdrObject *>( pObj ), 0==aChild.GetSwFrm());
}
// no frame shell, or no frame, or no fly frame -> can't select
-
- // return bRet;
}
sal_Bool SwAccessibleSelectionHelper::isAccessibleChildSelected(
@@ -126,7 +122,7 @@ sal_Bool SwAccessibleSelectionHelper::isAccessibleChildSelected(
throw ( lang::IndexOutOfBoundsException,
RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// Get the respective child as SwFrm (also do index checking), ...
const SwAccessibleChild aChild = rContext.GetChild( *(rContext.GetMap()),
@@ -161,7 +157,7 @@ void SwAccessibleSelectionHelper::clearAccessibleSelection( )
void SwAccessibleSelectionHelper::selectAllAccessibleChildren( )
throw ( RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// We can select only one. So iterate over the children to find
// the first we can select, and select it.
@@ -193,7 +189,7 @@ void SwAccessibleSelectionHelper::selectAllAccessibleChildren( )
sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( )
throw ( RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int32 nCount = 0;
// Only one frame can be selected at a time, and we only frames
@@ -245,7 +241,7 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild(
throw ( lang::IndexOutOfBoundsException,
RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// Since the index is relative to the selected children, and since
// there can be at most one selected frame child, the index must
@@ -301,27 +297,27 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild(
Reference< XAccessible > xChild;
if( aChild.GetSwFrm() )
{
- ::vos::ORef < SwAccessibleContext > xChildImpl(
+ ::rtl::Reference < SwAccessibleContext > xChildImpl(
rContext.GetMap()->GetContextImpl( aChild.GetSwFrm(),
sal_True ) );
- if( xChildImpl.isValid() )
+ if( xChildImpl.is() )
{
xChildImpl->SetParent( &rContext );
- xChild = xChildImpl.getBodyPtr();
+ xChild = xChildImpl.get();
}
}
else if ( aChild.GetDrawObject() )
{
- ::vos::ORef < ::accessibility::AccessibleShape > xChildImpl(
+ ::rtl::Reference < ::accessibility::AccessibleShape > xChildImpl(
rContext.GetMap()->GetContextImpl( aChild.GetDrawObject(),
&rContext, sal_True ) );
- if( xChildImpl.isValid() )
- xChild = xChildImpl.getBodyPtr();
+ if( xChildImpl.is() )
+ xChild = xChildImpl.get();
}
return xChild;
}
-// --> OD 2004-11-16 #111714# - index has to be treated as global child index.
+// index has to be treated as global child index.
void SwAccessibleSelectionHelper::deselectAccessibleChild(
sal_Int32 nChildIndex )
throw ( lang::IndexOutOfBoundsException,
@@ -332,3 +328,5 @@ void SwAccessibleSelectionHelper::deselectAccessibleChild(
nChildIndex >= rContext.GetChildCount( *(rContext.GetMap()) ) )
throwIndexOutOfBoundsException();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accselectionhelper.hxx b/sw/source/core/access/accselectionhelper.hxx
index ff0833d25ed6..43ccce61612d 100644
--- a/sw/source/core/access/accselectionhelper.hxx
+++ b/sw/source/core/access/accselectionhelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,7 +70,7 @@ public:
sal_Int32 nSelectedChildIndex )
throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
::com::sun::star::uno::RuntimeException);
- // --> OD 2004-11-16 #111714# - index has to be treated as global child index.
+ // index has to be treated as global child index.
void deselectAccessibleChild(
sal_Int32 nChildIndex )
throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
@@ -79,3 +80,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index 8114f67ec3f0..563a000a3230 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <rtl/uuid.h>
#include <rtl/ustrbuf.hxx>
@@ -102,7 +103,7 @@ class SwAccessibleTableData_Impl
SwAccTableSelHander_Impl& rSelHdl,
sal_Bool bColumns ) const;
- // --> OD 2007-06-27 #i77106#
+ // #i77106#
inline bool IncludeRow( const SwFrm& rFrm ) const
{
return !mbOnlyTableColumnHeader ||
@@ -110,8 +111,7 @@ class SwAccessibleTableData_Impl
}
// <--
public:
- // --> OD 2007-06-27 #i77106#
- // add third optional parameter <bOnlyTableColumnHeader>, default value <false>
+ // #i77106# - add third optional parameter <bOnlyTableColumnHeader>, default value <false>
SwAccessibleTableData_Impl( SwAccessibleMap& rAccMap,
const SwTabFrm *pTabFrm,
sal_Bool bIsInPagePreview,
@@ -164,13 +164,12 @@ void SwAccessibleTableData_Impl::CollectData( const SwFrm *pFrm )
{
if( pLower->IsRowFrm() )
{
- // --> OD 2007-06-27 #i77106#
+ // #i77106#
if ( IncludeRow( *pLower ) )
{
maRows.insert( pLower->Frm().Top() - maTabFrmPos.Y() );
CollectData( pLower );
}
- // <--
}
else if( pLower->IsCellFrm() &&
rLower.IsAccessible( mbIsInPagePreview ) )
@@ -210,13 +209,12 @@ void SwAccessibleTableData_Impl::CollectExtents( const SwFrm *pFrm )
}
else
{
- // --> OD 2007-06-27 #i77106#
+ // #i77106#
if ( !pLower->IsRowFrm() ||
IncludeRow( *pLower ) )
{
CollectExtents( pLower );
}
- // <--
}
}
++aIter;
@@ -236,17 +234,17 @@ sal_Bool SwAccessibleTableData_Impl::FindCell(
{
const SwAccessibleChild& rLower = *aIter;
const SwFrm *pLower = rLower.GetSwFrm();
- ASSERT( pLower, "child should be a frame" );
+ OSL_ENSURE( pLower, "child should be a frame" );
if( pLower )
{
if( rLower.IsAccessible( mbIsInPagePreview ) )
{
- ASSERT( pLower->IsCellFrm(), "lower is not a cell frame" );
+ OSL_ENSURE( pLower->IsCellFrm(), "lower is not a cell frame" );
const SwRect& rFrm = pLower->Frm();
if( rFrm.Right() >= rPos.X() && rFrm.Bottom() >= rPos.Y() )
{
// We have found the cell
- ASSERT( rFrm.Left() <= rPos.X() && rFrm.Top() <= rPos.Y(),
+ OSL_ENSURE( rFrm.Left() <= rPos.X() && rFrm.Top() <= rPos.Y(),
"find frame moved to far!" );
bFound = sal_True;
if( !bExact ||
@@ -258,13 +256,12 @@ sal_Bool SwAccessibleTableData_Impl::FindCell(
}
else
{
- // --> OD 2007-06-27 #i77106#
+ // #i77106#
if ( !pLower->IsRowFrm() ||
IncludeRow( *pLower ) )
{
bFound = FindCell( rPos, pLower, bExact, rRet );
}
- // <--
}
}
++aIter;
@@ -288,13 +285,13 @@ void SwAccessibleTableData_Impl::GetSelection(
{
const SwAccessibleChild& rLower = *aIter;
const SwFrm *pLower = rLower.GetSwFrm();
- ASSERT( pLower, "child should be a frame" );
+ OSL_ENSURE( pLower, "child should be a frame" );
const SwRect& rBox = rLower.GetBox( mrAccMap );
if( pLower && rBox.IsOver( rArea ) )
{
if( rLower.IsAccessible( mbIsInPagePreview ) )
{
- ASSERT( pLower->IsCellFrm(), "lower is not a cell frame" );
+ OSL_ENSURE( pLower->IsCellFrm(), "lower is not a cell frame" );
const SwCellFrm *pCFrm =
static_cast < const SwCellFrm * >( pLower );
SwTableBox *pBox =
@@ -325,14 +322,13 @@ void SwAccessibleTableData_Impl::GetSelection(
}
else
{
- // --> OD 2007-06-27 #i77106#
+ // #i77106#
if ( !pLower->IsRowFrm() ||
IncludeRow( *pLower ) )
{
GetSelection( rTabPos, rArea, rSelBoxes, pLower, rSelHdl,
bColumns );
}
- // <--
}
}
++aIter;
@@ -560,7 +556,7 @@ inline SwAccAllTableSelHander_Impl::SwAccAllTableSelHander_Impl( sal_Int32 nSize
uno::Sequence < sal_Int32 > SwAccAllTableSelHander_Impl::GetSelSequence()
{
- ASSERT( nCount >= 0, "underflow" );
+ OSL_ENSURE( nCount >= 0, "underflow" );
uno::Sequence < sal_Int32 > aRet( nCount );
sal_Int32 *pRet = aRet.getArray();
sal_Int32 nPos = 0;
@@ -574,7 +570,7 @@ uno::Sequence < sal_Int32 > SwAccAllTableSelHander_Impl::GetSelSequence()
}
}
- ASSERT( nPos == nCount, "count is wrong" );
+ OSL_ENSURE( nPos == nCount, "count is wrong" );
return aRet;
}
@@ -582,9 +578,9 @@ uno::Sequence < sal_Int32 > SwAccAllTableSelHander_Impl::GetSelSequence()
void SwAccAllTableSelHander_Impl::Unselect( sal_Int32 nRowOrCol,
sal_Int32 nExt )
{
- ASSERT( static_cast< size_t >( nRowOrCol ) < aSelected.size(),
+ OSL_ENSURE( static_cast< size_t >( nRowOrCol ) < aSelected.size(),
"index to large" );
- ASSERT( static_cast< size_t >( nRowOrCol+nExt ) <= aSelected.size(),
+ OSL_ENSURE( static_cast< size_t >( nRowOrCol+nExt ) <= aSelected.size(),
"extent to large" );
while( nExt )
{
@@ -633,9 +629,7 @@ void SwAccessibleTable::FireTableChangeEvent(
const SwTableBox* SwAccessibleTable::GetTableBox( sal_Int32 nChildIndex ) const
{
DBG_ASSERT( nChildIndex >= 0, "Illegal child index." );
- // --> OD 2007-06-27 #i77106#
- DBG_ASSERT( nChildIndex < const_cast<SwAccessibleTable*>(this)->getAccessibleChildCount(), "Illegal child index." );
- // <--
+ DBG_ASSERT( nChildIndex < const_cast<SwAccessibleTable*>(this)->getAccessibleChildCount(), "Illegal child index." ); // #i77106#
const SwTableBox* pBox = NULL;
@@ -674,9 +668,7 @@ sal_Int32 SwAccessibleTable::GetIndexOfSelectedChild(
sal_Int32 nSelectedChildIndex ) const
{
// iterate over all children to n-th isAccessibleChildSelected()
- // --> OD 2007-06-27 #i77106#
- sal_Int32 nChildren = const_cast<SwAccessibleTable*>(this)->getAccessibleChildCount();
- // <--
+ sal_Int32 nChildren = const_cast<SwAccessibleTable*>(this)->getAccessibleChildCount(); // #i77106#
if( nSelectedChildIndex >= nChildren )
return -1L;
@@ -713,7 +705,7 @@ SwAccessibleTable::SwAccessibleTable(
SwAccessibleContext( pInitMap, AccessibleRole::TABLE, pTabFrm ),
mpTableData( 0 )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const SwFrmFmt *pFrmFmt = pTabFrm->GetFmt();
const_cast< SwFrmFmt * >( pFrmFmt )->Add( this );
@@ -735,7 +727,7 @@ SwAccessibleTable::SwAccessibleTable(
SwAccessibleTable::~SwAccessibleTable()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
delete mpTableData;
}
@@ -750,7 +742,7 @@ void SwAccessibleTable::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
if( pTabFrm )
{
const SwFrmFmt *pFrmFmt = pTabFrm->GetFmt();
- ASSERT( pFrmFmt == GetRegisteredIn(), "invalid frame" );
+ OSL_ENSURE( pFrmFmt == GetRegisteredIn(), "invalid frame" );
OUString sOldName( GetName() );
@@ -839,7 +831,7 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleTable::getTypes()
uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTable::getImplementationId()
throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -850,7 +842,7 @@ uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTable::getImplementationId()
return aId;
}
-// --> OD 2007-06-28 #i77106#
+// #i77106#
SwAccessibleTableData_Impl* SwAccessibleTable::CreateNewTableData()
{
const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() );
@@ -860,7 +852,7 @@ SwAccessibleTableData_Impl* SwAccessibleTable::CreateNewTableData()
void SwAccessibleTable::UpdateTableData()
{
- // --> OD 2007-06-28 #i77106# - usage of new method <CreateNewTableData()>
+ // #i77106# - usage of new method <CreateNewTableData()>
delete mpTableData;
mpTableData = CreateNewTableData();
// <--
@@ -875,7 +867,7 @@ void SwAccessibleTable::ClearTableData()
OUString SAL_CALL SwAccessibleTable::getAccessibleDescription (void)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext )
@@ -885,7 +877,7 @@ OUString SAL_CALL SwAccessibleTable::getAccessibleDescription (void)
sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRowCount()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable )
@@ -895,7 +887,7 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRowCount()
sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumnCount( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable )
@@ -906,9 +898,8 @@ OUString SAL_CALL SwAccessibleTable::getAccessibleRowDescription(
sal_Int32 nRow )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- // --> OD 2010-03-10 #i87532#
- // determine table cell in <nRow>th row and in first column of row header table
- // and return its text content.
+ // #i87532# - determine table cell in <nRow>th row and
+ // in first column of row header table and return its text content.
OUString sRowDesc;
GetTableData().CheckRowAndCol(nRow, 0, this);
@@ -918,7 +909,7 @@ OUString SAL_CALL SwAccessibleTable::getAccessibleRowDescription(
{
uno::Reference< XAccessible > xRowHeaderCell =
xTableRowHeader->getAccessibleCellAt( nRow, 0 );
- ASSERT( xRowHeaderCell.is(),
+ OSL_ENSURE( xRowHeaderCell.is(),
"<SwAccessibleTable::getAccessibleRowDescription(..)> - missing row header cell -> serious issue." );
uno::Reference< XAccessibleContext > xRowHeaderCellContext =
xRowHeaderCell->getAccessibleContext();
@@ -942,9 +933,8 @@ OUString SAL_CALL SwAccessibleTable::getAccessibleColumnDescription(
sal_Int32 nColumn )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- // --> OD 2010-03-10 #i87532#
- // determine table cell in first row and in <nColumn>th column of column header table
- // and return its text content.
+ // #i87532# - determine table cell in first row and
+ // in <nColumn>th column of column header table and return its text content.
OUString sColumnDesc;
GetTableData().CheckRowAndCol(0, nColumn, this);
@@ -954,7 +944,7 @@ OUString SAL_CALL SwAccessibleTable::getAccessibleColumnDescription(
{
uno::Reference< XAccessible > xColumnHeaderCell =
xTableColumnHeader->getAccessibleCellAt( 0, nColumn );
- ASSERT( xColumnHeaderCell.is(),
+ OSL_ENSURE( xColumnHeaderCell.is(),
"<SwAccessibleTable::getAccessibleColumnDescription(..)> - missing column header cell -> serious issue." );
uno::Reference< XAccessibleContext > xColumnHeaderCellContext =
xColumnHeaderCell->getAccessibleContext();
@@ -980,7 +970,7 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRowExtentAt(
{
sal_Int32 nExtend = -1;
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable )
@@ -1011,7 +1001,7 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumnExtentAt(
{
sal_Int32 nExtend = -1;
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable )
@@ -1048,8 +1038,8 @@ uno::Reference< XAccessibleTable > SAL_CALL
SwAccessibleTable::getAccessibleColumnHeaders( )
throw (uno::RuntimeException)
{
- // --> OD 2010-03-10 #i87532#
- // assure that return accesible object is empty, if no column header exists.
+ // #i87532# - assure that return accesible object is empty,
+ // if no column header exists.
SwAccessibleTableColHeaders* pTableColHeaders =
new SwAccessibleTableColHeaders( GetMap(), static_cast< const SwTabFrm *>( GetFrm() ) );
uno::Reference< XAccessibleTable > xTableColumnHeaders( pTableColHeaders );
@@ -1065,7 +1055,7 @@ uno::Reference< XAccessibleTable > SAL_CALL
uno::Sequence< sal_Int32 > SAL_CALL SwAccessibleTable::getSelectedAccessibleRows()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable )
@@ -1089,7 +1079,7 @@ uno::Sequence< sal_Int32 > SAL_CALL SwAccessibleTable::getSelectedAccessibleRows
uno::Sequence< sal_Int32 > SAL_CALL SwAccessibleTable::getSelectedAccessibleColumns()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable )
@@ -1112,7 +1102,7 @@ uno::Sequence< sal_Int32 > SAL_CALL SwAccessibleTable::getSelectedAccessibleColu
sal_Bool SAL_CALL SwAccessibleTable::isAccessibleRowSelected( sal_Int32 nRow )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable )
@@ -1139,7 +1129,7 @@ sal_Bool SAL_CALL SwAccessibleTable::isAccessibleColumnSelected(
sal_Int32 nColumn )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable )
@@ -1169,7 +1159,7 @@ uno::Reference< XAccessible > SAL_CALL SwAccessibleTable::getAccessibleCellAt(
{
uno::Reference< XAccessible > xRet;
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable )
@@ -1201,7 +1191,7 @@ sal_Bool SAL_CALL SwAccessibleTable::isAccessibleSelected(
{
sal_Bool bRet = sal_False;
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable )
@@ -1228,7 +1218,7 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleIndex(
{
sal_Int32 nRet = -1;
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable )
@@ -1246,11 +1236,11 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRow( sal_Int32 nChildIndex )
{
sal_Int32 nRet = -1;
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable )
- // --> OD 2007-06-27 #i77106#
+ // #i77106#
if ( ( nChildIndex < 0 ) ||
( nChildIndex >= getAccessibleChildCount() ) )
{
@@ -1270,7 +1260,7 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRow( sal_Int32 nChildIndex )
}
else
{
- ASSERT( !aCell.IsValid(), "SwAccessibleTable::getAccessibleColumn:"
+ OSL_ENSURE( !aCell.IsValid(), "SwAccessibleTable::getAccessibleColumn:"
"aCell not expected to be valid.");
throw lang::IndexOutOfBoundsException();
@@ -1285,11 +1275,11 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumn(
{
sal_Int32 nRet = -1;
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable )
- // --> OD 2007-06-27 #i77106#
+ // #i77106#
if ( ( nChildIndex < 0 ) ||
( nChildIndex >= getAccessibleChildCount() ) )
{
@@ -1309,7 +1299,7 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumn(
}
else
{
- ASSERT( !aCell.IsValid(), "SwAccessibleTable::getAccessibleColumn:"
+ OSL_ENSURE( !aCell.IsValid(), "SwAccessibleTable::getAccessibleColumn:"
"aCell not expected to be valid.");
throw lang::IndexOutOfBoundsException();
@@ -1347,7 +1337,7 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleTable::getSupportedServiceNames()
void SwAccessibleTable::InvalidatePosOrSize( const SwRect& rOldBox )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if( HasTableData() )
GetTableData().SetTablePos( GetFrm()->Frm().Pos() );
@@ -1357,7 +1347,7 @@ void SwAccessibleTable::InvalidatePosOrSize( const SwRect& rOldBox )
void SwAccessibleTable::Dispose( sal_Bool bRecursive )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if( GetRegisteredIn() )
pRegisteredIn->Remove( this );
@@ -1368,10 +1358,10 @@ void SwAccessibleTable::Dispose( sal_Bool bRecursive )
void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrmOrObj,
sal_Bool bRecursive )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const SwFrm *pFrm = rChildFrmOrObj.GetSwFrm();
- ASSERT( pFrm, "frame expected" );
+ OSL_ENSURE( pFrm, "frame expected" );
if( HasTableData() )
{
FireTableChangeEvent( GetTableData() );
@@ -1391,18 +1381,16 @@ void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrmOrObj,
void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChildFrmOrObj,
const SwRect& rOldBox )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if( HasTableData() )
{
- ASSERT( !HasTableData() ||
+ OSL_ENSURE( !HasTableData() ||
GetFrm()->Frm().Pos() == GetTableData().GetTablePos(),
"table has invalid position" );
if( HasTableData() )
{
- // --> OD 2007-06-28 #i77106#
- SwAccessibleTableData_Impl *pNewTableData = CreateNewTableData();
- // <--
+ SwAccessibleTableData_Impl *pNewTableData = CreateNewTableData(); // #i77106#
if( !pNewTableData->CompareExtents( GetTableData() ) )
{
FireTableChangeEvent( GetTableData() );
@@ -1416,9 +1404,8 @@ void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChil
}
}
- // --> OD 2010-02-18 #i013961# - always call super class method
+ // #i013961# - always call super class method
SwAccessibleContext::InvalidateChildPosOrSize( rChildFrmOrObj, rOldBox );
- // <--
}
@@ -1430,12 +1417,10 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild(
sal_Int32 nChildIndex )
throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable );
- // --> OD 2007-06-27 #i77106#
- if( (nChildIndex < 0) || (nChildIndex >= getAccessibleChildCount()) )
- // <--
+ if( (nChildIndex < 0) || (nChildIndex >= getAccessibleChildCount()) ) // #i77106#
throw lang::IndexOutOfBoundsException();
// preliminaries: get 'our' table box, and get the cursor shell
@@ -1446,13 +1431,11 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild(
if( pCrsrShell == NULL )
return;
- // --> OD 2004-11-16 #111714# - assure, that child, indentified by the given
- // index, isn't already selected.
+ // assure, that child, indentified by the given index, isn't already selected.
if ( IsChildSelected( nChildIndex ) )
{
return;
}
- // <--
// now we can start to do the work: check whether we already have
// a table selection (in 'our' table). If so, extend the
@@ -1477,14 +1460,6 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild(
const SwStartNode* pStartNode = pBox->GetSttNd();
if( pSelectedTable == NULL || !pCrsrShell->GetTblCrs() )
{
- // if we're in the wrong table, or there's no table selection
- // at all, then select the current table cell.
-// SwPaM* pPaM = pCrsrShell->GetCrsr();
-// pPaM->DeleteMark();
-// *(pPaM->GetPoint()) = SwPosition( *pStartNode );
-// pPaM->Move( fnMoveForward, fnGoNode );
-// // pCrsrShell->SelTblBox();
-
pCrsrShell->StartAction();
// Set cursor into current cell. This deletes any table cursor.
SwPaM aPaM( *pStartNode );
@@ -1514,20 +1489,6 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild(
*(aPaM.GetMark()) = *pPaM->GetMark();
Select( aPaM );
- // if only one box is selected, we select this one in
- // order to maintain our table selection
-// if( aPaM.GetPoint()->nNode.GetNode().FindTableBoxStartNode() ==
-// aPaM.GetMark()->nNode.GetNode().FindTableBoxStartNode() )
-// {
-// // pCrsrShell->SelTblBox();
-// }
-// else
-// {
- // finally; set the selection. This will call UpdateCursor
- // on the cursor shell, too.
-// pCrsrShell->KillPams();
- // pCrsrShell->SetSelection( aPaM );
-// }
}
}
@@ -1537,12 +1498,10 @@ sal_Bool SAL_CALL SwAccessibleTable::isAccessibleChildSelected(
throw ( lang::IndexOutOfBoundsException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable );
- // --> OD 2007-06-27 #i77106#
- if( (nChildIndex < 0) || (nChildIndex >= getAccessibleChildCount()) )
- // <--
+ if( (nChildIndex < 0) || (nChildIndex >= getAccessibleChildCount()) ) // #i77106#
throw lang::IndexOutOfBoundsException();
return IsChildSelected( nChildIndex );
@@ -1551,7 +1510,7 @@ sal_Bool SAL_CALL SwAccessibleTable::isAccessibleChildSelected(
void SAL_CALL SwAccessibleTable::clearAccessibleSelection( )
throw ( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable );
@@ -1570,23 +1529,19 @@ void SAL_CALL SwAccessibleTable::selectAllAccessibleChildren( )
// first clear selection, then select first and last child
clearAccessibleSelection();
selectAccessibleChild( 0 );
- // --> OD 2007-06-27 #i77106#
- selectAccessibleChild( getAccessibleChildCount()-1 );
- // <--
+ selectAccessibleChild( getAccessibleChildCount()-1 ); // #i77106#
}
sal_Int32 SAL_CALL SwAccessibleTable::getSelectedAccessibleChildCount( )
throw ( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable );
// iterate over all children and count isAccessibleChildSelected()
sal_Int32 nCount = 0;
- // --> OD 2007-06-27 #i71106#
- sal_Int32 nChildren = getAccessibleChildCount();
- // <--
+ sal_Int32 nChildren = getAccessibleChildCount(); // #i71106#
for( sal_Int32 n = 0; n < nChildren; n++ )
if( IsChildSelected( n ) )
nCount++;
@@ -1599,7 +1554,7 @@ uno::Reference<XAccessible> SAL_CALL SwAccessibleTable::getSelectedAccessibleChi
throw ( lang::IndexOutOfBoundsException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable );
// paremter checking (part 1): index lower 0
@@ -1612,35 +1567,32 @@ uno::Reference<XAccessible> SAL_CALL SwAccessibleTable::getSelectedAccessibleChi
if( nChildIndex < 0 )
throw lang::IndexOutOfBoundsException();
- // --> OD 2007-06-28 #i77106#
+ // #i77106#
if ( nChildIndex >= getAccessibleChildCount() )
{
throw lang::IndexOutOfBoundsException();
}
- // <--
return getAccessibleChild( nChildIndex );
}
-// --> OD 2004-11-16 #111714# - index has to be treated as global child index.
+// index has to be treated as global child index.
void SAL_CALL SwAccessibleTable::deselectAccessibleChild(
sal_Int32 nChildIndex )
throw ( lang::IndexOutOfBoundsException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleTable );
SwCrsrShell* pCrsrShell = GetCrsrShell();
- // --> OD 2004-11-16 #111714# - index has to be treated as global child index
+ // index has to be treated as global child index
if ( !pCrsrShell )
throw lang::IndexOutOfBoundsException();
// assure, that given child index is in bounds.
- // --> OD 2007-06-27 #i77106#
- if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount() )
- // <--
+ if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount() ) // #i77106#
throw lang::IndexOutOfBoundsException();
// assure, that child, identified by the given index, is selected.
@@ -1677,13 +1629,12 @@ void SAL_CALL SwAccessibleTable::deselectAccessibleChild(
pCrsrShell->EndAction();
}
-// --> OD 2007-06-28 #i77106#
-// implementation of class <SwAccessibleTableColHeaders>
+// #i77106# - implementation of class <SwAccessibleTableColHeaders>
SwAccessibleTableColHeaders::SwAccessibleTableColHeaders( SwAccessibleMap *pMap2,
const SwTabFrm *pTabFrm )
: SwAccessibleTable( pMap2, pTabFrm )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const SwFrmFmt *pFrmFmt = pTabFrm->GetFmt();
const_cast< SwFrmFmt * >( pFrmFmt )->Add( this );
@@ -1705,9 +1656,7 @@ SwAccessibleTableColHeaders::SwAccessibleTableColHeaders( SwAccessibleMap *pMap2
OUString sDesc2 = GetResource( STR_ACCESS_TABLE_DESC, &sArg1, &sArg2 );
SetDesc( sDesc2 );
- // --> OD 2008-03-10 #i85634#
- NotRegisteredAtAccessibleMap();
- // <--
+ NotRegisteredAtAccessibleMap(); // #i85634#
}
SwAccessibleTableData_Impl* SwAccessibleTableColHeaders::CreateNewTableData()
@@ -1732,7 +1681,7 @@ uno::Any SAL_CALL SwAccessibleTableColHeaders::queryInterface( const uno::Type&
sal_Int32 SAL_CALL SwAccessibleTableColHeaders::getAccessibleChildCount(void)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext )
@@ -1801,3 +1750,5 @@ uno::Reference< XAccessibleTable >
static const sal_Char sImplName[] = "com.sun.star.comp.Writer.SwAccessibleTableColumnHeadersView";
return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplName));
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/acctable.hxx b/sw/source/core/access/acctable.hxx
index 8bdf2e8b49b2..04fe465a91a6 100644
--- a/sw/source/core/access/acctable.hxx
+++ b/sw/source/core/access/acctable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,15 +68,13 @@ protected:
virtual ~SwAccessibleTable();
- // --> OD 2007-06-27 #i77106#
+ // #i77106#
inline void SetDesc( ::rtl::OUString sNewDesc )
{
sDesc = sNewDesc;
}
- // --> OD 2007-06-28 #i77106#
- virtual SwAccessibleTableData_Impl* CreateNewTableData();
- // <--
+ virtual SwAccessibleTableData_Impl* CreateNewTableData(); // #i77106#
// force update of table data
void UpdateTableData();
@@ -252,7 +251,7 @@ public:
throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
::com::sun::star::uno::RuntimeException);
- // --> OD 2004-11-16 #111714# - index has to be treated as global child index.
+ // index has to be treated as global child index.
virtual void SAL_CALL deselectAccessibleChild(
sal_Int32 nChildIndex )
throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
@@ -267,8 +266,7 @@ inline SwAccessibleTableData_Impl& SwAccessibleTable::GetTableData()
return *mpTableData;
}
-// --> OD 2007-06-28 #i77106#
-// subclass to represent table column headers
+// #i77106# - subclass to represent table column headers
class SwAccessibleTableColHeaders : public SwAccessibleTable
{
protected:
@@ -330,3 +328,5 @@ public:
};
// <--
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx
index 75fc1fdebc0e..d86e3e3a8173 100644
--- a/sw/source/core/access/acctextframe.cxx
+++ b/sw/source/core/access/acctextframe.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
#include <rtl/uuid.h>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
@@ -43,9 +44,7 @@
#include <flyfrm.hxx>
#include <accmap.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
-// --> OD 2009-07-14 #i73249#
-#include <hints.hxx>
-// <--
+#include <hints.hxx> // #i73249#
#include "acctextframe.hxx"
using namespace ::com::sun::star;
@@ -87,9 +86,8 @@ SwAccessibleTextFrame::~SwAccessibleTextFrame()
void SwAccessibleTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
- // --> OD 2009-07-14 #i73249#
- // suppress handling of RES_NAME_CHANGED in case that attribute Title is
- // used as the accessible name.
+ // #i73249# - suppress handling of RES_NAME_CHANGED
+ // in case that attribute Title is used as the accessible name.
if ( nWhich != RES_NAME_CHANGED ||
msTitle.getLength() == 0 )
{
@@ -99,7 +97,7 @@ void SwAccessibleTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( GetFrm() );
switch( nWhich )
{
- // --> OD 2009-07-14 #i73249#
+ // #i73249#
case RES_TITLE_CHANGED:
{
const String& sOldTitle(
@@ -156,11 +154,11 @@ void SwAccessibleTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
-// --> OD 2009-07-14 #i73249#
+// #i73249#
OUString SAL_CALL SwAccessibleTextFrame::getAccessibleName (void)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext )
@@ -175,7 +173,7 @@ OUString SAL_CALL SwAccessibleTextFrame::getAccessibleName (void)
OUString SAL_CALL SwAccessibleTextFrame::getAccessibleDescription (void)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext )
@@ -212,7 +210,7 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleTextFrame::getSupportedServiceNam
uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTextFrame::getImplementationId()
throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -254,7 +252,7 @@ AccessibleRelation SwAccessibleTextFrame::makeRelation( sal_Int16 nType, const S
uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleTextFrame::getAccessibleRelationSet( )
throw ( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleContext );
// get the frame, and insert prev/next relations into helper
@@ -276,3 +274,5 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleTextFrame::getAccess
return pHelper;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/acctextframe.hxx b/sw/source/core/access/acctextframe.hxx
index d6c9a7a74331..f9b90fe50d19 100644
--- a/sw/source/core/access/acctextframe.hxx
+++ b/sw/source/core/access/acctextframe.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,7 +38,7 @@ namespace com { namespace star {
class SwAccessibleTextFrame : public SwAccessibleFrameBase
{
private:
- // --> OD 2009-07-14 #i73249#
+ // #i73249#
::rtl::OUString msTitle;
::rtl::OUString msDesc;
// <--
@@ -55,8 +56,7 @@ public:
//===== XAccessibleContext ==============================================
- // --> OD 2009-07-14 #i73249#
- /// Return the object's current name.
+ // #i73249# - Return the object's current name.
virtual ::rtl::OUString SAL_CALL
getAccessibleName (void)
throw (::com::sun::star::uno::RuntimeException);
@@ -113,3 +113,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/parachangetrackinginfo.cxx b/sw/source/core/access/parachangetrackinginfo.cxx
index 465e4a01b3da..b8c2cdfa68ff 100644
--- a/sw/source/core/access/parachangetrackinginfo.cxx
+++ b/sw/source/core/access/parachangetrackinginfo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -32,7 +30,6 @@
#include <parachangetrackinginfo.hxx>
-#include <errhdl.hxx>
#include <wrong.hxx>
#include <com/sun/star/text/TextMarkupType.hpp>
@@ -56,7 +53,7 @@ namespace {
if ( !rTxtFrm.GetTxtNode() )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<initChangeTrackTextMarkupLists(..) - missing <SwTxtNode> instance!" );
return;
}
@@ -65,7 +62,7 @@ namespace {
const IDocumentRedlineAccess* pIDocChangeTrack( rTxtNode.getIDocumentRedlineAccess() );
if ( !pIDocChangeTrack )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<initChangeTrackTextMarkupLists(..) - missing <IDocumentRedlineAccess> instance!" );
return;
}
@@ -193,9 +190,9 @@ const SwWrongList* SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList( co
if ( mpChangeTrackInsertionTextMarkupList == 0 )
{
- ASSERT( mpChangeTrackDeletionTextMarkupList == 0,
+ OSL_ENSURE( mpChangeTrackDeletionTextMarkupList == 0,
"<SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList(..) - <mpChangeTrackDeletionTextMarkupList> expected to be NULL." );
- ASSERT( mpChangeTrackFormatChangeTextMarkupList == 0,
+ OSL_ENSURE( mpChangeTrackFormatChangeTextMarkupList == 0,
"<SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList(..) - <mpChangeTrackFormatChangeTextMarkupList> expected to be NULL." );
initChangeTrackTextMarkupLists( mrTxtFrm,
mpChangeTrackInsertionTextMarkupList,
@@ -222,10 +219,12 @@ const SwWrongList* SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList( co
break;
default:
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList(..)> - misusage - unexpected text markup type for change tracking." );
}
}
return pChangeTrackingTextMarkupList;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/parachangetrackinginfo.hxx b/sw/source/core/access/parachangetrackinginfo.hxx
index 91131f37b757..fea7d2fb5f14 100644
--- a/sw/source/core/access/parachangetrackinginfo.hxx
+++ b/sw/source/core/access/parachangetrackinginfo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -57,3 +55,4 @@ class SwParaChangeTrackingInfo
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/textmarkuphelper.cxx b/sw/source/core/access/textmarkuphelper.cxx
index 90444e4cdca0..6eb9ffa9edab 100644
--- a/sw/source/core/access/textmarkuphelper.cxx
+++ b/sw/source/core/access/textmarkuphelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,6 @@
#include <algorithm>
#include <comphelper/stlunosequence.hxx>
-#include <errhdl.hxx>
#include <com/sun/star/text/TextMarkupType.hpp>
#include <com/sun/star/accessibility/TextSegment.hpp>
@@ -85,14 +85,14 @@ namespace {
SwTextMarkupHelper::SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData,
const SwTxtNode& rTxtNode )
: mrPortionData( rPortionData )
- // --> OD 2010-02-19 #i108125#
+ // #i108125#
, mpTxtNode( &rTxtNode )
, mpTextMarkupList( 0 )
// <--
{
}
-// --> OD 2010-02-19 #i108125#
+// #i108125#
SwTextMarkupHelper::SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData,
const SwWrongList& rTextMarkupList )
: mrPortionData( rPortionData )
@@ -108,7 +108,7 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupTyp
{
sal_Int32 nTextMarkupCount( 0 );
- // --> OD 2010-02-19 #i108125#
+ // #i108125#
const SwWrongList* pTextMarkupList =
mpTextMarkupList
? mpTextMarkupList
@@ -138,7 +138,7 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupTyp
aTextMarkupSegment.SegmentStart = -1;
aTextMarkupSegment.SegmentEnd = -1;
- // --> OD 2010-02-19 #i108125#
+ // #i108125#
const SwWrongList* pTextMarkupList =
mpTextMarkupList
? mpTextMarkupList
@@ -161,7 +161,7 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupTyp
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwTextMarkupHelper::getTextMarkup(..)> - missing <SwWrongArea> instance" );
}
}
@@ -187,7 +187,7 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupTyp
return uno::Sequence< ::com::sun::star::accessibility::TextSegment >();
}
- // --> OD 2010-02-19 #i108125#
+ // #i108125#
const SwWrongList* pTextMarkupList =
mpTextMarkupList
? mpTextMarkupList
@@ -203,7 +203,7 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupTyp
{
const SwWrongArea* pTextMarkup =
pTextMarkupList->GetElement( static_cast<sal_uInt16>(nTextMarkupIdx) );
- ASSERT( pTextMarkup,
+ OSL_ENSURE( pTextMarkup,
"<SwTextMarkupHelper::getTextMarkup(..)> - missing <SwWrongArea> instance" );
if ( pTextMarkup &&
pTextMarkup->mnPos <= nCoreCharIndex &&
@@ -229,3 +229,5 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupTyp
return aTextMarkups;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/textmarkuphelper.hxx b/sw/source/core/access/textmarkuphelper.hxx
index 9b2bb519a2a1..57d3152bab2a 100644
--- a/sw/source/core/access/textmarkuphelper.hxx
+++ b/sw/source/core/access/textmarkuphelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,19 +40,14 @@ struct TextSegment;
class SwAccessiblePortionData;
class SwTxtNode;
-// --> OD 2010-02-19 #i108125#
-class SwWrongList;
-// <--
-
+class SwWrongList; // #i108125#
class SwTextMarkupHelper
{
public:
SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData,
const SwTxtNode& rTxtNode );
- // --> OD 2010-02-19 #i108125#
SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData,
- const SwWrongList& rTextMarkupList );
- // <--
+ const SwWrongList& rTextMarkupList ); // #i108125#
~SwTextMarkupHelper() {}
sal_Int32 getTextMarkupCount( const sal_Int32 nTextMarkupType )
@@ -78,10 +74,11 @@ class SwTextMarkupHelper
const SwAccessiblePortionData& mrPortionData;
- // --> OD 2010-02-19 #i108125#
+ // #i108125#
const SwTxtNode* mpTxtNode;
const SwWrongList* mpTextMarkupList;
// <--
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index bbdedfea13d4..f25f117b36f1 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,7 @@
#include <swcache.hxx>
#include <swfntcch.hxx>
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
#include <unotextmarkup.hxx>
#endif
@@ -47,8 +48,6 @@ TYPEINIT0(SwClient); //rtti
|* SwClient::SwClient(SwModify *)
|*
|* Beschreibung callback.doc V1.14
-|* Ersterstellung VB 20.03.91
-|* Letzte Aenderung MA 20. Mar. 95
*************************************************************************/
@@ -69,8 +68,6 @@ SwClient::SwClient(SwModify *pToRegisterIn)
|* SwClient::Modify()
|*
|* Beschreibung callback.doc V1.14
-|* Ersterstellung VB 20.03.91
-|* Letzte Aenderung VB 20.03.91
*************************************************************************/
@@ -96,8 +93,6 @@ void SwClient::Modify( SfxPoolItem *pOld, SfxPoolItem * )
|* SwClient::~SwClient()
|*
|* Beschreibung callback.doc V1.14
-|* Ersterstellung VB 20.03.91
-|* Letzte Aenderung MA 25. Jan. 94
*************************************************************************/
@@ -106,7 +101,7 @@ SwClient::~SwClient()
if( pRegisteredIn && pRegisteredIn->GetDepends() )
pRegisteredIn->Remove( this );
- ASSERT( !IsModifyLocked(), "Modify destroyed but locked." );
+ OSL_ENSURE( !IsModifyLocked(), "Modify destroyed but locked." );
}
@@ -120,8 +115,6 @@ sal_Bool SwClient::GetInfo( SfxPoolItem& ) const
|* SwModify::SwModify( SwModify * )
|*
|* Beschreibung Dokument 1.7
-|* Ersterstellung JP 20.11.90
-|* Letzte Aenderung VB 20.03.91
*************************************************************************/
@@ -141,8 +134,6 @@ SwModify::SwModify( const SwModify & )
|* SwModify::~SwModify()
|*
|* Beschreibung Dokument 1.7
-|* Ersterstellung JP 20.11.90
-|* Letzte Aenderung JP 15.04.94
*************************************************************************/
@@ -188,8 +179,6 @@ SwModify::~SwModify()
|* SwModify::Modify( SwHint * pOldValue, SwHint * pNewValue )
|*
|* Beschreibung Dokument 1.7
-|* Ersterstellung JP 20.11.90
-|* Letzte Aenderung MA 20. Mar. 95
*************************************************************************/
@@ -208,9 +197,7 @@ void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
LockModify();
-#ifndef DBG_UTIL
- bInModify = sal_True;
-#else
+#if OSL_DEBUG_LEVEL > 1
if( !pOldValue )
bInModify = sal_True;
else
@@ -231,6 +218,8 @@ void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
default:
bInModify = sal_True;
}
+#else
+ bInModify = sal_True;
#endif
SwClientIter aIter( *this );
@@ -271,24 +260,22 @@ sal_Bool SwModify::GetInfo( SfxPoolItem& rInfo ) const
|* SwModify::Add( SwClient *pDepend )
|*
|* Beschreibung Dokument 1.7
-|* Ersterstellung JP 20.11.90
-|* Letzte Aenderung JP 14.09.94
*************************************************************************/
void SwModify::Add(SwClient *pDepend)
{
- ASSERT( !bInModify, "Client innerhalb des eigenen Modifies einfuegen?" );
+ OSL_ENSURE( !bInModify, "Client innerhalb des eigenen Modifies einfuegen?" );
// nur wenn das hier noch nicht eingetragen ist einfuegen
if(pDepend->pRegisteredIn != this )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
SwClientIter* pTmp = pClientIters;
while( pTmp )
{
- ASSERT( &pTmp->rRoot != pRoot,
+ OSL_ENSURE( &pTmp->rRoot != pRoot,
"Client beim angemeldeten ClientIter einfuegen?" );
pTmp = pTmp->pNxtIter;
}
@@ -321,8 +308,6 @@ void SwModify::Add(SwClient *pDepend)
|* SwModify::_Remove( SwClient *pDepend )
|*
|* Beschreibung Dokument 1.7
-|* Ersterstellung JP 20.11.90
-|* Letzte Aenderung JP 14.09.94
*************************************************************************/
@@ -330,7 +315,9 @@ void SwModify::Add(SwClient *pDepend)
SwClient *SwModify::_Remove(SwClient * pDepend)
{
// FME 2007-07-16 #i79641# SwXTextMarkup is allowed to be removed ...
- ASSERT( !bInModify || 0 != dynamic_cast<SwXTextMarkup*>(pDepend), "Client innerhalb des eigenen Modifies loeschen?" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( !bInModify || 0 != dynamic_cast<SwXTextMarkup*>(pDepend), "Client innerhalb des eigenen Modifies loeschen?" );
+#endif
// loesche das Object aus der Liste und setze den
// Registrierungs-Pointer zurueck
@@ -353,10 +340,9 @@ SwClient *SwModify::_Remove(SwClient * pDepend)
if( pTmp->pAkt == pDepend || pTmp->pDelNext == pDepend )
pTmp->pDelNext = pR;
- // --> FME 2006-02-03 #127369# Notify SwClientIter if mpWatchClient is removed
+ // Notify SwClientIter if mpWatchClient is removed
if ( pTmp->mpWatchClient == pDepend )
pTmp->mpWatchClient = 0;
- // <--
pTmp = pTmp->pNxtIter;
}
@@ -365,7 +351,7 @@ SwClient *SwModify::_Remove(SwClient * pDepend)
pDepend->pRight = 0;
}
else {
- ASSERT( sal_False, "SwModify::Remove(): pDepend nicht gefunden");
+ OSL_ENSURE( sal_False, "SwModify::Remove(): pDepend nicht gefunden");
}
pDepend->pRegisteredIn = 0;
return pDepend;
@@ -374,9 +360,6 @@ SwClient *SwModify::_Remove(SwClient * pDepend)
/*************************************************************************
|* SwModify::CheckCaching( const sal_uInt16 nWhich )
-|*
-|* Ersterstellung JP 25.06.95
-|* Letzte Aenderung JP 25.06.95
*************************************************************************/
@@ -420,8 +403,6 @@ void SwModify::CheckCaching( const sal_uInt16 nWhich )
|* SwDepend::SwDepend(SwClient *pTellHim,SwModify *pDepend)
|*
|* Beschreibung callback.doc V1.14
-|* Ersterstellung VB 20.03.91
-|* Letzte Aenderung VB 20.03.91
*************************************************************************/
@@ -436,8 +417,6 @@ SwDepend::SwDepend(SwClient *pTellHim, SwModify *pDepend)
|* SwDepend::Modify(SwHint *, SwHint *)
|*
|* Beschreibung callback.doc V1.14
-|* Ersterstellung VB 20.03.91
-|* Letzte Aenderung VB 20.03.91
|*
*************************************************************************/
@@ -494,7 +473,7 @@ SwClientIter::~SwClientIter()
while( pTmp->pNxtIter != this )
if( 0 == ( pTmp = pTmp->pNxtIter ) )
{
- ASSERT( this, "wo ist mein Pointer" );
+ OSL_ENSURE( this, "wo ist mein Pointer" );
return ;
}
pTmp->pNxtIter = pNxtIter;
@@ -503,13 +482,9 @@ SwClientIter::~SwClientIter()
}
-#ifndef CFRONT
// Postfix Operator
SwClient* SwClientIter::operator++(int)
{
-// solange der CFRONT Prefix und PostFix nicht unterscheiden kann, immer
-// als Prefix-Operator arbeiten. Wenn der CFRONT es kann, muss auch der
-// Code entsprechen umgestellt werden !!!
if( pDelNext == pAkt )
{
pAkt = pAkt->pRight;
@@ -519,7 +494,6 @@ SwClient* SwClientIter::operator++(int)
pAkt = pDelNext;
return pAkt;
}
-#endif
// Prefix Operator
@@ -536,7 +510,6 @@ SwClient* SwClientIter::operator++()
}
-#ifndef CFRONT
// Postfix Operator
SwClient* SwClientIter::operator--(int)
{
@@ -550,7 +523,6 @@ SwClient* SwClientIter::operator--(int)
pDelNext = pAkt;
return pAkt;
}
-#endif
// Prefix Operator
@@ -632,3 +604,4 @@ SwClient* SwClientIter::Next()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
index cb5624b615e4..aae83558ca47 100644
--- a/sw/source/core/attr/cellatr.cxx
+++ b/sw/source/core/attr/cellatr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,7 +60,7 @@ SwTblBoxNumFormat::SwTblBoxNumFormat( sal_uInt32 nFormat, sal_Bool bFlag )
int SwTblBoxNumFormat::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return GetValue() == ((SwTblBoxNumFormat&)rAttr).GetValue() &&
bAuto == ((SwTblBoxNumFormat&)rAttr).bAuto;
}
@@ -87,7 +88,7 @@ SwTblBoxFormula::SwTblBoxFormula( const String& rFormula )
int SwTblBoxFormula::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return GetFormula() == ((SwTblBoxFormula&)rAttr).GetFormula() &&
pDefinedIn == ((SwTblBoxFormula&)rAttr).pDefinedIn;
}
@@ -157,9 +158,6 @@ void SwTblBoxFormula::ChangeState( const SfxPoolItem* pItem )
// setze das Value-Flag zurueck
// JP 17.06.96: interne Darstellung auf alle Formeln
// (Referenzen auf andere Tabellen!!!)
-// if( VF_CMD & pFld->GetFormat() )
-// pFld->PtrToBoxNm( pUpdtFld->pTbl );
-// else
ChgValid( sal_False );
break;
case TBL_BOXNAME:
@@ -250,7 +248,7 @@ SwTblBoxValue::SwTblBoxValue( const double nVal )
int SwTblBoxValue::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT(SfxPoolItem::operator==(rAttr), "SwTblBoxValue: item not equal");
+ OSL_ENSURE(SfxPoolItem::operator==(rAttr), "SwTblBoxValue: item not equal");
SwTblBoxValue const& rOther( static_cast<SwTblBoxValue const&>(rAttr) );
// items with NaN should be equal to enable pooling
return ::rtl::math::isNan(nValue)
@@ -267,3 +265,4 @@ SfxPoolItem* SwTblBoxValue::Clone( SfxItemPool* ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/attr/fmtfollowtextflow.cxx b/sw/source/core/attr/fmtfollowtextflow.cxx
index 8bcd5b682116..b51d15be5cc3 100644
--- a/sw/source/core/attr/fmtfollowtextflow.cxx
+++ b/sw/source/core/attr/fmtfollowtextflow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,3 +36,5 @@ SfxPoolItem* SwFmtFollowTextFlow::Clone( SfxItemPool * ) const
{
return new SwFmtFollowTextFlow(*this);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
index fde57e74e2ff..038776466d43 100644
--- a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
+++ b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include "precompiled_sw.hxx"
#include <fmtwrapinfluenceonobjpos.hxx>
-#ifndef _UNOMID_H
#include <unomid.h>
-#endif
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -66,7 +65,7 @@ SwFmtWrapInfluenceOnObjPos& SwFmtWrapInfluenceOnObjPos::operator=(
int SwFmtWrapInfluenceOnObjPos::operator==( const SfxPoolItem& _rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( _rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( _rAttr ), "keine gleichen Attribute" );
return ( mnWrapInfluenceOnPosition ==
static_cast<const SwFmtWrapInfluenceOnObjPos&>(_rAttr).
GetWrapInfluenceOnObjPos() );
@@ -77,10 +76,10 @@ SfxPoolItem* SwFmtWrapInfluenceOnObjPos::Clone( SfxItemPool * ) const
return new SwFmtWrapInfluenceOnObjPos(*this);
}
-sal_Bool SwFmtWrapInfluenceOnObjPos::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFmtWrapInfluenceOnObjPos::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_WRAP_INFLUENCE:
@@ -89,17 +88,17 @@ sal_Bool SwFmtWrapInfluenceOnObjPos::QueryValue( Any& rVal, sal_uInt8 nMemberId
}
break;
default:
- ASSERT( false, "<SwFmtWrapInfluenceOnObjPos::QueryValue()> - unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( false, "<SwFmtWrapInfluenceOnObjPos::QueryValue()> - unknown MemberId" );
+ bRet = false;
}
return bRet;
}
-sal_Bool SwFmtWrapInfluenceOnObjPos::PutValue( const Any& rVal, sal_uInt8 nMemberId )
+bool SwFmtWrapInfluenceOnObjPos::PutValue( const Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
@@ -107,25 +106,24 @@ sal_Bool SwFmtWrapInfluenceOnObjPos::PutValue( const Any& rVal, sal_uInt8 nMembe
{
sal_Int16 nNewWrapInfluence = 0;
rVal >>= nNewWrapInfluence;
- // --> OD 2004-10-18 #i35017# - constant names have changed and
+ // #i35017# - constant names have changed and
// <ITERATIVE> has been added
if ( nNewWrapInfluence == text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ||
nNewWrapInfluence == text::WrapInfluenceOnPosition::ONCE_CONCURRENT ||
nNewWrapInfluence == text::WrapInfluenceOnPosition::ITERATIVE )
- // <--
{
SetWrapInfluenceOnObjPos( nNewWrapInfluence );
}
else
{
- ASSERT( false, "<SwFmtWrapInfluenceOnObjPos::PutValue(..)> - invalid attribute value" );
- bRet = sal_False;
+ OSL_ENSURE( false, "<SwFmtWrapInfluenceOnObjPos::PutValue(..)> - invalid attribute value" );
+ bRet = false;
}
}
break;
default:
- ASSERT( false, "<SwFmtWrapInfluenceOnObjPos::QueryValue()> - unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( false, "<SwFmtWrapInfluenceOnObjPos::QueryValue()> - unknown MemberId" );
+ bRet = false;
}
return bRet;
@@ -133,22 +131,21 @@ sal_Bool SwFmtWrapInfluenceOnObjPos::PutValue( const Any& rVal, sal_uInt8 nMembe
void SwFmtWrapInfluenceOnObjPos::SetWrapInfluenceOnObjPos( sal_Int16 _nWrapInfluenceOnPosition )
{
- // --> OD 2004-10-18 #i35017# - constant names have changed and consider
+ // #i35017# - constant names have changed and consider
// new value <ITERATIVE>
if ( _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ||
_nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_CONCURRENT ||
_nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ITERATIVE )
- // <--
{
mnWrapInfluenceOnPosition = _nWrapInfluenceOnPosition;
}
else
{
- ASSERT( false, "<SwFmtWrapInfluenceOnObjPos::SetWrapInfluenceOnObjPos(..)> - invalid attribute value" );
+ OSL_ENSURE( false, "<SwFmtWrapInfluenceOnObjPos::SetWrapInfluenceOnObjPos(..)> - invalid attribute value" );
}
}
-// --> OD 2004-10-18 #i35017# - add parameter <_bIterativeAsOnceConcurrent>
+// #i35017# - add parameter <_bIterativeAsOnceConcurrent>
// to control, if value <ITERATIVE> has to be treated as <ONCE_CONCURRENT>
sal_Int16 SwFmtWrapInfluenceOnObjPos::GetWrapInfluenceOnObjPos(
const bool _bIterativeAsOnceConcurrent ) const
@@ -163,4 +160,5 @@ sal_Int16 SwFmtWrapInfluenceOnObjPos::GetWrapInfluenceOnObjPos(
return nWrapInfluenceOnPosition;
}
-// <--
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index f1c9142b7193..d4b217e49d11 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,9 +37,7 @@
#include <doc.hxx>
#include <paratr.hxx> // fuer SwParaFmt - SwHyphenBug
#include <swcache.hxx>
-// --> OD 2006-11-22 #i71574#
#include <fmtcolfunc.hxx>
-// <--
TYPEINIT1( SwFmt, SwClient ); //rtti fuer SwFmt
@@ -109,8 +108,6 @@ SwFmt::SwFmt( const SwFmt& rFmt )
|* SwFmt &SwFmt::operator=(const SwFmt& aFmt)
|*
|* Beschreibung Dokument 1.14
-|* Ersterstellung JP 22.11.90
-|* Letzte Aenderung JP 05.08.94
*************************************************************************/
@@ -164,7 +161,7 @@ SwFmt &SwFmt::operator=(const SwFmt& rFmt)
void SwFmt::SetName( const String& rNewName, sal_Bool bBroadcast )
{
- ASSERT(!IsDefault(), "SetName: Defaultformat" );
+ OSL_ENSURE(!IsDefault(), "SetName: Defaultformat" );
if( bBroadcast )
{
SwStringMsgPoolItem aOld( RES_NAME_CHANGED, aFmtName );
@@ -241,8 +238,6 @@ void SwFmt::CopyAttrs( const SwFmt& rFmt, sal_Bool bReplace )
|* SwFmt::~SwFmt()
|*
|* Beschreibung Dokument 1.14
-|* Ersterstellung JP 22.11.90
-|* Letzte Aenderung JP 14.02.91
*************************************************************************/
@@ -252,14 +247,14 @@ SwFmt::~SwFmt()
/* alle Abhaengigen auf DerivedFrom umhaengen */
if( GetDepends() )
{
- ASSERT(DerivedFrom(), "SwFmt::~SwFmt: Def Abhaengige!" );
+ OSL_ENSURE(DerivedFrom(), "SwFmt::~SwFmt: Def Abhaengige!" );
bFmtInDTOR = sal_True;
SwFmt *pParentFmt = DerivedFrom();
- if (!pParentFmt) // see #112405#
+ if (!pParentFmt)
{
- DBG_ERROR( "~SwFmt: parent format missing" );
+ OSL_FAIL( "~SwFmt: parent format missing" );
}
else
{
@@ -280,8 +275,6 @@ SwFmt::~SwFmt()
|* void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
|*
|* Beschreibung Dokument 1.14
-|* Ersterstellung JP 22.11.90
-|* Letzte Aenderung JP 05.08.94
*************************************************************************/
@@ -371,9 +364,9 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
{
// wie finde ich heraus, ob nicht ich die Message versende ??
// aber wer ruft das hier ????
-//ASSERT( sal_False, "Modify ohne Absender verschickt" );
+// OSL_ENSURE( FALSE, "Modify ohne Absender verschickt" );
//JP 11.06.96: DropCaps koennen hierher kommen
-ASSERT( RES_PARATR_DROP == nWhich, "Modify ohne Absender verschickt" );
+ OSL_ENSURE( RES_PARATR_DROP == nWhich, "Modify ohne Absender verschickt" );
bWeiter = sal_False;
}
@@ -413,7 +406,7 @@ sal_Bool SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
if ( (pDerFrom == DerivedFrom()) || (pDerFrom == this) )
return sal_False;
- ASSERT( Which()==pDerFrom->Which()
+ OSL_ENSURE( Which()==pDerFrom->Which()
|| ( Which()==RES_CONDTXTFMTCOLL && pDerFrom->Which()==RES_TXTFMTCOLL)
|| ( Which()==RES_TXTFMTCOLL && pDerFrom->Which()==RES_CONDTXTFMTCOLL)
|| ( Which()==RES_FLYFRMFMT && pDerFrom->Which()==RES_FRMFMT ),
@@ -455,12 +448,11 @@ sal_Bool SwFmt::SetFmtAttr(const SfxPoolItem& rAttr )
{
if( 0 != ( bRet = (0 != aSet.Put( rAttr ))) )
aSet.SetModifyAtAttr( this );
- // --> OD 2006-11-22 #i71574#
+ // #i71574#
if ( nFmtWhich == RES_TXTFMTCOLL && rAttr.Which() == RES_PARATR_NUMRULE )
{
TxtFmtCollFunc::CheckTxtFmtCollForDeletionOfAssignmentToOutlineStyle( this );
}
- // <--
}
else
{
@@ -506,12 +498,11 @@ sal_Bool SwFmt::SetFmtAttr( const SfxItemSet& rSet )
{
if( 0 != ( bRet = (0 != aSet.Put( rSet ))) )
aSet.SetModifyAtAttr( this );
- // --> OD 2006-11-22 #i71574#
+ // #i71574#
if ( nFmtWhich == RES_TXTFMTCOLL )
{
TxtFmtCollFunc::CheckTxtFmtCollForDeletionOfAssignmentToOutlineStyle( this );
}
- // <--
}
else
{
@@ -568,10 +559,9 @@ sal_Bool SwFmt::ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
-// --> OD 2007-01-24 #i73790#
+// #i73790#
// method renamed
sal_uInt16 SwFmt::ResetAllFmtAttr()
-// <--
{
if( !aSet.Count() )
return 0;
@@ -603,10 +593,6 @@ sal_uInt16 SwFmt::ResetAllFmtAttr()
/*************************************************************************
|* void SwFmt::GetInfo( const SfxPoolItem& ) const
-|*
-|* Beschreibung
-|* Ersterstellung JP 18.04.94
-|* Letzte Aenderung JP 05.08.94
*************************************************************************/
@@ -648,9 +634,8 @@ void SwFmt::DelDiffs( const SfxItemSet& rSet )
}
}
-/** SwFmt::IsBackgroundTransparent - for feature #99657#
+/** SwFmt::IsBackgroundTransparent
- OD 22.08.2002
Virtual method to determine, if background of format is transparent.
Default implementation returns false. Thus, subclasses have to overload
method, if the specific subclass can have a transparent background.
@@ -664,15 +649,12 @@ sal_Bool SwFmt::IsBackgroundTransparent() const
return sal_False;
}
-/** SwFmt::IsShadowTransparent - for feature #99657#
+/** SwFmt::IsShadowTransparent
- OD 22.08.2002
Virtual method to determine, if shadow of format is transparent.
Default implementation returns false. Thus, subclasses have to overload
method, if the specific subclass can have a transparent shadow.
- @author OD
-
@return false, default implementation
*/
sal_Bool SwFmt::IsShadowTransparent() const
@@ -692,3 +674,4 @@ IDocumentTimerAccess* SwFmt::getIDocumentTimerAccess() { return GetDoc(); }
IDocumentFieldsAccess* SwFmt::getIDocumentFieldsAccess() { return GetDoc(); }
IDocumentChartDataProviderAccess* SwFmt::getIDocumentChartDataProviderAccess() { return GetDoc(); }
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx
index 3d9d284b8c6d..8be07e422fc1 100644
--- a/sw/source/core/attr/hints.cxx
+++ b/sw/source/core/attr/hints.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,14 +30,11 @@
#include "precompiled_sw.hxx"
#include <hints.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <editeng/scripttypeitem.hxx>
#include <hintids.hxx>
#include <swtypes.hxx>
#include <ndtxt.hxx>
-#include <errhdl.hxx>
SwFmtChg::SwFmtChg( SwFmt *pFmt )
: SwMsgPoolItem( RES_FMT_CHG ),
@@ -85,7 +83,7 @@ SwRefMarkFldUpdate::SwRefMarkFldUpdate( const OutputDevice* pOutput )
: SwMsgPoolItem( RES_REFMARKFLD_UPDATE ),
pOut( pOutput )
{
- ASSERT( pOut, "es muss ein OutputDevice-Pointer gesetzt werden!" );
+ OSL_ENSURE( pOut, "es muss ein OutputDevice-Pointer gesetzt werden!" );
}
@@ -104,7 +102,7 @@ SwTableFmlUpdate::SwTableFmlUpdate( const SwTable* pNewTbl )
{
DATA.pDelTbl = 0;
bModified = bBehindSplitLine = sal_False;
- ASSERT( pTbl, "es muss ein Table-Pointer gesetzt werden!" );
+ OSL_ENSURE( pTbl, "es muss ein Table-Pointer gesetzt werden!" );
}
@@ -138,11 +136,11 @@ SwAttrSetChg::~SwAttrSetChg()
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
void SwAttrSetChg::ClearItem( sal_uInt16 nWhch )
{
- ASSERT( bDelSet, "der Set darf nicht veraendert werden!" );
+ OSL_ENSURE( bDelSet, "der Set darf nicht veraendert werden!" );
pChgSet->ClearItem( nWhch );
}
@@ -157,14 +155,14 @@ SwMsgPoolItem::SwMsgPoolItem( sal_uInt16 nWhch )
// "Overhead" vom SfxPoolItem
int SwMsgPoolItem::operator==( const SfxPoolItem& ) const
{
- ASSERT( sal_False, "SwMsgPoolItem kennt kein ==" );
+ OSL_ENSURE( sal_False, "SwMsgPoolItem kennt kein ==" );
return 0;
}
SfxPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const
{
- ASSERT( sal_False, "SwMsgPoolItem kennt kein Clone" );
+ OSL_ENSURE( sal_False, "SwMsgPoolItem kennt kein Clone" );
return 0;
}
@@ -174,20 +172,19 @@ SfxPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const
* Ist keines vorhanden, returnt ein 0-Pointer !!!
* Used to be inlined (hintids.hxx) in PRODUCT.
******************************************************************************/
-#ifndef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich )
{
- return aAttrTab[ nWhich - POOLATTR_BEGIN ];
+ OSL_ASSERT( nWhich < POOLATTR_END && nWhich >= POOLATTR_BEGIN );
+
+ SfxPoolItem *pHt = aAttrTab[ nWhich - POOLATTR_BEGIN ];
+ OSL_ENSURE( pHt, "GetDfltFmtAttr(): Dflt == 0" );
+ return pHt;
}
#else
const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich )
{
- ASSERT_ID( nWhich < POOLATTR_END && nWhich >= POOLATTR_BEGIN,
- ERR_OUTOFSCOPE );
-
- SfxPoolItem *pHt = aAttrTab[ nWhich - POOLATTR_BEGIN ];
- ASSERT( pHt, "GetDfltFmtAttr(): Dflt == 0" );
- return pHt;
+ return aAttrTab[ nWhich - POOLATTR_BEGIN ];
}
#endif
@@ -207,17 +204,6 @@ SwVirtPageNumInfo::SwVirtPageNumInfo( const SwPageFrm *pPg ) :
{
}
-// --> OD 2008-02-19 #refactorlists#
-//SwNumRuleInfo::SwNumRuleInfo( const String& rRuleName )
-// : SwMsgPoolItem( RES_GETNUMNODES ), rName( rRuleName )
-//{
-//}
-
-//void SwNumRuleInfo::AddNode( SwTxtNode& rNd )
-//{
-// aList.Insert(rNd.GetIndex(), &rNd);
-//}
-
SwFindNearestNode::SwFindNearestNode( const SwNode& rNd )
: SwMsgPoolItem( RES_FINDNEARESTNODE ), pNd( &rNd ), pFnd( 0 )
@@ -306,3 +292,5 @@ sal_uInt16 GetWhichOfScript( sal_uInt16 nWhich, sal_uInt16 nScript )
nRet = nWhich;
return nRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
index 1753f06a8c1f..558f5ba7caf4 100644
--- a/sw/source/core/attr/swatrset.cxx
+++ b/sw/source/core/attr/swatrset.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,14 +44,10 @@
#include <node.hxx>
#include <paratr.hxx> // fuer SetModifyAtAttr
#include <cellatr.hxx> // fuer SetModifyAtAttr
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <istyleaccess.hxx>
#include <numrule.hxx>
-// --> OD 2008-03-19 #refactorlists#
#include <list.hxx>
-// <--
SwAttrPool::SwAttrPool( SwDoc* pD )
@@ -64,7 +61,7 @@ SwAttrPool::SwAttrPool( SwDoc* pD )
SetVersionMap( 2, 1, 75, pVersionMap2 );
SetVersionMap( 3, 1, 86, pVersionMap3 );
SetVersionMap( 4, 1,121, pVersionMap4 );
- // OD 2004-01-21 #i18732# - apply new version map
+ // #i18732# - apply new version map
SetVersionMap( 5, 1,130, pVersionMap5 );
SetVersionMap( 6, 1,136, pVersionMap6 );
}
@@ -159,7 +156,7 @@ sal_uInt16 SwAttrSet::ClearItem_BC( sal_uInt16 nWhich,
sal_uInt16 SwAttrSet::ClearItem_BC( sal_uInt16 nWhich1, sal_uInt16 nWhich2,
SwAttrSet* pOld, SwAttrSet* pNew )
{
- ASSERT( nWhich1 <= nWhich2, "kein gueltiger Bereich" );
+ OSL_ENSURE( nWhich1 <= nWhich2, "kein gueltiger Bereich" );
pNewSet = pNew;
pOldSet = pOld;
sal_uInt16 nRet = 0;
@@ -249,9 +246,8 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
{
if( Count() )
{
- // --> OD 2008-08-15 #i92811#
+ // #i92811#
SfxStringItem* pNewListIdItem( 0 );
- // <--
const SfxPoolItem* pItem;
const SwDoc *pSrcDoc = GetDoc();
@@ -273,7 +269,6 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
}
}
- // --> OD 2008-03-19 #refactorlists#
// copy list and if needed also the corresponding list style
// for text nodes
if ( pSrcDoc != pDstDoc &&
@@ -289,7 +284,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
// copy list style, if needed
const String sDefaultListStyleName =
pList->GetDefaultListStyleName();
- // --> OD 2008-08-15 #i92811#
+ // #i92811#
const SwNumRule* pDstDocNumRule =
pDstDoc->FindNumRulePtr( sDefaultListStyleName );
if ( !pDstDocNumRule )
@@ -320,13 +315,11 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
// copy list
pDstDoc->createList( sListId, sDefaultListStyleName );
}
- // <--
}
}
- // <--
- // JP 04.02.99: Task #61467# Seitenvorlagenwechsel mit kopieren
- // Gegenueber dem alten Verhalten, sie zu entfernen
+ // Seitenvorlagenwechsel mit kopieren Gegenueber dem alten
+ // Verhalten, sie zu entfernen
const SwPageDesc* pPgDesc;
if( pSrcDoc != pDstDoc && SFX_ITEM_SET == GetItemState(
RES_PAGEDESC, sal_False, &pItem ) &&
@@ -349,12 +342,11 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
if( pCNd )
{
- // --> OD 2008-08-15 #i92811#
+ // #i92811#
if ( pNewListIdItem != 0 )
{
aTmpSet.Put( *pNewListIdItem );
}
- // <--
pCNd->SetAttr( aTmpSet );
}
else
@@ -362,7 +354,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
}
else if( pCNd )
{
- // --> OD 2008-08-15 #i92811#
+ // #i92811#
if ( pNewListIdItem != 0 )
{
SfxItemSet aTmpSet( *this );
@@ -373,20 +365,18 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
{
pCNd->SetAttr( *this );
}
- // <--
}
else
pFmt->SetFmtAttr( *this );
- // --> OD 2008-08-15 #i92811#
+ // #i92811#
delete pNewListIdItem;
pNewListIdItem = 0;
- // <--
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
- ASSERT( !this, "weder Format noch ContentNode - keine Attribute kopiert");
+ OSL_ENSURE( !this, "weder Format noch ContentNode - keine Attribute kopiert");
#endif
}
@@ -402,3 +392,4 @@ sal_Bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId )
return sal_False;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/SwSmartTagMgr.cxx b/sw/source/core/bastyp/SwSmartTagMgr.cxx
index ac661389ae6a..2e773d532e41 100644
--- a/sw/source/core/bastyp/SwSmartTagMgr.cxx
+++ b/sw/source/core/bastyp/SwSmartTagMgr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,13 +30,11 @@
#include "precompiled_sw.hxx"
#include "SwSmartTagMgr.hxx"
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <swmodule.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
using namespace com::sun::star;
using namespace com::sun::star::uno;
@@ -47,7 +46,7 @@ SwSmartTagMgr& SwSmartTagMgr::Get()
if ( !mpTheSwSmartTagMgr )
{
mpTheSwSmartTagMgr = new SwSmartTagMgr( SwDocShell::Factory().GetModuleName() );
- mpTheSwSmartTagMgr->Init( rtl::OUString::createFromAscii("Writer") );
+ mpTheSwSmartTagMgr->Init(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Writer")));
}
return *mpTheSwSmartTagMgr;
}
@@ -64,7 +63,7 @@ SwSmartTagMgr::~SwSmartTagMgr()
// ::com::sun::star::util::XModifyListener
void SwSmartTagMgr::modified( const lang::EventObject& rEO ) throw( RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// Installed recognizers have changed. We remove all existing smart tags:
SW_MOD()->CheckSpellChanges( sal_False, sal_True, sal_True, sal_True );
@@ -75,7 +74,7 @@ void SwSmartTagMgr::modified( const lang::EventObject& rEO ) throw( RuntimeExcep
// ::com::sun::star::util::XChangesListener
void SwSmartTagMgr::changesOccurred( const util::ChangesEvent& rEvent ) throw( RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// Configuration has changed. We remove all existing smart tags:
SW_MOD()->CheckSpellChanges( sal_False, sal_True, sal_True, sal_True );
@@ -83,13 +82,4 @@ void SwSmartTagMgr::changesOccurred( const util::ChangesEvent& rEvent ) throw( R
SmartTagMgr::changesOccurred( rEvent );
}
-/*
-SmartTagMgr& SwSmartTagMgr::Get()
-{
- if ( !pSmartTagMgr )
- pSmartTagMgr = new SmartTagMgr( SwDocShell::Factory().GetModuleName() );
-
- return *pSmartTagMgr;
-}
-*/
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/bparr.cxx b/sw/source/core/bastyp/bparr.cxx
index 1b6db5d3dc52..f7f87e160dad 100644
--- a/sw/source/core/bastyp/bparr.cxx
+++ b/sw/source/core/bastyp/bparr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,11 +39,7 @@
// immer ~ 20 * MAXENTRY == 20000 Eintraege
const sal_uInt16 nBlockGrowSize = 20;
-#ifndef DBG_UTIL
-
-#define CHECKIDX( p, n, i, c )
-
-#else
+#if OSL_DEBUG_LEVEL > 2
#define CHECKIDX( p, n, i, c ) CheckIdx( p, n, i, c );
@@ -62,6 +59,10 @@ void CheckIdx( BlockInfo** ppInf, sal_uInt16 nBlock, sal_uLong nSize, sal_uInt16
DBG_ASSERT( nIdx == nSize, "BigPtrArray: Anzahl ungueltig" );
}
+#else
+
+#define CHECKIDX( p, n, i, c )
+
#endif
@@ -578,3 +579,4 @@ sal_uInt16 BigPtrArray::Compress( short nMax )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx
index 29fc02a3f7e1..c571e389acf8 100644
--- a/sw/source/core/bastyp/breakit.cxx
+++ b/sw/source/core/bastyp/breakit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,14 +32,10 @@
#include "breakit.hxx"
#include <unicode/uchar.h>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <unotools/localedatawrapper.hxx>
-#ifndef _SVX_LINGU_HXX
#include <editeng/unolingu.hxx>
-#endif
#include <editeng/scripttypeitem.hxx>
#include "swtypes.hxx"
@@ -71,18 +68,6 @@ SwBreakIt::SwBreakIt(
aForbiddenLang( LANGUAGE_DONTKNOW)
{
DBG_ASSERT( m_xMSF.is(), "SwBreakIt: no MultiServiceFactory" );
- //if ( m_xMSF.is() )
- //{
- // xBreak = uno::Reference< i18n::XBreakIterator >(
- // m_xMSF->createInstance(
- // rtl::OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ),
- // uno::UNO_QUERY);
-
- // xCTLDetect = uno::Reference< i18n::XScriptTypeDetector >(
- // m_xMSF->createInstance(
- // rtl::OUString::createFromAscii( "com.sun.star.i18n.ScriptTypeDetector" ) ),
- // uno::UNO_QUERY);
- // }
}
SwBreakIt::~SwBreakIt()
@@ -184,3 +169,4 @@ sal_uInt16 SwBreakIt::GetAllScriptsOfText( const String& rTxt ) const
return nRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index b5622c150801..ba6aa92fadb6 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,6 @@
#endif
#include <cstdlib>
#include <climits>
-// #include <cmath>
#include <cfloat>
#include <hintids.hxx>
#include <osl/diagnose.hxx>
@@ -59,9 +59,7 @@
#include <dbfld.hxx>
#include <expfld.hxx>
#include <usrfld.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <docfld.hxx>
#include <swunodef.hxx>
#include <swtypes.hxx>
@@ -71,35 +69,35 @@ using namespace ::com::sun::star;
// tippt sich schneller
#define RESOURCE ViewShell::GetShellRes()
-const sal_Char __FAR_DATA sCalc_Add[] = "add";
-const sal_Char __FAR_DATA sCalc_Sub[] = "sub";
-const sal_Char __FAR_DATA sCalc_Mul[] = "mul";
-const sal_Char __FAR_DATA sCalc_Div[] = "div";
-const sal_Char __FAR_DATA sCalc_Phd[] = "phd";
-const sal_Char __FAR_DATA sCalc_Sqrt[] = "sqrt";
-const sal_Char __FAR_DATA sCalc_Pow[] = "pow";
-const sal_Char __FAR_DATA sCalc_Or[] = "or";
-const sal_Char __FAR_DATA sCalc_Xor[] = "xor";
-const sal_Char __FAR_DATA sCalc_And[] = "and";
-const sal_Char __FAR_DATA sCalc_Not[] = "not";
-const sal_Char __FAR_DATA sCalc_Eq[] = "eq";
-const sal_Char __FAR_DATA sCalc_Neq[] = "neq";
-const sal_Char __FAR_DATA sCalc_Leq[] = "leq";
-const sal_Char __FAR_DATA sCalc_Geq[] = "geq";
-const sal_Char __FAR_DATA sCalc_L[] = "l";
-const sal_Char __FAR_DATA sCalc_G[] = "g";
-const sal_Char __FAR_DATA sCalc_Sum[] = "sum";
-const sal_Char __FAR_DATA sCalc_Mean[] = "mean";
-const sal_Char __FAR_DATA sCalc_Min[] = "min";
-const sal_Char __FAR_DATA sCalc_Max[] = "max";
-const sal_Char __FAR_DATA sCalc_Sin[] = "sin";
-const sal_Char __FAR_DATA sCalc_Cos[] = "cos";
-const sal_Char __FAR_DATA sCalc_Tan[] = "tan";
-const sal_Char __FAR_DATA sCalc_Asin[] = "asin";
-const sal_Char __FAR_DATA sCalc_Acos[] = "acos";
-const sal_Char __FAR_DATA sCalc_Atan[] = "atan";
-const sal_Char __FAR_DATA sCalc_Round[] = "round";
-const sal_Char __FAR_DATA sCalc_Date[] = "date";
+const sal_Char sCalc_Add[] = "add";
+const sal_Char sCalc_Sub[] = "sub";
+const sal_Char sCalc_Mul[] = "mul";
+const sal_Char sCalc_Div[] = "div";
+const sal_Char sCalc_Phd[] = "phd";
+const sal_Char sCalc_Sqrt[] = "sqrt";
+const sal_Char sCalc_Pow[] = "pow";
+const sal_Char sCalc_Or[] = "or";
+const sal_Char sCalc_Xor[] = "xor";
+const sal_Char sCalc_And[] = "and";
+const sal_Char sCalc_Not[] = "not";
+const sal_Char sCalc_Eq[] = "eq";
+const sal_Char sCalc_Neq[] = "neq";
+const sal_Char sCalc_Leq[] = "leq";
+const sal_Char sCalc_Geq[] = "geq";
+const sal_Char sCalc_L[] = "l";
+const sal_Char sCalc_G[] = "g";
+const sal_Char sCalc_Sum[] = "sum";
+const sal_Char sCalc_Mean[] = "mean";
+const sal_Char sCalc_Min[] = "min";
+const sal_Char sCalc_Max[] = "max";
+const sal_Char sCalc_Sin[] = "sin";
+const sal_Char sCalc_Cos[] = "cos";
+const sal_Char sCalc_Tan[] = "tan";
+const sal_Char sCalc_Asin[] = "asin";
+const sal_Char sCalc_Acos[] = "acos";
+const sal_Char sCalc_Atan[] = "atan";
+const sal_Char sCalc_Round[] = "round";
+const sal_Char sCalc_Date[] = "date";
@@ -113,7 +111,7 @@ struct _CalcOp
SwCalcOper eOp;
};
-_CalcOp __READONLY_DATA aOpTable[] = {
+_CalcOp const aOpTable[] = {
/* ACOS */ {{sCalc_Acos}, CALC_ACOS}, // Arcuscosinus
/* ADD */ {{sCalc_Add}, CALC_PLUS}, // Addition
/* AND */ {{sCalc_And}, CALC_AND}, // log. und
@@ -145,13 +143,13 @@ _CalcOp __READONLY_DATA aOpTable[] = {
/* XOR */ {{sCalc_Xor}, CALC_XOR} // log. xoder
};
-double __READONLY_DATA nRoundVal[] = {
+double const nRoundVal[] = {
5.0e+0, 0.5e+0, 0.5e-1, 0.5e-2, 0.5e-3, 0.5e-4, 0.5e-5, 0.5e-6,
0.5e-7, 0.5e-8, 0.5e-9, 0.5e-10,0.5e-11,0.5e-12,0.5e-13,0.5e-14,
0.5e-15,0.5e-16
};
-double __READONLY_DATA nKorrVal[] = {
+double const nKorrVal[] = {
9, 9e-1, 9e-2, 9e-3, 9e-4, 9e-5, 9e-6, 9e-7, 9e-8,
9e-9, 9e-10, 9e-11, 9e-12, 9e-13, 9e-14
};
@@ -262,9 +260,6 @@ double lcl_ConvertToDateValue( SwDoc& rDoc, sal_Int32 nDate )
|*
|* SwCalc::SwCalc( SwDoc* pD ) :
|*
-|* Erstellung OK 12-02-93 11:04am
-|* Letzte Aenderung JP 03.11.95
-|*
|******************************************************************************/
SwCalc::SwCalc( SwDoc& rD )
@@ -294,7 +289,7 @@ SwCalc::SwCalc( SwDoc& rD )
sCurrSym.EraseLeadingChars().EraseTrailingChars();
pCharClass->toLower( sCurrSym );
-static sal_Char __READONLY_DATA
+static sal_Char const
sNType0[] = "false",
sNType1[] = "true",
sNType2[] = "pi",
@@ -325,7 +320,7 @@ static sal_Char __READONLY_DATA
sNType26[] = "graph"
;
-static const sal_Char* __READONLY_DATA sNTypeTab[ 27 ] =
+static const sal_Char* const sNTypeTab[ 27 ] =
{
sNType0, sNType1, sNType2, sNType3, sNType4, sNType5,
sNType6, sNType7, sNType8, sNType9, sNType10, sNType11,
@@ -336,25 +331,25 @@ static const sal_Char* __READONLY_DATA sNTypeTab[ 27 ] =
// diese sind mit doppelten HashIds
sNType25, sNType26
};
-static sal_uInt16 __READONLY_DATA aHashValue[ 27 ] =
+static sal_uInt16 const aHashValue[ 27 ] =
{
34, 38, 43, 7, 18, 32, 22, 29, 30, 33, 3,
28, 24, 40, 9, 11, 26, 45, 4, 23, 36, 44, 19, 5, 1,
// diese sind mit doppelten HashIds
11, 38
};
-static sal_uInt16 __READONLY_DATA aAdrToken[ 12 ] =
+static sal_uInt16 const aAdrToken[ 12 ] =
{
USER_OPT_COMPANY, USER_OPT_STREET, USER_OPT_COUNTRY, USER_OPT_ZIP,
USER_OPT_CITY, USER_OPT_TITLE, USER_OPT_POSITION, USER_OPT_TELEPHONEWORK,
USER_OPT_TELEPHONEHOME, USER_OPT_FAX, USER_OPT_EMAIL, USER_OPT_STATE
};
-static sal_uInt16 SwDocStat::* __READONLY_DATA aDocStat1[ 3 ] =
+static sal_uInt16 SwDocStat::* const aDocStat1[ 3 ] =
{
&SwDocStat::nTbl, &SwDocStat::nGrf, &SwDocStat::nOLE
};
-static sal_uLong SwDocStat::* __READONLY_DATA aDocStat2[ 4 ] =
+static sal_uLong SwDocStat::* const aDocStat2[ 4 ] =
{
&SwDocStat::nPage, &SwDocStat::nPara,
&SwDocStat::nWord, &SwDocStat::nChar
@@ -400,20 +395,12 @@ static sal_uLong SwDocStat::* __READONLY_DATA aDocStat2[ 4 ] =
sTmpStr.AssignAscii( sNTypeTab[ 25 ] );
VarTable[ aHashValue[ 25 ] ]->pNext = new SwCalcExp( sTmpStr, nVal, 0 );
-// at time its better not to use "graph", because then the im-/export have
-// to change in all formulas this name.
-// nVal.PutLong( rDocStat.*aDocStat1[ 1 ] );
-// VarTable[ aHashValue[ 26 ] ]->pNext = new SwCalcExp(
-// sNTypeTab[ 26 ], nVal, 0 );
}
/******************************************************************************
|*
|* SwCalc::~SwCalc()
|*
-|* Erstellung OK 12-02-93 11:04am
-|* Letzte Aenderung OK 12-02-93 11:04am
-|*
|******************************************************************************/
SwCalc::~SwCalc()
@@ -430,9 +417,6 @@ SwCalc::~SwCalc()
|*
|* SwSbxValue SwCalc::Calculate( const String& rStr )
|*
-|* Erstellung OK 12-02-93 11:04am
-|* Letzte Aenderung OK 12-02-93 11:04am
-|*
|******************************************************************************/
SwSbxValue SwCalc::Calculate( const String& rStr )
@@ -465,8 +449,6 @@ SwSbxValue SwCalc::Calculate( const String& rStr )
|* nur beim errechnen von Tabellenzellen auf sal_False gesetzt
|* werden, damit keine Rundungsfehler beim zusammenstellen
|* der Formel entstehen.
-|* Erstellung OK 12-02-93 11:04am
-|* Letzte Aenderung JP 19.02.98
|*
|******************************************************************************/
@@ -508,9 +490,6 @@ String SwCalc::GetStrResult( double nValue, sal_Bool )
|*
|* SwCalcExp* SwCalc::VarLook( const String& )
|*
-|* Erstellung OK 12-02-93 11:04am
-|* Letzte Aenderung JP 15.11.99
-|*
|******************************************************************************/
SwCalcExp* SwCalc::VarInsert( const String &rStr )
@@ -524,9 +503,6 @@ SwCalcExp* SwCalc::VarInsert( const String &rStr )
|*
|* SwCalcExp* SwCalc::VarLook( const String& , sal_uInt16 ins )
|*
-|* Erstellung OK 12-02-93 11:04am
-|* Letzte Aenderung JP 15.11.99
-|*
|******************************************************************************/
SwCalcExp* SwCalc::VarLook( const String& rStr, sal_uInt16 ins )
{
@@ -591,7 +567,7 @@ SwCalcExp* SwCalc::VarLook( const String& rStr, sal_uInt16 ins )
// Name(p)=Adress.PLZ oder Adress.DATENSATZNUMMER
// DBSETNUMBERFLD = DatenSATZ-nummernfeld (NICHT "setze Datensatznummer!!!")
- // #101436#: At this point the "real" case variable has to be used
+ // At this point the "real" case variable has to be used
String sTmpName( rStr );
::ReplacePoint( sTmpName );
@@ -608,7 +584,7 @@ SwCalcExp* SwCalc::VarLook( const String& rStr, sal_uInt16 ins )
pMgr->OpenDataSource(sSourceName, sTableName, -1, false))
{
String sColumnName( GetColumnName( sTmpName ));
- ASSERT (sColumnName.Len(), "DB-Spaltenname fehlt!");
+ OSL_ENSURE(sColumnName.Len(), "DB-Spaltenname fehlt!");
String sDBNum( SwFieldType::GetTypeStr(TYP_DBSETNUMBERFLD) );
pCharClass->toLower(sDBNum);
@@ -658,7 +634,7 @@ SwCalcExp* SwCalc::VarLook( const String& rStr, sal_uInt16 ins )
VarTable[ ii ] = pNewExp;
String sColumnName( GetColumnName( sTmpName ));
- ASSERT( sColumnName.Len(), "DB-Spaltenname fehlt!" );
+ OSL_ENSURE( sColumnName.Len(), "DB-Spaltenname fehlt!" );
if( sColumnName.EqualsIgnoreCaseAscii(
SwFieldType::GetTypeStr( TYP_DBSETNUMBERFLD ) ))
{
@@ -681,9 +657,6 @@ SwCalcExp* SwCalc::VarLook( const String& rStr, sal_uInt16 ins )
|*
|* sal_Bool SwCalc::VarChange( const String& rStr, const SwSbxValue nValue )
|*
-|* Erstellung OK 12-02-93 11:04am
-|* Letzte Aenderung OK 12-02-93 11:04am
-|*
|******************************************************************************/
void SwCalc::VarChange( const String& rStr, double nValue )
@@ -714,9 +687,6 @@ void SwCalc::VarChange( const String& rStr, const SwSbxValue& rValue )
|*
|* sal_Bool SwCalc::Push( const void* pPtr )
|*
-|* Erstellung OK 12-02-93 11:05am
-|* Letzte Aenderung OK 12-02-93 11:05am
-|*
|******************************************************************************/
sal_Bool SwCalc::Push( const VoidPtr pPtr )
@@ -732,14 +702,11 @@ sal_Bool SwCalc::Push( const VoidPtr pPtr )
|*
|* void SwCalc::Pop( const void* pPtr )
|*
-|* Erstellung OK 12-02-93 11:05am
-|* Letzte Aenderung OK 12-02-93 11:05am
-|*
|******************************************************************************/
void SwCalc::Pop( const VoidPtr )
{
- ASSERT( aRekurStk.Count(), "SwCalc: Pop auf ungueltigen Ptr" );
+ OSL_ENSURE( aRekurStk.Count(), "SwCalc: Pop auf ungueltigen Ptr" );
aRekurStk.Remove( aRekurStk.Count() - 1 );
}
@@ -749,16 +716,13 @@ void SwCalc::Pop( const VoidPtr )
|*
|* SwCalcOper SwCalc::GetToken()
|*
-|* Erstellung OK 12-02-93 11:05am
-|* Letzte Aenderung JP 03.11.95
-|*
|******************************************************************************/
SwCalcOper SwCalc::GetToken()
{
#if OSL_DEBUG_LEVEL > 1
-//JP 25.01.2001: static for switch back to the "old" implementation of the
-// calculator, which don't use the I18N routines.
+//static for switch back to the "old" implementation of the
+//calculator, which don't use the I18N routines.
static int nUseOld = 0;
if( !nUseOld )
{
@@ -1103,8 +1067,7 @@ else
}
break;
- default: if( ch && pCharClass->isLetter( sCommand, nCommandPos - 1)
- || '_' == ch )
+ default: if (ch && (pCharClass->isLetter( sCommand, nCommandPos - 1) || '_' == ch))
{
xub_StrLen nStt = nCommandPos-1;
while( 0 != (ch = NextCh( sCommand, nCommandPos )) &&
@@ -1164,9 +1127,6 @@ else
|*
|* SwSbxValue SwCalc::Term()
|*
-|* Erstellung OK 12-02-93 11:05am
-|* Letzte Aenderung JP 16.01.96
-|*
|******************************************************************************/
SwSbxValue SwCalc::Term()
@@ -1179,10 +1139,6 @@ SwSbxValue SwCalc::Term()
switch( eCurrOper )
{
-// wir haben kein Bitweises verodern, oder ?
-// case CALC_AND: eSbxOper = SbxAND; break;
-// case CALC_OR: eSbxOper = SbxOR; break;
-// case CALC_XOR: eSbxOper = SbxXOR; break;
case CALC_AND: {
GetToken();
sal_Bool bB = Prim().GetBool();
@@ -1310,33 +1266,8 @@ SwSbxValue SwCalc::Term()
}
break;
-/*
-// removed here because of #77448# (=2*3^2 != 18)
- case CALC_POW: {
- GetToken();
- double fraction, integer;
- double right = Prim().GetDouble(),
- dleft = left.GetDouble();
+//#77448# (=2*3^2 != 18)
- fraction = modf( right, &integer );
- if( ( dleft < 0.0 && 0.0 != fraction ) ||
- ( 0.0 == dleft && right < 0.0 ) )
- {
- eError = CALC_OVERFLOW;
- left.Clear();
- return left;
- }
- dleft = pow(dleft, right );
- if( dleft == HUGE_VAL )
- {
- eError = CALC_POWERR;
- left.Clear();
- return left;
- }
- left.PutDouble( dleft );
- }
- break;
-*/
default: return left;
}
@@ -1367,9 +1298,6 @@ SwSbxValue SwCalc::Term()
|*
|* SwSbxValue SwCalc::Prim()
|*
-|* Erstellung OK 12-02-93 11:05am
-|* Letzte Aenderung JP 03.11.95
-|*
|******************************************************************************/
extern "C" typedef double (*pfCalc)( double );
@@ -1405,7 +1333,7 @@ SwSbxValue SwCalc::Prim()
nErg.PutLong( nErg.GetDouble() == 0.0 ? 1 : 0 );
else
{
- DBG_ERROR( "unexpected case. computing binary NOT" );
+ OSL_FAIL( "unexpected case. computing binary NOT" );
//!! computes a binary NOT
nErg.Compute( SbxNOT, nErg );
}
@@ -1502,7 +1430,6 @@ SwSbxValue SwCalc::Prim()
eError = CALC_OVERFLOW;
}
- // added here because of #77448# (=2*3^2 should be 18)
if( bChkPow && eCurrOper == CALC_POW )
{
double dleft = nErg.GetDouble();
@@ -1540,9 +1467,6 @@ SwSbxValue SwCalc::Prim()
|*
|* SwSbxValue SwCalc::Expr()
|*
-|* Erstellung OK 12-02-93 11:06am
-|* Letzte Aenderung JP 03.11.95
-|*
|******************************************************************************/
SwSbxValue SwCalc::Expr()
@@ -1634,9 +1558,6 @@ lcl_Str2Double( const String& rCommand, xub_StrLen& rCommandPos, double& rVal,
/******************************************************************************
* Methode : sal_Bool SwCalc::Str2Double( double& )
- * Beschreibung:
- * Erstellt : OK 07.06.94 12:56
- * Aenderung : JP 27.10.98
******************************************************************************/
bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
double& rVal, const LocaleDataWrapper* const pLclData )
@@ -1703,9 +1624,6 @@ sal_Bool SwCalc::IsValidVarName( const String& rStr,
|*
|* CTOR DTOR der SwHash classes
|*
-|* Ersterstellung OK 25.06.93 12:20
-|* Letzte Aenderung OK 25.06.93 12:20
-|*
******************************************************************************/
SwHash::SwHash( const String& rStr ) :
@@ -1764,7 +1682,7 @@ double SwSbxValue::GetDouble() const
SwSbxValue& SwSbxValue::MakeDouble()
{
- if( SbxSTRING == GetType() )
+ if( GetType() == SbxSTRING || GetType() == SbxBOOL )
PutDouble( GetDouble() );
return *this;
}
@@ -1824,3 +1742,4 @@ static const sal_Char* sNTypeTab[ 27 ] =
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/checkit.cxx b/sw/source/core/bastyp/checkit.cxx
index 9e5ee1f368fd..ec4a3b8e8aed 100644
--- a/sw/source/core/bastyp/checkit.cxx
+++ b/sw/source/core/bastyp/checkit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,7 @@ SwCheckIt::SwCheckIt()
{
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
Reference < XInterface > xI = xMSF->createInstance(
- ::rtl::OUString::createFromAscii( "com.sun.star.i18n.InputSequenceChecker" ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.InputSequenceChecker")) );
if ( xI.is() )
{
Any x = xI->queryInterface( ::getCppuType((const Reference< XExtendedInputSequenceChecker >*)0) );
@@ -49,3 +50,4 @@ SwCheckIt::SwCheckIt()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx
index d22c781169b3..32457b85c960 100644
--- a/sw/source/core/bastyp/index.cxx
+++ b/sw/source/core/bastyp/index.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,11 +33,9 @@
#include <stdlib.h> // fuer qsort
#include <tools/solar.h>
-#include "errhdl.hxx" // fuers ASSERT
#include "index.hxx"
-#include "error.h" // fuers ASSERT
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
int SwIndex::nSerial = 0;
#endif
@@ -44,46 +43,6 @@ int SwIndex::nSerial = 0;
TYPEINIT0(SwIndexReg); // rtti
-#ifdef CHK
-
-#define IDX_CHK_ARRAY pArray->ChhkArr();
-#define ARR_CHK_ARRAY ChhkArr();
-
-
-void SwIndexReg::ChkArr()
-{
- ASSERT( (pFirst && pLast) || (!pFirst && !pLast),
- "Array falsch Indiziert" );
-
- if( !pFirst )
- return;
-
- xub_StrLen nVal = 0;
- const SwIndex* pIdx = pFirst, *pPrev = 0;
- ASSERT( !pIdx->pPrev, "Array-pFirst nicht am Anfang" );
-
- while( pIdx != pLast )
- {
- ASSERT( pIdx->pPrev != pIdx && pIdx->pNext != pIdx,
- "Index zeigt auf sich selbst" )
-
- ASSERT( pIdx->nIndex >= nVal, "Reihenfolge stimmt nicht" );
- ASSERT( pPrev == pIdx->pPrev, "Verkettung stimmt nicht" );
- pPrev = pIdx;
- pIdx = pIdx->pNext;
- nVal = pPrev->nIndex;
- }
-}
-
-#else // CHK
-
-#define IDX_CHK_ARRAY
-#define ARR_CHK_ARRAY
-
-#endif // CHK
-
-
-
SwIndex::SwIndex(SwIndexReg *const pArr, xub_StrLen const nIdx)
: nIndex( nIdx ), pArray( pArr ), pNext( 0 ), pPrev( 0 )
{
@@ -93,17 +52,16 @@ SwIndex::SwIndex(SwIndexReg *const pArr, xub_StrLen const nIdx)
nIndex = 0; // steht immer auf 0 !!!
}
- if( !pArray->pFirst ) // 1. Index ??
+ if( !pArray->pFirst || !pArray->pLast ) // 1. Index ??
pArray->pFirst = pArray->pLast = this;
else if( nIdx > ((pArray->pLast->nIndex - pArray->pFirst->nIndex) / 2) )
ChgValue( *pArray->pLast, nIdx );
else
ChgValue( *pArray->pFirst, nIdx );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
MySerial = ++nSerial; // nur in der nicht PRODUCT-Version
#endif
-IDX_CHK_ARRAY
}
@@ -112,10 +70,9 @@ SwIndex::SwIndex( const SwIndex& rIdx, short nIdx )
{
ChgValue( rIdx, rIdx.nIndex + nIdx );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
MySerial = ++nSerial; // nur in der nicht PRODUCT-Version
#endif
-IDX_CHK_ARRAY
}
@@ -123,10 +80,9 @@ SwIndex::SwIndex( const SwIndex& rIdx )
: nIndex( rIdx.nIndex ), pArray( rIdx.pArray ), pNext( 0 ), pPrev( 0 )
{
ChgValue( rIdx, rIdx.nIndex );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
MySerial = ++nSerial; // nur in der nicht PRODUCT-Version
#endif
-IDX_CHK_ARRAY
}
@@ -221,8 +177,6 @@ SwIndex& SwIndex::ChgValue( const SwIndex& rIdx, xub_StrLen nNewValue )
nIndex = nNewValue;
-IDX_CHK_ARRAY
-
return *this; }
@@ -237,18 +191,10 @@ void SwIndex::Remove()
pArray->pLast = pPrev;
else
pNext->pPrev = pPrev;
-
-IDX_CHK_ARRAY
}
/*************************************************************************
-|*
|* SwIndex & SwIndex::operator=( const SwIndex & aSwIndex )
-|*
-|* Beschreibung
-|* Ersterstellung JP 07.11.90
-|* Letzte Aenderung JP 07.03.94
-|*
*************************************************************************/
@@ -271,13 +217,7 @@ SwIndex& SwIndex::operator=( const SwIndex& rIdx )
}
/*************************************************************************
-|*
|* SwIndex &SwIndex::Assign
-|*
-|* Beschreibung
-|* Ersterstellung VB 25.03.91
-|* Letzte Aenderung JP 07.03.94
-|*
*************************************************************************/
@@ -306,7 +246,6 @@ SwIndex& SwIndex::Assign( SwIndexReg* pArr, xub_StrLen nIdx )
}
else if( nIndex != nIdx )
ChgValue( *this, nIdx );
-IDX_CHK_ARRAY
return *this;
}
@@ -320,7 +259,7 @@ SwIndexReg::SwIndexReg()
SwIndexReg::~SwIndexReg()
{
- ASSERT( !pFirst || !pLast, "Es sind noch Indizies angemeldet" );
+ OSL_ENSURE( !pFirst || !pLast, "Es sind noch Indizies angemeldet" );
}
@@ -365,205 +304,134 @@ void SwIndexReg::Update( SwIndex const & rIdx, const xub_StrLen nDiff,
pStt = pStt->pNext;
}
}
-ARR_CHK_ARRAY
}
-#ifdef DBG_UTIL
-#ifndef CFRONT
+#if OSL_DEBUG_LEVEL > 1
/*************************************************************************
-|*
|* SwIndex::operator++()
-|*
-|* Beschreibung
-|* Ersterstellung JP 07.11.90
-|* Letzte Aenderung JP 07.03.94
-|*
*************************************************************************/
xub_StrLen SwIndex::operator++(int)
{
- ASSERT_ID( nIndex < INVALID_INDEX, ERR_OUTOFSCOPE );
+ OSL_ASSERT( nIndex < INVALID_INDEX );
xub_StrLen nOldIndex = nIndex;
ChgValue( *this, nIndex+1 );
return nOldIndex;
}
-#endif
xub_StrLen SwIndex::operator++()
{
- ASSERT_ID( nIndex < INVALID_INDEX, ERR_OUTOFSCOPE );
+ OSL_ASSERT( nIndex < INVALID_INDEX );
ChgValue( *this, nIndex+1 );
return nIndex;
}
/*************************************************************************
-|*
|* SwIndex::operator--()
-|*
-|* Beschreibung
-|* Ersterstellung JP 07.11.90
-|* Letzte Aenderung JP 07.03.94
-|*
*************************************************************************/
-#ifndef CFRONT
xub_StrLen SwIndex::operator--(int)
{
- ASSERT_ID( nIndex, ERR_OUTOFSCOPE );
+ OSL_ASSERT( nIndex );
xub_StrLen nOldIndex = nIndex;
ChgValue( *this, nIndex-1 );
return nOldIndex;
}
-#endif
xub_StrLen SwIndex::operator--()
{
- ASSERT_ID( nIndex, ERR_OUTOFSCOPE );
+ OSL_ASSERT( nIndex );
return ChgValue( *this, nIndex-1 ).nIndex;
}
/*************************************************************************
-|*
|* SwIndex::operator+=( xub_StrLen )
-|*
-|* Beschreibung
-|* Ersterstellung JP 07.11.90
-|* Letzte Aenderung JP 07.03.94
-|*
*************************************************************************/
xub_StrLen SwIndex::operator+=( xub_StrLen nWert )
{
- ASSERT_ID( nIndex < INVALID_INDEX - nWert, ERR_OUTOFSCOPE);
+ OSL_ASSERT( nIndex < INVALID_INDEX - nWert );
return ChgValue( *this, nIndex + nWert ).nIndex;
}
/*************************************************************************
-|*
|* SwIndex::operator-=( xub_StrLen )
-|*
-|* Beschreibung
-|* Ersterstellung JP 07.11.90
-|* Letzte Aenderung JP 07.03.94
-|*
*************************************************************************/
xub_StrLen SwIndex::operator-=( xub_StrLen nWert )
{
- ASSERT_ID( nIndex >= nWert, ERR_OUTOFSCOPE );
+ OSL_ASSERT( nIndex >= nWert );
return ChgValue( *this, nIndex - nWert ).nIndex;
}
/*************************************************************************
-|*
|* SwIndex::operator+=( const SwIndex & )
-|*
-|* Beschreibung
-|* Ersterstellung JP 07.11.90
-|* Letzte Aenderung JP 07.03.94
-|*
*************************************************************************/
xub_StrLen SwIndex::operator+=( const SwIndex & rIndex )
{
- ASSERT_ID( nIndex < INVALID_INDEX - rIndex.nIndex, ERR_OUTOFSCOPE );
+ OSL_ASSERT( nIndex < INVALID_INDEX - rIndex.nIndex );
return ChgValue( *this, nIndex + rIndex.nIndex ).nIndex;
}
/*************************************************************************
-|*
|* SwIndex::operator-=( const SwIndex & )
-|*
-|* Beschreibung
-|* Ersterstellung JP 07.11.90
-|* Letzte Aenderung JP 07.03.94
-|*
*************************************************************************/
xub_StrLen SwIndex::operator-=( const SwIndex & rIndex )
{
- ASSERT_ID( nIndex >= rIndex.nIndex, ERR_OUTOFSCOPE );
+ OSL_ASSERT( nIndex >= rIndex.nIndex );
return ChgValue( *this, nIndex - rIndex.nIndex ).nIndex;
}
/*************************************************************************
-|*
|* SwIndex::operator<( const SwIndex & )
-|*
-|* Beschreibung
-|* Ersterstellung JP 07.11.90
-|* Letzte Aenderung JP 07.03.94
-|*
*************************************************************************/
sal_Bool SwIndex::operator<( const SwIndex & rIndex ) const
{
- ASSERT( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
+ OSL_ENSURE( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex < rIndex.nIndex;
}
/*************************************************************************
-|*
|* SwIndex::operator<=( const SwIndex & )
-|*
-|* Beschreibung
-|* Ersterstellung JP 07.11.90
-|* Letzte Aenderung JP 04.06.92
-|*
*************************************************************************/
sal_Bool SwIndex::operator<=( const SwIndex & rIndex ) const
{
- ASSERT( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
+ OSL_ENSURE( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex <= rIndex.nIndex;
}
/*************************************************************************
-|*
|* SwIndex::operator>( const SwIndex & )
-|*
-|* Beschreibung
-|* Ersterstellung JP 07.11.90
-|* Letzte Aenderung JP 04.06.92
-|*
*************************************************************************/
sal_Bool SwIndex::operator>( const SwIndex & rIndex ) const
{
- ASSERT( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
+ OSL_ENSURE( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex > rIndex.nIndex;
}
/*************************************************************************
-|*
|* SwIndex::operator>=( const SwIndex & )
-|*
-|* Beschreibung
-|* Ersterstellung JP 07.11.90
-|* Letzte Aenderung JP 04.06.92
-|*
*************************************************************************/
sal_Bool SwIndex::operator>=( const SwIndex & rIndex ) const
{
- ASSERT( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
+ OSL_ENSURE( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex >= rIndex.nIndex;
}
/*************************************************************************
-|*
|* SwIndex & SwIndex::operator=( xub_StrLen )
-|*
-|* Beschreibung
-|* Ersterstellung JP 10.12.90
-|* Letzte Aenderung JP 07.03.94
-|*
*************************************************************************/
SwIndex& SwIndex::operator=( xub_StrLen nWert )
@@ -591,3 +459,5 @@ void SwIndexReg::MoveTo( SwIndexReg& rArr )
pFirst = 0, pLast = 0;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index e150f5f0ae26..270385c63bbb 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,9 +67,7 @@
#include <editeng/charrotateitem.hxx>
#include <editeng/charreliefitem.hxx>
#include <editeng/frmdiritem.hxx>
-#ifndef _SVX_DIALOGS_HRC
#include <svx/dialogs.hrc>
-#endif
#include <editeng/swafopt.hxx>
#include <editeng/svxacorr.hxx>
#include <unotools/charclass.hxx>
@@ -103,7 +102,6 @@
#include <fmtfordr.hxx>
#include <fmtflcnt.hxx>
#include <fchrfmt.hxx>
-#include <fmtautofmt.hxx>
#include <fmtinfmt.hxx>
#include <fmtcnct.hxx>
#include <fmtline.hxx>
@@ -131,9 +129,7 @@
#include <swcalwrp.hxx>
#include <SwStyleNameMapper.hxx>
-// OD 09.10.2003 #i18732#
#include <fmtfollowtextflow.hxx>
-// OD 2004-05-05 #i28701#
#include <fmtwrapinfluenceonobjpos.hxx>
#include <fmtmeta.hxx>
@@ -148,15 +144,14 @@ extern void ClearFEShellTabCols();
|* einige Bereiche fuer die Set in Collections / Nodes
|*************************************************************************/
// AttrSet-Range fuer die 2 Break-Attribute
-sal_uInt16 __FAR_DATA aBreakSetRange[] = {
+sal_uInt16 aBreakSetRange[] = {
RES_PAGEDESC, RES_BREAK,
0 };
// AttrSet-Range fuer die TxtFmtColl
- // OD 2008-02-27 #refactorlists# :
// list attributes ( RES_PARATR_LIST_BEGIN - RES_PARATR_LIST_END ) are not
// included in the paragraph style's itemset.
-sal_uInt16 __FAR_DATA aTxtFmtCollSetRange[] = {
+sal_uInt16 aTxtFmtCollSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -165,7 +160,7 @@ sal_uInt16 __FAR_DATA aTxtFmtCollSetRange[] = {
};
// AttrSet-Range fuer die GrfFmtColl
-sal_uInt16 __FAR_DATA aGrfFmtCollSetRange[] = {
+sal_uInt16 aGrfFmtCollSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_GRFATR_BEGIN, RES_GRFATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
@@ -173,26 +168,24 @@ sal_uInt16 __FAR_DATA aGrfFmtCollSetRange[] = {
};
// AttrSet-Range fuer die TextNode
-sal_uInt16 __FAR_DATA aTxtNodeSetRange[] = {
+sal_uInt16 aTxtNodeSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
- // --> OD 2008-02-25 #refactorlists#
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
- // <--
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
// AttrSet-Range fuer die NoTxtNode
-sal_uInt16 __FAR_DATA aNoTxtNodeSetRange[] = {
+sal_uInt16 aNoTxtNodeSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_GRFATR_BEGIN, RES_GRFATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
-sal_uInt16 __FAR_DATA aTableSetRange[] = {
+sal_uInt16 aTableSetRange[] = {
RES_FILL_ORDER, RES_FRM_SIZE,
RES_LR_SPACE, RES_BREAK,
RES_BACKGROUND, RES_SHADOW,
@@ -207,7 +200,7 @@ sal_uInt16 __FAR_DATA aTableSetRange[] = {
0
};
-sal_uInt16 __FAR_DATA aTableLineSetRange[] = {
+sal_uInt16 aTableLineSetRange[] = {
RES_FILL_ORDER, RES_FRM_SIZE,
RES_LR_SPACE, RES_UL_SPACE,
RES_BACKGROUND, RES_SHADOW,
@@ -218,7 +211,7 @@ sal_uInt16 __FAR_DATA aTableLineSetRange[] = {
0
};
-sal_uInt16 __FAR_DATA aTableBoxSetRange[] = {
+sal_uInt16 aTableBoxSetRange[] = {
RES_FILL_ORDER, RES_FRM_SIZE,
RES_LR_SPACE, RES_UL_SPACE,
RES_BACKGROUND, RES_SHADOW,
@@ -231,21 +224,21 @@ sal_uInt16 __FAR_DATA aTableBoxSetRange[] = {
};
// AttrSet-Range fuer die SwFrmFmt
-sal_uInt16 __FAR_DATA aFrmFmtSetRange[] = {
+sal_uInt16 aFrmFmtSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
// AttrSet-Range fuer die SwCharFmt
-sal_uInt16 __FAR_DATA aCharFmtSetRange[] = {
+sal_uInt16 aCharFmtSetRange[] = {
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
// AttrSet-Range fuer die character autostyles
-sal_uInt16 __FAR_DATA aCharAutoFmtSetRange[] = {
+sal_uInt16 aCharAutoFmtSetRange[] = {
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
@@ -253,7 +246,7 @@ sal_uInt16 __FAR_DATA aCharAutoFmtSetRange[] = {
};
// AttrSet-Range fuer die SwPageDescFmt
-sal_uInt16 __FAR_DATA aPgFrmFmtSetRange[] = {
+sal_uInt16 aPgFrmFmtSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
@@ -263,9 +256,9 @@ sal_uInt16 __FAR_DATA aPgFrmFmtSetRange[] = {
* lege eine Tabelle fuer einen Zugriff auf die
* Default-Format-Attribute an
******************************************************************************/
-SwDfltAttrTab __FAR_DATA aAttrTab;
+SwDfltAttrTab aAttrTab;
-SfxItemInfo __FAR_DATA aSlotTab[] =
+SfxItemInfo aSlotTab[] =
{
{ SID_ATTR_CHAR_CASEMAP, SFX_ITEM_POOLABLE }, // RES_CHRATR_CASEMAP
{ SID_ATTR_CHAR_CHARSETCOLOR, SFX_ITEM_POOLABLE }, // RES_CHRATR_CHARSETCOLOR
@@ -336,10 +329,8 @@ SfxItemInfo __FAR_DATA aSlotTab[] =
{ SID_ATTR_PARA_HYPHENZONE, SFX_ITEM_POOLABLE }, // RES_PARATR_HYPHENZONE
{ FN_FORMAT_DROPCAPS, 0 }, // RES_PARATR_DROP
{ SID_ATTR_PARA_REGISTER, SFX_ITEM_POOLABLE }, // RES_PARATR_REGISTER
- // --> OD 2008-03-04 #refactorlists#
// RES_PARATR_NUMRULE is now poolable
{ SID_ATTR_PARA_NUMRULE, SFX_ITEM_POOLABLE }, // RES_PARATR_NUMRULE
- // <--
{ SID_ATTR_PARA_SCRIPTSPACE, SFX_ITEM_POOLABLE }, // RES_PARATR_SCRIPTSPACE
{ SID_ATTR_PARA_HANGPUNCTUATION, SFX_ITEM_POOLABLE },// RES_PARATR_HANGINGPUNCTUATION
@@ -350,13 +341,11 @@ SfxItemInfo __FAR_DATA aSlotTab[] =
{ SID_ATTR_PARA_OUTLINE_LEVEL, SFX_ITEM_POOLABLE }, // RES_PARATR_OUTLINELEVEL //#outline level,zhaojianwei
- // --> OD 2008-02-19 #refactorlists#
{ 0, SFX_ITEM_POOLABLE }, // RES_PARATR_LIST_ID
{ 0, SFX_ITEM_POOLABLE }, // RES_PARATR_LIST_LEVEL
{ 0, SFX_ITEM_POOLABLE }, // RES_PARATR_LIST_ISRESTART
{ 0, SFX_ITEM_POOLABLE }, // RES_PARATR_LIST_RESTARTVALUE
{ 0, SFX_ITEM_POOLABLE }, // RES_PARATR_LIST_ISCOUNTED
- // <--
{ 0, SFX_ITEM_POOLABLE }, // RES_FILL_ORDER
{ 0, SFX_ITEM_POOLABLE }, // RES_FRM_SIZE
@@ -396,12 +385,11 @@ SfxItemInfo __FAR_DATA aSlotTab[] =
{ SID_ATTR_HDFT_DYNAMIC_SPACING, SFX_ITEM_POOLABLE }, // RES_HEADER_FOOTER_EAT_SPACING
{ FN_TABLE_ROW_SPLIT, SFX_ITEM_POOLABLE }, // RES_ROW_SPLIT
- // DVO, OD 18.09.2003 #i18732# - use slot-id define in svx
+ // #i18732# - use slot-id define in svx
{ SID_SW_FOLLOW_TEXT_FLOW, SFX_ITEM_POOLABLE }, // RES_FOLLOW_TEXT_FLOW
- // --> collapsing borders FME 2005-05-27 #i29550#
+ // collapsing borders #i29550#
{ SID_SW_COLLAPSING_BORDERS, SFX_ITEM_POOLABLE }, // RES_COLLAPSING_BORDERS
- // <-- collapsing
- // OD 2004-05-04 #i28701#
+ // #i28701#
{ SID_SW_WRAP_INFLUENCE_ON_OBJPOS, SFX_ITEM_POOLABLE }, // RES_WRAP_INFLUENCE_ON_OBJPOS
{ 0, 0 }, // RES_AUTO_STYLE
{ 0, SFX_ITEM_POOLABLE }, // RES_FRMATR_STYLE_NAME
@@ -437,18 +425,18 @@ sal_uInt16* SwAttrPool::pVersionMap1 = 0;
sal_uInt16* SwAttrPool::pVersionMap2 = 0;
sal_uInt16* SwAttrPool::pVersionMap3 = 0;
sal_uInt16* SwAttrPool::pVersionMap4 = 0;
-// OD 2004-01-21 #i18732#
+// #i18732#
sal_uInt16* SwAttrPool::pVersionMap5 = 0;
sal_uInt16* SwAttrPool::pVersionMap6 = 0;
SwIndexReg* SwIndexReg::pEmptyIndexArray = 0;
-const sal_Char* __FAR_DATA pMarkToTable = "table";
-const sal_Char* __FAR_DATA pMarkToFrame = "frame";
-const sal_Char* __FAR_DATA pMarkToRegion = "region";
-const sal_Char* __FAR_DATA pMarkToText = "text";
-const sal_Char* __FAR_DATA pMarkToOutline = "outline";
-const sal_Char* __FAR_DATA pMarkToGraphic = "graphic";
-const sal_Char* __FAR_DATA pMarkToOLE = "ole";
+const sal_Char* pMarkToTable = "table";
+const sal_Char* pMarkToFrame = "frame";
+const sal_Char* pMarkToRegion = "region";
+const sal_Char* pMarkToText = "text";
+const sal_Char* pMarkToOutline = "outline";
+const sal_Char* pMarkToGraphic = "graphic";
+const sal_Char* pMarkToOLE = "ole";
SvPtrarr *pGlobalOLEExcludeList = 0;
@@ -572,13 +560,11 @@ void _InitCore()
aAttrTab[ RES_PARATR_OUTLINELEVEL - POOLATTR_BEGIN ] = new SfxUInt16Item( RES_PARATR_OUTLINELEVEL, 0 );//#outline level,zhaojianwei
- // --> OD 2008-02-19 #refactorlists#
aAttrTab[ RES_PARATR_LIST_ID - POOLATTR_BEGIN ] = new SfxStringItem( RES_PARATR_LIST_ID, aEmptyStr );
aAttrTab[ RES_PARATR_LIST_LEVEL - POOLATTR_BEGIN ] = new SfxInt16Item( RES_PARATR_LIST_LEVEL, 0 );
aAttrTab[ RES_PARATR_LIST_ISRESTART - POOLATTR_BEGIN ] = new SfxBoolItem( RES_PARATR_LIST_ISRESTART, sal_False );
aAttrTab[ RES_PARATR_LIST_RESTARTVALUE - POOLATTR_BEGIN ] = new SfxInt16Item( RES_PARATR_LIST_RESTARTVALUE, 1 );
aAttrTab[ RES_PARATR_LIST_ISCOUNTED - POOLATTR_BEGIN ] = new SfxBoolItem( RES_PARATR_LIST_ISCOUNTED, sal_True );
- // <--
aAttrTab[ RES_FILL_ORDER- POOLATTR_BEGIN ] = new SwFmtFillOrder;
aAttrTab[ RES_FRM_SIZE- POOLATTR_BEGIN ] = new SwFmtFrmSize;
@@ -616,13 +602,12 @@ void _InitCore()
aAttrTab[ RES_FRAMEDIR - POOLATTR_BEGIN ] = new SvxFrameDirectionItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR );
aAttrTab[ RES_ROW_SPLIT - POOLATTR_BEGIN ] = new SwFmtRowSplit;
- // OD 18.09.2003 #i18732#
+ // #i18732#
aAttrTab[ RES_FOLLOW_TEXT_FLOW - POOLATTR_BEGIN ] = new SwFmtFollowTextFlow( sal_True );
- // --> collapsing borders FME 2005-05-27 #i29550#
+ // collapsing borders #i29550#
aAttrTab[ RES_COLLAPSING_BORDERS - POOLATTR_BEGIN ] = new SfxBoolItem( RES_COLLAPSING_BORDERS, sal_False );
- // <-- collapsing
- // OD 2004-05-04 #i28701#
- // --> OD 2004-10-18 #i35017# - constant name has changed
+ // #i28701#
+ // #i35017# - constant name has changed
aAttrTab[ RES_WRAP_INFLUENCE_ON_OBJPOS - POOLATTR_BEGIN ] =
new SwFmtWrapInfluenceOnObjPos( text::WrapInfluenceOnPosition::ONCE_CONCURRENT );
// <--
@@ -712,7 +697,7 @@ void _InitCore()
for ( i = 66; i <= 121; ++i )
SwAttrPool::pVersionMap4[ i-1 ] = i + 9;
- // OD 2004-01-21 #i18732# - setup new version map due to extension of
+ // #i18732# - setup new version map due to extension of
// the frame attributes (RES_FRMATR_*) for binary filters.
SwAttrPool::pVersionMap5 = new sal_uInt16[ 130 ];
for( i = 1; i <= 109; i++ )
@@ -733,9 +718,6 @@ void _InitCore()
SwBreakIt::_Create( xMSF );
pCheckIt = NULL;
- /*pAppCharClass = new CharClass(
- xMSF, SwBreakIt::Get()->GetLocale( (LanguageType)GetAppLanguage() ));*/
- //pCalendarWrapper = new SwCalendarWrapper( xMSF );
_FrmInit();
_TextInit();
@@ -777,7 +759,7 @@ void _FinitCore()
delete SwEditShell::pAutoFmtFlags;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
//Defaultattribut freigeben lassen um asserts zu vermeiden.
if ( aAttrTab[0]->GetRefCount() )
SfxItemPool::ReleaseDefaults( aAttrTab, POOLATTR_END-POOLATTR_BEGIN, sal_False);
@@ -836,7 +818,7 @@ void _FinitCore()
delete[] SwAttrPool::pVersionMap2;
delete[] SwAttrPool::pVersionMap3;
delete[] SwAttrPool::pVersionMap4;
- // OD 2004-01-21 #i18732#
+ // #i18732#
delete[] SwAttrPool::pVersionMap5;
delete[] SwAttrPool::pVersionMap6;
@@ -916,3 +898,5 @@ const ::utl::TransliterationWrapper& GetAppCmpStrIgnore()
}
return *pTransWrp;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/ring.cxx b/sw/source/core/bastyp/ring.cxx
index 1831093a1d19..697bb9f3c80a 100644
--- a/sw/source/core/bastyp/ring.cxx
+++ b/sw/source/core/bastyp/ring.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,12 +35,7 @@
/*************************************************************************
-|*
|* Ring::Ring()
-|*
-|* Ersterstellung VB 02.07.91
-|* Letzte Aenderung JP 10.10.97
-|*
*************************************************************************/
Ring::Ring( Ring *pObj )
@@ -56,12 +52,7 @@ Ring::Ring( Ring *pObj )
}
/*************************************************************************
-|*
|* Ring::~Ring()
-|*
-|* Ersterstellung VB 02.07.91
-|* Letzte Aenderung JP 10.10.97
-|*
*************************************************************************/
Ring::~Ring()
@@ -71,12 +62,7 @@ Ring::~Ring()
}
/*************************************************************************
-|*
|* Ring::MoveTo
-|*
-|* Ersterstellung VB 4.3.91
-|* Letzte Aenderung JP 10.10.97
-|*
*************************************************************************/
void Ring::MoveTo(Ring *pDestRing)
@@ -123,3 +109,4 @@ sal_uInt32 Ring::numberOf() const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index e3db1a266648..34502cdcc920 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,29 +29,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <tools/debug.hxx>
-#include <errhdl.hxx>
#include <swcache.hxx>
SV_IMPL_PTRARR(SwCacheObjArr,SwCacheObj*);
-#ifndef DBG_UTIL
-#define INCREMENT( nVar )
-#else
+#if OSL_DEBUG_LEVEL > 1
#define INCREMENT( nVar ) ++nVar
+#else
+#define INCREMENT( nVar )
#endif
/*************************************************************************
-|*
|* SwCache::Check()
-|*
-|* Ersterstellung MA 23. Mar. 94
-|* Letzte Aenderung MA 23. Mar. 94
-|*
|*************************************************************************/
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
void SwCache::Check()
{
@@ -58,8 +52,8 @@ void SwCache::Check()
return;
//Konsistenspruefung.
- ASSERT( !pLast->GetNext(), "Last but not last." );
- ASSERT( !pRealFirst->GetPrev(), "First but not first." );
+ OSL_ENSURE( !pLast->GetNext(), "Last but not last." );
+ OSL_ENSURE( !pRealFirst->GetPrev(), "First but not first." );
sal_uInt16 nCnt = 0;
sal_Bool bFirstFound = sal_False;
SwCacheObj *pObj = pRealFirst;
@@ -70,41 +64,36 @@ void SwCache::Check()
SwCacheObj *pTmp = pLast;
while ( pTmp && pTmp != pObj )
pTmp = pTmp->GetPrev();
- ASSERT( pTmp, "Objekt not found." );
+ OSL_ENSURE( pTmp, "Objekt not found." );
++nCnt;
if ( pObj == pFirst )
bFirstFound = sal_True;
if ( !pObj->GetNext() )
- ASSERT( pObj == pLast, "Last not Found." );
+ OSL_ENSURE( pObj == pLast, "Last not Found." );
pObj = pObj->GetNext();
- ASSERT( pObj != pRekursive, "Recursion in SwCache." );
+ OSL_ENSURE( pObj != pRekursive, "Recursion in SwCache." );
}
- ASSERT( bFirstFound, "First not Found." );
- ASSERT( (nCnt + aFreePositions.Count()) == Count(), "Lost Chain." );
+ OSL_ENSURE( bFirstFound, "First not Found." );
+ OSL_ENSURE( (nCnt + aFreePositions.Count()) == Count(), "Lost Chain." );
if ( Count() == nCurMax )
- ASSERT( (nCurMax - nCnt) == aFreePositions.Count(), "Lost FreePositions." );
+ OSL_ENSURE( (nCurMax - nCnt) == aFreePositions.Count(), "Lost FreePositions." );
}
#endif
-#if defined(DBG_UTIL) && defined(MADEBUG)
+#if OSL_DEBUG_LEVEL > 1
#define CHECK Check();
#else
#define CHECK
#endif
/*************************************************************************
-|*
|* SwCache::SwCache(), ~SwCache()
-|*
-|* Ersterstellung MA 15. Mar. 94
-|* Letzte Aenderung MA 15. Mar. 94
-|*
|*************************************************************************/
SwCache::SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
, const ByteString &rNm
#endif
) :
@@ -115,7 +104,7 @@ SwCache::SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize
pLast( 0 ),
nMax( nInitSize ),
nCurMax( nInitSize )
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
, aName( rNm ),
nAppend( 0 ),
nInsertFree( 0 ),
@@ -134,12 +123,9 @@ SwCache::SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize
{
}
-#ifdef DBG_UTIL
-
-
+#if OSL_DEBUG_LEVEL > 1
SwCache::~SwCache()
{
-#if OSL_DEBUG_LEVEL > 1
{
ByteString sOut( aName ); sOut += '\n';
(( sOut += "Anzahl neuer Eintraege: " )
@@ -172,17 +158,11 @@ SwCache::~SwCache()
DBG_ERROR( sOut.GetBuffer() );
}
Check();
-#endif
}
#endif
/*************************************************************************
-|*
|* SwCache::Flush()
-|*
-|* Ersterstellung MA 15. Mar. 94
-|* Letzte Aenderung MA 15. Mar. 94
-|*
|*************************************************************************/
@@ -194,10 +174,10 @@ void SwCache::Flush( const sal_uInt8 )
SwCacheObj *pTmp;
while ( pObj )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if ( pObj->IsLocked() )
{
- ASSERT( sal_True, "Flushing locked objects." );
+ OSL_ENSURE( TRUE, "Flushing locked objects." );
if ( !pRealFirst )
{
pRealFirst = pFirst = pLast = pObj;
@@ -228,12 +208,7 @@ void SwCache::Flush( const sal_uInt8 )
}
/*************************************************************************
-|*
|* SwCache::ToTop()
-|*
-|* Ersterstellung MA 15. Mar. 94
-|* Letzte Aenderung MA 24. Apr. 95
-|*
|*************************************************************************/
@@ -249,7 +224,7 @@ void SwCache::ToTop( SwCacheObj *pObj )
if ( !pRealFirst )
{ //Der erste wird eingetragen.
- ASSERT( !pFirst && !pLast, "First not first." );
+ OSL_ENSURE( !pFirst && !pLast, "First not first." );
pRealFirst = pFirst = pLast = pObj;
CHECK;
return;
@@ -258,7 +233,7 @@ void SwCache::ToTop( SwCacheObj *pObj )
//Ausschneiden.
if ( pObj == pLast )
{
- ASSERT( pObj->GetPrev(), "Last but no Prev." );
+ OSL_ENSURE( pObj->GetPrev(), "Last but no Prev." );
pLast = pObj->GetPrev();
pLast->SetNext( 0 );
}
@@ -281,7 +256,7 @@ void SwCache::ToTop( SwCacheObj *pObj )
}
else
{
- ASSERT( pFirst, "ToTop, First ist not RealFirst an Empty." );
+ OSL_ENSURE( pFirst, "ToTop, First ist not RealFirst an Empty." );
if ( pFirst->GetPrev() )
{
@@ -298,12 +273,7 @@ void SwCache::ToTop( SwCacheObj *pObj )
}
/*************************************************************************
-|*
|* SwCache::Get()
-|*
-|* Ersterstellung MA 15. Mar. 94
-|* Letzte Aenderung MA 22. Aug. 94
-|*
|*************************************************************************/
@@ -319,7 +289,7 @@ SwCacheObj *SwCache::Get( const void *pOwner, const sal_uInt16 nIndex,
ToTop( pRet );
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if ( pRet )
++nGetSuccess;
else
@@ -343,7 +313,7 @@ SwCacheObj *SwCache::Get( const void *pOwner, const sal_Bool bToTop )
if ( bToTop && pRet && pRet != pFirst )
ToTop( pRet );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if ( pRet )
++nGetSuccess;
else
@@ -354,19 +324,14 @@ SwCacheObj *SwCache::Get( const void *pOwner, const sal_Bool bToTop )
}
/*************************************************************************
-|*
|* SwCache::Delete()
-|*
-|* Ersterstellung MA 15. Mar. 94
-|* Letzte Aenderung MA 15. Mar. 94
-|*
|*************************************************************************/
void SwCache::DeleteObj( SwCacheObj *pObj )
{
CHECK;
- ASSERT( !pObj->IsLocked(), "SwCache::Delete: Object ist Locked." );
+ OSL_ENSURE( !pObj->IsLocked(), "SwCache::Delete: Object ist Locked." );
if ( pObj->IsLocked() )
return;
@@ -414,20 +379,6 @@ void SwCache::DeleteObj( SwCacheObj *pObj )
CHECK;
}
-/*
-
-
-void SwCache::Delete( const void *pOwner, const sal_uInt16 nIndex )
-{
- INCREMENT( nDelete );
- SwCacheObj *pObj;
- if ( 0 != (pObj = Get( pOwner, nIndex, sal_False )) )
- DeleteObj( pObj );
-}
-*/
-
-
-
void SwCache::Delete( const void *pOwner )
{
INCREMENT( nDelete );
@@ -438,19 +389,14 @@ void SwCache::Delete( const void *pOwner )
/*************************************************************************
-|*
|* SwCache::Insert()
-|*
-|* Ersterstellung MA 15. Mar. 94
-|* Letzte Aenderung MA 20. Sep. 94
-|*
|*************************************************************************/
sal_Bool SwCache::Insert( SwCacheObj *pNew )
{
CHECK;
- ASSERT( !pNew->GetPrev() && !pNew->GetNext(), "New but not new." );
+ OSL_ENSURE( !pNew->GetPrev() && !pNew->GetNext(), "New but not new." );
sal_uInt16 nPos;//Wird hinter den if's zum setzen am Obj benutzt.
if ( Count() < nCurMax )
@@ -479,13 +425,13 @@ sal_Bool SwCache::Insert( SwCacheObj *pNew )
pObj = pObj->GetPrev();
if ( !pObj )
{
- ASSERT( sal_False, "Cache overflow." );
+ OSL_ENSURE( sal_False, "Cache overflow." );
return sal_False;
}
nPos = pObj->GetCachePos();
if ( pObj == pLast )
- { ASSERT( pObj->GetPrev(), "Last but no Prev" );
+ { OSL_ENSURE( pObj->GetPrev(), "Last but no Prev" );
pLast = pObj->GetPrev();
pLast->SetNext( 0 );
}
@@ -513,7 +459,7 @@ sal_Bool SwCache::Insert( SwCacheObj *pNew )
pNew->SetNext( pFirst );
}
else
- { ASSERT( !pLast, "Last but no First." );
+ { OSL_ENSURE( !pLast, "Last but no First." );
pLast = pNew;
}
if ( pFirst == pRealFirst )
@@ -525,12 +471,7 @@ sal_Bool SwCache::Insert( SwCacheObj *pNew )
}
/*************************************************************************
-|*
|* SwCache::SetLRUOfst()
-|*
-|* Ersterstellung MA 15. Mar. 94
-|* Letzte Aenderung MA 15. Mar. 94
-|*
|*************************************************************************/
@@ -552,12 +493,7 @@ void SwCache::SetLRUOfst( const sal_uInt16 nOfst )
}
/*************************************************************************
-|*
|* SwCacheObj::SwCacheObj()
-|*
-|* Ersterstellung MA 15. Mar. 94
-|* Letzte Aenderung MA 24. Nov. 95
-|*
|*************************************************************************/
@@ -577,21 +513,14 @@ SwCacheObj::~SwCacheObj()
}
/*************************************************************************
-|*
|* SwCacheObj::SetLock(), Unlock()
-|*
-|* Ersterstellung MA 15. Mar. 94
-|* Letzte Aenderung MA 15. Mar. 94
-|*
|*************************************************************************/
-#ifdef DBG_UTIL
-
-
+#if OSL_DEBUG_LEVEL > 1
void SwCacheObj::Lock()
{
- ASSERT( nLock < UCHAR_MAX, "To many Locks for CacheObject." );
+ OSL_ENSURE( nLock < UCHAR_MAX, "To many Locks for CacheObject." );
++nLock;
}
@@ -599,7 +528,7 @@ void SwCacheObj::Lock()
void SwCacheObj::Unlock()
{
- ASSERT( nLock, "No more Locks available." );
+ OSL_ENSURE( nLock, "No more Locks available." );
--nLock;
}
#endif
@@ -612,18 +541,12 @@ SwCacheAccess::~SwCacheAccess()
}
/*************************************************************************
-|*
|* SwCacheAccess::Get()
-|*
-|* Ersterstellung MA 15. Mar. 94
-|* Letzte Aenderung MA 04. Apr. 95
-|*
|*************************************************************************/
-
void SwCacheAccess::_Get()
{
- ASSERT( !pObj, "SwCacheAcces Obj already available." );
+ OSL_ENSURE( !pObj, "SwCacheAcces Obj already available." );
pObj = NewObj();
if ( !rCache.Insert( pObj ) )
@@ -636,21 +559,12 @@ void SwCacheAccess::_Get()
}
/*************************************************************************
-|*
|* SwCacheAccess::IsAvailable()
-|*
-|* Ersterstellung MA 23. Mar. 94
-|* Letzte Aenderung MA 23. Mar. 94
-|*
|*************************************************************************/
-
sal_Bool SwCacheAccess::IsAvailable() const
{
return pObj != 0;
}
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index 701f7dbbd69c..616c375f70d1 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,11 +30,9 @@
#include "precompiled_sw.hxx"
-#ifdef DBG_UTIL
-#ifndef _STREAM_HXX //autogen
+#if OSL_DEBUG_LEVEL > 1
#include <tools/stream.hxx>
#endif
-#endif
#include <stdlib.h>
#include "swrect.hxx"
#include <math.h>
@@ -42,9 +41,6 @@
|*
|* SwRect::SwRect()
|*
-|* Ersterstellung MA 02. Feb. 93
-|* Letzte Aenderung MA 05. Sep. 93
-|*
|*************************************************************************/
@@ -62,30 +58,17 @@ SwRect::SwRect( const Rectangle &rRect ) :
|*
|* SwRect::Center()
|*
-|* Ersterstellung MA 27. Jan. 93
-|* Letzte Aenderung MA 27. Jan. 93
-|*
|*************************************************************************/
Point SwRect::Center() const
{
return Point( Left() + Width() / 2,
Top() + Height() / 2 );
-
-/* Wer ruft schon ein Center auf ein "falsches" Rechteck?
- const long nRight = Right();
- const long nBottom= Bottom();
- return Point( min( Left(), nRight ) + long(abs( (nRight - Left())/2) ),
- min( Top(), nBottom) + long(abs( (nBottom - Top())/2)));
-*/
}
/*************************************************************************
|*
|* SwRect::Union()
|*
-|* Ersterstellung MA 27. Jan. 93
-|* Letzte Aenderung MA 27. Jan. 93
-|*
|*************************************************************************/
@@ -108,9 +91,6 @@ SwRect& SwRect::Union( const SwRect& rRect )
|*
|* SwRect::Intersection(), _Intersection()
|*
-|* Ersterstellung MA 27. Jan. 93
-|* Letzte Aenderung MA 05. Sep. 93
-|*
|*************************************************************************/
@@ -163,9 +143,6 @@ SwRect& SwRect::_Intersection( const SwRect& rRect )
|*
|* SwRect::IsInside()
|*
-|* Ersterstellung MA 27. Jan. 93
-|* Letzte Aenderung MA 27. Jan. 93
-|*
|*************************************************************************/
@@ -207,9 +184,6 @@ sal_Bool SwRect::IsNear( const Point& rPoint, long nTolerance ) const
|*
|* SwRect::IsOver()
|*
-|* Ersterstellung MA 25. Feb. 94
-|* Letzte Aenderung MA 27. Jun. 96
-|*
|*************************************************************************/
@@ -226,9 +200,6 @@ sal_Bool SwRect::IsOver( const SwRect& rRect ) const
|*
|* SwRect::Justify()
|*
-|* Ersterstellung MA 10. Oct. 94
-|* Letzte Aenderung MA 23. Oct. 96
-|*
|*************************************************************************/
@@ -318,7 +289,7 @@ void SwRect::SetUpperRightCorner( const Point& rNew )
void SwRect::SetLowerLeftCorner( const Point& rNew )
{ m_Point = Point(rNew.nA, rNew.nB - m_Size.getHeight()); }
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
/*************************************************************************
* operator<<( ostream&, SwRect&)
*************************************************************************/
@@ -334,3 +305,4 @@ SvStream &operator<<( SvStream &rStream, const SwRect &rRect )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/swregion.cxx b/sw/source/core/bastyp/swregion.cxx
index e2b4829b563c..5b812314da95 100644
--- a/sw/source/core/bastyp/swregion.cxx
+++ b/sw/source/core/bastyp/swregion.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,12 +41,7 @@
SV_IMPL_VARARR( SwRects, SwRect );
/*************************************************************************
-|*
|* SwRegionRects::SwRegionRects()
-|*
-|* Ersterstellung MA 28. Oct. 92
-|* Letzte Aenderung MA 01. Feb. 93
-|*
|*************************************************************************/
SwRegionRects::SwRegionRects( const SwRect &rStartRect, sal_uInt16 nInit,
@@ -86,8 +82,6 @@ inline void SwRegionRects::InsertRect( const SwRect &rRect, const sal_uInt16 nPo
|* entfernt.
|* Dazu muessen die vorhandenen Rechtecke entweder aufgeteilt oder
|* geloescht werden.
-|* Ersterstellung MA 28. Oct. 92
-|* Letzte Aenderung MA 09. Sep. 93
|*
|*************************************************************************/
@@ -195,8 +189,6 @@ void SwRegionRects::Invert()
|* SwRegionRects::Compress()
|*
|* Beschreibung Zusammenfassen von benachbarten Rechtecken.
-|* Ersterstellung MA 16. Apr. 93
-|* Letzte Aenderung MA 21. Apr. 93
|*
|*************************************************************************/
inline SwTwips CalcArea( const SwRect &rRect )
@@ -252,3 +244,4 @@ void SwRegionRects::Compress( sal_Bool bFuzzy )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/swtypes.cxx b/sw/source/core/bastyp/swtypes.cxx
index 3015d8cf4b44..a683ed170c0f 100644
--- a/sw/source/core/bastyp/swtypes.cxx
+++ b/sw/source/core/bastyp/swtypes.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -132,3 +133,4 @@ uno::Reference< beans::XPropertySet > GetLinguPropertySet()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/tabcol.cxx b/sw/source/core/bastyp/tabcol.cxx
index bf5b4b06084f..a6c943b8dcde 100644
--- a/sw/source/core/bastyp/tabcol.cxx
+++ b/sw/source/core/bastyp/tabcol.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,6 @@
#include "tabcol.hxx"
-#include <errhdl.hxx> // fuer Create-Methoden
SwTabCols::SwTabCols( sal_uInt16 nSize ) :
@@ -60,11 +60,11 @@ SwTabCols::SwTabCols( const SwTabCols& rCpy ) :
SwTabColsEntry aEntry2 = rCpy.GetData()[i];
(void) aEntry1;
(void) aEntry2;
- ASSERT( aEntry1.nPos == aEntry2.nPos &&
+ OSL_ENSURE( aEntry1.nPos == aEntry2.nPos &&
aEntry1.nMin == aEntry2.nMin &&
aEntry1.nMax == aEntry2.nMax &&
aEntry1.bHidden == aEntry2.bHidden,
- "CopyContructor of SwTabColsEntries did not succeed!" )
+ "CopyContructor of SwTabColsEntries did not succeed!" );
}
#endif
}
@@ -140,3 +140,4 @@ void SwTabCols::Remove( sal_uInt16 nPos, sal_uInt16 nAnz )
aData.erase( aStart, aStart + nAnz );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/BlockCursor.cxx b/sw/source/core/crsr/BlockCursor.cxx
index 589549c0ade8..45e5c0c7291e 100644
--- a/sw/source/core/crsr/BlockCursor.cxx
+++ b/sw/source/core/crsr/BlockCursor.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104,3 +105,4 @@ IBlockCursor *createBlockCursor( const SwCrsrShell& rCrsrSh, const SwPosition &r
return new SwBlockCursor( rCrsrSh, rPos );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/BlockCursor.hxx b/sw/source/core/crsr/BlockCursor.hxx
index a3acb0bac187..aced7c582cd1 100644
--- a/sw/source/core/crsr/BlockCursor.hxx
+++ b/sw/source/core/crsr/BlockCursor.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,3 +35,5 @@ struct SwPosition;
IBlockCursor *createBlockCursor(const SwCrsrShell& rCrsrSh, const SwPosition &rPos);
#endif //_BLOCKURSOR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/IBlockCursor.hxx b/sw/source/core/crsr/IBlockCursor.hxx
index 99b5cf3b734a..da3c3c3ef383 100644
--- a/sw/source/core/crsr/IBlockCursor.hxx
+++ b/sw/source/core/crsr/IBlockCursor.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,4 @@ class Point;
#endif // IBLOCKCURSOR_HXX_INCLUDED
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 18dc67cfc958..12b32dd6a853 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,7 +34,6 @@
#include <IDocumentMarkAccess.hxx>
#include <IDocumentUndoRedo.hxx>
#include <doc.hxx>
-#include <errhdl.hxx>
#include <ndtxt.hxx>
#include <pam.hxx>
#include <swserv.hxx>
@@ -84,17 +84,20 @@ namespace
rStart.nNode.GetNode().GetTxtNode();
SwTxtNode const*const pEndTxtNode = rEnd.nNode.GetNode().GetTxtNode();
const sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(rStart.nContent.GetIndex());
- const sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar(rEnd.nContent.GetIndex()-1);
+ xub_StrLen nEndPos = rEnd.nContent.GetIndex() == 0 ? 0 : rEnd.nContent.GetIndex() - 1;
+ const sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar( nEndPos );
SwPaM aStartPaM(rStart);
SwPaM aEndPaM(rEnd);
io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, NULL);
- if(ch_start != aStartMark)
+ if( ( ch_start != aStartMark ) && ( aEndMark != CH_TXT_ATR_FORMELEMENT ) )
{
io_pDoc->InsertString(aStartPaM, aStartMark);
+ rStart.nContent--;
}
- if ( aEndMark && ( ch_end != aEndMark ) && ( rStart != rEnd ) )
+ if ( aEndMark && ( ch_end != aEndMark ) )
{
io_pDoc->InsertString(aEndPaM, aEndMark);
+ rEnd.nContent++;
}
io_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_UI_REPLACE, NULL);
};
@@ -118,19 +121,17 @@ namespace sw { namespace mark
bool MarkBase::IsCoveringPosition(const SwPosition& rPos) const
{
- return GetMarkStart() <= rPos && rPos <= GetMarkEnd();
+ return GetMarkStart() <= rPos && rPos < GetMarkEnd();
}
void MarkBase::SetMarkPos(const SwPosition& rNewPos)
{
::boost::scoped_ptr<SwPosition>(new SwPosition(rNewPos)).swap(m_pPos1);
- //lcl_FixPosition(*m_pPos1);
}
void MarkBase::SetOtherMarkPos(const SwPosition& rNewPos)
{
::boost::scoped_ptr<SwPosition>(new SwPosition(rNewPos)).swap(m_pPos2);
- //lcl_FixPosition(*m_pPos2);
}
rtl::OUString MarkBase::ToString( ) const
@@ -180,13 +181,13 @@ namespace sw { namespace mark
: MarkBase(rPaM, our_sNamePrefix)
{ }
- const ::rtl::OUString NavigatorReminder::our_sNamePrefix = ::rtl::OUString::createFromAscii("__NavigatorReminder__");
+ const ::rtl::OUString NavigatorReminder::our_sNamePrefix(RTL_CONSTASCII_USTRINGPARAM("__NavigatorReminder__"));
UnoMark::UnoMark(const SwPaM& aPaM)
: MarkBase(aPaM, MarkBase::GenerateNewName(our_sNamePrefix))
{ }
- const ::rtl::OUString UnoMark::our_sNamePrefix = ::rtl::OUString::createFromAscii("__UnoMark__");
+ const ::rtl::OUString UnoMark::our_sNamePrefix(RTL_CONSTASCII_USTRINGPARAM("__UnoMark__"));
DdeBookmark::DdeBookmark(const SwPaM& aPaM)
: MarkBase(aPaM, MarkBase::GenerateNewName(our_sNamePrefix))
@@ -198,7 +199,7 @@ namespace sw { namespace mark
m_aRefObj = pObj;
}
- const ::rtl::OUString DdeBookmark::our_sNamePrefix = ::rtl::OUString::createFromAscii("__DdeLink__");
+ const ::rtl::OUString DdeBookmark::our_sNamePrefix(RTL_CONSTASCII_USTRINGPARAM("__DdeLink__"));
void DdeBookmark::DeregisterFromDoc(SwDoc* const pDoc)
{
@@ -308,7 +309,7 @@ namespace sw { namespace mark
aPaM.InvalidatePaM();
}
- const ::rtl::OUString Fieldmark::our_sNamePrefix = ::rtl::OUString::createFromAscii("__Fieldmark__");
+ const ::rtl::OUString Fieldmark::our_sNamePrefix(RTL_CONSTASCII_USTRINGPARAM("__Fieldmark__"));
TextFieldmark::TextFieldmark(const SwPaM& rPaM)
: Fieldmark(rPaM)
@@ -325,7 +326,7 @@ namespace sw { namespace mark
void CheckboxFieldmark::InitDoc(SwDoc* const io_pDoc)
{
- lcl_AssureFieldMarksSet(this, io_pDoc, CH_TXT_ATR_FORMELEMENT, CH_TXT_ATR_FIELDEND);
+ lcl_AssureFieldMarksSet(this, io_pDoc, CH_TXT_ATR_FIELDSTART, CH_TXT_ATR_FORMELEMENT);
// For some reason the end mark is moved from 1 by the Insert: we don't
// want this for checkboxes
@@ -333,16 +334,38 @@ namespace sw { namespace mark
}
void CheckboxFieldmark::SetChecked(bool checked)
{
- (*GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_RESULT)] = makeAny(checked);
+ if ( IsChecked() != checked )
+ {
+ (*GetParameters())[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMCHECKBOX_RESULT))] = makeAny(checked);
+ // mark document as modified
+ SwDoc *const pDoc( GetMarkPos().GetDoc() );
+ if ( pDoc )
+ pDoc->SetModified();
+ }
}
bool CheckboxFieldmark::IsChecked() const
{
bool bResult = false;
- parameter_map_t::const_iterator pResult = GetParameters()->find(::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_RESULT));
+ parameter_map_t::const_iterator pResult = GetParameters()->find(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMCHECKBOX_RESULT)));
if(pResult != GetParameters()->end())
pResult->second >>= bResult;
return bResult;
}
+ rtl::OUString CheckboxFieldmark::toString( ) const
+ {
+ rtl::OUStringBuffer buf;
+ buf.appendAscii( "CheckboxFieldmark: ( Name, Type, [ Nd1, Id1 ], [ Nd2, Id2 ] ): ( " );
+ buf.append( m_aName ).appendAscii( ", " );
+ buf.append( GetFieldname() ).appendAscii( ", [ " );
+ buf.append( sal_Int32( GetMarkPos().nNode.GetIndex( ) ) ).appendAscii( ", " );
+ buf.append( sal_Int32( GetMarkPos( ).nContent.GetIndex( ) ) ).appendAscii( " ], [" );
+ buf.append( sal_Int32( GetOtherMarkPos().nNode.GetIndex( ) ) ).appendAscii( ", " );
+ buf.append( sal_Int32( GetOtherMarkPos( ).nContent.GetIndex( ) ) ).appendAscii( " ] ) " );
+
+ return buf.makeStringAndClear( );
+ }
}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 74275c1014ef..7a496a422298 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <hintids.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <fmtcntnt.hxx>
#include <txatbase.hxx>
#include <frmatr.hxx>
@@ -43,10 +42,15 @@
#include <doc.hxx>
#include <frmfmt.hxx>
#include <txtfrm.hxx>
+#include <tabfrm.hxx>
+#include <rowfrm.hxx>
+#include <fmtfsize.hxx>
#include <ndtxt.hxx>
#include <flyfrm.hxx>
#include <breakit.hxx>
+#include<vcl/window.hxx>
+
SwCallLink::SwCallLink( SwCrsrShell & rSh, sal_uLong nAktNode, xub_StrLen nAktCntnt,
sal_uInt8 nAktNdTyp, long nLRPos, bool bAktSelection )
@@ -60,7 +64,7 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh, sal_uLong nAktNode, xub_StrLen nAktCn
SwCallLink::SwCallLink( SwCrsrShell & rSh )
: rShell( rSh )
{
- // SPoint-Werte vom aktuellen Cursor merken
+ // remember SPoint-values of current cursor
SwPaM* pCrsr = rShell.IsTableMode() ? rShell.GetTblCrs() : rShell.GetCrsr();
SwNode& rNd = pCrsr->GetPoint()->nNode.GetNode();
nNode = rNd.GetIndex();
@@ -75,10 +79,11 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh )
{
nLeftFrmPos = 0;
- // eine Sonderbehandlung fuer die SwFeShell: diese setzt beim Loeschen
- // der Kopf-/Fusszeile, Fussnoten den Cursor auf NULL (Node + Content)
- // steht der Cursor auf keinem CntntNode, wird sich das im NdType
- // gespeichert.
+ // A special treatment for SwFeShell:
+ // When deleting the header/footer, footnotes SwFeShell sets the
+ // Cursor to NULL (Node + Content).
+ // If the Cursor is not on a CntntNode (ContentNode) this fact gets
+ // saved in NdType.
if( ND_CONTENTNODE & nNdTyp )
nNdTyp = 0;
}
@@ -87,31 +92,67 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh )
SwCallLink::~SwCallLink()
{
- if( !nNdTyp || !rShell.bCallChgLnk ) // siehe ctor
+ if( !nNdTyp || !rShell.bCallChgLnk ) // see ctor
return ;
- // wird ueber Nodes getravellt, Formate ueberpruefen und im neuen
- // Node wieder anmelden
+ // If travelling over Nodes check formats and register them anew at the
+ // new Node.
SwPaM* pCurCrsr = rShell.IsTableMode() ? rShell.GetTblCrs() : rShell.GetCrsr();
SwCntntNode * pCNd = pCurCrsr->GetCntntNode();
if( !pCNd )
return;
+ SwFrm *myFrm=pCNd->GetFrm();
+ if (myFrm!=NULL)
+ {
+ // We need to emulated a change of the row height in order
+ // to have the complete row redrawn
+ SwRowFrm* pRow = myFrm->FindRowFrm( );
+ if ( pRow )
+ {
+ const SwTableLine* pLine = pRow->GetTabLine( );
+ SwFmtFrmSize pSize = pLine->GetFrmFmt( )->GetFrmSize( );
+ pRow->Modify( NULL, &pSize );
+ }
+ }
+
+ const SwDoc *pDoc=rShell.GetDoc();
+ const SwCntntNode *pNode = NULL;
+ if ( ( pDoc != NULL && nNode < pDoc->GetNodes( ).Count( ) ) )
+ {
+ pNode = pDoc->GetNodes()[nNode]->GetCntntNode();
+ }
+ if ( pNode != NULL )
+ {
+ SwFrm *myFrm2=pNode->GetFrm();
+ if (myFrm2!=NULL)
+ {
+ // We need to emulated a change of the row height in order
+ // to have the complete row redrawn
+ SwRowFrm* pRow = myFrm2->FindRowFrm();
+ if ( pRow )
+ {
+ const SwTableLine* pLine = pRow->GetTabLine( );
+ SwFmtFrmSize pSize = pLine->GetFrmFmt( )->GetFrmSize( );
+ pRow->Modify( NULL, &pSize );
+ }
+ }
+ }
+
xub_StrLen nCmp, nAktCntnt = pCurCrsr->GetPoint()->nContent.GetIndex();
sal_uInt16 nNdWhich = pCNd->GetNodeType();
sal_uLong nAktNode = pCurCrsr->GetPoint()->nNode.GetIndex();
- // melde die Shell beim akt. Node als abhaengig an, dadurch koennen
- // alle Attribut-Aenderungen ueber den Link weiter gemeldet werden.
+ // Register the Shell as dependent at the current Node. By doing this all
+ // attribute changes can be signaled over the link.
pCNd->Add( &rShell );
if( nNdTyp != nNdWhich || nNode != nAktNode )
{
- /* immer, wenn zwischen Nodes gesprungen wird, kann es
- * vorkommen, das neue Attribute gelten; die Text-Attribute.
- * Es muesste also festgestellt werden, welche Attribute
- * jetzt gelten; das kann auch gleich der Handler machen
- */
+ // Every time a switch between nodes occurs, there is a chance that
+ // new attributes do apply - meaning text-attributes.
+ // So the currently applying attributes would have to be determined.
+ // That can be done in one go by the handler.
rShell.CallChgLnk();
}
else if( !bHasSelection != !(*pCurCrsr->GetPoint() != *pCurCrsr->GetMark()) )
@@ -122,14 +163,14 @@ SwCallLink::~SwCallLink()
else if( rShell.aChgLnk.IsSet() && ND_TEXTNODE == nNdWhich &&
nCntnt != nAktCntnt )
{
- // nur wenn mit Left/right getravellt, dann Text-Hints pruefen
- // und sich nicht der Frame geaendert hat (Spalten!)
+ // If travelling with left/right only and the frame is
+ // unchanged (columns!) then check text hints.
if( nLeftFrmPos == SwCallLink::GetFrm( (SwTxtNode&)*pCNd, nAktCntnt,
!rShell.ActionPend() ) &&
(( nCmp = nCntnt ) + 1 == nAktCntnt || // Right
nCntnt -1 == ( nCmp = nAktCntnt )) ) // Left
{
- if( nCmp == nAktCntnt && pCurCrsr->HasMark() ) // left & Sele
+ if( nCmp == nAktCntnt && pCurCrsr->HasMark() ) // left & select
++nCmp;
if ( ((SwTxtNode*)pCNd)->HasHints() )
{
@@ -145,8 +186,8 @@ SwCallLink::~SwCallLink()
pEnd = pHt->GetEnd();
nStart = *pHt->GetStart();
- // nur Start oder Start und Ende gleich, dann immer
- // beim Ueberlaufen von Start callen
+ // If "only start" or "start and end equal" then call on
+ // every overflow of start.
if( ( !pEnd || ( nStart == *pEnd ) ) &&
( nStart == nCntnt || nStart == nAktCntnt) )
{
@@ -154,9 +195,9 @@ SwCallLink::~SwCallLink()
return;
}
- // hat das Attribut einen Bereich und dieser nicht leer
+ // If the attribute has an area and that area is not empty ...
else if( pEnd && nStart < *pEnd &&
- // dann teste, ob ueber Start/Ende getravellt wurde
+ // ... then test if travelling occurred via start/end.
( nStart == nCmp ||
( pHt->DontExpand() ? nCmp == *pEnd-1
: nCmp == *pEnd ) ))
@@ -181,11 +222,9 @@ SwCallLink::~SwCallLink()
}
}
else
- /* wenn mit Home/End/.. mehr als 1 Zeichen getravellt, dann
- * immer den ChgLnk rufen, denn es kann hier nicht
- * festgestellt werden, was sich geaendert; etwas kann
- * veraendert sein.
- */
+ // If travelling more than one character with home/end/.. then
+ // always call ChgLnk, because it can not be determined here what
+ // has changed. Something may have changed.
rShell.CallChgLnk();
}
@@ -195,7 +234,7 @@ SwCallLink::~SwCallLink()
0 != ( pFlyFrm = pFrm->FindFlyFrm() ) && !rShell.IsTableMode() )
{
const SwNodeIndex* pIndex = pFlyFrm->GetFmt()->GetCntnt().GetCntntIdx();
- ASSERT( pIndex, "Fly ohne Cntnt" );
+ OSL_ENSURE( pIndex, "Fly ohne Cntnt" );
if (!pIndex)
return;
@@ -223,3 +262,4 @@ long SwCallLink::GetFrm( SwTxtNode& rNd, xub_StrLen nCntPos, sal_Bool bCalcFrm )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/callnk.hxx b/sw/source/core/crsr/callnk.hxx
index ad2ea384cc8b..b710b5db96c3 100644
--- a/sw/source/core/crsr/callnk.hxx
+++ b/sw/source/core/crsr/callnk.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,3 +55,5 @@ public:
#endif // _CALLNK_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx
index 0ef82902ff08..33a2c686ebaa 100644
--- a/sw/source/core/crsr/crbm.cxx
+++ b/sw/source/core/crsr/crbm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -251,10 +252,12 @@ bool SwCrsrShell::GotoFieldmark(::sw::mark::IFieldmark const * const pMark)
// watch Crsr-Moves
CrsrStateHelper aCrsrSt(*this);
aCrsrSt.SetCrsrToMark(pMark);
- //aCrsrSt.m_pCrsr->GetPoint()->nContent--;
- //aCrsrSt.m_pCrsr->GetMark()->nContent++;
+ aCrsrSt.m_pCrsr->GetPoint()->nContent++;
+ aCrsrSt.m_pCrsr->GetMark()->nContent--;
if(aCrsrSt.RollbackIfIllegal()) return false;
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
return true;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx
index dc083801ee8e..3f649ef7ed56 100644
--- a/sw/source/core/crsr/crossrefbookmark.cxx
+++ b/sw/source/core/crsr/crossrefbookmark.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,8 +32,7 @@
#include <crossrefbookmark.hxx>
#include <ndtxt.hxx>
-using namespace rtl;
-
+using ::rtl::OUString;
namespace sw { namespace mark
{
CrossRefBookmark::CrossRefBookmark(const SwPaM& rPaM,
@@ -79,7 +79,7 @@ namespace sw { namespace mark
: CrossRefBookmark(rPaM, rCode, rName, rShortName, our_sNamePrefix)
{ }
- const ::rtl::OUString CrossRefHeadingBookmark::our_sNamePrefix = ::rtl::OUString::createFromAscii("__RefHeading__");
+ const ::rtl::OUString CrossRefHeadingBookmark::our_sNamePrefix(RTL_CONSTASCII_USTRINGPARAM("__RefHeading__"));
bool CrossRefHeadingBookmark::IsLegalName(const ::rtl::OUString& rName)
{
@@ -93,10 +93,12 @@ namespace sw { namespace mark
: CrossRefBookmark(rPaM, rCode, rName, rShortName, our_sNamePrefix)
{ }
- const ::rtl::OUString CrossRefNumItemBookmark::our_sNamePrefix = ::rtl::OUString::createFromAscii("__RefNumPara__");
+ const ::rtl::OUString CrossRefNumItemBookmark::our_sNamePrefix(RTL_CONSTASCII_USTRINGPARAM("__RefNumPara__"));
bool CrossRefNumItemBookmark::IsLegalName(const ::rtl::OUString& rName)
{
return rName.match(our_sNamePrefix);
}
}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 8e77c070d62d..7ec342cfd3bc 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -132,7 +133,7 @@ void CheckRange( SwCursor* pCurCrsr )
SwPaM * SwCrsrShell::CreateCrsr()
{
// Innerhalb der Tabellen-SSelection keinen neuen Crsr anlegen
- ASSERT( !IsTableMode(), "in Tabellen SSelection" );
+ OSL_ENSURE( !IsTableMode(), "in Tabellen SSelection" );
// neuen Cursor als Kopie vom akt. und in den Ring aufnehmen
// Verkettung zeigt immer auf den zuerst erzeugten, also vorwaerts
@@ -141,9 +142,7 @@ SwPaM * SwCrsrShell::CreateCrsr()
// hier den akt. Pam nur logisch Hiden, weil sonst die Invertierung
// vom kopierten Pam aufgehoben wird !!
- // #i75172# to be able to make a complete content swap, i moved this to a method
- // pNew->Insert( pCurCrsr, 0 );
- // pCurCrsr->Remove( 0, pCurCrsr->Count() );
+ // #i75172#
pNew->swapContent(*pCurCrsr);
pCurCrsr->DeleteMark();
@@ -159,7 +158,7 @@ SwPaM * SwCrsrShell::CreateCrsr()
sal_Bool SwCrsrShell::DestroyCrsr()
{
// Innerhalb der Tabellen-SSelection keinen neuen Crsr loeschen
- ASSERT( !IsTableMode(), "in Tabellen SSelection" );
+ OSL_ENSURE( !IsTableMode(), "in Tabellen SSelection" );
// ist ueberhaupt ein naechtser vorhanden ?
if(pCurCrsr->GetNext() == pCurCrsr)
@@ -240,16 +239,6 @@ void SwCrsrShell::StartAction()
void SwCrsrShell::EndAction( const sal_Bool bIdleEnd )
{
-/*
-//OS: Wird z.B. eine Basic-Action im Hintergrund ausgefuehrt, geht es so nicht
- if( !bHasFocus )
- {
- // hat die Shell nicht den Focus, dann nur das EndAction an
- // die ViewShell weitergeben.
- ViewShell::EndAction( bIdleEnd );
- return;
- }
-*/
sal_Bool bVis = bSVCrsrVis;
@@ -257,21 +246,6 @@ void SwCrsrShell::EndAction( const sal_Bool bIdleEnd )
if( bIdleEnd && Imp()->GetRegion() )
{
pCurCrsr->Hide();
-
-#ifdef SHOW_IDLE_REGION
-if( GetWin() )
-{
- GetWin()->Push();
- GetWin()->ChangePen( Pen( Color( COL_YELLOW )));
- for( sal_uInt16 n = 0; n < aPntReg.Count(); ++n )
- {
- SwRect aIRect( aPntReg[n] );
- GetWin()->DrawRect( aIRect.SVRect() );
- }
- GetWin()->Pop();
-}
-#endif
-
}
// vor der letzten Action alle invaliden Numerierungen updaten
@@ -297,7 +271,7 @@ if( GetWin() )
// mit der Basic-Klammerung entkoppelt; die Shells werden umgeschaltet
if( !BasicActionPend() )
{
- //JP 12.01.98: Bug #46496# - es muss innerhalb einer BasicAction
+ // es muss innerhalb einer BasicAction
// der Cursor geupdatet werden; um z.B. den
// TabellenCursor zu erzeugen. Im UpdateCrsr wird
// das jetzt beruecksichtigt!
@@ -344,18 +318,18 @@ if( GetWin() )
}
-#if defined(DBG_UTIL)
+#if OSL_DEBUG_LEVEL > 1
void SwCrsrShell::SttCrsrMove()
{
- ASSERT( nCrsrMove < USHRT_MAX, "To many nested CrsrMoves." );
+ OSL_ENSURE( nCrsrMove < USHRT_MAX, "To many nested CrsrMoves." );
++nCrsrMove;
StartAction();
}
void SwCrsrShell::EndCrsrMove( const sal_Bool bIdleEnd )
{
- ASSERT( nCrsrMove, "EndCrsrMove() ohne SttCrsrMove()." );
+ OSL_ENSURE( nCrsrMove, "EndCrsrMove() ohne SttCrsrMove()." );
EndAction( bIdleEnd );
if( !--nCrsrMove )
bInCMvVisportChgd = sal_False;
@@ -407,7 +381,7 @@ sal_Bool SwCrsrShell::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMo
else
{
const sal_Bool bSkipHidden = !GetViewOptions()->IsShowHiddenChar();
- // --> OD 2009-12-30 #i107447#
+ // #i107447#
// To avoid loop the reset of <bInFrontOfLabel> flag is no longer
// reflected in the return value <bRet>.
const bool bResetOfInFrontOfLabel = SetInFrontOfLabel( sal_False );
@@ -418,7 +392,6 @@ sal_Bool SwCrsrShell::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMo
// undo reset of <bInFrontOfLabel> flag
SetInFrontOfLabel( sal_True );
}
- // <--
}
if( bRet )
@@ -428,7 +401,6 @@ sal_Bool SwCrsrShell::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMo
return bRet;
}
-// --> OD 2008-04-02 #refactorlists#
void SwCrsrShell::MarkListLevel( const String& sListId,
const int nListLevel )
{
@@ -463,8 +435,8 @@ void SwCrsrShell::UpdateMarkedListLevel()
{
if ( pTxtNd->IsInList() )
{
- ASSERT( pTxtNd->GetActualListLevel() >= 0 &&
- pTxtNd->GetActualListLevel() < MAXLEVEL, "Which level?")
+ OSL_ENSURE( pTxtNd->GetActualListLevel() >= 0 &&
+ pTxtNd->GetActualListLevel() < MAXLEVEL, "Which level?");
MarkListLevel( pTxtNd->GetListId(),
pTxtNd->GetActualListLevel() );
}
@@ -486,10 +458,8 @@ sal_Bool SwCrsrShell::UpDown( sal_Bool bUp, sal_uInt16 nCnt )
SwShellCrsr* pTmpCrsr = getShellCrsr( true );
sal_Bool bRet = pTmpCrsr->UpDown( bUp, nCnt );
- // --> FME 2005-01-10 #i40019# UpDown should always reset the
- // bInFrontOfLabel flag:
+ // #i40019# UpDown should always reset the bInFrontOfLabel flag:
bRet = SetInFrontOfLabel(sal_False) || bRet;
- // <--
if( pBlockCrsr )
pBlockCrsr->clearPoints();
@@ -758,12 +728,11 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, sal_Bool bOnlyText, bool bBlock )
*pCrsr->GetPoint() = aPos;
rAktCrsrPt = aPt;
- // --> FME 2005-01-31 #i41424# Only update the marked number levels if necessary
+ // #i41424# Only update the marked number levels if necessary
// Force update of marked number levels if necessary.
if ( bNewInFrontOfLabel || bOldInFrontOfLabel )
pCurCrsr->_SetInFrontOfLabel( !bNewInFrontOfLabel );
SetInFrontOfLabel( bNewInFrontOfLabel );
- // <--
if( !pCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) )
{
@@ -804,13 +773,13 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, sal_Bool bOnlyText, bool bBlock )
void SwCrsrShell::TblCrsrToCursor()
{
- ASSERT( pTblCrsr, "TblCrsrToCursor: Why?" );
+ OSL_ENSURE( pTblCrsr, "TblCrsrToCursor: Why?" );
delete pTblCrsr, pTblCrsr = 0;
}
void SwCrsrShell::BlockCrsrToCrsr()
{
- ASSERT( pBlockCrsr, "BlockCrsrToCrsr: Why?" );
+ OSL_ENSURE( pBlockCrsr, "BlockCrsrToCrsr: Why?" );
if( pBlockCrsr && !HasSelection() )
{
SwPaM& rPam = pBlockCrsr->getShellCrsr();
@@ -1234,12 +1203,6 @@ void SwCrsrShell::VisPortChgd( const SwRect & rRect )
//angezeigt werden, deshalb wird der Aufruf hier geklammert.
ViewShell::VisPortChgd( rRect ); // Bereich verschieben
-/*
- SwRect aRect( rRect );
- if( VisArea().IsOver( aRect ) )
- pCurCrsr->Invalidate( aRect );
-*/
-
if( bSVCrsrVis && bVis ) // auch SV-Cursor wieder anzeigen
pVisCrsr->Show();
@@ -1296,7 +1259,7 @@ static void lcl_CheckHiddenSection( SwNodeIndex& rIdx )
#if OSL_DEBUG_LEVEL > 1
(void) pFrmNd;
- ASSERT( pFrmNd, "keinen Node mit Frames gefunden" );
+ OSL_ENSURE( pFrmNd, "keinen Node mit Frames gefunden" );
#endif
rIdx = aTmp;
}
@@ -1320,8 +1283,8 @@ static void lcl_CheckHiddenPara( SwPosition& rPos )
rPos = SwPosition( aTmp, SwIndex( pTxtNd, 0 ) );
}
-// --> OD 2005-12-14 #i27301# - helper class, which notifies the accessibility
-// about invalid text selections in its destructor
+// #i27301# - helper class, which notifies the accessibility about invalid text
+// selections in its destructor
class SwNotifyAccAboutInvalidTextSelections
{
private:
@@ -1344,10 +1307,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
ClearUpCrsrs();
- // erfrage den Count fuer die Start-/End-Actions und ob die Shell
- // ueberhaupt den Focus hat
-// if( ActionPend() /*|| !bHasFocus*/ )
- //JP 12.01.98: Bug #46496# - es muss innerhalb einer BasicAction der
+ // es muss innerhalb einer BasicAction der
// Cursor geupdatet werden; um z.B. den TabellenCursor zu
// erzeugen. Im EndAction wird jetzt das UpdateCrsr gerufen!
if( ActionPend() && BasicActionPend() )
@@ -1357,9 +1317,8 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
return; // wenn nicht, dann kein Update !!
}
- // --> OD 2005-12-14 #i27301#
+ // #i27301#
SwNotifyAccAboutInvalidTextSelections aInvalidateTextSelections( *this );
- // <--
if ( bIgnoreReadonly )
{
@@ -1402,10 +1361,10 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
SwCntntFrm *pTblFrm = pPos->nNode.GetNode().GetCntntNode()->
GetFrm( &aTmpPt, pPos );
- ASSERT( pTblFrm, "Tabelle Crsr nicht im Content ??" );
+ OSL_ENSURE( pTblFrm, "Tabelle Crsr nicht im Content ??" );
- // --> FME 2005-12-02 #126107# Make code robust. The table
- // cursor may point to a table in a currently inactive header.
+ // --> Make code robust. The table cursor may point
+ // to a table in a currently inactive header.
SwTabFrm *pTab = pTblFrm ? pTblFrm->FindTabFrm() : 0;
// <--
@@ -1418,19 +1377,18 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
if ( !bInRepeatedHeadline )
{
SwCntntFrm* pMarkTblFrm = pITmpCrsr->GetCntntNode( sal_False )->GetFrm( &aTmpMk, pITmpCrsr->GetMark() );
- ASSERT( pMarkTblFrm, "Tabelle Crsr nicht im Content ??" );
+ OSL_ENSURE( pMarkTblFrm, "Tabelle Crsr nicht im Content ??" );
if ( pMarkTblFrm )
{
SwTabFrm* pMarkTab = pMarkTblFrm->FindTabFrm();
- ASSERT( pMarkTab, "Tabelle Crsr nicht im Content ??" );
+ OSL_ENSURE( pMarkTab, "Tabelle Crsr nicht im Content ??" );
- // --> FME 2005-11-28 #120360# Make code robust:
+ // Make code robust:
if ( pMarkTab )
{
bInRepeatedHeadline = pMarkTab->IsFollow() && pMarkTab->IsInHeadline( *pMarkTblFrm );
}
- // <--
}
}
@@ -1479,14 +1437,13 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
Point aCentrPt( aCharRect.Center() );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
pTblFrm->GetCrsrOfst( pTblCrsr->GetPoint(), aCentrPt, &aTmpState );
-#ifndef DBG_UTIL
- pTblFrm->GetCharRect( aCharRect, *pTblCrsr->GetPoint() );
-#else
+#if OSL_DEBUG_LEVEL > 1
if ( !pTblFrm->GetCharRect( aCharRect, *pTblCrsr->GetPoint() ) )
- ASSERT( !this, "GetCharRect failed." );
+ OSL_ENSURE( !this, "GetCharRect failed." );
+#else
+ pTblFrm->GetCharRect( aCharRect, *pTblCrsr->GetPoint() );
#endif
}
-// ALIGNRECT( aCharRect );
pVisCrsr->Hide(); // sichtbaren Cursor immer verstecken
// Curosr in den sichtbaren Bereich scrollen
@@ -1586,7 +1543,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
UpdateCrsrPos();
- // #100722# The cursor must always point into content; there's some code
+ // The cursor must always point into content; there's some code
// that relies on this. (E.g. in SwEditShell::GetScriptType, which always
// loops _behind_ the last node in the selection, which always works if you
// are in content.) To achieve this, we'll force cursor(s) to point into
@@ -1644,7 +1601,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
} while( !pFrm );
}
else if ( Imp()->IsIdleAction() )
- //Wir stellen sicher, dass anstaendig Formatiert wurde #42224#
+ //Wir stellen sicher, dass anstaendig Formatiert wurde
pFrm->PrepareCrsr();
// im geschuetzten Fly? aber bei Rahmenselektion ignorieren
@@ -1713,7 +1670,6 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
rPt = aCharRect.Center();
pFrm->GetCrsrOfst( pShellCrsr->GetPoint(), rPt, &aTmpState );
}
-// ALIGNRECT( aCharRect );
if( !pShellCrsr->HasMark() )
aCrsrHeight = aTmpState.aRealHeight;
@@ -1738,7 +1694,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
// siehe Bug: 29658
if( !--nLoopCnt )
{
- ASSERT( !this, "Endlosschleife? CharRect != OldCharRect ");
+ OSL_ENSURE( !this, "Endlosschleife? CharRect != OldCharRect ");
break;
}
aOld = aCharRect;
@@ -1823,7 +1779,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
void SwCrsrShell::RefreshBlockCursor()
{
- ASSERT( pBlockCrsr, "Don't call me without a block cursor" );
+ OSL_ENSURE( pBlockCrsr, "Don't call me without a block cursor" );
SwShellCrsr &rBlock = pBlockCrsr->getShellCrsr();
Point aPt = rBlock.GetPtPos();
SwCntntFrm* pFrm = rBlock.GetCntntNode()->GetFrm( &aPt, rBlock.GetPoint() );
@@ -1860,7 +1816,7 @@ void SwCrsrShell::RefreshBlockCursor()
std::list<SwPaM*>::iterator pStart = aSelList.getStart();
std::list<SwPaM*>::iterator pPam = aSelList.getEnd();
- ASSERT( pPam != pStart, "FillSelection should deliver at least one PaM" )
+ OSL_ENSURE( pPam != pStart, "FillSelection should deliver at least one PaM" );
pCurCrsr->SetMark();
--pPam;
// If there is only one text portion inside the rectangle, a simple
@@ -2027,11 +1983,11 @@ void SwCrsrShell::Combine()
SwCrsrSaveState aSaveState( *pCurCrsr );
if( pCrsrStk->HasMark() ) // nur wenn GetMark gesetzt wurde
{
-#ifndef DBG_UTIL
- CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, sal_True );
-#else
+#if OSL_DEBUG_LEVEL > 1
if( !CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, sal_True ))
- ASSERT( !this, "StackCrsr & akt. Crsr nicht in gleicher Section." );
+ OSL_ENSURE( !this, "StackCrsr & akt. Crsr nicht in gleicher Section." );
+#else
+ CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, sal_True );
#endif
// kopiere das GetMark
if( !pCurCrsr->HasMark() )
@@ -2280,7 +2236,7 @@ sal_Bool SwCrsrShell::ExtendSelection( sal_Bool bEnd, xub_StrLen nCount )
SwPosition* pPos = bEnd ? pCurCrsr->End() : pCurCrsr->Start();
SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode();
- ASSERT( pTxtNd, "kein TextNode, wie soll erweitert werden?" );
+ OSL_ENSURE( pTxtNd, "kein TextNode, wie soll erweitert werden?" );
xub_StrLen nPos = pPos->nContent.GetIndex();
if( bEnd )
@@ -2336,7 +2292,6 @@ sal_Bool SwCrsrShell::SetVisCrsr( const Point &rPt )
SwRect aTmp( aCharRect );
pFrm->GetCharRect( aCharRect, aPos, &aTmpState );
-// ALIGNRECT( aCharRect );
if( aTmp == aCharRect && // BUG 10137: bleibt der Cursor auf der
pVisCrsr->IsVisible() ) // Position nicht hidden & showen
@@ -2349,9 +2304,6 @@ sal_Bool SwCrsrShell::SetVisCrsr( const Point &rPt )
pCurCrsr->Show();
}
- // Bug 29584: bei Rahmenselektion ist der Cursor versteckt, aber den
- // D&D-Cursor will man trotzdem haben
-// if( bSVCrsrVis )
{
if( aTmpState.bRealHeight )
aCrsrHeight = aTmpState.aRealHeight;
@@ -2372,9 +2324,8 @@ sal_Bool SwCrsrShell::IsOverReadOnlyPos( const Point& rPt ) const
Point aPt( rPt );
SwPaM aPam( *pCurCrsr->GetPoint() );
GetLayout()->GetCrsrOfst( aPam.GetPoint(), aPt );
- // --> FME 2004-06-29 #114856# Formular view
+ // Formular view
return aPam.HasReadonlySel( GetViewOptions()->IsFormView() );
- // <--
}
@@ -2448,8 +2399,6 @@ sal_Bool SwCrsrShell::ParkTblCrsr()
#* Methode : ParkCrsr
#* Beschreibung: Vernichtet Selektionen und zus. Crsr aller Shell der
#* verbleibende Crsr der Shell wird geparkt.
-#* Datum : MA 05. Nov. 92
-#* Update : JP 19.09.97
#***********************************************************************/
void SwCrsrShell::_ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing )
@@ -2587,10 +2536,8 @@ SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, Window *pInitWin )
SwModify( 0 ), pCrsrStk( 0 ), pBlockCrsr( 0 ), pTblCrsr( 0 ),
pBoxIdx( 0 ), pBoxPtr( 0 ), nCrsrMove( 0 ), nBasicActionCnt( 0 ),
eMvState( MV_NONE ),
- // --> OD 2008-04-02 #refactorlists#
sMarkedListId(),
nMarkedListLevel( 0 )
- // <--
{
SET_CURR_SHELL( this );
// Nur die Position vom aktuellen Cursor aus der Copy-Shell uebernehmen
@@ -2603,8 +2550,6 @@ SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, Window *pInitWin )
bCallChgLnk = bHasFocus = bSVCrsrVis = bAutoUpdateCells = sal_True;
bSetCrsrInReadOnly = sal_True;
pVisCrsr = new SwVisCrsr( this );
-// UpdateCrsr( 0 );
- // OD 11.02.2003 #100556#
mbMacroExecAllowed = rShell.IsMacroExecAllowed();
}
@@ -2619,10 +2564,8 @@ SwCrsrShell::SwCrsrShell( SwDoc& rDoc, Window *pInitWin,
SwModify( 0 ), pCrsrStk( 0 ), pBlockCrsr( 0 ), pTblCrsr( 0 ),
pBoxIdx( 0 ), pBoxPtr( 0 ), nCrsrMove( 0 ), nBasicActionCnt( 0 ),
eMvState( MV_NONE ), // state for crsr-travelling - GetCrsrOfst
- // --> OD 2008-04-02 #refactorlists#
sMarkedListId(),
nMarkedListLevel( 0 )
- // <--
{
SET_CURR_SHELL( this );
/*
@@ -2647,8 +2590,6 @@ SwCrsrShell::SwCrsrShell( SwDoc& rDoc, Window *pInitWin,
bSetCrsrInReadOnly = sal_True;
pVisCrsr = new SwVisCrsr( this );
-// UpdateCrsr( 0 );
- // OD 11.02.2003 #100556#
mbMacroExecAllowed = true;
}
@@ -2725,7 +2666,7 @@ sal_uInt16 SwCrsrShell::UpdateTblSelBoxes()
// zeige das akt. selektierte "Object" an
void SwCrsrShell::MakeSelVisible()
{
- ASSERT( bHasFocus, "kein Focus aber Cursor sichtbar machen?" );
+ OSL_ENSURE( bHasFocus, "kein Focus aber Cursor sichtbar machen?" );
if( aCrsrHeight.Y() < aCharRect.Height() && aCharRect.Height() > VisArea().Height() )
{
SwRect aTmp( aCharRect );
@@ -2763,7 +2704,7 @@ sal_Bool SwCrsrShell::FindValidCntntNode( sal_Bool bOnlyText )
{
if( pTblCrsr ) // was soll ich jetzt machen ??
{
- ASSERT( !this, "TabellenSelection nicht aufgehoben!" );
+ OSL_ENSURE( !this, "TabellenSelection nicht aufgehoben!" );
return sal_False;
}
@@ -2921,7 +2862,6 @@ sal_Bool SwCrsrShell::FindValidCntntNode( sal_Bool bOnlyText )
if( bOk )
{
pCNd = rNdIdx.GetNode().GetCntntNode();
-// sal_uInt16 nCntnt = Min( pCNd->Len(), pCurCrsr->GetPoint()->nContent.GetIndex() );
xub_StrLen nCntnt = rNdIdx.GetIndex() < nNdIdx ? pCNd->Len() : 0;
pCurCrsr->GetPoint()->nContent.Assign( pCNd, nCntnt );
}
@@ -2951,9 +2891,8 @@ void SwCrsrShell::NewCoreSelection()
sal_Bool SwCrsrShell::IsCrsrReadonly() const
{
if ( GetViewOptions()->IsReadonly() ||
- // --> FME 2004-06-29 #114856# Formular view
+ // Formular view
GetViewOptions()->IsFormView() )
- // <--
{
SwFrm *pFrm = GetCurrFrm( sal_False );
const SwFlyFrm* pFly;
@@ -2967,14 +2906,13 @@ sal_Bool SwCrsrShell::IsCrsrReadonly() const
{
return sal_False;
}
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
else if ( pFrm && pFrm->IsInSct() &&
0 != ( pSection = pFrm->FindSctFrm()->GetSection() ) &&
pSection->IsEditInReadonlyFlag() )
{
return sal_False;
}
- // <--
return sal_True;
}
@@ -3005,26 +2943,17 @@ void SwCrsrShell::SetReadOnlyAvailable( sal_Bool bFlag )
sal_Bool SwCrsrShell::HasReadonlySel() const
{
sal_Bool bRet = sal_False;
- if( IsReadOnlyAvailable() ||
- // --> FME 2004-06-29 #114856# Formular view
- GetViewOptions()->IsFormView() )
- // <--
+ if( IsReadOnlyAvailable() || GetViewOptions()->IsFormView() )
{
if( pTblCrsr )
bRet = pTblCrsr->HasReadOnlyBoxSel() ||
- pTblCrsr->HasReadonlySel(
- // --> FME 2004-06-29 #114856# Formular view
- GetViewOptions()->IsFormView() );
- // <--
+ pTblCrsr->HasReadonlySel( GetViewOptions()->IsFormView() );
else
{
const SwPaM* pCrsr = pCurCrsr;
do {
- if( pCrsr->HasReadonlySel(
- // --> FME 2004-06-29 #114856# Formular view
- GetViewOptions()->IsFormView() ) )
- // <--
+ if( pCrsr->HasReadonlySel( GetViewOptions()->IsFormView() ) )
bRet = sal_True;
} while( !bRet && pCurCrsr != ( pCrsr = (SwPaM*)pCrsr->GetNext() ));
}
@@ -3114,8 +3043,6 @@ bool SwCrsrShell::SelectHiddenRange()
return bRet;
}
-/* */
-
// die Suchfunktionen
sal_uLong SwCrsrShell::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes,
SwDocPositions eStart, SwDocPositions eEnde,
@@ -3193,7 +3120,7 @@ void SwCrsrShell::SetSelection( const SwPaM& rCrsr )
void lcl_RemoveMark( SwPaM* pPam )
{
- ASSERT( pPam->HasMark(), "Don't remove pPoint!" )
+ OSL_ENSURE( pPam->HasMark(), "Don't remove pPoint!" );
pPam->GetMark()->nContent.Assign( 0, 0 );
pPam->GetMark()->nNode = 0;
pPam->DeleteMark();
@@ -3286,7 +3213,7 @@ void SwCrsrShell::ClearUpCrsrs()
}
bool bFound = (pNode != NULL);
- ASSERT(bFound, "no content node found");
+ OSL_ENSURE(bFound, "no content node found");
if (bFound)
{
@@ -3305,7 +3232,6 @@ void SwCrsrShell::ClearUpCrsrs()
TblCrsrToCursor();
}
-// #111827#
String SwCrsrShell::GetCrsrDescr() const
{
String aResult;
@@ -3487,7 +3413,7 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
//no determine the rectangle in the current line
xub_StrLen nWordStart = (nBegin + nLeft) < nLineStart ? nLineStart : nBegin + nLeft;
//take one less than the line end - otherwise the next line would be calculated
- xub_StrLen nWordEnd = (nBegin + nLen - nLeft - nRight) > nLineEnd ? nLineEnd - 1: (nBegin + nLen - nLeft - nRight);
+ xub_StrLen nWordEnd = (nBegin + nLen - nLeft - nRight) > nLineEnd ? nLineEnd : (nBegin + nLen - nLeft - nRight);
Push();
pCrsr->DeleteMark();
SwIndex& rContent = GetCrsr()->GetPoint()->nContent;
@@ -3499,7 +3425,7 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
SwCntntFrm *pCntntFrame = pCntntNode->GetFrm( &rPt, pCrsr->GetPoint(), sal_False);
pCntntFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState );
- rContent = nWordEnd;
+ rContent = nWordEnd - 1;
SwRect aEndRect;
pCntntFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState );
rSelectRect = aStartRect.Union( aEndRect );
@@ -3508,3 +3434,4 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 08936c85210b..610b3f988a3a 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,7 +75,7 @@
#include <wrong.hxx>
#include <vcl/window.hxx>
-#include <docufld.hxx> // OD 2008-06-19 #i90516#
+#include <docufld.hxx>
using namespace ::com::sun::star;
@@ -315,9 +316,6 @@ sal_Bool SwCrsrShell::GotoNextTOXBase( const String* pName )
0 != ( pSectNd = pSect->GetFmt()->GetSectionNode() ) &&
pCurCrsr->GetPoint()->nNode < pSectNd->GetIndex() &&
( !pFnd || pFnd->GetIndex() > pSectNd->GetIndex() ) &&
-// JP 10.12.96: solange wir nur 3 Typen kennen und UI-seitig keine anderen
-// einstellbar sind, muss ueber den Titel gesucht werden!
-// ( !pName || *pName == ((SwTOXBaseSection*)pSect)->GetTypeName() ) &&
( !pName || *pName == ((SwTOXBaseSection*)pSect)->GetTOXName() )
)
{
@@ -365,9 +363,6 @@ sal_Bool SwCrsrShell::GotoPrevTOXBase( const String* pName )
0 != ( pSectNd = pSect->GetFmt()->GetSectionNode() ) &&
pCurCrsr->GetPoint()->nNode > pSectNd->EndOfSectionIndex() &&
( !pFnd || pFnd->GetIndex() < pSectNd->GetIndex() ) &&
-// JP 10.12.96: solange wir nur 3 Typen kennen und UI-seitig keine anderen
-// einstellbar sind, muss ueber den Titel gesucht werden!
-// ( !pName || *pName == ((SwTOXBaseSection*)pSect)->GetTypeName() ) &&
( !pName || *pName == ((SwTOXBaseSection*)pSect)->GetTOXName() )
)
{
@@ -707,7 +702,7 @@ sal_Bool SwCrsrShell::MoveFldType( const SwFieldType* pFldType, sal_Bool bNext,
const SwPosition& rPos = *pCrsr->GetPoint();
SwTxtNode* pTNd = rPos.nNode.GetNode().GetTxtNode();
- ASSERT( pTNd, "Wo ist mein CntntNode?" );
+ OSL_ENSURE( pTNd, "Wo ist mein CntntNode?" );
SwTxtFld * pTxtFld = static_cast<SwTxtFld *>(
pTNd->GetTxtAttrForCharAt(rPos.nContent.GetIndex(),
@@ -902,7 +897,6 @@ sal_uInt16 SwCrsrShell::GetOutlinePos( sal_uInt8 nLevel )
{
pNd = rNds.GetOutLineNds()[ nPos ];
- //if( ((SwTxtNode*)pNd)->GetTxtColl()->GetOutlineLevel() <= nLevel )//#outline level,zhaojianwei
if( ((SwTxtNode*)pNd)->GetAttrOutlineLevel()-1 <= nLevel )//<-end,zhaojianwei
return nPos;
@@ -924,7 +918,7 @@ sal_Bool SwCrsrShell::MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos,
if( nSttPos > nEndPos ) // sollte jemand das vertauscht haben?
{
- ASSERT( !this, "Start- > Ende-Position im Array" );
+ OSL_ENSURE( !this, "Start- > Ende-Position im Array" );
sal_uInt16 nTmp = nSttPos;
nSttPos = nEndPos;
nEndPos = nTmp;
@@ -935,12 +929,10 @@ sal_Bool SwCrsrShell::MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos,
if( bWithChilds )
{
- //sal_uInt8 nLevel = pEndNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
const int nLevel = pEndNd->GetTxtNode()->GetAttrOutlineLevel()-1;//<-end.zhaojianwei
for( ++nEndPos; nEndPos < rOutlNds.Count(); ++nEndPos )
{
pEndNd = rOutlNds[ nEndPos ];
- //sal_uInt8 nNxtLevel = pEndNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
const int nNxtLevel = pEndNd->GetTxtNode()->GetAttrOutlineLevel()-1;//<-end,zhaojianwei
if( nNxtLevel <= nLevel )
break; // EndPos steht jetzt auf dem naechsten
@@ -1103,14 +1095,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
}
if( bRet )
{
-// rCntntAtPos.sStr = pTxtNd->GetExpandTxt(
-// *pTxtAttr->GetStart(),
-// *pTxtAttr->GetEnd() - *pTxtAttr->GetStart(),
-// sal_False );
-
-// rCntntAtPos.aFnd.pAttr = &pTxtAttr->GetAttr();
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_SMARTTAG;
-// rCntntAtPos.pFndTxtAttr = pTxtAttr;
if( pFldRect && 0 != ( pFrm = pTxtNd->GetFrm( &aPt ) ) )
pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
@@ -1359,7 +1344,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( !bRet && (
SwContentAtPos::SW_TABLEBOXFML & rCntntAtPos.eCntntAtPos
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
|| SwContentAtPos::SW_TABLEBOXVALUE & rCntntAtPos.eCntntAtPos
#endif
))
@@ -1371,7 +1356,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( pSttNd && 0 != ( pTblNd = pTxtNd->FindTableNode()) &&
0 != ( pBox = pTblNd->GetTable().GetTblBox(
pSttNd->GetIndex() )) &&
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
( SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
RES_BOXATR_FORMULA, sal_False, &pItem ) ||
SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
@@ -1405,7 +1390,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
// erzeuge aus der internen (fuer CORE)
// die externe (fuer UI) Formel
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_TABLEBOXFML;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( RES_BOXATR_VALUE == pItem->Which() )
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_TABLEBOXVALUE;
else
@@ -1439,7 +1424,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( !bRet && SwContentAtPos::SW_CURR_ATTRS & rCntntAtPos.eCntntAtPos )
{
xub_StrLen n = aPos.nContent.GetIndex();
@@ -1537,7 +1522,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
return bRet;
}
-// --> OD 2008-06-19 #i90516#
+// #i90516#
const SwPostItField* SwCrsrShell::GetPostItFieldAtCursor() const
{
const SwPostItField* pPostItFld = 0;
@@ -1560,7 +1545,6 @@ const SwPostItField* SwCrsrShell::GetPostItFieldAtCursor() const
return pPostItFld;
}
-// <--
// befindet sich der Node in einem geschuetzten Bereich?
sal_Bool SwContentAtPos::IsInProtectSect() const
@@ -1785,9 +1769,6 @@ sal_Bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
{
*pCurCrsr->GetPoint() = aPos;
GetDoc()->SetTxtFmtColl( *pCurCrsr, pNextFmt, false );
- //JP 04.11.97: erstmal keine Folgevorlage der
- // Folgevorlage beachten
- // pNextFmt = pNextFmt->GetNextTxtFmtColl();
}
if( n < aFPos.nColumnCnt )
{
@@ -1821,7 +1802,7 @@ sal_Bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
GetDoc()->InsertItemSet( *pCurCrsr, aSet, 0 );
}
else {
- ASSERT( !this, "wo ist mein CntntNode?" );
+ OSL_ENSURE( !this, "wo ist mein CntntNode?" );
}
break;
@@ -2216,3 +2197,4 @@ sal_Bool SwCrsrShell::SelectNxtPrvHyperlink( sal_Bool bNext )
return bRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/crstrvl1.cxx b/sw/source/core/crsr/crstrvl1.cxx
index 55c407d1f209..0c28f43c0965 100644
--- a/sw/source/core/crsr/crstrvl1.cxx
+++ b/sw/source/core/crsr/crstrvl1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,3 +104,4 @@ sal_Bool SwCrsrShell::ExpandToSentenceBorders()
return pCurCrsr->ExpandToSentenceBorders();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index b505134e4395..d0b1a455f73a 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -435,12 +436,9 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
// vorhanden, auf den Stack. Aber nur wenn es noch grosser ist
if( pCmp->nEnd > aTmp.nEnd )
{
- ASSERT( !pStackArr[ nWhch - nArrStart ].nWhich,
+ OSL_ENSURE( !pStackArr[ nWhch - nArrStart ].nWhich,
"Stack-Platz ist noch belegt" );
- // ---------
- // JP 22.08.96: nur Ende manipulieren reicht nicht. Bug 30547
- // pCmp->nStt = aTmp.nEnd;
if( aTmp.nStt <= pCmp->nStt )
pCmp->nStt = aTmp.nEnd;
else
@@ -591,12 +589,9 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
// vorhanden, auf den Stack. Aber nur wenn es noch grosser ist
if( pCmp->nStt < aTmp.nStt )
{
- ASSERT( !pStackArr[ nWhch - nArrStart ].nWhich,
+ OSL_ENSURE( !pStackArr[ nWhch - nArrStart ].nWhich,
"Stack-Platz ist noch belegt" );
-// ---------
-// JP 22.08.96: nur Ende manipulieren reicht nicht. Bug 30547
-// pCmp->nEnd = aTmp.nStt;
if( aTmp.nEnd <= pCmp->nEnd )
pCmp->nEnd = aTmp.nStt;
else
@@ -673,7 +668,7 @@ int SwAttrCheckArr::CheckStack()
{
// alle die "offen" sind, heisst ueber die Start Position ragen,
// im FndSet setzen
- ASSERT( !pFndArr[ n ].nWhich, "Array-Platz ist noch belegt" );
+ OSL_ENSURE( !pFndArr[ n ].nWhich, "Array-Platz ist noch belegt" );
pFndArr[ n ] = *pArrPtr;
pArrPtr->nWhich = 0;
nFound++;
@@ -865,10 +860,7 @@ int lcl_Search( const SwCntntNode& rCNd, const SfxItemSet& rCmpSet, sal_Bool bNo
else
{
nWhich = pItem->Which();
-//JP 27.02.95: wenn nach defaults gesucht wird, dann muss man bis zum Pool
-// runter
-// if( SFX_ITEM_SET != rNdSet.GetItemState( nWhich, !bNoColls, &pNdItem )
-// || *pNdItem != *pItem )
+
if( !CmpAttr( rNdSet.Get( nWhich, !bNoColls ), *pItem ))
return sal_False;
}
@@ -1147,36 +1139,6 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
else if( !pSet->Count() )
return FIND_NOT_FOUND; // nur Text und nicht gefunden
-/* // --> FME 2007-4-12 #i74765 # Why should we move the position?
- Moving the position results in bugs when there are two adjacent
- portions which both have the requested attributes set. I suspect this
- should be only be an optimization. Therefore I boldly remove it now!
-
- // JP: und wieder neu aufsetzen, aber eine Position weiter
- //JP 04.11.97: Bug 44897 - aber den Mark wieder aufheben, damit
- // weiterbewegt werden kann!
- {
- sal_Bool bCheckRegion = sal_True;
- SwPosition* pPos = aSrchPam.GetPoint();
- if( !(*fnMove->fnNd)( &pPos->nNode.GetNode(),
- &pPos->nContent, CRSR_SKIP_CHARS ))
- {
- if( (*fnMove->fnNds)( &pPos->nNode, sal_False ))
- {
- SwCntntNode *pNd = pPos->nNode.GetNode().GetCntntNode();
- xub_StrLen nCPos;
- if( fnMove == fnMoveForward )
- nCPos = 0;
- else
- nCPos = pNd->Len();
- pPos->nContent.Assign( pNd, nCPos );
- }
- else
- bCheckRegion = sal_False;
- }
- if( !bCheckRegion || *aRegion.GetPoint() <= *pPos )
- return FIND_NOT_FOUND; // nicht gefunden
- }*/
*aRegion.GetMark() = *aSrchPam.GetPoint();
}
@@ -1225,10 +1187,6 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
{
// --- Ist die Selection noch da ??????
- // und noch die Attribute setzen
-#ifdef OLD
- pCrsr->GetDoc()->Insert( *pCrsr, *pReplSet, 0 );
-#else
//JP 13.07.95: alle gesuchten Attribute werden, wenn nicht im
// ReplaceSet angegeben, auf Default zurueck gesetzt
@@ -1257,7 +1215,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
aSet.Put( *pReplSet );
pCrsr->GetDoc()->InsertItemSet( *pCrsr, aSet, 0 );
}
-#endif
+
return FIND_NO_RING;
}
@@ -1312,3 +1270,4 @@ sal_uLong SwCursor::Find( const SfxItemSet& rSet, sal_Bool bNoCollections,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/findcoll.cxx b/sw/source/core/crsr/findcoll.cxx
index a78b92b180a1..b3f3f39e8a97 100644
--- a/sw/source/core/crsr/findcoll.cxx
+++ b/sw/source/core/crsr/findcoll.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -120,3 +121,4 @@ sal_uLong SwCursor::Find( const SwTxtFmtColl& rFmtColl,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/findfmt.cxx b/sw/source/core/crsr/findfmt.cxx
index 8da8e83bd5cf..7a548c393f33 100644
--- a/sw/source/core/crsr/findfmt.cxx
+++ b/sw/source/core/crsr/findfmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,4 @@ sal_Bool SwPaM::Find( const SwFmt& rFmt, SwMoveFn fnMove,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 6eb89eadfbff..f53f2ef23a98 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -162,7 +163,7 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart,
}
break;
default:
- ASSERT( false, "unknown case in lcl_CleanStr" )
+ OSL_ENSURE( false, "unknown case in lcl_CleanStr" );
break;
}
}
@@ -434,7 +435,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
bool bRemoveSoftHyphens = true;
if ( bRegSearch )
{
- const rtl::OUString a00AD( rtl::OUString::createFromAscii( "\\x00AD" ) );
+ const rtl::OUString a00AD(RTL_CONSTASCII_USTRINGPARAM("\\x00AD"));
if ( -1 != rSearchOpt.searchString.indexOf( a00AD ) )
bRemoveSoftHyphens = false;
}
@@ -586,10 +587,6 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
sal_Bool bFnd = (sal_Bool)pCrsr->Find( rSearchOpt, bSearchInNotes, aSTxt, fnMove, pRegion, bInReadOnly );
- /* #i80135# if we found something in a note, Mark and Point is the same
- if( bFnd && *pCrsr->GetMark() == *pCrsr->GetPoint() )
- return FIND_NOT_FOUND;
- */
if( bFnd && bReplace ) // String ersetzen ??
{
@@ -713,3 +710,4 @@ String *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 48e22c79ec6b..24a51cd362e1 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,23 +39,23 @@
#include <pam.hxx>
#include <pamtyp.hxx>
#include <txtfrm.hxx>
-#include <section.hxx>
#include <fmtcntnt.hxx>
#include <frmatr.hxx>
#include <swtable.hxx>
#include <crsskip.hxx>
-// --> FME 2004-06-29 #114856# Formular view
+// Formular view
#include <flyfrm.hxx>
#include <fmteiro.hxx>
#include <section.hxx>
#include <sectfrm.hxx>
-// <--
-#include <ndtxt.hxx> // #111827#
+#include <ndtxt.hxx>
#include <IMark.hxx>
#include <hints.hxx>
+#include <xmloff/odffields.hxx>
+
// fuer den dummen ?MSC-? Compiler
inline xub_StrLen GetSttOrEnd( sal_Bool bCondition, const SwCntntNode& rNd )
{
@@ -66,8 +67,6 @@ inline xub_StrLen GetSttOrEnd( sal_Bool bCondition, const SwCntntNode& rNd )
|* SwPosition
|*
|* Beschreibung PAM.DOC
-|* Ersterstellung VB 4.3.91
-|* Letzte Aenderung VB 4.3.91
|*
*************************************************************************/
@@ -387,8 +386,6 @@ SwCntntNode* GoPreviousNds( SwNodeIndex * pIdx, sal_Bool bChk )
|* SwPointAndMark
|*
|* Beschreibung PAM.DOC
-|* Ersterstellung VB 4.3.91
-|* Letzte Aenderung JP 6.5.91
|*
*************************************************************************/
@@ -548,7 +545,7 @@ void SwPaM::SetMark()
(*m_pMark) = (*m_pPoint);
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
void SwPaM::Exchange()
{
@@ -588,9 +585,6 @@ sal_Bool SwPaM::Move( SwMoveFn fnMove, SwGoInDoc fnGo )
|* const SwPaM& der enventuell vorgegeben Bereich
|* Return-Werte SwPaM* der entsprehend neu gesetzte Bereich
|*
-|* Ersterstellung JP 26.04.91
-|* Letzte Aenderung JP 26.04.91
-|*
*************************************************************************/
@@ -646,8 +640,7 @@ sal_uInt16 SwPaM::GetPageNum( sal_Bool bAtPoint, const Point* pLayPos )
return 0;
}
-// --> FME 2004-06-29 #114856# Formular view
-// See also SwCrsrShell::IsCrsrReadonly()
+// Formular view - See also SwCrsrShell::IsCrsrReadonly()
const SwFrm* lcl_FindEditInReadonlyFrm( const SwFrm& rFrm )
{
const SwFrm* pRet = 0;
@@ -671,7 +664,6 @@ const SwFrm* lcl_FindEditInReadonlyFrm( const SwFrm& rFrm )
return pRet;
}
-// <--
// steht in etwas geschuetztem oder in die Selektion umspannt
// etwas geschuetztes.
@@ -687,24 +679,18 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
else
pFrm = 0;
- // --> FME 2004-06-29 #114856# Formular view
// Will be set if point/mark are inside edit-in-readonly environment
const SwFrm* pSttEIRFrm = 0;
const SwFrm* pEndEIRFrm = 0;
if( pFrm && ( pFrm->IsProtected() ||
- // --> FME 2004-06-29 #114856# Formular view
- ( bFormView &&
- 0 == ( pSttEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
- // <--
+ ( bFormView && 0 == ( pSttEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
bRet = sal_True;
else if( pNd )
{
const SwSectionNode* pSNd = pNd->GetSectionNode();
if( pSNd && ( pSNd->GetSection().IsProtectFlag() ||
- // --> FME 2004-06-29 #114856# Formular view
(bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
- // <--
bRet = sal_True;
}
@@ -716,22 +702,16 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
pFrm = 0;
if( pFrm && ( pFrm->IsProtected() ||
- // --> FME 2004-06-29 #114856# Formular view
- ( bFormView &&
- 0 == ( pEndEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
- // <--
+ ( bFormView && 0 == ( pEndEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
bRet = sal_True;
else if( pNd )
{
const SwSectionNode* pSNd = pNd->GetSectionNode();
if( pSNd && ( pSNd->GetSection().IsProtectFlag() ||
- // --> FME 2004-06-29 #114856# Formular view
(bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
- // <--
bRet = sal_True;
}
- // --> FME 2004-06-29 #114856# Formular view
if ( !bRet && bFormView )
{
// Check if start and end frame are inside the _same_
@@ -739,7 +719,6 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
if ( pSttEIRFrm != pEndEIRFrm )
bRet = sal_True;
}
- // <--
// oder sollte eine geschuetzte Section innerhalb der
// Selektion liegen?
@@ -766,7 +745,7 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
if( pFmt->GetProtect().IsCntntProtected() )
{
const SwFmtCntnt& rCntnt = pFmt->GetCntnt(sal_False);
- ASSERT( rCntnt.GetCntntIdx(), "wo ist der SectionNode?" );
+ OSL_ENSURE( rCntnt.GetCntntIdx(), "wo ist der SectionNode?" );
sal_uLong nIdx = rCntnt.GetCntntIdx()->GetIndex();
if( nSttIdx <= nIdx && nEndIdx >= nIdx &&
rCntnt.GetCntntIdx()->GetNode().GetNodes().IsDocNodes() )
@@ -785,60 +764,45 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
}
}
}
-
-#ifdef CHECK_CELL_READONLY
-//JP 22.01.99: bisher wurden Tabelle, die in der Text-Selektion standen
-// nicht beachtet. Wollte man das haben, dann muss dieser
-// Code freigeschaltet werden
-
- if( !bRet )
- {
- // dann noch ueber alle Tabellen
- const SwFrmFmts& rFmts = *GetDoc()->GetTblFrmFmts();
- for( n = rFmts.Count(); n ; )
- {
- SwFrmFmt* pFmt = (SwFrmFmt*)rFmts[ --n ];
- const SwTable* pTbl = SwTable::FindTable( pFmt );
- sal_uLong nIdx = pTbl ? pTbl->GetTabSortBoxes()[0]->GetSttIdx()
- : 0;
- if( nSttIdx <= nIdx && nEndIdx >= nIdx )
- {
- // dann teste mal alle Boxen
- const SwTableSortBoxes& rBoxes = pTbl->GetTabSortBoxes();
-
- for( sal_uInt16 i = rBoxes.Count(); i; )
- if( rBoxes[ --i ]->GetFrmFmt()->GetProtect().
- IsCntntProtected() )
- {
- bRet = sal_True;
- break;
- }
-
- if( bRet )
- break;
- }
- }
- }
-#endif
}
}
}
//FIXME FieldBk
// TODO: Form Protection when Enhanced Fields are enabled
- if (!bRet) {
- const SwDoc *pDoc = GetDoc();
- sw::mark::IMark* pA = NULL;
- sw::mark::IMark* pB = NULL;
- if ( pDoc )
+ const SwDoc *pDoc = GetDoc();
+ sw::mark::IMark* pA = NULL;
+ sw::mark::IMark* pB = NULL;
+ bool bUnhandledMark = false;
+ if ( pDoc )
+ {
+ const IDocumentMarkAccess* pMarksAccess = pDoc->getIDocumentMarkAccess( );
+ pA = GetPoint() ? pMarksAccess->getFieldmarkFor( *GetPoint( ) ) : NULL;
+ pB = GetMark( ) ? pMarksAccess->getFieldmarkFor( *GetMark( ) ) : pA;
+
+ sw::mark::IFieldmark* pFieldmark = pMarksAccess->getFieldmarkFor( *GetPoint() );
+ if ( pFieldmark )
+ bUnhandledMark = pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) );
+ }
+
+ if (!bRet)
+ {
+ // Unhandled fieldmarks case shouldn't be edited manually to avoid breaking anything
+ if ( ( pA == pB ) && bUnhandledMark )
+ bRet = sal_True;
+ else
{
- const IDocumentMarkAccess* pMarksAccess = pDoc->getIDocumentMarkAccess( );
- pA = GetPoint() ? pMarksAccess->getFieldmarkFor( *GetPoint( ) ) : NULL;
- pB = GetMark( ) ? pMarksAccess->getFieldmarkFor( *GetMark( ) ) : pA;
- bRet = ( pA != pB );
+ // Form protection case
+ bool bAtStartA = pA != NULL && pA->GetMarkStart() == *GetPoint();
+ bool bAtStartB = pB != NULL && pB->GetMarkStart() == *GetMark();
+ bRet = ( pA != pB ) || bAtStartA || bAtStartB;
+ bool bProtectForm = pDoc->get( IDocumentSettingAccess::PROTECT_FORM );
+ if ( bProtectForm )
+ bRet |= ( pA == NULL || pB == NULL );
}
- bool bProtectForm = pDoc->get( IDocumentSettingAccess::PROTECT_FORM );
- if ( bProtectForm )
- bRet |= ( pA == NULL || pB == NULL );
+ }
+ else
+ {
+ bRet = !( pA == pB && pA != NULL );
}
return bRet;
}
@@ -909,12 +873,6 @@ SwCntntNode* GetNode( SwPaM & rPam, sal_Bool& rbFirst, SwMoveFn fnMove,
( !bInReadOnly && pFrm->IsProtected() ) ||
( pFrm->IsTxtFrm() &&
((SwTxtFrm*)pFrm)->IsHiddenNow() ) )
-
-// rNodes[ rNodes.EndOfAutotext ]->StartOfSection().GetIndex()
-// < aPos.nNode.GetIndex() && aPos.nNode.GetIndex()
-// < rNodes.EndOfAutotext.GetIndex() &&
-// 0 == ( pFrm = pNd->GetFrm()) &&
-// pFrm->IsProtected() )
{
pNd = 0;
continue; // suche weiter
@@ -1172,7 +1130,6 @@ sal_Bool GoPrevSection( SwPaM & rPam, SwMoveFn fnMove )
return sal_True;
}
-// #111827#
String SwPaM::GetTxt() const
{
String aResult;
@@ -1244,3 +1201,5 @@ sal_Bool SwPaM::LessThan(const SwPaM & a, const SwPaM & b)
{
return (*a.Start() < *b.Start()) || (*a.Start() == *b.Start() && *a.End() < *b.End());
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/paminit.cxx b/sw/source/core/crsr/paminit.cxx
index 37bd63fe224d..726c7fbbe8ac 100644
--- a/sw/source/core/crsr/paminit.cxx
+++ b/sw/source/core/crsr/paminit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -129,3 +130,5 @@ SwPosTable GetfnTableEnd()
{
return fnTableEnd;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index b7106ade751c..68571ba25b20 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -169,13 +170,9 @@ sal_Bool SwCursor::IsSkipOverProtectSections() const
}
-// Sicher die aktuelle Position, damit ggfs. auf diese zurueck
-// gefallen werden kann. Die SavePos Objekte werden als Stack verwaltet,
-// damit das auch alles bei verschachtelten Aufrufen funktioniert.
// Das CreateNewSavePos ist virtual, damit abgeleitete Klassen vom Cursor
// gegebenenfalls eigene SaveObjecte anlegen und in den virtuellen
// Check-Routinen verwenden koennen.
-
void SwCursor::SaveState()
{
_SwCursor_SavePos* pNew = CreateNewSavePos();
@@ -326,7 +323,7 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
if( rProtect.IsCntntProtected() )
{
const SwFmtCntnt& rCntnt = pFmt->GetCntnt(sal_False);
- ASSERT( rCntnt.GetCntntIdx(), "wo ist der SectionNode?" );
+ OSL_ENSURE( rCntnt.GetCntntIdx(), "wo ist der SectionNode?" );
sal_uLong nIdx = rCntnt.GetCntntIdx()->GetIndex();
if( nSttIdx <= nIdx && nEndIdx >= nIdx )
{
@@ -536,7 +533,7 @@ sal_Bool SwCursor::IsInProtectTable( sal_Bool bMove, sal_Bool bChgCrsr )
// Check for convered cell:
bool bInCoveredCell = false;
const SwStartNode* pTmpSttNode = pCNd->FindTableBoxStartNode();
- ASSERT( pTmpSttNode, "In table, therefore I expect to get a SwTableBoxStartNode" )
+ OSL_ENSURE( pTmpSttNode, "In table, therefore I expect to get a SwTableBoxStartNode" );
const SwTableBox* pBox = pTmpSttNode ? pTableNode->GetTable().GetTblBox( pTmpSttNode->GetIndex() ) : 0; //Robust #151355
if ( pBox && pBox->getRowSpan() < 1 ) // Robust #151270
bInCoveredCell = true;
@@ -1002,6 +999,7 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas,
}
else
DeleteMark();
+ delete pSav;
return 0;
}
@@ -1056,6 +1054,7 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas,
}
else
DeleteMark();
+ delete pSav;
return 0;
}
// es wurde ein- bis mehrmals gefunden. Das steht alles
@@ -1372,22 +1371,46 @@ sal_Bool SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt )
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
- xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
- Boundary aBndry( pBreakIt->GetBreakIter()->getWordBoundary(
- pTxtNd->GetTxt(), nPtPos,
- pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
- nWordType,
- bForward ));
-
- if( aBndry.startPos != aBndry.endPos )
+ // Should we select the whole fieldmark?
+ const IDocumentMarkAccess* pMarksAccess = GetDoc()->getIDocumentMarkAccess( );
+ sw::mark::IMark* pMark = GetPoint() ? pMarksAccess->getFieldmarkFor( *GetPoint( ) ) : NULL;
+ if ( pMark )
{
- GetPoint()->nContent = (xub_StrLen)aBndry.endPos;
- if( !IsSelOvr() )
+ const SwPosition rStart = pMark->GetMarkStart();
+ GetPoint()->nNode = rStart.nNode;
+ GetPoint()->nContent = rStart.nContent;
+ GetPoint()->nContent++; // Don't select the start delimiter
+
+ const SwPosition rEnd = pMark->GetMarkEnd();
+
+ if ( rStart != rEnd )
{
SetMark();
- GetMark()->nContent = (xub_StrLen)aBndry.startPos;
+ GetMark()->nNode = rEnd.nNode;
+ GetMark()->nContent = rEnd.nContent;
+ GetMark()->nContent--; //Don't select the end delimiter
+ }
+ bRet = sal_True;
+ }
+ else
+ {
+ xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
+ Boundary aBndry( pBreakIt->GetBreakIter()->getWordBoundary(
+ pTxtNd->GetTxt(), nPtPos,
+ pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ nWordType,
+ bForward ));
+
+ if( aBndry.startPos != aBndry.endPos )
+ {
+ GetPoint()->nContent = (xub_StrLen)aBndry.endPos;
if( !IsSelOvr() )
- bRet = sal_True;
+ {
+ SetMark();
+ GetMark()->nContent = (xub_StrLen)aBndry.startPos;
+ if( !IsSelOvr() )
+ bRet = sal_True;
+ }
}
}
}
@@ -1618,7 +1641,7 @@ sal_Bool SwCursor::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
else
fnGo = CRSR_SKIP_CELLS == nMode ? fnGoCntntCells : fnGoCntnt;
- // ASSERT( not in covered cell )
+ // OSL_ENSURE( not in covered cell )
while( nCnt )
{
@@ -1812,7 +1835,7 @@ sal_Bool SwCursor::UpDown( sal_Bool bUp, sal_uInt16 nCnt,
// set the point to the last frame in the table box. This is
// only necessary if we do not already have a table selection
const SwStartNode* pTblNd = GetNode( sal_True )->FindTableBoxStartNode();
- ASSERT( pTblNd, "pTblCrsr without SwTableNode?" )
+ OSL_ENSURE( pTblNd, "pTblCrsr without SwTableNode?" );
if ( pTblNd ) // safety first
{
@@ -2024,7 +2047,7 @@ sal_Bool SwCursor::GotoTblBox( const String& rName )
sal_Bool SwCursor::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
{
- //JP 28.8.2001: for optimization test something before
+ //for optimization test something before
const SwNode* pNd = &GetPoint()->nNode.GetNode();
bool bShortCut = false;
if ( fnWhichPara == fnParaCurr )
@@ -2073,13 +2096,7 @@ sal_Bool SwCursor::MoveSection( SwWhichSection fnWhichSect,
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
}
-/*
- sal_Bool MoveTable( SwWhichTable, SwPosTable );
- sal_Bool MoveColumn( SwWhichColumn, SwPosColumn );
- sal_Bool MoveRegion( SwWhichRegion, SwPosRegion );
-*/
-
-void SwCursor::RestoreSavePos() // Point auf die SavePos setzen
+void SwCursor::RestoreSavePos()
{
if( pSavePos )
{
@@ -2107,13 +2124,14 @@ sal_Bool lcl_SeekEntry( const SwSelBoxes& rTmp, const SwStartNode* pSrch, sal_uI
{
sal_uLong nIdx = pSrch->GetIndex();
- sal_uInt16 nO = rTmp.Count(), nM, nU = 0;
+ sal_uInt16 nO = rTmp.Count();
if( nO > 0 )
{
nO--;
+ sal_uInt16 nU = 0;
while( nU <= nO )
{
- nM = nU + ( nO - nU ) / 2;
+ sal_uInt16 nM = nU + ( nO - nU ) / 2;
if( rTmp[ nM ]->GetSttNd() == pSrch )
{
rFndPos = nM;
@@ -2194,19 +2212,6 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
if( bDel )
{
SwPaM* pDel = (SwPaM*)pCur->GetPrev();
-/*
-JP 20.07.98: der alte Code geht mit dem UNO-TableCrsr nicht
- if( pDel == pAktCrsr )
- {
- if( pAktCrsr->GetNext() == pAktCrsr )
- {
- pAktCrsr->DeleteMark();
- break; // es gibt nichts mehr zu loeschen!
- }
- pAktCrsr = (SwCursor*)pDel->GetPrev();
- }
- delete pDel;
-*/
if( pDel == pAktCrsr )
pAktCrsr->DeleteMark();
@@ -2358,3 +2363,4 @@ sal_Bool SwTableCursor::HasReadOnlyBoxSel() const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/trvlcol.cxx b/sw/source/core/crsr/trvlcol.cxx
index 92cd87889875..855b2d26b495 100644
--- a/sw/source/core/crsr/trvlcol.cxx
+++ b/sw/source/core/crsr/trvlcol.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -131,3 +132,4 @@ sal_Bool SwCrsrShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index e20724fe157d..c2ead9272ea0 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -357,3 +358,4 @@ sal_Bool SwCrsrShell::GotoFlyAnchor()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx
index 0dbc6013e465..25550b03958a 100644
--- a/sw/source/core/crsr/trvlreg.cxx
+++ b/sw/source/core/crsr/trvlreg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -289,3 +290,4 @@ sal_Bool SwCrsrShell::GotoRegion( const String& rName )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index 0c6a659f2eb0..2734a6ab3d8c 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98,7 +99,7 @@ sal_Bool SwCrsrShell::GoNextCell( sal_Bool bAppendLine )
pCrsr->GetPoint()->nNode.GetNode().
StartOfSectionIndex() );
- ASSERT( pTableBox, "Box steht nicht in dieser Tabelle" );
+ OSL_ENSURE( pTableBox, "Box steht nicht in dieser Tabelle" );
SwSelBoxes aBoxes;
//Das Dokument veraendert sich evtl. ohne Action wuerden die Sichten
@@ -119,8 +120,7 @@ sal_Bool SwCrsrShell::GoNextCell( sal_Bool bAppendLine )
sal_Bool SwCrsrShell::GoPrevCell()
{
sal_Bool bRet = sal_False;
- const SwTableNode* pTblNd;
- if( IsTableMode() || 0 != ( pTblNd = IsCrsrInTbl() ))
+ if( IsTableMode() || IsCrsrInTbl() )
{
SwCursor* pCrsr = pTblCrsr ? pTblCrsr : pCurCrsr;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
@@ -304,7 +304,7 @@ sal_Bool SwCrsrShell::SelTblBox()
const SwStartNode* pStartNode =
pCurCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// the old code checks whether we're in a table by asking the
// frame. This should yield the same result as searching for the
// table box start node, right?
@@ -364,7 +364,7 @@ bool lcl_FindNextCell( SwNodeIndex& rIdx, sal_Bool bInReadOnly )
if ( !pTblNd )
{
- ASSERT( false, "lcl_FindNextCell not celled with table start node!" )
+ OSL_ENSURE( false, "lcl_FindNextCell not celled with table start node!" );
return false;
}
@@ -442,7 +442,7 @@ bool lcl_FindPrevCell( SwNodeIndex& rIdx, sal_Bool bInReadOnly )
if ( !pTblNd )
{
- ASSERT( false, "lcl_FindPrevCell not celled with table start node!" )
+ OSL_ENSURE( false, "lcl_FindPrevCell not celled with table start node!" );
return false;
}
@@ -755,7 +755,7 @@ String SwCrsrShell::GetBoxNms() const
pFrm = pFrm->GetUpper();
} while ( pFrm && !pFrm->IsCellFrm() );
- ASSERT( pFrm, "kein Frame zur Box" );
+ OSL_ENSURE( pFrm, "kein Frame zur Box" );
sNm = ((SwCellFrm*)pFrm)->GetTabBox()->GetName();
sNm += ':';
pPos = pTblCrsr->End();
@@ -929,3 +929,4 @@ sal_Bool SwCrsrShell::EndAllTblBoxEdit()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/unocrsr.cxx b/sw/source/core/crsr/unocrsr.cxx
index b57e423623a2..48bb4b1f2cf4 100644
--- a/sw/source/core/crsr/unocrsr.cxx
+++ b/sw/source/core/crsr/unocrsr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,7 +68,7 @@ SwUnoCrsr::~SwUnoCrsr()
if( USHRT_MAX != nDelPos )
rTbl.Remove( nDelPos );
else {
- ASSERT( !this, "UNO Cursor nicht mehr im Array" );
+ OSL_ENSURE( !this, "UNO Cursor nicht mehr im Array" );
}
}
@@ -226,14 +227,6 @@ SwUnoTableCrsr::~SwUnoTableCrsr()
delete aTblSel.GetNext(); // und loeschen
}
-
-/*
-SwCursor* SwUnoTableCrsr::Create( SwPaM* pRing ) const
-{
- return SwUnoCrsr::Create( pRing );
-}
-*/
-
sal_Bool SwUnoTableCrsr::IsSelOvr( int eFlags )
{
sal_Bool bRet = SwUnoCrsr::IsSelOvr( eFlags );
@@ -278,3 +271,4 @@ void SwUnoTableCrsr::MakeBoxSels()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 53cd935289de..251e4d7fc23b 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,15 +47,13 @@
#include <viewimp.hxx>
#include <dview.hxx>
#include <rootfrm.hxx>
-#include <txtfrm.hxx> // SwTxtFrm
+#include <txtfrm.hxx> // SwTxtFrm
#include <docary.hxx>
#include <extinput.hxx>
#include <ndtxt.hxx>
#include <scriptinfo.hxx>
-#include <mdiexp.hxx> // GetSearchDialog
-#ifndef _COMCORE_HRC
-#include <comcore.hrc> // ResId fuer Abfrage wenn zu Search & Replaces
-#endif
+#include <mdiexp.hxx> // GetSearchDialog
+#include <comcore.hrc> // ResId for query when (switching to?) Search & Replace
#include <svx/sdr/overlay/overlaymanager.hxx>
#include <svx/sdrpaintwindow.hxx>
@@ -63,253 +62,15 @@
extern void SwCalcPixStatics( OutputDevice *pOut );
-//Damit beim ShowCrsr nicht immer wieder die gleiche Size teuer ermittelt
-//werden muss, hier statische Member, die beim Wechsel des MapModes
-// angepasst werden
+// Here static members are defined. They will get changed on alteration of the
+// MapMode. This is done so that on ShowCrsr the same size does not have to be
+// expensively determined again and again.
long SwSelPaintRects::nPixPtX = 0;
long SwSelPaintRects::nPixPtY = 0;
MapMode* SwSelPaintRects::pMapMode = 0;
-
-#ifdef SHOW_BOOKMARKS
-// #include <IMark.hxx>
-//
-// class SwBookmarkRects : public SwSelPaintRects
-// {
-// virtual void Paint( const Rectangle& rRect );
-// virtual void FillRects();
-//
-// public:
-// SwBookmarkRects( const SwCrsrShell& rSh ) : SwSelPaintRects( rSh ) {}
-// };
-//
-// void SwBookmarkRects::Paint( const Rectangle& rRect )
-// {
-// Window* pWin = GetShell()->GetWin();
-//
-// RasterOp eOld( pWin->GetRasterOp() );
-// sal_Bool bLCol = pWin->IsLineColor();
-// Color aLCol( pWin->GetLineColor() );
-// sal_Bool bFCol = pWin->IsFillColor();
-// Color aFCol( pWin->GetFillColor() );
-//
-// pWin->SetRasterOp( ROP_XOR );
-// Color aCol( RGB_COLORDATA( 0xF0, 0xC8, 0xF0 ) ^ COL_WHITE );
-// pWin->SetFillColor( aCol );
-// pWin->SetLineColor( aCol );
-//
-// pWin->DrawRect( rRect );
-//
-// if( bLCol ) pWin->SetLineColor( aLCol ); else pWin->SetLineColor();
-// if( bFCol ) pWin->SetFillColor( aFCol ); else pWin->SetFillColor();
-// pWin->SetRasterOp( eOld );
-// }
-//
-// void SwBookmarkRects::FillRects()
-// {
-// SwRegionRects aReg( GetShell()->VisArea() );
-//
-// const SwBookmarks& rBkmkTbl = GetShell()->getIDocumentMarkAccess()->getBookmarks();
-// SwShellCrsr* pCrsr = 0;
-// for( sal_uInt16 n = 0; n < rBkmkTbl.Count(); ++n )
-// {
-// const SwBookmark& rBkmk = *rBkmkTbl[ n ];
-// if( rBkmk.IsBookMark() && rBkmk.GetOtherPos() )
-// {
-// if( !pCrsr )
-// {
-// pCrsr = new SwShellCrsr( *GetShell(), rBkmk.GetPos() );
-// pCrsr->SetMark();
-// }
-// else
-// *pCrsr->GetPoint() = rBkmk.GetPos();
-// *pCrsr->GetMark() = *rBkmk.GetOtherPos();
-// pCrsr->FillRects();
-// for( sal_uInt16 i = 0; i < pCrsr->Count(); ++i )
-// aReg -= (*pCrsr)[ i ];
-//
-// pCrsr->Remove( 0, i );
-// }
-// }
-// if( pCrsr ) delete pCrsr;
-//
-// aReg.Invert();
-// SwRects::Insert( &aReg, 0 );
-// }
-//
-// SwBookmarkRects* pBookMarkRects = 0;
-//
-// void ShowBookmarks( const SwCrsrShell* pSh, int nAction, const SwRect* pRect = 0 )
-// {
-// if( !pBookMarkRects && pSh->getIDocumentMarkAccess()->getBookmarks().Count() )
-// pBookMarkRects = new SwBookmarkRects( *pSh );
-//
-// if( pBookMarkRects )
-// {
-// switch( nAction )
-// {
-// case 1: pBookMarkRects->Show(); break;
-// case 2: pBookMarkRects->Hide(); break;
-// case 3: pBookMarkRects->Invalidate( *pRect ); break;
-// }
-//
-// if( !pBookMarkRects->Count() )
-// delete pBookMarkRects, pBookMarkRects = 0;
-// }
-// }
-//
-// #define SHOWBOOKMARKS1( nAct ) ShowBookmarks( GetShell(),nAct );
-// #define SHOWBOOKMARKS2( nAct, pRect ) ShowBookmarks( GetShell(),nAct, pRect );
-
-#else
-
-#define SHOWBOOKMARKS1( nAct )
-#define SHOWBOOKMARKS2( nAct, pRect )
-
-#endif
-
-#ifdef SHOW_REDLINES
-#include <redline.hxx>
-
-class SwRedlineRects : public SwSelPaintRects
-{
- sal_uInt16 nMode;
- sal_uInt16 nNm;
-
- virtual void Paint( const Rectangle& rRect );
- virtual void FillRects();
-
-public:
- SwRedlineRects( const SwCrsrShell& rSh, sal_uInt16 nName, sal_uInt16 n )
- : SwSelPaintRects( rSh ), nMode( n ), nNm( nName )
- {}
-};
-
-void SwRedlineRects::Paint( const Rectangle& rRect )
-{
- Window* pWin = GetShell()->GetWin();
-
- RasterOp eOld( pWin->GetRasterOp() );
- sal_Bool bLCol = pWin->IsLineColor();
- Color aLCol( pWin->GetLineColor() );
- sal_Bool bFCol = pWin->IsFillColor();
- Color aFCol( pWin->GetFillColor() );
-
- pWin->SetRasterOp( ROP_XOR );
- Color aCol;
-
- sal_uInt8 nVal = 0xc8 - ( (nMode / 4) * 16 );
- switch( nMode % 4 )
- {
- case 0: aCol = RGB_COLORDATA( nVal, nVal, 0xFF ); break;
- case 1: aCol = RGB_COLORDATA( 0xFF, 0xc8, nVal ); break;
- case 2: aCol = RGB_COLORDATA( nVal, 0xFF, nVal ); break;
- case 3: aCol = RGB_COLORDATA( 0xFF, nVal, nVal ); break;
- }
- aCol = aCol.GetColor() ^ COL_WHITE;
-
- pWin->SetFillColor( aCol );
- pWin->SetLineColor( aCol );
-
- pWin->DrawRect( rRect );
-
- if( bLCol ) pWin->SetLineColor( aLCol ); else pWin->SetLineColor();
- if( bFCol ) pWin->SetFillColor( aFCol ); else pWin->SetFillColor();
- pWin->SetRasterOp( eOld );
-}
-
-void SwRedlineRects::FillRects()
-{
- SwRegionRects aReg( GetShell()->VisArea() );
-
- const SwRedlineTbl& rTbl = GetShell()->GetDoc()->GetRedlineTbl();
- SwShellCrsr* pCrsr = 0;
- for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
- {
- const SwRedline& rRed = *rTbl[ n ];
- if( rRed.HasMark() && (nMode % 4 ) == rRed.GetType() &&
- nNm == rRed.GetAuthor() )
- {
- if( !pCrsr )
- {
- pCrsr = new SwShellCrsr( *GetShell(), *rRed.GetPoint() );
- pCrsr->SetMark();
- }
- else
- *pCrsr->GetPoint() = *rRed.GetPoint();
- *pCrsr->GetMark() = *rRed.GetMark();
- pCrsr->FillRects();
- for( sal_uInt16 i = 0; i < pCrsr->Count(); ++i )
- aReg -= (*pCrsr)[ i ];
-
- pCrsr->Remove( 0, i );
- }
- }
- if( pCrsr ) delete pCrsr;
-
- aReg.Invert();
- SwRects::Insert( &aReg, 0 );
-}
-
-SwRedlineRects* aRedlines[ 10 * 4 ];
-static int bFirstCall = sal_True;
-
-void ShowRedlines( const SwCrsrShell* pSh, int nAction, const SwRect* pRect = 0 )
-{
- if( bFirstCall )
- {
- memset( aRedlines, 0, sizeof(aRedlines));
- bFirstCall = sal_False;
- }
-
- const SwRedlineTbl& rTbl = pSh->GetDoc()->GetRedlineTbl();
- const SwRedlineAuthorTbl& rAuthorTbl = pSh->GetDoc()->GetRedlineAuthorTbl();
-
- for( sal_uInt16 n = 0; n < rAuthorTbl.Count(); ++n )
- {
- for( int i = 0; i < 4; ++i )
- {
- SwRedlineRects** ppRedRect = &aRedlines[ n * 4 + i ];
- if( rTbl.Count() && !*ppRedRect )
- *ppRedRect = new SwRedlineRects( *pSh, n, n * 4 + i );
-
- if( *ppRedRect )
- {
- switch( nAction )
- {
- case 1: (*ppRedRect)->Show(); break;
- case 2: (*ppRedRect)->Hide(); break;
- case 3: (*ppRedRect)->Invalidate( *pRect ); break;
- }
-
- if( !(*ppRedRect)->Count() )
- delete *ppRedRect, *ppRedRect = 0;
- }
- }
- }
-}
-
-#define SHOWREDLINES1( nAct ) ShowRedlines( GetShell(),nAct );
-#define SHOWREDLINES2( nAct, pRect ) ShowRedlines( GetShell(),nAct, pRect );
-
-#else
-
-#define SHOWREDLINES1( nAct )
-#define SHOWREDLINES2( nAct, pRect )
-
-#endif
-
-#ifdef JP_REDLINE
- if( GetDoc()->GetRedlineTbl().Count() )
- {
- SwRedlineTbl& rRedlineTbl = (SwRedlineTbl&)GetDoc()->GetRedlineTbl();
- for( sal_uInt16 i = 0; i < rRedlineTbl.Count(); ++i )
- rRedlineTbl[ i ]->HideRects( *GetShell() );
- }
-#endif
-
-// -------- Ab hier Klassen / Methoden fuer den nicht Text-Cursor ------
+// ----- Starting from here: classes / methods for the non-text-cursor -----
SwVisCrsr::SwVisCrsr( const SwCrsrShell * pCShell )
: pCrsrShell( pCShell )
@@ -321,7 +82,7 @@ SwVisCrsr::SwVisCrsr( const SwCrsrShell * pCShell )
#ifdef SW_CRSR_TIMER
bTimerOn = sal_True;
- SetTimeout( 50 ); // 50msec Verzoegerung
+ SetTimeout( 50 ); // 50 millisecond delay
#endif
}
@@ -331,7 +92,7 @@ SwVisCrsr::~SwVisCrsr()
{
#ifdef SW_CRSR_TIMER
if( bTimerOn )
- Stop(); // Timer stoppen
+ Stop(); // stop timer
#endif
if( bIsVisible && aTxtCrsr.IsVisible() )
@@ -349,16 +110,16 @@ void SwVisCrsr::Show()
{
bIsVisible = sal_True;
- // muss ueberhaupt angezeigt werden ?
+ // display at all?
if( pCrsrShell->VisArea().IsOver( pCrsrShell->aCharRect ) )
#ifdef SW_CRSR_TIMER
{
if( bTimerOn )
- Start(); // Timer aufsetzen
+ Start(); // start timer
else
{
if( IsActive() )
- Stop(); // Timer Stoppen
+ Stop(); // stop timer
_SetPosAndShow();
}
@@ -379,22 +140,22 @@ void SwVisCrsr::Hide()
#ifdef SW_CRSR_TIMER
if( IsActive() )
- Stop(); // Timer Stoppen
+ Stop(); // stop timer
#endif
- if( aTxtCrsr.IsVisible() ) // sollten die Flags nicht gueltig sein?
+ if( aTxtCrsr.IsVisible() ) // Shouldn't the flags be in effect?
aTxtCrsr.Hide();
}
}
#ifdef SW_CRSR_TIMER
-void __EXPORT SwVisCrsr::Timeout()
+void SwVisCrsr::Timeout()
{
- ASSERT( !bIsDragCrsr, "Timer vorher abschalten" );
+ OSL_ENSURE( !bIsDragCrsr, "Timer vorher abschalten" );
if( bIsVisible )
{
- if ( !pCrsrShell->GetWin() ) //SwFrmFmt::GetGraphic setzt das Win temp aus!
+ if ( !pCrsrShell->GetWin() ) // SwFrmFmt::GetGraphic suspends Win temporarily!
Start();
else
_SetPosAndShow();
@@ -412,7 +173,7 @@ sal_Bool SwVisCrsr::ChgTimerFlag( sal_Bool bFlag )
bOld = bTimerOn;
if( !bFlag && bIsVisible && IsActive() )
{
- Stop(); // Timer Stoppen
+ Stop(); // stop timer
_SetPosAndShow();
}
bTimerOn = bFlag;
@@ -595,9 +356,9 @@ void SwSelPaintRects::Show()
if(pTargetOverlay)
{
- // #i97672# get the system's hilight color and limit it to the maximum
- // allowed luminance. This is needed to react on too bright hilight colors
- // which would otherwise vive a bad visualisation
+ // #i97672# get the system's highlight color and limit it to the maximum
+ // allowed luminance. This is needed to react on too bright highlight colors
+ // which would otherwise vive a bad visualisation.
const OutputDevice *pOut = Application::GetDefaultDevice();
Color aHighlight(pOut->GetSettings().GetStyleSettings().GetHighlightColor());
const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
@@ -643,9 +404,10 @@ void SwSelPaintRects::Invalidate( const SwRect& rRect )
SwRects::Insert( &aReg, 0 );
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- // Liegt die Selection rechts oder unten ausserhalb des sichtbaren
- // Bereiches, so ist diese nie auf eine Pixel rechts/unten aligned.
- // Das muss hier erkannt und ggf. das Rechteckt erweitert werden.
+ // If the selection is to the right or at the bottom, outside the
+ // visible area, it is never aligned on one pixel at the right/bottom.
+ // This has to be determined here and if that is the case the
+ // rectangle has to be expanded.
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if( GetShell()->bVisPortChgd && 0 != ( nSz = Count()) )
{
@@ -732,7 +494,7 @@ void SwShellCrsr::SetMark()
void SwShellCrsr::FillRects()
{
- // die neuen Rechtecke berechnen
+ // calculate the new rectangles
if( HasMark() &&
GetPoint()->nNode.GetNode().IsCntntNode() &&
GetPoint()->nNode.GetNode().GetCntntNode()->GetFrm() &&
@@ -749,14 +511,11 @@ void SwShellCrsr::Show()
do {
pTmp->SwSelPaintRects::Show();
} while( this != ( pTmp = dynamic_cast<SwShellCrsr*>(pTmp->GetNext()) ) );
-
- SHOWBOOKMARKS1( 1 )
- SHOWREDLINES1( 1 )
}
- // Dieses Rechteck wird neu gepaintet, also ist die SSelection in
- // dem Bereich ungueltig
+ // This rectangle gets painted anew, therefore the SSelection in this
+ // area is invalid.
void SwShellCrsr::Invalidate( const SwRect& rRect )
{
SwShellCrsr * pTmp = this;
@@ -765,10 +524,8 @@ void SwShellCrsr::Invalidate( const SwRect& rRect )
{
pTmp->SwSelPaintRects::Invalidate( rRect );
- // --> FME 2005-08-18 #125102#
// skip any non SwShellCrsr objects in the ring
// (see:SwAutoFormat::DeleteSel()
- // <--
Ring* pTmpRing = pTmp;
pTmp = 0;
do
@@ -779,9 +536,6 @@ void SwShellCrsr::Invalidate( const SwRect& rRect )
while ( !pTmp );
}
while( this != pTmp );
-
- SHOWBOOKMARKS2( 3, &rRect )
- SHOWREDLINES2( 3, &rRect )
}
@@ -791,9 +545,6 @@ void SwShellCrsr::Hide()
do {
pTmp->SwSelPaintRects::Hide();
} while( this != ( pTmp = dynamic_cast<SwShellCrsr*>(pTmp->GetNext()) ) );
-
- SHOWBOOKMARKS1( 2 )
- SHOWREDLINES1( 2 )
}
SwCursor* SwShellCrsr::Create( SwPaM* pRing ) const
@@ -808,8 +559,8 @@ short SwShellCrsr::MaxReplaceArived()
Window* pDlg = LAYOUT_THIS_WINDOW (::GetSearchDialog());
if( pDlg )
{
- // alte Actions beenden; die Tabellen-Frames werden angelegt und
- // eine SSelection kann erzeugt werden
+ // Terminate old actions. The table-frames get constructed and
+ // a SSelection can be created.
SvUShorts aArr;
sal_uInt16 nActCnt;
ViewShell *pShell = GetDoc()->GetRootFrm()->GetCurrShell(),
@@ -832,7 +583,7 @@ short SwShellCrsr::MaxReplaceArived()
}
}
else
- // ansonsten aus dem Basic, und dann auf RET_YES schalten
+ // otherwise from the Basic, and than switch to RET_YES
nRet = RET_YES;
return nRet;
@@ -849,10 +600,10 @@ sal_Bool SwShellCrsr::UpDown( sal_Bool bUp, sal_uInt16 nCnt )
&GetPtPos(), GetShell()->GetUpDownX() );
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
-// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
-// am sichtbaren Cursor
+// JP 05.03.98: To test the UNO-Crsr behavior here the implementation on the
+// visible cursor.
sal_Bool SwShellCrsr::IsSelOvr( int eFlags )
{
@@ -861,7 +612,7 @@ sal_Bool SwShellCrsr::IsSelOvr( int eFlags )
#endif
-// sal_True: an die Position kann der Cursor gesetzt werden
+// TRUE: The cursor can be set to the position.
sal_Bool SwShellCrsr::IsAtValidPos( sal_Bool bPoint ) const
{
if( GetShell() && ( GetShell()->IsAllProtect() ||
@@ -912,8 +663,8 @@ void SwShellTableCrsr::SaveTblBoxCntnt( const SwPosition* pPos )
void SwShellTableCrsr::FillRects()
{
- // die neuen Rechtecke berechnen
- // JP 16.01.98: wenn der Cursor noch "geparkt" ist nichts machen!!
+ // Calculate the new rectangles.
+ // JP 16.01.98: If the cursor is still "parked" do nothing!!
if( !aSelBoxes.Count() || bParked ||
!GetPoint()->nNode.GetIndex() )
return;
@@ -946,7 +697,7 @@ void SwShellTableCrsr::FillRects()
while( pFrm && !pFrm->IsCellFrm() )
pFrm = pFrm->GetUpper();
- ASSERT( pFrm, "Node nicht in einer Tabelle" );
+ OSL_ENSURE( pFrm, "Node nicht in einer Tabelle" );
while ( pFrm )
{
@@ -961,11 +712,11 @@ void SwShellTableCrsr::FillRects()
}
-// Pruefe, ob sich der SPoint innerhalb der Tabellen-SSelection befindet
+// Check if the SPoint is within the Table-SSelection.
sal_Bool SwShellTableCrsr::IsInside( const Point& rPt ) const
{
- // die neuen Rechtecke berechnen
- // JP 16.01.98: wenn der Cursor noch "geparkt" ist nichts machen!!
+ // Calculate the new rectangles.
+ // JP 16.01.98: If the cursor is still "parked" do nothing!!
if( !aSelBoxes.Count() || bParked ||
!GetPoint()->nNode.GetIndex() )
return sal_False;
@@ -981,17 +732,17 @@ sal_Bool SwShellTableCrsr::IsInside( const Point& rPt ) const
SwFrm* pFrm = pCNd->GetFrm( &GetPtPos() );
while( pFrm && !pFrm->IsCellFrm() )
pFrm = pFrm->GetUpper();
- ASSERT( pFrm, "Node nicht in einer Tabelle" );
+ OSL_ENSURE( pFrm, "Node nicht in einer Tabelle" );
if( pFrm && pFrm->Frm().IsInside( rPt ) )
return sal_True;
}
return sal_False;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
-// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
-// am sichtbaren Cursor
+// JP 05.03.98: To test the UNO-Crsr behavior here the implementation on the
+// visible cursor.
sal_Bool SwShellTableCrsr::IsSelOvr( int eFlags )
{
return SwShellCrsr::IsSelOvr( eFlags );
@@ -1004,3 +755,4 @@ sal_Bool SwShellTableCrsr::IsAtValidPos( sal_Bool bPoint ) const
return SwShellCrsr::IsAtValidPos( bPoint );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index d25c7d8417cb..eb653789da52 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,10 +35,12 @@
#include <svl/svstdarr.hxx>
#include <tools/resmgr.hxx>
#include <poolfmt.hxx>
-#ifndef _RDIC_HRC
#include <rcid.hrc>
-#endif
#include <tools/debug.hxx>
+#ifdef _NEED_TO_DEBUG_MAPPING
+#include <stdlib.h>
+#endif
+
extern ResMgr* pSwResMgr;
// Initialise UI names to 0
SvStringsDtor *SwStyleNameMapper::pTextUINameArray = 0,
@@ -485,7 +488,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
bString = GetUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
nNewId = GetPoolIdFromUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if ( nNewId != nId )
- *((sal_Int32*)0) = 42;
+ abort();
}
for ( nIndex = 0, nId = RES_POOLCOLL_LISTS_BEGIN ; nId < RES_POOLCOLL_LISTS_END ; nId++,nIndex++ )
{
@@ -497,7 +500,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
bString = GetUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
nNewId = GetPoolIdFromUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if ( nNewId != nId )
- *((sal_Int32*)0) = 42;
+ abort();
}
for ( nIndex = 0, nId = RES_POOLCOLL_EXTRA_BEGIN ; nId < RES_POOLCOLL_EXTRA_END ; nId++,nIndex++ )
{
@@ -509,7 +512,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
bString = GetUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
nNewId = GetPoolIdFromUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if ( nNewId != nId )
- *((sal_Int32*)0) = 42;
+ abort();
}
for ( nIndex = 0, nId = RES_POOLCOLL_REGISTER_BEGIN ; nId < RES_POOLCOLL_REGISTER_END ; nId++,nIndex++ )
{
@@ -521,7 +524,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
bString = GetUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
nNewId = GetPoolIdFromUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if ( nNewId != nId )
- *((sal_Int32*)0) = 42;
+ abort();
}
for ( nIndex = 0, nId = RES_POOLCOLL_DOC_BEGIN ; nId < RES_POOLCOLL_DOC_END ; nId++,nIndex++ )
{
@@ -533,7 +536,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
bString = GetUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
nNewId = GetPoolIdFromUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if ( nNewId != nId )
- *((sal_Int32*)0) = 42;
+ abort();
}
for ( nIndex = 0, nId = RES_POOLCOLL_HTML_BEGIN ; nId < RES_POOLCOLL_HTML_END ; nId++,nIndex++ )
{
@@ -545,7 +548,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
bString = GetUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
nNewId = GetPoolIdFromUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if ( nNewId != nId )
- *((sal_Int32*)0) = 42;
+ abort();
}
}
{
@@ -559,7 +562,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
bString = GetUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
nNewId = GetPoolIdFromUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if ( nNewId != nId )
- *((sal_Int32*)0) = 42;
+ abort();
}
for ( nIndex = 0, nId = RES_POOLCHR_HTML_BEGIN ; nId < RES_POOLCHR_HTML_END ; nId++,nIndex++ )
{
@@ -571,7 +574,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
bString = GetUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
nNewId = GetPoolIdFromUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if ( nNewId != nId )
- *((sal_Int32*)0) = 42;
+ abort();
}
}
{
@@ -585,7 +588,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
bString = GetUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
nNewId = GetPoolIdFromUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if ( nNewId != nId )
- *((sal_Int32*)0) = 42;
+ abort();
}
}
{
@@ -599,7 +602,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
bString = GetUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
nNewId = GetPoolIdFromUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if ( nNewId != nId )
- *((sal_Int32*)0) = 42;
+ abort();
}
}
{
@@ -613,7 +616,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
bString = GetUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
nNewId = GetPoolIdFromUIName ( aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if ( nNewId != nId )
- *((sal_Int32*)0) = 42;
+ abort();
}
}
}
@@ -1140,3 +1143,4 @@ const String SwStyleNameMapper::GetSpecialExtraUIName( const String& rExtraProgN
return aRes;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index e53679d8d92e..dd4219417214 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,14 +50,12 @@
#include <docsh.hxx>
#include <vector>
-/* -----------------------------05.08.2002 12:43------------------------------
- ---------------------------------------------------------------------------*/
class SwAutoCompleteClient : public SwClient
{
SwAutoCompleteWord* pAutoCompleteWord;
SwDoc* pDoc;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
static sal_uLong nSwAutoCompleteClientCount;
#endif
public:
@@ -68,13 +67,11 @@ public:
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
const SwDoc& GetDoc(){return *pDoc;}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
static sal_uLong GetElementCount() {return nSwAutoCompleteClientCount;}
#endif
};
-/* -----------------------------05.08.2002 12:48------------------------------
- ---------------------------------------------------------------------------*/
typedef std::vector<SwAutoCompleteClient> SwAutoCompleteClientVector;
class SwAutoCompleteWord_Impl
@@ -88,14 +85,11 @@ public:
void RemoveDocument(const SwDoc& rDoc);
};
-/* -----------------------------05.08.2002 14:11------------------------------
-
- ---------------------------------------------------------------------------*/
typedef const SwDoc* SwDocPtr;
typedef std::vector<SwDocPtr> SwDocPtrVector;
class SwAutoCompleteString : public String
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
static sal_uLong nSwAutoCompleteStringCount;
#endif
SwDocPtrVector aSourceDocs;
@@ -106,51 +100,43 @@ class SwAutoCompleteString : public String
void AddDocument(const SwDoc& rDoc);
//returns true if last document reference has been removed
sal_Bool RemoveDocument(const SwDoc& rDoc);
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
static sal_uLong GetElementCount() {return nSwAutoCompleteStringCount;}
#endif
};
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uLong SwAutoCompleteClient::nSwAutoCompleteClientCount = 0;
sal_uLong SwAutoCompleteString::nSwAutoCompleteStringCount = 0;
#endif
-/* -----------------------------06.08.2002 08:57------------------------------
- ---------------------------------------------------------------------------*/
SwAutoCompleteClient::SwAutoCompleteClient(SwAutoCompleteWord& rToTell, SwDoc& rSwDoc) :
pAutoCompleteWord(&rToTell),
pDoc(&rSwDoc)
{
pDoc->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
++nSwAutoCompleteClientCount;
#endif
}
-/* -----------------------------05.08.2002 14:07------------------------------
- ---------------------------------------------------------------------------*/
SwAutoCompleteClient::SwAutoCompleteClient(const SwAutoCompleteClient& rClient) :
SwClient(),
pAutoCompleteWord(rClient.pAutoCompleteWord),
pDoc(rClient.pDoc)
{
pDoc->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
++nSwAutoCompleteClientCount;
#endif
}
-/* -----------------------------05.08.2002 14:10------------------------------
- ---------------------------------------------------------------------------*/
SwAutoCompleteClient::~SwAutoCompleteClient()
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
--nSwAutoCompleteClientCount;
#endif
}
-/* -----------------06.03.2003 15:30-----------------
- --------------------------------------------------*/
SwAutoCompleteClient& SwAutoCompleteClient::operator=(const SwAutoCompleteClient& rClient)
{
pAutoCompleteWord = rClient.pAutoCompleteWord;
@@ -161,9 +147,7 @@ SwAutoCompleteClient& SwAutoCompleteClient::operator=(const SwAutoCompleteClient
pRegisteredIn->Remove(this);
return *this;
}
-/* -----------------------------05.08.2002 12:49------------------------------
- ---------------------------------------------------------------------------*/
void SwAutoCompleteClient::Modify(SfxPoolItem *pOld, SfxPoolItem *)
{
switch( pOld ? pOld->Which() : 0 )
@@ -177,26 +161,22 @@ void SwAutoCompleteClient::Modify(SfxPoolItem *pOld, SfxPoolItem *)
}
}
-/* -----------------------------05.08.2002 13:03------------------------------
- ---------------------------------------------------------------------------*/
void SwAutoCompleteWord_Impl::AddDocument(SwDoc& rDoc)
{
SwAutoCompleteClientVector::iterator aIt;
- for(aIt = aClientVector.begin(); aIt != aClientVector.end(); aIt++)
+ for(aIt = aClientVector.begin(); aIt != aClientVector.end(); ++aIt)
{
if(&aIt->GetDoc() == &rDoc)
return;
}
aClientVector.push_back(SwAutoCompleteClient(rAutoCompleteWord, rDoc));
}
-/* -----------------------------05.08.2002 14:33------------------------------
- ---------------------------------------------------------------------------*/
void SwAutoCompleteWord_Impl::RemoveDocument(const SwDoc& rDoc)
{
SwAutoCompleteClientVector::iterator aIt;
- for(aIt = aClientVector.begin(); aIt != aClientVector.end(); aIt++)
+ for(aIt = aClientVector.begin(); aIt != aClientVector.end(); ++aIt)
{
if(&aIt->GetDoc() == &rDoc)
{
@@ -205,32 +185,26 @@ void SwAutoCompleteWord_Impl::RemoveDocument(const SwDoc& rDoc)
}
}
}
-/* -----------------------------06.08.2002 08:54------------------------------
- ---------------------------------------------------------------------------*/
SwAutoCompleteString::SwAutoCompleteString(const String& rStr, xub_StrLen nPos, xub_StrLen nLen) :
String( rStr, nPos, nLen )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
++nSwAutoCompleteStringCount;
#endif
}
-/* -----------------------------05.08.2002 14:22------------------------------
- ---------------------------------------------------------------------------*/
SwAutoCompleteString::~SwAutoCompleteString()
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
--nSwAutoCompleteStringCount;
#endif
}
-/* -----------------------------05.08.2002 14:17------------------------------
- ---------------------------------------------------------------------------*/
void SwAutoCompleteString::AddDocument(const SwDoc& rDoc)
{
SwDocPtrVector::iterator aIt;
- for(aIt = aSourceDocs.begin(); aIt != aSourceDocs.end(); aIt++)
+ for(aIt = aSourceDocs.begin(); aIt != aSourceDocs.end(); ++aIt)
{
if(*aIt == &rDoc)
return;
@@ -238,13 +212,11 @@ void SwAutoCompleteString::AddDocument(const SwDoc& rDoc)
SwDocPtr pNew = &rDoc;
aSourceDocs.push_back(pNew);
}
-/* -----------------------------05.08.2002 14:36------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwAutoCompleteString::RemoveDocument(const SwDoc& rDoc)
{
SwDocPtrVector::iterator aIt;
- for(aIt = aSourceDocs.begin(); aIt != aSourceDocs.end(); aIt++)
+ for(aIt = aSourceDocs.begin(); aIt != aSourceDocs.end(); ++aIt)
{
if(*aIt == &rDoc)
{
@@ -254,9 +226,7 @@ sal_Bool SwAutoCompleteString::RemoveDocument(const SwDoc& rDoc)
}
return sal_False;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
SwAutoCompleteWord::SwAutoCompleteWord( sal_uInt16 nWords, sal_uInt16 nMWrdLen )
: aWordLst( 0, 255 ), aLRULst( 0, 255 ),
pImpl(new SwAutoCompleteWord_Impl(*this)),
@@ -275,7 +245,7 @@ SwAutoCompleteWord::~SwAutoCompleteWord()
delete pCurrent;
}
delete pImpl;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uLong nStrings = SwAutoCompleteString::GetElementCount();
sal_uLong nClients = SwAutoCompleteClient::GetElementCount();
DBG_ASSERT(!nStrings && !nClients, "AutoComplete: clients or string count mismatch");
@@ -340,7 +310,7 @@ sal_Bool SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
pCurrent->AddDocument(rDoc);
nInsPos = aLRULst.GetPos( (void*)pNew );
- ASSERT( USHRT_MAX != nInsPos, "String nicht gefunden" );
+ OSL_ENSURE( USHRT_MAX != nInsPos, "String nicht gefunden" );
if( nInsPos )
{
void** ppData = (void**)aLRULst.GetData();
@@ -361,7 +331,7 @@ void SwAutoCompleteWord::SetMaxCount( sal_uInt16 nNewMax )
while( nNewMax < aWordLst.Count() && nLRUIndex < aLRULst.Count())
{
sal_uInt16 nPos = aWordLst.GetPos( (String*)aLRULst[ nLRUIndex++ ] );
- ASSERT( USHRT_MAX != nPos, "String nicht gefunden" );
+ OSL_ENSURE( USHRT_MAX != nPos, "String nicht gefunden" );
void * pDel = aWordLst[nPos];
aWordLst.Remove(nPos);
delete (SwAutoCompleteString*)pDel;
@@ -387,7 +357,7 @@ void SwAutoCompleteWord::SetMinWordLen( sal_uInt16 n )
aWordLst.Remove(nPos);
sal_uInt16 nDelPos = aLRULst.GetPos( pDel );
- ASSERT( USHRT_MAX != nDelPos, "String nicht gefunden" );
+ OSL_ENSURE( USHRT_MAX != nDelPos, "String nicht gefunden" );
aLRULst.Remove( nDelPos );
--nPos;
delete (SwAutoCompleteString*)pDel;
@@ -425,7 +395,7 @@ void SwAutoCompleteWord::CheckChangedList( const SvStringsISortDtor& rNewLst )
aWordLst.Remove(nMyPos);
sal_uInt16 nPos = aLRULst.GetPos( pDel );
- ASSERT( USHRT_MAX != nPos, "String nicht gefunden" );
+ OSL_ENSURE( USHRT_MAX != nPos, "String nicht gefunden" );
aLRULst.Remove( nPos );
delete (SwAutoCompleteString*)pDel;
if( nMyPos >= --nMyLen )
@@ -440,7 +410,7 @@ void SwAutoCompleteWord::CheckChangedList( const SvStringsISortDtor& rNewLst )
{
void* pDel = aWordLst[ nNewPos ];
sal_uInt16 nPos = aLRULst.GetPos( pDel );
- ASSERT( USHRT_MAX != nPos, "String nicht gefunden" );
+ OSL_ENSURE( USHRT_MAX != nPos, "String nicht gefunden" );
aLRULst.Remove( nPos );
delete (SwAutoCompleteString*)pDel;
}
@@ -448,9 +418,7 @@ void SwAutoCompleteWord::CheckChangedList( const SvStringsISortDtor& rNewLst )
aWordLst.Remove( nMyPos, nMyLen - nMyPos );
}
}
-/* -----------------------------05.08.2002 12:54------------------------------
- ---------------------------------------------------------------------------*/
void SwAutoCompleteWord::DocumentDying(const SwDoc& rDoc)
{
pImpl->RemoveDocument(rDoc);
@@ -471,3 +439,4 @@ void SwAutoCompleteWord::DocumentDying(const SwDoc& rDoc)
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 08dab4aff359..2bf98e0576ba 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112,7 +113,8 @@ SW_DLLPUBLIC const char * dbg_out(const String & aStr)
SW_DLLPUBLIC const char * dbg_out(const ::rtl::OUString & aStr)
{
- return OUStringToOString(aStr, RTL_TEXTENCODING_ASCII_US).getStr();
+ aDbgOutResult = ByteString( rtl::OUStringToOString( aStr, RTL_TEXTENCODING_ASCII_US ) );
+ return aDbgOutResult.GetBuffer();
}
@@ -550,7 +552,7 @@ String lcl_dbg_out(const SwNode & rNode)
aTmpStr += String::CreateFromInt32(rNode.GetIndex());
aTmpStr += String("\"", RTL_TEXTENCODING_ASCII_US);
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
aTmpStr += String(" serial=\"", RTL_TEXTENCODING_ASCII_US);
aTmpStr += String::CreateFromInt32(rNode.GetSerial());
aTmpStr += String("\"", RTL_TEXTENCODING_ASCII_US);
@@ -638,7 +640,6 @@ String lcl_dbg_out(const SwNode & rNode)
aTmpStr += String("(", RTL_TEXTENCODING_ASCII_US);
aTmpStr += String::CreateFromInt32
- //(static_cast<SwTxtFmtColl *>(pColl)->GetOutlineLevel());//#outline level,zhaojianwei
(static_cast<SwTxtFmtColl *>(pColl)->GetAssignedOutlineStyleLevel());//<-end,zhaojianwei
const SwNumRuleItem & rItem =
@@ -977,7 +978,7 @@ String lcl_TokenType2Str(FormTokenType nType)
return String("??", RTL_TEXTENCODING_ASCII_US);
}
- ASSERT(false, "should not be reached");
+ OSL_ENSURE(false, "should not be reached");
return String("??", RTL_TEXTENCODING_ASCII_US);
}
@@ -998,7 +999,7 @@ String lcl_dbg_out(const SwFormTokens & rTokens)
SwFormTokens::const_iterator aIt;
- for (aIt = rTokens.begin(); aIt != rTokens.end(); aIt++)
+ for (aIt = rTokens.begin(); aIt != rTokens.end(); ++aIt)
{
if (aIt != rTokens.begin())
aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
@@ -1038,3 +1039,4 @@ SW_DLLPUBLIC const char * dbg_out(const SwNodeRange & rRange)
#endif // DEBUG
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 47dc02014aa7..43cbc83ec773 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,7 +76,6 @@
#include <txtrfmrk.hxx>
#include <frmatr.hxx>
#include <linkenum.hxx>
-#include <errhdl.hxx>
#include <pagefrm.hxx>
#include <rootfrm.hxx>
#include <swtable.hxx>
@@ -86,7 +86,7 @@
#include <UndoInsert.hxx>
#include <UndoSplitMove.hxx>
#include <UndoTable.hxx>
-#include <pagedesc.hxx> //DTor
+#include <pagedesc.hxx> //DTor
#include <breakit.hxx>
#include <ndole.hxx>
#include <ndgrf.hxx>
@@ -130,14 +130,11 @@
/* @@@MAINTAINABILITY-HORROR@@@
Probably unwanted dependency on SwDocShell
*/
-// --> OD 2005-08-29 #125370#
#include <layouter.hxx>
-// <--
using namespace ::com::sun::star;
using ::rtl::OUString;
-
// Seiten-Deskriptoren
SV_IMPL_PTRARR(SwPageDescs,SwPageDescPtr);
// Verzeichnisse
@@ -145,11 +142,10 @@ SV_IMPL_PTRARR( SwTOXTypes, SwTOXTypePtr )
// FeldTypen
SV_IMPL_PTRARR( SwFldTypes, SwFldTypePtr)
-/** IInterface
-*/
+/* IInterface */
sal_Int32 SwDoc::acquire()
{
- OSL_ASSERT(mReferenceCount >= 0 && "Negative reference count detected! This is a sign for unbalanced acquire/release calls.");
+ OSL_ENSURE(mReferenceCount >= 0, "Negative reference count detected! This is a sign for unbalanced acquire/release calls.");
return osl_incrementInterlockedCount(&mReferenceCount);
}
@@ -161,12 +157,11 @@ sal_Int32 SwDoc::release()
sal_Int32 SwDoc::getReferenceCount() const
{
- OSL_ASSERT(mReferenceCount >= 0 && "Negative reference count detected! This is a sign for unbalanced acquire/release calls.");
+ OSL_ENSURE(mReferenceCount >= 0, "Negative reference count detected! This is a sign for unbalanced acquire/release calls.");
return mReferenceCount;
}
-/** IDocumentSettingAccess
-*/
+/* IDocumentSettingAccess */
bool SwDoc::get(/*[in]*/ DocumentSettingId id) const
{
switch (id)
@@ -191,17 +186,16 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const
case TABLE_ROW_KEEP: return mbTableRowKeep;
case IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION: return mbIgnoreTabsAndBlanksForLineCalculation;
case DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE: return mbDoNotCaptureDrawObjsOnPage;
- // --> OD 2006-08-25 #i68949#
+ // #i68949#
case CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME: return mbClipAsCharacterAnchoredWriterFlyFrames;
- // <--
case UNIX_FORCE_ZERO_EXT_LEADING: return mbUnixForceZeroExtLeading;
case USE_OLD_PRINTER_METRICS: return mbOldPrinterMetrics;
case TABS_RELATIVE_TO_INDENT : return mbTabRelativeToIndent;
case PROTECT_FORM: return mbProtectForm;
- // --> OD 2008-06-05 #i89181#
+ // #i89181#
case TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST: return mbTabAtLeftIndentForParagraphsInList;
- // <--
- // COMPATIBILITY FLAGS END
+ case INVERT_BORDER_SPACING: return mbInvertBorderSpacing;
+ case COLLAPSE_EMPTY_CELL_PARA: return mbCollapseEmptyCellPara;
case BROWSE_MODE: return mbBrowseMode;
case HTML_MODE: return mbHTMLMode;
@@ -213,7 +207,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const
case DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT: return mbDoNotResetParaAttrsForNumFont;
case MATH_BASELINE_ALIGNMENT: return mbMathBaselineAlignment;
default:
- ASSERT(false, "Invalid setting id");
+ OSL_ENSURE(false, "Invalid setting id");
}
return false;
}
@@ -258,9 +252,8 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
if (pOutlineRule)
{
pOutlineRule->Validate();
- // --> OD 2005-10-21 - counting of phantoms depends on <IsOldNumbering()>
+ // counting of phantoms depends on <IsOldNumbering()>
pOutlineRule->SetCountPhantoms( !mbOldNumbering );
- // <--
}
}
break;
@@ -302,52 +295,67 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
mbDoNotCaptureDrawObjsOnPage = value;
break;
- // --> OD 2006-08-25 #i68949#
+ // #i68949#
case CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME:
mbClipAsCharacterAnchoredWriterFlyFrames = value;
break;
- // <--
+
case UNIX_FORCE_ZERO_EXT_LEADING:
mbUnixForceZeroExtLeading = value;
break;
+
case PROTECT_FORM:
- mbProtectForm = value;
- break;
+ mbProtectForm = value;
+ break;
case USE_OLD_PRINTER_METRICS:
mbOldPrinterMetrics = value;
break;
case TABS_RELATIVE_TO_INDENT:
mbTabRelativeToIndent = value;
- break;
- // --> OD 2008-06-05 #i89181#
+ break;
+ // #i89181#
case TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
mbTabAtLeftIndentForParagraphsInList = value;
- break;
- // <--
+ break;
+
+ case INVERT_BORDER_SPACING:
+ mbInvertBorderSpacing = value;
+ break;
+
+ case COLLAPSE_EMPTY_CELL_PARA:
+ mbCollapseEmptyCellPara = value;
+ break;
// COMPATIBILITY FLAGS END
case BROWSE_MODE:
mbBrowseMode = value;
break;
+
case HTML_MODE:
mbHTMLMode = value;
break;
+
case GLOBAL_DOCUMENT:
mbIsGlobalDoc = value;
break;
+
case GLOBAL_DOCUMENT_SAVE_LINKS:
mbGlblDocSaveLinks = value;
break;
+
case LABEL_DOCUMENT:
mbIsLabelDoc = value;
break;
+
case PURGE_OLE:
mbPurgeOLE = value;
break;
+
case KERN_ASIAN_PUNCTUATION:
mbKernAsianPunctuation = value;
break;
+
case DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT:
mbDoNotResetParaAttrsForNumFont = value;
break;
@@ -355,7 +363,7 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
mbMathBaselineAlignment = value;
break;
default:
- ASSERT(false, "Invalid setting id");
+ OSL_ENSURE(false, "Invalid setting id");
}
}
@@ -363,7 +371,7 @@ const i18n::ForbiddenCharacters*
SwDoc::getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const
{
const i18n::ForbiddenCharacters* pRet = 0;
- if( xForbiddenCharsTable.isValid() )
+ if( xForbiddenCharsTable.is() )
pRet = xForbiddenCharsTable->GetForbiddenCharacters( nLang, sal_False );
if( bLocaleData && !pRet && pBreakIt )
pRet = &pBreakIt->GetForbidden( (LanguageType)nLang );
@@ -373,7 +381,7 @@ const i18n::ForbiddenCharacters*
void SwDoc::setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang,
/*[in]*/ const i18n::ForbiddenCharacters& rFChars )
{
- if( !xForbiddenCharsTable.isValid() )
+ if( !xForbiddenCharsTable.is() )
{
uno::Reference<
lang::XMultiServiceFactory > xMSF =
@@ -397,9 +405,9 @@ void SwDoc::setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang,
SetModified();
}
-vos::ORef<SvxForbiddenCharactersTable>& SwDoc::getForbiddenCharacterTable()
+rtl::Reference<SvxForbiddenCharactersTable>& SwDoc::getForbiddenCharacterTable()
{
- if( !xForbiddenCharsTable.isValid() )
+ if( !xForbiddenCharsTable.is() )
{
uno::Reference<
lang::XMultiServiceFactory > xMSF =
@@ -409,7 +417,7 @@ vos::ORef<SvxForbiddenCharactersTable>& SwDoc::getForbiddenCharacterTable()
return xForbiddenCharsTable;
}
-const vos::ORef<SvxForbiddenCharactersTable>& SwDoc::getForbiddenCharacterTable() const
+const rtl::Reference<SvxForbiddenCharactersTable>& SwDoc::getForbiddenCharacterTable() const
{
return xForbiddenCharsTable;
}
@@ -467,8 +475,7 @@ void SwDoc::setCharacterCompressionType( /*[in]*/SwCharCompressType n )
}
}
-/** IDocumentDeviceAccess
-*/
+/* IDocumentDeviceAccess */
SfxPrinter* SwDoc::getPrinter(/*[in]*/ bool bCreate ) const
{
SfxPrinter* pRet = 0;
@@ -503,10 +510,9 @@ void SwDoc::setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDeleteOld,/*[in]*/
}
if ( bCallPrtDataChanged &&
- // --> FME 2005-01-21 #i41075# Do not call PrtDataChanged() if we do not
+ // #i41075# Do not call PrtDataChanged() if we do not
// use the printer for formatting:
!get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) )
- // <--
PrtDataChanged();
}
@@ -572,14 +578,13 @@ void SwDoc::setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewH
}
else
{
- // --> FME 2005-01-21 #i41075#
+ // #i41075#
// We have to take care that a printer exists before calling
// PrtDataChanged() in order to prevent that PrtDataChanged()
// triggers this funny situation:
// getReferenceDevice()->getPrinter()->CreatePrinter_()
// ->setPrinter()-> PrtDataChanged()
SfxPrinter* pPrinter = getPrinter( true );
- // <--
if( pDrawModel )
pDrawModel->SetRefDevice( pPrinter );
}
@@ -663,8 +668,7 @@ void SwDoc::setPrintData(/*[in]*/ const SwPrintData& rPrtData )
*pPrtData = rPrtData;
}
-/** Implementations the next Interface here
-*/
+/* Implementations the next Interface here */
/*
* Dokumenteditieren (Doc-SS) zum Fuellen des Dokuments
@@ -687,7 +691,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
return false;
{
- // Bug 26675: DataChanged vorm loeschen verschicken, dann bekommt
+ // BUG 26675: DataChanged vorm loeschen verschicken, dann bekommt
// man noch mit, welche Objecte sich im Bereich befinden.
// Danach koennen sie vor/hinter der Position befinden.
SwDataChanged aTmp( this, rPos, 0 );
@@ -782,7 +786,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
_SaveCntntIdx( this, rPos.nNode.GetIndex(), rPos.nContent.GetIndex(),
aBkmkArr, SAVEFLY_SPLIT );
// FIXME: only SwTxtNode has a valid implementation of SplitCntntNode!
- ASSERT(pNode->IsTxtNode(), "splitting non-text node?");
+ OSL_ENSURE(pNode->IsTxtNode(), "splitting non-text node?");
pNode = pNode->SplitCntntNode( rPos );
if (pNode)
{
@@ -884,11 +888,10 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
}
else
{ // ist Undo und Gruppierung eingeschaltet, ist alles anders !
- SwUndoInsert * pUndo = NULL; // #111827#
+ SwUndoInsert * pUndo = NULL;
// don't group the start if hints at the start should be expanded
if (!(nInsertMode & IDocumentContentOperations::INS_FORCEHINTEXPAND))
- // -> #111827#
{
SwUndo *const pLastUndo = GetUndoManager().GetLastUndo();
SwUndoInsert *const pUndoInsert(
@@ -898,7 +901,6 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
pUndo = pUndoInsert;
}
}
- // <- #111827#
CharClass const& rCC = GetAppCharClass();
xub_StrLen nInsPos = rPos.nContent.GetIndex();
@@ -976,6 +978,7 @@ SwFlyFrmFmt* SwDoc::Insert( const SwPaM &rRg,
pDfltGrfFmtColl ),
pFlyAttrSet, pGrfAttrSet, pFrmFmt );
}
+
SwFlyFrmFmt* SwDoc::Insert( const SwPaM &rRg, const GraphicObject& rGrfObj,
const SfxItemSet* pFlyAttrSet,
const SfxItemSet* pGrfAttrSet,
@@ -1035,7 +1038,6 @@ SwFlyFrmFmt* SwDoc::InsertOLE(const SwPaM &rRg, const String& rObjName,
|* SwDoc::GetFldType()
|* Beschreibung: liefert den am Doc eingerichteten Feldtypen zurueck
*************************************************************************/
-
SwFieldType *SwDoc::GetSysFldType( const sal_uInt16 eWhich ) const
{
for( sal_uInt16 i = 0; i < INIT_FLDTYPES; ++i )
@@ -1043,10 +1045,10 @@ SwFieldType *SwDoc::GetSysFldType( const sal_uInt16 eWhich ) const
return (*pFldTypes)[i];
return 0;
}
+
/*************************************************************************
* void SetDocStat( const SwDocStat& rStat );
*************************************************************************/
-
void SwDoc::SetDocStat( const SwDocStat& rStat )
{
*pDocStat = rStat;
@@ -1057,9 +1059,6 @@ const SwDocStat& SwDoc::GetDocStat() const
return *pDocStat;
}
-/*************************************************************************/
-
-
struct _PostItFld : public _SetGetExpFld
{
_PostItFld( const SwNodeIndex& rNdIdx, const SwTxtFld* pFld, const SwIndex* pIdx = 0 )
@@ -1075,7 +1074,6 @@ struct _PostItFld : public _SetGetExpFld
}
};
-
sal_uInt16 _PostItFld::GetPageNo(
const StringRangeEnumerator &rRangeEnum,
const std::set< sal_Int32 > &rPossiblePages,
@@ -1108,7 +1106,6 @@ sal_uInt16 _PostItFld::GetPageNo(
return 0;
}
-
bool lcl_GetPostIts(
IDocumentFieldsAccess* pIDFA,
_SetGetExpFlds * pSrtLst )
@@ -1146,7 +1143,6 @@ bool lcl_GetPostIts(
return bHasPostIts;
}
-
static void lcl_FormatPostIt(
IDocumentContentOperations* pIDCO,
SwPaM& aPam,
@@ -1154,7 +1150,7 @@ static void lcl_FormatPostIt(
bool bNewPage, bool bIsFirstPostIt,
sal_uInt16 nPageNo, sal_uInt16 nLineNo )
{
- static char __READONLY_DATA sTmp[] = " : ";
+ static char const sTmp[] = " : ";
DBG_ASSERT( ViewShell::GetShellRes(), "missing ShellRes" );
@@ -1199,7 +1195,6 @@ static void lcl_FormatPostIt(
pIDCO->InsertString( aPam, aStr );
}
-
// 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 )
@@ -1216,7 +1211,6 @@ static sal_Int32 lcl_GetPaperBin( const SwPageFrm *pStartFrm )
return nRes;
}
-
void SwDoc::CalculatePagesForPrinting(
/* out */ SwRenderData &rData,
const SwPrintUIOptions &rOptions,
@@ -1248,7 +1242,6 @@ void SwDoc::CalculatePagesForPrinting(
sal_uInt16 nFirstPageNo = 0;
sal_uInt16 nLastPageNo = 0;
- sal_uInt16 nPageNo = 1;
for( sal_uInt16 i = 1; i <= (sal_uInt16)aPages.Max(); ++i )
{
@@ -1295,7 +1288,7 @@ void SwDoc::CalculatePagesForPrinting(
aMulti = aTmpMulti;
// Ende des HACKs
- nPageNo = nFirstPageNo;
+ sal_uInt16 nPageNo = nFirstPageNo;
std::map< sal_Int32, sal_Int32 > &rPrinterPaperTrays = rData.GetPrinterPaperTrays();
std::set< sal_Int32 > &rValidPages = rData.GetValidPagesSet();
@@ -1309,9 +1302,8 @@ void SwDoc::CalculatePagesForPrinting(
( (bRightPg && bPrintRightPages) ||
(!bRightPg && bPrintLeftPages) ) )
{
- // --> FME 2005-12-12 #b6354161# Feature - Print empty pages
+ // Feature - Print empty pages
if ( bPrintEmptyPages || pStPage->Frm().Height() )
- // <--
{
rValidPages.insert( nPageNo );
rValidStartFrms[ nPageNo ] = pStPage;
@@ -1341,14 +1333,8 @@ void SwDoc::CalculatePagesForPrinting(
// get PageRange value to use
OUString aPageRange;
- // --> PL, OD #i116085# - adjusting fix for i113919
-// if (bIsPDFExport)
-// {
-// aPageRange = rOptions.getStringValue( "PageRange", OUString() );
-// }
-// else
+ // #i116085# - adjusting fix for i113919
if ( !bIsPDFExport )
- // <--
{
// PageContent :
// 0 -> print all pages (default if aPageRange is empty)
@@ -1383,7 +1369,6 @@ void SwDoc::CalculatePagesForPrinting(
1, nDocPageCount, 0, &rData.GetValidPagesSet() );
}
-
void SwDoc::UpdatePagesForPrintingWithPostItData(
/* out */ SwRenderData &rData,
const SwPrintUIOptions &rOptions,
@@ -1567,7 +1552,6 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
}
}
-
void SwDoc::CalculatePagePairsForProspectPrinting(
/* out */ SwRenderData &rData,
const SwPrintUIOptions &rOptions,
@@ -1714,7 +1698,6 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
// thus we are done here.
}
-
sal_uInt16 SwDoc::GetPageCount() const
{
return GetRootFrm() ? GetRootFrm()->GetPageNum() : 0;
@@ -1745,11 +1728,9 @@ const Size SwDoc::GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const
return aSize;
}
-
/*************************************************************************
* void UpdateDocStat( const SwDocStat& rStat );
*************************************************************************/
-
void SwDoc::UpdateDocStat( SwDocStat& rStat )
{
if( rStat.bModified )
@@ -1796,22 +1777,22 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
com::sun::star::uno::Sequence < com::sun::star::beans::NamedValue > aStat( rStat.nPage ? 7 : 6);
sal_Int32 n=0;
- aStat[n].Name = ::rtl::OUString::createFromAscii("TableCount");
+ aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TableCount"));
aStat[n++].Value <<= (sal_Int32)rStat.nTbl;
- aStat[n].Name = ::rtl::OUString::createFromAscii("ImageCount");
+ aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageCount"));
aStat[n++].Value <<= (sal_Int32)rStat.nGrf;
- aStat[n].Name = ::rtl::OUString::createFromAscii("ObjectCount");
+ aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ObjectCount"));
aStat[n++].Value <<= (sal_Int32)rStat.nOLE;
if ( rStat.nPage )
{
- aStat[n].Name = ::rtl::OUString::createFromAscii("PageCount");
+ aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PageCount"));
aStat[n++].Value <<= (sal_Int32)rStat.nPage;
}
- aStat[n].Name = ::rtl::OUString::createFromAscii("ParagraphCount");
+ aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParagraphCount"));
aStat[n++].Value <<= (sal_Int32)rStat.nPara;
- aStat[n].Name = ::rtl::OUString::createFromAscii("WordCount");
+ aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WordCount"));
aStat[n++].Value <<= (sal_Int32)rStat.nWord;
- aStat[n].Name = ::rtl::OUString::createFromAscii("CharacterCount");
+ aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharacterCount"));
aStat[n++].Value <<= (sal_Int32)rStat.nChar;
// For e.g. autotext documents there is no pSwgInfo (#i79945)
@@ -1838,9 +1819,7 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
}
}
-
// Dokument - Info
-
void SwDoc::DocInfoChgd( )
{
GetSysFldType( RES_DOCINFOFLD )->UpdateFlds();
@@ -1848,7 +1827,7 @@ void SwDoc::DocInfoChgd( )
SetModified();
}
- // returne zum Namen die im Doc gesetzte Referenz
+// returne zum Namen die im Doc gesetzte Referenz
const SwFmtRefMark* SwDoc::GetRefMark( const String& rName ) const
{
const SfxPoolItem* pItem;
@@ -1867,7 +1846,7 @@ const SwFmtRefMark* SwDoc::GetRefMark( const String& rName ) const
return 0;
}
- // returne die RefMark per Index - fuer Uno
+// returne die RefMark per Index - fuer Uno
const SwFmtRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex ) const
{
const SfxPoolItem* pItem;
@@ -1891,10 +1870,10 @@ const SwFmtRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex ) const
return pRet;
}
- // returne die Namen aller im Doc gesetzten Referenzen
- //JP 24.06.96: Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine
- // RefMark gesetzt ist
- // OS 25.06.96: ab jetzt wird immer die Anzahl der Referenzen returnt
+// returne die Namen aller im Doc gesetzten Referenzen
+//JP 24.06.96: Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine
+// RefMark gesetzt ist
+// OS 25.06.96: ab jetzt wird immer die Anzahl der Referenzen returnt
sal_uInt16 SwDoc::GetRefMarks( SvStringsDtor* pNames ) const
{
const SfxPoolItem* pItem;
@@ -1965,14 +1944,11 @@ bool SwDoc::IsModified() const
void SwDoc::SetModified()
{
- // --> OD 2005-08-29 #125370#
SwLayouter::ClearMovedFwdFrms( *this );
SwLayouter::ClearObjsTmpConsiderWrapInfluence( *this );
SwLayouter::ClearFrmsNotToWrap( *this );
- // <--
- // --> OD 2006-05-10 #i65250#
+ // #i65250#
SwLayouter::ClearMoveBwdLayoutInfo( *this );
- // <--
// dem Link wird der Status returnt, wie die Flags waren und werden
// Bit 0: -> alter Zustand
// Bit 1: -> neuer Zustand
@@ -2010,7 +1986,6 @@ void SwDoc::ResetModified()
}
}
-
void SwDoc::ReRead( SwPaM& rPam, const String& rGrfName,
const String& rFltName, const Graphic* pGraphic,
const GraphicObject* pGrafObj )
@@ -2082,7 +2057,6 @@ sal_Bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* )
return sal_True;
}
-
/*************************************************************************
* SwDoc::SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong )
*
@@ -2093,10 +2067,9 @@ sal_Bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* )
* Mit bOnlyWrong kann man dann steuern, ob nur die Bereiche mit falschen
* Woertern oder die kompletten Bereiche neu ueberprueft werden muessen.
************************************************************************/
-
void SwDoc::SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong, sal_Bool bSmartTags )
{
- ASSERT( GetRootFrm(), "SpellAgain: Where's my RootFrm?" );
+ OSL_ENSURE( GetRootFrm(), "SpellAgain: Where's my RootFrm?" );
if( bInvalid )
{
SwPageFrm *pPage = (SwPageFrm*)GetRootFrm()->Lower();
@@ -2170,8 +2143,7 @@ void SwDoc::Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, sal_Bool
{
::SetProgressState( i, GetDocShell() );
const sal_uLong nIndex = rOutNds[ i ]->GetIndex();
- //sal_uInt8 nLvl = ((SwTxtNode*)GetNodes()[ nIndex ])->GetTxtColl()//#outline level,zhaojianwei
- // ->GetOutlineLevel();
+
const int nLvl = ((SwTxtNode*)GetNodes()[ nIndex ])->GetAttrOutlineLevel()-1;//<-end,zhaojianwei
if( nLvl > nLevel )
continue;
@@ -2210,7 +2182,7 @@ void SwDoc::Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, sal_Bool
if( bImpress )
{
SwTxtFmtColl* pMyColl = pNd->GetTxtColl();
- //sal_uInt16 nHeadLine = static_cast<sal_uInt16>(pMyColl->GetOutlineLevel()==NO_NUMBERING ?//#outlinelevel,zhaojianwei
+
const sal_uInt16 nHeadLine = static_cast<sal_uInt16>(
!pMyColl->IsAssignedToListLevelOfOutlineStyle() //<-end,zhaojianwei
? RES_POOLCOLL_HEADLINE2
@@ -2232,8 +2204,8 @@ void SwDoc::Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, sal_Bool
}
}
- // loesche den nicht sichtbaren Content aus dem Document, wie z.B.:
- // versteckte Bereiche, versteckte Absaetze
+// loesche den nicht sichtbaren Content aus dem Document, wie z.B.:
+// versteckte Bereiche, versteckte Absaetze
bool SwDoc::RemoveInvisibleContent()
{
sal_Bool bRet = sal_False;
@@ -2313,12 +2285,10 @@ bool SwDoc::RemoveInvisibleContent()
SwScriptInfo::DeleteHiddenRanges( *pTxtNd );
}
- // --> FME 2006-01-11 #120473#
// Footnotes/Frames may have been removed, therefore we have
// to reset n:
if ( bRemoved )
n = aPam.GetPoint()->nNode.GetIndex();
- // <--
}
}
@@ -2467,9 +2437,7 @@ bool SwDoc::RestoreInvisibleContent()
return bRet;
}
-/*-- 11.06.2004 08:34:04---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwDoc::ConvertFieldsToText()
{
sal_Bool bRet = sal_False;
@@ -2580,7 +2548,7 @@ bool SwDoc::LinksUpdated() const
return mbLinksUpdated;
}
- // embedded alle lokalen Links (Bereiche/Grafiken)
+// embedded alle lokalen Links (Bereiche/Grafiken)
::sfx2::SvBaseLink* lcl_FindNextRemovableLink( const ::sfx2::SvBaseLinks& rLinks, sfx2::LinkManager& rLnkMgr )
{
for( sal_uInt16 n = 0; n < rLinks.Count(); ++n )
@@ -2633,10 +2601,6 @@ bool SwDoc::EmbedAllLinks()
return bRet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwDoc::IsInsTblFormatNum() const
{
return SW_MOD()->IsInsTblFormatNum(get(IDocumentSettingAccess::HTML_MODE));
@@ -2647,16 +2611,12 @@ sal_Bool SwDoc::IsInsTblChangeNumFormat() const
return SW_MOD()->IsInsTblChangeNumFormat(get(IDocumentSettingAccess::HTML_MODE));
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwDoc::IsInsTblAlignNum() const
{
return SW_MOD()->IsInsTblAlignNum(get(IDocumentSettingAccess::HTML_MODE));
}
- // setze das InsertDB als Tabelle Undo auf:
+// setze das InsertDB als Tabelle Undo auf:
void SwDoc::AppendUndoForInsertFromDB( const SwPaM& rPam, sal_Bool bIsTable )
{
if( bIsTable )
@@ -2697,7 +2657,6 @@ void SwDoc::ChgTOX(SwTOXBase & rTOX, const SwTOXBase & rNew)
}
}
-// #111827#
String SwDoc::GetPaMDescr(const SwPaM & rPam) const
{
String aResult;
@@ -2736,7 +2695,6 @@ String SwDoc::GetPaMDescr(const SwPaM & rPam) const
return aResult;
}
-// -> #111840#
SwField * SwDoc::GetField(const SwPosition & rPos)
{
SwTxtFld * const pAttr = GetTxtFld(rPos);
@@ -2753,7 +2711,6 @@ SwTxtFld * SwDoc::GetTxtFld(const SwPosition & rPos)
rPos.nContent.GetIndex(), RES_TXTATR_FIELD) )
: 0;
}
-// <- #111840#
bool SwDoc::ContainsHiddenChars() const
{
@@ -2803,7 +2760,6 @@ void SwDoc::ChkCondColls()
}
}
-#ifdef FUTURE_VBA
uno::Reference< script::vba::XVBAEventProcessor >
SwDoc::GetVbaEventProcessor()
{
@@ -2822,7 +2778,6 @@ SwDoc::GetVbaEventProcessor()
}
return mxVbaEvents;
}
-#endif
void SwDoc::setExternalData(::sw::tExternalDataType eType,
::sw::tExternalDataPointer pPayload)
@@ -2834,3 +2789,5 @@ void SwDoc::setExternalData(::sw::tExternalDataType eType,
{
return m_externalData[eType];
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx
index 77665e55fbce..00c6d40b5d91 100644
--- a/sw/source/core/doc/docbasic.cxx
+++ b/sw/source/core/doc/docbasic.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <hintids.hxx>
-#ifndef _RTL_USTRING_HXX //autogen
#include <rtl/ustring.hxx>
-#endif
#include <svtools/imap.hxx>
#include <svtools/imapobj.hxx>
#include <basic/sbx.hxx>
@@ -43,9 +42,7 @@
#include <frmatr.hxx>
#include <docary.hxx>
#include <doc.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <swevent.hxx>
using namespace ::com::sun::star::uno;
@@ -137,12 +134,6 @@ sal_Bool SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs
eErr = pDocShell->CallXScript(
rMacro.GetMacName(), *pUnoArgs, aRet, aOutArgsIndex, aOutArgs);
- //*pRet = pRetValue->GetString();
- // use the AnyConverter to return a String if appropriate?
-
- // need to call something like lcl_translateUno2Basic
- // pArgs = lcl_translateUno2Basic( pUnoArgs );
-
delete pUnoArgs;
break;
}
@@ -257,12 +248,6 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve
nRet += 0 == pDocShell->CallXScript(
rMacro.GetMacName(), *pUnoArgs,aRet, aOutArgsIndex, aOutArgs) ? 1 : 0;
- //*pRet = pRetValue->GetString();
- // use the AnyConverter to return a String if appropriate?
-
- // need to call something like lcl_translateUno2Basic
- // pArgs = lcl_translateUno2Basic( pUnoArgs );
-
delete pUnoArgs;
}
// JavaScript calls are ignored
@@ -274,3 +259,4 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 50fb0e7b98f7..30f65bd3b311 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,6 @@
#include <docary.hxx>
#include <xmloff/odffields.hxx>
#include <editsh.hxx>
-#include <errhdl.hxx>
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
#include <functional>
@@ -351,28 +351,28 @@ namespace sw { namespace mark
switch(eType)
{
case IDocumentMarkAccess::TEXT_FIELDMARK:
- pMark = shared_ptr<IMark>(new TextFieldmark(rPaM));
+ pMark = boost::shared_ptr<IMark>(new TextFieldmark(rPaM));
break;
case IDocumentMarkAccess::CHECKBOX_FIELDMARK:
- pMark = shared_ptr<IMark>(new CheckboxFieldmark(rPaM));
+ pMark = boost::shared_ptr<IMark>(new CheckboxFieldmark(rPaM));
break;
case IDocumentMarkAccess::NAVIGATOR_REMINDER:
- pMark = shared_ptr<IMark>(new NavigatorReminder(rPaM));
+ pMark = boost::shared_ptr<IMark>(new NavigatorReminder(rPaM));
break;
case IDocumentMarkAccess::BOOKMARK:
- pMark = shared_ptr<IMark>(new Bookmark(rPaM, KeyCode(), rName, ::rtl::OUString()));
+ pMark = boost::shared_ptr<IMark>(new Bookmark(rPaM, KeyCode(), rName, ::rtl::OUString()));
break;
case IDocumentMarkAccess::DDE_BOOKMARK:
- pMark = shared_ptr<IMark>(new DdeBookmark(rPaM));
+ pMark = boost::shared_ptr<IMark>(new DdeBookmark(rPaM));
break;
case IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK:
- pMark = shared_ptr<IMark>(new CrossRefHeadingBookmark(rPaM, KeyCode(), rName, ::rtl::OUString()));
+ pMark = boost::shared_ptr<IMark>(new CrossRefHeadingBookmark(rPaM, KeyCode(), rName, ::rtl::OUString()));
break;
case IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK:
- pMark = shared_ptr<IMark>(new CrossRefNumItemBookmark(rPaM, KeyCode(), rName, ::rtl::OUString()));
+ pMark = boost::shared_ptr<IMark>(new CrossRefNumItemBookmark(rPaM, KeyCode(), rName, ::rtl::OUString()));
break;
case IDocumentMarkAccess::UNO_BOOKMARK:
- pMark = shared_ptr<IMark>(new UnoMark(rPaM));
+ pMark = boost::shared_ptr<IMark>(new UnoMark(rPaM));
break;
}
OSL_ENSURE(pMark.get(),
@@ -394,12 +394,10 @@ namespace sw { namespace mark
case IDocumentMarkAccess::BOOKMARK:
case IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK:
case IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK:
- // if(dynamic_cast<IBookmark*>)
lcl_InsertMarkSorted(m_vBookmarks, pMark);
break;
case IDocumentMarkAccess::TEXT_FIELDMARK:
case IDocumentMarkAccess::CHECKBOX_FIELDMARK:
- // if(dynamic_cast<IFieldmark*>
lcl_InsertMarkSorted(m_vFieldmarks, pMark);
break;
case IDocumentMarkAccess::NAVIGATOR_REMINDER:
@@ -418,6 +416,7 @@ namespace sw { namespace mark
OSL_TRACE("Fieldmarks");
lcl_DebugMarks(m_vFieldmarks);
#endif
+
return pMark.get();
}
@@ -609,7 +608,7 @@ namespace sw { namespace mark
{
// completely in range
- // --> OD 2009-08-07 #i92125#
+ // #i92125#
bool bKeepCrossRefBkmk( false );
{
if ( rStt == rEnd &&
@@ -627,7 +626,6 @@ namespace sw { namespace mark
pSaveBkmk->push_back(SaveBookmark(true, true, *pMark, rStt, pSttIdx));
vMarksToDelete.push_back(ppMark);
}
- // <--
}
else if(isPosInRange ^ isOtherPosInRange)
{
@@ -644,7 +642,7 @@ namespace sw { namespace mark
rEnd,
isPosInRange ? pMark->GetOtherMarkPos() : pMark->GetMarkPos());
- // --> OD 2009-08-06 #i92125#
+ // #i92125#
// no move of position for cross-reference bookmarks,
// if move occurs inside a certain node
if ( ( IDocumentMarkAccess::GetType(*pMark) !=
@@ -661,17 +659,16 @@ namespace sw { namespace mark
// illegal selection? collapse the mark and restore sorting later
isSortingNeeded |= lcl_FixCorrectedMark(isPosInRange, isOtherPosInRange, pMark);
}
- // <--
}
}
// we just remembered the iterators to delete, so we do not need to search
- // for the shared_ptr<> (the entry in m_vMarks) again
+ // for the boost::shared_ptr<> (the entry in m_vMarks) again
// reverse iteration, since erasing an entry invalidates iterators
// behind it (the iterators in vMarksToDelete are sorted)
for(vector<const_iterator_t>::reverse_iterator pppMark = vMarksToDelete.rbegin();
pppMark != vMarksToDelete.rend();
- pppMark++)
+ ++pppMark)
{
deleteMark(*pppMark);
}
@@ -703,7 +700,6 @@ namespace sw { namespace mark
}
case IDocumentMarkAccess::TEXT_FIELDMARK:
case IDocumentMarkAccess::CHECKBOX_FIELDMARK:
- // if(dynamic_cast<IFieldmark*>
{
IDocumentMarkAccess::iterator_t ppFieldmark = lcl_FindMark(m_vFieldmarks, *ppMark);
OSL_ENSURE(ppFieldmark != m_vFieldmarks.end(),
@@ -746,7 +742,7 @@ namespace sw { namespace mark
iterator_t pMarkHigh = m_vMarks.end();
iterator_t pMarkFound = find_if(
pMarkLow, pMarkHigh,
- bind(equal_to<const IMark*>(), bind(&shared_ptr<IMark>::get, _1), pMark));
+ bind(equal_to<const IMark*>(), bind(&boost::shared_ptr<IMark>::get, _1), pMark));
if(pMarkFound != pMarkHigh)
deleteMark(pMarkFound);
}
@@ -810,6 +806,7 @@ namespace sw { namespace mark
IFieldmark* MarkManager::getFieldmarkBefore(const SwPosition& rPos) const
{ return dynamic_cast<IFieldmark*>(lcl_getMarkBefore(m_vFieldmarks, rPos)); }
+
::rtl::OUString MarkManager::getUniqueMarkName(const ::rtl::OUString& rName) const
{
OSL_ENSURE(rName.getLength(),
@@ -836,10 +833,6 @@ namespace sw { namespace mark
}} // namespace ::sw::mark
-// old implementation
-
-//SV_IMPL_OP_PTRARR_SORT(SwBookmarks, SwBookmarkPtr)
-
#define PCURCRSR (_pCurrCrsr)
#define FOREACHPAM_START(pSttCrsr) \
{\
@@ -1496,10 +1489,10 @@ void _RestoreCntntIdx(SwDoc* pDoc,
case 0x0800:
case 0x0801:
{
- sal_uInt16 nCnt = 0;
SwCrsrShell* pShell = pDoc->GetEditShell();
if( pShell )
{
+ sal_uInt16 nCnt = 0;
FOREACHSHELL_START( pShell )
SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
if( _pStkCrsr )
@@ -1656,10 +1649,10 @@ void _RestoreCntntIdx(SvULongs& rSaveArr,
case 0x0800:
case 0x0801:
{
- sal_uInt16 nCnt = 0;
SwCrsrShell* pShell = pDoc->GetEditShell();
if( pShell )
{
+ sal_uInt16 nCnt = 0;
FOREACHSHELL_START( pShell )
SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
if( _pStkCrsr )
@@ -1744,3 +1737,5 @@ void _RestoreCntntIdx(SvULongs& rSaveArr,
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx
index 1d1890521acf..78fafdf4d15d 100644
--- a/sw/source/core/doc/docchart.cxx
+++ b/sw/source/core/doc/docchart.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,6 @@
#include <ndindex.hxx>
#include <swtable.hxx>
#include <ndtxt.hxx>
-#include <ndole.hxx>
#include <calc.hxx>
#include <frmfmt.hxx>
#include <cellfml.hxx>
@@ -52,7 +52,7 @@
#include <swtblfmt.hxx>
#include <tblsel.hxx>
#include <cellatr.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <unochart.hxx>
@@ -78,7 +78,7 @@ sal_Bool SwTable::IsTblComplexForChart( const String& rSelection,
if( '>' == sBox.GetChar( sBox.Len()-1 ) ) sBox.Erase( sBox.Len()-1 );
xub_StrLen nTrenner = sBox.Search( ':' );
- ASSERT( STRING_NOTFOUND != nTrenner, "keine gueltige Selektion" );
+ OSL_ENSURE( STRING_NOTFOUND != nTrenner, "keine gueltige Selektion" );
pSttBox = GetTblBox( sBox.Copy( 0, nTrenner ));
pEndBox = GetTblBox( sBox.Copy( nTrenner+1 ));
@@ -224,7 +224,7 @@ SwChartDataProvider * SwDoc::GetChartDataProvider( bool bCreate ) const
{
// since there must be only one instance of this object per document
// we need a mutex here
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bCreate && !aChartDataProviderImplRef.get())
{
@@ -275,3 +275,4 @@ SwChartLockController_Helper & SwDoc::GetChartControllerHelper()
return *pChartControllerHelper;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index e0c550dff020..69c070ab3d20 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
-#include <tools/list.hxx>
#include <vcl/vclenum.hxx>
#include <editeng/crsditem.hxx>
#include <editeng/colritem.hxx>
@@ -50,8 +49,11 @@
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
+#include <vector>
+
using namespace ::com::sun::star;
+using ::std::vector;
class CompareLine
{
@@ -63,15 +65,13 @@ public:
virtual sal_Bool Compare( const CompareLine& rLine ) const = 0;
};
-DECLARE_LIST( CompareList, CompareLine* )
-
class CompareData
{
- sal_uLong* pIndex;
- sal_Bool* pChangedFlag;
+ size_t* pIndex;
+ bool* pChangedFlag;
protected:
- CompareList aLines;
+ vector< CompareLine* > aLines;
sal_uLong nSttLineNum;
// Anfang und Ende beschneiden und alle anderen in das
@@ -103,25 +103,25 @@ public:
// Eindeutigen Index fuer eine Line setzen. Gleiche Lines haben den
// selben Index; auch in den anderen CompareData!
- void SetIndex( sal_uLong nLine, sal_uLong nIndex );
- sal_uLong GetIndex( sal_uLong nLine ) const
- { return nLine < aLines.Count() ? pIndex[ nLine ] : 0; }
+ void SetIndex( size_t nLine, size_t nIndex );
+ size_t GetIndex( size_t nLine ) const
+ { return nLine < aLines.size() ? pIndex[ nLine ] : 0; }
// setze/erfrage ob eine Zeile veraendert ist
- void SetChanged( sal_uLong nLine, sal_Bool bFlag = sal_True );
- sal_Bool GetChanged( sal_uLong nLine ) const
+ void SetChanged( size_t nLine, bool bFlag = true );
+ bool GetChanged( size_t nLine ) const
{
- return (pChangedFlag && nLine < aLines.Count())
+ return (pChangedFlag && nLine < aLines.size())
? pChangedFlag[ nLine ]
: 0;
}
- sal_uLong GetLineCount() const { return aLines.Count(); }
+ size_t GetLineCount() const { return aLines.size(); }
sal_uLong GetLineOffset() const { return nSttLineNum; }
- const CompareLine* GetLine( sal_uLong nLine ) const
- { return aLines.GetObject( nLine ); }
+ const CompareLine* GetLine( size_t nLine ) const
+ { return aLines[ nLine ]; }
void InsertLine( CompareLine* pLine )
- { aLines.Insert( pLine, LIST_APPEND ); }
+ { aLines.push_back( pLine ); }
};
class Hash
@@ -195,12 +195,8 @@ public:
Compare( sal_uLong nDiff, CompareData& rData1, CompareData& rData2 );
};
-// ====================================================================
-
CompareLine::~CompareLine() {}
-// ----------------------------------------------------------------------
-
CompareData::CompareData()
: pIndex( 0 ), pChangedFlag( 0 ), nSttLineNum( 0 )
{
@@ -212,25 +208,25 @@ CompareData::~CompareData()
delete[] pChangedFlag;
}
-void CompareData::SetIndex( sal_uLong nLine, sal_uLong nIndex )
+void CompareData::SetIndex( size_t nLine, size_t nIndex )
{
if( !pIndex )
{
- pIndex = new sal_uLong[ aLines.Count() ];
- memset( pIndex, 0, aLines.Count() * sizeof( sal_uLong ) );
+ pIndex = new size_t[ aLines.size() ];
+ memset( pIndex, 0, aLines.size() * sizeof( size_t ) );
}
- if( nLine < aLines.Count() )
+ if( nLine < aLines.size() )
pIndex[ nLine ] = nIndex;
}
-void CompareData::SetChanged( sal_uLong nLine, sal_Bool bFlag )
+void CompareData::SetChanged( size_t nLine, bool bFlag )
{
if( !pChangedFlag )
{
- pChangedFlag = new sal_Bool[ aLines.Count() +1 ];
- memset( pChangedFlag, 0, aLines.Count() +1 * sizeof( sal_Bool ) );
+ pChangedFlag = new bool[ aLines.size() +1 ];
+ memset( pChangedFlag, 0, (aLines.size() +1) * sizeof( bool ) );
}
- if( nLine < aLines.Count() )
+ if( nLine < aLines.size() )
pChangedFlag[ nLine ] = bFlag;
}
@@ -312,8 +308,6 @@ void CompareData::CheckForChangesInLine( const CompareData& ,
{
}
-// ----------------------------------------------------------------------
-
Hash::Hash( sal_uLong nSize )
: nCount( 1 )
{
@@ -373,14 +367,14 @@ void Hash::CalcHashValue( CompareData& rData )
{
if( pHashArr )
{
- for( sal_uLong n = 0; n < rData.GetLineCount(); ++n )
+ for( size_t n = 0; n < rData.GetLineCount(); ++n )
{
const CompareLine* pLine = rData.GetLine( n );
- ASSERT( pLine, "wo ist die Line?" );
+ OSL_ENSURE( pLine, "wo ist die Line?" );
sal_uLong nH = pLine->GetHashValue();
sal_uLong* pFound = &pHashArr[ nH % nPrime ];
- sal_uLong i;
+ size_t i;
for( i = *pFound; ; i = pDataArr[i].nNext )
if( !i )
{
@@ -400,8 +394,6 @@ void Hash::CalcHashValue( CompareData& rData )
}
}
-// ----------------------------------------------------------------------
-
Compare::Compare( sal_uLong nDiff, CompareData& rData1, CompareData& rData2 )
{
MovedData *pMD1, *pMD2;
@@ -448,8 +440,6 @@ Compare::Compare( sal_uLong nDiff, CompareData& rData1, CompareData& rData2 )
delete pMD2;
}
-
-
void Compare::CountDifference( const CompareData& rData, sal_uLong* pCounts )
{
sal_uLong nLen = rData.GetLineCount();
@@ -588,8 +578,6 @@ void Compare::CheckDiscard( sal_uLong nLen, sal_Char* pDiscard )
}
}
-// ----------------------------------------------------------------------
-
Compare::MovedData::MovedData( CompareData& rData, sal_Char* pDiscard )
: pIndex( 0 ), pLineNum( 0 ), nCount( 0 )
{
@@ -622,9 +610,7 @@ Compare::MovedData::~MovedData()
delete pLineNum;
}
-// ----------------------------------------------------------------------
-
- // Suche die verschobenen Lines
+// Suche die verschobenen Lines
Compare::CompareSequence::CompareSequence(
CompareData& rD1, CompareData& rD2,
const MovedData& rMD1, const MovedData& rMD2 )
@@ -708,26 +694,22 @@ sal_uLong Compare::CompareSequence::CheckDiag( sal_uLong nStt1, sal_uLong nEnd1,
for (c = 1;; ++c)
{
long d; /* Active diagonal. */
- long big_snake = 0;
/* Extend the top-down search by an edit step in each diagonal. */
fmin > dmin ? pFDiag[--fmin - 1] = -1 : ++fmin;
fmax < dmax ? pFDiag[++fmax + 1] = -1 : --fmax;
for (d = fmax; d >= fmin; d -= 2)
{
- long x, y, oldx, tlo = pFDiag[d - 1], thi = pFDiag[d + 1];
+ long x, y, tlo = pFDiag[d - 1], thi = pFDiag[d + 1];
if (tlo >= thi)
x = tlo + 1;
else
x = thi;
- oldx = x;
y = x - d;
while( sal_uLong(x) < nEnd1 && sal_uLong(y) < nEnd2 &&
rMoved1.GetIndex( x ) == rMoved2.GetIndex( y ))
++x, ++y;
- if (x - oldx > 20)
- big_snake = 1;
pFDiag[d] = x;
if( odd && bmin <= d && d <= bmax && pBDiag[d] <= pFDiag[d] )
{
@@ -741,19 +723,16 @@ sal_uLong Compare::CompareSequence::CheckDiag( sal_uLong nStt1, sal_uLong nEnd1,
bmax < dmax ? pBDiag[++bmax + 1] = INT_MAX : --bmax;
for (d = bmax; d >= bmin; d -= 2)
{
- long x, y, oldx, tlo = pBDiag[d - 1], thi = pBDiag[d + 1];
+ long x, y, tlo = pBDiag[d - 1], thi = pBDiag[d + 1];
if (tlo < thi)
x = tlo;
else
x = thi - 1;
- oldx = x;
y = x - d;
while( sal_uLong(x) > nStt1 && sal_uLong(y) > nStt2 &&
rMoved1.GetIndex( x - 1 ) == rMoved2.GetIndex( y - 1 ))
--x, --y;
- if (oldx - x > 20)
- big_snake = 1;
pBDiag[d] = x;
if (!odd && fmin <= d && d <= fmax && pBDiag[d] <= pFDiag[d])
{
@@ -840,8 +819,6 @@ void Compare::ShiftBoundaries( CompareData& rData1, CompareData& rData2 )
}
}
-/* */
-
class SwCompareLine : public CompareLine
{
const SwNode& rNode;
@@ -892,8 +869,6 @@ public:
void SetRedlinesToDoc( sal_Bool bUseDocInfo );
};
-// ----------------------------------------------------------------
-
SwCompareLine::SwCompareLine( const SwNode& rNd )
: rNode( rNd )
{
@@ -1245,8 +1220,6 @@ sal_Bool SwCompareLine::ChangesInLine( const SwCompareLine& rLine,
return bRet;
}
-// ----------------------------------------------------------------
-
SwCompareData::~SwCompareData()
{
if( pDelRing )
@@ -1291,7 +1264,6 @@ sal_uLong SwCompareData::PrevIdx( const SwNode* pNd )
return pNd->GetIndex() - 1;
}
-
void SwCompareData::CheckRanges( CompareData& rData )
{
const SwNodes& rSrcNds = ((SwCompareData&)rData).rDoc.GetNodes();
@@ -1345,7 +1317,6 @@ void SwCompareData::CheckRanges( CompareData& rData )
}
}
-
void SwCompareData::ShowInsert( sal_uLong nStt, sal_uLong nEnd )
{
SwPaM* pTmp = new SwPaM( ((SwCompareLine*)GetLine( nStt ))->GetNode(), 0,
@@ -1436,8 +1407,7 @@ void SwCompareData::SetRedlinesToDoc( sal_Bool bUseDocInfo )
{
SwPaM* pTmp = pDelRing;
- // Bug #83296#: get the Author / TimeStamp from the "other"
- // document info
+ // get the Author / TimeStamp from the "other" document info
sal_uInt16 nAuthor = rDoc.GetRedlineAuthor();
DateTime aTimeStamp;
SwDocShell *pDocShell(rDoc.GetDocShell());
@@ -1571,11 +1541,7 @@ void SwCompareData::SetRedlinesToDoc( sal_Bool bUseDocInfo )
}
}
-/* */
-
-
-
- // returnt (?die Anzahl der Unterschiede?) ob etwas unterschiedlich ist
+// returnt (?die Anzahl der Unterschiede?) ob etwas unterschiedlich ist
long SwDoc::CompareDoc( const SwDoc& rDoc )
{
if( &rDoc == this )
@@ -1619,7 +1585,6 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
return nRet;
}
-
class _SaveMergeRedlines : public Ring
{
const SwRedline* pSrcRedl;
@@ -1880,4 +1845,4 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
return nRet;
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index 3477619fba33..d13affa1c536 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -358,3 +359,4 @@ SwEditShell* SwDoc::GetEditShell( ViewShell** ppSh ) const
return GetEditShell(0);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docdde.cxx b/sw/source/core/doc/docdde.cxx
index bef9ea1f254f..10892ca2a611 100644
--- a/sw/source/core/doc/docdde.cxx
+++ b/sw/source/core/doc/docdde.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,9 +33,7 @@
#include <stdlib.h>
-#ifndef _APP_HXX
#include <vcl/svapp.hxx>
-#endif
#include <tools/urlobj.hxx>
#define _SVSTDARR_STRINGS
@@ -416,3 +415,4 @@ sal_Bool SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
return sal_False;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 463e15bf6b6e..30adf7eb721a 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96,8 +97,8 @@ static void lcl_DefaultPageFmt( sal_uInt16 nPoolFmtId,
//Raender haben eine defaultmaessige Mindestgroesse.
//wenn der Drucker einen groesseren Rand vorgibt, so
//ist mir dass auch recht.
- // MIB 06/25/2002, #99397#: The HTML page desc had A4 as page size
- // always. This has been changed to take the page size from the printer.
+ // The HTML page desc had A4 as page size always.
+ // This has been changed to take the page size from the printer.
// Unfortunately, the margins of the HTML page desc are smaller than
// the margins used here in general, so one extra case is required.
// In the long term, this needs to be changed to always keep the
@@ -140,9 +141,6 @@ static void lcl_DefaultPageFmt( sal_uInt16 nPoolFmtId,
|*
|* SwDoc::ChgPageDesc()
|*
-|* Ersterstellung MA 25. Jan. 93
-|* Letzte Aenderung MA 01. Mar. 95
-|*
|*************************************************************************/
void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
@@ -154,7 +152,7 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
// funktioniert nicht richtig, wenn man unterschiedliche WhichRanges hat.
/////////////// !!!!!!!!!!!!!!!!
//Die interressanten Attribute uebernehmen.
- sal_uInt16 __READONLY_DATA aIdArr[] = { RES_FRM_SIZE, RES_UL_SPACE,
+ sal_uInt16 const aIdArr[] = { RES_FRM_SIZE, RES_UL_SPACE,
RES_BACKGROUND, RES_SHADOW,
RES_COL, RES_COL,
RES_FRAMEDIR, RES_FRAMEDIR,
@@ -198,7 +196,7 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
{
- ASSERT( i < aPageDescs.Count(), "PageDescs ueberindiziert." );
+ OSL_ENSURE( i < aPageDescs.Count(), "PageDescs ueberindiziert." );
SwPageDesc *pDesc = aPageDescs[i];
@@ -438,8 +436,6 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
|*
|* Beschreibung Alle Descriptoren, deren Follow auf den zu loeschenden
|* zeigen muessen angepasst werden.
-|* Ersterstellung MA 25. Jan. 93
-|* Letzte Aenderung JP 04.09.95
|*
|*************************************************************************/
@@ -484,7 +480,7 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
((SwFmt*)pMod)->SetFmtAttr( aDfltDesc );
else
{
- ASSERT( !this, "was ist das fuer ein Mofify-Obj?" );
+ OSL_ENSURE( !this, "was ist das fuer ein Mofify-Obj?" );
aPageDescs[0]->Add( pLast );
}
}
@@ -532,7 +528,6 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
}
}
-// #116530#
void SwDoc::BroadcastStyleOperation(String rName, SfxStyleFamily eFamily,
sal_uInt16 nOp)
{
@@ -553,18 +548,16 @@ void SwDoc::BroadcastStyleOperation(String rName, SfxStyleFamily eFamily,
void SwDoc::DelPageDesc( sal_uInt16 i, sal_Bool bBroadcast )
{
- ASSERT( i < aPageDescs.Count(), "PageDescs ueberindiziert." );
- ASSERT( i != 0, "Default Pagedesc loeschen is nicht." );
+ OSL_ENSURE( i < aPageDescs.Count(), "PageDescs ueberindiziert." );
+ OSL_ENSURE( i != 0, "Default Pagedesc loeschen is nicht." );
if ( i == 0 )
return;
SwPageDesc *pDel = aPageDescs[i];
- // -> #116530#
if (bBroadcast)
BroadcastStyleOperation(pDel->GetName(), SFX_STYLE_FAMILY_PAGE,
SFX_STYLESHEET_ERASED);
- // <- #116530#
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -585,9 +578,6 @@ void SwDoc::DelPageDesc( sal_uInt16 i, sal_Bool bBroadcast )
|*
|* SwDoc::MakePageDesc()
|*
-|* Ersterstellung MA 25. Jan. 93
-|* Letzte Aenderung MA 20. Aug. 93
-|*
|*************************************************************************/
sal_uInt16 SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy,
@@ -620,11 +610,9 @@ sal_uInt16 SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy,
}
aPageDescs.Insert( pNew, aPageDescs.Count() );
- // -> #116530#
if (bBroadcast)
BroadcastStyleOperation(rName, SFX_STYLE_FAMILY_PAGE,
SFX_STYLESHEET_CREATED);
- // <- #116530#
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -655,8 +643,6 @@ SwPageDesc* SwDoc::FindPageDescByName( const String& rName, sal_uInt16* pPos ) c
/******************************************************************************
* Methode : void SwDoc::PrtDataChanged()
* Beschreibung:
- * Erstellt : OK 27.10.94 10:20
- * Aenderung : MA 26. Mar. 98
******************************************************************************/
void SwDoc::PrtDataChanged()
@@ -664,8 +650,8 @@ void SwDoc::PrtDataChanged()
//!!!!!!!! Bei Aenderungen hier bitte ggf. InJobSetup im Sw3io mitpflegen
// --> FME 2005-01-21 #i41075#
- ASSERT( get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) ||
- 0 != getPrinter( sal_False ), "PrtDataChanged will be called recursive!" )
+ OSL_ENSURE( get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) ||
+ 0 != getPrinter( sal_False ), "PrtDataChanged will be called recursive!" );
// <--
SwWait *pWait = 0;
@@ -825,19 +811,6 @@ void SwDoc::PrtOLENotify( sal_Bool bAll )
//Wenn es keine Benachrichtigung wuenscht
if ( xObj.is() )
{
- //TODO/LATER: needs MiscStatus for ResizeOnPrinterChange
- /*
- if ( SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE & xRef->GetMiscStatus())
- {
- if ( pOLENd->GetFrm() )
- {
- xObj->OnDocumentPrinterChanged( pPrt );
- pShell->CalcAndSetScale( xObj );//Client erzeugen lassen.
- }
- else
- pOLENd->SetOLESizeInvalid( sal_True );
- }
- else */
pGlobalOLEExcludeList->Insert(
new SvGlobalName( aName ),
pGlobalOLEExcludeList->Count() );
@@ -888,20 +861,6 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, )
//Wenn es keine Benachrichtigung wuenscht
if( pOLENd->GetOLEObj().GetOleRef().is() ) //Kaputt?
{
- //TODO/LATER: needs MiscStatus for ResizeOnPrinterChange
- /*
- if( SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE &
- xRef->GetMiscStatus() )
- {
- if( pOLENd->GetFrm() )
- {
- xRef->OnDocumentPrinterChanged( pPrt );
- pSh->CalcAndSetScale( xRef );//Client erzeugen lassen.
- }
- else
- pOLENd->SetOLESizeInvalid( sal_True );
- }*/
- // repaint it
pOLENd->Modify( &aMsgHint, &aMsgHint );
}
}
@@ -941,12 +900,12 @@ SwPageDesc * SwDoc::GetPageDesc( const String & rName )
return aResult;
}
-void SwDoc::DelPageDesc( const String & rName, sal_Bool bBroadcast ) // #116530#
+void SwDoc::DelPageDesc( const String & rName, sal_Bool bBroadcast )
{
sal_uInt16 nI;
if (FindPageDesc(rName, &nI))
- DelPageDesc(nI, bBroadcast); // #116530#
+ DelPageDesc(nI, bBroadcast);
}
void SwDoc::ChgPageDesc( const String & rName, const SwPageDesc & rDesc)
@@ -1016,3 +975,5 @@ sal_Bool SwDoc::IsSquaredPageMode() const
(const SwTextGridItem&)GetDefault( RES_TEXTGRID );
return rGrid.IsSquaredMode();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 91d99221e1fd..6c4fb754e305 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,20 +67,15 @@
#include <svx/svdetc.hxx>
#include <editeng/fhgtitem.hxx>
-// OD 26.06.2003 #108784#
#include <svx/svdpagv.hxx>
-// OD 2004-04-01 #i26791#
-#include <dcontact.hxx>
+
#include <txtfrm.hxx>
-#include <frmfmt.hxx>
#include <editeng/frmdiritem.hxx>
#include <fmtornt.hxx>
-// --> OD 2006-03-14 #i62875#
+
#include <svx/svditer.hxx>
-// <--
-// --> OD 2006-11-01 #130889#
+
#include <vector>
-// <--
using namespace ::com::sun::star;
using namespace ::com::sun::star::linguistic2;
@@ -91,11 +87,8 @@ SV_IMPL_VARARR_SORT( _ZSortFlys, _ZSortFly )
|*
|* SwDoc::GroupSelection / SwDoc::UnGroupSelection
|*
-|* Ersterstellung JP 21.08.95
-|* Letzte Aenderung JP 21.08.95
-|*
|*************************************************************************/
-// OD 2004-04-01 #i26791# - local method to determine positioning and
+// local method to determine positioning and
// alignment attributes for a drawing object, which is newly connected to
// the layout. Used for a newly formed group object <SwDoc::GroupSelection(..)>
// and the members of a destroyed group <SwDoc::UnGroupSelection(..)>
@@ -103,35 +96,32 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt,
const SdrObject& _rSdrObj )
{
const SwContact* pContact = GetUserCall( &_rSdrObj );
- ASSERT( pContact, "<lcl_AdjustPositioningAttr(..)> - missing contact object." );
+ OSL_ENSURE( pContact, "<lcl_AdjustPositioningAttr(..)> - missing contact object." );
// determine position of new group object relative to its anchor frame position
SwTwips nHoriRelPos = 0;
SwTwips nVertRelPos = 0;
{
const SwFrm* pAnchorFrm = pContact->GetAnchoredObj( &_rSdrObj )->GetAnchorFrm();
- ASSERT( !pAnchorFrm ||
+ OSL_ENSURE( !pAnchorFrm ||
!pAnchorFrm->IsTxtFrm() ||
!static_cast<const SwTxtFrm*>(pAnchorFrm)->IsFollow(),
"<lcl_AdjustPositioningAttr(..)> - anchor frame is a follow. Please inform OD." );
bool bVert = false;
bool bR2L = false;
- // --> OD 2005-05-10 #i45952# - use anchor position of
- // anchor frame, if it exist.
+ // #i45952# - use anchor position of anchor frame, if it exist.
Point aAnchorPos;
if ( pAnchorFrm )
{
- // --> OD 2005-05-10 #i45952#
+ // #i45952#
aAnchorPos = pAnchorFrm->GetFrmAnchorPos( ::HasWrap( &_rSdrObj ) );
- // <--
bVert = pAnchorFrm->IsVertical();
bR2L = pAnchorFrm->IsRightToLeft();
}
else
{
- // --> OD 2005-05-10 #i45952#
+ // #i45952#
aAnchorPos = _rSdrObj.GetAnchorPos();
- // <--
// If no anchor frame exist - e.g. because no layout exists - the
// default layout direction is taken.
const SvxFrameDirectionItem* pDirItem =
@@ -143,9 +133,8 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt,
// vertical from left-to-right - Badaa: supported now!
bVert = true;
bR2L = true;
- //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
- //ASSERT( false, "<lcl_AdjustPositioningAttr(..)> - vertical from left-to-right not supported." );
- //End
+ OSL_ENSURE( false,
+ "<lcl_AdjustPositioningAttr(..)> - vertical from left-to-right not supported." );
}
break;
case FRMDIR_VERT_TOP_RIGHT:
@@ -202,10 +191,9 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt,
_pFrmFmt->SetFmtAttr( SwFmtHoriOrient( nHoriRelPos, text::HoriOrientation::NONE, text::RelOrientation::FRAME ) );
_pFrmFmt->SetFmtAttr( SwFmtVertOrient( nVertRelPos, text::VertOrientation::NONE, text::RelOrientation::FRAME ) );
- // --> OD 2005-03-11 #i44334#, #i44681# - positioning attributes already set
+ // #i44334#, #i44681# - positioning attributes already set
_pFrmFmt->PosAttrSet();
- // <--
- // --> OD 2004-10-01 #i34750# - keep current object rectangle for drawing
+ // #i34750# - keep current object rectangle for drawing
// objects. The object rectangle is used on events from the drawing layer
// to adjust the positioning attributes - see <SwDrawContact::_Changed(..)>.
{
@@ -219,13 +207,12 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt,
->SetLastObjRect( aObjRect.SVRect() );
}
}
- // <--
}
SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
{
- // OD 30.06.2003 #108784# - replace marked 'virtual' drawing objects by
- // the corresponding 'master' drawing objects.
+ // replace marked 'virtual' drawing objects by the corresponding 'master'
+ // drawing objects.
SwDrawView::ReplaceMarkedDrawVirtObjs( rDrawView );
const SdrMarkList &rMrkList = rDrawView.GetMarkedObjectList();
@@ -243,28 +230,26 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
? 0
: new SwUndoDrawGroup( (sal_uInt16)rMrkList.GetMarkCount() );
- // --> OD 2005-08-16 #i53320#
+ // #i53320#
bool bGroupMembersNotPositioned( false );
{
SwAnchoredDrawObject* pAnchoredDrawObj =
static_cast<SwAnchoredDrawObject*>(pMyContact->GetAnchoredObj( pObj ));
bGroupMembersNotPositioned = pAnchoredDrawObj->NotYetPositioned();
}
- // <--
//ContactObjekte und Formate vernichten.
for( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
- // --> OD 2005-08-16 #i53320#
-#ifdef DBG_UTIL
+ // #i53320#
+#if OSL_DEBUG_LEVEL > 1
SwAnchoredDrawObject* pAnchoredDrawObj =
static_cast<SwAnchoredDrawObject*>(pContact->GetAnchoredObj( pObj ));
- ASSERT( bGroupMembersNotPositioned == pAnchoredDrawObj->NotYetPositioned(),
+ OSL_ENSURE( bGroupMembersNotPositioned == pAnchoredDrawObj->NotYetPositioned(),
"<SwDoc::GroupSelection(..)> - group members have different positioning status!" );
#endif
- // <--
pFmt = (SwDrawFrmFmt*)pContact->GetFmt();
//loescht sich selbst!
@@ -276,41 +261,37 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
else
DelFrmFmt( pFmt );
- // --> OD 2005-05-10 #i45952# - re-introduce position
- // normalization of group member objects, because its anchor position
- // is cleared, when they are grouped.
+ // #i45952# - re-introduce position normalization of group member
+ // objects, because its anchor position is cleared, when they are
+ // grouped.
Point aAnchorPos( pObj->GetAnchorPos() );
pObj->NbcSetAnchorPos( Point( 0, 0 ) );
pObj->NbcMove( Size( aAnchorPos.X(), aAnchorPos.Y() ) );
- // <--
}
pFmt = MakeDrawFrmFmt( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "DrawObject" )),
GetDfltFrmFmt() );
pFmt->SetFmtAttr( aAnch );
- // --> OD 2004-10-25 #i36010# - set layout direction of the position
+ // #i36010# - set layout direction of the position
pFmt->SetPositionLayoutDir(
text::PositionLayoutDir::PositionInLayoutDirOfAnchor );
- // <--
rDrawView.GroupMarked();
- ASSERT( rMrkList.GetMarkCount() == 1, "GroupMarked more or none groups." );
+ OSL_ENSURE( rMrkList.GetMarkCount() == 1, "GroupMarked more or none groups." );
SdrObject* pNewGroupObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
pNewContact = new SwDrawContact( pFmt, pNewGroupObj );
- // --> OD 2004-11-22 #i35635#
+ // #i35635#
pNewContact->MoveObjToVisibleLayer( pNewGroupObj );
- // <--
pNewContact->ConnectToLayout();
- // --> OD 2005-08-16 #i53320# - No adjustment of the positioning and
- // alignment attributes, if group members aren't positioned yet.
+ // #i53320# - No adjustment of the positioning and alignment
+ // attributes, if group members aren't positioned yet.
if ( !bGroupMembersNotPositioned )
{
- // OD 2004-04-01 #i26791# - Adjust positioning and alignment attributes.
+ // #i26791# - Adjust positioning and alignment attributes.
lcl_AdjustPositioningAttr( pFmt, *pNewGroupObj );
}
- // <--
if( pUndo )
{
@@ -326,7 +307,7 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
}
rDrawView.GroupMarked();
- ASSERT( rMrkList.GetMarkCount() == 1, "GroupMarked more or none groups." );
+ OSL_ENSURE( rMrkList.GetMarkCount() == 1, "GroupMarked more or none groups." );
}
return pNewContact;
@@ -341,20 +322,16 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
GetIDocumentUndoRedo().ClearRedo();
}
- // OD 30.06.2003 #108784# - replace marked 'virtual' drawing objects by
- // the corresponding 'master' drawing objects.
+ // replace marked 'virtual' drawing objects by the corresponding 'master'
+ // drawing objects.
SwDrawView::ReplaceMarkedDrawVirtObjs( rDrawView );
const SdrMarkList &rMrkList = rDrawView.GetMarkedObjectList();
- // --> OD 2006-11-01 #130889#
std::vector< std::pair< SwDrawFrmFmt*, SdrObject* > >* pFmtsAndObjs( 0L );
const sal_uInt32 nMarkCount( rMrkList.GetMarkCount() );
- // <--
if ( nMarkCount )
{
- // --> OD 2006-11-01 #130889#
pFmtsAndObjs = new std::vector< std::pair< SwDrawFrmFmt*, SdrObject* > >[nMarkCount];
- // <--
SdrObject *pMyObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
if( !pMyObj->GetUpGroup() )
{
@@ -382,24 +359,10 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
SwDrawFrmFmt *pFmt = MakeDrawFrmFmt( sDrwFmtNm,
GetDfltFrmFmt() );
pFmt->SetFmtAttr( aAnch );
- // --> OD 2004-10-25 #i36010# - set layout direction of the position
+ // #i36010# - set layout direction of the position
pFmt->SetPositionLayoutDir(
text::PositionLayoutDir::PositionInLayoutDirOfAnchor );
- // <--
- // --> OD 2006-11-01 #130889#
- // creation of <SwDrawContact> instances for the group
- // members and its connection to the Writer layout is
- // done after intrinsic ungrouping.
-// SwDrawContact* pContact = new SwDrawContact( pFmt, pSubObj );
-// // --> OD 2004-11-22 #i35635#
-// pContact->MoveObjToVisibleLayer( pSubObj );
-// // <--
-// pContact->ConnectToLayout();
-// // OD 2004-04-07 #i26791# - Adjust positioning and
-// // alignment attributes.
-// lcl_AdjustPositioningAttr( pFmt, *pSubObj );
pFmtsAndObjs[i].push_back( std::pair< SwDrawFrmFmt*, SdrObject* >( pFmt, pSubObj ) );
- // <--
if( bUndo )
pUndo->AddObj( i2, pFmt );
@@ -409,7 +372,6 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
}
}
rDrawView.UnGroupMarked();
- // --> OD 2006-11-01 #130889#
// creation of <SwDrawContact> instances for the former group members and
// its connection to the Writer layout.
for ( sal_uInt32 i = 0; i < nMarkCount; ++i )
@@ -439,16 +401,12 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
}
}
delete [] pFmtsAndObjs;
- // <--
}
/*************************************************************************
|*
|* SwDoc::DeleteSelection()
|*
-|* Ersterstellung MA 14. Nov. 95
-|* Letzte Aenderung MA 14. Nov. 95
-|*
|*************************************************************************/
sal_Bool SwDoc::DeleteSelection( SwDrawView& rDrawView )
@@ -512,13 +470,13 @@ sal_Bool SwDoc::DeleteSelection( SwDrawView& rDrawView )
if( pContact ) // natuerlich nicht bei gruppierten Objekten
{
SwDrawFrmFmt *pFmt = (SwDrawFrmFmt*)pContact->GetFmt();
- // OD 18.06.2003 #108784# - before delete of selection
- // is performed, marked <SwDrawVirtObj>-objects have to
- // be replaced by its reference objects.
- // Thus, assert, if a <SwDrawVirt>-object is found in the mark list.
+ // before delete of selection is performed, marked
+ // <SwDrawVirtObj>-objects have to be replaced by its
+ // reference objects. Thus, assert, if a
+ // <SwDrawVirt>-object is found in the mark list.
if ( pObj->ISA(SwDrawVirtObj) )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDrawVirtObj> is still marked for delete. application will crash!" );
}
//loescht sich selbst!
@@ -551,9 +509,6 @@ sal_Bool SwDoc::DeleteSelection( SwDrawView& rDrawView )
|*
|* SwDoc::DeleteSelection()
|*
-|* Ersterstellung JP 11.01.96
-|* Letzte Aenderung JP 11.01.96
-|*
|*************************************************************************/
_ZSortFly::_ZSortFly( const SwFrmFmt* pFrmFmt, const SwFmtAnchor* pFlyAn,
@@ -587,7 +542,7 @@ _ZSortFly::_ZSortFly( const SwFrmFmt* pFrmFmt, const SwFmtAnchor* pFlyAn,
nOrdNum = ((SwDrawContact*)aIter())->GetMaster()->GetOrdNum();
}
else {
- ASSERT( !this, "was ist das fuer ein Format?" );
+ OSL_ENSURE( !this, "was ist das fuer ein Format?" );
}
}
@@ -596,7 +551,6 @@ _ZSortFly::_ZSortFly( const SwFrmFmt* pFrmFmt, const SwFmtAnchor* pFlyAn,
// des Drawing Layers auftrat. In diesem Fall wird der Layer komplett
// neu aufgebaut.
-// #75371#
#include <svx/sxenditm.hxx>
void SwDoc::InitDrawModel()
@@ -611,11 +565,9 @@ void SwDoc::InitDrawModel()
//DrawPool und EditEnginePool anlegen, diese gehoeren uns und werden
//dem Drawing nur mitgegeben. Im ReleaseDrawModel werden die Pools wieder
//zerstoert.
- // 17.2.99: for Bug 73110 - for loading the drawing items. This must
- // be loaded without RefCounts!
+ // for loading the drawing items. This must be loaded without RefCounts!
SfxItemPool *pSdrPool = new SdrItemPool( &GetAttrPool() );
- // #75371# change DefaultItems for the SdrEdgeObj distance items
- // to TWIPS.
+ // change DefaultItems for the SdrEdgeObj distance items to TWIPS.
if(pSdrPool)
{
const long nDefEdgeDist = ((500 * 72) / 127); // 1/100th mm in twips
@@ -636,7 +588,7 @@ void SwDoc::InitDrawModel()
else
pSdrPool->FreezeIdRanges();
- // SJ: #95129# set FontHeight pool defaults without changing static SdrEngineDefaults
+ // set FontHeight pool defaults without changing static SdrEngineDefaults
GetAttrPool().SetPoolDefaultItem(SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT ));
RTL_LOGFILE_CONTEXT_TRACE( aLog, "before create DrawDocument" );
@@ -656,8 +608,7 @@ void SwDoc::InitDrawModel()
sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("Controls" ));
nControls = pDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID();
- // OD 25.06.2003 #108784# - add invisible layers corresponding to the
- // visible ones.
+ // add invisible layers corresponding to the visible ones.
{
sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("InvisibleHell" ));
nInvisibleHell = pDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID();
@@ -701,12 +652,7 @@ void SwDoc::InitDrawModel()
}
}
-/** method to notify drawing page view about the invisible layers
-
- OD 26.06.2003 #108784#
-
- @author OD
-*/
+/** method to notify drawing page view about the invisible layers */
void SwDoc::NotifyInvisibleLayers( SdrPageView& _rSdrPageView )
{
String sLayerNm;
@@ -722,10 +668,7 @@ void SwDoc::NotifyInvisibleLayers( SdrPageView& _rSdrPageView )
/** method to determine, if a layer ID belongs to the visible ones.
- OD 25.06.2003 #108784#
Note: If given layer ID is unknown, method asserts and returns <false>.
-
- @author OD
*/
bool SwDoc::IsVisibleLayerId( const SdrLayerID& _nLayerId ) const
{
@@ -745,7 +688,7 @@ bool SwDoc::IsVisibleLayerId( const SdrLayerID& _nLayerId ) const
}
else
{
- ASSERT( false, "<SwDoc::IsVisibleLayerId(..)> - unknown layer ID." );
+ OSL_ENSURE( false, "<SwDoc::IsVisibleLayerId(..)> - unknown layer ID." );
bRetVal = false;
}
@@ -754,11 +697,8 @@ bool SwDoc::IsVisibleLayerId( const SdrLayerID& _nLayerId ) const
/** method to determine, if the corresponding visible layer ID for a invisible one.
- OD 25.06.2003 #108784#
Note: If given layer ID is a visible one, method returns given layer ID.
Note: If given layer ID is unknown, method returns given layer ID.
-
- @author OD
*/
SdrLayerID SwDoc::GetVisibleLayerIdByInvisibleOne( const SdrLayerID& _nInvisibleLayerId )
{
@@ -780,12 +720,12 @@ SdrLayerID SwDoc::GetVisibleLayerIdByInvisibleOne( const SdrLayerID& _nInvisible
_nInvisibleLayerId == GetHellId() ||
_nInvisibleLayerId == GetControlsId() )
{
- ASSERT( false, "<SwDoc::GetVisibleLayerIdByInvisibleOne(..)> - given layer ID already an invisible one." );
+ OSL_ENSURE( false, "<SwDoc::GetVisibleLayerIdByInvisibleOne(..)> - given layer ID already an invisible one." );
nVisibleLayerId = _nInvisibleLayerId;
}
else
{
- ASSERT( false, "<SwDoc::GetVisibleLayerIdByInvisibleOne(..)> - given layer ID is unknown." );
+ OSL_ENSURE( false, "<SwDoc::GetVisibleLayerIdByInvisibleOne(..)> - given layer ID is unknown." );
nVisibleLayerId = _nInvisibleLayerId;
}
@@ -794,11 +734,8 @@ SdrLayerID SwDoc::GetVisibleLayerIdByInvisibleOne( const SdrLayerID& _nInvisible
/** method to determine, if the corresponding invisible layer ID for a visible one.
- OD 25.06.2003 #108784#
Note: If given layer ID is a invisible one, method returns given layer ID.
Note: If given layer ID is unknown, method returns given layer ID.
-
- @author OD
*/
SdrLayerID SwDoc::GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLayerId )
{
@@ -820,12 +757,12 @@ SdrLayerID SwDoc::GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLa
_nVisibleLayerId == GetInvisibleHellId() ||
_nVisibleLayerId == GetInvisibleControlsId() )
{
- ASSERT( false, "<SwDoc::GetInvisibleLayerIdByVisibleOne(..)> - given layer ID already an invisible one." );
+ OSL_ENSURE( false, "<SwDoc::GetInvisibleLayerIdByVisibleOne(..)> - given layer ID already an invisible one." );
nInvisibleLayerId = _nVisibleLayerId;
}
else
{
- ASSERT( false, "<SwDoc::GetInvisibleLayerIdByVisibleOne(..)> - given layer ID is unknown." );
+ OSL_ENSURE( false, "<SwDoc::GetInvisibleLayerIdByVisibleOne(..)> - given layer ID is unknown." );
nInvisibleLayerId = _nVisibleLayerId;
}
@@ -844,9 +781,9 @@ void SwDoc::ReleaseDrawModel()
delete pDrawModel; pDrawModel = 0;
SfxItemPool *pSdrPool = GetAttrPool().GetSecondaryPool();
- ASSERT( pSdrPool, "missing Pool" );
+ OSL_ENSURE( pSdrPool, "missing Pool" );
SfxItemPool *pEEgPool = pSdrPool->GetSecondaryPool();
- ASSERT( !pEEgPool->GetSecondaryPool(), "i don't accept additional pools");
+ OSL_ENSURE( !pEEgPool->GetSecondaryPool(), "i don't accept additional pools");
pSdrPool->Delete(); //Erst die Items vernichten lassen,
//dann erst die Verkettung loesen
GetAttrPool().SetSecondaryPool( 0 ); //Der ist ein muss!
@@ -861,7 +798,7 @@ void SwDoc::ReleaseDrawModel()
SdrModel* SwDoc::_MakeDrawModel()
{
- ASSERT( !pDrawModel, "_MakeDrawModel: Why?" );
+ OSL_ENSURE( !pDrawModel, "_MakeDrawModel: Why?" );
InitDrawModel();
if ( pLayout && pLayout->GetCurrShell() )
{
@@ -979,7 +916,7 @@ IMPL_LINK(SwDoc, CalcFieldValueHdl, EditFieldInfo*, pInfo)
}
else
{
- DBG_ERROR("unbekannter Feldbefehl");
+ OSL_FAIL("unbekannter Feldbefehl");
pInfo->SetRepresentation( String( '?' ) );
}
}
@@ -999,7 +936,7 @@ SdrLayerID SwDoc::GetInvisibleHellId() const { return nInvisibleHell; }
SdrLayerID SwDoc::GetInvisibleControlsId() const { return nInvisibleControls; }
SdrModel* SwDoc::GetOrCreateDrawModel() { return GetDrawModel() ? GetDrawModel() : _MakeDrawModel(); }
-// --> OD 2006-03-14 #i62875#
+// #i62875#
namespace docfunc
{
bool ExistsDrawObjs( SwDoc& p_rDoc )
@@ -1054,7 +991,7 @@ namespace docfunc
{
if ( !pAnchoredDrawObj )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<docfunc::AllDrawObjsOnPage() - missing anchored draw object" );
bAllDrawObjsOnPage = false;
break;
@@ -1089,5 +1026,5 @@ namespace docfunc
return bAllDrawObjsOnPage;
}
}
-// <--
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 6e5c259a9d04..ba43772dcaa0 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,7 +73,6 @@
#include <UndoDelete.hxx>
#include <breakit.hxx>
#include <hhcwrp.hxx>
-#include <breakit.hxx>
#include <vcl/msgbox.hxx>
#include "comcore.hrc"
#include "editsh.hxx"
@@ -86,7 +86,6 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::linguistic2;
using namespace ::com::sun::star::i18n;
-//using namespace ::utl;
#ifndef S2U
#define S2U(rString) OUString::createFromAscii(rString)
#endif
@@ -190,8 +189,6 @@ void lcl_SkipAttr( const SwTxtNode *pNode, SwIndex &rIdx, xub_StrLen &rStart )
}
}
-// -----------------------------------------------------------------
-
void _RestFlyInRange( _SaveFlyArr & rArr, const SwNodeIndex& rSttIdx,
const SwNodeIndex* pInsertPos )
{
@@ -291,7 +288,6 @@ void _SaveFlyInRange( const SwPaM& rPam, const SwNodeIndex& rInsPos,
SwFmtAnchor aAnchor( *pAnchor );
aAnchor.SetAnchor( &aPos );
pFmt->SetFmtAttr( aAnchor );
-// ((SwFmtAnchor*)pAnchor)->SetAnchor( &aPos );
}
}
else if( ( rSttNdIdx.GetIndex() + nSttOff <= pAPos->nNode.GetIndex()
@@ -309,11 +305,8 @@ void _SaveFlyInRange( const SwPaM& rPam, const SwNodeIndex& rInsPos,
}
}
-// -----------------------------------------------------------------
-
// loesche und verschiebe alle "Fly's am Absatz", die in der SSelection
// liegen. Steht am SPoint ein Fly, wird dieser auf den Mark verschoben.
-
void DelFlyInRange( const SwNodeIndex& rMkNdIdx,
const SwNodeIndex& rPtNdIdx )
{
@@ -360,17 +353,14 @@ void DelFlyInRange( const SwNodeIndex& rMkNdIdx,
pDoc->DelLayoutFmt( pFmt );
- // --> FME 2004-10-06 #117913# DelLayoutFmt can also
- // trigger the deletion of objects.
+ // DelLayoutFmt can also trigger the deletion of objects.
if( i > rTbl.Count() )
i = rTbl.Count();
- // <--
}
}
}
}
-
bool lcl_SaveFtn( const SwNodeIndex& rSttNd, const SwNodeIndex& rEndNd,
const SwNodeIndex& rInsPos,
SwFtnIdxs& rFtnArr, SwFtnIdxs& rSaveArr,
@@ -569,7 +559,6 @@ void lcl_RestoreRedlines( SwDoc* pDoc, const SwPosition& rPos, _SaveRedlines& rA
pDoc->SetRedlineMode_intern( eOld );
}
-
void lcl_SaveRedlines( const SwNodeRange& rRg, _SaveRedlines& rArr )
{
SwDoc* pDoc = rRg.aStart.GetNode().GetDoc();
@@ -605,7 +594,6 @@ void lcl_SaveRedlines( const SwNodeRange& rRg, _SaveRedlines& rArr )
pTmpPos->nNode.GetNode().GetCntntNode(), 0 );
_SaveRedline* pSave = new _SaveRedline( pNewRedl, rRg.aStart );
-// rArr.Insert( pSave, rArr.Count() );
rArr.C40_INSERT( _SaveRedline, pSave, rArr.Count() );
pTmpPos = pTmp->End();
@@ -629,7 +617,6 @@ void lcl_SaveRedlines( const SwNodeRange& rRg, _SaveRedlines& rArr )
{
// gesamt verschieben
_SaveRedline* pSave = new _SaveRedline( pTmp, rRg.aStart );
-// rArr.Insert( pSave, rArr.Count() );
rArr.C40_INSERT( _SaveRedline, pSave, rArr.Count() );
}
else
@@ -642,7 +629,6 @@ void lcl_SaveRedlines( const SwNodeRange& rRg, _SaveRedlines& rArr )
pTmpPos->nNode.GetNode().GetCntntNode(), 0 );
_SaveRedline* pSave = new _SaveRedline( pNewRedl, rRg.aStart );
-// rArr.Insert( pSave, rArr.Count() );
rArr.C40_INSERT( _SaveRedline, pSave, rArr.Count() );
pTmpPos = pTmp->Start();
@@ -674,12 +660,10 @@ void lcl_RestoreRedlines( SwDoc* pDoc, sal_uInt32 nInsPos, _SaveRedlines& rArr )
pDoc->SetRedlineMode_intern( eOld );
}
-// ------------------------------------------------------------------------
// #i59534: Redo of insertion of multiple text nodes runs into trouble
// because of unnecessary expanded redlines
// From now on this class saves the redline positions of all redlines which ends exact at the
// insert position (node _and_ content index)
-
_SaveRedlEndPosForRestore::_SaveRedlEndPosForRestore( const SwNodeIndex& rInsIdx, xub_StrLen nCnt )
: pSavArr( 0 ), pSavIdx( 0 ), nSavCntnt( nCnt )
{
@@ -728,14 +712,11 @@ void _SaveRedlEndPosForRestore::_Restore()
}
}
-
-// ------------------------------------------------------------------------
-
// Loeschen einer vollstaendigen Section des NodesArray.
// Der uebergebene Node steht irgendwo in der gewuenschten Section
void SwDoc::DeleteSection( SwNode *pNode )
{
- ASSERT( pNode, "Kein Node uebergeben." );
+ OSL_ENSURE( pNode, "Kein Node uebergeben." );
SwStartNode* pSttNd = pNode->IsStartNode() ? (SwStartNode*)pNode
: pNode->StartOfSectionNode();
SwNodeIndex aSttIdx( *pSttNd ), aEndIdx( *pNode->EndOfSectionNode() );
@@ -754,7 +735,6 @@ void SwDoc::DeleteSection( SwNode *pNode )
GetNodes().DelNodes( aSttIdx, aEndIdx.GetIndex() - aSttIdx.GetIndex() + 1 );
}
-
void SwDoc::SetModified(SwPaM &rPaM)
{
SwDataChanged aTmp( rPaM, 0 );
@@ -764,7 +744,6 @@ void SwDoc::SetModified(SwPaM &rPaM)
/*************************************************************************
* SwDoc::Overwrite()
************************************************************************/
-
bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr )
{
SwPosition& rPt = *(SwPosition*)rRg.GetPoint();
@@ -873,7 +852,6 @@ bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr )
return sal_True;
}
-
bool SwDoc::MoveAndJoin( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
{
SwNodeIndex aIdx( rPaM.Start()->nNode );
@@ -1031,7 +1009,7 @@ bool SwDoc::MoveRange( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
else
rPaM.DeleteMark();
- ASSERT( *aSavePam.GetMark() == rPos ||
+ OSL_ENSURE( *aSavePam.GetMark() == rPos ||
( aSavePam.GetMark()->nNode.GetNode().GetCntntNode() == NULL ),
"PaM wurde nicht verschoben, am Anfang/Ende keine ContentNodes?" );
*aSavePam.GetMark() = rPos;
@@ -1073,7 +1051,6 @@ bool SwDoc::MoveRange( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
}
bJoin = sal_False;
}
-// else if( !bCorrSavePam && !pSavePam->Move( fnMoveForward, fnGoCntnt ))
else if ( !aSavePam.Move( fnMoveForward, fnGoCntnt ) )
{
aSavePam.GetPoint()->nNode++;
@@ -1092,11 +1069,9 @@ bool SwDoc::MoveRange( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
{
if( pTNd->CanJoinNext())
{
- // --> OD 2009-08-20 #i100466#
// Always join next, because <pTNd> has to stay as it is.
// A join previous from its next would more or less delete <pTNd>
pTNd->JoinNext();
- // <--
bRemove = false;
}
}
@@ -1285,8 +1260,7 @@ bool SwDoc::MoveNodeRange( SwNodeRange& rRange, SwNodeIndex& rPos,
return sal_True;
}
-/* #107318# Convert list of ranges of whichIds to a corresponding list
- of whichIds*/
+// Convert list of ranges of whichIds to a corresponding list of whichIds
SvUShorts * lcl_RangesToUShorts(sal_uInt16 * pRanges)
{
SvUShorts * pResult = new SvUShorts();
@@ -1294,7 +1268,7 @@ SvUShorts * lcl_RangesToUShorts(sal_uInt16 * pRanges)
int i = 0;
while (pRanges[i] != 0)
{
- ASSERT(pRanges[i+1] != 0, "malformed ranges");
+ OSL_ENSURE(pRanges[i+1] != 0, "malformed ranges");
for (sal_uInt16 j = pRanges[i]; j < pRanges[i+1]; j++)
pResult->Insert(j, pResult->Count());
@@ -1346,7 +1320,7 @@ void lcl_GetJoinFlags( SwPaM& rPam, sal_Bool& rJoinTxt, sal_Bool& rJoinPrev )
if( bExchange )
rPam.Exchange();
rJoinPrev = rPam.GetPoint() == pStt;
- ASSERT( !pStt->nContent.GetIndex() &&
+ OSL_ENSURE( !pStt->nContent.GetIndex() &&
pEndNd->GetTxt().Len() != pEnd->nContent.GetIndex()
? rPam.GetPoint()->nNode < rPam.GetMark()->nNode
: rPam.GetPoint()->nNode > rPam.GetMark()->nNode,
@@ -1444,7 +1418,7 @@ void lcl_JoinText( SwPaM& rPam, sal_Bool bJoinPrev )
pDelNd->FmtToTxtAttr( pTxtNd );
else
{
- /* #107318# This case was missed:
+ /* This case was missed:
<something></something> <-- pTxtNd
<other>ccc</other> <-- pDelNd
@@ -1470,8 +1444,7 @@ void lcl_JoinText( SwPaM& rPam, sal_Bool bJoinPrev )
}
pDoc->CorrRel( aIdx, *rPam.GetPoint(), 0, sal_True );
- // --> OD 2009-08-20 #i100466#
- // adjust given <rPam>, if it does not belong to the cursors
+ // #i100466# adjust given <rPam>, if it does not belong to the cursors
if ( pDelNd == rPam.GetBound( sal_True ).nContent.GetIdxReg() )
{
rPam.GetBound( sal_True ) = SwPosition( SwNodeIndex( *pTxtNd ), SwIndex( pTxtNd ) );
@@ -1480,7 +1453,6 @@ void lcl_JoinText( SwPaM& rPam, sal_Bool bJoinPrev )
{
rPam.GetBound( sal_False ) = SwPosition( SwNodeIndex( *pTxtNd ), SwIndex( pTxtNd ) );
}
- // <--
pTxtNd->JoinNext();
}
}
@@ -1507,7 +1479,7 @@ lcl_CalcBreaks( ::std::vector<xub_StrLen> & rBreaks, SwPaM const & rPam )
SwTxtAttr const * const pAttr( pTxtNode->GetTxtAttrForCharAt(i) );
if (pAttr && pAttr->GetEnd() && (*pAttr->GetEnd() > nEnd))
{
- ASSERT(pAttr->HasDummyChar(), "GetTxtAttrForCharAt broken?");
+ OSL_ENSURE(pAttr->HasDummyChar(), "GetTxtAttrForCharAt broken?");
rBreaks.push_back(i);
}
}
@@ -1560,10 +1532,9 @@ bool lcl_DoWithBreaks(SwDoc & rDoc, SwPaM & rPam,
return bRet;
}
-
bool SwDoc::DeleteAndJoinWithRedlineImpl( SwPaM & rPam, const bool )
{
- ASSERT( IsRedlineOn(), "DeleteAndJoinWithRedline: redline off" );
+ OSL_ENSURE( IsRedlineOn(), "DeleteAndJoinWithRedline: redline off" );
{
SwUndoRedlineDelete* pUndo = 0;
@@ -1622,12 +1593,12 @@ bool SwDoc::DeleteAndJoinImpl( SwPaM & rPam,
{
sal_Bool bJoinTxt, bJoinPrev;
lcl_GetJoinFlags( rPam, bJoinTxt, bJoinPrev );
- // --> OD 2009-08-20 #i100466#
+ // #i100466#
if ( bForceJoinNext )
{
bJoinPrev = sal_False;
}
- // <--
+
{
bool const bSuccess( DeleteRangeImpl( rPam ) );
if (!bSuccess)
@@ -1841,8 +1812,7 @@ bool SwDoc::DeleteRangeImplImpl(SwPaM & rPam)
return true;
}
-// OD 2009-08-20 #i100466#
-// Add handling of new optional parameter <bForceJoinNext>
+// #i100466# Add handling of new optional parameter <bForceJoinNext>
bool SwDoc::DeleteAndJoin( SwPaM & rPam,
const bool bForceJoinNext )
{
@@ -1886,7 +1856,6 @@ void lcl_syncGrammarError( SwTxtNode &rTxtNode, linguistic2::ProofreadingResult&
rResult.aErrors.realloc( j );
}
-
uno::Any SwDoc::Spell( SwPaM& rPaM,
uno::Reference< XSpellChecker1 > &xSpeller,
sal_uInt16* pPageCnt, sal_uInt16* pPageSt,
@@ -2003,12 +1972,11 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
uno::Reference< text::XFlatParagraph > xFlatPara = new SwXFlatParagraph( *((SwTxtNode*)pNd), aExpandText, pConversionMap );
// get error position of cursor in XFlatParagraph
- sal_Int32 nGrammarErrorPosInText;
linguistic2::ProofreadingResult aResult;
sal_Int32 nGrammarErrors;
do
{
- nGrammarErrorPosInText = ModelToViewHelper::ConvertToViewPosition( pConversionMap, nBeginGrammarCheck );
+ ModelToViewHelper::ConvertToViewPosition( pConversionMap, nBeginGrammarCheck );
aResult = xGCIterator->checkSentenceAtPosition(
xDoc, xFlatPara, aExpandText, lang::Locale(), nBeginGrammarCheck, -1, -1 );
@@ -2103,8 +2071,8 @@ SwHyphArgs::SwHyphArgs( const SwPaM *pPam, const Point &rCrsrPos,
// Folgende Bedingungen muessen eingehalten werden:
// 1) es gibt mindestens eine Selektion
// 2) SPoint() == Start()
- ASSERT( pPam->HasMark(), "SwDoc::Hyphenate: blowing in the wind");
- ASSERT( *pPam->GetPoint() <= *pPam->GetMark(),
+ OSL_ENSURE( pPam->HasMark(), "SwDoc::Hyphenate: blowing in the wind");
+ OSL_ENSURE( *pPam->GetPoint() <= *pPam->GetMark(),
"SwDoc::Hyphenate: New York, New York");
const SwPosition *pPoint = pPam->GetPoint();
@@ -2139,7 +2107,7 @@ void SwHyphArgs::SetPam( SwPaM *pPam ) const
pPam->GetMark()->nNode = nNode;
pPam->GetMark()->nContent.Assign( pNode->GetCntntNode(),
nWordStart + nWordLen );
- ASSERT( nNode == pNode->GetIndex(),
+ OSL_ENSURE( nNode == pNode->GetIndex(),
"SwHyphArgs::SetPam: Pam desaster" );
}
}
@@ -2187,7 +2155,7 @@ uno::Reference< XHyphenatedWord > SwDoc::Hyphenate(
SwPaM *pPam, const Point &rCrsrPos,
sal_uInt16* pPageCnt, sal_uInt16* pPageSt )
{
- ASSERT(this == pPam->GetDoc(), "SwDoc::Hyphenate: strangers in the night");
+ OSL_ENSURE(this == pPam->GetDoc(), "SwDoc::Hyphenate: strangers in the night");
if( *pPam->GetPoint() > *pPam->GetMark() )
pPam->Exchange();
@@ -2200,7 +2168,6 @@ uno::Reference< XHyphenatedWord > SwDoc::Hyphenate(
return aHyphArg.GetHyphWord(); // will be set by lcl_HyphenateNode
}
-
sal_Bool lcl_GetTokenToParaBreak( String& rStr, String& rRet, sal_Bool bRegExpRplc )
{
sal_Bool bRet = sal_False;
@@ -2248,7 +2215,7 @@ bool SwDoc::ReplaceRange( SwPaM& rPam, const String& rStr,
{
aPam.Move(fnMoveBackward);
}
- ASSERT((aPam.GetPoint()->nNode == aPam.GetMark()->nNode), "invalid pam?");
+ OSL_ENSURE((aPam.GetPoint()->nNode == aPam.GetMark()->nNode), "invalid pam?");
lcl_CalcBreaks(Breaks, aPam);
@@ -2274,7 +2241,7 @@ bool SwDoc::ReplaceRange( SwPaM& rPam, const String& rStr,
bool bRet( true );
// iterate from end to start, to avoid invalidating the offsets!
::std::vector<xub_StrLen>::reverse_iterator iter( Breaks.rbegin() );
- ASSERT(aPam.GetPoint() == aPam.End(), "wrong!");
+ OSL_ENSURE(aPam.GetPoint() == aPam.End(), "wrong!");
SwPosition & rEnd( *aPam.End() );
SwPosition & rStart( *aPam.Start() );
@@ -2296,7 +2263,7 @@ bool SwDoc::ReplaceRange( SwPaM& rPam, const String& rStr,
}
rStart = *rPam.Start(); // set to original start
- ASSERT(rEnd.nContent > rStart.nContent, "replace part empty!");
+ OSL_ENSURE(rEnd.nContent > rStart.nContent, "replace part empty!");
if (rEnd.nContent > rStart.nContent) // check if part is empty
{
bRet &= ReplaceRangeImpl(aPam, rStr, bRegExReplace);
@@ -2327,7 +2294,7 @@ bool SwDoc::ReplaceRangeImpl( SwPaM& rPam, const String& rStr,
SwPosition *pStt = (SwPosition*)aDelPam.Start(),
*pEnd = (SwPosition*)aDelPam.End();
- ASSERT( pStt->nNode == pEnd->nNode ||
+ OSL_ENSURE( pStt->nNode == pEnd->nNode ||
( pStt->nNode.GetIndex() + 1 == pEnd->nNode.GetIndex() &&
!pEnd->nContent.GetIndex() ),
"invalid range: Point and Mark on different nodes" );
@@ -2538,8 +2505,8 @@ SetRedlineMode( eOld );
return true;
}
- // speicher die akt. Werte fuer die automatische Aufnahme von Ausnahmen
- // in die Autokorrektur
+// speicher die akt. Werte fuer die automatische Aufnahme von Ausnahmen
+// in die Autokorrektur
void SwDoc::SetAutoCorrExceptWord( SwAutoCorrExceptWord* pNew )
{
if( pACEWord && pNew != pACEWord )
@@ -2573,11 +2540,7 @@ bool SwDoc::DelFullPara( SwPaM& rPam )
if( pTblNd && pNd->IsCntntNode() )
{
SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt();
-//JP 24.08.98: will man wirklich den PageDesc/Break vom
-// nachfolgen Absatz ueberbuegeln?
-// const SwAttrSet& rAttrSet = pTableFmt->GetAttrSet();
-// if( SFX_ITEM_SET != rAttrSet.GetItemState( RES_PAGEDESC ) &&
-// SFX_ITEM_SET != rAttrSet.GetItemState( RES_BREAK ))
+
{
const SfxPoolItem *pItem;
const SfxItemSet* pSet = ((SwCntntNode*)pNd)->GetpSwAttrSet();
@@ -2644,7 +2607,7 @@ bool SwDoc::DelFullPara( SwPaM& rPam )
rPam.Exchange();
if( !rPam.Move( fnMoveBackward, fnGoNode ))
{
- ASSERT( sal_False, "kein Node mehr vorhanden" );
+ OSL_ENSURE( sal_False, "kein Node mehr vorhanden" );
return sal_False;
}
}
@@ -2682,7 +2645,6 @@ bool SwDoc::DelFullPara( SwPaM& rPam )
return sal_True;
}
-
void SwDoc::TransliterateText(
const SwPaM& rPaM,
utl::TransliterationWrapper& rTrans )
@@ -2755,9 +2717,8 @@ void SwDoc::TransliterateText(
SetModified();
}
-
#define MAX_REDLINE_COUNT 250
-// -----------------------------------------------------------------------------
+
void SwDoc::checkRedlining(RedlineMode_t& _rReadlineMode)
{
const SwRedlineTbl& rRedlineTbl = GetRedlineTbl();
@@ -2777,7 +2738,6 @@ void SwDoc::checkRedlining(RedlineMode_t& _rReadlineMode)
}
}
}
-// -----------------------------------------------------------------------------
void SwDoc::CountWords( const SwPaM& rPaM, SwDocStat& rStat ) const
{
@@ -2843,3 +2803,5 @@ void SwDoc::RemoveLeadingWhiteSpace(const SwPosition & rPos )
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 28d41e9e5364..8b246e37b254 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,6 @@
#include <svl/svarray.hxx>
#endif
#include <vcl/svapp.hxx>
-#include <vcl/svapp.hxx>
#include <unotools/charclass.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <doc.hxx>
@@ -81,7 +81,6 @@ extern sal_Bool IsFrameBehind( const SwTxtNode& rMyNd, sal_uInt16 nMySttPos,
SV_IMPL_OP_PTRARR_SORT( _SetGetExpFlds, _SetGetExpFldPtr )
-
/*--------------------------------------------------------------------
Beschreibung: Feldtypen einfuegen
--------------------------------------------------------------------*/
@@ -90,7 +89,6 @@ SV_IMPL_OP_PTRARR_SORT( _SetGetExpFlds, _SetGetExpFldPtr )
* Return immer einen gueltigen Pointer auf den Typ. Wenn er also neu
* zugefuegt oder schon vorhanden ist.
*/
-
SwFieldType* SwDoc::InsertFldType(const SwFieldType &rFldTyp)
{
sal_uInt16 nSize = pFldTypes->Count(),
@@ -176,7 +174,7 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp )
sal_uInt16 nSize = pFldTypes->Count(), nFldWhich = rFldTyp.Which();
sal_uInt16 i = INIT_FLDTYPES;
- ASSERT( RES_SETEXPFLD == nFldWhich ||
+ OSL_ENSURE( RES_SETEXPFLD == nFldWhich ||
RES_USERFLD == nFldWhich ||
RES_DDEFLD == nFldWhich, "Falscher FeldTyp" );
@@ -227,10 +225,9 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp )
/*--------------------------------------------------------------------
Beschreibung: Feldtypen loeschen
--------------------------------------------------------------------*/
-
void SwDoc::RemoveFldType(sal_uInt16 nFld)
{
- ASSERT( INIT_FLDTYPES <= nFld, "keine InitFields loeschen" );
+ OSL_ENSURE( INIT_FLDTYPES <= nFld, "keine InitFields loeschen" );
/*
* Abheangige Felder vorhanden -> ErrRaise
*/
@@ -263,7 +260,7 @@ void SwDoc::RemoveFldType(sal_uInt16 nFld)
if( nWhich )
{
- ASSERT( !pTmp->GetDepends(), "Abhaengige vorh.!" );
+ OSL_ENSURE( !pTmp->GetDepends(), "Abhaengige vorh.!" );
// Feldtype loschen
delete pTmp;
}
@@ -280,7 +277,6 @@ const SwFldTypes* SwDoc::GetFldTypes() const
/*--------------------------------------------------------------------
Beschreibung: Den ersten Typen mit ResId und Namen finden
--------------------------------------------------------------------*/
-
SwFieldType* SwDoc::GetFldType( sal_uInt16 nResId, const String& rName,
bool bDbFieldMatching // used in some UNO calls for RES_DBFLD
// to use different string matching code
@@ -328,7 +324,6 @@ SwFieldType* SwDoc::GetFldType( sal_uInt16 nResId, const String& rName,
return pRet;
}
-
/*************************************************************************
|* SwDoc::UpdateFlds()
|* Beschreibung Felder updaten
@@ -336,7 +331,6 @@ SwFieldType* SwDoc::GetFldType( sal_uInt16 nResId, const String& rName,
/*
* Alle sollen neu evaluiert werden.
*/
-
void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB )
{
// Modify() fuer jeden Feldtypen rufen,
@@ -397,7 +391,6 @@ void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB )
/******************************************************************************
* void SwDoc::UpdateUsrFlds()
******************************************************************************/
-
void SwDoc::UpdateUsrFlds()
{
SwCalc* pCalc = 0;
@@ -420,7 +413,6 @@ void SwDoc::UpdateUsrFlds()
/*--------------------------------------------------------------------
Beschreibung: Referenzfelder und TableFelder erneuern
--------------------------------------------------------------------*/
-
void SwDoc::UpdateRefFlds( SfxPoolItem* pHt )
{
SwFieldType* pFldType;
@@ -431,7 +423,7 @@ void SwDoc::UpdateRefFlds( SfxPoolItem* pHt )
void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
{
- ASSERT( !pHt || RES_TABLEFML_UPDATE == pHt->Which(),
+ OSL_ENSURE( !pHt || RES_TABLEFML_UPDATE == pHt->Which(),
"Was ist das fuer ein MessageItem?" );
SwFieldType* pFldType(0);
@@ -593,11 +585,11 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
{
if( aPara.CalcWithStackOverflow() )
pFld->CalcField( aPara );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
{
// mind. ein ASSERT
- ASSERT( !this, "die Kettenformel konnte nicht errechnet werden" );
+ OSL_ENSURE( !this, "die Kettenformel konnte nicht errechnet werden" );
}
#endif
}
@@ -662,11 +654,11 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
{
if( aPara.CalcWithStackOverflow() )
pFml->Calc( aPara, nValue );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
{
// mind. ein ASSERT
- ASSERT( !this, "die Kettenformel konnte nicht errechnet werden" );
+ OSL_ENSURE( !this, "die Kettenformel konnte nicht errechnet werden" );
}
#endif
}
@@ -711,10 +703,6 @@ void SwDoc::UpdatePageFlds( SfxPoolItem* pMsgHnt )
SetNewFldLst(true);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
// ---- Loesche alle nicht referenzierten FeldTypen eines Dokumentes --
void SwDoc::GCFieldTypes()
{
@@ -754,12 +742,8 @@ void SwDoc::SetNewFldLst(bool bFlag)
mbNewFldLst = bFlag;
}
-
-//----------------------------------------------------------------------
-
// der StartIndex kann optional mit angegeben werden (z.B. wenn dieser
// zuvor schon mal erfragt wurde - ist sonst eine virtuelle Methode !!)
-
_SetGetExpFld::_SetGetExpFld( const SwNodeIndex& rNdIdx, const SwTxtFld* pFld,
const SwIndex* pIdx )
{
@@ -786,9 +770,9 @@ _SetGetExpFld::_SetGetExpFld( const SwNodeIndex& rNdIdx,
nCntnt = *rINet.GetStart();
}
- //Erweiterung fuer Sections:
- // diese haben immer als Content-Position 0xffff !!
- // Auf dieser steht nie ein Feld, maximal bis STRING_MAXLEN moeglich
+// Erweiterung fuer Sections:
+// diese haben immer als Content-Position 0xffff !!
+// Auf dieser steht nie ein Feld, maximal bis STRING_MAXLEN moeglich
_SetGetExpFld::_SetGetExpFld( const SwSectionNode& rSectNd,
const SwPosition* pPos )
{
@@ -901,8 +885,8 @@ void _SetGetExpFld::SetBodyPos( const SwCntntFrm& rFrm )
SwNodeIndex aIdx( *rFrm.GetNode() );
SwDoc& rDoc = *aIdx.GetNodes().GetDoc();
SwPosition aPos( aIdx );
-#ifdef DBG_UTIL
- ASSERT( ::GetBodyTxtNode( rDoc, aPos, rFrm ), "wo steht das Feld" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( ::GetBodyTxtNode( rDoc, aPos, rFrm ), "wo steht das Feld" );
#else
::GetBodyTxtNode( rDoc, aPos, rFrm );
#endif
@@ -1046,10 +1030,6 @@ void LookString( SwHash** ppTbl, sal_uInt16 nSize, const String& rName,
rRet.Erase();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
String lcl_GetDBVarName( SwDoc& rDoc, SwDBNameInfField& rDBFld )
{
SwDBData aDBData( rDBFld.GetDBData( &rDoc ));
@@ -1068,10 +1048,6 @@ String lcl_GetDBVarName( SwDoc& rDoc, SwDBNameInfField& rDBFld )
return sDBNumNm;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void lcl_CalcFld( SwDoc& rDoc, SwCalc& rCalc, const _SetGetExpFld& rSGEFld,
SwNewDBMgr* pMgr )
{
@@ -1219,8 +1195,8 @@ void SwDoc::FldsToExpand( SwHash**& ppHashTbl, sal_uInt16& rTblSize,
if( !aNew.Len() ) // nichts gefunden, dann ist
aNew = pSFld->GetFormula(); // die Formel der neue Wert
- // OD 11.02.2003 #i3141# - update expression of field as in
- // method <SwDoc::UpdateExpFlds(..)> for string/text fields
+ // #i3141# - update expression of field as in method
+ // <SwDoc::UpdateExpFlds(..)> for string/text fields
pSFld->ChgExpStr( aNew );
// suche den Namen vom Feld
@@ -1261,7 +1237,6 @@ void SwDoc::FldsToExpand( SwHash**& ppHashTbl, sal_uInt16& rTblSize,
}
}
-
void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
{
if( IsExpFldsLocked() || IsInReading() )
@@ -1327,15 +1302,6 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
// aktuelle Datensatznummer schon vorher einstellen
SwNewDBMgr* pMgr = GetNewDBMgr();
pMgr->CloseAll(sal_False);
-/*
- if(pMgr && pMgr->OpenDB(DBMGR_STD, GetDBDesc(), sal_False))
- {
- if(!pMgr->IsInMerge() )
- pMgr->ToFirstSelectedRecord(DBMGR_STD);
-
- aCalc.VarChange( sDBNumNm, pMgr->GetCurSelectedRecordId(DBMGR_STD));
- }
-*/
String aNew;
const _SetGetExpFldPtr* ppSortLst = pUpdtFlds->GetSortLst()->GetData();
@@ -1344,9 +1310,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
SwSection* pSect = (SwSection*)(*ppSortLst)->GetSection();
if( pSect )
{
- //!SECTION
-// if( pGFld->IsInBodyTxt() )
SwSbxValue aValue = aCalc.Calculate(
pSect->GetCondition() );
if(!aValue.IsVoidValue())
@@ -1357,7 +1321,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
SwTxtFld* pTxtFld = (SwTxtFld*)(*ppSortLst)->GetFld();
if( !pTxtFld )
{
- ASSERT( !this, "was ist es denn nun" );
+ OSL_ENSURE( !this, "was ist es denn nun" );
continue;
}
@@ -1568,10 +1532,6 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
pUpdtFlds->SetFieldsDirty( sal_False );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDoc::UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc )
{
SwNewDBMgr* pMgr = GetNewDBMgr();
@@ -1601,14 +1561,10 @@ void SwDoc::UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc )
}
else
{
- DBG_ERROR("TODO: what should happen with unnamed DBFields?");
+ OSL_FAIL("TODO: what should happen with unnamed DBFields?");
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDoc::_InitFieldTypes() // wird vom CTOR gerufen!!
{
// Feldtypen
@@ -1655,7 +1611,7 @@ void SwDoc::_InitFieldTypes() // wird vom CTOR gerufen!!
pFldTypes->Insert( new SwSetExpFieldType(this,
SW_RESSTR(STR_POOLCOLL_LABEL_DRAWING), nsSwGetSetExpType::GSE_SEQ),nFldType++);
- ASSERT( nFldType == INIT_FLDTYPES, "Bad initsize: SwFldTypes" );
+ OSL_ENSURE( nFldType == INIT_FLDTYPES, "Bad initsize: SwFldTypes" );
}
void SwDoc::InsDelFldInFldLst( bool bIns, const SwTxtFld& rFld )
@@ -1731,6 +1687,7 @@ String lcl_DBDataToString(const SwDBData& rData)
sRet += String::CreateFromInt32(rData.nCommandType);
return sRet;
}
+
void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList,
const SvStringsDtor* pAllDBNames )
{
@@ -1807,10 +1764,6 @@ void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList,
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDoc::GetAllDBNames( SvStringsDtor& rAllDBNames )
{
SwNewDBMgr* pMgr = GetNewDBMgr();
@@ -1826,10 +1779,6 @@ void SwDoc::GetAllDBNames( SvStringsDtor& rAllDBNames )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SvStringsDtor& SwDoc::FindUsedDBs( const SvStringsDtor& rAllDBNames,
const String& rFormel,
SvStringsDtor& rUsedDBNames )
@@ -1864,10 +1813,6 @@ SvStringsDtor& SwDoc::FindUsedDBs( const SvStringsDtor& rAllDBNames,
return rUsedDBNames;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDoc::AddUsedDBToList( SvStringsDtor& rDBNameList,
const SvStringsDtor& rUsedDBNames )
{
@@ -1875,10 +1820,6 @@ void SwDoc::AddUsedDBToList( SvStringsDtor& rDBNameList,
AddUsedDBToList( rDBNameList, *rUsedDBNames.GetObject(i) );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDoc::AddUsedDBToList( SvStringsDtor& rDBNameList, const String& rDBName)
{
if( !rDBName.Len() )
@@ -1904,10 +1845,6 @@ void SwDoc::AddUsedDBToList( SvStringsDtor& rDBNameList, const String& rDBName)
rDBNameList.Insert( pNew, rDBNameList.Count() );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
const String& rNewName )
{
@@ -2010,10 +1947,6 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
SetModified();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDoc::ReplaceUsedDBs( const SvStringsDtor& rUsedDBNames,
const String& rNewName, String& rFormel )
{
@@ -2055,10 +1988,6 @@ void SwDoc::ReplaceUsedDBs( const SvStringsDtor& rUsedDBNames,
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwDoc::IsNameInArray( const SvStringsDtor& rArr, const String& rName )
{
#ifdef UNX
@@ -2201,9 +2130,7 @@ bool SwDoc::SetFieldsDirty( bool b, const SwNode* pChk, sal_uLong nLen )
const SwTxtNode* pTNd = rNds[ nStt++ ]->GetTxtNode();
if( pTNd )
{
- if( //pTNd->GetFmtColl() && //#outline level,zhaojianwei
- // MAXLEVEL > pTNd->GetTxtColl()->GetOutlineLevel() )
- pTNd->GetAttrOutlineLevel() != 0 )//<-end,zhaojianwei
+ if( pTNd->GetAttrOutlineLevel() != 0 )
// Kapitelfelder aktualisieren
b = sal_True;
else if( pTNd->GetpSwpHints() && pTNd->GetSwpHints().Count() )
@@ -2227,9 +2154,7 @@ bool SwDoc::SetFieldsDirty( bool b, const SwNode* pChk, sal_uLong nLen )
GetUpdtFlds().SetFieldsDirty( b );
return bFldsFnd;
}
-/* -----------------------------21.12.99 12:55--------------------------------
- ---------------------------------------------------------------------------*/
void SwDoc::ChangeAuthorityData( const SwAuthEntry* pNewData )
{
const sal_uInt16 nSize = pFldTypes->Count();
@@ -2246,9 +2171,6 @@ void SwDoc::ChangeAuthorityData( const SwAuthEntry* pNewData )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
void SwDocUpdtFld::InsDelFldInFldLst( sal_Bool bIns, const SwTxtFld& rFld )
{
@@ -2305,7 +2227,7 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
delete pFldSortLst;
pFldSortLst = new _SetGetExpFlds( 64, 16 );
- /// OD 09.08.2002 [#101207#,#101216#,#101778#] - consider and unhide sections
+ /// consider and unhide sections
/// with hide condition, only in mode GETFLD_ALL (<eGetMode == GETFLD_ALL>)
/// notes by OD:
/// eGetMode == GETFLD_CALC in call from methods SwDoc::FldsToCalc
@@ -2353,13 +2275,13 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
for (sal_uInt16 n = nArrStt; n < aTmpArr.Count(); ++n)
{
pSectNd = rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode();
- ASSERT( pSectNd, "Wo ist mein SectionNode" );
+ OSL_ENSURE( pSectNd, "Wo ist mein SectionNode" );
pSectNd->GetSection().SetCondHidden( sal_False );
}
for (sal_uInt16 n = 0; n < nArrStt; ++n)
{
pSectNd = rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode();
- ASSERT( pSectNd, "Wo ist mein SectionNode" );
+ OSL_ENSURE( pSectNd, "Wo ist mein SectionNode" );
pSectNd->GetSection().SetCondHidden( sal_False );
}
@@ -2405,18 +2327,6 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
break;
case RES_SETEXPFLD:
- /// OD 04.10.2002 #102894#
- /// fields of subtype <string> have also been add
- /// for calculation (eGetMode == GETFLD_CALC).
- /// Thus, add fields of subtype <string> in all modes
- /// (eGetMode == GETFLD_EXPAND||GETFLD_CALC||GETFLD_ALL)
- /// and fields of other subtypes only in the modes
- /// (eGetMode == GETFLD_CALC||GETFLD_ALL)
- /* "old" if construct - not deleted for history and code review
- if( ( nsSwGetSetExpType::GSE_STRING & pFld->GetSubType()
- ? GETFLD_EXPAND : GETFLD_CALC )
- & eGetMode )
- */
if ( !(eGetMode == GETFLD_EXPAND) ||
(nsSwGetSetExpType::GSE_STRING & pFld->GetSubType()) )
{
@@ -2497,36 +2407,8 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
}
nFldLstGetMode = static_cast<sal_uInt8>( eGetMode );
nNodes = rDoc.GetNodes().Count();
-
-#ifdef JP_DEBUG
- {
- SvFileStream sOut( "f:\\x.x", STREAM_STD_WRITE );
- sOut.Seek( STREAM_SEEK_TO_END );
- sOut << "------------------" << endl;
- const _SetGetExpFldPtr* pSortLst = pFldSortLst->GetData();
- for( sal_uInt16 n = pFldSortLst->Count(); n; --n, ++pSortLst )
- {
- String sStr( (*pSortLst)->GetNode() );
- sStr += "\t, ";
- sStr += (*pSortLst)->GetCntnt();
- sStr += "\tNode: ";
- sStr += (*pSortLst)->GetFld()->GetTxtNode().StartOfSectionIndex();
- sStr += "\tPos: ";
- sStr += *(*pSortLst)->GetFld()->GetStart();
- sStr += "\tType: ";
- sStr += (*pSortLst)->GetFld()->GetFld().GetFld()->GetTyp()->Which();
-
- sOut << sStr.GetStr() << endl;
- }
- }
-#endif
- // JP_DEBUG
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDocUpdtFld::GetBodyNode( const SwTxtFld& rTFld, sal_uInt16 nFldWhich )
{
const SwTxtNode& rTxtNd = rTFld.GetTxtNode();
@@ -2545,7 +2427,7 @@ void SwDocUpdtFld::GetBodyNode( const SwTxtFld& rTFld, sal_uInt16 nFldWhich )
SwNodeIndex aIdx( rTxtNd );
bIsInBody = rDoc.GetNodes().GetEndOfExtras().GetIndex() < aIdx.GetIndex();
- // #104291# dvo: We don't want to update fields in redlines, or those
+ // We don't want to update fields in redlines, or those
// in frames whose anchor is in redline. However, we do want to update
// fields in hidden sections. So: In order to be updated, a field 1)
// must have a frame, or 2) it must be in the document body.
@@ -2556,8 +2438,8 @@ void SwDocUpdtFld::GetBodyNode( const SwTxtFld& rTFld, sal_uInt16 nFldWhich )
{
// einen Index fuers bestimmen vom TextNode anlegen
SwPosition aPos( rDoc.GetNodes().GetEndOfPostIts() );
-#ifdef DBG_UTIL
- ASSERT( GetBodyTxtNode( rDoc, aPos, *pFrm ), "wo steht das Feld" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( GetBodyTxtNode( rDoc, aPos, *pFrm ), "wo steht das Feld" );
#else
GetBodyTxtNode( rDoc, aPos, *pFrm );
#endif
@@ -2604,8 +2486,8 @@ void SwDocUpdtFld::GetBodyNode( const SwSectionNode& rSectNd )
if( !pFrm )
break;
-#ifdef DBG_UTIL
- ASSERT( GetBodyTxtNode( rDoc, aPos, *pFrm ), "wo steht das Feld" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( GetBodyTxtNode( rDoc, aPos, *pFrm ), "wo steht das Feld" );
#else
GetBodyTxtNode( rDoc, aPos, *pFrm );
#endif
@@ -2633,7 +2515,7 @@ void SwDocUpdtFld::InsertFldType( const SwFieldType& rType )
sFldName = ((SwSetExpFieldType&)rType).GetName();
break;
default:
- ASSERT( !this, "kein gueltiger FeldTyp" );
+ OSL_ENSURE( !this, "kein gueltiger FeldTyp" );
}
if( sFldName.Len() )
@@ -2707,12 +2589,11 @@ SwDocUpdtFld::~SwDocUpdtFld()
delete aFldTypeTable[n];
}
-// #111840#
bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
SwMsgPoolItem * pMsgHnt,
bool bUpdateFlds)
{
- ASSERT(pDstTxtFld, "no field to update!");
+ OSL_ENSURE(pDstTxtFld, "no field to update!");
sal_Bool bTblSelBreak = sal_False;
@@ -2734,10 +2615,6 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
GetIDocumentUndoRedo().AppendUndo(pUndo);
}
- // Das gefundene Feld wird angepasst ...
- //pDstFld->ChangeFormat( rSrcFld.GetFormat() );
- //pDstFld->SetLanguage( rSrcFld.GetLanguage() );
-
SwField * pNewFld = rSrcFld.CopyField();
pDstFmtFld->SetFld(pNewFld);
@@ -2827,3 +2704,5 @@ bool SwDoc::PutValueToField(const SwPosition & rPos,
return pField->PutValue(rVal, nWhich);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index fb0ccdd97a80..68e93ed41542 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,18 +67,12 @@
#include <fmtcnct.hxx>
#include <dflyobj.hxx>
-// --> OD 2009-07-20 #i73249#
#include <undoflystrattr.hxx>
-// <--
extern sal_uInt16 GetHtmlMode( const SwDocShell* );
-
using namespace ::com::sun::star;
-/*-----------------17.02.98 08:35-------------------
-
---------------------------------------------------*/
sal_uInt16 SwDoc::GetFlyCount( FlyCntType eType ) const
{
const SwSpzFrmFmts& rFmts = *GetSpzFrmFmts();
@@ -119,9 +114,6 @@ sal_uInt16 SwDoc::GetFlyCount( FlyCntType eType ) const
return nCount;
}
-/*-----------------17.02.98 08:35-------------------
-
---------------------------------------------------*/
// If you change this, also update SwXFrameEnumeration in unocoll.
SwFrmFmt* SwDoc::GetFlyNum( sal_uInt16 nIdx, FlyCntType eType )
{
@@ -162,16 +154,11 @@ SwFrmFmt* SwDoc::GetFlyNum( sal_uInt16 nIdx, FlyCntType eType )
return pRetFmt;
}
-/* */
-
/***********************************************************************
#* Class : SwDoc
#* Methode : SetFlyFrmAnchor
#* Beschreibung: Das Ankerattribut des FlyFrms aendert sich.
-#* Datum : MA 01. Feb. 94
-#* Update : JP 09.03.98
#***********************************************************************/
-
Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
const SwFrmFmt* pFlyFmt )
{
@@ -272,13 +259,13 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, sal_Bool bNew
//Verbindung zwischen Attribut und Format.
const SwPosition *pPos = rOldAnch.GetCntntAnchor();
SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
- ASSERT( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
+ OSL_ENSURE( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
const xub_StrLen nIdx = pPos->nContent.GetIndex();
SwTxtAttr * const pHnt =
pTxtNode->GetTxtAttrForCharAt( nIdx, RES_TXTATR_FLYCNT );
- ASSERT( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
+ OSL_ENSURE( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
"Missing FlyInCnt-Hint." );
- ASSERT( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == &rFmt,
+ OSL_ENSURE( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == &rFmt,
"Wrong TxtFlyCnt-Hint." );
const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt()).SetFlyFmt();
@@ -302,7 +289,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, sal_Bool bNew
{
const SwPosition *pPos = aNewAnch.GetCntntAnchor();
SwTxtNode *pNd = pPos->nNode.GetNode().GetTxtNode();
- ASSERT( pNd, "Crsr steht nicht auf TxtNode." );
+ OSL_ENSURE( pNd, "Crsr steht nicht auf TxtNode." );
SwFmtFlyCnt aFmt( static_cast<SwFlyFrmFmt*>(&rFmt) );
pNd->InsertItem( aFmt, pPos->nContent.GetIndex(), 0 );
@@ -362,8 +349,8 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, sal_Bool bNew
pItem = 0;
SwFmtVertOrient aOldV( rFmt.GetVertOrient() );
- // OD 2004-05-14 #i28922# - correction: compare <aOldV.GetVertOrient()
- // with <text::VertOrientation::NONE>
+ // #i28922# - correction: compare <aOldV.GetVertOrient() with
+ // <text::VertOrientation::NONE>
if( text::VertOrientation::NONE == aOldV.GetVertOrient() && (!pItem ||
aOldV.GetPos() == ((SwFmtVertOrient*)pItem)->GetPos() ) )
{
@@ -419,7 +406,7 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc,
case RES_PAGEDESC:
case RES_CNTNT:
case RES_FOOTER:
- OSL_ENSURE(false, ":-) unknown Attribute for Fly.");
+ OSL_ENSURE( !this, ":-) Unbekanntes Attribut fuer Fly." );
// kein break;
case RES_CHAIN:
rSet.ClearItem( nWhich );
@@ -479,7 +466,7 @@ sal_Bool SwDoc::SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet )
return bRet;
}
-// --> OD 2009-07-20 #i73249#
+// #i73249#
void SwDoc::SetFlyFrmTitle( SwFlyFrmFmt& rFlyFrmFmt,
const String& sNewTitle )
{
@@ -525,15 +512,11 @@ void SwDoc::SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt,
SetModified();
}
-// <--
/***************************************************************************
* Methode : sal_Bool SwDoc::SetFrmFmtToFly( SwFlyFrm&, SwFrmFmt& )
* Beschreibung:
- * Erstellt : OK 14.04.94 15:40
- * Aenderung : JP 23.04.98
***************************************************************************/
-
sal_Bool SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
SfxItemSet* pSet, sal_Bool bKeepOrient )
{
@@ -596,9 +579,9 @@ sal_Bool SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
//Hori und Vert nur dann resetten, wenn in der Vorlage eine
//automatische Ausrichtung eingestellt ist, anderfalls den alten Wert
//wieder hineinstopfen.
- //JP 09.06.98: beim Update der RahmenVorlage sollte der Fly NICHT
+ // beim Update der RahmenVorlage sollte der Fly NICHT
// seine Orientierng verlieren (diese wird nicht geupdatet!)
- //OS: #96584# text::HoriOrientation::NONE and text::VertOrientation::NONE are allowed now
+ // text::HoriOrientation::NONE and text::VertOrientation::NONE are allowed now
if (!bKeepOrient)
{
rFmt.ResetFmtAttr(RES_VERT_ORIENT);
@@ -637,17 +620,13 @@ void SwDoc::GetGrfNms( const SwFlyFrmFmt& rFmt, String* pGrfName,
|*
|* SwDoc::ChgAnchor()
|*
-|* Ersterstellung MA 10. Jan. 95
-|* Letzte Aenderung JP 08.07.98
-|*
*************************************************************************/
-
sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
RndStdIds _eAnchorType,
const sal_Bool _bSameOnly,
const sal_Bool _bPosCorr )
{
- ASSERT( GetRootFrm(), "Ohne Layout geht gar nichts" );
+ OSL_ENSURE( GetRootFrm(), "Ohne Layout geht gar nichts" );
if ( !_rMrkList.GetMarkCount() ||
_rMrkList.GetMark( 0 )->GetMarkedSdrObj()->GetUpGroup() )
@@ -665,38 +644,36 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
{
SwDrawContact* pContact = static_cast<SwDrawContact*>(GetUserCall(pObj));
- // OD 27.06.2003 #108784# - consider, that drawing object has
+ // consider, that drawing object has
// no user call. E.g.: a 'virtual' drawing object is disconnected by
// the anchor type change of the 'master' drawing object.
// Continue with next selected object and assert, if this isn't excepted.
if ( !pContact )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bool bNoUserCallExcepted =
pObj->ISA(SwDrawVirtObj) &&
!static_cast<SwDrawVirtObj*>(pObj)->IsConnected();
- ASSERT( bNoUserCallExcepted, "SwDoc::ChgAnchor(..) - no contact at selected drawing object" );
+ OSL_ENSURE( bNoUserCallExcepted, "SwDoc::ChgAnchor(..) - no contact at selected drawing object" );
#endif
continue;
}
- // OD 2004-03-29 #i26791#
+ // #i26791#
const SwFrm* pOldAnchorFrm = pContact->GetAnchorFrm( pObj );
const SwFrm* pNewAnchorFrm = pOldAnchorFrm;
- // --> OD 2006-03-01 #i54336#
+ // #i54336#
// Instead of only keeping the index position for an as-character
// anchored object the complete <SwPosition> is kept, because the
// anchor index position could be moved, if the object again is
// anchored as character.
-// xub_StrLen nIndx = STRING_NOTFOUND;
const SwPosition* pOldAsCharAnchorPos( 0L );
const RndStdIds eOldAnchorType = pContact->GetAnchorId();
if ( !_bSameOnly && eOldAnchorType == FLY_AS_CHAR )
{
pOldAsCharAnchorPos = new SwPosition( pContact->GetCntntAnchor() );
}
- // <--
if ( _bSameOnly )
_eAnchorType = eOldAnchorType;
@@ -716,7 +693,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
? aObjRect.TopRight()
: aPt;
- // OD 18.06.2003 #108784# - allow drawing objects in header/footer
+ // allow drawing objects in header/footer
pNewAnchorFrm = ::FindAnchor( pOldAnchorFrm, aNewPoint, false );
if ( pNewAnchorFrm->IsTxtFrm() && ((SwTxtFrm*)pNewAnchorFrm)->IsFollow() )
{
@@ -746,8 +723,8 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
Point aPoint( aPt );
aPoint.X() -= 1;
GetRootFrm()->GetCrsrOfst( &aPos, aPoint, &aState );
- // OD 20.06.2003 #108784# - consider that drawing objects
- // can be in header/footer. Thus, <GetFrm()> by left-top-corner
+ // consider that drawing objects can be in
+ // header/footer. Thus, <GetFrm()> by left-top-corner
pTxtFrm = aPos.nNode.GetNode().
GetCntntNode()->GetFrm( &aPt, 0, sal_False );
}
@@ -788,7 +765,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
}
else // Ankerwechsel
{
- // OD 18.06.2003 #108784# - allow drawing objects in header/footer
+ // allow drawing objects in header/footer
pNewAnchorFrm = ::FindAnchor( pOldAnchorFrm, aPt, false );
if( pNewAnchorFrm->IsProtected() )
{
@@ -819,32 +796,32 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
}
aNewAnch.SetAnchor( &aPos );
SetAttr( aNewAnch, *pContact->GetFmt() );
- // OD 2004-04-13 #i26791# - adjust vertical positioning to
- // 'center to baseline'
+ // #i26791# - adjust vertical positioning to 'center to
+ // baseline'
SetAttr( SwFmtVertOrient( 0, text::VertOrientation::CENTER, text::RelOrientation::FRAME ), *pContact->GetFmt() );
SwTxtNode *pNd = aPos.nNode.GetNode().GetTxtNode();
- ASSERT( pNd, "Cursor not positioned at TxtNode." );
+ OSL_ENSURE( pNd, "Cursor not positioned at TxtNode." );
SwFmtFlyCnt aFmt( pContact->GetFmt() );
pNd->InsertItem( aFmt, aPos.nContent.GetIndex(), 0 );
}
break;
default:
- ASSERT( !this, "unexpected AnchorId." );
+ OSL_ENSURE( !this, "unexpected AnchorId." );
}
if ( (FLY_AS_CHAR != _eAnchorType) &&
pNewAnchorFrm &&
( !_bSameOnly || pNewAnchorFrm != pOldAnchorFrm ) )
{
- // OD 2004-04-06 #i26791# - Direct object positioning no longer
- // needed. Apply of attributes (method call <SetAttr(..)>) takes
- // care of the invalidation of the object position.
+ // #i26791# - Direct object positioning no longer needed. Apply
+ // of attributes (method call <SetAttr(..)>) takes care of the
+ // invalidation of the object position.
SetAttr( aNewAnch, *pContact->GetFmt() );
if ( _bPosCorr )
{
- // --> OD 2004-08-24 #i33313# - consider not connected
- // 'virtual' drawing objects
+ // #i33313# - consider not connected 'virtual' drawing
+ // objects
if ( pObj->ISA(SwDrawVirtObj) &&
!static_cast<SwDrawVirtObj*>(pObj)->IsConnected() )
{
@@ -862,7 +839,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
}
}
- // --> OD 2006-03-01 #i54336#
+ // #i54336#
if ( pNewAnchorFrm && pOldAsCharAnchorPos )
{
//Bei InCntnt's wird es spannend: Das TxtAttribut muss vernichtet
@@ -871,8 +848,8 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
//Verbindung zwischen Attribut und Format.
const xub_StrLen nIndx( pOldAsCharAnchorPos->nContent.GetIndex() );
SwTxtNode* pTxtNode( pOldAsCharAnchorPos->nNode.GetNode().GetTxtNode() );
- ASSERT( pTxtNode, "<SwDoc::ChgAnchor(..)> - missing previous anchor text node for as-character anchored object" );
- ASSERT( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
+ OSL_ENSURE( pTxtNode, "<SwDoc::ChgAnchor(..)> - missing previous anchor text node for as-character anchored object" );
+ OSL_ENSURE( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
SwTxtAttr * const pHnt =
pTxtNode->GetTxtAttrForCharAt( nIndx, RES_TXTATR_FLYCNT );
const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt()).SetFlyFmt();
@@ -882,7 +859,6 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
pTxtNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIndx, nIndx );
delete pOldAsCharAnchorPos;
}
- // <--
}
}
@@ -892,10 +868,6 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
return bUnmark;
}
-
-/* -----------------23.07.98 13:56-------------------
- *
- * --------------------------------------------------*/
int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest )
{
//Die Source darf noch keinen Follow haben.
@@ -942,7 +914,7 @@ int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest )
{
const SwFmtAnchor& rAnchor = (*GetSpzFrmFmts())[ n ]->GetAnchor();
sal_uLong nTstSttNd;
- // OD 11.12.2003 #i20622# - to-frame anchored objects are allowed.
+ // #i20622# - to-frame anchored objects are allowed.
if ( ((rAnchor.GetAnchorId() == FLY_AT_PARA) ||
(rAnchor.GetAnchorId() == FLY_AT_CHAR)) &&
0 != rAnchor.GetCntntAnchor() &&
@@ -994,9 +966,7 @@ int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest )
return bAllowed ? SW_CHAIN_OK : SW_CHAIN_WRONG_AREA;
}
-/* -----------------23.07.98 13:56-------------------
- *
- * --------------------------------------------------*/
+
int SwDoc::Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest )
{
int nErr = Chainable( rSource, rDest );
@@ -1040,9 +1010,7 @@ int SwDoc::Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest )
}
return nErr;
}
-/* -----------------23.07.98 13:56-------------------
- *
- * --------------------------------------------------*/
+
void SwDoc::Unchain( SwFrmFmt &rFmt )
{
SwFmtChain aChain( rFmt.GetChain() );
@@ -1059,5 +1027,4 @@ void SwDoc::Unchain( SwFrmFmt &rFmt )
}
}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 1154fbf61d88..b1aed2bfa726 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,7 +44,6 @@
#include <editeng/brkitem.hxx>
#include <svl/whiter.hxx>
#ifndef _ZFORLIST_HXX //autogen
-#define _ZFORLIST_DECLARE_TABLE
#include <svl/zforlist.hxx>
#endif
#include <comphelper/processfactory.hxx>
@@ -120,13 +120,11 @@ struct ParaRstFmt
const SfxItemSet* pDelSet;
sal_uInt16 nWhich;
bool bReset;
- // --> OD 2007-11-06 #i62575#
- bool bResetListAttrs;
- // <--
+ bool bResetListAttrs; // #i62575#
bool bResetAll;
bool bInclRefToxMark;
- bool bKeepOutlineLevelAttr; //#outline level,add by zhaojianwei
+ bool bKeepOutlineLevelAttr;
ParaRstFmt( const SwPosition* pStt, const SwPosition* pEnd,
SwHistory* pHst, sal_uInt16 nWhch = 0, const SfxItemSet* pSet = 0 )
@@ -136,13 +134,11 @@ struct ParaRstFmt
pEndNd(pEnd),
pDelSet(pSet),
nWhich(nWhch),
- // --> OD 2007-11-06 #i62675#
- bReset( false ),
+ bReset( false ), // #i62675#
bResetListAttrs( false ),
- // <--
bResetAll( true ),
bInclRefToxMark( false ),
- bKeepOutlineLevelAttr( false ) //#outline level,add by zhaojianwei
+ bKeepOutlineLevelAttr( false )
{}
ParaRstFmt( SwHistory* pHst )
@@ -152,13 +148,11 @@ struct ParaRstFmt
pEndNd(0),
pDelSet(0),
nWhich(0),
- // --> OD 2007-11-06 #i62675#
bReset( false ),
- bResetListAttrs( false ),
- // <--
+ bResetListAttrs( false ), // #i62675#
bResetAll( true ),
bInclRefToxMark( false ),
- bKeepOutlineLevelAttr( false ) //#outline level,add by zhaojianwei
+ bKeepOutlineLevelAttr( false )
{}
};
@@ -210,7 +204,6 @@ sal_Bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
SwDoc* pDoc = pNode->GetDoc();
- // --> OD 2008-04-14 #refactorlists#
// remove unused attribute RES_LR_SPACE
// add list attributes
SfxItemSet aSet( pDoc->GetAttrPool(),
@@ -221,11 +214,7 @@ sal_Bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
0 );
const SfxItemSet* pSet = pNode->GetpSwAttrSet();
- // --> OD 2008-04-15 #refactorlists#
-// std::vector<sal_uInt16> aClearWhichIds;
SvUShorts aClearWhichIds;
- // <--
- // --> OD 2008-04-15 #refactorlists#
// restoring all paragraph list attributes
{
SfxItemSet aListAttrSet( pDoc->GetAttrPool(),
@@ -244,13 +233,10 @@ sal_Bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
}
}
}
- // <--
const SfxPoolItem* pItem;
- // sal_uInt16 __READONLY_DATA aSavIds[ 3 ] = { RES_PAGEDESC, RES_BREAK, //#outline level,removed by zhaojianwei
- // RES_PARATR_NUMRULE };
- //for( sal_uInt16 n = 0; n < 3; ++n )
- sal_uInt16 __READONLY_DATA aSavIds[ 4 ] = { RES_PAGEDESC, RES_BREAK, //->add by zhaojianwei
+
+ sal_uInt16 const aSavIds[ 4 ] = { RES_PAGEDESC, RES_BREAK, //->add by zhaojianwei
RES_PARATR_NUMRULE,
RES_PARATR_OUTLINELEVEL };
for( sal_uInt16 n = 0; n < 4; ++n ) //<-end,zhaojianwei
@@ -280,24 +266,19 @@ sal_Bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
if( bSave )
{
aSet.Put( *pItem );
- // --> OD 2008-04-15 #refactorlists#
-// aClearWhichIds.push_back( aSavIds[n] );
aClearWhichIds.Insert( aSavIds[n], aClearWhichIds.Count() );
}
}
}
- // --> OD 2008-04-14 #refactorlists#
// do not clear items directly from item set and only clear to be kept
// attributes, if no deletion item set is found.
-// pNode->ClearItemsFromAttrSet( aClearWhichIds );
const bool bKeepAttributes =
!pPara || !pPara->pDelSet || pPara->pDelSet->Count() == 0;
if ( bKeepAttributes )
{
pNode->ResetAttr( aClearWhichIds );
}
- // <--
if( !bLocked )
pNode->UnlockModify();
@@ -308,16 +289,12 @@ sal_Bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
if( pPara->pDelSet && pPara->pDelSet->Count() )
{
- // --> OD 2008-04-15 #refactorlists#
- ASSERT( !bKeepAttributes,
+ OSL_ENSURE( !bKeepAttributes,
"<lcl_RstAttr(..)> - certain attributes are kept, but not needed. -> please inform OD" );
- // <--
SfxItemIter aIter( *pPara->pDelSet );
pItem = aIter.FirstItem();
while( sal_True )
{
- // --> OD 2008-04-14 #refactorlists#
- //
if ( ( pItem->Which() != RES_PAGEDESC &&
pItem->Which() != RES_BREAK &&
pItem->Which() != RES_PARATR_NUMRULE ) ||
@@ -325,7 +302,6 @@ sal_Bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
{
pNode->ResetAttr( pItem->Which() );
}
- // <--
if( aIter.IsAtEnd() )
break;
pItem = aIter.NextItem();
@@ -339,10 +315,8 @@ sal_Bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
else
pNode->ResetAllAttr();
- // --> OD 2008-04-15 #refactorlists#
// only restore saved attributes, if needed
if ( bKeepAttributes && aSet.Count() )
- // <--
{
pNode->LockModify();
@@ -376,9 +350,7 @@ void SwDoc::RstTxtAttrs(const SwPaM &rRg, sal_Bool bInclRefToxMark )
void SwDoc::ResetAttrs( const SwPaM &rRg,
sal_Bool bTxtAttr,
const SvUShortsSort* pAttrs,
- // --> OD 2008-11-28 #b96644#
const bool bSendDataChangedEvents )
- // <--
{
SwPaM* pPam = (SwPaM*)&rRg;
if( !bTxtAttr && pAttrs && pAttrs->Count() &&
@@ -433,14 +405,13 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
pPam->GetPoint()->nContent = nPtPos;
}
- // --> OD 2008-11-28 #i96644#
+ // #i96644#
// SwDataChanged aTmp( *pPam, 0 );
std::auto_ptr< SwDataChanged > pDataChanged;
if ( bSendDataChangedEvents )
{
pDataChanged.reset( new SwDataChanged( *pPam, 0 ) );
}
- // <--
SwHistory* pHst = 0;
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -458,13 +429,11 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
ParaRstFmt aPara( pStt, pEnd, pHst );
// mst: not including META here; it seems attrs with CH_TXTATR are omitted
- sal_uInt16 __FAR_DATA aResetableSetRange[] = {
+ sal_uInt16 aResetableSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
- // --> OD 2008-02-25 #refactorlists#
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
- // <--
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY,
@@ -628,9 +597,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
}
if ( isPARATR(nWhich)
- // --> OD 2008-02-25 #refactorlists#
|| isPARATR_LIST(nWhich)
- // <--
|| isFRMATR(nWhich)
|| isGRFATR(nWhich)
|| isUNKNOWNATR(nWhich) )
@@ -655,9 +622,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
SfxItemSet* pTmpOtherItemSet = new SfxItemSet( pDoc->GetAttrPool(),
RES_PARATR_BEGIN, RES_PARATR_END-1,
- // --> OD 2008-02-25 #refactorlists#
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
- // <--
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_GRFATR_BEGIN, RES_GRFATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
@@ -679,21 +644,20 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
if( pNode && pNode->IsTxtNode() )
{
- // -> #i27615#
+ // #i27615#
if (rRg.IsInFrontOfLabel())
{
SwTxtNode * pTxtNd = pNode->GetTxtNode();
SwNumRule * pNumRule = pTxtNd->GetNumRule();
- // --> OD 2005-10-24 #126346# - make code robust:
+ // make code robust:
if ( !pNumRule )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<InsAttr(..)> - PaM in front of label, but text node has no numbering rule set. This is a serious defect, please inform OD." );
DELETECHARSETS
return false;
}
- // <--
SwNumFmt aNumFmt = pNumRule->Get(static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()));
SwCharFmt * pCharFmt =
@@ -711,7 +675,6 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
DELETECHARSETS
return true;
}
- // <- #i27615#
const SwIndex& rSt = pStt->nContent;
@@ -1203,7 +1166,6 @@ void SwDoc::SetAttr( const SfxItemSet& rSet, SwFmt& rFmt )
SetModified();
}
-// --> OD 2008-02-12 #newlistlevelattrs#
void SwDoc::ResetAttrAtFormat( const sal_uInt16 nWhichId,
SwFmt& rChangedFormat )
{
@@ -1225,7 +1187,6 @@ void SwDoc::ResetAttrAtFormat( const sal_uInt16 nWhichId,
else if ( pUndo )
delete pUndo;
}
-// <--
int lcl_SetNewDefTabStops( SwTwips nOldWidth, SwTwips nNewWidth,
SvxTabStopItem& rChgTabStop )
@@ -1290,9 +1251,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
bCheckSdrDflt = 0 != pSdrPool;
}
else if ( isPARATR(nWhich) ||
- // --> OD 2008-02-25 #refactorlists#
isPARATR_LIST(nWhich) )
- // <--
{
aCallMod.Add( pDfltTxtFmtColl );
bCheckSdrDflt = 0 != pSdrPool;
@@ -1420,7 +1379,7 @@ void SwDoc::DelCharFmt(sal_uInt16 nFmt, sal_Bool bBroadcast)
void SwDoc::DelCharFmt( SwCharFmt *pFmt, sal_Bool bBroadcast )
{
sal_uInt16 nFmt = pCharFmtTbl->GetPos( pFmt );
- ASSERT( USHRT_MAX != nFmt, "Fmt not found," );
+ OSL_ENSURE( USHRT_MAX != nFmt, "Fmt not found," );
DelCharFmt( nFmt, bBroadcast );
}
@@ -1429,7 +1388,7 @@ void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, sal_Bool bBroadcast )
{
if( pFmt->ISA( SwTableBoxFmt ) || pFmt->ISA( SwTableLineFmt ))
{
- ASSERT( !this, "Format steht nicht mehr im DocArray, "
+ OSL_ENSURE( !this, "Format steht nicht mehr im DocArray, "
"kann per delete geloescht werden" );
delete pFmt;
}
@@ -1458,7 +1417,7 @@ void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, sal_Bool bBroadcast )
else
{
nPos = GetSpzFrmFmts()->GetPos( pFmt );
- ASSERT( nPos != USHRT_MAX, "FrmFmt not found." );
+ OSL_ENSURE( nPos != USHRT_MAX, "FrmFmt not found." );
if( USHRT_MAX != nPos )
GetSpzFrmFmts()->DeleteAndDestroy( nPos );
}
@@ -1468,7 +1427,7 @@ void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, sal_Bool bBroadcast )
void SwDoc::DelTblFrmFmt( SwTableFmt *pFmt )
{
sal_uInt16 nPos = pTblFrmFmtTbl->GetPos( pFmt );
- ASSERT( USHRT_MAX != nPos, "Fmt not found," );
+ OSL_ENSURE( USHRT_MAX != nPos, "Fmt not found," );
pTblFrmFmtTbl->DeleteAndDestroy( nPos );
}
@@ -1576,12 +1535,11 @@ SwFmt *SwDoc::_MakeFrmFmt(const String &rFmtName,
}
-// --> OD 2005-01-13 #i40550# - add parameter <bAuto> - not relevant
+// #i40550# - add parameter <bAuto> - not relevant
SwCharFmt *SwDoc::MakeCharFmt( const String &rFmtName,
SwCharFmt *pDerivedFrom,
sal_Bool bBroadcast,
sal_Bool )
-// <--
{
SwCharFmt *pFmt = new SwCharFmt( GetAttrPool(), rFmtName, pDerivedFrom );
pCharFmtTbl->Insert( pFmt, pCharFmtTbl->Count() );
@@ -1618,12 +1576,11 @@ SwFmt *SwDoc::_MakeCharFmt(const String &rFmtName,
* Erzeugen der FormatCollections
*/
// TXT
-// --> OD 2005-01-13 #i40550# - add parameter <bAuto> - not relevant
+// #i40550# - add parameter <bAuto> - not relevant
SwTxtFmtColl* SwDoc::MakeTxtFmtColl( const String &rFmtName,
SwTxtFmtColl *pDerivedFrom,
sal_Bool bBroadcast,
sal_Bool )
-// <--
{
SwTxtFmtColl *pFmtColl = new SwTxtFmtColl( GetAttrPool(), rFmtName,
pDerivedFrom );
@@ -1689,7 +1646,7 @@ SwGrfFmtColl* SwDoc::MakeGrfFmtColl( const String &rFmtName,
void SwDoc::DelTxtFmtColl(sal_uInt16 nFmtColl, sal_Bool bBroadcast)
{
- ASSERT( nFmtColl, "Remove fuer Coll 0." );
+ OSL_ENSURE( nFmtColl, "Remove fuer Coll 0." );
// Wer hat die zu loeschende als Next
SwTxtFmtColl *pDel = (*pTxtFmtCollTbl)[nFmtColl];
@@ -1720,7 +1677,7 @@ void SwDoc::DelTxtFmtColl(sal_uInt16 nFmtColl, sal_Bool bBroadcast)
void SwDoc::DelTxtFmtColl( SwTxtFmtColl *pColl, sal_Bool bBroadcast )
{
sal_uInt16 nFmt = pTxtFmtCollTbl->GetPos( pColl );
- ASSERT( USHRT_MAX != nFmt, "Collection not found," );
+ OSL_ENSURE( USHRT_MAX != nFmt, "Collection not found," );
DelTxtFmtColl( nFmt, bBroadcast );
}
@@ -1741,18 +1698,15 @@ sal_Bool lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs )
lcl_RstAttr( pCNd, pPara );
- // --> OD 2007-11-06 #i62675#
- // --> OD 2008-04-15 #refactorlists#
- // check, if paragraph style has changed
+ // #i62675# check, if paragraph style has changed
if ( pPara->bResetListAttrs &&
pFmt != pCNd->GetFmtColl() &&
pFmt->GetItemState( RES_PARATR_NUMRULE ) == SFX_ITEM_SET )
{
- // --> OD 2009-09-07 #b6876367#
// Check, if the list style of the paragraph will change.
bool bChangeOfListStyleAtParagraph( true );
SwTxtNode* pTNd( dynamic_cast<SwTxtNode*>(pCNd) );
- ASSERT( pTNd,
+ OSL_ENSURE( pTNd,
"<lcl_SetTxtFmtColl(..)> - text node expected -> crash" );
{
SwNumRule* pNumRuleAtParagraph( pTNd->GetNumRule() );
@@ -1770,7 +1724,6 @@ sal_Bool lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs )
if ( bChangeOfListStyleAtParagraph )
{
- // --> OD 2008-04-08 #refactorlists#
std::auto_ptr< SwRegHistory > pRegH;
if ( pPara->pHistory )
{
@@ -1786,9 +1739,7 @@ sal_Bool lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs )
pCNd->ResetAttr( RES_PARATR_LIST_ISCOUNTED );
pCNd->ResetAttr( RES_PARATR_LIST_ID );
}
- // <--
}
- // <--
}
// erst in die History aufnehmen, damit ggfs. alte Daten
@@ -1816,11 +1767,9 @@ sal_Bool SwDoc::SetTxtFmtColl( const SwPaM &rRg,
if (GetIDocumentUndoRedo().DoesUndo())
{
- // --> OD 2008-04-15 #refactorlists#
SwUndoFmtColl* pUndo = new SwUndoFmtColl( rRg, pFmt,
bReset,
bResetListAttrs );
- // <--
pHst = pUndo->GetHistory();
GetIDocumentUndoRedo().AppendUndo(pUndo);
}
@@ -1828,9 +1777,8 @@ sal_Bool SwDoc::SetTxtFmtColl( const SwPaM &rRg,
ParaRstFmt aPara( pStt, pEnd, pHst );
aPara.pFmtColl = pFmt;
aPara.bReset = bReset;
- // --> OD 2007-11-06 #i62675#
+ // #i62675#
aPara.bResetListAttrs = bResetListAttrs;
- // <--
GetNodes().ForEach( pStt->nNode.GetIndex(), pEnd->nNode.GetIndex()+1,
lcl_SetTxtFmtColl, &aPara );
@@ -1866,9 +1814,8 @@ SwFmt* SwDoc::CopyFmt( const SwFmt& rFmt,
fnCopyFmt, rDfltFmt );
// erzeuge das Format und kopiere die Attribute
- // --> OD 2005-01-13 #i40550#
+ // #i40550#
SwFmt* pNewFmt = (this->*fnCopyFmt)( rFmt.GetName(), pParent, sal_False, sal_True );
- // <--
pNewFmt->SetAuto( rFmt.IsAuto() );
pNewFmt->CopyAttrs( rFmt, sal_True ); // kopiere Attribute
@@ -1933,9 +1880,6 @@ SwTxtFmtColl* SwDoc::CopyTxtColl( const SwTxtFmtColl& rColl )
// kopiere jetzt noch die Auto-Formate oder kopiere die Attribute
pNewColl->CopyAttrs( rColl, sal_True );
- // setze noch den Outline-Level
- //if( NO_NUMBERING != rColl.GetOutlineLevel() ) //#outline level,zhaojianwei
- // pNewColl->SetOutlineLevel( rColl.GetOutlineLevel() );
if(rColl.IsAssignedToListLevelOfOutlineStyle())
pNewColl->AssignToListLevelOfOutlineStyle(rColl.GetAssignedOutlineStyleLevel());//<-end,zhaojianwei
//<-end
@@ -2031,9 +1975,8 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
if( RES_CONDTXTFMTCOLL == pSrc->Which() )
MakeCondTxtFmtColl( pSrc->GetName(), (SwTxtFmtColl*)&rDfltFmt );
else
- // --> OD 2005-01-13 #i40550#
+ // #i40550#
(this->*fnCopyFmt)( pSrc->GetName(), &rDfltFmt, sal_False, sal_True );
- // <--
}
}
@@ -2046,13 +1989,9 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
pDest = FindFmtByName( rDestArr, pSrc->GetName() );
pDest->SetAuto( sal_False );
-// pDest->ResetAllAttr();
-// pDest->CopyAttrs( *pSrc, sal_True ); // kopiere Attribute
+
//JP 19.02.96: ist so wohl optimaler - loest ggfs. kein Modify aus!
pDest->DelDiffs( *pSrc );
- // --> OD 2009-03-23 #i94285#
- // copy existing <SwFmtPageDesc> instance, before copying attributes
-// pDest->SetFmtAttr( pSrc->GetAttrSet() ); // kopiere Attribute
//JP 18.08.98: Bug 55115 - copy PageDescAttribute in this case
const SfxPoolItem* pItem;
if( &GetAttrPool() != pSrc->GetAttrSet().GetPool() &&
@@ -2068,7 +2007,6 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
pPageDesc = aPageDescs[ MakePageDesc( rNm ) ];
}
pPageDesc->Add( &aPageDesc );
-// pDest->SetFmtAttr( aPageDesc );
SwAttrSet aTmpAttrSet( pSrc->GetAttrSet() );
aTmpAttrSet.Put( aPageDesc );
pDest->SetFmtAttr( aTmpAttrSet );
@@ -2097,9 +2035,6 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
pDstColl->SetNextTxtFmtColl( *(SwTxtFmtColl*)FindFmtByName(
rDestArr, pSrcColl->GetNextTxtFmtColl().GetName() ) );
- // setze noch den Outline-Level
- //if( NO_NUMBERING != pSrcColl->GetOutlineLevel() ) //#outline level,zhaojianwei
- // pDstColl->SetOutlineLevel( pSrcColl->GetOutlineLevel() );
if(pSrcColl->IsAssignedToListLevelOfOutlineStyle())
pDstColl->AssignToListLevelOfOutlineStyle(pSrcColl->GetAssignedOutlineStyleLevel());//<-end,zhaojianwei
//<-end
@@ -2366,7 +2301,7 @@ void SwDoc::MoveLeftMargin( const SwPaM& rPam, sal_Bool bRight, sal_Bool bModulu
{
SvxLRSpaceItem aLS( (SvxLRSpaceItem&)pTNd->SwCntntNode::GetAttr( RES_LR_SPACE ) );
- // --> FME 2008-09-16 #i93873# See also lcl_MergeListLevelIndentAsLRSpaceItem in thints.cxx
+ // #i93873# See also lcl_MergeListLevelIndentAsLRSpaceItem in thints.cxx
if ( pTNd->AreListLevelIndentsApplicable() )
{
const SwNumRule* pRule = pTNd->GetNumRule();
@@ -2439,13 +2374,11 @@ void SwDoc::_CreateNumberFormatter()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDoc::_CreateNumberFormatter" );
- ASSERT( !pNumberFormatter, "ist doch schon vorhanden" );
+ OSL_ENSURE( !pNumberFormatter, "ist doch schon vorhanden" );
+
+ LanguageType eLang = LANGUAGE_SYSTEM;
- LanguageType eLang = LANGUAGE_SYSTEM; //System::GetLanguage();
-/* ((const SvxLanguageItem&)GetAttrPool().
- GetDefaultItem( RES_CHRATR_LANGUAGE )).GetLanguage();
-*/
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
pNumberFormatter = new SvNumberFormatter( xMSF, eLang );
pNumberFormatter->SetEvalDateFormat( NF_EVALDATEFORMAT_FORMAT_INTL );
@@ -2534,19 +2467,6 @@ void SwDoc::SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxItemSet& rSet )
// in den Node gesetzt werden. Also muss man die Differenz nehmen
SwRedlineExtraData_Format aExtraData( rSet );
-/*
- if( pSet && pTNd->HasSwAttrSet() )
- {
- SfxItemSet aTmp( *pTNd->GetpSwAttrSet() );
- aTmp.Differentiate( *pSet );
- // das Adjust Item behalten wir extra
- const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pTNd->GetpSwAttrSet()->GetItemState(
- RES_PARATR_ADJUST, sal_False, &pItem ))
- aTmp.Put( *pItem );
- aExtraData.SetItemSet( aTmp );
- }
-*/
pRedl->SetExtraData( &aExtraData );
// !!!!!!!!! Undo fehlt noch !!!!!!!!!!!!!!!!!!
@@ -2635,7 +2555,7 @@ void SwDoc::RenameFmt(SwFmt & rFmt, const String & sNewName,
BroadcastStyleOperation(sNewName, eFamily, SFX_STYLESHEET_MODIFIED);
}
-// --> OD 2006-09-27 #i69627#
+// #i69627#
namespace docfunc
{
bool HasOutlineStyleToBeWrittenAsNormalListStyle( SwDoc& rDoc )
@@ -2656,7 +2576,6 @@ namespace docfunc
SwTxtFmtColl* pTxtFmtColl = (*pTxtFmtColls)[i];
if ( pTxtFmtColl->IsDefault() ||
- // pTxtFmtColl->GetOutlineLevel() == NO_NUMBERING ) //#outline level,zhaojianwei
! pTxtFmtColl->IsAssignedToListLevelOfOutlineStyle() ) //<-end,zhaojianwei
{
continue;
@@ -2669,15 +2588,13 @@ namespace docfunc
if ( SFX_ITEM_SET == pParentTxtFmtColl->GetItemState( RES_PARATR_NUMRULE ) )
{
- // --> OD 2009-11-12 #i106218#
- // consider that the outline style is set
+ // #i106218# consider that the outline style is set
const SwNumRuleItem& rDirectItem = pParentTxtFmtColl->GetNumRule();
if ( rDirectItem.GetValue() != rDoc.GetOutlineNumRule()->GetName() )
{
bRet = true;
break;
}
- // <--
}
}
@@ -2685,4 +2602,5 @@ namespace docfunc
return bRet;
}
}
-// <--
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index 80798546d041..6f5d0f509f52 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -313,8 +314,7 @@ void SwDoc::SetFtnInfo(const SwFtnInfo& rInfo)
pFtnInfo->Modify( &aOld, &aNew );
}
- // --> OD 2008-01-09 #i81002#
- // no update during loading
+ // #i81002# no update during loading
if ( !IsInReading() )
{
UpdateRefFlds(NULL);
@@ -378,8 +378,7 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo)
pEndNoteInfo->Modify( &aOld, &aNew );
}
- // --> OD 2008-01-09 #i81002#
- // no update during loading
+ // #i81002# no update during loading
if ( !IsInReading() )
{
UpdateRefFlds(NULL);
@@ -423,8 +422,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
nSttCnt <= *pTxtFtn->GetStart() ) )
{
const SwFmtFtn& rFtn = pTxtFtn->GetFtn();
- if( /*rFtn.GetNumber() != nNumber ||*/
- rFtn.GetNumStr() != rNumStr ||
+ if( rFtn.GetNumStr() != rNumStr ||
rFtn.IsEndNote() != bIsEndNote )
{
bChg = sal_True;
@@ -455,8 +453,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
nEndCnt >= *pTxtFtn->GetStart() ) )
{
const SwFmtFtn& rFtn = pTxtFtn->GetFtn();
- if( /*rFtn.GetNumber() != nNumber ||*/
- rFtn.GetNumStr() != rNumStr ||
+ if( rFtn.GetNumStr() != rNumStr ||
rFtn.IsEndNote() != bIsEndNote )
{
bChg = sal_True;
@@ -503,3 +500,4 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index d31bc4df722a..cc881ca8cd45 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,24 +88,6 @@ sal_Bool SwDoc::GenerateHTMLDoc( const String& rPath, int nOutlineLevel )
sal_Bool SwDoc::GenerateHTMLDoc( const String& rPath,
const SwTxtFmtColl* pSplitColl )
{
-#ifdef JP_TEST
- if( !pSplitColl )
- {
- sal_uInt8 nLvl = 1;
- const SwTxtFmtColls& rFmtColls =*GetTxtFmtColls();
- for( sal_uInt16 n = rFmtColls.Count(); n; )
- //if( nLvl == rFmtColls[ --n ]->GetOutlineLevel() )//#outline level,zhaojianwei
- if( nLvl == rFmtColls[ --n ]->GetAttrOutlineLevel() -1 )//<-end,zhaojianwei 0814
- {
- pSplitColl = rFmtColls[ n ];
- break;
- }
-
- if( !pSplitColl )
- pSplitColl = GetTxtCollFromPool( RES_POOLCOLL_HEADLINE2 );
- }
-#endif
-
return SplitDoc( SPLITDOC_TO_HTML, rPath, pSplitColl );
}
@@ -129,7 +112,6 @@ sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath,
{
// wenn keine OutlineNumerierung ist, dann benutze eigenes Array
// und sammel die Nodes zusammen.
- //if( NO_NUMBERING == pSplitColl->GetOutlineLevel() )//#outline level,zhaojianwei
if( pSplitColl->GetAttrOutlineLevel() == 0 )//<-end,zhaojianwei, 0814
{
pOutlNds = new SwOutlineNodes( 8, 8 );
@@ -151,7 +133,6 @@ sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath,
// dann suche die Gliederungs - Vorlage, der 1. Ebene
const SwTxtFmtColls& rFmtColls =*GetTxtFmtColls();
for( sal_uInt16 n = rFmtColls.Count(); n; )
- //if( !rFmtColls[ --n ]->GetOutlineLevel() )//#outline level,zhaojianwei
if ( rFmtColls[ --n ]->GetAttrOutlineLevel() == 1 )//<-end,zhaojianwei
{
pSplitColl = rFmtColls[ n ];
@@ -171,7 +152,6 @@ sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath,
break;
default:
-// case SPLITDOC_TO_GLOBALDOC:
pFilter = SwIoSystem::GetFilterOfFormat(
String::CreateFromAscii( FILTER_XML ));
eDocType = SPLITDOC_TO_GLOBALDOC;
@@ -231,11 +211,6 @@ sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath,
pNd = pOutlNds->GetObject( nOutl );
SwTxtFmtColl* pTColl = pNd->GetTxtNode()->GetTxtColl();
- //if( ( pTColl == pSplitColl || //#outline level,zhaojianwei
- // ( NO_NUMBERING != pSplitColl->GetOutlineLevel() &&
- // pTColl->GetOutlineLevel() <
- // pSplitColl->GetOutlineLevel() )) &&
- // !pNd->FindTableNode() )
if( ( pTColl == pSplitColl ||
( pSplitColl->GetAttrOutlineLevel() > 0 &&
pTColl->GetAttrOutlineLevel() > 0 &&
@@ -358,7 +333,7 @@ sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath,
aTmp.Exchange();
if( !aTmp.Move( fnMoveBackward, fnGoNode ))
{
- ASSERT( sal_False, "kein Node mehr vorhanden" );
+ OSL_ENSURE( sal_False, "kein Node mehr vorhanden" );
}
}
// Bookmarks usw. verschieben
@@ -476,7 +451,6 @@ sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath,
}
} while( pSttNd );
-// if( pOutlNds != (SwOutlineNodes*)&GetNodes().GetOutLineNds();
if( pOutlNds != &GetNodes().GetOutLineNds() )
delete pOutlNds;
@@ -494,7 +468,6 @@ sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath,
}
break;
-// case SPLITDOC_TO_GLOBALDOC:
default:
// dann das Globaldoc speichern
set(IDocumentSettingAccess::GLOBAL_DOCUMENT, true);
@@ -532,7 +505,6 @@ sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, int nOutline
break;
default:
-// case SPLITDOC_TO_GLOBALDOC:
pFilter = SwIoSystem::GetFilterOfFormat(
String::CreateFromAscii( FILTER_XML ));
eDocType = SPLITDOC_TO_GLOBALDOC;
@@ -670,7 +642,6 @@ sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, int nOutline
if( SPLITDOC_TO_HTML == eDocType &&
pDoc->GetSpzFrmFmts()->Count() )
{
- /* SfxViewFrame* pFrame = */
SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
}
xDocSh->DoSaveAs( *pTmpMed );
@@ -709,7 +680,7 @@ sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, int nOutline
aTmp.Exchange();
if( !aTmp.Move( fnMoveBackward, fnGoNode ))
{
- ASSERT( sal_False, "kein Node mehr vorhanden" );
+ OSL_ENSURE( sal_False, "kein Node mehr vorhanden" );
}
}
// Bookmarks usw. verschieben
@@ -854,3 +825,4 @@ sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, int nOutline
return pRet && pRet->GetValue();
}//<-end,zhaojianwei
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx
index 610a8fb170b8..350bde67062c 100644
--- a/sw/source/core/doc/docglos.cxx
+++ b/sw/source/core/doc/docglos.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,7 +106,7 @@ static void lcl_copyDocumentProperties(
}
}
-/* -----------------22.07.99 11:47-------------------
+/* --------------------------------------------------
Description: inserts an AutoText block
--------------------------------------------------*/
sal_Bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const String& rEntry,
@@ -115,8 +116,6 @@ sal_Bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const String& rEntry,
sal_uInt16 nIdx = rBlock.GetIndex( rEntry );
if( (sal_uInt16) -1 != nIdx )
{
- // Bug #70238# ask the TextOnly-Flag before BeginGetDoc, because
- // the method closed the Storage!
sal_Bool bSav_IsInsGlossary = mbInsOnlyTxtGlssry;
mbInsOnlyTxtGlssry = rBlock.IsOnlyTextBlock( nIdx );
@@ -201,3 +200,4 @@ sal_Bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const String& rEntry,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 98179bd1d8ea..fe7b0626300a 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,7 +56,6 @@
#include <rtl/logfile.hxx>
#include <SwStyleNameMapper.hxx>
#include <fchrfmt.hxx>
-#include <errhdl.hxx>
#include <frmatr.hxx>
#include <txatbase.hxx>
#include <fmtfld.hxx>
@@ -67,7 +67,6 @@
#include <fmtflcnt.hxx>
#include <fmtcnct.hxx>
#include <frmfmt.hxx>
-#include <dcontact.hxx>
#include <txtflcnt.hxx>
#include <docfld.hxx> // fuer Expression-Felder
#include <pam.hxx>
@@ -101,21 +100,18 @@
#include <PostItMgr.hxx>
#include <comcore.hrc> // STR-ResId's
-// #i11176#
#include <unoframe.hxx>
-// OD 2004-05-24 #i28701#
+
#include <sortedobjs.hxx>
-// --> OD 2004-07-26 #i32089#
#include <vector>
-// <--
using namespace ::com::sun::star;
using ::rtl::OUString;
#define DEF_FLY_WIDTH 2268 //Defaultbreite fuer FlyFrms (2268 == 4cm)
-/* #109161# */
+
static bool lcl_IsItemSet(const SwCntntNode & rNode, sal_uInt16 which)
{
bool bResult = false;
@@ -135,11 +131,7 @@ static bool lcl_IsItemSet(const SwCntntNode & rNode, sal_uInt16 which)
|* entsprechende Formate-Array gestellt.
|* Wenn bereits ein passendes Format existiert, so wird dies
|* zurueckgeliefert.
-|* Ersterstellung MA 22. Sep. 92
-|* Letzte Aenderung JP 08.05.98
-|*
|*************************************************************************/
-
SwFrmFmt *SwDoc::MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet )
{
SwFrmFmt *pFmt = 0;
@@ -206,34 +198,32 @@ SwFrmFmt *SwDoc::MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet )
}
break;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
case FLY_AT_PAGE:
case FLY_AT_CHAR:
case FLY_AT_FLY:
case FLY_AT_PARA:
case FLY_AS_CHAR:
- ASSERT( false, "use new interface instead: SwDoc::MakeFlySection!" );
+ OSL_ENSURE( false, "use new interface instead: SwDoc::MakeFlySection!" );
break;
#endif
default:
- ASSERT( !this,
+ OSL_ENSURE( !this,
"Layoutformat mit ungueltigem Request angefordert." );
}
return pFmt;
}
+
/*************************************************************************
|*
|* SwDoc::DelLayoutFmt()
|*
|* Beschreibung Loescht das angegebene Format, der Inhalt wird mit
|* geloescht.
-|* Ersterstellung MA 23. Sep. 92
-|* Letzte Aenderung MA 05. Feb. 93
|*
|*************************************************************************/
-
void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt )
{
//Verkettung von Rahmen muss ggf. zusammengefuehrt werden.
@@ -260,18 +250,6 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt )
SwOLENode* pOLENd = GetNodes()[ pCntIdx->GetIndex()+1 ]->GetOLENode();
if( pOLENd && pOLENd->GetOLEObj().IsOleRef() )
{
- /*
- SwDoc* pDoc = (SwDoc*)pFmt->GetDoc();
- if( pDoc )
- {
- SfxObjectShell* p = pDoc->GetPersist();
- if( p ) // muss da sein
- {
- SvInfoObjectRef aRef( p->Find( pOLENd->GetOLEObj().GetName() ) );
- if( aRef.Is() )
- aRef->SetObj(0);
- }
- } */
// TODO/MBA: the old object closed the object, cleared all references to it, but didn't remove it from the container.
// I have no idea, why, nobody could explain it - so I do my very best to mimic this behavior
@@ -287,7 +265,6 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt )
}
}
- //pOLENd->GetOLEObj().GetOleRef() = 0;
}
}
@@ -303,7 +280,7 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt )
}
else
{
- // --> OD 2004-07-26 #i32089# - delete at-frame anchored objects
+ // #i32089# - delete at-frame anchored objects
if ( nWh == RES_FLYFRMFMT )
{
// determine frame formats of at-frame anchored objects
@@ -388,22 +365,18 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt )
|* Vom chaos::Anchor-Attribut wird die Position immer
|* auf 0 gesetzt !!!
|*
-|* Ersterstellung BP 18.12.92
-|* Letzte Aenderung MA 17. Jul. 96
-|*
|*************************************************************************/
-
SwFrmFmt *SwDoc::CopyLayoutFmt( const SwFrmFmt& rSource,
const SwFmtAnchor& rNewAnchor,
bool bSetTxtFlyAtt, bool bMakeFrms )
{
const bool bFly = RES_FLYFRMFMT == rSource.Which();
const bool bDraw = RES_DRAWFRMFMT == rSource.Which();
- ASSERT( bFly || bDraw, "this method only works for fly or draw" );
+ OSL_ENSURE( bFly || bDraw, "this method only works for fly or draw" );
SwDoc* pSrcDoc = (SwDoc*)rSource.GetDoc();
- // #108784# may we copy this object?
+ // May we copy this object?
// We may, unless it's 1) it's a control (and therfore a draw)
// 2) anchored in a header/footer
// 3) anchored (to paragraph?)
@@ -505,16 +478,16 @@ SwFrmFmt *SwDoc::CopyLayoutFmt( const SwFrmFmt& rSource,
}
else
{
- ASSERT( RES_DRAWFRMFMT == rSource.Which(), "Weder Fly noch Draw." );
- // OD 2005-08-02 #i52780# - Note: moving object to visible layer not needed.
+ OSL_ENSURE( RES_DRAWFRMFMT == rSource.Which(), "Weder Fly noch Draw." );
+ // #i52780# - Note: moving object to visible layer not needed.
SwDrawContact* pSourceContact = (SwDrawContact *)rSource.FindContactObj();
SwDrawContact* pContact = new SwDrawContact( (SwDrawFrmFmt*)pDest,
CloneSdrObj( *pSourceContact->GetMaster(),
mbCopyIsMove && this == pSrcDoc ) );
- // --> OD 2005-05-23 #i49730# - notify draw frame format
- // that position attributes are already set, if the position attributes
- // are already set at the source draw frame format.
+ // #i49730# - notify draw frame format that position attributes are
+ // already set, if the position attributes are already set at the
+ // source draw frame format.
if ( pDest->ISA(SwDrawFrmFmt) &&
rSource.ISA(SwDrawFrmFmt) &&
static_cast<const SwDrawFrmFmt&>(rSource).IsPosAttrSet() )
@@ -525,8 +498,7 @@ SwFrmFmt *SwDoc::CopyLayoutFmt( const SwFrmFmt& rSource,
if( pDest->GetAnchor() == rNewAnchor )
{
- // OD 03.07.2003 #108784# - do *not* connect to layout, if
- // a <MakeFrms> will not be called.
+ // Do *not* connect to layout, if a <MakeFrms> will not be called.
if ( bMakeFrms )
{
pContact->ConnectToLayout( &rNewAnchor );
@@ -558,9 +530,8 @@ SwFrmFmt *SwDoc::CopyLayoutFmt( const SwFrmFmt& rSource,
SdrObject* SwDoc::CloneSdrObj( const SdrObject& rObj, sal_Bool bMoveWithinDoc,
sal_Bool bInsInPage )
{
- // --> OD 2005-08-08 #i52858# - method name changed
+ // #i52858# - method name changed
SdrPage *pPg = GetOrCreateDrawModel()->GetPage( 0 );
- // <--
if( !pPg )
{
pPg = GetDrawModel()->AllocPage( sal_False );
@@ -574,7 +545,7 @@ SdrObject* SwDoc::CloneSdrObj( const SdrObject& rObj, sal_Bool bMoveWithinDoc,
uno::Reference< awt::XControlModel > xModel = ((SdrUnoObj*)pObj)->GetUnoControlModel();
uno::Any aVal;
uno::Reference< beans::XPropertySet > xSet(xModel, uno::UNO_QUERY);
- OUString sName( rtl::OUString::createFromAscii("Name") );
+ OUString sName(RTL_CONSTASCII_USTRINGPARAM("Name"));
if( xSet.is() )
aVal = xSet->getPropertyValue( sName );
if( bInsInPage )
@@ -585,8 +556,7 @@ SdrObject* SwDoc::CloneSdrObj( const SdrObject& rObj, sal_Bool bMoveWithinDoc,
else if( bInsInPage )
pPg->InsertObject( pObj );
- // OD 02.07.2003 #108784# - for drawing objects: set layer of cloned object
- // to invisible layer
+ // For drawing objects: set layer of cloned object to invisible layer
SdrLayerID nLayerIdForClone = rObj.GetLayer();
if ( !pObj->ISA(SwFlyDrawObj) &&
!pObj->ISA(SwVirtFlyDrawObj) &&
@@ -649,8 +619,8 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
// Anker noch nicht gesetzt ?
RndStdIds eAnchorId = pAnchor ? pAnchor->GetAnchorId()
: pFmt->GetAnchor().GetAnchorId();
- // --> OD 2010-01-07 #i107811#
- // Assure that at-page anchored fly frames have a page num or a content anchor set.
+ // #i107811# Assure that at-page anchored fly frames have a page num or a
+ // content anchor set.
if ( !pAnchor ||
( FLY_AT_PAGE != pAnchor->GetAnchorId() &&
!pAnchor->GetCntntAnchor() ) ||
@@ -694,7 +664,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
xub_StrLen nStt = rAnchPos.nContent.GetIndex();
SwTxtNode * pTxtNode = rAnchPos.nNode.GetNode().GetTxtNode();
- ASSERT(pTxtNode!= 0, "There should be a SwTxtNode!");
+ OSL_ENSURE(pTxtNode!= 0, "There should be a SwTxtNode!");
if (pTxtNode != NULL)
{
@@ -773,7 +743,7 @@ SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType,
sal_uInt16 nCollId = static_cast<sal_uInt16>(
get(IDocumentSettingAccess::HTML_MODE) ? RES_POOLCOLL_TEXT : RES_POOLCOLL_FRAME );
- /* #109161# If there exists no adjust item in the paragraph
+ /* If there exists no adjust item in the paragraph
style for the content node of the new fly section
propagate an existing adjust item at the anchor to the new
content node. */
@@ -814,7 +784,7 @@ SwFlyFrmFmt* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
{
do { // middle check loop
const SwFmtCntnt &rCntnt = pFmt->GetCntnt();
- ASSERT( rCntnt.GetCntntIdx(), "Kein Inhalt vorbereitet." );
+ OSL_ENSURE( rCntnt.GetCntntIdx(), "Kein Inhalt vorbereitet." );
SwNodeIndex aIndex( *(rCntnt.GetCntntIdx()), 1 );
SwCntntNode *pNode = aIndex.GetNode().GetCntntNode();
@@ -863,7 +833,7 @@ SwFlyFrmFmt* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
// wenn Tabelle im Rahmen, dann ohne nachfolgenden TextNode
aIndex = rCntnt.GetCntntIdx()->GetNode().EndOfSectionIndex() - 1;
- ASSERT( aIndex.GetNode().GetTxtNode(),
+ OSL_ENSURE( aIndex.GetNode().GetTxtNode(),
"hier sollte ein TextNode stehen" );
aPos.nContent.Assign( 0, 0 ); // Index abmelden !!
GetNodes().Delete( aIndex, 1 );
@@ -878,15 +848,6 @@ if( GetIDocumentUndoRedo().DoesUndo() )
}
else
{
-/*
- // alle Pams verschieben
- SwPaM* pTmp = (SwPaM*)&rPam;
- do {
- if( pTmp->HasMark() &&
- *pTmp->GetPoint() != *pTmp->GetMark() )
- MoveAndJoin( *pTmp, aPos );
- } while( &rPam != ( pTmp = (SwPaM*)pTmp->GetNext() ) );
-*/
// copy all Pams and then delete all
SwPaM* pTmp = (SwPaM*)&rPam;
sal_Bool bOldFlag = mbCopyIsMove;
@@ -924,9 +885,8 @@ if( GetIDocumentUndoRedo().DoesUndo() )
return pFmt;
}
-
- //Einfuegen eines DrawObjectes. Das Object muss bereits im DrawModel
- // angemeldet sein.
+// Einfuegen eines DrawObjectes. Das Object muss bereits im DrawModel
+// angemeldet sein.
SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg,
SdrObject& rDrawObj,
const SfxItemSet* pFlyAttrSet,
@@ -962,8 +922,8 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg,
: &rRg.GetPoint()->nNode;
}
- // OD 24.06.2003 #108784# - allow drawing objects in header/footer, but
- // control objects aren't allowed in header/footer.
+ // Allow drawing objects in header/footer, but control objects aren't
+ // allowed in header/footer.
if( pChkIdx &&
::CheckControlLayer( &rDrawObj ) &&
IsInHeaderFooter( *pChkIdx ) )
@@ -1008,14 +968,13 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg,
if( GetRootFrm() )
{
pFmt->MakeFrms();
- // --> OD 2005-02-09 #i42319# - follow-up of #i35635#
+ // #i42319# - follow-up of #i35635#
// move object to visible layer
- // --> OD 2007-07-10 #i79391#
+ // #i79391#
if ( pContact->GetAnchorFrm() )
{
pContact->MoveObjToVisibleLayer( &rDrawObj );
}
- // <--
}
if (GetIDocumentUndoRedo().DoesUndo())
@@ -1027,26 +986,6 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg,
return pFmt;
}
-/*************************************************************************
-|*
-|* SwDoc::GetAllFlyFmts
-|*
-|* Ersterstellung MA 14. Jul. 93
-|* Letzte Aenderung MD 23. Feb. 95
-|*
-|*************************************************************************/
-
-/*sal_Bool TstFlyRange( const SwPaM* pPam, sal_uInt32 nFlyPos )
-{
- sal_Bool bOk = sal_False;
- const SwPaM* pTmp = pPam;
- do {
- bOk = pTmp->Start()->nNode.GetIndex() < nFlyPos &&
- pTmp->End()->nNode.GetIndex() > nFlyPos;
- } while( !bOk && pPam != ( pTmp = (const SwPaM*)pTmp->GetNext() ));
- return bOk;
-}
-*/
/* -----------------------------04.04.00 10:55--------------------------------
paragraph frames - o.k. if the PaM includes the paragraph from the beginning
to the beginning of the next paragraph at least
@@ -1087,7 +1026,6 @@ sal_Bool TstFlyRange( const SwPaM* pPam, const SwPosition* pFlyPos,
return bOk;
}
-
void SwDoc::GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts,
const SwPaM* pCmpRange, sal_Bool bDrawAlso ) const
{
@@ -1179,9 +1117,6 @@ void SwDoc::GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts,
|*
|* SwDoc::InsertLabel()
|*
-|* Ersterstellung MA 11. Feb. 94
-|* Letzte Aenderung MA 12. Nov. 97
-|*
|*************************************************************************/
/* #i6447# changed behaviour if lcl_CpyAttr:
@@ -1195,7 +1130,6 @@ void SwDoc::GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts,
Otherwise the new set will not be changed.
*/
-
void lcl_CpyAttr( SfxItemSet &rNewSet, const SfxItemSet &rOldSet, sal_uInt16 nWhich )
{
const SfxPoolItem *pOldItem = NULL, *pNewItem = NULL;
@@ -1215,17 +1149,16 @@ void lcl_CpyAttr( SfxItemSet &rNewSet, const SfxItemSet &rOldSet, sal_uInt16 nWh
rNewSet.Put( *pOldItem );
}
else {
- ASSERT(0, "What am I doing here?");
+ OSL_ENSURE(0, "What am I doing here?");
}
}
else {
- ASSERT(0, "What am I doing here?");
+ OSL_ENSURE(0, "What am I doing here?");
}
}
}
-
static SwFlyFrmFmt *
lcl_InsertLabel(SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
SwUndoInsertLabel *const pUndo,
@@ -1278,7 +1211,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
//einfuegen (Frame wird automatisch erzeugt).
{
SwStartNode *pSttNd = rDoc.GetNodes()[nNdIdx]->GetStartNode();
- ASSERT( pSttNd, "Kein StartNode in InsertLabel." );
+ OSL_ENSURE( pSttNd, "Kein StartNode in InsertLabel." );
sal_uLong nNode;
if( bBefore )
{
@@ -1311,7 +1244,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
//Erstmal das Format zum Fly besorgen und das Layout entkoppeln.
SwFrmFmt *pOldFmt = rDoc.GetNodes()[nNdIdx]->GetFlyFmt();
- ASSERT( pOldFmt, "Format des Fly nicht gefunden." );
+ OSL_ENSURE( pOldFmt, "Format des Fly nicht gefunden." );
pOldFmt->DelFrms();
pNewFmt = rDoc.MakeFlyFrmFmt( rDoc.GetUniqueFrameName(),
@@ -1390,14 +1323,14 @@ lcl_InsertLabel(SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
{
const SwPosition *pPos = rAnchor.GetCntntAnchor();
SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
- ASSERT( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
+ OSL_ENSURE( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
const xub_StrLen nIdx = pPos->nContent.GetIndex();
SwTxtAttr * const pHnt =
pTxtNode->GetTxtAttrForCharAt(nIdx, RES_TXTATR_FLYCNT);
- ASSERT( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
+ OSL_ENSURE( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
"Missing FlyInCnt-Hint." );
- ASSERT( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == pOldFmt,
+ OSL_ENSURE( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == pOldFmt,
"Wrong TxtFlyCnt-Hint." );
const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt()).SetFlyFmt(
@@ -1455,7 +1388,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
default:
OSL_ENSURE(false, "unknown LabelType?");
}
- ASSERT( pNew, "No Label inserted" );
+ OSL_ENSURE( pNew, "No Label inserted" );
if( pNew )
{
//#i61007# order of captions
@@ -1571,11 +1504,7 @@ SwDoc::InsertLabel(
|*
|* SwDoc::InsertDrawLabel()
|*
-|* Ersterstellung MIB 7. Dez. 98
-|* Letzte Aenderung MIB 7. Dez. 98
-|*
|*************************************************************************/
-
static SwFlyFrmFmt *
lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
SwUndoInsertLabel *const pUndo, SwDrawFrmFmt *const pOldFmt,
@@ -1588,6 +1517,8 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
{
::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
::sw::DrawUndoGuard const drawUndoGuard(rDoc.GetIDocumentUndoRedo());
+ OSL_ENSURE( RES_DRAWFRMFMT == pContact->GetFmt()->Which(),
+ "Kein DrawFrmFmt" );
// Erstmal das Feld bauen, weil ueber den Namen die TxtColl besorgt
// werden muss
@@ -1623,7 +1554,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
// dem Object (Grafik/Ole) absatzgebunden in den neuen Rahmen,
// Frames erzeugen.
- // OD 27.11.2003 #112045# - Keep layer ID of drawing object before removing
+ // Keep layer ID of drawing object before removing
// its frames.
// Note: The layer ID is passed to the undo and have to be the correct value.
// Removing the frames of the drawing object changes its layer.
@@ -1651,7 +1582,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
lcl_CpyAttr( *pNewSet, pOldFmt->GetAttrSet(), RES_SURROUND );
// Den Rahmen ggf. in den Hintergrund schicken.
- // OD 02.07.2003 #108784# - consider 'invisible' hell layer.
+ // Consider 'invisible' hell layer.
if ( rDoc.GetHellId() != nLayerId &&
rDoc.GetInvisibleHellId() != nLayerId )
{
@@ -1661,7 +1592,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
}
// Position uebernehmen
- // OD 2004-04-15 #i26791# - use directly the positioning attributes of
+ // #i26791# - use directly the positioning attributes of
// the drawing object.
pNewSet->Put( pOldFmt->GetHoriOrient() );
pNewSet->Put( pOldFmt->GetVertOrient() );
@@ -1705,15 +1636,15 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
{
const SwPosition *pPos = rAnchor.GetCntntAnchor();
SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
- ASSERT( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
+ OSL_ENSURE( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
const xub_StrLen nIdx = pPos->nContent.GetIndex();
SwTxtAttr * const pHnt =
pTxtNode->GetTxtAttrForCharAt( nIdx, RES_TXTATR_FLYCNT );
-#ifdef DBG_UTIL
- ASSERT( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
"Missing FlyInCnt-Hint." );
- ASSERT( pHnt && ((SwFmtFlyCnt&)pHnt->GetFlyCnt()).
+ OSL_ENSURE( pHnt && ((SwFmtFlyCnt&)pHnt->GetFlyCnt()).
GetFrmFmt() == (SwFrmFmt*)pOldFmt,
"Wrong TxtFlyCnt-Hint." );
#endif
@@ -1728,9 +1659,9 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
pNewSet->Put( SwFmtSurround( SURROUND_NONE ) );
if (nLayerId == rDoc.GetHellId())
{
+ // Consider drawing objects in 'invisible' hell layer
rSdrObj.SetLayer( rDoc.GetHeavenId() );
}
- // OD 02.07.2003 #108784# - consider drawing objects in 'invisible' hell layer
else if (nLayerId == rDoc.GetInvisibleHellId())
{
rSdrObj.SetLayer( rDoc.GetInvisibleHeavenId() );
@@ -1738,7 +1669,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
pNewSet->Put( SvxLRSpaceItem( RES_LR_SPACE ) );
pNewSet->Put( SvxULSpaceItem( RES_UL_SPACE ) );
- // OD 2004-04-15 #i26791# - set position of the drawing object, which is labeled.
+ // #i26791# - set position of the drawing object, which is labeled.
pNewSet->Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ) );
pNewSet->Put( SwFmtHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::FRAME ) );
@@ -1753,7 +1684,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
if( pUndo )
{
pUndo->SetFlys( *pOldFmt, *pNewSet, *pNewFmt );
- // OD 2004-04-15 #i26791# - position no longer needed
+ // #i26791# - position no longer needed
pUndo->SetDrawObj( nLayerId );
}
else
@@ -1765,7 +1696,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
//wir vorhanden Methoden (insb. fuer InCntFlys etwas aufwendig).
pNewFmt->MakeFrms();
- ASSERT( pNew, "No Label inserted" );
+ OSL_ENSURE( pNew, "No Label inserted" );
if( pNew )
{
@@ -1872,7 +1803,6 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel(
|* IDocumentTimerAccess-methods
|*
|*************************************************************************/
-
void SwDoc::StartIdling()
{
mbStartIdleTimer = sal_True;
@@ -1899,16 +1829,11 @@ void SwDoc::UnblockIdling()
aIdleTimer.Start();
}
-
/*************************************************************************
|*
|* SwDoc::DoIdleJobs()
|*
-|* Ersterstellung OK 30.03.94
-|* Letzte Aenderung MA 09. Jun. 95
-|*
|*************************************************************************/
-
IMPL_LINK( SwDoc, DoIdleJobs, Timer *, pTimer )
{
#ifdef TIMELOG
@@ -1937,8 +1862,8 @@ IMPL_LINK( SwDoc, DoIdleJobs, Timer *, pTimer )
sal_Bool bIsOnlineSpell = pSh->GetViewOptions()->IsOnlineSpell();
sal_Bool bIsAutoGrammar = sal_False;
- SvtLinguConfig().GetProperty( ::rtl::OUString::createFromAscii(
- UPN_IS_GRAMMAR_AUTO ) ) >>= bIsAutoGrammar;
+ SvtLinguConfig().GetProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ UPN_IS_GRAMMAR_AUTO )) ) >>= bIsAutoGrammar;
if (bIsOnlineSpell && bIsAutoGrammar)
StartGrammarChecking( *this );
@@ -2273,7 +2198,7 @@ sal_Bool SwDoc::IsInHeaderFooter( const SwNodeIndex& rIdx ) const
}
if( n >= GetSpzFrmFmts()->Count() )
{
- ASSERT( mbInReading, "Fly-Section aber kein Format gefunden" );
+ OSL_ENSURE( mbInReading, "Fly-Section aber kein Format gefunden" );
return sal_False;
}
}
@@ -2289,13 +2214,12 @@ short SwDoc::GetTextDirection( const SwPosition& rPos,
SwCntntNode *pNd = rPos.nNode.GetNode().GetCntntNode();
- // --> OD 2005-02-21 #i42921# - use new method <SwCntntNode::GetTextDirection(..)>
+ // #i42921# - use new method <SwCntntNode::GetTextDirection(..)>
if ( pNd )
{
nRet = pNd->GetTextDirection( rPos, pPt );
}
if ( nRet == -1 )
- // <--
{
const SvxFrameDirectionItem* pItem = 0;
if( pNd )
@@ -2349,3 +2273,5 @@ void SwDoc::SetRootFrm( SwRootFrm* pNew ) { pLayout = pNew; }
SwLayouter* SwDoc::GetLayouter() { return pLayouter; }
const SwLayouter* SwDoc::GetLayouter() const { return pLayouter; }
void SwDoc::SetLayouter( SwLayouter* pNew ) { pLayouter = pNew; }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index cdf031aeb923..a396ef295d27 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,37 +103,29 @@
#include <cmdid.h> // fuer den dflt - Printer in SetJob
-// --> OD 2006-04-19 #b6375613#
#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
#include <com/sun/star/beans/XPropertyContainer.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-// <--
-
-// --> OD 2007-03-16 #i73788#
#include <pausethreadstarting.hxx>
-// <--
#include <numrule.hxx>
-// --> OD 2008-03-13 #refactorlists#
#include <list.hxx>
#include <listfunc.hxx>
-// <--
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <sfx2/Metadatable.hxx>
#include <fmtmeta.hxx> // MetaFieldManager
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::document;
-const sal_Char __FAR_DATA sFrmFmtStr[] = "Frameformat";
-const sal_Char __FAR_DATA sEmptyPageStr[] = "Empty Page";
-const sal_Char __FAR_DATA sColumnCntStr[] = "Columncontainer";
-const sal_Char __FAR_DATA sCharFmtStr[] = "Zeichenformat";
-const sal_Char __FAR_DATA sTxtCollStr[] = "Textformatvorlage";
-const sal_Char __FAR_DATA sGrfCollStr[] = "Graphikformatvorlage";
+const sal_Char sFrmFmtStr[] = "Frameformat";
+const sal_Char sEmptyPageStr[] = "Empty Page";
+const sal_Char sColumnCntStr[] = "Columncontainer";
+const sal_Char sCharFmtStr[] = "Zeichenformat";
+const sal_Char sTxtCollStr[] = "Textformatvorlage";
+const sal_Char sGrfCollStr[] = "Graphikformatvorlage";
SV_IMPL_PTRARR( SwNumRuleTbl, SwNumRulePtr)
SV_IMPL_PTRARR( SwTxtFmtColls, SwTxtFmtCollPtr)
@@ -141,7 +134,6 @@ SV_IMPL_PTRARR( SwGrfFmtColls, SwGrfFmtCollPtr)
/*
* global functions...
*/
-
uno::Reference< linguistic2::XProofreadingIterator > SwDoc::GetGCIterator() const
{
if (!m_xGCIterator.is() && SvtLinguConfig().HasGrammarChecker())
@@ -151,13 +143,13 @@ SV_IMPL_PTRARR( SwGrfFmtColls, SwGrfFmtCollPtr)
{
try
{
- rtl::OUString aServiceName( rtl::OUString::createFromAscii("com.sun.star.linguistic2.ProofreadingIterator") );
+ rtl::OUString aServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ProofreadingIterator"));
m_xGCIterator = uno::Reference< linguistic2::XProofreadingIterator >
( xMgr->createInstance( aServiceName ), uno::UNO_QUERY_THROW );
}
catch (uno::Exception &)
{
- DBG_ERROR( "No GCIterator" );
+ OSL_FAIL( "No GCIterator" );
}
}
}
@@ -200,9 +192,6 @@ void StartGrammarChecking( SwDoc &rDoc )
/*
* interne Funktionen
*/
-
-
-
sal_Bool lcl_DelFmtIndizes( const SwFrmFmtPtr& rpFmt, void* )
{
SwFmtCntnt &rFmtCntnt = (SwFmtCntnt&)rpFmt->GetCntnt();
@@ -217,7 +206,6 @@ sal_Bool lcl_DelFmtIndizes( const SwFrmFmtPtr& rpFmt, void* )
/*
* exportierte Methoden
*/
-
SwDoc::SwDoc()
: m_pNodes( new SwNodes(this) )
,
@@ -261,27 +249,21 @@ SwDoc::SwDoc()
pURLStateChgd( 0 ),
pNumberFormatter( 0 ),
pNumRuleTbl( new SwNumRuleTbl ),
- // --> OD 2008-03-26 #refactorlists#
maLists(),
maListStyleLists(),
- // <--
pRedlineTbl( new SwRedlineTbl ),
pAutoFmtRedlnComment( 0 ),
pUnoCrsrTbl( new SwUnoCrsrTbl( 0, 16 ) ),
pPgPViewPrtData( 0 ),
pExtInputRing( 0 ),
pLayouter( 0 ),
- // --> OD 2008-03-07 #refactorlists#
pStyleAccess( 0 ),
- // <--
pLayoutCache( 0 ),
pUnoCallBack(new SwModify(0)),
mpGrammarContact( 0 ),
aChartDataProviderImplRef(),
pChartControllerHelper( 0 ),
- // --> OD 2007-10-31 #i83479#
- mpListItemsList( new tImplSortedNodeNumList() ),
- // <--
+ mpListItemsList( new tImplSortedNodeNumList() ), // #i83479#
m_pXmlIdRegistry(),
nAutoFmtRedlnCommentNo( 0 ),
nLinkUpdMode( GLOBALSETTING ),
@@ -292,12 +274,10 @@ SwDoc::SwDoc()
mIdleBlockCount(0),
nLockExpFld( 0 ),
mbReadlineChecked(false),
- // --> OD 2005-02-11 #i38810#
- mbLinksUpdated( sal_False ),
+ mbLinksUpdated( sal_False ), //#i38810#
mbClipBoard( false ),
mbColumnSelection( false ),
- // i#78591#
- mbProtectForm(false),
+ mbProtectForm(false), // i#78591#
n32DummyCompatabilityOptions1(0),
n32DummyCompatabilityOptions2(0),
mbStartIdleTimer(sal_False)
@@ -329,12 +309,10 @@ SwDoc::SwDoc()
mbInsOnlyTxtGlssry =
mbContains_MSVBasic =
mbKernAsianPunctuation =
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
mbXMLExport =
#endif
- // --> OD 2006-03-21 #b6375613#
mbApplyWorkaroundForB6375613 =
- // <--
false;
mbNewFldLst =
@@ -375,9 +353,9 @@ SwDoc::SwDoc()
mbUnixForceZeroExtLeading = false; // hidden
mbOldPrinterMetrics = false; // hidden
mbTabRelativeToIndent = true; // hidden
- // --> OD 2008-06-05 #i89181#
- mbTabAtLeftIndentForParagraphsInList = false; // hidden
- // <--
+ mbTabAtLeftIndentForParagraphsInList = false; // hidden #i89181#
+ mbInvertBorderSpacing = false; // hidden
+ mbCollapseEmptyCellPara = true; // hidden
//
// COMPATIBILITY FLAGS END
@@ -415,18 +393,13 @@ SwDoc::SwDoc()
_InitFieldTypes();
// lege (fuer die Filter) eine Default-OutlineNumRule an
- // --> OD 2008-02-11 #newlistlevelattrs#
pOutlineRule = new SwNumRule( String::CreateFromAscii( SwNumRule::GetOutlineRuleName() ),
- // --> OD 2008-06-06 #i89178#
+ // #i89178#
numfunc::GetDefaultPositionAndSpaceMode(),
- // <--
OUTLINE_RULE );
- // <--
- // #115901#
AddNumRule(pOutlineRule);
- // --> OD 2005-10-21 - counting of phantoms depends on <IsOldNumbering()>
+ // Counting of phantoms depends on <IsOldNumbering()>
pOutlineRule->SetCountPhantoms( !get(IDocumentSettingAccess::OLD_NUMBERING) );
- // <--
new SwTxtNode(
SwNodeIndex(GetUndoManager().GetUndoNodes().GetEndOfContent()),
@@ -447,7 +420,6 @@ SwDoc::SwDoc()
// create TOXTypes
InitTOXTypes();
- // --> OD 2008-03-07 #refactorlists#
// pass empty item set containing the paragraph's list attributes
// as ignorable items to the stype manager.
{
@@ -456,7 +428,6 @@ SwDoc::SwDoc()
0 );
pStyleAccess = createStyleManager( &aIgnorableParagraphItems );
}
- // <--
ResetModified();
}
@@ -467,8 +438,6 @@ SwDoc::SwDoc()
* Dieser darf also keinesfalls durch delete geloescht
* werden!!!!!!!!!!
*/
-
-
SwDoc::~SwDoc()
{
// nothing here should create Undo actions!
@@ -479,14 +448,10 @@ SwDoc::~SwDoc()
pDocShell->SetUndoManager(0);
}
- // --> OD 2007-03-16 #i73788#
- SwPauseThreadStarting aPauseThreadStarting;
- // <--
- // --> OD 2007-11-01 #i83479#
+ // #i83479#
delete mpListItemsList;
mpListItemsList = 0;
- // <--
// clean up chart related structures...
// Note: the chart data provider gets already diposed in ~SwDocShell
@@ -514,9 +479,7 @@ SwDoc::~SwDoc()
delete pURLStateChgd;
delete pLayouter;
- // --> OD 2005-09-05 #125370#
pLayouter = 0L;
- // <--
// Undo-Benachrichtigung vom Draw abschalten
if( pDrawModel )
@@ -614,7 +577,7 @@ SwDoc::~SwDoc()
pFtnColl = pEndNoteInfo->GetFtnTxtColl();
if ( pFtnColl ) pFtnColl->Remove(pEndNoteInfo);
- ASSERT( pDfltTxtFmtColl == (*pTxtFmtCollTbl)[0],
+ OSL_ENSURE( pDfltTxtFmtColl == (*pTxtFmtCollTbl)[0],
"Default-Text-Collection muss immer am Anfang stehen" );
// JP 27.01.98: opt.: ausgehend davon, das Standard als 2. im Array
@@ -625,7 +588,7 @@ SwDoc::~SwDoc()
pTxtFmtCollTbl->DeleteAndDestroy( 1, pTxtFmtCollTbl->Count()-1 );
delete pTxtFmtCollTbl;
- ASSERT( pDfltGrfFmtColl == (*pGrfFmtCollTbl)[0],
+ OSL_ENSURE( pDfltGrfFmtColl == (*pGrfFmtCollTbl)[0],
"Default-Grf-Collection muss immer am Anfang stehen" );
pGrfFmtCollTbl->DeleteAndDestroy( 1, pGrfFmtCollTbl->Count()-1 );
@@ -673,9 +636,8 @@ SwDoc::~SwDoc()
delete pDfltGrfFmtColl;
delete pNumRuleTbl;
- // --> OD 2008-03-26 #refactorlists#
{
- for ( std::hash_map< String, SwList*, StringHash >::iterator
+ for ( boost::unordered_map< String, SwList*, StringHash >::iterator
aListIter = maLists.begin();
aListIter != maLists.end();
++aListIter )
@@ -685,7 +647,6 @@ SwDoc::~SwDoc()
maLists.clear();
}
maListStyleLists.clear();
- // <--
delete pPrtData;
delete pNumberFormatter;
@@ -706,19 +667,15 @@ SwDoc::~SwDoc()
SfxItemPool::Free(mpAttrPool);
}
-//---------------------------------------------------
-
VirtualDevice& SwDoc::CreateVirtualDevice_() const
{
VirtualDevice* pNewVir = new VirtualDevice( 1 );
- // <--
pNewVir->SetReferenceDevice( VirtualDevice::REFDEV_MODE_MSO1 );
- // --> FME 2006-10-09 #i60945# External leading compatibility for unix systems.
+ // #i60945# External leading compatibility for unix systems.
if ( get(IDocumentSettingAccess::UNIX_FORCE_ZERO_EXT_LEADING ) )
pNewVir->Compat_ZeroExtleadBug();
- // <--
MapMode aMapMode( pNewVir->GetMapMode() );
aMapMode.SetMapUnit( MAP_TWIP );
@@ -728,14 +685,12 @@ VirtualDevice& SwDoc::CreateVirtualDevice_() const
return *pVirDev;
}
-//---------------------------------------------------
-
SfxPrinter& SwDoc::CreatePrinter_() const
{
- ASSERT( ! pPrt, "Do not call CreatePrinter_(), call getPrinter() instead" )
+ OSL_ENSURE( ! pPrt, "Do not call CreatePrinter_(), call getPrinter() instead" );
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false, "Printer will be created!" )
+ OSL_ENSURE( false, "Printer will be created!" );
#endif
// wir erzeugen einen default SfxPrinter.
@@ -751,7 +706,6 @@ SfxPrinter& SwDoc::CreatePrinter_() const
const_cast<SwDoc*>(this)->setPrinter( pNewPrt, true, true );
return *pPrt;
}
-//---------------------------------------------------
void SwDoc::SetDocShell( SwDocShell* pDSh )
{
@@ -773,18 +727,14 @@ void SwDoc::SetDocShell( SwDocShell* pDSh )
{
((SwDrawDocument*)pDrawModel)->SetObjectShell( pDocShell );
pDrawModel->SetPersist( pDocShell );
- ASSERT( pDrawModel->GetPersist() == GetPersist(),
+ OSL_ENSURE( pDrawModel->GetPersist() == GetPersist(),
"draw model's persist is out of sync" );
}
}
}
-
// Convenience-Methode, um uebermaessige Includes von docsh.hxx
// zu vermeiden
-
-
-
uno::Reference < embed::XStorage > SwDoc::GetDocStorage()
{
if( pDocShell )
@@ -794,14 +744,11 @@ uno::Reference < embed::XStorage > SwDoc::GetDocStorage()
return NULL;
}
-
-
SfxObjectShell* SwDoc::GetPersist() const
{
return pDocShell ? pDocShell : pLinkMgr->GetPersist();
}
-
void SwDoc::ClearDoc()
{
GetIDocumentUndoRedo().DelAllUndoObj();
@@ -818,7 +765,7 @@ void SwDoc::ClearDoc()
sal_uInt16 n;
while ( 0 != (n = GetSpzFrmFmts()->Count()) )
DelLayoutFmt((*pSpzFrmFmtTbl)[n-1]);
- ASSERT( !pDrawModel || !pDrawModel->GetPage(0)->GetObjCount(),
+ OSL_ENSURE( !pDrawModel || !pDrawModel->GetPage(0)->GetObjCount(),
"not all DrawObjects removed from the page" );
pRedlineTbl->DeleteAndDestroy( 0, pRedlineTbl->Count() );
@@ -852,24 +799,19 @@ void SwDoc::ClearDoc()
GetNodes().Delete( aSttIdx,
GetNodes().GetEndOfContent().GetIndex() - aSttIdx.GetIndex() );
- // --> OD 2006-02-28 #i62440#
+ // #i62440#
// destruction of numbering rules and creation of new outline rule
// *after* the document nodes are deleted.
pOutlineRule = NULL;
pNumRuleTbl->DeleteAndDestroy( 0, pNumRuleTbl->Count() );
// creation of new outline numbering rule
- // --> OD 2008-02-11 #newlistlevelattrs#
pOutlineRule = new SwNumRule( String::CreateFromAscii( SwNumRule::GetOutlineRuleName() ),
- // --> OD 2008-06-06 #i89178#
+ // #i89178#
numfunc::GetDefaultPositionAndSpaceMode(),
- // <--
OUTLINE_RULE );
- // <--
AddNumRule(pOutlineRule);
- // --> OD 2005-10-21 - counting of phantoms depends on <IsOldNumbering()>
+ // Counting of phantoms depends on <IsOldNumbering()>
pOutlineRule->SetCountPhantoms( !get(IDocumentSettingAccess::OLD_NUMBERING) );
- // <--
- // <--
//remove the dummy pagedec from the array and delete all the old ones
aPageDescs.Remove( nDummyPgDsc );
@@ -882,9 +824,9 @@ void SwDoc::ClearDoc()
pFtnColl = pEndNoteInfo->GetFtnTxtColl();
if( pFtnColl ) pFtnColl->Remove( pEndNoteInfo );
- // JP 27.01.98: opt.: ausgehend davon, das Standard als 2. im Array
- // steht, sollte das als letztes geloescht werden, damit
- // die ganze Umhaengerei der Formate vermieden wird!
+ // opt.: ausgehend davon, das Standard als 2. im Array
+ // steht, sollte das als letztes geloescht werden, damit
+ // die ganze Umhaengerei der Formate vermieden wird!
if( 2 < pTxtFmtCollTbl->Count() )
pTxtFmtCollTbl->DeleteAndDestroy( 2, pTxtFmtCollTbl->Count()-2 );
pTxtFmtCollTbl->DeleteAndDestroy( 1, pTxtFmtCollTbl->Count()-1 );
@@ -901,7 +843,7 @@ void SwDoc::ClearDoc()
else
pFrmFmtTbl->DeleteAndDestroy( 1, pFrmFmtTbl->Count()-1 );
- xForbiddenCharsTable.unbind();
+ xForbiddenCharsTable.clear();
pFldTypes->DeleteAndDestroy( INIT_FLDTYPES,
pFldTypes->Count() - INIT_FLDTYPES );
@@ -931,19 +873,16 @@ void SwDoc::SetPreViewPrtData( const SwPagePreViewPrtData* pNew )
DELETEZ( pPgPViewPrtData );
SetModified();
}
-/* -----------------------------06.01.00 14:03--------------------------------
- ---------------------------------------------------------------------------*/
SwModify* SwDoc::GetUnoCallBack() const
{
return pUnoCallBack;
}
-/*-----------------28.5.2001 10:06------------------
- * SwDoc:
+
+/** SwDoc:
* Reading and writing of the layout cache.
*--------------------------------------------------*/
-
void SwDoc::ReadLayoutCache( SvStream& rStream )
{
if( !pLayoutCache )
@@ -969,8 +908,8 @@ IGrammarContact* getGrammarContact( const SwTxtNode& rTxtNode )
return pDoc->getGrammarContact();
}
-// --> FME 2005-02-25 #i42634# Moved common code of SwReader::Read() and
-// SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks():
+// #i42634# Moved common code of SwReader::Read() and SwDocShell::UpdateLinks()
+// to new SwDoc::UpdateLinks():
void SwDoc::UpdateLinks( sal_Bool bUI )
{
SfxObjectCreateMode eMode;
@@ -1012,8 +951,7 @@ void SwDoc::UpdateLinks( sal_Bool bUI )
}
}
-// <--
-// --> OD 2006-04-19 #b6375613#
+
void SwDoc::SetApplyWorkaroundForB6375613( bool p_bApplyWorkaroundForB6375613 )
{
if ( mbApplyWorkaroundForB6375613 != p_bApplyWorkaroundForB6375613 )
@@ -1035,13 +973,13 @@ void SwDoc::SetApplyWorkaroundForB6375613( bool p_bApplyWorkaroundForB6375613 )
if ( mbApplyWorkaroundForB6375613 )
{
xDocInfo->addProperty(
- rtl::OUString::createFromAscii("WorkaroundForB6375613Applied"),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkaroundForB6375613Applied")),
beans::PropertyAttribute::TRANSIENT | beans::PropertyAttribute::REMOVABLE,
uno::makeAny( false ) );
}
else
{
- xDocInfo->removeProperty( rtl::OUString::createFromAscii("WorkaroundForB6375613Applied") );
+ xDocInfo->removeProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkaroundForB6375613Applied")) );
}
}
catch( uno::Exception& )
@@ -1051,7 +989,6 @@ void SwDoc::SetApplyWorkaroundForB6375613( bool p_bApplyWorkaroundForB6375613 )
}
}
}
-// <--
::sfx2::IXmlIdRegistry&
SwDoc::GetXmlIdRegistry()
@@ -1113,20 +1050,15 @@ void SwDoc::InitTOXTypes()
pTOXTypes->Insert( pNew, pTOXTypes->Count() );
}
-/*-- 08.05.2009 10:07:57---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
{
SwDoc* pRet = new SwDoc;
//copy settings
- sal_uInt16 __FAR_DATA aRangeOfDefaults[] = {
+ sal_uInt16 aRangeOfDefaults[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
- // --> OD 2008-02-25 #refactorlists##
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
- // <--
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
@@ -1198,6 +1130,7 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
return pRetShell;
}
+
/*-- 08.05.2009 10:52:40---------------------------------------------------
copy document content - code from SwFEShell::Paste( SwDoc* , sal_Bool )
-----------------------------------------------------------------------*/
@@ -1273,3 +1206,5 @@ void SwDoc::Paste( const SwDoc& rSource )
UnlockExpFlds();
UpdateFlds(NULL, false);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 5a559c022c7b..caf34812dd9e 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,10 +60,9 @@
#include <frmatr.hxx>
#include <SwStyleNameMapper.hxx>
#include <SwNodeNum.hxx>
-// --> OD 2008-03-13 #refactorlists#
+
#include <list.hxx>
#include <listfunc.hxx>
-// <--
#include <map>
@@ -90,21 +90,17 @@ void SwDoc::SetOutlineNumRule( const SwNumRule& rRule )
}
pOutlineRule->SetRuleType( OUTLINE_RULE );
- // --> OD 2008-07-08 #i91400#
pOutlineRule->SetName( String::CreateFromAscii(
SwNumRule::GetOutlineRuleName() ),
*this);
- // <--
- // --> OD 2006-09-21 #i69522#
+
// assure that the outline numbering rule is an automatic rule
pOutlineRule->SetAutoRule( sal_True );
- // <--
// teste ob die evt. gesetzen CharFormate in diesem Document
// definiert sind
pOutlineRule->CheckCharFmts( this );
- // --> OD 2008-05-13 #refactorlists#
// notify text nodes, which are registered at the outline style, about the
// changed outline style
SwNumRule::tTxtNodeList aTxtNodeList;
@@ -114,16 +110,14 @@ void SwDoc::SetOutlineNumRule( const SwNumRule& rRule )
{
SwTxtNode* pTxtNd = *aIter;
pTxtNd->NumRuleChgd();
- // --> OD 2009-01-20 #i94152#
+
// assure that list level corresponds to outline level
if ( pTxtNd->GetTxtColl()->IsAssignedToListLevelOfOutlineStyle() &&
pTxtNd->GetAttrListLevel() != pTxtNd->GetTxtColl()->GetAssignedOutlineStyleLevel() )
{
pTxtNd->SetAttrListLevel( pTxtNd->GetTxtColl()->GetAssignedOutlineStyleLevel() );
}
- // <--
}
- // <--
PropagateOutlineRule();
pOutlineRule->SetInvalidRule(sal_True);
@@ -144,20 +138,15 @@ void SwDoc::PropagateOutlineRule()
{
SwTxtFmtColl *pColl = (*pTxtFmtCollTbl)[n];
- // if (NO_NUMBERING != pColl->GetOutlineLevel())//#outline level,zhaojianwei
if(pColl->IsAssignedToListLevelOfOutlineStyle())//<-end,zhaojianwei
{
SwClientIter aIter(*pColl);
- // --> OD 2006-11-20 #i71764#
// Check only the list style, which is set at the paragraph style
const SwNumRuleItem & rCollRuleItem = pColl->GetNumRule( sal_False );
- // <--
- // --> OD 2006-11-20 #i71764#
// Check on document setting OUTLINE_LEVEL_YIELDS_OUTLINE_RULE no longer needed.
if ( rCollRuleItem.GetValue().Len() == 0 )
- // <--
{
SwNumRule * pMyOutlineRule = GetOutlineNumRule();
@@ -172,7 +161,7 @@ void SwDoc::PropagateOutlineRule()
}
}
- // Hoch-/Runterstufen
+// Hoch-/Runterstufen
sal_Bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
{
if( !GetNodes().GetOutLineNds().Count() || !nOffset )
@@ -204,9 +193,6 @@ sal_Bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
for( n = 0; n < pTxtFmtCollTbl->Count(); ++n )
{
- //sal_uInt8 nLevel = (*pTxtFmtCollTbl)[ n ]->GetOutlineLevel();//#outline level,zhaojianwei
- //if( nLevel < MAXLEVEL )
- // aCollArr[ nLevel ] = (*pTxtFmtCollTbl)[ n ];
if((*pTxtFmtCollTbl)[ n ]->IsAssignedToListLevelOfOutlineStyle())
{
const int nLevel = (*pTxtFmtCollTbl)[ n ]->GetAssignedOutlineStyleLevel();
@@ -214,7 +200,6 @@ sal_Bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
}//<-end,zhaojianwei
}
- /* --> #111107# */
/* Find the last occupied level (backward). */
for (n = MAXLEVEL - 1; n > 0; n--)
{
@@ -235,7 +220,6 @@ sal_Bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
SwTxtFmtColl *aTmpColl =
GetTxtCollFromPool(static_cast<sal_uInt16>(RES_POOLCOLL_HEADLINE1 + n));
- //if (aTmpColl->GetOutlineLevel() == n)//#outline level,zhaojianwei
if( aTmpColl->IsAssignedToListLevelOfOutlineStyle() &&
aTmpColl->GetAssignedOutlineStyleLevel() == n )//<-end,zhaojianwei
{
@@ -274,7 +258,6 @@ sal_Bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
}
}
}
- /* <-- #111107# */
/* --> #i13747#
@@ -346,16 +329,14 @@ sal_Bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
{
SwTxtNode* pTxtNd = rOutlNds[ n ]->GetTxtNode();
SwTxtFmtColl* pColl = pTxtNd->GetTxtColl();
-// int nLevel = pColl->GetOutlineLevel();//#outline level,zhaojianwei
-// if (aMoveArr[nLevel] == -1)
-// bMoveApplicable = false;
+
if( pColl->IsAssignedToListLevelOfOutlineStyle() )
{
const int nLevel = pColl->GetAssignedOutlineStyleLevel();
if (aMoveArr[nLevel] == -1)
bMoveApplicable = false;
}//<-end,zhaojianwei
- // --> OD 2008-12-16 #i70748#
+
// Check on outline level attribute of text node, if text node is
// not an outline via a to outline style assigned paragraph style.
else
@@ -366,13 +347,11 @@ sal_Bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
bMoveApplicable = false;
}
}
- // <--
}
if (! bMoveApplicable )
return sal_False;
- /* <-- #i13747 # */
if (GetIDocumentUndoRedo().DoesUndo())
{
GetIDocumentUndoRedo().StartUndo(UNDO_OUTLINE_LR, NULL);
@@ -390,12 +369,9 @@ sal_Bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
if( pColl->IsAssignedToListLevelOfOutlineStyle() )
{
- // ASSERT(pColl->GetOutlineLevel() < MAXLEVEL, //#outline level,removed by zhaojianwei
- // "non outline node in outline nodes?");
- //int nLevel = pColl->GetOutlineLevel();
const int nLevel = pColl->GetAssignedOutlineStyleLevel();//#outline level,add by zhaojianwei
- ASSERT(aMoveArr[nLevel] >= 0,
+ OSL_ENSURE(aMoveArr[nLevel] >= 0,
"move table: current TxtColl not found when building table!");
@@ -430,9 +406,7 @@ sal_Bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
return sal_True;
}
-
-
- // Hoch-/Runter - Verschieben !
+// Hoch-/Runter - Verschieben !
sal_Bool SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
{
// kein Verschiebung in den Sonderbereichen
@@ -449,11 +423,9 @@ sal_Bool SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
sal_uInt16 nAktPos = 0;
SwNodeIndex aSttRg( rStt.nNode ), aEndRg( rEnd.nNode );
- //sal_uInt8 nOutLineLevel = NO_NUMBERING; //#outline level,zhaojianwei
int nOutLineLevel = MAXLEVEL; //<-end,zhaojianwei
SwNode* pSrch = &aSttRg.GetNode();
- //if( pSrch->IsTxtNode() ) //#outline level,zhaojianwei
- // nOutLineLevel = static_cast<sal_uInt8>(((SwTxtNode*)pSrch)->GetOutlineLevel());
+
if( pSrch->IsTxtNode())
nOutLineLevel = static_cast<sal_uInt8>(((SwTxtNode*)pSrch)->GetAttrOutlineLevel()-1);//<-end,zhaojianwei
SwNode* pEndSrch = &aEndRg.GetNode();
@@ -477,7 +449,6 @@ sal_Bool SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
if( GetNodes().GetOutLineNds().Seek_Entry( pEndSrch, &nTmpPos ) )
{
if( !pEndSrch->IsTxtNode() || pEndSrch == pSrch ||
- //nOutLineLevel < ((SwTxtNode*)pEndSrch)->GetOutlineLevel() )//#outline level,zhaojianwei
nOutLineLevel < ((SwTxtNode*)pEndSrch)->GetAttrOutlineLevel()-1 )//<-end,zhaojianwei
++nTmpPos; // For sub outlines only!
}
@@ -489,7 +460,7 @@ sal_Bool SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
nAktPos = nTmpPos;
if( aEndRg == aSttRg )
{
- ASSERT( false, "Moving outlines: Surprising selection" );
+ OSL_ENSURE( false, "Moving outlines: Surprising selection" );
aEndRg++;
}
@@ -571,7 +542,7 @@ sal_Bool SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
if( pNd->FindTableNode() )
return sal_False;
- ASSERT( aSttRg.GetIndex() > nNewPos || nNewPos >= aEndRg.GetIndex(),
+ OSL_ENSURE( aSttRg.GetIndex() > nNewPos || nNewPos >= aEndRg.GetIndex(),
"Position liegt im MoveBereich" );
// wurde ein Position in den Sonderbereichen errechnet, dann
@@ -585,7 +556,6 @@ sal_Bool SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
return MoveParagraph( aPam, nOffs, sal_True );
}
-
sal_uInt16 lcl_FindOutlineName( const SwNodes& rNds, const String& rName,
sal_Bool bExact )
{
@@ -612,8 +582,6 @@ sal_uInt16 lcl_FindOutlineName( const SwNodes& rNds, const String& rName,
return nSavePos;
}
-
-
sal_uInt16 lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
{
// Gueltig Nummern sind (immer nur Offsets!!!):
@@ -660,7 +628,7 @@ sal_uInt16 lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
// Gliederung:
const SwOutlineNodes& rOutlNds = rNds.GetOutLineNds();
// OS: ohne OutlineNodes lohnt die Suche nicht
- // und man spart sich einen Absturz #42958#
+ // und man spart sich einen Absturz
if(!rOutlNds.Count())
return USHRT_MAX;
SwTxtNode* pNd;
@@ -669,16 +637,12 @@ sal_uInt16 lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
for( ; nPos < rOutlNds.Count(); ++nPos )
{
pNd = rOutlNds[ nPos ]->GetTxtNode();
- //sal_uInt8 nLvl = pNd->GetTxtColl()->GetOutlineLevel(); //#outline level,zhaojianwei
const int nLvl = pNd->GetAttrOutlineLevel()-1; //<-end,zhaojianwei
if( nLvl == nLevel - 1)
{
- // check for the outline num
- // --> OD 2005-11-02 #i51089 - TUNING#
- // --> OD 2006-09-22 #i68289#
+ // #i51089#, #i68289#
// Assure, that text node has the correct numbering level. Otherwise,
// its number vector will not fit to the searched level.
-// if ( pNd->GetNum() )
if ( pNd->GetNum() &&
pNd->GetActualListLevel() == ( nLevel - 1 ) )
// <--
@@ -698,12 +662,11 @@ sal_uInt16 lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
}
else
{
- // --> OD 2006-01-12 #126588#
// A text node, which has an outline paragraph style applied and
// has as hard attribute 'no numbering' set, has an outline level,
// but no numbering tree node. Thus, consider this situation in
// the assertion condition.
- ASSERT( !pNd->GetNumRule(),
+ OSL_ENSURE( !pNd->GetNumRule(),
"<lcl_FindOutlineNum(..)> - text node with outline level and numbering rule, but without numbering tree node. This is a serious defect -> inform OD" );
}
}
@@ -713,18 +676,16 @@ sal_uInt16 lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
return nPos;
}
- // zu diesem Gliederungspunkt
-
-
- // JP 13.06.96:
- // im Namen kann eine Nummer oder/und der Text stehen.
- // zuerst wird ueber die Nummer versucht den richtigen Eintrag zu finden.
- // Gibt es diesen, dann wird ueber den Text verglichen, od es der
- // gewuenschte ist. Ist das nicht der Fall, wird noch mal nur ueber den
- // Text gesucht. Wird dieser gefunden ist es der Eintrag. Ansonsten der,
- // der ueber die Nummer gefunden wurde.
- // Ist keine Nummer angegeben, dann nur den Text suchen.
+// zu diesem Gliederungspunkt
+// JP 13.06.96:
+// im Namen kann eine Nummer oder/und der Text stehen.
+// zuerst wird ueber die Nummer versucht den richtigen Eintrag zu finden.
+// Gibt es diesen, dann wird ueber den Text verglichen, od es der
+// gewuenschte ist. Ist das nicht der Fall, wird noch mal nur ueber den
+// Text gesucht. Wird dieser gefunden ist es der Eintrag. Ansonsten der,
+// der ueber die Nummer gefunden wurde.
+// Ist keine Nummer angegeben, dann nur den Text suchen.
sal_Bool SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
{
if( rName.Len() )
@@ -774,8 +735,7 @@ sal_Bool SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
return sal_True;
}
- // --> OD 2006-09-22 #i68289#
- // additional search on hyperlink URL without its outline numbering part
+ // #i68289# additional search on hyperlink URL without its outline numbering part
if ( !sName.Equals( rName ) )
{
nFndPos = ::lcl_FindOutlineName( GetNodes(), sName, sal_False );
@@ -787,96 +747,14 @@ sal_Bool SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
return sal_True;
}
}
- // <--
}
return sal_False;
}
-/* */
-
-// --- Nummerierung -----------------------------------------
-
-// --> OD 2008-02-19 #refactorlists#
-//void SwNumRuleInfo::MakeList( SwDoc& rDoc, sal_Bool )
-//{
-// SwNumRule* pRule = rDoc.FindNumRulePtr(rName);
-
-// // no rule, no fun.
-// if ( !pRule )
-// return;
-
-// //
-// // 1. Case: Information already available at pRule:
-// //
-// if (pRule->GetTxtNodeList())
-// {
-// // copy list to own pList pointer:
-// aList = *pRule->GetTxtNodeList();
-// return;
-// }
-
-// //
-// // 2. Case: Information has to be generated from scratch:
-// //
-
-// if (pRule->IsOutlineRule())
-// {
-// const SwOutlineNodes & rOutlineNodes = rDoc.GetNodes().GetOutLineNds();
-
-// for (sal_uInt16 i = 0; i < rOutlineNodes.Count(); ++i)
-// {
-// SwTxtNode & aNode = *((SwTxtNode *) rOutlineNodes[i]);
-
-// if (pRule == aNode.GetNumRule())
-// AddNode(aNode);
-// }
-// }
-// {
-// SwModify* pMod;
-// const SfxPoolItem* pItem;
-// sal_uInt16 i, nMaxItems = rDoc.GetAttrPool().GetItemCount
-// ( RES_PARATR_NUMRULE);
-// for( i = 0; i < nMaxItems; ++i )
-// {
-// pItem = rDoc.GetAttrPool().GetItem( RES_PARATR_NUMRULE, i );
-// if( 0 != pItem)
-// {
-// pMod = (SwModify*)((SwNumRuleItem*)pItem)->GetDefinedIn();
-// if (0 != pMod &&
-// ((SwNumRuleItem*)pItem)->GetValue().Len() &&
-// ((SwNumRuleItem*)pItem)->GetValue() == rName )
-// {
-// if( pMod->IsA( TYPE( SwFmt )) )
-// pMod->GetInfo( *this );
-// else
-// {
-// SwTxtNode* pModTxtNode = (SwTxtNode*)pMod;
-
-// // #115901#
-// if( pModTxtNode->GetNodes().IsDocNodes())
-// {
-// AddNode( *pModTxtNode );
-// }
-// }
-// }
-// }
-// }
-// }
-
-// // --> FME 2004-11-03 #i36571# The numrule and this info structure should
-// // have different instances of the list:
-// // --> OD 2006-09-12 #i69145#
-// // method <SwNumRule::SetList(..)> copies content of list provided by the parameter
-// pRule->SetTxtNodeList( aList );
-// // <--
-//}
-// <--
-
-
void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
{
SwNumRule* pOld = rDoc.FindNumRulePtr( rRule.GetName() );
- ASSERT( pOld, "ohne die alte NumRule geht gar nichts" );
+ OSL_ENSURE( pOld, "ohne die alte NumRule geht gar nichts" );
sal_uInt16 nChgFmtLevel = 0, nMask = 1;
sal_uInt8 n;
@@ -897,43 +775,18 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
if( !nChgFmtLevel ) // es wurde nichts veraendert?
{
- // --> OD 2006-04-27 #i64311#
const bool bInvalidateNumRule( pOld->IsContinusNum() != rRule.IsContinusNum() );
- // <--
pOld->CheckCharFmts( &rDoc );
pOld->SetContinusNum( rRule.IsContinusNum() );
- // --> OD 2008-06-17 #i87166#
- // Do NOT change list style type
-// pOld->SetRuleType( rRule.GetRuleType() );
- // <--
- // --> OD 2006-04-27 #i64311#
+
if ( bInvalidateNumRule )
{
pOld->SetInvalidRule(sal_True);
}
- // <--
+
return ;
}
- // --> OD 2008-02-19 #refactorlists#
-// SwNumRuleInfo* pUpd = new SwNumRuleInfo( rRule.GetName() );
-// pUpd->MakeList( rDoc );
-
-// sal_uInt8 nLvl;
-// for( sal_uLong nFirst = 0, nLast = pUpd->GetList().Count();
-// nFirst < nLast; ++nFirst )
-// {
-// SwTxtNode* pTxtNd = pUpd->GetList().GetObject( nFirst );
-// nLvl = static_cast<sal_uInt8>(pTxtNd->GetLevel());
-
-// if( nLvl < MAXLEVEL )
-// {
-// if( nChgFmtLevel & ( 1 << nLvl ))
-// {
-// pTxtNd->NumRuleChgd();
-// }
-// }
-// }
SwNumRule::tTxtNodeList aTxtNodeList;
pOld->GetTxtNodeList( aTxtNodeList );
sal_uInt8 nLvl( 0 );
@@ -951,7 +804,6 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
}
}
}
- // <--
for( n = 0; n < MAXLEVEL; ++n )
if( nChgFmtLevel & ( 1 << n ))
@@ -960,20 +812,10 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
pOld->CheckCharFmts( &rDoc );
pOld->SetInvalidRule(sal_True);
pOld->SetContinusNum( rRule.IsContinusNum() );
- // --> OD 2008-06-17 #i87166#
- // Do NOT change list style type
-// pOld->SetRuleType( rRule.GetRuleType() );
- // <--
-
- // --> OD 2008-02-19 #refactorlists#
-// delete pUpd;
- // <--
rDoc.UpdateNumRule();
}
-// OD 2008-02-08 #newlistlevelattrs# - add handling of parameter <bResetIndentAttrs>
-// --> OD 2008-03-17 #refactorlists#
void SwDoc::SetNumRule( const SwPaM& rPam,
const SwNumRule& rRule,
const bool bCreateNewList,
@@ -1016,7 +858,6 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
}
}
- // --> OD 2008-03-17 #refactorlists#
if ( bSetItem )
{
if ( bCreateNewList )
@@ -1031,7 +872,7 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
{
// create new list and apply its list id
SwList* pNewList = createList( String(), pNew->GetName() );
- ASSERT( pNewList,
+ OSL_ENSURE( pNewList,
"<SwDoc::SetNumRule(..)> - could not create new list. Serious defect -> please inform OD." );
sListId = pNewList->GetListId();
}
@@ -1045,12 +886,10 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
SfxStringItem( RES_PARATR_LIST_ID, sContinuedListId ), 0 );
}
}
- // <--
if ( ! rPam.HasMark())
{
SwTxtNode * pTxtNd = rPam.GetPoint()->nNode.GetNode().GetTxtNode();
- // --> OD 2006-10-19 #134160#
// consider case that the PaM doesn't denote a text node - e.g. it denotes a graphic node
if ( pTxtNd )
{
@@ -1059,15 +898,14 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
if (pRule && pRule->GetName() == pNew->GetName())
{
bSetItem = sal_False;
- // --> OD 2008-06-02 #refactorlists#
+
if ( !pTxtNd->IsInList() )
{
pTxtNd->AddToList();
}
- // <--
}
- // --> OD 2005-10-26 #b6340308# - only clear numbering attribute at
- // text node, if at paragraph style the new numbering rule is found.
+ // Only clear numbering attribute at text node, if at paragraph
+ // style the new numbering rule is found.
else if ( !pRule )
{
SwTxtFmtColl* pColl = pTxtNd->GetTxtColl();
@@ -1081,19 +919,14 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
}
}
}
- // <--
}
- // <--
}
- // --> OD 2009-08-18 #i103817#
if ( bSetItem )
- // <--
{
InsertPoolItem( rPam, SwNumRuleItem( pNew->GetName() ), 0 );
}
- // --> OD 2008-02-08 #newlistlevelattrs#
if ( bResetIndentAttrs &&
pNew && pNew->Get( 0 ).GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
@@ -1117,7 +950,6 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
}
// <--
}
- // <--
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -1186,19 +1018,6 @@ void SwDoc::SetNodeNumStart( const SwPosition& rPos, sal_uInt16 nStt )
if (pTxtNd)
{
- // --> OD 2008-02-27 #refactorlists#
-// const SwNumRule* pRule = pTxtNd->GetNumRule();
-// if( pRule && nStt != pTxtNd->GetListRestartValue() )
-// {
-// if( DoesUndo() )
-// {
-// ClearRedo();
-// AppendUndo( new SwUndoNumRuleStart( rPos, nStt ));
-// }
-// }
-// pTxtNd->SetListRestartValue(nStt);
-
-// SetModified();
if ( !pTxtNd->HasAttrListRestartValue() ||
pTxtNd->GetAttrListRestartValue() != nStt )
{
@@ -1211,23 +1030,20 @@ void SwDoc::SetNodeNumStart( const SwPosition& rPos, sal_uInt16 nStt )
SetModified();
}
- // <--
}
}
- // loeschen geht nur, wenn die Rule niemand benutzt!
+// loeschen geht nur, wenn die Rule niemand benutzt!
sal_Bool SwDoc::DelNumRule( const String& rName, sal_Bool bBroadcast )
{
sal_uInt16 nPos = FindNumRule( rName );
- // --> OD 2007-12-17 #151213#
if ( (*pNumRuleTbl)[ nPos ] == GetOutlineNumRule() )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDoc::DelNumRule(..)> - No deletion of outline list style. This is serious defect - please inform OD" );
return sal_False;
}
- // <--
if( USHRT_MAX != nPos && !IsUsed( *(*pNumRuleTbl)[ nPos ] ))
{
@@ -1242,7 +1058,6 @@ sal_Bool SwDoc::DelNumRule( const String& rName, sal_Bool bBroadcast )
BroadcastStyleOperation(rName, SFX_STYLE_FAMILY_PSEUDO,
SFX_STYLESHEET_ERASED);
- // --> OD 2008-04-02 #refactorlists#
deleteListForListStyle( rName );
{
// delete further list, which have the deleted list style as default list style
@@ -1265,7 +1080,6 @@ sal_Bool SwDoc::DelNumRule( const String& rName, sal_Bool bBroadcast )
deleteList( pList->GetListId() );
}
}
- // <--
// --> FME 2004-11-02 #i34097# DeleteAndDestroy deletes rName if
// rName is directly taken from the numrule.
const String aTmpName( rName );
@@ -1279,10 +1093,8 @@ sal_Bool SwDoc::DelNumRule( const String& rName, sal_Bool bBroadcast )
return sal_False;
}
-// #106897#
void SwDoc::ChgNumRuleFmts( const SwNumRule& rRule, const String * pName )
{
- // #106897#
SwNumRule* pRule = FindNumRulePtr( pName ? *pName : rRule.GetName() );
if( pRule )
{
@@ -1316,31 +1128,19 @@ sal_Bool SwDoc::RenameNumRule(const String & rOldName, const String & rNewName,
GetIDocumentUndoRedo().AppendUndo(pUndo);
}
- // --> OD 2008-02-19 #refactorlists#
-// SwNumRuleInfo aInfo(rOldName);
-// aInfo.MakeList(*this);
SwNumRule::tTxtNodeList aTxtNodeList;
pNumRule->GetTxtNodeList( aTxtNodeList );
- // <--
- // --> OD 2008-07-08 #i91400#
pNumRule->SetName( rNewName, *this );
- // <--
SwNumRuleItem aItem(rNewName);
- // --> OD 2008-02-19 #refactorlists#
-// for (sal_uLong nI = 0; nI < aInfo.GetList().Count(); ++nI)
-// {
-// SwTxtNode * pTxtNd = aInfo.GetList().GetObject(nI);
-// pTxtNd->SwCntntNode::SetAttr(aItem);
-// }
+
for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin();
aIter != aTxtNodeList.end(); ++aIter )
{
SwTxtNode * pTxtNd = *aIter;
pTxtNd->SetAttr(aItem);
}
- // <--
bResult = sal_True;
@@ -1356,20 +1156,6 @@ void SwDoc::StopNumRuleAnimations( OutputDevice* pOut )
{
for( sal_uInt16 n = GetNumRuleTbl().Count(); n; )
{
- // --> OD 2008-02-19 #refactorlists#
-// SwNumRuleInfo aUpd( GetNumRuleTbl()[ --n ]->GetName() );
-// aUpd.MakeList( *this );
-
-// for( sal_uLong nFirst = 0, nLast = aUpd.GetList().Count();
-// nFirst < nLast; ++nFirst )
-// {
-// SwTxtNode* pTNd = aUpd.GetList().GetObject( nFirst );
-// SwClientIter aIter( *pTNd );
-// for( SwFrm* pFrm = (SwFrm*)aIter.First( TYPE(SwFrm) );
-// pFrm; pFrm = (SwFrm*)aIter.Next() )
-// if( ((SwTxtFrm*)pFrm)->HasAnimation() )
-// ((SwTxtFrm*)pFrm)->StopAnimation( pOut );
-// }
SwNumRule::tTxtNodeList aTxtNodeList;
GetNumRuleTbl()[ --n ]->GetTxtNodeList( aTxtNodeList );
for ( SwNumRule::tTxtNodeList::iterator aTxtNodeIter = aTxtNodeList.begin();
@@ -1382,7 +1168,6 @@ void SwDoc::StopNumRuleAnimations( OutputDevice* pOut )
if( ((SwTxtFrm*)pFrm)->HasAnimation() )
((SwTxtFrm*)pFrm)->StopAnimation( pOut );
}
- // <--
}
}
@@ -1394,7 +1179,6 @@ sal_Bool SwDoc::ReplaceNumRule( const SwPosition& rPos,
*pNewRule = FindNumRulePtr( rNewRule );
if( pOldRule && pNewRule && pOldRule != pNewRule )
{
- // --> OD 2008-02-19 #refactorlists#
SwUndoInsNum* pUndo = 0;
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -1404,48 +1188,10 @@ sal_Bool SwDoc::ReplaceNumRule( const SwPosition& rPos,
GetIDocumentUndoRedo().AppendUndo(pUndo);
}
- // --> OD 2008-02-19 #refactorlists#
- // apply new list style <pNewRule> to all text nodes, which have the
- // old list style <pOldNRule> applied and belong to the same list as
- // the text node of the given <SwPosition>.
-// SwNumRuleInfo aUpd( rOldRule );
-// aUpd.MakeList( *this );
-
-// if (aUpd.GetList().Count() > 0) // #106897#
SwNumRule::tTxtNodeList aTxtNodeList;
pOldRule->GetTxtNodeList( aTxtNodeList );
if ( aTxtNodeList.size() > 0 )
{
-// // Position suchen und bestimme ob ein Node davor oder dahinter
-// // einen Start erzwingt
-// SwTxtNode* pTxtNd;
-// sal_uLong nFndPos, nFirst, nLast;
-
-// if( TABLE_ENTRY_NOTFOUND != aUpd.GetList().SearchKey(
-// rPos.nNode.GetIndex(), &nFndPos ))
-// ++nFndPos;
-
-// for( nLast = nFndPos; nLast < aUpd.GetList().Count(); ++nLast )
-// {
-// pTxtNd = aUpd.GetList().GetObject( nLast );
-// if(pTxtNd->IsRestart())
-// break;
-// }
-// for( nFirst = nFndPos; nFirst; )
-// {
-// pTxtNd = aUpd.GetList().GetObject( --nFirst );
-// if( pTxtNd->IsRestart() )
-// break;
-// }
-// // dann neue Numerierung ueber diesen Bereich
-// // definieren und den Start am Anfang/Ende zurueck setzen
-// pTxtNd = aUpd.GetList().GetObject( nFirst );
-// if( pTxtNd->IsRestart() )
-// {
-// pTxtNd->SetRestart(false);
-// if( pUndo )
-// pUndo->SetSttNum( pTxtNd->GetIndex() );
-// }
SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : 0 );
sal_uInt16 nChgFmtLevel = 0;
@@ -1461,15 +1207,7 @@ sal_Bool SwDoc::ReplaceNumRule( const SwPosition& rPos,
const SwTxtNode* pGivenTxtNode = rPos.nNode.GetNode().GetTxtNode();
SwNumRuleItem aRule( rNewRule );
-// for( ; nFirst < nLast; ++nFirst )
-// {
-// pTxtNd = aUpd.GetList().GetObject( nFirst );
-// aRegH.RegisterInModify( pTxtNd, *pTxtNd );
-
-// pTxtNd->SwCntntNode::SetAttr( aRule );
-// pTxtNd->NumRuleChgd();
-// }
for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin();
aIter != aTxtNodeList.end(); ++aIter )
{
@@ -1487,14 +1225,13 @@ sal_Bool SwDoc::ReplaceNumRule( const SwPosition& rPos,
GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
SetModified();
- bRet = sal_True; // #106897#
+ bRet = sal_True;
}
}
return bRet;
}
-// --> OD 2008-03-18 #refactorlists#
namespace
{
struct ListStyleData
@@ -1510,16 +1247,12 @@ namespace
{}
};
}
-// <--
void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM)
{
- ASSERT( rPaM.GetDoc() == this, "need same doc" );
+ OSL_ENSURE( rPaM.GetDoc() == this, "need same doc" );
- // --> OD 2008-03-18 #refactorlists#
-// map<SwNumRule *, SwNumRule *> aMyNumRuleMap;
::std::map<SwNumRule *, ListStyleData> aMyNumRuleMap;
- // <--
sal_uLong nStt = rPaM.Start()->nNode.GetIndex();
sal_uLong nEnd = rPaM.End()->nNode.GetIndex();
@@ -1536,11 +1269,8 @@ void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM)
if (pRule && pRule->IsAutoRule() && ! pRule->IsOutlineRule())
{
- // --> OD 2008-03-18 #refactorlists#
-// SwNumRule * pReplaceNumRule = aMyNumRuleMap[pRule];
ListStyleData aListStyleData = aMyNumRuleMap[pRule];
-// if (! pReplaceNumRule)
if ( aListStyleData.pReplaceNumRule == 0 )
{
if (bFirst)
@@ -1553,20 +1283,16 @@ void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM)
aListStyleData.sListId, true ));
}
-// if (! pReplaceNumRule)
if ( aListStyleData.pReplaceNumRule == 0 )
{
-// pReplaceNumRule = new SwNumRule(*pRule);
-// pReplaceNumRule->SetName(GetUniqueNumRuleName());
aListStyleData.pReplaceNumRule = new SwNumRule(*pRule);
- // --> OD 2008-07-08 #i91400#
+
aListStyleData.pReplaceNumRule->SetName(
GetUniqueNumRuleName(), *this );
- // <--
+
aListStyleData.bCreateNewList = true;
}
-// aMyNumRuleMap[pRule] = pReplaceNumRule;
aMyNumRuleMap[pRule] = aListStyleData;
}
@@ -1637,13 +1363,8 @@ void SwDoc::DelNumRules( const SwPaM& rPam )
for( ; nStt <= nEnd; ++nStt )
{
SwTxtNode* pTNd = GetNodes()[ nStt ]->GetTxtNode();
- // --> OD 2008-03-13 #refactorlists#
-// if( pTNd && 0 != ( pItem = pTNd->GetNoCondAttr(
-// RES_PARATR_NUMRULE, sal_True ) ) &&
-// ( pName = &((SwNumRuleItem*)pItem)->GetValue())->Len() )
SwNumRule* pNumRuleOfTxtNode = pTNd ? pTNd->GetNumRule() : 0;
if ( pTNd && pNumRuleOfTxtNode )
- // <--
{
// recognize changes of attribute for undo
aRegH.RegisterInModify( pTNd, *pTNd );
@@ -1660,18 +1381,15 @@ void SwDoc::DelNumRules( const SwPaM& rPam )
else
pTNd->SetAttr( aEmptyRule );
- // --> OD 2008-03-26 #refactorlists#
pTNd->ResetAttr( RES_PARATR_LIST_ID );
pTNd->ResetAttr( RES_PARATR_LIST_LEVEL );
pTNd->ResetAttr( RES_PARATR_LIST_ISRESTART );
pTNd->ResetAttr( RES_PARATR_LIST_RESTARTVALUE );
pTNd->ResetAttr( RES_PARATR_LIST_ISCOUNTED );
- // <--
if( RES_CONDTXTFMTCOLL == pTNd->GetFmtColl()->Which() )
pTNd->ChkCondColl();
- //else if( !pOutlNd && NO_NUMBERING != //#outline level,zhaojianwei
- // ((SwTxtFmtColl*)pTNd->GetFmtColl())->GetOutlineLevel() )
+
else if( !pOutlNd &&
((SwTxtFmtColl*)pTNd->GetFmtColl())->IsAssignedToListLevelOfOutlineStyle() )//<-end,zhaojianwei
pOutlNd = pTNd;
@@ -1691,15 +1409,12 @@ void SwDoc::InvalidateNumRules()
(*pNumRuleTbl)[n]->SetInvalidRule(sal_True);
}
- // zum naechsten/vorhergehenden Punkt auf gleicher Ebene
-
+// zum naechsten/vorhergehenden Punkt auf gleicher Ebene
sal_Bool lcl_IsNumOk( sal_uInt8 nSrchNum, sal_uInt8& rLower, sal_uInt8& rUpper,
sal_Bool bOverUpper, sal_uInt8 nNumber )
{
- // --> OD 2008-04-02 #refactorlists#
- ASSERT( nNumber < MAXLEVEL,
+ OSL_ENSURE( nNumber < MAXLEVEL,
"<lcl_IsNumOk(..)> - misusage of method" );
- // <--
sal_Bool bRet = sal_False;
{
@@ -1851,8 +1566,6 @@ sal_Bool SwDoc::GotoNextNum( SwPosition& rPos, sal_Bool bOverUpper,
return ::lcl_GotoNextPrevNum( rPos, sal_True, bOverUpper, pUpper, pLower );
}
-// -> #i23731#
-// --> OD 2008-03-18 #refactorlists# - add output parameter <sListId>
const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
const bool bForward,
const bool bNum,
@@ -1869,12 +1582,10 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
{
SwNodeIndex aIdx(rPos.nNode);
- // --> OD 2005-10-20 #i55391#
// - the start node has also been investigated, if requested.
const SwNode * pNode = NULL;
do
{
- // --> OD 2005-10-20 #i55391#
if ( !bInvestigateStartNode )
{
if (bForward)
@@ -1882,7 +1593,7 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
else
aIdx--;
}
- // <--
+
if (aIdx.GetNode().IsTxtNode())
{
pTxtNd = aIdx.GetNode().GetTxtNode();
@@ -1890,12 +1601,11 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
const SwNumRule * pNumRule = pTxtNd->GetNumRule();
if (pNumRule)
{
- if ( ( pNumRule->IsOutlineRule() == ( bOutline ? sal_True : sal_False ) ) && // #115901#
+ if ( ( pNumRule->IsOutlineRule() == ( bOutline ? sal_True : sal_False ) ) &&
( ( bNum && pNumRule->Get(0).IsEnumeration()) ||
( !bNum && pNumRule->Get(0).IsItemize() ) ) ) // #i22362#, #i29560#
{
pResult = pTxtNd->GetNumRule();
- // --> OD 2008-03-18 #refactorlists#
// provide also the list id, to which the text node belongs.
sListId = pTxtNd->GetListId();
}
@@ -1914,7 +1624,6 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
}
}
- // --> OD 2005-10-20 #i55391#
if ( bInvestigateStartNode )
{
if (bForward)
@@ -1922,18 +1631,16 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
else
aIdx--;
}
- // <--
pNode = &aIdx.GetNode();
}
while (!(pNode == GetNodes().DocumentSectionStartNode(pStartFromNode) ||
pNode == GetNodes().DocumentSectionEndNode(pStartFromNode)));
- // <--
}
return pResult;
}
-// <- #i23731#
+
sal_Bool SwDoc::GotoPrevNum( SwPosition& rPos, sal_Bool bOverUpper,
sal_uInt8* pUpper, sal_uInt8* pLower )
@@ -1950,7 +1657,7 @@ sal_Bool SwDoc::NumUpDown( const SwPaM& rPam, sal_Bool bDown )
sal_uLong nTmp = nStt; nStt = nEnd; nEnd = nTmp;
}
- // -> #115901# outline nodes are promoted or demoted differently
+ // -> outline nodes are promoted or demoted differently
bool bOnlyOutline = true;
bool bOnlyNonOutline = true;
for (sal_uLong n = nStt; n <= nEnd; n++)
@@ -1970,17 +1677,15 @@ sal_Bool SwDoc::NumUpDown( const SwPaM& rPam, sal_Bool bDown )
}
}
}
- // <- #115901#
sal_Bool bRet = sal_True;
char nDiff = bDown ? 1 : -1;
- // ->#115901#
if (bOnlyOutline)
bRet = OutlineUpDown(rPam, nDiff);
else if (bOnlyNonOutline)
{
- /* --> #i24560#
+ /* #i24560#
Only promote or demote if all selected paragraphs are
promotable resp. demotable.
@@ -1990,8 +1695,8 @@ sal_Bool SwDoc::NumUpDown( const SwPaM& rPam, sal_Bool bDown )
{
SwTxtNode* pTNd = GetNodes()[ nTmp ]->GetTxtNode();
- // --> OD 2006-10-19 #134160# - make code robust:
- // consider case that the node doesn't denote a text node.
+ // Make code robust: consider case that the node doesn't denote a
+ // text node.
if ( pTNd )
{
SwNumRule * pRule = pTNd->GetNumRule();
@@ -2004,12 +1709,10 @@ sal_Bool SwDoc::NumUpDown( const SwPaM& rPam, sal_Bool bDown )
bRet = sal_False;
}
}
- // <--
}
if( bRet )
{
- /* <-- #i24560# */
if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndo *const pUndo( new SwUndoNumUpDown(rPam, nDiff) );
@@ -2254,7 +1957,7 @@ sal_Bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, sal_Bool bIsOutl
sal_Bool bDelLastPara = !aInsPos.nNode.GetNode().IsCntntNode();
- /* #101076# When copying to a non-content node Copy will
+ /* When copying to a non-content node Copy will
insert a paragraph before that node and insert before
that inserted node. Copy creates an SwUndoInserts that
does not cover the extra paragraph. Thus we insert the
@@ -2266,7 +1969,7 @@ sal_Bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, sal_Bool bIsOutl
the previous content node. */
SwPaM aInsPam(aInsPos);
sal_Bool bMoved = aInsPam.Move(fnMoveBackward);
- ASSERT(bMoved, "No content node found!");
+ OSL_ENSURE(bMoved, "No content node found!");
if (bMoved)
{
@@ -2326,7 +2029,7 @@ sal_Bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, sal_Bool bIsOutl
SwRedline* pNewRedline = new SwRedline( nsRedlineType_t::REDLINE_DELETE, aPam );
- // #101654# prevent assertion from aPam's target being deleted
+ // prevent assertion from aPam's target being deleted
// (Alternatively, one could just let aPam go out of scope, but
// that requires touching a lot of code.)
aPam.GetBound(sal_True).nContent.Assign( NULL, 0 );
@@ -2447,9 +2150,6 @@ SwNumRule* SwDoc::GetCurrNumRule( const SwPosition& rPos ) const
if( pTNd )
{
- // --> OD 2008-02-20 #refactorlists#
-// pTNd->SyncNumberAndNumRule();
- // <--
pRet = pTNd->GetNumRule();
}
@@ -2487,19 +2187,15 @@ SwNumRule* SwDoc::FindNumRulePtr( const String& rName ) const
return pResult;
}
-// #i36749#
void SwDoc::AddNumRule(SwNumRule * pRule)
{
pNumRuleTbl->Insert(pRule, pNumRuleTbl->Count());
maNumRuleMap[pRule->GetName()] = pRule;
pRule->SetNumRuleMap(&maNumRuleMap);
- // --> OD 2008-03-26 #refactorlists#
createListForListStyle( pRule->GetName() );
- // <--
}
-// --> OD 2008-02-11 #newlistlevelattrs#
sal_uInt16 SwDoc::MakeNumRule( const String &rName,
const SwNumRule* pCpy,
sal_Bool bBroadcast,
@@ -2510,31 +2206,26 @@ sal_uInt16 SwDoc::MakeNumRule( const String &rName,
{
pNew = new SwNumRule( *pCpy );
- // --> OD 2008-07-08 #i91400#
pNew->SetName( GetUniqueNumRuleName( &rName ), *this );
- // <--
+
if( pNew->GetName() != rName )
{
pNew->SetPoolFmtId( USHRT_MAX );
pNew->SetPoolHelpId( USHRT_MAX );
pNew->SetPoolHlpFileId( UCHAR_MAX );
- // --> OD 2008-04-03 #refactorlists#
pNew->SetDefaultListId( String() );
- // <--
}
pNew->CheckCharFmts( this );
}
else
{
- // --> OD 2008-02-11 #newlistlevelattrs#
pNew = new SwNumRule( GetUniqueNumRuleName( &rName ),
eDefaultNumberFormatPositionAndSpaceMode );
- // <--
}
sal_uInt16 nRet = pNumRuleTbl->Count();
- AddNumRule(pNew); // #i36749#
+ AddNumRule(pNew);
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -2633,7 +2324,6 @@ void SwDoc::UpdateNumRule()
rNmTbl[ n ]->Validate();
}
-// --> OD 2008-04-02 #refactorlists#
void SwDoc::MarkListLevel( const String& sListId,
const int nListLevel,
const sal_Bool bValue )
@@ -2653,10 +2343,7 @@ void SwDoc::MarkListLevel( SwList& rList,
// Set new marked list level and notify all affected nodes of the changed mark.
rList.MarkListLevel( nListLevel, bValue );
}
-// <- #i27615#
-// <--
-// #i23726#
sal_Bool SwDoc::IsFirstOfNumRule(SwPosition & rPos)
{
sal_Bool bResult = sal_False;
@@ -2673,7 +2360,6 @@ sal_Bool SwDoc::IsFirstOfNumRule(SwPosition & rPos)
return bResult;
}
-// --> OD 2007-10-26 #i83479#
// implementation for interface <IDocumentListItems>
bool SwDoc::lessThanNodeNum::operator()( const SwNodeNum* pNodeNumOne,
const SwNodeNum* pNodeNumTwo ) const
@@ -2690,7 +2376,7 @@ void SwDoc::addListItem( const SwNodeNum& rNodeNum )
const bool bAlreadyInserted(
mpListItemsList->find( &rNodeNum ) != mpListItemsList->end() );
- ASSERT( !bAlreadyInserted,
+ OSL_ENSURE( !bAlreadyInserted,
"<SwDoc::InsertListItem(..)> - <SwNodeNum> instance already registered as numbered item!" );
if ( !bAlreadyInserted )
{
@@ -2708,7 +2394,7 @@ void SwDoc::removeListItem( const SwNodeNum& rNodeNum )
const tImplSortedNodeNumList::size_type nDeleted = mpListItemsList->erase( &rNodeNum );
if ( nDeleted > 1 )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDoc::RemoveListItem(..)> - <SwNodeNum> was registered more than once as numbered item!" );
}
}
@@ -2753,9 +2439,7 @@ void SwDoc::getNumItems( tSortedNodeNumList& orNodeNumList ) const
}
}
}
-// <--
-// --> OD 2007-11-15 #i83479#
// implementation for interface <IDocumentOutlineNodes>
sal_Int32 SwDoc::getOutlineNodesCount() const
{
@@ -2795,9 +2479,7 @@ void SwDoc::getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOu
GetNodes().GetOutLineNds()[i]->GetTxtNode() );
}
}
-// <--
-// --> OD 2008-03-26 #refactorlists#
// implementation of interface IDocumentListsAccess
SwList* SwDoc::createList( String sListId,
const String sDefaultListStyleName )
@@ -2809,7 +2491,7 @@ SwList* SwDoc::createList( String sListId,
if ( getListByName( sListId ) )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDoc::createList(..)> - provided list id already used. Serious defect -> please inform OD." );
return 0;
}
@@ -2817,7 +2499,7 @@ SwList* SwDoc::createList( String sListId,
SwNumRule* pDefaultNumRuleForNewList = FindNumRulePtr( sDefaultListStyleName );
if ( !pDefaultNumRuleForNewList )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDoc::createList(..)> - for provided default list style name no list style is found. Serious defect -> please inform OD." );
return 0;
}
@@ -2842,7 +2524,7 @@ SwList* SwDoc::getListByName( const String sListId ) const
{
SwList* pList = 0;
- std::hash_map< String, SwList*, StringHash >::const_iterator
+ boost::unordered_map< String, SwList*, StringHash >::const_iterator
aListIter = maLists.find( sListId );
if ( aListIter != maLists.end() )
{
@@ -2856,14 +2538,14 @@ SwList* SwDoc::createListForListStyle( const String sListStyleName )
{
if ( sListStyleName.Len() == 0 )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDoc::createListForListStyle(..)> - no list style name provided. Serious defect -> please inform OD." );
return 0;
}
if ( getListForListStyle( sListStyleName ) )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDoc::createListForListStyle(..)> - a list for the provided list style name already exists. Serious defect -> please inform OD." );
return 0;
}
@@ -2871,7 +2553,7 @@ SwList* SwDoc::createListForListStyle( const String sListStyleName )
SwNumRule* pNumRule = FindNumRulePtr( sListStyleName );
if ( !pNumRule )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDoc::createListForListStyle(..)> - for provided list style name no list style is found. Serious defect -> please inform OD." );
return 0;
}
@@ -2892,7 +2574,7 @@ SwList* SwDoc::getListForListStyle( const String sListStyleName ) const
{
SwList* pList = 0;
- std::hash_map< String, SwList*, StringHash >::const_iterator
+ boost::unordered_map< String, SwList*, StringHash >::const_iterator
aListIter = maListStyleLists.find( sListStyleName );
if ( aListIter != maListStyleLists.end() )
{
@@ -2907,7 +2589,7 @@ void SwDoc::deleteListForListStyle( const String sListStyleName )
String sListId;
{
SwList* pList = getListForListStyle( sListStyleName );
- ASSERT( pList,
+ OSL_ENSURE( pList,
"<SwDoc::deleteListForListStyle(..)> - misusage of method: no list found for given list style name" );
if ( pList )
{
@@ -2920,13 +2602,12 @@ void SwDoc::deleteListForListStyle( const String sListStyleName )
deleteList( sListId );
}
}
-// <--
-// --> OD 2008-07-08 #i91400#
+
void SwDoc::trackChangeOfListStyleName( const String sListStyleName,
const String sNewListStyleName )
{
SwList* pList = getListForListStyle( sListStyleName );
- ASSERT( pList,
+ OSL_ENSURE( pList,
"<SwDoc::changeOfListStyleName(..)> - misusage of method: no list found for given list style name" );
if ( pList != 0 )
@@ -2935,9 +2616,7 @@ void SwDoc::trackChangeOfListStyleName( const String sListStyleName,
maListStyleLists[sNewListStyleName] = pList;
}
}
-// <--
-// --> OD 2008-03-13 #refactorlists#
namespace listfunc
{
const String MakeListIdUnique( const SwDoc& rDoc,
@@ -2956,17 +2635,16 @@ namespace listfunc
}
const String CreateUniqueListId( const SwDoc& rDoc )
{
- // --> OD 2008-08-06 #i92478#
+ // #i92478#
String aNewListId = String::CreateFromAscii( "list" );
- // <--
sal_Int64 n = Time().GetTime();
n += Date().GetDate();
n += rand();
- // --> OD 2008-08-06 #i92478#
+ // #i92478#
aNewListId += String::CreateFromInt64( n );
- // <--
return MakeListIdUnique( rDoc, aNewListId );
}
}
-// <--
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index d18d2166dd96..e409ec3462d8 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,14 +58,9 @@ using namespace com::sun::star;
TYPEINIT1(SwRedlineHint, SfxHint);
-#ifndef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
- #define _CHECK_REDLINE( pDoc )
- #define _DEBUG_REDLINE( pDoc )
-
-#else
-
-#define _ERROR_PREFIX "redline table corrupted: "
+ #define _ERROR_PREFIX "redline table corrupted: "
// helper function for lcl_CheckRedline
// 1. make sure that pPos->nContent points into pPos->nNode
@@ -154,6 +150,12 @@ TYPEINIT1(SwRedlineHint, SfxHint);
#define _DEBUG_REDLINE( pDoc ) lcl_DebugRedline( pDoc );
+
+#else
+
+ #define _CHECK_REDLINE( pDoc )
+ #define _DEBUG_REDLINE( pDoc )
+
#endif
SV_IMPL_OP_PTRARR_SORT( _SwRedlineTbl, SwRedlinePtr )
@@ -307,10 +309,6 @@ Verhalten von Delete-Redline:
bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
{
-#if 0
-// #i93179# disabled: ASSERT in ~SwIndexReg #ifdef DBG_UTIL
- SwRedline aCopy( *pNewRedl );
-#endif
bool bError = true;
_CHECK_REDLINE( this )
@@ -384,9 +382,6 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
for( ; pNewRedl && n < pRedlineTbl->Count(); bDec ? n : ++n )
{
bDec = false;
-#ifdef DVO_TEST
- _CHECK_REDLINE( this )
-#endif
SwRedline* pRedl = (*pRedlineTbl)[ n ];
SwPosition* pRStt = pRedl->Start(),
@@ -452,12 +447,12 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
}
else if ( POS_OUTSIDE == eCmpPos )
{
- // #107164# own insert-over-insert
- // redlines: just scrap the inside ones
+ // own insert-over-insert redlines:
+ // just scrap the inside ones
pRedlineTbl->Remove( n );
bDec = true;
}
- // <- #107164#
+ // <--
else if( POS_OVERLAP_BEHIND == eCmpPos )
{
*pStt = *pREnd;
@@ -506,8 +501,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
}
else if ( POS_OUTSIDE == eCmpPos )
{
- // #102366# handle overlapping redlines in broken
- // documents
+ // handle overlapping redlines in broken documents
// split up the new redline, since it covers the
// existing redline. Insert the first part, and
@@ -525,14 +519,12 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
}
else if ( POS_OVERLAP_BEHIND == eCmpPos )
{
- // #107164# handle overlapping redlines in broken
- // documents
+ // handle overlapping redlines in broken documents
pNewRedl->SetStart( *pREnd );
}
else if ( POS_OVERLAP_BEFORE == eCmpPos )
{
- // #107164# handle overlapping redlines in broken
- // documents
+ // handle overlapping redlines in broken documents
*pEnd = *pRStt;
if( ( *pStt == *pEnd ) &&
( pNewRedl->GetContentIdx() == NULL ) )
@@ -569,8 +561,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
}
else if ( POS_OUTSIDE == eCmpPos )
{
- // #102366# handle overlapping redlines in broken
- // documents
+ // handle overlapping redlines in broken documents
// split up the new redline, since it covers the
// existing redline. Insert the first part, and
@@ -588,13 +579,13 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
}
else if ( POS_EQUAL == eCmpPos )
{
- // #112895# handle identical redlines in broken
- // documents - delete old (delete) redline
+ // handle identical redlines in broken documents
+ // delete old (delete) redline
pRedlineTbl->DeleteAndDestroy( n );
bDec = true;
}
else if ( POS_OVERLAP_BEHIND == eCmpPos )
- { // Another workaround for broken redlines (#107164#)
+ { // Another workaround for broken redlines
pNewRedl->SetStart( *pREnd );
}
break;
@@ -709,7 +700,6 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
case POS_COLLIDE_START:
case POS_COLLIDE_END:
if( pRedl->IsOwnRedline( *pNewRedl ) &&
-// 1 == pRedl->GetStackCount() &&
pRedl->CanCombine( *pNewRedl ) )
{
if( IsHideChanges( eRedlineMode ))
@@ -738,8 +728,6 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
sal_uInt16 nToBeDeleted = n;
bDec = true;
- // #107359# Do it again, Sam!
- // If you can do it for them, you can do it for me.
if( *(pNewRedl->Start()) <= *pREnd )
{
// Whoooah, we just extended the new 'redline'
@@ -786,7 +774,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
{
eRedlineMode = (RedlineMode_t)(eRedlineMode | nsRedlineMode_t::REDLINE_IGNOREDELETE_REDLINES);
- // #98863# DeleteAndJoin does not yield the
+ // DeleteAndJoin does not yield the
// desired result if there is no paragraph to
// join with, i.e. at the end of the document.
// For this case, we completely delete the
@@ -1030,14 +1018,12 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
// insert the pNew part (if it exists)
if( pNew )
{
- // AppendRedline( pNew, bCallDelete );
- //sal_Bool bRet =
pRedlineTbl->Insert( pNew );
// pNew must be deleted if Insert() wasn't
// successful. But that can't happen, since pNew is
// part of the original pRedl redline.
- // ASSERT( bRet, "Can't insert existing redline?" );
+ // OSL_ENSURE( bRet, "Can't insert existing redline?" );
// restart (now with pRedl being split up)
n = 0;
@@ -1567,13 +1553,33 @@ const SwRedline* SwDoc::GetRedline( const SwPosition& rPos,
? *pStt == rPos
: ( *pStt <= rPos && rPos < *pEnd ) )
{
- /* #107318# returned wrong redline ???*/
while( nM && rPos == *(*pRedlineTbl)[ nM - 1 ]->End() &&
rPos == *(*pRedlineTbl)[ nM - 1 ]->Start() )
{
--nM;
pRedl = (*pRedlineTbl)[ nM ];
}
+ // if there are format and insert changes in the same position
+ // show insert change first.
+ // since the redlines are sorted by position, only check the redline
+ // before and after the current redline
+ if( nsRedlineType_t::REDLINE_FORMAT == pRedl->GetType() )
+ {
+ if( nM && rPos >= *(*pRedlineTbl)[ nM - 1 ]->Start() &&
+ rPos <= *(*pRedlineTbl)[ nM - 1 ]->End() &&
+ ( nsRedlineType_t::REDLINE_INSERT == (*pRedlineTbl)[ nM - 1 ]->GetType() ) )
+ {
+ --nM;
+ pRedl = (*pRedlineTbl)[ nM ];
+ }
+ else if( ( nM + 1 ) <= nO && rPos >= *(*pRedlineTbl)[ nM + 1 ]->Start() &&
+ rPos <= *(*pRedlineTbl)[ nM + 1 ]->End() &&
+ ( nsRedlineType_t::REDLINE_INSERT == (*pRedlineTbl)[ nM + 1 ]->GetType() ) )
+ {
+ ++nM;
+ pRedl = (*pRedlineTbl)[ nM ];
+ }
+ }
if( pFndPos )
*pFndPos = nM;
@@ -1994,13 +2000,12 @@ const SwRedline* lcl_FindCurrRedline( const SwPosition& rSttPos,
return pFnd;
}
-// #111827#
int lcl_AcceptRejectRedl( Fn_AcceptReject fn_AcceptReject,
SwRedlineTbl& rArr, sal_Bool bCallDelete,
const SwPaM& rPam)
{
sal_uInt16 n = 0;
- int nCount = 0; // #111827#
+ int nCount = 0;
const SwPosition* pStt = rPam.Start(),
* pEnd = pStt == rPam.GetPoint() ? rPam.GetMark()
@@ -2011,7 +2016,7 @@ int lcl_AcceptRejectRedl( Fn_AcceptReject fn_AcceptReject,
{
// dann nur die TeilSelektion aufheben
if( (*fn_AcceptReject)( rArr, n, bCallDelete, pStt, pEnd ))
- nCount++; // #111827#
+ nCount++;
++n;
}
@@ -2023,7 +2028,7 @@ int lcl_AcceptRejectRedl( Fn_AcceptReject fn_AcceptReject,
if( *pTmp->End() <= *pEnd )
{
if( (*fn_AcceptReject)( rArr, n, bCallDelete, 0, 0 ))
- nCount++; // #111827#
+ nCount++;
}
else
{
@@ -2031,13 +2036,13 @@ int lcl_AcceptRejectRedl( Fn_AcceptReject fn_AcceptReject,
{
// dann nur in der TeilSelektion aufheben
if( (*fn_AcceptReject)( rArr, n, bCallDelete, pStt, pEnd ))
- nCount++; // #111827#
+ nCount++;
}
break;
}
}
}
- return nCount; // #111827#
+ return nCount;
}
void lcl_AdjustRedlineRange( SwPaM& rPam )
@@ -2091,7 +2096,6 @@ bool SwDoc::AcceptRedline( sal_uInt16 nPos, bool bCallDelete )
{
if (GetIDocumentUndoRedo().DoesUndo())
{
- // #111827#
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, pTmp->GetDescr());
@@ -2163,7 +2167,6 @@ bool SwDoc::AcceptRedline( const SwPaM& rPam, bool bCallDelete )
GetIDocumentUndoRedo().AppendUndo( new SwUndoAcceptRedline( aPam ));
}
- // #111827#
int nRet = lcl_AcceptRejectRedl( lcl_AcceptRedline, *pRedlineTbl,
bCallDelete, aPam );
if( nRet > 0 )
@@ -2173,7 +2176,6 @@ bool SwDoc::AcceptRedline( const SwPaM& rPam, bool bCallDelete )
}
if (GetIDocumentUndoRedo().DoesUndo())
{
- // #111827#
String aTmpStr;
{
@@ -2204,7 +2206,6 @@ bool SwDoc::RejectRedline( sal_uInt16 nPos, bool bCallDelete )
{
if (GetIDocumentUndoRedo().DoesUndo())
{
- // #111827#
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, pTmp->GetDescr());
@@ -2276,7 +2277,6 @@ bool SwDoc::RejectRedline( const SwPaM& rPam, bool bCallDelete )
GetIDocumentUndoRedo().AppendUndo( new SwUndoRejectRedline(aPam) );
}
- // #111827#
int nRet = lcl_AcceptRejectRedl( lcl_RejectRedline, *pRedlineTbl,
bCallDelete, aPam );
if( nRet > 0 )
@@ -2286,7 +2286,6 @@ bool SwDoc::RejectRedline( const SwPaM& rPam, bool bCallDelete )
}
if (GetIDocumentUndoRedo().DoesUndo())
{
- // #111827#
String aTmpStr;
{
@@ -2631,7 +2630,7 @@ sal_Bool SwRedlineTbl::Insert( SwRedlinePtr& p, sal_Bool bIns )
bRet = InsertWithValidRanges( p );
else
{
- ASSERT( !this, "Redline: falscher Bereich" );
+ OSL_ENSURE( !this, "Redline: falscher Bereich" );
}
return bRet;
}
@@ -2648,7 +2647,7 @@ sal_Bool SwRedlineTbl::Insert( SwRedlinePtr& p, sal_uInt16& rP, sal_Bool bIns )
bRet = InsertWithValidRanges( p, &rP );
else
{
- ASSERT( !this, "Redline: falscher Bereich" );
+ OSL_ENSURE( !this, "Redline: falscher Bereich" );
}
return bRet;
}
@@ -3008,8 +3007,6 @@ int SwRedlineExtraData_Format::operator == ( const SwRedlineExtraData& rCmp ) co
return nRet;
}
-/* */
-
SwRedlineData::SwRedlineData( RedlineType_t eT, sal_uInt16 nAut )
: pNext( 0 ), pExtraData( 0 ), eType( eT ), nAuthor( nAut ), nSeqNo( 0 )
{
@@ -3052,7 +3049,6 @@ void SwRedlineData::SetExtraData( const SwRedlineExtraData* pData )
pExtraData = 0;
}
-// #111827#
String SwRedlineData::GetDescr() const
{
String aResult;
@@ -3062,8 +3058,6 @@ String SwRedlineData::GetDescr() const
return aResult;
}
-/* */
-
SwRedline::SwRedline(RedlineType_t eTyp, const SwPaM& rPam )
: SwPaM( *rPam.GetMark(), *rPam.GetPoint() ),
pRedlineData( new SwRedlineData( eTyp, GetDoc()->GetRedlineAuthor() ) ),
@@ -3125,9 +3119,8 @@ sal_Bool SwRedline::HasValidRange() const
* pMkNd = &GetMark()->nNode.GetNode();
if( pPtNd->StartOfSectionNode() == pMkNd->StartOfSectionNode() &&
!pPtNd->StartOfSectionNode()->IsTableNode() &&
- // JP 18.5.2001: Bug 87222 - invalid if points on the end of content
- // DVO 25.03.2002: #96530# end-of-content only invalid if no content
- // index exists
+ // invalid if points on the end of content
+ // end-of-content only invalid if no content index exists
( pPtNd != pMkNd || GetContentIdx() != NULL ||
pPtNd != &pPtNd->GetNodes().GetEndOfContent() )
)
@@ -3305,7 +3298,7 @@ void SwRedline::CalcStartEnd( sal_uLong nNdIdx, sal_uInt16& nStart, sal_uInt16&
}
else
{
- ASSERT( pREnd->nNode == nNdIdx,
+ OSL_ENSURE( pREnd->nNode == nNdIdx,
"SwRedlineItr::Seek: GetRedlinePos Error" );
nStart = 0; // Absatz wird vorne ueberlappt
nEnd = pREnd->nContent.GetIndex();
@@ -3418,11 +3411,11 @@ void SwRedline::CopyToSection()
bSaveRdlMoveFlg = pDoc->IsRedlineMove();
pDoc->SetCopyIsMove( sal_True );
- // #100619# The IsRedlineMove() flag causes the behaviour of the
+ // The IsRedlineMove() flag causes the behaviour of the
// SwDoc::_CopyFlyInFly method to change, which will eventually be
// called by the pDoc->Copy line below (through SwDoc::_Copy,
- // SwDoc::CopyWithFlyInFly). This rather obscure bugfix was introduced
- // for #63198# and #64896#, and apparently never really worked.
+ // SwDoc::CopyWithFlyInFly). This rather obscure bugfix
+ // apparently never really worked.
pDoc->SetRedlineMove( pStt->nContent == 0 );
if( pCSttNd )
@@ -3440,7 +3433,7 @@ void SwRedline::CopyToSection()
SwPosition aPos( aNdIdx, SwIndex( pTxtNd ));
pDoc->CopyRange( *this, aPos, false );
- // JP 08.10.98: die Vorlage vom EndNode ggfs. mit uebernehmen
+ // die Vorlage vom EndNode ggfs. mit uebernehmen
// - ist im Doc::Copy nicht erwuenscht
if( pCEndNd && pCEndNd != pCSttNd )
{
@@ -3508,10 +3501,8 @@ void SwRedline::DelCopyOfSection()
if( pCSttNd && pCEndNd )
{
- // --> OD 2009-08-20 #i100466#
- // force a <join next> on <delete and join> operation
+ // #i100466# - force a <join next> on <delete and join> operation
pDoc->DeleteAndJoin( aPam, true );
- // <--
}
else if( pCSttNd || pCEndNd )
{
@@ -3521,7 +3512,7 @@ void SwRedline::DelCopyOfSection()
if( bDelLastPara )
{
- // #100611# To prevent dangling references to the paragraph to
+ // To prevent dangling references to the paragraph to
// be deleted, redline that point into this paragraph should be
// moved to the new end position. Since redlines in the redline
// table are sorted and the pEnd position is an endnode (see
@@ -3529,7 +3520,7 @@ void SwRedline::DelCopyOfSection()
// current ones can be affected.
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
sal_uInt16 n = rTbl.GetPos( this );
- ASSERT( n != USHRT_MAX, "How strange. We don't exist!" );
+ OSL_ENSURE( n != USHRT_MAX, "How strange. We don't exist!" );
for( sal_Bool bBreak = sal_False; !bBreak && n > 0; )
{
--n;
@@ -3577,7 +3568,7 @@ void SwRedline::MoveFromSection()
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
SvPtrarr aBeforeArr( 16, 16 ), aBehindArr( 16, 16 );
sal_uInt16 nMyPos = rTbl.GetPos( this );
- ASSERT( this, "this nicht im Array?" );
+ OSL_ENSURE( this, "this nicht im Array?" );
sal_Bool bBreak = sal_False;
sal_uInt16 n;
@@ -3615,9 +3606,7 @@ void SwRedline::MoveFromSection()
}
}
- // --> OD 2009-03-17 #i95711#
- const SwNode* pKeptCntntSectNode( &pCntntSect->GetNode() );
- // <--
+ const SwNode* pKeptCntntSectNode( &pCntntSect->GetNode() ); // #i95711#
{
SwPaM aPam( pCntntSect->GetNode(),
*pCntntSect->GetNode().EndOfSectionNode(), 1,
@@ -3666,7 +3655,7 @@ void SwRedline::MoveFromSection()
if( pColl && pCNd )
pCNd->ChgFmtColl( pColl );
}
- // --> OD 2009-03-17 #i95771#
+ // #i95771#
// Under certain conditions the previous <SwDoc::Move(..)> has already
// remove the change tracking section of this <SwRedline> instance from
// the change tracking nodes area.
@@ -3681,7 +3670,7 @@ void SwRedline::MoveFromSection()
// <--
delete pCntntSect, pCntntSect = 0;
- // #100611# adjustment of redline table positions must take start and
+ // adjustment of redline table positions must take start and
// end into account, not point and mark.
for( n = 0; n < aBeforeArr.Count(); ++n )
*(SwPosition*)aBeforeArr[ n ] = *Start();
@@ -3705,9 +3694,9 @@ void SwRedline::SetContentIdx( const SwNodeIndex* pIdx )
delete pCntntSect, pCntntSect = 0;
bIsVisible = sal_False;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
- ASSERT( !this, "das ist keine gueltige Operation" );
+ OSL_ENSURE( !this, "das ist keine gueltige Operation" );
#endif
}
@@ -3719,8 +3708,6 @@ sal_Bool SwRedline::CanCombine( const SwRedline& rRedl ) const
void SwRedline::PushData( const SwRedline& rRedl, sal_Bool bOwnAsNext )
{
-// SwRedlineData* pNew = new SwRedlineData( rRedl.GetType(),
-// rRedl.GetAuthor() );
SwRedlineData* pNew = new SwRedlineData( *rRedl.pRedlineData, sal_False );
if( bOwnAsNext )
{
@@ -3753,7 +3740,6 @@ sal_uInt16 SwRedline::GetStackCount() const
return nRet;
}
-// -> #111827#
sal_uInt16 SwRedline::GetAuthor( sal_uInt16 nPos ) const
{
return GetRedlineData(nPos).nAuthor;
@@ -3778,7 +3764,6 @@ const String& SwRedline::GetComment( sal_uInt16 nPos ) const
{
return GetRedlineData(nPos).sComment;
}
-// <- #111827#
int SwRedline::operator==( const SwRedline& rCmp ) const
{
@@ -3798,7 +3783,6 @@ int SwRedline::operator<( const SwRedline& rCmp ) const
return nResult;
}
-// -> #111827#
const SwRedlineData & SwRedline::GetRedlineData(sal_uInt16 nPos) const
{
SwRedlineData * pCur = pRedlineData;
@@ -3810,7 +3794,7 @@ const SwRedlineData & SwRedline::GetRedlineData(sal_uInt16 nPos) const
nPos--;
}
- ASSERT( 0 == nPos, "Pos angabe ist zu gross" );
+ OSL_ENSURE( 0 == nPos, "Pos angabe ist zu gross" );
return *pCur;
}
@@ -3854,7 +3838,6 @@ String SwRedline::GetDescr(sal_uInt16 nPos)
return aResult;
}
-// <- #111827#
bool SwDoc::IsInRedlines(const SwNode & rNode) const
@@ -3866,3 +3849,5 @@ bool SwDoc::IsInRedlines(const SwNode & rNode) const
return aPam.ContainsPosition(aPos) ? true : false;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index c8703ab6adcb..564e8d7e6989 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -298,28 +299,7 @@ sal_Bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_
case UnicodeType::OTHER_LETTER:
bChkNxtWrd = sal_True;
- // no break!
-// case UnicodeType::UNASSIGNED:
-// case UnicodeType::MODIFIER_LETTER:
-// case UnicodeType::NON_SPACING_MARK:
-// case UnicodeType::ENCLOSING_MARK:
-// case UnicodeType::COMBINING_SPACING_MARK:
-// case UnicodeType::LETTER_NUMBER:
-// case UnicodeType::OTHER_NUMBER:
-// case UnicodeType::LINE_SEPARATOR:
-// case UnicodeType::PARAGRAPH_SEPARATOR:
-// case UnicodeType::FORMAT:
-// case UnicodeType::SURROGATE:
-// case UnicodeType::DASH_PUNCTUATION:
-// case UnicodeType::CONNECTOR_PUNCTUATION:
-///*?? */case UnicodeType::OTHER_PUNCTUATION:
-//--> char '!' is to ignore!
-// case UnicodeType::MATH_SYMBOL:
-// case UnicodeType::CURRENCY_SYMBOL:
-// case UnicodeType::MODIFIER_SYMBOL:
-// case UnicodeType::OTHER_SYMBOL:
-// case UnicodeType::INITIAL_PUNCTUATION:
-// case UnicodeType::FINAL_PUNCTUATION:
+
default:
bIsAlphaNum = sal_False;
break;
@@ -359,3 +339,5 @@ sal_Bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_
SwRubyListEntry::~SwRubyListEntry()
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 497e00b70125..62b9560151c6 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,11 +58,6 @@
#include <node2lay.hxx>
#include <unochart.hxx>
-#if OSL_DEBUG_LEVEL > 1
-//nur zum debugen
-#include <cellatr.hxx>
-#endif
-
using namespace ::com::sun::star::lang;
SwSortOptions* SwSortElement::pOptions = 0;
@@ -74,16 +70,13 @@ LocaleDataWrapper* SwSortElement::pLclData = 0;
SV_IMPL_OP_PTRARR_SORT( SwSortElements, SwSortElementPtr );
-
/*--------------------------------------------------------------------
Beschreibung: Ein Sortierelement fuers Sort konstruieren
--------------------------------------------------------------------*/
-
-
void SwSortElement::Init( SwDoc* pD, const SwSortOptions& rOpt,
FlatFndBox* pFltBx )
{
- ASSERT( !pDoc && !pOptions && !pBox, "wer hat das Finit vergessen?" );
+ OSL_ENSURE( !pDoc && !pOptions && !pBox, "wer hat das Finit vergessen?" );
pDoc = pD;
pOptions = new SwSortOptions( rOpt );
pBox = pFltBx;
@@ -100,11 +93,8 @@ void SwSortElement::Init( SwDoc* pD, const SwSortOptions& rOpt,
pSortCollator = new CollatorWrapper(
::comphelper::getProcessServiceFactory() );
-// pSortCollator->loadCollatorAlgorithm( sAlgorithm, aLocale,
-// rOpt.bIgnoreCase ? SW_COLLATOR_IGNORES : 0 );
}
-
void SwSortElement::Finit()
{
delete pOptions, pOptions = 0;
@@ -116,12 +106,10 @@ void SwSortElement::Finit()
pBox = 0;
}
-
SwSortElement::~SwSortElement()
{
}
-
double SwSortElement::StrToDouble( const String& rStr ) const
{
if( !pLclData )
@@ -143,8 +131,6 @@ double SwSortElement::StrToDouble( const String& rStr ) const
/*--------------------------------------------------------------------
Beschreibung: Operatoren zum Vergleichen
--------------------------------------------------------------------*/
-
-
sal_Bool SwSortElement::operator==(const SwSortElement& )
{
return sal_False;
@@ -153,7 +139,6 @@ sal_Bool SwSortElement::operator==(const SwSortElement& )
/*--------------------------------------------------------------------
Beschreibung: Kleiner-Operator fuers sortieren
--------------------------------------------------------------------*/
-
sal_Bool SwSortElement::operator<(const SwSortElement& rCmp)
{
@@ -211,24 +196,18 @@ double SwSortElement::GetValue( sal_uInt16 nKey ) const
/*--------------------------------------------------------------------
Beschreibung: SortierElemente fuer Text
--------------------------------------------------------------------*/
-
-
SwSortTxtElement::SwSortTxtElement(const SwNodeIndex& rPos)
: nOrg(rPos.GetIndex()), aPos(rPos)
{
}
-
SwSortTxtElement::~SwSortTxtElement()
{
}
-
/*--------------------------------------------------------------------
Beschreibung: Key ermitteln
--------------------------------------------------------------------*/
-
-
String SwSortTxtElement::GetKey(sal_uInt16 nId) const
{
SwTxtNode* pTxtNd = aPos.GetNode().GetTxtNode();
@@ -255,17 +234,14 @@ String SwSortTxtElement::GetKey(sal_uInt16 nId) const
return rStr.Copy( nStart, nEnd-nStart );
}
-
/*--------------------------------------------------------------------
Beschreibung: Sortier-Elemente fuer Tabellen
--------------------------------------------------------------------*/
-
SwSortBoxElement::SwSortBoxElement( sal_uInt16 nRC )
: nRow( nRC )
{
}
-
SwSortBoxElement::~SwSortBoxElement()
{
}
@@ -273,8 +249,6 @@ SwSortBoxElement::~SwSortBoxElement()
/*--------------------------------------------------------------------
Beschreibung: Schluessel zu einer Zelle ermitteln
--------------------------------------------------------------------*/
-
-
String SwSortBoxElement::GetKey(sal_uInt16 nKey) const
{
const _FndBox* pFndBox;
@@ -290,7 +264,7 @@ String SwSortBoxElement::GetKey(sal_uInt16 nKey) const
if( pFndBox )
{ // StartNode holen und ueberlesen
const SwTableBox* pMyBox = pFndBox->GetBox();
- ASSERT(pMyBox, "Keine atomare Box");
+ OSL_ENSURE(pMyBox, "Keine atomare Box");
if( pMyBox->GetSttNd() )
{
@@ -332,8 +306,6 @@ double SwSortBoxElement::GetValue( sal_uInt16 nKey ) const
/*--------------------------------------------------------------------
Beschreibung: Text sortieren im Document
--------------------------------------------------------------------*/
-
-
sal_Bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
{
// pruefen ob Rahmen im Text
@@ -519,11 +491,10 @@ sal_Bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
/*--------------------------------------------------------------------
Beschreibung: Tabelle sortieren im Document
--------------------------------------------------------------------*/
-
sal_Bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
{
// uebers SwDoc fuer Undo !!
- ASSERT( rBoxes.Count(), "keine gueltige Box-Liste" );
+ OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -649,8 +620,6 @@ sal_Bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
/*--------------------------------------------------------------------
Beschreibung: Zeilenweise verschieben
--------------------------------------------------------------------*/
-
-
void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT,
SwMovedBoxes& rMovedList, SwUndoSort* pUD)
{
@@ -697,8 +666,6 @@ void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT,
/*--------------------------------------------------------------------
Beschreibung: Spaltenweise verschieben
--------------------------------------------------------------------*/
-
-
void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT,
SwMovedBoxes& rMovedList, SwUndoSort* pUD)
{
@@ -745,12 +712,10 @@ void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT,
/*--------------------------------------------------------------------
Beschreibung: Eine einzelne Zelle verschieben
--------------------------------------------------------------------*/
-
-
void MoveCell(SwDoc* pDoc, const SwTableBox* pSource, const SwTableBox* pTar,
sal_Bool bMovedBefore, SwUndoSort* pUD)
{
- ASSERT(pSource && pTar,"Fehlende Quelle oder Ziel");
+ OSL_ENSURE(pSource && pTar,"Fehlende Quelle oder Ziel");
if(pSource == pTar)
return;
@@ -780,7 +745,7 @@ void MoveCell(SwDoc* pDoc, const SwTableBox* pSource, const SwTableBox* pTar,
sal_Bool bDelFirst = sal_False;
if( nCount == 2 )
{
- ASSERT( pNd->GetCntntNode(), "Kein ContentNode");
+ OSL_ENSURE( pNd->GetCntntNode(), "Kein ContentNode");
bDelFirst = !pNd->GetCntntNode()->Len() && bMovedBefore;
}
@@ -803,8 +768,6 @@ void MoveCell(SwDoc* pDoc, const SwTableBox* pSource, const SwTableBox* pTar,
/*--------------------------------------------------------------------
Beschreibung: Zweidimensionales Array aus FndBoxes generieren
--------------------------------------------------------------------*/
-
-
FlatFndBox::FlatFndBox(SwDoc* pDocPtr, const _FndBox& rBox) :
pDoc(pDocPtr),
rBoxRef(rBox),
@@ -829,7 +792,6 @@ FlatFndBox::FlatFndBox(SwDoc* pDocPtr, const _FndBox& rBox) :
}
}
-
FlatFndBox::~FlatFndBox()
{
_FndBox** ppTmp = (_FndBox**)pArr;
@@ -842,8 +804,6 @@ FlatFndBox::~FlatFndBox()
/*--------------------------------------------------------------------
Beschreibung: Alle Lines einer Box muessen gleichviel Boxen haben
--------------------------------------------------------------------*/
-
-
sal_Bool FlatFndBox::CheckLineSymmetry(const _FndBox& rBox)
{
const _FndLines &rLines = rBox.GetLines();
@@ -870,8 +830,6 @@ sal_Bool FlatFndBox::CheckLineSymmetry(const _FndBox& rBox)
Beschreibung: Box auf Symmetrie pruefen
Alle Boxen einer Line muessen gleichviele Lines haben
--------------------------------------------------------------------*/
-
-
sal_Bool FlatFndBox::CheckBoxSymmetry(const _FndLine& rLn)
{
const _FndBoxes &rBoxes = rLn.GetBoxes();
@@ -897,8 +855,6 @@ sal_Bool FlatFndBox::CheckBoxSymmetry(const _FndLine& rLn)
/*--------------------------------------------------------------------
Beschreibung: max Anzahl der Spalten (Boxes)
--------------------------------------------------------------------*/
-
-
sal_uInt16 FlatFndBox::GetColCount(const _FndBox& rBox)
{
const _FndLines& rLines = rBox.GetLines();
@@ -926,8 +882,6 @@ sal_uInt16 FlatFndBox::GetColCount(const _FndBox& rBox)
/*--------------------------------------------------------------------
Beschreibung: max Anzahl der Zeilen (Lines)
--------------------------------------------------------------------*/
-
-
sal_uInt16 FlatFndBox::GetRowCount(const _FndBox& rBox)
{
const _FndLines& rLines = rBox.GetLines();
@@ -952,8 +906,6 @@ sal_uInt16 FlatFndBox::GetRowCount(const _FndBox& rBox)
/*--------------------------------------------------------------------
Beschreibung: lineares Array aus atomaren FndBoxes erzeugen
--------------------------------------------------------------------*/
-
-
void FlatFndBox::FillFlat(const _FndBox& rBox, sal_Bool bLastBox)
{
sal_Bool bModRow = sal_False;
@@ -1015,22 +967,20 @@ void FlatFndBox::FillFlat(const _FndBox& rBox, sal_Bool bLastBox)
/*--------------------------------------------------------------------
Beschreibung: Zugriff auf eine bestimmte Zelle
--------------------------------------------------------------------*/
-
-
const _FndBox* FlatFndBox::GetBox(sal_uInt16 n_Col, sal_uInt16 n_Row) const
{
sal_uInt16 nOff = n_Row * nCols + n_Col;
const _FndBox* pTmp = *(pArr + nOff);
- ASSERT(n_Col < nCols && n_Row < nRows && pTmp, "unzulaessiger Array-Zugriff");
+ OSL_ENSURE(n_Col < nCols && n_Row < nRows && pTmp, "unzulaessiger Array-Zugriff");
return pTmp;
}
const SfxItemSet* FlatFndBox::GetItemSet(sal_uInt16 n_Col, sal_uInt16 n_Row) const
{
- ASSERT( !ppItemSets || ( n_Col < nCols && n_Row < nRows), "unzulaessiger Array-Zugriff");
+ OSL_ENSURE( !ppItemSets || ( n_Col < nCols && n_Row < nRows), "unzulaessiger Array-Zugriff");
return ppItemSets ? *(ppItemSets + (n_Row * nCols + n_Col )) : 0;
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docstat.cxx b/sw/source/core/doc/docstat.cxx
index ee44bf142de3..0b79d817a436 100644
--- a/sw/source/core/doc/docstat.cxx
+++ b/sw/source/core/doc/docstat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,6 +46,7 @@ SwDocStat::SwDocStat() :
nAllPara(1),
nWord(0),
nChar(0),
+ nCharExcludingSpaces(0),
bModified(sal_True)
{}
@@ -62,6 +64,8 @@ void SwDocStat::Reset()
nAllPara= 1;
nWord = 0;
nChar = 0;
+ nCharExcludingSpaces = 0;
bModified = sal_True;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 79fcfc60049d..00d425324f25 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,7 +82,7 @@ using namespace ::com::sun::star;
const sal_Unicode cNumRepl = '@';
const sal_Unicode cEndPageNum = '~';
-const sal_Char __FAR_DATA sPageDeli[] = ", ";
+const sal_Char sPageDeli[] = ", ";
SV_IMPL_PTRARR(SwTOXSortTabBases, SwTOXSortTabBasePtr)
@@ -136,8 +137,6 @@ sal_uInt16 SwDoc::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
/*--------------------------------------------------------------------
Beschreibung: aktuelle Verzeichnismarkierungen ermitteln
--------------------------------------------------------------------*/
-
-
sal_uInt16 SwDoc::GetCurTOXMark( const SwPosition& rPos,
SwTOXMarks& rArr ) const
{
@@ -178,15 +177,14 @@ sal_uInt16 SwDoc::GetCurTOXMark( const SwPosition& rPos,
/*--------------------------------------------------------------------
Beschreibung: Marke loeschen
--------------------------------------------------------------------*/
-
void SwDoc::DeleteTOXMark( const SwTOXMark* pTOXMark )
{
// hole den TextNode und
const SwTxtTOXMark* pTxtTOXMark = pTOXMark->GetTxtTOXMark();
- ASSERT( pTxtTOXMark, "Kein TxtTOXMark, kann nicht geloescht werden" );
+ OSL_ENSURE( pTxtTOXMark, "Kein TxtTOXMark, kann nicht geloescht werden" );
SwTxtNode& rTxtNd = const_cast<SwTxtNode&>(pTxtTOXMark->GetTxtNode());
- ASSERT( rTxtNd.GetpSwpHints(), "kann nicht geloescht werden" );
+ OSL_ENSURE( rTxtNd.GetpSwpHints(), "kann nicht geloescht werden" );
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -213,7 +211,6 @@ void SwDoc::DeleteTOXMark( const SwTOXMark* pTOXMark )
/*--------------------------------------------------------------------
Beschreibung: Traveln zwischen TOXMarks
--------------------------------------------------------------------*/
-
class CompareNodeCntnt
{
sal_uLong nNode;
@@ -222,20 +219,20 @@ public:
CompareNodeCntnt( sal_uLong nNd, xub_StrLen nCnt )
: nNode( nNd ), nCntnt( nCnt ) {}
- int operator==( const CompareNodeCntnt& rCmp )
+ int operator==( const CompareNodeCntnt& rCmp ) const
{ return nNode == rCmp.nNode && nCntnt == rCmp.nCntnt; }
- int operator!=( const CompareNodeCntnt& rCmp )
+ int operator!=( const CompareNodeCntnt& rCmp ) const
{ return nNode != rCmp.nNode || nCntnt != rCmp.nCntnt; }
- int operator< ( const CompareNodeCntnt& rCmp )
+ int operator< ( const CompareNodeCntnt& rCmp ) const
{ return nNode < rCmp.nNode ||
( nNode == rCmp.nNode && nCntnt < rCmp.nCntnt); }
- int operator<=( const CompareNodeCntnt& rCmp )
+ int operator<=( const CompareNodeCntnt& rCmp ) const
{ return nNode < rCmp.nNode ||
( nNode == rCmp.nNode && nCntnt <= rCmp.nCntnt); }
- int operator> ( const CompareNodeCntnt& rCmp )
+ int operator> ( const CompareNodeCntnt& rCmp ) const
{ return nNode > rCmp.nNode ||
( nNode == rCmp.nNode && nCntnt > rCmp.nCntnt); }
- int operator>=( const CompareNodeCntnt& rCmp )
+ int operator>=( const CompareNodeCntnt& rCmp ) const
{ return nNode > rCmp.nNode ||
( nNode == rCmp.nNode && nCntnt >= rCmp.nCntnt); }
};
@@ -244,7 +241,7 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
SwTOXSearch eDir, sal_Bool bInReadOnly )
{
const SwTxtTOXMark* pMark = rCurTOXMark.GetTxtTOXMark();
- ASSERT(pMark, "pMark==0 Ungueltige TxtTOXMark");
+ OSL_ENSURE(pMark, "pMark==0 Ungueltige TxtTOXMark");
const SwTxtNode *pTOXSrc = pMark->GetpTxtNd();
@@ -356,8 +353,6 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
return *pNew;
}
-/* */
-
const SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos,
const SwTOXBase& rTOX,
const SfxItemSet* pSet,
@@ -378,7 +373,7 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos,
if( bExpand )
{
- // OD 19.03.2003 #106329# - add value for 2nd parameter = true to
+ // add value for 2nd parameter = true to
// indicate, that a creation of a new table of content has to be performed.
// Value of 1st parameter = default value.
pNewSection->Update( 0, true );
@@ -410,8 +405,6 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
return pNewSection;
}
-
-
const SwTOXBaseSection* SwDoc::InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd,
const SwTOXBase& rTOX,
const SfxItemSet* pSet )
@@ -456,7 +449,6 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd
/*--------------------------------------------------------------------
Beschreibung: Aktuelles Verzeichnis ermitteln
--------------------------------------------------------------------*/
-
const SwTOXBase* SwDoc::GetCurTOX( const SwPosition& rPos ) const
{
const SwNode& rNd = rPos.nNode.GetNode();
@@ -466,7 +458,7 @@ const SwTOXBase* SwDoc::GetCurTOX( const SwPosition& rPos ) const
SectionType eT = pSectNd->GetSection().GetType();
if( TOX_CONTENT_SECTION == eT )
{
- ASSERT( pSectNd->GetSection().ISA( SwTOXBaseSection ),
+ OSL_ENSURE( pSectNd->GetSection().ISA( SwTOXBaseSection ),
"keine TOXBaseSection!" );
SwTOXBaseSection& rTOXSect = (SwTOXBaseSection&)
pSectNd->GetSection();
@@ -476,20 +468,16 @@ const SwTOXBase* SwDoc::GetCurTOX( const SwPosition& rPos ) const
}
return 0;
}
-/* -----------------01.09.99 16:01-------------------
- --------------------------------------------------*/
const SwAttrSet& SwDoc::GetTOXBaseAttrSet(const SwTOXBase& rTOXBase) const
{
- ASSERT( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
+ OSL_ENSURE( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
const SwTOXBaseSection& rTOXSect = (const SwTOXBaseSection&)rTOXBase;
SwSectionFmt* pFmt = rTOXSect.GetFmt();
- ASSERT( pFmt, "invalid TOXBaseSection!" );
+ OSL_ENSURE( pFmt, "invalid TOXBaseSection!" );
return pFmt->GetAttrSet();
}
-/* -----------------02.09.99 07:48-------------------
- --------------------------------------------------*/
const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate )
{
SwTOXBase** prBase = 0;
@@ -511,9 +499,7 @@ const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate )
}
return (*prBase);
}
-/* -----------------02.09.99 08:06-------------------
- --------------------------------------------------*/
void SwDoc::SetDefaultTOXBase(const SwTOXBase& rBase)
{
SwTOXBase** prBase = 0;
@@ -535,13 +521,11 @@ void SwDoc::SetDefaultTOXBase(const SwTOXBase& rBase)
/*--------------------------------------------------------------------
Beschreibung: Verzeichnis loeschen
--------------------------------------------------------------------*/
-
-
sal_Bool SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes )
{
// its only delete the TOX, not the nodes
sal_Bool bRet = sal_False;
- ASSERT( rTOXBase.ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
+ OSL_ENSURE( rTOXBase.ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
const SwTOXBaseSection& rTOXSect = (const SwTOXBaseSection&)rTOXBase;
SwSectionFmt* pFmt = rTOXSect.GetFmt();
@@ -629,7 +613,6 @@ sal_Bool SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes )
/*--------------------------------------------------------------------
Beschreibung: Verzeichnistypen verwalten
--------------------------------------------------------------------*/
-
sal_uInt16 SwDoc::GetTOXTypeCount(TOXTypes eTyp) const
{
const SwTOXTypePtr * ppTTypes = pTOXTypes->GetData();
@@ -639,9 +622,7 @@ sal_uInt16 SwDoc::GetTOXTypeCount(TOXTypes eTyp) const
++nCnt;
return nCnt;
}
-/*--------------------------------------------------------------------
- --------------------------------------------------------------------*/
const SwTOXType* SwDoc::GetTOXType( TOXTypes eTyp, sal_uInt16 nId ) const
{
const SwTOXTypePtr * ppTTypes = pTOXTypes->GetData();
@@ -652,18 +633,13 @@ const SwTOXType* SwDoc::GetTOXType( TOXTypes eTyp, sal_uInt16 nId ) const
return 0;
}
-/*--------------------------------------------------------------------
-
- --------------------------------------------------------------------*/
const SwTOXType* SwDoc::InsertTOXType( const SwTOXType& rTyp )
{
SwTOXType * pNew = new SwTOXType( rTyp );
pTOXTypes->Insert( pNew, pTOXTypes->Count() );
return pNew;
}
-/*--------------------------------------------------------------------
- --------------------------------------------------------------------*/
String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType,
const String* pChkStr ) const
{
@@ -718,12 +694,9 @@ String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType,
return aName += String::CreateFromInt32( ++nNum );
}
-/*--------------------------------------------------------------------
-
- --------------------------------------------------------------------*/
sal_Bool SwDoc::SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName)
{
- ASSERT( rTOXBase.ISA( SwTOXBaseSection ),
+ OSL_ENSURE( rTOXBase.ISA( SwTOXBaseSection ),
"keine TOXBaseSection!" );
SwTOXBaseSection* pTOX = (SwTOXBaseSection*)&rTOXBase;
@@ -738,8 +711,6 @@ sal_Bool SwDoc::SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName)
return bRet;
}
-/* */
-
const SwTxtNode* lcl_FindChapterNode( const SwNode& rNd, sal_uInt8 nLvl = 0 )
{
const SwNode* pNd = &rNd;
@@ -754,17 +725,15 @@ const SwTxtNode* lcl_FindChapterNode( const SwNode& rNd, sal_uInt8 nLvl = 0 )
{
SwPosition aPos( *pNd );
pNd = GetBodyTxtNode( *pNd->GetDoc(), aPos, *pFrm );
- ASSERT( pNd, "wo steht der Absatz" );
+ OSL_ENSURE( pNd, "wo steht der Absatz" );
}
}
return pNd ? pNd->FindOutlineNodeOfLevel( nLvl ) : 0;
}
-
/*--------------------------------------------------------------------
Beschreibung: Verzeichnis-Klasse
--------------------------------------------------------------------*/
-
SwTOXBaseSection::SwTOXBaseSection(SwTOXBase const& rBase, SwSectionFmt & rFmt)
: SwTOXBase( rBase )
, SwSection( TOX_CONTENT_SECTION, aEmptyStr, rFmt )
@@ -773,12 +742,10 @@ SwTOXBaseSection::SwTOXBaseSection(SwTOXBase const& rBase, SwSectionFmt & rFmt)
SetSectionName( GetTOXName() );
}
-
SwTOXBaseSection::~SwTOXBaseSection()
{
}
-
sal_Bool SwTOXBaseSection::SetPosAtStartEnd( SwPosition& rPos, sal_Bool bAtStart ) const
{
sal_Bool bRet = sal_False;
@@ -807,7 +774,6 @@ sal_Bool SwTOXBaseSection::SetPosAtStartEnd( SwPosition& rPos, sal_Bool bAtStart
/*--------------------------------------------------------------------
Beschreibung: Verzeichnisinhalt zusammensammeln
--------------------------------------------------------------------*/
-
void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
const bool _bNewTOX )
{
@@ -825,8 +791,8 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
if(pAttr && pDoc && GetFmt())
pDoc->ChgFmt(*GetFmt(), *pAttr);
- // OD 18.03.2003 #106329# - determine default page description, which
- // will be used by the content nodes, if no approriate one is found.
+ // determine default page description, which will be used by the content nodes,
+ // if no approriate one is found.
const SwPageDesc* pDefaultPageDesc;
{
pDefaultPageDesc =
@@ -842,8 +808,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
pDefaultPageDesc = 0;
}
}
- // OD 28.04.2003 #109166# - consider end node of content section in the
- // node array.
+ // consider end node of content section in the node array.
if ( !pDefaultPageDesc &&
( pSectNd->EndOfSectionNode()->GetIndex() <
(pSectNd->GetNodes().GetEndOfContent().GetIndex() - 1) )
@@ -861,8 +826,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
pDefaultPageDesc = pNdAfterTOX->FindPageDesc( sal_False );
}
}
- // OD 28.04.2003 #109166# - consider start node of content section in
- // the node array.
+ // consider start node of content section in the node array.
if ( !pDefaultPageDesc &&
( pSectNd->GetIndex() >
(pSectNd->GetNodes().GetEndOfContent().StartOfSectionIndex() + 1) )
@@ -1053,8 +1017,8 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
pNextMark->GetSecondaryKey() == sSecKey)
nRange++;
}
- // OD 18.03.2003 #106329# - pass node index of table-of-content section
- // and default page description to method <GenerateText(..)>.
+ // pass node index of table-of-content section and default page description
+ // to method <GenerateText(..)>.
GenerateText( nCnt, nRange, aStrArr, pSectNd->GetIndex(), pDefaultPageDesc );
nCnt += nRange - 1;
}
@@ -1098,8 +1062,6 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
/*--------------------------------------------------------------------
Beschreibung: AlphaDelimitter einfuegen
--------------------------------------------------------------------*/
-
-
void SwTOXBaseSection::InsertAlphaDelimitter( const SwTOXInternational& rIntl )
{
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
@@ -1144,7 +1106,6 @@ void SwTOXBaseSection::InsertAlphaDelimitter( const SwTOXInternational& rIntl )
/*--------------------------------------------------------------------
Beschreibung: Template auswerten
--------------------------------------------------------------------*/
-
SwTxtFmtColl* SwTOXBaseSection::GetTxtFmtColl( sal_uInt16 nLevel )
{
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
@@ -1192,11 +1153,9 @@ SwTxtFmtColl* SwTOXBaseSection::GetTxtFmtColl( sal_uInt16 nLevel )
return pColl;
}
-
/*--------------------------------------------------------------------
Beschreibung: Aus Markierungen erzeugen
--------------------------------------------------------------------*/
-
void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl,
const SwTxtNode* pOwnChapterNode )
{
@@ -1270,12 +1229,9 @@ void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl,
}
}
-
/*--------------------------------------------------------------------
Beschreibung: Verzeichnisinhalt aus Gliederungsebene generieren
--------------------------------------------------------------------*/
-
-
void SwTOXBaseSection::UpdateOutline( const SwTxtNode* pOwnChapterNode )
{
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
@@ -1287,8 +1243,7 @@ void SwTOXBaseSection::UpdateOutline( const SwTxtNode* pOwnChapterNode )
::SetProgressState( 0, pDoc->GetDocShell() );
SwTxtNode* pTxtNd = rOutlNds[ n ]->GetTxtNode();
if( pTxtNd && pTxtNd->Len() && pTxtNd->GetDepends() &&
- //sal_uInt16(pTxtNd->GetTxtColl()->GetOutlineLevel()+1) <= GetLevel() && //#outline level,zhaojianwei
- sal_uInt16( pTxtNd->GetAttrOutlineLevel()) <= GetLevel() && //<-end,zhaojianwei
+ sal_uInt16( pTxtNd->GetAttrOutlineLevel()) <= GetLevel() &&
pTxtNd->GetFrm() &&
!pTxtNd->HasHiddenParaField() &&
!pTxtNd->HasHiddenCharAttribute( true ) &&
@@ -1304,7 +1259,6 @@ void SwTOXBaseSection::UpdateOutline( const SwTxtNode* pOwnChapterNode )
/*--------------------------------------------------------------------
Beschreibung: Verzeichnisinhalt aus Vorlagenbereichen generieren
--------------------------------------------------------------------*/
-
void SwTOXBaseSection::UpdateTemplate( const SwTxtNode* pOwnChapterNode )
{
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
@@ -1321,8 +1275,7 @@ void SwTOXBaseSection::UpdateTemplate( const SwTxtNode* pOwnChapterNode )
if( !pColl ||
( TOX_CONTENT == SwTOXBase::GetType() &&
GetCreateType() & nsSwTOXElement::TOX_OUTLINELEVEL &&
- //NO_NUMBERING != pColl->GetOutlineLevel() ) )//#outline level,zhaojianwei
- pColl->IsAssignedToListLevelOfOutlineStyle()) )//<-end,zhaojianwei
+ pColl->IsAssignedToListLevelOfOutlineStyle()) )
continue;
SwClientIter aIter( *pColl );
@@ -1344,7 +1297,7 @@ void SwTOXBaseSection::UpdateTemplate( const SwTxtNode* pOwnChapterNode )
}
}
-/* -----------------14.07.99 09:59-------------------
+/* --------------------------------------------------
Description: generate content from sequence fields
--------------------------------------------------*/
void SwTOXBaseSection::UpdateSequence( const SwTxtNode* pOwnChapterNode )
@@ -1384,9 +1337,7 @@ void SwTOXBaseSection::UpdateSequence( const SwTxtNode* pOwnChapterNode )
}
}
}
-/* -----------------15.09.99 14:18-------------------
- --------------------------------------------------*/
void SwTOXBaseSection::UpdateAuthorities( const SwTOXInternational& rIntl )
{
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
@@ -1405,11 +1356,8 @@ void SwTOXBaseSection::UpdateAuthorities( const SwTOXInternational& rIntl )
const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode();
::SetProgressState( 0, pDoc->GetDocShell() );
-// const SwTxtNode* pChapterCompareNode = 0;
-
if( rTxtNode.GetTxt().Len() && rTxtNode.GetFrm() &&
- rTxtNode.GetNodes().IsDocNodes() /*&&
- (!IsFromChapter() || pChapterCompareNode == pOwnChapterNode) */)
+ rTxtNode.GetNodes().IsDocNodes() )
{
//#106485# the body node has to be used!
SwCntntFrm *pFrm = rTxtNode.GetFrm();
@@ -1526,7 +1474,7 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
}
else
{
- DBG_ERROR("OLE-object nicht geladen?");
+ OSL_FAIL("OLE-object nicht geladen?");
bInclude = sal_False;
}
}
@@ -1553,9 +1501,6 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
MAXLEVEL - 1 );
if( pOutlNd )
{
- //sal_uInt16 nTmp = pOutlNd->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
- //if( nTmp < NO_NUMBERING )
- // nSetLevel = nTmp + 1;
if( pOutlNd->GetTxtColl()->IsAssignedToListLevelOfOutlineStyle())
nSetLevel = pOutlNd->GetTxtColl()->GetAttrOutlineLevel() ;//<-end,zhaojianwei
}
@@ -1579,7 +1524,6 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
/*--------------------------------------------------------------------
Beschreibung: Tabelleneintraege zusammensuchen
--------------------------------------------------------------------*/
-
void SwTOXBaseSection::UpdateTable( const SwTxtNode* pOwnChapterNode )
{
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
@@ -1612,9 +1556,6 @@ void SwTOXBaseSection::UpdateTable( const SwTxtNode* pOwnChapterNode )
::lcl_FindChapterNode( *pCNd, MAXLEVEL - 1 );
if( pOutlNd )
{
- //sal_uInt16 nTmp = pOutlNd->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
- //if( nTmp < NO_NUMBERING )
- // pNew->SetLevel( nTmp + 1 );
if( pOutlNd->GetTxtColl()->IsAssignedToListLevelOfOutlineStyle())
{
const int nTmp = pOutlNd->GetTxtColl()->GetAttrOutlineLevel();
@@ -1634,7 +1575,6 @@ void SwTOXBaseSection::UpdateTable( const SwTxtNode* pOwnChapterNode )
Beschreibung: String generieren anhand der Form
SonderZeichen 0-31 und 255 entfernen
--------------------------------------------------------------------*/
-
String lcl_GetNumString( const SwTOXSortTabBase& rBase, sal_Bool bUsePrefix, sal_uInt8 nLevel )
{
String sRet;
@@ -1653,8 +1593,8 @@ String lcl_GetNumString( const SwTOXSortTabBase& rBase, sal_Bool bUsePrefix, sal
return sRet;
}
-// OD 18.03.2003 #106329# - add parameter <_TOXSectNdIdx> and <_pDefaultPageDesc>
-// in order to control, which page description is used, no appropriate one is found.
+// add parameter <_TOXSectNdIdx> and <_pDefaultPageDesc> in order to control,
+// which page description is used, no appropriate one is found.
void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
sal_uInt16 nCount,
SvStringsDtor& ,
@@ -1676,7 +1616,7 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
// String mit dem Pattern aus der Form initialisieren
const SwTOXSortTabBase& rBase = *aSortArr[nIndex];
sal_uInt16 nLvl = rBase.GetLevel();
- ASSERT( nLvl < GetTOXForm().GetFormMax(), "ungueltiges FORM_LEVEL");
+ OSL_ENSURE( nLvl < GetTOXForm().GetFormMax(), "ungueltiges FORM_LEVEL");
SvxTabStopItem aTStops( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
xub_StrLen nLinkStartPosition = STRING_NOTFOUND;
@@ -1758,7 +1698,6 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
{
// dann hilft alles nichts, wir muessen ueber die Seiten-
// vorlage gehen.
- // OD 18.03.2003 #106329# - call
sal_uInt32 nPgDescNdIdx = pTOXNd->GetIndex() + 1;
sal_uInt32* pPgDescNdIdx = &nPgDescNdIdx;
pPageDesc = pTOXNd->FindPageDesc( sal_False, pPgDescNdIdx );
@@ -1815,9 +1754,6 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
aInsStr += cEndPageNum;
rTxt.Append( aInsStr );
}
-// // Tab entfernen, wenn keine Seitennummer
-// else if( rTxt.Len() && '\t' == rTxt.GetChar( rTxt.Len() - 1 ))
-// rTxt.Erase( rTxt.Len()-1, 1 );
}
break;
@@ -1828,12 +1764,9 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
if(rBase.aTOXSources.Count())
pTOXSource = &rBase.aTOXSources[0];
- // --> OD 2008-02-14 #i53420#
-// if( pTOXSource && pTOXSource->pNd
-// pTOXSource->pNd->IsTxtNode() )
+ // #i53420#
if ( pTOXSource && pTOXSource->pNd &&
pTOXSource->pNd->IsCntntNode() )
- // <--
{
const SwCntntFrm* pFrm = pTOXSource->pNd->GetFrm();
if( pFrm )
@@ -1841,14 +1774,13 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
SwChapterFieldType aFldTyp;
SwChapterField aFld( &aFldTyp, aToken.nChapterFormat );
aFld.SetLevel( static_cast<sal_uInt8>(aToken.nOutlineLevel - 1) );
- // --> OD 2008-02-14 #i53420#
-// aFld.ChangeExpansion( pFrm, (SwTxtNode*)pTOXSource->pNd, sal_True );
+ // #i53420#
aFld.ChangeExpansion( pFrm,
dynamic_cast<const SwCntntNode*>(pTOXSource->pNd),
sal_True );
// <--
- //---> i89791
- // OD 2008-06-26 - continue to support CF_NUMBER
+ //---> #i89791#
+ // continue to support CF_NUMBER
// and CF_NUM_TITLE in order to handle ODF 1.0/1.1
// written by OOo 3.x in the same way as OOo 2.x
// would handle them.
@@ -1937,7 +1869,7 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
}
}
- aIt++; // #i21237#
+ ++aIt; // #i21237#
}
pTOXNd->SetAttr( aTStops );
@@ -1956,7 +1888,6 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
Beschreibung: Seitennummer errechnen und nach dem Formatieren
eintragen
--------------------------------------------------------------------*/
-
void SwTOXBaseSection::UpdatePageNum()
{
if( !aSortArr.Count() )
@@ -2011,7 +1942,7 @@ void SwTOXBaseSection::UpdatePageNum()
if( rTOXSource.pNd )
{
SwCntntFrm* pFrm = rTOXSource.pNd->GetFrm();
- ASSERT( pFrm || pDoc->IsUpdateTOX(), "TOX, no Frame found");
+ OSL_ENSURE( pFrm || pDoc->IsUpdateTOX(), "TOX, no Frame found");
if( !pFrm )
continue;
if( pFrm->IsTxtFrm() && ((SwTxtFrm*)pFrm)->HasFollow() )
@@ -2054,7 +1985,7 @@ void SwTOXBaseSection::UpdatePageNum()
if(pBase->pTOXNd)
{
const SwTxtNode* pTxtNd = pBase->pTOXNd->GetTxtNode();
- ASSERT( pTxtNd, "kein TextNode, falsches Verzeichnis" );
+ OSL_ENSURE( pTxtNd, "kein TextNode, falsches Verzeichnis" );
_UpdatePageNum( (SwTxtNode*)pTxtNd, aNums, aDescs, pMainNums,
aIntl );
@@ -2068,11 +1999,9 @@ void SwTOXBaseSection::UpdatePageNum()
aSortArr.DeleteAndDestroy( 0, aSortArr.Count() );
}
-
/*--------------------------------------------------------------------
Beschreibung: Austausch der Seitennummer-Platzhalter
--------------------------------------------------------------------*/
-
// search for the page no in the array of main entry page numbers
sal_Bool lcl_HasMainEntry( const SvUShorts* pMainEntryNums, sal_uInt16 nToFind )
{
@@ -2248,11 +2177,9 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
delete pCharStyleIdx;
}
-
/*--------------------------------------------------------------------
Beschreibung: Sortiert einfuegen in das SortArr
--------------------------------------------------------------------*/
-
void SwTOXBaseSection::InsertSorted(SwTOXSortTabBase* pNew)
{
Range aRange(0, aSortArr.Count());
@@ -2328,9 +2255,9 @@ void SwTOXBaseSection::InsertSorted(SwTOXSortTabBase* pNew)
delete pNew;
return;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
- DBG_ERROR("Bibliography entries cannot be found here");
+ OSL_FAIL("Bibliography entries cannot be found here");
#endif
}
if(*pNew < *pOld)
@@ -2348,7 +2275,6 @@ void SwTOXBaseSection::InsertSorted(SwTOXSortTabBase* pNew)
/*--------------------------------------------------------------------
Beschreibung: Schluessel-Bereich suchen und evtl einfuegen
--------------------------------------------------------------------*/
-
Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReading,
const SwTOXSortTabBase& rNew,
sal_uInt16 nLevel, const Range& rRange )
@@ -2363,7 +2289,7 @@ Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReadin
sToCompare.Erase( 0, 1 ).Insert( sUpper, 0 );
}
- ASSERT(rRange.Min() >= 0 && rRange.Max() >= 0, "Min Max < 0");
+ OSL_ENSURE(rRange.Min() >= 0 && rRange.Max() >= 0, "Min Max < 0");
const sal_uInt16 nMin = (sal_uInt16)rRange.Min();
const sal_uInt16 nMax = (sal_uInt16)rRange.Max();
@@ -2408,7 +2334,6 @@ Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReadin
return Range(nStart, nEnd);
}
-
sal_Bool SwTOXBase::IsTOXBaseInReadonly() const
{
const SwTOXBaseSection *pSect = PTR_CAST(SwTOXBaseSection, this);
@@ -2426,9 +2351,7 @@ sal_Bool SwTOXBase::IsTOXBaseInReadonly() const
}
return bRet;
}
-/* -----------------17.08.99 13:29-------------------
- --------------------------------------------------*/
const SfxItemSet* SwTOXBase::GetAttrSet() const
{
const SwTOXBaseSection *pSect = PTR_CAST(SwTOXBaseSection, this);
@@ -2459,6 +2382,4 @@ sal_Bool SwTOXBase::GetInfo( SfxPoolItem& rInfo ) const
return sal_True;
}
-/* */
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docxforms.cxx b/sw/source/core/doc/docxforms.cxx
index febab662a8fa..bf34f2a64699 100644
--- a/sw/source/core/doc/docxforms.cxx
+++ b/sw/source/core/doc/docxforms.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -121,3 +122,5 @@ void SwDoc::initXForms( bool bCreateDefaultModel )
DBG_UNHANDLED_EXCEPTION();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index 93d177aed548..6ed12fd4cce5 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -292,9 +293,10 @@ SwExtTextInput* SwDoc::GetExtTextInput( const SwNode& rNd,
SwExtTextInput* SwDoc::GetExtTextInput() const
{
- ASSERT( !pExtInputRing || pExtInputRing == pExtInputRing->GetNext(),
+ OSL_ENSURE( !pExtInputRing || pExtInputRing == pExtInputRing->GetNext(),
"more then one InputEngine available" );
return (SwExtTextInput*)pExtInputRing;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx
index c43e363e3a72..cbbb1afaeef3 100644
--- a/sw/source/core/doc/fmtcol.cxx
+++ b/sw/source/core/doc/fmtcol.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,16 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
+#include <sal/macros.h>
#include <hintids.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <doc.hxx> // fuer GetAttrPool
-#include <errhdl.hxx>
#include <fmtcol.hxx>
-// --> OD 2006-11-22 #i71574#
-#include <fmtcolfunc.hxx>
-// <--
+#include <fmtcolfunc.hxx> // #i71574#
#include <hints.hxx>
#include <calc.hxx>
#include <node.hxx>
@@ -44,9 +44,7 @@
#include <paratr.hxx>
//--> #outlinelevel added by zhaojianwei
-#ifndef _SFXINTITEM_HXX
#include <svl/intitem.hxx>
-#endif
//<--end
TYPEINIT1( SwTxtFmtColl, SwFmtColl );
@@ -56,11 +54,10 @@ TYPEINIT1( SwCollCondition, SwClient );
SV_IMPL_PTRARR( SwFmtCollConditions, SwCollConditionPtr );
-// --> OD 2008-03-04 #refactorlists#
namespace TxtFmtCollFunc
{
- // --> OD 2006-11-22 #i71574#
+ // #i71574#
void CheckTxtFmtCollForDeletionOfAssignmentToOutlineStyle(
SwFmt* pFmt,
const SwNumRuleItem* pNewNumRuleItem )
@@ -69,14 +66,13 @@ namespace TxtFmtCollFunc
if ( !pTxtFmtColl )
{
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false,
+ OSL_ENSURE( false,
"<TxtFmtCollFunc::CheckTxtFmtCollFuncForDeletionOfAssignmentToOutlineStyle> - misuse of method - it's only for instances of <SwTxtFmtColl>" );
#endif
return;
}
- // --> OD 2007-01-24 #i73790#
- // if ( pTxtFmtColl->AssignedToListLevelOfOutlineStyle() )
+ // #i73790#
if ( !pTxtFmtColl->StayAssignedToListLevelOfOutlineStyle() &&
pTxtFmtColl->IsAssignedToListLevelOfOutlineStyle() )
// <--
@@ -149,16 +145,13 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
return;
}
- // --> OD 2006-06-16 #i66431# - adjust type of <bNewParent>
- bool bNewParent( false );
- // <--
+ bool bNewParent( false ); // #i66431# - adjust type of <bNewParent>
SvxULSpaceItem *pNewULSpace = 0, *pOldULSpace = 0;
SvxLRSpaceItem *pNewLRSpace = 0, *pOldLRSpace = 0;
SvxFontHeightItem* aFontSizeArr[3] = {0,0,0};
- // --> OD 2006-10-17 #i70223#
+ // #i70223#
const bool bAssignedToListLevelOfOutlineStyle(IsAssignedToListLevelOfOutlineStyle());//#outline level ,zhaojianwei
const SwNumRuleItem* pNewNumRuleItem( 0L );
- // <--
SwAttrSetChg *pNewChgSet = 0, *pOldChgSet = 0;
@@ -178,8 +171,7 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
sal_False, (const SfxPoolItem**)&(aFontSizeArr[1]) );
pNewChgSet->GetChgSet()->GetItemState( RES_CHRATR_CTL_FONTSIZE,
sal_False, (const SfxPoolItem**)&(aFontSizeArr[2]) );
- // --> OD 2006-10-17 #i70223#
- // --> OD 2007-12-19 #i84745#
+ // #i70223#, #i84745#
// check, if attribute set is applied to this paragraph style
if ( bAssignedToListLevelOfOutlineStyle &&
pNewChgSet->GetTheChgdSet() == &GetAttrSet() )
@@ -200,10 +192,8 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
aFontSizeArr[0] = (SvxFontHeightItem*)&pParent->Get( RES_CHRATR_FONTSIZE );
aFontSizeArr[1] = (SvxFontHeightItem*)&pParent->Get( RES_CHRATR_CJK_FONTSIZE );
aFontSizeArr[2] = (SvxFontHeightItem*)&pParent->Get( RES_CHRATR_CTL_FONTSIZE );
- // --> OD 2006-06-16 #i66431#
- // modify has to be propagated, because of new parent format.
+ // #i66431# - modify has to be propagated, because of new parent format.
bNewParent = true;
- // <--
}
break;
@@ -222,7 +212,7 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
case RES_CHRATR_CTL_FONTSIZE:
aFontSizeArr[2] = (SvxFontHeightItem*)pNew;
break;
- // --> OD 2006-10-17 #i70223#
+ // #i70223#
case RES_PARATR_NUMRULE:
{
if ( bAssignedToListLevelOfOutlineStyle )
@@ -234,7 +224,7 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
break;
}
- // --> OD 2006-10-17 #i70223#
+ // #i70223#
if ( bAssignedToListLevelOfOutlineStyle && pNewNumRuleItem )
{
TxtFmtCollFunc::CheckTxtFmtCollForDeletionOfAssignmentToOutlineStyle(
@@ -318,7 +308,7 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
- for( int nC = 0, nArrLen = sizeof(aFontSizeArr) / sizeof( aFontSizeArr[0]);
+ for( int nC = 0, nArrLen = SAL_N_ELEMENTS(aFontSizeArr);
nC < nArrLen; ++nC )
{
SvxFontHeightItem *pFSize = aFontSizeArr[ nC ], *pOldFSize;
@@ -370,7 +360,6 @@ sal_Bool SwTxtFmtColl::IsAtDocNodeSet() const
return sal_False;
}
-// --> OD 2008-03-04 #refactorlists#
sal_Bool SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr )
{
const bool bIsNumRuleItem = rAttr.Which() == RES_PARATR_NUMRULE;
@@ -426,12 +415,12 @@ sal_Bool SwTxtFmtColl::ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
}
// <--
-// --> OD 2007-01-24 #i73790#
+// #i73790#
sal_uInt16 SwTxtFmtColl::ResetAllFmtAttr()
{
const bool bOldState( mbStayAssignedToListLevelOfOutlineStyle );
mbStayAssignedToListLevelOfOutlineStyle = true;
- // --> OD 2008-12-16 #i70748#
+ // #i70748#
// Outline level is no longer a member, it is a attribute now.
// Thus, it needs to be restored, if the paragraph style is assigned
// to the outline style
@@ -442,7 +431,7 @@ sal_uInt16 SwTxtFmtColl::ResetAllFmtAttr()
sal_uInt16 nRet = SwFmtColl::ResetAllFmtAttr();
- // --> OD 2008-12-16 #i70748#
+ // #i70748#
if ( nAssignedOutlineStyleLevel != -1 )
{
AssignToListLevelOfOutlineStyle( nAssignedOutlineStyleLevel );
@@ -455,7 +444,6 @@ sal_uInt16 SwTxtFmtColl::ResetAllFmtAttr()
}
// <--
-// --> OD 2008-02-13 #newlistlevelattrs#
bool SwTxtFmtColl::AreListLevelIndentsApplicable() const
{
bool bAreListLevelIndentsApplicable( true );
@@ -501,7 +489,7 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const
}
pColl = dynamic_cast<const SwTxtFmtColl*>(pColl->DerivedFrom());
- ASSERT( pColl,
+ OSL_ENSURE( pColl,
"<SwTxtFmtColl::AreListLevelIndentsApplicable()> - something wrong in paragraph style hierarchy. The applied list style is not found." );
}
}
@@ -661,7 +649,7 @@ void SwConditionTxtFmtColl::SetConditions( const SwFmtCollConditions& rCndClls )
//#outline level, zhaojianwei
void SwTxtFmtColl::SetAttrOutlineLevel( int nLevel)
{
- ASSERT( 0 <= nLevel && nLevel <= MAXLEVEL ,"SwTxtFmtColl: Level Out Of Range" );
+ OSL_ENSURE( 0 <= nLevel && nLevel <= MAXLEVEL ,"SwTxtFmtColl: Level Out Of Range" );
SetFmtAttr( SfxUInt16Item( RES_PARATR_OUTLINELEVEL,
static_cast<sal_uInt16>(nLevel) ) );
}
@@ -673,7 +661,7 @@ int SwTxtFmtColl::GetAttrOutlineLevel() const
int SwTxtFmtColl::GetAssignedOutlineStyleLevel() const
{
- ASSERT( IsAssignedToListLevelOfOutlineStyle(),
+ OSL_ENSURE( IsAssignedToListLevelOfOutlineStyle(),
"<SwTxtFmtColl::GetAssignedOutlineStyleLevel()> - misuse of method");
return GetAttrOutlineLevel() - 1;
}
@@ -683,7 +671,7 @@ void SwTxtFmtColl::AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
mbAssignedToOutlineStyle = true;
SetAttrOutlineLevel(nAssignedListLevel+1);
- // --> OD 2009-03-18 #i100277#
+ // #i100277#
SwClientIter aIter( *this );
SwTxtFmtColl* pDerivedTxtFmtColl =
dynamic_cast<SwTxtFmtColl*>(aIter.First( TYPE( SwTxtFmtColl ) ));
@@ -715,3 +703,5 @@ void SwTxtFmtColl::DeleteAssignmentToListLevelOfOutlineStyle()
//<-end,zhaojianwei
//FEATURE::CONDCOLL
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx
index 7395e7ae7449..e0e257505ba7 100644
--- a/sw/source/core/doc/ftnidx.cxx
+++ b/sw/source/core/doc/ftnidx.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -396,3 +397,4 @@ sal_uInt16 SwUpdFtnEndNtAtEnd::ChkNumber( const SwTxtFtn& rTxtFtn )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx
index 607bb4f79c2e..eb1864073088 100644
--- a/sw/source/core/doc/gctable.cxx
+++ b/sw/source/core/doc/gctable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -396,7 +397,7 @@ sal_Bool lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
SwTableLines& rLns = *pGCPara->pLns;
const SwTableLine* pTmp = pLn;
sal_uInt16 nInsPos = rLns.GetPos( pTmp );
- ASSERT( USHRT_MAX != nInsPos, "Line nicht gefunden!" );
+ OSL_ENSURE( USHRT_MAX != nInsPos, "Line nicht gefunden!" );
SwTableBox* pUpper = pLn->GetUpper();
@@ -449,3 +450,4 @@ void SwTable::GCLines()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 9cef646cffce..8252e86feb2b 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,17 +30,8 @@
#include "precompiled_sw.hxx"
#include "hintids.hxx"
-//#define TEST_DELAYED_RESIZE
-
-#ifdef TEST_DELAYED_RESIZE
-#include <vcl/sound.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
#include <sot/storage.hxx>
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
@@ -65,8 +57,6 @@ using namespace ::com::sun::star;
#define MAX_TABWIDTH (USHRT_MAX - 2001)
-/* */
-
class SwHTMLTableLayoutConstraints
{
sal_uInt16 nRow; // Start-Zeile
@@ -95,7 +85,6 @@ public:
sal_uInt16 GetColumn() const { return nCol; }
};
-/* */
SwHTMLTableLayoutCnts::SwHTMLTableLayoutCnts( const SwStartNode *pSttNd,
SwHTMLTableLayout* pTab,
@@ -117,8 +106,6 @@ const SwStartNode *SwHTMLTableLayoutCnts::GetStartNode() const
}
-/* */
-
SwHTMLTableLayoutCell::SwHTMLTableLayoutCell( SwHTMLTableLayoutCnts *pCnts,
sal_uInt16 nRSpan, sal_uInt16 nCSpan,
sal_uInt16 nWidth, sal_Bool bPrcWidth,
@@ -137,7 +124,6 @@ SwHTMLTableLayoutCell::~SwHTMLTableLayoutCell()
}
}
-/* */
SwHTMLTableLayoutColumn::SwHTMLTableLayoutColumn( sal_uInt16 nWidth,
sal_Bool bRelWidth,
@@ -150,8 +136,6 @@ SwHTMLTableLayoutColumn::SwHTMLTableLayoutColumn( sal_uInt16 nWidth,
{}
-/* */
-
SwHTMLTableLayoutConstraints::SwHTMLTableLayoutConstraints(
sal_uLong nMin, sal_uLong nMax, sal_uInt16 nRw, sal_uInt16 nColumn, sal_uInt16 nColSp ):
nRow( nRw ), nCol( nColumn ), nColSpan( nColSp ),
@@ -193,7 +177,6 @@ SwHTMLTableLayoutConstraints *SwHTMLTableLayoutConstraints::InsertNext(
return pConstr;
}
-/* */
typedef SwHTMLTableLayoutColumn *SwHTMLTableLayoutColumnPtr;
typedef SwHTMLTableLayoutCell *SwHTMLTableLayoutCellPtr;
@@ -276,7 +259,7 @@ sal_uInt16 SwHTMLTableLayout::GetLeftCellSpace( sal_uInt16 nCol, sal_uInt16 nCol
else if( nCol+nColSpan == nCols && nRightBorderWidth &&
nSpace < MIN_BORDER_DIST )
{
- ASSERT( !nCellPadding, "GetLeftCellSpace: CELLPADDING!=0" );
+ OSL_ENSURE( !nCellPadding, "GetLeftCellSpace: CELLPADDING!=0" );
// Wenn die Gegenueberliegende Seite umrandet ist muessen
// wir zumindest den minimalen Abstand zum Inhalt
// beruecksichtigen. (Koennte man zusaetzlich auch an
@@ -302,7 +285,7 @@ sal_uInt16 SwHTMLTableLayout::GetRightCellSpace( sal_uInt16 nCol, sal_uInt16 nCo
else if( bSwBorders && GetColumn(nCol)->HasLeftBorder() &&
nSpace < MIN_BORDER_DIST )
{
- ASSERT( !nCellPadding, "GetRightCellSpace: CELLPADDING!=0" );
+ OSL_ENSURE( !nCellPadding, "GetRightCellSpace: CELLPADDING!=0" );
// Wenn die Gegenueberliegende Seite umrandet ist muessen
// wir zumindest den minimalen Abstand zum Inhalt
// beruecksichtigen. (Koennte man zusaetzlich auch an
@@ -377,7 +360,7 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc )
return (sal_uInt16)pPageFrm->Prt().Width();
}
- // --> OD 2010-05-12 #i91658#
+ // #i91658#
// Assertion removed which state that no browse width is available.
// Investigation reveals that all calls can handle the case that no browse
// width is provided.
@@ -441,9 +424,9 @@ const SwStartNode *SwHTMLTableLayout::GetAnyBoxStartNode() const
const SwTableBox* pBox = pSwTable->GetTabLines()[0]->GetTabBoxes()[0];
while( 0 == (pBoxSttNd = pBox->GetSttNd()) )
{
- ASSERT( pBox->GetTabLines().Count() > 0,
+ OSL_ENSURE( pBox->GetTabLines().Count() > 0,
"Box ohne Start-Node und Lines" );
- ASSERT( pBox->GetTabLines()[0]->GetTabBoxes().Count() > 0,
+ OSL_ENSURE( pBox->GetTabLines()[0]->GetTabBoxes().Count() > 0,
"Line ohne Boxen" );
pBox = pBox->GetTabLines()[0]->GetTabBoxes()[0];
}
@@ -454,22 +437,19 @@ const SwStartNode *SwHTMLTableLayout::GetAnyBoxStartNode() const
SwFrmFmt *SwHTMLTableLayout::FindFlyFrmFmt() const
{
const SwTableNode *pTblNd = GetAnyBoxStartNode()->FindTableNode();
- ASSERT( pTblNd, "Kein Table-Node?" );
+ OSL_ENSURE( pTblNd, "Kein Table-Node?" );
return pTblNd->GetFlyFmt();
}
static void lcl_GetMinMaxSize( sal_uLong& rMinNoAlignCnts, sal_uLong& rMaxNoAlignCnts,
sal_uLong& rAbsMinNoAlignCnts,
-#ifdef FIX41370
- sal_Bool& rHR,
-#endif
SwTxtNode *pTxtNd, sal_uLong nIdx, sal_Bool bNoBreak )
{
pTxtNd->GetMinMaxSize( nIdx, rMinNoAlignCnts, rMaxNoAlignCnts,
rAbsMinNoAlignCnts );
- ASSERT( rAbsMinNoAlignCnts <= rMinNoAlignCnts,
+ OSL_ENSURE( rAbsMinNoAlignCnts <= rMinNoAlignCnts,
"GetMinMaxSize: absmin > min" );
- ASSERT( rMinNoAlignCnts <= rMaxNoAlignCnts,
+ OSL_ENSURE( rMinNoAlignCnts <= rMaxNoAlignCnts,
"GetMinMaxSize: max > min" );
//Bei einen <PRE>-Absatz entspricht die maximale Breite der
@@ -488,14 +468,6 @@ static void lcl_GetMinMaxSize( sal_uLong& rMinNoAlignCnts, sal_uLong& rMaxNoAlig
rMinNoAlignCnts = rMaxNoAlignCnts;
rAbsMinNoAlignCnts = rMaxNoAlignCnts;
}
-#ifdef FIX41370
- else if( pColl && RES_POOLCOLL_HTML_HR==pColl->GetPoolFmtId() )
- {
- rHR |= !pTxtNd->HasSwAttrSet() ||
- SFX_ITEM_SET != pTxtNd->GetpSwAttrSet()
- ->GetItemState( RES_LR_SPACE, sal_False );
- }
-#endif
}
void SwHTMLTableLayout::AutoLayoutPass1()
@@ -523,7 +495,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
SwHTMLTableLayoutCell *pCell = GetCell(j,i);
SwHTMLTableLayoutCnts *pCnts = pCell->GetContents();
- // fix #31488#: Zum Ermitteln der naechsten zu berechnenden
+ // Zum Ermitteln der naechsten zu berechnenden
// Spalte muessen alle Zeilen herangezogen werden
sal_uInt16 nColSpan = pCell->GetColSpan();
if( nColSpan < nColSkip )
@@ -541,9 +513,6 @@ void SwHTMLTableLayout::AutoLayoutPass1()
sal_uLong nAbsMinNoAlignCell = 0;
sal_uLong nMaxTableCell = 0;
sal_uLong nAbsMinTableCell = 0;
-#ifdef FIX41370
- sal_Bool bHR = sal_False;
-#endif
while( pCnts )
{
@@ -564,9 +533,6 @@ void SwHTMLTableLayout::AutoLayoutPass1()
lcl_GetMinMaxSize( nMinNoAlignCnts,
nMaxNoAlignCnts,
nAbsMinNoAlignCnts,
-#ifdef FIX41370
- bHR,
-#endif
pTxtNd, nIdx,
pCnts->HasNoBreakTag() );
@@ -618,7 +584,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
}
else
{
- ASSERT( !this, "Sub tables in HTML import?" )
+ OSL_ENSURE( !this, "Sub tables in HTML import?" );
SwHTMLTableLayout *pChild = pCnts->GetTable();
pChild->AutoLayoutPass1();
sal_uLong nMaxTableCnts = pChild->nMax;
@@ -687,24 +653,6 @@ void SwHTMLTableLayout::AutoLayoutPass1()
nAbsMinNoAlignCell = nWidth;
}
}
-#ifdef FIX41370
- else if( bHR && nWidth>0 && !bRelWidth )
- {
- // Ein kleiner Hack, um einen Bug in Netscape 4.0
- // nachzubilden (siehe #41370#). Wenn eine Zelle eine
- // fixe Breite besitzt und gleichzeitig ein HR, wird
- // sie nie schmaler als die angegebene Breite.
- // (Genaugenomen scheint die Zelle nie schmaler zu werden
- // als die HR-Linie, denn wenn man fuer die Linie eine
- // Breite angibt, die breiter ist als die der Zelle, dann
- // wird die Zelle so breit wie die Linie. Das bekommen wir
- // natuerlich nicht hin.)
- if( nWidth>nMinNoAlignCell )
- nMinNoAlignCell = nWidth;
- if( nWidth>nAbsMinNoAlignCell )
- nAbsMinNoAlignCell = nWidth;
- }
-#endif
// Mindestbreite fuer Inhalt einhalten
if( nMinNoAlignCell < MINLAY )
@@ -773,9 +721,9 @@ void SwHTMLTableLayout::AutoLayoutPass1()
}
}
- ASSERT( nMinColSpan>0 && nColSkip>0 && nColSkip <= nMinColSpan,
+ OSL_ENSURE( nMinColSpan>0 && nColSkip>0 && nColSkip <= nMinColSpan,
"Layout Pass 1: Da werden Spalten vergessen!" );
- ASSERT( nMinColSpan!=USHRT_MAX,
+ OSL_ENSURE( nMinColSpan!=USHRT_MAX,
"Layout Pass 1: unnoetiger Schleifendurchlauf oder Bug" );
if( 1==nMinColSpan )
@@ -893,7 +841,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
: nDiff;
nColMin += nAdd;
nMin += nColMin;
- ASSERT( nDiff >= nAdd, "Ooops: nDiff stimmt nicht mehr" );
+ OSL_ENSURE( nDiff >= nAdd, "Ooops: nDiff stimmt nicht mehr" );
nDiff -= nAdd;
if( nColMax < nColMin )
@@ -921,8 +869,8 @@ void SwHTMLTableLayout::AutoLayoutPass1()
pColumn->AddToMin( nDiff );
- ASSERT( pColumn->GetMax() >= pColumn->GetMin(),
- "Wieso ist die SPalte auf einmal zu schmal?" )
+ OSL_ENSURE( pColumn->GetMax() >= pColumn->GetMin(),
+ "Wieso ist die SPalte auf einmal zu schmal?" );
nMin += nDiff;
nMinD -= nDiff;
@@ -994,7 +942,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
}
}
}
- ASSERT( 0==nRel || nQuot!=ULONG_MAX,
+ OSL_ENSURE( 0==nRel || nQuot!=ULONG_MAX,
"Wo sind die relativen Spalten geblieben?" );
for( i=0; i<nCols; i++ )
{
@@ -1005,7 +953,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
pColumn->SetMax( pColumn->GetMax() / nQuot );
else
pColumn->SetMax( pColumn->GetMin() );
- ASSERT( pColumn->GetMax() >= pColumn->GetMin(),
+ OSL_ENSURE( pColumn->GetMax() >= pColumn->GetMin(),
"Maximale Spaltenbreite kleiner als Minimale" );
nMax += pColumn->GetMax();
}
@@ -1018,7 +966,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
sal_uLong nRelMax = 0; // Anteil am Maximum dieser Spalten
for( i=0; i<nCols; i++ )
{
- ASSERT( nRel<=100, "relative Breite aller Spalten>100%" );
+ OSL_ENSURE( nRel<=100, "relative Breite aller Spalten>100%" );
SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
if( pColumn->IsRelWidthOption() && pColumn->GetWidthOption() )
{
@@ -1105,7 +1053,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
pColumn->SetMax( pColumn->GetMin() );
}
// und durch den Quotienten teilen
- ASSERT( nQuotMax!=ULONG_MAX, "Wo sind die relativen Spalten geblieben?" );
+ OSL_ENSURE( nQuotMax!=ULONG_MAX, "Wo sind die relativen Spalten geblieben?" );
for( i=0; i<nCols; i++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
@@ -1114,7 +1062,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
if( pColumn->GetWidthOption() )
{
pColumn->SetMax( pColumn->GetMax() / nQuotMax );
- ASSERT( pColumn->GetMax() >= pColumn->GetMin(),
+ OSL_ENSURE( pColumn->GetMax() >= pColumn->GetMin(),
"Minimalbreite ein Spalte Groesser Maximum" );
if( pColumn->GetMax() < pColumn->GetMin() )
pColumn->SetMax( pColumn->GetMin() );
@@ -1141,16 +1089,16 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
// Eine abolute zur Verfuegung stehende Breite muss immer uebergeben
// werden.
- ASSERT( nAbsAvail, "AutoLayout Pass 2: Keine absolute Breite gegeben" );
+ OSL_ENSURE( nAbsAvail, "AutoLayout Pass 2: Keine absolute Breite gegeben" );
// Eine realtive zur Verfuegung stehende Breite darf nur und muss fuer
// Tabellen in Tabellen uebergeben
- ASSERT( IsTopTable() == (nRelAvail==0),
+ OSL_ENSURE( IsTopTable() == (nRelAvail==0),
"AutoLayout Pass 2: Rel. Breite bei Tab in Tab oder umgekehrt" );
// Die Minimalbreite der Tabelle darf natuerlich nie groesser sein
// als das die Maximalbreite.
- ASSERT( nMin<=nMax, "AutoLayout Pass2: nMin > nMax" );
+ OSL_ENSURE( nMin<=nMax, "AutoLayout Pass2: nMin > nMax" );
// Die verfuegbare Breite, fuer die die Tabelle berechnet wurde, merken.
// (Dies ist ein guter Ort, denn hier kommer wir bei der Erstberechnung
@@ -1219,7 +1167,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
{
if( bPrcWidthOption )
{
- ASSERT( nWidthOption<=100, "Prozentangabe zu gross" );
+ OSL_ENSURE( nWidthOption<=100, "Prozentangabe zu gross" );
if( nWidthOption > 100 )
nWidthOption = 100;
@@ -1233,7 +1181,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
// Weil bei Tabellen in Rahmen kein Resize aufgerufen wird,
// wenn der Rahmen eine nicht-relative Breite besitzt, koennen
// wir da solche Spielchen nicht spielen
- // MIB 19.2.98: Wegen fix #47394# spielen wir solche Spielchen
+ // Spielen wir solche Spielchen
// jetzt doch. Dort war eine Grafik in einer 1%-breiten
// Tabelle und hat da natuerlich nicht hineingepasst.
nAbsTabWidth = (sal_uInt16)( ((sal_uLong)nAbsAvail * nWidthOption) / 100 );
@@ -1257,9 +1205,9 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
}
}
- ASSERT( IsTopTable() || nAbsTabWidth<=nAbsAvail,
+ OSL_ENSURE( IsTopTable() || nAbsTabWidth<=nAbsAvail,
"AutoLayout Pass2: nAbsTabWidth > nAbsAvail fuer Tab in Tab" );
- ASSERT( !nRelAvail || nAbsTabWidth<=nAbsAvail,
+ OSL_ENSURE( !nRelAvail || nAbsTabWidth<=nAbsAvail,
"AutoLayout Pass2: nAbsTabWidth > nAbsAvail fuer relative Breite" );
// Catch fuer die beiden Asserts von oben (man weiss ja nie!)
@@ -1383,7 +1331,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
// Eine Top-Table darf auch beriter werden als der verfuegbare Platz.
if( nAbsTabWidth > nAbsAvail )
{
- ASSERT( IsTopTable(),
+ OSL_ENSURE( IsTopTable(),
"Tabelle in Tabelle soll breiter werden als umgebende Zelle" );
nAbsAvail = nAbsTabWidth;
}
@@ -1413,7 +1361,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
// die ihre Maximalbreite genau einhalten, also weder
// schmaler noch breiter werden. Beim zurueckrechnen der
// absoluten Breite aus der relativen Breite kann es
- // zu Rundungsfehlern kommen (bug #45598#). Um die auszugeleichen
+ // zu Rundungsfehlern kommen. Um die auszugeleichen
// werden zuerst die fixen Breiten entsprechend korrigiert
// eingestellt und erst danach die relativen.
@@ -1450,7 +1398,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
// absoluten Breiten. nFixMax entspricht an dieser Stelle
// nAbs, so dass man gleich nFixMax haette nehmen koennen.
// Der Code ist so aber verstaendlicher.
- ASSERT( nFixMax == nAbs, "Zwei Schleifen, zwei Summen?" )
+ OSL_ENSURE( nFixMax == nAbs, "Zwei Schleifen, zwei Summen?" );
sal_uLong nDistMax = nMax - nFixMax;
sal_uInt16 nDistAbsTabWidth = nAbsTabWidth - nAbs;
sal_uInt16 nDistRelTabWidth = nRelTabWidth - nRel;
@@ -1479,7 +1427,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
nRel = nRel + pColumn->GetRelColWidth();
}
}
- ASSERT( nCols==nFixedCols, "Spalte vergessen!" );
+ OSL_ENSURE( nCols==nFixedCols, "Spalte vergessen!" );
}
else
{
@@ -1506,7 +1454,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
if( nAbsTabWidth > nAbsAvail )
{
- ASSERT( IsTopTable(),
+ OSL_ENSURE( IsTopTable(),
"Tabelle in Tabelle soll breiter werden als Platz da ist" );
nAbsAvail = nAbsTabWidth;
}
@@ -1578,9 +1526,9 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
break;
}
- ASSERT( !pLeftFillerBox || nRelLeftFill>0,
+ OSL_ENSURE( !pLeftFillerBox || nRelLeftFill>0,
"Fuer linke Filler-Box ist keine Breite da!" );
- ASSERT( !pRightFillerBox || nRelRightFill>0,
+ OSL_ENSURE( !pRightFillerBox || nRelRightFill>0,
"Fuer rechte Filler-Box ist keine Breite da!" );
// Filler-Breiten werden auf die ausseren Spalten geschlagen, wenn
@@ -1591,7 +1539,6 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
if( nRelLeftFill && !pLeftFillerBox &&
( nWidthSet>0 || nAbsLeftFill<MINLAY+nInhLeftBorderWidth ||
(HasColTags() && nAbsLeftFill < nAbsLeftSpace+nParentInhAbsLeftSpace+20) ) )
-// (nAbsLeftFill<MINLAY || nAbsLeftFill<=nAbsLeftSpace) )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( 0 );
pColumn->SetAbsColWidth( pColumn->GetAbsColWidth()+nAbsLeftFill );
@@ -1602,7 +1549,6 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
if( nRelRightFill && !pRightFillerBox &&
( nWidthSet>0 || nAbsRightFill<MINLAY+nInhRightBorderWidth ||
(HasColTags() && nAbsRightFill < nAbsRightSpace+nParentInhAbsRightSpace+20) ) )
-// (nAbsRightFill<MINLAY || nAbsRightFill<=nAbsRightSpace) )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( nCols-1 );
pColumn->SetAbsColWidth( pColumn->GetAbsColWidth()+nAbsRightFill );
@@ -1637,14 +1583,14 @@ static sal_Bool lcl_ResizeBox( const SwTableBox*& rpBox, void* pPara )
static sal_Bool lcl_ResizeLine( const SwTableLine*& rpLine, void* pPara )
{
sal_uInt16 *pWidth = (sal_uInt16 *)pPara;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uInt16 nOldWidth = *pWidth;
#endif
*pWidth = 0;
((SwTableLine *)rpLine)->GetTabBoxes().ForEach( &lcl_ResizeBox, pWidth );
-#ifdef DBG_UTIL
- ASSERT( !nOldWidth || Abs(*pWidth-nOldWidth) < COLFUZZY,
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( !nOldWidth || Abs(*pWidth-nOldWidth) < COLFUZZY,
"Zeilen einer Box sind unterschiedlich lang" );
#endif
@@ -1718,7 +1664,7 @@ void SwHTMLTableLayout::SetWidths( sal_Bool bCallPass2, sal_uInt16 nAbsAvail,
sal_uInt16 nCalcTabWidth = 0;
((SwTable *)pSwTable)->GetTabLines().ForEach( &lcl_ResizeLine,
&nCalcTabWidth );
- ASSERT( Abs( nRelTabWidth-nCalcTabWidth ) < COLFUZZY,
+ OSL_ENSURE( Abs( nRelTabWidth-nCalcTabWidth ) < COLFUZZY,
"Tabellebreite stimmt nicht mit Zeilenbreite ueberein." );
// Beim Anpassen des Tabellen-Formats dieses locken, weil sonst
@@ -1754,7 +1700,7 @@ void SwHTMLTableLayout::SetWidths( sal_Bool bCallPass2, sal_uInt16 nAbsAvail,
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
{
// steht im tblrwcl.cxx
extern void _CheckBoxWidth( const SwTableLine&, SwTwips );
@@ -1805,9 +1751,6 @@ void SwHTMLTableLayout::_Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc )
IMPL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void*, EMPTYARG )
{
-#ifdef TEST_DELAYED_RESIZE
- Sound::Beep( SOUND_WARNING );
-#endif
pThis->aResizeTimer.Stop();
pThis->_Resize( pThis->nDelayedResizeAbsAvail,
pThis->bDelayedResizeRecalc );
@@ -1821,7 +1764,7 @@ sal_Bool SwHTMLTableLayout::Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc,
{
if( 0 == nAbsAvail )
return sal_False;
- ASSERT( IsTopTable(), "Resize darf nur an Top-Tabellen aufgerufen werden" );
+ OSL_ENSURE( IsTopTable(), "Resize darf nur an Top-Tabellen aufgerufen werden" );
// Darf die Tabelle uberhaupt Resized werden oder soll sie es trotzdem?
if( bMustNotResize && !bForce )
@@ -1881,9 +1824,6 @@ sal_Bool SwHTMLTableLayout::Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc,
bDelayedResizeRecalc = bRecalc;
aResizeTimer.SetTimeout( nDelay );
aResizeTimer.Start();
-#ifdef TEST_DELAYED_RESIZE
- Sound::Beep( SOUND_DEFAULT );
-#endif
}
else
{
@@ -1901,3 +1841,4 @@ void SwHTMLTableLayout::BordersChanged( sal_uInt16 nAbsAvail, sal_Bool bRecalc )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/lineinfo.cxx b/sw/source/core/doc/lineinfo.cxx
index 7490cf9f0719..8addb27cf01e 100644
--- a/sw/source/core/doc/lineinfo.cxx
+++ b/sw/source/core/doc/lineinfo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "doc.hxx"
#include "lineinfo.hxx"
#include "charfmt.hxx"
@@ -135,7 +134,7 @@ SwCharFmt* SwLineNumberInfo::GetCharFmt( IDocumentStylePoolAccess& rIDSPA ) cons
void SwLineNumberInfo::SetCharFmt( SwCharFmt *pChFmt )
{
- ASSERT( pChFmt, "SetCharFmt, 0 is not a valid pointer" );
+ OSL_ENSURE( pChFmt, "SetCharFmt, 0 is not a valid pointer" );
pChFmt->Add( this );
}
@@ -152,3 +151,4 @@ void SwLineNumberInfo::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx
index 81f139bba99e..3fc2ee0500dd 100644
--- a/sw/source/core/doc/list.cxx
+++ b/sw/source/core/doc/list.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -289,15 +290,4 @@ bool SwList::IsListLevelMarked( const int nListLevel ) const
return mpListImpl->IsListLevelMarked( nListLevel );
}
-//void SwList::ContinueList( SwList& rList )
-//{
-// mpListImpl->ContinueList( rList );
-//}
-//const SwList* SwList::GetContinuedList() const
-//{
-// return mpListImpl->GetContinuedList();
-//}
-//void SwList::ClearContinuation()
-//{
-// mpListImpl->ClearContinuation();
-//}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 8721d5d21164..15aaccd7c9a1 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,9 +79,7 @@
#include <svtools/embedhlp.hxx>
#include <svtools/chartprettypainter.hxx>
-// --> OD 2009-03-05 #i99665#
-#include <dview.hxx>
-// <--
+#include <dview.hxx> // #i99665#
using namespace com::sun::star;
@@ -153,10 +152,6 @@ void lcl_PaintReplacement( const SwRect &rRect, const String &rText,
|*
|* SwGrfFrm::SwGrfFrm(ViewShell * const,SwGrfNode *)
|*
-|* Beschreibung
-|* Ersterstellung JP 05.03.91
-|* Letzte Aenderung MA 03. Mar. 93
-|*
*************************************************************************/
@@ -183,10 +178,6 @@ void SwNoTxtFrm::InitCtor()
|*
|* SwNoTxtNode::MakeFrm()
|*
-|* Beschreibung
-|* Ersterstellung JP 05.03.91
-|* Letzte Aenderung MA 03. Mar. 93
-|*
*************************************************************************/
@@ -199,10 +190,6 @@ SwCntntFrm *SwNoTxtNode::MakeFrm()
|*
|* SwNoTxtFrm::~SwNoTxtFrm()
|*
-|* Beschreibung
-|* Ersterstellung JP 05.03.91
-|* Letzte Aenderung MA 30. Apr. 96
-|*
*************************************************************************/
SwNoTxtFrm::~SwNoTxtFrm()
@@ -214,10 +201,6 @@ SwNoTxtFrm::~SwNoTxtFrm()
|*
|* void SwNoTxtFrm::Modify( SwHint * pOld, SwHint * pNew )
|*
-|* Beschreibung
-|* Ersterstellung JP 05.03.91
-|* Letzte Aenderung JP 05.03.91
-|*
*************************************************************************/
void SetOutDev( ViewShell *pSh, OutputDevice *pOut )
@@ -243,7 +226,6 @@ void lcl_ClearArea( const SwFrm &rFrm,
::DrawGraphic( pItem, &rOut, aOrigRect, aRegion[i] );
else
{
- // OD 2004-04-23 #116347#
rOut.Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
rOut.SetFillColor( rFrm.GetShell()->Imp()->GetRetoucheColor());
rOut.SetLineColor();
@@ -258,10 +240,6 @@ void lcl_ClearArea( const SwFrm &rFrm,
|*
|* void SwNoTxtFrm::Paint()
|*
-|* Beschreibung
-|* Ersterstellung JP 05.03.91
-|* Letzte Aenderung MA 10. Jan. 97
-|*
*************************************************************************/
void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
@@ -273,7 +251,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
if( !pSh->GetViewOptions()->IsGraphic() )
{
StopAnimation();
- // OD 10.01.2003 #i6467# - no paint of placeholder for page preview
+ // #i6467# - no paint of placeholder for page preview
if ( pSh->GetWin() && !pSh->IsPreView() )
{
const SwNoTxtNode* pNd = GetNode()->GetNoTxtNode();
@@ -305,7 +283,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
if( pGrfNd )
pGrfNd->SetFrameInPaint( sal_True );
- // OD 16.04.2003 #i13147# - add 2nd parameter with value <sal_True> to
+ // #i13147# - add 2nd parameter with value <sal_True> to
// method call <FindFlyFrm().GetContour(..)> to indicate that it is called
// for paint in order to avoid load of the intrinsic graphic.
if ( ( !pOut->GetConnectMetaFile() ||
@@ -342,7 +320,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
if ( bClip )
pOut->IntersectClipRegion( aPaintArea.SVRect() );
- /// OD 25.09.2002 #99739# - delete unused 3rd parameter
+ /// delete unused 3rd parameter
PaintPicture( pOut, aGrfArea );
}
else
@@ -366,8 +344,6 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
|* Parameter Point& die Position im Frame ( auch Return-Wert )
|* Size& die Groesse der Grafik ( auch Return-Wert )
|* MirrorGrf akt. Spiegelungs-Attribut
-|* Ersterstellung JP 04.03.91
-|* Letzte Aenderung JP 31.08.94
|*
*************************************************************************/
@@ -394,17 +370,13 @@ void lcl_CalcRect( Point& rPt, Size& rDim, sal_uInt16 nMirror )
|* Beschreibung Errechne die Position und die Groesse der Bitmap
|* innerhalb des uebergebenem Rechtecks.
|*
-|* Ersterstellung JP 03.09.91
-|* Letzte Aenderung MA 11. Oct. 94
-|*
*************************************************************************/
void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
sal_Bool ) const
{
- // JP 23.01.2001: currently only used for scaling, cropping and mirroring
- // the contour of graphics!
- // all other is handled by the GraphicObject
+ //currently only used for scaling, cropping and mirroring the contour of graphics!
+ //all other is handled by the GraphicObject
//In rRect wird das sichbare Rechteck der Grafik gesteckt.
//In pOrigRect werden Pos+Size der Gesamtgrafik gesteck.
@@ -522,8 +494,6 @@ void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
|*
|* Beschreibung Gebe die Groesse des umgebenen FLys und
|* damit die der Grafik zurueck.
-|* Ersterstellung JP 04.03.91
-|* Letzte Aenderung JP 31.08.94
|*
*************************************************************************/
@@ -541,9 +511,6 @@ const Size& SwNoTxtFrm::GetSize() const
|*
|* SwNoTxtFrm::MakeAll()
|*
-|* Ersterstellung MA 29. Nov. 96
-|* Letzte Aenderung MA 29. Nov. 96
-|*
*************************************************************************/
@@ -574,8 +541,6 @@ void SwNoTxtFrm::MakeAll()
|* SwNoTxtFrm::Format()
|*
|* Beschreibung Errechne die Groesse der Bitmap, wenn noetig
-|* Ersterstellung JP 11.03.91
-|* Letzte Aenderung MA 13. Mar. 96
|*
*************************************************************************/
@@ -598,10 +563,6 @@ void SwNoTxtFrm::Format( const SwBorderAttrs * )
|*
|* SwNoTxtFrm::GetCharRect()
|*
-|* Beschreibung
-|* Ersterstellung SS 29-Apr-1991
-|* Letzte Aenderung MA 10. Oct. 94
-|*
|*************************************************************************/
@@ -665,7 +626,7 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
sal_uInt16 nWhich = pNew ? pNew->Which() : pOld ? pOld->Which() : 0;
- // --> OD 2007-03-06 #i73788#
+ // #i73788#
// no <SwCntntFrm::Modify(..)> for RES_LINKED_GRAPHIC_STREAM_ARRIVED
if ( RES_GRAPHIC_PIECE_ARRIVED != nWhich &&
RES_GRAPHIC_ARRIVED != nWhich &&
@@ -737,10 +698,8 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
case RES_GRAPHIC_PIECE_ARRIVED:
case RES_GRAPHIC_ARRIVED:
- // --> OD 2007-03-06 #i73788#
- // handle RES_LINKED_GRAPHIC_STREAM_ARRIVED as RES_GRAPHIC_ARRIVED
+ // i73788# - handle RES_LINKED_GRAPHIC_STREAM_ARRIVED as RES_GRAPHIC_ARRIVED
case RES_LINKED_GRAPHIC_STREAM_ARRIVED:
- // <--
if ( GetNode()->GetNodeType() == ND_GRFNODE )
{
bComplete = sal_False;
@@ -766,7 +725,7 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
else if ( pSh->VisArea().IsOver( aRect ) &&
OUTDEV_WINDOW == pSh->GetOut()->GetOutDevType() )
{
- // OD 27.11.2002 #105519# - invalidate instead of painting
+ //invalidate instead of painting
pSh->GetWin()->Invalidate( aRect.SVRect() );
}
@@ -819,9 +778,9 @@ void lcl_correctlyAlignRect( SwRect& rAlignedGrfArea, const SwRect& rInArea, Out
// Ausgabe der Grafik. Hier wird entweder eine QuickDraw-Bmp oder
// eine Grafik vorausgesetzt. Ist nichts davon vorhanden, wird
// eine Ersatzdarstellung ausgegeben.
-/// OD 25.09.2002 #99739# - delete unused 3rd parameter.
-/// OD 25.09.2002 #99739# - use aligned rectangle for drawing graphic.
-/// OD 25.09.2002 #99739# - pixel-align coordinations for drawing graphic.
+/// delete unused 3rd parameter.
+/// use aligned rectangle for drawing graphic.
+/// pixel-align coordinations for drawing graphic.
void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) const
{
ViewShell* pShell = GetShell();
@@ -835,7 +794,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
const bool bIsChart = pOLENd && ChartPrettyPainter::IsChart( pOLENd->GetOLEObj().GetObject() );
- /// OD 25.09.2002 #99739# - calculate aligned rectangle from parameter <rGrfArea>.
+ /// calculate aligned rectangle from parameter <rGrfArea>.
/// Use aligned rectangle <aAlignedGrfArea> instead of <rGrfArea> in
/// the following code.
SwRect aAlignedGrfArea = rGrfArea;
@@ -843,7 +802,6 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
if( !bIsChart )
{
- /// OD 25.09.2002 #99739#
/// Because for drawing a graphic left-top-corner and size coordinations are
/// used, these coordinations have to be determined on pixel level.
::SwAlignGrfRect( &aAlignedGrfArea, *pOut );
@@ -868,14 +826,13 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
if( !bPrn )
{
- // --> OD 2007-01-02 #i73788#
+ // #i73788#
if ( pGrfNd->IsLinkedInputStreamReady() )
{
pGrfNd->UpdateLinkWithInputStream();
}
// <--
- // --> OD 2008-01-30 #i85717#
- // --> OD 2008-07-21 #i90395# - check, if asynchronous retrieval
+ // #i85717#, #i90395# - check, if asynchronous retrieval
// if input stream for the graphic is possible
// else if( GRAPHIC_DEFAULT == rGrfObj.GetType() &&
else if ( ( rGrfObj.GetType() == GRAPHIC_DEFAULT ||
@@ -891,9 +848,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
!(aTmpSz = pGrfNd->GetTwipSize()).Width() ||
!aTmpSz.Height() || !pGrfNd->GetAutoFmtLvl() )
{
- // --> OD 2006-12-22 #i73788#
- pGrfNd->TriggerAsyncRetrieveInputStream();
- // <--
+ pGrfNd->TriggerAsyncRetrieveInputStream(); // #i73788#
}
String aTxt( pGrfNd->GetTitle() );
if ( !aTxt.Len() )
@@ -936,7 +891,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
else
pVout = 0;
- ASSERT( OUTDEV_VIRDEV != pOut->GetOutDevType() ||
+ OSL_ENSURE( OUTDEV_VIRDEV != pOut->GetOutDevType() ||
pShell->GetViewOptions()->IsPDFExport(),
"pOut sollte kein virtuelles Device sein" );
@@ -991,7 +946,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
}
else if( pOLENd )
{
- // --> OD 2009-03-05 #i99665#
+ // #i99665#
// Adjust AntiAliasing mode at output device for chart OLE
const sal_uInt16 nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
if ( pOLENd->IsChart() &&
@@ -1014,18 +969,10 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
pJobSetup = new JobSetup();
// #i42323#
- // The reason for #114233# is gone, so i remove it again
//TODO/LATER: is it a problem that the JopSetup isn't used?
//xRef->DoDraw( pOut, aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(), *pJobSetup );
- // get hi-contrast image, but never for printing
- Graphic* pGraphic = NULL;
- if (pOut && !bPrn && Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
- pGraphic = pOLENd->GetHCGraphic();
-
- // when it is not possible to get HC-representation, the original image should be used
- if ( !pGraphic )
- pGraphic = pOLENd->GetGraphic();
+ Graphic* pGraphic = pOLENd->GetGraphic();
if ( pGraphic && pGraphic->GetType() != GRAPHIC_NONE )
{
@@ -1049,11 +996,11 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
nMiscStatus & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
{
const SwFlyFrm *pFly = FindFlyFrm();
- ASSERT( pFly, "OLE not in FlyFrm" );
+ OSL_ENSURE( pFly, "OLE not in FlyFrm" );
((SwFEShell*)pShell)->ConnectObj( pOLENd->GetOLEObj().GetObject(), pFly->Prt(), pFly->Frm());
}
- // --> OD 2009-03-05 #i99665#
+ // #i99665#
if ( pOLENd->IsChart() &&
pShell->Imp()->GetDrawView()->IsAntiAliasing() )
{
@@ -1096,3 +1043,4 @@ sal_Bool SwNoTxtFrm::HasAnimation() const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 2333169f2222..1f6a31036de8 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,28 +45,23 @@
#include <frmfmt.hxx>
#include <ndtxt.hxx>
#include <docary.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <SwStyleNameMapper.hxx>
-// --> OD 2006-06-28 #b6440955#
+
// Needed to load default bullet list configuration
#include <unotools/configitem.hxx>
-// <--
+
#include <numrule.hxx>
#include <SwNodeNum.hxx>
-#include <hash_map>
-// --> OD 2008-02-19 #refactorlists#
+#include <boost/unordered_map.hpp>
+
#include <list.hxx>
#include <algorithm>
-// <--
-// --> OD 2008-06-06 #i89178#
+
#include <unotools/saveopt.hxx>
-// <--
-// --> OD 2008-07-08 #i91400#
+
#include <IDocumentListsAccess.hxx>
-// <--
using namespace ::com::sun::star;
@@ -73,14 +69,13 @@ using namespace ::com::sun::star;
sal_uInt16 SwNumRule::nRefCount = 0;
SwNumFmt* SwNumRule::aBaseFmts[ RULE_END ][ MAXLEVEL ] = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
-// --> OD 2008-02-11 #newlistlevelattrs#
+
SwNumFmt* SwNumRule::aLabelAlignmentBaseFmts[ RULE_END ][ MAXLEVEL ] = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
char sOutline[] = "Outline";
char* SwNumRule::pDefOutlineName = sOutline;
-// #i30312#
sal_uInt16 SwNumRule::aDefNumIndents[ MAXLEVEL ] = {
//inch: 0,5 1,0 1,5 2,0 2,5 3,0 3,5 4,0 4,5 5,0
1440/4, 1440/2, 1440*3/4, 1440, 1440*5/4, 1440*3/2, 1440*7/4, 1440*2,
@@ -89,21 +84,19 @@ sal_uInt16 SwNumRule::aDefNumIndents[ MAXLEVEL ] = {
const SwNumFmt& SwNumRule::Get( sal_uInt16 i ) const
{
- ASSERT_ID( i < MAXLEVEL && eRuleType < RULE_END, ERR_NUMLEVEL);
+ OSL_ASSERT( i < MAXLEVEL && eRuleType < RULE_END );
return aFmts[ i ]
? *aFmts[ i ]
- // --> OD 2008-02-11 #newlistlevelattrs#
: ( meDefaultNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION
? *aBaseFmts[ eRuleType ][ i ]
: *aLabelAlignmentBaseFmts[ eRuleType ][ i ] );
- // <--
}
const SwNumFmt* SwNumRule::GetNumFmt( sal_uInt16 i ) const
{
const SwNumFmt * pResult = NULL;
- ASSERT_ID( i < MAXLEVEL && eRuleType < RULE_END, ERR_NUMLEVEL);
+ OSL_ASSERT( i < MAXLEVEL && eRuleType < RULE_END );
if ( i < MAXLEVEL && eRuleType < RULE_END)
{
pResult = aFmts[ i ];
@@ -112,7 +105,7 @@ const SwNumFmt* SwNumRule::GetNumFmt( sal_uInt16 i ) const
return pResult;
}
-// --> OD 2008-07-08 #i91400#
+// #i91400#
void SwNumRule::SetName( const String & rName,
IDocumentListsAccess& rDocListAccess)
// <--
@@ -124,29 +117,29 @@ void SwNumRule::SetName( const String & rName,
pNumRuleMap->erase(sName);
(*pNumRuleMap)[rName] = this;
- // --> OD 2008-07-08 #i91400#
if ( GetDefaultListId().Len() > 0 )
{
rDocListAccess.trackChangeOfListStyleName( sName, rName );
}
- // <--
}
sName = rName;
}
}
-// --> OD 2008-02-19 #refactorlists#
+
void SwNumRule::GetTxtNodeList( SwNumRule::tTxtNodeList& rTxtNodeList ) const
{
rTxtNodeList = maTxtNodeList;
}
+
SwNumRule::tTxtNodeList::size_type SwNumRule::GetTxtNodeListSize() const
{
return maTxtNodeList.size();
}
+
void SwNumRule::AddTxtNode( SwTxtNode& rTxtNode )
{
tTxtNodeList::iterator aIter =
@@ -158,6 +151,7 @@ void SwNumRule::AddTxtNode( SwTxtNode& rTxtNode )
}
}
+
void SwNumRule::RemoveTxtNode( SwTxtNode& rTxtNode )
{
tTxtNodeList::iterator aIter =
@@ -168,9 +162,9 @@ void SwNumRule::RemoveTxtNode( SwTxtNode& rTxtNode )
maTxtNodeList.erase( aIter );
}
}
-// <--
-void SwNumRule::SetNumRuleMap(std::hash_map<String, SwNumRule *, StringHash> *
+
+void SwNumRule::SetNumRuleMap(boost::unordered_map<String, SwNumRule *, StringHash> *
_pNumRuleMap)
{
pNumRuleMap = _pNumRuleMap;
@@ -178,35 +172,29 @@ void SwNumRule::SetNumRuleMap(std::hash_map<String, SwNumRule *, StringHash> *
sal_uInt16 SwNumRule::GetNumIndent( sal_uInt8 nLvl )
{
- ASSERT( MAXLEVEL > nLvl, "NumLevel is out of range" );
+ OSL_ENSURE( MAXLEVEL > nLvl, "NumLevel is out of range" );
return aDefNumIndents[ nLvl ];
}
sal_uInt16 SwNumRule::GetBullIndent( sal_uInt8 nLvl )
{
- ASSERT( MAXLEVEL > nLvl, "NumLevel is out of range" );
+ OSL_ENSURE( MAXLEVEL > nLvl, "NumLevel is out of range" );
return aDefNumIndents[ nLvl ];
}
-
-
static void lcl_SetRuleChgd( SwTxtNode& rNd, sal_uInt8 nLevel )
{
if( rNd.GetActualListLevel() == nLevel )
rNd.NumRuleChgd();
}
-/* -----------------------------22.02.01 13:41--------------------------------
- ---------------------------------------------------------------------------*/
SwNumFmt::SwNumFmt() :
SvxNumberFormat(SVX_NUM_ARABIC),
SwClient( 0 ),
pVertOrient(new SwFmtVertOrient( 0, text::VertOrientation::NONE))
{
}
-/* -----------------------------22.02.01 13:42--------------------------------
- ---------------------------------------------------------------------------*/
SwNumFmt::SwNumFmt( const SwNumFmt& rFmt) :
SvxNumberFormat(rFmt),
SwClient( rFmt.pRegisteredIn ),
@@ -216,9 +204,7 @@ SwNumFmt::SwNumFmt( const SwNumFmt& rFmt) :
SetGraphicBrush( rFmt.GetBrush(), &rFmt.GetGraphicSize(),
&eMyVertOrient);
}
-/* -----------------------------22.02.01 13:58--------------------------------
- ---------------------------------------------------------------------------*/
SwNumFmt::SwNumFmt(const SvxNumberFormat& rNumFmt, SwDoc* pDoc) :
SvxNumberFormat(rNumFmt),
pVertOrient(new SwFmtVertOrient( 0, rNumFmt.GetVertOrient()))
@@ -244,16 +230,12 @@ SwNumFmt::SwNumFmt(const SvxNumberFormat& rNumFmt, SwDoc* pDoc) :
pRegisteredIn->Remove( this );
}
-/* -----------------------------22.02.01 13:42--------------------------------
- ---------------------------------------------------------------------------*/
SwNumFmt::~SwNumFmt()
{
delete pVertOrient;
}
-/* -----------------------------02.07.01 15:37--------------------------------
- ---------------------------------------------------------------------------*/
void SwNumFmt::NotifyGraphicArrived()
{
if( GetCharFmt() )
@@ -267,34 +249,9 @@ sal_Bool SwNumFmt::IsEnumeration() const
// using this code. Therefore HBRINKM and I agreed upon defining
// IsEnumeration() as !IsItemize()
return !IsItemize();
- // <--
-
- /*
- sal_Bool bResult;
-
- switch(GetNumberingType())
- {
- case SVX_NUM_CHARS_UPPER_LETTER:
- case SVX_NUM_CHARS_LOWER_LETTER:
- case SVX_NUM_ROMAN_UPPER:
- case SVX_NUM_ROMAN_LOWER:
- case SVX_NUM_ARABIC:
- case SVX_NUM_PAGEDESC:
- case SVX_NUM_CHARS_UPPER_LETTER_N:
- case SVX_NUM_CHARS_LOWER_LETTER_N:
- bResult = sal_True;
-
- break;
-
- default:
- bResult = sal_False;
- }
-
- return bResult;
- */
}
-// #i29560#
+
sal_Bool SwNumFmt::IsItemize() const
{
sal_Bool bResult;
@@ -315,10 +272,6 @@ sal_Bool SwNumFmt::IsItemize() const
}
-
-/* -----------------------------23.02.01 09:28--------------------------------
-
- ---------------------------------------------------------------------------*/
SwNumFmt& SwNumFmt::operator=( const SwNumFmt& rNumFmt)
{
SvxNumberFormat::operator=(rNumFmt);
@@ -328,9 +281,7 @@ SwNumFmt& SwNumFmt::operator=( const SwNumFmt& rNumFmt)
pRegisteredIn->Remove( this );
return *this;
}
-/* -----------------------------23.02.01 09:28--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwNumFmt::operator==( const SwNumFmt& rNumFmt) const
{
sal_Bool bRet = SvxNumberFormat::operator==(rNumFmt) &&
@@ -338,9 +289,6 @@ sal_Bool SwNumFmt::operator==( const SwNumFmt& rNumFmt) const
return bRet;
}
-/* -----------------------------22.02.01 13:44--------------------------------
-
- ---------------------------------------------------------------------------*/
void SwNumFmt::SetCharFmt( SwCharFmt* pChFmt)
{
if( pChFmt )
@@ -348,9 +296,7 @@ void SwNumFmt::SetCharFmt( SwCharFmt* pChFmt)
else if( GetRegisteredIn() )
pRegisteredIn->Remove( this );
}
-/* -----------------------------22.02.01 13:45--------------------------------
- ---------------------------------------------------------------------------*/
void SwNumFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
// dann suche mal in dem Doc nach dem NumRules-Object, in dem dieses
@@ -369,16 +315,12 @@ void SwNumFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
else
SwClient::Modify( pOld, pNew );
}
-/* -----------------------------23.02.01 11:08--------------------------------
- ---------------------------------------------------------------------------*/
void SwNumFmt::SetCharFmtName(const String& rSet)
{
SvxNumberFormat::SetCharFmtName(rSet);
}
-/* -----------------------------22.02.01 13:47--------------------------------
- ---------------------------------------------------------------------------*/
const String& SwNumFmt::GetCharFmtName() const
{
if((SwCharFmt*)pRegisteredIn)
@@ -386,9 +328,7 @@ const String& SwNumFmt::GetCharFmtName() const
else
return aEmptyStr;
}
-/* -----------------------------22.02.01 16:05--------------------------------
- ---------------------------------------------------------------------------*/
void SwNumFmt::SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize,
const sal_Int16* pOrient)
{
@@ -396,23 +336,17 @@ void SwNumFmt::SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* p
pVertOrient->SetVertOrient( *pOrient );
SvxNumberFormat::SetGraphicBrush( pBrushItem, pSize, pOrient);
}
-/* -----------------------------22.02.01 16:05--------------------------------
- ---------------------------------------------------------------------------*/
void SwNumFmt::SetVertOrient(sal_Int16 eSet)
{
SvxNumberFormat::SetVertOrient(eSet);
}
-/* -----------------------------22.02.01 16:05--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int16 SwNumFmt::GetVertOrient() const
{
return SvxNumberFormat::GetVertOrient();
}
-/* -----------------------------22.02.01 13:54--------------------------------
- ---------------------------------------------------------------------------*/
void SwNumFmt::UpdateNumNodes( SwDoc* pDoc )
{
sal_Bool bDocIsModified = pDoc->IsModified();
@@ -424,33 +358,6 @@ void SwNumFmt::UpdateNumNodes( SwDoc* pDoc )
for( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
if( pRule->GetNumFmt( i ) == this )
{
- // --> OD 2008-02-19 #refactorlists#
-// const String& rRuleNm = pRule->GetName();
-
-// SwModify* pMod;
-// const SfxPoolItem* pItem;
-// sal_uInt16 k, nMaxItems = pDoc->GetAttrPool().GetItemCount(
-// RES_PARATR_NUMRULE );
-// for( k = 0; k < nMaxItems; ++k )
-// if( 0 != (pItem = pDoc->GetAttrPool().GetItem(
-// RES_PARATR_NUMRULE, k ) ) &&
-// 0 != ( pMod = (SwModify*)((SwNumRuleItem*)pItem)->
-// GetDefinedIn()) &&
-// ((SwNumRuleItem*)pItem)->GetValue() == rRuleNm )
-// {
-// if( pMod->IsA( TYPE( SwFmt )) )
-// {
-// SwNumRuleInfo aInfo( rRuleNm );
-// pMod->GetInfo( aInfo );
-
-// for( sal_uLong nFirst = 0, nLast = aInfo.GetList().Count();
-// nFirst < nLast; ++nFirst )
-// lcl_SetRuleChgd(
-// *aInfo.GetList().GetObject( nFirst ), i );
-// }
-// else if( ((SwTxtNode*)pMod)->GetNodes().IsDocNodes() )
-// lcl_SetRuleChgd( *(SwTxtNode*)pMod, i );
-// }
SwNumRule::tTxtNodeList aTxtNodeList;
pRule->GetTxtNodeList( aTxtNodeList );
for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin();
@@ -467,9 +374,7 @@ void SwNumFmt::UpdateNumNodes( SwDoc* pDoc )
if( bFnd && !bDocIsModified )
pDoc->ResetModified();
}
-/* -----------------------------31.05.01 16:08--------------------------------
- ---------------------------------------------------------------------------*/
const SwFmtVertOrient* SwNumFmt::GetGraphicOrientation() const
{
sal_Int16 eOrient = SvxNumberFormat::GetVertOrient();
@@ -482,20 +387,17 @@ const SwFmtVertOrient* SwNumFmt::GetGraphicOrientation() const
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
long int SwNumRule::nInstances = 0;
#endif
-// --> OD 2008-02-11 #newlistlevelattrs#
// handle new parameter <eDefaultNumberFormatPositionAndSpaceMode>
SwNumRule::SwNumRule( const String& rNm,
const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode,
SwNumRuleType eType,
sal_Bool bAutoFlg )
: maTxtNodeList(),
- // --> OD 2008-03-03 #refactorlists#
maParagraphStyleList(),
- // <--
pNumRuleMap(0),
sName( rNm ),
eRuleType( eType ),
@@ -506,17 +408,11 @@ SwNumRule::SwNumRule( const String& rNm,
bInvalidRuleFlag( sal_True ),
bContinusNum( sal_False ),
bAbsSpaces( sal_False ),
- // --> OD 2005-10-21 - initialize member <mbCountPhantoms>
mbCountPhantoms( true ),
- // <--
- // --> OD 2008-02-11 #newlistlevelattrs#
meDefaultNumberFormatPositionAndSpaceMode( eDefaultNumberFormatPositionAndSpaceMode ),
- // <--
- // --> OD 2008-04-03 #refactorlists#
msDefaultListId()
- // <--
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
nSerial = nInstances++;
#endif
@@ -536,12 +432,9 @@ SwNumRule::SwNumRule( const String& rNm,
pFmt->SetAbsLSpace( lNumIndent + SwNumRule::GetNumIndent( n ) );
pFmt->SetFirstLineOffset( lNumFirstLineOffset );
pFmt->SetSuffix( aDotStr );
- // --> OD 2006-06-29 #b6440955#
pFmt->SetBulletChar( numfunc::GetBulletChar(n));
- // <--
SwNumRule::aBaseFmts[ NUM_RULE ][ n ] = pFmt;
}
- // --> OD 2008-02-11 #newlistlevelattrs#
// position-and-space mode LABEL_ALIGNMENT
// first line indent of general numbering in inch: -0,25 inch
const long cFirstLineIndent = -1440/4;
@@ -556,18 +449,15 @@ SwNumRule::SwNumRule( const String& rNm,
pFmt = new SwNumFmt;
pFmt->SetIncludeUpperLevels( 1 );
pFmt->SetStart( 1 );
- // --> OD 2008-01-15 #newlistlevelattrs#
pFmt->SetPositionAndSpaceMode( SvxNumberFormat::LABEL_ALIGNMENT );
pFmt->SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
pFmt->SetListtabPos( cIndentAt[ n ] );
pFmt->SetFirstLineIndent( cFirstLineIndent );
pFmt->SetIndentAt( cIndentAt[ n ] );
- // <--
pFmt->SetSuffix( aDotStr );
pFmt->SetBulletChar( numfunc::GetBulletChar(n));
SwNumRule::aLabelAlignmentBaseFmts[ NUM_RULE ][ n ] = pFmt;
}
- // <--
// outline:
// position-and-space mode LABEL_WIDTH_AND_POSITION:
@@ -578,12 +468,9 @@ SwNumRule::SwNumRule( const String& rNm,
pFmt->SetIncludeUpperLevels( MAXLEVEL );
pFmt->SetStart( 1 );
pFmt->SetCharTextDistance( lOutlineMinTextDistance );
- // --> OD 2006-06-29 #b6440955#
pFmt->SetBulletChar( numfunc::GetBulletChar(n));
- // <--
SwNumRule::aBaseFmts[ OUTLINE_RULE ][ n ] = pFmt;
}
- // --> OD 2008-02-11 #newlistlevelattrs#
// position-and-space mode LABEL_ALIGNMENT:
// indent values of default outline numbering in inch:
// 0,3 0,4 0,5 0,6 0,7
@@ -605,17 +492,14 @@ SwNumRule::SwNumRule( const String& rNm,
pFmt->SetBulletChar( numfunc::GetBulletChar(n));
SwNumRule::aLabelAlignmentBaseFmts[ OUTLINE_RULE ][ n ] = pFmt;
}
- // <--
}
memset( aFmts, 0, sizeof( aFmts ));
- ASSERT( sName.Len(), "NumRule ohne Namen!" );
+ OSL_ENSURE( sName.Len(), "NumRule ohne Namen!" );
}
SwNumRule::SwNumRule( const SwNumRule& rNumRule )
: maTxtNodeList(),
- // --> OD 2008-03-03 #refactorlists#
maParagraphStyleList(),
- // <--
pNumRuleMap(0),
sName( rNumRule.sName ),
eRuleType( rNumRule.eRuleType ),
@@ -626,17 +510,11 @@ SwNumRule::SwNumRule( const SwNumRule& rNumRule )
bInvalidRuleFlag( sal_True ),
bContinusNum( rNumRule.bContinusNum ),
bAbsSpaces( rNumRule.bAbsSpaces ),
- // --> OD 2005-10-21 - initialize member <mbCountPhantoms>
mbCountPhantoms( true ),
- // <--
- // --> OD 2008-02-11 #newlistlevelattrs#
meDefaultNumberFormatPositionAndSpaceMode( rNumRule.meDefaultNumberFormatPositionAndSpaceMode ),
- // <--
- // --> OD 2008-04-03 #refactorlists#
msDefaultListId( rNumRule.msDefaultListId )
- // <--
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
nSerial = nInstances++;
#endif
@@ -670,19 +548,15 @@ SwNumRule::~SwNumRule()
for( n = 0; n < MAXLEVEL; ++n, ++ppFmts )
delete *ppFmts, *ppFmts = 0;
- // --> OD 2008-02-11 #newlistlevelattrs#
ppFmts = (SwNumFmt**)SwNumRule::aLabelAlignmentBaseFmts;
for( n = 0; n < MAXLEVEL; ++n, ++ppFmts )
delete *ppFmts, *ppFmts = 0;
for( n = 0; n < MAXLEVEL; ++n, ++ppFmts )
delete *ppFmts, *ppFmts = 0;
- // <--
}
- // --> OD 2008-02-19 #refactorlists#
maTxtNodeList.clear();
maParagraphStyleList.clear();
- // <--
}
void SwNumRule::CheckCharFmts( SwDoc* pDoc )
@@ -720,7 +594,6 @@ SwNumRule& SwNumRule::operator=( const SwNumRule& rNumRule )
return *this;
}
-
sal_Bool SwNumRule::operator==( const SwNumRule& rRule ) const
{
sal_Bool bRet = eRuleType == rRule.eRuleType &&
@@ -743,10 +616,9 @@ sal_Bool SwNumRule::operator==( const SwNumRule& rRule ) const
return bRet;
}
-
void SwNumRule::Set( sal_uInt16 i, const SwNumFmt& rNumFmt )
{
- ASSERT( i < MAXLEVEL, "Serious defect, please inform OD" )
+ OSL_ENSURE( i < MAXLEVEL, "Serious defect, please inform OD" );
if( i < MAXLEVEL )
{
if( !aFmts[ i ] || !(rNumFmt == Get( i )) )
@@ -760,7 +632,7 @@ void SwNumRule::Set( sal_uInt16 i, const SwNumFmt& rNumFmt )
void SwNumRule::Set( sal_uInt16 i, const SwNumFmt* pNumFmt )
{
- ASSERT( i < MAXLEVEL, "Serious defect, please inform OD" )
+ OSL_ENSURE( i < MAXLEVEL, "Serious defect, please inform OD" );
if( i >= MAXLEVEL )
return;
SwNumFmt* pOld = aFmts[ i ];
@@ -778,7 +650,6 @@ void SwNumRule::Set( sal_uInt16 i, const SwNumFmt* pNumFmt )
*pOld = *pNumFmt, bInvalidRuleFlag = sal_True;
}
-
String SwNumRule::MakeNumString( const SwNodeNum& rNum, sal_Bool bInclStrings,
sal_Bool bOnlyArabic ) const
{
@@ -799,28 +670,22 @@ String SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
String aStr;
unsigned int nLevel = rNumVector.size() - 1;
- // --> OD 2005-10-17 #126238#
+
if ( nLevel > _nRestrictToThisLevel )
{
nLevel = _nRestrictToThisLevel;
}
- // <--
if (nLevel < MAXLEVEL)
{
const SwNumFmt& rMyNFmt = Get( static_cast<sal_uInt16>(nLevel) );
- // --> OD 2006-06-02 #b6432095#
- // - levels with numbering none has to provide prefix and suffix string
-// if( SVX_NUM_NUMBER_NONE != rMyNFmt.GetNumberingType() )
- // <--
+
{
sal_uInt8 i = static_cast<sal_uInt8>(nLevel);
if( !IsContinusNum() &&
- // --> OD 2006-09-19 #i69672#
// - do not include upper levels, if level isn't numbered.
rMyNFmt.GetNumberingType() != SVX_NUM_NUMBER_NONE &&
- // <--
rMyNFmt.GetIncludeUpperLevels() ) // nur der eigene Level ?
{
sal_uInt8 n = rMyNFmt.GetIncludeUpperLevels();
@@ -872,7 +737,7 @@ String SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
return aStr;
}
-// --> OD 2007-09-07 #i81002#
+
String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum,
const bool bInclSuperiorNumLabels,
const sal_uInt8 nRestrictInclToThisLevel ) const
@@ -932,7 +797,6 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum,
// eine Art Copy-Constructor, damit die Num-Formate auch an den
// richtigen CharFormaten eines Dokumentes haengen !!
// (Kopiert die NumFormate und returnt sich selbst)
-
SwNumRule& SwNumRule::CopyNumRule( SwDoc* pDoc, const SwNumRule& rNumRule )
{
for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
@@ -955,9 +819,7 @@ SwNumRule& SwNumRule::CopyNumRule( SwDoc* pDoc, const SwNumRule& rNumRule )
bInvalidRuleFlag = sal_True;
return *this;
}
-/* -----------------30.10.98 08:33-------------------
- *
- * --------------------------------------------------*/
+
void SwNumRule::SetSvxRule(const SvxNumRule& rNumRule, SwDoc* pDoc)
{
for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
@@ -970,9 +832,7 @@ void SwNumRule::SetSvxRule(const SvxNumRule& rNumRule, SwDoc* pDoc)
bInvalidRuleFlag = sal_True;
bContinusNum = rNumRule.IsContinuousNumbering();
}
-/* -----------------30.10.98 08:33-------------------
- *
- * --------------------------------------------------*/
+
SvxNumRule SwNumRule::MakeSvxNumRule() const
{
SvxNumRule aRule(NUM_CONTINUOUS|NUM_CHAR_TEXT_DISTANCE|NUM_CHAR_STYLE|
@@ -996,19 +856,14 @@ void SwNumRule::SetInvalidRule(sal_Bool bFlag)
{
if (bFlag)
{
- // --> OD 2008-03-13 #refactorlists#
-// tPamAndNums::iterator aIt;
-// for (aIt = aNumberRanges.begin(); aIt != aNumberRanges.end(); aIt++)
-// (*aIt).second->InvalidateTree();
std::set< SwList* > aLists;
tTxtNodeList::iterator aIter;
for ( aIter = maTxtNodeList.begin(); aIter != maTxtNodeList.end(); ++aIter )
{
const SwTxtNode* pTxtNode = *aIter;
- // --> OD 2010-06-04 #i111681# - applying patch from cmc
-// aLists.insert( pTxtNode->GetDoc()->getListByName( pTxtNode->GetListId() ) );
+ // #i111681# - applying patch from cmc
SwList* pList = pTxtNode->GetDoc()->getListByName( pTxtNode->GetListId() );
- ASSERT( pList, "<SwNumRule::SetInvalidRule(..)> - list at which the text node is registered at does not exist. This is a serious issue --> please inform OD.");
+ OSL_ENSURE( pList, "<SwNumRule::SetInvalidRule(..)> - list at which the text node is registered at does not exist. This is a serious issue --> please inform OD.");
if ( pList )
{
aLists.insert( pList );
@@ -1023,71 +878,6 @@ void SwNumRule::SetInvalidRule(sal_Bool bFlag)
bInvalidRuleFlag = bFlag;
}
-// --> OD 2008-06-16 #i90078#
-// #i23725#, #i23726#
-//void SwNumRule::Indent(short nAmount, int nLevel, int nReferenceLevel,
-// sal_Bool bRelative, sal_Bool bFirstLine, sal_Bool bCheckGtZero)
-//{
-// int nStartLevel = 0;
-// int nEndLevel = MAXLEVEL - 1;
-// sal_Bool bGotInvalid = sal_False;
-
-// if (nLevel >= 0)
-// nStartLevel = nEndLevel = nLevel;
-
-// int i;
-// short nRealAmount = nAmount;
-
-// if (! bRelative)
-// {
-// if (bFirstLine)
-// {
-// if (nReferenceLevel >= 0)
-// nAmount = nAmount - Get(static_cast<sal_uInt16>(nReferenceLevel)).GetFirstLineOffset();
-// else
-// nAmount = nAmount - Get(static_cast<sal_uInt16>(nStartLevel)).GetFirstLineOffset();
-// }
-
-// sal_Bool bFirst = sal_True;
-
-// if (nReferenceLevel >= 0)
-// nRealAmount = nAmount - Get(static_cast<sal_uInt16>(nReferenceLevel)).GetAbsLSpace();
-// else
-// for (i = nStartLevel; i < nEndLevel + 1; i++)
-// {
-// short nTmp = nAmount - Get(static_cast<sal_uInt16>(i)).GetAbsLSpace();
-
-// if (bFirst || nTmp > nRealAmount)
-// {
-// nRealAmount = nTmp;
-// bFirst = sal_False;
-// }
-// }
-// }
-
-// if (nRealAmount < 0)
-// for (i = nStartLevel; i < nEndLevel + 1; i++)
-// if (Get(static_cast<sal_uInt16>(i)).GetAbsLSpace() + nRealAmount < 0)
-// nRealAmount = -Get(static_cast<sal_uInt16>(i)).GetAbsLSpace();
-
-// for (i = nStartLevel; i < nEndLevel + 1; i++)
-// {
-// short nNew = Get(static_cast<sal_uInt16>(i)).GetAbsLSpace() + nRealAmount;
-
-// if (bCheckGtZero && nNew < 0)
-// nNew = 0;
-
-// SwNumFmt aTmpNumFmt(Get(static_cast<sal_uInt16>(i)));
-// aTmpNumFmt.SetAbsLSpace(nNew);
-
-// Set(static_cast<sal_uInt16>(i), aTmpNumFmt);
-
-// bGotInvalid = sal_True;
-// }
-
-// if (bGotInvalid)
-// SetInvalidRule(bGotInvalid);
-//}
// change indent of all list levels by given difference
void SwNumRule::ChangeIndent( const short nDiff )
@@ -1110,14 +900,13 @@ void SwNumRule::ChangeIndent( const short nDiff )
}
else if ( ePosAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT )
{
- // --> OD 2009-01-20 #i93399#
// adjust also the list tab position, if a list tab stop is applied
if ( aTmpNumFmt.GetLabelFollowedBy() == SvxNumberFormat::LISTTAB )
{
const long nNewListTab = aTmpNumFmt.GetListtabPos() + nDiff;
aTmpNumFmt.SetListtabPos( nNewListTab );
}
- // <--
+
const long nNewIndent = nDiff +
aTmpNumFmt.GetIndentAt();
aTmpNumFmt.SetIndentAt( nNewIndent );
@@ -1143,7 +932,6 @@ void SwNumRule::SetIndent( const short nNewIndent,
}
else if ( ePosAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT )
{
- // --> OD 2009-01-20 #i93399#
// adjust also the list tab position, if a list tab stop is applied
if ( aTmpNumFmt.GetLabelFollowedBy() == SvxNumberFormat::LISTTAB )
{
@@ -1151,7 +939,7 @@ void SwNumRule::SetIndent( const short nNewIndent,
( nNewIndent - aTmpNumFmt.GetIndentAt() );
aTmpNumFmt.SetListtabPos( nNewListTab );
}
- // <--
+
aTmpNumFmt.SetIndentAt( nNewIndent );
}
@@ -1183,14 +971,10 @@ void SwNumRule::SetIndentOfFirstListLevelAndChangeOthers( const short nNewIndent
ChangeIndent( nDiff );
}
}
-// <--
+
void SwNumRule::Validate()
{
- // --> OD 2008-03-13 #refactorlists#
-// tPamAndNums::iterator aIt;
-// for (aIt = aNumberRanges.begin(); aIt != aNumberRanges.end(); aIt++)
-// (*aIt).second->NotifyInvalidChildren();
std::set< SwList* > aLists;
tTxtNodeList::iterator aIter;
for ( aIter = maTxtNodeList.begin(); aIter != maTxtNodeList.end(); ++aIter )
@@ -1200,27 +984,30 @@ void SwNumRule::Validate()
}
std::for_each( aLists.begin(), aLists.end(),
std::mem_fun( &SwList::ValidateListTree ) );
- // <--
+
SetInvalidRule(sal_False);
}
+
bool SwNumRule::IsCountPhantoms() const
{
return mbCountPhantoms;
}
+
void SwNumRule::SetCountPhantoms(bool bCountPhantoms)
{
mbCountPhantoms = bCountPhantoms;
}
-// --> OD 2008-03-03 #refactorlists#
+
SwNumRule::tParagraphStyleList::size_type SwNumRule::GetParagraphStyleListSize() const
{
return maParagraphStyleList.size();
}
+
void SwNumRule::AddParagraphStyle( SwTxtFmtColl& rTxtFmtColl )
{
tParagraphStyleList::iterator aIter =
@@ -1232,6 +1019,7 @@ void SwNumRule::AddParagraphStyle( SwTxtFmtColl& rTxtFmtColl )
}
}
+
void SwNumRule::RemoveParagraphStyle( SwTxtFmtColl& rTxtFmtColl )
{
tParagraphStyleList::iterator aIter =
@@ -1242,9 +1030,8 @@ void SwNumRule::RemoveParagraphStyle( SwTxtFmtColl& rTxtFmtColl )
maParagraphStyleList.erase( aIter );
}
}
-// <--
-// --> OD 2006-06-27 #b6440955#
+
namespace numfunc
{
/** class containing default bullet list configuration data
@@ -1268,20 +1055,22 @@ namespace numfunc
{
return msFontname;
}
- // --> OD 2008-06-02 #i63395#
+
inline bool IsFontnameUserDefined() const
{
return mbUserDefinedFontname;
}
- // <--
+
inline const Font& GetFont() const
{
return *mpFont;
}
+
inline short GetFontWeight() const
{
return static_cast<short>(meFontWeight);
}
+
inline short GetFontItalic() const
{
return static_cast<short>(meFontItalic);
@@ -1335,9 +1124,7 @@ namespace numfunc
// default bullet list configuration data
String msFontname;
- // --> OD 2008-06-02 #i63395#
bool mbUserDefinedFontname;
- // <--
FontWeight meFontWeight;
FontItalic meFontItalic;
sal_Unicode mnLevelChars[MAXLEVEL];
@@ -1349,12 +1136,10 @@ namespace numfunc
SwDefBulletConfig* SwDefBulletConfig::mpInstance = 0;
SwDefBulletConfig::SwDefBulletConfig()
- : ConfigItem( rtl::OUString::createFromAscii("Office.Writer/Numbering/DefaultBulletList") ),
- // --> OD 2008-06-02 #i63395#
+ : ConfigItem( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Writer/Numbering/DefaultBulletList")) ),
// default bullet font is now OpenSymbol
msFontname( String::CreateFromAscii("OpenSymbol") ),
mbUserDefinedFontname( false ),
- // <--
meFontWeight( WEIGHT_DONTKNOW ),
meFontItalic( ITALIC_NONE ),
mpFont( 0 )
@@ -1369,27 +1154,12 @@ namespace numfunc
void SwDefBulletConfig::SetToDefault()
{
- // --> OD 2008-06-02 #i63395#
- // default bullet font name is now OpenSymbol
-// msFontname = String::CreateFromAscii("StarSymbol");
msFontname = String::CreateFromAscii("OpenSymbol");
mbUserDefinedFontname = false;
// <--
meFontWeight = WEIGHT_DONTKNOW;
meFontItalic = ITALIC_NONE;
- // --> OD 2008-06-03 #i63395#
- // new bullet characters
-// mnLevelChars[0] = 0x25cf;
-// mnLevelChars[1] = 0x25cb;
-// mnLevelChars[2] = 0x25a0;
-// mnLevelChars[3] = 0x25cf;
-// mnLevelChars[4] = 0x25cb;
-// mnLevelChars[5] = 0x25a0;
-// mnLevelChars[6] = 0x25cf;
-// mnLevelChars[7] = 0x25cb;
-// mnLevelChars[8] = 0x25a0;
-// mnLevelChars[9] = 0x25cf;
mnLevelChars[0] = 0x2022;
mnLevelChars[1] = 0x25e6;
mnLevelChars[2] = 0x25aa;
@@ -1400,26 +1170,25 @@ namespace numfunc
mnLevelChars[7] = 0x25e6;
mnLevelChars[8] = 0x25aa;
mnLevelChars[9] = 0x2022;
- // <--
}
uno::Sequence<rtl::OUString> SwDefBulletConfig::GetPropNames() const
{
uno::Sequence<rtl::OUString> aPropNames(13);
rtl::OUString* pNames = aPropNames.getArray();
- pNames[0] = rtl::OUString::createFromAscii("BulletFont/FontFamilyname");
- pNames[1] = rtl::OUString::createFromAscii("BulletFont/FontWeight");
- pNames[2] = rtl::OUString::createFromAscii("BulletFont/FontItalic");
- pNames[3] = rtl::OUString::createFromAscii("BulletCharLvl1");
- pNames[4] = rtl::OUString::createFromAscii("BulletCharLvl2");
- pNames[5] = rtl::OUString::createFromAscii("BulletCharLvl3");
- pNames[6] = rtl::OUString::createFromAscii("BulletCharLvl4");
- pNames[7] = rtl::OUString::createFromAscii("BulletCharLvl5");
- pNames[8] = rtl::OUString::createFromAscii("BulletCharLvl6");
- pNames[9] = rtl::OUString::createFromAscii("BulletCharLvl7");
- pNames[10] = rtl::OUString::createFromAscii("BulletCharLvl8");
- pNames[11] = rtl::OUString::createFromAscii("BulletCharLvl9");
- pNames[12] = rtl::OUString::createFromAscii("BulletCharLvl10");
+ pNames[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletFont/FontFamilyname"));
+ pNames[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletFont/FontWeight"));
+ pNames[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletFont/FontItalic"));
+ pNames[3] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl1"));
+ pNames[4] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl2"));
+ pNames[5] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl3"));
+ pNames[6] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl4"));
+ pNames[7] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl5"));
+ pNames[8] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl6"));
+ pNames[9] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl7"));
+ pNames[10] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl8"));
+ pNames[11] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl9"));
+ pNames[12] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl10"));
return aPropNames;
}
@@ -1430,8 +1199,8 @@ namespace numfunc
uno::Sequence<uno::Any> aValues =
GetProperties( aPropNames );
const uno::Any* pValues = aValues.getConstArray();
- ASSERT( aValues.getLength() == aPropNames.getLength(),
- "<SwDefBulletConfig::SwDefBulletConfig()> - GetProperties failed")
+ OSL_ENSURE( aValues.getLength() == aPropNames.getLength(),
+ "<SwDefBulletConfig::SwDefBulletConfig()> - GetProperties failed");
if ( aValues.getLength() == aPropNames.getLength() )
{
for ( int nProp = 0; nProp < aPropNames.getLength(); ++nProp )
@@ -1445,9 +1214,7 @@ namespace numfunc
rtl::OUString aStr;
pValues[nProp] >>= aStr;
msFontname = aStr;
- // --> OD 2008-06-02 #i63395#
mbUserDefinedFontname = true;
- // <--
}
break;
case 1:
@@ -1509,12 +1276,10 @@ namespace numfunc
return SwDefBulletConfig::getInstance()->GetFontname();
}
- // --> OD 2008-06-02 #i63395#
bool IsDefBulletFontUserDefined()
{
return SwDefBulletConfig::getInstance()->IsFontnameUserDefined();
}
- // <--
const Font& GetDefBulletFont()
{
@@ -1528,8 +1293,6 @@ namespace numfunc
/** class containing configuration data about user interface behavior
regarding lists and list items.
-
- OD 2007-10-01 #b660435#
configuration item about behavior of <TAB>/<SHIFT-TAB>-key at first
position of first list item
@@ -1590,7 +1353,7 @@ namespace numfunc
SwNumberingUIBehaviorConfig* SwNumberingUIBehaviorConfig::mpInstance = 0;
SwNumberingUIBehaviorConfig::SwNumberingUIBehaviorConfig()
- : ConfigItem( rtl::OUString::createFromAscii("Office.Writer/Numbering/UserInterfaceBehavior") ),
+ : ConfigItem( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Writer/Numbering/UserInterfaceBehavior")) ),
mbChangeIndentOnTabAtFirstPosOfFirstListItem( sal_True )
{
SetToDefault();
@@ -1609,7 +1372,7 @@ namespace numfunc
{
com::sun::star::uno::Sequence<rtl::OUString> aPropNames(1);
rtl::OUString* pNames = aPropNames.getArray();
- pNames[0] = rtl::OUString::createFromAscii("ChangeIndentOnTabAtFirstPosOfFirstListItem");
+ pNames[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ChangeIndentOnTabAtFirstPosOfFirstListItem"));
return aPropNames;
}
@@ -1622,8 +1385,8 @@ namespace numfunc
com::sun::star::uno::Sequence<com::sun::star::uno::Any> aValues =
GetProperties( aPropNames );
const com::sun::star::uno::Any* pValues = aValues.getConstArray();
- ASSERT( aValues.getLength() == aPropNames.getLength(),
- "<SwNumberingUIBehaviorConfig::LoadConfig()> - GetProperties failed")
+ OSL_ENSURE( aValues.getLength() == aPropNames.getLength(),
+ "<SwNumberingUIBehaviorConfig::LoadConfig()> - GetProperties failed");
if ( aValues.getLength() == aPropNames.getLength() )
{
for ( int nProp = 0; nProp < aPropNames.getLength(); ++nProp )
@@ -1639,8 +1402,8 @@ namespace numfunc
break;
default:
{
- ASSERT( false,
- "<SwNumberingUIBehaviorConfig::LoadConfig()> - unknown configuration property")
+ OSL_ENSURE( false,
+ "<SwNumberingUIBehaviorConfig::LoadConfig()> - unknown configuration property");
}
}
}
@@ -1660,7 +1423,6 @@ namespace numfunc
return SwNumberingUIBehaviorConfig::getInstance()->ChangeIndentOnTabAtFirstPosOfFirstListItem();
}
- // --> OD 2008-06-06 #i89178#
SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode()
{
SvxNumberFormat::SvxNumPositionAndSpaceMode ePosAndSpaceMode;
@@ -1684,3 +1446,5 @@ namespace numfunc
// <--
}
// <--
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index 5c3bb6659b4a..7f822c8c6afd 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -94,7 +95,7 @@ const sal_uInt16 PT_24 = 24 * 20; // 22 pt
//const sal_uInt16 HTML_PARSPACE = ((CM_05 * 7) / 10);
#define HTML_PARSPACE GetMetricVal( CM_05 )
-static const sal_Char __FAR_DATA sKomma[] = ", ";
+static const sal_Char sKomma[] = ", ";
static const sal_uInt16 aHeadlineSizes[ 2 * MAXLEVEL ] = {
// PT_16, PT_14, PT_14, PT_12, PT_12, // normal
@@ -226,17 +227,15 @@ void lcl_SetHeadline( SwDoc* pDoc, SwTxtFmtColl* pColl,
{
if( !( nOutLvlBits & ( 1 << nLevel )) )
{
- //pColl->SetOutlineLevel( nLevel ); //#outline level zhaojianwei
pColl->AssignToListLevelOfOutlineStyle(nLevel);//<-end,zhaojianwei
if( !bHTMLMode )
{
SwNumRule * pOutlineRule = pDoc->GetOutlineNumRule();
const SwNumFmt& rNFmt = pOutlineRule->Get( nLevel );
- // --> OD 2008-02-01 #newlistlevelattrs#
+
if ( rNFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION &&
( rNFmt.GetAbsLSpace() || rNFmt.GetFirstLineOffset() ) )
- // <--
{
SvxLRSpaceItem aLR( (SvxLRSpaceItem&)pColl->GetFmtAttr( RES_LR_SPACE ) );
aLR.SetTxtFirstLineOfstValue( rNFmt.GetFirstLineOffset() );
@@ -244,7 +243,7 @@ void lcl_SetHeadline( SwDoc* pDoc, SwTxtFmtColl* pColl,
pColl->SetFmtAttr( aLR );
}
- // --> OD 2006-11-20 #i71764#
+ // #i71764#
// Check on document setting OUTLINE_LEVEL_YIELDS_OUTLINE_RULE no longer needed.
// All paragraph styles, which are assigned to a level of the
// outline style has to have the outline style set as its list style.
@@ -301,7 +300,7 @@ void lcl_SetNumBul( SwDoc* pDoc, SwTxtFmtColl* pColl,
rSet.Put( aLR );
rSet.Put( aUL );
- if( !pColl )
+ if( pColl )
pColl->SetNextTxtFmtColl( *pDoc->GetTxtCollFromPool( nNxt ));
}
@@ -321,7 +320,7 @@ SvxFrameDirection GetDefaultFrameDirection(sal_uLong nLanguage)
SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage )
{
- ASSERT(
+ OSL_ENSURE(
(RES_POOLCOLL_TEXT_BEGIN <= nId && nId < RES_POOLCOLL_TEXT_END) ||
(RES_POOLCOLL_LISTS_BEGIN <= nId && nId < RES_POOLCOLL_LISTS_END) ||
(RES_POOLCOLL_EXTRA_BEGIN <= nId && nId < RES_POOLCOLL_EXTRA_END) ||
@@ -338,8 +337,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage )
{
return pNewColl;
}
- //if( pNewColl->GetOutlineLevel() < MAXLEVEL ) //#outline level,zhaojianwei
- //nOutLvlBits |= ( 1 << pNewColl->GetOutlineLevel() );
+
if( pNewColl->IsAssignedToListLevelOfOutlineStyle())
nOutLvlBits |= ( 1 << pNewColl->GetAssignedOutlineStyleLevel() );//<-end,zhaojianwei
}
@@ -359,7 +357,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage )
else if (RES_POOLCOLL_HTML_BEGIN <= nId && nId < RES_POOLCOLL_HTML_END)
nResId = RC_POOLCOLL_HTML_BEGIN - RES_POOLCOLL_HTML_BEGIN;
- ASSERT( nResId, "Ungueltige Pool-ID" );
+ OSL_ENSURE( nResId, "Ungueltige Pool-ID" );
if( !nResId )
return GetTxtCollFromPool( RES_POOLCOLL_STANDARD );
@@ -390,7 +388,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage )
{
// allgemeine Inhaltsformen
case RES_POOLCOLL_STANDARD:
- /* #111214# koreans do not like SvxScriptItem(sal_True) */
+ /* koreans do not like SvxScriptItem(TRUE) */
if (bRegardLanguage)
{
sal_uLong nAppLanguage = GetAppLanguage();
@@ -971,7 +969,6 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage )
aLR.SetLeft( GetMetricVal( CM_1 ));
aLR.SetRight( GetMetricVal( CM_1 ));
aSet.Put( aLR );
-// aSet.Put( SvxAdjustItem( SVX_ADJUST_BLOCK, RES_PARATR_ADJUST ) );
SvxULSpaceItem aUL( RES_UL_SPACE );
aUL = pNewColl->GetULSpace();
aUL.SetLower( HTML_PARSPACE );
@@ -1050,9 +1047,6 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage )
{
{
pNewColl->SetFmtAttr( aSet );
- // JP 31.08.95: erzeugen einer PoolVorlage ist keine Modifikation
- // (Bug: 18545)
- // SetModified();
}
}
return pNewColl;
@@ -1064,7 +1058,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage )
// benutzt wird
bool SwDoc::IsPoolTxtCollUsed( sal_uInt16 nId ) const
{
- ASSERT(
+ OSL_ENSURE(
(RES_POOLCOLL_TEXT_BEGIN <= nId && nId < RES_POOLCOLL_TEXT_END) ||
(RES_POOLCOLL_LISTS_BEGIN <= nId && nId < RES_POOLCOLL_LISTS_END) ||
(RES_POOLCOLL_EXTRA_BEGIN <= nId && nId < RES_POOLCOLL_EXTRA_END) ||
@@ -1118,7 +1112,7 @@ SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId )
// -> returne das erste
if( RES_POOLCHR_BEGIN > nId || nId >= RES_POOLCHR_END )
{
- ASSERT( !this, "ungueltige Id" );
+ OSL_ENSURE( !this, "ungueltige Id" );
nId = RES_POOLCHR_BEGIN;
}
}
@@ -1136,7 +1130,7 @@ SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId )
// -> returne das erste
if( RES_POOLFRM_BEGIN > nId || nId >= RES_POOLFRM_END )
{
- ASSERT( !this, "ungueltige Id" );
+ OSL_ENSURE( !this, "ungueltige Id" );
nId = RES_POOLFRM_BEGIN;
}
}
@@ -1144,10 +1138,10 @@ SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId )
default:
// Fehlerfall, unbekanntes Format
- ASSERT( nId, "ungueltige Id" );
+ OSL_ENSURE( nId, "ungueltige Id" );
return 0;
}
- ASSERT( nRCId, "ungueltige Id" );
+ OSL_ENSURE( nRCId, "ungueltige Id" );
while( nArrCnt-- )
for( sal_uInt16 n = 0; n < (*pArray[nArrCnt]).Count(); ++n )
@@ -1211,10 +1205,6 @@ SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId )
SetAllScriptItem( aSet, SvxFontItem( rBulletFont.GetFamily(),
rBulletFont.GetName(), rBulletFont.GetStyleName(),
rBulletFont.GetPitch(), rBulletFont.GetCharSet(), RES_CHRATR_FONT ));
- // --> OD 2008-06-02 #i63395#
- // no font and no font size any more
-// SetAllScriptItem( aSet, SvxFontHeightItem( PT_9, 100, RES_CHRATR_FONTSIZE ));
- // <--
}
break;
@@ -1284,10 +1274,6 @@ SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId )
case RES_POOLCHR_VERT_NUM:
aSet.Put( SvxCharRotateItem( 900, sal_False, RES_CHRATR_ROTATE ) );
break;
-//nichts besonderes
-// case RES_POOLCHR_HTML_DEFINSTANCE:
-// break;
-
case RES_POOLFRM_FRAME:
{
@@ -1375,9 +1361,6 @@ SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId )
{
{
pNewFmt->SetFmtAttr( aSet );
- // JP 31.08.95: erzeugen einer PoolVorlage ist keine Modifikation
- // (Bug: 18545)
- // SetModified();
}
}
return pNewFmt;
@@ -1414,7 +1397,7 @@ bool SwDoc::IsPoolFmtUsed( sal_uInt16 nId ) const
}
else
{
- ASSERT( sal_False, "ungueltige Id" );
+ OSL_ENSURE( sal_False, "ungueltige Id" );
bFnd = sal_False;
}
@@ -1459,7 +1442,7 @@ void lcl_GetStdPgSize( SwDoc* pDoc, SfxItemSet& rSet )
SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
{
- ASSERT( RES_POOLPAGE_BEGIN <= nId && nId < RES_POOLPAGE_END,
+ OSL_ENSURE( RES_POOLPAGE_BEGIN <= nId && nId < RES_POOLPAGE_END,
"Falsche AutoFormat-Id" );
SwPageDesc *pNewPgDsc;
@@ -1474,7 +1457,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
// Fehlerfall: unbekannte Poolvorlage
if( RES_POOLPAGE_BEGIN > nId || nId >= RES_POOLPAGE_END )
{
- ASSERT( !this, "ungueltige Id" );
+ OSL_ENSURE( !this, "ungueltige Id" );
nId = RES_POOLPAGE_BEGIN;
}
@@ -1624,9 +1607,6 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
if( bSetLeft )
pNewPgDsc->GetLeft().SetFmtAttr( aSet );
pNewPgDsc->GetMaster().SetFmtAttr( aSet );
- // JP 31.08.95: erzeugen einer PoolVorlage ist keine Modifikation
- // (Bug: 18545)
- // SetModified();
}
}
return pNewPgDsc;
@@ -1634,7 +1614,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
{
- ASSERT( RES_POOLNUMRULE_BEGIN <= nId && nId < RES_POOLNUMRULE_END,
+ OSL_ENSURE( RES_POOLNUMRULE_BEGIN <= nId && nId < RES_POOLNUMRULE_END,
"Falsche AutoFormat-Id" );
SwNumRule* pNewRule;
@@ -1649,7 +1629,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
// Fehlerfall: unbekannte Poolvorlage
if( RES_POOLNUMRULE_BEGIN > nId || nId >= RES_POOLNUMRULE_END )
{
- ASSERT( !this, "ungueltige Id" );
+ OSL_ENSURE( !this, "ungueltige Id" );
nId = RES_POOLNUMRULE_BEGIN;
}
@@ -1658,17 +1638,14 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
SwCharFmt *pNumCFmt = 0, *pBullCFmt = 0;
- // --> OD 2008-02-11 #newlistlevelattrs#
const SvxNumberFormat::SvxNumPositionAndSpaceMode eNumberFormatPositionAndSpaceMode
- // --> OD 2008-06-06 #i89178#
- = numfunc::GetDefaultPositionAndSpaceMode();
- // <--
+ = numfunc::GetDefaultPositionAndSpaceMode(); //#i89178#
// <--
{
sal_Bool bIsModified = IsModified();
- // --> OD 2008-02-11 #newlistlevelattrs#
+
n = MakeNumRule( aNm, 0, sal_False, eNumberFormatPositionAndSpaceMode );
- // <--
+
pNewRule = GetNumRuleTbl()[ n ];
pNewRule->SetPoolFmtId( nId );
pNewRule->SetAutoRule( sal_False );
@@ -1689,9 +1666,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
case RES_POOLNUMRULE_NUM1:
{
SwNumFmt aFmt;
- // --> OD 2008-02-11 #newlistlevelattrs#
aFmt.SetPositionAndSpaceMode( eNumberFormatPositionAndSpaceMode );
- // <--
aFmt.SetNumberingType(SVX_NUM_ARABIC);
aFmt.SetCharFmt( pNumCFmt );
aFmt.SetStart( 1 );
@@ -1716,7 +1691,6 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
const sal_uInt16* pArr = aAbsSpace;
#endif
- // --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetFirstLineOffset( - (*pArr) );
@@ -1726,10 +1700,9 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
aFmt.SetFirstLineIndent( - (*pArr) );
}
- // <--
+
for( n = 0; n < MAXLEVEL; ++n, ++pArr )
{
- // --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetAbsLSpace( *pArr );
@@ -1739,7 +1712,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetListtabPos( *pArr );
aFmt.SetIndentAt( *pArr );
}
- // <--
+
pNewRule->Set( n, aFmt );
}
}
@@ -1770,22 +1743,20 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
const sal_uInt16* pArr = aAbsSpace;
#endif
SwNumFmt aFmt;
- // --> OD 2008-02-11 #newlistlevelattrs#
+
aFmt.SetPositionAndSpaceMode( eNumberFormatPositionAndSpaceMode );
- // <--
aFmt.SetNumberingType(SVX_NUM_ARABIC);
aFmt.SetCharFmt( pNumCFmt );
aFmt.SetIncludeUpperLevels( 1 );
- // --> OD 2008-02-11 #newlistlevelattrs#
+
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT )
{
aFmt.SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
}
- // <--
+
sal_uInt16 nSpace = 0;
for( n = 0; n < MAXLEVEL; ++n )
{
- // --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetAbsLSpace( nSpace = nSpace + pArr[ n ] );
@@ -1797,7 +1768,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetIndentAt( nSpace );
aFmt.SetFirstLineIndent( - pArr[ n ] );
}
- // <--
+
aFmt.SetStart( n+1 );
pNewRule->Set( n, aFmt );
}
@@ -1806,15 +1777,14 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
case RES_POOLNUMRULE_NUM3:
{
SwNumFmt aFmt;
- // --> OD 2008-02-11 #newlistlevelattrs#
+
aFmt.SetPositionAndSpaceMode( eNumberFormatPositionAndSpaceMode );
- // <--
aFmt.SetNumberingType(SVX_NUM_ARABIC);
aFmt.SetCharFmt( pNumCFmt );
aFmt.SetIncludeUpperLevels( 1 );
sal_uInt16 nOffs = GetMetricVal( CM_1 ) * 3;
- // --> OD 2008-02-11 #newlistlevelattrs#
+
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetFirstLineOffset( - nOffs );
@@ -1824,11 +1794,9 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
aFmt.SetFirstLineIndent( - nOffs );
}
- // <--
for( n = 0; n < MAXLEVEL; ++n )
{
- // --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetAbsLSpace( (n+1) * nOffs );
@@ -1838,7 +1806,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetListtabPos( (n+1) * nOffs );
aFmt.SetIndentAt( (n+1) * nOffs );
}
- // <--
+
aFmt.SetStart( n+1 );
pNewRule->Set( n, aFmt );
}
@@ -1847,9 +1815,8 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
case RES_POOLNUMRULE_NUM4:
{
SwNumFmt aFmt;
- // --> OD 2008-02-11 #newlistlevelattrs#
+
aFmt.SetPositionAndSpaceMode( eNumberFormatPositionAndSpaceMode );
- // <--
aFmt.SetNumberingType(SVX_NUM_ROMAN_UPPER);
aFmt.SetCharFmt( pNumCFmt );
aFmt.SetIncludeUpperLevels( 1 );
@@ -1873,7 +1840,6 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
const sal_uInt16* pArr = aAbsSpace;
#endif
- // --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetFirstLineOffset( - (*pArr) );
@@ -1883,11 +1849,11 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetLabelFollowedBy( SvxNumberFormat::SPACE );
aFmt.SetFirstLineIndent( - (*pArr) );
}
- // <--
+
for( n = 0; n < MAXLEVEL; ++n, ++pArr )
{
aFmt.SetStart( n + 1 );
- // --> OD 2008-02-11 #newlistlevelattrs#
+
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetAbsLSpace( *pArr );
@@ -1897,7 +1863,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetListtabPos( *pArr );
aFmt.SetIndentAt( *pArr );
}
- // <--
+
pNewRule->Set( n, aFmt );
}
}
@@ -1927,21 +1893,18 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
const sal_uInt16* pArr0to2 = aAbsSpace0to2;
#endif
SwNumFmt aFmt;
- // --> OD 2008-02-11 #newlistlevelattrs#
+
aFmt.SetPositionAndSpaceMode( eNumberFormatPositionAndSpaceMode );
- // <--
aFmt.SetNumberingType(SVX_NUM_ARABIC);
aFmt.SetStart( 1 );
aFmt.SetIncludeUpperLevels( 1 );
aFmt.SetSuffix( aDotStr );
- // --> OD 2008-02-11 #newlistlevelattrs#
+
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT )
{
aFmt.SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
}
- // <--
- // --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetFirstLineOffset( -pArr0to2[0] ); // == 0.40 cm
@@ -1953,14 +1916,13 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetListtabPos( pArr0to2[1] );
aFmt.SetIndentAt( pArr0to2[1] );
}
- // <--
aFmt.SetCharFmt( pNumCFmt );
pNewRule->Set( 0, aFmt );
aFmt.SetIncludeUpperLevels( 2 );
aFmt.SetStart( 2 );
- // --> OD 2008-02-11 #newlistlevelattrs#
+
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetFirstLineOffset( -pArr0to2[2] ); // == 0.65 cm
@@ -1972,14 +1934,14 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetListtabPos( pArr0to2[3] );
aFmt.SetIndentAt( pArr0to2[3] );
}
- // <--
+
pNewRule->Set( 1, aFmt );
aFmt.SetNumberingType(SVX_NUM_CHARS_LOWER_LETTER);
aFmt.SetSuffix( ')');
aFmt.SetIncludeUpperLevels( 1 );
aFmt.SetStart( 3 );
- // --> OD 2008-02-11 #newlistlevelattrs#
+
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetFirstLineOffset( - pArr0to2[4] ); // == 0.45cm
@@ -1991,20 +1953,17 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetListtabPos( pArr0to2[5] );
aFmt.SetIndentAt( pArr0to2[5] );
}
- // <--
+
pNewRule->Set( 2, aFmt );
aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
aFmt.SetCharFmt( pBullCFmt );
- // --> OD 2006-06-29 #6440955#
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
- // <--
aFmt.SetBulletChar( cBulletChar );
sal_uInt16 nOffs = GetMetricVal( CM_01 ) * 4,
nOffs2 = GetMetricVal( CM_1 ) * 2;
- // --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetFirstLineOffset( - nOffs );
@@ -2013,12 +1972,12 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
{
aFmt.SetFirstLineIndent( - nOffs );
}
- // <--
+
aFmt.SetSuffix( aEmptyStr );
for( n = 3; n < MAXLEVEL; ++n )
{
aFmt.SetStart( n+1 );
- // --> OD 2008-02-11 #newlistlevelattrs#
+
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetAbsLSpace( nOffs2 + ((n-3) * nOffs) );
@@ -2028,7 +1987,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetListtabPos( nOffs2 + ((n-3) * nOffs) );
aFmt.SetIndentAt( nOffs2 + ((n-3) * nOffs) );
}
- // <--
+
pNewRule->Set( n, aFmt );
}
}
@@ -2037,16 +1996,13 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
case RES_POOLNUMRULE_BUL1:
{
SwNumFmt aFmt;
- // --> OD 2008-02-11 #newlistlevelattrs#
+
aFmt.SetPositionAndSpaceMode( eNumberFormatPositionAndSpaceMode );
- // <--
aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
aFmt.SetCharFmt( pBullCFmt );
aFmt.SetStart( 1 );
aFmt.SetIncludeUpperLevels( 1 );
- // --> OD 2006-06-29 #6440955#
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
- // <--
aFmt.SetBulletChar( cBulletChar );
static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
@@ -2067,7 +2023,6 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
const sal_uInt16* pArr = aAbsSpace;
#endif
- // --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetFirstLineOffset( - (*pArr) );
@@ -2077,10 +2032,9 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
aFmt.SetFirstLineIndent( - (*pArr) );
}
- // <--
+
for( n = 0; n < MAXLEVEL; ++n, ++pArr )
{
- // --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetAbsLSpace( *pArr );
@@ -2090,7 +2044,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetListtabPos( *pArr );
aFmt.SetIndentAt( *pArr );
}
- // <--
+
pNewRule->Set( n, aFmt );
}
}
@@ -2098,16 +2052,13 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
case RES_POOLNUMRULE_BUL2:
{
SwNumFmt aFmt;
- // --> OD 2008-02-11 #newlistlevelattrs#
+
aFmt.SetPositionAndSpaceMode( eNumberFormatPositionAndSpaceMode );
- // <--
aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
aFmt.SetCharFmt( pBullCFmt );
aFmt.SetStart( 1 );
aFmt.SetIncludeUpperLevels( 1 );
- // --> OD 2006-06-29 #6440955#
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
- // <--
aFmt.SetBulletChar( 0x2013 );
static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
@@ -2128,7 +2079,6 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
const sal_uInt16* pArr = aAbsSpace;
#endif
- // --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetFirstLineOffset( - (*pArr) );
@@ -2138,10 +2088,9 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
aFmt.SetFirstLineIndent( - (*pArr) );
}
- // <--
+
for( n = 0; n < MAXLEVEL; ++n, ++pArr )
{
- // --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetAbsLSpace( *pArr );
@@ -2151,7 +2100,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetListtabPos( *pArr );
aFmt.SetIndentAt( *pArr );
}
- // <--
+
pNewRule->Set( n, aFmt );
}
}
@@ -2159,19 +2108,17 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
case RES_POOLNUMRULE_BUL3:
{
SwNumFmt aFmt;
- // --> OD 2008-02-11 #newlistlevelattrs#
+
aFmt.SetPositionAndSpaceMode( eNumberFormatPositionAndSpaceMode );
- // <--
+
aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
aFmt.SetCharFmt( pBullCFmt );
aFmt.SetStart( 1 );
aFmt.SetIncludeUpperLevels( 1 );
- // --> OD 2006-06-29 #6440955#
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
- // <--
sal_uInt16 nOffs = GetMetricVal( CM_01 ) * 4;
- // --> OD 2008-02-11 #newlistlevelattrs#
+
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetFirstLineOffset( - nOffs );
@@ -2181,12 +2128,11 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
aFmt.SetFirstLineIndent( - nOffs );
}
- // <--
for( n = 0; n < MAXLEVEL; ++n )
{
aFmt.SetBulletChar( ( n & 1 ? 0x25a1 : 0x2611 ) );
- // --> OD 2008-02-11 #newlistlevelattrs#
+
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetAbsLSpace( ((n & 1) +1) * nOffs );
@@ -2196,7 +2142,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetListtabPos( ((n & 1) +1) * nOffs );
aFmt.SetIndentAt( ((n & 1) +1) * nOffs );
}
- // <--
+
pNewRule->Set( n, aFmt );
}
}
@@ -2204,16 +2150,13 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
case RES_POOLNUMRULE_BUL4:
{
SwNumFmt aFmt;
- // --> OD 2008-02-11 #newlistlevelattrs#
+
aFmt.SetPositionAndSpaceMode( eNumberFormatPositionAndSpaceMode );
- // <--
aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
aFmt.SetCharFmt( pBullCFmt );
aFmt.SetStart( 1 );
aFmt.SetIncludeUpperLevels( 1 );
- // --> OD 2006-06-29 #6440955#
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
- // <--
static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
@@ -2233,7 +2176,6 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
const sal_uInt16* pArr = aAbsSpace;
#endif
- // --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetFirstLineOffset( - (*pArr) );
@@ -2243,7 +2185,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetLabelFollowedBy( SvxNumberFormat::SPACE );
aFmt.SetFirstLineIndent( - (*pArr) );
}
- // <--
+
for( n = 0; n < MAXLEVEL; ++n, ++pArr )
{
switch( n )
@@ -2252,7 +2194,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
case 1: aFmt.SetBulletChar( 0xE006 ); break;
default: aFmt.SetBulletChar( 0xE004 ); break;
}
- // --> OD 2008-02-11 #newlistlevelattrs#
+
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetAbsLSpace( *pArr );
@@ -2262,7 +2204,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetListtabPos( *pArr );
aFmt.SetIndentAt( *pArr );
}
- // <--
+
pNewRule->Set( n, aFmt );
}
}
@@ -2270,17 +2212,14 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
case RES_POOLNUMRULE_BUL5:
{
SwNumFmt aFmt;
- // --> OD 2008-02-11 #newlistlevelattrs#
+
aFmt.SetPositionAndSpaceMode( eNumberFormatPositionAndSpaceMode );
- // <--
aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
aFmt.SetCharFmt( pBullCFmt );
aFmt.SetStart( 1 );
aFmt.SetIncludeUpperLevels( 1 );
aFmt.SetBulletChar( 0x2717 );
- // --> OD 2006-06-29 #6440955#
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
- // <--
static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
@@ -2300,7 +2239,6 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
const sal_uInt16* pArr = aAbsSpace;
#endif
- // --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetFirstLineOffset( - (*pArr) );
@@ -2310,10 +2248,9 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
aFmt.SetFirstLineIndent( - (*pArr) );
}
- // <--
+
for( n = 0; n < MAXLEVEL; ++n, ++pArr )
{
- // --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
aFmt.SetAbsLSpace( *pArr );
@@ -2323,7 +2260,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
aFmt.SetListtabPos( *pArr );
aFmt.SetIndentAt( *pArr );
}
- // <--
+
pNewRule->Set( n, aFmt );
}
}
@@ -2339,7 +2276,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
// benutzt wird
bool SwDoc::IsPoolPageDescUsed( sal_uInt16 nId ) const
{
- ASSERT( RES_POOLPAGE_BEGIN <= nId && nId < RES_POOLPAGE_END,
+ OSL_ENSURE( RES_POOLPAGE_BEGIN <= nId && nId < RES_POOLPAGE_END,
"Falsche AutoFormat-Id" );
SwPageDesc *pNewPgDsc = 0;
sal_Bool bFnd = sal_False;
@@ -2372,36 +2309,6 @@ sal_Bool SwDoc::IsUsed( const SwModify& rModify ) const
// erfrage ob die NumRule benutzt wird
sal_Bool SwDoc::IsUsed( const SwNumRule& rRule ) const
{
- // --> OD 2008-03-04 #refactorlists#
-// // dann teste mal, ob es abhaengige ContentNodes im Nodes Array gibt
-// // (auch indirekte fuer Format-Ableitung! )
-// sal_Bool bUsed = sal_False;
-// SwAutoFmtGetDocNode aGetHt( &aNodes );
-// SwModify* pMod;
-// const SfxPoolItem* pItem;
-// sal_uInt16 i, nMaxItems = GetAttrPool().GetItemCount( RES_PARATR_NUMRULE);
-// for( i = 0; i < nMaxItems; ++i )
-// {
-// if( 0 != (pItem = GetAttrPool().GetItem( RES_PARATR_NUMRULE, i ) ) &&
-// 0 != ( pMod = (SwModify*)((SwNumRuleItem*)pItem)->GetDefinedIn()) &&
-// ((SwNumRuleItem*)pItem)->GetValue().Len() &&
-// ((SwNumRuleItem*)pItem)->GetValue() == rRule.GetName() )
-// {
-// if( pMod->IsA( TYPE( SwFmt )) )
-// {
-// bUsed = !pMod->GetInfo( aGetHt );
-// if( bUsed )
-// break;
-// }
-// else if( ((SwTxtNode*)pMod)->GetNodes().IsDocNodes() )
-// {
-// bUsed = sal_True;
-// break;
-// }
-// }
-// }
-
-// return bUsed;
sal_Bool bUsed = rRule.GetTxtNodeListSize() > 0 ||
rRule.GetParagraphStyleListSize() > 0;
@@ -2413,7 +2320,7 @@ sal_Bool SwDoc::IsUsed( const SwNumRule& rRule ) const
// dann fuege neu ein
sal_uInt16 SwDoc::SetDocPattern( const String& rPatternName )
{
- ASSERT( rPatternName.Len(), "kein Dokument-Vorlagenname" );
+ OSL_ENSURE( rPatternName.Len(), "kein Dokument-Vorlagenname" );
sal_uInt16 nNewPos = aPatternNms.Count();
for( sal_uInt16 n = 0; n < aPatternNms.Count(); ++n )
@@ -2563,13 +2470,13 @@ sal_uInt16 GetPoolParent( sal_uInt16 nId )
void SwDoc::RemoveAllFmtLanguageDependencies()
{
- /* #106748# Restore the language independ pool defaults and styles. */
+ /* Restore the language independ pool defaults and styles. */
GetAttrPool().ResetPoolDefaultItem( RES_PARATR_ADJUST );
SwTxtFmtColl * pTxtFmtColl = GetTxtCollFromPool( RES_POOLCOLL_STANDARD );
pTxtFmtColl->ResetFmtAttr( RES_PARATR_ADJUST );
- /* #111214# koreans do not like SvxScriptItem(sal_True) */
+ /* koreans do not like SvxScriptItem(TRUE) */
pTxtFmtColl->ResetFmtAttr( RES_PARATR_SCRIPTSPACE );
SvxFrameDirectionItem aFrameDir( FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR );
@@ -2582,10 +2489,12 @@ void SwDoc::RemoveAllFmtLanguageDependencies()
rDesc.GetLeft().SetFmtAttr( aFrameDir );
}
- // OD 09.10.2003 #i18732# - restore static pool default for item
+ // #i18732# - restore static pool default for item
// RES_FOLLOW_TEXT_FLOW.
GetAttrPool().ResetPoolDefaultItem( RES_FOLLOW_TEXT_FLOW );
//#i16874# AutoKerning as default for new documents
GetAttrPool().ResetPoolDefaultItem( RES_CHRATR_AUTOKERN );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/sortopt.cxx b/sw/source/core/doc/sortopt.cxx
index e845ec6f6897..eaee0fddd513 100644
--- a/sw/source/core/doc/sortopt.cxx
+++ b/sw/source/core/doc/sortopt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,13 +34,11 @@
#include <i18npool/lang.h>
#include <sortopt.hxx>
-
SV_IMPL_PTRARR(SwSortKeys, SwSortKey*)
/*--------------------------------------------------------------------
Beschreibung: Sortier-Schluessel
--------------------------------------------------------------------*/
-
SwSortKey::SwSortKey() :
eSortOrder( SRT_ASCENDING ),
nColumnId( 0 ),
@@ -55,7 +54,6 @@ SwSortKey::SwSortKey(sal_uInt16 nId, const String& rSrtType, SwSortOrder eOrder)
{
}
-
SwSortKey::SwSortKey(const SwSortKey& rOld) :
sSortType( rOld.sSortType ),
eSortOrder( rOld.eSortOrder ),
@@ -67,8 +65,6 @@ SwSortKey::SwSortKey(const SwSortKey& rOld) :
/*--------------------------------------------------------------------
Beschreibung: Sortieroptionen fuers Sortieren
--------------------------------------------------------------------*/
-
-
SwSortOptions::SwSortOptions()
: eDirection( SRT_ROWS ),
cDeli( 9 ),
@@ -78,7 +74,6 @@ SwSortOptions::SwSortOptions()
{
}
-
SwSortOptions::SwSortOptions(const SwSortOptions& rOpt) :
eDirection( rOpt.eDirection ),
cDeli( rOpt.cDeli ),
@@ -93,11 +88,9 @@ SwSortOptions::SwSortOptions(const SwSortOptions& rOpt) :
}
}
-
SwSortOptions::~SwSortOptions()
{
aKeys.DeleteAndDestroy(0, aKeys.Count());
}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx
index 7903bffa2309..3359f1d9385a 100644
--- a/sw/source/core/doc/swserv.cxx
+++ b/sw/source/core/doc/swserv.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,9 +42,7 @@
#include <bookmrk.hxx>
#include <pam.hxx>
#include <shellio.hxx>
-#ifndef _SWERROR_H
#include <swerror.h>
-#endif
using namespace ::com::sun::star;
@@ -163,10 +162,6 @@ void SwServerObject::SendDataChanged( const SwPosition& rPos )
SvLinkSource::NotifyDataChanged();
}
}
- // sonst melden wir uns ab !!
-// ????? JP 27.06.95: geht das so ????
-// else
-// Closed();
}
@@ -206,10 +201,6 @@ void SwServerObject::SendDataChanged( const SwPaM& rRange )
SvLinkSource::NotifyDataChanged();
}
}
- // sonst melden wir uns ab !!
-// ????? JP 27.06.95: geht das so ????
-// else
-// Closed();
}
@@ -260,10 +251,6 @@ sal_Bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
// um Rekursionen zu Verhindern: ServerType umsetzen!
SwServerObject::ServerModes eSave = eType;
if( !pChkLnk )
-// sowas sollte man nicht tun, wer weiss schon, wie gross ein enum ist
-// ICC nimmt keinen int
-// #41723#
-// *((int*)&eType) = SECTION_SERVER+1;
((SwServerObject*)this)->eType = NONE_SERVER;
for( sal_uInt16 n = rLnks.Count(); n; )
{
@@ -369,3 +356,5 @@ SwDataChanged::~SwDataChanged()
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/swstylemanager.cxx b/sw/source/core/doc/swstylemanager.cxx
index ea8ba9366c75..ac67fd7fb89a 100644
--- a/sw/source/core/doc/swstylemanager.cxx
+++ b/sw/source/core/doc/swstylemanager.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include "swstylemanager.hxx"
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <svl/stylepool.hxx>
#include <doc.hxx>
#include <charfmt.hxx>
@@ -38,7 +39,7 @@
#include <swtypes.hxx>
#include <istyleaccess.hxx>
-typedef ::std::hash_map< const ::rtl::OUString,
+typedef ::boost::unordered_map< const ::rtl::OUString,
StylePool::SfxItemSet_Pointer_t,
::rtl::OUStringHash,
::std::equal_to< ::rtl::OUString > > SwStyleNameCache;
@@ -75,7 +76,6 @@ class SwStyleManager : public IStyleAccess
SwStyleCache *mpParaCache;
public:
- // --> OD 2008-03-07 #refactorlists#
// accept empty item set for ignorable paragraph items.
SwStyleManager( SfxItemSet* pIgnorableParagraphItems )
: aAutoCharPool(),
@@ -83,7 +83,6 @@ public:
mpCharCache(0),
mpParaCache(0)
{}
- // <--
virtual ~SwStyleManager();
virtual StylePool::SfxItemSet_Pointer_t getAutomaticStyle( const SfxItemSet& rSet,
IStyleAccess::SwAutoStyleFamily eFamily );
@@ -147,7 +146,7 @@ StylePool::SfxItemSet_Pointer_t SwStyleManager::getByName( const rtl::OUString&
{
// Ok, ok, it's allowed to ask for uncached styles (from UNO) but it should not be done
// during loading a document
- ASSERT( false, "Don't ask for uncached styles" );
+ OSL_ENSURE( false, "Don't ask for uncached styles" );
rpCache->addCompletePool( rAutoPool );
pStyle = rpCache->getByName( rName );
}
@@ -158,10 +157,8 @@ void SwStyleManager::getAllStyles( std::vector<StylePool::SfxItemSet_Pointer_t>
IStyleAccess::SwAutoStyleFamily eFamily )
{
StylePool& rAutoPool = eFamily == IStyleAccess::AUTO_STYLE_CHAR ? aAutoCharPool : aAutoParaPool;
- // --> OD 2008-03-07 #refactorlists#
// setup <StylePool> iterator, which skips unused styles and ignorable items
IStylePoolIteratorAccess *pIter = rAutoPool.createIterator( true, true );
- // <--
StylePool::SfxItemSet_Pointer_t pStyle = pIter->getNext();
while( pStyle.get() )
{
@@ -171,3 +168,5 @@ void SwStyleManager::getAllStyles( std::vector<StylePool::SfxItemSet_Pointer_t>
}
delete pIter;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/swstylemanager.hxx b/sw/source/core/doc/swstylemanager.hxx
index 4997ce5c0770..486d751ba8d1 100644
--- a/sw/source/core/doc/swstylemanager.hxx
+++ b/sw/source/core/doc/swstylemanager.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,11 +29,9 @@
#define _SWSTYLEMANAGER_HXX
class IStyleAccess;
-// --> OD 2008-03-07 #refactorlists#
class SfxItemSet;
-// <--
-// --> OD 2008-03-07 #refactorlists#
IStyleAccess *createStyleManager( SfxItemSet* pIgnorableParagraphItems = 0 );
-// <--
#endif //_SWSTYLEMANAGER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 647acfe9d9a4..9d16beb1b4d0 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,9 +41,7 @@
#include <unotools/pathoptions.hxx>
#include <sfx2/app.hxx>
#include <svx/dialmgr.hxx>
-#ifndef _SVX_DIALOGS_HRC
#include <svx/dialogs.hrc>
-#endif
#define READ_OLDVERS // erstmal noch alte Versionen lesen
#include <swtypes.hxx>
@@ -73,11 +72,11 @@ const sal_uInt16 AUTOFORMAT_DATA_ID_641 = 10002;
const sal_uInt16 AUTOFORMAT_ID_680DR14 = 10011;
const sal_uInt16 AUTOFORMAT_DATA_ID_680DR14 = 10012;
-// --- from 680/dr25 on: #21549# store strings as UTF-8
+// --- from 680/dr25 on: store strings as UTF-8
const sal_uInt16 AUTOFORMAT_ID_680DR25 = 10021;
const sal_uInt16 AUTOFORMAT_DATA_ID_680DR25 = 10022;
-// --- from DEV300/overline2 on: #5991# overline
+// --- from DEV300/overline2 on: overline
const sal_uInt16 AUTOFORMAT_ID_300OVRLN = 10031;
const sal_uInt16 AUTOFORMAT_DATA_ID_300OVRLN = 10032;
@@ -400,7 +399,7 @@ sal_Bool SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, s
if( 0 == rVersions.nNumFmtVersion )
{
sal_uInt16 eSys, eLge;
- // --- from 680/dr25 on: #21549# store strings as UTF-8
+ // --- from 680/dr25 on: store strings as UTF-8
CharSet eCharSet = (nVer >= AUTOFORMAT_ID_680DR25) ? RTL_TEXTENCODING_UTF8 : rStream.GetStreamCharSet();
rStream.ReadByteString( sNumFmtString, eCharSet )
>> eSys >> eLge;
@@ -486,7 +485,7 @@ sal_Bool SwBoxAutoFmt::Save( SvStream& rStream ) const
aRotateAngle.Store( rStream, aRotateAngle.GetVersion(SOFFICE_FILEFORMAT_40) );
aRotateMode.Store( rStream, aRotateMode.GetVersion(SOFFICE_FILEFORMAT_40) );
- // --- from 680/dr25 on: #21549# store strings as UTF-8
+ // --- from 680/dr25 on: store strings as UTF-8
rStream.WriteByteString( sNumFmtString, RTL_TEXTENCODING_UTF8 )
<< (sal_uInt16)eSysLanguage << (sal_uInt16)eNumFmtLanguage;
@@ -587,7 +586,7 @@ SwTableAutoFmt::~SwTableAutoFmt()
void SwTableAutoFmt::SetBoxFmt( const SwBoxAutoFmt& rNew, sal_uInt8 nPos )
{
- ASSERT( nPos < 16, "falscher Bereich" );
+ OSL_ENSURE( nPos < 16, "falscher Bereich" );
SwBoxAutoFmt* pFmt = aBoxAutoFmt[ nPos ];
if( pFmt ) // ist gesetzt -> kopieren
@@ -599,7 +598,7 @@ void SwTableAutoFmt::SetBoxFmt( const SwBoxAutoFmt& rNew, sal_uInt8 nPos )
const SwBoxAutoFmt& SwTableAutoFmt::GetBoxFmt( sal_uInt8 nPos ) const
{
- ASSERT( nPos < 16, "falscher Bereich" );
+ OSL_ENSURE( nPos < 16, "falscher Bereich" );
SwBoxAutoFmt* pFmt = aBoxAutoFmt[ nPos ];
if( pFmt ) // ist gesetzt -> kopieren
@@ -620,7 +619,7 @@ SwBoxAutoFmt& SwTableAutoFmt::UpdateFromSet( sal_uInt8 nPos,
UpdateFlags eFlags,
SvNumberFormatter* pNFmtr )
{
- ASSERT( nPos < 16, "falscher Bereich" );
+ OSL_ENSURE( nPos < 16, "falscher Bereich" );
SwBoxAutoFmt* pFmt = aBoxAutoFmt[ nPos ];
if( !pFmt ) // ist gesetzt -> kopieren
@@ -693,7 +692,7 @@ void SwTableAutoFmt::UpdateToSet( sal_uInt8 nPos, SfxItemSet& rSet,
rSet.Put( rChg.GetHeight() );
rSet.Put( rChg.GetWeight() );
rSet.Put( rChg.GetPosture() );
- // #103065# do not insert empty CJK font
+ // do not insert empty CJK font
const SvxFontItem& rCJKFont = rChg.GetCJKFont();
if( rCJKFont.GetStyleName().Len() )
{
@@ -708,7 +707,7 @@ void SwTableAutoFmt::UpdateToSet( sal_uInt8 nPos, SfxItemSet& rSet,
rSet.Put( rChg.GetWeight(), RES_CHRATR_CJK_WEIGHT );
rSet.Put( rChg.GetPosture(), RES_CHRATR_CJK_POSTURE );
}
- // #103065# do not insert empty CTL font
+ // do not insert empty CTL font
const SvxFontItem& rCTLFont = rChg.GetCTLFont();
if( rCTLFont.GetStyleName().Len() )
{
@@ -779,7 +778,7 @@ sal_Bool SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions
(AUTOFORMAT_DATA_ID_504 <= nVal && nVal <= AUTOFORMAT_DATA_ID)) )
{
sal_Bool b;
- // --- from 680/dr25 on: #21549# store strings as UTF-8
+ // --- from 680/dr25 on: store strings as UTF-8
CharSet eCharSet = (nVal >= AUTOFORMAT_ID_680DR25) ? RTL_TEXTENCODING_UTF8 : rStream.GetStreamCharSet();
rStream.ReadByteString( aName, eCharSet );
if( AUTOFORMAT_DATA_ID_552 <= nVal )
@@ -861,7 +860,7 @@ sal_Bool SwTableAutoFmt::Save( SvStream& rStream ) const
sal_uInt16 nVal = AUTOFORMAT_DATA_ID;
sal_Bool b;
rStream << nVal;
- // --- from 680/dr25 on: #21549# store strings as UTF-8
+ // --- from 680/dr25 on: store strings as UTF-8
rStream.WriteByteString( aName, RTL_TEXTENCODING_UTF8 );
rStream << nStrResId;
rStream << ( b = bInclFont );
@@ -998,7 +997,7 @@ sal_Bool SwTableAutoFmtTbl::Load( SvStream& rStream )
// rStream >> nFileVers;
if( rStream.Tell() != sal_uLong(nPos + nCnt) )
{
- ASSERT( !this, "Der Header enthaelt mehr/neuere Daten" );
+ OSL_ENSURE( !this, "Der Header enthaelt mehr/neuere Daten" );
rStream.Seek( nPos + nCnt );
}
rStream.SetStreamCharSet( (CharSet)nChrSet );
@@ -1080,9 +1079,7 @@ sal_Bool SwTableAutoFmtTbl::Save( SvStream& rStream ) const
rStream << nVal
<< (sal_uInt8)2 // Anzahl von Zeichen des Headers incl. diesem
<< (sal_uInt8)GetStoreCharSet( ::gsl_getSystemTextEncoding() );
-// << (sal_uInt8)4 // Anzahl von Zeichen des Headers incl. diesem
-// << (sal_uInt8)::GetSystemCharSet()
-// << (UNIT16)SOFFICE_FILEFORMAT_NOW;
+
bRet = 0 == rStream.GetError();
//-----------------------------------------------------------
@@ -1104,3 +1101,4 @@ sal_Bool SwTableAutoFmtTbl::Save( SvStream& rStream ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index 51e1d455beb5..d83bf854c645 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -142,7 +143,7 @@ namespace
for( sal_uInt16 nLine = 0; nLine < rBox.GetTabLines().Count(); ++nLine )
pStartLn = insertSubLine( rSubTable, *rBox.GetTabLines()[nLine],
pStartLn );
- ASSERT( pStartLn == pEndLn, "Sub line confusion" );
+ OSL_ENSURE( pStartLn == pEndLn, "Sub line confusion" );
}
else
{
@@ -507,19 +508,6 @@ namespace
if( pBox && pBox->getRowSpan() > 0 )
lcl_CpyBox( rSource, rInfo.mpCopy, rDstTbl, pBox,
sal_True, pUndo );
- /* Idea: If target cell is a covered cell, append content
- to master cell.
- sal_Bool bReplace = sal_True;
- if( pBox->getRowSpan() < 0 )
- {
- if( rInfo.mpCopy->getRowSpan() < 0 )
- continue;
- pBox = &pBox->FindStartOfRowSpan( rDstTbl );
- bReplace = sal_False;
- }
- lcl_CpyBox( rSource, rInfo.mpCopy, rDstTbl, pBox,
- bReplace, pUndo );
- */
}
}
}
@@ -541,7 +529,7 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
SwTable& rDstTbl, SwTableBox* pDstBox,
sal_Bool bDelCntnt, SwUndoTblCpyTbl* pUndo )
{
- ASSERT( ( !pCpyBox || pCpyBox->GetSttNd() ) && pDstBox->GetSttNd(),
+ OSL_ENSURE( ( !pCpyBox || pCpyBox->GetSttNd() ) && pDstBox->GetSttNd(),
"Keine inhaltstragende Box" );
SwDoc* pCpyDoc = rCpyTbl.GetFrmFmt()->GetDoc();
@@ -616,7 +604,6 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
}
if( pCNd &&
- /*RES_POOLCOLL_TABLE == */
RES_POOLCOLL_TABLE_HDLN !=
pCNd->GetFmtColl()->GetPoolFmtId() )
bReplaceColl = sal_False;
@@ -748,8 +735,6 @@ sal_Bool SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBox
return sal_True;
}
-// ---------------------------------------------------------------
-
// kopiere die Tabelle in diese.
// Kopiere alle Boxen einer Line in entsprechenden Boxen. Der alte Inhalt
// wird dabei geloescht.
@@ -757,8 +742,6 @@ sal_Bool SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBox
// Box einer "GrundLine".
// Ist auch keine Line mehr vorhanden, -> auch in die letzte Box
// einer "GrundLine"
-
-
sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
SwUndoTblCpyTbl* pUndo )
{
@@ -772,7 +755,7 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
SwTableBox* pMyBox = (SwTableBox*)GetTblBox(
rSttBox.GetNode().FindTableBoxStartNode()->GetIndex() );
- ASSERT( pMyBox, "Index steht nicht in dieser Tabelle in einer Box" );
+ OSL_ENSURE( pMyBox, "Index steht nicht in dieser Tabelle in einer Box" );
// loesche erstmal die Frames der Tabelle
_FndBox aFndBox( 0, 0 );
@@ -839,18 +822,17 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
return sal_True;
}
-
sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
SwUndoTblCpyTbl* pUndo )
{
- ASSERT( rSelBoxes.Count(), "Missing selection" )
+ OSL_ENSURE( rSelBoxes.Count(), "Missing selection" );
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
if( IsNewModel() || rCpyTbl.IsNewModel() )
return InsNewTable( rCpyTbl, rSelBoxes, pUndo );
- ASSERT( !rCpyTbl.IsTblComplex(), "Table too complex" )
+ OSL_ENSURE( !rCpyTbl.IsTblComplex(), "Table too complex" );
SwDoc* pDoc = GetFrmFmt()->GetDoc();
SwDoc* pCpyDoc = rCpyTbl.GetFrmFmt()->GetDoc();
@@ -926,7 +908,7 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
// es ist also Platz fuer das zu kopierende vorhanden, also
// fuege entsprechend neue Zeilen ein.
SwTableBox* pInsBox = pLastLn->GetTabBoxes()[ nSttBox ];
- ASSERT( pInsBox && pInsBox->GetSttNd(),
+ OSL_ENSURE( pInsBox && pInsBox->GetSttNd(),
"kein CntntBox oder steht nicht in dieser Tabelle" );
SwSelBoxes aBoxes;
@@ -1061,8 +1043,6 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
return sal_True;
}
-
-
sal_Bool _FndCntntBox( const SwTableBox*& rpBox, void* pPara )
{
SwTableBox* pBox = (SwTableBox*)rpBox;
@@ -1073,14 +1053,12 @@ sal_Bool _FndCntntBox( const SwTableBox*& rpBox, void* pPara )
return sal_True;
}
-
sal_Bool _FndCntntLine( const SwTableLine*& rpLine, void* pPara )
{
((SwTableLine*)rpLine)->GetTabBoxes().ForEach( &_FndCntntBox, pPara );
return sal_True;
}
-
// suche alle Inhaltstragenden-Boxen dieser Box
SwSelBoxes& SwTable::SelLineFromBox( const SwTableBox* pBox,
SwSelBoxes& rBoxes, sal_Bool bToTop ) const
@@ -1096,4 +1074,4 @@ SwSelBoxes& SwTable::SelLineFromBox( const SwTableBox* pBox,
return rBoxes;
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index e4a522ce2960..92676eb272ab 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,15 +73,11 @@ using namespace com::sun::star::uno;
using namespace ::com::sun::star;
-#ifndef DBG_UTIL
-#define CHECK_TABLE(t)
-#else
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 2
#define CHECK_TABLE(t) (t).CheckConsistency();
#else
#define CHECK_TABLE(t)
#endif
-#endif
typedef SwTableLine* SwTableLinePtr;
SV_DECL_PTRARR_SORT( SwSortTableLines, SwTableLinePtr, 16, 16 )
@@ -195,7 +192,7 @@ sal_Bool lcl_DelOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
typedef sal_Bool (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, sal_Bool );
-#if defined(DBG_UTIL) || defined( JP_DEBUG )
+#if OSL_DEBUG_LEVEL > 1
void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize );
@@ -221,8 +218,8 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize );
if ( pFrm && \
((SwRowFrm*)pFrm)->GetTabLine() == GetTabLines()[i] ) \
{ \
- ASSERT( pFrm->GetUpper()->IsTabFrm(), \
- "Table layout does not match table structure" ) \
+ OSL_ENSURE( pFrm->GetUpper()->IsTabFrm(), \
+ "Table layout does not match table structure" ); \
} \
} while ( 0 != ( pLast = aIter++ ) ); \
} \
@@ -236,7 +233,6 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize );
#endif
-
struct CR_SetLineHeight
{
SwSelBoxes aBoxes;
@@ -294,8 +290,6 @@ SV_IMPL_VARARR_SORT( _CpyTabFrms, _CpyTabFrm )
void lcl_DelCpyTabFrmFmts( _CpyTabFrm& rArr );
-// ---------------------------------------------------------------
-
struct _CpyPara
{
boost::shared_ptr< std::vector< std::vector< sal_uLong > > > pWidths;
@@ -339,7 +333,6 @@ struct _CpyPara
void SetBoxWidth( SwTableBox* pBox );
};
-
sal_Bool lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
@@ -401,7 +394,6 @@ sal_Bool lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
else
{
aFindFrm = pCpyPara->rTabFrmArr[ nFndPos ];
-// aFindFrm.pNewFrmFmt->Add( pBox );
pBox->ChgFrmFmt( (SwTableBoxFmt*)aFindFrm.pNewFrmFmt );
}
}
@@ -493,8 +485,6 @@ sal_Bool lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara )
return sal_True;
}
-//-----------------------------------------------------------
-
void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, sal_uInt16 nCpyCnt,
sal_Bool bBehind )
{
@@ -538,10 +528,9 @@ SwRowFrm* GetRowFrm( SwTableLine& rLine )
return 0;
}
-
sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind )
{
- ASSERT( rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
+ OSL_ENSURE( rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -581,8 +570,8 @@ sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 n
//Layout updaten
aFndBox.MakeFrms( *this );
- CHECKBOXWIDTH
- CHECKTABLELAYOUT
+ CHECKBOXWIDTH;
+ CHECKTABLELAYOUT;
bRes = sal_True;
}
@@ -597,7 +586,7 @@ sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 n
sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
sal_uInt16 nCnt, sal_Bool bBehind )
{
- ASSERT( pDoc && rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
+ OSL_ENSURE( pDoc && rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -682,8 +671,8 @@ sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
aFndBox.MakeNewFrms( *this, nCnt, bBehind );
}
- CHECKBOXWIDTH
- CHECKTABLELAYOUT
+ CHECKBOXWIDTH;
+ CHECKTABLELAYOUT;
SwChartDataProvider *pPCD = pDoc->GetChartDataProvider();
if (pPCD && nCnt)
@@ -728,7 +717,6 @@ sal_Bool _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara )
return sal_True;
}
-
sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt )
{
SwTableNode* pTblNd = (SwTableNode*)aSortCntBoxes[0]->GetSttNd()->FindTableNode();
@@ -782,13 +770,12 @@ sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt )
// TL_CHART2: need to inform chart of probably changed cell names
pDoc->UpdateCharts( GetFrmFmt()->GetName() );
- CHECKBOXWIDTH
- CHECKTABLELAYOUT
+ CHECKBOXWIDTH;
+ CHECKTABLELAYOUT;
return sal_True;
}
-
void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset,
sal_Bool bFirst, SwShareBoxFmts& rShareFmts );
@@ -1089,7 +1076,6 @@ void lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox,
}
}
-
sal_Bool SwTable::DeleteSel(
SwDoc* pDoc
,
@@ -1097,7 +1083,7 @@ sal_Bool SwTable::DeleteSel(
const SwSelBoxes* pMerged, SwUndo* pUndo,
const sal_Bool bDelMakeFrms, const sal_Bool bCorrBorder )
{
- ASSERT( pDoc, "No doc?" );
+ OSL_ENSURE( pDoc, "No doc?" );
SwTableNode* pTblNd = 0;
if( rBoxes.Count() )
{
@@ -1159,19 +1145,16 @@ sal_Bool SwTable::DeleteSel(
// TL_CHART2: now inform chart that sth has changed
pDoc->UpdateCharts( GetFrmFmt()->GetName() );
- CHECKTABLELAYOUT
- CHECK_TABLE( *this )
+ CHECKTABLELAYOUT;
+ CHECK_TABLE( *this );
return sal_True;
}
-
-// ---------------------------------------------------------------
-
sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt,
sal_Bool bSameHeight )
{
- ASSERT( pDoc && rBoxes.Count() && nCnt, "keine gueltigen Werte" );
+ OSL_ENSURE( pDoc && rBoxes.Count() && nCnt, "keine gueltigen Werte" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -1193,7 +1176,7 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
{
SwTableBox* pSelBox = *( rBoxes.GetData() + n );
const SwRowFrm* pRow = GetRowFrm( *pSelBox->GetUpper() );
- ASSERT( pRow, "wo ist der Frm von der SwTableLine?" )
+ OSL_ENSURE( pRow, "wo ist der Frm von der SwTableLine?" );
SWRECTFN( pRow )
pRowHeights[ n ] = (pRow->Frm().*fnRect->fnGetHeight)();
}
@@ -1207,7 +1190,7 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pSelBox = *( rBoxes.GetData() + n );
- ASSERT( pSelBox, "Box steht nicht in der Tabelle" );
+ OSL_ENSURE( pSelBox, "Box steht nicht in der Tabelle" );
// dann fuege in die Box nCnt neue Zeilen ein
SwTableLine* pInsLine = pSelBox->GetUpper();
@@ -1314,7 +1297,7 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
{
- ASSERT( pDoc && rBoxes.Count() && nCnt, "keine gueltigen Werte" );
+ OSL_ENSURE( pDoc && rBoxes.Count() && nCnt, "keine gueltigen Werte" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -1340,7 +1323,7 @@ sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nC
for( sal_uInt16 n = 0; n < aSelBoxes.Count(); ++n )
{
SwTableBox* pSelBox = *( aSelBoxes.GetData() + n );
- ASSERT( pSelBox, "Box steht nicht in der Tabelle" );
+ OSL_ENSURE( pSelBox, "Box steht nicht in der Tabelle" );
// We don't want to split small table cells into very very small cells
if( pSelBox->GetFrmFmt()->GetFrmSize().GetWidth()/( nCnt + 1 ) < 10 )
@@ -1422,8 +1405,6 @@ sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nC
return sal_True;
}
-// ---------------------------------------------------------------
-
/*
----------------------- >> MERGE << ------------------------
Algorithmus:
@@ -1438,7 +1419,6 @@ sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nC
----------------------- >> MERGE << ------------------------
*/
-
void lcl_CpyLines( sal_uInt16 nStt, sal_uInt16 nEnd,
SwTableLines& rLines,
SwTableBox* pInsBox,
@@ -1469,10 +1449,10 @@ void lcl_CalcWidth( SwTableBox* pBox )
{
// Annahme: jede Line in der Box ist gleich gross
SwFrmFmt* pFmt = pBox->ClaimFrmFmt();
- ASSERT( pBox->GetTabLines().Count(), "Box hat keine Lines" );
+ OSL_ENSURE( pBox->GetTabLines().Count(), "Box hat keine Lines" );
SwTableLine* pLine = pBox->GetTabLines()[0];
- ASSERT( pLine, "Box steht in keiner Line" );
+ OSL_ENSURE( pLine, "Box steht in keiner Line" );
long nWidth = 0;
for( sal_uInt16 n = 0; n < pLine->GetTabBoxes().Count(); ++n )
@@ -1485,8 +1465,6 @@ void lcl_CalcWidth( SwTableBox* pBox )
pFmt->ResetFmtAttr( RES_BOXATR_BEGIN, RES_BOXATR_END - 1 );
}
-
-
struct _InsULPara
{
SwTableNode* pTblNd;
@@ -1516,7 +1494,6 @@ struct _InsULPara
{ bUL_LR = sal_True; bUL = sal_False; if( pLine ) pInsLine = pLine; }
};
-
sal_Bool lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara )
{
_InsULPara* pULPara = (_InsULPara*)pPara;
@@ -1597,8 +1574,6 @@ sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
sal_uInt16 nLeft = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pLBx );
sal_uInt16 nRight = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pRBx );
-// if( ( nLeft && nRight+1 < pFndLn->GetTabBoxes().Count() ) ||
-// ( !nLeft && nRight+1 >= pFndLn->GetTabBoxes().Count() ) )
if( !nLeft || nRight == pFndLn->GetTabBoxes().Count() )
{
if( pULPara->bUL ) // Upper ?
@@ -1728,7 +1703,7 @@ sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
lcl_CalcWidth( pRMBox ); // bereche die Breite der Box
}
else {
- ASSERT( sal_False , "Was denn nun" );
+ OSL_ENSURE( sal_False, "Was denn nun" );
}
}
// Left/Right
@@ -1758,11 +1733,10 @@ sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
return sal_True;
}
-
sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
SwTableBox* pMergeBox, SwUndoTblMerge* pUndo )
{
- ASSERT( rBoxes.Count() && pMergeBox, "keine gueltigen Werte" );
+ OSL_ENSURE( rBoxes.Count() && pMergeBox, "keine gueltigen Werte" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -1869,8 +1843,6 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
return sal_True;
}
-// ---------------------------------------------------------------
-
void lcl_CheckRowSpan( SwTable &rTbl )
{
sal_uInt16 nLineCount = rTbl.GetTabLines().Count();
@@ -2225,11 +2197,11 @@ sal_Bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
{ // The copied line must not contain any row span attributes > 1
SwTableLine* pLine = rTblNd.GetTable().GetTabLines()[0];
sal_uInt16 nColCount = pLine->GetTabBoxes().Count();
- ASSERT( nColCount, "Empty Table Line" )
+ OSL_ENSURE( nColCount, "Empty Table Line" );
for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pTableBox = pLine->GetTabBoxes()[nCurrCol];
- ASSERT( pTableBox, "Missing Table Box" );
+ OSL_ENSURE( pTableBox, "Missing Table Box" );
pTableBox->setRowSpan( 1 );
}
}
@@ -2269,7 +2241,7 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
SwNodeIndex aIdx( rPos.nNode, -1 );
SwTableNode* pTblNd = aIdx.GetNode().FindTableNode();
aIdx++;
- ASSERT( pTblNd, "wo ist denn nun der TableNode?" );
+ OSL_ENSURE( pTblNd, "wo ist denn nun der TableNode?" );
pTblNd->GetTable().SetRowsToRepeat( GetRowsToRepeat() );
@@ -2279,7 +2251,7 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
// ist im neuen Dokument ueberhaupt der FeldTyp vorhanden ?
SwFieldType* pFldType = pInsDoc->InsertFldType(
*((SwDDETable*)this)->GetDDEFldType() );
- ASSERT( pFldType, "unbekannter FieldType" );
+ OSL_ENSURE( pFldType, "unbekannter FieldType" );
// tauschen am Node den Tabellen-Pointer aus
pNewTbl = new SwDDETable( *pNewTbl,
@@ -2377,10 +2349,6 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
return sal_True;
}
-
-
-// ---------------------------------------------------------------
-
// suche ab dieser Line nach der naechsten Box mit Inhalt
SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
@@ -2401,7 +2369,7 @@ SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
if( GetUpper() )
{
nFndPos = GetUpper()->GetTabLines().GetPos( pLine );
- ASSERT( USHRT_MAX != nFndPos, "Line nicht in der Tabelle" );
+ OSL_ENSURE( USHRT_MAX != nFndPos, "Line nicht in der Tabelle" );
// gibts eine weitere Line
if( nFndPos+1 >= GetUpper()->GetTabLines().Count() )
return GetUpper()->GetUpper()->FindNextBox( rTbl, GetUpper(), bOvrTblLns );
@@ -2452,7 +2420,7 @@ SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTbl,
if( GetUpper() )
{
nFndPos = GetUpper()->GetTabLines().GetPos( pLine );
- ASSERT( USHRT_MAX != nFndPos, "Line nicht in der Tabelle" );
+ OSL_ENSURE( USHRT_MAX != nFndPos, "Line nicht in der Tabelle" );
// gibts eine weitere Line
if( !nFndPos )
return GetUpper()->GetUpper()->FindPreviousBox( rTbl, GetUpper(), bOvrTblLns );
@@ -2504,7 +2472,6 @@ SwTableBox* SwTableBox::FindPreviousBox( const SwTable& rTbl,
bOvrTblLns );
}
-
sal_Bool lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* )
{
// in der HeadLine sind die Absaetze mit BedingtenVorlage anzupassen
@@ -2522,8 +2489,6 @@ sal_Bool lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* )
return sal_True;
}
-/* */
-
SwTwips lcl_GetDistance( SwTableBox* pBox, sal_Bool bLeft )
{
sal_Bool bFirst = sal_True;
@@ -2742,8 +2707,6 @@ sal_Bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
return sal_True;
}
-/* */
-
sal_Bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
SwTwips nDist, sal_Bool bCheck )
{
@@ -2827,7 +2790,7 @@ sal_Bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
}
else
{
- ASSERT( pBox->GetSttNd(), "Das muss eine EndBox sein!");
+ OSL_ENSURE( pBox->GetSttNd(), "Das muss eine EndBox sein!");
if( !rParam.bLeft && 3 != nCmp )
++n;
@@ -2926,8 +2889,8 @@ sal_Bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
rParam.bLeft ? ((nDist + nWidth / 2 ) <= rParam.nSide &&
(TBLFIX_CHGABS != rParam.nMode ||
(n < rBoxes.Count() &&
- (nDist + nWidth + rBoxes[ n+1 ]->
- GetFrmFmt()->GetFrmSize().GetWidth() / 2)
+ (nDist + nWidth + rBoxes[ n+1 ]->
+ GetFrmFmt()->GetFrmSize().GetWidth() / 2)
> rParam.nSide) ))
: (nDist + nWidth / 2 ) > rParam.nSide
)
@@ -2991,8 +2954,8 @@ sal_Bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
(rParam.bLeft ? ((nDist + nWidth / 2 ) <= rParam.nSide &&
(TBLFIX_CHGABS != rParam.nMode ||
(n < rBoxes.Count() &&
- (nDist + nWidth + rBoxes[ n+1 ]->
- GetFrmFmt()->GetFrmSize().GetWidth() / 2)
+ (nDist + nWidth + rBoxes[ n+1 ]->
+ GetFrmFmt()->GetFrmSize().GetWidth() / 2)
> rParam.nSide) ))
: (nDist + nWidth / 2 ) > rParam.nSide ))
{
@@ -3028,7 +2991,6 @@ sal_Bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
return sal_True;
}
-
// das Ergebnis des Positions Vergleiches
// POS_BEFORE, // Box liegt davor
// POS_BEHIND, // Box liegt dahinter
@@ -3037,7 +2999,6 @@ sal_Bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
// POS_EQUAL, // Box und Start/End sind gleich
// POS_OVERLAP_BEFORE, // Box ueberlappt den Start
// POS_OVERLAP_BEHIND // Box ueberlappt das Ende
-
SwComparePosition _CheckBoxInRange( sal_uInt16 nStt, sal_uInt16 nEnd,
sal_uInt16 nBoxStt, sal_uInt16 nBoxEnd )
{
@@ -3430,7 +3391,7 @@ sal_Bool lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
break;
default:
- ASSERT( !pBox, "hier sollte man nie hinkommen" );
+ OSL_ENSURE( !pBox, "hier sollte man nie hinkommen" );
break;
}
}
@@ -3483,8 +3444,6 @@ sal_Bool lcl_DelOtherBox( SwTableLine* , CR_SetBoxWidth& , SwTwips , sal_Bool )
return sal_True;
}
-/* */
-
void lcl_AjustLines( SwTableLine* pLine, CR_SetBoxWidth& rParam )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
@@ -3504,7 +3463,7 @@ void lcl_AjustLines( SwTableLine* pLine, CR_SetBoxWidth& rParam )
}
}
-#if defined(DBG_UTIL) || defined( JP_DEBUG )
+#if OSL_DEBUG_LEVEL > 1
void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize )
{
@@ -3524,10 +3483,7 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize )
if( Abs( nAktSize - nSize ) > ( COLFUZZY * rBoxes.Count() ) )
{
- DBG_ERROR( "Boxen der Line zu klein/gross" );
-#if defined( WNT ) && defined( JP_DEBUG )
- __asm int 3;
-#endif
+ OSL_FAIL( "Boxen der Line zu klein/gross" );
}
}
@@ -3562,7 +3518,7 @@ _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo,
{
_FndPara aPara( rParam.aBoxes, pFndBox );
rTbl.GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
- ASSERT( pFndBox->GetLines().Count(), "Wo sind die Boxen" );
+ OSL_ENSURE( pFndBox->GetLines().Count(), "Wo sind die Boxen" );
pFndBox->SetTableLines( rTbl );
if( ppUndo )
@@ -4072,7 +4028,6 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
return bRet;
}
-/* */
_FndBox* lcl_SaveInsDelData( CR_SetLineHeight& rParam, SwUndo** ppUndo,
SwTableSortBoxes& rTmpLst )
@@ -4080,7 +4035,7 @@ _FndBox* lcl_SaveInsDelData( CR_SetLineHeight& rParam, SwUndo** ppUndo,
// suche alle Boxen / Lines
SwTable& rTbl = rParam.pTblNd->GetTable();
- ASSERT( rParam.aBoxes.Count(), "ohne Boxen ist nichts zu machen!" );
+ OSL_ENSURE( rParam.aBoxes.Count(), "ohne Boxen ist nichts zu machen!" );
// loeschen der gesamten Tabelle verhindern
if( !rParam.bBigger && rParam.aBoxes.Count() ==
@@ -4094,7 +4049,7 @@ _FndBox* lcl_SaveInsDelData( CR_SetLineHeight& rParam, SwUndo** ppUndo,
{
_FndPara aPara( rParam.aBoxes, pFndBox );
rTbl.GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
- ASSERT( pFndBox->GetLines().Count(), "Wo sind die Boxen" );
+ OSL_ENSURE( pFndBox->GetLines().Count(), "Wo sind die Boxen" );
pFndBox->SetTableLines( rTbl );
if( ppUndo )
@@ -4113,7 +4068,7 @@ void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight,
sal_Bool bMinSize )
{
SwLayoutFrm* pLineFrm = GetRowFrm( rLine );
- ASSERT( pLineFrm, "wo ist der Frm von der SwTableLine?" );
+ OSL_ENSURE( pLineFrm, "wo ist der Frm von der SwTableLine?" );
SwFrmFmt* pFmt = rLine.ClaimFrmFmt();
@@ -4160,7 +4115,7 @@ sal_Bool lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
{
// anhand der alten Size die neue relative errechnen
SwLayoutFrm* pLineFrm = GetRowFrm( *pLine );
- ASSERT( pLineFrm, "wo ist der Frm von der SwTableLine?" );
+ OSL_ENSURE( pLineFrm, "wo ist der Frm von der SwTableLine?" );
SwTwips nRstHeight = CalcRowRstHeight( pLineFrm );
if( (nRstHeight + ROWFUZZY) < nDist )
bRet = sal_False;
@@ -4178,7 +4133,7 @@ sal_Bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
{
// anhand der alten Size die neue relative errechnen
SwLayoutFrm* pLineFrm = GetRowFrm( *pLine );
- ASSERT( pLineFrm, "wo ist der Frm von der SwTableLine?" );
+ OSL_ENSURE( pLineFrm, "wo ist der Frm von der SwTableLine?" );
if( TBLFIX_CHGPROP == rParam.nMode )
{
@@ -4195,7 +4150,7 @@ sal_Bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
if( TBLFIX_CHGPROP == rParam.nMode )
{
SwLayoutFrm* pLineFrm = GetRowFrm( *pLine );
- ASSERT( pLineFrm, "wo ist der Frm von der SwTableLine?" );
+ OSL_ENSURE( pLineFrm, "wo ist der Frm von der SwTableLine?" );
// aus der alten Size die neue relative errechnen
// Wird die selektierte Box groesser ueber den MaxSpace anpassen,
@@ -4404,8 +4359,7 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
pFndBox = ::lcl_SaveInsDelData( aParam, ppUndo, aTmpLst );
- // #110525# delete complete table when last row is
- // deleted
+ // delete complete table when last row is deleted
if( !bBigger &&
aParam.aBoxes.Count() == aSortCntBoxes.Count() )
{
@@ -4441,7 +4395,7 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
for( n = nStt; n < nEnd; ++n )
{
SwLayoutFrm* pLineFrm = GetRowFrm( *(*pLines)[ n ] );
- ASSERT( pLineFrm, "wo ist der Frm von der SwTableLine?" );
+ OSL_ENSURE( pLineFrm, "wo ist der Frm von der SwTableLine?" );
aParam.nMaxSpace += CalcRowRstHeight( pLineFrm );
aParam.nMaxHeight += pLineFrm->Frm().Height();
}
@@ -4569,8 +4523,6 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
return bRet;
}
-/* */
-
SwFrmFmt* SwShareBoxFmt::GetFormat( long nWidth ) const
{
SwFrmFmt *pRet = 0, *pTmp;
@@ -4642,10 +4594,6 @@ SwFrmFmt* SwShareBoxFmts::GetFormat( const SwFrmFmt& rFmt,
void SwShareBoxFmts::AddFormat( const SwFrmFmt& rOld, const SwFrmFmt& rNew )
{
- // wenn das Format nicht geshared ist, braucht es auch nicht in die
- // Liste aufgenommen werden. Denn es gibt keinen 2. der es sucht.
-//leider werden auch die CellFrms gefunden
-// if( !rOld.IsLastDepend() )
{
sal_uInt16 nPos;
SwShareBoxFmt* pEntry;
@@ -4660,6 +4608,7 @@ void SwShareBoxFmts::AddFormat( const SwFrmFmt& rOld, const SwFrmFmt& rNew )
pEntry->AddFormat( rNew );
}
}
+
void SwShareBoxFmts::ChangeFrmFmt( SwTableBox* pBox, SwTableLine* pLn,
SwFrmFmt& rFmt )
{
@@ -4767,4 +4716,4 @@ sal_Bool SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, sal_uInt16* pPos ) co
return sal_False;
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx
index b5ca141e1fa2..a39ced3f767e 100644
--- a/sw/source/core/doc/visiturl.cxx
+++ b/sw/source/core/doc/visiturl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -137,3 +138,4 @@ sal_Bool SwDoc::IsVisitedURL( const String& rURL ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/cancellablejob.cxx b/sw/source/core/docnode/cancellablejob.cxx
index e769949ab87c..ec32c602137f 100644
--- a/sw/source/core/docnode/cancellablejob.cxx
+++ b/sw/source/core/docnode/cancellablejob.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,3 +39,5 @@ void SAL_CALL CancellableJob::cancel() throw (com::sun::star::uno::RuntimeExcept
{
mrThread->join();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/cancellablejob.hxx b/sw/source/core/docnode/cancellablejob.hxx
index f2c26630bd81..d675159f757b 100644
--- a/sw/source/core/docnode/cancellablejob.hxx
+++ b/sw/source/core/docnode/cancellablejob.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,5 @@ private:
::rtl::Reference< ObservableThread > mrThread;
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/finalthreadmanager.cxx b/sw/source/core/docnode/finalthreadmanager.cxx
index f4cedbbf8cdb..ec1a4c63ad4f 100644
--- a/sw/source/core/docnode/finalthreadmanager.cxx
+++ b/sw/source/core/docnode/finalthreadmanager.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,10 +28,7 @@
#include "precompiled_sw.hxx"
#include <finalthreadmanager.hxx>
-#ifndef _OSL_THREAD_HXX_
#include <osl/thread.hxx>
-#endif
-#include <errhdl.hxx>
#include <pausethreadstarting.hxx>
#include <swthreadjoiner.hxx>
@@ -61,21 +59,16 @@ class CancelJobsThread : public osl::Thread
virtual ~CancelJobsThread() {}
void addJobs( std::list< css::uno::Reference< css::util::XCancellable > >& rJobs );
-
bool allJobsCancelled() const;
-
void stopWhenAllJobsCancelled();
private:
-
bool existJobs() const;
css::uno::Reference< css::util::XCancellable > getNextJob();
bool stopped() const;
-
virtual void SAL_CALL run();
-
mutable osl::Mutex maMutex;
std::list< css::uno::Reference< css::util::XCancellable > > maJobs;
@@ -144,9 +137,7 @@ void SAL_CALL CancelJobsThread::run()
{
css::uno::Reference< css::util::XCancellable > aJob( getNextJob() );
if ( aJob.is() )
- {
aJob->cancel();
- }
}
mbAllJobsCancelled = true;
@@ -180,22 +171,17 @@ class TerminateOfficeThread : public osl::Thread
}
virtual ~TerminateOfficeThread() {}
-
void StopOfficeTermination();
private:
-
virtual void SAL_CALL run();
virtual void SAL_CALL onTerminated();
-
bool OfficeTerminationStopped();
-
void PerformOfficeTermination();
osl::Mutex maMutex;
const CancelJobsThread& mrCancelJobsThread;
-
bool mbStopOfficeTermination;
css::uno::Reference< css::uno::XComponentContext > mxContext;
@@ -222,15 +208,11 @@ void SAL_CALL TerminateOfficeThread::run()
osl::MutexGuard aGuard(maMutex);
if ( mrCancelJobsThread.allJobsCancelled() )
- {
break;
- }
}
if ( !OfficeTerminationStopped() )
- {
PerformOfficeTermination();
- }
}
void TerminateOfficeThread::PerformOfficeTermination()
@@ -242,14 +224,14 @@ void TerminateOfficeThread::PerformOfficeTermination()
css::uno::UNO_QUERY );
if ( !xTasksSupplier.is() )
{
- ASSERT( false, "<TerminateOfficeThread::PerformOfficeTermination()> - no XFramesSupplier!" );
+ OSL_ENSURE( false, "<TerminateOfficeThread::PerformOfficeTermination()> - no XFramesSupplier!" );
return;
}
css::uno::Reference< css::container::XElementAccess > xList( xTasksSupplier->getFrames(), css::uno::UNO_QUERY );
if ( !xList.is() )
{
- ASSERT( false, "<TerminateOfficeThread::PerformOfficeTermination()> - no XElementAccess!" );
+ OSL_ENSURE( false, "<TerminateOfficeThread::PerformOfficeTermination()> - no XElementAccess!" );
return;
}
@@ -257,18 +239,14 @@ void TerminateOfficeThread::PerformOfficeTermination()
{
css::uno::Reference< css::frame::XDesktop > xDesktop( xTasksSupplier, css::uno::UNO_QUERY );
if ( xDesktop.is() && !OfficeTerminationStopped() )
- {
xDesktop->terminate();
- }
}
}
void SAL_CALL TerminateOfficeThread::onTerminated()
{
if ( OfficeTerminationStopped() )
- {
delete this;
- }
}
@@ -297,9 +275,7 @@ void FinalThreadManager::registerAsListenerAtDesktop()
css::uno::UNO_QUERY );
if ( xDesktop.is() )
- {
xDesktop->addTerminateListener( css::uno::Reference< css::frame::XTerminateListener >( static_cast< cppu::OWeakObject* >( this ), css::uno::UNO_QUERY ) );
- }
}
FinalThreadManager::~FinalThreadManager()
@@ -318,16 +294,14 @@ FinalThreadManager::~FinalThreadManager()
if ( !maThreads.empty() )
{
- ASSERT( false, "<FinalThreadManager::~FinalThreadManager()> - still registered jobs are existing -> perform cancellation" );
+ OSL_ENSURE( false, "<FinalThreadManager::~FinalThreadManager()> - still registered jobs are existing -> perform cancellation" );
cancelAllJobs();
}
if ( mpCancelJobsThread != 0 )
{
if ( !mpCancelJobsThread->allJobsCancelled() )
- {
- ASSERT( false, "<FinalThreadManager::~FinalThreadManager()> - cancellation of registered jobs not yet finished -> wait for its finish" );
- }
+ OSL_ENSURE( false, "<FinalThreadManager::~FinalThreadManager()> - cancellation of registered jobs not yet finished -> wait for its finish" );
mpCancelJobsThread->stopWhenAllJobsCancelled();
mpCancelJobsThread->join();
@@ -397,8 +371,6 @@ void SAL_CALL FinalThreadManager::cancelAllJobs() throw (css::uno::RuntimeExcept
mpCancelJobsThread = new CancelJobsThread( aThreads );;
if ( !mpCancelJobsThread->create() )
{
- // error handling
- // ASSERT( false, "<FinalThreadManager::cancelAllJobs()> - thread to cancel jobs can't be setup --> synchron cancellation of jobs" );
delete mpCancelJobsThread;
mpCancelJobsThread = 0;
while ( !aThreads.empty() )
@@ -409,9 +381,7 @@ void SAL_CALL FinalThreadManager::cancelAllJobs() throw (css::uno::RuntimeExcept
}
}
else
- {
mpCancelJobsThread->addJobs( aThreads );
- }
}
}
@@ -438,20 +408,16 @@ void SAL_CALL FinalThreadManager::queryTermination( const css::lang::EventObject
if ( mpTerminateOfficeThread != 0 )
{
if ( mpTerminateOfficeThread->isRunning() )
- {
mpTerminateOfficeThread->StopOfficeTermination(); // thread kills itself.
- }
else
- {
delete mpTerminateOfficeThread;
- }
+
mpTerminateOfficeThread = 0;
}
mpTerminateOfficeThread = new TerminateOfficeThread( *mpCancelJobsThread,
m_xContext );
if ( !mpTerminateOfficeThread->create() )
{
- // ASSERT( false, "FinalThreadManager::queryTermination(..) - thread to terminate office can't be started!" );
delete mpTerminateOfficeThread;
mpTerminateOfficeThread = 0;
}
@@ -480,30 +446,18 @@ void SAL_CALL FinalThreadManager::notifyTermination( const css::lang::EventObjec
if ( mpTerminateOfficeThread != 0 )
{
if ( mpTerminateOfficeThread->isRunning() )
- {
- // ASSERT( false, "<FinalThreadManager::notifyTermination()> - office termination thread still running!" );
mpTerminateOfficeThread->StopOfficeTermination(); // thread kills itself.
- }
else
- {
delete mpTerminateOfficeThread;
- }
+
mpTerminateOfficeThread = 0;
}
if ( !maThreads.empty() )
- {
- // ASSERT( false, "<FinalThreadManager::notifyTermination()> - still registered jobs are existing" );
cancelAllJobs();
- }
if ( mpCancelJobsThread != 0 )
{
- if ( !mpCancelJobsThread->allJobsCancelled() )
- {
- // ASSERT( false, "<FinalThreadManager::notifyTermination()> - cancellation of registered jobs not yet finished -> wait for its finish" );
- }
-
mpCancelJobsThread->stopWhenAllJobsCancelled();
mpCancelJobsThread->join();
delete mpCancelJobsThread;
@@ -547,3 +501,5 @@ namespace comp_FinalThreadManager {
}
} // closing component helper namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index 61e1f8eabeaa..2e73d1cb620b 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,15 +56,12 @@
#include <pagedesc.hxx>
#include <poolfmt.hxx>
#include <SwNodeNum.hxx>
-#ifndef DBG_UTIL
-#define CHECK_TABLE(t)
-#else
-#ifdef DEBUG
+
+#if OSL_DEBUG_LEVEL > 1
#define CHECK_TABLE(t) (t).CheckConsistency();
#else
#define CHECK_TABLE(t)
#endif
-#endif
namespace
{
@@ -119,11 +117,9 @@ namespace
nNdOff -= nDelCount;
xub_StrLen nCntntPos = rOrigPos.nContent.GetIndex();
- // --> OD, AMA 2008-07-07 #b6713815#
// Always adjust <nNode> at to be changed <SwPosition> instance <rChgPos>
rChgPos.nNode = nNdOff + rCpyStt.nNode.GetIndex();
if( !nNdOff )
- // <--
{
// dann nur den Content anpassen
if( nCntntPos > rOrigStt.nContent.GetIndex() )
@@ -255,7 +251,7 @@ SwCntntNode* SwTxtNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
// kopiere Attribute/Text
if( !pCpyAttrNd->HasSwAttrSet() )
// wurde ein AttrSet fuer die Numerierung angelegt, so loesche diesen!
- pTxtNd->ResetAllAttr();
+ pCpyAttrNd->ResetAllAttr();
// if Copy-Textnode unequal to Copy-Attrnode, then copy first
// the attributes into the new Node.
@@ -272,7 +268,7 @@ SwCntntNode* SwTxtNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
}
// ??? reicht das ??? was ist mit PostIts/Feldern/FeldTypen ???
- // --> OD 2008-11-18 #i96213# - force copy of all attributes
+ // #i96213# - force copy of all attributes
pCpyTxtNd->CopyText( pTxtNd, SwIndex( pCpyTxtNd ),
pCpyTxtNd->GetTxt().Len(), true );
// <--
@@ -360,7 +356,7 @@ sal_Bool lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara )
{
SwNodeIndex aNewIdx( *pCT->pTblNd,
rpBox->GetSttIdx() - pCT->nOldTblSttIdx );
- ASSERT( aNewIdx.GetNode().IsStartNode(), "Index nicht auf einem StartNode" );
+ OSL_ENSURE( aNewIdx.GetNode().IsStartNode(), "Index nicht auf einem StartNode" );
pNewBox = new SwTableBox( pBoxFmt, aNewIdx, pCT->pInsLine );
pNewBox->setRowSpan( rpBox->getRowSpan() );
}
@@ -416,17 +412,6 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
SwNodes& rNds = (SwNodes&)GetNodes();
{
- // nicht in Fussnoten kopieren !!
-/*
-!! Mal ohne Frames
- SwCntntNode* pCNd = pDoc->GetNodes()[ rIdx ]->GetCntntNode();
- SwFrm* pFrm;
- if( (pCNd && 0 != ( pFrm = pCNd->GetFrm()))
- ? pFrm->FindFtnFrm()
- : rIdx < pDoc->GetNodes().EndOfInserts &&
- pDoc->GetNodes()[pDoc->GetNodes().EndOfInserts]->StartOfSection()
- < rIdx )
-*/
if( rIdx < pDoc->GetNodes().GetEndOfInserts().GetIndex() &&
rIdx >= pDoc->GetNodes().GetEndOfInserts().StartOfSectionIndex() )
return 0;
@@ -468,7 +453,7 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
pDoc->InsDeletedFldType( *pDDEType );
else
pDDEType = (SwDDEFieldType*)pDoc->InsertFldType( *pDDEType );
- ASSERT( pDDEType, "unbekannter FieldType" );
+ OSL_ENSURE( pDDEType, "unbekannter FieldType" );
// tauschen am Node den Tabellen-Pointer aus
SwDDETable* pNewTable = new SwDDETable( pTblNd->GetTable(), pDDEType );
@@ -727,8 +712,8 @@ SwDoc::CopyRange( SwPaM& rPam, SwPosition& rPos, const bool bCopyAll ) const
}
else
{
- ASSERT( this == pDoc, " falscher Copy-Zweig!" );
- ASSERT(false, "mst: i thought this could be dead code;"
+ OSL_ENSURE( this == pDoc, " falscher Copy-Zweig!" );
+ OSL_ENSURE(false, "mst: i thought this could be dead code;"
"please tell me what you did to get here!");
pDoc->SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE));
@@ -827,7 +812,7 @@ bool lcl_MarksWholeNode(const SwPaM & rPam)
return bResult;
}
-// --> OD 2009-08-25 #i86492#
+// #i86492#
bool lcl_ContainsOnlyParagraphsInList( const SwPaM& rPam )
{
bool bRet = false;
@@ -899,6 +884,17 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
// die Position nicht "verschoben"
aCpyPam.SetMark();
sal_Bool bCanMoveBack = aCpyPam.Move( fnMoveBackward, fnGoCntnt );
+ // If the position was shifted from more than one node, an end node has been skipped
+ bool bAfterTable = false;
+ if ( ( rPos.nNode.GetIndex() - aCpyPam.GetPoint()->nNode.GetIndex() ) > 1 )
+ {
+ // First go back to the original place
+ aCpyPam.GetPoint()->nNode = rPos.nNode;
+ aCpyPam.GetPoint()->nContent = rPos.nContent;
+
+ bCanMoveBack = false;
+ bAfterTable = true;
+ }
if( !bCanMoveBack )
aCpyPam.GetPoint()->nNode--;
@@ -920,7 +916,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
pDoc->SetOutlineNumRule(*GetOutlineNumRule());
}
- // --> OD 2009-08-25 #i86492#
+ // #i86492#
// Correct the search for a previous list:
// First search for non-outline numbering list. Then search for non-outline
// bullet list.
@@ -934,7 +930,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
pDoc->SearchNumRule( rPos, false, false, false, 0, aListIdToPropagate, true );
}
// <--
- // --> OD 2009-08-25 #i86492#
+ // #i86492#
// Do not propagate previous found list, if
// - destination is an empty paragraph which is not in a list and
// - source contains at least one paragraph which is not in a list
@@ -1008,9 +1004,8 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
}
}
- /* #107213#: Safe numrule item at destination. */
- // --> OD 2009-08-25 #i86492#
- // Safe also <ListId> item of destination.
+ // Safe numrule item at destination.
+ // #i86492# - Safe also <ListId> item of destination.
int aNumRuleState = SFX_ITEM_UNKNOWN;
SwNumRuleItem aNumRuleItem;
int aListIdState = SFX_ITEM_UNKNOWN;
@@ -1033,7 +1028,6 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
}
}
// <--
- /* #107213# */
if( !bCopyOk )
{
@@ -1053,10 +1047,9 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
{
pSttTxtNd->CopyCollFmt( *pDestTxtNd );
- /* #107213# If only a part of one paragraph is copied
+ /* If only a part of one paragraph is copied
restore the numrule at the destination. */
- // --> OD 2009-08-25 #i86492#
- // restore also <ListId> item
+ // #i86492# - restore also <ListId> item
if ( !lcl_MarksWholeNode(rPam) )
{
if (SFX_ITEM_SET == aNumRuleState)
@@ -1148,7 +1141,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
aDestIdx.Assign( pDestTxtNd, 0 );
aInsPos--;
- // #112756# #98130# if we have to insert an extra text node
+ // if we have to insert an extra text node
// at the destination, this node will be our new destination
// (text) node, and thus we set bStartisTxtNode to true. This
// will ensure that this node will be deleted during Undo
@@ -1157,9 +1150,8 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
bStartIsTxtNode = sal_True;
}
- /* #107213# Save numrule at destination */
- // --> OD 2009-08-25 #i86492#
- // Safe also <ListId> item of destination.
+ // Save numrule at destination
+ // #i86492# - Safe also <ListId> item of destination.
int aNumRuleState = SFX_ITEM_UNKNOWN;
SwNumRuleItem aNumRuleItem;
int aListIdState = SFX_ITEM_UNKNOWN;
@@ -1182,7 +1174,6 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
}
}
// <--
- /* #107213# */
const bool bEmptyDestNd = 0 == pDestTxtNd->GetTxt().Len();
pEndTxtNd->CopyText( pDestTxtNd, aDestIdx, SwIndex( pEndTxtNd ),
@@ -1195,10 +1186,9 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
if ( bOneNode )
{
- /* #107213# If only a part of one paragraph is copied
+ /* If only a part of one paragraph is copied
restore the numrule at the destination. */
- // --> OD 2009-08-25 #i86492#
- // restore also <ListId> item
+ // #i86492# - restore also <ListId> item
if ( !lcl_MarksWholeNode(rPam) )
{
if (SFX_ITEM_SET == aNumRuleState)
@@ -1269,7 +1259,20 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
else
*aCpyPam.GetMark() = rPos;
- aCpyPam.Move( fnMoveForward, bCanMoveBack ? fnGoCntnt : fnGoNode );
+ if ( !bAfterTable )
+ aCpyPam.Move( fnMoveForward, bCanMoveBack ? fnGoCntnt : fnGoNode );
+ else
+ {
+ // Reset the offset to 0 as it was before the insertion
+ aCpyPam.GetPoint( )->nContent -= aCpyPam.GetPoint( )->nContent;
+
+ aCpyPam.GetPoint( )->nNode++;
+ // If the next node is a start node, then step back: the start node
+ // has been copied and needs to be in the selection for the undo
+ if ( aCpyPam.GetPoint()->nNode.GetNode().IsStartNode() )
+ aCpyPam.GetPoint( )->nNode--;
+
+ }
aCpyPam.Exchange();
// dann kopiere noch alle Bookmarks
@@ -1294,9 +1297,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
if ( pNumRuleToPropagate )
{
- // --> OD 2009-08-25 #i86492#
- // use <SwDoc::SetNumRule(..)>, because it also handles the <ListId>
-// pDoc->ReplaceNumRule(aCpyPam, *pNumRuleToPropagate);
+ // #i86492# - use <SwDoc::SetNumRule(..)>, because it also handles the <ListId>
pDoc->SetNumRule( aCpyPam, *pNumRuleToPropagate, false,
aListIdToPropagate, sal_True, true );
}
@@ -1327,7 +1328,7 @@ void SwDoc::CopyWithFlyInFly( const SwNodeRange& rRg, const xub_StrLen nEndConte
aRedlRest.Restore();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
{
//JP 17.06.99: Bug 66973 - check count only if the selection is in
// the same (or no) section. Becaus not full selected
@@ -1339,9 +1340,9 @@ void SwDoc::CopyWithFlyInFly( const SwNodeRange& rRg, const xub_StrLen nEndConte
!rRg.aStart.GetNode().IsSectionNode() &&
!aTmpI.GetNode().IsEndNode() )
{
- ASSERT( rInsPos.GetIndex() - aSavePos.GetIndex() ==
+ OSL_ENSURE( rInsPos.GetIndex() - aSavePos.GetIndex() ==
rRg.aEnd.GetIndex() - rRg.aStart.GetIndex(),
- "Es wurden zu wenig Nodes kopiert!" )
+ "Es wurden zu wenig Nodes kopiert!" );
}
}
#endif
@@ -1470,7 +1471,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
{
const _ZSortFly& rZSortFly = aArr[ n ];
- // --> OD 2006-01-04 #i59964#
+ // #i59964#
// correct determination of new anchor position
SwFmtAnchor aAnchor( *rZSortFly.GetAnchor() );
SwPosition* pNewPos = (SwPosition*)aAnchor.GetCntntAnchor();
@@ -1503,7 +1504,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
{
// This case can *not* happen, but to be robust take the first
// text node in the destination document.
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDoc::_CopyFlyInFly(..)> - anchor text node in copied range not found" );
nAnchorTxtNdNumInRange = 1;
}
@@ -1529,7 +1530,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
{
// This case can *not* happen, but to be robust take the first
// text node in the destination document.
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDoc::_CopyFlyInFly(..)> - found anchor node index isn't a text node" );
aAnchorNdIdx = rStartIdx;
while ( !aAnchorNdIdx.GetNode().IsTxtNode() )
@@ -1585,7 +1586,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
//Alle chains, die im Original vorhanden sind, soweit wie moeglich wieder
//aufbauen.
- ASSERT( aArr.Count() == aNewArr.Count(), "Missing new Flys" );
+ OSL_ENSURE( aArr.Count() == aNewArr.Count(), "Missing new Flys" );
if ( aArr.Count() == aNewArr.Count() )
{
for ( sal_uInt16 n = 0; n < aArr.Count(); ++n )
@@ -1618,3 +1619,4 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/ndindex.cxx b/sw/source/core/docnode/ndindex.cxx
index a6b718df2d09..3b064674d7bd 100644
--- a/sw/source/core/docnode/ndindex.cxx
+++ b/sw/source/core/docnode/ndindex.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,13 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
-#include "errhdl.hxx" // fuers ASSERT
-#include "error.h" // fuers ASSERT
#include "ndindex.hxx"
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
int SwNodeIndex::nSerial = 0;
#endif
@@ -68,7 +65,7 @@ SwNodeIndex::SwNodeIndex( SwNodes& rNds, sal_uLong nIdx )
{
rNds.RegisterIndex( *this );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
MySerial = ++nSerial; // nur in der nicht PRODUCT-Version
#endif
}
@@ -83,7 +80,7 @@ SwNodeIndex::SwNodeIndex( const SwNodeIndex& rIdx, long nDiff )
pNd = rIdx.pNd;
pNd->GetNodes().RegisterIndex( *this );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
MySerial = ++nSerial; // nur in der nicht PRODUCT-Version
#endif
}
@@ -98,7 +95,7 @@ SwNodeIndex::SwNodeIndex( const SwNode& rNd, long nDiff )
pNd = (SwNode*)&rNd;
pNd->GetNodes().RegisterIndex( *this );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
MySerial = ++nSerial; // nur in der nicht PRODUCT-Version
#endif
}
@@ -166,3 +163,4 @@ SwNodeIndex& SwNodeIndex::Assign( const SwNode& rNd, long nOffset )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx
index 6ad9605a18f2..c244e14267c4 100644
--- a/sw/source/core/docnode/ndnotxt.cxx
+++ b/sw/source/core/docnode/ndnotxt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,9 +46,7 @@
#include <istyleaccess.hxx>
#include <SwStyleNameMapper.hxx>
-// --> OD 2009-07-13 #i73249#
-#include <frmfmt.hxx>
-// <--
+#include <frmfmt.hxx> // #i73249#
SwNoTxtNode::SwNoTxtNode( const SwNodeIndex & rWhere,
const sal_uInt8 nNdType,
@@ -75,7 +74,7 @@ SwNoTxtNode::~SwNoTxtNode()
// fuer Frame- und Grafik-Attributen
void SwNoTxtNode::NewAttrSet( SwAttrPool& rPool )
{
- ASSERT( !mpAttrSet.get(), "AttrSet ist doch gesetzt" );
+ OSL_ENSURE( !mpAttrSet.get(), "AttrSet ist doch gesetzt" );
SwAttrSet aNewAttrSet( rPool, aNoTxtNodeSetRange );
// put names of parent style and conditional style:
@@ -120,7 +119,7 @@ void SwNoTxtNode::SetContour( const PolyPolygon *pPoly, sal_Bool bAutomatic )
void SwNoTxtNode::CreateContour()
{
- ASSERT( !pContour, "Contour available." );
+ OSL_ENSURE( !pContour, "Contour available." );
pContour = new PolyPolygon(SvxContourDlg::CreateAutoContour(GetGraphic()));
bAutomaticContour = sal_True;
bContourMapModeValid = sal_True;
@@ -136,7 +135,7 @@ const PolyPolygon *SwNoTxtNode::HasContour() const
const MapMode aContourMap( bPixelGrf ? MAP_PIXEL : MAP_100TH_MM );
if( bPixelGrf ? !bPixelContour : aGrfMap != aContourMap )
{
- ASSERT( !bPixelGrf || aGrfMap == aContourMap,
+ OSL_ENSURE( !bPixelGrf || aGrfMap == aContourMap,
"scale factor for pixel unsupported" );
OutputDevice* pOutDev =
(bPixelGrf || bPixelContour) ? Application::GetDefaultDevice()
@@ -170,7 +169,7 @@ const PolyPolygon *SwNoTxtNode::HasContour() const
void SwNoTxtNode::GetContour( PolyPolygon &rPoly ) const
{
- ASSERT( pContour, "Contour not available." );
+ OSL_ENSURE( pContour, "Contour not available." );
rPoly = *HasContour();
}
@@ -194,7 +193,7 @@ sal_Bool SwNoTxtNode::GetContourAPI( PolyPolygon &rContour ) const
{
const MapMode aGrfMap( GetGraphic().GetPrefMapMode() );
const MapMode aContourMap( MAP_100TH_MM );
- ASSERT( aGrfMap.GetMapUnit() != MAP_PIXEL ||
+ OSL_ENSURE( aGrfMap.GetMapUnit() != MAP_PIXEL ||
aGrfMap == MapMode( MAP_PIXEL ),
"scale factor for pixel unsupported" );
if( aGrfMap.GetMapUnit() != MAP_PIXEL &&
@@ -245,18 +244,18 @@ Graphic SwNoTxtNode::GetGraphic() const
}
else
{
- ASSERT( GetOLENode(), "new type of Node?" );
+ OSL_ENSURE( GetOLENode(), "new type of Node?" );
aRet = *((SwOLENode*)this)->SwOLENode::GetGraphic();
}
return aRet;
}
-// --> OD 2009-07-14 #i73249#
+// #i73249#
void SwNoTxtNode::SetTitle( const String& rTitle, bool bBroadcast )
{
// Title attribute of <SdrObject> replaces own AlternateText attribute
SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(GetFlyFmt());
- ASSERT( pFlyFmt,
+ OSL_ENSURE( pFlyFmt,
"<SwNoTxtNode::SetTitle(..)> - missing <SwFlyFrmFmt> instance" );
if ( !pFlyFmt )
{
@@ -269,7 +268,7 @@ void SwNoTxtNode::SetTitle( const String& rTitle, bool bBroadcast )
const String SwNoTxtNode::GetTitle() const
{
const SwFlyFrmFmt* pFlyFmt = dynamic_cast<const SwFlyFrmFmt*>(GetFlyFmt());
- ASSERT( pFlyFmt,
+ OSL_ENSURE( pFlyFmt,
"<SwNoTxtNode::GetTitle(..)> - missing <SwFlyFrmFmt> instance" );
if ( !pFlyFmt )
{
@@ -282,7 +281,7 @@ const String SwNoTxtNode::GetTitle() const
void SwNoTxtNode::SetDescription( const String& rDescription, bool bBroadcast )
{
SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(GetFlyFmt());
- ASSERT( pFlyFmt,
+ OSL_ENSURE( pFlyFmt,
"<SwNoTxtNode::SetDescription(..)> - missing <SwFlyFrmFmt> instance" );
if ( !pFlyFmt )
{
@@ -295,7 +294,7 @@ void SwNoTxtNode::SetDescription( const String& rDescription, bool bBroadcast )
const String SwNoTxtNode::GetDescription() const
{
const SwFlyFrmFmt* pFlyFmt = dynamic_cast<const SwFlyFrmFmt*>(GetFlyFmt());
- ASSERT( pFlyFmt,
+ OSL_ENSURE( pFlyFmt,
"<SwNoTxtNode::GetDescription(..)> - missing <SwFlyFrmFmt> instance" );
if ( !pFlyFmt )
{
@@ -305,3 +304,5 @@ const String SwNoTxtNode::GetDescription() const
return pFlyFmt->GetObjDescription();
}
// <--
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/ndnum.cxx b/sw/source/core/docnode/ndnum.cxx
index 6e00748b618e..4ff342d9570c 100644
--- a/sw/source/core/docnode/ndnum.cxx
+++ b/sw/source/core/docnode/ndnum.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,13 +48,13 @@ sal_Bool SwOutlineNodes::Seek_Entry( const SwNodePtr rSrch, sal_uInt16* pFndPos
//JP 17.03.98: aufgrund des Bug 48592 - wo unter anderem nach Undo/Redo
// Nodes aus dem falschen NodesArray im OutlineArray standen,
// jetzt mal einen Check eingebaut.
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
{
for( sal_uInt16 n = 1; n < nO; ++n )
if( &(*this)[ n-1 ]->GetNodes() !=
&(*this)[ n ]->GetNodes() )
{
- ASSERT( !this, "Node im falschen Outline-Array" );
+ OSL_ENSURE( !this, "Node im falschen Outline-Array" );
}
}
#endif
@@ -97,7 +98,6 @@ void SwNodes::UpdateOutlineNode(SwNode & rNd)
{
if (! bFound)
{
- // --> OD 2005-11-02 #125329#
// assure that text is in the correct nodes array
if ( &(pTxtNd->GetNodes()) == this )
{
@@ -105,10 +105,9 @@ void SwNodes::UpdateOutlineNode(SwNode & rNd)
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwNodes::UpdateOutlineNode(..)> - given text node isn't in the correct nodes array. This is a serious defect -> inform OD" );
}
- // <--
}
}
else
@@ -124,83 +123,6 @@ void SwNodes::UpdateOutlineNode(SwNode & rNd)
}
}
-//void SwNodes::UpdateOutlineNode( const SwNode& rNd, sal_uInt8 nOldLevel, //#outline level,removed by zhaojianwei
-// sal_uInt8 nNewLevel )
-//{
-// const SwNodePtr pSrch = (SwNodePtr)&rNd;
-// sal_uInt16 nSttPos;
-// sal_Bool bSeekIdx = pOutlineNds->Seek_Entry( pSrch, &nSttPos );
-//
-// //if( NO_NUMBERING == nOldLevel ) //#outline level,zhaojianwei
-// if( 0 == nOldLevel ) //<-end, zhaojianwei
-// {
-// // nicht vorhanden, also einfuegen
-// //ASSERT( !bSeekIdx, "Der Node ist schon als OutlineNode vorhanden" );
-//
-// //JP 12.03.99: 63293 - Nodes vom RedlineBereich NIE aufnehmen
-// sal_uLong nNd = rNd.GetIndex();
-// if( nNd < GetEndOfRedlines().GetIndex() &&
-// nNd > GetEndOfRedlines().StartOfSectionNode()->GetIndex() )
-// return ;
-//
-// // jetzt noch alle nachfolgende Outline-Nodes updaten
-// if (! bSeekIdx)
-// {
-// // --> OD 2005-11-03 #125329#
-// // assure that node <pSrch> is in the correct nodes array
-// if ( &(pSrch->GetNodes()) == this )
-// {
-// pOutlineNds->Insert( pSrch );
-// }
-// else
-// {
-// ASSERT( false,
-// "<SwNodes::UpdateOutlineNode(..)> - node <pSrch> isn't in correct nodes array. This is a serious defect -> inform OD" );
-// }
-// // <--
-// }
-//
-// }
-// //else if( NO_NUMBERING == nNewLevel ) //#outline level,removed by zhaojianwei
-// else if( 0 == nNewLevel ) //<-end,added by zhaojianwei // Level entfernen
-// {
-// if( !bSeekIdx )
-// return;
-//
-// // jetzt noch alle nachfolgende Outline-Nodes updaten
-// pOutlineNds->Remove( nSttPos );
-// }
-// else if( !bSeekIdx ) // Update und Index nicht gefunden ??
-// return ;
-//
-// {
-// SwTxtNode & rTxtNd = (SwTxtNode &) rNd;
-// SwPaM aPam(rTxtNd); // #115901#
-//
-// //if (nNewLevel != NO_NUMBERING) //#outline level,zhaojianwei // #115901#
-// if (nNewLevel != 0) //<-end,zhaojianwei // #115901#
-// {
-// //rTxtNd.SetLevel(rTxtNd.GetTxtColl()->GetOutlineLevel()); //#outline level,zhaojianwei
-// //rTxtNd.NumRuleChgd();
-// if(rTxtNd.GetTxtColl()->IsAssignedToListLevelOfOutlineStyle())
-// {
-// rTxtNd.SetLevel(rTxtNd.GetTxtColl()->GetAssignedOutlineStyleLevel());
-// rTxtNd.NumRuleChgd();
-// }//<-end,zhaojianwei
-//
-// //GetDoc()->SetNumRule(aPam, *GetDoc()->GetOutlineNumRule());
-// }
-// else
-// {
-// GetDoc()->DelNumRules(aPam);
-// }
-// }
-//
-// // die Gliederungs-Felder Updaten
-// GetDoc()->GetSysFldType( RES_CHAPTERFLD )->UpdateFlds();
-// GetDoc()->ChkCondColls();
-//}//<-end,zhaojianwei
-
void SwNodes::UpdtOutlineIdx( const SwNode& rNd )
{
if( !pOutlineNds->Count() ) // keine OutlineNodes vorhanden ?
@@ -223,3 +145,5 @@ const SwOutlineNodes & SwNodes::GetOutLineNds() const
{
return *pOutlineNds;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index d61ad4f0b763..95d85a36d5fd 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,13 +62,13 @@
#include <doctxm.hxx>
#include <fmtftntx.hxx>
#include <comcore.hrc>
-// --> OD 2005-12-01 #i27138#
+// #i27138#
#include <viewsh.hxx>
#include <txtfrm.hxx>
// <--
-// OD 04.11.2003 #i21457# - new implementation of local method <lcl_IsInSameTblBox(..)>.
+// #i21457# - new implementation of local method <lcl_IsInSameTblBox(..)>.
// Method now determines the previous/next on its own. Thus, it can be controlled,
// for which previous/next is checked, if it's visible.
bool lcl_IsInSameTblBox( SwNodes& _rNds,
@@ -94,7 +95,7 @@ bool lcl_IsInSameTblBox( SwNodes& _rNds,
? !_rNds.GoPrevSection( &aChkIdx, sal_False, sal_False )
: !_rNds.GoNextSection( &aChkIdx, sal_False, sal_False ) )
{
- ASSERT( false, "<lcl_IsInSameTblBox(..)> - no previous/next!" );
+ OSL_ENSURE( false, "<lcl_IsInSameTblBox(..)> - no previous/next!" );
return false;
}
else
@@ -143,13 +144,13 @@ void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSectionData& rSectionData,
SwNodeIndex aIdx( rStt );
if( !rNds.GoPrevSection( &aIdx, sal_True, sal_False ) ||
!CheckNodesRange( rStt, aIdx, sal_True ) ||
- // OD 04.11.2003 #i21457#
+ // #i21457#
!lcl_IsInSameTblBox( rNds, rStt, true ))
{
aIdx = rEnd;
if( !rNds.GoNextSection( &aIdx, sal_True, sal_False ) ||
!CheckNodesRange( rEnd, aIdx, sal_True ) ||
- // OD 04.11.2003 #i21457#
+ // #i21457#
!lcl_IsInSameTblBox( rNds, rEnd, false ))
{
rSectionData.SetHidden( false );
@@ -167,7 +168,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
if( rRange.HasMark() &&
0 == ( nRegionRet = IsInsRegionAvailable( rRange, &pPrvNd ) ))
{
- ASSERT( !this, "Selection ueber verschiedene Sections" );
+ OSL_ENSURE( !this, "Selection ueber verschiedene Sections" );
return 0;
}
@@ -213,7 +214,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
*pEndPos = (SwPosition*)rRange.End();
if( pPrvNd && 3 == nRegionRet )
{
- ASSERT( pPrvNd, "der SectionNode fehlt" );
+ OSL_ENSURE( pPrvNd, "der SectionNode fehlt" );
SwNodeIndex aStt( pSttPos->nNode ), aEnd( pEndPos->nNode, +1 );
while( pPrvNd != aStt.GetNode().StartOfSectionNode() )
aStt--;
@@ -465,7 +466,6 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
aIdx++;
} while( aIdx.GetNode().IsEndNode() &&
0 != aIdx.GetNode().FindSectionNode() );
-// if( !aIdx.GetNode().IsEndNode() )
{
nRet = 2;
if( ppSttNd )
@@ -621,7 +621,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
{
SwSectionFmt* pFmt = (*pSectionFmtTbl)[ nPos ];
SwSection* pSection = pFmt->GetSection();
- /// OD 04.10.2002 #102894#
+
/// remember hidden condition flag of SwSection before changes
bool bOldCondHidden = pSection->IsCondHidden() ? true : false;
@@ -692,7 +692,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
// objects of type SwUndoFrmFmt on the undo stack. We don't want them.
::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
- // #56167# Der LinkFileName koennte auch nur aus Separatoren bestehen
+ // Der LinkFileName koennte auch nur aus Separatoren bestehen
String sCompareString = sfx2::cTokenSeperator;
sCompareString += sfx2::cTokenSeperator;
const bool bUpdate =
@@ -707,13 +707,12 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
else
sSectName.Erase();
- /// OD 04.10.2002 #102894# - NOTE
/// In SwSection::operator=(..) class member bCondHiddenFlag is always set to sal_True.
/// IMHO this have to be changed, but I can't estimate the consequences:
/// Either it is set to sal_True using corresponding method <SwSection.SetCondHidden(..)>,
/// or it is set to the value of SwSection which is assigned to it.
/// Discussion with AMA results that the adjustment to the assignment operator
- /// could be very risky -> see notes in bug #102894#.
+ /// could be very risky.
pSection->SetSectionData(rNewData);
if( pAttr )
@@ -732,7 +731,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
if( !pIdx )
pIdx = pFmt->GetCntnt().GetCntntIdx();
FldsToCalc( aCalc, pIdx->GetIndex(), USHRT_MAX );
- /// OD 04.10.2002 #102894#
+
/// Because on using SwSection::operator=() to set up <pSection>
/// with <rNewData> and the above given note, the hidden condition flag
/// has to be set to sal_False, if hidden condition flag of <pFmt->GetSection()>
@@ -760,7 +759,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
SetModified();
}
-/* -----------------19.02.99 09:31-------------------
+/* --------------------------------------------------
* LockFrms wurde im InsertSection genutzt, um zu verhindern, dass
* SectionFrms durch das DelFrms zerstoert werden. Dies ist durch
* den Destroy-Listen-Mechanismus ueberfluessig geworden.
@@ -818,7 +817,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx,
if( !pEnde ) // kein Bereich also neue Section davor/hinter anlegen
{
// #i26762#
- ASSERT(!pEnde || rNdIdx <= *pEnde,
+ OSL_ENSURE(!pEnde || rNdIdx <= *pEnde,
"Section start and end in wrong order!");
if( bInsAtStart )
@@ -1041,7 +1040,7 @@ SwFrm* SwClearDummies( SwFrm* pFrm )
SwFrm* pTmp = pFrm;
while( pTmp )
{
- ASSERT( !pTmp->GetUpper(), "SwClearDummies: No Upper allowed!" );
+ OSL_ENSURE( !pTmp->GetUpper(), "SwClearDummies: No Upper allowed!" );
if( pTmp->IsSctFrm() )
{
SwSectionFrm* pSectFrm = (SwSectionFrm*)pFrm;
@@ -1128,11 +1127,11 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx )
SwFrm *pFrm, *pNew;
while( 0 != (pFrm = aNode2Layout.NextFrm()) )
{
- ASSERT( pFrm->IsSctFrm(), "Depend von Section keine Section." );
+ OSL_ENSURE( pFrm->IsSctFrm(), "Depend von Section keine Section." );
pNew = rIdx.GetNode().GetCntntNode()->MakeFrm();
SwSectionNode* pS = rIdx.GetNode().FindSectionNode();
- // --> OD 2008-06-23 #156927#
+
// Assure that node is not inside a table, which is inside the
// found section.
if ( pS )
@@ -1144,25 +1143,24 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx )
pS = 0;
}
}
- // <--
+
// if the node is in a section, the sectionframe now
// has to be created..
- // OD 14.11.2002 #104684# - boolean to control <Init()> of a new
- // section frame.
+ // boolean to control <Init()> of a new section frame.
bool bInitNewSect = false;
if( pS )
{
SwSectionFrm *pSct = new SwSectionFrm( pS->GetSection() );
- // OD 14.11.2002 #104684# - prepare <Init()> of new section frame.
+ // prepare <Init()> of new section frame.
bInitNewSect = true;
SwLayoutFrm* pUp = pSct;
while( pUp->Lower() ) // for columned sections
{
- ASSERT( pUp->Lower()->IsLayoutFrm(),"Who's in there?" );
+ OSL_ENSURE( pUp->Lower()->IsLayoutFrm(),"Who's in there?" );
pUp = (SwLayoutFrm*)pUp->Lower();
}
pNew->Paste( pUp, NULL );
- // --> OD 2005-12-01 #i27138#
+ // #i27138#
// notify accessibility paragraphs objects about changed
// CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for next paragraph will change
@@ -1189,7 +1187,7 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx )
else
// der neue liegt hinter mir
pNew->Paste( pFrm->GetUpper(), pFrm->GetNext() );
- // --> OD 2005-12-01 #i27138#
+ // #i27138#
// notify accessibility paragraphs objects about changed
// CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for next paragraph will change
@@ -1218,7 +1216,7 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx )
void SwSectionNode::MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEndIdx )
{
- ASSERT( pIdxBehind, "kein Index" );
+ OSL_ENSURE( pIdxBehind, "kein Index" );
SwNodes& rNds = GetNodes();
SwDoc* pDoc = rNds.GetDoc();
@@ -1242,8 +1240,6 @@ void SwSectionNode::DelFrms()
sal_uLong nStt = GetIndex()+1, nEnd = EndOfSectionIndex();
if( nStt >= nEnd )
{
- // unser Flag muessen wir noch aktualisieren
- // pSection->bHiddenFlag = sal_True;
return ;
}
@@ -1261,13 +1257,13 @@ void SwSectionNode::DelFrms()
SwNodeIndex aIdx( *this );
if( !rNds.GoPrevSection( &aIdx, sal_True, sal_False ) ||
!CheckNodesRange( *this, aIdx, sal_True ) ||
- // OD 04.11.2003 #i21457#
+ // #i21457#
!lcl_IsInSameTblBox( rNds, *this, true ))
{
aIdx = *EndOfSectionNode();
if( !rNds.GoNextSection( &aIdx, sal_True, sal_False ) ||
!CheckNodesRange( *EndOfSectionNode(), aIdx, sal_True ) ||
- // OD 04.11.2003 #i21457#
+ // #i21457#
!lcl_IsInSameTblBox( rNds, *EndOfSectionNode(), false ))
{
m_pSection->m_Data.SetHiddenFlag(false);
@@ -1288,7 +1284,7 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c
::std::auto_ptr<SwTOXBase> pTOXBase;
if (TOX_CONTENT_SECTION == GetSection().GetType())
{
- ASSERT( GetSection().ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
+ OSL_ENSURE( GetSection().ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
SwTOXBaseSection const& rTBS(
dynamic_cast<SwTOXBaseSection const&>(GetSection()));
pTOXBase.reset( new SwTOXBase(rTBS, pDoc) );
@@ -1324,10 +1320,9 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c
pNewSect->SetHidden( sal_True );
if( !pNewSect->IsProtectFlag() && GetSection().IsProtect() )
pNewSect->SetProtect( sal_True );
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
if( !pNewSect->IsEditInReadonlyFlag() && GetSection().IsEditInReadonly() )
pNewSect->SetEditInReadonly( sal_True );
- // <--
SwNodeRange aRg( *this, +1, *EndOfSectionNode() ); // (wo stehe in denn nun ??)
rNds._Copy( aRg, aInsPos, sal_False );
@@ -1357,7 +1352,7 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c
sal_Bool SwSectionNode::IsCntntHidden() const
{
- ASSERT( !m_pSection->IsHidden(),
+ OSL_ENSURE( !m_pSection->IsHidden(),
"That's simple: Hidden Section => Hidden Content" );
SwNodeIndex aTmp( *this, 1 );
sal_uLong nEnd = EndOfSectionIndex();
@@ -1374,7 +1369,7 @@ sal_Bool SwSectionNode::IsCntntHidden() const
{
if( aTmp.GetNode().IsCntntNode() || aTmp.GetNode().IsTableNode() )
return sal_False; // Nicht versteckter Inhalt wurde gefunden
- ASSERT( aTmp.GetNode().IsEndNode(), "EndNode expected" );
+ OSL_ENSURE( aTmp.GetNode().IsEndNode(), "EndNode expected" );
}
aTmp++;
}
@@ -1418,7 +1413,7 @@ void SwSectionNode::NodesArrChgd()
// verschieben vom Nodes- ins UndoNodes-Array?
if( rNds.IsDocNodes() )
{
- ASSERT( pDoc == GetDoc(),
+ OSL_ENSURE( pDoc == GetDoc(),
"verschieben in unterschiedliche Documente?" );
if (m_pSection->IsLinkType())
{
@@ -1498,3 +1493,4 @@ String SwDoc::GetUniqueSectionName( const String* pChkStr ) const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 29ecd0ef79f4..6cefc2cef949 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1,4 +1,4 @@
-
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,7 +37,8 @@
#include <editeng/brkitem.hxx>
#include <editeng/protitem.hxx>
#include <editeng/boxitem.hxx>
-// OD 06.08.2003 #i17174#
+#include <svl/stritem.hxx>
+// #i17174#
#include <editeng/shaditem.hxx>
#include <fmtfsize.hxx>
#include <fmtornt.hxx>
@@ -58,7 +59,6 @@
#include <swcrsr.hxx>
#include <viscrs.hxx>
#include <swtable.hxx>
-#include <ndtxt.hxx>
#include <swundo.hxx>
#include <tblsel.hxx>
#include <fldbas.hxx>
@@ -67,6 +67,7 @@
#include <UndoCore.hxx>
#include <UndoRedline.hxx>
#include <UndoDelete.hxx>
+#include <UndoNumbering.hxx>
#include <UndoTable.hxx>
#include <hints.hxx>
#include <tblafmt.hxx>
@@ -89,7 +90,6 @@
#include <node2lay.hxx>
#include <comcore.hrc>
#include "docsh.hxx"
-#include <tabcol.hxx>
#include <unochart.hxx>
#include <node.hxx>
@@ -97,28 +97,17 @@
#include <map>
#include <algorithm>
-// --> OD 2005-12-05 #i27138#
-#include <rootfrm.hxx>
-// <--
+#include <rootfrm.hxx> // #i27138#
#include <fldupde.hxx>
-
-#ifndef DBG_UTIL
-#define CHECK_TABLE(t)
-#else
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
#define CHECK_TABLE(t) (t).CheckConsistency();
#else
#define CHECK_TABLE(t)
#endif
-#endif
-
using namespace ::com::sun::star;
-// #i17764# delete table redlines when modifying the table structure?
-// #define DEL_TABLE_REDLINES 1
-
const sal_Unicode T2T_PARA = 0x0a;
extern void ClearFEShellTabCols();
@@ -126,25 +115,6 @@ extern void ClearFEShellTabCols();
// steht im gctable.cxx
extern sal_Bool lcl_GC_Line_Border( const SwTableLine*& , void* pPara );
-#ifdef DEL_TABLE_REDLINES
-class lcl_DelRedlines
-{
- SwDoc* pDoc;
-public:
- lcl_DelRedlines( const SwTableNode& rNd, sal_Bool bCheckForOwnRedline );
- lcl_DelRedlines( SwPaM& rPam );
-
- ~lcl_DelRedlines() { pDoc->EndUndo(UNDO_EMPTY, NULL); }
-};
-
-lcl_DelRedlines::lcl_DelRedlines( SwPaM & rPam) : pDoc( rPam.GetDoc() )
-{
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
- if( !pDoc->IsIgnoreRedline() && pDoc->GetRedlineTbl().Count() )
- pDoc->AcceptRedline( rPam, true );
-}
-#endif
-
void lcl_SetDfltBoxAttr( SwFrmFmt& rFmt, sal_uInt8 nId )
{
sal_Bool bTop = sal_False, bBottom = sal_False, bLeft = sal_False, bRight = sal_False;
@@ -280,7 +250,7 @@ sal_Bool SwNodes::InsBoxen( SwTableNode* pTblNd,
{
if( !nCnt )
return sal_False;
- ASSERT( pLine, "keine gueltige Zeile" );
+ OSL_ENSURE( pLine, "keine gueltige Zeile" );
// Index hinter die letzte Box der Line
sal_uLong nIdxPos = 0;
@@ -293,9 +263,12 @@ sal_Bool SwNodes::InsBoxen( SwTableNode* pTblNd,
pLine->GetTabBoxes()[ nInsPos ] )))
pPrvBox = pLine->FindPreviousBox( pTblNd->GetTable() );
}
- else if( 0 == ( pNxtBox = pLine->FindNextBox( pTblNd->GetTable(),
- pLine->GetTabBoxes()[ nInsPos-1 ] )))
+ else
+ {
+ if( 0 == (pNxtBox = pLine->FindNextBox( pTblNd->GetTable(),
+ pLine->GetTabBoxes()[ pLine->GetTabBoxes().Count()-1 ] )))
pNxtBox = pLine->FindNextBox( pTblNd->GetTable() );
+ }
}
else if( 0 == ( pNxtBox = pLine->FindNextBox( pTblNd->GetTable() )))
pPrvBox = pLine->FindPreviousBox( pTblNd->GetTable() );
@@ -344,7 +317,6 @@ sal_Bool SwNodes::InsBoxen( SwTableNode* pTblNd,
rTabBoxes.C40_INSERT( SwTableBox, pPrvBox, nRealInsPos );
- //if( NO_NUMBERING == pTxtColl->GetOutlineLevel()//#outline level,zhaojianwei
if( ! pTxtColl->IsAssignedToListLevelOfOutlineStyle()//<-end,zhaojianwei
//FEATURE::CONDCOLL
&& RES_CONDTXTFMTCOLL != pTxtColl->Which()
@@ -375,8 +347,8 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
sal_Bool bCalledFromShell,
sal_Bool bNewModel )
{
- ASSERT( nRows, "Tabelle ohne Zeile?" );
- ASSERT( nCols, "Tabelle ohne Spalten?" );
+ OSL_ENSURE( nRows, "Tabelle ohne Zeile?" );
+ OSL_ENSURE( nCols, "Tabelle ohne Spalten?" );
{
// nicht in Fussnoten kopieren !!
@@ -415,10 +387,10 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
rInsTblOpts.mnRowsToRepeat :
0;
- /* #106283# Save content node to extract FRAMEDIR from. */
+ /* Save content node to extract FRAMEDIR from. */
const SwCntntNode * pCntntNd = rPos.nNode.GetNode().GetCntntNode();
- /* #109161# If we are called from a shell pass the attrset from
+ /* If we are called from a shell pass the attrset from
pCntntNd (aka the node the table is inserted at) thus causing
SwNodes::InsertTable to propagate an adjust item if
necessary. */
@@ -435,7 +407,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
SwTableLineFmt* pLineFmt = MakeTableLineFmt();
SwTableFmt* pTableFmt = MakeTblFrmFmt( aTblName, GetDfltFrmFmt() );
- /* #106283# If the node to insert the table at is a context node and has a
+ /* If the node to insert the table at is a context node and has a
non-default FRAMEDIR propagate it to the table. */
if (pCntntNd)
{
@@ -518,10 +490,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
for( sal_uInt16 i = 0; i < nBoxArrLen; ++i )
aBoxFmtArr.Insert( (void*)0, i );
}
- // --> OD 2008-02-25 #refactorlists#
-// SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_END-1 );
SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1 );
- // <--
SwNodeIndex aNdIdx( *pTblNd, 1 ); // auf den ersten Box-StartNode
SwTableLines& rLines = pNdTbl->GetTabLines();
@@ -636,7 +605,6 @@ SwTableNode* SwNodes::InsertTable( const SwNodeIndex& rNdIdx,
SwTxtNode * pTmpNd = new SwTxtNode( aIdx, pTxtColl );
// --> FME 2006-04-13 #i60422# Propagate some more attributes.
- // Adjustment was done for #109161#
const SfxPoolItem* pItem = NULL;
if ( NULL != pAttrSet )
{
@@ -682,17 +650,13 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
return 0;
}
- /* #106283# Save first node in the selection if it is a context node. */
+ /* Save first node in the selection if it is a context node. */
SwCntntNode * pSttCntntNd = pStt->nNode.GetNode().GetCntntNode();
SwPaM aOriginal( *pStt, *pEnd );
pStt = aOriginal.GetMark();
pEnd = aOriginal.GetPoint();
-#ifdef DEL_TABLE_REDLINES
- lcl_DelRedlines aDelRedl( aOriginal );
-#endif
-
SwUndoTxtToTbl* pUndo = 0;
if( GetIDocumentUndoRedo().DoesUndo() )
{
@@ -734,7 +698,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
if( aRg.aEnd.GetIndex() == aRg.aStart.GetIndex() )
{
- ASSERT( sal_False, "Kein Bereich" );
+ OSL_ENSURE( sal_False, "Kein Bereich" );
aRg.aEnd++;
}
@@ -755,7 +719,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
if( !(rInsTblOpts.mnInsMode & tabopts::SPLIT_LAYOUT) )
pTableFmt->SetFmtAttr( SwFmtLayoutSplit( sal_False ));
- /* #106283# If the first node in the selection is a context node and if it
+ /* If the first node in the selection is a context node and if it
has an item FRAMEDIR set (no default) propagate the item to the
replacing table. */
if (pSttCntntNd)
@@ -775,7 +739,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
GetTxtCollFromPool( RES_POOLCOLL_STANDARD ), pUndo );
SwTable * pNdTbl = &pTblNd->GetTable();
- ASSERT( pNdTbl, "kein Tabellen-Node angelegt." )
+ OSL_ENSURE( pNdTbl, "kein Tabellen-Node angelegt." );
const sal_uInt16 nRowsToRepeat =
tabopts::HEADLINE == (rInsTblOpts.mnInsMode & tabopts::HEADLINE) ?
@@ -807,10 +771,8 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
aBoxFmtArr.Insert( (void*)0, i );
}
- // --> OD 2008-02-25 #refactorlists#
-// SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_END-1 );
SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1 );
- // <--
+
SwHistory* pHistory = pUndo ? &pUndo->GetHistory() : 0;
SwTableBoxFmt *pBoxF = 0;
@@ -954,7 +916,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
aSttIdx += 2, nLines++, nBoxes = 0 )
{
SwTxtNode* pTxtNd = aSttIdx.GetNode().GetTxtNode();
- ASSERT( pTxtNd, "nur TextNodes in der Tabelle aufnehmen" );
+ OSL_ENSURE( pTxtNd, "nur TextNodes in der Tabelle aufnehmen" );
if( !nLines && 0x0b == cCh )
{
@@ -976,7 +938,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
}
}
- aPosArr.Insert( /*aFInfo.GetFrm()->Frm().Left() +*/
+ aPosArr.Insert(
static_cast<sal_uInt16>(aFInfo.GetFrm()->IsVertical() ?
aFInfo.GetFrm()->Prt().Bottom() :
aFInfo.GetFrm()->Prt().Right()),
@@ -991,9 +953,6 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
const SfxItemSet* pSet = pTxtNd->GetpSwAttrSet();
if( pSet )
{
-// das entfernen der PageBreaks erst nach dem erzeugen der Tabelle
-// erfolgen, denn sonst stehen sie falsch in der History !!!
-// SwRegHistory aRegH( pTxtNd, *pTxtNd, pHistory );
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pItem ) )
{
@@ -1115,7 +1074,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
// damit die Tabelle die richtige Groesse bekommt, im BoxFormat die
// Groesse nach "oben" transportieren.
- ASSERT( !pBoxFmt->GetDepends(), "wer ist in dem Format noch angemeldet" );
+ OSL_ENSURE( !pBoxFmt->GetDepends(), "wer ist in dem Format noch angemeldet" );
pBoxFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nLastPos ));
}
else
@@ -1124,12 +1083,10 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
// das wars doch wohl ??
return pTblNd;
}
-/*-- 18.05.2006 10:30:29---------------------------------------------------
- -----------------------------------------------------------------------*/
const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >& rTableNodes )
{
- /* #106283# Save first node in the selection if it is a content node. */
+ /* Save first node in the selection if it is a content node. */
SwCntntNode * pSttCntntNd = rTableNodes.begin()->begin()->aStart.GetNode().GetCntntNode();
/**debug**/
@@ -1146,18 +1103,10 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
const SwPosition *pStt = aOriginal.GetMark();
const SwPosition *pEnd = aOriginal.GetPoint();
-#ifdef DEL_TABLE_REDLINES
- lcl_DelRedlines aDelRedl( aOriginal );
-#endif
-
// SwUndoTxtToTbl* pUndo = 0;
bool const bUndo(GetIDocumentUndoRedo().DoesUndo());
if (bUndo)
{
-// GetIDocumentUndoRedo().StartUndo( UNDO_TEXTTOTABLE );
-// pUndo = new SwUndoTxtToTbl( aOriginal, rInsTblOpts, cCh, eAdjust, pTAFmt );
-// GetIDocumentUndoRedo().AppendUndo(pUndo);
-
// das Splitten vom TextNode nicht in die Undohistory aufnehmen
GetIDocumentUndoRedo().DoUndo(false);
}
@@ -1191,7 +1140,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
if( aRg.aEnd.GetIndex() == aRg.aStart.GetIndex() )
{
- ASSERT( sal_False, "Kein Bereich" );
+ OSL_ENSURE( sal_False, "Kein Bereich" );
aRg.aEnd++;
}
@@ -1209,10 +1158,8 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
pLineFmt->SetFmtAttr( SwFmtFillOrder( ATT_LEFT_TO_RIGHT ));
// die Tabelle bekommt USHRT_MAX als default SSize
pTableFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, USHRT_MAX ));
-// if( !(rInsTblOpts.mnInsMode & tabopts::SPLIT_LAYOUT) )
-// pTableFmt->SetAttr( SwFmtLayoutSplit( sal_False ));
- /* #106283# If the first node in the selection is a context node and if it
+ /* If the first node in the selection is a context node and if it
has an item FRAMEDIR set (no default) propagate the item to the
replacing table. */
if (pSttCntntNd)
@@ -1232,45 +1179,20 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
GetTxtCollFromPool( RES_POOLCOLL_STANDARD )/*, pUndo*/ );
SwTable * pNdTbl = &pTblNd->GetTable();
- ASSERT( pNdTbl, "kein Tabellen-Node angelegt." )
+ OSL_ENSURE( pNdTbl, "kein Tabellen-Node angelegt." );
pTableFmt->Add( pNdTbl ); // das Frame-Format setzen
-// const sal_uInt16 nRowsToRepeat =
-// tabopts::HEADLINE == (rInsTblOpts.mnInsMode & tabopts::HEADLINE) ?
-// rInsTblOpts.mnRowsToRepeat :
-// 0;
-// pNdTbl->SetRowsToRepeat( nRowsToRepeat );
-
- sal_Bool bUseBoxFmt = sal_False;
if( !pBoxFmt->GetDepends() )
{
// die Formate an den Boxen haben schon die richtige Size, es darf
// also nur noch die richtige Umrandung/AutoFmt gesetzt werden.
- bUseBoxFmt = sal_True;
pTableFmt->SetFmtAttr( pBoxFmt->GetFrmSize() );
delete pBoxFmt;
-// eAdjust = HORI_NONE;
}
- //Orientation am Fmt der Table setzen
-// pTableFmt->SetAttr( SwFmtHoriOrient( 0, eAdjust ) );
-// pTableFmt->Add( pNdTbl ); // das Frame-Format setzen
-
-
sal_uLong nIdx = pTblNd->GetIndex();
aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 );
- {
-// SwPaM& rTmp = (SwPaM&)rRange; // Point immer an den Anfang
-// rTmp.DeleteMark();
-// rTmp.GetPoint()->nNode = *pTblNd;
-// SwCntntNode* pCNd = GetNodes().GoNext( &rTmp.GetPoint()->nNode );
-// rTmp.GetPoint()->nContent.Assign( pCNd, 0 );
- }
-
-// if( pUndo )
-// GetIDocumentUndoRedo().EndUndo( UNDO_TEXTTOTABLE );
-
SetModified();
SetFieldsDirty( true, NULL, 0 );
return pNdTbl;
@@ -1338,9 +1260,6 @@ SwNodeRange * SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange)
return pResult;
}
-/*-- 18.05.2006 08:23:28---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
SwTableFmt* pTblFmt,
SwTableLineFmt* pLineFmt,
@@ -1375,9 +1294,6 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
SwTableBox* pBox;
sal_uInt16 nBoxes, nLines, nMaxBoxes = 0;
-// SwHistory* pHistory = pUndo ? &pUndo->GetHistory() : 0;
-
-
SwNodeIndex aNodeIndex = rTableNodes.begin()->begin()->aStart;
// delete frames of all contained content nodes
for( nLines = 0; aNodeIndex <= rTableNodes.rbegin()->rbegin()->aEnd; ++aNodeIndex,++nLines )
@@ -1391,15 +1307,11 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
SwTxtNode& rTxtNode = static_cast<SwTxtNode&>(rNode);
// setze den bei allen TextNode in der Tabelle den TableNode
// als StartNode
-// FIXME: this is setting wrong node StartOfSections in nested tables.
-// rTxtNode.pStartOfSection = pTblNd;
+
// remove PageBreaks/PageDesc/ColBreak
const SwAttrSet* pSet = rTxtNode.GetpSwAttrSet();
if( pSet )
{
- // das entfernen der PageBreaks erst nach dem erzeugen der Tabelle
- // erfolgen, denn sonst stehen sie falsch in der History !!!
- // SwRegHistory aRegH( pTxtNd, *pTxtNd, pHistory );
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pItem ) )
{
@@ -1422,38 +1334,18 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
}
}
-// SwNodeIndex aSttIdx( *pTblNd, 1 );
-// SwNodeIndex aEndIdx( rlNodes.rbegin()->aEnd, -1 );
std::vector<std::vector < SwNodeRange > >::const_iterator aRowIter = rTableNodes.begin();
for( nLines = 0, nBoxes = 0;
aRowIter != rTableNodes.end();
- ++aRowIter, /*aSttIdx += 2, */nLines++, nBoxes = 0 )
+ ++aRowIter, nLines++, nBoxes = 0 )
{
-// SwTxtNode* pTxtNd = aSttIdx.GetNode().GetTxtNode();
-// ASSERT( pTxtNd, "nur TextNodes in der Tabelle aufnehmen" );
-
pLine = new SwTableLine( pLineFmt, 1, 0 );
pTable->GetTabLines().C40_INSERT( SwTableLine, pLine, nLines );
-// SwStartNode* pSttNd;
-// SwPosition aCntPos( aSttIdx, SwIndex( pTxtNd ));
-
std::vector< SwNodeRange >::const_iterator aCellIter = aRowIter->begin();
-// SvULongs aBkmkArr( 15, 15 );
-// _SaveCntntIdx( pDoc, aCellIter->aStart.GetIndex(), pTxtNd->GetTxt().Len(), aBkmkArr );
-// const sal_Unicode* pTxt = pTxtNd->GetTxt().GetBuffer();
for( ; aCellIter != aRowIter->end(); ++aCellIter )
{
-// aCellIter->aStart aCellIter->aEnd
-// aCntPos.nContent = nChPos;
-// SwCntntNode* pNewNd = pTxtNd->SplitNode( aCntPos );
-
-// auch f?rs undo?
-// if( aBkmkArr.Count() )
-// _RestoreCntntIdx( aBkmkArr, *pNewNd, nChPos,
-// nChPos + 1 );
-
const SwNodeIndex aTmpIdx( aCellIter->aStart, 0 );
SwNodeIndex aCellEndIdx(aCellIter->aEnd);
@@ -1501,7 +1393,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
// damit die Tabelle die richtige Groesse bekommt, im BoxFormat die
// Groesse nach "oben" transportieren.
- ASSERT( !pBoxFmt->GetDepends(), "wer ist in dem Format noch angemeldet" );
+ OSL_ENSURE( !pBoxFmt->GetDepends(), "wer ist in dem Format noch angemeldet" );
pBoxFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nLastPos ));
}
else
@@ -1528,10 +1420,6 @@ sal_Bool SwDoc::TableToText( const SwTableNode* pTblNd, sal_Unicode cCh )
pESh->ClearMark();
// <--
-#ifdef DEL_TABLE_REDLINES
- lcl_DelRedlines aDelRedl( *pTblNd, sal_False );
-#endif
-
SwNodeRange aRg( *pTblNd, 0, *pTblNd->EndOfSectionNode() );
SwUndoTblToTxt* pUndo = 0;
SwNodeRange* pUndoRg = 0;
@@ -1584,7 +1472,7 @@ sal_Bool lcl_DelBox( const SwTableBox*&, void *pPara );
sal_Bool lcl_DelLine( const SwTableLine*& rpLine, void* pPara )
{
- ASSERT( pPara, "die Parameter fehlen" );
+ OSL_ENSURE( pPara, "die Parameter fehlen" );
_DelTabPara aPara( *(_DelTabPara*)pPara );
((SwTableLine*&)rpLine)->GetTabBoxes().ForEach( &lcl_DelBox, &aPara );
if( rpLine->GetUpper() ) // gibt es noch eine uebergeordnete Box ??
@@ -1596,7 +1484,7 @@ sal_Bool lcl_DelLine( const SwTableLine*& rpLine, void* pPara )
sal_Bool lcl_DelBox( const SwTableBox*& rpBox, void* pPara )
{
- ASSERT( pPara, "die Parameter fehlen" );
+ OSL_ENSURE( pPara, "die Parameter fehlen" );
// loesche erstmal die Lines der Box
_DelTabPara* pDelPara = (_DelTabPara*)pPara;
@@ -1792,7 +1680,7 @@ sal_Bool SwDoc::InsertCol( const SwCursor& rCursor, sal_uInt16 nCnt, sal_Bool bB
sal_Bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind )
{
// uebers SwDoc fuer Undo !!
- ASSERT( rBoxes.Count(), "keine gueltige Box-Liste" );
+ OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -1801,10 +1689,6 @@ sal_Bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool b
if( rTbl.ISA( SwDDETable ))
return sal_False;
-#ifdef DEL_TABLE_REDLINES
- lcl_DelRedlines aDelRedl( *pTblNd, sal_True );
-#endif
-
SwTableSortBoxes aTmpLst( 0, 5 );
SwUndoTblNdsChg* pUndo = 0;
if (GetIDocumentUndoRedo().DoesUndo())
@@ -1859,7 +1743,7 @@ sal_Bool SwDoc::InsertRow( const SwCursor& rCursor, sal_uInt16 nCnt, sal_Bool bB
sal_Bool SwDoc::InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind )
{
// uebers SwDoc fuer Undo !!
- ASSERT( rBoxes.Count(), "keine gueltige Box-Liste" );
+ OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -1868,10 +1752,6 @@ sal_Bool SwDoc::InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool b
if( rTbl.ISA( SwDDETable ))
return sal_False;
-#ifdef DEL_TABLE_REDLINES
- lcl_DelRedlines aDelRedl( *pTblNd, sal_True );
-#endif
-
SwTableSortBoxes aTmpLst( 0, 5 );
SwUndoTblNdsChg* pUndo = 0;
if (GetIDocumentUndoRedo().DoesUndo())
@@ -2052,7 +1932,7 @@ sal_Bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
return sal_False;
// uebers SwDoc fuer Undo !!
- ASSERT( rBoxes.Count(), "keine gueltige Box-Liste" );
+ OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -2074,10 +1954,6 @@ sal_Bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
rTable.FindSuperfluousRows( aSelBoxes );
}
-#ifdef DEL_TABLE_REDLINES
- lcl_DelRedlines aDelRedl( *pTblNd, sal_True );
-#endif
-
// soll die gesamte Tabelle geloescht werden ??
const sal_uLong nTmpIdx1 = pTblNd->GetIndex();
const sal_uLong nTmpIdx2 = aSelBoxes[ aSelBoxes.Count()-1 ]->GetSttNd()->
@@ -2146,11 +2022,6 @@ sal_Bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
SwCntntNode* pNextNd = GetNodes()[ nNextNd ]->GetCntntNode();
if( pNextNd )
{
-//JP 24.08.98: will man wirklich den PageDesc/Break vom
-// nachfolgen Absatz ueberbuegeln?
-// const SwAttrSet& rAttrSet = pNextNd->GetSwAttrSet();
-// if( SFX_ITEM_SET != rAttrSet.GetItemState( RES_PAGEDESC ) &&
-// SFX_ITEM_SET != rAttrSet.GetItemState( RES_BREAK ))
{
SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt();
const SfxPoolItem *pItem;
@@ -2271,7 +2142,7 @@ sal_Bool SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, sal_uInt16 n
sal_Bool bSameHeight )
{
// uebers SwDoc fuer Undo !!
- ASSERT( rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
+ OSL_ENSURE( rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -2280,10 +2151,6 @@ sal_Bool SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, sal_uInt16 n
if( rTbl.ISA( SwDDETable ))
return sal_False;
-#ifdef DEL_TABLE_REDLINES
- lcl_DelRedlines aDelRedl( *pTblNd, sal_True );
-#endif
-
SvULongs aNdsCnts;
SwTableSortBoxes aTmpLst( 0, 5 );
SwUndoTblNdsChg* pUndo = 0;
@@ -2364,10 +2231,6 @@ sal_uInt16 SwDoc::MergeTbl( SwPaM& rPam )
GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_MERGE, NULL );
// <--
-#ifdef DEL_TABLE_REDLINES
- if( !IsIgnoreRedline() && GetRedlineTbl().Count() )
- DeleteRedline( *pTblNd, true, USHRT_MAX );
-#endif
RedlineMode_t eOld = GetRedlineMode();
SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE));
@@ -2493,7 +2356,7 @@ void SwTableNode::MakeFrms(const SwNodeIndex & rIdx )
SwFrm *pFrm, *pNew;
SwCntntNode * pNode = rIdx.GetNode().GetCntntNode();
- ASSERT( pNode, "Kein Contentnode oder Copy-Node und neuer Node identisch.");
+ OSL_ENSURE( pNode, "Kein Contentnode oder Copy-Node und neuer Node identisch.");
sal_Bool bBefore = rIdx < GetIndex();
@@ -2517,7 +2380,7 @@ void SwTableNode::MakeFrms(const SwNodeIndex & rIdx )
void SwTableNode::MakeFrms( SwNodeIndex* pIdxBehind )
{
- ASSERT( pIdxBehind, "kein Index" );
+ OSL_ENSURE( pIdxBehind, "kein Index" );
*pIdxBehind = *this;
SwNode *pNd = GetNodes().FindPrvNxtFrmNode( *pIdxBehind, EndOfSectionNode() );
if( !pNd )
@@ -2530,7 +2393,7 @@ void SwTableNode::MakeFrms( SwNodeIndex* pIdxBehind )
{
SwTabFrm* pNew = MakeFrm();
pNew->Paste( pUpper, pFrm );
- // --> OD 2005-12-01 #i27138#
+ // #i27138#
// notify accessibility paragraphs objects about changed
// CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for next paragraph will change
@@ -2570,7 +2433,7 @@ void SwTableNode::DelFrms()
{
while ( pFrm->HasFollow() )
pFrm->JoinAndDelFollows();
- // --> OD 2005-12-01 #i27138#
+ // #i27138#
// notify accessibility paragraphs objects about changed
// CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for current next paragraph will change
@@ -2642,7 +2505,7 @@ void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr,
}
else if( !pCrsr && !pBoxFrm )
{
- ASSERT( !this, "einer von beiden muss angegeben werden!" );
+ OSL_ENSURE( !this, "einer von beiden muss angegeben werden!" );
return ;
}
@@ -2696,12 +2559,11 @@ bool lcl_IsFrmInColumn( const SwCellFrm& rFrm, SwSelBoxes& rBoxes )
void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* ,
const SwCellFrm* pBoxFrm ) const
{
- ASSERT( pBoxFrm, "GetTabRows called without pBoxFrm" )
+ OSL_ENSURE( pBoxFrm, "GetTabRows called without pBoxFrm" );
- // --> FME 2005-09-12 #121591# Make code robust:
+ // Make code robust:
if ( !pBoxFrm )
return;
- // <--
// --> FME 2005-01-06 #i39552# Collection of the boxes of the current
// column has to be done at the beginning of this function, because
@@ -2718,20 +2580,18 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* ,
}
// <--
- // --> FME 2005-09-12 #121591# Make code robust:
+ // Make code robust:
if ( aDelCheck.HasBeenDeleted() )
{
- ASSERT( false, "Current box has been deleted during GetTabRows()" )
+ OSL_ENSURE( false, "Current box has been deleted during GetTabRows()" );
return;
}
- // <--
- // --> FME 2005-09-12 #121591# Make code robust:
+ // Make code robust:
const SwTabFrm* pTab = pBoxFrm->FindTabFrm();
- ASSERT( pTab, "GetTabRows called without a table" )
+ OSL_ENSURE( pTab, "GetTabRows called without a table" );
if ( !pTab )
return;
- // <--
const SwFrm* pFrm = pTab->GetNextLayoutLeaf();
@@ -2825,7 +2685,7 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* ,
}
// delete first and last entry
- ASSERT( rFill.Count(), "Deleting from empty vector. Fasten your seatbelts!" )
+ OSL_ENSURE( rFill.Count(), "Deleting from empty vector. Fasten your seatbelts!" );
// --> FME 2006-01-19 #i60818# There may be only one entry in rFill. Make
// code robust by checking count of rFill.
if ( rFill.Count() ) rFill.Remove( 0, 1 );
@@ -2867,7 +2727,7 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly,
}
else if( !pCrsr && !pBoxFrm )
{
- ASSERT( !this, "einer von beiden muss angegeben werden!" );
+ OSL_ENSURE( !this, "einer von beiden muss angegeben werden!" );
return ;
}
@@ -2876,7 +2736,7 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly,
SwTable& rTab = *pTab->GetTable();
const SwFmtFrmSize& rTblFrmSz = rTab.GetFrmFmt()->GetFrmSize();
SWRECTFN( pTab )
- // OD 06.08.2003 #i17174# - With fix for #i9040# the shadow size is taken
+ // #i17174# - With fix for #i9040# the shadow size is taken
// from the table width. Thus, add its left and right size to current table
// printing area width in order to get the correct table size attribute.
SwTwips nPrtWidth = (pTab->Prt().*fnRect->fnGetWidth)();
@@ -2916,7 +2776,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const SwCur
const SwTableBox* pBox;
SwTabFrm *pTab;
- ASSERT( pBoxFrm, "SetTabRows called without pBoxFrm" )
+ OSL_ENSURE( pBoxFrm, "SetTabRows called without pBoxFrm" );
pTab = ((SwFrm*)pBoxFrm)->ImplFindTabFrm();
pBox = pBoxFrm->GetTabBox();
@@ -2953,7 +2813,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const SwCur
// check for differences between aOld and rNew:
const sal_uInt16 nCount = rNew.Count();
const SwTable* pTable = pTab->GetTable();
- ASSERT( pTable, "My colleague told me, this couldn't happen" );
+ OSL_ENSURE( pTable, "My colleague told me, this couldn't happen" );
for ( sal_uInt16 i = 0; i <= nCount; ++i )
{
@@ -3036,7 +2896,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const SwCur
::ClearFEShellTabCols();
}
-/* -----------------18.07.98 11:45-------------------
+/* --------------------------------------------------
* Direktzugriff fuer UNO
* --------------------------------------------------*/
void SwDoc::SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld,
@@ -3213,7 +3073,7 @@ sal_Bool lcl_BoxSetSplitBoxFmts( const SwTableBox*& rpBox, void* pPara )
}
else
{
-sal_uInt16 __FAR_DATA aTableSplitBoxSetRange[] = {
+sal_uInt16 aTableSplitBoxSetRange[] = {
RES_LR_SPACE, RES_UL_SPACE,
RES_BACKGROUND, RES_SHADOW,
RES_PROTECT, RES_PROTECT,
@@ -3299,9 +3159,6 @@ sal_Bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode,
aFndBox.SetTableLines( rTbl );
aFndBox.DelFrms( rTbl );
- // TL_CHART2: need to inform chart of probably changed cell names
- //pDoc->UpdateCharts( rTbl.GetFrmFmt()->GetName() );
-
SwTableNode* pNew = GetNodes().SplitTable( rPos.nNode, sal_False, bCalcNewSize );
if( pNew )
@@ -3531,7 +3388,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, sal_Bool bAfter,
SwTableNode * pNewTblNd;
{
SwEndNode* pOldTblEndNd = (SwEndNode*)pTNd->EndOfSectionNode()->GetEndNode();
- ASSERT( pOldTblEndNd, "wo ist der EndNode?" )
+ OSL_ENSURE( pOldTblEndNd, "wo ist der EndNode?" );
SwNodeIndex aIdx( *pBox->GetSttNd() );
new SwEndNode( aIdx, *pTNd );
@@ -3543,7 +3400,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, sal_Bool bAfter,
SwNode* pBoxNd = aIdx.GetNode().GetStartNode();
do {
- ASSERT( pBoxNd->IsStartNode(), "das muss ein StartNode sein!" );
+ OSL_ENSURE( pBoxNd->IsStartNode(), "das muss ein StartNode sein!" );
pBoxNd->pStartOfSection = pNewTblNd;
pBoxNd = (*this)[ pBoxNd->EndOfSectionIndex() + 1 ];
} while( pBoxNd != pOldTblEndNd );
@@ -3670,10 +3527,10 @@ sal_Bool SwNodes::MergeTable( const SwNodeIndex& rPos, sal_Bool bWithPrev,
sal_uInt16 nMode, SwHistory* )
{
SwTableNode* pDelTblNd = rPos.GetNode().GetTableNode();
- ASSERT( pDelTblNd, "wo ist der TableNode geblieben?" );
+ OSL_ENSURE( pDelTblNd, "wo ist der TableNode geblieben?" );
SwTableNode* pTblNd = (*this)[ rPos.GetIndex() - 1]->FindTableNode();
- ASSERT( pTblNd, "wo ist der TableNode geblieben?" );
+ OSL_ENSURE( pTblNd, "wo ist der TableNode geblieben?" );
if( !pDelTblNd || !pTblNd )
return sal_False;
@@ -3744,7 +3601,7 @@ sal_Bool SwNodes::MergeTable( const SwNodeIndex& rPos, sal_Bool bWithPrev,
SwNode* pBoxNd = aIdx.GetNode().GetStartNode();
do {
- ASSERT( pBoxNd->IsStartNode(), "das muss ein StartNode sein!" );
+ OSL_ENSURE( pBoxNd->IsStartNode(), "das muss ein StartNode sein!" );
pBoxNd->pStartOfSection = pTblNd;
pBoxNd = (*this)[ pBoxNd->EndOfSectionIndex() + 1 ];
} while( pBoxNd != pTblEndNd );
@@ -3823,10 +3680,7 @@ sal_Bool lcl_SetAFmtBox( const _FndBox*& rpBox, void *pPara )
{
SwTableBox* pSetBox = (SwTableBox*)rpBox->GetBox();
SwDoc* pDoc = pSetBox->GetFrmFmt()->GetDoc();
- // --> OD 2008-02-25 #refactorlists#
-// SfxItemSet aCharSet( pDoc->GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_END-1 );
SfxItemSet aCharSet( pDoc->GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1 );
- // <--
SfxItemSet aBoxSet( pDoc->GetAttrPool(), aTableBoxSetRange );
sal_uInt8 nPos = pSetPara->nAFmtLine * 4 + pSetPara->nAFmtBox;
pSetPara->rTblFmt.UpdateToSet( nPos, aCharSet,
@@ -3867,7 +3721,7 @@ sal_Bool lcl_SetAFmtBox( const _FndBox*& rpBox, void *pPara )
// AutoFormat fuer die Tabelle/TabellenSelection
sal_Bool SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew )
{
- ASSERT( rBoxes.Count(), "keine gueltige Box-Liste" );
+ OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -3945,7 +3799,7 @@ sal_Bool SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt&
// Erfrage wie attributiert ist
sal_Bool SwDoc::GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet )
{
- ASSERT( rBoxes.Count(), "keine gueltige Box-Liste" );
+ OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -4233,9 +4087,6 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, sal_Bool bCallUpdate )
// alle Zahlenformate entfernen
sal_uInt16 nWhich1 = RES_BOXATR_FORMULA;
if( !bIsEmptyTxtNd )
- //JP 15.01.99: dieser Teil wurde doch schon oben abgeprueft!
- /* && pFmtItem && !GetNumberFormatter()->
- IsTextFormat( ((SwTblBoxNumFormat*)pFmtItem)->GetValue() ) )*/
{
nWhich1 = RES_BOXATR_FORMAT;
@@ -4298,6 +4149,48 @@ void SwDoc::SetTblBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet )
SetModified();
}
+void SwDoc::ClearLineNumAttrs( SwPosition & rPos )
+{
+ SwPaM aPam(rPos);
+ aPam.Move(fnMoveBackward);
+ SwCntntNode *pNode = aPam.GetCntntNode();
+ if ( 0 == pNode )
+ return ;
+ if( pNode->IsTxtNode() )
+ {
+ SwTxtNode * pTxtNode = pNode->GetTxtNode();
+ if ( pTxtNode && pTxtNode->IsNumbered() && pTxtNode->GetTxt().Len()==0 )
+ {
+ const SfxPoolItem* pFmtItem = 0;
+ SfxItemSet rSet( const_cast<SwAttrPool&>(pTxtNode->GetDoc()->GetAttrPool()),
+ RES_PARATR_BEGIN, RES_PARATR_END - 1,
+ 0);
+ pTxtNode->SwCntntNode::GetAttr( rSet );
+ if ( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE , sal_False , &pFmtItem ) )
+ {
+ SwUndoDelNum * pUndo;
+ if( GetIDocumentUndoRedo().DoesUndo() )
+ {
+ GetIDocumentUndoRedo().ClearRedo();
+ GetIDocumentUndoRedo().AppendUndo( pUndo = new SwUndoDelNum( aPam ) );
+ }
+ else
+ pUndo = 0;
+ SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : 0 );
+ aRegH.RegisterInModify( pTxtNode , *pTxtNode );
+ if ( pUndo )
+ pUndo->AddNode( *pTxtNode , sal_False );
+ String aStyle = String::CreateFromAscii("");
+ SfxStringItem * pNewItem = (SfxStringItem*)pFmtItem->Clone();
+ pNewItem->SetValue( aStyle );
+ rSet.Put( *pNewItem );
+ pTxtNode->SetAttr( rSet );
+ delete pNewItem;
+ }
+ }
+ }
+}
+
void SwDoc::ClearBoxNumAttrs( const SwNodeIndex& rNode )
{
SwStartNode* pSttNd;
@@ -4446,7 +4339,7 @@ sal_Bool SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
{
SwTableBox* pBox = pInsTblNd->GetTable().GetTblBox(
pSttNd->GetIndex() );
- ASSERT( pBox, "Box steht nicht in dieser Tabelle" );
+ OSL_ENSURE( pBox, "Box steht nicht in dieser Tabelle" );
aBoxes.Insert( pBox );
pBoxes = &aBoxes;
}
@@ -4673,49 +4566,4 @@ sal_Bool SwDoc::HasTblAnyProtection( const SwPosition* pPos,
return bHasProtection;
}
-#ifdef DEL_TABLE_REDLINES
-lcl_DelRedlines::lcl_DelRedlines( const SwTableNode& rNd,
- sal_Bool bCheckForOwnRedline )
- : pDoc( (SwDoc*)rNd.GetNodes().GetDoc() )
-{
- pDoc->StartUndo(UNDO_EMPTY, NULL);
- const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
- if( !pDoc->IsIgnoreRedline() && rTbl.Count() )
- {
- sal_Bool bDelete = sal_True;
- if( bCheckForOwnRedline )
- {
- sal_uInt16 nRedlPos = pDoc->GetRedlinePos( rNd, USHRT_MAX );
- sal_uInt32 nSttNd = rNd.GetIndex(),
- nEndNd = rNd.EndOfSectionIndex();
-
- for ( ; nRedlPos < rTbl.Count(); ++nRedlPos )
- {
- const SwRedline* pRedline = rTbl[ nRedlPos ];
- const SwPosition* pStt = pRedline->Start(),
- * pEnd = pStt == pRedline->GetPoint()
- ? pRedline->GetMark()
- : pRedline->GetPoint();
- if( pStt->nNode <= nSttNd )
- {
- if( pEnd->nNode >= nEndNd &&
- pRedline->GetAuthor() == pDoc->GetRedlineAuthor() )
- {
- bDelete = sal_False;
- break;
- }
- }
- else
- break;
- }
- }
- if( bDelete )
- {
- SwPaM aPam(*rNd.EndOfSectionNode(), rNd);
- pDoc->AcceptRedline( aPam, true );
- }
- }
-}
-#endif
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 3d8b57df4101..14fac9d60f93 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include "hintids.hxx"
#include <editeng/lrspitem.hxx>
#include <editeng/boxitem.hxx>
@@ -108,7 +108,7 @@ void SwTblFmtCmp::Delete( SvPtrarr &rArr )
void lcl_GetStartEndCell( const SwCursor& rCrsr,
SwLayoutFrm *&prStart, SwLayoutFrm *&prEnd )
{
- ASSERT( rCrsr.GetCntntNode() && rCrsr.GetCntntNode( sal_False ),
+ OSL_ENSURE( rCrsr.GetCntntNode() && rCrsr.GetCntntNode( sal_False ),
"Tabselection nicht auf Cnt." );
Point aPtPos, aMkPos;
@@ -157,8 +157,6 @@ sal_Bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes,
/***********************************************************************
#* Class : SwDoc
#* Methoden : SetRowHeight(), GetRowHeight()
-#* Datum : MA 17. May. 93
-#* Update : JP 28.04.98
#***********************************************************************/
//Die Zeilenhoehe wird ausgehend von der Selektion ermittelt/gesetzt.
//Ausgehend von jeder Zelle innerhalb der Selektion werden nach oben alle
@@ -547,8 +545,6 @@ sal_Bool SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill
/***********************************************************************
#* Class : SwDoc
#* Methoden : SetTabBorders(), GetTabBorders()
-#* Datum : MA 18. May. 93
-#* Update : JP 29.04.98
#***********************************************************************/
inline void InsertCell( SvPtrarr& rCellArr, SwCellFrm* pCellFrm )
{
@@ -567,7 +563,7 @@ void lcl_CollectCells( SvPtrarr &rArr, const SwRect &rUnion,
// uns erst wieder zur Zelle hochhangeln
while ( !pCell->IsCellFrm() )
pCell = pCell->GetUpper();
- ASSERT( pCell, "Frame ist keine Zelle." );
+ OSL_ENSURE( pCell, "Frame ist keine Zelle." );
if ( rUnion.IsOver( pCell->Frm() ) )
::InsertCell( rArr, (SwCellFrm*)pCell );
//Dafuer sorgen, dass die Zelle auch verlassen wird (Bereiche)
@@ -697,9 +693,8 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
//Grundsaetzlich nichts setzen in HeadlineRepeats.
if ( pTab->IsFollow() &&
( pTab->IsInHeadline( *pCell ) ||
- // --> FME 2006-02-07 #126092# Same holds for follow flow rows.
+ // Same holds for follow flow rows.
pCell->IsInFollowFlowRow() ) )
- // <--
continue;
SvxBoxItem aBox( pCell->GetFmt()->GetBox() );
@@ -768,7 +763,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
if( pSetBox )
{
- static sal_uInt16 __READONLY_DATA aBorders[] = {
+ static sal_uInt16 const aBorders[] = {
BOX_LINE_BOTTOM, BOX_LINE_TOP,
BOX_LINE_RIGHT, BOX_LINE_LEFT };
const sal_uInt16* pBrd = aBorders;
@@ -1081,7 +1076,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
// Abstand zum Text
if (aSetBoxInfo.IsValid(VALID_DISTANCE))
{
- static sal_uInt16 __READONLY_DATA aBorders[] = {
+ static sal_uInt16 const aBorders[] = {
BOX_LINE_BOTTOM, BOX_LINE_TOP,
BOX_LINE_RIGHT, BOX_LINE_LEFT };
const sal_uInt16* pBrd = aBorders;
@@ -1115,8 +1110,6 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
/***********************************************************************
#* Class : SwDoc
#* Methoden : SetBoxAttr
-#* Datum : MA 18. Dec. 96
-#* Update : JP 29.04.98
#***********************************************************************/
void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew )
{
@@ -1164,8 +1157,6 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew )
/***********************************************************************
#* Class : SwDoc
#* Methoden : GetBoxAttr()
-#* Datum : MA 01. Jun. 93
-#* Update : JP 29.04.98
#***********************************************************************/
sal_Bool SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
@@ -1208,6 +1199,18 @@ sal_Bool SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) cons
else if( rToFill != rDir )
bRet = sal_False;
}
+ case RES_VERT_ORIENT:
+ {
+ const SwFmtVertOrient& rOrient =
+ aBoxes[i]->GetFrmFmt()->GetVertOrient();
+ if( !bOneFound )
+ {
+ (SwFmtVertOrient&)rToFill = rOrient;
+ bOneFound = sal_True;
+ }
+ else if( rToFill != rOrient )
+ bRet = sal_False;
+ }
}
if ( sal_False == bRet )
@@ -1220,12 +1223,10 @@ sal_Bool SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) cons
/***********************************************************************
#* Class : SwDoc
#* Methoden : SetBoxAlign, SetBoxAlign
-#* Datum : MA 18. Dec. 96
-#* Update : JP 29.04.98
#***********************************************************************/
void SwDoc::SetBoxAlign( const SwCursor& rCursor, sal_uInt16 nAlign )
{
- ASSERT( nAlign == text::VertOrientation::NONE ||
+ OSL_ENSURE( nAlign == text::VertOrientation::NONE ||
nAlign == text::VertOrientation::CENTER ||
nAlign == text::VertOrientation::BOTTOM, "wrong alignment" );
SwFmtVertOrient aVertOri( 0, nAlign );
@@ -1257,8 +1258,6 @@ sal_uInt16 SwDoc::GetBoxAlign( const SwCursor& rCursor ) const
/***********************************************************************
#* Class : SwDoc
#* Methoden : AdjustCellWidth()
-#* Datum : MA 20. Feb. 95
-#* Update : JP 29.04.98
#***********************************************************************/
sal_uInt16 lcl_CalcCellFit( const SwLayoutFrm *pCell )
{
@@ -1270,11 +1269,10 @@ sal_uInt16 lcl_CalcCellFit( const SwLayoutFrm *pCell )
const SwTwips nAdd = (pFrm->Frm().*fnRect->fnGetWidth)() -
(pFrm->Prt().*fnRect->fnGetWidth)();
- // --> FME 2005-12-02 #127801# pFrm does not necessarily have to be a SwTxtFrm!
+ // pFrm does not necessarily have to be a SwTxtFrm!
const SwTwips nCalcFitToContent = pFrm->IsTxtFrm() ?
((SwTxtFrm*)pFrm)->CalcFitToContent() :
(pFrm->Prt().*fnRect->fnGetWidth)();
- // <--
nRet = Max( nRet, nCalcFitToContent + nAdd );
pFrm = pFrm->GetNext();
@@ -1595,3 +1593,4 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, sal_Bool bBalance )
SetModified();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index f8d7170099ee..792f4ffaa4ce 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <hintids.hxx>
-// --> OD 2005-02-21 #i42921#
-#include <editeng/frmdiritem.hxx>
-// <--
+#include <editeng/frmdiritem.hxx> // #i42921#
#include <editeng/protitem.hxx>
#include <com/sun/star/i18n/CharacterIteratorMode.hdl>
#include <fmtcntnt.hxx>
@@ -71,13 +70,9 @@
#include <crsskip.hxx>
#include <SwStyleNameMapper.hxx>
#include <scriptinfo.hxx>
-// --> OD 2005-12-05 #i27138#
-#include <rootfrm.hxx>
-// <--
+#include <rootfrm.hxx> // #i27138#
#include <istyleaccess.hxx>
-// --> OD 2007-10-31 #i83479#
-#include <IDocumentListItems.hxx>
-// <--
+#include <IDocumentListItems.hxx> // #i83479#
using namespace ::com::sun::star::i18n;
@@ -115,8 +110,8 @@ void SetParent( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
const SwFmt* pConditionalFmt )
{
const SwAttrSet* pAttrSet = static_cast<const SwAttrSet*>(mrpAttrSet.get());
- ASSERT( pAttrSet, "no SwAttrSet" )
- ASSERT( pParentFmt || !pConditionalFmt, "ConditionalFmt without ParentFmt?" )
+ OSL_ENSURE( pAttrSet, "no SwAttrSet" );
+ OSL_ENSURE( pParentFmt || !pConditionalFmt, "ConditionalFmt without ParentFmt?" );
const SwAttrSet* pParentSet = pParentFmt ? &pParentFmt->GetAttrSet() : 0;
@@ -286,12 +281,6 @@ sal_uInt16 ClearItem_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
|* alle EndNodes der GrundSection haben den Level 0
|* alle StartNodes der GrundSection haben den Level 1
|*
-|* Ersterstellung
-|* VER0100 vb 901214
-|*
-|* Aenderung: JP 11.08.93
-|* keine Rekursion mehr !!
-|*
*******************************************************************/
@@ -328,15 +317,9 @@ sal_uInt16 SwNode::GetSectionLevel() const
|* rWhere bezeichnet die Position innerhalb dieses Arrays,
|* an der der Node eingefuegt werden soll
|*
-|* Ersterstellung
-|* VER0100 vb 901214
-|*
-|* Stand
-|* VER0100 vb 901214
-|*
*******************************************************************/
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
long SwNode::nSerial = 0;
#endif
@@ -368,7 +351,7 @@ SwNode::SwNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType )
pStartOfSection = (SwStartNode*)this;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
nMySerial = nSerial;
nSerial++;
#endif
@@ -401,7 +384,7 @@ SwNode::SwNode( SwNodes& rNodes, sal_uLong nPos, const sal_uInt8 nNdType )
pStartOfSection = (SwStartNode*)this;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
nMySerial = nSerial;
nSerial++;
#endif
@@ -532,7 +515,6 @@ sal_Bool SwNode::IsProtect() const
const SwPageDesc* SwNode::FindPageDesc( sal_Bool bCalcLay,
sal_uInt32* pPgDescNdIdx ) const
{
- // OD 18.03.2003 #106329#
if ( !GetNodes().IsDocNodes() )
{
return 0;
@@ -567,7 +549,6 @@ const SwPageDesc* SwNode::FindPageDesc( sal_Bool bCalcLay,
0 != ( pPage = pFrm->FindPageFrm() ) )
{
pPgDesc = pPage->GetPageDesc();
- // OD 18.03.2003 #106329#
if ( pPgDescNdIdx )
{
*pPgDescNdIdx = pNode->GetIndex();
@@ -640,7 +621,7 @@ const SwPageDesc* SwNode::FindPageDesc( sal_Bool bCalcLay,
}
if( n >= rFmts.Count() )
{
- ASSERT( !this, "Fly-Section aber kein Format gefunden" );
+ OSL_ENSURE( !this, "Fly-Section aber kein Format gefunden" );
return sal_False;
}
}
@@ -726,7 +707,7 @@ const SwPageDesc* SwNode::FindPageDesc( sal_Bool bCalcLay,
// kann jetzt nur noch ein Seitengebundener Fly sein
// oder irgendetwas neueres.
// Hier koennen wir nur noch den Standard returnen
- ASSERT( pNd->FindFlyStartNode(),
+ OSL_ENSURE( pNd->FindFlyStartNode(),
"wo befindet sich dieser Node?" );
pPgDesc = &pDoc->GetPageDesc( 0 );
@@ -763,7 +744,6 @@ const SwPageDesc* SwNode::FindPageDesc( sal_Bool bCalcLay,
else if( pNd->IsSectionNode() )
pPgDesc = pNd->GetSectionNode()->GetSection().
GetFmt()->GetPageDesc().GetPageDesc();
- // OD 18.03.2003 #106329#
if ( pPgDescNdIdx )
{
*pPgDescNdIdx = pNd->GetIndex();
@@ -877,7 +857,6 @@ const SwTxtNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const
// oder ans Feld und von dort holen !!
while( nPos &&
nLvl < ( pRet = rONds[nPos]->GetTxtNode() )
- //->GetTxtColl()->GetOutlineLevel() )//#outline level,zhaojianwei
->GetAttrOutlineLevel() - 1 ) //<-end,zhaojianwei
--nPos;
@@ -904,8 +883,7 @@ sal_uInt8 SwNode::HasPrevNextLayNode() const
if( IsValidNextPrevNd( *this ))
{
SwNodeIndex aIdx( *this, -1 );
- // --> OD 2007-06-04 #i77805#
- // skip section start and end nodes
+ // #i77805# - skip section start and end nodes
while ( aIdx.GetNode().IsSectionNode() ||
( aIdx.GetNode().IsEndNode() &&
aIdx.GetNode().StartOfSectionNode()->IsSectionNode() ) )
@@ -915,9 +893,7 @@ sal_uInt8 SwNode::HasPrevNextLayNode() const
// <--
if( IsValidNextPrevNd( aIdx.GetNode() ))
nRet |= ND_HAS_PREV_LAYNODE;
- // --> OD 2007-06-04 #i77805#
- // skip section start and end nodes
-// aIdx += 2;
+ // #i77805# - skip section start and end nodes
aIdx = SwNodeIndex( *this, +1 );
while ( aIdx.GetNode().IsSectionNode() ||
( aIdx.GetNode().IsEndNode() &&
@@ -925,7 +901,6 @@ sal_uInt8 SwNode::HasPrevNextLayNode() const
{
++aIdx;
}
- // <--
if( IsValidNextPrevNd( aIdx.GetNode() ))
nRet |= ND_HAS_NEXT_LAYNODE;
}
@@ -943,11 +918,6 @@ sal_uInt8 SwNode::HasPrevNextLayNode() const
|* IN
|* rNodes bezeichnet das variable Array, in dem sich der Node
|* befindet
-|* Ersterstellung
-|* VER0100 vb 901214
-|*
-|* Stand
-|* VER0100 vb 901214
|*
*******************************************************************/
@@ -1002,12 +972,6 @@ void SwStartNode::CheckSectionCondColl() const
|* !!!!!!!!!!!!
|* Es wird eine Kopie uebergeben!
|*
-|* Ersterstellung
-|* VER0100 vb 901214
-|*
-|* Stand
-|* VER0100 vb 901214
-|*
*******************************************************************/
@@ -1038,9 +1002,6 @@ SwCntntNode::SwCntntNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
SwNode( rWhere, nNdType ),
pCondColl( 0 ),
mbSetModifyAtAttr( false )
-#ifdef OLD_INDEX
- ,SwIndexReg(2)
-#endif
{
}
@@ -1194,7 +1155,7 @@ xub_StrLen SwCntntNode::Len() const { return 0; }
SwFmtColl *SwCntntNode::ChgFmtColl( SwFmtColl *pNewColl )
{
- ASSERT( pNewColl, "Collectionpointer ist 0." );
+ OSL_ENSURE( pNewColl, "Collectionpointer ist 0." );
SwFmtColl *pOldColl = GetFmtColl();
if( pNewColl != pOldColl )
@@ -1338,7 +1299,7 @@ sal_Bool SwCntntNode::GoPrevious(SwIndex * pIdx, sal_uInt16 nMode ) const
void SwCntntNode::MakeFrms( SwCntntNode& rNode )
{
- ASSERT( &rNode != this,
+ OSL_ENSURE( &rNode != this,
"Kein Contentnode oder Copy-Node und neuer Node identisch." );
if( !GetDepends() || &rNode == this ) // gibt es ueberhaupt Frames ??
@@ -1347,7 +1308,7 @@ void SwCntntNode::MakeFrms( SwCntntNode& rNode )
SwFrm *pFrm, *pNew;
SwLayoutFrm *pUpper;
// Frames anlegen fuer Nodes, die vor oder hinter der Tabelle stehen ??
- ASSERT( FindTableNode() == rNode.FindTableNode(), "Table confusion" )
+ OSL_ENSURE( FindTableNode() == rNode.FindTableNode(), "Table confusion" );
SwNode2Layout aNode2Layout( *this, rNode.GetIndex() );
@@ -1355,7 +1316,7 @@ void SwCntntNode::MakeFrms( SwCntntNode& rNode )
{
pNew = rNode.MakeFrm();
pNew->Paste( pUpper, pFrm );
- // --> OD 2005-12-01 #i27138#
+ // #i27138#
// notify accessibility paragraphs objects about changed
// CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for next paragraph will change
@@ -1393,7 +1354,7 @@ void SwCntntNode::DelFrms()
for( pFrm = (SwCntntFrm*)aIter.First( TYPE(SwCntntFrm)); pFrm;
pFrm = (SwCntntFrm*)aIter.Next() )
{
- // --> OD 2005-12-01 #i27138#
+ // #i27138#
// notify accessibility paragraphs objects about changed
// CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for current next paragraph will change
@@ -1429,12 +1390,12 @@ void SwCntntNode::DelFrms()
!pFrm->GetIndPrev() )
{
SwFtnFrm *pFtn = pFrm->FindFtnFrm();
- ASSERT( pFtn, "You promised a FtnFrm?" );
+ OSL_ENSURE( pFtn, "You promised a FtnFrm?" );
SwCntntFrm* pCFrm;
if( !pFtn->GetFollow() && !pFtn->GetMaster() &&
0 != ( pCFrm = pFtn->GetRefFromAttr()) && pCFrm->IsFollow() )
{
- ASSERT( pCFrm->IsTxtFrm(), "NoTxtFrm has Footnote?" );
+ OSL_ENSURE( pCFrm->IsTxtFrm(), "NoTxtFrm has Footnote?" );
((SwTxtFrm*)pCFrm->FindMaster())->Prepare( PREP_FTN_GONE );
}
}
@@ -1483,25 +1444,6 @@ sal_Bool SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
return sal_False;
}
break;
- // --> OD 2008-02-19 #refactorlists#
-// case RES_GETNUMNODES:
-// // #111955# only numbered nodes in rInfo
-// if( IsTxtNode())
-// {
-// SwTxtNode * pTxtNode = (SwTxtNode*)this;
-// pItem = (SwNumRuleItem*)GetNoCondAttr(RES_PARATR_NUMRULE, sal_True );
-
-// if (0 != pItem &&
-// pItem->GetValue().Len() &&
-// pItem->GetValue() == ((SwNumRuleInfo&)rInfo).GetName() &&
-// GetNodes().IsDocNodes())
-// {
-// ((SwNumRuleInfo&)rInfo).AddNode( *pTxtNode );
-// }
-// }
-
-// return sal_True;
- // <--
case RES_FINDNEARESTNODE:
if( ((SwFmtPageDesc&)GetAttr( RES_PAGEDESC )).GetPageDesc() )
@@ -1526,7 +1468,7 @@ sal_Bool SwCntntNode::SetAttr(const SfxPoolItem& rAttr )
if( !GetpSwAttrSet() ) // lasse von den entsprechenden Nodes die
NewAttrSet( GetDoc()->GetAttrPool() ); // AttrSets anlegen
- ASSERT( GetpSwAttrSet(), "warum wurde kein AttrSet angelegt?" );
+ OSL_ENSURE( GetpSwAttrSet(), "warum wurde kein AttrSet angelegt?" );
if ( IsInCache() )
{
@@ -1567,7 +1509,7 @@ sal_Bool SwCntntNode::SetAttr( const SfxItemSet& rSet )
const SfxPoolItem* pFnd = 0;
if( SFX_ITEM_SET == rSet.GetItemState( RES_AUTO_STYLE, sal_False, &pFnd ) )
{
- ASSERT( rSet.Count() == 1, "SetAutoStyle mixed with other attributes?!" );
+ OSL_ENSURE( rSet.Count() == 1, "SetAutoStyle mixed with other attributes?!" );
const SwFmtAutoFmt* pTmp = static_cast<const SwFmtAutoFmt*>(pFnd);
// If there already is an attribute set (usually containing a numbering
@@ -1783,7 +1725,7 @@ sal_uInt16 SwCntntNode::ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rW
if ( 0 == rWhichIds.size() )
return nRet;
- ASSERT( GetpSwAttrSet(), "no item set" )
+ OSL_ENSURE( GetpSwAttrSet(), "no item set" );
SwAttrSet aNewAttrSet( *GetpSwAttrSet() );
for ( std::vector<sal_uInt16>::const_iterator aIter = rWhichIds.begin();
aIter != rWhichIds.end();
@@ -1807,7 +1749,7 @@ const SfxPoolItem* SwCntntNode::GetNoCondAttr( sal_uInt16 nWhich,
nWhich, sal_False, &pFnd ) && bInParents ))
((SwFmt*)GetRegisteredIn())->GetItemState( nWhich, bInParents, &pFnd );
}
- // --> OD 2005-10-25 #126347# - undo change of issue #i51029#
+ // undo change of issue #i51029#
// Note: <GetSwAttrSet()> returns <mpAttrSet>, if set, otherwise it returns
// the attribute set of the paragraph style, which is valid for the
// content node - see file <node.hxx>
@@ -2037,7 +1979,7 @@ void SwCntntNode::ChkCondColl()
}
}
-// --> OD 2005-02-21 #i42921#
+// #i42921#
short SwCntntNode::GetTextDirection( const SwPosition& rPos,
const Point* pPt ) const
{
@@ -2047,10 +1989,8 @@ short SwCntntNode::GetTextDirection( const SwPosition& rPos,
if( pPt )
aPt = *pPt;
- // --> OD 2007-01-10 #i72024#
- // No format of the frame, because this can cause recursive layout actions
+ // #i72024# - No format of the frame, because this can cause recursive layout actions
SwFrm* pFrm = GetFrm( &aPt, &rPos, sal_False );
- // <--
if ( pFrm )
{
@@ -2107,12 +2047,11 @@ const IDocumentFieldsAccess* SwNode::getIDocumentFieldsAccess() const { return G
IDocumentFieldsAccess* SwNode::getIDocumentFieldsAccess() { return GetDoc(); }
IDocumentContentOperations* SwNode::getIDocumentContentOperations() { return GetDoc(); }
IStyleAccess& SwNode::getIDocumentStyleAccess() { return GetDoc()->GetIStyleAccess(); }
-// --> OD 2007-10-31 #i83479#
+// #i83479#
IDocumentListItems& SwNode::getIDocumentListItems()
{
return *GetDoc();
}
-// <--
sal_Bool SwNode::IsInRedlines() const
{
@@ -2124,3 +2063,5 @@ sal_Bool SwNode::IsInRedlines() const
return bResult;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx
index ca80bc391c7a..88169f482382 100644
--- a/sw/source/core/docnode/node2lay.cxx
+++ b/sw/source/core/docnode/node2lay.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,7 +44,7 @@
#include "node2lay.hxx"
-/* -----------------25.02.99 10:31-------------------
+/* --------------------------------------------------
* Die SwNode2LayImpl-Klasse erledigt die eigentliche Arbeit,
* die SwNode2Layout-Klasse ist nur die der Oefffentlichkeit bekannte Schnittstelle
* --------------------------------------------------*/
@@ -68,7 +69,7 @@ public:
const sal_Bool bCalcFrm = sal_True ) const;
};
-/* -----------------25.02.99 10:38-------------------
+/* --------------------------------------------------
* Hauptaufgabe des Ctor: Das richtige SwModify zu ermitteln,
* ueber das iteriert wird.
* Uebergibt man bSearch == sal_True, so wird der naechste Cntnt- oder TableNode
@@ -114,7 +115,7 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, sal_Bool bS
pMod = (SwModify*)pNd->GetCntntNode();
else
{
- ASSERT( pNd->IsTableNode(), "For Tablenodes only" );
+ OSL_ENSURE( pNd->IsTableNode(), "For Tablenodes only" );
pMod = pNd->GetTableNode()->GetTable().GetFrmFmt();
}
pIter = new SwClientIter( *pMod );
@@ -123,7 +124,7 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, sal_Bool bS
pIter = NULL;
}
-/* -----------------25.02.99 10:41-------------------
+/* --------------------------------------------------
* SwNode2LayImpl::NextFrm() liefert den naechsten "sinnvollen" Frame,
* beim ersten Aufruf wird am eigentlichen Iterator ein First gerufen,
* danach die Next-Methode. Das Ergebnis wird auf Brauchbarkeit untersucht,
@@ -149,7 +150,7 @@ SwFrm* SwNode2LayImpl::NextFrm()
while( pRet )
{
SwFlowFrm* pFlow = SwFlowFrm::CastFlowFrm( pRet );
- ASSERT( pFlow, "Cntnt or Table expected?!" );
+ OSL_ENSURE( pFlow, "Cntnt or Table expected?!" );
// Follows sind fluechtige Gestalten, deshalb werden sie ignoriert.
// Auch wenn wir hinter dem Frame eingefuegt werden sollen, nehmen wir
// zunaechst den Master, hangeln uns dann aber zum letzten Follow durch.
@@ -171,9 +172,9 @@ SwFrm* SwNode2LayImpl::NextFrm()
// und nicht ausserhalb liegt.
if( !pRet->IsInFtn() || pSct->IsInFtn() )
{
- ASSERT( pSct && pSct->GetSection(), "Where's my section?" );
+ OSL_ENSURE( pSct && pSct->GetSection(), "Where's my section?" );
SwSectionNode* pNd = pSct->GetSection()->GetFmt()->GetSectionNode();
- ASSERT( pNd, "Lost SectionNode" );
+ OSL_ENSURE( pNd, "Lost SectionNode" );
// Wenn der erhaltene Frame in einem Bereichsframe steht,
// dessen Bereich den Ausgangsnode nicht umfasst, so kehren
// wir mit dem SectionFrm zurueck, sonst mit dem Cntnt/TabFrm
@@ -231,12 +232,12 @@ SwLayoutFrm* SwNode2LayImpl::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode )
SwFrm* pFrm = bMaster ? rpFrm->FindPrev() : rpFrm->FindNext();
if( pFrm && pFrm->IsSctFrm() )
{
- // #137684#: pFrm could be a "dummy"-section
+ // pFrm could be a "dummy"-section
if( ((SwSectionFrm*)pFrm)->GetSection() &&
(&((SwSectionNode*)pNode)->GetSection() ==
((SwSectionFrm*)pFrm)->GetSection()) )
{
- // OD 2004-06-02 #i22922# - consider columned sections
+ // #i22922# - consider columned sections
// 'Go down' the section frame as long as the layout frame
// is found, which would contain content.
while ( pFrm->IsLayoutFrm() &&
@@ -246,11 +247,11 @@ SwLayoutFrm* SwNode2LayImpl::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode )
{
pFrm = static_cast<SwLayoutFrm*>(pFrm)->Lower();
}
- ASSERT( pFrm->IsLayoutFrm(),
+ OSL_ENSURE( pFrm->IsLayoutFrm(),
"<SwNode2LayImpl::UpperFrm(..)> - expected upper frame isn't a layout frame." );
rpFrm = bMaster ? NULL
: static_cast<SwLayoutFrm*>(pFrm)->Lower();
- ASSERT( !rpFrm || rpFrm->IsFlowFrm(),
+ OSL_ENSURE( !rpFrm || rpFrm->IsFlowFrm(),
"<SwNode2LayImpl::UpperFrm(..)> - expected sibling isn't a flow frame." );
return static_cast<SwLayoutFrm*>(pFrm);
}
@@ -279,7 +280,7 @@ SwLayoutFrm* SwNode2LayImpl::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode )
void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd )
{
- ASSERT( pUpperFrms, "RestoreUpper without SaveUpper?" )
+ OSL_ENSURE( pUpperFrms, "RestoreUpper without SaveUpper?" );
SwNode* pNd;
SwDoc *pDoc = rNds.GetDoc();
sal_Bool bFirst = sal_True;
@@ -315,7 +316,7 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong
else
pNxt = pUp->Lower();
pNew = ((SwTableNode*)pNd)->MakeFrm();
- ASSERT( pNew->IsTabFrm(), "Table exspected" );
+ OSL_ENSURE( pNew->IsTabFrm(), "Table exspected" );
pNew->Paste( pUp, pNxt );
((SwTabFrm*)pNew)->RegistFlys();
(*pUpperFrms)[x-2] = pNew;
@@ -329,7 +330,7 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong
if( bFirst && pNxt && pNxt->IsSctFrm() )
((SwSectionFrm*)pNxt)->UnlockJoin();
pUp = (SwLayoutFrm*)(*pUpperFrms)[x++];
- ASSERT( pUp->GetUpper() || pUp->IsFlyFrm(), "Lost Upper" );
+ OSL_ENSURE( pUp->GetUpper() || pUp->IsFlyFrm(), "Lost Upper" );
::_InsertCnt( pUp, pDoc, pNd->GetIndex(), sal_False, nStt+1, pNxt );
pNxt = pUp->GetLastLower();
(*pUpperFrms)[x-2] = pNxt;
@@ -346,7 +347,7 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong
{
SwSectionFrm* pSctFrm = pTmp->FindSctFrm();
pSctFrm->ColUnlock();
- // OD 26.08.2003 #i18103# - invalidate size of section in order to
+ // #i18103# - invalidate size of section in order to
// assure, that the section is formatted, unless it was 'Collocked'
// from its 'collection' until its 'restoration'.
pSctFrm->_InvalidateSize();
@@ -376,7 +377,7 @@ SwNode2Layout::SwNode2Layout( const SwNode& rNd )
void SwNode2Layout::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd )
{
- ASSERT( pImpl, "RestoreUpperFrms without SaveUpperFrms" );
+ OSL_ENSURE( pImpl, "RestoreUpperFrms without SaveUpperFrms" );
pImpl->RestoreUpperFrms( rNds, nStt, nEnd );
}
@@ -403,3 +404,4 @@ SwFrm* SwNode2Layout::GetFrm( const Point* pDocPos,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 5ef2df851e17..ab3f5df151b1 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,12 +59,6 @@ extern sal_Bool CheckNodesRange( const SwNodeIndex& rStt,
SV_DECL_PTRARR(SwSttNdPtrs,SwStartNode*,2,2)
-//#define JP_DEBUG
-#ifdef JP_DEBUG
-#include "shellio.hxx"
-#endif
-
-
// Funktion zum bestimmen des hoechsten Levels innerhalb des Bereiches
sal_uInt16 HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange );
@@ -82,7 +77,7 @@ SwNodes::SwNodes( SwDoc* pDocument )
{
bInNodesDel = bInDelUpdOutl = bInDelUpdNum = sal_False;
- ASSERT( pMyDoc, "in welchem Doc stehe ich denn?" );
+ OSL_ENSURE( pMyDoc, "in welchem Doc stehe ich denn?" );
sal_uLong nPos = 0;
SwStartNode* pSttNd = new SwStartNode( *this, nPos++ );
@@ -116,12 +111,6 @@ SwNodes::SwNodes( SwDoc* pDocument )
|* Arrays nicht erzeugt werden koennen und somit auch nicht
|* in mehreren drin sein koennen
|*
-|* Ersterstellung
-|* VER0100 vb 901214
-|*
-|* Stand
-|* VER0100 vb 901214
-|*
*******************************************************************/
SwNodes::~SwNodes()
@@ -176,20 +165,16 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
SwNodeIndex aDelIdx( *this, n );
SwNode& rNd = aDelIdx.GetNode();
- // --> OD 2005-11-16 #i57920#
- // correction of refactoring done by cws swnumtree:
+ // #i57920# - correction of refactoring done by cws swnumtree:
// - <SwTxtNode::SetLevel( NO_NUMBERING ) is deprecated and
// set <IsCounted> state of the text node to <false>, which
// isn't correct here.
if ( rNd.IsTxtNode() )
{
SwTxtNode* pTxtNode = rNd.GetTxtNode();
- // --> OD 2008-03-13 #refactorlists#
-// pTxtNode->UnregisterNumber();
+
pTxtNode->RemoveFromList();
- // <--
- //if ( pTxtNode->GetTxtColl()->GetOutlineLevel() != NO_NUMBERING )//#outline level,zhaojianwei
if ( pTxtNode->GetAttrOutlineLevel() != 0 )//<-end,zhaojianwei
{
const SwNodePtr pSrch = (SwNodePtr)&rNd;
@@ -203,13 +188,10 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
if( rNd.IsTxtNode() )
{
SwTxtNode& rTxtNd = (SwTxtNode&)rNd;
- // --> OD 2008-03-13 #refactorlists#
-// rTxtNd.SyncNumberAndNumRule();
+
rTxtNd.AddToList();
- // <--
if( bInsOutlineIdx &&
- //NO_NUMBERING != rTxtNd.GetTxtColl()->GetOutlineLevel() )//#outline level,zhaojianwei
0 != rTxtNd.GetAttrOutlineLevel() )//<-end,zhaojianwei
{
const SwNodePtr pSrch = (SwNodePtr)&rNd;
@@ -254,7 +236,6 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
SwTxtNode* pTxtNd = (SwTxtNode*)pNd;
// loesche die Gliederungs-Indizies aus dem alten Nodes-Array
- //if( NO_NUMBERING != pTxtNd->GetTxtColl()->GetOutlineLevel() )//#outline level,zhaojianwei
if( 0 != pTxtNd->GetAttrOutlineLevel() )//<-end,zhaojianwei
pOutlineNds->Remove( pNd );
@@ -277,10 +258,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
// Numerierungen auch aktualisiert werden.
pTxtNd->InvalidateNumRule();
- // --> OD 2008-03-13 #refactorlists#
-// pTxtNd->UnregisterNumber();
pTxtNd->RemoveFromList();
- // <--
}
RemoveNode( rDelPos.GetIndex(), 1, sal_False ); // Indizies verschieben !!
@@ -293,19 +271,14 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
if( pTxtNd )
{
SwpHints * const pHts = pTxtNd->GetpSwpHints();
- // setze die OultineNodes im neuen Nodes-Array
- //if( bInsOutlineIdx && NO_NUMBERING != //#outline level,removed by zhaojianwei
- // pTxtNd->GetTxtColl()->GetOutlineLevel() )
+ // OultineNodes set the new nodes in the array
if( bInsOutlineIdx &&
0 != pTxtNd->GetAttrOutlineLevel() ) //#outline level,added by zhaojianwei
{
rNds.pOutlineNds->Insert( pTxtNd );
}
- // --> OD 2008-03-13 #refactorlists#
-// pTxtNd->SyncNumberAndNumRule();
pTxtNd->AddToList();
- // <--
// Sonderbehandlung fuer die Felder!
if( pHts && pHts->Count() )
@@ -413,15 +386,15 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
if( !pFrmNd && aFrmNdIdx > rNds.GetEndOfExtras().GetIndex() )
{
- ASSERT( !this, "ob das so richtig ist ??" );
+ OSL_ENSURE( !this, "ob das so richtig ist ??" );
aFrmNdIdx = rNds.GetEndOfContent();
pFrmNd = rNds.GoPrevSection( &aFrmNdIdx, sal_True, sal_False );
if( pFrmNd && !((SwCntntNode*)pFrmNd)->GetDepends() )
pFrmNd = 0;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( !pFrmNd )
- ASSERT( !this, "ChgNode() - kein FrameNode gefunden" );
+ OSL_ENSURE( !this, "ChgNode() - kein FrameNode gefunden" );
#endif
}
if( pFrmNd )
@@ -460,8 +433,6 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
|* Allg.: aRange beschreibt den Bereich -exklusive- aEnd !!
|* ( 1.Node: aStart, letzer Node: aEnd-1 !! )
|*
-|*
-|*
***********************************************************************/
sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
@@ -512,14 +483,10 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
// setze den Start-Index
SwNodeIndex aIdx( aIndex );
-/*
- --- JP 17.11.94: sollte ueberholt sein, wird im ChgNode schon erledigt!
- sal_Bool bCorrNum = pSect && pSect->aStart.GetIndex() == aIdx.GetIndex();
-*/
SwStartNode* pStartNode = aIdx.GetNode().pStartOfSection;
aSttNdStack.C40_INSERT( SwStartNode, pStartNode, 0 );
-// aSttNdStack.Insert( rNodes[ aIdx ]->pStartOfSection, 0 );
+
SwNodeRange aOrigInsPos( aIdx, -1, aIdx ); // Originale Insert Pos
//JP 16.01.98: SectionNodes: DelFrms/MakeFrms beim obersten SectionNode!
@@ -577,22 +544,16 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
if( pTmpNd->IsTxtNode() )
((SwTxtNode*)pTmpNd)->RemoveFromList();
-// if( bNewFrms )
-// pCNd->DelFrms();
-
// setze bei Start/EndNodes die richtigen Indizies
// loesche die Gliederungs-Indizies aus
// dem alten Nodes-Array
- //if( pCNd->IsTxtNode() && NO_NUMBERING != //#outline level,zhaojianwei
- // ((SwTxtNode*)pCNd)->GetTxtColl()->GetOutlineLevel() )
if( pCNd->IsTxtNode() && 0 !=
((SwTxtNode*)pCNd)->GetAttrOutlineLevel() )//<-end,by zhaojianwei
pOutlineNds->Remove( pCNd );
else
pCNd = 0;
}
-// else if( bNewFrms && pTmpNd->IsSectionNode() )
-// ((SwSectionNode*)pTmpNd)->DelFrms();
+
BigPtrArray::Move( aMvIdx.GetIndex(), aIdx.GetIndex() );
if( bInsOutlineIdx && pCNd )
@@ -616,16 +577,7 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
for( sal_uLong n = 0; n < nInsPos; ++n )
{
SwNode* pNd = &aMvIdx.GetNode();
-/* if( bNewFrms )
- {
- if( pNd->IsCntntNode() )
- ((SwCntntNode*)pNd)->DelFrms();
- else if( pNd->IsSectionNode() )
- ((SwSectionNode*)pNd)->DelFrms();
- }
-*/
- //sal_Bool bOutlNd = pNd->IsTxtNode() && NO_NUMBERING !=//#outline level,zhaojianwei
- // ((SwTxtNode*)pNd)->GetTxtColl()->GetOutlineLevel();
+
const bool bOutlNd = pNd->IsTxtNode() &&
0 != ((SwTxtNode*)pNd)->GetAttrOutlineLevel();//<-end,zhaojianwei
// loesche die Gliederungs-Indizies aus
@@ -792,7 +744,7 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
case ND_TABLENODE:
case ND_STARTNODE:
{
- // Bug #78589# - empty section -> nothing to do
+ // empty section -> nothing to do
// and only if it's a top level section
if( !nInsPos && !nLevel )
{
@@ -844,7 +796,7 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
}
else // es wurden alle Nodes innerhalb eines
{ // Start- und End-Nodes verschoben
- ASSERT( pAktNode == aSttNdStack[nLevel] ||
+ OSL_ENSURE( pAktNode == aSttNdStack[nLevel] ||
( pAktNode->IsStartNode() &&
aSttNdStack[nLevel]->IsSectionNode()),
"falscher StartNode" );
@@ -855,7 +807,6 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
nInsPos = 0;
// loesche nur noch den Pointer aus dem Nodes-Array.
-// RemoveNode( aRg.aEnd.GetIndex(), 1, sal_False );
RemoveNode( aRg.aEnd.GetIndex(), 1, sal_True );
aRg.aEnd--;
@@ -879,7 +830,6 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
DelNodes( aRg.aEnd, 2 );
aRg.aEnd--;
}
-// aRg.aEnd--;
}
break;
@@ -926,13 +876,13 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
}
}
else {
- ASSERT( sal_False, "wie kommt diser Node ins Nodes-Array??" );
+ OSL_ENSURE( sal_False, "wie kommt diser Node ins Nodes-Array??" );
}
aRg.aEnd--;
break;
default:
- ASSERT( sal_False, "was ist das fuer ein Node??" );
+ OSL_ENSURE( sal_False, "was ist das fuer ein Node??" );
break;
}
@@ -966,21 +916,6 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
rNodes.UpdtOutlineIdx( aOrigInsPos.aStart.GetNode() );
}
-#ifdef JP_DEBUG
- {
-extern Writer* GetDebugWriter(const String&);
-
- Writer* pWriter = GetDebugWriter(aEmptyStr);
- if( pWriter )
- {
- int nError;
- SvFileStream aStrm( "c:\\$$move.db", STREAM_WRITE );
- SwWriter aWriter( aStrm, *pMyDoc );
- aWriter.Write( &nError, pWriter );
- }
- }
-#endif
-
return sal_True;
}
@@ -1023,12 +958,6 @@ extern Writer* GetDebugWriter(const String&);
|* die Debugging Tools geben rRange beim Eintritt und beim
|* Verlassen der Funktion aus
|*
-|* Ersterstellung
-|* VER0100 vb 901214
-|*
-|* Stand
-|* VER0100 vb 901214
-|*
*******************************************************************/
void SwNodes::SectionDown(SwNodeRange *pRange, SwStartNodeType eSttNdTyp )
{
@@ -1100,12 +1029,6 @@ void SwNodes::SectionDown(SwNodeRange *pRange, SwStartNodeType eSttNdTyp )
|* die Debugging Tools geben rRange beim Eintritt und beim
|* Verlassen der Funktion aus
|*
-|* Ersterstellung
-|* VER0100 vb 901214
-|*
-|* Stand
-|* VER0100 vb 901214
-|*
*******************************************************************/
void SwNodes::SectionUp(SwNodeRange *pRange)
{
@@ -1180,9 +1103,6 @@ void SwNodes::SectionUp(SwNodeRange *pRange)
|* SwIndex & aStart StartNode !!!
|* SwIndex & aEnd EndPunkt
|*
-|* Ersterstellung JP 23.04.91
-|* Letzte Aenderung JP 23.04.91
-|*
*************************************************************************/
void SwNodes::SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEnd )
{
@@ -1251,12 +1171,6 @@ void SwNodes::SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEn
|* geben beim Eintritt in die Funktion Position und Anzahl
|* der zu loeschenden Nodes aus.
|*
-|* Ersterstellung
-|* VER0100 vb 901214
-|*
-|* Stand
-|* VER0100 vb 901214
-|*
*******************************************************************/
void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes)
{
@@ -1314,8 +1228,6 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes)
if( pNd->IsTxtNode() )
{
- //if( NO_NUMBERING != //#outline level,zhaojianwei
- // ((SwTxtNode*)pNd)->GetTxtColl()->GetOutlineLevel() &&
if( 0 != ((SwTxtNode*)pNd)->GetAttrOutlineLevel() &&//<-end,zhaojianwei
pOutlineNds->Seek_Entry( pNd, &nIdxPos ))
{
@@ -1455,12 +1367,6 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes)
|* eine Sonderbehandlung; es wird davon ausgegangen, dass der
|* erste Node auch ein Startnode ist.
|*
-|* Ersterstellung
-|* VER0100 vb 901214
-|*
-|* Stand
-|* VER0100 vb 901214
-|*
*******************************************************************/
sal_uInt16 SwNodes::GetSectionLevel(const SwNodeIndex &rIdx) const {
// Sonderbehandlung 1. Node
@@ -1625,9 +1531,6 @@ SwNode* SwNodes::GoPreviousWithFrm(SwNodeIndex *pIdx) const
|* Return-Wert sal_Bool sal_True: gueltiger SRange
|* sal_False: ungueltiger SRange
|*
-|* Ersterstellung JP 23.04.91
-|* Letzte Aenderung JP 18.06.92
-|*
*************************************************************************/
inline int TstIdx( sal_uLong nSttIdx, sal_uLong nEndIdx, sal_uLong nStt, sal_uLong nEnd )
@@ -1664,13 +1567,9 @@ sal_Bool SwNodes::CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& r
|* Parameter SwIndex & Der Startpunkt im Nodes-Array
|* sal_uInt16 die Anzahl
|*
-|* Ersterstellung JP 23.04.91
-|* Letzte Aenderung JP 23.04.91
-|*
*************************************************************************/
void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt )
{
- int bUpdateNum = 0;
sal_uLong nSttIdx = rStart.GetIndex();
if( !nSttIdx && nCnt == GetEndOfContent().GetIndex()+1 )
@@ -1698,12 +1597,12 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt )
}
else
{
+ int bUpdateNum = 0;
for( sal_uLong n = nSttIdx, nEnd = nSttIdx + nCnt; n < nEnd; ++n )
{
SwNode* pNd = (*this)[ n ];
if( pNd->IsTxtNode() &&
- //NO_NUMBERING != ((SwTxtNode*)pNd)->GetTxtColl()->GetOutlineLevel() )//#outline level,zhaojianwei
0 != ((SwTxtNode*)pNd)->GetAttrOutlineLevel() ) //<-end,zhaojianwei
{ // loesche die Gliederungs-Indizies.
sal_uInt16 nIdxPos;
@@ -1739,9 +1638,6 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt )
|* SwNodeRange & der zu ueberpruefende Bereich
|* Return sal_uInt16 der hoechste Level
|*
-|* Ersterstellung JP 24.04.91
-|* Letzte Aenderung JP 24.04.91
-|*
*************************************************************************/
struct HighLevel
@@ -1780,8 +1676,6 @@ sal_uInt16 HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange )
|* Parameter SwPaM& zu kopierender Bereich
|* SwNodes& in dieses Nodes-Array
|* SwPosition& auf diese Position im Nodes-Array
-|* Ersterstellung JP 09.07.92
-|* Letzte Aenderung JP 09.07.92
|*
*************************************************************************/
void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
@@ -2005,7 +1899,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
if ( &pStt->nNode.GetNode() == &GetEndOfContent() )
{
const bool bSuccess = GoPrevious( &pStt->nNode );
- ASSERT( bSuccess, "Move() - no ContentNode here" );
+ OSL_ENSURE( bSuccess, "Move() - no ContentNode here" );
(void) bSuccess;
}
pStt->nContent.Assign( pStt->nNode.GetNode().GetCntntNode(),
@@ -2029,8 +1923,6 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
|* Parameter SwNodeRange& zu kopierender Bereich
|* SwDoc& in dieses Dokument
|* SwIndex& auf diese Position im Nodes-Array
-|* Ersterstellung JP 11.11.92
-|* Letzte Aenderung JP 11.11.92
|*
*************************************************************************/
@@ -2224,31 +2116,15 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange,
aInsPos++; // ueberspringen
}
else {
- ASSERT( sal_False, "wie kommt diser Node ins Nodes-Array??" );
+ OSL_ENSURE( sal_False, "wie kommt diser Node ins Nodes-Array??" );
}
break;
default:
- ASSERT( sal_False, "weder Start-/End-/Content-Node, unbekannter Typ" );
+ OSL_ENSURE( sal_False, "weder Start-/End-/Content-Node, unbekannter Typ" );
}
aRg.aStart++;
}
-
-
-#ifdef JP_DEBUG
- {
-extern Writer* GetDebugWriter(const String&);
-
- Writer* pWriter = GetDebugWriter(aEmptyStr);
- if( pWriter )
- {
- int nError;
- SvFileStream aStrm( "c:\\$$copy.db", STREAM_WRITE );
- SwWriter aWriter( aStrm, *pMyDoc );
- aWriter.Write( &nError, pWriter );
- }
- }
-#endif
}
void SwNodes::_DelDummyNodes( const SwNodeRange& rRg )
@@ -2417,7 +2293,7 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
: pSttNd->FindSectionNode();
if( !( pSectNd && pSectNd->GetSection().CalcHiddenFlag()/*IsHiddenFlag()*/ ) )
{
- // #130650# in a table in table situation we have to assure that we don't leave the
+ // in a table in table situation we have to assure that we don't leave the
// outer table cell when the inner table is looking for a PrvNxt...
SwTableNode* pTableNd = pSttNd->IsTableNode()
? pSttNd->StartOfSectionNode()->FindTableNode()
@@ -2576,10 +2452,7 @@ void SwNodes::RemoveNode( sal_uLong nDelPos, sal_uLong nSz, sal_Bool bDel )
if (pTxtNd)
{
- // --> OD 2008-03-13 #refactorlists#
-// pTxtNd->UnregisterNumber();
pTxtNd->RemoveFromList();
- // <--
}
}
}
@@ -2688,13 +2561,9 @@ SwNode * SwNodes::DocumentSectionEndNode(SwNode * pNode) const
return DocumentSectionStartNode(pNode)->EndOfSectionNode();
}
-//SwNode * SwNodes::operator[](int n) const
-//{
-// return operator[]((sal_uLong) n);
-//}
-// <-#112139#
-
sal_Bool SwNodes::IsDocNodes() const
{
return this == &pMyDoc->GetNodes();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/observablethread.cxx b/sw/source/core/docnode/observablethread.cxx
index 347575165cc4..cafeb9b610b1 100644
--- a/sw/source/core/docnode/observablethread.cxx
+++ b/sw/source/core/docnode/observablethread.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
/** class for an observable thread
- OD 2007-01-29 #i73788#
+ #i73788#
@author OD
*/
@@ -95,3 +96,5 @@ void ObservableThread::threadFinished()
{
// empty default implementation
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/pausethreadstarting.cxx b/sw/source/core/docnode/pausethreadstarting.cxx
index d9c9293dce51..df4a060dea67 100644
--- a/sw/source/core/docnode/pausethreadstarting.cxx
+++ b/sw/source/core/docnode/pausethreadstarting.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
/** Helper class to pause starting of threads during existence of an instance
of this class
- OD 2007-03-16 #i73788#
+ #i73788#
@author OD
*/
@@ -53,3 +54,5 @@ SwPauseThreadStarting::~SwPauseThreadStarting()
SwThreadManager::GetThreadManager().ResumeStartingOfThreads();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/retrievedinputstreamdata.cxx b/sw/source/core/docnode/retrievedinputstreamdata.cxx
index 21fa5284ac26..78bf5b144e05 100644
--- a/sw/source/core/docnode/retrievedinputstreamdata.cxx
+++ b/sw/source/core/docnode/retrievedinputstreamdata.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
/** implementation of class <SwRetrievedInputStreamDataManager>
- OD 2007-01-30 #i73788#
+ #i73788#
*/
SwRetrievedInputStreamDataManager* SwRetrievedInputStreamDataManager::mpManager = 0;
SwRetrievedInputStreamDataManager::tDataKey SwRetrievedInputStreamDataManager::mnNextKeyValue = 1;
@@ -130,7 +131,7 @@ bool SwRetrievedInputStreamDataManager::PopData( const tDataKey nDataKey,
filling of the data container to provide retrieved input stream to the
thread Consumer using <Application::PostUserEvent(..)>
- OD 2007-01-29 #i73788#
+ #i73788#
Note: This method has to be run in the main thread.
@author OD
@@ -165,3 +166,4 @@ IMPL_LINK( SwRetrievedInputStreamDataManager,
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/retrieveinputstream.cxx b/sw/source/core/docnode/retrieveinputstream.cxx
index 7da81735e58f..848c5769621c 100644
--- a/sw/source/core/docnode/retrieveinputstream.cxx
+++ b/sw/source/core/docnode/retrieveinputstream.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,13 +28,11 @@
#include "precompiled_sw.hxx"
#include <retrieveinputstream.hxx>
#include <comphelper/mediadescriptor.hxx>
-#ifndef _COM_SUN_STAR_IO_XSTREAM_HXX_
#include <com/sun/star/io/XStream.hpp>
-#endif
/** class for a thread to retrieve an input stream given by an URL
- OD 2007-01-29 #i73788#
+ #i73788#
@author OD
*/
@@ -62,7 +61,7 @@ SwAsyncRetrieveInputStreamThread::~SwAsyncRetrieveInputStreamThread()
void SwAsyncRetrieveInputStreamThread::threadFunction()
{
com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > xProps( 1 );
- xProps[0].Name = ::rtl::OUString::createFromAscii( "URL" );
+ xProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"));
xProps[0].Value <<= ::rtl::OUString( mrLinkedURL );
comphelper::MediaDescriptor aMedium( xProps );
@@ -84,3 +83,5 @@ void SwAsyncRetrieveInputStreamThread::threadFunction()
xInputStream,
aMedium.isStreamReadOnly() );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/retrieveinputstreamconsumer.cxx b/sw/source/core/docnode/retrieveinputstreamconsumer.cxx
index 409a96084ced..82ae987f43f5 100644
--- a/sw/source/core/docnode/retrieveinputstreamconsumer.cxx
+++ b/sw/source/core/docnode/retrieveinputstreamconsumer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,7 +34,7 @@
/** class to provide creation of a thread to retrieve an input stream given by
an URL and to consume the retrieved input stream.
- OD 2007-01-29 #i73788#
+ #i73788#
@author OD
*/
@@ -70,3 +71,4 @@ void SwAsyncRetrieveInputStreamThreadConsumer::ApplyInputStream(
mrGrfNode.ApplyInputStream( xInputStream, bIsStreamReadOnly );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index 54143770bb7c..89d74503ee1d 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,7 +45,6 @@
#include <docary.hxx>
#include <fmtcntnt.hxx>
#include <fmtpdsc.hxx>
-#include <errhdl.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <node.hxx>
@@ -65,9 +65,7 @@
#include <fmtftntx.hxx>
#include <ftnidx.hxx>
#include <doctxm.hxx>
-// --> FME 2004-06-22 #114856# edit in readonly sections
-#include <fmteiro.hxx>
-// <--
+#include <fmteiro.hxx> // edit in readonly sections
#include <swerror.h>
#include <unosection.hxx>
@@ -76,7 +74,6 @@ using namespace ::com::sun::star;
SV_IMPL_REF( SwServerObject )
-//static const char __FAR_DATA sSectionFmtNm[] = "Section";
#define sSectionFmtNm aEmptyStr
class SwIntrnlSectRefLink : public SwBaseLink
@@ -96,13 +93,11 @@ public:
virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, xub_StrLen nStt = 0,
xub_StrLen nEnd = STRING_NOTFOUND ) const;
- // --> OD 2007-02-14 #b6521322#
inline SwSectionNode* GetSectNode()
{
const SwNode* pSectNd( const_cast<SwIntrnlSectRefLink*>(this)->GetAnchor() );
return const_cast<SwSectionNode*>( dynamic_cast<const SwSectionNode*>( pSectNd ) );
}
- // <--
};
@@ -120,9 +115,7 @@ SwSectionData::SwSectionData(SectionType const eType, String const& rName)
, m_sSectionName(rName)
, m_bHiddenFlag(false)
, m_bProtectFlag(false)
- // --> FME 2004-06-22 #114856# edit in readonly sections
- , m_bEditInReadonlyFlag(false)
- // <--
+ , m_bEditInReadonlyFlag(false) // edit in readonly sections
, m_bHidden(false)
, m_bCondHiddenFlag(true)
, m_bConnectFlag(true)
@@ -139,9 +132,8 @@ SwSectionData::SwSectionData(SwSection const& rSection)
, m_Password(rSection.GetPassword())
, m_bHiddenFlag(rSection.IsHiddenFlag())
, m_bProtectFlag(rSection.IsProtect())
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
, m_bEditInReadonlyFlag(rSection.IsEditInReadonly())
- // <--
, m_bHidden(rSection.IsHidden())
, m_bCondHiddenFlag(true)
, m_bConnectFlag(rSection.IsConnectFlag())
@@ -158,9 +150,8 @@ SwSectionData::SwSectionData(SwSectionData const& rOther)
, m_Password(rOther.m_Password)
, m_bHiddenFlag(rOther.m_bHiddenFlag)
, m_bProtectFlag(rOther.m_bProtectFlag)
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
, m_bEditInReadonlyFlag(rOther.m_bEditInReadonlyFlag)
- // <--
, m_bHidden(rOther.m_bHidden)
, m_bCondHiddenFlag(true)
, m_bConnectFlag(rOther.m_bConnectFlag)
@@ -220,9 +211,8 @@ SwSection::SwSection(
}
m_Data.SetProtectFlag( pParentSect->IsProtectFlag() );
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
m_Data.SetEditInReadonlyFlag( pParentSect->IsEditInReadonlyFlag() );
- // <--
}
if (!m_Data.IsProtectFlag())
@@ -230,12 +220,10 @@ SwSection::SwSection(
m_Data.SetProtectFlag( rFormat.GetProtect().IsCntntProtected() );
}
- // --> FME 2004-06-22 #114856# edit in readonly sections
- if (!m_Data.IsEditInReadonlyFlag())
+ if (!m_Data.IsEditInReadonlyFlag()) // edit in readonly sections
{
m_Data.SetEditInReadonlyFlag( rFormat.GetEditInReadonly().GetValue() );
}
- // <--
}
@@ -289,8 +277,6 @@ 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());
@@ -321,7 +307,7 @@ bool SwSection::DataEquals(SwSectionData const& rCmp) const
void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition)
{
SwSectionFmt* pFmt = GetFmt();
- ASSERT(pFmt, "ImplSetHiddenFlag: no format?");
+ OSL_ENSURE(pFmt, "ImplSetHiddenFlag: no format?");
if( pFmt )
{
const bool bHide = bTmpHidden && bCondition;
@@ -374,22 +360,21 @@ sal_Bool SwSection::CalcHiddenFlag() const
bool SwSection::IsProtect() const
{
SwSectionFmt *const pFmt( GetFmt() );
- ASSERT(pFmt, "SwSection::IsProtect: no format?");
+ OSL_ENSURE(pFmt, "SwSection::IsProtect: no format?");
return (pFmt)
? pFmt->GetProtect().IsCntntProtected()
: IsProtectFlag();
}
-// --> FME 2004-06-22 #114856# edit in readonly sections
+// edit in readonly sections
bool SwSection::IsEditInReadonly() const
{
SwSectionFmt *const pFmt( GetFmt() );
- ASSERT(pFmt, "SwSection::IsEditInReadonly: no format?");
+ OSL_ENSURE(pFmt, "SwSection::IsEditInReadonly: no format?");
return (pFmt)
? pFmt->GetEditInReadonly().GetValue()
: IsEditInReadonlyFlag();
}
-// <--
void SwSection::SetHidden(bool const bFlag)
{
@@ -404,7 +389,7 @@ void SwSection::SetHidden(bool const bFlag)
void SwSection::SetProtect(bool const bFlag)
{
SwSectionFmt *const pFormat( GetFmt() );
- ASSERT(pFormat, "SwSection::SetProtect: no format?");
+ OSL_ENSURE(pFormat, "SwSection::SetProtect: no format?");
if (pFormat)
{
SvxProtectItem aItem( RES_PROTECT );
@@ -418,11 +403,11 @@ void SwSection::SetProtect(bool const bFlag)
}
}
-// --> FME 2004-06-22 #114856# edit in readonly sections
+// edit in readonly sections
void SwSection::SetEditInReadonly(bool const bFlag)
{
SwSectionFmt *const pFormat( GetFmt() );
- ASSERT(pFormat, "SwSection::SetEditInReadonly: no format?");
+ OSL_ENSURE(pFormat, "SwSection::SetEditInReadonly: no format?");
if (pFormat)
{
SwFmtEditInReadonly aItem;
@@ -435,7 +420,6 @@ void SwSection::SetEditInReadonly(bool const bFlag)
m_Data.SetEditInReadonlyFlag(bFlag);
}
}
-// <--
void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
@@ -458,7 +442,7 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
pOldSet->ClearItem( RES_PROTECT );
}
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // --> edit in readonly sections
if( SFX_ITEM_SET == pNewSet->GetItemState(
RES_EDIT_IN_READONLY, sal_False, &pItem ) )
{
@@ -505,7 +489,7 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
m_Data.SetProtectFlag( bNewFlag );
}
return;
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
case RES_EDIT_IN_READONLY:
if( pNew )
{
@@ -514,7 +498,6 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
m_Data.SetEditInReadonlyFlag( bNewFlag );
}
return;
- // <--
case RES_SECTION_HIDDEN:
m_Data.SetHiddenFlag(true);
@@ -731,7 +714,7 @@ SwSection * SwSectionFmt::GetSection() const
return (SwSectionPtr)aIter.First( TYPE(SwSection) );
}
- ASSERT( sal_False, "keine Section als Client." )
+ OSL_ENSURE( sal_False, "keine Section als Client." );
return 0;
}
@@ -747,7 +730,6 @@ void SwSectionFmt::DelFrms()
{
SwClientIter aIter( *this );
SwClient *pLast = aIter.GoStart();
- // --> OD 2007-08-14 #147431#
// First delete the <SwSectionFrm> of the <SwSectionFmt> instance
while ( pLast )
{
@@ -772,18 +754,17 @@ void SwSectionFmt::DelFrms()
}
pLast = aIter++;
}
- // <--
+
sal_uLong nEnde = pSectNd->EndOfSectionIndex();
sal_uLong nStart = pSectNd->GetIndex()+1;
lcl_DeleteFtn( pSectNd, nStart, nEnde );
}
if( pIdx )
{
- //JP 22.09.98:
//Hint fuer Pagedesc versenden. Das mueste eigntlich das Layout im
//Paste der Frames selbst erledigen, aber das fuehrt dann wiederum
//zu weiteren Folgefehlern, die mit Laufzeitkosten geloest werden
- //muesten. #56977# #55001# #56135#
+ //muesten.
SwNodeIndex aNextNd( *pIdx );
SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection( &aNextNd, sal_True, sal_False );
if( pCNd )
@@ -840,7 +821,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
pOldSet->ClearItem( RES_PROTECT );
}
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // --> edit in readonly sections
if( SFX_ITEM_SET == pNewSet->GetItemState(
RES_EDIT_IN_READONLY, sal_False, &pItem ) )
{
@@ -894,9 +875,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
case RES_PROTECT:
- // --> FME 2004-06-22 #114856# edit in readonly sections
- case RES_EDIT_IN_READONLY:
- // <--
+ case RES_EDIT_IN_READONLY: // edit in readonly sections
// diese Messages bis zum Ende des Baums durchreichen !
if( GetDepends() )
{
@@ -990,7 +969,7 @@ extern "C" {
{
const SwSectionFmt* pFSectFmt = (*(SwSectionPtr*)pFirst)->GetFmt();
const SwSectionFmt* pSSectFmt = (*(SwSectionPtr*)pSecond)->GetFmt();
- ASSERT( pFSectFmt && pSSectFmt &&
+ OSL_ENSURE( pFSectFmt && pSSectFmt &&
pFSectFmt->GetCntnt(sal_False).GetCntntIdx() &&
pSSectFmt->GetCntnt(sal_False).GetCntntIdx(),
"ungueltige Sections" );
@@ -1009,7 +988,7 @@ extern "C" {
{
const SwSectionPtr pFSect = *(SwSectionPtr*)pFirst;
const SwSectionPtr pSSect = *(SwSectionPtr*)pSecond;
- ASSERT( pFSect && pSSect, "ungueltige Sections" );
+ OSL_ENSURE( pFSect && pSSect, "ungueltige Sections" );
StringCompare const eCmp =
pFSect->GetSectionName().CompareTo( pSSect->GetSectionName() );
return eCmp == COMPARE_EQUAL ? 0
@@ -1079,9 +1058,8 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
SwSectionPtr pSection = 0;
const SvxProtectItem* pProtect(0);
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
const SwFmtEditInReadonly* pEditInReadonly = 0;
- // <--
bool bIsHidden = false;
SwClientIter aIter( *this );
@@ -1097,17 +1075,15 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
{
const SwSectionPtr pPS = GetParentSection();
pProtect = &pPS->GetFmt()->GetProtect();
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
pEditInReadonly = &pPS->GetFmt()->GetEditInReadonly();
- // <--
bIsHidden = pPS->IsHiddenFlag();
}
else
{
pProtect = &GetProtect();
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
pEditInReadonly = &GetEditInReadonly();
- // <--
bIsHidden = pSection->IsHidden();
}
}
@@ -1118,14 +1094,13 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
(SfxPoolItem*)pProtect );
}
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
if (!pEditInReadonly->GetValue() !=
!pSection->IsEditInReadonlyFlag())
{
pLast->Modify( (SfxPoolItem*)pEditInReadonly,
(SfxPoolItem*)pEditInReadonly );
}
- // <--
if( bIsHidden == pSection->IsHiddenFlag() )
{
@@ -1143,17 +1118,15 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
{
const SwSectionPtr pPS = GetParentSection();
pProtect = &pPS->GetFmt()->GetProtect();
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
pEditInReadonly = &pPS->GetFmt()->GetEditInReadonly();
- // <--
bIsHidden = pPS->IsHiddenFlag();
}
else
{
pProtect = &GetProtect();
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
pEditInReadonly = &GetEditInReadonly();
- // <--
bIsHidden = pSection->IsHidden();
}
}
@@ -1226,20 +1199,19 @@ SwSectionFmt::MakeUnoObject()
}
-// --> OD 2007-02-14 #b6521322#
// Method to break section links inside a linked section
void lcl_BreakSectionLinksInSect( const SwSectionNode& rSectNd )
{
if ( !rSectNd.GetDoc() )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"method <lcl_RemoveSectionLinksInSect(..)> - no Doc at SectionNode" );
return;
}
if ( !rSectNd.GetSection().IsConnected() )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"method <lcl_RemoveSectionLinksInSect(..)> - no Link at Section of SectionNode" );
return;
}
@@ -1263,7 +1235,6 @@ void lcl_BreakSectionLinksInSect( const SwSectionNode& rSectNd )
}
}
}
-// <--
void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
{
@@ -1437,7 +1408,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
return ;
}
- // --> OD 2005-02-11 #i38810# - Due to possible existing signatures, the
+ // #i38810# - Due to possible existing signatures, the
// document has to be modified after updating a link.
pDoc->SetModified();
// set additional flag that links have been updated, in order to check this
@@ -1584,7 +1555,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
pCpyRg = new SwNodeRange( pSrcDoc->GetNodes().GetEndOfExtras(), 2,
pSrcDoc->GetNodes().GetEndOfContent() );
- // --> OD 2007-11-30 #i81653#
+ // #i81653#
// Update links of extern linked document or extern linked
// document section, if section is protected.
if ( pSrcDoc != pDoc &&
@@ -1623,9 +1594,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
delete pCpyRg;
}
- // --> OD 2007-02-14 #b6521322#
lcl_BreakSectionLinksInSect( *pSectNd );
- // <--
// update alle Links in diesem Bereich
lcl_UpdateLinksInSect( *this, *pSectNd );
@@ -1726,9 +1695,8 @@ void SwIntrnlSectRefLink::Closed()
aSectionData.SetLinkFileName( aEmptyStr );
aSectionData.SetHidden( false );
aSectionData.SetProtectFlag( false );
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
aSectionData.SetEditInReadonlyFlag( false );
- // <--
aSectionData.SetConnectFlag( false );
@@ -1753,7 +1721,7 @@ void SwIntrnlSectRefLink::Closed()
void SwSection::CreateLink( LinkCreateType eCreateType )
{
SwSectionFmt* pFmt = GetFmt();
- ASSERT(pFmt, "SwSection::CreateLink: no format?");
+ OSL_ENSURE(pFmt, "SwSection::CreateLink: no format?");
if (!pFmt || (CONTENT_SECTION == m_Data.GetType()))
return ;
@@ -1799,7 +1767,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType )
}
break;
default:
- ASSERT( !this, "Was ist das fuer ein Link?" )
+ OSL_ENSURE( !this, "Was ist das fuer ein Link?" );
}
switch( eCreateType )
@@ -1815,7 +1783,6 @@ void SwSection::CreateLink( LinkCreateType eCreateType )
}
}
-// --> OD 2007-02-14 #b6521322#
void SwSection::BreakLink()
{
const SectionType eCurrentType( GetType() );
@@ -1831,7 +1798,7 @@ void SwSection::BreakLink()
if (m_RefLink.Is())
{
SwSectionFmt *const pFormat( GetFmt() );
- ASSERT(pFormat, "SwSection::BreakLink: no format?");
+ OSL_ENSURE(pFormat, "SwSection::BreakLink: no format?");
if (pFormat)
{
pFormat->GetDoc()->GetLinkManager().Remove( m_RefLink );
@@ -1844,7 +1811,6 @@ void SwSection::BreakLink()
SetLinkFileName( aEmptyStr );
SetLinkFilePassword( aEmptyStr );
}
-// <--
const SwNode* SwIntrnlSectRefLink::GetAnchor() const
{
@@ -1863,3 +1829,4 @@ sal_Bool SwIntrnlSectRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx
index 4451b32c736e..464753c462b7 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,12 +38,9 @@
#include <comphelper/mediadescriptor.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/lnkbase.hxx>
-#include <sfx2/linkmgr.hxx>
#include <sfx2/objsh.hxx>
#include <editeng/boxitem.hxx>
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc> // fuer die EventIds
-#endif
#include <sfx2/linkmgr.hxx>
#include <svtools/soerr.hxx>
#include <fmtfsize.hxx>
@@ -74,10 +72,10 @@ SV_IMPL_REF( SwServerObject )
void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
{
- //JP 4.7.2001: call fist all not SwNoTxtFrames, then the SwNoTxtFrames.
+ //call fist all not SwNoTxtFrames, then the SwNoTxtFrames.
// The reason is, that in the SwNoTxtFrames the Graphic
// after a Paint will be swapped out! So all other "behind"
- // them havent't a loaded Graphic. - #86501#
+ // them havent't a loaded Graphic.
rGrfNd.LockModify();
SwClientIter aIter( rGrfNd );
@@ -101,7 +99,7 @@ void SwBaseLink::DataChanged( const String& rMimeType,
{
if( !pCntntNode )
{
- ASSERT(!this, "DataChanged ohne ContentNode" );
+ OSL_ENSURE(!this, "DataChanged ohne ContentNode" );
return ;
}
@@ -195,8 +193,7 @@ void SwBaseLink::DataChanged( const String& rMimeType,
// zugreifen zu muessen (sonst erfolgt ein SwapIn!).
if( bGraphicArrived )
{
- // Bug #34735#: immer mit der korrekten Grafik-Size
- // arbeiten
+ // immer mit der korrekten Grafik-Size arbeiten
if( aGrfSz.Height() && aGrfSz.Width() &&
aSz.Height() && aSz.Width() &&
aGrfSz != aSz )
@@ -409,36 +406,16 @@ sal_Bool SwBaseLink::SwapIn( sal_Bool bWaitForData, sal_Bool bNativFormat )
}
#endif
- // --> OD 2005-04-11 #i46300# - deactivate fix for issues i9861 and i33293
-// TestBalloonInputStream* pTBIS = 0;
-// if(!m_xInputStreamToLoadFrom.is()) {
-// if ( !pCntntNode->IsGrfNode() ||
-// static_cast<SwGrfNode*>(pCntntNode)->GetGrfObj().GetType()
-// != GRAPHIC_DEFAULT )
-// {
-// pTBIS = new TestBalloonInputStream();
-// m_xInputStreamToLoadFrom = pTBIS;
-// }
-// }
- // <--
-
if( GetObj() )
{
- // --> OD 2005-04-11 #i46300# - deactivate fix for issues i9861 and i33293
-// GetObj()->setStreamToLoadFrom(m_xInputStreamToLoadFrom,m_bIsReadOnly);
- // <--
String aMimeType( SotExchange::GetFormatMimeType( GetContentType() ));
-//!! ??? what have we here to do ????
-//!! if( bNativFormat )
-//!! aData.SetAspect( aData.GetAspect() | ASPECT_ICON );
-
uno::Any aValue;
GetObj()->GetData( aValue, aMimeType, !IsSynchron() && bWaitForData );
if( bWaitForData && !GetObj() )
{
- ASSERT( !this, "das SvxFileObject wurde in einem GetData geloescht!" );
+ OSL_ENSURE( !this, "das SvxFileObject wurde in einem GetData geloescht!" );
bRes = sal_False;
}
else if( 0 != ( bRes = aValue.hasValue() ) )
@@ -461,17 +438,6 @@ sal_Bool SwBaseLink::SwapIn( sal_Bool bWaitForData, sal_Bool bNativFormat )
bSwapIn = sal_False;
- // --> OD 2005-04-11 #i46300# - deactivate fix for issues i9861 and i33293
-// if ( pTBIS && pTBIS->isTouched() )
-// {
-// // --> OD 2005-04-11 #i46300# - determine correct URL for the graphic
-// String sGrfNm;
-// GetLinkManager()->GetDisplayNames( this, 0, &sGrfNm, 0, 0 );
-// (m_pReReadThread = new ReReadThread(
-// this, sGrfNm, bWaitForData, bNativFormat))->create();
-// // <--
-// }
- // <--
return bRes;
}
@@ -507,7 +473,7 @@ const SwNode* SwBaseLink::GetAnchor() const
}
}
- ASSERT( !this, "GetAnchor nicht ueberlagert" );
+ OSL_ENSURE( !this, "GetAnchor nicht ueberlagert" );
return 0;
}
@@ -534,3 +500,5 @@ sal_Bool SwBaseLink::IsInRange( sal_uLong, sal_uLong, xub_StrLen, xub_StrLen ) c
SwBaseLink::~SwBaseLink()
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/swthreadjoiner.cxx b/sw/source/core/docnode/swthreadjoiner.cxx
index 8ee2924d4cdb..70997287e0ae 100644
--- a/sw/source/core/docnode/swthreadjoiner.cxx
+++ b/sw/source/core/docnode/swthreadjoiner.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,7 +49,7 @@ uno::Reference< util::XJobManager >& SwThreadJoiner::GetThreadJoiner()
mpThreadJoiner =
uno::Reference< util::XJobManager >(
::comphelper::getProcessServiceFactory()->createInstance(
- ::rtl::OUString::createFromAscii("com.sun.star.util.JobManager" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.JobManager")) ),
uno::UNO_QUERY );
}
@@ -59,3 +60,5 @@ void SwThreadJoiner::ReleaseThreadJoiner()
{
mpThreadJoiner.clear();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/swthreadmanager.cxx b/sw/source/core/docnode/swthreadmanager.cxx
index 7723bb684664..989ee9348961 100644
--- a/sw/source/core/docnode/swthreadmanager.cxx
+++ b/sw/source/core/docnode/swthreadmanager.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,7 @@
/** class to manage threads in Writer - it conforms the singleton pattern
- OD 2007-04-13 #i73788#
+ #i73788#
@author OD
*/
@@ -85,3 +86,5 @@ bool SwThreadManager::StartingOfThreadsSuspended()
{
return mpThreadManagerImpl->StartingOfThreadsSuspended();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/threadlistener.cxx b/sw/source/core/docnode/threadlistener.cxx
index 171d9fad380d..c06fa618d2e8 100644
--- a/sw/source/core/docnode/threadlistener.cxx
+++ b/sw/source/core/docnode/threadlistener.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
/** helper class to observe threads
- OD 2007-03-30 #i73788#
+ #i73788#
@author OD
*/
@@ -55,3 +56,4 @@ void ThreadListener::NotifyAboutFinishedThread( const oslInterlockedCount nThrea
mrThreadListenerOwner.NotifyAboutFinishedThread( nThreadID );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/threadmanager.cxx b/sw/source/core/docnode/threadmanager.cxx
index bb7bb4a4332b..7aa6c649b88d 100644
--- a/sw/source/core/docnode/threadmanager.cxx
+++ b/sw/source/core/docnode/threadmanager.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,7 +27,6 @@
************************************************************************/
#include "precompiled_sw.hxx"
#include <threadmanager.hxx>
-#include <errhdl.hxx>
#include <algorithm>
@@ -34,7 +34,7 @@ using namespace ::com::sun::star;
/** class to manage threads
- OD 2007-01-29 #i73788#
+ #i73788#
@author OD
*/
@@ -147,7 +147,7 @@ void ThreadManager::RemoveThread( const oslInterlockedCount nThreadID,
}
else
{
- ASSERT( false, "<ThreadManager::RemoveThread(..)> - ThreadJoiner already gone!" );
+ OSL_ENSURE( false, "<ThreadManager::RemoveThread(..)> - ThreadJoiner already gone!" );
}
}
@@ -200,7 +200,7 @@ bool ThreadManager::StartThread( const tThreadData& rThreadData )
}
else
{
- ASSERT( false, "<ThreadManager::StartThread(..)> - ThreadJoiner already gone!" );
+ OSL_ENSURE( false, "<ThreadManager::StartThread(..)> - ThreadJoiner already gone!" );
}
}
else
@@ -256,3 +256,5 @@ void ThreadManager::ResumeStartingOfThreads()
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index c510705c533c..2b72dbca4dfd 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -120,12 +121,6 @@ SwFrmFmt *FindFrmFmt( SdrObject *pObj )
pRetval = pContact->GetFmt();
}
}
-/* SJ: after prior consultation with OD we decided to remove this Assertion
-#if OSL_DEBUG_LEVEL > 1
- ASSERT( pRetval,
- "<::FindFrmFmt(..)> - no frame format found for given object. Please inform OD." );
-#endif
-*/
return pRetval;
}
@@ -175,7 +170,7 @@ SwContact* GetUserCall( const SdrObject* pObj )
SdrObject *pTmp;
while ( !pObj->GetUserCall() && 0 != (pTmp = pObj->GetUpGroup()) )
pObj = pTmp;
- ASSERT( !pObj->GetUserCall() || pObj->GetUserCall()->ISA(SwContact),
+ OSL_ENSURE( !pObj->GetUserCall() || pObj->GetUserCall()->ISA(SwContact),
"<::GetUserCall(..)> - wrong type of found object user call." );
return static_cast<SwContact*>(pObj->GetUserCall());
}
@@ -194,30 +189,23 @@ sal_Bool IsMarqueeTextObj( const SdrObject& rObj )
|*
|* SwContact, Ctor und Dtor
|*
-|* Ersterstellung AMA 27.Sep.96 18:13
-|* Letzte Aenderung AMA 27.Sep.96
-|*
|*************************************************************************/
SwContact::SwContact( SwFrmFmt *pToRegisterIn ) :
SwClient( pToRegisterIn ),
- // OD 05.09.2003 #112039# - init member <mbInDTOR>
mbInDTOR( false )
{}
SwContact::~SwContact()
{
- // OD 05.09.2003 #112039# - set <mbInDTOR>
SetInDTOR();
}
-// OD 05.09.2003 #112039# - accessor for member <mbInDTOR>
bool SwContact::IsInDTOR() const
{
return mbInDTOR;
}
-// OD 05.09.2003 #112039# - accessor to set member <mbInDTOR>
void SwContact::SetInDTOR()
{
mbInDTOR = true;
@@ -225,8 +213,6 @@ void SwContact::SetInDTOR()
/** method to move drawing object to corresponding visible layer
- OD 21.08.2003 #i18447#
-
@author OD
*/
void SwContact::MoveObjToVisibleLayer( SdrObject* _pDrawObj )
@@ -242,7 +228,7 @@ void SwContact::MoveObjToVisibleLayer( SdrObject* _pDrawObj )
if ( bNotify )
{
SwAnchoredObject* pAnchoredObj = GetAnchoredObj( _pDrawObj );
- ASSERT( pAnchoredObj,
+ OSL_ENSURE( pAnchoredObj,
"<SwContact::MoveObjToInvisibleLayer(..)> - missing anchored object" );
if ( pAnchoredObj )
{
@@ -279,7 +265,7 @@ void SwContact::MoveObjToInvisibleLayer( SdrObject* _pDrawObj )
if ( bNotify )
{
SwAnchoredObject* pAnchoredObj = GetAnchoredObj( _pDrawObj );
- ASSERT( pAnchoredObj,
+ OSL_ENSURE( pAnchoredObj,
"<SwContact::MoveObjToInvisibleLayer(..)> - missing anchored object" );
// Note: as-character anchored objects aren't registered at a page frame and
// a notification of its background isn't needed.
@@ -305,20 +291,20 @@ void SwContact::_MoveObjToLayer( const bool _bToVisible,
{
if ( !_pDrawObj )
{
- ASSERT( false, "SwDrawContact::_MoveObjToLayer(..) - no drawing object!" );
+ OSL_ENSURE( false, "SwDrawContact::_MoveObjToLayer(..) - no drawing object!" );
return;
}
if ( !pRegisteredIn )
{
- ASSERT( false, "SwDrawContact::_MoveObjToLayer(..) - no drawing frame format!" );
+ OSL_ENSURE( false, "SwDrawContact::_MoveObjToLayer(..) - no drawing frame format!" );
return;
}
const IDocumentDrawModelAccess* pIDDMA = static_cast<SwFrmFmt*>(pRegisteredIn)->getIDocumentDrawModelAccess();
if ( !pIDDMA )
{
- ASSERT( false, "SwDrawContact::_MoveObjToLayer(..) - no writer document!" );
+ OSL_ENSURE( false, "SwDrawContact::_MoveObjToLayer(..) - no writer document!" );
return;
}
@@ -390,7 +376,7 @@ void SwContact::_MoveObjToLayer( const bool _bToVisible,
}
// -------------------------------------------------------------------------
-// OD 2004-01-16 #110582# - some virtual helper methods for information
+// some virtual helper methods for information
// about the object (Writer fly frame resp. drawing object)
const SwIndex& SwContact::GetCntntAnchorIndex() const
@@ -400,8 +386,6 @@ const SwIndex& SwContact::GetCntntAnchorIndex() const
/** get minimum order number of anchored objects handled by with contact
- OD 2004-08-24 #110810#
-
@author
*/
sal_uInt32 SwContact::GetMinOrdNum() const
@@ -423,15 +407,13 @@ sal_uInt32 SwContact::GetMinOrdNum() const
aObjs.pop_back();
}
- ASSERT( nMinOrdNum != SAL_MAX_UINT32,
+ OSL_ENSURE( nMinOrdNum != SAL_MAX_UINT32,
"<SwContact::GetMinOrdNum()> - no order number found." );
return nMinOrdNum;
}
/** get maximum order number of anchored objects handled by with contact
- OD 2004-08-24 #110810#
-
@author
*/
sal_uInt32 SwContact::GetMaxOrdNum() const
@@ -461,9 +443,6 @@ sal_uInt32 SwContact::GetMaxOrdNum() const
|*
|* SwFlyDrawContact, Ctor und Dtor
|*
-|* Ersterstellung OK 23.11.94 18:13
-|* Letzte Aenderung MA 06. Apr. 95
-|*
|*************************************************************************/
SwFlyDrawContact::SwFlyDrawContact( SwFlyFrmFmt *pToRegisterIn, SdrModel * ) :
@@ -490,11 +469,11 @@ SwFlyDrawContact::~SwFlyDrawContact()
// OD 2004-03-29 #i26791#
const SwAnchoredObject* SwFlyDrawContact::GetAnchoredObj( const SdrObject* _pSdrObj ) const
{
- ASSERT( _pSdrObj,
+ OSL_ENSURE( _pSdrObj,
"<SwFlyDrawContact::GetAnchoredObj(..)> - no object provided" );
- ASSERT( _pSdrObj->ISA(SwVirtFlyDrawObj),
+ OSL_ENSURE( _pSdrObj->ISA(SwVirtFlyDrawObj),
"<SwFlyDrawContact::GetAnchoredObj(..)> - wrong object type object provided" );
- ASSERT( GetUserCall( _pSdrObj ) == const_cast<SwFlyDrawContact*>(this),
+ OSL_ENSURE( GetUserCall( _pSdrObj ) == const_cast<SwFlyDrawContact*>(this),
"<SwFlyDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" );
const SwAnchoredObject* pRetAnchoredObj = 0L;
@@ -509,11 +488,11 @@ const SwAnchoredObject* SwFlyDrawContact::GetAnchoredObj( const SdrObject* _pSdr
SwAnchoredObject* SwFlyDrawContact::GetAnchoredObj( SdrObject* _pSdrObj )
{
- ASSERT( _pSdrObj,
+ OSL_ENSURE( _pSdrObj,
"<SwFlyDrawContact::GetAnchoredObj(..)> - no object provided" );
- ASSERT( _pSdrObj->ISA(SwVirtFlyDrawObj),
+ OSL_ENSURE( _pSdrObj->ISA(SwVirtFlyDrawObj),
"<SwFlyDrawContact::GetAnchoredObj(..)> - wrong object type provided" );
- ASSERT( GetUserCall( _pSdrObj ) == this,
+ OSL_ENSURE( GetUserCall( _pSdrObj ) == this,
"<SwFlyDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" );
SwAnchoredObject* pRetAnchoredObj = 0L;
@@ -538,7 +517,7 @@ SdrObject* SwFlyDrawContact::GetMaster()
void SwFlyDrawContact::SetMaster( SdrObject* _pNewMaster )
{
- ASSERT( _pNewMaster->ISA(SwFlyDrawObj),
+ OSL_ENSURE( _pNewMaster->ISA(SwFlyDrawObj),
"<SwFlyDrawContact::SetMaster(..)> - wrong type of new master object" );
mpMasterObj = static_cast<SwFlyDrawObj *>(_pNewMaster);
}
@@ -547,9 +526,6 @@ void SwFlyDrawContact::SetMaster( SdrObject* _pNewMaster )
|*
|* SwFlyDrawContact::CreateNewRef()
|*
-|* Ersterstellung MA 14. Dec. 94
-|* Letzte Aenderung MA 24. Apr. 95
-|*
|*************************************************************************/
SwVirtFlyDrawObj *SwFlyDrawContact::CreateNewRef( SwFlyFrm *pFly )
@@ -629,21 +605,18 @@ sal_uInt32 SwFlyDrawContact::_GetOrdNumForNewRef( const SwFlyFrm* _pFlyFrm )
|*
|* SwFlyDrawContact::Modify()
|*
-|* Ersterstellung OK 08.11.94 10:21
-|* Letzte Aenderung MA 06. Dec. 94
-|*
|*************************************************************************/
void SwFlyDrawContact::Modify( SfxPoolItem *, SfxPoolItem * )
{
}
-// OD 2004-01-16 #110582# - override method to control Writer fly frames,
+// override method to control Writer fly frames,
// which are linked, and to assure that all objects anchored at/inside the
// Writer fly frame are also made visible.
void SwFlyDrawContact::MoveObjToVisibleLayer( SdrObject* _pDrawObj )
{
- ASSERT( _pDrawObj->ISA(SwVirtFlyDrawObj),
+ OSL_ENSURE( _pDrawObj->ISA(SwVirtFlyDrawObj),
"<SwFlyDrawContact::MoveObjToVisibleLayer(..)> - wrong SdrObject type -> crash" );
if ( GetFmt()->getIDocumentDrawModelAccess()->IsVisibleLayerId( _pDrawObj->GetLayer() ) )
@@ -677,12 +650,12 @@ void SwFlyDrawContact::MoveObjToVisibleLayer( SdrObject* _pDrawObj )
SwContact::MoveObjToVisibleLayer( _pDrawObj );
}
-// OD 2004-01-16 #110582# - override method to control Writer fly frames,
+// override method to control Writer fly frames,
// which are linked, and to assure that all objects anchored at/inside the
// Writer fly frame are also made invisible.
void SwFlyDrawContact::MoveObjToInvisibleLayer( SdrObject* _pDrawObj )
{
- ASSERT( _pDrawObj->ISA(SwVirtFlyDrawObj),
+ OSL_ENSURE( _pDrawObj->ISA(SwVirtFlyDrawObj),
"<SwFlyDrawContact::MoveObjToInvisibleLayer(..)> - wrong SdrObject type -> crash" );
if ( !GetFmt()->getIDocumentDrawModelAccess()->IsVisibleLayerId( _pDrawObj->GetLayer() ) )
@@ -712,8 +685,6 @@ void SwFlyDrawContact::MoveObjToInvisibleLayer( SdrObject* _pDrawObj )
/** get data collection of anchored objects, handled by with contact
- OD 2004-08-23 #110810#
-
@author
*/
void SwFlyDrawContact::GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const
@@ -733,9 +704,6 @@ void SwFlyDrawContact::GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAncho
|*
|* SwDrawContact, Ctor+Dtor
|*
-|* Ersterstellung MA 09. Jan. 95
-|* Letzte Aenderung MA 22. Jul. 98
-|*
|*************************************************************************/
bool CheckControlLayer( const SdrObject *pObj )
{
@@ -760,19 +728,16 @@ SwDrawContact::SwDrawContact( SwFrmFmt* pToRegisterIn, SdrObject* pObj ) :
SwContact( pToRegisterIn ),
maAnchoredDrawObj(),
mbMasterObjCleared( false ),
- // OD 10.10.2003 #112299#
mbDisconnectInProgress( false ),
- // --> OD 2006-01-18 #129959#
mbUserCallActive( false ),
// Note: value of <meEventTypeOfCurrentUserCall> isn't of relevance, because
// <mbUserCallActive> is sal_False.
meEventTypeOfCurrentUserCall( SDRUSERCALL_MOVEONLY )
- // <--
{
// clear vector containing 'virtual' drawing objects.
maDrawVirtObjs.clear();
- // --> OD 2004-09-22 #i33909# - assure, that drawing object is inserted
+ // --> #i33909# - assure, that drawing object is inserted
// in the drawing page.
if ( !pObj->IsInserted() )
{
@@ -785,27 +750,26 @@ SwDrawContact::SwDrawContact( SwFrmFmt* pToRegisterIn, SdrObject* pObj ) :
//Gruppenobjekte, wenn diese Controls enthalten.
if ( ::CheckControlLayer( pObj ) )
{
- // OD 25.06.2003 #108784# - set layer of object to corresponding invisible layer.
+ // set layer of object to corresponding invisible layer.
pObj->SetLayer( pToRegisterIn->getIDocumentDrawModelAccess()->GetInvisibleControlsId() );
}
- // OD 2004-03-29 #i26791#
+ // #i26791#
pObj->SetUserCall( this );
maAnchoredDrawObj.SetDrawObj( *pObj );
// if there already exists an SwXShape for the object, ensure it knows about us, and the SdrObject
- // FS 2009-04-07 #i99056#
+ // #i99056#
SwXShape::AddExistingShapeToFmt( *pObj );
}
SwDrawContact::~SwDrawContact()
{
- // OD 05.09.2003 #112039# - set <mbInDTOR>
SetInDTOR();
DisconnectFromLayout();
- // OD 25.06.2003 #108784# - remove 'master' from drawing page
+ // remove 'master' from drawing page
RemoveMasterFromDrawPage();
// remove and destroy 'virtual' drawing objects.
@@ -827,12 +791,12 @@ const SwAnchoredObject* SwDrawContact::GetAnchoredObj( const SdrObject* _pSdrObj
_pSdrObj = GetMaster();
}
- ASSERT( _pSdrObj,
+ OSL_ENSURE( _pSdrObj,
"<SwDrawContact::GetAnchoredObj(..)> - no object provided" );
- ASSERT( _pSdrObj->ISA(SwDrawVirtObj) ||
+ OSL_ENSURE( _pSdrObj->ISA(SwDrawVirtObj) ||
( !_pSdrObj->ISA(SdrVirtObj) && !_pSdrObj->ISA(SwDrawVirtObj) ),
"<SwDrawContact::GetAnchoredObj(..)> - wrong object type object provided" );
- ASSERT( GetUserCall( _pSdrObj ) == const_cast<SwDrawContact*>(this) ||
+ OSL_ENSURE( GetUserCall( _pSdrObj ) == const_cast<SwDrawContact*>(this) ||
_pSdrObj == GetMaster(),
"<SwDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" );
@@ -861,12 +825,12 @@ SwAnchoredObject* SwDrawContact::GetAnchoredObj( SdrObject* _pSdrObj )
_pSdrObj = GetMaster();
}
- ASSERT( _pSdrObj,
+ OSL_ENSURE( _pSdrObj,
"<SwDrawContact::GetAnchoredObj(..)> - no object provided" );
- ASSERT( _pSdrObj->ISA(SwDrawVirtObj) ||
+ OSL_ENSURE( _pSdrObj->ISA(SwDrawVirtObj) ||
( !_pSdrObj->ISA(SdrVirtObj) && !_pSdrObj->ISA(SwDrawVirtObj) ),
"<SwDrawContact::GetAnchoredObj(..)> - wrong object type object provided" );
- ASSERT( GetUserCall( _pSdrObj ) == this || _pSdrObj == GetMaster(),
+ OSL_ENSURE( GetUserCall( _pSdrObj ) == this || _pSdrObj == GetMaster(),
"<SwDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" );
SwAnchoredObject* pRetAnchoredObj = 0L;
@@ -900,9 +864,9 @@ SdrObject* SwDrawContact::GetMaster()
: 0L;
}
-// OD 16.05.2003 #108784# - overload <SwContact::SetMaster(..)> in order to
+// overload <SwContact::SetMaster(..)> in order to
// assert, if the 'master' drawing object is replaced.
-// OD 10.07.2003 #110742# - replace of master object correctly handled, if
+// replace of master object correctly handled, if
// handled by method <SwDrawContact::ChangeMasterObject(..)>. Thus, assert
// only, if a debug level is given.
void SwDrawContact::SetMaster( SdrObject* _pNewMaster )
@@ -910,7 +874,7 @@ void SwDrawContact::SetMaster( SdrObject* _pNewMaster )
if ( _pNewMaster )
{
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false, "debug notification - master replaced!" );
+ OSL_ENSURE( false, "debug notification - master replaced!" );
#endif
maAnchoredDrawObj.SetDrawObj( *_pNewMaster );
}
@@ -936,8 +900,8 @@ const SwFrm* SwDrawContact::GetAnchorFrm( const SdrObject* _pDrawObj ) const
}
else
{
- ASSERT( false,
- "<SwDrawContact::GetAnchorFrm(..)> - unknown drawing object." )
+ OSL_ENSURE( false,
+ "<SwDrawContact::GetAnchorFrm(..)> - unknown drawing object." );
}
return pAnchorFrm;
@@ -954,15 +918,15 @@ SwFrm* SwDrawContact::GetAnchorFrm( SdrObject* _pDrawObj )
}
else
{
- ASSERT( _pDrawObj->ISA(SwDrawVirtObj),
- "<SwDrawContact::GetAnchorFrm(..)> - unknown drawing object." )
+ OSL_ENSURE( _pDrawObj->ISA(SwDrawVirtObj),
+ "<SwDrawContact::GetAnchorFrm(..)> - unknown drawing object." );
pAnchorFrm = static_cast<SwDrawVirtObj*>(_pDrawObj)->AnchorFrm();
}
return pAnchorFrm;
}
-// OD 23.06.2003 #108784# - method to create a new 'virtual' drawing object.
+// method to create a new 'virtual' drawing object.
SwDrawVirtObj* SwDrawContact::CreateVirtObj()
{
// determine 'master'
@@ -977,7 +941,7 @@ SwDrawVirtObj* SwDrawContact::CreateVirtObj()
return pNewDrawVirtObj;
}
-// OD 23.06.2003 #108784# - destroys a given 'virtual' drawing object.
+// destroys a given 'virtual' drawing object.
// side effect: 'virtual' drawing object is removed from data structure
// <maDrawVirtObjs>.
void SwDrawContact::DestroyVirtObj( SwDrawVirtObj* _pVirtObj )
@@ -989,7 +953,7 @@ void SwDrawContact::DestroyVirtObj( SwDrawVirtObj* _pVirtObj )
}
}
-// OD 16.05.2003 #108784# - add a 'virtual' drawing object to drawing page.
+// add a 'virtual' drawing object to drawing page.
// Use an already created one, which isn't used, or create a new one.
SwDrawVirtObj* SwDrawContact::AddVirtObj()
{
@@ -1015,7 +979,7 @@ SwDrawVirtObj* SwDrawContact::AddVirtObj()
return pAddedDrawVirtObj;
}
-// OD 16.05.2003 #108784# - remove 'virtual' drawing objects and destroy them.
+// remove 'virtual' drawing objects and destroy them.
void SwDrawContact::RemoveAllVirtObjs()
{
for ( std::list<SwDrawVirtObj*>::iterator aDrawVirtObjsIter = maDrawVirtObjs.begin();
@@ -1065,12 +1029,12 @@ bool SwDrawContact::VirtObjAnchoredAtFrmPred::operator() ( const SwDrawVirtObj*
return ( pObjAnchorFrm == mpAnchorFrm );
}
-// OD 19.06.2003 #108784# - get drawing object ('master' or 'virtual') by frame.
+// get drawing object ('master' or 'virtual') by frame.
SdrObject* SwDrawContact::GetDrawObjectByAnchorFrm( const SwFrm& _rAnchorFrm )
{
SdrObject* pRetDrawObj = 0L;
- // OD 2004-04-14 #i26791# - compare master frames instead of direct frames
+ // #i26791# - compare master frames instead of direct frames
const SwFrm* pProposedAnchorFrm = &_rAnchorFrm;
if ( pProposedAnchorFrm->IsCntntFrm() )
{
@@ -1118,12 +1082,8 @@ SdrObject* SwDrawContact::GetDrawObjectByAnchorFrm( const SwFrm& _rAnchorFrm )
|*
|* SwDrawContact::Changed
|*
-|* Ersterstellung MA 09. Jan. 95
-|* Letzte Aenderung MA 29. May. 96
-|*
|*************************************************************************/
-// OD 03.07.2003 #108784#
void SwDrawContact::NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect )
{
for ( std::list<SwDrawVirtObj*>::iterator aDrawVirtObjIter = maDrawVirtObjs.begin();
@@ -1133,9 +1093,8 @@ void SwDrawContact::NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect )
SwDrawVirtObj* pDrawVirtObj = (*aDrawVirtObjIter);
if ( pDrawVirtObj->GetAnchorFrm() )
{
- // --> OD 2004-10-21 #i34640# - determine correct page frame
+ // #i34640# - determine correct page frame
SwPageFrm* pPage = pDrawVirtObj->AnchoredObj()->FindPageFrmOfAnchor();
- // <--
if( pOldBoundRect && pPage )
{
SwRect aOldRect( *pOldBoundRect );
@@ -1144,14 +1103,11 @@ void SwDrawContact::NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect )
::Notify_Background( pDrawVirtObj, pPage,
aOldRect, PREP_FLY_LEAVE,sal_True);
}
- // --> OD 2004-10-21 #i34640# - include spacing for wrapping
+ // #i34640# - include spacing for wrapping
SwRect aRect( pDrawVirtObj->GetAnchoredObj()->GetObjRectWithSpaces() );
- // <--
if( aRect.HasArea() )
{
- // --> OD 2004-10-21 #i34640# - simplify
SwPageFrm* pPg = (SwPageFrm*)::FindPage( aRect, pPage );
- // <--
if ( pPg )
::Notify_Background( pDrawVirtObj, pPg, aRect,
PREP_FLY_ARRIVE, sal_True );
@@ -1248,7 +1204,6 @@ void SwDrawContact::Changed( const SdrObject& rObj,
pDoc->GetRootFrm()->EndAllAction();
}
-// --> OD 2006-01-18 #129959#
// helper class for method <SwDrawContact::_Changed(..)> for handling nested
// <SdrObjUserCall> events
class NestedUserCallHdl
@@ -1283,7 +1238,7 @@ class NestedUserCallHdl
mpDrawContact = 0;
}
- bool IsNestedUserCall()
+ bool IsNestedUserCall() const
{
return mbParentUserCallActive;
}
@@ -1314,7 +1269,7 @@ class NestedUserCallHdl
if ( bTmpAssert )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDrawContact::_Changed(..)> - unknown nested <UserCall> event. This is serious, please inform OD." );
}
}
@@ -1329,7 +1284,6 @@ void SwDrawContact::_Changed( const SdrObject& rObj,
SdrUserCallType eType,
const Rectangle* pOldBoundRect )
{
- // --> OD 2006-01-18 #129959#
// suppress handling of nested <SdrObjUserCall> events
NestedUserCallHdl aNestedUserCallHdl( this, eType );
if ( aNestedUserCallHdl.IsNestedUserCall() )
@@ -1337,14 +1291,12 @@ void SwDrawContact::_Changed( const SdrObject& rObj,
aNestedUserCallHdl.AssertNestedUserCall();
return;
}
- // <--
- // OD 05.08.2002 #100843# - do *not* notify, if document is destructing
+ // do *not* notify, if document is destructing
// --> OD 2004-10-21 #i35912# - do *not* notify for as-character anchored
// drawing objects.
// --> OD 2004-11-11 #i35007#
// improvement: determine as-character anchored object flag only once.
const bool bAnchoredAsChar = ObjAnchoredAsChar();
- // <--
const bool bNotify = !(GetFmt()->GetDoc()->IsInDtor()) &&
( SURROUND_THROUGHT != GetFmt()->GetSurround().GetSurround() ) &&
!bAnchoredAsChar;
@@ -1356,7 +1308,7 @@ void SwDrawContact::_Changed( const SdrObject& rObj,
if ( bNotify )
{
lcl_NotifyBackgroundOfObj( *this, rObj, pOldBoundRect );
- // --> OD 2004-10-27 #i36181# - background of 'virtual'
+ // --> #i36181# - background of 'virtual'
// drawing objects have also been notified.
NotifyBackgrdOfAllVirtObjs( pOldBoundRect );
// <--
@@ -1364,17 +1316,16 @@ void SwDrawContact::_Changed( const SdrObject& rObj,
DisconnectFromLayout( false );
SetMaster( NULL );
delete this;
- // --> FME 2006-07-12 #i65784# Prevent memory corruption
+ // --> #i65784# Prevent memory corruption
aNestedUserCallHdl.DrawContactDeleted();
// <--
break;
}
case SDRUSERCALL_INSERTED:
{
- // OD 10.10.2003 #112299#
if ( mbDisconnectInProgress )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDrawContact::_Changed(..)> - Insert event during disconnection from layout is invalid." );
}
else
@@ -1399,7 +1350,7 @@ void SwDrawContact::_Changed( const SdrObject& rObj,
case SDRUSERCALL_CHILD_INSERTED :
case SDRUSERCALL_CHILD_REMOVED :
{
- // --> AW, OD 2010-09-13 #i113730#
+ // --> #i113730#
// force layer of controls for group objects containing control objects
if(dynamic_cast< SdrObjGroup* >(maAnchoredDrawObj.DrawObj()))
{
@@ -1511,7 +1462,7 @@ void SwDrawContact::_Changed( const SdrObject& rObj,
break;
default:
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDrawContact::_Changed(..)> - unsupported layout direction" );
}
}
@@ -1564,22 +1515,6 @@ void SwDrawContact::_Changed( const SdrObject& rObj,
// <--
}
}
- // --> OD 2006-01-18 #129959#
- // It reveals that the following code causes several defects -
- // on copying or on ungrouping a group shape containing edge objects.
- // Testing fix for #i53320# also reveal that the following code
- // isn't necessary.
-// // --> OD 2005-08-15 #i53320# - reset positioning attributes,
-// // if anchored drawing object isn't yet positioned.
-// else if ( pAnchoredDrawObj->NotYetPositioned() &&
-// static_cast<const SwDrawFrmFmt&>(pAnchoredDrawObj->GetFrmFmt()).IsPosAttrSet() )
-// {
-// const_cast<SwDrawFrmFmt&>(
-// static_cast<const SwDrawFrmFmt&>(pAnchoredDrawObj->GetFrmFmt()))
-// .ResetPosAttr();
-// }
-// // <--
- // <--
}
break;
case SDRUSERCALL_CHGATTR:
@@ -1616,15 +1551,11 @@ namespace
|*
|* SwDrawContact::Modify()
|*
-|* Ersterstellung MA 09. Jan. 95
-|* Letzte Aenderung MA 03. Dec. 95
-|*
|*************************************************************************/
void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
- // OD 10.10.2003 #112299#
- ASSERT( !mbDisconnectInProgress,
+ OSL_ENSURE( !mbDisconnectInProgress,
"<SwDrawContact::Modify(..)> called during disconnection.");
sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
@@ -1632,11 +1563,11 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
if ( pNewAnchorFmt )
{
- // JP 10.04.95: nicht auf ein Reset Anchor reagieren !!!!!
+ // nicht auf ein Reset Anchor reagieren !!!!!
if ( SFX_ITEM_SET ==
GetFmt()->GetAttrSet().GetItemState( RES_ANCHOR, sal_False ) )
{
- // OD 10.10.2003 #112299# - no connect to layout during disconnection
+ // no connect to layout during disconnection
if ( !mbDisconnectInProgress )
{
// determine old object retangle of 'master' drawing object
@@ -1645,7 +1576,7 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
Rectangle aOldRect;
if ( GetAnchorFrm() )
{
- // --> OD 2004-10-27 #i36181# - include spacing in object
+ // --> #i36181# - include spacing in object
// rectangle for notification.
aOldRect = maAnchoredDrawObj.GetObjRectWithSpaces().SVRect();
pOldRect = &aOldRect;
@@ -1660,10 +1591,10 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
const SwFmtAnchor* pOldAnchorFmt = pOld ? lcl_getAnchorFmt( *pOld ) : NULL;
if ( !pOldAnchorFmt || ( pOldAnchorFmt->GetAnchorId() != pNewAnchorFmt->GetAnchorId() ) )
{
- ASSERT( maAnchoredDrawObj.DrawObj(), "SwDrawContact::Modify: no draw object here?" );
+ OSL_ENSURE( maAnchoredDrawObj.DrawObj(), "SwDrawContact::Modify: no draw object here?" );
if ( maAnchoredDrawObj.DrawObj() )
{
- // --> OD 2009-07-10 #i102752#
+ // --> #i102752#
// assure that a ShapePropertyChangeNotifier exists
maAnchoredDrawObj.DrawObj()->notifyShapePropertyChange( ::svx::eTextShapeAnchorType );
// <--
@@ -1674,12 +1605,11 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
else
DisconnectFromLayout();
}
- // --> OD 2006-03-17 #i62875# - revised fix for issue #124157#
- // no further notification, if not connected to Writer layout
+ // --> #i62875# - no further notification, if not connected to Writer layout
else if ( maAnchoredDrawObj.GetAnchorFrm() &&
maAnchoredDrawObj.GetDrawObj()->GetUserCall() )
{
- // --> OD 2004-07-01 #i28701# - on change of wrapping style, hell|heaven layer,
+ // --> #i28701# - on change of wrapping style, hell|heaven layer,
// or wrapping style influence an update of the <SwSortedObjs> list,
// the drawing object is registered in, has to be performed. This is triggered
// by the 1st parameter of method call <_InvalidateObjs(..)>.
@@ -1733,7 +1663,7 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
#if OSL_DEBUG_LEVEL > 1
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDrawContact::Modify(..)> - unhandled attribute? - please inform od@openoffice.org" );
}
#endif
@@ -1784,17 +1714,13 @@ void SwDrawContact::_InvalidateObjs( const bool _bUpdateSortedObjsList )
|*
|* SwDrawContact::DisconnectFromLayout()
|*
-|* Ersterstellung MA 09. Jan. 95
-|* Letzte Aenderung MA 25. Mar. 99
-|*
|*************************************************************************/
void SwDrawContact::DisconnectFromLayout( bool _bMoveMasterToInvisibleLayer )
{
- // OD 10.10.2003 #112299#
mbDisconnectInProgress = true;
- // --> OD 2004-10-27 #i36181# - notify background of drawing object
+ // --> #i36181# - notify background of drawing object
if ( _bMoveMasterToInvisibleLayer &&
!(GetFmt()->GetDoc()->IsInDtor()) &&
GetAnchorFrm() )
@@ -1805,7 +1731,7 @@ void SwDrawContact::DisconnectFromLayout( bool _bMoveMasterToInvisibleLayer )
}
// <--
- // OD 16.05.2003 #108784# - remove 'virtual' drawing objects from writer
+ // remove 'virtual' drawing objects from writer
// layout and from drawing page
for ( std::list<SwDrawVirtObj*>::iterator aDisconnectIter = maDrawVirtObjs.begin();
aDisconnectIter != maDrawVirtObjs.end();
@@ -1830,24 +1756,21 @@ void SwDrawContact::DisconnectFromLayout( bool _bMoveMasterToInvisibleLayer )
pView->MarkObj( GetMaster(), pView->GetSdrPageView(), sal_True );
}
- // OD 25.06.2003 #108784# - Instead of removing 'master' object from
- // drawing page, move the 'master' drawing object into the corresponding
- // invisible layer.
+ // Instead of removing 'master' object from drawing page, move the
+ // 'master' drawing object into the corresponding invisible layer.
{
//((SwFrmFmt*)pRegisteredIn)->getIDocumentDrawModelAccess()->GetDrawModel()->GetPage(0)->
// RemoveObject( GetMaster()->GetOrdNum() );
- // OD 21.08.2003 #i18447# - in order to consider group object correct
+ // #i18447# - in order to consider group object correct
// use new method <SwDrawContact::MoveObjToInvisibleLayer(..)>
MoveObjToInvisibleLayer( GetMaster() );
}
}
- // OD 10.10.2003 #112299#
mbDisconnectInProgress = false;
}
-// OD 26.06.2003 #108784# - method to remove 'master' drawing object
-// from drawing page.
+// method to remove 'master' drawing object from drawing page.
void SwDrawContact::RemoveMasterFromDrawPage()
{
if ( GetMaster() )
@@ -1861,11 +1784,10 @@ void SwDrawContact::RemoveMasterFromDrawPage()
}
}
-// OD 19.06.2003 #108784# - disconnect for a dedicated drawing object -
-// could be 'master' or 'virtual'.
+// disconnect for a dedicated drawing object - could be 'master' or 'virtual'.
// a 'master' drawing object will disconnect a 'virtual' drawing object
// in order to take its place.
-// OD 13.10.2003 #i19919# - no special case, if drawing object isn't in
+// #i19919# - no special case, if drawing object isn't in
// page header/footer, in order to get drawing objects in repeating table headers
// also working.
void SwDrawContact::DisconnectObjFromLayout( SdrObject* _pDrawObj )
@@ -1909,9 +1831,6 @@ void SwDrawContact::DisconnectObjFromLayout( SdrObject* _pDrawObj )
|*
|* SwDrawContact::ConnectToLayout()
|*
-|* Ersterstellung MA 09. Jan. 95
-|* Letzte Aenderung MA 25. Mar. 99
-|*
|*************************************************************************/
SwTxtFrm* lcl_GetFlyInCntntAnchor( SwTxtFrm* _pProposedAnchorFrm,
const xub_StrLen _nTxtOfs )
@@ -1929,20 +1848,19 @@ SwTxtFrm* lcl_GetFlyInCntntAnchor( SwTxtFrm* _pProposedAnchorFrm,
void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
{
- // OD 10.10.2003 #112299# - *no* connect to layout during disconnection from
- // layout.
+ // *no* connect to layout during disconnection from layout.
if ( mbDisconnectInProgress )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDrawContact::ConnectToLayout(..)> called during disconnection.");
return;
}
- // --> OD 2004-09-22 #i33909# - *no* connect to layout, if 'master' drawing
+ // --> #i33909# - *no* connect to layout, if 'master' drawing
// object isn't inserted in the drawing page
if ( !GetMaster()->IsInserted() )
{
- ASSERT( false, "<SwDrawContact::ConnectToLayout(..)> - master drawing object not inserted -> no connect to layout. Please inform od@openoffice.org" );
+ OSL_ENSURE( false, "<SwDrawContact::ConnectToLayout(..)> - master drawing object not inserted -> no connect to layout. Please inform od@openoffice.org" );
return;
}
// <--
@@ -1955,7 +1873,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
return;
}
- // OD 16.05.2003 #108784# - remove 'virtual' drawing objects from writer
+ // remove 'virtual' drawing objects from writer
// layout and from drawing page, and remove 'master' drawing object from
// writer layout - 'master' object will remain in drawing page.
DisconnectFromLayout( false );
@@ -1996,7 +1914,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
{
ClrContourCache( GetMaster() );
}
- // OD 16.05.2003 #108784# - support drawing objects in header/footer,
+ // support drawing objects in header/footer,
// but not control objects:
// anchor at first found frame the 'master' object and
// at the following frames 'virtual' drawing objects.
@@ -2061,12 +1979,11 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
if ( FLY_AT_FLY == pAnch->GetAnchorId() && !pFrm->IsFlyFrm() )
{
pFrm = pFrm->FindFlyFrm();
- ASSERT( pFrm,
+ OSL_ENSURE( pFrm,
"<SwDrawContact::ConnectToLayout(..)> - missing fly frame -> crash." );
}
- // OD 2004-01-20 #110582# - find correct follow for
- // as character anchored objects.
+ // find correct follow for as character anchored objects
if ((pAnch->GetAnchorId() == FLY_AS_CHAR) &&
pFrm->IsTxtFrm() )
{
@@ -2091,8 +2008,6 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
}
pFrm->AppendDrawObj( *(pDrawVirtObj->AnchoredObj()) );
- // for repaint, use new ActionChanged()
- // pDrawVirtObj->SendRepaintBroadcast();
pDrawVirtObj->ActionChanged();
}
@@ -2105,18 +2020,18 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
}
break;
default:
- ASSERT( sal_False, "Unknown Anchor." )
+ OSL_ENSURE( sal_False, "Unknown Anchor." );
break;
}
if ( GetAnchorFrm() )
{
::setContextWritingMode( maAnchoredDrawObj.DrawObj(), GetAnchorFrm() );
- // OD 2004-04-01 #i26791# - invalidate objects instead of direct positioning
+ // #i26791# - invalidate objects instead of direct positioning
_InvalidateObjs();
}
}
-// OD 27.06.2003 #108784# - insert 'master' drawing object into drawing page
+// insert 'master' drawing object into drawing page
void SwDrawContact::InsertMasterIntoDrawPage()
{
if ( !GetMaster()->IsInserted() )
@@ -2131,14 +2046,11 @@ void SwDrawContact::InsertMasterIntoDrawPage()
|*
|* SwDrawContact::FindPage(), ChkPage()
|*
-|* Ersterstellung MA 21. Mar. 95
-|* Letzte Aenderung MA 19. Jul. 96
-|*
|*************************************************************************/
SwPageFrm* SwDrawContact::FindPage( const SwRect &rRect )
{
- // --> OD 2004-07-01 #i28701# - use method <GetPageFrm()>
+ // --> #i28701# - use method <GetPageFrm()>
SwPageFrm* pPg = GetPageFrm();
if ( !pPg && GetAnchorFrm() )
pPg = GetAnchorFrm()->FindPageFrm();
@@ -2149,24 +2061,22 @@ SwPageFrm* SwDrawContact::FindPage( const SwRect &rRect )
void SwDrawContact::ChkPage()
{
- // OD 10.10.2003 #112299#
if ( mbDisconnectInProgress )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDrawContact::ChkPage()> called during disconnection." );
return;
}
- // --> OD 2004-07-01 #i28701#
+ // --> #i28701#
SwPageFrm* pPg = ( maAnchoredDrawObj.GetAnchorFrm() &&
maAnchoredDrawObj.GetAnchorFrm()->IsPageFrm() )
? GetPageFrm()
: FindPage( GetMaster()->GetCurrentBoundRect() );
if ( GetPageFrm() != pPg )
{
- // OD 27.06.2003 #108784# - if drawing object is anchor in header/footer
- // a change of the page is a dramatic change. Thus, completely re-connect
- // to the layout
+ // if drawing object is anchor in header/footer a change of the page
+ // is a dramatic change. Thus, completely re-connect to the layout
if ( maAnchoredDrawObj.GetAnchorFrm() &&
maAnchoredDrawObj.GetAnchorFrm()->FindFooterOrHeader() )
{
@@ -2174,7 +2084,7 @@ void SwDrawContact::ChkPage()
}
else
{
- // --> OD 2004-07-01 #i28701# - use methods <GetPageFrm()> and <SetPageFrm>
+ // --> #i28701# - use methods <GetPageFrm()> and <SetPageFrm>
if ( GetPageFrm() )
GetPageFrm()->RemoveDrawObjFromPage( maAnchoredDrawObj );
pPg->AppendDrawObjToPage( maAnchoredDrawObj );
@@ -2187,11 +2097,8 @@ void SwDrawContact::ChkPage()
|*
|* SwDrawContact::ChangeMasterObject()
|*
-|* Ersterstellung MA 07. Aug. 95
-|* Letzte Aenderung MA 20. Apr. 99
-|*
|*************************************************************************/
-// OD 10.07.2003 #110742# - Important note:
+// Important note:
// method is called by method <SwDPage::ReplaceObject(..)>, which called its
// corresponding superclass method <FmFormPage::ReplaceObject(..)>.
// Note: 'master' drawing object *has* to be connected to layout triggered
@@ -2199,7 +2106,7 @@ void SwDrawContact::ChkPage()
void SwDrawContact::ChangeMasterObject( SdrObject *pNewMaster )
{
DisconnectFromLayout( false );
- // OD 10.07.2003 #110742# - consider 'virtual' drawing objects
+ // consider 'virtual' drawing objects
RemoveAllVirtObjs();
GetMaster()->SetUserCall( 0 );
@@ -2209,12 +2116,7 @@ void SwDrawContact::ChangeMasterObject( SdrObject *pNewMaster )
_InvalidateObjs();
}
-/** get data collection of anchored objects, handled by with contact
-
- OD 2004-08-23 #110810#
-
- @author
-*/
+// get data collection of anchored objects, handled by with contact
void SwDrawContact::GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const
{
_roAnchoredObjs.push_back( const_cast<SwAnchoredDrawObject*>(&maAnchoredDrawObj) );
@@ -2335,15 +2237,6 @@ namespace sdr
drawinglayer::primitive2d::Primitive2DSequence VOCOfDrawVirtObj::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
{
-#ifdef DBG_UTIL
- // #i101734#
- static bool bCheckOtherThanTranslate(false);
- static double fShearX(0.0);
- static double fRotation(0.0);
- static double fScaleX(0.0);
- static double fScaleY(0.0);
-#endif
-
const VCOfDrawVirtObj& rVC = static_cast< const VCOfDrawVirtObj& >(GetViewContact());
const SdrObject& rReferencedObject = rVC.GetSwDrawVirtObj().GetReferencedObj();
drawinglayer::primitive2d::Primitive2DSequence xRetval;
@@ -2354,20 +2247,8 @@ namespace sdr
if(aLocalOffset.X() || aLocalOffset.Y())
{
-#ifdef DBG_UTIL
- // #i101734# added debug code to check more complex transformations
- // than just a translation
- if(bCheckOtherThanTranslate)
- {
- aOffsetMatrix.scale(fScaleX, fScaleY);
- aOffsetMatrix.shearX(tan(fShearX * F_PI180));
- aOffsetMatrix.rotate(fRotation * F_PI180);
- }
-#endif
-
aOffsetMatrix.set(0, 2, aLocalOffset.X());
aOffsetMatrix.set(1, 2, aLocalOffset.Y());
-
}
if(rReferencedObject.ISA(SdrObjGroup))
@@ -2418,8 +2299,6 @@ namespace sdr
// =============================================================================
/** implementation of class <SwDrawVirtObj>
- OD 14.05.2003 #108784#
-
@author OD
*/
@@ -2430,7 +2309,6 @@ sdr::contact::ViewContact* SwDrawVirtObj::CreateObjectSpecificViewContact()
return new sdr::contact::VCOfDrawVirtObj(*this);
}
-// #108784#
// implemetation of SwDrawVirtObj
SwDrawVirtObj::SwDrawVirtObj( SdrObject& _rNewObj,
SwDrawContact& _rDrawContact )
@@ -2604,8 +2482,6 @@ void SwDrawVirtObj::RecalcBoundRect()
// OD 2004-04-05 #i26791# - switch order of calling <GetOffset()> and
// <ReferencedObj().GetCurrentBoundRect()>, because <GetOffset()> calculates
// its value by the 'BoundRect' of the referenced object.
- //aOutRect = rRefObj.GetCurrentBoundRect();
- //aOutRect += GetOffset();
const Point aOffset(GetOffset());
aOutRect = ReferencedObj().GetCurrentBoundRect() + aOffset;
@@ -2639,7 +2515,9 @@ SdrHdl* SwDrawVirtObj::GetHdl(sal_uInt32 nHdlNum) const
SdrHdl* SwDrawVirtObj::GetPlusHdl(const SdrHdl& rHdl, sal_uInt16 nPlNum) const
{
SdrHdl* pHdl = rRefObj.GetPlusHdl(rHdl, nPlNum);
- pHdl->SetPos(pHdl->GetPos() + GetOffset());
+
+ if (pHdl)
+ pHdl->SetPos(pHdl->GetPos() + GetOffset());
return pHdl;
}
@@ -2667,7 +2545,7 @@ void SwDrawVirtObj::NbcMirror(const Point& rRef1, const Point& rRef2)
SetRectsDirty();
}
-void SwDrawVirtObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+void SwDrawVirtObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear)
{
rRefObj.NbcShear(rRef - GetOffset(), nWink, tn, bVShear);
SetRectsDirty();
@@ -2676,10 +2554,6 @@ void SwDrawVirtObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL
void SwDrawVirtObj::Move(const Size& rSiz)
{
SdrObject::Move( rSiz );
-// Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect();
-// rRefObj.Move( rSiz );
-// SetRectsDirty();
-// SendUserCall(SDRUSERCALL_RESIZE, aBoundRect0);
}
void SwDrawVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
@@ -2712,7 +2586,7 @@ void SwDrawVirtObj::Mirror(const Point& rRef1, const Point& rRef2)
SendUserCall(SDRUSERCALL_RESIZE, aBoundRect0);
}
-void SwDrawVirtObj::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+void SwDrawVirtObj::Shear(const Point& rRef, long nWink, double tn, bool bVShear)
{
if(nWink)
{
@@ -2802,15 +2676,13 @@ void SwDrawVirtObj::NbcSetPoint(const Point& rPnt, sal_uInt32 i)
SetRectsDirty();
}
-// #108784#
-FASTBOOL SwDrawVirtObj::HasTextEdit() const
+bool SwDrawVirtObj::HasTextEdit() const
{
return rRefObj.HasTextEdit();
}
-// OD 18.06.2003 #108784# - overloaded 'layer' methods for 'virtual' drawing
-// object to assure, that layer of 'virtual' object is the layer of the referenced
-// object.
+// overloaded 'layer' methods for 'virtual' drawing object to assure,
+// that layer of 'virtual' object is the layer of the referenced object.
SdrLayerID SwDrawVirtObj::GetLayer() const
{
return GetReferencedObj().GetLayer();
@@ -2842,3 +2714,4 @@ SdrObject* SwDrawVirtObj::getFullDragClone() const
// eof
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 492b44e5c89f..096386733626 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,9 +60,7 @@
using namespace ::com::sun::star;
-// --> OD 2004-11-22 #117958#
#include <svx/sdr/properties/defaultproperties.hxx>
-// <--
#include <basegfx/range/b2drange.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
@@ -83,9 +82,6 @@ TYPEINIT1( SwVirtFlyDrawObj, SdrVirtObj )
|*
|* SwFlyDrawObj::Ctor
|*
-|* Ersterstellung MA 18. Apr. 95
-|* Letzte Aenderung MA 28. May. 96
-|*
*************************************************************************/
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -130,14 +126,13 @@ namespace sdr
sdr::properties::BaseProperties* SwFlyDrawObj::CreateObjectSpecificProperties()
{
- // --> OD 2004-11-22 #117958# - create default properties
+ // create default properties
return new sdr::properties::DefaultProperties(*this);
- // <--
}
sdr::contact::ViewContact* SwFlyDrawObj::CreateObjectSpecificViewContact()
{
- // #i95264# needs an own VC since createViewIndependentPrimitive2DSequence()
+ // needs an own VC since createViewIndependentPrimitive2DSequence()
// is called when RecalcBoundRect() is used
return new sdr::contact::VCOfSwFlyDrawObj(*this);
}
@@ -154,24 +149,21 @@ SwFlyDrawObj::~SwFlyDrawObj()
|*
|* SwFlyDrawObj::Factory-Methoden
|*
-|* Ersterstellung MA 23. Feb. 95
-|* Letzte Aenderung MA 23. Feb. 95
-|*
*************************************************************************/
-sal_uInt32 __EXPORT SwFlyDrawObj::GetObjInventor() const
+sal_uInt32 SwFlyDrawObj::GetObjInventor() const
{
return SWGInventor;
}
-sal_uInt16 __EXPORT SwFlyDrawObj::GetObjIdentifier() const
+sal_uInt16 SwFlyDrawObj::GetObjIdentifier() const
{
return SwFlyDrawObjIdentifier;
}
-sal_uInt16 __EXPORT SwFlyDrawObj::GetObjVersion() const
+sal_uInt16 SwFlyDrawObj::GetObjVersion() const
{
return SwDrawFirst;
}
@@ -180,9 +172,6 @@ sal_uInt16 __EXPORT SwFlyDrawObj::GetObjVersion() const
|*
|* SwVirtFlyDrawObj::CToren, Dtor
|*
-|* Ersterstellung MA 08. Dec. 94
-|* Letzte Aenderung MA 28. May. 96
-|*
*************************************************************************/
//////////////////////////////////////////////////////////////////////////////////////
@@ -437,7 +426,7 @@ SwVirtFlyDrawObj::SwVirtFlyDrawObj(SdrObject& rNew, SwFlyFrm* pFly) :
}
-__EXPORT SwVirtFlyDrawObj::~SwVirtFlyDrawObj()
+SwVirtFlyDrawObj::~SwVirtFlyDrawObj()
{
if ( GetPage() ) //Der SdrPage die Verantwortung entziehen.
GetPage()->RemoveObject( GetOrdNum() );
@@ -447,9 +436,6 @@ __EXPORT SwVirtFlyDrawObj::~SwVirtFlyDrawObj()
|*
|* SwVirtFlyDrawObj::GetFmt()
|*
-|* Ersterstellung MA 08. Dec. 94
-|* Letzte Aenderung MA 08. Dec. 94
-|*
*************************************************************************/
const SwFrmFmt *SwVirtFlyDrawObj::GetFmt() const
@@ -467,9 +453,6 @@ SwFrmFmt *SwVirtFlyDrawObj::GetFmt()
|*
|* SwVirtFlyDrawObj::Paint()
|*
-|* Ersterstellung MA 20. Dec. 94
-|* Letzte Aenderung MA 18. Dec. 95
-|*
*************************************************************************/
void SwVirtFlyDrawObj::wrap_DoPaintObject() const
@@ -515,12 +498,9 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject() const
|*
|* SwVirtFlyDrawObj::TakeObjInfo()
|*
-|* Ersterstellung MA 03. May. 95
-|* Letzte Aenderung MA 03. May. 95
-|*
*************************************************************************/
-void __EXPORT SwVirtFlyDrawObj::TakeObjInfo( SdrObjTransformInfoRec& rInfo ) const
+void SwVirtFlyDrawObj::TakeObjInfo( SdrObjTransformInfoRec& rInfo ) const
{
rInfo.bSelectAllowed = rInfo.bMoveAllowed =
rInfo.bResizeFreeAllowed = rInfo.bResizePropAllowed = sal_True;
@@ -537,9 +517,6 @@ void __EXPORT SwVirtFlyDrawObj::TakeObjInfo( SdrObjTransformInfoRec& rInfo ) con
|*
|* SwVirtFlyDrawObj::Groessenermittlung
|*
-|* Ersterstellung MA 12. Jan. 95
-|* Letzte Aenderung MA 10. Nov. 95
-|*
*************************************************************************/
void SwVirtFlyDrawObj::SetRect() const
@@ -551,38 +528,38 @@ void SwVirtFlyDrawObj::SetRect() const
}
-const Rectangle& __EXPORT SwVirtFlyDrawObj::GetCurrentBoundRect() const
+const Rectangle& SwVirtFlyDrawObj::GetCurrentBoundRect() const
{
SetRect();
return aOutRect;
}
-const Rectangle& __EXPORT SwVirtFlyDrawObj::GetLastBoundRect() const
+const Rectangle& SwVirtFlyDrawObj::GetLastBoundRect() const
{
return GetCurrentBoundRect();
}
-void __EXPORT SwVirtFlyDrawObj::RecalcBoundRect()
+void SwVirtFlyDrawObj::RecalcBoundRect()
{
SetRect();
}
-void __EXPORT SwVirtFlyDrawObj::RecalcSnapRect()
+void SwVirtFlyDrawObj::RecalcSnapRect()
{
SetRect();
}
-const Rectangle& __EXPORT SwVirtFlyDrawObj::GetSnapRect() const
+const Rectangle& SwVirtFlyDrawObj::GetSnapRect() const
{
SetRect();
return aOutRect;
}
-void __EXPORT SwVirtFlyDrawObj::SetSnapRect(const Rectangle& )
+void SwVirtFlyDrawObj::SetSnapRect(const Rectangle& )
{
Rectangle aTmp( GetLastBoundRect() );
SetRect();
@@ -593,20 +570,20 @@ void __EXPORT SwVirtFlyDrawObj::SetSnapRect(const Rectangle& )
}
-void __EXPORT SwVirtFlyDrawObj::NbcSetSnapRect(const Rectangle& )
+void SwVirtFlyDrawObj::NbcSetSnapRect(const Rectangle& )
{
SetRect();
}
-const Rectangle& __EXPORT SwVirtFlyDrawObj::GetLogicRect() const
+const Rectangle& SwVirtFlyDrawObj::GetLogicRect() const
{
SetRect();
return aOutRect;
}
-void __EXPORT SwVirtFlyDrawObj::SetLogicRect(const Rectangle& )
+void SwVirtFlyDrawObj::SetLogicRect(const Rectangle& )
{
Rectangle aTmp( GetLastBoundRect() );
SetRect();
@@ -617,7 +594,7 @@ void __EXPORT SwVirtFlyDrawObj::SetLogicRect(const Rectangle& )
}
-void __EXPORT SwVirtFlyDrawObj::NbcSetLogicRect(const Rectangle& )
+void SwVirtFlyDrawObj::NbcSetLogicRect(const Rectangle& )
{
SetRect();
}
@@ -638,12 +615,9 @@ void __EXPORT SwVirtFlyDrawObj::NbcSetLogicRect(const Rectangle& )
|*
|* SwVirtFlyDrawObj::Move() und Resize()
|*
-|* Ersterstellung MA 12. Jan. 95
-|* Letzte Aenderung MA 26. Jul. 96
-|*
*************************************************************************/
-void __EXPORT SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
+void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
{
MoveRect( aOutRect, rSiz );
const Point aOldPos( GetFlyFrm()->Frm().Pos() );
@@ -790,7 +764,7 @@ void __EXPORT SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
}
-void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef,
+void SwVirtFlyDrawObj::NbcResize(const Point& rRef,
const Fraction& xFact, const Fraction& yFact)
{
ResizeRect( aOutRect, rRef, xFact, yFact );
@@ -898,7 +872,7 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef,
}
-void __EXPORT SwVirtFlyDrawObj::Move(const Size& rSiz)
+void SwVirtFlyDrawObj::Move(const Size& rSiz)
{
NbcMove( rSiz );
SetChanged();
@@ -906,7 +880,7 @@ void __EXPORT SwVirtFlyDrawObj::Move(const Size& rSiz)
}
-void __EXPORT SwVirtFlyDrawObj::Resize(const Point& rRef,
+void SwVirtFlyDrawObj::Resize(const Point& rRef,
const Fraction& xFact, const Fraction& yFact)
{
NbcResize( rRef, xFact, yFact );
@@ -915,14 +889,14 @@ void __EXPORT SwVirtFlyDrawObj::Resize(const Point& rRef,
}
-Pointer __EXPORT SwVirtFlyDrawObj::GetMacroPointer(
+Pointer SwVirtFlyDrawObj::GetMacroPointer(
const SdrObjMacroHitRec& ) const
{
return Pointer( POINTER_REFHAND );
}
-FASTBOOL __EXPORT SwVirtFlyDrawObj::HasMacro() const
+bool SwVirtFlyDrawObj::HasMacro() const
{
const SwFmtURL &rURL = pFlyFrm->GetFmt()->GetURL();
return rURL.GetMap() || rURL.GetURL().Len();
@@ -978,3 +952,5 @@ SdrObject* SwVirtFlyDrawObj::getFullDragClone() const
}
// eof
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/draw/dobjfac.cxx b/sw/source/core/draw/dobjfac.cxx
index f50e3c156a49..cecf6ef03c14 100644
--- a/sw/source/core/draw/dobjfac.cxx
+++ b/sw/source/core/draw/dobjfac.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#include "precompiled_sw.hxx"
-#include <errhdl.hxx>
#include <dpage.hxx>
#include <dobjfac.hxx>
#include <dflyobj.hxx>
@@ -47,7 +47,7 @@ IMPL_LINK( SwObjectFactory, MakeObject, SdrObjFactory*, pObjFactory )
if ( pObjFactory->nInventor == SWGInventor )
{
//Kein switch, derzeit gibt es nur einen.
- ASSERT( pObjFactory->nIdentifier == SwFlyDrawObjIdentifier,
+ OSL_ENSURE( pObjFactory->nIdentifier == SwFlyDrawObjIdentifier,
"Falscher Inventor oder identifier." );
pObjFactory->pNewObj = new SwFlyDrawObj();
}
@@ -55,3 +55,4 @@ IMPL_LINK( SwObjectFactory, MakeObject, SdrObjFactory*, pObjFactory )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index 8c774bcdeba1..b39bd6521a76 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,9 +37,6 @@
#include <fmturl.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
-#ifndef _DOCSH_HXX
-#include <docsh.hxx>
-#endif
#include <shellres.hxx>
#include <viewimp.hxx>
#include <pagefrm.hxx>
@@ -50,9 +48,7 @@
#include <dpage.hxx>
#include <dcontact.hxx>
#include <dflyobj.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <usrfld.hxx>
#include <flyfrm.hxx>
#include <ndnotxt.hxx>
@@ -80,15 +76,12 @@ SwDPage::~SwDPage()
|*
|* SwDPage::ReplaceObject()
|*
-|* Ersterstellung MA 07. Aug. 95
-|* Letzte Aenderung MA 07. Aug. 95
-|*
*************************************************************************/
SdrObject* SwDPage::ReplaceObject( SdrObject* pNewObj, sal_uLong nObjNum )
{
SdrObject *pOld = GetObj( nObjNum );
- ASSERT( pOld, "Oups, Object not replaced" );
+ OSL_ENSURE( pOld, "Oups, Object not replaced" );
SdrObjUserCall* pContact;
if ( 0 != ( pContact = GetUserCall(pOld) ) &&
RES_DRAWFRMFMT == ((SwContact*)pContact)->GetFmt()->Which())
@@ -100,9 +93,6 @@ SdrObject* SwDPage::ReplaceObject( SdrObject* pNewObj, sal_uLong nObjNum )
|*
|* SwDPage::GetGridFrameList()
|*
-|* Ersterstellung MA 04. Sep. 95
-|* Letzte Aenderung MA 15. Feb. 96
-|*
*************************************************************************/
void InsertGridFrame( SdrPageGridFrameList *pLst, const SwFrm *pPg )
@@ -245,9 +235,7 @@ sal_Bool SwDPage::RequestHelp( Window* pWindow, SdrView* pView,
return bWeiter;
}
-/* -----------------------------27.11.00 07:35--------------------------------
- ---------------------------------------------------------------------------*/
Reference< XInterface > SwDPage::createUnoPage()
{
Reference < XInterface > xRet;
@@ -263,3 +251,4 @@ Reference< XInterface > SwDPage::createUnoPage()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx
index be94db96d47f..8c9ec52ab13f 100644
--- a/sw/source/core/draw/drawdoc.cxx
+++ b/sw/source/core/draw/drawdoc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include <tools/stream.hxx>
#include <unotools/pathoptions.hxx>
#include <sot/storage.hxx>
@@ -45,9 +44,7 @@
#include <rootfrm.hxx>
#include <drawdoc.hxx>
#include <dpage.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <shellio.hxx>
#include <hintids.hxx>
#include <com/sun/star/embed/ElementModes.hpp>
@@ -130,7 +127,7 @@ SwDrawDocument::SwDrawDocument( SwDoc* pD ) :
}
SetForbiddenCharsTable( pD->getForbiddenCharacterTable() );
- // #87795# Implementation for asian compression
+ // Implementation for asian compression
SetCharCompressType( static_cast<sal_uInt16>(pD->getCharacterCompressionType() ));
}
@@ -145,9 +142,7 @@ SwDrawDocument::~SwDrawDocument()
{
Broadcast(SdrHint(HINT_MODELCLEARED));
- // #116168#
ClearModel(sal_True);
- //Clear();
}
/*************************************************************************
@@ -160,7 +155,7 @@ SwDrawDocument::~SwDrawDocument()
\************************************************************************/
-SdrPage* SwDrawDocument::AllocPage(FASTBOOL bMasterPage)
+SdrPage* SwDrawDocument::AllocPage(bool bMasterPage)
{
SwDPage* pPage = new SwDPage(*this, 0 != bMasterPage);
pPage->SetName( String::CreateFromAscii(
@@ -215,7 +210,6 @@ SdrLayerID SwDrawDocument::GetControlExportLayerId( const SdrObject & ) const
return (SdrLayerID)pDoc->GetHeavenId();
}
-// --> OD 2006-03-01 #b6382898#
uno::Reference< uno::XInterface > SwDrawDocument::createUnoModel()
{
@@ -230,11 +224,12 @@ uno::Reference< uno::XInterface > SwDrawDocument::createUnoModel()
}
catch( uno::RuntimeException& )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDrawDocument::createUnoModel()> - could *not* retrieve model at <SwDocShell>" );
}
return xModel;
}
-// <--
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index f449dac13bc3..9e1fc781e400 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,10 +60,6 @@
#include <com/sun/star/embed/EmbedMisc.hpp>
-// OD 18.06.2003 #108784#
-//#ifndef _SVDVMARK_HXX //autogen
-//#include <svx/svdvmark.hxx>
-//#endif
#include <vector>
// --> OD 2004-06-24 #i28701#
#include <sortedobjs.hxx>
@@ -110,9 +107,6 @@ const SwFrm *lcl_FindAnchor( const SdrObject *pObj, sal_Bool bAll )
|*
|* SwDrawView::Ctor
|*
-|* Ersterstellung OK 18.11.94
-|* Letzte Aenderung MA 22. Jul. 96
-|*
*************************************************************************/
@@ -233,9 +227,6 @@ SdrObject* SwDrawView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTo
|*
|* Gets called every time the handles need to be build
|*
-|* Ersterstellung AW 06. Sep. 99
-|* Letzte Aenderung AW 06. Sep. 99
-|*
*************************************************************************/
void SwDrawView::AddCustomHdl()
@@ -246,16 +237,14 @@ void SwDrawView::AddCustomHdl()
return;
SdrObject *pObj = rMrkList.GetMark(0)->GetMarkedSdrObj();
- // --> OD 2006-11-06 #130889# - make code robust
-// const SwFmtAnchor &rAnchor = ::FindFrmFmt(pObj)->GetAnchor();
+ // make code robust
SwFrmFmt* pFrmFmt( ::FindFrmFmt( pObj ) );
if ( !pFrmFmt )
{
- ASSERT( false, "<SwDrawView::AddCustomHdl()> - missing frame format!" );
+ OSL_ENSURE( false, "<SwDrawView::AddCustomHdl()> - missing frame format!" );
return;
}
const SwFmtAnchor &rAnchor = pFrmFmt->GetAnchor();
- // <--
if (FLY_AS_CHAR == rAnchor.GetAnchorId())
return;
@@ -288,9 +277,6 @@ void SwDrawView::AddCustomHdl()
|*
|* SwDrawView::GetMaxToTopObj(), _GetMaxToTopObj()
|*
-|* Ersterstellung MA 13. Jan. 95
-|* Letzte Aenderung MA 18. Mar. 97
-|*
*************************************************************************/
@@ -344,9 +330,6 @@ SdrObject* SwDrawView::GetMaxToTopObj( SdrObject* pObj ) const
|*
|* SwDrawView::GetMaxToBtmObj()
|*
-|* Ersterstellung MA 13. Jan. 95
-|* Letzte Aenderung MA 05. Sep. 96
-|*
*************************************************************************/
@@ -373,9 +356,6 @@ SdrObject* SwDrawView::GetMaxToBtmObj(SdrObject* pObj) const
|*
|* SwDrawView::ObjOrderChanged()
|*
-|* Ersterstellung MA 31. Jul. 95
-|* Letzte Aenderung MA 18. Mar. 97
-|*
*************************************************************************/
inline sal_Bool lcl_IsChild( SdrObject *pParent, SdrObject *pChild )
@@ -401,8 +381,6 @@ inline SdrObject *lcl_FindParent( SdrObject *pObj )
/** determine maximal order number for a 'child' object of given 'parent' object
- OD 2004-08-20 #110810#
-
@author OD
*/
sal_uInt32 SwDrawView::_GetMaxChildOrdNum( const SwFlyFrm& _rParentObj,
@@ -411,7 +389,7 @@ sal_uInt32 SwDrawView::_GetMaxChildOrdNum( const SwFlyFrm& _rParentObj,
sal_uInt32 nMaxChildOrdNum = _rParentObj.GetDrawObj()->GetOrdNum();
const SdrPage* pDrawPage = _rParentObj.GetDrawObj()->GetPage();
- ASSERT( pDrawPage,
+ OSL_ENSURE( pDrawPage,
"<SwDrawView::_GetMaxChildOrdNum(..) - missing drawing page at parent object - crash!" );
sal_uInt32 nObjCount = pDrawPage->GetObjCount();
@@ -439,8 +417,6 @@ sal_uInt32 SwDrawView::_GetMaxChildOrdNum( const SwFlyFrm& _rParentObj,
/** method to move 'repeated' objects of the given moved object to the
according level
- OD 2004-08-23 #110810#
-
@author OD
*/
void SwDrawView::_MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
@@ -450,7 +426,7 @@ void SwDrawView::_MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
std::vector<SwAnchoredObject*> aAnchoredObjs;
{
const SwContact* pContact = ::GetUserCall( _rMovedAnchoredObj.GetDrawObj() );
- ASSERT( pContact,
+ OSL_ENSURE( pContact,
"SwDrawView::_MoveRepeatedObjs(..) - missing contact object -> crash." );
pContact->GetAnchoredObjs( aAnchoredObjs );
}
@@ -493,7 +469,7 @@ void SwDrawView::_MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
SdrObject* pChildObj = (*aObjIter);
{
const SwContact* pContact = ::GetUserCall( pChildObj );
- ASSERT( pContact,
+ OSL_ENSURE( pContact,
"SwDrawView::_MoveRepeatedObjs(..) - missing contact object -> crash." );
pContact->GetAnchoredObjs( aAnchoredObjs );
}
@@ -526,16 +502,15 @@ void SwDrawView::_MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
}
}
-// --> OD 2004-08-20 #110810# - adjustment and re-factoring of method
+// --> adjustment and re-factoring of method
void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
sal_uLong nNewPos )
{
- // --> OD 2004-08-17 #110810# - nothing to do for group members
+ // nothing to do for group members
if ( pObj->GetUpGroup() )
{
return;
}
- // <--
// determine drawing page and assure that the order numbers are correct.
SdrPage* pDrawPage = GetModel()->GetPage( 0 );
@@ -760,9 +735,6 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
|*
|* SwDrawView::TakeDragLimit()
|*
-|* Ersterstellung AMA 26. Apr. 96
-|* Letzte Aenderung MA 03. May. 96
-|*
*************************************************************************/
@@ -788,9 +760,6 @@ sal_Bool SwDrawView::TakeDragLimit( SdrDragMode eMode,
|*
|* SwDrawView::CalcAnchor()
|*
-|* Ersterstellung MA 13. Jan. 95
-|* Letzte Aenderung MA 08. Nov. 96
-|*
*************************************************************************/
@@ -815,16 +784,14 @@ const SwFrm* SwDrawView::CalcAnchor()
else
{
SwDrawContact *pC = (SwDrawContact*)GetUserCall(pObj);
- // OD 17.06.2003 #108784# - determine correct anchor position for
- // 'virtual' drawing objects.
- // OD 2004-03-25 #i26791#
+ // determine correct anchor position for 'virtual' drawing objects.
+ // #i26791#
pAnch = pC->GetAnchorFrm( pObj );
if( !pAnch )
{
pC->ConnectToLayout();
- // OD 17.06.2003 #108784# - determine correct anchor position for
- // 'virtual' drawing objects.
- // OD 2004-03-25 #i26791#
+ // determine correct anchor position for 'virtual' drawing objects.
+ // #i26791#
pAnch = pC->GetAnchorFrm( pObj );
}
aMyRect = pObj->GetSnapRect();
@@ -852,7 +819,7 @@ const SwFrm* SwDrawView::CalcAnchor()
{
if ( pAnch->IsCntntFrm() )
{
- // OD 26.06.2003 #108784# - allow drawing objects in header/footer,
+ // allow drawing objects in header/footer,
// but exclude control objects.
bool bBodyOnly = CheckControlLayer( pObj );
pAnch = ::FindAnchor( (SwCntntFrm*)pAnch, aPt, bBodyOnly );
@@ -880,9 +847,6 @@ const SwFrm* SwDrawView::CalcAnchor()
|*
|* SwDrawView::ShowDragXor(), HideDragXor()
|*
-|* Ersterstellung MA 17. Jan. 95
-|* Letzte Aenderung MA 27. Jan. 95
-|*
*************************************************************************/
@@ -896,7 +860,6 @@ void SwDrawView::ShowDragAnchor()
{
CalcAnchor();
pHdl->SetPos(aAnchorPoint);
- //OLMRefreshAllIAOManagers();
}
}
@@ -904,9 +867,6 @@ void SwDrawView::ShowDragAnchor()
|*
|* SwDrawView::MarkListHasChanged()
|*
-|* Ersterstellung OM 02. Feb. 95
-|* Letzte Aenderung OM 07. Jul. 95
-|*
*************************************************************************/
@@ -951,7 +911,7 @@ void SwDrawView::ModelHasChanged()
void SwDrawView::MakeVisible( const Rectangle &rRect, Window & )
{
- ASSERT( rImp.GetShell()->GetWin(), "MakeVisible, unknown Window");
+ OSL_ENSURE( rImp.GetShell()->GetWin(), "MakeVisible, unknown Window");
rImp.GetShell()->MakeVisible( SwRect( rRect ) );
}
@@ -987,9 +947,8 @@ void SwDrawView::CheckPossibilities()
uno::Reference < embed::XEmbeddedObject > xObj = pNd->GetOLEObj().GetOleRef();
if ( xObj.is() )
{
- // --> OD 2004-08-16 #110810# - improvement for
- // the future, when more than one Writer fly frame
- // can be selected.
+ // --> improvement for the future, when more
+ // than one Writer fly frame can be selected.
// TODO/LATER: retrieve Aspect - from where?!
bSzProtect |= ( embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ) ) ? sal_True : sal_False;
@@ -1020,7 +979,7 @@ void SwDrawView::CheckPossibilities()
SwFrmFmt* pFrmFmt( ::FindFrmFmt( const_cast<SdrObject*>(pObj) ) );
if ( !pFrmFmt )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDrawView::CheckPossibilities()> - missing frame format" );
bProtect = sal_True;
}
@@ -1038,8 +997,6 @@ void SwDrawView::CheckPossibilities()
/** replace marked <SwDrawVirtObj>-objects by its reference object for delete
marked objects.
- OD 18.06.2003 #108784#
-
@author OD
*/
void SwDrawView::ReplaceMarkedDrawVirtObjs( SdrMarkView& _rMarkView )
@@ -1089,8 +1046,7 @@ void SwDrawView::DeleteMarked()
if ( pDoc->GetRootFrm() )
pDoc->GetRootFrm()->StartAllAction();
pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
- // OD 18.06.2003 #108784# - replace marked <SwDrawVirtObj>-objects by its
- // reference objects.
+ // replace marked <SwDrawVirtObj>-objects by its reference objects.
{
SdrPageView* pDrawPageView = rImp.GetPageView();
if ( pDrawPageView )
@@ -1112,15 +1068,7 @@ void SwDrawView::DeleteMarked()
pDoc->GetRootFrm()->EndAllAction();
}
-/********
-JP 02.10.98: sollte als Fix fuer 57153 gelten, hatte aber Nebenwirkungen,
- wie Bug 57475
-const SdrMarkList& SwDrawView::GetMarkedObjectList() const
-{
- FlushComeBackTimer();
- return FmFormView::GetMarkedObjectList();
-}
-*************/
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index dad951e3848a..c047543e4bf9 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -188,10 +189,6 @@ sal_Bool SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
{
SwDoc* pDoc = rEditSh.GetDoc();
-// if( !pDoc->IsAutoFmtRedline() &&
-// pPam != &rCrsr ) // nur an akt. Position das Redline sichern
-// pDoc->SetRedlineMode_intern( eOld | REDLINE_IGNORE );
-
if( pDoc->IsAutoFmtRedline() )
{
if( nPos == pNd->GetTxt().Len() ) // am Ende erfolgt ein Insert
@@ -294,7 +291,6 @@ const String* SwAutoCorrDoc::GetPrevPara( sal_Bool bAtNormalPos )
(*pIdx)--;
pTNd = pIdx->GetNode().GetTxtNode();
}
- //if( pTNd && NO_NUMBERING == pTNd->GetTxtColl()->GetOutlineLevel() )
if( pTNd && 0 == pTNd->GetAttrOutlineLevel() )//#outline level,zhaojianwei
pStr = &pTNd->GetTxt();
@@ -314,7 +310,7 @@ sal_Bool SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPo
// Absatz-Anfang oder ein Blank gefunden, suche nach dem Wort
// Kuerzel im Auto
SwTxtNode* pTxtNd = rCrsr.GetNode()->GetTxtNode();
- ASSERT( pTxtNd, "wo ist denn der TextNode?" );
+ OSL_ENSURE( pTxtNd, "wo ist denn der TextNode?" );
sal_Bool bRet = sal_False;
if( nEndPos == rSttPos )
@@ -358,7 +354,7 @@ sal_Bool SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPo
if( ppPara )
{
- ASSERT( !pIdx, "wer hat seinen Index nicht geloescht?" );
+ OSL_ENSURE( !pIdx, "wer hat seinen Index nicht geloescht?" );
pIdx = new SwNodeIndex( rCrsr.GetPoint()->nNode, -1 );
}
@@ -530,3 +526,4 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 828adb14ff10..4012436444e8 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,7 +64,7 @@
#include <pam.hxx>
#include <edimp.hxx>
#include <fesh.hxx>
-#include <swundo.hxx> // fuer die UndoIds
+#include <swundo.hxx> // for the UndoId's
#include <poolfmt.hxx>
#include <ndtxt.hxx>
#include <txtfrm.hxx>
@@ -99,23 +100,23 @@ const sal_Unicode cStarSymbolEmDash = 0x2014;
SvxSwAutoFmtFlags* SwEditShell::pAutoFmtFlags = 0;
-// Anzahl von Num-/Bullet-Absatzvorlagen. MAXLEVEL wird demnaechst auf
-// x erhoeht, die Anzahl Vorlagen aber nicht (Ueberbleibsel aus <= 4.0)
+// Number of num-/bullet-paragraph templates. MAXLEVEL will soon be raised
+// to x, but not the number of templates. (Artifact from <= 4.0)
const sal_uInt16 cnNumBullColls = 4;
class SwAutoFormat
{
SvxSwAutoFmtFlags aFlags;
- SwPaM aDelPam; // ein Pam der benutzt werden kann
- SwNodeIndex aNdIdx; // der Index auf den akt. TextNode
- SwNodeIndex aEndNdIdx; // Index auf das Ende vom Bereich
+ SwPaM aDelPam; // a Pam that can be used
+ SwNodeIndex aNdIdx; // the index on the current TextNode
+ SwNodeIndex aEndNdIdx; // index on the end of the area
SwEditShell* pEditShell;
SwDoc* pDoc;
- SwTxtNode* pAktTxtNd; // der akt. TextNode
- SwTxtFrm* pAktTxtFrm; // Frame vom akt. TextNode
+ SwTxtNode* pAktTxtNd; // the current TextNode
+ SwTxtFrm* pAktTxtFrm; // frame of the current TextNode
CharClass* pCharClass; // Character classification
- sal_uLong nEndNdIdx; // fuer die Prozent-Anzeige
+ sal_uLong nEndNdIdx; // for the percentage-display
LanguageType eCharClassLang;
sal_uInt16 nLastHeadLvl, nLastCalcHeadLvl;
@@ -178,7 +179,7 @@ class SwAutoFormat
String GoNextPara();
sal_Bool HasObjects( const SwNode& rNd );
- // TxtNode Methoden
+ // TxtNode methods
const SwTxtNode* GetNextNode() const;
sal_Bool IsEmptyLine( const SwTxtNode& rNd ) const
{ return 0 == rNd.GetTxt().Len() ||
@@ -201,7 +202,7 @@ class SwAutoFormat
sal_uInt16 GetDigitLevel( const SwTxtNode& rTxtNd, xub_StrLen& rPos,
String* pPreFix = 0, String* pPostFix = 0,
String* pNumTypes = 0 ) const;
- // hole den FORMATIERTEN TextFrame
+ // get the FORMATED TextFrame
SwTxtFrm* GetFrm( const SwTxtNode& rTxtNd ) const;
void BuildIndent();
@@ -215,15 +216,15 @@ class SwAutoFormat
sal_Bool HasBreakAttr( const SwTxtNode& ) const;
void DeleteSel( SwPaM& rPam );
sal_Bool DeleteAktNxtPara( const String& rNxtPara );
- // loesche im Node Anfang oder/und Ende
+ // delete in the node start and/or end
void DeleteAktPara( sal_Bool bStart = sal_True, sal_Bool nEnd = sal_True );
void DelEmptyLine( sal_Bool bTstNextPara = sal_True );
- // loesche bei mehrzeiligen Absaetzen die "linken" und/oder
- // "rechten" Raender
+ // when using multiline paragraphs delete the "left" and/or
+ // "right" margins
void DelMoreLinesBlanks( sal_Bool bWithLineBreaks = sal_False );
- // loesche den vorherigen Absatz
+ // delete the previous paragraph
void DelPrevPara();
- // dann lasse doch mal das AutoCorrect auf den akt. TextNode los
+ // execute AutoCorrect on current TextNode
void AutoCorrect( xub_StrLen nSttPos = 0 );
sal_Bool CanJoin( const SwTxtNode* pTxtNd ) const
@@ -237,7 +238,7 @@ class SwAutoFormat
!HasBreakAttr( *pTxtNd );
}
- // ist ein Punkt am Ende ??
+ // is a dot at the end ??
sal_Bool IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const;
sal_Bool DoUnderline();
@@ -269,9 +270,9 @@ const sal_Unicode* StrChr( const sal_Unicode* pSrc, sal_Unicode c )
SwTxtFrm* SwAutoFormat::GetFrm( const SwTxtNode& rTxtNd ) const
{
- // besorge mal den Frame
+ // get the Frame
const SwCntntFrm *pFrm = rTxtNd.GetFrm();
- ASSERT( pFrm, "zum Autoformat muss das Layout vorhanden sein" );
+ OSL_ENSURE( pFrm, "zum Autoformat muss das Layout vorhanden sein" );
if( aFlags.bAFmtByInput && !pFrm->IsValid() )
{
SwRect aTmpFrm( pFrm->Frm() );
@@ -347,10 +348,10 @@ String SwAutoFormat::GoNextPara()
else
pNewNd = &aNdIdx.GetNode();
- // kein TextNode ->
- // TableNode : Tabelle ueberspringen
- // NoTxtNode : Nodes ueberspringen
- // EndNode : Ende erreicht, beenden
+ // not a TextNode ->
+ // TableNode : skip table
+ // NoTxtNode : skip nodes
+ // EndNode : at the end, terminate
if( pNewNd->IsEndNode() )
{
bEnde = sal_True;
@@ -377,8 +378,8 @@ String SwAutoFormat::GoNextPara()
sal_Bool SwAutoFormat::HasObjects( const SwNode& rNd )
{
- // haengt irgend etwas absatzgebundenes am Absatz?
- // z.B. Rahmen, DrawObjecte, ..
+ // Is there something bound to the paragraph in the paragraph
+ // like borders, DrawObjects, ...
sal_Bool bRet = sal_False;
const SwSpzFrmFmts& rFmts = *pDoc->GetSpzFrmFmts();
for( sal_uInt16 n = 0; n < rFmts.Count(); ++n )
@@ -431,12 +432,12 @@ sal_Bool SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const
if( !nLen )
return sal_False;
- // -, +, * getrennt durch Blank ??
+ // -, +, * separated by blank ??
if( 2 < nLen && IsSpace( rTxt.GetChar( nBlnks + 1 ) ) )
{
if( StrChr( pBulletChar, rTxt.GetChar( nBlnks ) ) )
return sal_True;
- // sollte an der Position ein Symbolfont existieren ?
+ // Should there be a symbol font at the position?
SwTxtFrmInfo aFInfo( GetFrm( rNd ) );
if( aFInfo.IsBullet( nBlnks ))
return sal_True;
@@ -449,7 +450,7 @@ sal_Bool SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const
sal_Bool SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
{
- // suche im String mehr als 5 Blanks/Tabs
+ // Search more that 5 blanks/tabs in the string.
String sTmp( rNd.GetTxt() );
DelTrailingBlanks( DelLeadingBlanks( sTmp ));
const sal_Unicode* pTmp = sTmp.GetBuffer();
@@ -457,7 +458,7 @@ sal_Bool SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
{
if( IsSpace( *pTmp ) )
{
- if( IsSpace( *++pTmp )) // 2 Space nach einander
+ if( IsSpace( *++pTmp )) // 2 spaces after each other
{
const sal_Unicode* pStt = pTmp;
while( *pTmp && IsSpace( *++pTmp ))
@@ -506,7 +507,7 @@ sal_uInt16 SwAutoFormat::CalcLevel( const SwTxtNode& rNd, sal_uInt16 *pDigitLvl
break;
default:
if( pDigitLvl )
- // Teste auf 1.) / 1. / 1.1.1 / (1). / (1) / ....
+ // test 1.) / 1. / 1.1.1 / (1). / (1) / ....
*pDigitLvl = GetDigitLevel( rNd, n );
return nLvl;
}
@@ -568,12 +569,9 @@ sal_Bool SwAutoFormat::DoUnderline()
xub_StrLen nCnt = 0;
while( *pStr )
{
-//JP 29.03.96: Spaces unterbrechen die Umrandung!
-// if( !IsSpace( *pStr ) )
+ int eTmp = 0;
+ switch( *pStr )
{
- int eTmp = 0;
- switch( *pStr )
- {
case '-': eTmp = 1; break;
case '_': eTmp = 2; break;
case '=': eTmp = 3; break;
@@ -582,13 +580,13 @@ sal_Bool SwAutoFormat::DoUnderline()
case '#': eTmp = 6; break;
default:
return sal_False;
- }
- if( 0 == eState )
- eState = eTmp;
- else if( eState != eTmp )
- return sal_False;
- ++nCnt;
}
+ if( 0 == eState )
+ eState = eTmp;
+ else if( eState != eTmp )
+ return sal_False;
+ ++nCnt;
+
++pStr;
}
@@ -598,8 +596,6 @@ sal_Bool SwAutoFormat::DoUnderline()
DelEmptyLine( sal_False );
aDelPam.SetMark();
aDelPam.GetMark()->nContent = 0;
-//JP 19.03.96: kein Underline sondern eine Umrandung setzen!
-// pDoc->Insert( aDelPam, SvxUnderlineItem( eState ) );
SvxBorderLine aLine;
switch( eState )
@@ -860,7 +856,6 @@ sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
// roemische Zeichen sind "mdclxvi". Da man aber eher mal eine
// Numerierung mit c oder d anfangen will, werden diese erstmal
// zu chars und spaeter ggfs. zu romischen Zeichen!
-// if( strchr( "mdclxvi", cLow ))
#ifdef WITH_ALPHANUM_AS_NUMFMT
//detection of 'c' and 'd' a ROMAN numbering should not be done here
if( 256 > cLow &&( (eScan & (LOWER_ROMAN|UPPER_ROMAN))
@@ -1087,8 +1082,6 @@ sal_Bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode();
if( nBlnkPos && nBlnkPos-- < pTxtNd->GetTxt().Len() &&
( ' ' == pTxtNd->GetTxt().GetChar( nBlnkPos ) ))
-// JP 23.08.95: keine Tabs stehen lassen, diese in Blanks wandeln
-// ( ' ' == ( cCh = pTxtNd->GetTxt()[ nBlnkPos ] ) || '\t' == cCh ))
pPos->nContent--;
else
{
@@ -1097,8 +1090,6 @@ sal_Bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
pTxtNd = pPos->nNode.GetNode().GetTxtNode();
if( nBlnkPos < pTxtNd->GetTxt().Len() &&
( ' ' == pTxtNd->GetTxt().GetChar( nBlnkPos )))
-// JP 23.08.95: keine Tabs stehen lassen, diese in Blanks wandeln
-// ( ' ' == ( cCh = pTxtNd->GetTxt()[ nBlnkPos ] ) || '\t' == cCh ))
pPos->nContent++;
else
return sal_False;
@@ -1473,19 +1464,17 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
IsBlanksInString( *pAktTxtNd ) ||
IsSentenceAtEnd( *pAktTxtNd );
sal_Bool bRTL = pEditShell->IsInRightToLeftText();
-// SetColl( RES_POOLCOLL_NUM_LEVEL1 + ( nLvl * 4 ) );
DeleteAktPara( sal_True, sal_True );
sal_Bool bChgBullet = sal_False, bChgEnum = sal_False;
xub_StrLen nAutoCorrPos = 0;
// falls die Numerierung gesetzt werden, die akt. besorgen
- // --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule aRule( pDoc->GetUniqueNumRuleName(),
// --> OD 2008-06-06 #i89178#
numfunc::GetDefaultPositionAndSpaceMode() );
// <--
- // <--
+
const SwNumRule* pCur = 0;
if( aFlags.bSetNumRule && 0 != (pCur = pAktTxtNd->GetNumRule()) )
aRule = *pCur;
@@ -1494,7 +1483,6 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
const String& rStr = pAktTxtNd->GetTxt();
xub_StrLen nTxtStt = 0, nOrigTxtStt = 0;
const sal_Unicode* pFndBulletChr;
-// if( aFlags.bAFmtByInput ? aFlags.bSetNumRule : aFlags.bChgEnumNum &&
if( aFlags.bChgEnumNum &&
2 < rStr.Len() &&
0 != ( pFndBulletChr = StrChr( pBulletChar, rStr.GetChar( nTxtStt ) ))
@@ -1681,10 +1669,8 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
pAktTxtNd->SetAttrListLevel(nLvl);
pAktTxtNd->SetNumLSpace( sal_True );
- // --> OD 2008-03-17 #refactorlists#
// start new list
pDoc->SetNumRule( aDelPam, aRule, true );
- // <--
aDelPam.DeleteMark();
aDelPam.GetPoint()->nContent.Assign( pAktTxtNd, 0 );
@@ -2089,12 +2075,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
case '?':
if( aFlags.bCptlSttSntnc )
bFirstSent = sal_True;
-//alle Wortrenner loesen die Autokorrektur aus!
-// break;
default:
-//alle Wortrenner loesen die Autokorrektur aus!
-// case ' ':
-// case '\t':
if( !( rAppCC.isLetterNumeric( *pTxt, nPos )
|| '/' == cChar )) // '/' should not be a word seperator (e.g. '1/2' needs to be handled as one word for replacement)
{
@@ -2202,7 +2183,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
pCharClass( 0 ),
nRedlAutoFmtSeqId( 0 )
{
- ASSERT( (pSttNd && pEndNd) || (!pSttNd && !pEndNd),
+ OSL_ENSURE( (pSttNd && pEndNd) || (!pSttNd && !pEndNd),
"Kein Bereich angegeben" );
if( aFlags.bSetNumRule && !aFlags.bAFmtByInput )
@@ -2417,10 +2398,6 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
if( !bNxtEmpty && HasBreakAttr( *pNxtNd ) )
bNxtEmpty = sal_True;
- // fuer z.B. selbst definierte Einzuege oder
- // rechts/zentierte Ausrichtung
-// if( !nLevel && 0 != aFInfo.GetLineStart() )
-// nLevel = 1;
}
else
{
@@ -2459,13 +2436,6 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// nicht, dann teste auf Ueberschrift
if( ':' == sEndClrStr.GetChar( nLen - 1 ) )
{
-//---------------------------------------------------------------------------
-// Wie ist denn nun die Bedingung fuer die Ueberschrift auf Ebene 3 ??
-// Zur Zeit: generell wenn am Ende ein ':' ist.
-//
-// if( bNxtEmpty || bNxtAlpha )
-// !IsEnumericChar( *pNxtNd ) )
-//---------------------------------------------------------------------------
{
BuildHeadLine( 2 );
eStat = READ_NEXT_PARA;
@@ -2478,16 +2448,8 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
if( bNxtEmpty || bNxtAlpha
|| ( pNxtNd && IsEnumericChar( *pNxtNd ))
-//---------------------------------------------------------------------------
-// ist zum Verwechseln mit neg. Einzug !!
- /*|| nLevel < nNxtLevel*/
-//---------------------------------------------------------------------------
-
)
{
- // wurde Level vom Text vorgegeben ?
-// if( USHRT_MAX != nDigitLvl )
-// nLevel = nDigitLvl;
// eine Ebene runter ?
if( nLevel >= MAXLEVEL )
@@ -2529,9 +2491,6 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
BuildEnum( nLevel, nDigitLvl );
eStat = READ_NEXT_PARA;
}
-//JP 25.03.96: Vorlagen fuer Einzug zulassen
-// else if( aFlags.bAFmtByInput )
-// eStat = READ_NEXT_PARA;
else if( bReplaceStyles )
eStat = nLevel ? TST_IDENT : TST_NEG_IDENT;
else
@@ -2793,3 +2752,4 @@ void SwEditShell::SetAutoFmtFlags(SvxSwAutoFmtFlags * pFlags)
pEditFlags->aByInputBulletFont = pFlags->aByInputBulletFont;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx
index 386814eda008..bb5d650484b2 100644
--- a/sw/source/core/edit/edatmisc.cxx
+++ b/sw/source/core/edit/edatmisc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,7 +55,7 @@ void SwEditShell::ResetAttr( const SvUShortsSort* pAttrs )
}
FOREACHPAM_START(this)
- // if ( PCURCRSR->HasMark() )
+
GetDoc()->ResetAttrs(*PCURCRSR, sal_True, pAttrs);
FOREACHPAM_END()
@@ -70,10 +71,6 @@ void SwEditShell::ResetAttr( const SvUShortsSort* pAttrs )
void SwEditShell::GCAttr()
{
-//JP 04.02.97: wozu eine Action-Klammerung - ein Formatierung sollte nicht
-// ausgeloest werden, so dass es hier ueberfluessig ist.
-// Sonst Probleme im MouseBut.DownHdl - Bug 35562
-// StartAllAction();
FOREACHPAM_START(this)
if ( !PCURCRSR->HasMark() )
{
@@ -97,7 +94,6 @@ void SwEditShell::GCAttr()
aIdx <= rEnd );
}
FOREACHPAM_END()
-// EndAllAction();
}
// Setze das Attribut als neues default Attribut im Dokument.
@@ -111,17 +107,6 @@ void SwEditShell::SetDefault( const SfxPoolItem& rFmtHint )
EndAllAction();
}
-/*
-
-void SwEditShell::SetDefault( const SfxItemSet& rSet )
-{
- // 7502: Action-Klammerung
- StartAllAction();
- GetDoc()->SetDefault( rSet );
- EndAllAction();
-}
-*/
-
// Erfrage das Default Attribut in diesem Dokument.
const SfxPoolItem& SwEditShell::GetDefault( sal_uInt16 nFmtHint ) const
@@ -193,3 +178,4 @@ void SwEditShell::SetAttr( const SfxItemSet& rSet, sal_uInt16 nFlags )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 95b053aac213..e55b8c3f05ed 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,10 +71,8 @@ const sal_uInt16& getMaxLookup()
return nMaxLookup;
}
-// --> OD 2008-01-16 #newlistlevelattrs#
sal_Bool SwEditShell::GetCurAttr( SfxItemSet& rSet,
const bool bMergeIndentValuesOfNumRule ) const
-// <--
{
if( GetCrsrCnt() > getMaxLookup() )
{
@@ -142,11 +141,10 @@ sal_Bool SwEditShell::GetCurAttr( SfxItemSet& rSet,
xub_StrLen nStt = n == nSttNd ? nSttCnt : 0,
nEnd = n == nEndNd ? nEndCnt
: ((SwTxtNode*)pNd)->GetTxt().Len();
- // --> OD 2008-01-16 #newlistlevelattrs#
+
((SwTxtNode*)pNd)->GetAttr( *pSet, nStt, nEnd,
sal_False, sal_True,
bMergeIndentValuesOfNumRule );
- // <--
}
break;
case ND_GRFNODE:
@@ -257,21 +255,6 @@ bool SwEditShell::SetCurFtn( const SwFmtFtn& rFillFtn )
}
-
-/*sal_uInt16 SwEditShell::GetFtnCnt( sal_Bool bEndNotes = sal_False ) const
-{
- const SwFtnIdxs &rIdxs = pDoc->GetFtnIdxs();
- sal_uInt16 nCnt = 0;
- for ( sal_uInt16 i = 0; i < rIdxs.Count(); ++i )
- {
- const SwFmtFtn &rFtn = rIdxs[i]->GetFtn();
- if ( bEndNotes == rFtn.IsEndNote() )
- nCnt++;
- }
- return nCnt;
-} */
-
-
bool SwEditShell::HasFtns( bool bEndNotes ) const
{
const SwFtnIdxs &rIdxs = pDoc->GetFtnIdxs();
@@ -427,10 +410,9 @@ sal_Bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
{
bRet = sal_False;
- // --> OD 2008-03-19 #refactorlists#
if ( rTNd.IsInList() )
{
- ASSERT( rTNd.GetNumRule(),
+ OSL_ENSURE( rTNd.GetNumRule(),
"<lcl_IsNoEndTxtAttrAtPos(..)> - no list style found at text node. Serious defect -> please inform OD." );
const SwNumRule* pNumRule = rTNd.GetNumRule();
const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<sal_uInt16>(rTNd.GetActualListLevel()) );
@@ -490,7 +472,7 @@ sal_Bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
sal_uInt16 SwEditShell::GetScriptType() const
{
sal_uInt16 nRet = 0;
- //if( pBreakIt->GetBreakIter().is() )
+
{
FOREACHPAM_START(this)
@@ -551,7 +533,7 @@ sal_uInt16 SwEditShell::GetScriptType() const
? pEnd->nContent.GetIndex()
: rTxt.Len();
- ASSERT( nEndPos <= rTxt.Len(), "Index outside the range - endless loop!" );
+ OSL_ENSURE( nEndPos <= rTxt.Len(), "Index outside the range - endless loop!" );
if( nEndPos > rTxt.Len() )
nEndPos = rTxt.Len();
@@ -625,7 +607,7 @@ sal_uInt16 SwEditShell::GetScalingOfSelectedText() const
const SwPaM* pCrsr = GetCrsr();
const SwPosition* pStt = pCrsr->Start();
const SwTxtNode* pTNd = pStt->nNode.GetNode().GetTxtNode();
- ASSERT( pTNd, "no textnode available" );
+ OSL_ENSURE( pTNd, "no textnode available" );
sal_uInt16 nScaleWidth;
if( pTNd )
@@ -644,3 +626,5 @@ sal_uInt16 SwEditShell::GetScalingOfSelectedText() const
nScaleWidth = 100; // default are no scaling -> 100%
return nScaleWidth;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index 9125caadf0e9..e6b111dd38f1 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -280,9 +281,9 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
{
SwPaM* pCmp = (SwPaM*)pDestShell->GetCrsr(); // sicher den Pointer auf Cursor
do {
- ASSERT( pCmp->GetPoint()->nContent.GetIdxReg()
+ OSL_ENSURE( pCmp->GetPoint()->nContent.GetIdxReg()
== pCmp->GetCntntNode(), "Point im falschen Node" );
- ASSERT( pCmp->GetMark()->nContent.GetIdxReg()
+ OSL_ENSURE( pCmp->GetMark()->nContent.GetIdxReg()
== pCmp->GetCntntNode(sal_False), "Mark im falschen Node" );
sal_Bool bTst = *pCmp->GetPoint() == *pCmp->GetMark();
(void) bTst;
@@ -354,3 +355,4 @@ sal_Bool SwEditShell::DelFullPara()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 838abeb659bd..cf2af7012047 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,9 +39,7 @@
#include <ndtxt.hxx>
#include <paratr.hxx>
#include <fmtpdsc.hxx>
-// --> FME 2004-06-29 #114856# Formular view
-#include <viewopt.hxx>
-// <--
+#include <viewopt.hxx> // Formular view
#include <SwRewriter.hxx>
#include <numrule.hxx>
#include <swundo.hxx>
@@ -82,9 +81,8 @@ void SwEditShell::SetTxtFmtColl( SwTxtFmtColl *pFmt,
FOREACHPAM_START(this)
if( !PCURCRSR->HasReadonlySel(
- // --> FME 2004-06-29 #114856# Formular view
+ // Formular view
GetViewOptions()->IsFormView() ) )
- // <--
GetDoc()->SetTxtFmtColl( *PCURCRSR, pLocal, true, bResetListAttrs );
FOREACHPAM_END()
@@ -102,7 +100,7 @@ SwTxtFmtColl* SwEditShell::MakeTxtFmtColl(const String& rFmtCollName,
pParent = &GetTxtFmtColl(0);
if ( (pColl=GetDoc()->MakeTxtFmtColl(rFmtCollName, pParent)) == 0 )
{
- ASSERT( sal_False, "MakeTxtFmtColl failed" )
+ OSL_ENSURE( sal_False, "MakeTxtFmtColl failed" );
}
return pColl;
@@ -160,3 +158,4 @@ void SwEditShell::FillByEx(SwTxtFmtColl* pColl, sal_Bool bReset)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index a0e99e7a57e5..8e20335fe89f 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -265,7 +266,7 @@ void SwEditShell::Insert2(SwField& rFld, const bool bForceExpandHints)
FOREACHPAM_START(this) // fuer jeden PaM
bool bSuccess(GetDoc()->InsertPoolItem(*PCURCRSR, aFld, nInsertFlags));
- ASSERT( bSuccess, "Doc->Insert(Field) failed");
+ OSL_ENSURE( bSuccess, "Doc->Insert(Field) failed");
(void) bSuccess;
FOREACHPAM_END() // fuer jeden PaM
@@ -299,7 +300,7 @@ SwField* SwEditShell::GetCurFld() const
SwTxtFld *pTxtFld = GetDocTxtFld( pCrsr->Start() );
SwField *pCurFld = NULL;
- /* #108536# Field was only recognized if no selection was
+ /* Field was only recognized if no selection was
present. Now it is recognized if either the cursor is in the
field or the selection spans exactly over the field. */
if( pTxtFld &&
@@ -318,7 +319,7 @@ SwField* SwEditShell::GetCurFld() const
}
- /* #108536# removed handling of multi-selections */
+ /* removed handling of multi-selections */
return pCurFld;
}
@@ -329,7 +330,6 @@ SwField* SwEditShell::GetCurFld() const
|* SwEditShell::UpdateFlds()
|*
|* Beschreibung Stehen die PaMs auf Feldern ?
-|* BP 12.05.92
|*
*************************************************************************/
SwTxtFld* lcl_FindInputFld( SwDoc* pDoc, SwField& rFld )
@@ -374,11 +374,6 @@ void SwEditShell::UpdateFlds( SwField &rFld )
SwTxtFld *pTxtFld;
SwFmtFld *pFmtFld;
-// if( pCrsr->GetNext() == pCrsr && !pCrsr->HasMark() &&
-// ( 0 != ( pTxtFld = GetDocTxtFld( pCrsr->Start() ) ) ||
-// 0 != ( pTxtFld = lcl_FindInputFld( GetDoc(), rFld ) ) ) &&
-// ( pFmtFld = (SwFmtFld*)&pTxtFld->GetFld())->GetFld()
-// ->GetTyp()->Which() == rFld.GetTyp()->Which() )
if ( pCrsr->GetNext() == pCrsr && !pCrsr->HasMark())
{
pTxtFld = GetDocTxtFld(pCrsr->Start());
@@ -387,7 +382,7 @@ void SwEditShell::UpdateFlds( SwField &rFld )
pTxtFld = lcl_FindInputFld( GetDoc(), rFld);
if (pTxtFld != 0)
- GetDoc()->UpdateFld(pTxtFld, rFld, pMsgHnt, sal_True); // #111840#
+ GetDoc()->UpdateFld(pTxtFld, rFld, pMsgHnt, sal_True);
}
// bOkay (statt return wg. EndAllAction) wird sal_False,
@@ -434,7 +429,7 @@ void SwEditShell::UpdateFlds( SwField &rFld )
bOkay = sal_False;
bTblSelBreak = GetDoc()->UpdateFld(pTxtFld, rFld,
- pMsgHnt, sal_False); // #111840#
+ pMsgHnt, sal_False);
}
// Der Suchbereich wird um den gefundenen Bereich
// verkuerzt.
@@ -451,7 +446,7 @@ void SwEditShell::UpdateFlds( SwField &rFld )
EndAllAction();
}
-/*-----------------13.05.92 10:54-------------------
+/*--------------------------------------------------
Liefert den logischen fuer die Datenbank zurueck
--------------------------------------------------*/
@@ -551,16 +546,12 @@ sal_Bool SwEditShell::IsLabelDoc() const
{
return getIDocumentSettingAccess()->get(IDocumentSettingAccess::LABEL_DOCUMENT);
}
-/* -----------------------------21.12.99 12:53--------------------------------
- ---------------------------------------------------------------------------*/
void SwEditShell::ChangeAuthorityData(const SwAuthEntry* pNewData)
{
GetDoc()->ChangeAuthorityData(pNewData);
}
-/* -----------------------------03.08.2001 12:04------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwEditShell::IsAnyDatabaseFieldInDoc()const
{
const SwFldTypes * pFldTypes = GetDoc()->GetFldTypes();
@@ -593,3 +584,5 @@ sal_Bool SwEditShell::IsAnyDatabaseFieldInDoc()const
}
return sal_False;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edfldexp.cxx b/sw/source/core/edit/edfldexp.cxx
index 6359c982507e..a506445ad10f 100644
--- a/sw/source/core/edit/edfldexp.cxx
+++ b/sw/source/core/edit/edfldexp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include "precompiled_sw.hxx"
#include <editsh.hxx>
#include <dbfld.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <com/sun/star/container/XNameAccess.hpp>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -46,9 +45,6 @@
using namespace com::sun::star;
using ::rtl::OUString;
-/* -----------------28.11.2002 17:53-----------------
- *
- * --------------------------------------------------*/
sal_Bool SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
{
const SwFldTypes * pFldTypes = GetDoc()->GetFldTypes();
@@ -56,7 +52,7 @@ sal_Bool SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
uno::Reference< lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
if( !xMgr.is() )
return sal_False;
- uno::Reference<uno::XInterface> xInstance = xMgr->createInstance( OUString::createFromAscii( "com.sun.star.sdb.DatabaseContext" ));
+ uno::Reference<uno::XInterface> xInstance = xMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DatabaseContext")));
uno::Reference<container::XNameAccess> xDBContext(xInstance, uno::UNO_QUERY) ;
if(!xDBContext.is())
return sal_False;
@@ -99,3 +95,4 @@ sal_Bool SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx
index 225a1df48c74..e597cac10d02 100644
--- a/sw/source/core/edit/edfmt.cxx
+++ b/sw/source/core/edit/edfmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,7 +39,7 @@
#include <fchrfmt.hxx>
#include <frmfmt.hxx>
#include <charfmt.hxx>
-#include "ndtxt.hxx" // Fuer GetXXXFmt
+#include "ndtxt.hxx" // for GetXXXFmt
#include "hints.hxx"
/*************************************
@@ -92,7 +93,7 @@ void SwEditShell::FillByEx(SwCharFmt* pCharFmt, sal_Bool bReset)
{
const SwPosition* pPtPos = pPam->GetPoint();
const SwPosition* pMkPos = pPam->GetMark();
- if( pPtPos->nNode == pMkPos->nNode ) // im selben Node ?
+ if( pPtPos->nNode == pMkPos->nNode ) // in the same node?
{
nStt = pPtPos->nContent.GetIndex();
if( nStt < pMkPos->nContent.GetIndex() )
@@ -154,7 +155,7 @@ SwCharFmt* SwEditShell::MakeCharFmt( const String& rName,
}
//----------------------------------
-// inlines im Product
+// inlines in product
SwTxtFmtColl* SwEditShell::GetTxtCollFromPool( sal_uInt16 nId )
@@ -163,7 +164,7 @@ SwTxtFmtColl* SwEditShell::GetTxtCollFromPool( sal_uInt16 nId )
}
- // return das geforderte automatische Format - Basis-Klasse !
+ // return the demanded automatic format - base-class !
SwFmt* SwEditShell::GetFmtFromPool( sal_uInt16 nId )
{
return GetDoc()->GetFmtFromPool( nId );
@@ -195,3 +196,5 @@ SwTxtFmtColl* SwEditShell::FindTxtFmtCollByName( const String& rName ) const
{
return pDoc->FindTxtFmtCollByName( rName );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx
index d07b5b7a1e6c..94cc61bc0499 100644
--- a/sw/source/core/edit/edglbldc.cxx
+++ b/sw/source/core/edit/edglbldc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,7 +87,7 @@ sal_uInt16 SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
{
case TOX_HEADER_SECTION: break; // ignore
case TOX_CONTENT_SECTION:
- ASSERT( pSect->ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
+ OSL_ENSURE( pSect->ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
pNew = new SwGlblDocContent( (SwTOXBaseSection*)pSect );
break;
@@ -408,3 +409,4 @@ SwGlblDocContent::SwGlblDocContent( const SwSection* pSect )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index 56996558b306..a559edc840a0 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -181,7 +182,7 @@ sal_uInt16 SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
sal_Bool SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
{
- ASSERT( pInsDoc, "kein Ins.Dokument" );
+ OSL_ENSURE( pInsDoc, "kein Ins.Dokument" );
SwNodes& rNds = pInsDoc->GetNodes();
@@ -282,7 +283,6 @@ sal_Bool SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
sal_Bool SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
{
- sal_Bool bRet = sal_False;
GetCrsr(); // ggfs. alle Cursor erzeugen lassen
if( IsSelOnePara() )
{
@@ -304,7 +304,6 @@ sal_Bool SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
RTL_CONSTASCII_STRINGPARAM( "\015\012" ));
#endif
}
- bRet = sal_True;
}
else if( IsSelection() )
{
@@ -371,3 +370,4 @@ sal_Bool SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 21d550ebd6f1..769ef029e5b4 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#include "precompiled_sw.hxx"
#include <hintids.hxx>
-#include <tools/list.hxx>
#include <tools/urlobj.hxx>
#include <vcl/cmdevt.hxx>
#include <unotools/charclass.hxx>
@@ -86,7 +86,7 @@ void SwEditShell::Insert( sal_Unicode c, sal_Bool bOnlyCurrCrsr )
FOREACHPAM_START(this)
const bool bSuccess = GetDoc()->InsertString(*PCURCRSR, c);
- ASSERT( bSuccess, "Doc->Insert() failed." );
+ OSL_ENSURE( bSuccess, "Doc->Insert() failed." );
(void) bSuccess;
SaveTblBoxCntnt( PCURCRSR->GetPoint() );
@@ -120,7 +120,7 @@ void SwEditShell::Insert2(const String &rStr, const bool bForceExpandHints )
//OPT: GetSystemCharSet
const bool bSuccess =
GetDoc()->InsertString(*_pStartCrsr, rStr, nInsertFlags);
- ASSERT( bSuccess, "Doc->Insert() failed." );
+ OSL_ENSURE( bSuccess, "Doc->Insert() failed." );
(void) bSuccess;
SaveTblBoxCntnt( _pStartCrsr->GetPoint() );
@@ -188,7 +188,7 @@ void SwEditShell::Overwrite(const String &rStr)
FOREACHPAM_START(this)
if( !GetDoc()->Overwrite(*PCURCRSR, rStr ) )
{
- ASSERT( sal_False, "Doc->Overwrite(Str) failed." )
+ OSL_ENSURE( sal_False, "Doc->Overwrite(Str) failed." );
}
SaveTblBoxCntnt( PCURCRSR->GetPoint() );
FOREACHPAM_END()
@@ -222,9 +222,6 @@ long SwEditShell::SplitNode( sal_Bool bAutoFormat, sal_Bool bCheckTableStart )
return(1L);
}
-/*-- 11.05.2004 09:41:20---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SwEditShell::AppendTxtNode()
{
sal_Bool bRet = sal_False;
@@ -266,24 +263,22 @@ SwGrfNode * SwEditShell::_GetGrfNode() const
* oder auf die gleiche Graphic zeigt)
******************************************************************************/
-// --> OD 2005-02-09 #119353# - robust
const Graphic* SwEditShell::GetGraphic( sal_Bool bWait ) const
{
SwGrfNode* pGrfNode = _GetGrfNode();
- // --> OD 2005-02-09 #119353# - robust
const Graphic* pGrf( 0L );
if ( pGrfNode )
{
pGrf = &(pGrfNode->GetGrf());
- // --> OD 2007-03-01 #i73788#
+ // --> #i73788#
// no load of linked graphic, if its not needed now (bWait = sal_False).
if ( bWait )
{
if( pGrf->IsSwapOut() ||
( pGrfNode->IsLinkedFile() && GRAPHIC_DEFAULT == pGrf->GetType() ) )
{
-#ifdef DBG_UTIL
- ASSERT( pGrfNode->SwapIn( bWait ) || !bWait, "Grafik konnte nicht geladen werden" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( pGrfNode->SwapIn( bWait ) || !bWait, "Grafik konnte nicht geladen werden" );
#else
pGrfNode->SwapIn( bWait );
#endif
@@ -293,8 +288,8 @@ const Graphic* SwEditShell::GetGraphic( sal_Bool bWait ) const
{
if ( pGrf->IsSwapOut() && !pGrfNode->IsLinkedFile() )
{
-#ifdef DBG_UTIL
- ASSERT( pGrfNode->SwapIn( bWait ) || !bWait, "Grafik konnte nicht geladen werden" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( pGrfNode->SwapIn( bWait ) || !bWait, "Grafik konnte nicht geladen werden" );
#else
pGrfNode->SwapIn( bWait );
#endif
@@ -316,13 +311,10 @@ sal_Bool SwEditShell::IsGrfSwapOut( sal_Bool bOnlyLinked ) const
: pGrfNode->GetGrfObj().IsSwappedOut());
}
-// --> OD 2005-02-09 #119353# - robust
const GraphicObject* SwEditShell::GetGraphicObj() const
{
SwGrfNode* pGrfNode = _GetGrfNode();
- // --> OD 2005-02-09 #119353# - robust
return pGrfNode ? &(pGrfNode->GetGrfObj()) : 0L;
- // <--
}
sal_uInt16 SwEditShell::GetGraphicType() const
@@ -375,7 +367,7 @@ void SwEditShell::ReRead( const String& rGrfName, const String& rFltName,
void SwEditShell::GetGrfNms( String* pGrfName, String* pFltName,
const SwFlyFrmFmt* pFmt ) const
{
- ASSERT( pGrfName || pFltName, "was wird denn nun erfragt?" );
+ OSL_ENSURE( pGrfName || pFltName, "was wird denn nun erfragt?" );
if( pFmt )
GetDoc()->GetGrfNms( *pFmt, pGrfName, pFltName );
else
@@ -387,30 +379,6 @@ void SwEditShell::GetGrfNms( String* pGrfName, String* pFltName,
}
-// alternativen Text abfragen/setzen
-//const String& SwEditShell::GetAlternateText() const
-//{
-// SwPaM* pCrsr = GetCrsr();
-// const SwNoTxtNode* pNd;
-// if( !pCrsr->HasMark() && 0 != ( pNd = pCrsr->GetNode()->GetNoTxtNode()) )
-// return pNd->GetAlternateText();
-
-// return aEmptyStr;
-//}
-
-
-//void SwEditShell::SetAlternateText( const String& rTxt )
-//{
-// SwPaM* pCrsr = GetCrsr();
-// SwNoTxtNode* pNd;
-// if( !pCrsr->HasMark() && 0 != ( pNd = pCrsr->GetNode()->GetNoTxtNode()) )
-// {
-// pNd->SetAlternateText( rTxt, sal_True );
-// GetDoc()->SetModified();
-// }
-//}
-
-
const PolyPolygon *SwEditShell::GetGraphicPolygon() const
{
SwNoTxtNode *pNd = GetCrsr()->GetNode()->GetNoTxtNode();
@@ -434,7 +402,7 @@ void SwEditShell::SetGraphicPolygon( const PolyPolygon *pPoly )
void SwEditShell::ClearAutomaticContour()
{
SwNoTxtNode *pNd = GetCrsr()->GetNode()->GetNoTxtNode();
- ASSERT( pNd, "is no NoTxtNode!" );
+ OSL_ENSURE( pNd, "is no NoTxtNode!" );
if( pNd->HasAutomaticContour() )
{
StartAllAction();
@@ -458,14 +426,14 @@ void SwEditShell::ClearAutomaticContour()
svt::EmbeddedObjectRef& SwEditShell::GetOLEObject() const
{
- ASSERT( CNT_OLE == GetCntType(), "GetOLEObj: kein OLENode." );
- ASSERT( !GetCrsr()->HasMark() ||
+ OSL_ENSURE( CNT_OLE == GetCntType(), "GetOLEObj: kein OLENode." );
+ OSL_ENSURE( !GetCrsr()->HasMark() ||
(GetCrsr()->HasMark() &&
GetCrsr()->GetPoint()->nNode == GetCrsr()->GetMark()->nNode),
"GetOLEObj: kein OLENode." );
SwOLENode *pOLENode = GetCrsr()->GetNode()->GetOLENode();
- ASSERT( pOLENode, "GetOLEObj: kein OLENode." );
+ OSL_ENSURE( pOLENode, "GetOLEObj: kein OLENode." );
SwOLEObj& rOObj = pOLENode->GetOLEObj();
return rOObj.GetObject();
}
@@ -493,7 +461,7 @@ sal_Bool SwEditShell::HasOLEObj( const String &rName ) const
void SwEditShell::SetChartName( const String &rName )
{
SwOLENode *pONd = GetCrsr()->GetNode()->GetOLENode();
- ASSERT( pONd, "ChartNode not found" );
+ OSL_ENSURE( pONd, "ChartNode not found" );
pONd->SetChartTblName( rName );
}
@@ -614,19 +582,13 @@ void SwEditShell::ReplaceDropTxt( const String &rStr )
SwPaM aPam( rNd, rStr.Len(), rNd, 0 );
if( !GetDoc()->Overwrite( aPam, rStr ) )
{
- ASSERT( sal_False, "Doc->Overwrite(Str) failed." );
+ OSL_ENSURE( sal_False, "Doc->Overwrite(Str) failed." );
}
EndAllAction();
}
}
-/******************************************************************************
- * Methode :
- * Beschreibung:
- * Erstellt : OK 25.04.94 13:45
- * Aenderung :
- ******************************************************************************/
String SwEditShell::Calculate()
{
@@ -725,8 +687,8 @@ Graphic SwEditShell::GetIMapGraphic() const
if( rGrf.IsSwapOut() || ( ((SwGrfNode*)pNd)->IsLinkedFile() &&
GRAPHIC_DEFAULT == rGrf.GetType() ) )
{
-#ifdef DBG_UTIL
- ASSERT( ((SwGrfNode*)pNd)->SwapIn( sal_True ) || !sal_True, "Grafik konnte nicht geladen werden" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( ((SwGrfNode*)pNd)->SwapIn( TRUE ) || !TRUE, "Grafik konnte nicht geladen werden" );
#else
((SwGrfNode*)pNd)->SwapIn( sal_True );
#endif
@@ -987,16 +949,16 @@ sal_uInt16 SwEditShell::GetLineCount( sal_Bool bActPos )
SwFrm* pFrm = pCntFrm;
while( pFrm && !(pFrm->GetType() & nTyp) )
pFrm = pFrm->GetUpper();
- ASSERT( pFrm, "Wo bin ich?" );
+ OSL_ENSURE( pFrm, "Wo bin ich?" );
if( pFrm && ( pFrm->GetType() & FRM_FOOTER ) )
pTmp = pCNd->FindFooterStartNode();
else
pTmp = pCNd->FindHeaderStartNode();
}
- ASSERT( pTmp, "Missing StartNode" );
+ OSL_ENSURE( pTmp, "Missing StartNode" );
aStart = *pTmp;
}
- ASSERT( pCNd && pCntFrm, "Missing Layout-Information" );
+ OSL_ENSURE( pCNd && pCntFrm, "Missing Layout-Information" );
}
while( 0 != ( pCNd = GetDoc()->GetNodes().GoNextSection(
@@ -1196,3 +1158,4 @@ void SwEditShell::CountWords( SwDocStat& rStat ) const
FOREACHPAM_END()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index dfe4e13a2b08..b18c7daef546 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,8 +73,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::linguistic2;
-#define C2U(cChar) rtl::OUString::createFromAscii(cChar)
-
extern void repaintTextFrames( SwModify& rModify );
/*************************************************************************
@@ -153,8 +152,8 @@ public:
bool SpellSentence(::svx::SpellPortions& rPortions, bool bIsGrammarCheck);
void ToSentenceStart();
- const ::svx::SpellPortions GetLastPortions(){ return aLastPortions;}
- SpellContentPositions GetLastPositions() {return aLastPositions;}
+ const ::svx::SpellPortions GetLastPortions() const { return aLastPortions;}
+ SpellContentPositions GetLastPositions() const {return aLastPositions;}
void ContinueAfterThisSentence() { bMoveToEndOfSentence = true; }
};
@@ -216,7 +215,7 @@ const SwTxtNode *pLinguNode;
SwLinguIter::SwLinguIter()
: pSh( 0 ), pStart( 0 ), pEnd( 0 ), pCurr( 0 ), pCurrX( 0 )
{
- // @@@ es fehlt: Sicherstellen der Reentrance, ASSERTs etc.
+ // @@@ es fehlt: Sicherstellen der Reentrance, OSL_ENSURE( etc.
}
/*************************************************************************
@@ -238,12 +237,10 @@ void SwLinguIter::_Start( SwEditShell *pShell, SwDocPositions eStart,
SET_CURR_SHELL( pSh );
- ASSERT( !pEnd, "LinguStart ohne End?");
+ OSL_ENSURE( !pEnd, "LinguStart ohne End?");
SwPaM *pCrsr = pSh->GetCrsr();
- // pStk->SetCurCrsr();
-// if( pCrsr->HasMark() || pCrsr != pCrsr->GetNext() )
if( pShell->HasSelection() || pCrsr != pCrsr->GetNext() )
{
bSetCurr = 0 != GetCurr();
@@ -299,7 +296,7 @@ void SwLinguIter::_End(bool bRestoreSelection)
if( !pSh )
return;
- ASSERT( pEnd, "SwEditShell::SpellEnd() ohne Start?");
+ OSL_ENSURE( pEnd, "SwEditShell::SpellEnd() ohne Start?");
if(bRestoreSelection)
{
while( nCrsrCnt-- )
@@ -314,10 +311,6 @@ void SwLinguIter::_End(bool bRestoreSelection)
DELETEZ(pCurrX);
pSh = 0;
-
-#ifdef LINGU_STATISTIK
- aSwLinguStat.Flush();
-#endif
}
/*************************************************************************
@@ -358,9 +351,7 @@ uno::Any SwSpellIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt )
if( !pMySh )
return aSpellRet;
-// const SwPosition *pEnd = GetEnd();
-
- ASSERT( GetEnd(), "SwEditShell::SpellContinue() ohne Start?");
+ OSL_ENSURE( GetEnd(), "SwEditShell::SpellContinue() ohne Start?");
uno::Reference< uno::XInterface > xSpellRet;
sal_Bool bGoOn = sal_True;
@@ -434,9 +425,7 @@ uno::Any SwConvIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt )
if( !pMySh )
return aConvRet;
-// const SwPosition *pEnd = GetEnd();
-
- ASSERT( GetEnd(), "SwConvIter::Continue() ohne Start?");
+ OSL_ENSURE( GetEnd(), "SwConvIter::Continue() ohne Start?");
rtl::OUString aConvText;
sal_Bool bGoOn = sal_True;
@@ -494,7 +483,7 @@ sal_Bool SwHyphIter::IsAuto()
{
uno::Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() );
return xProp.is() ? *(sal_Bool*)xProp->getPropertyValue(
- C2U(UPN_IS_HYPH_AUTO) ).getValue()
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UPN_IS_HYPH_AUTO)) ).getValue()
: sal_False;
}
@@ -523,7 +512,7 @@ void SwHyphIter::Start( SwEditShell *pShell, SwDocPositions eStart, SwDocPositio
// robust
if( GetSh() || GetEnd() )
{
- ASSERT( !GetSh(), "+SwEditShell::HyphStart: missing HyphEnd()" );
+ OSL_ENSURE( !GetSh(), "+SwEditShell::HyphStart: missing HyphEnd()" );
return;
}
@@ -562,12 +551,11 @@ uno::Any SwHyphIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt )
const sal_Bool bAuto = IsAuto();
uno::Reference< XHyphenatedWord > xHyphWord;
- sal_uInt16 nRet;
sal_Bool bGoOn = sal_False;
do {
SwPaM *pCrsr;
do {
- ASSERT( GetEnd(), "SwEditShell::SpellContinue() ohne Start?" );
+ OSL_ENSURE( GetEnd(), "SwEditShell::SpellContinue() ohne Start?" );
pCrsr = pMySh->GetCrsr();
if ( !pCrsr->HasMark() )
pCrsr->SetMark();
@@ -577,10 +565,7 @@ uno::Any SwHyphIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt )
pCrsr->SetMark();
}
- // geraten BUG:
- if ( *pCrsr->End() > *GetEnd() )
- nRet = 0;
- else
+ if ( *pCrsr->End() <= *GetEnd() )
{
*pCrsr->GetMark() = *GetEnd();
@@ -653,7 +638,7 @@ void SwHyphIter::DelSoftHyph( SwPaM &rPam )
void SwHyphIter::InsertSoftHyph( const xub_StrLen nHyphPos )
{
SwEditShell *pMySh = GetSh();
- ASSERT( pMySh, "+SwEditShell::InsertSoftHyph: missing HyphStart()");
+ OSL_ENSURE( pMySh, "+SwEditShell::InsertSoftHyph: missing HyphStart()");
if( !pMySh )
return;
@@ -666,9 +651,9 @@ void SwHyphIter::InsertSoftHyph( const xub_StrLen nHyphPos )
if( pSttPos->nNode != pEndPos->nNode || !nLastHyphLen )
{
- ASSERT( pSttPos->nNode == pEndPos->nNode,
+ OSL_ENSURE( pSttPos->nNode == pEndPos->nNode,
"+SwEditShell::InsertSoftHyph: node warp during hyphenation" );
- ASSERT(nLastHyphLen, "+SwEditShell::InsertSoftHyph: missing HyphContinue()");
+ OSL_ENSURE(nLastHyphLen, "+SwEditShell::InsertSoftHyph: missing HyphContinue()");
*pSttPos = *pEndPos;
return;
}
@@ -753,14 +738,14 @@ void SwEditShell::SpellStart(
// do not spell if interactive spelling is active elsewhere
if (!pConvArgs && !pSpellIter)
{
- ASSERT( !pSpellIter, "wer ist da schon am spellen?" );
+ OSL_ENSURE( !pSpellIter, "wer ist da schon am spellen?" );
pSpellIter = new SwSpellIter;
pLinguIter = pSpellIter;
}
// do not do text conversion if it is active elsewhere
if (pConvArgs && !pConvIter)
{
- ASSERT( !pConvIter, "text conversion already active!" );
+ OSL_ENSURE( !pConvIter, "text conversion already active!" );
pConvIter = new SwConvIter( *pConvArgs );
pLinguIter = pConvIter;
}
@@ -791,13 +776,13 @@ void SwEditShell::SpellEnd( SwConversionArgs *pConvArgs, bool bRestoreSelection
{
if (!pConvArgs && pSpellIter && pSpellIter->GetSh() == this)
{
- ASSERT( pSpellIter, "wo ist mein Iterator?" );
+ OSL_ENSURE( pSpellIter, "wo ist mein Iterator?" );
pSpellIter->_End(bRestoreSelection);
delete pSpellIter, pSpellIter = 0;
}
if (pConvArgs && pConvIter && pConvIter->GetSh() == this)
{
- ASSERT( pConvIter, "wo ist mein Iterator?" );
+ OSL_ENSURE( pConvIter, "wo ist mein Iterator?" );
pConvIter->_End();
delete pConvIter, pConvIter = 0;
}
@@ -828,8 +813,8 @@ uno::Any SwEditShell::SpellContinue(
::StartProgress( STR_STATSTR_SPELL, 0, nEndPage, GetDoc()->GetDocShell() );
}
- ASSERT( pConvArgs || pSpellIter, "SpellIter missing" );
- ASSERT( !pConvArgs || pConvIter, "ConvIter missing" );
+ OSL_ENSURE( pConvArgs || pSpellIter, "SpellIter missing" );
+ OSL_ENSURE( !pConvArgs || pConvIter, "ConvIter missing" );
//JP 18.07.95: verhinder bei Fehlermeldungen die Anzeige der Selektionen
// KEIN StartAction, da damit auch die Paints abgeschaltet
// werden !!!!!
@@ -894,7 +879,7 @@ void SwEditShell::HyphStart( SwDocPositions eStart, SwDocPositions eEnd )
// do not hyphenate if interactive hyphenationg is active elsewhere
if (!pHyphIter)
{
- ASSERT( !pHyphIter, "wer ist da schon am hyphinieren?" );
+ OSL_ENSURE( !pHyphIter, "wer ist da schon am hyphinieren?" );
pHyphIter = new SwHyphIter;
pHyphIter->Start( this, eStart, eEnd );
}
@@ -912,7 +897,7 @@ void SwEditShell::HyphEnd()
{
if (pHyphIter->GetSh() == this)
{
- ASSERT( pHyphIter, "wo ist mein Iterator?" );
+ OSL_ENSURE( pHyphIter, "wo ist mein Iterator?" );
pHyphIter->End();
delete pHyphIter, pHyphIter = 0;
}
@@ -946,7 +931,7 @@ uno::Reference< uno::XInterface >
*pPageSt = 1; // das StatLineStartPercent
}
- ASSERT( pHyphIter, "wo ist mein Iterator?" );
+ OSL_ENSURE( pHyphIter, "wo ist mein Iterator?" );
//JP 18.07.95: verhinder bei Fehlermeldungen die Anzeige der Selektionen
// KEIN StartAction, da damit auch die Paints abgeschaltet
// werden !!!!!
@@ -972,7 +957,7 @@ uno::Reference< uno::XInterface >
void SwEditShell::InsertSoftHyph( const xub_StrLen nHyphPos )
{
- ASSERT( pHyphIter, "wo ist mein Iterator?" );
+ OSL_ENSURE( pHyphIter, "wo ist mein Iterator?" );
pHyphIter->InsertSoftHyph( nHyphPos );
}
@@ -985,7 +970,7 @@ void SwEditShell::InsertSoftHyph( const xub_StrLen nHyphPos )
void SwEditShell::HyphIgnore()
{
- ASSERT( pHyphIter, "wo ist mein Iterator?" );
+ OSL_ENSURE( pHyphIter, "wo ist mein Iterator?" );
//JP 18.07.95: verhinder bei Fehlermeldungen die Anzeige der Selektionen
// KEIN StartAction, da damit auch die Paints abgeschaltet
// werden !!!!!
@@ -1049,7 +1034,7 @@ uno::Reference< XSpellAlternatives >
// implementation here by providing an additional parameter.
Sequence< PropertyValue > aPropVals(1);
PropertyValue &rVal = aPropVals.getArray()[0];
- rVal.Name = C2U( UPN_MAX_NUMBER_OF_SUGGESTIONS );
+ rVal.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_MAX_NUMBER_OF_SUGGESTIONS ));
rVal.Value <<= (sal_Int16) 7;
xSpellAlt = xSpell->spell( aWord, eActLang, aPropVals );
@@ -1088,7 +1073,7 @@ uno::Reference< XSpellAlternatives >
//no determine the rectangle in the current line
xub_StrLen nWordStart = (nBegin + nLeft) < nLineStart ? nLineStart : nBegin + nLeft;
//take one less than the line end - otherwise the next line would be calculated
- xub_StrLen nWordEnd = (nBegin + nLen - nLeft - nRight) > nLineEnd ? nLineEnd - 1: (nBegin + nLen - nLeft - nRight);
+ xub_StrLen nWordEnd = (nBegin + nLen - nLeft - nRight) > nLineEnd ? nLineEnd: (nBegin + nLen - nLeft - nRight);
Push();
pCrsr->DeleteMark();
SwIndex& rContent = GetCrsr()->GetPoint()->nContent;
@@ -1100,7 +1085,7 @@ uno::Reference< XSpellAlternatives >
SwCntntFrm *pCntntFrame = pCntntNode->GetFrm(pPt, pCrsr->GetPoint(), sal_False);
pCntntFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState );
- rContent = nWordEnd;
+ rContent = nWordEnd - 1;
SwRect aEndRect;
pCntntFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState );
rSelectRect = aStartRect.Union( aEndRect );
@@ -1166,12 +1151,6 @@ bool SwEditShell::GetGrammarCorrection(
sal_Int32 nEndOfSentence = ModelToViewHelper::ConvertToViewPosition( pConversionMap, pWrong->getSentenceEnd( nBegin ) );
if( nEndOfSentence == STRING_LEN )
{
-/* if( nStartOfSentence == 0 )
- {
- nStartOfSentence = -1;
- nEndOfSentence = -1;
- }
- else */
nEndOfSentence = aExpandText.getLength();
}
@@ -1206,10 +1185,6 @@ bool SwEditShell::GetGrammarCorrection(
xub_StrLen nLineEnd = GetCrsr()->GetPoint()->nContent.GetIndex();
Pop(sal_False);
-#if OSL_DEBUG_LEVEL > 1
-// pNode->GetGrammarCheck()->Invalidate( 0, STRING_LEN );
-// pNode->SetGrammarCheckDirty( true );
-#endif
// make sure the selection build later from the
// data below does not include footnotes and other
// "in word" character to the left and right in order
@@ -1232,7 +1207,7 @@ bool SwEditShell::GetGrammarCorrection(
//no determine the rectangle in the current line
xub_StrLen nWordStart = (nBegin + nLeft) < nLineStart ? nLineStart : nBegin + nLeft;
//take one less than the line end - otherwise the next line would be calculated
- xub_StrLen nWordEnd = (nBegin + nLen - nLeft - nRight) > nLineEnd ? nLineEnd - 1: (nBegin + nLen - nLeft - nRight);
+ xub_StrLen nWordEnd = (nBegin + nLen - nLeft - nRight) > nLineEnd ? nLineEnd: (nBegin + nLen - nLeft - nRight);
Push();
pCrsr->DeleteMark();
SwIndex& rContent = GetCrsr()->GetPoint()->nContent;
@@ -1244,7 +1219,7 @@ bool SwEditShell::GetGrammarCorrection(
SwCntntFrm *pCntntFrame = pCntntNode->GetFrm(pPt, pCrsr->GetPoint(), sal_False);
pCntntFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState );
- rContent = nWordEnd;
+ rContent = nWordEnd - 1;
SwRect aEndRect;
pCntntFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState );
rSelectRect = aStartRect.Union( aEndRect );
@@ -1256,12 +1231,9 @@ bool SwEditShell::GetGrammarCorrection(
return bRes;
}
-/*-- 18.09.2003 15:08:18---------------------------------------------------
-
- -----------------------------------------------------------------------*/
bool SwEditShell::SpellSentence(::svx::SpellPortions& rPortions, bool bIsGrammarCheck)
{
- ASSERT( pSpellIter, "SpellIter missing" );
+ OSL_ENSURE( pSpellIter, "SpellIter missing" );
if(!pSpellIter)
return false;
bool bRet = pSpellIter->SpellSentence(rPortions, bIsGrammarCheck);
@@ -1277,14 +1249,12 @@ bool SwEditShell::SpellSentence(::svx::SpellPortions& rPortions, bool bIsGrammar
-----------------------------------------------------------------------*/
void SwEditShell::PutSpellingToSentenceStart()
{
- ASSERT( pSpellIter, "SpellIter missing" );
+ OSL_ENSURE( pSpellIter, "SpellIter missing" );
if(!pSpellIter)
return;
pSpellIter->ToSentenceStart();
}
-/*-- 02.02.2005 14:34:41---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_uInt32 lcl_CountRedlines(
const ::svx::SpellPortions& rLastPortions)
{
@@ -1297,9 +1267,6 @@ sal_uInt32 lcl_CountRedlines(
}
return nRet;
}
-/*-- 18.09.2003 15:08:20---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwEditShell::MoveContinuationPosToEndOfCheckedSentence()
{
@@ -1318,15 +1285,15 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
// Note: rNewPortions.size() == 0 is valid and happens when the whole
// sentence got removed in the dialog
- ASSERT( pSpellIter, "SpellIter missing" );
+ OSL_ENSURE( pSpellIter, "SpellIter missing" );
if(pSpellIter &&
pSpellIter->GetLastPortions().size() > 0) // no portions -> no text to be changed
{
const SpellPortions& rLastPortions = pSpellIter->GetLastPortions();
const SpellContentPositions rLastPositions = pSpellIter->GetLastPositions();
- ASSERT(rLastPortions.size() > 0 &&
+ OSL_ENSURE(rLastPortions.size() > 0 &&
rLastPortions.size() == rLastPositions.size(),
- "last vectors of spelling results are not set or not equal")
+ "last vectors of spelling results are not set or not equal");
// iterate over the new portions, beginning at the end to take advantage of the previously
// saved content positions
@@ -1400,7 +1367,7 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
{
//add the 'ignore' markup to the TextNode's grammar ignore markup list
IgnoreGrammarErrorAt( *pCrsr );
- DBG_ERROR("TODO: add ignore mark to text node");
+ OSL_FAIL("TODO: add ignore mark to text node");
}
if(aCurrentNewPortion == rNewPortions.begin())
break;
@@ -1521,9 +1488,7 @@ void lcl_CutRedlines( SpellContentPositions& aDeletedRedlines, SwEditShell* pSh
}
}
}
-/*-- 02.02.2005 11:43:00---------------------------------------------------
- -----------------------------------------------------------------------*/
SpellContentPosition lcl_FindNextDeletedRedline(
const SpellContentPositions& rDeletedRedlines,
xub_StrLen nSearchFrom )
@@ -1543,9 +1508,7 @@ SpellContentPosition lcl_FindNextDeletedRedline(
}
return aRet;
}
-/*-- 18.09.2003 15:08:20---------------------------------------------------
- -----------------------------------------------------------------------*/
bool SwSpellIter::SpellSentence(::svx::SpellPortions& rPortions, bool bIsGrammarCheck)
{
bool bRet = false;
@@ -1556,7 +1519,7 @@ bool SwSpellIter::SpellSentence(::svx::SpellPortions& rPortions, bool bIsGrammar
if( !pMySh )
return false;
- ASSERT( GetEnd(), "SwEditShell::SpellSentence() ohne Start?");
+ OSL_ENSURE( GetEnd(), "SwEditShell::SpellSentence() ohne Start?");
uno::Reference< XSpellAlternatives > xSpellRet;
linguistic2::ProofreadingResult aGrammarResult;
@@ -1748,16 +1711,11 @@ bool SwSpellIter::SpellSentence(::svx::SpellPortions& rPortions, bool bIsGrammar
return bRet;
}
-/*-- 08.09.2008 09:37:15---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwSpellIter::ToSentenceStart()
{
bBackToStartOfSentence = true;
}
-/*-- 08.10.2003 08:49:56---------------------------------------------------
- -----------------------------------------------------------------------*/
LanguageType lcl_GetLanguage(SwEditShell& rSh)
{
sal_uInt16 nScriptType = rSh.GetScriptType();
@@ -1800,7 +1758,7 @@ void SwSpellIter::CreatePortion(uno::Reference< XSpellAlternatives > xAlt,
const beans::PropertyValue* pProperties = pGrammarResult->aProperties.getConstArray();
for( sal_Int32 nProp = 0; nProp < pGrammarResult->aProperties.getLength(); ++nProp )
{
- if( pProperties->Name.equalsAscii("DialogTitle") )
+ if( pProperties->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DialogTitle") ) )
{
pProperties->Value >>= aPortion.sDialogTitle;
break;
@@ -1822,9 +1780,7 @@ void SwSpellIter::CreatePortion(uno::Reference< XSpellAlternatives > xAlt,
aLastPositions.push_back(aPosition);
}
}
-/*-- 19.09.2003 13:05:43---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > xAlt,
linguistic2::ProofreadingResult* pGrammarResult,
const SpellContentPositions& rDeletedRedlines)
@@ -1943,9 +1899,7 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > xAlt,
}
}
}
-/*-- 07.08.2008 15:01:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwEditShell::IgnoreGrammarErrorAt( SwPaM& rErrorPosition )
{
SwTxtNode *pNode;
@@ -1974,3 +1928,4 @@ void SwEditShell::IgnoreGrammarErrorAt( SwPaM& rErrorPosition )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index d740090d4694..f4b54f774903 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,7 +114,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
SwPaM& SwPamRanges::SetPam( sal_uInt16 nArrPos, SwPaM& rPam )
{
- ASSERT_ID( nArrPos < Count(), ERR_VAR_IDX );
+ OSL_ASSERT( nArrPos < Count() );
const SwPamRange& rTmp = *(GetData() + nArrPos );
rPam.GetPoint()->nNode = rTmp.nStart;
rPam.GetPoint()->nContent.Assign( rPam.GetCntntNode(), 0 );
@@ -181,7 +182,6 @@ sal_Bool SwEditShell::HasNumber() const
{
bResult = pTxtNd->HasNumber();
- // --> OD 2005-10-26 #b6340308#
// special case: outline numbered, not counted paragraph
if ( bResult &&
pTxtNd->GetNumRule() == GetDoc()->GetOutlineNumRule() &&
@@ -189,7 +189,6 @@ sal_Bool SwEditShell::HasNumber() const
{
bResult = sal_False;
}
- // <--
}
return bResult;
@@ -234,10 +233,9 @@ void SwEditShell::DelNumRules()
// ueberfluessig sein, aber VB hatte darueber eine Bugrep.
CallChgLnk();
- // --> OD 2005-10-24 #126346# - cursor can not be anymore in
- // front of a label, because numbering/bullet is deleted.
+ // cursor can not be anymore in front of a label,
+ // because numbering/bullet is deleted.
SetInFrontOfLabel( sal_False );
- // <--
GetDoc()->SetModified();
EndAllAction();
@@ -317,10 +315,8 @@ void SwEditShell::ChangeIndentOfAllListLevels( short nDiff )
aRule.ChangeIndent( nDiff );
// <--
- // --> OD 2008-03-17 #refactorlists#
// no start of new list
SetCurNumRule( aRule, false );
- // <--
}
EndAllAction();
@@ -341,13 +337,9 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos)
SwTxtNode * pTxtNode = aPaM.GetNode()->GetTxtNode();
// --> OD 2008-06-09 #i90078#
-// int nLevel = -1;
-// int nReferenceLevel = pTxtNode->GetActualListLevel();
-// if (! IsFirstOfNumRule(aPaM))
-// nLevel = nReferenceLevel;
SwNumRule aRule(*pCurNumRule);
-// aRule.ChangeIndent(nIndent, nLevel, nReferenceLevel, sal_False);
+
if ( IsFirstOfNumRule() )
{
aRule.SetIndentOfFirstListLevelAndChangeOthers( nIndent );
@@ -361,7 +353,6 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos)
// --> OD 2005-02-18 #i42921# - 3rd parameter = false in order to
// suppress setting of num rule at <aPaM>.
- // --> OD 2008-03-17 #refactorlists#
// do not apply any list
GetDoc()->SetNumRule( aPaM, aRule, false, String(), sal_False );
// <--
@@ -559,15 +550,11 @@ sal_Bool SwEditShell::IsProtectedOutlinePara() const
{
SwNodePtr pTmpNd = rOutlNd[ nPos ];
- // --> OD 2008-04-02 #refactorlists#
-// sal_uInt8 nTmpLvl = GetRealLevel( pTmpNd->GetTxtNode()->
-// GetTxtColl()->GetOutlineLevel() );
- // int nTmpLvl = pTmpNd->GetTxtNode()->GetOutlineLevel();//#outline level,zhaojianwei
int nTmpLvl = pTmpNd->GetTxtNode()->GetAttrOutlineLevel();
- // ASSERT( nTmpLvl >= 0 && nTmpLvl < MAXLEVEL,
- ASSERT( nTmpLvl >= 0 && nTmpLvl <= MAXLEVEL, //<-end,zhaojianwei
+
+ OSL_ENSURE( nTmpLvl >= 0 && nTmpLvl <= MAXLEVEL,
"<SwEditShell::IsProtectedOutlinePara()>" );
- // <--
+
if( bFirst )
{
nLvl = nTmpLvl;
@@ -583,10 +570,10 @@ sal_Bool SwEditShell::IsProtectedOutlinePara() const
}
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
{
- ASSERT(!this, "Cursor not on an outline node" );
+ OSL_ENSURE(!this, "Cursor not on an outline node" );
}
#endif
return bRet;
@@ -619,7 +606,7 @@ sal_Bool SwEditShell::IsOutlineCopyable( sal_uInt16 nIdx ) const
}
-sal_Bool SwEditShell::NumOrNoNum( sal_Bool bNumOn, sal_Bool bChkStart ) // #115901#
+sal_Bool SwEditShell::NumOrNoNum( sal_Bool bNumOn, sal_Bool bChkStart )
{
sal_Bool bRet = sal_False;
SwPaM* pCrsr = GetCrsr();
@@ -627,7 +614,6 @@ sal_Bool SwEditShell::NumOrNoNum( sal_Bool bNumOn, sal_Bool bChkStart ) // #1159
( !bChkStart || !pCrsr->GetPoint()->nContent.GetIndex()) )
{
StartAllAction(); // Klammern fuers Updaten !!
- // #115901#
bRet = GetDoc()->NumOrNoNum( pCrsr->GetPoint()->nNode, !bNumOn ); // #i29560#
EndAllAction();
}
@@ -654,32 +640,26 @@ sal_Bool SwEditShell::IsNoNum( sal_Bool bChkStart ) const
return bResult;
}
-// --> OD 2008-02-29 #refactorlists# - removed <pHasChilds>
sal_uInt8 SwEditShell::GetNumLevel() const
{
// gebe die akt. Ebene zurueck, auf der sich der Point vom Cursor befindet
- //sal_uInt8 nLevel = NO_NUMBERING; //#outline level,zhaojianwei
sal_uInt8 nLevel = MAXLEVEL; //end,zhaojianwei
SwPaM* pCrsr = GetCrsr();
const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
- // --> FME 2005-09-12 #124972# Made code robust:
- ASSERT( pTxtNd, "GetNumLevel() without text node" )
+ OSL_ENSURE( pTxtNd, "GetNumLevel() without text node" );
if ( !pTxtNd )
return nLevel;
- // <--
const SwNumRule* pRule = pTxtNd->GetNumRule();
if(pRule)
{
- // --> OD 2008-05-09 #refactorlists#
const int nListLevelOfTxtNode( pTxtNd->GetActualListLevel() );
if ( nListLevelOfTxtNode >= 0 )
{
nLevel = static_cast<sal_uInt8>( nListLevelOfTxtNode );
}
- // <--
}
return nLevel;
@@ -690,8 +670,6 @@ const SwNumRule* SwEditShell::GetCurNumRule() const
return GetDoc()->GetCurrNumRule( *GetCrsr()->GetPoint() );
}
-// OD 2008-02-08 #newlistlevelattrs# - add handling of parameter <bResetIndentAttrs>
-// --> OD 2008-03-17 #refactorlists#
void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
const bool bCreateNewList,
const String sContinuedListId,
@@ -709,19 +687,14 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
{
aRangeArr.SetPam( n, aPam );
- // --> OD 2008-02-08 #newlistlevelattrs#
- // --> OD 2008-03-17 #refactorlists#
GetDoc()->SetNumRule( aPam, rRule,
bCreateNewList, sContinuedListId,
sal_True, bResetIndentAttrs );
- // <--
GetDoc()->SetCounted( aPam, true );
}
}
else
{
- // --> OD 2008-02-08 #newlistlevelattrs#
- // --> OD 2008-03-17 #refactorlists#
GetDoc()->SetNumRule( *pCrsr, rRule,
bCreateNewList, sContinuedListId,
sal_True, bResetIndentAttrs );
@@ -804,7 +777,6 @@ void SwEditShell::SetNodeNumStart( sal_uInt16 nStt )
sal_uInt16 SwEditShell::GetNodeNumStart() const
{
const SwTxtNode* pTxtNd = GetCrsr()->GetNode()->GetTxtNode();
- // --> OD 2008-02-28 #refactorlists#
// correction: check, if list restart value is set at text node and
// use new method <SwTxtNode::GetAttrListRestartValue()>.
// return USHRT_MAX, if no list restart value is found.
@@ -813,13 +785,8 @@ sal_uInt16 SwEditShell::GetNodeNumStart() const
return static_cast<sal_uInt16>(pTxtNd->GetAttrListRestartValue());
}
return USHRT_MAX;
- // <--
}
-/*-- 26.08.2005 14:47:17---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-// --> OD 2008-03-18 #refactorlists#
const SwNumRule * SwEditShell::SearchNumRule( const bool bForward,
const bool bNum,
const bool bOutline,
@@ -830,4 +797,5 @@ const SwNumRule * SwEditShell::SearchNumRule( const bool bForward,
bForward, bNum, bOutline, nNonEmptyAllowed,
sListId );
}
-// <--
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edredln.cxx b/sw/source/core/edit/edredln.cxx
index 0dd6b9b3ec79..44116e4ebf5c 100644
--- a/sw/source/core/edit/edredln.cxx
+++ b/sw/source/core/edit/edredln.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -148,3 +149,4 @@ sal_uInt16 SwEditShell::FindRedlineOfData( const SwRedlineData& rData ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index 898e80a95f56..62463af9f947 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,7 +89,7 @@ const SwSection* SwEditShell::GetCurrSection() const
return GetDoc()->GetCurrSection( *GetCrsr()->GetPoint() );
}
-/*-----------------17.03.99 11:53-------------------
+/*--------------------------------------------------
* SwEditShell::GetAnySection liefert den fuer Spalten
* zustaendigen Bereich, bei Fussnoten kann es nicht der
* Bereich innerhalb der Fussnote sein.
@@ -113,11 +114,11 @@ const SwSection* SwEditShell::GetAnySection( sal_Bool bOutOfTab, const Point* pP
if( pFrm && pFrm->IsInSct() )
{
SwSectionFrm* pSect = pFrm->FindSctFrm();
- ASSERT( pSect, "GetAnySection: Where's my Sect?" );
+ OSL_ENSURE( pSect, "GetAnySection: Where's my Sect?" );
if( pSect->IsInFtn() && pSect->GetUpper()->IsInSct() )
{
pSect = pSect->GetUpper()->FindSctFrm();
- ASSERT( pSect, "GetAnySection: Where's my SectFrm?" );
+ OSL_ENSURE( pSect, "GetAnySection: Where's my SectFrm?" );
}
return pSect->GetSection();
}
@@ -399,9 +400,7 @@ const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos)
pReturn = pInnermostNode->EndOfSectionNode();
else if ( bStart )
pReturn = pInnermostNode;
- // else pReturn = NULL;
}
- // else: pReturn = NULL
DBG_ASSERT( ( pReturn == NULL ) || pReturn->IsStartNode() ||
@@ -453,3 +452,4 @@ bool SwEditShell::DoSpecialInsert()
return bRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index f67442d1be4b..edf9b2a9d150 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,7 +81,7 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTblOpts
GetDoc()->SplitNode( *pPos, false );
}
- /* #109161# If called from a shell the adjust item is propagated
+ /* If called from a shell the adjust item is propagated
from pPos to the new content nodes in the table.
*/
const SwTable *pTable = GetDoc()->InsertTable( rInsTblOpts, *pPos,
@@ -451,9 +452,8 @@ sal_Bool SwEditShell::CanMergeTable( sal_Bool bWithPrev, sal_Bool* pChkNxtPrv )
const SwTableNode* pChkNd = rNds[ pTblNd->GetIndex() - 1 ]->FindTableNode();
if( pChkNd && !pChkNd->GetTable().ISA( SwDDETable ) &&
bNew == pChkNd->GetTable().IsNewModel() &&
- // --> FME 2004-09-17 #117418# Consider table in table case
+ // Consider table in table case
pChkNd->EndOfSectionIndex() == pTblNd->GetIndex() - 1 )
- // <--
*pChkNxtPrv = sal_True, bRet = sal_True; // mit Prev ist moeglich
else
{
@@ -470,10 +470,9 @@ sal_Bool SwEditShell::CanMergeTable( sal_Bool bWithPrev, sal_Bool* pChkNxtPrv )
if( bWithPrev )
{
pTmpTblNd = rNds[ pTblNd->GetIndex() - 1 ]->FindTableNode();
- // --> FME 2004-09-17 #117418# Consider table in table case
+ // Consider table in table case
if ( pTmpTblNd && pTmpTblNd->EndOfSectionIndex() != pTblNd->GetIndex() - 1 )
pTmpTblNd = 0;
- // <--
}
else
pTmpTblNd = rNds[ pTblNd->EndOfSectionIndex() + 1 ]->GetTableNode();
@@ -491,3 +490,4 @@ void SwEditShell::AppendUndoForInsertFromDB( sal_Bool bIsTable )
GetDoc()->AppendUndoForInsertFromDB( *GetCrsr(), bIsTable );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index d2403bae2625..b86a70f01be5 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,7 +52,6 @@
#include <pam.hxx>
#include <viewopt.hxx>
#include <ndtxt.hxx>
-#include <errhdl.hxx>
#include <swundo.hxx>
#include <txttxmrk.hxx>
#include <edimp.hxx>
@@ -118,40 +118,30 @@ sal_uInt16 SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const
return GetDoc()->GetCurTOXMark( *GetCrsr()->Start(), rMarks );
}
-/* -----------------01.09.99 16:05-------------------
-
- --------------------------------------------------*/
sal_Bool SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const
{
- ASSERT( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
+ OSL_ENSURE( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
const SwTOXBaseSection& rTOXSect = (const SwTOXBaseSection&)rTOXBase;
return rTOXSect.IsProtect();
}
-/* -----------------18.10.99 15:53-------------------
- --------------------------------------------------*/
void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, sal_Bool bReadonly)
{
- ASSERT( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
+ OSL_ENSURE( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
const SwTOXBaseSection& rTOXSect = (const SwTOXBaseSection&)rTOXBase;
((SwTOXBase&)rTOXBase).SetProtected(bReadonly);
- ASSERT( rTOXSect.SwSection::GetType() == TOX_CONTENT_SECTION, "not a TOXContentSection" );
+ OSL_ENSURE( rTOXSect.SwSection::GetType() == TOX_CONTENT_SECTION, "not a TOXContentSection" );
SwSectionData aSectionData(rTOXSect);
aSectionData.SetProtectFlag(bReadonly);
UpdateSection( GetSectionFmtPos( *rTOXSect.GetFmt() ), aSectionData, 0 );
}
-/* -----------------02.09.99 07:47-------------------
-
- --------------------------------------------------*/
const SwTOXBase* SwEditShell::GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate )
{
return GetDoc()->GetDefaultTOXBase( eTyp, bCreate );
}
-/* -----------------02.09.99 08:05-------------------
- --------------------------------------------------*/
void SwEditShell::SetDefaultTOXBase(const SwTOXBase& rBase)
{
GetDoc()->SetDefaultTOXBase(rBase);
@@ -173,7 +163,7 @@ void SwEditShell::InsertTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
// Einfuegen des Verzeichnisses
const SwTOXBaseSection* pTOX = pDoc->InsertTableOf(
*GetCrsr()->GetPoint(), rTOX, pSet, sal_True );
- ASSERT(pTOX, "Kein aktuelles Verzeichnis");
+ OSL_ENSURE(pTOX, "Kein aktuelles Verzeichnis");
// Formatierung anstossen
CalcLayout();
@@ -197,9 +187,9 @@ sal_Bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pS
{
sal_Bool bRet = sal_False;
- ASSERT( rTOX.ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
+ OSL_ENSURE( rTOX.ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
SwTOXBaseSection* pTOX = (SwTOXBaseSection*)&rTOX;
- ASSERT(pTOX, "Keine aktuelles Verzeichnis");
+ OSL_ENSURE(pTOX, "Keine aktuelles Verzeichnis");
const SwSectionNode* pSectNd;
if( pTOX && 0 != ( pSectNd = pTOX->GetFmt()->GetSectionNode() ) )
{
@@ -295,7 +285,7 @@ const SwTOXBase* SwEditShell::GetTOX( sal_uInt16 nPos ) const
pSect->GetFmt()->GetSectionNode() &&
nCnt++ == nPos )
{
- ASSERT( pSect->ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
+ OSL_ENSURE( pSect->ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
return (SwTOXBaseSection*)pSect;
}
}
@@ -315,23 +305,16 @@ sal_Bool SwEditShell::IsUpdateTOX() const
return GetDoc()->IsUpdateTOX();
}
-/* -----------------26.08.99 13:49-------------------
-
- --------------------------------------------------*/
const String& SwEditShell::GetTOIAutoMarkURL() const
{
return GetDoc()->GetTOIAutoMarkURL();
}
-/* -----------------26.08.99 13:49-------------------
- --------------------------------------------------*/
void SwEditShell::SetTOIAutoMarkURL(const String& rSet)
{
GetDoc()->SetTOIAutoMarkURL(rSet);
}
-/* -----------------26.08.99 09:29-------------------
- --------------------------------------------------*/
void SwEditShell::ApplyAutoMark()
{
StartAllAction();
@@ -367,8 +350,6 @@ void SwEditShell::ApplyAutoMark()
//
// SearchOptions to be used in loop below
//
- //SearchAlgorithms eSrchType = SearchAlgorithms_ABSOLUTE;
- //OUString aSrchStr = rText;
sal_Bool bCaseSensitive = sal_True;
sal_Bool bWordOnly = sal_False;
sal_Bool bSrchInSel = sal_False;
@@ -429,13 +410,11 @@ void SwEditShell::ApplyAutoMark()
//
if (!bCaseSensitive)
{
- //nSrchFlags |= SearchFlags::ALL_IGNORE_CASE;
aSearchOpt.transliterateFlags |=
TransliterationModules_IGNORE_CASE;
}
else
{
- //aSearchOpt.searchFlag &= ~SearchFlags::ALL_IGNORE_CASE;
aSearchOpt.transliterateFlags &=
~TransliterationModules_IGNORE_CASE;
}
@@ -483,3 +462,4 @@ void SwEditShell::ApplyAutoMark()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx
index 466db86bd93a..8366ec3bf6fc 100644
--- a/sw/source/core/edit/edundo.cxx
+++ b/sw/source/core/edit/edundo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,7 +104,7 @@ bool SwEditShell::Undo(sal_uInt16 const nCount)
{
SET_CURR_SHELL( this );
- // #105332# current undo state was not saved
+ // current undo state was not saved
::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo());
sal_Bool bRet = sal_False;
@@ -148,7 +149,7 @@ bool SwEditShell::Undo(sal_uInt16 const nCount)
GetDoc()->SetRedlineMode( eOld );
GetDoc()->CompressRedlines();
- //JP 18.09.97: autom. Erkennung fuer die neue "Box"
+ // autom. Erkennung fuer die neue "Box"
SaveTblBoxCntnt();
}
EndAllAction();
@@ -162,7 +163,7 @@ bool SwEditShell::Redo(sal_uInt16 const nCount)
sal_Bool bRet = sal_False;
- // #105332# undo state was not saved
+ // undo state was not saved
::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo());
StartAllAction();
@@ -197,7 +198,7 @@ bool SwEditShell::Redo(sal_uInt16 const nCount)
GetDoc()->SetRedlineMode( eOld );
GetDoc()->CompressRedlines();
- //JP 18.09.97: autom. Erkennung fuer die neue "Box"
+ // autom. Erkennung fuer die neue "Box"
SaveTblBoxCntnt();
}
@@ -232,8 +233,8 @@ bool SwEditShell::Repeat(sal_uInt16 const nCount)
void lcl_SelectSdrMarkList( SwEditShell* pShell,
const SdrMarkList* pSdrMarkList )
{
- ASSERT( pShell != NULL, "need shell!" );
- ASSERT( pSdrMarkList != NULL, "need mark list" );
+ OSL_ENSURE( pShell != NULL, "need shell!" );
+ OSL_ENSURE( pSdrMarkList != NULL, "need mark list" );
if( pShell->ISA( SwFEShell ) )
{
@@ -246,7 +247,8 @@ void lcl_SelectSdrMarkList( SwEditShell* pShell,
// the old implementation would always unselect
// objects, even if no new ones were selected. If this
// is a problem, we need to re-work this a little.
- ASSERT( pSdrMarkList->GetMarkCount() != 0, "empty mark list" );
+ OSL_ENSURE( pSdrMarkList->GetMarkCount() != 0, "empty mark list" );
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx
index 1a681ad2cf29..bb34343dc65e 100644
--- a/sw/source/core/edit/edws.cxx
+++ b/sw/source/core/edit/edws.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -175,7 +176,7 @@ sal_uInt16 SwEditShell::GetCntType() const
case ND_OLENODE: nRet = CNT_OLE; break;
}
- ASSERT( nRet, ERR_OUTOFSCOPE );
+ OSL_ASSERT( nRet );
return nRet;
}
@@ -324,7 +325,7 @@ void SwEditShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Bool bInsert,
SwAutoCorrDoc aSwAutoCorrDoc( *this, *pCrsr, cChar );
rACorr.AutoCorrect( aSwAutoCorrDoc,
pTNd->GetTxt(), pCrsr->GetPoint()->nContent.GetIndex(),
- cChar, bInsert );
+ cChar, bInsert, GetWin() );
if( cChar )
SaveTblBoxCntnt( pCrsr->GetPoint() );
EndAllAction();
@@ -363,3 +364,4 @@ SwAutoCompleteWord& SwEditShell::GetAutoCompleteWords()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 8242d2325015..a1570c26e11c 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,9 +41,7 @@
#include <editeng/langitem.hxx>
#include <swtypes.hxx>
#include <tools/resid.hxx>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <authfld.hxx>
#include <expfld.hxx>
#include <pam.hxx>
@@ -54,9 +53,7 @@
#include <txtfld.hxx>
#include <ndtxt.hxx>
#include <doc.hxx>
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
#include <unoprnms.hxx>
#include <unomid.h>
@@ -76,10 +73,6 @@ typedef SwTOXSortKey* TOXSortKeyPtr;
SV_DECL_PTRARR_DEL( SortKeyArr, TOXSortKeyPtr, 5, 5 )
SV_IMPL_PTRARR( SortKeyArr, TOXSortKeyPtr )
-
-/* -----------------16.09.99 11:53-------------------
-
- --------------------------------------------------*/
SwAuthEntry::SwAuthEntry(const SwAuthEntry& rCopy)
: nRefCount(0)
{
@@ -96,14 +89,10 @@ sal_Bool SwAuthEntry::operator==(const SwAuthEntry& rComp)
}
// --------------------------------------------------------
-/* -----------------14.09.99 16:15-------------------
-
- --------------------------------------------------*/
SwAuthorityFieldType::SwAuthorityFieldType(SwDoc* pDoc)
: SwFieldType( RES_AUTHORITY ),
m_pDoc(pDoc),
m_pDataArr(new SwAuthDataArr ),
- m_pSequArr(new SvLongs(5, 5)),
m_pSortKeyArr(new SortKeyArr(3, 3)),
m_cPrefix('['),
m_cSuffix(']'),
@@ -116,7 +105,6 @@ SwAuthorityFieldType::SwAuthorityFieldType(SwDoc* pDoc)
SwAuthorityFieldType::SwAuthorityFieldType( const SwAuthorityFieldType& rFType)
: SwFieldType( RES_AUTHORITY ),
m_pDataArr(new SwAuthDataArr ),
- m_pSequArr(new SvLongs(5, 5)),
m_pSortKeyArr(new SortKeyArr(3, 3)),
m_cPrefix(rFType.m_cPrefix),
m_cSuffix(rFType.m_cSuffix),
@@ -129,30 +117,22 @@ SwAuthorityFieldType::SwAuthorityFieldType( const SwAuthorityFieldType& rFType)
m_pSortKeyArr->Insert((*rFType.m_pSortKeyArr)[i], i);
}
-/* -----------------17.09.99 13:52-------------------
-
- --------------------------------------------------*/
SwAuthorityFieldType::~SwAuthorityFieldType()
{
-// DBG_ASSERT(!m_pDataArr->Count(), "Array is not empty");
m_pSortKeyArr->DeleteAndDestroy(0, m_pSortKeyArr->Count());
delete m_pSortKeyArr;
- delete m_pSequArr;
+ m_SequArr.clear();
delete m_pDataArr;
}
-/*-- 14.09.99 16:22:09---------------------------------------------------
- -----------------------------------------------------------------------*/
SwFieldType* SwAuthorityFieldType::Copy() const
{
return new SwAuthorityFieldType(m_pDoc);
}
-/* -----------------17.09.99 13:43-------------------
- --------------------------------------------------*/
void SwAuthorityFieldType::RemoveField(long nHandle)
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool bRemoved = sal_False;
#endif
for(sal_uInt16 j = 0; j < m_pDataArr->Count(); j++)
@@ -161,7 +141,7 @@ void SwAuthorityFieldType::RemoveField(long nHandle)
long nRet = (long)(void*)pTemp;
if(nRet == nHandle)
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bRemoved = sal_True;
#endif
pTemp->RemoveRef();
@@ -174,13 +154,11 @@ void SwAuthorityFieldType::RemoveField(long nHandle)
break;
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
DBG_ASSERT(bRemoved, "Field unknown" );
#endif
}
-/* -----------------17.09.99 13:43-------------------
- --------------------------------------------------*/
long SwAuthorityFieldType::AddField(const String& rFieldContents)
{
long nRet = 0;
@@ -210,9 +188,7 @@ long SwAuthorityFieldType::AddField(const String& rFieldContents)
}
return nRet;
}
-/* -----------------17.09.99 14:18-------------------
- --------------------------------------------------*/
sal_Bool SwAuthorityFieldType::AddField(long nHandle)
{
sal_Bool bRet = sal_False;
@@ -232,9 +208,7 @@ sal_Bool SwAuthorityFieldType::AddField(long nHandle)
DBG_ASSERT(bRet, "::AddField(long) failed");
return bRet;
}
-/* -----------------17.09.99 14:52-------------------
- --------------------------------------------------*/
const SwAuthEntry* SwAuthorityFieldType::GetEntryByHandle(long nHandle) const
{
const SwAuthEntry* pRet = 0;
@@ -248,12 +222,10 @@ const SwAuthEntry* SwAuthorityFieldType::GetEntryByHandle(long nHandle) const
break;
}
}
- ASSERT( pRet, "invalid Handle" );
+ OSL_ENSURE( pRet, "invalid Handle" );
return pRet;
}
-/* -----------------21.09.99 13:34-------------------
- --------------------------------------------------*/
void SwAuthorityFieldType::GetAllEntryIdentifiers(
SvStringsDtor& rToFill )const
{
@@ -264,9 +236,7 @@ void SwAuthorityFieldType::GetAllEntryIdentifiers(
AUTH_FIELD_IDENTIFIER )), rToFill.Count() );
}
}
-/* -----------------21.09.99 13:34-------------------
- --------------------------------------------------*/
const SwAuthEntry* SwAuthorityFieldType::GetEntryByIdentifier(
const String& rIdentifier)const
{
@@ -282,9 +252,7 @@ const SwAuthEntry* SwAuthorityFieldType::GetEntryByIdentifier(
}
return pRet;
}
-/* -----------------------------21.12.99 13:20--------------------------------
- ---------------------------------------------------------------------------*/
bool SwAuthorityFieldType::ChangeEntryContent(const SwAuthEntry* pNewEntry)
{
bool bChanged = false;
@@ -303,7 +271,7 @@ bool SwAuthorityFieldType::ChangeEntryContent(const SwAuthEntry* pNewEntry)
}
return bChanged;
}
-/*-- 11.10.99 08:49:22---------------------------------------------------
+/*-----------------------------------------------------------------------
Description: appends a new entry (if new) and returns the array position
-----------------------------------------------------------------------*/
@@ -327,9 +295,6 @@ sal_uInt16 SwAuthorityFieldType::AppendField( const SwAuthEntry& rInsert )
return nRet;
}
-/*-- 11.10.99 08:49:24---------------------------------------------------
-
- -----------------------------------------------------------------------*/
long SwAuthorityFieldType::GetHandle(sal_uInt16 nPos)
{
long nRet = 0;
@@ -340,18 +305,16 @@ long SwAuthorityFieldType::GetHandle(sal_uInt16 nPos)
}
return nRet;
}
-/* -----------------19.10.99 13:46-------------------
- --------------------------------------------------*/
sal_uInt16 SwAuthorityFieldType::GetSequencePos(long nHandle)
{
//find the field in a sorted array of handles,
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool bCurrentFieldWithoutTextNode = sal_False;
#endif
- if(m_pSequArr->Count() && m_pSequArr->Count() != m_pDataArr->Count())
+ if(!m_SequArr.empty() && m_SequArr.size() != m_pDataArr->Count())
DelSequenceArray();
- if(!m_pSequArr->Count())
+ if(m_SequArr.empty())
{
SwTOXSortTabBases aSortArr;
SwClientIter aIter( *this );
@@ -364,7 +327,7 @@ sal_uInt16 SwAuthorityFieldType::GetSequencePos(long nHandle)
const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
if(!pTxtFld || !pTxtFld->GetpTxtNode())
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if(nHandle == ((SwAuthorityField*)pFmtFld->GetFld())->GetHandle())
bCurrentFieldWithoutTextNode = sal_True;
#endif
@@ -392,7 +355,7 @@ sal_uInt16 SwAuthorityFieldType::GetSequencePos(long nHandle)
SwTOXSortTabBase* pOld = aSortArr[i];
if(*pOld == *pNew)
{
- //only the first occurence in the document
+ //only the first occurrence in the document
//has to be in the array
if(*pOld < *pNew)
DELETEZ(pNew);
@@ -422,27 +385,28 @@ sal_uInt16 SwAuthorityFieldType::GetSequencePos(long nHandle)
const SwTOXSortTabBase& rBase = *aSortArr[i];
SwFmtFld& rFmtFld = ((SwTOXAuthority&)rBase).GetFldFmt();
SwAuthorityField* pAFld = (SwAuthorityField*)rFmtFld.GetFld();
- m_pSequArr->Insert(pAFld->GetHandle(), i);
+ m_SequArr.push_back(pAFld->GetHandle());
}
aSortArr.DeleteAndDestroy(0, aSortArr.Count());
}
//find nHandle
sal_uInt16 nRet = 0;
- for(sal_uInt16 i = 0; i < m_pSequArr->Count(); i++)
+ for(sal_uInt16 i = 0; i < m_SequArr.size(); ++i)
{
- if((*m_pSequArr)[i] == nHandle)
+ if(m_SequArr[i] == nHandle)
{
nRet = i + 1;
break;
}
}
- ASSERT(bCurrentFieldWithoutTextNode || nRet, "Handle not found")
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE(bCurrentFieldWithoutTextNode || nRet, "Handle not found");
+#endif
return nRet;
}
-/* -----------------------------15.11.00 17:33--------------------------------
- ---------------------------------------------------------------------------*/
-sal_Bool SwAuthorityFieldType::QueryValue( Any& rVal, sal_uInt16 nWhichId ) const
+
+bool SwAuthorityFieldType::QueryValue( Any& rVal, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -476,8 +440,8 @@ sal_Bool SwAuthorityFieldType::QueryValue( Any& rVal, sal_uInt16 nWhichId ) c
{
Sequence<PropertyValues> aRet(m_pSortKeyArr->Count());
PropertyValues* pValues = aRet.getArray();
- OUString sProp1( C2U(SW_PROP_NAME_STR(UNO_NAME_SORT_KEY)) ),
- sProp2( C2U(SW_PROP_NAME_STR(UNO_NAME_IS_SORT_ASCENDING)));
+ OUString sProp1( rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SORT_KEY)) ),
+ sProp2( rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_IS_SORT_ASCENDING)));
for(sal_uInt16 i = 0; i < m_pSortKeyArr->Count(); i++)
{
const SwTOXSortKey* pKey = (*m_pSortKeyArr)[i];
@@ -492,16 +456,14 @@ sal_Bool SwAuthorityFieldType::QueryValue( Any& rVal, sal_uInt16 nWhichId ) c
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/* -----------------------------15.11.00 17:33--------------------------------
- ---------------------------------------------------------------------------*/
-sal_Bool SwAuthorityFieldType::PutValue( const Any& rAny, sal_uInt16 nWhichId )
+bool SwAuthorityFieldType::PutValue( const Any& rAny, sal_uInt16 nWhichId )
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
String sTmp;
switch( nWhichId )
{
@@ -554,7 +516,7 @@ sal_Bool SwAuthorityFieldType::PutValue( const Any& rAny, sal_uInt16 nWhichId
if(nVal >= 0 && nVal < AUTH_FIELD_END)
pSortKey->eField = (ToxAuthorityField) nVal;
else
- bRet = sal_False;
+ bRet = false;
}
else if(pValue[j].Name.equalsAsciiL(SW_PROP_NAME(UNO_NAME_IS_SORT_ASCENDING)))
{
@@ -567,29 +529,23 @@ sal_Bool SwAuthorityFieldType::PutValue( const Any& rAny, sal_uInt16 nWhichId
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
return bRet;
}
-/* -----------------19.10.99 13:25-------------------
- --------------------------------------------------*/
void SwAuthorityFieldType::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
//re-generate positions of the fields
DelSequenceArray();
SwModify::Modify( pOld, pNew );
}
-/* -----------------20.10.99 13:38-------------------
- --------------------------------------------------*/
sal_uInt16 SwAuthorityFieldType::GetSortKeyCount() const
{
return m_pSortKeyArr->Count();
}
-/* -----------------20.10.99 13:38-------------------
- --------------------------------------------------*/
const SwTOXSortKey* SwAuthorityFieldType::GetSortKey(sal_uInt16 nIdx) const
{
SwTOXSortKey* pRet = 0;
@@ -598,9 +554,7 @@ const SwTOXSortKey* SwAuthorityFieldType::GetSortKey(sal_uInt16 nIdx) const
DBG_ASSERT(pRet, "Sort key not found");
return pRet;
}
-/* -----------------20.10.99 13:38-------------------
- --------------------------------------------------*/
void SwAuthorityFieldType::SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey aKeys[])
{
m_pSortKeyArr->DeleteAndDestroy(0, m_pSortKeyArr->Count());
@@ -610,9 +564,6 @@ void SwAuthorityFieldType::SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey aKeys[
m_pSortKeyArr->Insert(new SwTOXSortKey(aKeys[i]), nArrIdx++);
}
-/* -----------------14.09.99 16:15-------------------
-
- --------------------------------------------------*/
SwAuthorityField::SwAuthorityField( SwAuthorityFieldType* pInitType,
const String& rFieldContents )
: SwField(pInitType),
@@ -620,9 +571,7 @@ SwAuthorityField::SwAuthorityField( SwAuthorityFieldType* pInitType,
{
m_nHandle = pInitType->AddField( rFieldContents );
}
-/* -----------------17.09.99 14:24-------------------
- --------------------------------------------------*/
SwAuthorityField::SwAuthorityField( SwAuthorityFieldType* pInitType,
long nSetHandle )
: SwField( pInitType ),
@@ -631,16 +580,12 @@ SwAuthorityField::SwAuthorityField( SwAuthorityFieldType* pInitType,
{
pInitType->AddField( m_nHandle );
}
-/* -----------------15.09.99 15:00-------------------
- --------------------------------------------------*/
SwAuthorityField::~SwAuthorityField()
{
((SwAuthorityFieldType* )GetTyp())->RemoveField(m_nHandle);
}
-/*-- 14.09.99 16:20:59---------------------------------------------------
- -----------------------------------------------------------------------*/
String SwAuthorityField::Expand() const
{
SwAuthorityFieldType* pAuthType = (SwAuthorityFieldType*)GetTyp();
@@ -666,45 +611,32 @@ String SwAuthorityField::Expand() const
sRet += pAuthType->GetSuffix();
return sRet;
}
-/*-- 14.09.99 16:21:00---------------------------------------------------
- -----------------------------------------------------------------------*/
SwField* SwAuthorityField::Copy() const
{
SwAuthorityFieldType* pAuthType = (SwAuthorityFieldType*)GetTyp();
return new SwAuthorityField(pAuthType, m_nHandle);
}
-/* -----------------21.09.99 12:55-------------------
- --------------------------------------------------*/
const String& SwAuthorityField::GetFieldText(ToxAuthorityField eField) const
{
SwAuthorityFieldType* pAuthType = (SwAuthorityFieldType*)GetTyp();
const SwAuthEntry* pEntry = pAuthType->GetEntryByHandle( m_nHandle );
return pEntry->GetAuthorField( eField );
}
-/* -----------------21.09.99 14:57-------------------
- --------------------------------------------------*/
void SwAuthorityField::SetPar1(const String& rStr)
{
SwAuthorityFieldType* pInitType = (SwAuthorityFieldType* )GetTyp();
pInitType->RemoveField(m_nHandle);
m_nHandle = pInitType->AddField(rStr);
}
-/* -----------------11.10.99 09:43-------------------
- --------------------------------------------------*/
String SwAuthorityField::GetDescription() const
{
return SW_RES(STR_AUTHORITY_ENTRY);
}
-
-
-/* -----------------------------15.11.00 17:33--------------------------------
-
- ---------------------------------------------------------------------------*/
const char* aFieldNames[] =
{
"Identifier",
@@ -739,21 +671,19 @@ const char* aFieldNames[] =
"Custom5",
"ISBN"
};
-/* -----------------------------16.11.00 12:27--------------------------------
- ---------------------------------------------------------------------------*/
-sal_Bool SwAuthorityField::QueryValue( Any& rAny, sal_uInt16 /*nWhichId*/ ) const
+bool SwAuthorityField::QueryValue( Any& rAny, sal_uInt16 /*nWhichId*/ ) const
{
if(!GetTyp())
- return sal_False;
+ return false;
const SwAuthEntry* pAuthEntry = ((SwAuthorityFieldType*)GetTyp())->GetEntryByHandle(m_nHandle);
if(!pAuthEntry)
- return sal_False;
+ return false;
Sequence <PropertyValue> aRet(AUTH_FIELD_END);
PropertyValue* pValues = aRet.getArray();
for(sal_Int16 i = 0; i < AUTH_FIELD_END; i++)
{
- pValues[i].Name = C2U(aFieldNames[i]);
+ pValues[i].Name = rtl::OUString::createFromAscii(aFieldNames[i]);
const String& rField = pAuthEntry->GetAuthorField((ToxAuthorityField) i);
if(i == AUTH_FIELD_AUTHORITY_TYPE)
pValues[i].Value <<= sal_Int16(rField.ToInt32());
@@ -761,11 +691,10 @@ sal_Bool SwAuthorityField::QueryValue( Any& rAny, sal_uInt16 /*nWhichId*/ ) c
pValues[i].Value <<= OUString(rField);
}
rAny <<= aRet;
- return sal_False;
+ /* FIXME: it is weird that we always return false here */
+ return false;
}
-/* -----------------------------15.11.00 17:33--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int16 lcl_Find(const OUString& rFieldName)
{
for(sal_Int16 i = 0; i < AUTH_FIELD_END; i++)
@@ -774,14 +703,14 @@ sal_Int16 lcl_Find(const OUString& rFieldName)
return -1;
}
//----------------------------------------------------------------------------
-sal_Bool SwAuthorityField::PutValue( const Any& rAny, sal_uInt16 /*nWhichId*/ )
+bool SwAuthorityField::PutValue( const Any& rAny, sal_uInt16 /*nWhichId*/ )
{
if(!GetTyp() || !((SwAuthorityFieldType*)GetTyp())->GetEntryByHandle(m_nHandle))
- return sal_False;
+ return false;
Sequence <PropertyValue> aParam;
if(!(rAny >>= aParam))
- return sal_False;
+ return false;
String sToSet;
sToSet.Fill(AUTH_FIELD_ISBN, TOX_STYLE_DELIMITER);
@@ -807,11 +736,10 @@ sal_Bool SwAuthorityField::PutValue( const Any& rAny, sal_uInt16 /*nWhichId*/
((SwAuthorityFieldType*)GetTyp())->RemoveField(m_nHandle);
m_nHandle = ((SwAuthorityFieldType*)GetTyp())->AddField(sToSet);
- return sal_False;
+ /* FIXME: it is weird that we always return false here */
+ return false;
}
-/* -----------------11.10.99 09:43-------------------
- --------------------------------------------------*/
SwFieldType* SwAuthorityField::ChgTyp( SwFieldType* pFldTyp )
{
SwAuthorityFieldType* pSrcTyp = (SwAuthorityFieldType*)GetTyp(),
@@ -829,3 +757,4 @@ SwFieldType* SwAuthorityField::ChgTyp( SwFieldType* pFldTyp )
return pSrcTyp;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 422285dee10f..12b2d4ede232 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,7 +61,7 @@ const SwFrm* lcl_GetBoxFrm( const SwTableBox& rBox );
long lcl_GetLongBoxNum( String& rStr );
const SwTableBox* lcl_RelToBox( const SwTable&, const SwTableBox*, const String& );
String lcl_BoxNmToRel( const SwTable&, const SwTableNode&,
- const String& , const String& , sal_Bool );
+ const String& , const String& , bool );
/*************************************************************************
@@ -71,9 +72,6 @@ String lcl_BoxNmToRel( const SwTable&, const SwTableNode&,
|* oder mit einem Feld, dann hole den Wert.
|* Alle anderen Bedingungen returnen einen Fehler (oder 0 ?)
|*
-|* Ersterstellung JP 30. Jun. 93
-|* Letzte Aenderung JP 30. Jun. 93
-|*
|*************************************************************************/
double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
@@ -311,7 +309,7 @@ SwTableFormula::SwTableFormula( const String& rFormel )
: sFormel( rFormel )
{
eNmType = EXTRNL_NAME;
- bValidValue = sal_False;
+ bValidValue = false;
}
SwTableFormula::~SwTableFormula()
@@ -388,7 +386,7 @@ void SwTableFormula::RelNmsToBoxNms( const SwTable& rTbl, String& rNewStr,
{
// relativen Namen zu Box-Namen (externe Darstellung)
SwNode* pNd = (SwNode*)pPara;
- ASSERT( pNd, "Feld steht in keinem TextNode" );
+ OSL_ENSURE( pNd, "Feld steht in keinem TextNode" );
const SwTableBox *pRelBox, *pBox = (SwTableBox *)rTbl.GetTblBox(
pNd->FindTableBoxStartNode()->GetIndex() );
@@ -418,7 +416,7 @@ void SwTableFormula::RelBoxNmsToPtr( const SwTable& rTbl, String& rNewStr,
{
// relativen Namen zu Box-Pointern (interne Darstellung)
SwNode* pNd = (SwNode*)pPara;
- ASSERT( pNd, "Feld steht in keinem Node" );
+ OSL_ENSURE( pNd, "Feld steht in keinem Node" );
const SwTableBox *pRelBox, *pBox = (SwTableBox*)rTbl.GetTblBox(
pNd->FindTableBoxStartNode()->GetIndex() );
@@ -449,7 +447,7 @@ void SwTableFormula::BoxNmsToRelNm( const SwTable& rTbl, String& rNewStr,
{
// Box-Namen (externe Darstellung) zu relativen Namen
SwNode* pNd = (SwNode*)pPara;
- ASSERT( pNd, "Feld steht in keinem Node" );
+ OSL_ENSURE( pNd, "Feld steht in keinem Node" );
const SwTableNode* pTblNd = pNd->FindTableNode();
String sRefBoxNm;
@@ -457,7 +455,7 @@ void SwTableFormula::BoxNmsToRelNm( const SwTable& rTbl, String& rNewStr,
{
const SwTableBox *pBox = rTbl.GetTblBox(
pNd->FindTableBoxStartNode()->GetIndex() );
- ASSERT( pBox, "Feld steht in keiner Tabelle" );
+ OSL_ENSURE( pBox, "Feld steht in keiner Tabelle" );
sRefBoxNm = pBox->GetName();
}
@@ -672,7 +670,7 @@ String SwTableFormula::ScanString( FnScanFormel fnFormel, const SwTable& rTbl,
if( pFnd )
pTbl = pFnd;
// ??
- ASSERT( pFnd, "Tabelle nicht gefunden, was nun?" );
+ OSL_ENSURE( pFnd, "Tabelle nicht gefunden, was nun?" );
}
}
}
@@ -724,23 +722,9 @@ const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, const String& rNm ) const
const SwFrm* lcl_GetBoxFrm( const SwTableBox& rBox )
{
-/*
-
- // oder besser ueber die Box den Frame suchen
-
- SwClientIter aIter( *pBox->GetFrmFmt() );
- sal_uLong nMinPos = ULONG_MAX;
- const SwFrm* pFnd = 0;
- for( SwFrm* pF = (SwFrm*)aIter.First( TYPE( SwCellFrm )); pF;
- pF = (SwFrm*)aIter.Next() )
- {
- if( pF->Frm().Y() <
- }
-*/
-
SwNodeIndex aIdx( *rBox.GetSttNd() );
SwCntntNode* pCNd = aIdx.GetNodes().GoNext( &aIdx );
- ASSERT( pCNd, "Box hat keinen TextNode" );
+ OSL_ENSURE( pCNd, "Box hat keinen TextNode" );
Point aPt; // den im Layout 1. Frame returnen - Tab.Kopfzeile !!
return pCNd->GetFrm( &aPt, NULL, sal_False );
}
@@ -850,7 +834,7 @@ const SwTableBox* lcl_RelToBox( const SwTable& rTbl,
String lcl_BoxNmToRel( const SwTable& rTbl, const SwTableNode& rTblNd,
const String& rRefBoxNm, const String& rGetStr,
- sal_Bool bExtrnlNm )
+ bool bExtrnlNm )
{
String sCpy( rRefBoxNm );
String sTmp( rGetStr );
@@ -997,7 +981,7 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
void SwTableFormula::_HasValidBoxes( const SwTable& rTbl, String& ,
String& rFirstBox, String* pLastBox, void* pPara ) const
{
- sal_Bool* pBValid = (sal_Bool*)pPara;
+ bool* pBValid = (bool*)pPara;
if( *pBValid ) // einmal falsch, immer falsch
{
SwTableBox* pSttBox = 0, *pEndBox = 0;
@@ -1038,13 +1022,13 @@ void SwTableFormula::_HasValidBoxes( const SwTable& rTbl, String& ,
if( ( pLastBox &&
( !pEndBox || !rTbl.GetTabSortBoxes().Seek_Entry( pEndBox ) ) ) ||
( !pSttBox || !rTbl.GetTabSortBoxes().Seek_Entry( pSttBox ) ) )
- *pBValid = sal_False;
+ *pBValid = false;
}
}
-sal_Bool SwTableFormula::HasValidBoxes() const
+bool SwTableFormula::HasValidBoxes() const
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
const SwNode* pNd = GetNodeOfFormula();
if( pNd && 0 != ( pNd = pNd->FindTableNode() ) )
ScanString( &SwTableFormula::_HasValidBoxes,
@@ -1152,7 +1136,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
if( TBL_SPLITTBL == rTblUpd.eFlags )
{
// wo liegen die Boxen, in der "alten" oder in der neuen Tabelle?
- sal_Bool bInNewTbl = sal_False;
+ bool bInNewTbl = false;
if( pLastBox )
{
// das ist die "erste" Box in der Selektion. Die bestimmt ob die
@@ -1230,3 +1214,4 @@ void SwTableFormula::ToSplitMergeBoxNm( SwTableFmlUpdate& rTblUpd )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/chpfld.cxx b/sw/source/core/fields/chpfld.cxx
index 837ae47d9174..0fc69d1c244c 100644
--- a/sw/source/core/fields/chpfld.cxx
+++ b/sw/source/core/fields/chpfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,9 +37,7 @@
#include <ndtxt.hxx>
#include <chpfld.hxx>
#include <expfld.hxx> // fuer GetBodyTxtNode
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
#include <numrule.hxx>
using namespace ::com::sun::star;
@@ -103,27 +102,12 @@ SwField* SwChapterField::Copy() const
return pTmp;
}
-// --> OD 2008-02-14 #i53420#
-//void SwChapterField::ChangeExpansion( const SwFrm* pFrm,
-// const SwTxtNode* pTxtNd,
-// sal_Bool bSrchNum )
-//{
-// ASSERT( pFrm, "in welchem Frame stehe ich denn?" )
-// SwDoc* pDoc = (SwDoc*)pTxtNd->GetDoc();
-// SwPosition aPos( pDoc->GetNodes().GetEndOfContent() );
-
-// if( pFrm->IsInDocBody() )
-// aPos.nNode = *pTxtNd;
-// else if( 0 == (pTxtNd = GetBodyTxtNode( *pDoc, aPos, *pFrm )) )
-// // kein TxtNode (Formatierung Kopf/Fusszeile)
-// return;
-// ChangeExpansion(*pTxtNd, bSrchNum);
-//}
+// #i53420#
void SwChapterField::ChangeExpansion(const SwFrm* pFrm,
const SwCntntNode* pCntntNode,
sal_Bool bSrchNum )
{
- ASSERT( pFrm, "in welchem Frame stehe ich denn?" )
+ OSL_ENSURE( pFrm, "in welchem Frame stehe ich denn?" );
SwDoc* pDoc = (SwDoc*)pCntntNode->GetDoc();
const SwTxtNode* pTxtNode = dynamic_cast<const SwTxtNode*>(pCntntNode);
@@ -138,7 +122,6 @@ void SwChapterField::ChangeExpansion(const SwFrm* pFrm,
ChangeExpansion( *pTxtNode, bSrchNum );
}
}
-// <--
void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
{
@@ -154,16 +137,9 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
{
sal_uInt8 nPrevLvl = nLevel;
- // --> OD 2008-04-02 #refactorlists#
-// nLevel = GetRealLevel( pONd->GetTxtColl()->
-// GetOutlineLevel() );
- //ASSERT( pONd->GetOutlineLevel() >= 0 && pONd->GetOutlineLevel() < MAXLEVEL, //#outline level,zhaojianwei
- // "<SwChapterField::ChangeExpansion(..)> - outline node with inconsistent outline level. Serious defect -> please inform OD." );
- //nLevel = static_cast<sal_uInt8>(pONd->GetOutlineLevel());
- ASSERT( pONd->GetAttrOutlineLevel() >= 0 && pONd->GetAttrOutlineLevel() <= MAXLEVEL,
+ OSL_ENSURE( pONd->GetAttrOutlineLevel() >= 0 && pONd->GetAttrOutlineLevel() <= MAXLEVEL,
"<SwChapterField::ChangeExpansion(..)> - outline node with inconsistent outline level. Serious defect -> please inform OD." );
- nLevel = static_cast<sal_uInt8>(pONd->GetAttrOutlineLevel()); //<-end,zhaojianwei
- // <--
+ nLevel = static_cast<sal_uInt8>(pONd->GetAttrOutlineLevel());
if( nPrevLvl < nLevel )
nLevel = nPrevLvl;
@@ -187,12 +163,10 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
if ( pTxtNd->IsOutline() )
{
- // --> OD 2005-11-17 #128041#
// correction of refactoring done by cws swnumtree:
// retrieve numbering string without prefix and suffix strings
// as stated in the above german comment.
sNumber = pTxtNd->GetNumString( false );
- // <--
SwNumRule* pRule( pTxtNd->GetNumRule() );
if ( pTxtNd->IsCountedInList() && pRule )
@@ -226,10 +200,7 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
}
}
-/*-----------------05.03.98 16:19-------------------
-
---------------------------------------------------*/
-sal_Bool SwChapterField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwChapterField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -258,14 +229,12 @@ sal_Bool SwChapterField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------05.03.98 16:19-------------------
---------------------------------------------------*/
-sal_Bool SwChapterField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwChapterField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
sal_Bool bRet = sal_True;
switch( nWhichId )
@@ -277,7 +246,7 @@ sal_Bool SwChapterField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
if(nTmp >= 0 && nTmp < MAXLEVEL)
nLevel = nTmp;
else
- bRet = sal_False;
+ bRet = false;
break;
}
@@ -295,15 +264,17 @@ sal_Bool SwChapterField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
case text::ChapterFormat::DIGIT:
SetFormat(CF_NUMBER_NOPREPST);
break;
- //case text::ChapterFormat::NAME_NUMBER:
+
default: SetFormat(CF_NUM_TITLE);
}
}
break;
default:
- DBG_ERROR("illegal property");
- bRet = sal_False;
+ OSL_FAIL("illegal property");
+ bRet = false;
}
return bRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index a78c2a57d44a..8f1e6bd16c87 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,7 +110,7 @@ const String& SwDBFieldType::GetName() const
void SwDBFieldType::ReleaseRef()
{
- ASSERT(nRefCnt > 0, "RefCount kleiner 0!");
+ OSL_ENSURE(nRefCnt > 0, "RefCount kleiner 0!");
if (--nRefCnt <= 0)
{
@@ -123,10 +124,7 @@ void SwDBFieldType::ReleaseRef()
}
}
-/* -----------------24.02.99 14:51-------------------
- *
- * --------------------------------------------------*/
-sal_Bool SwDBFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwDBFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -143,14 +141,12 @@ sal_Bool SwDBFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
rAny <<= aDBData.nCommandType;
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/* -----------------24.02.99 14:51-------------------
- *
- * --------------------------------------------------*/
-sal_Bool SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+
+bool SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -188,9 +184,9 @@ sal_Bool SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
rAny >>= aDBData.nCommandType;
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
/*--------------------------------------------------------------------
Beschreibung: SwDBField
@@ -279,10 +275,7 @@ SwField* SwDBField::Copy() const
String SwDBField::GetFieldName() const
{
const String& rDBName = static_cast<SwDBFieldType*>(GetTyp())->GetName();
- //TODO/CLEANUP
- //Funktion tut nichts!
- //String sContent( SFX_APP()->LocalizeDBName(INI2NATIONAL,
- // rDBName.GetToken(0, DB_DELIM)));
+
String sContent( rDBName.GetToken(0, DB_DELIM) );
if (sContent.Len() > 1)
@@ -306,10 +299,6 @@ void SwDBField::ChgValue( double d, sal_Bool bVal )
aContent = ((SwValueFieldType*)GetTyp())->ExpandValue(d, GetFormat(), GetLanguage());
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFieldType* SwDBField::ChgTyp( SwFieldType* pNewType )
{
SwFieldType* pOld = SwValueField::ChgTyp( pNewType );
@@ -393,28 +382,17 @@ const String& SwDBField::GetPar1() const
return ((SwDBFieldType*)GetTyp())->GetName();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwDBField::GetSubType() const
{
return nSubType;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDBField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
-/*-----------------06.03.98 16:15-------------------
-
---------------------------------------------------*/
-sal_Bool SwDBField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwDBField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -440,15 +418,13 @@ sal_Bool SwDBField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
rAny <<= OUString(sFieldCode);
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------06.03.98 16:15-------------------
---------------------------------------------------*/
-sal_Bool SwDBField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwDBField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -502,9 +478,9 @@ sal_Bool SwDBField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
::GetString( rAny, sFieldCode );
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
/*--------------------------------------------------------------------
@@ -530,7 +506,6 @@ SwDBData SwDBNameInfField::GetDBData(SwDoc* pDoc)
return aRet;
}
-// #111840#
void SwDBNameInfField::SetDBData(const SwDBData & rDBData)
{
aDBData = rDBData;
@@ -551,10 +526,7 @@ String SwDBNameInfField::GetFieldName() const
return lcl_DBTrennConv(sStr);
}
-/*-----------------06.03.98 16:55-------------------
-
---------------------------------------------------*/
-sal_Bool SwDBNameInfField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwDBNameInfField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -574,14 +546,12 @@ sal_Bool SwDBNameInfField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) con
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------06.03.98 16:55-------------------
---------------------------------------------------*/
-sal_Bool SwDBNameInfField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwDBNameInfField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -599,7 +569,7 @@ sal_Bool SwDBNameInfField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
sal_uInt16 nSubTyp = GetSubType();
sal_Bool bVisible = sal_False;
if(!(rAny >>= bVisible))
- return sal_False;
+ return false;
if(bVisible)
nSubTyp &= ~nsSwExtendedSubType::SUB_INVISIBLE;
else
@@ -608,20 +578,16 @@ sal_Bool SwDBNameInfField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/* -----------------4/10/2003 15:03------------------
- --------------------------------------------------*/
sal_uInt16 SwDBNameInfField::GetSubType() const
{
return nSubType;
}
-/* -----------------4/10/2003 15:03------------------
- --------------------------------------------------*/
void SwDBNameInfField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
@@ -696,12 +662,10 @@ void SwDBNextSetField::SetPar1(const String& rStr)
{
aCond = rStr;
}
-/*-----------------06.03.98 16:16-------------------
---------------------------------------------------*/
-sal_Bool SwDBNextSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwDBNextSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch( nWhichId )
{
case FIELD_PROP_PAR3:
@@ -712,12 +676,10 @@ sal_Bool SwDBNextSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) con
}
return bRet;
}
-/*-----------------06.03.98 16:16-------------------
---------------------------------------------------*/
-sal_Bool SwDBNextSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwDBNextSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch( nWhichId )
{
case FIELD_PROP_PAR3:
@@ -730,21 +692,6 @@ sal_Bool SwDBNextSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
}
/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-/*
-String SwDBNextSetField::GetPar2() const
-{
- return GetDBName();
-}
-
-void SwDBNextSetField::SetPar2(const String& rStr)
-{
- GetDBName() = rStr;
-}
-*/
-
-/*--------------------------------------------------------------------
Beschreibung: Datensatz mit bestimmter ID
--------------------------------------------------------------------*/
@@ -832,12 +779,10 @@ void SwDBNumSetField::SetPar2(const String& rStr)
{
aPar2 = rStr;
}
-/*-----------------06.03.98 16:16-------------------
---------------------------------------------------*/
-sal_Bool SwDBNumSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwDBNumSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch( nWhichId )
{
case FIELD_PROP_PAR3:
@@ -851,12 +796,10 @@ sal_Bool SwDBNumSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) cons
}
return bRet;
}
-/*-----------------06.03.98 16:16-------------------
---------------------------------------------------*/
-sal_Bool SwDBNumSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwDBNumSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch( nWhichId )
{
case FIELD_PROP_PAR3:
@@ -933,17 +876,12 @@ SwField* SwDBNameField::Copy() const
return pTmp;
}
-/*-----------------06.03.98 16:16-------------------
-
---------------------------------------------------*/
-sal_Bool SwDBNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwDBNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
return SwDBNameInfField::QueryValue(rAny, nWhichId );
}
-/*-----------------06.03.98 16:16-------------------
---------------------------------------------------*/
-sal_Bool SwDBNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwDBNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
return SwDBNameInfField::PutValue(rAny, nWhichId );
}
@@ -1012,12 +950,10 @@ SwField* SwDBSetNumberField::Copy() const
pTmp->SetSubType(GetSubType());
return pTmp;
}
-/*-----------------06.03.98 16:15-------------------
---------------------------------------------------*/
-sal_Bool SwDBSetNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwDBSetNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch( nWhichId )
{
case FIELD_PROP_USHORT1:
@@ -1031,12 +967,10 @@ sal_Bool SwDBSetNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) c
}
return bRet;
}
-/*-----------------06.03.98 16:15-------------------
---------------------------------------------------*/
-sal_Bool SwDBSetNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwDBSetNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch( nWhichId )
{
case FIELD_PROP_USHORT1:
@@ -1046,8 +980,6 @@ sal_Bool SwDBSetNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId
if(nSet < (sal_Int16) SVX_NUMBER_NONE )
SetFormat(nSet);
else {
- //exception(wrong_value)
- ;
}
}
break;
@@ -1061,3 +993,4 @@ sal_Bool SwDBSetNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index 643efc626eb7..ce5aedb329c6 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,6 @@
#include <sfx2/linkmgr.hxx>
#include <doc.hxx>
#include <editsh.hxx>
-#include <errhdl.hxx>
#include <ndtxt.hxx>
#include <fmtfld.hxx>
#include <txtfld.hxx>
@@ -40,9 +40,7 @@
#include <swtable.hxx>
#include <swbaslnk.hxx>
#include <swddetbl.hxx>
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
#include <hints.hxx>
using rtl::OUString;
@@ -110,7 +108,7 @@ void SwIntrnlRefLink::DataChanged( const String& rMimeType,
return;
}
- ASSERT( rFldType.GetDoc(), "Kein pDoc" );
+ OSL_ENSURE( rFldType.GetDoc(), "Kein pDoc" );
// keine Abhaengigen mehr?
if( rFldType.GetDepends() && !rFldType.IsModifyLocked() && !ChkNoDataFlag() )
@@ -300,7 +298,7 @@ void SwDDEFieldType::SetDoc( SwDoc* pNewDoc )
if( pDoc && refLink.Is() )
{
- ASSERT( !nRefCnt, "wie kommen die Referenzen rueber?" );
+ OSL_ENSURE( !nRefCnt, "wie kommen die Referenzen rueber?" );
pDoc->GetLinkManager().Remove( refLink );
}
@@ -328,10 +326,8 @@ void SwDDEFieldType::_RefCntChgd()
pDoc->GetLinkManager().Remove( refLink );
}
}
-/* -----------------------------28.08.00 16:23--------------------------------
- ---------------------------------------------------------------------------*/
-sal_Bool SwDDEFieldType::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
+bool SwDDEFieldType::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
{
sal_uInt8 nPart = 0;
switch( nWhichId )
@@ -349,16 +345,14 @@ sal_Bool SwDDEFieldType::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
rVal <<= ::rtl::OUString(aExpansion);
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
if( nPart )
rVal <<= OUString(GetCmd().GetToken(nPart-1, sfx2::cTokenSeperator));
- return sal_True;
+ return true;
}
-/* -----------------------------28.08.00 16:23--------------------------------
- ---------------------------------------------------------------------------*/
-sal_Bool SwDDEFieldType::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
+bool SwDDEFieldType::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
{
sal_uInt8 nPart = 0;
switch( nWhichId )
@@ -379,7 +373,7 @@ sal_Bool SwDDEFieldType::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
if( nPart )
{
@@ -389,7 +383,7 @@ sal_Bool SwDDEFieldType::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
sCmd.SetToken( nPart-1, sfx2::cTokenSeperator, ::GetString( rVal, sTmp ) );
SetCmd( sCmd );
}
- return sal_True;
+ return true;
}
/* ---------------------------------------------------------------------------
@@ -448,3 +442,4 @@ void SwDDEField::SetPar2(const String& rStr)
((SwDDEFieldType*)GetTyp())->SetCmd(rStr);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/ddetbl.cxx b/sw/source/core/fields/ddetbl.cxx
index 05d8f4ff50a3..c10ea7d2895f 100644
--- a/sw/source/core/fields/ddetbl.cxx
+++ b/sw/source/core/fields/ddetbl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,7 +76,7 @@ SwDDETable::SwDDETable( SwTable& rTable, SwDDEFieldType* pDDEType,
}
}
-__EXPORT SwDDETable::~SwDDETable()
+SwDDETable::~SwDDETable()
{
SwDDEFieldType* pFldTyp = (SwDDEFieldType*)aDepend.GetRegisteredIn();
SwDoc* pDoc = GetFrmFmt()->GetDoc();
@@ -101,12 +102,12 @@ void SwDDETable::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
void SwDDETable::ChangeContent()
{
- ASSERT( GetFrmFmt(), "Kein FrameFormat" );
+ OSL_ENSURE( GetFrmFmt(), "Kein FrameFormat" );
// Stehen wir im richtigen NodesArray (Wegen UNDO)
if( !aLines.Count() )
return;
- ASSERT( GetTabSortBoxes().Count(), "Tabelle ohne Inhalt?" );
+ OSL_ENSURE( GetTabSortBoxes().Count(), "Tabelle ohne Inhalt?" );
if( !GetTabSortBoxes()[0]->GetSttNd()->GetNodes().IsDocNodes() )
return;
@@ -123,10 +124,10 @@ void SwDDETable::ChangeContent()
for( sal_uInt16 i = 0; i < pLine->GetTabBoxes().Count(); ++i )
{
SwTableBox* pBox = pLine->GetTabBoxes()[ i ];
- ASSERT( pBox->GetSttIdx(), "keine InhaltsBox" );
+ OSL_ENSURE( pBox->GetSttIdx(), "keine InhaltsBox" );
SwNodeIndex aNdIdx( *pBox->GetSttNd(), 1 );
SwTxtNode* pTxtNode = aNdIdx.GetNode().GetTxtNode();
- ASSERT( pTxtNode, "Kein Node" );
+ OSL_ENSURE( pTxtNode, "Kein Node" );
SwIndex aCntIdx( pTxtNode, 0 );
pTxtNode->EraseText( aCntIdx );
pTxtNode->InsertText( aLine.GetToken( i, '\t' ), aCntIdx );
@@ -152,19 +153,19 @@ SwDDEFieldType* SwDDETable::GetDDEFldType()
sal_Bool SwDDETable::NoDDETable()
{
// suche den TabellenNode
- ASSERT( GetFrmFmt(), "Kein FrameFormat" );
+ OSL_ENSURE( GetFrmFmt(), "Kein FrameFormat" );
SwDoc* pDoc = GetFrmFmt()->GetDoc();
// Stehen wir im richtigen NodesArray (Wegen UNDO)
if( !aLines.Count() )
return sal_False;
- ASSERT( GetTabSortBoxes().Count(), "Tabelle ohne Inhalt?" );
+ OSL_ENSURE( GetTabSortBoxes().Count(), "Tabelle ohne Inhalt?" );
SwNode* pNd = (SwNode*)GetTabSortBoxes()[0]->GetSttNd();
if( !pNd->GetNodes().IsDocNodes() )
return sal_False;
SwTableNode* pTblNd = pNd->FindTableNode();
- ASSERT( pTblNd, "wo steht denn die Tabelle ?");
+ OSL_ENSURE( pTblNd, "wo steht denn die Tabelle ?");
SwTable* pNewTbl = new SwTable( *this );
@@ -185,3 +186,4 @@ sal_Bool SwDDETable::NoDDETable()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 9f0e252a6421..9d8100cf36e8 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,7 +68,6 @@
#include <tools/datetime.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/util/Date.hpp>
#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/util/Time.hpp>
@@ -249,10 +249,7 @@ sal_uInt16 SwPageNumberField::GetSubType() const
return nSubType;
}
-/*-----------------05.03.98 10:25-------------------
-
---------------------------------------------------*/
-sal_Bool SwPageNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwPageNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -278,16 +275,14 @@ sal_Bool SwPageNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) co
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------05.03.98 10:25-------------------
---------------------------------------------------*/
-sal_Bool SwPageNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwPageNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
sal_Int16 nSet = 0;
switch( nWhichId )
{
@@ -298,8 +293,6 @@ sal_Bool SwPageNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId
if(nSet <= SVX_NUM_PAGEDESC )
SetFormat(nSet);
else {
- //exception(wrong_value)
- ;
}
break;
case FIELD_PROP_USHORT1:
@@ -319,7 +312,7 @@ sal_Bool SwPageNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId
nSubType = PG_NEXT;
break;
default:
- bRet = sal_False;
+ bRet = false;
}
break;
case FIELD_PROP_PAR1:
@@ -327,7 +320,7 @@ sal_Bool SwPageNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
return bRet;
}
@@ -383,12 +376,9 @@ SwField* SwAuthorField::Copy() const
return pTmp;
}
-/*-----------------05.03.98 11:15-------------------
-
---------------------------------------------------*/
-sal_Bool SwAuthorField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwAuthorField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
- sal_Bool bVal;
+ bool bVal;
switch( nWhichId )
{
case FIELD_PROP_BOOL1:
@@ -406,14 +396,12 @@ sal_Bool SwAuthorField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------05.03.98 11:15-------------------
---------------------------------------------------*/
-sal_Bool SwAuthorField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwAuthorField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -433,9 +421,9 @@ sal_Bool SwAuthorField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
/*--------------------------------------------------------------------
@@ -463,8 +451,8 @@ String SwFileNameFieldType::Expand(sal_uLong nFmt) const
{
INetURLObject aTemp(rURLObj);
aTemp.removeSegment();
- // #101947# last slash should belong to the pathname
- aRet = aTemp.PathToFileName();//GetFull();
+ // last slash should belong to the pathname
+ aRet = aTemp.PathToFileName();
}
else
{
@@ -478,7 +466,7 @@ String SwFileNameFieldType::Expand(sal_uLong nFmt) const
break;
case FF_NAME:
- aRet = rURLObj.GetLastName( URL_DECODE );
+ aRet = rURLObj.GetLastName( INetURLObject::DECODE_WITH_CHARSET );
break;
case FF_NAME_NOEXT:
@@ -529,10 +517,7 @@ SwField* SwFileNameField::Copy() const
return pTmp;
}
-/*-----------------05.03.98 08:59-------------------
-
---------------------------------------------------*/
-sal_Bool SwFileNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwFileNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -567,14 +552,12 @@ sal_Bool SwFileNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) cons
rAny <<= OUString(GetContent());
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------05.03.98 09:01-------------------
---------------------------------------------------*/
-sal_Bool SwFileNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwFileNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -617,9 +600,9 @@ sal_Bool SwFileNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
/*--------------------------------------------------------------------
Beschreibung: SwTemplNameFieldType
@@ -633,7 +616,7 @@ SwTemplNameFieldType::SwTemplNameFieldType(SwDoc *pDocument)
String SwTemplNameFieldType::Expand(sal_uLong nFmt) const
{
- ASSERT( nFmt < FF_END, "Expand: kein guelt. Fmt!" );
+ OSL_ENSURE( nFmt < FF_END, "Expand: kein guelt. Fmt!" );
String aRet;
SwDocShell *pDocShell(pDoc->GetDocShell());
@@ -647,7 +630,7 @@ String SwTemplNameFieldType::Expand(sal_uLong nFmt) const
if( FF_UI_NAME == nFmt )
aRet = xDocProps->getTemplateName();
- else if( !xDocProps->getTemplateURL().equalsAscii("") )
+ else if( xDocProps->getTemplateURL().getLength() )
{
if( FF_UI_RANGE == nFmt )
{
@@ -705,10 +688,7 @@ SwField* SwTemplNameField::Copy() const
return pTmp;
}
-/*-----------------05.03.98 08:59-------------------
-
---------------------------------------------------*/
-sal_Bool SwTemplNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwTemplNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch ( nWhichId )
{
@@ -729,14 +709,12 @@ sal_Bool SwTemplNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) con
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------05.03.98 09:01-------------------
---------------------------------------------------*/
-sal_Bool SwTemplNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwTemplNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch ( nWhichId )
{
@@ -769,9 +747,9 @@ sal_Bool SwTemplNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
/*--------------------------------------------------------------------
Beschreibung: SwDocStatFieldType
@@ -803,7 +781,7 @@ String SwDocStatFieldType::Expand(sal_uInt16 nSubType, sal_uInt32 nFmt) const
nFmt = (sal_uInt32)nNumberingType;
break;
default:
- ASSERT( sal_False, "SwDocStatFieldType::Expand: unbekannter SubType" );
+ OSL_ENSURE( sal_False, "SwDocStatFieldType::Expand: unbekannter SubType" );
}
String sRet;
@@ -860,10 +838,7 @@ void SwDocStatField::ChangeExpansion( const SwFrm* pFrm )
pFrm->FindPageFrm()->GetPageDesc()->GetNumType().GetNumberingType() );
}
-/*-----------------05.03.98 11:38-------------------
-
---------------------------------------------------*/
-sal_Bool SwDocStatField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwDocStatField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch ( nWhichId )
{
@@ -871,16 +846,14 @@ sal_Bool SwDocStatField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
rAny <<= (sal_Int16)GetFormat();
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------05.03.98 11:38-------------------
---------------------------------------------------*/
-sal_Bool SwDocStatField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwDocStatField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
switch ( nWhichId )
{
case FIELD_PROP_USHORT2:
@@ -892,13 +865,13 @@ sal_Bool SwDocStatField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
nSet != SVX_NUM_BITMAP)
{
SetFormat(nSet);
- bRet = sal_True;
+ bRet = true;
}
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
return bRet;
}
@@ -993,7 +966,7 @@ String SwDocInfoFieldType::Expand( sal_uInt16 nSub, sal_uInt32 nFormat,
aAny = xSet->getPropertyValue( rName );
uno::Reference < script::XTypeConverter > xConverter( comphelper::getProcessServiceFactory()
- ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.script.Converter")), uno::UNO_QUERY );
+ ->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter"))), uno::UNO_QUERY );
uno::Any aNew;
aNew = xConverter->convertToSimpleType( aAny, uno::TypeClass_STRING );
aNew >>= sVal;
@@ -1149,7 +1122,7 @@ String SwDocInfoField::Expand() const
// if the field is "fixed" we don't update it from the property
::rtl::OUString sVal;
uno::Reference < script::XTypeConverter > xConverter( comphelper::getProcessServiceFactory()
- ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.script.Converter")), uno::UNO_QUERY );
+ ->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter"))), uno::UNO_QUERY );
util::Date aDate;
util::DateTime aDateTime;
util::Duration aDuration;
@@ -1261,7 +1234,7 @@ void SwDocInfoField::SetLanguage(sal_uInt16 nLng)
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-sal_Bool SwDocInfoField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwDocInfoField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1306,12 +1279,12 @@ sal_Bool SwDocInfoField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
default:
return SwField::QueryValue(rAny, nWhichId);
}
- return sal_True;
+ return true;
}
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-sal_Bool SwDocInfoField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwDocInfoField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
sal_Int32 nValue = 0;
switch( nWhichId )
@@ -1356,7 +1329,7 @@ sal_Bool SwDocInfoField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
default:
return SwField::PutValue(rAny, nWhichId);
}
- return sal_True;
+ return true;
}
/*--------------------------------------------------------------------
@@ -1455,7 +1428,7 @@ String SwHiddenTxtField::Expand() const
void SwHiddenTxtField::Evaluate(SwDoc* pDoc)
{
- ASSERT(pDoc, Wo ist das Dokument Seniore);
+ OSL_ENSURE(pDoc, "Wo ist das Dokument Seniore");
if( TYP_CONDTXTFLD == nSubType )
{
@@ -1469,7 +1442,7 @@ void SwHiddenTxtField::Evaluate(SwDoc* pDoc)
else
sTmpName = aFALSETxt;
-// OS 21.08.97: #42943# Datenbankausdruecke muessen sich von
+// Datenbankausdruecke muessen sich von
// einfachem Text unterscheiden. also wird der einfache Text
// bevorzugt in Anfuehrungszeichen gesetzt.
// Sind diese vorhanden werden umschliessende entfernt.
@@ -1606,7 +1579,7 @@ sal_uInt16 SwHiddenTxtField::GetSubType() const
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-sal_Bool SwHiddenTxtField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwHiddenTxtField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
const String* pOut = 0;
switch( nWhichId )
@@ -1630,16 +1603,16 @@ sal_Bool SwHiddenTxtField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) con
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
if( pOut )
rAny <<= OUString( *pOut );
- return sal_True;
+ return true;
}
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-sal_Bool SwHiddenTxtField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwHiddenTxtField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -1663,9 +1636,9 @@ sal_Bool SwHiddenTxtField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
bValid = sal_True;
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
//------------------------------------------------------------------------------
@@ -1743,10 +1716,8 @@ SwField* SwHiddenParaField::Copy() const
return pFld;
}
-/*-----------------05.03.98 13:25-------------------
---------------------------------------------------*/
-sal_Bool SwHiddenParaField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwHiddenParaField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch ( nWhichId )
{
@@ -1761,14 +1732,12 @@ sal_Bool SwHiddenParaField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) co
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------05.03.98 13:25-------------------
---------------------------------------------------*/
-sal_Bool SwHiddenParaField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwHiddenParaField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch ( nWhichId )
{
@@ -1780,9 +1749,9 @@ sal_Bool SwHiddenParaField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
/*--------------------------------------------------------------------
@@ -1908,10 +1877,7 @@ sal_uInt32 SwPostItField::GetNumberOfParagraphs() const
return (mpText) ? mpText->Count() : 1;
}
-/*-----------------05.03.98 13:42-------------------
-
---------------------------------------------------*/
-sal_Bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1966,16 +1932,12 @@ sal_Bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-
-/*-----------------05.03.98 13:42-------------------
-
---------------------------------------------------*/
-sal_Bool SwPostItField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwPostItField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -1992,8 +1954,7 @@ sal_Bool SwPostItField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
}
break;
case FIELD_PROP_TEXT:
- DBG_ERROR("Not implemented!");
- // ::GetString( rAny, sTxt );
+ OSL_FAIL("Not implemented!");
break;
case FIELD_PROP_DATE:
if( rAny.getValueType() == ::getCppuType((util::Date*)0) )
@@ -2017,9 +1978,9 @@ sal_Bool SwPostItField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
/*--------------------------------------------------------------------
Beschreibung: DokumentinfoFields
@@ -2064,7 +2025,7 @@ String SwExtUserFieldType::Expand(sal_uInt16 nSub, sal_uInt32 ) const
case EU_STATE: nRet = USER_OPT_STATE; break;
case EU_FATHERSNAME: nRet = USER_OPT_FATHERSNAME; break;
case EU_APARTMENT: nRet = USER_OPT_APARTMENT; break;
- default: ASSERT( !this, "Field unknown");
+ default: OSL_ENSURE( !this, "Field unknown");
}
if( USHRT_MAX != nRet )
{
@@ -2116,10 +2077,7 @@ void SwExtUserField::SetSubType(sal_uInt16 nSub)
nType = nSub;
}
-/*-----------------05.03.98 14:14-------------------
-
---------------------------------------------------*/
-sal_Bool SwExtUserField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwExtUserField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2140,14 +2098,12 @@ sal_Bool SwExtUserField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------05.03.98 14:14-------------------
---------------------------------------------------*/
-sal_Bool SwExtUserField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwExtUserField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2169,9 +2125,9 @@ sal_Bool SwExtUserField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
SetFormat(GetFormat() & ~AF_FIXED);
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
//-------------------------------------------------------------------------
@@ -2236,10 +2192,7 @@ void SwRefPageSetField::SetPar2(const String& rStr)
SetOffset( (short) rStr.ToInt32() );
}
-/*-----------------05.03.98 14:52-------------------
-
---------------------------------------------------*/
-sal_Bool SwRefPageSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwRefPageSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2250,14 +2203,12 @@ sal_Bool SwRefPageSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) co
rAny <<= (sal_Int16)nOffset;
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------05.03.98 14:52-------------------
---------------------------------------------------*/
-sal_Bool SwRefPageSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwRefPageSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2268,9 +2219,9 @@ sal_Bool SwRefPageSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId
rAny >>=nOffset;
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
/*--------------------------------------------------------------------
Beschreibung: relatives Seitennummern - Abfrage Feld
@@ -2351,8 +2302,8 @@ sal_uInt16 SwRefPageGetFieldType::MakeSetList( _SetGetExpFlds& rTmpLst )
{
// einen sdbcx::Index fuers bestimmen vom TextNode anlegen
SwPosition aPos( pDoc->GetNodes().GetEndOfPostIts() );
-#ifdef DBG_UTIL
- ASSERT( GetBodyTxtNode( *pDoc, aPos, *pFrm ),
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( GetBodyTxtNode( *pDoc, aPos, *pFrm ),
"wo steht das Feld" );
#else
GetBodyTxtNode( *pDoc, aPos, *pFrm );
@@ -2461,7 +2412,7 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm,
sTxt.Erase();
- ASSERT( !pFrm->IsInDocBody(), "Flag ist nicht richtig, Frame steht im DocBody" );
+ OSL_ENSURE( !pFrm->IsInDocBody(), "Flag ist nicht richtig, Frame steht im DocBody" );
// sammel erstmal alle SetPageRefFelder ein.
_SetGetExpFlds aTmpLst( 10, 5 );
@@ -2507,10 +2458,8 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm,
pGetFld->SetText( FormatNumber( nPageNum, nTmpFmt ) );
}
}
-/*-----------------05.03.98 14:52-------------------
---------------------------------------------------*/
-sal_Bool SwRefPageGetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwRefPageGetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2521,14 +2470,12 @@ sal_Bool SwRefPageGetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) co
rAny <<= OUString(sTxt);
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------05.03.98 14:52-------------------
---------------------------------------------------*/
-sal_Bool SwRefPageGetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwRefPageGetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2539,8 +2486,6 @@ sal_Bool SwRefPageGetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId
if(nSet <= SVX_NUM_PAGEDESC )
SetFormat(nSet);
else {
- //exception(wrong_value)
- ;
}
}
break;
@@ -2552,9 +2497,9 @@ sal_Bool SwRefPageGetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
/*--------------------------------------------------------------------
@@ -2643,10 +2588,7 @@ void SwJumpEditField::SetPar2(const String& rStr)
sHelp = rStr;
}
-/*-----------------05.03.98 15:00-------------------
-
---------------------------------------------------*/
-sal_Bool SwJumpEditField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwJumpEditField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2659,7 +2601,6 @@ sal_Bool SwJumpEditField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) cons
case JE_FMT_FRAME: nRet = text::PlaceholderType::TEXTFRAME; break;
case JE_FMT_GRAPHIC:nRet = text::PlaceholderType::GRAPHIC; break;
case JE_FMT_OLE: nRet = text::PlaceholderType::OBJECT; break;
-// case JE_FMT_TEXT:
default:
nRet = text::PlaceholderType::TEXT; break;
}
@@ -2673,14 +2614,12 @@ sal_Bool SwJumpEditField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) cons
rAny <<= OUString(sTxt);
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------05.03.98 15:00-------------------
---------------------------------------------------*/
-sal_Bool SwJumpEditField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwJumpEditField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2708,9 +2647,9 @@ sal_Bool SwJumpEditField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
::GetString( rAny, sTxt);
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
@@ -2758,7 +2697,7 @@ void SwCombinedCharField::SetPar1(const String& rStr)
sCharacters = rStr.Copy( 0, MAX_COMBINED_CHARACTERS );
}
-sal_Bool SwCombinedCharField::QueryValue( uno::Any& rAny,
+bool SwCombinedCharField::QueryValue( uno::Any& rAny,
sal_uInt16 nWhichId ) const
{
switch( nWhichId )
@@ -2767,12 +2706,12 @@ sal_Bool SwCombinedCharField::QueryValue( uno::Any& rAny,
rAny <<= rtl::OUString( sCharacters );
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-sal_Bool SwCombinedCharField::PutValue( const uno::Any& rAny,
+bool SwCombinedCharField::PutValue( const uno::Any& rAny,
sal_uInt16 nWhichId )
{
switch( nWhichId )
@@ -2781,8 +2720,9 @@ sal_Bool SwCombinedCharField::PutValue( const uno::Any& rAny,
::GetString( rAny, sCharacters ).Erase( MAX_COMBINED_CHARACTERS );
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 80daf36db63b..bea6fe8eaf2a 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104,7 +105,7 @@ sal_Int32 lcl_APIToSubType(const uno::Any& rAny)
case SetVariableType::FORMULA: nSet = nsSwGetSetExpType::GSE_FORMULA; break;
case SetVariableType::STRING: nSet = nsSwGetSetExpType::GSE_STRING; break;
default:
- DBG_ERROR("wrong value");
+ OSL_FAIL("wrong value");
nSet = -1;
}
return nSet;
@@ -150,7 +151,7 @@ SwTxtNode* GetFirstTxtNode( const SwDoc& rDoc, SwPosition& rPos,
while( 0 != (pCNd = rNodes.GoNext( &rPos.nNode ) ) &&
0 == ( pTxtNode = pCNd->GetTxtNode() ) )
;
- ASSERT( pTxtNode, "wo ist der 1.TextNode" );
+ OSL_ENSURE( pTxtNode, "wo ist der 1.TextNode" );
rPos.nContent.Assign( pTxtNode, 0 );
}
else if ( !pCFrm->IsValid() )
@@ -179,7 +180,7 @@ const SwTxtNode* GetBodyTxtNode( const SwDoc& rDoc, SwPosition& rPos,
{
// hole das FlyFormat
SwFrmFmt* pFlyFmt = ((SwFlyFrm*)pLayout)->GetFmt();
- ASSERT( pFlyFmt, "kein FlyFormat gefunden, wo steht das Feld" );
+ OSL_ENSURE( pFlyFmt, "kein FlyFormat gefunden, wo steht das Feld" );
const SwFmtAnchor &rAnchor = pFlyFmt->GetAnchor();
@@ -194,7 +195,7 @@ const SwTxtNode* GetBodyTxtNode( const SwDoc& rDoc, SwPosition& rPos,
(FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
(FLY_AS_CHAR == rAnchor.GetAnchorId()))
{
- ASSERT( rAnchor.GetCntntAnchor(), "keine gueltige Position" );
+ OSL_ENSURE( rAnchor.GetCntntAnchor(), "keine gueltige Position" );
rPos = *rAnchor.GetCntntAnchor();
pTxtNode = rPos.nNode.GetNode().GetTxtNode();
if ( FLY_AT_PARA == rAnchor.GetAnchorId() )
@@ -344,7 +345,7 @@ void SwGetExpField::ChangeExpansion( const SwFrm& rFrm, const SwTxtFld& rFld )
if( bIsInBodyTxt ) // nur Felder in Footer, Header, FootNote, Flys
return;
- ASSERT( !rFrm.IsInDocBody(), "Flag ist nicht richtig, Frame steht im DocBody" );
+ OSL_ENSURE( !rFrm.IsInDocBody(), "Flag ist nicht richtig, Frame steht im DocBody" );
// bestimme mal das Dokument (oder geht es noch einfacher?)
const SwTxtNode* pTxtNode = &rFld.GetTxtNode();
@@ -425,10 +426,7 @@ void SwGetExpField::SetLanguage(sal_uInt16 nLng)
SwValueField::SetLanguage(nLng);
}
-/*-----------------07.03.98 16:08-------------------
-
---------------------------------------------------*/
-sal_Bool SwGetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwGetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -462,12 +460,10 @@ sal_Bool SwGetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
default:
return SwField::QueryValue(rAny, nWhichId);
}
- return sal_True;
+ return true;
}
-/*-----------------07.03.98 16:08-------------------
---------------------------------------------------*/
-sal_Bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
sal_Int32 nTmp = 0;
String sTmp;
@@ -504,10 +500,10 @@ sal_Bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
default:
return SwField::PutValue(rAny, nWhichId);
}
- return sal_True;
+ return true;
}
-/*-----------------JP: 17.06.93 -------------------
+/*-------------------------------------------------
Set-Expression-Type
--------------------------------------------------*/
@@ -650,17 +646,14 @@ void SwSetExpFieldType::SetChapter( SwSetExpField& rFld, const SwNode& rNd )
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwSetExpFieldType::SetChapter(..)> - text node with numbering rule, but without number. This is a serious defect -> inform OD" );
}
}
}
}
-/* -----------------24.03.99 09:44-------------------
- *
- * --------------------------------------------------*/
-sal_Bool SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -680,12 +673,12 @@ sal_Bool SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) co
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-sal_Bool SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -717,9 +710,9 @@ sal_Bool SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
sal_Bool SwSeqFldList::InsertSort( _SeqFldLstElem* pNew )
@@ -909,7 +902,7 @@ void SwGetExpField::SetValue( const double& rAny )
sExpand = ((SwValueFieldType*)GetTyp())->ExpandValue( rAny, GetFormat(),
GetLanguage());
}
-/* -----------------14.07.99 12:21-------------------
+/* --------------------------------------------------
Description: Find the index of the reference text
following the current field
--------------------------------------------------*/
@@ -1060,10 +1053,7 @@ String SwInputField::Expand() const
return sRet;
}
-/*-----------------06.03.98 11:12-------------------
-
---------------------------------------------------*/
-sal_Bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1080,14 +1070,12 @@ sal_Bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
rAny <<= OUString( aToolTip );
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------06.03.98 11:12-------------------
---------------------------------------------------*/
-sal_Bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -1104,9 +1092,9 @@ sal_Bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
::GetString( rAny, aToolTip );
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
/*--------------------------------------------------------------------
Beschreibung: Bedingung setzen
@@ -1170,10 +1158,8 @@ void SwInputField::SetSubType(sal_uInt16 nSub)
{
nSubType = nSub;
}
-/*-----------------05.03.98 17:22-------------------
---------------------------------------------------*/
-sal_Bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1235,12 +1221,10 @@ sal_Bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
default:
return SwField::QueryValue(rAny, nWhichId);
}
- return sal_True;
+ return true;
}
-/*-----------------05.03.98 17:22-------------------
---------------------------------------------------*/
-sal_Bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
sal_Int32 nTmp32 = 0;
sal_Int16 nTmp16 = 0;
@@ -1263,8 +1247,6 @@ sal_Bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
if(nTmp16 <= SVX_NUMBER_NONE )
SetFormat(nTmp16);
else {
- //exception(wrong_value)
- ;
}
}
break;
@@ -1317,8 +1299,9 @@ sal_Bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
default:
return SwField::PutValue(rAny, nWhichId);
}
- return sal_True;
+ return true;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index 47c6a0e4be12..b14864d52c98 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,7 +53,6 @@
#include <comcore.hrc>
#include <math.h>
-#include <float.h>
using namespace ::com::sun::star;
using namespace nsSwDocInfoSubType;
@@ -85,7 +85,7 @@ SvStringsDtor* SwFieldType::pFldNames = 0;
DBG_NAME(SwFieldType)
- sal_uInt16 __FAR_DATA aTypeTab[] = {
+ sal_uInt16 aTypeTab[] = {
/* RES_DBFLD */ TYP_DBFLD,
/* RES_USERFLD */ TYP_USERFLD,
/* RES_FILENAMEFLD */ TYP_FILENAMEFLD,
@@ -155,7 +155,7 @@ SwFieldType::SwFieldType( sal_uInt16 nWhichId )
DBG_CTOR( SwFieldType, 0 );
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
SwFieldType::~SwFieldType()
{
@@ -169,13 +169,13 @@ const String& SwFieldType::GetName() const
return aEmptyStr;
}
-sal_Bool SwFieldType::QueryValue( uno::Any&, sal_uInt16 ) const
+bool SwFieldType::QueryValue( uno::Any&, sal_uInt16 ) const
{
- return sal_False;
+ return false;
}
-sal_Bool SwFieldType::PutValue( const uno::Any& , sal_uInt16 )
+bool SwFieldType::PutValue( const uno::Any& , sal_uInt16 )
{
- return sal_False;
+ return false;
}
/*--------------------------------------------------------------------
@@ -189,7 +189,7 @@ SwField::SwField(SwFieldType* pTyp, sal_uInt32 nFmt, sal_uInt16 nLng) :
bIsAutomaticLanguage(sal_True),
nFormat(nFmt)
{
- ASSERT( pTyp, "SwField: ungueltiger SwFieldType" );
+ OSL_ENSURE( pTyp, "SwField: ungueltiger SwFieldType" );
pType = pTyp;
}
@@ -201,18 +201,14 @@ SwField::~SwField()
Beschreibung: Statt Umweg ueber den Typ
--------------------------------------------------------------------*/
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uInt16 SwField::Which() const
{
- ASSERT(pType, "Kein Typ vorhanden");
+ OSL_ENSURE(pType, "Kein Typ vorhanden");
return pType->Which();
}
#endif
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwField::GetTypeId() const
{
@@ -307,16 +303,14 @@ void SwField::SetPar2(const String& )
sal_uInt16 SwField::GetSubType() const
{
-// ASSERT(0, "Sorry Not implemented");
return 0;
}
void SwField::SetSubType(sal_uInt16 )
{
-// ASSERT(0, "Sorry Not implemented");
}
-sal_Bool SwField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
+bool SwField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -327,11 +321,11 @@ sal_Bool SwField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-sal_Bool SwField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
+bool SwField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -343,9 +337,9 @@ sal_Bool SwField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
@@ -357,7 +351,7 @@ sal_Bool SwField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
SwFieldType* SwField::ChgTyp( SwFieldType* pNewType )
{
- ASSERT( pNewType && pNewType->Which() == pType->Which(),
+ OSL_ENSURE( pNewType && pNewType->Which() == pType->Which(),
"kein Typ oder ungleiche Typen" );
SwFieldType* pOld = pType;
@@ -455,7 +449,7 @@ String FormatNumber(sal_uInt16 nNum, sal_uInt32 nFormat)
return String::CreateFromInt32( nNum );
SvxNumberType aNumber;
- ASSERT(nFormat != SVX_NUM_NUMBER_NONE, "Falsches Nummern-Format" );
+ OSL_ENSURE(nFormat != SVX_NUM_NUMBER_NONE, "Falsches Nummern-Format" );
aNumber.SetNumberingType((sal_Int16)nFormat);
return aNumber.GetNumStr(nNum);
@@ -519,7 +513,7 @@ String SwValueFieldType::ExpandValue( const double& rVal,
else
nFmt = nNewFormat;
}
- ASSERT(pEntry, "Unbekanntes Zahlenformat!");
+ OSL_ENSURE(pEntry, "Unbekanntes Zahlenformat!");
}
if( pFormatter->IsTextFormat( nFmt ) )
@@ -534,10 +528,6 @@ String SwValueFieldType::ExpandValue( const double& rVal,
return sExpand;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwValueFieldType::DoubleToString( String &rValue, const double &rVal,
sal_uInt32 nFmt) const
{
@@ -548,10 +538,6 @@ void SwValueFieldType::DoubleToString( String &rValue, const double &rVal,
DoubleToString(rValue, rVal, pEntry->GetLanguage());
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwValueFieldType::DoubleToString( String &rValue, const double &rVal,
sal_uInt16 nLng ) const
{
@@ -682,17 +668,13 @@ void SwValueField::SetLanguage( sal_uInt16 nLng )
}
SetFormat( nNewFormat );
}
- ASSERT(pEntry, "Unbekanntes Zahlenformat!");
+ OSL_ENSURE(pEntry, "Unbekanntes Zahlenformat!");
}
}
SwField::SetLanguage(nLng);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
double SwValueField::GetValue() const
{
return fValue;
@@ -718,19 +700,11 @@ SwFormulaField::SwFormulaField( const SwFormulaField& rFld )
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
String SwFormulaField::GetFormula() const
{
return sFormula;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFormulaField::SetFormula(const String& rStr)
{
sFormula = rStr;
@@ -746,10 +720,6 @@ void SwFormulaField::SetFormula(const String& rStr)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFormulaField::SetExpandedFormula( const String& rStr )
{
sal_uInt32 nFmt(GetFormat());
@@ -772,10 +742,6 @@ void SwFormulaField::SetExpandedFormula( const String& rStr )
sFormula = rStr;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
String SwFormulaField::GetExpandedFormula() const
{
sal_uInt32 nFmt(GetFormat());
@@ -806,3 +772,5 @@ String SwField::GetDescription() const
{
return SW_RES(STR_FIELD);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx
index 253477f118e0..098d7a49ffb9 100644
--- a/sw/source/core/fields/flddat.cxx
+++ b/sw/source/core/fields/flddat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-// #include <math.h>
#include <tools/datetime.hxx>
#include <svl/zforlist.hxx>
#include <com/sun/star/util/DateTime.hpp>
@@ -46,10 +46,6 @@ SwDateTimeFieldType::SwDateTimeFieldType(SwDoc* pInitDoc)
: SwValueFieldType( pInitDoc, RES_DATETIMEFLD )
{}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFieldType* SwDateTimeFieldType::Copy() const
{
SwDateTimeFieldType *pTmp = new SwDateTimeFieldType(GetDoc());
@@ -80,10 +76,6 @@ SwDateTimeField::SwDateTimeField(SwDateTimeFieldType* pInitType, sal_uInt16 nSub
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
String SwDateTimeField::Expand() const
{
double fVal;
@@ -102,10 +94,6 @@ String SwDateTimeField::Expand() const
return ExpandValue(fVal, GetFormat(), GetLanguage());
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwField* SwDateTimeField::Copy() const
{
SwDateTimeField *pTmp =
@@ -119,36 +107,21 @@ SwField* SwDateTimeField::Copy() const
return pTmp;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwDateTimeField::GetSubType() const
{
return nSubType;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDateTimeField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
void SwDateTimeField::SetPar2(const String& rStr)
{
nOffset = rStr.ToInt32();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
String SwDateTimeField::GetPar2() const
{
if (nOffset)
@@ -157,19 +130,11 @@ String SwDateTimeField::GetPar2() const
return aEmptyStr;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDateTimeField::SetDateTime(const DateTime& rDT)
{
SetValue(GetDateTime(GetDoc(), rDT));
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
double SwDateTimeField::GetDateTime(SwDoc* pDoc, const DateTime& rDT)
{
SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter();
@@ -180,10 +145,6 @@ double SwDateTimeField::GetDateTime(SwDoc* pDoc, const DateTime& rDT)
return fResult;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
double SwDateTimeField::GetValue() const
{
if (IsFixed())
@@ -192,10 +153,6 @@ double SwDateTimeField::GetValue() const
return GetDateTime(GetDoc(), DateTime());
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
Date SwDateTimeField::GetDate(sal_Bool bUseOffset) const
{
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
@@ -211,10 +168,6 @@ Date SwDateTimeField::GetDate(sal_Bool bUseOffset) const
return aDate;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
Time SwDateTimeField::GetTime(sal_Bool bUseOffset) const
{
double fDummy;
@@ -226,10 +179,7 @@ Time SwDateTimeField::GetTime(sal_Bool bUseOffset) const
return (Time)aDT;
}
-/*-----------------04.03.98 11:05-------------------
-
---------------------------------------------------*/
-sal_Bool SwDateTimeField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
+bool SwDateTimeField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -269,12 +219,10 @@ sal_Bool SwDateTimeField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) cons
default:
return SwField::QueryValue(rVal, nWhichId);
}
- return sal_True;
+ return true;
}
-/*-----------------04.03.98 11:05-------------------
---------------------------------------------------*/
-sal_Bool SwDateTimeField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
+bool SwDateTimeField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
{
sal_Int32 nTmp = 0;
switch( nWhichId )
@@ -316,6 +264,7 @@ sal_Bool SwDateTimeField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
default:
return SwField::PutValue(rVal, nWhichId);
}
- return sal_True;
+ return true;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/flddropdown.cxx b/sw/source/core/fields/flddropdown.cxx
index 44e625edfccb..0e866b1e1c51 100644
--- a/sw/source/core/fields/flddropdown.cxx
+++ b/sw/source/core/fields/flddropdown.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,9 +37,7 @@
#endif
#include <svl/poolitem.hxx>
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
#include <unoprnms.hxx>
using namespace com::sun::star;
@@ -142,7 +141,7 @@ uno::Sequence<OUString> SwDropDownField::GetItemSequence() const
int i = 0;
vector<String>::const_iterator aIt;
- for (aIt = aValues.begin(); aIt != aValues.end(); aIt++)
+ for (aIt = aValues.begin(); aIt != aValues.end(); ++aIt)
{
pSeq[i] = rtl::OUString(*aIt);
@@ -200,7 +199,7 @@ void SwDropDownField::SetToolTip(const String & rToolTip)
aToolTip = rToolTip;
}
-sal_Bool SwDropDownField::QueryValue(::uno::Any &rVal, sal_uInt16 nWhich) const
+bool SwDropDownField::QueryValue(::uno::Any &rVal, sal_uInt16 nWhich) const
{
nWhich &= ~CONVERT_TWIPS;
switch( nWhich )
@@ -223,12 +222,12 @@ sal_Bool SwDropDownField::QueryValue(::uno::Any &rVal, sal_uInt16 nWhich) const
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-sal_Bool SwDropDownField::PutValue(const uno::Any &rVal,
+bool SwDropDownField::PutValue(const uno::Any &rVal,
sal_uInt16 nWhich)
{
switch( nWhich )
@@ -278,7 +277,9 @@ sal_Bool SwDropDownField::PutValue(const uno::Any &rVal,
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/fldlst.cxx b/sw/source/core/fields/fldlst.cxx
index 2777dc82e9b4..a7ee49314997 100644
--- a/sw/source/core/fields/fldlst.cxx
+++ b/sw/source/core/fields/fldlst.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -114,7 +115,7 @@ sal_uInt16 SwInputFieldList::Count() const
SwField* SwInputFieldList::GetField(sal_uInt16 nId)
{
const SwTxtFld* pTxtFld = (*pSrtLst)[ nId ]->GetFld();
- ASSERT( pTxtFld, "kein TextFld" );
+ OSL_ENSURE( pTxtFld, "kein TextFld" );
return (SwField*)pTxtFld->GetFld().GetFld();
}
@@ -231,3 +232,4 @@ void SwInputFieldList::RemoveUnselectedFlds()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/macrofld.cxx b/sw/source/core/fields/macrofld.cxx
index 17926457ea3f..023eb68f800c 100644
--- a/sw/source/core/fields/macrofld.cxx
+++ b/sw/source/core/fields/macrofld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -172,10 +173,7 @@ String SwMacroField::GetPar2() const
return aText;
}
-/*-----------------05.03.98 13:38-------------------
-
---------------------------------------------------*/
-sal_Bool SwMacroField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwMacroField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -192,14 +190,12 @@ sal_Bool SwMacroField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
rAny <<= bIsScriptURL ? OUString(GetMacroName()): OUString();
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------05.03.98 13:38-------------------
---------------------------------------------------*/
-sal_Bool SwMacroField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwMacroField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
String sTmp;
switch( nWhichId )
@@ -218,10 +214,10 @@ sal_Bool SwMacroField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
bIsScriptURL = isScriptURL(aMacro);
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
// create an internally used macro name from the library and macro name parts
@@ -244,8 +240,8 @@ sal_Bool SwMacroField::isScriptURL( const String& str )
uno::Reference< uri::XUriReferenceFactory >
xFactory( xSMgr->createInstance(
- OUString::createFromAscii(
- "com.sun.star.uri.UriReferenceFactory" ) ), uno::UNO_QUERY );
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.uri.UriReferenceFactory")) ), uno::UNO_QUERY );
if ( xFactory.is() )
{
@@ -259,3 +255,5 @@ sal_Bool SwMacroField::isScriptURL( const String& str )
}
return sal_False;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx
index 1d76dce43117..fb57eebdeef3 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,9 +65,9 @@ struct LayoutInfoOrder
else
{
// corresponding <SwFrm> instances are in different repeating table header rows
- ASSERT( rLayoutInfo.mpAnchorFrm->FindTabFrm(),
+ OSL_ENSURE( rLayoutInfo.mpAnchorFrm->FindTabFrm(),
"<LayoutInfoOrder::operator()> - table frame not found" );
- ASSERT( rNewLayoutInfo.mpAnchorFrm->FindTabFrm(),
+ OSL_ENSURE( rNewLayoutInfo.mpAnchorFrm->FindTabFrm(),
"<LayoutInfoOrder::operator()> - table frame not found" );
const SwTabFrm* pLayoutInfoTabFrm( rLayoutInfo.mpAnchorFrm->FindTabFrm() );
const SwTabFrm* pNewLayoutInfoTabFrm( rNewLayoutInfo.mpAnchorFrm->FindTabFrm() );
@@ -205,19 +206,4 @@ sw::sidebarwindows::SwSidebarWin* SwAnnotationItem::GetSidebarWindow(
pFmtFld );
}
-/*
-SwPosition SwRedCommentItem::GetAnchorPosition()
-{
- return *pRedline->Start();
-}
-
-SwSidebarWin* SwRedCommentItem::GetSidebarWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits)
-{
- return new SwRedComment(pParent,nBits,aMgr,aBits,pRedline);
-}
-
-bool SwRedCommentItem::UseElement()
-{
- return true;
-}
-*/
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 46bdd962df09..5a1b83fe4e5c 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -466,7 +467,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
break;
// <--
default:
- DBG_ERROR("<SwGetRefField::UpdateField(..)> - unknown format type");
+ OSL_FAIL("<SwGetRefField::UpdateField(..)> - unknown format type");
}
}
@@ -478,7 +479,7 @@ String SwGetRefField::MakeRefNumStr( const SwTxtNode& rTxtNodeOfField,
if ( rTxtNodeOfReferencedItem.HasNumber() &&
rTxtNodeOfReferencedItem.IsCountedInList() )
{
- ASSERT( rTxtNodeOfReferencedItem.GetNum(),
+ OSL_ENSURE( rTxtNodeOfReferencedItem.GetNum(),
"<SwGetRefField::MakeRefNumStr(..)> - referenced paragraph has number, but no <SwNodeNum> instance --> please inform OD!" );
// Determine, up to which level the superior list labels have to be
@@ -534,7 +535,7 @@ String SwGetRefField::MakeRefNumStr( const SwTxtNode& rTxtNodeOfField,
( nRestrictInclToThisLevel < rTxtNodeOfReferencedItem.GetActualListLevel() &&
( nRefNumFormat == REF_NUMBER || nRefNumFormat == REF_NUMBER_FULL_CONTEXT ) ) );
- ASSERT( rTxtNodeOfReferencedItem.GetNumRule(),
+ OSL_ENSURE( rTxtNodeOfReferencedItem.GetNumRule(),
"<SwGetRefField::MakeRefNumStr(..)> - referenced numbered paragraph has no numbering rule set --> please inform OD!" );
return rTxtNodeOfReferencedItem.GetNumRule()->MakeRefNumString(
*(rTxtNodeOfReferencedItem.GetNum()),
@@ -577,10 +578,7 @@ String SwGetRefField::GetPar2() const
return Expand();
}
-/*-----------------06.03.98 13:34-------------------
-
---------------------------------------------------*/
-sal_Bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -614,7 +612,7 @@ sal_Bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
case REF_SETREFATTR : nSource = ReferenceFieldSource::REFERENCE_MARK; break;
case REF_SEQUENCEFLD: nSource = ReferenceFieldSource::SEQUENCE_FIELD; break;
case REF_BOOKMARK : nSource = ReferenceFieldSource::BOOKMARK; break;
- case REF_OUTLINE : DBG_ERROR("not implemented"); break;
+ case REF_OUTLINE : OSL_FAIL("not implemented"); break;
case REF_FOOTNOTE : nSource = ReferenceFieldSource::FOOTNOTE; break;
case REF_ENDNOTE : nSource = ReferenceFieldSource::ENDNOTE; break;
}
@@ -647,14 +645,12 @@ sal_Bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
rAny <<= (sal_Int16)nSeqNo;
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------06.03.98 13:34-------------------
---------------------------------------------------*/
-sal_Bool SwGetRefField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwGetRefField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
String sTmp;
switch( nWhichId )
@@ -678,7 +674,7 @@ sal_Bool SwGetRefField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
case ReferenceFieldPart::NUMBER_NO_CONTEXT: nPart = REF_NUMBER_NO_CONTEXT; break;
case ReferenceFieldPart::NUMBER_FULL_CONTEXT: nPart = REF_NUMBER_FULL_CONTEXT; break;
// <--
- default: return sal_False;
+ default: return false;
}
SetFormat(nPart);
}
@@ -724,13 +720,11 @@ sal_Bool SwGetRefField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/* -----------------------------11.01.2002 12:50------------------------------
- ---------------------------------------------------------------------------*/
void SwGetRefField::ConvertProgrammaticToUIName()
{
if(GetTyp() && REF_SEQUENCEFLD == nSubType)
@@ -812,7 +806,7 @@ SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const String& rRefMark,
sal_uInt16 nSubType, sal_uInt16 nSeqNo,
sal_uInt16* pStt, sal_uInt16* pEnd )
{
- ASSERT( pStt, "warum wird keine StartPos abgefragt?" );
+ OSL_ENSURE( pStt, "warum wird keine StartPos abgefragt?" );
SwTxtNode* pTxtNd = 0;
switch( nSubType )
@@ -873,7 +867,7 @@ SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const String& rRefMark,
// --> OD 2007-10-18 #i81002#
if(dynamic_cast< ::sw::mark::CrossRefBookmark const *>(pBkmk))
{
- ASSERT( pTxtNd,
+ OSL_ENSURE( pTxtNd,
"<SwGetRefFieldType::FindAnchor(..)> - node marked by cross-reference bookmark isn't a text node --> crash" );
*pEnd = pTxtNd->Len();
}
@@ -1088,3 +1082,4 @@ void SwGetRefFieldType::MergeWithOtherDoc( SwDoc& rDestDoc )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/scrptfld.cxx b/sw/source/core/fields/scrptfld.cxx
index 22c6ba695a05..3db79ca70afd 100644
--- a/sw/source/core/fields/scrptfld.cxx
+++ b/sw/source/core/fields/scrptfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,12 +31,8 @@
#include <docufld.hxx>
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <tools/resid.hxx>
using namespace ::com::sun::star;
@@ -108,10 +105,8 @@ String SwScriptField::GetPar2() const
{
return sCode;
}
-/*-----------------05.03.98 15:00-------------------
---------------------------------------------------*/
-sal_Bool SwScriptField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwScriptField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -125,14 +120,12 @@ sal_Bool SwScriptField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
rAny.setValue(&bCodeURL, ::getBooleanCppuType());
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------05.03.98 15:00-------------------
---------------------------------------------------*/
-sal_Bool SwScriptField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwScriptField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -146,8 +139,9 @@ sal_Bool SwScriptField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
bCodeURL = *(sal_Bool*)rAny.getValue();
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx
index 5d6500ec3646..c3f081a3f2dd 100644
--- a/sw/source/core/fields/tblcalc.cxx
+++ b/sw/source/core/fields/tblcalc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -186,13 +187,9 @@ void SwTblField::SetPar2(const String& rStr)
SetFormula( rStr );
}
-
-/*-----------------04.03.98 10:33-------------------
-
---------------------------------------------------*/
-sal_Bool SwTblField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwTblField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nWhichId )
{
case FIELD_PROP_PAR2:
@@ -217,16 +214,14 @@ sal_Bool SwTblField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
rAny <<= (sal_Int32)GetFormat();
break;
default:
- bRet = sal_False;
+ bRet = false;
}
return bRet;
}
-/*-----------------04.03.98 10:33-------------------
---------------------------------------------------*/
-sal_Bool SwTblField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwTblField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
String sTmp;
switch ( nWhichId )
{
@@ -250,11 +245,9 @@ sal_Bool SwTblField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
}
break;
default:
- bRet = sal_False;
+ bRet = false;
}
return bRet;
}
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/textapi.cxx b/sw/source/core/fields/textapi.cxx
index 1e994f536801..09d2ddc20fae 100755..100644
--- a/sw/source/core/fields/textapi.cxx
+++ b/sw/source/core/fields/textapi.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -189,3 +190,5 @@ String SwTextAPIEditSource::GetText()
else
return String();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index 8ecb54472f45..8909f588f842 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -126,10 +127,7 @@ void SwUserField::SetSubType(sal_uInt16 nSub)
nSubType = nSub & 0xff00;
}
-/*-----------------09.03.98 08:04-------------------
-
---------------------------------------------------*/
-sal_Bool SwUserField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwUserField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -151,12 +149,10 @@ sal_Bool SwUserField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
default:
return SwField::QueryValue(rAny, nWhichId);
}
- return sal_True;
+ return true;
}
-/*-----------------09.03.98 08:04-------------------
---------------------------------------------------*/
-sal_Bool SwUserField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwUserField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -182,7 +178,7 @@ sal_Bool SwUserField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
default:
return SwField::PutValue(rAny, nWhichId);
}
- return sal_True;
+ return true;
}
/*--------------------------------------------------------------------
@@ -308,10 +304,7 @@ void SwUserFieldType::SetContent( const String& rStr, sal_uInt32 nFmt )
}
}
-/*-----------------04.03.98 17:05-------------------
-
---------------------------------------------------*/
-sal_Bool SwUserFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
+bool SwUserFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -328,14 +321,12 @@ sal_Bool SwUserFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) cons
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
-/*-----------------04.03.98 17:05-------------------
---------------------------------------------------*/
-sal_Bool SwUserFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
+bool SwUserFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -368,10 +359,11 @@ sal_Bool SwUserFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
}
break;
default:
- DBG_ERROR("illegal property");
+ OSL_FAIL("illegal property");
}
- return sal_True;
+ return true;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index b433c17af7ed..f2a53816c0fe 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,12 +52,8 @@
#include <svx/svdoole2.hxx>
#include <svx/fmmodel.hxx>
#include <svx/unomodel.hxx>
-// --> OD 2005-08-03 #i50824#
-#include <svx/svditer.hxx>
-// <--
-// --> OD 2006-03-01 #b6382898#
+#include <svx/svditer.hxx> // #i50824#
#include <svx/svdograf.hxx>
-// <--
#include <unotools/streamwrap.hxx>
#include <fmtanchr.hxx>
#include <fmtcntnt.hxx>
@@ -96,14 +93,11 @@ using namespace ::com::sun::star;
|* SwFEShell::Copy() Copy fuer das Interne Clipboard.
|* Kopiert alle Selektionen in das Clipboard.
|*
-|* Ersterstellung JP ??
-|* Letzte Aenderung MA 22. Feb. 95
-|
|*************************************************************************/
sal_Bool SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
{
- ASSERT( pClpDoc, "kein Clipboard-Dokument" );
+ OSL_ENSURE( pClpDoc, "kein Clipboard-Dokument" );
pClpDoc->GetIDocumentUndoRedo().DoUndo(false); // always false!
@@ -169,7 +163,7 @@ sal_Bool SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
if( rSpzFrmFmts[ 0 ] != pFlyFmt )
{
sal_uInt16 nPos = rSpzFrmFmts.GetPos( pFlyFmt );
- ASSERT( nPos != USHRT_MAX, "Fly steht nicht im Spz-Array" );
+ OSL_ENSURE( nPos != USHRT_MAX, "Fly steht nicht im Spz-Array" );
rSpzFrmFmts.Remove( nPos );
rSpzFrmFmts.Insert( pFlyFmt, 0 );
@@ -468,8 +462,8 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
{
sal_Bool bRet = sal_False;
- ASSERT( pDestShell, "Copy ohne DestShell." );
- ASSERT( this == pDestShell || !pDestShell->IsObjSelected(),
+ OSL_ENSURE( pDestShell, "Copy ohne DestShell." );
+ OSL_ENSURE( this == pDestShell || !pDestShell->IsObjSelected(),
"Dest-Shell darf nie im Obj-Modus sein" );
SET_CURR_SHELL( pDestShell );
@@ -550,7 +544,7 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
aNewAnch = pPg->Frm().Pos();
}
else {
- ASSERT( !this, "was fuer ein Anchor ist es denn?" );
+ OSL_ENSURE( !this, "was fuer ein Anchor ist es denn?" );
}
if( bRet )
@@ -693,9 +687,6 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
|* SwFEShell::Paste() Paste fuer das Interne Clipboard.
|* Kopiert den Inhalt vom Clipboard in das Dokument.
|*
-|* Ersterstellung JP ??
-|* Letzte Aenderung MA 22. Feb. 95
-|
|*************************************************************************/
namespace {
@@ -707,7 +698,7 @@ namespace {
sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
{
SET_CURR_SHELL( this );
- ASSERT( pClpDoc, "kein Clipboard-Dokument" );
+ OSL_ENSURE( pClpDoc, "kein Clipboard-Dokument" );
const sal_uInt16 nStartPageNumber = GetPhyPageNum();
// dann bis zum Ende vom Nodes Array
SwNodeIndex aIdx( pClpDoc->GetNodes().GetEndOfExtras(), 2 );
@@ -773,7 +764,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
while( nCount )
{
--nCount;
- ASSERT( aIdx.GetNode().GetCntntNode(), "Who filled the clipboard?!" )
+ OSL_ENSURE( aIdx.GetNode().GetCntntNode(), "Who filled the clipboard?!" );
if( aIdx.GetNode().GetCntntNode() ) // robust
{
Insertion aInsertion( PaMPtr( new SwPaM( aIdx ) ),
@@ -874,7 +865,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
// dann die Tabelle "relativ" kopieren
SwTableBox* pBox = pDestNd->GetTable().GetTblBox(
pSttNd->GetIndex() );
- ASSERT( pBox, "Box steht nicht in dieser Tabelle" );
+ OSL_ENSURE( pBox, "Box steht nicht in dieser Tabelle" );
aBoxes.Insert( pBox );
}
@@ -978,7 +969,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
(FLY_AS_CHAR == aAnchor.GetAnchorId()))
{
SwPosition* pPos = PCURCRSR->GetPoint();
- // #108784# allow shapes (no controls) in header/footer
+ // allow shapes (no controls) in header/footer
if( RES_DRAWFRMFMT == rCpyFmt.Which() &&
GetDoc()->IsInHeaderFooter( pPos->nNode ) &&
CheckControlLayer( rCpyFmt.FindSdrObject() ) )
@@ -1014,7 +1005,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
}
else
{
- ASSERT( RES_DRAWFRMFMT == pNew->Which(), "Neues Format.");
+ OSL_ENSURE( RES_DRAWFRMFMT == pNew->Which(), "Neues Format.");
// --> OD 2005-09-01 #i52780# - drawing object has
// to be made visible on paste.
{
@@ -1134,9 +1125,6 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
return bRet;
}
-/*-- 14.06.2004 13:31:17---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage)
{
Push();
@@ -1226,7 +1214,7 @@ sal_Bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_u
sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const
{
- ASSERT( Imp()->HasDrawView(), "GetDrawObjGraphic without DrawView?" );
+ OSL_ENSURE( Imp()->HasDrawView(), "GetDrawObjGraphic without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
sal_Bool bConvert = sal_True;
if( rMrkList.GetMarkCount() )
@@ -1237,7 +1225,6 @@ sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const
// Rahmen selektiert
if( CNT_GRF == GetCntType() )
{
- // --> OD 2005-02-09 #119353# - robust
const Graphic* pGrf( GetGraphic() );
if ( pGrf )
{
@@ -1298,7 +1285,6 @@ sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const
}
}
}
- // <--
}
}
else if( SOT_FORMAT_GDIMETAFILE == nFmt )
@@ -1310,7 +1296,6 @@ sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const
}
// --> OD 2005-08-03 #i50824#
-// --> OD 2006-03-01 #b6382898#
// replace method <lcl_RemoveOleObjsFromSdrModel> by <lcl_ConvertSdrOle2ObjsToSdrGrafObjs>
void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SdrModel* _pModel )
{
@@ -1347,7 +1332,7 @@ void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SdrModel* _pModel )
}
}
}
-// <--
+
void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt )
{
SET_CURR_SHELL( this );
@@ -1375,7 +1360,7 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt )
1 == pModel->GetPage(0)->GetObjCount() &&
1 == pView->GetMarkedObjectList().GetMarkCount() )
{
- // OD 10.07.2003 #110742# - replace a marked 'virtual' drawing object
+ // replace a marked 'virtual' drawing object
// by its corresponding 'master' drawing object in the mark list.
SwDrawView::ReplaceMarkedDrawVirtObjs( *pView );
@@ -1441,7 +1426,7 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt )
const SwTxtFrm* pTmp = (SwTxtFrm*)pAnchor;
do {
pTmp = pTmp->FindMaster();
- ASSERT( pTmp, "Where's my Master?" );
+ OSL_ENSURE( pTmp, "Where's my Master?" );
} while( pTmp->IsFollow() );
pAnchor = pTmp;
}
@@ -1492,10 +1477,8 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt )
pView->SetDesignMode( sal_True );
// --> OD 2005-08-03 #i50824#
- // --> OD 2006-03-01 #b6382898#
// method <lcl_RemoveOleObjsFromSdrModel> replaced by <lcl_ConvertSdrOle2ObjsToSdrGrafObjs>
lcl_ConvertSdrOle2ObjsToSdrGrafObjs( pModel );
- // <--
pView->Paste( *pModel, aPos );
sal_uLong nCnt = pView->GetMarkedObjectList().GetMarkCount();
@@ -1552,3 +1535,5 @@ sal_Bool SwFEShell::Paste( const Graphic &rGrf )
}
return bRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx
index 0c79bc4ed159..11ea45c3cdea 100644
--- a/sw/source/core/frmedt/fedesc.cxx
+++ b/sw/source/core/frmedt/fedesc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,9 +49,6 @@
|*
|* SwFEShell::GetPageDescCnt()
|*
-|* Ersterstellung MA 25. Jan. 93
-|* Letzte Aenderung MA 25. Jan. 93
-|*
|*************************************************************************/
sal_uInt16 SwFEShell::GetPageDescCnt() const
@@ -62,21 +60,18 @@ sal_uInt16 SwFEShell::GetPageDescCnt() const
|*
|* SwFEShell::ChgCurPageDesc()
|*
-|* Ersterstellung ST ??
-|* Letzte Aenderung MA 01. Aug. 94
-|*
|*************************************************************************/
void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
//Die SS veraendert keinen PageDesc, sondern setzt nur das Attribut.
//Der Pagedesc muss im Dokument vorhanden sein!
sal_Bool bFound = sal_False;
for ( sal_uInt16 nTst = 0; nTst < GetPageDescCnt(); ++nTst )
if ( &rDesc == &GetPageDesc( nTst ) )
bFound = sal_True;
- ASSERT( bFound, "ChgCurPageDesc mit ungueltigem Descriptor." );
+ OSL_ENSURE( bFound, "ChgCurPageDesc mit ungueltigem Descriptor." );
#endif
StartAllAction();
@@ -85,7 +80,7 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
const SwFrm *pFlow = 0;
sal_uInt16 nPageNmOffset = 0;
- ASSERT( !GetCrsr()->HasMark(), "ChgCurPageDesc nur ohne Selektion!");
+ OSL_ENSURE( !GetCrsr()->HasMark(), "ChgCurPageDesc nur ohne Selektion!");
SET_CURR_SHELL( this );
while ( pPage )
@@ -113,7 +108,7 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
{
pPage = (SwPageFrm*)pPage->GetNext();
pFlow = pPage->FindFirstBodyCntnt();
- ASSERT( pFlow, "Dokuemnt ohne Inhalt?!?" );
+ OSL_ENSURE( pFlow, "Dokuemnt ohne Inhalt?!?" );
}
}
@@ -135,9 +130,6 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
|*
|* SwFEShell::ChgPageDesc()
|*
-|* Ersterstellung MA 25. Jan. 93
-|* Letzte Aenderung MA 24. Jan. 95
-|*
|*************************************************************************/
void SwFEShell::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
@@ -159,9 +151,6 @@ void SwFEShell::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
|*
|* SwFEShell::GetPageDesc(), GetCurPageDesc()
|*
-|* Ersterstellung MA 25. Jan. 93
-|* Letzte Aenderung MA 23. Apr. 93
-|
|*************************************************************************/
const SwPageDesc& SwFEShell::GetPageDesc( sal_uInt16 i ) const
@@ -291,3 +280,4 @@ const SwPageDesc* SwFEShell::GetSelectedPageDescs() const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 13db6377c8e2..125c789f0ee3 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,17 +74,11 @@
#include <swundo.hxx>
#include <frame.hxx>
#include <notxtfrm.hxx>
-// --> OD 2006-03-06 #125892#
#include <HandleAnchorNodeChg.hxx>
-// <--
#include <frmatr.hxx>
-// --> 3.7.2010 #i972#
+#include <fmtsrnd.hxx> // #i89920#
#include <ndole.hxx>
-// <--
-// --> OD 2009-12-29 #i89920#
-#include <fmtsrnd.hxx>
#include <editeng/opaqitem.hxx>
-// <--
using ::rtl::OUString;
using namespace ::com::sun::star;
@@ -97,8 +92,6 @@ void RegistFlys( SwPageFrm*, const SwLayoutFrm* );
#* Methode : UseSpzLayoutFmt
#* Beschreibung: Anhand des Request werden zu dem Format entsprechende
#* Aenderungen an den Spezifischen Layouts vorgenommen.
-#* Datum : MA 23. Sep. 92
-#* Update : JP 09.03.98
#***********************************************************************/
sal_Bool lcl_SetNewFlyPos( const SwNode& rNode, SwFmtAnchor& rAnchor,
@@ -201,7 +194,7 @@ sal_Bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm,
break;
default:
- ASSERT( !&rDoc, "Falsche ID fuer neuen Anker." );
+ OSL_ENSURE( !&rDoc, "Falsche ID fuer neuen Anker." );
}
rSet.Put( aNewAnch );
@@ -224,8 +217,8 @@ sal_Bool lcl_ChkAndSetNewAnchor( const SwFlyFrm& rFly, SfxItemSet& rSet )
SwDoc* pDoc = (SwDoc*)rFmt.GetDoc();
-#ifdef DBG_UTIL
- ASSERT( !(nNew == FLY_AT_PAGE &&
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( !(nNew == FLY_AT_PAGE &&
(FLY_AT_PARA==nOld || FLY_AT_CHAR==nOld || FLY_AS_CHAR==nOld ) &&
pDoc->IsInHeaderFooter( rOldAnch.GetCntntAnchor()->nNode )),
"Unerlaubter Ankerwechsel in Head/Foot." );
@@ -248,7 +241,7 @@ void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew )
SwViewImp *pImpl = Imp();
if( GetWin() && (bNew || !pImpl->GetDrawView()->AreObjectsMarked()) )
{
- ASSERT( rFrm.IsFlyFrm(), "SelectFlyFrm will einen Fly" );
+ OSL_ENSURE( rFrm.IsFlyFrm(), "SelectFlyFrm will einen Fly" );
//Wenn der Fly bereits selektiert ist gibt es hier ja wohl nichts
//zu tun.
@@ -259,13 +252,6 @@ void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew )
if( rFrm.IsFlyInCntFrm() && rFrm.GetAnchorFrm() )
rFrm.GetAnchorFrm()->SetCompletePaint();
- // --> OD 2004-06-11 #i28701# - no format at all.
-// //Hier wurde immer kalkuliert. Leider ist der Sonderfall Fly in Fly mit
-// //Spalten u.U. sehr kritisch wenn der innenliegende zuerst formatiert
-// //wird. Um kein Risiko einzugehen entschaerfen wir nur diesen Sonderfall.
-// if( !rFrm.GetAnchorFrm()->IsInFly() )
-// rFrm.Calc();
-
if( pImpl->GetDrawView()->AreObjectsMarked() )
pImpl->GetDrawView()->UnmarkAll();
@@ -282,8 +268,6 @@ void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew )
|* SwFEShell::FindFlyFrm()
|*
|* Beschreibung Liefert den Fly wenn einer Selektiert ist.
-|* Ersterstellung MA 03. Nov. 92
-|* Letzte Aenderung MA 05. Mar. 96
|*
*************************************************************************/
@@ -308,8 +292,6 @@ SwFlyFrm *SwFEShell::FindFlyFrm() const
|*
|* Beschreibung Liefert sal_True, wenn der aktuelle Fly an einem anderen
|* verankert werden koennte (also innerhalb ist)
-|* Ersterstellung AMA 11. Sep. 97
-|* Letzte Aenderung AMA 14. Jan. 98
|*
*************************************************************************/
@@ -343,8 +325,8 @@ const SwFrmFmt* SwFEShell::IsFlyInFly()
const SwFrm* pFly = pObj->ISA(SwVirtFlyDrawObj) ?
((SwVirtFlyDrawObj*)pObj)->GetFlyFrm()->GetAnchorFrm() :
((SwDrawContact*)GetUserCall(pObj))->GetAnchorFrm( pObj );
- ASSERT( pFly, "IsFlyInFly: Where's my anchor?" );
- ASSERT( pFly->IsFlyFrm(), "IsFlyInFly: Funny anchor!" );
+ OSL_ENSURE( pFly, "IsFlyInFly: Where's my anchor?" );
+ OSL_ENSURE( pFly->IsFlyFrm(), "IsFlyInFly: Funny anchor!" );
return ((SwFlyFrm*)pFly)->GetFmt();
}
@@ -358,9 +340,7 @@ const SwFrmFmt* SwFEShell::IsFlyInFly()
Point aPoint( aTmpPos );
aPoint.X() -= 1; //nicht im Fly landen!!
GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState );
- // OD 01.07.2003 #108784# - determine text frame by left-top-corner
- // of object
- //pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->GetFrm( 0, 0, sal_False );
+ // determine text frame by left-top-corner of object
pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->GetFrm( &aTmpPos, 0, sal_False );
}
const SwFrm *pTmp = ::FindAnchor( pTxtFrm, aTmpPos );
@@ -374,9 +354,6 @@ const SwFrmFmt* SwFEShell::IsFlyInFly()
|*
|* SwFEShell::SetFlyPos
|*
-|* Ersterstellung MA 14. Jan. 93
-|* Letzte Aenderung MA 14. Feb. 95
-|*
*************************************************************************/
void SwFEShell::SetFlyPos( const Point& rAbsPos )
@@ -401,8 +378,6 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos )
else
{
const SwFrm *pAnch = pFly->GetAnchorFrm();
- // --> OD 2004-06-11 #i28701# - no format here
-// pAnch->Calc();
Point aOrient( pAnch->Frm().Pos() );
if ( pFly->IsFlyInCntFrm() )
@@ -413,8 +388,6 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos )
aOrient.Y() = rAbsPos.Y() - aOrient.Y();
pFly->ChgRelPos( aOrient );
}
- // --> OD 2004-06-11 #i28701# - no format here
-// pFly->Calc();
CallChgLnk(); // rufe das AttrChangeNotify auf der UI-Seite.
}
@@ -422,9 +395,6 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos )
|*
|* SwFEShell::FindAnchorPos
|*
-|* Ersterstellung AMA 24. Sep. 97
-|* Letzte Aenderung AMA 24. Sep. 97
-|*
*************************************************************************/
Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
@@ -473,7 +443,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
pFooterOrHeader = pCntnt->FindFooterOrHeader();
}
}
- // OD 26.06.2003 #108784# - set <pFooterOrHeader> also for drawing
+ // set <pFooterOrHeader> also for drawing
// objects, but not for control objects.
// Necessary for moving 'anchor symbol' at the user interface inside header/footer.
else if ( !::CheckControlLayer( pObj ) )
@@ -582,8 +552,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
if( bMoveIt )
{
StartAllAction();
- // --> OD 2006-02-28 #125892#
- // handle change of anchor node:
+ // --> handle change of anchor node:
// if count of the anchor frame also change, the fly frames have to be
// re-created. Thus, delete all fly frames except the <this> before the
// anchor attribute is change and re-create them afterwards.
@@ -614,11 +583,11 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
SwRect aTmpRect( aRet, rAbsPos );
if( aTmpRect.HasArea() )
MakeVisible( aTmpRect );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
//TODO: That doesn't seem to be intended
if( Color(COL_TRANSPARENT) != GetOut()->GetLineColor() )
{
- ASSERT( sal_False, "Hey, Joe: Where's my Null Pen?" );
+ OSL_ENSURE( sal_False, "Hey, Joe: Where's my Null Pen?" );
GetOut()->SetLineColor( Color(COL_TRANSPARENT) );
}
#endif
@@ -632,8 +601,6 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
#* Class : SwFEShell
#* Methode : NewFlyFrm
#* Beschreibung:
-#* Datum : MA 03. Nov. 92
-#* Update : JP 11. Aug. 93
#***********************************************************************/
const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchValid,
@@ -662,9 +629,6 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali
// we better get the current pCurCrsr instead of working with the
// deleted one:
pCrsr = GetCrsr();
- // <--
-
-// KillPams();
}
else
bMoveCntnt = sal_False;
@@ -701,7 +665,7 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali
break;
default:
- ASSERT( !this, "Was sollte das fuer ein Fly werden?" )
+ OSL_ENSURE( !this, "Was sollte das fuer ein Fly werden?" );
break;
}
@@ -794,7 +758,7 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali
GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSLAYFMT, NULL );
}
else
- /* #109161# If called from a shell try to propagate an
+ /* If called from a shell try to propagate an
existing adjust item from rPos to the content node of the
new frame. */
pRet = GetDoc()->MakeFlySection( eRndId, &rPos, &rSet, pParent, sal_True );
@@ -818,8 +782,6 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali
/***********************************************************************
#* Class : SwFEShell
#* Methode : Insert
-#* Datum : ??
-#* Update : MA 12. Sep. 94
#***********************************************************************/
void SwFEShell::Insert( const String& rGrfName, const String& rFltName,
@@ -876,7 +838,7 @@ void SwFEShell::Insert( const String& rGrfName, const String& rFltName,
rFltName, pGraphic,
pFlyAttrSet,
pGrfAttrSet, pFrmFmt );
- ASSERT( pFmt, "Doc->Insert(notxt) failed." );
+ OSL_ENSURE( pFmt, "Doc->Insert(notxt) failed." );
} while( (pCursor = dynamic_cast<SwShellCrsr*>(pCursor->GetNext()))
!= pStartCursor );
@@ -906,7 +868,7 @@ SwFlyFrmFmt* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj,
FOREACHPAM_START( this )
pFmt = GetDoc()->Insert(*PCURCRSR, xObj,
pFlyAttrSet, pGrfAttrSet, pFrmFmt );
- ASSERT( pFmt, "Doc->Insert(notxt) failed." );
+ OSL_ENSURE( pFmt, "Doc->Insert(notxt) failed." );
FOREACHPAM_END()
EndAllAction();
@@ -975,8 +937,6 @@ void SwFEShell::InsertDrawObj( SdrObject& rDrawObj,
/***********************************************************************
#* Class : SwFEShell
#* Methode : GetPageObjs
-#* Datum : ??
-#* Update : MA 11. Jan. 95
#***********************************************************************/
void SwFEShell::GetPageObjs( SvPtrarr& rFillArr )
@@ -998,8 +958,6 @@ void SwFEShell::GetPageObjs( SvPtrarr& rFillArr )
/***********************************************************************
#* Class : SwFEShell
#* Methode : SetPageFlysNewPage
-#* Datum : ??
-#* Update : MA 14. Feb. 95
#***********************************************************************/
void SwFEShell::SetPageObjsNewPage( SvPtrarr& rFillArr, int nOffset )
@@ -1059,8 +1017,6 @@ void SwFEShell::SetPageObjsNewPage( SvPtrarr& rFillArr, int nOffset )
#* Attributen des aktuellen FlyFrms gefuellt.
#* Sind Attribute nicht zu fuellen weil fehl am Platz oder
#* uneindeutig (Mehrfachtselektionen) so werden sie entfernt.
-#* Datum : MA 03. Nov. 92
-#* Update : MA 03. Feb. 94
#***********************************************************************/
sal_Bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const
@@ -1068,19 +1024,17 @@ sal_Bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const
SwFlyFrm *pFly = FindFlyFrm();
if ( !pFly )
{
- // --> OD 2006-11-08 #139670# - make code robust
SwFrm* pCurrFrm( GetCurrFrm() );
if ( !pCurrFrm )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwFEShell::GetFlyFrmAttr(..)> - missing current frame. This is a serious defect, please inform OD." );
return sal_False;
}
- // <--
pFly = GetCurrFrm()->FindFlyFrm();
if ( !pFly )
{
- ASSERT( !this, "GetFlyFrmAttr, no Fly selected." );
+ OSL_ENSURE( !this, "GetFlyFrmAttr, no Fly selected." );
return sal_False;
}
}
@@ -1102,7 +1056,6 @@ sal_Bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const
{
// OD 12.11.2003 #i22341# - content anchor of anchor item is needed.
// Thus, don't overwrite anchor item by default contructed anchor item.
- //rSet.Put( SwFmtAnchor( eType ) );
if ( FLY_AS_CHAR == eType )
{
rSet.ClearItem( RES_OPAQUE );
@@ -1111,7 +1064,7 @@ sal_Bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const
}
}
rSet.SetParent( pFly->GetFmt()->GetAttrSet().GetParent() );
- //JP 11.02.97: Bug #35894#: die Attribute MUESSEN entfern werden!
+ // die Attribute MUESSEN entfern werden!
rSet.ClearItem( RES_FILL_ORDER );
rSet.ClearItem( RES_CNTNT );
//MA: Ersteinmal entfernen (Template by example usw.)
@@ -1122,8 +1075,6 @@ sal_Bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const
#* Class : SwFEShell
#* Methode : SetFlyFrmAttr
#* Beschreibung: Die Attribute des aktuellen Flys aendern sich.
-#* Datum : MA 03. Nov. 92
-#* Update : MA 01. Aug. 95
#***********************************************************************/
sal_Bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet )
@@ -1136,9 +1087,9 @@ sal_Bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet )
SwFlyFrm *pFly = FindFlyFrm();
if( !pFly )
{
- ASSERT( GetCurrFrm(), "Crsr in parking zone" );
+ OSL_ENSURE( GetCurrFrm(), "Crsr in parking zone" );
pFly = GetCurrFrm()->FindFlyFrm();
- ASSERT( pFly, "SetFlyFrmAttr, no Fly selected." );
+ OSL_ENSURE( pFly, "SetFlyFrmAttr, no Fly selected." );
}
if( pFly )
{
@@ -1164,9 +1115,7 @@ sal_Bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet )
}
return bRet;
}
-/*-- 30.03.2004 15:05:07---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet )
{
sal_Bool bRet = sal_False;
@@ -1212,8 +1161,6 @@ sal_Bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet )
#* Methode : ResetFlyFrmAttr
#* Beschreibung: Das gewuenschte Attribut oder die im Set befindlichen
#* werden zurueckgesetzt.
-#* Datum : MA 14. Mar. 97
-#* Update : MA 14. Mar. 97
#***********************************************************************/
sal_Bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet )
@@ -1227,9 +1174,9 @@ sal_Bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet )
SwFlyFrm *pFly = FindFlyFrm();
if( !pFly )
{
- ASSERT( GetCurrFrm(), "Crsr in parking zone" );
+ OSL_ENSURE( GetCurrFrm(), "Crsr in parking zone" );
pFly = GetCurrFrm()->FindFlyFrm();
- ASSERT( pFly, "SetFlyFrmAttr, no Fly selected." );
+ OSL_ENSURE( pFly, "SetFlyFrmAttr, no Fly selected." );
}
if( pFly )
@@ -1264,8 +1211,6 @@ sal_Bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet )
#* Class : SwFEShell
#* Methode : GetCurFrmFmt
#* Beschreibung: liefert wenn Rahmen, dann Rahmenvorlage, sonst 0
-#* Datum : ST 04. Jun. 93
-#* Update :
#***********************************************************************/
SwFrmFmt* SwFEShell::GetCurFrmFmt() const
@@ -1281,8 +1226,6 @@ SwFrmFmt* SwFEShell::GetCurFrmFmt() const
/******************************************************************************
* Methode : void SwFEShell::SetFrmFmt(SwFrmFmt *pNewFmt)
* Beschreibung:
- * Erstellt : OK 14.04.94 15:40
- * Aenderung : MA 23. Apr. 97
******************************************************************************/
void SwFEShell::SetFrmFmt( SwFrmFmt *pNewFmt, sal_Bool bKeepOrient, Point* pDocPos )
@@ -1297,7 +1240,7 @@ void SwFEShell::SetFrmFmt( SwFrmFmt *pNewFmt, sal_Bool bKeepOrient, Point* pDocP
}
else
pFly = FindFlyFrm();
- ASSERT( pFly, "SetFrmFmt: kein Frame" );
+ OSL_ENSURE( pFly, "SetFrmFmt: kein Frame" );
if( pFly )
{
StartAllAction();
@@ -1335,9 +1278,6 @@ void SwFEShell::SetFrmFmt( SwFrmFmt *pNewFmt, sal_Bool bKeepOrient, Point* pDocP
|*
|* SwFEShell::GetFlyFrmFmt()
|*
-|* Ersterstellung OK 23.06.93 13:15
-|* Letzte Aenderung OK 23.06.93 13:15
-|*
*************************************************************************/
const SwFrmFmt* SwFEShell::GetFlyFrmFmt() const
@@ -1370,9 +1310,6 @@ SwFrmFmt* SwFEShell::GetFlyFrmFmt()
|*
|* SwFEShell::GetFlyRect()
|*
-|* Ersterstellung AMA 6. Mae. 97
-|* Letzte Aenderung AMA 6. Mae. 97
-|*
*************************************************************************/
SwRect SwFEShell::GetFlyRect() const
@@ -1392,9 +1329,6 @@ SwRect SwFEShell::GetFlyRect() const
|*
|* SwFEShell::GetObjRect()
|*
-|* Ersterstellung MA 22. Aug. 93
-|* Letzte Aenderung MA 11. Jan. 95
-|*
*************************************************************************/
SwRect SwFEShell::GetObjRect() const
@@ -1420,8 +1354,6 @@ void SwFEShell::SetObjRect( const SwRect& rRect )
/***********************************************************************
#* Class : SwFEShell
#* Methode : RequestObjectResize()
-#* Datum : MA 10. Feb. 95
-#* Update : MA 13. Jul. 95
#***********************************************************************/
Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < embed::XEmbeddedObject >& xObj )
@@ -1505,9 +1437,9 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
aResult = pFly->ChgSize( aSz );
//Wenn sich das Objekt aendert ist die Kontur hoechstwahrscheinlich daneben.
- ASSERT( pFly->Lower()->IsNoTxtFrm(), "Request ohne NoTxt" );
+ OSL_ENSURE( pFly->Lower()->IsNoTxtFrm(), "Request ohne NoTxt" );
SwNoTxtNode *pNd = ((SwCntntFrm*)pFly->Lower())->GetNode()->GetNoTxtNode();
- ASSERT( pNd, "Request ohne Node" );
+ OSL_ENSURE( pNd, "Request ohne Node" );
pNd->SetContour( 0 );
ClrContourCache();
}
@@ -1540,7 +1472,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
}
SwFlyFrmFmt *pFlyFrmFmt = pFly->GetFmt();
- ASSERT( pFlyFrmFmt, "fly frame format missing!" );
+ OSL_ENSURE( pFlyFrmFmt, "fly frame format missing!" );
if ( pFlyFrmFmt )
pFlyFrmFmt->SetLastFlyFrmPrtRectPos( pFly->Prt().Pos() ); //stores the value of last Prt rect
@@ -1553,8 +1485,6 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
/***********************************************************************
#* Class : SwFEShell
#* Methode : WizzardFindCurFrmFmt
-#* Datum : JP 31.07.95
-#* Update : JP 31.07.95
#***********************************************************************/
SwFrmFmt* SwFEShell::WizzardGetFly()
@@ -1594,7 +1524,7 @@ void SwFEShell::SetFlyName( const String& rName )
if( pFly )
GetDoc()->SetFlyName( *(SwFlyFrmFmt*)pFly->GetFmt(), rName );
else {
- ASSERT( !this, "kein FlyFrame selektiert" )
+ OSL_ENSURE( !this, "kein FlyFrame selektiert" );
}
}
@@ -1604,7 +1534,7 @@ const String& SwFEShell::GetFlyName() const
if( pFly )
return pFly->GetFmt()->GetName();
- ASSERT( !this, "kein FlyFrame selektiert" )
+ OSL_ENSURE( !this, "kein FlyFrame selektiert" );
return aEmptyStr;
}
@@ -1790,7 +1720,7 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj ) const
{
ObjCntType eType = OBJCNT_NONE;
- // OD 23.06.2003 #108784# - investigate 'master' drawing object, if method
+ // investigate 'master' drawing object, if method
// is called for a 'virtual' drawing object.
const SdrObject* pInvestigatedObj;
if ( rObj.ISA(SwDrawVirtObj) )
@@ -1811,7 +1741,7 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj ) const
if( xModel.is() )
{
uno::Any aVal;
- OUString sName = OUString::createFromAscii("ButtonType");
+ OUString sName(RTL_CONSTASCII_USTRINGPARAM("ButtonType"));
uno::Reference< beans::XPropertySet > xSet(xModel, uno::UNO_QUERY);
uno::Reference< beans::XPropertySetInfo > xInfo = xSet->getPropertySetInfo();
@@ -1842,7 +1772,7 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj ) const
SwDrawContact* pDrawContact( dynamic_cast<SwDrawContact*>(GetUserCall( pInvestigatedObj ) ) );
if ( !pDrawContact )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwFEShell::GetObjCntType(..)> - missing draw contact object" );
eType = OBJCNT_NONE;
}
@@ -1851,7 +1781,7 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj ) const
SwFrmFmt* pFrmFmt( pDrawContact->GetFmt() );
if ( !pFrmFmt )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwFEShell::GetObjCntType(..)> - missing frame format" );
eType = OBJCNT_NONE;
}
@@ -1966,11 +1896,6 @@ sal_Bool SwFEShell::ReplaceSdrObj( const String& rGrfName, const String& rFltNam
pFmt = GetDoc()->Insert( *GetCrsr(), rGrfName, rFltName, pGrf, &aFrmSet, NULL, NULL );
- // die Ordnungsnummer (Z-Order) noch uebertragen
- // JP 04.07.98: klappt aber nicht richtig!
- //SdrObject* pNewObj = ::FindSdrObject( pFmt );
- //pNewObj->SetOrdNum( nOrdNum );
-
EndUndo();
EndAllAction();
bRet = sal_True;
@@ -1980,7 +1905,7 @@ sal_Bool SwFEShell::ReplaceSdrObj( const String& rGrfName, const String& rFltNam
static sal_uInt16 SwFmtGetPageNum(const SwFlyFrmFmt * pFmt)
{
- ASSERT(pFmt != NULL, "invalid argument");
+ OSL_ENSURE(pFmt != NULL, "invalid argument");
SwFlyFrm * pFrm = pFmt->GetFrm();
@@ -2196,7 +2121,7 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO
#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" );
+ OSL_ENSURE( bStarMath, "AlignFormulaToBaseline should only be called for Math objects" );
if ( !bStarMath )
return;
@@ -2204,7 +2129,7 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO
if (!pFly)
pFly = FindFlyFrm( xObj );
- ASSERT( pFly , "No fly frame!" );
+ OSL_ENSURE( pFly , "No fly frame!" );
SwFrmFmt * pFrmFmt = pFly ? pFly->GetFmt() : 0;
// baseline to baseline alignment should only be applied to formulas anchored as char
@@ -2223,7 +2148,7 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO
}
catch ( uno::Exception& )
{
- ASSERT( sal_False , "Baseline could not be retrieved from Starmath!" );
+ OSL_ENSURE( sal_False , "Baseline could not be retrieved from Starmath!" );
}
}
}
@@ -2233,10 +2158,10 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO
const MapMode aTargetMapMode( MAP_TWIP );
nBaseline = OutputDevice::LogicToLogic( nBaseline, aSourceMapMode.GetMapUnit(), aTargetMapMode.GetMapUnit() );
- ASSERT( nBaseline > 0, "Wrong value of Baseline while retrieving from Starmath!" );
+ OSL_ENSURE( 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!" );
+ OSL_ENSURE( pFlyFrmFmt, "fly frame format missing!" );
if ( pFlyFrmFmt )
nBaseline += pFlyFrmFmt->GetLastFlyFrmPrtRectPos().Y();
@@ -2279,3 +2204,5 @@ void SwFEShell::AlignAllFormulasToBaseline()
EndAllAction();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/frmedt/feflyole.cxx b/sw/source/core/frmedt/feflyole.cxx
index 96373fffb57b..43df3c04d3a4 100644
--- a/sw/source/core/frmedt/feflyole.cxx
+++ b/sw/source/core/frmedt/feflyole.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include "precompiled_sw.hxx"
#include <com/sun/star/embed/EmbedStates.hpp>
-#ifndef _SFX_CLIENTSH_HXX
#include <sfx2/ipclient.hxx>
-#endif
#include <sfx2/viewsh.hxx>
#include <sfx2/app.hxx>
#include <unotools/moduleoptions.hxx>
@@ -88,7 +87,8 @@ SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject >
nSttIdx = pStNd->EndOfSectionIndex() + 1;
}
- ASSERT( bExist, "OLE-Object unknown and FlyFrm not found." );
+ OSL_ENSURE( bExist, "OLE-Object unknown and FlyFrm not found." );
+ (void)bExist;
}
return pFly;
}
@@ -148,3 +148,4 @@ sal_Bool SwFEShell::FinishOLEObj() // Server wird beendet
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index d32db01ee73e..0a9522813c85 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,11 +88,8 @@
#include "txtfrm.hxx"
#include "txatbase.hxx"
#include "mdiexp.hxx" // fuer Update der Statuszeile bei drag
-// OD 2004-05-24 #i28701#
-#include <sortedobjs.hxx>
-// --> OD 2006-03-06 #125892#
+#include <sortedobjs.hxx> // #i28701#
#include <HandleAnchorNodeChg.hxx>
-// <--
#include <basegfx/polygon/b2dpolygon.hxx>
#define SCROLLVAL 75
@@ -132,8 +130,7 @@ extern sal_Bool bNoInterrupt; // in swapp.cxx
}
else if( !pFlyFmt || RES_DRAWFRMFMT == pFlyFmt->Which() )
{
- // --> OD 2007-07-25 #136039#
- // assure consistent cursor
+ // --> assure consistent cursor
pSh->KillPams();
pSh->ClearMark();
// <--
@@ -145,9 +142,6 @@ extern sal_Bool bNoInterrupt; // in swapp.cxx
|*
|* SwFEShell::SelectObj()
|*
-|* Ersterstellung MA 16. Nov. 92
-|* Letzte Aenderung MA 22. Oct. 96
-|*
*************************************************************************/
sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj )
@@ -215,7 +209,7 @@ sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pOb
if ( pObj )
{
- ASSERT( !bEnterGroup, "SW_ENTER_GROUP is not supported" );
+ OSL_ENSURE( !bEnterGroup, "SW_ENTER_GROUP is not supported" );
pDView->MarkObj( pObj, Imp()->GetPageView() );
}
else
@@ -248,7 +242,7 @@ sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pOb
if ( GetCntType() & CNT_GRF )
{
const SwFlyFrm *pTmp = GetFlyFromMarked( &rMrkList, this );
- ASSERT( pTmp, "Graphic without Fly" );
+ OSL_ENSURE( pTmp, "Graphic without Fly" );
if ( ((SwNoTxtFrm*)pTmp->Lower())->HasAnimation() )
((SwNoTxtFrm*)pTmp->Lower())->StopAnimation( GetOut() );
}
@@ -270,9 +264,6 @@ sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pOb
|*
|* sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir )
|*
-|* Created AMA 05/28/2002
-|* Last modify AMA 05/30/2002
-|*
|* Description: MoveAnchor( nDir ) looked for an another Anchor for
|* the selected drawing object (or fly frame) in the given direction.
|* An object "as character" doesn't moves anyway.
@@ -345,7 +336,7 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir )
switch ( nAnchorId ) {
case FLY_AT_PAGE:
{
- ASSERT( pOld->IsPageFrm(), "Wrong anchor, page exspected." );
+ OSL_ENSURE( pOld->IsPageFrm(), "Wrong anchor, page exspected." );
if( SW_MOVE_UP == nDir )
pNew = pOld->GetPrev();
else if( SW_MOVE_DOWN == nDir )
@@ -359,7 +350,7 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir )
}
case FLY_AT_CHAR:
{
- ASSERT( pOld->IsCntntFrm(), "Wrong anchor, page exspected." );
+ OSL_ENSURE( pOld->IsCntntFrm(), "Wrong anchor, page exspected." );
if( SW_MOVE_LEFT == nDir || SW_MOVE_RIGHT == nDir )
{
SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor();
@@ -393,7 +384,7 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir )
} // no break!
case FLY_AT_PARA:
{
- ASSERT( pOld->IsCntntFrm(), "Wrong anchor, page exspected." );
+ OSL_ENSURE( pOld->IsCntntFrm(), "Wrong anchor, page exspected." );
if( SW_MOVE_UP == nDir )
pNew = pOld->FindPrev();
else if( SW_MOVE_DOWN == nDir )
@@ -419,9 +410,9 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir )
}
case FLY_AT_FLY:
{
- ASSERT( pOld->IsFlyFrm(), "Wrong anchor, fly frame exspected.");
+ OSL_ENSURE( pOld->IsFlyFrm(), "Wrong anchor, fly frame exspected.");
SwPageFrm* pPage = pOld->FindPageFrm();
- ASSERT( pPage, "Where's my page?" );
+ OSL_ENSURE( pPage, "Where's my page?" );
SwFlyFrm* pNewFly = NULL;
if( pPage->GetSortedObjs() )
{
@@ -510,8 +501,7 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir )
if( bRet )
{
StartAllAction();
- // --> OD 2006-02-28 #125892#
- // handle change of anchor node:
+ // --> handle change of anchor node:
// if count of the anchor frame also change, the fly frames have to be
// re-created. Thus, delete all fly frames except the <this> before the
// anchor attribute is change and re-create them afterwards.
@@ -544,9 +534,6 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir )
|*
|* SwFEShell::GetSelFrmType()
|*
-|* Ersterstellung MA 12. Jan. 93
-|* Letzte Aenderung JP 19.03.96
-|*
*************************************************************************/
const SdrMarkList* SwFEShell::_GetMarkList() const
@@ -578,7 +565,7 @@ sal_uInt16 SwFEShell::GetSelFrmType() const
eType = FRMTYPE_FLY_ATCNT;
else
{
- ASSERT( pFly->IsFlyInCntFrm(), "Neuer Rahmentyp?" );
+ OSL_ENSURE( pFly->IsFlyInCntFrm(), "Neuer Rahmentyp?" );
eType = FRMTYPE_FLY_INCNT;
}
}
@@ -589,7 +576,7 @@ sal_uInt16 SwFEShell::GetSelFrmType() const
return eType;
}
-// #108784# does the draw selection contain a control?
+// does the draw selection contain a control?
bool SwFEShell::IsSelContainsControl() const
{
bool bRet = false;
@@ -611,9 +598,6 @@ bool SwFEShell::IsSelContainsControl() const
|*
|* SwFEShell::Scroll()
|*
-|* Ersterstellung MA 20. Dec. 94
-|* Letzte Aenderung MA 27. Jul. 95
-|*
*************************************************************************/
void SwFEShell::ScrollTo( const Point &rPt )
@@ -623,7 +607,6 @@ void SwFEShell::ScrollTo( const Point &rPt )
(!Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() ||
Imp()->IsDragPossible( rPt )) )
{
- //SwSaveHdl aSave( Imp() );
ScrollMDI( this, aRect, SCROLLVAL, SCROLLVAL );
}
}
@@ -632,9 +615,6 @@ void SwFEShell::ScrollTo( const Point &rPt )
|*
|* SwFEShell::SetDragMode()
|*
-|* Ersterstellung MA 30. Jan. 95
-|* Letzte Aenderung MA 30. Jan. 95
-|*
*************************************************************************/
void SwFEShell::SetDragMode( sal_uInt16 eDragMode )
@@ -647,9 +627,6 @@ void SwFEShell::SetDragMode( sal_uInt16 eDragMode )
|*
|* SwFEShell::BeginDrag()
|*
-|* Ersterstellung MS 10.06.92
-|* Letzte Aenderung MA 13. Mar. 96
-|*
*************************************************************************/
long SwFEShell::BeginDrag( const Point* pPt, sal_Bool )
@@ -659,7 +636,7 @@ long SwFEShell::BeginDrag( const Point* pPt, sal_Bool )
{
delete pChainFrom; delete pChainTo; pChainFrom = pChainTo = 0;
SdrHdl* pHdl = pView->PickHandle( *pPt );
- pView->BegDragObj( *pPt, 0 /*GetWin()*/, pHdl );
+ pView->BegDragObj( *pPt, 0, pHdl );
::FrameNotify( this, FLY_DRAG );
return 1;
}
@@ -669,14 +646,11 @@ long SwFEShell::BeginDrag( const Point* pPt, sal_Bool )
|*
|* SwFEShell::Drag()
|*
-|* Ersterstellung MS 10.06.92
-|* Letzte Aenderung MA 13. Mar. 96
-|*
*************************************************************************/
long SwFEShell::Drag( const Point *pPt, sal_Bool )
{
- ASSERT( Imp()->HasDrawView(), "Drag without DrawView?" );
+ OSL_ENSURE( Imp()->HasDrawView(), "Drag without DrawView?" );
if ( Imp()->GetDrawView()->IsDragObj() )
{
ScrollTo( *pPt );
@@ -692,14 +666,11 @@ long SwFEShell::Drag( const Point *pPt, sal_Bool )
|*
|* SwFEShell::EndDrag()
|*
-|* Ersterstellung MS 10.06.92
-|* Letzte Aenderung MA 13. Mar. 96
-|*
*************************************************************************/
long SwFEShell::EndDrag( const Point *, sal_Bool )
{
- ASSERT( Imp()->HasDrawView(), "EndDrag without DrawView?" );
+ OSL_ENSURE( Imp()->HasDrawView(), "EndDrag without DrawView?" );
SdrView *pView = Imp()->GetDrawView();
if ( pView->IsDragObj() )
{
@@ -745,14 +716,11 @@ long SwFEShell::EndDrag( const Point *, sal_Bool )
|*
|* SwFEShell::BreakDrag()
|*
-|* Ersterstellung OM 02. Okt. 95
-|* Letzte Aenderung OM 02. Okt. 95
-|*
*************************************************************************/
void SwFEShell::BreakDrag()
{
- ASSERT( Imp()->HasDrawView(), "BreakDrag without DrawView?" );
+ OSL_ENSURE( Imp()->HasDrawView(), "BreakDrag without DrawView?" );
if ( Imp()->GetDrawView()->IsDragObj() )
Imp()->GetDrawView()->BrkDragObj();
SetChainMarker();
@@ -764,8 +732,6 @@ void SwFEShell::BreakDrag()
|*
|* Beschreibung Wenn ein Fly selektiert ist, zieht er den Crsr in
|* den ersten CntntFrm
-|* Ersterstellung MA 11. Dec. 92
-|* Letzte Aenderung MA 07. Oct. 96
|*
*************************************************************************/
@@ -778,14 +744,11 @@ const SwFrmFmt* SwFEShell::SelFlyGrabCrsr()
if( pFly )
{
- // --> OD 2004-06-11 #i28701# - no format here
-// pFly->GetAnchorFrm()->Calc();
SwCntntFrm *pCFrm = pFly->ContainsCntnt();
if ( pCFrm )
{
SwCntntNode *pCNode = pCFrm->GetNode();
- // --> OD 2007-07-25 #126039#
- // assure, that the cursor is consistent.
+ // --> assure, that the cursor is consistent.
KillPams();
ClearMark();
// <--
@@ -812,9 +775,6 @@ const SwFrmFmt* SwFEShell::SelFlyGrabCrsr()
|*
|* Beschreibung Selektion nach oben/unten (Z-Order)
|*
-|* Ersterstellung MA 05. Nov. 92
-|* Letzte Aenderung MA 03. Jun. 96
-|*
*************************************************************************/
void lcl_NotifyNeighbours( const SdrMarkList *pLst )
@@ -900,9 +860,9 @@ void lcl_NotifyNeighbours( const SdrMarkList *pLst )
void SwFEShell::SelectionToTop( sal_Bool bTop )
{
- ASSERT( Imp()->HasDrawView(), "SelectionToTop without DrawView?" );
+ OSL_ENSURE( Imp()->HasDrawView(), "SelectionToTop without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- ASSERT( rMrkList.GetMarkCount(), "Kein Object Selektiert." );
+ OSL_ENSURE( rMrkList.GetMarkCount(), "Kein Object Selektiert." );
SwFlyFrm *pFly = ::GetFlyFromMarked( &rMrkList, this );
if ( pFly && pFly->IsFlyInCntFrm() )
@@ -920,9 +880,9 @@ void SwFEShell::SelectionToTop( sal_Bool bTop )
void SwFEShell::SelectionToBottom( sal_Bool bBottom )
{
- ASSERT( Imp()->HasDrawView(), "SelectionToBottom without DrawView?" );
+ OSL_ENSURE( Imp()->HasDrawView(), "SelectionToBottom without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- ASSERT( rMrkList.GetMarkCount(), "Kein Object Selektiert." );
+ OSL_ENSURE( rMrkList.GetMarkCount(), "Kein Object Selektiert." );
SwFlyFrm *pFly = ::GetFlyFromMarked( &rMrkList, this );
if ( pFly && pFly->IsFlyInCntFrm() )
@@ -944,8 +904,6 @@ void SwFEShell::SelectionToBottom( sal_Bool bBottom )
|*
|* Beschreibung Objekt ueber/unter dem Dokument?
|* 2 Controls, 1 Heaven, 0 Hell, -1 Uneindeutig
-|* Ersterstellung MA 20. Dec. 94
-|* Letzte Aenderung MA 20. Dec. 94
|*
*************************************************************************/
@@ -977,11 +935,8 @@ short SwFEShell::GetLayerId() const
|* SwFEShell::SelectionToHeaven(), SelectionToHell()
|*
|* Beschreibung Objekt ueber/unter dem Dokument
-|* Ersterstellung MA 20. Dec. 94
-|* Letzte Aenderung AMA 04. Jun. 98
|*
*************************************************************************/
-// OD 25.06.2003 #108784#
// Note: only visible objects can be marked. Thus, objects with invisible
// layer IDs have not to be considered.
// If <SwFEShell> exists, layout exists!!
@@ -991,16 +946,16 @@ void SwFEShell::ChangeOpaque( SdrLayerID nLayerId )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
const IDocumentDrawModelAccess* pIDDMA = getIDocumentDrawModelAccess();
- // OD 25.06.2003 #108784# - correct type of <nControls>
+ // correct type of <nControls>
for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
- // OD 21.08.2003 #i18447# - no change of layer for controls
+ // #i18447# - no change of layer for controls
// or group objects containing controls.
- // --> OD 2010-09-14 #i113730#
+ // --> #i113730#
// consider that a member of a drawing group has been selected.
const SwContact* pContact = ::GetUserCall( pObj );
- ASSERT( pContact && pContact->GetMaster(), "<SwFEShell::ChangeOpaque(..)> - missing contact or missing master object at contact!" );
+ OSL_ENSURE( pContact && pContact->GetMaster(), "<SwFEShell::ChangeOpaque(..)> - missing contact or missing master object at contact!" );
const bool bControlObj = ( pContact && pContact->GetMaster() )
? ::CheckControlLayer( pContact->GetMaster() )
: ::CheckControlLayer( pObj );
@@ -1036,9 +991,6 @@ void SwFEShell::SelectionToHell()
|*
|* SwFEShell::IsObjSelected(), IsFrmSelected()
|*
-|* Ersterstellung MA 16. Nov. 92
-|* Letzte Aenderung MA 17. Jan. 95
-|*
*************************************************************************/
sal_uInt16 SwFEShell::IsObjSelected() const
@@ -1071,9 +1023,6 @@ sal_Bool SwFEShell::IsObjSelected( const SdrObject& rObj ) const
|*
|* SwFEShell::EndTextEdit()
|*
-|* Ersterstellung MA 19. Feb. 96
-|* Letzte Aenderung MA 19. Feb. 96
-|*
*************************************************************************/
void SwFEShell::EndTextEdit()
@@ -1082,7 +1031,7 @@ void SwFEShell::EndTextEdit()
//keinen Text mehr enthaelt und keine Attribute traegt) wird das
//Objekt gel�scht. Alle anderen markierten Objekte bleiben erhalten.
- ASSERT( Imp()->HasDrawView() && Imp()->GetDrawView()->IsTextEdit(),
+ OSL_ENSURE( Imp()->HasDrawView() && Imp()->GetDrawView()->IsTextEdit(),
"EndTextEdit an no Object" );
StartAllAction();
@@ -1132,9 +1081,6 @@ void SwFEShell::EndTextEdit()
|*
|* SwFEShell::IsInsideSelectedObj()
|*
-|* Ersterstellung MA 16. Nov. 92
-|* Letzte Aenderung MA 08. Nov. 96
-|*
*************************************************************************/
int SwFEShell::IsInsideSelectedObj( const Point &rPt )
@@ -1156,19 +1102,11 @@ int SwFEShell::IsInsideSelectedObj( const Point &rPt )
|*
|* SwFEShell::IsObjSelectable()
|*
-|* Ersterstellung MA 16. Nov. 92
-|* Letzte Aenderung MA 02. Feb. 95
-|*
*************************************************************************/
bool SwFEShell::IsObjSelectable( const Point& rPt )
{
SET_CURR_SHELL(this);
-#ifdef OLD
- if( Imp()->HasDrawView() )
- return Imp()->GetDrawView()->PickSomething( rPt, MINMOVE );
- return 0;
-#else
SwDrawView *pDView = Imp()->GetDrawView();
bool bRet = false;
if( pDView )
@@ -1182,10 +1120,8 @@ bool SwFEShell::IsObjSelectable( const Point& rPt )
pDView->SetHitTolerancePixel( nOld );
}
return bRet;
-#endif
}
-// #107513#
// Test if there is a object at that position and if it should be selected.
sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt)
{
@@ -1290,11 +1226,9 @@ sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt)
|*
|* Beschreibung Wenn ein Obj selektiert ist, gehen wir von dessen
|* TopLeft aus, andernfalls von der Mitte des aktuellen CharRects.
-|* Ersterstellung MA 01. Jun. 95
-|* Letzte Aenderung MA 30. Apr. 96
|*
*************************************************************************/
-/* -----------------23.09.98 10:29-------------------
+/* --------------------------------------------------
* Beinhaltet das Objekt ein Control oder Gruppen,
* die nur aus Controls bestehen
* --------------------------------------------------*/
@@ -1399,7 +1333,7 @@ const SdrObject* SwFEShell::GetBestObject( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_
}
- ASSERT( pList, "No object list to iterate" )
+ OSL_ENSURE( pList, "No object list to iterate" );
SdrObjListIter aObjIter( *pList, bFlat ? IM_FLAT : IM_DEEPNOGROUPS );
while ( aObjIter.IsMore() )
@@ -1541,9 +1475,6 @@ sal_Bool SwFEShell::GotoObj( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType )
|*
|* SwFEShell::BeginCreate()
|*
-|* Ersterstellung MA 20. Dec. 94
-|* Letzte Aenderung MA 21. Mar. 95
-|*
*************************************************************************/
sal_Bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos )
@@ -1592,14 +1523,11 @@ sal_Bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sa
|*
|* SwFEShell::MoveCreate()
|*
-|* Ersterstellung MA 20. Dec. 94
-|* Letzte Aenderung MA 24. Jan. 95
-|*
*************************************************************************/
void SwFEShell::MoveCreate( const Point &rPos )
{
- ASSERT( Imp()->HasDrawView(), "MoveCreate without DrawView?" );
+ OSL_ENSURE( Imp()->HasDrawView(), "MoveCreate without DrawView?" );
if ( GetPageNumber( rPos ) )
{
ScrollTo( rPos );
@@ -1612,9 +1540,6 @@ void SwFEShell::MoveCreate( const Point &rPos )
|*
|* SwFEShell::EndCreate(), ImpEndCreate()
|*
-|* Ersterstellung MA 20. Dec. 94
-|* Letzte Aenderung MA 14. Oct. 96
-|*
*************************************************************************/
sal_Bool SwFEShell::EndCreate( sal_uInt16 eSdrCreateCmd )
@@ -1622,7 +1547,7 @@ sal_Bool SwFEShell::EndCreate( sal_uInt16 eSdrCreateCmd )
// JP 18.08.95: Damit das Undo-Object aus der DrawEngine nicht bei uns
// gespeichert wird, (wir erzeugen ein eigenes Undo-Object!) hier kurz
// das Undo abschalten
- ASSERT( Imp()->HasDrawView(), "EndCreate without DrawView?" );
+ OSL_ENSURE( Imp()->HasDrawView(), "EndCreate without DrawView?" );
if( !Imp()->GetDrawView()->IsGroupEntered() )
{
GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(false);
@@ -1648,7 +1573,7 @@ sal_Bool SwFEShell::EndCreate( sal_uInt16 eSdrCreateCmd )
sal_Bool SwFEShell::ImpEndCreate()
{
- ASSERT( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() == 1,
+ OSL_ENSURE( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() == 1,
"Neues Object nicht selektiert." );
SdrObject& rSdrObj = *Imp()->GetDrawView()->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
@@ -1731,7 +1656,7 @@ sal_Bool SwFEShell::ImpEndCreate()
if( !bCharBound )
{
- // OD 16.05.2003 #108784# - allow native drawing objects in header/footer.
+ // allow native drawing objects in header/footer.
// Thus, set <bBodyOnly> to <false> for these objects using value
// of <nIdent> - value <0xFFFF> indicates control objects, which aren't
// allowed in header/footer.
@@ -1827,7 +1752,7 @@ sal_Bool SwFEShell::ImpEndCreate()
SwTxtFrm* pTmp = (SwTxtFrm*)pAnch;
do {
pTmp = pTmp->FindMaster();
- ASSERT( pTmp, "Where's my Master?" );
+ OSL_ENSURE( pTmp, "Where's my Master?" );
// OD 2004-03-30 #i26791# - correction: add frame area height
// of master frames.
nYOffset += pTmp->IsVertical() ?
@@ -1920,7 +1845,7 @@ sal_Bool SwFEShell::ImpEndCreate()
SwTxtFrm* pTmp = (SwTxtFrm*)pAnch;
do {
pTmp = pTmp->FindMaster();
- ASSERT( pTmp, "Where's my Master?" );
+ OSL_ENSURE( pTmp, "Where's my Master?" );
nYOffset += pTmp->IsVertical() ?
pTmp->Prt().Width() : pTmp->Prt().Height();
} while ( pTmp->IsFollow() );
@@ -1942,7 +1867,7 @@ sal_Bool SwFEShell::ImpEndCreate()
// <--
if( bCharBound )
{
- ASSERT( aAnch.GetAnchorId() == FLY_AS_CHAR, "wrong AnchorType" );
+ OSL_ENSURE( aAnch.GetAnchorId() == FLY_AS_CHAR, "wrong AnchorType" );
SwTxtNode *pNd = aAnch.GetCntntAnchor()->nNode.GetNode().GetTxtNode();
SwFmtFlyCnt aFmt( pFmt );
pNd->InsertItem(aFmt,
@@ -1956,14 +1881,14 @@ sal_Bool SwFEShell::ImpEndCreate()
SwTxtFrm* pTmp = (SwTxtFrm*)pAnch;
do {
pTmp = pTmp->FindMaster();
- ASSERT( pTmp, "Where's my Master?" );
+ OSL_ENSURE( pTmp, "Where's my Master?" );
} while( pTmp->IsFollow() );
pAnch = pTmp;
}
pContact->ConnectToLayout();
- // OD 25.06.2003 #108784# - mark object at frame the object is inserted at.
+ // mark object at frame the object is inserted at.
{
SdrObject* pMarkObj = pContact->GetDrawObjectByAnchorFrm( *pAnch );
if ( pMarkObj )
@@ -1992,14 +1917,11 @@ sal_Bool SwFEShell::ImpEndCreate()
|*
|* SwFEShell::BreakCreate()
|*
-|* Ersterstellung MA 20. Dec. 94
-|* Letzte Aenderung MA 09. Jan. 95
-|*
*************************************************************************/
void SwFEShell::BreakCreate()
{
- ASSERT( Imp()->HasDrawView(), "BreakCreate without DrawView?" );
+ OSL_ENSURE( Imp()->HasDrawView(), "BreakCreate without DrawView?" );
Imp()->GetDrawView()->BrkCreateObj();
::FrameNotify( this, FLY_DRAG_END );
}
@@ -2008,9 +1930,6 @@ void SwFEShell::BreakCreate()
|*
|* SwFEShell::IsDrawCreate()
|*
-|* Ersterstellung OM 16. Mar. 95
-|* Letzte Aenderung OM 16. Mar. 95
-|*
*************************************************************************/
sal_Bool SwFEShell::IsDrawCreate() const
@@ -2022,9 +1941,6 @@ sal_Bool SwFEShell::IsDrawCreate() const
|*
|* SwFEShell::BeginMark()
|*
-|* Ersterstellung OM 07. Feb. 95
-|* Letzte Aenderung OM 07. Feb. 95
-|*
*************************************************************************/
sal_Bool SwFEShell::BeginMark( const Point &rPos )
@@ -2049,20 +1965,16 @@ sal_Bool SwFEShell::BeginMark( const Point &rPos )
|*
|* SwFEShell::MoveMark()
|*
-|* Ersterstellung OM 07. Feb. 95
-|* Letzte Aenderung OM 07. Feb. 95
-|*
*************************************************************************/
void SwFEShell::MoveMark( const Point &rPos )
{
- ASSERT( Imp()->HasDrawView(), "MoveMark without DrawView?" );
+ OSL_ENSURE( Imp()->HasDrawView(), "MoveMark without DrawView?" );
if ( GetPageNumber( rPos ) )
{
ScrollTo( rPos );
SwDrawView* pDView = Imp()->GetDrawView();
-// Imp()->GetDrawView()->MovMarkObj( rPos );
if (pDView->IsInsObjPoint())
pDView->MovInsObjPoint( rPos );
@@ -2077,15 +1989,12 @@ void SwFEShell::MoveMark( const Point &rPos )
|*
|* SwFEShell::EndMark()
|*
-|* Ersterstellung OM 07. Feb. 95
-|* Letzte Aenderung MA 08. Feb. 95
-|*
*************************************************************************/
sal_Bool SwFEShell::EndMark()
{
sal_Bool bRet = sal_False;
- ASSERT( Imp()->HasDrawView(), "EndMark without DrawView?" );
+ OSL_ENSURE( Imp()->HasDrawView(), "EndMark without DrawView?" );
if (Imp()->GetDrawView()->IsMarkObj())
{
@@ -2108,7 +2017,6 @@ sal_Bool SwFEShell::EndMark()
{
if ( !bShowHdl )
{
- //HMHpDView->HideMarkHdl();
bShowHdl = sal_True;
}
rMrkList.DeleteMark( i );
@@ -2120,7 +2028,6 @@ sal_Bool SwFEShell::EndMark()
{
pDView->MarkListHasChanged();
pDView->AdjustMarkHdl();
- //HMHpDView->ShowMarkHdl();
}
if ( rMrkList.GetMarkCount() )
@@ -2145,14 +2052,11 @@ sal_Bool SwFEShell::EndMark()
|*
|* SwFEShell::BreakSelect()
|*
-|* Ersterstellung OM 07. Feb. 95
-|* Letzte Aenderung OM 07. Feb. 95
-|*
*************************************************************************/
void SwFEShell::BreakMark()
{
- ASSERT( Imp()->HasDrawView(), "BreakMark without DrawView?" );
+ OSL_ENSURE( Imp()->HasDrawView(), "BreakMark without DrawView?" );
Imp()->GetDrawView()->BrkMarkObj();
}
@@ -2160,9 +2064,6 @@ void SwFEShell::BreakMark()
|*
|* SwFEShell::GetAnchorId()
|*
-|* Ersterstellung MA 30. Jan. 95
-|* Letzte Aenderung MA 30. Jan. 95
-|*
*************************************************************************/
short SwFEShell::GetAnchorId() const
@@ -2199,14 +2100,11 @@ short SwFEShell::GetAnchorId() const
|*
|* SwFEShell::ChgAnchor()
|*
-|* Ersterstellung MA 10. Jan. 95
-|* Letzte Aenderung MA 30. May. 96
-|*
*************************************************************************/
void SwFEShell::ChgAnchor( int eAnchorId, sal_Bool bSameOnly, sal_Bool bPosCorr )
{
- ASSERT( Imp()->HasDrawView(), "ChgAnchor without DrawView?" );
+ OSL_ENSURE( Imp()->HasDrawView(), "ChgAnchor without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
if( rMrkList.GetMarkCount() &&
!rMrkList.GetMark( 0 )->GetMarkedSdrObj()->GetUpGroup() )
@@ -2226,14 +2124,11 @@ void SwFEShell::ChgAnchor( int eAnchorId, sal_Bool bSameOnly, sal_Bool bPosCorr
|*
|* SwFEShell::DelSelectedObj()
|*
-|* Ersterstellung MA 03. Nov. 92
-|* Letzte Aenderung MA 14. Nov. 95
-|*
*************************************************************************/
void SwFEShell::DelSelectedObj()
{
- ASSERT( Imp()->HasDrawView(), "DelSelectedObj(), no DrawView available" );
+ OSL_ENSURE( Imp()->HasDrawView(), "DelSelectedObj(), no DrawView available" );
if ( Imp()->HasDrawView() )
{
StartAllAction();
@@ -2249,8 +2144,6 @@ void SwFEShell::DelSelectedObj()
|*
|* Beschreibung Fuer die Statuszeile zum Erfragen der aktuellen
|* Verhaeltnisse
-|* Ersterstellung MA 25. Apr. 95
-|* Letzte Aenderung MA 25. Apr. 95
|*
*************************************************************************/
@@ -2270,7 +2163,7 @@ Size SwFEShell::GetObjSize() const
Point SwFEShell::GetAnchorObjDiff() const
{
const SdrView *pView = Imp()->GetDrawView();
- ASSERT( pView, "GetAnchorObjDiff without DrawView?" );
+ OSL_ENSURE( pView, "GetAnchorObjDiff without DrawView?" );
Rectangle aRect;
if ( Imp()->GetDrawView()->IsAction() )
@@ -2298,7 +2191,7 @@ Point SwFEShell::GetAnchorObjDiff() const
Point SwFEShell::GetObjAbsPos() const
{
- ASSERT( Imp()->GetDrawView(), "GetObjAbsPos() without DrawView?" );
+ OSL_ENSURE( Imp()->GetDrawView(), "GetObjAbsPos() without DrawView?" );
return Imp()->GetDrawView()->GetDragStat().GetActionRect().TopLeft();
}
@@ -2308,9 +2201,6 @@ Point SwFEShell::GetObjAbsPos() const
|*
|* SwFEShell::IsGroupSelected()
|*
-|* Ersterstellung MA 30. Jan. 95
-|* Letzte Aenderung MA 30. May. 96
-|*
*************************************************************************/
sal_Bool SwFEShell::IsGroupSelected()
@@ -2321,10 +2211,10 @@ sal_Bool SwFEShell::IsGroupSelected()
for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
- // OD 30.06.2003 #108784# - consider 'virtual' drawing objects.
+ // consider 'virtual' drawing objects.
// Thus, use corresponding method instead of checking type.
if ( pObj->IsGroupObject() &&
- // --> FME 2004-12-08 #i38505# No ungroup allowed for 3d objects
+ // --> #i38505# No ungroup allowed for 3d objects
!pObj->Is3DObj() &&
// <--
FLY_AS_CHAR != ((SwDrawContact*)GetUserCall(pObj))->
@@ -2337,8 +2227,8 @@ sal_Bool SwFEShell::IsGroupSelected()
return sal_False;
}
-// OD 27.06.2003 #108784# - change return type.
-// OD 27.06.2003 #108784# - adjustments for drawing objects in header/footer:
+// Change return type.
+// Adjustments for drawing objects in header/footer:
// allow group, only if all selected objects are in the same header/footer
// or not in header/footer.
bool SwFEShell::IsGroupAllowed() const
@@ -2363,7 +2253,7 @@ bool SwFEShell::IsGroupAllowed() const
SwFrmFmt* pFrmFmt( ::FindFrmFmt( const_cast<SdrObject*>(pObj) ) );
if ( !pFrmFmt )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwFEShell::IsGroupAllowed()> - missing frame format" );
bIsGroupAllowed = false;
}
@@ -2373,7 +2263,7 @@ bool SwFEShell::IsGroupAllowed() const
}
}
- // OD 27.06.2003 #108784# - check, if all selected objects are in the
+ // check, if all selected objects are in the
// same header/footer or not in header/footer.
if ( bIsGroupAllowed )
{
@@ -2421,8 +2311,6 @@ bool SwFEShell::IsGroupAllowed() const
|*
|* Beschreibung Die Gruppe bekommt den Anker und das Contactobjekt
|* des ersten in der Selektion
-|* Ersterstellung MA 30. Jan. 95
-|* Letzte Aenderung MA 23. Apr. 95
|*
*************************************************************************/
@@ -2446,8 +2334,6 @@ void SwFEShell::GroupSelection()
|*
|* Beschreibung Die Einzelobjekte bekommen eine Kopie vom Anker und
|* Contactobjekt der Gruppe.
-|* Ersterstellung MA 30. Jan. 95
-|* Letzte Aenderung MA 01. Feb. 95
|*
*************************************************************************/
@@ -2469,9 +2355,6 @@ void SwFEShell::UnGroupSelection()
|*
|* SwFEShell::MirrorSelection()
|*
-|* Ersterstellung MA 06. Aug. 95
-|* Letzte Aenderung MA 06. Aug. 95
-|*
*************************************************************************/
void SwFEShell::MirrorSelection( sal_Bool bHorizontal )
@@ -2491,7 +2374,7 @@ void SwFEShell::MirrorSelection( sal_Bool bHorizontal )
sal_Bool SwFEShell::GotoFly( const String& rName, FlyCntType eType, sal_Bool bSelFrm )
{
sal_Bool bRet = sal_False;
-static sal_uInt8 __READONLY_DATA aChkArr[ 4 ] = {
+ static sal_uInt8 const aChkArr[ 4 ] = {
/* FLYCNTTYPE_ALL */ 0,
/* FLYCNTTYPE_FRM */ ND_TEXTNODE,
/* FLYCNTTYPE_GRF */ ND_GRFNODE,
@@ -2507,7 +2390,7 @@ static sal_uInt8 __READONLY_DATA aChkArr[ 4 ] = {
SwFlyFrm* pFrm = (SwFlyFrm*)aIter.First( TYPE( SwFlyFrm ));
if( pFrm )
{
- ASSERT( pFrm->IsFlyFrm(), "Wrong FrmType" );
+ OSL_ENSURE( pFrm->IsFlyFrm(), "Wrong FrmType" );
if( bSelFrm )
{
SelectObj( pFrm->Frm().Pos(), 0, ((SwFlyFrm*)pFrm)->GetVirtDrawObj() );
@@ -2516,8 +2399,6 @@ static sal_uInt8 __READONLY_DATA aChkArr[ 4 ] = {
}
else
{
- // --> OD 2004-06-11 #i28701# - no format here
-// pFrm->GetAnchorFrm()->Calc();
SwCntntFrm *pCFrm = pFrm->ContainsCntnt();
if ( pCFrm )
{
@@ -2638,8 +2519,8 @@ sal_Bool SwFEShell::GetObjAttr( SfxItemSet &rSet ) const
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
- // --> OD 2007-07-24 #143008# - make code robust
- ASSERT( pContact, "<SwFEShell::GetObjAttr(..)> - missing <pContact> - please inform OD." );
+ // --> make code robust
+ OSL_ENSURE( pContact, "<SwFEShell::GetObjAttr(..)> - missing <pContact> - please inform OD." );
if ( pContact )
{
if ( i )
@@ -2657,7 +2538,7 @@ sal_Bool SwFEShell::SetObjAttr( const SfxItemSet& rSet )
SET_CURR_SHELL( this );
if ( !rSet.Count() )
- { ASSERT( !this, "SetObjAttr, empty set." );
+ { OSL_ENSURE( !this, "SetObjAttr, empty set." );
return sal_False;
}
@@ -2721,7 +2602,7 @@ void SwFEShell::CheckUnboundObjects()
}
if ( !pPage )
pPage = pLast;
- ASSERT( pPage, "Page not found." );
+ OSL_ENSURE( pPage, "Page not found." );
//Fremde Identifier sollen in den Default laufen.
//Ueberschneidungen sind moeglich!!
@@ -2809,9 +2690,7 @@ int SwFEShell::Chainable( SwRect &rRect, const SwFrmFmt &rSource,
}
return SW_CHAIN_NOT_FOUND;
}
-/* -----------------------------09.08.2002 07:40------------------------------
- ---------------------------------------------------------------------------*/
int SwFEShell::Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest )
{
return GetDoc()->Chain(rSource, rDest);
@@ -2941,10 +2820,8 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const
}
return 0;
}
-/* -----------------------------2002/06/24 15:07------------------------------
- ---------------------------------------------------------------------------*/
-void SwFEShell::CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect,
+ void SwFEShell::CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect,
sal_uInt16 nSlotId)
{
SdrView* pDrawView = GetDrawView();
@@ -3127,8 +3004,6 @@ void SwFEShell::CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind,
}
/** SwFEShell::GetShapeBackgrd
-
- OD 02.09.2002 for #102450#:
method determines background color of the page the selected drawing
object is on and returns this color.
If no color is found, because no drawing object is selected or ...,
@@ -3144,29 +3019,29 @@ const Color SwFEShell::GetShapeBackgrd() const
Color aRetColor;
// check, if a draw view exists
- ASSERT( Imp()->GetDrawView(), "wrong usage of SwFEShell::GetShapeBackgrd - no draw view!");
+ OSL_ENSURE( Imp()->GetDrawView(), "wrong usage of SwFEShell::GetShapeBackgrd - no draw view!");
if( Imp()->GetDrawView() )
{
// determine list of selected objects
const SdrMarkList* pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList();
// check, if exactly one object is selected.
- ASSERT( pMrkList->GetMarkCount() == 1, "wrong usage of SwFEShell::GetShapeBackgrd - no selected object!");
+ OSL_ENSURE( pMrkList->GetMarkCount() == 1, "wrong usage of SwFEShell::GetShapeBackgrd - no selected object!");
if ( pMrkList->GetMarkCount() == 1)
{
// get selected object
const SdrObject *pSdrObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj();
// check, if selected object is a shape (drawing object)
- ASSERT( !pSdrObj->ISA(SwVirtFlyDrawObj), "wrong usage of SwFEShell::GetShapeBackgrd - selected object is not a drawing object!");
+ OSL_ENSURE( !pSdrObj->ISA(SwVirtFlyDrawObj), "wrong usage of SwFEShell::GetShapeBackgrd - selected object is not a drawing object!");
if ( !pSdrObj->ISA(SwVirtFlyDrawObj) )
{
// determine page frame of the frame the shape is anchored.
const SwFrm* pAnchorFrm =
static_cast<SwDrawContact*>(GetUserCall(pSdrObj))->GetAnchorFrm( pSdrObj );
- ASSERT( pAnchorFrm, "inconsistent modell - no anchor at shape!");
+ OSL_ENSURE( pAnchorFrm, "inconsistent modell - no anchor at shape!");
if ( pAnchorFrm )
{
const SwPageFrm* pPageFrm = pAnchorFrm->FindPageFrm();
- ASSERT( pPageFrm, "inconsistent modell - no page!");
+ OSL_ENSURE( pPageFrm, "inconsistent modell - no page!");
if ( pPageFrm )
{
aRetColor = pPageFrm->GetDrawBackgrdColor();
@@ -3180,8 +3055,6 @@ const Color SwFEShell::GetShapeBackgrd() const
}
/** Is default horizontal text direction for selected drawing object right-to-left
-
- OD 09.12.2002 #103045#
Because drawing objects only painted for each page only, the default
horizontal text direction of a drawing object is given by the corresponding
page property.
@@ -3196,29 +3069,29 @@ bool SwFEShell::IsShapeDefaultHoriTextDirR2L() const
bool bRet = false;
// check, if a draw view exists
- ASSERT( Imp()->GetDrawView(), "wrong usage of SwFEShell::GetShapeBackgrd - no draw view!");
+ OSL_ENSURE( Imp()->GetDrawView(), "wrong usage of SwFEShell::GetShapeBackgrd - no draw view!");
if( Imp()->GetDrawView() )
{
// determine list of selected objects
const SdrMarkList* pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList();
// check, if exactly one object is selected.
- ASSERT( pMrkList->GetMarkCount() == 1, "wrong usage of SwFEShell::GetShapeBackgrd - no selected object!");
+ OSL_ENSURE( pMrkList->GetMarkCount() == 1, "wrong usage of SwFEShell::GetShapeBackgrd - no selected object!");
if ( pMrkList->GetMarkCount() == 1)
{
// get selected object
const SdrObject *pSdrObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj();
// check, if selected object is a shape (drawing object)
- ASSERT( !pSdrObj->ISA(SwVirtFlyDrawObj), "wrong usage of SwFEShell::GetShapeBackgrd - selected object is not a drawing object!");
+ OSL_ENSURE( !pSdrObj->ISA(SwVirtFlyDrawObj), "wrong usage of SwFEShell::GetShapeBackgrd - selected object is not a drawing object!");
if ( !pSdrObj->ISA(SwVirtFlyDrawObj) )
{
// determine page frame of the frame the shape is anchored.
const SwFrm* pAnchorFrm =
static_cast<SwDrawContact*>(GetUserCall(pSdrObj))->GetAnchorFrm( pSdrObj );
- ASSERT( pAnchorFrm, "inconsistent modell - no anchor at shape!");
+ OSL_ENSURE( pAnchorFrm, "inconsistent modell - no anchor at shape!");
if ( pAnchorFrm )
{
const SwPageFrm* pPageFrm = pAnchorFrm->FindPageFrm();
- ASSERT( pPageFrm, "inconsistent modell - no page!");
+ OSL_ENSURE( pPageFrm, "inconsistent modell - no page!");
if ( pPageFrm )
{
bRet = pPageFrm->IsRightToLeft() ? true : false;
@@ -3230,9 +3103,7 @@ bool SwFEShell::IsShapeDefaultHoriTextDirR2L() const
return bRet;
}
-/* -----------------20.03.2003 14:35-----------------
- --------------------------------------------------*/
Point SwFEShell::GetRelativePagePosition(const Point& rDocPos)
{
Point aRet(-1, -1);
@@ -3248,3 +3119,4 @@ Point SwFEShell::GetRelativePagePosition(const Point& rDocPos)
return aRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index fe05bc4c4dcf..7564308d877c 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,9 +35,7 @@
#include <tools/errinf.hxx>
#include <vcl/svapp.hxx>
#include <basegfx/vector/b2dvector.hxx>
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include <editeng/protitem.hxx>
#include <editeng/brshitem.hxx>
#include <editeng/frmdiritem.hxx>
@@ -118,7 +117,7 @@ void SwFEShell::ParkCursorInTab()
{
SwCursor * pSwCrsr = GetSwCrsr();
- ASSERT(pSwCrsr, "no SwCursor");
+ OSL_ENSURE(pSwCrsr, "no SwCursor");
SwPosition aStartPos = *pSwCrsr->GetPoint(), aEndPos = aStartPos;
@@ -202,8 +201,6 @@ void SwFEShell::ParkCursorInTab()
/***********************************************************************
#* Class : SwFEShell
#* Methoden : InsertRow(), InsertCol
-#* Datum : MA 03. May. 93
-#* Update : MA 19. Apr. 95
#***********************************************************************/
sal_Bool SwFEShell::InsertRow( sal_uInt16 nCnt, sal_Bool bBehind )
{
@@ -277,8 +274,6 @@ sal_Bool SwFEShell::InsertCol( sal_uInt16 nCnt, sal_Bool bBehind )
/***********************************************************************
#* Class : SwFEShell
#* Methoden : DeleteRow(), DeleteCol()
-#* Datum : MA 03. May. 93
-#* Update : MA 19. Apr. 95
#***********************************************************************/
/**
@@ -470,8 +465,6 @@ sal_Bool SwFEShell::DeleteRow()
/***********************************************************************
#* Class : SwFEShell
#* Methoden : MergeTab(), SplitTab()
-#* Datum : MA 03. May. 93
-#* Update : MA 19. Apr. 95
#***********************************************************************/
sal_uInt16 SwFEShell::MergeTab()
@@ -552,8 +545,6 @@ sal_Bool SwFEShell::SplitTab( sal_Bool bVert, sal_uInt16 nCnt, sal_Bool bSameHei
/***********************************************************************
#* Class : SwFEShell
#* Methoden : _GetTabCols
-#* Datum : MA 30. Nov. 95
-#* Update : MA 08. Jan. 97
#***********************************************************************/
void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const
{
@@ -583,10 +574,6 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const
{
pLastCols->SetLeftMin( nLeftMin );
- //ASSERT( bVert ||
- // pLastCols->GetLeftMin() == (pTab->Frm().*fnRect->fnGetLeft)(),
- // "GetTabCols: wrong result" )
-
pColumnCacheLastTabFrm = pTab;
}
else
@@ -636,8 +623,6 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const
/***********************************************************************
#* Class : SwFEShell
#* Methoden : _GetTabRows
-#* Datum : FME 2004-01-14
-#* Update :
#***********************************************************************/
void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const
{
@@ -690,8 +675,6 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const
/***********************************************************************
#* Class : SwFEShell
#* Methoden : SetTabCols(), GetTabCols()
-#* Datum : MA 03. May. 93
-#* Update : MA 18. May. 93
#***********************************************************************/
void SwFEShell::SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly )
{
@@ -722,9 +705,6 @@ void SwFEShell::GetTabCols( SwTabCols &rToFill ) const
_GetTabCols( rToFill, pFrm );
}
-/*-- 19.01.2004 08:56:42---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwFEShell::GetTabRows( SwTabCols &rToFill ) const
{
const SwFrm *pFrm = GetCurrFrm();
@@ -736,9 +716,7 @@ void SwFEShell::GetTabRows( SwTabCols &rToFill ) const
_GetTabRows( rToFill, pFrm );
}
-/*-- 19.01.2004 08:56:44---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwFEShell::SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly )
{
SwFrm *pBox = GetCurrFrm();
@@ -755,18 +733,14 @@ void SwFEShell::SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly )
GetDoc()->SetTabRows( rNew, bCurColOnly, 0, (SwCellFrm*)pBox );
EndAllActionAndCall();
}
-/*-- 19.01.2004 08:59:45---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwFEShell::GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const
{
const SwFrm *pBox = GetBox( rPt );
if ( pBox )
_GetTabRows( rToFill, pBox );
}
-/*-- 19.01.2004 08:59:45---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const Point &rPt )
{
const SwFrm *pBox = GetBox( rPt );
@@ -782,7 +756,6 @@ void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, co
/***********************************************************************
* Class : SwFEShell
* Methoden : SetRowSplit(), GetRowSplit()
- * Datum : FME 13.11.2003
***********************************************************************/
void SwFEShell::SetRowSplit( const SwFmtRowSplit& rNew )
@@ -802,8 +775,6 @@ void SwFEShell::GetRowSplit( SwFmtRowSplit*& rpSz ) const
/***********************************************************************
#* Class : SwFEShell
#* Methoden : SetRowHeight(), GetRowHeight()
-#* Datum : MA 17. May. 93
-#* Update : JP 29.04.98
#***********************************************************************/
void SwFEShell::SetRowHeight( const SwFmtFrmSize &rNew )
@@ -855,8 +826,6 @@ sal_Bool SwFEShell::GetRowBackground( SvxBrushItem &rToFill ) const
/***********************************************************************
#* Class : SwFEShell
#* Methoden : SetTabBorders(), GetTabBorders()
-#* Datum : MA 18. May. 93
-#* Update : JP 29.04.98
#***********************************************************************/
void SwFEShell::SetTabBorders( const SfxItemSet& rSet )
@@ -886,8 +855,6 @@ void SwFEShell::GetTabBorders( SfxItemSet& rSet ) const
/***********************************************************************
#* Class : SwFEShell
#* Methoden : SetBoxBackground(), GetBoxBackground()
-#* Datum : MA 01. Jun. 93
-#* Update : MA 03. Jul. 96
#***********************************************************************/
void SwFEShell::SetBoxBackground( const SvxBrushItem &rNew )
{
@@ -905,8 +872,6 @@ sal_Bool SwFEShell::GetBoxBackground( SvxBrushItem &rToFill ) const
/***********************************************************************
#* Class : SwFEShell
#* Methoden : SetBoxDirection(), GetBoxDirection()
-#* Datum : FME 2004-02-03
-#* Update : FME 2004-02-03
#***********************************************************************/
void SwFEShell::SetBoxDirection( const SvxFrameDirectionItem& rNew )
{
@@ -924,8 +889,6 @@ sal_Bool SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const
/***********************************************************************
#* Class : SwFEShell
#* Methoden : SetBoxAlign, SetBoxAlign
-#* Datum : MA 18. Dec. 96
-#* Update : JP 29.04.98
#***********************************************************************/
void SwFEShell::SetBoxAlign( sal_uInt16 nAlign )
{
@@ -943,8 +906,6 @@ sal_uInt16 SwFEShell::GetBoxAlign() const
/***********************************************************************
#* Class : SwFEShell
#* Methoden : SetTabBackground(), GetTabBackground()
-#* Datum : MA 08. Jul. 96
-#* Update : MA 08. Jul. 96
#***********************************************************************/
void SwFEShell::SetTabBackground( const SvxBrushItem &rNew )
{
@@ -970,8 +931,6 @@ void SwFEShell::GetTabBackground( SvxBrushItem &rToFill ) const
/***********************************************************************
#* Class : SwFEShell
#* Methoden : HasWholeTabSelection()
-#* Datum : MA 18. May. 93
-#* Update : MA 20. Jul. 93
#***********************************************************************/
sal_Bool SwFEShell::HasWholeTabSelection() const
{
@@ -1000,9 +959,7 @@ sal_Bool SwFEShell::HasBoxSelection() const
if( IsTableMode() )
return sal_True;
SwPaM* pPam = GetCrsr();
- // leere Boxen gelten auch ohne Selektion als selektiert
-// if( !pPam->HasMark() )
-// return sal_False;
+ // empty boxes are also selected as the absence of selection
sal_Bool bChg = sal_False;
if( pPam->GetPoint() == pPam->End())
{
@@ -1021,7 +978,7 @@ sal_Bool SwFEShell::HasBoxSelection() const
if( !pCNd )
{
pCNd = GetDoc()->GetNodes().GoPrevious( &aIdx );
- ASSERT( pCNd, "kein ContentNode in der Box ??" );
+ OSL_ENSURE( pCNd, "kein ContentNode in der Box ??" );
}
if( pPam->GetMark()->nContent == pCNd->Len() )
{
@@ -1038,8 +995,6 @@ sal_Bool SwFEShell::HasBoxSelection() const
/***********************************************************************
#* Class : SwFEShell
#* Methoden : ProtectCells(), UnProtectCells()
-#* Datum : MA 20. Jul. 93
-#* Update : JP 25. Sep. 93
#***********************************************************************/
void SwFEShell::ProtectCells()
{
@@ -1253,8 +1208,6 @@ sal_Bool SwFEShell::CheckHeadline( bool bRepeat ) const
/***********************************************************************
#* Class : SwFEShell
#* Methoden : AdjustCellWidth()
-#* Datum : MA 20. Feb. 95
-#* Update : MA 27. Jul. 95
#***********************************************************************/
void SwFEShell::AdjustCellWidth( sal_Bool bBalance )
@@ -1386,8 +1339,6 @@ sal_Bool SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet )
/***********************************************************************
#* Class : SwFEShell
#* Methoden : DeleteTblSel()
-#* Datum : MA 03. May. 93
-#* Update : MA 19. Apr. 95
#***********************************************************************/
sal_Bool SwFEShell::DeleteTblSel()
{
@@ -1436,9 +1387,6 @@ sal_Bool SwFEShell::DeleteTblSel()
|*
|* SwFEShell::GetCurTabColNum()
|*
-|* Ersterstellung MA 03. Feb. 95
-|* Letzte Aenderung MA 21. May. 95
-|
|*************************************************************************/
sal_uInt16 SwFEShell::GetCurTabColNum() const
{
@@ -1446,7 +1394,7 @@ sal_uInt16 SwFEShell::GetCurTabColNum() const
sal_uInt16 nRet = 0;
SwFrm *pFrm = GetCurrFrm();
- ASSERT( pFrm, "Crsr geparkt?" );
+ OSL_ENSURE( pFrm, "Crsr geparkt?" );
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
if( pFrm && pFrm->IsInTab() )
@@ -1505,9 +1453,6 @@ sal_uInt16 SwFEShell::GetCurTabColNum() const
|*
|* SwFEShell::GetBox()
|*
-|* Ersterstellung MA 22. Jun. 95
-|* Letzte Aenderung MA 21. Nov. 96
-|*
|*************************************************************************/
const SwFrm *lcl_FindFrmInTab( const SwLayoutFrm *pLay, const Point &rPt, SwTwips nFuzzy )
@@ -1570,7 +1515,7 @@ const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt,
// We first check if the given point is 'close' to the left or top
// border of the table frame:
- ASSERT( pFrm, "Nested table frame without outer table" )
+ OSL_ENSURE( pFrm, "Nested table frame without outer table" );
SWRECTFN( pFrm )
const bool bRTL = pFrm->IsRightToLeft();
@@ -1668,7 +1613,7 @@ const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt,
if ( !bMouseMoveRowCols )
{
- ASSERT( pbCol && pbRow, "pbCol or pbRow missing" )
+ OSL_ENSURE( pbCol && pbRow, "pbCol or pbRow missing" );
if ( bCloseToRow || bCloseToCol )
{
@@ -1717,7 +1662,7 @@ const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt,
}
// robust:
- ASSERT( !pRet || pRet->IsCellFrm(), "lcl_FindFrm() is supposed to find a cell frame!" )
+ OSL_ENSURE( !pRet || pRet->IsCellFrm(), "lcl_FindFrm() is supposed to find a cell frame!" );
return pRet && pRet->IsCellFrm() ? static_cast<const SwCellFrm*>(pRet) : 0;
}
@@ -1889,7 +1834,7 @@ Point lcl_ProjectOntoClosestTableFrm( const SwTabFrm& rTab, const Point& rPoint,
else if ( aRet.Y() < aMin1.Y() )
aRet.Y() = aMin1.Y();
}
- else //if ( bTop )
+ else
{
aRet.Y() = aMin1.Y();
if ( aRet.X() > aMin2.X() )
@@ -2026,9 +1971,6 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag
|*
|* SwFEShell::WhichMouseTabCol()
|*
-|* Ersterstellung MA 22. Jun. 95
-|* Last change AMA 12. Jun. 02
-|
|*************************************************************************/
sal_uInt8 SwFEShell::WhichMouseTabCol( const Point &rPt ) const
{
@@ -2173,9 +2115,6 @@ bool SwFEShell::IsVerticalModeAtNdAndPos( const SwTxtNode& _rTxtNode,
|*
|* SwFEShell::GetMouseTabCols()
|*
-|* Ersterstellung MA 22. Jun. 95
-|* Letzte Aenderung MA 27. Aug. 96
-|
|*************************************************************************/
void SwFEShell::GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const
{
@@ -2201,9 +2140,6 @@ void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly,
|*
|* SwFEShell::GetMouseColNum(), GetMouseTabColNum()
|*
-|* Ersterstellung MA 04. Jul. 95
-|* Letzte Aenderung MA 04. Jul. 95
-|
|*************************************************************************/
sal_uInt16 SwFEShell::GetCurMouseColNum( const Point &rPt,
SwGetCurColNumPara* pPara ) const
@@ -2217,7 +2153,7 @@ sal_uInt16 SwFEShell::GetCurMouseTabColNum( const Point &rPt ) const
sal_uInt16 nRet = 0;
const SwFrm *pFrm = GetBox( rPt );
- ASSERT( pFrm, "Table not found" );
+ OSL_ENSURE( pFrm, "Table not found" );
if( pFrm )
{
const long nX = pFrm->Frm().Left();
@@ -2251,9 +2187,6 @@ void ClearFEShellTabCols()
|*
|* SwFEShell::GetTblAttr(), SetTblAttr()
|*
-|* Ersterstellung MA 09. Dec. 96
-|* Letzte Aenderung MA 09. Dec. 96
-|
|*************************************************************************/
void SwFEShell::GetTblAttr( SfxItemSet &rSet ) const
{
@@ -2284,13 +2217,13 @@ void SwFEShell::SetTblAttr( const SfxItemSet &rNew )
*/
bool lcl_GoTableRow( SwCrsrShell* pShell, bool bUp )
{
- ASSERT( pShell != NULL, "need shell" );
+ OSL_ENSURE( pShell != NULL, "need shell" );
bool bRet = false;
SwPaM* pPam = pShell->GetCrsr();
const SwStartNode* pTableBox = pPam->GetNode()->FindTableBoxStartNode();
- ASSERT( pTableBox != NULL, "I'm living in a box... NOT!" );
+ OSL_ENSURE( pTableBox != NULL, "I'm living in a box... NOT!" );
// move cursor to start node of table box
pPam->GetPoint()->nNode = pTableBox->GetIndex();
@@ -2539,24 +2472,12 @@ sal_Bool SwFEShell::GetAutoSum( String& rFml ) const
if( nW )
{
rFml += ')';
-
-/*
- // TabellenSelektion erzeugen??
- SwTblBoxFormula aTmp( rFml );
- SwSelBoxes aBoxes;
- for( sal_uInt16 nSelBoxes = aTmp.GetBoxesOfFormula( rTbl,aBoxes );
- nSelBoxes; )
- {
- }
-*/
}
}
return sal_True;
}
-/* -----------------------------22.08.2002 12:50------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwFEShell::IsTableRightToLeft() const
{
SwFrm *pFrm = GetCurrFrm();
@@ -2566,20 +2487,14 @@ sal_Bool SwFEShell::IsTableRightToLeft() const
return pFrm->ImplFindTabFrm()->IsRightToLeft();
}
-/* -----------------------------22.08.2002 12:50------------------------------
-
- ---------------------------------------------------------------------------*/
sal_Bool SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const
{
SwFrm *pFrm = (SwFrm *)GetBox( rPt );
const SwTabFrm* pTabFrm = pFrm ? pFrm->ImplFindTabFrm() : 0;
- ASSERT( pTabFrm, "Table not found" );
+ OSL_ENSURE( pTabFrm, "Table not found" );
return pTabFrm ? pTabFrm->IsRightToLeft() : sal_False;
}
-/* -----------------------------11.02.2004 12:50------------------------------
-
- ---------------------------------------------------------------------------*/
sal_Bool SwFEShell::IsTableVertical() const
{
SwFrm *pFrm = GetCurrFrm();
@@ -2591,3 +2506,4 @@ sal_Bool SwFEShell::IsTableVertical() const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 7ea3d079cc4b..a0e3a816df45 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <tools/list.hxx>
#include <svx/svdobj.hxx>
#include <init.hxx>
#include <fesh.hxx>
@@ -55,14 +55,10 @@
#include <edimp.hxx>
#include <pagedesc.hxx>
#include <fmtanchr.hxx>
-// OD 29.10.2003 #113049#
#include <environmentofanchoredobject.hxx>
-// OD 12.11.2003 #i22341#
-#include <ndtxt.hxx>
-// OD 27.11.2003 #112045#
+#include <ndtxt.hxx> // #i22341#
#include <dflyobj.hxx>
-// OD 2004-03-29 #i26791#
-#include <dcontact.hxx>
+#include <dcontact.hxx> // #i26791#
using namespace com::sun::star;
@@ -73,9 +69,6 @@ TYPEINIT1(SwFEShell,SwEditShell)
/***********************************************************************
#* Class : SwFEShell
#* Methode : EndAllActionAndCall()
-#*
-#* Datum : MA 03. May. 93
-#* Update : MA 31. Oct. 95
#***********************************************************************/
void SwFEShell::EndAllActionAndCall()
@@ -97,8 +90,6 @@ void SwFEShell::EndAllActionAndCall()
#* Class : SwFEShell
#* Methode : GetCntntPos
#* Beschreibung: Ermitteln des Cntnt's der dem Punkt am naechsten liegt
-#* Datum : MA 02. Jun. 92
-#* Update : MA 02. May. 95
#***********************************************************************/
Point SwFEShell::GetCntntPos( const Point& rPoint, sal_Bool bNext ) const
@@ -156,14 +147,14 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
case RECT_OUTTABSECTION : if( pFrm->IsInTab() )
pFrm = pFrm->FindTabFrm();
else {
- ASSERT( sal_False, "Missing Table" );
+ OSL_ENSURE( sal_False, "Missing Table" );
}
/* KEIN BREAK */
case RECT_SECTION_PRT:
case RECT_SECTION: if( pFrm->IsInSct() )
pFrm = pFrm->FindSctFrm();
else {
- ASSERT( sal_False, "Missing section" );
+ OSL_ENSURE( sal_False, "Missing section" );
}
if( RECT_OUTTABSECTION_PRT == eType ||
@@ -249,9 +240,6 @@ bool SwFEShell::IsDirectlyInSection() const
|*
|* SwFEShell::GetFrmType()
|*
-|* Ersterstellung MA 12. Jan. 93
-|* Letzte Aenderung AMA 25. Nov. 98
-|*
*************************************************************************/
sal_uInt16 SwFEShell::GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const
@@ -300,7 +288,7 @@ sal_uInt16 SwFEShell::GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const
nReturn |= FRMTYPE_FLY_ATCNT;
else
{
- ASSERT( ((SwFlyFrm*)pFrm)->IsFlyInCntFrm(),
+ OSL_ENSURE( ((SwFlyFrm*)pFrm)->IsFlyInCntFrm(),
"Neuer Rahmentyp?" );
nReturn |= FRMTYPE_FLY_INCNT;
}
@@ -325,9 +313,6 @@ sal_uInt16 SwFEShell::GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const
|*
|* SwFEShell::ShLooseFcs(), ShGetFcs()
|*
-|* Ersterstellung MA 10. May. 93
-|* Letzte Aenderung MA 09. Sep. 98
-|*
*************************************************************************/
void SwFEShell::ShGetFcs( sal_Bool bUpdate )
@@ -352,7 +337,6 @@ void SwFEShell::ShLooseFcs()
Imp()->GetDrawView()->hideMarkHandles();
FrameNotify( this, FLY_DRAG_END );
}
-// ::ResetShell();
}
/*************************************************************************
@@ -360,9 +344,6 @@ void SwFEShell::ShLooseFcs()
|* SwFEShell::GetPhyPageNum()
|* SwFEShell::GetVirtPageNum()
|*
-|* Ersterstellung OK 07.07.93 08:20
-|* Letzte Aenderung MA 03. Jan. 94
-|*
*************************************************************************/
sal_uInt16 SwFEShell::GetPhyPageNum()
@@ -388,15 +369,12 @@ sal_uInt16 SwFEShell::GetVirtPageNum( const sal_Bool bCalcFrm )
|* void SwFEShell::SetPageOffset()
|* sal_uInt16 SwFEShell::GetPageOffset() const
|*
-|* Ersterstellung OK 07.07.93 08:20
-|* Letzte Aenderung MA 30. Mar. 95
-|*
*************************************************************************/
void lcl_SetAPageOffset( sal_uInt16 nOffset, SwPageFrm* pPage, SwFEShell* pThis )
{
pThis->StartAllAction();
- ASSERT( pPage->FindFirstBodyCntnt(),
+ OSL_ENSURE( pPage->FindFirstBodyCntnt(),
"SwFEShell _SetAPageOffset() ohne CntntFrm" );
SwFmtPageDesc aDesc( pPage->GetPageDesc() );
@@ -466,9 +444,6 @@ sal_uInt16 SwFEShell::GetPageOffset() const
|*
|* SwFEShell::InsertLabel()
|*
-|* Ersterstellung MA 10. Feb. 94
-|* Letzte Aenderung MA 10. Feb. 94
-|*
*************************************************************************/
void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
@@ -495,7 +470,6 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
//Bei Flys den Index auf den StartNode herunterreichen.
nIdx = pCnt->FindFlyFrm()->
GetFmt()->GetCntnt().GetCntntIdx()->GetIndex();
-//warum?? Bug 61913 ParkCrsr( GetCrsr()->GetPoint()->nNode );
}
break;
case LTYPE_TABLE:
@@ -514,7 +488,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
const SdrMarkList& rMrkList = pDView->GetMarkedObjectList();
StartUndo();
- // OD 27.11.2003 #112045# - copy marked drawing objects to
+ // copy marked drawing objects to
// local list to perform the corresponding action for each object
std::vector<SdrObject*> aDrawObjs;
{
@@ -544,7 +518,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
}
break;
default:
- ASSERT( !this, "Crsr weder in Tabelle noch in Fly." );
+ OSL_ENSURE( !this, "Crsr weder in Tabelle noch in Fly." );
}
if( nIdx )
@@ -564,8 +538,6 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
/***********************************************************************
#* Class : SwFEShell
#* Methoden : Sort
-#* Datum : ??
-#* Update : ??
#***********************************************************************/
sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt)
@@ -581,7 +553,7 @@ sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt)
// Tabelle sortieren
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm( sal_False );
- ASSERT( pFrm->FindTabFrm(), "Crsr nicht in Tabelle." );
+ OSL_ENSURE( pFrm->FindTabFrm(), "Crsr nicht in Tabelle." );
// lasse ueber das Layout die Boxen suchen
SwSelBoxes aBoxes;
@@ -593,7 +565,7 @@ sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt)
while( !pFrm->IsCellFrm() )
pFrm = pFrm->GetUpper();
{
- /* #107993# ParkCursor->ParkCursorTab */
+ /* ParkCursor->ParkCursorTab */
ParkCursorInTab();
}
@@ -642,9 +614,6 @@ sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt)
|*
|* SwFEShell::GetCurColNum(), _GetColNum()
|*
-|* Ersterstellung MA 03. Feb. 95
-|* Letzte Aenderung MA 20. Apr. 95
-|
|*************************************************************************/
sal_uInt16 SwFEShell::_GetCurColNum( const SwFrm *pFrm,
@@ -692,7 +661,7 @@ sal_uInt16 SwFEShell::_GetCurColNum( const SwFrm *pFrm,
sal_uInt16 SwFEShell::GetCurColNum( SwGetCurColNumPara* pPara ) const
{
- ASSERT( GetCurrFrm(), "Crsr geparkt?" );
+ OSL_ENSURE( GetCurrFrm(), "Crsr geparkt?" );
return _GetCurColNum( GetCurrFrm(), pPara );
}
@@ -700,12 +669,12 @@ sal_uInt16 SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const
{
sal_uInt16 nRet = 0;
SwFrm* pFrm = GetCurrFrm();
- ASSERT( pFrm, "Crsr geparkt?" );
+ OSL_ENSURE( pFrm, "Crsr geparkt?" );
if( pFrm )
{
pFrm = pFrm->IsInTab() ? (SwFrm*)pFrm->FindTabFrm()
: (SwFrm*)pFrm->FindSctFrm();
- ASSERT( pFrm, "No Tab, no Sect" );
+ OSL_ENSURE( pFrm, "No Tab, no Sect" );
if( pFrm )
nRet = _GetCurColNum( pFrm, pPara );
}
@@ -730,11 +699,11 @@ SwFEShell::~SwFEShell()
delete pChainTo;
}
-// OD 18.09.2003 #i17567#, #108749#, #110354# - adjustments for allowing
+// #i17567# - adjustments for allowing
// negative vertical positions for fly frames anchored to paragraph/to character.
-// OD 06.11.2003 #i22305# - adjustments for option 'Follow text flow'
+// #i22305# - adjustments for option 'Follow text flow'
// for to frame anchored objects.
-// OD 12.11.2003 #i22341# - adjustments for vertical alignment at top of line
+// #i22341# - adjustments for vertical alignment at top of line
// for to character anchored objects.
void SwFEShell::CalcBoundRect( SwRect& _orRect,
const RndStdIds _nAnchorId,
@@ -922,7 +891,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
aPos = pFrm->Frm().TopRight();
else
aPos = (pFrm->Frm().*fnRect->fnGetPos)();
- // OD 08.09.2003 #i17567#, #108749#, #110354# - allow negative positions
+ // #i17567# - allow negative positions
// for fly frames anchor to paragraph/to character.
if ((_nAnchorId == FLY_AT_PARA) || (_nAnchorId == FLY_AT_CHAR))
{
@@ -931,7 +900,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
// and vertically by the printing area of the vertical environment,
// if the object follows the text flow, or by the frame area of the
// vertical environment, if the object doesn't follow the text flow.
- // OD 29.10.2003 #113049# - new class <SwEnvironmentOfAnchoredObject>
+ // new class <SwEnvironmentOfAnchoredObject>
objectpositioning::SwEnvironmentOfAnchoredObject aEnvOfObj(
_bFollowTextFlow );
const SwLayoutFrm& rHoriEnvironLayFrm =
@@ -944,7 +913,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
{
aVertEnvironRect = rVertEnvironLayFrm.Prt();
aVertEnvironRect.Pos() += rVertEnvironLayFrm.Frm().Pos();
- // OD 19.09.2003 #i18732# - adjust vertical 'virtual' anchor position
+ // #i18732# - adjust vertical 'virtual' anchor position
// (<aPos.Y()> respectively <aPos.X()>), if object is vertical aligned
// to page areas.
if ( _eVertRelOrient == text::RelOrientation::PAGE_FRAME || _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
@@ -968,7 +937,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
}
else
{
- ASSERT( rVertEnvironLayFrm.IsPageFrm(),
+ OSL_ENSURE( rVertEnvironLayFrm.IsPageFrm(),
"<SwFEShell::CalcBoundRect(..)> - not following text flow, but vertical environment *not* page!" );
aVertEnvironRect = rVertEnvironLayFrm.Frm();
// OD 19.09.2003 #i18732# - adjustment vertical 'virtual' anchor position
@@ -1013,7 +982,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
}
}
- // OD 12.11.2003 #i22341# - adjust vertical 'virtual' anchor position
+ // #i22341# - adjust vertical 'virtual' anchor position
// (<aPos.Y()> respectively <aPos.X()>), if object is anchored to
// character and vertical aligned at character or top of line
// --> OD 2005-12-29 #125800#
@@ -1323,9 +1292,7 @@ Size SwFEShell::GetGraphicDefaultSize() const
}
return aRet;
}
-/* -----------------------------12.08.2002 12:51------------------------------
- ---------------------------------------------------------------------------*/
// --> OD 2009-08-31 #mongolianlayou#
// add output parameter <bVertL2R>
sal_Bool SwFEShell::IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRTL, sal_Bool& bVertL2R) const
@@ -1341,33 +1308,27 @@ sal_Bool SwFEShell::IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRTL, s
return bVert;
SdrObject* pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
- // --> OD 2006-01-06 #123831# - make code robust:
if ( !pObj )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwFEShell::IsFrmVertical(..)> - missing SdrObject instance in marked object list -> This is a serious situation, please inform OD" );
return bVert;
}
- // <--
- // OD 2004-03-29 #i26791#
+ // #i26791#
SwContact* pContact = static_cast<SwContact*>(GetUserCall( pObj ));
- // --> OD 2006-01-06 #123831# - make code robust:
if ( !pContact )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwFEShell::IsFrmVertical(..)> - missing SwContact instance at marked object -> This is a serious situation, please inform OD" );
return bVert;
}
- // <--
const SwFrm* pRef = pContact->GetAnchoredObj( pObj )->GetAnchorFrm();
- // --> OD 2006-01-06 #123831# - make code robust:
if ( !pRef )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwFEShell::IsFrmVertical(..)> - missing anchor frame at marked object -> This is a serious situation, please inform OD" );
return bVert;
}
- // <--
if ( pObj->ISA(SwVirtFlyDrawObj) && !bEnvironment )
pRef = static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrm();
@@ -1386,3 +1347,4 @@ void SwFEShell::MoveObjectIfActive( svt::EmbeddedObjectRef&, const Point& )
// does not do anything, only avoids crash if the method is used for wrong shell
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 4006e30922e8..89e16c0f1bb1 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -217,7 +218,7 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
const SwTblSearchType eSearchType )
{
//Start- und Endzelle besorgen und den naechsten fragen.
- ASSERT( rCrsr.GetCntntNode() && rCrsr.GetCntntNode( sal_False ),
+ OSL_ENSURE( rCrsr.GetCntntNode() && rCrsr.GetCntntNode( sal_False ),
"Tabselection nicht auf Cnt." );
// Zeilen-Selektion:
@@ -249,14 +250,14 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
const sal_uLong nMarkSectionStart = pMarkNode->StartOfSectionIndex();
const SwTableBox* pMarkBox = rTbl.GetTblBox( nMarkSectionStart );
- ASSERT( pMarkBox, "Point in table, mark outside?" )
+ OSL_ENSURE( pMarkBox, "Point in table, mark outside?" );
const SwTableLine* pLine = pMarkBox ? pMarkBox->GetUpper() : 0;
sal_uInt16 nSttPos = rLines.GetPos( pLine );
- ASSERT( USHRT_MAX != nSttPos, "Wo ist meine Zeile in der Tabelle?" );
+ OSL_ENSURE( USHRT_MAX != nSttPos, "Wo ist meine Zeile in der Tabelle?" );
pLine = rTbl.GetTblBox( rCrsr.GetNode( sal_True )->StartOfSectionIndex() )->GetUpper();
sal_uInt16 nEndPos = rLines.GetPos( pLine );
- ASSERT( USHRT_MAX != nEndPos, "Wo ist meine Zeile in der Tabelle?" );
+ OSL_ENSURE( USHRT_MAX != nEndPos, "Wo ist meine Zeile in der Tabelle?" );
// pb: #i20193# if tableintable then nSttPos == nEndPos == USHRT_MAX
if ( nSttPos != USHRT_MAX && nEndPos != USHRT_MAX )
{
@@ -304,20 +305,18 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
SwSelBoxes& rBoxes, SwCellFrms* pCells,
const SwTblSearchType eSearchType )
{
- // #112697# Robust:
const SwTabFrm* pStartTab = pStart->FindTabFrm();
if ( !pStartTab )
{
- ASSERT( false, "GetTblSel without start table" )
+ OSL_ENSURE( false, "GetTblSel without start table" );
return;
}
int bChkProtected = nsSwTblSearchType::TBLSEARCH_PROTECT & eSearchType;
sal_Bool bTblIsValid;
- // --> FME 2006-01-25 #i55421# Reduced value 10
- int nLoopMax = 10; //JP 28.06.99: max 100 loops - Bug 67292
- // <--
+ // #i55421# Reduced value 10
+ int nLoopMax = 10;
sal_uInt16 i;
do {
@@ -372,7 +371,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
break;
}
- ASSERT( pCell->IsCellFrm(), "Frame ohne Celle" );
+ OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Celle" );
if( ::IsFrmInTblSel( pUnion->GetUnion(), pCell ) )
{
SwTableBox* pBox = (SwTableBox*)
@@ -465,11 +464,11 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
break;
}
- // --> FME 2005-10-13 #125337# Make code robust, check if pStart has
+ // --> Make code robust, check if pStart has
// been deleted due to the formatting of the table:
if ( aDelCheck.HasBeenDeleted() )
{
- ASSERT( false, "Current box has been deleted during GetTblSel()" )
+ OSL_ENSURE( false, "Current box has been deleted during GetTblSel()" );
break;
}
// <--
@@ -479,7 +478,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
--nLoopMax;
} while( sal_True );
- ASSERT( nLoopMax, "das Layout der Tabelle wurde nicht valide!" );
+ OSL_ENSURE( nLoopMax, "das Layout der Tabelle wurde nicht valide!" );
}
@@ -497,31 +496,31 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
if( !pCNd )
pCNd = aIdx.GetNodes().GoNextSection( &aIdx, sal_False, sal_False );
- // #109394# if table is invisible, return
+ // if table is invisible, return
// (layout needed for forming table selection further down, so we can't
// continue with invisible tables)
- // OD 07.11.2003 #i22135# - Also the content of the table could be
+ // #i22135# - Also the content of the table could be
// invisible - e.g. in a hidden section
// Robust: check, if content was found (e.g. empty table cells)
if ( !pCNd || pCNd->GetFrm() == NULL )
return sal_False;
const SwLayoutFrm *pStart = pCNd ? pCNd->GetFrm( &aNullPos )->GetUpper() : 0;
- ASSERT( pStart, "ohne Frame geht gar nichts" );
+ OSL_ENSURE( pStart, "ohne Frame geht gar nichts" );
aIdx = rEndNd;
pCNd = aIdx.GetNode().GetCntntNode();
if( !pCNd )
pCNd = aIdx.GetNodes().GoNextSection( &aIdx, sal_False, sal_False );
- // OD 07.11.2003 #i22135# - Robust: check, if content was found and if it's visible
+ // #i22135# - Robust: check, if content was found and if it's visible
if ( !pCNd || pCNd->GetFrm() == NULL )
{
return sal_False;
}
const SwLayoutFrm *pEnd = pCNd ? pCNd->GetFrm( &aNullPos )->GetUpper() : 0;
- ASSERT( pEnd, "ohne Frame geht gar nichts" );
+ OSL_ENSURE( pEnd, "ohne Frame geht gar nichts" );
sal_Bool bTblIsValid, bValidChartSel;
@@ -584,7 +583,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
break;
}
- ASSERT( pCell->IsCellFrm(), "Frame ohne Celle" );
+ OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Celle" );
const SwRect& rUnion = pUnion->GetUnion(),
& rFrmRect = pCell->Frm();
@@ -737,7 +736,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
pGetCLines->DeleteAndDestroy( 0, pGetCLines->Count() );
} while( sal_True );
- ASSERT( nLoopMax, "das Layout der Tabelle wurde nicht valide!" );
+ OSL_ENSURE( nLoopMax, "das Layout der Tabelle wurde nicht valide!" );
if( !bValidChartSel && pGetCLines )
pGetCLines->DeleteAndDestroy( 0, pGetCLines->Count() );
@@ -748,7 +747,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
sal_Bool IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell )
{
- ASSERT( pCell->IsCellFrm(), "Frame ohne Gazelle" );
+ OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Gazelle" );
if( pCell->FindTabFrm()->IsVertical() )
return ( rUnion.Right() >= pCell->Frm().Right() &&
@@ -828,7 +827,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
break;
}
- ASSERT( pCell->IsCellFrm(), "Frame ohne Celle" );
+ OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Celle" );
if( ::IsFrmInTblSel( pUnion->GetUnion(), pCell ) )
pUpperCell = (SwCellFrm*)pCell;
@@ -897,7 +896,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
break;
}
- ASSERT( pCell->IsCellFrm(), "Frame ohne Celle" );
+ OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Celle" );
if( ::IsFrmInTblSel( pUnion->GetUnion(), pCell ) )
{
const SwCellFrm* pC = (SwCellFrm*)pCell;
@@ -947,7 +946,7 @@ _CmpLPt::_CmpLPt( const Point& rPt, const SwTableBox* pBox, sal_Bool bVertical )
void lcl_InsTblBox( SwTableNode* pTblNd, SwDoc* pDoc, SwTableBox* pBox,
sal_uInt16 nInsPos, sal_uInt16 nCnt = 1 )
{
- ASSERT( pBox->GetSttNd(), "Box ohne Start-Node" );
+ OSL_ENSURE( pBox->GetSttNd(), "Box ohne Start-Node" );
SwCntntNode* pCNd = pDoc->GetNodes()[ pBox->GetSttIdx() + 1 ]
->GetCntntNode();
if( pCNd && pCNd->IsTxtNode() )
@@ -1007,13 +1006,12 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
//Zuerst lassen wir uns die Tabellen und die Rechtecke heraussuchen.
- ASSERT( rPam.GetCntntNode() && rPam.GetCntntNode( sal_False ),
+ OSL_ENSURE( rPam.GetCntntNode() && rPam.GetCntntNode( sal_False ),
"Tabselection nicht auf Cnt." );
//JP 24.09.96: Merge mit wiederholenden TabellenHeadline funktioniert nicht
// richtig. Warum nicht Point 0,0 benutzen? Dann ist garantiert,
// das die 1. Headline mit drin ist.
-// Point aPt( rShell.GetCharRect().Pos() );
Point aPt( 0, 0 );
const SwLayoutFrm *pStart = rPam.GetCntntNode()->GetFrm(
&aPt )->GetUpper(),
@@ -1055,7 +1053,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
while ( pCell && pRow->IsAnLower( pCell ) )
{
- ASSERT( pCell->IsCellFrm(), "Frame ohne Celle" );
+ OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Celle" );
// in der vollen Breite ueberlappend ?
if( rUnion.Top() <= pCell->Frm().Top() &&
rUnion.Bottom() >= pCell->Frm().Bottom() )
@@ -1205,7 +1203,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
if ( pCell->GetNext() )
{
pCell = (const SwLayoutFrm*)pCell->GetNext();
- // --> FME 2005-11-03 #125288# Check if table cell is not empty
+ // --> Check if table cell is not empty
if ( pCell->Lower() && pCell->Lower()->IsRowFrm() )
pCell = pCell->FirstCell();
}
@@ -1485,7 +1483,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// in der MergeBox sollte jetzt der gesamte Text stehen
// loesche jetzt noch den initialen TextNode
- ASSERT( (*ppMergeBox)->GetSttIdx()+2 <
+ OSL_ENSURE( (*ppMergeBox)->GetSttIdx()+2 <
(*ppMergeBox)->GetSttNd()->EndOfSectionIndex(),
"leere Box" );
SwNodeIndex aIdx( *(*ppMergeBox)->GetSttNd()->EndOfSectionNode(), -1 );
@@ -1608,31 +1606,6 @@ SwTwips lcl_CalcWish( const SwLayoutFrm *pCell, long nWish,
return nRet;
}
-/* MA: 20. Sep. 93 wird nicht mehr gebraucht.
-static const SwLayoutFrm *GetPrevCell( const SwLayoutFrm *pCell )
-{
- const SwLayoutFrm *pLay = pCell->GetPrevLayoutLeaf();
- if ( pLay && pLay->IsLayoutFrm() && !pLay->IsTab() )
- {
- //GetPrevLayoutLeaf() liefert ggf. auch die Umgebung einer Tab zurueck
- //(naehmlich genau dann, wenn die Zelle noch Vorgaenger hat).
- const SwFrm *pFrm = pLay->Lower();
- while ( pFrm->GetNext() )
- pFrm = pFrm->GetNext();
- pLay = pFrm->IsTabFrm() ? (SwLayoutFrm*)pFrm : 0;
- }
- if ( pLay && pLay->IsTabFrm() )
- {
- //GetPrevLayoutLeaf() liefert ggf. auch Tabellen zurueck die letzte
- //Zelle dieser Tabelle ist das das gesuchte Blatt.
- pLay = ((SwTabFrm*)pLay)->FindLastCntnt()->GetUpper();
- while ( !pLay->IsCellFrm() )
- pLay = pLay->GetUpper();
- }
- return pLay;
-}
-*/
-
void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart,
const SwLayoutFrm *&rpEnd,
const int bChkProtected )
@@ -1728,7 +1701,7 @@ void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart,
while ( pTab->IsFollow() )
{
const SwFrm *pTmp = pTab->FindPrev();
- ASSERT( pTmp->IsTabFrm(), "Vorgaenger vom Follow nicht der Master." );
+ OSL_ENSURE( pTmp->IsTabFrm(), "Vorgaenger vom Follow nicht der Master." );
pTab = (const SwTabFrm*)pTmp;
}
@@ -1796,7 +1769,7 @@ void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart,
const SwCntntFrm* pLastCntnt = pTab->FindLastCntnt();
rpEnd = pLastCntnt ? pLastCntnt->GetUpper() : 0;
- // --> FME 2006-07-17 #134385# Made code robust. If pTab does not have a lower,
+ // --> Made code robust. If pTab does not have a lower,
// we would crash here.
if ( !pLastCntnt ) return;
// <--
@@ -1851,7 +1824,7 @@ void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart,
if ( !pTmpLeaf || !pTmpTab->IsAnLower( pTmpLeaf ) )
{
pTmpTab = (const SwTabFrm*)pTmpTab->FindPrev();
- ASSERT( pTmpTab->IsTabFrm(), "Vorgaenger vom Follow nicht der Master.");
+ OSL_ENSURE( pTmpTab->IsTabFrm(), "Vorgaenger vom Follow nicht der Master.");
rpEnd = pTmpTab->FindLastCntnt()->GetUpper();
while( !rpEnd->IsCellFrm() )
rpEnd = rpEnd->GetUpper();
@@ -1872,10 +1845,9 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
while ( pEnd && !pEnd->IsCellFrm() )
pEnd = pEnd->GetUpper();
- // #112697# Robust:
if ( !pStart || !pEnd )
{
- ASSERT( false, "MakeSelUnions with pStart or pEnd not in CellFrm" )
+ OSL_ENSURE( false, "MakeSelUnions with pStart or pEnd not in CellFrm" );
return;
}
@@ -1889,7 +1861,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
{
if ( !pTable->IsAnFollow( pEndTable ) )
{
- ASSERT( pEndTable->IsAnFollow( pTable ), "Tabkette verknotet." );
+ OSL_ENSURE( pEndTable->IsAnFollow( pTable ), "Tabkette verknotet." );
bExchange = sal_True;
}
}
@@ -1923,11 +1895,9 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
else if( nsSwTblSearchType::TBLSEARCH_COL == ((~nsSwTblSearchType::TBLSEARCH_PROTECT ) & eSearchType ) )
::lcl_FindStartEndCol( pStart, pEnd, nsSwTblSearchType::TBLSEARCH_PROTECT & eSearchType );
- // --> FME 2006-07-17 #134385# Made code robust.
- if ( !pEnd ) return;
- // <--
+ if ( !pEnd ) return; // Made code robust.
- //neu besorgen, da sie jetzt verschoben sind. MA: 28. Dec. 93 Bug 5190
+ //neu besorgen, da sie jetzt verschoben sind.
pTable = pStart->FindTabFrm();
pEndTable = pEnd->FindTabFrm();
@@ -2013,7 +1983,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
pTmpCell = static_cast<const SwRowFrm*>(pTmpRow)->Lower();
pTmpRow = static_cast<const SwCellFrm*>(pTmpCell)->Lower();
}
- ASSERT( !pTmpCell || pTmpCell->IsCellFrm(), "Lower of rowframe != cellframe?!" )
+ OSL_ENSURE( !pTmpCell || pTmpCell->IsCellFrm(), "Lower of rowframe != cellframe?!" );
}
// <--
@@ -2119,7 +2089,7 @@ sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv,
while ( pCell && pRow->IsAnLower( pCell ) )
{
- ASSERT( pCell->IsCellFrm(), "Frame ohne Celle" );
+ OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Celle" );
if( ::IsFrmInTblSel( pUnion->GetUnion(), pCell ) )
{
if( (pCell->Frm().*fnRect->fnGetWidth)() < nMinValue )
@@ -2231,7 +2201,7 @@ void _FndBox::SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable )
const sal_uInt16 nPos = rTable.GetTabLines().GetPos(
(const SwTableLine*&)pLine ) + 1;
- ASSERT( nPos != USHRT_MAX, "TableLine not found." );
+ OSL_ENSURE( nPos != USHRT_MAX, "TableLine not found." );
if( nStPos > nPos )
nStPos = nPos;
@@ -2259,13 +2229,13 @@ void _FndBox::SetTableLines( const SwTable &rTable )
SwTableLine* pTmpLine = GetLines()[0]->GetLine();
sal_uInt16 nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pTmpLine );
- ASSERT( USHRT_MAX != nPos, "Line steht nicht in der Tabelle" );
+ OSL_ENSURE( USHRT_MAX != nPos, "Line steht nicht in der Tabelle" );
if( nPos )
pLineBefore = rTable.GetTabLines()[ nPos - 1 ];
pTmpLine = GetLines()[GetLines().Count()-1]->GetLine();
nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pTmpLine );
- ASSERT( USHRT_MAX != nPos, "Line steht nicht in der Tabelle" );
+ OSL_ENSURE( USHRT_MAX != nPos, "Line steht nicht in der Tabelle" );
if( ++nPos < rTable.GetTabLines().Count() )
pLineBehind = rTable.GetTabLines()[nPos];
}
@@ -2291,7 +2261,7 @@ void _FndBox::DelFrms( SwTable &rTable )
{
nStPos = rTable.GetTabLines().GetPos(
(const SwTableLine*&)pLineBefore );
- ASSERT( nStPos != USHRT_MAX, "Fuchs Du hast die Line gestohlen!" );
+ OSL_ENSURE( nStPos != USHRT_MAX, "Fuchs Du hast die Line gestohlen!" );
++nStPos;
}
if( rTable.IsNewModel() && pLineBehind )
@@ -2300,7 +2270,7 @@ void _FndBox::DelFrms( SwTable &rTable )
{
nEndPos = rTable.GetTabLines().GetPos(
(const SwTableLine*&)pLineBehind );
- ASSERT( nEndPos != USHRT_MAX, "Fuchs Du hast die Line gestohlen!" );
+ OSL_ENSURE( nEndPos != USHRT_MAX, "Fuchs Du hast die Line gestohlen!" );
--nEndPos;
}
@@ -2344,7 +2314,7 @@ void _FndBox::DelFrms( SwTable &rTable )
if ( pPrev )
{
SwFrm *pTmp = pPrev->FindPrev();
- ASSERT( pTmp->IsTabFrm(),
+ OSL_ENSURE( pTmp->IsTabFrm(),
"Vorgaenger vom Follow kein Master.");
pPrev = (SwTabFrm*)pTmp;
}
@@ -2420,7 +2390,7 @@ sal_Bool lcl_IsLineOfTblFrm( const SwTabFrm& rTable, const SwFrm& rChk )
*/
void lcl_UpdateRepeatedHeadlines( SwTabFrm& rTabFrm, bool bCalcLowers )
{
- ASSERT( rTabFrm.IsFollow(), "lcl_UpdateRepeatedHeadlines called for non-follow tab" )
+ OSL_ENSURE( rTabFrm.IsFollow(), "lcl_UpdateRepeatedHeadlines called for non-follow tab" );
// Delete remaining headlines:
SwRowFrm* pLower = 0;
@@ -2459,7 +2429,7 @@ void _FndBox::MakeFrms( SwTable &rTable )
{
nStPos = rTable.GetTabLines().GetPos(
(const SwTableLine*&)pLineBefore );
- ASSERT( nStPos != USHRT_MAX, "Fuchs Du hast die Line gestohlen!" );
+ OSL_ENSURE( nStPos != USHRT_MAX, "Fuchs Du hast die Line gestohlen!" );
++nStPos;
}
@@ -2467,7 +2437,7 @@ void _FndBox::MakeFrms( SwTable &rTable )
{
nEndPos = rTable.GetTabLines().GetPos(
(const SwTableLine*&)pLineBehind );
- ASSERT( nEndPos != USHRT_MAX, "Fuchs Du hast die Line gestohlen!" );
+ OSL_ENSURE( nEndPos != USHRT_MAX, "Fuchs Du hast die Line gestohlen!" );
--nEndPos;
}
//Jetzt die grosse Einfuegeoperation fuer alle Tabllen.
@@ -2660,8 +2630,8 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber,
lcl_UpdateRepeatedHeadlines( *pTable, true );
}
- ASSERT( ((SwRowFrm*)pTable->Lower())->GetTabLine() ==
- rTable.GetTabLines()[0], "MakeNewFrms: Table corruption!" )
+ OSL_ENSURE( ((SwRowFrm*)pTable->Lower())->GetTabLine() ==
+ rTable.GetTabLines()[0], "MakeNewFrms: Table corruption!" );
}
}
}
@@ -2694,7 +2664,7 @@ sal_Bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const
if ( nBfPos == nBhPos ) //Duerfte eigentlich nie vorkommen.
{
- ASSERT( sal_False, "Table, Loeschen auf keinem Bereich !?!" );
+ OSL_ENSURE( sal_False, "Table, Loeschen auf keinem Bereich !?!" );
return sal_False;
}
@@ -2732,3 +2702,4 @@ sal_Bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/graphic/grfatr.cxx b/sw/source/core/graphic/grfatr.cxx
index 85c9a028e5af..e652a0a12c2b 100644
--- a/sw/source/core/graphic/grfatr.cxx
+++ b/sw/source/core/graphic/grfatr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,12 +48,8 @@
#include <grfatr.hxx>
#include <swunohelper.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _UNOMID_H
#include <unomid.h>
-#endif
using namespace ::com::sun::star;
@@ -91,10 +88,10 @@ sal_Bool lcl_IsHoriOnOddPages(int nEnum)
nEnum == RES_MIRROR_GRAPH_BOTH;
return bEnum;
}
-sal_Bool SwMirrorGrf::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwMirrorGrf::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
- sal_Bool bRet = sal_True,
- bVal;
+ bool bRet = true;
+ sal_Bool bVal;
// Vertikal und Horizontal sind mal getauscht worden!
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -110,16 +107,16 @@ sal_Bool SwMirrorGrf::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
GetValue() == RES_MIRROR_GRAPH_BOTH;
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
rVal.setValue( &bVal, ::getBooleanCppuType() );
return bRet;
}
-sal_Bool SwMirrorGrf::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwMirrorGrf::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
sal_Bool bVal = *(sal_Bool*)rVal.getValue();
// Vertikal und Horizontal sind mal getauscht worden!
nMemberId &= ~CONVERT_TWIPS;
@@ -159,8 +156,8 @@ sal_Bool SwMirrorGrf::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
}
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
@@ -198,15 +195,15 @@ int SwRotationGrf::operator==( const SfxPoolItem& rCmp ) const
}
-sal_Bool SwRotationGrf::QueryValue( uno::Any& rVal, sal_uInt8 ) const
+bool SwRotationGrf::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
// SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w)
// where we still want this to be a sal_Int16
rVal <<= (sal_Int16)GetValue();
- return sal_True;
+ return true;
}
-sal_Bool SwRotationGrf::PutValue( const uno::Any& rVal, sal_uInt8 )
+bool SwRotationGrf::PutValue( const uno::Any& rVal, sal_uInt8 )
{
// SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w)
// where we still want this to be a sal_Int16
@@ -215,11 +212,11 @@ sal_Bool SwRotationGrf::PutValue( const uno::Any& rVal, sal_uInt8 )
{
// sal_uInt16 argument needed
SetValue( (sal_uInt16) nValue );
- return sal_True;
+ return true;
}
- DBG_ERROR( "SwRotationGrf::PutValue - Wrong type!" );
- return sal_False;
+ OSL_FAIL( "SwRotationGrf::PutValue - Wrong type!" );
+ return false;
}
// ------------------------------------------------------------------
@@ -270,13 +267,13 @@ int SwGammaGrf::operator==( const SfxPoolItem& rCmp ) const
nValue == ((SwGammaGrf&)rCmp).GetValue();
}
-sal_Bool SwGammaGrf::QueryValue( uno::Any& rVal, sal_uInt8 ) const
+bool SwGammaGrf::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
rVal <<= nValue;
- return sal_True;
+ return true;
}
-sal_Bool SwGammaGrf::PutValue( const uno::Any& rVal, sal_uInt8 )
+bool SwGammaGrf::PutValue( const uno::Any& rVal, sal_uInt8 )
{
return rVal >>= nValue;
}
@@ -295,35 +292,34 @@ SfxPoolItem* SwTransparencyGrf::Clone( SfxItemPool * ) const
return new SwTransparencyGrf( *this );
}
// ------------------------------------------------------------------
-sal_Bool SwTransparencyGrf::QueryValue( uno::Any& rVal,
+bool SwTransparencyGrf::QueryValue( uno::Any& rVal,
sal_uInt8 ) const
{
DBG_ASSERT(ISA(SfxByteItem),"Put/QueryValue should be removed!");
sal_Int16 nRet = GetValue();
DBG_ASSERT( 0 <= nRet && nRet <= 100, "value out of range" );
rVal <<= nRet;
- return sal_True;
+ return true;
}
// ------------------------------------------------------------------
-sal_Bool SwTransparencyGrf::PutValue( const uno::Any& rVal,
+bool SwTransparencyGrf::PutValue( const uno::Any& rVal,
sal_uInt8 )
{
//temporary conversion until this is a SfxInt16Item!
DBG_ASSERT(ISA(SfxByteItem),"Put/QueryValue should be removed!");
sal_Int16 nVal = 0;
if(!(rVal >>= nVal) || nVal < -100 || nVal > 100)
- return sal_False;
+ return false;
if(nVal < 0)
{
// for compatibility with old documents
- // OD 05.11.2002 #104308# - introduce rounding as for SO 6.0 PP2
- // introduced by fix of #104293#.
+ // introduce rounding as for SO 6.0 PP2
nVal = ( ( nVal * 128 ) - (99/2) ) / 100;
nVal += 128;
}
DBG_ASSERT( 0 <= nVal && nVal <= 100, "value out of range" );
SetValue(static_cast<sal_uInt8>(nVal));
- return sal_True;
+ return true;
}
// ------------------------------------------------------------------
@@ -335,32 +331,29 @@ SfxPoolItem* SwDrawModeGrf::Clone( SfxItemPool * ) const
sal_uInt16 SwDrawModeGrf::GetValueCount() const
{
- // GRAPHICDRAWMODE_STANDARD = 0,
- // GRAPHICDRAWMODE_GREYS = 1,
- // GRAPHICDRAWMODE_MONO = 2,
- // GRAPHICDRAWMODE_WATERMARK = 3
return GRAPHICDRAWMODE_WATERMARK + 1;
}
-sal_Bool SwDrawModeGrf::QueryValue( uno::Any& rVal,
+bool SwDrawModeGrf::QueryValue( uno::Any& rVal,
sal_uInt8 ) const
{
drawing::ColorMode eRet = (drawing::ColorMode)GetEnumValue();
rVal <<= eRet;
- return sal_True;
+ return true;
}
-sal_Bool SwDrawModeGrf::PutValue( const uno::Any& rVal,
+bool SwDrawModeGrf::PutValue( const uno::Any& rVal,
sal_uInt8 )
{
sal_Int32 eVal = SWUnoHelper::GetEnumAsInt32( rVal );
if(eVal >= 0 && eVal <= GRAPHICDRAWMODE_WATERMARK)
{
SetEnumValue((sal_uInt16)eVal);
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 1f8dc1ee488b..aa34ff35f0e1 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <vcl/salbtype.hxx> // FRound
#include <tools/urlobj.hxx>
#include <svl/undo.hxx>
-#ifndef SVTOOLS_FSTATHELPER_HXX
#include <svl/fstathelper.hxx>
-#endif
#include <svtools/imap.hxx>
#include <svtools/filter.hxx>
#include <sot/storage.hxx>
@@ -151,13 +150,13 @@ sal_Bool SwGrfNode::ReRead(
{
sal_Bool bReadGrf = sal_False, bSetTwipSize = sal_True;
- ASSERT( pGraphic || pGrfObj || rGrfName.Len(),
+ OSL_ENSURE( pGraphic || pGrfObj || rGrfName.Len(),
"GraphicNode without a name, Graphic or GraphicObject" );
// ReadRead mit Namen
if( refLink.Is() )
{
- ASSERT( !bInSwapIn, "ReRead: stehe noch im SwapIn" );
+ OSL_ENSURE( !bInSwapIn, "ReRead: stehe noch im SwapIn" );
if( rGrfName.Len() )
{
@@ -288,10 +287,7 @@ sal_Bool SwGrfNode::ReRead(
// der neue Kink nicht geladen werden konnte.
Graphic aGrf; aGrf.SetDefaultType();
aGrfObj.SetGraphic( aGrf, rGrfName );
- // --> OD 2006-11-03 #i59688#
- // do not load linked graphic, if it isn't a new linked graphic.
-// //TODO refLink->setInputStream(getInputStream());
-// ((SwBaseLink*)&refLink)->SwapIn();
+ // #i59688# - do not load linked graphic, if it isn't a new linked graphic.
if ( bNewGrf )
{
((SwBaseLink*)&refLink)->SwapIn();
@@ -326,7 +322,7 @@ SwGrfNode::~SwGrfNode()
SwDoc* pDoc = GetDoc();
if( refLink.Is() )
{
- ASSERT( !bInSwapIn, "DTOR: stehe noch im SwapIn" );
+ OSL_ENSURE( !bInSwapIn, "DTOR: stehe noch im SwapIn" );
pDoc->GetLinkManager().Remove( refLink );
refLink->Disconnect();
}
@@ -366,7 +362,7 @@ SwGrfNode * SwNodes::MakeGrfNode( const SwNodeIndex & rWhere,
SwAttrSet* pAutoAttr,
sal_Bool bDelayed )
{
- ASSERT( pGrfColl, "MakeGrfNode: Formatpointer ist 0." );
+ OSL_ENSURE( pGrfColl, "MakeGrfNode: Formatpointer ist 0." );
SwGrfNode *pNode;
// Delayed erzeugen nur aus dem SW/G-Reader
if( bDelayed )
@@ -383,7 +379,7 @@ SwGrfNode * SwNodes::MakeGrfNode( const SwNodeIndex & rWhere,
SwGrfFmtColl* pGrfColl,
SwAttrSet* pAutoAttr )
{
- ASSERT( pGrfColl, "MakeGrfNode: Formatpointer ist 0." );
+ OSL_ENSURE( pGrfColl, "MakeGrfNode: Formatpointer ist 0." );
return new SwGrfNode( rWhere, rGrfObj, pGrfColl, pAutoAttr );
}
@@ -460,10 +456,7 @@ short SwGrfNode::SwapIn( sal_Bool bWaitForData )
// --> OD 2005-05-04 #i48434# - usage of new method <_GetStreamForEmbedGrf(..)>
try
{
- // --> OD, MAV 2005-08-17 #i53025# - needed correction of new
- // method <_GetStreamForEmbedGrf(..)>
-// bool bGraphic(false);
-// SvStream* pStrm = _GetStreamForEmbedGrf( bGraphic );
+ // #i53025# - needed correction of new method <_GetStreamForEmbedGrf(..)>
String aStrmName, aPicStgName;
_GetStreamStorageNames( aStrmName, aPicStgName );
uno::Reference < embed::XStorage > refPics = _GetDocSubstorageOrRoot( aPicStgName );
@@ -479,7 +472,7 @@ short SwGrfNode::SwapIn( sal_Bool bWaitForData )
catch ( uno::Exception& )
{
// --> OD 2005-04-25 #i48434#
- ASSERT( false, "<SwGrfNode::SwapIn(..)> - unhandled exception!" );
+ OSL_ENSURE( false, "<SwGrfNode::SwapIn(..)> - unhandled exception!" );
// <--
}
// <--
@@ -562,7 +555,7 @@ sal_Bool SwGrfNode::SavePersistentData()
{
if( refLink.Is() )
{
- ASSERT( !bInSwapIn, "SavePersistentData: stehe noch im SwapIn" );
+ OSL_ENSURE( !bInSwapIn, "SavePersistentData: stehe noch im SwapIn" );
GetDoc()->GetLinkManager().Remove( refLink );
return sal_True;
}
@@ -641,8 +634,6 @@ void SwGrfNode::ReleaseLink()
{
if( refLink.Is() )
{
- // erst die Grafik reinswappen!
-// if( aGraphic.IsSwapOut() || !refLink->IsSynchron() )
{
bInSwapIn = sal_True;
SwBaseLink* pLink = (SwBaseLink*)(::sfx2::SvBaseLink*) refLink;
@@ -699,7 +690,7 @@ void SwGrfNode::ScaleImageMap()
nWidth -= rBox.CalcLineSpace(BOX_LINE_LEFT) +
rBox.CalcLineSpace(BOX_LINE_RIGHT);
- ASSERT( nWidth>0, "Gibt es 0 twip breite Grafiken!?" );
+ OSL_ENSURE( nWidth>0, "Gibt es 0 twip breite Grafiken!?" );
if( nGrfSize.Width() != nWidth )
{
@@ -714,7 +705,7 @@ void SwGrfNode::ScaleImageMap()
nHeight -= rBox.CalcLineSpace(BOX_LINE_TOP) +
rBox.CalcLineSpace(BOX_LINE_BOTTOM);
- ASSERT( nHeight>0, "Gibt es 0 twip hohe Grafiken!?" );
+ OSL_ENSURE( nHeight>0, "Gibt es 0 twip hohe Grafiken!?" );
if( nGrfSize.Height() != nHeight )
{
@@ -754,7 +745,7 @@ void SwGrfNode::DelStreamName()
catch ( uno::Exception& )
{
// --> OD 2005-04-25 #i48434#
- ASSERT( false, "<SwGrfNode::DelStreamName()> - unhandled exception!" );
+ OSL_ENSURE( false, "<SwGrfNode::DelStreamName()> - unhandled exception!" );
// <--
}
}
@@ -773,7 +764,7 @@ uno::Reference< embed::XStorage > SwGrfNode::_GetDocSubstorageOrRoot( const Stri
{
uno::Reference < embed::XStorage > refStor =
const_cast<SwGrfNode*>(this)->GetDoc()->GetDocStorage();
- ASSERT( refStor.is(), "Kein Storage am Doc" );
+ OSL_ENSURE( refStor.is(), "Kein Storage am Doc" );
if ( aStgName.Len() )
{
@@ -808,15 +799,11 @@ SvStream* SwGrfNode::_GetStreamForEmbedGrf(
// re-generating its name.
// A save action can have changed the filename of the embedded graphic,
// because a changed unique ID of the graphic is calculated.
- // --> OD 2006-01-30 #b6364738#
- // recursive calls of <GetUniqueID()> have to be avoided.
+ // --> recursive calls of <GetUniqueID()> have to be avoided.
// Thus, use local static boolean to assure this.
- static bool bInRegenerateStrmName( false );
- if ( !bInRegenerateStrmName &&
- ( !_refPics->hasByName( _aStrmName ) ||
- !_refPics->isStreamElement( _aStrmName ) ) )
+ if ( !_refPics->hasByName( _aStrmName ) ||
+ !_refPics->isStreamElement( _aStrmName ) )
{
- bInRegenerateStrmName = true;
xub_StrLen nExtPos = _aStrmName.Search( '.' );
String aExtStr = _aStrmName.Copy( nExtPos );
Graphic aGraphic( GetGrfObj().GetGraphic() );
@@ -825,7 +812,6 @@ SvStream* SwGrfNode::_GetStreamForEmbedGrf(
_aStrmName = String( GetGrfObj().GetUniqueID(), RTL_TEXTENCODING_ASCII_US );
_aStrmName += aExtStr;
}
- bInRegenerateStrmName = false;
}
// <--
@@ -838,7 +824,7 @@ SvStream* SwGrfNode::_GetStreamForEmbedGrf(
}
else
{
- ASSERT( false, "<SwGrfNode::_GetStreamForEmbedGrf(..)> - embedded graphic file not found!" );
+ OSL_ENSURE( false, "<SwGrfNode::_GetStreamForEmbedGrf(..)> - embedded graphic file not found!" );
}
}
@@ -858,7 +844,11 @@ void SwGrfNode::_GetStreamStorageNames( String& rStrmName,
if( !aUserData.Len() )
return;
- String aProt( RTL_CONSTASCII_STRINGPARAM( "vnd.sun.star.Package:" ) );
+ if (aNewStrmName.Len()>0) {
+ aUserData=aNewStrmName;
+ }
+
+ String aProt( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" ) );
if( 0 == aUserData.CompareTo( aProt, aProt.Len() ) )
{
// 6.0 (XML) Package
@@ -878,10 +868,10 @@ void SwGrfNode::_GetStreamStorageNames( String& rStrmName,
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwGrfNode::_GetStreamStorageNames(..)> - unknown graphic URL type. Code for handling 3.1 - 5.2 storages has been deleted by issue i53025." );
}
- ASSERT( STRING_NOTFOUND == rStrmName.Search( '/' ),
+ OSL_ENSURE( STRING_NOTFOUND == rStrmName.Search( '/' ),
"invalid graphic stream name" );
}
// <--
@@ -898,10 +888,7 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
// --> OD 2005-05-04 #i48434# - usage of new method <_GetStreamForEmbedGrf(..)>
try
{
- // --> OD, MAV 2005-08-17 #i53025# - needed correction of new
- // method <_GetStreamForEmbedGrf(..)>
-// bool bGraphic(false);
-// SvStream* pStrm = _GetStreamForEmbedGrf( bGraphic );
+ // #i53025# - needed correction of new method <_GetStreamForEmbedGrf(..)>
String aStrmName, aPicStgName;
_GetStreamStorageNames( aStrmName, aPicStgName );
uno::Reference < embed::XStorage > refPics = _GetDocSubstorageOrRoot( aPicStgName );
@@ -916,7 +903,7 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
catch ( uno::Exception& )
{
// --> OD 2005-04-25 #i48434#
- ASSERT( false, "<SwGrfNode::MakeCopy(..)> - unhandled exception!" );
+ OSL_ENSURE( false, "<SwGrfNode::MakeCopy(..)> - unhandled exception!" );
// <--
}
// <--
@@ -953,7 +940,7 @@ IMPL_LINK( SwGrfNode, SwapGraphic, GraphicObject*, pGrfObj )
{
SvStream* pRet;
- // #101174#: Keep graphic while in swap in. That's at least important
+ // Keep graphic while in swap in. That's at least important
// when breaking links, because in this situation a reschedule call and
// a DataChanged call lead to a paint of the graphic.
if( pGrfObj->IsInSwapOut() && (IsSelected() || bInSwapIn) )
@@ -985,10 +972,7 @@ IMPL_LINK( SwGrfNode, SwapGraphic, GraphicObject*, pGrfObj )
// --> OD 2005-05-04 #i48434# - usage of new method <_GetStreamForEmbedGrf(..)>
try
{
- // --> OD, MAV 2005-08-17 #i53025# - needed correction of new
- // method <_GetStreamForEmbedGrf(..)>
-// bool bGraphic(false);
-// SvStream* pStrm = _GetStreamForEmbedGrf( bGraphic );
+ // #i53025# - needed correction of new method <_GetStreamForEmbedGrf(..)>
String aStrmName, aPicStgName;
_GetStreamStorageNames( aStrmName, aPicStgName );
uno::Reference < embed::XStorage > refPics = _GetDocSubstorageOrRoot( aPicStgName );
@@ -1011,7 +995,7 @@ IMPL_LINK( SwGrfNode, SwapGraphic, GraphicObject*, pGrfObj )
catch ( uno::Exception& )
{
// --> OD 2005-04-25 #i48434#
- ASSERT( false, "<SwapGraphic> - unhandled exception!" );
+ OSL_ENSURE( false, "<SwapGraphic> - unhandled exception!" );
// <--
}
// <--
@@ -1143,7 +1127,7 @@ void SwGrfNode::TriggerAsyncRetrieveInputStream()
{
if ( !IsLinkedFile() )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwGrfNode::TriggerAsyncLoad()> - Method is misused. Method call is only valid for graphic nodes, which refer a linked graphic file" );
return;
}
@@ -1209,7 +1193,7 @@ bool SwGrfNode::IsAsyncRetrieveInputStreamPossible() const
{
String sGrfNm;
refLink->GetLinkManager()->GetDisplayNames( refLink, 0, &sGrfNm, 0, 0 );
- String sProtocol( RTL_CONSTASCII_STRINGPARAM( "vnd.sun.star.pkg:" ) );
+ String sProtocol( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.pkg:" ) );
if ( sGrfNm.CompareTo( sProtocol, sProtocol.Len() ) != 0 )
{
bRet = true;
@@ -1219,3 +1203,5 @@ bool SwGrfNode::IsAsyncRetrieveInputStreamPossible() const
return bRet;
}
// <--
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/GetMetricVal.hxx b/sw/source/core/inc/GetMetricVal.hxx
index 0d897cfa395a..a752aa53b0d1 100644
--- a/sw/source/core/inc/GetMetricVal.hxx
+++ b/sw/source/core/inc/GetMetricVal.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,5 @@ inline sal_uInt16 GetMetricVal( int n )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx
index 5b03672f461f..415b8e7b6a68 100644
--- a/sw/source/core/inc/MarkManager.hxx
+++ b/sw/source/core/inc/MarkManager.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,5 @@ namespace sw { namespace mark
};
}}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/SwGrammarMarkUp.hxx b/sw/source/core/inc/SwGrammarMarkUp.hxx
index 393c917bfc45..0d831d3f0b2a 100644
--- a/sw/source/core/inc/SwGrammarMarkUp.hxx
+++ b/sw/source/core/inc/SwGrammarMarkUp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,3 +73,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/SwPortionHandler.hxx b/sw/source/core/inc/SwPortionHandler.hxx
index 11888f67a8ae..a78e00bbc753 100644
--- a/sw/source/core/inc/SwPortionHandler.hxx
+++ b/sw/source/core/inc/SwPortionHandler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,3 +100,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/SwUndoFmt.hxx b/sw/source/core/inc/SwUndoFmt.hxx
index 1df5436e7ad2..0eeb4df3f802 100644
--- a/sw/source/core/inc/SwUndoFmt.hxx
+++ b/sw/source/core/inc/SwUndoFmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -94,7 +95,6 @@ class SwUndoRenameFmt : public SwUndo
protected:
String sOldName, sNewName;
SwDoc * pDoc;
-// SwUndoId nId;
public:
SwUndoRenameFmt(SwUndoId nUndoId, const String & sOldName,
@@ -251,3 +251,5 @@ class SwUndoNumruleRename : public SwUndo
};
#endif // SW_UNDO_TXT_FMT_COLL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/SwUndoPageDesc.hxx b/sw/source/core/inc/SwUndoPageDesc.hxx
index 1de717a453d6..7acb98053e52 100644
--- a/sw/source/core/inc/SwUndoPageDesc.hxx
+++ b/sw/source/core/inc/SwUndoPageDesc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,14 +57,14 @@ public:
class SwUndoPageDescCreate : public SwUndo
{
- const SwPageDesc * pDesc; // #116530#
+ const SwPageDesc * pDesc;
SwPageDescExt aNew;
SwDoc * pDoc;
void DoImpl();
public:
- SwUndoPageDescCreate(const SwPageDesc * pNew, SwDoc * pDoc); // #116530#
+ SwUndoPageDescCreate(const SwPageDesc * pNew, SwDoc * pDoc);
virtual ~SwUndoPageDescCreate();
virtual void UndoImpl( ::sw::UndoRedoContext & );
@@ -91,3 +92,5 @@ public:
virtual SwRewriter GetRewriter() const;
};
#endif // _SW_UNDO_PAGE_DESC_CHANGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/SwUndoTOXChange.hxx b/sw/source/core/inc/SwUndoTOXChange.hxx
index 5fa221b23979..a661ab5de571 100644
--- a/sw/source/core/inc/SwUndoTOXChange.hxx
+++ b/sw/source/core/inc/SwUndoTOXChange.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,5 @@ public:
};
#endif // SW_UNDO_TOX_CHANGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/SwXMLBlockExport.hxx b/sw/source/core/inc/SwXMLBlockExport.hxx
index 59ca2b59540e..8d02e47a4e8f 100644
--- a/sw/source/core/inc/SwXMLBlockExport.hxx
+++ b/sw/source/core/inc/SwXMLBlockExport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,3 +72,5 @@ public:
void _ExportContent() {}
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/SwXMLBlockImport.hxx b/sw/source/core/inc/SwXMLBlockImport.hxx
index a9aa3bb32b08..4d37e9b417ee 100644
--- a/sw/source/core/inc/SwXMLBlockImport.hxx
+++ b/sw/source/core/inc/SwXMLBlockImport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,5 @@ public:
throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/SwXMLBlockListContext.hxx b/sw/source/core/inc/SwXMLBlockListContext.hxx
index 8208d78db2d6..64c9dbb8c0e9 100644
--- a/sw/source/core/inc/SwXMLBlockListContext.hxx
+++ b/sw/source/core/inc/SwXMLBlockListContext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -124,3 +125,5 @@ public:
~SwXMLTextBlockParContext ( void );
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx b/sw/source/core/inc/SwXMLTextBlocks.hxx
index 8e487a21fc85..c87b08d77360 100644
--- a/sw/source/core/inc/SwXMLTextBlocks.hxx
+++ b/sw/source/core/inc/SwXMLTextBlocks.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,3 +110,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/SwXTextDefaults.hxx b/sw/source/core/inc/SwXTextDefaults.hxx
index f1ed6bbf1371..931ed54006bf 100644
--- a/sw/source/core/inc/SwXTextDefaults.hxx
+++ b/sw/source/core/inc/SwXTextDefaults.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
-#ifndef _COM_SUN_STAR_BEANS_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
#include <svl/itemprop.hxx>
class SwDoc;
@@ -82,3 +81,5 @@ public:
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/UndoNumbering.hxx b/sw/source/core/inc/UndoNumbering.hxx
index 8680dcaa3e59..3d92ff7ce1c7 100644
--- a/sw/source/core/inc/UndoNumbering.hxx
+++ b/sw/source/core/inc/UndoNumbering.hxx
@@ -28,17 +28,9 @@
#ifndef SW_UNDO_NUMBERING_HXX
#define SW_UNDO_NUMBERING_HXX
+#include <vector>
#include <undobj.hxx>
-
-#ifndef _SVSTDARR_HXX
-#define _SVSTDARR_USHORTS
-#define _SVSTDARR_ULONGS
-#define _SVSTDARR_BOOLS
-#define _SVSTDARR_BYTES
-#define _SVSTDARR_USHORTSSORT
-#include <svl/svstdarr.hxx>
-#endif
-
+#include <boost/shared_ptr.hpp>
#include <numrule.hxx>
@@ -78,9 +70,13 @@ public:
class SwUndoDelNum : public SwUndo, private SwUndRng
{
- SvULongs aNodeIdx;
- SvBytes aLevels;
- SvBools aRstLRSpaces;
+ struct NodeLevel
+ {
+ sal_uLong index;
+ int level;
+ inline NodeLevel(sal_uLong idx, int lvl) : index(idx), level(lvl) {};
+ };
+ std::vector<NodeLevel> aNodes;
SwHistory* pHistory;
public:
SwUndoDelNum( const SwPaM& rPam );
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index 40032e9dfa86..d7705a398ee2 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -39,10 +39,10 @@
#include <svl/svstdarr.hxx>
#endif
+#include <vector>
#include <swtypes.hxx>
#include <itabenum.hxx>
-
class SfxItemSet;
struct SwSaveRowSpan;
@@ -188,7 +188,7 @@ class SwUndoTblNdsChg : public SwUndo
SvULongs* pNewSttNds;
SwUndoSaveSections* pDelSects;
} Ptrs;
- SvBools aMvBoxes; // for SplitRow (split Nodes of Box)
+ std::vector<bool> aMvBoxes; // for SplitRow (split Nodes of Box)
long nMin, nMax; // for redo of delete column
sal_uLong nSttNode, nCurrBox;
sal_uInt16 nCount, nRelDiff, nAbsDiff, nSetColType;
diff --git a/sw/source/core/inc/acorrect.hxx b/sw/source/core/inc/acorrect.hxx
index d52d3a70f4b5..38975d37969f 100644
--- a/sw/source/core/inc/acorrect.hxx
+++ b/sw/source/core/inc/acorrect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -120,3 +121,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/anchoredobjectposition.hxx b/sw/source/core/inc/anchoredobjectposition.hxx
index 178a07c7bec7..88affdb989b2 100644
--- a/sw/source/core/inc/anchoredobjectposition.hxx
+++ b/sw/source/core/inc/anchoredobjectposition.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,7 @@
#define _ANCHOREDOBJECTPOSITION_HXX
#include <swtypes.hxx>
-// OD 2004-03-16 #i11860#
+// #i11860#
#include <frame.hxx>
class SdrObject;
@@ -40,7 +41,7 @@ class SwRect;
class SvxLRSpaceItem;
class SvxULSpaceItem;
class SwFmtHoriOrient;
-// OD 2004-03-23 #i26701#
+// #i26701#
class SwAnchoredObject;
namespace objectpositioning
@@ -56,7 +57,7 @@ namespace objectpositioning
// information about object
// does the object represents a Writer fly frame
bool mbIsObjFly;
- // OD 2004-03-23 #i26791# - anchored object the object belongs to;
+ // #i26791# - anchored object the object belongs to;
SwAnchoredObject* mpAnchoredObj;
// frame the object is anchored at
SwFrm* mpAnchorFrm;
@@ -64,25 +65,20 @@ namespace objectpositioning
SwContact* mpContact;
// frame format
const SwFrmFmt* mpFrmFmt;
- // --> OD 2006-03-15 #i62875#
+ // #i62875#
bool mbFollowTextFlow;
- // <--
- // --> OD 2006-03-15 #i62875#
+ // #i62875#
// for compatibility option <DoNotCaptureDrawObjsOnPage>
bool mbDoNotCaptureAnchoredObj;
- // <--
/** determine information about object
- OD 30.07.2003 #110978#
member <mbIsObjFly>, <mpAnchoredObj>, <mpAnchorFrm>, <mpContact>
and <mpFrmFmt> are set
-
- @author OD
*/
void _GetInfoAboutObj();
- // --> OD 2006-03-15 #i62875#
+ // #i62875#
// --> OD 2009-09-01 #mongolianlayout# - add parameter <bVertL2R>
SwTwips _ImplAdjustVertRelPos( const SwTwips nTopOfAnch,
const bool bVert,
@@ -93,7 +89,6 @@ namespace objectpositioning
const bool bCheckBottom = true ) const;
SwTwips _ImplAdjustHoriRelPos( const SwFrm& _rPageAlignLayFrm,
const SwTwips _nProposedRelPosX ) const;
- // <--
protected:
SwAnchoredObjectPosition( SdrObject& _rDrawObj );
@@ -124,27 +119,24 @@ namespace objectpositioning
{
return *mpFrmFmt;
}
- // --> OD 2006-03-15 #i62875#
+ // #i62875#
inline bool DoesObjFollowsTextFlow() const
{
return mbFollowTextFlow;
}
- // <--
// virtual methods providing data for to character anchored objects.
virtual bool IsAnchoredToChar() const;
virtual const SwFrm* ToCharOrientFrm() const;
virtual const SwRect* ToCharRect() const;
- // OD 12.11.2003 #i22341#
+ // #i22341#
virtual SwTwips ToCharTopOfLine() const;
// *********************************************************************
/** helper method to determine top of a frame for the vertical
object positioning
- OD 2004-03-11 #i11860#
-
- @author OD
+ #i11860#
*/
SwTwips _GetTopForObjPos( const SwFrm& _rFrm,
const SwRectFn& _fnRect,
@@ -158,7 +150,7 @@ namespace objectpositioning
SwTwips& _orAlignAreaOffset ) const;
// *********************************************************************
- // --> OD 2004-06-17 #i26791# - add output parameter <_roVertOffsetToFrmAnchorPos>
+ // #i26791# - add output parameter <_roVertOffsetToFrmAnchorPos>
SwTwips _GetVertRelPos( const SwFrm& _rVertOrientFrm,
const SwFrm& _rPageAlignLayFrm,
const sal_Int16 _eVertOrient,
@@ -172,9 +164,9 @@ namespace objectpositioning
/** adjust calculated vertical in order to keep object inside
'page' alignment layout frame.
- OD 2004-07-22 #i31805# - add parameter <bCheckBottom>
- OD 2004-10-08 #i26945# - add parameter <bFollowTextFlow>
- OD 2006-03-15 #i62875# - made inline, intrinsic actions moved
+ #i31805# - add parameter <_bCheckBottom>
+ #i26945# - add parameter <_bFollowTextFlow>
+ #i62875# - made inline, intrinsic actions moved
to private method <_ImplAdjustVertRelPos>, which is only
called, if <mbDoNotCaptureAnchoredObj> not set.
OD 2009-09-01 #mongolianlayout# - add parameter <bVertL2R>
@@ -207,8 +199,6 @@ namespace objectpositioning
input parameter - boolean indicating, if bottom of anchored
object has to be checked and thus, (if needed) the proposed
relative position has to be adjusted. default value <true>
-
- @author OD
*/
inline SwTwips _AdjustVertRelPos( const SwTwips nTopOfAnch,
const bool bVert,
@@ -230,11 +220,9 @@ namespace objectpositioning
// *********************************************************************
/** calculate relative horizontal position
- --> OD 2004-06-17 #i26791# - add output parameter
+ #i26791# - add output parameter
<_roHoriOffsetToFrmAnchorPos>
- @author OD
-
@param _rHoriOrientFrm
input parameter - frame the horizontal position of the object
is oriented at.
@@ -280,12 +268,10 @@ namespace objectpositioning
/** adjust calculated horizontal in order to keep object inside
'page' alignment layout frame for object type position TO_CNTNT
- OD 2006-03-15 #i62875# - made inline, intrinsic actions moved
+ #i62875# - made inline, intrinsic actions moved
to private method <_ImplAdjustHoriRelPos>, which is only
called, if <mbDoNotCaptureAnchoredObj> not set.
- @author OD
-
@param _rPageAlignLayFrm
input paramter - layout frame, which determines the 'page area'
the object has to be horizontal positioned in.
@@ -307,8 +293,6 @@ namespace objectpositioning
// *********************************************************************
/** toggle given horizontal orientation and relative alignment
- @author OD
-
@param _bToggleLeftRight
input parameter - boolean indicating, if horizontal orientation
and relative alignment has to be toggled.
@@ -329,8 +313,6 @@ namespace objectpositioning
// *********************************************************************
/** determine alignment values for horizontal position of object
- @author OD
-
@param _rHoriOrientFrm
input parameter - frame the horizontal position of the object
is oriented at.
@@ -378,8 +360,6 @@ namespace objectpositioning
/** adjust calculated horizontal position in order to draw object
aside other objects with same positioning
- @author OD
-
@param _rHoriOrientFrm
input parameter - frame the horizontal position of the object
is oriented at.
@@ -423,8 +403,6 @@ namespace objectpositioning
method used by <_AdjustHoriRelPosForDrawAside(..)>
- @author OD
-
@param _pFly
input parameter - fly frame the draw aside check is done for.
@@ -468,8 +446,6 @@ namespace objectpositioning
positioning.
method used by <_DrawAsideFly(..)>
- @author OD
-
@param _eRelOrient1
input parameter - alignment 1
@@ -494,3 +470,5 @@ namespace objectpositioning
} // namespace objectpositioning
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/ascharanchoredobjectposition.hxx b/sw/source/core/inc/ascharanchoredobjectposition.hxx
index 2f5e2d1bb164..f83cdf6259c7 100644
--- a/sw/source/core/inc/ascharanchoredobjectposition.hxx
+++ b/sw/source/core/inc/ascharanchoredobjectposition.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -169,3 +170,5 @@ namespace objectpositioning
} // namespace objectpositioning
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/blink.hxx b/sw/source/core/inc/blink.hxx
index 11f11d6d188a..1a4b0a9252c0 100644
--- a/sw/source/core/inc/blink.hxx
+++ b/sw/source/core/inc/blink.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,4 @@ extern SwBlink *pBlink;
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/bodyfrm.hxx b/sw/source/core/inc/bodyfrm.hxx
index 9bd12a45205f..5d8a7f30f43b 100644
--- a/sw/source/core/inc/bodyfrm.hxx
+++ b/sw/source/core/inc/bodyfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,7 +44,11 @@ protected:
public:
SwBodyFrm( SwFrmFmt* );
+ virtual void Paint( const SwRect&, const SwPrintData *pPrintData = NULL ) const;
+
DECL_FIXEDMEMPOOL_NEWDEL(SwBodyFrm)
};
#endif //_BODYFRM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx
index 90c6a44fa239..b495e987d404 100644
--- a/sw/source/core/inc/bookmrk.hxx
+++ b/sw/source/core/inc/bookmrk.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,6 +36,7 @@
#include <boost/scoped_ptr.hpp>
#include <boost/noncopyable.hpp>
#include <map>
+#include <rtl/ustring.hxx>
#include <IMark.hxx>
@@ -255,7 +257,11 @@ namespace sw { namespace mark
virtual void InitDoc(SwDoc* const io_pDoc);
bool IsChecked() const;
void SetChecked(bool checked);
+
+ virtual rtl::OUString toString( ) const;
};
}}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index 1a5b24b58fa1..b50a1a7e3612 100644
--- a/sw/source/core/inc/cellfrm.hxx
+++ b/sw/source/core/inc/cellfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,3 +71,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx
index 431f93912140..3a21ef14e0bc 100644
--- a/sw/source/core/inc/cntfrm.hxx
+++ b/sw/source/core/inc/cntfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -145,3 +146,5 @@ inline SwCntntFrm *SwCntntFrm::GetFollow()
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/colfrm.hxx b/sw/source/core/inc/colfrm.hxx
index 4d8a54528aa5..011daf07fa74 100644
--- a/sw/source/core/inc/colfrm.hxx
+++ b/sw/source/core/inc/colfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,3 +41,5 @@ public:
};
#endif //_COLFRM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/crossrefbookmark.hxx b/sw/source/core/inc/crossrefbookmark.hxx
index 27f920be7651..ef5f8933a81a 100644
--- a/sw/source/core/inc/crossrefbookmark.hxx
+++ b/sw/source/core/inc/crossrefbookmark.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,3 +98,5 @@ namespace sw { namespace mark
}}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/dbg_lay.hxx b/sw/source/core/inc/dbg_lay.hxx
index 3885d9d7dda5..d290e9c8c178 100644
--- a/sw/source/core/inc/dbg_lay.hxx
+++ b/sw/source/core/inc/dbg_lay.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,7 +64,7 @@
#define SNAP_FLYFRAMES 0x00000002
#define SNAP_TABLECONT 0x00000004
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
#include "swtypes.hxx"
@@ -118,3 +119,5 @@ public:
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx
index 23216709a50a..9e3cf0dff55e 100644
--- a/sw/source/core/inc/dflyobj.hxx
+++ b/sw/source/core/inc/dflyobj.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -127,7 +128,7 @@ public:
void SetRect() const;
// ist eine URL an einer Grafik gesetzt, dann ist das ein Makro-Object
- virtual FASTBOOL HasMacro() const;
+ virtual bool HasMacro() const;
virtual SdrObject* CheckMacroHit (const SdrObjMacroHitRec& rRec) const;
virtual Pointer GetMacroPointer (const SdrObjMacroHitRec& rRec) const;
@@ -138,3 +139,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/docfld.hxx b/sw/source/core/inc/docfld.hxx
index dbce10e51db0..26d19dc4d859 100644
--- a/sw/source/core/inc/docfld.hxx
+++ b/sw/source/core/inc/docfld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -191,3 +192,4 @@ public:
#endif // _DOCFLD_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/docsort.hxx b/sw/source/core/inc/docsort.hxx
index 5d87e37e9219..aa2d096f3cb8 100644
--- a/sw/source/core/inc/docsort.hxx
+++ b/sw/source/core/inc/docsort.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,6 +25,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
#ifndef _SORT_HXX
#define _SORT_HXX
@@ -174,3 +176,5 @@ private:
inline sal_Bool FlatFndBox::HasItemSets() const { return 0 != ppItemSets; }
#endif // _NDSORT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/doctxm.hxx b/sw/source/core/inc/doctxm.hxx
index 5e3adfb1fd3d..842b6a319726 100644
--- a/sw/source/core/inc/doctxm.hxx
+++ b/sw/source/core/inc/doctxm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,9 +110,7 @@ public:
sal_Bool SetPosAtStartEnd( SwPosition& rPos, sal_Bool bAtStart = sal_True ) const;
};
-/* -----------------02.09.99 07:52-------------------
- --------------------------------------------------*/
struct SwDefTOXBase_Impl
{
SwTOXBase* pContBase;
@@ -145,3 +144,5 @@ struct SwDefTOXBase_Impl
};
#endif // _DOCTXM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/drawdev.hxx b/sw/source/core/inc/drawdev.hxx
index 7b851403355b..31d630a741e4 100644
--- a/sw/source/core/inc/drawdev.hxx
+++ b/sw/source/core/inc/drawdev.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include "swrect.hxx"
-#ifndef _OUTDEV_HXX //autogen
#include <vcl/outdev.hxx>
-#endif
/*************************************************************************
* class SwDrawDev
@@ -138,3 +137,5 @@ inline void SwDrawDev::DrawRect( const SwRect& rRect,
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/drawfont.hxx b/sw/source/core/inc/drawfont.hxx
index ba16257d3189..aad3c9f00787 100644
--- a/sw/source/core/inc/drawfont.hxx
+++ b/sw/source/core/inc/drawfont.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#include <tools/solar.h>
#include <tools/string.hxx>
-#include <errhdl.hxx>
class SwTxtFrm;
class OutputDevice;
@@ -94,7 +94,7 @@ class SwDrawTextInfo
SwDrawTextInfo(); // nicht zulaessig
public:
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool bPos : 1; // These flags should control, that the appropriate
sal_Bool bWrong : 1; // Set-function has been called before calling
sal_Bool bGrammarCheck : 1; // the Get-function of a member
@@ -157,7 +157,7 @@ public:
bUpper = sal_False;
bDrawSpace = sal_False;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// these flags control, whether the matching member variables have
// been set by using the Set-function before they may be accessed
// by their Get-function:
@@ -198,13 +198,17 @@ public:
const Point &GetPos() const
{
- ASSERT( bPos, "DrawTextInfo: Undefined Position" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bPos, "DrawTextInfo: Undefined Position" );
+#endif
return *pPos;
}
xub_StrLen *GetHyphPos() const
{
- ASSERT( bHyph, "DrawTextInfo: Undefined Hyph Position" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bHyph, "DrawTextInfo: Undefined Hyph Position" );
+#endif
return pHyphPos;
}
@@ -215,13 +219,17 @@ public:
const SwWrongList* GetWrong() const
{
- ASSERT( bWrong, "DrawTextInfo: Undefined WrongList" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bWrong, "DrawTextInfo: Undefined WrongList" );
+#endif
return pWrong;
}
const SwWrongList* GetGrammarCheck() const
{
- ASSERT( bGrammarCheck, "DrawTextInfo: Undefined GrammarCheck List" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bGrammarCheck, "DrawTextInfo: Undefined GrammarCheck List" );
+#endif
return pGrammarCheck;
}
@@ -232,13 +240,17 @@ public:
const Size &GetSize() const
{
- ASSERT( bSize, "DrawTextInfo: Undefined Size" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bSize, "DrawTextInfo: Undefined Size" );
+#endif
return *pSize;
}
SwFont* GetFont() const
{
- ASSERT( bFnt, "DrawTextInfo: Undefined Font" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bFnt, "DrawTextInfo: Undefined Font" );
+#endif
return pFnt;
}
@@ -259,7 +271,9 @@ public:
xub_StrLen GetOfst() const
{
- ASSERT( bOfst, "DrawTextInfo: Undefined Offset" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bOfst, "DrawTextInfo: Undefined Offset" );
+#endif
return nOfst;
}
@@ -270,19 +284,25 @@ public:
long GetLeft() const
{
- ASSERT( bLeft, "DrawTextInfo: Undefined left range" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bLeft, "DrawTextInfo: Undefined left range" );
+#endif
return nLeft;
}
long GetRight() const
{
- ASSERT( bRight, "DrawTextInfo: Undefined right range" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bRight, "DrawTextInfo: Undefined right range" );
+#endif
return nRight;
}
long GetKanaDiff() const
{
- ASSERT( bKana, "DrawTextInfo: Undefined kana difference" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bKana, "DrawTextInfo: Undefined kana difference" );
+#endif
return nKanaDiff;
}
@@ -293,7 +313,9 @@ public:
sal_uInt16 GetAscent() const
{
- ASSERT( bAscent, "DrawTextInfo: Undefined Ascent" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bAscent, "DrawTextInfo: Undefined Ascent" );
+#endif
return nAscent;
}
@@ -304,7 +326,9 @@ public:
long GetSperren() const
{
- ASSERT( bSperr, "DrawTextInfo: Undefined >Sperren<" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bSperr, "DrawTextInfo: Undefined >Sperren<" );
+#endif
return nSperren;
}
@@ -315,13 +339,17 @@ public:
long GetSpace() const
{
- ASSERT( bSpace, "DrawTextInfo: Undefined Spacing" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bSpace, "DrawTextInfo: Undefined Spacing" );
+#endif
return nSpace;
}
xub_StrLen GetNumberOfBlanks() const
{
- ASSERT( bNumberOfBlanks, "DrawTextInfo::Undefined NumberOfBlanks" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bNumberOfBlanks, "DrawTextInfo::Undefined NumberOfBlanks" );
+#endif
return nNumberOfBlanks;
}
@@ -337,13 +365,17 @@ public:
sal_Bool GetUpper() const
{
- ASSERT( bUppr, "DrawTextInfo: Undefined Upperflag" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bUppr, "DrawTextInfo: Undefined Upperflag" );
+#endif
return bUpper;
}
sal_Bool GetDrawSpace() const
{
- ASSERT( bDrawSp, "DrawTextInfo: Undefined DrawSpaceflag" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bDrawSp, "DrawTextInfo: Undefined DrawSpaceflag" );
+#endif
return bDrawSpace;
}
@@ -380,7 +412,7 @@ public:
void SetPos( const Point &rNew )
{
pPos = &rNew;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bPos = sal_True;
#endif
}
@@ -388,7 +420,7 @@ public:
void SetHyphPos( xub_StrLen *pNew )
{
pHyphPos = pNew;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bHyph = sal_True;
#endif
}
@@ -401,7 +433,7 @@ public:
void SetWrong( const SwWrongList* pNew )
{
pWrong = pNew;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bWrong = sal_True;
#endif
}
@@ -409,7 +441,7 @@ public:
void SetGrammarCheck( const SwWrongList* pNew )
{
pGrammarCheck = pNew;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bGrammarCheck = sal_True;
#endif
}
@@ -422,7 +454,7 @@ public:
void SetSize( const Size &rNew )
{
pSize = &rNew;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bSize = sal_True;
#endif
}
@@ -430,7 +462,7 @@ public:
void SetFont( SwFont* pNew )
{
pFnt = pNew;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bFnt = sal_True;
#endif
}
@@ -448,7 +480,7 @@ public:
void SetOfst( xub_StrLen nNew )
{
nOfst = nNew;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bOfst = sal_True;
#endif
}
@@ -456,7 +488,7 @@ public:
void SetLeft( long nNew )
{
nLeft = nNew;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bLeft = sal_True;
#endif
}
@@ -464,7 +496,7 @@ public:
void SetRight( long nNew )
{
nRight = nNew;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bRight = sal_True;
#endif
}
@@ -472,7 +504,7 @@ public:
void SetKanaDiff( long nNew )
{
nKanaDiff = nNew;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bKana = sal_True;
#endif
}
@@ -485,7 +517,7 @@ public:
void SetAscent( sal_uInt16 nNew )
{
nAscent = nNew;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bAscent = sal_True;
#endif
}
@@ -507,7 +539,7 @@ public:
nSpace = nNew;
nSperren = 0;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bSpace = sal_True;
bSperr = sal_True;
#endif
@@ -515,7 +547,7 @@ public:
void SetNumberOfBlanks( xub_StrLen nNew )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bNumberOfBlanks = sal_True;
#endif
nNumberOfBlanks = nNew;
@@ -544,7 +576,7 @@ public:
void SetUpper( sal_Bool bNew )
{
bUpper = bNew;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bUppr = sal_True;
#endif
}
@@ -552,7 +584,7 @@ public:
void SetDrawSpace( sal_Bool bNew )
{
bDrawSpace = bNew;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bDrawSp = sal_True;
#endif
}
@@ -592,3 +624,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/dview.hxx b/sw/source/core/inc/dview.hxx
index 60021d8fef84..b51f555ea384 100644
--- a/sw/source/core/inc/dview.hxx
+++ b/sw/source/core/inc/dview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -132,3 +133,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/environmentofanchoredobject.hxx b/sw/source/core/inc/environmentofanchoredobject.hxx
index 00a1d509ece4..0700256555f2 100644
--- a/sw/source/core/inc/environmentofanchoredobject.hxx
+++ b/sw/source/core/inc/environmentofanchoredobject.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,10 +41,6 @@ namespace objectpositioning
public:
/** construtor
- OD 05.11.2003
-
- @author OD
-
@param _bFollowTextFlow
input parameter - indicates, if the anchored object, for which
this environment is instantiated, follow the text flow or not
@@ -51,17 +48,12 @@ namespace objectpositioning
SwEnvironmentOfAnchoredObject( const bool _bFollowTextFlow );
/** destructor
-
- OD 05.11.2003
-
- @author OD
*/
~SwEnvironmentOfAnchoredObject();
/** determine environment layout frame for possible horizontal object
positions respectively for alignment to 'page areas'
- OD 05.11.2003
this is, if object has to follow the text flow:
- cell frame, if anchored inside a cell
- fly frame, if anchored inside a fly frame
@@ -69,11 +61,9 @@ namespace objectpositioning
this is, if object hasn't to follow the text flow:
- page frame.
- OD 2005-01-20 #118546# - no exception any more. Thus remove
+ - no exception any more. Thus remove
parameter <_bForPageAlignment>
- @author OD
-
@param _rHoriOrientFrm
input parameter - frame, at which the horizontal position is
oriented at (typically it's the anchor frame).
@@ -87,7 +77,6 @@ namespace objectpositioning
/** determine environment layout frame for possible vertical object
positions respectively for alignments to 'page areas'
- OD 05.11.2003
this is, if object has to follow the text flow:
- cell frame, if anchored inside a cell
- fly frame, if anchored inside a fly frame
@@ -97,11 +86,9 @@ namespace objectpositioning
this is, if object hasn't to follow the text flow:
- page frame.
- OD 2005-01-20 #118546# - no exception any more. Thus remove
+ - no exception any more. Thus remove
parameter <_bForPageAlignment>
- @author OD
-
@param _rVertOrientFrm
input parameter - frame, at which the vertical position is
oriented at (typically it's the anchor frame).
@@ -115,3 +102,5 @@ namespace objectpositioning
} // namespace objectpositioning
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/finalthreadmanager.hxx b/sw/source/core/inc/finalthreadmanager.hxx
index 4d60514506c8..19e902c53a37 100644
--- a/sw/source/core/inc/finalthreadmanager.hxx
+++ b/sw/source/core/inc/finalthreadmanager.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,3 +104,5 @@ private:
bool mbRegisteredAtDesktop;
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx
index d1290c66e989..1403718101d8 100644
--- a/sw/source/core/inc/flowfrm.hxx
+++ b/sw/source/core/inc/flowfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,16 +48,13 @@
//diesem befreundet. So kann der FlowFrm anstelle des this-Pointer mit der
//Referenz auf den SwFrm arbeiten.
-//#include "frame.hxx" //fuer inlines
-
class SwPageFrm;
class SwRect;
class SwBorderAttrs;
class SwDoc;
class SwNodeIndex;
-// --> OD 2005-03-04 #i44049#
+// #i44049#
class SwObjectFormatterTxtFrm;
-// <--
void MakeFrms( SwDoc *, const SwNodeIndex &, const SwNodeIndex & );
@@ -67,9 +65,8 @@ class SwFlowFrm
friend inline void PrepareUnlock( SwFlowFrm * );
friend inline void TableSplitRecalcLock( SwFlowFrm * );
friend inline void TableSplitRecalcUnlock( SwFlowFrm * );
- // --> OD 2005-03-04 #i44049#
+ // #i44049#
friend class SwObjectFormatterTxtFrm;
- // <--
//TblSel darf das Follow-Bit zuruecksetzen.
friend inline void UnsetFollow( SwFlowFrm *pFlow );
@@ -92,31 +89,25 @@ class SwFlowFrm
/** helper method to determine previous frame for calculation of the
upper space
- OD 2004-03-10 #i11860#
+ #i11860#
@param _pProposedPrevFrm
optional input parameter - pointer to frame, which should be used
instead of the direct previous frame.
-
- @author OD
*/
const SwFrm* _GetPrevFrmForUpperSpaceCalc( const SwFrm* _pProposedPrevFrm = 0L ) const;
/** method to detemine the upper space amount, which is considered for
the previous frame
- OD 2004-03-11 #i11860#
-
- @author OD
+ #i11860#
*/
SwTwips _GetUpperSpaceAmountConsideredForPrevFrm() const;
/** method to detemine the upper space amount, which is considered for
the page grid
- OD 2004-03-12 #i11860#
-
- @author OD
+ #i11860#
*/
SwTwips _GetUpperSpaceAmountConsideredForPageGrid(
const SwTwips _nUpperSpaceWithoutGrid ) const;
@@ -137,9 +128,8 @@ protected:
//Prueft ob Vorwaertsfluss noch Sinn macht Endloswanderschaften (unterbinden)
inline sal_Bool IsFwdMoveAllowed();
- // --> OD 2005-03-08 #i44049# - method <CalcCntnt(..)> has to check this property.
+ // #i44049# - method <CalcCntnt(..)> has to check this property.
friend void CalcCntnt( SwLayoutFrm *pLay, bool bNoColl, bool bNoCalcFollow );
- // <--
sal_Bool IsKeepFwdMoveAllowed(); //Wie oben, Move fuer Keep.
//Prueft ob ein Obj das Umlauf wuenscht ueberlappt.
@@ -202,11 +192,9 @@ public:
/** method to determine the upper space hold by the frame
- OD 2004-03-12 #i11860# - add 3rd parameter <_bConsiderGrid> to get
+ #i11860# - add 3rd parameter <_bConsiderGrid> to get
the upper space with and without considering the page grid
(default value: <sal_True>)
-
- @author ?
*/
SwTwips CalcUpperSpace( const SwBorderAttrs *pAttrs = NULL,
const SwFrm* pPr = NULL,
@@ -216,26 +204,18 @@ public:
the previous frame and the page grid, if option 'Use former object
positioning' is OFF
- OD 2004-03-18 #i11860#
-
- @author OD
+ #i11860#
*/
SwTwips GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() const;
/** calculation of lower space
-
- OD 2004-03-02 #106629#
-
- @author OD
*/
SwTwips CalcLowerSpace( const SwBorderAttrs* _pAttrs = 0L ) const;
/** calculation of the additional space to be considered, if flow frame
is the last inside a table cell
- OD 2004-07-16 #i26250
-
- @author OD
+ #i26250
@param _pAttrs
optional input parameter - border attributes of the flow frame.
@@ -271,3 +251,5 @@ inline sal_Bool SwFlowFrm::IsFwdMoveAllowed()
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index d171bd0b0a26..7b1adc88c661 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,7 @@ class SwSpzFrmFmts;
class SwAttrSetChg;
class PolyPolygon;
-// OD 2004-03-22 #i26791#
+// #i26791#
#include <anchoredobject.hxx>
//Sucht ausgehend von pOldAnch einen Anker fuer Absatzgebundene Rahmen.
@@ -53,7 +54,7 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove = sal_True );
//allg. Basisklasse fuer alle Freifliegenden Rahmen
-// OD 2004-03-22 #i26791# - inherit also from <SwAnchoredFlyFrm>
+// #i26791# - inherit also from <SwAnchoredFlyFrm>
class SwFlyFrm : public SwLayoutFrm, public SwAnchoredObject
{
//darf Locken. Definiert in frmtool.cxx
@@ -75,7 +76,7 @@ protected:
SwFlyFrm *pPrevLink, // Vorgaenger/Nachfolger fuer Verkettung mit
*pNextLink; // Textfluss
- // OD 2004-05-27 #i26791# - moved to <SwAnchoredObject>
+ // #i26791# - moved to <SwAnchoredObject>
// Point aRelPos; //Die Relative Position zum Master
private:
@@ -116,8 +117,6 @@ protected:
// invisible layer.
friend class SwNoTxtFrm; // Darf NotifyBackground rufen
-// virtual void NotifyBackground( SwPageFrm *pPage,
-// const SwRect& rRect, PrepareHint eHint) = 0;
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
void MakePrtArea( const SwBorderAttrs &rAttrs );
@@ -136,22 +135,19 @@ protected:
/** method to assure that anchored object is registered at the correct
page frame
- OD 2004-07-02 #i28701#
-
- @author OD
+ #i28701#
*/
virtual void RegisterAtCorrectPage();
- // --> OD 2006-08-10 #i68520#
+ // #i68520#
virtual bool _SetObjTop( const SwTwips _nTop );
virtual bool _SetObjLeft( const SwTwips _nLeft );
- // <--
- // --> OD 2006-10-05 #i70122#
+ // #i70122#
virtual const SwRect GetObjBoundRect() const;
- // <--
+
public:
- // OD 2004-03-23 #i26791#
+ // #i26791#
TYPEINFO();
virtual ~SwFlyFrm();
@@ -166,7 +162,7 @@ public:
virtual void CheckDirection( sal_Bool bVert );
virtual void Cut();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
#endif
@@ -184,7 +180,7 @@ public:
SwFlyFrm *FindChainNeighbour( SwFrmFmt &rFmt, SwFrm *pAnch = 0 );
- // OD 2004-03-24 #i26791#
+ // #i26791#
const SwVirtFlyDrawObj* GetVirtDrawObj() const;
SwVirtFlyDrawObj *GetVirtDrawObj();
void NotifyDrawObj();
@@ -223,7 +219,7 @@ public:
SwFrm *FindLastLower();
- // OD 16.04.2003 #i13147# - add parameter <_bForPaint> to avoid load of
+ // #i13147# - add parameter <_bForPaint> to avoid load of
// the graphic during paint. Default value: sal_False
sal_Bool GetContour( PolyPolygon& rContour,
const sal_Bool _bForPaint = sal_False ) const;
@@ -232,40 +228,32 @@ public:
//Auf dieser Shell painten (PreView, Print-Flag usw. rekursiv beachten)?.
static sal_Bool IsPaint( SdrObject *pObj, const ViewShell *pSh );
- /** SwFlyFrm::IsBackgroundTransparent - for feature #99657#
+ /** SwFlyFrm::IsBackgroundTransparent
- OD 12.08.2002
determines, if background of fly frame has to be drawn transparent
definition found in /core/layout/paintfrm.cxx
- @author OD
-
@return true, if background color is transparent or a existing background
graphic is transparent.
*/
sal_Bool IsBackgroundTransparent() const;
- /** SwFlyFrm::IsShadowTransparent - for feature #99657#
+ /** SwFlyFrm::IsShadowTransparent
- OD 05.08.2002
determine, if shadow color of fly frame has to be drawn transparent
definition found in /core/layout/paintfrm.cxx
- @author OD
-
@return true, if shadow color is transparent.
*/
sal_Bool IsShadowTransparent() const;
- // OD 2004-01-19 #110582#
void Chain( SwFrm* _pAnchor );
void Unchain();
void InsertCnt();
void DeleteCnt();
- // OD 2004-02-12 #110582#-2
void InsertColumns();
- // OD 2004-03-23 #i26791# - pure virtual methods of base class <SwAnchoredObject>
+ // #i26791# - pure virtual methods of base class <SwAnchoredObject>
virtual void MakeObjPos();
virtual void InvalidateObjPos();
@@ -276,12 +264,10 @@ public:
/** method to determine, if a format on the Writer fly frame is possible
- OD 2004-05-11 #i28701#
+ #i28701#
refine 'IsFormatPossible'-conditions of method
<SwAnchoredObject::IsFormatPossible()> by:
format isn't possible, if Writer fly frame is locked resp. col-locked.
-
- @author OD
*/
virtual bool IsFormatPossible() const;
@@ -292,3 +278,5 @@ public:
virtual SwFlyFrmFmt *GetFmt();
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 079272eb6db1..cf46533c98e7 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,7 @@
#ifndef _FLYFRMS_HXX
#define _FLYFRMS_HXX
#include "flyfrm.hxx"
-// --> OD 2004-06-23 #i28701#
+// --> #i28701#
class SwFlyAtCntFrm;
//Basisklasse fuer diejenigen Flys, die sich relativ frei Bewegen koennen -
@@ -36,12 +37,12 @@ class SwFlyFreeFrm : public SwFlyFrm
{
SwPageFrm *pPage; //Bei dieser Seite ist der Fly angemeldet.
- // --> OD 2004-11-15 #i34753# - flag for at-page anchored Writer fly frames
+ // --> #i34753# - flag for at-page anchored Writer fly frames
// to prevent a positioning - call of method <MakeObjPos()> -, if Writer
// fly frame is already clipped during its format by the object formatter.
bool mbNoMakePos;
// <--
- // --> OD 2004-11-12 #i37068# - flag to prevent move in method
+ // --> #i37068# - flag to prevent move in method
// <CheckClip(..)>
bool mbNoMoveOnCheckClip;
// <--
@@ -49,7 +50,7 @@ class SwFlyFreeFrm : public SwFlyFrm
/** determines, if direct environment of fly frame has 'auto' size
- OD 07.08.2003 #i17297#, #111066#, #111070#
+ #i17297#
start with anchor frame and search for a header, footer, row or fly frame
stopping at page frame.
return <true>, if such a frame is found and it has 'auto' size.
@@ -62,7 +63,7 @@ class SwFlyFreeFrm : public SwFlyFrm
bool HasEnvironmentAutoSize() const;
protected:
- // OD 2004-05-12 #i28701# - new friend class <SwFlyNotify> for access to
+ // #i28701# - new friend class <SwFlyNotify> for access to
// method <NotifyBackground>
friend class SwFlyNotify;
virtual void NotifyBackground( SwPageFrm *pPage,
@@ -71,14 +72,14 @@ protected:
SwFlyFreeFrm( SwFlyFrmFmt*, SwFrm *pAnchor );
public:
- // --> OD 2004-06-29 #i28701#
+ // --> #i28701#
TYPEINFO();
virtual ~SwFlyFreeFrm();
virtual void MakeAll();
- // --> OD 2004-11-12 #i37068# - accessors for member <mbNoMoveOnCheckClip>
+ // --> #i37068# - accessors for member <mbNoMoveOnCheckClip>
inline void SetNoMoveOnCheckClip( const bool _bNewNoMoveOnCheckClip )
{
mbNoMoveOnCheckClip = _bNewNoMoveOnCheckClip;
@@ -88,7 +89,7 @@ public:
return mbNoMoveOnCheckClip;
}
// <--
- // --> OD 2004-11-15 #i34753# - accessors for member <mbNoMakePos>
+ // --> #i34753# - accessors for member <mbNoMakePos>
inline void SetNoMakePos( const bool _bNoMakePos )
{
if ( IsFlyLayFrm() )
@@ -111,7 +112,7 @@ public:
/** method to determine, if a format on the Writer fly frame is possible
- OD 2004-05-11 #i28701#
+ #i28701#
refine 'IsFormatPossible'-conditions of method
<SwFlyFrm::IsFormatPossible()> by:
format isn't possible, if Writer fly frame isn't registered at a page frame
@@ -127,7 +128,7 @@ public:
class SwFlyLayFrm : public SwFlyFreeFrm
{
public:
- // --> OD 2004-06-29 #i28701#
+ // --> #i28701#
TYPEINFO();
SwFlyLayFrm( SwFlyFrmFmt*, SwFrm *pAnchor );
@@ -143,20 +144,20 @@ class SwFlyAtCntFrm : public SwFlyFreeFrm
protected:
virtual void MakeAll();
- // OD 2004-05-12 #i28701#
+ // #i28701#
virtual bool _InvalidationAllowed( const InvalidationType _nInvalid ) const;
/** method to assure that anchored object is registered at the correct
page frame
- OD 2004-07-02 #i28701#
+ #i28701#
@author OD
*/
virtual void RegisterAtCorrectPage();
public:
- // --> OD 2004-06-29 #i28701#
+ // --> #i28701#
TYPEINFO();
SwFlyAtCntFrm( SwFlyFrmFmt*, SwFrm *pAnchor );
@@ -165,12 +166,12 @@ public:
void SetAbsPos( const Point &rNew );
- // OD 2004-03-23 #i26791#
+ // #i26791#
virtual void MakeObjPos();
/** method to determine, if a format on the Writer fly frame is possible
- OD 2004-05-11 #i28701#
+ #i28701#
refine 'IsFormatPossible'-conditions of method
<SwFlyFreeFrm::IsFormatPossible()> by:
format isn't possible, if method <MakeAll()> is already in progress.
@@ -195,7 +196,7 @@ protected:
virtual void MakeAll();
public:
- // --> OD 2004-06-29 #i28701#
+ // --> #i28701#
TYPEINFO();
SwFlyInCntFrm( SwFlyFrmFmt*, SwFrm *pAnchor );
@@ -229,10 +230,10 @@ public:
//siehe layact.cxx
void AddRefOfst( long nOfst ) { aRef.Y() += nOfst; }
- // OD 2004-03-23 #i26791#
+ // #i26791#
virtual void MakeObjPos();
- // --> OD 2004-12-02 #115759# - invalidate anchor frame on invalidation
+ // --> #115759# - invalidate anchor frame on invalidation
// of the position, because the position is calculated during the
// format of the anchor frame
virtual void _ActionOnInvalidation( const InvalidationType _nInvalid );
@@ -257,3 +258,5 @@ inline void SwFlyInCntFrm::ValidateCntnt() const
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx
index c95fc3f0a8bc..39a739ab41e2 100644
--- a/sw/source/core/inc/fntcache.hxx
+++ b/sw/source/core/inc/fntcache.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,7 +52,7 @@ class SwFntCache : public SwCache
public:
inline SwFntCache() : SwCache(50,50
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
, ByteString( RTL_CONSTASCII_STRINGPARAM(
"Globaler Font-Cache pFntCache" ))
#endif
@@ -158,3 +159,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 1b8762f71edd..ec1bc3870422 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,10 +29,16 @@
#define SW_FRAME_HXX
#include <svl/svarray.hxx>
+#include <editeng/borderline.hxx>
#include "swtypes.hxx" // fuer SwTwips
#include "swrect.hxx"
#include "calbck.hxx" // fuer SwClient
+#if OSL_DEBUG_LEVEL > 1
+#include <libxml/encoding.h>
+#include <libxml/xmlwriter.h>
+#endif
+
class SwLayoutFrm;
class SwRootFrm;
class SwPageFrm;
@@ -556,7 +563,7 @@ public:
const sal_Bool bLowerMode = sal_False,
const sal_Bool bLowerBorder = sal_False ) const;
void PaintBorderLine( const SwRect&, const SwRect&, const SwPageFrm*,
- const Color *pColor ) const;
+ const Color *pColor, const SvxBorderStyle = SOLID ) const;
//Retouche, nicht im Bereich des uebergebenen Rect!
void Retouche( const SwPageFrm *pPage, const SwRect &rRect ) const;
@@ -665,6 +672,7 @@ public:
SwRootFrm *FindRootFrm();
SwPageFrm *FindPageFrm();
SwFrm *FindColFrm();
+ SwRowFrm *FindRowFrm();
SwFtnBossFrm *FindFtnBossFrm( sal_Bool bFootnotes = sal_False );
SwTabFrm *ImplFindTabFrm();
SwFtnFrm *ImplFindFtnFrm();
@@ -952,6 +960,14 @@ public:
// FME 2007-08-30 #i81146# new loop control
void ValidateThisAndAllLowers( const sal_uInt16 nStage );
+
+public:
+#if OSL_DEBUG_LEVEL > 1
+ virtual void dumpAsXml(xmlTextWriterPtr writer);
+ virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer);
+ void dumpChildrenAsXml(xmlTextWriterPtr writer);
+#endif
+ bool IsCollapse() const;
};
inline sal_Bool SwFrm::IsInDocBody() const
@@ -1303,3 +1319,5 @@ inline sal_Bool SwFrm::IsAccessibleFrm() const
return GetType() & FRM_ACCESSIBLE ? sal_True : sal_False;
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/frminf.hxx b/sw/source/core/inc/frminf.hxx
index 347592a8c5f4..f05658c8ced7 100644
--- a/sw/source/core/inc/frminf.hxx
+++ b/sw/source/core/inc/frminf.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -83,3 +84,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 473e30549c66..eb8e04eb196d 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,8 @@
#include "layfrm.hxx"
#include "frmatr.hxx"
#include "swcache.hxx"
-// --> OD 2008-12-04 #i96772#
+// #i96772#
#include <editeng/lrspitem.hxx>
-// <--
class SwPageFrm;
class SwFlyFrm;
@@ -57,24 +57,23 @@ struct SwFindRowSpanCacheObj;
#define WEIT_WECH LONG_MAX - 20000 //Initale Position der Flys.
#define BROWSE_HEIGHT 56700L * 10L //10 Meter
-//#define BROWSE_HEIGHT 1440L * 45L // 45 inch, maximum size for pdf files
#define GRFNUM_NO 0
#define GRFNUM_YES 1
#define GRFNUM_REPLACE 2
//Painten des Hintergrunds. Mit Brush oder Graphic.
-// OD 05.08.2002 #99657# - add 6th parameter to indicate that method should
+// - add 6th parameter to indicate that method should
// consider background transparency, saved in the color of the brush item
void MA_FASTCALL DrawGraphic( const SvxBrushItem *, OutputDevice *,
const SwRect &rOrg, const SwRect &rOut, const sal_uInt8 nGrfNum = GRFNUM_NO,
const sal_Bool bConsiderBackgroundTransparency = sal_False );
-// OD 24.01.2003 #106593# - method to align rectangle
+// - method to align rectangle
// Created declaration here to avoid <extern> declarations
void MA_FASTCALL SwAlignRect( SwRect &rRect, ViewShell *pSh );
-// OD 24.01.2003 #106593# - method to align graphic rectangle
+// - method to align graphic rectangle
// Created declaration here to avoid <extern> declarations
void SwAlignGrfRect( SwRect *pGrfRect, const OutputDevice &rOut );
@@ -136,7 +135,7 @@ sal_Bool IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm );
const SwFrm * MA_FASTCALL FindPage( const SwRect &rRect, const SwFrm *pPage );
-// JP 07.05.98: wird von SwCntntNode::GetFrm und von SwFlyFrm::GetFrm
+// wird von SwCntntNode::GetFrm und von SwFlyFrm::GetFrm
// gerufen
SwFrm* GetFrmOfModify( SwModify const&, sal_uInt16 const nFrmType, const Point* = 0,
const SwPosition *pPos = 0,
@@ -145,7 +144,7 @@ SwFrm* GetFrmOfModify( SwModify const&, sal_uInt16 const nFrmType, const Point*
//Sollen ExtraDaten (Reline-Strich, Zeilennummern) gepaintet werden?
sal_Bool IsExtraData( const SwDoc *pDoc );
-// OD 14.03.2003 #i11760# - method declaration <CalcCntnt(..)>
+// #i11760# - method declaration <CalcCntnt(..)>
void CalcCntnt( SwLayoutFrm *pLay,
bool bNoColl = false,
bool bNoCalcFollow = false );
@@ -166,9 +165,8 @@ protected:
sal_Bool bInvaKeep;
sal_Bool bValidSize;
protected:
- // --> OD 2005-07-29 #i49383#
+ // #i49383#
bool mbFrmDeleted;
- // <--
public:
SwFrmNotify( SwFrm *pFrm );
@@ -177,12 +175,11 @@ public:
const SwRect &Frm() const { return aFrm; }
const SwRect &Prt() const { return aPrt; }
void SetInvaKeep() { bInvaKeep = sal_True; }
- // --> OD 2005-07-29 #i49383#
+ // #i49383#
void FrmDeleted()
{
mbFrmDeleted = true;
}
- // <--
};
class SwLayNotify : public SwFrmNotify
@@ -213,11 +210,11 @@ public:
class SwCntntNotify : public SwFrmNotify
{
private:
- // OD 08.01.2004 #i11859#
+ // #i11859#
bool mbChkHeightOfLastLine;
SwTwips mnHeightOfLastLine;
- // OD 2004-02-26 #i25029#
+ // #i25029#
bool mbInvalidatePrevPrtArea;
bool mbBordersJoinedWithPrev;
@@ -227,7 +224,7 @@ public:
SwCntntNotify( SwCntntFrm *pCntFrm );
~SwCntntNotify();
- // OD 2004-02-26 #i25029#
+ // #i25029#
void SetInvalidatePrevPrtArea()
{
mbInvalidatePrevPrtArea = true;
@@ -246,15 +243,14 @@ public:
//!!!Achtung: Wenn weitere Attribute gecached werden muss unbedingt die
//Methode Modify::Modify mitgepflegt werden!!!
-// OD 23.01.2003 #106895# - delete old method <SwBorderAttrs::CalcRight()> and
+// - delete old method <SwBorderAttrs::CalcRight()> and
// the stuff that belongs to it.
class SwBorderAttrs : public SwCacheObj
{
const SwAttrSet &rAttrSet;
const SvxULSpaceItem &rUL;
- // --> OD 2008-12-04 #i96772#
+ // #i96772#
SvxLRSpaceItem rLR;
- // <--
const SvxBoxItem &rBox;
const SvxShadowItem &rShadow;
const Size aFrmSize; //Die FrmSize
@@ -277,12 +273,12 @@ class SwBorderAttrs : public SwCacheObj
sal_Bool bCacheGetLine :1; //GetTopLine(), GetBottomLine() cachen?
sal_Bool bCachedGetTopLine :1; //GetTopLine() gecached?
sal_Bool bCachedGetBottomLine :1; //GetBottomLine() gecached?
- // OD 21.05.2003 #108789# - booleans indicating, if values <bJoinedWithPrev>
+ // - booleans indicating, if values <bJoinedWithPrev>
// and <bJoinedWithNext> are cached and valid.
// Caching depends on value of <bCacheGetLine>.
mutable sal_Bool bCachedJoinedWithPrev :1;
mutable sal_Bool bCachedJoinedWithNext :1;
- // OD 21.05.2003 #108789# - booleans indicating, if borders are joined
+ // - booleans indicating, if borders are joined
// with previous/next frame.
sal_Bool bJoinedWithPrev :1;
sal_Bool bJoinedWithNext :1;
@@ -309,29 +305,29 @@ class SwBorderAttrs : public SwCacheObj
void _IsLine();
- // OD 2004-02-26 #i25029# - add optional 2nd parameter <_pPrevFrm>
+ // #i25029# - add optional 2nd parameter <_pPrevFrm>
// If set, its value is taken for testing, if borders/shadow have to joined
// with previous frame.
void _GetTopLine ( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm = 0L );
void _GetBottomLine( const SwFrm& _rFrm );
- // OD 21.05.2003 #108789# - private methods to calculate cached values
+ // - private methods to calculate cached values
// <bJoinedWithPrev> and <bJoinedWithNext>.
- // OD 2004-02-26 #i25029# - add optional 2nd parameter <_pPrevFrm>
+ // #i25029# - add optional 2nd parameter <_pPrevFrm>
// If set, its value is taken for testing, if borders/shadow have to joined
// with previous frame.
void _CalcJoinedWithPrev( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm = 0L );
void _CalcJoinedWithNext( const SwFrm& _rFrm );
- // OD 21.05.2003 #108789# - internal helper method for methods
+ // - internal helper method for methods
// <_CalcJoinedWithPrev> and <_CalcJoinedWithNext>.
sal_Bool _JoinWithCmp( const SwFrm& _rCallerFrm,
const SwFrm& _rCmpFrm ) const;
//Rechte und linke Linie sowie LRSpace gleich?
- // OD 21.05.2003 #108789# - change name of 1st parameter - "rAttrs" -> "rCmpAttrs".
+ // - change name of 1st parameter - "rAttrs" -> "rCmpAttrs".
sal_Bool CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
const SwFrm *pCaller,
const SwFrm *pCmp ) const;
@@ -364,16 +360,16 @@ public:
inline sal_Bool IsBorderDist() const { return bBorderDist; }
//Sollen obere bzw. untere Umrandung fuer den Frm ausgewertet werden?
- // OD 2004-02-26 #i25029# - add optional 2nd parameter <_pPrevFrm>
+ // #i25029# - add optional 2nd parameter <_pPrevFrm>
// If set, its value is taken for testing, if borders/shadow have to joined
// with previous frame.
inline sal_uInt16 GetTopLine ( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm = 0L ) const;
inline sal_uInt16 GetBottomLine( const SwFrm& _rFrm ) const;
inline void SetGetCacheLine( sal_Bool bNew ) const;
- // OD 21.05.2003 #108789# - accessors for cached values <bJoinedWithPrev>
+ // - accessors for cached values <bJoinedWithPrev>
// and <bJoinedWithPrev>
- // OD 2004-02-26 #i25029# - add optional 2nd parameter <_pPrevFrm>
+ // #i25029# - add optional 2nd parameter <_pPrevFrm>
// If set, its value is taken for testing, if borders/shadow have to joined
// with previous frame.
sal_Bool JoinedWithPrev( const SwFrm& _rFrm,
@@ -438,7 +434,7 @@ public:
//Sollen obere bzw. untere Umrandung fuer den Frm ausgewertet werden?
-// OD 2004-02-26 #i25029# - add optional 2nd parameter <_pPrevFrm>
+// #i25029# - add optional 2nd parameter <_pPrevFrm>
// If set, its value is taken for testing, if borders/shadow have to joined
// with previous frame.
inline sal_uInt16 SwBorderAttrs::GetTopLine ( const SwFrm& _rFrm,
@@ -461,7 +457,7 @@ inline void SwBorderAttrs::SetGetCacheLine( sal_Bool bNew ) const
((SwBorderAttrs*)this)->bCacheGetLine = bNew;
((SwBorderAttrs*)this)->bCachedGetBottomLine =
((SwBorderAttrs*)this)->bCachedGetTopLine = sal_False;
- // OD 21.05.2003 #108789# - invalidate cache for values <bJoinedWithPrev>
+ // - invalidate cache for values <bJoinedWithPrev>
// and <bJoinedWithNext>.
bCachedJoinedWithPrev = sal_False;
bCachedJoinedWithNext = sal_False;
@@ -512,10 +508,10 @@ inline sal_Bool SwBorderAttrs::IsLine() const
/** method to determine the spacing values of a frame
- OD 2004-03-10 #i28701#
+ #i28701#
Values only provided for flow frames (table, section or text frames)
Note: line spacing value is only determined for text frames
- OD 2009-08-28 #i102458#
+ #i102458#
Add output parameter <obIsLineSpacingProportional>
@param rFrm
@@ -528,8 +524,6 @@ inline sal_Bool SwBorderAttrs::IsLine() const
output parameter - line spacing of the frame in SwTwips
@param obIsLineSpacingProportional
-
- @author OD
*/
void GetSpacingValuesOfFrm( const SwFrm& rFrm,
SwTwips& onLowerSpacing,
@@ -580,3 +574,5 @@ class SwDeletionChecker
};
#endif //_FRMTOOL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/ftnboss.hxx b/sw/source/core/inc/ftnboss.hxx
index 6c13fa75bff3..793bf0c8866a 100644
--- a/sw/source/core/inc/ftnboss.hxx
+++ b/sw/source/core/inc/ftnboss.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -135,3 +136,5 @@ inline const SwFtnContFrm *SwFtnBossFrm::FindFtnCont() const
}
#endif //_FTNBOSS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/ftnfrm.hxx b/sw/source/core/inc/ftnfrm.hxx
index afd97b4ce6e7..b4e7e3b7f5f4 100644
--- a/sw/source/core/inc/ftnfrm.hxx
+++ b/sw/source/core/inc/ftnfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,7 +72,7 @@ class SwFtnFrm: public SwLayoutFrm
// --> OD 2005-05-18 #i49383# - control unlock of position of lower anchored objects.
bool mbUnlockPosOfLowerObjs : 1;
// <--
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
protected:
virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
@@ -86,14 +87,14 @@ public:
sal_Bool operator<( const SwTxtFtn* pTxtFtn ) const;
-#ifndef DBG_UTIL
- const SwCntntFrm *GetRef() const { return pRef; }
- SwCntntFrm *GetRef() { return pRef; }
-#else
- //JP 15.10.2001: in a non pro version test if the attribute has the same
- // meaning which his reference is
+#if OSL_DEBUG_LEVEL > 1
+ // in a non pro version test if the attribute has the same
+ // meaning which his reference is
const SwCntntFrm *GetRef() const;
SwCntntFrm *GetRef();
+#else
+ const SwCntntFrm *GetRef() const { return pRef; }
+ SwCntntFrm *GetRef() { return pRef; }
#endif
const SwCntntFrm *GetRefFromAttr() const;
SwCntntFrm *GetRefFromAttr();
@@ -148,3 +149,5 @@ public:
};
#endif //_FTNFRM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/hffrm.hxx b/sw/source/core/inc/hffrm.hxx
index 425719e62afa..c3705d29f1c5 100644
--- a/sw/source/core/inc/hffrm.hxx
+++ b/sw/source/core/inc/hffrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,5 @@ public:
};
#endif //_HFFRM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/ifinishedthreadlistener.hxx b/sw/source/core/inc/ifinishedthreadlistener.hxx
index fe096ba09251..fbf6099f8456 100644
--- a/sw/source/core/inc/ifinishedthreadlistener.hxx
+++ b/sw/source/core/inc/ifinishedthreadlistener.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,5 @@ class IFinishedThreadListener
};
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/ithreadlistenerowner.hxx b/sw/source/core/inc/ithreadlistenerowner.hxx
index 26a5c1bb6fd3..8ba165774ee7 100644
--- a/sw/source/core/inc/ithreadlistenerowner.hxx
+++ b/sw/source/core/inc/ithreadlistenerowner.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,5 @@ class IThreadListenerOwner
};
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx
index 749d5d424fe3..e0ff55d151e4 100644
--- a/sw/source/core/inc/layact.hxx
+++ b/sw/source/core/inc/layact.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -209,13 +210,13 @@ class SwLayIdle
sal_Bool bPageValid; // Konnte die Seite alles validiert werden?
sal_Bool bAllValid; // Konnte alles validiert werden?
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool bIndicator;
#endif
#ifdef _LAYACT_CXX
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
void ShowIdle( ColorData eName );
#endif
@@ -237,3 +238,5 @@ inline void SwLayAction::SetCheckPageNum( sal_uInt16 nNew )
}
#endif //_LAYACT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/laycache.hxx b/sw/source/core/inc/laycache.hxx
index 0f14067d0bda..768a1611010b 100644
--- a/sw/source/core/inc/laycache.hxx
+++ b/sw/source/core/inc/laycache.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,9 +70,11 @@ public:
return pImpl; }
void UnlockImpl() { --nLockCount; }
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool CompareLayout( const SwDoc& rDoc ) const;
#endif
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index 3f437e083a7c..093549d057da 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,7 +67,7 @@ protected:
long CalcRel( const SwFmtFrmSize &rSz, sal_Bool bWidth ) const;
public:
- // --> OD 2004-06-29 #i28701#
+ // --> #i28701#
TYPEINFO();
void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const;
@@ -113,7 +114,6 @@ public:
inline SwCntntFrm *ContainsCntnt();
const SwCellFrm *FirstCell() const;
inline SwCellFrm *FirstCell();
- // --> OD 2006-02-01 #130797#
// Method <ContainsAny()> doesn't investigate content of footnotes by default.
// But under certain circumstances this investigation is intended.
// Thus, introduce new optional parameter <_bInvestigateFtnForSections>.
@@ -121,7 +121,6 @@ public:
// investigated for sections.
const SwFrm *ContainsAny( const bool _bInvestigateFtnForSections = false ) const;
inline SwFrm *ContainsAny( const bool _bInvestigateFtnForSections = false );
- // <--
sal_Bool IsAnLower( const SwFrm * ) const;
virtual const SwFrmFmt *GetFmt() const;
@@ -134,8 +133,8 @@ public:
sal_Bool MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
SwFtnBossFrm *pNewBoss, const sal_Bool bFtnNums );
- // --> OD 2004-07-01 #i28701# - change purpose of method and its name
- // --> OD 2005-03-11 #i44016# - add parameter <_bUnlockPosOfObjs> to
+ // --> #i28701# - change purpose of method and its name
+ // --> #i44016# - add parameter <_bUnlockPosOfObjs> to
// force an unlockposition call for the lower objects.
void NotifyLowerObjs( const bool _bUnlockPosOfObjs = false );
// <--
@@ -156,7 +155,7 @@ public:
/** method to check relative position of layout frame to
a given layout frame.
- OD 08.11.2002 - refactoring of pseudo-local method <lcl_Apres(..)> in
+ refactoring of pseudo-local method <lcl_Apres(..)> in
<txtftn.cxx> for #104840#.
@param _aCheckRefLayFrm
@@ -184,12 +183,10 @@ inline SwCellFrm* SwLayoutFrm::FirstCell()
return (SwCellFrm*)(((const SwLayoutFrm*)this)->FirstCell());
}
-// --> OD 2006-02-01 #130797#
inline SwFrm* SwLayoutFrm::ContainsAny( const bool _bInvestigateFtnForSections )
{
return (SwFrm*)(((const SwLayoutFrm*)this)->ContainsAny( _bInvestigateFtnForSections ));
}
-// <--
// Diese SwFrm-inlines sind hier, damit frame.hxx nicht layfrm.hxx includen muss
inline sal_Bool SwFrm::IsColBodyFrm() const
@@ -208,3 +205,5 @@ inline SwFrm* SwLayoutFrm::GetLastLower()
}
#endif // SW_LAYFRM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/layouter.hxx b/sw/source/core/inc/layouter.hxx
index db506d302642..7ffa885038dd 100644
--- a/sw/source/core/inc/layouter.hxx
+++ b/sw/source/core/inc/layouter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,24 +38,24 @@ class SwPageFrm;
class SwLooping;
class IDocumentLayoutAccess;
-// --> OD 2004-06-23 #i28701#
+// --> #i28701#
class SwMovedFwdFrmsByObjPos;
class SwTxtFrm;
// <--
-// --> OD 2004-10-05 #i26945#
+// --> #i26945#
class SwRowFrm;
// <--
-// --> OD 2004-10-22 #i35911#
+// --> #i35911#
class SwObjsMarkedAsTmpConsiderWrapInfluence;
class SwAnchoredObject;
// <--
-// --> OD 2005-01-12 #i40155#
+// --> #i40155#
#include <vector>
class SwFrm;
// <--
-// --> OD 2006-05-10 #i65250#
+// --> #i65250#
#include <swtypes.hxx>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
class SwFlowFrm;
class SwLayoutFrm;
// <--
@@ -68,19 +69,19 @@ class SwLayouter
void _CollectEndnotes( SwSectionFrm* pSect );
sal_Bool StartLooping( SwPageFrm* pPage );
- // --> OD 2004-06-23 #i28701#
+ // --> #i28701#
SwMovedFwdFrmsByObjPos* mpMovedFwdFrms;
// <--
- // --> OD 2004-10-22 #i35911#
+ // --> #i35911#
SwObjsMarkedAsTmpConsiderWrapInfluence* mpObjsTmpConsiderWrapInfl;
// <--
- // --> OD 2005-01-12 #i40155# - data structure to collect frames, which are
+ // --> #i40155# - data structure to collect frames, which are
// marked not to wrap around objects.
std::vector< const SwFrm* > maFrmsNotToWrap;
// <--
public:
- // --> OD 2006-05-10 #i65250#
+ // --> #i65250#
// - data structure to collect moving backward layout information
struct tMoveBwdLayoutInfoKey
{
@@ -117,7 +118,7 @@ private:
p_key1.mnFreeSpaceInNewUpper == p_key2.mnFreeSpaceInNewUpper;
}
};
- std::hash_map< const tMoveBwdLayoutInfoKey, sal_uInt16,
+ boost::unordered_map< const tMoveBwdLayoutInfoKey, sal_uInt16,
fMoveBwdLayoutInfoKeyHash,
fMoveBwdLayoutInfoKeyEq > maMoveBwdLayoutInfo;
// <--
@@ -136,7 +137,7 @@ public:
static sal_Bool Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFtnFrm* pFtn );
static sal_Bool StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage );
- // --> OD 2004-06-23 #i28701#
+ // --> #i28701#
static void ClearMovedFwdFrms( const SwDoc& _rDoc );
static void InsertMovedFwdFrm( const SwDoc& _rDoc,
const SwTxtFrm& _rMovedFwdFrmByObjPos,
@@ -145,29 +146,29 @@ public:
const SwTxtFrm& _rTxtFrm,
sal_uInt32& _ornToPageNum );
// <--
- // --> OD 2005-01-12 #i40155# - ummark given frame as to be moved forward.
+ // --> #i40155# - ummark given frame as to be moved forward.
static void RemoveMovedFwdFrm( const SwDoc& _rDoc,
const SwTxtFrm& _rTxtFrm );
// <--
- // --> OD 2004-10-05 #i26945#
+ // --> #i26945#
static bool DoesRowContainMovedFwdFrm( const SwDoc& _rDoc,
const SwRowFrm& _rRowFrm );
// <--
- // --> OD 2004-10-22 #i35911#
+ // --> #i35911#
static void ClearObjsTmpConsiderWrapInfluence( const SwDoc& _rDoc );
static void InsertObjForTmpConsiderWrapInfluence(
const SwDoc& _rDoc,
SwAnchoredObject& _rAnchoredObj );
// <--
- // --> OD 2005-01-12 #i40155#
+ // --> #i40155#
static void ClearFrmsNotToWrap( const SwDoc& _rDoc );
static void InsertFrmNotToWrap( const SwDoc& _rDoc,
const SwFrm& _rFrm );
static bool FrmNotToWrap( const IDocumentLayoutAccess& _rIDLA,
const SwFrm& _rFrm );
// <--
- // --> OD 2006-05-10 #i65250#
+ // --> #i65250#
static bool MoveBwdSuppressed( const SwDoc& p_rDoc,
const SwFlowFrm& p_rFlowFrm,
const SwLayoutFrm& p_rNewUpperFrm );
@@ -181,3 +182,4 @@ extern void LOOPING_LOUIE_LIGHT( bool bCondition, const SwTxtFrm& rTxtFrm );
#endif //_LAYOUTER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/movedfwdfrmsbyobjpos.hxx b/sw/source/core/inc/movedfwdfrmsbyobjpos.hxx
index c9cd053802d6..21120f6e5e7a 100644
--- a/sw/source/core/inc/movedfwdfrmsbyobjpos.hxx
+++ b/sw/source/core/inc/movedfwdfrmsbyobjpos.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,7 @@
class SwTxtNode;
class SwTxtFrm;
-// --> OD 2004-10-05 #i26945#
+// --> #i26945#
class SwRowFrm;
// <--
@@ -53,14 +54,14 @@ class SwMovedFwdFrmsByObjPos
void Insert( const SwTxtFrm& _rMovedFwdFrmByObjPos,
const sal_uInt32 _nToPageNum );
- // --> OD 2005-01-12 #i40155#
+ // --> #i40155#
void Remove( const SwTxtFrm& _rTxtFrm );
// <--
bool FrmMovedFwdByObjPos( const SwTxtFrm& _rTxtFrm,
sal_uInt32& _ornToPageNum ) const;
- // --> OD 2004-10-05 #i26945#
+ // --> #i26945#
bool DoesRowContainMovedFwdFrm( const SwRowFrm& _rRowFrm ) const;
// <--
@@ -68,3 +69,5 @@ class SwMovedFwdFrmsByObjPos
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index 9269606f2031..ed4a856de65a 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -211,3 +212,4 @@ public:
#endif // SW_MVSAVE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/node2lay.hxx b/sw/source/core/inc/node2lay.hxx
index c70a084c1b85..ac83381f8c16 100644
--- a/sw/source/core/inc/node2lay.hxx
+++ b/sw/source/core/inc/node2lay.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include <tools/solar.h>
-/* -----------------23.02.99 11:33-------------------
+/* --------------------------------------------------
* Die Klasse SwNode2Layout stellt die Verbindung von Nodes zum Layout her.
* Sie liefert einen intelligenten Iterator ueber die zum Node oder Nodebereich
* gehoerenden Frames. Je nach Zweck der Iteration, z.B. um vor oder hinter
@@ -79,3 +80,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/noteurl.hxx b/sw/source/core/inc/noteurl.hxx
index 647e46511991..42db71134c45 100644
--- a/sw/source/core/inc/noteurl.hxx
+++ b/sw/source/core/inc/noteurl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,4 @@ extern SwNoteURL *pNoteURL;
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx
index 97ebb7d72400..584a23d8acbe 100644
--- a/sw/source/core/inc/notxtfrm.hxx
+++ b/sw/source/core/inc/notxtfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,7 @@ class SwNoTxtFrm: public SwCntntFrm
{
friend void _FrmFinit();
- short nWeight; // "Wichtigkeit" der Grafik
+ short nWeight; // importance of the graphic
const Size& GetSize() const;
@@ -47,7 +48,6 @@ class SwNoTxtFrm: public SwCntntFrm
void Format ( const SwBorderAttrs *pAttrs = 0 );
void PaintCntnt ( OutputDevice*, const SwRect&, const SwRect& ) const;
- /// OD 25.09.2002 #99739# - delete unused 3rd parameter
void PaintPicture( OutputDevice*, const SwRect& ) const;
protected:
virtual void MakeAll();
@@ -71,9 +71,10 @@ public:
void StopAnimation( OutputDevice* = 0 ) const;
sal_Bool HasAnimation() const;
- // Routinen fuer den Grafik-Cache
+ // Routine for the graphics cache
sal_uInt16 GetWeight() { return nWeight; }
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/objectformatter.hxx b/sw/source/core/inc/objectformatter.hxx
index 7a47a4012b30..c78c6f7775c5 100644
--- a/sw/source/core/inc/objectformatter.hxx
+++ b/sw/source/core/inc/objectformatter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,19 +31,17 @@
#include <sal/types.h>
class SwFrm;
-// --> OD 2004-10-08 #i26945#
+// #i26945#
class SwTxtFrm;
-// <--
class SwLayoutFrm;
class SwPageFrm;
class SwAnchoredObject;
class SwLayAction;
-// --> OD 2004-10-04 #i26945#
+// OD 2004-10-04 #i26945#
class SwPageNumAndTypeOfAnchors;
-// <--
// -----------------------------------------------------------------------------
-// OD 2004-06-25 #i28701#
+// #i28701#
// Format floating screen objects, which are anchored at the given anchor frame
// and registered at the given page frame.
// -----------------------------------------------------------------------------
@@ -64,30 +63,25 @@ class SwObjectFormatter
SwLayAction* mpLayAction;
// data structure to collect page number of object's 'anchor'
- // --> OD 2004-10-04 #i26945#
+ // #i26945#
SwPageNumAndTypeOfAnchors* mpPgNumAndTypeOfAnchors;
- // <--
/** helper method for method <_FormatObj(..)> - performs the intrinsic
format of the layout of the given layout frame and all its lower
layout frames.
- OD 2004-06-28 #i28701#
+ #i28701#
IMPORTANT NOTE:
Method corresponds to methods <SwLayAction::FormatLayoutFly(..)> and
<SwLayAction::FormatLayout(..)>. Thus, its code for the formatting have
to be synchronised.
-
- @author OD
*/
void _FormatLayout( SwLayoutFrm& _rLayoutFrm );
/** helper method for method <_FormatObj(..)> - performs the intrinsic
format of the content of the given floating screen object.
- OD 2004-06-28 #i28701#
-
- @author OD
+ #i28701#
*/
void _FormatObjCntnt( SwAnchoredObject& _rAnchoredObj );
@@ -119,8 +113,6 @@ class SwObjectFormatter
/** method to restrict the format of floating screen objects to
as-character anchored ones
-
- @author OD
*/
inline void SetFormatOnlyAsCharAnchored()
{
@@ -134,23 +126,19 @@ class SwObjectFormatter
/** performs the intrinsic format of a given floating screen object and its content.
- OD 2004-06-28 #i28701#
-
- @author OD
+ #i28701#
*/
void _FormatObj( SwAnchoredObject& _rAnchoredObj );
/** invokes the intrinsic format method for all floating screen objects,
anchored at anchor frame on the given page frame
- OD 2004-06-28 #i28701#
- OD 2004-10-08 #i26945# - for format of floating screen objects for
+ #i28701#
+ #i26945# - for format of floating screen objects for
follow text frames, the 'master' text frame is passed to the method.
Thus, the objects, whose anchor character is inside the follow text
frame can be formatted.
- @author OD
-
@param _pMasterTxtFrm
input parameter - pointer to 'master' text frame. default value: NULL
*/
@@ -158,33 +146,25 @@ class SwObjectFormatter
/** accessor to collected anchored object
- OD 2004-07-05 #i28701#
-
- @author OD
+ #i28701#
*/
SwAnchoredObject* GetCollectedObj( const sal_uInt32 _nIndex );
/** accessor to 'anchor' page number of collected anchored object
- OD 2004-07-05 #i28701#
-
- @author OD
+ #i28701#
*/
sal_uInt32 GetPgNumOfCollected( const sal_uInt32 _nIndex );
/** accessor to 'anchor' type of collected anchored object
- OD 2004-10-04 #i26945#
-
- @author OD
+ #i26945#
*/
bool IsCollectedAnchoredAtMaster( const sal_uInt32 _nIndex );
/** accessor to total number of collected anchored objects
- OD 2004-07-05 #i28701#
-
- @author OD
+ #i28701#
*/
sal_uInt32 CountOfCollected();
@@ -193,9 +173,7 @@ class SwObjectFormatter
/** intrinsic method to format a certain floating screen object
- OD 2005-01-10 #i40147# - add parameter <_bCheckForMovedFwd>
-
- @author OD
+ #i40147# - add parameter <_bCheckForMovedFwd>
@param _rAnchoredObj
input parameter - anchored object, which have to be formatted.
@@ -212,22 +190,16 @@ class SwObjectFormatter
const bool _bCheckForMovedFwd = false ) = 0;
/** intrinsic method to format all floating screen objects
-
- @author OD
*/
virtual bool DoFormatObjs() = 0;
/** method to format all floating screen objects at the given anchor frame
-
- @author OD
*/
static bool FormatObjsAtFrm( SwFrm& _rAnchorFrm,
const SwPageFrm& _rPageFrm,
SwLayAction* _pLayAction = 0L );
/** method to format a given floating screen object
-
- @author OD
*/
static bool FormatObj( SwAnchoredObject& _rAnchoredObj,
SwFrm* _pAnchorFrm = 0L,
@@ -236,3 +208,5 @@ class SwObjectFormatter
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/observablethread.hxx b/sw/source/core/inc/observablethread.hxx
index 45ee0e3a5918..e51a06e76420 100644
--- a/sw/source/core/inc/observablethread.hxx
+++ b/sw/source/core/inc/observablethread.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef _OBSERVABLETHREAD_HXX
#define _OBSERVABLETHREAD_HXX
-#ifndef _OSL_THREAD_HXX_
#include <osl/thread.hxx>
-#endif
#include <rtl/ref.hxx>
#include <osl/interlck.h>
@@ -103,3 +102,5 @@ class ObservableThread : public osl::Thread,
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/pagefrm.hrc b/sw/source/core/inc/pagefrm.hrc
new file mode 100644
index 000000000000..302ba9a76b16
--- /dev/null
+++ b/sw/source/core/inc/pagefrm.hrc
@@ -0,0 +1,47 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Sébastien Le Ray <sebastien-libreoffice@orniz.org>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#ifndef _PAGEFRM_HRC
+#define _PAGEFRM_HRC
+
+#include "rcid.hrc"
+
+// Bitmaps for page shadow
+#define BMP_PAGE_RIGHT_SHADOW_MASK RC_PAGEFRM_BEGIN + 0
+#define BMP_PAGE_BOTTOM_RIGHT_SHADOW_MASK RC_PAGEFRM_BEGIN + 1
+#define BMP_PAGE_BOTTOM_SHADOW_MASK RC_PAGEFRM_BEGIN + 2
+
+
+// If you add resources, don't forget to update this
+#define PAGEFRM_ACT_END BMP_PAGE_BOTTOMLEFT_SHADOW
+
+// Sanity check
+#if PAGEFRM_ACT_END > RC_PAGEFRM_END
+#error Not enough room for pagefrm resource in #file:#line
+#endif
+
+#endif
diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx
index 994701980a3f..392790a7cd78 100644
--- a/sw/source/core/inc/pagefrm.hxx
+++ b/sw/source/core/inc/pagefrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,12 +46,10 @@ class SdrObject;
class SwAttrSetChg;
class Font;
-// OD 2004-05-07 #i28701# - replaced by class <SwSortedObjs>
-//SV_DECL_PTRARR_SORT(SwSortDrawObjs,SdrObjectPtr,1,2);
+// #i28701# - replaced by class <SwSortedObjs>
class SwSortedObjs;
-// --> OD 2004-07-02 #i28701#
+// #i28701#
class SwAnchoredObject;
-// <--
enum SwPageChg
{
@@ -63,7 +62,7 @@ class SwPageFrm: public SwFtnBossFrm
{
friend class SwFrm;
- // OD 2004-05-07 #i28701# - use <SwSortedObjs>
+ // #i28701# - use <SwSortedObjs>
SwSortedObjs *pSortedObjs;
SwPageDesc *pDesc; //PageDesc der die Seite beschreibt.
@@ -84,12 +83,10 @@ class SwPageFrm: public SwFtnBossFrm
sal_Bool bInvalidWordCount :1;
sal_Bool bHasGrid :1; // Grid for Asian layout
- // OD 2004-05-17 #i28701# - boolean, indicating that layout of page frame
+ // #i28701# - boolean, indicating that layout of page frame
// is in progress.
bool mbLayoutInProgress;
- // OD 12.02.2003 #i9719#, #105645#
- static const sal_Int8 mnBorderPxWidth;
static const sal_Int8 mnShadowPxWidth;
void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, sal_uInt8 &,
@@ -98,35 +95,9 @@ class SwPageFrm: public SwFtnBossFrm
// Anpassen der max. Fussnotenhoehen in den einzelnen Spalten
void SetColMaxFtnHeight();
- /** determine rectangle for page border
-
- OD 12.02.2003 for #i9719# and #105645#
-
- @author OD
-
- @param _rPageRect
- input parameter - constant instance reference of the page rectangle.
- Generally, it's the frame area of the page, but for empty pages in print
- preview, this parameter is useful.
-
- @param _pViewShell
- input parameter - instance of the view shell, for which the rectangle
- has to be generated.
-
- @param _orBorderRect
- output parameter - instance reference of the border rectangle for
- the given page rectangle
- */
- static void GetBorderRect( const SwRect& _rPageRect,
- ViewShell* _pViewShell,
- SwRect& _orBorderRect,
- bool bRightSidebar );
-
/** determine rectangle for right page shadow
- OD 12.02.2003 for #i9719# and #105645#
-
- @author OD
+ #i9719#
@param _rPageRect
input parameter - constant instance reference of the page rectangle.
@@ -148,9 +119,7 @@ class SwPageFrm: public SwFtnBossFrm
/** determine rectangle for bottom page shadow
- OD 12.02.2003 for #i9719# and #105645#
-
- @author OD
+ #i9719#
@param _rPageRect
input parameter - constant instance reference of the page rectangle.
@@ -169,12 +138,11 @@ class SwPageFrm: public SwFtnBossFrm
static void GetBottomShadowRect( const SwRect& _rPageRect,
ViewShell* _pViewShell,
SwRect& _orBottomShadowRect,
+ bool bFullBottomShadow,
bool bRightSidebar );
/** adds the sidebar used for notes to right and left border
- mod 20.10.2007 for #i6193#
-
- @author mod
+ #i6193#
@param aRect
input parameter - current rect, we change borders if we want a sidebar
@@ -206,10 +174,9 @@ public:
const SwSortedObjs *GetSortedObjs() const { return pSortedObjs; }
SwSortedObjs *GetSortedObjs() { return pSortedObjs; }
- // --> OD 2004-07-02 #i28701# - new methods to append/remove drawing objects
+ // #i28701# - new methods to append/remove drawing objects
void AppendDrawObjToPage( SwAnchoredObject& _rNewObj );
void RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj );
- // <--
void AppendFlyToPage( SwFlyFrm *pNew );
void RemoveFlyFromPage( SwFlyFrm *pToRemove );
@@ -239,7 +206,7 @@ public:
//Schickt an alle ContentFrames ein Prepare wg. geaenderter Registervorlage
void PrepareRegisterChg();
- // --> OD 2005-06-09 #i50432# - adjust method description and synopsis.
+ // #i50432# - adjust method description and synopsis.
// Appends a fly frame - the given one or a new one - at the page frame.
// Needed for <Modify> and <MakeFrms>
// - return value not needed any more
@@ -247,7 +214,6 @@ public:
// - third parameter only needed for assertion, but calling method assures
// this assertion. Thus, delete it.
void PlaceFly( SwFlyFrm* pFly, SwFlyFrmFmt* pFmt );
- // <--
virtual sal_Bool GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
@@ -311,26 +277,20 @@ public:
sal_Bool IsInvalidAutoCompleteWords() const { return bInvalidAutoCmplWrds; }
sal_Bool IsInvalidWordCount() const { return bInvalidWordCount; }
- /** SwPageFrm::GetDrawBackgrdColor - for #102450#
+ /** SwPageFrm::GetDrawBackgrdColor
- 29.08.2002:
determine the color, that is respectively will be drawn as background
for the page frame.
- @author OD
-
@return reference to an instance of class Color
*/
const Color& GetDrawBackgrdColor() const;
/** paint margin area of a page
- OD 20.11.2002 for #104598#:
implement paint of margin area; margin area will be painted for a
view shell with a window and if the document is not in online layout.
- @author OD
-
@param _rOutputRect
input parameter - constant instance reference of the rectangle, for
which an output has to be generated.
@@ -344,11 +304,9 @@ public:
/** paint page border and shadow
- OD 12.02.2003 for #i9719# and #105645#
+ #i9719#
implement paint of page border and shadow
- @author OD
-
@param _rPageRect
input parameter - constant instance reference of the page rectangle.
Generally, it's the frame area of the page, but for empty pages in print
@@ -357,17 +315,27 @@ public:
@param _pViewShell
input parameter - instance of the view shell, on which the output
has to be generated.
+
+ @param bPaintRightShadow
+ Should we paint shadow on the right or not (used in book mode)
+
+ @param bFullBottomShadow
+ Should we have a bottom shadow of the same size as the pages or
+ not (for right pages in book mode in a LTR environment).
+
+ @param bRightSidebar
+ Is the note sidebar on the right or not (used to adjust the
+ shadow with & position).
*/
static void PaintBorderAndShadow( const SwRect& _rPageRect,
ViewShell* _pViewShell,
bool bPaintRightShadow,
+ bool bFullBottomShadow,
bool bRightSidebar );
/** get bound rectangle of border and shadow for repaints
- OD 12.02.2003 for #i9719# and #105645#
-
- author OD
+ #i9719#
@param _rPageRect
input parameter - constant instance reference of the page rectangle.
@@ -390,8 +358,6 @@ public:
static void PaintNotesSidebar(const SwRect& _rPageRect, ViewShell* _pViewShell, sal_uInt16 nPageNum, bool bRight);
static void PaintNotesSidebarArrows(const Point &aMiddleFirst, const Point &aMiddleSecond, ViewShell* _pViewShell, const Color aColorUp, const Color aColorDown);
/**
- mod #6i193#
-
asks the page on which side a margin should be shown, e.g for notes
returns true for left side, false for right side
*/
@@ -399,20 +365,14 @@ public:
virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const;
- // OD 12.02.2003 #i9719#, #105645#
- inline sal_Int8 BorderPxWidth() const
- {
- return mnBorderPxWidth;
- }
inline sal_Int8 ShadowPxWidth() const
{
return mnShadowPxWidth;
}
- // OD 22.09.2003 #110978#
const SwRect PrtWithoutHeaderAndFooter() const;
- // OD 2004-05-17 #i28701#
+ // #i28701#
inline bool IsLayoutInProgress() const
{
return mbLayoutInProgress;
@@ -540,3 +500,5 @@ inline sal_Bool SwPageFrm::IsInvalidFly() const
#endif //_PAGEFRM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/pamtyp.hxx b/sw/source/core/inc/pamtyp.hxx
index 9ca795584eb1..f124abaccf27 100644
--- a/sw/source/core/inc/pamtyp.hxx
+++ b/sw/source/core/inc/pamtyp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,3 +101,5 @@ SwCntntNode* GetNode( SwPaM&, sal_Bool&, SwMoveFn, sal_Bool bInReadOnly = sal_Fa
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/prevwpage.hxx b/sw/source/core/inc/prevwpage.hxx
index 517f4494b44f..ab42c6295742 100644
--- a/sw/source/core/inc/prevwpage.hxx
+++ b/sw/source/core/inc/prevwpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef _PREVIEWPAGES_HXX
#define _PREVIEWPAGES_HXX
@@ -7,10 +8,6 @@
class SwPageFrm;
/** data structure for a preview page in the current preview layout
-
- OD 12.12.2002 #103492# - struct <PrevwPage>
-
- @author OD
*/
struct PrevwPage
{
@@ -34,3 +31,5 @@ inline PrevwPage::PrevwPage()
{};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/ptqueue.hxx b/sw/source/core/inc/ptqueue.hxx
index 57717405998f..9ef7c2017822 100644
--- a/sw/source/core/inc/ptqueue.hxx
+++ b/sw/source/core/inc/ptqueue.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/retrievedinputstreamdata.hxx b/sw/source/core/inc/retrievedinputstreamdata.hxx
index fd09e1dbaca7..652e14633061 100644
--- a/sw/source/core/inc/retrievedinputstreamdata.hxx
+++ b/sw/source/core/inc/retrievedinputstreamdata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,17 +32,13 @@
#include <sal/types.h>
#include <osl/mutex.hxx>
#include <com/sun/star/uno/Reference.hxx>
-#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HXX_
#include <com/sun/star/io/XInputStream.hpp>
-#endif
#include <map>
#include <boost/weak_ptr.hpp>
+
class SwAsyncRetrieveInputStreamThreadConsumer;
-//#ifndef _RETRIEVEINPUTSTREAMCONSUMER_HXX
-//#include <retrieveinputstreamconsumer.hxx>
-//#endif
/** Singleton class to manage retrieved input stream data in Writer
@@ -109,3 +106,5 @@ class SwRetrievedInputStreamDataManager
};
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/retrieveinputstream.hxx b/sw/source/core/inc/retrieveinputstream.hxx
index e16ba350246d..29e0fb532bca 100644
--- a/sw/source/core/inc/retrieveinputstream.hxx
+++ b/sw/source/core/inc/retrieveinputstream.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,12 +30,7 @@
#include <observablethread.hxx>
#include <tools/string.hxx>
-//#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
-//#include <com/sun/star/uno/Reference.hxx>
-//#endif
-#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HXX_
#include <com/sun/star/io/XInputStream.hpp>
-#endif
#include <retrievedinputstreamdata.hxx>
/** class for a thread to retrieve an input stream given by an URL
@@ -66,3 +62,5 @@ class SwAsyncRetrieveInputStreamThread : public ObservableThread
const String mrLinkedURL;
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/retrieveinputstreamconsumer.hxx b/sw/source/core/inc/retrieveinputstreamconsumer.hxx
index 2417f819bed3..26284034d425 100644
--- a/sw/source/core/inc/retrieveinputstreamconsumer.hxx
+++ b/sw/source/core/inc/retrieveinputstreamconsumer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#define _RETRIEVEINPUTSTREAMCONSUMER_HXX
#include <com/sun/star/uno/Reference.hxx>
-#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HXX_
#include <com/sun/star/io/XInputStream.hpp>
-#endif
#include <osl/interlck.h>
#include <retrievedinputstreamdata.hxx>
@@ -41,9 +40,7 @@ class SwAsyncRetrieveInputStreamThread;
/** class to provide creation of a thread to retrieve an input stream given by
an URL and to consume the retrieved input stream.
- OD 2007-01-29 #i73788#
-
- @author OD
+ #i73788#
*/
class SwAsyncRetrieveInputStreamThreadConsumer
{
@@ -53,14 +50,10 @@ class SwAsyncRetrieveInputStreamThreadConsumer
~SwAsyncRetrieveInputStreamThreadConsumer();
/** method to create thread
-
- @author OD
*/
void CreateThread( const String& rURL );
/** method called to provide the retrieved input stream to the thread Consumer
-
- @author OD
*/
void ApplyInputStream(
com::sun::star::uno::Reference<com::sun::star::io::XInputStream> xInputStream,
@@ -72,3 +65,5 @@ class SwAsyncRetrieveInputStreamThreadConsumer
oslInterlockedCount mnThreadID;
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx
index 9a39200f0b21..84f64e309d70 100644
--- a/sw/source/core/inc/rolbck.hxx
+++ b/sw/source/core/inc/rolbck.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,13 +70,10 @@ class SwCharFmt;
#include <tox.hxx>
#include <SwNumberTreeTypes.hxx>
-// --> OD 2007-10-17 #i81002#
#include <IDocumentMarkAccess.hxx>
-// <--
#include <memory>
-
enum HISTORY_HINT {
HSTRY_SETFMTHNT,
HSTRY_RESETFMTHNT,
@@ -92,7 +90,7 @@ enum HISTORY_HINT {
HSTRY_RESETATTRSET,
HSTRY_CHGFLYANCHOR,
HSTRY_CHGFLYCHAIN,
- HSTRY_CHGCHARFMT, // #i27615#
+ HSTRY_CHGCHARFMT,
HSTRY_END
};
@@ -127,9 +125,7 @@ class SwHistoryResetFmt : public SwHistoryHint
const sal_uInt16 m_nWhich;
public:
- // --> OD 2008-02-27 #refactorlists# - removed <rDoc>
SwHistoryResetFmt( const SfxPoolItem* pFmtHt, sal_uLong nNodeIdx );
- // <--
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
};
@@ -267,7 +263,6 @@ class SwHistoryBookmark : public SwHistoryHint
bool IsEqualBookmark(const ::sw::mark::IMark& rBkmk);
const ::rtl::OUString& GetName() const;
-
private:
const ::rtl::OUString m_aName;
::rtl::OUString m_aShortName;
@@ -296,7 +291,6 @@ public:
};
-
class SwHistoryResetAttrSet : public SwHistoryHint
{
const sal_uLong m_nNodeIndex;
@@ -338,7 +332,6 @@ public:
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
};
-// #i27615#
class SwHistoryChangeCharFmt : public SwHistoryHint
{
const SfxItemSet m_OldSet;
@@ -350,7 +343,6 @@ public:
};
-
#endif
typedef SwHistoryHint* SwHistoryHintPtr;
@@ -376,17 +368,15 @@ public:
// call all objects between nStart and TmpEnd; store nStart as TmpEnd
bool TmpRollback( SwDoc* pDoc, sal_uInt16 nStart, bool ToFirst = true );
- // --> OD 2008-02-27 #refactorlists# - removed <rDoc>
void Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue,
sal_uLong nNodeIdx );
- // <--
void Add( SwTxtAttr* pTxtHt, sal_uLong nNodeIdx, bool bNewAttr = true );
void Add( SwFmtColl*, sal_uLong nNodeIdx, sal_uInt8 nWhichNd );
void Add( const ::sw::mark::IMark&, bool bSavePos, bool bSaveOtherPos );
void Add( SwFrmFmt& rFmt );
void Add( SwFlyFrmFmt&, sal_uInt16& rSetPos );
void Add( const SwTxtFtn& );
- void Add( const SfxItemSet & rSet, const SwCharFmt & rCharFmt); // #i27615#
+ void Add( const SfxItemSet & rSet, const SwCharFmt & rCharFmt);
sal_uInt16 Count() const { return m_SwpHstry.Count(); }
sal_uInt16 GetTmpEnd() const { return m_SwpHstry.Count() - m_nEndDiff; }
@@ -409,9 +399,7 @@ public:
// used by Undo classes (Delete/Overwrite/Inserts)
void CopyAttr( SwpHints* pHts, sal_uLong nNodeIdx, xub_StrLen nStart,
xub_StrLen nEnd, bool bFields );
- // --> OD 2008-02-27 #refactorlists# - removed <rDoc>
void CopyFmtAttr( const SfxItemSet& rSet, sal_uLong nNodeIdx );
- // <--
};
#ifndef ROLBCK_HISTORY_ONLY
@@ -426,15 +414,14 @@ private:
void _MakeSetWhichIds();
public:
- // --> OD 2008-02-27 #refactorlists# - removed <rDoc>
+
SwRegHistory( SwHistory* pHst );
- // <--
SwRegHistory( const SwNode& rNd, SwHistory* pHst );
SwRegHistory( SwModify* pRegIn, const SwNode& rNd, SwHistory* pHst );
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
- /// @return true iff at least 1 item was inserted
+ /// @return true if at least 1 item was inserted
bool InsertItems( const SfxItemSet& rSet,
xub_StrLen const nStart, xub_StrLen const nEnd,
SetAttrMode const nFlags );
@@ -447,6 +434,6 @@ public:
#endif
-
#endif // _ROLBCK_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index ea976a77765f..ac404df62b35 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -202,7 +203,7 @@ public:
SwPrintData const*const pPrintData = NULL ) const;
virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
virtual void Cut();
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
#endif
@@ -300,10 +301,6 @@ public:
void SetBrowseWidth( long n ) { bBrowseWidthValid = sal_True; nBrowseWidth = n;}
inline void InvalidateBrowseWidth();
-#ifdef LONG_TABLE_HACK
- void HackPrepareLongTblPaint( int nMode );
-#endif
-
sal_Bool IsNewLayout() const { return bIsNewLayout; }
void ResetNewLayout() { bIsNewLayout = sal_False;}
@@ -312,8 +309,8 @@ public:
void InsertEmptySct( SwSectionFrm* pDel );
void DeleteEmptySct() { if( pDestroy ) _DeleteEmptySct(); }
void RemoveFromList( SwSectionFrm* pSct ) { if( pDestroy ) _RemoveFromList( pSct ); }
-#ifdef DBG_UTIL
- // Wird zur Zeit nur fuer ASSERTs benutzt:
+#if OSL_DEBUG_LEVEL > 1
+ // Wird zur Zeit nur fuer OSL_ENSURE( benutzt:
sal_Bool IsInDelList( SwSectionFrm* pSct ) const; // Ist der SectionFrm in der Liste enthalten?
#endif
@@ -369,3 +366,4 @@ inline void SwRootFrm::SetVirtPageNum( const sal_Bool bOf) const
#endif // SW_ROOTFRM_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx
index 2869e45bf540..8055ce869a10 100644
--- a/sw/source/core/inc/rowfrm.hxx
+++ b/sw/source/core/inc/rowfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,3 +110,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index 60c6877d4fb3..01c0e40e88a9 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,8 +28,6 @@
#ifndef _SCRIPTINFO_HXX
#define _SCRIPTINFO_HXX
#ifndef _SVSTDARR_HXX
-#define _SVSTDARR_SHORTS
-#define _SVSTDARR_BYTES
#define _SVSTDARR_USHORTS
#define _SVSTDARR_XUB_STRLEN
#include <svl/svstdarr.hxx>
@@ -37,7 +36,6 @@
#include <list>
#include <modeltoviewhelper.hxx>
-#include <errhdl.hxx>
class SwTxtNode;
class Point;
@@ -98,18 +96,38 @@ public:
class SwScriptInfo
{
private:
- SvXub_StrLens aScriptChg;
- SvBytes aScriptType;
- SvXub_StrLens aDirChg;
- SvBytes aDirType;
+ //! Records a single change in script type.
+ struct ScriptChangeInfo
+ {
+ xub_StrLen position; //!< Character position at which we change script
+ sal_uInt8 type; //!< Script type (Latin/Asian/Complex) that we change to.
+ inline ScriptChangeInfo(xub_StrLen pos, sal_uInt8 typ) : position(pos), type(typ) {};
+ };
+ //TODO - This is sorted, so should probably be a std::set rather than vector.
+ // But we also use random access (probably unnecessarily).
+ std::vector<ScriptChangeInfo> aScriptChanges;
+ //! Records a single change in direction.
+ struct DirectionChangeInfo
+ {
+ xub_StrLen position; //!< Character position at which we change direction.
+ sal_uInt8 type; //!< Direction that we change to.
+ inline DirectionChangeInfo(xub_StrLen pos, sal_uInt8 typ) : position(pos), type(typ) {};
+ };
+ std::vector<DirectionChangeInfo> aDirectionChanges;
SvXub_StrLens aKashida;
SvXub_StrLens aKashidaInvalid;
SvXub_StrLens aNoKashidaLine;
SvXub_StrLens aNoKashidaLineEnd;
- SvXub_StrLens aCompChg;
- SvXub_StrLens aCompLen;
SvXub_StrLens aHiddenChg;
- SvBytes aCompType;
+ //! Records a single change in compression.
+ struct CompressionChangeInfo
+ {
+ xub_StrLen position; //!< Character position where the change occurs.
+ xub_StrLen length; //!< Length of the segment.
+ sal_uInt8 type; //!< Type of compression that we change to.
+ inline CompressionChangeInfo(xub_StrLen pos, xub_StrLen len, sal_uInt8 typ) : position(pos), length(len), type(typ) {};
+ };
+ std::vector<CompressionChangeInfo> aCompressionChanges;
xub_StrLen nInvalidityPos;
sal_uInt8 nDefaultDir;
@@ -356,61 +374,63 @@ inline void SwScriptInfo::SetInvalidity( const xub_StrLen nPos )
if ( nPos < nInvalidityPos )
nInvalidityPos = nPos;
};
-inline size_t SwScriptInfo::CountScriptChg() const { return aScriptChg.size(); }
+inline size_t SwScriptInfo::CountScriptChg() const { return aScriptChanges.size(); }
inline xub_StrLen SwScriptInfo::GetScriptChg( const size_t nCnt ) const
{
- ASSERT( nCnt < aScriptChg.size(),"No ScriptChange today!");
- return aScriptChg[ nCnt ];
+ OSL_ENSURE( nCnt < aScriptChanges.size(),"No ScriptChange today!");
+ return aScriptChanges[nCnt].position;
}
inline sal_uInt8 SwScriptInfo::GetScriptType( const xub_StrLen nCnt ) const
{
- ASSERT( nCnt < aScriptType.size(),"No ScriptType today!");
- return aScriptType[ nCnt ];
+ OSL_ENSURE( nCnt < aScriptChanges.size(),"No ScriptType today!");
+ return aScriptChanges[nCnt].type;
}
-inline size_t SwScriptInfo::CountDirChg() const { return aDirChg.size(); }
+inline size_t SwScriptInfo::CountDirChg() const { return aDirectionChanges.size(); }
inline xub_StrLen SwScriptInfo::GetDirChg( const size_t nCnt ) const
{
- ASSERT( nCnt < aDirChg.size(),"No DirChange today!");
- return aDirChg[ nCnt ];
+ OSL_ENSURE( nCnt < aDirectionChanges.size(),"No DirChange today!");
+ return aDirectionChanges[ nCnt ].position;
}
inline sal_uInt8 SwScriptInfo::GetDirType( const size_t nCnt ) const
{
- ASSERT( nCnt < aDirType.size(),"No DirType today!");
- return aDirType[ nCnt ];
+ OSL_ENSURE( nCnt < aDirectionChanges.size(),"No DirType today!");
+ return aDirectionChanges[ nCnt ].type;
}
inline size_t SwScriptInfo::CountKashida() const { return aKashida.size(); }
inline xub_StrLen SwScriptInfo::GetKashida( const size_t nCnt ) const
{
- ASSERT( nCnt < aKashida.size(),"No Kashidas today!");
+ OSL_ENSURE( nCnt < aKashida.Count(),"No Kashidas today!");
return aKashida[ nCnt ];
}
-inline size_t SwScriptInfo::CountCompChg() const { return aCompChg.size(); };
+inline size_t SwScriptInfo::CountCompChg() const { return aCompressionChanges.size(); };
inline xub_StrLen SwScriptInfo::GetCompStart( const size_t nCnt ) const
{
- ASSERT( nCnt < aCompChg.size(),"No CompressionStart today!");
- return aCompChg[ nCnt ];
+ OSL_ENSURE( nCnt < aCompressionChanges.size(),"No CompressionStart today!");
+ return aCompressionChanges[ nCnt ].position;
}
inline xub_StrLen SwScriptInfo::GetCompLen( const size_t nCnt ) const
{
- ASSERT( nCnt < aCompLen.size(),"No CompressionLen today!");
- return aCompLen[ nCnt ];
+ OSL_ENSURE( nCnt < aCompressionChanges.size(),"No CompressionLen today!");
+ return aCompressionChanges[ nCnt ].length;
}
inline sal_uInt8 SwScriptInfo::GetCompType( const size_t nCnt ) const
{
- ASSERT( nCnt < aCompType.size(),"No CompressionType today!");
- return aCompType[ nCnt ];
+ OSL_ENSURE( nCnt < aCompressionChanges.size(),"No CompressionType today!");
+ return aCompressionChanges[ nCnt ].type;
}
inline size_t SwScriptInfo::CountHiddenChg() const { return aHiddenChg.size(); };
inline xub_StrLen SwScriptInfo::GetHiddenChg( const size_t nCnt ) const
{
- ASSERT( nCnt < aHiddenChg.size(),"No HiddenChg today!");
+ OSL_ENSURE( nCnt < aHiddenChg.Count(),"No HiddenChg today!");
return aHiddenChg[ nCnt ];
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx
index 27169fe0e97f..f06ff2a4a5d1 100644
--- a/sw/source/core/inc/sectfrm.hxx
+++ b/sw/source/core/inc/sectfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -146,3 +147,5 @@ inline const SwCntntFrm *SwSectionFrm::FindLastCntnt( sal_uInt8 nMode ) const
#endif //_SECTFRM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/setmapvirtdev.hxx b/sw/source/core/inc/setmapvirtdev.hxx
index e438899c2287..c3b6cdf7fea7 100644
--- a/sw/source/core/inc/setmapvirtdev.hxx
+++ b/sw/source/core/inc/setmapvirtdev.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,3 +70,4 @@ void SetMappingForVirtDev( const Point& _rNewOrigin,
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/sortedobjs.hxx b/sw/source/core/inc/sortedobjs.hxx
index b983e2c81271..720ff087c936 100644
--- a/sw/source/core/inc/sortedobjs.hxx
+++ b/sw/source/core/inc/sortedobjs.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,8 +52,6 @@ class SwAnchoredObject;
- internal anchor order number
If one of the sort criteria attributes of an anchored object changes,
the sorting has to be updated - use method <Update(..)>
-
- @author OD
*/
class SwSortedObjs
{
@@ -69,8 +68,6 @@ class SwSortedObjs
@param _nIndex
input parameter - index of entry, valid value range [0..Count()-1]
-
- @author OD
*/
SwAnchoredObject* operator[]( sal_uInt32 _nIndex ) const;
@@ -83,22 +80,15 @@ class SwSortedObjs
/** method to update the position of the given anchored object in the
sorted list
- OD 2004-07-01
-
- @author OD
-
@return boolean, indicating success of the update.
*/
bool Update( SwAnchoredObject& _rAnchoredObj );
/** Position of object <_rAnchoredObj> in sorted list
- OD 2004-05-07
Returns the number of the list position of object <_rAnchoredObj>.
Returns <Count()>, if object isn't contained in list.
- @author OD
-
@return sal_uInt32
Number of the list position of object <_rAnchoredObj>
*/
@@ -106,3 +96,5 @@ class SwSortedObjs
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/sortedobjsimpl.hxx b/sw/source/core/inc/sortedobjsimpl.hxx
index c15ed5e0e5dd..1b23cd194ac9 100644
--- a/sw/source/core/inc/sortedobjsimpl.hxx
+++ b/sw/source/core/inc/sortedobjsimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,5 @@ class SwSortedObjsImpl
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx
index c5d2b9240b22..1ac9455abff7 100644
--- a/sw/source/core/inc/swblocks.hxx
+++ b/sw/source/core/inc/swblocks.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include <tools/string.hxx>
-#ifndef _DATE_HXX //autogen
#include <tools/datetime.hxx>
-#endif
#include <svl/svarray.hxx>
@@ -144,99 +143,6 @@ public:
virtual sal_Bool PutMuchEntries( sal_Bool bOn );
};
-/*
-class Sw3Persist : public SvPersist
-{
- virtual void FillClass( SvGlobalName * pClassName,
- sal_uLong * pClipFormat,
- String * pAppName,
- String * pLongUserName,
- String * pUserName,
- sal_Int32 nFileFormat=SOFFICE_FILEFORMAT_CURRENT ) const;
- virtual sal_Bool Save();
- virtual sal_Bool SaveCompleted( SvStorage * );
-public:
- Sw3Persist();
-};
-
-class SwSwgReader;
-
-class Sw2TextBlocks : public SwImpBlocks
-{
- SvPersistRef refPersist; // Fuer OLE-Objekte
- SwSwgReader* pRdr; // Lese-Routinen
- SfxMedium* pMed; // der logische Input-Stream
- String* pText; // String fuer GetText()
- long nDocStart; // Beginn des Doc-Records
- long nDocSize; // Laenge des Doc-Records
- long nStart; // Beginn des CONTENTS-Records
- long nSize; // Laenge des CONTENTS-Records
- sal_uInt16 nNamedFmts; // benannte Formate
- sal_uInt16 nColls; // Text-Collections
- sal_uInt16 nBlks; // Anzahl Elemente im CONTENTS-Record
-public:
- Sw2TextBlocks( const String& );
- virtual ~Sw2TextBlocks();
- virtual sal_uLong Delete( sal_uInt16 );
- virtual sal_uLong Rename( sal_uInt16, const String&, const String& );
- virtual sal_uLong CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong);
- virtual sal_uLong GetDoc( sal_uInt16 );
- virtual sal_uLong BeginPutDoc( const String&, const String& );
- virtual sal_uLong PutDoc();
- virtual sal_uLong GetText( sal_uInt16, String& );
- virtual sal_uLong PutText( const String&, const String&, const String& );
- virtual sal_uLong MakeBlockList();
- virtual short GetFileType( ) const;
- sal_uLong LoadDoc();
-
- virtual sal_uLong OpenFile( sal_Bool bReadOnly = sal_True );
- virtual void CloseFile();
-
- void StatLineStartPercent(); // zum Anzeigen des Prozessbars
-};
-
-class Sw3Io;
-class Sw3IoImp;
-
-class Sw3TextBlocks : public SwImpBlocks
-{
- Sw3Io* pIo3;
- Sw3IoImp* pImp;
- sal_Bool bAutocorrBlock;
-
-public:
- Sw3TextBlocks( const String& );
- Sw3TextBlocks( SvStorage& );
- virtual ~Sw3TextBlocks();
- virtual sal_uLong Delete( sal_uInt16 );
- virtual sal_uLong Rename( sal_uInt16, const String&, const String& );
- virtual sal_uLong CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong);
- virtual sal_uLong GetDoc( sal_uInt16 );
- virtual sal_uLong GetDocForConversion( sal_uInt16 );
- virtual sal_uLong BeginPutDoc( const String&, const String& );
- virtual sal_uLong PutDoc();
- virtual void SetDoc( SwDoc * pNewDoc);
- virtual sal_uLong GetText( sal_uInt16, String& );
- virtual sal_uLong PutText( const String&, const String&, const String& );
- virtual sal_uLong MakeBlockList();
- virtual short GetFileType( ) const;
-
- virtual sal_uLong OpenFile( sal_Bool bReadOnly = sal_True );
- virtual void CloseFile();
-
- // Methoden fuer die neue Autokorrektur
- sal_uLong GetText( const String& rShort, String& );
- SwDoc* GetDoc() const { return pDoc; }
-
- virtual sal_Bool IsOnlyTextBlock( const String& rShort ) const;
-
- virtual sal_uLong GetMacroTable( sal_uInt16, SvxMacroTableDtor& rMacroTbl,
- sal_Bool bFileAlreadyOpen = sal_False );
- virtual sal_uLong SetMacroTable( sal_uInt16 nIdx,
- const SvxMacroTableDtor& rMacroTbl,
- sal_Bool bFileAlreadyOpen = sal_False );
-
- void ReadInfo();
-};
-*/
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx
index b23ccb0f834a..cfb585345566 100644
--- a/sw/source/core/inc/swcache.hxx
+++ b/sw/source/core/inc/swcache.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,11 +58,9 @@
*
*/
-#ifdef DBG_UTIL
-#ifndef _STRING_HXX //autogen
+#if OSL_DEBUG_LEVEL > 1
#include <tools/string.hxx>
#endif
-#endif
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_USHORTS
@@ -91,7 +90,7 @@ class SwCache : public SwCacheObjArr
void DeleteObj( SwCacheObj *pObj );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
ByteString aName;
long nAppend; //Anzahl der Eintragungen durch Erweiterung.
long nInsertFree; //Anzahl der Eintragungen auf freie Plaetze.
@@ -113,7 +112,7 @@ class SwCache : public SwCacheObjArr
public:
//nur sal_uInt8 hineinstecken!!!
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize,
const ByteString &rNm );
~SwCache();
@@ -194,12 +193,12 @@ public:
inline sal_Bool IsLocked() const { return 0 != nLock; }
-#ifndef DBG_UTIL
- inline void Lock() { ++nLock; }
- inline void Unlock() { --nLock; }
-#else
+#if OSL_DEBUG_LEVEL > 1
void Lock();
void Unlock();
+#else
+ inline void Lock() { ++nLock; }
+ inline void Unlock() { --nLock; }
#endif
SwCacheObj *Next() { return pNext; }
@@ -246,7 +245,7 @@ public:
inline void SwCache::IncreaseMax( const sal_uInt16 nAdd )
{
nCurMax = nCurMax + sal::static_int_cast< sal_uInt16 >(nAdd);
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
++nIncreaseMax;
#endif
}
@@ -254,7 +253,7 @@ inline void SwCache::DecreaseMax( const sal_uInt16 nSub )
{
if ( nCurMax > nSub )
nCurMax = nCurMax - sal::static_int_cast< sal_uInt16 >(nSub);
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
++nDecreaseMax;
#endif
}
@@ -300,3 +299,5 @@ inline SwCacheObj *SwCacheAccess::Get()
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/swfntcch.hxx b/sw/source/core/inc/swfntcch.hxx
index 375139c260d7..e57b6f7b1a41 100644
--- a/sw/source/core/inc/swfntcch.hxx
+++ b/sw/source/core/inc/swfntcch.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,7 +47,7 @@ class SwFontCache : public SwCache
public:
inline SwFontCache() : SwCache(50,50
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
, "Globaler AttributSet/Font-Cache pSwFontCache"
#endif
) {}
@@ -97,3 +98,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 631abab76b38..f0cf7bab6a32 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include <i18npool/lang.h>
#include <tools/color.hxx>
-#ifndef _TOOLS_STREAM_HXX //autogen
#include <tools/stream.hxx>
-#endif
#include <editeng/svxfont.hxx>
#include <swtypes.hxx>
#include <drawfont.hxx> // SwDrawTextInfo
@@ -832,7 +831,7 @@ public:
SwFont& GetFont()
{
- ASSERT( pFnt, "No underline font" )
+ OSL_ENSURE( pFnt, "No underline font" );
return *pFnt;
}
const Point& GetPos() const { return aPos; }
@@ -845,9 +844,7 @@ public:
* class SvStatistics
*************************************************************************/
-#ifndef DBG_UTIL
-#define SV_STAT(nWhich)
-#else
+#if OSL_DEBUG_LEVEL > 1
class SvStatistics
{
@@ -893,7 +890,10 @@ inline void SvStatistics::PrintOn( SvStream &rOS ) const //$ ostream
rOS << "\tnDrawStretchText: " << nDrawStretchText << '\n'; if( nChangeFont )
rOS << "\tnChangeFont: " << nChangeFont << '\n'; if( nGetFontMetric )
rOS << "\tnGetFontMetric: " << nGetFontMetric << '\n'; rOS << "}" << '\n'; }
-#endif /* PRODUCT */
+#else
+#define SV_STAT(nWhich)
+#endif /* DEBUG */
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/swselectionlist.hxx b/sw/source/core/inc/swselectionlist.hxx
index 1431a49c5bc3..a3deb52ce66f 100644
--- a/sw/source/core/inc/swselectionlist.hxx
+++ b/sw/source/core/inc/swselectionlist.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,5 @@ public:
};
#endif //_SWSELECTIONLIST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/swthreadjoiner.hxx b/sw/source/core/inc/swthreadjoiner.hxx
index d3d7ab8bd97b..e997e6dadc26 100644
--- a/sw/source/core/inc/swthreadjoiner.hxx
+++ b/sw/source/core/inc/swthreadjoiner.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,3 +50,5 @@ class SwThreadJoiner
SwThreadJoiner();
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/swthreadmanager.hxx b/sw/source/core/inc/swthreadmanager.hxx
index 4ab94ef4cfc2..c44fe5109b62 100644
--- a/sw/source/core/inc/swthreadmanager.hxx
+++ b/sw/source/core/inc/swthreadmanager.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,10 +41,8 @@ class ThreadManager;
/** class to manage threads in Writer using a <ThreadManager> instance
- OD 2007-04-13 #i73788#
+ #i73788#
Conforms the singleton pattern
-
- @author OD
*/
class SwThreadManager
: private ::boost::noncopyable
@@ -67,14 +66,10 @@ class SwThreadManager
Suspending the starting of further threads is sensible during the
destruction of a Writer document.
-
- @author OD
*/
void SuspendStartingOfThreads();
/** continues the starting of threads after it has been suspended
-
- @author OD
*/
void ResumeStartingOfThreads();
@@ -87,3 +82,5 @@ class SwThreadManager
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index a93ddf24ebf3..184e649b27ac 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -232,3 +233,5 @@ inline SwTabFrm *SwTabFrm::GetFollow()
}
#endif // SW_TABFRM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/tblrwcl.hxx b/sw/source/core/inc/tblrwcl.hxx
index 866e82274de9..659ae318cc92 100644
--- a/sw/source/core/inc/tblrwcl.hxx
+++ b/sw/source/core/inc/tblrwcl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,7 +67,7 @@ sal_Bool lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* pPara );
sal_Bool lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* pPara );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize );
#endif
@@ -226,3 +227,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/textapi.hxx b/sw/source/core/inc/textapi.hxx
index 609e0a0ecc4d..5692c7ae3c7f 100755..100644
--- a/sw/source/core/inc/textapi.hxx
+++ b/sw/source/core/inc/textapi.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,5 @@ public:
void SetText( OutlinerParaObject& rText ) { pSource->SetText( rText ); }
String GetText() { return pSource->GetText(); }
};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/threadlistener.hxx b/sw/source/core/inc/threadlistener.hxx
index 9ff03cf37cc4..f6bc5edf8895 100644
--- a/sw/source/core/inc/threadlistener.hxx
+++ b/sw/source/core/inc/threadlistener.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,5 @@ class ThreadListener : public IFinishedThreadListener
IThreadListenerOwner& mrThreadListenerOwner;
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/threadmanager.hxx b/sw/source/core/inc/threadmanager.hxx
index a167548da7b4..53ea5f7c689f 100644
--- a/sw/source/core/inc/threadmanager.hxx
+++ b/sw/source/core/inc/threadmanager.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -170,3 +171,5 @@ class ThreadManager : public IThreadListenerOwner
bool StartThread( const tThreadData& aThreadData );
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/tocntntanchoredobjectposition.hxx b/sw/source/core/inc/tocntntanchoredobjectposition.hxx
index 80c788098fde..ac5c8ac5424c 100644
--- a/sw/source/core/inc/tocntntanchoredobjectposition.hxx
+++ b/sw/source/core/inc/tocntntanchoredobjectposition.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,7 @@ namespace objectpositioning
private:
// calculated data for object position
const SwLayoutFrm* mpVertPosOrientFrm;
- // --> OD 2004-06-17 #i26791#
+ // #i26791#
// determine offset to frame anchor position according to the
// positioning alignments
Point maOffsetToFrmAnchorPos;
@@ -54,7 +55,7 @@ namespace objectpositioning
virtual bool IsAnchoredToChar() const;
virtual const SwFrm* ToCharOrientFrm() const;
virtual const SwRect* ToCharRect() const;
- // OD 12.11.2003 #i22341#
+ // #i22341#
virtual SwTwips ToCharTopOfLine() const;
// method to cast <SwAnchoredObjectPosition::GetAnchorFrm()> to
@@ -64,7 +65,6 @@ namespace objectpositioning
// *********************************************************************
/** determine frame for horizontal position
- OD 04.08.2003
if the given proposed frame is a content frame, the proposed
frame is returned.
otherwise (given proposed frame is a layout frame),
@@ -72,8 +72,6 @@ namespace objectpositioning
for the first, that the anchor or a follow of the anchor.
If none is found, the proposed frame is returned.
- @author OD
-
@param _pProposedFrm
input parameter - proposed frame for horizontal position
@@ -87,17 +85,15 @@ namespace objectpositioning
virtual ~SwToCntntAnchoredObjectPosition();
/** calculate position of object
-
- @author OD
*/
virtual void CalcPosition();
/** frame, at which the vertical position is oriented at
-
- @author OD
*/
const SwLayoutFrm& GetVertPosOrientFrm() const;
};
} // namespace objectpositioning
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/tolayoutanchoredobjectposition.hxx b/sw/source/core/inc/tolayoutanchoredobjectposition.hxx
index e5e77e640057..6387b8e7ced4 100644
--- a/sw/source/core/inc/tolayoutanchoredobjectposition.hxx
+++ b/sw/source/core/inc/tolayoutanchoredobjectposition.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,7 +39,7 @@ namespace objectpositioning
// calculated data for object position type TO_LAYOUT
Point maRelPos;
- // --> OD 2004-06-17 #i26791#
+ // #i26791#
// determine offset to frame anchor position according to the
// positioning alignments
Point maOffsetToFrmAnchorPos;
@@ -48,19 +49,15 @@ namespace objectpositioning
virtual ~SwToLayoutAnchoredObjectPosition();
/** calculate position for object
-
- OD 30.07.2003 #110978#
-
- @author OD
*/
virtual void CalcPosition();
/** calculated relative position for object
-
- @author OD
*/
Point GetRelPos() const;
};
} // namespace objectpositioning
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/toxhlp.hxx b/sw/source/core/inc/toxhlp.hxx
index 01188e1d8c7e..b254874009bf 100644
--- a/sw/source/core/inc/toxhlp.hxx
+++ b/sw/source/core/inc/toxhlp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx
index 4d5e41fe8b71..75ad22213c79 100644
--- a/sw/source/core/inc/txmsrt.hxx
+++ b/sw/source/core/inc/txmsrt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -292,3 +293,5 @@ public:
#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 3cc1cbfc03b9..fcb88f8b038c 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,13 +85,11 @@ class SwTxtFrm: public SwCntntFrm
// OD 2004-03-17 #i11860# - re-factoring of #i11859#
// member for height of last line (value needed for proportional line spacing)
SwTwips mnHeightOfLastLine;
- // --> OD 2008-01-31 #newlistlevelattrs#
// member for the additional first line offset, which is caused by the list
// label alignment for list level position and space mode LABEL_ALIGNMENT.
// This additional first line offset is used for the text formatting.
// It is NOT used for the determination of printing area.
SwTwips mnAdditionalFirstLineOffset;
- // <--
xub_StrLen nOfst; //nOfst gibt den Offset im Cntnt (Anzahl Zeichen) an.
@@ -403,10 +402,10 @@ public:
inline sal_Bool IsSwapped() const { return bIsSwapped; }
// Hat der Frm eine lokale Fussnote (in diesem Frm bzw. Follow)?
-#ifndef DBG_UTIL
- void CalcFtnFlag();
+#if OSL_DEBUG_LEVEL > 1
+ void CalcFtnFlag( xub_StrLen nStop = STRING_LEN );//For testing SplitFrm
#else
- void CalcFtnFlag( xub_StrLen nStop = STRING_LEN );//Fuer den Test von SplitFrm
+ void CalcFtnFlag();
#endif
// Hidden
@@ -503,18 +502,14 @@ public:
line offset for the real text formatting due to the value of label
adjustment attribute of the list level.
- OD 2008-01-31 #newlistlevelattrs#
-
@author OD
*/
void CalcAdditionalFirstLineOffset();
- // --> OD 2008-01-31 #newlistlevelattrs#
inline SwTwips GetAdditionalFirstLineOffset() const
{
return mnAdditionalFirstLineOffset;
}
- // <--
// liefert den zusaetzlichen Zeilenabstand fuer den naechsten Absatz
// OD 07.01.2004 #i11859# - change return data type;
@@ -611,6 +606,10 @@ public:
{
return mnHeightOfLastLine;
}
+
+#if OSL_DEBUG_LEVEL > 1
+ virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer);
+#endif
};
/*************************************************************************
@@ -737,47 +736,6 @@ inline void SwTxtFrm::ResetBlinkPor() const
((SwTxtFrm*)this)->bBlinkPor = sal_False;
}
-#ifdef LINGU_STATISTIK
-
-class SwLinguStatistik
-{
-public:
- long nWords; // gepruefte Worte
- long nFlushCnt; // zaehlt die Messungen
-
- long nWrong; // als falsch erkannt
- long nAlter; // Alternativvorschlaege
- long nSpellTime; // Zeitmessung
- long nSynonym; // Thesaurus
- long nNoSynonym; // Thesaurus ratlos
- long nMeaning; // Thesaurus-Bedeutung
- long nNoMeaning; // Thesaurus meinungslos
- long nTheTime; // Zeitmessung
- long nHyphens; // Trennstellen
- long nNoHyph; // Worte ohne Trennstellen
- long nHyphErr; // Fehler beim Trennen
- long nHyphTime; // Zeitmessung
- SpellCheck *pSpell;
- LanguageType eLang;
-
- void Flush();
-
- inline SwLinguStatistik()
- { nWords = nWrong = nAlter = nSynonym = nNoSynonym =
- nHyphens = nNoHyph = nHyphErr = nSpellTime = nTheTime =
- nHyphTime = nFlushCnt = 0;
- pSpell = NULL;
- eLang = LANGUAGE_DONTKNOW; }
- inline ~SwLinguStatistik(){ Flush(); }
-};
-
-// globale Variable, implementiert in txtfrm.cxx
-extern SwLinguStatistik aSwLinguStat;
-
-#define SW_LING(nWhich,nInc) (aSwLinguStat.nWhich) += nInc;
-
-#endif
-
#define SWAP_IF_SWAPPED( pFrm )\
sal_Bool bUndoSwap = sal_False; \
if ( pFrm->IsVertical() && pFrm->IsSwapped() )\
@@ -830,3 +788,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/txttypes.hxx b/sw/source/core/inc/txttypes.hxx
index f9026574245e..86d9e5cd07a6 100644
--- a/sw/source/core/inc/txttypes.hxx
+++ b/sw/source/core/inc/txttypes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -101,3 +102,5 @@
#define POR_TABLEFT 0x0740
#endif //_TXTTYPES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/undoflystrattr.hxx b/sw/source/core/inc/undoflystrattr.hxx
index 5115f1a37c07..9a44ae2310c3 100644
--- a/sw/source/core/inc/undoflystrattr.hxx
+++ b/sw/source/core/inc/undoflystrattr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,3 +55,5 @@ class SwUndoFlyStrAttr : public SwUndo
};
#endif // SW_UNDO_FLY_STR_ATTR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/unofldmid.h b/sw/source/core/inc/unofldmid.h
index 6ad9ea28d399..09c91e4021b4 100644
--- a/sw/source/core/inc/unofldmid.h
+++ b/sw/source/core/inc/unofldmid.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,3 +70,5 @@ namespace com { namespace sun { namespace star { namespace uno {
String& GetString( const com::sun::star::uno::Any&, String& rStr );
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx
index 52ac418b3861..92333a46ca8a 100755..100644
--- a/sw/source/core/inc/unometa.hxx
+++ b/sw/source/core/inc/unometa.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -366,3 +367,4 @@ void getPrefixAndSuffix(
#endif // SW_UNOMETA_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index 3959a815eaa2..84a840f43bc3 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,6 @@
#include <vcl/timer.hxx>
#include <tools/color.hxx>
-// OD 25.06.2003 #108784#
#include <svx/svdtypes.hxx>
#include <tools/string.hxx>
@@ -67,7 +67,7 @@ class SwViewImp
friend class SwLayAction; //Lay- und IdleAction tragen sich ein und aus.
friend class SwLayIdle;
- // OD 12.12.2002 #103492# - for paint of page preview
+ // for paint of page preview
friend class SwPagePreviewLayout;
ViewShell *pSh; //Falls jemand einen Imp durchreicht und doch
@@ -92,8 +92,6 @@ class SwViewImp
sal_Bool bFirstPageInvalid :1; //Pointer auf erste Seite ungueltig?
- //sal_Bool bResetXorVisibility:1; //StartAction/EndAction
- //HMHBOOL bShowHdlPaint :1; //LockPaint/UnlockPaint
sal_Bool bResetHdlHiddenPaint:1;// -- "" --
sal_Bool bSmoothUpdate :1; //Meber fuer SmoothScroll
@@ -103,7 +101,6 @@ class SwViewImp
sal_uInt16 nRestoreActions ; //Die Anzahl der zu restaurierenden Actions (UNO)
SwRect aSmoothRect;
- // OD 12.12.2002 #103492#
SwPagePreviewLayout* mpPgPrevwLayout;
/**
@@ -140,12 +137,10 @@ private:
/** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
- OD 2005-12-01 #i27138#
+ #i27138#
implementation for wrapper method
<ViewShell::InvalidateAccessibleParaFlowRelation(..)>
- @author OD
-
@param _pFromTxtFrm
input parameter - paragraph frame, for which the relation CONTENT_FLOWS_FROM
has to be invalidated.
@@ -161,21 +156,17 @@ private:
/** invalidate text selection for paragraphs
- OD 2005-12-12 #i27301#
+ #i27301#
implementation for wrapper method
<ViewShell::InvalidateAccessibleParaTextSelection(..)>
-
- @author OD
*/
void _InvalidateAccessibleParaTextSelection();
/** invalidate attributes for paragraphs and paragraph's characters
- OD 2009-01-06 #i88069#
+ #i88069#
implementation for wrapper method
<ViewShell::InvalidateAccessibleParaAttrs(..)>
-
- @author OD
*/
void _InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm );
@@ -206,15 +197,16 @@ public:
const SdrPageView*GetPageView() const { return pSdrPageView; }
void MakeDrawView();
- // OD 29.08.2002 #102450#
// add 3rd parameter <const Color* pPageBackgrdColor> for setting this
// color as the background color at the outliner of the draw view
// for painting layers <hell> and <heaven>
- // OD 09.12.2002 #103045# - add 4th parameter for the horizontal text
+
+ // add 4th parameter for the horizontal text
// direction of the page in order to set the default horizontal text
// direction at the outliner of the draw view for painting layers <hell>
// and <heaven>.
- // OD 25.06.2003 #108784# - correct type of 1st parameter
+
+ // correct type of 1st parameter
void PaintLayer( const SdrLayerID _nLayerID,
SwPrintData const*const pPrintData,
const SwRect& _rRect,
@@ -223,8 +215,6 @@ public:
//wird als Link an die DrawEngine uebergeben, entscheidet was wie
//gepaintet wird oder nicht.
- //#110094#-3
- //DECL_LINK( PaintDispatcher, SdrPaintProcRec * );
// Interface Drawing
sal_Bool IsDragPossible( const Point &rPoint );
@@ -249,10 +239,8 @@ public:
void SetRestoreActions(sal_uInt16 nSet){nRestoreActions = nSet;}
sal_uInt16 GetRestoreActions() const{return nRestoreActions;}
- // OD 12.12.2002 #103492#
void InitPagePreviewLayout();
- // OD 12.12.2002 #103492#
inline SwPagePreviewLayout* PagePreviewLayout()
{
return mpPgPrevwLayout;
@@ -298,8 +286,7 @@ public:
const SwFlyFrm *pFollow );
// update data for accessible preview
- // OD 15.01.2003 #103492# - change method signature due to new page preview
- // functionality
+ // change method signature due to new page preview functionality
void UpdateAccessiblePreview( const std::vector<PrevwPage*>& _rPrevwPages,
const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm,
@@ -363,3 +350,4 @@ inline void SwViewImp::AddAccessibleObj( const SdrObject *pObj )
}
#endif // SW_VIEWIMP_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/visiturl.hxx b/sw/source/core/inc/visiturl.hxx
index a00921f76c82..b0d63c2baa9c 100644
--- a/sw/source/core/inc/visiturl.hxx
+++ b/sw/source/core/inc/visiturl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,13 +25,12 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
#ifndef _VISITURL_HXX
#define _VISITURL_HXX
-
-
-
#include <svl/lstner.hxx>
+
class SwDoc;
class SwURLStateChanged : public SfxListener
@@ -43,7 +43,6 @@ public:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
};
-
-
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx
index 7067d63a7adf..71e00c1c9e46 100644
--- a/sw/source/core/inc/wrong.hxx
+++ b/sw/source/core/inc/wrong.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef _WRONG_HXX
#define _WRONG_HXX
-#ifndef _COM_SUN_STAR_SMARTTAGS_XSMARTTAGPROPERTIES_HPP_
#include <com/sun/star/container/XStringKeyMap.hpp>
-#endif
#include <vector>
@@ -70,8 +69,8 @@ class SwWrongList
std::vector<SwWrongArea> maList;
WrongListType meType;
- xub_StrLen nBeginInvalid; // Start des ungueltigen Bereichs
- xub_StrLen nEndInvalid; // Ende des ungueltigen Bereichs
+ xub_StrLen nBeginInvalid; // Start of the invalid range
+ xub_StrLen nEndInvalid; // End of the invalid range
void ShiftLeft( xub_StrLen &rPos, xub_StrLen nStart, xub_StrLen nEnd )
{ if( rPos > nStart ) rPos = rPos > nEnd ? rPos - nEnd + nStart : nStart; }
@@ -164,3 +163,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 301c4a8372ec..880ae057dfb3 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,18 +39,18 @@
#include <tolayoutanchoredobjectposition.hxx>
#include <frmtool.hxx>
#include <fmtornt.hxx>
-// --> OD 2004-08-12 #i32795#
+// --> #i32795#
#include <txtfrm.hxx>
// <--
-// --> OD 2004-08-12 #i32795#
+// --> #i32795#
// template class <std::vector>
#include <vector>
// <--
-// --> OD 2004-08-10 #i28749#
+// --> #i28749#
#include <com/sun/star/text/PositionLayoutDir.hpp>
// <--
-// --> OD 2005-03-09 #i44559#
+// --> #i44559#
#include <ndtxt.hxx>
// <--
@@ -78,7 +79,7 @@ SwPosNotify::SwPosNotify( SwAnchoredDrawObject* _pAnchoredDrawObj ) :
mpAnchoredDrawObj( _pAnchoredDrawObj )
{
maOldObjRect = mpAnchoredDrawObj->GetObjRect();
- // --> OD 2004-10-20 #i35640# - determine correct page frame
+ // --> #i35640# - determine correct page frame
mpOldPageFrm = mpAnchoredDrawObj->GetPageFrm();
// <--
}
@@ -95,7 +96,7 @@ SwPosNotify::~SwPosNotify()
SwRect aNewObjRect( mpAnchoredDrawObj->GetObjRect() );
if( aNewObjRect.HasArea() )
{
- // --> OD 2004-10-20 #i35640# - determine correct page frame
+ // --> #i35640# - determine correct page frame
SwPageFrm* pNewPageFrm = mpAnchoredDrawObj->GetPageFrm();
// <--
if( pNewPageFrm )
@@ -105,9 +106,9 @@ SwPosNotify::~SwPosNotify()
::ClrContourCache( mpAnchoredDrawObj->GetDrawObj() );
- // --> OD 2004-10-20 #i35640# - additional notify anchor text frame
+ // --> #i35640# - additional notify anchor text frame
// Needed for negative positioned drawing objects
- // --> OD 2005-03-01 #i43255# - refine condition to avoid unneeded
+ // --> #i43255# - refine condition to avoid unneeded
// invalidations: anchored object had to be on the page of its anchor
// text frame.
if ( mpAnchoredDrawObj->GetAnchorFrm()->IsTxtFrm() &&
@@ -142,7 +143,7 @@ SwPosNotify::~SwPosNotify()
}
}
-// --> OD 2004-08-12 #i32795#
+// --> #i32795#
Point SwPosNotify::LastObjPos() const
{
return maOldObjRect.Pos();
@@ -150,7 +151,7 @@ Point SwPosNotify::LastObjPos() const
//<--
// ============================================================================
-// OD 2004-08-12 #i32795#
+// #i32795#
// helper class for oscillation control on object positioning
// ============================================================================
class SwObjPosOscillationControl
@@ -205,7 +206,7 @@ bool SwObjPosOscillationControl::OscillationDetected()
{
if ( *(pNewObjPos) == *(*aObjPosIter) )
{
- // position already occured -> oscillation
+ // position already occurred -> oscillation
bOscillationDetected = true;
delete pNewObjPos;
break;
@@ -228,14 +229,14 @@ TYPEINIT1(SwAnchoredDrawObject,SwAnchoredObject);
SwAnchoredDrawObject::SwAnchoredDrawObject() :
SwAnchoredObject(),
mbValidPos( false ),
- // --> OD 2004-09-29 #i34748#
+ // --> #i34748#
mpLastObjRect( 0L ),
// <--
mbNotYetAttachedToAnchorFrame( true ),
- // --> OD 2004-08-09 #i28749#
+ // --> #i28749#
mbNotYetPositioned( true ),
// <--
- // --> OD 2006-03-17 #i62875#
+ // --> #i62875#
mbCaptureAfterLayoutDirChange( false )
// <--
{
@@ -243,12 +244,12 @@ SwAnchoredDrawObject::SwAnchoredDrawObject() :
SwAnchoredDrawObject::~SwAnchoredDrawObject()
{
- // --> OD 2004-11-03 - follow-up of #i34748#
+ // --> follow-up of #i34748#
delete mpLastObjRect;
// <--
}
-// --> OD 2006-03-17 #i62875#
+// --> #i62875#
void SwAnchoredDrawObject::UpdateLayoutDir()
{
SwFrmFmt::tLayoutDir nOldLayoutDir( GetFrmFmt().GetLayoutDir() );
@@ -265,7 +266,7 @@ void SwAnchoredDrawObject::UpdateLayoutDir()
}
// <--
-// --> OD 2006-03-17 #i62875#
+// --> #i62875#
bool SwAnchoredDrawObject::IsOutsidePage() const
{
bool bOutsidePage( false );
@@ -282,7 +283,7 @@ bool SwAnchoredDrawObject::IsOutsidePage() const
// <--
// =============================================================================
-// OD 2004-03-25 #i26791# - implementation of pure virtual method declared in
+// #i26791# - implementation of pure virtual method declared in
// base class <SwAnchoredObject>
// =============================================================================
void SwAnchoredDrawObject::MakeObjPos()
@@ -299,11 +300,11 @@ void SwAnchoredDrawObject::MakeObjPos()
return;
}
- // --> OD 2004-08-09 #i28749# - anchored drawing object has to be attached
+ // --> #i28749# - anchored drawing object has to be attached
// to anchor frame
if ( mbNotYetAttachedToAnchorFrame )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwAnchoredDrawObject::MakeObjPos() - drawing object not yet attached to anchor frame -> no positioning" );
return;
}
@@ -311,23 +312,22 @@ void SwAnchoredDrawObject::MakeObjPos()
SwDrawContact* pDrawContact =
static_cast<SwDrawContact*>(::GetUserCall( GetDrawObj() ));
- // --> OD 2004-08-09 #i28749# - if anchored drawing object hasn't been yet
+ // --> #i28749# - if anchored drawing object hasn't been yet
// positioned, convert its positioning attributes, if its positioning
// attributes are given in horizontal left-to-right layout.
- // --> OD 2004-10-25 #i36010# - Note: horizontal left-to-right layout is made
+ // --> #i36010# - Note: horizontal left-to-right layout is made
// the default layout direction for <SwDrawFrmFmt> instances. Thus, it has
// to be adjusted manually, if no adjustment of the positioning attributes
// have to be performed here.
- // --> OD 2004-11-17 #i35635# - additionally move drawing object to the
- // visible layer.
+ // --> #i35635# - additionally move drawing object to the visible layer.
if ( mbNotYetPositioned )
{
- // --> OD 2004-11-17 #i35635#
+ // --> #i35635#
pDrawContact->MoveObjToVisibleLayer( DrawObj() );
// <--
- // --> OD 2004-09-29 #117975# - perform conversion of positioning
+ // --> perform conversion of positioning
// attributes only for 'master' drawing objects
- // --> OD 2005-03-11 #i44334#, #i44681# - check, if positioning
+ // --> #i44334#, #i44681# - check, if positioning
// attributes already have been set.
if ( !GetDrawObj()->ISA(SwDrawVirtObj) &&
!static_cast<SwDrawFrmFmt&>(GetFrmFmt()).IsPosAttrSet() )
@@ -335,7 +335,7 @@ void SwAnchoredDrawObject::MakeObjPos()
_SetPositioningAttr();
}
// <--
- // --> OD 2006-05-24 #b6418964#
+ // -->
// - reset internal flag after all needed actions are performed to
// avoid callbacks from drawing layer
mbNotYetPositioned = false;
@@ -361,7 +361,7 @@ void SwAnchoredDrawObject::MakeObjPos()
case FLY_AT_PARA:
case FLY_AT_CHAR:
{
- // --> OD 2004-08-12 #i32795# - move intrinsic positioning to
+ // --> #i32795# - move intrinsic positioning to
// helper method <_MakeObjPosAnchoredAtPara()>
_MakeObjPosAnchoredAtPara();
}
@@ -369,19 +369,19 @@ void SwAnchoredDrawObject::MakeObjPos()
case FLY_AT_PAGE:
case FLY_AT_FLY:
{
- // --> OD 2004-08-12 #i32795# - move intrinsic positioning to
+ // --> #i32795# - move intrinsic positioning to
// helper method <_MakeObjPosAnchoredAtLayout()>
_MakeObjPosAnchoredAtLayout();
}
break;
default:
{
- ASSERT( false, "<SwAnchoredDrawObject::MakeObjPos()> - unknown anchor type - please inform OD." );
+ OSL_ENSURE( false, "<SwAnchoredDrawObject::MakeObjPos()> - unknown anchor type - please inform OD." );
}
}
// keep, current object rectangle
- // --> OD 2004-09-29 #i34748# - use new method <SetLastObjRect(..)>
+ // --> #i34748# - use new method <SetLastObjRect(..)>
SetLastObjRect( GetObjRect().SVRect() );
// <--
@@ -396,7 +396,7 @@ void SwAnchoredDrawObject::MakeObjPos()
}
}
- // --> OD 2006-03-17 #i62875#
+ // --> #i62875#
if ( mbCaptureAfterLayoutDirChange &&
GetPageFrm() )
{
@@ -423,22 +423,22 @@ void SwAnchoredDrawObject::MakeObjPos()
/** method for the intrinsic positioning of a at-paragraph|at-character
anchored drawing object
- OD 2004-08-12 #i32795# - helper method for method <MakeObjPos>
+ #i32795# - helper method for method <MakeObjPos>
@author OD
*/
void SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara()
{
- // --> OD 2004-08-12 #i32795# - adopt positioning algorithm from Writer
+ // --> #i32795# - adopt positioning algorithm from Writer
// fly frames, which are anchored at paragraph|at character
// Determine, if anchor frame can/has to be formatted.
// If yes, after each object positioning the anchor frame is formatted.
// If after the anchor frame format the object position isn't valid, the
// object is positioned again.
- // --> OD 2005-02-22 #i43255# - refine condition: anchor frame format not
+ // --> #i43255# - refine condition: anchor frame format not
// allowed, if another anchored object, has to be consider its wrap influence
- // --> OD 2005-06-07 #i50356# - format anchor frame containing the anchor
+ // --> #i50356# - format anchor frame containing the anchor
// position. E.g., for at-character anchored object this can be the follow
// frame of the anchor frame, which contains the anchor character.
const bool bFormatAnchor =
@@ -449,14 +449,14 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara()
if ( bFormatAnchor )
{
- // --> OD 2005-06-07 #i50356#
+ // --> #i50356#
GetAnchorFrmContainingAnchPos()->Calc();
// <--
}
bool bOscillationDetected = false;
SwObjPosOscillationControl aObjPosOscCtrl( *this );
- // --> OD 2004-08-25 #i3317# - boolean, to apply temporarly the
+ // --> #i3317# - boolean, to apply temporarly the
// 'straightforward positioning process' for the frame due to its
// overlapping with a previous column.
bool bConsiderWrapInfluenceDueToOverlapPrevCol( false );
@@ -465,7 +465,7 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara()
// indicate that position will be valid after positioning is performed
mbValidPos = true;
- // --> OD 2004-10-20 #i35640# - correct scope for <SwPosNotify> instance
+ // --> #i35640# - correct scope for <SwPosNotify> instance
{
// create instance of <SwPosNotify> for correct notification
SwPosNotify aPosNotify( this );
@@ -491,12 +491,12 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara()
// to be invalid.
if ( bFormatAnchor )
{
- // --> OD 2005-06-07 #i50356#
+ // --> #i50356#
GetAnchorFrmContainingAnchPos()->Calc();
// <--
}
- // --> OD 2004-08-25 #i3317#
+ // --> #i3317#
if ( !ConsiderObjWrapInfluenceOnObjPos() &&
OverlapsPrevColumn() )
{
@@ -506,7 +506,7 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara()
} while ( !mbValidPos && !bOscillationDetected &&
!bConsiderWrapInfluenceDueToOverlapPrevCol );
- // --> OD 2004-08-25 #i3317# - consider a detected oscillation and overlapping
+ // --> #i3317# - consider a detected oscillation and overlapping
// with previous column.
// temporarly consider the anchored objects wrapping style influence
if ( bOscillationDetected || bConsiderWrapInfluenceDueToOverlapPrevCol )
@@ -520,7 +520,7 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara()
/** method for the intrinsic positioning of a at-page|at-frame anchored
drawing object
- OD 2004-08-12 #i32795# - helper method for method <MakeObjPos>
+ #i32795# - helper method for method <MakeObjPos>
@author OD
*/
@@ -539,14 +539,14 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtLayout()
// set position
- // --> OD 2004-07-29 #i31698#
- // --> OD 2004-10-18 #i34995# - setting anchor position needed for filters,
+ // --> #i31698#
+ // --> #i34995# - setting anchor position needed for filters,
// especially for the xml-filter to the OpenOffice.org file format
{
const Point aNewAnchorPos =
GetAnchorFrm()->GetFrmAnchorPos( ::HasWrap( GetDrawObj() ) );
DrawObj()->SetAnchorPos( aNewAnchorPos );
- // --> OD 2006-10-05 #i70122# - missing invalidation
+ // --> #i70122# - missing invalidation
InvalidateObjRectWithSpaces();
// <--
}
@@ -563,7 +563,7 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtLayout()
void SwAnchoredDrawObject::_SetDrawObjAnchor()
{
// new anchor position
- // --> OD 2004-07-29 #i31698# -
+ // --> #i31698# -
Point aNewAnchorPos =
GetAnchorFrm()->GetFrmAnchorPos( ::HasWrap( GetDrawObj() ) );
Point aCurrAnchorPos = GetDrawObj()->GetAnchorPos();
@@ -576,7 +576,7 @@ void SwAnchoredDrawObject::_SetDrawObjAnchor()
DrawObj()->SetAnchorPos( aNewAnchorPos );
// correct object position, caused by setting new anchor position
DrawObj()->Move( aMove );
- // --> OD 2006-10-05 #i70122# - missing invalidation
+ // --> #i70122# - missing invalidation
InvalidateObjRectWithSpaces();
// <--
}
@@ -584,7 +584,7 @@ void SwAnchoredDrawObject::_SetDrawObjAnchor()
/** method to invalidate the given page frame
- OD 2004-07-02 #i28701#
+ #i28701#
@author OD
*/
@@ -594,7 +594,7 @@ void SwAnchoredDrawObject::_InvalidatePage( SwPageFrm* _pPageFrm )
{
if ( _pPageFrm->GetUpper() )
{
- // --> OD 2004-11-11 #i35007# - correct invalidation for as-character
+ // --> #i35007# - correct invalidation for as-character
// anchored objects.
if ( GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AS_CHAR )
{
@@ -621,21 +621,21 @@ void SwAnchoredDrawObject::_InvalidatePage( SwPageFrm* _pPageFrm )
void SwAnchoredDrawObject::InvalidateObjPos()
{
- // --> OD 2004-07-01 #i28701# - check, if invalidation is allowed
+ // --> #i28701# - check, if invalidation is allowed
if ( mbValidPos &&
InvalidationOfPosAllowed() )
{
mbValidPos = false;
- // --> OD 2006-08-10 #i68520#
+ // --> #i68520#
InvalidateObjRectWithSpaces();
// <--
- // --> OD 2005-03-08 #i44339# - check, if anchor frame exists.
+ // --> #i44339# - check, if anchor frame exists.
if ( GetAnchorFrm() )
{
- // --> OD 2004-11-22 #118547# - notify anchor frame of as-character
+ // --> #118547# - notify anchor frame of as-character
// anchored object, because its positioned by the format of its anchor frame.
- // --> OD 2005-03-09 #i44559# - assure, that text hint is already
+ // --> #i44559# - assure, that text hint is already
// existing in the text frame
if ( GetAnchorFrm()->ISA(SwTxtFrm) &&
(GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
@@ -652,7 +652,7 @@ void SwAnchoredDrawObject::InvalidateObjPos()
SwPageFrm* pPageFrm = AnchorFrm()->FindPageFrm();
_InvalidatePage( pPageFrm );
- // --> OD 2004-08-12 #i32270# - also invalidate page frame, at which the
+ // --> #i32270# - also invalidate page frame, at which the
// drawing object is registered at.
SwPageFrm* pPageFrmRegisteredAt = GetPageFrm();
if ( pPageFrmRegisteredAt &&
@@ -661,7 +661,7 @@ void SwAnchoredDrawObject::InvalidateObjPos()
_InvalidatePage( pPageFrmRegisteredAt );
}
// <--
- // --> OD 2004-09-23 #i33751#, #i34060# - method <GetPageFrmOfAnchor()>
+ // --> #i33751#, #i34060# - method <GetPageFrmOfAnchor()>
// is replaced by method <FindPageFrmOfAnchor()>. It's return value
// have to be checked.
SwPageFrm* pPageFrmOfAnchor = FindPageFrmOfAnchor();
@@ -679,13 +679,13 @@ void SwAnchoredDrawObject::InvalidateObjPos()
SwFrmFmt& SwAnchoredDrawObject::GetFrmFmt()
{
- ASSERT( static_cast<SwDrawContact*>(GetUserCall(GetDrawObj()))->GetFmt(),
+ OSL_ENSURE( static_cast<SwDrawContact*>(GetUserCall(GetDrawObj()))->GetFmt(),
"<SwAnchoredDrawObject::GetFrmFmt()> - missing frame format -> crash." );
return *(static_cast<SwDrawContact*>(GetUserCall(GetDrawObj()))->GetFmt());
}
const SwFrmFmt& SwAnchoredDrawObject::GetFrmFmt() const
{
- ASSERT( static_cast<SwDrawContact*>(GetUserCall(GetDrawObj()))->GetFmt(),
+ OSL_ENSURE( static_cast<SwDrawContact*>(GetUserCall(GetDrawObj()))->GetFmt(),
"<SwAnchoredDrawObject::GetFrmFmt()> - missing frame format -> crash." );
return *(static_cast<SwDrawContact*>(GetUserCall(GetDrawObj()))->GetFmt());
}
@@ -697,14 +697,14 @@ const SwRect SwAnchoredDrawObject::GetObjRect() const
return GetDrawObj()->GetSnapRect();
}
-// --> OD 2006-10-05 #i70122#
+// --> #i70122#
const SwRect SwAnchoredDrawObject::GetObjBoundRect() const
{
return GetDrawObj()->GetCurrentBoundRect();
}
// <--
-// --> OD 2006-08-10 #i68520#
+// --> #i68520#
bool SwAnchoredDrawObject::_SetObjTop( const SwTwips _nTop )
{
SwTwips nDiff = _nTop - GetObjRect().Top();
@@ -723,7 +723,7 @@ bool SwAnchoredDrawObject::_SetObjLeft( const SwTwips _nLeft )
/** adjust positioning and alignment attributes for new anchor frame
- OD 2004-08-24 #i33313# - add second optional parameter <_pNewObjRect>
+ #i33313# - add second optional parameter <_pNewObjRect>
@author OD
*/
@@ -733,7 +733,7 @@ void SwAnchoredDrawObject::AdjustPositioningAttr( const SwFrm* _pNewAnchorFrm,
SwTwips nHoriRelPos = 0;
SwTwips nVertRelPos = 0;
const Point aAnchorPos = _pNewAnchorFrm->GetFrmAnchorPos( ::HasWrap( GetDrawObj() ) );
- // --> OD 2004-08-24 #i33313#
+ // --> #i33313#
const SwRect aObjRect( _pNewObjRect ? *_pNewObjRect : GetObjRect() );
// <--
const bool bVert = _pNewAnchorFrm->IsVertical();
@@ -758,14 +758,14 @@ void SwAnchoredDrawObject::AdjustPositioningAttr( const SwFrm* _pNewAnchorFrm,
GetFrmFmt().SetFmtAttr( SwFmtVertOrient( nVertRelPos, text::VertOrientation::NONE, text::RelOrientation::FRAME ) );
}
-// --> OD 2004-09-29 #i34748# - change return type
+// --> #i34748# - change return type
const Rectangle* SwAnchoredDrawObject::GetLastObjRect() const
{
return mpLastObjRect;
}
// <--
-// --> OD 2004-09-29 #i34748# - change return type.
+// --> #i34748# - change return type.
// If member <mpLastObjRect> is NULL, create one.
void SwAnchoredDrawObject::SetLastObjRect( const Rectangle& _rNewLastRect )
{
@@ -779,7 +779,7 @@ void SwAnchoredDrawObject::SetLastObjRect( const Rectangle& _rNewLastRect )
void SwAnchoredDrawObject::ObjectAttachedToAnchorFrame()
{
- // --> OD 2004-07-27 #i31698#
+ // --> #i31698#
SwAnchoredObject::ObjectAttachedToAnchorFrame();
// <--
@@ -791,7 +791,7 @@ void SwAnchoredDrawObject::ObjectAttachedToAnchorFrame()
/** method to set positioning attributes
- OD 2004-10-20 #i35798#
+ #i35798#
During load the positioning attributes aren't set.
Thus, the positioning attributes are set by the current object geometry.
This method is also used for the conversion for drawing objects
@@ -811,7 +811,7 @@ void SwAnchoredDrawObject::_SetPositioningAttr()
SwTwips nHoriPos = aObjRect.Left();
SwTwips nVertPos = aObjRect.Top();
- // --> OD 2005-03-10 #i44334#, #i44681#
+ // --> #i44334#, #i44681#
// perform conversion only if position is in horizontal-left-to-right-layout.
if ( GetFrmFmt().GetPositionLayoutDir() ==
text::PositionLayoutDir::PositionInHoriL2R )
@@ -837,38 +837,32 @@ void SwAnchoredDrawObject::_SetPositioningAttr()
break;
default:
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwAnchoredDrawObject::_SetPositioningAttr()> - unsupported layout direction" );
}
}
}
// <--
- // --> OD 2006-11-10 #i71182#
+ // --> #i71182#
// only change position - do not lose other attributes
SwFmtHoriOrient aHori( GetFrmFmt().GetHoriOrient() );
aHori.SetPos( nHoriPos );
GetFrmFmt().SetFmtAttr( aHori );
SwFmtVertOrient aVert( GetFrmFmt().GetVertOrient() );
- // --> OD 2007-01-03 #i73079# - vertical position already correct
-// if ( aVert.GetRelationOrient() == text::RelOrientation::CHAR ||
-// aVert.GetRelationOrient() == text::RelOrientation::TEXT_LINE )
-// {
-// nVertPos = -nVertPos;
-// }
- // <--
+
aVert.SetPos( nVertPos );
GetFrmFmt().SetFmtAttr( aVert );
// <--
- // --> OD 2004-10-25 #i36010# - set layout direction of the position
+ // --> #i36010# - set layout direction of the position
GetFrmFmt().SetPositionLayoutDir(
text::PositionLayoutDir::PositionInLayoutDirOfAnchor );
// <--
}
- // --> OD 2007-11-29 #i65798# - also for as-character anchored objects
- // --> OD 2005-05-10 #i45952# - indicate that position
+ // --> #i65798# - also for as-character anchored objects
+ // --> #i45952# - indicate that position
// attributes are set now.
static_cast<SwDrawFrmFmt&>(GetFrmFmt()).PosAttrSet();
// <--
@@ -884,7 +878,7 @@ void SwAnchoredDrawObject::NotifyBackground( SwPageFrm* _pPageFrm,
/** method to assure that anchored object is registered at the correct
page frame
- OD 2004-07-02 #i28701#
+ #i28701#
@author OD
*/
@@ -904,3 +898,5 @@ void SwAnchoredDrawObject::RegisterAtCorrectPage()
}
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx
index d6443027e3ad..c7a035c2de9a 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,7 @@
#include <frmfmt.hxx>
#include <fmtanchr.hxx>
#include <fmtornt.hxx>
-// --> OD 2004-06-29 #i28701#
+// --> #i28701#
#include <doc.hxx>
#include <fmtsrnd.hxx>
#include <svx/svdobj.hxx>
@@ -45,10 +46,10 @@
#include <pagefrm.hxx>
// <--
#include <frmatr.hxx>
-// --> OD 2004-08-25 #i3317#
+// --> #i3317#
#include <colfrm.hxx>
// <--
-// --> OD 2004-10-22 #i35911#
+// --> #i35911#
#include <layouter.hxx>
@@ -57,28 +58,28 @@ using namespace ::com::sun::star;
// <--
// ============================================================================
-// --> OD 2004-06-30 #i28701# -
+// --> #i28701# -
// implementation of helper class <SwObjPositioningInProgress>
// ============================================================================
SwObjPositioningInProgress::SwObjPositioningInProgress( SdrObject& _rSdrObj ) :
mpAnchoredObj( 0L ),
- // --> OD 2005-08-09 #i52904#
+ // --> #i52904#
mbOldObjPositioningInProgress( false )
// <--
{
mpAnchoredObj = ::GetUserCall( &_rSdrObj )->GetAnchoredObj( &_rSdrObj );
- // --> OD 2005-08-09 #i52904#
+ // --> #i52904#
mbOldObjPositioningInProgress = mpAnchoredObj->IsPositioningInProgress();
// <--
mpAnchoredObj->SetPositioningInProgress( true );
}
SwObjPositioningInProgress::SwObjPositioningInProgress( SwAnchoredObject& _rAnchoredObj ) :
mpAnchoredObj( &_rAnchoredObj ),
- // --> OD 2005-08-09 #i52904#
+ // --> #i52904#
mbOldObjPositioningInProgress( false )
// <--
{
- // --> OD 2005-08-09 #i52904#
+ // --> #i52904#
mbOldObjPositioningInProgress = mpAnchoredObj->IsPositioningInProgress();
// <--
mpAnchoredObj->SetPositioningInProgress( true );
@@ -88,7 +89,7 @@ SwObjPositioningInProgress::~SwObjPositioningInProgress()
{
if ( mpAnchoredObj )
{
- // --> OD 2005-08-09 #i52904#
+ // --> #i52904#
mpAnchoredObj->SetPositioningInProgress( mbOldObjPositioningInProgress );
// <--
}
@@ -101,29 +102,29 @@ TYPEINIT0(SwAnchoredObject);
SwAnchoredObject::SwAnchoredObject() :
mpDrawObj( 0L ),
mpAnchorFrm( 0L ),
- // --> OD 2004-06-30 #i28701#
+ // --> #i28701#
mpPageFrm( 0L ),
// <--
maRelPos(),
maLastCharRect(),
mnLastTopOfLine( 0L ),
mpVertPosOrientFrm( 0L ),
- // --> OD 2004-06-29 #i28701#
+ // --> #i28701#
mbPositioningInProgress( false ),
mbConsiderForTextWrap( false ),
mbPositionLocked( false ),
- // --> OD 2005-01-10 #i40147#
+ // --> #i40147#
mbKeepPositionLockedForSection( false ),
// <--
mbRestartLayoutProcess( false ),
// <--
- // --> OD 2004-10-22 #i35911#
+ // --> #i35911#
mbClearedEnvironment( false ),
// <--
- // --> OD 2004-08-25 #i3317#
+ // --> #i3317#
mbTmpConsiderWrapInfluence( false ),
// <--
- // --> OD 2006-08-10 #i68520#
+ // --> #i68520#
maObjRectWithSpaces(),
mbObjRectWithSpacesValid( false ),
maLastObjRect()
@@ -178,7 +179,7 @@ void SwAnchoredObject::ChgAnchorFrm( SwFrm* _pNewAnchorFrm )
/** determine anchor frame containing the anchor position
- OD 2004-10-08 #i26945#
+ #i26945#
the anchor frame, which is determined, is <mpAnchorFrm>
for an at-page, at-frame or at-paragraph anchored object
and the anchor character frame for an at-character and as-character
@@ -198,7 +199,7 @@ SwFrm* SwAnchoredObject::GetAnchorFrmContainingAnchPos()
}
// =============================================================================
-// OD 2004-06-30 #i28701# accessors for member <mpPageFrm>
+// #i28701# accessors for member <mpPageFrm>
// =============================================================================
SwPageFrm* SwAnchoredObject::GetPageFrm()
{
@@ -212,7 +213,6 @@ const SwPageFrm* SwAnchoredObject::GetPageFrm() const
void SwAnchoredObject::SetPageFrm( SwPageFrm* _pNewPageFrm )
{
- // --> OD 2006-01-02 #125977#
if ( mpPageFrm != _pNewPageFrm )
{
// clear member, which denotes the layout frame at which the vertical
@@ -227,7 +227,6 @@ void SwAnchoredObject::SetPageFrm( SwPageFrm* _pNewPageFrm )
// assign new page frame
mpPageFrm = _pNewPageFrm;
}
- // <--
}
// =============================================================================
@@ -278,7 +277,7 @@ SwTwips SwAnchoredObject::GetLastTopOfLine() const
return mnLastTopOfLine;
}
-// OD 2004-05-18 #i28701# - follow-up of #i22341#
+// #i28701# - follow-up of #i22341#
void SwAnchoredObject::AddLastTopOfLineY( SwTwips _nDiff )
{
mnLastTopOfLine += _nDiff;
@@ -286,12 +285,12 @@ void SwAnchoredObject::AddLastTopOfLineY( SwTwips _nDiff )
/** check anchor character rectangle and top of line
- OD 2004-03-24 #i26791
+ #i26791
For to-character anchored Writer fly frames the members <maLastCharRect>
and <maLastTopOfLine> are updated. These are checked for change and
depending on the applied positioning, it's decided, if the Writer fly
frame has to be invalidated.
- OD 2004-07-15 #117380#
+
add parameter <_bCheckForParaPorInf>, default value <true>
@author OD
@@ -306,13 +305,13 @@ void SwAnchoredObject::CheckCharRectAndTopOfLine(
if ( (rAnch.GetAnchorId() == FLY_AT_CHAR) &&
rAnch.GetCntntAnchor() )
{
- // --> OD 2004-07-14 #117380# - if requested, assure that anchor frame,
+ // --> if requested, assure that anchor frame,
// which contains the anchor character, has a paragraph portion information.
// The paragraph portion information is needed to determine the
// anchor character rectangle respectively the top of the line.
// Thus, a format of this frame is avoided to determine the
// paragraph portion information.
- // --> OD 2004-10-04 #i26945# - use new method <FindAnchorCharFrm()>
+ // --> #i26945# - use new method <FindAnchorCharFrm()>
const SwTxtFrm& aAnchorCharFrm = *(FindAnchorCharFrm());
// <--
if ( !_bCheckForParaPorInf || aAnchorCharFrm.HasPara() )
@@ -327,12 +326,12 @@ void SwAnchoredObject::CheckCharRectAndTopOfLine(
/** check anchor character rectangle
- OD 11.11.2003 #i22341#
+ #i22341#
helper method for method <CheckCharRectAndTopOfLine()>
For to-character anchored Writer fly frames the member <maLastCharRect>
is updated. This is checked for change and depending on the applied
positioning, it's decided, if the Writer fly frame has to be invalidated.
- OD 2004-07-14 #117380#
+
improvement - add second parameter <_rAnchorCharFrm>
@author OD
@@ -357,7 +356,7 @@ void SwAnchoredObject::_CheckCharRect( const SwFmtAnchor& _rAnch,
SwFmtHoriOrient aHori( GetFrmFmt().GetHoriOrient() );
// check for anchor character rectangle changes for certain
// positionings and alignments
- // OD 07.10.2003 #110978# - add condition to invalidate position,
+ // add condition to invalidate position,
// if vertical aligned at frame/page area and vertical position
// of anchor character has changed.
const sal_Int16 eVertRelOrient = aVert.GetRelationOrient();
@@ -376,7 +375,7 @@ void SwAnchoredObject::_CheckCharRect( const SwFmtAnchor& _rAnch,
( (aCharRect.*fnRect->fnGetTop)() !=
(maLastCharRect.*fnRect->fnGetTop)() ) ) )
{
- // --> OD 2004-10-08 #i26945#, #i35911# - unlock position of
+ // --> #i26945#, #i35911# - unlock position of
// anchored object, if it isn't registered at the page,
// where its anchor character frame is on.
if ( GetPageFrm() != _rAnchorCharFrm.FindPageFrm() )
@@ -394,12 +393,12 @@ void SwAnchoredObject::_CheckCharRect( const SwFmtAnchor& _rAnch,
/** check top of line
- OD 11.11.2003 #i22341#
+ #i22341#
helper method for method <CheckCharRectAndTopOfLine()>
For to-character anchored Writer fly frames the member <mnLastTopOfLine>
is updated. This is checked for change and depending on the applied
positioning, it's decided, if the Writer fly frame has to be invalidated.
- OD 2004-07-14 #117380#
+
improvement - add second parameter <_rAnchorCharFrm>
@author OD
@@ -415,7 +414,7 @@ void SwAnchoredObject::_CheckTopOfLine( const SwFmtAnchor& _rAnch,
// check alignment for invalidation of position
if ( GetFrmFmt().GetVertOrient().GetRelationOrient() == text::RelOrientation::TEXT_LINE )
{
- // --> OD 2004-10-08 #i26945#, #i35911# - unlock position of
+ // --> #i26945#, #i35911# - unlock position of
// anchored object, if it isn't registered at the page,
// where its anchor character frame is on.
if ( GetPageFrm() != _rAnchorCharFrm.FindPageFrm() )
@@ -456,7 +455,7 @@ void SwAnchoredObject::ObjectAttachedToAnchorFrame()
/** method update layout direction the layout direction, the anchored
object is in
- OD 2004-07-27 #i31698#
+ #i31698#
method has typically to be called, if the anchored object gets its
anchor frame assigned.
@@ -486,7 +485,7 @@ void SwAnchoredObject::UpdateLayoutDir()
objects, for whose the wrapping style influence has to be considered
on the object positioning.
- OD 2004-06-30 #i28701#
+ #i28701#
@author OD
*/
@@ -512,7 +511,7 @@ void SwAnchoredObject::InvalidateObjPosForConsiderWrapInfluence(
/** method to determine, if wrapping style influence of the anchored
object has to be considered on the object positioning
- OD 2004-06-30 #i28701#
+ #i28701#
Note: result of this method also decides, if the booleans for the
layout process are of relevance.
@@ -524,8 +523,8 @@ bool SwAnchoredObject::ConsiderObjWrapInfluenceOnObjPos() const
const SwFrmFmt& rObjFmt = GetFrmFmt();
- // --> OD 2004-08-25 #i3317# - add condition <IsTmpConsiderWrapInfluence()>
- // --> OD 2005-09-29 #i55204#
+ // --> #i3317# - add condition <IsTmpConsiderWrapInfluence()>
+ // --> #i55204#
// - correction: wrapping style influence has been considered, if condition
// <IsTmpConsiderWrapInfluence()> is hold, regardless of its anchor type
// or its wrapping style.
@@ -541,7 +540,7 @@ bool SwAnchoredObject::ConsiderObjWrapInfluenceOnObjPos() const
(rAnchor.GetAnchorId() == FLY_AT_PARA)) &&
rObjFmt.GetSurround().GetSurround() != SURROUND_THROUGHT )
{
- // --> OD 2004-09-23 #i34520# - text also wraps around anchored
+ // --> #i34520# - text also wraps around anchored
// objects in the layer Hell - see the text formatting.
// Thus, it hasn't to be checked here.
bRet = true;
@@ -555,7 +554,7 @@ bool SwAnchoredObject::ConsiderObjWrapInfluenceOnObjPos() const
/** method to determine, if other anchored objects, also attached at
to the anchor frame, have to consider its wrap influence.
- // --> OD 2005-02-22 #i43255#
+ // --> #i43255#
@author OD
*/
@@ -583,7 +582,7 @@ bool SwAnchoredObject::ConsiderObjWrapInfluenceOfOtherObjs() const
}
// =============================================================================
-// --> OD 2004-06-29 #i28701# - accessors to booleans for layout process
+// --> #i28701# - accessors to booleans for layout process
// =============================================================================
bool SwAnchoredObject::ConsiderForTextWrap() const
{
@@ -619,7 +618,7 @@ void SwAnchoredObject::SetRestartLayoutProcess( const bool _bRestartLayoutProces
mbRestartLayoutProcess = _bRestartLayoutProcess;
}
-// --> OD 2004-10-22 #i35911#
+// --> #i35911#
bool SwAnchoredObject::ClearedEnvironment() const
{
if ( ConsiderObjWrapInfluenceOnObjPos() )
@@ -636,7 +635,7 @@ void SwAnchoredObject::SetClearedEnvironment( const bool _bClearedEnvironment )
/** method to determine, if due to anchored object size and wrapping
style, its layout environment is cleared.
- OD 2004-10-22 #i35911#
+ #i35911#
@author OD
*/
@@ -644,8 +643,8 @@ bool SwAnchoredObject::HasClearedEnvironment() const
{
bool bHasClearedEnvironment( false );
- // --> OD 2005-03-03 #i43913# - layout frame, vertical position is orient at, has to be set.
- ASSERT( GetVertPosOrientFrm(),
+ // --> #i43913# - layout frame, vertical position is orient at, has to be set.
+ OSL_ENSURE( GetVertPosOrientFrm(),
"<SwAnchoredObject::HasClearedEnvironment()> - layout frame missing, at which the vertical position is oriented at." );
if ( GetVertPosOrientFrm() &&
GetAnchorFrm()->IsTxtFrm() &&
@@ -680,8 +679,8 @@ bool SwAnchoredObject::HasClearedEnvironment() const
/** method to add spacing to object area
- OD 2004-06-30 #i28701#
- OD 2006-08-10 #i68520# - return constant reference and use cache
+ #i28701#
+ #i68520# - return constant reference and use cache
@author OD
*/
@@ -690,13 +689,13 @@ const SwRect& SwAnchoredObject::GetObjRectWithSpaces() const
if ( mbObjRectWithSpacesValid &&
maLastObjRect != GetObjRect() )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwAnchoredObject::GetObjRectWithSpaces> - cache for object rectangle inclusive spaces marked as valid, but it couldn't be. Missing invalidation of cache. Please inform OD." );
InvalidateObjRectWithSpaces();
}
if ( !mbObjRectWithSpacesValid )
{
- // --> OD 2006-10-05 #i70122# - correction:
+ // --> #i70122# - correction:
// use bounding rectangle of anchored objects.
// maObjRectWithSpaces = GetObjRect();
maObjRectWithSpaces = GetObjBoundRect();
@@ -718,7 +717,7 @@ const SwRect& SwAnchoredObject::GetObjRectWithSpaces() const
return maObjRectWithSpaces;
}
-// --> OD 2006-08-10 #i68520#
+// --> #i68520#
void SwAnchoredObject::SetObjTop( const SwTwips _nTop)
{
const bool bTopChanged( _SetObjTop( _nTop ) );
@@ -740,7 +739,7 @@ void SwAnchoredObject::SetObjLeft( const SwTwips _nLeft)
/** method to update anchored object in the <SwSortedObjs> lists
- OD 2004-07-01 #i28701#
+ #i28701#
If document compatibility option 'Consider wrapping style influence
on object positioning' is ON, additionally all anchored objects
at the anchor frame and all following anchored objects on the page
@@ -798,13 +797,13 @@ void SwAnchoredObject::UpdateObjInSortedList()
/** method to determine, if invalidation of position is allowed
- OD 2004-07-01 #i28701#
+ #i28701#
@author OD
*/
bool SwAnchoredObject::InvalidationOfPosAllowed() const
{
- // --> OD 2004-11-03 #114798# - Check, if page frame layout is in progress,
+ // --> Check, if page frame layout is in progress,
// isn't needed, because of anchored object, whose are moved forward.
return !PositionLocked();
// <--
@@ -813,8 +812,8 @@ bool SwAnchoredObject::InvalidationOfPosAllowed() const
/** method to determine the page frame, on which the 'anchor' of
the given anchored object is.
- OD 2004-07-02 #i28701#
- OD 2004-09-23 #i33751#, #i34060#
+ #i28701#
+ #i33751#, #i34060#
Adjust meaning of method and thus its name: If the anchored object
or its anchor isn't correctly inserted in the layout, no page frame
can be found. Thus, the return type changed to be a pointer and can
@@ -826,10 +825,10 @@ SwPageFrm* SwAnchoredObject::FindPageFrmOfAnchor()
{
SwPageFrm* pRetPageFrm = 0L;
- // --> OD 2005-03-08 #i44339# - check, if anchor frame exists.
+ // --> #i44339# - check, if anchor frame exists.
if ( mpAnchorFrm )
{
- // --> OD 2004-10-08 #i26945# - use new method <GetAnchorFrmContainingAnchPos()>
+ // --> #i26945# - use new method <GetAnchorFrmContainingAnchPos()>
pRetPageFrm = GetAnchorFrmContainingAnchPos()->FindPageFrm();
// <--
}
@@ -840,7 +839,7 @@ SwPageFrm* SwAnchoredObject::FindPageFrmOfAnchor()
/** get frame, which contains the anchor character, if the object
is anchored at-character or as-character.
- OD 2004-10-04 #i26945#
+ #i26945#
@author OD
@@ -852,7 +851,7 @@ SwTxtFrm* SwAnchoredObject::FindAnchorCharFrm()
{
SwTxtFrm* pAnchorCharFrm( 0L );
- // --> OD 2005-03-08 #i44339# - check, if anchor frame exists.
+ // --> #i44339# - check, if anchor frame exists.
if ( mpAnchorFrm )
{
const SwFmtAnchor& rAnch = GetFrmFmt().GetAnchor();
@@ -870,7 +869,7 @@ SwTxtFrm* SwAnchoredObject::FindAnchorCharFrm()
/** method to determine, if a format on the anchored object is possible
- OD 2004-07-23 #i28701#
+ #i28701#
A format is possible, if anchored object is in an invisible layer.
Note: method is virtual to refine the conditions for the sub-classes.
@@ -881,11 +880,11 @@ bool SwAnchoredObject::IsFormatPossible() const
return GetFrmFmt().GetDoc()->IsVisibleLayerId( GetDrawObj()->GetLayer() );
}
-// --> OD 2004-08-25 #i3317#
+// --> #i3317#
void SwAnchoredObject::SetTmpConsiderWrapInfluence( const bool _bTmpConsiderWrapInfluence )
{
mbTmpConsiderWrapInfluence = _bTmpConsiderWrapInfluence;
- // --> OD 2004-10-22 #i35911#
+ // --> #i35911#
if ( mbTmpConsiderWrapInfluence )
{
SwLayouter::InsertObjForTmpConsiderWrapInfluence( *(GetFrmFmt().GetDoc()),
@@ -900,7 +899,6 @@ bool SwAnchoredObject::IsTmpConsiderWrapInfluence() const
}
// <--
-// --> OD 2006-07-24 #b6449874#
void SwAnchoredObject::SetTmpConsiderWrapInfluenceOfOtherObjs( const bool bTmpConsiderWrapInfluence )
{
const SwSortedObjs* pObjs = GetAnchorFrm()->GetDrawObjs();
@@ -917,12 +915,11 @@ void SwAnchoredObject::SetTmpConsiderWrapInfluenceOfOtherObjs( const bool bTmpCo
}
}
}
-// <--
/** method to determine, if the anchored object is overlapping with a
previous column
- OD 2004-08-25 #i3317#
+ #i3317#
overlapping with a previous column means, that the object overlaps
with a column, which is a previous one of the column its anchor
frame is in.
@@ -956,7 +953,7 @@ bool SwAnchoredObject::OverlapsPrevColumn() const
/** method to determine position of anchored object relative to
anchor frame
- OD 2005-01-06 #i30669#
+ #i30669#
Usage: Needed layout information for WW8 export
@author OD
@@ -965,7 +962,7 @@ Point SwAnchoredObject::GetRelPosToAnchorFrm() const
{
Point aRelPos;
- ASSERT( GetAnchorFrm(),
+ OSL_ENSURE( GetAnchorFrm(),
"<SwAnchoredObject::GetRelPosToAnchorFrm()> - missing anchor frame." );
aRelPos = GetObjRect().Pos();
aRelPos -= GetAnchorFrm()->Frm().Pos();
@@ -976,9 +973,9 @@ Point SwAnchoredObject::GetRelPosToAnchorFrm() const
/** method to determine position of anchored object relative to
page frame
- OD 2005-01-06 #i30669#
+ #i30669#
Usage: Needed layout information for WW8 export
- OD 2005-01-27 #i33818# - add parameters <_bFollowTextFlow> and
+ #i33818# - add parameters <_bFollowTextFlow> and
<_obRelToTableCell>
If <_bFollowTextFlow> is set and object is anchored inside table,
the position relative to the table cell is determined. Output
@@ -992,13 +989,13 @@ Point SwAnchoredObject::GetRelPosToPageFrm( const bool _bFollowTextFlow,
Point aRelPos;
_obRelToTableCell = false;
- ASSERT( GetAnchorFrm(),
+ OSL_ENSURE( GetAnchorFrm(),
"<SwAnchoredObject::GetRelPosToPageFrm()> - missing anchor frame." );
- ASSERT( GetAnchorFrm()->FindPageFrm(),
+ OSL_ENSURE( GetAnchorFrm()->FindPageFrm(),
"<SwAnchoredObject::GetRelPosToPageFrm()> - missing page frame." );
aRelPos = GetObjRect().Pos();
- // --> OD 2005-01-27 #i33818# - search for cell frame, if object has to
+ // --> #i33818# - search for cell frame, if object has to
// follow the text flow.
const SwFrm* pFrm( 0L );
if ( _bFollowTextFlow && !GetAnchorFrm()->IsPageFrm() )
@@ -1030,7 +1027,7 @@ Point SwAnchoredObject::GetRelPosToPageFrm( const bool _bFollowTextFlow,
/** method to determine position of anchored object relative to
anchor character
- OD 2005-01-06 #i30669#
+ #i30669#
Usage: Needed layout information for WW8 export
@author OD
@@ -1048,7 +1045,7 @@ Point SwAnchoredObject::GetRelPosToChar() const
/** method to determine position of anchored object relative to
top of line
- OD 2005-01-06 #i30669#
+ #i30669#
Usage: Needed layout information for WW8 export
@author OD
@@ -1062,3 +1059,5 @@ Point SwAnchoredObject::GetRelPosToLine() const
return aRelPos;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index e56c34c4bff1..765137f8a26f 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -128,7 +129,7 @@ TYPEINIT2(SwFmtFooter, SfxPoolItem, SwClient );
TYPEINIT2(SwFmtPageDesc, SfxPoolItem, SwClient );
TYPEINIT1_AUTOFACTORY(SwFmtLineNumber, SfxPoolItem);
-/* -----------------19.05.98 09:26-------------------
+/* --------------------------------------------------
* Umwandlung fuer QueryValue
* --------------------------------------------------*/
sal_Int16 lcl_RelToINT(sal_Int16 eRelation)
@@ -245,7 +246,7 @@ void DelHFFormat( SwClient *pToRemove, SwFrmFmt *pFmt )
// abschalten! (Bug 31069)
::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
- ASSERT( pNode, "Ein grosses Problem." );
+ OSL_ENSURE( pNode, "Ein grosses Problem." );
pDoc->DeleteSection( pNode );
}
delete pFmt;
@@ -276,7 +277,7 @@ SwFmtFrmSize& SwFmtFrmSize::operator=( const SwFmtFrmSize& rCpy )
int SwFmtFrmSize::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return( eFrmHeightType == ((SwFmtFrmSize&)rAttr).eFrmHeightType &&
eFrmWidthType == ((SwFmtFrmSize&)rAttr).eFrmWidthType &&
aSize == ((SwFmtFrmSize&)rAttr).GetSize()&&
@@ -289,11 +290,7 @@ SfxPoolItem* SwFmtFrmSize::Clone( SfxItemPool* ) const
return new SwFmtFrmSize( *this );
}
-
-/* -----------------24.04.98 11:36-------------------
- *
- * --------------------------------------------------*/
-sal_Bool SwFmtFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFmtFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -348,24 +345,21 @@ sal_Bool SwFmtFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
rVal <<= (sal_Int16)GetWidthSizeType();
break;
}
- return sal_True;
+ return true;
}
-/* -----------------24.04.98 11:36-------------------
- *
- * --------------------------------------------------*/
-sal_Bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_FRMSIZE_SIZE:
{
awt::Size aVal;
if(!(rVal >>= aVal))
- bRet = sal_False;
+ bRet = false;
else
{
Size aTmp(aVal.Width, aVal.Height);
@@ -377,7 +371,7 @@ sal_Bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
if(aTmp.Height() && aTmp.Width())
aSize = aTmp;
else
- bRet = sal_False;
+ bRet = false;
}
}
break;
@@ -388,7 +382,7 @@ sal_Bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
if(nSet >= 0 && nSet <= 0xfe)
SetHeightPercent((sal_uInt8)nSet);
else
- bRet = sal_False;
+ bRet = false;
}
break;
case MID_FRMSIZE_REL_WIDTH:
@@ -398,7 +392,7 @@ sal_Bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
if(nSet >= 0 && nSet <= 0xfe)
SetWidthPercent((sal_uInt8)nSet);
else
- bRet = sal_False;
+ bRet = false;
}
break;
case MID_FRMSIZE_IS_SYNC_HEIGHT_TO_WIDTH:
@@ -446,7 +440,7 @@ sal_Bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
aSize.Height() = nHg;
}
else
- bRet = sal_False;
+ bRet = false;
}
break;
case MID_FRMSIZE_SIZE_TYPE:
@@ -457,7 +451,7 @@ sal_Bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
SetHeightSizeType((SwFrmSize)nType);
}
else
- bRet = sal_False;
+ bRet = false;
}
break;
case MID_FRMSIZE_IS_AUTO_HEIGHT:
@@ -474,11 +468,11 @@ sal_Bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
SetWidthSizeType((SwFrmSize)nType);
}
else
- bRet = sal_False;
+ bRet = false;
}
break;
default:
- bRet = sal_False;
+ bRet = false;
}
return bRet;
}
@@ -532,7 +526,7 @@ SwFmtHeader::SwFmtHeader( sal_Bool bOn )
int SwFmtHeader::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return ( pRegisteredIn == ((SwFmtHeader&)rAttr).GetRegisteredIn() &&
bActive == ((SwFmtHeader&)rAttr).IsActive() );
}
@@ -574,7 +568,7 @@ SwFmtFooter::SwFmtFooter( sal_Bool bOn )
int SwFmtFooter::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return ( pRegisteredIn == ((SwFmtFooter&)rAttr).GetRegisteredIn() &&
bActive == ((SwFmtFooter&)rAttr).IsActive() );
}
@@ -613,7 +607,7 @@ void SwFmtCntnt::SetNewCntntIdx( const SwNodeIndex *pIdx )
int SwFmtCntnt::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
if( (long)pStartNode ^ (long)((SwFmtCntnt&)rAttr).pStartNode )
return 0;
if( pStartNode )
@@ -651,7 +645,7 @@ SwFmtPageDesc::SwFmtPageDesc( const SwPageDesc *pDesc )
int SwFmtPageDesc::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return ( pDefinedIn == ((SwFmtPageDesc&)rAttr).pDefinedIn ) &&
( nNumOffset == ((SwFmtPageDesc&)rAttr).nNumOffset ) &&
( GetPageDesc() == ((SwFmtPageDesc&)rAttr).GetPageDesc() );
@@ -675,19 +669,19 @@ void SwFmtPageDesc::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
//mich also bei meinem Format aus.
//Dabei werden ich Deletet!!!
if( IS_TYPE( SwFmt, pDefinedIn ))
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
{
sal_Bool bDel = ((SwFmt*)pDefinedIn)->ResetFmtAttr( RES_PAGEDESC );
- ASSERT( bDel, ";-) FmtPageDesc nicht zerstoert." );
+ OSL_ENSURE( bDel, ";-) FmtPageDesc nicht zerstoert." );
}
#else
((SwFmt*)pDefinedIn)->ResetFmtAttr( RES_PAGEDESC );
#endif
else if( IS_TYPE( SwCntntNode, pDefinedIn ))
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
{
sal_Bool bDel = ((SwCntntNode*)pDefinedIn)->ResetAttr( RES_PAGEDESC );
- ASSERT( bDel, ";-) FmtPageDesc nicht zerstoert." );
+ OSL_ENSURE( bDel, ";-) FmtPageDesc nicht zerstoert." );
}
#else
((SwCntntNode*)pDefinedIn)->ResetAttr( RES_PAGEDESC );
@@ -699,11 +693,11 @@ void SwFmtPageDesc::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
}
-sal_Bool SwFmtPageDesc::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFmtPageDesc::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_PAGEDESC_PAGENUMOFFSET:
@@ -724,13 +718,13 @@ sal_Bool SwFmtPageDesc::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
}
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
-sal_Bool SwFmtPageDesc::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwFmtPageDesc::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -743,7 +737,7 @@ sal_Bool SwFmtPageDesc::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
if(rVal >>= nOffset)
SetNumOffset( nOffset );
else
- bRet = sal_False;
+ bRet = false;
}
break;
@@ -753,8 +747,8 @@ sal_Bool SwFmtPageDesc::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
* Der Pointer waere aber ueber den Namen nur vom Dokument zu erfragen.
*/
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
@@ -831,7 +825,7 @@ SwFmtCol::SwFmtCol()
int SwFmtCol::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
const SwFmtCol &rCmp = (const SwFmtCol&)rAttr;
if( !(nLineWidth == rCmp.nLineWidth &&
aLineColor == rCmp.aLineColor &&
@@ -929,7 +923,7 @@ void SwFmtCol::SetOrtho( sal_Bool bNew, sal_uInt16 nGutterWidth, sal_uInt16 nAct
sal_uInt16 SwFmtCol::CalcColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const
{
- ASSERT( nCol < aColumns.Count(), ":-( ColumnsArr ueberindiziert." );
+ OSL_ENSURE( nCol < aColumns.Count(), ":-( ColumnsArr ueberindiziert." );
if ( nWidth != nAct )
{
long nW = aColumns[nCol]->GetWishWidth();
@@ -943,7 +937,7 @@ sal_uInt16 SwFmtCol::CalcColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const
sal_uInt16 SwFmtCol::CalcPrtColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const
{
- ASSERT( nCol < aColumns.Count(), ":-( ColumnsArr ueberindiziert." );
+ OSL_ENSURE( nCol < aColumns.Count(), ":-( ColumnsArr ueberindiziert." );
sal_uInt16 nRet = CalcColWidth( nCol, nAct );
SwColumn *pCol = aColumns[nCol];
nRet = nRet - pCol->GetLeft();
@@ -1005,30 +999,30 @@ void SwFmtCol::Calc( sal_uInt16 nGutterWidth, sal_uInt16 nAct )
}
}
-sal_Bool SwFmtCol::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFmtCol::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
if(MID_COLUMN_SEPARATOR_LINE == nMemberId)
{
- DBG_ERROR("not implemented");
+ OSL_FAIL("not implemented");
}
else
{
uno::Reference< text::XTextColumns > xCols = new SwXTextColumns(*this);
rVal.setValue(&xCols, ::getCppuType((uno::Reference< text::XTextColumns>*)0));
}
- return sal_True;
+ return true;
}
-sal_Bool SwFmtCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwFmtCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if(MID_COLUMN_SEPARATOR_LINE == nMemberId)
{
- DBG_ERROR("not implemented");
+ OSL_FAIL("not implemented");
}
else
{
@@ -1055,7 +1049,7 @@ sal_Bool SwFmtCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
pCol->SetRight( static_cast<sal_uInt16>(MM100_TO_TWIP(pArray[i].RightMargin)) );
aColumns.Insert(pCol, i);
}
- bRet = sal_True;
+ bRet = true;
nWidth = nWidthSum;
bOrtho = sal_False;
@@ -1080,7 +1074,7 @@ sal_Bool SwFmtCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
case 0: eAdj = COLADJ_TOP; break; //VerticalAlignment_TOP
case 1: eAdj = COLADJ_CENTER;break; //VerticalAlignment_MIDDLE
case 2: eAdj = COLADJ_BOTTOM;break; //VerticalAlignment_BOTTOM
- default: ASSERT( !this, "unknown alignment" ); break;
+ default: OSL_ENSURE( !this, "unknown alignment" ); break;
}
}
}
@@ -1108,7 +1102,7 @@ SwFmtSurround::SwFmtSurround( const SwFmtSurround &rCpy ) :
int SwFmtSurround::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return ( GetValue() == ((SwFmtSurround&)rAttr).GetValue() &&
bAnchorOnly== ((SwFmtSurround&)rAttr).bAnchorOnly &&
bContour== ((SwFmtSurround&)rAttr).bContour &&
@@ -1126,11 +1120,11 @@ sal_uInt16 SwFmtSurround::GetValueCount() const
}
-sal_Bool SwFmtSurround::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFmtSurround::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_SURROUND_SURROUNDTYPE:
@@ -1155,17 +1149,17 @@ sal_Bool SwFmtSurround::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
}
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
-sal_Bool SwFmtSurround::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwFmtSurround::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_SURROUND_SURROUNDTYPE:
@@ -1190,8 +1184,8 @@ sal_Bool SwFmtSurround::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
SetOutside( *(sal_Bool*)rVal.getValue() );
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
@@ -1209,7 +1203,7 @@ SwFmtVertOrient::SwFmtVertOrient( SwTwips nY, sal_Int16 eVert,
int SwFmtVertOrient::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return ( nYPos == ((SwFmtVertOrient&)rAttr).nYPos &&
eOrient == ((SwFmtVertOrient&)rAttr).eOrient &&
eRelation == ((SwFmtVertOrient&)rAttr).eRelation );
@@ -1220,11 +1214,11 @@ SfxPoolItem* SwFmtVertOrient::Clone( SfxItemPool* ) const
return new SwFmtVertOrient( nYPos, eOrient, eRelation );
}
-sal_Bool SwFmtVertOrient::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFmtVertOrient::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_VERTORIENT_ORIENT:
@@ -1253,17 +1247,17 @@ sal_Bool SwFmtVertOrient::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) cons
rVal <<= (sal_Int32)TWIP_TO_MM100(GetPos());
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
-sal_Bool SwFmtVertOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwFmtVertOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_VERTORIENT_ORIENT:
@@ -1300,8 +1294,8 @@ sal_Bool SwFmtVertOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
}
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
@@ -1322,7 +1316,7 @@ SwFmtHoriOrient::SwFmtHoriOrient( SwTwips nX, sal_Int16 eHori,
int SwFmtHoriOrient::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return ( nXPos == ((SwFmtHoriOrient&)rAttr).nXPos &&
eOrient == ((SwFmtHoriOrient&)rAttr).eOrient &&
eRelation == ((SwFmtHoriOrient&)rAttr).eRelation &&
@@ -1334,11 +1328,11 @@ SfxPoolItem* SwFmtHoriOrient::Clone( SfxItemPool* ) const
return new SwFmtHoriOrient( nXPos, eOrient, eRelation, bPosToggle );
}
-sal_Bool SwFmtHoriOrient::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFmtHoriOrient::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_HORIORIENT_ORIENT:
@@ -1375,17 +1369,17 @@ sal_Bool SwFmtHoriOrient::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) cons
}
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
-sal_Bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_HORIORIENT_ORIENT:
@@ -1416,7 +1410,7 @@ sal_Bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Int32 nVal = 0;
if(!(rVal >>= nVal))
- bRet = sal_False;
+ bRet = false;
if(bConvert)
nVal = MM100_TO_TWIP(nVal);
SetPos( nVal );
@@ -1426,8 +1420,8 @@ sal_Bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
SetPosToggle( *(sal_Bool*)rVal.getValue());
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
@@ -1490,7 +1484,7 @@ SwFmtAnchor& SwFmtAnchor::operator=(const SwFmtAnchor& rAnchor)
int SwFmtAnchor::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
// OD 2004-05-05 #i28701# - Note: <mnOrder> hasn't to be considered.
return ( nAnchorId == ((SwFmtAnchor&)rAttr).GetAnchorId() &&
nPageNum == ((SwFmtAnchor&)rAttr).GetPageNum() &&
@@ -1516,14 +1510,11 @@ sal_uInt32 SwFmtAnchor::GetOrder() const
return mnOrder;
}
-/*-----------------16.02.98 15:21-------------------
-
---------------------------------------------------*/
-sal_Bool SwFmtAnchor::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFmtAnchor::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_ANCHOR_ANCHORTYPE:
@@ -1567,17 +1558,17 @@ sal_Bool SwFmtAnchor::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
}
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
-sal_Bool SwFmtAnchor::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwFmtAnchor::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_ANCHOR_ANCHORTYPE:
@@ -1631,14 +1622,14 @@ sal_Bool SwFmtAnchor::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
}
}
else
- bRet = sal_False;
+ bRet = false;
}
break;
case MID_ANCHOR_ANCHORFRAME:
//no break here!;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
@@ -1671,7 +1662,7 @@ SwFmtURL::~SwFmtURL()
int SwFmtURL::operator==( const SfxPoolItem &rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
const SwFmtURL &rCmp = (SwFmtURL&)rAttr;
sal_Bool bRet = bIsServerMap == rCmp.IsServerMap() &&
sURL == rCmp.GetURL() &&
@@ -1706,11 +1697,11 @@ void SwFmtURL::SetMap( const ImageMap *pM )
}
extern const SvEventDescription* lcl_GetSupportedMacroItems();
-sal_Bool SwFmtURL::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFmtURL::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_URL_URL:
@@ -1751,17 +1742,17 @@ sal_Bool SwFmtURL::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
}
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
-sal_Bool SwFmtURL::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwFmtURL::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_URL_URL:
@@ -1797,15 +1788,15 @@ sal_Bool SwFmtURL::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
bRet = SvUnoImageMap_fillImageMap( xCont, *pMap );
}
else
- bRet = sal_False;
+ bRet = false;
}
break;
case MID_URL_SERVERMAP:
bIsServerMap = *(sal_Bool*)rVal.getValue();
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
@@ -1868,7 +1859,7 @@ int SwFmtFtnEndAtTxtEnd::operator==( const SfxPoolItem& rItem ) const
sSuffix == rAttr.sSuffix;
}
-sal_Bool SwFmtFtnEndAtTxtEnd::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFmtFtnEndAtTxtEnd::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -1897,12 +1888,12 @@ sal_Bool SwFmtFtnEndAtTxtEnd::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId )
case MID_SUFFIX : rVal <<= OUString(sSuffix); break;
default: return sal_False;
}
- return sal_True;
+ return true;
}
-sal_Bool SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
{
@@ -1931,7 +1922,7 @@ sal_Bool SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, sal_uInt8 nMemberI
if(nVal >= 0)
nOffset = nVal;
else
- bRet = sal_False;
+ bRet = false;
}
break;
case MID_OWN_NUM :
@@ -1953,7 +1944,7 @@ sal_Bool SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, sal_uInt8 nMemberI
SVX_NUM_CHARS_LOWER_LETTER_N == nVal ))
aFmt.SetNumberingType(nVal);
else
- bRet = sal_False;
+ bRet = false;
}
break;
case MID_PREFIX :
@@ -1968,7 +1959,7 @@ sal_Bool SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, sal_uInt8 nMemberI
sSuffix = sVal;
}
break;
- default: bRet = sal_False;
+ default: bRet = false;
}
return bRet;
}
@@ -1997,7 +1988,7 @@ SfxPoolItem* SwFmtEndAtTxtEnd::Clone( SfxItemPool* ) const
int SwFmtChain::operator==( const SfxPoolItem &rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return GetPrev() == ((SwFmtChain&)rAttr).GetPrev() &&
GetNext() == ((SwFmtChain&)rAttr).GetNext();
@@ -2034,11 +2025,11 @@ void SwFmtChain::SetNext( SwFlyFrmFmt *pFmt )
((SwModify*)aNext.GetRegisteredIn())->Remove( &aNext );
}
-sal_Bool SwFmtChain::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFmtChain::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
XubString aRet;
switch ( nMemberId )
{
@@ -2051,8 +2042,8 @@ sal_Bool SwFmtChain::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
aRet = GetNext()->GetName();
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
rVal <<= OUString(aRet);
return bRet;
@@ -2076,7 +2067,7 @@ SwFmtLineNumber::~SwFmtLineNumber()
int SwFmtLineNumber::operator==( const SfxPoolItem &rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return nStartValue == ((SwFmtLineNumber&)rAttr).GetStartValue() &&
bCountLines == ((SwFmtLineNumber&)rAttr).IsCount();
@@ -2087,11 +2078,11 @@ SfxPoolItem* SwFmtLineNumber::Clone( SfxItemPool* ) const
return new SwFmtLineNumber( *this );
}
-sal_Bool SwFmtLineNumber::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFmtLineNumber::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_LINENUMBER_COUNT:
@@ -2104,17 +2095,17 @@ sal_Bool SwFmtLineNumber::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) cons
rVal <<= (sal_Int32)GetStartValue();
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
-sal_Bool SwFmtLineNumber::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwFmtLineNumber::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch ( nMemberId )
{
case MID_LINENUMBER_COUNT:
@@ -2126,12 +2117,12 @@ sal_Bool SwFmtLineNumber::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
if(rVal >>= nVal)
SetStartValue( nVal );
else
- bRet = sal_False;
+ bRet = false;
}
break;
default:
- ASSERT( !this, "unknown MemberId" );
- bRet = sal_False;
+ OSL_ENSURE( !this, "unknown MemberId" );
+ bRet = false;
}
return bRet;
}
@@ -2154,7 +2145,7 @@ SwTextGridItem::~SwTextGridItem()
int SwTextGridItem::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return eGridType == ((SwTextGridItem&)rAttr).GetGridType() &&
nLines == ((SwTextGridItem&)rAttr).GetLines() &&
nBaseHeight == ((SwTextGridItem&)rAttr).GetBaseHeight() &&
@@ -2190,9 +2181,9 @@ SwTextGridItem& SwTextGridItem::operator=( const SwTextGridItem& rCpy )
return *this;
}
-sal_Bool SwTextGridItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwTextGridItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch( nMemberId & ~CONVERT_TWIPS )
{
@@ -2239,8 +2230,8 @@ sal_Bool SwTextGridItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
rVal <<= text::TextGridMode::LINES_AND_CHARS;
break;
default:
- DBG_ERROR("unknown SwTextGrid value");
- bRet = sal_False;
+ OSL_FAIL("unknown SwTextGrid value");
+ bRet = false;
break;
}
break;
@@ -2254,17 +2245,17 @@ sal_Bool SwTextGridItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
}
break;
default:
- DBG_ERROR("Unknown SwTextGridItem member");
- bRet = sal_False;
+ OSL_FAIL("Unknown SwTextGridItem member");
+ bRet = false;
break;
}
return bRet;
}
-sal_Bool SwTextGridItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwTextGridItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch( nMemberId & ~CONVERT_TWIPS )
{
case MID_GRID_COLOR:
@@ -2282,7 +2273,7 @@ sal_Bool SwTextGridItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
if( bRet && (nTmp >= 0) )
SetLines( (sal_uInt16)nTmp );
else
- bRet = sal_False;
+ bRet = false;
}
break;
case MID_GRID_RUBY_BELOW:
@@ -2311,7 +2302,7 @@ sal_Bool SwTextGridItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
else
SetRubyHeight( (sal_uInt16)nTmp );
else
- bRet = sal_False;
+ bRet = false;
}
break;
case MID_GRID_TYPE:
@@ -2332,7 +2323,7 @@ sal_Bool SwTextGridItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
SetGridType( GRID_LINES_CHARS );
break;
default:
- bRet = sal_False;
+ bRet = false;
break;
}
}
@@ -2348,8 +2339,8 @@ sal_Bool SwTextGridItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
break;
}
default:
- DBG_ERROR("Unknown SwTextGridItem member");
- bRet = sal_False;
+ OSL_FAIL("Unknown SwTextGridItem member");
+ bRet = false;
}
return bRet;
@@ -2498,7 +2489,7 @@ void SwFrmFmt::DelFrms()
void SwFrmFmt::MakeFrms()
{
- ASSERT( !this, "Sorry not implemented." );
+ OSL_ENSURE( !this, "Sorry not implemented." );
}
@@ -2629,7 +2620,7 @@ sal_Bool SwFrmFmt::IsLowerOf( const SwFrmFmt& rFmt ) const
}
if( n >= rFmts.Count() )
{
- ASSERT( !this, "Fly-Section aber kein Format gefunden" );
+ OSL_ENSURE( !this, "Fly-Section aber kein Format gefunden" );
return sal_False;
}
}
@@ -2865,7 +2856,7 @@ void SwFlyFrmFmt::MakeFrms()
pFly = new SwFlyInCntFrm( this, pFrm );
break;
default:
- ASSERT( !this, "Neuer Ankertyp" )
+ OSL_ENSURE( !this, "Neuer Ankertyp" );
break;
}
pFrm->AppendFly( pFly );
@@ -2918,7 +2909,7 @@ sal_Bool SwFlyFrmFmt::GetInfo( SfxPoolItem& rInfo ) const
void SwFlyFrmFmt::SetObjTitle( const String& rTitle, bool bBroadcast )
{
SdrObject* pMasterObject = FindSdrObject();
- ASSERT( pMasterObject,
+ OSL_ENSURE( pMasterObject,
"<SwNoTxtNode::SetObjTitle(..)> - missing <SdrObject> instance" );
if ( !pMasterObject )
{
@@ -2941,7 +2932,7 @@ void SwFlyFrmFmt::SetObjTitle( const String& rTitle, bool bBroadcast )
const String SwFlyFrmFmt::GetObjTitle() const
{
const SdrObject* pMasterObject = FindSdrObject();
- ASSERT( pMasterObject,
+ OSL_ENSURE( pMasterObject,
"<SwFlyFrmFmt::GetObjTitle(..)> - missing <SdrObject> instance" );
if ( !pMasterObject )
{
@@ -2954,7 +2945,7 @@ const String SwFlyFrmFmt::GetObjTitle() const
void SwFlyFrmFmt::SetObjDescription( const String& rDescription, bool bBroadcast )
{
SdrObject* pMasterObject = FindSdrObject();
- ASSERT( pMasterObject,
+ OSL_ENSURE( pMasterObject,
"<SwFlyFrmFmt::SetDescription(..)> - missing <SdrObject> instance" );
if ( !pMasterObject )
{
@@ -2977,7 +2968,7 @@ void SwFlyFrmFmt::SetObjDescription( const String& rDescription, bool bBroadcast
const String SwFlyFrmFmt::GetObjDescription() const
{
const SdrObject* pMasterObject = FindSdrObject();
- ASSERT( pMasterObject,
+ OSL_ENSURE( pMasterObject,
"<SwNoTxtNode::GetDescription(..)> - missing <SdrObject> instance" );
if ( !pMasterObject )
{
@@ -3172,7 +3163,7 @@ void SwDrawFrmFmt::SetPositionLayoutDir( const sal_Int16 _nPositionLayoutDir )
break;
default:
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDrawFrmFmt::SetPositionLayoutDir(..)> - invalid attribute value." );
}
}
@@ -3267,3 +3258,4 @@ IMapObject* SwFrmFmt::GetIMapObject( const Point& rPoint,
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 08c9f9d11e36..4b7c711d50de 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,6 +64,8 @@
#include <flyfrms.hxx>
// <--
+#include <ndtxt.hxx>
+
//------------------------------------------------------------------------
// Move-Methoden
//------------------------------------------------------------------------
@@ -72,8 +75,6 @@
|* SwCntntFrm::ShouldBwdMoved()
|*
|* Beschreibung Returnwert sagt, ob der Frm verschoben werden sollte.
-|* Ersterstellung MA 05. Dec. 96
-|* Letzte Aenderung MA 05. Dec. 96
|*
|*************************************************************************/
@@ -119,7 +120,7 @@ sal_Bool SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool
SwSectionFrm *pSect = pNewUpper->FindSctFrm();
while( pSect && pSect->IsInFtn() )
pSect = pSect->GetUpper()->FindSctFrm();
- ASSERT( pSect, "Escaping footnote" );
+ OSL_ENSURE( pSect, "Escaping footnote" );
if( pSect != pMySect )
return sal_False;
}
@@ -256,8 +257,6 @@ sal_Bool SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool
|* Ein weiterer Vorteil ist, das eines schoenen Tages das _Prepare und
|* damit die Formatierung von Vorgaengern umgangen werden kann.
|* So kann evtl. mal 'schnell' an's Dokumentende gesprungen werden.
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 13. Dec. 93
|*
|*************************************************************************/
//Zwei kleine Freundschaften werden hier zu einem Geheimbund.
@@ -290,7 +289,7 @@ void SwFrm::PrepareMake()
{
if ( lcl_IsCalcUpperAllowed( *this ) )
GetUpper()->Calc();
- ASSERT( GetUpper(), ":-( Layoutgeruest wackelig (Upper wech)." );
+ OSL_ENSURE( GetUpper(), ":-( Layoutgeruest wackelig (Upper wech)." );
if ( !GetUpper() )
return;
@@ -335,7 +334,7 @@ void SwFrm::PrepareMake()
SwFrm *pFrm = GetUpper()->Lower();
while ( pFrm != this )
{
- ASSERT( pFrm, ":-( Layoutgeruest wackelig (this not found)." );
+ OSL_ENSURE( pFrm, ":-( Layoutgeruest wackelig (this not found)." );
if ( !pFrm )
return; //Oioioioi ...
@@ -375,14 +374,14 @@ void SwFrm::PrepareMake()
pFrm = pCnt;
}
}
- ASSERT( GetUpper(), "Layoutgeruest wackelig (Upper wech II)." );
+ OSL_ENSURE( GetUpper(), "Layoutgeruest wackelig (Upper wech II)." );
if ( !GetUpper() )
return;
if ( lcl_IsCalcUpperAllowed( *this ) )
GetUpper()->Calc();
- ASSERT( GetUpper(), "Layoutgeruest wackelig (Upper wech III)." );
+ OSL_ENSURE( GetUpper(), "Layoutgeruest wackelig (Upper wech III)." );
}
if ( bTab && !bOldTabLock )
@@ -399,7 +398,7 @@ void SwFrm::OptPrepareMake()
// <--
{
GetUpper()->Calc();
- ASSERT( GetUpper(), ":-( Layoutgeruest wackelig (Upper wech)." );
+ OSL_ENSURE( GetUpper(), ":-( Layoutgeruest wackelig (Upper wech)." );
if ( !GetUpper() )
return;
}
@@ -422,7 +421,7 @@ void SwFrm::PrepareCrsr()
GetUpper()->PrepareCrsr();
GetUpper()->Calc();
- ASSERT( GetUpper(), ":-( Layoutgeruest wackelig (Upper wech)." );
+ OSL_ENSURE( GetUpper(), ":-( Layoutgeruest wackelig (Upper wech)." );
if ( !GetUpper() )
return;
@@ -449,7 +448,7 @@ void SwFrm::PrepareCrsr()
SwFrm *pFrm = GetUpper()->Lower();
while ( pFrm != this )
{
- ASSERT( pFrm, ":-( Layoutgeruest wackelig (this not found)." );
+ OSL_ENSURE( pFrm, ":-( Layoutgeruest wackelig (this not found)." );
if ( !pFrm )
return; //Oioioioi ...
@@ -479,13 +478,13 @@ void SwFrm::PrepareCrsr()
pFrm = pCnt;
}
}
- ASSERT( GetUpper(), "Layoutgeruest wackelig (Upper wech II)." );
+ OSL_ENSURE( GetUpper(), "Layoutgeruest wackelig (Upper wech II)." );
if ( !GetUpper() )
return;
GetUpper()->Calc();
- ASSERT( GetUpper(), "Layoutgeruest wackelig (Upper wech III)." );
+ OSL_ENSURE( GetUpper(), "Layoutgeruest wackelig (Upper wech III)." );
if ( bTab && !bOldTabLock )
::PrepareUnlock( (SwTabFrm*)this );
@@ -497,9 +496,6 @@ void SwFrm::PrepareCrsr()
|*
|* SwFrm::MakePos()
|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 24. May. 93
-|*
|*************************************************************************/
// Hier wird GetPrev() zurueckgegeben, allerdings werden
@@ -669,9 +665,6 @@ void SwFrm::MakePos()
|*
|* SwPageFrm::MakeAll()
|*
-|* Ersterstellung MA 23. Feb. 93
-|* Letzte Aenderung MA 20. Jul. 98
-|*
|*************************************************************************/
// --> OD 2004-07-01 #i28701# - new type <SwSortedObjs>
void lcl_CheckObjects( SwSortedObjs* pSortedObjs, SwFrm* pFrm, long& rBot )
@@ -800,7 +793,7 @@ void SwPageFrm::MakeAll()
else
{
// OD 30.10.2002 #97265# - assert invalid lower property
- ASSERT( !(pFrm->Frm().Height() < pFrm->Prt().Height()),
+ OSL_ENSURE( !(pFrm->Frm().Height() < pFrm->Prt().Height()),
"SwPageFrm::MakeAll(): Lower with frame height < printing height" );
nTmp += pFrm->Frm().Height() - pFrm->Prt().Height();
}
@@ -854,12 +847,12 @@ void SwPageFrm::MakeAll()
if ( Frm() != aOldRect && GetUpper() )
static_cast<SwRootFrm*>(GetUpper())->CheckViewLayout( 0, 0 );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
//Der Upper (Root) muss mindestens so breit
//sein, dass er die breiteste Seite aufnehmen kann.
if ( GetUpper() )
{
- ASSERT( GetUpper()->Prt().Width() >= aFrm.Width(), "Rootsize" );
+ OSL_ENSURE( GetUpper()->Prt().Width() >= aFrm.Width(), "Rootsize" );
}
#endif
}
@@ -868,9 +861,6 @@ void SwPageFrm::MakeAll()
|*
|* SwLayoutFrm::MakeAll()
|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 28. Nov. 95
-|*
|*************************************************************************/
@@ -957,10 +947,43 @@ void SwLayoutFrm::MakeAll()
|*
|* SwCntntFrm::MakePrtArea()
|*
-|* Ersterstellung MA 17. Nov. 92
-|* Letzte Aenderung MA 03. Mar. 96
-|*
|*************************************************************************/
+bool SwTxtNode::IsCollapse() const
+{
+ if ( GetDoc()->get( IDocumentSettingAccess::COLLAPSE_EMPTY_CELL_PARA ) && GetTxt().Len()==0 ) {
+ sal_uLong nIdx=GetIndex();
+ const SwEndNode *pNdBefore=GetNodes()[nIdx-1]->GetEndNode();
+ const SwEndNode *pNdAfter=GetNodes()[nIdx+1]->GetEndNode();
+
+ // The paragraph is collapsed only if the NdAfter is the end of a cell
+ bool bInTable = this->FindTableNode( ) != NULL;
+
+ SwSortedObjs* pObjs = this->GetFrm()->GetDrawObjs( );
+ sal_uInt32 nObjs = ( pObjs != NULL ) ? pObjs->Count( ) : 0;
+
+ if ( pNdBefore!=NULL && pNdAfter!=NULL && nObjs == 0 && bInTable ) {
+ return true;
+ } else {
+ return false;
+ }
+ } else
+ return false;
+}
+
+bool SwFrm::IsCollapse() const
+{
+ if (IsTxtFrm()) {
+ const SwTxtFrm *pTxtFrm=(SwTxtFrm*)this;
+ const SwTxtNode *pTxtNode=pTxtFrm->GetTxtNode();
+ if (pTxtNode && pTxtNode->IsCollapse()) {
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ return false;
+ }
+}
sal_Bool SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
{
@@ -1062,8 +1085,11 @@ sal_Bool SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
nUpper = CalcUpperSpace( &rAttrs, NULL );
- // OD 2004-03-02 #106629# - use new method <CalcLowerSpace(..)>
SwTwips nLower = CalcLowerSpace( &rAttrs );
+ if (IsCollapse()) {
+ nUpper=0;
+ nLower=0;
+ }
// // in balanced columned section frames we do not want the
// // common border
// sal_Bool bCommonBorder = sal_True;
@@ -1099,9 +1125,6 @@ sal_Bool SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
|*
|* SwCntntFrm::MakeAll()
|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 16. Dec. 96
-|*
|*************************************************************************/
#define STOP_FLY_FORMAT 10
@@ -1120,8 +1143,8 @@ inline void ValidateSz( SwFrm *pFrm )
void SwCntntFrm::MakeAll()
{
- ASSERT( GetUpper(), "keinen Upper?" );
- ASSERT( IsTxtFrm(), "MakeAll(), NoTxt" );
+ OSL_ENSURE( GetUpper(), "keinen Upper?" );
+ OSL_ENSURE( IsTxtFrm(), "MakeAll(), NoTxt" );
if ( !IsFollow() && StackHack::IsLocked() )
return;
@@ -1129,13 +1152,13 @@ void SwCntntFrm::MakeAll()
if ( IsJoinLocked() )
return;
- ASSERT( !((SwTxtFrm*)this)->IsSwapped(), "Calculation of a swapped frame" );
+ OSL_ENSURE( !((SwTxtFrm*)this)->IsSwapped(), "Calculation of a swapped frame" );
StackHack aHack;
if ( ((SwTxtFrm*)this)->IsLocked() )
{
- ASSERT( sal_False, "Format fuer gelockten TxtFrm." );
+ OSL_ENSURE( sal_False, "Format fuer gelockten TxtFrm." );
return;
}
@@ -1146,14 +1169,14 @@ void SwCntntFrm::MakeAll()
// <--
PROTOCOL_ENTER( this, PROT_MAKEALL, 0, 0 )
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
const SwDoc *pDoc = GetAttrSet()->GetDoc();
if( pDoc )
{
static sal_Bool bWarn = sal_False;
if( pDoc->InXMLExport() )
{
- ASSERT( bWarn, "Formatting during XML-export!" );
+ OSL_ENSURE( bWarn, "Formatting during XML-export!" );
bWarn = sal_True;
}
else
@@ -1313,7 +1336,7 @@ void SwCntntFrm::MakeAll()
//nach dem hin und her fliessen sparen.
GetUpper()->ResetCompletePaint();
//Der Vorgaenger wurde Invalidiert, das ist jetzt auch obsolete.
- ASSERT( pPre, "missing old Prev" );
+ OSL_ENSURE( pPre, "missing old Prev" );
if( !pPre->IsSctFrm() )
::ValidateSz( pPre );
}
@@ -1433,33 +1456,12 @@ void SwCntntFrm::MakeAll()
#if OSL_DEBUG_LEVEL > 1
else
{
- ASSERT( false, "debug assertion: <SwCntntFrm::MakeAll()> - format of text frame suppressed by fix b6448963" );
+ OSL_ENSURE( false, "debug assertion: <SwCntntFrm::MakeAll()> - format of text frame suppressed by fix b6448963" );
}
#endif
// <--
}
- // FME 16.07.2003 #i16930# - removed this code because it did not work
-
- // OD 04.04.2003 #108446# - react on the situation detected in the text
- // formatting - see <SwTxtFrm::FormatAdjust(..)>:
- // text frame has to move forward, because its text formatting stopped,
- // created a follow and detected, that it contains no content.
-/* if ( IsTxtFrm() && bValidPos && bValidSize && bValidPrtArea &&
- (Frm().*fnRect->fnGetHeight)() == 0 &&
- HasFollow()
- )
- {
- SwFrm* pOldUpper = GetUpper();
- MoveFwd( sal_True, sal_False );
- if ( GetUpper() != pOldUpper )
- {
- bMovedFwd = sal_True;
- SWREFRESHFN( this )
- continue;
- }
- } */
-
//Wenn ich der erste einer Kette bin koennte ich mal sehen ob
//ich zurueckfliessen kann (wenn ich mich ueberhaupt bewegen soll).
//Damit es keine Oszillation gibt, darf ich nicht gerade vorwaerts
@@ -1702,10 +1704,10 @@ void SwCntntFrm::MakeAll()
( !bSct || !FindSctFrm()->IsColLocked() ) )
bMoveOrFit = sal_True;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
{
- ASSERT( sal_False, "+TxtFrm hat WouldFit-Versprechen nicht eingehalten." );
+ OSL_ENSURE( sal_False, "+TxtFrm hat WouldFit-Versprechen nicht eingehalten." );
}
#endif
}
@@ -1758,7 +1760,7 @@ void SwCntntFrm::MakeAll()
}
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false, "LoopControl in SwCntntFrm::MakeAll" )
+ OSL_ENSURE( false, "LoopControl in SwCntntFrm::MakeAll" );
#endif
}
if ( bMovedBwd && GetUpper() )
@@ -1809,9 +1811,6 @@ void SwCntntFrm::MakeAll()
|*
|* SwCntntFrm::_WouldFit()
|*
-|* Ersterstellung MA 28. Feb. 95
-|* Letzte Aenderung AMA 15. Feb. 99
-|*
|*************************************************************************/
@@ -1870,7 +1869,7 @@ void MakeNxt( SwFrm *pFrm, SwFrm *pNxt )
sal_Bool lcl_IsNextFtnBoss( const SwFrm *pFrm, const SwFrm* pNxt )
{
- ASSERT( pFrm && pNxt, "lcl_IsNextFtnBoss: No Frames?" );
+ OSL_ENSURE( pFrm && pNxt, "lcl_IsNextFtnBoss: No Frames?" );
pFrm = pFrm->FindFtnBossFrm();
pNxt = pNxt->FindFtnBossFrm();
// Falls pFrm eine letzte Spalte ist, wird stattdessen die Seite genommen
@@ -2065,7 +2064,7 @@ sal_Bool SwCntntFrm::_WouldFit( SwTwips nSpace,
// doesn't makes sense. Thus, return sal_True.
if ( IsAnFollow( pFrm ) && !pFrm->IsValid() )
{
- ASSERT( false, "Only a warning for task 108824:/n<SwCntntFrm::_WouldFit(..) - follow not valid!" );
+ OSL_ENSURE( false, "Only a warning for task 108824:/n<SwCntntFrm::_WouldFit(..) - follow not valid!" );
return sal_True;
}
}
@@ -2112,3 +2111,5 @@ sal_Bool SwCntntFrm::_WouldFit( SwTwips nSpace,
return bRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index df076ca751de..d4085359819f 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,9 +55,6 @@ void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes
|*
|* SwColumnFrm::SwColumnFrm()
|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung AMA 30. Oct 98
-|*
|*************************************************************************/
SwColumnFrm::SwColumnFrm( SwFrmFmt *pFmt ):
SwFtnBossFrm( pFmt )
@@ -84,21 +82,18 @@ SwColumnFrm::~SwColumnFrm()
|*
|* SwLayoutFrm::ChgColumns()
|*
-|* Ersterstellung MA 11. Feb. 93
-|* Letzte Aenderung MA 12. Oct. 98
-|*
|*************************************************************************/
void MA_FASTCALL lcl_RemoveColumns( SwLayoutFrm *pCont, sal_uInt16 nCnt )
{
- ASSERT( pCont && pCont->Lower() && pCont->Lower()->IsColumnFrm(),
+ OSL_ENSURE( pCont && pCont->Lower() && pCont->Lower()->IsColumnFrm(),
"Keine Spalten zu entfernen." );
SwColumnFrm *pColumn = (SwColumnFrm*)pCont->Lower();
::lcl_RemoveFtns( pColumn, sal_True, sal_True );
while ( pColumn->GetNext() )
{
- ASSERT( pColumn->GetNext()->IsColumnFrm(),
+ OSL_ENSURE( pColumn->GetNext()->IsColumnFrm(),
"Nachbar von ColFrm kein ColFrm." );
pColumn = (SwColumnFrm*)pColumn->GetNext();
}
@@ -197,7 +192,7 @@ static sal_Bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount )
return bRet;
}
-/*-----------------21.09.99 15:42-------------------
+/*--------------------------------------------------
* ChgColumns() adds or removes columns from a layoutframe.
* Normally, a layoutframe with a column attribut of 1 or 0 columns contains
* no columnframe. However, a sectionframe with "footnotes at the end" needs
@@ -244,7 +239,7 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
if( nOldNum != nNewNum || bChgFtn )
{
SwDoc *pDoc = GetFmt()->GetDoc();
- ASSERT( pDoc, "FrmFmt gibt kein Dokument her." );
+ OSL_ENSURE( pDoc, "FrmFmt gibt kein Dokument her." );
// SaveCntnt wuerde auch den Inhalt der Fussnotencontainer aufsaugen
// und im normalen Textfluss unterbringen.
if( IsPageBodyFrm() )
@@ -310,7 +305,7 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
//unnuetzte Aktionen beim Einstellen zur Folge haben.
if ( pSave )
{
- ASSERT( Lower() && Lower()->IsLayoutFrm() &&
+ OSL_ENSURE( Lower() && Lower()->IsLayoutFrm() &&
((SwLayoutFrm*)Lower())->Lower() &&
((SwLayoutFrm*)Lower())->Lower()->IsLayoutFrm(),
"Gesucht: Spaltenbody (Tod oder Lebend)." ); // ColumnFrms jetzt mit BodyFrm
@@ -322,9 +317,6 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
|*
|* SwLayoutFrm::AdjustColumns()
|*
-|* Ersterstellung MA 19. Jan. 99
-|* Letzte Aenderung MA 19. Jan. 99
-|*
|*************************************************************************/
void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttributes )
@@ -482,3 +474,4 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttribut
+/* 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 82bce24fc8ee..f84f2bc88e7b 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,6 @@
#ifdef DBG_UTIL
-/* -----------------08.01.99 14:55-------------------
* Und hier die Beschreibung:
*
* Durch die PROTOCOL-Makros wird es ermoeglicht, Ereignisse im Frame-Methoden zu protokollieren.
@@ -105,8 +105,8 @@
*
* --------------------------------------------------*/
-#ifndef DBG_UTIL
-#error Wer fummelt denn an den makefiles rum?
+#if !defined(OSL_DEBUG_LEVEL) || OSL_DEBUG_LEVEL <= 1
+#error Who broken the makefiles?
#endif
@@ -138,7 +138,7 @@ SwImplProtocol* SwProtocol::pImpl = NULL;
sal_uLong lcl_GetFrameId( const SwFrm* pFrm )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
static sal_Bool bFrameId = sal_False;
if( bFrameId )
return pFrm->GetFrmId();
@@ -152,7 +152,7 @@ class SwImplProtocol
{
SvFileStream *pStream; // Ausgabestream
SvUShortsSort *pFrmIds; // welche FrmIds sollen aufgezeichnet werden ( NULL == alle )
- SvLongs *pVar; // Variables
+ std::vector<long> aVars; // Variables
ByteString aLayer; // Einrueckung der Ausgabe (" " pro Start/End)
sal_uInt16 nTypes; // welche Typen sollen aufgezeichnet werden
sal_uInt16 nLineCount; // Ausgegebene Zeilen
@@ -176,10 +176,10 @@ public:
void ChkStream() { if( !pStream ) NewStream(); }
void SnapShot( const SwFrm* pFrm, sal_uLong nFlags );
void GetVar( const sal_uInt16 nNo, long& rVar )
- { if( pVar && nNo < pVar->Count() ) rVar = (*pVar)[ nNo ]; }
+ { if( nNo < aVars.size() ) rVar = aVars[ nNo ]; }
};
-/* -----------------11.01.99 10:43-------------------
+/* --------------------------------------------------
* Durch das PROTOCOL_ENTER-Makro wird ein SwEnterLeave-Objekt erzeugt,
* wenn die aktuelle Funktion aufgezeichnet werden soll, wird ein
* SwImplEnterLeave-Objekt angelegt. Der Witz dabei ist, das der Ctor
@@ -302,7 +302,7 @@ void SwProtocol::GetVar( const sal_uInt16 nNo, long& rVar )
}
SwImplProtocol::SwImplProtocol()
- : pStream( NULL ), pFrmIds( NULL ), pVar( NULL ), nTypes( 0xffff ),
+ : pStream( NULL ), pFrmIds( NULL ), nTypes( 0xffff ),
nLineCount( 0 ), nMaxLines( USHRT_MAX ), nTestMode( 0 )
{
NewStream();
@@ -329,10 +329,10 @@ SwImplProtocol::~SwImplProtocol()
delete pStream;
}
delete pFrmIds;
- delete pVar;
+ aVars.clear();
}
-/* -----------------11.01.99 11:03-------------------
+/* --------------------------------------------------
* SwImplProtocol::CheckLine analysiert eine Zeile der INI-Datei
* --------------------------------------------------*/
@@ -375,8 +375,6 @@ void SwImplProtocol::CheckLine( ByteString& rLine )
else if( "[var" == aTmp )// variables
{
nInitFile = 6;
- if( !pVar )
- pVar = new SvLongs( 5, 5 );
}
else
nInitFile = 0; // Nanu: Unbekannter Bereich?
@@ -427,14 +425,14 @@ void SwImplProtocol::CheckLine( ByteString& rLine )
break;
case 5: nMaxLines = (sal_uInt16)nVal;
break;
- case 6: pVar->Insert( (long)nVal, pVar->Count() );
+ case 6: aVars.push_back( (long)nVal );
break;
}
}
}
}
-/* -----------------11.01.99 11:17-------------------
+/* --------------------------------------------------
* SwImplProtocol::FileInit() liest die Datei "dbg_lay.ini"
* im aktuellen Verzeichnis und wertet sie aus.
* --------------------------------------------------*/
@@ -467,7 +465,7 @@ void SwImplProtocol::FileInit()
aStream.Close();
}
-/* -----------------11.01.99 11:20-------------------
+/* --------------------------------------------------
* lcl_Start sorgt fuer Einrueckung um zwei Blanks bei ACT_START
* und nimmt diese bei ACT_END wieder zurueck.
* --------------------------------------------------*/
@@ -489,7 +487,7 @@ void lcl_Start( ByteString& rOut, ByteString& rLay, sal_uLong nAction )
}
}
-/* -----------------11.01.99 11:21-------------------
+/* --------------------------------------------------
* lcl_Flags gibt das ValidSize-, ValidPos- und ValidPrtArea-Flag ("Sz","Ps","PA")
* des Frames aus, "+" fuer valid, "-" fuer invalid.
* --------------------------------------------------*/
@@ -504,7 +502,7 @@ void lcl_Flags( ByteString& rOut, const SwFrm* pFrm )
rOut += pFrm->GetValidPrtAreaFlag() ? '+' : '-';
}
-/* -----------------11.01.99 11:23-------------------
+/* --------------------------------------------------
* lcl_FrameType gibt den Typ des Frames in Klartext aus.
* --------------------------------------------------*/
@@ -553,7 +551,7 @@ void lcl_FrameType( ByteString& rOut, const SwFrm* pFrm )
rOut += "Not impl. ";
}
-/* -----------------11.01.99 11:25-------------------
+/* --------------------------------------------------
* SwImplProtocol::Record(..) wird nur gerufen, wenn das PROTOCOL-Makro
* feststellt, dass die Funktion aufgezeichnet werden soll ( SwProtocol::nRecord ).
* In dieser Methode werden noch die beiden weiteren Einschraenkungen ueberprueft,
@@ -702,7 +700,7 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong
SwProtocol::SetRecord( 0 ); // => Ende der Aufzeichnung
}
-/* -----------------13.01.99 11:39-------------------
+/* --------------------------------------------------
* SwImplProtocol::SectFunc(...) wird von SwImplProtocol::_Record(..) gerufen,
* hier werden die Ausgaben rund um SectionFrms abgehandelt.
* --------------------------------------------------*/
@@ -728,7 +726,7 @@ void SwImplProtocol::SectFunc( ByteString &rOut, const SwFrm* , sal_uLong nAct,
}
}
-/* -----------------11.01.99 11:31-------------------
+/* --------------------------------------------------
* SwImplProtocol::InsertFrm(..) nimmt eine neue FrmId zum Aufzeichnen auf,
* wenn pFrmIds==NULL, werden alle aufgezeichnet, sobald durch InsertFrm(..)
* pFrmIds angelegt wird, werden nur noch die enthaltenen FrmIds aufgezeichnet.
@@ -744,7 +742,7 @@ sal_Bool SwImplProtocol::InsertFrm( sal_uInt16 nId )
return sal_True;
}
-/* -----------------11.01.99 11:52-------------------
+/* --------------------------------------------------
* SwImplProtocol::DeleteFrm(..) entfernt eine FrmId aus dem pFrmIds-Array,
* so dass diese Frame nicht mehr aufgezeichnet wird.
* --------------------------------------------------*/
@@ -757,7 +755,7 @@ sal_Bool SwImplProtocol::DeleteFrm( sal_uInt16 nId )
return sal_True;
}
-/*-----------------20.9.2001 10:29------------------
+/*--------------------------------------------------
* SwProtocol::SnapShot(..)
* creates a snapshot of the given frame and its content.
* --------------------------------------------------*/
@@ -791,7 +789,7 @@ void SwImplProtocol::SnapShot( const SwFrm* pFrm, sal_uLong nFlags )
}
}
-/* -----------------11.01.99 11:53-------------------
+/* --------------------------------------------------
* SwEnterLeave::Ctor(..) wird vom eigentlichen (inline-)Kontruktor gerufen,
* wenn die Funktion aufgezeichnet werden soll.
* Die Aufgabe ist es abhaengig von der Funktion das richtige SwImplEnterLeave-Objekt
@@ -812,7 +810,7 @@ void SwEnterLeave::Ctor( const SwFrm* pFrm, sal_uLong nFunc, sal_uLong nAct, voi
pImpl->Enter();
}
-/* -----------------11.01.99 11:56-------------------
+/* --------------------------------------------------
* SwEnterLeave::Dtor() ruft lediglich den Destruktor des SwImplEnterLeave-Objekts,
* ist nur deshalb nicht inline, damit die SwImplEnterLeave-Definition nicht
* im dbg_lay.hxx zu stehen braucht.
@@ -867,3 +865,4 @@ void SwFrmChangesLeave::Leave()
#endif // DBG_UTIL
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index c6e8f4d823d8..62f361402055 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,8 +57,6 @@
|*
|* Beschreibung Sucht den ersten/letzten CntntFrm im BodyText unterhalb
|* der Seite.
-|* Ersterstellung MA 15. Feb. 93
-|* Letzte Aenderung MA 18. Apr. 94
|*
|*************************************************************************/
SwLayoutFrm *SwFtnBossFrm::FindBodyCont()
@@ -87,9 +86,6 @@ SwCntntFrm *SwPageFrm::FindLastBodyCntnt()
|* untergeordneten Struktur einen oder mehrere CntntFrm's enthaelt;
|* Falls ja wird der erste gefundene CntntFrm zurueckgegeben.
|*
-|* Ersterstellung MA 13. May. 92
-|* Letzte Aenderung MA 20. Apr. 94
-|*
|*************************************************************************/
const SwCntntFrm *SwLayoutFrm::ContainsCntnt() const
@@ -142,8 +138,6 @@ const SwCntntFrm *SwLayoutFrm::ContainsCntnt() const
|* hineinzukommen. Dort hangelt es sich wieder hoch zum
|* ersten SwCellFrm, seit es SectionFrms gibt, reicht kein
|* ContainsCntnt()->GetUpper() mehr...
-|* Ersterstellung AMA 17. Mar. 99
-|* Letzte Aenderung AMA 17. Mar. 99
|*
|*************************************************************************/
@@ -161,8 +155,6 @@ const SwCellFrm *SwLayoutFrm::FirstCell() const
|*
|* Beschreibung wie ContainsCntnt, nur dass nicht nur CntntFrms, sondern auch
|* Bereiche und Tabellen zurueckgegeben werden.
-|* Ersterstellung AMA 10. Mar. 99
-|* Letzte Aenderung AMA 10. Mar. 99
|*
|*************************************************************************/
@@ -216,9 +208,6 @@ const SwFrm *SwLayoutFrm::ContainsAny( const bool _bInvestigateFtnForSections )
|*
|* SwFrm::GetLower()
|*
-|* Ersterstellung MA 27. Jul. 92
-|* Letzte Aenderung MA 09. Oct. 97
-|*
|*************************************************************************/
const SwFrm* SwFrm::GetLower() const
{
@@ -234,9 +223,6 @@ SwFrm* SwFrm::GetLower()
|*
|* SwLayoutFrm::IsAnLower()
|*
-|* Ersterstellung MA 18. Mar. 93
-|* Letzte Aenderung MA 18. Mar. 93
-|*
|*************************************************************************/
sal_Bool SwLayoutFrm::IsAnLower( const SwFrm *pAssumed ) const
{
@@ -269,8 +255,8 @@ sal_Bool SwLayoutFrm::IsAnLower( const SwFrm *pAssumed ) const
*/
bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const
{
- ASSERT( !IsRootFrm() , "<IsBefore> called at a <SwRootFrm>.");
- ASSERT( !_pCheckRefLayFrm->IsRootFrm() , "<IsBefore> called with a <SwRootFrm>.");
+ OSL_ENSURE( !IsRootFrm() , "<IsBefore> called at a <SwRootFrm>.");
+ OSL_ENSURE( !_pCheckRefLayFrm->IsRootFrm() , "<IsBefore> called with a <SwRootFrm>.");
bool bReturn;
@@ -410,9 +396,6 @@ const SwLayoutFrm *SwFrm::ImplGetNextLayoutLeaf( bool bFwd ) const
|* Frms rueckwaerts gegangen wird.
|* Vorwaetzwander funktioniert analog.
|*
-|* Ersterstellung ??
-|* Letzte Aenderung MA 30. Oct. 97
-|*
|*************************************************************************/
// Achtung: Fixes in ImplGetNextCntntFrm() muessen moeglicherweise auch in
@@ -464,9 +447,6 @@ const SwCntntFrm* SwCntntFrm::ImplGetNextCntntFrm( bool bFwd ) const
|* SwFrm::FindRootFrm(), FindTabFrm(), FindFtnFrm(), FindFlyFrm(),
|* FindPageFrm(), FindColFrm()
|*
-|* Ersterstellung ??
-|* Letzte Aenderung MA 05. Sep. 93
-|*
|*************************************************************************/
SwRootFrm* SwFrm::FindRootFrm()
{
@@ -476,8 +456,8 @@ SwRootFrm* SwFrm::FindRootFrm()
// Casting the GetDep() result instead of the frame itself (that has
// been done before) makes it save to use that method in constructors
// and destructors.
- ASSERT( GetDep(), "frame is not registered any longer" );
- ASSERT( IsLayoutFrm() || IsCntntFrm(), "invalid frame type" );
+ OSL_ENSURE( GetDep(), "frame is not registered any longer" );
+ OSL_ENSURE( IsLayoutFrm() || IsCntntFrm(), "invalid frame type" );
SwDoc *pDoc = IsLayoutFrm()
? static_cast < SwFrmFmt * >( GetDep() )->GetDoc()
: static_cast < SwCntntNode * >( GetDep() )->GetDoc();
@@ -531,7 +511,7 @@ SwFtnBossFrm* SwFrm::FindFtnBossFrm( sal_Bool bFootnotes )
!pRet->GetNext() && !pRet->GetPrev() )
{
SwSectionFrm* pSct = pRet->FindSctFrm();
- ASSERT( pSct, "FindFtnBossFrm: Single column outside section?" );
+ OSL_ENSURE( pSct, "FindFtnBossFrm: Single column outside section?" );
if( !pSct->IsFtnAtEnd() )
return pSct->FindFtnBossFrm( sal_True );
}
@@ -596,6 +576,15 @@ SwFrm *SwFrm::FindColFrm()
return pFrm;
}
+SwRowFrm *SwFrm::FindRowFrm()
+{
+ SwFrm *pFrm = this;
+ do
+ { pFrm = pFrm->GetUpper();
+ } while ( pFrm && !pFrm->IsRowFrm() );
+ return dynamic_cast< SwRowFrm* >( pFrm );
+}
+
SwFrm* SwFrm::FindFooterOrHeader()
{
SwFrm* pRet = this;
@@ -643,7 +632,7 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b
pPage = pPage->GetNext();
}
- ASSERT( GetPageNum() <= maPageRects.size(), "number of pages differes from page rect array size" )
+ OSL_ENSURE( GetPageNum() <= maPageRects.size(), "number of pages differes from page rect array size" );
sal_uInt16 nPageIdx = 0;
while ( pPage && !pRet )
@@ -666,9 +655,6 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b
|*
|* SwFrmFrm::GetAttrSet()
|*
-|* Ersterstellung MA 02. Aug. 93
-|* Letzte Aenderung MA 02. Aug. 93
-|*
|*************************************************************************/
const SwAttrSet* SwFrm::GetAttrSet() const
{
@@ -696,8 +682,6 @@ const SwAttrSet* SwFrm::GetAttrSet() const
|* auf.
|* - Tabellen verhalten sich prinzipiell analog zu den Cntnts
|* - Bereiche ebenfalls
-|* Ersterstellung AK 14-Feb-1991
-|* Letzte Aenderung AMA 10. Mar. 99
|*
|*************************************************************************/
@@ -783,7 +767,7 @@ SwFrm *SwFrm::_FindNext()
SwLayoutFrm *pUp = pThis->GetUpper();
while ( !pUp->IsCellFrm() )
pUp = pUp->GetUpper();
- ASSERT( pUp, "Cntnt in Tabelle aber nicht in Zelle." );
+ OSL_ENSURE( pUp, "Cntnt in Tabelle aber nicht in Zelle." );
SwFrm* pNxt = ((SwCellFrm*)pUp)->GetFollowCell();
if ( pNxt )
pNxt = ((SwCellFrm*)pNxt)->ContainsCntnt();
@@ -922,7 +906,7 @@ SwCntntFrm *SwFrm::_FindNextCnt( const bool _bInSameFtn )
// Assure that found next content frame belongs to the same footnotes
const SwFtnFrm* pFtnFrmOfNext( pNxtCnt->FindFtnFrm() );
const SwFtnFrm* pFtnFrmOfCurr( pThis->FindFtnFrm() );
- ASSERT( pFtnFrmOfCurr,
+ OSL_ENSURE( pFtnFrmOfCurr,
"<SwFrm::_FindNextCnt() - unknown layout situation: current frame has to have an upper footnote frame." );
if ( pFtnFrmOfNext == pFtnFrmOfCurr )
{
@@ -1103,9 +1087,9 @@ SwCntntFrm* SwFrm::_FindPrevCnt( const bool _bInSameFtn )
// neither <pCurrCntntFrm> nor <pPrevCntntFrm> are
// inside a fly frame.
// Thus, method <FindFooterOrHeader()> can be used.
- ASSERT( pCurrCntntFrm->FindFooterOrHeader(),
+ OSL_ENSURE( pCurrCntntFrm->FindFooterOrHeader(),
"<SwFrm::_FindPrevCnt()> - unknown layout situation: current frame should be in page header or page footer" );
- ASSERT( !pPrevCntntFrm->IsInFly(),
+ OSL_ENSURE( !pPrevCntntFrm->IsInFly(),
"<SwFrm::_FindPrevCnt()> - unknown layout situation: found previous frame should *not* be inside a fly frame." );
if ( pPrevCntntFrm->FindFooterOrHeader() !=
pCurrCntntFrm->FindFooterOrHeader() )
@@ -1147,7 +1131,7 @@ SwFrm *SwFrm::_FindPrev()
SwLayoutFrm *pUp = pThis->GetUpper();
while ( !pUp->IsCellFrm() )
pUp = pUp->GetUpper();
- ASSERT( pUp, "Cntnt in Tabelle aber nicht in Zelle." );
+ OSL_ENSURE( pUp, "Cntnt in Tabelle aber nicht in Zelle." );
if ( pUp->IsAnLower( pPrvCnt ) )
return pPrvCnt;
}
@@ -1320,9 +1304,6 @@ sal_Bool lcl_IsInColSct( const SwFrm *pUp )
|*
|* SwFrm::IsMoveable();
|*
-|* Ersterstellung MA 09. Mar. 93
-|* Letzte Aenderung MA 05. May. 95
-|*
|*************************************************************************/
/** determine, if frame is moveable in given environment
@@ -1401,9 +1382,6 @@ bool SwFrm::IsMoveable( const SwLayoutFrm* _pLayoutFrm ) const
|*
|* SwFrm::SetInfFlags();
|*
-|* Ersterstellung MA 05. Apr. 94
-|* Letzte Aenderung MA 05. Apr. 94
-|*
|*************************************************************************/
void SwFrm::SetInfFlags()
{
@@ -1454,7 +1432,7 @@ void SwFrm::SetDirFlags( sal_Bool bVert )
const SwFrm* pAsk = IsFlyFrm() ?
((SwFlyFrm*)this)->GetAnchorFrm() : GetUpper();
- ASSERT( pAsk != this, "Autsch! Stack overflow is about to happen" )
+ OSL_ENSURE( pAsk != this, "Autsch! Stack overflow is about to happen" );
if( pAsk )
{
@@ -1480,7 +1458,7 @@ void SwFrm::SetDirFlags( sal_Bool bVert )
const SwFrm* pAsk = IsFlyFrm() ?
((SwFlyFrm*)this)->GetAnchorFrm() : GetUpper();
- ASSERT( pAsk != this, "Autsch! Stack overflow is about to happen" )
+ OSL_ENSURE( pAsk != this, "Autsch! Stack overflow is about to happen" );
if( pAsk )
bRightToLeft = pAsk->IsRightToLeft() ? 1 : 0;
@@ -1497,7 +1475,7 @@ SwLayoutFrm* SwFrm::GetNextCellLeaf( MakePageType )
while ( !pTmpFrm->IsCellFrm() )
pTmpFrm = pTmpFrm->GetUpper();
- ASSERT( pTmpFrm, "SwFrm::GetNextCellLeaf() without cell" )
+ OSL_ENSURE( pTmpFrm, "SwFrm::GetNextCellLeaf() without cell" );
return ((SwCellFrm*)pTmpFrm)->GetFollowCell();
}
@@ -1507,7 +1485,7 @@ SwLayoutFrm* SwFrm::GetPrevCellLeaf( MakePageType )
while ( !pTmpFrm->IsCellFrm() )
pTmpFrm = pTmpFrm->GetUpper();
- ASSERT( pTmpFrm, "SwFrm::GetNextPreviousLeaf() without cell" )
+ OSL_ENSURE( pTmpFrm, "SwFrm::GetNextPreviousLeaf() without cell" );
return ((SwCellFrm*)pTmpFrm)->GetPreviousCell();
}
@@ -1526,13 +1504,13 @@ SwCellFrm* lcl_FindCorrespondingCellFrm( const SwRowFrm& rOrigRow,
pCorrCell = (SwCellFrm*)pCorrCell->GetNext();
}
- ASSERT( pCell && pCorrCell, "lcl_FindCorrespondingCellFrm does not work" )
+ OSL_ENSURE( pCell && pCorrCell, "lcl_FindCorrespondingCellFrm does not work" );
if ( pCell != &rOrigCell )
{
// rOrigCell must be a lower of pCell. We need to recurse into the rows:
- ASSERT( pCell->Lower() && pCell->Lower()->IsRowFrm(),
- "lcl_FindCorrespondingCellFrm does not work" )
+ OSL_ENSURE( pCell->Lower() && pCell->Lower()->IsRowFrm(),
+ "lcl_FindCorrespondingCellFrm does not work" );
SwRowFrm* pRow = (SwRowFrm*)pCell->Lower();
while ( !pRow->IsAnLower( &rOrigCell ) )
@@ -1622,7 +1600,7 @@ SwCellFrm* SwCellFrm::GetPreviousCell() const
while( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() )
pRow = pRow->GetUpper();
- ASSERT( pRow->GetUpper() && pRow->GetUpper()->IsTabFrm(), "GetPreviousCell without Table" );
+ OSL_ENSURE( pRow->GetUpper() && pRow->GetUpper()->IsTabFrm(), "GetPreviousCell without Table" );
SwTabFrm* pTab = (SwTabFrm*)pRow->GetUpper();
@@ -1658,10 +1636,10 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren
if ( !bStart && pTableFrm->IsFollow() && pTableFrm->IsInHeadline( *this ) )
return *this;
- ASSERT( pTableFrm &&
- ( bStart && GetTabBox()->getRowSpan() < 1 ||
- !bStart && GetLayoutRowSpan() > 1 ),
- "SwCellFrm::FindStartRowSpanCell: No rowspan, no table, no cookies" )
+ OSL_ENSURE( pTableFrm &&
+ ( (bStart && GetTabBox()->getRowSpan() < 1) ||
+ (!bStart && GetLayoutRowSpan() > 1) ),
+ "SwCellFrm::FindStartRowSpanCell: No rowspan, no table, no cookies" );
if ( pTableFrm )
{
@@ -1706,7 +1684,7 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren
for ( SwClient* pLast = aIter.First( TYPE( SwFrm ) ); pLast; pLast = aIter.Next() )
{
- ASSERT( ((SwFrm*)pLast)->IsCellFrm(), "Non-row frame registered in table line" )
+ OSL_ENSURE( ((SwFrm*)pLast)->IsCellFrm(), "Non-row frame registered in table line" );
const SwCellFrm* pMasterCell = static_cast<const SwCellFrm*>(pLast);
if ( pMasterCell->GetTabBox() == &rMasterBox )
@@ -1735,7 +1713,7 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren
}
}
- ASSERT( pRet, "SwCellFrm::FindStartRowSpanCell: No result" )
+ OSL_ENSURE( pRet, "SwCellFrm::FindStartRowSpanCell: No result" );
return *pRet;
}
@@ -1743,7 +1721,7 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren
const SwRowFrm* SwFrm::IsInSplitTableRow() const
{
- ASSERT( IsInTab(), "IsInSplitTableRow should only be called for frames in tables" )
+ OSL_ENSURE( IsInTab(), "IsInSplitTableRow should only be called for frames in tables" );
const SwFrm* pRow = this;
@@ -1753,7 +1731,7 @@ const SwRowFrm* SwFrm::IsInSplitTableRow() const
if ( !pRow ) return NULL;
- ASSERT( pRow->GetUpper()->IsTabFrm(), "Confusion in table layout" )
+ OSL_ENSURE( pRow->GetUpper()->IsTabFrm(), "Confusion in table layout" );
const SwTabFrm* pTab = (SwTabFrm*)pRow->GetUpper();
// --> OD 2006-06-28 #b6443897#
@@ -1770,14 +1748,14 @@ const SwRowFrm* SwFrm::IsInSplitTableRow() const
// skip headline
const SwRowFrm* pFollowRow = pTab->GetFollow()->GetFirstNonHeadlineRow();
- ASSERT( pFollowRow, "SwFrm::IsInSplitTableRow() does not work" )
+ OSL_ENSURE( pFollowRow, "SwFrm::IsInSplitTableRow() does not work" );
return pFollowRow;
}
const SwRowFrm* SwFrm::IsInFollowFlowRow() const
{
- ASSERT( IsInTab(), "IsInSplitTableRow should only be called for frames in tables" )
+ OSL_ENSURE( IsInTab(), "IsInSplitTableRow should only be called for frames in tables" );
// find most upper row frame
const SwFrm* pRow = this;
@@ -1786,7 +1764,7 @@ const SwRowFrm* SwFrm::IsInFollowFlowRow() const
if ( !pRow ) return NULL;
- ASSERT( pRow->GetUpper()->IsTabFrm(), "Confusion in table layout" )
+ OSL_ENSURE( pRow->GetUpper()->IsTabFrm(), "Confusion in table layout" );
const SwTabFrm* pTab = (SwTabFrm*)pRow->GetUpper();
@@ -1830,3 +1808,5 @@ const SwFrm* SwLayoutFrm::GetLastLower() const
pRet = pRet->GetNext();
return pRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index f5edaf5bbab4..c83532c0f454 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,9 +79,6 @@ sal_Bool SwFlowFrm::bMoveBwdJump = sal_False;
|*
|* SwFlowFrm::SwFlowFrm()
|*
-|* Ersterstellung MA 26. Apr. 95
-|* Letzte Aenderung MA 26. Apr. 95
-|*
|*************************************************************************/
@@ -116,9 +114,6 @@ sal_Bool SwFlowFrm::HasLockedFollow() const
|*
|* SwFlowFrm::IsKeepFwdMoveAllowed()
|*
-|* Ersterstellung MA 20. Jul. 94
-|* Letzte Aenderung MA 16. May. 95
-|*
|*************************************************************************/
@@ -147,10 +142,6 @@ sal_Bool SwFlowFrm::IsKeepFwdMoveAllowed()
|*
|* SwFlowFrm::CheckKeep()
|*
-|* Beschreibung
-|* Ersterstellung MA 20. Jun. 95
-|* Letzte Aenderung MA 09. Apr. 97
-|*
|*************************************************************************/
@@ -190,9 +181,6 @@ void SwFlowFrm::CheckKeep()
|*
|* SwFlowFrm::IsKeep()
|*
-|* Ersterstellung MA 09. Apr. 97
-|* Letzte Aenderung MA 09. Apr. 97
-|*
|*************************************************************************/
sal_Bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep ) const
@@ -208,8 +196,8 @@ sal_Bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldK
( !rThis.IsInTab() || rThis.IsTabFrm() ) &&
rAttrs.GetKeep().GetValue() );
- ASSERT( !bCheckIfLastRowShouldKeep || rThis.IsTabFrm(),
- "IsKeep with bCheckIfLastRowShouldKeep should only be used for tabfrms" )
+ OSL_ENSURE( !bCheckIfLastRowShouldKeep || rThis.IsTabFrm(),
+ "IsKeep with bCheckIfLastRowShouldKeep should only be used for tabfrms" );
// Ignore keep attribute if there are break situations:
if ( bKeep )
@@ -266,7 +254,7 @@ sal_Bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldK
if ( ! pSet )
pSet = pNxt->GetAttrSet();
- ASSERT( pSet, "No AttrSet to check keep attribute" )
+ OSL_ENSURE( pSet, "No AttrSet to check keep attribute" );
if ( pSet->GetPageDesc().GetPageDesc() )
bKeep = sal_False;
@@ -290,9 +278,6 @@ sal_Bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldK
|*
|* SwFlowFrm::BwdMoveNecessary()
|*
-|* Ersterstellung MA 20. Jul. 94
-|* Letzte Aenderung MA 02. May. 96
-|*
|*************************************************************************/
@@ -382,7 +367,7 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRe
GetFmt())->GetSectionNode();
else
{
- ASSERT( rThis.IsTabFrm(), "new FowFrm?" );
+ OSL_ENSURE( rThis.IsTabFrm(), "new FowFrm?" );
pNode = ((SwTabFrm&)rThis).GetTable()->
GetTabSortBoxes()[0]->GetSttNd()->FindTableNode();
}
@@ -409,8 +394,6 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRe
|* Beschreibung Eine Spezialisierte Form des Cut() und Paste(), die
|* eine ganze Kette umhaengt (naehmlich this und folgende). Dabei werden
|* nur minimale Operationen und Benachrichtigungen ausgefuehrt.
-|* Ersterstellung MA 18. Mar. 93
-|* Letzte Aenderung MA 18. May. 95
|*
|*************************************************************************/
@@ -466,7 +449,7 @@ SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart )
//Kann sein, dass der CntFrm gelockt ist, wir wollen hier nicht
//in eine endlose Seitenwanderung hineinlaufen und rufen das
//Calc garnicht erst!
- ASSERT( pCnt->IsTxtFrm(), "Die Graphic ist gelandet." );
+ OSL_ENSURE( pCnt->IsTxtFrm(), "Die Graphic ist gelandet." );
if ( ((SwTxtFrm*)pCnt)->IsLocked() ||
((SwTxtFrm*)pCnt)->GetFollow() == pStart )
break;
@@ -600,8 +583,8 @@ sal_Bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibl
void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
{
- ASSERT( pParent, "Kein Parent uebergeben." );
- ASSERT( rThis.GetUpper(), "Wo kommen wir denn her?" );
+ OSL_ENSURE( pParent, "Kein Parent uebergeben." );
+ OSL_ENSURE( rThis.GetUpper(), "Wo kommen wir denn her?" );
//Sparsamer benachrichtigen wenn eine Action laeuft.
ViewShell *pSh = rThis.GetShell();
@@ -686,9 +669,6 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
|*
|* SwFlowFrm::IsAnFollow()
|*
-|* Ersterstellung MA 26. Apr. 95
-|* Letzte Aenderung MA 26. Apr. 95
-|*
|*************************************************************************/
@@ -708,14 +688,11 @@ sal_Bool SwFlowFrm::IsAnFollow( const SwFlowFrm *pAssumed ) const
|*
|* SwFlowFrm::FindMaster()
|*
-|* Ersterstellung MA 26. Apr. 95
-|* Letzte Aenderung MA 26. Apr. 95
-|*
|*************************************************************************/
SwTxtFrm* SwCntntFrm::FindMaster() const
{
- ASSERT( IsFollow(), "SwCntntFrm::FindMaster(): !IsFollow" );
+ OSL_ENSURE( IsFollow(), "SwCntntFrm::FindMaster(): !IsFollow" );
const SwCntntFrm* pCnt = GetPrevCntntFrm();
@@ -723,19 +700,19 @@ SwTxtFrm* SwCntntFrm::FindMaster() const
{
if ( pCnt->HasFollow() && pCnt->GetFollow() == this )
{
- ASSERT( pCnt->IsTxtFrm(), "NoTxtFrm with follow found" )
+ OSL_ENSURE( pCnt->IsTxtFrm(), "NoTxtFrm with follow found" );
return (SwTxtFrm*)pCnt;
}
pCnt = pCnt->GetPrevCntntFrm();
}
- ASSERT( sal_False, "Follow ist lost in Space." );
+ OSL_ENSURE( sal_False, "Follow ist lost in Space." );
return 0;
}
SwSectionFrm* SwSectionFrm::FindMaster() const
{
- ASSERT( IsFollow(), "SwSectionFrm::FindMaster(): !IsFollow" );
+ OSL_ENSURE( IsFollow(), "SwSectionFrm::FindMaster(): !IsFollow" );
SwClientIter aIter( *pSection->GetFmt() );
SwClient *pLast = aIter.GoStart();
@@ -744,8 +721,8 @@ SwSectionFrm* SwSectionFrm::FindMaster() const
{
if ( pLast->ISA( SwFrm ) )
{
- ASSERT( ((SwFrm*)pLast)->IsSctFrm(),
- "Non-section frame registered in section format" )
+ OSL_ENSURE( ((SwFrm*)pLast)->IsSctFrm(),
+ "Non-section frame registered in section format" );
SwSectionFrm* pSect = (SwSectionFrm*)pLast;
if( pSect->GetFollow() == this )
return pSect;
@@ -753,13 +730,13 @@ SwSectionFrm* SwSectionFrm::FindMaster() const
pLast = aIter++;
}
- ASSERT( sal_False, "Follow ist lost in Space." );
+ OSL_ENSURE( sal_False, "Follow ist lost in Space." );
return 0;
}
SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const
{
- ASSERT( IsFollow(), "SwTabFrm::FindMaster(): !IsFollow" );
+ OSL_ENSURE( IsFollow(), "SwTabFrm::FindMaster(): !IsFollow" );
SwClientIter aIter( *GetTable()->GetFrmFmt() );
SwClient* pLast = aIter.GoStart();
@@ -768,8 +745,8 @@ SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const
{
if ( pLast->ISA( SwFrm ) )
{
- ASSERT( ((SwFrm*)pLast)->IsTabFrm(),
- "Non-table frame registered in table format" )
+ OSL_ENSURE( ((SwFrm*)pLast)->IsTabFrm(),
+ "Non-table frame registered in table format" );
SwTabFrm* pTab = (SwTabFrm*)pLast;
if ( bFirstMaster )
@@ -799,7 +776,7 @@ SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const
pLast = aIter++;
}
- ASSERT( sal_False, "Follow ist lost in Space." );
+ OSL_ENSURE( sal_False, "Follow ist lost in Space." );
return 0;
}
@@ -811,8 +788,6 @@ SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const
|* das _nicht_ unterhalb von this liegt (oder gar this selbst ist).
|* Ausserdem muss dieses LayoutBlatt im gleichen Textfluss wie
|* pAnch Ausgangsfrm liegen (Body, Ftn)
-|* Ersterstellung MA 25. Nov. 92
-|* Letzte Aenderung MA 25. Apr. 95
|*
|*************************************************************************/
@@ -850,9 +825,6 @@ const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd,
|*
|* Beschreibung Ruft Get[Next|Prev]Leaf
|*
-|* Ersterstellung MA 20. Mar. 93
-|* Letzte Aenderung MA 25. Apr. 95
-|*
|*************************************************************************/
@@ -975,15 +947,12 @@ sal_Bool SwFrm::WrongPageDesc( SwPageFrm* pNew )
|* Beschreibung Liefert das naechste LayoutBlatt in den das
|* Frame gemoved werden kann.
|*
-|* Ersterstellung MA 16. Nov. 92
-|* Letzte Aenderung MA 05. Dec. 96
-|*
|*************************************************************************/
SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
{
- ASSERT( !IsInFtn(), "GetNextLeaf(), don't call me for Ftn." );
- ASSERT( !IsInSct(), "GetNextLeaf(), don't call me for Sections." );
+ OSL_ENSURE( !IsInFtn(), "GetNextLeaf(), don't call me for Ftn." );
+ OSL_ENSURE( !IsInSct(), "GetNextLeaf(), don't call me for Sections." );
const sal_Bool bBody = IsInDocBody(); //Wenn ich aus dem DocBody komme
//Will ich auch im Body landen.
@@ -1118,15 +1087,13 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
|*
|* Beschreibung Liefert das vorhergehende LayoutBlatt in das der
|* Frame gemoved werden kann.
-|* Ersterstellung MA 16. Nov. 92
-|* Letzte Aenderung MA 25. Apr. 95
|*
|*************************************************************************/
SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType )
{
- ASSERT( !IsInFtn(), "GetPrevLeaf(), don't call me for Ftn." );
+ OSL_ENSURE( !IsInFtn(), "GetPrevLeaf(), don't call me for Ftn." );
const sal_Bool bBody = IsInDocBody(); //Wenn ich aus dem DocBody komme
//will ich auch im Body landen.
@@ -1161,9 +1128,6 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType )
|*
|* SwFlowFrm::IsPrevObjMove()
|*
-|* Ersterstellung MA 20. Feb. 96
-|* Letzte Aenderung MA 22. Feb. 96
-|*
|*************************************************************************/
@@ -1180,7 +1144,7 @@ sal_Bool SwFlowFrm::IsPrevObjMove() const
if ( pPre && pPre->GetDrawObjs() )
{
- ASSERT( SwFlowFrm::CastFlowFrm( pPre ), "new flowfrm?" );
+ OSL_ENSURE( SwFlowFrm::CastFlowFrm( pPre ), "new flowfrm?" );
if( SwFlowFrm::CastFlowFrm( pPre )->IsAnFollow( this ) )
return sal_False;
SwLayoutFrm* pPreUp = pPre->GetUpper();
@@ -1243,8 +1207,6 @@ sal_Bool SwFlowFrm::IsPrevObjMove() const
|* im FrmFmt ein PageDesc angegeben wird.
|* Die Implementierung arbeitet zuaechst nur auf CntntFrms!
|* -->Fuer LayoutFrms ist die Definition des Vorgaengers unklar.
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 21. Mar. 95
|*
|*************************************************************************/
@@ -1265,7 +1227,7 @@ sal_Bool SwFlowFrm::IsPageBreak( sal_Bool bAct ) const
if ( pPrev )
{
- ASSERT( pPrev->IsInDocBody(), "IsPageBreak: Not in DocBody?" );
+ OSL_ENSURE( pPrev->IsInDocBody(), "IsPageBreak: Not in DocBody?" );
if ( bAct )
{ if ( rThis.FindPageFrm() == pPrev->FindPageFrm() )
return sal_False;
@@ -1307,8 +1269,6 @@ sal_Bool SwFlowFrm::IsPageBreak( sal_Bool bAct ) const
|* gibt ist jede weitere Ueberlegung ueberfluessig.
|* Die Implementierung arbeitet zuaechst nur auf CntntFrms!
|* -->Fuer LayoutFrms ist die Definition des Vorgaengers unklar.
-|* Ersterstellung MA 11. Jun. 93
-|* Letzte Aenderung MA 21. Mar. 95
|*
|*************************************************************************/
@@ -1372,7 +1332,7 @@ sal_Bool SwFlowFrm::HasParaSpaceAtPages( sal_Bool bSct ) const
return sal_False;
pTmp = pTmp->GetUpper();
}
- ASSERT( sal_False, "HasParaSpaceAtPages: Where's my page?" );
+ OSL_ENSURE( sal_False, "HasParaSpaceAtPages: Where's my page?" );
return sal_False;
}
if( !rThis.IsInDocBody() || ( rThis.IsInTab() && !rThis.IsTabFrm()) ||
@@ -1683,7 +1643,7 @@ SwTwips SwFlowFrm::_GetUpperSpaceAmountConsideredForPageGrid(
nUpperSpaceAmountConsideredForPageGrid =
nNewUpperSpace - _nUpperSpaceWithoutGrid;
- ASSERT( nUpperSpaceAmountConsideredForPageGrid >= 0,
+ OSL_ENSURE( nUpperSpaceAmountConsideredForPageGrid >= 0,
"<SwFlowFrm::GetUpperSpaceAmountConsideredForPageGrid(..)> - negative space considered for page grid!" );
}
}
@@ -1846,8 +1806,6 @@ SwTwips SwFlowFrm::CalcAddLowerSpaceAsLastInTableCell(
|*
|* Beschreibung Moved den Frm vorwaerts wenn es durch die aktuellen
|* Bedingungen und Attribute notwendig erscheint.
-|* Ersterstellung MA 05. Dec. 96
-|* Letzte Aenderung MA 09. Mar. 98
|*
|*************************************************************************/
@@ -1941,8 +1899,6 @@ sal_Bool SwFlowFrm::CheckMoveFwd( sal_Bool &rbMakePage, sal_Bool bKeep, sal_Bool
|* sal_Bool SwFlowFrm::MoveFwd()
|*
|* Beschreibung Returnwert sagt, ob der Frm die Seite gewechselt hat.
-|* Ersterstellung MA 05. Dec. 96
-|* Letzte Aenderung MA 05. Dec. 96
|*
|*************************************************************************/
@@ -1970,11 +1926,6 @@ sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool b
( rThis.GetUpper()->IsInTab() &&
rThis.GetUpper()->FindTabFrm()->IsFwdMoveAllowed() ) ) &&
0 != const_cast<SwFrm&>(rThis).GetNextCellLeaf( MAKEPAGE_NONE ) )
-/*
- &&
- // NEW TABLES
- // Have a look at our main competitor: We don't move inside row span cells:
- ( !rThis.GetUpper()->IsCellFrm() || !rThis.GetUpper()->IsLeaveUpperAllowed() ) )*/
{
bNoFwd = sal_False;
}
@@ -2056,7 +2007,7 @@ sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool b
(pOldBoss->Frm().*fnRect->fnGetBottom)() );
SwCntntFrm* pStart = rThis.IsCntntFrm() ?
(SwCntntFrm*)&rThis : ((SwLayoutFrm&)rThis).ContainsCntnt();
- ASSERT( pStart || ( rThis.IsTabFrm() && !((SwTabFrm&)rThis).Lower() ),
+ OSL_ENSURE( pStart || ( rThis.IsTabFrm() && !((SwTabFrm&)rThis).Lower() ),
"MoveFwd: Missing Content" );
SwLayoutFrm* pBody = pStart ? ( pStart->IsTxtFrm() ?
(SwLayoutFrm*)((SwTxtFrm*)pStart)->FindBodyFrm() : 0 ) : 0;
@@ -2149,8 +2100,6 @@ sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool b
|* Beschreibung Returnwert sagt, ob der Frm die Seite wechseln soll.
|* Sollte von abgeleiteten Klassen gerufen werden.
|* Das moven selbst muessen die abgeleiteten uebernehmen.
-|* Ersterstellung MA 05. Dec. 96
-|* Letzte Aenderung MA 05. Dec. 96
|*
|*************************************************************************/
@@ -2208,7 +2157,7 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat )
pRef = pFtn->GetRef();
// <--
- ASSERT( pRef, "MoveBwd: Endnote for an empty section?" );
+ OSL_ENSURE( pRef, "MoveBwd: Endnote for an empty section?" );
if( !bEndnote )
pOldBoss = pOldBoss->FindFtnBossFrm( sal_True );
@@ -2544,7 +2493,7 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat )
}
pIndNext = pIndNext->GetIndNext();
}
- ASSERT( !pIndNext || pIndNext->ISA(SwTxtFrm),
+ OSL_ENSURE( !pIndNext || pIndNext->ISA(SwTxtFrm),
"<SwFlowFrm::MovedBwd(..)> - incorrect next found." );
if ( pIndNext && pIndNext->IsFlowFrm() &&
SwFlowFrm::CastFlowFrm(pIndNext)->IsJoinLocked() )
@@ -2569,7 +2518,7 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat )
: MAKEPAGE_NONE,
sal_True );
// --> OD 2007-01-10 #i73194# - make code robust
- ASSERT( pNextNewUpper, "<SwFlowFrm::MoveBwd(..)> - missing next new upper" );
+ OSL_ENSURE( pNextNewUpper, "<SwFlowFrm::MoveBwd(..)> - missing next new upper" );
if ( pNextNewUpper &&
( pNextNewUpper == rThis.GetUpper() ||
pNextNewUpper->GetType() != rThis.GetUpper()->GetType() ) )
@@ -2577,14 +2526,14 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat )
{
pNewUpper = 0L;
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwFlowFrm::MoveBwd(..)> - layout loop control for layout action <Move Backward> applied!" );
#endif
}
}
// <--
- ASSERT( pNewUpper != rThis.GetUpper(),
+ OSL_ENSURE( pNewUpper != rThis.GetUpper(),
"<SwFlowFrm::MoveBwd(..)> - moving backward to the current upper frame!? -> Please inform OD." );
if ( pNewUpper )
{
@@ -2708,9 +2657,6 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat )
|*
|* SwFlowFrm::CastFlowFrm
|*
-|* Ersterstellung MA 03. May. 95
-|* Letzte Aenderung AMA 02. Dec. 97
-|*
|*************************************************************************/
SwFlowFrm *SwFlowFrm::CastFlowFrm( SwFrm *pFrm )
@@ -2734,3 +2680,5 @@ const SwFlowFrm *SwFlowFrm::CastFlowFrm( const SwFrm *pFrm )
return (SwSectionFrm*)pFrm;
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 8cd4253f6ddc..c80aed84caeb 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,7 +81,6 @@
#include "pam.hxx"
#include "frmatr.hxx"
#include "viewimp.hxx"
-#include "errhdl.hxx"
#include "dcontact.hxx"
#include "dflyobj.hxx"
#include "dview.hxx"
@@ -109,9 +109,6 @@ TYPEINIT2(SwFlyFrm,SwLayoutFrm,SwAnchoredObject);
|*
|* SwFlyFrm::SwFlyFrm()
|*
-|* Ersterstellung MA 28. Sep. 92
-|* Letzte Aenderung MA 09. Apr. 99
-|*
|*************************************************************************/
SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
@@ -218,7 +215,7 @@ void SwFlyFrm::Chain( SwFrm* _pAnch )
SwFlyFrm* pFollow = FindChainNeighbour( *rChain.GetNext(), _pAnch );
if ( pFollow )
{
- ASSERT( !pFollow->GetPrevLink(), "wrong chain detected" );
+ OSL_ENSURE( !pFollow->GetPrevLink(), "wrong chain detected" );
if ( !pFollow->GetPrevLink() )
SwFlyFrm::ChainFrames( this, pFollow );
}
@@ -228,7 +225,7 @@ void SwFlyFrm::Chain( SwFrm* _pAnch )
SwFlyFrm *pMaster = FindChainNeighbour( *rChain.GetPrev(), _pAnch );
if ( pMaster )
{
- ASSERT( !pMaster->GetNextLink(), "wrong chain detected" );
+ OSL_ENSURE( !pMaster->GetNextLink(), "wrong chain detected" );
if ( !pMaster->GetNextLink() )
SwFlyFrm::ChainFrames( pMaster, this );
}
@@ -242,7 +239,7 @@ void SwFlyFrm::InsertCnt()
if ( !GetPrevLink() )
{
const SwFmtCntnt& rCntnt = GetFmt()->GetCntnt();
- ASSERT( rCntnt.GetCntntIdx(), ":-( no content prepared." );
+ OSL_ENSURE( rCntnt.GetCntntIdx(), ":-( no content prepared." );
sal_uLong nIndex = rCntnt.GetCntntIdx()->GetIndex();
// Lower() bedeutet SwColumnFrm, eingefuegt werden muss der Inhalt dann in den (Column)BodyFrm
::_InsertCnt( Lower() ? (SwLayoutFrm*)((SwLayoutFrm*)Lower())->Lower() : (SwLayoutFrm*)this,
@@ -264,7 +261,7 @@ void SwFlyFrm::InsertCnt()
// Check, if column are allowed.
// Columns are not allowed for fly frames, which represent graphics or embedded objects.
const SwFmtCntnt& rCntnt = GetFmt()->GetCntnt();
- ASSERT( rCntnt.GetCntntIdx(), "<SwFlyFrm::InsertColumns()> - no content prepared." );
+ OSL_ENSURE( rCntnt.GetCntntIdx(), "<SwFlyFrm::InsertColumns()> - no content prepared." );
SwNodeIndex aFirstCntnt( *(rCntnt.GetCntntIdx()), 1 );
if ( aFirstCntnt.GetNode().IsNoTxtNode() )
{
@@ -290,9 +287,6 @@ void SwFlyFrm::InsertCnt()
|*
|* SwFlyFrm::~SwFlyFrm()
|*
-|* Ersterstellung MA 28. Sep. 92
-|* Letzte Aenderung MA 07. Jul. 95
-|*
|*************************************************************************/
SwFlyFrm::~SwFlyFrm()
@@ -390,9 +384,6 @@ void SwFlyFrm::DeleteCnt()
|*
|* SwFlyFrm::InitDrawObj()
|*
-|* Ersterstellung MA 02. Dec. 94
-|* Letzte Aenderung MA 30. Nov. 95
-|*
|*************************************************************************/
void SwFlyFrm::InitDrawObj( sal_Bool bNotify )
{
@@ -410,7 +401,7 @@ void SwFlyFrm::InitDrawObj( sal_Bool bNotify )
pIDDMA->GetOrCreateDrawModel() );
// <--
}
- ASSERT( pContact, "InitDrawObj failed" );
+ OSL_ENSURE( pContact, "InitDrawObj failed" );
// OD 2004-03-22 #i26791#
SetDrawObj( *(pContact->CreateNewRef( this )) );
@@ -430,9 +421,6 @@ void SwFlyFrm::InitDrawObj( sal_Bool bNotify )
|*
|* SwFlyFrm::FinitDrawObj()
|*
-|* Ersterstellung MA 12. Dec. 94
-|* Letzte Aenderung MA 15. May. 95
-|*
|*************************************************************************/
void SwFlyFrm::FinitDrawObj()
@@ -495,16 +483,13 @@ void SwFlyFrm::FinitDrawObj()
|*
|* SwFlyFrm::ChainFrames()
|*
-|* Ersterstellung MA 29. Oct. 97
-|* Letzte Aenderung MA 20. Jan. 98
-|*
|*************************************************************************/
void SwFlyFrm::ChainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
{
- ASSERT( pMaster && pFollow, "uncomplete chain" );
- ASSERT( !pMaster->GetNextLink(), "link can not be changed" );
- ASSERT( !pFollow->GetPrevLink(), "link can not be changed" );
+ OSL_ENSURE( pMaster && pFollow, "uncomplete chain" );
+ OSL_ENSURE( !pMaster->GetNextLink(), "link can not be changed" );
+ OSL_ENSURE( !pFollow->GetPrevLink(), "link can not be changed" );
pMaster->pNextLink = pFollow;
pFollow->pPrevLink = pMaster;
@@ -533,7 +518,7 @@ void SwFlyFrm::ChainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
//Es gibt nur noch den Inhalt des Masters, der Inhalt vom Follow
//hat keine Frames mehr (sollte immer nur genau ein leerer TxtNode sein).
SwFrm *pFrm = pFollow->ContainsCntnt();
- ASSERT( !pFrm->IsTabFrm() && !pFrm->FindNext(), "follow in chain contains content" );
+ OSL_ENSURE( !pFrm->IsTabFrm() && !pFrm->FindNext(), "follow in chain contains content" );
pFrm->Cut();
delete pFrm;
}
@@ -558,7 +543,7 @@ void SwFlyFrm::UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
{
pUpper = static_cast<SwLayoutFrm*>(pUpper->GetLastLower());
pUpper = static_cast<SwLayoutFrm*>(pUpper->Lower()); // der (Column)BodyFrm
- ASSERT( pUpper && pUpper->IsColBodyFrm(), "Missing ColumnBody" );
+ OSL_ENSURE( pUpper && pUpper->IsColBodyFrm(), "Missing ColumnBody" );
}
SwFlyFrm *pFoll = pFollow;
while ( pFoll )
@@ -574,7 +559,7 @@ void SwFlyFrm::UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
//Der Follow muss mit seinem eigenen Inhalt versorgt werden.
const SwFmtCntnt &rCntnt = pFollow->GetFmt()->GetCntnt();
- ASSERT( rCntnt.GetCntntIdx(), ":-( Kein Inhalt vorbereitet." );
+ OSL_ENSURE( rCntnt.GetCntntIdx(), ":-( Kein Inhalt vorbereitet." );
sal_uLong nIndex = rCntnt.GetCntntIdx()->GetIndex();
// Lower() bedeutet SwColumnFrm, dieser beinhaltet wieder einen SwBodyFrm
::_InsertCnt( pFollow->Lower() ? (SwLayoutFrm*)((SwLayoutFrm*)pFollow->Lower())->Lower()
@@ -591,9 +576,6 @@ void SwFlyFrm::UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
|*
|* SwFlyFrm::FindChainNeighbour()
|*
-|* Ersterstellung MA 11. Nov. 97
-|* Letzte Aenderung MA 09. Apr. 99
-|*
|*************************************************************************/
SwFlyFrm *SwFlyFrm::FindChainNeighbour( SwFrmFmt &rChain, SwFrm *pAnch )
@@ -637,7 +619,7 @@ SwFlyFrm *SwFlyFrm::FindChainNeighbour( SwFrmFmt &rChain, SwFrm *pAnch )
}
else if ( pFly )
{
- ASSERT( !aIter.Next(), "chain with more than one inkarnation" );
+ OSL_ENSURE( !aIter.Next(), "chain with more than one inkarnation" );
}
return pFly;
}
@@ -647,9 +629,6 @@ SwFlyFrm *SwFlyFrm::FindChainNeighbour( SwFrmFmt &rChain, SwFrm *pAnch )
|*
|* SwFlyFrm::FindLastLower()
|*
-|* Ersterstellung MA 29. Oct. 97
-|* Letzte Aenderung MA 29. Oct. 97
-|*
|*************************************************************************/
SwFrm *SwFlyFrm::FindLastLower()
@@ -670,9 +649,6 @@ SwFrm *SwFlyFrm::FindLastLower()
|*
|* SwFlyFrm::FrmSizeChg()
|*
-|* Ersterstellung MA 17. Dec. 92
-|* Letzte Aenderung MA 24. Jul. 96
-|*
|*************************************************************************/
sal_Bool SwFlyFrm::FrmSizeChg( const SwFmtFrmSize &rFrmSize )
@@ -730,9 +706,6 @@ sal_Bool SwFlyFrm::FrmSizeChg( const SwFmtFrmSize &rFrmSize )
|*
|* SwFlyFrm::Modify()
|*
-|* Ersterstellung MA 17. Dec. 92
-|* Letzte Aenderung MA 17. Jan. 97
-|*
|*************************************************************************/
void SwFlyFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
@@ -1110,8 +1083,6 @@ void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
|* SwFlyFrm::GetInfo()
|*
|* Beschreibung erfragt Informationen
-|* Ersterstellung JP 31.03.94
-|* Letzte Aenderung JP 31.03.94
|*
*************************************************************************/
@@ -1127,9 +1098,6 @@ sal_Bool SwFlyFrm::GetInfo( SfxPoolItem & rInfo ) const
|*
|* SwFlyFrm::_Invalidate()
|*
-|* Ersterstellung MA 15. Oct. 92
-|* Letzte Aenderung MA 26. Jun. 96
-|*
|*************************************************************************/
void SwFlyFrm::_Invalidate( SwPageFrm *pPage )
@@ -1169,8 +1137,6 @@ void SwFlyFrm::_Invalidate( SwPageFrm *pPage )
|*
|* Beschreibung Aenderung der relativen Position, die Position wird
|* damit automatisch Fix, das Attribut wird entprechend angepasst.
-|* Ersterstellung MA 25. Aug. 92
-|* Letzte Aenderung MA 09. Aug. 95
|*
|*************************************************************************/
@@ -1212,7 +1178,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
aVert.SetVertOrient( text::VertOrientation::NONE );
xub_StrLen nOfs =
pFmt->GetAnchor().GetCntntAnchor()->nContent.GetIndex();
- ASSERT( GetAnchorFrm()->IsTxtFrm(), "TxtFrm expected" );
+ OSL_ENSURE( GetAnchorFrm()->IsTxtFrm(), "TxtFrm expected" );
pAutoFrm = (SwTxtFrm*)GetAnchorFrm();
while( pAutoFrm->GetFollow() &&
pAutoFrm->GetFollow()->GetOfst() <= nOfs )
@@ -1269,7 +1235,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
{
xub_StrLen nOfs = pFmt->GetAnchor().GetCntntAnchor()
->nContent.GetIndex();
- ASSERT( GetAnchorFrm()->IsTxtFrm(), "TxtFrm expected");
+ OSL_ENSURE( GetAnchorFrm()->IsTxtFrm(), "TxtFrm expected");
pAutoFrm = (SwTxtFrm*)GetAnchorFrm();
while( pAutoFrm->GetFollow() &&
pAutoFrm->GetFollow()->GetOfst() <= nOfs )
@@ -1295,14 +1261,12 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
|*
|* Beschreibung: "Formatiert" den Frame; Frm und PrtArea.
|* Die Fixsize wird hier nicht eingestellt.
-|* Ersterstellung MA 14. Jun. 93
-|* Letzte Aenderung MA 13. Jun. 96
|*
|*************************************************************************/
void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
{
- ASSERT( pAttrs, "FlyFrm::Format, pAttrs ist 0." );
+ OSL_ENSURE( pAttrs, "FlyFrm::Format, pAttrs ist 0." );
ColLock();
@@ -1328,8 +1292,8 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
const SwFmtFrmSize &rFrmSz = GetFmt()->GetFrmSize();
Size aRelSize( CalcRel( rFrmSz ) );
- ASSERT( pAttrs->GetSize().Height() != 0 || rFrmSz.GetHeightPercent(), "Hoehe des RahmenAttr ist 0." );
- ASSERT( pAttrs->GetSize().Width() != 0 || rFrmSz.GetWidthPercent(), "Breite des RahmenAttr ist 0." );
+ OSL_ENSURE( pAttrs->GetSize().Height() != 0 || rFrmSz.GetHeightPercent(), "Hoehe des RahmenAttr ist 0." );
+ OSL_ENSURE( pAttrs->GetSize().Width() != 0 || rFrmSz.GetWidthPercent(), "Breite des RahmenAttr ist 0." );
SWRECTFN( this )
if( !HasFixSize() )
@@ -1440,7 +1404,7 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
if ( !bFormatHeightOnly )
{
- ASSERT( aRelSize == CalcRel( rFrmSz ), "SwFlyFrm::Format CalcRel problem" )
+ OSL_ENSURE( aRelSize == CalcRel( rFrmSz ), "SwFlyFrm::Format CalcRel problem" );
SwTwips nNewSize = bVert ? aRelSize.Height() : aRelSize.Width();
if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE )
@@ -1647,7 +1611,7 @@ void CalcCntnt( SwLayoutFrm *pLay,
bAgain = true;
if ( pAgainObj2 == pAnchoredObj )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"::CalcCntnt(..) - loop detected, perform attribute changes to avoid the loop" );
//Oszillation unterbinden.
SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
@@ -1732,7 +1696,7 @@ void CalcCntnt( SwLayoutFrm *pLay,
continue;
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false, "LoopControl in CalcCntnt" )
+ OSL_ENSURE( false, "LoopControl in CalcCntnt" );
#endif
}
}
@@ -1804,9 +1768,6 @@ void CalcCntnt( SwLayoutFrm *pLay,
|*
|* SwFlyFrm::MakeFlyPos()
|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 14. Nov. 96
-|*
|*************************************************************************/
// OD 2004-03-23 #i26791#
//void SwFlyFrm::MakeFlyPos()
@@ -1840,9 +1801,6 @@ void SwFlyFrm::MakeObjPos()
|*
|* SwFlyFrm::MakePrtArea()
|*
-|* Ersterstellung MA 23. Jun. 93
-|* Letzte Aenderung MA 23. Jun. 93
-|*
|*************************************************************************/
void SwFlyFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
{
@@ -1864,9 +1822,6 @@ void SwFlyFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
|*
|* SwFlyFrm::_Grow(), _Shrink()
|*
-|* Ersterstellung MA 05. Oct. 92
-|* Letzte Aenderung MA 05. Sep. 96
-|*
|*************************************************************************/
SwTwips SwFlyFrm::_Grow( SwTwips nDist, sal_Bool bTst )
@@ -2055,9 +2010,6 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, sal_Bool bTst )
|*
|* SwFlyFrm::ChgSize()
|*
-|* Ersterstellung MA 05. Oct. 92
-|* Letzte Aenderung MA 04. Sep. 96
-|*
|*************************************************************************/
Size SwFlyFrm::ChgSize( const Size& aNewSize )
@@ -2108,14 +2060,11 @@ Size SwFlyFrm::ChgSize( const Size& aNewSize )
|*
|* SwFlyFrm::IsLowerOf()
|*
-|* Ersterstellung MA 27. Dec. 93
-|* Letzte Aenderung MA 27. Dec. 93
-|*
|*************************************************************************/
sal_Bool SwFlyFrm::IsLowerOf( const SwLayoutFrm* pUpperFrm ) const
{
- ASSERT( GetAnchorFrm(), "8-( Fly is lost in Space." );
+ OSL_ENSURE( GetAnchorFrm(), "8-( Fly is lost in Space." );
const SwFrm* pFrm = GetAnchorFrm();
do
{
@@ -2132,9 +2081,6 @@ sal_Bool SwFlyFrm::IsLowerOf( const SwLayoutFrm* pUpperFrm ) const
|*
|* SwFlyFrm::Cut()
|*
-|* Ersterstellung MA 23. Feb. 94
-|* Letzte Aenderung MA 23. Feb. 94
-|*
|*************************************************************************/
void SwFlyFrm::Cut()
@@ -2145,9 +2091,6 @@ void SwFlyFrm::Cut()
|*
|* SwFrm::AppendFly(), RemoveFly()
|*
-|* Ersterstellung MA 25. Aug. 92
-|* Letzte Aenderung MA 09. Jun. 95
-|*
|*************************************************************************/
void SwFrm::AppendFly( SwFlyFrm *pNew )
@@ -2244,7 +2187,7 @@ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj )
{
if ( !_rNewObj.ISA(SwAnchoredDrawObject) )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"SwFrm::AppendDrawObj(..) - anchored object of unexcepted type -> object not appended" );
return;
}
@@ -2333,9 +2276,6 @@ void SwFrm::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj )
|*
|* SwFrm::InvalidateObjs()
|*
-|* Ersterstellung MA 29. Nov. 96
-|* Letzte Aenderung MA 29. Nov. 96
-|*
|*************************************************************************/
// --> OD 2004-07-01 #i28701# - change purpose of method and adjust its name
void SwFrm::InvalidateObjs( const bool _bInvaPosOnly,
@@ -2474,7 +2414,7 @@ void SwLayoutFrm::NotifyLowerObjs( const bool _bUnlockPosOfObjs )
}
else
{
- ASSERT( pObj->ISA(SwAnchoredDrawObject),
+ OSL_ENSURE( pObj->ISA(SwAnchoredDrawObject),
"<SwLayoutFrm::NotifyFlys() - anchored object of unexcepted type" );
// --> OD 2004-10-08 #i26945# - use <pAnchorFrm> to check, if
// fly frame is lower of layout frame resp. if fly frame is
@@ -2500,9 +2440,6 @@ void SwLayoutFrm::NotifyLowerObjs( const bool _bUnlockPosOfObjs )
|*
|* SwFlyFrm::NotifyDrawObj()
|*
-|* Ersterstellung OK 22. Nov. 94
-|* Letzte Aenderung MA 10. Jan. 97
-|*
|*************************************************************************/
void SwFlyFrm::NotifyDrawObj()
@@ -2520,9 +2457,6 @@ void SwFlyFrm::NotifyDrawObj()
|*
|* SwFlyFrm::CalcRel()
|*
-|* Ersterstellung MA 13. Jun. 96
-|* Letzte Aenderung MA 10. Oct. 96
-|*
|*************************************************************************/
Size SwFlyFrm::CalcRel( const SwFmtFrmSize &rSz ) const
@@ -2643,32 +2577,8 @@ SwTwips SwFlyFrm::CalcAutoWidth() const
/*************************************************************************
|*
-|* SwFlyFrm::AddSpacesToFrm
-|*
-|* Ersterstellung MA 11. Nov. 96
-|* Letzte Aenderung MA 10. Mar. 97
-|*
-|*************************************************************************/
-
-//SwRect SwFlyFrm::AddSpacesToFrm() const
-//{
-// SwRect aRect( Frm() );
-// const SvxULSpaceItem &rUL = GetFmt()->GetULSpace();
-// const SvxLRSpaceItem &rLR = GetFmt()->GetLRSpace();
-// aRect.Left( Max( aRect.Left() - long(rLR.GetLeft()), 0L ) );
-// aRect.SSize().Width() += rLR.GetRight();
-// aRect.Top( Max( aRect.Top() - long(rUL.GetUpper()), 0L ) );
-// aRect.SSize().Height()+= rUL.GetLower();
-// return aRect;
-//}
-
-/*************************************************************************
-|*
|* SwFlyFrm::GetContour()
|*
-|* Ersterstellung MA 09. Jan. 97
-|* Letzte Aenderung MA 10. Jan. 97
-|*
|*************************************************************************/
/// OD 16.04.2003 #i13147# - If called for paint and the <SwNoTxtFrm> contains
/// a graphic, load of intrinsic graphic has to be avoided.
@@ -2695,7 +2605,7 @@ sal_Bool SwFlyFrm::GetContour( PolyPolygon& rContour,
pGrfObj = new GraphicObject( pNd->GetGraphic() );
bGrfObjCreated = sal_True;
}
- ASSERT( pGrfObj, "SwFlyFrm::GetContour() - No Graphic/GraphicObject found at <SwNoTxtNode>." );
+ OSL_ENSURE( pGrfObj, "SwFlyFrm::GetContour() - No Graphic/GraphicObject found at <SwNoTxtNode>." );
if ( pGrfObj && pGrfObj->GetType() != GRAPHIC_NONE )
{
if( !pNd->HasContour() )
@@ -2704,7 +2614,7 @@ sal_Bool SwFlyFrm::GetContour( PolyPolygon& rContour,
// during paint. Thus, return (value of <bRet> should be <sal_False>).
if ( pGrfNd && _bForPaint )
{
- ASSERT( false, "SwFlyFrm::GetContour() - No Contour found at <SwNoTxtNode> during paint." );
+ OSL_ENSURE( false, "SwFlyFrm::GetContour() - No Contour found at <SwNoTxtNode> during paint." );
return bRet;
}
pNd->CreateContour();
@@ -2724,8 +2634,6 @@ sal_Bool SwFlyFrm::GetContour( PolyPolygon& rContour,
const MapMode aDispMap( MAP_TWIP );
const MapMode aGrfMap( pGrfObj->GetPrefMapMode() );
const Size aGrfSize( pGrfObj->GetPrefSize() );
- double fScaleX;
- double fScaleY;
Size aOrgSize;
Point aNewPoint;
sal_Bool bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL;
@@ -2737,8 +2645,8 @@ sal_Bool SwFlyFrm::GetContour( PolyPolygon& rContour,
if ( aOrgSize.Width() && aOrgSize.Height() )
{
- fScaleX = (double) aOrig.Width() / aOrgSize.Width();
- fScaleY = (double) aOrig.Height() / aOrgSize.Height();
+ double fScaleX = (double) aOrig.Width() / aOrgSize.Width();
+ double fScaleY = (double) aOrig.Height() / aOrgSize.Height();
for ( sal_uInt16 j = 0, nPolyCount = rContour.Count(); j < nPolyCount; j++ )
{
@@ -2798,13 +2706,13 @@ void SwFlyFrm::InvalidateObjPos()
SwFrmFmt& SwFlyFrm::GetFrmFmt()
{
- ASSERT( GetFmt(),
+ OSL_ENSURE( GetFmt(),
"<SwFlyFrm::GetFrmFmt()> - missing frame format -> crash." );
return *GetFmt();
}
const SwFrmFmt& SwFlyFrm::GetFrmFmt() const
{
- ASSERT( GetFmt(),
+ OSL_ENSURE( GetFmt(),
"<SwFlyFrm::GetFrmFmt()> - missing frame format -> crash." );
return *GetFmt();
}
@@ -2875,3 +2783,4 @@ SwFlyFrmFmt * SwFlyFrm::GetFmt()
return static_cast< SwFlyFrmFmt * >( GetDep() );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 2a5b688e7110..cec345016d11 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,7 +46,6 @@
#include "hints.hxx"
#include "ndtxt.hxx"
#include "swundo.hxx"
-#include "errhdl.hxx"
#include <editeng/ulspitem.hxx>
#include <editeng/lrspitem.hxx>
#include <fmtanchr.hxx>
@@ -58,20 +58,12 @@
#include "crstate.hxx"
#include "sectfrm.hxx"
-// OD 29.10.2003 #113049#
#include <tocntntanchoredobjectposition.hxx>
-// OD 2004-05-24 #i28701#
#include <dcontact.hxx>
#include <sortedobjs.hxx>
-// --> OD 2005-09-29 #125370#,#125957#
#include <layouter.hxx>
-// <--
-// --> OD 2005-11-17 #i56300#
#include <objectformattertxtfrm.hxx>
-// <--
-// --> OD 2006-03-06 #125892#
#include <HandleAnchorNodeChg.hxx>
-// <--
using namespace ::com::sun::star;
@@ -80,9 +72,6 @@ using namespace ::com::sun::star;
|*
|* SwFlyAtCntFrm::SwFlyAtCntFrm()
|*
-|* Ersterstellung MA 11. Nov. 92
-|* Letzte Aenderung MA 09. Apr. 99
-|*
|*************************************************************************/
SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
@@ -92,16 +81,12 @@ SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
bAutoPosition = (FLY_AT_CHAR == pFmt->GetAnchor().GetAnchorId());
}
-// --> OD 2004-06-29 #i28701#
+// #i28701#
TYPEINIT1(SwFlyAtCntFrm,SwFlyFreeFrm);
-// <--
/*************************************************************************
|*
|* SwFlyAtCntFrm::Modify()
|*
-|* Ersterstellung MA 08. Feb. 93
-|* Letzte Aenderung MA 23. Nov. 94
-|*
|*************************************************************************/
void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
@@ -124,7 +109,7 @@ void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
if( pAnch )
{
- ASSERT( pAnch->GetAnchorId() == GetFmt()->GetAnchor().GetAnchorId(),
+ OSL_ENSURE( pAnch->GetAnchorId() == GetFmt()->GetAnchor().GetAnchorId(),
"Unzulaessiger Wechsel des Ankertyps." );
//Abmelden, neuen Anker besorgen und 'dranhaengen.
@@ -150,13 +135,11 @@ void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
//immer noch vom Node einen Frame besorgen. Die Change, dass dies dann
//der richtige ist, ist gut.
const bool bNext = aOldIdx < aNewIdx;
- // --> OD 2006-02-28 #125892#
// consider the case that at found anchor frame candidate already a
// fly frame of the given fly format is registered.
- // --> OD 2006-03-15 #133407# - consider, that <pCntnt> is the already
+ // consider, that <pCntnt> is the already
// the new anchor frame.
bool bFound( aOldIdx == aNewIdx );
- // <--
while ( pCntnt && !bFound )
{
do
@@ -171,7 +154,6 @@ void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
if ( pCntnt )
aOldIdx = *pCntnt->GetNode();
- // --> OD 2006-02-28 #125892#
// check, if at found anchor frame candidate already a fly frame
// of the given fly frame format is registered.
bFound = aOldIdx == aNewIdx;
@@ -190,14 +172,12 @@ void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
}
}
}
- // <--
}
- // <--
if ( !pCntnt )
{
SwCntntNode *pNode = aNewIdx.GetNode().GetCntntNode();
pCntnt = pNode->GetFrm( &pOldAnchor->Frm().Pos(), 0, sal_False );
- ASSERT( pCntnt, "Neuen Anker nicht gefunden" );
+ OSL_ENSURE( pCntnt, "Neuen Anker nicht gefunden" );
}
//Flys haengen niemals an einem Follow sondern immer am
//Master, den suchen wir uns jetzt.
@@ -215,7 +195,7 @@ void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
_InvalidatePos();
InvalidatePage();
SetNotifyBack();
- // --> OD 2004-06-24 #i28701# - reset member <maLastCharRect> and
+ // #i28701# - reset member <maLastCharRect> and
// <mnLastTopOfLine> for to-character anchored objects.
ClearCharRectAndTopOfLine();
}
@@ -246,13 +226,10 @@ void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
|* fall das Attribut des Rahmens auf automatische Ausrichtung oben
|* eingestellt.
|*
-|* Ersterstellung MA 12. Nov. 92
-|* Letzte Aenderung MA 20. Sep. 96
-|*
|*************************************************************************/
//Wir brauchen ein Paar Hilfsklassen zur Kontrolle der Ozillation und ein paar
//Funktionen um die Uebersicht zu gewaehrleisten.
-// OD 2004-08-25 #i3317# - re-factoring of the position stack
+// #i3317# - re-factoring of the position stack
class SwOszControl
{
static const SwFlyFrm *pStk1;
@@ -262,10 +239,9 @@ class SwOszControl
static const SwFlyFrm *pStk5;
const SwFlyFrm *pFly;
- // --> OD 2004-08-25 #i3317#
+ // #i3317#
sal_uInt8 mnPosStackSize;
std::vector<Point*> maObjPositions;
- // <--
public:
SwOszControl( const SwFlyFrm *pFrm );
@@ -281,9 +257,8 @@ const SwFlyFrm *SwOszControl::pStk5 = 0;
SwOszControl::SwOszControl( const SwFlyFrm *pFrm )
: pFly( pFrm ),
- // --> OD 2004-08-25 #i3317#
+ // #i3317#
mnPosStackSize( 20 )
- // <--
{
if ( !SwOszControl::pStk1 )
SwOszControl::pStk1 = pFly;
@@ -309,7 +284,7 @@ SwOszControl::~SwOszControl()
SwOszControl::pStk4 = 0;
else if ( SwOszControl::pStk5 == pFly )
SwOszControl::pStk5 = 0;
- // --> OD 2004-08-25 #i3317#
+ // #i3317#
while ( !maObjPositions.empty() )
{
Point* pPos = maObjPositions.back();
@@ -317,7 +292,6 @@ SwOszControl::~SwOszControl()
maObjPositions.pop_back();
}
- // <--
}
sal_Bool SwOszControl::IsInProgress( const SwFlyFrm *pFly )
@@ -353,7 +327,7 @@ bool SwOszControl::ChkOsz()
{
if ( *(pNewObjPos) == *(*aObjPosIter) )
{
- // position already occured -> oscillation
+ // position already occurred -> oscillation
bOscillationDetected = true;
delete pNewObjPos;
break;
@@ -370,7 +344,6 @@ bool SwOszControl::ChkOsz()
void SwFlyAtCntFrm::MakeAll()
{
- // OD 2004-01-19 #110582#
if ( !GetFmt()->GetDoc()->IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) )
{
return;
@@ -378,7 +351,7 @@ void SwFlyAtCntFrm::MakeAll()
if ( !SwOszControl::IsInProgress( this ) && !IsLocked() && !IsColLocked() )
{
- // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+ // #i28701# - use new method <GetPageFrm()>
if( !GetPageFrm() && GetAnchorFrm() && GetAnchorFrm()->IsInFly() )
{
SwFlyFrm* pFly = AnchorFrm()->FindFlyFrm();
@@ -386,7 +359,7 @@ void SwFlyAtCntFrm::MakeAll()
if( pTmpPage )
pTmpPage->AppendFlyToPage( this );
}
- // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+ // #i28701# - use new method <GetPageFrm()>
if( GetPageFrm() )
{
bSetCompletePaintOnInvalidate = sal_True;
@@ -409,74 +382,68 @@ void SwFlyAtCntFrm::MakeAll()
SwOszControl aOszCntrl( this );
- // --> OD 2005-02-22 #i43255#
- // --> OD 2005-06-07 #i50356# - format the anchor frame, which
+ // #i43255#
+ // #i50356# - format the anchor frame, which
// contains the anchor position. E.g., for at-character anchored
// object this can be the follow frame of the anchor frame.
const bool bFormatAnchor =
!static_cast<const SwTxtFrm*>( GetAnchorFrmContainingAnchPos() )->IsAnyJoinLocked() &&
!ConsiderObjWrapInfluenceOnObjPos() &&
!ConsiderObjWrapInfluenceOfOtherObjs();
- // <--
const SwFrm* pFooter = GetAnchorFrm()->FindFooterOrHeader();
if( pFooter && !pFooter->IsFooterFrm() )
pFooter = NULL;
bool bOsz = false;
sal_Bool bExtra = Lower() && Lower()->IsColumnFrm();
- // --> OD 2004-08-25 #i3317# - boolean, to apply temporarly the
+ // #i3317# - boolean, to apply temporarly the
// 'straightforward positioning process' for the frame due to its
// overlapping with a previous column.
bool bConsiderWrapInfluenceDueToOverlapPrevCol( false );
- // <--
- // --> OD 2004-10-22 #i35911# - boolean, to apply temporarly the
+ // #i35911# - boolean, to apply temporarly the
// 'straightforward positioning process' for the frame due to fact
// that it causes the complete content of its layout environment
// to move forward.
- // --> OD 2005-01-14 #i40444# - extend usage of this boolean:
+ // #i40444# - extend usage of this boolean:
// apply temporarly the 'straightforward positioning process' for
// the frame due to the fact that the frame clears the area for
// the anchor frame, thus it has to move forward.
bool bConsiderWrapInfluenceDueToMovedFwdAnchor( false );
- // <--
do {
SWRECTFN( this )
Point aOldPos( (Frm().*fnRect->fnGetPos)() );
SwFlyFreeFrm::MakeAll();
const bool bPosChgDueToOwnFormat =
aOldPos != (Frm().*fnRect->fnGetPos)();
- // --> OD 2004-08-25 #i3317#
+ // #i3317#
if ( !ConsiderObjWrapInfluenceOnObjPos() &&
OverlapsPrevColumn() )
{
bConsiderWrapInfluenceDueToOverlapPrevCol = true;
}
- // <--
- // OD 2004-05-12 #i28701# - no format of anchor frame, if
+ // #i28701# - no format of anchor frame, if
// wrapping style influence is considered on object positioning
if ( bFormatAnchor )
{
SwTxtFrm* pAnchPosAnchorFrm =
dynamic_cast<SwTxtFrm*>(GetAnchorFrmContainingAnchPos());
- ASSERT( pAnchPosAnchorFrm,
+ OSL_ENSURE( pAnchPosAnchorFrm,
"<SwFlyAtCntFrm::MakeAll()> - anchor frame of wrong type -> crash" );
- // --> OD 2006-01-27 #i58182# - For the usage of new method
+ // #i58182# - For the usage of new method
// <SwObjectFormatterTxtFrm::CheckMovedFwdCondition(..)>
// to check move forward of anchor frame due to the object
// positioning it's needed to know, if the object is anchored
// at the master frame before the anchor frame is formatted.
const bool bAnchoredAtMaster( !pAnchPosAnchorFrm->IsFollow() );
- // <--
- // --> OD 2005-11-17 #i56300#
+ // #i56300#
// perform complete format of anchor text frame and its
// previous frames, which have become invalid due to the
// fly frame format.
SwObjectFormatterTxtFrm::FormatAnchorFrmAndItsPrevs( *pAnchPosAnchorFrm );
- // <--
- // --> OD 2004-10-22 #i35911#
- // --> OD 2005-01-14 #i40444#
- // --> OD 2006-01-27 #i58182# - usage of new method
+ // #i35911#
+ // #i40444#
+ // #i58182# - usage of new method
// <SwObjectFormatterTxtFrm::CheckMovedFwdCondition(..)>
sal_uInt32 nToPageNum( 0L );
bool bDummy( false );
@@ -485,7 +452,7 @@ void SwFlyAtCntFrm::MakeAll()
bAnchoredAtMaster, nToPageNum, bDummy ) )
{
bConsiderWrapInfluenceDueToMovedFwdAnchor = true;
- // --> OD 2005-09-29 #125370#,#125957# - mark anchor text frame
+ // mark anchor text frame
// directly, that it is moved forward by object positioning.
SwTxtFrm* pAnchorTxtFrm( static_cast<SwTxtFrm*>(AnchorFrm()) );
bool bInsert( true );
@@ -504,9 +471,7 @@ void SwFlyAtCntFrm::MakeAll()
SwLayouter::InsertMovedFwdFrm( rDoc, *pAnchorTxtFrm,
nToPageNum );
}
- // <--
}
- // <--
}
if ( aOldPos != (Frm().*fnRect->fnGetPos)() ||
@@ -515,7 +480,6 @@ void SwFlyAtCntFrm::MakeAll()
{
bOsz = aOszCntrl.ChkOsz();
- // --> OD 2006-04-13 #b6403541#
// special loop prevention for dedicated document:
if ( bOsz &&
HasFixSize() && IsClipped() &&
@@ -535,13 +499,12 @@ void SwFlyAtCntFrm::MakeAll()
pFmt->UnlockModify();
bOsz = false;
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwFlyAtCntFrm::MakeAll()> - special loop prevention for dedicated document of b6403541 applied" );
#endif
}
}
}
- // <--
}
if ( bExtra && Lower() && !Lower()->GetValidPosFlag() )
@@ -553,17 +516,15 @@ void SwFlyAtCntFrm::MakeAll()
bExtra = sal_False; // Sicherhaltshalber gibt es nur eine Ehrenrunde.
}
} while ( !IsValid() && !bOsz &&
- // --> OD 2004-08-25 #i3317#
+ // #i3317#
!bConsiderWrapInfluenceDueToOverlapPrevCol &&
- // <--
- // --> OD 2005-01-14 #i40444#
+ // #i40444#
!bConsiderWrapInfluenceDueToMovedFwdAnchor &&
- // <--
GetFmt()->GetDoc()->IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) );
- // --> OD 2004-08-25 #i3317# - instead of attribute change apply
+ // #i3317# - instead of attribute change apply
// temporarly the 'straightforward positioning process'.
- // --> OD 2007-11-29 #i80924#
+ // #i80924#
// handle special case during splitting of table rows
if ( bConsiderWrapInfluenceDueToMovedFwdAnchor &&
GetAnchorFrm()->IsInTab() &&
@@ -584,19 +545,14 @@ void SwFlyAtCntFrm::MakeAll()
}
}
}
- // <--
if ( bOsz || bConsiderWrapInfluenceDueToOverlapPrevCol ||
- // --> OD 2005-01-14 #i40444#
+ // #i40444#
bConsiderWrapInfluenceDueToMovedFwdAnchor )
- // <--
{
SetTmpConsiderWrapInfluence( true );
SetRestartLayoutProcess( true );
- // --> OD 2006-07-24 #b6449874#
SetTmpConsiderWrapInfluenceOfOtherObjs( true );
- // <--
}
- // <--
bSetCompletePaintOnInvalidate = sal_False;
}
}
@@ -604,9 +560,7 @@ void SwFlyAtCntFrm::MakeAll()
/** method to determine, if a <MakeAll()> on the Writer fly frame is possible
- OD 2004-05-11 #i28701#
-
- @author OD
+ #i28701#
*/
bool SwFlyAtCntFrm::IsFormatPossible() const
{
@@ -622,8 +576,6 @@ bool SwFlyAtCntFrm::IsFormatPossible() const
|* Absatzgebundene Objekte.
|* Wird beim Draggen von Absatzgebundenen Objekten zur Ankeranzeige sowie
|* fuer Ankerwechsel benoetigt.
-|* Ersterstellung MA 22. Jun. 93
-|* Letzte Aenderung MA 30. Jan. 95
|*
|*************************************************************************/
@@ -665,7 +617,7 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
const bool bVertL2R = pUp->IsVertLR();
//Dem Textflus folgen.
- // --> OD 2009-01-12 #i70582#
+ // #i70582#
// --> OD 2009-03-05 - adopted for Support for Classical Mongolian Script
const SwTwips nTopForObjPos =
bVert
@@ -677,11 +629,10 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) )
: ( pCnt->Frm().Top() +
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() );
- // <--
if ( pUp->Frm().IsInside( rPt ) )
{
- // OD 26.09.2003 - <rPt> point is inside environment of given content frame
- // --> OD 2009-01-12 #i70582#
+ // <rPt> point is inside environment of given content frame
+ // #i70582#
if( bVert )
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
{
@@ -692,27 +643,26 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
}
else
rRet.nMain = rPt.Y() - nTopForObjPos;
- // <--
return pCnt;
}
else if ( rPt.Y() <= pUp->Frm().Top() )
{
- // OD 26.09.2003 - <rPt> point is above environment of given content frame
- // OD: correct for vertical layout?
+ // <rPt> point is above environment of given content frame
+ // correct for vertical layout?
rRet.nMain = LONG_MAX;
}
else if( rPt.X() < pUp->Frm().Left() &&
rPt.Y() <= ( bVert ? pUp->Frm().Top() : pUp->Frm().Bottom() ) )
{
- // OD 26.09.2003 - <rPt> point is left of environment of given content frame
- // OD: seems not to be correct for vertical layout!?
+ // <rPt> point is left of environment of given content frame
+ // seems not to be correct for vertical layout!?
const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, sal_False, pCnt );
if( !pLay ||
(bVert && (pLay->Frm().Top() + pLay->Prt().Bottom()) <rPt.Y())||
(!bVert && (pLay->Frm().Left() + pLay->Prt().Right())<rPt.X()) )
{
- // OD 26.09.2003 - <rPt> point is in left border of environment
- // --> OD 2009-01-12 #i70582#
+ // <rPt> point is in left border of environment
+ // #i70582#
if( bVert )
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
{
@@ -723,7 +673,6 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
}
else
rRet.nMain = rPt.Y() - nTopForObjPos;
- // <--
return pCnt;
}
else
@@ -731,8 +680,7 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
}
else
{
- //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
- // --> OD 2009-01-12 #i70582#
+ // Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
rRet.nMain = bVert
? ( bVertL2R
? ( (pUp->Frm().Left() + pUp->Prt().Right()) - nTopForObjPos )
@@ -1268,7 +1216,7 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
//fluss sondern in irgendwelchen Raendern steht.
if ( nDownLst.nMain == LONG_MAX && nUpLst.nMain == LONG_MAX )
{
- // #102861# If an OLE objects, which is contained in a fly frame
+ // If an OLE objects, which is contained in a fly frame
// is resized in inplace mode and the new Position is outside the
// fly frame, we do not want to leave our fly frame.
if ( pCnt->IsInFly() )
@@ -1284,9 +1232,6 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
|*
|* SwFlyAtCntFrm::SetAbsPos()
|*
-|* Ersterstellung MA 22. Jun. 93
-|* Letzte Aenderung MA 11. Sep. 98
-|*
|*************************************************************************/
void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
@@ -1334,7 +1279,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
SwTwips nY;
if ( pCnt->Frm().IsInside( aNew ) )
{
- // --> OD 2009-01-12 #i70582#
+ // #i70582#
const SwTwips nTopForObjPos =
bVert
? ( bVertL2R
@@ -1357,7 +1302,6 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
{
nY = rNew.Y() - nTopForObjPos;
}
- // <--
}
else
{
@@ -1406,7 +1350,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
if ( nY == LONG_MAX )
{
- // --> OD 2009-01-12 #i70582#
+ // #i70582#
const SwTwips nTopForObjPos =
bVert
? ( bVertL2R
@@ -1429,7 +1373,6 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
{
nY = rNew.Y() - nTopForObjPos;
}
- // <--
}
SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
@@ -1501,7 +1444,6 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
pPos->nContent.Assign( pCnt->GetNode(), 0 );
}
- // --> OD 2006-02-27 #125892#
// handle change of anchor node:
// if count of the anchor frame also change, the fly frames have to be
// re-created. Thus, delete all fly frames except the <this> before the
@@ -1510,9 +1452,8 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
SwHandleAnchorNodeChg aHandleAnchorNodeChg( *pFmt, aAnch, this );
pFmt->GetDoc()->SetAttr( aAnch, *pFmt );
}
- // <--
}
- // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+ // #i28701# - use new method <GetPageFrm()>
else if ( pTmpPage && pTmpPage != GetPageFrm() )
GetPageFrm()->MoveFly( this, pTmpPage );
@@ -1527,71 +1468,11 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
sal_False );
}
-// OD 2004-08-12 #i32795# - Note: method no longer used in <flyincnt.cxx>
-//void DeepCalc( const SwFrm *pFrm )
-//{
-// if( pFrm->IsSctFrm() ||
-// ( pFrm->IsFlyFrm() && ((SwFlyFrm*)pFrm)->IsFlyInCntFrm() ) )
-// return;
-// const SwFlowFrm *pFlow = SwFlowFrm::CastFlowFrm( pFrm );
-// if( pFlow && pFlow->IsAnyJoinLocked() )
-// return;
-
-// sal_uInt16 nCnt = 0;
-
-// sal_Bool bContinue = sal_False;
-// do
-// {
-// if ( ++nCnt == 10 )
-// {
-// ASSERT( !nCnt, "DeepCalc: Loop detected1?" );
-// break;
-// }
-
-// const sal_Bool bSetComplete = !pFrm->IsValid();
-// const SwRect aOldFrm( pFrm->Frm() );
-// const SwRect aOldPrt( pFrm->Prt() );
-
-// const SwFrm *pUp = pFrm->GetUpper();
-// if ( pUp )
-// {
-// //Nicht weiter wenn der Up ein Fly mit Spalten ist.
-// if( ( !pUp->IsFlyFrm() || !((SwLayoutFrm*)pUp)->Lower() ||
-// !((SwLayoutFrm*)pUp)->Lower()->IsColumnFrm() ) &&
-// !pUp->IsSctFrm() )
-// {
-// SWRECTFN( pUp )
-// const Point aPt( (pUp->Frm().*fnRect->fnGetPos)() );
-// ::DeepCalc( pUp );
-// bContinue = aPt != (pUp->Frm().*fnRect->fnGetPos)();
-// }
-// }
-// else
-// pUp = pFrm;
-
-// pFrm->Calc();
-// if ( bSetComplete && (aOldFrm != pFrm->Frm() || aOldPrt != pFrm->Prt()))
-// pFrm->SetCompletePaint();
-
-// if ( pUp->IsFlyFrm() )
-// {
-// if ( ((SwFlyFrm*)pUp)->IsLocked() ||
-// (((SwFlyFrm*)pUp)->IsFlyAtCntFrm() &&
-// SwOszControl::IsInProgress( (const SwFlyFrm*)pUp )) )
-// {
-// bContinue = sal_False;
-// }
-// }
-// } while ( bContinue );
-//}
-
/** method to assure that anchored object is registered at the correct
page frame
- OD 2004-07-02 #i28701#
+ #i28701#
takes over functionality of deleted method <SwFlyAtCntFrm::AssertPage()>
-
- @author OD
*/
void SwFlyAtCntFrm::RegisterAtCorrectPage()
{
@@ -1609,33 +1490,31 @@ void SwFlyAtCntFrm::RegisterAtCorrectPage()
}
}
-// OD 2004-03-23 #i26791#
+// #i26791#
//void SwFlyAtCntFrm::MakeFlyPos()
void SwFlyAtCntFrm::MakeObjPos()
{
- // OD 02.10.2002 #102646#
// if fly frame position is valid, nothing is to do. Thus, return
if ( bValidPos )
{
return;
}
- // OD 2004-03-24 #i26791# - validate position flag here.
+ // #i26791# - validate position flag here.
bValidPos = sal_True;
- // --> OD 2004-10-22 #i35911# - no calculation of new position, if
+ // #i35911# - no calculation of new position, if
// anchored object is marked that it clears its environment and its
// environment is already cleared.
- // --> OD 2006-01-02 #125977# - before checking for cleared environment
+ // before checking for cleared environment
// check, if member <mpVertPosOrientFrm> is set.
if ( GetVertPosOrientFrm() &&
ClearedEnvironment() && HasClearedEnvironment() )
{
return;
}
- // <--
- // OD 29.10.2003 #113049# - use new class to position object
+ // use new class to position object
objectpositioning::SwToCntntAnchoredObjectPosition
aObjPositioning( *GetVirtDrawObj() );
aObjPositioning.CalcPosition();
@@ -1643,7 +1522,7 @@ void SwFlyAtCntFrm::MakeObjPos()
SetVertPosOrientFrm ( aObjPositioning.GetVertPosOrientFrm() );
}
-// OD 2004-05-12 #i28701#
+// #i28701#
bool SwFlyAtCntFrm::_InvalidationAllowed( const InvalidationType _nInvalid ) const
{
bool bAllowed( SwFlyFreeFrm::_InvalidationAllowed( _nInvalid ) );
@@ -1660,3 +1539,5 @@ bool SwFlyAtCntFrm::_InvalidationAllowed( const InvalidationType _nInvalid ) con
return bAllowed;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index 1ff29c582696..51df36b56ff9 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,9 +49,6 @@ void DeepCalc( const SwFrm *pFrm );
|*
|* SwFlyInCntFrm::SwFlyInCntFrm(), ~SwFlyInCntFrm()
|*
-|* Ersterstellung MA 01. Dec. 92
-|* Letzte Aenderung MA 09. Apr. 99
-|*
|*************************************************************************/
SwFlyInCntFrm::SwFlyInCntFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
SwFlyFrm( pFmt, pAnch )
@@ -83,16 +81,13 @@ TYPEINIT1(SwFlyInCntFrm,SwFlyFrm);
|*
|* SwFlyInCntFrm::SetRefPoint(),
|*
-|* Ersterstellung MA 01. Dec. 92
-|* Letzte Aenderung MA 06. Aug. 95
-|*
|*************************************************************************/
void SwFlyInCntFrm::SetRefPoint( const Point& rPoint,
const Point& rRelAttr,
const Point& rRelPos )
{
// OD 2004-05-27 #i26791# - member <aRelPos> moved to <SwAnchoredObject>
- ASSERT( rPoint != aRef || rRelAttr != GetCurrRelPos(), "SetRefPoint: no change" );
+ OSL_ENSURE( rPoint != aRef || rRelAttr != GetCurrRelPos(), "SetRefPoint: no change" );
SwFlyNotify *pNotify = NULL;
// No notify at a locked fly frame, if a fly frame is locked, there's
// already a SwFlyNotify object on the stack (MakeAll).
@@ -119,9 +114,6 @@ void SwFlyInCntFrm::SetRefPoint( const Point& rPoint,
|*
|* SwFlyInCntFrm::Modify()
|*
-|* Ersterstellung MA 16. Dec. 92
-|* Letzte Aenderung MA 02. Sep. 93
-|*
|*************************************************************************/
void SwFlyInCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
@@ -167,8 +159,6 @@ void SwFlyInCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
|* SwFlyInCntFrm::Format()
|*
|* Beschreibung: Hier wird der Inhalt initial mit Formatiert.
-|* Ersterstellung MA 16. Dec. 92
-|* Letzte Aenderung MA 19. May. 93
|*
|*************************************************************************/
void SwFlyInCntFrm::Format( const SwBorderAttrs *pAttrs )
@@ -192,8 +182,6 @@ void SwFlyInCntFrm::Format( const SwBorderAttrs *pAttrs )
|* Beschreibung Im Unterschied zu anderen Frms wird hier nur die
|* die RelPos berechnet. Die absolute Position wird ausschliesslich
|* per SetAbsPos errechnet.
-|* Ersterstellung MA 03. Dec. 92
-|* Letzte Aenderung MA 12. Apr. 96
|*
|*************************************************************************/
// OD 2004-03-23 #i26791#
@@ -235,9 +223,6 @@ void SwFlyInCntFrm::_ActionOnInvalidation( const InvalidationType _nInvalid )
|*
|* SwFlyInCntFrm::NotifyBackground()
|*
-|* Ersterstellung MA 03. Dec. 92
-|* Letzte Aenderung MA 26. Aug. 93
-|*
|*************************************************************************/
void SwFlyInCntFrm::NotifyBackground( SwPageFrm *, const SwRect& rRect,
PrepareHint eHint)
@@ -252,9 +237,6 @@ void SwFlyInCntFrm::NotifyBackground( SwPageFrm *, const SwRect& rRect,
|*
|* SwFlyInCntFrm::GetRelPos()
|*
-|* Ersterstellung MA 04. Dec. 92
-|* Letzte Aenderung MA 04. Dec. 92
-|*
|*************************************************************************/
const Point SwFlyInCntFrm::GetRelPos() const
{
@@ -266,15 +248,12 @@ const Point SwFlyInCntFrm::GetRelPos() const
|*
|* SwFlyInCntFrm::RegistFlys()
|*
-|* Ersterstellung MA 26. Nov. 93
-|* Letzte Aenderung MA 26. Nov. 93
-|*
|*************************************************************************/
void SwFlyInCntFrm::RegistFlys()
{
// vgl. SwRowFrm::RegistFlys()
SwPageFrm *pPage = FindPageFrm();
- ASSERT( pPage, "Flys ohne Seite anmelden?" );
+ OSL_ENSURE( pPage, "Flys ohne Seite anmelden?" );
::RegistFlys( pPage, this );
}
@@ -282,9 +261,6 @@ void SwFlyInCntFrm::RegistFlys()
|*
|* SwFlyInCntFrm::MakeAll()
|*
-|* Ersterstellung MA 18. Feb. 94
-|* Letzte Aenderung MA 13. Jun. 96
-|*
|*************************************************************************/
void SwFlyInCntFrm::MakeAll()
{
@@ -359,3 +335,4 @@ void SwFlyInCntFrm::MakeAll()
Unlock();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 4a240b9d256d..79aa866bc5c3 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,7 +39,6 @@
#include "ftnfrm.hxx"
#include "frmtool.hxx"
#include "frmfmt.hxx"
-#include "errhdl.hxx"
#include "hints.hxx"
#include "pam.hxx"
#include "sectfrm.hxx"
@@ -52,11 +52,10 @@
#include "ndole.hxx"
#include "tabfrm.hxx"
#include "flyfrms.hxx"
-// OD 22.09.2003 #i18732#
+// #i18732#
#include <fmtfollowtextflow.hxx>
-// OD 29.10.2003 #113049#
#include <environmentofanchoredobject.hxx>
-// OD 2004-05-24 #i28701#
+// #i28701#
#include <sortedobjs.hxx>
#include <viewsh.hxx>
#include <viewimp.hxx>
@@ -69,32 +68,27 @@ using namespace ::com::sun::star;
|*
|* SwFlyFreeFrm::SwFlyFreeFrm(), ~SwFlyFreeFrm()
|*
-|* Ersterstellung MA 03. Dec. 92
-|* Letzte Aenderung MA 09. Apr. 99
-|*
|*************************************************************************/
SwFlyFreeFrm::SwFlyFreeFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
SwFlyFrm( pFmt, pAnch ),
pPage( 0 ),
- // --> OD 2004-11-15 #i34753#
+ // #i34753#
mbNoMakePos( false ),
- // <--
- // --> OD 2004-11-12 #i37068#
+ // #i37068#
mbNoMoveOnCheckClip( false )
- // <--
{
}
SwFlyFreeFrm::~SwFlyFreeFrm()
{
//und Tschuess.
- // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+ // #i28701# - use new method <GetPageFrm()>
if( GetPageFrm() )
{
if( GetFmt()->GetDoc()->IsInDtor() )
{
- // --> OD 2004-06-04 #i29879# - remove also to-frame anchored Writer
+ // #i29879# - remove also to-frame anchored Writer
// fly frame from page.
const bool bRemoveFromPage =
GetPageFrm()->GetSortedObjs() &&
@@ -113,9 +107,8 @@ SwFlyFreeFrm::~SwFlyFreeFrm()
}
}
-// --> OD 2004-06-29 #i28701#
+// #i28701#
TYPEINIT1(SwFlyFreeFrm,SwFlyFrm);
-// <--
/*************************************************************************
|*
|* SwFlyFreeFrm::NotifyBackground()
@@ -126,8 +119,6 @@ TYPEINIT1(SwFlyFreeFrm,SwFlyFrm);
|* ueberlappt werden.
|* Es werden auch die CntntFrms innerhalb von anderen Flys
|* beruecksichtigt.
-|* Ersterstellung MA 03. Dec. 92
-|* Letzte Aenderung MA 26. Aug. 93
|*
|*************************************************************************/
@@ -141,14 +132,10 @@ void SwFlyFreeFrm::NotifyBackground( SwPageFrm *pPageFrm,
|*
|* SwFlyFreeFrm::MakeAll()
|*
-|* Ersterstellung MA 18. Feb. 94
-|* Letzte Aenderung MA 03. Mar. 97
-|*
|*************************************************************************/
void SwFlyFreeFrm::MakeAll()
{
- // OD 2004-01-19 #110582#
if ( !GetFmt()->GetDoc()->IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) )
{
return;
@@ -156,7 +143,7 @@ void SwFlyFreeFrm::MakeAll()
if ( !GetAnchorFrm() || IsLocked() || IsColLocked() )
return;
- // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+ // #i28701# - use new method <GetPageFrm()>
if( !GetPageFrm() && GetAnchorFrm() && GetAnchorFrm()->IsInFly() )
{
SwFlyFrm* pFly = AnchorFrm()->FindFlyFrm();
@@ -175,23 +162,21 @@ void SwFlyFreeFrm::MakeAll()
if ( IsClipped() )
{
bValidSize = bHeightClipped = bWidthClipped = sal_False;
- // --> OD 2004-11-03 #114798# - no invalidation of position,
+ // no invalidation of position,
// if anchored object is anchored inside a Writer fly frame,
// its position is already locked, and it follows the text flow.
- // --> OD 2004-11-15 #i34753# - add condition:
+ // #i34753# - add condition:
// no invalidation of position, if no direct move is requested in <CheckClip(..)>
if ( !IsNoMoveOnCheckClip() &&
!( PositionLocked() &&
GetAnchorFrm()->IsInFly() &&
GetFrmFmt().GetFollowTextFlow().GetValue() ) )
- // <--
{
bValidPos = sal_False;
}
- // <--
}
- // FME 2007-08-30 #i81146# new loop control
+ // #i81146# new loop control
sal_uInt16 nLoopControlRuns = 0;
const sal_uInt16 nLoopControlMax = 10;
@@ -209,21 +194,6 @@ void SwFlyFreeFrm::MakeAll()
if ( !bValidSize )
{
bValidPrtArea = sal_False;
-/*
- // This is also done in the Format function, so I think
- // this code is not necessary anymore:
- const Size aRelSize( CalcRel( *pSz ) );
- const SwTwips nMin = MINFLY + rAttrs.CalcLeftLine()+rAttrs.CalcRightLine();
- long nDiff = bVert ? aRelSize.Height() : aRelSize.Width();
- if( nDiff < nMin )
- nDiff = nMin;
- nDiff -= (aFrm.*fnRect->fnGetWidth)();
- if( nDiff )
- {
- (aFrm.*fnRect->fnAddRight)( nDiff );
- bValidPos = sal_False;
- }
-*/
}
if ( !bValidPrtArea )
@@ -239,14 +209,13 @@ void SwFlyFreeFrm::MakeAll()
if ( !bValidPos )
{
const Point aOldPos( (Frm().*fnRect->fnGetPos)() );
- // OD 2004-03-23 #i26791# - use new method <MakeObjPos()>
- // --> OD 2004-11-15 #i34753# - no positioning, if requested.
+ // #i26791# - use new method <MakeObjPos()>
+ // #i34753# - no positioning, if requested.
if ( IsNoMakePos() )
bValidPos = sal_True;
else
- // OD 2004-03-23 #i26791# - use new method <MakeObjPos()>
+ // #i26791# - use new method <MakeObjPos()>
MakeObjPos();
- // <--
if( aOldPos == (Frm().*fnRect->fnGetPos)() )
{
if( !bValidPos && GetAnchorFrm()->IsInSct() &&
@@ -263,7 +232,7 @@ void SwFlyFreeFrm::MakeAll()
++nLoopControlRuns;
#if OSL_DEBUG_LEVEL > 1
- ASSERT( nLoopControlRuns < nLoopControlMax, "LoopControl in SwFlyFreeFrm::MakeAll" )
+ OSL_ENSURE( nLoopControlRuns < nLoopControlMax, "LoopControl in SwFlyFreeFrm::MakeAll" );
#endif
if ( nLoopControlRuns < nLoopControlMax )
@@ -274,9 +243,9 @@ void SwFlyFreeFrm::MakeAll()
}
Unlock();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
SWRECTFN( this )
- ASSERT( bHeightClipped || ( (Frm().*fnRect->fnGetHeight)() > 0 &&
+ OSL_ENSURE( bHeightClipped || ( (Frm().*fnRect->fnGetHeight)() > 0 &&
(Prt().*fnRect->fnGetHeight)() > 0),
"SwFlyFreeFrm::Format(), flipping Fly." );
@@ -285,14 +254,12 @@ void SwFlyFreeFrm::MakeAll()
/** determines, if direct environment of fly frame has 'auto' size
- OD 07.08.2003 #i17297#, #111066#, #111070#
+ #i17297#
start with anchor frame and search via <GetUpper()> for a header, footer,
row or fly frame stopping at page frame.
return <true>, if such a frame is found and it has 'auto' size.
otherwise <false> is returned.
- @author OD
-
@return boolean indicating, that direct environment has 'auto' size
*/
bool SwFlyFreeFrm::HasEnvironmentAutoSize() const
@@ -325,9 +292,6 @@ bool SwFlyFreeFrm::HasEnvironmentAutoSize() const
|*
|* SwFlyFreeFrm::CheckClip()
|*
-|* Ersterstellung MA 21. Feb. 94
-|* Letzte Aenderung MA 03. Mar. 97
-|*
|*************************************************************************/
void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
@@ -355,10 +319,9 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
if ( bBot || bRig )
{
sal_Bool bAgain = sal_False;
- // --> OD 2004-11-12 #i37068# - no move, if it's requested
+ // #i37068# - no move, if it's requested
if ( bBot && !IsNoMoveOnCheckClip() &&
!GetDrawObjs() && !GetAnchorFrm()->IsInTab() )
- // <--
{
SwFrm* pHeader = FindFooterOrHeader();
// In a header, correction of the position is no good idea.
@@ -423,7 +386,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
bWidthClipped = sal_True;
}
- // OD 06.08.2003 #i17297#, #111066#, #111070# - no proportional
+ // #i17297# - no proportional
// scaling of graphics in environments, which determines its size
// by its content ('auto' size). Otherwise layout loops can occur and
// layout sizes of the environment can be incorrect.
@@ -464,9 +427,10 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
bWidthClipped = sal_True;
}
- // OD 07.08.2003 #i17297#, #111066#, #111070# - reactivate change
+ // #i17297# - reactivate change
// of size attribute for fly frames containing an ole object.
- // FME: 2004-05-19 Added the aFrmRect.HasArea() hack, because
+
+ // Added the aFrmRect.HasArea() hack, because
// the environment of the ole object does not have to be valid
// at this moment, or even worse, it does not have to have a
// resonable size. In this case we do not want to change to
@@ -520,17 +484,13 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
}
}
- // --> OD 2004-10-14 #i26945#
- ASSERT( Frm().Height() >= 0,
+ // #i26945#
+ OSL_ENSURE( Frm().Height() >= 0,
"<SwFlyFreeFrm::CheckClip(..)> - fly frame has negative height now." );
- // <--
}
/** method to determine, if a <MakeAll()> on the Writer fly frame is possible
-
- OD 2005-03-03 #i43771#
-
- @author OD
+ #i43771#
*/
bool SwFlyFreeFrm::IsFormatPossible() const
{
@@ -543,9 +503,6 @@ bool SwFlyFreeFrm::IsFormatPossible() const
|*
|* SwFlyLayFrm::SwFlyLayFrm()
|*
-|* Ersterstellung MA 25. Aug. 92
-|* Letzte Aenderung MA 09. Apr. 99
-|*
|*************************************************************************/
SwFlyLayFrm::SwFlyLayFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
@@ -554,16 +511,12 @@ SwFlyLayFrm::SwFlyLayFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
bLayout = sal_True;
}
-// --> OD 2004-06-29 #i28701#
+// #i28701#
TYPEINIT1(SwFlyLayFrm,SwFlyFreeFrm);
-// <--
/*************************************************************************
|*
|* SwFlyLayFrm::Modify()
|*
-|* Ersterstellung MA 08. Feb. 93
-|* Letzte Aenderung MA 28. Aug. 93
-|*
|*************************************************************************/
void SwFlyLayFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
@@ -586,14 +539,14 @@ void SwFlyLayFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
if( pAnch )
{
- ASSERT( pAnch->GetAnchorId() ==
+ OSL_ENSURE( pAnch->GetAnchorId() ==
GetFmt()->GetAnchor().GetAnchorId(),
"8-) Unzulaessiger Wechsel des Ankertyps." );
//Abmelden, Seite besorgen, an den entsprechenden LayoutFrm
//haengen.
SwRect aOld( GetObjRectWithSpaces() );
- // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+ // #i28701# - use new method <GetPageFrm()>
SwPageFrm *pOldPage = GetPageFrm();
AnchorFrm()->RemoveFly( this );
@@ -607,9 +560,8 @@ void SwFlyLayFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
if ( i == nPgNum )
{
- // --> OD 2005-06-09 #i50432# - adjust synopsis of <PlaceFly(..)>
+ // #i50432# - adjust synopsis of <PlaceFly(..)>
pTmpPage->PlaceFly( this, 0 );
- // <--
}
}
if( !pTmpPage )
@@ -630,7 +582,7 @@ void SwFlyLayFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
pTmp->AppendFly( this );
}
}
- // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+ // #i28701# - use new method <GetPageFrm()>
if ( pOldPage && pOldPage != GetPageFrm() )
NotifyBackground( pOldPage, aOld, PREP_FLY_LEAVE );
SetCompletePaint();
@@ -645,9 +597,6 @@ void SwFlyLayFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
|*
|* SwPageFrm::AppendFly()
|*
-|* Ersterstellung MA 10. Oct. 92
-|* Letzte Aenderung MA 08. Jun. 96
-|*
|*************************************************************************/
void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
@@ -669,7 +618,7 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
}
SdrObject* pObj = pNew->GetVirtDrawObj();
- ASSERT( pNew->GetAnchorFrm(), "Fly without Anchor" );
+ OSL_ENSURE( pNew->GetAnchorFrm(), "Fly without Anchor" );
const SwFlyFrm* pFly = pNew->GetAnchorFrm()->FindFlyFrm();
if ( pFly && pObj->GetOrdNum() < pFly->GetVirtDrawObj()->GetOrdNum() )
{
@@ -695,18 +644,17 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
#endif
pSortedObjs->Insert( *pNew );
#if OSL_DEBUG_LEVEL > 1
- ASSERT( bSucessInserted, "Fly nicht in Sorted eingetragen." )
+ OSL_ENSURE( bSucessInserted, "Fly nicht in Sorted eingetragen." );
(void) bSucessInserted;
#endif
- // --> OD 2008-04-22 #i87493#
- ASSERT( pNew->GetPageFrm() == 0 || pNew->GetPageFrm() == this,
+ // #i87493#
+ OSL_ENSURE( pNew->GetPageFrm() == 0 || pNew->GetPageFrm() == this,
"<SwPageFrm::AppendFlyToPage(..)> - anchored fly frame seems to be registered at another page frame. Serious defect -> please inform OD." );
- // <--
- // --> OD 2004-06-30 #i28701# - use new method <SetPageFrm(..)>
+ // #i28701# - use new method <SetPageFrm(..)>
pNew->SetPageFrm( this );
pNew->InvalidatePage( this );
- // OD 2004-05-17 #i28701#
+ // #i28701#
pNew->UnlockPosition();
// Notify accessible layout. That's required at this place for
@@ -721,7 +669,7 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
}
}
- // --> OD 2004-06-09 #i28701# - correction: consider also drawing objects
+ // #i28701# - correction: consider also drawing objects
if ( pNew->GetDrawObjs() )
{
SwSortedObjs &rObjs = *pNew->GetDrawObjs();
@@ -731,14 +679,13 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
if ( pTmpObj->ISA(SwFlyFrm) )
{
SwFlyFrm* pTmpFly = static_cast<SwFlyFrm*>(pTmpObj);
- // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+ // #i28701# - use new method <GetPageFrm()>
if ( pTmpFly->IsFlyFreeFrm() && !pTmpFly->GetPageFrm() )
AppendFlyToPage( pTmpFly );
}
else if ( pTmpObj->ISA(SwAnchoredDrawObject) )
{
- // --> OD 2008-04-22 #i87493#
-// AppendDrawObjToPage( *pTmpObj );
+ // #i87493#
if ( pTmpObj->GetPageFrm() != this )
{
if ( pTmpObj->GetPageFrm() != 0 )
@@ -747,7 +694,6 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
}
AppendDrawObjToPage( *pTmpObj );
}
- // <--
}
}
}
@@ -757,9 +703,6 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
|*
|* SwPageFrm::RemoveFly()
|*
-|* Ersterstellung MA 10. Oct. 92
-|* Letzte Aenderung MA 26. Aug. 96
-|*
|*************************************************************************/
void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
@@ -802,7 +745,7 @@ void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
{ DELETEZ( pSortedObjs );
}
}
- // --> OD 2004-06-30 #i28701# - use new method <SetPageFrm(..)>
+ // #i28701# - use new method <SetPageFrm(..)>
pToRemove->SetPageFrm( 0L );
}
@@ -810,9 +753,6 @@ void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
|*
|* SwPageFrm::MoveFly
|*
-|* Ersterstellung MA 25. Jan. 97
-|* Letzte Aenderung MA 25. Jan. 97
-|*
|*************************************************************************/
void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
@@ -866,16 +806,16 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
#endif
pDest->GetSortedObjs()->Insert( *pToMove );
#if OSL_DEBUG_LEVEL > 1
- ASSERT( bSucessInserted, "Fly nicht in Sorted eingetragen." )
+ OSL_ENSURE( bSucessInserted, "Fly nicht in Sorted eingetragen." );
(void) bSucessInserted;
#endif
- // --> OD 2004-06-30 #i28701# - use new method <SetPageFrm(..)>
+ // #i28701# - use new method <SetPageFrm(..)>
pToMove->SetPageFrm( pDest );
pToMove->InvalidatePage( pDest );
pToMove->SetNotifyBack();
pDest->InvalidateFlyCntnt();
- // OD 2004-05-17 #i28701#
+ // #i28701#
pToMove->UnlockPosition();
// Notify accessible layout. That's required at this place for
@@ -889,7 +829,7 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
->AddAccessibleFrm( pToMove );
}
- // --> OD 2004-06-09 #i28701# - correction: move lowers of Writer fly frame
+ // #i28701# - correction: move lowers of Writer fly frame
if ( pToMove->GetDrawObjs() )
{
SwSortedObjs &rObjs = *pToMove->GetDrawObjs();
@@ -901,7 +841,7 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pObj);
if ( pFly->IsFlyFreeFrm() )
{
- // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+ // #i28701# - use new method <GetPageFrm()>
SwPageFrm* pPageFrm = pFly->GetPageFrm();
if ( pPageFrm )
pPageFrm->MoveFly( pFly, pDest );
@@ -922,14 +862,14 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
|*
|* SwPageFrm::AppendDrawObjToPage(), RemoveDrawObjFromPage()
|*
-|* --> OD 2004-07-02 #i28701# - new methods
+|* #i28701# - new methods
|*
|*************************************************************************/
void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
{
if ( !_rNewObj.ISA(SwAnchoredDrawObject) )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"SwPageFrm::AppendDrawObjToPage(..) - anchored object of unexcepted type -> object not appended" );
return;
}
@@ -939,7 +879,7 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
((SwRootFrm*)GetUpper())->InvalidateBrowseWidth();
}
- ASSERT( _rNewObj.GetAnchorFrm(), "anchored draw object without anchor" );
+ OSL_ENSURE( _rNewObj.GetAnchorFrm(), "anchored draw object without anchor" );
const SwFlyFrm* pFlyFrm = _rNewObj.GetAnchorFrm()->FindFlyFrm();
if ( pFlyFrm &&
_rNewObj.GetDrawObj()->GetOrdNum() < pFlyFrm->GetVirtDrawObj()->GetOrdNum() )
@@ -963,15 +903,14 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
}
if ( !pSortedObjs->Insert( _rNewObj ) )
{
-#ifdef DBG_UTIL
- ASSERT( pSortedObjs->Contains( _rNewObj ),
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( pSortedObjs->Contains( _rNewObj ),
"Drawing object not appended into list <pSortedObjs>." );
#endif
}
- // --> OD 2008-04-22 #i87493#
- ASSERT( _rNewObj.GetPageFrm() == 0 || _rNewObj.GetPageFrm() == this,
+ // #i87493#
+ OSL_ENSURE( _rNewObj.GetPageFrm() == 0 || _rNewObj.GetPageFrm() == this,
"<SwPageFrm::AppendDrawObjToPage(..)> - anchored draw object seems to be registered at another page frame. Serious defect -> please inform OD." );
- // <--
_rNewObj.SetPageFrm( this );
// invalidate page in order to force a reformat of object layout of the page.
@@ -982,7 +921,7 @@ void SwPageFrm::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj )
{
if ( !_rToRemoveObj.ISA(SwAnchoredDrawObject) )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"SwPageFrm::RemoveDrawObjFromPage(..) - anchored object of unexcepted type -> object not removed" );
return;
}
@@ -1012,17 +951,14 @@ void SwPageFrm::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj )
|*
|* SwPageFrm::PlaceFly
|*
-|* Ersterstellung MA 08. Feb. 93
-|* Letzte Aenderung MA 27. Feb. 93
-|*
|*************************************************************************/
-// --> OD 2005-06-09 #i50432# - adjust method description and synopsis.
+// #i50432# - adjust method description and synopsis.
void SwPageFrm::PlaceFly( SwFlyFrm* pFly, SwFlyFrmFmt* pFmt )
{
- // --> OD 2005-06-09 #i50432# - consider the case that page is an empty page:
+ // #i50432# - consider the case that page is an empty page:
// In this case append the fly frame at the next page
- ASSERT( !IsEmptyPage() || GetNext(),
+ OSL_ENSURE( !IsEmptyPage() || GetNext(),
"<SwPageFrm::PlaceFly(..)> - empty page with no next page! -> fly frame appended at empty page" );
if ( IsEmptyPage() && GetNext() )
{
@@ -1035,32 +971,28 @@ void SwPageFrm::PlaceFly( SwFlyFrm* pFly, SwFlyFrmFmt* pFmt )
if ( pFly )
AppendFly( pFly );
else
- { ASSERT( pFmt, ":-( kein Format fuer Fly uebergeben." );
+ { OSL_ENSURE( pFmt, ":-( kein Format fuer Fly uebergeben." );
pFly = new SwFlyLayFrm( (SwFlyFrmFmt*)pFmt, this );
AppendFly( pFly );
::RegistFlys( this, pFly );
}
}
- // <--
}
/*************************************************************************
|*
|* ::CalcClipRect
|*
-|* Ersterstellung AMA 24. Sep. 96
-|* Letzte Aenderung MA 18. Dec. 96
-|*
|*************************************************************************/
-// OD 22.09.2003 #i18732# - adjustments for following text flow or not
+// #i18732# - adjustments for following text flow or not
// AND alignment at 'page areas' for to paragraph/to character anchored objects
-// OD 06.11.2003 #i22305# - adjustment for following text flow
+// #i22305# - adjustment for following text flow
// for to frame anchored objects
-// OD 2004-06-02 #i29778# - Because the calculation of the position of the
+// #i29778# - Because the calculation of the position of the
// floating screen object (Writer fly frame or drawing object) doesn't perform
// a calculation on its upper frames and its anchor frame, a calculation of
// the upper frames in this method no longer sensible.
-// --> OD 2004-07-06 #i28701# - if document compatibility option 'Consider
+// #i28701# - if document compatibility option 'Consider
// wrapping style influence on object positioning' is ON, the clip area
// corresponds to the one as the object doesn't follows the text flow.
sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
@@ -1070,16 +1002,15 @@ sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
{
const SwFlyFrm* pFly = ((const SwVirtFlyDrawObj*)pSdrObj)->GetFlyFrm();
const bool bFollowTextFlow = pFly->GetFmt()->GetFollowTextFlow().GetValue();
- // --> OD 2004-07-06 #i28701#
+ // #i28701#
const bool bConsiderWrapOnObjPos =
pFly->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION);
- // <--
const SwFmtVertOrient &rV = pFly->GetFmt()->GetVertOrient();
if( pFly->IsFlyLayFrm() )
{
const SwFrm* pClip;
- // OD 06.11.2003 #i22305#
- // --> OD 2004-07-06 #i28701#
+ // #i22305#
+ // #i28701#
if ( !bFollowTextFlow || bConsiderWrapOnObjPos )
{
pClip = pFly->GetAnchorFrm()->FindPageFrm();
@@ -1110,12 +1041,12 @@ sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
}
else if( pFly->IsFlyAtCntFrm() )
{
- // OD 22.09.2003 #i18732# - consider following text flow or not
+ // #i18732# - consider following text flow or not
// AND alignment at 'page areas'
const SwFrm* pVertPosOrientFrm = pFly->GetVertPosOrientFrm();
if ( !pVertPosOrientFrm )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"::CalcClipRect(..) - frame, vertical position is oriented at, is missing .");
pVertPosOrientFrm = pFly->GetAnchorFrm();
}
@@ -1125,9 +1056,9 @@ sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
const SwLayoutFrm* pClipFrm = pVertPosOrientFrm->FindPageFrm();
rRect = bMove ? pClipFrm->GetUpper()->Frm()
: pClipFrm->Frm();
- // --> OD 2004-10-14 #i26945# - consider that a table, during
+ // #i26945# - consider that a table, during
// its format, can exceed its upper printing area bottom.
- // Thus, enlarge the clip rectangle, if such a case occured
+ // Thus, enlarge the clip rectangle, if such a case occurred
if ( pFly->GetAnchorFrm()->IsInTab() )
{
const SwTabFrm* pTabFrm = const_cast<SwFlyFrm*>(pFly)
@@ -1135,7 +1066,7 @@ sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
SwRect aTmp( pTabFrm->Prt() );
aTmp += pTabFrm->Frm().Pos();
rRect.Union( aTmp );
- // --> OD 2005-03-30 #i43913# - consider also the cell frame
+ // #i43913# - consider also the cell frame
const SwFrm* pCellFrm = const_cast<SwFlyFrm*>(pFly)
->GetAnchorFrmContainingAnchPos()->GetUpper();
while ( pCellFrm && !pCellFrm->IsCellFrm() )
@@ -1148,13 +1079,12 @@ sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
aTmp += pCellFrm->Frm().Pos();
rRect.Union( aTmp );
}
- // <--
}
}
else if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_FRAME ||
rV.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA )
{
- // OD 29.10.2003 #113049# - new class <SwEnvironmentOfAnchoredObject>
+ // new class <SwEnvironmentOfAnchoredObject>
objectpositioning::SwEnvironmentOfAnchoredObject
aEnvOfObj( bFollowTextFlow );
const SwLayoutFrm& rVertClipFrm =
@@ -1182,10 +1112,9 @@ sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
}
else
{
- // --> OD 2004-10-11 #i26945#
+ // #i26945#
const SwFrm *pClip =
const_cast<SwFlyFrm*>(pFly)->GetAnchorFrmContainingAnchPos();
- // <--
SWRECTFN( pClip )
const SwLayoutFrm *pUp = pClip->GetUpper();
const SwFrm *pCell = pUp->IsCellFrm() ? pUp : 0;
@@ -1260,8 +1189,7 @@ sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
const SwFrm *pTab = pUp->FindTabFrm();
(rRect.*fnRect->fnSetBottom)(
(pTab->GetUpper()->*fnRect->fnGetPrtBottom)() );
- // OD 08.08.2003 #110978# - expand to left and right
- // cell border
+ // expand to left and right cell border
rRect.Left ( pUp->Frm().Left() );
rRect.Width( pUp->Frm().Width() );
}
@@ -1297,7 +1225,7 @@ sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
}
else if ( pUp->GetUpper()->IsPageFrm() )
{
- // #111909# Objects anchored as character may exceed right margin
+ // Objects anchored as character may exceed right margin
// of body frame:
(rRect.*fnRect->fnSetRight)( (pUp->GetUpper()->Frm().*fnRect->fnGetRight)() );
}
@@ -1336,7 +1264,7 @@ sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
const SwFrm* pAnchorFrm = pC->GetAnchorFrm( pSdrObj );
if( !pAnchorFrm )
{
- ASSERT( false, "<::CalcClipRect(..)> - missing anchor frame." );
+ OSL_ENSURE( false, "<::CalcClipRect(..)> - missing anchor frame." );
((SwDrawContact*)pC)->ConnectToLayout();
pAnchorFrm = pC->GetAnchorFrm();
}
@@ -1360,7 +1288,7 @@ sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
}
else
{
- // OD 2004-04-13 #i26791# - value of <nTmpH> is needed to
+ // #i26791# - value of <nTmpH> is needed to
// calculate value of <nTop>.
nTmpH = bVert ? pSdrObj->GetCurrentBoundRect().GetWidth() :
pSdrObj->GetCurrentBoundRect().GetHeight();
@@ -1372,9 +1300,9 @@ sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
}
else
{
- // OD 23.06.2003 #108784# - restrict clip rectangle for drawing
+ // restrict clip rectangle for drawing
// objects in header/footer to the page frame.
- // OD 2004-03-29 #i26791#
+ // #i26791#
const SwFrm* pAnchorFrm = pC->GetAnchorFrm( pSdrObj );
if ( pAnchorFrm && pAnchorFrm->FindFooterOrHeader() )
{
@@ -1390,3 +1318,5 @@ sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
}
return bRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/flypos.cxx b/sw/source/core/layout/flypos.cxx
index 8d3b517c2efc..6ac6bf772502 100644
--- a/sw/source/core/layout/flypos.cxx
+++ b/sw/source/core/layout/flypos.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110,3 +111,4 @@ sal_Bool SwPosFlyFrm::operator<( const SwPosFlyFrm& rPosFly )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 3d820e7a1e69..0d3f867d0a6b 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110,9 +111,6 @@ sal_Bool StackHack::bLocked = sal_False;
|*
|* SwFrmNotify::SwFrmNotify()
|*
-|* Ersterstellung MA 27. Nov. 92
-|* Letzte Aenderung MA 09. Apr. 97
-|*
|*************************************************************************/
SwFrmNotify::SwFrmNotify( SwFrm *pF ) :
@@ -145,9 +143,6 @@ SwFrmNotify::SwFrmNotify( SwFrm *pF ) :
|*
|* SwFrmNotify::~SwFrmNotify()
|*
-|* Ersterstellung MA 27. Nov. 92
-|* Letzte Aenderung MA 09. Apr. 97
-|*
|*************************************************************************/
SwFrmNotify::~SwFrmNotify()
@@ -329,7 +324,7 @@ SwFrmNotify::~SwFrmNotify()
}
if ( pPageFrm != pFlyPageFrm )
{
- ASSERT( pFlyPageFrm, "~SwFrmNotify: Fly from Nowhere" );
+ OSL_ENSURE( pFlyPageFrm, "~SwFrmNotify: Fly from Nowhere" );
if( pFlyPageFrm )
pFlyPageFrm->MoveFly( pFlyFrm, pPageFrm );
else
@@ -401,7 +396,7 @@ SwFrmNotify::~SwFrmNotify()
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwCntntNotify::~SwCntntNotify()> - unknown anchored object type. Please inform OD." );
}
}
@@ -460,9 +455,6 @@ SwFrmNotify::~SwFrmNotify()
|*
|* SwLayNotify::SwLayNotify()
|*
-|* Ersterstellung MA 17. Nov. 92
-|* Letzte Aenderung MA 03. Jun. 93
-|*
|*************************************************************************/
@@ -476,9 +468,6 @@ SwLayNotify::SwLayNotify( SwLayoutFrm *pLayFrm ) :
|*
|* SwLayNotify::~SwLayNotify()
|*
-|* Ersterstellung MA 17. Nov. 92
-|* Letzte Aenderung MA 13. Jun. 96
-|*
|*************************************************************************/
// OD 2004-05-11 #i28701# - local method to invalidate the position of all
@@ -692,9 +681,6 @@ SwLayNotify::~SwLayNotify()
|*
|* SwFlyNotify::SwFlyNotify()
|*
-|* Ersterstellung MA 17. Nov. 92
-|* Letzte Aenderung MA 26. Aug. 93
-|*
|*************************************************************************/
SwFlyNotify::SwFlyNotify( SwFlyFrm *pFlyFrm ) :
@@ -711,9 +697,6 @@ SwFlyNotify::SwFlyNotify( SwFlyFrm *pFlyFrm ) :
|*
|* SwFlyNotify::~SwFlyNotify()
|*
-|* Ersterstellung MA 17. Nov. 92
-|* Letzte Aenderung MA 09. Nov. 95
-|*
|*************************************************************************/
SwFlyNotify::~SwFlyNotify()
@@ -827,9 +810,6 @@ SwFlyNotify::~SwFlyNotify()
|*
|* SwCntntNotify::SwCntntNotify()
|*
-|* Ersterstellung MA 24. Nov. 92
-|* Letzte Aenderung MA 16. May. 95
-|*
|*************************************************************************/
SwCntntNotify::SwCntntNotify( SwCntntFrm *pCntntFrm ) :
@@ -862,9 +842,6 @@ SwCntntNotify::SwCntntNotify( SwCntntFrm *pCntntFrm ) :
|*
|* SwCntntNotify::~SwCntntNotify()
|*
-|* Ersterstellung MA 24. Nov. 92
-|* Letzte Aenderung MA 09. Apr. 97
-|*
|*************************************************************************/
SwCntntNotify::~SwCntntNotify()
@@ -887,7 +864,7 @@ SwCntntNotify::~SwCntntNotify()
SwLayoutFrm* pCell = pCnt->GetUpper();
while( !pCell->IsCellFrm() && pCell->GetUpper() )
pCell = pCell->GetUpper();
- ASSERT( pCell->IsCellFrm(), "Where's my cell?" );
+ OSL_ENSURE( pCell->IsCellFrm(), "Where's my cell?" );
if ( text::VertOrientation::NONE != pCell->GetFmt()->GetVertOrient().GetVertOrient() )
pCell->InvalidatePrt(); //fuer vertikale Ausrichtung.
}
@@ -953,7 +930,7 @@ SwCntntNotify::~SwCntntNotify()
(pNd->GetOLEObj().IsOleRef() ||
pNd->IsOLESizeInvalid()) )
{
- ASSERT( pCnt->IsInFly(), "OLE not in FlyFrm" );
+ OSL_ENSURE( pCnt->IsInFly(), "OLE not in FlyFrm" );
SwFlyFrm *pFly = pCnt->FindFlyFrm();
svt::EmbeddedObjectRef& xObj = pNd->GetOLEObj().GetObject();
SwFEShell *pFESh = 0;
@@ -975,7 +952,7 @@ SwCntntNotify::~SwCntntNotify()
// The layout is calculated _before_ calling PrtOLENotify,
// and the OLE objects are not invalidated during import.
// Therefore I added the condition !IsUpdateExpFld,
- // have a look at the occurence of CalcLayout in
+ // have a look at the occurrence of CalcLayout in
// uiview/view.cxx.
if ( !pNd->IsOLESizeInvalid() &&
!pSh->GetDoc()->IsUpdateExpFld() )
@@ -1036,7 +1013,6 @@ SwCntntNotify::~SwCntntNotify()
continue; //#60878# nicht etwa zeichengebundene.
}
- sal_Bool bCheckPos = sal_False;
if ( rAnch.GetCntntAnchor() )
{
if ( !pIdx )
@@ -1045,10 +1021,9 @@ SwCntntNotify::~SwCntntNotify()
}
if ( rAnch.GetCntntAnchor()->nNode == *pIdx )
{
- bCheckPos = sal_True;
if (FLY_AT_PAGE == rAnch.GetAnchorId())
{
- ASSERT( false, "<SwCntntNotify::~SwCntntNotify()> - to page anchored object with content position. Please inform OD." );
+ OSL_ENSURE( false, "<SwCntntNotify::~SwCntntNotify()> - to page anchored object with content position. Please inform OD." );
SwFmtAnchor aAnch( rAnch );
aAnch.SetAnchor( 0 );
aAnch.SetPageNum( pPage->GetPhyPageNum() );
@@ -1113,8 +1088,6 @@ SwCntntNotify::~SwCntntNotify()
|* Beschreibung Hilfsfunktionen, die friend von irgendwem sind, damit
|* nicht immer gleich 'ne ganze Klasse befreundet werden
|* muss.
-|* Ersterstellung MA 13. Apr. 93
-|* Letzte Aenderung MA 11. May. 95
|*
|*************************************************************************/
@@ -1144,7 +1117,7 @@ void AppendObjs( const SwSpzFrmFmts *pTbl, sal_uLong nIndex,
SdrObject* pSdrObj = 0;
if ( bSdrObj && 0 == (pSdrObj = pFmt->FindSdrObject()) )
{
- ASSERT( !bSdrObj, "DrawObject not found." );
+ OSL_ENSURE( !bSdrObj, "DrawObject not found." );
pFmt->GetDoc()->DelFrmFmt( pFmt );
--i;
continue;
@@ -1219,7 +1192,7 @@ sal_Bool MA_FASTCALL lcl_ObjConnected( SwFrmFmt *pFmt )
*/
bool lcl_InHeaderOrFooter( SwFrmFmt& _rFmt )
{
- ASSERT( lcl_ObjConnected( &_rFmt ),
+ OSL_ENSURE( lcl_ObjConnected( &_rFmt ),
"::lcl_InHeaderOrFooter(..) - <SwFrmFmt> has no connected object" );
bool bRetVal = false;
@@ -1373,7 +1346,7 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
( !pLay->IsInTab() || pSct->IsInTab() ) )
{
pActualSection = new SwActualSection( 0, pSct, 0 );
- ASSERT( !pLay->Lower() || !pLay->Lower()->IsColumnFrm(),
+ OSL_ENSURE( !pLay->Lower() || !pLay->Lower()->IsColumnFrm(),
"_InsertCnt: Wrong Call" );
}
}
@@ -1576,8 +1549,8 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
}
else if ( pNd->IsEndNode() && pNd->StartOfSectionNode()->IsSectionNode() )
{
- ASSERT( pActualSection, "Sectionende ohne Anfang?" );
- ASSERT( pActualSection->GetSectionNode() == pNd->StartOfSectionNode(),
+ OSL_ENSURE( pActualSection, "Sectionende ohne Anfang?" );
+ OSL_ENSURE( pActualSection->GetSectionNode() == pNd->StartOfSectionNode(),
"Sectionende mit falschen Start Node?" );
//Section schliessen, ggf. die umgebende Section wieder
@@ -1692,11 +1665,9 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
delete pPageMaker;
if( pDoc->GetLayoutCache() )
{
-#ifdef DBG_UTIL
#if OSL_DEBUG_LEVEL > 1
pDoc->GetLayoutCache()->CompareLayout( *pDoc );
#endif
-#endif
pDoc->GetLayoutCache()->ClearImpl();
}
}
@@ -1760,14 +1731,14 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
SwFrm *pMove = pFrm;
SwFrm *pPrev = pFrm->GetPrev();
SwFlowFrm *pTmp = SwFlowFrm::CastFlowFrm( pMove );
- ASSERT( pTmp, "Missing FlowFrm" );
+ OSL_ENSURE( pTmp, "Missing FlowFrm" );
if ( bApres )
{
// Wir wollen, dass der Rest der Seite leer ist, d.h.
// der naechste muss auf die naechste Seite wandern.
// Dieser kann auch in der naechsten Spalte stehen!
- ASSERT( !pTmp->HasFollow(), "Follows forbidden" );
+ OSL_ENSURE( !pTmp->HasFollow(), "Follows forbidden" );
pPrev = pFrm;
// Wenn unser umgebender SectionFrm einen Next besitzt,
// so soll dieser ebenfalls gemoved werden!
@@ -1822,7 +1793,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
}
else
{
- ASSERT( !pTmp->IsFollow(), "Follows really forbidden" );
+ OSL_ENSURE( !pTmp->IsFollow(), "Follows really forbidden" );
// Bei Bereichen muss natuerlich der Inhalt auf die Reise
// geschickt werden.
if( pMove->IsSctFrm() )
@@ -1927,9 +1898,6 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
|*
|* SwBorderAttrs::Ctor, DTor
|*
-|* Ersterstellung MA 19. May. 93
-|* Letzte Aenderung MA 25. Jan. 97
-|*
|*************************************************************************/
SwBorderAttrs::SwBorderAttrs( const SwModify *pMod, const SwFrm *pConstructor ) :
@@ -1983,8 +1951,6 @@ SwBorderAttrs::~SwBorderAttrs()
|* der Sicherheitsabstand wird nur einkalkuliert, wenn Umrandung und/oder
|* Schatten im Spiel sind; er soll vermeiden, dass aufgrund der
|* groben physikalischen Gegebenheiten Raender usw. uebermalt werden.
-|* Ersterstellung MA 19. May. 93
-|* Letzte Aenderung MA 08. Jul. 93
|*
|*************************************************************************/
@@ -2002,8 +1968,9 @@ void SwBorderAttrs::_CalcBottom()
long SwBorderAttrs::CalcRight( const SwFrm* pCaller ) const
{
- long nRight;
+ long nRight=0;
+ if (!pCaller->IsTxtFrm() || !((SwTxtFrm*)pCaller)->GetTxtNode()->GetDoc()->get(IDocumentSettingAccess::INVERT_BORDER_SPACING)) {
// OD 23.01.2003 #106895# - for cell frame in R2L text direction the left
// and right border are painted on the right respectively left.
if ( pCaller->IsCellFrm() && pCaller->IsRightToLeft() )
@@ -2011,33 +1978,34 @@ long SwBorderAttrs::CalcRight( const SwFrm* pCaller ) const
else
nRight = CalcRightLine();
+ }
// for paragraphs, "left" is "before text" and "right" is "after text"
if ( pCaller->IsTxtFrm() && pCaller->IsRightToLeft() )
nRight += rLR.GetLeft();
else
nRight += rLR.GetRight();
- // --> OD 2008-01-21 #newlistlevelattrs#
// correction: retrieve left margin for numbering in R2L-layout
if ( pCaller->IsTxtFrm() && pCaller->IsRightToLeft() )
{
nRight += ((SwTxtFrm*)pCaller)->GetTxtNode()->GetLeftMarginWithNum();
}
- // <--
return nRight;
}
long SwBorderAttrs::CalcLeft( const SwFrm *pCaller ) const
{
- long nLeft;
+ long nLeft=0;
+ if (!pCaller->IsTxtFrm() || !((SwTxtFrm*)pCaller)->GetTxtNode()->GetDoc()->get(IDocumentSettingAccess::INVERT_BORDER_SPACING)) {
// OD 23.01.2003 #106895# - for cell frame in R2L text direction the left
// and right border are painted on the right respectively left.
if ( pCaller->IsCellFrm() && pCaller->IsRightToLeft() )
nLeft = CalcRightLine();
else
nLeft = CalcLeftLine();
+ }
// for paragraphs, "left" is "before text" and "right" is "after text"
if ( pCaller->IsTxtFrm() && pCaller->IsRightToLeft() )
@@ -2045,11 +2013,10 @@ long SwBorderAttrs::CalcLeft( const SwFrm *pCaller ) const
else
nLeft += rLR.GetLeft();
- // --> OD 2008-01-21 #newlistlevelattrs#
+
// correction: do not retrieve left margin for numbering in R2L-layout
// if ( pCaller->IsTxtFrm() )
if ( pCaller->IsTxtFrm() && !pCaller->IsRightToLeft() )
- // <--
{
nLeft += ((SwTxtFrm*)pCaller)->GetTxtNode()->GetLeftMarginWithNum();
}
@@ -2066,8 +2033,6 @@ long SwBorderAttrs::CalcLeft( const SwFrm *pCaller ) const
|* Es kann auch ohne Linien ein Abstand erwuenscht sein,
|* dieser wird dann nicht vom Attribut sondern hier
|* beruecksichtigt (bBorderDist, z.B. fuer Zellen).
-|* Ersterstellung MA 21. May. 93
-|* Letzte Aenderung MA 07. Jun. 99
|*
|*************************************************************************/
@@ -2111,9 +2076,6 @@ void SwBorderAttrs::_CalcRightLine()
|*
|* SwBorderAttrs::_IsLine()
|*
-|* Ersterstellung MA 29. Sep. 94
-|* Letzte Aenderung MA 29. Sep. 94
-|*
|*************************************************************************/
void SwBorderAttrs::_IsLine()
@@ -2141,9 +2103,6 @@ void SwBorderAttrs::_IsLine()
|* 3. Die Umrandungen links und rechts vor Vorgaenger bzw. Nachfolger
|* sind identisch.
|*
-|* Ersterstellung MA 22. Mar. 95
-|* Letzte Aenderung MA 22. May. 95
-|*
|*************************************************************************/
inline int CmpLines( const SvxBorderLine *pL1, const SvxBorderLine *pL2 )
{
@@ -2313,9 +2272,6 @@ void SwBorderAttrs::_GetBottomLine( const SwFrm& _rFrm )
|*
|* SwBorderAttrAccess::CTor
|*
-|* Ersterstellung MA 20. Mar. 95
-|* Letzte Aenderung MA 29. Nov. 95
-|*
|*************************************************************************/
SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrm *pFrm ) :
@@ -2333,9 +2289,6 @@ SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrm *pFrm ) :
|*
|* SwBorderAttrAccess::NewObj, Get
|*
-|* Ersterstellung MA 20. Mar. 95
-|* Letzte Aenderung MA 20. Mar. 95
-|*
|*************************************************************************/
SwCacheObj *SwBorderAttrAccess::NewObj()
@@ -2353,9 +2306,6 @@ SwBorderAttrs *SwBorderAttrAccess::Get()
|*
|* SwOrderIter::Ctor
|*
-|* Ersterstellung MA 06. Jan. 95
-|* Letzte Aenderung MA 22. Nov. 95
-|*
|*************************************************************************/
SwOrderIter::SwOrderIter( const SwPageFrm *pPg, sal_Bool bFlys ) :
@@ -2369,9 +2319,6 @@ SwOrderIter::SwOrderIter( const SwPageFrm *pPg, sal_Bool bFlys ) :
|*
|* SwOrderIter::Top()
|*
-|* Ersterstellung MA 06. Jan. 95
-|* Letzte Aenderung MA 22. Nov. 95
-|*
|*************************************************************************/
const SdrObject *SwOrderIter::Top()
@@ -2379,10 +2326,10 @@ const SdrObject *SwOrderIter::Top()
pCurrent = 0;
if ( pPage->GetSortedObjs() )
{
- sal_uInt32 nTopOrd = 0;
const SwSortedObjs *pObjs = pPage->GetSortedObjs();
if ( pObjs->Count() )
{
+ sal_uInt32 nTopOrd = 0;
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen!
for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
@@ -2405,9 +2352,6 @@ const SdrObject *SwOrderIter::Top()
|*
|* SwOrderIter::Bottom()
|*
-|* Ersterstellung MA 06. Jan. 95
-|* Letzte Aenderung MA 22. Nov. 95
-|*
|*************************************************************************/
const SdrObject *SwOrderIter::Bottom()
@@ -2441,9 +2385,6 @@ const SdrObject *SwOrderIter::Bottom()
|*
|* SwOrderIter::Next()
|*
-|* Ersterstellung MA 06. Jan. 95
-|* Letzte Aenderung MA 22. Nov. 95
-|*
|*************************************************************************/
const SdrObject *SwOrderIter::Next()
@@ -2478,9 +2419,6 @@ const SdrObject *SwOrderIter::Next()
|*
|* SwOrderIter::Prev()
|*
-|* Ersterstellung MA 06. Jan. 95
-|* Letzte Aenderung MA 22. Nov. 95
-|*
|*************************************************************************/
const SdrObject *SwOrderIter::Prev()
@@ -2489,10 +2427,10 @@ const SdrObject *SwOrderIter::Prev()
pCurrent = 0;
if ( pPage->GetSortedObjs() )
{
- sal_uInt32 nOrd = 0;
const SwSortedObjs *pObjs = pPage->GetSortedObjs();
if ( pObjs->Count() )
{
+ sal_uInt32 nOrd = 0;
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen!
for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
@@ -2515,9 +2453,6 @@ const SdrObject *SwOrderIter::Prev()
|*
|* SaveCntnt(), RestoreCntnt()
|*
-|* Ersterstellung MA 10. Jun. 93
-|* Letzte Aenderung MA 07. Mar. 95
-|*
|*************************************************************************/
//Unterstruktur eines LayoutFrms fuer eine Aktion aufheben und wieder
@@ -2537,7 +2472,7 @@ const SdrObject *SwOrderIter::Prev()
// at-fly anchored objects from page
void MA_FASTCALL lcl_RemoveObjsFromPage( SwFrm* _pFrm )
{
- ASSERT( _pFrm->GetDrawObjs(), "Keine DrawObjs fuer lcl_RemoveFlysFromPage." );
+ OSL_ENSURE( _pFrm->GetDrawObjs(), "Keine DrawObjs fuer lcl_RemoveFlysFromPage." );
SwSortedObjs &rObjs = *_pFrm->GetDrawObjs();
for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
@@ -2657,7 +2592,7 @@ SwFrm *SaveCntnt( SwLayoutFrm *pLay, SwFrm *pStart )
}
}
else {
- ASSERT( !pFloat, "Neuer Float-Frame?" );
+ OSL_ENSURE( !pFloat, "Neuer Float-Frame?" );
}
}
if ( pFloat->GetNext() )
@@ -2705,7 +2640,7 @@ SwFrm *SaveCntnt( SwLayoutFrm *pLay, SwFrm *pStart )
// anchored objects to page
void MA_FASTCALL lcl_AddObjsToPage( SwFrm* _pFrm, SwPageFrm* _pPage )
{
- ASSERT( _pFrm->GetDrawObjs(), "Keine DrawObjs fuer lcl_AddFlysToPage." );
+ OSL_ENSURE( _pFrm->GetDrawObjs(), "Keine DrawObjs fuer lcl_AddFlysToPage." );
SwSortedObjs &rObjs = *_pFrm->GetDrawObjs();
for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
@@ -2761,7 +2696,7 @@ void MA_FASTCALL lcl_AddObjsToPage( SwFrm* _pFrm, SwPageFrm* _pPage )
void RestoreCntnt( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bGrow )
{
- ASSERT( pSav && pParent, "Kein Save oder Parent fuer Restore." );
+ OSL_ENSURE( pSav && pParent, "Kein Save oder Parent fuer Restore." );
SWRECTFN( pParent )
//Wenn es bereits FlowFrms unterhalb des neuen Parent gibt, so wird die
@@ -2854,9 +2789,6 @@ void RestoreCntnt( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bGro
|* SqRt() Berechnung der Quadratwurzel, damit die math.lib
|* nicht auch noch dazugelinkt werden muss.
|*
-|* Ersterstellung OK ??
-|* Letzte Aenderung MA 09. Jan. 97
-|*
|*************************************************************************/
sal_uLong MA_FASTCALL SqRt( BigInt nX )
@@ -2879,9 +2811,6 @@ sal_uLong MA_FASTCALL SqRt( BigInt nX )
|*
|* InsertNewPage() Einsetzen einer neuen Seite.
|*
-|* Ersterstellung MA 01. Jul. 93
-|* Letzte Aenderung MA 31. Jul. 95
-|*
|*************************************************************************/
SwPageFrm * MA_FASTCALL InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper,
@@ -2896,7 +2825,7 @@ SwPageFrm * MA_FASTCALL InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper,
if ( !pFmt )
{
pFmt = bOdd ? rDesc.GetLeftFmt() : rDesc.GetRightFmt();
- ASSERT( pFmt, "Descriptor without any format?!" );
+ OSL_ENSURE( pFmt, "Descriptor without any format?!" );
bInsertEmpty = !bInsertEmpty;
}
if( bInsertEmpty )
@@ -2922,9 +2851,6 @@ SwPageFrm * MA_FASTCALL InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper,
|* eine Layoutstruktur und melden alle FlyFrms, die einen beliebigen Frm
|* innerhalb der Struktur als Anker haben bei der Seite an.
|*
-|* Ersterstellung MA 08. Jul. 93
-|* Letzte Aenderung MA 07. Jul. 95
-|*
|*************************************************************************/
void MA_FASTCALL lcl_Regist( SwPageFrm *pPage, const SwFrm *pAnch )
@@ -2995,8 +2921,6 @@ void RegistFlys( SwPageFrm *pPage, const SwLayoutFrm *pLay )
|*
|* Beschreibung Benachrichtigt den Hintergrund je nach der
|* Veraenderung zwischen altem und neuem Rechteckt.
-|* Ersterstellung MA 18. Jun. 93
-|* Letzte Aenderung MA 06. Jun. 96
|*
|*************************************************************************/
@@ -3385,7 +3309,7 @@ sal_Bool Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj )
pFrm = ( (SwDrawContact*)GetUserCall(pObj) )->GetAnchorFrm();
aPos = pObj->GetCurrentBoundRect().TopLeft();
}
- ASSERT( pFrm, "8-( Fly is lost in Space." );
+ OSL_ENSURE( pFrm, "8-( Fly is lost in Space." );
pFrm = GetVirtualUpper( pFrm, aPos );
do
{ if ( pFrm == pCurrFrm )
@@ -3687,7 +3611,7 @@ void GetSpacingValuesOfFrm( const SwFrm& rFrm,
static_cast<const SwTxtFrm&>(rFrm).GetLineSpace( true ) == 0;
}
- ASSERT( onLowerSpacing >= 0 && onLineSpacing >= 0,
+ OSL_ENSURE( onLowerSpacing >= 0 && onLineSpacing >= 0,
"<GetSpacingValuesOfFrm(..)> - spacing values aren't positive!" );
}
}
@@ -3738,3 +3662,4 @@ bool SwDeletionChecker::HasBeenDeleted()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 08dee8d2e40e..ffbbd530bfd5 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <txtftn.hxx>
#include <fmtftn.hxx>
#include <ftnidx.hxx>
@@ -58,9 +58,6 @@
|* Dokument, dort stehen die Fussnoten gluecklicherweise nach ihrem
|* Index sortiert.
|*
-|* Ersterstellung MA 29. Jun. 93
-|* Letzte Aenderung MA 13. Dec. 93
-|*
|*************************************************************************/
#define ENDNOTE 0x80000000
@@ -69,29 +66,6 @@ sal_uLong MA_FASTCALL lcl_FindFtnPos( const SwDoc *pDoc, const SwTxtFtn *pAttr )
{
const SwFtnIdxs &rFtnIdxs = pDoc->GetFtnIdxs();
-#ifdef MA_DEBUG
- //Wenn das Array nicht stimmt haben wir ein Problem, denn viele
- //Ftn-Functions bauen auf dem Array auf.
- for ( sal_uInt16 k = 0; k+1 < rFtnIdxs.Count(); ++k )
- {
- SwIndex aIdx1(&pDoc->GetNodes());
- SwIndex aIdx2(&pDoc->GetNodes());
- rFtnIdxs[k]->pFtn-> GetTxtNode().GetIndex(aIdx1);
- rFtnIdxs[k+1]->pFtn->GetTxtNode().GetIndex(aIdx2);
- if ( aIdx1.GetIndex() > aIdx2.GetIndex() )
- {
- ASSERT( !rFtnIdxs.Count(), "FtnIdxs not up to date" );
- }
- else if ( aIdx1.GetIndex() == aIdx2.GetIndex() )
- {
- SwTxtFtn *p1 = rFtnIdxs[k];
- SwTxtFtn *p2 = rFtnIdxs[k+1];
- ASSERT( *p1->GetStart() < *p2->GetStart(),
- "FtnIdxs not up to date" );
- }
- }
-#endif
-
sal_uInt16 nRet;
SwTxtFtnPtr pBla = (SwTxtFtn*)pAttr;
if ( rFtnIdxs.Seek_Entry( pBla, &nRet ) )
@@ -100,14 +74,14 @@ sal_uLong MA_FASTCALL lcl_FindFtnPos( const SwDoc *pDoc, const SwTxtFtn *pAttr )
return sal_uLong(nRet) + ENDNOTE;
return nRet;
}
- ASSERT( !pDoc, "FtnPos not found." );
+ OSL_ENSURE( !pDoc, "FtnPos not found." );
return 0;
}
sal_Bool SwFtnFrm::operator<( const SwTxtFtn* pTxtFtn ) const
{
const SwDoc* pDoc = GetFmt()->GetDoc();
- ASSERT( pDoc, "SwFtnFrm: Missing doc!" );
+ OSL_ENSURE( pDoc, "SwFtnFrm: Missing doc!" );
return lcl_FindFtnPos( pDoc, GetAttr() ) <
lcl_FindFtnPos( pDoc, pTxtFtn );
}
@@ -119,9 +93,6 @@ sal_Bool SwFtnFrm::operator<( const SwTxtFtn* pTxtFtn ) const
|* oder eine Seite (ohne Spalten) sein. Wenn die Seite dabei gewechselt wird
|* enthaelt pPage die neue Seite und die Funktion liefert sal_True.
|*
-|* Ersterstellung AMA 06. Nov. 98
-|* Letzte Aenderung AMA 06. Nov. 98
-|*
|*************************************************************************/
sal_Bool lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage,
@@ -139,7 +110,7 @@ sal_Bool lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage,
SwSectionFrm* pSct = rpBoss->FindSctFrm()->GetFollow();
if( pSct )
{
- ASSERT( pSct->Lower() && pSct->Lower()->IsColumnFrm(),
+ OSL_ENSURE( pSct->Lower() && pSct->Lower()->IsColumnFrm(),
"Where's the column?" );
rpBoss = (SwColumnFrm*)pSct->Lower();
SwPageFrm* pOld = rpPage;
@@ -171,9 +142,6 @@ sal_Bool lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage,
|* liefert die Spaltennummer, wenn pBoss eine Spalte ist,
|* sonst eine Null (bei Seiten).
|*
-|* Ersterstellung AMA 06. Nov. 98
-|* Letzte Aenderung AMA 06. Nov. 98
-|*
|*************************************************************************/
sal_uInt16 lcl_ColumnNum( const SwFrm* pBoss )
@@ -208,9 +176,6 @@ sal_uInt16 lcl_ColumnNum( const SwFrm* pBoss )
|*
|* SwFtnContFrm::SwFtnContFrm()
|*
-|* Ersterstellung MA 24. Feb. 93
-|* Letzte Aenderung MA 02. Mar. 93
-|*
|*************************************************************************/
@@ -257,8 +222,6 @@ long lcl_Undersize( const SwFrm* pFrm )
|*
|* Beschreibung: "Formatiert" den Frame;
|* Die Fixsize wird hier nicht eingestellt.
-|* Ersterstellung MA 01. Mar. 93
-|* Letzte Aenderung MA 17. Nov. 98
|*
|*************************************************************************/
@@ -340,9 +303,6 @@ void SwFtnContFrm::Format( const SwBorderAttrs * )
|*
|* SwFtnContFrm::GrowFrm(), ShrinkFrm()
|*
-|* Ersterstellung MA 24. Feb. 93
-|* Letzte Aenderung AMA 05. Nov. 98
-|*
|*************************************************************************/
SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
@@ -353,9 +313,9 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
//moeglich.
//Wenn die Seite eine spezielle Fussnotenseite ist, so nehmen wir uns auch
//soviel Platz wie eben moeglich.
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if ( !GetUpper() || !GetUpper()->IsFtnBossFrm() )
- { ASSERT( !this, "Keine FtnBoss." );
+ { OSL_ENSURE( !this, "Keine FtnBoss." );
return 0;
}
#endif
@@ -369,7 +329,7 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
if( IsInSct() )
{
SwSectionFrm* pSect = FindSctFrm();
- ASSERT( pSect, "GrowFrm: Missing SectFrm" );
+ OSL_ENSURE( pSect, "GrowFrm: Missing SectFrm" );
// In a section, which has to maximize, a footnotecontainer is allowed
// to grow, when the section can't grow anymore.
if( !bTst && !pSect->IsColLocked() &&
@@ -507,9 +467,6 @@ SwTwips SwFtnContFrm::ShrinkFrm( SwTwips nDiff, sal_Bool bTst, sal_Bool bInfo )
|*
|* SwFtnFrm::SwFtnFrm()
|*
-|* Ersterstellung MA 24. Feb. 93
-|* Letzte Aenderung MA 11. Oct. 93
-|*
|*************************************************************************/
@@ -531,9 +488,6 @@ SwFtnFrm::SwFtnFrm( SwFrmFmt *pFmt, SwCntntFrm *pCnt, SwTxtFtn *pAt ):
|*
|* SwFtnFrm::InvalidateNxtFtnCnts()
|*
-|* Ersterstellung MA 29. Jun. 93
-|* Letzte Aenderung MA 29. Jun. 93
-|*
|*************************************************************************/
@@ -561,11 +515,10 @@ void SwFtnFrm::InvalidateNxtFtnCnts( SwPageFrm *pPage )
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
SwTwips SwFtnFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
-#if OSL_DEBUG_LEVEL > 1
static sal_uInt16 nNum = USHRT_MAX;
SwTxtFtn* pTxtFtn = GetAttr();
if ( pTxtFtn->GetFtn().GetNumber() == nNum )
@@ -574,14 +527,12 @@ SwTwips SwFtnFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
(void)bla;
}
-#endif
return SwLayoutFrm::GrowFrm( nDist, bTst, bInfo );
}
SwTwips SwFtnFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
-#if OSL_DEBUG_LEVEL > 1
static sal_uInt16 nNum = USHRT_MAX;
if( nNum != USHRT_MAX )
{
@@ -592,7 +543,6 @@ SwTwips SwFtnFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
(void)bla;
}
}
-#endif
return SwLayoutFrm::ShrinkFrm( nDist, bTst, bInfo );
}
#endif
@@ -601,9 +551,6 @@ SwTwips SwFtnFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
|*
|* SwFtnFrm::Cut()
|*
-|* Ersterstellung MA 23. Feb. 94
-|* Letzte Aenderung MA 24. Jul. 95
-|*
|*************************************************************************/
@@ -662,19 +609,16 @@ void SwFtnFrm::Cut()
|*
|* SwFtnFrm::Paste()
|*
-|* Ersterstellung MA 23. Feb. 94
-|* Letzte Aenderung MA 23. Feb. 94
-|*
|*************************************************************************/
void SwFtnFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
{
- ASSERT( pParent, "Kein Parent fuer Paste." );
- ASSERT( pParent->IsLayoutFrm(), "Parent ist CntntFrm." );
- ASSERT( pParent != this, "Bin selbst der Parent." );
- ASSERT( pSibling != this, "Bin mein eigener Nachbar." );
- ASSERT( !GetPrev() && !GetNext() && !GetUpper(),
+ OSL_ENSURE( pParent, "Kein Parent fuer Paste." );
+ OSL_ENSURE( pParent->IsLayoutFrm(), "Parent ist CntntFrm." );
+ OSL_ENSURE( pParent != this, "Bin selbst der Parent." );
+ OSL_ENSURE( pSibling != this, "Bin mein eigener Nachbar." );
+ OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(),
"Bin noch irgendwo angemeldet." );
//In den Baum einhaengen.
@@ -694,7 +638,7 @@ void SwFtnFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
//Wenn mein Vorgaenger mein Master ist und/oder wenn mein Nachfolger mein
//Follow ist so kann ich deren Inhalt uebernehmen und sie vernichten.
if ( GetPrev() && GetPrev() == GetMaster() )
- { ASSERT( SwFlowFrm::CastFlowFrm( GetPrev()->GetLower() ),
+ { OSL_ENSURE( SwFlowFrm::CastFlowFrm( GetPrev()->GetLower() ),
"Fussnote ohne Inhalt?" );
(SwFlowFrm::CastFlowFrm( GetPrev()->GetLower()))->
MoveSubTree( this, GetLower() );
@@ -703,23 +647,23 @@ void SwFtnFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
delete pDel;
}
if ( GetNext() && GetNext() == GetFollow() )
- { ASSERT( SwFlowFrm::CastFlowFrm( GetNext()->GetLower() ),
+ { OSL_ENSURE( SwFlowFrm::CastFlowFrm( GetNext()->GetLower() ),
"Fussnote ohne Inhalt?" );
(SwFlowFrm::CastFlowFrm( GetNext()->GetLower()))->MoveSubTree( this );
SwFrm *pDel = GetNext();
pDel->Cut();
delete pDel;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
SwDoc *pDoc = GetFmt()->GetDoc();
if ( GetPrev() )
{
- ASSERT( lcl_FindFtnPos( pDoc, ((SwFtnFrm*)GetPrev())->GetAttr() ) <=
+ OSL_ENSURE( lcl_FindFtnPos( pDoc, ((SwFtnFrm*)GetPrev())->GetAttr() ) <=
lcl_FindFtnPos( pDoc, GetAttr() ), "Prev ist not FtnPrev" );
}
if ( GetNext() )
{
- ASSERT( lcl_FindFtnPos( pDoc, GetAttr() ) <=
+ OSL_ENSURE( lcl_FindFtnPos( pDoc, GetAttr() ) <=
lcl_FindFtnPos( pDoc, ((SwFtnFrm*)GetNext())->GetAttr() ),
"Next is not FtnNext" );
}
@@ -734,8 +678,6 @@ void SwFtnFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
|* Beschreibung Liefert das naechste LayoutBlatt in den das
|* Frame gemoved werden kann.
|* Neue Seiten werden nur dann erzeugt, wenn der Parameter sal_True ist.
-|* Ersterstellung MA 16. Nov. 92
-|* Letzte Aenderung AMA 09. Nov. 98
|*
|*************************************************************************/
@@ -756,7 +698,7 @@ SwLayoutFrm *SwFrm::GetNextFtnLeaf( MakePageType eMakePage )
SwLayoutFrm* pNxt = pOldBoss->GetNextSctLeaf( eMakePage );
if( pNxt )
{
- ASSERT( pNxt->IsColBodyFrm(), "GetNextFtnLeaf: Funny Leaf" );
+ OSL_ENSURE( pNxt->IsColBodyFrm(), "GetNextFtnLeaf: Funny Leaf" );
pBoss = (SwFtnBossFrm*)pNxt->GetUpper();
pPage = pBoss->FindPageFrm();
}
@@ -829,8 +771,6 @@ SwLayoutFrm *SwFrm::GetNextFtnLeaf( MakePageType eMakePage )
|*
|* Beschreibung Liefert das vorhergehende LayoutBlatt in das der
|* Frame gemoved werden kann.
-|* Ersterstellung MA 16. Nov. 92
-|* Letzte Aenderung AMA 06. Nov. 98
|*
|*************************************************************************/
@@ -894,7 +834,7 @@ SwLayoutFrm *SwFrm::GetPrevFtnLeaf( MakePageType eMakeFtn )
pSect = (SwSectionFrm*)pSect->FindMaster();
if( !pSect || !pSect->Lower() )
return 0;
- ASSERT( pSect->Lower()->IsColumnFrm(),
+ OSL_ENSURE( pSect->Lower()->IsColumnFrm(),
"GetPrevFtnLeaf: Where's the column?" );
pNxtBoss = (SwFtnBossFrm*)pSect->Lower();
pBody = pSect;
@@ -962,9 +902,6 @@ SwLayoutFrm *SwFrm::GetPrevFtnLeaf( MakePageType eMakeFtn )
|*
|* SwFrm::IsFtnAllowed()
|*
-|* Ersterstellung MA 22. Mar. 94
-|* Letzte Aenderung MA 01. Dec. 94
-|*
|*************************************************************************/
@@ -987,9 +924,6 @@ sal_Bool SwFrm::IsFtnAllowed() const
|*
|* SwRootFrm::UpdateFtnNums()
|*
-|* Ersterstellung MA 02. Mar. 93
-|* Letzte Aenderung MA 09. Dec. 97
-|*
|*************************************************************************/
@@ -1012,9 +946,6 @@ void SwRootFrm::UpdateFtnNums()
|* RemoveFtns() Entfernen aller Fussnoten (nicht etwa die Referenzen)
|* und Entfernen aller Fussnotenseiten.
|*
-|* Ersterstellung MA 05. Dec. 97
-|* Letzte Aenderung AMA 06. Nov. 98
-|*
|*************************************************************************/
void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes )
@@ -1025,7 +956,7 @@ void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes
if ( pCont )
{
SwFtnFrm *pFtn = (SwFtnFrm*)pCont->Lower();
- ASSERT( pFtn, "FtnCont ohne Ftn." );
+ OSL_ENSURE( pFtn, "FtnCont ohne Ftn." );
if ( bPageOnly )
while ( pFtn->GetMaster() )
pFtn = pFtn->GetMaster();
@@ -1108,9 +1039,6 @@ void SwRootFrm::RemoveFtns( SwPageFrm *pPage, sal_Bool bPageOnly, sal_Bool bEndN
|*
|* SetFtnPageDescs() Seitenvorlagen der Fussnotenseiten aendern
|*
-|* Ersterstellung MA 11. Dec. 97
-|* Letzte Aenderung MA 11. Dec. 97
-|*
|*************************************************************************/
void SwRootFrm::CheckFtnPageDescs( sal_Bool bEndNote )
@@ -1129,9 +1057,6 @@ void SwRootFrm::CheckFtnPageDescs( sal_Bool bEndNote )
|*
|* SwFtnBossFrm::MakeFtnCont()
|*
-|* Ersterstellung MA 25. Feb. 93
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
@@ -1141,9 +1066,9 @@ SwFtnContFrm *SwFtnBossFrm::MakeFtnCont()
//immer direkt hinter dem Bodytext.
//Sein FrmFmt ist immer das DefaultFrmFmt.
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if ( FindFtnCont() )
- { ASSERT( !this, "Fussnotencontainer bereits vorhanden." );
+ { OSL_ENSURE( !this, "Fussnotencontainer bereits vorhanden." );
return 0;
}
#endif
@@ -1158,9 +1083,6 @@ SwFtnContFrm *SwFtnBossFrm::MakeFtnCont()
|*
|* SwFtnBossFrm::FindFtnCont()
|*
-|* Ersterstellung MA 25. Feb. 93
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
@@ -1170,14 +1092,14 @@ SwFtnContFrm *SwFtnBossFrm::FindFtnCont()
while( pFrm && !pFrm->IsFtnContFrm() )
pFrm = pFrm->GetNext();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if ( pFrm )
{
SwFrm *pFtn = pFrm->GetLower();
- ASSERT( pFtn, "Cont ohne Fussnote." );
+ OSL_ENSURE( pFtn, "Cont ohne Fussnote." );
while ( pFtn )
{
- ASSERT( pFtn->IsFtnFrm(), "Nachbar von Fussnote keine Fussnote." );
+ OSL_ENSURE( pFtn->IsFtnFrm(), "Nachbar von Fussnote keine Fussnote." );
pFtn = pFtn->GetNext();
}
}
@@ -1190,9 +1112,6 @@ SwFtnContFrm *SwFtnBossFrm::FindFtnCont()
|*
|* SwFtnBossFrm::FindNearestFtnCont() Sucht den naechst greifbaren Fussnotencontainer.
|*
-|* Ersterstellung MA 02. Aug. 93
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
SwFtnContFrm *SwFtnBossFrm::FindNearestFtnCont( sal_Bool bDontLeave )
@@ -1225,8 +1144,6 @@ SwFtnContFrm *SwFtnBossFrm::FindNearestFtnCont( sal_Bool bDontLeave )
|* SwFtnBossFrm::FindFirstFtn()
|*
|* Beschreibung Erste Fussnote des Fussnotenbosses suchen.
-|* Ersterstellung MA 26. Feb. 93
-|* Letzte Aenderung AMA 29. Oct. 99
|*
|*************************************************************************/
@@ -1250,7 +1167,7 @@ SwFtnFrm *SwFtnBossFrm::FindFirstFtn()
if( pRet )
{
pBoss = pRet->GetRef()->FindFtnBossFrm();
- ASSERT( pBoss, "FindFirstFtn: No boss found" );
+ OSL_ENSURE( pBoss, "FindFirstFtn: No boss found" );
if( !pBoss )
return sal_False; // ?There must be a bug, but no GPF
pPage = pBoss->FindPageFrm();
@@ -1314,8 +1231,6 @@ SwFtnFrm *SwFtnBossFrm::FindFirstFtn()
|* SwFtnBossFrm::FindFirstFtn()
|*
|* Beschreibunt Erste Fussnote zum Cnt suchen.
-|* Ersterstellung MA 04. Mar. 93
-|* Letzte Aenderung AMA 28. Oct. 98
|*
|*************************************************************************/
@@ -1357,9 +1272,6 @@ const SwFtnFrm *SwFtnBossFrm::FindFirstFtn( SwCntntFrm *pCnt ) const
|*
|* SwFtnBossFrm::ResetFtn()
|*
-|* Ersterstellung MA 11. May. 95
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
@@ -1367,7 +1279,7 @@ void SwFtnBossFrm::ResetFtn( const SwFtnFrm *pCheck )
{
//Vernichten der Inkarnationen von Fussnoten zum Attribut, wenn sie nicht
//zu pAssumed gehoeren.
- ASSERT( !pCheck->GetMaster(), "Master not an Master." );
+ OSL_ENSURE( !pCheck->GetMaster(), "Master not an Master." );
SwNodeIndex aIdx( *pCheck->GetAttr()->GetStartNode(), 1 );
SwCntntNode *pNd = aIdx.GetNode().GetCntntNode();
@@ -1407,22 +1319,11 @@ void SwFtnBossFrm::ResetFtn( const SwFtnFrm *pCheck )
|*
|* SwFtnBossFrm::InsertFtn()
|*
-|* Ersterstellung MA 26. Feb. 93
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
{
-#if (OSL_DEBUG_LEVEL > 1) && defined(DBG_UTIL)
- static sal_uInt16 nStop = 0;
- if ( nStop == pNew->GetFrmId() )
- {
- int bla = 5;
- (void)bla;
- }
-#endif
//Die Fussnote haben wir, sie muss jetzt nur noch irgendwo
//hin und zwar vor die Fussnote, deren Attribut vor das
//der neuen zeigt (Position wird ueber das Doc ermittelt)
@@ -1528,7 +1429,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
//werden.
pSibling = (SwFtnFrm*)pParent->Lower();
if ( !pSibling )
- { ASSERT( !this, "Keinen Platz fuer Fussnote gefunden.");
+ { OSL_ENSURE( !this, "Keinen Platz fuer Fussnote gefunden.");
return;
}
nCmpPos = ::lcl_FindFtnPos( pDoc, pSibling->GetAttr() );
@@ -1547,7 +1448,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
if ( pSibling->GetNext() )
{
pSibling = (SwFtnFrm*)pSibling->GetNext();
- ASSERT( !pSibling->GetMaster() || ( ENDNOTE > nStPos &&
+ OSL_ENSURE( !pSibling->GetMaster() || ( ENDNOTE > nStPos &&
pSibling->GetAttr()->GetFtn().IsEndNote() ),
"InsertFtn: Master expected I" );
}
@@ -1569,7 +1470,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
if ( pSibling )
{
nCmpPos = ::lcl_FindFtnPos( pDoc, pSibling->GetAttr() );
- ASSERT( nCmpPos > nLastPos, "InsertFtn: Order of FtnFrm's buggy" );
+ OSL_ENSURE( nCmpPos > nLastPos, "InsertFtn: Order of FtnFrm's buggy" );
}
}
// pLastSib ist jetzt die letzte Fussnote vor uns,
@@ -1589,7 +1490,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
pSibling = pLastSib;
while( pSibling->GetFollow() )
pSibling = pSibling->GetFollow();
- ASSERT( !pSibling->GetNext(), "InsertFtn: Who's that guy?" );
+ OSL_ENSURE( !pSibling->GetNext(), "InsertFtn: Who's that guy?" );
}
}
}
@@ -1668,7 +1569,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
{
if( ENDNOTE > nCmpPos || nStPos >= ENDNOTE )
{
- ASSERT( sal_False, "InsertFtn: Master expected II" );
+ OSL_ENSURE( sal_False, "InsertFtn: Master expected II" );
do
pSibling = pSibling->GetMaster();
while ( pSibling->GetMaster() );
@@ -1677,7 +1578,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
pParent = (SwFtnContFrm*)pSibling->GetUpper();
}
}
- ASSERT( pParent, "paste in space?" );
+ OSL_ENSURE( pParent, "paste in space?" );
pNew->Paste( pParent, pSibling );
}
@@ -1685,9 +1586,6 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
|*
|* SwFtnBossFrm::AppendFtn()
|*
-|* Ersterstellung MA 25. Feb. 93
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
@@ -1749,7 +1647,7 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
SwFtnContFrm *pCont = pNxt->FindFtnCont();
if ( pCont && pCont->Lower() )
{
- ASSERT( pCont->Lower()->IsFtnFrm(), "Keine Ftn im Container" );
+ OSL_ENSURE( pCont->Lower()->IsFtnFrm(), "Keine Ftn im Container" );
if ( nStPos > ::lcl_FindFtnPos( pDoc,
((SwFtnFrm*)pCont->Lower())->GetAttr()))
{
@@ -1792,7 +1690,7 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
SwFtnContFrm *pCont = pNxt->FindFtnCont();
if ( pCont && pCont->Lower() )
{
- ASSERT( pCont->Lower()->IsFtnFrm(), "Keine Ftn im Container" );
+ OSL_ENSURE( pCont->Lower()->IsFtnFrm(), "Keine Ftn im Container" );
if ( nStPos > ::lcl_FindFtnPos( pDoc,
((SwFtnFrm*)pCont->Lower())->GetAttr()))
{
@@ -1808,7 +1706,7 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
//Erstmal eine Fussnote und die benoetigten CntntFrms anlegen.
if ( !pAttr->GetStartNode() )
- { ASSERT( !this, "Kein Fussnoteninhalt." );
+ { OSL_ENSURE( !this, "Kein Fussnoteninhalt." );
return;
}
@@ -1842,7 +1740,7 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
if( bChgPage )
{
SwLayoutFrm* pBody = pPage->FindBodyCont();
- ASSERT( pBody, "AppendFtn: NoPageBody?" );
+ OSL_ENSURE( pBody, "AppendFtn: NoPageBody?" );
if( pBody->Lower() && pBody->Lower()->IsColumnFrm() )
pBoss = (SwFtnBossFrm*)pBody->Lower();
else
@@ -1920,16 +1818,13 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
|*
|* SwFtnBossFrm::FindFtn()
|*
-|* Ersterstellung MA 25. Feb. 93
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
SwFtnFrm *SwFtnBossFrm::FindFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr )
{
//Der einfachste und sicherste Weg geht ueber das Attribut.
- ASSERT( pAttr->GetStartNode(), "FtnAtr ohne StartNode." );
+ OSL_ENSURE( pAttr->GetStartNode(), "FtnAtr ohne StartNode." );
SwNodeIndex aIdx( *pAttr->GetStartNode(), 1 );
SwCntntNode *pNd = aIdx.GetNode().GetCntntNode();
if ( !pNd )
@@ -1971,9 +1866,6 @@ SwFtnFrm *SwFtnBossFrm::FindFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr )
|*
|* SwFtnBossFrm::RemoveFtn()
|*
-|* Ersterstellung MA 25. Feb. 93
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
@@ -1992,7 +1884,7 @@ void SwFtnBossFrm::RemoveFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr,
} while ( pFtn );
if( bPrep && pRef->IsFollow() )
{
- ASSERT( pRef->IsTxtFrm(), "NoTxtFrm has Footnote?" );
+ OSL_ENSURE( pRef->IsTxtFrm(), "NoTxtFrm has Footnote?" );
SwTxtFrm* pMaster = (SwTxtFrm*)pRef->FindMaster();
if( !pMaster->IsLocked() )
pMaster->Prepare( PREP_FTN_GONE );
@@ -2005,9 +1897,6 @@ void SwFtnBossFrm::RemoveFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr,
|*
|* SwFtnBossFrm::ChangeFtnRef()
|*
-|* Ersterstellung MA 25. Feb. 93
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
@@ -2026,9 +1915,6 @@ void SwFtnBossFrm::ChangeFtnRef( const SwCntntFrm *pOld, const SwTxtFtn *pAttr,
|*
|* SwFtnBossFrm::CollectFtns()
|*
-|* Ersterstellung MA 24. Jul. 95
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
@@ -2094,9 +1980,6 @@ void SwFtnBossFrm::CollectFtns( const SwCntntFrm* _pRef,
|*
|* SwFtnBossFrm::_CollectFtns()
|*
-|* Ersterstellung MA 24. Jul. 95
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
inline void FtnInArr( SvPtrarr& rFtnArr, SwFtnFrm* pFtn )
{
@@ -2119,7 +2002,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
// OD 03.04.2003 #108446# - assert, that no reference footnote boss frame
// is set, in spite of the order, that only previous footnotes has to be
// collected.
- ASSERT( !_bCollectOnlyPreviousFtns || _pRefFtnBossFrm,
+ OSL_ENSURE( !_bCollectOnlyPreviousFtns || _pRefFtnBossFrm,
"<SwFtnBossFrm::_CollectFtns(..)> - No reference footnote boss frame for collecting only previous footnotes set.\nCrash will be caused!" );
//Alle Fussnoten die von pRef referenziert werden nacheinander
@@ -2138,7 +2021,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
//Hier sollte keiner mit einer Follow-Ftn ankommen, es sei denn er hat
//ernste Absichten (:-)); spricht er kommt mit einer Ftn an die vor der
//ersten der Referenz liegt.
- ASSERT( !_pFtn->GetMaster() || _pFtn->GetRef() != _pRef, "FollowFtn moven?" );
+ OSL_ENSURE( !_pFtn->GetMaster() || _pFtn->GetRef() != _pRef, "FollowFtn moven?" );
while ( _pFtn->GetMaster() )
_pFtn = _pFtn->GetMaster();
@@ -2178,13 +2061,13 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
} while( !pNxtFtn && pBoss );
}
else if( !pNxtFtn->GetAttr()->GetFtn().IsEndNote() )
- { ASSERT( !pNxtFtn->GetMaster(), "_CollectFtn: Master exspected" );
+ { OSL_ENSURE( !pNxtFtn->GetMaster(), "_CollectFtn: Master exspected" );
while ( pNxtFtn->GetMaster() )
pNxtFtn = pNxtFtn->GetMaster();
}
if ( pNxtFtn == _pFtn )
{
- ASSERT( sal_False, "_CollectFtn: Devil's circle" );
+ OSL_ENSURE( sal_False, "_CollectFtn: Devil's circle" );
pNxtFtn = 0;
}
@@ -2195,7 +2078,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
if ( _bCollectOnlyPreviousFtns )
{
SwFtnBossFrm* pBossOfFoundFtn = _pFtn->FindFtnBossFrm( sal_True );
- ASSERT( pBossOfFoundFtn,
+ OSL_ENSURE( pBossOfFoundFtn,
"<SwFtnBossFrm::_CollectFtns(..)> - footnote boss frame of found footnote frame missing.\nWrong layout!" );
if ( !pBossOfFoundFtn || // don't crash, if no footnote boss is found.
pBossOfFoundFtn->IsBefore( _pRefFtnBossFrm )
@@ -2212,7 +2095,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
if ( bCollectFoundFtn )
{
- ASSERT( !_pFtn->GetMaster(), "FollowFtn moven?" );
+ OSL_ENSURE( !_pFtn->GetMaster(), "FollowFtn moven?" );
SwFtnFrm *pNxt = _pFtn->GetFollow();
while ( pNxt )
{
@@ -2227,7 +2110,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
} while ( pCnt );
}
else
- { ASSERT( !pNxt, "Fussnote ohne Inhalt?" );
+ { OSL_ENSURE( !pNxt, "Fussnote ohne Inhalt?" );
pNxt->Cut();
delete pNxt;
}
@@ -2256,9 +2139,6 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
|*
|* SwFtnBossFrm::_MoveFtns()
|*
-|* Ersterstellung MA 26. Feb. 93
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
@@ -2393,7 +2273,7 @@ void SwFtnBossFrm::_MoveFtns( SvPtrarr &rFtnArr, sal_Bool bCalc )
}
}
else
- { ASSERT( !pFtn->GetMaster() && !pFtn->GetFollow(),
+ { OSL_ENSURE( !pFtn->GetMaster() && !pFtn->GetFollow(),
"DelFtn und Master/Follow?" );
delete pFtn;
// --> OD 2004-06-10 #i21478#
@@ -2474,9 +2354,6 @@ void SwFtnBossFrm::_MoveFtns( SvPtrarr &rFtnArr, sal_Bool bCalc )
|*
|* SwFtnBossFrm::MoveFtns()
|*
-|* Ersterstellung BP 05. Aug. 93
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
@@ -2488,7 +2365,7 @@ void SwFtnBossFrm::MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest,
|| pAttr->GetFtn().IsEndNote() )
return;
- ASSERT( this == pSrc->FindFtnBossFrm( sal_True ),
+ OSL_ENSURE( this == pSrc->FindFtnBossFrm( TRUE ),
"SwPageFrm::MoveFtns: source frame isn't on that FtnBoss" );
SwFtnFrm *pFtn = FindFirstFtn();
@@ -2496,7 +2373,7 @@ void SwFtnBossFrm::MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest,
{
ChangeFtnRef( pSrc, pAttr, pDest );
SwFtnBossFrm *pDestBoss = pDest->FindFtnBossFrm( sal_True );
- ASSERT( pDestBoss, "+SwPageFrm::MoveFtns: no destination boss" );
+ OSL_ENSURE( pDestBoss, "+SwPageFrm::MoveFtns: no destination boss" );
if( pDestBoss ) // robust
{
SvPtrarr aFtnArr( 5, 5 );
@@ -2522,9 +2399,6 @@ void SwFtnBossFrm::MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest,
|*
|* SwFtnBossFrm::RearrangeFtns()
|*
-|* Ersterstellung MA 20. Jan. 94
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
@@ -2662,7 +2536,7 @@ void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const sal_Bool bLock,
!pFtnFrm->IsColLocked() )
{
// --> OD 2005-08-10 #i49383#
- ASSERT( pLastFtnFrm == pFtnFrm,
+ OSL_ENSURE( pLastFtnFrm == pFtnFrm,
"<SwFtnBossFrm::RearrangeFtns(..)> - <pLastFtnFrm> != <pFtnFrm>" );
pLastFtnFrm = 0L;
// --> OD 2006-02-02 #i57914# - adjust fix #i49383#
@@ -2766,9 +2640,6 @@ void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const sal_Bool bLock,
|*
|* SwPageFrm::UpdateFtnNum()
|*
-|* Ersterstellung MA 02. Mar. 93
-|* Letzte Aenderung AMA 29. Oct. 98
-|*
|*************************************************************************/
void SwPageFrm::UpdateFtnNum()
@@ -2808,11 +2679,11 @@ void SwPageFrm::UpdateFtnNum()
else
{
SwFtnBossFrm* pTmpBoss = pFtn->FindFtnBossFrm( sal_True );
- SwPageFrm* pPage = pTmpBoss->FindPageFrm();
- pFtn = NULL;
- lcl_NextFtnBoss( pTmpBoss, pPage, sal_False );
if( pTmpBoss )
{
+ SwPageFrm* pPage = pTmpBoss->FindPageFrm();
+ pFtn = NULL;
+ lcl_NextFtnBoss( pTmpBoss, pPage, sal_False );
SwFtnContFrm *pCont = pTmpBoss->FindNearestFtnCont();
if ( pCont )
pFtn = (SwFtnFrm*)pCont->Lower();
@@ -2831,9 +2702,6 @@ void SwPageFrm::UpdateFtnNum()
|*
|* SwFtnBossFrm::SetFtnDeadLine()
|*
-|* Ersterstellung MA 02. Aug. 93
-|* Letzte Aenderung MA 16. Nov. 98
-|*
|*************************************************************************/
void SwFtnBossFrm::SetFtnDeadLine( const SwTwips nDeadLine )
@@ -2867,9 +2735,6 @@ void SwFtnBossFrm::SetFtnDeadLine( const SwTwips nDeadLine )
|*
|* SwFtnBossFrm::GetVarSpace()
|*
-|* Ersterstellung MA 03. Apr. 95
-|* Letzte Aenderung MA 16. Nov. 98
-|*
|*************************************************************************/
SwTwips SwFtnBossFrm::GetVarSpace() const
{
@@ -2880,7 +2745,7 @@ SwTwips SwFtnBossFrm::GetVarSpace() const
// die ganze Seite/Spalte ein.
const SwPageFrm* pPg = FindPageFrm();
- ASSERT( pPg || IsInSct(), "Footnote lost page" );
+ OSL_ENSURE( pPg || IsInSct(), "Footnote lost page" );
const SwFrm *pBody = FindBodyCont();
SwTwips nRet;
@@ -2897,7 +2762,7 @@ SwTwips SwFtnBossFrm::GetVarSpace() const
// the bottom of the last contentfrm
if( pSect->IsEndnAtEnd() ) // endnotes allowed?
{
- ASSERT( !Lower() || !Lower()->GetNext() || Lower()->GetNext()->
+ OSL_ENSURE( !Lower() || !Lower()->GetNext() || Lower()->GetNext()->
IsFtnContFrm(), "FtnContainer exspected" );
const SwFtnContFrm* pCont = Lower() ?
(SwFtnContFrm*)Lower()->GetNext() : 0;
@@ -2952,9 +2817,6 @@ SwTwips SwFtnBossFrm::GetVarSpace() const
|* gibt und die Fussnoten nicht vom Bereich eingesammelt werden, ist ein Adjust..,
|* ansonsten ein Grow/Shrink notwendig.
|*
-|* Ersterstellung AMA 09. Dec 98
-|* Letzte Aenderung AMA 09. Dec 98
-|*
|*************************************************************************/
sal_uInt8 SwFtnBossFrm::_NeighbourhoodAdjustment( const SwFrm* ) const
@@ -2967,18 +2829,18 @@ sal_uInt8 SwFtnBossFrm::_NeighbourhoodAdjustment( const SwFrm* ) const
nRet = NA_GROW_SHRINK;
else
{
- ASSERT( GetUpper()->IsSctFrm(), "NeighbourhoodAdjustment: Unexspected Upper" );
+ OSL_ENSURE( GetUpper()->IsSctFrm(), "NeighbourhoodAdjustment: Unexspected Upper" );
if( !GetNext() && !GetPrev() )
nRet = NA_GROW_ADJUST; // section with a single column (FtnAtEnd)
else
{
const SwFrm* pTmp = Lower();
- ASSERT( pTmp, "NeighbourhoodAdjustment: Missing Lower()" );
+ OSL_ENSURE( pTmp, "NeighbourhoodAdjustment: Missing Lower()" );
if( !pTmp->GetNext() )
nRet = NA_GROW_SHRINK;
else if( !GetUpper()->IsColLocked() )
nRet = NA_ADJUST_GROW;
- ASSERT( !pTmp->GetNext() || pTmp->GetNext()->IsFtnContFrm(),
+ OSL_ENSURE( !pTmp->GetNext() || pTmp->GetNext()->IsFtnContFrm(),
"NeighbourhoodAdjustment: Who's that guy?" );
}
}
@@ -2990,9 +2852,6 @@ sal_uInt8 SwFtnBossFrm::_NeighbourhoodAdjustment( const SwFrm* ) const
|*
|* SwPageFrm::SetColMaxFtnHeight()
|*
-|* Ersterstellung AMA 29. Oct 98
-|* Letzte Aenderung AMA 29. Oct 98
-|*
|*************************************************************************/
void SwPageFrm::SetColMaxFtnHeight()
{
@@ -3012,9 +2871,6 @@ void SwPageFrm::SetColMaxFtnHeight()
|*
|* SwLayoutFrm::MoveLowerFtns
|*
-|* Ersterstellung MA 01. Sep. 94
-|* Letzte Aenderung MA 05. Sep. 95
-|*
|*************************************************************************/
@@ -3053,7 +2909,7 @@ sal_Bool SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
pStart = pStart->GetNextCntntFrm();
}
- ASSERT( pOldBoss->IsInSct() == pNewBoss->IsInSct(),
+ OSL_ENSURE( pOldBoss->IsInSct() == pNewBoss->IsInSct(),
"MoveLowerFtns: Section confusion" );
SvPtrarr *pFtnArr;
SwLayoutFrm* pNewChief = 0;
@@ -3110,15 +2966,12 @@ sal_Bool SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
|*
|* SwLayoutFrm::MoveFtnCntFwd()
|*
-|* Ersterstellung MA 24. Nov. 94
-|* Letzte Aenderung MA 15. Jun. 95
-|*
|*************************************************************************/
sal_Bool SwCntntFrm::MoveFtnCntFwd( sal_Bool bMakePage, SwFtnBossFrm *pOldBoss )
{
- ASSERT( IsInFtn(), "Keine Ftn." );
+ OSL_ENSURE( IsInFtn(), "Keine Ftn." );
SwLayoutFrm *pFtn = FindFtnFrm();
// The first paragraph in the first footnote in the first column in the
@@ -3177,7 +3030,7 @@ sal_Bool SwCntntFrm::MoveFtnCntFwd( sal_Bool bMakePage, SwFtnBossFrm *pOldBoss )
SwFtnFrm* pTmpFtn = pNewUpper->IsFtnFrm() ? ((SwFtnFrm*)pNewUpper) : 0;
if( !pTmpFtn )
{
- ASSERT( pNewUpper->IsFtnContFrm(), "Neuer Upper kein FtnCont.");
+ OSL_ENSURE( pNewUpper->IsFtnContFrm(), "Neuer Upper kein FtnCont.");
SwFtnContFrm *pCont = (SwFtnContFrm*)pNewUpper;
//Fussnote erzeugen.
@@ -3199,7 +3052,7 @@ sal_Bool SwCntntFrm::MoveFtnCntFwd( sal_Bool bMakePage, SwFtnBossFrm *pOldBoss )
pTmpFtn->Paste( pCont, pNx );
pTmpFtn->Calc();
}
- ASSERT( pTmpFtn->GetAttr() == FindFtnFrm()->GetAttr(), "Wrong Footnote!" );
+ OSL_ENSURE( pTmpFtn->GetAttr() == FindFtnFrm()->GetAttr(), "Wrong Footnote!" );
// Bereiche in Fussnoten beduerfen besonderer Behandlung
SwLayoutFrm *pNewUp = pTmpFtn;
if( IsInSct() )
@@ -3231,7 +3084,7 @@ sal_Bool SwCntntFrm::MoveFtnCntFwd( sal_Bool bMakePage, SwFtnBossFrm *pOldBoss )
pTmpNxt = (SwSectionFrm*)pTmp;
else
{
- ASSERT( pTmp->IsTabFrm(), "GetNextSctLeaf: Wrong Type" );
+ OSL_ENSURE( pTmp->IsTabFrm(), "GetNextSctLeaf: Wrong Type" );
pTmpNxt = (SwTabFrm*)pTmp;
}
pTmpNxt->MoveSubTree( pTmpFtn, pNewUp->GetNext() );
@@ -3252,9 +3105,6 @@ sal_Bool SwCntntFrm::MoveFtnCntFwd( sal_Bool bMakePage, SwFtnBossFrm *pOldBoss )
|*
|* class SwSaveFtnHeight
|*
-|* Ersterstellung MA 19. Jan. 94
-|* Letzte Aenderung MA 19. Jan. 94
-|*
|*************************************************************************/
@@ -3277,7 +3127,7 @@ SwSaveFtnHeight::~SwSaveFtnHeight()
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
//JP 15.10.2001: in a non pro version test if the attribute has the same
// meaning which his reference is
@@ -3289,7 +3139,7 @@ SwSaveFtnHeight::~SwSaveFtnHeight()
const SwCntntFrm* SwFtnFrm::GetRef() const
{
const SwCntntFrm* pRefAttr = GetRefFromAttr();
- ASSERT( pRef == pRefAttr || pRef->IsAnFollow( pRefAttr )
+ OSL_ENSURE( pRef == pRefAttr || pRef->IsAnFollow( pRefAttr )
|| pRefAttr->IsAnFollow( pRef ),
"access to deleted Frame? pRef != pAttr->GetRef()" );
return pRef;
@@ -3298,7 +3148,7 @@ const SwCntntFrm* SwFtnFrm::GetRef() const
SwCntntFrm* SwFtnFrm::GetRef()
{
const SwCntntFrm* pRefAttr = GetRefFromAttr();
- ASSERT( pRef == pRefAttr || pRef->IsAnFollow( pRefAttr )
+ OSL_ENSURE( pRef == pRefAttr || pRef->IsAnFollow( pRefAttr )
|| pRefAttr->IsAnFollow( pRef ),
"access to deleted Frame? pRef != pAttr->GetRef()" );
return pRef;
@@ -3314,7 +3164,7 @@ const SwCntntFrm* SwFtnFrm::GetRefFromAttr() const
SwCntntFrm* SwFtnFrm::GetRefFromAttr()
{
- ASSERT( pAttr, "invalid Attribute" );
+ OSL_ENSURE( pAttr, "invalid Attribute" );
SwTxtNode& rTNd = (SwTxtNode&)pAttr->GetTxtNode();
SwPosition aPos( rTNd, SwIndex( &rTNd, *pAttr->GetStart() ));
SwCntntFrm* pCFrm = rTNd.GetFrm( 0, &aPos, sal_False );
@@ -3367,3 +3217,4 @@ SwCntntFrm* SwFtnFrm::FindLastCntnt()
return pLastCntntFrm;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index 57790fbb3eb3..298761e901e1 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,6 @@
#include "pagefrm.hxx"
#include "viewsh.hxx"
#include "doc.hxx"
-#include "errhdl.hxx"
#include <fmtcntnt.hxx>
#include <fmthdft.hxx>
#include <fmtfsize.hxx>
@@ -125,7 +125,7 @@ SwHeadFootFrm::SwHeadFootFrm( SwFrmFmt * pFmt, sal_uInt16 nTypeIn)
const SwFmtCntnt &rCnt = pFmt->GetCntnt();
- ASSERT( rCnt.GetCntntIdx(), "Kein Inhalt fuer Header." );
+ OSL_ENSURE( rCnt.GetCntntIdx(), "Kein Inhalt fuer Header." );
//Fuer Header Footer die Objekte gleich erzeugen lassen.
sal_Bool bOld = bObjsDirect;
@@ -281,7 +281,7 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
// --> OD 2005-05-03 #i46941# - frame has to be valid.
// Note: frame could be invalid after calling its format,
// if it's locked
- ASSERT( StackHack::IsLocked() || !pFrm->IsTxtFrm() ||
+ OSL_ENSURE( StackHack::IsLocked() || !pFrm->IsTxtFrm() ||
pFrm->IsValid() ||
static_cast<SwTxtFrm*>(pFrm)->IsJoinLocked(),
"<SwHeadFootFrm::FormatSize(..)> - text frame invalid and not locked." );
@@ -417,7 +417,7 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
void SwHeadFootFrm::Format(const SwBorderAttrs * pAttrs)
{
- ASSERT( pAttrs, "SwFooterFrm::Format, pAttrs ist 0." );
+ OSL_ENSURE( pAttrs, "SwFooterFrm::Format, pAttrs ist 0." );
if ( bValidPrtArea && bValidSize )
return;
@@ -458,7 +458,7 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
SwBorderAttrAccess * pAccess =
new SwBorderAttrAccess( SwFrm::GetCache(), this );
- ASSERT(pAccess, "no border attributes");
+ OSL_ENSURE(pAccess, "no border attributes");
SwBorderAttrs * pAttrs = pAccess->Get();
@@ -591,7 +591,7 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
SwBorderAttrAccess * pAccess =
new SwBorderAttrAccess( SwFrm::GetCache(), this );
- ASSERT(pAccess, "no border attributes");
+ OSL_ENSURE(pAccess, "no border attributes");
SwBorderAttrs * pAttrs = pAccess->Get();
@@ -661,7 +661,7 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
sal_Bool SwHeadFootFrm::GetEatSpacing() const
{
const SwFrmFmt * pFmt = GetFmt();
- ASSERT(pFmt, "SwHeadFootFrm: no format?");
+ OSL_ENSURE(pFmt, "SwHeadFootFrm: no format?");
if (pFmt->GetHeaderAndFooterEatSpacing().GetValue())
return sal_True;
@@ -675,8 +675,6 @@ sal_Bool SwHeadFootFrm::GetEatSpacing() const
|* SwPageFrm::PrepareHeader()
|*
|* Beschreibung Erzeugt oder Entfernt Header
-|* Ersterstellung MA 04. Feb. 93
-|* Letzte Aenderung MA 12. May. 96
|*
|*************************************************************************/
@@ -714,7 +712,7 @@ void SwPageFrm::PrepareHeader()
if ( bOn && rH.IsActive() )
{ //Header einsetzen, vorher entfernen falls vorhanden.
- ASSERT( rH.GetHeaderFmt(), "FrmFmt fuer Header nicht gefunden." );
+ OSL_ENSURE( rH.GetHeaderFmt(), "FrmFmt fuer Header nicht gefunden." );
if ( pLay->GetFmt() == (SwFrmFmt*)rH.GetHeaderFmt() )
return; //Der Footer ist bereits der richtige
@@ -726,7 +724,7 @@ void SwPageFrm::PrepareHeader()
pDel->Cut();
delete pDel;
}
- ASSERT( pLay, "Wohin mit dem Header?" );
+ OSL_ENSURE( pLay, "Wohin mit dem Header?" );
SwHeaderFrm *pH = new SwHeaderFrm( (SwFrmFmt*)rH.GetHeaderFmt() );
pH->Paste( this, pLay );
if ( GetUpper() )
@@ -744,8 +742,6 @@ void SwPageFrm::PrepareHeader()
|* SwPageFrm::PrepareFooter()
|*
|* Beschreibung Erzeugt oder Entfernt Footer
-|* Ersterstellung MA 04. Feb. 93
-|* Letzte Aenderung MA 12. May. 96
|*
|*************************************************************************/
@@ -764,7 +760,7 @@ void SwPageFrm::PrepareFooter()
if ( bOn && rF.IsActive() )
{ //Footer einsetzen, vorher entfernen falls vorhanden.
- ASSERT( rF.GetFooterFmt(), "FrmFmt fuer Footer nicht gefunden." );
+ OSL_ENSURE( rF.GetFooterFmt(), "FrmFmt fuer Footer nicht gefunden." );
if ( pLay->GetFmt() == (SwFrmFmt*)rF.GetFooterFmt() )
return; //Der Footer ist bereits der richtige.
@@ -793,3 +789,4 @@ void SwPageFrm::PrepareFooter()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 1608425d94ab..353cfb81a481 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include <time.h>
#include "rootfrm.hxx"
#include "pagefrm.hxx"
@@ -65,9 +64,6 @@
#include <editeng/brshitem.hxx>
#include <SwSmartTagMgr.hxx>
-#define _SVSTDARR_BOOLS
-#include <svl/svstdarr.hxx>
-
#define _LAYACT_CXX
#include "layact.hxx"
#include <swwait.hxx>
@@ -75,9 +71,7 @@
#include <fmtanchr.hxx>
#include <tools/shl.hxx>
#include <sfx2/progress.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include "swmodule.hxx"
#include "fmtline.hxx"
@@ -95,6 +89,7 @@
#include <sortedobjs.hxx>
#include <objectformatter.hxx>
#include <PostItMgr.hxx>
+#include <vector>
// <--
//#pragma optimize("ity",on)
@@ -103,9 +98,6 @@
|*
|* SwLayAction Statisches Geraffel
|*
-|* Ersterstellung MA 22. Dec. 93
-|* Letzte Aenderung MA 22. Dec. 93
-|*
|*************************************************************************/
#define IS_FLYS (pPage->GetSortedObjs())
@@ -113,7 +105,7 @@
//Sparen von Schreibarbeit um den Zugriff auf zerstoerte Seiten zu vermeiden.
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
static void BreakPoint()
{
@@ -179,9 +171,6 @@ void SwLayAction::CheckWaitCrsr()
|*
|* SwLayAction::CheckIdleEnd()
|*
-|* Ersterstellung MA 12. Aug. 94
-|* Letzte Aenderung MA 24. Jun. 96
-|*
|*************************************************************************/
//Ist es wirklich schon soweit...
inline void SwLayAction::CheckIdleEnd()
@@ -194,9 +183,6 @@ inline void SwLayAction::CheckIdleEnd()
|*
|* SwLayAction::SetStatBar()
|*
-|* Ersterstellung MA 10. Aug. 94
-|* Letzte Aenderung MA 06. Aug. 95
-|*
|*************************************************************************/
void SwLayAction::SetStatBar( sal_Bool bNew )
{
@@ -217,8 +203,6 @@ void SwLayAction::SetStatBar( sal_Bool bNew )
|* Veraenderungen ausgegeben bzw. wird die auszugebende Flaeche in der
|* Region eingetragen.
|* PaintCntnt: fuellt die Region,
-|* Ersterstellung BP 19. Jan. 92
-|* Letzte Aenderung MA 10. Sep. 96
|*
|*************************************************************************/
sal_Bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwCntntFrm *pCnt,
@@ -373,9 +357,6 @@ void SwLayAction::PaintCntnt( const SwCntntFrm *pCnt,
|*
|* SwLayAction::SwLayAction()
|*
-|* Ersterstellung MA 30. Oct. 92
-|* Letzte Aenderung MA 09. Jun. 95
-|*
|*************************************************************************/
SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewImp *pI ) :
pRoot( pRt ),
@@ -401,7 +382,7 @@ SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewImp *pI ) :
SwLayAction::~SwLayAction()
{
- ASSERT( !pWait, "Wait object not destroyed" );
+ OSL_ENSURE( !pWait, "Wait object not destroyed" );
pImp->pLayAct = 0; //Abmelden
}
@@ -409,9 +390,6 @@ SwLayAction::~SwLayAction()
|*
|* SwLayAction::Reset()
|*
-|* Ersterstellung MA 11. Aug. 94
-|* Letzte Aenderung MA 09. Jun. 95
-|*
|*************************************************************************/
void SwLayAction::Reset()
{
@@ -428,9 +406,6 @@ void SwLayAction::Reset()
|*
|* SwLayAction::RemoveEmptyBrowserPages()
|*
-|* Ersterstellung MA 10. Sep. 97
-|* Letzte Aenderung MA 10. Sep. 97
-|*
|*************************************************************************/
sal_Bool SwLayAction::RemoveEmptyBrowserPages()
@@ -464,9 +439,6 @@ sal_Bool SwLayAction::RemoveEmptyBrowserPages()
|*
|* SwLayAction::Action()
|*
-|* Ersterstellung MA 10. Aug. 94
-|* Letzte Aenderung MA 06. Aug. 95
-|*
|*************************************************************************/
void SwLayAction::Action()
{
@@ -590,7 +562,7 @@ class NotifyLayoutOfPageInProgress
void SwLayAction::InternalAction()
{
- ASSERT( pRoot->Lower()->IsPageFrm(), ":-( Keine Seite unterhalb der Root.");
+ OSL_ENSURE( pRoot->Lower()->IsPageFrm(), ":-( Keine Seite unterhalb der Root.");
pRoot->Calc();
@@ -721,7 +693,8 @@ void SwLayAction::InternalAction()
if ( ++nLoopControlRuns_1 > nLoopControlMax )
{
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false, "LoopControl_1 in SwLayAction::InternalAction" )
+ OSL_ENSURE( false, "LoopControl_1 in SwLayAction::InternalAction" );
+
#endif
break;
}
@@ -915,7 +888,7 @@ void SwLayAction::InternalAction()
if ( ++nLoopControlRuns_3 > nLoopControlMax )
{
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false, "LoopControl_3 in Interrupt formatting in SwLayAction::InternalAction" )
+ OSL_ENSURE( false, "LoopControl_3 in Interrupt formatting in SwLayAction::InternalAction" );
#endif
break;
}
@@ -940,7 +913,7 @@ void SwLayAction::InternalAction()
if ( ++nLoopControlRuns_2 > nLoopControlMax )
{
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false, "LoopControl_2 in Interrupt formatting in SwLayAction::InternalAction" )
+ OSL_ENSURE( false, "LoopControl_2 in Interrupt formatting in SwLayAction::InternalAction" );
#endif
break;
}
@@ -978,9 +951,6 @@ void SwLayAction::InternalAction()
|*
|* SwLayAction::TurboAction(), _TurboAction()
|*
-|* Ersterstellung MA 04. Dec. 92
-|* Letzte Aenderung MA 15. Aug. 93
-|*
|*************************************************************************/
sal_Bool SwLayAction::_TurboAction( const SwCntntFrm *pCnt )
{
@@ -1069,8 +1039,6 @@ sal_Bool SwLayAction::TurboAction()
|* Fuer den BrowseMode kann auch dann der ShortCut aktiviert werden,
|* wenn der ungueltige Inhalt der Seite unterhalb des sichbaren
|* bereiches liegt.
-|* Ersterstellung MA 30. Oct. 92
-|* Letzte Aenderung MA 18. Jul. 96
|*
|*************************************************************************/
static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom )
@@ -1087,7 +1055,7 @@ static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom )
static const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom )
{
- ASSERT( pFrm->IsLayoutFrm(), "FindFirstInvaLay, no LayFrm" );
+ OSL_ENSURE( pFrm->IsLayoutFrm(), "FindFirstInvaLay, no LayFrm" );
if (lcl_IsInvaLay(pFrm, nBottom))
return pFrm;
@@ -1157,7 +1125,7 @@ static const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBotto
static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage,
long _nBottom )
{
- ASSERT( _pPage->GetSortedObjs(), "FindFirstInvaObj, no Objs" )
+ OSL_ENSURE( _pPage->GetSortedObjs(), "FindFirstInvaObj, no Objs" );
for ( sal_uInt16 i = 0; i < _pPage->GetSortedObjs()->Count(); ++i )
{
@@ -1411,14 +1379,11 @@ sal_Bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
|*
|* SwLayAction::FormatLayout(), FormatLayoutFly, FormatLayoutTab()
|*
-|* Ersterstellung MA 30. Oct. 92
-|* Letzte Aenderung MA 18. May. 98
-|*
|*************************************************************************/
// OD 15.11.2002 #105155# - introduce support for vertical layout
sal_Bool SwLayAction::FormatLayout( SwLayoutFrm *pLay, sal_Bool bAddRect )
{
- ASSERT( !IsAgain(), "Ungueltige Seite beachten." );
+ OSL_ENSURE( !IsAgain(), "Ungueltige Seite beachten." );
if ( IsAgain() )
return sal_False;
@@ -1462,8 +1427,6 @@ sal_Bool SwLayAction::FormatLayout( SwLayoutFrm *pLay, sal_Bool bAddRect )
if ( pLay->IsPageFrm() )
{
SwPageFrm* pPageFrm = static_cast<SwPageFrm*>(pLay);
- const int nBorderWidth =
- pImp->GetShell()->GetOut()->PixelToLogic( Size( pPageFrm->BorderPxWidth(), 0 ) ).Width();
const int nShadowWidth =
pImp->GetShell()->GetOut()->PixelToLogic( Size( pPageFrm->ShadowPxWidth(), 0 ) ).Width();
@@ -1474,22 +1437,20 @@ sal_Bool SwLayAction::FormatLayout( SwLayoutFrm *pLay, sal_Bool bAddRect )
{
case sw::sidebarwindows::SIDEBAR_LEFT:
{
- aPaint.Left( aPaint.Left() - nBorderWidth - nSidebarWidth);
- aPaint.Right( aPaint.Right() + nBorderWidth + nShadowWidth);
+ aPaint.Left( aPaint.Left() - nSidebarWidth);
+ aPaint.Right( aPaint.Right() + nShadowWidth);
}
break;
case sw::sidebarwindows::SIDEBAR_RIGHT:
{
- aPaint.Left( aPaint.Left() - nBorderWidth );
- aPaint.Right( aPaint.Right() + nBorderWidth + nShadowWidth + nSidebarWidth);
+ aPaint.Right( aPaint.Right() + nShadowWidth + nSidebarWidth);
}
break;
case sw::sidebarwindows::SIDEBAR_NONE:
// nothing to do
break;
}
- aPaint.Top( aPaint.Top() - nBorderWidth );
- aPaint.Bottom( aPaint.Bottom() + nBorderWidth + nShadowWidth);
+ aPaint.Bottom( aPaint.Bottom() + nShadowWidth );
}
if ( pLay->IsPageFrm() &&
@@ -1633,7 +1594,7 @@ sal_Bool SwLayAction::FormatLayout( SwLayoutFrm *pLay, sal_Bool bAddRect )
sal_Bool SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
{
- ASSERT( !IsAgain(), "Ungueltige Seite beachten." );
+ OSL_ENSURE( !IsAgain(), "Ungueltige Seite beachten." );
if ( IsAgain() )
return sal_False;
@@ -1691,7 +1652,7 @@ sal_Bool SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
// Implement vertical layout support
sal_Bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, sal_Bool bAddRect )
{
- ASSERT( !IsAgain(), "8-) Ungueltige Seite beachten." );
+ OSL_ENSURE( !IsAgain(), "8-) Ungueltige Seite beachten." );
if ( IsAgain() || !pTab->Lower() )
return sal_False;
@@ -1841,9 +1802,6 @@ sal_Bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, sal_Bool bAddRect )
|*
|* SwLayAction::FormatCntnt()
|*
-|* Ersterstellung MA 30. Oct. 92
-|* Letzte Aenderung MA 16. Nov. 95
-|*
|*************************************************************************/
sal_Bool SwLayAction::FormatCntnt( const SwPageFrm *pPage )
{
@@ -2034,15 +1992,13 @@ sal_Bool SwLayAction::FormatCntnt( const SwPageFrm *pPage )
|*
|* Beschreibung Returnt sal_True wenn der Absatz verarbeitet wurde,
|* sal_False wenn es nichts zu verarbeiten gab.
-|* Ersterstellung MA 07. Dec. 92
-|* Letzte Aenderung MA 11. Mar. 98
|*
|*************************************************************************/
void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt,
const SwPageFrm *pPage )
{
//wird sind hier evtl. nur angekommen, weil der Cntnt DrawObjekte haelt.
- const sal_Bool bDrawObjsOnly = pCntnt->IsValid() && !pCntnt->IsCompletePaint() &&
+ const bool bDrawObjsOnly = pCntnt->IsValid() && !pCntnt->IsCompletePaint() &&
!pCntnt->IsRetouche();
SWRECTFN( pCntnt )
if ( !bDrawObjsOnly && IsPaint() )
@@ -2075,8 +2031,6 @@ void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt,
|* Beschreibung:
|* - Returnt sal_True wenn alle Cntnts des Flys vollstaendig verarbeitet
|* wurden. sal_False wenn vorzeitig unterbrochen wurde.
-|* Ersterstellung MA 02. Dec. 92
-|* Letzte Aenderung MA 24. Jun. 96
|*
|*************************************************************************/
sal_Bool SwLayAction::_FormatFlyCntnt( const SwFlyFrm *pFly )
@@ -2145,13 +2099,10 @@ sal_Bool SwLayAction::IsStopPrt() const
|*
|* SwLayAction::FormatSpelling(), _FormatSpelling()
|*
-|* Ersterstellung AMA 01. Feb. 96
-|* Letzte Aenderung AMA 01. Feb. 96
-|*
|*************************************************************************/
sal_Bool SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
{
- ASSERT( pCnt->IsTxtFrm(), "NoTxt neighbour of Txt" );
+ OSL_ENSURE( pCnt->IsTxtFrm(), "NoTxt neighbour of Txt" );
// robust against misuse by e.g. #i52542#
if( !pCnt->IsTxtFrm() )
return sal_False;
@@ -2289,7 +2240,7 @@ sal_Bool SwLayIdle::DoIdleJob( IdleJobType eJob, sal_Bool bVisAreaOnly )
!SwSmartTagMgr::Get().IsSmartTagsEnabled() )
return sal_False;
break;
- default: ASSERT( false, "Unknown idle job type" )
+ default: OSL_ENSURE( false, "Unknown idle job type" );
}
SwPageFrm *pPage;
@@ -2354,16 +2305,12 @@ sal_Bool SwLayIdle::DoIdleJob( IdleJobType eJob, sal_Bool bVisAreaOnly )
}
-#ifdef DBG_UTIL
#if OSL_DEBUG_LEVEL > 1
/*************************************************************************
|*
|* void SwLayIdle::SwLayIdle()
|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 09. Jun. 94
-|*
|*************************************************************************/
void SwLayIdle::ShowIdle( ColorData eColorData )
{
@@ -2388,26 +2335,18 @@ void SwLayIdle::ShowIdle( ColorData eColorData )
#else
#define SHOW_IDLE( ColorData )
#endif
-#else
-#define SHOW_IDLE( ColorData )
-#endif
/*************************************************************************
|*
|* void SwLayIdle::SwLayIdle()
|*
-|* Ersterstellung MA 30. Oct. 92
-|* Letzte Aenderung MA 23. May. 95
-|*
|*************************************************************************/
SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
pRoot( pRt ),
pImp( pI )
-#ifdef DBG_UTIL
#if OSL_DEBUG_LEVEL > 1
, bIndicator( sal_False )
#endif
-#endif
{
pImp->pIdleAct = this;
@@ -2426,7 +2365,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
//Veraenderungen der Seitenzahl nicht zu unerwuenschten Effekten kommt.
//Wir merken uns bei welchen Shells der Cursor sichtbar ist, damit
//wir ihn bei Dokumentaenderung ggf. wieder sichbar machen koennen.
- SvBools aBools;
+ std::vector<bool> aBools;
ViewShell *pSh = pImp->GetShell();
do
{ ++pSh->nStartAction;
@@ -2587,27 +2526,15 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
if( pImp->IsAccessible() )
pImp->FireAccessibleEvents();
-#ifdef DBG_UTIL
#if OSL_DEBUG_LEVEL > 1
if ( bIndicator && pImp->GetShell()->GetWin() )
{
// #i75172# Do not invalidate indicator, this may cause a endless loop. Instead, just repaint it
// This should be replaced by an overlay object in the future, anyways. Since it's only for debug
// purposes, it is not urgent.
- static bool bCheckWithoutInvalidating(true);
- if(bCheckWithoutInvalidating)
- {
bIndicator = false; SHOW_IDLE( COL_LIGHTGREEN );
- }
- else
- {
- Rectangle aRect( 0, 0, 5, 5 );
- aRect = pImp->GetShell()->GetWin()->PixelToLogic( aRect );
- pImp->GetShell()->GetWin()->Invalidate( aRect );
- }
}
#endif
-#endif
}
SwLayIdle::~SwLayIdle()
@@ -2615,3 +2542,4 @@ SwLayIdle::~SwLayIdle()
pImp->pIdleAct = 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index bab2154bc7a9..b0c49369ff2b 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -251,7 +252,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
pSub = pSub->GetNext();
}
pTab = pTab->GetFollow();
- ASSERT( pTab, "Table follow without master" );
+ OSL_ENSURE( pTab, "Table follow without master" );
}
}
do
@@ -289,7 +290,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
SwPageFrm *pTabPage = pTab->FindPageFrm();
if( pTabPage != pPage )
{
- ASSERT( pPage->GetPhyPageNum() <
+ OSL_ENSURE( pPage->GetPhyPageNum() <
pTabPage->GetPhyPageNum(),
"Looping Tableframes" );
pPage = pTabPage;
@@ -344,7 +345,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
{
sal_Bool bRet = sal_True;
@@ -471,7 +472,7 @@ void SwLayoutCache::ClearImpl()
SwLayoutCache::~SwLayoutCache()
{
- ASSERT( !nLockCount, "Deleting a locked SwLayoutCache!?" );
+ OSL_ENSURE( !nLockCount, "Deleting a locked SwLayoutCache!?" );
delete pImpl;
}
@@ -539,7 +540,7 @@ SwLayHelper::~SwLayHelper()
{
if( pImpl )
{
- ASSERT( pDoc && pDoc->GetLayoutCache(), "Missing layoutcache" );
+ OSL_ENSURE( pDoc && pDoc->GetLayoutCache(), "Missing layoutcache" );
pDoc->GetLayoutCache()->UnlockImpl();
}
}
@@ -657,18 +658,18 @@ sal_Bool SwLayHelper::CheckInsertPage()
bNextPageOdd, bInsertEmpty, sal_False, rpPage->GetNext() );
if ( bEnd )
{
- ASSERT( rpPage->GetNext(), "Keine neue Seite?" );
+ OSL_ENSURE( rpPage->GetNext(), "Keine neue Seite?" );
do
{ rpPage = (SwPageFrm*)rpPage->GetNext();
} while ( rpPage->GetNext() );
}
else
{
- ASSERT( rpPage->GetNext(), "Keine neue Seite?" );
+ OSL_ENSURE( rpPage->GetNext(), "Keine neue Seite?" );
rpPage = (SwPageFrm*)rpPage->GetNext();
if ( rpPage->IsEmptyPage() )
{
- ASSERT( rpPage->GetNext(), "Keine neue Seite?" );
+ OSL_ENSURE( rpPage->GetNext(), "Keine neue Seite?" );
rpPage = (SwPageFrm*)rpPage->GetNext();
}
}
@@ -734,7 +735,7 @@ void lcl_ApplyWorkaroundForB6375613( SwFrm* p_pFirstFrmOnNewPage )
uno::UNO_QUERY );
try
{
- xDocInfo->setPropertyValue( rtl::OUString::createFromAscii("WorkaroundForB6375613Applied"), uno::makeAny( true ) );
+ xDocInfo->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkaroundForB6375613Applied")), uno::makeAny( true ) );
}
catch( uno::Exception& )
{
@@ -890,7 +891,7 @@ sal_Bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
SwRowFrm* pHeadline = 0;
while( nRowIdx < nRepeat )
{
- ASSERT( pTab->GetTable()->GetTabLines()[ nRowIdx ], "Table ohne Zeilen?" );
+ OSL_ENSURE( pTab->GetTable()->GetTabLines()[ nRowIdx ], "Table ohne Zeilen?" );
pHeadline =
new SwRowFrm( *pTab->GetTable()->GetTabLines()[ nRowIdx ] );
pHeadline->SetRepeatedHeadline( true );
@@ -1023,59 +1024,6 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
SwSortedObjs &rObjs = *pPage->GetSortedObjs();
sal_uInt16 nPgNum = pPage->GetPhyPageNum();
-/*
-
- //
- // NOTE: This code assumes that all objects have already been
- // inserted into the drawing layout, so that the cached objects
- // can be identified by their ordnum. Unfortunately this function
- // is called with page n if page n+1 has been inserted. Thus
- // not all the objects have been inserted and the ordnums cannot
- // be used to identify the objects.
- //
-
- for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i ) // check objects
- {
- SdrObject *pO = rObjs[i];
- if ( pO->ISA(SwVirtFlyDrawObj) ) // a text frame?
- {
- SwFlyFrm *pFly = ((SwVirtFlyDrawObj*)pO)->GetFlyFrm();
- if( pFly->Frm().Left() == WEIT_WECH && pFly->GetAnchor() &&
- !pFly->GetAnchor()->FindFooterOrHeader() )
- { // Only frame with default position and not in header/footer
- const SwContact *pC = (SwContact*)GetUserCall(pO);
- if( pC )
- {
- sal_uLong nOrdNum = pO->GetOrdNum(); // the Id
- SwFlyCache* pFlyC;
- while( nFlyIdx < nFlyCount && ( pFlyC = pImpl->
- GetFlyCache(nFlyIdx) )->nPageNum < nPgNum)
- ++nFlyIdx;
- if( nFlyIdx < nFlyCount &&
- pFlyC->nPageNum == nPgNum )
- {
- sal_uInt16 nIdx = nFlyIdx;
- while( nIdx < nFlyCount && ( pFlyC = pImpl->
- GetFlyCache( nIdx ) )->nPageNum == nPgNum &&
- pFlyC->nOrdNum != nOrdNum )
- ++nIdx;
- if( nIdx < nFlyCount && pFlyC->nPageNum == nPgNum &&
- pFlyC->nOrdNum == nOrdNum )
- { // we get the stored information
- pFly->Frm().Pos().X() = pFlyC->Left() +
- pPage->Frm().Left();
- pFly->Frm().Pos().Y() = pFlyC->Top() +
- pPage->Frm().Top();
- pFly->Frm().Width( pFlyC->Width() );
- pFly->Frm().Height( pFlyC->Height() );
- }
- }
- }
- }
- }
- }
- */
-
//
// NOTE: Here we do not use the absolute ordnums but
// relative ordnums for the objects on this page.
@@ -1237,13 +1185,10 @@ SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, sal_Bool bWrtMd ) :
sal_Bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType )
{
sal_Bool bRes = sal_True;
- size_t nLvl = aRecTypes.size();
- ASSERT( nLvl == aRecSizes.Count(), "OpenRec: Level" );
sal_uInt32 nPos = pStream->Tell();
if( bWriteMode )
{
- aRecTypes.push_back( cType );
- aRecSizes.Insert( nPos, nLvl );
+ aRecords.push_back( RecTypeSize(cType, nPos) );
*pStream << (sal_uInt32) 0;
}
else
@@ -1251,20 +1196,20 @@ sal_Bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType )
sal_uInt32 nVal;
*pStream >> nVal;
sal_uInt8 cRecTyp = (sal_uInt8)nVal;
- aRecTypes.push_back( cRecTyp );
- sal_uInt32 nSize = nVal >> 8;
- aRecSizes.Insert( nPos + nSize, nLvl );
if( !nVal || cRecTyp != cType ||
pStream->GetErrorCode() != SVSTREAM_OK || pStream->IsEof() )
{
- ASSERT( nVal, "OpenRec: Record-Header is 0" );
- ASSERT( cRecTyp == cType,
- "OpenRec: Wrong Record Type" );
- aRecTypes.back() = 0;
- aRecSizes[nLvl] = pStream->Tell();
+ OSL_ENSURE( nVal, "OpenRec: Record-Header is 0" );
+ OSL_ENSURE( cRecTyp == cType, "OpenRec: Wrong Record Type" );
+ aRecords.push_back( RecTypeSize(0, pStream->Tell()) );
bRes = sal_False;
bError = sal_True;
}
+ else
+ {
+ sal_uInt32 nSize = nVal >> 8;
+ aRecords.push_back( RecTypeSize(cRecTyp, nPos+nSize) );
+ }
}
return bRes;
}
@@ -1274,19 +1219,16 @@ sal_Bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType )
sal_Bool SwLayCacheIoImpl::CloseRec( sal_uInt8 )
{
sal_Bool bRes = sal_True;
- size_t nLvl = aRecTypes.size();
- ASSERT( nLvl == aRecSizes.Count(), "CloseRec: wrong Level" );
- ASSERT( nLvl, "CloseRec: no levels" );
- if( nLvl )
+ OSL_ENSURE( !aRecords.empty(), "CloseRec: no levels" );
+ if( !aRecords.empty() )
{
- nLvl--;
sal_uInt32 nPos = pStream->Tell();
if( bWriteMode )
{
- sal_uInt32 nBgn = aRecSizes[nLvl];
+ sal_uInt32 nBgn = aRecords.back().size;
pStream->Seek( nBgn );
sal_uInt32 nSize = nPos - nBgn;
- sal_uInt32 nVal = ( nSize << 8 ) | aRecTypes.back();
+ sal_uInt32 nVal = ( nSize << 8 ) | aRecords.back().type;
*pStream << nVal;
pStream->Seek( nPos );
if( pStream->GetError() != SVSTREAM_OK )
@@ -1294,8 +1236,8 @@ sal_Bool SwLayCacheIoImpl::CloseRec( sal_uInt8 )
}
else
{
- sal_uInt32 n = aRecSizes[nLvl];
- ASSERT( n >= nPos, "CloseRec: to much data read" );
+ sal_uInt32 n = aRecords.back().size;
+ OSL_ENSURE( n >= nPos, "CloseRec: to much data read" );
if( n != nPos )
{
pStream->Seek( n );
@@ -1305,9 +1247,7 @@ sal_Bool SwLayCacheIoImpl::CloseRec( sal_uInt8 )
if( pStream->GetErrorCode() != SVSTREAM_OK )
bRes = sal_False;
}
-
- aRecTypes.pop_back();
- aRecSizes.Remove( nLvl, 1 );
+ aRecords.pop_back();
}
if( !bRes )
@@ -1318,16 +1258,14 @@ sal_Bool SwLayCacheIoImpl::CloseRec( sal_uInt8 )
sal_uInt32 SwLayCacheIoImpl::BytesLeft()
{
- sal_uInt16 nLvl = aRecSizes.Count();
sal_uInt32 n = 0;
- if( !bError && nLvl )
+ if( !bError && !aRecords.empty() )
{
- sal_uInt32 nEndPos = aRecSizes[ nLvl-1 ];
+ sal_uInt32 nEndPos = aRecords.back().size;
sal_uInt32 nPos = pStream->Tell();
if( nEndPos > nPos )
n = nEndPos - nPos;
}
-
return n;
}
@@ -1352,13 +1290,13 @@ void SwLayCacheIoImpl::SkipRec()
{
sal_uInt8 c = Peek();
OpenRec( c );
- pStream->Seek( aRecSizes[aRecSizes.Count()-1] );
+ pStream->Seek( aRecords.back().size );
CloseRec( c );
}
sal_uInt8 SwLayCacheIoImpl::OpenFlagRec()
{
- ASSERT( !bWriteMode, "OpenFlagRec illegal in write mode" );
+ OSL_ENSURE( !bWriteMode, "OpenFlagRec illegal in write mode" );
sal_uInt8 cFlags;
*pStream >> cFlags;
nFlagRecEnd = pStream->Tell() + ( cFlags & 0x0F );
@@ -1367,9 +1305,9 @@ sal_uInt8 SwLayCacheIoImpl::OpenFlagRec()
void SwLayCacheIoImpl::OpenFlagRec( sal_uInt8 nFlags, sal_uInt8 nLen )
{
- ASSERT( bWriteMode, "OpenFlagRec illegal in read mode" );
- ASSERT( (nFlags & 0xF0) == 0, "illegal flags set" );
- ASSERT( nLen < 16, "wrong flag record length" );
+ OSL_ENSURE( bWriteMode, "OpenFlagRec illegal in read mode" );
+ OSL_ENSURE( (nFlags & 0xF0) == 0, "illegal flags set" );
+ OSL_ENSURE( nLen < 16, "wrong flag record length" );
sal_uInt8 cFlags = (nFlags << 4) + nLen;
*pStream << cFlags;
nFlagRecEnd = pStream->Tell() + nLen;
@@ -1379,12 +1317,14 @@ void SwLayCacheIoImpl::CloseFlagRec()
{
if( bWriteMode )
{
- ASSERT( pStream->Tell() == nFlagRecEnd, "Wrong amount of data written" );
+ OSL_ENSURE( pStream->Tell() == nFlagRecEnd, "Wrong amount of data written" );
}
else
{
- ASSERT( pStream->Tell() <= nFlagRecEnd, "To many data read" );
+ OSL_ENSURE( pStream->Tell() <= nFlagRecEnd, "To many data read" );
if( pStream->Tell() != nFlagRecEnd )
pStream->Seek( nFlagRecEnd );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index 48aeefa68e1f..d690940320d7 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,11 +30,11 @@
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_USHORTS
#define _SVSTDARR_ULONGS
-#define _SVSTDARR_BYTES
#define _SVSTDARR_XUB_STRLEN
#include <svl/svstdarr.hxx>
#endif
#include <swrect.hxx>
+#include <vector>
class SwDoc;
class SwFrm;
@@ -166,8 +167,13 @@ public:
class SwLayCacheIoImpl
{
- SvBytes aRecTypes;
- SvULongs aRecSizes;
+private:
+ struct RecTypeSize {
+ sal_uInt8 type;
+ sal_uLong size;
+ RecTypeSize(sal_uInt8 typ, sal_uLong siz) : type(typ), size(siz) {}
+ };
+ std::vector<RecTypeSize> aRecords;
SvStream *pStream;
@@ -230,3 +236,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx
index 17d0dd4356bc..891b048958fe 100644
--- a/sw/source/core/layout/layouter.cxx
+++ b/sw/source/core/layout/layouter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "layouter.hxx"
#include "doc.hxx"
#include "sectfrm.hxx"
@@ -72,14 +71,14 @@ public:
~SwEndnoter() { delete pEndArr; }
void CollectEndnotes( SwSectionFrm* pSct );
void CollectEndnote( SwFtnFrm* pFtn );
- const SwSectionFrm* GetSect() { return pSect; }
+ const SwSectionFrm* GetSect() const { return pSect; }
void InsertEndnotes();
sal_Bool HasEndnotes() const { return pEndArr && pEndArr->Count(); }
};
void SwEndnoter::CollectEndnotes( SwSectionFrm* pSct )
{
- ASSERT( pSct, "CollectEndnotes: Which section?" );
+ OSL_ENSURE( pSct, "CollectEndnotes: Which section?" );
if( !pSect )
pSect = pSct;
else if( pSct != pSect )
@@ -109,7 +108,7 @@ void SwEndnoter::CollectEndnote( SwFtnFrm* pFtn )
} while ( pCnt );
}
else
- { ASSERT( pNxt->Lower() && pNxt->Lower()->IsSctFrm(),
+ { OSL_ENSURE( pNxt->Lower() && pNxt->Lower()->IsSctFrm(),
"Endnote without content?" );
pNxt->Cut();
delete pNxt;
@@ -146,7 +145,7 @@ void SwEndnoter::InsertEndnotes()
pSect = NULL;
return;
}
- ASSERT( pSect->Lower() && pSect->Lower()->IsFtnBossFrm(),
+ OSL_ENSURE( pSect->Lower() && pSect->Lower()->IsFtnBossFrm(),
"InsertEndnotes: Where's my column?" );
SwFrm* pRef = pSect->FindLastCntnt( FINDMODE_MYLAST );
SwFtnBossFrm *pBoss = pRef ? pRef->FindFtnBossFrm()
@@ -159,7 +158,7 @@ void SwEndnoter::InsertEndnotes()
SwLooping::SwLooping( SwPageFrm* pPage )
{
- ASSERT( pPage, "Where's my page?" );
+ OSL_ENSURE( pPage, "Where's my page?" );
nMinPage = pPage->GetPhyPageNum();
nMaxPage = nMinPage;
nCount = 0;
@@ -198,19 +197,15 @@ void SwLooping::Control( SwPageFrm* pPage )
}
else if( ++nCount > LOOP_DETECT )
{
-#ifdef DBG_UTIL
#if OSL_DEBUG_LEVEL > 1
static sal_Bool bNoLouie = sal_False;
if( bNoLouie )
return;
-#endif
-#endif
// FME 2007-08-30 #i81146# new loop control
-#if OSL_DEBUG_LEVEL > 1
- ASSERT( 0 != mnLoopControlStage, "Looping Louie: Stage 1!" );
- ASSERT( 1 != mnLoopControlStage, "Looping Louie: Stage 2!!" );
- ASSERT( 2 > mnLoopControlStage, "Looping Louie: Stage 3!!!" );
+ OSL_ENSURE( 0 != mnLoopControlStage, "Looping Louie: Stage 1!" );
+ OSL_ENSURE( 1 != mnLoopControlStage, "Looping Louie: Stage 2!!" );
+ OSL_ENSURE( 2 > mnLoopControlStage, "Looping Louie: Stage 3!!!" );
#endif
Drastic( pPage->Lower() );
@@ -228,9 +223,6 @@ void SwLooping::Control( SwPageFrm* pPage )
|*
|* SwLayouter::SwLayouter()
|*
-|* Ersterstellung AMA 02. Nov. 99
-|* Letzte Aenderung AMA 02. Nov. 99
-|*
|*************************************************************************/
SwLayouter::SwLayouter()
@@ -285,7 +277,7 @@ void SwLayouter::InsertEndnotes( SwSectionFrm* pSect )
void SwLayouter::LoopControl( SwPageFrm* pPage, sal_uInt8 )
{
- ASSERT( pLooping, "Looping: Lost control" );
+ OSL_ENSURE( pLooping, "Looping: Lost control" );
pLooping->Control( pPage );
}
@@ -294,7 +286,7 @@ void SwLayouter::LoopingLouieLight( const SwDoc& rDoc, const SwTxtFrm& rFrm )
if ( pLooping && pLooping->IsLoopingLouieLight() )
{
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false, "Looping Louie (Light): Fixating fractious frame" )
+ OSL_ENSURE( false, "Looping Louie (Light): Fixating fractious frame" );
#endif
SwLayouter::InsertMovedFwdFrm( rDoc, rFrm, rFrm.FindPageFrm()->GetPhyPageNum() );
}
@@ -316,7 +308,7 @@ void SwLayouter::EndLoopControl()
void SwLayouter::CollectEndnotes( SwDoc* pDoc, SwSectionFrm* pSect )
{
- ASSERT( pDoc, "No doc, no fun" );
+ OSL_ENSURE( pDoc, "No doc, no fun" );
if( !pDoc->GetLayouter() )
pDoc->SetLayouter( new SwLayouter() );
pDoc->GetLayouter()->_CollectEndnotes( pSect );
@@ -340,7 +332,7 @@ sal_Bool SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFtnFrm* pFt
sal_Bool SwLayouter::StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage )
{
- ASSERT( pDoc, "No doc, no fun" );
+ OSL_ENSURE( pDoc, "No doc, no fun" );
if( !pDoc->GetLayouter() )
pDoc->SetLayouter( new SwLayouter() );
return !pDoc->GetLayouter()->pLooping &&
@@ -569,3 +561,5 @@ void SwLayouter::ClearMoveBwdLayoutInfo( const SwDoc& _rDoc )
const_cast<SwDoc&>(_rDoc).GetLayouter()->maMoveBwdLayoutInfo.clear();
}
// <--
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx b/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx
index 2b980612a98c..04802ae8710e 100644
--- a/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx
+++ b/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107,3 +108,4 @@ bool SwMovedFwdFrmsByObjPos::DoesRowContainMovedFwdFrm( const SwRowFrm& _rRowFrm
}
// <--
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 9da088849559..0c6001c4f94a 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -366,7 +367,7 @@ void _FrmInit()
{
SwRootFrm::pVout = new SwLayVout();
SwCache *pNew = new SwCache( 100, 100
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
, "static SwBorderAttrs::pCache"
#endif
);
@@ -377,13 +378,13 @@ void _FrmInit()
void _FrmFinit()
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// im Chache duerfen nur noch 0-Pointer stehen
for( sal_uInt16 n = SwFrm::GetCachePtr()->Count(); n; )
if( (*SwFrm::GetCachePtr())[ --n ] )
{
SwCacheObj* pObj = (*SwFrm::GetCachePtr())[ n ];
- ASSERT( !pObj, "Wer hat sich nicht ausgetragen?")
+ OSL_ENSURE( !pObj, "Wer hat sich nicht ausgetragen?");
}
#endif
delete SwRootFrm::pVout;
@@ -394,9 +395,6 @@ void _FrmFinit()
|*
|* RootFrm::Alles was so zur CurrShell gehoert
|*
-|* Ersterstellung MA 09. Sep. 98
-|* Letzte Aenderung MA 18. Feb. 99
-|*
|*************************************************************************/
typedef CurrShell* CurrShellPtr;
@@ -405,7 +403,7 @@ SV_IMPL_PTRARR_SORT(SwCurrShells,CurrShellPtr)
CurrShell::CurrShell( ViewShell *pNew )
{
- ASSERT( pNew, "0-Shell einsetzen?" );
+ OSL_ENSURE( pNew, "0-Shell einsetzen?" );
pRoot = pNew->GetLayout();
if ( pRoot )
{
@@ -474,8 +472,6 @@ void InitCurrShells( SwRootFrm *pRoot )
|* Der RootFrm laesst sich grundsaetzlich vom Dokument ein eigenes
|* FrmFmt geben. Dieses loescht er dann selbst im DTor.
|* Das eigene FrmFmt wird vom uebergebenen Format abgeleitet.
-|* Ersterstellung SS 05-Apr-1991
-|* Letzte Aenderung MA 12. Dec. 94
|*
|*************************************************************************/
@@ -596,9 +592,6 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
|*
|* SwRootFrm::~SwRootFrm()
|*
-|* Ersterstellung SS 05-Apr-1991
-|* Letzte Aenderung MA 12. Dec. 94
-|*
|*************************************************************************/
@@ -618,16 +611,13 @@ SwRootFrm::~SwRootFrm()
delete pCurrShells;
- ASSERT( 0==nAccessibleShells, "Some accessible shells are left" );
+ OSL_ENSURE( 0==nAccessibleShells, "Some accessible shells are left" );
}
/*************************************************************************
|*
|* SwRootFrm::RemoveMasterObjs()
|*
-|* Ersterstellung MA 19.10.95
-|* Letzte Aenderung MA 19.10.95
-|*
|*************************************************************************/
@@ -645,3 +635,4 @@ void SwRootFrm::RemoveMasterObjs( SdrPage *pPg )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx
index 36b3c186d68a..3f4c2876dd44 100644
--- a/sw/source/core/layout/objectformatter.cxx
+++ b/sw/source/core/layout/objectformatter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,7 +46,7 @@
// =============================================================================
// helper class <SwPageNumAndTypeOfAnchors>
-// --> OD 2004-10-04 #i26945# - Additionally the type of the anchor text frame
+// --> #i26945# - Additionally the type of the anchor text frame
// is collected - by type is meant 'master' or 'follow'.
// =============================================================================
class SwPageNumAndTypeOfAnchors
@@ -78,7 +79,7 @@ class SwPageNumAndTypeOfAnchors
{
tEntry* pNewEntry = new tEntry();
pNewEntry->mpAnchoredObj = &_rAnchoredObj;
- // --> OD 2004-09-23 #i33751#, #i34060# - method <GetPageFrmOfAnchor()>
+ // --> #i33751#, #i34060# - method <GetPageFrmOfAnchor()>
// is replaced by method <FindPageFrmOfAnchor()>. It's return value
// have to be checked.
SwPageFrm* pPageFrmOfAnchor = _rAnchoredObj.FindPageFrmOfAnchor();
@@ -91,7 +92,7 @@ class SwPageNumAndTypeOfAnchors
pNewEntry->mnPageNumOfAnchor = 0;
}
// <--
- // --> OD 2004-10-04 #i26945# - collect type of anchor
+ // --> #i26945# - collect type of anchor
SwTxtFrm* pAnchorCharFrm = _rAnchoredObj.FindAnchorCharFrm();
if ( pAnchorCharFrm )
{
@@ -117,7 +118,7 @@ class SwPageNumAndTypeOfAnchors
return bRetObj;
}
- inline sal_uInt32 GetPageNum( sal_uInt32 _nIndex )
+ inline sal_uInt32 GetPageNum( sal_uInt32 _nIndex ) const
{
sal_uInt32 nRetPgNum = 0L;
@@ -129,7 +130,7 @@ class SwPageNumAndTypeOfAnchors
return nRetPgNum;
}
- // --> OD 2004-10-04 #i26945#
+ // --> #i26945#
inline bool AnchoredAtMaster( sal_uInt32 _nIndex )
{
bool bAnchoredAtMaster( true );
@@ -159,7 +160,7 @@ SwObjectFormatter::SwObjectFormatter( const SwPageFrm& _rPageFrm,
mbFormatOnlyAsCharAnchored( false ),
mbConsiderWrapOnObjPos( _rPageFrm.GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION) ),
mpLayAction( _pLayAction ),
- // --> OD 2004-10-04 #i26945#
+ // --> #i26945#
mpPgNumAndTypeOfAnchors( _bCollectPgNumOfAnchors ? new SwPageNumAndTypeOfAnchors() : 0L )
// <--
{
@@ -190,7 +191,7 @@ SwObjectFormatter* SwObjectFormatter::CreateObjFormatter(
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwObjectFormatter::CreateObjFormatter(..)> - unexcepted type of anchor frame" );
}
@@ -232,11 +233,11 @@ bool SwObjectFormatter::FormatObj( SwAnchoredObject& _rAnchoredObj,
{
bool bSuccess( true );
- ASSERT( _pAnchorFrm || _rAnchoredObj.GetAnchorFrm(),
+ OSL_ENSURE( _pAnchorFrm || _rAnchoredObj.GetAnchorFrm(),
"<SwObjectFormatter::FormatObj(..)> - missing anchor frame" );
SwFrm& rAnchorFrm = _pAnchorFrm ? *(_pAnchorFrm) : *(_rAnchoredObj.AnchorFrm());
- ASSERT( _pPageFrm || rAnchorFrm.FindPageFrm(),
+ OSL_ENSURE( _pPageFrm || rAnchorFrm.FindPageFrm(),
"<SwObjectFormatter::FormatObj(..)> - missing page frame" );
const SwPageFrm& rPageFrm = _pPageFrm ? *(_pPageFrm) : *(rAnchorFrm.FindPageFrm());
@@ -247,7 +248,7 @@ bool SwObjectFormatter::FormatObj( SwAnchoredObject& _rAnchoredObj,
if ( pObjFormatter )
{
// format given floating screen object
- // --> OD 2005-01-10 #i40147# - check for moved forward anchor frame
+ // --> #i40147# - check for moved forward anchor frame
bSuccess = pObjFormatter->DoFormatObj( _rAnchoredObj, true );
// <--
}
@@ -259,7 +260,7 @@ bool SwObjectFormatter::FormatObj( SwAnchoredObject& _rAnchoredObj,
/** helper method for method <_FormatObj(..)> - performs the intrinsic format
of the layout of the given layout frame and all its lower layout frames.
- OD 2004-06-28 #i28701#
+ #i28701#
IMPORTANT NOTE:
Method corresponds to methods <SwLayAction::FormatLayoutFly(..)> and
<SwLayAction::FormatLayout(..)>. Thus, its code for the formatting have
@@ -285,7 +286,7 @@ void SwObjectFormatter::_FormatLayout( SwLayoutFrm& _rLayoutFrm )
/** helper method for method <_FormatObj(..)> - performs the intrinsic
format of the content of the given floating screen object.
- OD 2004-06-28 #i28701#
+ #i28701#
@author OD
*/
@@ -306,7 +307,7 @@ void SwObjectFormatter::_FormatObjCntnt( SwAnchoredObject& _rAnchoredObj )
pCntnt->OptCalc();
// format floating screen objects at content text frame
- // --> OD 2004-11-01 #i23129#, #i36347# - pass correct page frame to
+ // --> #i23129#, #i36347# - pass correct page frame to
// the object formatter
if ( pCntnt->IsTxtFrm() &&
!SwObjectFormatter::FormatObjsAtFrm( *pCntnt,
@@ -326,7 +327,7 @@ void SwObjectFormatter::_FormatObjCntnt( SwAnchoredObject& _rAnchoredObj )
/** performs the intrinsic format of a given floating screen object and its content.
- OD 2004-06-28 #i28701#
+ #i28701#
@author OD
*/
@@ -349,14 +350,14 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
if ( _rAnchoredObj.ISA(SwFlyFrm) )
{
SwFlyFrm& rFlyFrm = static_cast<SwFlyFrm&>(_rAnchoredObj);
- // --> OD 2004-11-15 #i34753# - reset flag, which prevents a positioning
+ // --> #i34753# - reset flag, which prevents a positioning
if ( rFlyFrm.IsFlyLayFrm() )
{
static_cast<SwFlyLayFrm&>(rFlyFrm).SetNoMakePos( false );
}
// <--
- // FME 2007-08-30 #i81146# new loop control
+ // #i81146# new loop control
sal_uInt16 nLoopControlRuns = 0;
const sal_uInt16 nLoopControlMax = 15;
@@ -364,7 +365,7 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
if ( mpLayAction )
{
mpLayAction->FormatLayoutFly( &rFlyFrm );
- // --> OD 2005-07-13 #124218# - consider, if the layout action
+ // --> consider, if the layout action
// has to be restarted due to a delete of a page frame.
if ( mpLayAction->IsAgain() )
{
@@ -376,14 +377,14 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
{
_FormatLayout( rFlyFrm );
}
- // --> OD 2004-11-15 #i34753# - prevent further positioning, if
+ // --> #i34753# - prevent further positioning, if
// to-page|to-fly anchored Writer fly frame is already clipped.
if ( rFlyFrm.IsFlyLayFrm() && rFlyFrm.IsClipped() )
{
static_cast<SwFlyLayFrm&>(rFlyFrm).SetNoMakePos( true );
}
// <--
- // --> OD 2004-11-02 #i23129#, #i36347# - pass correct page frame
+ // --> #i23129#, #i36347# - pass correct page frame
// to the object formatter
SwObjectFormatter::FormatObjsAtFrm( rFlyFrm,
*(rFlyFrm.FindPageFrm()),
@@ -392,7 +393,7 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
if ( mpLayAction )
{
mpLayAction->_FormatFlyCntnt( &rFlyFrm );
- // --> OD 2005-07-13 #124218# - consider, if the layout action
+ // --> consider, if the layout action
// has to be restarted due to a delete of a page frame.
if ( mpLayAction->IsAgain() )
{
@@ -408,13 +409,13 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
if ( ++nLoopControlRuns >= nLoopControlMax )
{
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false, "LoopControl in SwObjectFormatter::_FormatObj: Stage 3!!!" );
+ OSL_ENSURE( false, "LoopControl in SwObjectFormatter::_FormatObj: Stage 3!!!" );
#endif
rFlyFrm.ValidateThisAndAllLowers( 2 );
nLoopControlRuns = 0;
}
- // --> OD 2006-02-02 #i57917#
+ // --> #i57917#
// stop formatting of anchored object, if restart of layout process is requested.
} while ( !rFlyFrm.IsValid() &&
!_rAnchoredObj.RestartLayoutProcess() &&
@@ -430,8 +431,8 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
/** invokes the intrinsic format method for all floating screen objects,
anchored at anchor frame on the given page frame
- OD 2004-06-28 #i28701#
- OD 2004-10-08 #i26945# - for format of floating screen objects for
+ #i28701#
+ #i26945# - for format of floating screen objects for
follow text frames, the 'master' text frame is passed to the method.
Thus, the objects, whose anchor character is inside the follow text
frame can be formatted.
@@ -440,7 +441,7 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
*/
bool SwObjectFormatter::_FormatObjsAtFrm( SwTxtFrm* _pMasterTxtFrm )
{
- // --> OD 2004-10-08 #i26945#
+ // --> #i26945#
SwFrm* pAnchorFrm( 0L );
if ( GetAnchorFrm().IsTxtFrm() &&
static_cast<SwTxtFrm&>(GetAnchorFrm()).IsFollow() &&
@@ -468,7 +469,7 @@ bool SwObjectFormatter::_FormatObjsAtFrm( SwTxtFrm* _pMasterTxtFrm )
// check, if object's anchor is on the given page frame or
// object is registered at the given page frame.
- // --> OD 2004-10-05 #i26945# - check, if the anchor character of the
+ // --> #i26945# - check, if the anchor character of the
// anchored object is located in a follow text frame. If this anchor
// follow text frame differs from the given anchor frame, the given
// anchor frame is a 'master' text frame of the anchor follow text frame.
@@ -486,13 +487,13 @@ bool SwObjectFormatter::_FormatObjsAtFrm( SwTxtFrm* _pMasterTxtFrm )
continue;
}
// <--
- // --> OD 2004-09-23 #i33751#, #i34060# - method <GetPageFrmOfAnchor()>
+ // --> #i33751#, #i34060# - method <GetPageFrmOfAnchor()>
// is replaced by method <FindPageFrmOfAnchor()>. It's return value
// have to be checked.
SwPageFrm* pPageFrmOfAnchor = pAnchoredObj->FindPageFrmOfAnchor();
- ASSERT( pPageFrmOfAnchor,
+ OSL_ENSURE( pPageFrmOfAnchor,
"<SwObjectFormatter::_FormatObjsAtFrm()> - missing page frame." );
- // --> OD 2004-10-08 #i26945#
+ // --> #i26945#
if ( pPageFrmOfAnchor && pPageFrmOfAnchor == &mrPageFrm )
// <--
{
@@ -533,7 +534,7 @@ bool SwObjectFormatter::_FormatObjsAtFrm( SwTxtFrm* _pMasterTxtFrm )
/** accessor to collected anchored object
- OD 2004-07-05 #i28701#
+ #i28701#
@author OD
*/
@@ -544,7 +545,7 @@ SwAnchoredObject* SwObjectFormatter::GetCollectedObj( const sal_uInt32 _nIndex )
/** accessor to 'anchor' page number of collected anchored object
- OD 2004-07-05 #i28701#
+ #i28701#
@author OD
*/
@@ -555,7 +556,7 @@ sal_uInt32 SwObjectFormatter::GetPgNumOfCollected( const sal_uInt32 _nIndex )
/** accessor to 'anchor' type of collected anchored object
- OD 2004-10-04 #i26945#
+ #i26945#
@author OD
*/
@@ -568,7 +569,7 @@ bool SwObjectFormatter::IsCollectedAnchoredAtMaster( const sal_uInt32 _nIndex )
/** accessor to total number of collected anchored objects
- OD 2004-07-05 #i28701#
+ #i28701#
@author OD
*/
@@ -576,3 +577,5 @@ sal_uInt32 SwObjectFormatter::CountOfCollected()
{
return mpPgNumAndTypeOfAnchors ? mpPgNumAndTypeOfAnchors->Count() : 0L;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/objectformatterlayfrm.cxx b/sw/source/core/layout/objectformatterlayfrm.cxx
index a0542793912c..b8c0086fb542 100644
--- a/sw/source/core/layout/objectformatterlayfrm.cxx
+++ b/sw/source/core/layout/objectformatterlayfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,7 +61,7 @@ SwObjectFormatterLayFrm* SwObjectFormatterLayFrm::CreateObjFormatter(
if ( !_rAnchorLayFrm.IsPageFrm() &&
!_rAnchorLayFrm.IsFlyFrm() )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwObjectFormatterLayFrm::CreateObjFormatter(..)> - unexcepted type of anchor frame " );
return 0L;
}
@@ -129,7 +130,7 @@ bool SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()
{
if ( !GetAnchorFrm().IsPageFrm() )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()> - mis-usage of method, call only for anchor frames of type page frame" );
return true;
}
@@ -171,8 +172,8 @@ bool SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()
SwPageFrm* pPageFrmOfAnchor = pAnchoredObj->FindPageFrmOfAnchor();
// --> OD 2004-10-08 #i26945# - check, if the page frame of the
// object's anchor frame isn't the given page frame
- ASSERT( pPageFrmOfAnchor,
- "<SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()> - missing page frame" )
+ OSL_ENSURE( pPageFrmOfAnchor,
+ "<SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()> - missing page frame" );
if ( pPageFrmOfAnchor &&
// --> OD 2004-10-22 #i35911#
pPageFrmOfAnchor->GetPhyPageNum() < rPageFrm.GetPhyPageNum() )
@@ -213,3 +214,5 @@ bool SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()
return bSuccess;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/objectformatterlayfrm.hxx b/sw/source/core/layout/objectformatterlayfrm.hxx
index f33cb9b4cd74..a2199030a61c 100644
--- a/sw/source/core/layout/objectformatterlayfrm.hxx
+++ b/sw/source/core/layout/objectformatterlayfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,5 @@ class SwObjectFormatterLayFrm : public SwObjectFormatter
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx
index dc23771c54ad..fee9741455c8 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,17 +39,14 @@
#include <frmfmt.hxx>
#include <fmtanchr.hxx>
#include <fmtwrapinfluenceonobjpos.hxx>
-// --> OD 2004-11-03 #114798#
#include <fmtfollowtextflow.hxx>
-// <--
#include <layact.hxx>
using namespace ::com::sun::star;
// =============================================================================
-// --> OD 2004-12-03 #115759# - little helper class to forbid follow formatting
-// for the given text frame
+// little helper class to forbid follow formatting for the given text frame
class SwForbidFollowFormat
{
private:
@@ -71,7 +69,6 @@ public:
}
}
};
-// <--
// =============================================================================
// implementation of class <SwObjectFormatterTxtFrm>
@@ -102,7 +99,7 @@ SwObjectFormatterTxtFrm* SwObjectFormatterTxtFrm::CreateObjFormatter(
if ( _rAnchorTxtFrm.IsFollow() )
{
pMasterOfAnchorFrm = _rAnchorTxtFrm.FindMaster();
- while ( pMasterOfAnchorFrm->IsFollow() )
+ while ( pMasterOfAnchorFrm && pMasterOfAnchorFrm->IsFollow() )
{
pMasterOfAnchorFrm = pMasterOfAnchorFrm->FindMaster();
}
@@ -126,7 +123,7 @@ SwFrm& SwObjectFormatterTxtFrm::GetAnchorFrm()
return mrAnchorTxtFrm;
}
-// --> OD 2005-01-10 #i40147# - add parameter <_bCheckForMovedFwd>.
+// #i40147# - add parameter <_bCheckForMovedFwd>.
bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
const bool _bCheckForMovedFwd )
{
@@ -138,13 +135,12 @@ bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
return true;
}
- // --> OD 2005-07-13 #124218# - consider, if the layout action has to be
+ // consider, if the layout action has to be
// restarted due to a delete of a page frame.
if ( GetLayAction() && GetLayAction()->IsAgain() )
{
return false;
}
- // <--
bool bSuccess( true );
@@ -153,17 +149,17 @@ bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
_rAnchoredObj.SetRestartLayoutProcess( false );
_FormatObj( _rAnchoredObj );
- // --> OD 2005-07-13 #124218# - consider, if the layout action has to be
+ // consider, if the layout action has to be
// restarted due to a delete of a page frame.
if ( GetLayAction() && GetLayAction()->IsAgain() )
{
return false;
}
- // <--
// check, if layout process has to be restarted.
// if yes, perform needed invalidations.
- // --> OD 2004-11-03 #114798# - no restart of layout process,
+
+ // no restart of layout process,
// if anchored object is anchored inside a Writer fly frame,
// its position is already locked, and it follows the text flow.
const bool bRestart =
@@ -172,7 +168,6 @@ bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
_rAnchoredObj.GetAnchorFrm()->IsInFly() &&
_rAnchoredObj.GetFrmFmt().GetFollowTextFlow().GetValue() );
if ( bRestart )
- // <--
{
bSuccess = false;
_InvalidatePrevObjs( _rAnchoredObj );
@@ -181,38 +176,36 @@ bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
// format anchor text frame, if wrapping style influence of the object
// has to be considered and it's <NONE_SUCCESSIVE_POSITIONED>
- // --> OD 2004-08-25 #i3317# - consider also anchored objects, whose
+ // #i3317# - consider also anchored objects, whose
// wrapping style influence is temporarly considered.
- // --> OD 2005-01-10 #i40147# - consider also anchored objects, for
+ // #i40147# - consider also anchored objects, for
// whose the check of a moved forward anchor frame is requested.
- // --> OD 2006-07-24 #b6449874# - revise decision made for i3317:
+ // revise decision made for i3317:
// anchored objects, whose wrapping style influence is temporarly considered,
// have to be considered in method <SwObjectFormatterTxtFrm::DoFormatObjs()>
if ( bSuccess &&
_rAnchoredObj.ConsiderObjWrapInfluenceOnObjPos() &&
( _bCheckForMovedFwd ||
_rAnchoredObj.GetFrmFmt().GetWrapInfluenceOnObjPos().
- // --> OD 2004-10-18 #i35017# - handle ITERATIVE as ONCE_SUCCESSIVE
+ // #i35017# - handle ITERATIVE as ONCE_SUCCESSIVE
GetWrapInfluenceOnObjPos( true ) ==
- // --> OD 2004-10-18 #i35017# - constant name has changed
+ // #i35017# - constant name has changed
text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ) )
- // <--
{
- // --> OD 2004-10-11 #i26945# - check conditions for move forward of
+ // #i26945# - check conditions for move forward of
// anchor text frame
// determine, if anchor text frame has previous frame
const bool bDoesAnchorHadPrev = ( mrAnchorTxtFrm.GetIndPrev() != 0 );
- // --> OD 2005-01-11 #i40141# - use new method - it also formats the
+ // #i40141# - use new method - it also formats the
// section the anchor frame is in.
_FormatAnchorFrmForCheckMoveFwd();
- // <--
- // --> OD 2004-10-22 #i35911#
+ // #i35911#
if ( _rAnchoredObj.HasClearedEnvironment() )
{
_rAnchoredObj.SetClearedEnvironment( true );
- // --> OD 2005-03-08 #i44049# - consider, that anchor frame
+ // #i44049# - consider, that anchor frame
// could already been marked to move forward.
SwPageFrm* pAnchorPageFrm( mrAnchorTxtFrm.FindPageFrm() );
if ( pAnchorPageFrm != _rAnchoredObj.GetPageFrm() )
@@ -239,33 +232,30 @@ bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwObjectFormatterTxtFrm::DoFormatObj(..)> - anchor frame not marked to move forward" );
}
}
- // <--
}
else if ( !mrAnchorTxtFrm.IsFollow() && bDoesAnchorHadPrev )
- // <--
{
// index of anchored object in collection of page numbers and
// anchor types
sal_uInt32 nIdx( CountOfCollected() );
- ASSERT( nIdx > 0,
+ OSL_ENSURE( nIdx > 0,
"<SwObjectFormatterTxtFrm::DoFormatObj(..)> - anchored object not collected!?" );
--nIdx;
sal_uInt32 nToPageNum( 0L );
- // --> OD 2005-03-30 #i43913#
+ // #i43913#
bool bDummy( false );
- // --> OD 2006-01-27 #i58182# - consider new method signature
+ // #i58182# - consider new method signature
if ( SwObjectFormatterTxtFrm::CheckMovedFwdCondition( *GetCollectedObj( nIdx ),
GetPgNumOfCollected( nIdx ),
IsCollectedAnchoredAtMaster( nIdx ),
nToPageNum, bDummy ) )
- // <--
{
- // --> OD 2005-06-01 #i49987# - consider, that anchor frame
+ // #i49987# - consider, that anchor frame
// could already been marked to move forward.
bool bInsert( true );
sal_uInt32 nMovedFwdToPageNum( 0L );
@@ -299,14 +289,12 @@ bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwObjectFormatterTxtFrm::DoFormatObj(..)> - anchor frame not marked to move forward" );
}
- // <--
}
}
- // <--
- // --> OD 2005-01-12 #i40155# - mark anchor frame not to wrap around
+ // i40155# - mark anchor frame not to wrap around
// objects under the condition, that its follow contains all its text.
else if ( !mrAnchorTxtFrm.IsFollow() &&
mrAnchorTxtFrm.GetFollow() &&
@@ -319,7 +307,6 @@ bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
*(mrAnchorTxtFrm.FindPageFrm()->GetFmt()->GetDoc()),
mrAnchorTxtFrm );
}
- // <--
}
}
@@ -340,7 +327,7 @@ bool SwObjectFormatterTxtFrm::DoFormatObjs()
else
{
// the anchor text frame has to be valid, thus assert.
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwObjectFormatterTxtFrm::DoFormatObjs()> called for invalidate anchor text frame." );
}
@@ -356,7 +343,7 @@ bool SwObjectFormatterTxtFrm::DoFormatObjs()
// are registered at the 'master' anchor text frame.
// Thus, format the other floating screen objects through the 'master'
// anchor text frame
- ASSERT( mpMasterAnchorTxtFrm,
+ OSL_ENSURE( mpMasterAnchorTxtFrm,
"SwObjectFormatterTxtFrm::DoFormatObjs() - missing 'master' anchor text frame" );
bSuccess = _FormatObjsAtFrm( mpMasterAnchorTxtFrm );
@@ -372,14 +359,12 @@ bool SwObjectFormatterTxtFrm::DoFormatObjs()
bSuccess = _FormatObjsAtFrm();
}
- // --> OD 2006-07-24 #b449874#
// consider anchored objects, whose wrapping style influence are temporarly
// considered.
if ( bSuccess &&
( ConsiderWrapOnObjPos() ||
( !mrAnchorTxtFrm.IsFollow() &&
_AtLeastOneObjIsTmpConsiderWrapInfluence() ) ) )
- // <--
{
const bool bDoesAnchorHadPrev = ( mrAnchorTxtFrm.GetIndPrev() != 0 );
@@ -388,36 +373,32 @@ bool SwObjectFormatterTxtFrm::DoFormatObjs()
// previous frames of the anchor frame. The format of the previous
// frames is needed to get a correct result of format of the
// anchor frame for the following check for moved forward anchors
- // --> OD 2005-01-11 #i40141# - use new method - it also formats the
+ // #i40141# - use new method - it also formats the
// section the anchor frame is in.
_FormatAnchorFrmForCheckMoveFwd();
- // <--
sal_uInt32 nToPageNum( 0L );
- // --> OD 2005-03-30 #i43913#
+ // #i43913#
bool bInFollow( false );
- // <--
SwAnchoredObject* pObj = 0L;
if ( !mrAnchorTxtFrm.IsFollow() )
{
pObj = _GetFirstObjWithMovedFwdAnchor(
- // --> OD 2004-10-18 #i35017# - constant name has changed
+ // #i35017# - constant name has changed
text::WrapInfluenceOnPosition::ONCE_CONCURRENT,
- // <--
nToPageNum, bInFollow );
}
- // --> OD 2004-10-25 #i35911#
+ // #i35911#
if ( pObj && pObj->HasClearedEnvironment() )
{
pObj->SetClearedEnvironment( true );
- // --> OD 2005-03-08 #i44049# - consider, that anchor frame
+ // #i44049# - consider, that anchor frame
// could already been marked to move forward.
SwPageFrm* pAnchorPageFrm( mrAnchorTxtFrm.FindPageFrm() );
- // --> OD 2005-03-30 #i43913# - consider, that anchor frame
+ // #i43913# - consider, that anchor frame
// is a follow or is in a follow row, which will move forward.
if ( pAnchorPageFrm != pObj->GetPageFrm() ||
bInFollow )
- // <--
{
bool bInsert( true );
sal_uInt32 nTmpToPageNum( 0L );
@@ -441,17 +422,16 @@ bool SwObjectFormatterTxtFrm::DoFormatObjs()
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwObjectFormatterTxtFrm::DoFormatObjs(..)> - anchor frame not marked to move forward" );
}
}
}
else if ( pObj && bDoesAnchorHadPrev )
- // <--
{
// Object found, whose anchor is moved forward
- // --> OD 2005-06-01 #i49987# - consider, that anchor frame
+ // #i49987# - consider, that anchor frame
// could already been marked to move forward.
bool bInsert( true );
sal_uInt32 nMovedFwdToPageNum( 0L );
@@ -484,13 +464,11 @@ bool SwObjectFormatterTxtFrm::DoFormatObjs()
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwObjectFormatterTxtFrm::DoFormatObjs(..)> - anchor frame not marked to move forward" );
}
- // <--
}
- // <--
- // --> OD 2005-01-12 #i40155# - mark anchor frame not to wrap around
+ // #i40155# - mark anchor frame not to wrap around
// objects under the condition, that its follow contains all its text.
else if ( !mrAnchorTxtFrm.IsFollow() &&
mrAnchorTxtFrm.GetFollow() &&
@@ -503,7 +481,6 @@ bool SwObjectFormatterTxtFrm::DoFormatObjs()
*(mrAnchorTxtFrm.FindPageFrm()->GetFmt()->GetDoc()),
mrAnchorTxtFrm );
}
- // <--
}
return bSuccess;
@@ -515,12 +492,10 @@ void SwObjectFormatterTxtFrm::_InvalidatePrevObjs( SwAnchoredObject& _rAnchoredO
// positioning is <NONE_CONCURRENT_POSIITIONED>.
// Note: list of objects at anchor frame is sorted by this property.
if ( _rAnchoredObj.GetFrmFmt().GetWrapInfluenceOnObjPos().
- // --> OD 2004-10-18 #i35017# - handle ITERATIVE as ONCE_SUCCESSIVE
+ // #i35017# - handle ITERATIVE as ONCE_SUCCESSIVE
GetWrapInfluenceOnObjPos( true ) ==
- // <--
- // --> OD 2004-10-18 #i35017# - constant name has changed
+ // #i35017# - constant name has changed
text::WrapInfluenceOnPosition::ONCE_CONCURRENT )
- // <--
{
const SwSortedObjs* pObjs = GetAnchorFrm().GetDrawObjs();
if ( pObjs )
@@ -531,12 +506,10 @@ void SwObjectFormatterTxtFrm::_InvalidatePrevObjs( SwAnchoredObject& _rAnchoredO
{
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
if ( pAnchoredObj->GetFrmFmt().GetWrapInfluenceOnObjPos().
- // --> OD 2004-10-18 #i35017# - handle ITERATIVE as ONCE_SUCCESSIVE
+ // #i35017# - handle ITERATIVE as ONCE_SUCCESSIVE
GetWrapInfluenceOnObjPos( true ) ==
- // <--
- // --> OD 2004-10-18 #i35017# - constant name has changed
+ // #i35017# - constant name has changed
text::WrapInfluenceOnPosition::ONCE_CONCURRENT )
- // <--
{
pAnchoredObj->InvalidateObjPosForConsiderWrapInfluence( true );
}
@@ -571,11 +544,10 @@ SwAnchoredObject* SwObjectFormatterTxtFrm::_GetFirstObjWithMovedFwdAnchor(
sal_uInt32& _noToPageNum,
bool& _boInFollow )
{
- // --> OD 2004-10-18 #i35017# - constant names have changed
- ASSERT( _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ||
+ // #i35017# - constant names have changed
+ OSL_ENSURE( _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ||
_nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_CONCURRENT,
"<SwObjectFormatterTxtFrm::_GetFirstObjWithMovedFwdAnchor(..)> - invalid value for parameter <_nWrapInfluenceOnPosition>" );
- // <--
SwAnchoredObject* pRetAnchoredObj = 0L;
@@ -585,13 +557,12 @@ SwAnchoredObject* SwObjectFormatterTxtFrm::_GetFirstObjWithMovedFwdAnchor(
SwAnchoredObject* pAnchoredObj = GetCollectedObj(i);
if ( pAnchoredObj->ConsiderObjWrapInfluenceOnObjPos() &&
pAnchoredObj->GetFrmFmt().GetWrapInfluenceOnObjPos().
- // --> OD 2004-10-18 #i35017# - handle ITERATIVE as ONCE_SUCCESSIVE
+ // #i35017# - handle ITERATIVE as ONCE_SUCCESSIVE
GetWrapInfluenceOnObjPos( true ) == _nWrapInfluenceOnPosition )
- // <--
{
- // --> OD 2004-10-11 #i26945# - use new method <_CheckMovedFwdCondition(..)>
- // --> OD 2005-03-30 #i43913#
- // --> OD 2006-01-27 #i58182# - consider new method signature
+ // #i26945# - use new method <_CheckMovedFwdCondition(..)>
+ // #i43913#
+ // #i58182# - consider new method signature
if ( SwObjectFormatterTxtFrm::CheckMovedFwdCondition( *GetCollectedObj( i ),
GetPgNumOfCollected( i ),
IsCollectedAnchoredAtMaster( i ),
@@ -600,14 +571,13 @@ SwAnchoredObject* SwObjectFormatterTxtFrm::_GetFirstObjWithMovedFwdAnchor(
pRetAnchoredObj = pAnchoredObj;
break;
}
- // <--
}
}
return pRetAnchoredObj;
}
-// --> OD 2006-01-27 #i58182#
+// #i58182#
// - replace private method by corresponding static public method
bool SwObjectFormatterTxtFrm::CheckMovedFwdCondition(
SwAnchoredObject& _rAnchoredObj,
@@ -625,7 +595,6 @@ bool SwObjectFormatterTxtFrm::CheckMovedFwdCondition(
if ( nPageNum > _nFromPageNum )
{
_noToPageNum = nPageNum;
- // --> OD 2006-06-28 #b6443897#
// Handling of special case:
// If anchor frame is move forward into a follow flow row,
// <_noToPageNum> is set to <_nFromPageNum + 1>, because it is
@@ -641,12 +610,10 @@ bool SwObjectFormatterTxtFrm::CheckMovedFwdCondition(
_noToPageNum = _nFromPageNum + 1;
}
}
- // <--
bAnchorIsMovedForward = true;
}
}
- // <--
- // --> OD 2004-11-05 #i26945# - check, if an at-paragraph|at-character
+ // #i26945# - check, if an at-paragraph|at-character
// anchored object is now anchored at a follow text frame, which will be
// on the next page. Also check, if an at-character anchored object
// is now anchored at a text frame, which is in a follow flow row,
@@ -657,7 +624,7 @@ bool SwObjectFormatterTxtFrm::CheckMovedFwdCondition(
(_rAnchoredObj.GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AT_PARA)))
{
SwFrm* pAnchorFrm = _rAnchoredObj.GetAnchorFrmContainingAnchPos();
- ASSERT( pAnchorFrm->IsTxtFrm(),
+ OSL_ENSURE( pAnchorFrm->IsTxtFrm(),
"<SwObjectFormatterTxtFrm::CheckMovedFwdCondition(..) - wrong type of anchor frame>" );
SwTxtFrm* pAnchorTxtFrm = static_cast<SwTxtFrm*>(pAnchorFrm);
bool bCheck( false );
@@ -687,33 +654,29 @@ bool SwObjectFormatterTxtFrm::CheckMovedFwdCondition(
{
_noToPageNum = _nFromPageNum + 1;
bAnchorIsMovedForward = true;
- // --> OD 2005-03-30 #i43913#
+ // #i43913#
_boInFollow = true;
- // <--
}
}
}
- // <--
return bAnchorIsMovedForward;
}
-// <--
-// --> OD 2005-01-12 #i40140# - helper method to format layout frames used by
+// #i40140# - helper method to format layout frames used by
// method <SwObjectFormatterTxtFrm::_FormatAnchorFrmForCheckMoveFwd()>
-// --> OD 2005-03-04 #i44049# - format till a certain lower frame, if provided.
+// #i44049# - format till a certain lower frame, if provided.
void lcl_FormatCntntOfLayoutFrm( SwLayoutFrm* pLayFrm,
SwFrm* pLastLowerFrm = 0L )
{
SwFrm* pLowerFrm = pLayFrm->GetLower();
while ( pLowerFrm )
{
- // --> OD 2005-03-04 #i44049#
+ // #i44049#
if ( pLastLowerFrm && pLowerFrm == pLastLowerFrm )
{
break;
}
- // <--
if ( pLowerFrm->IsLayoutFrm() )
lcl_FormatCntntOfLayoutFrm( static_cast<SwLayoutFrm*>(pLowerFrm),
pLastLowerFrm );
@@ -723,20 +686,18 @@ void lcl_FormatCntntOfLayoutFrm( SwLayoutFrm* pLayFrm,
pLowerFrm = pLowerFrm->GetNext();
}
}
-// <--
+
/** method to format given anchor text frame and its previous frames
- OD 2005-11-17 #i56300#
+ #i56300#
Usage: Needed to check, if the anchor text frame is moved forward
due to the positioning and wrapping of its anchored objects, and
to format the frames, which have become invalid due to the anchored
object formatting in the iterative object positioning algorithm
-
- @author OD
*/
void SwObjectFormatterTxtFrm::FormatAnchorFrmAndItsPrevs( SwTxtFrm& _rAnchorTxtFrm )
{
- // --> OD 2005-04-13 #i47014# - no format of section and previous columns
+ // #i47014# - no format of section and previous columns
// for follow text frames.
if ( !_rAnchorTxtFrm.IsFollow() )
{
@@ -756,15 +717,13 @@ void SwObjectFormatterTxtFrm::FormatAnchorFrmAndItsPrevs( SwTxtFrm& _rAnchorTxtF
}
if ( pSectFrm && pSectFrm->IsSctFrm() )
{
- // --> OD 2005-03-04 #i44049#
+ // #i44049#
_rAnchorTxtFrm.LockJoin();
- // <--
SwFrm* pFrm = pSectFrm->GetUpper()->GetLower();
- // --> OD 2005-05-23 #i49605# - section frame could move forward
+ // #i49605# - section frame could move forward
// by the format of its previous frame.
// Thus, check for valid <pFrm>.
while ( pFrm && pFrm != pSectFrm )
- // <--
{
if ( pFrm->IsLayoutFrm() )
lcl_FormatCntntOfLayoutFrm( static_cast<SwLayoutFrm*>(pFrm) );
@@ -775,21 +734,19 @@ void SwObjectFormatterTxtFrm::FormatAnchorFrmAndItsPrevs( SwTxtFrm& _rAnchorTxtF
}
lcl_FormatCntntOfLayoutFrm( static_cast<SwLayoutFrm*>(pSectFrm),
&_rAnchorTxtFrm );
- // --> OD 2005-03-04 #i44049#
+ // #i44049#
_rAnchorTxtFrm.UnlockJoin();
- // <--
}
}
- // --> OD 2005-01-12 #i40140# - if anchor frame is inside a column,
+ // #i40140# - if anchor frame is inside a column,
// format the content of the previous columns.
// Note: It's a very simple format without formatting objects.
SwFrm* pColFrmOfAnchor = _rAnchorTxtFrm.FindColFrm();
if ( pColFrmOfAnchor )
{
- // --> OD 2005-03-04 #i44049#
+ // #i44049#
_rAnchorTxtFrm.LockJoin();
- // <--
SwFrm* pColFrm = pColFrmOfAnchor->GetUpper()->GetLower();
while ( pColFrm != pColFrmOfAnchor )
{
@@ -806,16 +763,13 @@ void SwObjectFormatterTxtFrm::FormatAnchorFrmAndItsPrevs( SwTxtFrm& _rAnchorTxtF
pColFrm = pColFrm->GetNext();
}
- // --> OD 2005-03-04 #i44049#
+ // #i44049#
_rAnchorTxtFrm.UnlockJoin();
- // <--
}
- // <--
}
- // <--
// format anchor frame - format of its follow not needed
- // --> OD 2005-04-08 #i43255# - forbid follow format, only if anchor text
+ // #i43255# - forbid follow format, only if anchor text
// frame is in table
if ( _rAnchorTxtFrm.IsInTab() )
{
@@ -830,9 +784,7 @@ void SwObjectFormatterTxtFrm::FormatAnchorFrmAndItsPrevs( SwTxtFrm& _rAnchorTxtF
/** method to format the anchor frame for checking of the move forward condition
- OD 2005-01-11 #i40141#
-
- @author OD
+ #i40141#
*/
void SwObjectFormatterTxtFrm::_FormatAnchorFrmForCheckMoveFwd()
{
@@ -841,10 +793,6 @@ void SwObjectFormatterTxtFrm::_FormatAnchorFrmForCheckMoveFwd()
/** method to determine if at least one anchored object has state
<temporarly consider wrapping style influence> set.
-
- OD 2006-07-24 #b6449874#
-
- @author OD
*/
bool SwObjectFormatterTxtFrm::_AtLeastOneObjIsTmpConsiderWrapInfluence()
{
@@ -868,3 +816,4 @@ bool SwObjectFormatterTxtFrm::_AtLeastOneObjIsTmpConsiderWrapInfluence()
return bRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/objectformattertxtfrm.hxx b/sw/source/core/layout/objectformattertxtfrm.hxx
index d408f0638f39..3d526f9dd214 100644
--- a/sw/source/core/layout/objectformattertxtfrm.hxx
+++ b/sw/source/core/layout/objectformattertxtfrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,7 +34,7 @@
class SwTxtFrm;
// -----------------------------------------------------------------------------
-// OD 2004-07-01 #i28701#
+// #i28701#
// Format floating screen objects, which are anchored at a given anchor text frame
// and registered at the given page frame.
// -----------------------------------------------------------------------------
@@ -51,18 +52,16 @@ class SwObjectFormatterTxtFrm : public SwObjectFormatter
SwTxtFrm* _pMasterAnchorTxtFrm,
SwLayAction* _pLayAction );
- /* method to invalidate objects, anchored previous to given object at
+ /** method to invalidate objects, anchored previous to given object at
the anchor text frame
@param _rAnchoredObj
reference to anchored object - objects, anchored previous to
this one will be invalidated.
-
- @author OD
*/
void _InvalidatePrevObjs( SwAnchoredObject& _rAnchoredObj );
- /* method to invalidate objects, anchored after the given object at
+ /** method to invalidate objects, anchored after the given object at
the page frame
@param _rAnchoredObj
@@ -72,8 +71,6 @@ class SwObjectFormatterTxtFrm : public SwObjectFormatter
@param _bInclObj
boolean indicates, if given anchored object <_rAnchoredObj> also have
to be invalidated.
-
- @author OD
*/
void _InvalidateFollowObjs( SwAnchoredObject& _rAnchoredObj,
const bool _bInclObj );
@@ -84,12 +81,12 @@ class SwObjectFormatterTxtFrm : public SwObjectFormatter
'anchor (of an object) is moved forward', if the anchor frame
respectively the anchor character of the object isn't on the
proposed page frame. Instead its on a following page
- OD 2004-10-04 #i26945# - For at-character anchored objects,
+
+ #i26945# - For at-character anchored objects,
it has also to be checked, if the anchor character is in a follow
text frame, which would move to the next page.
- OD 2005-03-30 #i43913# - add output parameter <_boInFollow>
- @author OD
+ #i43913# - add output parameter <_boInFollow>
@param _nWrapInfluenceOnPosition
input parameter - only object with this given wrapping style
@@ -119,18 +116,12 @@ class SwObjectFormatterTxtFrm : public SwObjectFormatter
/** method to format the anchor frame for checking of the move forward condition
- OD 2005-01-11 #i40141#
-
- @author OD
+ #i40141#
*/
void _FormatAnchorFrmForCheckMoveFwd();
/** method to determine if at least one anchored object has state
<temporarly consider wrapping style influence> set.
-
- OD 2006-07-24 #b6449874#
-
- @author OD
*/
bool _AtLeastOneObjIsTmpConsiderWrapInfluence();
@@ -141,16 +132,13 @@ class SwObjectFormatterTxtFrm : public SwObjectFormatter
public:
virtual ~SwObjectFormatterTxtFrm();
- // --> OD 2005-01-10 #i40147# - add parameter <_bCheckForMovedFwd>.
+ // #i40147# - add parameter <_bCheckForMovedFwd>.
virtual bool DoFormatObj( SwAnchoredObject& _rAnchoredObj,
const bool _bCheckForMovedFwd = false );
- // <--
virtual bool DoFormatObjs();
/** method to create an instance of <SwObjectFormatterTxtFrm> is
necessary.
-
- @author OD
*/
static SwObjectFormatterTxtFrm* CreateObjFormatter(
SwTxtFrm& _rAnchorTxtFrm,
@@ -159,14 +147,12 @@ class SwObjectFormatterTxtFrm : public SwObjectFormatter
/** method to format given anchor text frame and its previous frames
- OD 2005-11-17 #i56300#
+ #i56300#
Usage: Needed to check, if the anchor text frame is moved forward
due to the positioning and wrapping of its anchored objects, and
to format the frames, which have become invalid due to the anchored
object formatting in the iterative object positioning algorithm
- @author OD
-
@param _rAnchorTxtFrm
input parameter - reference to anchor text frame, which has to be
formatted including its previous frames of the page.
@@ -175,13 +161,11 @@ class SwObjectFormatterTxtFrm : public SwObjectFormatter
/** method to check the conditions, if 'anchor is moved forward'
- OD 2004-10-11 #i26945#
- OD 2005-03-30 #i43913# - add output parameter <_boInFollow>
- OD 2006-01-27 #i58182# - replace method by a corresponding static
+ #i26945#
+ #i43913# - add output parameter <_boInFollow>
+ #i58182# - replace method by a corresponding static
method, because it's needed for the iterative positioning algorithm.
- @author OD
-
@param _rAnchoredObj
input parameter - anchored object, for which the condition has to checked.
@@ -213,3 +197,5 @@ class SwObjectFormatterTxtFrm : public SwObjectFormatter
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/objstmpconsiderwrapinfl.cxx b/sw/source/core/layout/objstmpconsiderwrapinfl.cxx
index 49df0c687c0c..1c32c9c75f26 100644
--- a/sw/source/core/layout/objstmpconsiderwrapinfl.cxx
+++ b/sw/source/core/layout/objstmpconsiderwrapinfl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,3 +72,5 @@ void SwObjsMarkedAsTmpConsiderWrapInfluence::Clear()
maObjsTmpConsiderWrapInfl.pop_back();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/objstmpconsiderwrapinfl.hxx b/sw/source/core/layout/objstmpconsiderwrapinfl.hxx
index 90504c199edd..f5fd89b3b435 100644
--- a/sw/source/core/layout/objstmpconsiderwrapinfl.hxx
+++ b/sw/source/core/layout/objstmpconsiderwrapinfl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,3 +46,5 @@ class SwObjsMarkedAsTmpConsiderWrapInfluence
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 9792fc09ed42..29c51dff0725 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,7 +59,6 @@
#include "frmtool.hxx"
#include "fldbas.hxx"
#include "hints.hxx"
-#include "errhdl.hxx"
#include "swtable.hxx"
#include "ftnidx.hxx"
@@ -85,9 +85,6 @@ using namespace ::com::sun::star;
|*
|* SwBodyFrm::SwBodyFrm()
|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 01. Aug. 93
-|*
|*************************************************************************/
SwBodyFrm::SwBodyFrm( SwFrmFmt *pFmt ):
SwLayoutFrm( pFmt )
@@ -99,9 +96,6 @@ SwBodyFrm::SwBodyFrm( SwFrmFmt *pFmt ):
|*
|* SwBodyFrm::Format()
|*
-|* Ersterstellung MA 30. May. 94
-|* Letzte Aenderung MA 20. Jan. 99
-|*
|*************************************************************************/
void SwBodyFrm::Format( const SwBorderAttrs * )
{
@@ -189,13 +183,26 @@ void SwBodyFrm::Format( const SwBorderAttrs * )
bValidSize = bValidPrtArea = sal_True;
}
+void SwBodyFrm::Paint( const SwRect& rRect, const SwPrintData* ) const
+{
+#if OSL_DEBUG_LAYOUT > 1
+ // Paint a red border around the SwBodyFrm in debug mode
+ ViewShell *pSh = GetShell();
+ OutputDevice* pOut = pSh->GetOut();
+ pOut->Push();
+ pOut->SetLineColor(Color(255, 0, 0));
+ pOut->SetFillColor(COL_TRANSPARENT);
+ SwRect aRect = Frm();
+ pOut->DrawRect(aRect.SVRect());
+ pOut->Pop();
+#endif
+ SwLayoutFrm::Paint(rRect);
+}
+
/*************************************************************************
|*
|* SwPageFrm::SwPageFrm(), ~SwPageFrm()
|*
-|* Ersterstellung MA 20. Oct. 92
-|* Letzte Aenderung MA 08. Dec. 97
-|*
|*************************************************************************/
SwPageFrm::SwPageFrm( SwFrmFmt *pFmt, SwPageDesc *pPgDsc ) :
SwFtnBossFrm( pFmt ),
@@ -356,11 +363,6 @@ void SwPageFrm::CheckDirection( sal_Bool bVert )
else if(FRMDIR_VERT_TOP_LEFT==nDir)
bVertLR = 1;
}
-/*
- if( pDesc && pDesc->GetName().GetChar(0)=='x')
- bReverse = 1;
- else
- */
bReverse = 0;
bInvalidVert = 0;
}
@@ -380,8 +382,6 @@ void SwPageFrm::CheckDirection( sal_Bool bVert )
|*
|* Beschreibung Erzeugt die Spezifischen Flys zur Seite und formatiert
|* generischen Cntnt
-|* Ersterstellung MA 20. Oct. 92
-|* Letzte Aenderung MA 09. Nov. 95
|*
|*************************************************************************/
void MA_FASTCALL lcl_FormatLay( SwLayoutFrm *pLay )
@@ -429,7 +429,7 @@ void MA_FASTCALL lcl_MakeObjs( const SwSpzFrmFmts &rTbl, SwPageFrm *pPage )
pSdrObj = 0;
if ( bSdrObj && 0 == (pSdrObj = pFmt->FindSdrObject()) )
{
- ASSERT( sal_False, "DrawObject not found." );
+ OSL_ENSURE( sal_False, "DrawObject not found." );
pFmt->GetDoc()->DelFrmFmt( pFmt );
--i;
continue;
@@ -537,9 +537,6 @@ void SwPageFrm::PreparePage( sal_Bool bFtn )
|*
|* SwPageFrm::Modify()
|*
-|* Ersterstellung MA 20. Oct. 92
-|* Letzte Aenderung MA 03. Mar. 96
-|*
|*************************************************************************/
void SwPageFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
@@ -602,17 +599,17 @@ void SwPageFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
//Abgesehen von den Grossenverhaeltnissen sind noch andere
//Dinge betroffen.
//1. Spaltigkeit.
- ASSERT( pOld && pNew, "FMT_CHG Missing Format." );
+ OSL_ENSURE( pOld && pNew, "FMT_CHG Missing Format." );
const SwFmt* pOldFmt = ((SwFmtChg*)pOld)->pChangedFmt;
const SwFmt* pNewFmt = ((SwFmtChg*)pNew)->pChangedFmt;
- ASSERT( pOldFmt && pNewFmt, "FMT_CHG Missing Format." );
+ OSL_ENSURE( pOldFmt && pNewFmt, "FMT_CHG Missing Format." );
const SwFmtCol &rOldCol = pOldFmt->GetCol();
const SwFmtCol &rNewCol = pNewFmt->GetCol();
if( rOldCol != rNewCol )
{
SwLayoutFrm *pB = FindBodyCont();
- ASSERT( pB, "Seite ohne Body." );
+ OSL_ENSURE( pB, "Seite ohne Body." );
pB->ChgColumns( rOldCol, rNewCol );
rInvFlags |= 0x20;
}
@@ -680,7 +677,7 @@ void SwPageFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
case RES_COL:
{
SwLayoutFrm *pB = FindBodyCont();
- ASSERT( pB, "Seite ohne Body." );
+ OSL_ENSURE( pB, "Seite ohne Body." );
pB->ChgColumns( *(const SwFmtCol*)pOld, *(const SwFmtCol*)pNew );
rInvFlags |= 0x22;
}
@@ -733,8 +730,6 @@ void SwPageFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
|* SwPageFrm::GetInfo()
|*
|* Beschreibung erfragt Informationen
-|* Ersterstellung JP 31.03.94
-|* Letzte Aenderung JP 31.03.94
|*
*************************************************************************/
// erfrage vom Modify Informationen
@@ -752,9 +747,6 @@ sal_Bool SwPageFrm::GetInfo( SfxPoolItem & rInfo ) const
|*
|* SwPageFrm::SetPageDesc()
|*
-|* Ersterstellung MA 02. Nov. 94
-|* Letzte Aenderung MA 02. Nov. 94
-|*
|*************************************************************************/
void SwPageFrm::SetPageDesc( SwPageDesc *pNew, SwFrmFmt *pFmt )
{
@@ -778,8 +770,6 @@ void SwPageFrm::SetPageDesc( SwPageDesc *pNew, SwFrmFmt *pFmt )
|* Dokument oder Standard (der 0-te) wenn der erste Absatz keinen
|* wuenscht.
|* (6. Im HTML-Mode ist der Pagedesc immer die HTML-Seitenvorlage.)
-|* Ersterstellung MA 15. Feb. 93
-|* Letzte Aenderung MA 17. Jun. 99
|*
|*************************************************************************/
SwPageDesc *SwPageFrm::FindPageDesc()
@@ -846,7 +836,7 @@ SwPageDesc *SwPageFrm::FindPageDesc()
->GetPageDesc( 0 ));
- ASSERT( pRet, "Kein Descriptor gefunden." );
+ OSL_ENSURE( pRet, "Kein Descriptor gefunden." );
return pRet;
}
@@ -878,9 +868,6 @@ inline void SetLastPage( SwPageFrm *pPage )
|*
|* SwPageFrm::Cut()
|*
-|* Ersterstellung MA 23. Feb. 94
-|* Letzte Aenderung MA 22. Jun. 95
-|*
|*************************************************************************/
void SwPageFrm::Cut()
{
@@ -952,17 +939,14 @@ void SwPageFrm::Cut()
|*
|* SwPageFrm::Paste()
|*
-|* Ersterstellung MA 23. Feb. 94
-|* Letzte Aenderung MA 07. Dec. 94
-|*
|*************************************************************************/
void SwPageFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
{
- ASSERT( pParent->IsRootFrm(), "Parent ist keine Root." );
- ASSERT( pParent, "Kein Parent fuer Paste." );
- ASSERT( pParent != this, "Bin selbst der Parent." );
- ASSERT( pSibling != this, "Bin mein eigener Nachbar." );
- ASSERT( !GetPrev() && !GetNext() && !GetUpper(),
+ OSL_ENSURE( pParent->IsRootFrm(), "Parent ist keine Root." );
+ OSL_ENSURE( pParent, "Kein Parent fuer Paste." );
+ OSL_ENSURE( pParent != this, "Bin selbst der Parent." );
+ OSL_ENSURE( pSibling != this, "Bin mein eigener Nachbar." );
+ OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(),
"Bin noch irgendwo angemeldet." );
//In den Baum einhaengen.
@@ -1002,9 +986,6 @@ void SwPageFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
|*
|* SwPageFrm::PrepareRegisterChg()
|*
-|* Ersterstellung AMA 22. Jul. 96
-|* Letzte Aenderung AMA 22. Jul. 96
-|*
|*************************************************************************/
void lcl_PrepFlyInCntRegister( SwCntntFrm *pFrm )
{
@@ -1069,13 +1050,10 @@ void SwPageFrm::PrepareRegisterChg()
|* aufgespuehrt werden, so wird versucht die Situation moeglichst
|* einfache zu bereinigen.
|*
-|* Ersterstellung MA 10. Feb. 93
-|* Letzte Aenderung MA 18. Apr. 96
-|*
|*************************************************************************/
void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields )
{
- ASSERT( pStart, "Keine Startpage." );
+ OSL_ENSURE( pStart, "Keine Startpage." );
ViewShell *pSh = pStart->GetShell();
SwViewImp *pImp = pSh ? pSh->Imp() : 0;
@@ -1202,10 +1180,10 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields )
if ( pPage->GetFmt() != pFmtWish )
pPage->SetFrmFmt( pFmtWish );
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
{
- ASSERT( sal_False, "CheckPageDescs, missing solution" );
+ OSL_ENSURE( sal_False, "CheckPageDescs, missing solution" );
}
#endif
}
@@ -1245,7 +1223,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields )
pDoc->UpdatePageFlds( &aMsgHnt );
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
//Ein paar Pruefungen muessen schon erlaubt sein.
//1. Keine zwei EmptyPages hintereinander.
@@ -1258,7 +1236,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields )
{
if ( bEmpty )
{
- ASSERT( sal_False, "Doppelte Leerseiten." );
+ OSL_ENSURE( sal_False, "Doppelte Leerseiten." );
break; //Einmal reicht.
}
bEmpty = sal_True;
@@ -1270,7 +1248,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields )
//moeglich: Ein paar Seiten, auf der ersten 'erste Seite' anwenden,
//rechte als folge der ersten, linke als folge der rechten, rechte als
//folge der linken.
-// ASSERT( pPg->GetPageDesc() == pPg->FindPageDesc(),
+// OSL_ENSURE( pPg->GetPageDesc() == pPg->FindPageDesc(),
// "Seite mit falschem Descriptor." );
pPg = (SwPageFrm*)pPg->GetNext();
@@ -1282,10 +1260,6 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields )
|*
|* SwFrm::InsertPage()
|*
-|* Beschreibung
-|* Ersterstellung MA 10. Feb. 93
-|* Letzte Aenderung MA 27. Jul. 93
-|*
|*************************************************************************/
SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, sal_Bool bFtn )
{
@@ -1315,7 +1289,7 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, sal_Bool bFtn )
if ( !pDesc )
pDesc = pPrevPage->GetPageDesc()->GetFollow();
- ASSERT( pDesc, "Missing PageDesc" );
+ OSL_ENSURE( pDesc, "Missing PageDesc" );
if( !(bWishedOdd ? pDesc->GetRightFmt() : pDesc->GetLeftFmt()) )
bWishedOdd = !bWishedOdd;
@@ -1346,7 +1320,7 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, sal_Bool bFtn )
bCheckPages = sal_True;
}
pFmt = bWishedOdd ? pDesc->GetRightFmt() : pDesc->GetLeftFmt();
- ASSERT( pFmt, "Descriptor without format." );
+ OSL_ENSURE( pFmt, "Descriptor without format." );
SwPageFrm *pPage = new SwPageFrm( pFmt, pDesc );
pPage->Paste( pRoot, pSibling );
pPage->PreparePage( bFtn );
@@ -1421,9 +1395,6 @@ sw::sidebarwindows::SidebarPosition SwPageFrm::SidebarPosition() const
|*
|* SwRootFrm::GrowFrm()
|*
-|* Ersterstellung MA 30. Jul. 92
-|* Letzte Aenderung MA 05. May. 94
-|*
|*************************************************************************/
SwTwips SwRootFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
@@ -1436,14 +1407,11 @@ SwTwips SwRootFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
|*
|* SwRootFrm::ShrinkFrm()
|*
-|* Ersterstellung MA 30. Jul. 92
-|* Letzte Aenderung MA 05. May. 94
-|*
|*************************************************************************/
SwTwips SwRootFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
{
- ASSERT( nDist >= 0, "nDist < 0." );
- ASSERT( nDist <= Frm().Height(), "nDist > als aktuelle Groesse." );
+ OSL_ENSURE( nDist >= 0, "nDist < 0." );
+ OSL_ENSURE( nDist <= Frm().Height(), "nDist > als aktuelle Groesse." );
if ( !bTst )
Frm().SSize().Height() -= nDist;
@@ -1465,9 +1433,6 @@ SwTwips SwRootFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
|* - einmal fuer die Endnotenseiten.
|* - und einmal fuer die Seiten des Bodytextes.
|*
-|* Ersterstellung MA 20. May. 92
-|* Letzte Aenderung MA 10. Jan. 95
-|*
|*************************************************************************/
void SwRootFrm::RemoveSuperfluous()
{
@@ -1529,7 +1494,7 @@ void SwRootFrm::RemoveSuperfluous()
while ( pPage->IsFtnPage() )
{
pPage = (SwPageFrm*)pPage->GetPrev();
- ASSERT( pPage, "Nur noch Endnotenseiten uebrig." );
+ OSL_ENSURE( pPage, "Nur noch Endnotenseiten uebrig." );
}
continue;
}
@@ -1566,9 +1531,6 @@ void SwRootFrm::RemoveSuperfluous()
|* sind, damit alle Seitengebundenen Rahmen und DrawObject
|* untergebracht sind.
|*
-|* Ersterstellung MA 27. Jul. 93
-|* Letzte Aenderung MA 24. Apr. 97
-|*
|*************************************************************************/
void SwRootFrm::AssertFlyPages()
{
@@ -1652,9 +1614,6 @@ void SwRootFrm::AssertFlyPages()
|* auf allen Seiten die Seitengebunden Objecte auf der richtigen
|* Seite (Seitennummer stehen).
|*
-|* Ersterstellung MA 02. Nov. 94
-|* Letzte Aenderung MA 10. Aug. 95
-|*
|*************************************************************************/
void SwRootFrm::AssertPageFlys( SwPageFrm *pPage )
{
@@ -1682,14 +1641,14 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage )
{
//Umhaengen kann er sich selbst, indem wir ihm
//einfach ein Modify mit seinem AnkerAttr schicken.
-#ifndef DBG_UTIL
- rFmt.SwModify::Modify( 0, (SwFmtAnchor*)&rAnch );
-#else
+#if OSL_DEBUG_LEVEL > 1
const sal_uInt32 nCnt = pPage->GetSortedObjs()->Count();
rFmt.SwModify::Modify( 0, (SwFmtAnchor*)&rAnch );
- ASSERT( !pPage->GetSortedObjs() ||
+ OSL_ENSURE( !pPage->GetSortedObjs() ||
nCnt != pPage->GetSortedObjs()->Count(),
"Kann das Obj nicht umhaengen." );
+#else
+ rFmt.SwModify::Modify( 0, (SwFmtAnchor*)&rAnch );
#endif
--i;
}
@@ -1704,9 +1663,6 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage )
|*
|* SwRootFrm::ChgSize()
|*
-|* Ersterstellung MA 24. Jul. 92
-|* Letzte Aenderung MA 13. Aug. 93
-|*
|*************************************************************************/
Size SwRootFrm::ChgSize( const Size& aNewSize )
{
@@ -1720,9 +1676,6 @@ Size SwRootFrm::ChgSize( const Size& aNewSize )
|*
|* SwRootFrm::MakeAll()
|*
-|* Ersterstellung MA 17. Nov. 92
-|* Letzte Aenderung MA 19. Apr. 93
-|*
|*************************************************************************/
void SwRootFrm::MakeAll()
{
@@ -1744,9 +1697,6 @@ void SwRootFrm::MakeAll()
|*
|* SwRootFrm::ImplInvalidateBrowseWidth()
|*
-|* Ersterstellung MA 08. Jun. 96
-|* Letzte Aenderung MA 08. Jun. 96
-|*
|*************************************************************************/
void SwRootFrm::ImplInvalidateBrowseWidth()
{
@@ -1763,13 +1713,10 @@ void SwRootFrm::ImplInvalidateBrowseWidth()
|*
|* SwRootFrm::ImplCalcBrowseWidth()
|*
-|* Ersterstellung MA 07. Jun. 96
-|* Letzte Aenderung MA 13. Jun. 96
-|*
|*************************************************************************/
void SwRootFrm::ImplCalcBrowseWidth()
{
- ASSERT( GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE),
+ OSL_ENSURE( GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE),
"CalcBrowseWidth and not in BrowseView" );
//Die (minimale) Breite wird von Rahmen, Tabellen und Zeichenobjekten
@@ -1898,9 +1845,6 @@ void SwRootFrm::ImplCalcBrowseWidth()
|*
|* SwRootFrm::StartAllAction()
|*
-|* Ersterstellung MA 08. Mar. 98
-|* Letzte Aenderung MA 08. Mar. 98
-|*
|*************************************************************************/
void SwRootFrm::StartAllAction()
@@ -2137,7 +2081,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
}
else
{
- ASSERT( pViewOpt, "CheckViewLayout required ViewOptions" )
+ OSL_ENSURE( pViewOpt, "CheckViewLayout required ViewOptions" );
const sal_uInt16 nColumns = pViewOpt->GetViewLayoutColumns();
const bool bBookMode = pViewOpt->IsViewLayoutBookMode();
@@ -2291,11 +2235,9 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
// first page in book mode is always special:
if ( bFirstRow && mbBookMode )
{
- // --> OD 2008-04-08 #i88036#
-// nCurrentRowWidth += pStartOfRow->Frm().Width() + nSidebarWidth;
+ // #i88036#
nCurrentRowWidth +=
pStartOfRow->GetFormatPage().Frm().Width() + nSidebarWidth;
- // <--
}
// center page if possible
@@ -2311,10 +2253,8 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
if ( bFirstRow && mbBookMode )
{
- // --> OD 2008-04-08 #i88036#
-// nX += pStartOfRow->Frm().Width() + nSidebarWidth;
+ // #i88036#
nX += pStartOfRow->GetFormatPage().Frm().Width() + nSidebarWidth;
- // <--
}
SwPageFrm* pEndOfRow = pPageFrm;
@@ -2465,16 +2405,6 @@ bool SwRootFrm::IsLeftToRightViewLayout() const
// <--
}
-/*const SwRect SwRootFrm::GetExtendedPageArea( sal_uInt16 nPageNumber ) const
-{
- SwRect aRet;
- ASSERT( nPageNumber < maPageRects.size(), "No extended page area available" )
- if ( nPageNumber < maPageRects.size() )
- aRet = maPageRects[ nPageNumber ];
- return aRet;
-}*/
-
-
const SwPageFrm& SwPageFrm::GetFormatPage() const
{
const SwPageFrm* pRet = this;
@@ -2499,10 +2429,11 @@ const SwPageFrm& SwPageFrm::GetFormatPage() const
pRet = static_cast<const SwPageFrm*>( GetNext() );
}
}
- ASSERT( pRet,
+ OSL_ENSURE( pRet,
"<SwPageFrm::GetFormatPage()> - inconsistent layout: empty page without previous and next page frame --> crash." );
// <--
}
return *pRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index 71eaebf14893..aeebee1294db 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,9 +56,6 @@
|*
|* SwPageDesc::SwPageDesc()
|*
-|* Ersterstellung MA 25. Jan. 93
-|* Letzte Aenderung MA 16. Feb. 94
-|*
|*************************************************************************/
@@ -122,8 +120,6 @@ SwPageDesc::~SwPageDesc()
|*
|* Beschreibung Gespiegelt werden nur die Raender.
|* Attribute wie Umrandung und dergleichen werden 1:1 kopiert.
-|* Ersterstellung MA 25. Jan. 93
-|* Letzte Aenderung 01. Nov. 94
|*
|*************************************************************************/
@@ -167,8 +163,6 @@ void SwPageDesc::ResetAllAttr( sal_Bool bLeft )
|* SwPageDesc::GetInfo()
|*
|* Beschreibung erfragt Informationen
-|* Ersterstellung JP 31.03.94
-|* Letzte Aenderung JP 31.03.94
|*
*************************************************************************/
@@ -176,14 +170,9 @@ void SwPageDesc::ResetAllAttr( sal_Bool bLeft )
// erfrage vom Modify Informationen
sal_Bool SwPageDesc::GetInfo( SfxPoolItem & rInfo ) const
{
-// if( RES_AUTOFMT_DOCNODE == rInfo.Which() )
-// {
- // dann weiter zum Format
- if( !aMaster.GetInfo( rInfo ) )
- return sal_False; // gefunden
- return aLeft.GetInfo( rInfo );
-// }
-// return sal_True; // weiter suchen
+ if( !aMaster.GetInfo( rInfo ) )
+ return sal_False; // found
+ return aLeft.GetInfo( rInfo );
}
/*************************************************************************
@@ -191,8 +180,6 @@ sal_Bool SwPageDesc::GetInfo( SfxPoolItem & rInfo ) const
|* SwPageDesc::SetRegisterFmtColl()
|*
|* Beschreibung setzt die Vorlage fuer die Registerhaltigkeit
-|* Ersterstellung AMA 22.07.96
-|* Letzte Aenderung AMA 22.07.96
|*
*************************************************************************/
@@ -215,8 +202,6 @@ void SwPageDesc::SetRegisterFmtColl( const SwTxtFmtColl* pFmt )
|* SwPageDesc::GetRegisterFmtColl()
|*
|* Beschreibung holt die Vorlage fuer die Registerhaltigkeit
-|* Ersterstellung AMA 22.07.96
-|* Letzte Aenderung AMA 22.07.96
|*
*************************************************************************/
@@ -232,8 +217,6 @@ const SwTxtFmtColl* SwPageDesc::GetRegisterFmtColl() const
|* SwPageDesc::RegisterChange()
|*
|* Beschreibung benachrichtigt alle betroffenen PageFrames
-|* Ersterstellung AMA 22.07.96
-|* Letzte Aenderung AMA 22.07.96
|*
*************************************************************************/
@@ -282,8 +265,6 @@ void SwPageDesc::RegisterChange()
|*
|* Beschreibung reagiert insbesondere auf Aenderungen
|* der Vorlage fuer die Registerhaltigkeit
-|* Ersterstellung AMA 22.07.96
-|* Letzte Aenderung AMA 22.07.96
|*
*************************************************************************/
@@ -343,13 +324,13 @@ const SwFrmFmt* SwPageDesc::GetPageFmtOfNode( const SwNode& rNd,
const SwPageDesc* pPd = bCheckForThisPgDc ? this :
((SwPageFrm*)pChkFrm)->GetPageDesc();
pRet = &pPd->GetMaster();
- ASSERT( ((SwPageFrm*)pChkFrm)->GetPageDesc() == pPd,
+ OSL_ENSURE( ((SwPageFrm*)pChkFrm)->GetPageDesc() == pPd,
"Falcher Node fuers erkennen des Seitenformats" );
// an welchem Format haengt diese Seite?
if( pRet != pChkFrm->GetRegisteredIn() )
{
pRet = &pPd->GetLeft();
- ASSERT( pRet == pChkFrm->GetRegisteredIn(),
+ OSL_ENSURE( pRet == pChkFrm->GetRegisteredIn(),
"Falcher Node fuers erkennen des Seitenformats" );
}
}
@@ -378,9 +359,6 @@ sal_Bool SwPageDesc::IsFollowNextPageOfNode( const SwNode& rNd ) const
|*
|* SwPageFtnInfo::SwPageFtnInfo()
|*
-|* Ersterstellung MA 24. Feb. 93
-|* Letzte Aenderung MA 24. Feb. 93
-|*
|*************************************************************************/
@@ -416,9 +394,6 @@ SwPageFtnInfo::SwPageFtnInfo( const SwPageFtnInfo &rCpy ) :
|*
|* SwPageFtnInfo::operator=
|*
-|* Ersterstellung MA 24. Feb. 93
-|* Letzte Aenderung MA 24. Feb. 93
-|*
|*************************************************************************/
@@ -438,9 +413,6 @@ SwPageFtnInfo &SwPageFtnInfo::operator=( const SwPageFtnInfo& rCpy )
|*
|* SwPageFtnInfo::operator==
|*
-|* Ersterstellung MA 01. Mar. 93
-|* Letzte Aenderung MA 01. Mar. 93
-|*
|*************************************************************************/
@@ -510,3 +482,5 @@ SwPageDescExt::operator SwPageDesc() const
return aResult;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/pagefrm.src b/sw/source/core/layout/pagefrm.src
new file mode 100644
index 000000000000..83b80e4714f9
--- /dev/null
+++ b/sw/source/core/layout/pagefrm.src
@@ -0,0 +1,17 @@
+#include "pagefrm.hrc"
+
+Bitmap BMP_PAGE_RIGHT_SHADOW_MASK
+{
+ File = "page-right-shadow-mask.png";
+};
+
+Bitmap BMP_PAGE_BOTTOM_RIGHT_SHADOW_MASK
+{
+ File = "page-bottomright-shadow-mask.png";
+};
+
+Bitmap BMP_PAGE_BOTTOM_SHADOW_MASK
+{
+ File = "page-bottom-shadow-mask.png";
+};
+
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index e0f4914da529..483832ecd966 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -106,6 +107,10 @@
#define COL_NOTES_SIDEPANE_SCROLLAREA RGB_COLORDATA(230,230,220)
#include <vcl/svapp.hxx>
+#include <svtools/borderhelper.hxx>
+
+#include "pagefrm.hrc"
+
using namespace ::com::sun::star;
#define GETOBJSHELL() ((SfxObjectShell*)rSh.GetDoc()->GetDocShell())
@@ -147,15 +152,17 @@ using namespace ::com::sun::star;
class SwLineRect : public SwRect
{
const Color *pColor;
+ SvxBorderStyle nStyle;
const SwTabFrm *pTab;
sal_uInt8 nSubColor; //Hilfslinien einfaerben
sal_Bool bPainted; //schon gepaintet?
sal_uInt8 nLock; //Um die Linien zum Hell-Layer abzugrenzen.
public:
- SwLineRect( const SwRect &rRect, const Color *pCol,
+ SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle,
const SwTabFrm *pT , const sal_uInt8 nSCol );
const Color *GetColor() const { return pColor;}
+ SvxBorderStyle GetStyle() const { return nStyle; }
const SwTabFrm *GetTab() const { return pTab; }
void SetPainted() { bPainted = sal_True; }
void Lock( sal_Bool bLock ) { if ( bLock )
@@ -177,7 +184,7 @@ class SwLineRects : public SwLRects
sal_uInt16 nLastCount; //unuetze Durchlaeufe im PaintLines verhindern.
public:
SwLineRects() : nLastCount( 0 ) {}
- void AddLineRect( const SwRect& rRect, const Color *pColor,
+ void AddLineRect( const SwRect& rRect, const Color *pColor, const SvxBorderStyle nStyle,
const SwTabFrm *pTab, const sal_uInt8 nSCol );
void ConnectEdges( OutputDevice *pOut );
void PaintLines ( OutputDevice *pOut );
@@ -408,10 +415,11 @@ SwSavePaintStatics::~SwSavePaintStatics()
SV_IMPL_VARARR( SwLRects, SwLineRect );
-SwLineRect::SwLineRect( const SwRect &rRect, const Color *pCol,
+SwLineRect::SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyl,
const SwTabFrm *pT, const sal_uInt8 nSCol ) :
SwRect( rRect ),
pColor( pCol ),
+ nStyle( nStyl ),
pTab( pT ),
nSubColor( nSCol ),
bPainted( sal_False ),
@@ -456,7 +464,7 @@ sal_Bool SwLineRect::MakeUnion( const SwRect &rRect )
return sal_False;
}
-void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol,
+void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle,
const SwTabFrm *pTab, const sal_uInt8 nSCol )
{
//Rueckwaerts durch, weil Linien die zusammengefasst werden koennen i.d.R.
@@ -475,7 +483,7 @@ void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol,
return;
}
}
- Insert( SwLineRect( rRect, pCol, pTab, nSCol ), Count() );
+ Insert( SwLineRect( rRect, pCol, nStyle, pTab, nSCol ), Count() );
}
void SwLineRects::ConnectEdges( OutputDevice *pOut )
@@ -582,7 +590,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
if ( !rL1.IsInside( aIns ) )
continue;
const sal_uInt16 nTmpFree = Free();
- Insert( SwLineRect( aIns, rL1.GetColor(),
+ Insert( SwLineRect( aIns, rL1.GetColor(), SOLID,
rL1.GetTab(), SUBCOL_TAB ), Count() );
if ( !nTmpFree )
{
@@ -623,7 +631,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
if ( !rL1.IsInside( aIns ) )
continue;
const sal_uInt16 nTmpFree = Free();
- Insert( SwLineRect( aIns, rL1.GetColor(),
+ Insert( SwLineRect( aIns, rL1.GetColor(), SOLID,
rL1.GetTab(), SUBCOL_TAB ), Count() );
if ( !nTmpFree )
{
@@ -653,7 +661,7 @@ inline void SwSubsRects::Ins( const SwRect &rRect, const sal_uInt8 nSCol )
//Linien die kuerzer als die breiteste Linienbreite sind werden
//nicht aufgenommen.
if ( rRect.Height() > DEF_LINE_WIDTH_4 || rRect.Width() > DEF_LINE_WIDTH_4 )
- Insert( SwLineRect( rRect, 0, 0, nSCol ), Count());
+ Insert( SwLineRect( rRect, 0, SOLID, 0, nSCol ), Count());
}
void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
@@ -694,12 +702,12 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
if ( rLine.IsLocked () )
continue;
- if ( (!bVerticalSubs == (rLine.Height() > rLine.Width())) ) //gleiche Ausrichtung?
+ if ( !bVerticalSubs == (rLine.Height() > rLine.Width()) ) // same direction?
continue;
if ( aSubsRect.IsOver( rLine ) )
{
- if ( bVerticalSubs ) //Vertikal?
+ if ( bVerticalSubs ) // Vertical?
{
if ( aSubsRect.Left() <= rLine.Right() &&
aSubsRect.Right() >= rLine.Left() )
@@ -709,7 +717,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
{
SwRect aNewSubsRect( aSubsLineRect );
aNewSubsRect.Bottom( nTmp );
- Insert( SwLineRect( aNewSubsRect, 0, 0,
+ Insert( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0,
aSubsLineRect.GetSubColor() ), Count());
}
nTmp = rLine.Bottom()+nPixelSzH+1;
@@ -717,7 +725,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
{
SwRect aNewSubsRect( aSubsLineRect );
aNewSubsRect.Top( nTmp );
- Insert( SwLineRect( aNewSubsRect, 0, 0,
+ Insert( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0,
aSubsLineRect.GetSubColor() ), Count());
}
Remove( i, 1 );
@@ -735,7 +743,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
{
SwRect aNewSubsRect( aSubsLineRect );
aNewSubsRect.Right( nTmp );
- Insert( SwLineRect( aNewSubsRect, 0, 0,
+ Insert( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0,
aSubsLineRect.GetSubColor() ), Count());
}
nTmp = rLine.Right()+nPixelSzW+1;
@@ -743,7 +751,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
{
SwRect aNewSubsRect( aSubsLineRect );
aNewSubsRect.Left( nTmp );
- Insert( SwLineRect( aNewSubsRect, 0, 0,
+ Insert( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0,
aSubsLineRect.GetSubColor() ), Count());
}
Remove( i, 1 );
@@ -762,6 +770,44 @@ void SwLineRects::LockLines( sal_Bool bLock )
operator[](i).Lock( bLock );
}
+void lcl_DrawDashedRect( OutputDevice * pOut, SwLineRect & rLRect )
+{
+ double nHalfLWidth = rLRect.Height( );
+ if ( nHalfLWidth > 1 )
+ {
+ nHalfLWidth = nHalfLWidth / 2;
+ }
+ else
+ {
+ nHalfLWidth = 1;
+ }
+
+ long startX = rLRect.Left( );
+ long startY = rLRect.Top( ) + nHalfLWidth;
+ long endX = rLRect.Left( ) + rLRect.Width( );
+ long endY = rLRect.Top( ) + nHalfLWidth;
+
+ if ( rLRect.Height( ) > rLRect.Width( ) )
+ {
+ nHalfLWidth = rLRect.Width( );
+ if ( nHalfLWidth > 1 )
+ {
+ nHalfLWidth = nHalfLWidth / 2;
+ }
+ else
+ {
+ nHalfLWidth = 1;
+ }
+ startX = rLRect.Left( ) + nHalfLWidth;
+ startY = rLRect.Top( );
+ endX = rLRect.Left( ) + nHalfLWidth;
+ endY = rLRect.Top( ) + rLRect.Height( );
+ }
+
+ svtools::DrawLine( *pOut, Point( startX, startY ), Point( endX, endY ),
+ sal_uInt32( nHalfLWidth * 2 ), rLRect.GetStyle( ) );
+}
+
void SwLineRects::PaintLines( OutputDevice *pOut )
{
//Painten der Umrandungen. Leider muessen wir zweimal durch.
@@ -775,6 +821,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
// OD 2004-04-23 #116347#
pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
+ pOut->SetFillColor();
pOut->SetLineColor();
ConnectEdges( pOut );
const Color *pLast = 0;
@@ -833,11 +880,12 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
pOut->SetDrawMode( 0 );
- pOut->SetFillColor( *pLast );
+ pOut->SetLineColor( *pLast );
pOut->SetDrawMode( nOldDrawMode );
}
+
if( !rLRect.IsEmpty() )
- pOut->DrawRect( rLRect.SVRect() );
+ lcl_DrawDashedRect( pOut, rLRect );
rLRect.SetPainted();
}
else
@@ -871,7 +919,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
pOut->SetDrawMode( nOldDrawMode );
}
if( !rLRect.IsEmpty() )
- pOut->DrawRect( rLRect.SVRect() );
+ lcl_DrawDashedRect( pOut, rLRect );
rLRect.SetPainted();
}
nLastCount = nMinCount;
@@ -899,7 +947,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 )
{
@@ -1352,12 +1400,12 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
continue;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
//Flys, die innerhalb des eigenen verankert sind, muessen eine
//groessere OrdNum haben oder Zeichengebunden sein.
if ( pSelfFly && bLowerOfSelf )
{
- ASSERT( pFly->IsFlyInCntFrm() ||
+ OSL_ENSURE( pFly->IsFlyInCntFrm() ||
pSdrObj->GetOrdNumDirect() > pSelfFly->GetVirtDrawObj()->GetOrdNumDirect(),
"Fly with wrong z-Order" );
}
@@ -1477,16 +1525,6 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
pRetoucheFly = 0;
}
-// --> OD 2008-05-16 #i84659# - no longer needed
-//inline sal_Bool IsShortCut( const SwRect &rRect, const SwRect &rFrmRect )
-//{
-// //Wenn der Frm vollstaendig rechts neben bzw. unter dem
-// //Rect sitzt ist's genug mit Painten.
-// return rFrmRect.Top() > rRect.Bottom();
-// // PAGES01 || (rFrmRect.Left() > rRect.Right()) );
-//}
-// <--
-
//---------------- Ausgabe fuer das BrushItem ----------------
/** lcl_DrawGraphicBackgrd - local help method to draw a background for a graphic
@@ -1815,7 +1853,7 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush,
bDraw = sal_False;
break;
- default: ASSERT( !pOutDev, "new Graphic position?" );
+ default: OSL_ENSURE( !pOutDev, "new Graphic position?" );
}
/// OD 02.09.2002 #99657#
@@ -2036,39 +2074,37 @@ void lcl_AdjustRectToPixelSize( SwRect& io_aSwRect, const OutputDevice &aOut )
io_aSwRect = SwRect( aSizedRect );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
Rectangle aTestOrgPxRect = aOut.LogicToPixel( io_aSwRect.SVRect() );
Rectangle aTestNewPxRect = aOut.LogicToPixel( aSizedRect );
- ASSERT( aTestOrgPxRect == aTestNewPxRect,
+ OSL_ENSURE( aTestOrgPxRect == aTestNewPxRect,
"Error in lcl_AlignRectToPixelSize(..): Adjusted rectangle has incorrect position or size");
-#if OSL_DEBUG_LEVEL > 1
Rectangle aTestNewRect( aSizedRect );
/// check Left()
--aSizedRect.Left();
aTestNewPxRect = aOut.LogicToPixel( aSizedRect );
- ASSERT( aTestOrgPxRect.Left() >= (aTestNewPxRect.Left()+1),
+ OSL_ENSURE( aTestOrgPxRect.Left() >= (aTestNewPxRect.Left()+1),
"Error in lcl_AlignRectToPixelSize(..): Left() not correct adjusted");
++aSizedRect.Left();
/// check Right()
++aSizedRect.Right();
aTestNewPxRect = aOut.LogicToPixel( aSizedRect );
- ASSERT( aTestOrgPxRect.Right() <= (aTestNewPxRect.Right()-1),
+ OSL_ENSURE( aTestOrgPxRect.Right() <= (aTestNewPxRect.Right()-1),
"Error in lcl_AlignRectToPixelSize(..): Right() not correct adjusted");
--aSizedRect.Right();
/// check Top()
--aSizedRect.Top();
aTestNewPxRect = aOut.LogicToPixel( aSizedRect );
- ASSERT( aTestOrgPxRect.Top() >= (aTestNewPxRect.Top()+1),
+ OSL_ENSURE( aTestOrgPxRect.Top() >= (aTestNewPxRect.Top()+1),
"Error in lcl_AlignRectToPixelSize(..): Top() not correct adjusted");
++aSizedRect.Top();
/// check Bottom()
++aSizedRect.Bottom();
aTestNewPxRect = aOut.LogicToPixel( aSizedRect );
- ASSERT( aTestOrgPxRect.Bottom() <= (aTestNewPxRect.Bottom()-1),
+ OSL_ENSURE( aTestOrgPxRect.Bottom() <= (aTestNewPxRect.Bottom()-1),
"Error in lcl_AlignRectToPixelSize(..): Bottom() not correct adjusted");
--aSizedRect.Bottom();
#endif
-#endif
}
@@ -2281,7 +2317,7 @@ void SwTabFrmPainter::PaintLines( OutputDevice& rDev, const SwRect& rRect ) cons
break;
const SwLineEntrySet& rEntrySet = (*aIter).second;
- SwLineEntrySetIter aSetIter = rEntrySet.begin();
+ SwLineEntrySetConstIter aSetIter = rEntrySet.begin();
while ( aSetIter != rEntrySet.end() )
{
const SwLineEntry& rEntry = *aSetIter;
@@ -2457,7 +2493,7 @@ void SwTabFrmPainter::FindStylesForLine( const Point& rStartPoint,
// pStyles[ 6 ] = bHori ? aRFromB : BFromR,
SwLineEntryMapConstIter aMapIter = maVertLines.find( rStartPoint.X() );
- ASSERT( aMapIter != maVertLines.end(), "FindStylesForLine: Error" )
+ OSL_ENSURE( aMapIter != maVertLines.end(), "FindStylesForLine: Error" );
const SwLineEntrySet& rVertSet = (*aMapIter).second;
SwLineEntrySetConstIter aIter = rVertSet.begin();
@@ -2482,7 +2518,7 @@ void SwTabFrmPainter::FindStylesForLine( const Point& rStartPoint,
}
aMapIter = maHoriLines.find( rStartPoint.Y() );
- ASSERT( aMapIter != maHoriLines.end(), "FindStylesForLine: Error" )
+ OSL_ENSURE( aMapIter != maHoriLines.end(), "FindStylesForLine: Error" );
const SwLineEntrySet& rHoriSet = (*aMapIter).second;
aIter = rHoriSet.begin();
@@ -2509,7 +2545,7 @@ void SwTabFrmPainter::FindStylesForLine( const Point& rStartPoint,
if ( bHori )
{
aMapIter = maVertLines.find( rEndPoint.X() );
- ASSERT( aMapIter != maVertLines.end(), "FindStylesForLine: Error" )
+ OSL_ENSURE( aMapIter != maVertLines.end(), "FindStylesForLine: Error" );
const SwLineEntrySet& rVertSet2 = (*aMapIter).second;
aIter = rVertSet2.begin();
@@ -2526,7 +2562,7 @@ void SwTabFrmPainter::FindStylesForLine( const Point& rStartPoint,
else
{
aMapIter = maHoriLines.find( rEndPoint.Y() );
- ASSERT( aMapIter != maHoriLines.end(), "FindStylesForLine: Error" )
+ OSL_ENSURE( aMapIter != maHoriLines.end(), "FindStylesForLine: Error" );
const SwLineEntrySet& rHoriSet2 = (*aMapIter).second;
aIter = rHoriSet2.begin();
@@ -2632,7 +2668,7 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori )
if ( SwLineEntry::OVERLAP1 == nOverlapType )
{
- ASSERT( rNew.mnStartPos >= rOld.mnStartPos, "Overlap type 3? How this?" )
+ OSL_ENSURE( rNew.mnStartPos >= rOld.mnStartPos, "Overlap type 3? How this?" );
// new left segment
const SwLineEntry aLeft( nKey, rOld.mnStartPos, rNew.mnStartPos, rOldAttr );
@@ -2719,15 +2755,12 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori )
|* 3. Den Dokumentinhalt (Text) Painten.
|* 4. Den Drawlayer der ueber dem Dokuemnt liegt painten.
|*
-|* Ersterstellung MA 01. Jun. 92
-|* Letzte Aenderung MA 10. Oct. 97
-|*
|*************************************************************************/
void
SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
{
- ASSERT( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." );
+ OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." );
PROTOCOL( this, PROT_FILE_INIT, 0, 0)
@@ -2766,8 +2799,6 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
// --> OD 2008-10-07 #i92745#
// Extend check on certain states of the 'current' <ViewShell> instance to
// all existing <ViewShell> instances.
-// if ( !pSh->IsInEndAction() && !pSh->IsPaintInProgress() &&
-// (!pSh->Imp()->IsAction() || !pSh->Imp()->GetLayAction().IsActionInProgress() ) )
bool bPerformLayoutAction( true );
{
ViewShell* pTmpViewShell = pSh;
@@ -2827,7 +2858,16 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
while ( pPage )
// <--
{
- const bool bPaintRightShadow = !bBookMode || (pPage == Lower()) || (!bLTR && !pPage->OnRightPage()) || (bLTR && pPage->OnRightPage());
+ // Paint right shadow in single page mode, or if we're on last page of
+ // the doc, or if ???Lower()??? or if we're on a page with no right
+ // sibling (OnRightPage should be renamed as OnEvenPage since it does
+ // not take reading direction into account)
+ const bool bPaintRightShadow = !bBookMode || (!pPage->GetNext()) || (pPage == Lower()) || (!bLTR && !pPage->OnRightPage()) || (bLTR && pPage->OnRightPage());
+ // Have a full bottom shadow on side by side pages.
+ // TODO Do not draw full shadow if our sibling hasn't the
+ // same orientation
+ const bool bFullBottomShadow = bBookMode && pPage->GetPrev() &&
+ ((!bLTR && !pPage->OnRightPage()) || (bLTR && pPage->OnRightPage()));
const bool bRightSidebar = pPage->SidebarPosition() == sw::sidebarwindows::SIDEBAR_RIGHT;
if ( !pPage->IsEmptyPage() )
@@ -2847,20 +2887,6 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
aPaintRect._Intersection( aRect );
- // --> OD 2007-11-14 #i82616#
- // Invalidate area for extra data (line numbers or change tracking
- // marks), if painting on a window and the paint is trigger by an
- // end action. The inefficient and simple enlargement of the
- // paint area is replaced by this invalidation.
- // if ( bExtraData )
- // {
- // //Ja, das ist grob, aber wie macht man es besser?
- // SWRECTFN( pPage )
- // (aPaintRect.*fnRect->fnSetLeftAndWidth)(
- // (pPage->Frm().*fnRect->fnGetLeft)(),
- // (pPage->Frm().*fnRect->fnGetWidth)() );
- // aPaintRect._Intersection( pSh->VisArea() );
- // }
if ( bExtraData &&
pSh->GetWin() && pSh->IsInEndAction() )
{
@@ -2947,7 +2973,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
{
// OD 12.02.2003 #i9719#, #105645# - use new method
// <SwPageFrm::PaintBorderAndShadow(..)>.
- SwPageFrm::PaintBorderAndShadow( pPage->Frm(), pSh, bPaintRightShadow, bRightSidebar );
+ SwPageFrm::PaintBorderAndShadow( pPage->Frm(), pSh, bPaintRightShadow, bFullBottomShadow, bRightSidebar );
SwPageFrm::PaintNotesSidebar( pPage->Frm(), pSh, pPage->GetPhyPageNum(), bRightSidebar);
}
@@ -3039,7 +3065,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
// paint shadow and border for empty page
// OD 19.02.2003 #107369# - use new method to paint page border and
// shadow
- SwPageFrm::PaintBorderAndShadow( aEmptyPageRect, pSh, bPaintRightShadow, bRightSidebar );
+ SwPageFrm::PaintBorderAndShadow( aEmptyPageRect, pSh, bPaintRightShadow, bFullBottomShadow, bRightSidebar );
SwPageFrm::PaintNotesSidebar( aEmptyPageRect, pSh, pPage->GetPhyPageNum(), bRightSidebar);
{
@@ -3048,25 +3074,13 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
}
}
- ASSERT( !pPage->GetNext() || pPage->GetNext()->IsPageFrm(),
+ OSL_ENSURE( !pPage->GetNext() || pPage->GetNext()->IsPageFrm(),
"Nachbar von Seite keine Seite." );
pPage = (SwPageFrm*)pPage->GetNext();
}
DELETEZ( pLines );
-#ifdef FRANK_TEST
- if ( pSh->GetWin() )
- {
- Rectangle aRect( aFrm.SVRect() );
- pSh->GetWin()->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
- pSh->GetWin()->SetFillColor();
- pSh->GetWin()->SetLineColor( COL_LIGHTRED );
- pSh->GetWin()->DrawRect( aRect );
- pSh->GetWin()->Pop();
- }
-#endif
-
if ( bResetRootPaint )
SwRootFrm::bInPaint = sal_False;
if ( pStatics )
@@ -3080,49 +3094,10 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
((SwRootFrm*)this)->SetCallbackActionEnabled( bOldAction );
}
-#ifdef LONG_TABLE_HACK
-
-/*************************************************************************
-|*
-|* SwRootFrm::HackPrepareLongTblPaint()
-|*
-|* Ersterstellung MA 27. Sep. 96
-|* Letzte Aenderung MA 18. Nov. 97
-|*
-|*************************************************************************/
-
-void SwRootFrm::HackPrepareLongTblPaint( int nMode )
-{
- switch ( nMode )
- {
- case HACK_TABLEMODE_INIT : ASSERT( !pLines, "HackPrepare: already prepared" );
- pLines = new SwLineRects;
- ASSERT( !pGlobalShell, "old GlobalShell lost" );
- pGlobalShell = GetShell();
- bTableHack = sal_True;
- break;
- case HACK_TABLEMODE_LOCKLINES : pLines->LockLines( sal_True ); break;
- case HACK_TABLEMODE_PAINTLINES : pLines->PaintLines( GetShell()->GetOut() );
- break;
- case HACK_TABLEMODE_UNLOCKLINES: pLines->LockLines( sal_False ); break;
- case HACK_TABLEMODE_EXIT : pLines->PaintLines( GetShell()->GetOut() );
- DELETEZ( pLines );
- pGlobalShell = 0;
- bTableHack = sal_False;
- break;
- }
-}
-
-#endif
-
-
/*************************************************************************
|*
|* SwLayoutFrm::Paint()
|*
-|* Ersterstellung MA 19. May. 92
-|* Letzte Aenderung MA 19. Apr. 95
-|*
|*************************************************************************/
void MA_FASTCALL lcl_EmergencyFormatFtnCont( SwFtnContFrm *pCont )
@@ -3373,9 +3348,6 @@ sal_Bool SwFlyFrm::IsShadowTransparent() const
|*
|* SwFlyFrm::IsPaint()
|*
-|* Ersterstellung MA 16. Jan. 97
-|* Letzte Aenderung MA 16. Jan. 97
-|*
|*************************************************************************/
sal_Bool SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
@@ -3451,7 +3423,7 @@ sal_Bool SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
// OD 02.07.2003 #108784# - debug assert
if ( !pObj->ISA(SdrObjGroup) )
{
- ASSERT( false, "<SwFlyFrm::IsPaint(..)> - paint of drawing object without anchor frame!?" );
+ OSL_ENSURE( false, "<SwFlyFrm::IsPaint(..)> - paint of drawing object without anchor frame!?" );
}
}
}
@@ -3482,9 +3454,6 @@ void SwCellFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
|*
|* SwFlyFrm::Paint()
|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 16. Jan. 97
-|*
|*************************************************************************/
//Weiter unten definiert
@@ -3610,7 +3579,6 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
// --> OD 2007-12-13 #i80822#
// suppress painting of background in printing area for
// non-transparent graphics.
-// if ( bPaintMarginOnly )
if ( bPaintMarginOnly ||
( pNoTxt && !bIsGraphicTransparent ) )
// <--
@@ -3628,7 +3596,6 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
// used in <SwNoTxtFrm::Paint(..)> to set the clip region
// for painting the graphic/OLE. Thus, the clip region is
// also applied for the PDF export.
-// if ( !pOut->GetConnectMetaFile() || pOut->GetOutDevType() == OUTDEV_PRINTER )
ViewShell *pSh = GetShell();
if ( !pOut->GetConnectMetaFile() || !pSh->GetWin() )
// <--
@@ -3721,9 +3688,6 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
|*
|* SwTabFrm::Paint()
|*
-|* Ersterstellung MA 11. May. 93
-|* Letzte Aenderung MA 23. Mar. 95
-|*
|*************************************************************************/
void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
@@ -3774,8 +3738,6 @@ void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
|* Der Schatten wird immer an den auesseren Rand des OutRect gemalt.
|* Das OutRect wird ggf. so verkleinert, dass auf diesem das
|* malen der Umrandung stattfinden kann.
-|* Ersterstellung MA 21. Dec. 92
-|* Letzte Aenderung MA 29. May. 97
|*
|*************************************************************************/
/// OD 23.08.2002 #99657#
@@ -3934,7 +3896,7 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
}
break;
default:
- ASSERT( !this, "new ShadowLocation() ?" )
+ OSL_ENSURE( !this, "new ShadowLocation() ?" );
break;
}
@@ -3983,15 +3945,13 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
|*
|* SwFrm::PaintBorderLine()
|*
-|* Ersterstellung MA 22. Dec. 92
-|* Letzte Aenderung MA 22. Jan. 95
-|*
|*************************************************************************/
void SwFrm::PaintBorderLine( const SwRect& rRect,
const SwRect& rOutRect,
const SwPageFrm *pPage,
- const Color *pColor ) const
+ const Color *pColor,
+ const SvxBorderStyle nStyle ) const
{
if ( !rOutRect.IsOver( rRect ) )
return;
@@ -4014,10 +3974,10 @@ void SwFrm::PaintBorderLine( const SwRect& rRect,
SwRegionRects aRegion( aOut, 4, 1 );
::lcl_SubtractFlys( this, pPage, aOut, aRegion );
for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
- pLines->AddLineRect( aRegion[i], pColor, pTab, nSubCol );
+ pLines->AddLineRect( aRegion[i], pColor, nStyle, pTab, nSubCol );
}
else
- pLines->AddLineRect( aOut, pColor, pTab, nSubCol );
+ pLines->AddLineRect( aOut, pColor, nStyle, pTab, nSubCol );
}
/*************************************************************************
@@ -4025,8 +3985,6 @@ void SwFrm::PaintBorderLine( const SwRect& rRect,
|* SwFrm::PaintBorderLines()
|*
|* Beschreibung Nur alle Linien einfach oder alle Linien doppelt!!!!
-|* Ersterstellung MA 22. Dec. 92
-|* Letzte Aenderung MA 22. Mar. 95
|*
|*************************************************************************/
@@ -4308,7 +4266,8 @@ void lcl_PaintLeftRightLine( const sal_Bool _bLeft,
(aPaintRect.*_rRectFn->fnAddRight)( 1 );
}
}
- _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pLeftRightBorder->GetColor() );
+ _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pLeftRightBorder->GetColor(),
+ pLeftRightBorder->GetStyle( ) );
}
if ( pLeftRightBorder->GetInWidth() )
@@ -4348,7 +4307,8 @@ void lcl_PaintLeftRightLine( const sal_Bool _bLeft,
(aPaintRect.*_rRectFn->fnAddRight)( 1 );
}
}
- _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pLeftRightBorder->GetColor() );
+ _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pLeftRightBorder->GetColor(),
+ SOLID );
}
}
}
@@ -4412,7 +4372,8 @@ void lcl_PaintTopBottomLine( const sal_Bool _bTop,
(aPaintRect.*_rRectFn->fnAddBottom)( 1 );
}
}
- _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pTopBottomBorder->GetColor() );
+ _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pTopBottomBorder->GetColor(),
+ pTopBottomBorder->GetStyle( ) );
}
if ( pTopBottomBorder->GetInWidth() )
@@ -4451,7 +4412,8 @@ void lcl_PaintTopBottomLine( const sal_Bool _bTop,
(aPaintRect.*_rRectFn->fnAddBottom)( 1 );
}
}
- _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pTopBottomBorder->GetColor() );
+ _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pTopBottomBorder->GetColor(),
+ SOLID );
}
}
}
@@ -4467,8 +4429,8 @@ void lcl_PaintTopBottomLine( const sal_Bool _bTop,
const SwFrm* lcl_HasNextCell( const SwFrm& rFrm )
{
- ASSERT( rFrm.IsCellFrm(),
- "lcl_HasNextCell( const SwFrm& rFrm ) should be called with SwCellFrm" )
+ OSL_ENSURE( rFrm.IsCellFrm(),
+ "lcl_HasNextCell( const SwFrm& rFrm ) should be called with SwCellFrm" );
const SwFrm* pTmpFrm = &rFrm;
do
@@ -4489,8 +4451,6 @@ const SwFrm* lcl_HasNextCell( const SwFrm& rFrm )
|* SwFrm::PaintBorder()
|*
|* Beschreibung Malt Schatten und Umrandung
-|* Ersterstellung MA 23.01.92
-|* Letzte Aenderung MA 29. Jul. 96
|*
|*************************************************************************/
@@ -4521,7 +4481,7 @@ const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm,
const SwBorderAttrs& _rCellBorderAttrs,
const bool _bTop )
{
- ASSERT( _pCellFrm, "No cell frame available, dying soon" )
+ OSL_ENSURE( _pCellFrm, "No cell frame available, dying soon" );
// determine, if cell frame is at bottom/top border of a table frame and
// the table frame has/is a follow.
@@ -4550,7 +4510,7 @@ const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm,
}
}
}
- ASSERT( pTmpFrm && pTmpFrm->IsRowFrm(), "No RowFrm available" );
+ OSL_ENSURE( pTmpFrm && pTmpFrm->IsRowFrm(), "No RowFrm available" );
const SwLayoutFrm* pParentRowFrm = static_cast<const SwLayoutFrm*>(pTmpFrm);
const SwTabFrm* pParentTabFrm =
@@ -4616,7 +4576,7 @@ const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm,
{
pLowerCell = pLowerCell->GetLower();
}
- ASSERT( pLowerCell && pLowerCell->IsCellFrm(), "No CellFrm available" );
+ OSL_ENSURE( pLowerCell && pLowerCell->IsCellFrm(), "No CellFrm available" );
pRet = pLowerCell;
}
else if ( !_bTop && !_rCellBorderAttrs.GetBox().GetBottom() )
@@ -4648,7 +4608,7 @@ const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm,
}
pLowerCell = pLowerCell->GetLower();
}
- ASSERT( pLowerCell && pLowerCell->IsCellFrm(), "No CellFrm available" );
+ OSL_ENSURE( pLowerCell && pLowerCell->IsCellFrm(), "No CellFrm available" );
pRet = pLowerCell;
}
}
@@ -4661,7 +4621,7 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
const SwBorderAttrs &rAttrs ) const
{
//fuer (Row,Body,Ftn,Root,Column,NoTxt) gibt's hier nix zu tun
- if ( (GetType() & 0x90C5) || (Prt().SSize() == Frm().SSize()) )
+ if ( (GetType() & 0x90C5) )
return;
if ( (GetType() & 0x2000) && //Cell
@@ -4753,9 +4713,6 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
{
const SwFrm* pDirRefFrm = IsCellFrm() ? FindTabFrm() : this;
SWRECTFN( pDirRefFrm )
- // OD 19.05.2003 #109667# - use new method <lcl_PaintLeftRightLine(..)>
- //::lcl_PaintLeftLine ( this, pPage, aRect, rRect, rAttrs, fnRect );
- //::lcl_PaintRightLine ( this, pPage, aRect, rRect, rAttrs, fnRect );
::lcl_PaintLeftRightLine ( sal_True, *(this), *(pPage), aRect, rRect, rAttrs, fnRect );
::lcl_PaintLeftRightLine ( sal_False, *(this), *(pPage), aRect, rRect, rAttrs, fnRect );
if ( !IsCntntFrm() || rAttrs.GetTopLine( *(this) ) )
@@ -4768,14 +4725,10 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
SwBorderAttrAccess aAccess( SwFrm::GetCache(),
pCellFrmForTopBorderAttrs );
const SwBorderAttrs &rTopAttrs = *aAccess.Get();
- // OD 19.05.2003 #109667# - use new method <lcl_PaintTopBottomLine(..)>
- //::lcl_PaintTopLine( this, pPage, aRect, rRect, rTopAttrs, fnRect );
::lcl_PaintTopBottomLine( sal_True, *(this), *(pPage), aRect, rRect, rTopAttrs, fnRect );
}
else
{
- // OD 19.05.2003 #109667# - use new method <lcl_PaintTopBottomLine(..)>
- //::lcl_PaintTopLine( this, pPage, aRect, rRect, rAttrs, fnRect );
::lcl_PaintTopBottomLine( sal_True, *(this), *(pPage), aRect, rRect, rAttrs, fnRect );
}
}
@@ -4789,14 +4742,10 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
SwBorderAttrAccess aAccess( SwFrm::GetCache(),
pCellFrmForBottomBorderAttrs );
const SwBorderAttrs &rBottomAttrs = *aAccess.Get();
- // OD 19.05.2003 #109667# - use new method <lcl_PaintTopBottomLine(..)>
- //::lcl_PaintBottomLine(this, pPage, aRect, rRect, rBottomAttrs, fnRect);
::lcl_PaintTopBottomLine(sal_False, *(this), *(pPage), aRect, rRect, rBottomAttrs, fnRect);
}
else
{
- // OD 19.05.2003 #109667# - use new method <lcl_PaintTopBottomLine(..)>
- //::lcl_PaintBottomLine(this, pPage, aRect, rRect, rAttrs, fnRect);
::lcl_PaintTopBottomLine(sal_False, *(this), *(pPage), aRect, rRect, rAttrs, fnRect);
}
}
@@ -4811,8 +4760,6 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
|* Beschreibung Spezialimplementierung wg. der Fussnotenlinie.
|* Derzeit braucht nur der obere Rand beruecksichtigt werden.
|* Auf andere Linien und Schatten wird verzichtet.
-|* Ersterstellung MA 27. Feb. 93
-|* Letzte Aenderung MA 08. Sep. 93
|*
|*************************************************************************/
@@ -4831,8 +4778,6 @@ void SwFtnContFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
|* SwFtnContFrm::PaintLine()
|*
|* Beschreibung Fussnotenline malen.
-|* Ersterstellung MA 02. Mar. 93
-|* Letzte Aenderung MA 28. Mar. 94
|*
|*************************************************************************/
@@ -4862,7 +4807,7 @@ void SwFtnContFrm::PaintLine( const SwRect& rRect,
case FTNADJ_LEFT:
/* do nothing */; break;
default:
- ASSERT( !this, "Neues Adjustment fuer Fussnotenlinie?" );
+ OSL_ENSURE( !this, "Neues Adjustment fuer Fussnotenlinie?" );
}
SwTwips nLineWidth = rInf.GetLineWidth();
const SwRect aLineRect = bVert ?
@@ -4880,8 +4825,6 @@ void SwFtnContFrm::PaintLine( const SwRect& rRect,
|*
|* Beschreibung Painted die Trennlinien fuer die innenliegenden
|* Spalten.
-|* Ersterstellung MA 21. Jun. 93
-|* Letzte Aenderung MA 28. Mar. 94
|*
|*************************************************************************/
@@ -4910,7 +4853,7 @@ void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFmtCol &rFmtCol,
case COLADJ_BOTTOM:
break;
default:
- ASSERT( !this, "Neues Adjustment fuer Spaltenlinie?" );
+ OSL_ENSURE( !this, "Neues Adjustment fuer Spaltenlinie?" );
}
if( nTop )
@@ -4932,7 +4875,7 @@ void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFmtCol &rFmtCol,
(aLineRect.*fnRect->fnSetPosX)
( (pCol->Frm().*fnGetX)() - nPenHalf );
if ( aRect.IsOver( aLineRect ) )
- PaintBorderLine( aRect, aLineRect , pPage, &rFmtCol.GetLineColor());
+ PaintBorderLine( aRect, aLineRect , pPage, &rFmtCol.GetLineColor() );
pCol = pCol->GetNext();
}
}
@@ -5260,6 +5203,8 @@ void SwPageFrm::PaintMarginArea( const SwRect& _rOutputRect,
{
SwRect aPgRect = Frm();
aPgRect._Intersection( _rOutputRect );
+ if(aPgRect.Height() < 0 || aPgRect.Width() <= 0) // No intersection
+ return;
SwRegionRects aPgRegion( aPgRect );
aPgRegion -= aPgPrtRect;
const SwPageFrm* pPage = static_cast<const SwPageFrm*>(this);
@@ -5285,46 +5230,7 @@ void SwPageFrm::PaintMarginArea( const SwRect& _rOutputRect,
}
}
-// ----------------------------------------------------------------------
-//
-// const SwPageFrm::mnBorderPxWidth, const SwPageFrm::mnShadowPxWidth
-// SwPageFrm::GetBorderRect (..), SwPageFrm::GetRightShadowRect(..),
-// SwPageFrm::GetBottomShadowRect(..),
-// SwPageFrm::PaintBorderAndShadow(..),
-// SwPageFrm::GetBorderAndShadowBoundRect(..)
-//
-// OD 12.02.2003 for #i9719# and #105645#
-// ----------------------------------------------------------------------
-
-const sal_Int8 SwPageFrm::mnBorderPxWidth = 1;
-const sal_Int8 SwPageFrm::mnShadowPxWidth = 2;
-
-/** determine rectangle for page border
-
- OD 12.02.2003 for #i9719# and #105645#
-
- @author OD
-*/
-/*static*/ void SwPageFrm::GetBorderRect( const SwRect& _rPageRect,
- ViewShell* _pViewShell,
- SwRect& _orBorderRect,
- bool bRightSidebar )
-{
- SwRect aAlignedPageRect( _rPageRect );
- ::SwAlignRect( aAlignedPageRect, _pViewShell );
- Rectangle aBorderPxRect =
- _pViewShell->GetOut()->LogicToPixel( aAlignedPageRect.SVRect() );
-
- aBorderPxRect.Left() = aBorderPxRect.Left() - mnBorderPxWidth;
- aBorderPxRect.Top() = aBorderPxRect.Top() - mnBorderPxWidth;
- aBorderPxRect.Right() = aBorderPxRect.Right() + mnBorderPxWidth;
- aBorderPxRect.Bottom() = aBorderPxRect.Bottom() + mnBorderPxWidth;
-
- AddSidebarBorders(aBorderPxRect,_pViewShell, bRightSidebar, true);
-
- _orBorderRect =
- SwRect( _pViewShell->GetOut()->PixelToLogic( aBorderPxRect ) );
-}
+const sal_Int8 SwPageFrm::mnShadowPxWidth = 10;
/** determine rectangle for right page shadow
@@ -5339,20 +5245,20 @@ const sal_Int8 SwPageFrm::mnShadowPxWidth = 2;
{
SwRect aAlignedPageRect( _rPageRect );
::SwAlignRect( aAlignedPageRect, _pViewShell );
- Rectangle aPagePxRect =
+ SwRect aPagePxRect =
_pViewShell->GetOut()->LogicToPixel( aAlignedPageRect.SVRect() );
+ const SwPostItMgr *pMgr = _pViewShell ? _pViewShell->GetPostItMgr() : 0;
- Rectangle aRightShadowPxRect(
- aPagePxRect.Right() + mnShadowPxWidth,
- aPagePxRect.Top() + 1,
- aPagePxRect.Right() + mnBorderPxWidth + mnShadowPxWidth,
- aPagePxRect.Bottom() + mnBorderPxWidth + mnShadowPxWidth );
+ _orRightShadowRect.Chg(
+ Point( aPagePxRect.Right() + 1, aPagePxRect.Top() + mnShadowPxWidth + 1 ),
+ Size( mnShadowPxWidth, aPagePxRect.Height() - mnShadowPxWidth - 1 ) );
- if ( bRightSidebar )
- AddSidebarBorders(aRightShadowPxRect,_pViewShell, bRightSidebar, true);
+ if (bRightSidebar && pMgr && pMgr->ShowNotes() && pMgr->HasNotes())
+ {
+ _orRightShadowRect.Pos(_orRightShadowRect.Left() + pMgr->GetSidebarWidth(true)
+ + pMgr->GetSidebarBorderWidth(true), _orRightShadowRect.Top());
+ }
- _orRightShadowRect =
- SwRect( _pViewShell->GetOut()->PixelToLogic( aRightShadowPxRect ) );
}
/** determine rectangle for bottom page shadow
@@ -5364,23 +5270,31 @@ const sal_Int8 SwPageFrm::mnShadowPxWidth = 2;
/*static*/ void SwPageFrm::GetBottomShadowRect( const SwRect& _rPageRect,
ViewShell* _pViewShell,
SwRect& _orBottomShadowRect,
+ bool bFullBottomShadow,
bool bRightSidebar )
{
+ const SwPostItMgr *pMgr = _pViewShell ? _pViewShell->GetPostItMgr() : 0;
SwRect aAlignedPageRect( _rPageRect );
::SwAlignRect( aAlignedPageRect, _pViewShell );
- Rectangle aPagePxRect =
+ SwRect aPagePxRect =
_pViewShell->GetOut()->LogicToPixel( aAlignedPageRect.SVRect() );
- Rectangle aBottomShadowPxRect(
- aPagePxRect.Left() + 1,
- aPagePxRect.Bottom() + mnShadowPxWidth,
- aPagePxRect.Right() + mnBorderPxWidth + mnShadowPxWidth,
- aPagePxRect.Bottom() + mnBorderPxWidth + mnShadowPxWidth );
+ // Shadow is shifted when not full
+ long lShadowAdjustment = (bFullBottomShadow ? 0 : 1 + mnShadowPxWidth);
- AddSidebarBorders(aBottomShadowPxRect,_pViewShell, bRightSidebar, true);
+ _orBottomShadowRect.Chg(
+ Point( aPagePxRect.Left() + lShadowAdjustment, aPagePxRect.Bottom() + 1 ),
+ Size( aPagePxRect.Width() - lShadowAdjustment, mnShadowPxWidth ) );
- _orBottomShadowRect =
- SwRect( _pViewShell->GetOut()->PixelToLogic( aBottomShadowPxRect ) );
+ if(pMgr && pMgr->ShowNotes() && pMgr->HasNotes())
+ {
+ // Notes are displayed, we've to extend borders
+ SwTwips aSidebarTotalWidth = pMgr->GetSidebarWidth(true) + pMgr->GetSidebarBorderWidth(true);
+ if(bRightSidebar)
+ _orBottomShadowRect.Right( _orBottomShadowRect.Right() + aSidebarTotalWidth );
+ else
+ _orBottomShadowRect.Left( _orBottomShadowRect.Left() - aSidebarTotalWidth );
+ }
}
/** paint page border and shadow
@@ -5393,40 +5307,70 @@ const sal_Int8 SwPageFrm::mnShadowPxWidth = 2;
/*static*/ void SwPageFrm::PaintBorderAndShadow( const SwRect& _rPageRect,
ViewShell* _pViewShell,
bool bPaintRightShadow,
+ bool bFullBottomShadow,
bool bRightSidebar )
{
+ // No shadow in prefs
+ if( !SwViewOption::IsShadow() ) return;
+
// --> FME 2004-06-24 #i16816# tagged pdf support
SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *_pViewShell->GetOut() );
// <--
- // get color for page border and shadow paint
- const Color& rColor = SwViewOption::GetFontColor();
+ static BitmapEx aPageTopRightShadow;
+ static BitmapEx aPageBottomRightShadow;
+ static BitmapEx aPageBottomLeftShadow;
+ static BitmapEx aPageBottomShadowBase;
+ static BitmapEx aPageRightShadowBase;
+ static Color aShadowColor;
+
- // save current fill and line color of output device
- Color aFill( _pViewShell->GetOut()->GetFillColor() );
- Color aLine( _pViewShell->GetOut()->GetLineColor() );
+ if(aShadowColor != SwViewOption::GetShadowColor() ) {
+ aShadowColor = SwViewOption::GetShadowColor();
+ AlphaMask aMask( SW_RES( BMP_PAGE_BOTTOM_RIGHT_SHADOW_MASK ) );
+ Bitmap aFilledSquare( Size( mnShadowPxWidth, mnShadowPxWidth ), 24 );
+ aFilledSquare.Erase( aShadowColor );
+
+ aPageBottomRightShadow = BitmapEx( aFilledSquare, aMask );
+ aMask.Rotate( 900, 255 );
+ aPageTopRightShadow = BitmapEx( aFilledSquare, aMask );
+ aMask.Rotate( 1800, 255);
+ aPageBottomLeftShadow = BitmapEx( aFilledSquare, aMask );
+
+ aFilledSquare = Bitmap( Size( 1, mnShadowPxWidth ), 24 );
+ aFilledSquare.Erase( aShadowColor );
+ aMask = Bitmap( SW_RES( BMP_PAGE_BOTTOM_SHADOW_MASK ) );
+ aPageBottomShadowBase = BitmapEx( aFilledSquare, aMask );
+
+ aFilledSquare = Bitmap( Size( mnShadowPxWidth, 1 ), 24 );
+ aFilledSquare.Erase( aShadowColor );
+ aMask = Bitmap( SW_RES( BMP_PAGE_RIGHT_SHADOW_MASK ) );
+ aPageRightShadowBase = BitmapEx( aFilledSquare, aMask );
+ }
- // paint page border
- _pViewShell->GetOut()->SetFillColor(); // OD 20.02.2003 #107369# - no fill color
- _pViewShell->GetOut()->SetLineColor( rColor );
SwRect aPaintRect;
- SwPageFrm::GetBorderRect( _rPageRect, _pViewShell, aPaintRect, bRightSidebar );
- _pViewShell->GetOut()->DrawRect( aPaintRect.SVRect() );
+ OutputDevice *pOut = _pViewShell->GetOut();
// paint right shadow
if ( bPaintRightShadow )
{
- _pViewShell->GetOut()->SetFillColor( rColor );
SwPageFrm::GetRightShadowRect( _rPageRect, _pViewShell, aPaintRect, bRightSidebar );
- _pViewShell->GetOut()->DrawRect( aPaintRect.SVRect() );
+ BitmapEx aPageRightShadow = aPageRightShadowBase;
+ aPageRightShadow.Scale( 1, aPaintRect.Height() );
+ pOut->DrawBitmapEx( pOut->PixelToLogic( aPaintRect.Pos() ), aPageRightShadow );
+ pOut->DrawBitmapEx( pOut->PixelToLogic( Point( aPaintRect.Left(), aPaintRect.Top() - mnShadowPxWidth ) ), aPageTopRightShadow );
+ pOut->DrawBitmapEx( pOut->PixelToLogic( aPaintRect.BottomLeft() ), aPageBottomRightShadow );
}
// paint bottom shadow
- SwPageFrm::GetBottomShadowRect( _rPageRect, _pViewShell, aPaintRect, bRightSidebar );
- _pViewShell->GetOut()->DrawRect( aPaintRect.SVRect() );
-
- _pViewShell->GetOut()->SetFillColor( aFill );
- _pViewShell->GetOut()->SetLineColor( aLine );
+ SwPageFrm::GetBottomShadowRect( _rPageRect, _pViewShell, aPaintRect, bFullBottomShadow, bRightSidebar );
+ if(!bFullBottomShadow)
+ {
+ pOut->DrawBitmapEx( pOut->PixelToLogic( Point( aPaintRect.Left() - mnShadowPxWidth, aPaintRect.Top() ) ), aPageBottomLeftShadow );
+ }
+ BitmapEx aPageBottomShadow = aPageBottomShadowBase;
+ aPageBottomShadow.Scale( aPaintRect.Width(), 1 );
+ pOut->DrawBitmapEx( pOut->PixelToLogic( aPaintRect.Pos() ), aPageBottomShadow);
}
//mod #i6193# paint sidebar for notes
@@ -5557,14 +5501,22 @@ const sal_Int8 SwPageFrm::mnShadowPxWidth = 2;
SwRect& _orBorderAndShadowBoundRect,
bool bRightSidebar )
{
+ SwRect aAlignedPageRect( _rPageRect );
+ ::SwAlignRect( aAlignedPageRect, _pViewShell );
+ SwRect aPagePxRect =
+ _pViewShell->GetOut()->LogicToPixel( aAlignedPageRect.SVRect() );
+
SwRect aTmpRect;
- SwPageFrm::GetBorderRect( _rPageRect, _pViewShell, _orBorderAndShadowBoundRect, bRightSidebar );
SwPageFrm::GetRightShadowRect( _rPageRect, _pViewShell, aTmpRect, bRightSidebar );
- _orBorderAndShadowBoundRect.Union( aTmpRect );
- SwPageFrm::GetBottomShadowRect( _rPageRect, _pViewShell, aTmpRect, bRightSidebar );
- _orBorderAndShadowBoundRect.Union( aTmpRect );
- AddSidebarBorders(_orBorderAndShadowBoundRect, _pViewShell, bRightSidebar, false);
+ aPagePxRect.Right( aTmpRect.Right() );
+
+ // Always ask for full shadow
+ SwPageFrm::GetBottomShadowRect( _rPageRect, _pViewShell, aTmpRect, true, bRightSidebar );
+ aPagePxRect.Bottom( aTmpRect.Bottom() );
+ aPagePxRect.Left( aTmpRect.Left() );
+
+ _orBorderAndShadowBoundRect = _pViewShell->GetOut()->PixelToLogic( aPagePxRect.SVRect() );
}
/*static*/ void SwPageFrm::AddSidebarBorders(SwRect &aRect, ViewShell* _pViewShell, bool bRightSidebar, bool bPx)
@@ -5602,9 +5554,6 @@ const sal_Int8 SwPageFrm::mnShadowPxWidth = 2;
|*
|* SwFrm::PaintBaBo()
|*
-|* Ersterstellung MA 22. Oct. 93
-|* Letzte Aenderung MA 19. Jun. 96
-|*
|*************************************************************************/
void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
@@ -5655,9 +5604,6 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
|*
|* SwFrm::PaintBackground()
|*
-|* Ersterstellung MA 04. Jan. 93
-|* Letzte Aenderung MA 06. Feb. 97
-|*
|*************************************************************************/
/// OD 05.09.2002 #102912#
/// Do not paint background for fly frames without a background brush by
@@ -5850,8 +5796,6 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
|* SwPageFrm::RefreshSubsidiary()
|*
|* Beschreibung Erneuert alle Hilfslinien der Seite.
-|* Ersterstellung MA 04. Nov. 92
-|* Letzte Aenderung MA 10. May. 95
|*
|*************************************************************************/
@@ -5896,9 +5840,6 @@ void SwPageFrm::RefreshSubsidiary( const SwRect &rRect ) const
|*
|* SwLayoutFrm::RefreshLaySubsidiary()
|*
-|* Ersterstellung MA 04. Nov. 92
-|* Letzte Aenderung MA 22. Jan. 95
-|*
|*************************************************************************/
void SwLayoutFrm::RefreshLaySubsidiary( const SwPageFrm *pPage,
const SwRect &rRect ) const
@@ -5974,8 +5915,6 @@ void SwLayoutFrm::RefreshLaySubsidiary( const SwPageFrm *pPage,
|*
|* Beschreibung Hilfslinien um die PrtAreas malen
|* Nur die LayoutFrm's die direkt Cntnt enthalten.
-|* Ersterstellung MA 21. May. 92
-|* Letzte Aenderung MA 22. Jan. 95
|*
|*************************************************************************/
@@ -5998,7 +5937,7 @@ void MA_FASTCALL lcl_RefreshLine( const SwLayoutFrm *pLay,
SwLineRects* _pSubsLines )
{
//In welche Richtung gehts? Kann nur Horizontal oder Vertikal sein.
- ASSERT( ((rP1.X() == rP2.X()) || (rP1.Y() == rP2.Y())),
+ OSL_ENSURE( ((rP1.X() == rP2.X()) || (rP1.Y() == rP2.Y())),
"Schraege Hilfslinien sind nicht erlaubt." );
const PointPtr pDirPt = rP1.X() == rP2.X() ? pY : pX;
const PointPtr pOthPt = pDirPt == pX ? pY : pX;
@@ -6080,7 +6019,7 @@ void MA_FASTCALL lcl_RefreshLine( const SwLayoutFrm *pLay,
SwRect aRect( aP1, aP2 );
// OD 18.11.2002 #99672# - use parameter <_pSubsLines> instead of
// global variable <pSubsLines>.
- _pSubsLines->AddLineRect( aRect, 0, 0, nSubColor );
+ _pSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor );
}
aP1 = aP2;
aP1.*pDirPt += 1;
@@ -6219,13 +6158,13 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
if ( aOriginal.Left() == aOut.Left() )
{
const SwRect aRect( aOut.Pos(), aLB );
- pUsedSubsLines->AddLineRect( aRect, 0, 0, nSubColor );
+ pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor );
}
// OD 14.11.2002 #104821# - in vertical layout set page/column break at right
if ( aOriginal.Right() == nRight )
{
const SwRect aRect( aRT, aRB );
- pUsedSubsLines->AddLineRect( aRect, 0, 0,
+ pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0,
(bBreak && bVert) ? SUBCOL_BREAK : nSubColor );
}
}
@@ -6236,13 +6175,13 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
{
// OD 14.11.2002 #104821# - in horizontal layout set page/column break at top
const SwRect aRect( aOut.Pos(), aRT );
- pUsedSubsLines->AddLineRect( aRect, 0, 0,
+ pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0,
(bBreak && !bVert) ? SUBCOL_BREAK : nSubColor );
}
if ( aOriginal.Bottom() == nBottom )
{
const SwRect aRect( aLB, aRB );
- pUsedSubsLines->AddLineRect( aRect, 0, 0, nSubColor );
+ pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor );
}
}
}
@@ -6255,8 +6194,6 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
|* Beschreibung Erneuert alle Extradaten (Zeilennummern usw) der Seite.
|* Grundsaetzlich sind nur diejenigen Objekte beruecksichtig,
|* die in die seitliche Ausdehnung des Rects ragen.
-|* Ersterstellung MA 20. Jan. 98
-|* Letzte Aenderung MA 18. Feb. 98
|*
|*************************************************************************/
@@ -6382,8 +6319,6 @@ const Font& SwPageFrm::GetEmptyPageFont()
|* Retouche wird nur dann durchgefuehrt, wenn der Frm der letzte seiner
|* Kette ist. Der Gesamte Bereich des Upper unterhalb des Frm wird
|* per PaintBackground gecleared.
-|* Ersterstellung MA 13. Apr. 93
-|* Letzte Aenderung MA 25. Jul. 96
|*
|*************************************************************************/
@@ -6392,8 +6327,8 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
if ( bFlyMetafile )
return;
- ASSERT( GetUpper(), "Retoucheversuch ohne Upper." );
- ASSERT( GetShell() && pGlobalShell->GetWin(), "Retouche auf dem Drucker?" );
+ OSL_ENSURE( GetUpper(), "Retoucheversuch ohne Upper." );
+ OSL_ENSURE( GetShell() && pGlobalShell->GetWin(), "Retouche auf dem Drucker?" );
SwRect aRetouche( GetUpper()->PaintArea() );
aRetouche.Top( Frm().Top() + Frm().Height() );
@@ -6471,8 +6406,6 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
Upper vorgegeben, die erste Brush wird benutzt.
Ist fuer keinen Frm eine Brush angegeben, so wird sal_False zurueck-
geliefert.
- Ersterstellung MA 23. Dec. 92
- Letzte Aenderung MA 04. Feb. 97
@param rpBrush
output parameter - constant reference pointer the found background brush
@@ -6490,10 +6423,6 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
input parameter - boolean indicating, if background brush should *not* be
taken from parent.
- @author MA
- @change 20.08.2002 by OD
- @docdate 20.08.2002
-
@return true, if a background brush for the frame is found
*/
sal_Bool SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
@@ -6598,9 +6527,6 @@ sal_Bool SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
|*
|* SwFrmFmt::GetGraphic()
|*
-|* Ersterstellung MA 23. Jul. 96
-|* Letzte Aenderung MA 23. Jul. 96
-|*
|*************************************************************************/
void SetOutDevAndWin( ViewShell *pSh, OutputDevice *pO,
@@ -6632,7 +6558,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
SFX_ITEM_SET != GetAttrSet().GetItemState( RES_URL, sal_True );
if( bNoteURL )
{
- ASSERT( !pNoteURL, "MakeGraphic: pNoteURL already used? " );
+ OSL_ENSURE( !pNoteURL, "MakeGraphic: pNoteURL already used? " );
pNoteURL = new SwNoteURL;
}
SwFlyFrm *pFly = (SwFlyFrm*)pFirst;
@@ -6712,7 +6638,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
if( bNoteURL )
{
- ASSERT( pNoteURL, "MakeGraphic: Good Bye, NoteURL." );
+ OSL_ENSURE( pNoteURL, "MakeGraphic: Good Bye, NoteURL." );
pNoteURL->FillImageMap( pMap, pFly->Frm().Pos(), aMap );
delete pNoteURL;
pNoteURL = NULL;
@@ -6740,3 +6666,4 @@ Graphic SwDrawFrmFmt::MakeGraphic( ImageMap* )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index da6ed20bf45d..5c5d97f66b02 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,9 +71,6 @@ SV_IMPL_PTRARR_SORT( SwDestroyList, SwSectionFrmPtr )
|*
|* SwSectionFrm::SwSectionFrm(), ~SwSectionFrm()
|*
-|* Ersterstellung AMA 26. Nov. 97
-|* Letzte Aenderung AMA 26. Nov. 97
-|*
|*************************************************************************/
SwSectionFrm::SwSectionFrm( SwSection &rSect ) :
SwLayoutFrm( rSect.GetFmt() ),
@@ -125,7 +123,7 @@ SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, sal_Bool bMaster ) :
// frame and its insert in the layout.
void SwSectionFrm::Init()
{
- ASSERT( GetUpper(), "SwSectionFrm::Init before insertion?!" );
+ OSL_ENSURE( GetUpper(), "SwSectionFrm::Init before insertion?!" );
SWRECTFN( this )
long nWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)();
(Frm().*fnRect->fnSetWidth)( nWidth );
@@ -182,15 +180,12 @@ SwSectionFrm::~SwSectionFrm()
|*
|* SwSectionFrm::DelEmpty()
|*
-|* Ersterstellung AMA 17. Dec. 97
-|* Letzte Aenderung AMA 17. Dec. 97
-|*
|*************************************************************************/
void SwSectionFrm::DelEmpty( sal_Bool bRemove )
{
if( IsColLocked() )
{
- ASSERT( !bRemove, "Don't delete locked SectionFrms" );
+ OSL_ENSURE( !bRemove, "Don't delete locked SectionFrms" );
return;
}
SwFrm* pUp = GetUpper();
@@ -250,9 +245,6 @@ void SwSectionFrm::DelEmpty( sal_Bool bRemove )
|*
|* SwSectionFrm::Cut()
|*
-|* Ersterstellung AMA 02. Dec. 97
-|* Letzte Aenderung AMA 02. Dec. 97
-|*
|*************************************************************************/
void SwSectionFrm::Cut()
{
@@ -261,7 +253,7 @@ void SwSectionFrm::Cut()
void SwSectionFrm::_Cut( sal_Bool bRemove )
{
- ASSERT( GetUpper(), "Cut ohne Upper()." );
+ OSL_ENSURE( GetUpper(), "Cut ohne Upper()." );
PROTOCOL( this, PROT_CUT, 0, GetUpper() )
@@ -339,18 +331,15 @@ void SwSectionFrm::_Cut( sal_Bool bRemove )
|*
|* SwSectionFrm::Paste()
|*
-|* Ersterstellung AMA 04. Dec. 97
-|* Letzte Aenderung AMA 04. Dec. 97
-|*
|*************************************************************************/
void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
{
- ASSERT( pParent, "Kein Parent fuer Paste." );
- ASSERT( pParent->IsLayoutFrm(), "Parent ist CntntFrm." );
- ASSERT( pParent != this, "Bin selbst der Parent." );
- ASSERT( pSibling != this, "Bin mein eigener Nachbar." );
- ASSERT( !GetPrev() && !GetUpper(),
+ OSL_ENSURE( pParent, "Kein Parent fuer Paste." );
+ OSL_ENSURE( pParent->IsLayoutFrm(), "Parent ist CntntFrm." );
+ OSL_ENSURE( pParent != this, "Bin selbst der Parent." );
+ OSL_ENSURE( pSibling != this, "Bin mein eigener Nachbar." );
+ OSL_ENSURE( !GetPrev() && !GetUpper(),
"Bin noch irgendwo angemeldet." );
PROTOCOL( this, PROT_PASTE, 0, GetUpper() )
@@ -455,9 +444,6 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
|* Zunaechst werden uebergeordnete Bereiche immer aufgebrochen,
|* spaeter koennte man es einstellbar machen.
|*
-|* Ersterstellung AMA 12. Dec. 97
-|* Letzte Aenderung AMA 12. Dec. 97
-|*
|*************************************************************************/
sal_Bool SwSectionFrm::HasToBreak( const SwFrm* pFrm ) const
@@ -484,9 +470,6 @@ sal_Bool SwSectionFrm::HasToBreak( const SwFrm* pFrm ) const
|*
|* SwSectionFrm::MergeNext()
|*
-|* Ersterstellung AMA 04. Dec. 97
-|* Letzte Aenderung AMA 04. Dec. 97
-|*
|* Verschmilzt zwei SectionFrms, falls es sich um den
|* gleichen Bereich handelt.
|* Notwendig kann dies sein, wenn ein (Unter-)Bereich geloescht wird, der
@@ -533,9 +516,6 @@ void SwSectionFrm::MergeNext( SwSectionFrm* pNxt )
|*
|* SwSectionFrm::SplitSect()
|*
-|* Ersterstellung AMA 29. Apr. 99
-|* Letzte Aenderung AMA 29. Apr. 99
-|*
|* Zerteilt einen SectionFrm in zwei Teile, der zweite Teil beginnt mit dem
|* uebergebenen Frame.
|* Benoetigt wird dies beim Einfuegen eines inneren Bereichs, weil innerhalb
@@ -546,7 +526,7 @@ void SwSectionFrm::MergeNext( SwSectionFrm* pNxt )
sal_Bool SwSectionFrm::SplitSect( SwFrm* pFrm, sal_Bool bApres )
{
- ASSERT( pFrm, "SplitSect: Why?" );
+ OSL_ENSURE( pFrm, "SplitSect: Why?" );
SwFrm* pOther = bApres ? pFrm->FindNext() : pFrm->FindPrev();
if( !pOther )
return sal_False;
@@ -555,7 +535,7 @@ sal_Bool SwSectionFrm::SplitSect( SwFrm* pFrm, sal_Bool bApres )
return sal_False;
// Den Inhalt zur Seite stellen
SwFrm* pSav = ::SaveCntnt( this, bApres ? pOther : pFrm );
- ASSERT( pSav, "SplitSect: What's on?" );
+ OSL_ENSURE( pSav, "SplitSect: What's on?" );
if( pSav ) // Robust
{ // Einen neuen SctFrm anlegen, nicht als Follow/Master
SwSectionFrm* pNew = new SwSectionFrm( *pSect->GetSection() );
@@ -589,9 +569,6 @@ sal_Bool SwSectionFrm::SplitSect( SwFrm* pFrm, sal_Bool bApres )
|*
|* SwSectionFrm::MoveCntntAndDelete()
|*
-|* Ersterstellung AMA 29. Jan 99
-|* Letzte Aenderung AMA 29. Jan 99
-|*
|* MoveCntnt wird zur Zerstoerung eines SectionFrms wg. Aufhebung oder
|* Verstecken des Bereichs gerufen, um den Inhalt umzuhaengen.
|* Wenn der SectionFrm keinen anderen aufbrach, so wird der Inhalt in
@@ -775,7 +752,7 @@ void SwSectionFrm::MoveCntntAndDelete( SwSectionFrm* pDel, sal_Bool bSave )
// jetzt koennen eventuell zwei Teile des uebergeordneten Bereich verschmelzen
if( pPrvSct && !pPrvSct->IsJoinLocked() )
{
- ASSERT( pNxtSct, "MoveCntnt: No Merge" );
+ OSL_ENSURE( pNxtSct, "MoveCntnt: No Merge" );
pPrvSct->MergeNext( pNxtSct );
}
}
@@ -786,7 +763,9 @@ void SwSectionFrm::MakeAll()
return;
if( !pSection ) // Durch DelEmpty
{
- ASSERT( GetFmt()->GetDoc()->GetRootFrm()->IsInDelList( this ), "SectionFrm without Section" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( GetFmt()->GetDoc()->GetRootFrm()->IsInDelList( this ), "SectionFrm without Section" );
+#endif
if( !bValidPos )
{
if( GetUpper() )
@@ -839,7 +818,7 @@ void SwSectionFrm::MakeAll()
sal_Bool SwSectionFrm::ShouldBwdMoved( SwLayoutFrm *, sal_Bool , sal_Bool & )
{
- ASSERT( sal_False, "Hups, wo ist meine Tarnkappe?" );
+ OSL_ENSURE( sal_False, "Hups, wo ist meine Tarnkappe?" );
return sal_False;
}
@@ -939,9 +918,6 @@ sal_Bool SwSectionFrm::CalcMinDiff( SwTwips& rMinDiff ) const
*
* SwSectionFrm::CollectEndnotes( )
*
- * Ersterstellung AMA 03. Nov 99
- * Letzte Aenderung AMA 03. Nov 99
- *
* CollectEndnotes looks for endnotes in the sectionfrm and his follows,
* the endnotes will cut off the layout and put into the array.
* If the first endnote is not a master-SwFtnFrm, the whole sectionfrm
@@ -956,7 +932,7 @@ SwFtnFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, sal_Bool &rbEmpty,
SwSectionFrm* pSect = rbEmpty ? rpSect->GetFollow() : rpSect;
while( pSect )
{
- ASSERT( (pSect->Lower() && pSect->Lower()->IsColumnFrm()) || pSect->GetUpper()->IsFtnFrm(),
+ OSL_ENSURE( (pSect->Lower() && pSect->Lower()->IsColumnFrm()) || pSect->GetUpper()->IsFtnFrm(),
"InsertEndnotes: Where's my column?" );
// i73332: Columned section in endnote
@@ -1025,9 +1001,9 @@ void lcl_ColumnRefresh( SwSectionFrm* pSect, sal_Bool bFollow )
void SwSectionFrm::CollectEndnotes( SwLayouter* pLayouter )
{
- ASSERT( IsColLocked(), "CollectEndnotes: You love the risk?" );
+ OSL_ENSURE( IsColLocked(), "CollectEndnotes: You love the risk?" );
// i73332: Section in footnode does not have columns!
- ASSERT( (Lower() && Lower()->IsColumnFrm()) || GetUpper()->IsFtnFrm(), "Where's my column?" );
+ OSL_ENSURE( (Lower() && Lower()->IsColumnFrm()) || GetUpper()->IsFtnFrm(), "Where's my column?" );
SwSectionFrm* pSect = this;
SwFtnFrm* pFtn;
@@ -1152,7 +1128,7 @@ void SwSectionFrm::SimpleFormat()
{
if ( IsJoinLocked() || IsColLocked() )
return;
- // ASSERT( pFollow, "SimpleFormat: Follow required" );
+ // OSL_ENSURE( pFollow, "SimpleFormat: Follow required" );
LockJoin();
SWRECTFN( this )
if( GetPrev() || GetUpper() )
@@ -1323,8 +1299,6 @@ class ExtraFormatToPositionObjs
|* SwSectionFrm::Format()
|*
|* Beschreibung: "Formatiert" den Frame; Frm und PrtArea.
-|* Ersterstellung AMA 03. Dec. 97
-|* Letzte Aenderung MA 09. Oct. 98
|*
|*************************************************************************/
@@ -1332,8 +1306,10 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
{
if( !pSection ) // Durch DelEmpty
{
- ASSERT( GetFmt()->GetDoc()->GetRootFrm()->IsInDelList( this ),
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( GetFmt()->GetDoc()->GetRootFrm()->IsInDelList( this ),
"SectionFrm without Section" );
+#endif
bValidSize = bValidPos = bValidPrtArea = sal_True;
return;
}
@@ -1554,8 +1530,6 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
|* Beschreibung Liefert das naechste Layoutblatt in das der Frame
|* gemoved werden kann.
|* Neue Seiten werden nur dann erzeugt, wenn der Parameter sal_True ist.
-|* Ersterstellung AMA 07. Jan. 98
-|* Letzte Aenderung AMA 07. Jan. 98
|*
|*************************************************************************/
@@ -1583,7 +1557,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
// SwSectionFrm *pSect = GetUpper()->FindSctFrm();
SwSectionFrm *pSect = FindSctFrm();
sal_Bool bWrongPage = sal_False;
- ASSERT( pSect, "GetNextSctLeaf: Missing SectionFrm" );
+ OSL_ENSURE( pSect, "GetNextSctLeaf: Missing SectionFrm" );
// Hier eine Abkuerzung fuer Bereiche mit Follows,
// dieser kann akzeptiert werden, wenn keine Spalten oder Seiten (ausser Dummyseiten)
@@ -1752,7 +1726,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
pNxt = (SwSectionFrm*)pTmp;
else
{
- ASSERT( pTmp->IsTabFrm(), "GetNextSctLeaf: Wrong Type" );
+ OSL_ENSURE( pTmp->IsTabFrm(), "GetNextSctLeaf: Wrong Type" );
pNxt = (SwTabFrm*)pTmp;
}
while( !pNxtCntnt && 0 != ( pTmp = pTmp->GetNext() ) )
@@ -1791,8 +1765,6 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
|*
|* Beschreibung Liefert das vorhergehende LayoutBlatt in das der
|* Frame gemoved werden kann.
-|* Ersterstellung AMA 07. Jan. 98
-|* Letzte Aenderung AMA 07. Jan. 98
|*
|*************************************************************************/
@@ -1842,7 +1814,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
// nur ein Spaltenwechsel erfolgen, eine der oberen Abkuerzungen haette
// zuschlagen muessen, ebenso wenn der Bereich einen pPrev hat.
// Jetzt ziehen wir sogar eine leere Spalte in Betracht...
- ASSERT( FindSctFrm(), "GetNextSctLeaf: Missing SectionFrm" );
+ OSL_ENSURE( FindSctFrm(), "GetNextSctLeaf: Missing SectionFrm" );
if( ( IsInTab() && !IsTabFrm() ) || FindFooterOrHeader() )
return pCol;
@@ -2022,9 +1994,6 @@ sal_Bool SwSectionFrm::Growable() const
|*
|* SwSectionFrm::_Grow(), _Shrink()
|*
-|* Ersterstellung AMA 14. Jan. 98
-|* Letzte Aenderung AMA 14. Jan. 98
-|*
|*************************************************************************/
SwTwips SwSectionFrm::_Grow( SwTwips nDist, sal_Bool bTst )
@@ -2178,7 +2147,6 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, sal_Bool bTst )
long nPrtHeight = (Prt().*fnRect->fnGetHeight)() - nDist;
(Prt().*fnRect->fnSetHeight)( nPrtHeight );
- SwTwips nReal = 0;
// We do not allow a section frame to shrink the its upper
// footer frame. This is because in the calculation of a
// footer frame, the content of the section frame is _not_
@@ -2194,7 +2162,7 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, sal_Bool bTst )
// would cause the top of the section frame to overlap with the
// fly frame again, this would result in a perfect loop.
if( GetUpper() && !GetUpper()->IsFooterFrm() )
- nReal = GetUpper()->Shrink( nDist, bTst );
+ GetUpper()->Shrink( nDist, bTst );
if( Lower() && Lower()->IsColumnFrm() && Lower()->GetNext() )
{
@@ -2228,9 +2196,6 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, sal_Bool bTst )
|*
|* SwSectionFrm::MoveAllowed()
|*
-|* Ersterstellung MA 08. Oct. 98
-|* Letzte Aenderung MA 08. Oct. 98
-|*
|* Wann sind Frms innerhalb eines SectionFrms moveable?
|* Wenn sie noch nicht in der letzten Spalte des SectionFrms sind,
|* wenn es einen Follow gibt,
@@ -2313,7 +2278,7 @@ SwFrm* SwFrm::_GetIndPrev() const
// could be an empty section frame. The caller has to assure, that the
// frame has no direct previous frame or only empty section frames as
// previous frames.
- ASSERT( /*!pPrev &&*/ IsInSct(), "Why?" );
+ OSL_ENSURE( /*!pPrev &&*/ IsInSct(), "Why?" );
// <--
const SwFrm* pSct = GetUpper();
if( !pSct )
@@ -2327,8 +2292,8 @@ SwFrm* SwFrm::_GetIndPrev() const
const SwFrm* pCol = GetUpper()->GetUpper()->GetPrev();
while( pCol )
{
- ASSERT( pCol->IsColumnFrm(), "GetIndPrev(): ColumnFrm expected" );
- ASSERT( pCol->GetLower() && pCol->GetLower()->IsBodyFrm(),
+ OSL_ENSURE( pCol->IsColumnFrm(), "GetIndPrev(): ColumnFrm expected" );
+ OSL_ENSURE( pCol->GetLower() && pCol->GetLower()->IsBodyFrm(),
"GetIndPrev(): Where's the body?");
if( ((SwLayoutFrm*)((SwLayoutFrm*)pCol)->Lower())->Lower() )
return NULL;
@@ -2345,7 +2310,7 @@ SwFrm* SwFrm::_GetIndPrev() const
SwFrm* SwFrm::_GetIndNext()
{
- ASSERT( !pNext && IsInSct(), "Why?" );
+ OSL_ENSURE( !pNext && IsInSct(), "Why?" );
SwFrm* pSct = GetUpper();
if( !pSct )
return NULL;
@@ -2357,8 +2322,8 @@ SwFrm* SwFrm::_GetIndNext()
SwFrm* pCol = GetUpper()->GetUpper()->GetNext();
while( pCol )
{
- ASSERT( pCol->IsColumnFrm(), "GetIndNext(): ColumnFrm expected" );
- ASSERT( pCol->GetLower() && pCol->GetLower()->IsBodyFrm(),
+ OSL_ENSURE( pCol->IsColumnFrm(), "GetIndNext(): ColumnFrm expected" );
+ OSL_ENSURE( pCol->GetLower() && pCol->GetLower()->IsBodyFrm(),
"GetIndNext(): Where's the body?");
if( ((SwLayoutFrm*)((SwLayoutFrm*)pCol)->Lower())->Lower() )
return NULL;
@@ -2430,9 +2395,6 @@ void SwSectionFrm::CalcEndAtEndFlag()
|*
|* SwSectionFrm::Modify()
|*
-|* Ersterstellung MA 08. Oct. 98
-|* Letzte Aenderung MA 08. Oct. 98
-|*
|*************************************************************************/
void SwSectionFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
@@ -2584,7 +2546,7 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
}
}
-/*-----------------09.06.99 14:58-------------------
+/*--------------------------------------------------
* SwSectionFrm::ToMaximize(..): A follow or a ftncontainer at the end of the
* page causes a maximal Size of the sectionframe.
* --------------------------------------------------*/
@@ -2617,7 +2579,7 @@ sal_Bool SwSectionFrm::ToMaximize( sal_Bool bCheckFollow ) const
return bRet;
}
-/*-----------------09.06.99 15:07-------------------
+/*--------------------------------------------------
* sal_Bool SwSectionFrm::ContainsFtnCont()
* checks every Column for FtnContFrms.
* --------------------------------------------------*/
@@ -2629,7 +2591,7 @@ SwFtnContFrm* SwSectionFrm::ContainsFtnCont( const SwFtnContFrm* pCont ) const
if( pCont )
{
pLay = pCont->FindFtnBossFrm( 0 );
- ASSERT( IsAnLower( pLay ), "ConatainsFtnCont: Wrong FtnContainer" );
+ OSL_ENSURE( IsAnLower( pLay ), "ConatainsFtnCont: Wrong FtnContainer" );
pLay = (SwLayoutFrm*)pLay->GetNext();
}
else if( Lower() && Lower()->IsColumnFrm() )
@@ -2640,11 +2602,11 @@ SwFtnContFrm* SwSectionFrm::ContainsFtnCont( const SwFtnContFrm* pCont ) const
{
if( pLay->Lower() && pLay->Lower()->GetNext() )
{
- ASSERT( pLay->Lower()->GetNext()->IsFtnContFrm(),
+ OSL_ENSURE( pLay->Lower()->GetNext()->IsFtnContFrm(),
"ToMaximize: Unexspected Frame" );
pRet = (SwFtnContFrm*)pLay->Lower()->GetNext();
}
- ASSERT( !pLay->GetNext() || pLay->GetNext()->IsLayoutFrm(),
+ OSL_ENSURE( !pLay->GetNext() || pLay->GetNext()->IsLayoutFrm(),
"ToMaximize: ColFrm exspected" );
pLay = (SwLayoutFrm*)pLay->GetNext();
}
@@ -2662,7 +2624,7 @@ void SwSectionFrm::InvalidateFtnPos()
}
}
-/*-----------------18.03.99 10:37-------------------
+/*--------------------------------------------------
* SwSectionFrm::Undersize() liefert den Betrag, um den der Bereich gern
* groesser waere, wenn in ihm Undersized TxtFrms liegen, ansonsten Null.
* Das Undersized-Flag wird ggf. korrigiert.
@@ -2716,7 +2678,7 @@ void SwSectionFrm::CalcFtnCntnt()
}
}
-/* -----------------09.02.99 14:26-------------------
+/* --------------------------------------------------
* Wenn ein SectionFrm leerlaeuft, z.B. weil sein Inhalt die Seite/Spalte wechselt,
* so wird er nicht sofort zerstoert (es koennte noch jemand auf dem Stack einen Pointer
* auf ihn halten), sondern er traegt sich in eine Liste am RootFrm ein, die spaeter
@@ -2740,12 +2702,12 @@ void SwRootFrm::InsertEmptySct( SwSectionFrm* pDel )
void SwRootFrm::_DeleteEmptySct()
{
- ASSERT( pDestroy, "Keine Liste, keine Kekse" );
+ OSL_ENSURE( pDestroy, "Keine Liste, keine Kekse" );
while( pDestroy->Count() )
{
SwSectionFrm* pSect = (*pDestroy)[0];
pDestroy->Remove( sal_uInt16(0) );
- ASSERT( !pSect->IsColLocked() && !pSect->IsJoinLocked(),
+ OSL_ENSURE( !pSect->IsColLocked() && !pSect->IsJoinLocked(),
"DeleteEmptySct: Locked SectionFrm" );
if( !pSect->Frm().HasArea() && !pSect->ContainsCntnt() )
{
@@ -2765,20 +2727,20 @@ void SwRootFrm::_DeleteEmptySct()
}
}
else {
- ASSERT( pSect->GetSection(), "DeleteEmptySct: Halbtoter SectionFrm?!" );
+ OSL_ENSURE( pSect->GetSection(), "DeleteEmptySct: Halbtoter SectionFrm?!" );
}
}
}
void SwRootFrm::_RemoveFromList( SwSectionFrm* pSct )
{
- ASSERT( pDestroy, "Where's my list?" );
+ OSL_ENSURE( pDestroy, "Where's my list?" );
sal_uInt16 nPos;
if( pDestroy->Seek_Entry( pSct, &nPos ) )
pDestroy->Remove( nPos );
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool SwRootFrm::IsInDelList( SwSectionFrm* pSct ) const
{
@@ -2798,3 +2760,4 @@ bool SwSectionFrm::IsBalancedSection() const
return bRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/softpagebreak.cxx b/sw/source/core/layout/softpagebreak.cxx
index 898581d3d870..b55a7f43dd0a 100644
--- a/sw/source/core/layout/softpagebreak.cxx
+++ b/sw/source/core/layout/softpagebreak.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -154,3 +155,4 @@ bool SwTableLine::hasSoftPageBreak() const
return false;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/sortedobjs.cxx b/sw/source/core/layout/sortedobjs.cxx
index c1c002c3f414..e984d278f4e7 100644
--- a/sw/source/core/layout/sortedobjs.cxx
+++ b/sw/source/core/layout/sortedobjs.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,5 @@ sal_uInt32 SwSortedObjs::ListPosOf( const SwAnchoredObject& _rAnchoredObj ) cons
{
return mpImpl->ListPosOf( _rAnchoredObj );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/sortedobjsimpl.cxx b/sw/source/core/layout/sortedobjsimpl.cxx
index f0dc3f719107..10ed749e840b 100644
--- a/sw/source/core/layout/sortedobjsimpl.cxx
+++ b/sw/source/core/layout/sortedobjsimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,7 +67,7 @@ SwAnchoredObject* SwSortedObjsImpl::operator[]( sal_uInt32 _nIndex )
if ( _nIndex >= Count() )
{
- ASSERT( false, "<SwSortedObjsImpl::operator[]> - index out of range" );
+ OSL_ENSURE( false, "<SwSortedObjsImpl::operator[]> - index out of range" );
}
else
{
@@ -219,7 +220,7 @@ bool SwSortedObjsImpl::Insert( SwAnchoredObject& _rAnchoredObj )
{
// list already contains object
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwSortedObjsImpl::Insert()> - already contains object" );
#endif
return true;
@@ -249,7 +250,7 @@ bool SwSortedObjsImpl::Remove( SwAnchoredObject& _rAnchoredObj )
// object not found.
bRet = false;
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwSortedObjsImpl::Remove()> - object not found" );
#endif
}
@@ -274,7 +275,7 @@ bool SwSortedObjsImpl::Update( SwAnchoredObject& _rAnchoredObj )
if ( !Contains( _rAnchoredObj ) )
{
// given anchored object not found in list
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwSortedObjsImpl::Update(..) - sorted list doesn't contain given anchored object" );
return false;
}
@@ -311,3 +312,4 @@ sal_uInt32 SwSortedObjsImpl::ListPosOf( const SwAnchoredObject& _rAnchoredObj )
return nRetLstPos;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 512c45a67b41..56b65c7bfd48 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -216,7 +217,7 @@ void SwFrm::SetRightLeftMargins( long nRight, long nLeft)
const sal_uInt16 nMinVertCellHeight = 1135;
-/*-----------------11.9.2001 11:11------------------
+/*--------------------------------------------------
* SwFrm::CheckDirChange(..)
* checks the layout direction and
* invalidates the lower frames rekursivly, if necessary.
@@ -317,7 +318,7 @@ void SwFrm::CheckDirChange()
}
}
-/*-----------------13.9.2002 11:11------------------
+/*--------------------------------------------------
* SwFrm::GetFrmAnchorPos(..)
* returns the position for anchors based on frame direction
* --------------------------------------------------*/
@@ -363,9 +364,6 @@ Point SwFrm::GetFrmAnchorPos( sal_Bool bIgnoreFlysAnchoredAtThisFrame ) const
|*
|* SwFrm::~SwFrm()
|*
-|* Ersterstellung MA 02. Mar. 94
-|* Letzte Aenderung MA 25. Jun. 95
-|*
|*************************************************************************/
@@ -381,7 +379,7 @@ SwFrm::~SwFrm()
ViewShell *pVSh = pRootFrm->GetCurrShell();
if( pVSh && pVSh->Imp() )
{
- ASSERT( !GetLower(), "Lowers should be dispose already!" );
+ OSL_ENSURE( !GetLower(), "Lowers should be dispose already!" );
pVSh->Imp()->DisposeAccessibleFrm( this );
}
}
@@ -399,7 +397,7 @@ SwFrm::~SwFrm()
SdrObject* pSdrObj = pAnchoredObj->DrawObj();
SwDrawContact* pContact =
static_cast<SwDrawContact*>(pSdrObj->GetUserCall());
- ASSERT( pContact,
+ OSL_ENSURE( pContact,
"<SwFrm::~SwFrm> - missing contact for drawing object" );
if ( pContact )
{
@@ -411,7 +409,7 @@ SwFrm::~SwFrm()
delete pDrawObjs;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// JP 15.10.2001: for detection of access to deleted frames
pDrawObjs = (SwSortedObjs*)0x33333333;
#endif
@@ -433,8 +431,6 @@ SwFrmFmt * SwLayoutFrm::GetFmt()
/*************************************************************************
|*
|* SwLayoutFrm::SetFrmFmt()
-|* Ersterstellung MA 22. Apr. 93
-|* Letzte Aenderung MA 02. Nov. 94
|*
|*************************************************************************/
@@ -506,9 +502,6 @@ SwCntntFrm::~SwCntntFrm()
|*
|* SwLayoutFrm::~SwLayoutFrm
|*
-|* Ersterstellung AK 28-Feb-1991
-|* Letzte Aenderung MA 11. Jan. 95
-|*
|*************************************************************************/
@@ -538,7 +531,7 @@ SwLayoutFrm::~SwLayoutFrm()
SdrObject* pSdrObj = pAnchoredObj->DrawObj();
SwDrawContact* pContact =
static_cast<SwDrawContact*>(pSdrObj->GetUserCall());
- ASSERT( pContact,
+ OSL_ENSURE( pContact,
"<SwFrm::~SwFrm> - missing contact for drawing object" );
if ( pContact )
{
@@ -571,7 +564,7 @@ SwLayoutFrm::~SwLayoutFrm()
SdrObject* pSdrObj = pAnchoredObj->DrawObj();
SwDrawContact* pContact =
static_cast<SwDrawContact*>(pSdrObj->GetUserCall());
- ASSERT( pContact,
+ OSL_ENSURE( pContact,
"<SwFrm::~SwFrm> - missing contact for drawing object" );
if ( pContact )
{
@@ -600,9 +593,6 @@ SwLayoutFrm::~SwLayoutFrm()
|*
|* SwFrm::PaintArea()
|*
-|* Created AMA 08/22/2000
-|* Last change AMA 08/23/2000
-|*
|* The paintarea is the area, in which the content of a frame is allowed
|* to be displayed. This region could be larger than the printarea (Prt())
|* of the upper, it includes e.g. often the margin of the page.
@@ -640,7 +630,7 @@ const SwRect SwFrm::PaintArea() const
else
nTmpRight = (pNxt->Frm().*fnRect->fnGetRight)();
}
- ASSERT( pTmp, "PaintArea lost in time and space" );
+ OSL_ENSURE( pTmp, "PaintArea lost in time and space" );
if( pTmp->IsPageFrm() || pTmp->IsFlyFrm() ||
pTmp->IsCellFrm() || pTmp->IsRowFrm() || //nobody leaves a table!
pTmp->IsRootFrm() )
@@ -704,9 +694,6 @@ const SwRect SwFrm::PaintArea() const
|*
|* SwFrm::UnionFrm()
|*
-|* Created AMA 08/22/2000
-|* Last change AMA 08/23/2000
-|*
|* The unionframe is the framearea (Frm()) of a frame expanded by the
|* printarea, if there's a negative margin at the left or right side.
|*
@@ -766,3 +753,4 @@ const SwRect SwFrm::UnionFrm( sal_Bool bBorder ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/swselectionlist.cxx b/sw/source/core/layout/swselectionlist.cxx
index 5fbaa2a02d75..e2997db0a6bc 100644
--- a/sw/source/core/layout/swselectionlist.cxx
+++ b/sw/source/core/layout/swselectionlist.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,3 +93,4 @@ bool SwSelectionList::checkContext( const SwFrm* pCheck )
return pContext == pCheck;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 90a3656d1ab7..5ef74e797c23 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,9 +92,6 @@ using namespace ::com::sun::star;
|*
|* SwTabFrm::SwTabFrm(), ~SwTabFrm()
|*
-|* Ersterstellung MA 09. Mar. 93
-|* Letzte Aenderung MA 30. May. 96
-|*
|*************************************************************************/
SwTabFrm::SwTabFrm( SwTable &rTab ):
SwLayoutFrm( rTab.GetFrmFmt() ),
@@ -124,7 +122,7 @@ SwTabFrm::SwTabFrm( SwTable &rTab ):
else
delete pNew;
}
- ASSERT( Lower() && Lower()->IsRowFrm(), "SwTabFrm::SwTabFrm: No rows." );
+ OSL_ENSURE( Lower() && Lower()->IsRowFrm(), "SwTabFrm::SwTabFrm: No rows." );
}
SwTabFrm::SwTabFrm( SwTabFrm &rTab ) :
@@ -175,9 +173,6 @@ SwTabFrm::~SwTabFrm()
|*
|* SwTabFrm::JoinAndDelFollows()
|*
-|* Ersterstellung MA 30. May. 96
-|* Letzte Aenderung MA 30. May. 96
-|*
|*************************************************************************/
void SwTabFrm::JoinAndDelFollows()
{
@@ -193,13 +188,10 @@ void SwTabFrm::JoinAndDelFollows()
|*
|* SwTabFrm::RegistFlys()
|*
-|* Ersterstellung MA 08. Jul. 93
-|* Letzte Aenderung MA 27. Jan. 99
-|*
|*************************************************************************/
void SwTabFrm::RegistFlys()
{
- ASSERT( Lower() && Lower()->IsRowFrm(), "Keine Zeilen." );
+ OSL_ENSURE( Lower() && Lower()->IsRowFrm(), "Keine Zeilen." );
SwPageFrm *pPage = FindPageFrm();
if ( pPage )
@@ -270,7 +262,7 @@ SwTwips lcl_GetHeightOfRows( const SwFrm* pStart, long nCount )
//
SwRowFrm* lcl_InsertNewFollowFlowLine( SwTabFrm& rTab, const SwFrm& rTmpRow, bool bRowSpanLine )
{
- ASSERT( rTmpRow.IsRowFrm(), "No row frame to copy for FollowFlowLine" )
+ OSL_ENSURE( rTmpRow.IsRowFrm(), "No row frame to copy for FollowFlowLine" );
const SwRowFrm& rRow = (SwRowFrm&)rTmpRow;
rTab.SetFollowFlowLine( sal_True );
@@ -292,7 +284,7 @@ void lcl_InvalidateLowerObjs( SwLayoutFrm& _rLayoutFrm,
if ( !_pPageFrm )
{
_pPageFrm = _rLayoutFrm.FindPageFrm();
- ASSERT( _pPageFrm,
+ OSL_ENSURE( _pPageFrm,
"<lcl_InvalidateLowerObjs(..)> - missing page frame -> no move of lower objects out of range" );
if ( !_pPageFrm )
{
@@ -459,7 +451,7 @@ void lcl_MoveRowContent( SwRowFrm& rSourceLine, SwRowFrm& rDestLine )
while ( pTmpDestRow->GetNext() )
pTmpDestRow = (SwRowFrm*)pTmpDestRow->GetNext();
- ASSERT( pTmpDestRow->GetFollowRow() == pTmpSourceRow, "Knoten in der Tabelle" )
+ OSL_ENSURE( pTmpDestRow->GetFollowRow() == pTmpSourceRow, "Knoten in der Tabelle" );
lcl_MoveRowContent( *pTmpSourceRow, *pTmpDestRow );
pTmpDestRow->SetFollowRow( pTmpSourceRow->GetFollowRow() );
@@ -649,7 +641,7 @@ void lcl_PostprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine )
if ( NULL != pRowFrm->GetPrev() && !pRowFrm->ContainsCntnt() )
{
- ASSERT( pRowFrm->GetFollowRow(), "Deleting row frame without follow" )
+ OSL_ENSURE( pRowFrm->GetFollowRow(), "Deleting row frame without follow" );
// The footnotes have to be moved:
lcl_MoveFootnotes( rTab, *rTab.GetFollow(), *pRowFrm );
@@ -733,32 +725,6 @@ bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine,
}
//
- // TODO: e.g., for i71806: What shall we do if the table already
- // exceeds its upper? I think we have to adjust the heights of the
- // table, rLastRow and all cells in rLastRow
- //
- /*SwTwips nDistanceToUpperPrtBottom =
- (rTab.Frm().*fnRect->fnBottomDist)( (rTab.GetUpper()->*fnRect->fnGetPrtBottom)());
-
- if ( nDistanceToUpperPrtBottom < 0 )
- {
- (rTab.Frm().*fnRect->fnAddBottom)( nDistanceToUpperPrtBottom );
- (rTab.Prt().*fnRect->fnAddBottom)( nDistanceToUpperPrtBottom );
-
- (rLastLine.Frm().*fnRect->fnAddBottom)( nDistanceToUpperPrtBottom );
- (rLastLine.Prt().*fnRect->fnAddBottom)( nDistanceToUpperPrtBottom );
-
- SwFrm* pTmpCell = rLastLine.Lower();
- while ( pTmpCell )
- {
- (pTmpCell->Frm().*fnRect->fnAddBottom)( nDistanceToUpperPrtBottom );
- (pTmpCell->Prt().*fnRect->fnAddBottom)( nDistanceToUpperPrtBottom );
-
- pTmpCell = pTmpCell->GetNext();
- }
- }*/
-
- //
// Do the recalculation
//
lcl_RecalcRow( rLastLine, LONG_MAX );
@@ -943,9 +909,9 @@ bool SwTabFrm::RemoveFollowFlowLine()
// find last row in master
SwFrm* pLastLine = GetLastLower();
- ASSERT( HasFollowFlowLine() &&
+ OSL_ENSURE( HasFollowFlowLine() &&
pFollowFlowLine &&
- pLastLine, "There should be a flowline in the follow" )
+ pLastLine, "There should be a flowline in the follow" );
// We have to reset the flag here, because lcl_MoveRowContent
// calls a GrowFrm(), which has a different bahavior if
@@ -962,7 +928,6 @@ bool SwTabFrm::RemoveFollowFlowLine()
// NEW TABLES
// If a row span follow flow line is removed, we want to move the whole span
// to the master:
- SwTwips nGrow = 0;
long nRowsToMove = lcl_GetMaximumLayoutRowSpan( *pFollowFlowLine );
if ( nRowsToMove > 1 )
@@ -970,6 +935,7 @@ bool SwTabFrm::RemoveFollowFlowLine()
SWRECTFN( this )
SwFrm* pRow = pFollowFlowLine->GetNext();
SwFrm* pInsertBehind = GetLastLower();
+ SwTwips nGrow = 0;
while ( pRow && nRowsToMove-- > 1 )
{
@@ -1043,18 +1009,12 @@ bool lcl_FindSectionsInRow( const SwRowFrm& rRow )
|*
|* SwTabFrm::Split(), Join()
|*
-|* Ersterstellung MA 03. Jun. 93
-|* Letzte Aenderung MA 03. Sep. 96
-|*
|*************************************************************************/
bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKeep )
{
bool bRet = true;
SWRECTFN( this )
- //ASSERT( bVert ? nCutPos >= Frm().Left() &&
- // nCutPos <= Frm().Left() + Frm().Width() :
- // nCutPos >= Frm().Top() && nCutPos <= Frm().Bottom(), "SplitLine out of table." );
// --> OD 2004-10-14 #i26745# - format row and cell frames of table
{
@@ -1131,7 +1091,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
// At least one more non-heading row has to stay in this table in
// order to avoid loops:
//
- ASSERT( !GetIndPrev(), "Table is supposed to be at beginning" )
+ OSL_ENSURE( !GetIndPrev(), "Table is supposed to be at beginning" );
bKeepNextRow = true;
}
else if ( !GetIndPrev() && nRepeat == nRowCount )
@@ -1409,10 +1369,9 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
bool SwTabFrm::Join()
{
- ASSERT( !HasFollowFlowLine(), "Joining follow flow line" )
+ OSL_ENSURE( !HasFollowFlowLine(), "Joining follow flow line" );
SwTabFrm *pFoll = GetFollow();
- SwTwips nHeight = 0; //Gesamthoehe der eingefuegten Zeilen als Return.
if ( !pFoll->IsJoinLocked() )
{
@@ -1425,6 +1384,7 @@ bool SwTabFrm::Join()
SwFrm* pPrv = GetLastLower();
+ SwTwips nHeight = 0; //Gesamthoehe der eingefuegten Zeilen als Return.
while ( pRow )
{
pNxt = pRow->GetNext();
@@ -1451,9 +1411,6 @@ bool SwTabFrm::Join()
|*
|* SwTabFrm::MakeAll()
|*
-|* Ersterstellung MA 09. Mar. 93
-|* Letzte Aenderung MA 10. Apr. 97
-|*
|*************************************************************************/
void MA_FASTCALL SwInvalidatePositions( SwFrm *pFrm, long nBottom )
{
@@ -1591,7 +1548,7 @@ bool MA_FASTCALL lcl_CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeav
// to format the floating screen objects
// --> OD 2005-05-03 #i46941# - frame has to be valid
// Note: frame could be invalid after calling its format, if it's locked.
- ASSERT( !pCnt->IsTxtFrm() ||
+ OSL_ENSURE( !pCnt->IsTxtFrm() ||
pCnt->IsValid() ||
static_cast<SwTxtFrm*>(pCnt)->IsJoinLocked(),
"<lcl_CalcLowers(..)> - text frame invalid and not locked." );
@@ -1619,7 +1576,7 @@ bool MA_FASTCALL lcl_CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeav
}
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false, "LoopControl in lcl_CalcLowers" )
+ OSL_ENSURE( false, "LoopControl in lcl_CalcLowers" );
#endif
}
}
@@ -1709,9 +1666,9 @@ void MA_FASTCALL lcl_RecalcRow( SwRowFrm& rRow, long nBottom )
if ( ++nLoopControlRuns_2 > nLoopControlMax )
{
#if OSL_DEBUG_LEVEL > 1
- ASSERT( 0 != nLoopControlStage_2, "LoopControl_2 in lcl_RecalcRow: Stage 1!" );
- ASSERT( 1 != nLoopControlStage_2, "LoopControl_2 in lcl_RecalcRow: Stage 2!!" );
- ASSERT( 2 > nLoopControlStage_2, "LoopControl_2 in lcl_RecalcRow: Stage 3!!!" );
+ OSL_ENSURE( 0 != nLoopControlStage_2, "LoopControl_2 in lcl_RecalcRow: Stage 1!" );
+ OSL_ENSURE( 1 != nLoopControlStage_2, "LoopControl_2 in lcl_RecalcRow: Stage 2!!" );
+ OSL_ENSURE( 2 > nLoopControlStage_2, "LoopControl_2 in lcl_RecalcRow: Stage 3!!!" );
#endif
rRow.ValidateThisAndAllLowers( nLoopControlStage_2++ );
nLoopControlRuns_2 = 0;
@@ -1758,9 +1715,9 @@ void MA_FASTCALL lcl_RecalcRow( SwRowFrm& rRow, long nBottom )
if ( ++nLoopControlRuns_1 > nLoopControlMax )
{
#if OSL_DEBUG_LEVEL > 1
- ASSERT( 0 != nLoopControlStage_1, "LoopControl_1 in lcl_RecalcRow: Stage 1!" );
- ASSERT( 1 != nLoopControlStage_1, "LoopControl_1 in lcl_RecalcRow: Stage 2!!" );
- ASSERT( 2 > nLoopControlStage_1, "LoopControl_1 in lcl_RecalcRow: Stage 3!!!" );
+ OSL_ENSURE( 0 != nLoopControlStage_1, "LoopControl_1 in lcl_RecalcRow: Stage 1!" );
+ OSL_ENSURE( 1 != nLoopControlStage_1, "LoopControl_1 in lcl_RecalcRow: Stage 2!!" );
+ OSL_ENSURE( 2 > nLoopControlStage_1, "LoopControl_1 in lcl_RecalcRow: Stage 3!!!" );
#endif
rRow.ValidateThisAndAllLowers( nLoopControlStage_1++ );
nLoopControlRuns_1 = 0;
@@ -1895,8 +1852,8 @@ void SwTabFrm::MakeAll()
if ( HasFollow() )
{
SwTabFrm* pFollowFrm = (SwTabFrm*)GetFollow();
- ASSERT( !pFollowFrm->IsJoinLocked() || !pFollowFrm->IsRebuildLastLine(),
- "SwTabFrm::MakeAll for master while follow is in RebuildLastLine()" )
+ OSL_ENSURE( !pFollowFrm->IsJoinLocked() || !pFollowFrm->IsRebuildLastLine(),
+ "SwTabFrm::MakeAll for master while follow is in RebuildLastLine()" );
if ( pFollowFrm->IsJoinLocked() && pFollowFrm->IsRebuildLastLine() )
return;
}
@@ -2074,6 +2031,11 @@ void SwTabFrm::MakeAll()
pPre->GetAttrSet()->GetKeep().GetValue()) )
{
bCalcLowers = sal_True;
+ // --> OD 2009-03-06 #i99267#
+ // reset <bSplit> after forward move to assure that follows
+ // can be joined, if further space is available.
+ bSplit = sal_False;
+ // <--
}
}
@@ -2103,7 +2065,6 @@ void SwTabFrm::MakeAll()
delete pAccess;
bCalcLowers |= pLayout->Resize(
pLayout->GetBrowseWidthByTabFrm( *this ), sal_False );
-// GetFmt()->GetDoc()->GetDocShell()->IsReadOnly() ? sal_False : sal_True );
pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
}
@@ -2175,15 +2136,6 @@ void SwTabFrm::MakeAll()
// Thus, find next content, table or section
// and, if a section is found, get its first
// content.
-// SwFrm *pNxt = FindNextCnt();
-// if( pNxt && pNxt->IsInTab() )
-// pNxt = pNxt->FindTabFrm();
-// if ( pNxt )
-// {
-// pNxt->Calc();
-// if ( !GetNext() )
-// bValidPos = sal_False;
-// }
if ( 0 != lcl_FormatNextCntntForKeep( this ) && !GetNext() )
{
bValidPos = sal_False;
@@ -2442,9 +2394,8 @@ void SwTabFrm::MakeAll()
// We better avoid splitting of a row frame if we are inside a columned
// section which has a height of 0, because this is not growable and thus
// all kinds of unexpected things could happen.
- const SwSectionFrm* pTmpSct = 0;
if ( IsInSct() &&
- (pTmpSct = FindSctFrm())->Lower()->IsColumnFrm() &&
+ (FindSctFrm())->Lower()->IsColumnFrm() &&
0 == (GetUpper()->Frm().*fnRect->fnGetHeight)() )
{
bTryToSplit = false;
@@ -2533,7 +2484,7 @@ void SwTabFrm::MakeAll()
--nUnSplitted;
// --> FME 2004-06-09 #i29771# Two tries to split the table:
- // If an error occured during splitting. We start a second
+ // If an error occurred during splitting. We start a second
// try, this time without splitting of table rows.
if ( bSplitError )
{
@@ -2714,7 +2665,7 @@ void SwTabFrm::MakeAll()
#if OSL_DEBUG_LEVEL > 1
else
{
- ASSERT( false, "debug assertion: <SwTabFrm::MakeAll()> - format of table lowers suppressed by fix i44910" );
+ OSL_ENSURE( false, "debug assertion: <SwTabFrm::MakeAll()> - format of table lowers suppressed by fix i44910" );
}
#endif
// <--
@@ -2744,8 +2695,6 @@ void SwTabFrm::MakeAll()
|*
|* Beschreibung: Berechnet die Offsets, die durch FlyFrames
|* entstehen.
-|* Ersterstellung MA/MIB 14. Apr. 99
-|* Letzte Aenderung
|*
|*************************************************************************/
sal_Bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
@@ -2797,19 +2746,6 @@ sal_Bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
// E.g., it could happen, that the fly frame is still registered
// at the page frame, the table is on, but it's anchor character
// text frame has already changed its page.
- //if ( WEIT_WECH != (pFly->Frm().*fnRect->fnGetTop)() &&
- // pFly->IsFlyAtCntFrm() && aFlyRect.IsOver( aRect ) &&
- // // OD 25.02.2003 #i9040# - use '<=' instead of '<'
- // (*fnRect->fnYDiff)(
- // (pFly->GetAnchorFrm()->Frm().*fnRect->fnGetBottom)(),
- // (Frm().*fnRect->fnGetTop)() ) <= 0 &&
- // !IsAnLower( pFly ) && !pFly->IsAnLower( this ) &&
- // ( !pMyFly || pMyFly->IsAnLower( pFly ) ) &&
- // pPage->GetPhyPageNum() >=
- // pFly->GetAnchorFrm()->FindPageFrm()->GetPhyPageNum() &&
- // // anchor should be in same page body/header/footer
- // ( pFly->GetAnchorFrm()->FindFooterOrHeader() ==
- // FindFooterOrHeader() ) )
const SwTxtFrm* pAnchorCharFrm = pFly->FindAnchorCharFrm();
bool bConsiderFly =
// --> OD 2005-04-06 #i46807# - do not consider invalid
@@ -2904,13 +2840,11 @@ sal_Bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
|*
|* Beschreibung: "Formatiert" den Frame; Frm und PrtArea
|* Die Fixsize wird hier nicht eingestellt.
-|* Ersterstellung MA 09. Mar. 93
-|* Letzte Aenderung MA 18. Jun. 97
|*
|*************************************************************************/
void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
{
- ASSERT( pAttrs, "TabFrm::Format, pAttrs ist 0." );
+ OSL_ENSURE( pAttrs, "TabFrm::Format, pAttrs ist 0." );
SWRECTFN( this )
if ( !bValidSize )
@@ -3084,11 +3018,6 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
// OD 10.03.2003 #i9040# - consider right line attribute.
nRightSpacing = Max( nRightSpacing, ( nRightOffset + nRightLine ) );
}
- // OD 10.03.2003 #i9040# - do not hold wished table width.
- /*
- if ( !pAttrs->GetLRSpace().GetRight() )
- nRight = Max( nRight, nMax - (nWish + nLeft + nRight));
- */
}
break;
case text::HoriOrientation::LEFT_AND_WIDTH:
@@ -3115,7 +3044,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
}
break;
default:
- ASSERT( sal_False, "Ungueltige orientation fuer Table." );
+ OSL_ENSURE( sal_False, "Ungueltige orientation fuer Table." );
}
// --> OD 2004-07-15 #i26250# - extend bottom printing area, if table
@@ -3177,9 +3106,6 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
|*
|* SwTabFrm::GrowFrm()
|*
-|* Ersterstellung MA 12. Mar. 93
-|* Letzte Aenderung MA 23. Sep. 96
-|*
|*************************************************************************/
SwTwips SwTabFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
@@ -3205,10 +3131,9 @@ SwTwips SwTabFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
pFrm = pFrm->GetNext();
}
- long nTmp = 0;
if ( nReal < nDist )
{
- nTmp = GetUpper()->Grow( nDist - ( nReal > 0 ? nReal : 0), bTst, bInfo );
+ long nTmp = GetUpper()->Grow( nDist - ( nReal > 0 ? nReal : 0), bTst, bInfo );
if ( IsRestrictTableGrowth() )
{
@@ -3264,9 +3189,6 @@ SwTwips SwTabFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
|*
|* SwTabFrm::Modify()
|*
-|* Ersterstellung MA 14. Mar. 93
-|* Letzte Aenderung MA 06. Dec. 96
-|*
|*************************************************************************/
void SwTabFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
@@ -3299,8 +3221,6 @@ void SwTabFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
SwPageFrm *pPage = FindPageFrm();
InvalidatePage( pPage );
-// if ( nInvFlags & 0x01 )
-// SetCompletePaint();
if ( nInvFlags & 0x02 )
_InvalidatePrt();
if ( nInvFlags & 0x40 )
@@ -3426,9 +3346,6 @@ void SwTabFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
|*
|* SwTabFrm::GetInfo()
|*
-|* Ersterstellung MA 06. Dec. 96
-|* Letzte Aenderung MA 26. Jun. 98
-|*
|*************************************************************************/
sal_Bool SwTabFrm::GetInfo( SfxPoolItem &rHnt ) const
{
@@ -3460,9 +3377,6 @@ sal_Bool SwTabFrm::GetInfo( SfxPoolItem &rHnt ) const
|*
|* SwTabFrm::FindLastCntnt()
|*
-|* Ersterstellung MA 13. Apr. 93
-|* Letzte Aenderung MA 15. May. 98
-|*
|*************************************************************************/
SwCntntFrm *SwTabFrm::FindLastCntnt()
{
@@ -3490,10 +3404,10 @@ SwCntntFrm *SwTabFrm::FindLastCntnt()
// Spalten abklappern, dies erledigt SwSectionFrm::FindLastCntnt
if( pRet->IsColBodyFrm() )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
SwSectionFrm* pSect = pRet->FindSctFrm();
- ASSERT( pSect, "Wo kommt denn die Spalte her?")
- ASSERT( IsAnLower( pSect ), "Gespaltene Zelle?" );
+ OSL_ENSURE( pSect, "Wo kommt denn die Spalte her?");
+ OSL_ENSURE( IsAnLower( pSect ), "Gespaltene Zelle?" );
#endif
return pRet->FindSctFrm()->FindLastCntnt();
}
@@ -3502,7 +3416,7 @@ SwCntntFrm *SwTabFrm::FindLastCntnt()
// pRet may be a cell frame without a lower (cell has been split).
// We have to find the last content the hard way:
//
- ASSERT( pRet->IsCellFrm(), "SwTabFrm::FindLastCntnt failed" )
+ OSL_ENSURE( pRet->IsCellFrm(), "SwTabFrm::FindLastCntnt failed" );
const SwFrm* pRow = pRet->GetUpper();
while ( pRow && !pRow->GetUpper()->IsTabFrm() )
pRow = pRow->GetUpper();
@@ -3538,9 +3452,6 @@ SwCntntFrm *SwTabFrm::FindLastCntnt()
|*
|* SwTabFrm::GetLeaf()
|*
-|* Ersterstellung MA 19. Mar. 93
-|* Letzte Aenderung MA 25. Apr. 95
-|*
|*************************************************************************/
SwLayoutFrm *SwTabFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd )
{
@@ -3563,8 +3474,6 @@ SwLayoutFrm *SwTabFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd )
|* SwTabFrm::ShouldBwdMoved()
|*
|* Beschreibung Returnwert sagt ob der Frm verschoben werden sollte
-|* Ersterstellung MA 10. Jul. 95
-|* Letzte Aenderung MA 04. Mar. 97
|*
|*************************************************************************/
sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &rReformat )
@@ -3673,13 +3582,10 @@ sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &r
|*
|* SwTabFrm::Cut()
|*
-|* Ersterstellung MA 23. Feb. 94
-|* Letzte Aenderung MA 09. Sep. 98
-|*
|*************************************************************************/
void SwTabFrm::Cut()
{
- ASSERT( GetUpper(), "Cut ohne Upper()." );
+ OSL_ENSURE( GetUpper(), "Cut ohne Upper()." );
SwPageFrm *pPage = FindPageFrm();
InvalidatePage( pPage );
@@ -3737,7 +3643,7 @@ void SwTabFrm::Cut()
Remove();
if ( pUp )
{
- ASSERT( !pUp->IsFtnFrm(), "Tabelle in Fussnote." );
+ OSL_ENSURE( !pUp->IsFtnFrm(), "Tabelle in Fussnote." );
SwSectionFrm *pSct = 0;
// --> OD 2006-01-04 #126020# - adjust check for empty section
// --> OD 2006-02-01 #130797# - correct fix #126020#
@@ -3768,17 +3674,14 @@ void SwTabFrm::Cut()
|*
|* SwTabFrm::Paste()
|*
-|* Ersterstellung MA 23. Feb. 94
-|* Letzte Aenderung MA 09. Sep. 98
-|*
|*************************************************************************/
void SwTabFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
{
- ASSERT( pParent, "Kein Parent fuer Paste." );
- ASSERT( pParent->IsLayoutFrm(), "Parent ist CntntFrm." );
- ASSERT( pParent != this, "Bin selbst der Parent." );
- ASSERT( pSibling != this, "Bin mein eigener Nachbar." );
- ASSERT( !GetPrev() && !GetNext() && !GetUpper(),
+ OSL_ENSURE( pParent, "Kein Parent fuer Paste." );
+ OSL_ENSURE( pParent->IsLayoutFrm(), "Parent ist CntntFrm." );
+ OSL_ENSURE( pParent != this, "Bin selbst der Parent." );
+ OSL_ENSURE( pSibling != this, "Bin mein eigener Nachbar." );
+ OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(),
"Bin noch irgendwo angemeldet." );
//In den Baum einhaengen.
@@ -3839,9 +3742,6 @@ void SwTabFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
|*
|* SwTabFrm::Prepare()
|*
-|* Created AMA 01/10/02
-|* Last Change AMA 01/10/02
-|*
|*************************************************************************/
void SwTabFrm::Prepare( const PrepareHint eHint, const void *, sal_Bool )
{
@@ -3853,9 +3753,6 @@ void SwTabFrm::Prepare( const PrepareHint eHint, const void *, sal_Bool )
|*
|* SwRowFrm::SwRowFrm(), ~SwRowFrm()
|*
-|* Ersterstellung MA 09. Mar. 93
-|* Letzte Aenderung MA 30. May. 96
-|*
|*************************************************************************/
SwRowFrm::SwRowFrm( const SwTableLine &rLine, bool bInsertContent ):
SwLayoutFrm( rLine.GetFrmFmt() ),
@@ -3900,9 +3797,6 @@ SwRowFrm::~SwRowFrm()
|*
|* SwRowFrm::RegistFlys()
|*
-|* Ersterstellung MA 08. Jul. 93
-|* Letzte Aenderung MA 08. Jul. 93
-|*
|*************************************************************************/
void SwRowFrm::RegistFlys( SwPageFrm *pPage )
{
@@ -3913,9 +3807,6 @@ void SwRowFrm::RegistFlys( SwPageFrm *pPage )
|*
|* SwRowFrm::Modify()
|*
-|* Ersterstellung MA 12. Nov. 97
-|* Letzte Aenderung MA 12. Nov. 97
-|*
|*************************************************************************/
void SwRowFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
@@ -3960,9 +3851,6 @@ void SwRowFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
|*
|* SwRowFrm::MakeAll()
|*
-|* Ersterstellung MA 01. Mar. 94
-|* Letzte Aenderung MA 01. Mar. 94
-|*
|*************************************************************************/
void SwRowFrm::MakeAll()
{
@@ -3975,9 +3863,6 @@ void SwRowFrm::MakeAll()
|*
|* SwRowFrm::Format()
|*
-|* Ersterstellung MA 13. Mar. 93
-|* Letzte Aenderung MA 20. Jun. 96
-|*
|*************************************************************************/
long MA_FASTCALL CalcHeightWidthFlys( const SwFrm *pFrm )
{
@@ -4187,7 +4072,7 @@ SwTwips MA_FASTCALL lcl_CalcMinRowHeight( const SwRowFrm* _pRow,
if ( _pRow->HasFixSize() && !_pRow->IsRowSpanLine() )
{
- ASSERT( ATT_FIX_SIZE == rSz.GetHeightSizeType(), "pRow claims to have fixed size" )
+ OSL_ENSURE( ATT_FIX_SIZE == rSz.GetHeightSizeType(), "pRow claims to have fixed size" );
return rSz.GetHeight();
}
@@ -4331,7 +4216,7 @@ sal_uInt16 lcl_GetBottomLineDist( const SwRowFrm& rRow )
void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
{
SWRECTFN( this )
- ASSERT( pAttrs, "SwRowFrm::Format ohne Attrs." );
+ OSL_ENSURE( pAttrs, "SwRowFrm::Format ohne Attrs." );
const sal_Bool bFix = bFixSize;
@@ -4401,8 +4286,8 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
SwClient* pLast;
for ( pLast = aIter.First( TYPE( SwFrm ) ); pLast; pLast = aIter.Next() )
{
- ASSERT( ((SwFrm*)pLast)->IsRowFrm(),
- "Non-row frame registered in table line" )
+ OSL_ENSURE( ((SwFrm*)pLast)->IsRowFrm(),
+ "Non-row frame registered in table line" );
SwRowFrm* pRow = (SwRowFrm*)pLast;
// --> OD 2004-11-23 #115759# - do *not* take repeated
// headlines, because during split of table it can be
@@ -4457,11 +4342,11 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
{
bValidSize = sal_True;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if ( HasFixSize() )
{
const SwFmtFrmSize &rFrmSize = GetFmt()->GetFrmSize();
- ASSERT( rFrmSize.GetSize().Height() > 0, "Hat ihn" );
+ OSL_ENSURE( rFrmSize.GetSize().Height() > 0, "Hat ihn" );
}
#endif
const SwTwips nDiff = (Frm().*fnRect->fnGetHeight)() -
@@ -4506,9 +4391,6 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
|*
|* SwRowFrm::AdjustCells()
|*
-|* Ersterstellung MA 10. Aug. 93
-|* Letzte Aenderung MA 16. Dec. 96
-|*
|*************************************************************************/
void SwRowFrm::AdjustCells( const SwTwips nHeight, const sal_Bool bHeight )
{
@@ -4610,9 +4492,6 @@ void SwRowFrm::AdjustCells( const SwTwips nHeight, const sal_Bool bHeight )
|*
|* SwRowFrm::Cut()
|*
-|* Ersterstellung MA 12. Nov. 97
-|* Letzte Aenderung MA 12. Nov. 97
-|*
|*************************************************************************/
void SwRowFrm::Cut()
{
@@ -4634,7 +4513,7 @@ void SwRowFrm::Cut()
SwFrm* pCellFrm( GetLower() );
while ( pCellFrm )
{
- ASSERT( pCellFrm->IsCellFrm(),
+ OSL_ENSURE( pCellFrm->IsCellFrm(),
"<SwRowFrm::Cut()> - unexpected type of SwRowFrm lower." );
pVSh->Imp()->DisposeAccessibleFrm( pCellFrm );
@@ -4652,9 +4531,6 @@ void SwRowFrm::Cut()
|*
|* SwRowFrm::GrowFrm()
|*
-|* Ersterstellung MA 15. Mar. 93
-|* Letzte Aenderung MA 05. May. 94
-|*
|*************************************************************************/
@@ -4675,10 +4551,10 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
}
else
{
- ASSERT( GetUpper()->IsCellFrm(), "RowFrm->GetUpper neither table nor cell" )
+ OSL_ENSURE( GetUpper()->IsCellFrm(), "RowFrm->GetUpper neither table nor cell" );
bRestrictTableGrowth = GetFollowRow() && bHasFollowFlowLine;
- ASSERT( !bRestrictTableGrowth || !GetNext(),
- "GetFollowRow for row frame that has a Next" )
+ OSL_ENSURE( !bRestrictTableGrowth || !GetNext(),
+ "GetFollowRow for row frame that has a Next" );
//
// There may still be some space left in my direct upper:
@@ -4728,9 +4604,6 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
|*
|* SwRowFrm::ShrinkFrm()
|*
-|* Ersterstellung MA 15. Mar. 93
-|* Letzte Aenderung MA 20. Jun. 96
-|*
|*************************************************************************/
SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
@@ -4759,7 +4632,7 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
if( nMinHeight < (Frm().*fnRect->fnGetHeight)() )
{
// --> OD 2004-10-04 #i26945#
- ASSERT( FindTabFrm(), "<SwRowFrm::ShrinkFrm(..)> - no table frame -> crash." );
+ OSL_ENSURE( FindTabFrm(), "<SwRowFrm::ShrinkFrm(..)> - no table frame -> crash." );
const bool bConsiderObjs( FindTabFrm()->IsConsiderObjsForMinCellHeight() );
// <--
nMinHeight = lcl_CalcMinRowHeight( this, bConsiderObjs );
@@ -4835,7 +4708,7 @@ bool SwRowFrm::IsRowSplitAllowed() const
// Fixed size rows are never allowed to split:
if ( HasFixSize() )
{
- ASSERT( ATT_FIX_SIZE == GetFmt()->GetFrmSize().GetHeightSizeType(), "pRow claims to have fixed size" )
+ OSL_ENSURE( ATT_FIX_SIZE == GetFmt()->GetFrmSize().GetHeightSizeType(), "pRow claims to have fixed size" );
return false;
}
@@ -4873,9 +4746,6 @@ bool SwRowFrm::ShouldRowKeepWithNext() const
|*
|* SwCellFrm::SwCellFrm(), ~SwCellFrm()
|*
-|* Ersterstellung MA 09. Mar. 93
-|* Letzte Aenderung MA 30. May. 96
-|*
|*************************************************************************/
SwCellFrm::SwCellFrm( const SwTableBox &rBox, bool bInsertContent ) :
SwLayoutFrm( rBox.GetFrmFmt() ),
@@ -4931,9 +4801,6 @@ SwCellFrm::~SwCellFrm()
|*
|* SwCellFrm::Format()
|*
-|* Ersterstellung MA 09. Mar. 93
-|* Letzte Aenderung MA 29. Jan. 98
-|*
|*************************************************************************/
sal_Bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, sal_Bool bInva )
{
@@ -5132,7 +4999,7 @@ sal_Bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, sal_Bool bInva )
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<lcl_ArrangeLowers(..)> - unknown type of anchored object!" );
}
}
@@ -5170,7 +5037,7 @@ sal_Bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, sal_Bool bInva )
void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
{
- ASSERT( pAttrs, "CellFrm::Format, pAttrs ist 0." );
+ OSL_ENSURE( pAttrs, "CellFrm::Format, pAttrs ist 0." );
const SwTabFrm* pTab = FindTabFrm();
SWRECTFN( pTab )
@@ -5229,9 +5096,9 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
const SwTwips nWish = pTab->GetFmt()->GetFrmSize().GetWidth();
nWidth = pAttrs->GetSize().Width();
- ASSERT( nWish, "Tabelle ohne Breite?" );
- ASSERT( nWidth <= nWish, "Zelle breiter als Tabelle." );
- ASSERT( nWidth > 0, "Box without width" );
+ OSL_ENSURE( nWish, "Tabelle ohne Breite?" );
+ OSL_ENSURE( nWidth <= nWish, "Zelle breiter als Tabelle." );
+ OSL_ENSURE( nWidth > 0, "Box without width" );
const long nPrtWidth = (pTab->Prt().*fnRect->fnGetWidth)();
if ( nWish != nPrtWidth )
@@ -5283,7 +5150,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
}
else
{
- ASSERT( pAttrs->GetSize().Width() > 0, "Box without width" );
+ OSL_ENSURE( pAttrs->GetSize().Width() > 0, "Box without width" );
nWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)();
SwFrm *pPre = GetUpper()->Lower();
while ( pPre != this )
@@ -5340,8 +5207,8 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
{
if ( !Lower()->IsCntntFrm() && !Lower()->IsSctFrm() && !Lower()->IsTabFrm() )
{
- //ASSERT fuer HTML-Import!
- ASSERT( !this, "VAlign an Zelle ohne Inhalt" );
+ // OSL_ENSURE(fuer HTML-Import!
+ OSL_ENSURE( !this, "VAlign an Zelle ohne Inhalt" );
return;
}
sal_Bool bVertDir = sal_True;
@@ -5399,10 +5266,10 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
if( ( bVertDir && ( nRemaining -= lcl_CalcTopAndBottomMargin( *this, *pAttrs ) ) < nPrtHeight ) ||
(Lower()->Frm().*fnRect->fnGetTop)() != (this->*fnRect->fnGetPrtTop)() )
{
- long lTopOfst = 0,
- nDiff = (Prt().*fnRect->fnGetHeight)() - nRemaining;
+ long nDiff = (Prt().*fnRect->fnGetHeight)() - nRemaining;
if ( nDiff >= 0 )
{
+ long lTopOfst = 0;
if ( bVertDir )
{
switch ( rOri.GetVertOrient() )
@@ -5434,9 +5301,6 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
|*
|* SwCellFrm::Modify()
|*
-|* Ersterstellung MA 20. Dec. 96
-|* Letzte Aenderung MA 20. Dec. 96
-|*
|*************************************************************************/
void SwCellFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
@@ -5555,8 +5419,8 @@ void SwCellFrm::Cut()
*/
bool SwTabFrm::IsInHeadline( const SwFrm& rFrm ) const
{
- ASSERT( IsAnLower( &rFrm ) && rFrm.IsInTab(),
- "SwTabFrm::IsInHeadline called for frame not lower of table" )
+ OSL_ENSURE( IsAnLower( &rFrm ) && rFrm.IsInTab(),
+ "SwTabFrm::IsInHeadline called for frame not lower of table" );
const SwFrm* pTmp = &rFrm;
while ( !pTmp->GetUpper()->IsTabFrm() )
@@ -5619,10 +5483,10 @@ bool SwTabFrm::IsLayoutSplitAllowed() const
sal_uInt16 SwTabFrm::GetBottomLineSize() const
{
- ASSERT( IsCollapsingBorders(),
- "BottomLineSize only required for collapsing borders" )
+ OSL_ENSURE( IsCollapsingBorders(),
+ "BottomLineSize only required for collapsing borders" );
- ASSERT( Lower(), "Warning! Trying to prevent a crash, please inform FME" )
+ OSL_ENSURE( Lower(), "Warning! Trying to prevent a crash, please inform FME" );
const SwFrm* pTmp = GetLastLower();
@@ -5808,7 +5672,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
SwTwips nTmpHeight = 0;
pFirstRow = GetFirstNonHeadlineRow();
- ASSERT( !IsFollow() || pFirstRow, "FollowTable without Lower" )
+ OSL_ENSURE( !IsFollow() || pFirstRow, "FollowTable without Lower" );
// NEW TABLES
if ( pFirstRow && pFirstRow->IsRowSpanLine() && pFirstRow->GetNext() )
@@ -5942,3 +5806,4 @@ bool SwFrm::IsInCoveredCell() const
return bRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index c04b13e3c3e5..b83bab70c8c4 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108,8 +109,6 @@ static SwCrsrOszControl aOszCtrl = { 0, 0, 0 };
|*
|* Beschreibung: Sucht denjenigen CntntFrm, innerhalb dessen
|* PrtArea der Point liegt.
-|* Ersterstellung MA 20. Jul. 92
-|* Letzte Aenderung MA 23. May. 95
|*
|*************************************************************************/
sal_Bool SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
@@ -145,8 +144,6 @@ sal_Bool SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
|*
|* Beschreibung: Sucht die Seite, innerhalb der der gesuchte Point
|* liegt.
-|* Ersterstellung MA 20. Jul. 92
-|* Letzte Aenderung MA 18. Jul. 96
|*
|*************************************************************************/
@@ -210,7 +207,7 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
if ( pCMS && pCMS->bStop )
return sal_False;
- ASSERT( pCnt, "Crsr is gone to a Black hole" );
+ OSL_ENSURE( pCnt, "Crsr is gone to a Black hole" );
if( pCMS && pCMS->pFill && pCnt->IsTxtFrm() )
bRet = pCnt->GetCrsrOfst( pPos, rPoint, pCMS );
else
@@ -295,8 +292,6 @@ bool SwRootFrm::FillSelection( SwSelectionList& aSelList, const SwRect& rRect) c
|* Beschreibung: Reicht Primaer den Aufruf an die erste Seite weiter.
|* Wenn der 'reingereichte Point veraendert wird,
|* so wird sal_False zurueckgegeben.
-|* Ersterstellung MA 01. Jun. 92
-|* Letzte Aenderung MA 30. Nov. 94
|*
|*************************************************************************/
sal_Bool SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
@@ -304,7 +299,7 @@ sal_Bool SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
{
sal_Bool bOldAction = IsCallbackActionEnabled();
((SwRootFrm*)this)->SetCallbackActionEnabled( sal_False );
- ASSERT( (Lower() && Lower()->IsPageFrm()), "Keinen PageFrm gefunden." );
+ OSL_ENSURE( (Lower() && Lower()->IsPageFrm()), "Keinen PageFrm gefunden." );
if( pCMS && pCMS->pFill )
((SwCrsrMoveState*)pCMS)->bFillRet = sal_False;
Point aOldPoint = rPoint;
@@ -350,8 +345,6 @@ sal_Bool SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
|* der Crsr notfalls mit Gewalt in einen der CntntFrms
|* gesetzt.
|* In geschuetzte Zellen gibt es hier keinen Eingang.
-|* Ersterstellung MA 04. Jun. 93
-|* Letzte Aenderung MA 23. May. 95
|*
|*************************************************************************/
sal_Bool SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
@@ -420,9 +413,6 @@ sal_Bool SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
|*
|* SwFlyFrm::GetCrsrOfst()
|*
-|* Ersterstellung MA 15. Dec. 92
-|* Letzte Aenderung MA 23. May. 95
-|*
|*************************************************************************/
//Problem: Wenn zwei Flys genau gleich gross sind und auf derselben
//Position stehen, so liegt jeder innerhalb des anderen.
@@ -515,8 +505,6 @@ sal_Bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
/*************************************************************************
|*
|* Beschreibung Layoutabhaengiges Cursortravelling
-|* Ersterstellung MA 23. Jul. 92
-|* Letzte Aenderung MA 06. Sep. 93
|*
|*************************************************************************/
sal_Bool SwCntntFrm::LeftMargin(SwPaM *pPam) const
@@ -579,10 +567,10 @@ const SwCntntFrm * MA_FASTCALL lcl_MissProtectedFrames( const SwCntntFrm *pCnt,
while ( pCell && !pCell->IsCellFrm() )
pCell = pCell->GetUpper();
if ( !pCell ||
- ( ( bInReadOnly || !pCell->GetFmt()->GetProtect().IsCntntProtected() ) &&
+ (( ( bInReadOnly || !pCell->GetFmt()->GetProtect().IsCntntProtected() ) &&
( !bMissHeadline || !lcl_IsInRepeatedHeadline( pCell ) ) &&
( !bMissFollowFlowLine || !pCell->IsInFollowFlowRow() ) &&
- !pCell->IsCoveredCell() ) )
+ !pCell->IsCoveredCell()) ) )
bProtect = sal_False;
else
pCnt = (*fnNxtPrv)( pCnt );
@@ -598,7 +586,7 @@ const SwCntntFrm * MA_FASTCALL lcl_MissProtectedFrames( const SwCntntFrm *pCnt,
sal_Bool MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
GetNxtPrvCnt fnNxtPrv, sal_Bool bInReadOnly )
{
- ASSERT( pPam->GetNode() == (SwCntntNode*)pStart->GetNode(),
+ OSL_ENSURE( pPam->GetNode() == (SwCntntNode*)pStart->GetNode(),
"lcl_UpDown arbeitet nicht fuer andere." );
const SwCntntFrm *pCnt = 0;
@@ -677,7 +665,7 @@ sal_Bool MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
const SwFrm *pCell = pStart->GetUpper();
while ( pCell && !pCell->IsCellFrm() )
pCell = pCell->GetUpper();
- ASSERT( pCell, "Zelle nicht gefunden." );
+ OSL_ENSURE( pCell, "Zelle nicht gefunden." );
nX = (pCell->Frm().*fnRect->fnGetLeft)() +
(pCell->Frm().*fnRect->fnGetWidth)() / 2;
@@ -701,14 +689,14 @@ sal_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;
}
}
@@ -885,13 +873,11 @@ sal_Bool SwCntntFrm::UnitDown( SwPaM* pPam, const SwTwips, sal_Bool bInReadOnly
|* diejenige in der der PaM sitzt. Anderfalls ist die aktuelle
|* Seite die erste Seite innerhalb der VisibleArea.
|* Es wird nur auf den vorhandenen Seiten gearbeitet!
-|* Ersterstellung MA 20. May. 92
-|* Letzte Aenderung MA 09. Oct. 97
|*
|*************************************************************************/
sal_uInt16 SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const
{
- ASSERT( pActualCrsr, "Welche Seite soll's denn sein?" );
+ OSL_ENSURE( pActualCrsr, "Welche Seite soll's denn sein?" );
SwFrm const*const pActFrm = pActualCrsr->GetPoint()->nNode.GetNode().
GetCntntNode()->GetFrm( 0,
pActualCrsr->GetPoint(),
@@ -909,13 +895,11 @@ sal_uInt16 SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const
|* Liefert Null, wenn die Operation nicht moeglich ist.
|* Der PaM sitzt in der letzten Seite, wenn die Seitenzahl zu gross
|* gewaehlt wurde.
-|* Ersterstellung MA 20. May. 92
-|* Letzte Aenderung MA 09. Oct. 97
|*
|*************************************************************************/
sal_uInt16 SwRootFrm::SetCurrPage( SwCursor* pToSet, sal_uInt16 nPageNum )
{
- ASSERT( Lower() && Lower()->IsPageFrm(), "Keine Seite vorhanden." );
+ OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "Keine Seite vorhanden." );
SwPageFrm *pPage = (SwPageFrm*)Lower();
sal_Bool bEnd =sal_False;
@@ -981,8 +965,6 @@ sal_uInt16 SwRootFrm::SetCurrPage( SwCursor* pToSet, sal_uInt16 nPageNum )
|* andere Anfang/Ende.
|* Fuer die Bestimmung der Seite und des Cntnt (Anfang/Ende) werden
|* die im folgenden definierten Funktionen benutzt.
-|* Ersterstellung MA 15. Oct. 92
-|* Letzte Aenderung MA 28. Feb. 93
|*
|*************************************************************************/
SwCntntFrm *GetFirstSub( const SwLayoutFrm *pLayout )
@@ -1097,8 +1079,6 @@ sal_Bool GetFrmInPage( const SwCntntFrm *pCnt, SwWhichPage fnWhichPage,
* erweitert bis einer gefunden wird.
|* Zurueckgegeben wird die 'Semantisch richtige' Position
|* innerhalb der PrtArea des gefundenen CntntFrm
-|* Ersterstellung MA 15. Jul. 92
-|* Letzte Aenderung MA 09. Jan. 97
|*
|*************************************************************************/
sal_uLong CalcDiff( const Point &rPt1, const Point &rPt2 )
@@ -1283,10 +1263,10 @@ const SwCntntFrm *SwLayoutFrm::GetCntntPos( Point& rPoint,
break;
}
-#ifdef DBG_UTIL
- ASSERT( pActual, "Keinen Cntnt gefunden." );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( pActual, "Keinen Cntnt gefunden." );
if ( bBodyOnly )
- ASSERT( pActual->IsInDocBody(), "Cnt nicht im Body." );
+ OSL_ENSURE( pActual->IsInDocBody(), "Cnt nicht im Body." );
#endif
//Spezialfall fuer das selektieren von Tabellen, nicht in wiederholte
@@ -1352,9 +1332,6 @@ const SwCntntFrm *SwLayoutFrm::GetCntntPos( Point& rPoint,
|* Beschreibung Analog zu SwLayoutFrm::GetCntntPos().
|* Spezialisiert fuer Felder in Rahmen.
|*
-|* Ersterstellung MA 22. Mar. 95
-|* Letzte Aenderung MA 07. Nov. 95
-|*
|*************************************************************************/
void SwPageFrm::GetCntntPosition( const Point &rPt, SwPosition &rPos ) const
{
@@ -1432,7 +1409,7 @@ void SwPageFrm::GetCntntPosition( const Point &rPt, SwPosition &rPos ) const
{
// CntntFrm nicht formatiert -> immer auf Node-Anfang
SwCntntNode* pCNd = (SwCntntNode*)pAct->GetNode();
- ASSERT( pCNd, "Wo ist mein CntntNode?" );
+ OSL_ENSURE( pCNd, "Wo ist mein CntntNode?" );
rPos.nNode = *pCNd;
rPos.nContent.Assign( pCNd, 0 );
}
@@ -1449,8 +1426,6 @@ void SwPageFrm::GetCntntPosition( const Point &rPt, SwPosition &rPos ) const
|*
|* Beschreibung Es wird der naechstliegende Cntnt zum uebergebenen
|* Point gesucht. Es wird nur im BodyText gesucht.
-|* Ersterstellung MA 15. Jul. 92
-|* Letzte Aenderung JP 11.10.2001
|*
|*************************************************************************/
@@ -1571,13 +1546,11 @@ Point SwRootFrm::GetNextPrevCntntPos( const Point& rPoint, sal_Bool bNext ) cons
|* Liefert Null, wenn die Operation nicht moeglich ist.
|* Die Pos ist die der letzten Seite, wenn die Seitenzahl zu gross
|* gewaehlt wurde.
-|* Ersterstellung MA 01. Jun. 92
-|* Letzte Aenderung MA 09. Oct. 97
|*
|*************************************************************************/
Point SwRootFrm::GetPagePos( sal_uInt16 nPageNum ) const
{
- ASSERT( Lower() && Lower()->IsPageFrm(), "Keine Seite vorhanden." );
+ OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "Keine Seite vorhanden." );
const SwPageFrm *pPage = (const SwPageFrm*)Lower();
while ( sal_True )
@@ -1640,8 +1613,6 @@ sal_Bool SwRootFrm::IsDummyPage( sal_uInt16 nPageNum ) const
|* geschuetzt?
|* Auch Fly in Fly in ... und Fussnoten
|*
-|* Ersterstellung MA 28. Jul. 93
-|* Letzte Aenderung MA 06. Nov. 97
|*
|*************************************************************************/
sal_Bool SwFrm::IsProtected() const
@@ -1705,8 +1676,6 @@ sal_Bool SwFrm::IsProtected() const
|* SwFrm::GetPhyPageNum()
|* Beschreibung: Liefert die physikalische Seitennummer
|*
-|* Ersterstellung OK 06.07.93 08:35
-|* Letzte Aenderung MA 30. Nov. 94
|*
|*************************************************************************/
sal_uInt16 SwFrm::GetPhyPageNum() const
@@ -1715,7 +1684,7 @@ sal_uInt16 SwFrm::GetPhyPageNum() const
return pPage ? pPage->GetPhyPageNum() : 0;
}
-/*-----------------26.02.01 11:25-------------------
+/*--------------------------------------------------
* SwFrm::WannaRightPage()
* decides if the page want to be a rightpage or not.
* If the first content of the page has a page descriptor,
@@ -1763,7 +1732,7 @@ sal_Bool SwFrm::WannaRightPage() const
pDesc = (SwPageDesc*)&pDoc->GetPageDesc( 0 );
}
}
- ASSERT( pDesc, "No pagedescriptor" );
+ OSL_ENSURE( pDesc, "No pagedescriptor" );
sal_Bool bOdd;
if( nPgNum )
bOdd = nPgNum % 2 ? sal_True : sal_False;
@@ -1788,9 +1757,6 @@ sal_Bool SwFrm::WannaRightPage() const
|* SwFrm::GetVirtPageNum()
|* Beschreibung: Liefert die virtuelle Seitennummer mit Offset
|*
-|* Ersterstellung OK 06.07.93 08:35
-|* Letzte Aenderung MA 30. Nov. 94
-|*
|*************************************************************************/
sal_uInt16 SwFrm::GetVirtPageNum() const
{
@@ -1844,9 +1810,6 @@ sal_uInt16 SwFrm::GetVirtPageNum() const
|*
|* SwRootFrm::MakeTblCrsrs()
|*
-|* Ersterstellung MA 14. May. 93
-|* Letzte Aenderung MA 02. Feb. 94
-|*
|*************************************************************************/
//Ermitteln und einstellen derjenigen Zellen die von der Selektion
//eingeschlossen sind.
@@ -1854,7 +1817,7 @@ sal_uInt16 SwFrm::GetVirtPageNum() const
bool SwRootFrm::MakeTblCrsrs( SwTableCursor& rTblCrsr )
{
//Union-Rects und Tabellen (Follows) der Selektion besorgen.
- ASSERT( rTblCrsr.GetCntntNode() && rTblCrsr.GetCntntNode( sal_False ),
+ OSL_ENSURE( rTblCrsr.GetCntntNode() && rTblCrsr.GetCntntNode( sal_False ),
"Tabselection nicht auf Cnt." );
bool bRet = false;
@@ -1884,7 +1847,7 @@ bool SwRootFrm::MakeTblCrsrs( SwTableCursor& rTblCrsr )
const SwLayoutFrm* pStart = pTmpStartFrm ? pTmpStartFrm->GetUpper() : 0;
const SwLayoutFrm* pEnd = pTmpEndFrm ? pTmpEndFrm->GetUpper() : 0;
- ASSERT( pStart && pEnd, "MakeTblCrsrs: Good to have the code robust here!" )
+ OSL_ENSURE( pStart && pEnd, "MakeTblCrsrs: Good to have the code robust here!" );
// <--
/* #109590# Only change table boxes if the frames are
@@ -1917,7 +1880,7 @@ bool SwRootFrm::MakeTblCrsrs( SwTableCursor& rTblCrsr )
while ( pCell && pRow->IsAnLower( pCell ) )
{
- ASSERT( pCell->IsCellFrm(), "Frame ohne Celle" );
+ OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Celle" );
if( IsFrmInTblSel( pUnion->GetUnion(), pCell ) &&
(bReadOnlyAvailable ||
!pCell->GetFmt()->GetProtect().IsCntntProtected()))
@@ -1945,7 +1908,7 @@ bool SwRootFrm::MakeTblCrsrs( SwTableCursor& rTblCrsr )
while( !pCell->IsCellFrm() )
{
pCell = pCell->GetUpper();
- ASSERT( pCell, "Where's my cell?" );
+ OSL_ENSURE( pCell, "Where's my cell?" );
}
}
}
@@ -1967,9 +1930,6 @@ bool SwRootFrm::MakeTblCrsrs( SwTableCursor& rTblCrsr )
|*
|* SwRootFrm::CalcFrmRects
|*
-|* Ersterstellung MA 24. Aug. 92
-|* Letzte Aenderung MA 24. Aug. 93
-|*
|*************************************************************************/
/*
@@ -2028,19 +1988,6 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
( !pEndPos->nNode.GetNode().IsCntntNode() ||
!pEndPos->nNode.GetNode().GetCntntNode()->GetFrm() ) ) )
{
- /* For SelectAll we will need something like this later on...
- const SwFrm* pPageFrm = GetLower();
- while( pPageFrm )
- {
- SwRect aTmp( pPageFrm->Prt() );
- aTmp.Pos() += pPageFrm->Frm().Pos();
- Sub( aRegion, aTmp );
- pPageFrm = pPageFrm->GetNext();
- }
- aRegion.Invert();
- rCrsr.Remove( 0, rCrsr.Count() );
- rCrsr.Insert( &aRegion, 0 );
- */
return;
}
@@ -2052,7 +1999,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
SwCntntFrm const* pEndFrm = pEndPos->nNode.GetNode().
GetCntntNode()->GetFrm( &rCrsr.GetEndPos(), pEndPos );
- ASSERT( (pStartFrm && pEndFrm), "Keine CntntFrms gefunden." );
+ OSL_ENSURE( (pStartFrm && pEndFrm), "Keine CntntFrms gefunden." );
//Damit die FlyFrms, in denen selektierte Frames stecken, nicht
//abgezogen werden
@@ -2060,9 +2007,11 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
if ( pStartFrm->IsInFly() )
{
const SwAnchoredObject* pObj = pStartFrm->FindFlyFrm();
- aSortObjs.Insert( *(const_cast<SwAnchoredObject*>(pObj)) );
+ OSL_ENSURE( pObj, "No Start Object." );
+ if (pObj) aSortObjs.Insert( *(const_cast<SwAnchoredObject*>(pObj)) );
const SwAnchoredObject* pObj2 = pEndFrm->FindFlyFrm();
- aSortObjs.Insert( *(const_cast<SwAnchoredObject*>(pObj2)) );
+ OSL_ENSURE( pObj2, "No Start Object." );
+ if (pObj2) aSortObjs.Insert( *(const_cast<SwAnchoredObject*>(pObj2)) );
}
//Fall 4: Tabellenselection
@@ -2096,7 +2045,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
if( !pEndLFrm )
break;
- ASSERT( pEndLFrm->GetType() == pSttLFrm->GetType(),
+ OSL_ENSURE( pEndLFrm->GetType() == pSttLFrm->GetType(),
"Selection ueber unterschiedliche Inhalte" );
switch( pSttLFrm->GetType() )
{
@@ -2513,7 +2462,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
// --> OD 2006-01-24 #123908# - introduce robust code:
// The stacktrace issue reveals that <pCntnt> could be NULL.
// One root cause found by AMA - see #130650#
- ASSERT( pCntnt,
+ OSL_ENSURE( pCntnt,
"<SwRootFrm::CalcFrmRects(..)> - no content frame. This is a serious defect -> please inform OD" );
while ( pCntnt && pCntnt != pEndFrm )
// <--
@@ -2554,7 +2503,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
}
pCntnt = pCntnt->GetNextCntntFrm();
// --> OD 2006-01-24 #123908#
- ASSERT( pCntnt,
+ OSL_ENSURE( pCntnt,
"<SwRootFrm::CalcFrmRects(..)> - no content frame. This is a serious defect -> please inform OD" );
// <--
}
@@ -2620,7 +2569,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
const sal_uInt32 nPos = pObj->GetOrdNum();
for ( sal_uInt16 k = 0; bSub && k < aSortObjs.Count(); ++k )
{
- ASSERT( aSortObjs[k]->ISA(SwFlyFrm),
+ OSL_ENSURE( aSortObjs[k]->ISA(SwFlyFrm),
"<SwRootFrm::CalcFrmRects(..)> - object in <aSortObjs> of unexcepted type" );
const SwFlyFrm* pTmp = static_cast<SwFlyFrm*>(aSortObjs[k]);
do
@@ -2659,3 +2608,4 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx
index 1f6bd97479bd..8d01e2477993 100644
--- a/sw/source/core/layout/unusedf.cxx
+++ b/sw/source/core/layout/unusedf.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,52 +32,51 @@
#include "rootfrm.hxx"
#include "cntfrm.hxx"
#include "flyfrm.hxx"
-#include "errhdl.hxx"
void SwFrm::Format( const SwBorderAttrs * )
{
- ASSERT( sal_False, "Format() der Basisklasse gerufen." );
+ OSL_ENSURE( sal_False, "Format() der Basisklasse gerufen." );
}
void SwFrm::Paint(SwRect const&, SwPrintData const*const) const
{
- ASSERT( sal_False, "Paint() der Basisklasse gerufen." );
+ OSL_ENSURE( sal_False, "Paint() der Basisklasse gerufen." );
}
sal_Bool SwCntntFrm::WouldFit( SwTwips &, sal_Bool&, sal_Bool )
{
- ASSERT( sal_False, "WouldFit des CntntFrm gerufen." );
+ OSL_ENSURE( sal_False, "WouldFit des CntntFrm gerufen." );
return sal_False;
}
bool SwFrm::FillSelection( SwSelectionList& , const SwRect& ) const
{
- ASSERT( false, "Don't call this function at the base class!" );
+ OSL_ENSURE( false, "Don't call this function at the base class!" );
return false;
}
sal_Bool SwFrm::GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* ) const
{
- ASSERT( sal_False, "GetCrsrOfst der Basisklasse, hi!" );
+ OSL_ENSURE( sal_False, "GetCrsrOfst der Basisklasse, hi!" );
return sal_False;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
void SwRootFrm::Cut()
{
- ASSERT( sal_False, "Cut() des RootFrm gerufen." );
+ OSL_ENSURE( sal_False, "Cut() des RootFrm gerufen." );
}
void SwRootFrm::Paste( SwFrm *, SwFrm * )
{
- ASSERT( sal_False, "Paste() des RootFrm gerufen." );
+ OSL_ENSURE( sal_False, "Paste() des RootFrm gerufen." );
}
void SwFlyFrm::Paste( SwFrm *, SwFrm * )
{
- ASSERT( sal_False, "Paste() des FlyFrm gerufen." );
+ OSL_ENSURE( sal_False, "Paste() des FlyFrm gerufen." );
}
#endif
@@ -84,8 +84,9 @@ void SwFlyFrm::Paste( SwFrm *, SwFrm * )
sal_Bool SwFrm::GetCharRect( SwRect&, const SwPosition&,
SwCrsrMoveState* ) const
{
- ASSERT( sal_False, "GetCharRect() der Basis gerufen." );
+ OSL_ENSURE( sal_False, "GetCharRect() der Basis gerufen." );
return sal_False;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx
index f1d909fd2f83..d769f3c4987a 100644
--- a/sw/source/core/layout/virtoutp.cxx
+++ b/sw/source/core/layout/virtoutp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,7 @@
// OD 12.11.2002 #96272# - include declaration for <SetMappingForVirtDev>
#include "setmapvirtdev.hxx"
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
/*************************************************************************
* class DbgRect
@@ -183,7 +184,7 @@ void SwLayVout::Enter( ViewShell *pShell, SwRect &rRect, sal_Bool bOn )
{
Flush();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( pShell->GetViewOptions()->IsTest3() )
{
++nCount;
@@ -209,7 +210,7 @@ void SwLayVout::Enter( ViewShell *pShell, SwRect &rRect, sal_Bool bOn )
aTmp.SSize().Height()+= aPixSz.Height()/2 + 1;
Rectangle aTmpRect( pO->LogicToPixel( aTmp.SVRect() ) );
- ASSERT( !pSh->GetWin()->IsReallyVisible() ||
+ OSL_ENSURE( !pSh->GetWin()->IsReallyVisible() ||
aTmpRect.GetWidth() <= pSh->GetWin()->GetOutputSizePixel().Width() + 2,
"Paintwidth bigger than visarea?" );
// Passt das Rechteck in unseren Buffer ?
@@ -245,7 +246,7 @@ void SwLayVout::Enter( ViewShell *pShell, SwRect &rRect, sal_Bool bOn )
void SwLayVout::_Flush()
{
- ASSERT( pVirDev, "SwLayVout::DrawOut: nothing left Toulouse" );
+ OSL_ENSURE( pVirDev, "SwLayVout::DrawOut: nothing left Toulouse" );
Rectangle aTmp( aRect.SVRect() );
pOut->DrawOutDev( aRect.Pos(), aRect.SSize(),
aRect.Pos(), aRect.SSize(), *pVirDev );
@@ -254,3 +255,4 @@ void SwLayVout::_Flush()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/virtoutp.hxx b/sw/source/core/layout/virtoutp.hxx
index deb2b20538a1..f3f27a184150 100644
--- a/sw/source/core/layout/virtoutp.hxx
+++ b/sw/source/core/layout/virtoutp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,3 +73,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 4ebca620e4e2..9497890b8979 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
#include <hints.hxx>
#include <tools/pstm.hxx>
@@ -82,9 +82,6 @@ using namespace ::com::sun::star;
|*
|* SwFrm::SwFrm()
|*
-|* Ersterstellung AK 12-Feb-1991
-|* Letzte Aenderung MA 05. Apr. 94
-|*
|*************************************************************************/
SwFrm::SwFrm( SwModify *pMod ) :
@@ -102,11 +99,11 @@ SwFrm::SwFrm( SwModify *pMod ) :
, bInfFtn ( sal_False )
, bInfSct ( sal_False )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bFlag01 = bFlag02 = bFlag03 = bFlag04 = bFlag05 = 0;
#endif
- ASSERT( pMod, "Kein Frameformat uebergeben." );
+ OSL_ENSURE( pMod, "Kein Frameformat uebergeben." );
bInvalidR2L = bInvalidVert = 1;
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = bVertLR = 0;
@@ -243,9 +240,6 @@ void SwTxtFrm::CheckDirection( sal_Bool bVert )
|*
|* SwFrm::Modify()
|*
-|* Ersterstellung AK 01-Mar-1991
-|* Letzte Aenderung MA 20. Jun. 96
-|*
|*************************************************************************/
void SwFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
@@ -348,7 +342,7 @@ void SwFrm::_UpdateAttrFrm( SfxPoolItem *pOld, SfxPoolItem *pNew,
break;
}
case RES_COL:
- ASSERT( sal_False, "Spalten fuer neuen FrmTyp?" );
+ OSL_ENSURE( sal_False, "Spalten fuer neuen FrmTyp?" );
break;
default:
@@ -359,8 +353,6 @@ void SwFrm::_UpdateAttrFrm( SfxPoolItem *pOld, SfxPoolItem *pNew,
/*************************************************************************
|*
|* SwFrm::Prepare()
-|* Ersterstellung MA 13. Apr. 93
-|* Letzte Aenderung MA 26. Jun. 96
|*
|*************************************************************************/
void SwFrm::Prepare( const PrepareHint, const void *, sal_Bool )
@@ -374,8 +366,6 @@ void SwFrm::Prepare( const PrepareHint, const void *, sal_Bool )
|* Beschreibung: Invalidiert die Seite, in der der Frm gerade steht.
|* Je nachdem ob es ein Layout, Cntnt oder FlyFrm ist wird die Seite
|* entsprechend Invalidiert.
-|* Ersterstellung MA 22. Jul. 92
-|* Letzte Aenderung MA 14. Oct. 94
|*
|*************************************************************************/
void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const
@@ -492,9 +482,6 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const
|*
|* SwFrm::ChgSize()
|*
-|* Ersterstellung AK 15-Feb-1991
-|* Letzte Aenderung MA 18. Nov. 98
-|*
|*************************************************************************/
Size SwFrm::ChgSize( const Size& aNewSize )
{
@@ -577,13 +564,12 @@ Size SwFrm::ChgSize( const Size& aNewSize )
|* Eingefuegt wird unterhalb des Parent und entweder
|* vor pBehind oder am Ende der Kette wenn pBehind
|* leer ist.
-|* Letzte Aenderung MA 06. Aug. 99
|*
|*************************************************************************/
void SwFrm::InsertBefore( SwLayoutFrm* pParent, SwFrm* pBehind )
{
- ASSERT( pParent, "Kein Parent fuer Insert." );
- ASSERT( (!pBehind || (pBehind && pParent == pBehind->GetUpper())),
+ OSL_ENSURE( pParent, "Kein Parent fuer Insert." );
+ OSL_ENSURE( (!pBehind || (pBehind && pParent == pBehind->GetUpper())),
"Framebaum inkonsistent." );
pUpper = pParent;
@@ -618,13 +604,12 @@ void SwFrm::InsertBefore( SwLayoutFrm* pParent, SwFrm* pBehind )
|* Eingefuegt wird unterhalb des Parent und entweder
|* hinter pBefore oder am Anfang der Kette wenn pBefore
|* leer ist.
-|* Letzte Aenderung MA 06. Aug. 99
|*
|*************************************************************************/
void SwFrm::InsertBehind( SwLayoutFrm *pParent, SwFrm *pBefore )
{
- ASSERT( pParent, "Kein Parent fuer Insert." );
- ASSERT( (!pBefore || (pBefore && pParent == pBefore->GetUpper())),
+ OSL_ENSURE( pParent, "Kein Parent fuer Insert." );
+ OSL_ENSURE( (!pBefore || (pBefore && pParent == pBefore->GetUpper())),
"Framebaum inkonsistent." );
pUpper = pParent;
@@ -652,7 +637,6 @@ void SwFrm::InsertBehind( SwLayoutFrm *pParent, SwFrm *pBefore )
|*
|* Beschreibung Eine Kette von SwFrms wird in eine bestehende Struktur
|* eingefuegt
-|* Letzte Aenderung AMA 9. Dec. 97
|*
|* Bisher wird dies genutzt, um einen SectionFrame, der ggf. schon Geschwister
|* mit sich bringt, in eine bestehende Struktur einzufuegen.
@@ -672,9 +656,9 @@ void SwFrm::InsertBehind( SwLayoutFrm *pParent, SwFrm *pBefore )
|*************************************************************************/
void SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct )
{
- ASSERT( pParent, "Kein Parent fuer Insert." );
- ASSERT( (!pBehind || (pBehind && ( pParent == pBehind->GetUpper())
- || ( pParent->IsSctFrm() && pBehind->GetUpper()->IsColBodyFrm() ) ) ),
+ OSL_ENSURE( pParent, "Kein Parent fuer Insert." );
+ OSL_ENSURE( (!pBehind || ( (pBehind && (pParent == pBehind->GetUpper()))
+ || ((pParent->IsSctFrm() && pBehind->GetUpper()->IsColBodyFrm())) ) ),
"Framebaum inkonsistent." );
if( pSct )
{
@@ -716,9 +700,9 @@ void SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct )
SwLayoutFrm* pTmp = (SwLayoutFrm*)pSct;
if( pTmp->Lower() )
{
- ASSERT( pTmp->Lower()->IsColumnFrm(), "InsertGrp: Used SectionFrm" );
+ OSL_ENSURE( pTmp->Lower()->IsColumnFrm(), "InsertGrp: Used SectionFrm" );
pTmp = (SwLayoutFrm*)((SwLayoutFrm*)pTmp->Lower())->Lower();
- ASSERT( pTmp, "InsertGrp: Missing ColBody" );
+ OSL_ENSURE( pTmp, "InsertGrp: Missing ColBody" );
}
pBehind->pUpper = pTmp;
pBehind->GetUpper()->pLower = pBehind;
@@ -731,7 +715,7 @@ void SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct )
}
else
{
- ASSERT( pSct->IsSctFrm(), "InsertGroup: For SectionFrms only" );
+ OSL_ENSURE( pSct->IsSctFrm(), "InsertGroup: For SectionFrms only" );
delete ((SwSectionFrm*)pSct);
}
}
@@ -772,20 +756,17 @@ void SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct )
|*
|* SwFrm::Remove()
|*
-|* Ersterstellung AK 01-Mar-1991
-|* Letzte Aenderung MA 07. Dec. 95
-|*
|*************************************************************************/
void SwFrm::Remove()
{
- ASSERT( pUpper, "Removen ohne Upper?" );
+ OSL_ENSURE( pUpper, "Removen ohne Upper?" );
if( pPrev )
// einer aus der Mitte wird removed
pPrev->pNext = pNext;
else
{ // der erste in einer Folge wird removed
- ASSERT( pUpper->pLower == this, "Layout inkonsistent." );
+ OSL_ENSURE( pUpper->pLower == this, "Layout inkonsistent." );
pUpper->pLower = pNext;
}
if( pNext )
@@ -799,20 +780,17 @@ void SwFrm::Remove()
|*
|* SwCntntFrm::Paste()
|*
-|* Ersterstellung MA 23. Feb. 94
-|* Letzte Aenderung MA 09. Sep. 98
-|*
|*************************************************************************/
void SwCntntFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
{
- ASSERT( pParent, "Kein Parent fuer Paste." );
- ASSERT( pParent->IsLayoutFrm(), "Parent ist CntntFrm." );
- ASSERT( pParent != this, "Bin selbst der Parent." );
- ASSERT( pSibling != this, "Bin mein eigener Nachbar." );
- ASSERT( !GetPrev() && !GetNext() && !GetUpper(),
+ OSL_ENSURE( pParent, "Kein Parent fuer Paste." );
+ OSL_ENSURE( pParent->IsLayoutFrm(), "Parent ist CntntFrm." );
+ OSL_ENSURE( pParent != this, "Bin selbst der Parent." );
+ OSL_ENSURE( pSibling != this, "Bin mein eigener Nachbar." );
+ OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(),
"Bin noch irgendwo angemeldet." );
- ASSERT( !pSibling || pSibling->IsFlowFrm(),
- "<SwCntntFrm::Paste(..)> - sibling not of expected type." )
+ OSL_ENSURE( !pSibling || pSibling->IsFlowFrm(),
+ "<SwCntntFrm::Paste(..)> - sibling not of expected type." );
//In den Baum einhaengen.
InsertBefore( (SwLayoutFrm*)pParent, pSibling );
@@ -907,13 +885,10 @@ void SwCntntFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
|*
|* SwCntntFrm::Cut()
|*
-|* Ersterstellung AK 14-Feb-1991
-|* Letzte Aenderung MA 09. Sep. 98
-|*
|*************************************************************************/
void SwCntntFrm::Cut()
{
- ASSERT( GetUpper(), "Cut ohne Upper()." );
+ OSL_ENSURE( GetUpper(), "Cut ohne Upper()." );
SwPageFrm *pPage = FindPageFrm();
InvalidatePage( pPage );
@@ -1051,7 +1026,6 @@ void SwCntntFrm::Cut()
{
// --> OD 2006-09-25 #b6448963#
// prevent delete of <ColLocked> footnote frame
-// if( pUp->IsFtnFrm() )
if ( pUp->IsFtnFrm() && !pUp->IsColLocked())
// <--
{
@@ -1067,7 +1041,6 @@ void SwCntntFrm::Cut()
else
{
// --> OD 2006-09-25 #b6448963#
-// if ( pSct->IsColLocked() || !pSct->IsInFtn() )
if ( pSct->IsColLocked() || !pSct->IsInFtn() ||
( pUp->IsFtnFrm() && pUp->IsColLocked() ) )
// <--
@@ -1100,17 +1073,14 @@ void SwCntntFrm::Cut()
|*
|* SwLayoutFrm::Paste()
|*
-|* Ersterstellung MA 23. Feb. 94
-|* Letzte Aenderung MA 23. Feb. 94
-|*
|*************************************************************************/
void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
{
- ASSERT( pParent, "Kein Parent fuer Paste." );
- ASSERT( pParent->IsLayoutFrm(), "Parent ist CntntFrm." );
- ASSERT( pParent != this, "Bin selbst der Parent." );
- ASSERT( pSibling != this, "Bin mein eigener Nachbar." );
- ASSERT( !GetPrev() && !GetNext() && !GetUpper(),
+ OSL_ENSURE( pParent, "Kein Parent fuer Paste." );
+ OSL_ENSURE( pParent->IsLayoutFrm(), "Parent ist CntntFrm." );
+ OSL_ENSURE( pParent != this, "Bin selbst der Parent." );
+ OSL_ENSURE( pSibling != this, "Bin mein eigener Nachbar." );
+ OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(),
"Bin noch irgendwo angemeldet." );
//In den Baum einhaengen.
@@ -1208,9 +1178,6 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
|*
|* SwLayoutFrm::Cut()
|*
-|* Ersterstellung MA 23. Feb. 94
-|* Letzte Aenderung MA 23. Feb. 94
-|*
|*************************************************************************/
void SwLayoutFrm::Cut()
{
@@ -1273,13 +1240,10 @@ void SwLayoutFrm::Cut()
|*
|* SwFrm::Grow()
|*
-|* Ersterstellung AK 19-Feb-1991
-|* Letzte Aenderung MA 05. May. 94
-|*
|*************************************************************************/
SwTwips SwFrm::Grow( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
- ASSERT( nDist >= 0, "Negatives Wachstum?" );
+ OSL_ENSURE( nDist >= 0, "Negatives Wachstum?" );
PROTOCOL_ENTER( this, bTst ? PROT_GROW_TST : PROT_GROW, 0, &nDist )
@@ -1325,13 +1289,10 @@ SwTwips SwFrm::Grow( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
|*
|* SwFrm::Shrink()
|*
-|* Ersterstellung AK 14-Feb-1991
-|* Letzte Aenderung MA 05. May. 94
-|*
|*************************************************************************/
SwTwips SwFrm::Shrink( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
- ASSERT( nDist >= 0, "Negative Verkleinerung?" );
+ OSL_ENSURE( nDist >= 0, "Negative Verkleinerung?" );
PROTOCOL_ENTER( this, bTst ? PROT_SHRINK_TST : PROT_SHRINK, 0, &nDist )
@@ -1396,9 +1357,6 @@ SwTwips SwFrm::Shrink( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
|*
|* Parameter: nDiff ist der Betrag, um den Platz geschaffen werden muss
|*
-|* Ersterstellung MA 07. May. 92
-|* Letzte Aenderung AMA 02. Nov. 98
-|*
|*************************************************************************/
SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst )
{
@@ -1667,14 +1625,14 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst )
if( ( IsHeaderFrm() || IsFooterFrm() ) && pBoss->GetDrawObjs() )
{
const SwSortedObjs &rObjs = *pBoss->GetDrawObjs();
- ASSERT( pBoss->IsPageFrm(), "Header/Footer out of page?" );
+ OSL_ENSURE( pBoss->IsPageFrm(), "Header/Footer out of page?" );
for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
{
SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
- ASSERT( !pFly->IsFlyInCntFrm(), "FlyInCnt at Page?" );
+ OSL_ENSURE( !pFly->IsFlyInCntFrm(), "FlyInCnt at Page?" );
const SwFmtVertOrient &rVert =
pFly->GetFmt()->GetVertOrient();
// Wann muss invalidiert werden?
@@ -1703,9 +1661,6 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst )
|* SwFrm::ImplInvalidateSize(), ImplInvalidatePrt(), ImplInvalidatePos(),
|* ImplInvalidateLineNum()
|*
-|* Ersterstellung MA 15. Oct. 92
-|* Letzte Aenderung MA 24. Mar. 94
-|*
|*************************************************************************/
/** method to perform additional actions on an invalidation
@@ -1784,7 +1739,7 @@ void SwFrm::ImplInvalidateLineNum()
if ( _InvalidationAllowed( INVALID_LINENUM ) )
{
bValidLineNum = sal_False;
- ASSERT( IsTxtFrm(), "line numbers are implemented for text only" );
+ OSL_ENSURE( IsTxtFrm(), "line numbers are implemented for text only" );
InvalidatePage();
// OD 2004-05-19 #i28701#
@@ -1796,9 +1751,6 @@ void SwFrm::ImplInvalidateLineNum()
|*
|* SwFrm::ReinitializeFrmSizeAttrFlags
|*
-|* Ersterstellung MA 15. Oct. 96
-|* Letzte Aenderung MA 15. Oct. 96
-|*
|*************************************************************************/
void SwFrm::ReinitializeFrmSizeAttrFlags()
{
@@ -1893,9 +1845,6 @@ void SwFrm::ValidateThisAndAllLowers( const sal_uInt16 nStage )
|*
|* SwCntntFrm::GrowFrm()
|*
-|* Ersterstellung MA 30. Jul. 92
-|* Letzte Aenderung MA 25. Mar. 99
-|*
|*************************************************************************/
SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
@@ -2007,15 +1956,12 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
|*
|* SwCntntFrm::ShrinkFrm()
|*
-|* Ersterstellung MA 30. Jul. 92
-|* Letzte Aenderung MA 05. May. 94
-|*
|*************************************************************************/
SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SWRECTFN( this )
- ASSERT( nDist >= 0, "nDist < 0" );
- ASSERT( nDist <= (Frm().*fnRect->fnGetHeight)(),
+ OSL_ENSURE( nDist >= 0, "nDist < 0" );
+ OSL_ENSURE( nDist <= (Frm().*fnRect->fnGetHeight)(),
"nDist > als aktuelle Grosse." );
if ( !bTst )
@@ -2130,10 +2076,6 @@ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
|*
|* SwCntntFrm::Modify()
|*
-|* Beschreibung
-|* Ersterstellung AK 05-Mar-1991
-|* Letzte Aenderung MA 13. Oct. 95
-|*
|*************************************************************************/
void SwCntntFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
@@ -2363,9 +2305,6 @@ void SwCntntFrm::_UpdateAttr( SfxPoolItem* pOld, SfxPoolItem* pNew,
|*
|* SwLayoutFrm::SwLayoutFrm()
|*
-|* Ersterstellung AK 14-Feb-1991
-|* Letzte Aenderung MA 12. May. 95
-|*
|*************************************************************************/
SwLayoutFrm::SwLayoutFrm( SwFrmFmt* pFmt ):
SwFrm( pFmt ),
@@ -2379,7 +2318,7 @@ SwLayoutFrm::SwLayoutFrm( SwFrmFmt* pFmt ):
// --> OD 2004-06-29 #i28701#
TYPEINIT1(SwLayoutFrm,SwFrm);
// <--
-/*-----------------10.06.99 09:42-------------------
+/*--------------------------------------------------
* SwLayoutFrm::InnerHeight()
* --------------------------------------------------*/
@@ -2425,9 +2364,6 @@ SwTwips SwLayoutFrm::InnerHeight() const
|*
|* SwLayoutFrm::GrowFrm()
|*
-|* Ersterstellung MA 30. Jul. 92
-|* Letzte Aenderung MA 23. Sep. 96
-|*
|*************************************************************************/
SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
@@ -2593,9 +2529,6 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
|*
|* SwLayoutFrm::ShrinkFrm()
|*
-|* Ersterstellung MA 30. Jul. 92
-|* Letzte Aenderung MA 25. Mar. 99
-|*
|*************************************************************************/
SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
@@ -2604,7 +2537,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
if( !(GetType() & nTmpType) && HasFixSize() )
return 0;
- ASSERT( nDist >= 0, "nDist < 0" );
+ OSL_ENSURE( nDist >= 0, "nDist < 0" );
SWRECTFN( this )
SwTwips nFrmHeight = (Frm().*fnRect->fnGetHeight)();
if ( nDist > nFrmHeight )
@@ -2662,7 +2595,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if( bChgPos && !IsVertLR() )
Frm().Pos().X() += nRealDist - nReal;
- ASSERT( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" );
+ OSL_ENSURE( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" );
}
}
}
@@ -2676,7 +2609,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if( bChgPos && !IsVertLR() )
Frm().Pos().X() += nTmp - nReal;
- ASSERT( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" );
+ OSL_ENSURE( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" );
nReal = nTmp;
}
}
@@ -2774,8 +2707,6 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
|* PrtArea des Frm's.
|* Die Variablen Frm's werden auch proportional angepasst; sie werden
|* sich schon wieder zurechtwachsen/-schrumpfen.
-|* Ersterstellung MA 11.03.92
-|* Letzte Aenderung AMA 2. Nov. 98
|*
|*************************************************************************/
void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
@@ -3065,7 +2996,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
( IsColumnFrm() && IsInSct() )
)
{
- ASSERT( pLowerFrm->IsBodyFrm() || pLowerFrm->IsFtnContFrm(),
+ OSL_ENSURE( pLowerFrm->IsBodyFrm() || pLowerFrm->IsFtnContFrm(),
"ChgLowersProp - only for body or foot note container" );
if ( pLowerFrm->IsBodyFrm() || pLowerFrm->IsFtnContFrm() )
{
@@ -3077,7 +3008,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
if ( nNewHeight < 0)
{
// OD 01.04.2003 #108446# - adjust assertion condition and text
- ASSERT( !( IsPageFrm() &&
+ OSL_ENSURE( !( IsPageFrm() &&
(pLowerFrm->Frm().Height()>0) &&
(pLowerFrm->IsValid()) ),
"ChgLowersProg - negative height for lower.");
@@ -3157,12 +3088,12 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
const SwFmtCol* pColAttr = NULL;
if ( IsPageBodyFrm() )
{
- ASSERT( GetUpper()->IsPageFrm(), "Upper is not page frame" )
+ OSL_ENSURE( GetUpper()->IsPageFrm(), "Upper is not page frame" );
pColAttr = &GetUpper()->GetFmt()->GetCol();
}
else
{
- ASSERT( IsFlyFrm() || IsSctFrm(), "Columns not in fly or section" )
+ OSL_ENSURE( IsFlyFrm() || IsSctFrm(), "Columns not in fly or section" );
pColAttr = &GetFmt()->GetCol();
}
@@ -3177,13 +3108,11 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
|*
|* Beschreibung: "Formatiert" den Frame; Frm und PrtArea.
|* Die Fixsize wird hier nicht eingestellt.
-|* Ersterstellung MA 28. Jul. 92
-|* Letzte Aenderung MA 21. Mar. 95
|*
|*************************************************************************/
void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
{
- ASSERT( pAttrs, "LayoutFrm::Format, pAttrs ist 0." );
+ OSL_ENSURE( pAttrs, "LayoutFrm::Format, pAttrs ist 0." );
if ( bValidPrtArea && bValidSize )
return;
@@ -3270,13 +3199,10 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
|*
|* SwLayoutFrm::InvalidatePercentLowers()
|*
-|* Ersterstellung MA 13. Jun. 96
-|* Letzte Aenderung MA 13. Jun. 96
-|*
|*************************************************************************/
static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff )
{
- ASSERT( pFrm->GetDrawObjs(), "Can't find any Objects" );
+ OSL_ENSURE( pFrm->GetDrawObjs(), "Can't find any Objects" );
for ( sal_uInt16 i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
@@ -3322,7 +3248,7 @@ void SwLayoutFrm::InvaPercentLowers( SwTwips nDiff )
if ( pFrm->IsInTab() && !IsTabFrm() )
{
SwFrm *pTmp = pFrm->FindTabFrm();
- ASSERT( pTmp, "Where's my TabFrm?" );
+ OSL_ENSURE( pTmp, "Where's my TabFrm?" );
if( IsAnLower( pTmp ) )
pFrm = pTmp;
}
@@ -3343,9 +3269,6 @@ void SwLayoutFrm::InvaPercentLowers( SwTwips nDiff )
|*
|* SwLayoutFrm::CalcRel()
|*
-|* Ersterstellung MA 13. Jun. 96
-|* Letzte Aenderung MA 10. Oct. 96
-|*
|*************************************************************************/
long SwLayoutFrm::CalcRel( const SwFmtFrmSize &rSz, sal_Bool ) const
{
@@ -3379,7 +3302,7 @@ long MA_FASTCALL lcl_CalcMinColDiff( SwLayoutFrm *pLayFrm )
{
long nDiff = 0, nFirstDiff = 0;
SwLayoutFrm *pCol = (SwLayoutFrm*)pLayFrm->Lower();
- ASSERT( pCol, "Where's the columnframe?" );
+ OSL_ENSURE( pCol, "Where's the columnframe?" );
SwFrm *pFrm = pCol->Lower();
do
{
@@ -3594,7 +3517,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
::CalcCntnt( this );
pCol = (SwLayoutFrm*)Lower();
- ASSERT( pCol && pCol->GetNext(), ":-( Spalten auf Urlaub?");
+ OSL_ENSURE( pCol && pCol->GetNext(), ":-( Spalten auf Urlaub?");
// bMinDiff wird gesetzt, wenn es keine leere Spalte gibt
sal_Bool bMinDiff = sal_True;
// OD 28.03.2003 #108446# - check for all column content and all columns
@@ -3628,7 +3551,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
{
bFoundLower = sal_True;
pLay = (SwLayoutFrm*)pLay->GetNext();
- ASSERT( pLay->IsFtnContFrm(),"FtnContainer exspected" );
+ OSL_ENSURE( pLay->IsFtnContFrm(),"FtnContainer exspected" );
nInnerHeight += pLay->InnerHeight();
nInnerHeight += (pLay->Frm().*fnRect->fnGetHeight)() -
(pLay->Prt().*fnRect->fnGetHeight)();
@@ -3811,9 +3734,6 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
|*
|* SwRootFrm::InvalidateAllCntnt()
|*
-|* Ersterstellung MA 13. Feb. 98
-|* Letzte Aenderung MA 12. Aug. 00
-|*
|*************************************************************************/
SwCntntFrm* lcl_InvalidateSection( SwFrm *pCnt, sal_uInt8 nInv )
@@ -3870,9 +3790,9 @@ void lcl_InvalidateCntnt( SwCntntFrm *pCnt, sal_uInt8 nInv )
if( pLastSctCnt == pCnt )
pLastSctCnt = NULL;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
- ASSERT( !pLastSctCnt, "Where's the last SctCntnt?" );
+ OSL_ENSURE( !pLastSctCnt, "Where's the last SctCntnt?" );
#endif
}
if( nInv & INV_TABLE )
@@ -3898,9 +3818,9 @@ void lcl_InvalidateCntnt( SwCntntFrm *pCnt, sal_uInt8 nInv )
pLastSctCnt = NULL;
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
- ASSERT( !pLastTabCnt, "Where's the last TabCntnt?" );
+ OSL_ENSURE( !pLastTabCnt, "Where's the last TabCntnt?" );
#endif
}
@@ -4024,3 +3944,4 @@ void SwRootFrm::InvalidateAllObjPos()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
index dc8fe3ad9fdd..a537bd10e515 100644
--- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,16 +37,13 @@
#include <txtfrm.hxx>
#include <pagefrm.hxx>
#include <frmtool.hxx>
-#ifndef _SVX_SVDOBJ_HXX
#include <svx/svdobj.hxx>
-#endif
#include <dflyobj.hxx>
#include <dcontact.hxx>
#include <frmfmt.hxx>
#include <fmtornt.hxx>
-// --> OD 2006-03-15 #i62875#
+// #i62875#
#include <fmtfollowtextflow.hxx>
-// <--
#include <editeng/lrspitem.hxx>
#include <editeng/ulspitem.hxx>
#include <ndtxt.hxx>
@@ -63,10 +61,9 @@ SwAnchoredObjectPosition::SwAnchoredObjectPosition( SdrObject& _rDrawObj )
mpAnchoredObj( 0 ),
mpAnchorFrm( 0 ),
mpContact( 0 ),
- // --> OD 2006-03-15 #i62875#
+ // #i62875#
mbFollowTextFlow( false ),
mbDoNotCaptureAnchoredObj( false )
- // <--
{
#if OSL_DEBUG_LEVEL > 1
// assert, if object isn't of excepted type
@@ -76,7 +73,7 @@ SwAnchoredObjectPosition::SwAnchoredObjectPosition( SdrObject& _rDrawObj )
( !mrDrawObj.ISA(SdrVirtObj) && // 'master' drawing object
!mrDrawObj.ISA(SwFlyDrawObj) ); // - indirectly checked
(void) bObjOfExceptedType;
- ASSERT( bObjOfExceptedType,
+ OSL_ENSURE( bObjOfExceptedType,
"SwAnchoredObjectPosition(..) - object of unexcepted type!" );
#endif
@@ -85,7 +82,6 @@ SwAnchoredObjectPosition::SwAnchoredObjectPosition( SdrObject& _rDrawObj )
/** determine information about object
- OD 30.07.2003 #110978#
members <mbIsObjFly>, <mpFrmOfObj>, <mpAnchorFrm>, <mpContact>,
<mbFollowTextFlow> and <mbDoNotCaptureAnchoredObj> are set
@@ -101,36 +97,35 @@ void SwAnchoredObjectPosition::_GetInfoAboutObj()
// determine contact object
{
mpContact = static_cast<SwContact*>(GetUserCall( &mrDrawObj ));
- ASSERT( mpContact,
+ OSL_ENSURE( mpContact,
"SwAnchoredObjectPosition::_GetInfoAboutObj() - missing SwContact-object." );
}
// determine anchored object, the object belongs to
{
- // OD 2004-03-30 #i26791#
+ // #i26791#
mpAnchoredObj = mpContact->GetAnchoredObj( &mrDrawObj );
- ASSERT( mpAnchoredObj,
+ OSL_ENSURE( mpAnchoredObj,
"SwAnchoredObjectPosition::_GetInfoAboutObj() - missing anchored object." );
}
// determine frame, the object is anchored at
{
- // OD 2004-03-23 #i26791#
+ // #i26791#
mpAnchorFrm = mpAnchoredObj->AnchorFrm();
- ASSERT( mpAnchorFrm,
+ OSL_ENSURE( mpAnchorFrm,
"SwAnchoredObjectPosition::_GetInfoAboutObj() - missing anchor frame." );
}
// determine format the object belongs to
{
- // --> OD 2004-07-01 #i28701#
+ // #i28701#
mpFrmFmt = &mpAnchoredObj->GetFrmFmt();
- ASSERT( mpFrmFmt,
+ OSL_ENSURE( mpFrmFmt,
"<SwAnchoredObjectPosition::_GetInfoAboutObj() - missing frame format." );
}
- // --> OD 2006-03-15 #i62875#
- // determine attribute value of <Follow-Text-Flow>
+ // #i62875# - determine attribute value of <Follow-Text-Flow>
{
mbFollowTextFlow = mpFrmFmt->GetFollowTextFlow().GetValue();
}
@@ -144,7 +139,6 @@ void SwAnchoredObjectPosition::_GetInfoAboutObj()
mbDoNotCaptureAnchoredObj = !mbIsObjFly && !mbFollowTextFlow &&
mpFrmFmt->getIDocumentSettingAccess()->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE);
}
- // <--
}
SwAnchoredObjectPosition::~SwAnchoredObjectPosition()
@@ -165,7 +159,7 @@ const SwRect* SwAnchoredObjectPosition::ToCharRect() const
return NULL;
}
-// OD 12.11.2003 #i22341#
+// #i22341#
SwTwips SwAnchoredObjectPosition::ToCharTopOfLine() const
{
return 0L;
@@ -174,7 +168,7 @@ SwTwips SwAnchoredObjectPosition::ToCharTopOfLine() const
/** helper method to determine top of a frame for the vertical
object positioning
- OD 2004-03-11 #i11860#
+ #i11860#
@author OD
*/
@@ -212,9 +206,9 @@ void SwAnchoredObjectPosition::_GetVertAlignmentValues(
SwTwips nHeight = 0;
SwTwips nOffset = 0;
SWRECTFN( (&_rVertOrientFrm) )
- // OD 2004-03-11 #i11860# - top of <_rVertOrientFrm> for object positioning
+ // #i11860# - top of <_rVertOrientFrm> for object positioning
const SwTwips nVertOrientTop = _GetTopForObjPos( _rVertOrientFrm, fnRect, bVert );
- // OD 2004-03-11 #i11860# - upper space amount of <_rVertOrientFrm> considered
+ // #i11860# - upper space amount of <_rVertOrientFrm> considered
// for previous frame
const SwTwips nVertOrientUpperSpaceForPrevFrmAndPageGrid =
_rVertOrientFrm.IsTxtFrm()
@@ -225,7 +219,7 @@ void SwAnchoredObjectPosition::_GetVertAlignmentValues(
{
case text::RelOrientation::FRAME:
{
- // OD 2004-03-11 #i11860# - consider upper space of previous frame
+ // #i11860# - consider upper space of previous frame
nHeight = (_rVertOrientFrm.Frm().*fnRect->fnGetHeight)() -
nVertOrientUpperSpaceForPrevFrmAndPageGrid;
nOffset = 0;
@@ -234,7 +228,7 @@ void SwAnchoredObjectPosition::_GetVertAlignmentValues(
case text::RelOrientation::PRINT_AREA:
{
nHeight = (_rVertOrientFrm.Prt().*fnRect->fnGetHeight)();
- // OD 2004-03-11 #i11860# - consider upper space of previous frame
+ // #i11860# - consider upper space of previous frame
nOffset = (_rVertOrientFrm.*fnRect->fnGetTopMargin)() -
nVertOrientUpperSpaceForPrevFrmAndPageGrid;
// if aligned to page in horizontal layout, consider header and
@@ -296,7 +290,7 @@ void SwAnchoredObjectPosition::_GetVertAlignmentValues(
}
}
break;
- // OD 12.11.2003 #i22341# - vertical alignment at top of line
+ // #i22341# - vertical alignment at top of line
case text::RelOrientation::TEXT_LINE:
{
if ( IsAnchoredToChar() )
@@ -306,7 +300,7 @@ void SwAnchoredObjectPosition::_GetVertAlignmentValues(
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwAnchoredObjectPosition::_GetVertAlignmentValues(..)> - invalid relative alignment" );
}
}
@@ -321,19 +315,15 @@ void SwAnchoredObjectPosition::_GetVertAlignmentValues(
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwAnchoredObjectPosition::_GetVertAlignmentValues(..)> - invalid relative alignment" );
}
}
break;
// no break here, because text::RelOrientation::CHAR is invalid, if !mbAnchorToChar
default:
- //case text::RelOrientation::PAGE_LEFT: not valid for vertical alignment
- //case text::RelOrientation::PAGE_RIGHT: not valid for vertical alignment
- //case text::RelOrientation::FRAME_LEFT: not valid for vertical alignment
- //case text::RelOrientation::FRAME_RIGHT: not valid for vertical alignment
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwAnchoredObjectPosition::_GetVertAlignmentValues(..)> - invalid relative alignment" );
}
}
@@ -342,7 +332,7 @@ void SwAnchoredObjectPosition::_GetVertAlignmentValues(
_orAlignAreaOffset = nOffset;
}
-// --> OD 2004-06-17 #i26791# - add output parameter <_roVertOffsetToFrmAnchorPos>
+// #i26791# - add output parameter <_roVertOffsetToFrmAnchorPos>
SwTwips SwAnchoredObjectPosition::_GetVertRelPos(
const SwFrm& _rVertOrientFrm,
const SwFrm& _rPageAlignLayFrm,
@@ -401,12 +391,12 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos(
break;
default:
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwAnchoredObjectPosition::_GetVertRelPos(..) - invalid vertical positioning" );
}
}
- // --> OD 2004-06-17 #i26791#
+ // #i26791#
_roVertOffsetToFrmAnchorPos = nAlignAreaOffset;
return nRelPosY;
@@ -415,10 +405,10 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos(
/** adjust calculated vertical in order to keep object inside
'page' alignment layout frame.
- OD 2004-07-01 #i28701# - parameter <nTopOfAnch> and <bVert> added
- OD 2004-07-22 #i31805# - add parameter <bCheckBottom>
- OD 2004-10-08 #i26945# - add parameter <bFollowTextFlow>
- OD 2006-03-15 #i62875# - method now private and renamed.
+ #i28701# - parameter <_nTopOfAnch> and <_bVert> added
+ #i31805# - add parameter <_bCheckBottom>
+ #i26945# - add parameter <_bFollowTextFlow>
+ #i62875# - method now private and renamed.
OD 2009-09-01 #mongolianlayout# - add parameter <bVertL2R>
@author OD
@@ -437,7 +427,7 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnc
// determine the area of 'page' alignment frame, to which the vertical
// position is restricted.
- // --> OD 2004-07-06 #i28701# - Extend restricted area for the vertical
+ // #i28701# - Extend restricted area for the vertical
// position to area of the page frame, if wrapping style influence is
// considered on object positioning. Needed to avoid layout loops in the
// object positioning algorithm considering the wrapping style influence
@@ -445,7 +435,7 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnc
// to its environment (e.g. page header/footer).
SwRect aPgAlignArea;
{
- // --> OD 2004-10-08 #i26945# - no extension of restricted area, if
+ // #i26945# - no extension of restricted area, if
// object's attribute follow text flow is set and its inside a table
if ( GetFrmFmt().getIDocumentSettingAccess()->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION) &&
( !bFollowTextFlow ||
@@ -461,7 +451,7 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnc
if ( bVert )
{
- // --> OD 2009-09-01 #mongolianlayout#
+ // #i31805# - consider value of <_bCheckBottom>
if ( !bVertL2R )
// <--
{
@@ -473,12 +463,12 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnc
nTopOfAnch -
aObjSize.Width();
}
+ // #i32964# - correction
if ( nTopOfAnch - nAdjustedRelPosY > aPgAlignArea.Right() )
{
nAdjustedRelPosY = nTopOfAnch - aPgAlignArea.Right();
}
}
- // --> OD 2009-09-01 #mongolianlayout#
else
{
if ( bCheckBottom &&
@@ -494,10 +484,10 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnc
nAdjustedRelPosY = aPgAlignArea.Left() - nTopOfAnch;
}
}
- // <--
}
else
{
+ // #i31805# - consider value of <bCheckBottom>
if ( bCheckBottom &&
nTopOfAnch + nAdjustedRelPosY + aObjSize.Height() >
aPgAlignArea.Top() + aPgAlignArea.Height() )
@@ -518,7 +508,7 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnc
/** adjust calculated horizontal in order to keep object inside
'page' alignment layout frame.
- OD 2006-03-15 #i62875# - method now private and renamed.
+ #i62875# - method now private and renamed.
@author OD
*/
@@ -647,10 +637,8 @@ void SwAnchoredObjectPosition::_GetHoriAlignmentValues( const SwFrm& _rHoriOrie
case text::RelOrientation::FRAME_RIGHT:
{
// align at right border of anchor frame
- // OD 19.08.2003 #110978# - unify and simplify
+ // Unify and simplify
nWidth = (_rHoriOrientFrm.*fnRect->fnGetRightMargin)();
- //nOffset = (_rHoriOrientFrm.Frm().*fnRect->fnGetWidth)() -
- // nWidth;
nOffset = (_rHoriOrientFrm.Prt().*fnRect->fnGetRight)();
}
break;
@@ -707,7 +695,6 @@ void SwAnchoredObjectPosition::_GetHoriAlignmentValues( const SwFrm& _rHoriOrie
break;
}
default:
- // case text::RelOrientation::FRAME:
{
nWidth = (_rHoriOrientFrm.Frm().*fnRect->fnGetWidth)();
nOffset = _rHoriOrientFrm.IsTxtFrm() ?
@@ -834,7 +821,7 @@ SwTwips SwAnchoredObjectPosition::_CalcRelPosX(
}
else if ( bToggle || ( !_rHoriOrient.IsPosToggle() && bR2L ) )
{
- // OD 04.08.2003 #110978# - correction: consider <nOffset> also for
+ // Correction: consider <nOffset> also for
// toggling from left to right.
nRelPosX += nWidth - nObjWidth - _rHoriOrient.GetPos();
}
@@ -861,40 +848,6 @@ SwTwips SwAnchoredObjectPosition::_CalcRelPosX(
nRelPosX += (*fnRect->fnXDiff)( nLeftOrient, nLeftAnchor );
}
- // OD 2004-05-21 #i28701# - deactivate follow code
-// // adjust relative horizontal position, if object is manual horizontal
-// // positioned (not 'page' aligned) and orients not at the anchor frame,
-// // but it overlaps anchor frame.
-// if ( _rHoriOrient.GetHoriOrient() == text::HoriOrientation::NONE && !bAlignedRelToPage &&
-// &rAnchorFrm != &_rHoriOrientFrm )
-// {
-// // E.g.: consider a columned page/section with an horizontal
-// // negative positioned object.
-// // OD 2004-03-23 #i26791#
-// const SwRect& rObjRect = GetAnchoredObj().GetObjRect();
-// if( bVert )
-// {
-// if( _rHoriOrientFrm.Frm().Top() > rAnchorFrm.Frm().Bottom() &&
-// rObjRect.Right() > rAnchorFrm.Frm().Left() )
-// {
-// const SwTwips nProposedPosX = nRelPosX + rAnchorFrm.Frm().Top();
-// if ( nProposedPosX < rAnchorFrm.Frm().Bottom() )
-// nRelPosX = rAnchorFrm.Frm().Height() + 1;
-// }
-// }
-// else
-// {
-// if( _rHoriOrientFrm.Frm().Left() > rAnchorFrm.Frm().Right() &&
-// rObjRect.Top() < rAnchorFrm.Frm().Bottom() )
-// {
-// // OD 04.08.2003 #110978# - correction: use <nRelPosX>
-// // instead of <aRelPos.X()>
-// const SwTwips nProposedPosX = nRelPosX + rAnchorFrm.Frm().Left();
-// if ( nProposedPosX < rAnchorFrm.Frm().Right() )
-// nRelPosX = rAnchorFrm.Frm().Width() + 1;
-// }
-// }
-// }
// adjust calculated relative horizontal position, in order to
// keep object inside 'page' alignment layout frame
const SwFrm& rEnvironmentLayFrm =
@@ -917,7 +870,7 @@ SwTwips SwAnchoredObjectPosition::_CalcRelPosX(
bEvenPage );
}
- // --> OD 2004-06-17 #i26791#
+ // #i26791#
_roHoriOffsetToFrmAnchorPos = nOffset;
return nRelPosX;
@@ -943,17 +896,17 @@ SwTwips SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside(
const bool _bEvenPage
) const
{
- // OD 2004-03-23 #i26791#
+ // #i26791#
if ( !GetAnchorFrm().ISA(SwTxtFrm) ||
!GetAnchoredObj().ISA(SwFlyAtCntFrm) )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside(..) - usage for wrong anchor type" );
return _nProposedRelPosX;
}
const SwTxtFrm& rAnchorTxtFrm = static_cast<const SwTxtFrm&>(GetAnchorFrm());
- // OD 2004-03-23 #i26791#
+ // #i26791#
const SwFlyAtCntFrm& rFlyAtCntFrm =
static_cast<const SwFlyAtCntFrm&>(GetAnchoredObj());
const SwRect aObjBoundRect( GetAnchoredObj().GetObjRect() );
@@ -1133,11 +1086,11 @@ bool SwAnchoredObjectPosition::_Minor( sal_Int16 _eRelOrient1,
// draw aside order for left horizontal position
//! one array entry for each value in text::RelOrientation
- static sal_uInt16 __READONLY_DATA aLeft[ 10 ] =
+ static sal_uInt16 const aLeft[ 10 ] =
{ 5, 6, 0, 1, 8, 4, 7, 2, 3, 9 };
// draw aside order for right horizontal position
//! one array entry for each value in text::RelOrientation
- static sal_uInt16 __READONLY_DATA aRight[ 10 ] =
+ static sal_uInt16 const aRight[ 10 ] =
{ 5, 6, 0, 8, 1, 7, 4, 2, 3, 9 };
// decide depending on given order, which frame has to draw aside another frame
@@ -1148,3 +1101,5 @@ bool SwAnchoredObjectPosition::_Minor( sal_Int16 _eRelOrient1,
return bRetVal;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx
index 7c8118dbe3e2..a5facaf474b9 100644
--- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <frame.hxx>
#include <txtfrm.hxx>
#include <flyfrms.hxx>
-#ifndef _SVX_SVDOBJ_HXX
#include <svx/svdobj.hxx>
-#endif
#include <dcontact.hxx>
#include <frmfmt.hxx>
#include <frmatr.hxx>
@@ -85,7 +84,7 @@ SwAsCharAnchoredObjectPosition::~SwAsCharAnchoredObjectPosition()
*/
const SwTxtFrm& SwAsCharAnchoredObjectPosition::GetAnchorTxtFrm() const
{
- ASSERT( GetAnchorFrm().ISA(SwTxtFrm),
+ OSL_ENSURE( GetAnchorFrm().ISA(SwTxtFrm),
"SwAsCharAnchoredObjectPosition::GetAnchorTxtFrm() - wrong anchor frame type" );
return static_cast<const SwTxtFrm&>(GetAnchorFrm());
@@ -290,7 +289,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition()
rAnchorFrm.SwitchHorizontalToVertical( aAnchorPos );
// --> OD 2005-03-09 #i44347# - keep last object rectangle at anchored object
- ASSERT ( GetAnchoredObj().ISA(SwAnchoredDrawObject),
+ OSL_ENSURE( GetAnchoredObj().ISA(SwAnchoredDrawObject),
"<SwAsCharAnchoredObjectPosition::CalcPosition()> - wrong type of anchored object." );
SwAnchoredDrawObject& rAnchoredDrawObj =
static_cast<SwAnchoredDrawObject&>( GetAnchoredObj() );
@@ -318,7 +317,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition()
aRelAttr = Point( 0, nRelPos );
// OD 2004-03-23 #i26791#
- ASSERT( GetAnchoredObj().ISA(SwFlyInCntFrm),
+ OSL_ENSURE( GetAnchoredObj().ISA(SwFlyInCntFrm),
"<SwAsCharAnchoredObjectPosition::CalcPosition()> - wrong anchored object." );
const SwFlyInCntFrm& rFlyInCntFrm =
static_cast<const SwFlyInCntFrm&>(GetAnchoredObj());
@@ -339,7 +338,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition()
aObjBoundRect.Height( aObjBoundRect.Height() + rULSpace.GetLower() );
}
}
- ASSERT( (rFlyInCntFrm.Frm().*fnRect->fnGetHeight)(),
+ OSL_ENSURE( (rFlyInCntFrm.Frm().*fnRect->fnGetHeight)(),
"SwAnchoredObjectPosition::CalcPosition(..) - fly frame has an invalid height" );
}
@@ -456,3 +455,4 @@ sal_uInt8 SwAsCharAnchoredObjectPosition::GetLineAlignment() const
return mnLineAlignment;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/objectpositioning/environmentofanchoredobject.cxx b/sw/source/core/objectpositioning/environmentofanchoredobject.cxx
index 8bf87bc6ea92..80122c27905c 100644
--- a/sw/source/core/objectpositioning/environmentofanchoredobject.cxx
+++ b/sw/source/core/objectpositioning/environmentofanchoredobject.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,8 +47,6 @@ SwEnvironmentOfAnchoredObject::~SwEnvironmentOfAnchoredObject()
/** determine environment layout frame for possible horizontal object positions
- OD 05.11.2003
-
@author OD
*/
const SwLayoutFrm& SwEnvironmentOfAnchoredObject::GetHoriEnvironmentLayoutFrm(
@@ -57,10 +56,9 @@ const SwLayoutFrm& SwEnvironmentOfAnchoredObject::GetHoriEnvironmentLayoutFrm(
if ( !mbFollowTextFlow )
{
- // --> OD 2005-01-20 #118546# - no exception any more for page alignment.
+ // No exception any more for page alignment.
// the page frame determines the horizontal layout environment.
pHoriEnvironmentLayFrm = _rHoriOrientFrm.FindPageFrm();
- // <--
}
else
{
@@ -69,22 +67,18 @@ const SwLayoutFrm& SwEnvironmentOfAnchoredObject::GetHoriEnvironmentLayoutFrm(
!pHoriEnvironmentLayFrm->IsPageFrm() )
{
pHoriEnvironmentLayFrm = pHoriEnvironmentLayFrm->GetUpper();
- ASSERT( pHoriEnvironmentLayFrm,
+ OSL_ENSURE( pHoriEnvironmentLayFrm,
"SwEnvironmentOfAnchoredObject::GetHoriEnvironmentLayoutFrm(..) - no page|fly|cell frame found" );
}
}
- ASSERT( pHoriEnvironmentLayFrm->ISA(SwLayoutFrm),
+ OSL_ENSURE( pHoriEnvironmentLayFrm->ISA(SwLayoutFrm),
"SwEnvironmentOfAnchoredObject::GetHoriEnvironmentLayoutFrm(..) - found frame isn't a layout frame" );
return static_cast<const SwLayoutFrm&>(*pHoriEnvironmentLayFrm);
}
/** determine environment layout frame for possible vertical object positions
-
- OD 05.11.2003
-
- @author OD
*/
const SwLayoutFrm& SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFrm(
const SwFrm& _rVertOrientFrm ) const
@@ -93,10 +87,9 @@ const SwLayoutFrm& SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFrm(
if ( !mbFollowTextFlow )
{
- // --> OD 2005-01-20 #118546# - no exception any more for page alignment.
+ // No exception any more for page alignment.
// the page frame determines the vertical layout environment.
pVertEnvironmentLayFrm = _rVertOrientFrm.FindPageFrm();
- // <--
}
else
{
@@ -109,13 +102,15 @@ const SwLayoutFrm& SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFrm(
!pVertEnvironmentLayFrm->IsPageFrm() )
{
pVertEnvironmentLayFrm = pVertEnvironmentLayFrm->GetUpper();
- ASSERT( pVertEnvironmentLayFrm,
+ OSL_ENSURE( pVertEnvironmentLayFrm,
"SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFrm(..) - proposed frame not found" );
}
}
- ASSERT( pVertEnvironmentLayFrm->ISA(SwLayoutFrm),
+ OSL_ENSURE( pVertEnvironmentLayFrm->ISA(SwLayoutFrm),
"SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFrm(..) - found frame isn't a layout frame" );
return static_cast<const SwLayoutFrm&>(*pVertEnvironmentLayFrm);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
index 71e85c9d94fa..b4795dbd947a 100644
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,8 @@
#include <txtfrm.hxx>
#include <pagefrm.hxx>
#include <sectfrm.hxx>
-// --> OD 2004-10-15 #i26945#
+// #i26945#
#include <tabfrm.hxx>
-// <--
#include <frmfmt.hxx>
#include <IDocumentSettingAccess.hxx>
#include <fmtsrnd.hxx>
@@ -58,12 +58,12 @@ using namespace ::com::sun::star;
SwToCntntAnchoredObjectPosition::SwToCntntAnchoredObjectPosition( SdrObject& _rDrawObj )
: SwAnchoredObjectPosition ( _rDrawObj ),
mpVertPosOrientFrm( 0 ),
- // --> OD 2004-06-17 #i26791#
+ // #i26791#
maOffsetToFrmAnchorPos( Point() ),
mbAnchorToChar ( false ),
mpToCharOrientFrm( 0 ),
mpToCharRect( 0 ),
- // OD 12.11.2003 #i22341#
+ // #i22341#
mnToCharTopOfLine( 0 )
{}
@@ -85,7 +85,7 @@ const SwRect* SwToCntntAnchoredObjectPosition::ToCharRect() const
return mpToCharRect;
}
-// OD 12.11.2003 #i22341#
+// #i22341#
SwTwips SwToCntntAnchoredObjectPosition::ToCharTopOfLine() const
{
return mnToCharTopOfLine;
@@ -93,13 +93,13 @@ SwTwips SwToCntntAnchoredObjectPosition::ToCharTopOfLine() const
SwTxtFrm& SwToCntntAnchoredObjectPosition::GetAnchorTxtFrm() const
{
- ASSERT( GetAnchorFrm().ISA(SwTxtFrm),
+ OSL_ENSURE( GetAnchorFrm().ISA(SwTxtFrm),
"SwToCntntAnchoredObjectPosition::GetAnchorTxtFrm() - wrong anchor frame type" );
return static_cast<SwTxtFrm&>(GetAnchorFrm());
}
-// --> OD 2004-07-20 #i23512#
+// #i23512#
bool lcl_DoesVertPosFits( const SwTwips _nRelPosY,
const SwTwips _nAvail,
const SwLayoutFrm* _pUpperOfOrientFrm,
@@ -132,19 +132,17 @@ bool lcl_DoesVertPosFits( const SwTwips _nRelPosY,
}
else if ( _pUpperOfOrientFrm->IsInTab() && _bGrowInTable )
{
- // --> OD 2005-06-08 #i45085# - check, if upper frame would grow the
+ // #i45085# - check, if upper frame would grow the
// excepted amount of twips.
const SwTwips nTwipsGrown = const_cast<SwLayoutFrm*>(_pUpperOfOrientFrm)->
Grow( _nRelPosY - _nAvail, sal_True ) > 0;
bVertPosFits = ( nTwipsGrown == ( _nRelPosY - _nAvail ) );
- // <--
if ( bVertPosFits )
_orpLayoutFrmToGrow = const_cast<SwLayoutFrm*>(_pUpperOfOrientFrm);
}
return bVertPosFits;
}
-// <--
void SwToCntntAnchoredObjectPosition::CalcPosition()
{
@@ -173,10 +171,10 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
const bool bNoSurround = rSurround.GetSurround() == SURROUND_NONE;
const bool bWrapThrough = rSurround.GetSurround() == SURROUND_THROUGHT;
- // OD 29.10.2003 #110978# - new class <SwEnvironmentOfAnchoredObject>
+ // new class <SwEnvironmentOfAnchoredObject>
SwEnvironmentOfAnchoredObject aEnvOfObj( DoesObjFollowsTextFlow() );
- // OD 30.09.2003 #i18732# - grow only, if object has to follow the text flow
+ // #i18732# - grow only, if object has to follow the text flow
const bool bGrow = DoesObjFollowsTextFlow() &&
( !GetAnchorFrm().IsInTab() ||
!rFrmFmt.GetFrmSize().GetHeightPercent() );
@@ -189,7 +187,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// local variable keeping the calculated relative position; initialized with
// current relative position.
- // OD 2004-03-24 #i26791# - use new object instance of <SwAnchoredObject>
+ // #i26791# - use new object instance of <SwAnchoredObject>
Point aRelPos( GetAnchoredObj().GetCurrRelPos() );
SwTwips nRelDiff = 0;
@@ -206,37 +204,34 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
if ( mbAnchorToChar )
{
const SwFmtAnchor& rAnch = rFrmFmt.GetAnchor();
- // OD 2004-03-24 #i26791# - use new object instance of <SwAnchoredObject>
- // OD 2005-01-12 - Due to table break algorithm the character
+ // #i26791# - use new object instance of <SwAnchoredObject>
+ // Due to table break algorithm the character
// rectangle can have no height. Thus, check also the width
if ( ( !GetAnchoredObj().GetLastCharRect().Height() &&
!GetAnchoredObj().GetLastCharRect().Width() ) ||
!GetAnchoredObj().GetLastTopOfLine() )
{
- // --> OD 2010-07-02 #i111886#
+ // #i111886#
// Check existence of paragraph portion information in order
// to avoid formatting which could cause deletion of follow frames.
GetAnchoredObj().CheckCharRectAndTopOfLine();
- // <--
- // OD 2005-01-12 - Due to table break algorithm the character
+
+ // Due to table break algorithm the character
// rectangle can have no height. Thus, check also the width
if ( ( !GetAnchoredObj().GetLastCharRect().Height() &&
!GetAnchoredObj().GetLastCharRect().Width() ) ||
!GetAnchoredObj().GetLastTopOfLine() )
{
- // --> OD 2005-01-12 - get default for <mpVertPosOrientFrm>,
- // if it's not set.
+ // Get default for <mpVertPosOrientFrm>, if it's not set.
if ( !mpVertPosOrientFrm )
{
mpVertPosOrientFrm = rAnchorTxtFrm.GetUpper();
}
- // <--
return;
}
}
mpToCharRect = &(GetAnchoredObj().GetLastCharRect());
- // OD 12.11.2003 #i22341# - get top of line, in which the anchor
- // character is.
+ // #i22341# - get top of line, in which the anchor character is.
mnToCharTopOfLine = GetAnchoredObj().GetLastTopOfLine();
pOrientFrm = &(const_cast<SwTxtFrm&>(rAnchorTxtFrm).GetFrmAtOfst(
rAnch.GetCntntAnchor()->nContent.GetIndex() ) );
@@ -251,14 +246,14 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// determine vertical positioning and alignment attributes
SwFmtVertOrient aVert( rFrmFmt.GetVertOrient() );
- // OD 22.09.2003 #i18732# - determine layout frame for vertical
+ // #i18732# - determine layout frame for vertical
// positions aligned to 'page areas'.
const SwLayoutFrm& rPageAlignLayFrm =
aEnvOfObj.GetVertEnvironmentLayoutFrm( *pOrientFrm );
if ( aVert.GetVertOrient() != text::VertOrientation::NONE )
{
- // OD 22.09.2003 #i18732# - adjustments for follow text flow or not
+ // #i18732# - adjustments for follow text flow or not
// AND vertical alignment at 'page areas'.
SwTwips nAlignAreaHeight;
SwTwips nAlignAreaOffset;
@@ -301,7 +296,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// no break here
case text::VertOrientation::TOP:
{
- // OD 12.11.2003 #i22341# - special case for vertical
+ // #i22341# - special case for vertical
// alignment at top of line
if ( mbAnchorToChar &&
aVert.GetRelationOrient() == text::RelOrientation::TEXT_LINE )
@@ -314,7 +309,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
}
}
break;
- // OD 14.11.2003 #i22341#
+ // #i22341#
case text::VertOrientation::LINE_TOP:
{
if ( mbAnchorToChar &&
@@ -324,7 +319,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwToCntntAnchoredObjectPosition::CalcPosition()> - unknown combination of vertical position and vertical alignment." );
}
}
@@ -334,7 +329,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
nRelPosY += (nAlignAreaHeight / 2) - (nObjHeight / 2);
}
break;
- // OD 14.11.2003 #i22341#
+ // #i22341#
case text::VertOrientation::LINE_CENTER:
{
if ( mbAnchorToChar &&
@@ -344,7 +339,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwToCntntAnchoredObjectPosition::CalcPosition()> - unknown combination of vertical position and vertical alignment." );
}
}
@@ -360,7 +355,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
}
else
{
- // OD 12.11.2003 #i22341# - special case for vertical
+ // #i22341# - special case for vertical
// alignment at top of line
if ( mbAnchorToChar &&
aVert.GetRelationOrient() == text::RelOrientation::TEXT_LINE )
@@ -375,7 +370,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
}
}
break;
- // OD 14.11.2003 #i22341#
+ // #i22341#
case text::VertOrientation::LINE_BOTTOM:
{
if ( mbAnchorToChar &&
@@ -385,7 +380,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwToCntntAnchoredObjectPosition::CalcPosition()> - unknown combination of vertical position and vertical alignment." );
}
}
@@ -396,18 +391,18 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// adjust relative position by distance between anchor frame and
// the frame, the object is oriented at.
- // OD 2004-05-21 #i28701# - correction: adjust relative position,
+ // #i28701# - correction: adjust relative position,
// only if the floating screen object has to follow the text flow.
if ( DoesObjFollowsTextFlow() && pOrientFrm != &rAnchorTxtFrm )
{
- // OD 2004-03-11 #i11860# - use new method <_GetTopForObjPos>
+ // #i11860# - use new method <_GetTopForObjPos>
// to get top of frame for object positioning.
const SwTwips nTopOfOrient = _GetTopForObjPos( *pOrientFrm, fnRect, bVert );
nRelPosY += (*fnRect->fnYDiff)( nTopOfOrient,
_GetTopForObjPos( rAnchorTxtFrm, fnRect, bVert ) );
}
- // --> OD 2005-02-07 #i42124# - capture object inside vertical
+ // #i42124# - capture object inside vertical
// layout environment.
{
const SwTwips nTopOfAnch =
@@ -421,7 +416,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
DoesObjFollowsTextFlow(),
bCheckBottom );
}
- // <--
+
// keep calculated relative vertical position - needed for filters
// (including the xml-filter)
{
@@ -438,7 +433,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
}
// determine absolute 'vertical' position, depending on layout-direction
- // --> OD 2004-06-17 #i26791# - determine offset to 'vertical' frame
+ // #i26791# - determine offset to 'vertical' frame
// anchor position, depending on layout-direction
if ( bVert )
{
@@ -452,14 +447,13 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
}
}
- // OD 29.10.2003 #110978# - determine upper of frame vertical position
- // is oriented at.
- // OD 2004-05-21 #i28701# - determine 'virtual' anchor frame.
+ // Determine upper of frame vertical position is oriented at.
+ // #i28701# - determine 'virtual' anchor frame.
// This frame is used in the following instead of the 'real' anchor
// frame <rAnchorTxtFrm> for the 'vertical' position in all cases.
const SwLayoutFrm* pUpperOfOrientFrm = 0L;
{
- // OD 2004-05-21 #i28701# - As long as the anchor frame is on the
+ // #i28701# - As long as the anchor frame is on the
// same page as <pOrientFrm> and the vertical position isn't aligned
// automatic at the anchor character or the top of the line of the
// anchor character, the anchor frame determines the vertical position.
@@ -480,7 +474,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
}
// ignore one-column sections.
- // --> OD 2004-07-20 #i23512# - correction: also ignore one-columned
+ // #i23512# - correction: also ignore one-columned
// sections with footnotes/endnotes
if ( pUpperOfOrientFrm->IsInSct() )
{
@@ -497,17 +491,17 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// local variable <nRelPosY> for calculation of relative vertical
// distance to anchor.
SwTwips nRelPosY = 0;
- // --> OD 2004-06-17 #i26791# - local variable <nVertOffsetToFrmAnchorPos>
+ // #i26791# - local variable <nVertOffsetToFrmAnchorPos>
// for determination of the 'vertical' offset to the frame anchor
// position
SwTwips nVertOffsetToFrmAnchorPos( 0L );
- // OD 12.11.2003 #i22341# - add special case for vertical alignment
+ // #i22341# - add special case for vertical alignment
// at top of line.
if ( mbAnchorToChar &&
( aVert.GetRelationOrient() == text::RelOrientation::CHAR ||
aVert.GetRelationOrient() == text::RelOrientation::TEXT_LINE ) )
{
- // OD 2004-03-11 #i11860# - use new method <_GetTopForObjPos>
+ // #i11860# - use new method <_GetTopForObjPos>
// to get top of frame for object positioning.
SwTwips nTopOfOrient = _GetTopForObjPos( *pOrientFrm, fnRect, bVert );
if ( aVert.GetRelationOrient() == text::RelOrientation::CHAR )
@@ -525,20 +519,19 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
}
else
{
- // OD 2004-05-21 #i28701# - correction: use <pAnchorFrmForVertPos>
+ // #i28701# - correction: use <pAnchorFrmForVertPos>
// instead of <pOrientFrm> and do not adjust relative position
// to get correct vertical position.
nVertOffsetToFrmAnchorPos = 0L;
- // OD 2004-03-11 #i11860# - use new method <_GetTopForObjPos>
+ // #i11860# - use new method <_GetTopForObjPos>
// to get top of frame for object positioning.
const SwTwips nTopOfOrient =
_GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert );
- // OD 02.10.2002 #102646# - increase <nRelPosY> by margin height,
+ // Increase <nRelPosY> by margin height,
// if position is vertical aligned to "paragraph text area"
if ( aVert.GetRelationOrient() == text::RelOrientation::PRINT_AREA )
{
- // OD 2004-03-11 #i11860# - consider upper space amount
- // of previous frame
+ // #i11860# - consider upper space amount of previous frame
SwTwips nTopMargin = (pAnchorFrmForVertPos->*fnRect->fnGetTopMargin)();
if ( pAnchorFrmForVertPos->IsTxtFrm() )
{
@@ -547,7 +540,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
}
nVertOffsetToFrmAnchorPos += nTopMargin;
}
- // OD 22.09.2003 #i18732# - adjust <nRelPosY> by difference
+ // #i18732# - adjust <nRelPosY> by difference
// between 'page area' and 'anchor' frame, if position is
// vertical aligned to 'page areas'
else if ( aVert.GetRelationOrient() == text::RelOrientation::PAGE_FRAME )
@@ -578,23 +571,23 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// <nAvail>: space, which is available in the current
// layout frame
- // --> OD 2004-06-17 #i26791# - determine offset to 'vertical'
+ // #i26791# - determine offset to 'vertical'
// frame anchor position, depending on layout-direction
if ( bVert )
maOffsetToFrmAnchorPos.X() = nVertOffsetToFrmAnchorPos;
else
maOffsetToFrmAnchorPos.Y() = nVertOffsetToFrmAnchorPos;
// <--
- // OD 2004-03-11 #i11860# - use new method <_GetTopForObjPos>
+ // #i11860# - use new method <_GetTopForObjPos>
// to get top of frame for object positioning.
const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert );
if( nRelPosY <= 0 )
{
- // OD 08.09.2003 #110354# - allow negative position, but keep it
+ // Allow negative position, but keep it
// inside environment layout frame.
const SwLayoutFrm& rVertEnvironLayFrm =
aEnvOfObj.GetVertEnvironmentLayoutFrm( *pUpperOfOrientFrm );
- // --> OD 2004-07-22 #i31805# - do not check, if bottom of
+ // #i31805# - do not check, if bottom of
// anchored object would fit into environment layout frame, if
// anchored object has to follow the text flow.
const bool bCheckBottom = !DoesObjFollowsTextFlow();
@@ -602,7 +595,6 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
rVertEnvironLayFrm, nRelPosY,
DoesObjFollowsTextFlow(),
bCheckBottom );
- // <--
if ( bVert )
aRelPos.X() = nRelPosY;
else
@@ -617,7 +609,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
const bool bInFtn = pAnchorFrmForVertPos->IsInFtn();
while ( nRelPosY )
{
- // --> OD 2004-07-20 #i23512# - correction:
+ // #i23512# - correction:
// consider section frame for grow in online layout.
// use new local method <lcl_DoesVertPosFits(..)>
SwLayoutFrm* pLayoutFrmToGrow = 0L;
@@ -631,11 +623,11 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
(*fnRect->fnYDiff)( (pUpperOfOrientFrm->*fnRect->fnGetPrtBottom)(),
nTopOfAnch ) -
nAvail + nRelPosY;
- // --> OD 2004-07-06 #i28701# - adjust calculated
+ // #i28701# - adjust calculated
// relative vertical position to object's environment.
const SwFrm& rVertEnvironLayFrm =
aEnvOfObj.GetVertEnvironmentLayoutFrm( *pUpperOfOrientFrm );
- // --> OD 2004-08-20 - do not check, if bottom of
+ // Do not check, if bottom of
// anchored object would fit into environment layout
// frame, if anchored object has to follow the text flow.
const bool bCheckBottom = !DoesObjFollowsTextFlow();
@@ -644,13 +636,12 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
nTmpRelPosY,
DoesObjFollowsTextFlow(),
bCheckBottom );
- // <--
if ( bVert )
aRelPos.X() = nTmpRelPosY;
else
aRelPos.Y() = nTmpRelPosY;
- // --> OD 2004-07-20 #i23512# - use local variable
+ // #i23512# - use local variable
// <pLayoutFrmToGrow> provided by new method
// <lcl_DoesVertPosFits(..)>.
if ( pLayoutFrmToGrow )
@@ -662,14 +653,13 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
}
else
{
- // --> OD 2004-10-04 #i26495# - floating screen objects,
+ // #i26495# - floating screen objects,
// which are anchored inside a table, doesn't follow
// the text flow.
if ( DoesObjFollowsTextFlow() &&
!( aVert.GetRelationOrient() == text::RelOrientation::PAGE_FRAME ||
aVert.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA ) &&
!GetAnchorFrm().IsInTab() )
- // <--
{
if ( bMoveable )
{
@@ -710,7 +700,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
else
{
#if OSL_DEBUG_LEVEL > 1
- ASSERT( false, "<SwToCntntAnchoredObjectPosition::CalcPosition()> - code under investigation by OD, please inform OD about this assertion!" );
+ OSL_ENSURE( false, "<SwToCntntAnchoredObjectPosition::CalcPosition()> - code under investigation by OD, please inform OD about this assertion!" );
#endif
nRelDiff = nRelPosY;
nRelPosY = 0;
@@ -724,7 +714,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
}
else
{
- // OD 06.10.2003 #i18732# - do not follow text flow respectively
+ // #i18732# - do not follow text flow respectively
// align at 'page areas', but stay inside given environment
const SwFrm& rVertEnvironLayFrm =
aEnvOfObj.GetVertEnvironmentLayoutFrm( *pUpperOfOrientFrm );
@@ -771,7 +761,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// grow environment under certain conditions
// ignore one-column sections.
- // --> OD 2004-07-20 #i23512# - correction: also ignore one-columned
+ // #i23512# - correction: also ignore one-columned
// sections with footnotes/endnotes
if ( pUpperOfOrientFrm->IsInSct() )
{
@@ -786,7 +776,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
(pUpperOfOrientFrm->*fnRect->fnGetPrtBottom)() );
if( nDist < 0 )
{
- // --> OD 2004-07-20 #i23512# - correction:
+ // #i23512# - correction:
// consider section frame for grow in online layout and
// consider page alignment for grow in table.
SwLayoutFrm* pLayoutFrmToGrow = 0L;
@@ -827,7 +817,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
nDist = (GetAnchoredObj().GetObjRect().*fnRect->fnBottomDist)(
(pUpperOfOrientFrm->*fnRect->fnGetPrtBottom)() );
- // --> OD 2004-10-04 #i26945# - floating screen objects, which are
+ // #i26945# - floating screen objects, which are
// anchored inside a table, doesn't follow the text flow. But, they
// have to stay inside its layout environment.
if ( nDist < 0 && pOrientFrm->IsInTab() )
@@ -893,7 +883,6 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
}
else
{
- // <--
// follow text flow
const bool bInFtn = rAnchorTxtFrm.IsInFtn();
while( bMoveable && nDist < 0 )
@@ -904,7 +893,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
const SwLayoutFrm* pTmp = pUpperOfOrientFrm->FindSctFrm()->GetUpper();
nDist = (GetAnchoredObj().GetObjRect().*fnRect->fnBottomDist)(
(pTmp->*fnRect->fnGetPrtBottom)() );
- // --> OD 2004-11-01 #i23129# - Try to flow into next
+ // #i23129# - Try to flow into next
// section|section column. Thus, do *not* leave section
// area, if anchored object doesn't fit into upper of section.
// But the anchored object is allowed to overlap bottom
@@ -913,7 +902,6 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
{
break;
}
- // <--
}
if ( !bInSct &&
(GetAnchoredObj().GetObjRect().*fnRect->fnGetTop)() ==
@@ -926,7 +914,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
? MAKEPAGE_NOSECTION
: ( bInFtn ? MAKEPAGE_NONE : MAKEPAGE_APPEND ) ),
sal_True, &rAnchorTxtFrm );
- // OD 06.10.2003 #110978# - correction:
+ // correction:
// If anchor is in footnote and proposed next layout environment
// isn't a footnote frame, object can't follow the text flow
if ( bInFtn && pNextLay && !pNextLay->IsFtnFrm() )
@@ -972,7 +960,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
nDist = (GetAnchoredObj().GetObjRect().*fnRect->fnBottomDist)(
(pUpperOfOrientFrm->*fnRect->fnGetPrtBottom)() );
}
- // --> OD 2004-11-01 #i23129# - leave section area
+ // #i23129# - leave section area
else if ( bInSct )
{
const SwLayoutFrm* pTmp = pUpperOfOrientFrm->FindSctFrm()->GetUpper();
@@ -983,7 +971,6 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
else
break;
}
- // <--
}
else if ( bInSct )
{
@@ -1034,20 +1021,20 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
GetAnchoredObj().SetObjTop( nTopOfAnch + aRelPos.Y() );
// determine frame, horizontal position is oriented at.
- // OD 2004-05-21 #i28701# - If floating screen object doesn't follow
+ // #i28701# - If floating screen object doesn't follow
// the text flow, its horizontal position is oriented at <pOrientFrm>.
const SwFrm* pHoriOrientFrm = DoesObjFollowsTextFlow()
? &_GetHoriVirtualAnchor( *mpVertPosOrientFrm )
: pOrientFrm;
- // --> OD 2004-06-17 #i26791# - get 'horizontal' offset to frame anchor position.
+ // #i26791# - get 'horizontal' offset to frame anchor position.
SwTwips nHoriOffsetToFrmAnchorPos( 0L );
SwTwips nRelPosX = _CalcRelPosX( *pHoriOrientFrm, aEnvOfObj,
aHori, rLR, rUL, bWrapThrough,
( bVert ? aRelPos.X() : aRelPos.Y() ),
nHoriOffsetToFrmAnchorPos );
- // --> OD 2004-06-17 #i26791# - determine offset to 'horizontal' frame
+ // #i26791# - determine offset to 'horizontal' frame
// anchor position, depending on layout-direction
if ( bVert )
{
@@ -1136,3 +1123,4 @@ const SwLayoutFrm& SwToCntntAnchoredObjectPosition::GetVertPosOrientFrm() const
return *mpVertPosOrientFrm;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
index cf02ed8e45cd..9e3317db6a25 100644
--- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <anchoredobject.hxx>
#include <frame.hxx>
#include <pagefrm.hxx>
-#ifndef _SVX_SVDOBJ_HXX
#include <svx/svdobj.hxx>
-#endif
#include <frmfmt.hxx>
#include <fmtanchr.hxx>
#include <fmtornt.hxx>
@@ -119,7 +118,7 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition()
// anchor position, depending on layout-direction
if( bVert )
{
- ASSERT( !bRev, "<SwToLayoutAnchoredObjectPosition::CalcPosition()> - reverse layout set." );
+ OSL_ENSURE( !bRev, "<SwToLayoutAnchoredObjectPosition::CalcPosition()> - reverse layout set." );
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if ( bVertL2R )
aRelPos.X() = nRelPosY;
@@ -251,3 +250,4 @@ Point SwToLayoutAnchoredObjectPosition::GetRelPos() const
return maRelPos;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 69cb74a86d21..de3945b25e8a 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,9 +48,7 @@
#include <sfx2/app.hxx>
#include <sfx2/linkmgr.hxx>
#include <unotools/configitem.hxx>
-#ifndef _OUTDEV_HXX //autogen
#include <vcl/outdev.hxx>
-#endif
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
@@ -58,9 +57,6 @@
#include <section.hxx>
#include <cntfrm.hxx>
#include <frmatr.hxx>
-#ifndef _DOCSH_HXX
-#include <docsh.hxx>
-#endif
#include <ndole.hxx>
#include <comphelper/classids.hxx>
@@ -68,9 +64,7 @@
#include <sot/formats.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <svtools/filter.hxx>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
using rtl::OUString;
using namespace utl;
@@ -228,8 +222,6 @@ void SwEmbedObjectLink::DataChanged( const String& ,
}
pOleNode->GetNewReplacement();
- // Initiate repainting
- // pObj->SetChanged();
}
// -----------------------------------------------------------------------------
@@ -285,15 +277,10 @@ Graphic* SwOLENode::GetGraphic()
return pGraphic;
}
-Graphic* SwOLENode::GetHCGraphic()
-{
- return aOLEObj.xOLERef.GetHCGraphic();
-}
-
SwCntntNode *SwOLENode::SplitCntntNode( const SwPosition & )
{
// OLE-Objecte vervielfaeltigen ??
- ASSERT( sal_False, "OleNode: can't split." );
+ OSL_ENSURE( sal_False, "OleNode: can't split." );
return this;
}
@@ -310,7 +297,7 @@ sal_Bool SwOLENode::RestorePersistentData()
{
// TODO/LATER: reicht hier nicht ein EmbeddedObjectContainer? Was passiert mit
// diesem Dokument?
- ASSERT( !this, "warum wird hier eine DocShell angelegt?" );
+ OSL_ENSURE( !this, "warum wird hier eine DocShell angelegt?" );
p = new SwDocShell( GetDoc(), SFX_CREATE_MODE_INTERNAL );
p->DoInitNew( NULL );
}
@@ -325,7 +312,7 @@ sal_Bool SwOLENode::RestorePersistentData()
{
if ( xChild.is() )
xChild->setParent( 0 );
- DBG_ERROR( "InsertObject failed" );
+ OSL_FAIL( "InsertObject failed" );
}
else
{
@@ -388,7 +375,7 @@ SwOLENode * SwNodes::MakeOLENode( const SwNodeIndex & rWhere,
SwGrfFmtColl* pGrfColl,
SwAttrSet* pAutoAttr )
{
- ASSERT( pGrfColl,"SwNodes::MakeOLENode: Formatpointer ist 0." );
+ OSL_ENSURE( pGrfColl,"SwNodes::MakeOLENode: Formatpointer ist 0." );
SwOLENode *pNode =
new SwOLENode( rWhere, xObj, pGrfColl, pAutoAttr );
@@ -410,7 +397,7 @@ SwOLENode * SwNodes::MakeOLENode( const SwNodeIndex & rWhere,
SwOLENode * SwNodes::MakeOLENode( const SwNodeIndex & rWhere,
const String &rName, sal_Int64 nAspect, SwGrfFmtColl* pGrfColl, SwAttrSet* pAutoAttr )
{
- ASSERT( pGrfColl,"SwNodes::MakeOLENode: Formatpointer ist 0." );
+ OSL_ENSURE( pGrfColl,"SwNodes::MakeOLENode: Formatpointer ist 0." );
SwOLENode *pNode =
new SwOLENode( rWhere, rName, nAspect, pGrfColl, pAutoAttr );
@@ -442,8 +429,8 @@ SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
{
// TODO/LATER: is EmbeddedObjectContainer not enough?
// the created document will be closed by pDoc ( should use SfxObjectShellLock )
- pPersistShell = new SwDocShell( pDoc, SFX_CREATE_MODE_INTERNAL );
- pDoc->SetTmpDocShell( pPersistShell );
+ OSL_ENSURE( pDoc->GetRefForDocShell(),
+ "wo ist die Ref-Klasse fuer die DocShell?");
pPersistShell->DoInitNew( NULL );
}
@@ -516,9 +503,6 @@ sal_Bool SwOLENode::IsOLEObjectDeleted() const
if( p ) // muss da sein
{
return !p->GetEmbeddedObjectContainer().HasEmbeddedObject( aOLEObj.aName );
- //SvInfoObjectRef aRef( p->Find( aOLEObj.aName ) );
- //if( aRef.Is() )
- // bRet = aRef->IsDeleted();
}
}
return bRet;
@@ -749,7 +733,7 @@ void SwOLEObj::SetNode( SwOLENode* pNode )
{
// TODO/LATER: reicht hier nicht ein EmbeddedObjectContainer? Was passiert mit
// diesem Dokument?
- ASSERT( !this, "warum wird hier eine DocShell angelegt?" );
+ OSL_ENSURE( !this, "warum wird hier eine DocShell angelegt?" );
p = new SwDocShell( pDoc, SFX_CREATE_MODE_INTERNAL );
p->DoInitNew( NULL );
}
@@ -761,7 +745,7 @@ void SwOLEObj::SetNode( SwOLENode* pNode )
xChild->setParent( p->GetModel() );
if (!p->GetEmbeddedObjectContainer().InsertEmbeddedObject( xOLERef.GetObject(), aObjName ) )
{
- DBG_ERROR( "InsertObject failed" );
+ OSL_FAIL( "InsertObject failed" );
if ( xChild.is() )
xChild->setParent( 0 );
}
@@ -784,10 +768,10 @@ const uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef()
if( !xOLERef.is() )
{
SfxObjectShell* p = pOLENd->GetDoc()->GetPersist();
- ASSERT( p, "kein SvPersist vorhanden" );
+ OSL_ENSURE( p, "kein SvPersist vorhanden" );
uno::Reference < embed::XEmbeddedObject > xObj = p->GetEmbeddedObjectContainer().GetEmbeddedObject( aName );
- ASSERT( !xOLERef.is(), "rekursiver Aufruf von GetOleRef() ist nicht erlaubt" )
+ OSL_ENSURE( !xOLERef.is(), "rekursiver Aufruf von GetOleRef() ist nicht erlaubt" );
if ( !xObj.is() )
{
@@ -840,9 +824,6 @@ svt::EmbeddedObjectRef& SwOLEObj::GetObject()
sal_Bool SwOLEObj::UnloadObject()
{
sal_Bool bRet = sal_True;
- //Nicht notwendig im Doc DTor (MM)
- //ASSERT( pOLERef && pOLERef->Is() && 1 < (*pOLERef)->GetRefCount(),
- // "Falscher RefCount fuers Unload" );
if ( pOLENd )
{
const SwDoc* pDoc = pOLENd->GetDoc();
@@ -880,7 +861,7 @@ sal_Bool SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > xObj,
if ( xPers.is() )
xPers->storeOwn();
else {
- DBG_ERROR("Modified object without persistance in cache!");
+ OSL_FAIL("Modified object without persistance in cache!");
}
}
@@ -921,7 +902,7 @@ String SwOLEObj::GetDescription()
SwOLELRUCache::SwOLELRUCache()
: SvPtrarr( 64, 16 ),
- utl::ConfigItem( OUString::createFromAscii( "Office.Common/Cache" )),
+ utl::ConfigItem(OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/Cache"))),
nLRU_InitSize( 20 ),
bInUnload( sal_False )
{
@@ -933,7 +914,7 @@ uno::Sequence< rtl::OUString > SwOLELRUCache::GetPropertyNames()
{
Sequence< OUString > aNames( 1 );
OUString* pNames = aNames.getArray();
- pNames[0] = OUString::createFromAscii( "Writer/OLE_Objects" );
+ pNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("Writer/OLE_Objects"));
return aNames;
}
@@ -956,8 +937,6 @@ void SwOLELRUCache::Load()
{
sal_Int32 nVal = 0;
*pValues >>= nVal;
- //if( 20 > nVal )
- // nVal = 20;
{
if( nVal < nLRU_InitSize )
@@ -1015,3 +994,4 @@ void SwOLELRUCache::RemoveObj( SwOLEObj& rObj )
DELETEZ( pOLELRU_Cache );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx
index bff9983e4ede..ea8da3f45cc6 100644
--- a/sw/source/core/para/paratr.cxx
+++ b/sw/source/core/para/paratr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,7 +48,6 @@
#include <com/sun/star/text/WrapTextMode.hpp>
#include <unostyle.hxx>
#include <SwStyleNameMapper.hxx>
-#include "errhdl.hxx"
#include "paratr.hxx"
#include "charfmt.hxx"
#include "cmdid.h"
@@ -61,8 +61,6 @@ TYPEINIT1_AUTOFACTORY( SwParaConnectBorderItem, SfxBoolItem);
/*************************************************************************
|* Beschreibung Methoden von SwFmtDrop
-|* Ersterstellung MS 19.02.91
-|* Letzte Aenderung JP 08.08.94
*************************************************************************/
@@ -144,7 +142,7 @@ sal_Bool SwFmtDrop::GetInfo( SfxPoolItem& ) const
int SwFmtDrop::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return ( nLines == ((SwFmtDrop&)rAttr).GetLines() &&
nChars == ((SwFmtDrop&)rAttr).GetChars() &&
nDistance == ((SwFmtDrop&)rAttr).GetDistance() &&
@@ -158,7 +156,7 @@ SfxPoolItem* SwFmtDrop::Clone( SfxItemPool* ) const
return new SwFmtDrop( *this );
}
-sal_Bool SwFmtDrop::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFmtDrop::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
switch(nMemberId&~CONVERT_TWIPS)
{
@@ -187,10 +185,10 @@ sal_Bool SwFmtDrop::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
}
break;
}
- return sal_True;
+ return true;
}
-sal_Bool SwFmtDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwFmtDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
switch(nMemberId&~CONVERT_TWIPS)
{
@@ -216,7 +214,7 @@ sal_Bool SwFmtDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
if ( rVal >>= nVal )
nDistance = (sal_Int16) MM100_TO_TWIP((sal_Int32)nVal);
else
- return sal_False;
+ return false;
break;
}
case MID_DROPCAP_FORMAT:
@@ -229,8 +227,6 @@ sal_Bool SwFmtDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
nDistance = MM100_TO_TWIP(pDrop->Distance);
}
else {
- //exception( wrong_type)
- ;
}
}
break;
@@ -238,10 +234,10 @@ sal_Bool SwFmtDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
bWholeWord = *(sal_Bool*)rVal.getValue();
break;
case MID_DROPCAP_CHAR_STYLE_NAME :
- DBG_ERROR("char format cannot be set in PutValue()!");
+ OSL_FAIL("char format cannot be set in PutValue()!");
break;
}
- return sal_True;
+ return true;
}
// class SwRegisterItem -------------------------------------------------
@@ -259,33 +255,26 @@ SfxPoolItem* SwNumRuleItem::Clone( SfxItemPool * ) const
}
int SwNumRuleItem::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
- // --> OD 2008-03-04 #refactorlists# - removed <pDefinedIn>
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+
return GetValue() == ((SwNumRuleItem&)rAttr).GetValue();
- // <--
}
-/* -----------------------------27.06.00 11:05--------------------------------
- ---------------------------------------------------------------------------*/
-sal_Bool SwNumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 ) const
+bool SwNumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
rtl::OUString sRet = SwStyleNameMapper::GetProgName(GetValue(), nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
rVal <<= sRet;
- return sal_True;
+ return true;
}
-/* -----------------------------27.06.00 11:05--------------------------------
- ---------------------------------------------------------------------------*/
-sal_Bool SwNumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 )
+bool SwNumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 )
{
rtl::OUString uName;
rVal >>= uName;
SetValue(SwStyleNameMapper::GetUIName(uName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE));
- return sal_True;
+ return true;
}
-/* -----------------19.05.2003 10:44-----------------
- --------------------------------------------------*/
SfxPoolItem* SwParaConnectBorderItem::Clone( SfxItemPool * ) const
{
return new SwParaConnectBorderItem( *this );
@@ -293,3 +282,4 @@ SfxPoolItem* SwParaConnectBorderItem::Clone( SfxItemPool * ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/sw3io/sw3convert.cxx b/sw/source/core/sw3io/sw3convert.cxx
index af9350427b51..8605e23f6204 100644
--- a/sw/source/core/sw3io/sw3convert.cxx
+++ b/sw/source/core/sw3io/sw3convert.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,26 +72,6 @@
using namespace nsSwDocInfoSubType;
-
-//#include "poolfmt.hxx" // fuer InSetExpField
-//#include "poolfmt.hrc" // fuer InSetExpField
-
-//#if !defined(UNX) && !defined(MSC) && !defined(PPC) && !defined(CSET) && !defined(__MWERKS__) && !defined(WTC)
-
-//#define FIELDFNTAB_SIZE 37
-//#if FIELDFNTAB_SIZE != RES_FIELDS_END - RES_FIELDS_BEGIN
-//#error Feld-Tabelle ist ungueltigt. Wurden neue Hint-IDs zugefuegt ??
-//#endif
-
-//#endif
-
-//#define SWG_AUTHORITY_ENTRY_LCL 'E'
-
-//sal_Char __FAR_DATA sSW3IO_FixedField[] = "FixedExport";
-//sal_Char __FAR_DATA sSW3IO_AuthorityField[] = "AuthorityExport";
-/* #108791# */
-//sal_Char __FAR_DATA sSW3IO_DropDownField[] = "DropDownExport";
-
struct OldFormats
{
NfIndexTableOffset eFormatIdx;
@@ -397,8 +378,6 @@ SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, sal_uInt16& rWhi
break;
default:
- // case REF_UPDOWN:
- // case REF_PAGE_PGDESC:
rFmt = REF_PAGE;
break;
}
@@ -408,13 +387,12 @@ SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, sal_uInt16& rWhi
if( pOldFmt && nOldFmt )
{
- sal_uInt16 i = 0;
-
SvNumberFormatter *pFormatter = ((SwValueField*)pFld)->GetDoc()->GetNumberFormatter();
const SvNumberformat* pEntry = pFormatter->GetEntry( nOldFmt );
if( pEntry )
{
+ sal_uInt16 i = 0;
while( pOldFmt[i].eFormatIdx != NF_NUMERIC_START ||
pOldFmt[i].nOldFormat )
{
@@ -431,3 +409,5 @@ SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, sal_uInt16& rWhi
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/sw3io/swacorr.cxx b/sw/source/core/sw3io/swacorr.cxx
index 6c9a4c52a111..86bd02e76a30 100644
--- a/sw/source/core/sw3io/swacorr.cxx
+++ b/sw/source/core/sw3io/swacorr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,12 +34,8 @@
#include <swacorr.hxx>
#include <swblocks.hxx>
#include "SwXMLTextBlocks.hxx"
-#ifndef _SWSERROR_H
#include <swerror.h>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <editsh.hxx>
#include <sot/storage.hxx>
@@ -62,7 +59,7 @@ sal_Bool SwAutoCorrect::GetLongText( const uno::Reference < embed::XStorage >& r
nRet = aBlk.GetText( rShort, rLong );
}
else {
- ASSERT ( rStg.is(), "Someone passed SwAutoCorrect::GetLongText a dud storage!");
+ OSL_ENSURE( rStg.is(), "Someone passed SwAutoCorrect::GetLongText a dud storage!");
}
return !IsError( nRet ) && rLong.Len();
}
@@ -104,3 +101,5 @@ SwAutoCorrect::SwAutoCorrect( const SvxAutoCorrect& rACorr )
SwAutoCorrect::~SwAutoCorrect()
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/swg/SwXMLBlockExport.cxx b/sw/source/core/swg/SwXMLBlockExport.cxx
index c99ebe35d9a8..674a33fe2c4f 100644
--- a/sw/source/core/swg/SwXMLBlockExport.cxx
+++ b/sw/source/core/swg/SwXMLBlockExport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -140,3 +141,5 @@ sal_uInt32 SwXMLTextBlockExport::exportDoc(const String &rText)
GetDocHandler()->endDocument();
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/swg/SwXMLBlockImport.cxx b/sw/source/core/swg/SwXMLBlockImport.cxx
index 9c0084eb6f4c..c7499c69f0e4 100644
--- a/sw/source/core/swg/SwXMLBlockImport.cxx
+++ b/sw/source/core/swg/SwXMLBlockImport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,18 +31,16 @@
#include <SwXMLBlockImport.hxx>
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmlnmspe.hxx>
-#ifndef _SW_XMLBLOCKLIST_CONTEXT_HXX
#include <SwXMLBlockListContext.hxx>
-#endif
#include <SwXMLTextBlocks.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
using namespace ::xmloff::token;
using ::rtl::OUString;
-sal_Char __READONLY_DATA sXML_np__block_list[] = "_block-list";
-sal_Char __READONLY_DATA sXML_np__office[] = "_ooffice";
-sal_Char __READONLY_DATA sXML_np__text[] = "_otext";
+sal_Char const sXML_np__block_list[] = "_block-list";
+sal_Char const sXML_np__office[] = "_ooffice";
+sal_Char const sXML_np__text[] = "_otext";
// #110680#
SwXMLBlockListImport::SwXMLBlockListImport(
@@ -116,3 +115,5 @@ void SAL_CALL SwXMLTextBlockImport::endDocument(void)
throw( xml::sax::SAXException, uno::RuntimeException )
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/swg/SwXMLBlockListContext.cxx b/sw/source/core/swg/SwXMLBlockListContext.cxx
index b8c5fb58aefc..babaada52596 100644
--- a/sw/source/core/swg/SwXMLBlockListContext.cxx
+++ b/sw/source/core/swg/SwXMLBlockListContext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -248,3 +249,5 @@ SwXMLTextBlockParContext::~SwXMLTextBlockParContext ( void )
rLocalRef.m_rText.AppendAscii( " " );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx
index a12693b8f72a..1aebeb72cf22 100644
--- a/sw/source/core/swg/SwXMLSectionList.cxx
+++ b/sw/source/core/swg/SwXMLSectionList.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,8 +39,8 @@ using namespace ::com::sun::star;
using ::rtl::OUString;
using namespace ::xmloff::token;
-sal_Char __READONLY_DATA sXML_np__office[] = "_ooffice";
-sal_Char __READONLY_DATA sXML_np__text[] = "_otext";
+sal_Char const sXML_np__office[] = "_ooffice";
+sal_Char const sXML_np__text[] = "_otext";
// #110680#
SwXMLSectionList::SwXMLSectionList(
@@ -152,3 +153,5 @@ SvXMLImportContext *SvXMLIgnoreSectionListContext::CreateChildContext(
{
return new SvXMLIgnoreSectionListContext (rLocalRef, nPrefix, rLocalName, xAttrList);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx
index a0728661ad60..6126a3854f26 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -101,7 +102,7 @@ SwXMLTextBlocks::SwXMLTextBlocks( const String& rFile )
}
catch( const uno::Exception& )
{
- DBG_ERROR("exception while creating AutoText storage");
+ OSL_FAIL("exception while creating AutoText storage");
}
}
InitBlockMode ( refStg );
@@ -277,10 +278,6 @@ sal_uLong SwXMLTextBlocks::CopyBlock( SwImpBlocks& rDestImp, String& rShort,
{
uno::Reference < embed::XStorage > rSourceRoot = xBlkRoot->openStorageElement( aGroup, embed::ElementModes::READ );
uno::Reference < embed::XStorage > rDestRoot = ((SwXMLTextBlocks&)rDestImp).xBlkRoot->openStorageElement( sDestShortName, embed::ElementModes::READWRITE );
- //if(!rSourceRoot.Is())
- // nError = ERR_SWG_READ_ERROR;
- //else
- //{
rSourceRoot->copyToStorage( rDestRoot );
}
catch ( uno::Exception& )
@@ -288,26 +285,9 @@ sal_uLong SwXMLTextBlocks::CopyBlock( SwImpBlocks& rDestImp, String& rShort,
nError = ERR_SWG_WRITE_ERROR;
}
- /* I think this should work now that text only blocks are in sub-storages as well
- else
- {
- SvStorageStreamRef rSourceStream = xBlkRoot->OpenStream( aGroup, STREAM_STGREAD );
- SvStorageStreamRef rDestStream = ((SwXMLTextBlocks&)rDestImp).xBlkRoot-> OpenStream( sDestShortName, STREAM_STGWRITE );
- if(!rDestStream.Is())
- nError = ERR_SWG_WRITE_ERROR;
- else
- {
- if(!rSourceStream->CopyTo(&rDestStream))
- nError = ERR_SWG_WRITE_ERROR;
- else
- rDestStream->Commit();
- }
- }
- */
if(!nError)
{
rShort = sDestShortName;
- //((SwXMLTextBlocks&)rDestImp).xBlkRoot->Commit();
((SwXMLTextBlocks&)rDestImp).AddName( rShort, rLong, bTextOnly );
((SwXMLTextBlocks&)rDestImp).MakeBlockList();
}
@@ -323,13 +303,6 @@ sal_uLong SwXMLTextBlocks::StartPutBlock( const String& rShort, const String& rP
if(!xBlkRoot.is())
return 0;
GetIndex ( rShort );
- /*
- if( xBlkRoot->IsContained( rPackageName ) )
- {
- xBlkRoot->Remove( rPackageName );
- xBlkRoot->Commit();
- }
- */
try
{
xRoot = xBlkRoot->openStorageElement( rPackageName, embed::ElementModes::READWRITE );
@@ -430,14 +403,6 @@ sal_uLong SwXMLTextBlocks::PutBlock( SwPaM& , const String& )
}
//TODO/LATER: error handling
- /*
- sal_uLong nErr = xBlkRoot->GetError();
- if( nErr == SVSTREAM_DISK_FULL )
- nRes = ERR_W4W_WRITE_FULL;
- else if( nErr != SVSTREAM_OK )
- nRes = ERR_SWG_WRITE_ERROR;
- nFlags |= nCommitFlags;
- return nErr;*/
return 0;
}
@@ -473,7 +438,7 @@ sal_Bool SwXMLTextBlocks::PutMuchEntries( sal_Bool bOn )
{
if( bInPutMuchBlocks )
{
- ASSERT( !this, "verschachtelte Aufrufe sind nicht erlaubt" );
+ OSL_ENSURE( !this, "verschachtelte Aufrufe sind nicht erlaubt" );
}
else if( !IsFileChanged() )
{
@@ -623,7 +588,6 @@ void SwXMLTextBlocks::MakeBlockText( const String& rText )
{
SwTxtNode* pTxtNode = pDoc->GetNodes()[ pDoc->GetNodes().GetEndOfContent().
GetIndex() - 1 ]->GetTxtNode();
- //JP 18.09.98: Bug 56706 - Standard sollte zumindest gesetzt sein!
if( pTxtNode->GetTxtColl() == pDoc->GetDfltTxtFmtColl() )
pTxtNode->ChgFmtColl( pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD ));
@@ -639,3 +603,5 @@ void SwXMLTextBlocks::MakeBlockText( const String& rText )
pTxtNode->InsertText( sTemp, aIdx );
} while ( STRING_NOTFOUND != nPos );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx
index 0aab2addfd7d..feaffd7adb03 100644
--- a/sw/source/core/swg/SwXMLTextBlocks1.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,22 +40,19 @@
#include <com/sun/star/xml/sax/XParser.hpp>
#include <com/sun/star/document/XStorageBasedDocument.hpp>
#include <doc.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <shellio.hxx>
#include <SwXMLTextBlocks.hxx>
#include <SwXMLBlockImport.hxx>
#include <SwXMLBlockExport.hxx>
#include <swevent.hxx>
#include <swerror.h>
-#include <errhdl.hxx>
#define STREAM_STGREAD ( STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE )
#define STREAM_STGWRITE ( STREAM_READ | STREAM_WRITE | STREAM_SHARE_DENYWRITE )
-sal_Char __FAR_DATA XMLN_BLOCKLIST[] = "BlockList.xml";
+sal_Char XMLN_BLOCKLIST[] = "BlockList.xml";
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -111,7 +109,7 @@ sal_uLong SwXMLTextBlocks::GetDoc( sal_uInt16 nIdx )
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
- ASSERT( xServiceFactory.is(), "XMLReader::Read: got no service manager" );
+ OSL_ENSURE( xServiceFactory.is(), "XMLReader::Read: got no service manager" );
if( !xServiceFactory.is() )
{
// Throw an exception ?
@@ -124,8 +122,8 @@ sal_uLong SwXMLTextBlocks::GetDoc( sal_uInt16 nIdx )
// get parser
uno::Reference< XInterface > xXMLParser = xServiceFactory->createInstance(
- OUString::createFromAscii("com.sun.star.xml.sax.Parser") );
- ASSERT( xXMLParser.is(),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")));
+ OSL_ENSURE( xXMLParser.is(),
"XMLReader::Read: com.sun.star.xml.sax.Parser service missing" );
if( !xXMLParser.is() )
{
@@ -206,7 +204,7 @@ sal_uLong SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx,
long nTmp = SOT_FORMATSTR_ID_STARWRITER_60;
sal_Bool bOasis = ( SotStorage::GetVersion( xRoot ) > nTmp );
- OUString sStreamName = OUString::createFromAscii("atevent.xml");
+ OUString sStreamName(RTL_CONSTASCII_USTRINGPARAM("atevent.xml"));
uno::Reference < io::XStream > xDocStream = xRoot->openStreamElement(
sStreamName, embed::ElementModes::READ );
DBG_ASSERT(xDocStream.is(), "Can't create stream");
@@ -244,10 +242,9 @@ sal_uLong SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx,
aFilterArguments[0] <<= xReplace;
// get filter
- OUString sFilterComponent( OUString::createFromAscii(
- bOasis
- ? "com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter"
- : "com.sun.star.comp.Writer.XMLAutotextEventsImporter"));
+ OUString sFilterComponent = bOasis
+ ? OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter"))
+ : OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Writer.XMLAutotextEventsImporter"));
uno::Reference< xml::sax::XDocumentHandler > xFilter(
xServiceFactory->createInstanceWithArguments(
sFilterComponent, aFilterArguments),
@@ -337,7 +334,7 @@ sal_uLong SwXMLTextBlocks::GetBlockText( const String& rShort, String& rText )
uno::Reference < io::XStream > xContents = xRoot->openStreamElement( aStreamName, embed::ElementModes::READ );
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
- ASSERT( xServiceFactory.is(), "XMLReader::Read: got no service manager" );
+ OSL_ENSURE( xServiceFactory.is(), "XMLReader::Read: got no service manager" );
if( !xServiceFactory.is() )
{
// Throw an exception ?
@@ -349,8 +346,8 @@ sal_uLong SwXMLTextBlocks::GetBlockText( const String& rShort, String& rText )
// get parser
uno::Reference< XInterface > xXMLParser = xServiceFactory->createInstance(
- OUString::createFromAscii("com.sun.star.xml.sax.Parser") );
- ASSERT( xXMLParser.is(),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) );
+ OSL_ENSURE( xXMLParser.is(),
"XMLReader::Read: com.sun.star.xml.sax.Parser service missing" );
if( !xXMLParser.is() )
{
@@ -388,7 +385,7 @@ sal_uLong SwXMLTextBlocks::GetBlockText( const String& rShort, String& rText )
}
catch ( uno::Exception& )
{
- ASSERT( sal_False, "Tried to open non-existent folder or stream!");
+ OSL_ENSURE( sal_False, "Tried to open non-existent folder or stream!");
}
return n;
@@ -410,7 +407,7 @@ sal_uLong SwXMLTextBlocks::PutBlockText( const String& rShort, const String& ,
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
- ASSERT( xServiceFactory.is(),
+ OSL_ENSURE( xServiceFactory.is(),
"XMLReader::Read: got no service manager" );
if( !xServiceFactory.is() )
{
@@ -490,7 +487,7 @@ void SwXMLTextBlocks::ReadInfo( void )
{
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
- ASSERT( xServiceFactory.is(),
+ OSL_ENSURE( xServiceFactory.is(),
"XMLReader::Read: got no service manager" );
if( !xServiceFactory.is() )
{
@@ -505,8 +502,8 @@ void SwXMLTextBlocks::ReadInfo( void )
// get parser
uno::Reference< XInterface > xXMLParser = xServiceFactory->createInstance(
- OUString::createFromAscii("com.sun.star.xml.sax.Parser") );
- ASSERT( xXMLParser.is(),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")));
+ OSL_ENSURE( xXMLParser.is(),
"XMLReader::Read: com.sun.star.xml.sax.Parser service missing" );
if( !xXMLParser.is() )
{
@@ -588,9 +585,7 @@ void SwXMLTextBlocks::WriteInfo( void )
uno::Reference<xml::sax::XDocumentHandler> xHandler(xWriter, uno::UNO_QUERY);
- // #110680#
- // SwXMLBlockListExport aExp(*this, OUString::createFromAscii(XMLN_BLOCKLIST), xHandler);
- SwXMLBlockListExport aExp( xServiceFactory, *this, OUString::createFromAscii(XMLN_BLOCKLIST), xHandler);
+ SwXMLBlockListExport aExp( xServiceFactory, *this, OUString(RTL_CONSTASCII_USTRINGPARAM(XMLN_BLOCKLIST)), xHandler);
aExp.exportDoc( XML_BLOCK_LIST );
@@ -622,7 +617,7 @@ sal_uLong SwXMLTextBlocks::SetMacroTable(
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
- ASSERT( xServiceFactory.is(),
+ OSL_ENSURE( xServiceFactory.is(),
"XML autotext event write:: got no service manager" );
if( !xServiceFactory.is() )
return ERR_SWG_WRITE_ERROR;
@@ -630,7 +625,7 @@ sal_uLong SwXMLTextBlocks::SetMacroTable(
// Get model
uno::Reference< lang::XComponent > xModelComp(
pDoc->GetDocShell()->GetModel(), UNO_QUERY );
- ASSERT( xModelComp.is(), "XMLWriter::Write: got no model" );
+ OSL_ENSURE( xModelComp.is(), "XMLWriter::Write: got no model" );
if( !xModelComp.is() )
return ERR_SWG_WRITE_ERROR;
@@ -664,9 +659,9 @@ sal_uLong SwXMLTextBlocks::SetMacroTable(
// get XML writer
uno::Reference< io::XActiveDataSource > xSaxWriter(
xServiceFactory->createInstance(
- OUString::createFromAscii("com.sun.star.xml.sax.Writer") ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer")) ),
UNO_QUERY );
- ASSERT( xSaxWriter.is(), "can't instantiate XML writer" );
+ OSL_ENSURE( xSaxWriter.is(), "can't instantiate XML writer" );
if( xSaxWriter.is() )
{
@@ -684,15 +679,15 @@ sal_uLong SwXMLTextBlocks::SetMacroTable(
aParams[0] <<= xDocHandler;
aParams[1] <<= xEvents;
+
// get filter component
+ OUString sFilterComponent = bOasis
+ ? OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Writer.XMLOasisAutotextEventsExporter"))
+ : OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Writer.XMLAutotextEventsExporter"));
uno::Reference< document::XExporter > xExporter(
xServiceFactory->createInstanceWithArguments(
- OUString::createFromAscii(
- bOasis
- ? "com.sun.star.comp.Writer.XMLOasisAutotextEventsExporter"
- : "com.sun.star.comp.Writer.XMLAutotextEventsExporter"),
- aParams), UNO_QUERY);
- ASSERT( xExporter.is(),
+ sFilterComponent, aParams), UNO_QUERY);
+ OSL_ENSURE( xExporter.is(),
"can't instantiate export filter component" );
if( xExporter.is() )
{
@@ -739,3 +734,4 @@ sal_uLong SwXMLTextBlocks::SetMacroTable(
return nRes;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx
index 3c0409b764cc..f673905dab26 100644
--- a/sw/source/core/swg/swblocks.cxx
+++ b/sw/source/core/swg/swblocks.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,9 +33,7 @@
#include <sfx2/docfilt.hxx>
#include <sot/storage.hxx>
#include <tools/urlobj.hxx>
-#ifndef SVTOOLS_FSTATHELPER_HXX
#include <svl/fstathelper.hxx>
-#endif
#include <svl/macitem.hxx>
#include <unotools/charclass.hxx>
#include <frmfmt.hxx>
@@ -46,14 +45,10 @@
#include <ndtxt.hxx>
#include <mdiexp.hxx> // Progress
#include <SwXMLTextBlocks.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <swunohelper.hxx>
-#ifndef _STATSTR_HRC
#include <statstr.hrc>
-#endif
#include <swerror.h>
SV_IMPL_OP_PTRARR_SORT( SwBlockNames, SwBlockName* );
@@ -266,8 +261,6 @@ SwTextBlocks::SwTextBlocks( const String& rFile )
String sFileName = aObj.GetMainURL( INetURLObject::NO_DECODE );
switch( SwImpBlocks::GetFileType( rFile ) )
{
- //case SWBLK_SW2: pImp = new Sw2TextBlocks( sFileName ); break;
- //case SWBLK_SW3: pImp = new Sw3TextBlocks( sFileName ); break;
case SWBLK_XML: pImp = new SwXMLTextBlocks( sFileName ); break;
case SWBLK_NO_FILE: pImp = new SwXMLTextBlocks( sFileName ); break;
}
@@ -305,156 +298,6 @@ sal_Bool SwTextBlocks::IsOld() const
}
-/*
-sal_uLong SwTextBlocks::ConvertToNew()
-{
- // Wir nehmen die aktuelle Datei, benennen diese in .BAK um
- // und kreieren den neuen Storage
- if( IsOld() )
- {
- // Erst mal muessen wir die Datei freigeben
- short nType = pImp->GetFileType();
- Sw2TextBlocks *pTwo = NULL;
- Sw3TextBlocks *pThree = NULL;
- SwImpBlocks *pOld = NULL;
-
- pImp->nCur = (sal_uInt16) -1;
- String aName( pImp->aFile );
- delete pImp; pImp = NULL;
- // Jetzt wird umbenannt
- INetURLObject aOldFull( aName );
- INetURLObject aNewFull( aName );
-
- aOldFull.SetExtension( String::CreateFromAscii("bak") );
- String aOld( aOldFull.GetMainURL( INetURLObject::NO_DECODE ) );
- String aNew( aNewFull.GetMainURL( INetURLObject::NO_DECODE ) );
-
- sal_Bool bError = !SWUnoHelper::UCB_CopyFile( aNew, aOld, sal_True );
- if( bError )
- {
- if (nType == SWBLK_SW2)
- pImp = new Sw2TextBlocks( aOld );
- else
- pImp = new Sw3TextBlocks( aOld );
- return nErr = ERR_SWG_CANNOT_WRITE;
- }
-
- // Die Datei ist erfolgreich umbenannt. Jetzt wird der Storage
- // aufgesetzt
- if (nType == SWBLK_SW2)
- pOld = pTwo = new Sw2TextBlocks( aOld );
- else
- pOld = pThree = new Sw3TextBlocks( aOld );
- SwXMLTextBlocks* pNew = new SwXMLTextBlocks( aName );
- pNew->SetName ( pOld->GetName());
- // Wir kopieren den Doc-Ptr in das alte System
- // den alten SvPersist heben wir uns aber auf,
- // da dieser die ganze Zeit leben bleibt
- // und lesen die Dateivorlagen erneut ein
- SvPersist* pPersist2 = pOld->pDoc->GetPersist();
- if (SWBLK_SW2 == nType )
- {
- delete pOld->pDoc;
- pOld->pDoc = pNew->pDoc;nLinkCt
- nErr = pTwo->LoadDoc();
- }
- else
- {
- nErr = pThree->OpenFile ( sal_True );
- // Within this call, Sw3IoImp::SetDoc calls RemoveLink
- // on the old document, and deletes it if the
- // ref count is now zero
- pThree->SetDoc ( pNew->pDoc );
- pOld->pDoc->AddLink();
- }
- if( !nErr && 0 == ( nErr = pNew->OpenFile( sal_False )) )
- {
- nErr = pNew->SetConvertMode( sal_True );
- // jetzt werden die Bausteine einfach umkopiert!
- if( !nErr )
- {
- if (SWBLK_SW2 == nType)
- pTwo->StatLineStartPercent();
- sal_uInt16 nCount = pOld->GetCount();
- for( sal_uInt16 i = 0; i < nCount; i++ )
- {
- pNew->ClearDoc();
- String aShort( pOld->GetShortName( i ) );
- String aLong( pOld->GetLongName( i ) );
- pNew->AddName( aShort, aLong );
- if ( SWBLK_SW3 == nType && pThree->IsOnlyTextBlock(aShort) )
- {
- String sText;
- pThree->GetText( aShort, sText );
- pNew->PutText( aShort, aLong, sText );
- }
- else
- {
- if (SWBLK_SW2 == nType )
- {
- // I think this is how it should work (!!!!!!) mtg
- pNew->pDoc->SetPersist( pPersist2 );
- }
- nErr = pOld->GetDocForConversion( i );
- if( nErr )
- break;
- nErr = pNew->BeginPutDoc( aShort, aLong );
- if( nErr )
- break;
- nErr = pNew->PutDoc();
- if( nErr )
- break;
- }
-
- // convert macros, too
- SvxMacroTableDtor aMacroTable;
- pOld->GetMacroTable( i, aMacroTable, sal_True );
- pNew->SetMacroTable( i, aMacroTable, sal_True );
-
- if (SWBLK_SW2 == nType )
- pNew->pDoc->SetPersist( 0 );
- }
- if (SWBLK_SW2 == nType )
- ::EndProgress( pOld->pDoc->GetDocShell() );
- }
- if( !nErr )
- nErr = pNew->SetConvertMode( sal_False );
- }
- if ( SWBLK_SW3 == nType )
- {
- pThree->CloseFile();
- }
- else
- {
- // Haben wir es geschafft?
- pOld->pDoc = NULL;
- }
- pNew->ClearDoc();
- if( !nErr )
- {
- delete pOld;
- pImp = pNew;
- SWUnoHelper::UCB_DeleteFile( aOld );
- pNew->MakeBlockList();
- }
- else
- {
- delete pOld; delete pNew;
- SWUnoHelper::UCB_DeleteFile( aNew );
- SWUnoHelper::UCB_CopyFile( aOld, aNew, sal_True );
- if ( SWBLK_SW2 == nType )
- pImp = new Sw2TextBlocks( aOld );
- else
- pImp = new Sw3TextBlocks( aOld );
- }
- pNew->CloseFile();
- FStatHelper::GetModifiedDateTimeOfFile( aNew,
- &pImp->aDateModified, &pImp->aTimeModified );
- }
- return nErr;
-} */
-
-
sal_uInt16 SwTextBlocks::GetCount() const
{
return pImp ? pImp->GetCount() : 0;
@@ -527,7 +370,7 @@ sal_uInt16 SwTextBlocks::Rename( sal_uInt16 n, const String* s, const String* l
aLong = *l;
if( !aNew.Len() )
{
- ASSERT( !this, "Kein Kurzname in Rename angegeben" );
+ OSL_ENSURE( !this, "Kein Kurzname in Rename angegeben" );
nErr = ERR_SWG_INTERNAL_ERROR; return (sal_uInt16) -1;
}
@@ -761,7 +604,7 @@ sal_Bool SwTextBlocks::IsOnlyTextBlock( const String& rShort ) const
return IsOnlyTextBlock( nIdx );
}
- ASSERT( !this, "ungueltiger Name" );
+ OSL_ENSURE( !this, "ungueltiger Name" );
return sal_False;
}
@@ -796,9 +639,6 @@ void SwTextBlocks::EndPutMuchBlockEntries()
pImp->PutMuchEntries( sal_False );
}
-/*-- 20.09.2004 10:25:33---------------------------------------------------
-
- -----------------------------------------------------------------------*/
String SwTextBlocks::GetBaseURL() const
{
String sRet;
@@ -806,9 +646,7 @@ String SwTextBlocks::GetBaseURL() const
sRet = pImp->GetBaseURL();
return sRet;
}
-/*-- 20.09.2004 10:25:33---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwTextBlocks::SetBaseURL( const String& rURL )
{
if(pImp)
@@ -816,3 +654,4 @@ void SwTextBlocks::SetBaseURL( const String& rURL )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index 1ec108ca1deb..26ca86474869 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,15 +49,11 @@
#include <editeng/protitem.hxx>
#include <swtblfmt.hxx>
-#ifndef DBG_UTIL
-#define CHECK_TABLE(t)
-#else
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
#define CHECK_TABLE(t) (t).CheckConsistency();
#else
#define CHECK_TABLE(t)
#endif
-#endif
// ---------------------------------------------------------------
@@ -134,7 +131,7 @@ void lcl_CheckMinMax( long& rMin, long& rMax, const SwTableLine& rLine, sal_uInt
++nCheck;
if( rLine.GetTabBoxes().Count() < nCheck )
{ // robust
- ASSERT( false, "Box out of table line" );
+ OSL_ENSURE( false, "Box out of table line" );
nCheck = rLine.GetTabBoxes().Count();
}
@@ -143,7 +140,7 @@ void lcl_CheckMinMax( long& rMin, long& rMax, const SwTableLine& rLine, sal_uInt
for( sal_uInt16 nCurrBox = 0; nCurrBox < nCheck; ++nCurrBox )
{
SwTableBox* pBox = rLine.GetTabBoxes()[nCurrBox];
- ASSERT( pBox, "Missing table box" );
+ OSL_ENSURE( pBox, "Missing table box" );
nWidth = pBox->GetFrmFmt()->GetFrmSize().GetWidth();
nNew += nWidth;
}
@@ -177,12 +174,12 @@ long lcl_Box2LeftBorder( const SwTableBox& rBox )
for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = rLine.GetTabBoxes()[nCurrBox];
- ASSERT( pBox, "Missing table box" );
+ OSL_ENSURE( pBox, "Missing table box" );
if( pBox == &rBox )
return nLeft;
nLeft += pBox->GetFrmFmt()->GetFrmSize().GetWidth();
}
- ASSERT( false, "Box not found in own upper?" );
+ OSL_ENSURE( false, "Box not found in own upper?" );
return nLeft;
}
@@ -211,15 +208,15 @@ SwTableBox* lcl_LeftBorder2Box( long nLeft, const SwTableLine* pLine )
for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
- ASSERT( pBox, "Missing table box" );
+ OSL_ENSURE( pBox, "Missing table box" );
if( nCurrLeft >= nLeft && pBox->GetFrmFmt()->GetFrmSize().GetWidth() )
{
- ASSERT( nCurrLeft == nLeft, "Wrong box found" );
+ OSL_ENSURE( nCurrLeft == nLeft, "Wrong box found" );
return pBox;
}
nCurrLeft += pBox->GetFrmFmt()->GetFrmSize().GetWidth();
}
- ASSERT( false, "Didn't found wished box" );
+ OSL_ENSURE( false, "Didn't found wished box" );
return 0;
}
@@ -257,7 +254,7 @@ void lcl_ChangeRowSpan( const SwTable& rTable, const long nDiff,
{
if( !nDiff || nRowIdx >= rTable.GetTabLines().Count() )
return;
- ASSERT( !bSingle || nDiff > 0, "Don't set bSingle when deleting lines!" );
+ OSL_ENSURE( !bSingle || nDiff > 0, "Don't set bSingle when deleting lines!" );
bool bGoOn;
// nDistance is the distance between the current row and the critical row,
// e.g. the deleted rows or the inserted rows.
@@ -326,7 +323,7 @@ void lcl_ChangeRowSpan( const SwTable& rTable, const long nDiff,
SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
{
- ASSERT( bNewModel, "Don't call me for old tables" );
+ OSL_ENSURE( bNewModel, "Don't call me for old tables" );
if( !aLines.Count() )
return 0;
const SwNode* pStartNd = rPam.Start()->nNode.GetNode().FindTableBoxStartNode();
@@ -341,12 +338,12 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
for( sal_uInt16 nRow = 0; nFound < 2 && nRow < nLines; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
- ASSERT( pLine, "Missing table line" );
+ OSL_ENSURE( pLine, "Missing table line" );
sal_uInt16 nCols = pLine->GetTabBoxes().Count();
for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCol];
- ASSERT( pBox, "Missing table box" );
+ OSL_ENSURE( pBox, "Missing table box" );
if( nFound )
{
if( pBox->GetSttNd() == pEndNd )
@@ -381,7 +378,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
for( sal_uInt16 nRow = nTop; nRow <= nBottom && bOkay; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
- ASSERT( pLine, "Missing table line" );
+ OSL_ENSURE( pLine, "Missing table line" );
SwSelBoxes *pBoxes = new SwSelBoxes();
long nLeft = 0;
long nRight = 0;
@@ -390,7 +387,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
- ASSERT( pBox, "Missing table box" );
+ OSL_ENSURE( pBox, "Missing table box" );
nLeft = nRight;
nRight += pBox->GetFrmFmt()->GetFrmSize().GetWidth();
nRowSpan = pBox->getRowSpan();
@@ -624,7 +621,7 @@ long lcl_InsertPosition( SwTable &rTable, std::vector<sal_uInt16>& rInsPos,
nAddWidth += nWidth;
sal_uInt16 nCurrBox = pLine->GetTabBoxes().C40_GETPOS(SwTableBox, pBox );
sal_uInt16 nCurrLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pLine );
- ASSERT( nCurrLine != USHRT_MAX, "Time to say Good-Bye.." );
+ OSL_ENSURE( nCurrLine != USHRT_MAX, "Time to say Good-Bye.." );
if( rInsPos[ nCurrLine ] == USHRT_MAX )
{
rInsPos[ nCurrLine ] = nCurrBox;
@@ -695,7 +692,6 @@ sal_Bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
_FndBox aFndBox( 0, 0 );
aFndBox.SetTableLines( rBoxes, *this );
aFndBox.DelFrms( *this );
-// aFndBox.SaveChartData( *this );
SwTableNode* pTblNd = GetTableNode();
std::vector<SwTableBoxFmt*> aInsFormat( nCnt, 0 );
@@ -706,7 +702,7 @@ sal_Bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
{
SwTableLine* pLine = aLines[ i ];
sal_uInt16 nInsPos = aInsPos[i];
- ASSERT( nInsPos != USHRT_MAX, "Didn't found insert position" );
+ OSL_ENSURE( nInsPos != USHRT_MAX, "Didn't found insert position" );
SwTableBox* pBox = pLine->GetTabBoxes()[ nInsPos ];
if( bBehind )
++nInsPos;
@@ -776,14 +772,13 @@ sal_Bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
}
aFndBox.MakeFrms( *this );
-// aFndBox.RestoreChartData( *this );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
{
const SwTableBoxes &rTabBoxes = aLines[0]->GetTabBoxes();
long nNewWidth = 0;
for( sal_uInt16 i = 0; i < rTabBoxes.Count(); ++i )
nNewWidth += rTabBoxes[i]->GetFrmFmt()->GetFrmSize().GetWidth();
- ASSERT( nNewWidth > 0, "Very small" );
+ OSL_ENSURE( nNewWidth > 0, "Very small" );
}
#endif
CHECK_TABLE( *this )
@@ -990,7 +985,7 @@ void SwTable::_FindSuperfluousRows( SwSelBoxes& rBoxes,
for( sal_uInt16 nRow = nFirstLn; nRow <= nLastLn; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
- ASSERT( pLine, "Missing table line" );
+ OSL_ENSURE( pLine, "Missing table line" );
sal_uInt16 nCols = pLine->GetTabBoxes().Count();
bool bSuperfl = true;
for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
@@ -1075,7 +1070,7 @@ SwTableBox& SwTableBox::FindEndOfRowSpan( const SwTable& rTable, sal_uInt16 nMax
void lcl_getAllMergedBoxes( const SwTable& rTable, SwSelBoxes& rBoxes, SwTableBox& rBox )
{
SwTableBox* pBox = &rBox;
- ASSERT( pBox == &rBox.FindStartOfRowSpan( rTable, USHRT_MAX ), "Not a master box" );
+ OSL_ENSURE( pBox == &rBox.FindStartOfRowSpan( rTable, USHRT_MAX ), "Not a master box" );
rBoxes.Insert( pBox );
if( pBox->getRowSpan() == 1 )
return;
@@ -1163,7 +1158,7 @@ void lcl_FillSelBoxes( SwSelBoxes &rBoxes, SwTableLine &rLine )
void SwTable::InsertSpannedRow( SwDoc* pDoc, sal_uInt16 nRowIdx, sal_uInt16 nCnt )
{
CHECK_TABLE( *this )
- ASSERT( nCnt && nRowIdx < GetTabLines().Count(), "Wrong call of InsertSpannedRow" );
+ OSL_ENSURE( nCnt && nRowIdx < GetTabLines().Count(), "Wrong call of InsertSpannedRow" );
SwSelBoxes aBoxes;
SwTableLine& rLine = *GetTabLines()[ nRowIdx ];
lcl_FillSelBoxes( aBoxes, rLine );
@@ -1218,7 +1213,7 @@ void lcl_SophisticatedFillLineIndices( SwLineOffsetArray &rArr,
for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{ // Collect all end line indices and the row spans
const SwTableBox &rBox = rBoxes[ i ]->FindStartOfRowSpan( rTable );
- ASSERT( rBox.getRowSpan() > 0, "Didn't I say 'StartOfRowSpan' ??" )
+ OSL_ENSURE( rBox.getRowSpan() > 0, "Didn't I say 'StartOfRowSpan' ??" );
if( nCnt > rBox.getRowSpan() )
{
const SwTableLine *pLine = rBox.GetUpper();
@@ -1254,7 +1249,7 @@ void lcl_SophisticatedFillLineIndices( SwLineOffsetArray &rArr,
aLnOfs.second < pCurr->second )
aLnOfs.second = pCurr->second; // Found a smaller row span
}
- ASSERT( aLnOfs.second < nCnt, "Clean-up failed" )
+ OSL_ENSURE( aLnOfs.second < nCnt, "Clean-up failed" );
aLnOfs.second = nCnt - aLnOfs.second; // the number of rows to insert
rArr.insert( rArr.end(),
SwLineOffset( aLnOfs.first - nSum, aLnOfs.second ) );
@@ -1317,7 +1312,7 @@ sal_uInt16 lcl_CalculateSplitLineHeights( SwSplitLines &rCurr, SwSplitLines &rNe
for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{ // Collect all pairs (start+end) of line indices to split
const SwTableBox &rBox = rBoxes[ i ]->FindStartOfRowSpan( rTable );
- ASSERT( rBox.getRowSpan() > 0, "Didn't I say 'StartOfRowSpan' ??" )
+ OSL_ENSURE( rBox.getRowSpan() > 0, "Didn't I say 'StartOfRowSpan' ??" );
const SwTableLine *pLine = rBox.GetUpper();
const sal_uInt16 nStart = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine );
const sal_uInt16 nEnd = sal_uInt16( rBox.getRowSpan() + nStart - 1 );
@@ -1470,7 +1465,7 @@ sal_Bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
std::set< sal_uInt16> aIndices;
for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
- ASSERT( rBoxes[i]->getRowSpan() != 1, "Forgot to split?" )
+ OSL_ENSURE( rBoxes[i]->getRowSpan() != 1, "Forgot to split?" );
if( rBoxes[i]->getRowSpan() > 1 )
aIndices.insert( i );
}
@@ -1503,7 +1498,6 @@ sal_Bool SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
_FndBox aFndBox( 0, 0 );
aFndBox.SetTableLines( rBoxes, *this );
aFndBox.DelFrms( *this );
-// aFndBox.SaveChartData( *this );
bRet = true;
SwTableLine *pLine = GetTabLines()[ nRowIdx ];
@@ -1541,7 +1535,6 @@ sal_Bool SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
lcl_ChangeRowSpan( *this, nCnt, --nRowIdx, true );
//Layout update
aFndBox.MakeFrms( *this );
-// aFndBox.RestoreChartData( *this );
}
CHECK_TABLE( *this )
}
@@ -1567,14 +1560,14 @@ void SwTable::PrepareDelBoxes( const SwSelBoxes& rBoxes )
long nLeft = lcl_Box2LeftBorder( *pBox );
SwTableLine *pLine = pBox->GetUpper();
sal_uInt16 nLinePos = GetTabLines().C40_GETPOS(SwTableLine, pLine);
- ASSERT( nLinePos < USHRT_MAX, "Box/table mismatch" )
+ OSL_ENSURE( nLinePos < USHRT_MAX, "Box/table mismatch" );
if( nRowSpan > 1 )
{
if( ++nLinePos < GetTabLines().Count() )
{
pLine = GetTabLines()[ nLinePos ];
pBox = lcl_LeftBorder2Box( nLeft, pLine );
- ASSERT( pBox, "RowSpan irritation I" )
+ OSL_ENSURE( pBox, "RowSpan irritation I" );
if( pBox )
pBox->setRowSpan( --nRowSpan );
}
@@ -1585,7 +1578,7 @@ void SwTable::PrepareDelBoxes( const SwSelBoxes& rBoxes )
{
pLine = GetTabLines()[ --nLinePos ];
pBox = lcl_LeftBorder2Box( nLeft, pLine );
- ASSERT( pBox, "RowSpan irritation II" )
+ OSL_ENSURE( pBox, "RowSpan irritation II" );
if( pBox )
{
nRowSpan = pBox->getRowSpan();
@@ -1622,7 +1615,7 @@ void lcl_SearchSelBox( const SwTable &rTable, SwSelBoxes& rBoxes, long nMin, lon
for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = rLine.GetTabBoxes()[nCurrBox];
- ASSERT( pBox, "Missing table box" );
+ OSL_ENSURE( pBox, "Missing table box" );
long nWidth = pBox->GetFrmFmt()->GetFrmSize().GetWidth();
nRight += nWidth;
if( nRight > nMin )
@@ -1635,7 +1628,6 @@ void lcl_SearchSelBox( const SwTable &rTable, SwSelBoxes& rBoxes, long nMin, lon
bAdd = nLeft <= nMid || nRight - nMax < nMax - nLeft;
long nRowSpan = pBox->getRowSpan();
if( bAdd &&
- //( bColumn || nRowSpan > 0 ) &&
( !bChkProtected ||
!pBox->GetFrmFmt()->GetProtect().IsCntntProtected() ) )
{
@@ -1662,7 +1654,7 @@ void lcl_SearchSelBox( const SwTable &rTable, SwSelBoxes& rBoxes, long nMin, lon
void SwTable::CreateSelection( const SwPaM& rPam, SwSelBoxes& rBoxes,
const SearchType eSearch, bool bChkProtected ) const
{
- ASSERT( bNewModel, "Don't call me for old tables" );
+ OSL_ENSURE( bNewModel, "Don't call me for old tables" );
if( !aLines.Count() )
return;
const SwNode* pStartNd = rPam.GetPoint()->nNode.GetNode().FindTableBoxStartNode();
@@ -1700,12 +1692,12 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
for( sal_uInt16 nRow = 0; nFound < 2 && nRow < nLines; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
- ASSERT( pLine, "Missing table line" );
+ OSL_ENSURE( pLine, "Missing table line" );
sal_uInt16 nCols = pLine->GetTabBoxes().Count();
for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCol];
- ASSERT( pBox, "Missing table box" );
+ OSL_ENSURE( pBox, "Missing table box" );
if( pBox->GetSttNd() == pEndNd || pBox->GetSttNd() == pStartNd )
{
if( !bChkProtected ||
@@ -1745,12 +1737,12 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
for( sal_uInt16 nRow = nTop; nRow <= nBottom; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
- ASSERT( pLine, "Missing table line" );
+ OSL_ENSURE( pLine, "Missing table line" );
sal_uInt16 nCount = pLine->GetTabBoxes().Count();
for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
- ASSERT( pBox, "Missing table box" );
+ OSL_ENSURE( pBox, "Missing table box" );
if( pBox->getRowSpan() > 0 && ( !bChkProtected ||
!pBox->GetFrmFmt()->GetProtect().IsCntntProtected() ) )
rBoxes.Insert( pBox );
@@ -1798,47 +1790,6 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
lcl_SearchSelBox( *this, rBoxes, nMin, nMax, *aLines[i],
bChkProtected, bColumn );
}
- /* if( nTop + 1 < nBottom )
- {
- long nInnerMin = nUpperMin < nLowerMin ? nLowerMin : nUpperMin;
- long nInnerMax = nUpperMax < nLowerMax ? nUpperMax : nLowerMax;
- for( sal_uInt16 i = nTop + 1; i < nBottom; ++i )
- lcl_SearchSelBox( *this, rBoxes, nInnerMin, nInnerMax, *aLines[i],
- bChkProtected, bColumn );
- }
- if( bCombine ) // => nUpperMin == nLowerMin, nUpperMax == nLowerMax
- {
- if( nBottom > nTop )
- lcl_SearchSelBox( *this, rBoxes, nUpperMin, nUpperMax, *aLines[nTop],
- bChkProtected, bColumn );
- lcl_SearchSelBox( *this, rBoxes, nLowerMin, nLowerMax, *aLines[nBottom],
- bChkProtected, bColumn );
- }
- else if( aKeepBoxes.Count() )
- {
- long nMin = nUpperMin < nLowerMin ? nUpperMin : nLowerMin;
- long nMax = nUpperMax < nLowerMax ? nLowerMax : nUpperMax;
- SwSelBoxes aCandidates;
- for( sal_uInt16 i = nTop; i <= nBottom; ++i )
- lcl_SearchSelBox( *this, aCandidates, nMin, nMax, *aLines[i],
- bChkProtected, bColumn );
- sal_uInt16 nOld = 0, nNew = 0;
- while ( nOld < aKeepBoxes.Count() && nNew < aCandidates.Count() )
- {
- const SwTableBox* pPOld = *( aKeepBoxes.GetData() + nOld );
- SwTableBox* pPNew = *( aCandidates.GetData() + nNew );
- if( pPOld == pPNew )
- { // this box will stay
- rBoxes.Insert( pPNew );
- ++nOld;
- ++nNew;
- }
- else if( pPOld->GetSttIdx() < pPNew->GetSttIdx() )
- ++nOld;
- else
- ++nNew;
- }
- } */
if( bColumn )
{
for( sal_uInt16 i = nBottom + 1; i < nLines; ++i )
@@ -1853,7 +1804,7 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
void SwTable::ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax ) const
{
- ASSERT( bNewModel, "Don't call me for old tables" );
+ OSL_ENSURE( bNewModel, "Don't call me for old tables" );
rMin = 0;
rMax = 0;
if( !aLines.Count() || !rBoxes.Count() )
@@ -1865,12 +1816,12 @@ void SwTable::ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax
for( sal_uInt16 nRow = 0; nRow < nLineCnt && nBox < nBoxCnt; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
- ASSERT( pLine, "Missing table line" );
+ OSL_ENSURE( pLine, "Missing table line" );
sal_uInt16 nCols = pLine->GetTabBoxes().Count();
for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCol];
- ASSERT( pBox, "Missing table box" );
+ OSL_ENSURE( pBox, "Missing table box" );
if( pBox == rBoxes[nBox] )
{
lcl_CheckMinMax( rMin, rMax, *pLine, nCol, nBox == 0 );
@@ -1902,7 +1853,7 @@ void SwTable::ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax
*/
void SwTable::PrepareDeleteCol( long nMin, long nMax )
{
- ASSERT( bNewModel, "Don't call me for old tables" );
+ OSL_ENSURE( bNewModel, "Don't call me for old tables" );
if( !aLines.Count() || nMax < nMin )
return;
long nMid = nMin ? ( nMin + nMax ) / 2 : 0;
@@ -1973,9 +1924,9 @@ void SwTable::ExpandSelection( SwSelBoxes& rBoxes ) const
void SwTable::CheckRowSpan( SwTableLinePtr &rpLine, bool bUp ) const
{
- ASSERT( IsNewModel(), "Don't call me for old tables" );
+ OSL_ENSURE( IsNewModel(), "Don't call me for old tables" );
sal_uInt16 nLineIdx = GetTabLines().C40_GETPOS( SwTableLine, rpLine );
- ASSERT( nLineIdx < GetTabLines().Count(), "Start line out of range" );
+ OSL_ENSURE( nLineIdx < GetTabLines().Count(), "Start line out of range" );
bool bChange = true;
if( bUp )
{
@@ -2038,12 +1989,12 @@ SwSaveRowSpan::SwSaveRowSpan( SwTableBoxes& rBoxes, sal_uInt16 nSplitLn )
{
bool bDontSave = true; // nothing changed, nothing to save
sal_uInt16 nColCount = rBoxes.Count();
- ASSERT( nColCount, "Empty Table Line" )
+ OSL_ENSURE( nColCount, "Empty Table Line" );
mnRowSpans.resize( nColCount );
for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = rBoxes[nCurrCol];
- ASSERT( pBox, "Missing Table Box" );
+ OSL_ENSURE( pBox, "Missing Table Box" );
long nRowSp = pBox->getRowSpan();
mnRowSpans[ nCurrCol ] = nRowSp;
if( nRowSp < 0 )
@@ -2064,24 +2015,24 @@ void SwTable::RestoreRowSpan( const SwSaveRowSpan& rSave )
if( !IsNewModel() ) // for new model only
return;
sal_uInt16 nLineCount = GetTabLines().Count();
- ASSERT( rSave.mnSplitLine < nLineCount, "Restore behind last line?" )
+ OSL_ENSURE( rSave.mnSplitLine < nLineCount, "Restore behind last line?" );
if( rSave.mnSplitLine < nLineCount )
{
SwTableLine* pLine = GetTabLines()[rSave.mnSplitLine];
sal_uInt16 nColCount = pLine->GetTabBoxes().Count();
- ASSERT( nColCount, "Empty Table Line" )
- ASSERT( nColCount == rSave.mnRowSpans.size(), "Wrong row span store" )
+ OSL_ENSURE( nColCount, "Empty Table Line" );
+ OSL_ENSURE( nColCount == rSave.mnRowSpans.size(), "Wrong row span store" );
if( nColCount == rSave.mnRowSpans.size() )
{
for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrCol];
- ASSERT( pBox, "Missing Table Box" );
+ OSL_ENSURE( pBox, "Missing Table Box" );
long nRowSp = pBox->getRowSpan();
if( nRowSp != rSave.mnRowSpans[ nCurrCol ] )
{
- ASSERT( -nRowSp == rSave.mnRowSpans[ nCurrCol ], "Pardon me?!" )
- ASSERT( rSave.mnRowSpans[ nCurrCol ] < 0, "Pardon me?!" )
+ OSL_ENSURE( -nRowSp == rSave.mnRowSpans[ nCurrCol ], "Pardon me?!" );
+ OSL_ENSURE( rSave.mnRowSpans[ nCurrCol ] < 0, "Pardon me?!" );
pBox->setRowSpan( -nRowSp );
sal_uInt16 nLine = rSave.mnSplitLine;
@@ -2134,11 +2085,11 @@ void SwTable::CleanUpBottomRowSpan( sal_uInt16 nDelLines )
sal_uInt16 nLastLine = GetTabLines().Count()-1;
SwTableLine* pLine = GetTabLines()[nLastLine];
sal_uInt16 nColCount = pLine->GetTabBoxes().Count();
- ASSERT( nColCount, "Empty Table Line" )
+ OSL_ENSURE( nColCount, "Empty Table Line" );
for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrCol];
- ASSERT( pBox, "Missing Table Box" );
+ OSL_ENSURE( pBox, "Missing Table Box" );
long nRowSp = pBox->getRowSpan();
if( nRowSp < 0 )
nRowSp = -nRowSp;
@@ -2150,7 +2101,7 @@ void SwTable::CleanUpBottomRowSpan( sal_uInt16 nDelLines )
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
struct RowSpanCheck
{
@@ -2172,25 +2123,22 @@ void SwTable::CheckConsistency() const
{
SwTwips nWidth = 0;
SwTableLine* pLine = GetTabLines()[nCurrLine];
- ASSERT( pLine, "Missing Table Line" )
+ OSL_ENSURE( pLine, "Missing Table Line" );
sal_uInt16 nColCount = pLine->GetTabBoxes().Count();
- ASSERT( nColCount, "Empty Table Line" )
+ OSL_ENSURE( nColCount, "Empty Table Line" );
for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrCol];
- ASSERT( pBox, "Missing Table Box" );
+ OSL_ENSURE( pBox, "Missing Table Box" );
SwTwips nNewWidth = pBox->GetFrmFmt()->GetFrmSize().GetWidth() + nWidth;
long nRowSp = pBox->getRowSpan();
if( nRowSp < 0 )
{
- ASSERT( aIter != aRowSpanCells.end(), "Missing master box" )
-#ifdef DBG_UTIL
- //RowSpanCheck &rCheck = *aIter;
-#endif
- ASSERT( aIter->nLeft == nWidth && aIter->nRight == nNewWidth,
+ OSL_ENSURE( aIter != aRowSpanCells.end(), "Missing master box" );
+ OSL_ENSURE( aIter->nLeft == nWidth && aIter->nRight == nNewWidth,
"Wrong position/size of overlapped table box" );
--(aIter->nRowSpan);
- ASSERT( aIter->nRowSpan == -nRowSp, "Wrong row span value" );
+ OSL_ENSURE( aIter->nRowSpan == -nRowSp, "Wrong row span value" );
if( nRowSp == -1 )
{
std::list< RowSpanCheck >::iterator aEraseIter = aIter;
@@ -2202,7 +2150,7 @@ void SwTable::CheckConsistency() const
}
else if( nRowSp != 1 )
{
- ASSERT( nRowSp, "Zero row span?!" );
+ OSL_ENSURE( nRowSp, "Zero row span?!" );
RowSpanCheck aEntry;
aEntry.nLeft = nWidth;
aEntry.nRight = nNewWidth;
@@ -2213,117 +2161,16 @@ void SwTable::CheckConsistency() const
}
if( !nCurrLine )
nLineWidth = nWidth;
- ASSERT( nWidth == nLineWidth, "Different Line Widths" )
- ASSERT( nWidth == nTabSize, "Boxen der Line zu klein/gross" )
- ASSERT( nWidth >= 0 && nWidth <= USHRT_MAX, "Width out of range" )
- ASSERT( aIter == aRowSpanCells.end(), "Missing overlapped box" )
+ OSL_ENSURE( nWidth == nLineWidth, "Different Line Widths" );
+ OSL_ENSURE( nWidth == nTabSize, "Boxen der Line zu klein/gross" );
+ OSL_ENSURE( nWidth >= 0 && nWidth <= USHRT_MAX, "Width out of range" );
+ OSL_ENSURE( aIter == aRowSpanCells.end(), "Missing overlapped box" );
aIter = aRowSpanCells.begin();
}
bool bEmpty = aRowSpanCells.empty();
- ASSERT( bEmpty, "Open row span detected" )
+ OSL_ENSURE( bEmpty, "Open row span detected" );
}
#endif
-
-#ifdef FINDSTARTENDOFROWSPANCACHE
-/*
- * A small optimization for FindStartEndOfRowSpan START
- *
- * NOTE: Results of some measurement revealed that this cache
- * does not improve performance!
- */
-
-class SwFindRowSpanCache
-{
-private:
-
- struct SwFindRowSpanCacheObj
- {
- const SwTableBox* mpKeyBox;
- const SwTableBox* mpCacheBox;
- sal_uInt16 mnSteps;
- bool mbStart;
-
- SwFindRowSpanCacheObj( const SwTableBox& rKeyBox, const SwTableBox& rCacheBox, sal_uInt16 nSteps, bool bStart ) :
- mpKeyBox( &rKeyBox ), mpCacheBox( &rCacheBox ), mnSteps( nSteps ), mbStart( bStart ) {}
- };
-
- std::list< SwFindRowSpanCacheObj > aCache;
- bool mbUseCache;
- static SwFindRowSpanCache* mpFindRowSpanCache;
- SwFindRowSpanCache();
-
-public:
-
- static SwFindRowSpanCache& getSwFindRowSpanCache();
- const SwTableBox* FindCachedStartEndOfRowSpan( const SwTableBox& rKeyBox, sal_uInt16 nSteps, bool bStart );
- void SetCachedStartEndOfRowSpan( const SwTableBox& rKeyBox, const SwTableBox& rCacheBox, sal_uInt16 nSteps, bool bStart );
- void SetUseCache( bool bNew );
-};
-
-SwFindRowSpanCache* SwFindRowSpanCache::mpFindRowSpanCache = 0;
-SwFindRowSpanCache& SwFindRowSpanCache::getSwFindRowSpanCache()
-{
- if ( !mpFindRowSpanCache ) mpFindRowSpanCache = new SwFindRowSpanCache;
- return *mpFindRowSpanCache;
-}
-
-SwFindRowSpanCache::SwFindRowSpanCache() : mbUseCache( false )
-{
-}
-
-void SwFindRowSpanCache::SetUseCache( bool bNew )
-{
- mbUseCache = bNew; aCache.clear();
-}
-
-const SwTableBox* SwFindRowSpanCache::FindCachedStartEndOfRowSpan( const SwTableBox& rKeyBox,
- sal_uInt16 nSteps,
- bool bStart )
-{
- static nCallCount = 0;
- static nSuccessCount = 0;
- ++nCallCount;
-
- if ( !mbUseCache ) return 0;
-
- const SwTableBox* pRet = 0;
-
- std::list< SwFindRowSpanCacheObj >::const_iterator aIter;
- for ( aIter = aCache.begin(); aIter != aCache.end(); ++aIter )
- {
- if ( aIter->mpKeyBox == &rKeyBox &&
- aIter->mnSteps == nSteps &&
- aIter->mbStart == bStart )
- {
- pRet = aIter->mpCacheBox;
- ++nSuccessCount;
- break;
- }
- }
-
- return pRet;
-}
-
-const int FindBoxCacheSize = 2;
-
-void SwFindRowSpanCache::SetCachedStartEndOfRowSpan( const SwTableBox& rKeyBox,
- const SwTableBox& rCacheBox,
- sal_uInt16 nSteps,
- bool bStart )
-{
- if ( !mbUseCache ) return;
-
- const SwFindRowSpanCacheObj aNew( rKeyBox, rCacheBox, nSteps, bStart );
- aCache.push_front( aNew );
- if ( aCache.size() > FindBoxCacheSize )
- aCache.pop_back();
-}
-
-/*
- * A small optimization for FindStartEndOfRowSpan END
- */
-
-#endif
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 8f41fbe873a6..513154e57c85 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,10 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#ifdef WTC
-#define private public
-#endif
-
#include <ctype.h>
#include <float.h>
#include <hintids.hxx>
@@ -43,7 +40,6 @@
#include <sfx2/linkmgr.hxx>
#include <editeng/boxitem.hxx>
-
#include <fmtfsize.hxx>
#include <fmtornt.hxx>
#include <fmtpdsc.hxx>
@@ -73,15 +69,11 @@
#include <redline.hxx>
#include <list>
-#ifndef DBG_UTIL
-#define CHECK_TABLE(t)
-#else
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
#define CHECK_TABLE(t) (t).CheckConsistency();
#else
#define CHECK_TABLE(t)
#endif
-#endif
using namespace com::sun::star;
@@ -186,7 +178,7 @@ void SwTableBox::setDummyFlag( bool bDummy )
pImpl->setDummyFlag( bDummy );
}
-//JP 15.09.98: Bug 55741 - Tabs beibehalten (vorne und hinten)
+//JP 15.09.98: Bug 55741 - Keep tabs (front and rear)
String& lcl_TabToBlankAtSttEnd( String& rTxt )
{
sal_Unicode c;
@@ -220,12 +212,12 @@ void _InsTblBox( SwDoc* pDoc, SwTableNode* pTblNd,
SwTableBox* pBox,
sal_uInt16 nInsPos, sal_uInt16 nCnt )
{
- ASSERT( pBox->GetSttNd(), "Box ohne Start-Node" );
+ OSL_ENSURE( pBox->GetSttNd(), "Box ohne Start-Node" );
SwNodeIndex aIdx( *pBox->GetSttNd(), +1 );
SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode();
if( !pCNd )
pCNd = pDoc->GetNodes().GoNext( &aIdx );
- ASSERT( pCNd, "Box ohne ContentNode" );
+ OSL_ENSURE( pCNd, "Box ohne ContentNode" );
if( pCNd->IsTxtNode() )
{
@@ -267,9 +259,6 @@ void _InsTblBox( SwDoc* pDoc, SwTableNode* pTblNd,
|*
|* SwTable::SwTable()
|*
-|* Ersterstellung MA 09. Mar. 93
-|* Letzte Aenderung MA 05. May. 93
-|*
|*************************************************************************/
SwTable::SwTable( SwTableFmt* pFmt )
: SwClient( pFmt ),
@@ -280,7 +269,7 @@ SwTable::SwTable( SwTableFmt* pFmt )
bModifyLocked( sal_False ),
bNewModel( sal_True )
{
- // default Wert aus den Optionen setzen
+ // default value set in the options
eTblChgMode = (TblChgMode)GetTblChgDefaultMode();
}
@@ -307,7 +296,7 @@ SwTable::~SwTable()
if( refObj.Is() )
{
SwDoc* pDoc = GetFrmFmt()->GetDoc();
- if( !pDoc->IsInDtor() ) // dann aus der Liste entfernen
+ if( !pDoc->IsInDtor() ) // then remove from the list
pDoc->GetLinkManager().RemoveServer( &refObj );
refObj->Closed();
@@ -336,9 +325,6 @@ SwTable::~SwTable()
|*
|* SwTable::Modify()
|*
-|* Ersterstellung JP ??
-|* Letzte Aenderung MA 06. May. 93
-|*
|*************************************************************************/
inline void FmtInArr( SvPtrarr& rFmtArr, SwFmt* pBoxFmt )
{
@@ -409,7 +395,7 @@ void lcl_ModifyBoxes( SwTableBoxes &rBoxes, const long nOld,
}
}
else {
- ASSERT( false, "Rounding error" );
+ OSL_ENSURE( false, "Rounding error" );
}
nSum += nBox;
}
@@ -437,7 +423,7 @@ void SwTable::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
if ( !IsModifyLocked() )
{
- ASSERT( pOldSize && pOldSize->Which() == RES_FRM_SIZE &&
+ OSL_ENSURE( pOldSize && pOldSize->Which() == RES_FRM_SIZE &&
pNewSize && pNewSize->Which() == RES_FRM_SIZE,
"Kein Old oder New fuer FmtFrmSize-Modify der SwTable." );
AdjustWidths( pOldSize->GetWidth(), pNewSize->GetWidth() );
@@ -457,9 +443,6 @@ void SwTable::AdjustWidths( const long nOld, const long nNew )
|*
|* SwTable::GetTabCols()
|*
-|* Ersterstellung MA 04. May. 93
-|* Letzte Aenderung MA 30. Nov. 95
-|*
|*************************************************************************/
void lcl_RefreshHidden( SwTabCols &rToFill, sal_uInt16 nPos )
{
@@ -475,7 +458,7 @@ void lcl_RefreshHidden( SwTabCols &rToFill, sal_uInt16 nPos )
void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox,
const SwFrmFmt *pTabFmt, const sal_Bool bHidden,
- const FASTBOOL bRefreshHidden )
+ const bool bRefreshHidden )
{
const long nWish = pTabFmt->GetFrmSize().GetWidth();
const long nAct = rToFill.GetRight() - rToFill.GetLeft(); // +1 why?
@@ -578,7 +561,7 @@ void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox,
}
void lcl_ProcessBoxGet( const SwTableBox *pBox, SwTabCols &rToFill,
- const SwFrmFmt *pTabFmt, FASTBOOL bRefreshHidden )
+ const SwFrmFmt *pTabFmt, bool bRefreshHidden )
{
if ( pBox->GetTabLines().Count() )
{
@@ -620,7 +603,7 @@ void SwTable::GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
//Array aktualisiert.
if ( bRefreshHidden )
{
- //Korrekturen entfernen
+ // remove corrections
sal_uInt16 i;
for ( i = 0; i < rToFill.Count(); ++i )
{
@@ -711,9 +694,6 @@ void SwTable::GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
|*
|* SwTable::SetTabCols()
|*
-|* Ersterstellung MA 04. May. 93
-|* Letzte Aenderung MA 26. Aug. 98
-|*
|*************************************************************************/
//Struktur zur Parameteruebergabe
struct Parm
@@ -726,7 +706,7 @@ struct Parm
SwShareBoxFmts aShareFmts;
Parm( const SwTabCols &rN, const SwTabCols &rO ) :
- rNew( rN ), rOld( rO ), aBoxArr( 10, 1 ) {}
+ rNew( rN ), rOld( rO ), nNewWish(0), nOldWish(0), aBoxArr( 10, 1 ){}
};
inline sal_Bool BoxInArr( SvPtrarr& rArr, SwTableBox* pBox )
{
@@ -831,11 +811,6 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
nRightDiff = (long)rParm.rNew[nLeftPos] -
(long)rParm.rOld[nLeftPos];
}
-//MA 11. Feb. 99: #61577# 0 sollte doch gerade richtig sein, weil die
-//Kante doch schon in SetTabCols() korrigiert wurde.
-// else
-// nRightDiff = (long)rParm.rNew.GetRight() -
-// (long)rParm.rOld.GetRight();
}
if( pBox->getRowSpan() == 1 )
@@ -937,8 +912,6 @@ void lcl_AdjustBox( SwTableBox *pBox, const long nDiff, Parm &rParm )
//Groesse der Box anpassen.
SwFmtFrmSize aFmtFrmSize( pBox->GetFrmFmt()->GetFrmSize() );
aFmtFrmSize.SetWidth( aFmtFrmSize.GetWidth() + nDiff );
-//#30009# if ( aFmtFrmSize.GetWidth() < 0 )
-// aFmtFrmSize.SetWidth( -aFmtFrmSize.GetWidth() );
rParm.aShareFmts.SetSize( *pBox, aFmtFrmSize );
}
@@ -956,7 +929,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
Parm aParm( rNew, rOld );
- ASSERT( rOld.Count() == rNew.Count(), "Columnanzahl veraendert.");
+ OSL_ENSURE( rOld.Count() == rNew.Count(), "Columnanzahl veraendert.");
//Raender verarbeiten. Groesse der Tabelle und ein paar Boxen mussen
//angepasst werden. Bei der Groesseneinstellung darf allerdings das
@@ -994,7 +967,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
else if(!bLeftDist && rNew.GetRight() + nShRight < rNew.GetRightMax())
aOri.SetHoriOrient( text::HoriOrientation::LEFT );
else
- aOri.SetHoriOrient( text::HoriOrientation::NONE );
+ aOri.SetHoriOrient( text::HoriOrientation::LEFT_AND_WIDTH );
}
pFmt->SetFmtAttr( aOri );
}
@@ -1091,7 +1064,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
{
// steht im tblrwcl.cxx
extern void _CheckBoxWidth( const SwTableLine&, SwTwips );
@@ -1198,7 +1171,7 @@ static void lcl_CalcNewWidths( std::list<sal_uInt16> &rSpanPos, ChangeList& rCha
sal_uInt16 nPos = (sal_uInt16)nSum;
while( pCurr != rChanges.end() && pCurr->first < nPos )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uInt16 nTemp = pCurr->first;
nTemp = pCurr->second;
#endif
@@ -1298,7 +1271,7 @@ static void lcl_CalcNewWidths( std::list<sal_uInt16> &rSpanPos, ChangeList& rCha
void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
const SwTabCols &rOld, const SwTableBox *pStart, sal_Bool bCurRowOnly )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
static int nCallCount = 0;
++nCallCount;
#endif
@@ -1407,9 +1380,6 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
|* const SwTableBox* SwTable::GetTblBox( const Strn?ng& rName ) const
|* gebe den Pointer auf die benannte Box zurueck.
|*
-|* Ersterstellung JP 30. Jun. 93
-|* Letzte Aenderung JP 30. Jun. 93
-|*
|*************************************************************************/
sal_Bool IsValidRowName( const String& rStr )
@@ -1518,7 +1488,7 @@ const SwTableBox* SwTable::GetTblBox( const String& rName,
// Box ist ??
if( pBox && !pBox->GetSttNd() )
{
- ASSERT( sal_False, "Box ohne Inhalt, suche die naechste !!" );
+ OSL_ENSURE( sal_False, "Box ohne Inhalt, suche die naechste !!" );
// "herunterfallen lassen" bis zur ersten Box
while( pBox->GetTabLines().Count() )
pBox = pBox->GetTabLines()[0]->GetTabBoxes()[0];
@@ -1595,9 +1565,6 @@ sal_Bool SwTable::IsTblComplex() const
|*
|* SwTableLine::SwTableLine()
|*
-|* Ersterstellung MA 09. Mar. 93
-|* Letzte Aenderung MA 09. Mar. 93
-|*
|*************************************************************************/
SwTableLine::SwTableLine( SwTableLineFmt *pFmt, sal_uInt16 nBoxes,
SwTableBox *pUp )
@@ -1621,9 +1588,6 @@ SwTableLine::~SwTableLine()
|*
|* SwTableLine::ClaimFrmFmt(), ChgFrmFmt()
|*
-|* Ersterstellung MA 03. May. 93
-|* Letzte Aenderung MA 07. Feb. 96
-|*
|*************************************************************************/
SwFrmFmt* SwTableLine::ClaimFrmFmt()
{
@@ -1748,9 +1712,6 @@ SwTwips SwTableLine::GetTableLineHeight( bool& bLayoutAvailable ) const
|*
|* SwTableBox::SwTableBox()
|*
-|* Ersterstellung MA 04. May. 93
-|* Letzte Aenderung MA 04. May. 93
-|*
|*************************************************************************/
SwTableBox::SwTableBox( SwTableBoxFmt* pFmt, sal_uInt16 nLines, SwTableLine *pUp )
: SwClient( 0 ),
@@ -1775,7 +1736,7 @@ SwTableBox::SwTableBox( SwTableBoxFmt* pFmt, const SwNodeIndex &rIdx,
// an der Table eintragen
const SwTableNode* pTblNd = pSttNd->FindTableNode();
- ASSERT( pTblNd, "in welcher Tabelle steht denn die Box?" );
+ OSL_ENSURE( pTblNd, "in welcher Tabelle steht denn die Box?" );
SwTableSortBoxes& rSrtArr = (SwTableSortBoxes&)pTblNd->GetTable().
GetTabSortBoxes();
SwTableBox* p = this; // error: &this
@@ -1793,7 +1754,7 @@ SwTableBox::SwTableBox( SwTableBoxFmt* pFmt, const SwStartNode& rSttNd, SwTableL
// an der Table eintragen
const SwTableNode* pTblNd = pSttNd->FindTableNode();
- ASSERT( pTblNd, "in welcher Tabelle steht denn die Box?" );
+ OSL_ENSURE( pTblNd, "in welcher Tabelle steht denn die Box?" );
SwTableSortBoxes& rSrtArr = (SwTableSortBoxes&)pTblNd->GetTable().
GetTabSortBoxes();
SwTableBox* p = this; // error: &this
@@ -1807,7 +1768,7 @@ SwTableBox::~SwTableBox()
{
// an der Table austragen
const SwTableNode* pTblNd = pSttNd->FindTableNode();
- ASSERT( pTblNd, "in welcher Tabelle steht denn die Box?" );
+ OSL_ENSURE( pTblNd, "in welcher Tabelle steht denn die Box?" );
SwTableSortBoxes& rSrtArr = (SwTableSortBoxes&)pTblNd->GetTable().
GetTabSortBoxes();
SwTableBox *p = this; // error: &this
@@ -1852,9 +1813,6 @@ SwTableBoxFmt* SwTableBox::CheckBoxFmt( SwTableBoxFmt* pFmt )
|*
|* SwTableBox::ClaimFrmFmt(), ChgFrmFmt()
|*
-|* Ersterstellung MA 04. May. 93
-|* Letzte Aenderung MA 07. Feb. 96
-|*
|*************************************************************************/
SwFrmFmt* SwTableBox::ClaimFrmFmt()
{
@@ -1939,9 +1897,6 @@ void SwTableBox::ChgFrmFmt( SwTableBoxFmt* pNewFmt )
|* gebe den Namen dieser Box zurueck. Dieser wird dynamisch bestimmt
|* und ergibt sich aus der Position in den Lines/Boxen/Tabelle
|*
-|* Ersterstellung JP 30. Jun. 93
-|* Letzte Aenderung JP 30. Jun. 93
-|*
|*************************************************************************/
void lcl_GetTblBoxColStr( sal_uInt16 nCol, String& rNm )
{
@@ -2013,7 +1968,7 @@ sal_Bool SwTableBox::IsInHeadline( const SwTable* pTbl ) const
return pTbl->GetTabLines()[ 0 ] == pLine;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uLong SwTableBox::GetSttIdx() const
{
@@ -2358,7 +2313,7 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
SwTableBox* pBox = (SwTableBox*)aIter.First( TYPE( SwTableBox ) );
if( pBox )
{
- ASSERT( !aIter.Next(), "keine Box oder mehrere am Format" );
+ OSL_ENSURE( !aIter.Next(), "keine Box oder mehrere am Format" );
sal_uLong nNewFmt;
if( pNewFmt )
@@ -2490,13 +2445,6 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
else if( bNewIsTxtFmt && nOldFmt != nNewFmt )
{
- // auf jedenfall muessen jetzt die Formeln/Values
- // geloescht werden!
- // LockModify();
- // ResetAttr( RES_BOXATR_FORMULA, RES_BOXATR_VALUE );
- // UnlockModify();
-
-
ChgNumToText( *pBox, nNewFmt );
}
}
@@ -2540,21 +2488,6 @@ sal_Bool SwTableBox::HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
rFmtIndex = 0;
bRet = pNumFmtr->IsNumberFormat( aTxt, rFmtIndex, rNum );
-
-/*
-// wie bekommt man aus dem neuen String den neuen Wert?
-// denn der Numberformater erkennt aus "123.--DM" kein Zahlenformat!
- if( !bRet && rFmtIndex && !pNumFmtr->IsTextFormat( rFmtIndex ) &&
- SFX_ITEM_SET == GetFrmFmt()->GetItemState( RES_BOXATR_VALUE,
- sal_False, &pItem ))
- {
- Color* pCol;
- String sNewTxt;
- pNumFmtr->GetOutputString( ((SwTblBoxValue*)pItem)->GetValue(),
- rFmtIndex, sNewTxt, &pCol );
- bRet = aTxt == sNewTxt;
- }
-*/
}
else
rIsEmptyTxtNd = sal_False;
@@ -2611,14 +2544,14 @@ sal_uLong SwTableBox::IsValidNumTxtNd( sal_Bool bCheckAttr ) const
{
const SwNode* pNode = pSttNd->GetNodes()[nIndex];
if( pNode->IsTableNode() )
- { /*return ULONG_MAX if the cell contains a table(in table)*/
+ {
pTextNode = 0;
break;
}
if( pNode->IsTxtNode() )
{
if( pTextNode )
- { /*return ULONG_MAX if the cell contains complex paragraphs*/
+ {
pTextNode = 0;
break;
}
@@ -2882,3 +2815,5 @@ const SwTableBox * SwTableCellInfo::getTableBox() const
return pRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 7d777089fb7f..dc6db207b65a 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,7 +100,7 @@ FrmTagIdMap SwEnhancedPDFExportHelper::aFrmTagIdMap;
LanguageType SwEnhancedPDFExportHelper::eLanguageDefault = 0;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
static std::vector< sal_uInt16 > aStructStack;
@@ -288,7 +289,7 @@ SwTaggedPDFHelper::SwTaggedPDFHelper( const Num_Info* pNumInfo,
if ( mpPDFExtOutDevData && mpPDFExtOutDevData->GetIsExportTaggedPDF() )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Int32 nCurrentStruct = mpPDFExtOutDevData->GetCurrentStructureElement();
lcl_DBGCheckStack();
#endif
@@ -301,7 +302,7 @@ SwTaggedPDFHelper::SwTaggedPDFHelper( const Num_Info* pNumInfo,
else
BeginTag( vcl::PDFWriter::NonStructElement, aEmptyString );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
nCurrentStruct = mpPDFExtOutDevData->GetCurrentStructureElement();
lcl_DBGCheckStack();
#endif
@@ -316,13 +317,13 @@ SwTaggedPDFHelper::~SwTaggedPDFHelper()
{
if ( mpPDFExtOutDevData && mpPDFExtOutDevData->GetIsExportTaggedPDF() )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Int32 nCurrentStruct = mpPDFExtOutDevData->GetCurrentStructureElement();
lcl_DBGCheckStack();
#endif
EndStructureElements();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
nCurrentStruct = mpPDFExtOutDevData->GetCurrentStructureElement();
lcl_DBGCheckStack();
#endif
@@ -389,9 +390,9 @@ bool SwTaggedPDFHelper::CheckReopenTag()
{
nRestoreCurrentTag = mpPDFExtOutDevData->GetCurrentStructureElement();
const bool bSuccess = mpPDFExtOutDevData->SetCurrentStructureElement( nReopenTag );
- ASSERT( bSuccess, "Failed to reopen tag" )
+ OSL_ENSURE( bSuccess, "Failed to reopen tag" );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
aStructStack.push_back( 99 );
#endif
@@ -412,9 +413,9 @@ bool SwTaggedPDFHelper::CheckRestoreTag() const
{
const bool bSuccess = mpPDFExtOutDevData->SetCurrentStructureElement( nRestoreCurrentTag );
(void)bSuccess;
- ASSERT( bSuccess, "Failed to restore reopened tag" )
+ OSL_ENSURE( bSuccess, "Failed to restore reopened tag" );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
aStructStack.pop_back();
#endif
@@ -434,7 +435,7 @@ void SwTaggedPDFHelper::BeginTag( vcl::PDFWriter::StructElement eType, const Str
const sal_Int32 nId = mpPDFExtOutDevData->BeginStructureElement( eType, rtl::OUString( rString ) );
++nEndStructureElement;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
aStructStack.push_back( static_cast<sal_uInt16>(eType) );
#endif
@@ -494,7 +495,7 @@ void SwTaggedPDFHelper::EndTag()
{
mpPDFExtOutDevData->EndStructureElement();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
aStructStack.pop_back();
#endif
}
@@ -655,7 +656,7 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
if ( bTextIndent )
{
- ASSERT( pFrm->IsTxtFrm(), "Frame type <-> tag attribute mismatch" )
+ OSL_ENSURE( pFrm->IsTxtFrm(), "Frame type <-> tag attribute mismatch" );
const SvxLRSpaceItem &rSpace =
static_cast<const SwTxtFrm*>(pFrm)->GetTxtNode()->GetSwAttrSet().GetLRSpace();
nVal = rSpace.GetTxtFirstLineOfst();
@@ -665,7 +666,7 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
if ( bTextAlign )
{
- ASSERT( pFrm->IsTxtFrm(), "Frame type <-> tag attribute mismatch" )
+ OSL_ENSURE( pFrm->IsTxtFrm(), "Frame type <-> tag attribute mismatch" );
const SwAttrSet& aSet = static_cast<const SwTxtFrm*>(pFrm)->GetTxtNode()->GetSwAttrSet();
const SvxAdjust nAdjust = aSet.GetAdjust().GetAdjust();
if ( SVX_ADJUST_BLOCK == nAdjust || SVX_ADJUST_CENTER == nAdjust ||
@@ -684,7 +685,7 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
if ( bAlternateText )
{
- ASSERT( pFrm->IsFlyFrm(), "Frame type <-> tag attribute mismatch" )
+ OSL_ENSURE( pFrm->IsFlyFrm(), "Frame type <-> tag attribute mismatch" );
const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pFrm);
if ( pFly->Lower() && pFly->Lower()->IsNoTxtFrm() )
{
@@ -740,7 +741,7 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
const TableColumnsMapEntry::const_iterator aLeftIter = rCols.find( nLeft );
const TableColumnsMapEntry::const_iterator aRightIter = rCols.find( nRight );
- ASSERT( aLeftIter != rCols.end() && aRightIter != rCols.end(), "Colspan trouble" )
+ OSL_ENSURE( aLeftIter != rCols.end() && aRightIter != rCols.end(), "Colspan trouble" );
if ( aLeftIter != rCols.end() && aRightIter != rCols.end() )
{
nVal = std::distance( aLeftIter, aRightIter );
@@ -862,12 +863,12 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
*/
void SwTaggedPDFHelper::BeginNumberedListStructureElements()
{
- ASSERT( mpNumInfo, "List without mpNumInfo?" )
+ OSL_ENSURE( mpNumInfo, "List without mpNumInfo?" );
if ( !mpNumInfo )
return;
const SwFrm& rFrm = mpNumInfo->mrFrm;
- ASSERT( rFrm.IsTxtFrm(), "numbered only for text frames" )
+ OSL_ENSURE( rFrm.IsTxtFrm(), "numbered only for text frames" );
const SwTxtFrm& rTxtFrm = static_cast<const SwTxtFrm&>(rFrm);
//
@@ -970,7 +971,7 @@ void SwTaggedPDFHelper::BeginNumberedListStructureElements()
nRestoreCurrentTag = mpPDFExtOutDevData->GetCurrentStructureElement();
mpPDFExtOutDevData->SetCurrentStructureElement( nReopenTag );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
aStructStack.push_back( 99 );
#endif
}
@@ -1101,7 +1102,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
static_cast<const SwTxtFrm*>(pFrm)->GetTxtNode();
const SwFmt* pTxtFmt = pTxtNd->GetFmtColl();
- const SwFmt* pParentTxtFmt = pTxtFmt->DerivedFrom();
+ const SwFmt* pParentTxtFmt = pTxtFmt ? pTxtFmt->DerivedFrom() : NULL;
String sStyleName;
String sParentStyleName;
@@ -1525,7 +1526,7 @@ SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper( SwEditShell& rSh,
aNumListBodyIdMap.clear();
aFrmTagIdMap.clear();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
aStructStack.clear();
#endif
@@ -1598,7 +1599,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
{
const SwTxtNode* pTNd =
(SwTxtNode*)((SwFmtFld*)pFirst)->GetTxtFld()->GetpTxtNode();
- ASSERT( 0 != pTNd, "Enhanced pdf export - text node is missing" )
+ OSL_ENSURE( 0 != pTNd, "Enhanced pdf export - text node is missing" );
// 1. Check if the whole paragraph is hidden
// 2. Move to the field
@@ -1654,10 +1655,10 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
for( sal_uInt16 n = 0; n < nHyperLinkCount; ++n )
{
SwGetINetAttr* p = aArr[ n ];
- ASSERT( 0 != p, "Enhanced pdf export - SwGetINetAttr is missing" )
+ OSL_ENSURE( 0 != p, "Enhanced pdf export - SwGetINetAttr is missing" );
const SwTxtNode* pTNd = p->rINetAttr.GetpTxtNode();
- ASSERT( 0 != pTNd, "Enhanced pdf export - text node is missing" )
+ OSL_ENSURE( 0 != pTNd, "Enhanced pdf export - text node is missing" );
// 1. Check if the whole paragraph is hidden
// 2. Move to the hyperlink
@@ -1688,7 +1689,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// be deleted again in JumpToSwMark.
SwRects aTmp;
aTmp.Insert( mrSh.SwCrsrShell::_GetCrsr(), 0 );
- ASSERT( aTmp.Count() > 0, "Enhanced pdf export - rectangles are missing" )
+ OSL_ENSURE( aTmp.Count() > 0, "Enhanced pdf export - rectangles are missing" );
// Create the destination for internal links:
sal_Int32 nDestId = -1;
@@ -1840,7 +1841,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
{
const SwTxtNode* pTNd =
(SwTxtNode*)((SwFmtFld*)pFirst)->GetTxtFld()->GetpTxtNode();
- ASSERT( 0 != pTNd, "Enhanced pdf export - text node is missing" )
+ OSL_ENSURE( 0 != pTNd, "Enhanced pdf export - text node is missing" );
// 1. Check if the whole paragraph is hidden
// 2. Move to the field
@@ -1856,7 +1857,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// Link Rectangles
SwRects aTmp;
aTmp.Insert( mrSh.SwCrsrShell::_GetCrsr(), 0 );
- ASSERT( aTmp.Count() > 0, "Enhanced pdf export - rectangles are missing" )
+ OSL_ENSURE( aTmp.Count() > 0, "Enhanced pdf export - rectangles are missing" );
mrSh.SwCrsrShell::ClearMark();
@@ -1947,7 +1948,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// Link Rectangle
SwRects aTmp;
aTmp.Insert( mrSh.SwCrsrShell::_GetCrsr(), 0 );
- ASSERT( aTmp.Count() > 0, "Enhanced pdf export - rectangles are missing" )
+ OSL_ENSURE( aTmp.Count() > 0, "Enhanced pdf export - rectangles are missing" );
const SwRect aLinkRect( aTmp[ 0 ] );
mrSh._GetCrsr()->RestoreSavePos();
@@ -2002,7 +2003,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
{
// Check if outline is hidden
const SwTxtNode* pTNd = mrSh.GetNodes().GetOutLineNds()[ i ]->GetTxtNode();
- ASSERT( 0 != pTNd, "Enhanced pdf export - text node is missing" )
+ OSL_ENSURE( 0 != pTNd, "Enhanced pdf export - text node is missing" );
if ( pTNd->IsHidden() ||
// --> FME 2005-01-10 #i40292# Skip empty outlines:
@@ -2117,7 +2118,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
else
pPDFExtOutDevData->SetLinkURL( aIBeg->nLinkId, aBookmarkName );
- aIBeg++;
+ ++aIBeg;
}
rBookmarks.clear();
}
@@ -2215,3 +2216,4 @@ void SwEnhancedPDFExportHelper::MakeHeaderFooterLinks( vcl::PDFExtOutDevData& rP
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/SwGrammarMarkUp.cxx b/sw/source/core/text/SwGrammarMarkUp.cxx
index cddf4519fd50..b3873d6b7ff9 100644
--- a/sw/source/core/text/SwGrammarMarkUp.cxx
+++ b/sw/source/core/text/SwGrammarMarkUp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -164,3 +165,4 @@ xub_StrLen SwGrammarMarkUp::getSentenceEnd( xub_StrLen nPos )
return nRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx
index f5b8f87fe25c..1befde44e5d5 100644
--- a/sw/source/core/text/atrhndl.hxx
+++ b/sw/source/core/text/atrhndl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -157,16 +158,16 @@ public:
inline const SfxPoolItem& SwAttrHandler::GetDefault( const sal_uInt16 nAttribID ) const
{
- ASSERT( nAttribID < RES_TXTATR_END,
+ OSL_ENSURE( nAttribID < RES_TXTATR_END,
"this attrib does not ex."
);
- ASSERT( pDefaultArray[ StackPos[ nAttribID ] ], "array not initialized" );
+ OSL_ENSURE( pDefaultArray[ StackPos[ nAttribID ] ], "array not initialized" );
return *pDefaultArray[ StackPos[ nAttribID ] ];
}
inline void SwAttrHandler::ResetFont( SwFont& rFnt ) const
{
- ASSERT( pFnt, "ResetFont without a font" );
+ OSL_ENSURE( pFnt, "ResetFont without a font" );
if ( pFnt )
rFnt = *pFnt;
};
@@ -177,3 +178,5 @@ inline const SwFont* SwAttrHandler::GetFont() const
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index 63f3c22151b3..92e88ecde74a 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#include "precompiled_sw.hxx"
-#include <errhdl.hxx> // ASSERT
#include <atrhndl.hxx>
#include <svl/itemiter.hxx>
#include <vcl/outdev.hxx>
@@ -332,7 +332,7 @@ void SwAttrHandler::SwAttrStack::Insert( const SwTxtAttr& rAttr, const sal_uInt1
}
}
- ASSERT( nPos <= nCount, "wrong position for insert operation");
+ OSL_ENSURE( nPos <= nCount, "wrong position for insert operation");
if ( nPos < nCount )
memmove( pArray + nPos + 1, pArray + nPos,
@@ -520,7 +520,7 @@ void SwAttrHandler::PushAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
sal_Bool SwAttrHandler::Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem )
{
- ASSERT( rItem.Which() < RES_TXTATR_WITHEND_END,
+ OSL_ENSURE( rItem.Which() < RES_TXTATR_WITHEND_END,
"I do not want this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
// robust
@@ -541,7 +541,7 @@ sal_Bool SwAttrHandler::Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem )
}
sal_uInt16 nPos = aAttrStack[ nStack ].Count();
- ASSERT( nPos, "empty stack?" );
+ OSL_ENSURE( nPos, "empty stack?" );
aAttrStack[ nStack ].Insert( rAttr, nPos - 1 );
return sal_False;
}
@@ -598,7 +598,7 @@ void SwAttrHandler::PopAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
void SwAttrHandler::Pop( const SwTxtAttr& rAttr )
{
- ASSERT( rAttr.Which() < RES_TXTATR_WITHEND_END,
+ OSL_ENSURE( rAttr.Which() < RES_TXTATR_WITHEND_END,
"I do not have this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
if ( rAttr.Which() < RES_TXTATR_WITHEND_END )
@@ -612,7 +612,7 @@ void SwAttrHandler::Pop( const SwTxtAttr& rAttr )
*************************************************************************/
void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr )
{
- ASSERT( nAttr < RES_TXTATR_WITHEND_END,
+ OSL_ENSURE( nAttr < RES_TXTATR_WITHEND_END,
"I cannot activate this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
const sal_uInt16 nStackPos = StackPos[ nAttr ];
@@ -944,7 +944,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, sal_Bool bPu
void SwAttrHandler::GetDefaultAscentAndHeight( ViewShell* pShell, OutputDevice& rOut,
sal_uInt16& nAscent, sal_uInt16& nHeight ) const
{
- ASSERT( pFnt, "No font available for GetDefaultAscentAndHeight" )
+ OSL_ENSURE( pFnt, "No font available for GetDefaultAscentAndHeight" );
if ( pFnt )
{
@@ -954,3 +954,4 @@ void SwAttrHandler::GetDefaultAscentAndHeight( ViewShell* pShell, OutputDevice&
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx
index 611f167bbea2..596820a3ab0d 100644
--- a/sw/source/core/text/blink.cxx
+++ b/sw/source/core/text/blink.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -196,3 +197,4 @@ void SwBlink::FrmDelete( const SwRootFrm* pRoot )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 810efc66f1da..87b56063b87a 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,7 +49,6 @@
#include <unicode/ubidi.h>
-#include "txtcfg.hxx"
#include "txtfrm.hxx" // SwTxtFrm
#include "inftxt.hxx" // SwTxtSizeInfo
#include "itrtxt.hxx" // SwTxtCursor
@@ -113,7 +113,7 @@ SwTxtFrm *GetAdjFrmAtPos( SwTxtFrm *pFrm, const SwPosition &rPos,
pFrmAtPos->GetFormatted();
pFrmAtPos = pFrmAtPos->FindMaster();
}
- ASSERT( pFrmAtPos, "+GetCharRect: no frame with my rightmargin" );
+ OSL_ENSURE( pFrmAtPos, "+GetCharRect: no frame with my rightmargin" );
}
return pFrmAtPos ? pFrmAtPos : pFrm;
}
@@ -121,7 +121,7 @@ SwTxtFrm *GetAdjFrmAtPos( SwTxtFrm *pFrm, const SwPosition &rPos,
sal_Bool lcl_ChangeOffset( SwTxtFrm* pFrm, xub_StrLen nNew )
{
// In Bereichen und ausserhalb von Flies wird nicht mehr gescrollt.
- ASSERT( !pFrm->IsFollow(), "Illegal Scrolling by Follow!" );
+ OSL_ENSURE( !pFrm->IsFollow(), "Illegal Scrolling by Follow!" );
if( pFrm->GetOfst() != nNew && !pFrm->IsInSct() )
{
SwFlyFrm *pFly = pFrm->FindFlyFrm();
@@ -200,7 +200,7 @@ SwTxtFrm *SwTxtFrm::GetFrmAtPos( const SwPosition &rPos )
sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
SwCrsrMoveState *pCMS ) const
{
- ASSERT( ! IsVertical() || ! IsSwapped(),"SwTxtFrm::GetCharRect with swapped frame" );
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTxtFrm::GetCharRect with swapped frame" );
if( IsLocked() || IsHiddenNow() )
return sal_False;
@@ -354,7 +354,7 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
if( bRet )
{
SwPageFrm *pPage = pFrm->FindPageFrm();
- ASSERT( pPage, "Text esaped from page?" );
+ OSL_ENSURE( pPage, "Text esaped from page?" );
const SwTwips nOrigTop = (rOrig.*fnRect->fnGetTop)();
const SwTwips nPageTop = (pPage->Frm().*fnRect->fnGetTop)();
const SwTwips nPageBott = (pPage->Frm().*fnRect->fnGetBottom)();
@@ -618,7 +618,6 @@ sal_Bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point& rPoint,
aLine.TwipsToLine( rPoint.Y() );
while( aLine.Y() + aLine.GetLineHeight() > nMaxY )
{
- DBG_LOOP;
if( !aLine.Prev() )
break;
}
@@ -887,14 +886,16 @@ sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
aCharBox.Pos().X() = aCharBox.Pos().X() - 150;
// siehe Kommentar in SwTxtFrm::GetCrsrOfst()
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
const sal_uLong nOldNode = pPam->GetPoint()->nNode.GetIndex();
#endif
// Der Node soll nicht gewechselt werden
xub_StrLen nTmpOfst = aLine.GetCrsrOfst( pPam->GetPoint(),
aCharBox.Pos(), sal_False );
- ASSERT( nOldNode == pPam->GetPoint()->nNode.GetIndex(),
- "SwTxtFrm::UnitUp: illegal node change" )
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( nOldNode == pPam->GetPoint()->nNode.GetIndex(),
+ "SwTxtFrm::UnitUp: illegal node change" );
+#endif
// 7684: Wir stellen sicher, dass wir uns nach oben bewegen.
if( nTmpOfst >= nStart && nStart && !bSecondOfDouble )
@@ -1253,7 +1254,7 @@ sal_Bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
if( pNextLine || bFirstOfDouble )
{
aCharBox.SSize().Width() /= 2;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// siehe Kommentar in SwTxtFrm::GetCrsrOfst()
const sal_uLong nOldNode = pPam->GetPoint()->nNode.GetIndex();
#endif
@@ -1262,8 +1263,10 @@ sal_Bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
xub_StrLen nTmpOfst = aLine.GetCrsrOfst( pPam->GetPoint(),
aCharBox.Pos(), sal_False );
- ASSERT( nOldNode == pPam->GetPoint()->nNode.GetIndex(),
- "SwTxtFrm::UnitDown: illegal node change" )
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( nOldNode == pPam->GetPoint()->nNode.GetIndex(),
+ "SwTxtFrm::UnitDown: illegal node change" );
+#endif
// 7684: Wir stellen sicher, dass wir uns nach unten bewegen.
if( nTmpOfst <= nStart && ! bFirstOfDouble )
@@ -1541,7 +1544,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
SwTwips nSpace = 0;
if( FILL_TAB != rFill.Mode() )
{
-static sal_Char __READONLY_DATA sDoubleSpace[] = " ";
+static sal_Char const sDoubleSpace[] = " ";
const XubString aTmp( sDoubleSpace, RTL_TEXTENCODING_MS_1252 );
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aTmp, 0, 2 );
@@ -1745,3 +1748,5 @@ static sal_Char __READONLY_DATA sDoubleSpace[] = " ";
((SwCrsrMoveState*)rFill.pCMS)->bFillRet = bFill;
delete pFnt;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 4fac26a7a08d..5ac6d2e685ec 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
#include <editeng/keepitem.hxx>
#include <editeng/hyznitem.hxx>
@@ -47,7 +47,6 @@
#include <pam.hxx>
#include <flyfrms.hxx>
#include <fmtanchr.hxx>
-#include <txtcfg.hxx>
#include <itrform2.hxx> // SwTxtFormatter
#include <widorp.hxx> // Widows and Orphans
#include <txtcache.hxx>
@@ -62,6 +61,9 @@
// OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
+// Toleranzwert in der Formatierung und Textausgabe.
+#define SLOPPY_TWIPS 5
+
class FormatLevel
{
static MSHORT nLevel;
@@ -84,23 +86,6 @@ void ValidateTxt( SwFrm *pFrm ) // Freund vom Frame
( pFrm->IsVertical() &&
pFrm->Frm().Height() == pFrm->GetUpper()->Prt().Height() ) )
pFrm->bValidSize = sal_True;
-/*
- pFrm->bValidPrtArea = sal_True;
- //Die Position validieren um nicht unnoetige (Test-)Moves zu provozieren.
- //Dabei darf allerdings nicht eine tatsaechlich falsche Coordinate
- //validiert werden.
- if ( !pFrm->bValidPos )
- {
- //Leider muessen wir dazu die korrekte Position berechnen.
- Point aOld( pFrm->Frm().Pos() );
- pFrm->MakePos();
- if ( aOld != pFrm->Pos() )
- {
- pFrm->Frm().Pos( aOld );
- pFrm->bValidPos = sal_False;
- }
- }
-*/
}
void SwTxtFrm::ValidateFrm()
@@ -129,7 +114,7 @@ void SwTxtFrm::ValidateFrm()
ValidateTxt( this );
//MA: mindestens das MustFit-Flag muessen wir retten!
- ASSERT( HasPara(), "ResetPreps(), missing ParaPortion." );
+ OSL_ENSURE( HasPara(), "ResetPreps(), missing ParaPortion." );
SwParaPortion *pPara = GetPara();
const sal_Bool bMustFit = pPara->IsPrepMustFit();
ResetPreps();
@@ -185,7 +170,7 @@ sal_Bool SwTxtFrm::_GetDropRect( SwRect &rRect ) const
{
SWAP_IF_NOT_SWAPPED( this )
- ASSERT( HasPara(), "SwTxtFrm::_GetDropRect: try again next year." );
+ OSL_ENSURE( HasPara(), "SwTxtFrm::_GetDropRect: try again next year." );
SwTxtSizeInfo aInf( (SwTxtFrm*)this );
SwTxtMargin aLine( (SwTxtFrm*)this, &aInf );
if( aLine.GetDropLines() )
@@ -233,7 +218,7 @@ sal_Bool SwTxtFrm::CalcFollow( const xub_StrLen nTxtOfst )
{
SWAP_IF_SWAPPED( this )
- ASSERT( HasFollow(), "CalcFollow: missing Follow." );
+ OSL_ENSURE( HasFollow(), "CalcFollow: missing Follow." );
SwTxtFrm* pMyFollow = GetFollow();
@@ -245,7 +230,7 @@ sal_Bool SwTxtFrm::CalcFollow( const xub_StrLen nTxtOfst )
( pMyFollow->IsVertical() && !pMyFollow->Prt().Width() ) ||
( ! pMyFollow->IsVertical() && !pMyFollow->Prt().Height() ) )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
const SwFrm *pOldUp = GetUpper();
#endif
@@ -332,12 +317,12 @@ sal_Bool SwTxtFrm::CalcFollow( const xub_StrLen nTxtOfst )
pMyFollow->Calc();
// Der Follow merkt anhand seiner Frm().Height(), dass was schief
// gelaufen ist.
- ASSERT( !pMyFollow->GetPrev(), "SwTxtFrm::CalcFollow: cheesy follow" );
+ OSL_ENSURE( !pMyFollow->GetPrev(), "SwTxtFrm::CalcFollow: cheesy follow" );
if( pMyFollow->GetPrev() )
{
pMyFollow->Prepare( PREP_CLEAR );
pMyFollow->Calc();
- ASSERT( !pMyFollow->GetPrev(), "SwTxtFrm::CalcFollow: very cheesy follow" );
+ OSL_ENSURE( !pMyFollow->GetPrev(), "SwTxtFrm::CalcFollow: very cheesy follow" );
}
// OD 14.03.2003 #i11760# - reset control flag for follow format.
@@ -374,8 +359,8 @@ sal_Bool SwTxtFrm::CalcFollow( const xub_StrLen nTxtOfst )
pPage->ValidateCntnt();
}
-#ifdef DBG_UTIL
- ASSERT( pOldUp == GetUpper(), "SwTxtFrm::CalcFollow: heavy follow" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( pOldUp == GetUpper(), "SwTxtFrm::CalcFollow: heavy follow" );
#endif
const long nRemaining =
@@ -481,7 +466,7 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, sal_Bool bHasToFit )
SwTwips nRstHeight;
if ( IsVertical() )
{
- ASSERT( ! IsSwapped(),"Swapped frame while calculating nRstHeight" );
+ OSL_ENSURE( ! IsSwapped(),"Swapped frame while calculating nRstHeight" );
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if ( IsVertLR() )
@@ -510,7 +495,7 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, sal_Bool bHasToFit )
{
long nAdd = (*fnRect->fnYDiff)( (GetUpper()->Lower()->Frm().*fnRect->fnGetTop)(),
(GetUpper()->*fnRect->fnGetPrtTop)() );
- ASSERT( nAdd >= 0, "Ey" );
+ OSL_ENSURE( nAdd >= 0, "Ey" );
nRstHeight += nAdd;
}
@@ -586,7 +571,7 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
{
if( ((SwTxtFrm*)GetFollow())->IsLocked() )
{
- ASSERT( sal_False, "+SwTxtFrm::JoinFrm: Follow ist locked." );
+ OSL_ENSURE( sal_False, "+SwTxtFrm::JoinFrm: Follow ist locked." );
return;
}
JoinFrm();
@@ -608,7 +593,6 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
while( GetFollow() && GetFollow()->GetFollow() &&
nNewOfst >= GetFollow()->GetFollow()->GetOfst() )
{
- DBG_LOOP;
JoinFrm();
}
}
@@ -634,7 +618,7 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
SwCntntFrm *SwTxtFrm::JoinFrm()
{
- ASSERT( GetFollow(), "+SwTxtFrm::JoinFrm: no follow" );
+ OSL_ENSURE( GetFollow(), "+SwTxtFrm::JoinFrm: no follow" );
SwTxtFrm *pFoll = GetFollow();
SwTxtFrm *pNxt = pFoll->GetFollow();
@@ -672,12 +656,12 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else if ( pFoll->GetValidPrtAreaFlag() ||
pFoll->GetValidSizeFlag() )
{
pFoll->CalcFtnFlag();
- ASSERT( !pFoll->HasFtn(), "Missing FtnFlag." );
+ OSL_ENSURE( !pFoll->HasFtn(), "Missing FtnFlag." );
}
#endif
@@ -772,11 +756,11 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const xub_StrLen nTxtPos )
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
{
CalcFtnFlag( nTxtPos-1 );
- ASSERT( !HasFtn(), "Missing FtnFlag." );
+ OSL_ENSURE( !HasFtn(), "Missing FtnFlag." );
}
#endif
@@ -797,12 +781,6 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const xub_StrLen nTxtPos )
void SwTxtFrm::_SetOfst( const xub_StrLen nNewOfst )
{
-#ifdef DBGTXT
- // Es gibt tatsaechlich einen Sonderfall, in dem ein SetOfst(0)
- // zulaessig ist: bug 3496
- ASSERT( nNewOfst, "!SwTxtFrm::SetOfst: missing JoinFrm()." );
-#endif
-
// Die Invalidierung unseres Follows ist nicht noetig.
// Wir sind ein Follow, werden gleich formatiert und
// rufen von dort aus das SetOfst() !
@@ -824,7 +802,7 @@ void SwTxtFrm::_SetOfst( const xub_StrLen nNewOfst )
sal_Bool SwTxtFrm::CalcPreps()
{
- ASSERT( ! IsVertical() || ! IsSwapped(), "SwTxtFrm::CalcPreps with swapped frame" );
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(), "SwTxtFrm::CalcPreps with swapped frame" );
SWRECTFN( this );
SwParaPortion *pPara = GetPara();
@@ -847,7 +825,7 @@ sal_Bool SwTxtFrm::CalcPreps()
{
if( !GetFollow() )
{
- ASSERT( GetFollow(), "+SwTxtFrm::CalcPreps: no credits" );
+ OSL_ENSURE( GetFollow(), "+SwTxtFrm::CalcPreps: no credits" );
return sal_False;
}
@@ -883,7 +861,7 @@ sal_Bool SwTxtFrm::CalcPreps()
}
else
{
- ASSERT( nChgHeight < (Prt().*fnRect->fnGetHeight)(),
+ OSL_ENSURE( nChgHeight < (Prt().*fnRect->fnGetHeight)(),
"+SwTxtFrm::CalcPrep: wanna shrink" );
nChgHeight = (Prt().*fnRect->fnGetHeight)() - nChgHeight;
@@ -902,7 +880,6 @@ sal_Bool SwTxtFrm::CalcPreps()
else
rRepaint.Chg( Frm().Pos() + Prt().Pos(), Prt().SSize() );
- // 6792: Rrand < LRand und Repaint
if( 0 >= rRepaint.Width() )
rRepaint.Width(1);
}
@@ -1156,53 +1133,9 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
AdjustFrm( nChg, bHasToFit );
-/*
- // FME 16.07.2003 #i16930# - removed this code because it did not
- // work correctly. In SwCntntFrm::MakeAll, the frame did not move to the
- // next page, instead the print area was recalculated and
- // Prepare( PREP_POS_CHGD, (const void*)&bFormatted, sal_False ) invalidated
- // the other flags => loop
-
- // OD 04.04.2003 #108446# - handle special case:
- // If text frame contains no content and just has split, because of a
- // line stop, it has to move forward. To force this forward move without
- // unnecessary formatting of its footnotes and its follow, especially in
- // columned sections, adjust frame height to zero (0) and do not perform
- // the intrinsic format of the follow.
- // The formating method <SwCntntFrm::MakeAll()> will initiate the move forward.
- sal_Bool bForcedNoIntrinsicFollowCalc = sal_False;
- if ( nEnd == 0 &&
- rLine.IsStop() && HasFollow() && nNew == 1
- )
- {
- AdjustFrm( -Frm().SSize().Height(), bHasToFit );
- Prt().Pos().Y() = 0;
- Prt().Height( Frm().Height() );
- if ( FollowFormatAllowed() )
- {
- bForcedNoIntrinsicFollowCalc = sal_True;
- ForbidFollowFormat();
- }
- }
- else
- {
- AdjustFrm( nChg, bHasToFit );
- }
- */
-
if( HasFollow() || IsInFtn() )
_AdjustFollow( rLine, nEnd, nStrLen, nNew );
- // FME 16.07.2003 #i16930# - removed this code because it did not work
- // correctly
- // OD 04.04.2003 #108446# - allow intrinsic format of follow, if above
- // special case has forbit it.
-/* if ( bForcedNoIntrinsicFollowCalc )
- {
- AllowFollowFormat();
- }
- */
-
pPara->SetPrepMustFit( sal_False );
UNDO_SWAP( this )
@@ -1218,13 +1151,9 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
sal_Bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const sal_Bool bPrev )
{
- ASSERT( ! IsVertical() || IsSwapped(),
+ OSL_ENSURE( ! IsVertical() || IsSwapped(),
"SwTxtFrm::FormatLine( rLine, bPrev) with unswapped frame" );
SwParaPortion *pPara = rLine.GetInfo().GetParaPortion();
- // Nach rLine.FormatLine() haelt nStart den neuen Wert,
- // waehrend in pOldStart der alte Offset gepflegt wird.
- // Ueber diesen Weg soll das nDelta ersetzt werden.
- // *pOldStart += rLine.GetCurr()->GetLen();
const SwLineLayout *pOldCur = rLine.GetCurr();
const xub_StrLen nOldLen = pOldCur->GetLen();
const KSHORT nOldAscent = pOldCur->GetAscent();
@@ -1238,9 +1167,9 @@ sal_Bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const sal_Bool bPrev )
const xub_StrLen nNewStart = rLine.FormatLine( rLine.GetStart() );
- ASSERT( Frm().Pos().Y() + Prt().Pos().Y() == rLine.GetFirstPos(),
+ OSL_ENSURE( Frm().Pos().Y() + Prt().Pos().Y() == rLine.GetFirstPos(),
"SwTxtFrm::FormatLine: frame leaves orbit." );
- ASSERT( rLine.GetCurr()->Height(),
+ OSL_ENSURE( rLine.GetCurr()->Height(),
"SwTxtFrm::FormatLine: line height is zero" );
// Das aktuelle Zeilenumbruchobjekt.
@@ -1250,7 +1179,6 @@ sal_Bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const sal_Bool bPrev )
bOldHyph == pNew->IsEndHyph();
if ( bUnChg && !bPrev )
{
- // 6672: Toleranz von SLOPPY_TWIPS (5 Twips); vgl. 6922
const long nWidthDiff = nOldWidth > pNew->Width()
? nOldWidth - pNew->Width()
: pNew->Width() - nOldWidth;
@@ -1364,7 +1292,7 @@ sal_Bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const sal_Bool bPrev )
void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
const sal_Bool bAdjust )
{
- ASSERT( ! IsVertical() || IsSwapped(),"SwTxtFrm::_Format with unswapped frame" );
+ OSL_ENSURE( ! IsVertical() || IsSwapped(),"SwTxtFrm::_Format with unswapped frame" );
SwParaPortion *pPara = rLine.GetInfo().GetParaPortion();
rLine.SetUnclipped( sal_False );
@@ -1454,7 +1382,6 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
if( pPara->IsMargin() )
rRepaint.Width( rRepaint.Width() + pPara->GetHangingMargin() );
rRepaint.Top( rLine.Y() );
- // 6792: Rrand < LRand und Repaint
if( 0 >= rRepaint.Width() )
rRepaint.Width(1);
WidowsAndOrphans aFrmBreak( this, rInf.IsTest() ? 1 : 0 );
@@ -1521,7 +1448,7 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
const SwLineLayout* pLine;
{
SwTxtFrm *pMaster = FindMaster();
- ASSERT( pMaster, "SwTxtFrm::Format: homeless follow" );
+ OSL_ENSURE( pMaster, "SwTxtFrm::Format: homeless follow" );
if( !pMaster->HasPara() )
pMaster->GetFormatted();
SwTxtSizeInfo aInf( pMaster );
@@ -1547,7 +1474,6 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
*/
do
{
- DBG_LOOP;
if( bFirst )
bFirst = sal_False;
else
@@ -1693,7 +1619,7 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
{
- ASSERT( ! IsVertical() || IsSwapped(),
+ OSL_ENSURE( ! IsVertical() || IsSwapped(),
"A frame is not swapped in SwTxtFrm::FormatOnceMore" );
SwParaPortion *pPara = rLine.GetInfo().GetParaPortion();
@@ -1708,9 +1634,6 @@ void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
sal_uInt8 nGo = 0;
while( bGoOn )
{
-#ifdef DBGTXT
- aDbstream << "OnceMore!" << endl;
-#endif
++nGo;
rInf.Init();
rLine.Top();
@@ -1765,11 +1688,6 @@ void SwTxtFrm::_Format( SwParaPortion *pPara )
{
const xub_StrLen nStrLen = GetTxt().Len();
- // AMA: Wozu soll das gut sein? Scheint mir zuoft zu einem kompletten
- // Formatieren und Repainten zu fuehren???
-// if ( !(*pPara->GetDelta()) )
-// *(pPara->GetDelta()) = nStrLen;
-// else
if ( !nStrLen )
{
// Leere Zeilen werden nicht lange gequaelt:
@@ -1788,7 +1706,7 @@ void SwTxtFrm::_Format( SwParaPortion *pPara )
pPara->SetPrepMustFit( bMustFit );
}
- ASSERT( ! IsSwapped(), "A frame is swapped before _Format" );
+ OSL_ENSURE( ! IsSwapped(), "A frame is swapped before _Format" );
if ( IsVertical() )
SwapWidthAndHeight();
@@ -1807,7 +1725,7 @@ void SwTxtFrm::_Format( SwParaPortion *pPara )
if ( IsVertical() )
SwapWidthAndHeight();
- ASSERT( ! IsSwapped(), "A frame is swapped after _Format" );
+ OSL_ENSURE( ! IsSwapped(), "A frame is swapped after _Format" );
if( 1 < aLine.GetDropLines() )
{
@@ -1838,7 +1756,6 @@ void SwTxtFrm::_Format( SwParaPortion *pPara )
void SwTxtFrm::Format( const SwBorderAttrs * )
{
- DBG_LOOP;
#if OSL_DEBUG_LEVEL > 1
const XubString aXXX = GetTxtNode()->GetTxt();
const SwTwips nDbgY = Frm().Top();
@@ -1850,7 +1767,6 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
const SwFrm *pDbgFtnCont = (const SwFrm*)(FindPageFrm()->FindFtnCont());
(void)pDbgFtnCont;
-#ifdef DBG_UTIL
// nStopAt laesst sich vom CV bearbeiten.
static MSHORT nStopAt = 0;
if( nStopAt == GetFrmId() )
@@ -1859,32 +1775,10 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
(void)i;
}
#endif
-#endif
-
-#ifdef DEBUG_FTN
- //Fussnote darf nicht auf einer Seite vor ihrer Referenz stehen.
- if( IsInFtn() )
- {
- const SwFtnFrm *pFtn = (SwFtnFrm*)GetUpper();
- const SwPageFrm *pFtnPage = pFtn->GetRef()->FindPageFrm();
- const MSHORT nFtnPageNr = pFtnPage->GetPhyPageNum();
- if( !IsLocked() )
- {
- if( nFtnPageNr > nDbgPageNr )
- {
- SwTxtFrmLocker aLock(this);
- ASSERT( nFtnPageNr <= nDbgPageNr, "!Ftn steht vor der Referenz." );
- MSHORT i = 0;
- }
- }
- }
-#endif
SWRECTFN( this )
- // --> OD 2008-01-31 #newlistlevelattrs#
CalcAdditionalFirstLineOffset();
- // <--
// Vom Berichtsautopiloten oder ueber die BASIC-Schnittstelle kommen
// gelegentlich TxtFrms mit einer Breite <=0.
@@ -1975,7 +1869,7 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
else if( bSetOfst && IsFollow() )
{
SwTxtFrm *pMaster = FindMaster();
- ASSERT( pMaster, "SwTxtFrm::Format: homeless follow" );
+ OSL_ENSURE( pMaster, "SwTxtFrm::Format: homeless follow" );
if( pMaster )
pMaster->Prepare( PREP_FOLLOW_FOLLOWS );
SwTwips nMaxY = (GetUpper()->*fnRect->fnGetPrtBottom)();
@@ -2088,15 +1982,13 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
{
- ASSERT( ! IsVertical() || ! IsSwapped(),
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
"SwTxtFrm::FormatQuick with swapped frame" );
- DBG_LOOP;
#if OSL_DEBUG_LEVEL > 1
const XubString aXXX = GetTxtNode()->GetTxt();
const SwTwips nDbgY = Frm().Top();
(void)nDbgY;
-#ifdef DBG_UTIL
// nStopAt laesst sich vom CV bearbeiten.
static MSHORT nStopAt = 0;
if( nStopAt == GetFrmId() )
@@ -2105,7 +1997,6 @@ sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
(void)i;
}
#endif
-#endif
if( IsEmpty() && FormatEmpty() )
return sal_True;
@@ -2139,13 +2030,6 @@ sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
? GetFollow()->GetOfst() : aInf.GetTxt().Len();
do
{
- //DBG_LOOP; shadows declaration above.
- //resolved into:
-#if OSL_DEBUG_LEVEL > 1
-#ifdef DBG_UTIL
- DbgLoop aDbgLoop2( (const void*) this );
-#endif
-#endif
nStart = aLine.FormatLine( nStart );
if( aInf.IsNewLine() || (!aInf.IsStop() && nStart < nEnd) )
aLine.Insert( new SwLineLayout() );
@@ -2160,7 +2044,6 @@ sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
if( !bForceQuickFormat && nNewHeight != nOldHeight && !IsUndersized() )
{
// Achtung: Durch FormatLevel==12 kann diese Situation auftreten, don't panic!
- // ASSERT( nNewHeight == nOldHeight, "!FormatQuick: rosebud" );
const xub_StrLen nStrt = GetOfst();
_InvalidateRange( SwCharRange( nStrt, nEnd - nStrt) );
return sal_False;
@@ -2181,3 +2064,5 @@ sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
return sal_True;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx
index 60700849fc80..530c93a51825 100644
--- a/sw/source/core/text/frminf.cxx
+++ b/sw/source/core/text/frminf.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,6 @@
#include <pam.hxx> // GetSpaces
-#include <txtcfg.hxx>
#include <frminf.hxx> // SwTxtFrminfo
#include <itrtxt.hxx> // SwTxtMargin
@@ -375,3 +375,4 @@ KSHORT SwTxtFrmInfo::GetBigIndent( xub_StrLen& rFndPos,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index d9f9597d472c..f8b6fe93cdd0 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,7 +47,6 @@
#include <viewimp.hxx> // SwViewImp
#include <viewopt.hxx> // SwViewOption
#include <frmtool.hxx> // DrawGraphic
-#include <txtcfg.hxx>
#include <txtfrm.hxx> // SwTxtFrm
#include <itrpaint.hxx> // SwTxtPainter
#include <txtpaint.hxx> // SwSaveClip
@@ -66,7 +66,7 @@
// --> OD 2006-06-27 #b6440955#
// variable moved to class <numfunc:GetDefBulletConfig>
-//extern const sal_Char __FAR_DATA sBulletFntName[];
+//extern const sal_Char sBulletFntName[];
namespace numfunc
{
extern const String& GetDefBulletFontname();
@@ -141,7 +141,7 @@ SwExtraPainter::SwExtraPainter( const SwTxtFrm *pFrm, ViewShell *pVwSh,
nDivider = rLineInf.GetDivider().Len() ? rLineInf.GetDividerCountBy() : 0;
nX = pFrm->Frm().Left();
SwCharFmt* pFmt = rLineInf.GetCharFmt( const_cast<IDocumentStylePoolAccess&>(*pFrm->GetNode()->getIDocumentStylePoolAccess()) );
- ASSERT( pFmt, "PaintExtraData without CharFmt" );
+ OSL_ENSURE( pFmt, "PaintExtraData without CharFmt" );
pFnt = new SwFont( &pFmt->GetAttrSet(), pFrm->GetTxtNode()->getIDocumentSettingAccess() );
pFnt->Invalidate();
pFnt->ChgPhysFnt( pSh, *pSh->GetOut() );
@@ -437,7 +437,7 @@ SwRect SwTxtFrm::Paint()
#endif
// finger layout
- ASSERT( GetValidPosFlag(), "+SwTxtFrm::Paint: no Calc()" );
+ OSL_ENSURE( GetValidPosFlag(), "+SwTxtFrm::Paint: no Calc()" );
SwRect aRet( Prt() );
if ( IsEmpty() || !HasPara() )
@@ -566,21 +566,25 @@ sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const
}
}
- const XubString aTmp( CH_PAR );
- SwDrawTextInfo aDrawInf( pSh, *pSh->GetOut(), 0, aTmp, 0, 1 );
- aDrawInf.SetLeft( rRect.Left() );
- aDrawInf.SetRight( rRect.Right() );
- aDrawInf.SetPos( aPos );
- aDrawInf.SetSpace( 0 );
- aDrawInf.SetKanaComp( 0 );
- aDrawInf.SetWrong( NULL );
- aDrawInf.SetGrammarCheck( NULL );
- aDrawInf.SetSmartTags( NULL ); // SMARTTAGS
- aDrawInf.SetFrm( this );
- aDrawInf.SetFont( pFnt );
- aDrawInf.SetSnapToGrid( sal_False );
-
- pFnt->_DrawText( aDrawInf );
+ // Don't show the paragraph mark for collapsed paragraphs, when they are hidden
+ if ( EmptyHeight( ) > 1 )
+ {
+ const XubString aTmp( CH_PAR );
+ SwDrawTextInfo aDrawInf( pSh, *pSh->GetOut(), 0, aTmp, 0, 1 );
+ aDrawInf.SetLeft( rRect.Left() );
+ aDrawInf.SetRight( rRect.Right() );
+ aDrawInf.SetPos( aPos );
+ aDrawInf.SetSpace( 0 );
+ aDrawInf.SetKanaComp( 0 );
+ aDrawInf.SetWrong( NULL );
+ aDrawInf.SetGrammarCheck( NULL );
+ aDrawInf.SetSmartTags( NULL ); // SMARTTAGS
+ aDrawInf.SetFrm( this );
+ aDrawInf.SetFont( pFnt );
+ aDrawInf.SetSnapToGrid( sal_False );
+
+ pFnt->_DrawText( aDrawInf );
+ }
delete pClip;
}
delete pFnt;
@@ -610,7 +614,6 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
SwTaggedPDFHelper aTaggedPDFHelperParagraph( 0, &aFrmInfo, 0, *pSh->GetOut() );
// <--
- DBG_LOOP_RESET;
if( !IsEmpty() || !PaintEmpty( rRect, sal_True ) )
{
#if OSL_DEBUG_LEVEL > 1
@@ -618,10 +621,6 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
(void)nDbgY;
#endif
-#ifdef DBGTXT
- if( IsDbg( this ) )
- DBTXTFRM << "Paint()" << endl;
-#endif
if( IsLocked() || IsHiddenNow() || ! Prt().HasArea() )
return;
@@ -629,7 +628,7 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
//Informationen entzogen hat.
if( !HasPara() )
{
- ASSERT( GetValidPosFlag(), "+SwTxtFrm::Paint: no Calc()" );
+ OSL_ENSURE( GetValidPosFlag(), "+SwTxtFrm::Paint: no Calc()" );
// --> FME 2004-10-29 #i29062# pass info that we are currently
// painting.
@@ -642,7 +641,7 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
}
if( !HasPara() )
{
- ASSERT( !this, "+SwTxtFrm::Paint: missing format information" );
+ OSL_ENSURE( !this, "+SwTxtFrm::Paint: missing format information" );
return;
}
}
@@ -677,7 +676,7 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
// die Laenge ist immer wieder interessant.
// Rectangle
- ASSERT( ! IsSwapped(), "A frame is swapped before Paint" );
+ OSL_ENSURE( ! IsSwapped(), "A frame is swapped before Paint" );
SwRect aOldRect( rRect );
SWAP_IF_NOT_SWAPPED( this )
@@ -721,13 +720,6 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
do
{
- //DBG_LOOP; shadows declaration above.
- //resolved into:
-#if OSL_DEBUG_LEVEL > 1
-#ifdef DBG_UTIL
- DbgLoop aDbgLoop2( (const void*) this );
-#endif
-#endif
aLine.DrawTextLine( rRect, aClip, IsUndersized() );
} while( aLine.Next() && aLine.Y() <= nBottom );
@@ -743,7 +735,8 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
UNDO_SWAP( this )
(SwRect&)rRect = aOldRect;
- ASSERT( ! IsSwapped(), "A frame is swapped after Paint" );
+ OSL_ENSURE( ! IsSwapped(), "A frame is swapped after Paint" );
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 9c341c3838ea..31e0a4d8ed73 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,11 +33,9 @@
#include <ctype.h>
#include <editeng/unolingu.hxx>
#include <tools/shl.hxx> // needed for SW_MOD() macro
-#include <errhdl.hxx> // ASSERTs
#include <dlelstnr.hxx>
#include <swmodule.hxx>
#include <IDocumentSettingAccess.hxx>
-#include <txtcfg.hxx>
#include <guess.hxx>
#include <inftxt.hxx>
#include <pagefrm.hxx>
@@ -73,10 +72,10 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
if( !rInf.GetLen() || !rInf.GetTxt().Len() )
return sal_False;
- ASSERT( rInf.GetIdx() < rInf.GetTxt().Len(),
+ OSL_ENSURE( rInf.GetIdx() < rInf.GetTxt().Len(),
"+SwTxtGuess::Guess: invalid SwTxtFormatInfo" );
- ASSERT( nPorHeight, "+SwTxtGuess::Guess: no height" );
+ OSL_ENSURE( nPorHeight, "+SwTxtGuess::Guess: no height" );
sal_uInt16 nMinSize;
sal_uInt16 nMaxSizeDiff;
@@ -173,12 +172,12 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
{
nCutPos = rInf.GetTxtBreak( nLineWidth, nMaxLen, nMaxComp );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if ( STRING_LEN != nCutPos )
{
rInf.GetTxtSize( &rSI, rInf.GetIdx(), nCutPos - rInf.GetIdx(),
nMaxComp, nMinSize, nMaxSizeDiff );
- ASSERT( nMinSize <= nLineWidth, "What a Guess!!!" );
+ OSL_ENSURE( nMinSize <= nLineWidth, "What a Guess!!!" );
}
#endif
}
@@ -329,7 +328,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
{
sal_uInt16 nScript = pBreakIt->GetRealScriptOfText( rInf.GetTxt(),
nLangIndex );
- ASSERT( nScript, "Script is not between 1 and 4" );
+ OSL_ENSURE( nScript, "Script is not between 1 and 4" );
// compare current script with script from last "real" character
if ( nScript - 1 != rInf.GetFont()->GetActual() )
@@ -422,7 +421,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
}
else if ( !bHyph && nBreakPos >= rInf.GetLineStart() )
{
- ASSERT( nBreakPos != STRING_LEN, "we should have found a break pos" );
+ OSL_ENSURE( nBreakPos != STRING_LEN, "we should have found a break pos" );
// found break position within line
xHyphWord = NULL;
@@ -451,7 +450,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// no line break found, setting nBreakPos to STRING_LEN
// causes a break cut
nBreakPos = STRING_LEN;
- ASSERT( nCutPos >= rInf.GetIdx(), "Deep cut" );
+ OSL_ENSURE( nCutPos >= rInf.GetIdx(), "Deep cut" );
nPorLen = nCutPos - rInf.GetIdx();
}
@@ -460,7 +459,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
const xub_StrLen nHangingLen = nBreakPos - nCutPos;
SwPosSize aTmpSize = rInf.GetTxtSize( &rSI, nCutPos,
nHangingLen, 0 );
- ASSERT( !pHanging, "A hanging portion is hanging around" );
+ OSL_ENSURE( !pHanging, "A hanging portion is hanging around" );
pHanging = new SwHangingPortion( aTmpSize );
pHanging->SetLen( nHangingLen );
nPorLen = nCutPos - rInf.GetIdx();
@@ -477,11 +476,11 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
nBreakPos = nOldIdx - 1;
else if ( STRING_LEN != nBreakPos )
{
- ASSERT( nBreakPos >= nFieldDiff, "I've got field trouble!" );
+ OSL_ENSURE( nBreakPos >= nFieldDiff, "I've got field trouble!" );
nBreakPos = nBreakPos - nFieldDiff;
}
- ASSERT( nCutPos >= rInf.GetIdx() && nCutPos >= nFieldDiff,
+ OSL_ENSURE( nCutPos >= rInf.GetIdx() && nCutPos >= nFieldDiff,
"I've got field trouble, part2!" );
nCutPos = nCutPos - nFieldDiff;
@@ -491,7 +490,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
rInf.SetIdx( nOldIdx );
#if OSL_DEBUG_LEVEL > 1
- ASSERT( aDebugString == rInf.GetTxt(),
+ OSL_ENSURE( aDebugString == rInf.GetTxt(),
"Somebody, somebody, somebody put something in my string" );
#endif
}
@@ -544,7 +543,7 @@ sal_Bool SwTxtGuess::AlternativeSpelling( const SwTxtFormatInfo &rInf,
// check, if word has alternative spelling
Reference< XHyphenator > xHyph( ::GetHyphenator() );
- ASSERT( xHyph.is(), "Hyphenator is missing");
+ OSL_ENSURE( xHyph.is(), "Hyphenator is missing");
//! subtract 1 since the UNO-interface is 0 based
xHyphWord = xHyph->queryAlternativeSpelling( OUString(aTxt),
pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ),
@@ -552,3 +551,4 @@ sal_Bool SwTxtGuess::AlternativeSpelling( const SwTxtFormatInfo &rInf,
return xHyphWord.is() && xHyphWord->isAlternativeSpelling();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/guess.hxx b/sw/source/core/text/guess.hxx
index d0ef7b4d5cdb..3f2e457a609e 100644
--- a/sw/source/core/text/guess.hxx
+++ b/sw/source/core/text/guess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,3 +72,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 557d44045d95..17bd0d0ceedb 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,11 +42,7 @@
#include <editeng/brshitem.hxx>
#include <editeng/splwrap.hxx>
#include <editeng/pgrditem.hxx>
-// --> OD 2008-01-17 #newlistlevelattrs#
-#ifndef _SVX_TSTPITEM_HXX
#include <editeng/tstpitem.hxx>
-#endif
-// <--
#include <SwSmartTagMgr.hxx>
#include <linguistic/lngprops.hxx>
@@ -61,9 +58,7 @@
#include <viewopt.hxx> // SwViewOptions
#include <frmtool.hxx> // DrawGraphic
#include <IDocumentSettingAccess.hxx>
-#ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED
#include <IDocumentDeviceAccess.hxx>
-#endif
#include <paratr.hxx> // SwFmtDrop
#include <rootfrm.hxx> // SwRootFrm
#include <inftxt.hxx> // SwTxtInfo
@@ -84,6 +79,10 @@
#include <unomid.h>
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::linguistic2;
using namespace ::com::sun::star::uno;
@@ -103,7 +102,7 @@ using namespace ::com::sun::star::beans;
// --> OD 2006-06-27 #b6440955#
// variable moved to class <numfunc:GetDefBulletConfig>
-//extern const sal_Char __FAR_DATA sBulletFntName[];
+//extern const sal_Char sBulletFntName[];
namespace numfunc
{
extern const String& GetDefBulletFontname();
@@ -111,43 +110,30 @@ namespace numfunc
}
// <--
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// Test2: WYSIWYG++
// Test4: WYSIWYG debug
static sal_Bool bDbgLow = sal_False;
#endif
-#ifdef DBG_UTIL
-
+#if OSL_DEBUG_LEVEL > 1
sal_Bool SwTxtSizeInfo::IsOptCalm() const { return !GetOpt().IsTest3(); }
-
sal_Bool SwTxtSizeInfo::IsOptLow() const { return bDbgLow; }
-
sal_Bool SwTxtSizeInfo::IsOptDbg() const { return GetOpt().IsTest4(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest1() const { return GetOpt().IsTest1(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest2() const { return GetOpt().IsTest2(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest3() const { return GetOpt().IsTest3(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest4() const { return GetOpt().IsTest4(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest5() const { return GetOpt().IsTest5(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest6() const { return GetOpt().IsTest6(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest7() const { return GetOpt().IsTest7(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest8() const { return GetOpt().IsTest8(); }
-
#endif
/*************************************************************************
* SwLineInfo::SwLineInfo()
*************************************************************************/
-// --> OD 2008-01-17 #newlistlevelattrs#
SwLineInfo::SwLineInfo()
: pRuler( 0 ),
pSpace( 0 ),
@@ -164,10 +150,7 @@ SwLineInfo::~SwLineInfo()
}
void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet,
const SwTxtNode& rTxtNode )
-// <--
{
- // --> OD 2008-01-17 #newlistlevelattrs#
-// pRuler = &rAttrSet.GetTabStops();
delete pRuler;
pRuler = new SvxTabStopItem( rAttrSet.GetTabStops() );
if ( rTxtNode.GetListTabStopPosition( nListTabStopPosition ) )
@@ -190,8 +173,7 @@ void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet,
}
}
}
- // <--
- // --> OD 2008-02-15 #newlistlevelattrs#
+
if ( !rTxtNode.getIDocumentSettingAccess()->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT) )
{
// remove default tab stop at position 0
@@ -205,7 +187,7 @@ void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet,
}
}
}
- // <--
+
pSpace = &rAttrSet.GetLineSpacing();
nVertAlign = rAttrSet.GetParaVertAlign().GetValue();
nDefTabStop = MSHRT_MAX;
@@ -221,7 +203,7 @@ void SwTxtInfo::CtorInitTxtInfo( SwTxtFrm *pFrm )
nTxtStart = pFrm->GetOfst();
if( !pPara )
{
- ASSERT( pPara, "+SwTxtInfo::CTOR: missing paragraph information" );
+ OSL_ENSURE( pPara, "+SwTxtInfo::CTOR: missing paragraph information" );
pFrm->Format();
pPara = pFrm->GetPara();
}
@@ -233,7 +215,7 @@ SwTxtInfo::SwTxtInfo( const SwTxtInfo &rInf )
{ }
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
/*************************************************************************
* ChkOutDev()
*************************************************************************/
@@ -245,7 +227,7 @@ void ChkOutDev( const SwTxtSizeInfo &rInf )
const OutputDevice* pOut = rInf.GetOut();
const OutputDevice* pRef = rInf.GetRefDev();
- ASSERT( pOut && pRef, "ChkOutDev: invalid output devices" )
+ OSL_ENSURE( pOut && pRef, "ChkOutDev: invalid output devices" );
}
#endif // PRODUCT
@@ -286,7 +268,7 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew )
bSnapToGrid( rNew.SnapToGrid() ),
nDirection( rNew.GetDirection() )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
ChkOutDev( *this );
#endif
}
@@ -323,7 +305,7 @@ void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt,
pRef = pOut;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
ChkOutDev( *this );
#endif
@@ -341,18 +323,6 @@ void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt,
nDirection = DIR_LEFT2RIGHT;
}
-/* LanguageType eLang;
- const SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions();
- if ( SvtCTLOptions::NUMERALS_HINDI == rCTLOptions.GetCTLTextNumerals() )
- eLang = LANGUAGE_ARABIC_SAUDI_ARABIA;
- else if ( SvtCTLOptions::NUMERALS_ARABIC == rCTLOptions.GetCTLTextNumerals() )
- eLang = LANGUAGE_ENGLISH;
- else
- eLang = (LanguageType)::GetAppLanguage();
-
- pOut->SetDigitLanguage( eLang );
- pRef->SetDigitLanguage( eLang );*/
-
//
// The Options
//
@@ -411,7 +381,7 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew, const XubString &rTxt,
bSnapToGrid( rNew.SnapToGrid() ),
nDirection( rNew.GetDirection() )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
ChkOutDev( *this );
#endif
SetLen( GetMinLen( *this ) );
@@ -440,8 +410,8 @@ void SwTxtSizeInfo::NoteAnimation() const
if( OnWin() )
SwRootFrm::FlushVout();
- ASSERT( pOut == pVsh->GetOut(),
- "SwTxtSizeInfo::NoteAnimation() changed pOut" )
+ OSL_ENSURE( pOut == pVsh->GetOut(),
+ "SwTxtSizeInfo::NoteAnimation() changed pOut" );
}
/*************************************************************************
@@ -518,7 +488,7 @@ xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
const SwScriptInfo& rScriptInfo =
( (SwParaPortion*)GetParaPortion() )->GetScriptInfo();
- ASSERT( pRef == pOut, "GetTxtBreak is supposed to use the RefDev" )
+ OSL_ENSURE( pRef == pOut, "GetTxtBreak is supposed to use the RefDev" );
SwDrawTextInfo aDrawInf( pVsh, *pOut, &rScriptInfo,
*pTxt, GetIdx(), nMaxLen );
aDrawInf.SetFrm( pFrm );
@@ -542,7 +512,7 @@ xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
const SwScriptInfo& rScriptInfo =
( (SwParaPortion*)GetParaPortion() )->GetScriptInfo();
- ASSERT( pRef == pOut, "GetTxtBreak is supposed to use the RefDev" )
+ OSL_ENSURE( pRef == pOut, "GetTxtBreak is supposed to use the RefDev" );
SwDrawTextInfo aDrawInf( pVsh, *pOut, &rScriptInfo,
*pTxt, GetIdx(), nMaxLen );
aDrawInf.SetFrm( pFrm );
@@ -569,10 +539,10 @@ void SwTxtPaintInfo::CtorInitTxtPaintInfo( SwTxtFrm *pFrame, const SwRect &rPain
pGrammarCheckList = NULL;
pSmartTags = NULL; // SMARTTAGS
-#ifndef DBG_UTIL
- pBrushItem = 0;
-#else
+#if OSL_DEBUG_LEVEL > 1
pBrushItem = ((SvxBrushItem*)-1);
+#else
+ pBrushItem = 0;
#endif
}
@@ -709,7 +679,7 @@ void SwTxtPaintInfo::_DrawText( const XubString &rText, const SwLinePortion &rPo
const sal_Bool bTmpGrammarCheck = bGrammarCheck && OnWin() && bCfgIsAutoGrammar && GetOpt().IsOnlineSpell();
const sal_Bool bTmpSmart = bSmartTag && OnWin() && !GetOpt().IsPagePreview() && SwSmartTagMgr::Get().IsSmartTagsEnabled(); // SMARTTAGS
- ASSERT( GetParaPortion(), "No paragraph!");
+ OSL_ENSURE( GetParaPortion(), "No paragraph!");
SwDrawTextInfo aDrawInf( pFrm->GetShell(), *pOut, pSI, rText, nStart, nLength,
rPor.Width(), bBullet );
@@ -920,7 +890,7 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
nMaxWidth = rRect.Height();
break;
default:
- ASSERT( sal_False, "Unknown direction set at font" )
+ OSL_ENSURE( sal_False, "Unknown direction set at font" );
break;
}
@@ -998,7 +968,7 @@ void SwTxtPaintInfo::DrawRect( const SwRect &rRect, sal_Bool bNoGraphic,
pOut->DrawRect( rRect.SVRect() );
else
{
- ASSERT( ((SvxBrushItem*)-1) != pBrushItem, "DrawRect: Uninitialized BrushItem!" );
+ OSL_ENSURE( ((SvxBrushItem*)-1) != pBrushItem, "DrawRect: Uninitialized BrushItem!" );
::DrawGraphic( pBrushItem, pOut, aItemRect, rRect );
}
}
@@ -1177,7 +1147,7 @@ void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked)
*************************************************************************/
void SwTxtPaintInfo::DrawBackground( const SwLinePortion &rPor ) const
{
- ASSERT( OnWin(), "SwTxtPaintInfo::DrawBackground: printer polution ?" );
+ OSL_ENSURE( OnWin(), "SwTxtPaintInfo::DrawBackground: printer polution ?" );
SwRect aIntersect;
CalcRect( rPor, 0, &aIntersect );
@@ -1246,7 +1216,7 @@ void SwTxtPaintInfo::_DrawBackBrush( const SwLinePortion &rPor ) const
}
if( !pFnt->GetBackColor() ) return;
- ASSERT( pFnt->GetBackColor(), "DrawBackBrush: Lost Color" );
+ OSL_ENSURE( pFnt->GetBackColor(), "DrawBackBrush: Lost Color" );
SwRect aIntersect;
CalcRect( rPor, 0, &aIntersect );
@@ -1304,7 +1274,7 @@ void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
case POR_BLANK: if ( GetOpt().IsHardBlank())bDraw = sal_True; break;
default:
{
- ASSERT( !this, "SwTxtPaintInfo::DrawViewOpt: don't know how to draw this" );
+ OSL_ENSURE( !this, "SwTxtPaintInfo::DrawViewOpt: don't know how to draw this" );
break;
}
}
@@ -1319,7 +1289,7 @@ void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
void SwTxtPaintInfo::_NotifyURL( const SwLinePortion &rPor ) const
{
- ASSERT( pNoteURL, "NotifyURL: pNoteURL gone with the wind!" );
+ OSL_ENSURE( pNoteURL, "NotifyURL: pNoteURL gone with the wind!" );
SwRect aIntersect;
CalcRect( rPor, 0, &aIntersect );
@@ -1367,7 +1337,7 @@ static void lcl_InitHyphValues( PropertyValues &rVals,
pVal[1].Value <<= nMinTrailing;
}
else {
- DBG_ERROR( "unxpected size of sequence" );
+ OSL_FAIL( "unxpected size of sequence" );
}
}
@@ -1524,7 +1494,7 @@ void SwTxtFormatInfo::Init()
SetPaintOfst(0);
}
-/*-----------------16.10.00 11:39-------------------
+/*--------------------------------------------------
* There are a few differences between a copy constructor
* and the following constructor for multi-line formatting.
* The root is the first line inside the multi-portion,
@@ -1635,12 +1605,6 @@ xub_StrLen SwTxtFormatInfo::ScanPortionEnd( const xub_StrLen nStart,
bool bNumFound = false;
const bool bTabCompat = GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT);
- // Removed for i7288. bSkip used to be passed from SwFldPortion::Format
- // as IsFollow(). Therefore more than one special character was not
- // handled correctly at the beginning of follow fields.
-// if ( bSkip && i < nEnd )
-// ++i;
-
for( ; i < nEnd; ++i )
{
const xub_Unicode cPos = GetChar( i );
@@ -1659,8 +1623,6 @@ xub_StrLen SwTxtFormatInfo::ScanPortionEnd( const xub_StrLen nStart,
case CH_BREAK:
case CHAR_ZWSP :
case CHAR_ZWNBSP :
-// case CHAR_RLM :
-// case CHAR_LRM :
cHookChar = cPos;
return i;
@@ -1674,7 +1636,7 @@ xub_StrLen SwTxtFormatInfo::ScanPortionEnd( const xub_StrLen nStart,
{
if( cTabDec == cPos )
{
- ASSERT( cPos, "Unexpected end of string" );
+ OSL_ENSURE( cPos, "Unexpected end of string" );
if( cPos ) // robust
{
cHookChar = cPos;
@@ -1977,3 +1939,4 @@ sal_Bool SwTxtFormatInfo::ChgHyph( const sal_Bool bNew )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 065e38a0e563..45f153c53612 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
#include <com/sun/star/beans/PropertyValues.hpp>
-#ifndef _TABLE_HXX //autogen
#include <tools/table.hxx>
-#endif
#include "swtypes.hxx"
#include "txttypes.hxx"
@@ -41,7 +40,6 @@
#include "porlay.hxx"
#include "txtfrm.hxx"
#include "ndtxt.hxx"
-#include "txttypes.hxx"
#include <editeng/paravertalignitem.hxx>
class Font;
@@ -76,7 +74,7 @@ class SwWrongList;
#define DIR_RIGHT2LEFT 2
#define DIR_TOP2BOTTOM 3
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
#define OPTCALM( rInf ) (rInf).IsOptCalm()
#define OPTLOW( rInf ) (rInf).IsOptLow()
#define OPTDBG( rInf ) (rInf).IsOptDbg()
@@ -100,17 +98,12 @@ class SwLineInfo
const SvxLineSpacingItem *pSpace;
sal_uInt16 nVertAlign;
KSHORT nDefTabStop;
- // --> OD 2008-02-04 #newlistlevelattrs#
bool bListTabStopIncluded;
long nListTabStopPosition;
- // <--
- // --> OD 2008-01-17 #newlistlevelattrs#
void CtorInitLineInfo( const SwAttrSet& rAttrSet,
const SwTxtNode& rTxtNode );
- // <--
- // --> OD 2008-01-17 #newlistlevelattrs#
SwLineInfo();
~SwLineInfo();
public:
@@ -134,7 +127,6 @@ public:
sal_uInt16 NumberOfTabStops() const;
- // --> OD 2008-02-04 #newlistlevelattrs#
inline bool IsListTabStopIncluded() const
{
return bListTabStopIncluded;
@@ -143,8 +135,6 @@ public:
{
return nListTabStopPosition;
}
- // <--
-
// friend ostream &operator<<( ostream &rOS, const SwLineInfo &rInf );
friend SvStream &operator<<( SvStream &rOS, const SwLineInfo &rInf );
@@ -162,7 +152,7 @@ class SwTxtInfo
xub_StrLen nTxtStart; // TxtOfst bei Follows
protected:
- inline SwTxtInfo() { }
+ inline SwTxtInfo() : pPara(0) {}
public:
void CtorInitTxtInfo( SwTxtFrm *pFrm );
SwTxtInfo( const SwTxtInfo &rInf );
@@ -226,7 +216,7 @@ protected:
void CtorInitTxtSizeInfo( SwTxtFrm *pFrm, SwFont *pFnt = 0,
const xub_StrLen nIdx = 0,
const xub_StrLen nLen = STRING_LEN );
- SwTxtSizeInfo() {}
+ SwTxtSizeInfo() : pKanaComp(0), pVsh(0), pOut(0), pRef(0), pFnt(0), pUnderFnt(0), pFrm(0), pOpt(0), pTxt(0) {}
public:
SwTxtSizeInfo( const SwTxtSizeInfo &rInf );
SwTxtSizeInfo( const SwTxtSizeInfo &rInf, const XubString &rTxt,
@@ -381,7 +371,7 @@ public:
{ return ( pKanaComp && nKanaIdx < pKanaComp->Count() )
? (*pKanaComp)[nKanaIdx] : 0; }
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool IsOptCalm() const;
sal_Bool IsOptLow() const;
sal_Bool IsOptDbg() const;
@@ -424,11 +414,11 @@ class SwTxtPaintInfo : public SwTxtSizeInfo
void _DrawBackBrush( const SwLinePortion &rPor ) const;
protected:
-#ifndef DBG_UTIL
- SwTxtPaintInfo() { pFrm = 0; pWrongList = 0; pGrammarCheckList = 0; pWrongList = 0; pSmartTags = 0; pSpaceAdd = 0; pBrushItem = 0;}
-#else
+#if OSL_DEBUG_LEVEL > 1
SwTxtPaintInfo() { pFrm = 0; pWrongList = 0; pGrammarCheckList = 0; pSmartTags = 0; pSpaceAdd = 0;
pBrushItem = ((SvxBrushItem*)-1);}
+#else
+ SwTxtPaintInfo() { pFrm = 0; pWrongList = 0; pGrammarCheckList = 0; pWrongList = 0; pSmartTags = 0; pSpaceAdd = 0; pBrushItem = 0;}
#endif
public:
SwTxtPaintInfo( const SwTxtPaintInfo &rInf );
@@ -813,13 +803,13 @@ public:
inline KSHORT SwTxtSizeInfo::GetAscent() const
{
- ASSERT( GetOut(), "SwTxtSizeInfo::GetAscent() without pOut" )
+ OSL_ENSURE( GetOut(), "SwTxtSizeInfo::GetAscent() without pOut" );
return ((SwFont*)GetFont())->GetAscent( pVsh, *GetOut() );
}
inline KSHORT SwTxtSizeInfo::GetTxtHeight() const
{
- ASSERT( GetOut(), "SwTxtSizeInfo::GetTxtHeight() without pOut" )
+ OSL_ENSURE( GetOut(), "SwTxtSizeInfo::GetTxtHeight() without pOut" );
return ((SwFont*)GetFont())->GetHeight( pVsh, *GetOut() );
}
@@ -903,3 +893,4 @@ inline sal_Bool SwTxtFormatInfo::IsSoftHyph( const xub_StrLen nPos ) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index a262b411a4f9..9323716fd6b2 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <vcl/outdev.hxx>
#include <IDocumentSettingAccess.hxx>
#include "frame.hxx" // CalcFlyAdjust()
#include "paratr.hxx"
-#include "txtcfg.hxx"
#include "itrtxt.hxx"
#include "porglue.hxx"
#include "porlay.hxx"
@@ -271,9 +269,9 @@ bool lcl_CheckKashidaWidth ( SwScriptInfo& rSI, SwTxtSizeInfo& rInf, SwTxtIter&
void SwTxtAdjuster::CalcNewBlock( SwLineLayout *pCurrent,
const SwLinePortion *pStopAt, SwTwips nReal, bool bSkipKashida )
{
- ASSERT( GetInfo().IsMulti() || SVX_ADJUST_BLOCK == GetAdjust(),
+ OSL_ENSURE( GetInfo().IsMulti() || SVX_ADJUST_BLOCK == GetAdjust(),
"CalcNewBlock: Why?" );
- ASSERT( pCurrent->Height(), "SwTxtAdjuster::CalcBlockAdjust: missing CalcLine()" );
+ OSL_ENSURE( pCurrent->Height(), "SwTxtAdjuster::CalcBlockAdjust: missing CalcLine()" );
pCurrent->InitSpaceAdd();
xub_StrLen nGluePortion = 0;
@@ -423,8 +421,8 @@ void SwTxtAdjuster::CalcNewBlock( SwLineLayout *pCurrent,
SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
{
- ASSERT( pCurrent->Height(), "SwTxtAdjuster::CalcBlockAdjust: missing CalcLine()" );
- ASSERT( !pCurrent->GetpKanaComp(), "pKanaComp already exists!!" );
+ OSL_ENSURE( pCurrent->Height(), "SwTxtAdjuster::CalcBlockAdjust: missing CalcLine()" );
+ OSL_ENSURE( !pCurrent->GetpKanaComp(), "pKanaComp already exists!!" );
SvUShorts *pNewKana = new SvUShorts;
pCurrent->SetKanaComp( pNewKana );
@@ -714,7 +712,7 @@ void SwTxtAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent )
void SwTxtAdjuster::CalcAdjLine( SwLineLayout *pCurrent )
{
- ASSERT( pCurrent->IsFormatAdj(), "CalcAdjLine: Why?" );
+ OSL_ENSURE( pCurrent->IsFormatAdj(), "CalcAdjLine: Why?" );
pCurrent->SetFormatAdj(sal_False);
@@ -731,21 +729,7 @@ void SwTxtAdjuster::CalcAdjLine( SwLineLayout *pCurrent )
}
case SVX_ADJUST_BLOCK:
{
- // disabled for #i13507#
- // 8311: In Zeilen mit LineBreaks gibt es keinen Blocksatz!
-/* if( pCurrent->GetLen() &&
- CH_BREAK == GetInfo().GetChar( nStart + pCurrent->GetLen() - 1 ) &&
- !IsLastBlock() )
- {
- if( IsLastCenter() )
- {
- CalcFlyAdjust( pCurrent );
- pPara->GetRepaint()->SetOfst( 0 );
- break;
- }
- return;
- }
-*/ FormatBlock();
+ FormatBlock();
break;
}
default : return;
@@ -815,8 +799,8 @@ SwFlyPortion *SwTxtAdjuster::CalcFlyPortion( const long nRealWidth,
void SwTxtAdjuster::CalcDropAdjust()
{
- ASSERT( 1<GetDropLines() && SVX_ADJUST_LEFT!=GetAdjust() && SVX_ADJUST_BLOCK!=GetAdjust(),
- "CalcDropAdjust: No reason for DropAdjustment." )
+ OSL_ENSURE( 1<GetDropLines() && SVX_ADJUST_LEFT!=GetAdjust() && SVX_ADJUST_BLOCK!=GetAdjust(),
+ "CalcDropAdjust: No reason for DropAdjustment." );
const MSHORT nLineNumber = GetLineNr();
@@ -883,9 +867,6 @@ void SwTxtAdjuster::CalcDropAdjust()
pLeft->MoveAllGlue( pRight );
else
pLeft->MoveGlue( pRight, nGlue );
-#ifdef DBGTXT
- aDbstream << "Drop adjusted: " << nGlue << endl;
-#endif
}
}
}
@@ -917,3 +898,4 @@ void SwTxtAdjuster::CalcDropRepaint()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 83e49dc14584..354de3eca96b 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,7 +73,7 @@ using namespace ::com::sun::star;
void SwAttrIter::Chg( SwTxtAttr *pHt )
{
- ASSERT( pHt && pFnt, "No attribute of font available for change");
+ OSL_ENSURE( pHt && pFnt, "No attribute of font available for change");
if( pRedln && pRedln->IsOn() )
pRedln->ChangeTxtAttr( pFnt, *pHt, sal_True );
else
@@ -86,7 +87,7 @@ void SwAttrIter::Chg( SwTxtAttr *pHt )
void SwAttrIter::Rst( SwTxtAttr *pHt )
{
- ASSERT( pHt && pFnt, "No attribute of font available for reset");
+ OSL_ENSURE( pHt && pFnt, "No attribute of font available for reset");
// get top from stack after removing pHt
if( pRedln && pRedln->IsOn() )
pRedln->ChangeTxtAttr( pFnt, *pHt, sal_False );
@@ -371,7 +372,7 @@ public:
SwMinMaxArgs( OutputDevice* pOutI, ViewShell* pShI, sal_uLong& rMinI, sal_uLong &rMaxI, sal_uLong &rAbsI )
: pOut( pOutI ), pSh( pShI ), rMin( rMinI ), rMax( rMaxI ), rAbsMin( rAbsI )
{ nRowWidth = nWordWidth = nWordAdd = 0; nNoLineBreak = STRING_LEN; }
- void Minimum( long nNew ) { if( (long)rMin < nNew ) rMin = nNew; }
+ void Minimum( long nNew ) const { if( (long)rMin < nNew ) rMin = nNew; }
void NewWord() { nWordAdd = nWordWidth = 0; }
};
@@ -468,7 +469,7 @@ sal_Bool lcl_MinMaxNode( const SwFrmFmtPtr& rpNd, void* pArgs )
{
const SwMinMaxNodeArgs *pIn = (const SwMinMaxNodeArgs*)pArgs;
const SwPosition *pPos = rFmtA.GetCntntAnchor();
- ASSERT(pPos && pIn, "Unexpected NULL arguments");
+ OSL_ENSURE(pPos && pIn, "Unexpected NULL arguments");
if (!pPos || !pIn || pIn->nIndx != pPos->nNode.GetIndex())
bCalculate = false;
}
@@ -744,7 +745,7 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
if( RES_FLYFRMFMT == pFrmFmt->Which()
&& rTmpSize.GetWidthPercent() )
{
-/*-----------------24.01.97 14:09----------------------------------------------
+/*-----------------------------------------------------------------------------
* Hier ein HACK fuer folgende Situation: In dem Absatz befindet sich
* ein Textrahmen mit relativer Groesse. Dann nehmen wir mal als minimale
* Breite 0,5 cm und als maximale KSHRT_MAX.
@@ -845,7 +846,7 @@ sal_uInt16 SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd
pOut = getIDocumentDeviceAccess()->getReferenceDevice( true );
}
- ASSERT( pOut, "GetScalingOfSelectedText without outdev" )
+ OSL_ENSURE( pOut, "GetScalingOfSelectedText without outdev" );
MapMode aOldMap( pOut->GetMapMode() );
pOut->SetMapMode( MapMode( MAP_TWIP ) );
@@ -1084,3 +1085,5 @@ sal_uInt16 SwTxtNode::GetWidthOfLeadingTabs() const
return nRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx
index 372c6083b73f..a9e5b455e1f9 100644
--- a/sw/source/core/text/itratr.hxx
+++ b/sw/source/core/text/itratr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,7 +80,9 @@ protected:
void Rst( SwTxtAttr *pHt );
void CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, SwTxtFrm* pFrm = 0 );
inline SwAttrIter(SwTxtNode* pTxtNode)
- : pShell(0), pFnt(0), pLastOut(0), nChgCnt(0), pRedln(0), nPropFont(0), m_pTxtNode(pTxtNode) {}
+ : pShell(0), pFnt(0), pHints(0), pAttrSet(0), pScriptInfo(0), pLastOut(0), nChgCnt(0), pRedln(0), nPropFont(0), m_pTxtNode(pTxtNode) {
+ aMagicNo[SW_LATIN] = aMagicNo[SW_CJK] = aMagicNo[SW_CTL] = NULL;
+ }
public:
// Konstruktor, Destruktor
@@ -129,3 +132,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 67569418f0bb..b480f2cff520 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#include "precompiled_sw.hxx"
#include "hintids.hxx"
-#include "errhdl.hxx"
#include "ndtxt.hxx"
#include "frmfmt.hxx"
#include "paratr.hxx"
@@ -47,7 +47,6 @@
#include <IDocumentSettingAccess.hxx>
#include <pagefrm.hxx>
-#include "txtcfg.hxx"
#include "itrtxt.hxx"
#include "txtfrm.hxx"
#include "flyfrms.hxx"
@@ -77,7 +76,7 @@ void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig,
const SwCrsrMoveState& rCMS,
const SwLinePortion& rPor )
{
- ASSERT( rCMS.pSpecialPos, "Information about special pos missing" )
+ OSL_ENSURE( rCMS.pSpecialPos, "Information about special pos missing" );
if ( rPor.InFldGrp() && ((SwFldPortion&)rPor).GetExp().Len() )
{
@@ -109,7 +108,7 @@ void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig,
} while ( sal_True );
- ASSERT( nCharOfst >= nFldIdx, "Request of position inside field failed" )
+ OSL_ENSURE( nCharOfst >= nFldIdx, "Request of position inside field failed" );
sal_uInt16 nLen = nCharOfst - nFldIdx + 1;
if ( pString )
@@ -200,7 +199,6 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
const int nLMWithNum = pNode->GetLeftMarginWithNum( sal_True );
if ( pFrm->IsRightToLeft() )
{
- // --> OD 2008-01-23 #newlistlevelattrs#
// this calculation is identical this the calculation for L2R layout - see below
nLeft = pFrm->Frm().Left() +
pFrm->Prt().Left() +
@@ -287,7 +285,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
case SVX_LINE_SPACE_FIX:
nFirstLineOfs = pSpace->GetLineHeight();
break;
- default: ASSERT( sal_False, ": unknown LineSpaceRule" );
+ default: OSL_ENSURE( sal_False, ": unknown LineSpaceRule" );
}
switch( pSpace->GetInterLineSpaceRule() )
{
@@ -313,7 +311,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
nFirstLineOfs += pSpace->GetInterLineSpace();
break;
}
- default: ASSERT( sal_False, ": unknown InterLineSpaceRule" );
+ default: OSL_ENSURE( sal_False, ": unknown InterLineSpaceRule" );
}
}
}
@@ -338,13 +336,11 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
pFrm->Prt().Left() );
}
- // --> OD 2008-01-31 #newlistlevelattrs#
// Note: <SwTxtFrm::GetAdditionalFirstLineOffset()> returns a negative
// value for the new list label postion and space mode LABEL_ALIGNMENT
// and label alignment CENTER and RIGHT in L2R layout respectively
// label alignment LEFT and CENTER in R2L layout
nFirst += pFrm->GetAdditionalFirstLineOffset();
- // <--
if( nFirst >= nRight )
nFirst = nRight - 1;
@@ -498,7 +494,7 @@ sal_Bool SwTxtCursor::GetEndCharRect( SwRect* pOrig, const xub_StrLen nOfst,
pCMS->aRealHeight.X() = nTmpAscent - nPorAscent;
else
pCMS->aRealHeight.X() = 0;
- ASSERT( nPorHeight, "GetCharRect: Missing Portion-Height" );
+ OSL_ENSURE( nPorHeight, "GetCharRect: Missing Portion-Height" );
pCMS->aRealHeight.Y() = nPorHeight;
}
@@ -575,10 +571,8 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
if( bNoTxt )
nTmpFirst = nX;
// 8670: EndPortions zaehlen hier einmal als TxtPortions.
- // --> OD 2008-01-28 #newlistlevelattrs#
// if( pPor->InTxtGrp() || pPor->IsBreakPortion() )
if( pPor->InTxtGrp() || pPor->IsBreakPortion() || pPor->InTabGrp() )
- // <--
{
bNoTxt = sal_False;
nTmpFirst = nX;
@@ -963,7 +957,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
if( pPor )
{
- ASSERT( !pPor->InNumberGrp() || bInsideFirstField, "Number surprise" );
+ OSL_ENSURE( !pPor->InNumberGrp() || bInsideFirstField, "Number surprise" );
sal_Bool bEmptyFld = sal_False;
if( pPor->InFldGrp() && pPor->GetLen() )
{
@@ -974,7 +968,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
SwLinePortion *pNext = pTmp->GetPortion();
while( pNext && !pNext->InFldGrp() )
{
- ASSERT( !pNext->GetLen(), "Where's my field follow?" );
+ OSL_ENSURE( !pNext->GetLen(), "Where's my field follow?" );
nAddX = nAddX + pNext->Width();
pNext = pNext->GetPortion();
}
@@ -1046,7 +1040,6 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
// Ausgleich vor 's'.
while( pPor && !pPor->GetLen() )
{
- DBG_LOOP;
nX += pPor->Width();
if( !pPor->IsMarginPortion() )
{
@@ -1151,8 +1144,8 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
const SwLinePortion *pLast = rLineLayout.FindLastPortion();
if ( pLast->IsMultiPortion() )
{
- ASSERT( ((SwMultiPortion*)pLast)->IsBidi(),
- "Non-BidiPortion inside BidiPortion" )
+ OSL_ENSURE( ((SwMultiPortion*)pLast)->IsBidi(),
+ "Non-BidiPortion inside BidiPortion" );
pOrig->Pos().X() += pLast->Width() +
pLast->CalcSpacing( nSpaceAdd, aInf );
}
@@ -1181,7 +1174,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
pCMS->aRealHeight.X() = nTmpAscent - nPorAscent;
else
pCMS->aRealHeight.X() = 0;
- ASSERT( nPorHeight, "GetCharRect: Missing Portion-Height" );
+ OSL_ENSURE( nPorHeight, "GetCharRect: Missing Portion-Height" );
if ( nTmpHeight > nPorHeight )
pCMS->aRealHeight.Y() = nPorHeight;
else
@@ -1208,8 +1201,8 @@ sal_Bool SwTxtCursor::GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
{
const sal_uInt8 nExtendRange = pCMS->pSpecialPos->nExtendRange;
- ASSERT( ! pCMS->pSpecialPos->nLineOfst || SP_EXTEND_RANGE_BEFORE != nExtendRange,
- "LineOffset AND Number Portion?" )
+ OSL_ENSURE( ! pCMS->pSpecialPos->nLineOfst || SP_EXTEND_RANGE_BEFORE != nExtendRange,
+ "LineOffset AND Number Portion?" );
// portions which are behind the string
if ( SP_EXTEND_RANGE_BEHIND == nExtendRange )
@@ -1293,7 +1286,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
// x ist der horizontale Offset innerhalb der Zeile.
SwTwips x = rPoint.X();
- CONST SwTwips nLeftMargin = GetLineStart();
+ const SwTwips nLeftMargin = GetLineStart();
SwTwips nRightMargin = GetLineEnd();
if( nRightMargin == nLeftMargin )
nRightMargin += 30;
@@ -1628,7 +1621,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
((SwDropPortion*)pPor)->GetFnt() : NULL );
SwParaPortion* pPara = (SwParaPortion*)GetInfo().GetParaPortion();
- ASSERT( pPara, "No paragraph!" );
+ OSL_ENSURE( pPara, "No paragraph!" );
SwDrawTextInfo aDrawInf( aSizeInf.GetVsh(),
*aSizeInf.GetOut(),
@@ -1884,3 +1877,4 @@ bool SwTxtFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) c
return bRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 66251e83e618..f4b63fd7c293 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include "hintids.hxx"
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <editeng/lspcitem.hxx>
#include <txtftn.hxx>
#include <fmtftn.hxx>
@@ -43,7 +42,6 @@
#include <viewsh.hxx>
#include <viewopt.hxx> // SwViewOptions
#include <paratr.hxx> // SwFmtDrop
-#include <txtcfg.hxx>
#include <itrform2.hxx>
#include <porrst.hxx>
#include <portab.hxx> // pLastTab->
@@ -62,10 +60,10 @@
#include <tgrditem.hxx>
#include <doc.hxx> // SwDoc
#include <pormulti.hxx> // SwMultiPortion
-#define _SVSTDARR_LONGS
-#include <svl/svstdarr.hxx>
#include <unotools/charclass.hxx>
+#include <vector>
+
#if OSL_DEBUG_LEVEL > 1
#include <ndtxt.hxx> // pSwpHints, Ausgabeoperator
#endif
@@ -73,7 +71,16 @@
using namespace ::com::sun::star;
extern sal_Bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt );
-bool lcl_BuildHiddenPortion( const SwTxtSizeInfo& rInf, xub_StrLen &rPos );
+
+namespace {
+ //! Calculates and sets optimal repaint offset for the current line
+ static long lcl_CalcOptRepaint( SwTxtFormatter &rThis,
+ SwLineLayout &rCurr,
+ const xub_StrLen nOldLineEnd,
+ const std::vector<long> &rFlyStarts );
+ //! Determine if we need to build hidden portions
+ static bool lcl_BuildHiddenPortion( const SwTxtSizeInfo& rInf, xub_StrLen &rPos );
+}
#define MAX_TXTPORLEN 300
@@ -109,7 +116,7 @@ void SwTxtFormatter::CtorInitTxtFormatter( SwTxtFrm *pNewFrm, SwTxtFormatInfo *p
if( nStart > GetInfo().GetTxt().Len() )
{
- ASSERT( !this, "+SwTxtFormatter::CTOR: bad offset" );
+ OSL_ENSURE( !this, "+SwTxtFormatter::CTOR: bad offset" );
nStart = GetInfo().GetTxt().Len();
}
@@ -210,7 +217,6 @@ SwLinePortion *SwTxtFormatter::UnderFlow( SwTxtFormatInfo &rInf )
SwLinePortion *pTmpPrev = pPor;
while( pPor && pPor != pUnderFlow )
{
- DBG_LOOP;
if( !pPor->IsKernPortion() &&
( pPor->Width() || pPor->IsSoftHyphPortion() ) )
{
@@ -219,7 +225,7 @@ SwLinePortion *SwTxtFormatter::UnderFlow( SwTxtFormatInfo &rInf )
pTmpPrev->Move( rInf );
rInf.SetLast( pTmpPrev );
pTmpPrev = pTmpPrev->GetPortion();
- ASSERT( pTmpPrev, "UnderFlow: Loosing control!" );
+ OSL_ENSURE( pTmpPrev, "UnderFlow: Loosing control!" );
};
}
pPor = pPor->GetPortion();
@@ -237,7 +243,7 @@ SwLinePortion *SwTxtFormatter::UnderFlow( SwTxtFormatInfo &rInf )
}
// Was? Die Unterlaufsituation ist nicht in der Portion-Kette ?
- ASSERT( pPor, "SwTxtFormatter::UnderFlow: overflow but underflow" );
+ OSL_ENSURE( pPor, "SwTxtFormatter::UnderFlow: overflow but underflow" );
// OD 2004-05-26 #i29529# - correction: no delete of footnotes
// if( rInf.IsFtnInside() && pPor && !rInf.IsQuick() )
@@ -368,7 +374,6 @@ void SwTxtFormatter::InsertPortion( SwTxtFormatInfo &rInf,
rInf.SetLast( pPor );
while( pPor )
{
- DBG_LOOP;
pPor->Move( rInf );
rInf.SetLast( pPor );
pPor = pPor->GetPortion();
@@ -381,7 +386,7 @@ void SwTxtFormatter::InsertPortion( SwTxtFormatInfo &rInf,
void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
{
- ASSERT( rInf.GetTxt().Len() < STRING_LEN,
+ OSL_ENSURE( rInf.GetTxt().Len() < STRING_LEN,
"SwTxtFormatter::BuildPortions: bad text length in info" );
rInf.ChkNoHyph( CntEndHyph(), CntMidHyph() );
@@ -392,7 +397,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
rInf.SetLast( pCurr );
rInf.ForcedLeftMargin( 0 );
- ASSERT( pCurr->FindLastPortion() == pCurr, "pLast supposed to equal pCurr" );
+ OSL_ENSURE( pCurr->FindLastPortion() == pCurr, "pLast supposed to equal pCurr" );
if( !pCurr->GetAscent() && !pCurr->Height() )
CalcAscent( rInf, pCurr );
@@ -400,7 +405,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
SeekAndChg( rInf );
// In CalcFlyWidth wird Width() verkuerzt, wenn eine FlyPortion vorliegt.
- ASSERT( !rInf.X() || pMulti, "SwTxtFormatter::BuildPortion X=0?" );
+ OSL_ENSURE( !rInf.X() || pMulti, "SwTxtFormatter::BuildPortion X=0?" );
CalcFlyWidth( rInf );
SwFlyPortion *pFly = rInf.GetFly();
if( pFly )
@@ -433,10 +438,9 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
while( pPor && !rInf.IsStop() )
{
- ASSERT( rInf.GetLen() < STRING_LEN &&
+ OSL_ENSURE( rInf.GetLen() < STRING_LEN &&
rInf.GetIdx() <= rInf.GetTxt().Len(),
"SwTxtFormatter::BuildPortions: bad length in info" );
- DBG_LOOP;
// We have to check the script for fields in order to set the
// correct nActual value for the font.
@@ -669,7 +673,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
if ( nRestWidth > 0 && SW_CJK != nCurrScript &&
! rInf.IsUnderFlow() && ( bFull || SW_CJK == nNextScript ) )
{
- ASSERT( pGridKernPortion, "No GridKernPortion available" )
+ OSL_ENSURE( pGridKernPortion, "No GridKernPortion available" );
// calculate size
SwLinePortion* pTmpPor = pGridKernPortion->GetPortion();
@@ -688,8 +692,8 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
nRestWidth );
const sal_uInt16 nKernWidth_1 = (sal_uInt16)(nKernWidth / 2);
- ASSERT( nKernWidth <= nRestWidth,
- "Not enough space left for adjusting non-asian text in grid mode" )
+ OSL_ENSURE( nKernWidth <= nRestWidth,
+ "Not enough space left for adjusting non-asian text in grid mode" );
pGridKernPortion->Width( pGridKernPortion->Width() + nKernWidth_1 );
rInf.X( rInf.X() + nKernWidth_1 );
@@ -1063,8 +1067,8 @@ SwLinePortion *SwTxtFormatter::WhichFirstPortion(SwTxtFormatInfo &rInf)
// 5) Die Fussnotenzahlen
if( !rInf.IsFtnDone() )
{
- ASSERT( ( ! rInf.IsMulti() && ! pMulti ) || pMulti->HasRotation(),
- "Rotated number portion trouble" )
+ OSL_ENSURE( ( ! rInf.IsMulti() && ! pMulti ) || pMulti->HasRotation(),
+ "Rotated number portion trouble" );
sal_Bool bFtnNum = pFrm->IsFtnNumFrm();
rInf.GetParaPortion()->SetFtnNum( bFtnNum );
@@ -1085,8 +1089,8 @@ SwLinePortion *SwTxtFormatter::WhichFirstPortion(SwTxtFormatInfo &rInf)
// 7) Die Numerierungen
if( !rInf.IsNumDone() && !pPor )
{
- ASSERT( ( ! rInf.IsMulti() && ! pMulti ) || pMulti->HasRotation(),
- "Rotated number portion trouble" )
+ OSL_ENSURE( ( ! rInf.IsMulti() && ! pMulti ) || pMulti->HasRotation(),
+ "Rotated number portion trouble" );
// Wenn wir im Follow stehen, dann natuerlich nicht.
if( GetTxtFrm()->GetTxtNode()->GetNumRule() )
@@ -1162,7 +1166,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
rInf.SetStopUnderFlow( sal_False );
if( rInf.GetUnderFlow() )
{
- ASSERT( rInf.IsFull(), "SwTxtFormatter::NewPortion: underflow but not full" );
+ OSL_ENSURE( rInf.IsFull(), "SwTxtFormatter::NewPortion: underflow but not full" );
return UnderFlow( rInf );
}
@@ -1225,7 +1229,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
if ( !pPor )
{
xub_StrLen nEnd = rInf.GetIdx();
- if ( lcl_BuildHiddenPortion( rInf, nEnd ) )
+ if ( ::lcl_BuildHiddenPortion( rInf, nEnd ) )
pPor = new SwHiddenTextPortion( nEnd - rInf.GetIdx() );
}
@@ -1349,7 +1353,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
if ( GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT) /*rInf.GetVsh()->IsTabCompat();*/ &&
POR_TABDECIMAL == pLastTabPortion->GetWhichPor() )
{
- ASSERT( rInf.X() >= pLastTabPortion->Fix(), "Decimal tab stop position cannot be calculated" )
+ OSL_ENSURE( rInf.X() >= pLastTabPortion->Fix(), "Decimal tab stop position cannot be calculated" );
const sal_uInt16 nWidthOfPortionsUpToDecimalPosition = (sal_uInt16)(rInf.X() - pLastTabPortion->Fix() );
static_cast<SwTabDecimalPortion*>(pLastTabPortion)->SetWidthOfPortionsUpToDecimalPosition( nWidthOfPortionsUpToDecimalPosition );
rInf.SetTabDecimal( 0 );
@@ -1462,12 +1466,12 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
// Werte bereithalten muss:
if( !pCurr->Height() )
{
- ASSERT( pCurr->Height(), "SwTxtFormatter::NewPortion: limbo dance" );
+ OSL_ENSURE( pCurr->Height(), "SwTxtFormatter::NewPortion: limbo dance" );
pCurr->Height( pPor->Height() );
pCurr->SetAscent( pPor->GetAscent() );
}
- ASSERT( !pPor || pPor->Height(),
+ OSL_ENSURE( !pPor || pPor->Height(),
"SwTxtFormatter::NewPortion: something went wrong");
if( pPor->IsPostItsPortion() && rInf.X() >= rInf.Width() && rInf.GetFly() )
{
@@ -1483,7 +1487,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen nStartPos )
{
- ASSERT( ! pFrm->IsVertical() || pFrm->IsSwapped(),
+ OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
"SwTxtFormatter::FormatLine( nStartPos ) with unswapped frame" );
// For the formatting routines, we set pOut to the reference device.
@@ -1516,21 +1520,18 @@ xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen nStartPos )
// before and after the BuildPortions call
const sal_Bool bOptimizeRepaint = AllowRepaintOpt();
const xub_StrLen nOldLineEnd = nStartPos + pCurr->GetLen();
- SvLongs* pFlyStart = 0;
+ std::vector<long> flyStarts;
// these are the conditions for a fly position comparison
if ( bOptimizeRepaint && pCurr->IsFly() )
{
- pFlyStart = new SvLongs;
SwLinePortion* pPor = pCurr->GetFirstPortion();
long nPOfst = 0;
- sal_uInt16 nCnt = 0;
-
while ( pPor )
{
if ( pPor->IsFlyPortion() )
// insert start value of fly portion
- pFlyStart->Insert( nPOfst, nCnt++ );
+ flyStarts.push_back( nPOfst );
nPOfst += pPor->Width();
pPor = pPor->GetPortion();
@@ -1621,9 +1622,8 @@ xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen nStartPos )
// calculate optimal repaint rectangle
if ( bOptimizeRepaint )
{
- GetInfo().SetPaintOfst( CalcOptRepaint( nOldLineEnd, pFlyStart ) );
- if ( pFlyStart )
- delete pFlyStart;
+ GetInfo().SetPaintOfst( ::lcl_CalcOptRepaint( *this, *pCurr, nOldLineEnd, flyStarts ) );
+ flyStarts.clear();
}
else
// Special case: We do not allow an optimitation of the repaint
@@ -1678,7 +1678,6 @@ void SwTxtFormatter::RecalcRealHeight()
sal_Bool bMore = sal_True;
while(bMore)
{
- DBG_LOOP;
CalcRealHeight();
bMore = Next() != 0;
}
@@ -1746,6 +1745,28 @@ void SwTxtFormatter::CalcRealHeight( sal_Bool bNewLine )
switch( pSpace->GetLineSpaceRule() )
{
case SVX_LINE_SPACE_AUTO:
+ if (pSpace->GetInterLineSpaceRule()==SVX_INTER_LINE_SPACE_PROP) {
+ long nTmp = pSpace->GetPropLineSpace();
+ if (nTmp<100) { // code adaped from fixed line height
+ nTmp *= nLineHeight;
+ nTmp /= 100;
+ if( !nTmp )
+ ++nTmp;
+ nLineHeight = (KSHORT)nTmp;
+/*
+ //@TODO figure out how WW maps ascent and descent
+ //in case of prop line spacing <100%
+ KSHORT nAsc = ( 4 * nLineHeight ) / 5; // 80%
+ if( nAsc < pCurr->GetAscent() ||
+ nLineHeight - nAsc < pCurr->Height() -
+pCurr->GetAscent() )
+ pCurr->SetClipping( sal_True );
+ pCurr->SetAscent( nAsc );
+*/
+ pCurr->Height( nLineHeight );
+ pInf->GetParaPortion()->SetFixLineHeight();
+ }
+ }
break;
case SVX_LINE_SPACE_MIN:
{
@@ -1765,7 +1786,7 @@ void SwTxtFormatter::CalcRealHeight( sal_Bool bNewLine )
pInf->GetParaPortion()->SetFixLineHeight();
}
break;
- default: ASSERT( sal_False, ": unknown LineSpaceRule" );
+ default: OSL_ENSURE( sal_False, ": unknown LineSpaceRule" );
}
if( !IsParaLine() )
switch( pSpace->GetInterLineSpaceRule() )
@@ -1792,7 +1813,7 @@ void SwTxtFormatter::CalcRealHeight( sal_Bool bNewLine )
nLineHeight = nLineHeight + pSpace->GetInterLineSpace();
break;
}
- default: ASSERT( sal_False, ": unknown InterLineSpaceRule" );
+ default: OSL_ENSURE( sal_False, ": unknown InterLineSpaceRule" );
}
}
#if OSL_DEBUG_LEVEL > 1
@@ -1994,140 +2015,148 @@ sal_Bool SwTxtFormatter::AllowRepaintOpt() const
return bOptimizeRepaint;
}
-/*************************************************************************
- * SwTxtFormatter::CalcOptRepaint()
- *
- * calculates an optimal repaint offset for the current line
- *************************************************************************/
-long SwTxtFormatter::CalcOptRepaint( xub_StrLen nOldLineEnd,
- const SvLongs* pFlyStart )
-{
- if ( GetInfo().GetIdx() < GetInfo().GetReformatStart() )
- // the reformat position is behind our new line, that means
- // something of our text has moved to the next line
- return 0;
-
- xub_StrLen nReformat = Min( GetInfo().GetReformatStart(), nOldLineEnd );
-
- // in case we do not have any fly in our line, our repaint position
- // is the changed position - 1
- if ( ! pFlyStart && ! pCurr->IsFly() )
+namespace {
+ /*************************************************************************
+ * ::CalcOptRepaint()
+ *
+ * calculates and sets optimal repaint offset for the current line
+ *************************************************************************/
+ long lcl_CalcOptRepaint( SwTxtFormatter &rThis,
+ SwLineLayout &rCurr,
+ const xub_StrLen nOldLineEnd,
+ const std::vector<long> &rFlyStarts )
{
- // this is the maximum repaint offset determined during formatting
- // for example: the beginning of the first right tab stop
- // if this value is 0, this means that we do not have an upper
- // limit for the repaint offset
- const long nFormatRepaint = GetInfo().GetPaintOfst();
-
- if ( nReformat < GetInfo().GetLineStart() + 3 )
+ SwTxtFormatInfo txtFmtInfo = rThis.GetInfo();
+ if ( txtFmtInfo.GetIdx() < txtFmtInfo.GetReformatStart() )
+ // the reformat position is behind our new line, that means
+ // something of our text has moved to the next line
return 0;
- // step back two positions for smoother repaint
- nReformat -= 2;
-
-#ifndef QUARTZ
-#ifndef ENABLE_GRAPHITE
- // --> FME 2004-09-27 #i28795#, #i34607#, #i38388#
- // step back six(!) more characters for complex scripts
- // this is required e.g., for Khmer (thank you, Javier!)
- const SwScriptInfo& rSI = GetInfo().GetParaPortion()->GetScriptInfo();
- xub_StrLen nMaxContext = 0;
- if( ::i18n::ScriptType::COMPLEX == rSI.ScriptType( nReformat ) )
- nMaxContext = 6;
-#else
- // Some Graphite fonts need context for scripts not marked as complex
- static const xub_StrLen nMaxContext = 10;
-#endif
-#else
- // some fonts like Quartz's Zapfino need more context
- // TODO: query FontInfo for maximum unicode context
- static const xub_StrLen nMaxContext = 8;
-#endif
- if( nMaxContext > 0 )
- {
- if ( nReformat > GetInfo().GetLineStart() + nMaxContext )
- nReformat = nReformat - nMaxContext;
- else
- nReformat = GetInfo().GetLineStart();
- }
- // <--
-
- // Weird situation: Our line used to end with a hole portion
- // and we delete some characters at the end of our line. We have
- // to take care for repainting the blanks which are not anymore
- // covered by the hole portion
- while ( nReformat > GetInfo().GetLineStart() &&
- CH_BLANK == GetInfo().GetChar( nReformat ) )
- --nReformat;
-
- ASSERT( nReformat < GetInfo().GetIdx(), "Reformat too small for me!" );
- SwRect aRect;
-
- // Note: GetChareRect is not const. It definitely changes the
- // bMulti flag. We have to save and resore the old value.
- sal_Bool bOldMulti = GetInfo().IsMulti();
- GetCharRect( &aRect, nReformat );
- GetInfo().SetMulti( bOldMulti );
-
- return nFormatRepaint ? Min( aRect.Left(), nFormatRepaint ) :
- aRect.Left();
- }
- else
- {
- // nReformat may be wrong, if something around flys has changed:
- // we compare the former and the new fly positions in this line
- // if anything has changed, we carefully have to adjust the right
- // repaint position
- long nPOfst = 0;
- sal_uInt16 nCnt = 0;
- sal_uInt16 nX = 0;
- sal_uInt16 nIdx = GetInfo().GetLineStart();
- SwLinePortion* pPor = pCurr->GetFirstPortion();
+ xub_StrLen nReformat = Min( txtFmtInfo.GetReformatStart(), nOldLineEnd );
- while ( pPor )
+ // in case we do not have any fly in our line, our repaint position
+ // is the changed position - 1
+ if ( rFlyStarts.empty() && ! rCurr.IsFly() )
{
- if ( pPor->IsFlyPortion() )
+ // this is the maximum repaint offset determined during formatting
+ // for example: the beginning of the first right tab stop
+ // if this value is 0, this means that we do not have an upper
+ // limit for the repaint offset
+ const long nFormatRepaint = txtFmtInfo.GetPaintOfst();
+
+ if ( nReformat < txtFmtInfo.GetLineStart() + 3 )
+ return 0;
+
+ // step back two positions for smoother repaint
+ nReformat -= 2;
+
+ #ifndef QUARTZ
+ #ifndef ENABLE_GRAPHITE
+ // --> FME 2004-09-27 #i28795#, #i34607#, #i38388#
+ // step back six(!) more characters for complex scripts
+ // this is required e.g., for Khmer (thank you, Javier!)
+ const SwScriptInfo& rSI = txtFmtInfo.GetParaPortion()->GetScriptInfo();
+ xub_StrLen nMaxContext = 0;
+ if( ::i18n::ScriptType::COMPLEX == rSI.ScriptType( nReformat ) )
+ nMaxContext = 6;
+ #else
+ // Some Graphite fonts need context for scripts not marked as complex
+ static const xub_StrLen nMaxContext = 10;
+ #endif
+ #else
+ // some fonts like Quartz's Zapfino need more context
+ // TODO: query FontInfo for maximum unicode context
+ static const xub_StrLen nMaxContext = 8;
+ #endif
+ if( nMaxContext > 0 )
{
- // compare start of fly with former start of fly
- if ( pFlyStart &&
- nCnt < pFlyStart->Count() &&
- nX == (*pFlyStart)[ nCnt ] &&
- nIdx < nReformat
- )
- // found fix position, nothing has changed left from nX
- nPOfst = nX + pPor->Width();
+ if ( nReformat > txtFmtInfo.GetLineStart() + nMaxContext )
+ nReformat = nReformat - nMaxContext;
else
- break;
-
- nCnt++;
+ nReformat = txtFmtInfo.GetLineStart();
}
- nX = nX + pPor->Width();
- nIdx = nIdx + pPor->GetLen();
- pPor = pPor->GetPortion();
+ // <--
+
+ // Weird situation: Our line used to end with a hole portion
+ // and we delete some characters at the end of our line. We have
+ // to take care for repainting the blanks which are not anymore
+ // covered by the hole portion
+ while ( nReformat > txtFmtInfo.GetLineStart() &&
+ CH_BLANK == txtFmtInfo.GetChar( nReformat ) )
+ --nReformat;
+
+ OSL_ENSURE( nReformat < txtFmtInfo.GetIdx(), "Reformat too small for me!" );
+ SwRect aRect;
+
+ // Note: GetChareRect is not const. It definitely changes the
+ // bMulti flag. We have to save and resore the old value.
+ sal_Bool bOldMulti = txtFmtInfo.IsMulti();
+ rThis.GetCharRect( &aRect, nReformat );
+ txtFmtInfo.SetMulti( bOldMulti );
+
+ return nFormatRepaint ? Min( aRect.Left(), nFormatRepaint ) :
+ aRect.Left();
}
+ else
+ {
+ // nReformat may be wrong, if something around flys has changed:
+ // we compare the former and the new fly positions in this line
+ // if anything has changed, we carefully have to adjust the right
+ // repaint position
+ long nPOfst = 0;
+ sal_uInt16 nCnt = 0;
+ sal_uInt16 nX = 0;
+ sal_uInt16 nIdx = rThis.GetInfo().GetLineStart();
+ SwLinePortion* pPor = rCurr.GetFirstPortion();
+
+ while ( pPor )
+ {
+ if ( pPor->IsFlyPortion() )
+ {
+ // compare start of fly with former start of fly
+ if (nCnt < rFlyStarts.size() &&
+ nX == rFlyStarts[ nCnt ] &&
+ nIdx < nReformat
+ )
+ // found fix position, nothing has changed left from nX
+ nPOfst = nX + pPor->Width();
+ else
+ break;
- return nPOfst + GetLeftMargin();
- }
-}
+ nCnt++;
+ }
+ nX = nX + pPor->Width();
+ nIdx = nIdx + pPor->GetLen();
+ pPor = pPor->GetPortion();
+ }
-bool lcl_BuildHiddenPortion( const SwTxtSizeInfo& rInf, xub_StrLen &rPos )
-{
- // Only if hidden text should not be shown:
-// if ( rInf.GetVsh() && rInf.GetVsh()->GetWin() && rInf.GetOpt().IsShowHiddenChar() )
- const bool bShowInDocView = rInf.GetVsh() && rInf.GetVsh()->GetWin() && rInf.GetOpt().IsShowHiddenChar();
- const bool bShowForPrinting = rInf.GetOpt().IsShowHiddenChar( sal_True ) && rInf.GetOpt().IsPrinting();
- if (bShowInDocView || bShowForPrinting)
- return false;
+ return nPOfst + rThis.GetLeftMargin();
+ }
+ }
- const SwScriptInfo& rSI = rInf.GetParaPortion()->GetScriptInfo();
- xub_StrLen nHiddenStart;
- xub_StrLen nHiddenEnd;
- rSI.GetBoundsOfHiddenRange( rPos, nHiddenStart, nHiddenEnd );
- if ( nHiddenEnd )
+ // Determine if we need to build hidden portions
+ bool lcl_BuildHiddenPortion( const SwTxtSizeInfo& rInf, xub_StrLen &rPos )
{
- rPos = nHiddenEnd;
- return true;
+ // Only if hidden text should not be shown:
+ // if ( rInf.GetVsh() && rInf.GetVsh()->GetWin() && rInf.GetOpt().IsShowHiddenChar() )
+ const bool bShowInDocView = rInf.GetVsh() && rInf.GetVsh()->GetWin() && rInf.GetOpt().IsShowHiddenChar();
+ const bool bShowForPrinting = rInf.GetOpt().IsShowHiddenChar( sal_True ) && rInf.GetOpt().IsPrinting();
+ if (bShowInDocView || bShowForPrinting)
+ return false;
+
+ const SwScriptInfo& rSI = rInf.GetParaPortion()->GetScriptInfo();
+ xub_StrLen nHiddenStart;
+ xub_StrLen nHiddenEnd;
+ rSI.GetBoundsOfHiddenRange( rPos, nHiddenStart, nHiddenEnd );
+ if ( nHiddenEnd )
+ {
+ rPos = nHiddenEnd;
+ return true;
+ }
+
+ return false;
}
- return false;
-}
+} //end unnamed namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/itrform2.hxx b/sw/source/core/text/itrform2.hxx
index a082538ed4d3..a838806a11c8 100644
--- a/sw/source/core/text/itrform2.hxx
+++ b/sw/source/core/text/itrform2.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,7 +39,6 @@ class SwErgoSumPortion;
class SwExpandPortion;
class SwMultiPortion;
class SwFtnPortion;
-class SvLongs;
/*************************************************************************
* class SwTxtFormatter
@@ -100,9 +100,6 @@ class SwTxtFormatter : public SwTxtPainter
// determines, if a optimized repaint rectange is allowed
sal_Bool AllowRepaintOpt() const;
- // calculates and sets the optimized repaint offset
- long CalcOptRepaint( xub_StrLen nOldLineEnd, const SvLongs* pFlyStart );
-
// wird von FormatLine gerufen.
void FormatReset( SwTxtFormatInfo &rInf );
@@ -212,3 +209,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 8c9405a9a483..0571efb8a5d3 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,6 @@
#include "hintids.hxx"
#include "flyfrm.hxx" // SwFlyInCntFrm
#include "viewopt.hxx" // SwViewOptions
-#include "errhdl.hxx"
#include "txtatr.hxx" // SwINetFmt
#include <tools/multisel.hxx>
#include <editeng/escpitem.hxx>
@@ -57,7 +57,6 @@
#include "flyfrms.hxx"
#include "viewsh.hxx"
-#include "txtcfg.hxx"
#include "itrpaint.hxx"
#include "txtfrm.hxx" // pFrm
#include "txtfly.hxx"
@@ -100,10 +99,10 @@ void SwTxtPainter::CtorInitTxtPainter( SwTxtFrm *pNewFrm, SwTxtPaintInfo *pNewIn
pInf = pNewInf;
SwFont *pMyFnt = GetFnt();
GetInfo().SetFont( pMyFnt );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( ALIGN_BASELINE != pMyFnt->GetAlign() )
{
- ASSERT( ALIGN_BASELINE == pMyFnt->GetAlign(),
+ OSL_ENSURE( ALIGN_BASELINE == pMyFnt->GetAlign(),
"+SwTxtPainter::CTOR: font alignment revolution" );
pMyFnt->SetAlign( ALIGN_BASELINE );
}
@@ -132,7 +131,6 @@ SwLinePortion *SwTxtPainter::CalcPaintOfst( const SwRect &rPaint )
while( pPor && GetInfo().X() + pPor->Width() + (pPor->Height()/2)
< nPaintOfst )
{
- DBG_LOOP;
if( pPor->InSpaceGrp() && GetInfo().GetSpaceAdd() )
{
long nTmp = GetInfo().X() +pPor->Width() +
@@ -241,7 +239,6 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
}
// Alignment:
- sal_Bool bPlus = sal_False;
OutputDevice* pOut = GetInfo().GetOut();
Point aPnt1( nTmpLeft, GetInfo().GetPos().Y() );
if ( aPnt1.X() < rPaint.Left() )
@@ -253,10 +250,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if ( aPnt2.X() > rPaint.Right() )
aPnt2.X() = rPaint.Right();
if ( aPnt2.Y() > rPaint.Bottom() )
- {
aPnt2.Y() = rPaint.Bottom();
- bPlus = sal_True;
- }
const SwRect aLineRect( aPnt1, aPnt2 );
@@ -267,12 +261,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
}
if( !pPor && !bEndPor )
- {
-#ifdef DBGTXT
- aDbstream << "PAINTER: done nothing" << endl;
-#endif
return;
- }
// Baseline-Ausgabe auch bei nicht-TxtPortions (vgl. TabPor mit Fill)
// if no special vertical alignment is used,
@@ -319,7 +308,6 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
while( pPor )
{
- DBG_LOOP;
sal_Bool bSeeked = sal_True;
GetInfo().SetLen( pPor->GetLen() );
@@ -537,8 +525,8 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
Range aRange( 0, GetInfo().GetTxt().Len() );
MultiSelection aUnderMulti( aRange );
- ASSERT( GetFnt() && UNDERLINE_NONE != GetFnt()->GetUnderline(),
- "CheckSpecialUnderline without underlined font" )
+ OSL_ENSURE( GetFnt() && UNDERLINE_NONE != GetFnt()->GetUnderline(),
+ "CheckSpecialUnderline without underlined font" );
const SwFont* pParaFnt = GetAttrHandler().GetFont();
if( pParaFnt && pParaFnt->GetUnderline() == GetFnt()->GetUnderline() )
aUnderMulti.SelectAll();
@@ -716,3 +704,5 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
// I'm sorry, we do not have a special underlining font for you.
GetInfo().SetUnderFnt( 0 );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/itrpaint.hxx b/sw/source/core/text/itrpaint.hxx
index b7410d57d881..4304676f3f97 100644
--- a/sw/source/core/text/itrpaint.hxx
+++ b/sw/source/core/text/itrpaint.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx
index c042634eaf60..93cba310f3be 100644
--- a/sw/source/core/text/itrtxt.cxx
+++ b/sw/source/core/text/itrtxt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,6 @@
#include "ndtxt.hxx"
#include "flyfrm.hxx"
#include "paratr.hxx"
-#include "errhdl.hxx"
#include <vcl/outdev.hxx>
#include <editeng/paravertalignitem.hxx>
@@ -42,13 +42,12 @@
#include <tgrditem.hxx>
#include <porfld.hxx>
-#include "txtcfg.hxx"
#include "itrtxt.hxx"
#include "txtfrm.hxx"
#include "porfly.hxx"
#if OSL_DEBUG_LEVEL > 1
-# include "txtfrm.hxx" // GetFrmID,
+#include "txtfrm.hxx" // GetFrmID,
#endif
/*************************************************************************
@@ -57,26 +56,15 @@
void SwTxtIter::CtorInitTxtIter( SwTxtFrm *pNewFrm, SwTxtInfo *pNewInf )
{
-#ifdef DBGTXT
- // nStopAt laesst sich vom CV bearbeiten.
- static MSHORT nStopAt = 0;
- if( nStopAt == pNewFrm->GetFrmId() )
- {
- int i = pNewFrm->GetFrmId();
- }
-#endif
-
SwTxtNode *pNode = pNewFrm->GetTxtNode();
- ASSERT( pNewFrm->GetPara(), "No paragraph" );
+ OSL_ENSURE( pNewFrm->GetPara(), "No paragraph" );
CtorInitAttrIter( *pNode, pNewFrm->GetPara()->GetScriptInfo(), pNewFrm );
pFrm = pNewFrm;
pInf = pNewInf;
- // --> OD 2008-01-17 #newlistlevelattrs#
aLineInf.CtorInitLineInfo( pNode->GetSwAttrSet(), *pNode );
- // <--
nFrameStart = pFrm->Frm().Pos().Y() + pFrm->Prt().Pos().Y();
SwTxtIter::Init();
if( pNode->GetSwAttrSet().GetRegister().GetValue() )
@@ -187,7 +175,6 @@ const SwLineLayout *SwTxtIter::NextLine()
const SwLineLayout *pNext = Next();
while( pNext && pNext->IsDummy() && pNext->GetNext() )
{
- DBG_LOOP;
pNext = Next();
}
return pNext;
@@ -202,7 +189,6 @@ const SwLineLayout *SwTxtIter::GetNextLine() const
const SwLineLayout *pNext = pCurr->GetNext();
while( pNext && pNext->IsDummy() && pNext->GetNext() )
{
- DBG_LOOP;
pNext = pNext->GetNext();
}
return (SwLineLayout*)pNext;
@@ -251,7 +237,6 @@ const SwLineLayout *SwTxtIter::PrevLine()
const SwLineLayout *pLast = pMyPrev;
while( pMyPrev && pMyPrev->IsDummy() )
{
- DBG_LOOP;
pLast = pMyPrev;
pMyPrev = Prev();
}
@@ -266,7 +251,7 @@ void SwTxtIter::Bottom()
{
while( Next() )
{
- DBG_LOOP;
+ // nothing
}
}
@@ -358,7 +343,7 @@ sal_uInt16 SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
nOfst = nOfst + nPorAscent;
break;
case SvxParaVertAlignItem::CENTER :
- ASSERT( rLine.Height() >= nPorHeight, "Portion height > Line height");
+ OSL_ENSURE( rLine.Height() >= nPorHeight, "Portion height > Line height");
nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent;
break;
case SvxParaVertAlignItem::BOTTOM :
@@ -488,7 +473,6 @@ void SwTxtIter::CntHyphens( sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const
return;
while( pLay != pCurr )
{
- DBG_LOOP;
if ( pLay->IsEndHyph() )
nEndCnt++;
else
@@ -513,7 +497,7 @@ SwHookOut::SwHookOut( SwTxtSizeInfo& rInfo ) :
pOut( rInfo.GetOut() ),
bOnWin( rInfo.OnWin() )
{
- ASSERT( rInfo.GetRefDev(), "No reference device for text formatting" )
+ OSL_ENSURE( rInfo.GetRefDev(), "No reference device for text formatting" );
// set new values
rInfo.SetOut( rInfo.GetRefDev() );
@@ -525,3 +509,5 @@ SwHookOut::~SwHookOut()
pInf->SetOut( pOut );
pInf->SetOnWin( bOnWin );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index aa129aef9888..46ec8cfd7964 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,8 +66,13 @@ protected:
// Zuruecksetzen in die erste Zeile.
void Init();
void CtorInitTxtIter( SwTxtFrm *pFrm, SwTxtInfo *pInf );
- inline SwTxtIter(SwTxtNode* pTxtNode) : SwAttrIter(pTxtNode) { }
-
+ inline SwTxtIter(SwTxtNode* pTxtNode)
+ : SwAttrIter(pTxtNode)
+ , pFrm(NULL)
+ , pInf(NULL)
+ , pCurr(NULL)
+ , pPrev(NULL)
+ {}
public:
inline SwTxtIter( SwTxtFrm *pTxtFrm, SwTxtInfo *pTxtInf ) : SwAttrIter(pTxtFrm!=NULL?pTxtFrm->GetTxtNode():NULL)
{ CtorInitTxtIter( pTxtFrm, pTxtInf ); }
@@ -338,3 +344,5 @@ inline SwTwips SwTxtMargin::Left() const
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/noteurl.cxx b/sw/source/core/text/noteurl.cxx
index 7fe36a990fca..2e5cbcc692a7 100644
--- a/sw/source/core/text/noteurl.cxx
+++ b/sw/source/core/text/noteurl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,7 +64,7 @@ void SwNoteURL::InsertURLNote( const XubString& rURL, const XubString& rTarget,
void SwNoteURL::FillImageMap( ImageMap *pMap, const Point &rPos,
const MapMode& rMap )
{
- ASSERT( pMap, "FillImageMap: No ImageMap, no cookies!" );
+ OSL_ENSURE( pMap, "FillImageMap: No ImageMap, no cookies!" );
MSHORT nCount = Count();
if( nCount )
{
@@ -85,3 +86,4 @@ void SwNoteURL::FillImageMap( ImageMap *pMap, const Point &rPos,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx
index 452a2b394d65..41179f534f4f 100644
--- a/sw/source/core/text/pordrop.hxx
+++ b/sw/source/core/text/pordrop.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -117,3 +118,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx
index 95fae4d7b64e..344bc25b1f10 100644
--- a/sw/source/core/text/porexp.cxx
+++ b/sw/source/core/text/porexp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -310,3 +311,4 @@ sal_Bool SwPostItsPortion::GetExpTxt( const SwTxtSizeInfo &rInf,
return sal_True;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porexp.hxx b/sw/source/core/text/porexp.hxx
index 214c9f336eb3..5761431810f5 100644
--- a/sw/source/core/text/porexp.hxx
+++ b/sw/source/core/text/porexp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -106,3 +107,5 @@ CLASSIO( SwPostItsPortion )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 1057ed7899b6..d806a9316a9c 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,22 +32,13 @@
#include <hintids.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
-#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
-#endif
#include <editeng/brshitem.hxx>
-#ifndef _METRIC_HXX //autogen
#include <vcl/metric.hxx>
-#endif
-#ifndef _OUTDEV_HXX //autogen
#include <vcl/outdev.hxx>
-#endif
#include <viewopt.hxx> // SwViewOptions
-#include <txtcfg.hxx>
#include <SwPortionHandler.hxx>
#include <porlay.hxx>
#include <porfld.hxx>
@@ -54,9 +46,7 @@
#include <blink.hxx> // pBlink
#include <frmtool.hxx> // DrawGraphic
#include <viewsh.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <doc.hxx>
#include <breakit.hxx>
#include <porrst.hxx>
@@ -93,7 +83,7 @@ SwFldPortion *SwFldPortion::Clone( const XubString &rExpand ) const
void SwFldPortion::TakeNextOffset( const SwFldPortion* pFld )
{
- ASSERT( pFld, "TakeNextOffset: Missing Source" );
+ OSL_ENSURE( pFld, "TakeNextOffset: Missing Source" );
nNextOffset = pFld->GetNextOffset();
aExpand.Erase( 0, nNextOffset );
bFollow = sal_True;
@@ -464,7 +454,7 @@ void SwFldPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
SwFontSave aSave( rInf, pFnt );
- ASSERT( GetLen() <= 1, "SwFldPortion::Paint: rest-portion polution?" );
+ OSL_ENSURE( GetLen() <= 1, "SwFldPortion::Paint: rest-portion polution?" );
if( Width() && ( !bPlaceHolder || rInf.GetOpt().IsShowPlaceHolderFields() ) )
{
// Dies ist eine freizuegige Auslegung der Hintergrundbelegung ...
@@ -548,7 +538,6 @@ sal_Bool SwHiddenPortion::GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt
* class SwNumberPortion
*************************************************************************/
-// --> OD 2008-01-23 #newlistlevelattrs#
SwNumberPortion::SwNumberPortion( const XubString &rExpand,
SwFont *pFont,
const sal_Bool bLft,
@@ -558,9 +547,7 @@ SwNumberPortion::SwNumberPortion( const XubString &rExpand,
: SwFldPortion( rExpand, pFont ),
nFixWidth(0),
nMinDist( nMinDst ),
- // --> OD 2008-01-23 #newlistlevelattrs#
mbLabelAlignmentPosAndSpaceModeActive( bLabelAlignmentPosAndSpaceModeActive )
- // <--
{
SetWhichPor( POR_NUMBER );
SetLeft( bLft );
@@ -578,10 +565,9 @@ SwFldPortion *SwNumberPortion::Clone( const XubString &rExpand ) const
SwFont *pNewFnt;
if( 0 != ( pNewFnt = pFnt ) )
pNewFnt = new SwFont( *pFnt );
- // --> OD 2008-01-23 #newlistlevelattrs#
+
return new SwNumberPortion( rExpand, pNewFnt, IsLeft(), IsCenter(),
nMinDist, mbLabelAlignmentPosAndSpaceModeActive );
- // <--
}
/*************************************************************************
@@ -604,10 +590,10 @@ sal_Bool SwNumberPortion::Format( SwTxtFormatInfo &rInf )
if( rInf.IsNumDone() )
{
// SetAscent( rInf.GetAscent() );
- ASSERT( Height() && nAscent, "NumberPortions without Height | Ascent" );
+ OSL_ENSURE( Height() && nAscent, "NumberPortions without Height | Ascent" );
long nDiff( 0 );
- // --> OD 2008-01-23 #newlistlevelattrs#
+
if ( !mbLabelAlignmentPosAndSpaceModeActive )
{
if ( !rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) &&
@@ -626,7 +612,6 @@ sal_Bool SwNumberPortion::Format( SwTxtFormatInfo &rInf )
nDiff = rInf.Left() - rInf.First() + rInf.ForcedLeftMargin();
}
}
- // <--
// Ein Vorschlag von Juergen und Volkmar:
// Der Textteil hinter der Numerierung sollte immer
// mindestens beim linken Rand beginnen.
@@ -780,7 +765,7 @@ void SwNumberPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( bPaintSpace && nOldWidth > nSpaceOffs )
{
SwTxtPaintInfo aInf( rInf );
-static sal_Char __READONLY_DATA sDoubleSpace[] = " ";
+static sal_Char const sDoubleSpace[] = " ";
aInf.X( aInf.X() + nSpaceOffs );
// --> FME 2005-08-12 #i53199# Adjust position of underline:
@@ -807,7 +792,6 @@ static sal_Char __READONLY_DATA sDoubleSpace[] = " ";
* class SwBulletPortion
*************************************************************************/
-// --> OD 2008-01-23 #newlistlevelattrs#
SwBulletPortion::SwBulletPortion( const xub_Unicode cBullet,
const XubString& rBulletFollowedBy,
SwFont *pFont,
@@ -818,7 +802,6 @@ SwBulletPortion::SwBulletPortion( const xub_Unicode cBullet,
: SwNumberPortion( XubString( rBulletFollowedBy ).Insert( cBullet, 0 ) ,
pFont, bLft, bCntr, nMinDst,
bLabelAlignmentPosAndSpaceModeActive )
-// <--
{
SetWhichPor( POR_BULLET );
}
@@ -829,7 +812,6 @@ SwBulletPortion::SwBulletPortion( const xub_Unicode cBullet,
#define GRFNUM_SECURE 10
-// --> OD 2008-01-23 #newlistlevelattrs#
SwGrfNumPortion::SwGrfNumPortion(
SwFrm*,
const XubString& rGraphicFollowedBy,
@@ -839,7 +821,6 @@ SwGrfNumPortion::SwGrfNumPortion(
const bool bLabelAlignmentPosAndSpaceModeActive ) :
SwNumberPortion( rGraphicFollowedBy, NULL, bLft, bCntr, nMinDst,
bLabelAlignmentPosAndSpaceModeActive ),
-// <--
pBrush( new SvxBrushItem(RES_BACKGROUND) ), nId( 0 )
{
SetWhichPor( POR_GRFNUM );
@@ -887,7 +868,6 @@ void SwGrfNumPortion::StopAnimation( OutputDevice* pOut )
sal_Bool SwGrfNumPortion::Format( SwTxtFormatInfo &rInf )
{
SetHide( sal_False );
- // --> OD 2008-01-29 #newlistlevelattrs#
// Width( nFixWidth );
KSHORT nFollowedByWidth( 0 );
if ( mbLabelAlignmentPosAndSpaceModeActive )
@@ -917,7 +897,6 @@ sal_Bool SwGrfNumPortion::Format( SwTxtFormatInfo &rInf )
}
}
rInf.SetNumDone( sal_True );
- // --> OD 2008-01-23 #newlistlevelattrs#
// long nDiff = rInf.Left() - rInf.First() + rInf.ForcedLeftMargin();
long nDiff = mbLabelAlignmentPosAndSpaceModeActive
? 0
@@ -967,11 +946,9 @@ void SwGrfNumPortion::Paint( const SwTxtPaintInfo &rInf ) const
long nTmpWidth = Max( (long)0, (long)(nFixWidth - 2 * GRFNUM_SECURE) );
Size aSize( nTmpWidth, GetGrfHeight() - 2 * GRFNUM_SECURE );
- // --> OD 2008-02-05 #newlistlevelattrs#
const sal_Bool bTmpLeft = mbLabelAlignmentPosAndSpaceModeActive ||
( IsLeft() && ! rInf.GetTxtFrm()->IsRightToLeft() ) ||
( ! IsLeft() && ! IsCenter() && rInf.GetTxtFrm()->IsRightToLeft() );
- // <--
if( nFixWidth < Width() && !bTmpLeft )
{
@@ -1102,7 +1079,7 @@ void SwGrfNumPortion::SetBase( long nLnAscent, long nLnDescent,
void SwTxtFrm::StopAnimation( OutputDevice* pOut )
{
- ASSERT( HasAnimation(), "SwTxtFrm::StopAnimation: Which Animation?" );
+ OSL_ENSURE( HasAnimation(), "SwTxtFrm::StopAnimation: Which Animation?" );
if( HasPara() )
{
SwLineLayout *pLine = GetPara();
@@ -1165,7 +1142,7 @@ SwCombinedPortion::SwCombinedPortion( const XubString &rTxt )
void SwCombinedPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
- ASSERT( GetLen() <= 1, "SwFldPortion::Paint: rest-portion polution?" );
+ OSL_ENSURE( GetLen() <= 1, "SwFldPortion::Paint: rest-portion polution?" );
if( Width() )
{
rInf.DrawBackBrush( *this );
@@ -1178,7 +1155,7 @@ void SwCombinedPortion::Paint( const SwTxtPaintInfo &rInf ) const
sal_uInt16 nCount = aExpand.Len();
if( !nCount )
return;
- ASSERT( nCount < 7, "Too much combined characters" );
+ OSL_ENSURE( nCount < 7, "Too much combined characters" );
// the first character of the second row
sal_uInt16 nTop = ( nCount + 1 ) / 2;
@@ -1230,7 +1207,7 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
return sal_False;
}
- ASSERT( nCount < 7, "Too much combined characters" );
+ OSL_ENSURE( nCount < 7, "Too much combined characters" );
// If there are leading "weak"-scripttyped characters in this portion,
// they get the actual scripttype.
sal_uInt16 i = 0;
@@ -1242,7 +1219,7 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
i = 0;
while( i < aExpand.Len() )
{
- ASSERT( aScrType[i] < SW_SCRIPTS, "Combined: Script fault" );
+ OSL_ENSURE( aScrType[i] < SW_SCRIPTS, "Combined: Script fault" );
if( !aWidth[ aScrType[i] ] )
{
rInf.GetOut()->SetFont( rInf.GetFont()->GetFnt( aScrType[i] ) );
@@ -1393,3 +1370,5 @@ KSHORT SwCombinedPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
return 0; // the combined portion doesn't fit.
return SwFldPortion::GetViewWidth( rInf );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index aa0cb4f1be14..47890c7d05ea 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -147,19 +148,15 @@ class SwNumberPortion : public SwFldPortion
protected:
KSHORT nFixWidth; // vgl. Glues
KSHORT nMinDist; // minimaler Abstand zum Text
- // --> OD 2008-01-23 #newlistlevelattrs#
bool mbLabelAlignmentPosAndSpaceModeActive;
- // <--
public:
- // --> OD 2008-01-23 #newlistlevelattrs#
SwNumberPortion( const XubString &rExpand,
SwFont *pFnt,
const sal_Bool bLeft,
const sal_Bool bCenter,
const KSHORT nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive );
- // <--
virtual void Paint( const SwTxtPaintInfo &rInf ) const;
virtual xub_StrLen GetCrsrOfst( const MSHORT nOfst ) const;
virtual sal_Bool Format( SwTxtFormatInfo &rInf );
@@ -178,7 +175,6 @@ public:
class SwBulletPortion : public SwNumberPortion
{
public:
- // --> OD 2008-01-23 #newlistlevelattrs#
SwBulletPortion( const xub_Unicode cCh,
const XubString& rBulletFollowedBy,
SwFont *pFnt,
@@ -186,7 +182,6 @@ public:
const sal_Bool bCenter,
const KSHORT nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive );
- // <--
OUTPUT_OPERATOR
};
@@ -202,7 +197,6 @@ class SwGrfNumPortion : public SwNumberPortion
SwTwips nGrfHeight;
sal_Int16 eOrient;
public:
- // --> OD 2008-01-23 #newlistlevelattrs#
SwGrfNumPortion( SwFrm *pFrm,
const XubString& rGraphicFollowedBy,
const SvxBrushItem* pGrfBrush,
@@ -212,7 +206,6 @@ public:
const sal_Bool bCenter,
const KSHORT nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive );
- // <--
~SwGrfNumPortion();
virtual void Paint( const SwTxtPaintInfo &rInf ) const;
virtual sal_Bool Format( SwTxtFormatInfo &rInf );
@@ -272,3 +265,5 @@ CLASSIO( SwCombinedPortion )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index 976f4fbeadbc..c608fba00389 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,7 +69,7 @@ void SwFlyPortion::Paint( const SwTxtPaintInfo& ) const
*************************************************************************/
sal_Bool SwFlyPortion::Format( SwTxtFormatInfo &rInf )
{
- ASSERT( Fix() >= rInf.X(), "SwFlyPortion::Format: rush hour" );
+ OSL_ENSURE( Fix() >= rInf.X(), "SwFlyPortion::Format: rush hour" );
// 8537: Tabs muessen expandiert werden.
if( rInf.GetLastTab() )
((SwLinePortion*)rInf.GetLastTab())->FormatEOL( rInf );
@@ -78,7 +79,7 @@ sal_Bool SwFlyPortion::Format( SwTxtFormatInfo &rInf )
PrtWidth( static_cast<sal_uInt16>(Fix() - rInf.X() + PrtWidth()) );
if( !Width() )
{
- ASSERT( Width(), "+SwFlyPortion::Format: a fly is a fly is a fly" );
+ OSL_ENSURE( Width(), "+SwFlyPortion::Format: a fly is a fly is a fly" );
Width(1);
}
@@ -204,7 +205,7 @@ void SwTxtFrm::MoveFlyInCnt( SwTxtFrm *pNew, xub_StrLen nStart, xub_StrLen nEnd
xub_StrLen SwTxtFrm::CalcFlyPos( SwFrmFmt* pSearch )
{
SwpHints* pHints = GetTxtNode()->GetpSwpHints();
- ASSERT( pHints, "CalcFlyPos: Why me?" );
+ OSL_ENSURE( pHints, "CalcFlyPos: Why me?" );
if( !pHints )
return STRING_LEN;
SwTxtAttr* pFound = NULL;
@@ -218,7 +219,7 @@ xub_StrLen SwTxtFrm::CalcFlyPos( SwFrmFmt* pSearch )
pFound = pHt;
}
}
- ASSERT( pHints, "CalcFlyPos: Not Found!" );
+ OSL_ENSURE( pHints, "CalcFlyPos: Not Found!" );
if( !pFound )
return STRING_LEN;
return *pFound->GetStart();
@@ -276,8 +277,8 @@ void SwFlyCntPortion::Paint( const SwTxtPaintInfo &rInf ) const
((SwTxtPaintInfo&)rInf).SelectFont();
// I want to know if this can really happen. So here comes a new
- ASSERT( ! rInf.GetVsh() || rInf.GetVsh()->GetOut() == rInf.GetOut(),
- "SwFlyCntPortion::Paint: Outdev has changed" )
+ OSL_ENSURE( ! rInf.GetVsh() || rInf.GetVsh()->GetOut() == rInf.GetOut(),
+ "SwFlyCntPortion::Paint: Outdev has changed" );
if( rInf.GetVsh() )
((SwTxtPaintInfo&)rInf).SetOut( rInf.GetVsh()->GetOut() );
}
@@ -301,7 +302,7 @@ SwFlyCntPortion::SwFlyCntPortion( const SwTxtFrm& rFrm,
bMax( sal_False ),
nAlign( 0 )
{
- ASSERT( pFly, "SwFlyCntPortion::SwFlyCntPortion: no SwFlyInCntFrm!" );
+ OSL_ENSURE( pFly, "SwFlyCntPortion::SwFlyCntPortion: no SwFlyInCntFrm!" );
nLineLength = 1;
nFlags |= AS_CHAR_ULSPACE | AS_CHAR_INIT;
SetBase( rFrm, rBase, nLnAscent, nLnDescent, nFlyAsc, nFlyDesc, nFlags );
@@ -319,7 +320,7 @@ SwFlyCntPortion::SwFlyCntPortion( const SwTxtFrm& rFrm,
bMax( sal_False ),
nAlign( 0 )
{
- ASSERT( pDrawContact, "SwFlyCntPortion::SwFlyCntPortion: no SwDrawContact!" );
+ OSL_ENSURE( pDrawContact, "SwFlyCntPortion::SwFlyCntPortion: no SwDrawContact!" );
if( !pDrawContact->GetAnchorFrm() )
{
// OD 2004-04-01 #i26791# - no direct positioning needed any more
@@ -364,7 +365,7 @@ void SwFlyCntPortion::SetBase( const SwTxtFrm& rFrm, const Point &rBase,
pSdrObj = GetDrawContact()->GetDrawObjectByAnchorFrm( rFrm );
if ( !pSdrObj )
{
- ASSERT( false, "SwFlyCntPortion::SetBase(..) - No drawing object found by <GetDrawContact()->GetDrawObjectByAnchorFrm( rFrm )>" );
+ OSL_ENSURE( false, "SwFlyCntPortion::SetBase(..) - No drawing object found by <GetDrawContact()->GetDrawObjectByAnchorFrm( rFrm )>" );
pSdrObj = GetDrawContact()->GetMaster();
}
// --> OD 2007-11-29 #i65798#
@@ -448,7 +449,8 @@ xub_StrLen SwFlyCntPortion::GetFlyCrsrOfst( const KSHORT nOfst,
xub_StrLen SwFlyCntPortion::GetCrsrOfst( const KSHORT nOfst ) const
{
- // ASSERT( !this, "SwFlyCntPortion::GetCrsrOfst: use GetFlyCrsrOfst()" );
+ // OSL_ENSURE( !this, "SwFlyCntPortion::GetCrsrOfst: use GetFlyCrsrOfst()" );
return SwLinePortion::GetCrsrOfst( nOfst );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porfly.hxx b/sw/source/core/text/porfly.hxx
index 48590ec55100..ed2a7d5d8e65 100644
--- a/sw/source/core/text/porfly.hxx
+++ b/sw/source/core/text/porfly.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -106,3 +107,5 @@ CLASSIO( SwFlyCntPortion )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx
index fef27b065278..384577d627ab 100644
--- a/sw/source/core/text/porftn.hxx
+++ b/sw/source/core/text/porftn.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,9 +72,7 @@ class SwFtnNumPortion : public SwNumberPortion
{
public:
inline SwFtnNumPortion( const XubString &rExpand, SwFont *pFntL )
- // --> OD 2008-01-23 #newlistlevelattrs#
: SwNumberPortion( rExpand, pFntL, sal_True, sal_False, 0, false )
- // <--
{ SetWhichPor( POR_FTNNUM ); }
OUTPUT_OPERATOR
@@ -128,3 +127,5 @@ CLASSIO( SwErgoSumPortion )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index 28207fb8b936..f36a2e9d6539 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,10 +34,8 @@
#include "swrect.hxx"
#include "paratr.hxx" // pTabStop, ADJ*
#include "viewopt.hxx" // SwViewOptions
-#include "errhdl.hxx" // ASSERT
#include <SwPortionHandler.hxx>
-#include "txtcfg.hxx"
#include "porglue.hxx"
#include "inftxt.hxx"
#include "porlay.hxx" // SwParaPortion, SetFull
@@ -111,9 +110,9 @@ void SwGluePortion::Paint( const SwTxtPaintInfo &rInf ) const
if( rInf.OnWin() && rInf.GetOpt().IsBlank() && rInf.IsNoSymbol() )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
const xub_Unicode cChar = rInf.GetChar( rInf.GetIdx() );
- ASSERT( CH_BLANK == cChar || CH_BULLET == cChar,
+ OSL_ENSURE( CH_BLANK == cChar || CH_BULLET == cChar,
"SwGluePortion::Paint: blank expected" );
#endif
if( 1 == GetLen() )
@@ -224,7 +223,6 @@ void SwMarginPortion::AdjustRight( const SwLineLayout *pCurr )
SwGluePortion *pLeft = 0;
while( pPos )
{
- DBG_LOOP;
if( pPos->InFixMargGrp() )
pLeft = (SwGluePortion*)pPos;
pPos = pPos->GetPortion();
@@ -268,8 +266,6 @@ void SwMarginPortion::AdjustRight( const SwLineLayout *pCurr )
}
while( pPrev != pLeft )
{
- DBG_LOOP;
-
if( bNoMove || pPrev->PrtWidth() >= nRightGlue ||
pPrev->InHyphGrp() || pPrev->IsKernPortion() )
{
@@ -316,3 +312,4 @@ void SwMarginPortion::AdjustRight( const SwLineLayout *pCurr )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porglue.hxx b/sw/source/core/text/porglue.hxx
index 010b3488be52..a498c46cbb7e 100644
--- a/sw/source/core/text/porglue.hxx
+++ b/sw/source/core/text/porglue.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,8 +28,6 @@
#ifndef _PORGLUE_HXX
#define _PORGLUE_HXX
-//#include <stdlib.h>
-
#include "porlin.hxx"
class SwRect;
@@ -132,3 +131,4 @@ CLASSIO( SwMarginPortion )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porhyph.hxx b/sw/source/core/text/porhyph.hxx
index 5d8f2c8007e8..c3f2934cedc8 100644
--- a/sw/source/core/text/porhyph.hxx
+++ b/sw/source/core/text/porhyph.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -117,3 +118,5 @@ CLASSIO( SwSoftHyphStrPortion )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index ff90b8a3ed5c..984b8f3ce580 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,10 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-#include "errhdl.hxx" // ASSERT
-
-#include "txtcfg.hxx"
#include "porlay.hxx"
#include "itrform2.hxx"
#include "porglue.hxx"
@@ -71,7 +68,6 @@
using namespace ::com::sun::star;
using namespace i18n::ScriptType;
-//#ifdef BIDI
#include <unicode/ubidi.h>
#include <i18nutil/unicode.hxx> //unicode::getUnicodeScriptType
@@ -341,7 +337,6 @@ SwMarginPortion *SwLineLayout::CalcLeftMargin()
SwLinePortion *pPos = pLeft->GetPortion();
while( pPos )
{
- DBG_LOOP;
if( pPos->IsFlyPortion() )
{
// Die FlyPortion wird ausgesogen ...
@@ -452,8 +447,7 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
// Fix-Portion.
while( pPos )
{
- DBG_LOOP;
- ASSERT( POR_LIN != pPos->GetWhichPor(),
+ OSL_ENSURE( POR_LIN != pPos->GetWhichPor(),
"SwLineLayout::CalcLine: don't use SwLinePortions !" );
// Null-Portions werden eliminiert. Sie koennen entstehen,
@@ -501,7 +495,7 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
KSHORT nPosHeight = pPos->Height();
KSHORT nPosAscent = pPos->GetAscent();
- ASSERT( nPosHeight >= nPosAscent,
+ OSL_ENSURE( nPosHeight >= nPosAscent,
"SwLineLayout::CalcLine: bad ascent or height" );
if( pPos->IsHangingPortion() )
@@ -655,7 +649,7 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
// Robust:
if( nLineWidth < Width() )
Width( nLineWidth );
- ASSERT( nLineWidth >= Width(), "SwLineLayout::CalcLine: line is bursting" );
+ OSL_ENSURE( nLineWidth >= Width(), "SwLineLayout::CalcLine: line is bursting" );
SetDummy( bTmpDummy );
SetRedline( rLine.GetRedln() &&
rLine.GetRedln()->CheckLine( rLine.GetStart(), rLine.GetEnd() ) );
@@ -760,7 +754,7 @@ SwScriptInfo::~SwScriptInfo()
*************************************************************************/
sal_uInt8 SwScriptInfo::WhichFont( xub_StrLen nIdx, const String* pTxt, const SwScriptInfo* pSI )
{
- ASSERT( pTxt || pSI,"How should I determine the script type?" );
+ OSL_ENSURE( pTxt || pSI,"How should I determine the script type?" );
sal_uInt16 nScript;
// First we try to use our SwScriptInfo
@@ -776,7 +770,7 @@ sal_uInt8 SwScriptInfo::WhichFont( xub_StrLen nIdx, const String* pTxt, const Sw
case i18n::ScriptType::COMPLEX : return SW_CTL;
}
- ASSERT( sal_False, "Somebody tells lies about the script type!" );
+ OSL_ENSURE( sal_False, "Somebody tells lies about the script type!" );
return SW_LATIN;
}
@@ -854,7 +848,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// if change position = 0 we do not use any data from the arrays
// because by deleting all characters of the first group at the beginning
// of a paragraph nScript is set to a wrong value
- ASSERT( CountScriptChg(), "Where're my changes of script?" );
+ OSL_ENSURE( CountScriptChg(), "Where're my changes of script?" );
while( nCnt < CountScriptChg() )
{
if ( nChg > GetScriptChg( nCnt ) )
@@ -914,9 +908,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
//
// remove invalid entries from script information arrays
- const size_t nScriptRemove = aScriptChg.size() - nCnt;
- aScriptChg.erase( aScriptChg.begin() + nCnt, aScriptChg.end() );
- aScriptType.erase( aScriptType.begin() + nCnt, aScriptType.begin() + (nCnt + nScriptRemove) );
+ aScriptChanges.erase( aScriptChanges.begin() + nCnt, aScriptChanges.end() );
// get the start of the last compression group
sal_uInt16 nLastCompression = nChg;
@@ -932,10 +924,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
}
// remove invalid entries from compression information arrays
- 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() );
+ aCompressionChanges.erase(aCompressionChanges.begin() + nCntComp, aCompressionChanges.end() );
// get the start of the last kashida group
sal_uInt16 nLastKashida = nChg;
@@ -967,7 +956,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
nScript = (sal_uInt8)GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
- ASSERT( i18n::ScriptType::LATIN == nScript ||
+ OSL_ENSURE( i18n::ScriptType::LATIN == nScript ||
i18n::ScriptType::ASIAN == nScript ||
i18n::ScriptType::COMPLEX == nScript, "Wrong default language" );
@@ -980,8 +969,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
if ( nScript != nNextScript )
{
- aScriptChg.insert( aScriptChg.begin() + nCnt, nEnd );
- aScriptType.insert( aScriptType.begin() + nCnt, nScript );
+ aScriptChanges.push_back( ScriptChangeInfo(nEnd, nScript) );
nCnt++;
nScript = nNextScript;
}
@@ -991,11 +979,11 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// UPDATE THE SCRIPT INFO ARRAYS:
//
- while ( nChg < rTxt.Len() || ( aScriptChg.empty() && !rTxt.Len() ) )
+ while ( nChg < rTxt.Len() || ( aScriptChanges.empty() && !rTxt.Len() ) )
{
- ASSERT( i18n::ScriptType::WEAK != nScript,
+ OSL_ENSURE( i18n::ScriptType::WEAK != nScript,
"Inserting WEAK into SwScriptInfo structure" );
- ASSERT( STRING_LEN != nChg, "65K? Strange length of script section" );
+ OSL_ENSURE( STRING_LEN != nChg, "65K? Strange length of script section" );
xub_StrLen nSearchStt = nChg;
nChg = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rTxt, nSearchStt, nScript );
@@ -1032,19 +1020,18 @@ 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( aScriptChg.begin() + nCnt, nChg - 1 );
+ aScriptChanges.push_back( ScriptChangeInfo(nChg-1, nScript) );
}
else
{
- aScriptChg.insert( aScriptChg.begin() + nCnt, nChg );
+ aScriptChanges.push_back( ScriptChangeInfo(nChg, nScript) );
}
}
else
{
- aScriptChg.insert( aScriptChg.begin() + nCnt, nChg );
+ aScriptChanges.push_back( ScriptChangeInfo(nChg, nScript) );
}
- aScriptType.insert( aScriptType.begin() + nCnt, nScript );
- nCnt++;
+ ++nCnt;
// if current script is asian, we search for compressable characters
// in this range
@@ -1088,11 +1075,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
if ( CHARCOMPRESS_PUNCTUATION_KANA == aCompEnum ||
ePrevState != KANA )
{
- aCompChg.insert( aCompChg.begin() + nCntComp, nPrevChg );
- sal_uInt8 nTmpType = ePrevState;
- aCompType.insert( aCompType.begin() + nCntComp, nTmpType );
- aCompLen.insert( aCompLen.begin() + nCntComp, nLastCompression - nPrevChg );
- nCntComp++;
+ aCompressionChanges.push_back( CompressionChangeInfo(nPrevChg, nLastCompression - nPrevChg, ePrevState) );
}
}
@@ -1110,11 +1093,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
if ( CHARCOMPRESS_PUNCTUATION_KANA == aCompEnum ||
ePrevState != KANA )
{
- aCompChg.insert( aCompChg.begin() + nCntComp, nPrevChg );
- sal_uInt8 nTmpType = ePrevState;
- aCompType.insert( aCompType.begin() + nCntComp, nTmpType );
- aCompLen.insert( aCompLen.begin() + nCntComp, nLastCompression - nPrevChg );
- nCntComp++;
+ aCompressionChanges.push_back( CompressionChangeInfo(nPrevChg, nLastCompression - nPrevChg, ePrevState) );
}
}
}
@@ -1178,7 +1157,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
( isHahChar ( cCh ) && nIdx == nWordLen - 1)) // Hah (dual joining) only at end of word
{
- ASSERT( 0 != cPrevCh, "No previous character" )
+ OSL_ENSURE( 0 != cPrevCh, "No previous character" );
// check if character is connectable to previous character,
if ( lcl_ConnectToPrev( cCh, cPrevCh ) )
{
@@ -1198,7 +1177,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
isGafChar ( cCh ) )
&& nIdx == nWordLen - 1)) // only at end of word
{
- ASSERT( 0 != cPrevCh, "No previous character" )
+ OSL_ENSURE( 0 != cPrevCh, "No previous character" );
// check if character is connectable to previous character,
if ( lcl_ConnectToPrev( cCh, cPrevCh ) )
{
@@ -1218,7 +1197,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
xub_Unicode cNextCh = rWord.GetChar( nIdx + 1 );
if ( isRehChar ( cNextCh ) || isYehChar ( cNextCh ))
{
- ASSERT( 0 != cPrevCh, "No previous character" )
+ OSL_ENSURE( 0 != cPrevCh, "No previous character" );
// check if character is connectable to previous character,
if ( lcl_ConnectToPrev( cCh, cPrevCh ) )
{
@@ -1240,7 +1219,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
isFeChar ( cCh ) ) // Feh (dual joining)
&& nIdx == nWordLen - 1)) // only at end of word
{
- ASSERT( 0 != cPrevCh, "No previous character" )
+ OSL_ENSURE( 0 != cPrevCh, "No previous character" );
// check if character is connectable to previous character,
if ( lcl_ConnectToPrev( cCh, cPrevCh ) )
{
@@ -1260,7 +1239,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
( 0x60C <= cCh && 0x6FE >= cCh // all others
&& nIdx == nWordLen - 1)) // only at end of word
{
- ASSERT( 0 != cPrevCh, "No previous character" )
+ OSL_ENSURE( 0 != cPrevCh, "No previous character" );
// check if character is connectable to previous character,
if ( lcl_ConnectToPrev( cCh, cPrevCh ) )
{
@@ -1292,9 +1271,9 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
nLastCompression = nChg;
nLastKashida = nChg;
- };
+ }
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// check kashida data
long nTmpKashidaPos = -1;
sal_Bool bWrongKash = sal_False;
@@ -1308,12 +1287,11 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
}
nTmpKashidaPos = nCurrKashidaPos;
}
- ASSERT( ! bWrongKash, "Kashida array contains wrong data" )
+ OSL_ENSURE( ! bWrongKash, "Kashida array contains wrong data" );
#endif
// remove invalid entries from direction information arrays
- aDirChg.clear();
- aDirType.clear();
+ aDirectionChanges.clear();
// Perform Unicode Bidi Algorithm for text direction information
bool bPerformUBA = UBIDI_LTR != nDefaultDir;
@@ -1333,7 +1311,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 ( size_t nDirIdx = 0; nDirIdx < aDirChg.size(); ++nDirIdx )
+ for ( sal_uInt32 nDirIdx = 0; nDirIdx < aDirectionChanges.size(); ++nDirIdx )
{
const sal_uInt8 nCurrDirType = GetDirType( nDirIdx );
// nStart ist start of RTL run:
@@ -1357,45 +1335,41 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
const xub_StrLen nStartPosOfGroup = nScriptIdx ? GetScriptChg( nScriptIdx - 1 ) : 0;
const sal_uInt8 nScriptTypeOfGroup = GetScriptType( nScriptIdx );
- ASSERT( nStartPosOfGroup <= nStart && GetScriptChg( nScriptIdx ) > nStart,
- "Script override with CTL font trouble" )
+ OSL_ENSURE( nStartPosOfGroup <= nStart && GetScriptChg( nScriptIdx ) > nStart,
+ "Script override with CTL font trouble" );
// Check if we have to insert a new script change at
// position nStart. If nStartPosOfGroup < nStart,
// we have to insert a new script change:
if ( nStart > 0 && nStartPosOfGroup < nStart )
{
- aScriptChg.insert( aScriptChg.begin() + nScriptIdx, nStart );
- aScriptType.insert( aScriptType.begin() + nScriptIdx, nScriptTypeOfGroup );
+ aScriptChanges.insert(aScriptChanges.begin() + nScriptIdx,
+ ScriptChangeInfo(nStart, nScriptTypeOfGroup) );
++nScriptIdx;
}
// Remove entries in ScriptArray which end inside the RTL run:
- while ( nScriptIdx < aScriptChg.size() && GetScriptChg( nScriptIdx ) <= nEnd )
+ while ( nScriptIdx < aScriptChanges.size() && GetScriptChg( nScriptIdx ) <= nEnd )
{
- aScriptChg.erase( aScriptChg.begin() + nScriptIdx );
- aScriptType.erase( aScriptType.begin() + nScriptIdx );
+ aScriptChanges.erase(aScriptChanges.begin() + nScriptIdx);
}
// Insert a new entry in ScriptArray for the end of the RTL run:
- aScriptChg.insert( aScriptChg.begin() + nScriptIdx, nEnd );
- aScriptType.insert( aScriptType.begin() + nScriptIdx, i18n::ScriptType::COMPLEX );
+ aScriptChanges.insert(aScriptChanges.begin() + nScriptIdx,
+ ScriptChangeInfo(nEnd, i18n::ScriptType::COMPLEX) );
#if OSL_DEBUG_LEVEL > 1
- sal_uInt8 nScriptType;
- sal_uInt8 nLastScriptType = i18n::ScriptType::WEAK;
- xub_StrLen nScriptChg;
- xub_StrLen nLastScriptChg = 0;
- (void) nLastScriptChg;
- (void) nLastScriptType;
-
- for ( size_t i2 = 0; i2 < aScriptChg.size(); ++i2 )
+ // Check that ScriptChangeInfos are in increasing order of
+ // position and that we don't have "empty" changes.
+ sal_uInt8 nLastTyp = i18n::ScriptType::WEAK;
+ xub_StrLen nLastPos = 0;
+ for (std::vector<ScriptChangeInfo>::const_iterator i2 = aScriptChanges.begin(); i2 < aScriptChanges.end(); ++i2)
{
- nScriptChg = GetScriptChg( i2 );
- nScriptType = GetScriptType( i2 );
- ASSERT( nLastScriptType != nScriptType &&
- nLastScriptChg < nScriptChg,
- "Heavy InitScriptType() confusion" )
+ OSL_ENSURE( nLastTyp != i2->type &&
+ nLastPos < i2->position,
+ "Heavy InitScriptType() confusion" );
+ nLastPos = i2->position;
+ nLastTyp = i2->type;
}
#endif
}
@@ -1406,9 +1380,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
void SwScriptInfo::UpdateBidiInfo( const String& rTxt )
{
// remove invalid entries from direction information arrays
- aDirChg.clear();
- aDirType.clear();
-
+ aDirectionChanges.clear();
//
// Bidi functions from icu 2.0
//
@@ -1423,13 +1395,10 @@ void SwScriptInfo::UpdateBidiInfo( const String& rTxt )
int32_t nStart = 0;
int32_t nEnd;
UBiDiLevel nCurrDir;
- // counter for direction information arrays
-
for ( sal_uInt16 nIdx = 0; nIdx < nCount; ++nIdx )
{
ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir );
- aDirChg.push_back( (sal_uInt16)nEnd );
- aDirType.push_back( (sal_uInt8)nCurrDir );
+ aDirectionChanges.push_back( DirectionChangeInfo(nEnd, nCurrDir) );
nStart = nEnd;
}
@@ -1514,7 +1483,7 @@ sal_uInt16 SwScriptInfo::MaskHiddenRanges( const SwTxtNode& rNode, XubString& rT
const xub_StrLen nStt, const xub_StrLen nEnd,
const xub_Unicode cChar )
{
- ASSERT( rNode.GetTxt().Len() == rText.Len(), "MaskHiddenRanges, string len mismatch" )
+ OSL_ENSURE( rNode.GetTxt().Len() == rText.Len(), "MaskHiddenRanges, string len mismatch" );
PositionList aList;
xub_StrLen nHiddenStart;
@@ -1765,8 +1734,8 @@ long SwScriptInfo::Compress( sal_Int32* pKernArray, xub_StrLen nIdx, xub_StrLen
const sal_uInt16 nCompress, const sal_uInt16 nFontHeight,
Point* pPoint ) const
{
- ASSERT( nCompress, "Compression without compression?!" );
- ASSERT( nLen, "Compression without text?!" );
+ OSL_ENSURE( nCompress, "Compression without compression?!" );
+ OSL_ENSURE( nLen, "Compression without text?!" );
sal_uInt16 nCompCount = CountCompChg();
// In asian typography, there are full width and half width characters.
@@ -1801,7 +1770,7 @@ long SwScriptInfo::Compress( sal_Int32* pKernArray, xub_StrLen nIdx, xub_StrLen
{
sal_uInt16 nType = GetCompType( nCompIdx );
#if OSL_DEBUG_LEVEL > 1
- ASSERT( nType == CompType( nIdx ), "Gimme the right type!" );
+ OSL_ENSURE( nType == CompType( nIdx ), "Gimme the right type!" );
#endif
nCompLen = nCompLen + nIdx;
if( nCompLen > nLen )
@@ -1816,7 +1785,7 @@ long SwScriptInfo::Compress( sal_Int32* pKernArray, xub_StrLen nIdx, xub_StrLen
{
while( nIdx < nCompLen )
{
- ASSERT( SwScriptInfo::NONE != nType, "None compression?!" );
+ OSL_ENSURE( SwScriptInfo::NONE != nType, "None compression?!" );
// nLast is width of current character
nLast -= pKernArray[ nI ];
@@ -1888,7 +1857,7 @@ sal_uInt16 SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
xub_StrLen nLen,
long nSpaceAdd ) const
{
- ASSERT( nLen, "Kashida justification without text?!" )
+ OSL_ENSURE( nLen, "Kashida justification without text?!" );
if( !IsKashidaLine(nStt))
return STRING_LEN;
@@ -2168,7 +2137,7 @@ void SwScriptInfo::ClearNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen )
// mark the given character indices as invalid kashida positions
bool SwScriptInfo::MarkKashidasInvalid ( xub_StrLen nCnt, xub_StrLen* pKashidaPositions )
{
- ASSERT( pKashidaPositions && nCnt > 0, "Where are kashidas?" )
+ OSL_ENSURE( pKashidaPositions && nCnt > 0, "Where are kashidas?" );
sal_uInt16 nCntKash = 0;
xub_StrLen nKashidaPosIdx = 0;
@@ -2201,7 +2170,7 @@ sal_uInt16 SwScriptInfo::ThaiJustify( const XubString& rTxt, sal_Int32* pKernArr
xub_StrLen nLen, xub_StrLen nNumberOfBlanks,
long nSpaceAdd )
{
- ASSERT( nStt + nLen <= rTxt.Len(), "String in ThaiJustify too small" )
+ OSL_ENSURE( nStt + nLen <= rTxt.Len(), "String in ThaiJustify too small" );
SwTwips nNumOfTwipsToDistribute = nSpaceAdd * nNumberOfBlanks /
SPACING_PRECISION_FACTOR;
@@ -2289,7 +2258,6 @@ xub_StrLen SwParaPortion::GetParLen() const
const SwLineLayout *pLay = this;
while( pLay )
{
- DBG_LOOP;
nLen = nLen + pLay->GetLen();
pLay = pLay->GetNext();
}
@@ -2331,7 +2299,7 @@ void SwLineLayout::Init( SwLinePortion* pNextPortion )
SetPortion( pNextPortion );
}
-/*-----------------16.11.00 11:04-------------------
+/*--------------------------------------------------
* HangingMargin()
* looks for hanging punctuation portions in the paragraph
* and return the maximum right offset of them.
@@ -2364,7 +2332,7 @@ SwTwips SwLineLayout::_GetHangingMargin() const
SwTwips SwTxtFrm::HangingMargin() const
{
- ASSERT( HasPara(), "Don't call me without a paraportion" );
+ OSL_ENSURE( HasPara(), "Don't call me without a paraportion" );
if( !GetPara()->IsMargin() )
return 0;
const SwLineLayout* pLine = GetPara();
@@ -2461,3 +2429,4 @@ void SwScriptInfo::CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHi
rNode.SetHiddenCharAttribute( bNewHiddenCharsHidePara, bNewContainsHiddenChars );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index 9dc56001c125..bc7e560ad1d6 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -255,9 +256,11 @@ public:
const SwLinePortion* _pDontConsiderPortion = NULL,
const bool _bNoFlyCntPorAndLinePor = false ) const;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
void DebugPortions( SvStream &rOs, const XubString &rTxt,
const xub_StrLen nStart ); //$ ostream
+
+ void dumpLineAsXml(xmlTextWriter* writer, USHORT& ofs, String& aText);
#endif
OUTPUT_OPERATOR
@@ -367,6 +370,10 @@ public:
const SwDropPortion *FindDropPortion() const;
+#if OSL_DEBUG_LEVEL > 1
+ void dumpAsXml( xmlTextWriter* writer, SwTxtFrm* pTxtFrm );
+#endif
+
OUTPUT_OPERATOR
DECL_FIXEDMEMPOOL_NEWDEL(SwParaPortion)
};
@@ -425,3 +432,5 @@ CLASSIO( SwLineLayout )
CLASSIO( SwParaPortion )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index 1de04c82b43c..da677f83c077 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,22 +30,16 @@
#include "precompiled_sw.hxx"
-#ifndef _OUTDEV_HXX //autogen
#include <vcl/outdev.hxx>
-#endif
#include <SwPortionHandler.hxx>
-#include "errhdl.hxx" // ASSERT
-
-#include "txtcfg.hxx"
#include "porlin.hxx"
#include "inftxt.hxx"
#include "portxt.hxx"
#include "pormulti.hxx"
#include "porglue.hxx"
-#include "inftxt.hxx"
#include "blink.hxx"
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool ChkChain( SwLinePortion *pStart )
{
@@ -53,7 +48,7 @@ sal_Bool ChkChain( SwLinePortion *pStart )
while( pPor )
{
++nCount;
- ASSERT( nCount < 200 && pPor != pStart,
+ OSL_ENSURE( nCount < 200 && pPor != pStart,
"ChkChain(): lost in chains" );
if( nCount >= 200 || pPor == pStart )
{
@@ -108,8 +103,8 @@ SwLinePortion::SwLinePortion( ) :
void SwLinePortion::PrePaint( const SwTxtPaintInfo& rInf,
const SwLinePortion* pLast ) const
{
- ASSERT( rInf.OnWin(), "SwLinePortion::PrePaint: don't prepaint on a printer");
- ASSERT( !Width(), "SwLinePortion::PrePaint: For Width()==0 only!");
+ OSL_ENSURE( rInf.OnWin(), "SwLinePortion::PrePaint: don't prepaint on a printer");
+ OSL_ENSURE( !Width(), "SwLinePortion::PrePaint: For Width()==0 only!");
const KSHORT nViewWidth = GetViewWidth( rInf );
@@ -192,7 +187,7 @@ void SwLinePortion::_Truncate()
{
SwLinePortion *pPos = pPortion;
do
- { ASSERT( pPos != this, "SwLinePortion::Truncate: loop" );
+ { OSL_ENSURE( pPos != this, "SwLinePortion::Truncate: loop" );
SwLinePortion *pLast = pPos;
pPos = pPos->GetPortion();
pLast->SetPortion( 0 );
@@ -213,7 +208,7 @@ SwLinePortion *SwLinePortion::Insert( SwLinePortion *pIns )
{
pIns->FindLastPortion()->SetPortion( pPortion );
SetPortion( pIns );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
ChkChain( this );
#endif
return pIns;
@@ -229,7 +224,6 @@ SwLinePortion *SwLinePortion::FindLastPortion()
// An das Ende wandern und pLinPortion an den letzten haengen ...
while( pPos->GetPortion() )
{
- DBG_LOOP;
pPos = pPos->GetPortion();
}
return pPos;
@@ -244,7 +238,7 @@ SwLinePortion *SwLinePortion::Append( SwLinePortion *pIns )
SwLinePortion *pPos = FindLastPortion();
pPos->SetPortion( pIns );
pIns->SetPortion( 0 );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
ChkChain( this );
#endif
return pIns;
@@ -257,7 +251,7 @@ SwLinePortion *SwLinePortion::Append( SwLinePortion *pIns )
SwLinePortion *SwLinePortion::Cut( SwLinePortion *pVictim )
{
SwLinePortion *pPrev = pVictim->FindPrevPortion( this );
- ASSERT( pPrev, "SwLinePortion::Cut(): can't cut" );
+ OSL_ENSURE( pPrev, "SwLinePortion::Cut(): can't cut" );
pPrev->SetPortion( pVictim->GetPortion() );
pVictim->SetPortion(0);
return pVictim;
@@ -269,14 +263,13 @@ SwLinePortion *SwLinePortion::Cut( SwLinePortion *pVictim )
SwLinePortion *SwLinePortion::FindPrevPortion( const SwLinePortion *pRoot )
{
- ASSERT( pRoot != this, "SwLinePortion::FindPrevPortion(): invalid root" );
+ OSL_ENSURE( pRoot != this, "SwLinePortion::FindPrevPortion(): invalid root" );
SwLinePortion *pPos = (SwLinePortion*)pRoot;
while( pPos->GetPortion() && pPos->GetPortion() != this )
{
- DBG_LOOP;
pPos = pPos->GetPortion();
}
- ASSERT( pPos->GetPortion(),
+ OSL_ENSURE( pPos->GetPortion(),
"SwLinePortion::FindPrevPortion: blowing in the wind");
return pPos;
}
@@ -299,12 +292,12 @@ xub_StrLen SwLinePortion::GetCrsrOfst( const KSHORT nOfst ) const
SwPosSize SwLinePortion::GetTxtSize( const SwTxtSizeInfo & ) const
{
- ASSERT( !this, "SwLinePortion::GetTxtSize: don't ask me about sizes, "
+ OSL_ENSURE( !this, "SwLinePortion::GetTxtSize: don't ask me about sizes, "
"I'm only a stupid SwLinePortion" );
return SwPosSize();
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
/*************************************************************************
* virtual SwLinePortion::Check()
@@ -424,3 +417,4 @@ void SwLinePortion::HandlePortion( SwPortionHandler& rPH ) const
rPH.Special( GetLen(), aString, GetWhichPor() );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index 8301d397659e..efa942a4cbcc 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,6 +30,10 @@
#include "possiz.hxx" // SwPosSize
+#if OSL_DEBUG_LEVEL > 1
+#include <libxml/xmlwriter.h>
+#endif
+
class XubString;
class SwTxtSizeInfo;
class SwTxtPaintInfo;
@@ -39,7 +44,7 @@ class SwPortionHandler;
// Das CLASSIO-Makro implementiert die 'freischwebende' Funktion.
// Auf diese Weise erhaelt man beide Vorteile: virtuelle Ausgabeoperatoren
// und allgemeine Verwendbarkeit.
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
#define OUTPUT_OPERATOR virtual SvStream &operator<<( SvStream & aOs ) const;
#else
#define OUTPUT_OPERATOR
@@ -174,7 +179,7 @@ public:
virtual void Paint( const SwTxtPaintInfo &rInf ) const = 0;
void PrePaint( const SwTxtPaintInfo &rInf, const SwLinePortion *pLast ) const;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
virtual sal_Bool Check( SvStream &rOs, SwTxtSizeInfo &rInfo ); //$ ostream
#endif
@@ -195,6 +200,9 @@ public:
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const;
+#if OSL_DEBUG_LEVEL > 1
+ void dumpPortionAsXml(USHORT ofs, String& aText, xmlTextWriter* writer);
+#endif
OUTPUT_OPERATOR
};
@@ -237,15 +245,10 @@ inline void SwLinePortion::Truncate()
//$ ostream
-#ifdef DBGTXT
-#define CLASSIO( class ) \
- inline SvStream &operator<<( SvStream &rOs, const class &rClass ) {\
- return rClass.operator<<( rOs );\
- }
-#else
#define CLASSIO( class )
-#endif
CLASSIO( SwLinePortion )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 368f0782b144..222a669bd44e 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,7 +64,7 @@
using namespace ::com::sun::star;
extern sal_Bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt );
-/*-----------------10.10.00 15:23-------------------
+/*--------------------------------------------------
* class SwMultiPortion
*
* A SwMultiPortion is not a simple portion,
@@ -79,11 +80,11 @@ SwMultiPortion::~SwMultiPortion()
void SwMultiPortion::Paint( const SwTxtPaintInfo & ) const
{
- ASSERT( sal_False,
+ OSL_ENSURE( sal_False,
"Don't try SwMultiPortion::Paint, try SwTxtPainter::PaintMultiPortion" );
}
-/*-----------------13.10.00 16:21-------------------
+/*--------------------------------------------------
* Summarize the internal lines to calculate the (external) size.
* The internal line has to calculate first.
* --------------------------------------------------*/
@@ -153,7 +154,7 @@ void SwMultiPortion::HandlePortion( SwPortionHandler& rPH ) const
rPH.Text( GetLen(), GetWhichPor() );
}
-/*-----------------01.11.00 14:21-------------------
+/*--------------------------------------------------
* SwMultiPortion::ActualizeTabulator()
* sets the tabulator-flag, if there's any tabulator-portion inside.
* --------------------------------------------------*/
@@ -178,7 +179,7 @@ void SwMultiPortion::ActualizeTabulator()
}
}
-/*-----------------16.02.01 12:07-------------------
+/*--------------------------------------------------
* SwRotatedPortion::SwRotatedPortion(..)
* --------------------------------------------------*/
@@ -264,7 +265,7 @@ xub_StrLen SwBidiPortion::GetSpaceCnt( const SwTxtSizeInfo &rInf ) const
return nBlanks;
}
-/*-----------------01.11.00 14:22-------------------
+/*--------------------------------------------------
* SwDoubleLinePortion::SwDoubleLinePortion(..)
* This constructor is for the continuation of a doubleline portion
* in the next line.
@@ -293,7 +294,7 @@ SwDoubleLinePortion::SwDoubleLinePortion( SwDoubleLinePortion& rDouble,
}
}
-/*-----------------01.11.00 14:22-------------------
+/*--------------------------------------------------
* SwDoubleLinePortion::SwDoubleLinePortion(..)
* This constructor uses the textattribut to get the right brackets.
* The textattribut could be a 2-line-attribute or a character- or
@@ -358,7 +359,7 @@ SwDoubleLinePortion::SwDoubleLinePortion( const SwMultiCreator& rCreate,
}
-/*-----------------25.10.00 09:51-------------------
+/*--------------------------------------------------
* SwMultiPortion::PaintBracket paints the wished bracket,
* if the multiportion has surrounding brackets.
* The X-position of the SwTxtPaintInfo will be modified:
@@ -398,7 +399,7 @@ void SwDoubleLinePortion::PaintBracket( SwTxtPaintInfo &rInf,
rInf.X( rInf.X() + PreWidth() );
}
-/*-----------------25.10.00 16:26-------------------
+/*--------------------------------------------------
* SwDoubleLinePortion::SetBrackets creates the bracket-structur
* and fills it, if not both characters are 0x00.
* --------------------------------------------------*/
@@ -416,7 +417,7 @@ void SwDoubleLinePortion::SetBrackets( const SwDoubleLinePortion& rDouble )
}
}
-/*-----------------25.10.00 16:29-------------------
+/*--------------------------------------------------
* SwDoubleLinePortion::FormatBrackets
* calculates the size of the brackets => pBracket,
* reduces the nMaxWidth-parameter ( minus bracket-width )
@@ -486,7 +487,7 @@ void SwDoubleLinePortion::FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWi
nMaxWidth += rInf.X();
}
-/*-----------------26.10.00 10:36-------------------
+/*--------------------------------------------------
* SwDoubleLinePortion::CalcBlanks
* calculates the number of blanks in each line and
* the difference of the width of the two lines.
@@ -530,7 +531,7 @@ long SwDoubleLinePortion::CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo & ) c
return HasTabulator() ? 0 : GetSpaceCnt() * nSpaceAdd / SPACING_PRECISION_FACTOR;
}
-/*-----------------01.11.00 14:29-------------------
+/*--------------------------------------------------
* SwDoubleLinePortion::ChangeSpaceAdd(..)
* merges the spaces for text adjustment from the inner and outer part.
* Inside the doubleline portion the wider line has no spaceadd-array, the
@@ -576,7 +577,7 @@ sal_Bool SwDoubleLinePortion::ChgSpaceAdd( SwLineLayout* pCurr,
}
return bRet;
}
-/*-----------------01.11.00 14:29-------------------
+/*--------------------------------------------------
* SwDoubleLinePortion::ResetSpaceAdd(..)
* cancels the manipulation from SwDoubleLinePortion::ChangeSpaceAdd(..)
* --------------------------------------------------*/
@@ -593,7 +594,7 @@ SwDoubleLinePortion::~SwDoubleLinePortion()
delete pBracket;
}
-/*-----------------13.11.00 14:50-------------------
+/*--------------------------------------------------
* SwRubyPortion::SwRubyPortion(..)
* constructs a ruby portion, i.e. an additional text is displayed
* beside the main text, e.g. phonetic characters.
@@ -610,7 +611,7 @@ SwRubyPortion::SwRubyPortion( const SwRubyPortion& rRuby, xub_StrLen nEnd ) :
SetRuby();
}
-/*-----------------13.11.00 14:50-------------------
+/*--------------------------------------------------
* SwRubyPortion::SwRubyPortion(..)
* constructs a ruby portion, i.e. an additional text is displayed
* beside the main text, e.g. phonetic characters.
@@ -623,8 +624,8 @@ SwRubyPortion::SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt,
: SwMultiPortion( nEnd )
{
SetRuby();
- ASSERT( SW_MC_RUBY == rCreate.nId, "Ruby expected" );
- ASSERT( RES_TXTATR_CJK_RUBY == rCreate.pAttr->Which(), "Wrong attribute" );
+ OSL_ENSURE( SW_MC_RUBY == rCreate.nId, "Ruby expected" );
+ OSL_ENSURE( RES_TXTATR_CJK_RUBY == rCreate.pAttr->Which(), "Wrong attribute" );
const SwFmtRuby& rRuby = rCreate.pAttr->GetRuby();
nAdjustment = rRuby.GetAdjustment();
nRubyOffset = nOffs;
@@ -677,7 +678,7 @@ SwRubyPortion::SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt,
SetDirection( DIR_LEFT2RIGHT );
}
-/*-----------------13.11.00 14:56-------------------
+/*--------------------------------------------------
* SwRubyPortion::_Adjust(..)
* In ruby portion there are different alignments for
* the ruby text and the main text.
@@ -748,7 +749,7 @@ void SwRubyPortion::_Adjust( SwTxtFormatInfo &rInf )
}
break;
}
- default: ASSERT( sal_False, "New ruby adjustment" );
+ default: OSL_ENSURE( sal_False, "New ruby adjustment" );
}
if( nLeft || nRight )
{
@@ -773,7 +774,7 @@ void SwRubyPortion::_Adjust( SwTxtFormatInfo &rInf )
rInf.SetIdx( nOldIdx );
}
-/*-----------------08.11.00 14:14-------------------
+/*--------------------------------------------------
* CalcRubyOffset()
* has to change the nRubyOffset, if there's a fieldportion
* in the phonetic line.
@@ -807,7 +808,7 @@ void SwRubyPortion::CalcRubyOffset()
}
}
-/*-----------------13.10.00 16:22-------------------
+/*--------------------------------------------------
* SwTxtSizeInfo::GetMultiCreator(..)
* If we (e.g. the position rPos) are inside a two-line-attribute or
* a ruby-attribute, the attribute will be returned in a SwMultiCreator-struct,
@@ -820,7 +821,7 @@ void SwRubyPortion::CalcRubyOffset()
* with different brackets interrupts another 2-line-attribute.
* --------------------------------------------------*/
-/*-----------------13.11.00 15:38-------------------
+/*--------------------------------------------------
* lcl_Has2Lines(..)
* is a little help function for GetMultiCreator(..)
* It extracts the 2-line-format from a 2-line-attribute or a character style.
@@ -849,7 +850,7 @@ sal_Bool lcl_Has2Lines( const SwTxtAttr& rAttr, const SvxTwoLinesItem* &rpRef,
return sal_False;
}
-/*-----------------16.02.01 16:39-------------------
+/*--------------------------------------------------
* lcl_HasRotation(..)
* is a little help function for GetMultiCreator(..)
* It extracts the charrotation from a charrotate-attribute or a character style.
@@ -887,7 +888,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
sal_uInt8 nCurrLevel;
if ( pMulti )
{
- ASSERT( pMulti->IsBidi(), "Nested MultiPortion is not BidiPortion" )
+ OSL_ENSURE( pMulti->IsBidi(), "Nested MultiPortion is not BidiPortion" );
// level associated with bidi-portion;
nCurrLevel = ((SwBidiPortion*)pMulti)->GetLevel();
}
@@ -1265,7 +1266,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
return NULL;
}
-/*-----------------01.11.00 14:52-------------------
+/*--------------------------------------------------
* SwSpaceManipulator
* is a little helper class to manage the spaceadd-arrays of the text adjustment
* during a PaintMultiPortion.
@@ -1355,7 +1356,7 @@ SwSpaceManipulator::~SwSpaceManipulator()
rInfo.SetDirection( nOldDir );
}
-/*-----------------13.10.00 16:24-------------------
+/*--------------------------------------------------
* SwTxtPainter::PaintMultiPortion manages the paint for a SwMultiPortion.
* External, for the calling function, it seems to be a normal Paint-function,
* internal it is like a SwTxtFrm::Paint with multiple DrawTextLines
@@ -1366,13 +1367,11 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
{
GETGRID( pFrm->FindPageFrm() )
const sal_Bool bHasGrid = pGrid && GetInfo().SnapToGrid();
- sal_uInt16 nGridWidth = 0;
sal_uInt16 nRubyHeight = 0;
sal_Bool bRubyTop = sal_False;
if ( bHasGrid )
{
- nGridWidth = pGrid->GetBaseHeight();
nRubyHeight = pGrid->GetRubyHeight();
bRubyTop = ! pGrid->GetRubyTextBelow();
}
@@ -1397,8 +1396,8 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
{
// these values are needed for the calculation of the x coordinate
// and the layout mode
- ASSERT( ! pEnvPor || pEnvPor->IsBidi(),
- "Oh no, I expected a BidiPortion" )
+ OSL_ENSURE( ! pEnvPor || pEnvPor->IsBidi(),
+ "Oh no, I expected a BidiPortion" );
nFrmDir = GetInfo().GetTxtFrm()->IsRightToLeft() ? 1 : 0;
nEnvDir = pEnvPor ? ((SwBidiPortion*)pEnvPor)->GetLevel() % 2 : nFrmDir;
nThisDir = ((SwBidiPortion&)rMulti).GetLevel() % 2;
@@ -1502,8 +1501,8 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
sal_Bool bRest = pLay->IsRest();
sal_Bool bFirst = sal_True;
- ASSERT( 0 == GetInfo().GetUnderFnt() || rMulti.IsBidi(),
- " Only BiDi portions are allowed to use the common underlining font" )
+ OSL_ENSURE( 0 == GetInfo().GetUnderFnt() || rMulti.IsBidi(),
+ " Only BiDi portions are allowed to use the common underlining font" );
do
{
@@ -1595,7 +1594,7 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
if( pPor->IsMultiPortion() && ((SwMultiPortion*)pPor)->IsBidi() )
{
// but we do allow nested bidi portions
- ASSERT( rMulti.IsBidi(), "Only nesting of bidi portions is allowed" )
+ OSL_ENSURE( rMulti.IsBidi(), "Only nesting of bidi portions is allowed" );
PaintMultiPortion( rPaint, (SwMultiPortion&)*pPor, &rMulti );
}
else
@@ -1794,7 +1793,7 @@ sal_Bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
// We set nTmpX (which is used for portion calculating) to the
// current Y value
const SwPageFrm* pPage = pFrm->FindPageFrm();
- ASSERT( pPage, "No page in frame!");
+ OSL_ENSURE( pPage, "No page in frame!");
const SwLayoutFrm* pUpperFrm = pPage;
if ( pFrm->IsInTab() )
@@ -1802,7 +1801,7 @@ sal_Bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
pUpperFrm = pFrm->GetUpper();
while ( pUpperFrm && !pUpperFrm->IsCellFrm() )
pUpperFrm = pUpperFrm->GetUpper();
- ASSERT( pUpperFrm, "pFrm is in table but does not have an upper cell frame" )
+ OSL_ENSURE( pUpperFrm, "pFrm is in table but does not have an upper cell frame" );
const SwTableLine* pLine = ((SwRowFrm*)pUpperFrm->GetUpper())->GetTabLine();
const SwFmtFrmSize& rFrmFmtSize = pLine->GetFrmFmt()->GetFrmSize();
if ( ATT_VAR_SIZE == rFrmFmtSize.GetHeightSizeType() )
@@ -1873,16 +1872,10 @@ sal_Bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
GETGRID( pFrm->FindPageFrm() )
const sal_Bool bHasGrid = pGrid && GRID_LINES_CHARS == pGrid->GetGridType();
- sal_uInt16 nGridWidth = 0;
- sal_uInt16 nRubyHeight = 0;
sal_Bool bRubyTop = sal_False;
if ( bHasGrid )
- {
- nGridWidth = pGrid->GetBaseHeight();
- nRubyHeight = pGrid->GetRubyHeight();
bRubyTop = ! pGrid->GetRubyTextBelow();
- }
do
{
@@ -1899,7 +1892,7 @@ sal_Bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
if( pFirstRest )
{
- ASSERT( pFirstRest->InFldGrp(), "BuildMulti: Fieldrest expected");
+ OSL_ENSURE( pFirstRest->InFldGrp(), "BuildMulti: Fieldrest expected");
SwFldPortion *pFld =
((SwFldPortion*)pFirstRest)->Clone(
((SwFldPortion*)pFirstRest)->GetExp() );
@@ -1946,7 +1939,7 @@ sal_Bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
pNextFirst = aInf.GetRest();
if( pSecondRest )
{
- ASSERT( pSecondRest->InFldGrp(), "Fieldrest expected");
+ OSL_ENSURE( pSecondRest->InFldGrp(), "Fieldrest expected");
SwFldPortion *pFld = ((SwFldPortion*)pSecondRest)->Clone(
((SwFldPortion*)pSecondRest)->GetExp() );
pFld->SetFollow( sal_True );
@@ -2084,7 +2077,7 @@ sal_Bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
// line break has to be performed!
if( bRet )
{
- ASSERT( !pNextFirst || pNextFirst->InFldGrp(),
+ OSL_ENSURE( !pNextFirst || pNextFirst->InFldGrp(),
"BuildMultiPortion: Surprising restportion, field expected" );
SwMultiPortion *pTmp;
if( rMulti.IsDouble() )
@@ -2092,7 +2085,7 @@ sal_Bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
nMultiLen + rInf.GetIdx() );
else if( rMulti.IsRuby() )
{
- ASSERT( !pNextSecond || pNextSecond->InFldGrp(),
+ OSL_ENSURE( !pNextSecond || pNextSecond->InFldGrp(),
"BuildMultiPortion: Surprising restportion, field expected" );
if ( rInf.GetIdx() == rInf.GetLineStart() )
@@ -2185,7 +2178,7 @@ sal_Bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
return bRet;
}
-/*-----------------08.11.00 09:29-------------------
+/*--------------------------------------------------
* SwTxtFormatter::MakeRestPortion(..)
* When a fieldportion at the end of line breaks and needs a following
* fieldportion in the next line, then the "restportion" of the formatinfo
@@ -2229,7 +2222,7 @@ SwLinePortion* SwTxtFormatter::MakeRestPortion( const SwLineLayout* pLine,
}
else if( pPor->IsMultiPortion() )
{
- ASSERT( !pHelpMulti || pHelpMulti->IsBidi(),
+ OSL_ENSURE( !pHelpMulti || pHelpMulti->IsBidi(),
"Nested multiportions are forbidden." );
pFld = NULL;
@@ -2289,12 +2282,15 @@ SwLinePortion* SwTxtFormatter::MakeRestPortion( const SwLineLayout* pLine,
if ( !pCreate )
{
- ASSERT( !pHelpMulti->GetLen(), "Multiportion without attribut?" );
+ OSL_ENSURE( !pHelpMulti->GetLen(), "Multiportion without attribut?" );
if ( nMultiPos )
--nMultiPos;
pCreate = GetInfo().GetMultiCreator( --nMultiPos, 0 );
}
+ if (!pCreate)
+ return pRest;
+
if( pRest || nMultiPos > nPosition || ( pHelpMulti->IsRuby() &&
((SwRubyPortion*)pHelpMulti)->GetRubyOffset() < STRING_LEN ) )
{
@@ -2349,7 +2345,7 @@ SwLinePortion* SwTxtFormatter::MakeRestPortion( const SwLineLayout* pLine,
-/*-----------------23.10.00 10:47-------------------
+/*--------------------------------------------------
* SwTxtCursorSave notes the start and current line of a SwTxtCursor,
* sets them to the values for GetCrsrOfst inside a multiportion
* and restores them in the destructor.
@@ -2413,3 +2409,4 @@ SwTxtCursorSave::~SwTxtCursorSave()
pTxtCrsr->SetPropFont( nOldProp );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index b292f1163e1d..4facac70a342 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,7 @@ class SwTxtAttr;
class SfxPoolItem;
class SwFont;
-/*-----------------02.02.01 15:01-------------------
+/*--------------------------------------------------
* SwMultiCreator is a small structur to create a multiportion.
* It contains the kind of multiportion and a textattribute
* or a poolitem.
@@ -60,7 +61,7 @@ struct SwMultiCreator
sal_uInt8 nLevel;
};
-/*-----------------25.10.00 16:19-------------------
+/*--------------------------------------------------
* A two-line-portion (SwMultiPortion) could have surrounding brackets,
* in this case the structur SwBracket will be used.
* --------------------------------------------------*/
@@ -78,7 +79,7 @@ struct SwBracket
sal_uInt8 nPostScript; // Script of the final character
};
-/*-----------------16.10.00 12:45-------------------
+/*--------------------------------------------------
* The SwMultiPortion is line portion inside a line portion,
* it's a group of portions,
* e.g. a double line portion in a line
@@ -266,3 +267,5 @@ inline sal_Bool SwMultiPortion::HasBrackets() const
CLASSIO( SwMultiPortion )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porref.cxx b/sw/source/core/text/porref.cxx
index 6794d7c1ed0d..6b28b0a445d6 100644
--- a/sw/source/core/text/porref.cxx
+++ b/sw/source/core/text/porref.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,6 @@
#include <SwPortionHandler.hxx>
#include "viewopt.hxx" // SwViewOptions
-#include "txtcfg.hxx"
#include "porref.hxx"
#include "inftxt.hxx" // GetTxtSize()
@@ -113,3 +113,4 @@ void SwIsoRefPortion::HandlePortion( SwPortionHandler& rPH ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porref.hxx b/sw/source/core/text/porref.hxx
index aee1e46c66ad..67c64dad83d0 100644
--- a/sw/source/core/text/porref.hxx
+++ b/sw/source/core/text/porref.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,3 +72,5 @@ CLASSIO( SwIsoRefPortion )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 52acbe4e2e95..75bc6831035e 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,7 +43,6 @@
#include <pagefrm.hxx> // SwPageFrm
#include <paratr.hxx>
#include <SwPortionHandler.hxx>
-#include <txtcfg.hxx>
#include <porrst.hxx>
#include <inftxt.hxx>
#include <txtpaint.hxx> // ClipVout
@@ -58,6 +58,8 @@
#include <IDocumentSettingAccess.hxx>
#include <IDocumentDeviceAccess.hxx>
+#include <crsrsh.hxx>
+
/*************************************************************************
* class SwTmpEndPortion
*************************************************************************/
@@ -172,7 +174,7 @@ void SwKernPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( rInf.GetFont()->IsPaintBlank() )
{
- static sal_Char __READONLY_DATA sDoubleSpace[] = " ";
+ static sal_Char const sDoubleSpace[] = " ";
XubString aTxtDouble( sDoubleSpace, RTL_TEXTENCODING_MS_1252 );
// --> FME 2006-07-12 #b6439097#
SwRect aClipRect;
@@ -228,7 +230,21 @@ SwLinePortion *SwArrowPortion::Compress() { return this; }
SwTwips SwTxtFrm::EmptyHeight() const
{
- ASSERT( ! IsVertical() || ! IsSwapped(),"SwTxtFrm::EmptyHeight with swapped frame" );
+ if (IsCollapse()) {
+ ViewShell *pSh = GetShell();
+ if ( pSh->IsA( TYPE(SwCrsrShell) ) ) {
+ SwCrsrShell *pCrSh=(SwCrsrShell*)pSh;
+ SwCntntFrm *pCurrFrm=pCrSh->GetCurrFrm();
+ if (pCurrFrm==(SwCntntFrm*)this) {
+ // do nothing
+ } else {
+ return 1;
+ }
+ } else {
+ return 1;
+ }
+ }
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTxtFrm::EmptyHeight with swapped frame" );
SwFont *pFnt;
const SwTxtNode& rTxtNode = *GetTxtNode();
@@ -291,7 +307,7 @@ SwTwips SwTxtFrm::EmptyHeight() const
sal_Bool SwTxtFrm::FormatEmpty()
{
- ASSERT( ! IsVertical() || ! IsSwapped(),"SwTxtFrm::FormatEmpty with swapped frame" );
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTxtFrm::FormatEmpty with swapped frame" );
if ( HasFollow() || GetTxtNode()->GetpSwpHints() ||
0 != GetTxtNode()->GetNumRule() ||
@@ -425,8 +441,8 @@ sal_Bool SwTxtFrm::FillRegister( SwTwips& rRegStart, KSHORT& rRegDiff )
rRegDiff = rSpace.GetLineHeight();
break;
}
- default: ASSERT(
- sal_False, ": unknown LineSpaceRule" );
+ default:
+ OSL_ENSURE( sal_False, ": unknown LineSpaceRule" );
}
switch( rSpace.GetInterLineSpaceRule() )
{
@@ -451,7 +467,7 @@ sal_Bool SwTxtFrm::FillRegister( SwTwips& rRegStart, KSHORT& rRegDiff )
nNettoHeight = rRegDiff;
break;
}
- default: ASSERT( sal_False, ": unknown InterLineSpaceRule" );
+ default: OSL_ENSURE( sal_False, ": unknown InterLineSpaceRule" );
}
pDesc->SetRegHeight( rRegDiff );
pDesc->SetRegAscent( rRegDiff - nNettoHeight +
@@ -577,3 +593,5 @@ KSHORT SwControlCharPortion::GetViewWidth( const SwTxtSizeInfo& rInf ) const
return mnViewWidth;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx
index 1eaaa442b9b0..1c1d2dd48893 100644
--- a/sw/source/core/text/porrst.hxx
+++ b/sw/source/core/text/porrst.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -185,3 +186,5 @@ CLASSIO( SwKernPortion )
CLASSIO( SwArrowPortion )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/portab.hxx b/sw/source/core/text/portab.hxx
index 00b061230a46..3cda7b9d1f96 100644
--- a/sw/source/core/text/portab.hxx
+++ b/sw/source/core/text/portab.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -155,3 +156,5 @@ CLASSIO( SwTabDecimalPortion )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/portox.cxx b/sw/source/core/text/portox.cxx
index 91a8fcd5eff0..39dab8101301 100644
--- a/sw/source/core/text/portox.cxx
+++ b/sw/source/core/text/portox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,6 @@
#include <SwPortionHandler.hxx>
#include "viewopt.hxx" // SwViewOptions
-#include "txtcfg.hxx"
#include "portox.hxx"
#include "inftxt.hxx" // GetTxtSize()
@@ -113,3 +113,4 @@ void SwIsoToxPortion::HandlePortion( SwPortionHandler& rPH ) const
rPH.Special( GetLen(), aString, GetWhichPor() );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/portox.hxx b/sw/source/core/text/portox.hxx
index 848fc9ecf6f1..9c867701d7cc 100644
--- a/sw/source/core/text/portox.hxx
+++ b/sw/source/core/text/portox.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#define _PORTOX_HXX
#include "portxt.hxx"
-//#include "porglue.hxx"
/*************************************************************************
* class SwToxPortion
@@ -73,3 +73,5 @@ CLASSIO( SwIsoToxPortion )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index f123f6c42c6b..43a0e126f121 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,13 +32,9 @@
#include <ctype.h>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <hintids.hxx> // CH_TXTATR
-#include <errhdl.hxx> // ASSERT
#include <SwPortionHandler.hxx>
-#include <txtcfg.hxx>
#include <porlay.hxx>
#include <inftxt.hxx>
#include <guess.hxx> // SwTxtGuess, Zeilenumbruch
@@ -328,7 +325,7 @@ sal_Bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
// this should usually be true but
aGuess.AlternativeSpelling( rInf, rInf.GetSoftHyphPos() - 1 );
bFull = CreateHyphen( rInf, aGuess );
- ASSERT( bFull, "Problem with hyphenation!!!" );
+ OSL_ENSURE( bFull, "Problem with hyphenation!!!" );
}
rInf.ChgHyph( bHyph );
rInf.SetSoftHyphPos( 0 );
@@ -436,7 +433,7 @@ sal_Bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
SetLen( aGuess.BreakPos() - rInf.GetIdx() );
- ASSERT( aGuess.BreakStart() >= aGuess.FieldDiff(),
+ OSL_ENSURE( aGuess.BreakStart() >= aGuess.FieldDiff(),
"Trouble with expanded field portions during line break" );
const xub_StrLen nRealStart = aGuess.BreakStart() - aGuess.FieldDiff();
if( aGuess.BreakPos() < nRealStart && !InExpGrp() )
@@ -492,9 +489,9 @@ sal_Bool SwTxtPortion::Format( SwTxtFormatInfo &rInf )
return sal_True;
}
- ASSERT( rInf.RealWidth() || (rInf.X() == rInf.Width()),
+ OSL_ENSURE( rInf.RealWidth() || (rInf.X() == rInf.Width()),
"SwTxtPortion::Format: missing real width" );
- ASSERT( Height(), "SwTxtPortion::Format: missing height" );
+ OSL_ENSURE( Height(), "SwTxtPortion::Format: missing height" );
return _Format( rInf );
}
@@ -552,7 +549,7 @@ void SwTxtPortion::FormatEOL( SwTxtFormatInfo &rInf )
xub_StrLen SwTxtPortion::GetCrsrOfst( const KSHORT nOfst ) const
{
- ASSERT( !this, "SwTxtPortion::GetCrsrOfst: don't use this method!" );
+ OSL_ENSURE( !this, "SwTxtPortion::GetCrsrOfst: don't use this method!" );
return SwLinePortion::GetCrsrOfst( nOfst );
}
@@ -791,12 +788,12 @@ namespace {
{
const IFieldmark::parameter_map_t* const pParameters = pBM->GetParameters();
sal_Int32 nCurrentIdx = 0;
- const IFieldmark::parameter_map_t::const_iterator pResult = pParameters->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_RESULT));
+ const IFieldmark::parameter_map_t::const_iterator pResult = pParameters->find(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_RESULT)));
if(pResult != pParameters->end())
pResult->second >>= nCurrentIdx;
if(io_pCurrentText)
{
- const IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY));
+ const IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_LISTENTRY)));
if(pListEntries != pParameters->end())
{
uno::Sequence< ::rtl::OUString > vListEntries;
@@ -825,17 +822,18 @@ void SwFieldFormPortion::Paint( const SwTxtPaintInfo& rInf ) const
if ( pBM != NULL )
{
- if ( pBM->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX ) )
+ if ( pBM->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) ) )
{ // a checkbox...
ICheckboxFieldmark* pCheckboxFm = dynamic_cast< ICheckboxFieldmark* >(pBM);
bool checked = pCheckboxFm->IsChecked();
rInf.DrawCheckBox(*this, checked);
}
- else if ( pBM->GetFieldname( ).equalsAscii( ODF_FORMDROPDOWN ) )
+ else if ( pBM->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) )
{ // a list...
rtl::OUString aTxt;
+ getCurrentListIndex( pBM, &aTxt );
rInf.DrawViewOpt( *this, POR_FLD );
- rInf.DrawText( aTxt, *this, 0, 0/*aTxt.getLength()*/, false );
+ rInf.DrawText( aTxt, *this, 0, aTxt.getLength(), false );
}
else
{
@@ -852,16 +850,16 @@ sal_Bool SwFieldFormPortion::Format( SwTxtFormatInfo & rInf )
SwIndex aIndex( pNd, rInf.GetIdx( ) );
SwPosition aPosition( *pNd, aIndex );
IFieldmark *pBM = doc->getIDocumentMarkAccess( )->getFieldmarkFor( aPosition );
- ASSERT( pBM != NULL, "Where is my form field bookmark???" );
+ OSL_ENSURE( pBM != NULL, "Where is my form field bookmark???" );
if ( pBM != NULL )
{
- if ( pBM->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX ) )
+ if ( pBM->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) ) )
{
Width( rInf.GetTxtHeight( ) );
Height( rInf.GetTxtHeight( ) );
SetAscent( rInf.GetAscent( ) );
}
- else if ( pBM->GetFieldname( ).equalsAscii( ODF_FORMDROPDOWN ) )
+ else if ( pBM->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) )
{
::rtl::OUString aTxt;
getCurrentListIndex( pBM, &aTxt );
@@ -879,3 +877,4 @@ sal_Bool SwFieldFormPortion::Format( SwTxtFormatInfo & rInf )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx
index 2d4d5faf9e98..3b00ec7ffedb 100644
--- a/sw/source/core/text/portxt.hxx
+++ b/sw/source/core/text/portxt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,6 +67,10 @@ public:
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const;
+#if OSL_DEBUG_LEVEL > 1
+ void dumpPortionAsXml(USHORT ofs, String& aText, xmlTextWriter* writer);
+#endif
+
OUTPUT_OPERATOR
DECL_FIXEDMEMPOOL_NEWDEL(SwTxtPortion)
};
@@ -115,3 +120,5 @@ CLASSIO( SwTxtPortion )
CLASSIO( SwHolePortion )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/possiz.hxx b/sw/source/core/text/possiz.hxx
index a8f735c7b33a..c97d122da2ff 100644
--- a/sw/source/core/text/possiz.hxx
+++ b/sw/source/core/text/possiz.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,4 @@ inline SwPosSize &SwPosSize::operator=( const Size &rSize )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 2de77f4f9d21..78ec78789c52 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,9 +33,7 @@
#include "hintids.hxx"
#include <svl/whiter.hxx>
#include <tools/shl.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <swmodule.hxx>
#include <redline.hxx> // SwRedline
#include <txtatr.hxx> // SwTxt ...
@@ -48,9 +47,7 @@
#include <vcl/cmdevt.hxx>
#include <vcl/settings.hxx>
#include <txtfrm.hxx> // SwTxtFrm
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
#include <redlnitr.hxx>
#include <extinput.hxx>
#include <sfx2/printer.hxx>
@@ -103,7 +100,7 @@ void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, S
aMagicNo[SW_LATIN] = aMagicNo[SW_CJK] = aMagicNo[SW_CTL] = NULL;
// determine script changes if not already done for current paragraph
- ASSERT( pScriptInfo, "No script info available");
+ OSL_ENSURE( pScriptInfo, "No script info available");
if ( pScriptInfo->GetInvalidity() != STRING_LEN )
pScriptInfo->InitScriptInfo( rTxtNode, bRTL );
@@ -321,7 +318,7 @@ void SwRedlineItr::FillHints( MSHORT nAuthor, RedlineType_t eType )
void SwRedlineItr::ChangeTxtAttr( SwFont* pFnt, SwTxtAttr &rHt, sal_Bool bChg )
{
- ASSERT( IsOn(), "SwRedlineItr::ChangeTxtAttr: Off?" );
+ OSL_ENSURE( IsOn(), "SwRedlineItr::ChangeTxtAttr: Off?" );
if( !bShow && !pExt )
return;
@@ -335,14 +332,14 @@ void SwRedlineItr::ChangeTxtAttr( SwFont* pFnt, SwTxtAttr &rHt, sal_Bool bChg )
}
else
{
- ASSERT( ! pExt || ! pExt->IsOn(), "Pop of attribute during opened extension" )
+ OSL_ENSURE( ! pExt || ! pExt->IsOn(), "Pop of attribute during opened extension" );
rAttrHandler.PopAndChg( rHt, *pFnt );
}
}
void SwRedlineItr::_Clear( SwFont* pFnt )
{
- ASSERT( bOn, "SwRedlineItr::Clear: Off?" );
+ OSL_ENSURE( bOn, "SwRedlineItr::Clear: Off?" );
bOn = sal_False;
while( aHints.Count() )
{
@@ -448,8 +445,8 @@ void SwExtend::ActualizeFont( SwFont &rFnt, MSHORT nAttr )
short SwExtend::Enter( SwFont& rFnt, xub_StrLen nNew )
{
- ASSERT( !Inside(), "SwExtend: Enter without Leave" );
- ASSERT( !pFnt, "SwExtend: Enter with Font" );
+ OSL_ENSURE( !Inside(), "SwExtend: Enter without Leave" );
+ OSL_ENSURE( !pFnt, "SwExtend: Enter with Font" );
nPos = nNew;
if( Inside() )
{
@@ -462,7 +459,7 @@ short SwExtend::Enter( SwFont& rFnt, xub_StrLen nNew )
sal_Bool SwExtend::_Leave( SwFont& rFnt, xub_StrLen nNew )
{
- ASSERT( Inside(), "SwExtend: Leave without Enter" );
+ OSL_ENSURE( Inside(), "SwExtend: Leave without Enter" );
MSHORT nOldAttr = rArr[ nPos - nStart ];
nPos = nNew;
if( Inside() )
@@ -503,3 +500,5 @@ xub_StrLen SwExtend::Next( xub_StrLen nNext )
}
return nNext;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/redlnitr.hxx b/sw/source/core/text/redlnitr.hxx
index c288d427e92c..0fd14acd302f 100644
--- a/sw/source/core/text/redlnitr.hxx
+++ b/sw/source/core/text/redlnitr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include "ndhints.hxx"
-#ifndef IDOCUMENTREDLINEACCESS_HXX_INCLUDED
#include <IDocumentRedlineAccess.hxx>
-#endif
#include "swfont.hxx"
#ifndef _SVSTDARR_USHORTS
@@ -114,10 +113,11 @@ public:
{ return pExt->Leave(rFnt, nNew ); }
inline sal_Bool ExtOn() { if( pExt ) return pExt->IsOn(); return sal_False; }
inline void UpdateExtFont( SwFont &rFnt ) {
- ASSERT( ExtOn(), "UpdateExtFont without ExtOn" )
+ OSL_ENSURE( ExtOn(), "UpdateExtFont without ExtOn" );
pExt->UpdateFont( rFnt ); }
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtcache.cxx b/sw/source/core/text/txtcache.cxx
index 6a54639390dd..b6995b4e2b08 100644
--- a/sw/source/core/text/txtcache.cxx
+++ b/sw/source/core/text/txtcache.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,6 @@
-#include "errhdl.hxx"
#include "txtcache.hxx"
#include "txtfrm.hxx"
@@ -40,9 +40,6 @@
|*
|* SwTxtLine::SwTxtLine(), ~SwTxtLine()
|*
-|* Ersterstellung MA 16. Mar. 94
-|* Letzte Aenderung MA 16. Mar. 94
-|*
|*************************************************************************/
SwTxtLine::SwTxtLine( SwTxtFrm *pFrm, SwParaPortion *pNew ) :
@@ -60,9 +57,6 @@ SwTxtLine::~SwTxtLine()
|*
|* SwTxtLineAccess::NewObj()
|*
-|* Ersterstellung MA 16. Mar. 94
-|* Letzte Aenderung MA 16. Mar. 94
-|*
|*************************************************************************/
SwCacheObj *SwTxtLineAccess::NewObj()
@@ -74,9 +68,6 @@ SwCacheObj *SwTxtLineAccess::NewObj()
|*
|* SwTxtLineAccess::GetPara()
|*
-|* Ersterstellung MA 16. Mar. 94
-|* Letzte Aenderung MA 16. Mar. 94
-|*
|*************************************************************************/
SwParaPortion *SwTxtLineAccess::GetPara()
@@ -99,9 +90,6 @@ SwParaPortion *SwTxtLineAccess::GetPara()
|*
|* SwTxtLineAccess::SwTxtLineAccess()
|*
-|* Ersterstellung MA 16. Mar. 94
-|* Letzte Aenderung MA 16. Mar. 94
-|*
|*************************************************************************/
SwTxtLineAccess::SwTxtLineAccess( const SwTxtFrm *pOwn ) :
@@ -113,9 +101,6 @@ SwTxtLineAccess::SwTxtLineAccess( const SwTxtFrm *pOwn ) :
|*
|* SwTxtLineAccess::IsAvailable
|*
-|* Ersterstellung MA 23. Mar. 94
-|* Letzte Aenderung MA 23. Mar. 94
-|*
|*************************************************************************/
sal_Bool SwTxtLineAccess::IsAvailable() const
@@ -129,9 +114,6 @@ sal_Bool SwTxtLineAccess::IsAvailable() const
|*
|* SwTxtFrm::HasPara()
|*
-|* Ersterstellung MA 16. Mar. 94
-|* Letzte Aenderung MA 22. Aug. 94
-|*
|*************************************************************************/
sal_Bool SwTxtFrm::_HasPara() const
@@ -153,9 +135,6 @@ sal_Bool SwTxtFrm::_HasPara() const
|*
|* SwTxtFrm::GetPara()
|*
-|* Ersterstellung MA 16. Mar. 94
-|* Letzte Aenderung MA 22. Aug. 94
-|*
|*************************************************************************/
SwParaPortion *SwTxtFrm::GetPara()
@@ -176,14 +155,11 @@ SwParaPortion *SwTxtFrm::GetPara()
|*
|* SwTxtFrm::ClearPara()
|*
-|* Ersterstellung MA 16. Mar. 94
-|* Letzte Aenderung MA 22. Aug. 94
-|*
|*************************************************************************/
void SwTxtFrm::ClearPara()
{
- ASSERT( !IsLocked(), "+SwTxtFrm::ClearPara: this is locked." );
+ OSL_ENSURE( !IsLocked(), "+SwTxtFrm::ClearPara: this is locked." );
if ( !IsLocked() && GetCacheIdx() != MSHRT_MAX )
{
SwTxtLine *pTxtLine = (SwTxtLine*)SwTxtFrm::GetTxtCache()->
@@ -202,9 +178,6 @@ void SwTxtFrm::ClearPara()
|*
|* SwTxtFrm::SetPara()
|*
-|* Ersterstellung MA 16. Mar. 94
-|* Letzte Aenderung MA 22. Aug. 94
-|*
|*************************************************************************/
void SwTxtFrm::SetPara( SwParaPortion *pNew, sal_Bool bDelete )
@@ -222,7 +195,7 @@ void SwTxtFrm::SetPara( SwParaPortion *pNew, sal_Bool bDelete )
}
else
{
- ASSERT( !pNew, "+SetPara: Losing SwParaPortion" );
+ OSL_ENSURE( !pNew, "+SetPara: Losing SwParaPortion" );
nCacheIdx = MSHRT_MAX;
}
}
@@ -233,9 +206,10 @@ void SwTxtFrm::SetPara( SwParaPortion *pNew, sal_Bool bDelete )
nCacheIdx = pTxtLine->GetCachePos();
else
{
- ASSERT( sal_False, "+SetPara: InsertCache failed." );
+ OSL_ENSURE( sal_False, "+SetPara: InsertCache failed." );
}
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtcache.hxx b/sw/source/core/text/txtcache.hxx
index d484f8f1c7f5..46276d5d9700 100644
--- a/sw/source/core/text/txtcache.hxx
+++ b/sw/source/core/text/txtcache.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,5 @@ inline SwTxtLine &SwTxtLineAccess::GetTxtLine()
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtcfg.hxx b/sw/source/core/text/txtcfg.hxx
deleted file mode 100644
index b72fbfb1bd47..000000000000
--- a/sw/source/core/text/txtcfg.hxx
+++ /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.
- *
- ************************************************************************/
-
-#ifndef _TXTCFG_HXX
-#define _TXTCFG_HXX
-
-#if OSL_DEBUG_LEVEL > 1
-#include "dbgloop.hxx" // DBG_LOOP
-#else
-#ifdef DBG_LOOP //kann per precompiled hereinkommen
-#undef DBG_LOOP
-#undef DBG_LOOP_RESET
-#endif
-#define DBG_LOOP
-#define DBG_LOOP_RESET
-#endif
-
-// Toleranzwert in der Formatierung und Textausgabe.
-#define SLOPPY_TWIPS 5
-
-#define CONSTCHAR( name, string ) static const sal_Char __FAR_DATA name[] = string
-
-// Allgemeines ...
-
-#ifndef CONST
-#define CONST const
-#endif
-
-
-#endif
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 19d888153542..2012d2c221e8 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,9 +44,7 @@
#include <txtpaint.hxx> // SwSaveClip
#include <blink.hxx> // pBlink
#include <breakit.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <com/sun/star/i18n/WordType.hpp>
#include <editeng/langitem.hxx>
#include <charatr.hxx>
@@ -243,7 +242,7 @@ bool SwTxtNode::GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescen
if ( !((SwTxtFrm*)pLastFrm)->IsEmpty() )
{
const SwParaPortion* pPara = ((SwTxtFrm*)pLastFrm)->GetPara();
- ASSERT( pPara, "GetDropSize could not find the ParaPortion, I'll guess the drop cap size" )
+ OSL_ENSURE( pPara, "GetDropSize could not find the ParaPortion, I'll guess the drop cap size" );
if ( pPara )
{
@@ -294,7 +293,7 @@ void SwDropPortion::PaintTxt( const SwTxtPaintInfo &rInf ) const
!rInf.GetOpt().IsPagePreview() && !rInf.GetOpt().IsReadonly() && SwViewOption::IsFieldShadings() )
rInf.DrawBackground( *this );
- ASSERT( nDropHeight && pPart && nLines != 1, "Drop Portion painted twice" );
+ OSL_ENSURE( nDropHeight && pPart && nLines != 1, "Drop Portion painted twice" );
const SwDropPortionPart* pCurrPart = GetPart();
const xub_StrLen nOldLen = GetLen();
@@ -528,7 +527,7 @@ void SwTxtFormatter::CalcDropHeight( const MSHORT nLines )
{
if( !Next() )
{
- ASSERT( !this, "SwTxtFormatter::_CalcDropHeight: left Toulouse" );
+ OSL_ENSURE( !this, "SwTxtFormatter::_CalcDropHeight: left Toulouse" );
break;
}
}
@@ -546,7 +545,7 @@ void SwTxtFormatter::CalcDropHeight( const MSHORT nLines )
void SwTxtFormatter::GuessDropHeight( const MSHORT nLines )
{
- ASSERT( nLines, "GuessDropHeight: Give me more Lines!" );
+ OSL_ENSURE( nLines, "GuessDropHeight: Give me more Lines!" );
KSHORT nAscent = 0;
KSHORT nHeight = 0;
SetDropLines( nLines );
@@ -607,7 +606,7 @@ SwDropPortion *SwTxtFormatter::NewDropPortion( SwTxtFormatInfo &rInf )
}
// build DropPortionParts:
- ASSERT( ! rInf.GetIdx(), "Drop Portion not at 0 position!" );
+ OSL_ENSURE( ! rInf.GetIdx(), "Drop Portion not at 0 position!" );
xub_StrLen nNextChg = 0;
const SwCharFmt* pFmt = pDropFmt->GetCharFmt();
SwDropPortionPart* pCurrPart = 0;
@@ -661,7 +660,7 @@ SwDropPortion *SwTxtFormatter::NewDropPortion( SwTxtFormatInfo &rInf )
void SwTxtPainter::PaintDropPortion()
{
const SwDropPortion *pDrop = GetInfo().GetParaPortion()->FindDropPortion();
- ASSERT( pDrop, "DrapCop-Portion not available." );
+ OSL_ENSURE( pDrop, "DrapCop-Portion not available." );
if( !pDrop )
return;
@@ -688,17 +687,6 @@ void SwTxtPainter::PaintDropPortion()
}
Point aLineOrigin( GetTopLeft() );
-#ifdef NIE
- // Retusche nachholen...
- if( nX )
- {
- const Point aPoint( Left(), Y() );
- const Size aSize( nX - 1, GetDropHeight()+GetDropDescent() );
- SwRect aRetouche( aPoint, aSize );
- GetInfo().DrawRect( aRetouche );
- }
-#endif
-
aLineOrigin.X() += nX;
KSHORT nTmpAscent, nTmpHeight;
CalcAscentAndHeight( nTmpAscent, nTmpHeight );
@@ -759,7 +747,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
const void* pFntNo = 0;
MSHORT nTmpIdx = 0;
- ASSERT( pDrop->GetPart(),"DropPortion without part during font calculation");
+ OSL_ENSURE( pDrop->GetPart(),"DropPortion without part during font calculation");
SwDropPortionPart* pCurrPart = pDrop->GetPart();
const sal_Bool bUseCache = ! pCurrPart->GetFollow();
@@ -1103,3 +1091,4 @@ sal_Bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
return bFull;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index b91436a72832..f99a2e334387 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,7 +45,6 @@
#include "flyfrm.hxx" //IsInBody()
#include "viewimp.hxx"
#include "txtatr.hxx" // SwTxtFld
-#include "txtcfg.hxx"
#include "swfont.hxx" // NewFldPortion, new SwFont
#include "fntcache.hxx" // NewFldPortion, SwFntAccess
#include "porfld.hxx"
@@ -225,20 +225,6 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
{
SwDBField* pDBFld = (SwDBField*)pFld;
pDBFld->ChgBodyTxtFlag( ::lcl_IsInBody( pFrame ) );
-/* Solange das ChangeExpansion auskommentiert ist.
- * Aktualisieren in Kopf/Fuszeilen geht aktuell nicht.
- if( !::lcl_IsInBody( pFrame ) )
- {
- pDBFld->ChgBodyTxtFlag( sal_False );
- pDBFld->ChangeExpansion( pFrame, (SwTxtFld*)pHint );
- }
- else if( !pDBFld->IsInBodyTxt() )
- {
- // war vorher anders, also erst expandieren, dann umsetzen!!
- pDBFld->ChangeExpansion( pFrame, (SwTxtFld*)pHint );
- pDBFld->ChgBodyTxtFlag( sal_True );
- }
-*/
}
{
String const str( (bName)
@@ -373,9 +359,6 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
SwLinePortion *pRet = 0;
if( !pHint )
{
-#if OSL_DEBUG_LEVEL > 1
-// aDbstream << "NewExtraPortion: hint not found?" << endl;
-#endif
pRet = new SwTxtPortion;
pRet->SetLen( 1 );
rInf.SetLen( 1 );
@@ -418,9 +401,6 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
}
if( !pRet )
{
-#if OSL_DEBUG_LEVEL > 1
-// aDbstream << "NewExtraPortion: unknown hint" << endl;
-#endif
const XubString aNothing;
pRet = new SwFldPortion( aNothing );
rInf.SetLen( 1 );
@@ -449,16 +429,13 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()) );
const sal_Bool bLeft = SVX_ADJUST_LEFT == rNumFmt.GetNumAdjust();
const sal_Bool bCenter = SVX_ADJUST_CENTER == rNumFmt.GetNumAdjust();
- // --> OD 2008-01-23 #newlistlevelattrs#
const bool bLabelAlignmentPosAndSpaceModeActive(
rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT );
const KSHORT nMinDist = bLabelAlignmentPosAndSpaceModeActive
? 0 : rNumFmt.GetCharTextDistance();
- // <--
if( SVX_NUM_BITMAP == rNumFmt.GetNumberingType() )
{
- // --> OD 2008-01-23 #newlistlevelattrs#
pRet = new SwGrfNumPortion( (SwFrm*)GetTxtFrm(),
pTxtNd->GetLabelFollowedBy(),
rNumFmt.GetBrush(),
@@ -466,7 +443,6 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
rNumFmt.GetGraphicSize(),
bLeft, bCenter, nMinDist,
bLabelAlignmentPosAndSpaceModeActive );
- // <--
long nTmpA = rInf.GetLast()->GetAscent();
long nTmpD = rInf.GetLast()->Height() - nTmpA;
if( !rInf.IsTest() )
@@ -542,12 +518,10 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
else
{
XubString aTxt( pTxtNd->GetNumString() );
- // --> OD 2008-01-23 #newlistlevelattrs#
if ( aTxt.Len() > 0 )
{
aTxt.Insert( pTxtNd->GetLabelFollowedBy() );
}
- // <--
// 7974: Nicht nur eine Optimierung...
// Eine Numberportion ohne Text wird die Breite von 0
@@ -582,11 +556,9 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
// we do not allow a vertical font
pNumFnt->SetVertical( pNumFnt->GetOrientation(), pFrm->IsVertical() );
- // --> OD 2008-01-23 #newlistlevelattrs#
pRet = new SwNumberPortion( aTxt, pNumFnt,
bLeft, bCenter, nMinDist,
bLabelAlignmentPosAndSpaceModeActive );
- // <--
}
}
}
@@ -594,3 +566,4 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
return pRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 68283e988ca1..9b61ccf76d14 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,7 +50,6 @@
#include "txtfly.hxx" // SwTxtFly
#include "txtpaint.hxx" // SwSaveClip
#include "txtatr.hxx" // SwTxtFlyCnt
-#include "txtcfg.hxx"
#include "notxtfrm.hxx"
#include "flyfrms.hxx"
#include "fmtcnct.hxx" // SwFmtChain
@@ -73,22 +73,13 @@
#include <IDocumentDrawModelAccess.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <IDocumentSettingAccess.hxx>
-#include <svx/obj3d.hxx>
-#include <editeng/txtrange.hxx>
-#include <editeng/lrspitem.hxx>
-#include <editeng/ulspitem.hxx>
-#include <editeng/lspcitem.hxx>
#include <svx/svdoedge.hxx>
#include "doc.hxx"
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
#include "viewopt.hxx" // SwViewOptions, nur zum Testen (Test2)
#endif
-#ifdef VERT_DISTANCE
-#include <math.h>
-#endif
-
using namespace ::com::sun::star;
@@ -128,8 +119,8 @@ using namespace ::com::sun::star;
void SwTxtFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom )
{
- ASSERT( ! pFrm->IsVertical() || pFrm->IsSwapped(),
- "SwTxtFormatter::CalcUnclipped with unswapped frame" )
+ OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
+ "SwTxtFormatter::CalcUnclipped with unswapped frame" );
long nFlyAsc, nFlyDesc;
// OD 08.01.2004 #i11859# - use new method <SwLineLayout::MaxAscentDescent(..)>
@@ -149,8 +140,8 @@ void SwTxtFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom )
void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
xub_StrLen nStartIdx, sal_Bool bAllWays ) const
{
- ASSERT( ! pFrm->IsVertical() || pFrm->IsSwapped(),
- "SwTxtFormatter::UpdatePos with unswapped frame" )
+ OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
+ "SwTxtFormatter::UpdatePos with unswapped frame" );
if( GetInfo().IsTest() )
return;
@@ -236,14 +227,14 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
}
if( pPos->IsMultiPortion() && ((SwMultiPortion*)pPos)->HasFlyInCntnt() )
{
- ASSERT( !GetMulti(), "Too much multi" );
+ OSL_ENSURE( !GetMulti(), "Too much multi" );
((SwTxtFormatter*)this)->pMulti = (SwMultiPortion*)pPos;
SwLineLayout *pLay = &GetMulti()->GetRoot();
Point aSt( aTmpInf.X(), aStart.Y() );
if ( GetMulti()->HasBrackets() )
{
- ASSERT( GetMulti()->IsDouble(), "Brackets only for doubles");
+ OSL_ENSURE( GetMulti()->IsDouble(), "Brackets only for doubles");
aSt.X() += ((SwDoubleLinePortion*)GetMulti())->PreWidth();
}
else if( GetMulti()->HasRotation() )
@@ -280,8 +271,8 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
void SwTxtFormatter::AlignFlyInCntBase( long nBaseLine ) const
{
- ASSERT( ! pFrm->IsVertical() || pFrm->IsSwapped(),
- "SwTxtFormatter::AlignFlyInCntBase with unswapped frame" )
+ OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
+ "SwTxtFormatter::AlignFlyInCntBase with unswapped frame" );
if( GetInfo().IsTest() )
return;
@@ -339,7 +330,7 @@ void SwTxtFormatter::AlignFlyInCntBase( long nBaseLine ) const
sal_Bool SwTxtFormatter::ChkFlyUnderflow( SwTxtFormatInfo &rInf ) const
{
- ASSERT( rInf.GetTxtFly()->IsOn(), "SwTxtFormatter::ChkFlyUnderflow: why?" );
+ OSL_ENSURE( rInf.GetTxtFly()->IsOn(), "SwTxtFormatter::ChkFlyUnderflow: why?" );
if( GetCurr() )
{
// Erst pruefen wir, ob ueberhaupt ein Fly mit der Zeile ueberlappt.
@@ -754,12 +745,9 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
SwTxtFly::SwTxtFly( const SwTxtFly& rTxtFly )
{
pPage = rTxtFly.pPage;
- // --> OD 2006-08-15 #i68520#
mpCurrAnchoredObj = rTxtFly.mpCurrAnchoredObj;
- // <--
pCurrFrm = rTxtFly.pCurrFrm;
pMaster = rTxtFly.pMaster;
- // --> OD 2006-08-15 #i68520#
if( rTxtFly.mpAnchoredObjList )
{
mpAnchoredObjList = new SwAnchoredObjList( *(rTxtFly.mpAnchoredObjList) );
@@ -768,11 +756,16 @@ SwTxtFly::SwTxtFly( const SwTxtFly& rTxtFly )
{
mpAnchoredObjList = NULL;
}
- // <--
bOn = rTxtFly.bOn;
bLeftSide = rTxtFly.bLeftSide;
bTopRule = rTxtFly.bTopRule;
+ nMinBottom = rTxtFly.nMinBottom;
+ nNextTop = rTxtFly.nNextTop;
+ nIndex = rTxtFly.nIndex;
+ mbIgnoreCurrentFrame = rTxtFly.mbIgnoreCurrentFrame;
+ mbIgnoreContour = rTxtFly.mbIgnoreContour;
+ mbIgnoreObjsInHeaderFooter = rTxtFly.mbIgnoreObjsInHeaderFooter;
}
void SwTxtFly::CtorInitTxtFly( const SwTxtFrm *pFrm )
@@ -847,7 +840,7 @@ sal_Bool SwTxtFly::IsAnyFrm() const
{
SWAP_IF_SWAPPED( pCurrFrm )
- ASSERT( bOn, "IsAnyFrm: Why?" );
+ OSL_ENSURE( bOn, "IsAnyFrm: Why?" );
SwRect aRect( pCurrFrm->Frm().Pos() + pCurrFrm->Prt().Pos(),
pCurrFrm->Prt().SSize() );
@@ -868,7 +861,7 @@ sal_Bool SwTxtFly::IsAnyFrm() const
sal_Bool SwTxtFly::IsAnyObj( const SwRect &rRect ) const
{
- ASSERT ( bOn, "SwTxtFly::IsAnyObj: Who's knocking?" );
+ OSL_ENSURE( bOn, "SwTxtFly::IsAnyObj: Who's knocking?" );
SwRect aRect( rRect );
if ( aRect.IsEmpty() )
@@ -955,7 +948,7 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
? mpCurrAnchoredObj->GetDrawObj()->GetOrdNum()
: SAL_MAX_UINT32;
// <--
- ASSERT( !bTopRule, "DrawTextOpaque: Wrong TopRule" );
+ OSL_ENSURE( !bTopRule, "DrawTextOpaque: Wrong TopRule" );
// --> OD 2006-08-15 #i68520#
SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 );
@@ -1061,7 +1054,7 @@ void SwTxtFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
const SwTxtPaintInfo &rInf, sal_Bool bNoGraphic )
{
SwRegionRects aRegion( rRect );
- ASSERT( !bTopRule, "DrawFlyRect: Wrong TopRule" );
+ OSL_ENSURE( !bTopRule, "DrawFlyRect: Wrong TopRule" );
// --> OD 2006-08-15 #i68520#
SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 );
if ( bOn && nCount > 0 )
@@ -1120,7 +1113,7 @@ void SwTxtFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
pOut->DrawRect( aRegion[i].SVRect() );
else
{
- ASSERT( ((SvxBrushItem*)-1) != rInf.GetBrushItem(),
+ OSL_ENSURE( ((SvxBrushItem*)-1) != rInf.GetBrushItem(),
"DrawRect: Uninitialized BrushItem!" );
::DrawGraphic( rInf.GetBrushItem(), pOut, rInf.GetBrushRect(),
aRegion[i] );
@@ -1270,7 +1263,7 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
// --> OD 2004-10-06 #i26945#
const SwFmtAnchor& rNewA = _pAnchoredObj->GetFrmFmt().GetAnchor();
// <--
- ASSERT( FLY_AS_CHAR != rNewA.GetAnchorId(),
+ OSL_ENSURE( FLY_AS_CHAR != rNewA.GetAnchorId(),
"Don't call GetTop with a FlyInCntFrm" );
if (FLY_AT_PAGE == rNewA.GetAnchorId())
return sal_True; // Seitengebundenen wird immer ausgewichen.
@@ -1412,9 +1405,9 @@ struct AnchoredObjOrder
// --> OD 2006-08-15 #i68520#
SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
{
- ASSERT( pCurrFrm, "InitFlyList: No Frame, no FlyList" );
+ OSL_ENSURE( pCurrFrm, "InitFlyList: No Frame, no FlyList" );
// --> OD 2006-08-15 #i68520#
- ASSERT( !mpAnchoredObjList, "InitFlyList: FlyList already initialized" );
+ OSL_ENSURE( !mpAnchoredObjList, "InitFlyList: FlyList already initialized" );
// <--
SWAP_IF_SWAPPED( pCurrFrm )
@@ -1673,7 +1666,7 @@ SwContourCache::~SwContourCache()
void SwContourCache::ClrObject( MSHORT nPos )
{
- ASSERT( pTextRanger[ nPos ], "ClrObject: Allready cleared. Good Bye!" );
+ OSL_ENSURE( pTextRanger[ nPos ], "ClrObject: Allready cleared. Good Bye!" );
nPntCnt -= pTextRanger[ nPos ]->GetPointCount();
delete pTextRanger[ nPos ];
--nObjCnt;
@@ -1803,7 +1796,7 @@ const SwRect SwContourCache::ContourRect( const SwFmt* pFmt,
delete pPolyPolygon;
// UPPER_LOWER_TEST
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
const SwRootFrm* pTmpRootFrm = pFmt->getIDocumentLayoutAccess()->GetRootFrm();
if( pTmpRootFrm->GetCurrShell() )
{
@@ -1876,7 +1869,7 @@ const SwRect SwContourCache::ContourRect( const SwFmt* pFmt,
* SwContourCache::ShowContour()
* zeichnet die PolyPolygone des Caches zu Debugzwecken.
*************************************************************************/
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
void SwContourCache::ShowContour( OutputDevice* pOut, const SdrObject* pObj,
const Color& rClosedColor, const Color& rOpenColor )
@@ -1898,7 +1891,6 @@ void SwContourCache::ShowContour( OutputDevice* pOut, const SdrObject* pObj,
pOut->SetLineColor( rClosedColor );
pOut->DrawPolygon( rPol );
}
-#if OSL_DEBUG_LEVEL > 1
static KSHORT nRadius = 0;
if( nRadius )
{
@@ -1918,7 +1910,6 @@ void SwContourCache::ShowContour( OutputDevice* pOut, const SdrObject* pObj,
}
}
}
-#endif
}
}
#endif
@@ -1927,7 +1918,7 @@ void SwContourCache::ShowContour( OutputDevice* pOut, const SdrObject* pObj,
* SwTxtFly::ShowContour()
* zeichnet die PolyPolygone des Caches zu Debugzwecken.
*************************************************************************/
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
void SwTxtFly::ShowContour( OutputDevice* pOut )
{
@@ -2083,8 +2074,8 @@ void SwTxtFly::CalcRightMargin( SwRect &rFly,
const SwRect &rLine ) const
{
// Normalerweise ist der rechte Rand der rechte Rand der Printarea.
- ASSERT( ! pCurrFrm->IsVertical() || ! pCurrFrm->IsSwapped(),
- "SwTxtFly::CalcRightMargin with swapped frame" )
+ OSL_ENSURE( ! pCurrFrm->IsVertical() || ! pCurrFrm->IsSwapped(),
+ "SwTxtFly::CalcRightMargin with swapped frame" );
SWRECTFN( pCurrFrm )
// --> OD 2004-12-14 #118796# - correct determination of right of printing area
SwTwips nRight = (pCurrFrm->*fnRect->fnGetPrtRight)();
@@ -2187,8 +2178,8 @@ void SwTxtFly::CalcLeftMargin( SwRect &rFly,
SwAnchoredObjList::size_type nFlyPos,
const SwRect &rLine ) const
{
- ASSERT( ! pCurrFrm->IsVertical() || ! pCurrFrm->IsSwapped(),
- "SwTxtFly::CalcLeftMargin with swapped frame" )
+ OSL_ENSURE( ! pCurrFrm->IsVertical() || ! pCurrFrm->IsSwapped(),
+ "SwTxtFly::CalcLeftMargin with swapped frame" );
SWRECTFN( pCurrFrm )
// --> OD 2004-12-14 #118796# - correct determination of left of printing area
SwTwips nLeft = (pCurrFrm->*fnRect->fnGetPrtLeft)();
@@ -2422,9 +2413,11 @@ sal_Bool SwTxtFly::IsAnyFrm( const SwRect &rLine ) const
SWAP_IF_SWAPPED( pCurrFrm )
- ASSERT( bOn, "IsAnyFrm: Why?" );
+ OSL_ENSURE( bOn, "IsAnyFrm: Why?" );
const sal_Bool bRet = ForEach( rLine, NULL, sal_False );
UNDO_SWAP( pCurrFrm )
return bRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtfly.hxx b/sw/source/core/text/txtfly.hxx
index 6bfb4e9afa0e..5372c5d9bc9f 100644
--- a/sw/source/core/text/txtfly.hxx
+++ b/sw/source/core/text/txtfly.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,20 +41,12 @@ class SwTxtPaintInfo;
class SwFmt;
class TextRanger;
class Color;
-// --> OD 2004-10-06 #i26945#
class SwAnchoredObject;
-// <--
-// --> OD 2006-08-15 #i68520# - refactoring
-//typedef MSHORT _FlyCntnt;
#include <fmtsrndenum.hxx>
-// <--
-// --> OD 2006-08-15 #i68520#
-//SV_DECL_PTRARR( SwFlyList, SdrObject*, 10, 10 )
#include <vector>
typedef std::vector< SwAnchoredObject* > SwAnchoredObjList;
-// <--
/*************************************************************************
* class SwFlyIter
@@ -89,17 +82,15 @@ class SwContourCache
public:
SwContourCache();
~SwContourCache();
- const SdrObject* GetObject( MSHORT nPos ){ return pSdrObj[ nPos ]; }
+ const SdrObject* GetObject( MSHORT nPos ) const{ return pSdrObj[ nPos ]; }
MSHORT GetCount() const { return nObjCnt; }
void ClrObject( MSHORT nPos );
- // --> OD 2006-08-15 #i68520#
static const SwRect CalcBoundRect( const SwAnchoredObject* pAnchoredObj,
const SwRect &rLine,
const SwTxtFrm* pFrm,
const long nXPos,
const sal_Bool bRight );
- // <--
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
void ShowContour( OutputDevice* pOut, const SdrObject* pObj,
const Color& rClosedColor, const Color& rOpenColor );
#endif
@@ -112,17 +103,10 @@ public:
class SwTxtFly
{
const SwPageFrm *pPage;
- // --> OD 2006-08-15 #i68520#
const SwAnchoredObject* mpCurrAnchoredObj;
- // <--
-
const SwTxtFrm *pCurrFrm;
-
const SwCntntFrm *pMaster;
- // --> OD 2006-08-15 #i68520#
SwAnchoredObjList* mpAnchoredObjList;
- // <--
-
long nMinBottom;
long nNextTop; // Hier wird die Oberkante des "naechsten" Rahmens gespeichert
sal_uLong nIndex;
@@ -131,12 +115,10 @@ class SwTxtFly
sal_Bool bTopRule: 1;
sal_Bool mbIgnoreCurrentFrame: 1;
sal_Bool mbIgnoreContour: 1;
- // --> OD 2004-12-17 #118809# - boolean, indicating if objects in page
- // header|footer are considered for text frames not in page header|footer.
+ // boolean, indicating if objects in page header|footer are considered for
+ // text frames not in page header|footer.
sal_Bool mbIgnoreObjsInHeaderFooter: 1;
- // <--
SwRect _GetFrm( const SwRect &rPortion, sal_Bool bTop ) const;
- // --> OD 2006-08-15 #i68520#
SwAnchoredObjList* InitAnchoredObjList();
inline SwAnchoredObjList* GetAnchoredObjList() const
{
@@ -154,37 +136,20 @@ class SwTxtFly
SwAnchoredObjList::size_type nPos,
const SwRect &rLine ) const;
SwAnchoredObjList::size_type GetPos( const SwAnchoredObject* pAnchoredObj ) const;
- // <--
- // --> OD 2004-10-06 #i26945# - change first parameter:
- // Now it's the <SwAnchoredObject> instance of the floating screen object
sal_Bool GetTop( const SwAnchoredObject* _pAnchoredObj,
const sal_Bool bInFtn,
const sal_Bool bInFooterOrHeader );
- // <--
SwTwips CalcMinBottom() const;
const SwCntntFrm* _GetMaster();
public:
- inline SwTxtFly()
- {
- mbIgnoreCurrentFrame = sal_False;
- mbIgnoreCurrentFrame = sal_False;
- // --> OD 2004-12-17 #118809#
- mbIgnoreObjsInHeaderFooter = sal_False;
- // <--
- // --> OD 2006-08-15 #i68520#
- mpCurrAnchoredObj = 0;
- mpAnchoredObjList = 0;
- // <--
- pMaster = 0;
- }
+ inline SwTxtFly() : pPage(0), mpCurrAnchoredObj(0), pCurrFrm(0), pMaster(0), mpAnchoredObjList(0), nMinBottom(0), nNextTop(0),
+ nIndex(0) {}
inline SwTxtFly( const SwTxtFrm *pFrm )
{ CtorInitTxtFly( pFrm ); }
SwTxtFly( const SwTxtFly& rTxtFly );
- // --> OD 2006-08-15 #i68520#
inline ~SwTxtFly() { delete mpAnchoredObjList; }
- // <--
void CtorInitTxtFly( const SwTxtFrm *pFrm );
void SetTopRule(){ bTopRule = sal_False; }
@@ -193,9 +158,7 @@ public:
inline sal_Bool Relax( const SwRect &rRect );
inline sal_Bool Relax();
inline SwTwips GetMinBottom() const
- // --> OD 2006-08-15 #i68520#
{ return mpAnchoredObjList ? nMinBottom : CalcMinBottom(); }
- // <--
inline const SwCntntFrm* GetMaster() const
{ return pMaster ? pMaster : ((SwTxtFly*)this)->_GetMaster(); }
inline long GetNextTop() const { return nNextTop; }
@@ -203,12 +166,10 @@ public:
inline void SetNextTop( long nNew ) const
{ ((SwTxtFly*)this)->nNextTop = nNew; }
- // --> OD 2006-08-15 #i68520#
// determines the demanded rectangle for an anchored object,
// considering its surround for text wrapping.
SwRect AnchoredObjToRect( const SwAnchoredObject* pAnchoredObj,
const SwRect& rRect ) const;
- // <--
// Die Drawmethoden stellen sicher, dass ueberlappende Frames
// (ausser bei transparenten Frames) nicht uebergepinselt werden.
@@ -225,14 +186,12 @@ public:
void SetIgnoreCurrentFrame( sal_Bool bNew ) { mbIgnoreCurrentFrame = bNew; }
void SetIgnoreContour( sal_Bool bNew ) { mbIgnoreContour = bNew; }
- // --> OD 2004-12-17 #118809#
inline void SetIgnoreObjsInHeaderFooter( const sal_Bool _bNew )
{
mbIgnoreObjsInHeaderFooter = _bNew;
}
- // <--
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
void ShowContour( OutputDevice* pOut );
#endif
};
@@ -257,3 +216,5 @@ inline SwRect SwTxtFly::GetFrm( const SwRect &rRect, sal_Bool bTop ) const
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 25b425df729c..29483f3e249e 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,7 +66,6 @@
#include <fmtline.hxx>
#include <txtfrm.hxx> // SwTxtFrm
#include <sectfrm.hxx> // SwSectFrm
-#include <txtcfg.hxx> // DBG_LOOP
#include <itrform2.hxx> // Iteratoren
#include <widorp.hxx> // SwFrmBreak
#include <txtcache.hxx>
@@ -82,9 +82,7 @@
#include <fmtflcnt.hxx> // SwFmtFlyCnt
#include <fmtcntnt.hxx> // SwFmtCntnt
// <--
-// --> OD 2008-01-31 #newlistlevelattrs#
#include <numrule.hxx>
-// <--
#include <swtable.hxx>
#include <fldupde.hxx>
#include <IGrammarContact.hxx>
@@ -356,7 +354,7 @@ SwDigitModeModifier::~SwDigitModeModifier()
void SwTxtFrm::Init()
{
- ASSERT( !IsLocked(), "+SwTxtFrm::Init: this ist locked." );
+ OSL_ENSURE( !IsLocked(), "+SwTxtFrm::Init: this ist locked." );
if( !IsLocked() )
{
ClearPara();
@@ -383,9 +381,7 @@ void SwTxtFrm::InitCtor()
mnFtnLine = 0;
// OD 2004-03-17 #i11860#
mnHeightOfLastLine = 0;
- // --> OD 2008-01-31 #newlistlevelattrs#
mnAdditionalFirstLineOffset = 0;
- // <--
nType = FRMC_TXT;
bLocked = bFormatted = bWidow = bUndersized = bJustWidow =
@@ -438,7 +434,7 @@ sal_Bool SwTxtFrm::IsHiddenNow() const
if( !Frm().Width() && IsValid() && GetUpper()->IsValid() )
//bei Stackueberlauf (StackHack) invalid!
{
-// ASSERT( false, "SwTxtFrm::IsHiddenNow: thin frame" );
+// OSL_ENSURE( false, "SwTxtFrm::IsHiddenNow: thin frame" );
return sal_True;
}
@@ -470,7 +466,7 @@ sal_Bool SwTxtFrm::IsHiddenNow() const
void SwTxtFrm::HideHidden()
{
- ASSERT( !GetFollow() && IsHiddenNow(),
+ OSL_ENSURE( !GetFollow() && IsHiddenNow(),
"HideHidden on visible frame of hidden frame has follow" );
const xub_StrLen nEnd = STRING_LEN;
@@ -650,7 +646,7 @@ void SwTxtFrm::HideAndShowObjects()
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwTxtFrm::HideAndShowObjects()> - object not anchored at/inside paragraph!?" );
}
}
@@ -783,8 +779,8 @@ void SwTxtFrm::_InvalidateRange( const SwCharRange &aRange, const long nD)
void SwTxtFrm::CalcLineSpace()
{
- ASSERT( ! IsVertical() || ! IsSwapped(),
- "SwTxtFrm::CalcLineSpace with swapped frame!" )
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
+ "SwTxtFrm::CalcLineSpace with swapped frame!" );
if( IsLocked() || !HasPara() )
return;
@@ -1425,7 +1421,7 @@ sal_Bool SwTxtFrm::GetInfo( SfxPoolItem &rHnt ) const
void SwTxtFrm::PrepWidows( const MSHORT nNeed, sal_Bool bNotify )
{
- ASSERT(GetFollow() && nNeed, "+SwTxtFrm::Prepare: lost all friends");
+ OSL_ENSURE(GetFollow() && nNeed, "+SwTxtFrm::Prepare: lost all friends");
SwParaPortion *pPara = GetPara();
if ( !pPara )
@@ -1579,7 +1575,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
if( !HasPara() && PREP_MUST_FIT != ePrep )
{
SetInvalidVert( sal_True ); // Test
- ASSERT( !IsLocked(), "SwTxtFrm::Prepare: three of a perfect pair" );
+ OSL_ENSURE( !IsLocked(), "SwTxtFrm::Prepare: three of a perfect pair" );
if ( bNotify )
InvalidateSize();
else
@@ -1822,7 +1818,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
// letzte Zeile formatiert werden, damit ggf. die erste Zeile des Follows
// hochrutschen kann, die extra auf die naechste Seite gerutscht war, um mit
// der Fussnote zusammen zu sein, insbesondere bei spaltigen Bereichen.
- ASSERT( GetFollow(), "PREP_FTN_GONE darf nur vom Follow gerufen werden" );
+ OSL_ENSURE( GetFollow(), "PREP_FTN_GONE darf nur vom Follow gerufen werden" );
xub_StrLen nPos = GetFollow()->GetOfst();
if( IsFollow() && GetOfst() == nPos ) // falls wir gar keine Textmasse besitzen,
FindMaster()->Prepare( PREP_FTN_GONE ); // rufen wir das Prepare unseres Masters
@@ -1844,7 +1840,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
if( pVoid )
{
xub_StrLen nWhere = CalcFlyPos( (SwFrmFmt*)pVoid );
- ASSERT( STRING_LEN != nWhere, "Prepare: Why me?" );
+ OSL_ENSURE( STRING_LEN != nWhere, "Prepare: Why me?" );
InvalidateRange( SwCharRange( nWhere, 1 ) );
return;
}
@@ -1882,7 +1878,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
pPara->SetPrep( sal_True );
}
-/* -----------------11.02.99 17:56-------------------
+/* --------------------------------------------------
* Kleine Hilfsklasse mit folgender Funktion:
* Sie soll eine Probeformatierung vorbereiten.
* Der Frame wird in Groesse und Position angepasst, sein SwParaPortion zur Seite
@@ -1938,7 +1934,7 @@ SwTestFormat::SwTestFormat( SwTxtFrm* pTxtFrm, const SwFrm* pPre, SwTwips nMaxHe
pOldPara = pFrm->HasPara() ? pFrm->GetPara() : NULL;
pFrm->SetPara( new SwParaPortion(), sal_False );
- ASSERT( ! pFrm->IsSwapped(), "A frame is swapped before _Format" );
+ OSL_ENSURE( ! pFrm->IsSwapped(), "A frame is swapped before _Format" );
if ( pFrm->IsVertical() )
pFrm->SwapWidthAndHeight();
@@ -1951,7 +1947,7 @@ SwTestFormat::SwTestFormat( SwTxtFrm* pTxtFrm, const SwFrm* pPre, SwTwips nMaxHe
if ( pFrm->IsVertical() )
pFrm->SwapWidthAndHeight();
- ASSERT( ! pFrm->IsSwapped(), "A frame is swapped after _Format" );
+ OSL_ENSURE( ! pFrm->IsSwapped(), "A frame is swapped after _Format" );
}
SwTestFormat::~SwTestFormat()
@@ -1991,7 +1987,7 @@ sal_Bool SwTxtFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, sal_Bool
sal_Bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, sal_Bool &bSplit, sal_Bool bTst )
{
- ASSERT( ! IsVertical() || ! IsSwapped(),
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
"SwTxtFrm::WouldFit with swapped frame" );
SWRECTFN( this );
@@ -2023,7 +2019,7 @@ sal_Bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, sal_Bool &bSplit, sal_Bool bTs
// In sehr unguenstigen Faellen kann GetPara immer noch 0 sein.
// Dann returnen wir sal_True, um auf der neuen Seite noch einmal
// anformatiert zu werden.
- ASSERT( HasPara() || IsHiddenNow(), "WouldFit: GetFormatted() and then !HasPara()" );
+ OSL_ENSURE( HasPara() || IsHiddenNow(), "WouldFit: GetFormatted() and then !HasPara()" );
if( !HasPara() || ( !(Frm().*fnRect->fnGetHeight)() && IsHiddenNow() ) )
return sal_True;
@@ -2097,8 +2093,8 @@ sal_Bool SwTxtFrm::WouldFit( SwTwips &rMaxHeight, sal_Bool &bSplit, sal_Bool bTs
KSHORT SwTxtFrm::GetParHeight() const
{
- ASSERT( ! IsVertical() || ! IsSwapped(),
- "SwTxtFrm::GetParHeight with swapped frame" )
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
+ "SwTxtFrm::GetParHeight with swapped frame" );
if( !HasPara() )
{ // Fuer nichtleere Absaetze ist dies ein Sonderfall, da koennen wir
@@ -2225,8 +2221,6 @@ SwTwips SwTxtFrm::CalcFitToContent()
line offset for the real text formatting due to the value of label
adjustment attribute of the list level.
- OD 2008-01-31 #newlistlevelattrs#
-
@author OD
*/
void SwTxtFrm::CalcAdditionalFirstLineOffset()
@@ -2315,7 +2309,7 @@ void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont )
// <--
// determine output device
ViewShell* pVsh = GetShell();
- ASSERT( pVsh, "<SwTxtFrm::_GetHeightOfLastLineForPropLineSpacing()> - no ViewShell" );
+ OSL_ENSURE( pVsh, "<SwTxtFrm::_GetHeightOfLastLineForPropLineSpacing()> - no ViewShell" );
// --> OD 2007-07-02 #i78921# - make code robust, according to provided patch
// There could be no <ViewShell> instance in the case of loading a binary
// StarOffice file format containing an embedded Writer document.
@@ -2330,7 +2324,7 @@ void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont )
{
pOut = GetTxtNode()->getIDocumentDeviceAccess()->getReferenceDevice( true );
}
- ASSERT( pOut, "<SwTxtFrm::_GetHeightOfLastLineForPropLineSpacing()> - no OutputDevice" );
+ OSL_ENSURE( pOut, "<SwTxtFrm::_GetHeightOfLastLineForPropLineSpacing()> - no OutputDevice" );
// --> OD 2007-07-02 #i78921# - make code robust, according to provided patch
if ( !pOut )
{
@@ -2393,7 +2387,7 @@ void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont )
if ( bCalcHeightOfLastLine )
{
- ASSERT( HasPara(),
+ OSL_ENSURE( HasPara(),
"<SwTxtFrm::_CalcHeightOfLastLine()> - missing paragraph portions." );
const SwLineLayout* pLineLayout = GetPara();
while ( pLineLayout && pLineLayout->GetNext() )
@@ -2753,8 +2747,8 @@ SwTwips lcl_CalcFlyBasePos( const SwTxtFrm& rFrm, SwRect aFlyRect,
void SwTxtFrm::CalcBaseOfstForFly()
{
- ASSERT( !IsVertical() || !IsSwapped(),
- "SwTxtFrm::CalcBasePosForFly with swapped frame!" )
+ OSL_ENSURE( !IsVertical() || !IsSwapped(),
+ "SwTxtFrm::CalcBasePosForFly with swapped frame!" );
const SwNode* pNode = GetTxtNode();
if ( !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::ADD_FLY_OFFSETS) )
@@ -2802,3 +2796,5 @@ void SwTxtFrm::CalcBaseOfstForFly()
mnFlyAnchorOfst = nRet1 - nLeft;
mnFlyAnchorOfstNoWrap = nRet2 - nLeft;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index d6a0ce1dc6d0..5f474354be45 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,14 +44,11 @@
#include <editeng/brshitem.hxx>
#include <editeng/charrotateitem.hxx>
#include <breakit.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <tabfrm.hxx>
// OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
-#include "txtcfg.hxx"
#include "swfont.hxx" // new SwFont
#include "porftn.hxx"
#include "porfly.hxx"
@@ -103,10 +101,10 @@ SwTxtFrm *SwTxtFrm::FindFtnRef( const SwTxtFtn *pFtn )
* CalcFtnFlag()
*************************************************************************/
-#ifndef DBG_UTIL
-void SwTxtFrm::CalcFtnFlag()
+#if OSL_DEBUG_LEVEL > 1
+void SwTxtFrm::CalcFtnFlag( xub_StrLen nStop )//For testing the SplitFrm
#else
-void SwTxtFrm::CalcFtnFlag( xub_StrLen nStop )//Fuer den Test von SplitFrm
+void SwTxtFrm::CalcFtnFlag()
#endif
{
bFtn = sal_False;
@@ -117,11 +115,11 @@ void SwTxtFrm::CalcFtnFlag( xub_StrLen nStop )//Fuer den Test von SplitFrm
const sal_uInt16 nSize = pHints->Count();
-#ifndef DBG_UTIL
- const xub_StrLen nEnd = GetFollow() ? GetFollow()->GetOfst() : STRING_LEN;
-#else
+#if OSL_DEBUG_LEVEL > 1
const xub_StrLen nEnd = nStop != STRING_LEN ? nStop
: GetFollow() ? GetFollow()->GetOfst() : STRING_LEN;
+#else
+ const xub_StrLen nEnd = GetFollow() ? GetFollow()->GetOfst() : STRING_LEN;
#endif
for ( sal_uInt16 i = 0; i < nSize; ++i )
@@ -147,7 +145,7 @@ void SwTxtFrm::CalcFtnFlag( xub_StrLen nStop )//Fuer den Test von SplitFrm
sal_Bool SwTxtFrm::CalcPrepFtnAdjust()
{
- ASSERT( HasFtn(), "Wer ruft mich da?" );
+ OSL_ENSURE( HasFtn(), "Wer ruft mich da?" );
SwFtnBossFrm *pBoss = FindFtnBossFrm( sal_True );
const SwFtnFrm *pFtn = pBoss->FindFirstFtn( this );
if( pFtn && FTNPOS_CHAPTER != GetNode()->GetDoc()->GetFtnInfo().ePos &&
@@ -196,7 +194,7 @@ SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
// containing the footnote.
SWRECTFN( pFrm )
- ASSERT( !pFrm->IsVertical() || !pFrm->IsSwapped(),
+ OSL_ENSURE( !pFrm->IsVertical() || !pFrm->IsSwapped(),
"lcl_GetFtnLower with swapped frame" );
SwTwips nAdd;
@@ -222,8 +220,8 @@ SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
pRow = pRow->GetUpper();
const SwTabFrm* pTabFrm = (SwTabFrm*)pRow->GetUpper();
- ASSERT( pTabFrm && pRow &&
- pRow->GetUpper()->IsTabFrm(), "Upper of row should be tab" )
+ OSL_ENSURE( pTabFrm && pRow &&
+ pRow->GetUpper()->IsTabFrm(), "Upper of row should be tab" );
const sal_Bool bDontSplit = !pTabFrm->IsFollow() &&
!pTabFrm->IsLayoutSplitAllowed();
@@ -253,11 +251,11 @@ SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
// #i10770#: If there are fly frames anchored at previous paragraphs,
// the deadline should consider their lower borders.
const SwFrm* pStartFrm = pFrm->GetUpper()->GetLower();
- ASSERT( pStartFrm, "Upper has no lower" )
+ OSL_ENSURE( pStartFrm, "Upper has no lower" );
SwTwips nFlyLower = bVert ? LONG_MAX : 0;
while ( pStartFrm != pFrm )
{
- ASSERT( pStartFrm, "Frame chain is broken" )
+ OSL_ENSURE( pStartFrm, "Frame chain is broken" );
if ( pStartFrm->GetDrawObjs() )
{
const SwSortedObjs &rObjs = *pStartFrm->GetDrawObjs();
@@ -294,8 +292,8 @@ SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
SwTwips SwTxtFrm::GetFtnLine( const SwTxtFtn *pFtn ) const
{
- ASSERT( ! IsVertical() || ! IsSwapped(),
- "SwTxtFrm::GetFtnLine with swapped frame" )
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
+ "SwTxtFrm::GetFtnLine with swapped frame" );
SwTxtFrm *pThis = (SwTxtFrm*)this;
@@ -337,7 +335,7 @@ SwTwips SwTxtFrm::GetFtnLine( const SwTxtFtn *pFtn ) const
SwTwips SwTxtFrm::_GetFtnFrmHeight() const
{
- ASSERT( !IsFollow() && IsInFtn(), "SwTxtFrm::SetFtnLine: moon walk" );
+ OSL_ENSURE( !IsFollow() && IsInFtn(), "SwTxtFrm::SetFtnLine: moon walk" );
const SwFtnFrm *pFtnFrm = FindFtnFrm();
const SwTxtFrm *pRef = (const SwTxtFrm *)pFtnFrm->GetRef();
@@ -361,7 +359,7 @@ SwTwips SwTxtFrm::_GetFtnFrmHeight() const
SwTwips nTmp = (*fnRect->fnYDiff)( (pCont->*fnRect->fnGetPrtBottom)(),
(Frm().*fnRect->fnGetTop)() );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( nTmp < 0 )
{
sal_Bool bInvalidPos = sal_False;
@@ -374,7 +372,7 @@ SwTwips SwTxtFrm::_GetFtnFrmHeight() const
break;
pTmp = pTmp->GetUpper();
}
- ASSERT( bInvalidPos, "Hanging below FtnCont" );
+ OSL_ENSURE( bInvalidPos, "Hanging below FtnCont" );
}
#endif
@@ -511,7 +509,7 @@ void SwTxtFrm::RemoveFtn( const xub_StrLen nStart, const xub_StrLen nLen )
// Wir loeschen nicht, sondern wollen die Ftn verschieben.
// Drei Faelle koennen auftreten:
// 1) Es gibt weder Follow noch PrevFollow
- // -> RemoveFtn() (vielleicht sogar ein ASSERT wert)
+ // -> RemoveFtn() (vielleicht sogar ein OSL_ENSURE(wert)
// 2) nStart > GetOfst, ich habe einen Follow
// -> Ftn wandert in den Follow
// 3) nStart < GetOfst, ich bin ein Follow
@@ -539,7 +537,7 @@ void SwTxtFrm::RemoveFtn( const xub_StrLen nStart, const xub_StrLen nLen )
while( pDest->GetFollow() && ((SwTxtFrm*)pDest->
GetFollow())->GetOfst() <= nIdx )
pDest = pDest->GetFollow();
- ASSERT( !pDest->FindFtnBossFrm( !bEndn )->FindFtn(
+ OSL_ENSURE( !pDest->FindFtnBossFrm( !bEndn )->FindFtn(
pDest,pFtn),"SwTxtFrm::RemoveFtn: footnote exists");
//Nicht ummelden sondern immer Moven.
@@ -568,7 +566,7 @@ void SwTxtFrm::RemoveFtn( const xub_StrLen nStart, const xub_StrLen nLen )
}
((SwTxtFrm*)pDest)->SetFtn( sal_True );
- ASSERT( pDest->FindFtnBossFrm( !bEndn )->FindFtn( pDest,
+ OSL_ENSURE( pDest->FindFtnBossFrm( !bEndn )->FindFtn( pDest,
pFtn),"SwTxtFrm::RemoveFtn: footnote ChgRef failed");
}
else
@@ -582,7 +580,7 @@ void SwTxtFrm::RemoveFtn( const xub_StrLen nStart, const xub_StrLen nLen )
else
pFtnBoss->RemoveFtn( this, pFtn );
bRemove = bRemove || !bEndDoc;
- ASSERT( bEndn ? !pEndBoss->FindFtn( this, pFtn ) :
+ OSL_ENSURE( bEndn ? !pEndBoss->FindFtn( this, pFtn ) :
!pFtnBoss->FindFtn( this, pFtn ),
"SwTxtFrm::RemoveFtn: can't get off that footnote" );
}
@@ -632,7 +630,7 @@ void SwTxtFrm::RemoveFtn( const xub_StrLen nStart, const xub_StrLen nLen )
void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
{
- ASSERT( !IsVertical() || !IsSwapped(),
+ OSL_ENSURE( !IsVertical() || !IsSwapped(),
"SwTxtFrm::ConnectFtn with swapped frame" );
bFtn = sal_True;
@@ -850,7 +848,7 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine )
SwFtnPortion *SwTxtFormatter::NewFtnPortion( SwTxtFormatInfo &rInf,
SwTxtAttr *pHint )
{
- ASSERT( ! pFrm->IsVertical() || pFrm->IsSwapped(),
+ OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
"NewFtnPortion with unswapped frame" );
if( !pFrm->IsFtnAllowed() )
@@ -997,7 +995,7 @@ SwFtnPortion *SwTxtFormatter::NewFtnPortion( SwTxtFormatInfo &rInf,
SwNumberPortion *SwTxtFormatter::NewFtnNumPortion( SwTxtFormatInfo &rInf ) const
{
- ASSERT( pFrm->IsInFtn() && !pFrm->GetIndPrev() && !rInf.IsFtnDone(),
+ OSL_ENSURE( pFrm->IsInFtn() && !pFrm->GetIndPrev() && !rInf.IsFtnDone(),
"This is the wrong place for a ftnnumber" );
if( rInf.GetTxtStart() != nStart ||
rInf.GetTxtStart() != rInf.GetIdx() )
@@ -1053,7 +1051,7 @@ SwNumberPortion *SwTxtFormatter::NewFtnNumPortion( SwTxtFormatInfo &rInf ) const
XubString lcl_GetPageNumber( const SwPageFrm* pPage )
{
- ASSERT( pPage, "GetPageNumber: Homeless TxtFrm" );
+ OSL_ENSURE( pPage, "GetPageNumber: Homeless TxtFrm" );
MSHORT nVirtNum = pPage->GetVirtPageNum();
const SvxNumberType& rNum = pPage->GetPageDesc()->GetNumType();
return rNum.GetNumStr( nVirtNum );
@@ -1094,7 +1092,7 @@ SwErgoSumPortion *SwTxtFormatter::NewErgoSumPortion( SwTxtFormatInfo &rInf ) con
xub_StrLen SwTxtFormatter::FormatQuoVadis( const xub_StrLen nOffset )
{
- ASSERT( ! pFrm->IsVertical() || ! pFrm->IsSwapped(),
+ OSL_ENSURE( ! pFrm->IsVertical() || ! pFrm->IsSwapped(),
"SwTxtFormatter::FormatQuoVadis with swapped frame" );
if( !pFrm->IsInFtn() || pFrm->ImplFindFtnFrm()->GetAttr()->GetFtn().IsEndNote() )
@@ -1168,8 +1166,8 @@ xub_StrLen SwTxtFormatter::FormatQuoVadis( const xub_StrLen nOffset )
rInf.SetRest( 0 );
pCurrPor->Move( rInf );
- ASSERT( pFollow->IsQuoVadisPortion(),
- "Quo Vadis, rest of QuoVadisPortion" )
+ OSL_ENSURE( pFollow->IsQuoVadisPortion(),
+ "Quo Vadis, rest of QuoVadisPortion" );
// format the rest and append it to the other QuoVadis parts
pFollow->Format( rInf );
@@ -1651,7 +1649,6 @@ void SwParaPortion::SetErgoSumNum( const XubString& rErgo )
SwLineLayout *pLay = this;
while( pLay->GetNext() )
{
- DBG_LOOP;
pLay = pLay->GetNext();
}
SwLinePortion *pPor = pLay;
@@ -1677,7 +1674,6 @@ sal_Bool SwParaPortion::UpdateQuoVadis( const XubString &rQuo )
SwLineLayout *pLay = this;
while( pLay->GetNext() )
{
- DBG_LOOP;
pLay = pLay->GetNext();
}
SwLinePortion *pPor = pLay;
@@ -1697,3 +1693,4 @@ sal_Bool SwParaPortion::UpdateQuoVadis( const XubString &rQuo )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index ab1e9e96b3d3..962b28a8d23e 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,8 +36,6 @@
#include <EnhancedPDFExportHelper.hxx>
#include <viewopt.hxx> // SwViewOptions
#include <viewsh.hxx>
-#include <errhdl.hxx>
-#include <txtcfg.hxx>
#include <SwPortionHandler.hxx>
#include <porhyph.hxx> //
#include <inftxt.hxx>
@@ -44,7 +43,7 @@
#include <guess.hxx> //
#include <splargs.hxx> // SwInterHyphInfo
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
extern const sal_Char *GetLangName( const MSHORT nLang );
#endif
@@ -64,7 +63,6 @@ Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord(
{
if( rTxt.Len() < 4 || pFnt->IsSymbol(pVsh) )
return 0;
-// ASSERT( IsHyphenate(), "SwTxtFormatter::HyphWord: why?" );
Reference< XHyphenator > xHyph = ::GetHyphenator();
Reference< XHyphenatedWord > xHyphWord;
@@ -84,12 +82,12 @@ Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord(
sal_Bool SwTxtFrm::Hyphenate( SwInterHyphInfo &rHyphInf )
{
- ASSERT( ! IsVertical() || ! IsSwapped(),"swapped frame at SwTxtFrm::Hyphenate" );
+ OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"swapped frame at SwTxtFrm::Hyphenate" );
if( !pBreakIt->GetBreakIter().is() )
return sal_False;;
// Wir machen den Laden erstmal dicht:
- ASSERT( !IsLocked(), "SwTxtFrm::Hyphenate: this is locked" );
+ OSL_ENSURE( !IsLocked(), "SwTxtFrm::Hyphenate: this is locked" );
// 4935: Der frame::Frame muss eine gueltige SSize haben!
Calc();
GetFormatted();
@@ -123,7 +121,6 @@ sal_Bool SwTxtFrm::Hyphenate( SwInterHyphInfo &rHyphInf )
const xub_StrLen nEnd = rHyphInf.GetEnd();
while( !bRet && aLine.GetStart() < nEnd )
{
- DBG_LOOP;
bRet = aLine.Hyphenate( rHyphInf );
if( !aLine.Next() )
break;
@@ -148,7 +145,7 @@ sal_Bool SwTxtFrm::Hyphenate( SwInterHyphInfo &rHyphInf )
void SetParaPortion( SwTxtInfo *pInf, SwParaPortion *pRoot )
{
- ASSERT( pRoot, "SetParaPortion: no root anymore" );
+ OSL_ENSURE( pRoot, "SetParaPortion: no root anymore" );
pInf->pPara = pRoot;
}
@@ -181,7 +178,7 @@ sal_Bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
SwParaPortion *pPara = new SwParaPortion();
SetParaPortion( &rInf, pPara );
pCurr = pPara;
- ASSERT( IsParaLine(), "SwTxtFormatter::Hyphenate: not the first" );
+ OSL_ENSURE( IsParaLine(), "SwTxtFormatter::Hyphenate: not the first" );
}
else
pCurr = new SwLineLayout();
@@ -234,7 +231,7 @@ sal_Bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
if( pOldCurr->IsParaPortion() )
{
SetParaPortion( &rInf, (SwParaPortion*)pOldCurr );
- ASSERT( IsParaLine(), "SwTxtFormatter::Hyphenate: even not the first" );
+ OSL_ENSURE( IsParaLine(), "SwTxtFormatter::Hyphenate: even not the first" );
}
if( nWrdStart )
@@ -259,22 +256,6 @@ sal_Bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
if( bRet )
{
XubString aSelTxt( rInf.GetTxt().Copy(nWrdStart, nLen) );
- xub_StrLen nCnt = 0;
-
-// these things should be handled by the dialog
-// for( xub_StrLen i = 0; i < nLen; ++i )
-// {
-// sal_Unicode cCh = aSelTxt.GetChar(i);
-// if( (CH_TXTATR_BREAKWORD == cCh || CH_TXTATR_INWORD == cCh )
-// && rInf.HasHint( nWrdStart + i ) )
-// {
-// aSelTxt.Erase( i , 1 );
-// nCnt++;
-// --nLen;
-// if( i )
-// --i;
-// }
-// }
{
MSHORT nMinTrail = 0;
@@ -292,21 +273,10 @@ sal_Bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
{
rHyphInf.SetHyphWord( xHyphWord );
rHyphInf.nWordStart = nWrdStart;
- rHyphInf.nWordLen = nLen+nCnt;
+ rHyphInf.nWordLen = nLen;
rHyphInf.SetNoLang( sal_False );
rHyphInf.SetCheck( sal_True );
}
-#ifdef DEBUGGY
- if( OPTDBG( rInf ) )
- {
- ASSERT( aSelTxt == aHyphWord,
- "!SwTxtFormatter::Hyphenate: different words, different planets" );
- aDbstream << "Diff: \"" << aSelTxt.GetStr() << "\" != \""
- << aHyphWord.GetStr() << "\"" << endl;
- ASSERT( bRet, "!SwTxtFormatter::Hyphenate: three of a perfect pair" );
- aDbstream << "Hyphenate: ";
- }
-#endif
}
}
return bRet;
@@ -320,8 +290,8 @@ sal_Bool SwTxtPortion::CreateHyphen( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess )
{
Reference< XHyphenatedWord > xHyphWord = rGuess.HyphWord();
- ASSERT( !pPortion, "SwTxtPortion::CreateHyphen(): another portion, another planet..." )
- ASSERT( xHyphWord.is(), "SwTxtPortion::CreateHyphen(): You are lucky! The code is robust here." )
+ OSL_ENSURE( !pPortion, "SwTxtPortion::CreateHyphen(): another portion, another planet..." );
+ OSL_ENSURE( xHyphWord.is(), "SwTxtPortion::CreateHyphen(): You are lucky! The code is robust here." );
if( rInf.IsHyphForbud() ||
pPortion || // robust
@@ -339,7 +309,7 @@ sal_Bool SwTxtPortion::CreateHyphen( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess )
{
SvxAlternativeSpelling aAltSpell;
aAltSpell = SvxGetAltSpelling( xHyphWord );
- ASSERT( aAltSpell.bIsAltSpelling, "no alternatve spelling" );
+ OSL_ENSURE( aAltSpell.bIsAltSpelling, "no alternatve spelling" );
XubString aAltTxt = aAltSpell.aReplacement;
nPorEnd = aAltSpell.nChangedPos + rGuess.BreakStart() - rGuess.FieldDiff();
@@ -693,3 +663,4 @@ SwSoftHyphStrPortion::SwSoftHyphStrPortion( const XubString &rStr )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtinit.cxx b/sw/source/core/text/txtinit.cxx
index 486eb1d3c242..79799512a998 100644
--- a/sw/source/core/text/txtinit.cxx
+++ b/sw/source/core/text/txtinit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,10 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
-#include "errhdl.hxx"
-#include "txtcfg.hxx"
#include "swcache.hxx"
#include "fntcache.hxx" // pFntCache ( SwFont/ScrFont-PrtFont Cache )
#include "swfntcch.hxx" // pSwFontCache ( SwAttrSet/SwFont Cache )
@@ -76,7 +73,7 @@ void _TextInit()
pFntCache = new SwFntCache; // Cache for SwSubFont -> SwFntObj = { Font aFont, Font* pScrFont, Font* pPrtFont, OutputDevice* pPrinter, ... }
pSwFontCache = new SwFontCache; // Cache for SwTxtFmtColl -> SwFontObj = { SwFont aSwFont, SfxPoolItem* pDefaultArray }
SwCache *pTxtCache = new SwCache( 250, 100 // Cache for SwTxtFrm -> SwTxtLine = { SwParaPortion* pLine }
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
, "static SwTxtFrm::pTxtCache"
#endif
);
@@ -99,3 +96,4 @@ void _TextFinit()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx
index 535c998b4cba..a3826ac4cc7e 100644
--- a/sw/source/core/text/txtio.cxx
+++ b/sw/source/core/text/txtio.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,8 +34,6 @@
#include "viewsh.hxx" // IsDbg()
#include "viewopt.hxx" // IsDbg()
#include "txtatr.hxx"
-#include "errhdl.hxx"
-#include "txtcfg.hxx"
#include "txtfrm.hxx" // IsDbg()
#include "flyfrms.hxx"
#include "inftxt.hxx"
@@ -55,224 +54,11 @@
#include "pormulti.hxx"
#include "ndhints.hxx"
-// So kann man die Layoutstruktur ausgeben lassen
-// #define AMA_LAYOUT
-#ifdef AMA_LAYOUT
-#include <stdio.h>
-#include <stdlib.h> // getenv()
-#include <flowfrm.hxx>
-#include <pagefrm.hxx>
-#include <svx/svdobj.hxx>
-#include <dflyobj.hxx>
-
-
-void lcl_OutFollow( XubString &rTmp, const SwFrm* pFrm )
-{
- if( pFrm->IsFlowFrm() )
- {
- const SwFlowFrm *pFlow = SwFlowFrm::CastFlowFrm( pFrm );
- if( pFlow->IsFollow() || pFlow->GetFollow() )
- {
- rTmp += "(";
- if( pFlow->IsFollow() )
- rTmp += ".";
- if( pFlow->GetFollow() )
- {
- MSHORT nFrmId = pFlow->GetFollow()->GetFrm()->GetFrmId();
- rTmp += nFrmId;
- }
- rTmp += ")";
- }
- }
-}
-
-void lcl_OutFrame( SvFileStream& rStr, const SwFrm* pFrm, ByteString& rSp, sal_Bool bNxt )
-{
- if( !pFrm )
- return;
- KSHORT nSpc = 0;
- MSHORT nFrmId = pFrm->GetFrmId();
- ByteString aTmp;
- if( pFrm->IsLayoutFrm() )
- {
- if( pFrm->IsRootFrm() )
- aTmp = "R";
- else if( pFrm->IsPageFrm() )
- aTmp = "P";
- else if( pFrm->IsBodyFrm() )
- aTmp = "B";
- else if( pFrm->IsColumnFrm() )
- aTmp = "C";
- else if( pFrm->IsTabFrm() )
- aTmp = "Tb";
- else if( pFrm->IsRowFrm() )
- aTmp = "Rw";
- else if( pFrm->IsCellFrm() )
- aTmp = "Ce";
- else if( pFrm->IsSctFrm() )
- aTmp = "S";
- else if( pFrm->IsFlyFrm() )
- {
- aTmp = "F";
- const SwFlyFrm *pFly = (SwFlyFrm*)pFrm;
- if( pFly->IsFlyInCntFrm() )
- aTmp += "in";
- else if( pFly->IsFlyAtCntFrm() )
- {
- aTmp += "a";
- if( pFly->IsAutoPos() )
- aTmp += "u";
- else
- aTmp += "t";
- }
- else
- aTmp += "l";
- }
- else if( pFrm->IsHeaderFrm() )
- aTmp = "H";
- else if( pFrm->IsFooterFrm() )
- aTmp = "Fz";
- else if( pFrm->IsFtnContFrm() )
- aTmp = "Fc";
- else if( pFrm->IsFtnFrm() )
- aTmp = "Fn";
- else
- aTmp = "?L?";
- aTmp += nFrmId;
- lcl_OutFollow( aTmp, pFrm );
- aTmp += " ";
- rStr << aTmp;
- nSpc = aTmp.Len();
- rSp.Expand( nSpc + rSp.Len() );
- lcl_OutFrame( rStr, ((SwLayoutFrm*)pFrm)->Lower(), rSp, sal_True );
- }
- else
- {
- if( pFrm->IsTxtFrm() )
- aTmp = "T";
- else if( pFrm->IsNoTxtFrm() )
- aTmp = "N";
- else
- aTmp = "?C?";
- aTmp += nFrmId;
- lcl_OutFollow( aTmp, pFrm );
- aTmp += " ";
- rStr << aTmp;
- nSpc = aTmp.Len();
- rSp.Expand( nSpc + rSp.Len() );
- }
- if( pFrm->IsPageFrm() )
- {
- const SwPageFrm* pPg = (SwPageFrm*)pFrm;
- const SwSortedObjs *pSorted = pPg->GetSortedObjs();
- const MSHORT nCnt = pSorted ? pSorted->Count() : 0;
- if( nCnt )
- {
- for( MSHORT i=0; i < nCnt; ++i )
- {
- // --> OD 2004-07-07 #i28701# - consider changed type of
- // <SwSortedObjs> entries
- SwAnchoredObject* pAnchoredObj = (*pSorted)[ i ];
- if( pAnchoredObj->ISA(SwFlyFrm) )
- {
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
- lcl_OutFrame( rStr, pFly, rSp, sal_False );
- }
- else
- {
- aTmp = pAnchoredObj->GetDrawObj()->IsUnoObj() ? "UNO" : "Drw";
- rStr << aTmp;
- }
- // <--
- if( i < nCnt - 1 )
- rStr << endl << rSp;
- }
- }
- }
- else if( pFrm->GetDrawObjs() )
- {
- MSHORT nCnt = pFrm->GetDrawObjs()->Count();
- if( nCnt )
- {
- for( MSHORT i=0; i < nCnt; ++i )
- {
- // --> OD 2004-07-07 #i28701# - consider changed type of
- // <SwSortedObjs> entries
- SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[ i ];
- if( pAnchoredObj->ISA(SwFlyFrm) )
- {
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
- lcl_OutFrame( rStr, pFly, rSp, sal_False );
- }
- else
- {
- aTmp = pAnchoredObj->GetDrawObj()->IsUnoObj() ? "UNO" : "Drw";
- rStr << aTmp;
- }
- if( i < nCnt - 1 )
- rStr << endl << rSp;
- }
- }
- }
- if( nSpc )
- rSp.Erase( rSp.Len() - nSpc );
- if( bNxt && pFrm->GetNext() )
- {
- do
- {
- pFrm = pFrm->GetNext();
- rStr << endl << rSp;
- lcl_OutFrame( rStr, pFrm, rSp, sal_False );
- } while ( pFrm->GetNext() );
- }
-}
-
-void LayOutPut( const SwFrm* pFrm )
-{
- static char* pOutName = 0;
- const sal_Bool bFirstOpen = pOutName ? sal_False : sal_True;
- if( bFirstOpen )
- {
- char *pPath = getenv( "TEMP" );
- char *pName = "layout.txt";
- if( !pPath )
- pOutName = pName;
- else
- {
- const int nLen = strlen(pPath);
- // fuer dieses new wird es kein delete geben.
- pOutName = new char[nLen + strlen(pName) + 3];
- if(nLen && (pPath[nLen-1] == '\\') || (pPath[nLen-1] == '/'))
- snprintf( pOutName, sizeof(pOutName), "%s%s", pPath, pName );
- else
- snprintf( pOutName, sizeof(pOutName), "%s/%s", pPath, pName );
- }
- }
- SvFileStream aStream( pOutName, (bFirstOpen
- ? STREAM_WRITE | STREAM_TRUNC
- : STREAM_WRITE ));
-
- if( !aStream.GetError() )
- {
- if ( bFirstOpen )
- aStream << "Layout-Struktur";
- else
- aStream.Seek( STREAM_SEEK_TO_END );
- aStream << endl;
- aStream << "---------------------------------------------" << endl;
- XubString aSpace;
- lcl_OutFrame( aStream, pFrm, aSpace, sal_False );
- }
-}
-
-#endif
+#define CONSTCHAR( name, string ) static const sal_Char name[] = string
SvStream &operator<<( SvStream &rOs, const SwpHints & ) //$ ostream
{
rOs << " {HINTS:";
-
-// REMOVED
-
rOs << '}';
return rOs;
}
@@ -283,9 +69,14 @@ SvStream &operator<<( SvStream &rOs, const SwpHints & ) //$ ostream
sal_Bool IsDbg( const SwTxtFrm *pFrm )
{
+// Hmm, so IsTest4 etc are defined only if OSL_DEBUG_LEVEL > 1,
+// but this file is compiled if DBG_UTIL is defined. So should the IsTest4 etc
+// then instead be conditional on DBG_UTIL? Such crack.
+#if OSL_DEBUG_LEVEL > 1
if( pFrm && pFrm->GetShell() )
return pFrm->GetShell()->GetViewOptions()->IsTest4();
else
+#endif
return sal_False;
}
@@ -295,7 +86,7 @@ static void Error()
{
// wegen PM und BCC
sal_Bool bFalse = sal_False;
- ASSERT( bFalse, "txtio: No debug version" );
+ OSL_ENSURE( bFalse, "txtio: No debug version" );
}
#define IMPL_OUTOP(class) \
@@ -369,10 +160,10 @@ const char *GetLangName( const MSHORT )
}
#else
-# include <limits.h>
-# include <stdlib.h>
-# include "swtypes.hxx" // ZTCCONST
-# include "swfont.hxx" // SwDropPortion
+#include <limits.h>
+#include <stdlib.h>
+#include "swtypes.hxx" // ZTCCONST
+#include "swfont.hxx" // SwDropPortion
CONSTCHAR( pClose, "} " );
@@ -456,7 +247,7 @@ const char *GetPrepName( const PrepareHint ePrep )
pPREP_UL_SPACE, pPREP_MUST_FIT, pPREP_WIDOWS, pPREP_QUOVADIS,
pPREP_PAGE
};
- ASSERT( ePrep < PREP_END, "GetPrepName: unknown PrepareHint" );
+ OSL_ENSURE( ePrep < PREP_END, "GetPrepName: unknown PrepareHint" );
return( ppNameArr[ePrep] );
}
@@ -483,7 +274,6 @@ void SwLineLayout::DebugPortions( SvStream &rOs, const XubString &/*rTxt*/, //$
while( pPortion2 )
{
- DBG_LOOP;
SwTxtPortion *pTxtPor = pPortion2->InTxtGrp() ?
(SwTxtPortion *)pPortion2 : NULL ;
(void)pTxtPor;
@@ -592,7 +382,6 @@ SvStream &SwLineLayout::operator<<( SvStream &rOs ) const //$ ostream
SwLinePortion *pPos = GetPortion();
while( pPos )
{
- DBG_LOOP;
rOs << "\t";
pPos->operator<<( rOs );
pPos = pPos->GetPortion();
@@ -945,3 +734,4 @@ SvStream &SwDropPortion::operator<<( SvStream &rOs ) const //$ ostream
#endif // DBG_UTIL
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtpaint.cxx b/sw/source/core/text/txtpaint.cxx
index efb05c0b836b..2d4e5fec170f 100644
--- a/sw/source/core/text/txtpaint.cxx
+++ b/sw/source/core/text/txtpaint.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "txtpaint.hxx"
#include "swrect.hxx"
#include "rootfrm.hxx"
@@ -119,7 +118,6 @@ void SwSaveClip::_ChgClip( const SwRect &rRect, const SwTxtFrm* pFrm,
#endif
}
#if OSL_DEBUG_LEVEL > 1
-#ifdef DBG_UTIL
static sal_Bool bDbg = sal_False;
if( bDbg )
{
@@ -127,7 +125,6 @@ void SwSaveClip::_ChgClip( const SwRect &rRect, const SwTxtFrm* pFrm,
pOut->DrawRect( aRect );
}
#endif
-#endif
}
bChg = sal_True;
@@ -135,3 +132,4 @@ void SwSaveClip::_ChgClip( const SwRect &rRect, const SwTxtFrm* pFrm,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx
index 37fbd6a9ac39..0a7a36beda48 100644
--- a/sw/source/core/text/txtpaint.hxx
+++ b/sw/source/core/text/txtpaint.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,7 +69,7 @@ inline SwSaveClip::~SwSaveClip()
Reset();
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
/*************************************************************************
* class SwDbgOut
@@ -189,3 +190,5 @@ inline DbgRect::DbgRect( OutputDevice* pOutDev, const Rectangle &rRect,
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index a83fe42c265d..d1091eaf9c86 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,15 +31,12 @@
#include "hintids.hxx"
#include <editeng/lrspitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <editeng/tstpitem.hxx>
-#endif
#include <IDocumentSettingAccess.hxx>
#include <frmatr.hxx>
#include <SwPortionHandler.hxx>
#include "viewopt.hxx" // SwViewOptions
-#include "txtcfg.hxx"
#include "portab.hxx"
#include "inftxt.hxx"
#include "itrform2.hxx"
@@ -216,7 +214,6 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
cFill = 0;
eAdj = SVX_TAB_ADJUST_LEFT;
}
- // --> OD 2008-02-07 #newlistlevelattrs#
long nForced = 0;
if ( !bTabsRelativeToIndent )
{
@@ -240,7 +237,6 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
nForced += pPor->Width();
}
- // <--
// --> OD 2009-04-03 #i100732#
// correction of condition, when a tab stop at the left margin can
// be applied:
@@ -274,7 +270,7 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
nNextPos = nForced;
}
nNextPos += bRTL ? nLinePos - nTabLeft : nTabLeft - nLinePos;
- ASSERT( nNextPos >= 0, "GetTabStop: Don't go back!" );
+ OSL_ENSURE( nNextPos >= 0, "GetTabStop: Don't go back!" );
nNewTabPos = KSHORT(nNextPos);
}
@@ -307,7 +303,7 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
}
default:
{
- ASSERT( SVX_TAB_ADJUST_LEFT == eAdj || SVX_TAB_ADJUST_DEFAULT == eAdj,
+ OSL_ENSURE( SVX_TAB_ADJUST_LEFT == eAdj || SVX_TAB_ADJUST_DEFAULT == eAdj,
"+SwTxtFormatter::NewTabPortion: unknown adjustment" );
pTabPor = new SwTabLeftPortion( nNewTabPos, cFill );
break;
@@ -334,10 +330,10 @@ SwTabPortion::SwTabPortion( const KSHORT nTabPosition, const xub_Unicode cFillCh
: SwFixPortion( 0, 0 ), nTabPos(nTabPosition), cFill(cFillChar)
{
nLineLength = 1;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( IsFilled() )
{
- ASSERT( ' ' != cFill, "SwTabPortion::CTOR: blanks ?!" );
+ OSL_ENSURE( ' ' != cFill, "SwTabPortion::CTOR: blanks ?!" );
}
#endif
SetWhichPor( POR_TAB );
@@ -379,7 +375,7 @@ void SwTabPortion::FormatEOL( SwTxtFormatInfo &rInf )
sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
{
- ASSERT( rInf.X() <= GetTabPos(), "SwTabPortion::PreFormat: rush hour" );
+ OSL_ENSURE( rInf.X() <= GetTabPos(), "SwTabPortion::PreFormat: rush hour" );
// Hier lassen wir uns nieder...
Fix( static_cast<sal_uInt16>(rInf.X()) );
@@ -451,7 +447,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
break;
}
- default: ASSERT( !this, "SwTabPortion::PreFormat: unknown adjustment" );
+ default: OSL_ENSURE( !this, "SwTabPortion::PreFormat: unknown adjustment" );
}
}
@@ -501,13 +497,12 @@ sal_Bool SwTabPortion::PostFormat( SwTxtFormatInfo &rInf )
KSHORT nPorWidth = 0;
while( pPor )
{
- DBG_LOOP;
nPorWidth = nPorWidth + pPor->Width();
pPor = pPor->GetPortion();
}
const MSHORT nWhich = GetWhichPor();
- ASSERT( POR_TABLEFT != nWhich, "SwTabPortion::PostFormat: already formatted" );
+ OSL_ENSURE( POR_TABLEFT != nWhich, "SwTabPortion::PostFormat: already formatted" );
const bool bTabCompat = rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT);
// --> FME 2005-12-19 #127428# Abandon dec. tab position if line is full:
@@ -569,7 +564,7 @@ sal_Bool SwTabPortion::PostFormat( SwTxtFormatInfo &rInf )
void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// Wir wollen uns die Fixbreite anzeigen
if( rInf.OnWin() && OPTDBG( rInf ) &&
!rInf.GetOpt().IsPagePreview() && \
@@ -639,7 +634,7 @@ void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
XubString aTxt( cFill );
const KSHORT nCharWidth = rInf.GetTxtSize( aTxt ).Width();
#if OSL_DEBUG_LEVEL > 1
- ASSERT( nCharWidth, "!SwTabPortion::Paint: sophisticated tabchar" );
+ OSL_ENSURE( nCharWidth, "!SwTabPortion::Paint: sophisticated tabchar" );
#endif
// robust:
if( nCharWidth )
@@ -670,3 +665,4 @@ void SwTabPortion::HandlePortion( SwPortionHandler& rPH ) const
rPH.Text( GetLen(), GetWhichPor() );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx
index f0fe98e44987..55ec68509498 100644
--- a/sw/source/core/text/widorp.cxx
+++ b/sw/source/core/text/widorp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,7 +45,6 @@
#include <fmtftn.hxx>
#include <rowfrm.hxx>
-#include "txtcfg.hxx"
#include "widorp.hxx"
#include "txtfrm.hxx"
#include "itrtxt.hxx"
@@ -60,7 +60,7 @@
// Ein Follow, der auf der selben Seite steht, wie sein Master ist nasty.
inline sal_Bool IsNastyFollow( const SwTxtFrm *pFrm )
{
- ASSERT( !pFrm->IsFollow() || !pFrm->GetPrev() ||
+ OSL_ENSURE( !pFrm->IsFollow() || !pFrm->GetPrev() ||
((const SwTxtFrm*)pFrm->GetPrev())->GetFollow() == pFrm,
"IsNastyFollow: Was ist denn hier los?" );
return pFrm->IsFollow() && pFrm->GetPrev();
@@ -330,7 +330,7 @@ sal_Bool WidowsAndOrphans::FindBreak( SwTxtFrm *pFrame, SwTxtMargin &rLine,
{
// OD 2004-02-25 #i16128# - Why member <pFrm> _*and*_ parameter <pFrame>??
// Thus, assertion on situation, that these are different to figure out why.
- ASSERT( pFrm == pFrame, "<WidowsAndOrphans::FindBreak> - pFrm != pFrame" );
+ OSL_ENSURE( pFrm == pFrame, "<WidowsAndOrphans::FindBreak> - pFrm != pFrame" );
SWAP_IF_SWAPPED( pFrm )
@@ -385,8 +385,8 @@ sal_Bool WidowsAndOrphans::FindBreak( SwTxtFrm *pFrame, SwTxtMargin &rLine,
sal_Bool WidowsAndOrphans::FindWidows( SwTxtFrm *pFrame, SwTxtMargin &rLine )
{
- ASSERT( ! pFrame->IsVertical() || ! pFrame->IsSwapped(),
- "WidowsAndOrphans::FindWidows with swapped frame" )
+ OSL_ENSURE( ! pFrame->IsVertical() || ! pFrame->IsSwapped(),
+ "WidowsAndOrphans::FindWidows with swapped frame" );
if( !nWidLines || !pFrame->IsFollow() )
return sal_False;
@@ -395,7 +395,7 @@ sal_Bool WidowsAndOrphans::FindWidows( SwTxtFrm *pFrame, SwTxtMargin &rLine )
// Wir koennen noch was abzwacken
SwTxtFrm *pMaster = pFrame->FindMaster();
- ASSERT(pMaster, "+WidowsAndOrphans::FindWidows: Widows in a master?");
+ OSL_ENSURE(pMaster, "+WidowsAndOrphans::FindWidows: Widows in a master?");
if( !pMaster )
return sal_False;
@@ -519,7 +519,7 @@ sal_Bool WidowsAndOrphans::WouldFit( SwTxtMargin &rLine, SwTwips &rMaxHeight, sa
// IsInside() takes care for itself
// Wir erwarten, dass rLine auf der letzten Zeile steht!!
- ASSERT( !rLine.GetNext(), "WouldFit: aLine::Bottom missed!" );
+ OSL_ENSURE( !rLine.GetNext(), "WouldFit: aLine::Bottom missed!" );
MSHORT nLineCnt = rLine.GetLineNr();
// Erstmal die Orphansregel und den Initialenwunsch erfuellen ...
@@ -532,7 +532,6 @@ sal_Bool WidowsAndOrphans::WouldFit( SwTxtMargin &rLine, SwTwips &rMaxHeight, sa
while( nMinLines > rLine.GetLineNr() )
{
- DBG_LOOP;
if( !rLine.NextLine() )
return sal_False;
nLineSum += rLine.GetLineHeight();
@@ -572,3 +571,4 @@ sal_Bool WidowsAndOrphans::WouldFit( SwTxtMargin &rLine, SwTwips &rMaxHeight, sa
return sal_False;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/widorp.hxx b/sw/source/core/text/widorp.hxx
index 3ceef310b64e..a0730d1b171e 100644
--- a/sw/source/core/text/widorp.hxx
+++ b/sw/source/core/text/widorp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx
index 152ed79b0cef..873ab995b0af 100644
--- a/sw/source/core/text/wrong.cxx
+++ b/sw/source/core/text/wrong.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,6 @@
#include <tools/string.hxx>
#include <tools/debug.hxx>
-#include "errhdl.hxx"
#include "swtypes.hxx"
#include "txttypes.hxx"
@@ -186,7 +186,7 @@ xub_StrLen SwWrongList::NextWrong( xub_StrLen nChk ) const
MSHORT SwWrongList::GetWrongPos( xub_StrLen nValue ) const
{
- MSHORT nOben = Count(), nMitte = 0, nUnten = 0;
+ MSHORT nOben = Count(), nUnten = 0;
if( nOben > 0 )
{
@@ -211,6 +211,7 @@ MSHORT SwWrongList::GetWrongPos( xub_StrLen nValue ) const
}
--nOben;
+ MSHORT nMitte = 0;
while( nUnten <= nOben )
{
nMitte = nUnten + ( nOben - nUnten ) / 2;
@@ -560,7 +561,7 @@ void SwWrongList::Remove(sal_uInt16 nIdx, sal_uInt16 nLen )
maList.erase(i1, i2);
#if OSL_DEBUG_LEVEL > 1
- ASSERT( Count() + nLen == nOldSize, "SwWrongList::Remove() trouble" )
+ OSL_ENSURE( Count() + nLen == nOldSize, "SwWrongList::Remove() trouble" );
#endif
}
@@ -642,3 +643,4 @@ void SwWrongList::Insert( const rtl::OUString& rType,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
new file mode 100644
index 000000000000..a92bb46a4c99
--- /dev/null
+++ b/sw/source/core/text/xmldump.cxx
@@ -0,0 +1,316 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Florian Reuter <freuter@novell.com>
+ * Cedric Bosdonnat <cbosdonnat@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "precompiled_sw.hxx"
+
+#include "frame.hxx"
+#include "txtfrm.hxx"
+#include "porlin.hxx"
+#include "porlay.hxx"
+#include "portxt.hxx"
+#include <SwPortionHandler.hxx>
+
+
+
+class XmlPortionDumper:public SwPortionHandler
+{
+ private:
+ xmlTextWriterPtr writer;
+ USHORT ofs;
+ public:
+
+ XmlPortionDumper( xmlTextWriterPtr some_writer ):writer( some_writer ), ofs( 0 )
+ {
+ }
+
+ virtual ~ XmlPortionDumper( )
+ {
+ }
+
+ /**
+ @param nLength
+ length of this portion in the model string
+ @param rText
+ text which is painted on-screen
+ */
+ virtual void Text( USHORT nLength,
+ USHORT nType )
+ {
+ ofs += nLength;
+ xmlTextWriterStartElement( writer, BAD_CAST( "Text" ) );
+ xmlTextWriterWriteFormatAttribute( writer,
+ BAD_CAST( "nLength" ),
+ "%i", ( int ) nLength );
+ xmlTextWriterWriteFormatAttribute( writer,
+ BAD_CAST( "nType" ),
+ "%i", ( int ) nType );
+ xmlTextWriterEndElement( writer );
+ }
+
+ /**
+ @param nLength
+ length of this portion in the model string
+ @param rText
+ text which is painted on-screen
+ @param nType
+ type of this portion
+ */
+ virtual void Special( USHORT nLength,
+ const String & rText,
+ USHORT nType )
+ {
+ xmlTextWriterStartElement( writer, BAD_CAST( "Special" ) );
+ xmlTextWriterWriteFormatAttribute( writer,
+ BAD_CAST( "nLength" ),
+ "%i", ( int ) nLength );
+ xmlTextWriterWriteFormatAttribute( writer,
+ BAD_CAST( "nType" ),
+ "%i", ( int ) nType );
+ rtl::OUString sText( rText );
+ rtl::OString sText8 =::rtl::OUStringToOString( sText,
+ RTL_TEXTENCODING_UTF8 );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "rText" ),
+ "%s", sText8.getStr( ) );
+
+ xmlTextWriterEndElement( writer );
+ ofs += nLength;
+ }
+
+ virtual void LineBreak( )
+ {
+ xmlTextWriterStartElement( writer, BAD_CAST( "LineBreak" ) );
+ xmlTextWriterEndElement( writer );
+ }
+
+ /**
+ * @param nLength
+ * number of 'model string' characters to be skipped
+ */
+ virtual void Skip( USHORT nLength )
+ {
+ xmlTextWriterStartElement( writer, BAD_CAST( "Skip" ) );
+ xmlTextWriterWriteFormatAttribute( writer,
+ BAD_CAST( "nLength" ),
+ "%i", ( int ) nLength );
+ xmlTextWriterEndElement( writer );
+ ofs += nLength;
+ }
+
+ virtual void Finish( )
+ {
+ xmlTextWriterStartElement( writer, BAD_CAST( "Finish" ) );
+ xmlTextWriterEndElement( writer );
+ }
+
+};
+
+
+void SwTxtPortion::dumpPortionAsXml( xub_StrLen ofs, XubString & /*aText */,
+ xmlTextWriterPtr writer )
+{
+ xmlTextWriterStartElement( writer, BAD_CAST( "SwTxtPortion" ) );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "ofs" ), "%i", ofs );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "len" ), "%i",
+ ( int ) this->GetLen( ) );
+
+ xmlTextWriterEndElement( writer );
+}
+
+void SwLinePortion::dumpPortionAsXml( xub_StrLen ofs, XubString & /*aText */,
+ xmlTextWriterPtr writer )
+{
+ xmlTextWriterStartElement( writer, BAD_CAST( "SwLinePortion" ) );
+ xmlTextWriterWriteFormatAttribute( writer,
+ BAD_CAST( "nWhichPor" ),
+ "%04X",
+ ( int ) this->GetWhichPor( ) );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "ofs" ), "%i", ofs );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "len" ), "%i",
+ ( int ) this->GetLen( ) );
+ xmlTextWriterEndElement( writer );
+}
+
+void SwLineLayout::dumpLineAsXml( xmlTextWriterPtr writer,
+ xub_StrLen & ofs, XubString & aText )
+{ // not used any longer...
+ xmlTextWriterStartElement( writer, BAD_CAST( "SwLineLayout" ) );
+ SwLinePortion *portion = this;
+ while ( portion != NULL )
+ {
+ portion->dumpPortionAsXml( ofs, aText, writer );
+ ofs += portion->GetLen( );
+ portion = portion->GetPortion( );
+ }
+ xmlTextWriterEndElement( writer );
+}
+
+
+void SwParaPortion::dumpAsXml( xmlTextWriterPtr writer, SwTxtFrm * pTxtFrm )
+{
+ xmlTextWriterStartElement( writer, BAD_CAST( "SwParaPortion" ) );
+ SwParaPortion *pPara = this;
+
+ if ( pPara && pTxtFrm )
+ {
+ xub_StrLen ofs = 0;
+ XubString & aText = ( String & ) pTxtFrm->GetTxt( );
+ if ( pTxtFrm->IsFollow( ) )
+ ofs += pTxtFrm->GetOfst( );
+
+ SwLineLayout *pLine = pPara;
+ while ( pLine )
+ {
+ xmlTextWriterStartElement( writer, BAD_CAST( "line" ) );
+ SwLinePortion *pPor = pLine->GetFirstPortion( );
+ while ( pPor )
+ {
+ pPor->dumpPortionAsXml( ofs, aText, writer );
+ ofs += pPor->GetLen( );
+ pPor = pPor->GetPortion( );
+ }
+
+ xmlTextWriterEndElement( writer ); // line
+ pLine = pLine->GetNext( );
+ }
+ }
+ xmlTextWriterEndElement( writer );
+}
+
+
+void SwFrm::dumpAsXml( xmlTextWriterPtr writer )
+{
+ const char *name = NULL;
+
+ switch ( GetType( ) )
+ {
+ case FRM_ROOT:
+ name = "root";
+ break;
+ case FRM_PAGE:
+ name = "page";
+ break;
+ case FRM_COLUMN:
+ name = "column";
+ break;
+ case FRM_HEADER:
+ name = "header";
+ break;
+ case FRM_FOOTER:
+ name = "footer";
+ break;
+ case FRM_FTNCONT:
+ name = "ftncont";
+ break;
+ case FRM_FTN:
+ name = "ftn";
+ break;
+ case FRM_BODY:
+ name = "body";
+ break;
+ case FRM_FLY:
+ name = "fly";
+ break;
+ case FRM_SECTION:
+ name = "section";
+ break;
+ case FRM_UNUSED:
+ name = "unused";
+ break;
+ case FRM_TAB:
+ name = "tab";
+ break;
+ case FRM_ROW:
+ name = "row";
+ break;
+ case FRM_CELL:
+ name = "cell";
+ break;
+ case FRM_TXT:
+ name = "txt";
+ break;
+ case FRM_NOTXT:
+ name = "txt";
+ break;
+ };
+
+ if ( name != NULL )
+ {
+ xmlTextWriterStartElement( writer, ( const xmlChar * ) name );
+
+ dumpAsXmlAttributes( writer );
+
+ if ( IsTxtFrm( ) )
+ {
+ SwTxtFrm *pTxtFrm = ( SwTxtFrm * ) this;
+ rtl::OUString aTxt = pTxtFrm->GetTxt( );
+ for ( int i = 0; i < 32; i++ )
+ {
+ aTxt = aTxt.replace( i, '*' );
+ }
+ rtl::OString aTxt8 =::rtl::OUStringToOString( aTxt,
+ RTL_TEXTENCODING_UTF8 );
+ xmlTextWriterWriteString( writer,
+ ( const xmlChar * ) aTxt8.getStr( ) );
+ XmlPortionDumper pdumper( writer );
+ pTxtFrm->VisitPortions( pdumper );
+
+ }
+ else
+ {
+ dumpChildrenAsXml( writer );
+ }
+ xmlTextWriterEndElement( writer );
+ }
+}
+
+void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
+{
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "ptr" ), "%p", this );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "next" ), "%p", GetNext() );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "prev" ), "%p", GetPrev() );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "upper" ), "%p", this->GetUpper() );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "lower" ), "%p", this->GetLower() );
+}
+
+void SwFrm::dumpChildrenAsXml( xmlTextWriterPtr writer )
+{
+ SwFrm *pFrm = GetLower( );
+ for ( ; pFrm != NULL; pFrm = pFrm->GetNext( ) )
+ {
+ pFrm->dumpAsXml( writer );
+ }
+}
+
+void SwTxtFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
+{
+ SwFrm::dumpAsXmlAttributes( writer );
+ if ( HasFollow() )
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%p", GetFollow() );
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 47c03a776797..2ab959490252 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,14 +35,11 @@
#include <tools/resid.hxx>
#include <hintids.hxx>
#include <swtypes.hxx>
-#include <errhdl.hxx>
#include <txtatr.hxx>
#include <ndtxt.hxx>
#include <txttxmrk.hxx>
#include <tox.hxx>
-#ifndef _POOLFMT_HRC
#include <poolfmt.hrc>
-#endif
#include <doc.hxx>
#include <docary.hxx>
#include <paratr.hxx>
@@ -81,9 +79,6 @@ SV_IMPL_PTRARR(SwTOXMarks, SwTOXMark*)
TYPEINIT2( SwTOXMark, SfxPoolItem, SwClient ); // fuers rtti
-/* -----------------23.09.99 13:59-------------------
-
- --------------------------------------------------*/
struct PatternIni
{
sal_uInt16 n1;
@@ -126,9 +121,7 @@ const PatternIni aPatternIni[] =
{AUTH_FIELD_AUTHOR, AUTH_FIELD_TITLE, AUTH_FIELD_YEAR, USHRT_MAX, USHRT_MAX}, //AUTH_FIELD_CUSTOM5,
{USHRT_MAX, USHRT_MAX, USHRT_MAX, USHRT_MAX, USHRT_MAX}
};
-/* -----------------23.09.99 13:58-------------------
- --------------------------------------------------*/
// -> #i21237#
SwFormTokens lcl_GetAuthPattern(sal_uInt16 nTypeId)
{
@@ -221,7 +214,7 @@ SwTOXMark::~SwTOXMark()
int SwTOXMark::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return GetRegisteredIn() == ((SwTOXMark&)rAttr).GetRegisteredIn();
}
@@ -256,7 +249,7 @@ String SwTOXMark::GetText() const
else if( pTxtAttr && pTxtAttr->GetpTxtNd() )
{
xub_StrLen* pEndIdx = pTxtAttr->GetEnd();
- ASSERT( pEndIdx, "TOXMark ohne Mark!!");
+ OSL_ENSURE( pEndIdx, "TOXMark ohne Mark!!");
if( pEndIdx )
{
const xub_StrLen nStt = *pTxtAttr->GetStart();
@@ -314,7 +307,7 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237#
case TOX_TABLES : nPoolId = STR_POOLCOLL_TOX_TABLESH; break;
case TOX_AUTHORITIES : nPoolId = STR_POOLCOLL_TOX_AUTHORITIESH; break;
default:
- ASSERT( !this, "ungueltiger TOXTyp");
+ OSL_ENSURE( !this, "ungueltiger TOXTyp");
return ;
}
@@ -628,34 +621,6 @@ SwTOXBase & SwTOXBase::operator = (const SwTOXBase & rSource)
return *this;
}
-/* -----------------16.07.99 16:02-------------------
-
-SwTOXBase & SwTOXBase::operator = (const SwTOXBase & rSource)
-{
- aForm = rSource.aForm;
- aName = rSource.aName;
- aTitle = rSource.aTitle;
- sMainEntryCharStyle = rSource.sMainEntryCharStyle;
- sSequenceName = rSource.sSequenceName;
- eLanguage = rSource.eLanguage;
- sSortAlgorithm = rSource.sSortAlgorithm;
- aData = rSource.aData;
- nCreateType = rSource.nCreateType;
- nOLEOptions = rSource.nOLEOptions;
- eCaptionDisplay = rSource.eCaptionDisplay;
- bProtected = rSource.bProtected;
- bFromChapter = rSource.bFromChapter;
- bFromObjectNames = rSource.bFromObjectNames;
- bLevelFromChapter = rSource.bLevelFromChapter;
-
- if (rSource.GetAttrSet())
- SetAttrSet(*rSource.GetAttrSet());
-
- return *this;
-}
-
- --------------------------------------------------*/
-
String SwFormToken::GetString() const
{
String sRet;
@@ -897,7 +862,7 @@ FormTokenType SwFormTokensHelper::GetTokenType(const String & sToken,
sal_uInt16 nLen;
sal_uInt16 nOffset;
FormTokenType eToken;
- } __READONLY_DATA aTokenArr[] = {
+ } const aTokenArr[] = {
{ SwForm::aFormTab, SwForm::nFormEntryLen, 1, TOKEN_TAB_STOP },
{ SwForm::aFormPageNums, SwForm::nFormPageNumsLen, 1, TOKEN_PAGE_NUMS },
{ SwForm::aFormLinkStt, SwForm::nFormLinkSttLen, 1, TOKEN_LINK_START },
@@ -923,7 +888,7 @@ FormTokenType SwFormTokensHelper::GetTokenType(const String & sToken,
break;
}
- ASSERT( pNm, "wrong token" );
+ OSL_ENSURE( pNm, "wrong token" );
if (pTokenLen)
*pTokenLen = nTokenLen;
@@ -934,13 +899,13 @@ FormTokenType SwFormTokensHelper::GetTokenType(const String & sToken,
void SwForm::SetPattern(sal_uInt16 nLevel, const SwFormTokens& rTokens)
{
- ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
+ OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX");
aPattern[nLevel] = rTokens;
}
void SwForm::SetPattern(sal_uInt16 nLevel, const String & rStr)
{
- ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
+ OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX");
SwFormTokensHelper aHelper(rStr);
aPattern[nLevel] = aHelper.GetTokens();
@@ -948,7 +913,8 @@ void SwForm::SetPattern(sal_uInt16 nLevel, const String & rStr)
const SwFormTokens& SwForm::GetPattern(sal_uInt16 nLevel) const
{
- ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
+ OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX");
return aPattern[nLevel];
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/tox/toxhlp.cxx b/sw/source/core/tox/toxhlp.cxx
index be86709adcd2..02364b36cf8a 100644
--- a/sw/source/core/tox/toxhlp.cxx
+++ b/sw/source/core/tox/toxhlp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
-#ifndef _COM_SUN_STAR_I18N_XINDEXENTRYSUPPLIER_HPP_
#include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp>
-#endif
#include <tools/string.hxx>
#include <tools/debug.hxx>
#include <toxwrap.hxx>
@@ -49,8 +48,8 @@ IndexEntrySupplierWrapper::IndexEntrySupplierWrapper()
try {
STAR_REFERENCE( uno::XInterface ) xI =
- rxMSF->createInstance( ::rtl::OUString::createFromAscii(
- "com.sun.star.i18n.IndexEntrySupplier" ) );
+ rxMSF->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.i18n.IndexEntrySupplier")) );
if( xI.is() )
{
UNO_NMSPC::Any x = xI->queryInterface( ::getCppuType(
@@ -59,12 +58,12 @@ IndexEntrySupplierWrapper::IndexEntrySupplierWrapper()
}
}
catch ( UNO_NMSPC::Exception&
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
e
#endif
)
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
ByteString aMsg( "IndexEntrySupplierWrapper: Exception caught\n" );
aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
DBG_ERRORFILE( aMsg.GetBuffer() );
@@ -85,12 +84,12 @@ String IndexEntrySupplierWrapper::GetIndexKey( const String& rTxt,
sRet = xIES->getIndexKey( rTxt, rTxtReading, rLocale );
}
catch ( UNO_NMSPC::Exception&
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
e
#endif
)
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
ByteString aMsg( "getIndexKey: Exception caught\n" );
aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
DBG_ERRORFILE( aMsg.GetBuffer() );
@@ -106,12 +105,12 @@ String IndexEntrySupplierWrapper::GetFollowingText( sal_Bool bMorePages ) const
sRet = xIES->getIndexFollowPageWord( bMorePages, aLcl );
}
catch ( UNO_NMSPC::Exception&
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
e
#endif
)
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
ByteString aMsg( "getIndexFollowPageWord: Exception caught\n" );
aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
DBG_ERRORFILE( aMsg.GetBuffer() );
@@ -129,12 +128,12 @@ IndexEntrySupplierWrapper::GetAlgorithmList( const STAR_NMSPC::lang::Locale& rLc
sRet = xIES->getAlgorithmList( rLcl );
}
catch ( UNO_NMSPC::Exception&
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
e
#endif
)
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
ByteString aMsg( "getAlgorithmList: Exception caught\n" );
aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
DBG_ERRORFILE( aMsg.GetBuffer() );
@@ -152,12 +151,12 @@ sal_Bool IndexEntrySupplierWrapper::LoadAlgorithm(
bRet = xIES->loadAlgorithm( rLcl, sSortAlgorithm, nOptions );
}
catch ( UNO_NMSPC::Exception&
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
e
#endif
)
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
ByteString aMsg( "loadAlgorithm: Exception caught\n" );
aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
DBG_ERRORFILE( aMsg.GetBuffer() );
@@ -178,12 +177,12 @@ sal_Int16 IndexEntrySupplierWrapper::CompareIndexEntry(
rTxt2, rTxtReading2, rLocale2 );
}
catch ( UNO_NMSPC::Exception&
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
e
#endif
)
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
ByteString aMsg( "compareIndexEntry: Exception caught\n" );
aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
DBG_ERRORFILE( aMsg.GetBuffer() );
@@ -191,3 +190,5 @@ sal_Int16 IndexEntrySupplierWrapper::CompareIndexEntry(
}
return nRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 121c79848e2d..7ca2ae0adbc0 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <tools/resid.hxx>
#include <unotools/charclass.hxx>
#include <com/sun/star/i18n/CollatorOptions.hpp>
@@ -186,8 +186,8 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwCntntNode* pNd,
{
SwPosition aPos( *pNd );
const SwDoc& rDoc = *pNd->GetDoc();
-#ifdef DBG_UTIL
- ASSERT( GetBodyTxtNode( rDoc, aPos, *pFrm ),
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( GetBodyTxtNode( rDoc, aPos, *pFrm ),
"wo steht der Absatz" );
#else
GetBodyTxtNode( rDoc, aPos, *pFrm );
@@ -340,7 +340,7 @@ sal_Bool SwTOXIndex::operator==( const SwTOXSortTabBase& rCmpBase )
if(GetLevel() != rCmp.GetLevel() || nKeyLevel != rCmp.nKeyLevel)
return sal_False;
- ASSERT(pTxtMark, "pTxtMark == 0, Kein Stichwort");
+ OSL_ENSURE(pTxtMark, "pTxtMark == 0, Kein Stichwort");
String sMyTxt;
String sMyTxtReading;
@@ -363,14 +363,11 @@ sal_Bool SwTOXIndex::operator==( const SwTOXSortTabBase& rCmpBase )
//
// kleiner haengt nur vom Text ab
-
-//
-
sal_Bool SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase )
{
SwTOXIndex& rCmp = (SwTOXIndex&)rCmpBase;
- ASSERT(pTxtMark, "pTxtMark == 0, Kein Stichwort");
+ OSL_ENSURE(pTxtMark, "pTxtMark == 0, Kein Stichwort");
String sMyTxt;
String sMyTxtReading;
@@ -398,12 +395,9 @@ sal_Bool SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase )
//
// Das Stichwort selbst
-
-//
-
void SwTOXIndex::GetText_Impl( String& rTxt, String& rTxtReading ) const
{
- ASSERT(pTxtMark, "pTxtMark == 0, Kein Stichwort");
+ OSL_ENSURE(pTxtMark, "pTxtMark == 0, Kein Stichwort");
const SwTOXMark& rTOXMark = pTxtMark->GetTOXMark();
switch(nKeyLevel)
{
@@ -461,7 +455,7 @@ void SwTOXIndex::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 )
sal_uInt16 SwTOXIndex::GetLevel() const
{
- ASSERT(pTxtMark, "pTxtMark == 0, Kein Stichwort");
+ OSL_ENSURE(pTxtMark, "pTxtMark == 0, Kein Stichwort");
sal_uInt16 nForm = FORM_PRIMARY_KEY;
@@ -532,7 +526,6 @@ void SwTOXCustom::GetText_Impl( String& rTxt, String &rTxtReading ) const
{
rTxt = aKey;
rTxtReading = sReading;
- /// !!!!!!!!!!!!!!
}
@@ -620,13 +613,6 @@ void SwTOXPara::GetText_Impl( String& rTxt, String& ) const
case nsSwTOXElement::TOX_OUTLINELEVEL:
{
xub_StrLen nStt = nStartIndex;
-/* JP 22.01.98:
- Tabs ueberspringen - macht aber keinen Sinn, solange in der TOX-Form
- nicht die KapitelNummer eingestellt werden kann
- const String& rTmp = ((SwTxtNode*)pNd)->GetTxt();
- while( '\t' == rTmp.GetChar( nStt ) && nStt < rTmp.Len() )
- ++nStt;
-*/
rTxt = ((SwTxtNode*)pNd)->GetExpandTxt(
nStt,
STRING_NOTFOUND == nEndIndex ? STRING_LEN : nEndIndex - nStt);
@@ -643,7 +629,7 @@ void SwTOXPara::GetText_Impl( String& rTxt, String& ) const
rTxt = pFly->GetName();
else
{
- ASSERT( !this, "Grafik/Object ohne Namen" )
+ OSL_ENSURE( !this, "Grafik/Object ohne Namen" );
sal_uInt16 nId = nsSwTOXElement::TOX_OLE == eType
? STR_OBJECT_DEFNAME
: nsSwTOXElement::TOX_GRAPHIC == eType
@@ -663,13 +649,6 @@ void SwTOXPara::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 ) c
{
SwTxtNode* pSrc = (SwTxtNode*)aTOXSources[0].pNd;
xub_StrLen nStt = nStartIndex;
-/* JP 22.01.98:
- Tabs ueberspringen - macht aber keinen Sinn, solange in der TOX-Form
- nicht die KapitelNummer eingestellt werden kann
- const String& rTxt = pSrc->GetTxt();
- while( '\t' == rTxt.GetChar( nStt ) && nStt < rTxt.Len() )
- ++nStt;
-*/
pSrc->GetExpandTxt( rNd, &rInsPos, nStt,
nEndIndex == STRING_LEN ? STRING_LEN : nEndIndex - nStt,
sal_False, sal_False, sal_True );
@@ -691,9 +670,6 @@ sal_uInt16 SwTOXPara::GetLevel() const
if( nsSwTOXElement::TOX_OUTLINELEVEL == eType && pNd->GetTxtNode() )
{
- //sal_uInt16 nTmp = ((SwTxtNode*)pNd)->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
- //if(nTmp < NO_NUMBERING)
- // nRet = nTmp + 1;
const int nTmp = ((SwTxtNode*)pNd)->GetAttrOutlineLevel();//#outline level,zhaojianwei????
if(nTmp != 0 )
nRet = static_cast<sal_uInt16>(nTmp);
@@ -713,41 +689,6 @@ String SwTOXPara::GetURL() const
{
const SwTxtNode * pTxtNd = static_cast<const SwTxtNode *>(pNd);
- // --> OD 2009-08-05 #i103265#
-// //if( MAXLEVEL >= pTxtNd->GetTxtColl()->GetOutlineLevel()) //#outline level,zhaojianwei
-// if ( pTxtNd->GetAttrOutlineLevel() > 0) //<-end,zhaojianwei
-// {
-// aTxt = '#';
-// const SwNumRule * pRule = pTxtNd->GetNumRule();
-// if( pRule )
-// {
-// // dann noch die rel. Nummer davor setzen
-// const sal_uInt16 nCurrLevel = static_cast<sal_uInt16>(pTxtNd->GetActualListLevel());
-// if(nCurrLevel <= MAXLEVEL)
-// {
-// // --> OD 2005-11-02 #i51089 - TUNING#
-// if ( pTxtNd->GetNum() )
-// {
-// SwNumberTree::tNumberVector aNumVector =
-// pTxtNd->GetNumberVector();
-
-// for( sal_uInt16 n = 0; n <= nCurrLevel; ++n )
-// {
-// int nNum = aNumVector[ n ];
-// nNum -= ( pRule->Get( n ).GetStart() - 1 );
-// ( aTxt += String::CreateFromInt32( nNum )) += '.';
-// }
-// }
-// else
-// {
-// ASSERT( false,
-// "<SwTOXPara::GetURL()> - text node with numbering rule, but without number. This is a serious defect -> inform OD" );
-// }
-// }
-// }
-// aTxt += pTxtNd->GetExpandTxt();
-// ( aTxt += cMarkSeperator ).AppendAscii( pMarkToOutline );
-// }
SwDoc* pDoc = const_cast<SwDoc*>( pTxtNd->GetDoc() );
::sw::mark::IMark const * const pMark = pDoc->getIDocumentMarkAccess()->getMarkForTxtNode(
*(pTxtNd),
@@ -755,7 +696,6 @@ String SwTOXPara::GetURL() const
aTxt = '#';
const String aMarkName( pMark->GetName() );
aTxt += aMarkName;
- // <--
}
break;
@@ -808,7 +748,7 @@ void SwTOXTable::GetText_Impl( String& rTxt, String& ) const
}
else
{
- ASSERT( !this, "Wo ist meine Tabelle geblieben?" )
+ OSL_ENSURE( !this, "Wo ist meine Tabelle geblieben?" );
rTxt = SW_RESSTR( STR_TABLE_DEFNAME );
}
}
@@ -834,9 +774,6 @@ String SwTOXTable::GetURL() const
}
return aTxt;
}
-/*-- 15.09.99 14:28:08---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwTOXAuthority::SwTOXAuthority( const SwCntntNode& rNd,
SwFmtFld& rField, const SwTOXInternational& rIntl ) :
@@ -863,9 +800,7 @@ sal_uInt16 SwTOXAuthority::GetLevel() const
nRet = 1;
return nRet;
}
-/*-- 15.09.99 14:28:08---------------------------------------------------
- -----------------------------------------------------------------------*/
static String lcl_GetText(SwFmtFld const& rField)
{
return rField.GetFld()->ExpandField(true);
@@ -876,9 +811,6 @@ void SwTOXAuthority::GetText_Impl( String& rTxt, String& ) const
rTxt = lcl_GetText(m_rField);
}
-/* -----------------21.09.99 12:50-------------------
-
- --------------------------------------------------*/
void SwTOXAuthority::FillText( SwTxtNode& rNd,
const SwIndex& rInsPos, sal_uInt16 nAuthField ) const
{
@@ -905,18 +837,14 @@ void SwTOXAuthority::FillText( SwTxtNode& rNd,
sText = (pField->GetFieldText((ToxAuthorityField) nAuthField));
rNd.InsertText( sText, rInsPos );
}
-/* -----------------14.10.99 09:35-------------------
- --------------------------------------------------*/
sal_Bool SwTOXAuthority::operator==( const SwTOXSortTabBase& rCmp)
{
return nType == rCmp.nType &&
((SwAuthorityField*)m_rField.GetFld())->GetHandle() ==
((SwAuthorityField*)((SwTOXAuthority&)rCmp).m_rField.GetFld())->GetHandle();
}
-/* -----------------21.10.99 09:52-------------------
- --------------------------------------------------*/
sal_Bool SwTOXAuthority::operator<( const SwTOXSortTabBase& rBase)
{
sal_Bool bRet = sal_False;
@@ -951,3 +879,5 @@ sal_Bool SwTOXAuthority::operator<( const SwTOXSortTabBase& rBase)
}
return bRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/SwGrammarContact.cxx b/sw/source/core/txtnode/SwGrammarContact.cxx
index 5a444161a702..a9ee7f529cdb 100644
--- a/sw/source/core/txtnode/SwGrammarContact.cxx
+++ b/sw/source/core/txtnode/SwGrammarContact.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -219,3 +220,4 @@ void finishGrammarCheck( SwTxtNode& rTxtNode )
pGrammarContact->finishGrammarCheck( rTxtNode );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index b4119504f71f..20d739bfc8b3 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -138,7 +139,7 @@ void SwFmtFld::SetFld(SwField * _pField)
int SwFmtFld::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
// OD 2004-05-14 #i29146# - correction: check, if <pField> and
// <((SwFmtFld&)rAttr).GetFld()> are set.
// OD 2004-05-14 #i29146# - items are equal, if both fields aren't set.
@@ -163,7 +164,7 @@ void SwFmtFld::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
return;
SwTxtNode* pTxtNd = (SwTxtNode*)&pTxtAttr->GetTxtNode();
- ASSERT( pTxtNd, "wo ist denn mein Node?" );
+ OSL_ENSURE( pTxtNd, "wo ist denn mein Node?" );
if( pNew )
{
switch( pNew->Which() )
@@ -254,8 +255,6 @@ sal_Bool SwFmtFld::IsProtect() const
|* SwTxtFld::SwTxtFld()
|*
|* Beschreibung Attribut fuer automatischen Text, Ctor
-|* Ersterstellung BP 30.04.92
-|* Letzte Aenderung JP 15.08.94
|*
*************************************************************************/
@@ -282,15 +281,13 @@ SwTxtFld::~SwTxtFld( )
|* SwTxtFld::Expand()
|*
|* Beschreibung exandiert das Feld und tauscht den Text im Node
-|* Ersterstellung BP 30.04.92
-|* Letzte Aenderung JP 15.08.94
|*
*************************************************************************/
void SwTxtFld::Expand() const
{
// Wenn das expandierte Feld sich nicht veraendert hat, wird returnt
- ASSERT( m_pTxtNode, "SwTxtFld: where is my TxtNode?" );
+ OSL_ENSURE( m_pTxtNode, "SwTxtFld: where is my TxtNode?" );
const SwField* pFld = GetFld().GetFld();
XubString aNewExpand(
@@ -332,8 +329,8 @@ void SwTxtFld::Expand() const
void SwTxtFld::CopyFld( SwTxtFld *pDest ) const
{
- ASSERT( m_pTxtNode, "SwTxtFld: where is my TxtNode?" );
- ASSERT( pDest->m_pTxtNode, "SwTxtFld: where is pDest's TxtNode?" );
+ OSL_ENSURE( m_pTxtNode, "SwTxtFld: where is my TxtNode?" );
+ OSL_ENSURE( pDest->m_pTxtNode, "SwTxtFld: where is pDest's TxtNode?" );
IDocumentFieldsAccess* pIDFA = m_pTxtNode->getIDocumentFieldsAccess();
IDocumentFieldsAccess* pDestIDFA = pDest->m_pTxtNode->getIDocumentFieldsAccess();
@@ -362,7 +359,7 @@ void SwTxtFld::CopyFld( SwTxtFld *pDest ) const
((SwDDEFieldType*)pFldType)->IncRefCnt();
}
- ASSERT( pFldType, "unbekannter FieldType" );
+ OSL_ENSURE( pFldType, "unbekannter FieldType" );
pFldType->Add( &rFmtFld ); // ummelden
rFmtFld.GetFld()->ChgTyp( pFldType );
}
@@ -385,9 +382,6 @@ void SwTxtFld::CopyFld( SwTxtFld *pDest ) const
}
}
-/* -----------------26.06.2003 13:54-----------------
-
- --------------------------------------------------*/
void SwTxtFld::NotifyContentChange(SwFmtFld& rFmtFld)
{
//if not in undo section notify the change
@@ -398,3 +392,4 @@ void SwTxtFld::NotifyContentChange(SwFmtFld& rFmtFld)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx
index d3076e642ef5..59295172de57 100644
--- a/sw/source/core/txtnode/atrflyin.cxx
+++ b/sw/source/core/txtnode/atrflyin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,15 +54,15 @@ SwFmtFlyCnt::SwFmtFlyCnt( SwFrmFmt *pFrmFmt )
{
}
-int __EXPORT SwFmtFlyCnt::operator==( const SfxPoolItem& rAttr ) const
+int SwFmtFlyCnt::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return( pTxtAttr && ((SwFmtFlyCnt&)rAttr).pTxtAttr &&
*pTxtAttr->GetStart() == *((SwFmtFlyCnt&)rAttr).pTxtAttr->GetStart() &&
pFmt == ((SwFmtFlyCnt&)rAttr).GetFrmFmt() );
}
-SfxPoolItem* __EXPORT SwFmtFlyCnt::Clone( SfxItemPool* ) const
+SfxPoolItem* SwFmtFlyCnt::Clone( SfxItemPool* ) const
{
return new SwFmtFlyCnt( pFmt );
}
@@ -111,7 +112,7 @@ SwTxtFlyCnt::SwTxtFlyCnt( SwFmtFlyCnt& rAttr, xub_StrLen nStartPos )
void SwTxtFlyCnt::CopyFlyFmt( SwDoc* pDoc )
{
SwFrmFmt* pFmt = GetFlyCnt().GetFrmFmt();
- ASSERT( pFmt, "von welchem Format soll ich eine Kopie erzeugen?" )
+ OSL_ENSURE( pFmt, "von welchem Format soll ich eine Kopie erzeugen?" );
// Das FlyFrmFmt muss dupliziert werden.
// In CopyLayoutFmt (siehe doclay.cxx) wird das FlyFrmFmt erzeugt
// und der Inhalt dupliziert.
@@ -139,7 +140,7 @@ void SwTxtFlyCnt::CopyFlyFmt( SwDoc* pDoc )
else
{
pPos->nContent.Assign( 0, 0 );
- ASSERT( !this, "CopyFlyFmt: Was fuer ein Anker?" );
+ OSL_ENSURE( !this, "CopyFlyFmt: Was fuer ein Anker?" );
}
}
@@ -228,12 +229,12 @@ SwFlyInCntFrm *SwTxtFlyCnt::_GetFlyFrm( const SwFrm *pCurrFrm )
SwFrmFmt* pFrmFmt = GetFlyCnt().GetFrmFmt();
if( RES_DRAWFRMFMT == pFrmFmt->Which() )
{
- ASSERT( !this, "SwTxtFlyCnt::_GetFlyFrm: DrawInCnt-Baustelle!" );
+ OSL_ENSURE( !this, "SwTxtFlyCnt::_GetFlyFrm: DrawInCnt-Baustelle!" );
return NULL;
}
SwClientIter aIter( *GetFlyCnt().pFmt );
- ASSERT( pCurrFrm->IsTxtFrm(), "SwTxtFlyCnt::_GetFlyFrm for TxtFrms only." );
+ OSL_ENSURE( pCurrFrm->IsTxtFrm(), "SwTxtFlyCnt::_GetFlyFrm for TxtFrms only." );
if( aIter.GoStart() )
{
@@ -282,3 +283,4 @@ SwFlyInCntFrm *SwTxtFlyCnt::_GetFlyFrm( const SwFrm *pCurrFrm )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx
index 5a4888da552e..3e67e6d759e2 100644
--- a/sw/source/core/txtnode/atrftn.cxx
+++ b/sw/source/core/txtnode/atrftn.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,7 @@
#define _SVSTDARR_USHORTSSORT
#include <svl/svstdarr.hxx>
#include <doc.hxx>
-#include <cntfrm.hxx> // ASSERT in ~SwTxtFtn()
+#include <cntfrm.hxx> // OSL_ENSURE(in ~SwTxtFtn()
#include <pagefrm.hxx> // RemoveFtn()
#include <fmtftn.hxx>
#include <txtftn.hxx>
@@ -52,10 +53,6 @@
|*
|* class SwFmtFtn
|*
-|* Beschreibung
-|* Ersterstellung JP 09.08.94
-|* Letzte Aenderung JP 08.08.94
-|*
*************************************************************************/
@@ -70,7 +67,7 @@ SwFmtFtn::SwFmtFtn( bool bEndNote )
int SwFmtFtn::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return nNumber == ((SwFmtFtn&)rAttr).nNumber &&
aNumber == ((SwFmtFtn&)rAttr).aNumber &&
m_bEndNote == ((SwFmtFtn&)rAttr).m_bEndNote;
@@ -270,7 +267,7 @@ void SwTxtFtn::SetNumber( const sal_uInt16 nNewNum, const XubString* pStr )
rFtn.aNumber = aEmptyStr;
}
- ASSERT( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" );
+ OSL_ENSURE( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" );
SwNodes &rNodes = m_pTxtNode->GetDoc()->GetNodes();
m_pTxtNode->Modify( 0, &rFtn );
if ( m_pStartNode )
@@ -365,7 +362,7 @@ void SwTxtFtn::MakeNewTextSection( SwNodes& rNodes )
void SwTxtFtn::DelFrms()
{
// delete the FtnFrames from the pages
- ASSERT( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" );
+ OSL_ENSURE( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" );
if ( !m_pTxtNode )
return;
@@ -404,7 +401,7 @@ void SwTxtFtn::DelFrms()
SwFtnFrm *pFtn = (SwFtnFrm*)pFrm;
while ( pFtn && pFtn->GetMaster() )
pFtn = pFtn->GetMaster();
- ASSERT( pFtn->GetAttr() == this, "Ftn mismatch error." );
+ OSL_ENSURE( pFtn->GetAttr() == this, "Ftn mismatch error." );
while ( pFtn )
{
@@ -541,3 +538,4 @@ void SwTxtFtn::CheckCondColl()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/atrref.cxx b/sw/source/core/txtnode/atrref.cxx
index 979a810b018b..b9c66e4b782f 100644
--- a/sw/source/core/txtnode/atrref.cxx
+++ b/sw/source/core/txtnode/atrref.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,7 +62,7 @@ SwFmtRefMark::SwFmtRefMark( const SwFmtRefMark& rAttr )
int SwFmtRefMark::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return aRefName == ((SwFmtRefMark&)rAttr).aRefName;
}
@@ -101,3 +102,4 @@ xub_StrLen* SwTxtRefMark::GetEnd()
return m_pEnd;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/atrtox.cxx b/sw/source/core/txtnode/atrtox.cxx
index 8c64e4b2bd29..20d63bc495be 100644
--- a/sw/source/core/txtnode/atrtox.cxx
+++ b/sw/source/core/txtnode/atrtox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -94,3 +95,5 @@ void SwTxtTOXMark::CopyTOXMark( SwDoc* pDoc )
//
((SwTOXType*)pType)->Add( &rTOX );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/chrfmt.cxx b/sw/source/core/txtnode/chrfmt.cxx
index eb2f4be5c3e8..71d7e48f6d74 100644
--- a/sw/source/core/txtnode/chrfmt.cxx
+++ b/sw/source/core/txtnode/chrfmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,3 +37,4 @@ TYPEINIT1( SwCharFmt, SwFmt ); //rtti fuer SwCharFmt
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index 236a0bab3d72..cb01967ffcad 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,9 +71,6 @@ TYPEINIT1_AUTOFACTORY(SwFmtAutoFmt, SfxPoolItem);
/*************************************************************************
|*
|* class SwFmtCharFmt
-|* Beschreibung
-|* Ersterstellung JP 23.11.90
-|* Letzte Aenderung JP 09.08.94
|*
*************************************************************************/
@@ -100,7 +98,7 @@ SwFmtCharFmt::~SwFmtCharFmt() {}
int SwFmtCharFmt::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return GetCharFmt() == ((SwFmtCharFmt&)rAttr).GetCharFmt();
}
@@ -127,26 +125,23 @@ sal_Bool SwFmtCharFmt::GetInfo( SfxPoolItem& rInfo ) const
{
return pTxtAttr ? pTxtAttr->GetInfo( rInfo ) : sal_False;
}
-sal_Bool SwFmtCharFmt::QueryValue( uno::Any& rVal, sal_uInt8 ) const
+bool SwFmtCharFmt::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
String sCharFmtName;
if(GetCharFmt())
SwStyleNameMapper::FillProgName(GetCharFmt()->GetName(), sCharFmtName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True );
rVal <<= OUString( sCharFmtName );
- return sal_True;
+ return true;
}
-sal_Bool SwFmtCharFmt::PutValue( const uno::Any& , sal_uInt8 )
+bool SwFmtCharFmt::PutValue( const uno::Any& , sal_uInt8 )
{
- DBG_ERROR("Zeichenvorlage kann mit PutValue nicht gesetzt werden!");
- return sal_False;
+ OSL_FAIL("Zeichenvorlage kann mit PutValue nicht gesetzt werden!");
+ return false;
}
/*************************************************************************
|*
|* class SwFmtAutoFmt
-|* Beschreibung
-|* Ersterstellung AMA 12.05.06
-|* Letzte Aenderung AMA 12.05.06
|*
*************************************************************************/
@@ -166,7 +161,7 @@ SwFmtAutoFmt::~SwFmtAutoFmt()
int SwFmtAutoFmt::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "different attributes" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "different attributes" );
return mpHandle == ((SwFmtAutoFmt&)rAttr).mpHandle;
}
@@ -175,25 +170,22 @@ SfxPoolItem* SwFmtAutoFmt::Clone( SfxItemPool* ) const
return new SwFmtAutoFmt( *this );
}
-sal_Bool SwFmtAutoFmt::QueryValue( uno::Any& rVal, sal_uInt8 ) const
+bool SwFmtAutoFmt::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
String sCharFmtName = StylePool::nameOf( mpHandle );
rVal <<= OUString( sCharFmtName );
- return sal_True;
+ return true;
}
-sal_Bool SwFmtAutoFmt::PutValue( const uno::Any& , sal_uInt8 )
+bool SwFmtAutoFmt::PutValue( const uno::Any& , sal_uInt8 )
{
//the format is not renameable via API
- return sal_False;
+ return false;
}
/*************************************************************************
|*
|* class SwFmtINetFmt
-|* Beschreibung
-|* Ersterstellung AMA 02.08.96
-|* Letzte Aenderung AMA 02.08.96
|*
*************************************************************************/
@@ -241,7 +233,7 @@ SwFmtINetFmt::~SwFmtINetFmt()
int SwFmtINetFmt::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
sal_Bool bRet = SfxPoolItem::operator==( (SfxPoolItem&) rAttr )
&& aURL == ((SwFmtINetFmt&)rAttr).aURL
&& aName == ((SwFmtINetFmt&)rAttr).aName
@@ -331,9 +323,9 @@ const SvxMacro* SwFmtINetFmt::GetMacro( sal_uInt16 nEvent ) const
-sal_Bool SwFmtINetFmt::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFmtINetFmt::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
XubString sVal;
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -379,9 +371,9 @@ sal_Bool SwFmtINetFmt::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
rVal <<= OUString(sVal);
return bRet;
}
-sal_Bool SwFmtINetFmt::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwFmtINetFmt::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
nMemberId &= ~CONVERT_TWIPS;
// all properties except HyperlinkEvents are of type string, hence
@@ -403,14 +395,14 @@ sal_Bool SwFmtINetFmt::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
else
{
// wrong type!
- bRet = sal_False;
+ bRet = false;
}
}
else
{
// all string properties:
if(rVal.getValueType() != ::getCppuType((rtl::OUString*)0))
- return sal_False;
+ return false;
XubString sVal = *(rtl::OUString*)rVal.getValue();
switch(nMemberId)
{
@@ -441,7 +433,7 @@ sal_Bool SwFmtINetFmt::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
}
break;
default:
- bRet = sal_False;
+ bRet = false;
}
}
return bRet;
@@ -490,7 +482,7 @@ SwFmtRuby& SwFmtRuby::operator=( const SwFmtRuby& rAttr )
int SwFmtRuby::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return sRubyTxt == ((SwFmtRuby&)rAttr).sRubyTxt &&
sCharFmtName == ((SwFmtRuby&)rAttr).sCharFmtName &&
nCharFmtId == ((SwFmtRuby&)rAttr).nCharFmtId &&
@@ -503,10 +495,10 @@ SfxPoolItem* SwFmtRuby::Clone( SfxItemPool* ) const
return new SwFmtRuby( *this );
}
-sal_Bool SwFmtRuby::QueryValue( uno::Any& rVal,
+bool SwFmtRuby::QueryValue( uno::Any& rVal,
sal_uInt8 nMemberId ) const
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
nMemberId &= ~CONVERT_TWIPS;
switch( nMemberId )
{
@@ -526,14 +518,14 @@ sal_Bool SwFmtRuby::QueryValue( uno::Any& rVal,
}
break;
default:
- bRet = sal_False;
+ bRet = false;
}
return bRet;
}
-sal_Bool SwFmtRuby::PutValue( const uno::Any& rVal,
+bool SwFmtRuby::PutValue( const uno::Any& rVal,
sal_uInt8 nMemberId )
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
nMemberId &= ~CONVERT_TWIPS;
switch( nMemberId )
{
@@ -551,7 +543,7 @@ sal_Bool SwFmtRuby::PutValue( const uno::Any& rVal,
if(nSet >= 0 && nSet <= text::RubyAdjust_INDENT_BLOCK)
nAdjustment = nSet;
else
- bRet = sal_False;
+ bRet = false;
}
break;
case MID_RUBY_ABOVE:
@@ -573,7 +565,7 @@ sal_Bool SwFmtRuby::PutValue( const uno::Any& rVal,
}
break;
default:
- bRet = sal_False;
+ bRet = false;
}
return bRet;
}
@@ -593,7 +585,7 @@ SwFmtMeta::SwFmtMeta(const sal_uInt16 i_nWhich)
, m_pMeta()
, m_pTxtAttr( 0 )
{
- ASSERT((RES_TXTATR_META == i_nWhich) || (RES_TXTATR_METAFIELD == i_nWhich),
+ OSL_ENSURE((RES_TXTATR_META == i_nWhich) || (RES_TXTATR_METAFIELD == i_nWhich),
"ERROR: SwFmtMeta: invalid which id!");
}
@@ -603,9 +595,9 @@ SwFmtMeta::SwFmtMeta( ::boost::shared_ptr< ::sw::Meta > const & i_pMeta,
, m_pMeta( i_pMeta )
, m_pTxtAttr( 0 )
{
- ASSERT((RES_TXTATR_META == i_nWhich) || (RES_TXTATR_METAFIELD == i_nWhich),
+ OSL_ENSURE((RES_TXTATR_META == i_nWhich) || (RES_TXTATR_METAFIELD == i_nWhich),
"ERROR: SwFmtMeta: invalid which id!");
- ASSERT(m_pMeta, "SwFmtMeta: no Meta ?");
+ OSL_ENSURE(m_pMeta, "SwFmtMeta: no Meta ?");
// DO NOT call m_pMeta->SetFmtMeta(this) here; only from SetTxtAttr!
}
@@ -619,7 +611,7 @@ SwFmtMeta::~SwFmtMeta()
int SwFmtMeta::operator==( const SfxPoolItem & i_rOther ) const
{
- ASSERT( SfxPoolItem::operator==( i_rOther ), "i just copied this assert" );
+ OSL_ENSURE( SfxPoolItem::operator==( i_rOther ), "i just copied this assert" );
return SfxPoolItem::operator==( i_rOther )
&& (m_pMeta == static_cast<SwFmtMeta const &>( i_rOther ).m_pMeta);
}
@@ -633,12 +625,12 @@ SfxPoolItem * SwFmtMeta::Clone( SfxItemPool * /*pPool*/ ) const
void SwFmtMeta::SetTxtAttr(SwTxtMeta * const i_pTxtAttr)
{
- ASSERT(!(m_pTxtAttr && i_pTxtAttr),
+ OSL_ENSURE(!(m_pTxtAttr && i_pTxtAttr),
"SwFmtMeta::SetTxtAttr: already has text attribute?");
- ASSERT( m_pTxtAttr || i_pTxtAttr ,
+ OSL_ENSURE( m_pTxtAttr || i_pTxtAttr ,
"SwFmtMeta::SetTxtAttr: no attribute to remove?");
m_pTxtAttr = i_pTxtAttr;
- ASSERT(m_pMeta, "inserted SwFmtMeta has no sw::Meta?");
+ OSL_ENSURE(m_pMeta, "inserted SwFmtMeta has no sw::Meta?");
// the sw::Meta must be able to find the current text attribute!
if (i_pTxtAttr && m_pMeta)
{
@@ -650,7 +642,7 @@ void SwFmtMeta::NotifyChangeTxtNode(SwTxtNode *const pTxtNode)
{
// N.B.: do not reset m_pTxtAttr here: see call in nodes.cxx,
// where the hint is not deleted!
- ASSERT(m_pMeta, "NotifyRemoval: no meta ?");
+ OSL_ENSURE(m_pMeta, "NotifyRemoval: no meta ?");
if (m_pMeta)
{
if (!pTxtNode)
@@ -670,7 +662,7 @@ void SwFmtMeta::NotifyChangeTxtNode(SwTxtNode *const pTxtNode)
// and if it is not called when copying, total chaos will undoubtedly ensue
void SwFmtMeta::DoCopy(SwFmtMeta & rOriginalMeta)
{
- ASSERT(m_pMeta, "DoCopy called for SwFmtMeta with no sw::Meta?");
+ OSL_ENSURE(m_pMeta, "DoCopy called for SwFmtMeta with no sw::Meta?");
if (m_pMeta)
{
const ::boost::shared_ptr< ::sw::Meta> pOriginal( m_pMeta );
@@ -906,3 +898,4 @@ MetaFieldManager::getMetaFields()
} // namespace sw
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 755e8bf1026e..c92c795f51e7 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,24 +30,14 @@
#include "precompiled_sw.hxx"
-#ifndef _OUTDEV_HXX //autogen
#include <vcl/outdev.hxx>
-#endif
-#ifndef _PRINT_HXX //autogen
#include <vcl/print.hxx>
-#endif
#include <vcl/lineinfo.hxx>
-#ifndef _METRIC_HXX //autogen
#include <vcl/metric.hxx>
-#endif
#include <vcl/window.hxx>
#include <vcl/svapp.hxx>
-#ifndef _COM_SUN_STAR_I18N_CHARACTERITERATORMODE_HDL_
#include <com/sun/star/i18n/CharacterIteratorMode.hdl>
-#endif
-#ifndef _COM_SUN_STAR_I18N_WORDTYPE_HDL
#include <com/sun/star/i18n/WordType.hdl>
-#endif
#include <breakit.hxx>
#include <viewsh.hxx> // Bildschirmabgleich
#include <viewopt.hxx> // Bildschirmabgleich abschalten, ViewOption
@@ -68,9 +59,7 @@
#include <doc.hxx>
#include <editeng/fhgtitem.hxx>
#include <docsh.hxx>
-#ifndef _POOLFMT_HRC
#include <poolfmt.hrc>
-#endif
using namespace ::com::sun::star;
@@ -108,9 +97,6 @@ sal_uInt16 GetDefaultFontHeight( SwDrawTextInfo &rInf )
|*
|* SwFntCache::Flush()
|*
-|* Ersterstellung AMA 16. Dez. 94
-|* Letzte Aenderung AMA 16. Dez. 94
-|*
|*************************************************************************/
void SwFntCache::Flush( )
@@ -127,9 +113,6 @@ void SwFntCache::Flush( )
|*
|* SwFntObj::SwFntObj(), ~SwFntObj()
|*
-|* Ersterstellung AMA 7. Nov. 94
-|* Letzte Aenderung AMA 7. Nov. 94
-|*
|*************************************************************************/
SwFntObj::SwFntObj( const SwSubFont &rFont, const void *pOwn, ViewShell *pSh ) :
@@ -303,9 +286,6 @@ void lcl_calcLinePos( const CalcLinePosData &rData,
*
* sal_uInt16 SwFntObj::GetFontAscent( const OutputDevice& rOut )
*
- * Ersterstellung AMA 7. Nov. 94
- * Letzte Aenderung AMA 7. Nov. 94
- *
* Beschreibung: liefern den Ascent des Fonts auf dem
* gewuenschten Outputdevice zurueck, ggf. muss der Bildschirmfont erst
* erzeugt werden.
@@ -319,7 +299,7 @@ sal_uInt16 SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rO
if ( pSh && lcl_IsFontAdjustNecessary( rOut, rRefDev ) )
{
CreateScrFont( *pSh, rOut );
- ASSERT( USHRT_MAX != nScrAscent, "nScrAscent is going berzerk" )
+ OSL_ENSURE( USHRT_MAX != nScrAscent, "nScrAscent is going berzerk" );
nRet = nScrAscent;
}
else
@@ -342,7 +322,7 @@ sal_uInt16 SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rO
nRet += GetFontLeading( pSh, rRefDev );
#endif
- ASSERT( USHRT_MAX != nRet, "GetFontAscent returned USHRT_MAX" )
+ OSL_ENSURE( USHRT_MAX != nRet, "GetFontAscent returned USHRT_MAX" );
return nRet;
}
@@ -350,9 +330,6 @@ sal_uInt16 SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rO
*
* sal_uInt16 SwFntObj::GetFontHeight( const OutputDevice* pOut )
*
- * Ersterstellung AMA 7. Nov. 94
- * Letzte Aenderung AMA 7. Nov. 94
- *
* Beschreibung: liefern die H?he des Fonts auf dem
* gewuenschten Outputdevice zurueck, ggf. muss der Bildschirmfont erst
* erzeugt werden.
@@ -366,7 +343,7 @@ sal_uInt16 SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rO
if ( pSh && lcl_IsFontAdjustNecessary( rOut, rRefDev ) )
{
CreateScrFont( *pSh, rOut );
- ASSERT( USHRT_MAX != nScrHeight, "nScrHeight is going berzerk" )
+ OSL_ENSURE( USHRT_MAX != nScrHeight, "nScrHeight is going berzerk" );
nRet = nScrHeight + GetFontLeading( pSh, rRefDev );
}
else
@@ -384,7 +361,7 @@ sal_uInt16 SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rO
long nTmpPrtHeight = (sal_uInt16)aOutMet.GetAscent() + aOutMet.GetDescent();
(void) nTmpPrtHeight;
// #i106098#: do not compare with == here due to rounding error
- ASSERT( abs(nTmpPrtHeight - nPrtHeight) < 3,
+ OSL_ENSURE( abs(nTmpPrtHeight - nPrtHeight) < 3,
"GetTextHeight != Ascent + Descent" );
#endif
@@ -394,7 +371,7 @@ sal_uInt16 SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rO
nRet = nPrtHeight + GetFontLeading( pSh, rRefDev );
}
- ASSERT( USHRT_MAX != nRet, "GetFontHeight returned USHRT_MAX" )
+ OSL_ENSURE( USHRT_MAX != nRet, "GetFontHeight returned USHRT_MAX" );
return nRet;
}
@@ -426,7 +403,7 @@ sal_uInt16 SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& r
nRet = nGuessedLeading;
}
- ASSERT( USHRT_MAX != nRet, "GetFontLeading returned USHRT_MAX" )
+ OSL_ENSURE( USHRT_MAX != nRet, "GetFontLeading returned USHRT_MAX" );
return nRet;
}
@@ -435,9 +412,6 @@ sal_uInt16 SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& r
*
* SwFntObj::CreateScrFont( const ViewShell& rSh, const OutputDevice& rOut )
*
- * Ersterstellung AMA 7. Nov. 94
- * Letzte Aenderung AMA 7. Nov. 94
- *
* pOut is the output device, not the reference device
*
*************************************************************************/
@@ -590,7 +564,7 @@ void SwFntObj::GuessLeading( const ViewShell&
aWinMet.GetAscent() - rMet.GetAscent() - nTmpLeading );
if( nDiff > 0 )
{
- ASSERT( nPrtAscent < USHRT_MAX, "GuessLeading: PrtAscent-Fault" );
+ OSL_ENSURE( nPrtAscent < USHRT_MAX, "GuessLeading: PrtAscent-Fault" );
if ( nPrtAscent < USHRT_MAX )
nPrtAscent = nPrtAscent + (sal_uInt16)(( 2 * nDiff ) / 5);
}
@@ -614,9 +588,6 @@ void SwFntObj::GuessLeading( const ViewShell&
*
* void SwFntObj::SetDeviceFont( const OutputDevice *pOut ),
*
- * Ersterstellung AMA 7. Nov. 94
- * Letzte Aenderung AMA 7. Nov. 94
- *
* Beschreibung: stellt den Font am gewuenschten OutputDevice ein,
* am Bildschirm muss eventuell erst den Abgleich durchgefuehrt werden.
*
@@ -654,9 +625,6 @@ void SwFntObj::SetDevFont( const ViewShell *pSh, OutputDevice& rOut )
*
* void SwFntObj::DrawText( ... )
*
- * Ersterstellung AMA 16. Dez. 94
- * Letzte Aenderung AMA 16. Dez. 94
- *
* Beschreibung: Textausgabe
* auf dem Bildschirm => DrawTextArray
* auf dem Drucker, !Kerning => DrawText
@@ -828,7 +796,7 @@ static void lcl_DrawLineForWrongListData(
void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
- ASSERT( rInf.GetShell(), "SwFntObj::DrawText without shell" )
+ OSL_ENSURE( rInf.GetShell(), "SwFntObj::DrawText without shell" );
OutputDevice& rRefDev = rInf.GetShell()->GetRefDev();
OutputDevice* pWin = rInf.GetShell()->GetWin();
@@ -872,7 +840,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// a window. Therefore bUseSrcFont is always 0 in this case.
//
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
const sal_Bool bNoAdjust = bPrt ||
( pWin &&
@@ -884,15 +852,15 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// Printer output
if ( OUTDEV_PRINTER == rRefDev.GetOutDevType() )
{
- ASSERT( bNoAdjust == 1 && bUseScrFont == 0, "Outdev Check failed" )
+ OSL_ENSURE( bNoAdjust == 1 && bUseScrFont == 0, "Outdev Check failed" );
}
else if ( OUTDEV_VIRDEV == rRefDev.GetOutDevType() )
{
- ASSERT( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" )
+ OSL_ENSURE( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" );
}
else
{
- ASSERT( sal_False, "Outdev Check failed" )
+ OSL_ENSURE( sal_False, "Outdev Check failed" );
}
}
else if ( OUTDEV_VIRDEV == rInf.GetOut().GetOutDevType() && ! pWin )
@@ -900,15 +868,15 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// PDF export
if ( OUTDEV_PRINTER == rRefDev.GetOutDevType() )
{
- ASSERT( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" )
+ OSL_ENSURE( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" );
}
else if ( OUTDEV_VIRDEV == rRefDev.GetOutDevType() )
{
- ASSERT( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" )
+ OSL_ENSURE( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" );
}
else
{
- ASSERT( sal_False, "Outdev Check failed" )
+ OSL_ENSURE( sal_False, "Outdev Check failed" );
}
}
else if ( OUTDEV_WINDOW == rInf.GetOut().GetOutDevType() ||
@@ -917,30 +885,30 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// Window or virtual window
if ( OUTDEV_PRINTER == rRefDev.GetOutDevType() )
{
- ASSERT( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" )
+ OSL_ENSURE( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" );
}
else if ( OUTDEV_VIRDEV == rRefDev.GetOutDevType() )
{
- ASSERT( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" )
+ OSL_ENSURE( bNoAdjust == 0 && bUseScrFont == 1, "Outdev Check failed" );
}
else if ( OUTDEV_WINDOW == rRefDev.GetOutDevType() )
{
- ASSERT( bNoAdjust == 1 && bUseScrFont == 0, "Outdev Check failed" )
+ OSL_ENSURE( bNoAdjust == 1 && bUseScrFont == 0, "Outdev Check failed" );
}
else
{
- ASSERT( sal_False, "Outdev Check failed" )
+ OSL_ENSURE( sal_False, "Outdev Check failed" );
}
}
else
{
- ASSERT( sal_False, "Outdev Check failed" )
+ OSL_ENSURE( sal_False, "Outdev Check failed" );
}
#endif
// robust: better use the printer font instead of using no font at all
- ASSERT( pTmpFont, "No screen or printer font?" );
+ OSL_ENSURE( pTmpFont, "No screen or printer font?" );
if ( ! pTmpFont )
pTmpFont = pPrtFont;
@@ -1468,7 +1436,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
rInf.GetIdx(), rInf.GetLen() );
// OLE: no printer available
- // ASSERT( pPrinter, "DrawText needs pPrinter" )
+ // OSL_ENSURE( pPrinter, "DrawText needs pPrinter" )
if ( pPrinter )
{
// pTmpFont has already been set as current font for rInf.GetOut()
@@ -1482,21 +1450,8 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
}
else
{
-// sal_Bool bRestore = sal_False;
-// MapMode aOld( rInf.GetOut().GetMapMode() );
-// if( rInf.GetZoom().GetNumerator() &&
-// rInf.GetZoom() != aOld.GetScaleX() )
-// {
-// MapMode aNew( aOld );
-// aNew.SetScaleX( rInf.GetZoom() );
-// aNew.SetScaleY( rInf.GetZoom() );
-// rInf.GetOut().SetMapMode( aNew );
-// bRestore = sal_True;
-// }
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
rInf.GetIdx(), rInf.GetLen() );
-// if( bRestore )
-// rInf.GetOut().SetMapMode( aOld );
}
//
@@ -1659,7 +1614,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
nCh = rInf.GetText().GetChar( rInf.GetIdx() + i );
- ASSERT( pScrArray, "Where is the screen array?" )
+ OSL_ENSURE( pScrArray, "Where is the screen array?" );
long nScr;
nScr = pScrArray[ i ] - pScrArray[ i - 1 ];
@@ -1669,11 +1624,8 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// linksbuendig zur Druckerposition.
if ( nCh == CH_BLANK )
{
-#ifdef FONT_TEST_DEBUG
- lcl_Pos( 3, nScrPos, nScr, pKernArray[i-1], pKernArray[i] );
-#else
nScrPos = pKernArray[i-1] + nScr;
-#endif
+
if ( cChPrev == CH_BLANK )
nSpaceSum += nOtherHalf;
if ( i + 1 == nCnt )
@@ -1685,28 +1637,17 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
if ( cChPrev == CH_BLANK )
{
-#ifdef FONT_TEST_DEBUG
- lcl_Pos( 6, nScrPos, nScr, pKernArray[i-1], pKernArray[i] );
-#else
nScrPos = pKernArray[i-1] + nScr;
-#endif
+
// kein Pixel geht verloren:
nSpaceSum += nOtherHalf;
}
else if ( cChPrev == '-' )
-#ifdef FONT_TEST_DEBUG
- lcl_Pos( 6, nScrPos, nScr, pKernArray[i-1], pKernArray[i] );
-#else
nScrPos = pKernArray[i-1] + nScr;
-#endif
else
{
-#ifdef FONT_TEST_DEBUG
- lcl_Pos( 0, nScrPos, nScr, pKernArray[i-1], pKernArray[i] );
-#else
nScrPos += nScr;
nScrPos = ( nMul * nScrPos + pKernArray[i] ) / nDiv;
-#endif
}
}
cChPrev = nCh;
@@ -1818,31 +1759,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
xub_StrLen nOffs = 0;
xub_StrLen nLen = rInf.GetLen();
-#ifdef COMING_SOON
- if( aPos.X() < rInf.GetLeft() )
- {
- while( nOffs < nLen &&
- aPos.X() + pKernArray[ nOffs ] < rInf.GetLeft() )
- ++nOffs;
- if( nOffs < nLen )
- {
- --nLen;
- while( nLen > nOffs &&
- aPos.X() + pKernArray[ nLen ] > rInf.GetRight() )
- --nLen;
- ++nLen;
- if( nOffs )
- --nOffs;
- }
- if( nOffs )
- {
- long nDiff = pKernArray[ nOffs - 1 ];
- aPos.X() += nDiff;
- for( xub_StrLen nX = nOffs; nX < nLen; ++nX )
- pKernArray[ nX ] -= nDiff;
- }
- }
-#endif
+
if( nOffs < nLen )
{
// If we paint bullets instead of spaces, we use a copy of
@@ -1880,9 +1797,6 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
* Size SwFntObj::GetTextSize( const OutputDevice *pOut, const String &rTxt,
* const sal_uInt16 nIdx, const sal_uInt16 nLen, const short nKern = 0 );
*
- * Ersterstellung AMA 16. Dez. 94
- * Letzte Aenderung AMA 16. Dez. 94
- *
* Beschreibung: ermittelt die TextSize (des Druckers)
*
*************************************************************************/
@@ -1923,9 +1837,9 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
aTxtSize.Width() =
pOutDev->GetTextWidth( rInf.GetText(), rInf.GetIdx(), nLn );
- ASSERT( !rInf.GetShell() ||
+ OSL_ENSURE( !rInf.GetShell() ||
( USHRT_MAX != GetGuessedLeading() && USHRT_MAX != GetExtLeading() ),
- "Leading values should be already calculated" )
+ "Leading values should be already calculated" );
aTxtSize.Height() = pOutDev->GetTextHeight() +
GetFontLeading( rInf.GetShell(), rInf.GetOut() );
@@ -1984,7 +1898,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
rInf.GetScriptInfo()->CountCompChg() &&
lcl_IsMonoSpaceFont( rInf.GetOut() );
- ASSERT( !bCompress || ( rInf.GetScriptInfo() && rInf.GetScriptInfo()->
+ OSL_ENSURE( !bCompress || ( rInf.GetScriptInfo() && rInf.GetScriptInfo()->
CountCompChg()), "Compression without info" );
// This is the part used e.g., for cursor travelling
@@ -2087,9 +2001,9 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
if ( rInf.GetKern() && nLn )
aTxtSize.Width() += ( nLn - 1 ) * long( rInf.GetKern() );
- ASSERT( !rInf.GetShell() ||
+ OSL_ENSURE( !rInf.GetShell() ||
( USHRT_MAX != GetGuessedLeading() && USHRT_MAX != GetExtLeading() ),
- "Leading values should be already calculated" )
+ "Leading values should be already calculated" );
aTxtSize.Height() += GetFontLeading( rInf.GetShell(), rInf.GetOut() );
return aTxtSize;
}
@@ -2308,9 +2222,6 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
|*
|* SwFntAccess::SwFntAccess()
|*
-|* Ersterstellung AMA 9. Nov. 94
-|* Letzte Aenderung AMA 9. Nov. 94
-|*
|*************************************************************************/
SwFntAccess::SwFntAccess( const void* &rMagic,
@@ -2389,14 +2300,14 @@ SwFntAccess::SwFntAccess( const void* &rMagic,
// SwFont sein, spaeter wird als Owner die "MagicNumber" gehalten.
SwCacheAccess::pOwner = pOwn;
pFntObj = Get(); // hier wird via NewObj() angelegt und gelockt.
- ASSERT(pFntObj, "No Font, no Fun.");
+ OSL_ENSURE(pFntObj, "No Font, no Fun.");
}
else // Font has been found, so we lock it.
{
pFntObj->Lock();
if( pFntObj->pPrinter != pOut ) // Falls bis dato kein Drucker bekannt
{
- ASSERT( !pFntObj->pPrinter, "SwFntAccess: Printer Changed" );
+ OSL_ENSURE( !pFntObj->pPrinter, "SwFntAccess: Printer Changed" );
pFntObj->CreatePrtFont( *pOut );
pFntObj->pPrinter = pOut;
pFntObj->pScrFont = NULL;
@@ -2439,7 +2350,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
rInf.GetScriptInfo()->CountCompChg() &&
lcl_IsMonoSpaceFont( rInf.GetOut() );
- ASSERT( !bCompress || ( rInf.GetScriptInfo() && rInf.GetScriptInfo()->
+ OSL_ENSURE( !bCompress || ( rInf.GetScriptInfo() && rInf.GetScriptInfo()->
CountCompChg()), "Compression without info" );
sal_uInt16 nTxtBreak = 0;
@@ -2738,3 +2649,4 @@ sal_Bool SwDrawTextInfo::ApplyAutoColor( Font* pFont )
return sal_False;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index 69426bcffa34..8a40614a3d93 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,21 +32,13 @@
#include <hintids.hxx>
#include <editeng/cmapitem.hxx>
+#include <editeng/svxfont.hxx>
-#ifndef _OUTDEV_HXX //autogen
#include <vcl/outdev.hxx>
-#endif
-#ifndef _COM_SUN_STAR_I18N_CHARTYPE_HDL
#include <com/sun/star/i18n/CharType.hdl>
-#endif
-#ifndef _COM_SUN_STAR_I18N_WORDTYPE_HDL
#include <com/sun/star/i18n/WordType.hdl>
-#endif
-#ifndef _PRINT_HXX //autogen
#include <vcl/print.hxx>
-#endif
-#include <errhdl.hxx>
#include <fntcache.hxx>
#include <swfont.hxx>
#include <breakit.hxx>
@@ -54,9 +47,6 @@
using namespace ::com::sun::star::i18n;
-
-#define KAPITAELCHENPROP 66
-
/*************************************************************************
* class SwCapitalInfo
*
@@ -95,7 +85,7 @@ xub_StrLen lcl_CalcCaseMap( const SwFont& rFnt,
{
int j = 0;
const xub_StrLen nEnd = nOfst + nLen;
- ASSERT( nEnd <= rOrigString.Len(), "lcl_CalcCaseMap: Wrong parameters" )
+ OSL_ENSURE( nEnd <= rOrigString.Len(), "lcl_CalcCaseMap: Wrong parameters" );
// special case for title case:
const bool bTitle = SVX_CASEMAP_TITEL == rFnt.GetCaseMap() &&
@@ -298,7 +288,7 @@ protected:
SwFntObj *pLowerFnt;
public:
SwDoDrawCapital( SwDrawTextInfo &rInfo ) :
- SwDoCapitals( rInfo )
+ SwDoCapitals( rInfo ), pUpperFnt(0), pLowerFnt(0)
{ }
virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont );
virtual void Do();
@@ -326,7 +316,7 @@ void SwDoDrawCapital::Do()
rInf.SetBullet( bOldBullet );
}
- ASSERT( pUpperFnt, "No upper font, dying soon!");
+ OSL_ENSURE( pUpperFnt, "No upper font, dying soon!");
rInf.Shift( pUpperFnt->GetFont()->GetOrientation() );
rInf.SetWidth( nOrgWidth );
}
@@ -337,7 +327,7 @@ void SwDoDrawCapital::Do()
void SwDoDrawCapital::DrawSpace( Point &rPos )
{
- static sal_Char __READONLY_DATA sDoubleSpace[] = " ";
+ static sal_Char const sDoubleSpace[] = " ";
long nDiff = rInf.GetPos().X() - rPos.X();
@@ -396,7 +386,7 @@ protected:
sal_uInt16 nOfst;
public:
SwDoCapitalCrsrOfst( SwDrawTextInfo &rInfo, const sal_uInt16 nOfs ) :
- SwDoCapitals( rInfo ), nCrsr( 0 ), nOfst( nOfs )
+ SwDoCapitals( rInfo ), pUpperFnt(0), pLowerFnt(0), nCrsr( 0 ), nOfst( nOfs )
{ }
virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont );
virtual void Do();
@@ -564,7 +554,7 @@ void SwSubFont::DrawStretchCapital( SwDrawTextInfo &rInf )
void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
{
- ASSERT( pLastFont, "SwFont::DoOnCapitals: No LastFont?!" );
+ OSL_ENSURE( pLastFont, "SwFont::DoOnCapitals: No LastFont?!" );
Size aPartSize;
long nKana = 0;
@@ -633,7 +623,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
pBigFont = pLastFont;
// Hier entsteht der Kleinbuchstabenfont:
- aFont.SetProportion( sal_uInt8( (aFont.GetPropr()*KAPITAELCHENPROP) / 100L) );
+ aFont.SetProportion( sal_uInt8 (aFont.GetPropr() * SMALL_CAPS_PERCENTAGE ) / 100L);
pMagic2 = NULL;
nIndex2 = 0;
SwFntAccess *pSmallFontAccess = new SwFntAccess( pMagic2, nIndex2, &aFont,
@@ -703,8 +693,8 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
pBreakIt->GetLocale( eLng ), CharType::LOWERCASE_LETTER);
if( nPos == STRING_LEN || nPos > nMaxPos )
nPos = nMaxPos;
- ASSERT( nPos, "nextCharBlock not implemented?" );
-#ifdef DBG_UTIL
+ OSL_ENSURE( nPos, "nextCharBlock not implemented?" );
+#if OSL_DEBUG_LEVEL > 1
if( !nPos )
nPos = nMaxPos;
#endif
@@ -817,8 +807,8 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
pBreakIt->GetLocale( eLng ), CharType::LOWERCASE_LETTER);
if( nPos == STRING_LEN || nPos > nMaxPos )
nPos = nMaxPos;
- ASSERT( nPos, "endOfCharBlock not implemented?" );
-#ifdef DBG_UTIL
+ OSL_ENSURE( nPos, "endOfCharBlock not implemented?" );
+#if OSL_DEBUG_LEVEL > 1
if( !nPos )
nPos = nMaxPos;
#endif
@@ -853,3 +843,4 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx
index 723c12bddbdc..8d4940b1ec67 100644
--- a/sw/source/core/txtnode/modeltoviewhelper.cxx
+++ b/sw/source/core/txtnode/modeltoviewhelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118,3 +119,5 @@ ModelPosition ConvertToModelPosition( const ConversionMap* pMap, sal_uInt32 nVie
}
} // namespace ModelToViewStringConverter end
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index 70cd84706ca8..d0e0974f2ed0 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,13 +29,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "txatbase.hxx"
#include "ndhints.hxx"
#include <txtatr.hxx>
-#ifndef PRODUCT
+#if OSL_DEBUG_LEVEL > 1
#include <pam.hxx>
#endif
@@ -42,40 +41,7 @@
_SV_IMPL_SORTAR_ALG( SwpHtStart, SwTxtAttr* )
_SV_IMPL_SORTAR_ALG( SwpHtEnd, SwTxtAttr* )
-#ifdef NIE
-
-void DumpHints( const SwpHtStart &rHtStart,
- const SwpHtEnd &rHtEnd )
-{
-#ifdef DBG_UTIL
- aDbstream << "DumpHints:" << endl;
- (aDbstream << "\tStarts:" ).WriteNumber(rHtStart.Count()) << endl;
- for( sal_uInt16 i = 0; i < rHtStart.Count(); ++i )
- {
- const SwTxtAttr *pHt = rHtStart[i];
- ((((aDbstream << '\t').WriteNumber( i )<< " [").WriteNumber( pHt->Which() )
- << ']' << '\t').WriteNumber( long( pHt ) )
- << '\t').WriteNumber( *pHt->GetStart() );
- if( pHt->GetEnd() )
- (aDbstream << " -> " ).WriteNumber( *pHt->GetEnd() );
- aDbstream << endl;
- }
- (aDbstream << "\tEnds:").WriteNumber( rHtEnd.Count() )<< endl;
- for( i = 0; i < rHtEnd.Count(); ++i )
- {
- const SwTxtAttr *pHt = rHtEnd[i];
- (((aDbstream << '\t').WriteNumber( i )<< " [").WriteNumber( pHt->Which() )
- << ']' << '\t' ).WriteNumber( long( pHt ) );
- if( pHt->GetEnd() )
- (aDbstream << '\t').WriteNumber( *pHt->GetEnd() )<< " <- ";
- aDbstream.WriteNumber( *pHt->GetStart() )<< endl;
- }
- aDbstream << endl;
-#endif
-}
-#else
inline void DumpHints(const SwpHtStart &, const SwpHtEnd &) { }
-#endif
/*************************************************************************
* inline IsEqual()
@@ -113,7 +79,7 @@ static sal_Bool lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
{
const sal_uInt16 nS1 = static_cast<const SwTxtCharFmt&>(rHt1).GetSortNumber();
const sal_uInt16 nS2 = static_cast<const SwTxtCharFmt&>(rHt2).GetSortNumber();
- ASSERT( nS1 != nS2, "AUTOSTYLES: lcl_IsLessStart trouble" )
+ OSL_ENSURE( nS1 != nS2, "AUTOSTYLES: lcl_IsLessStart trouble" );
if ( nS1 != nS2 ) // robust
return nS1 < nS2;
}
@@ -149,7 +115,7 @@ static sal_Bool lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
{
const sal_uInt16 nS1 = static_cast<const SwTxtCharFmt&>(rHt1).GetSortNumber();
const sal_uInt16 nS2 = static_cast<const SwTxtCharFmt&>(rHt2).GetSortNumber();
- ASSERT( nS1 != nS2, "AUTOSTYLES: lcl_IsLessEnd trouble" )
+ OSL_ENSURE( nS1 != nS2, "AUTOSTYLES: lcl_IsLessEnd trouble" );
if ( nS1 != nS2 ) // robust
return nS1 > nS2;
}
@@ -244,21 +210,15 @@ sal_Bool SwpHtEnd::Seek_Entry( const SwTxtAttr *pElement, sal_uInt16 *pPos ) con
void SwpHintsArray::Insert( const SwTxtAttr *pHt )
{
Resort();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uInt16 nPos;
- ASSERT(!m_HintStarts.Seek_Entry( pHt, &nPos ),
+ OSL_ENSURE(!m_HintStarts.Seek_Entry( pHt, &nPos ),
"Insert: hint already in HtStart");
- ASSERT(!m_HintEnds.Seek_Entry( pHt, &nPos ),
+ OSL_ENSURE(!m_HintEnds.Seek_Entry( pHt, &nPos ),
"Insert: hint already in HtEnd");
#endif
m_HintStarts.Insert( pHt );
m_HintEnds.Insert( pHt );
-#ifdef DBG_UTIL
-#ifdef NIE
- (aDbstream << "Insert: " ).WriteNumber( long( pHt ) ) << endl;
- DumpHints( m_HintStarts, m_HintEnds );
-#endif
-#endif
}
void SwpHintsArray::DeleteAtPos( const sal_uInt16 nPos )
@@ -272,15 +232,9 @@ void SwpHintsArray::DeleteAtPos( const sal_uInt16 nPos )
sal_uInt16 nEndPos;
m_HintEnds.Seek_Entry( pHt, &nEndPos );
m_HintEnds.Remove( nEndPos );
-#ifdef DBG_UTIL
-#ifdef NIE
- (aDbstream << "DeleteAtPos: " ).WriteNumber( long( pHt ) ) << endl;
- DumpHints( m_HintStarts, m_HintEnds );
-#endif
-#endif
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
/*************************************************************************
* SwpHintsArray::Check()
@@ -290,7 +244,7 @@ void SwpHintsArray::DeleteAtPos( const sal_uInt16 nPos )
#define CHECK_ERR(cond, text) \
if(!(cond)) \
{ \
- ASSERT(!this, text); \
+ OSL_ENSURE(!this, text); \
DumpHints(m_HintStarts, m_HintEnds); \
return !(const_cast<SwpHintsArray*>(this))->Resort(); \
}
@@ -368,7 +322,6 @@ bool SwpHintsArray::Check() const
"HintsCheck: Character attribute in end array" );
// 8) style portion check
-#if OSL_DEBUG_LEVEL > 1
const SwTxtAttr* pHtThis = m_HintStarts[i];
const SwTxtAttr* pHtLast = i > 0 ? m_HintStarts[i-1] : 0;
CHECK_ERR( 0 == i ||
@@ -418,7 +371,6 @@ bool SwpHintsArray::Check() const
}
}
}
-#endif
}
return true;
}
@@ -445,13 +397,6 @@ bool SwpHintsArray::Resort()
const SwTxtAttr *pHt = m_HintStarts[i];
if( pLast && !lcl_IsLessStart( *pLast, *pHt ) )
{
-#ifdef NIE
-#ifdef DBG_UTIL
-// ASSERT( bResort, "!Resort/Start: correcting hints-array" );
- aDbstream << "Resort: Starts" << endl;
- DumpHints( m_HintStarts, m_HintEnds );
-#endif
-#endif
m_HintStarts.Remove( i );
m_HintStarts.Insert( pHt );
pHt = m_HintStarts[i];
@@ -468,12 +413,6 @@ bool SwpHintsArray::Resort()
const SwTxtAttr *pHt = m_HintEnds[i];
if( pLast && !lcl_IsLessEnd( *pLast, *pHt ) )
{
-#ifdef NIE
-#ifdef DBG_UTIL
- aDbstream << "Resort: Ends" << endl;
- DumpHints( m_HintStarts, m_HintEnds );
-#endif
-#endif
m_HintEnds.Remove( i );
m_HintEnds.Insert( pHt );
pHt = m_HintEnds[i]; // normalerweise == pLast
@@ -485,13 +424,8 @@ bool SwpHintsArray::Resort()
}
pLast = pHt;
}
-#ifdef DBG_UTIL
-#ifdef NIE
- aDbstream << "Resorted:" << endl;
- DumpHints( m_HintStarts, m_HintEnds );
-#endif
-#endif
return bResort;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 9a2767977d84..18a7b8094633 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,9 +35,7 @@
#include <editeng/brkitem.hxx>
#include <editeng/escpitem.hxx>
#include <editeng/lrspitem.hxx>
-// --> OD 2008-01-17 #newlistlevelattrs#
#include <editeng/tstpitem.hxx>
-// <--
#include <svl/urihelper.hxx>
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_ULONGS
@@ -68,7 +67,6 @@
#include <docary.hxx>
#include <pam.hxx> // fuer SwPosition
#include <fldbas.hxx>
-#include <errhdl.hxx>
#include <paratr.hxx>
#include <txtfrm.hxx>
#include <ftnfrm.hxx>
@@ -89,16 +87,11 @@
#include <SwStyleNameMapper.hxx>
#include <numrule.hxx>
-//--> #outlinelevel added by zhaojianwei
-#include <svl/intitem.hxx>
-//<--end
#include <swtable.hxx>
#include <docsh.hxx>
#include <SwNodeNum.hxx>
-// --> OD 2008-02-25 #refactorlists#
#include <svl/intitem.hxx>
#include <list.hxx>
-// <--
using namespace ::com::sun::star;
@@ -113,7 +106,7 @@ SV_DECL_PTRARR(SwpHts,SwTxtAttr*,1,1)
// Leider ist das SwpHints nicht ganz wasserdicht:
// Jeder darf an den Hints rumfummeln, ohne die Sortierreihenfolge
// und Verkettung sicherstellen zu muessen.
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
#define CHECK_SWPHINTS(pNd) { if( pNd->GetpSwpHints() && \
!pNd->GetDoc()->IsInReading() ) \
pNd->GetpSwpHints()->Check(); }
@@ -125,30 +118,20 @@ SwTxtNode *SwNodes::MakeTxtNode( const SwNodeIndex & rWhere,
SwTxtFmtColl *pColl,
SwAttrSet* pAutoAttr )
{
- ASSERT( pColl, "Collectionpointer ist 0." );
+ OSL_ENSURE( pColl, "Collectionpointer ist 0." );
SwTxtNode *pNode = new SwTxtNode( rWhere, pColl, pAutoAttr );
SwNodeIndex aIdx( *pNode );
- // --> OD 2005-11-03 #125329#
+ // #125329#
// call method <UpdateOutlineNode(..)> only for the document nodes array
if ( IsDocNodes() )
{
- //if ( pColl && NO_NUMBERING != pColl->GetOutlineLevel() ) //#outline level,removed by zhaojianwei
- //{
- // UpdateOutlineNode( *pNode, NO_NUMBERING, pColl->GetOutlineLevel() );
- //}
-// if ( pColl && 0 != pColl->GetAttrOutlineLevel() )//#outline level,added by zhaojianwei
-// {
-// UpdateOutlineNode( *pNode, 0, pColl->GetAttrOutlineLevel() );
-// }//<--end
-// else
{
UpdateOutlineNode(*pNode);
}
}
- // <--
//Wenn es noch kein Layout gibt oder in einer versteckten Section
// stehen, brauchen wir uns um das MakeFrms nicht bemuehen.
@@ -236,13 +219,10 @@ SwTxtNode::SwTxtNode( const SwNodeIndex &rWhere,
mpNodeNum( 0 ),
m_bLastOutlineState( false ),
m_bNotifiable( false ),
- // --> OD 2008-11-19 #i70748#
+ // #i70748#
mbEmptyListStyleSetDueToSetOutlineLevelAttr( false ),
- // <--
- // --> OD 2008-05-06 #refactorlists#
mbInSetOrResetAttr( false ),
mpList( 0 )
- // <--
{
InitSwParaStatistics( true );
@@ -250,11 +230,9 @@ SwTxtNode::SwTxtNode( const SwNodeIndex &rWhere,
if( pAutoAttr )
SetAttr( *pAutoAttr );
- // --> OD 2008-03-13 #refactorlists# - no longed needed
-// SyncNumberAndNumRule();
if ( !IsInList() && GetNumRule() && GetListId().Len() > 0 )
{
- // --> OD 2009-08-27 #i101516#
+ // #i101516#
// apply paragraph style's assigned outline style list level as
// list level of the paragraph, if it has none set already.
if ( !HasAttrListLevel() &&
@@ -262,10 +240,8 @@ SwTxtNode::SwTxtNode( const SwNodeIndex &rWhere,
{
SetAttrListLevel( pTxtColl->GetAssignedOutlineStyleLevel() );
}
- // <--
AddToList();
}
- // <--
GetNodes().UpdateOutlineNode(*this);
m_bNotifiable = true;
@@ -292,15 +268,7 @@ SwTxtNode::~SwTxtNode()
delete pTmpHints;
}
- // --> OD 2008-03-13 #refactorlists#
-// if ( mpNodeNum )
-// {
-// mpNodeNum->RemoveMe();
-// delete mpNodeNum;
-// mpNodeNum = 0L;
-// }
RemoveFromList();
- // <--
InitSwParaStatistics( false );
}
@@ -346,7 +314,7 @@ void lcl_ChangeFtnRef( SwTxtNode &rNode )
return;
}
SwTxtFtn *pAttr = (SwTxtFtn*)pHt;
- ASSERT( pAttr->GetStartNode(), "FtnAtr ohne StartNode." );
+ OSL_ENSURE( pAttr->GetStartNode(), "FtnAtr ohne StartNode." );
SwNodeIndex aIdx( *pAttr->GetStartNode(), 1 );
SwCntntNode *pNd = aIdx.GetNode().GetCntntNode();
if ( !pNd )
@@ -358,14 +326,14 @@ void lcl_ChangeFtnRef( SwTxtNode &rNode )
SwCntntFrm* pCntnt = (SwCntntFrm*)aIter.First(TYPE(SwCntntFrm));
if( pCntnt )
{
- ASSERT( pCntnt->FindRootFrm() == pFrm->FindRootFrm(),
+ OSL_ENSURE( pCntnt->FindRootFrm() == pFrm->FindRootFrm(),
"lcl_ChangeFtnRef: Layout double?" );
SwFtnFrm *pFtn = pCntnt->FindFtnFrm();
if( pFtn && pFtn->GetAttr() == pAttr )
{
while( pFtn->GetMaster() )
pFtn = pFtn->GetMaster();
- // OD 07.11.2002 #104840# - remember footnote frame
+ // #104840# - remember footnote frame
pFirstFtnOfNode = pFtn;
while ( pFtn )
{
@@ -374,18 +342,18 @@ void lcl_ChangeFtnRef( SwTxtNode &rNode )
((SwTxtFrm*)pFrm)->SetFtn( sal_True );
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
while( 0 != (pCntnt = (SwCntntFrm*)aIter.Next()) )
{
SwFtnFrm *pDbgFtn = pCntnt->FindFtnFrm();
- ASSERT( !pDbgFtn || pDbgFtn->GetRef() == pFrm,
+ OSL_ENSURE( !pDbgFtn || pDbgFtn->GetRef() == pFrm,
"lcl_ChangeFtnRef: Who's that guy?" );
}
#endif
}
}
} // end of for-loop on <SwpHints>
- // OD 08.11.2002 #104840# - invalidate
+ // #104840# - invalidate
if ( pFirstFtnOfNode )
{
SwCntntFrm* pCntnt = pFirstFtnOfNode->ContainsCntnt();
@@ -399,6 +367,8 @@ void lcl_ChangeFtnRef( SwTxtNode &rNode )
SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
{
+ bool parentIsOutline = IsOutline();
+
// lege den Node "vor" mir an
const xub_StrLen nSplitPos = rPos.nContent.GetIndex();
const xub_StrLen nTxtLen = m_Text.Len();
@@ -417,24 +387,14 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
}
}
- // --> OD 2008-03-27 #refactorlists#
-// // --> OD 2007-07-09 #i77372#
-// // reset numbering attribute at current node, only if it is numbered.
-// if ( GetNumRule() != NULL )
-// {
-// SetRestart(false);
-// SetStart(1);
-// SetCounted(true);
-// }
ResetAttr( RES_PARATR_LIST_ISRESTART );
ResetAttr( RES_PARATR_LIST_RESTARTVALUE );
ResetAttr( RES_PARATR_LIST_ISCOUNTED );
- if ( GetNumRule() == 0 )
+ if ( GetNumRule() == 0 || (parentIsOutline && !IsOutline()) )
{
ResetAttr( RES_PARATR_LIST_ID );
ResetAttr( RES_PARATR_LIST_LEVEL );
}
- // <--
if ( GetDepends() && m_Text.Len() && (nTxtLen / 2) < nSplitPos )
{
@@ -651,7 +611,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
void SwTxtNode::MoveTxtAttr_To_AttrSet()
{
- ASSERT( m_pSwpHints, "MoveTxtAttr_To_AttrSet without SwpHints?" );
+ OSL_ENSURE( m_pSwpHints, "MoveTxtAttr_To_AttrSet without SwpHints?" );
for ( sal_uInt16 i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
{
SwTxtAttr *pHt = m_pSwpHints->GetTextHint(i);
@@ -767,7 +727,7 @@ SwCntntNode *SwTxtNode::JoinNext()
InvalidateNumRule();
}
else {
- ASSERT( sal_False, "kein TxtNode." );
+ OSL_ENSURE( sal_False, "kein TxtNode." );
}
return this;
@@ -862,7 +822,7 @@ SwCntntNode *SwTxtNode::JoinPrev()
InvalidateNumRule();
}
else {
- ASSERT( sal_False, "kein TxtNode." );
+ OSL_ENSURE( sal_False, "kein TxtNode." );
}
return this;
@@ -871,7 +831,7 @@ SwCntntNode *SwTxtNode::JoinPrev()
// erzeugt einen AttrSet mit Bereichen fuer Frame-/Para/Char-Attributen
void SwTxtNode::NewAttrSet( SwAttrPool& rPool )
{
- ASSERT( !mpAttrSet.get(), "AttrSet ist doch gesetzt" );
+ OSL_ENSURE( !mpAttrSet.get(), "AttrSet ist doch gesetzt" );
SwAttrSet aNewAttrSet( rPool, aTxtNodeSetRange );
// put names of parent style and conditional style:
@@ -974,7 +934,7 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
sal_uInt16 nWhPos;
const sal_uInt16 nWhich = pHint->Which();
- ASSERT(!isCHRATR(nWhich), "Update: char attr hint?");
+ OSL_ENSURE(!isCHRATR(nWhich), "Update: char attr hint?");
if (isCHRATR(nWhich) || isTXTATR_WITHEND(nWhich))
{
nWhPos = static_cast<sal_uInt16>(nWhich -
@@ -1121,18 +1081,15 @@ void SwTxtNode::_ChgTxtCollUpdateNum( const SwTxtFmtColl *pOldColl,
const SwTxtFmtColl *pNewColl)
{
SwDoc* pDoc = GetDoc();
- ASSERT( pDoc, "Kein Doc?" );
+ OSL_ENSURE( pDoc, "Kein Doc?" );
// erfrage die OutlineLevel und update gegebenenfalls das Nodes-Array,
// falls sich die Level geaendert haben !
- //const sal_uInt8 nOldLevel = pOldColl ? pOldColl->GetOutlineLevel():NO_NUMBERING;//#outline level,removed by zhaojianwei
- //const sal_uInt8 nNewLevel = pNewColl ? pNewColl->GetOutlineLevel():NO_NUMBERING;//<-end,zhaojianwei
const int nOldLevel = pOldColl && pOldColl->IsAssignedToListLevelOfOutlineStyle() ?
pOldColl->GetAssignedOutlineStyleLevel() : MAXLEVEL;
const int nNewLevel = pNewColl && pNewColl->IsAssignedToListLevelOfOutlineStyle() ?
pNewColl->GetAssignedOutlineStyleLevel() : MAXLEVEL;
-// if ( NO_NUMBERING != nNewLevel ) //#outline level,zhaojianwei
- if ( MAXLEVEL != nNewLevel ) //<-end,zhaojianwei
+ if ( MAXLEVEL != nNewLevel )
{
SetAttrListLevel(nNewLevel);
}
@@ -1154,14 +1111,11 @@ void SwTxtNode::_ChgTxtCollUpdateNum( const SwTxtFmtColl *pOldColl,
pDoc->GetFtnIdxs().UpdateFtn( aTmpIndex);
}
-//FEATURE::CONDCOLL
- if( /*pOldColl != pNewColl && pNewColl && */
- RES_CONDTXTFMTCOLL == pNewColl->Which() )
+ if( RES_CONDTXTFMTCOLL == pNewColl->Which() )
{
// Erfrage die akt. Condition des TextNodes:
ChkCondColl();
}
-//FEATURE::CONDCOLL
}
// Wenn man sich genau am Ende einer Text- bzw. INetvorlage befindet,
@@ -1250,7 +1204,7 @@ lcl_GetTxtAttrs(
}
xub_StrLen const*const pEndIdx = pHint->GetEnd();
- ASSERT(pEndIdx || pHint->HasDummyChar(),
+ OSL_ENSURE(pEndIdx || pHint->HasDummyChar(),
"hint with no end and no dummy char?");
// Wenn bExpand gesetzt ist, wird das Verhalten bei Eingabe
// simuliert, d.h. der Start wuede verschoben, das Ende expandiert,
@@ -1293,7 +1247,7 @@ SwTxtAttr *
SwTxtNode::GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich,
enum GetTxtAttrMode const eMode) const
{
- ASSERT( (nWhich == RES_TXTATR_META)
+ OSL_ENSURE( (nWhich == RES_TXTATR_META)
|| (nWhich == RES_TXTATR_METAFIELD)
|| (nWhich == RES_TXTATR_AUTOFMT)
|| (nWhich == RES_TXTATR_INETFMT)
@@ -1329,12 +1283,12 @@ SwCharFmt* lcl_FindCharFmt( const SwCharFmts* pCharFmts, const XubString& rName
void lcl_CopyHint( const sal_uInt16 nWhich, const SwTxtAttr * const pHt,
SwTxtAttr *const pNewHt, SwDoc *const pOtherDoc, SwTxtNode *const pDest )
{
- ASSERT( nWhich == pHt->Which(), "Falsche Hint-Id" );
+ OSL_ENSURE( nWhich == pHt->Which(), "Falsche Hint-Id" );
switch( nWhich )
{
// copy nodesarray section with footnote content
case RES_TXTATR_FTN :
- ASSERT(pDest, "lcl_CopyHint: no destination text node?");
+ OSL_ENSURE(pDest, "lcl_CopyHint: no destination text node?");
static_cast<const SwTxtFtn*>(pHt)->CopyFtn(
*static_cast<SwTxtFtn*>(pNewHt), *pDest);
break;
@@ -1435,8 +1389,8 @@ void lcl_CopyHint( const sal_uInt16 nWhich, const SwTxtAttr * const pHt,
}
case RES_TXTATR_META:
case RES_TXTATR_METAFIELD:
- ASSERT(pNewHt, "copying META should not fail! cannot call DoCopy");
- ASSERT(pDest && (CH_TXTATR_INWORD ==
+ OSL_ENSURE(pNewHt, "copying META should not fail! cannot call DoCopy");
+ OSL_ENSURE(pDest && (CH_TXTATR_INWORD ==
pDest->GetTxt().GetChar(*pNewHt->GetStart())),
"missing CH_TXTATR?");
if (pNewHt)
@@ -1526,7 +1480,6 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
SwIndex aIdx( pDest, pDest->m_Text.Len() );
CopyText( pDest, aIdx, rStart, nLen, bForceCopyOfAllAttrs );
}
-// <--
// --> OD 2008-11-18 #i96213#
// introduction of new optional parameter to control, if all attributes have to be copied.
@@ -1535,7 +1488,6 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
const SwIndex &rStart,
xub_StrLen nLen,
const bool bForceCopyOfAllAttrs )
-// <--
{
xub_StrLen nTxtStartIdx = rStart.GetIndex();
xub_StrLen nDestStart = rDestStart.GetIndex(); // alte Pos merken
@@ -1780,8 +1732,8 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
void SwTxtNode::InsertText( const XubString & rStr, const SwIndex & rIdx,
const IDocumentContentOperations::InsertFlags nMode )
{
- ASSERT( rIdx <= m_Text.Len(), "SwTxtNode::InsertText: invalid index." );
- ASSERT( (sal_uLong)m_Text.Len() + (sal_uLong)rStr.Len() <= STRING_LEN,
+ OSL_ENSURE( rIdx <= m_Text.Len(), "SwTxtNode::InsertText: invalid index." );
+ OSL_ENSURE( (sal_uLong)m_Text.Len() + (sal_uLong)rStr.Len() <= STRING_LEN,
"SwTxtNode::InsertText: node text with insertion > STRING_LEN." );
xub_StrLen aPos = rIdx.GetIndex();
@@ -1881,8 +1833,6 @@ void SwTxtNode::InsertText( const XubString & rStr, const SwIndex & rIdx,
|* SwTxtNode::Cut()
|*
|* Beschreibung text.doc
-|* Ersterstellung VB 20.03.91
-|* Letzte Aenderung JP 11.08.94
|*
*************************************************************************/
@@ -1896,7 +1846,7 @@ void SwTxtNode::CutText( SwTxtNode * const pDest,
}
else
{
- ASSERT(false,
+ OSL_ENSURE(false,
"mst: entering dead and bitrotted code; fasten your seatbelts!");
EraseText( rStart, nLen );
}
@@ -1904,11 +1854,11 @@ void SwTxtNode::CutText( SwTxtNode * const pDest,
void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
- const SwIndex & rStart, /*const*/ xub_StrLen nLen, const bool bUpdate )
+ const SwIndex & rStart, xub_StrLen nLen, const bool bUpdate )
{
if(!pDest)
{
- ASSERT(false,
+ OSL_ENSURE(false,
"mst: entering dead and bitrotted code; fasten your seatbelts!");
EraseText( rStart, nLen );
return;
@@ -1917,7 +1867,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
// nicht im Dokument verschieben ?
if( GetDoc() != pDest->GetDoc() )
{
- ASSERT(false,
+ OSL_ENSURE(false,
"mst: entering dead and bitrotted code; fasten your seatbelts!");
CopyText( pDest, rDestStart, rStart, nLen);
EraseText(rStart, nLen);
@@ -1939,7 +1889,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
// wird in sich selbst verschoben, muss es gesondert behandelt werden !!
if( pDest == this )
{
- ASSERT(false,
+ OSL_ENSURE(false,
"mst: entering dead and bitrotted code; fasten your seatbelts!");
m_Text.Insert( m_Text, nTxtStartIdx, nLen, nDestStart );
m_Text.Erase( nTxtStartIdx + (nDestStart<nTxtStartIdx ? nLen : 0), nLen );
@@ -2018,24 +1968,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
// Update aller Indizies
Update( rDestStart, nLen, sal_False, sal_True );
}
-#ifdef CUTNOEXPAND
- else
- // wird am Ende eingefuegt, nur die Attribut-Indizies verschieben
- if ( 0 < nLen && 0 < nInitSize && m_pSwpHints )
- {
- // check if there was the end of an attribute at the insertion
- // position: if it is not a field, it must be expanded
- for ( sal_uInt16 n = 0; n < m_pSwpHints->Count(); n++ )
- {
- SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(n);
- const xub_StrLen * const pEndIdx = pHt->GetEnd();
- if ( pEndIdx && (*pEndIdx == nInitSize) )
- {
- *pEndIdx = *pEndIdx + nLen;
- }
- }
- }
-#endif
+
CHECK_SWPHINTS(this);
Update( rStart, nLen, sal_True, sal_True );
@@ -2077,24 +2010,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
// Update aller Indizies
pDest->Update( rDestStart, nLen, sal_False, sal_True);
}
-#ifdef CUTNOEXPAND
- else
- // wird am Ende eingefuegt, nur die Attribut-Indizies verschieben
- if ( 0 < nLen && 0 < nInitSize && pDest->m_pSwpHints )
- {
- // check if there was the end of an attribute at the insertion
- // position: if it is not a field, it must be expanded
- for ( sal_uInt16 n = 0; n < pDest->m_pSwpHints->Count(); n++ )
- {
- SwTxtAttr * const pHt = pDest->m_pSwpHints->GetTextHint(n);
- const xub_StrLen * const pEndIdx = pHt->GetEnd();
- if ( pEndIdx && (*pEndIdx == nInitSize) )
- {
- *pEndIdx = *pEndIdx + nLen;
- }
- }
- }
-#endif
+
CHECK_SWPHINTS(pDest);
const xub_StrLen nEnd = rStart.GetIndex() + nLen;
@@ -2103,7 +2019,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
bool const bUndoNodes = !pOtherDoc
&& GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(GetNodes());
- ASSERT(!pOtherDoc,
+ OSL_ENSURE(!pOtherDoc,
"mst: entering dead and bitrotted code; fasten your seatbelts!");
// harte Absatz umspannende Attribute kopieren
@@ -2269,7 +2185,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
const IDocumentContentOperations::InsertFlags nMode )
{
- ASSERT( rIdx <= m_Text.Len(), "SwTxtNode::EraseText: invalid index." );
+ OSL_ENSURE( rIdx <= m_Text.Len(), "SwTxtNode::EraseText: invalid index." );
const xub_StrLen nStartIdx = rIdx.GetIndex();
const xub_StrLen nCnt = (STRING_LEN == nCount)
@@ -2299,7 +2215,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
if( !pHtEndIdx )
{
- ASSERT(pHt->HasDummyChar(),
+ OSL_ENSURE(pHt->HasDummyChar(),
"attribute with neither end nor CH_TXTATR?");
if (isTXTATR(nWhich) &&
(nHintStart >= nStartIdx) && (nHintStart < nEndIdx))
@@ -2311,7 +2227,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
continue;
}
- ASSERT (!( (nHintStart < nEndIdx) && (*pHtEndIdx > nEndIdx)
+ OSL_ENSURE(!( (nHintStart < nEndIdx) && (*pHtEndIdx > nEndIdx)
&& pHt->HasDummyChar() )
// next line: deleting exactly dummy char: DeleteAttributes
|| ((nHintStart == nStartIdx) && (nHintStart + 1 == nEndIdx)),
@@ -2333,12 +2249,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
// treated just like toxmark and refmarks
(RES_TXTATR_CJK_RUBY == nWhich) ) )
// <--
-#if 0
- || ( (nHintStart == nStartIdx) &&
- (nHintStart + 1 == nEndIdx)&&
-#else // generalize this to left-overlapped dummy char hints (see ASSERT)
|| ( (nHintStart < nEndIdx) &&
-#endif
pHt->HasDummyChar() )
)
{
@@ -2348,7 +2259,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
}
}
- ASSERT(rIdx.GetIndex() == nStartIdx, "huh? start index has changed?");
+ OSL_ENSURE(rIdx.GetIndex() == nStartIdx, "huh? start index has changed?");
TryDeleteSwpHints();
@@ -2365,7 +2276,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
SwModify::Modify( 0, &aHint );
}
- ASSERT(rIdx.GetIndex() == nStartIdx, "huh? start index has changed?");
+ OSL_ENSURE(rIdx.GetIndex() == nStartIdx, "huh? start index has changed?");
// By deleting a character, the hidden flags
// at the TxtNode can become invalid:
@@ -2380,9 +2291,6 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
#*
#* Beschreibung
#* text.doc
-#*
-#* Datum : MS 28.11.90
-#* Update : VB 24.07.91
#***********************************************************************/
void SwTxtNode::GCAttr()
@@ -2463,84 +2371,7 @@ SwNumRule* SwTxtNode::_GetNumRule(sal_Bool bInParent) const
}
}
}
-
- // --> OD 2006-11-20 #i71764#
- // Document setting OUTLINE_LEVEL_YIELDS_OUTLINE_RULE has no influence
- // any more.
-// if ( !pRet &&
-// GetDoc()->get(IDocumentSettingAccess::OUTLINE_LEVEL_YIELDS_OUTLINE_RULE) &&
-// GetOutlineLevel() != NO_NUMBERING )
-// {
-// pRet = GetDoc()->GetOutlineNumRule();
-// }
- // <--
}
- // old code before tuning
-// // --> OD 2005-10-25 #126347#
-// // determine of numbering/bullet rule, which is set as a hard attribute
-// // at the text node
-// const SfxPoolItem* pItem( 0L );
-// if ( HasSwAttrSet() ) // does text node has hard attributes ?
-// {
-// if ( SFX_ITEM_SET !=
-// GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ) )
-// {
-// pItem = 0L;
-// }
-// // else: <pItem> contains the numbering/bullet attribute, which is
-// // hard set at the paragraph.
-
-// }
-// // <--
-// bool bNoNumRule = false;
-// if (pItem)
-// {
-// String sNumRuleName = static_cast<const SwNumRuleItem *>(pItem)->GetValue();
-// if (sNumRuleName.Len() > 0)
-// {
-// pRet = GetDoc()->FindNumRulePtr(sNumRuleName);
-// }
-// else // numbering is turned off by hard attribute
-// bNoNumRule = true;
-// }
-
-// if (! bNoNumRule)
-// {
-// if (! pRet && bInParent)
-// {
-// SwTxtFmtColl * pColl = GetTxtColl();
-
-// if (pColl)
-// {
-// const SwNumRuleItem & rItem = pColl->GetNumRule(sal_True);
-
-// pRet = const_cast<SwDoc *>(GetDoc())->
-// FindNumRulePtrWithPool(rItem.GetValue());
-// // --> OD 2005-10-13 #125993# - The outline numbering rule
-// // isn't allowed to be derived from a parent paragraph style
-// // to a derived one.
-// // Thus check, if the found outline numbering rule is directly
-// // set at the paragraph style <pColl>. If not, don't return
-// // the outline numbering rule.
-// if ( pRet && pRet == GetDoc()->GetOutlineNumRule() )
-// {
-// const SwNumRuleItem& rDirectItem = pColl->GetNumRule(sal_False);
-// SwNumRule* pNumRuleAtParaStyle = const_cast<SwDoc*>(GetDoc())->
-// FindNumRulePtrWithPool(rDirectItem.GetValue());
-// if ( !pNumRuleAtParaStyle )
-// {
-// pRet = 0L;
-// }
-// }
-// // <--
-// }
-// }
-
-// if (!pRet && GetDoc()->IsOutlineLevelYieldsOutlineRule() &&
-// GetOutlineLevel() != NO_NUMBERING)
-// pRet = GetDoc()->GetOutlineNumRule();
-// }
- // <--
return pRet;
}
@@ -2554,7 +2385,6 @@ SwNumRule* SwTxtNode::GetNumRule(sal_Bool bInParent) const
void SwTxtNode::NumRuleChgd()
{
- // --> OD 2008-04-04 #refactorlists#
if ( IsInList() )
{
SwNumRule* pNumRule = GetNumRule();
@@ -2563,7 +2393,6 @@ void SwTxtNode::NumRuleChgd()
mpNodeNum->ChangeNumRule( *pNumRule );
}
}
- // <--
if( IsInCache() )
{
@@ -2594,7 +2423,6 @@ sal_Bool SwTxtNode::IsNumbered() const
return bResult;
}
-// --> OD 2008-04-02 #refactorlists#
bool SwTxtNode::HasMarkedLabel() const
{
bool bResult = false;
@@ -2607,7 +2435,6 @@ bool SwTxtNode::HasMarkedLabel() const
return bResult;
}
-// <--
// <- #i27615#
SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, sal_Bool bNext,
@@ -2671,7 +2498,6 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, sal_Bool bNext,
// --> OD 2007-07-10 #i75353#
// No clear of hard set numbering rule at an outline paragraph at this point.
// Only if the paragraph style changes - see below.
-// aClearWhichIds.push_back( RES_PARATR_NUMRULE );
bClearHardSetNumRuleWhenFmtCollChanges = true;
// <--
}
@@ -2749,7 +2575,6 @@ SwCntntNode* SwTxtNode::AppendNode( const SwPosition & rPos )
SwNodeIndex aIdx( rPos.nNode, 1 );
SwTxtNode* pNew = _MakeNewTxtNode( aIdx, sal_True );
- // --> OD 2008-05-14 #refactorlists#
// reset list attributes at appended text node
pNew->ResetAttr( RES_PARATR_LIST_ISRESTART );
pNew->ResetAttr( RES_PARATR_LIST_RESTARTVALUE );
@@ -2759,14 +2584,11 @@ SwCntntNode* SwTxtNode::AppendNode( const SwPosition & rPos )
pNew->ResetAttr( RES_PARATR_LIST_ID );
pNew->ResetAttr( RES_PARATR_LIST_LEVEL );
}
- // <--
- // --> OD 2008-03-13 #refactorlists#
-// SyncNumberAndNumRule();
+
if ( !IsInList() && GetNumRule() && GetListId().Len() > 0 )
{
AddToList();
}
- // <--
if( GetDepends() )
MakeFrms( *pNew );
@@ -2870,7 +2692,7 @@ long SwTxtNode::GetLeftMarginWithNum( sal_Bool bTxtLeft ) const
if( pRule )
{
const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(GetActualListLevel()));
- // --> OD 2008-01-16 #newlistlevelattrs#
+
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nRet = rFmt.GetAbsLSpace();
@@ -2899,10 +2721,8 @@ long SwTxtNode::GetLeftMarginWithNum( sal_Bool bTxtLeft ) const
{
nRet = nRet + rFmt.GetFirstLineIndent();
}
- // <--
}
}
- // <--
}
return nRet;
@@ -2921,7 +2741,6 @@ sal_Bool SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
{
if ( IsCountedInList() )
{
- // --> OD 2008-01-16 #newlistlevelattrs#
const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(GetActualListLevel()));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -2945,7 +2764,6 @@ sal_Bool SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
rFLOffset = aItem.GetTxtFirstLineOfst();
}
}
- // <--
}
bRet = sal_True;
@@ -3001,7 +2819,6 @@ SwTwips SwTxtNode::GetAdditionalIndentForStartingNewList() const
return nAdditionalIndent;
}
-// <--
// --> OD 2008-12-02 #i96772#
void SwTxtNode::ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpaceItem ) const
@@ -3020,7 +2837,6 @@ void SwTxtNode::ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpac
}
}
}
-// <--
// --> OD 2008-07-01 #i91133#
long SwTxtNode::GetLeftMarginForTabCalculation() const
@@ -3048,7 +2864,6 @@ long SwTxtNode::GetLeftMarginForTabCalculation() const
return nLeftMarginForTabCalc;
}
-// <--
void SwTxtNode::Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
xub_StrLen nEndPos, sal_Bool bExpandFlds ) const
@@ -3158,7 +2973,6 @@ XubString SwTxtNode::GetExpandTxt( const xub_StrLen nIdx,
return aTxt;
}
-// <--
sal_Bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
xub_StrLen nIdx, xub_StrLen nLen, sal_Bool bWithNum,
@@ -3422,7 +3236,7 @@ XubString SwTxtNode::GetRedlineTxt( xub_StrLen nIdx, xub_StrLen nLen,
void SwTxtNode::ReplaceText( const SwIndex& rStart, const xub_StrLen nDelLen,
const XubString& rText )
{
- ASSERT( rStart.GetIndex() < m_Text.Len() &&
+ OSL_ENSURE( rStart.GetIndex() < m_Text.Len() &&
rStart.GetIndex() + nDelLen <= m_Text.Len(),
"SwTxtNode::ReplaceText: index out of bounds" );
const xub_StrLen nStartPos = rStart.GetIndex();
@@ -3436,7 +3250,7 @@ void SwTxtNode::ReplaceText( const SwIndex& rStart, const xub_StrLen nDelLen,
SwTxtAttr *const pHint = GetTxtAttrForCharAt( nPos );
if (pHint)
{
- ASSERT (!( pHint->GetEnd() && pHint->HasDummyChar()
+ OSL_ENSURE(!( pHint->GetEnd() && pHint->HasDummyChar()
&& (*pHint->GetStart() < nEndPos)
&& (*pHint->GetEnd() > nEndPos) ),
"ReplaceText: ERROR: "
@@ -3482,7 +3296,6 @@ void SwTxtNode::ReplaceText( const SwIndex& rStart, const xub_StrLen nDelLen,
SwModify::Modify( 0, &aHint );
}
-// --> OD 2008-03-27 #refactorlists#
namespace {
// Helper method for special handling of modified attributes at text node.
// The following is handled:
@@ -3510,19 +3323,14 @@ namespace {
bParagraphStyleChanged = true;
if( rTxtNode.GetNodes().IsDocNodes() )
{
- // --> OD 2008-12-17 #i70748#
- // The former list style set at the paragraph can not be
- // retrieved from the change set.
-// sOldNumRule =
-// dynamic_cast<const SwFmtChg*>(pOldValue)->pChangedFmt->GetNumRule().GetValue();
+ // #i70748#
const SwNumRule* pFormerNumRuleAtTxtNode =
rTxtNode.GetNum() ? rTxtNode.GetNum()->GetNumRule() : 0;
if ( pFormerNumRuleAtTxtNode )
{
sOldNumRule = pFormerNumRuleAtTxtNode->GetName();
}
- // <--
- // --> OD 2008-11-19 #i70748#
+ // #i70748#
if ( rTxtNode.IsEmptyListStyleDueToSetOutlineLevelAttr() )
{
const SwNumRuleItem& rNumRuleItem = rTxtNode.GetTxtColl()->GetNumRule();
@@ -3531,7 +3339,7 @@ namespace {
rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr();
}
}
- // <--
+
const SwNumRule* pNumRuleAtTxtNode = rTxtNode.GetNumRule();
if ( pNumRuleAtTxtNode )
{
@@ -3544,71 +3352,46 @@ namespace {
case RES_ATTRSET_CHG:
{
const SfxPoolItem* pItem = 0;
- // --> OD 2008-12-19 #i70748#
- // The former list style set at the paragraph can not be
- // retrieved from the change set.
-// if ( dynamic_cast<const SwAttrSetChg*>(pOldValue)->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ) ==
-// SFX_ITEM_SET )
-// {
-// sOldNumRule = dynamic_cast<const SwNumRuleItem*>(pItem)->GetValue();
-// }
+ // #i70748#
const SwNumRule* pFormerNumRuleAtTxtNode =
rTxtNode.GetNum() ? rTxtNode.GetNum()->GetNumRule() : 0;
if ( pFormerNumRuleAtTxtNode )
{
sOldNumRule = pFormerNumRuleAtTxtNode->GetName();
}
- // <--
+
if ( dynamic_cast<const SwAttrSetChg*>(pNewValue)->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ) ==
SFX_ITEM_SET )
{
- // --> OD 2008-11-19 #i70748#
+ // #i70748#
rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr();
- // <--
bNumRuleSet = true;
- // The new list style set at the paragraph can not be
- // retrieved from the change set.
-// sNumRule = dynamic_cast<const SwNumRuleItem*>(pItem)->GetValue();
- // <--
}
- // --> OD 2008-12-17 #i70748#
+ // #i70748#
// The new list style set at the paragraph.
const SwNumRule* pNumRuleAtTxtNode = rTxtNode.GetNumRule();
if ( pNumRuleAtTxtNode )
{
sNumRule = pNumRuleAtTxtNode->GetName();
}
- // <--
break;
}
case RES_PARATR_NUMRULE:
{
if ( rTxtNode.GetNodes().IsDocNodes() )
{
- // The former list style set at the paragraph can not be
- // retrieved from the change set.
-// if ( pOldValue )
-// {
-// sOldNumRule = dynamic_cast<const SwNumRuleItem*>(pOldValue)->GetValue();
-// }
const SwNumRule* pFormerNumRuleAtTxtNode =
rTxtNode.GetNum() ? rTxtNode.GetNum()->GetNumRule() : 0;
if ( pFormerNumRuleAtTxtNode )
{
sOldNumRule = pFormerNumRuleAtTxtNode->GetName();
}
- // <--
+
if ( pNewValue )
{
- // --> OD 2008-11-19 #i70748#
+ // #i70748#
rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr();
- // <--
bNumRuleSet = true;
- // --> OD 2008-12-17 #i70748#
- // The new list style set at the paragraph can not be
- // retrieved from the change set.
-// sNumRule = dynamic_cast<const SwNumRuleItem*>(pNewValue)->GetValue();
- // <--
}
// --> OD 2008-12-17 #i70748#
// The new list style set at the paragraph.
@@ -3617,7 +3400,6 @@ namespace {
{
sNumRule = pNumRuleAtTxtNode->GetName();
}
- // <--
}
break;
}
@@ -3643,7 +3425,6 @@ namespace {
rTxtNode.GetDoc()->ResetAttrs( aPam, sal_False,
&aResetAttrsArray,
false );
- // <--
}
}
else
@@ -3655,11 +3436,10 @@ namespace {
String::CreateFromAscii( SwNumRule::GetOutlineRuleName() ) )
{
// --> OD 2008-09-10 #i70748#
- ASSERT( rTxtNode.GetTxtColl()->IsAssignedToListLevelOfOutlineStyle(),
+ OSL_ENSURE( rTxtNode.GetTxtColl()->IsAssignedToListLevelOfOutlineStyle(),
"<HandleModifyAtTxtNode()> - text node with outline style, but its paragraph style is not assigned to outline style." );
int nNewListLevel =
rTxtNode.GetTxtColl()->GetAssignedOutlineStyleLevel();
- // <--
if ( 0 <= nNewListLevel && nNewListLevel < MAXLEVEL )
{
rTxtNode.SetAttrListLevel( nNewListLevel );
@@ -3699,11 +3479,9 @@ namespace {
{
rTxtNode.AddToList();
}
- // <--
}
// End of method <HandleModifyAtTxtNode>
}
-// <--
void SwTxtNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
{
@@ -3724,12 +3502,10 @@ void SwTxtNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
(SwTxtFmtColl*)((SwFmtChg*)pNewValue)->pChangedFmt );
}
- // --> OD 2008-03-27 #refactorlists#
if ( !mbInSetOrResetAttr )
{
HandleModifyAtTxtNode( *this, pOldValue, pNewValue );
}
- // <--
SwCntntNode::Modify( pOldValue, pNewValue );
@@ -3752,8 +3528,8 @@ void SwTxtNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
SwFmtColl* SwTxtNode::ChgFmtColl( SwFmtColl *pNewColl )
{
- ASSERT( pNewColl,"ChgFmtColl: Collectionpointer ist 0." );
- ASSERT( HAS_BASE( SwTxtFmtColl, pNewColl ),
+ OSL_ENSURE( pNewColl,"ChgFmtColl: Collectionpointer ist 0." );
+ OSL_ENSURE( HAS_BASE( SwTxtFmtColl, pNewColl ),
"ChgFmtColl: ist kein Text-Collectionpointer." );
SwTxtFmtColl *pOldColl = GetTxtColl();
@@ -3761,11 +3537,9 @@ SwFmtColl* SwTxtNode::ChgFmtColl( SwFmtColl *pNewColl )
{
SetCalcHiddenCharFlags();
SwCntntNode::ChgFmtColl( pNewColl );
- // --> OD 2008-03-27 #refactorlists#
-// NumRuleChgd();
#if OSL_DEBUG_LEVEL > 1
- ASSERT( !mbInSetOrResetAttr,
- "DEBUG ASSERTION - <SwTxtNode::ChgFmtColl(..)> called during <Set/ResetAttr(..)>" )
+ OSL_ENSURE( !mbInSetOrResetAttr,
+ "DEBUG OSL_ENSURE(ON - <SwTxtNode::ChgFmtColl(..)> called during <Set/ResetAttr(..)>" );
#endif
if ( !mbInSetOrResetAttr )
{
@@ -3773,7 +3547,6 @@ SwFmtColl* SwTxtNode::ChgFmtColl( SwFmtColl *pNewColl )
SwFmtChg aTmp2( pNewColl );
HandleModifyAtTxtNode( *this, &aTmp1, &aTmp2 );
}
- // <--
}
// nur wenn im normalen Nodes-Array
@@ -3791,9 +3564,7 @@ SwNodeNum* SwTxtNode::CreateNum() const
{
if ( !mpNodeNum )
{
- // --> OD 2008-02-19 #refactorlists#
mpNodeNum = new SwNodeNum( const_cast<SwTxtNode*>(this) );
- // <--
}
return mpNodeNum;
}
@@ -3815,8 +3586,7 @@ bool SwTxtNode::IsOutline() const
{
bool bResult = false;
- //if ( GetOutlineLevel() != NO_NUMBERING )//#outline level,removed by zhaojianwei
- if ( GetAttrOutlineLevel() > 0 ) //<-end,zhaojianwei
+ if ( GetAttrOutlineLevel() > 0 )
{
bResult = !IsInRedlines();
}
@@ -3849,7 +3619,7 @@ int SwTxtNode::GetAttrOutlineLevel() const
}
void SwTxtNode::SetAttrOutlineLevel(int nLevel)
{
- ASSERT( 0 <= nLevel && nLevel <= MAXLEVEL ,"SwTxtNode: Level Out Of Range" );//#outline level,zhaojianwei
+ OSL_ENSURE( 0 <= nLevel && nLevel <= MAXLEVEL ,"SwTxtNode: Level Out Of Range" );//#outline level,zhaojianwei
if ( 0 <= nLevel && nLevel <= MAXLEVEL )
{
SetAttr( SfxUInt16Item( RES_PARATR_OUTLINELEVEL,
@@ -3884,12 +3654,11 @@ void SwTxtNode::ResetEmptyListStyleDueToResetOutlineLevelAttr()
// <--
-// --> OD 2008-02-27 #refactorlists#
void SwTxtNode::SetAttrListLevel( int nLevel )
{
if ( nLevel < 0 || nLevel >= MAXLEVEL )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwTxtNode::SetAttrListLevel()> - value of parameter <nLevel> is out of valid range" );
return;
}
@@ -3898,15 +3667,13 @@ void SwTxtNode::SetAttrListLevel( int nLevel )
static_cast<sal_Int16>(nLevel) );
SetAttr( aNewListLevelItem );
}
-// <--
-// --> OD 2008-02-27 #refactorlists#
+
bool SwTxtNode::HasAttrListLevel() const
{
return GetpSwAttrSet() &&
GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_LEVEL, sal_False ) == SFX_ITEM_SET;
}
-// <--
-// --> OD 2008-02-27 #refactorlists#
+
int SwTxtNode::GetAttrListLevel() const
{
int nAttrListLevel = 0;
@@ -3917,14 +3684,12 @@ int SwTxtNode::GetAttrListLevel() const
return nAttrListLevel;
}
-// <--
int SwTxtNode::GetActualListLevel() const
{
return GetNum() ? GetNum()->GetLevelInListTree() : -1;
}
-// --> OD 2008-02-25 #refactorlists#
void SwTxtNode::SetListRestart( bool bRestart )
{
// CreateNum()->SetRestart(bRestart);
@@ -3942,7 +3707,6 @@ void SwTxtNode::SetListRestart( bool bRestart )
}
}
-// --> OD 2008-02-25 #refactorlists#
bool SwTxtNode::IsListRestart() const
{
// return GetNum() ? GetNum()->IsRestart() : false;
@@ -3951,11 +3715,9 @@ bool SwTxtNode::IsListRestart() const
return aIsRestartItem.GetValue() ? true : false;
}
-// <--
/** Returns if the paragraph has a visible numbering or bullet.
This includes all kinds of numbering/bullet/outlines.
- OD 2008-02-28 #newlistlevelattrs#
The concrete list label string has to be checked, too.
*/
bool SwTxtNode::HasVisibleNumberingOrBullet() const
@@ -3980,7 +3742,6 @@ bool SwTxtNode::HasVisibleNumberingOrBullet() const
return bRet;
}
-// --> OD 2008-02-25 #refactorlists#
void SwTxtNode::SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNumber )
{
// CreateNum()->SetStart(nNumber);
@@ -4002,18 +3763,15 @@ void SwTxtNode::SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNumber
}
}
}
-// <--
-// --> OD 2008-02-27 #refactorlists#
bool SwTxtNode::HasAttrListRestartValue() const
{
return GetpSwAttrSet() &&
GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_RESTARTVALUE, sal_False ) == SFX_ITEM_SET;
}
-// <--
SwNumberTree::tSwNumTreeNumber SwTxtNode::GetAttrListRestartValue() const
{
- ASSERT( HasAttrListRestartValue(),
+ OSL_ENSURE( HasAttrListRestartValue(),
"<SwTxtNode::GetAttrListRestartValue()> - only ask for list restart value, if attribute is set at text node." );
const SfxInt16Item& aListRestartValueItem =
@@ -4021,7 +3779,6 @@ SwNumberTree::tSwNumTreeNumber SwTxtNode::GetAttrListRestartValue() const
return static_cast<SwNumberTree::tSwNumTreeNumber>(aListRestartValueItem.GetValue());
}
-// --> OD 2008-02-25 #refactorlists#
SwNumberTree::tSwNumTreeNumber SwTxtNode::GetActualListStartValue() const
{
// return GetNum() ? GetNum()->GetStart() : 1;
@@ -4047,7 +3804,6 @@ SwNumberTree::tSwNumTreeNumber SwTxtNode::GetActualListStartValue() const
return nListRestartValue;
}
-// <--
bool SwTxtNode::IsNotifiable() const
{
@@ -4065,7 +3821,6 @@ bool SwTxtNode::IsNotificationEnabled() const
return bResult;
}
-// --> OD 2008-02-27 #refactorlists#
void SwTxtNode::SetCountedInList( bool bCounted )
{
if ( bCounted )
@@ -4080,7 +3835,6 @@ void SwTxtNode::SetCountedInList( bool bCounted )
SetAttr( aIsCountedInListItem );
}
}
-// <--
bool SwTxtNode::IsCountedInList() const
{
@@ -4090,12 +3844,11 @@ bool SwTxtNode::IsCountedInList() const
return aIsCountedInListItem.GetValue() ? true : false;
}
-// --> OD 2008-03-13 #refactorlists#
void SwTxtNode::AddToList()
{
if ( IsInList() )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwTxtNode::AddToList()> - the text node is already added to a list. Serious defect -> please inform OD" );
return;
}
@@ -4113,7 +3866,7 @@ void SwTxtNode::AddToList()
pList = GetDoc()->createList( sListId, GetNumRule()->GetName() );
}
}
- ASSERT( pList != 0,
+ OSL_ENSURE( pList != 0,
"<SwTxtNode::AddToList()> - no list for given list id. Serious defect -> please inform OD" );
if ( pList )
{
@@ -4138,7 +3891,6 @@ bool SwTxtNode::IsInList() const
{
return GetNum() != 0 && GetNum()->GetParent() != 0;
}
-// <--
bool SwTxtNode::IsFirstOfNumRule() const
{
@@ -4150,7 +3902,6 @@ bool SwTxtNode::IsFirstOfNumRule() const
return bResult;
}
-// --> OD 2008-02-20 #refactorlists#
void SwTxtNode::SetListId( const String sListId )
{
const SfxStringItem& rListIdItem =
@@ -4185,26 +3936,15 @@ String SwTxtNode::GetListId() const
if ( pRule )
{
sListId = pRule->GetDefaultListId();
-//#if OSL_DEBUG_LEVEL > 1
-// ASSERT( false,
-// "DEBUG ASSERTION: default list id of list style is applied." );
-//#endif
-// // setting list id directly using <SwCntntNode::SetAttr(..)>,
-// // because no handling of this attribute set is needed and to avoid
-// // recursive calls of <SwTxtNode::SetAttr(..)>
-// SfxStringItem aNewListIdItem( RES_PARATR_LIST_ID, sListId );
-// const_cast<SwTxtNode*>(this)->SwCntntNode::SetAttr( aNewListIdItem );
}
}
return sListId;
}
-// <--
/** Determines, if the list level indent attributes can be applied to the
paragraph.
- OD 2008-01-17 #newlistlevelattrs#
The list level indents can be applied to the paragraph under the one
of following conditions:
- the list style is directly applied to the paragraph and the paragraph
@@ -4265,7 +4005,7 @@ bool SwTxtNode::AreListLevelIndentsApplicable() const
}
pColl = dynamic_cast<const SwTxtFmtColl*>(pColl->DerivedFrom());
- ASSERT( pColl,
+ OSL_ENSURE( pColl,
"<SwTxtNode::AreListLevelIndentsApplicable()> - something wrong in paragraph's style hierarchy. The applied list style is not found." );
}
}
@@ -4276,8 +4016,6 @@ bool SwTxtNode::AreListLevelIndentsApplicable() const
/** Retrieves the list tab stop position, if the paragraph's list level defines
one and this list tab stop has to merged into the tap stops of the paragraph
- OD 2008-01-17 #newlistlevelattrs#
-
@author OD
@param nListTabStopPosition
@@ -4322,8 +4060,6 @@ bool SwTxtNode::GetListTabStopPosition( long& nListTabStopPosition ) const
/** Retrieves the character following the list label, if the paragraph's
list level defines one.
- OD 2008-01-17 #newlistlevelattrs#
-
@author OD
@return XubString - the list tab stop position
@@ -4359,7 +4095,7 @@ XubString SwTxtNode::GetLabelFollowedBy() const
break;
default:
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwTxtNode::GetLabelFollowedBy()> - unknown SvxNumberFormat::GetLabelFollowedBy() return value" );
}
}
@@ -4391,7 +4127,6 @@ bool SwTxtNode::IsHidden() const
}
// <--
-// --> OD 2008-03-13 #refactorlists#
namespace {
// Helper class for special handling of setting attributes at text node:
// In constructor an instance of the helper class recognize whose attributes
@@ -4476,7 +4211,7 @@ namespace {
{
const SfxStringItem& pListIdItem =
dynamic_cast<const SfxStringItem&>(pItem);
- ASSERT( pListIdItem.GetValue().Len() > 0,
+ OSL_ENSURE( pListIdItem.GetValue().Len() > 0,
"<HandleSetAttrAtTxtNode(..)> - empty list id attribute not excepted. Serious defect -> please inform OD." );
const String sListIdOfTxtNode = rTxtNode.GetListId();
if ( pListIdItem.GetValue() != sListIdOfTxtNode )
@@ -5104,3 +4839,4 @@ SwTxtNode::MakeUnoObject()
return xMeta;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/swfntcch.cxx b/sw/source/core/txtnode/swfntcch.cxx
index 9c294ac03936..8a421ba1ff79 100644
--- a/sw/source/core/txtnode/swfntcch.cxx
+++ b/sw/source/core/txtnode/swfntcch.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,9 +46,6 @@ SwFontCache *pSwFontCache = NULL;
|*
|* SwFontObj::SwFontObj(), ~SwFontObj()
|*
-|* Ersterstellung AMA 25. Jun. 95
-|* Letzte Aenderung AMA 25. Jun. 95
-|*
|*************************************************************************/
SwFontObj::SwFontObj( const void *pOwn, ViewShell *pSh ) :
@@ -68,9 +66,6 @@ SwFontObj::~SwFontObj()
|*
|* SwFontAccess::SwFontAccess()
|*
-|* Ersterstellung AMA 25. Jun. 95
-|* Letzte Aenderung AMA 25. Jun. 95
-|*
|*************************************************************************/
SwFontAccess::SwFontAccess( const void *pOwn, ViewShell *pSh ) :
@@ -92,3 +87,4 @@ SwCacheObj *SwFontAccess::NewObj( )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 24f5c097f7d4..4578eac81f76 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,12 +32,8 @@
#include <hintids.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
-#ifndef _OUTDEV_HXX //autogen
#include <vcl/outdev.hxx>
-#endif
#include <unotools/localedatawrapper.hxx>
#include <editeng/unolingu.hxx>
#include <editeng/brshitem.hxx>
@@ -50,9 +47,7 @@
#include <editeng/akrnitem.hxx>
#include <editeng/shdditem.hxx>
#include <editeng/charreliefitem.hxx>
-#ifndef _SVX_CNTRITEM_HXX //autogen
#include <editeng/cntritem.hxx>
-#endif
#include <editeng/colritem.hxx>
#include <editeng/cscoitem.hxx>
#include <editeng/crsditem.hxx>
@@ -61,9 +56,7 @@
#include <editeng/postitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/fontitem.hxx>
-#ifndef _SVX_EMPHITEM_HXX //autogen
#include <editeng/emphitem.hxx>
-#endif
#include <editeng/charscaleitem.hxx>
#include <editeng/charrotateitem.hxx>
#include <editeng/twolinesitem.hxx>
@@ -85,7 +78,7 @@
#define FNT_ATM_HACK
#endif
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// globale Variable
SvStatistics aSvStat;
#endif
@@ -122,7 +115,7 @@ sal_uInt16 MapDirection( sal_uInt16 nDir, const sal_Bool bVertFormat )
break;
#if OSL_DEBUG_LEVEL > 1
default :
- ASSERT( sal_False, "Unsupported direction" );
+ OSL_ENSURE( sal_False, "Unsupported direction" );
break;
#endif
}
@@ -149,7 +142,7 @@ sal_uInt16 UnMapDirection( sal_uInt16 nDir, const sal_Bool bVertFormat )
break;
#if OSL_DEBUG_LEVEL > 1
default :
- ASSERT( sal_False, "Unsupported direction" );
+ OSL_ENSURE( sal_False, "Unsupported direction" );
break;
#endif
}
@@ -426,7 +419,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
}
bPaintBlank = sal_False;
bPaintWrong = sal_False;
- ASSERT( aSub[SW_LATIN].IsTransparent(), "SwFont: Transparent revolution" );
+ OSL_ENSURE( aSub[SW_LATIN].IsTransparent(), "SwFont: Transparent revolution" );
}
/*************************************************************************
@@ -924,7 +917,7 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const sal_Bool bGrey )
if( pUnderFnt && nOldUnder != UNDERLINE_NONE )
{
-static sal_Char __READONLY_DATA sDoubleSpace[] = " ";
+static sal_Char const sDoubleSpace[] = " ";
Size aFontSize = _GetTxtSize( rInf );
const XubString &rOldStr = rInf.GetText();
XubString aStr( sDoubleSpace, RTL_TEXTENCODING_MS_1252 );
@@ -1035,7 +1028,7 @@ void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf )
if( pUnderFnt && nOldUnder != UNDERLINE_NONE )
{
-static sal_Char __READONLY_DATA sDoubleSpace[] = " ";
+static sal_Char const sDoubleSpace[] = " ";
const XubString &rOldStr = rInf.GetText();
XubString aStr( sDoubleSpace, RTL_TEXTENCODING_MS_1252 );
xub_StrLen nOldIdx = rInf.GetIdx();
@@ -1169,8 +1162,10 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos )
// used during painting of small capitals
void SwDrawTextInfo::Shift( sal_uInt16 nDir )
{
- ASSERT( bPos, "DrawTextInfo: Undefined Position" );
- ASSERT( bSize, "DrawTextInfo: Undefined Width" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bPos, "DrawTextInfo: Undefined Position" );
+ OSL_ENSURE( bSize, "DrawTextInfo: Undefined Width" );
+#endif
const sal_Bool bBidiPor = ( GetFrm() && GetFrm()->IsRightToLeft() ) !=
( 0 != ( TEXT_LAYOUT_BIDI_RTL & GetpOut()->GetLayoutMode() ) );
@@ -1185,7 +1180,7 @@ void SwDrawTextInfo::Shift( sal_uInt16 nDir )
((Point*)pPos)->X() += GetSize().Width();
break;
case 900 :
- ASSERT( ((Point*)pPos)->Y() >= GetSize().Width(), "Going underground" );
+ OSL_ENSURE( ((Point*)pPos)->Y() >= GetSize().Width(), "Going underground" );
((Point*)pPos)->Y() -= GetSize().Width();
break;
case 1800 :
@@ -1244,3 +1239,5 @@ long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess,
rMutableOut.SetFont(aOldFont);
return nHeight;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index d0be32e61953..b2e9296c9fc7 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,9 +41,7 @@
#include <editeng/emphitem.hxx>
#include <editeng/charscaleitem.hxx>
#include <editeng/charrotateitem.hxx>
-// --> OD 2008-01-16 #newlistlevelattrs#
#include <editeng/lrspitem.hxx>
-// <--
#include <txtinet.hxx>
#include <txtflcnt.hxx>
#include <fmtfld.hxx>
@@ -66,7 +65,6 @@
#include <breakit.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
-#include <errhdl.hxx>
#include <fldbas.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
@@ -86,7 +84,7 @@
#include <algorithm>
#include <map>
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
#define CHECK Check();
#else
#define CHECK
@@ -173,7 +171,7 @@ bool isSelfNestable(const sal_uInt16 nWhich)
if ((RES_TXTATR_INETFMT == nWhich) ||
(RES_TXTATR_CJK_RUBY == nWhich))
return false;
- ASSERT((RES_TXTATR_META == nWhich) ||
+ OSL_ENSURE((RES_TXTATR_META == nWhich) ||
(RES_TXTATR_METAFIELD == nWhich), "???");
return true;
}
@@ -184,7 +182,7 @@ bool isSplittable(const sal_uInt16 nWhich)
if ((RES_TXTATR_INETFMT == nWhich) ||
(RES_TXTATR_CJK_RUBY == nWhich))
return true;
- ASSERT((RES_TXTATR_META == nWhich) ||
+ OSL_ENSURE((RES_TXTATR_META == nWhich) ||
(RES_TXTATR_METAFIELD == nWhich), "???");
return false;
}
@@ -254,7 +252,7 @@ MakeTxtAttrNesting(SwTxtNode & rNode, SwTxtAttrNesting & rNesting,
break;
}
default:
- ASSERT(false, "MakeTxtAttrNesting: what the hell is that?");
+ OSL_ENSURE(false, "MakeTxtAttrNesting: what the hell is that?");
break;
}
return static_cast<SwTxtAttrNesting*>(pNew);
@@ -371,7 +369,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
//??? const bool bNoLengthAttribute( nNewStart == nNewEnd );
const bool bNewSelfNestable( isSelfNestable(nNewWhich) );
- ASSERT( (RES_TXTATR_INETFMT == nNewWhich) ||
+ OSL_ENSURE( (RES_TXTATR_INETFMT == nNewWhich) ||
(RES_TXTATR_CJK_RUBY == nNewWhich) ||
(RES_TXTATR_META == nNewWhich) ||
(RES_TXTATR_METAFIELD == nNewWhich),
@@ -411,7 +409,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
static_cast<SwTxtAttrNesting*>(pOther));
break;
default:
- ASSERT(false, "bad code monkey");
+ OSL_ENSURE(false, "bad code monkey");
break;
}
}
@@ -427,7 +425,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
{
if (rNewHint.HasDummyChar())
{
- ASSERT(false,
+ OSL_ENSURE(false,
"ERROR: inserting duplicate CH_TXTATR hint");
return false;
} else if (nNewEnd < nOtherEnd) {
@@ -437,7 +435,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
// in SwXMeta::createEnumeration
// SplitNew is sorted, so this is the first split
xub_StrLen *const pStart(SplitNew.front()->GetStart());
- ASSERT(*pStart == nNewStart, "how did that happen?");
+ OSL_ENSURE(*pStart == nNewStart, "how did that happen?");
*pStart = nNewStart + 1;
}
}
@@ -445,7 +443,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
}
}
- ASSERT (isSplittable(nNewWhich) || SplitNew.size() == 1,
+ OSL_ENSURE(isSplittable(nNewWhich) || SplitNew.size() == 1,
"splitting the unsplittable ???");
// pass 2: split existing hints that overlap/nest with new hint
@@ -476,14 +474,14 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
{
case POS_INSIDE:
{
- ASSERT(!bRemoveOverlap,
+ OSL_ENSURE(!bRemoveOverlap,
"this one should be in OverwrittenExisting?");
}
break;
case POS_OUTSIDE:
case POS_EQUAL:
{
- ASSERT(false, "existing hint inside new hint: why?");
+ OSL_ENSURE(false, "existing hint inside new hint: why?");
}
break;
case POS_OVERLAP_BEFORE:
@@ -495,7 +493,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
{
if ( USHRT_MAX == Count() )
{
- ASSERT(false, "hints array full :-(");
+ OSL_ENSURE(false, "hints array full :-(");
return false;
}
SwTxtAttrNesting * const pOtherLeft(
@@ -514,7 +512,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
{
if ( USHRT_MAX == Count() )
{
- ASSERT(false, "hints array full :-(");
+ OSL_ENSURE(false, "hints array full :-(");
return false;
}
SwTxtAttrNesting * const pOtherRight(
@@ -532,7 +530,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
if ( USHRT_MAX - SplitNew.size() <= Count() )
{
- ASSERT(false, "hints array full :-(");
+ OSL_ENSURE(false, "hints array full :-(");
return false;
}
@@ -560,7 +558,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
}
else
{
- ASSERT((nOtherStart < nNewStart) && (nNewEnd < nOtherEnd), "huh?");
+ OSL_ENSURE((nOtherStart < nNewStart) && (nNewEnd < nOtherEnd), "huh?");
// scenario: there is a RUBY, and contained within that a META;
// now a RUBY is inserted within the META => the exising RUBY is split:
// here it is not possible to simply insert the left/right fragment
@@ -568,12 +566,13 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
Delete( *itOther ); // this also does NoteInHistory!
*(*itOther)->GetEnd() = nNewStart;
bool bSuccess( TryInsertNesting(rNode, **itOther) );
- ASSERT(bSuccess, "recursive call 1 failed?");
+ OSL_ENSURE(bSuccess, "recursive call 1 failed?");
SwTxtAttrNesting * const pOtherRight(
MakeTxtAttrNesting(
rNode, **itOther, nNewEnd, nOtherEnd ) );
bSuccess = TryInsertNesting(rNode, *pOtherRight);
- ASSERT(bSuccess, "recursive call 2 failed?");
+ OSL_ENSURE(bSuccess, "recursive call 2 failed?");
+ (void)bSuccess;
}
}
@@ -602,7 +601,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
std::vector<SwTxtAttr*> aInsDelHints;
std::vector<SwTxtAttr*>::iterator aIter;
- ASSERT( RES_TXTATR_CHARFMT == rNewHint.Which() ||
+ OSL_ENSURE( RES_TXTATR_CHARFMT == rNewHint.Which() ||
RES_TXTATR_AUTOFMT == rNewHint.Which(),
"Expecting CHARFMT or AUTOFMT" );
@@ -664,7 +663,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( !rNode.GetDoc()->IsInReading() )
CHECK;
#endif
@@ -705,7 +704,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
//
while ( aStartIter != aEndIter || bNoLengthAttribute )
{
- ASSERT( bNoLengthAttribute || nPorStart < *aStartIter, "AUTOSTYLES: BuildPortion trouble" )
+ OSL_ENSURE( bNoLengthAttribute || nPorStart < *aStartIter, "AUTOSTYLES: BuildPortion trouble" );
const xub_StrLen nPorEnd = bNoLengthAttribute ? nPorStart : *aStartIter;
aInsDelHints.clear();
@@ -726,7 +725,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
if ( pOther->GetEnd() && *pOther->GetEnd() == nPorEnd && nOtherStart == nPorStart )
{
- ASSERT( *pOther->GetEnd() == nPorEnd, "AUTOSTYLES: BuildPortion trouble" )
+ OSL_ENSURE( *pOther->GetEnd() == nPorEnd, "AUTOSTYLES: BuildPortion trouble" );
aInsDelHints.push_back( pOther );
}
}
@@ -768,7 +767,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
{
// remove all attributes from auto styles, which are explicitely set in
// the new character format:
- ASSERT( RES_TXTATR_AUTOFMT == (*aIter)->Which(), "AUTOSTYLES - Misc trouble" )
+ OSL_ENSURE( RES_TXTATR_AUTOFMT == (*aIter)->Which(), "AUTOSTYLES - Misc trouble" );
SwTxtAttr* pOther = *aIter;
boost::shared_ptr<SfxItemSet> pOldStyle = static_cast<const SwFmtAutoFmt&>(pOther->GetAttr()).GetStyleHandle();
@@ -983,7 +982,7 @@ SwTxtAttr* MakeRedlineTxtAttr( SwDoc & rDoc, SfxPoolItem & rAttr )
case RES_CHRATR_BACKGROUND:
break;
default:
- ASSERT(false, "unsupported redline attribute");
+ OSL_ENSURE(false, "unsupported redline attribute");
break;
}
@@ -1080,7 +1079,7 @@ SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr,
pNew = new SwTxtMeta( static_cast<SwFmtMeta&>(rNew), nStt, nEnd );
break;
default:
- ASSERT(RES_TXTATR_AUTOFMT == rNew.Which(), "unknown attribute");
+ OSL_ENSURE(RES_TXTATR_AUTOFMT == rNew.Which(), "unknown attribute");
pNew = new SwTxtAttrEnd( rNew, nStt, nEnd );
break;
}
@@ -1137,9 +1136,9 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr )
const SwField* pFld = pAttr->GetFld().GetFld();
//JP 06-08-95: DDE-Felder bilden eine Ausnahme
- ASSERT( RES_DDEFLD == pFld->GetTyp()->Which() ||
+ OSL_ENSURE( RES_DDEFLD == pFld->GetTyp()->Which() ||
this == ((SwTxtFld*)pAttr)->GetpTxtNode(),
- "Wo steht denn dieses Feld?" )
+ "Wo steht denn dieses Feld?" );
// bestimmte Felder mussen am Doc das Calculations-Flag updaten
switch( pFld->GetTyp()->Which() )
@@ -1208,7 +1207,7 @@ SwTxtNode::InsertItem( SfxPoolItem& rAttr,
const xub_StrLen nStart, const xub_StrLen nEnd, const SetAttrMode nMode )
{
// character attributes will be inserted as automatic styles:
- ASSERT( !isCHRATR(rAttr.Which()), "AUTOSTYLES - "
+ OSL_ENSURE( !isCHRATR(rAttr.Which()), "AUTOSTYLES - "
"SwTxtNode::InsertItem should not be called with character attributes");
SwTxtAttr* const pNew = MakeTxtAttr( *GetDoc(), rAttr, nStart, nEnd );
@@ -1233,8 +1232,8 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
{
sal_Bool bHiddenPara = sal_False;
- ASSERT( pAttr && *pAttr->GetStart() <= Len(), "StartIdx out of bounds!" );
- ASSERT( !pAttr->GetEnd() || (*pAttr->GetEnd() <= Len()),
+ OSL_ENSURE( pAttr && *pAttr->GetStart() <= Len(), "StartIdx out of bounds!" );
+ OSL_ENSURE( !pAttr->GetEnd() || (*pAttr->GetEnd() <= Len()),
"EndIdx out of bounds!" );
// translate from SetAttrMode to InsertMode (for hints with CH_TXTATR)
@@ -1309,7 +1308,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
if( nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode )
{
// loesche das Zeichen aus dem String !
- ASSERT( ( CH_TXTATR_BREAKWORD ==
+ OSL_ENSURE( ( CH_TXTATR_BREAKWORD ==
m_Text.GetChar(*pAttr->GetStart() ) ||
CH_TXTATR_INWORD ==
m_Text.GetChar(*pAttr->GetStart())),
@@ -1345,7 +1344,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
if( nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode )
{
// loesche das Zeichen aus dem String !
- ASSERT( ( CH_TXTATR_BREAKWORD ==
+ OSL_ENSURE( ( CH_TXTATR_BREAKWORD ==
m_Text.GetChar(*pAttr->GetStart() ) ||
CH_TXTATR_INWORD ==
m_Text.GetChar(*pAttr->GetStart())),
@@ -1419,12 +1418,12 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// FussNote im Redline-Bereich NICHT ins FtnArray einfuegen!
if( StartOfSectionIndex() > rNodes.GetEndOfRedlines().GetIndex() )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
const sal_Bool bSuccess =
#endif
pDoc->GetFtnIdxs().Insert( pTxtFtn );
-#ifdef DBG_UTIL
- ASSERT( bSuccess, "FtnIdx nicht eingetragen." );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bSuccess, "FtnIdx nicht eingetragen." );
#endif
}
SwNodeIndex aTmpIndex( *this );
@@ -1475,7 +1474,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// resulting in infinite recursion
if ( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nMode) )
{
- ASSERT( ( CH_TXTATR_BREAKWORD == m_Text.GetChar(nStart) ||
+ OSL_ENSURE( ( CH_TXTATR_BREAKWORD == m_Text.GetChar(nStart) ||
CH_TXTATR_INWORD == m_Text.GetChar(nStart) ),
"where is my attribute character?" );
SwIndex aIdx( this, nStart );
@@ -1500,7 +1499,7 @@ void SwTxtNode::DeleteAttribute( SwTxtAttr * const pAttr )
{
if ( !HasHints() )
{
- ASSERT(false, "DeleteAttribute called, but text node without hints?");
+ OSL_ENSURE(false, "DeleteAttribute called, but text node without hints?");
return;
}
@@ -1547,7 +1546,7 @@ void SwTxtNode::DeleteAttributes( const sal_uInt16 nWhich,
{
if ( nWhich == RES_CHRATR_HIDDEN )
{
- ASSERT(false, "hey, that's a CHRATR! how did that get in?");
+ OSL_ENSURE(false, "hey, that's a CHRATR! how did that get in?");
SetCalcHiddenCharFlags();
}
else if ( nWhich == RES_TXTATR_CHARFMT )
@@ -1682,7 +1681,7 @@ sal_Bool SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
if ( pItem && (reinterpret_cast<SfxPoolItem*>(-1) != pItem))
{
const sal_uInt16 nWhich = pItem->Which();
- ASSERT( isCHRATR(nWhich) || isTXTATR(nWhich),
+ OSL_ENSURE( isCHRATR(nWhich) || isTXTATR(nWhich),
"SwTxtNode::SetAttr(): unknown attribute" );
if ( isCHRATR(nWhich) || isTXTATR(nWhich) )
{
@@ -1710,7 +1709,7 @@ sal_Bool SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
{
if ( nEnd != nStt && !pNew->GetEnd() )
{
- ASSERT(false,
+ OSL_ENSURE(false,
"Attribut without end, but area marked");
DestroyAttr( pNew ); // do not insert
}
@@ -1809,7 +1808,6 @@ public:
SwPoolItemEndPair() : mpItem( 0 ), mnEndPos( 0 ) {};
};
-// --> OD 2008-01-16 #newlistlevelattrs#
void lcl_MergeListLevelIndentAsLRSpaceItem( const SwTxtNode& rTxtNode,
SfxItemSet& rSet )
{
@@ -1831,7 +1829,6 @@ void lcl_MergeListLevelIndentAsLRSpaceItem( const SwTxtNode& rTxtNode,
}
// erfrage die Attribute vom TextNode ueber den Bereich
-// --> OD 2008-01-16 #newlistlevelattrs#
sal_Bool SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
sal_Bool bOnlyTxtAttr, sal_Bool bGetFromChrFmt,
const bool bMergeIndentValuesOfNumRule ) const
@@ -1859,12 +1856,10 @@ sal_Bool SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
if( !bOnlyTxtAttr )
{
SwCntntNode::GetAttr( aFmtSet );
- // --> OD 2008-01-16 #newlistlevelattrs#
if ( bMergeIndentValuesOfNumRule )
{
lcl_MergeListLevelIndentAsLRSpaceItem( *this, aFmtSet );
}
- // <--
}
const sal_uInt16 nSize = m_pSwpHints->Count();
@@ -1950,7 +1945,7 @@ sal_Bool SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
while ( pItem )
{
const sal_uInt16 nHintWhich = pItem->Which();
- ASSERT(!isUNKNOWNATR(nHintWhich),
+ OSL_ENSURE(!isUNKNOWNATR(nHintWhich),
"SwTxtNode::GetAttr(): unkonwn attribute?");
if ( !pAttrArr.get() )
@@ -2048,12 +2043,10 @@ sal_Bool SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
{
// dann besorge mal die Auto-(Fmt)Attribute
SwCntntNode::GetAttr( rSet );
- // --> OD 2008-01-16 #newlistlevelattrs#
if ( bMergeIndentValuesOfNumRule )
{
lcl_MergeListLevelIndentAsLRSpaceItem( *this, rSet );
}
- // <--
}
return rSet.Count() ? sal_True : sal_False;
@@ -2100,7 +2093,7 @@ struct RemovePresentAttrs
const SwTxtAttr* const pAutoStyle(i_rAttrSpan.second);
SfxItemIter aIter(m_rAttrSet);
const SfxPoolItem* pItem(aIter.GetCurItem());
- while (true)
+ while (pItem)
{
const sal_uInt16 nWhich(pItem->Which());
if (CharFmt::IsItemIncluded(nWhich, pAutoStyle))
@@ -2168,7 +2161,7 @@ lcl_FillWhichIds(const SfxItemSet& i_rAttrSet, std::vector<sal_uInt16>& o_rClear
o_rClearIds.reserve(i_rAttrSet.Count());
SfxItemIter aIter(i_rAttrSet);
const SfxPoolItem* pItem(aIter.GetCurItem());
- while (true)
+ while (pItem)
{
o_rClearIds.push_back(pItem->Which());
@@ -2592,7 +2585,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
{
if ( USHRT_MAX == Count() ) // we're sorry, this flight is overbooked...
{
- ASSERT(false, "hints array full :-(");
+ OSL_ENSURE(false, "hints array full :-(");
return false;
}
@@ -2788,7 +2781,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
{
SwpHintsArray::Insert( pHint );
CalcFlags();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( !rNode.GetDoc()->IsInReading() )
CHECK;
#endif
@@ -2806,7 +2799,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
if( *pHtEnd < nHtStart )
{
- ASSERT( *pHtEnd >= nHtStart,
+ OSL_ENSURE( *pHtEnd >= nHtStart,
"+SwpHints::Insert: invalid hint, end < start" );
// Wir drehen den Quatsch einfach um:
@@ -2838,10 +2831,10 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
( RES_TXTATR_AUTOFMT == nWhich ||
RES_TXTATR_CHARFMT == nWhich ) )
{
- ASSERT( nWhich != RES_TXTATR_AUTOFMT ||
+ OSL_ENSURE( nWhich != RES_TXTATR_AUTOFMT ||
static_cast<const SwFmtAutoFmt&>(pHint->GetAttr()).GetStyleHandle()->GetPool() ==
&rNode.GetDoc()->GetAttrPool(),
- "AUTOSTYLES - Pool mismatch" )
+ "AUTOSTYLES - Pool mismatch" );
BuildPortions( rNode, *pHint, nMode );
@@ -2881,7 +2874,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
rNode.Modify( 0, &aHint );
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( !bNoHintAdjustMode && !rNode.GetDoc()->IsInReading() )
CHECK;
#endif
@@ -2926,13 +2919,13 @@ void SwpHints::DeleteAtPos( const sal_uInt16 nPos )
}
// Ist der Hint schon bekannt, dann suche die Position und loesche ihn.
-// Ist er nicht im Array, so gibt es ein ASSERT !!
+// Ist er nicht im Array, so gibt es ein OSL_ENSURE(!!
void SwpHints::Delete( SwTxtAttr* pTxtHt )
{
// Attr 2.0: SwpHintsArr::Delete( pTxtHt );
const sal_uInt16 nPos = GetStartOf( pTxtHt );
- ASSERT( USHRT_MAX != nPos, "Attribut nicht im Attribut-Array!" );
+ OSL_ENSURE( USHRT_MAX != nPos, "Attribut nicht im Attribut-Array!" );
if( USHRT_MAX != nPos )
DeleteAtPos( nPos );
}
@@ -3061,10 +3054,11 @@ sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr )
break;
default:
- ASSERT(false, "GetCharOfTxtAttr: unknown attr");
+ OSL_ENSURE(false, "GetCharOfTxtAttr: unknown attr");
break;
}
return cRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/txatbase.cxx b/sw/source/core/txtnode/txatbase.cxx
index f79db265d4fd..ae370d5afe42 100644
--- a/sw/source/core/txtnode/txatbase.cxx
+++ b/sw/source/core/txtnode/txatbase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,4 @@ xub_StrLen* SwTxtAttrEnd::GetEnd()
return & m_nEnd;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx
index 7511dee4009a..5bbab28687ce 100644
--- a/sw/source/core/txtnode/txatritr.cxx
+++ b/sw/source/core/txtnode/txatritr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <hintids.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <tools/string.hxx>
#include <editeng/langitem.hxx>
#include <txatritr.hxx>
@@ -244,3 +243,4 @@ void SwTxtAttrIterator::SearchNextChg()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx
index f6dcfc520eae..599d0853b1c1 100644
--- a/sw/source/core/txtnode/txtatr2.cxx
+++ b/sw/source/core/txtnode/txtatr2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,7 +71,7 @@ SwTxtCharFmt::~SwTxtCharFmt( )
void SwTxtCharFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
- ASSERT( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich)
+ OSL_ENSURE( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich)
|| (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich),
"SwTxtCharFmt::Modify(): unknown Modify");
@@ -189,7 +190,7 @@ SwCharFmt* SwTxtINetFmt::GetCharFmt()
void SwTxtINetFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
- ASSERT( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich)
+ OSL_ENSURE( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich)
|| (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich),
"SwTxtINetFmt::Modify(): unknown Modify");
@@ -238,7 +239,7 @@ SwTxtRuby::~SwTxtRuby()
void SwTxtRuby::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
- ASSERT( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich)
+ OSL_ENSURE( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich)
|| (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich),
"SwTxtRuby::Modify(): unknown Modify");
@@ -336,3 +337,4 @@ void SwTxtMeta::ChgTxtNode(SwTxtNode * const 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 4b99670b865c..bfb76e8a552d 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-// So kann man die Linguistik-Statistik ( (Tmp-Path)\swlingu.stk ) aktivieren:
-//#define LINGU_STATISTIK
-#ifdef LINGU_STATISTIK
- #include <stdio.h> // in SwLinguStatistik::DTOR
- #include <stdlib.h> // getenv()
- #include <time.h> // clock()
- #include <tools/stream.hxx>
-#endif
-
#include <hintids.hxx>
#include <vcl/svapp.hxx>
#include <svl/itemiter.hxx>
@@ -92,7 +84,6 @@
#include <vector>
-
using rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::frame;
@@ -334,7 +325,7 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
if ( !pSet1 )
{
- ASSERT( nWhichId, "lcl_HaveCommonAttributes not used correctly" )
+ OSL_ENSURE( nWhichId, "lcl_HaveCommonAttributes not used correctly" );
if ( SFX_ITEM_SET == rSet2.GetItemState( nWhichId, sal_False ) )
{
pNewSet = rSet2.Clone( sal_True );
@@ -480,7 +471,6 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, sal_uInt16 nWhich,
continue;
}
-
if( nStt <= nAttrStart ) // Faelle: 1,3,5
{
if( nEnd > nAttrStart
@@ -598,7 +588,6 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, sal_uInt16 nWhich,
nsSetAttrMode::SETATTR_NOHINTADJUST );
}
-
// jetzt kein i+1, weil das eingefuegte Attribut
// ein anderes auf die Position geschoben hat !
continue;
@@ -623,8 +612,6 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, sal_uInt16 nWhich,
}
}
-
-
/*************************************************************************
* SwTxtNode::GetCurWord()
*
@@ -638,7 +625,7 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, sal_uInt16 nWhich,
XubString SwTxtNode::GetCurWord( xub_StrLen nPos ) const
{
- ASSERT( nPos <= m_Text.Len(), "SwTxtNode::GetCurWord: invalid index." );
+ OSL_ENSURE( nPos <= m_Text.Len(), "SwTxtNode::GetCurWord: invalid index." );
if (!m_Text.Len())
return m_Text;
@@ -679,7 +666,7 @@ SwScanner::SwScanner( const SwTxtNode& rNd, const String& rTxt, const LanguageTy
sal_uInt16 nType, xub_StrLen nStart, xub_StrLen nEnde, sal_Bool bClp )
: rNode( rNd ), rText( rTxt), pLanguage( pLang ), pConversionMap( pConvMap ), nLen( 0 ), nWordType( nType ), bClip( bClp )
{
- ASSERT( rText.Len(), "SwScanner: EmptyString" );
+ OSL_ENSURE( rText.Len(), "SwScanner: EmptyString" );
nStartPos = nBegin = nStart;
nEndPos = nEnde;
@@ -736,7 +723,7 @@ sal_Bool SwScanner::NextWord()
// get the word boundaries
aBound = pBreakIt->GetBreakIter()->getWordBoundary( rText, nBegin,
pBreakIt->GetLocale( aCurrLang ), nWordType, sal_True );
- ASSERT( aBound.endPos >= aBound.startPos, "broken aBound result" );
+ OSL_ENSURE( aBound.endPos >= aBound.startPos, "broken aBound result" );
//no word boundaries could be found
if(aBound.endPos == aBound.startPos)
@@ -764,7 +751,7 @@ sal_Bool SwScanner::NextWord()
// we have to differenciate between these cases:
if ( aBound.startPos <= nBegin )
{
- ASSERT( aBound.endPos >= nBegin, "Unexpected aBound result" )
+ OSL_ENSURE( aBound.endPos >= nBegin, "Unexpected aBound result" );
// restrict boundaries to script boundaries and nEndPos
const sal_uInt16 nCurrScript = pBreakIt->GetBreakIter()->getScriptType( rText, nBegin );
@@ -818,7 +805,6 @@ sal_Bool SwScanner::NextWord()
return sal_True;
}
-
sal_uInt16 SwTxtNode::Spell(SwSpellArgs* pArgs)
{
// Die Aehnlichkeiten zu SwTxtFrm::_AutoSpell sind beabsichtigt ...
@@ -946,7 +932,6 @@ sal_uInt16 SwTxtNode::Spell(SwSpellArgs* pArgs)
return pArgs->xSpellAlt.is() ? 1 : 0;
}
-
void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM,
LanguageType nLang, sal_uInt16 nLangWhichId,
const Font *pFont, sal_uInt16 nFontWhichId )
@@ -982,7 +967,6 @@ void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM,
}
-
sal_uInt16 SwTxtNode::Convert( SwConversionArgs &rArgs )
{
// get range of text within node to be converted
@@ -1413,7 +1397,6 @@ SwRect SwTxtFrm::SmartTagScan( SwCntntNode* /*pActNode*/, xub_StrLen /*nActPos*/
return aRet;
}
-
// Wird vom CollectAutoCmplWords gerufen
void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
{
@@ -1429,7 +1412,6 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
xub_StrLen nLen;
sal_Bool bACWDirty = sal_False, bAnyWrd = sal_False;
-
if( nBegin < nEnd )
{
sal_uInt16 nCnt = 200;
@@ -1465,7 +1447,6 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
pNode->SetAutoCompleteWordDirty( sal_False );
}
-
/*************************************************************************
* SwTxtNode::Hyphenate
*************************************************************************/
@@ -1494,9 +1475,9 @@ sal_Bool SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
{
// 4935: Seit der Trennung ueber Sonderbereiche sind Faelle
// moeglich, in denen kein Frame zum Node vorliegt.
- // Also kein ASSERT!
+ // Also keinOSL_ENSURE
#if OSL_DEBUG_LEVEL > 1
- ASSERT( pFrm, "!SwTxtNode::Hyphenate: can't find any frame" );
+ OSL_ENSURE( pFrm, "!SwTxtNode::Hyphenate: can't find any frame" );
#endif
return sal_False;
}
@@ -1521,80 +1502,6 @@ sal_Bool SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
return sal_False;
}
-#ifdef LINGU_STATISTIK
-
-// globale Variable
-SwLinguStatistik aSwLinguStat;
-
-
-void SwLinguStatistik::Flush()
-{
- if ( !nWords )
- return ;
-
- static char *pLogName = 0;
- const sal_Bool bFirstOpen = pLogName ? sal_False : sal_True;
- if( bFirstOpen )
- {
- char *pPath = getenv( "TEMP" );
- char *pName = "swlingu.stk";
- if( !pPath )
- pLogName = pName;
- else
- {
- const int nLen = strlen(pPath);
- // fuer dieses new wird es kein delete geben.
- pLogName = new char[nLen + strlen(pName) + 3];
- if(nLen && (pPath[nLen-1] == '\\') || (pPath[nLen-1] == '/'))
- snprintf( pLogName, sizeof(pLogName), "%s%s", pPath, pName );
- else
- snprintf( pLogName, sizeof(pLogName), "%s/%s", pPath, pName );
- }
- }
- SvFileStream aStream( String::CreateFromAscii(pLogName), (bFirstOpen
- ? STREAM_WRITE | STREAM_TRUNC
- : STREAM_WRITE ));
-
- if( !aStream.GetError() )
- {
- if ( bFirstOpen )
- aStream << "\nLinguistik-Statistik\n";
- aStream << endl << ++nFlushCnt << ". Messung\n";
- aStream << "Rechtschreibung\n";
- aStream << "gepruefte Worte: \t" << nWords << endl;
- aStream << "als fehlerhaft erkannt:\t" << nWrong << endl;
- aStream << "Alternativvorschlaege:\t" << nAlter << endl;
- if ( nWrong )
- aStream << "Durchschnitt:\t\t" << nAlter*1.0 / nWrong << endl;
- aStream << "Dauer (msec):\t\t" << nSpellTime << endl;
- aStream << "\nThesaurus\n";
- aStream << "Synonyme gesamt:\t" << nSynonym << endl;
- if ( nSynonym )
- aStream << "Synonym-Durchschnitt:\t" <<
- nSynonym*1.0 / ( nWords - nNoSynonym ) << endl;
- aStream << "ohne Synonyme:\t\t" << nNoSynonym << endl;
- aStream << "Bedeutungen gesamt:\t" << nSynonym << endl;
- aStream << "keine Bedeutungen:\t"<< nNoSynonym << endl;
- aStream << "Dauer (msec):\t\t" << nTheTime << endl;
- aStream << "\nHyphenator\n";
- aStream << "Trennstellen gesamt:\t" << nHyphens << endl;
- if ( nHyphens )
- aStream << "Hyphen-Durchschnitt:\t" <<
- nHyphens*1.0 / ( nWords - nNoHyph - nHyphErr ) << endl;
- aStream << "keine Trennstellen:\t" << nNoHyph << endl;
- aStream << "Trennung verweigert:\t" << nHyphErr << endl;
- aStream << "Dauer (msec):\t\t" << nHyphTime << endl;
- aStream << "---------------------------------------------\n";
- }
- nWords = nWrong = nAlter = nSynonym = nNoSynonym =
- nHyphens = nNoHyph = nHyphErr = nSpellTime = nTheTime =
- nHyphTime = 0;
- //pThes = NULL;
-}
-
-#endif
-
-
struct TransliterationChgData
{
xub_StrLen nStart;
@@ -1838,7 +1745,6 @@ void SwTxtNode::TransliterateText(
}
}
-
void SwTxtNode::ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen,
const XubString& rText,
const Sequence<sal_Int32>& rOffsets )
@@ -1886,108 +1792,129 @@ void SwTxtNode::ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen,
void SwTxtNode::CountWords( SwDocStat& rStat,
xub_StrLen nStt, xub_StrLen nEnd ) const
{
+ sal_Bool isCountAll = ( (0 == nStt) && (GetTxt().Len() == nEnd) );
+
++rStat.nAllPara; // #i93174#: count _all_ paragraphs
- if( nStt < nEnd )
+ if( nStt >= nEnd )
+ { // empty node or empty selection or bad call
+ return;
+ }
+ if ( IsHidden() )
+ { // not counting hidden paras
+ return;
+ }
+ // Shortcut when counting whole paragraph and current count is clean
+ if ( isCountAll && !IsWordCountDirty() )
{
- if ( !IsHidden() )
- {
- ++rStat.nPara;
- sal_uLong nTmpWords = 0;
- sal_uLong nTmpChars = 0;
-
- // Shortcut: Whole paragraph should be considered and cached values
- // are valid:
- if ( 0 == nStt && GetTxt().Len() == nEnd && !IsWordCountDirty() )
- {
- nTmpWords = GetParaNumberOfWords();
- nTmpChars = GetParaNumberOfChars();
- }
- else
- {
- String aOldStr( m_Text );
- String& rCastStr = const_cast<String&>(m_Text);
+ // accumulate into DocStat record to return the values
+ rStat.nWord += GetParaNumberOfWords();
+ rStat.nChar += GetParaNumberOfChars();
+ rStat.nCharExcludingSpaces += GetParaNumberOfCharsExcludingSpaces();
+ return;
+ }
- // fills the deleted redlines and hidden ranges with cChar:
- const xub_Unicode cChar(' ');
- const sal_uInt16 nNumOfMaskedChars =
- lcl_MaskRedlinesAndHiddenText( *this, rCastStr, nStt, nEnd, cChar, false );
+ // make a copy of the text
+ String& rTextCopy = const_cast<String&>(m_Text);
- // expand fields
- rtl::OUString aExpandText;
- const ModelToViewHelper::ConversionMap* pConversionMap =
- BuildConversionMap( aExpandText );
+ // mask out the redlined and hidden text with ' '
+ const xub_Unicode cChar(' ');
+ const sal_uInt16 nNumOfMaskedChars = lcl_MaskRedlinesAndHiddenText( *this, rTextCopy, nStt, nEnd, cChar, false );
- const sal_uInt32 nExpandBegin = ModelToViewHelper::ConvertToViewPosition( pConversionMap, nStt );
- const sal_uInt32 nExpandEnd = ModelToViewHelper::ConvertToViewPosition( pConversionMap, nEnd );
+ // expand text into pConversionMap for scanner
+ rtl::OUString aExpandText;
+ const ModelToViewHelper::ConversionMap* pConversionMap = BuildConversionMap( aExpandText );
- const bool bCount = aExpandText.getLength() > 0;
+ // map start and end points onto the ConversionMap
+ const sal_uInt32 nExpandBegin = ModelToViewHelper::ConvertToViewPosition( pConversionMap, nStt );
+ const sal_uInt32 nExpandEnd = ModelToViewHelper::ConvertToViewPosition( pConversionMap, nEnd );
- // count words in 'regular' text:
- if( bCount && pBreakIt->GetBreakIter().is() )
- {
- const String aScannerText( aExpandText );
- SwScanner aScanner( *this, aScannerText, 0, pConversionMap,
- i18n::WordType::WORD_COUNT,
- (xub_StrLen)nExpandBegin, (xub_StrLen)nExpandEnd );
+ if ( aExpandText.getLength() <= 0 )
+ {
+ OSL_ENSURE(aExpandText.getLength() >= 0, "Node text expansion error: length < 0." );
+ return;
+ }
- const rtl::OUString aBreakWord( CH_TXTATR_BREAKWORD );
+ //do the count
+ // all counts exclude hidden paras and hidden+redlined within para
+ // definition of space/white chars in SwScanner (and BreakIter!)
+ // uses both lcl_IsSkippableWhiteSpace and BreakIter getWordBoundary in SwScanner
+ sal_uInt32 nTmpWords = 0; // count of all contiguous blocks of non-white chars
+ sal_uInt32 nTmpChars = 0; // count of all chars
+ sal_uInt32 nTmpCharsExcludingSpaces = 0; // all non-white chars
- while ( aScanner.NextWord() )
- {
- if ( aScanner.GetLen() > 1 ||
- CH_TXTATR_BREAKWORD != aExpandText.match(aBreakWord, aScanner.GetBegin() ) )
- ++nTmpWords;
- }
- }
+ ++rStat.nPara; // count of non-empty paras
- ASSERT( aExpandText.getLength() >= nNumOfMaskedChars,
- "More characters hidden that characters in string!" )
- nTmpChars = nExpandEnd - nExpandBegin - nNumOfMaskedChars;
+ // count words in masked and expanded text:
+ if( pBreakIt->GetBreakIter().is() )
+ {
+ const String aScannerText( aExpandText );
+ // zero is NULL for pLanguage -----------v last param = true for clipping
+ SwScanner aScanner( *this, aScannerText, 0, pConversionMap, i18n::WordType::WORD_COUNT,
+ (xub_StrLen)nExpandBegin, (xub_StrLen)nExpandEnd, true );
- // count words in numbering string:
- if ( nStt == 0 && bCount )
- {
- // add numbering label
- const String aNumString = GetNumString();
- const xub_StrLen nNumStringLen = aNumString.Len();
- if ( nNumStringLen > 0 )
- {
- LanguageType aLanguage = GetLang( 0 );
+ // used to filter out scanner returning almost empty strings (len=1; unichar=0x0001)
+ const rtl::OUString aBreakWord( CH_TXTATR_BREAKWORD );
- SwScanner aScanner( *this, aNumString, &aLanguage, 0,
- i18n::WordType::WORD_COUNT,
- 0, nNumStringLen );
+ while ( aScanner.NextWord() )
+ {
+ // 1 is len(CH_TXTATR_BREAKWORD) : match returns length of match
+ if( 1 != aExpandText.match(aBreakWord, aScanner.GetBegin() ))
+ {
+ ++nTmpWords;
+ nTmpCharsExcludingSpaces += aScanner.GetLen();
+ }
+ }
+ }
- while ( aScanner.NextWord() )
- ++nTmpWords;
+ nTmpChars = nExpandEnd - nExpandBegin - nNumOfMaskedChars;
- nTmpChars += nNumStringLen;
- }
- else if ( HasBullet() )
- {
- ++nTmpWords;
- ++nTmpChars;
- }
- }
+ // no nTmpCharsExcludingSpaces adjust needed neither for blanked out MaskedChars
+ // nor for mid-word selection - set scanner bClip = true at creation
- delete pConversionMap;
+ // count words in numbering string if started at beginning of para:
+ if ( nStt == 0 )
+ {
+ // count outline number label - ? no expansion into map
+ // always counts all of number-ish label
+ const String aNumString = GetNumString();
+ const xub_StrLen nNumStringLen = aNumString.Len();
+ if ( nNumStringLen > 0 )
+ {
+ LanguageType aLanguage = GetLang( 0 );
- rCastStr = aOldStr;
+ SwScanner aScanner( *this, aNumString, &aLanguage, 0,
+ i18n::WordType::WORD_COUNT, 0, nNumStringLen, true );
- // If the whole paragraph has been calculated, update cached
- // values:
- if ( 0 == nStt && GetTxt().Len() == nEnd )
- {
- SetParaNumberOfWords( nTmpWords );
- SetParaNumberOfChars( nTmpChars );
- SetWordCountDirty( false );
- }
+ while ( aScanner.NextWord() )
+ {
+ ++nTmpWords;
+ nTmpCharsExcludingSpaces += aScanner.GetLen();
}
- rStat.nWord += nTmpWords;
- rStat.nChar += nTmpChars;
+ nTmpChars += nNumStringLen;
+ }
+ else if ( HasBullet() )
+ {
+ ++nTmpWords;
+ ++nTmpChars;
+ ++nTmpCharsExcludingSpaces;
}
}
+
+ delete pConversionMap;
+
+ // If counting the whole para then update cached values and mark clean
+ if ( isCountAll )
+ {
+ SetParaNumberOfWords( nTmpWords );
+ SetParaNumberOfChars( nTmpChars );
+ SetParaNumberOfCharsExcludingSpaces( nTmpCharsExcludingSpaces );
+ SetWordCountDirty( false );
+ }
+ // accumulate into DocStat record to return the values
+ rStat.nWord += nTmpWords;
+ rStat.nChar += nTmpChars;
+ rStat.nCharExcludingSpaces += nTmpCharsExcludingSpaces;
}
//
@@ -1995,16 +1922,17 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
//
struct SwParaIdleData_Impl
{
- SwWrongList* pWrong; // for spell checking
+ SwWrongList* pWrong; // for spell checking
SwGrammarMarkUp* pGrammarCheck; // for grammar checking / proof reading
SwWrongList* pSmartTags;
sal_uLong nNumberOfWords;
sal_uLong nNumberOfChars;
- bool bWordCountDirty : 1;
- bool bWrongDirty : 1; // Ist das Wrong-Feld auf invalid?
- bool bGrammarCheckDirty : 1;
- bool bSmartTagDirty : 1;
- bool bAutoComplDirty : 1; // die ACompl-Liste muss angepasst werden
+ sal_uLong nNumberOfCharsExcludingSpaces;
+ bool bWordCountDirty;
+ bool bWrongDirty; // Ist das Wrong-Feld auf invalid?
+ bool bGrammarCheckDirty;
+ bool bSmartTagDirty;
+ bool bAutoComplDirty; // die ACompl-Liste muss angepasst werden
SwParaIdleData_Impl() :
pWrong ( 0 ),
@@ -2012,6 +1940,7 @@ struct SwParaIdleData_Impl
pSmartTags ( 0 ),
nNumberOfWords ( 0 ),
nNumberOfChars ( 0 ),
+ nNumberOfCharsExcludingSpaces ( 0 ),
bWordCountDirty ( true ),
bWrongDirty ( true ),
bGrammarCheckDirty ( true ),
@@ -2059,7 +1988,6 @@ const SwWrongList* SwTxtNode::GetWrong() const
}
// <--
-
void SwTxtNode::SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete )
{
if ( m_pParaIdleData_Impl )
@@ -2079,8 +2007,8 @@ SwGrammarMarkUp* SwTxtNode::GetGrammarCheck()
void SwTxtNode::SetSmartTags( SwWrongList* pNew, bool bDelete )
{
- ASSERT( !pNew || SwSmartTagMgr::Get().IsSmartTagsEnabled(),
- "Weird - we have a smart tag list without any recognizers?" )
+ OSL_ENSURE( !pNew || SwSmartTagMgr::Get().IsSmartTagsEnabled(),
+ "Weird - we have a smart tag list without any recognizers?" );
if ( m_pParaIdleData_Impl )
{
@@ -2126,6 +2054,20 @@ void SwTxtNode::SetWordCountDirty( bool bNew ) const
m_pParaIdleData_Impl->bWordCountDirty = bNew;
}
}
+
+sal_uLong SwTxtNode::GetParaNumberOfCharsExcludingSpaces() const
+{
+ return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->nNumberOfCharsExcludingSpaces : 0;
+}
+
+void SwTxtNode::SetParaNumberOfCharsExcludingSpaces( sal_uLong nNew ) const
+{
+ if ( m_pParaIdleData_Impl )
+ {
+ m_pParaIdleData_Impl->nNumberOfCharsExcludingSpaces = nNew;
+ }
+}
+
bool SwTxtNode::IsWordCountDirty() const
{
return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->bWordCountDirty : 0;
@@ -2177,3 +2119,5 @@ bool SwTxtNode::IsAutoCompleteWordDirty() const
//
// Paragraph statistics end
//
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/SwRewriter.cxx b/sw/source/core/undo/SwRewriter.cxx
index 129bdc8f9b59..afde2760904d 100644
--- a/sw/source/core/undo/SwRewriter.cxx
+++ b/sw/source/core/undo/SwRewriter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,9 +71,10 @@ String SwRewriter::Apply(const String & rStr) const
String aResult = rStr;
vector<SwRewriteRule>::const_iterator aIt;
- for (aIt = mRules.begin(); aIt != mRules.end(); aIt++)
+ for (aIt = mRules.begin(); aIt != mRules.end(); ++aIt)
aResult.SearchAndReplaceAll(aIt->first, aIt->second);
return aResult;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx
index 44314b88b94e..b89f38dc23c4 100644
--- a/sw/source/core/undo/SwUndoField.cxx
+++ b/sw/source/core/undo/SwUndoField.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,9 +76,9 @@ SwUndoFieldFromDoc::SwUndoFieldFromDoc(const SwPosition & rPos,
, pHnt(_pHnt)
, bUpdate(_bUpdate)
{
- ASSERT(pOldField, "No old field!");
- ASSERT(pNewField, "No new field!");
- ASSERT(pDoc, "No document!");
+ OSL_ENSURE(pOldField, "No old field!");
+ OSL_ENSURE(pNewField, "No new field!");
+ OSL_ENSURE(pDoc, "No document!");
}
SwUndoFieldFromDoc::~SwUndoFieldFromDoc()
@@ -89,7 +90,8 @@ SwUndoFieldFromDoc::~SwUndoFieldFromDoc()
void SwUndoFieldFromDoc::UndoImpl(::sw::UndoRedoContext &)
{
SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
- const SwField * pField = pTxtFld->GetFld().GetFld();
+
+ const SwField * pField = pTxtFld ? pTxtFld->GetFld().GetFld() : NULL;
if (pField)
{
@@ -100,7 +102,7 @@ void SwUndoFieldFromDoc::UndoImpl(::sw::UndoRedoContext &)
void SwUndoFieldFromDoc::DoImpl()
{
SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
- const SwField * pField = pTxtFld->GetFld().GetFld();
+ const SwField * pField = pTxtFld ? pTxtFld->GetFld().GetFld() : NULL;
if (pField)
{
@@ -160,3 +162,4 @@ void SwUndoFieldFromAPI::RepeatImpl(::sw::RepeatContext &)
DoImpl();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx
index a9896b7235ce..a63b09519bc3 100644
--- a/sw/source/core/undo/SwUndoFmt.cxx
+++ b/sw/source/core/undo/SwUndoFmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -457,3 +458,5 @@ SwRewriter SwUndoNumruleRename::GetRewriter() const
return aRewriter;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx
index 9ff300ad14dd..49bcb0d4175e 100644
--- a/sw/source/core/undo/SwUndoPageDesc.cxx
+++ b/sw/source/core/undo/SwUndoPageDesc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,12 +54,6 @@ void DebugHeaderFooterContent( const SwPageDesc& rPageDesc )
sal_uLong nHeaderLeft = ULONG_MAX;
sal_uLong nFooterMaster = ULONG_MAX;
sal_uLong nFooterLeft = ULONG_MAX;
- int nHeaderCount = 0;
- int nLeftHeaderCount = 0;
- int nFooterCount = 0;
- int nLeftFooterCount = 0;
- bool bSharedHeader = false;
- bool bSharedFooter = false;
SwFmtHeader& rHead = (SwFmtHeader&)rPageDesc.GetMaster().GetHeader();
SwFmtFooter& rFoot = (SwFmtFooter&)rPageDesc.GetMaster().GetFooter();
@@ -72,27 +67,32 @@ void DebugHeaderFooterContent( const SwPageDesc& rPageDesc )
SwClientIter aIter( *pHeaderFmt );
SwClient *pLast = aIter.GoStart();
if( pLast )
+ {
+ int nHeaderCount = 0;
do
{
++nHeaderCount;
} while( 0 != ( pLast = aIter++ ));
+ }
const SwFmtCntnt* pCntnt = &pHeaderFmt->GetCntnt();
if( pCntnt->GetCntntIdx() )
nHeaderMaster = pCntnt->GetCntntIdx()->GetIndex();
else
nHeaderMaster = 0;
}
- bSharedHeader = rPageDesc.IsHeaderShared();
SwFrmFmt* pLeftHeaderFmt = rLeftHead.GetHeaderFmt();
if( pLeftHeaderFmt )
{
SwClientIter aIter( *pLeftHeaderFmt );
SwClient *pLast = aIter.GoStart();
if( pLast )
+ {
+ int nLeftHeaderCount = 0;
do
{
++nLeftHeaderCount;
} while( 0 != ( pLast = aIter++ ));
+ }
const SwFmtCntnt* pLeftCntnt = &pLeftHeaderFmt->GetCntnt();
if( pLeftCntnt->GetCntntIdx() )
nHeaderLeft = pLeftCntnt->GetCntntIdx()->GetIndex();
@@ -108,27 +108,32 @@ void DebugHeaderFooterContent( const SwPageDesc& rPageDesc )
SwClientIter aIter( *pFooterFmt );
SwClient *pLast = aIter.GoStart();
if( pLast )
+ {
+ int nFooterCount = 0;
do
{
++nFooterCount;
} while( 0 != ( pLast = aIter++ ));
+ }
const SwFmtCntnt* pCntnt = &pFooterFmt->GetCntnt();
if( pCntnt->GetCntntIdx() )
nFooterMaster = pCntnt->GetCntntIdx()->GetIndex();
else
nFooterMaster = 0;
}
- bSharedFooter = rPageDesc.IsFooterShared();
SwFrmFmt* pLeftFooterFmt = rLeftFoot.GetFooterFmt();
if( pLeftFooterFmt )
{
SwClientIter aIter( *pLeftFooterFmt );
SwClient *pLast = aIter.GoStart();
if( pLast )
+ {
+ int nLeftFooterCount = 0;
do
{
++nLeftFooterCount;
} while( 0 != ( pLast = aIter++ ));
+ }
const SwFmtCntnt* pLeftCntnt = &pLeftFooterFmt->GetCntnt();
if( pLeftCntnt->GetCntntIdx() )
nFooterLeft = pLeftCntnt->GetCntntIdx()->GetIndex();
@@ -149,7 +154,7 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld,
UNDO_CHANGE_PAGEDESC ),
aOld(_aOld, _pDoc), aNew(_aNew, _pDoc), pDoc(_pDoc), bExchange( false )
{
- ASSERT(0 != pDoc, "no document?");
+ OSL_ENSURE(0 != pDoc, "no document?");
#ifdef DEBUG
DebugHeaderFooterContent( (SwPageDesc&)aOld );
@@ -228,7 +233,7 @@ SwUndoPageDesc::~SwUndoPageDesc()
void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDest )
{
- ASSERT( bExchange, "You shouldn't do that." );
+ OSL_ENSURE( bExchange, "You shouldn't do that." );
const SwFmtHeader& rDestHead = rDest.GetMaster().GetHeader();
const SwFmtHeader& rSourceHead = rSource.GetMaster().GetHeader();
if( rDestHead.IsActive() )
@@ -359,7 +364,7 @@ SwUndoPageDescCreate::SwUndoPageDescCreate(const SwPageDesc * pNew,
: SwUndo(UNDO_CREATE_PAGEDESC), pDesc(pNew), aNew(*pNew, _pDoc),
pDoc(_pDoc)
{
- ASSERT(0 != pDoc, "no document?");
+ OSL_ENSURE(0 != pDoc, "no document?");
}
SwUndoPageDescCreate::~SwUndoPageDescCreate()
@@ -413,7 +418,7 @@ SwUndoPageDescDelete::SwUndoPageDescDelete(const SwPageDesc & _aOld,
SwDoc * _pDoc)
: SwUndo(UNDO_DELETE_PAGEDESC), aOld(_aOld, _pDoc), pDoc(_pDoc)
{
- ASSERT(0 != pDoc, "no document?");
+ OSL_ENSURE(0 != pDoc, "no document?");
}
SwUndoPageDescDelete::~SwUndoPageDescDelete()
@@ -450,3 +455,5 @@ SwRewriter SwUndoPageDescDelete::GetRewriter() const
return aResult;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/SwUndoTOXChange.cxx b/sw/source/core/undo/SwUndoTOXChange.cxx
index 457ddc366e7c..8b5b8c254090 100644
--- a/sw/source/core/undo/SwUndoTOXChange.cxx
+++ b/sw/source/core/undo/SwUndoTOXChange.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,3 +76,4 @@ void SwUndoTOXChange::RepeatImpl(::sw::RepeatContext &)
DoImpl();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx
index 2e91da080c7c..441bf84096a4 100644
--- a/sw/source/core/undo/docundo.cxx
+++ b/sw/source/core/undo/docundo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -300,7 +301,6 @@ UndoManager::GetLastUndoInfo(
}
SfxUndoAction *const pAction( SfxUndoManager::GetUndoAction(0) );
-
if (o_pStr)
{
*o_pStr = pAction->GetComment();
@@ -333,7 +333,6 @@ SwUndoComments_t UndoManager::GetUndoComments() const
/**************** REDO ******************/
-
bool UndoManager::GetFirstRedoInfo(::rtl::OUString *const o_pStr) const
{
if (!SfxUndoManager::GetRedoActionCount(CurrentLevel))
@@ -579,3 +578,4 @@ UndoManager::Repeat(::sw::RepeatContext & rContext,
} // namespace sw
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 30b856668bdb..a58c21d2e619 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -188,9 +189,7 @@ SwHistorySetFmt::~SwHistorySetFmt()
}
-// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
SwHistoryResetFmt::SwHistoryResetFmt(const SfxPoolItem* pFmtHt, sal_uLong nNodeIdx)
-// <--
: SwHistoryHint( HSTRY_RESETFMTHNT )
, m_nNodeIndex( nNodeIdx )
, m_nWhich( pFmtHt->Which() )
@@ -256,7 +255,7 @@ void SwHistorySetTxt::SetInDoc( SwDoc* pDoc, bool )
}
SwTxtNode * pTxtNd = pDoc->GetNodes()[ m_nNodeIndex ]->GetTxtNode();
- ASSERT( pTxtNd, "SwHistorySetTxt::SetInDoc: not a TextNode" );
+ OSL_ENSURE( pTxtNd, "SwHistorySetTxt::SetInDoc: not a TextNode" );
if ( pTxtNd )
{
@@ -318,7 +317,7 @@ void SwHistorySetTxtFld::SetInDoc( SwDoc* pDoc, bool )
m_pFld->GetFld()->ChgTyp( pNewFldType ); // change field type
SwTxtNode * pTxtNd = pDoc->GetNodes()[ m_nNodeIndex ]->GetTxtNode();
- ASSERT( pTxtNd, "SwHistorySetTxtFld: no TextNode" );
+ OSL_ENSURE( pTxtNd, "SwHistorySetTxtFld: no TextNode" );
if ( pTxtNd )
{
@@ -342,7 +341,7 @@ SwHistorySetRefMark::SwHistorySetRefMark( SwTxtRefMark* pTxtHt, sal_uLong nNodeP
void SwHistorySetRefMark::SetInDoc( SwDoc* pDoc, bool )
{
SwTxtNode * pTxtNd = pDoc->GetNodes()[ m_nNodeIndex ]->GetTxtNode();
- ASSERT( pTxtNd, "SwHistorySetRefMark: no TextNode" );
+ OSL_ENSURE( pTxtNd, "SwHistorySetRefMark: no TextNode" );
if ( !pTxtNd )
return;
@@ -374,7 +373,7 @@ SwHistorySetTOXMark::SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, sal_uLong nNodeP
void SwHistorySetTOXMark::SetInDoc( SwDoc* pDoc, bool )
{
SwTxtNode * pTxtNd = pDoc->GetNodes()[ m_nNodeIndex ]->GetTxtNode();
- ASSERT( pTxtNd, "SwHistorySetTOXMark: no TextNode" );
+ OSL_ENSURE( pTxtNd, "SwHistorySetTOXMark: no TextNode" );
if ( !pTxtNd )
return;
@@ -428,7 +427,7 @@ SwHistoryResetTxt::SwHistoryResetTxt( sal_uInt16 nWhich,
void SwHistoryResetTxt::SetInDoc( SwDoc* pDoc, bool )
{
SwTxtNode * pTxtNd = pDoc->GetNodes()[ m_nNodeIndex ]->GetTxtNode();
- ASSERT( pTxtNd, "SwHistoryResetTxt: no TextNode" );
+ OSL_ENSURE( pTxtNd, "SwHistoryResetTxt: no TextNode" );
if ( pTxtNd )
{
pTxtNd->DeleteAttributes( m_nAttr, m_nStart, m_nEnd );
@@ -444,7 +443,7 @@ SwHistorySetFootnote::SwHistorySetFootnote( SwTxtFtn* pTxtFtn, sal_uLong nNodePo
, m_nStart( *pTxtFtn->GetStart() )
, m_bEndNote( pTxtFtn->GetFtn().IsEndNote() )
{
- ASSERT( pTxtFtn->GetStartNode(),
+ OSL_ENSURE( pTxtFtn->GetStartNode(),
"SwHistorySetFootnote: Footnote without Section" );
// merke die alte NodePos, denn wer weiss was alles in der SaveSection
@@ -469,7 +468,7 @@ SwHistorySetFootnote::SwHistorySetFootnote( const SwTxtFtn &rTxtFtn )
, m_nStart( *rTxtFtn.GetStart() )
, m_bEndNote( rTxtFtn.GetFtn().IsEndNote() )
{
- ASSERT( rTxtFtn.GetStartNode(),
+ OSL_ENSURE( rTxtFtn.GetStartNode(),
"SwHistorySetFootnote: Footnote without Section" );
}
@@ -486,7 +485,7 @@ SwHistorySetFootnote::~SwHistorySetFootnote()
void SwHistorySetFootnote::SetInDoc( SwDoc* pDoc, bool )
{
SwTxtNode * pTxtNd = pDoc->GetNodes()[ m_nNodeIndex ]->GetTxtNode();
- ASSERT( pTxtNd, "SwHistorySetFootnote: no TextNode" );
+ OSL_ENSURE( pTxtNd, "SwHistorySetFootnote: no TextNode" );
if ( !pTxtNd )
return;
@@ -542,7 +541,7 @@ SwHistoryChangeFmtColl::SwHistoryChangeFmtColl( SwFmtColl* pFmtColl, sal_uLong n
void SwHistoryChangeFmtColl::SetInDoc( SwDoc* pDoc, bool )
{
SwCntntNode * pCntntNd = pDoc->GetNodes()[ m_nNodeIndex ]->GetCntntNode();
- ASSERT( pCntntNd, "SwHistoryChangeFmtColl: no ContentNode" );
+ OSL_ENSURE( pCntntNd, "SwHistoryChangeFmtColl: no ContentNode" );
// before setting the format, check if it is still available in the
// document. if it has been deleted, there is no undo!
@@ -569,7 +568,7 @@ SwHistoryTxtFlyCnt::SwHistoryTxtFlyCnt( SwFrmFmt* const pFlyFmt )
: SwHistoryHint( HSTRY_FLYCNT )
, m_pUndo( new SwUndoDelLayFmt( pFlyFmt ) )
{
- ASSERT( pFlyFmt, "SwHistoryTxtFlyCnt: no Format" );
+ OSL_ENSURE( pFlyFmt, "SwHistoryTxtFlyCnt: no Format" );
m_pUndo->ChgShowSel( sal_False );
}
@@ -843,7 +842,7 @@ SwHistoryResetAttrSet::SwHistoryResetAttrSet( const SfxItemSet& rSet,
case RES_TXTATR_FTN:
case RES_TXTATR_META:
case RES_TXTATR_METAFIELD:
- ASSERT(rSet.Count() == 1,
+ OSL_ENSURE(rSet.Count() == 1,
"text attribute with CH_TXTATR, but not the only one:"
"\nnot such a good idea");
break;
@@ -879,7 +878,7 @@ void SwHistoryResetAttrSet::SetInDoc( SwDoc* pDoc, bool )
::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
SwCntntNode * pCntntNd = pDoc->GetNodes()[ m_nNodeIndex ]->GetCntntNode();
- ASSERT( pCntntNd, "SwHistoryResetAttrSet: no CntntNode" );
+ OSL_ENSURE( pCntntNd, "SwHistoryResetAttrSet: no CntntNode" );
if (pCntntNd)
{
@@ -933,7 +932,7 @@ void SwHistoryChangeFlyAnchor::SetInDoc( SwDoc* pDoc, bool )
SwPosition aPos( *pNd );
if ( STRING_MAXLEN != m_nOldContentIndex )
{
- ASSERT(pCNd, "SwHistoryChangeFlyAnchor: no ContentNode");
+ OSL_ENSURE(pCNd, "SwHistoryChangeFlyAnchor: no ContentNode");
if (pCNd)
{
aPos.nContent.Assign( pCNd, m_nOldContentIndex );
@@ -1035,17 +1034,13 @@ SwHistory::~SwHistory()
|* void SwHistory::Add()
|*
|* Beschreibung Dokument 1.0
-|* Ersterstellung JP 18.02.91
-|* Letzte Aenderung JP 18.02.91
|*
*************************************************************************/
-// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
void SwHistory::Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue,
sal_uLong nNodeIdx )
-// <--
{
- ASSERT( !m_nEndDiff, "History was not deleted after REDO" );
+ OSL_ENSURE( !m_nEndDiff, "History was not deleted after REDO" );
sal_uInt16 nWhich = pNewValue->Which();
if( (nWhich >= POOLATTR_END) || (nWhich == RES_TXTATR_FIELD) )
@@ -1067,7 +1062,7 @@ void SwHistory::Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue,
void SwHistory::Add( SwTxtAttr* pHint, sal_uLong nNodeIdx, bool bNewAttr )
{
- ASSERT( !m_nEndDiff, "History was not deleted after REDO" );
+ OSL_ENSURE( !m_nEndDiff, "History was not deleted after REDO" );
SwHistoryHint * pHt;
sal_uInt16 nAttrWhich = pHint->Which();
@@ -1112,7 +1107,7 @@ void SwHistory::Add( SwTxtAttr* pHint, sal_uLong nNodeIdx, bool bNewAttr )
void SwHistory::Add( SwFmtColl* pColl, sal_uLong nNodeIdx, sal_uInt8 nWhichNd )
{
- ASSERT( !m_nEndDiff, "History was not deleted after REDO" );
+ OSL_ENSURE( !m_nEndDiff, "History was not deleted after REDO" );
SwHistoryHint * pHt =
new SwHistoryChangeFmtColl( pColl, nNodeIdx, nWhichNd );
@@ -1122,7 +1117,7 @@ void SwHistory::Add( SwFmtColl* pColl, sal_uLong nNodeIdx, sal_uInt8 nWhichNd )
void SwHistory::Add(const ::sw::mark::IMark& rBkmk, bool bSavePos, bool bSaveOtherPos)
{
- ASSERT( !m_nEndDiff, "History was not deleted after REDO" );
+ OSL_ENSURE( !m_nEndDiff, "History was not deleted after REDO" );
SwHistoryHint * pHt = new SwHistoryBookmark(rBkmk, bSavePos, bSaveOtherPos);
m_SwpHstry.Insert( pHt, Count() );
@@ -1137,7 +1132,7 @@ void SwHistory::Add( SwFrmFmt& rFmt )
void SwHistory::Add( SwFlyFrmFmt& rFmt, sal_uInt16& rSetPos )
{
- ASSERT( !m_nEndDiff, "History was not deleted after REDO" );
+ OSL_ENSURE( !m_nEndDiff, "History was not deleted after REDO" );
SwHistoryHint * pHint;
const sal_uInt16 nWh = rFmt.Which();
@@ -1191,8 +1186,6 @@ void SwHistory::Add(const SfxItemSet & rSet, const SwCharFmt & rFmt)
|* sal_Bool SwHistory::Rollback()
|*
|* Beschreibung Dokument 1.0
-|* Ersterstellung JP 18.02.91
-|* Letzte Aenderung JP 18.02.91
|*
*************************************************************************/
@@ -1256,7 +1249,7 @@ void SwHistory::Delete( sal_uInt16 nStart )
sal_uInt16 SwHistory::SetTmpEnd( sal_uInt16 nNewTmpEnd )
{
- ASSERT( nNewTmpEnd <= Count(), "SwHistory::SetTmpEnd: out of bounds" );
+ OSL_ENSURE( nNewTmpEnd <= Count(), "SwHistory::SetTmpEnd: out of bounds" );
sal_uInt16 nOld = Count() - m_nEndDiff;
m_nEndDiff = Count() - nNewTmpEnd;
@@ -1437,7 +1430,7 @@ bool SwRegHistory::InsertItems( const SfxItemSet& rSet,
SwTxtNode * const pTxtNode =
dynamic_cast<SwTxtNode *>(const_cast<SwModify *>(GetRegisteredIn()));
- ASSERT(pTxtNode, "SwRegHistory not registered at text node?");
+ OSL_ENSURE(pTxtNode, "SwRegHistory not registered at text node?");
if (!pTxtNode)
return false;
@@ -1520,3 +1513,4 @@ void SwRegHistory::_MakeSetWhichIds()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index aa4ac003f33f..14a3d1e776cc 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -549,13 +550,13 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
//Verbindung zwischen Attribut und Format.
const SwPosition *pPos = rOldAnch.GetCntntAnchor();
SwTxtNode *pTxtNode = (SwTxtNode*)&pPos->nNode.GetNode();
- ASSERT( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
+ OSL_ENSURE( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
const xub_StrLen nIdx = pPos->nContent.GetIndex();
SwTxtAttr * const pHnt =
pTxtNode->GetTxtAttrForCharAt( nIdx, RES_TXTATR_FLYCNT );
- ASSERT( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
+ OSL_ENSURE( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
"Missing FlyInCnt-Hint." );
- ASSERT( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == pFrmFmt,
+ OSL_ENSURE( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == pFrmFmt,
"Wrong TxtFlyCnt-Hint." );
const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt()).SetFlyFmt();
@@ -594,7 +595,7 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
if( pCont->GetAnchorFrm() && !pObj->IsInserted() )
{
- ASSERT( pDoc->GetDrawModel(), "RestoreFlyAnchor without DrawModel" );
+ OSL_ENSURE( pDoc->GetDrawModel(), "RestoreFlyAnchor without DrawModel" );
pDoc->GetDrawModel()->GetPage( 0 )->InsertObject( pObj );
}
pObj->SetRelativePos( aDrawSavePt );
@@ -608,7 +609,7 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
{
const SwPosition* pPos = aNewAnchor.GetCntntAnchor();
SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode();
- ASSERT( pTxtNd, "no Text Node at position." );
+ OSL_ENSURE( pTxtNd, "no Text Node at position." );
SwFmtFlyCnt aFmt( pFrmFmt );
pTxtNd->InsertItem( aFmt, pPos->nContent.GetIndex(), 0 );
}
@@ -625,8 +626,6 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
}
// -----------------------------------------------------
-
-// --> OD 2008-02-12 #newlistlevelattrs#
SwUndoFmtResetAttr::SwUndoFmtResetAttr( SwFmt& rChangedFormat,
const sal_uInt16 nWhichId )
: SwUndo( UNDO_RESETATTR )
@@ -1256,3 +1255,4 @@ void SwUndoDontExpandFmt::RepeatImpl(::sw::RepeatContext & rContext)
rDoc.DontExpandFmt( *rPam.GetPoint() );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx
index 52fe406e459b..26dfc0b1c256 100644
--- a/sw/source/core/undo/unbkmk.cxx
+++ b/sw/source/core/undo/unbkmk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,5 @@ void SwUndoInsBookmark::RedoImpl(::sw::UndoRedoContext & rContext)
SetInDoc( &rContext.GetDoc() );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 3b197b81c4f8..6c296013e966 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#include "precompiled_sw.hxx"
#include <UndoDelete.hxx>
-
#include <hintids.hxx>
#include <unotools/charclass.hxx>
#include <editeng/brkitem.hxx>
@@ -55,13 +55,6 @@
#include <comcore.hrc> // #111827#
#include <undo.hrc>
-// #include <editeng/svxacorr.hxx>
-// #include <comphelper/processfactory.hxx>
-// #include <editeng/unolingu.hxx>
-// #include <unotools/localedatawrapper.hxx>
-
-// using namespace comphelper;
-
// DELETE
/* lcl_MakeAutoFrms has to call MakeFrms for objects bounded "AtChar" ( == AUTO ),
@@ -143,7 +136,7 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, sal_Bool bFullPara, sal_Bool bCalledByT
// Step 1. deletion/record of content indizes
if( bDelFullPara )
{
- ASSERT( rPam.HasMark(), "PaM ohne Mark" );
+ OSL_ENSURE( rPam.HasMark(), "PaM ohne Mark" );
DelCntntIndex( *rPam.GetMark(), *rPam.GetPoint(),
DelCntntType(nsDelCntntType::DELCNT_ALL | nsDelCntntType::DELCNT_CHKNOCNTNT) );
@@ -882,7 +875,7 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
if( bDelFullPara )
{
- ASSERT( rPam.HasMark(), "PaM ohne Mark" );
+ OSL_ENSURE( rPam.HasMark(), "PaM ohne Mark" );
DelCntntIndex( *rPam.GetMark(), *rPam.GetPoint(),
DelCntntType(nsDelCntntType::DELCNT_ALL | nsDelCntntType::DELCNT_CHKNOCNTNT) );
@@ -898,7 +891,7 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
{
if( bDelFullPara )
{
- ASSERT( rPam.HasMark(), "PaM ohne Mark" );
+ OSL_ENSURE( rPam.HasMark(), "PaM ohne Mark" );
DelCntntIndex( *rPam.GetMark(), *rPam.GetPoint(),
DelCntntType(nsDelCntntType::DELCNT_ALL | nsDelCntntType::DELCNT_CHKNOCNTNT) );
@@ -994,3 +987,5 @@ void SwUndoDelete::SetTableName(const String & rName)
{
sTableName = rName;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index a5d54b82bfa6..3721fc31a504 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,7 +64,7 @@ public:
SwNodeIndex* GetMvSttIdx() const
{ return SwUndoSaveSection::GetMvSttIdx(); }
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uInt16 nRedlineCount;
#endif
};
@@ -499,7 +500,7 @@ void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx,
}
else {
- ASSERT( sal_False, "was ist es denn nun?" );
+ OSL_ENSURE( sal_False, "was ist es denn nun?" );
}
}
@@ -597,7 +598,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
pHistory = new SwHistory;
SwTxtAttr* const pFtnHnt =
pTxtNd->GetTxtAttrForCharAt( nFtnSttIdx );
- ASSERT( pFtnHnt, "kein FtnAttribut" );
+ OSL_ENSURE( pFtnHnt, "kein FtnAttribut" );
SwIndex aIdx( pTxtNd, nFtnSttIdx );
pHistory->Add( pFtnHnt, pTxtNd->GetIndex(), false );
pTxtNd->EraseText( aIdx, 1 );
@@ -621,7 +622,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
pHistory = new SwHistory;
SwTxtAttr* const pFtnHnt =
pTxtNd->GetTxtAttrForCharAt( nFtnSttIdx );
- ASSERT( pFtnHnt, "kein FtnAttribut" );
+ OSL_ENSURE( pFtnHnt, "kein FtnAttribut" );
SwIndex aIdx( pTxtNd, nFtnSttIdx );
pHistory->Add( pFtnHnt, pTxtNd->GetIndex(), false );
pTxtNd->EraseText( aIdx, 1 );
@@ -661,7 +662,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
pAPos->nNode.GetNode().GetTxtNode();
SwTxtAttr* const pFlyHnt = pTxtNd->GetTxtAttrForCharAt(
pAPos->nContent.GetIndex());
- ASSERT( pFlyHnt, "kein FlyAttribut" );
+ OSL_ENSURE( pFlyHnt, "kein FlyAttribut" );
pHistory->Add( pFlyHnt, 0, false );
// n wieder zurueck, damit nicht ein Format uebesprungen wird !
n = n >= rSpzArr.Count() ? rSpzArr.Count() : n+1;
@@ -939,7 +940,7 @@ void SwUndoSaveSection::RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx,
{
// ueberpruefe, ob der Inhalt an der alten Position steht
SwNodeIndex aSttIdx( pDoc->GetNodes(), nStartPos );
- OSL_ENSURE(!aSttIdx.GetNode().GetCntntNode(),
+ OSL_ENSURE( !pDoc->GetNodes()[ aSttIdx ]->GetCntntNode(),
"RestoreSection(): Position on content node");
// move den Inhalt aus dem UndoNodes-Array in den Fly
@@ -984,7 +985,7 @@ SwRedlineSaveData::SwRedlineSaveData( SwComparePosition eCmpPos,
: SwUndRng( rRedl ),
SwRedlineData( rRedl.GetRedlineData(), bCopyNext )
{
- ASSERT( POS_OUTSIDE == eCmpPos ||
+ OSL_ENSURE( POS_OUTSIDE == eCmpPos ||
!rRedl.GetContentIdx(), "Redline mit Content" );
switch( eCmpPos )
@@ -1018,10 +1019,10 @@ SwRedlineSaveData::SwRedlineSaveData( SwComparePosition eCmpPos,
break;
default:
- ASSERT( !this, "keine gueltigen Daten!" )
+ OSL_ENSURE( !this, "keine gueltigen Daten!" );
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
nRedlineCount = rSttPos.nNode.GetNode().GetDoc()->GetRedlineTbl().Count();
#endif
}
@@ -1052,7 +1053,7 @@ void SwRedlineSaveData::RedlineToDoc( SwPaM& rPam )
RedlineMode_t eOld = rDoc.GetRedlineMode();
rDoc.SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_DONTCOMBINE_REDLINES));
//#i92154# let UI know about a new redline with comment
- if (rDoc.GetDocShell() && (pRedl->GetComment() != String(::rtl::OUString::createFromAscii(""))) )
+ if (rDoc.GetDocShell() && (pRedl->GetComment() != String()) )
rDoc.GetDocShell()->Broadcast(SwRedlineHint(pRedl,SWREDLINE_INSERTED));
//
#if OSL_DEBUG_LEVEL > 0
@@ -1135,10 +1136,12 @@ void SwUndo::SetSaveData( SwDoc& rDoc, const SwRedlineSaveDatas& rSData )
for( sal_uInt16 n = rSData.Count(); n; )
rSData[ --n ]->RedlineToDoc( aPam );
+#if OSL_DEBUG_LEVEL > 1
// check redline count against count saved in RedlineSaveData object
- DBG_ASSERT( (rSData.Count() == 0) ||
+ OSL_ENSURE( (rSData.Count() == 0) ||
(rSData[0]->nRedlineCount == rDoc.GetRedlineTbl().Count()),
"redline count not restored properly" );
+#endif
rDoc.SetRedlineMode_intern( eOld );
}
@@ -1192,7 +1195,7 @@ sal_Bool SwUndo::CanRedlineGroup( SwRedlineSaveDatas& rCurr,
// #111827#
String ShortenString(const String & rStr, xub_StrLen nLength, const String & rFillStr)
{
- ASSERT( nLength - rFillStr.Len() >= 2, "improper arguments")
+ OSL_ENSURE( nLength - rFillStr.Len() >= 2, "improper arguments");
String aResult;
@@ -1337,3 +1340,8 @@ bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos,
);
}
+const String UNDO_ARG1("$1", RTL_TEXTENCODING_ASCII_US);
+const String UNDO_ARG2("$2", RTL_TEXTENCODING_ASCII_US);
+const String UNDO_ARG3("$3", RTL_TEXTENCODING_ASCII_US);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 20308d1dbfba..ac622f1c9601 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -125,7 +126,7 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrm)
{
// es muss mindestens das Attribut im TextNode stehen
SwCntntNode* pCNd = aAnchor.GetCntntAnchor()->nNode.GetNode().GetCntntNode();
- ASSERT( pCNd->IsTxtNode(), "no Text Node at position." );
+ OSL_ENSURE( pCNd->IsTxtNode(), "no Text Node at position." );
SwFmtFlyCnt aFmt( pFrmFmt );
static_cast<SwTxtNode*>(pCNd)->InsertItem( aFmt, nCntPos, nCntPos );
}
@@ -178,7 +179,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
{
// gibt es ueberhaupt Inhalt, dann sicher diesen
const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt();
- ASSERT( rCntnt.GetCntntIdx(), "Fly ohne Inhalt" );
+ OSL_ENSURE( rCntnt.GetCntntIdx(), "Fly ohne Inhalt" );
SaveSection( pDoc, *rCntnt.GetCntntIdx() );
((SwFmtCntnt&)rCntnt).SetNewCntntIdx( (const SwNodeIndex*)0 );
@@ -203,7 +204,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
nNdPgPos = pPos->nNode.GetIndex();
nCntPos = pPos->nContent.GetIndex();
SwTxtNode *const pTxtNd = pPos->nNode.GetNode().GetTxtNode();
- OSL_ENSURE(pTxtNd, "no Textnode");
+ OSL_ENSURE( pTxtNd, "Kein Textnode gefunden" );
SwTxtFlyCnt* const pAttr = static_cast<SwTxtFlyCnt*>(
pTxtNd->GetTxtAttrForCharAt( nCntPos, RES_TXTATR_FLYCNT ) );
// Attribut steht noch im TextNode, loeschen
@@ -265,7 +266,7 @@ SwUndoInsLayFmt::SwUndoInsLayFmt( SwFrmFmt* pFormat, sal_uLong nNodeIdx, xub_Str
}
break;
default:
- ASSERT( sal_False, "Was denn fuer ein FlyFrame?" );
+ OSL_ENSURE( sal_False, "Was denn fuer ein FlyFrame?" );
}
}
@@ -345,7 +346,7 @@ void SwUndoInsLayFmt::RepeatImpl(::sw::RepeatContext & rContext)
pDoc->GetRootFrm()->GetCurrPage(& rContext.GetRepeatPaM()) );
}
else {
- ASSERT( sal_False, "was fuer ein Anker ist es denn nun?" );
+ OSL_ENSURE( sal_False, "was fuer ein Anker ist es denn nun?" );
}
SwFrmFmt* pFlyFmt = pDoc->CopyLayoutFmt( *pFrmFmt, aAnchor, true, true );
@@ -592,13 +593,13 @@ void SwUndoSetFlyFmt::UndoImpl(::sw::UndoRedoContext & rContext)
// Attribut und Format.
const SwPosition *pPos = rOldAnch.GetCntntAnchor();
SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
- ASSERT( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
+ OSL_ENSURE( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
const xub_StrLen nIdx = pPos->nContent.GetIndex();
SwTxtAttr * pHnt = pTxtNode->GetTxtAttrForCharAt(
nIdx, RES_TXTATR_FLYCNT );
- ASSERT( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
+ OSL_ENSURE( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
"Missing FlyInCnt-Hint." );
- ASSERT( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == pFrmFmt,
+ OSL_ENSURE( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == pFrmFmt,
"Wrong TxtFlyCnt-Hint." );
const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt()).SetFlyFmt();
@@ -657,7 +658,7 @@ void SwUndoSetFlyFmt::PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem )
if( RES_ANCHOR == nWhich )
{
// nur den 1. Ankerwechsel vermerken
- ASSERT( !bAnchorChgd, "mehrfacher Ankerwechsel nicht erlaubt!" );
+ OSL_ENSURE( !bAnchorChgd, "mehrfacher Ankerwechsel nicht erlaubt!" );
bAnchorChgd = sal_True;
@@ -721,3 +722,4 @@ void SwUndoSetFlyFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/undoflystrattr.cxx b/sw/source/core/undo/undoflystrattr.cxx
index fad07654f6f8..8358603fbed4 100644
--- a/sw/source/core/undo/undoflystrattr.cxx
+++ b/sw/source/core/undo/undoflystrattr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,7 @@ SwUndoFlyStrAttr::SwUndoFlyStrAttr( SwFlyFrmFmt& rFlyFrmFmt,
msOldStr( sOldStr ),
msNewStr( sNewStr )
{
- ASSERT( eUndoId == UNDO_FLYFRMFMT_TITLE ||
+ OSL_ENSURE( eUndoId == UNDO_FLYFRMFMT_TITLE ||
eUndoId == UNDO_FLYFRMFMT_DESCRIPTION,
"<SwUndoFlyStrAttr::SwUndoFlyStrAttr(..)> - unexpected undo id --> Undo will not work" );
}
@@ -97,3 +98,5 @@ SwRewriter SwUndoFlyStrAttr::GetRewriter() const
return aResult;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx
index 8f9f64bad941..2c93d6a55045 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -151,7 +152,7 @@ void lcl_SaveAnchor( SwFrmFmt* pFmt, sal_uLong& rNodePos )
// TextAttribut zerstoeren
SwTxtNode *pTxtNd = pFmt->GetDoc()->GetNodes()[ rNodePos ]->GetTxtNode();
- ASSERT( pTxtNd, "Kein Textnode gefunden" );
+ OSL_ENSURE( pTxtNd, "Kein Textnode gefunden" );
SwTxtFlyCnt* pAttr = static_cast<SwTxtFlyCnt*>(
pTxtNd->GetTxtAttrForCharAt( nCntntPos, RES_TXTATR_FLYCNT ));
// Attribut steht noch im TextNode, loeschen
@@ -198,7 +199,7 @@ void lcl_RestoreAnchor( SwFrmFmt* pFmt, sal_uLong& rNodePos )
if (FLY_AS_CHAR == rAnchor.GetAnchorId())
{
SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode();
- ASSERT( pTxtNd, "no Text Node" );
+ OSL_ENSURE( pTxtNd, "no Text Node" );
SwFmtFlyCnt aFmt( pFmt );
pTxtNd->InsertItem( aFmt, nCntntPos, nCntntPos );
}
@@ -266,7 +267,7 @@ void SwUndoDrawGroup::UndoImpl(::sw::UndoRedoContext &)
// <--
// --> OD 2005-05-10 #i45952# - notify that position attributes
// are already set
- ASSERT( rSave.pFmt->ISA(SwDrawFrmFmt),
+ OSL_ENSURE( rSave.pFmt->ISA(SwDrawFrmFmt),
"<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object" );
if ( rSave.pFmt->ISA(SwDrawFrmFmt) )
{
@@ -317,7 +318,7 @@ void SwUndoDrawGroup::RedoImpl(::sw::UndoRedoContext &)
// <--
// --> OD 2005-05-10 #i45952# - notify that position attributes
// are already set
- ASSERT( pObjArr->pFmt->ISA(SwDrawFrmFmt),
+ OSL_ENSURE( pObjArr->pFmt->ISA(SwDrawFrmFmt),
"<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object" );
if ( pObjArr->pFmt->ISA(SwDrawFrmFmt) )
{
@@ -433,7 +434,7 @@ void SwUndoDrawUnGroup::UndoImpl(::sw::UndoRedoContext & rContext)
// <--
// --> OD 2005-05-10 #i45952# - notify that position attributes
// are already set
- ASSERT( pObjArr->pFmt->ISA(SwDrawFrmFmt),
+ OSL_ENSURE( pObjArr->pFmt->ISA(SwDrawFrmFmt),
"<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object" );
if ( pObjArr->pFmt->ISA(SwDrawFrmFmt) )
{
@@ -484,7 +485,7 @@ void SwUndoDrawUnGroup::RedoImpl(::sw::UndoRedoContext &)
// <--
// --> OD 2005-05-10 #i45952# - notify that position attributes
// are already set
- ASSERT( rSave.pFmt->ISA(SwDrawFrmFmt),
+ OSL_ENSURE( rSave.pFmt->ISA(SwDrawFrmFmt),
"<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object" );
if ( rSave.pFmt->ISA(SwDrawFrmFmt) )
{
@@ -520,7 +521,7 @@ SwUndoDrawUnGroupConnectToLayout::UndoImpl(::sw::UndoRedoContext &)
{
SdrObject* pObj( aDrawFmtsAndObjs[i].second );
SwDrawContact* pDrawContact( dynamic_cast<SwDrawContact*>(pObj->GetUserCall()) );
- ASSERT( pDrawContact,
+ OSL_ENSURE( pDrawContact,
"<SwUndoDrawUnGroupConnectToLayout::Undo(..)> -- missing SwDrawContact instance" );
if ( pDrawContact )
{
@@ -593,7 +594,7 @@ void SwUndoDrawDelete::UndoImpl(::sw::UndoRedoContext & rContext)
// <--
// --> OD 2005-05-10 #i45952# - notify that position attributes
// are already set
- ASSERT( rSave.pFmt->ISA(SwDrawFrmFmt),
+ OSL_ENSURE( rSave.pFmt->ISA(SwDrawFrmFmt),
"<SwUndoDrawGroup::Undo(..)> - wrong type of frame format for drawing object" );
if ( rSave.pFmt->ISA(SwDrawFrmFmt) )
{
@@ -645,3 +646,4 @@ void SwUndoDrawDelete::AddObj( sal_uInt16 , SwDrawFrmFmt* pFmt,
pMarkLst->InsertEntry( rMark );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unfmco.cxx b/sw/source/core/undo/unfmco.cxx
index 8a3452c0ee82..4ba736443dba 100644
--- a/sw/source/core/undo/unfmco.cxx
+++ b/sw/source/core/undo/unfmco.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,7 +43,6 @@
//--------------------------------------------------
-// --> OD 2008-04-15 #refactorlists#
SwUndoFmtColl::SwUndoFmtColl( const SwPaM& rRange,
SwFmtColl* pColl,
const bool bReset,
@@ -53,7 +53,6 @@ SwUndoFmtColl::SwUndoFmtColl( const SwPaM& rRange,
pFmtColl( pColl ),
mbReset( bReset ),
mbResetListAttrs( bResetListAttrs )
-// <--
{
// --> FME 2004-08-06 #i31191#
if ( pColl )
@@ -100,12 +99,10 @@ void SwUndoFmtColl::DoSetFmtColl(SwDoc & rDoc, SwPaM & rPaM)
// does the format still exist?
if( USHRT_MAX != nPos )
{
- // --> OD 2008-04-15 #refactorlists#
rDoc.SetTxtFmtColl(rPaM,
(SwTxtFmtColl*)pFmtColl,
mbReset,
mbResetListAttrs );
- // <--
}
}
@@ -122,3 +119,4 @@ SwRewriter SwUndoFmtColl::GetRewriter() const
return aResult;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index c32d63488f75..ab1018098e91 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -202,7 +203,7 @@ SwUndoInsert::~SwUndoInsert()
if( pPos->nContent.GetIndex() ) // nicht den gesamten Node loeschen
{
SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode();
- ASSERT( pTxtNd, "kein TextNode, aus dem geloescht werden soll" );
+ OSL_ENSURE( pTxtNd, "kein TextNode, aus dem geloescht werden soll" );
pTxtNd->EraseText( pPos->nContent );
pPos->nNode++;
}
@@ -335,7 +336,7 @@ void SwUndoInsert::RedoImpl(::sw::UndoRedoContext & rContext)
if( pTxt )
{
SwTxtNode *const pTxtNode = pCNd->GetTxtNode();
- ASSERT( pTxtNode, "where is my textnode ?" );
+ OSL_ENSURE( pTxtNode, "where is my textnode ?" );
pTxtNode->InsertText( *pTxt, pPam->GetMark()->nContent,
m_nInsertFlags );
DELETEZ( pTxt );
@@ -512,6 +513,7 @@ SwUndoReplace::SwUndoReplace(SwPaM const& rPam,
: SwUndo( UNDO_REPLACE )
, m_pImpl(new Impl(rPam, rIns, bRegExp))
{
+ OSL_ENSURE( !nAktPos, "Redo ohne vorheriges Undo??" );
}
SwUndoReplace::~SwUndoReplace()
@@ -604,7 +606,7 @@ SwUndoReplace::Impl::Impl(
m_bSplitNext = m_nSttNd != pEnd->nNode.GetIndex();
SwTxtNode* pNd = pStt->nNode.GetNode().GetTxtNode();
- ASSERT( pNd, "wo ist der TextNode" );
+ OSL_ENSURE( pNd, "wo ist der TextNode" );
pHistory = new SwHistory;
DelCntntIndex( *rPam.GetMark(), *rPam.GetPoint() );
@@ -653,7 +655,7 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext)
rPam.DeleteMark();
SwTxtNode* pNd = pDoc->GetNodes()[ m_nSttNd - m_nOffset ]->GetTxtNode();
- ASSERT( pNd, "Wo ist der TextNode geblieben?" )
+ OSL_ENSURE( pNd, "Wo ist der TextNode geblieben?" );
SwAutoCorrExceptWord* pACEWord = pDoc->GetAutoCorrExceptWord();
if( pACEWord )
@@ -682,7 +684,7 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext)
pDoc->DeleteAndJoin( rPam );
rPam.DeleteMark();
pNd = rPam.GetNode()->GetTxtNode();
- ASSERT( pNd, "Wo ist der TextNode geblieben?" );
+ OSL_ENSURE( pNd, "Wo ist der TextNode geblieben?" );
aIdx.Assign( pNd, m_nSttCnt );
}
@@ -739,7 +741,7 @@ void SwUndoReplace::Impl::RedoImpl(::sw::UndoRedoContext & rContext)
rPam.GetPoint()->nNode = m_nSttNd;
SwTxtNode* pNd = rPam.GetPoint()->nNode.GetNode().GetTxtNode();
- ASSERT( pNd, "Wo ist der TextNode geblieben?" )
+ OSL_ENSURE( pNd, "Wo ist der TextNode geblieben?" );
rPam.GetPoint()->nContent.Assign( pNd, m_nSttCnt );
rPam.SetMark();
if( m_bSplitNext )
@@ -910,7 +912,7 @@ void SwUndoInsertLabel::UndoImpl(::sw::UndoRedoContext & rContext)
if( LTYPE_OBJECT == eType || LTYPE_DRAW == eType )
{
- ASSERT( OBJECT.pUndoAttr && OBJECT.pUndoFly, "Pointer nicht initialisiert" )
+ OSL_ENSURE( OBJECT.pUndoAttr && OBJECT.pUndoFly, "Pointer nicht initialisiert" );
SwFrmFmt* pFmt;
SdrObject *pSdrObj = 0;
if( OBJECT.pUndoAttr &&
@@ -950,7 +952,7 @@ void SwUndoInsertLabel::RedoImpl(::sw::UndoRedoContext & rContext)
if( LTYPE_OBJECT == eType || LTYPE_DRAW == eType )
{
- ASSERT( OBJECT.pUndoAttr && OBJECT.pUndoFly, "Pointer nicht initialisiert" )
+ OSL_ENSURE( OBJECT.pUndoAttr && OBJECT.pUndoFly, "Pointer nicht initialisiert" );
SwFrmFmt* pFmt;
SdrObject *pSdrObj = 0;
if( OBJECT.pUndoAttr &&
@@ -1064,3 +1066,4 @@ void SwUndoInsertLabel::SetDrawObj( sal_uInt8 nLId )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index a29a0afa4ea2..f7b01da4caa2 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -353,3 +354,4 @@ void SwUndoMove::DelFtn( const SwPaM& rRange )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index 9e18dfe79611..c775da164d01 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,16 +114,6 @@ void SwUndoInsNum::UndoImpl(::sw::UndoRedoContext & rContext)
if( !pNd && nSttNode )
pNd = rDoc.GetNodes()[ nSttNode ]->GetTxtNode();
- // This code seems to be superfluous because the methods
- // don't have any known side effects.
- // ToDo: iasue i83806 should be used to remove this code
- const SwNumRule* pNdRule;
- if( pNd )
- pNdRule = pNd->GetNumRule();
- else
- pNdRule = rDoc.FindNumRulePtr( aNumRule.GetName() );
- // End of ToDo for issue i83806
-
pHistory->TmpRollback( &rDoc, nLRSavePos );
}
@@ -153,7 +144,6 @@ void SwUndoInsNum::RedoImpl(::sw::UndoRedoContext & rContext)
else
{
// --> OD 2005-02-25 #i42921# - adapt to changed signature
- // --> OD 2008-03-18 #refactorlists#
rDoc.SetNumRule(rPam, aNumRule, false);
// <--
}
@@ -174,7 +164,6 @@ void SwUndoInsNum::RepeatImpl(::sw::RepeatContext & rContext)
if( !sReplaceRule.Len() )
{
// --> OD 2005-02-25 #i42921# - adapt to changed signature
- // --> OD 2008-03-18 #refactorlists#
rDoc.SetNumRule(rContext.GetRepeatPaM(), aNumRule, false);
// <--
}
@@ -202,9 +191,9 @@ void SwUndoInsNum::SaveOldNumRule( const SwNumRule& rOld )
SwUndoDelNum::SwUndoDelNum( const SwPaM& rPam )
- : SwUndo( UNDO_DELNUM ), SwUndRng( rPam ),
- aNodeIdx( sal_uInt8( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode ))
+ : SwUndo( UNDO_DELNUM ), SwUndRng( rPam )
{
+ aNodes.reserve( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode );
pHistory = new SwHistory;
}
@@ -220,11 +209,11 @@ void SwUndoDelNum::UndoImpl(::sw::UndoRedoContext & rContext)
pHistory->TmpRollback( &rDoc, 0 );
pHistory->SetTmpEnd( pHistory->Count() );
- for( sal_uInt16 n = 0; n < aNodeIdx.Count(); ++n )
+ for( std::vector<NodeLevel>::const_iterator i = aNodes.begin(); i != aNodes.end(); ++i )
{
- SwTxtNode* pNd = rDoc.GetNodes()[ aNodeIdx[ n ] ]->GetTxtNode();
- ASSERT( pNd, "Where is TextNode gone?" );
- pNd->SetAttrListLevel(aLevels[ n ] );
+ SwTxtNode* pNd = rDoc.GetNodes()[ i->index ]->GetTxtNode();
+ OSL_ENSURE( pNd, "Where has the TextNode gone?" );
+ pNd->SetAttrListLevel( i->level );
if( pNd->GetCondFmtColl() )
pNd->ChkCondColl();
@@ -248,10 +237,7 @@ void SwUndoDelNum::AddNode( const SwTxtNode& rNd, sal_Bool )
{
if( rNd.GetNumRule() )
{
- sal_uInt16 nIns = aNodeIdx.Count();
- aNodeIdx.Insert( rNd.GetIndex(), nIns );
-
- aLevels.insert( aLevels.begin() + nIns, static_cast<sal_uInt8>(rNd.GetActualListLevel()) );
+ aNodes.push_back( NodeLevel( rNd.GetIndex(), rNd.GetActualListLevel() ) );
}
}
@@ -409,7 +395,6 @@ SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_uInt16 nStt
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
if ( pTxtNd )
{
- // --> OD 2008-02-28 #refactorlists#
if ( pTxtNd->HasAttrListRestartValue() )
{
nOldStt = static_cast<sal_uInt16>(pTxtNd->GetAttrListRestartValue());
@@ -418,7 +403,6 @@ SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_uInt16 nStt
{
nOldStt = USHRT_MAX; // indicating, that the list restart value is not set
}
- // <--
}
}
@@ -467,3 +451,4 @@ void SwUndoNumRuleStart::RepeatImpl(::sw::RepeatContext & rContext)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unoutl.cxx b/sw/source/core/undo/unoutl.cxx
index bbe80824d44a..109387765fc6 100644
--- a/sw/source/core/undo/unoutl.cxx
+++ b/sw/source/core/undo/unoutl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,5 @@ void SwUndoOutlineLeftRight::RepeatImpl(::sw::RepeatContext & rContext)
rContext.GetDoc().OutlineUpDown(rContext.GetRepeatPaM(), nOffset);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index eb6a525a8cc6..f2f83a06fd42 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,7 +80,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
nSttCntnt = rPos.nContent.GetIndex();
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
- ASSERT( pTxtNd, "Overwrite nicht im TextNode?" );
+ OSL_ENSURE( pTxtNd, "Overwrite nicht im TextNode?" );
bInsChar = sal_True;
xub_StrLen nTxtNdLen = pTxtNd->GetTxt().Len();
@@ -204,7 +205,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
pAktPam->DeleteMark();
pAktPam->GetPoint()->nNode = nSttNode;
SwTxtNode* pTxtNd = pAktPam->GetNode()->GetTxtNode();
- ASSERT( pTxtNd, "Overwrite nicht im TextNode?" );
+ OSL_ENSURE( pTxtNd, "Overwrite nicht im TextNode?" );
SwIndex& rIdx = pAktPam->GetPoint()->nContent;
rIdx.Assign( pTxtNd, nSttCntnt );
@@ -287,7 +288,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext)
pAktPam->DeleteMark();
pAktPam->GetPoint()->nNode = nSttNode;
SwTxtNode* pTxtNd = pAktPam->GetNode()->GetTxtNode();
- ASSERT( pTxtNd, "Overwrite nicht im TextNode?" );
+ OSL_ENSURE( pTxtNd, "Overwrite nicht im TextNode?" );
SwIndex& rIdx = pAktPam->GetPoint()->nContent;
if( pRedlSaveData )
@@ -500,3 +501,4 @@ void _UndoTransliterate_Data::SetChangeAtNode( SwDoc& rDoc )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 475e79bb7314..90d8d261e604 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -264,7 +265,7 @@ void SwUndoRedlineSort::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
sal_uInt16 nFnd = rDoc.GetRedlinePos(
*rDoc.GetNodes()[ nSttNode + 1 ],
nsRedlineType_t::REDLINE_INSERT );
- ASSERT( USHRT_MAX != nFnd && nFnd+1 < rDoc.GetRedlineTbl().Count(),
+ OSL_ENSURE( USHRT_MAX != nFnd && nFnd+1 < rDoc.GetRedlineTbl().Count(),
"kein Insert Object gefunden" );
++nFnd;
rDoc.GetRedlineTbl()[nFnd]->Show( 1 );
@@ -536,3 +537,5 @@ void SwUndoCompDoc::RedoImpl(::sw::UndoRedoContext & rContext)
SetPaM(*pPam, true);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index 3099d944923d..dd9a6ce93c62 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -129,7 +130,7 @@ void SwUndoInsSection::UndoImpl(::sw::UndoRedoContext & rContext)
SwSectionNode *const pNd =
rDoc.GetNodes()[ m_nSectionNodePos ]->GetSectionNode();
- ASSERT( pNd, "wo ist mein SectionNode?" );
+ OSL_ENSURE( pNd, "wo ist mein SectionNode?" );
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ))
rDoc.DeleteRedline( *pNd, true, USHRT_MAX );
@@ -240,7 +241,7 @@ void SwUndoInsSection::Join( SwDoc& rDoc, sal_uLong nNode )
{
SwNodeIndex aIdx( rDoc.GetNodes(), nNode );
SwTxtNode* pTxtNd = aIdx.GetNode().GetTxtNode();
- ASSERT( pTxtNd, "wo ist mein TextNode?" );
+ OSL_ENSURE( pTxtNd, "wo ist mein TextNode?" );
{
RemoveIdxRel( nNode + 1, SwPosition( aIdx,
@@ -387,7 +388,7 @@ void SwUndoDelSection::RedoImpl(::sw::UndoRedoContext & rContext)
SwSectionNode *const pNd =
rDoc.GetNodes()[ m_nStartNode ]->GetSectionNode();
- OSL_ENSURE(pNd, "SwUndoDelSection::RedoImpl(): no SectionNode?");
+ OSL_ENSURE( pNd, "wo ist mein SectionNode?" );
// einfach das Format loeschen, der Rest erfolgt automatisch
rDoc.DelSectionFmt( pNd->GetSection().GetFmt() );
}
@@ -441,7 +442,7 @@ void SwUndoUpdateSection::UndoImpl(::sw::UndoRedoContext & rContext)
SwDoc & rDoc = rContext.GetDoc();
SwSectionNode *const pSectNd =
rDoc.GetNodes()[ m_nStartNode ]->GetSectionNode();
- ASSERT( pSectNd, "wo ist mein SectionNode?" );
+ OSL_ENSURE( pSectNd, "wo ist mein SectionNode?" );
SwSection& rNdSect = pSectNd->GetSection();
SwFmt* pFmt = rNdSect.GetFmt();
@@ -497,3 +498,4 @@ void SwUndoUpdateSection::RedoImpl(::sw::UndoRedoContext & rContext)
UndoImpl(rContext);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx
index c11f7dc7a949..1b72dba58572 100644
--- a/sw/source/core/undo/unsort.cxx
+++ b/sw/source/core/undo/unsort.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -277,3 +278,5 @@ void SwUndoSort::Insert( sal_uLong nOrgPos, sal_uLong nNewPos)
aSortList.C40_INSERT( SwSortUndoElement, pEle, aSortList.Count() );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx
index 1e649f6d0b09..317d1baa4652 100644
--- a/sw/source/core/undo/unspnd.cxx
+++ b/sw/source/core/undo/unspnd.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,7 +58,7 @@ SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos,
bTblFlag( sal_False ), bChkTblStt( bChkTable )
{
SwTxtNode *const pTxtNd = rPos.nNode.GetNode().GetTxtNode();
- OSL_ENSURE(pTxtNd, "SwUndoSplitNode: TextNode expected!");
+ OSL_ENSURE( pTxtNd, "nur beim TextNode rufen!" );
if( pTxtNd->GetpSwpHints() )
{
pHistory = new SwHistory;
@@ -202,3 +203,4 @@ void SwUndoSplitNode::RepeatImpl(::sw::RepeatContext & rContext)
*rContext.GetRepeatPaM().GetPoint(), bChkTblStt );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index c395e44dabd2..07e2e7a9ad47 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,21 +70,17 @@
#include <comcore.hrc>
#include <unochart.hxx>
-#ifndef DBG_UTIL
-#define CHECK_TABLE(t)
-#else
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
#define CHECK_TABLE(t) (t).CheckConsistency();
#else
#define CHECK_TABLE(t)
#endif
-#endif
-#ifndef DBG_UTIL
- #define _DEBUG_REDLINE( pDoc )
-#else
+#if OSL_DEBUG_LEVEL > 1
void lcl_DebugRedline( const SwDoc* pDoc );
#define _DEBUG_REDLINE( pDoc ) lcl_DebugRedline( pDoc );
+#else
+ #define _DEBUG_REDLINE( pDoc )
#endif
extern void ClearFEShellTabCols();
@@ -196,14 +193,11 @@ public:
void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
void InsertSort( SvULongs& rArr, sal_uLong nIdx, sal_uInt16* pInsPos = 0 );
-#if defined( JP_DEBUG ) && defined(DBG_UTIL)
+#if OSL_DEBUG_LEVEL > 1
#include "shellio.hxx"
-void DumpDoc( SwDoc* pDoc, const String& rFileNm );
void CheckTable( const SwTable& );
-#define DUMPDOC(p,s) DumpDoc( p, s);
#define CHECKTABLE(t) CheckTable( t );
#else
-#define DUMPDOC(p,s)
#define CHECKTABLE(t)
#endif
@@ -233,7 +227,7 @@ SV_IMPL_PTRARR( SwUndoMoves, SwUndoMovePtr )
SV_IMPL_PTRARR( SwTblToTxtSaves, SwTblToTxtSavePtr )
SV_IMPL_PTRARR( _UndoTblCpyTbl_Entries, _UndoTblCpyTbl_EntryPtr )
-sal_uInt16 __FAR_DATA aSave_BoxCntntSet[] = {
+sal_uInt16 aSave_BoxCntntSet[] = {
RES_CHRATR_COLOR, RES_CHRATR_CROSSEDOUT,
RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
RES_CHRATR_POSTURE, RES_CHRATR_POSTURE,
@@ -286,7 +280,7 @@ void SwUndoInsTbl::UndoImpl(::sw::UndoRedoContext & rContext)
SwNodeIndex aIdx( rDoc.GetNodes(), nSttNode );
SwTableNode* pTblNd = aIdx.GetNode().GetTableNode();
- ASSERT( pTblNd, "kein TabellenNode" );
+ OSL_ENSURE( pTblNd, "kein TabellenNode" );
pTblNd->DelFrms();
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ))
@@ -588,7 +582,7 @@ SwTableNode* SwNodes::UndoTableToText( sal_uLong nSttNd, sal_uLong nEndNd,
{
// an der ContentPosition splitten, das vorherige Zeichen
// loeschen (ist der Trenner!)
- ASSERT( pTxtNd, "Wo ist der TextNode geblieben?" );
+ OSL_ENSURE( pTxtNd, "Wo ist der TextNode geblieben?" );
SwIndex aCntPos( pTxtNd, pSave->m_nCntnt - 1 );
pTxtNd->EraseText( aCntPos, 1 );
@@ -670,7 +664,7 @@ void SwUndoTblToTxt::RedoImpl(::sw::UndoRedoContext & rContext)
pPam->DeleteMark();
SwTableNode* pTblNd = pPam->GetNode()->GetTableNode();
- ASSERT( pTblNd, "keinen TableNode gefunden" );
+ OSL_ENSURE( pTblNd, "keinen TableNode gefunden" );
if( pTblNd->GetTable().IsA( TYPE( SwDDETable )) )
pDDEFldType = (SwDDEFieldType*)((SwDDETable&)pTblNd->GetTable()).
@@ -683,7 +677,7 @@ void SwUndoTblToTxt::RedoImpl(::sw::UndoRedoContext & rContext)
if( !pCNd && 0 == ( pCNd = rDoc.GetNodes().GoNext( &aSaveIdx ) ) &&
0 == ( pCNd = rDoc.GetNodes().GoPrevious( &aSaveIdx )) )
{
- ASSERT( sal_False, "wo steht denn nun der TextNode" );
+ OSL_ENSURE( sal_False, "wo steht denn nun der TextNode" );
}
pPam->GetPoint()->nNode = aSaveIdx;
@@ -757,7 +751,7 @@ void SwUndoTxtToTbl::UndoImpl(::sw::UndoRedoContext & rContext)
++nTblNd; // Node wurde vorher gesplittet
SwNodeIndex aIdx( rDoc.GetNodes(), nTblNd );
SwTableNode *const pTNd = aIdx.GetNode().GetTableNode();
- OSL_ENSURE( pTNd, "SwUndoTxtToTbl: no TableNode" );
+ OSL_ENSURE( pTNd, "keinen Tabellen-Node gefunden" );
RemoveIdxFromSection( rDoc, nTblNd );
@@ -778,7 +772,7 @@ void SwUndoTxtToTbl::UndoImpl(::sw::UndoRedoContext & rContext)
if( pBox )
::_DeleteBox( rTbl, pBox, 0, sal_False, sal_False );
else {
- ASSERT( !this, "Wo ist die Box geblieben?" );
+ OSL_ENSURE( !this, "Wo ist die Box geblieben?" );
}
}
}
@@ -872,9 +866,9 @@ SwUndoTblHeadline::SwUndoTblHeadline( const SwTable& rTbl, sal_uInt16 nOldHdl,
nOldHeadline( nOldHdl ),
nNewHeadline( nNewHdl )
{
- ASSERT( rTbl.GetTabSortBoxes().Count(), "Tabelle ohne Inhalt" );
+ OSL_ENSURE( rTbl.GetTabSortBoxes().Count(), "Tabelle ohne Inhalt" );
const SwStartNode *pSttNd = rTbl.GetTabSortBoxes()[ 0 ]->GetSttNd();
- ASSERT( pSttNd, "Box ohne Inhalt" );
+ OSL_ENSURE( pSttNd, "Box ohne Inhalt" );
nTblNd = pSttNd->StartOfSectionIndex();
}
@@ -883,7 +877,7 @@ void SwUndoTblHeadline::UndoImpl(::sw::UndoRedoContext & rContext)
{
SwDoc & rDoc = rContext.GetDoc();
SwTableNode* pTNd = rDoc.GetNodes()[ nTblNd ]->GetTableNode();
- ASSERT( pTNd, "keinen Tabellen-Node gefunden" );
+ OSL_ENSURE( pTNd, "keinen Tabellen-Node gefunden" );
rDoc.SetRowsToRepeat( pTNd->GetTable(), nOldHeadline );
}
@@ -893,7 +887,7 @@ void SwUndoTblHeadline::RedoImpl(::sw::UndoRedoContext & rContext)
SwDoc & rDoc = rContext.GetDoc();
SwTableNode* pTNd = rDoc.GetNodes()[ nTblNd ]->GetTableNode();
- ASSERT( pTNd, "keinen Tabellen-Node gefunden" );
+ OSL_ENSURE( pTNd, "keinen Tabellen-Node gefunden" );
rDoc.SetRowsToRepeat( pTNd->GetTable(), nNewHeadline );
}
@@ -1012,7 +1006,7 @@ void _SaveTable::RestoreAttr( SwTable& rTbl, sal_Bool bMdfyBox )
{
if( !pLn )
{
- ASSERT( !this, "Anzahl der Lines hat sich veraendert" );
+ OSL_ENSURE( !this, "Anzahl der Lines hat sich veraendert" );
break;
}
@@ -1209,7 +1203,7 @@ void _SaveLine::RestoreAttr( SwTableLine& rLine, _SaveTable& rSTbl )
{
if( !pBx )
{
- ASSERT( !this, "Anzahl der Boxen hat sich veraendert" );
+ OSL_ENSURE( !this, "Anzahl der Boxen hat sich veraendert" );
break;
}
pBx->RestoreAttr( *rLine.GetTabBoxes()[ n ], rSTbl );
@@ -1242,7 +1236,7 @@ void _SaveLine::CreateNew( SwTable& rTbl, SwTableBox& rParent, _SaveTable& rSTbl
// HB, #127868# robustness: in some cases - which I
// cannot reproduce nor see from the code - pNew seems
// to be set to NULL in C40_INSERT.
- ASSERT(pNew, "Table line just created set to NULL in C40_INSERT");
+ OSL_ENSURE(pNew, "Table line just created set to NULL in C40_INSERT");
if (pNew)
{
@@ -1298,7 +1292,7 @@ void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl )
{
if( !rBox.GetTabLines().Count() )
{
- ASSERT( !this, "Anzahl der Lines hat sich veraendert" );
+ OSL_ENSURE( !this, "Anzahl der Lines hat sich veraendert" );
}
else
{
@@ -1307,7 +1301,7 @@ void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl )
{
if( !pLn )
{
- ASSERT( !this, "Anzahl der Lines hat sich veraendert" );
+ OSL_ENSURE( !this, "Anzahl der Lines hat sich veraendert" );
break;
}
@@ -1346,7 +1340,7 @@ void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl )
}
else
{
- ASSERT( !this, "Box nicht mehr am gleichen Node" );
+ OSL_ENSURE( !this, "Box nicht mehr am gleichen Node" );
}
}
@@ -1406,7 +1400,7 @@ void _SaveBox::CreateNew( SwTable& rTbl, SwTableLine& rParent, _SaveTable& rSTbl
{
// Box zum StartNode in der alten Tabelle suchen
SwTableBox* pBox = rTbl.GetTblBox( nSttNode );
- ASSERT( pBox, "Wo ist meine TabellenBox geblieben?" );
+ OSL_ENSURE( pBox, "Wo ist meine TabellenBox geblieben?" );
SwFrmFmt* pOld = pBox->GetFrmFmt();
pFmt->Add( pBox );
@@ -1450,7 +1444,7 @@ void SwUndoAttrTbl::UndoImpl(::sw::UndoRedoContext & rContext)
{
SwDoc & rDoc = rContext.GetDoc();
SwTableNode* pTblNd = rDoc.GetNodes()[ nSttNode ]->GetTableNode();
- ASSERT( pTblNd, "kein TabellenNode" );
+ OSL_ENSURE( pTblNd, "kein TabellenNode" );
if (pTblNd)
{
@@ -1509,7 +1503,7 @@ SwUndoTblAutoFmt::UndoRedo(bool const bUndo, ::sw::UndoRedoContext & rContext)
{
SwDoc & rDoc = rContext.GetDoc();
SwTableNode* pTblNd = rDoc.GetNodes()[ nSttNode ]->GetTableNode();
- ASSERT( pTblNd, "kein TabellenNode" );
+ OSL_ENSURE( pTblNd, "kein TabellenNode" );
_SaveTable* pOrig = new _SaveTable( pTblNd->GetTable() );
// dann auch noch ueber die ContentNodes der EndBoxen und
@@ -1618,7 +1612,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
sal_uInt16 n;
sal_uInt16 i;
- ASSERT( ! IsDelBox(), "falsche Action" );
+ OSL_ENSURE( ! IsDelBox(), "falsche Action" );
Ptrs.pNewSttNds = new SvULongs( (sal_uInt8)(rTblBoxes.Count() - rOld.Count()), 5 );
for( n = 0, i = 0; n < rOld.Count(); ++i )
@@ -1671,12 +1665,12 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
const SwTable& rTbl = rTblNd.GetTable();
const SwTableSortBoxes& rTblBoxes = rTbl.GetTabSortBoxes();
- ASSERT( ! IsDelBox(), "falsche Action" );
+ OSL_ENSURE( ! IsDelBox(), "falsche Action" );
Ptrs.pNewSttNds = new SvULongs( (sal_uInt8)(rTblBoxes.Count() - rOld.Count()), 5 );
- ASSERT( rTbl.IsNewModel() || rOld.Count() + nCount * rBoxes.Count() == rTblBoxes.Count(),
+ OSL_ENSURE( rTbl.IsNewModel() || rOld.Count() + nCount * rBoxes.Count() == rTblBoxes.Count(),
"unexpected boxes" );
- ASSERT( rOld.Count() <= rTblBoxes.Count(), "more unexpected boxes" );
+ OSL_ENSURE( rOld.Count() <= rTblBoxes.Count(), "more unexpected boxes" );
for( sal_uInt16 n = 0, i = 0; i < rTblBoxes.Count(); ++i )
{
if( ( n < rOld.Count() ) &&
@@ -1720,7 +1714,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
// find the line number difference
// (to help determine bNodesMoved flag below)
nLineDiff = nLineDiff - nLineNo;
- ASSERT( pSourceBox, "Splitted source box not found!" );
+ OSL_ENSURE( pSourceBox, "Splitted source box not found!" );
// find out how many nodes the source box used to have
// (to help determine bNodesMoved flag below)
sal_uInt16 nNdsPos = 0;
@@ -1752,7 +1746,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
void SwUndoTblNdsChg::SaveSection( SwStartNode* pSttNd )
{
- ASSERT( IsDelBox(), "falsche Action" );
+ OSL_ENSURE( IsDelBox(), "falsche Action" );
if( !Ptrs.pDelSects )
Ptrs.pDelSects = new SwUndoSaveSections( 10, 5 );
@@ -1771,7 +1765,7 @@ void SwUndoTblNdsChg::UndoImpl(::sw::UndoRedoContext & rContext)
SwNodeIndex aIdx( rDoc.GetNodes(), nSttNode );
SwTableNode *const pTblNd = aIdx.GetNode().GetTableNode();
- OSL_ENSURE( pTblNd, "SwUndoTblNdsChg: no TableNode" );
+ OSL_ENSURE( pTblNd, "kein TabellenNode" );
SwTableFmlUpdate aMsgHnt( &pTblNd->GetTable() );
aMsgHnt.eFlags = TBL_BOXPTR;
@@ -1817,7 +1811,7 @@ void SwUndoTblNdsChg::UndoImpl(::sw::UndoRedoContext & rContext)
// Box aus der Tabellen-Struktur entfernen
sal_uLong nIdx = aTmp[ --n ];
SwTableBox* pBox = pTblNd->GetTable().GetTblBox( nIdx );
- ASSERT( pBox, "Wo ist meine TabellenBox geblieben?" );
+ OSL_ENSURE( pBox, "Wo ist meine TabellenBox geblieben?" );
// TL_CHART2: notify chart about box to be removed
if (pPCD)
@@ -1855,7 +1849,7 @@ void SwUndoTblNdsChg::UndoImpl(::sw::UndoRedoContext & rContext)
{
sal_uLong nIdx = (*Ptrs.pNewSttNds)[ --n ];
SwTableBox* pBox = pTblNd->GetTable().GetTblBox( nIdx );
- ASSERT( pBox, "Where's my table box?" );
+ OSL_ENSURE( pBox, "Where's my table box?" );
// TL_CHART2: notify chart about box to be removed
if (pPCD)
pPCD->DeleteBox( &pTblNd->GetTable(), *pBox );
@@ -1889,7 +1883,7 @@ void SwUndoTblNdsChg::RedoImpl(::sw::UndoRedoContext & rContext)
SwDoc & rDoc = rContext.GetDoc();
SwTableNode* pTblNd = rDoc.GetNodes()[ nSttNode ]->GetTableNode();
- ASSERT( pTblNd, "kein TabellenNode" );
+ OSL_ENSURE( pTblNd, "kein TabellenNode" );
CHECK_TABLE( pTblNd->GetTable() )
SwSelBoxes aSelBoxes;
@@ -2004,7 +1998,7 @@ SwUndoTblMerge::SwUndoTblMerge( const SwPaM& rTblSel )
: SwUndo( UNDO_TABLE_MERGE ), SwUndRng( rTblSel ), pHistory( 0 )
{
const SwTableNode* pTblNd = rTblSel.GetNode()->FindTableNode();
- ASSERT( pTblNd, "Wo ist TabllenNode" )
+ OSL_ENSURE( pTblNd, "Wo ist TabllenNode" );
pSaveTbl = new _SaveTable( pTblNd->GetTable() );
pMoves = new SwUndoMoves;
nTblNode = pTblNd->GetIndex();
@@ -2023,7 +2017,7 @@ void SwUndoTblMerge::UndoImpl(::sw::UndoRedoContext & rContext)
SwNodeIndex aIdx( rDoc.GetNodes(), nTblNode );
SwTableNode *const pTblNd = aIdx.GetNode().GetTableNode();
- OSL_ENSURE( pTblNd, "SwUndoTblMerge: no TableNode" );
+ OSL_ENSURE( pTblNd, "kein TabellenNode" );
SwTableFmlUpdate aMsgHnt( &pTblNd->GetTable() );
aMsgHnt.eFlags = TBL_BOXPTR;
@@ -2040,7 +2034,6 @@ void SwUndoTblMerge::UndoImpl(::sw::UndoRedoContext & rContext)
SwTableBox *pBox, *pCpyBox = pTblNd->GetTable().GetTabSortBoxes()[0];
SwTableBoxes& rLnBoxes = pCpyBox->GetUpper()->GetTabBoxes();
-DUMPDOC( &rDoc, "d:\\tmp\\tab_a.db" )
CHECKTABLE(pTblNd->GetTable())
SwSelBoxes aSelBoxes;
@@ -2059,7 +2052,6 @@ CHECKTABLE(pTblNd->GetTable())
aSelBoxes.Insert( pBox );
}
-DUMPDOC( &rDoc, "d:\\tmp\\tab_b.db" )
CHECKTABLE(pTblNd->GetTable())
SwChartDataProvider *pPCD = rDoc.GetChartDataProvider();
@@ -2074,7 +2066,7 @@ CHECKTABLE(pTblNd->GetTable())
{
nIdx = aNewSttNds[ --n ];
pBox = pTblNd->GetTable().GetTblBox( nIdx );
- ASSERT( pBox, "Wo ist meine TabellenBox geblieben?" );
+ OSL_ENSURE( pBox, "Wo ist meine TabellenBox geblieben?" );
if( !pSaveTbl->IsNewModel() )
rDoc.GetNodes().MakeTxtNode( SwNodeIndex(
@@ -2116,11 +2108,7 @@ CHECKTABLE(pTblNd->GetTable())
// das Trennzeichen loeschen
pTxtNd->EraseText( aTmpIdx, 1 );
}
-// delete pUndo;
-DUMPDOC( &rDoc, String( "d:\\tmp\\tab_") + String( aNewSttNds.Count() - i ) +
- String(".db") )
}
-// pMoves->Remove( 0, pMoves->Count() );
nIdx = pBox->GetSttIdx();
}
else
@@ -2148,7 +2136,6 @@ DUMPDOC( &rDoc, String( "d:\\tmp\\tab_") + String( aNewSttNds.Count() - i ) +
rDoc.DeleteSection( rDoc.GetNodes()[ nIdx ] );
}
}
-DUMPDOC( &rDoc, "d:\\tmp\\tab_z.db" )
CHECKTABLE(pTblNd->GetTable())
@@ -2299,15 +2286,15 @@ SwUndoTblNumFmt::~SwUndoTblNumFmt()
void SwUndoTblNumFmt::UndoImpl(::sw::UndoRedoContext & rContext)
{
- ASSERT( pBoxSet, "Where's the stored item set?" )
+ OSL_ENSURE( pBoxSet, "Where's the stored item set?" );
SwDoc & rDoc = rContext.GetDoc();
SwStartNode* pSttNd = rDoc.GetNodes()[ nNode ]->
FindSttNodeByType( SwTableBoxStartNode );
- ASSERT( pSttNd, "ohne StartNode kein TabellenBox" );
+ OSL_ENSURE( pSttNd, "ohne StartNode kein TabellenBox" );
SwTableBox* pBox = pSttNd->FindTableNode()->GetTable().GetTblBox(
pSttNd->GetIndex() );
- ASSERT( pBox, "keine TabellenBox gefunden" );
+ OSL_ENSURE( pBox, "keine TabellenBox gefunden" );
SwTableBoxFmt* pFmt = rDoc.MakeTableBoxFmt();
pFmt->SetFmtAttr( *pBoxSet );
@@ -2404,10 +2391,10 @@ void SwUndoTblNumFmt::RedoImpl(::sw::UndoRedoContext & rContext)
SwNode * pNd = & pPam->GetPoint()->nNode.GetNode();
SwStartNode* pSttNd = pNd->FindSttNodeByType( SwTableBoxStartNode );
- ASSERT( pSttNd, "ohne StartNode kein TabellenBox" );
+ OSL_ENSURE( pSttNd, "ohne StartNode kein TabellenBox" );
SwTableBox* pBox = pSttNd->FindTableNode()->GetTable().GetTblBox(
pSttNd->GetIndex() );
- ASSERT( pBox, "keine TabellenBox gefunden" );
+ OSL_ENSURE( pBox, "keine TabellenBox gefunden" );
SwFrmFmt* pBoxFmt = pBox->ClaimFrmFmt();
if( bNewFmt || bNewFml || bNewValue )
@@ -3215,7 +3202,7 @@ void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos )
nM = nU + ( nO - nU ) / 2;
if( *(rArr.GetData() + nM) == nIdx )
{
- ASSERT( sal_False, "Index ist schon vorhanden, darf nie sein!" );
+ OSL_ENSURE( sal_False, "Index already exists. This should never happen." );
return;
}
if( *(rArr.GetData() + nM) < nIdx )
@@ -3242,7 +3229,7 @@ void InsertSort( SvULongs& rArr, sal_uLong nIdx, sal_uInt16* pInsPos )
nM = nU + ( nO - nU ) / 2;
if( *(rArr.GetData() + nM) == nIdx )
{
- ASSERT( sal_False, "Index ist schon vorhanden, darf nie sein!" );
+ OSL_ENSURE( sal_False, "Index ist schon vorhanden, darf nie sein!" );
return;
}
if( *(rArr.GetData() + nM) < nIdx )
@@ -3258,37 +3245,21 @@ void InsertSort( SvULongs& rArr, sal_uLong nIdx, sal_uInt16* pInsPos )
*pInsPos = nU;
}
-#if defined( JP_DEBUG ) && defined(DBG_UTIL)
+#if OSL_DEBUG_LEVEL > 1
-void DumpDoc( SwDoc* pDoc, const String& rFileNm )
-{
- Writer* pWrt = SwIoSystem::GetWriter( "DEBUG" );
- if( pWrt )
- {
- SvFileStream aStream( rFileNm, STREAM_STD_WRITE );
- SwPaM* pPam = new SwPaM( pDoc, SwPosition( pDoc->GetNodes().EndOfContent ,
- pDoc->GetNodes().EndOfContent ));
- pPam->Move( fnMoveBackward, fnGoDoc );
- pPam->SetMark();
- pPam->Move( fnMoveForward, fnGoDoc );
-
- pWrt->Write( pPam, *pDoc, aStream, rFileNm.GetStr() );
-
- delete pPam;
- }
-}
void CheckTable( const SwTable& rTbl )
{
const SwNodes& rNds = rTbl.GetFrmFmt()->GetDoc()->GetNodes();
- const SwTableSortBoxes& rSrtArr = pTblNd->GetTable().GetTabSortBoxes();
+ const SwTableSortBoxes& rSrtArr = rTbl.GetTabSortBoxes();
for( sal_uInt16 n = 0; n < rSrtArr.Count(); ++n )
{
const SwTableBox* pBox = rSrtArr[ n ];
const SwNode* pNd = pBox->GetSttNd();
- ASSERT( rNds[ *pBox->GetSttIdx() ] == pNd, "Box mit falchem StartNode" );
+ OSL_ENSURE( rNds[ pBox->GetSttIdx() ] == pNd, "Box mit falchem StartNode" );
}
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 55afbf9b9c99..ca6f3359ab53 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -151,7 +152,7 @@ SwUndoInserts::~SwUndoInserts()
if( pPos->nContent.GetIndex() ) // nicht den gesamten Node loeschen
{
SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode();
- ASSERT( pTxtNd, "kein TextNode, aus dem geloescht werden soll" );
+ OSL_ENSURE( pTxtNd, "kein TextNode, aus dem geloescht werden soll" );
if( pTxtNd ) // Robust
{
pTxtNd->EraseText( pPos->nContent );
@@ -353,3 +354,4 @@ SwUndoCpyDoc::SwUndoCpyDoc( const SwPaM& rPam )
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx
index 915609cdd2ca..ba0d8a4699ab 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <SwXTextDefaults.hxx>
@@ -47,15 +48,12 @@
#include <unocrsrhelper.hxx>
#include <hintids.hxx>
-#include <unomid.h>
-
-using rtl::OUString;
-using namespace rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
+using rtl::OUString;
SwXTextDefaults::SwXTextDefaults ( SwDoc * pNewDoc ) :
@@ -81,7 +79,7 @@ uno::Reference< XPropertySetInfo > SAL_CALL SwXTextDefaults::getPropertySetInfo(
void SAL_CALL SwXTextDefaults::setPropertyValue( const OUString& rPropertyName, const Any& aValue )
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!m_pDoc)
throw RuntimeException();
const SfxItemPropertySimpleEntry *pMap = m_pPropSet->getPropertyMap()->getByName( rPropertyName );
@@ -147,7 +145,7 @@ void SAL_CALL SwXTextDefaults::setPropertyValue( const OUString& rPropertyName,
Any SAL_CALL SwXTextDefaults::getPropertyValue( const OUString& rPropertyName )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!m_pDoc)
throw RuntimeException();
const SfxItemPropertySimpleEntry *pMap = m_pPropSet->getPropertyMap()->getByName( rPropertyName );
@@ -192,7 +190,7 @@ void SAL_CALL SwXTextDefaults::removeVetoableChangeListener( const OUString& /*r
PropertyState SAL_CALL SwXTextDefaults::getPropertyState( const OUString& rPropertyName )
throw(UnknownPropertyException, RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
PropertyState eRet = PropertyState_DIRECT_VALUE;
if (!m_pDoc)
throw RuntimeException();
@@ -290,3 +288,4 @@ uno::Sequence< ::rtl::OUString > SAL_CALL SwXTextDefaults::getSupportedServiceNa
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/TextCursorHelper.cxx b/sw/source/core/unocore/TextCursorHelper.cxx
index 5616d51d1d9f..e72abba9c992 100644
--- a/sw/source/core/unocore/TextCursorHelper.cxx
+++ b/sw/source/core/unocore/TextCursorHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,17 +34,13 @@
using namespace ::com::sun::star;
-/* -----------------------------03.03.03 11:07--------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & OTextCursorHelper::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------03.03.03 11:07--------------------------------
- ---------------------------------------------------------------------------*/
//XUnoTunnel
sal_Int64 SAL_CALL OTextCursorHelper::getSomething(
const uno::Sequence< sal_Int8 >& rId )
@@ -57,5 +54,5 @@ sal_Int64 SAL_CALL OTextCursorHelper::getSomething(
}
return 0;
}
-// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/XMLRangeHelper.cxx b/sw/source/core/unocore/XMLRangeHelper.cxx
index 8695de0eef9b..66684613c7e5 100644
--- a/sw/source/core/unocore/XMLRangeHelper.cxx
+++ b/sw/source/core/unocore/XMLRangeHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -351,7 +352,7 @@ CellRange getCellRangeFromXMLString( const OUString & rXMLString )
nStartPos, nEndPos - 1,
aResult ))
{
- // if an error occured, bail out
+ // if an error occurred, bail out
return CellRange();
}
}
@@ -410,3 +411,5 @@ OUString getXMLStringFromCellRange( const CellRange & rRange )
} // namespace XMLRangeHelper
//} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/XMLRangeHelper.hxx b/sw/source/core/unocore/XMLRangeHelper.hxx
index c170662745ae..0b4b34e57153 100644
--- a/sw/source/core/unocore/XMLRangeHelper.hxx
+++ b/sw/source/core/unocore/XMLRangeHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,5 @@ CellRange getCellRangeFromXMLString( const ::rtl::OUString & rXMLString );
// XMLRANGEHELPER_HXX
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx
index 77e5e536a042..3f9d4a0f54a5 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,9 +36,7 @@
#include <com/sun/star/ucb/XContentProvider.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/ucb/TransferInfo.hpp>
-#ifndef _COM_SUN_STAR_UCB_NAMECLASH_HDL_
#include <com/sun/star/ucb/NameClash.hdl>
-#endif
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -52,7 +51,6 @@
#include <svl/svstdarr.hxx>
#include <swunohelper.hxx>
#include <swunodef.hxx>
-#include <errhdl.hxx>
namespace SWUnoHelper {
@@ -66,7 +64,7 @@ sal_Int32 GetEnumAsInt32( const UNO_NMSPC::Any& rVal )
catch( UNO_NMSPC::Exception & )
{
eVal = 0;
- ASSERT( sal_False, "can't get EnumAsInt32" );
+ OSL_ENSURE( sal_False, "can't get EnumAsInt32" );
}
return eVal;
}
@@ -81,14 +79,14 @@ sal_Bool UCB_DeleteFile( const String& rURL )
ucbhelper::Content aTempContent( rURL,
STAR_REFERENCE( ucb::XCommandEnvironment )());
aTempContent.executeCommand(
- rtl::OUString::createFromAscii( "delete" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")),
UNO_NMSPC::makeAny( sal_Bool( sal_True ) ) );
bRemoved = sal_True;
}
catch( UNO_NMSPC::Exception& )
{
bRemoved = sal_False;
- ASSERT( sal_False, "Exeception from executeCommand( delete )" );
+ OSL_ENSURE( sal_False, "Exeception from executeCommand( delete )" );
}
return bRemoved;
}
@@ -114,12 +112,12 @@ sal_Bool UCB_CopyFile( const String& rURL, const String& rNewURL, sal_Bool bCopy
aInfo.MoveData = bCopyIsMove;
aAny <<= aInfo;
aTempContent.executeCommand(
- rtl::OUString::createFromAscii( "transfer" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")),
aAny );
}
catch( UNO_NMSPC::Exception& )
{
- ASSERT( sal_False, "Exeception from executeCommand( transfer )" );
+ OSL_ENSURE( sal_False, "Exeception from executeCommand( transfer )" );
bCopyCompleted = sal_False;
}
return bCopyCompleted;
@@ -153,7 +151,7 @@ sal_Bool UCB_IsCaseSensitiveFileName( const String& rURL )
catch( UNO_NMSPC::Exception& )
{
bCaseSensitive = sal_False;
- ASSERT( sal_False, "Exeception from compareContentIds()" );
+ OSL_ENSURE( sal_False, "Exeception from compareContentIds()" );
}
return bCaseSensitive;
}
@@ -165,7 +163,7 @@ sal_Bool UCB_IsReadOnlyFileName( const String& rURL )
{
ucbhelper::Content aCnt( rURL, STAR_REFERENCE( ucb::XCommandEnvironment )());
UNO_NMSPC::Any aAny = aCnt.getPropertyValue(
- rtl::OUString::createFromAscii( "IsReadOnly" ));
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsReadOnly")));
if(aAny.hasValue())
bIsReadOnly = *(sal_Bool*)aAny.getValue();
}
@@ -222,9 +220,9 @@ sal_Bool UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
sal_uInt16 nSeqSize = pDateTimeList ? 2 : 1;
UNO_NMSPC::Sequence < rtl::OUString > aProps( nSeqSize );
rtl::OUString* pProps = aProps.getArray();
- pProps[ 0 ] = rtl::OUString::createFromAscii( "Title" );
+ pProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
if( pDateTimeList )
- pProps[ 1 ] = rtl::OUString::createFromAscii( "DateModified" );
+ pProps[ 1 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified"));
try
{
@@ -289,3 +287,5 @@ sal_Bool UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx
index 7a67b7748c97..bc31f15f7592 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include "precompiled_sw.hxx"
#include <unobookmark.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <TextCursorHelper.hxx>
@@ -46,7 +47,7 @@
#include <comcore.hrc>
#include <SwRewriter.hxx>
#include <docsh.hxx>
-
+#include <xmloff/odffields.hxx>
using namespace ::sw::mark;
using namespace ::com::sun::star;
@@ -130,6 +131,11 @@ void SwXBookmark::Impl::registerInMark(SwXBookmark & rThis,
m_pRegisteredBookmark = pBkmk;
}
+void SwXBookmark::registerInMark(SwXBookmark & rThis,
+ ::sw::mark::IMark *const pBkmk)
+{
+ m_pImpl->registerInMark( rThis, pBkmk );
+}
const ::sw::mark::IMark* SwXBookmark::GetBookmark() const
{
@@ -237,7 +243,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
UnoActionContext aCont(m_pImpl->m_pDoc);
if (!m_pImpl->m_sMarkName.getLength())
{
- m_pImpl->m_sMarkName = OUString::createFromAscii("Bookmark");
+ m_pImpl->m_sMarkName = OUString(RTL_CONSTASCII_USTRINGPARAM("Bookmark"));
}
if ((eType == IDocumentMarkAccess::BOOKMARK) &&
::sw::mark::CrossRefNumItemBookmark::IsLegalName(m_pImpl->m_sMarkName))
@@ -277,14 +283,14 @@ void SAL_CALL
SwXBookmark::attach(const uno::Reference< text::XTextRange > & xTextRange)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
attachToRange( xTextRange );
}
uno::Reference< text::XTextRange > SAL_CALL
SwXBookmark::getAnchor() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!m_pImpl->m_pRegisteredBookmark)
{
@@ -299,7 +305,7 @@ SwXBookmark::getAnchor() throw (uno::RuntimeException)
void SAL_CALL SwXBookmark::dispose() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (m_pImpl->m_pRegisteredBookmark)
{
m_pImpl->m_pDoc->getIDocumentMarkAccess()->deleteMark(
@@ -311,7 +317,7 @@ void SAL_CALL SwXBookmark::addEventListener(
const uno::Reference< lang::XEventListener > & xListener)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->m_pRegisteredBookmark)
{
@@ -324,7 +330,7 @@ void SAL_CALL SwXBookmark::removeEventListener(
const uno::Reference< lang::XEventListener > & xListener)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->m_pRegisteredBookmark ||
!m_pImpl->m_ListenerContainer.RemoveListener(xListener))
@@ -336,7 +342,7 @@ throw (uno::RuntimeException)
OUString SAL_CALL SwXBookmark::getName()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return (m_pImpl->m_pRegisteredBookmark)
? m_pImpl->m_pRegisteredBookmark->GetName()
@@ -346,7 +352,7 @@ throw (uno::RuntimeException)
void SAL_CALL SwXBookmark::setName(const OUString& rName)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!m_pImpl->m_pRegisteredBookmark)
{
@@ -385,7 +391,7 @@ throw (uno::RuntimeException)
OUString SAL_CALL
SwXBookmark::getImplementationName() throw (uno::RuntimeException)
{
- return OUString::createFromAscii("SwXBookmark");
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("SwXBookmark"));
}
static char const*const g_ServicesBookmark[] =
@@ -395,7 +401,7 @@ static char const*const g_ServicesBookmark[] =
"com.sun.star.document.LinkTarget",
};
static const size_t g_nServicesBookmark(
- sizeof(g_ServicesBookmark)/sizeof(g_ServicesBookmark[0]));
+ SAL_N_ELEMENTS(g_ServicesBookmark));
sal_Bool SAL_CALL SwXBookmark::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
@@ -431,7 +437,7 @@ uno::Reference<frame::XModel> SwXBookmark::GetModel()
uno::Reference< beans::XPropertySetInfo > SAL_CALL
SwXBookmark::getPropertySetInfo() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
static uno::Reference< beans::XPropertySetInfo > xRef(
aSwMapProvider.GetPropertySet(PROPERTY_MAP_BOOKMARK)
@@ -456,7 +462,7 @@ uno::Any SAL_CALL SwXBookmark::getPropertyValue(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
uno::Any aRet;
if (! ::sw::GetDefaultTextContentValue(aRet, rPropertyName))
@@ -525,7 +531,7 @@ SwXFieldmark::SwXFieldmark(bool _isReplacementObject, ::sw::mark::IMark* pBkm, S
void SwXFieldmarkParameters::insertByName(const OUString& aName, const uno::Any& aElement)
throw (lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IFieldmark::parameter_map_t* pParameters = getCoreParameters();
if(pParameters->find(aName) != pParameters->end())
throw container::ElementExistException();
@@ -535,7 +541,7 @@ void SwXFieldmarkParameters::insertByName(const OUString& aName, const uno::Any&
void SwXFieldmarkParameters::removeByName(const OUString& aName)
throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!getCoreParameters()->erase(aName))
throw container::NoSuchElementException();
}
@@ -543,7 +549,7 @@ void SwXFieldmarkParameters::removeByName(const OUString& aName)
void SwXFieldmarkParameters::replaceByName(const OUString& aName, const uno::Any& aElement)
throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IFieldmark::parameter_map_t* pParameters = getCoreParameters();
IFieldmark::parameter_map_t::iterator pEntry = pParameters->find(aName);
if(pEntry == pParameters->end())
@@ -554,7 +560,7 @@ void SwXFieldmarkParameters::replaceByName(const OUString& aName, const uno::Any
uno::Any SwXFieldmarkParameters::getByName(const OUString& aName)
throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IFieldmark::parameter_map_t* pParameters = getCoreParameters();
IFieldmark::parameter_map_t::iterator pEntry = pParameters->find(aName);
if(pEntry == pParameters->end())
@@ -565,7 +571,7 @@ uno::Any SwXFieldmarkParameters::getByName(const OUString& aName)
uno::Sequence<OUString> SwXFieldmarkParameters::getElementNames()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IFieldmark::parameter_map_t* pParameters = getCoreParameters();
uno::Sequence<OUString> vResult(pParameters->size());
OUString* pOutEntry = vResult.getArray();
@@ -577,7 +583,7 @@ uno::Sequence<OUString> SwXFieldmarkParameters::getElementNames()
::sal_Bool SwXFieldmarkParameters::hasByName(const OUString& aName)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IFieldmark::parameter_map_t* pParameters = getCoreParameters();
return (pParameters->find(aName) != pParameters->end());
}
@@ -591,7 +597,7 @@ uno::Type SwXFieldmarkParameters::getElementType()
::sal_Bool SwXFieldmarkParameters::hasElements()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return !getCoreParameters()->empty();
}
@@ -614,6 +620,7 @@ IFieldmark::parameter_map_t* SwXFieldmarkParameters::getCoreParameters()
void SwXFieldmark::attachToRange( const uno::Reference < text::XTextRange >& xTextRange )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
+
attachToRangeEx( xTextRange,
( isReplacementObject ? IDocumentMarkAccess::CHECKBOX_FIELDMARK : IDocumentMarkAccess::TEXT_FIELDMARK ) );
}
@@ -621,7 +628,7 @@ void SwXFieldmark::attachToRange( const uno::Reference < text::XTextRange >& xTe
::rtl::OUString SwXFieldmark::getFieldType(void)
throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const IFieldmark *pBkm = dynamic_cast<const IFieldmark*>(GetBookmark());
if(!pBkm)
throw uno::RuntimeException();
@@ -631,7 +638,7 @@ void SwXFieldmark::attachToRange( const uno::Reference < text::XTextRange >& xTe
void SwXFieldmark::setFieldType(const::rtl::OUString & fieldType)
throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IFieldmark *pBkm = const_cast<IFieldmark*>(
dynamic_cast<const IFieldmark*>(GetBookmark()));
if(!pBkm)
@@ -642,7 +649,7 @@ void SwXFieldmark::setFieldType(const::rtl::OUString & fieldType)
uno::Reference<container::XNameContainer> SwXFieldmark::getParameters()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IFieldmark *pBkm = const_cast<IFieldmark*>(
dynamic_cast<const IFieldmark*>(GetBookmark()));
if(!pBkm)
@@ -650,3 +657,83 @@ uno::Reference<container::XNameContainer> SwXFieldmark::getParameters()
return uno::Reference<container::XNameContainer>(new SwXFieldmarkParameters(pBkm));
}
+uno::Reference<text::XTextContent>
+SwXFieldmark::CreateXFieldmark(SwDoc & rDoc, ::sw::mark::IMark & rMark)
+{
+ // #i105557#: do not iterate over the registered clients: race condition
+ ::sw::mark::MarkBase *const pMarkBase(
+ dynamic_cast< ::sw::mark::MarkBase * >(&rMark));
+ OSL_ENSURE(pMarkBase, "CreateXBookmark: no MarkBase?");
+ if (!pMarkBase) { return 0; }
+ uno::Reference<text::XTextContent> xMark(pMarkBase->GetXBookmark());
+ if (!xMark.is())
+ {
+ // FIXME: These belong in XTextFieldsSupplier
+ SwXFieldmark* pXBkmk = NULL;
+ if (dynamic_cast< ::sw::mark::TextFieldmark* >(&rMark))
+ pXBkmk = new SwXFieldmark(false, &rMark, &rDoc);
+ else if (dynamic_cast< ::sw::mark::CheckboxFieldmark* >(&rMark))
+ pXBkmk = new SwXFieldmark(true, &rMark, &rDoc);
+
+ xMark.set(pXBkmk);
+ pXBkmk->registerInMark(*pXBkmk, pMarkBase);
+ }
+ return xMark;
+}
+
+::sw::mark::ICheckboxFieldmark*
+SwXFieldmark::getCheckboxFieldmark()
+{
+ ::sw::mark::ICheckboxFieldmark* pCheckboxFm = NULL;
+ if ( getFieldType() == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(ODF_FORMCHECKBOX) ) )
+ // evil #TODO #FIXME casting away the const-ness
+ pCheckboxFm = const_cast<sw::mark::ICheckboxFieldmark*>(reinterpret_cast< const ::sw::mark::ICheckboxFieldmark* >( GetBookmark()));
+ return pCheckboxFm;
+
+}
+
+// support 'hidden' "Checked" property ( note: this property is just for convenience to support
+// docx import filter thus not published via PropertySet info )
+
+void SAL_CALL
+SwXFieldmark::setPropertyValue(const OUString& PropertyName,
+ const uno::Any& rValue)
+throw (beans::UnknownPropertyException, beans::PropertyVetoException,
+ lang::IllegalArgumentException, lang::WrappedTargetException,
+ uno::RuntimeException)
+{
+ SolarMutexGuard g;
+ if ( PropertyName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Checked") ) ) )
+ {
+ ::sw::mark::ICheckboxFieldmark* pCheckboxFm = getCheckboxFieldmark();
+ sal_Bool bChecked( sal_False );
+ if ( pCheckboxFm && ( rValue >>= bChecked ) )
+ pCheckboxFm->SetChecked( bChecked );
+ else
+ throw uno::RuntimeException();
+
+ }
+ else
+ SwXFieldmark_Base::setPropertyValue( PropertyName, rValue );
+}
+
+// support 'hidden' "Checked" property ( note: this property is just for convenience to support
+// docx import filter thus not published via PropertySet info )
+
+uno::Any SAL_CALL SwXFieldmark::getPropertyValue(const OUString& rPropertyName)
+throw (beans::UnknownPropertyException, lang::WrappedTargetException,
+ uno::RuntimeException)
+{
+ SolarMutexGuard g;
+ if ( rPropertyName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Checked") ) ) )
+ {
+ ::sw::mark::ICheckboxFieldmark* pCheckboxFm = getCheckboxFieldmark();
+ if ( pCheckboxFm )
+ return uno::makeAny( pCheckboxFm->IsChecked() );
+ else
+ throw uno::RuntimeException();
+ }
+ return SwXFieldmark_Base::getPropertyValue( rPropertyName );
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 331350a5d9f2..a727886c5a27 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,6 @@
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/chart2/data/LabelOrigin.hpp>
#include <cppuhelper/interfacecontainer.hxx>
-#include <vos/mutex.hxx>
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <svl/zforlist.hxx> // SvNumberFormatter
@@ -54,11 +54,8 @@
#include <frmfmt.hxx>
#include <docsh.hxx>
#include <ndole.hxx>
-#include <swtable.hxx>
#include <swtypes.hxx>
-#ifndef _UNOCORE_HRC
#include <unocore.hrc>
-#endif
#include <docary.hxx>
@@ -86,8 +83,6 @@ extern int lcl_CompareCellRanges(
sal_Bool bCmpColsFirst );
extern void lcl_NormalizeRange( String &rCell1, String &rCell2 );
-//////////////////////////////////////////////////////////////////////
-
//static
void SwChartHelper::DoUpdateAllCharts( SwDoc* pDoc )
{
@@ -125,8 +120,6 @@ void SwChartHelper::DoUpdateAllCharts( SwDoc* pDoc )
}
}
-//////////////////////////////////////////////////////////////////////
-
SwChartLockController_Helper::SwChartLockController_Helper( SwDoc *pDocument ) :
pDoc( pDocument )
{
@@ -134,14 +127,12 @@ SwChartLockController_Helper::SwChartLockController_Helper( SwDoc *pDocument ) :
aUnlockTimer.SetTimeoutHdl( LINK( this, SwChartLockController_Helper, DoUnlockAllCharts ));
}
-
SwChartLockController_Helper::~SwChartLockController_Helper()
{
if (pDoc) // still connected?
Disconnect();
}
-
void SwChartLockController_Helper::StartOrContinueLocking()
{
if (!bIsLocked)
@@ -149,7 +140,6 @@ void SwChartLockController_Helper::StartOrContinueLocking()
aUnlockTimer.Start(); // start or continue time of locking
}
-
void SwChartLockController_Helper::Disconnect()
{
aUnlockTimer.Stop();
@@ -157,7 +147,6 @@ void SwChartLockController_Helper::Disconnect()
pDoc = 0;
}
-
void SwChartLockController_Helper::LockUnlockAllCharts( sal_Bool bLock )
{
if (!pDoc)
@@ -207,23 +196,18 @@ void SwChartLockController_Helper::LockUnlockAllCharts( sal_Bool bLock )
bIsLocked = bLock;
}
-
IMPL_LINK( SwChartLockController_Helper, DoUnlockAllCharts, Timer *, /*pTimer*/ )
{
UnlockAllCharts();
return 0;
}
-
-//////////////////////////////////////////////////////////////////////
-
static osl::Mutex & GetChartMutex()
{
static osl::Mutex aMutex;
return aMutex;
}
-
static void LaunchModifiedEvent(
::cppu::OInterfaceContainerHelper &rICH,
const uno::Reference< uno::XInterface > &rxI )
@@ -238,8 +222,6 @@ static void LaunchModifiedEvent(
}
}
-//////////////////////////////////////////////////////////////////////
-
// rCellRangeName needs to be of one of the following formats:
// - e.g. "A2:E5" or
// - e.g. "Table1.A2:E5"
@@ -268,7 +250,6 @@ sal_Bool FillRangeDescriptor(
return sal_True;
}
-
static String GetCellRangeName( SwFrmFmt &rTblFmt, SwUnoCrsr &rTblCrsr )
{
String aRes;
@@ -317,7 +298,6 @@ static String GetCellRangeName( SwFrmFmt &rTblFmt, SwUnoCrsr &rTblCrsr )
return aRes;
}
-
static String GetRangeRepFromTableAndCells( const String &rTableName,
const String &rStartCell, const String &rEndCell,
sal_Bool bForceEndCellName )
@@ -342,7 +322,6 @@ static String GetRangeRepFromTableAndCells( const String &rTableName,
return aRes;
}
-
static sal_Bool GetTableAndCellsFromRangeRep(
const OUString &rRangeRepresentation,
String &rTblName,
@@ -393,7 +372,6 @@ static sal_Bool GetTableAndCellsFromRangeRep(
return bSuccess;
}
-
static void GetTableByName( const SwDoc &rDoc, const String &rTableName,
SwFrmFmt **ppTblFmt, SwTable **ppTable)
{
@@ -416,7 +394,6 @@ static void GetTableByName( const SwDoc &rDoc, const String &rTableName,
*ppTable = pTblFmt ? SwTable::FindTable( pTblFmt ) : 0;
}
-
static void GetFormatAndCreateCursorFromRangeRep(
const SwDoc *pDoc,
const OUString &rRangeRepresentation, // must be a single range (i.e. so called sub-range)
@@ -497,7 +474,6 @@ static void GetFormatAndCreateCursorFromRangeRep(
}
}
-
static sal_Bool GetSubranges( const OUString &rRangeRepresentation,
uno::Sequence< OUString > &rSubRanges, sal_Bool bNormalize )
{
@@ -545,7 +521,6 @@ static sal_Bool GetSubranges( const OUString &rRangeRepresentation,
return bRes;
}
-
static void SortSubranges( uno::Sequence< OUString > &rSubRanges, sal_Bool bCmpByColumn )
{
sal_Int32 nLen = rSubRanges.getLength();
@@ -592,8 +567,6 @@ static void SortSubranges( uno::Sequence< OUString > &rSubRanges, sal_Bool bCmpB
}
}
-//////////////////////////////////////////////////////////////////////
-
SwChartDataProvider::SwChartDataProvider( const SwDoc* pSwDoc ) :
aEvtListeners( GetChartMutex() ),
pDoc( pSwDoc )
@@ -601,7 +574,6 @@ SwChartDataProvider::SwChartDataProvider( const SwDoc* pSwDoc ) :
bDisposed = sal_False;
}
-
SwChartDataProvider::~SwChartDataProvider()
{
}
@@ -610,7 +582,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
const uno::Sequence< beans::PropertyValue >& rArguments, sal_Bool bTestOnly )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -633,7 +605,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
const beans::PropertyValue *pArg = rArguments.getConstArray();
for (sal_Int32 i = 0; i < nArgs; ++i)
{
- if (pArg[i].Name.equalsAscii( "DataRowSource" ))
+ if (pArg[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DataRowSource")))
{
chart::ChartDataRowSource eSource;
if (!(pArg[i].Value >>= eSource))
@@ -645,22 +617,22 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
}
bDtaSrcIsColumns = eSource == chart::ChartDataRowSource_COLUMNS;
}
- else if (pArg[i].Name.equalsAscii( "FirstCellAsLabel" ))
+ else if (pArg[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FirstCellAsLabel")))
{
if (!(pArg[i].Value >>= bFirstIsLabel))
throw lang::IllegalArgumentException();
}
- else if (pArg[i].Name.equalsAscii( "CellRangeRepresentation" ))
+ else if (pArg[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CellRangeRepresentation")))
{
if (!(pArg[i].Value >>= aRangeRepresentation))
throw lang::IllegalArgumentException();
}
- else if (pArg[i].Name.equalsAscii( "SequenceMapping" ))
+ else if (pArg[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SequenceMapping")))
{
if (!(pArg[i].Value >>= aSequenceMapping))
throw lang::IllegalArgumentException();
}
- else if (pArg[i].Name.equalsAscii( "ChartOleObjectName" ))
+ else if (pArg[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ChartOleObjectName")))
{
if (!(pArg[i].Value >>= aChartOleObjectName))
throw lang::IllegalArgumentException();
@@ -1028,7 +1000,7 @@ sal_Bool SAL_CALL SwChartDataProvider::createDataSourcePossible(
const uno::Sequence< beans::PropertyValue >& rArguments )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
sal_Bool bPossible = sal_True;
try
@@ -1047,7 +1019,7 @@ uno::Reference< chart2::data::XDataSource > SAL_CALL SwChartDataProvider::create
const uno::Sequence< beans::PropertyValue >& rArguments )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return Impl_createDataSource( rArguments );
}
@@ -1094,7 +1066,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
const uno::Reference< chart2::data::XDataSource >& xDataSource )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -1131,13 +1103,12 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
// be determined)
// -1: don't know yet, 0: not used, 1: always a single labe cell, ...
// -2: neither/failed
-// sal_Int32 nValuesSeqLen = -1; // used to see if all value sequences have the same size
for (sal_Int32 nDS1 = 0; nDS1 < nNumDS_LDS; ++nDS1)
{
uno::Reference< chart2::data::XLabeledDataSequence > xLabeledDataSequence( pDS_LDS[nDS1] );
if( !xLabeledDataSequence.is() )
{
- DBG_ERROR("got NULL for XLabeledDataSequence from Data source");
+ OSL_FAIL("got NULL for XLabeledDataSequence from Data source");
continue;
}
const uno::Reference< chart2::data::XDataSequence > xCurLabel( xLabeledDataSequence->getLabel(), uno::UNO_QUERY );
@@ -1200,6 +1171,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
{
DBG_ASSERT( nCurLabelSeqLen == 0 && nCurValuesSeqLen == 1,
"trying to determine 'DataRowSource': something's fishy... should have been a single cell");
+ (void)nCurValuesSeqLen;
nDirection = 0; // default direction for a single cell should be 'columns'
}
else // more than one cell is availabale (in values and label together!)
@@ -1210,7 +1182,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
nDirection = 0;
else
{
- DBG_ERROR( "trying to determine 'DataRowSource': unexpected case found" );
+ OSL_FAIL( "trying to determine 'DataRowSource': unexpected case found" );
nDirection = -2;
}
}
@@ -1400,19 +1372,6 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
if (!bNeedSequenceMapping)
aSequenceMapping.realloc(0);
-
-#ifdef TL_NOT_USED // in the end chart2 did not want to have the sequence minimized
- // try to shorten the 'SequenceMapping' as much as possible
- sal_Int32 k;
- for (k = nNumDS_LDS - 1; k >= 0; --k)
- {
- if (pSequenceMapping[k] != k)
- break;
- }
- aSequenceMapping.realloc( k + 1 );
-#endif
-
-
//
// build resulting properties
//
@@ -1487,7 +1446,7 @@ sal_Bool SAL_CALL SwChartDataProvider::createDataSequenceByRangeRepresentationPo
const OUString& rRangeRepresentation )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
sal_Bool bPossible = sal_True;
try
@@ -1506,11 +1465,10 @@ uno::Reference< chart2::data::XDataSequence > SAL_CALL SwChartDataProvider::crea
const OUString& rRangeRepresentation )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return Impl_createDataSequenceByRangeRepresentation( rRangeRepresentation );
}
-
uno::Reference< sheet::XRangeSelection > SAL_CALL SwChartDataProvider::getRangeSelection( )
throw (uno::RuntimeException)
{
@@ -1518,7 +1476,6 @@ uno::Reference< sheet::XRangeSelection > SAL_CALL SwChartDataProvider::getRangeS
return uno::Reference< sheet::XRangeSelection >();
}
-
void SAL_CALL SwChartDataProvider::dispose( )
throw (uno::RuntimeException)
{
@@ -1547,7 +1504,6 @@ void SAL_CALL SwChartDataProvider::dispose( )
}
}
-
void SAL_CALL SwChartDataProvider::addEventListener(
const uno::Reference< lang::XEventListener >& rxListener )
throw (uno::RuntimeException)
@@ -1557,7 +1513,6 @@ void SAL_CALL SwChartDataProvider::addEventListener(
aEvtListeners.addInterface( rxListener );
}
-
void SAL_CALL SwChartDataProvider::removeEventListener(
const uno::Reference< lang::XEventListener >& rxListener )
throw (uno::RuntimeException)
@@ -1567,53 +1522,45 @@ void SAL_CALL SwChartDataProvider::removeEventListener(
aEvtListeners.removeInterface( rxListener );
}
-
-
OUString SAL_CALL SwChartDataProvider::getImplementationName( )
throw (uno::RuntimeException)
{
return C2U("SwChartDataProvider");
}
-
sal_Bool SAL_CALL SwChartDataProvider::supportsService(
const OUString& rServiceName )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
- return rServiceName.equalsAscii( SN_DATA_PROVIDER );
+ SolarMutexGuard aGuard;
+ return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SN_DATA_PROVIDER ) );
}
-
uno::Sequence< OUString > SAL_CALL SwChartDataProvider::getSupportedServiceNames( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
uno::Sequence< OUString > aRes(1);
aRes.getArray()[0] = C2U( SN_DATA_PROVIDER );
return aRes;
}
-
void SwChartDataProvider::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
// actually this function should be superfluous (need to check later)
ClientModify(this, pOld, pNew );
}
-
void SwChartDataProvider::AddDataSequence( const SwTable &rTable, uno::Reference< chart2::data::XDataSequence > &rxDataSequence )
{
aDataSequences[ &rTable ].insert( rxDataSequence );
}
-
void SwChartDataProvider::RemoveDataSequence( const SwTable &rTable, uno::Reference< chart2::data::XDataSequence > &rxDataSequence )
{
aDataSequences[ &rTable ].erase( rxDataSequence );
}
-
void SwChartDataProvider::InvalidateTable( const SwTable *pTable )
{
DBG_ASSERT( pTable, "table pointer is NULL" );
@@ -1623,10 +1570,9 @@ void SwChartDataProvider::InvalidateTable( const SwTable *pTable )
pTable->GetFrmFmt()->GetDoc()->GetChartControllerHelper().StartOrContinueLocking();
const Set_DataSequenceRef_t &rSet = aDataSequences[ pTable ];
- Set_DataSequenceRef_t::iterator aIt( rSet.begin() );
+ Set_DataSequenceRef_t::const_iterator aIt( rSet.begin() );
while (aIt != rSet.end())
{
-// uno::Reference< util::XModifiable > xRef( uno::Reference< chart2::data::XDataSequence >(*aIt), uno::UNO_QUERY );
uno::Reference< chart2::data::XDataSequence > xTemp(*aIt); // temporary needed for g++ 3.3.5
uno::Reference< util::XModifiable > xRef( xTemp, uno::UNO_QUERY );
if (xRef.is())
@@ -1639,7 +1585,6 @@ void SwChartDataProvider::InvalidateTable( const SwTable *pTable )
}
}
-
sal_Bool SwChartDataProvider::DeleteBox( const SwTable *pTable, const SwTableBox &rBox )
{
sal_Bool bRes = sal_False;
@@ -1661,7 +1606,6 @@ sal_Bool SwChartDataProvider::DeleteBox( const SwTable *pTable, const SwTableBox
sal_Bool bNowEmpty = sal_False;
// check if weak reference is still valid...
-// uno::Reference< chart2::data::XDataSequence > xRef( uno::Reference< chart2::data::XDataSequence>(*aIt), uno::UNO_QUERY );
uno::Reference< chart2::data::XDataSequence > xTemp(*aIt); // temporary needed for g++ 3.3.5
uno::Reference< chart2::data::XDataSequence > xRef( xTemp, uno::UNO_QUERY );
if (xRef.is())
@@ -1691,7 +1635,6 @@ sal_Bool SwChartDataProvider::DeleteBox( const SwTable *pTable, const SwTableBox
return bRes;
}
-
void SwChartDataProvider::DisposeAllDataSequences( const SwTable *pTable )
{
DBG_ASSERT( pTable, "table pointer is NULL" );
@@ -1706,11 +1649,10 @@ void SwChartDataProvider::DisposeAllDataSequences( const SwTable *pTable )
//! would become invalid.
const Set_DataSequenceRef_t aSet( aDataSequences[ pTable ] );
- Set_DataSequenceRef_t::iterator aIt( aSet.begin() );
- Set_DataSequenceRef_t::iterator aEndIt( aSet.end() );
+ Set_DataSequenceRef_t::const_iterator aIt( aSet.begin() );
+ Set_DataSequenceRef_t::const_iterator aEndIt( aSet.end() );
while (aIt != aEndIt)
{
-// uno::Reference< lang::XComponent > xRef( uno::Reference< chart2::data::XDataSequence >(*aIt), uno::UNO_QUERY );
uno::Reference< chart2::data::XDataSequence > xTemp(*aIt); // temporary needed for g++ 3.3.5
uno::Reference< lang::XComponent > xRef( xTemp, uno::UNO_QUERY );
if (xRef.is())
@@ -1722,7 +1664,6 @@ void SwChartDataProvider::DisposeAllDataSequences( const SwTable *pTable )
}
}
-
////////////////////////////////////////
// SwChartDataProvider::AddRowCols tries to notify charts of added columns
// or rows and extends the value sequence respectively (if possible).
@@ -1759,9 +1700,9 @@ void SwChartDataProvider::AddRowCols(
SwTableBox* pFirstBox = *( rBoxes.GetData() + 0 );
SwTableBox* pLastBox = *( rBoxes.GetData() + nBoxes - 1 );
- sal_Int32 nFirstCol = -1, nFirstRow = -1, nLastCol = -1, nLastRow = -1;
if (pFirstBox && pLastBox)
{
+ sal_Int32 nFirstCol = -1, nFirstRow = -1, nLastCol = -1, nLastRow = -1;
lcl_GetCellPosition( pFirstBox->GetName(), nFirstCol, nFirstRow );
lcl_GetCellPosition( pLastBox->GetName(), nLastCol, nLastRow );
@@ -1772,24 +1713,19 @@ void SwChartDataProvider::AddRowCols(
{
//get range of indices in col/rows for new cells
sal_Int32 nFirstNewCol = nFirstCol;
- sal_Int32 nLastNewCol = nLastCol;
sal_Int32 nFirstNewRow = bBehind ? nFirstRow + 1 : nFirstRow - nLines;
- sal_Int32 nLastNewRow = nFirstNewRow - 1 + nLines;
if (bAddCols)
{
DBG_ASSERT( nFirstCol == nLastCol, "column indices seem broken" );
nFirstNewCol = bBehind ? nFirstCol + 1 : nFirstCol - nLines;
- nLastNewCol = nFirstNewCol - 1 + nLines;
nFirstNewRow = nFirstRow;
- nLastNewRow = nLastRow;
}
// iterate over all data-sequences for the table
const Set_DataSequenceRef_t &rSet = aDataSequences[ &rTable ];
- Set_DataSequenceRef_t::iterator aIt( rSet.begin() );
+ Set_DataSequenceRef_t::const_iterator aIt( rSet.begin() );
while (aIt != rSet.end())
{
-// uno::Reference< chart2::data::XTextualDataSequence > xRef( uno::Reference< chart2::data::XDataSequence >(*aIt), uno::UNO_QUERY );
uno::Reference< chart2::data::XDataSequence > xTemp(*aIt); // temporary needed for g++ 3.3.5
uno::Reference< chart2::data::XTextualDataSequence > xRef( xTemp, uno::UNO_QUERY );
if (xRef.is())
@@ -1834,13 +1770,11 @@ void SwChartDataProvider::AddRowCols(
}
}
-
// XRangeXMLConversion ---------------------------------------------------
-
rtl::OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const rtl::OUString& rRangeRepresentation )
throw ( uno::RuntimeException, lang::IllegalArgumentException )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -1855,14 +1789,9 @@ rtl::OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const rtl::OUStri
{
String aRange( aRangeRepresentation.GetToken(i, ';') );
SwFrmFmt *pTblFmt = 0; // pointer to table format
- // BM: For what should the check be necessary? for #i79009# it is required that NO check is done
-// SwUnoCrsr *pUnoCrsr = 0; // here required to check if the cells in the range do actually exist
-// std::auto_ptr< SwUnoCrsr > pAuto( pUnoCrsr ); // to end lifetime of object pointed to by pUnoCrsr
GetFormatAndCreateCursorFromRangeRep( pDoc, aRange, &pTblFmt, NULL );
if (!pTblFmt)
throw lang::IllegalArgumentException();
-// if (!pUnoCrsr)
-// throw uno::RuntimeException();
SwTable* pTable = SwTable::FindTable( pTblFmt );
if (pTable->IsTblComplex())
throw uno::RuntimeException();
@@ -1913,7 +1842,7 @@ rtl::OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const rtl::OUStri
rtl::OUString SAL_CALL SwChartDataProvider::convertRangeFromXML( const rtl::OUString& rXMLRange )
throw ( uno::RuntimeException, lang::IllegalArgumentException )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -1958,58 +1887,47 @@ rtl::OUString SAL_CALL SwChartDataProvider::convertRangeFromXML( const rtl::OUSt
return aRes;
}
-
-//////////////////////////////////////////////////////////////////////
-
SwChartDataSource::SwChartDataSource(
const uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > &rLDS ) :
aLDS( rLDS )
{
}
-
SwChartDataSource::~SwChartDataSource()
{
-// delete pTblCrsr;
}
-
uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > SAL_CALL SwChartDataSource::getDataSequences( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return aLDS;
}
-
OUString SAL_CALL SwChartDataSource::getImplementationName( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return C2U("SwChartDataSource");
}
-
sal_Bool SAL_CALL SwChartDataSource::supportsService(
const OUString& rServiceName )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
- return rServiceName.equalsAscii( SN_DATA_SOURCE );
+ SolarMutexGuard aGuard;
+ return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SN_DATA_SOURCE ) );
}
-
uno::Sequence< OUString > SAL_CALL SwChartDataSource::getSupportedServiceNames( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
uno::Sequence< OUString > aRes(1);
aRes.getArray()[0] = C2U( SN_DATA_SOURCE );
return aRes;
}
-//////////////////////////////////////////////////////////////////////
-
SwChartDataSequence::SwChartDataSequence(
SwChartDataProvider &rProvider,
SwFrmFmt &rTblFmt,
@@ -2038,7 +1956,7 @@ SwChartDataSequence::SwChartDataSequence(
pDataProvider->addEventListener( dynamic_cast< lang::XEventListener * >(this) );
}
else {
- DBG_ERROR( "table missing" );
+ OSL_FAIL( "table missing" );
}
}
catch (uno::RuntimeException &)
@@ -2061,7 +1979,6 @@ SwChartDataSequence::SwChartDataSequence(
#endif
}
-
SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) :
SwChartDataSequenceBaseClass(),
SwClient( rObj.GetFrmFmt() ),
@@ -2089,7 +2006,7 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) :
pDataProvider->addEventListener( dynamic_cast< lang::XEventListener * >(this) );
}
else {
- DBG_ERROR( "table missing" );
+ OSL_FAIL( "table missing" );
}
}
catch (uno::RuntimeException &)
@@ -2112,7 +2029,6 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) :
#endif
}
-
SwChartDataSequence::~SwChartDataSequence()
{
// since the data-provider holds only weak references to the data-sequence
@@ -2121,14 +2037,12 @@ SwChartDataSequence::~SwChartDataSequence()
delete pTblCrsr;
}
-
const uno::Sequence< sal_Int8 > & SwChartDataSequence::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-
sal_Int64 SAL_CALL SwChartDataSequence::getSomething( const uno::Sequence< sal_Int8 > &rId )
throw(uno::RuntimeException)
{
@@ -2141,11 +2055,10 @@ sal_Int64 SAL_CALL SwChartDataSequence::getSomething( const uno::Sequence< sal_I
return 0;
}
-
uno::Sequence< uno::Any > SAL_CALL SwChartDataSequence::getData( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -2171,11 +2084,10 @@ uno::Sequence< uno::Any > SAL_CALL SwChartDataSequence::getData( )
return aRes;
}
-
OUString SAL_CALL SwChartDataSequence::getSourceRangeRepresentation( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -2196,7 +2108,7 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::generateLabel(
chart2::data::LabelOrigin eLabelOrigin )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -2242,7 +2154,7 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::generateLabel(
bReturnEmptyTxt = nColSpan == nRowSpan;
}
else {
- DBG_ERROR( "unexpected case" );
+ OSL_FAIL( "unexpected case" );
}
// build label sequence
@@ -2307,12 +2219,10 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::generateLabel(
return 0;
}
-
-
uno::Sequence< OUString > SAL_CALL SwChartDataSequence::getTextualData( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -2338,11 +2248,10 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::getTextualData( )
return aRes;
}
-
uno::Sequence< double > SAL_CALL SwChartDataSequence::getNumericalData( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -2371,21 +2280,19 @@ uno::Sequence< double > SAL_CALL SwChartDataSequence::getNumericalData( )
return aRes;
}
-
uno::Reference< util::XCloneable > SAL_CALL SwChartDataSequence::createClone( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
return new SwChartDataSequence( *this );
}
-
uno::Reference< beans::XPropertySetInfo > SAL_CALL SwChartDataSequence::getPropertySetInfo( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -2393,13 +2300,12 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL SwChartDataSequence::getPrope
return xRes;
}
-
void SAL_CALL SwChartDataSequence::setPropertyValue(
const OUString& rPropertyName,
const uno::Any& rValue )
throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -2412,12 +2318,11 @@ void SAL_CALL SwChartDataSequence::setPropertyValue(
throw beans::UnknownPropertyException();
}
-
uno::Any SAL_CALL SwChartDataSequence::getPropertyValue(
const OUString& rPropertyName )
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -2430,72 +2335,60 @@ uno::Any SAL_CALL SwChartDataSequence::getPropertyValue(
return aRes;
}
-
void SAL_CALL SwChartDataSequence::addPropertyChangeListener(
const OUString& /*rPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ )
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- //vos::OGuard aGuard( Application::GetSolarMutex() );
- DBG_ERROR( "not implemented" );
+ OSL_FAIL( "not implemented" );
}
-
void SAL_CALL SwChartDataSequence::removePropertyChangeListener(
const OUString& /*rPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ )
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- //vos::OGuard aGuard( Application::GetSolarMutex() );
- DBG_ERROR( "not implemented" );
+ OSL_FAIL( "not implemented" );
}
-
void SAL_CALL SwChartDataSequence::addVetoableChangeListener(
const OUString& /*rPropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/ )
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- //vos::OGuard aGuard( Application::GetSolarMutex() );
- DBG_ERROR( "not implemented" );
+ OSL_FAIL( "not implemented" );
}
-
void SAL_CALL SwChartDataSequence::removeVetoableChangeListener(
const OUString& /*rPropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/ )
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- //vos::OGuard aGuard( Application::GetSolarMutex() );
- DBG_ERROR( "not implemented" );
+ OSL_FAIL( "not implemented" );
}
-
OUString SAL_CALL SwChartDataSequence::getImplementationName( )
throw (uno::RuntimeException)
{
return C2U("SwChartDataSequence");
}
-
sal_Bool SAL_CALL SwChartDataSequence::supportsService(
const OUString& rServiceName )
throw (uno::RuntimeException)
{
- return rServiceName.equalsAscii( SN_DATA_SEQUENCE );
+ return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SN_DATA_SEQUENCE ) );
}
-
uno::Sequence< OUString > SAL_CALL SwChartDataSequence::getSupportedServiceNames( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
uno::Sequence< OUString > aRes(1);
aRes.getArray()[0] = C2U( SN_DATA_SEQUENCE );
return aRes;
}
-
void SwChartDataSequence::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew );
@@ -2512,23 +2405,21 @@ void SwChartDataSequence::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
-
sal_Bool SAL_CALL SwChartDataSequence::isModified( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
return sal_True;
}
-
void SAL_CALL SwChartDataSequence::setModified(
::sal_Bool bModified )
throw (beans::PropertyVetoException, uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -2536,7 +2427,6 @@ void SAL_CALL SwChartDataSequence::setModified(
LaunchModifiedEvent( aModifyListeners, dynamic_cast< XModifyBroadcaster * >(this) );
}
-
void SAL_CALL SwChartDataSequence::addModifyListener(
const uno::Reference< util::XModifyListener >& rxListener )
throw (uno::RuntimeException)
@@ -2546,7 +2436,6 @@ void SAL_CALL SwChartDataSequence::addModifyListener(
aModifyListeners.addInterface( rxListener );
}
-
void SAL_CALL SwChartDataSequence::removeModifyListener(
const uno::Reference< util::XModifyListener >& rxListener )
throw (uno::RuntimeException)
@@ -2556,7 +2445,6 @@ void SAL_CALL SwChartDataSequence::removeModifyListener(
aModifyListeners.removeInterface( rxListener );
}
-
void SAL_CALL SwChartDataSequence::disposing( const lang::EventObject& rSource )
throw (uno::RuntimeException)
{
@@ -2569,7 +2457,6 @@ void SAL_CALL SwChartDataSequence::disposing( const lang::EventObject& rSource )
}
}
-
void SAL_CALL SwChartDataSequence::dispose( )
throw (uno::RuntimeException)
{
@@ -2592,7 +2479,7 @@ void SAL_CALL SwChartDataSequence::dispose( )
pDataProvider->RemoveDataSequence( *pTable, xRef );
}
else {
- DBG_ERROR( "table missing" );
+ OSL_FAIL( "table missing" );
}
}
@@ -2603,7 +2490,6 @@ void SAL_CALL SwChartDataSequence::dispose( )
}
}
-
void SAL_CALL SwChartDataSequence::addEventListener(
const uno::Reference< lang::XEventListener >& rxListener )
throw (uno::RuntimeException)
@@ -2613,7 +2499,6 @@ void SAL_CALL SwChartDataSequence::addEventListener(
aEvtListeners.addInterface( rxListener );
}
-
void SAL_CALL SwChartDataSequence::removeEventListener(
const uno::Reference< lang::XEventListener >& rxListener )
throw (uno::RuntimeException)
@@ -2623,7 +2508,6 @@ void SAL_CALL SwChartDataSequence::removeEventListener(
aEvtListeners.removeInterface( rxListener );
}
-
sal_Bool SwChartDataSequence::DeleteBox( const SwTableBox &rBox )
{
#if OSL_DEBUG_LEVEL > 1
@@ -2682,7 +2566,7 @@ sal_Bool SwChartDataSequence::DeleteBox( const SwTableBox &rBox )
bMoveLeft = nMarkCol > nPointCol;
}
else {
- DBG_ERROR( "neither vertical nor horizontal movement" );
+ OSL_FAIL( "neither vertical nor horizontal movement" );
}
// get new box (position) to use...
@@ -2697,8 +2581,8 @@ sal_Bool SwChartDataSequence::DeleteBox( const SwTableBox &rBox )
if (pNewBox) // set new position (cell range) to use
{
- // So erhält man den ersten Inhaltsnode in einer gegebenen Zelle:
- // Zunächst einen SwNodeIndex auf den Node hinter dem SwStartNode der Box...
+ // So erh lt man den ersten Inhaltsnode in einer gegebenen Zelle:
+ // Zun chst einen SwNodeIndex auf den Node hinter dem SwStartNode der Box...
SwNodeIndex aIdx( *pNewBox->GetSttNd(), +1 );
// Dies kann ein SwCntntNode sein, kann aber auch ein Tabellen oder Sectionnode sein,
// deshalb das GoNext;
@@ -2721,18 +2605,17 @@ sal_Bool SwChartDataSequence::DeleteBox( const SwTableBox &rBox )
pPos->nContent = aNewPos.nContent;
}
else {
- DBG_ERROR( "neither point nor mark available for change" );
+ OSL_FAIL( "neither point nor mark available for change" );
}
}
else {
- DBG_ERROR( "failed to get position" );
+ OSL_FAIL( "failed to get position" );
}
}
return bNowEmpty;
}
-
void SwChartDataSequence::FillRangeDesc( SwRangeDescriptor &rRangeDesc ) const
{
SwFrmFmt* pTblFmt = GetFrmFmt();
@@ -2853,8 +2736,6 @@ bool SwChartDataSequence::ExtendTo( bool bExtendCol,
return bChanged;
}
-//////////////////////////////////////////////////////////////////////
-
SwChartLabeledDataSequence::SwChartLabeledDataSequence() :
aEvtListeners( GetChartMutex() ),
aModifyListeners( GetChartMutex() )
@@ -2862,22 +2743,19 @@ SwChartLabeledDataSequence::SwChartLabeledDataSequence() :
bDisposed = sal_False;
}
-
SwChartLabeledDataSequence::~SwChartLabeledDataSequence()
{
}
-
uno::Reference< chart2::data::XDataSequence > SAL_CALL SwChartLabeledDataSequence::getValues( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
return xData;
}
-
void SwChartLabeledDataSequence::SetDataSequence(
uno::Reference< chart2::data::XDataSequence >& rxDest,
const uno::Reference< chart2::data::XDataSequence >& rxSource)
@@ -2904,12 +2782,11 @@ void SwChartLabeledDataSequence::SetDataSequence(
xMB->addModifyListener( xML );
}
-
void SAL_CALL SwChartLabeledDataSequence::setValues(
const uno::Reference< chart2::data::XDataSequence >& rxSequence )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -2921,22 +2798,20 @@ void SAL_CALL SwChartLabeledDataSequence::setValues(
}
}
-
uno::Reference< chart2::data::XDataSequence > SAL_CALL SwChartLabeledDataSequence::getLabel( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
return xLabels;
}
-
void SAL_CALL SwChartLabeledDataSequence::setLabel(
const uno::Reference< chart2::data::XDataSequence >& rxSequence )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -2948,11 +2823,10 @@ void SAL_CALL SwChartLabeledDataSequence::setLabel(
}
}
-
uno::Reference< util::XCloneable > SAL_CALL SwChartLabeledDataSequence::createClone( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (bDisposed)
throw lang::DisposedException();
@@ -2976,32 +2850,28 @@ uno::Reference< util::XCloneable > SAL_CALL SwChartLabeledDataSequence::createCl
return xRes;
}
-
OUString SAL_CALL SwChartLabeledDataSequence::getImplementationName( )
throw (uno::RuntimeException)
{
return C2U("SwChartLabeledDataSequence");
}
-
sal_Bool SAL_CALL SwChartLabeledDataSequence::supportsService(
const OUString& rServiceName )
throw (uno::RuntimeException)
{
- return rServiceName.equalsAscii( SN_LABELED_DATA_SEQUENCE );
+ return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SN_LABELED_DATA_SEQUENCE ) );
}
-
uno::Sequence< OUString > SAL_CALL SwChartLabeledDataSequence::getSupportedServiceNames( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
uno::Sequence< OUString > aRes(1);
aRes.getArray()[0] = C2U( SN_LABELED_DATA_SEQUENCE );
return aRes;
}
-
void SAL_CALL SwChartLabeledDataSequence::disposing(
const lang::EventObject& rSource )
throw (uno::RuntimeException)
@@ -3016,7 +2886,6 @@ void SAL_CALL SwChartLabeledDataSequence::disposing(
dispose();
}
-
void SAL_CALL SwChartLabeledDataSequence::modified(
const lang::EventObject& rEvent )
throw (uno::RuntimeException)
@@ -3027,7 +2896,6 @@ void SAL_CALL SwChartLabeledDataSequence::modified(
}
}
-
void SAL_CALL SwChartLabeledDataSequence::addModifyListener(
const uno::Reference< util::XModifyListener >& rxListener )
throw (uno::RuntimeException)
@@ -3037,7 +2905,6 @@ void SAL_CALL SwChartLabeledDataSequence::addModifyListener(
aModifyListeners.addInterface( rxListener );
}
-
void SAL_CALL SwChartLabeledDataSequence::removeModifyListener(
const uno::Reference< util::XModifyListener >& rxListener )
throw (uno::RuntimeException)
@@ -3047,7 +2914,6 @@ void SAL_CALL SwChartLabeledDataSequence::removeModifyListener(
aModifyListeners.removeInterface( rxListener );
}
-
void SAL_CALL SwChartLabeledDataSequence::dispose( )
throw (uno::RuntimeException)
{
@@ -3069,7 +2935,6 @@ void SAL_CALL SwChartLabeledDataSequence::dispose( )
}
}
-
void SAL_CALL SwChartLabeledDataSequence::addEventListener(
const uno::Reference< lang::XEventListener >& rxListener )
throw (uno::RuntimeException)
@@ -3079,7 +2944,6 @@ void SAL_CALL SwChartLabeledDataSequence::addEventListener(
aEvtListeners.addInterface( rxListener );
}
-
void SAL_CALL SwChartLabeledDataSequence::removeEventListener(
const uno::Reference< lang::XEventListener >& rxListener )
throw (uno::RuntimeException)
@@ -3089,4 +2953,4 @@ void SAL_CALL SwChartLabeledDataSequence::removeEventListener(
aEvtListeners.removeInterface( rxListener );
}
-//////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 1d65ee99c812..5b96e7247070 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <swtypes.hxx>
#include <cmdid.h>
#include <hintids.hxx>
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
#include <doc.hxx>
#include <docary.hxx>
#include <fmtcol.hxx>
@@ -49,7 +48,7 @@
#include <txtftn.hxx>
#include <fmtpdsc.hxx>
#include <pagedesc.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <com/sun/star/text/XTextTableCursor.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
#include <com/sun/star/text/TableColumnSeparator.hpp>
@@ -70,7 +69,7 @@
#include <unochart.hxx>
#include <comphelper/makesequence.hxx>
#include <comphelper/sequence.hxx>
-#include <slist>
+#include <list>
#include <iterator>
#include <unosection.hxx>
@@ -79,7 +78,16 @@
#include <unorefmark.hxx>
#include <unometa.hxx>
#include "docsh.hxx"
-
+#include <com/sun/star/document/XCodeNameQuery.hpp>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/form/XFormsSupplier.hpp>
+#include <com/sun/star/script/ModuleInfo.hpp>
+#include <com/sun/star/script/ModuleType.hpp>
+#include <com/sun/star/script/ScriptEventDescriptor.hpp>
+#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
+#include <vbahelper/vbaaccesshelper.hxx>
+#include <basic/basmgr.hxx>
+#include <comphelper/processfactory.hxx>
using ::rtl::OUString;
using namespace ::com::sun::star;
@@ -89,9 +97,186 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
-/******************************************************************************
- *
- ******************************************************************************/
+using rtl::OUString;
+
+class SwVbaCodeNameProvider : public ::cppu::WeakImplHelper1< document::XCodeNameQuery >
+{
+ SwDocShell* mpDocShell;
+ rtl::OUString msThisDocumentCodeName;
+public:
+ SwVbaCodeNameProvider( SwDocShell* pDocShell ) : mpDocShell( pDocShell ) {}
+ // XCodeNameQuery
+ rtl::OUString SAL_CALL getCodeNameForObject( const uno::Reference< uno::XInterface >& xIf ) throw( uno::RuntimeException )
+ {
+ // Initialise the code name
+ if ( msThisDocumentCodeName.getLength() == 0 )
+ {
+ try
+ {
+ uno::Reference< beans::XPropertySet > xProps( mpDocShell->GetModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xLibContainer( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BasicLibraries") ) ), uno::UNO_QUERY_THROW );
+ rtl::OUString sProjectName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Standard") ) );
+ if ( mpDocShell->GetBasicManager()->GetName().Len() )
+ sProjectName = mpDocShell->GetBasicManager()->GetName();
+
+ uno::Reference< container::XNameAccess > xLib( xLibContainer->getByName( sProjectName ), uno::UNO_QUERY_THROW );
+ uno::Sequence< rtl::OUString > sModuleNames = xLib->getElementNames();
+ uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY );
+
+ for ( sal_Int32 i=0; i < sModuleNames.getLength(); ++i )
+ {
+ script::ModuleInfo mInfo;
+
+ if ( xVBAModuleInfo->hasModuleInfo( sModuleNames[ i ] ) && xVBAModuleInfo->getModuleInfo( sModuleNames[ i ] ).ModuleType == script::ModuleType::DOCUMENT )
+ {
+ msThisDocumentCodeName = sModuleNames[ i ];
+ break;
+ }
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+ rtl::OUString sCodeName;
+ if ( mpDocShell )
+ {
+ OSL_TRACE( "*** In ScVbaCodeNameProvider::getCodeNameForObject");
+ // need to find the page ( and index ) for this control
+ uno::Reference< drawing::XDrawPageSupplier > xSupplier( mpDocShell->GetModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xIndex( xSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
+
+ bool bMatched = false;
+ uno::Sequence< script::ScriptEventDescriptor > aFakeEvents;
+ try
+ {
+ uno::Reference< form::XFormsSupplier > xFormSupplier( xIndex, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xFormIndex( xFormSupplier->getForms(), uno::UNO_QUERY_THROW );
+ // get the www-standard container
+ uno::Reference< container::XIndexAccess > xFormControls( xFormIndex->getByIndex(0), uno::UNO_QUERY_THROW );
+ sal_Int32 nCntrls = xFormControls->getCount();
+ for( sal_Int32 cIndex = 0; cIndex < nCntrls; ++cIndex )
+ {
+ uno::Reference< uno::XInterface > xControl( xFormControls->getByIndex( cIndex ), uno::UNO_QUERY_THROW );
+ bMatched = ( xControl == xIf );
+ if ( bMatched )
+ {
+ sCodeName = msThisDocumentCodeName;
+ break;
+ }
+ }
+ }
+ catch( uno::Exception& ) {}
+ }
+ // Probably should throw here ( if !bMatched )
+ return sCodeName;
+ }
+};
+
+typedef boost::unordered_map< rtl::OUString, rtl::OUString, rtl::OUStringHash > StringHashMap;
+class SwVbaProjectNameProvider : public ::cppu::WeakImplHelper1< container::XNameContainer >
+{
+ SwDocShell* mpDocShell;
+ StringHashMap mTemplateToProject;
+public:
+ SwVbaProjectNameProvider( SwDocShell* pDocShell ) : mpDocShell( pDocShell )
+ {
+ }
+ virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException )
+ {
+ return ( mTemplateToProject.find( aName ) != mTemplateToProject.end() );
+ }
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+ {
+ if ( !hasByName( aName ) )
+ throw container::NoSuchElementException();
+ return uno::makeAny( mTemplateToProject.find( aName )->second );
+ }
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (::com::sun::star::uno::RuntimeException)
+ {
+ uno::Sequence< rtl::OUString > aElements( mTemplateToProject.size() );
+ StringHashMap::iterator it_end = mTemplateToProject.end();
+ sal_Int32 index = 0;
+ for ( StringHashMap::iterator it = mTemplateToProject.begin(); it != it_end; ++it, ++index )
+ aElements[ index ] = it->first;
+ return aElements;
+ }
+
+ virtual void SAL_CALL insertByName( const rtl::OUString& aName, const uno::Any& aElement ) throw ( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::ElementExistException, com::sun::star::lang::WrappedTargetException )
+ {
+
+ rtl::OUString sProjectName;
+ aElement >>= sProjectName;
+ OSL_TRACE("** Template cache inserting template name %s with project %s"
+ , rtl::OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr()
+ , rtl::OUStringToOString( sProjectName, RTL_TEXTENCODING_UTF8 ).getStr() );
+ mTemplateToProject[ aName ] = sProjectName;
+ }
+
+ virtual void SAL_CALL removeByName( const rtl::OUString& Name ) throw ( com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException )
+ {
+ if ( !hasByName( Name ) )
+ throw container::NoSuchElementException();
+ mTemplateToProject.erase( Name );
+ }
+ virtual void SAL_CALL replaceByName( const rtl::OUString& aName, const uno::Any& aElement ) throw ( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException )
+ {
+ if ( !hasByName( aName ) )
+ throw container::NoSuchElementException();
+ insertByName( aName, aElement ); // insert will overwrite
+ }
+ // XElemenAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException)
+ {
+ return ::getCppuType((const rtl::OUString*)0);
+ }
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException )
+ {
+
+ return ( mTemplateToProject.size() > 0 );
+ }
+
+};
+
+class SwVbaObjectForCodeNameProvider : public ::cppu::WeakImplHelper1< container::XNameAccess >
+{
+ SwDocShell* mpDocShell;
+public:
+ SwVbaObjectForCodeNameProvider( SwDocShell* pDocShell ) : mpDocShell( pDocShell )
+ {
+ // #FIXME #TODO is the code name for ThisDocument read anywhere?
+ }
+
+ virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException )
+ {
+ // #FIXME #TODO we really need to be checking against the codename for
+ // ThisDocument
+ if ( aName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisDocument" ) ) ) )
+ return sal_True;
+ return sal_False;
+ }
+ ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+ {
+ if ( !hasByName( aName ) )
+ throw container::NoSuchElementException();
+ uno::Sequence< uno::Any > aArgs( 2 );
+ aArgs[0] = uno::Any( uno::Reference< uno::XInterface >() );
+ aArgs[1] = uno::Any( mpDocShell->GetModel() );
+ uno::Reference< uno::XInterface > xDocObj = ooo::vba::createVBAUnoAPIServiceWithArgs( mpDocShell, "ooo.vba.word.Document" , aArgs );
+ OSL_TRACE("Creating Object ( ooo.vba.word.Document ) 0x%x", xDocObj.get() );
+ return uno::makeAny( xDocObj );
+ }
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (::com::sun::star::uno::RuntimeException)
+ {
+ uno::Sequence< rtl::OUString > aNames;
+ return aNames;
+ }
+ // XElemenAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException){ return uno::Type(); }
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException ) { return sal_True; }
+
+};
+
struct ProvNamesId_Type
{
const char * pName;
@@ -99,7 +284,7 @@ struct ProvNamesId_Type
};
// note: this thing is indexed as an array, so do not insert/remove entries!
-const ProvNamesId_Type __FAR_DATA aProvNamesId[] =
+const ProvNamesId_Type aProvNamesId[] =
{
{ "com.sun.star.text.TextTable", SW_SERVICE_TYPE_TEXTTABLE },
{ "com.sun.star.text.TextFrame", SW_SERVICE_TYPE_TEXTFRAME },
@@ -211,6 +396,10 @@ const ProvNamesId_Type __FAR_DATA aProvNamesId[] =
{ "com.sun.star.text.Fieldmark", SW_SERVICE_TYPE_FIELDMARK },
{ "com.sun.star.text.FormFieldmark", SW_SERVICE_TYPE_FORMFIELDMARK },
{ "com.sun.star.text.InContentMetadata", SW_SERVICE_TYPE_META },
+ { "ooo.vba.VBAObjectModuleObjectProvider", SW_SERVICE_VBAOBJECTPROVIDER },
+ { "ooo.vba.VBACodeNameProvider", SW_SERVICE_VBACODENAMEPROVIDER },
+ { "ooo.vba.VBAProjectNameProvider", SW_SERVICE_VBAPROJECTNAMEPROVIDER },
+ { "ooo.vba.VBAGlobals", SW_SERVICE_VBAGLOBALS },
// case-correct versions of the service names (see #i67811)
{ CSS_TEXT_TEXTFIELD_DATE_TIME, SW_SERVICE_FIELDTYPE_DATETIME },
@@ -272,9 +461,6 @@ const ProvNamesId_Type __FAR_DATA aProvNamesId[] =
{ CSS_TEXT_FIELDMASTER_BIBLIOGRAPHY, SW_SERVICE_FIELDMASTER_BIBLIOGRAPHY }
};
-/* -----------------------------23.03.01 13:38--------------------------------
-
- ---------------------------------------------------------------------------*/
const SvEventDescription* lcl_GetSupportedMacroItems()
{
static const SvEventDescription aMacroDescriptionsImpl[] =
@@ -290,30 +476,25 @@ const SvEventDescription* lcl_GetSupportedMacroItems()
/******************************************************************
* SwXServiceProvider
******************************************************************/
-/*-- 13.01.99 13:31:44---------------------------------------------------
-
- -----------------------------------------------------------------------*/
OUString SwXServiceProvider::GetProviderName(sal_uInt16 nObjectType)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
OUString sRet;
- sal_uInt16 nEntries = sizeof(aProvNamesId) / sizeof(aProvNamesId[0]);
+ sal_uInt16 nEntries = SAL_N_ELEMENTS(aProvNamesId);
if(nObjectType < nEntries)
- sRet = C2U(aProvNamesId[nObjectType].pName);
+ sRet = rtl::OUString::createFromAscii(aProvNamesId[nObjectType].pName);
return sRet;
}
-/* -----------------11.03.99 12:05-------------------
- *
- * --------------------------------------------------*/
+
uno::Sequence<OUString> SwXServiceProvider::GetAllServiceNames()
{
- sal_uInt16 nEntries = sizeof(aProvNamesId) / sizeof(aProvNamesId[0]);
+ sal_uInt16 nEntries = SAL_N_ELEMENTS(aProvNamesId);
uno::Sequence<OUString> aRet(nEntries);
OUString* pArray = aRet.getArray();
sal_uInt16 n = 0;
for(sal_uInt16 i = 0; i < nEntries; i++)
{
- String sProv(C2U(aProvNamesId[i].pName));
+ String sProv(rtl::OUString::createFromAscii(aProvNamesId[i].pName));
if(sProv.Len())
{
pArray[n] = sProv;
@@ -325,12 +506,9 @@ uno::Sequence<OUString> SwXServiceProvider::GetAllServiceNames()
}
-/*-- 13.01.99 13:31:45---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_uInt16 SwXServiceProvider::GetProviderType(const OUString& rServiceName)
{
- sal_uInt16 nEntries = sizeof(aProvNamesId) / sizeof(aProvNamesId[0]);
+ sal_uInt16 nEntries = SAL_N_ELEMENTS(aProvNamesId);
for(sal_uInt16 i = 0; i < nEntries; i++ )
{
if( COMPARE_EQUAL == rServiceName.compareToAscii(aProvNamesId[i].pName))
@@ -338,12 +516,10 @@ sal_uInt16 SwXServiceProvider::GetProviderType(const OUString& rServiceName)
}
return SW_SERVICE_INVALID;
}
-/* -----------------13.01.99 14:37-------------------
- *
- * --------------------------------------------------*/
+
uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc* pDoc)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< uno::XInterface > xRet;
switch(nObjectType)
{
@@ -391,6 +567,50 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16
xRet = (cppu::OWeakObject*)pFieldmark;
}
break;
+ case SW_SERVICE_VBAOBJECTPROVIDER :
+ {
+ SwVbaObjectForCodeNameProvider* pObjProv = new SwVbaObjectForCodeNameProvider( pDoc->GetDocShell() );
+ xRet = (cppu::OWeakObject*)pObjProv;
+ }
+ break;
+ case SW_SERVICE_VBACODENAMEPROVIDER :
+ {
+ if ( pDoc->GetDocShell() && ooo::vba::isAlienWordDoc( *pDoc->GetDocShell() ) )
+ {
+ SwVbaCodeNameProvider* pObjProv = new SwVbaCodeNameProvider( pDoc->GetDocShell() );
+ xRet = (cppu::OWeakObject*)pObjProv;
+ }
+ }
+ break;
+ case SW_SERVICE_VBAPROJECTNAMEPROVIDER :
+ {
+ uno::Reference< container::XNameContainer > xProjProv = pDoc->GetVBATemplateToProjectCache();
+ if ( !xProjProv.is() && pDoc->GetDocShell() && ooo::vba::isAlienWordDoc( *pDoc->GetDocShell() ) )
+ {
+ xProjProv = new SwVbaProjectNameProvider( pDoc->GetDocShell() );
+ pDoc->SetVBATemplateToProjectCache( xProjProv );
+ }
+ //xRet = (cppu::OWeakObject*)xProjProv;
+ xRet = xProjProv;
+ }
+ break;
+ case SW_SERVICE_VBAGLOBALS :
+ {
+ if ( pDoc )
+ {
+ uno::Any aGlobs;
+ if ( !pDoc->GetDocShell()->GetBasicManager()->GetGlobalUNOConstant( "VBAGlobals", aGlobs ) )
+ {
+ uno::Sequence< uno::Any > aArgs(1);
+ aArgs[ 0 ] <<= pDoc->GetDocShell()->GetModel();
+ aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Globals")), aArgs );
+ pDoc->GetDocShell()->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
+ }
+ aGlobs >>= xRet;
+ }
+ }
+ break;
+
case SW_SERVICE_TYPE_FOOTNOTE :
xRet = (cppu::OWeakObject*)new SwXFootnote(sal_False);
break;
@@ -620,44 +840,35 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16
}
return xRet;
}
+
/******************************************************************
* SwXTextTables
******************************************************************/
//SMART_UNO_IMPLEMENTATION( SwXTextTables, UsrObject );
-
-/*-- 13.01.99 12:56:24---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextTables::SwXTextTables(SwDoc* pDc) :
SwUnoCollection(pDc)
{
}
-/*-- 13.01.99 12:56:25---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextTables::~SwXTextTables()
{
}
-/*-- 13.01.99 12:56:25---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXTextTables::getCount(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int32 nRet = 0;
if(IsValid())
nRet = GetDoc()->GetTblFrmFmtCount(sal_True);
return nRet;
}
-/*-- 13.01.99 12:56:26---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL SwXTextTables::getByIndex(sal_Int32 nIndex)
throw( IndexOutOfBoundsException, WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
if(IsValid())
{
@@ -675,13 +886,11 @@ uno::Any SAL_CALL SwXTextTables::getByIndex(sal_Int32 nIndex)
throw uno::RuntimeException();
return aRet;
}
-/*-- 13.01.99 12:56:26---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXTextTables::getByName(const OUString& rItemName)
throw( NoSuchElementException, WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
if(IsValid())
{
@@ -706,13 +915,11 @@ uno::Any SwXTextTables::getByName(const OUString& rItemName)
throw uno::RuntimeException();
return aRet;
}
-/*-- 13.01.99 12:56:26---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXTextTables::getElementNames(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
sal_uInt16 nCount = GetDoc()->GetTblFrmFmtCount(sal_True);
@@ -729,13 +936,11 @@ uno::Sequence< OUString > SwXTextTables::getElementNames(void)
}
return aSeq;
}
-/*-- 13.01.99 12:56:27---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextTables::hasByName(const OUString& rName)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet= sal_False;
if(IsValid())
{
@@ -755,42 +960,32 @@ sal_Bool SwXTextTables::hasByName(const OUString& rName)
throw uno::RuntimeException();
return bRet;
}
-/*-- 13.01.99 12:56:27---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SAL_CALL
SwXTextTables::getElementType( )
throw(uno::RuntimeException)
{
return ::getCppuType((uno::Reference<XTextTable>*)0);
}
-/*-- 13.01.99 12:56:27---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextTables::hasElements(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
return 0 != GetDoc()->GetTblFrmFmtCount(sal_True);
}
-/* -----------------25.10.99 16:01-------------------
- --------------------------------------------------*/
OUString SwXTextTables::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXTextTables");
}
-/* -----------------25.10.99 16:01-------------------
- --------------------------------------------------*/
sal_Bool SwXTextTables::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return rServiceName == C2U("com.sun.star.text.TextTables");
}
-/* -----------------25.10.99 16:01-------------------
- --------------------------------------------------*/
uno::Sequence< OUString > SwXTextTables::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(1);
@@ -798,12 +993,10 @@ uno::Sequence< OUString > SwXTextTables::getSupportedServiceNames(void) throw( u
pArr[0] = C2U("com.sun.star.text.TextTables");
return aRet;
}
-/*-- 13.01.99 12:56:28---------------------------------------------------
- -----------------------------------------------------------------------*/
XTextTable* SwXTextTables::GetObject( SwFrmFmt& rFmt )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwXTextTable* pTbl = (SwXTextTable*)SwClientIter( rFmt ).
First( TYPE( SwXTextTable ));
if( !pTbl )
@@ -811,7 +1004,6 @@ XTextTable* SwXTextTables::GetObject( SwFrmFmt& rFmt )
return pTbl ;
}
-
/******************************************************************
* SwXFrameEnumeration
******************************************************************/
@@ -875,7 +1067,7 @@ namespace
: public SwSimpleEnumeration_Base
{
private:
- typedef ::std::slist< Any > frmcontainer_t;
+ typedef ::std::list< Any > frmcontainer_t;
frmcontainer_t m_aFrames;
protected:
virtual ~SwXFrameEnumeration() {};
@@ -897,7 +1089,7 @@ template<FlyCntType T>
SwXFrameEnumeration<T>::SwXFrameEnumeration(const SwDoc* const pDoc)
: m_aFrames()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const SwSpzFrmFmts* const pFmts = pDoc->GetSpzFrmFmts();
if(!pFmts->Count())
return;
@@ -929,14 +1121,14 @@ SwXFrameEnumeration<T>::SwXFrameEnumeration(const SwDoc* const pDoc)
template<FlyCntType T>
sal_Bool SwXFrameEnumeration<T>::hasMoreElements(void) throw( RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return !m_aFrames.empty();
}
template<FlyCntType T>
Any SwXFrameEnumeration<T>::nextElement(void) throw( NoSuchElementException, WrappedTargetException, RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_aFrames.empty())
throw NoSuchElementException();
Any aResult = *m_aFrames.begin();
@@ -990,7 +1182,7 @@ SwXFrames::~SwXFrames()
uno::Reference<container::XEnumeration> SwXFrames::createEnumeration(void) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
switch(eType)
@@ -1011,7 +1203,7 @@ uno::Reference<container::XEnumeration> SwXFrames::createEnumeration(void) throw
sal_Int32 SwXFrames::getCount(void) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
return GetDoc()->GetFlyCount(eType);
@@ -1020,7 +1212,7 @@ sal_Int32 SwXFrames::getCount(void) throw(uno::RuntimeException)
uno::Any SwXFrames::getByIndex(sal_Int32 nIndex)
throw(IndexOutOfBoundsException, WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
if(nIndex < 0 || nIndex >= USHRT_MAX)
@@ -1034,7 +1226,7 @@ uno::Any SwXFrames::getByIndex(sal_Int32 nIndex)
uno::Any SwXFrames::getByName(const OUString& rName)
throw(NoSuchElementException, WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
const SwFrmFmt* pFmt;
@@ -1057,7 +1249,7 @@ uno::Any SwXFrames::getByName(const OUString& rName)
uno::Sequence<OUString> SwXFrames::getElementNames(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
const Reference<XEnumeration> xEnum = createEnumeration();
@@ -1074,7 +1266,7 @@ uno::Sequence<OUString> SwXFrames::getElementNames(void) throw( uno::RuntimeExce
sal_Bool SwXFrames::hasByName(const OUString& rName) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
switch(eType)
@@ -1090,7 +1282,7 @@ sal_Bool SwXFrames::hasByName(const OUString& rName) throw( uno::RuntimeExceptio
uno::Type SAL_CALL SwXFrames::getElementType() throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
switch(eType)
{
case FLYCNTTYPE_FRM:
@@ -1106,7 +1298,7 @@ uno::Type SAL_CALL SwXFrames::getElementType() throw(uno::RuntimeException)
sal_Bool SwXFrames::hasElements(void) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
return GetDoc()->GetFlyCount(eType) > 0;
@@ -1132,23 +1324,16 @@ SwXFrame* SwXFrames::GetObject(SwFrmFmt& rFmt, FlyCntType eType)
/******************************************************************
* SwXTextFrames
******************************************************************/
-/* -----------------------------06.04.00 12:44--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXTextFrames::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXTextFrames");
}
-/* -----------------------------06.04.00 12:44--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXTextFrames::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.TextFrames") == rServiceName;
}
-/* -----------------------------06.04.00 12:44--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXTextFrames::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
@@ -1156,16 +1341,12 @@ Sequence< OUString > SwXTextFrames::getSupportedServiceNames(void) throw( Runtim
pArray[0] = C2U("com.sun.star.text.TextFrames");
return aRet;
}
-/*-- 14.01.99 08:06:16---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextFrames::SwXTextFrames(SwDoc* _pDoc) :
SwXFrames(_pDoc, FLYCNTTYPE_FRM)
{
}
-/*-- 14.01.99 08:06:17---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextFrames::~SwXTextFrames()
{
}
@@ -1174,24 +1355,16 @@ SwXTextFrames::~SwXTextFrames()
* SwXTextGraphicObjects
******************************************************************/
//SMART_UNO_IMPLEMENTATION( SwXTextGraphicObjects, UsrObject );
-
-/* -----------------------------06.04.00 12:44--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXTextGraphicObjects::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXTextGraphicObjects");
}
-/* -----------------------------06.04.00 12:44--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXTextGraphicObjects::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.TextGraphicObjects") == rServiceName;
}
-/* -----------------------------06.04.00 12:44--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXTextGraphicObjects::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
@@ -1199,16 +1372,12 @@ Sequence< OUString > SwXTextGraphicObjects::getSupportedServiceNames(void) throw
pArray[0] = C2U("com.sun.star.text.TextGraphicObjects");
return aRet;
}
-/*-- 14.01.99 08:45:53---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextGraphicObjects::SwXTextGraphicObjects(SwDoc* _pDoc) :
SwXFrames(_pDoc, FLYCNTTYPE_GRF)
{
}
-/*-- 14.01.99 08:45:54---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextGraphicObjects::~SwXTextGraphicObjects()
{
}
@@ -1216,23 +1385,16 @@ SwXTextGraphicObjects::~SwXTextGraphicObjects()
/******************************************************************
* SwXTextEmbeddedObjects
******************************************************************/
-/* -----------------------------06.04.00 12:44--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXTextEmbeddedObjects::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXTextEmbeddedObjects");
}
-/* -----------------------------06.04.00 12:44--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXTextEmbeddedObjects::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.TextEmbeddedObjects") == rServiceName;
}
-/* -----------------------------06.04.00 12:44--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXTextEmbeddedObjects::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
@@ -1240,41 +1402,28 @@ Sequence< OUString > SwXTextEmbeddedObjects::getSupportedServiceNames(void) thro
pArray[0] = C2U("com.sun.star.text.TextEmbeddedObjects");
return aRet;
}
-/*-- 14.01.99 08:45:13---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextEmbeddedObjects::SwXTextEmbeddedObjects(SwDoc* _pDoc) :
SwXFrames(_pDoc, FLYCNTTYPE_OLE)
{
}
-/*-- 14.01.99 08:45:31---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextEmbeddedObjects::~SwXTextEmbeddedObjects()
{
}
-/******************************************************************
- *
- ******************************************************************/
#define PASSWORD_STD_TIMEOUT 1000
-/* -----------------------------06.04.00 12:44--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXTextSections::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXTextSections");
}
-/* -----------------------------06.04.00 12:44--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXTextSections::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.TextSections") == rServiceName;
}
-/* -----------------------------06.04.00 12:44--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXTextSections::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
@@ -1282,25 +1431,19 @@ Sequence< OUString > SwXTextSections::getSupportedServiceNames(void) throw( Runt
pArray[0] = C2U("com.sun.star.text.TextSections");
return aRet;
}
-/*-- 14.01.99 09:06:05---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextSections::SwXTextSections(SwDoc* _pDoc) :
SwUnoCollection(_pDoc)
{
}
-/*-- 14.01.99 09:06:05---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextSections::~SwXTextSections()
{
}
-/*-- 14.01.99 09:06:05---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXTextSections::getCount(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
const SwSectionFmts& rSectFmts = GetDoc()->GetSections();
@@ -1312,13 +1455,11 @@ sal_Int32 SwXTextSections::getCount(void) throw( uno::RuntimeException )
}
return nCount;
}
-/*-- 14.01.99 09:06:06---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXTextSections::getByIndex(sal_Int32 nIndex)
throw( IndexOutOfBoundsException, WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< XTextSection > xRet;
if(IsValid())
{
@@ -1347,13 +1488,11 @@ uno::Any SwXTextSections::getByIndex(sal_Int32 nIndex)
throw uno::RuntimeException();
return makeAny(xRet);
}
-/*-- 14.01.99 09:06:06---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXTextSections::getByName(const OUString& Name)
throw( NoSuchElementException, WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
if(IsValid())
{
@@ -1378,13 +1517,11 @@ uno::Any SwXTextSections::getByName(const OUString& Name)
throw uno::RuntimeException();
return aRet;
}
-/*-- 14.01.99 09:06:06---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXTextSections::getElementNames(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
sal_uInt16 nCount = GetDoc()->GetSections().Count();
@@ -1413,13 +1550,11 @@ uno::Sequence< OUString > SwXTextSections::getElementNames(void)
}
return aSeq;
}
-/*-- 14.01.99 09:06:06---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextSections::hasByName(const OUString& Name)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
String aName(Name);
if(IsValid())
@@ -1443,19 +1578,15 @@ sal_Bool SwXTextSections::hasByName(const OUString& Name)
}
return bRet;
}
-/*-- 14.01.99 09:06:06---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SAL_CALL SwXTextSections::getElementType() throw(uno::RuntimeException)
{
return ::getCppuType((uno::Reference<XTextSection>*)0);
}
-/*-- 14.01.99 09:06:06---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextSections::hasElements(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_uInt16 nCount = 0;
if(IsValid())
{
@@ -1466,9 +1597,7 @@ sal_Bool SwXTextSections::hasElements(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return nCount > 0;
}
-/*-- 14.01.99 09:06:07---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< XTextSection > SwXTextSections::GetObject( SwSectionFmt& rFmt )
{
return SwXTextSection::CreateXTextSection(&rFmt);
@@ -1476,18 +1605,18 @@ uno::Reference< XTextSection > SwXTextSections::GetObject( SwSectionFmt& rFmt )
OUString SwXBookmarks::getImplementationName(void) throw( RuntimeException )
{
- return OUString::createFromAscii("SwXBookmarks");
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("SwXBookmarks"));
}
sal_Bool SwXBookmarks::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return OUString::createFromAscii("com.sun.star.text.Bookmarks") == rServiceName;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmarks")) == rServiceName;
}
Sequence< OUString > SwXBookmarks::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString::createFromAscii("com.sun.star.text.Bookmarks");
+ aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmarks"));
return aRet;
}
@@ -1501,24 +1630,24 @@ SwXBookmarks::~SwXBookmarks()
sal_Int32 SwXBookmarks::getCount(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
- return GetDoc()->getIDocumentMarkAccess()->getBookmarksCount();
+ return GetDoc()->getIDocumentMarkAccess()->getMarksCount();
}
uno::Any SwXBookmarks::getByIndex(sal_Int32 nIndex)
throw( IndexOutOfBoundsException, WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
IDocumentMarkAccess* const pMarkAccess = GetDoc()->getIDocumentMarkAccess();
- if(nIndex < 0 || nIndex >= pMarkAccess->getBookmarksCount())
+ if(nIndex < 0 || nIndex >= pMarkAccess->getMarksCount())
throw IndexOutOfBoundsException();
uno::Any aRet;
- ::sw::mark::IMark* pBkmk = pMarkAccess->getBookmarksBegin()[nIndex].get();
+ ::sw::mark::IMark* pBkmk = pMarkAccess->getMarksBegin()[nIndex].get();
const uno::Reference< text::XTextContent > xRef =
SwXBookmark::CreateXBookmark(*GetDoc(), *pBkmk);
aRet <<= xRef;
@@ -1528,13 +1657,13 @@ uno::Any SwXBookmarks::getByIndex(sal_Int32 nIndex)
uno::Any SwXBookmarks::getByName(const rtl::OUString& rName)
throw( NoSuchElementException, WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
IDocumentMarkAccess* const pMarkAccess = GetDoc()->getIDocumentMarkAccess();
- IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->findBookmark(rName);
- if(ppBkmk == pMarkAccess->getBookmarksEnd())
+ IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->findMark(rName);
+ if(ppBkmk == pMarkAccess->getMarksEnd())
throw NoSuchElementException();
uno::Any aRet;
@@ -1547,15 +1676,15 @@ uno::Any SwXBookmarks::getByName(const rtl::OUString& rName)
uno::Sequence< OUString > SwXBookmarks::getElementNames(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
IDocumentMarkAccess* const pMarkAccess = GetDoc()->getIDocumentMarkAccess();
- uno::Sequence<OUString> aSeq(pMarkAccess->getBookmarksCount());
+ uno::Sequence<OUString> aSeq(pMarkAccess->getMarksCount());
sal_Int32 nCnt = 0;
- for(IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->getBookmarksBegin();
- ppMark != pMarkAccess->getBookmarksEnd();)
+ for(IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->getMarksBegin();
+ ppMark != pMarkAccess->getMarksEnd();)
aSeq[nCnt++] = (*ppMark++)->GetName();
return aSeq;
}
@@ -1563,12 +1692,12 @@ uno::Sequence< OUString > SwXBookmarks::getElementNames(void)
sal_Bool SwXBookmarks::hasByName(const OUString& rName)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
IDocumentMarkAccess* const pMarkAccess = GetDoc()->getIDocumentMarkAccess();
- return pMarkAccess->findBookmark(rName) != pMarkAccess->getBookmarksEnd();
+ return pMarkAccess->findMark(rName) != pMarkAccess->getMarksEnd();
}
uno::Type SAL_CALL SwXBookmarks::getElementType()
@@ -1580,16 +1709,12 @@ uno::Type SAL_CALL SwXBookmarks::getElementType()
sal_Bool SwXBookmarks::hasElements(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
return GetDoc()->getIDocumentMarkAccess()->getBookmarksCount() != 0;
}
-/******************************************************************
- *
- ******************************************************************/
-
SwXNumberingRulesCollection::SwXNumberingRulesCollection( SwDoc* _pDoc ) :
SwUnoCollection(_pDoc)
{
@@ -1601,7 +1726,7 @@ SwXNumberingRulesCollection::~SwXNumberingRulesCollection()
sal_Int32 SwXNumberingRulesCollection::getCount(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
return GetDoc()->GetNumRuleTbl().Count();
@@ -1610,7 +1735,7 @@ sal_Int32 SwXNumberingRulesCollection::getCount(void) throw( uno::RuntimeExcepti
uno::Any SwXNumberingRulesCollection::getByIndex(sal_Int32 nIndex)
throw( IndexOutOfBoundsException, WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
if(IsValid())
{
@@ -1636,29 +1761,22 @@ uno::Type SAL_CALL SwXNumberingRulesCollection::getElementType() throw(uno::Runt
sal_Bool SwXNumberingRulesCollection::hasElements(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
return GetDoc()->GetNumRuleTbl().Count() > 0;
}
-/* -----------------------------06.04.00 12:44--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXFootnotes::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXFootnotes");
}
-/* -----------------------------06.04.00 12:44--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXFootnotes::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.Footnotes") == rServiceName;
}
-/* -----------------------------06.04.00 12:44--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXFootnotes::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
@@ -1666,26 +1784,20 @@ Sequence< OUString > SwXFootnotes::getSupportedServiceNames(void) throw( Runtime
pArray[0] = C2U("com.sun.star.text.Footnotes");
return aRet;
}
-/*-- 14.01.99 09:03:52---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXFootnotes::SwXFootnotes(sal_Bool bEnd, SwDoc* _pDoc)
: SwUnoCollection(_pDoc)
, m_bEndnote(bEnd)
{
}
-/*-- 14.01.99 09:03:52---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXFootnotes::~SwXFootnotes()
{
}
-/*-- 14.01.99 09:03:53---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXFootnotes::getCount(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
sal_Int32 nCount = 0;
@@ -1701,20 +1813,18 @@ sal_Int32 SwXFootnotes::getCount(void) throw( uno::RuntimeException )
}
return nCount;
}
-/*-- 14.01.99 09:03:53---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXFootnotes::getByIndex(sal_Int32 nIndex)
throw( IndexOutOfBoundsException, WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
- sal_Int32 nCount = 0;
if(IsValid())
{
sal_uInt16 n, nFtnCnt = GetDoc()->GetFtnIdxs().Count();
SwTxtFtn* pTxtFtn;
uno::Reference< XFootnote > xRef;
+ sal_Int32 nCount = 0;
for( n = 0; n < nFtnCnt; ++n )
{
pTxtFtn = GetDoc()->GetFtnIdxs()[ n ];
@@ -1737,51 +1847,35 @@ uno::Any SwXFootnotes::getByIndex(sal_Int32 nIndex)
throw uno::RuntimeException();
return aRet;
}
-/*-- 14.01.99 09:03:53---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SAL_CALL SwXFootnotes::getElementType() throw(uno::RuntimeException)
{
return ::getCppuType((uno::Reference<XFootnote>*)0);
}
-/*-- 14.01.99 09:03:54---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXFootnotes::hasElements(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
return GetDoc()->GetFtnIdxs().Count() > 0;
}
-/* -----------------------------05.09.00 12:48--------------------------------
- ---------------------------------------------------------------------------*/
Reference<XFootnote> SwXFootnotes::GetObject( SwDoc& rDoc, const SwFmtFtn& rFmt )
{
return SwXFootnote::CreateXFootnote(rDoc, rFmt);
}
-/******************************************************************
- *
- ******************************************************************/
-/* -----------------------------06.04.00 12:44--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXReferenceMarks::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXReferenceMarks");
}
-/* -----------------------------06.04.00 12:44--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXReferenceMarks::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.ReferenceMarks") == rServiceName;
}
-/* -----------------------------06.04.00 12:44--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXReferenceMarks::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
@@ -1789,36 +1883,28 @@ Sequence< OUString > SwXReferenceMarks::getSupportedServiceNames(void) throw( Ru
pArray[0] = C2U("com.sun.star.text.ReferenceMarks");
return aRet;
}
-/*-- 14.01.99 09:03:16---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXReferenceMarks::SwXReferenceMarks(SwDoc* _pDoc) :
SwUnoCollection(_pDoc)
{
}
-/*-- 14.01.99 09:03:16---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXReferenceMarks::~SwXReferenceMarks()
{
}
-/*-- 14.01.99 09:03:17---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXReferenceMarks::getCount(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
return GetDoc()->GetRefMarks();
}
-/*-- 14.01.99 09:03:17---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXReferenceMarks::getByIndex(sal_Int32 nIndex)
throw( IndexOutOfBoundsException, WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
if(!IsValid())
throw uno::RuntimeException();
@@ -1836,13 +1922,11 @@ uno::Any SwXReferenceMarks::getByIndex(sal_Int32 nIndex)
throw IndexOutOfBoundsException();
return aRet;
}
-/*-- 14.01.99 09:03:17---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXReferenceMarks::getByName(const OUString& rName)
throw( NoSuchElementException, WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
if(IsValid())
{
@@ -1859,12 +1943,10 @@ uno::Any SwXReferenceMarks::getByName(const OUString& rName)
throw uno::RuntimeException();
return aRet;
}
-/*-- 14.01.99 09:03:17---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXReferenceMarks::getElementNames(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence<OUString> aRet;
if(IsValid())
{
@@ -1879,47 +1961,36 @@ uno::Sequence< OUString > SwXReferenceMarks::getElementNames(void) throw( uno::R
throw uno::RuntimeException();
return aRet;
}
-/*-- 14.01.99 09:03:17---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXReferenceMarks::hasByName(const OUString& rName) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
return 0 != GetDoc()->GetRefMark( rName);
}
-/*-- 14.01.99 09:03:18---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SAL_CALL SwXReferenceMarks::getElementType() throw(uno::RuntimeException)
{
return ::getCppuType((uno::Reference<XTextContent>*)0);
}
-/*-- 14.01.99 09:03:18---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXReferenceMarks::hasElements(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
return 0 != GetDoc()->GetRefMarks();
}
-/*-- 14.01.99 09:03:19---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXReferenceMark* SwXReferenceMarks::GetObject( SwDoc* pDoc, const SwFmtRefMark* pMark )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return SwXReferenceMark::CreateXReferenceMark(*pDoc, *pMark);
}
-/******************************************************************
- *
- ******************************************************************/
-/*-----------------11.03.98 11:18-------------------
+/*--------------------------------------------------
Gueltigkeitspruefung
--------------------------------------------------*/
void SwUnoCollection::Invalidate()
@@ -1928,3 +1999,4 @@ void SwUnoCollection::Invalidate()
pDoc = 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index ea8f94600272..ad9c05593c95 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,9 +87,7 @@
#include <comphelper/sequenceashashmap.hxx>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XStorage.hpp>
-// --> OD 2008-11-26 #158694#
#include <SwNodeNum.hxx>
-// <--
#include <fmtmeta.hxx>
@@ -101,7 +100,6 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
using ::rtl::OUString;
-
namespace SwUnoCursorHelper
{
@@ -135,9 +133,8 @@ GetNestedTextContent(SwTxtNode & rTextNode, xub_StrLen const nIndex,
return xRet;
}
-
-/* -----------------16.09.98 12:27-------------------
-* Lesen spezieller Properties am Cursor
+/* --------------------------------------------------
+ * Read the special properties of the cursor
* --------------------------------------------------*/
sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
, SwPaM& rPam
@@ -151,7 +148,6 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
sal_Bool bDone = sal_True;
switch(rEntry.nWID)
{
- // --> OD 2008-11-26 #158694#
case FN_UNO_PARA_CONT_PREV_SUBTREE:
if (pAny)
{
@@ -189,24 +185,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
*pAny <<= OUString(sRet);
}
break;
- // <--
- // --> OD 2008-05-20 #outlinelevel# - no longer needed
-// case FN_UNO_PARA_CHAPTER_NUMBERING_LEVEL:
-// if (pAny)
-// {
-// const SwTxtNode * pTmpNode = pNode;
-
-// if (!pTmpNode)
-// pTmpNode = rPam.GetNode()->GetTxtNode();
-
-// sal_Int8 nRet = -1;
-// if (pTmpNode && pTmpNode->GetOutlineLevel() != NO_NUMBERING)
-// nRet = sal::static_int_cast< sal_Int8 >(pTmpNode->GetOutlineLevel());
-// *pAny <<= nRet;
-// }
-// break;
- // <--
- case RES_PARATR_OUTLINELEVEL: //#outlinelevel added by zhaojianwei
+ case RES_PARATR_OUTLINELEVEL:
if (pAny)
{
const SwTxtNode * pTmpNode = pNode;
@@ -220,7 +199,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
*pAny <<= nRet;
}
- break; //<-end,zhaojianwei
+ break;
case FN_UNO_PARA_CONDITIONAL_STYLE_NAME:
case FN_UNO_PARA_STYLE :
{
@@ -265,16 +244,13 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
break;
case FN_UNO_NUM_LEVEL :
case FN_UNO_IS_NUMBER :
- // --> OD 2008-07-14 #i91601#
+ // #i91601#
case FN_UNO_LIST_ID:
- // <--
case FN_NUMBER_NEWSTART:
{
// a multi selection is not considered
const SwTxtNode* pTxtNd = rPam.GetNode()->GetTxtNode();
- // --> OD 2010-01-13 #b6912256#
if ( pTxtNd && pTxtNd->IsInList() )
- // <--
{
if( pAny )
{
@@ -285,13 +261,12 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
sal_Bool bIsNumber = pTxtNd->IsCountedInList();
pAny->setValue(&bIsNumber, ::getBooleanCppuType());
}
- // --> OD 2008-07-14 #i91601#
+ // #i91601#
else if ( rEntry.nWID == FN_UNO_LIST_ID )
{
const String sListId = pTxtNd->GetListId();
*pAny <<= OUString(sListId);
}
- // <--
else /*if(rEntry.nWID == UNO_NAME_PARA_IS_NUMBERING_RESTART)*/
{
sal_Bool bIsRestart = pTxtNd->IsListRestart();
@@ -310,7 +285,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
*pAny <<= static_cast<sal_Int16>( 0 );
else if(rEntry.nWID == FN_UNO_IS_NUMBER)
*pAny <<= false;
- // --> OD 2008-07-14 #i91601#
+ // #i91601#
else if ( rEntry.nWID == FN_UNO_LIST_ID )
{
*pAny <<= OUString();
@@ -351,7 +326,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
}
}
else
- //auch hier - nicht zu unterscheiden
+ //also here - indistinguishable
eNewState = PropertyState_DEFAULT_VALUE;
}
break;
@@ -395,16 +370,6 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
eNewState = PropertyState_DEFAULT_VALUE;
}
break;
-/* laesst sich nicht feststellen
-* case FN_UNO_BOOKMARK:
- {
- if()
- {
- uno::Reference< XBookmark > xBkm = SwXBookmarks::GetObject(rBkm);
- rAny.set(&xBkm, ::getCppuType((const XBookmark*)0)());
- }
- }
- break;*/
case FN_UNO_TEXT_TABLE:
case FN_UNO_CELL:
{
@@ -591,20 +556,17 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
}
break;
case RES_TXTATR_CHARFMT:
- // kein break hier!
+ // no break here!
default: bDone = sal_False;
}
if( bDone )
eState = eNewState;
return bDone;
};
-/* -----------------30.06.98 10:30-------------------
- *
- * --------------------------------------------------*/
+
sal_Int16 IsNodeNumStart(SwPaM& rPam, PropertyState& eState)
{
const SwTxtNode* pTxtNd = rPam.GetNode()->GetTxtNode();
- // --> OD 2008-02-28 #refactorlists#
// correction: check, if restart value is set at the text node and use
// new method <SwTxtNode::GetAttrListRestartValue()> to retrieve the value
if ( pTxtNd && pTxtNd->GetNumRule() && pTxtNd->IsListRestart() &&
@@ -614,14 +576,10 @@ sal_Int16 IsNodeNumStart(SwPaM& rPam, PropertyState& eState)
sal_Int16 nTmp = sal::static_int_cast< sal_Int16 >(pTxtNd->GetAttrListRestartValue());
return nTmp;
}
- // <--
eState = PropertyState_DEFAULT_VALUE;
return -1;
}
-/* -----------------25.05.98 11:41-------------------
- *
- * --------------------------------------------------*/
void setNumberingProperty(const Any& rValue, SwPaM& rPam)
{
uno::Reference<XIndexReplace> xIndexReplace;
@@ -656,7 +614,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
else
{
- // CharStyle besorgen und an der Rule setzen
+ // get CharStyle and set the rule
sal_uInt16 nChCount = pDoc->GetCharFmts()->Count();
SwCharFmt* pCharFmt = 0;
for(sal_uInt16 nCharFmt = 0; nCharFmt < nChCount; nCharFmt++)
@@ -674,7 +632,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
SfxStyleSheetBasePool* pPool = pDoc->GetDocShell()->GetStyleSheetPool();
SfxStyleSheetBase* pBase;
pBase = pPool->Find(pNewCharStyles[i], SFX_STYLE_FAMILY_CHAR);
- // soll das wirklich erzeugt werden?
+ // shall it really be created?
if(!pBase)
pBase = &pPool->Make(pNewCharStyles[i], SFX_STYLE_FAMILY_PAGE);
pCharFmt = ((SwDocStyleSheet*)pBase)->GetCharFmt();
@@ -683,7 +641,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
aFmt.SetCharFmt(pCharFmt);
}
}
- //jetzt nochmal fuer Fonts
+ //Now again for fonts
if(
pBulletFontNames[i] != SwXNumberingRules::GetInvalidStyle() &&
(
@@ -707,26 +665,22 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
}
UnoActionContext aAction(pDoc);
- if( rPam.GetNext() != &rPam ) // Mehrfachselektion ?
+ if( rPam.GetNext() != &rPam ) // Multiple selection?
{
pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( rPam );
SwPaM aPam( *rPam.GetPoint() );
for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
{
- // --> OD 2008-03-17 #refactorlists#
// no start of a new list
pDoc->SetNumRule( aRangeArr.SetPam( n, aPam ), aRule, false );
- // <--
}
pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
else
{
- // --> OD 2008-03-17 #refactorlists#
// no start of a new list
pDoc->SetNumRule( rPam, aRule, false );
- // <--
}
@@ -737,12 +691,10 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
SwNumRule* pRule = pDoc->FindNumRulePtr( pSwNum->GetCreatedNumRuleName() );
if(!pRule)
throw RuntimeException();
- // --> OD 2008-03-17 #refactorlists#
// no start of a new list
pDoc->SetNumRule( rPam, *pRule, false );
- // <--
}
- // --> OD 2009-08-18 #i103817#
+ // #i103817#
// outline numbering
else
{
@@ -752,7 +704,6 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
throw RuntimeException();
pDoc->SetNumRule( rPam, *pRule, false );
}
- // <--
}
}
else if(rValue.getValueType() == ::getVoidCppuType())
@@ -761,10 +712,6 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
}
}
-
-/* -----------------25.05.98 11:40-------------------
- *
- * --------------------------------------------------*/
void getNumberingProperty(SwPaM& rPam, PropertyState& eState, Any * pAny )
{
const SwNumRule* pNumRule = rPam.GetDoc()->GetCurrNumRule( *rPam.GetPoint() );
@@ -778,17 +725,16 @@ void getNumberingProperty(SwPaM& rPam, PropertyState& eState, Any * pAny )
else
eState = PropertyState_DEFAULT_VALUE;
}
-/* -----------------04.07.98 15:15-------------------
- *
- * --------------------------------------------------*/
+
void GetCurPageStyle(SwPaM& rPaM, String &rString)
{
const SwPageFrm* pPage = rPaM.GetCntntNode()->GetFrm()->FindPageFrm();
if(pPage)
SwStyleNameMapper::FillProgName( pPage->GetPageDesc()->GetName(), rString, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, sal_True );
}
-/* -----------------30.03.99 10:52-------------------
- * spezielle Properties am Cursor zuruecksetzen
+
+/* --------------------------------------------------
+ * reset special properties of the cursor
* --------------------------------------------------*/
void resetCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPam)
{
@@ -804,7 +750,7 @@ void resetCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPa
{
UnoActionContext aAction(pDoc);
- if( rPam.GetNext() != &rPam ) // Mehrfachselektion ?
+ if( rPam.GetNext() != &rPam ) // Multiple selection?
{
pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( rPam );
@@ -832,9 +778,7 @@ void resetCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPa
break;
}
}
-/* -----------------21.07.98 11:36-------------------
- *
- * --------------------------------------------------*/
+
void InsertFile(SwUnoCrsr* pUnoCrsr,
const String& rURL,
const uno::Sequence< beans::PropertyValue >& rOptions
@@ -940,8 +884,8 @@ void InsertFile(SwUnoCrsr* pUnoCrsr,
SfxObjectShellRef aRef( pDocSh );
pDocSh->RegisterTransfer( *pMed );
- pMed->DownLoad(); // ggfs. den DownLoad anstossen
- if( aRef.Is() && 1 < aRef->GetRefCount() ) // noch gueltige Ref?
+ pMed->DownLoad(); // if necessary: start the download
+ if( aRef.Is() && 1 < aRef->GetRefCount() ) // Ref still valid?
{
SwReader* pRdr;
SfxItemSet* pSet = pMed->GetItemSet();
@@ -960,7 +904,7 @@ void InsertFile(SwUnoCrsr* pUnoCrsr,
SwNodeIndex aSave( pUnoCrsr->GetPoint()->nNode, -1 );
xub_StrLen nCntnt = pUnoCrsr->GetPoint()->nContent.GetIndex();
- sal_uInt32 nErrno = pRdr->Read( *pRead ); // und Dokument einfuegen
+ sal_uInt32 nErrno = pRdr->Read( *pRead ); // and paste the document
if(!nErrno)
{
@@ -976,23 +920,12 @@ void InsertFile(SwUnoCrsr* pUnoCrsr,
delete pRdr;
- // ggfs. alle Verzeichnisse updaten:
-/* if( pWrtShell->IsUpdateTOX() )
- {
- SfxRequest aReq( *this, FN_UPDATE_TOX );
- Execute( aReq );
- pWrtShell->SetUpdateTOX( sal_False ); // wieder zurueck setzen
- }*/
}
}
delete pMed;
}
-/* -----------------14.07.04 ------------------------
- *
- * --------------------------------------------------*/
-
// insert text and scan for CR characters in order to insert
// paragraph breaks at those positions by calling SplitNode
sal_Bool DocInsertStringSplitCR(
@@ -1031,12 +964,12 @@ sal_Bool DocInsertStringSplitCR(
if (aTxt.getLength() &&
!rDoc.InsertString( rNewCursor, aTxt, nInsertFlags ))
{
- DBG_ERROR( "Doc->Insert(Str) failed." );
+ OSL_FAIL( "Doc->Insert(Str) failed." );
bOK = sal_False;
}
if (!rDoc.SplitNode( *rNewCursor.GetPoint(), false ) )
{
- DBG_ERROR( "SplitNode failed" );
+ OSL_FAIL( "SplitNode failed" );
bOK = sal_False;
}
nStartIdx = nIdx + 1;
@@ -1046,15 +979,13 @@ sal_Bool DocInsertStringSplitCR(
if (aTxt.getLength() &&
!rDoc.InsertString( rNewCursor, aTxt, nInsertFlags ))
{
- DBG_ERROR( "Doc->Insert(Str) failed." );
+ OSL_FAIL( "Doc->Insert(Str) failed." );
bOK = sal_False;
}
return bOK;
}
-/*-- 10.03.2008 09:58:47---------------------------------------------------
- -----------------------------------------------------------------------*/
void makeRedline( SwPaM& rPaM,
const ::rtl::OUString& rRedlineType,
const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
@@ -1075,7 +1006,7 @@ void makeRedline( SwPaM& rPaM,
//todo: what about REDLINE_FMTCOLL?
comphelper::SequenceAsHashMap aPropMap( rRedlineProperties );
uno::Any aAuthorValue;
- aAuthorValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii("RedlineAuthor"), aAuthorValue);
+ aAuthorValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RedlineAuthor")), aAuthorValue);
sal_uInt16 nAuthor = 0;
::rtl::OUString sAuthor;
if( aAuthorValue >>= sAuthor )
@@ -1083,7 +1014,7 @@ void makeRedline( SwPaM& rPaM,
::rtl::OUString sComment;
uno::Any aCommentValue;
- aCommentValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii("RedlineComment"), aCommentValue);
+ aCommentValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RedlineComment")), aCommentValue);
SwRedlineData aRedlineData( eType, nAuthor );
if( aCommentValue >>= sComment )
@@ -1091,7 +1022,7 @@ void makeRedline( SwPaM& rPaM,
::util::DateTime aStamp;
uno::Any aDateTimeValue;
- aDateTimeValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii("RedlineDateTime"), aDateTimeValue);
+ aDateTimeValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RedlineDateTime")), aDateTimeValue);
if( aDateTimeValue >>= aStamp )
{
aRedlineData.SetTimeStamp(
@@ -1108,9 +1039,6 @@ void makeRedline( SwPaM& rPaM,
throw lang::IllegalArgumentException();
}
-/*-- 19.02.2009 09:27:26---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwAnyMapHelper::~SwAnyMapHelper()
{
AnyMapHelper_t::iterator aIt = begin();
@@ -1120,9 +1048,7 @@ SwAnyMapHelper::~SwAnyMapHelper()
++aIt;
}
}
-/*-- 19.02.2009 09:27:26---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAnyMapHelper::SetValue( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any& rAny )
{
sal_uInt32 nKey = (nWhichId << 16) + nMemberId;
@@ -1134,9 +1060,7 @@ void SwAnyMapHelper::SetValue( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const
else
insert( value_type(nKey, new uno::Any( rAny )) );
}
-/*-- 19.02.2009 09:27:26---------------------------------------------------
- -----------------------------------------------------------------------*/
bool SwAnyMapHelper::FillValue( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any*& pAny )
{
bool bRet = false;
@@ -1152,3 +1076,4 @@ bool SwAnyMapHelper::FillValue( sal_uInt16 nWhichId, sal_uInt16 nMemberId, co
}//namespace SwUnoCursorHelper
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 2a2e1e497d13..8e02bfce696d 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,14 +62,14 @@
#include <fmtornt.hxx>
#include <fmtanchr.hxx>
#include <fmtsrnd.hxx>
-// OD 2004-04-21 #i26791#
+// #i26791#
#include <fmtfollowtextflow.hxx>
#include <rootfrm.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/ulspitem.hxx>
#include <svx/shapepropertynotifier.hxx>
#include <crstate.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/stl_types.hxx>
#include <comphelper/makesequence.hxx>
@@ -85,7 +86,7 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <com/sun/star/drawing/PointSequence.hpp>
#include <vcl/svapp.hxx>
-#include <slist>
+#include <list>
#include <iterator>
using ::rtl::OUString;
@@ -95,9 +96,6 @@ DECLARE_STL_USTRINGACCESS_MAP( uno::Sequence< sal_Int8 > *, SwShapeImplementati
static SwShapeImplementationIdMap aImplementationIdMap;
-/* -----------------22.01.99 13:19-------------------
- *
- * --------------------------------------------------*/
class SwShapeDescriptor_Impl
{
SwFmtHoriOrient* pHOrient;
@@ -108,37 +106,33 @@ class SwShapeDescriptor_Impl
SvxLRSpaceItem* pLRSpace;
sal_Bool bOpaque;
uno::Reference< text::XTextRange > xTextRange;
- // OD 2004-04-21 #i26791#
+ // #i26791#
SwFmtFollowTextFlow* mpFollowTextFlow;
- // OD 2004-05-05 #i28701# - add property 'WrapInfluenceOnObjPos'
+ // #i28701#
SwFmtWrapInfluenceOnObjPos* pWrapInfluenceOnObjPos;
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
sal_Int16 mnPositionLayoutDir;
- // <--
public:
bool bInitializedPropertyNotifier;
public:
SwShapeDescriptor_Impl() :
- // --> OD 2004-08-18 #i32349# - no defaults, in order to determine on
+ // #i32349# - no defaults, in order to determine on
// adding a shape, if positioning attributes are set or not.
pHOrient( 0L ),
pVOrient( 0L ),
- // <--
pAnchor(0),
pSurround(0),
pULSpace(0),
pLRSpace(0),
bOpaque(sal_False),
- // OD 2004-04-21 #i26791#
+ // #i26791#
mpFollowTextFlow( new SwFmtFollowTextFlow( sal_False ) ),
- // OD 2004-05-05 #i28701#
- // --> OD 2004-10-18 #i35017# - constant name has changed
+ // #i28701# #i35017#
pWrapInfluenceOnObjPos( new SwFmtWrapInfluenceOnObjPos(
text::WrapInfluenceOnPosition::ONCE_CONCURRENT ) ),
- // <--
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
mnPositionLayoutDir( text::PositionLayoutDir::PositionInLayoutDirOfAnchor ),
bInitializedPropertyNotifier(false)
{}
@@ -151,9 +145,9 @@ public:
delete pSurround;
delete pULSpace;
delete pLRSpace;
- // OD 2004-04-22 #i26791#
+ // #i26791#
delete mpFollowTextFlow;
- // OD 2004-05-05 #i28701#
+ // #i28701#
delete pWrapInfluenceOnObjPos;
}
SwFmtAnchor* GetAnchor(sal_Bool bCreate = sal_False)
@@ -168,7 +162,7 @@ public:
{
if (bCreate && !pHOrient)
{
- // OD 2004-06-03 #i26791# - change default
+ // #i26791#
pHOrient = new SwFmtHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::FRAME );
}
return pHOrient;
@@ -177,7 +171,7 @@ public:
{
if(bCreate && !pVOrient)
{
- // OD 2004-04-21 #i26791# - change default
+ // #i26791#
pVOrient = new SwFmtVertOrient( 0, text::VertOrientation::NONE, text::RelOrientation::FRAME );
}
return pVOrient;
@@ -205,11 +199,11 @@ public:
{
return xTextRange;
}
- sal_Bool IsOpaque()
+ sal_Bool IsOpaque() const
{
return bOpaque;
}
- const sal_Bool& GetOpaque()
+ const sal_Bool& GetOpaque() const
{
return bOpaque;
}
@@ -221,7 +215,7 @@ public:
void RemoveLRSpace(){DELETEZ(pLRSpace);}
void SetOpaque(sal_Bool bSet){bOpaque = bSet;}
- // OD 2004-04-21 #i26791#
+ // #i26791#
SwFmtFollowTextFlow* GetFollowTextFlow( sal_Bool _bCreate = sal_False )
{
if ( _bCreate && !mpFollowTextFlow )
@@ -233,7 +227,7 @@ public:
DELETEZ(mpFollowTextFlow);
}
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
sal_Int16 GetPositionLayoutDir() const
{
return mnPositionLayoutDir;
@@ -250,7 +244,7 @@ public:
break;
default:
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwShapeDescriptor_Impl::SetPositionLayoutDir(..)> - invalid attribute value." );
}
}
@@ -259,18 +253,16 @@ public:
{
mnPositionLayoutDir = text::PositionLayoutDir::PositionInLayoutDirOfAnchor;
}
- // <--
- // OD 2004-05-05 #i28701#
+ // #i28701#
inline SwFmtWrapInfluenceOnObjPos* GetWrapInfluenceOnObjPos(
const sal_Bool _bCreate = sal_False )
{
if ( _bCreate && !pWrapInfluenceOnObjPos )
{
pWrapInfluenceOnObjPos = new SwFmtWrapInfluenceOnObjPos(
- // --> OD 2004-10-18 #i35017# - constant name has changed
+ // #i35017#
text::WrapInfluenceOnPosition::ONCE_CONCURRENT );
- // <--
}
return pWrapInfluenceOnObjPos;
}
@@ -279,63 +271,47 @@ public:
DELETEZ(pWrapInfluenceOnObjPos);
}
};
+
/****************************************************************************
class SwFmDrawPage
****************************************************************************/
-
-/* -----------------28.01.99 12:03-------------------
- *
- * --------------------------------------------------*/
SwFmDrawPage::SwFmDrawPage( SdrPage* pPage ) :
SvxFmDrawPage( pPage ), pPageView(0)
{
}
-/*-- 22.01.99 11:13:07---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwFmDrawPage::~SwFmDrawPage() throw ()
{
RemovePageView();
}
-/*-- 22.01.99 11:13:07---------------------------------------------------
- -----------------------------------------------------------------------*/
const SdrMarkList& SwFmDrawPage::PreGroup(const uno::Reference< drawing::XShapes > & xShapes)
{
_SelectObjectsInView( xShapes, GetPageView() );
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
return rMarkList;
}
-/*-- 22.01.99 11:13:08---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwFmDrawPage::PreUnGroup(const uno::Reference< drawing::XShapeGroup > xShapeGroup)
{
uno::Reference< drawing::XShape > xShape( xShapeGroup, uno::UNO_QUERY);
_SelectObjectInView( xShape, GetPageView() );
}
-/*-- 22.01.99 11:13:08---------------------------------------------------
- -----------------------------------------------------------------------*/
SdrPageView* SwFmDrawPage::GetPageView()
{
if(!pPageView)
pPageView = mpView->ShowSdrPage( mpPage );
return pPageView;
}
-/*-- 22.01.99 11:13:08---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwFmDrawPage::RemovePageView()
{
if(pPageView && mpView)
mpView->HideSdrPage();
pPageView = 0;
}
-/*-- 22.01.99 11:13:09---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< uno::XInterface > SwFmDrawPage::GetInterface( SdrObject* pObj )
{
uno::Reference< XInterface > xShape;
@@ -353,17 +329,12 @@ uno::Reference< uno::XInterface > SwFmDrawPage::GetInterface( SdrObject* pObj
}
return xShape;
}
-/*-- 22.01.99 11:13:09---------------------------------------------------
- -----------------------------------------------------------------------*/
SdrObject* SwFmDrawPage::_CreateSdrObject( const uno::Reference< drawing::XShape > & xShape ) throw ()
{
//TODO: stimmt das so - kann die Methode weg?
return SvxFmDrawPage::_CreateSdrObject( xShape );
}
-/*-- 22.01.99 11:13:09---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< drawing::XShape > SwFmDrawPage::_CreateShape( SdrObject *pObj ) const throw ()
{
@@ -392,7 +363,7 @@ uno::Reference< drawing::XShape > SwFmDrawPage::_CreateShape( SdrObject *pObj )
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwFmDrawPage::_CreateShape(..)> - could not retrieve type. Thus, no shape created." );
return xRet;
}
@@ -438,7 +409,7 @@ namespace
: public SwSimpleEnumeration_Base
{
private:
- typedef ::std::slist< ::com::sun::star::uno::Any > shapescontainer_t;
+ typedef ::std::list< ::com::sun::star::uno::Any > shapescontainer_t;
shapescontainer_t m_aShapes;
protected:
virtual ~SwXShapesEnumeration() {};
@@ -459,7 +430,7 @@ namespace
SwXShapesEnumeration::SwXShapesEnumeration(SwXDrawPage* const pDrawPage)
: m_aShapes()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
::std::insert_iterator<shapescontainer_t> pInserter = ::std::insert_iterator<shapescontainer_t>(m_aShapes, m_aShapes.begin());
sal_Int32 nCount = pDrawPage->getCount();
for(sal_Int32 nIdx = 0; nIdx < nCount; nIdx++)
@@ -471,13 +442,13 @@ SwXShapesEnumeration::SwXShapesEnumeration(SwXDrawPage* const pDrawPage)
sal_Bool SwXShapesEnumeration::hasMoreElements(void) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return !m_aShapes.empty();
}
uno::Any SwXShapesEnumeration::nextElement(void) throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_aShapes.empty())
throw container::NoSuchElementException();
uno::Any aResult = *m_aShapes.begin();
@@ -499,32 +470,27 @@ uno::Sequence< OUString > SwXShapesEnumeration::getSupportedServiceNames(void) t
{
return ::comphelper::makeSequence(C2U("com.sun.star.container.XEnumeration"));
}
+
/****************************************************************************
class SwXDrawPage
****************************************************************************/
uno::Reference< container::XEnumeration > SwXDrawPage::createEnumeration(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return uno::Reference< container::XEnumeration >(
new SwXShapesEnumeration(this));
}
-/* -----------------------------06.04.00 13:14--------------------------------
- ---------------------------------------------------------------------------*/
rtl::OUString SwXDrawPage::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXDrawPage");
}
-/* -----------------------------06.04.00 13:14--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXDrawPage::supportsService(const rtl::OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.drawing.GenericDrawPage") == rServiceName;
}
-/* -----------------------------06.04.00 13:14--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< rtl::OUString > SwXDrawPage::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< rtl::OUString > aRet(1);
@@ -532,17 +498,13 @@ uno::Sequence< rtl::OUString > SwXDrawPage::getSupportedServiceNames(void) throw
pArray[0] = C2U("com.sun.star.drawing.GenericDrawPage");
return aRet;
}
-/*-- 22.01.99 11:22:25---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXDrawPage::SwXDrawPage(SwDoc* pDc) :
pDoc(pDc),
pDrawPage(0)
{
}
-/*-- 22.01.99 11:22:25---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXDrawPage::~SwXDrawPage()
{
if(xPageAgg.is())
@@ -551,9 +513,7 @@ SwXDrawPage::~SwXDrawPage()
xPageAgg->setDelegator(xInt);
}
}
-/* -----------------------------15.06.00 15:00--------------------------------
- ---------------------------------------------------------------------------*/
uno::Any SwXDrawPage::queryInterface( const uno::Type& aType )
throw( uno::RuntimeException )
{
@@ -573,9 +533,7 @@ uno::Any SwXDrawPage::queryInterface( const uno::Type& aType )
}
return aRet;
}
-/* -----------------------------15.06.00 15:01--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Type > SwXDrawPage::getTypes() throw( uno::RuntimeException )
{
uno::Sequence< uno::Type > aPageTypes = SwXDrawPageBaseClass::getTypes();
@@ -594,12 +552,10 @@ uno::Sequence< uno::Type > SwXDrawPage::getTypes() throw( uno::RuntimeException
pPageTypes[nIndex] = ::getCppuType((uno::Reference<form::XFormsSupplier2>*)0);
return aPageTypes;
}
-/*-- 22.01.99 11:33:44---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXDrawPage::getCount(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
if(!pDoc->GetDrawModel())
@@ -610,14 +566,12 @@ sal_Int32 SwXDrawPage::getCount(void) throw( uno::RuntimeException )
return pDrawPage->getCount();
}
}
-/*-- 22.01.99 11:33:46---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXDrawPage::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
if(!pDoc->GetDrawModel())
@@ -626,19 +580,15 @@ uno::Any SwXDrawPage::getByIndex(sal_Int32 nIndex)
((SwXDrawPage*)this)->GetSvxPage();
return pDrawPage->getByIndex( nIndex );
}
-/* -----------------22.01.99 13:13-------------------
- *
- * --------------------------------------------------*/
+
uno::Type SwXDrawPage::getElementType(void) throw( uno::RuntimeException )
{
return ::getCppuType((const uno::Reference<drawing::XShape>*)0);
}
-/* -----------------22.01.99 13:13-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwXDrawPage::hasElements(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
if(!pDoc->GetDrawModel())
@@ -647,13 +597,10 @@ sal_Bool SwXDrawPage::hasElements(void) throw( uno::RuntimeException )
return ((SwXDrawPage*)this)->GetSvxPage()->hasElements();
}
-/* -----------------22.01.99 12:42-------------------
- *
- * --------------------------------------------------*/
void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
uno::Reference< lang::XUnoTunnel > xShapeTunnel(xShape, uno::UNO_QUERY);
@@ -677,7 +624,6 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
throw aExcept;
}
- // --> OD, HB
if ( pSvxShape->GetSdrObject() )
{
if ( pSvxShape->GetSdrObject()->IsInserted() )
@@ -685,7 +631,6 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
return;
}
}
- // <--
GetSvxPage()->add(xShape);
uno::Reference< uno::XAggregation > xAgg = pShape->GetAggregationInterface();
@@ -717,27 +662,25 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
if(pDesc->GetAnchor())
aAnchor = *pDesc->GetAnchor();
- // --> OD 2004-08-18 #i32349# - if no horizontal position exists, create one
+ // #i32349# - if no horizontal position exists, create one
if ( !pDesc->GetHOrient() )
{
SwFmtHoriOrient* pHori = pDesc->GetHOrient( sal_True );
SwTwips nHoriPos = MM100_TO_TWIP(aMM100Pos.X);
pHori->SetPos( nHoriPos );
}
- // <--
{
if(pDesc->GetHOrient()->GetHoriOrient() == text::HoriOrientation::NONE)
aMM100Pos.X = TWIP_TO_MM100(pDesc->GetHOrient()->GetPos());
aSet.Put( *pDesc->GetHOrient() );
}
- // --> OD 2004-08-18 #i32349# - if no vertical position exists, create one
+ // #i32349# - if no vertical position exists, create one
if ( !pDesc->GetVOrient() )
{
SwFmtVertOrient* pVert = pDesc->GetVOrient( sal_True );
SwTwips nVertPos = MM100_TO_TWIP(aMM100Pos.Y);
pVert->SetPos( nVertPos );
}
- // <--
{
if(pDesc->GetVOrient()->GetVertOrient() == text::VertOrientation::NONE)
aMM100Pos.Y = TWIP_TO_MM100(pDesc->GetVOrient()->GetPos());
@@ -748,13 +691,13 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
aSet.Put( *pDesc->GetSurround());
bOpaque = pDesc->IsOpaque();
- // OD 2004-04-22 #i26791#
+ // #i26791#
if ( pDesc->GetFollowTextFlow() )
{
aSet.Put( *pDesc->GetFollowTextFlow() );
}
- // OD 2004-05-05 #i28701#
+ // #i28701#
if ( pDesc->GetWrapInfluenceOnObjPos() )
{
aSet.Put( *pDesc->GetWrapInfluenceOnObjPos() );
@@ -763,7 +706,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
pSvxShape->setPosition(aMM100Pos);
SdrObject* pObj = pSvxShape->GetSdrObject();
- // OD 25.06.2003 #108784# - set layer of new drawing object to corresponding
+ // #108784# - set layer of new drawing object to corresponding
// invisible layer.
if(FmFormInventor != pObj->GetObjInventor())
pObj->SetLayer( bOpaque ? pDoc->GetInvisibleHeavenId() : pDoc->GetInvisibleHellId() );
@@ -798,14 +741,14 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
pDoc->GetRootFrm()->GetCrsrOfst( pPam->GetPoint(), aTmp, &aState );
aAnchor.SetAnchor( pPam->GetPoint() );
- // --> OD 2004-08-18 #i32349# - adjustment of vertical positioning
+ // #i32349# - adjustment of vertical positioning
// attributes no longer needed, because its already got a default.
}
else
{
aAnchor.SetType(FLY_AT_PAGE);
- // --> OD 2004-08-18 #i32349# - adjustment of vertical positioning
+ // #i32349# - adjustment of vertical positioning
// attributes no longer needed, because its already got a default.
}
aSet.Put(aAnchor);
@@ -822,23 +765,19 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
delete pPam;
delete pInternalPam;
}
-/* -----------------22.01.99 12:42-------------------
- *
- * --------------------------------------------------*/
+
void SwXDrawPage::remove(const uno::Reference< drawing::XShape > & xShape) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
uno::Reference<lang::XComponent> xComp(xShape, uno::UNO_QUERY);
xComp->dispose();
}
-/* -----------------17.02.99 10:38-------------------
- *
- * --------------------------------------------------*/
+
uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference< drawing::XShapes > & xShapes) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc || !xShapes.is())
throw uno::RuntimeException();
uno::Reference< drawing::XShapeGroup > xRet;
@@ -889,12 +828,10 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
}
return xRet;
}
-/* -----------------17.02.99 10:38-------------------
- *
- * --------------------------------------------------*/
+
void SwXDrawPage::ungroup(const uno::Reference< drawing::XShapeGroup > & xShapeGroup) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
if(xPageAgg.is())
@@ -915,17 +852,14 @@ void SwXDrawPage::ungroup(const uno::Reference< drawing::XShapeGroup > & xShapeG
pPage->RemovePageView();
}
}
-/* -----------------05.05.98 17:05-------------------
- *
- * --------------------------------------------------*/
+
SwFmDrawPage* SwXDrawPage::GetSvxPage()
{
if(!xPageAgg.is() && pDoc)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
- // --> OD 2005-08-08 #i52858# - method name changed
+ SolarMutexGuard aGuard;
+ // #i52858#
SdrModel* pModel = pDoc->GetOrCreateDrawModel();
- // <--
SdrPage* pPage = pModel->GetPage( 0 );
{
@@ -949,21 +883,14 @@ void SwXDrawPage::InvalidateSwDoc()
pDoc = 0;
}
-/****************************************************************************
-
-****************************************************************************/
TYPEINIT1(SwXShape, SwClient);
-/* -----------------------------10.03.00 18:02--------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXShape::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXShape::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -997,9 +924,6 @@ namespace
}
}
-/* -----------------01.02.99 11:38-------------------
- *
- * --------------------------------------------------*/
SwXShape::SwXShape(uno::Reference< uno::XInterface > & xShape) :
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_SHAPE)),
m_pPropertyMapEntries(aSwMapProvider.GetPropertyMapEntries(PROPERTY_MAP_TEXT_SHAPE)),
@@ -1015,11 +939,11 @@ SwXShape::SwXShape(uno::Reference< uno::XInterface > & xShape) :
uno::Any aAgg = xShape->queryInterface(rAggType);
if(aAgg.getValueType() == rAggType)
xShapeAgg = *(uno::Reference< uno::XAggregation >*)aAgg.getValue();
- // --> OD 2004-07-23 #i31698#
+ // #i31698#
if ( xShapeAgg.is() )
{
xShapeAgg->queryAggregation( ::getCppuType((uno::Reference< drawing::XShape >*)0) ) >>= mxShape;
- ASSERT( mxShape.is(),
+ OSL_ENSURE( mxShape.is(),
"<SwXShape::SwXShape(..)> - no XShape found at <xShapeAgg>" );
}
// <--
@@ -1049,9 +973,6 @@ SwXShape::SwXShape(uno::Reference< uno::XInterface > & xShape) :
}
}
-/*-- 09.04.09 15:06:13---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXShape::AddExistingShapeToFmt( SdrObject& _rObj )
{
SdrObjListIter aIter( _rObj, IM_DEEPNOGROUPS );
@@ -1086,9 +1007,6 @@ void SwXShape::AddExistingShapeToFmt( SdrObject& _rObj )
}
}
-/*-- 22.01.99 11:42:26---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXShape::~SwXShape()
{
if (xShapeAgg.is())
@@ -1098,13 +1016,11 @@ SwXShape::~SwXShape()
}
delete pImpl;
}
-/* -----------------------------16.06.00 12:21--------------------------------
- ---------------------------------------------------------------------------*/
uno::Any SwXShape::queryInterface( const uno::Type& aType ) throw( uno::RuntimeException )
{
uno::Any aRet = SwXShapeBaseClass::queryInterface(aType);
- // --> OD 2005-08-15 #i53320# - follow-up of #i31698#
+ // #i53320# - follow-up of #i31698#
// interface drawing::XShape is overloaded. Thus, provide
// correct object instance.
if(!aRet.hasValue() && xShapeAgg.is())
@@ -1114,12 +1030,9 @@ uno::Any SwXShape::queryInterface( const uno::Type& aType ) throw( uno::RuntimeE
else
aRet = xShapeAgg->queryAggregation(aType);
}
- // <--
return aRet;
}
-/* -----------------------------16.06.00 12:21--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Type > SwXShape::getTypes( ) throw(uno::RuntimeException)
{
uno::Sequence< uno::Type > aRet = SwXShapeBaseClass::getTypes();
@@ -1143,12 +1056,10 @@ uno::Sequence< uno::Type > SwXShape::getTypes( ) throw(uno::RuntimeException)
}
return aRet;
}
-/* -----------------------------04.04.01 07:37--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< sal_Int8 > SwXShape::getImplementationId( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
// do we need to compute the implementation id for this instance?
if( !pImplementationId && xShapeAgg.is())
{
@@ -1179,7 +1090,7 @@ uno::Sequence< sal_Int8 > SwXShape::getImplementationId( ) throw(uno::RuntimeEx
}
if( NULL == pImplementationId )
{
- DBG_ERROR( "Could not create an implementation id for a SwXShape!" );
+ OSL_FAIL( "Could not create an implementation id for a SwXShape!" );
return uno::Sequence< sal_Int8 > ();
}
else
@@ -1187,12 +1098,10 @@ uno::Sequence< sal_Int8 > SwXShape::getImplementationId( ) throw(uno::RuntimeEx
return *pImplementationId;
}
}
-/*-- 22.01.99 11:42:26---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXShape::getPropertySetInfo(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< beans::XPropertySetInfo > aRet;
if(xShapeAgg.is())
{
@@ -1212,15 +1121,13 @@ uno::Reference< beans::XPropertySetInfo > SwXShape::getPropertySetInfo(void) th
aRet = m_pPropSet->getPropertySetInfo();
return aRet;
}
-/*-- 22.01.99 11:42:27---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::Any& aValue)
throw( beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( rPropertyName );
if(xShapeAgg.is())
@@ -1271,7 +1178,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
if(pSvxShape)
{
SdrObject* pObj = pSvxShape->GetSdrObject();
- // OD 25.06.2003 #108784# - set layer of new drawing
+ // set layer of new drawing
// object to corresponding invisible layer.
bool bIsVisible = pDoc->IsVisibleLayerId( pObj->GetLayer() );
if(FmFormInventor != pObj->GetObjInventor())
@@ -1288,7 +1195,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
}
}
- // OD 2004-04-22 #i26791# - special handling for property FN_TEXT_RANGE
+ // #i26791# - special handling for property FN_TEXT_RANGE
else if ( FN_TEXT_RANGE == pEntry->nWID )
{
SwFmtAnchor aAnchor( static_cast<const SwFmtAnchor&>(aSet.Get( RES_ANCHOR )) );
@@ -1313,7 +1220,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
//To prevent this the connection between format and attribute has to be broken before.
const SwPosition *pPos = aAnchor.GetCntntAnchor();
SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
- ASSERT( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
+ OSL_ENSURE( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
const xub_StrLen nIdx = pPos->nContent.GetIndex();
SwTxtAttr * const pHnt =
pTxtNode->GetTxtAttrForCharAt(
@@ -1349,14 +1256,13 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
delete pInternalPam;
}
}
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
else if ( FN_SHAPE_POSITION_LAYOUT_DIR == pEntry->nWID )
{
sal_Int16 nPositionLayoutDir = 0;
aValue >>= nPositionLayoutDir;
pFmt->SetPositionLayoutDir( nPositionLayoutDir );
}
- // <--
else if( pDoc->GetRootFrm() )
{
UnoActionContext aCtx(pDoc);
@@ -1400,7 +1306,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
//To prevent this the connection between format and attribute has to be broken before.
const SwPosition *pPos = rOldAnchor.GetCntntAnchor();
SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
- ASSERT( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
+ OSL_ENSURE( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
const xub_StrLen nIdx = pPos->nContent.GetIndex();
SwTxtAttr * const pHnt =
pTxtNode->GetTxtAttrForCharAt(
@@ -1495,19 +1401,19 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
case RES_OPAQUE :
pImpl->SetOpaque(*(sal_Bool*)aValue.getValue());
break;
- // OD 2004-04-22 #i26791#
+ // #i26791#
case RES_FOLLOW_TEXT_FLOW:
{
pItem = pImpl->GetFollowTextFlow( sal_True );
}
break;
- // OD 2004-05-05 #i28701#
+ // #i28701#
case RES_WRAP_INFLUENCE_ON_OBJPOS:
{
pItem = pImpl->GetWrapInfluenceOnObjPos( sal_True );
}
break;
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
case FN_SHAPE_POSITION_LAYOUT_DIR :
{
sal_Int16 nPositionLayoutDir = 0;
@@ -1515,7 +1421,6 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
pImpl->SetPositionLayoutDir( nPositionLayoutDir );
}
break;
- // <--
}
if(pItem)
((SfxPoolItem*)pItem)->PutValue(aValue, pEntry->nMemberId);
@@ -1530,7 +1435,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
if(aPSet.getValueType() != rPSetType || !aPSet.getValue())
throw uno::RuntimeException();
xPrSet = *(uno::Reference< beans::XPropertySet >*)aPSet.getValue();
- // --> OD 2004-08-05 #i31698# - setting the caption point of a
+ // #i31698# - setting the caption point of a
// caption object doesn't have to change the object position.
// Thus, keep the position, before the caption point is set and
// restore it afterwards.
@@ -1540,7 +1445,6 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
{
aKeepedPosition = getPosition();
}
- // <--
if( pFmt && pFmt->GetDoc()->GetRootFrm() )
{
UnoActionContext aCtx(pFmt->GetDoc());
@@ -1548,26 +1452,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
}
else
xPrSet->setPropertyValue(rPropertyName, aValue);
- // --> OD 2004-11-11 #i35007# - adjustment of the position
- // attributes, if the transformation is set, causes wrong alignments
- // and is no longer needed.
- // The position attributes are set, if the drawing object is added
- // to the draw page - see <SwXDrawPage::add(..)> - and on its first
- // positioning - see <SwAnchoredDrawObject::MakeObjPos().
-// // --> OD 2004-07-28 #i31698# - additionally adjust the position
-// // properties of the shape, if the transformation is set and
-// // the shape isn't a group member.
-// if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Transformation"))) &&
-// !_GetTopGroupObj() )
-// {
-// drawing::HomogenMatrix3 aMatrix;
-// aValue >>= aMatrix;
-// awt::Point aNewPos( basegfx::fround( aMatrix.Line1.Column3 ),
-// basegfx::fround( aMatrix.Line2.Column3 ) );
-// _AdjustPositionProperties( aNewPos );
-// }
- // --> OD 2004-08-05 #i31698# - restore object position, if caption
- // point is set.
+ // #i31698# - restore object position, if caption point is set.
if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CaptionPoint"))) &&
getShapeType().equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CaptionShape"))) )
{
@@ -1576,14 +1461,12 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
}
}
}
-/*-- 22.01.99 11:42:27---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
SwFrmFmt* pFmt = GetFrmFmt();
if(xShapeAgg.is())
@@ -1600,7 +1483,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
if(pSvxShape)
{
SdrObject* pObj = pSvxShape->GetSdrObject();
- // OD 02.07.2003 #108784# - consider invisible layers
+ // consider invisible layers
sal_Bool bOpaque =
( pObj->GetLayer() != pFmt->GetDoc()->GetHellId() &&
pObj->GetLayer() != pFmt->GetDoc()->GetInvisibleHellId() );
@@ -1620,7 +1503,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
aRet.setValue(&aPoint, ::getCppuType( (awt::Point*)0 ));
}
}
- // OD 2004-04-22 #i26791# - special handling for FN_TEXT_RANGE
+ // #i26791# - special handling for FN_TEXT_RANGE
else if ( FN_TEXT_RANGE == pEntry->nWID )
{
const SwFmtAnchor aAnchor = pFmt->GetAnchor();
@@ -1650,7 +1533,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
}
}
}
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
else if ( FN_SHAPE_TRANSFORMATION_IN_HORI_L2R == pEntry->nWID )
{
// get property <::drawing::Shape::Transformation>
@@ -1661,8 +1544,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
{
aRet <<= pFmt->GetPositionLayoutDir();
}
- // <--
- // --> OD 2004-10-28 #i36248#
+ // #i36248#
else if ( FN_SHAPE_STARTPOSITION_IN_HORI_L2R == pEntry->nWID )
{
// get property <::drawing::Shape::StartPosition>
@@ -1675,7 +1557,6 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
// without conversion to layout direction as below
aRet = _getPropAtAggrObj( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition")) );
}
- // <--
else
{
const SwAttrSet& rSet = pFmt->GetAttrSet();
@@ -1717,19 +1598,19 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
aRet.setValue(&aPoint, ::getCppuType( (awt::Point*)0 ));
}
break;
- // OD 2004-04-22 #i26791#
+ // #i26791#
case RES_FOLLOW_TEXT_FLOW :
{
pItem = pImpl->GetFollowTextFlow();
}
break;
- // OD 2004-05-05 #i28701#
+ // #i28701#
case RES_WRAP_INFLUENCE_ON_OBJPOS:
{
pItem = pImpl->GetWrapInfluenceOnObjPos();
}
break;
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
case FN_SHAPE_TRANSFORMATION_IN_HORI_L2R:
{
// get property <::drawing::Shape::Transformation>
@@ -1742,8 +1623,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
aRet <<= pImpl->GetPositionLayoutDir();
}
break;
- // <--
- // --> OD 2004-08-06 #i36248#
+ // #i36248#
case FN_SHAPE_STARTPOSITION_IN_HORI_L2R:
{
// get property <::drawing::Shape::StartPosition>
@@ -1758,7 +1638,6 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
aRet = _getPropAtAggrObj( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition")) );
}
break;
- // <--
}
if(pItem)
pItem->QueryValue(aRet, pEntry->nMemberId);
@@ -1768,7 +1647,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
{
aRet = _getPropAtAggrObj( rPropertyName );
- // --> OD 2004-07-28 #i31698# - convert the position (translation)
+ // #i31698# - convert the position (translation)
// of the drawing object in the transformation
if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Transformation"))) )
{
@@ -1776,43 +1655,35 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
aRet >>= aMatrix;
aRet <<= _ConvertTransformationToLayoutDir( aMatrix );
}
- // <--
- // --> OD 2004-10-28 #i36248#
+ // #i36248#
else if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartPosition"))) )
{
awt::Point aStartPos;
aRet >>= aStartPos;
- // --> OD 2009-01-12 #i59051#
+ // #i59051#
aRet <<= _ConvertStartOrEndPosToLayoutDir( aStartPos );
- // <--
}
else if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition"))) )
{
awt::Point aEndPos;
aRet >>= aEndPos;
- // --> OD 2009-01-12 #i59051#
+ // #i59051#
aRet <<= _ConvertStartOrEndPosToLayoutDir( aEndPos );
- // <--
}
- // --> OD 2009-01-16 #i59051#
+ // #i59051#
else if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygonBezier"))) )
{
drawing::PolyPolygonBezierCoords aPath;
aRet >>= aPath;
aRet <<= _ConvertPolyPolygonBezierToLayoutDir( aPath );
- // <--
}
- // <--
}
}
return aRet;
}
/** method to get property from aggregation object
-
- OD 2004-10-28 #i36248#
-
- @author OD
+ #i36248#
*/
uno::Any SwXShape::_getPropAtAggrObj( const ::rtl::OUString& _rPropertyName )
throw( beans::UnknownPropertyException, lang::WrappedTargetException,
@@ -1834,28 +1705,22 @@ uno::Any SwXShape::_getPropAtAggrObj( const ::rtl::OUString& _rPropertyName )
return aRet;
}
-
-/* -----------------------------02.11.00 09:41--------------------------------
-
- ---------------------------------------------------------------------------*/
beans::PropertyState SwXShape::getPropertyState( const rtl::OUString& rPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< rtl::OUString > aNames(1);
rtl::OUString* pStrings = aNames.getArray();
pStrings[0] = rPropertyName;
uno::Sequence< beans::PropertyState > aStates = getPropertyStates(aNames);
return aStates.getConstArray()[0];
}
-/* -----------------------------02.11.00 09:41--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
const uno::Sequence< rtl::OUString >& aPropertyNames )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
uno::Sequence< beans::PropertyState > aRet(aPropertyNames.getLength());
if(xShapeAgg.is())
@@ -1921,7 +1786,7 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
case RES_SURROUND:
pItem = pImpl->GetSurround();
break;
- // OD 2004-05-05 #i28701#
+ // #i28701#
case RES_WRAP_INFLUENCE_ON_OBJPOS:
{
pItem = pImpl->GetWrapInfluenceOnObjPos();
@@ -1952,13 +1817,11 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
throw uno::RuntimeException();
return aRet;
}
-/* -----------------------------02.11.00 09:41--------------------------------
- ---------------------------------------------------------------------------*/
void SwXShape::setPropertyToDefault( const rtl::OUString& rPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if(xShapeAgg.is())
{
@@ -1988,13 +1851,13 @@ void SwXShape::setPropertyToDefault( const rtl::OUString& rPropertyName )
case RES_OPAQUE : pImpl->SetOpaque(sal_False); break;
case FN_TEXT_RANGE :
break;
- // OD 2004-04-22 #i26791#
+ // #i26791#
case RES_FOLLOW_TEXT_FLOW:
{
pImpl->RemoveFollowTextFlow();
}
break;
- // OD 2004-05-05 #i28701#
+ // #i28701#
case RES_WRAP_INFLUENCE_ON_OBJPOS:
{
pImpl->RemoveWrapInfluenceOnObjPos();
@@ -2016,14 +1879,12 @@ void SwXShape::setPropertyToDefault( const rtl::OUString& rPropertyName )
else
throw uno::RuntimeException();
}
-/* -----------------------------02.11.00 09:41--------------------------------
- ---------------------------------------------------------------------------*/
uno::Any SwXShape::getPropertyDefault( const rtl::OUString& rPropertyName )
throw( beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
uno::Any aRet;
if(xShapeAgg.is())
@@ -2054,9 +1915,7 @@ uno::Any SwXShape::getPropertyDefault( const rtl::OUString& rPropertyName )
throw uno::RuntimeException();
return aRet;
}
-/*-- 22.01.99 11:42:27---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXShape::addPropertyChangeListener(
const rtl::OUString& _propertyName,
const uno::Reference< beans::XPropertyChangeListener > & _listener )
@@ -2071,9 +1930,7 @@ void SwXShape::addPropertyChangeListener(
if ( xShapeAgg->queryAggregation( beans::XPropertySet::static_type() ) >>= xShapeProps )
xShapeProps->addPropertyChangeListener( _propertyName, _listener );
}
-/*-- 22.01.99 11:42:27---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXShape::removePropertyChangeListener(
const rtl::OUString& _propertyName,
const uno::Reference< beans::XPropertyChangeListener > & _listener)
@@ -2088,9 +1945,7 @@ void SwXShape::removePropertyChangeListener(
if ( xShapeAgg->queryAggregation( beans::XPropertySet::static_type() ) >>= xShapeProps )
xShapeProps->removePropertyChangeListener( _propertyName, _listener );
}
-/*-- 22.01.99 11:42:28---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXShape::addVetoableChangeListener(
const rtl::OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/ )
@@ -2099,9 +1954,7 @@ void SwXShape::addVetoableChangeListener(
{
DBG_WARNING("not implemented");
}
-/*-- 22.01.99 11:42:28---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXShape::removeVetoableChangeListener(
const rtl::OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/)
@@ -2110,20 +1963,16 @@ void SwXShape::removeVetoableChangeListener(
{
DBG_WARNING("not implemented");
}
-/*-- 22.01.99 11:42:28---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXShape::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
}
-/* -----------------14.04.99 13:02-------------------
- *
- * --------------------------------------------------*/
+
void SwXShape::attach(const uno::Reference< text::XTextRange > & xTextRange)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// get access to SwDoc
// (see also SwXTextRange::XTextRangeToSwPaM)
@@ -2187,12 +2036,10 @@ void SwXShape::attach(const uno::Reference< text::XTextRange > & xTextRange)
}
}
}
-/* -----------------14.04.99 13:02-------------------
- *
- * --------------------------------------------------*/
+
uno::Reference< text::XTextRange > SwXShape::getAnchor(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > aRef;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
@@ -2211,38 +2058,32 @@ uno::Reference< text::XTextRange > SwXShape::getAnchor(void) throw( uno::Runtim
aRef = pImpl->GetTextRange();
return aRef;
}
-/* -----------------14.04.99 13:02-------------------
- *
- * --------------------------------------------------*/
+
void SwXShape::dispose(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
{
- // OD 10.07.2003 #110742# - determine correct <SdrObject>
- //SdrObject* pObj = pFmt->FindSdrObject();
+ // determine correct <SdrObject>
SdrObject* pObj = GetSvxShape()->GetSdrObject();
- // OD 10.07.2003 #110742# - safety assertion:
+ // safety assertion:
// <pObj> must be the same as <pFmt->FindSdrObject()>, if <pObj> isn't
// a 'virtual' drawing object.
- // OD 25.08.2003 #111713# - refine assertion for safety reason.
- // --> OD 2005-02-02 #119236# - correct assertion and refine it.
- ASSERT( !pObj ||
+ // correct assertion and refine it for safety reason.
+ OSL_ENSURE( !pObj ||
pObj->ISA(SwDrawVirtObj) ||
pObj->GetUpGroup() ||
pObj == pFmt->FindSdrObject(),
"<SwXShape::dispose(..) - different 'master' drawing objects!!" );
- // <--
- // OD 10.07.2003 #110742# - perform delete of draw frame format *not*
+ // perform delete of draw frame format *not*
// for 'virtual' drawing objects.
- // --> OD 2005-02-02 #119236# - no delete of draw format for members
+ // no delete of draw format for members
// of a group
if ( pObj &&
!pObj->ISA(SwDrawVirtObj) &&
!pObj->GetUpGroup() &&
pObj->IsInserted() )
- // <--
{
if (pFmt->GetAnchor().GetAnchorId() == FLY_AS_CHAR)
{
@@ -2264,9 +2105,7 @@ void SwXShape::dispose(void) throw( uno::RuntimeException )
xComp->dispose();
}
}
-/* -----------------14.04.99 13:02-------------------
- *
- * --------------------------------------------------*/
+
void SwXShape::addEventListener(
const uno::Reference< lang::XEventListener > & aListener)
throw( uno::RuntimeException )
@@ -2276,9 +2115,7 @@ void SwXShape::addEventListener(
if(pSvxShape)
pSvxShape->addEventListener(aListener);
}
-/* -----------------14.04.99 13:02-------------------
- *
- * --------------------------------------------------*/
+
void SwXShape::removeEventListener(
const uno::Reference< lang::XEventListener > & aListener)
throw( uno::RuntimeException )
@@ -2287,16 +2124,12 @@ void SwXShape::removeEventListener(
if(pSvxShape)
pSvxShape->removeEventListener(aListener);
}
-/* -----------------03.06.99 08:53-------------------
- *
- * --------------------------------------------------*/
+
rtl::OUString SwXShape::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXShape");
}
-/* -----------------03.06.99 08:53-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwXShape::supportsService(const rtl::OUString& rServiceName) throw( uno::RuntimeException )
{
sal_Bool bRet = sal_False;
@@ -2310,9 +2143,7 @@ sal_Bool SwXShape::supportsService(const rtl::OUString& rServiceName) throw( uno
}
return bRet;
}
-/* -----------------03.06.99 08:53-------------------
- *
- * --------------------------------------------------*/
+
uno::Sequence< rtl::OUString > SwXShape::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< rtl::OUString > aSeq;
@@ -2330,9 +2161,7 @@ uno::Sequence< rtl::OUString > SwXShape::getSupportedServiceNames(void) throw( u
}
return aSeq;
}
-/* -----------------------------15.03.00 14:54--------------------------------
- ---------------------------------------------------------------------------*/
SvxShape* SwXShape::GetSvxShape()
{
SvxShape* pSvxShape = 0;
@@ -2346,7 +2175,7 @@ SvxShape* SwXShape::GetSvxShape()
return pSvxShape;
}
-// --> OD 2004-07-22 #i31698# -
+// #i31698#
// implementation of virtual methods from drawing::XShape
awt::Point SAL_CALL SwXShape::getPosition() throw ( uno::RuntimeException )
{
@@ -2359,7 +2188,7 @@ awt::Point SAL_CALL SwXShape::getPosition() throw ( uno::RuntimeException )
SdrObject* pTopGroupObj = _GetTopGroupObj( pSvxShape );
if ( pTopGroupObj )
{
- // --> OD 2004-10-01 #i34750# - get attribute position of top group
+ // #i34750# - get attribute position of top group
// shape and add offset between top group object and group member
uno::Reference< drawing::XShape > xGroupShape =
uno::Reference< drawing::XShape >( pTopGroupObj->getUnoShape(),
@@ -2367,65 +2196,39 @@ awt::Point SAL_CALL SwXShape::getPosition() throw ( uno::RuntimeException )
aPos = xGroupShape->getPosition();
// add offset between top group object and group member
// to the determined attribute position
- // --> OD 2004-10-01 #i34750# - correction:
+ // #i34750#:
// consider the layout direction
const Rectangle aMemberObjRect = GetSvxShape()->GetSdrObject()->GetSnapRect();
const Rectangle aGroupObjRect = pTopGroupObj->GetSnapRect();
- // --> OD 2005-08-16 #i53320# - relative position of group member and
+ // #i53320# - relative position of group member and
// top group object is always given in horizontal left-to-right layout.
-// const SwFrmFmt::tLayoutDir eLayoutDir = GetFrmFmt()
-// ? GetFrmFmt()->GetLayoutDir()
-// : SwFrmFmt::HORI_L2R;
awt::Point aOffset( 0, 0 );
-// switch ( eLayoutDir )
-// {
-// case SwFrmFmt::HORI_L2R:
{
aOffset.X = ( aMemberObjRect.Left() - aGroupObjRect.Left() );
aOffset.Y = ( aMemberObjRect.Top() - aGroupObjRect.Top() );
}
-// break;
-// case SwFrmFmt::HORI_R2L:
-// {
-// aOffset.X = ( aGroupObjRect.Right() - aMemberObjRect.Right() );
-// aOffset.Y = ( aMemberObjRect.Top() - aGroupObjRect.Top() );
-// }
-// break;
-// case SwFrmFmt::VERT_R2L:
-// {
-// aOffset.X = ( aMemberObjRect.Top() - aGroupObjRect.Top() );
-// aOffset.Y = ( aGroupObjRect.Right() - aMemberObjRect.Right() );
-// }
-// break;
-// default:
-// {
-// ASSERT( false,
-// "<SwXShape::getPosition()> - unsupported layout direction" );
-// }
-// }
- // <--
aOffset.X = TWIP_TO_MM100(aOffset.X);
aOffset.Y = TWIP_TO_MM100(aOffset.Y);
aPos.X += aOffset.X;
aPos.Y += aOffset.Y;
- // <--
}
}
return aPos;
}
+
void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition )
throw ( uno::RuntimeException )
{
SdrObject* pTopGroupObj = _GetTopGroupObj();
if ( !pTopGroupObj )
{
- // --> OD 2005-02-10 #i37877# - no adjustment of position attributes,
+ // #i37877# - no adjustment of position attributes,
// if the position also has to be applied at the drawing object and
// a contact object is already registered at the drawing object.
bool bApplyPosAtDrawObj(false);
bool bNoAdjustOfPosProp(false);
- // --> OD 2004-10-19 #i35798# - apply position also to drawing object,
+ // #i35798# - apply position also to drawing object,
// if drawing object has no anchor position set.
if ( mxShape.is() )
{
@@ -2446,7 +2249,6 @@ void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition )
}
}
}
- // <--
// shape isn't a group member. Thus, set positioning attributes
if ( !bNoAdjustOfPosProp )
{
@@ -2456,7 +2258,6 @@ void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition )
{
mxShape->setPosition( aPosition );
}
- // <--
}
else if ( mxShape.is() )
{
@@ -2476,20 +2277,19 @@ void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition )
uno::Reference< drawing::XShape >( pTopGroupObj->getUnoShape(),
uno::UNO_QUERY );
{
- // --> OD 2004-09-29 #i34750# - correction:
+ // #i34750#
// use method <xGroupShape->getPosition()> to get the correct
// position of the top group object.
awt::Point aAttrPosInHoriL2R(
_ConvertPositionToHoriL2R( xGroupShape->getPosition(),
xGroupShape->getSize() ) );
- // <--
aNewPos.X -= aAttrPosInHoriL2R.X;
aNewPos.Y -= aAttrPosInHoriL2R.Y;
}
// convert relative position in horizontal left-to-right layout into
// absolute position in horizontal left-to-right layout
{
- // --> OD 2004-10-01 #i34750# - correction:
+ // #i34750#
// use method <SvxShape->getPosition()> to get the correct
// 'Drawing layer' position of the top group shape.
uno::Reference< lang::XUnoTunnel > xGrpShapeTunnel(
@@ -2500,12 +2300,12 @@ void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition )
const awt::Point aGroupPos = pSvxGroupShape->getPosition();
aNewPos.X += aGroupPos.X;
aNewPos.Y += aGroupPos.Y;
- // <--
}
// set position
mxShape->setPosition( aNewPos );
}
}
+
awt::Size SAL_CALL SwXShape::getSize() throw ( uno::RuntimeException )
{
awt::Size aSize;
@@ -2515,6 +2315,7 @@ awt::Size SAL_CALL SwXShape::getSize() throw ( uno::RuntimeException )
}
return aSize;
}
+
void SAL_CALL SwXShape::setSize( const awt::Size& aSize )
throw ( beans::PropertyVetoException,
uno::RuntimeException )
@@ -2524,8 +2325,7 @@ void SAL_CALL SwXShape::setSize( const awt::Size& aSize )
mxShape->setSize( aSize );
}
}
-// <--
-// --> OD 2004-07-22 #i31698# -
+// #i31698#
// implementation of virtual methods from drawing::XShapeDescriptor
::rtl::OUString SAL_CALL SwXShape::getShapeType() throw ( uno::RuntimeException )
{
@@ -2536,12 +2336,8 @@ void SAL_CALL SwXShape::setSize( const awt::Size& aSize )
}
return aType;
}
-// <--
/** method to determine top group object
-
- OD 2004-08-03 #i31698#
-
- @author OD
+ #i31698#
*/
SdrObject* SwXShape::_GetTopGroupObj( SvxShape* _pSvxShape )
{
@@ -2565,10 +2361,7 @@ SdrObject* SwXShape::_GetTopGroupObj( SvxShape* _pSvxShape )
}
/** method to determine position according to the positioning attributes
-
- OD 2004-08-03 #i31698#
-
- @author OD
+ #i31698#
*/
awt::Point SwXShape::_GetAttrPosition()
{
@@ -2578,7 +2371,7 @@ awt::Point SwXShape::_GetAttrPosition()
aHoriPos >>= aAttrPos.X;
uno::Any aVertPos( getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientPosition")) ) );
aVertPos >>= aAttrPos.Y;
- // --> OD 2004-10-19 #i35798# - fallback, if attribute position is (0,0)
+ // #i35798# - fallback, if attribute position is (0,0)
// and no anchor position is applied to the drawing object
SvxShape* pSvxShape = GetSvxShape();
if ( pSvxShape )
@@ -2594,8 +2387,7 @@ awt::Point SwXShape::_GetAttrPosition()
aAttrPos.Y = TWIP_TO_MM100(aObjRect.Top());
}
}
- // <--
- // --> OD 2004-11-10 #i35007# - If drawing object is anchored as-character,
+ // #i35007# - If drawing object is anchored as-character,
// it's x-position isn't sensible. Thus, return the x-position as zero in this case.
text::TextContentAnchorType eTextAnchorType =
text::TextContentAnchorType_AT_PARAGRAPH;
@@ -2608,17 +2400,13 @@ awt::Point SwXShape::_GetAttrPosition()
{
aAttrPos.X = 0;
}
- // <--
return aAttrPos;
}
/** method to convert the position (translation) of the drawing object to
the layout direction horizontal left-to-right.
-
- OD 2004-07-27 #i31698#
-
- @author OD
+ #i31698#
*/
awt::Point SwXShape::_ConvertPositionToHoriL2R( const awt::Point _aObjPos,
const awt::Size _aObjSize )
@@ -2649,7 +2437,7 @@ awt::Point SwXShape::_ConvertPositionToHoriL2R( const awt::Point _aObjPos,
break;
default:
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwXShape::_ConvertPositionToHoriL2R(..)> - unsupported layout direction" );
}
}
@@ -2657,28 +2445,26 @@ awt::Point SwXShape::_ConvertPositionToHoriL2R( const awt::Point _aObjPos,
return aObjPosInHoriL2R;
}
+
/** method to convert the transformation of the drawing object to the layout
direction, the drawing object is in
-
- OD 2004-07-27 #i31698#
-
- @author OD
+ #i31698#
*/
drawing::HomogenMatrix3 SwXShape::_ConvertTransformationToLayoutDir(
drawing::HomogenMatrix3 _aMatrixInHoriL2R )
{
drawing::HomogenMatrix3 aMatrix( _aMatrixInHoriL2R );
- // --> OD 2005-03-10 #i44334#, #i44681# - direct manipulation of the
+ // #i44334#, #i44681# - direct manipulation of the
// tranformation structure isn't valid, if it contains rotation.
SvxShape* pSvxShape = GetSvxShape();
- ASSERT( pSvxShape,
- "<SwXShape::_ConvertTransformationToLayoutDir(..)> - no SvxShape found!")
+ OSL_ENSURE( pSvxShape,
+ "<SwXShape::_ConvertTransformationToLayoutDir(..)> - no SvxShape found!");
if ( pSvxShape )
{
const SdrObject* pObj = pSvxShape->GetSdrObject();
- ASSERT( pObj,
- "<SwXShape::_ConvertTransformationToLayoutDir(..)> - no SdrObject found!")
+ OSL_ENSURE( pObj,
+ "<SwXShape::_ConvertTransformationToLayoutDir(..)> - no SdrObject found!");
if ( pObj )
{
// get position of object in Writer coordinate system.
@@ -2695,9 +2481,8 @@ drawing::HomogenMatrix3 SwXShape::_ConvertTransformationToLayoutDir(
// apply translation difference to transformation matrix.
if ( aTranslateDiff.X != 0 || aTranslateDiff.Y != 0 )
{
- // --> OD 2007-01-03 #i73079# - use correct matrix type
+ // #i73079# - use correct matrix type
::basegfx::B2DHomMatrix aTempMatrix;
- // <--
aTempMatrix.set(0, 0, aMatrix.Line1.Column1 );
aTempMatrix.set(0, 1, aMatrix.Line1.Column2 );
@@ -2708,11 +2493,8 @@ drawing::HomogenMatrix3 SwXShape::_ConvertTransformationToLayoutDir(
aTempMatrix.set(2, 0, aMatrix.Line3.Column1 );
aTempMatrix.set(2, 1, aMatrix.Line3.Column2 );
aTempMatrix.set(2, 2, aMatrix.Line3.Column3 );
-
- // --> OD 2007-01-03 #i73079#
+ // #i73079#
aTempMatrix.translate( aTranslateDiff.X, aTranslateDiff.Y );
- // <--
-
aMatrix.Line1.Column1 = aTempMatrix.get(0, 0);
aMatrix.Line1.Column2 = aTempMatrix.get(0, 1);
aMatrix.Line1.Column3 = aTempMatrix.get(0, 2);
@@ -2725,21 +2507,17 @@ drawing::HomogenMatrix3 SwXShape::_ConvertTransformationToLayoutDir(
}
}
}
- // <--
return aMatrix;
}
/** method to adjust the positioning properties
-
- OD 2004-08-02 #i31698#
-
- @author OD
+ #i31698#
*/
void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition )
{
// handle x-position
- // --> OD 2004-11-10 #i35007# - no handling of x-position, if drawing
+ // #i35007# - no handling of x-position, if drawing
// object is anchored as-character, because it doesn't make sense.
text::TextContentAnchorType eTextAnchorType =
text::TextContentAnchorType_AT_PARAGRAPH;
@@ -2749,7 +2527,6 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition )
aAny >>= eTextAnchorType;
}
if ( eTextAnchorType != text::TextContentAnchorType_AS_CHARACTER )
- // <--
{
// determine current x-postion
rtl::OUString aHoriPosPropStr( RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition") );
@@ -2812,10 +2589,7 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition )
/** method to convert start or end position of the drawing object to the
Writer specific position, which is the attribute position in layout direction
-
- OD 2009-01-12 #i59051#
-
- @author OD
+ #i59051#
*/
::com::sun::star::awt::Point SwXShape::_ConvertStartOrEndPosToLayoutDir(
const ::com::sun::star::awt::Point& aStartOrEndPos )
@@ -2823,13 +2597,13 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition )
awt::Point aConvertedPos( aStartOrEndPos );
SvxShape* pSvxShape = GetSvxShape();
- ASSERT( pSvxShape,
- "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SvxShape found!")
+ OSL_ENSURE( pSvxShape,
+ "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SvxShape found!");
if ( pSvxShape )
{
const SdrObject* pObj = pSvxShape->GetSdrObject();
- ASSERT( pObj,
- "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SdrObject found!")
+ OSL_ENSURE( pObj,
+ "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SdrObject found!");
if ( pObj )
{
// get position of object in Writer coordinate system.
@@ -2861,13 +2635,13 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition )
drawing::PolyPolygonBezierCoords aConvertedPath( aPath );
SvxShape* pSvxShape = GetSvxShape();
- ASSERT( pSvxShape,
- "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SvxShape found!")
+ OSL_ENSURE( pSvxShape,
+ "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SvxShape found!");
if ( pSvxShape )
{
const SdrObject* pObj = pSvxShape->GetSdrObject();
- ASSERT( pObj,
- "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SdrObject found!")
+ OSL_ENSURE( pObj,
+ "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SdrObject found!");
if ( pObj )
{
// get position of object in Writer coordinate system.
@@ -2910,27 +2684,19 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition )
return aConvertedPath;
}
-/*-- 31.05.01 09:59:19---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXGroupShape::SwXGroupShape(uno::Reference< XInterface > & xShape) :
SwXShape(xShape)
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
uno::Reference<XShapes> xShapes(xShapeAgg, uno::UNO_QUERY);
DBG_ASSERT(xShapes.is(), "no SvxShape found or shape is not a group shape");
#endif
}
-/*-- 31.05.01 09:59:19---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXGroupShape::~SwXGroupShape()
{
}
-/*-- 31.05.01 09:59:19---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXGroupShape::queryInterface( const uno::Type& rType ) throw(uno::RuntimeException)
{
uno::Any aRet;
@@ -2940,26 +2706,20 @@ uno::Any SwXGroupShape::queryInterface( const uno::Type& rType ) throw(uno::Runt
aRet = SwXShape::queryInterface(rType);
return aRet;
}
-/*-- 31.05.01 09:59:19---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXGroupShape::acquire( ) throw()
{
SwXShape::acquire();
}
-/*-- 31.05.01 09:59:19---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXGroupShape::release( ) throw()
{
SwXShape::release();
}
-/*-- 31.05.01 09:59:19---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXGroupShape::add( const uno::Reference< XShape >& xShape ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SvxShape* pSvxShape = GetSvxShape();
SwFrmFmt* pFmt = GetFrmFmt();
if(pSvxShape && pFmt)
@@ -2991,7 +2751,7 @@ void SwXGroupShape::add( const uno::Reference< XShape >& xShape ) throw (uno::Ru
if(pObj)
{
SwDoc* pDoc = pFmt->GetDoc();
- // OD 25.06.2003 #108784# - set layer of new drawing
+ // set layer of new drawing
// object to corresponding invisible layer.
if( FmFormInventor != pObj->GetObjInventor())
{
@@ -3015,12 +2775,10 @@ void SwXGroupShape::add( const uno::Reference< XShape >& xShape ) throw (uno::Ru
else
throw uno::RuntimeException();
}
-/*-- 31.05.01 09:59:20---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXGroupShape::remove( const uno::Reference< XShape >& xShape ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference<XShapes> xShapes;
if( xShapeAgg.is() )
{
@@ -3032,12 +2790,10 @@ void SwXGroupShape::remove( const uno::Reference< XShape >& xShape ) throw (uno:
throw uno::RuntimeException();
xShapes->remove(xShape);
}
-/*-- 31.05.01 09:59:20---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXGroupShape::getCount(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() )
{
@@ -3049,14 +2805,12 @@ sal_Int32 SwXGroupShape::getCount(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return xAcc->getCount();
}
-/*-- 31.05.01 09:59:20---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXGroupShape::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() )
{
@@ -3068,12 +2822,10 @@ uno::Any SwXGroupShape::getByIndex(sal_Int32 nIndex)
throw uno::RuntimeException();
return xAcc->getByIndex(nIndex);
}
-/*-- 31.05.01 09:59:20---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SwXGroupShape::getElementType( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() )
{
@@ -3085,12 +2837,10 @@ uno::Type SwXGroupShape::getElementType( ) throw(uno::RuntimeException)
throw uno::RuntimeException();
return xAcc->getElementType();
}
-/*-- 31.05.01 09:59:22---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXGroupShape::hasElements( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() )
{
@@ -3103,4 +2853,4 @@ sal_Bool SwXGroupShape::hasElements( ) throw(uno::RuntimeException)
return xAcc->hasElements();
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoevent.cxx b/sw/source/core/unocore/unoevent.cxx
index 333e132f4e6a..c58728e40b68 100644
--- a/sw/source/core/unocore/unoevent.cxx
+++ b/sw/source/core/unocore/unoevent.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,15 +37,11 @@
#include "unostyle.hxx"
#include "swevent.hxx"
#include "docstyle.hxx"
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include "fmtinfmt.hxx"
#include <svl/macitem.hxx>
#include <rtl/ustrbuf.hxx>
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -331,3 +328,4 @@ sal_uInt16 SwFrameStyleEventDescriptor::getMacroItemWhich() const
return RES_FRMMACRO;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoevtlstnr.cxx b/sw/source/core/unocore/unoevtlstnr.cxx
index 197715bbd7e6..0e20fd81af9f 100644
--- a/sw/source/core/unocore/unoevtlstnr.cxx
+++ b/sw/source/core/unocore/unoevtlstnr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,22 +40,14 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
-/* -----------------22.04.99 11:24-------------------
- *
- * --------------------------------------------------*/
SV_IMPL_PTRARR(SwEvtLstnrArray, XEventListenerPtr);
-/*-- 22.04.99 11:24:59---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwEventListenerContainer::SwEventListenerContainer( uno::XInterface* _pxParent) :
pListenerArr(0),
pxParent(_pxParent)
{
}
-/*-- 22.04.99 11:24:59---------------------------------------------------
- -----------------------------------------------------------------------*/
SwEventListenerContainer::~SwEventListenerContainer()
{
if(pListenerArr && pListenerArr->Count())
@@ -63,9 +56,7 @@ SwEventListenerContainer::~SwEventListenerContainer()
}
delete pListenerArr;
}
-/*-- 22.04.99 11:24:59---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwEventListenerContainer::AddListener(const uno::Reference< lang::XEventListener > & rxListener)
{
if(!pListenerArr)
@@ -74,9 +65,7 @@ void SwEventListenerContainer::AddListener(const uno::Reference< lang::XEvent
*pInsert = rxListener;
pListenerArr->Insert(pInsert, pListenerArr->Count());
}
-/*-- 22.04.99 11:25:00---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwEventListenerContainer::RemoveListener(const uno::Reference< lang::XEventListener > & rxListener)
{
if(!pListenerArr)
@@ -98,9 +87,7 @@ sal_Bool SwEventListenerContainer::RemoveListener(const uno::Reference< lang:
}
return sal_False;
}
-/*-- 22.04.99 11:25:00---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwEventListenerContainer::Disposing()
{
if(!pListenerArr)
@@ -115,4 +102,4 @@ void SwEventListenerContainer::Disposing()
pListenerArr->DeleteAndDestroy(0, pListenerArr->Count());
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index f0a62ea968ac..34d473ee4199 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,7 +88,7 @@
#include <svx/dataaccessdescriptor.hxx>
#define _SVSTDARR_STRINGS
#include <svl/svstdarr.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <textapi.hxx>
#include <editeng/outliner.hxx>
@@ -124,11 +125,13 @@ static const sal_uInt16 aDocInfoSubTypeFromService[] =
DI_TITEL, //PROPERTY_MAP_FLDTYP_DOCINFO_TITLE
DI_DOCNO //PROPERTY_MAP_FLDTYP_DOCINFO_REVISION
};
+
struct ServiceIdResId
{
sal_uInt16 nResId;
sal_uInt16 nServiceId;
};
+
static const ServiceIdResId aServiceToRes[] =
{
{RES_DATETIMEFLD, SW_SERVICE_FIELDTYPE_DATETIME },
@@ -185,19 +188,19 @@ static const ServiceIdResId aServiceToRes[] =
{RES_TABLEFLD, SW_SERVICE_FIELDTYPE_TABLE_FORMULA },
{USHRT_MAX, USHRT_MAX }
};
-//-----------------------------------------------------------------
+
sal_uInt16 lcl_ServiceIdToResId(sal_uInt16 nServiceId)
{
const ServiceIdResId* pMap = aServiceToRes;
while( USHRT_MAX != pMap->nServiceId && nServiceId != pMap->nServiceId )
++pMap;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( USHRT_MAX == pMap->nServiceId )
- DBG_ERROR("service id not found");
+ OSL_FAIL("service id not found");
#endif
return pMap->nResId;
}
-//-----------------------------------------------------------------
+
sal_uInt16 lcl_GetServiceForField( const SwField& rFld )
{
sal_uInt16 nWhich = rFld.Which(), nSrvId = USHRT_MAX;
@@ -271,9 +274,9 @@ sal_uInt16 lcl_GetServiceForField( const SwField& rFld )
break;
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( USHRT_MAX == nSrvId )
- DBG_ERROR("resid not found");
+ OSL_FAIL("resid not found");
#endif
return nSrvId;
}
@@ -293,7 +296,6 @@ sal_uInt16 lcl_GetPropMapIdForFieldType( sal_uInt16 nWhich )
return nId;
}
-
sal_uInt16 GetFieldTypeMId( const OUString& rProperty, const SwFieldType& rTyp )
{
sal_uInt16 nId = lcl_GetPropMapIdForFieldType( rTyp.Which() );
@@ -382,7 +384,7 @@ sal_uInt16 lcl_GetPropertyMapOfService( sal_uInt16 nServiceId )
case SW_SERVICE_FIELDMASTER_DUMMY5: nRet = PROPERTY_MAP_FLDMSTR_DUMMY0; break;
case SW_SERVICE_FIELDTYPE_HIDDEN_TEXT: nRet = PROPERTY_MAP_FLDTYP_HIDDEN_TEXT; break;
default:
- DBG_ERROR( "wrong service id" );
+ OSL_FAIL( "wrong service id" );
nRet = USHRT_MAX;
}
return nRet;
@@ -392,17 +394,13 @@ sal_uInt16 lcl_GetPropertyMapOfService( sal_uInt16 nServiceId )
* SwXFieldMaster
******************************************************************/
TYPEINIT1(SwXFieldMaster, SwClient);
-/* -----------------------------13.03.00 12:15--------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXFieldMaster::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXFieldMaster::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -414,16 +412,12 @@ sal_Int64 SAL_CALL SwXFieldMaster::getSomething( const uno::Sequence< sal_Int8 >
}
return 0;
}
-/* -----------------------------06.04.00 13:22--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXFieldMaster::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXFieldMaster");
}
-/* -----------------------------06.04.00 13:22--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXFieldMaster::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
sal_Bool bRet = sal_False;
@@ -452,9 +446,7 @@ sal_Bool SwXFieldMaster::supportsService(const OUString& rServiceName) throw( un
}
return bRet;
}
-/* -----------------------------06.04.00 13:22--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXFieldMaster::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(2);
@@ -479,9 +471,7 @@ uno::Sequence< OUString > SwXFieldMaster::getSupportedServiceNames(void) throw(
}
return aRet;
}
-/*-- 14.12.98 11:08:33---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXFieldMaster::SwXFieldMaster(SwDoc* pDoc, sal_uInt16 nResId) :
aLstnrCntnr( (XPropertySet*)this),
nResTypeId(nResId),
@@ -494,9 +484,7 @@ SwXFieldMaster::SwXFieldMaster(SwDoc* pDoc, sal_uInt16 nResId) :
{
pDoc->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
}
-/*-- 14.12.98 11:08:33---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXFieldMaster::SwXFieldMaster(SwFieldType& rType, SwDoc* pDoc) :
SwClient(&rType),
aLstnrCntnr( (XPropertySet*)this),
@@ -509,34 +497,28 @@ SwXFieldMaster::SwXFieldMaster(SwFieldType& rType, SwDoc* pDoc) :
{
}
-/*-- 14.12.98 11:08:34---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXFieldMaster::~SwXFieldMaster()
{
}
-/*-- 14.12.98 11:08:35---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXFieldMaster::getPropertySetInfo(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< beans::XPropertySetInfo > aRef =
aSwMapProvider.GetPropertySet(
lcl_GetPropMapIdForFieldType( nResTypeId ) )->getPropertySetInfo();
return aRef;
}
-/*-- 14.12.98 11:08:35---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFieldMaster::setPropertyValue( const OUString& rPropertyName,
const uno::Any& rValue)
throw( beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFieldType* pType = GetFldType(sal_True);
if(pType)
{
@@ -712,9 +694,7 @@ void SwXFieldMaster::setPropertyValue( const OUString& rPropertyName,
}
}
}
-/* -----------------------------30.03.01 14:40--------------------------------
- ---------------------------------------------------------------------------*/
SwFieldType* SwXFieldMaster::GetFldType(sal_Bool bDontCreate) const
{
if(!bDontCreate && RES_DBFLD == nResTypeId && m_bIsDescriptor && m_pDoc)
@@ -743,9 +723,6 @@ SwFieldType* SwXFieldMaster::GetFldType(sal_Bool bDontCreate) const
return (SwFieldType*)GetRegisteredIn();
}
-/*-- 14.12.98 11:08:36---------------------------------------------------
-
- -----------------------------------------------------------------------*/
typedef SwFmtFld* SwFmtFldPtr;
SV_DECL_PTRARR(SwDependentFields, SwFmtFldPtr, 5, 5)
SV_IMPL_PTRARR(SwDependentFields, SwFmtFldPtr)
@@ -753,7 +730,7 @@ SV_IMPL_PTRARR(SwDependentFields, SwFmtFldPtr)
uno::Any SwXFieldMaster::getPropertyValue(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
SwFieldType* pType = GetFldType(sal_True);
if( rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_INSTANCE_NAME)) )
@@ -900,41 +877,30 @@ uno::Any SwXFieldMaster::getPropertyValue(const OUString& rPropertyName)
}
return aRet;
}
-/*-- 14.12.98 11:08:36---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFieldMaster::addPropertyChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 11:08:36---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFieldMaster::removePropertyChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 11:08:37---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFieldMaster::addVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 11:08:37---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFieldMaster::removeVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 25.02.99 11:01:57---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXFieldMaster::dispose(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFieldType* pFldType = GetFldType(sal_True);
if(pFldType)
{
@@ -969,9 +935,7 @@ void SwXFieldMaster::dispose(void) throw( uno::RuntimeException )
else
throw uno::RuntimeException();
}
-/*-- 25.02.99 11:02:00---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFieldMaster::addEventListener(const uno::Reference< lang::XEventListener > & aListener)
throw( uno::RuntimeException )
{
@@ -979,9 +943,7 @@ void SwXFieldMaster::addEventListener(const uno::Reference< lang::XEventListener
throw uno::RuntimeException();
aLstnrCntnr.AddListener(aListener);
}
-/*-- 25.02.99 11:02:02---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFieldMaster::removeEventListener(const uno::Reference< lang::XEventListener > & aListener)
throw( uno::RuntimeException )
{
@@ -989,9 +951,6 @@ void SwXFieldMaster::removeEventListener(const uno::Reference< lang::XEventListe
throw uno::RuntimeException();
}
-/*-- 14.12.98 11:08:38---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXFieldMaster::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -1001,31 +960,7 @@ void SwXFieldMaster::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
m_pDoc = 0;
}
}
-/* -----------------------------06.11.00 09:44--------------------------------
-
-const Programmatic2UIName_Impl* lcl_GetFieldNameTable()
-{
- static sal_Bool bInitialized = sal_False;
- static Programmatic2UIName_Impl aFieldNames[5];
- if(!bInitialized)
- {
- bInitialized = sal_True;
- int nName = 0;
- aFieldNames[nName].sUIName = String (SW_RES(STR_POOLCOLL_LABEL_ABB ));
- aFieldNames[nName++].sProgrammaticName = String (SW_RES(STR_POCO_PRGM_LABEL_ABB));
- aFieldNames[nName].sUIName = String (SW_RES(STR_POOLCOLL_LABEL_TABLE ));
- aFieldNames[nName++].sProgrammaticName = String (SW_RES(STR_POCO_PRGM_LABEL_TABLE));
- aFieldNames[nName].sUIName = String (SW_RES(STR_POOLCOLL_LABEL_FRAME));
- aFieldNames[nName++].sProgrammaticName = String (SW_RES(STR_POCO_PRGM_LABEL_FRAME));
- aFieldNames[nName].sUIName = String (SW_RES(STR_POOLCOLL_LABEL_DRAWING ));
- aFieldNames[nName++].sProgrammaticName = String (SW_RES(STR_POCO_PRGM_LABEL_DRAWING));
- }
- return &aFieldNames[0];
-}
- ---------------------------------------------------------------------------*/
-/* -----------------------------06.11.00 10:26--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXFieldMaster::GetProgrammaticName(const SwFieldType& rType, SwDoc& rDoc)
{
OUString sRet(rType.GetName());
@@ -1043,9 +978,7 @@ OUString SwXFieldMaster::GetProgrammaticName(const SwFieldType& rType, SwDoc& rD
}
return sRet;
}
-/* -----------------------------06.11.00 14:12--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXFieldMaster::LocalizeFormula(
const SwSetExpField& rFld,
const OUString& rFormula,
@@ -1067,7 +1000,6 @@ OUString SwXFieldMaster::LocalizeFormula(
return rFormula;
}
-
SwXTextField * CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt)
{
SwClientIter aIter(*rFmt.GetFld()->GetTyp());
@@ -1086,9 +1018,6 @@ SwXTextField * CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt)
return pField ? pField : new SwXTextField( rFmt, &rDoc );
}
-/******************************************************************
- *
- ******************************************************************/
struct SwFieldProperties_Impl
{
String sPar1;
@@ -1136,17 +1065,13 @@ struct SwFieldProperties_Impl
};
TYPEINIT1(SwXTextField, SwClient);
-/* -----------------------------13.03.00 12:15--------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXTextField::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXTextField::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -1158,9 +1083,6 @@ sal_Int64 SAL_CALL SwXTextField::getSomething( const uno::Sequence< sal_Int8 >&
}
return 0;
}
-/*-- 14.12.98 11:37:14---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextField::SwXTextField(sal_uInt16 nServiceId, SwDoc* pDoc) :
aLstnrCntnr( (XTextContent*)this),
@@ -1184,9 +1106,7 @@ SwXTextField::SwXTextField(sal_uInt16 nServiceId, SwDoc* pDoc) :
m_pProps->nUSHORT2 = USHRT_MAX;
}
-/*-- 14.12.98 11:37:15---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextField::SwXTextField(const SwFmtFld& rFmt, SwDoc* pDc) :
aLstnrCntnr( (XTextContent*)this),
pFmtFld(&rFmt),
@@ -1199,9 +1119,7 @@ SwXTextField::SwXTextField(const SwFmtFld& rFmt, SwDoc* pDc) :
{
pDc->GetUnoCallBack()->Add(this);
}
-/*-- 14.12.98 11:37:15---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextField::~SwXTextField()
{
if ( m_pTextObject )
@@ -1212,13 +1130,11 @@ SwXTextField::~SwXTextField()
delete m_pProps;
}
-/*-- 14.12.98 11:37:16---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextField::attachTextFieldMaster(const uno::Reference< beans::XPropertySet > & xFieldMaster)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!m_bIsDescriptor)
throw uno::RuntimeException();
uno::Reference< lang::XUnoTunnel > xMasterTunnel(xFieldMaster, uno::UNO_QUERY);
@@ -1237,12 +1153,10 @@ void SwXTextField::attachTextFieldMaster(const uno::Reference< beans::XPropertyS
throw lang::IllegalArgumentException();
}
-/*-- 14.12.98 11:37:16---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySet > SwXTextField::getTextFieldMaster(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFieldType* pType = 0;
if( m_bIsDescriptor && m_aFieldTypeClient.GetRegisteredIn() )
{
@@ -1261,12 +1175,10 @@ uno::Reference< beans::XPropertySet > SwXTextField::getTextFieldMaster(void) th
return pMaster;
}
-/*-- 14.12.98 11:37:16---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwXTextField::getPresentation(sal_Bool bShowCommand) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwField const*const pField = GetField();
if (!pField)
@@ -1278,14 +1190,12 @@ OUString SwXTextField::getPresentation(sal_Bool bShowCommand) throw( uno::Runtim
: pField->ExpandField(true) );
return ret;
}
-/* -----------------18.02.99 13:39-------------------
- *
- * --------------------------------------------------*/
+
void SwXTextField::attachToRange(
const uno::Reference< text::XTextRange > & xTextRange)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!m_bIsDescriptor)
throw uno::RuntimeException();
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
@@ -1635,7 +1545,7 @@ void SwXTextField::attachToRange(
SwFieldType* pFldType = pDoc->GetFldType(RES_SETEXPFLD, m_sTypeName, sal_True);
if(!pFldType)
throw uno::RuntimeException();
- //#93192# detect the field type's sub type and set an appropriate number format
+ // detect the field type's sub type and set an appropriate number format
if(m_pProps->bFormatIsDefault &&
nsSwGetSetExpType::GSE_STRING == ((SwSetExpFieldType*)pFldType)->GetType())
m_pProps->nFormat = -1;
@@ -1672,7 +1582,7 @@ void SwXTextField::attachToRange(
//case text::SetVariableType::SEQUENCE: nSubType = nsSwGetSetExpType::GSE_SEQ; break;
case text::SetVariableType::FORMULA: nSubType = nsSwGetSetExpType::GSE_FORMULA; break;
default:
- DBG_ERROR("wrong value");
+ OSL_FAIL("wrong value");
nSubType = nsSwGetSetExpType::GSE_EXPR;
}
//make sure the SubType matches the field type
@@ -1808,7 +1718,7 @@ void SwXTextField::attachToRange(
((SwTblField*)pFld)->ChgExpStr(m_pProps->sPar1);
}
break;
- default: DBG_ERROR("was ist das fuer ein Typ?");
+ default: OSL_FAIL("was ist das fuer ein Typ?");
}
if(pFld)
{
@@ -1854,21 +1764,17 @@ void SwXTextField::attachToRange(
else
throw lang::IllegalArgumentException();
}
-/*-- 14.12.98 11:37:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextField::attach(const uno::Reference< text::XTextRange > & xTextRange)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
attachToRange( xTextRange );
}
-/*-- 14.12.98 11:37:18---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SwXTextField::getAnchor(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > aRef;
SwField* pField = (SwField*)GetField();
if(pField)
@@ -1886,12 +1792,10 @@ uno::Reference< text::XTextRange > SwXTextField::getAnchor(void) throw( uno::Ru
return aRef;
}
-/*-- 14.12.98 11:37:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextField::dispose(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwField* pField = (SwField*)GetField();
if(pField)
{
@@ -1911,30 +1815,24 @@ void SwXTextField::dispose(void) throw( uno::RuntimeException )
m_pTextObject = 0;
}
}
-/*-- 14.12.98 11:37:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextField::addEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException )
{
if(!GetRegisteredIn())
throw uno::RuntimeException();
aLstnrCntnr.AddListener(aListener);
}
-/*-- 14.12.98 11:37:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextField::removeEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException )
{
if(!GetRegisteredIn() || !aLstnrCntnr.RemoveListener(aListener))
throw uno::RuntimeException();
}
-/*-- 14.12.98 11:37:19---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXTextField::getPropertySetInfo(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
//kein static
uno::Reference< beans::XPropertySetInfo > aRef;
if(m_nServiceId != USHRT_MAX)
@@ -1952,14 +1850,12 @@ uno::Reference< beans::XPropertySetInfo > SwXTextField::getPropertySetInfo(void
throw uno::RuntimeException();
return aRef;
}
-/*-- 14.12.98 11:37:19---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextField::setPropertyValue(const OUString& rPropertyName, const uno::Any& rValue)
throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException,
lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwField* pField = (SwField*)GetField();
const SfxItemPropertySet* _pPropSet = aSwMapProvider.GetPropertySet(
lcl_GetPropertyMapOfService( m_nServiceId));
@@ -1986,7 +1882,6 @@ void SwXTextField::setPropertyValue(const OUString& rPropertyName, const uno::An
}
else
{
- // -> #111840#
SwDoc * pDoc = GetDoc();
if (NULL != pDoc)
@@ -1998,7 +1893,6 @@ void SwXTextField::setPropertyValue(const OUString& rPropertyName, const uno::An
aPosition.nContent = *pTxtFld->GetStart();
pDoc->PutValueToField( aPosition, rValue, pEntry->nWID);
}
- // <- #111840#
}
pField->PutValue( rValue, pEntry->nWID );
@@ -2008,7 +1902,7 @@ void SwXTextField::setPropertyValue(const OUString& rPropertyName, const uno::An
const_cast<SwFmtFld*>(pFmtFld)->Broadcast(SwFmtFldHint( 0, SWFMTFLD_CHANGED ));
}
- //#114571# changes of the expanded string have to be notified
+ // changes of the expanded string have to be notified
//#to the SwTxtFld
if(RES_DBFLD == nWhich && pFmtFld->GetTxtFld())
{
@@ -2115,13 +2009,11 @@ void SwXTextField::setPropertyValue(const OUString& rPropertyName, const uno::An
else
throw uno::RuntimeException();
}
-/*-- 14.12.98 11:37:19---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXTextField::getPropertyValue(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
const SwField* pField = GetField();
const SfxItemPropertySet* _pPropSet = aSwMapProvider.GetPropertySet(
@@ -2303,40 +2195,30 @@ uno::Any SwXTextField::getPropertyValue(const OUString& rPropertyName)
}
return aRet;
}
-/*-- 14.12.98 11:37:20---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextField::addPropertyChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 11:37:20---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextField::removePropertyChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 11:37:20---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextField::addVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 11:37:20---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextField::removeVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/* -----------------------------23.03.01 13:15--------------------------------
- ---------------------------------------------------------------------------*/
void SwXTextField::update( ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const SwField* pFld = GetField();
if(pFld)
{
@@ -2382,31 +2264,24 @@ void SwXTextField::update( ) throw (uno::RuntimeException)
}
break;
}
- // --> FME 2004-10-06 #116480#
// Text formatting has to be triggered.
const_cast<SwFmtFld*>(pFmtFld)->Modify( 0, 0 );
- // <--
}
else
m_bCallUpdate = sal_True;
}
-/* -----------------19.03.99 14:11-------------------
- *
- * --------------------------------------------------*/
+
OUString SwXTextField::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXTextField");
}
-/* -----------------19.03.99 14:11-------------------
- *
- * --------------------------------------------------*/
static OUString OldNameToNewName_Impl( const OUString &rOld )
{
- static OUString aOldNamePart1( OUString::createFromAscii(".TextField.DocInfo.") );
- static OUString aOldNamePart2( OUString::createFromAscii(".TextField.") );
- static OUString aNewNamePart1( OUString::createFromAscii(".textfield.docinfo.") );
- static OUString aNewNamePart2( OUString::createFromAscii(".textfield.") );
+ static OUString aOldNamePart1(RTL_CONSTASCII_USTRINGPARAM(".TextField.DocInfo."));
+ static OUString aOldNamePart2(RTL_CONSTASCII_USTRINGPARAM(".TextField."));
+ static OUString aNewNamePart1(RTL_CONSTASCII_USTRINGPARAM(".textfield.docinfo."));
+ static OUString aNewNamePart2(RTL_CONSTASCII_USTRINGPARAM(".textfield."));
OUString sServiceNameCC( rOld );
sal_Int32 nIdx = sServiceNameCC.indexOf( aOldNamePart1 );
if (nIdx >= 0)
@@ -2429,9 +2304,7 @@ sal_Bool SwXTextField::supportsService(const OUString& rServiceName) throw( uno:
rServiceName.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextContent"));
}
-/* -----------------19.03.99 14:11-------------------
- *
- * --------------------------------------------------*/
+
uno::Sequence< OUString > SwXTextField::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
OUString sServiceName = SwXServiceProvider::GetProviderName(m_nServiceId);
@@ -2461,9 +2334,6 @@ void SwXTextField::Invalidate()
}
}
-/* -----------------14.12.98 12:00-------------------
- *
- * --------------------------------------------------*/
void SwXTextField::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
switch( pOld ? pOld->Which() : 0 )
@@ -2486,9 +2356,7 @@ void SwXTextField::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
break;
}
}
-/*-- 14.12.98 11:37:21---------------------------------------------------
- -----------------------------------------------------------------------*/
const SwField* SwXTextField::GetField() const
{
if(GetRegisteredIn() && pFmtFld)
@@ -2497,29 +2365,19 @@ const SwField* SwXTextField::GetField() const
}
/******************************************************************
- *
- ******************************************************************/
-/******************************************************************
* SwXTextFieldMasters
******************************************************************/
-/* -----------------------------06.04.00 13:22--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXTextFieldMasters::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXTextFieldMasters");
}
-/* -----------------------------06.04.00 13:22--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXTextFieldMasters::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
"com.sun.star.text.TextFieldMasters" ));
}
-/* -----------------------------06.04.00 13:22--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXTextFieldMasters::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(1);
@@ -2527,21 +2385,18 @@ uno::Sequence< OUString > SwXTextFieldMasters::getSupportedServiceNames(void) th
pArray[0] = C2U("com.sun.star.text.TextFieldMasters");
return aRet;
}
-/*-- 21.12.98 10:37:14---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextFieldMasters::SwXTextFieldMasters(SwDoc* _pDoc) :
SwUnoCollection(_pDoc)
{
}
-/*-- 21.12.98 10:37:32---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextFieldMasters::~SwXTextFieldMasters()
{
}
-/*-- 21.12.98 10:37:33---------------------------------------------------
+
+/*-----------------------------------------------------------------------
Iteration ueber nicht-Standard Feldtypen
USER/SETEXP/DDE/DATABASE
Der Name ist demnach:
@@ -2553,7 +2408,6 @@ SwXTextFieldMasters::~SwXTextFieldMasters()
Falls wir grosszuegig werden wollen, dann koennte man com.sun.star.text
auch optional weglassen
-----------------------------------------------------------------------*/
-
sal_uInt16 lcl_GetIdByName( String& rName, String& rTypeName )
{
if( rName.EqualsAscii( COM_TEXT_FLDMASTER, 0, RTL_CONSTASCII_LENGTH(COM_TEXT_FLDMASTER ))
@@ -2596,11 +2450,10 @@ sal_uInt16 lcl_GetIdByName( String& rName, String& rTypeName )
return nResId;
}
-//-----------------------------------------------------------------------------
uno::Any SwXTextFieldMasters::getByName(const OUString& rName)
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!GetDoc())
throw uno::RuntimeException();
@@ -2621,9 +2474,7 @@ uno::Any SwXTextFieldMasters::getByName(const OUString& rName)
uno::Any aRet(&aRef, ::getCppuType( static_cast<const uno::Reference<beans::XPropertySet>* >(0)));
return aRet;
}
-/*-- 06.03.2001 11:29:34,5-------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextFieldMasters::getInstanceName(
const SwFieldType& rFldType, String& rName)
{
@@ -2669,14 +2520,10 @@ sal_Bool SwXTextFieldMasters::getInstanceName(
return bRet;
}
-
-/*-- 21.12.98 10:37:33---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXTextFieldMasters::getElementNames(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!GetDoc())
throw uno::RuntimeException();
@@ -2710,12 +2557,10 @@ uno::Sequence< OUString > SwXTextFieldMasters::getElementNames(void)
return aSeq;
}
-/*-- 21.12.98 10:37:33---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextFieldMasters::hasByName(const OUString& rName) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!GetDoc())
throw uno::RuntimeException();
@@ -2729,46 +2574,32 @@ sal_Bool SwXTextFieldMasters::hasByName(const OUString& rName) throw( uno::Runti
}
return bRet;
}
-/*-- 21.12.98 10:37:34---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SwXTextFieldMasters::getElementType(void) throw( uno::RuntimeException )
{
return ::getCppuType(static_cast<const uno::Reference<beans::XPropertySet>*>(0));
}
-/*-- 21.12.98 10:37:34---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextFieldMasters::hasElements(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
return sal_True;
}
-/******************************************************************
- *
- ******************************************************************/
-/* -----------------------------06.04.00 13:24--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXTextFieldTypes::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXTextFieldTypes");
}
-/* -----------------------------06.04.00 13:24--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXTextFieldTypes::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
"com.sun.star.text.TextFields" ));
}
-/* -----------------------------06.04.00 13:24--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXTextFieldTypes::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(1);
@@ -2776,64 +2607,49 @@ uno::Sequence< OUString > SwXTextFieldTypes::getSupportedServiceNames(void) thro
pArray[0] = C2U("com.sun.star.text.TextFields");
return aRet;
}
-/*-- 21.12.98 10:35:15---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextFieldTypes::SwXTextFieldTypes(SwDoc* _pDoc) :
SwUnoCollection (_pDoc),
aRefreshCont ( static_cast< XEnumerationAccess * >(this) )
{
}
-/*-- 21.12.98 10:35:16---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextFieldTypes::~SwXTextFieldTypes()
{
}
-/*-- 11.07.02 14:25:00---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextFieldTypes::Invalidate()
{
SwUnoCollection::Invalidate();
aRefreshCont.Disposing();
}
-/*-- 21.12.98 10:35:17---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< container::XEnumeration > SwXTextFieldTypes::createEnumeration(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
return new SwXFieldEnumeration(GetDoc());
}
-/*-- 21.12.98 10:35:17---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Type SwXTextFieldTypes::getElementType(void) throw( uno::RuntimeException )
{
return ::getCppuType(static_cast<const uno::Reference<text::XDependentTextField>*>(0));
}
-/*-- 21.12.98 10:35:17---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextFieldTypes::hasElements(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
//es gibt sie immer
return sal_True;
}
-/* -----------------24.02.99 16:19-------------------
- *
- * --------------------------------------------------*/
+
void SwXTextFieldTypes::refresh(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
UnoActionContext aContext(GetDoc());
@@ -2844,48 +2660,38 @@ void SwXTextFieldTypes::refresh(void) throw( uno::RuntimeException )
// call refresh listeners
aRefreshCont.Refreshed();
}
-/* -----------------24.02.99 16:19-------------------
- *
- * --------------------------------------------------*/
+
void SwXTextFieldTypes::addRefreshListener(const uno::Reference< util::XRefreshListener > & l)
throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if ( !IsValid() )
throw uno::RuntimeException();
aRefreshCont.AddListener ( reinterpret_cast < const uno::Reference < lang::XEventListener > &> ( l ));
}
-/* -----------------24.02.99 16:19-------------------
- *
- * --------------------------------------------------*/
+
void SwXTextFieldTypes::removeRefreshListener(const uno::Reference< util::XRefreshListener > & l)
throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if ( !IsValid() || !aRefreshCont.RemoveListener ( reinterpret_cast < const uno::Reference < lang::XEventListener > &> ( l ) ) )
throw uno::RuntimeException();
}
+
/******************************************************************
* SwXFieldEnumeration
******************************************************************/
-/* -----------------------------06.04.00 13:25--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXFieldEnumeration::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXFieldEnumeration");
}
-/* -----------------------------06.04.00 13:25--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXFieldEnumeration::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
"com.sun.star.text.FieldEnumeration" ));
}
-/* -----------------------------06.04.00 13:25--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXFieldEnumeration::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(1);
@@ -2893,9 +2699,7 @@ uno::Sequence< OUString > SwXFieldEnumeration::getSupportedServiceNames(void) th
pArray[0] = C2U("com.sun.star.text.FieldEnumeration");
return aRet;
}
-/* -----------------21.12.98 14:57-------------------
- *
- * --------------------------------------------------*/
+
SwXFieldEnumeration::SwXFieldEnumeration(SwDoc* pDc) :
nNextIndex(0),
pDoc(pDc)
@@ -2954,29 +2758,23 @@ SwXFieldEnumeration::SwXFieldEnumeration(SwDoc* pDc) :
// resize sequence to actual used size
aItems.realloc( nFillPos );
}
-/*-- 21.12.98 14:57:23---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXFieldEnumeration::~SwXFieldEnumeration()
{
}
-/*-- 21.12.98 14:57:42---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXFieldEnumeration::hasMoreElements(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return nNextIndex < aItems.getLength();
}
-/*-- 21.12.98 14:57:42---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXFieldEnumeration::nextElement(void)
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!(nNextIndex < aItems.getLength()))
throw container::NoSuchElementException();
@@ -2990,9 +2788,7 @@ uno::Any SwXFieldEnumeration::nextElement(void)
rxFld = 0; // free memory for item that is not longer used
return aRet;
}
-/* -----------------21.12.98 15:08-------------------
- *
- * --------------------------------------------------*/
+
void SwXFieldEnumeration::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -3000,7 +2796,6 @@ void SwXFieldEnumeration::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
pDoc = 0;
}
-
String& GetString( const uno::Any& rAny, String& rStr )
{
OUString aStr;
@@ -3008,3 +2803,5 @@ String& GetString( const uno::Any& rAny, String& rStr )
rStr = String( aStr );
return rStr;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index 00c02806d3b0..97e92598e38a 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,7 +34,7 @@
#include <unobaseclass.hxx>
#include <unoflatpara.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <com/sun/star/text/TextMarkupType.hpp>
#include <unotextmarkup.hxx>
@@ -44,7 +45,6 @@
#include <viewimp.hxx>
#include <breakit.hxx>
#include <pam.hxx>
-#include <unobaseclass.hxx>
#include <unotextrange.hxx>
#include <pagefrm.hxx>
#include <cntfrm.hxx>
@@ -80,7 +80,7 @@ uno::Sequence< uno::Type > SwXFlatParagraph::getTypes( ) throw(uno::RuntimeExce
uno::Sequence< sal_Int8 > SwXFlatParagraph::getImplementationId( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -123,7 +123,7 @@ css::uno::Reference< css::container::XStringKeyMap > SAL_CALL SwXFlatParagraph::
void SAL_CALL SwXFlatParagraph::commitTextMarkup(::sal_Int32 nType, const ::rtl::OUString & rIdentifier, ::sal_Int32 nStart, ::sal_Int32 nLength, const css::uno::Reference< css::container::XStringKeyMap > & rxMarkupInfoContainer) throw (css::uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwXTextMarkup::commitTextMarkup( nType, rIdentifier, nStart, nLength, rxMarkupInfoContainer );
}
@@ -136,7 +136,7 @@ void SAL_CALL SwXFlatParagraph::commitTextMarkup(::sal_Int32 nType, const ::rtl:
// text::XFlatParagraph:
void SAL_CALL SwXFlatParagraph::setChecked( ::sal_Int32 nType, ::sal_Bool bVal ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if ( mpTxtNode )
{
@@ -156,7 +156,7 @@ void SAL_CALL SwXFlatParagraph::setChecked( ::sal_Int32 nType, ::sal_Bool bVal )
// text::XFlatParagraph:
::sal_Bool SAL_CALL SwXFlatParagraph::isChecked( ::sal_Int32 nType ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if ( mpTxtNode )
{
if ( text::TextMarkupType::SPELLCHECK == nType )
@@ -173,7 +173,7 @@ void SAL_CALL SwXFlatParagraph::setChecked( ::sal_Int32 nType, ::sal_Bool bVal )
// text::XFlatParagraph:
::sal_Bool SAL_CALL SwXFlatParagraph::isModified() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return 0 == mpTxtNode;
}
@@ -181,7 +181,7 @@ void SAL_CALL SwXFlatParagraph::setChecked( ::sal_Int32 nType, ::sal_Bool bVal )
lang::Locale SAL_CALL SwXFlatParagraph::getLanguageOfText(::sal_Int32 nPos, ::sal_Int32 nLen)
throw (uno::RuntimeException, lang::IllegalArgumentException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!mpTxtNode)
return SvxCreateLocale( LANGUAGE_NONE );
@@ -193,7 +193,7 @@ lang::Locale SAL_CALL SwXFlatParagraph::getLanguageOfText(::sal_Int32 nPos, ::sa
lang::Locale SAL_CALL SwXFlatParagraph::getPrimaryLanguageOfText(::sal_Int32 nPos, ::sal_Int32 nLen)
throw (uno::RuntimeException, lang::IllegalArgumentException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!mpTxtNode)
return SvxCreateLocale( LANGUAGE_NONE );
@@ -205,7 +205,7 @@ lang::Locale SAL_CALL SwXFlatParagraph::getPrimaryLanguageOfText(::sal_Int32 nPo
// text::XFlatParagraph:
void SAL_CALL SwXFlatParagraph::changeText(::sal_Int32 nPos, ::sal_Int32 nLen, const ::rtl::OUString & aNewText, const css::uno::Sequence< css::beans::PropertyValue > & aAttributes) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if ( !mpTxtNode )
return;
@@ -237,7 +237,7 @@ void SAL_CALL SwXFlatParagraph::changeText(::sal_Int32 nPos, ::sal_Int32 nLen, c
// text::XFlatParagraph:
void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 nLen, const css::uno::Sequence< css::beans::PropertyValue > & aAttributes) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if ( !mpTxtNode )
return;
@@ -262,7 +262,7 @@ void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 n
// text::XFlatParagraph:
css::uno::Sequence< ::sal_Int32 > SAL_CALL SwXFlatParagraph::getLanguagePortions() throw (css::uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return css::uno::Sequence< ::sal_Int32>();
}
@@ -314,7 +314,7 @@ void SwXFlatParagraphIterator::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
// check if document gets closed...
if(!GetRegisteredIn())
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
mpDoc = 0;
}
}
@@ -329,7 +329,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getFirstPara()
uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara()
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XFlatParagraph > xRet;
if (!mpDoc)
@@ -439,7 +439,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getLastPara()
uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(const uno::Reference< text::XFlatParagraph > & xPara)
throw ( uno::RuntimeException, lang::IllegalArgumentException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XFlatParagraph > xRet;
if (!mpDoc)
@@ -486,7 +486,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(co
uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(const uno::Reference< text::XFlatParagraph > & xPara )
throw ( uno::RuntimeException, lang::IllegalArgumentException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XFlatParagraph > xRet;
if (!mpDoc)
@@ -529,3 +529,5 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c
return xRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 5ee3fc45f6f4..93b80196d9ef 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,7 +68,6 @@
#include <unomap.hxx>
#include <unoprnms.hxx>
#include <unoevent.hxx>
-#include <com/sun/star/table/BorderLine.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/table/ShadowFormat.hpp>
#include <com/sun/star/style/GraphicLocation.hpp>
@@ -104,7 +104,7 @@
#include <frmatr.hxx>
#include <ndtxt.hxx>
#include <ndgrf.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/printer.hxx>
#include <SwStyleNameMapper.hxx>
@@ -131,8 +131,8 @@ using ::com::sun::star::frame::XModel;
using ::com::sun::star::container::XNameAccess;
using ::com::sun::star::style::XStyleFamiliesSupplier;
-const sal_Char __FAR_DATA sPackageProtocol[] = "vnd.sun.star.Package:";
-const sal_Char __FAR_DATA sGraphicObjectProtocol[] = "vnd.sun.star.GraphicObject:";
+const sal_Char sPackageProtocol[] = "vnd.sun.star.Package:";
+const sal_Char sGraphicObjectProtocol[] = "vnd.sun.star.GraphicObject:";
/****************************************************************************
Rahmenbeschreibung
@@ -145,45 +145,30 @@ public:
virtual ~BaseFrameProperties_Impl();
void SetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any& rVal);
- sal_Bool GetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any*& pAny );
-// void GetProperty(const OUString &rPropertyName, const uno::Reference < beans::XPropertySet > &rxPropertySet, uno::Any& rAny );
+ bool GetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any*& pAny );
+ bool FillBaseProperties(SfxItemSet& rToSet, const SfxItemSet &rFromSet, bool& rSizeFound);
-// const SfxItemPropertyMap* GetMap() const {return _pMap;}
- sal_Bool FillBaseProperties(SfxItemSet& rToSet, const SfxItemSet &rFromSet, sal_Bool& rSizeFound);
-
- virtual sal_Bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, sal_Bool& rSizeFound) = 0;
+ virtual bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, bool& rSizeFound) = 0;
};
-/* -----------------------------12.06.01 15:46--------------------------------
- ---------------------------------------------------------------------------*/
BaseFrameProperties_Impl::~BaseFrameProperties_Impl()
{
}
-/* -----------------------------12.06.01 15:43--------------------------------
- ---------------------------------------------------------------------------*/
void BaseFrameProperties_Impl::SetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any& rVal)
{
aAnyMap.SetValue( nWID, nMemberId, rVal );
}
-/* -----------------------------12.06.01 15:43--------------------------------
- ---------------------------------------------------------------------------*/
-sal_Bool BaseFrameProperties_Impl::GetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any*& rpAny)
+bool BaseFrameProperties_Impl::GetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any*& rpAny)
{
return aAnyMap.FillValue( nWID, nMemberId, rpAny );
}
-//void BaseFrameProperties_Impl::GetProperty( const OUString &rPropertyName, const uno::Reference < beans::XPropertySet > &rxPropertySet, uno::Any & rAny )
-//{
-// rAny = rxPropertySet->getPropertyValue( rPropertyName );
-//}
-/* -----------------29.06.98 09:55-------------------
- *
- * --------------------------------------------------*/
-sal_Bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxItemSet& rFromSet, sal_Bool& rSizeFound)
+
+bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxItemSet& rFromSet, bool& rSizeFound)
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
//Anker kommt auf jeden Fall in den Set
SwFmtAnchor aAnchor ( static_cast < const SwFmtAnchor & > ( rFromSet.Get ( RES_ANCHOR ) ) );
{
@@ -450,7 +435,7 @@ sal_Bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const
if( pWidth || pHeight ||pRelH || pRelW || pSize ||pSizeType ||
pWidthType ||pSyncWidth || pSyncHeight )
{
- rSizeFound = sal_True;
+ rSizeFound = true;
SwFmtFrmSize aFrmSz ( static_cast < const :: SwFmtFrmSize& > ( rFromSet.Get ( RES_FRM_SIZE ) ) );
if(pWidth)
bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pWidth, MID_FRMSIZE_WIDTH|CONVERT_TWIPS);
@@ -478,7 +463,7 @@ sal_Bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const
}
else
{
- rSizeFound = sal_False;
+ rSizeFound = false;
SwFmtFrmSize aFrmSz;
awt::Size aSize;
aSize.Width = 2 * MM50;
@@ -506,7 +491,7 @@ sal_Bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const
rToSet.Put(aAttr);
}
- // DVO, OD 01.10.2003 #i18732#
+ // #i18732#
const ::uno::Any* pFollowTextFlow = 0;
GetProperty(RES_FOLLOW_TEXT_FLOW, 0, pFollowTextFlow);
if ( pFollowTextFlow )
@@ -516,7 +501,7 @@ sal_Bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const
rToSet.Put(aFmtFollowTextFlow);
}
- // OD 2004-05-04 #i28701# - RES_WRAP_INFLUENCE_ON_OBJPOS
+ // #i28701# - RES_WRAP_INFLUENCE_ON_OBJPOS
const ::uno::Any* pWrapInfluenceOnObjPos = 0;
GetProperty(RES_WRAP_INFLUENCE_ON_OBJPOS, MID_WRAP_INFLUENCE, pWrapInfluenceOnObjPos);
if ( pWrapInfluenceOnObjPos )
@@ -528,31 +513,21 @@ sal_Bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const
return bRet;
}
-/* -----------------22.06.98 09:17-------------------
- *
- * --------------------------------------------------*/
class SwFrameProperties_Impl : public BaseFrameProperties_Impl
{
-protected:
-// SwFrameProperties_Impl(/*const :: SfxItemPropertyMap* pMap*/) :
-// BaseFrameProperties_Impl(/*pMap*/){}
public:
SwFrameProperties_Impl();
virtual ~SwFrameProperties_Impl(){}
- virtual sal_Bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, sal_Bool& rSizeFound);
+ bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, bool& rSizeFound);
};
-/* -----------------22.06.98 09:17-------------------
- *
- * --------------------------------------------------*/
+
SwFrameProperties_Impl::SwFrameProperties_Impl():
BaseFrameProperties_Impl(/*aSwMapProvider.GetPropertyMap(PROPERTY_MAP_TEXT_FRAME)*/ )
{
}
-/* -----------------22.06.98 11:27-------------------
- *
- * --------------------------------------------------*/
+
inline void lcl_FillCol ( SfxItemSet &rToSet, const :: SfxItemSet &rFromSet, const :: uno::Any *pAny)
{
if ( pAny )
@@ -562,12 +537,13 @@ inline void lcl_FillCol ( SfxItemSet &rToSet, const :: SfxItemSet &rFromSet, con
rToSet.Put(aCol);
}
}
-sal_Bool SwFrameProperties_Impl::AnyToItemSet(SwDoc *pDoc, SfxItemSet& rSet, SfxItemSet&, sal_Bool& rSizeFound)
+
+bool SwFrameProperties_Impl::AnyToItemSet(SwDoc *pDoc, SfxItemSet& rSet, SfxItemSet&, bool& rSizeFound)
{
//Properties fuer alle Frames
const ::uno::Any *pStyleName;
SwDocStyleSheet* pStyle = NULL;
- sal_Bool bRet;
+ bool bRet;
if ( GetProperty ( FN_UNO_FRAME_STYLE_NAME, 0, pStyleName ) )
{
@@ -601,6 +577,7 @@ sal_Bool SwFrameProperties_Impl::AnyToItemSet(SwDoc *pDoc, SfxItemSet& rSet,
}
return bRet;
}
+
/****************************************************************************
Grafik-Descriptor
****************************************************************************/
@@ -610,20 +587,15 @@ public:
SwGraphicProperties_Impl();
virtual ~SwGraphicProperties_Impl(){}
- virtual sal_Bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, sal_Bool& rSizeFound);
+ virtual bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, bool& rSizeFound);
};
-/* -----------------27.06.98 14:53-------------------
- *
- * --------------------------------------------------*/
+
SwGraphicProperties_Impl::SwGraphicProperties_Impl( ) :
BaseFrameProperties_Impl(/*aSwMapProvider.GetPropertyMap(PROPERTY_MAP_TEXT_GRAPHIC)*/ )
{
}
-/* -----------------27.06.98 14:40-------------------
- *
- * --------------------------------------------------*/
-inline void lcl_FillMirror ( SfxItemSet &rToSet, const :: SfxItemSet &rFromSet, const ::uno::Any *pHEvenMirror, const ::uno::Any *pHOddMirror, const ::uno::Any *pVMirror, sal_Bool &rRet )
+inline void lcl_FillMirror ( SfxItemSet &rToSet, const :: SfxItemSet &rFromSet, const ::uno::Any *pHEvenMirror, const ::uno::Any *pHOddMirror, const ::uno::Any *pVMirror, bool &rRet )
{
if(pHEvenMirror || pHOddMirror || pVMirror )
{
@@ -638,14 +610,14 @@ inline void lcl_FillMirror ( SfxItemSet &rToSet, const :: SfxItemSet &rFromSet,
}
}
-sal_Bool SwGraphicProperties_Impl::AnyToItemSet(
+bool SwGraphicProperties_Impl::AnyToItemSet(
SwDoc* pDoc,
SfxItemSet& rFrmSet,
SfxItemSet& rGrSet,
- sal_Bool& rSizeFound)
+ bool& rSizeFound)
{
//Properties fuer alle Frames
- sal_Bool bRet;
+ bool bRet;
const ::uno::Any *pStyleName;
SwDocStyleSheet* pStyle = NULL;
@@ -709,9 +681,6 @@ sal_Bool SwGraphicProperties_Impl::AnyToItemSet(
return bRet;
}
-/* -----------------4/1/2003 13:54-------------------
-
- --------------------------------------------------*/
class SwOLEProperties_Impl : public SwFrameProperties_Impl
{
@@ -720,14 +689,11 @@ public:
SwFrameProperties_Impl(/*aSwMapProvider.GetPropertyMap(PROPERTY_MAP_EMBEDDED_OBJECT)*/ ){}
virtual ~SwOLEProperties_Impl(){}
- virtual sal_Bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, sal_Bool& rSizeFound);
+ virtual bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, bool& rSizeFound);
};
-/* -----------------4/1/2003 15:32-------------------
-
- --------------------------------------------------*/
-sal_Bool SwOLEProperties_Impl::AnyToItemSet(
- SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, sal_Bool& rSizeFound)
+bool SwOLEProperties_Impl::AnyToItemSet(
+ SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, bool& rSizeFound)
{
const ::uno::Any* pTemp;
if(!GetProperty(FN_UNO_CLSID, 0, pTemp) && !GetProperty(FN_UNO_STREAM_NAME, 0, pTemp) )
@@ -740,17 +706,12 @@ sal_Bool SwOLEProperties_Impl::AnyToItemSet(
/******************************************************************
* SwXFrame
******************************************************************/
-/* -----------------------------10.03.00 18:02--------------------------------
-
- ---------------------------------------------------------------------------*/
const :: uno::Sequence< sal_Int8 > & SwXFrame::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXFrame::getSomething( const :: uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -762,30 +723,21 @@ sal_Int64 SAL_CALL SwXFrame::getSomething( const :: uno::Sequence< sal_Int8 >& r
}
return 0;
}
-/*-----------------24.03.98 14:49-------------------
-
---------------------------------------------------*/
TYPEINIT1(SwXFrame, SwClient);
-/* -----------------------------06.04.00 14:20--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXFrame::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXFrame");
}
-/* -----------------------------06.04.00 14:20--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXFrame::supportsService(const :: OUString& rServiceName) throw( uno::RuntimeException )
{
return !rServiceName.compareToAscii("com.sun.star.text.BaseFrame")||
!rServiceName.compareToAscii("com.sun.star.text.TextContent") ||
!rServiceName.compareToAscii("com.sun.star.document.LinkTarget");
}
-/* -----------------------------06.04.00 14:20--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXFrame::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(3);
@@ -796,8 +748,7 @@ uno::Sequence< OUString > SwXFrame::getSupportedServiceNames(void) throw( uno::R
return aRet;
}
-
-/*-- 14.01.99 11:31:52---------------------------------------------------
+/*-----------------------------------------------------------------------
Dieser CTor legt den Frame als Descriptor an
-----------------------------------------------------------------------*/
SwXFrame::SwXFrame(FlyCntType eSet, const :: SfxItemPropertySet* pSet, SwDoc *pDoc) :
@@ -805,7 +756,7 @@ SwXFrame::SwXFrame(FlyCntType eSet, const :: SfxItemPropertySet* pSet, SwDoc *pD
m_pPropSet(pSet),
m_pDoc ( pDoc ),
eType(eSet),
- bIsDescriptor(sal_True),
+ bIsDescriptor(true),
m_pCopySource( 0 )
{
// Register ourselves as a listener to the document (via the page descriptor)
@@ -851,9 +802,6 @@ SwXFrame::SwXFrame(FlyCntType eSet, const :: SfxItemPropertySet* pSet, SwDoc *pD
}
}
-/*-- 11.12.98 15:05:01---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXFrame::SwXFrame(SwFrmFmt& rFrmFmt, FlyCntType eSet, const :: SfxItemPropertySet* pSet) :
SwClient( &rFrmFmt ),
aLstnrCntnr( (container::XNamed*)this),
@@ -861,28 +809,21 @@ SwXFrame::SwXFrame(SwFrmFmt& rFrmFmt, FlyCntType eSet, const :: SfxItemPropertyS
m_pDoc( 0 ),
eType(eSet),
pProps(0),
- bIsDescriptor(sal_False),
+ bIsDescriptor(false),
m_pCopySource(0)
{
}
-/*-- 11.12.98 15:05:02---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXFrame::~SwXFrame()
{
delete m_pCopySource;
delete pProps;
}
-/*-- 11.12.98 15:05:03---------------------------------------------------
- -----------------------------------------------------------------------*/
-/*-- 11.12.98 15:05:03---------------------------------------------------
-
- -----------------------------------------------------------------------*/
OUString SwXFrame::getName(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
String sRet;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
@@ -893,12 +834,10 @@ OUString SwXFrame::getName(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return sRet;
}
-/*-- 11.12.98 15:05:03---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFrame::setName(const :: OUString& rName) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
String sTmpName(rName);
if(pFmt)
@@ -914,9 +853,7 @@ void SwXFrame::setName(const :: OUString& rName) throw( uno::RuntimeException )
else
throw uno::RuntimeException();
}
-/*-- 11.12.98 15:05:03---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXFrame::getPropertySetInfo(void) throw( uno::RuntimeException )
{
uno::Reference< beans::XPropertySetInfo > xRef;
@@ -945,9 +882,7 @@ uno::Reference< beans::XPropertySetInfo > SwXFrame::getPropertySetInfo(void) th
}
return xRef;
}
-/*-- 15.05.06 12:21:43---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFrame::SetSelection(SwPaM& rCopySource)
{
if(m_pCopySource)
@@ -956,9 +891,6 @@ void SwXFrame::SetSelection(SwPaM& rCopySource)
m_pCopySource->SetMark();
*m_pCopySource->GetMark() = *rCopySource.End();
}
-/*-- 11.12.98 15:05:04---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SdrObject *SwXFrame::GetOrCreateSdrObject( SwFlyFrmFmt *pFmt )
{
@@ -994,7 +926,7 @@ SwFrmFmt *lcl_GetFrmFmt( const :: uno::Any& rValue, SwDoc *pDoc )
OUString uTemp;
rValue >>= uTemp;
String sStyle;
- SwStyleNameMapper::FillUIName(String (uTemp), sStyle, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, sal_True );
+ SwStyleNameMapper::FillUIName(String (uTemp), sStyle, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, true);
SwDocStyleSheet* pStyle =
(SwDocStyleSheet*)pDocSh->GetStyleSheetPool()->Find(sStyle,
SFX_STYLE_FAMILY_FRAME);
@@ -1008,7 +940,7 @@ SwFrmFmt *lcl_GetFrmFmt( const :: uno::Any& rValue, SwDoc *pDoc )
void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::Any& aValue)
throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
const :: SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName(rPropertyName);
@@ -1017,12 +949,12 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
if(pFmt)
{
- sal_Bool bNextFrame = sal_False;
+ bool bNextFrame = false;
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw beans::PropertyVetoException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
SwDoc* pDoc = pFmt->GetDoc();
- if ((eType == FLYCNTTYPE_GRF) && isGRFATR(pEntry->nWID) ||
+ if ( ((eType == FLYCNTTYPE_GRF) && isGRFATR(pEntry->nWID)) ||
(FN_PARAM_COUNTOUR_PP == pEntry->nWID) ||
(FN_UNO_IS_AUTOMATIC_CONTOUR == pEntry->nWID) ||
(FN_UNO_IS_PIXEL_CONTOUR == pEntry->nWID) )
@@ -1103,7 +1035,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
else if( FN_UNO_TITLE == pEntry->nWID )
{
SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(pFmt);
- ASSERT( pFmt,
+ OSL_ENSURE( pFmt,
"unexpected type of <pFmt> --> crash" );
OUString uTemp;
aValue >>= uTemp;
@@ -1116,7 +1048,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
else if( FN_UNO_DESCRIPTION == pEntry->nWID )
{
SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(pFmt);
- ASSERT( pFmt,
+ OSL_ENSURE( pFmt,
"unexpected type of <pFmt> --> crash" );
OUString uTemp;
aValue >>= uTemp;
@@ -1149,7 +1081,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
if ( pFly )
{
const :: SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pFrmFmt->GetItemState( RES_ANCHOR, sal_False, &pItem ))
+ if( SFX_ITEM_SET == pFrmFmt->GetItemState( RES_ANCHOR, false, &pItem ))
{
pSet = new SfxItemSet( pDoc->GetAttrPool(), aFrmFmtSetRange );
pSet->Put( *pItem );
@@ -1347,7 +1279,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
}
else if(RES_ANCHOR == pEntry->nWID && MID_ANCHOR_ANCHORFRAME == pEntry->nMemberId)
{
- sal_Bool bDone = sal_False;
+ bool bDone = false;
uno::Reference<text::XTextFrame> xFrame;
if(aValue >>= xFrame)
{
@@ -1368,7 +1300,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
aAnchor.SetType(FLY_AT_FLY);
aSet.Put(aAnchor);
pDoc->SetFlyFrmAttr( *pFmt, aSet );
- bDone = sal_True;
+ bDone = true;
}
}
if(!bDone)
@@ -1426,7 +1358,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
if (pFly)
{
const :: SfxPoolItem* pItem;
- if( SFX_ITEM_SET == aSet.GetItemState( RES_ANCHOR, sal_False, &pItem ))
+ if( SFX_ITEM_SET == aSet.GetItemState( RES_ANCHOR, false, &pItem ))
{
aSet.Put( *pItem );
::lcl_ChkAndSetNewAnchor( *pFly, aSet );
@@ -1471,13 +1403,11 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
else
throw uno::RuntimeException();
}
-/*-- 11.12.98 15:05:04---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aAny;
SwFrmFmt* pFmt = GetFrmFmt();
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName(rPropertyName);
@@ -1565,7 +1495,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
}
else
{
- String sPrefix( RTL_CONSTASCII_STRINGPARAM(sGraphicObjectProtocol) );
+ String sPrefix( RTL_CONSTASCII_USTRINGPARAM(sGraphicObjectProtocol) );
String sId( pGrfNode->GetGrfObj().GetUniqueID(),
RTL_TEXTENCODING_ASCII_US );
(sGrfName = sPrefix) += sId;
@@ -1612,7 +1542,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
else if( FN_UNO_TITLE == pEntry->nWID )
{
SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(pFmt);
- ASSERT( pFmt,
+ OSL_ENSURE( pFmt,
"unexpected type of <pFmt> --> crash" );
// assure that <SdrObject> instance exists.
GetOrCreateSdrObject( pFlyFmt );
@@ -1622,7 +1552,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
else if( FN_UNO_DESCRIPTION == pEntry->nWID )
{
SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(pFmt);
- ASSERT( pFmt,
+ OSL_ENSURE( pFmt,
"unexpected type of <pFmt> --> crash" );
// assure that <SdrObject> instance exists.
GetOrCreateSdrObject( pFlyFmt );
@@ -1682,7 +1612,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
if ( FN_EMBEDDED_OBJECT == pEntry->nWID )
{
// ensure the
- ASSERT( pDoc->GetDocShell(), "no doc shell => no client site" );
+ OSL_ENSURE( pDoc->GetDocShell(), "no doc shell => no client site" );
if ( pDoc->GetDocShell() )
pDoc->GetDocShell()->GetIPClient( svt::EmbeddedObjectRef( xIP, embed::Aspects::MSOLE_CONTENT ) );
aAny <<= xIP;
@@ -1743,63 +1673,51 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
throw uno::RuntimeException();
return aAny;
}
-/*-- 11.12.98 15:05:04---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFrame::addPropertyChangeListener(const OUString& /*PropertyName*/,
const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 15:05:05---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFrame::removePropertyChangeListener(const OUString& /*PropertyName*/,
const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 15:05:05---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFrame::addVetoableChangeListener(const OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 15:05:05---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFrame::removeVetoableChangeListener(
const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 12.09.00 14:04:53---------------------------------------------------
- -----------------------------------------------------------------------*/
beans::PropertyState SwXFrame::getPropertyState( const OUString& rPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< OUString > aPropertyNames(1);
OUString* pNames = aPropertyNames.getArray();
pNames[0] = rPropertyName;
uno::Sequence< beans::PropertyState > aStates = getPropertyStates(aPropertyNames);
return aStates.getConstArray()[0];
}
-/*-- 12.09.00 14:04:54---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates(
const uno::Sequence< OUString >& aPropertyNames )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< beans::PropertyState > aStates(aPropertyNames.getLength());
beans::PropertyState* pStates = aStates.getArray();
SwFrmFmt* pFmt = GetFrmFmt();
@@ -1858,13 +1776,11 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates(
throw uno::RuntimeException();
return aStates;
}
-/*-- 12.09.00 14:04:54---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFrame::setPropertyToDefault( const OUString& rPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
{
@@ -1874,7 +1790,7 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName )
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "setPropertyToDefault: property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- sal_Bool bNextFrame;
+ bool bNextFrame;
if( pEntry->nWID &&
pEntry->nWID != FN_UNO_ANCHOR_TYPES &&
pEntry->nWID != FN_PARAM_LINK_DISPLAY_NAME)
@@ -1910,7 +1826,7 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName )
else if( FN_UNO_TITLE == pEntry->nWID )
{
SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(pFmt);
- ASSERT( pFmt,
+ OSL_ENSURE( pFmt,
"unexpected type of <pFmt> --> crash" );
// assure that <SdrObject> instance exists.
GetOrCreateSdrObject( pFlyFmt );
@@ -1920,7 +1836,7 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName )
else if( FN_UNO_DESCRIPTION == pEntry->nWID )
{
SwFlyFrmFmt* pFlyFmt = dynamic_cast<SwFlyFrmFmt*>(pFmt);
- ASSERT( pFmt,
+ OSL_ENSURE( pFmt,
"unexpected type of <pFmt> --> crash" );
// assure that <SdrObject> instance exists.
GetOrCreateSdrObject( pFlyFmt );
@@ -1957,13 +1873,11 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName )
throw uno::RuntimeException();
}
-/*-- 12.09.00 14:04:55---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXFrame::getPropertyDefault( const OUString& rPropertyName )
throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
@@ -1985,26 +1899,20 @@ uno::Any SwXFrame::getPropertyDefault( const OUString& rPropertyName )
throw uno::RuntimeException();
return aRet;
}
-/* -----------------22.04.99 14:59-------------------
- *
- * --------------------------------------------------*/
+
void SwXFrame::addEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException )
{
if(!GetRegisteredIn())
throw uno::RuntimeException();
aLstnrCntnr.AddListener(aListener);
}
-/* -----------------22.04.99 14:59-------------------
- *
- * --------------------------------------------------*/
+
void SwXFrame::removeEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException )
{
if(!GetRegisteredIn() || !aLstnrCntnr.RemoveListener(aListener))
throw uno::RuntimeException();
}
-/*-- 11.12.98 15:05:06---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -2017,12 +1925,9 @@ void SwXFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
-/*-- 11.12.98 15:23:05---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXFrame::dispose(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if ( pFmt )
{
@@ -2048,12 +1953,10 @@ void SwXFrame::dispose(void) throw( uno::RuntimeException )
}
}
-/*-- 11.12.98 16:02:27---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SwXFrame::getAnchor(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > aRef;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
@@ -2072,23 +1975,19 @@ uno::Reference< text::XTextRange > SwXFrame::getAnchor(void) throw( uno::Runtim
throw uno::RuntimeException();
return aRef;
}
-/* -----------------14.01.99 12:02-------------------
- *
- * --------------------------------------------------*/
+
void SwXFrame::ResetDescriptor()
{
- bIsDescriptor = sal_False;
+ bIsDescriptor = false;
mxStyleData.clear();
mxStyleFamily.clear();
DELETEZ(pProps);
}
-/* -----------------18.02.99 13:34-------------------
- *
- * --------------------------------------------------*/
+
void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRange)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsDescriptor())
throw uno::RuntimeException();
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
@@ -2106,20 +2005,20 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
if(pDoc)
{
SwUnoInternalPaM aIntPam(*pDoc);
- //das muss jetzt sal_True liefern
+ //das muss jetzt true liefern
::sw::XTextRangeToSwPaM(aIntPam, xTextRange);
SwNode& rNode = pDoc->GetNodes().GetEndOfContent();
SwPaM aPam(rNode);
aPam.Move( fnMoveBackward, fnGoDoc );
- static sal_uInt16 __READONLY_DATA aFrmAttrRange[] =
+ static sal_uInt16 const aFrmAttrRange[] =
{
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
0
};
- static sal_uInt16 __READONLY_DATA aGrAttrRange[] =
+ static sal_uInt16 const aGrAttrRange[] =
{
RES_GRFATR_BEGIN, RES_GRFATR_END-1,
0
@@ -2128,7 +2027,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
SfxItemSet aFrmSet(pDoc->GetAttrPool(), aFrmAttrRange );
//jetzt muessen die passenden Items in den Set
- sal_Bool bSizeFound;
+ bool bSizeFound;
if(!pProps->AnyToItemSet( pDoc, aFrmSet, aGrSet, bSizeFound))
throw lang::IllegalArgumentException();
//der TextRange wird einzeln behandelt
@@ -2141,7 +2040,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
const SfxPoolItem* pItem;
RndStdIds eAnchorId = FLY_AT_PARA;
- if(SFX_ITEM_SET == aFrmSet.GetItemState(RES_ANCHOR, sal_False, &pItem) )
+ if(SFX_ITEM_SET == aFrmSet.GetItemState(RES_ANCHOR, false, &pItem) )
{
eAnchorId = ((const SwFmtAnchor*)pItem)->GetAnchorId();
if( FLY_AT_FLY == eAnchorId &&
@@ -2272,22 +2171,19 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
}
const ::uno::Any* pSurroundContour;
if(pProps->GetProperty(RES_SURROUND, MID_SURROUND_CONTOUR, pSurroundContour))
- setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SURROUND_CONTOUR)), *pSurroundContour);
+ setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SURROUND_CONTOUR)), *pSurroundContour);
const ::uno::Any* pContourOutside;
if(pProps->GetProperty(RES_SURROUND, MID_SURROUND_CONTOUROUTSIDE, pContourOutside))
- setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_CONTOUR_OUTSIDE)), *pContourOutside);
+ setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_CONTOUR_OUTSIDE)), *pContourOutside);
const ::uno::Any* pContourPoly;
if(pProps->GetProperty(FN_PARAM_COUNTOUR_PP, 0, pContourPoly))
- setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_CONTOUR_POLY_POLYGON)), *pContourPoly);
+ setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_CONTOUR_POLY_POLYGON)), *pContourPoly);
const ::uno::Any* pPixelContour;
if(pProps->GetProperty(FN_UNO_IS_PIXEL_CONTOUR, 0, pPixelContour))
- setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_IS_PIXEL_CONTOUR)), *pPixelContour);
+ setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_IS_PIXEL_CONTOUR)), *pPixelContour);
const ::uno::Any* pAutoContour;
if(pProps->GetProperty(FN_UNO_IS_AUTOMATIC_CONTOUR, 0, pAutoContour))
- setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_IS_AUTOMATIC_CONTOUR)), *pAutoContour);
-// const ::uno::Any* pAltText;
-// if(pProps->GetProperty(FN_UNO_ALTERNATIVE_TEXT, 0, pAltText))
-// setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ALTERNATIVE_TEXT)), *pAltText);
+ setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_IS_AUTOMATIC_CONTOUR)), *pAutoContour);
}
else
{
@@ -2306,7 +2202,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
if( !aClassName.MakeId( aCLSID ) )
{
lang::IllegalArgumentException aExcept;
- aExcept.Message = OUString::createFromAscii("CLSID invalid");
+ aExcept.Message = OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID invalid"));
throw aExcept;
}
@@ -2366,7 +2262,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
::svt::EmbeddedObjectRef xObjRef( xIPObj, nAspect );
pFmt2 = pDoc->Insert(aPam, xObjRef, &aFrmSet, NULL, NULL );
- ASSERT( pFmt2, "Doc->Insert(notxt) failed." );
+ OSL_ENSURE( pFmt2, "Doc->Insert(notxt) failed." );
pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
pFmt2->Add(this);
@@ -2392,33 +2288,29 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
GetOrCreateSdrObject( pFmt );
const ::uno::Any* pOrder;
if( pProps->GetProperty(FN_UNO_Z_ORDER, 0, pOrder) )
- setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_Z_ORDER)), *pOrder);
+ setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_Z_ORDER)), *pOrder);
const ::uno::Any* pReplacement;
if( pProps->GetProperty(FN_UNO_REPLACEMENT_GRAPHIC, 0, pReplacement) )
- setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_GRAPHIC)), *pReplacement);
- // --> OD 2009-07-13 #i73249#
+ setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_GRAPHIC)), *pReplacement);
// new attribute Title
const ::uno::Any* pTitle;
if ( pProps->GetProperty(FN_UNO_TITLE, 0, pTitle) )
{
- setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_TITLE)), *pTitle);
+ setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_TITLE)), *pTitle);
}
// new attribute Description
const ::uno::Any* pDescription;
if ( pProps->GetProperty(FN_UNO_DESCRIPTION, 0, pDescription) )
{
- setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_DESCRIPTION)), *pDescription);
+ setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_DESCRIPTION)), *pDescription);
}
- // <--
}
else
throw lang::IllegalArgumentException();
//setzt das Flag zurueck und loescht den Descriptor-Pointer
ResetDescriptor();
}
-/* -----------------------------04.04.01 14:27--------------------------------
- ---------------------------------------------------------------------------*/
void SwXFrame::attach(const uno::Reference< text::XTextRange > & xTextRange)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
@@ -2428,21 +2320,11 @@ void SwXFrame::attach(const uno::Reference< text::XTextRange > & xTextRange)
else if(0 != (pFmt = GetFrmFmt()))
{
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
- SwXTextRange* pRange = 0;
- OTextCursorHelper* pCursor = 0;
- if(xRangeTunnel.is())
- {
- pRange = reinterpret_cast< SwXTextRange * >(
- sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) ));
- pCursor = reinterpret_cast< OTextCursorHelper * >(
- sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) ));
- }
SwDoc* pDoc = pFmt->GetDoc();
SwUnoInternalPaM aIntPam(*pDoc);
if (::sw::XTextRangeToSwPaM(aIntPam, xTextRange))
{
- SfxItemSet aSet( pDoc->GetAttrPool(),
- RES_ANCHOR, RES_ANCHOR );
+ SfxItemSet aSet( pDoc->GetAttrPool(), RES_ANCHOR, RES_ANCHOR );
aSet.SetParent(&pFmt->GetAttrSet());
SwFmtAnchor aAnchor = (const SwFmtAnchor&)aSet.Get(RES_ANCHOR);
aAnchor.SetAnchor( aIntPam.Start() );
@@ -2453,96 +2335,72 @@ void SwXFrame::attach(const uno::Reference< text::XTextRange > & xTextRange)
throw lang::IllegalArgumentException();
}
}
-/*-- 22.04.99 08:03:20---------------------------------------------------
- -----------------------------------------------------------------------*/
awt::Point SwXFrame::getPosition(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::RuntimeException aRuntime;
aRuntime.Message = C2U("position cannot be determined with this method");
throw aRuntime;
}
-/*-- 22.04.99 08:03:21---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFrame::setPosition(const awt::Point& /*aPosition*/) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::RuntimeException aRuntime;
aRuntime.Message = C2U("position cannot be changed with this method");
throw aRuntime;
}
-/*-- 22.04.99 08:03:21---------------------------------------------------
- -----------------------------------------------------------------------*/
awt::Size SwXFrame::getSize(void) throw( uno::RuntimeException )
{
const ::uno::Any aVal = getPropertyValue(C2U("Size"));
awt::Size* pRet = (awt::Size*)aVal.getValue();
return *pRet;
}
-/*-- 22.04.99 08:03:21---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFrame::setSize(const awt::Size& aSize)
throw( beans::PropertyVetoException, uno::RuntimeException )
{
const ::uno::Any aVal(&aSize, ::getCppuType(static_cast<const awt::Size*>(0)));
setPropertyValue(C2U("Size"), aVal);
}
-/*-- 22.04.99 08:03:21---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwXFrame::getShapeType(void) throw( uno::RuntimeException )
{
return C2U("FrameShape");
}
-
/******************************************************************
* SwXTextFrame
******************************************************************/
-/*-- 14.01.99 11:27:51---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextFrame::SwXTextFrame( SwDoc *_pDoc ) :
SwXText(0, CURSOR_FRAME),
SwXFrame(FLYCNTTYPE_FRM, aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_FRAME), _pDoc )
{
}
-/*-- 11.12.98 15:23:01---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextFrame::SwXTextFrame(SwFrmFmt& rFmt) :
SwXText(rFmt.GetDoc(), CURSOR_FRAME),
SwXFrame(rFmt, FLYCNTTYPE_FRM, aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_FRAME))
{
}
-/*-- 11.12.98 15:23:02---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextFrame::~SwXTextFrame()
{
}
-/* -----------------------------15.03.00 16:30--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextFrame::acquire( )throw()
{
SwXFrame::acquire();
}
-/* -----------------------------15.03.00 16:30--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextFrame::release( )throw()
{
SwXFrame::release();
}
-/* -----------------------------15.03.00 16:30--------------------------------
- ---------------------------------------------------------------------------*/
::uno::Any SAL_CALL SwXTextFrame::queryInterface( const uno::Type& aType )
throw (uno::RuntimeException)
{
@@ -2553,9 +2411,7 @@ void SAL_CALL SwXTextFrame::release( )throw()
aRet = SwXTextFrameBaseClass::queryInterface(aType);
return aRet;
}
-/* -----------------------------15.03.00 16:30--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Type > SAL_CALL SwXTextFrame::getTypes( ) throw(uno::RuntimeException)
{
uno::Sequence< uno::Type > aTextFrameTypes = SwXTextFrameBaseClass::getTypes();
@@ -2580,31 +2436,25 @@ uno::Sequence< uno::Type > SAL_CALL SwXTextFrame::getTypes( ) throw(uno::Runtim
return aTextFrameTypes;
}
-/* -----------------------------15.03.00 16:30--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< sal_Int8 > SAL_CALL SwXTextFrame::getImplementationId( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
- static sal_Bool bInit = sal_False;
+ static bool bInit = false;
if(!bInit)
{
- rtl_createUuid( (sal_uInt8 *)(aId.getArray() ), 0, sal_True );
- bInit = sal_True;
+ rtl_createUuid((sal_uInt8 *)(aId.getArray() ), 0, true);
+ bInit = true;
}
return aId;
}
-/*-- 11.12.98 15:23:03---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XText > SwXTextFrame::getText(void) throw( uno::RuntimeException )
{
return this;
}
-/*-- 11.12.98 15:23:03---------------------------------------------------
- -----------------------------------------------------------------------*/
const SwStartNode *SwXTextFrame::GetStartNode() const
{
const SwStartNode *pSttNd = 0;
@@ -2625,12 +2475,10 @@ SwXTextFrame::CreateCursor() throw (uno::RuntimeException)
{
return createTextCursor();
}
-/*-- 11.12.98 15:23:03---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursor(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextCursor > aRef;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
@@ -2674,12 +2522,10 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursor(void) throw(
throw uno::RuntimeException();
return aRef;
}
-/*-- 11.12.98 15:23:03---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursorByRange(const uno::Reference< text::XTextRange > & aTextPosition) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextCursor > aRef;
SwFrmFmt* pFmt = GetFrmFmt();
SwUnoInternalPaM aPam(*GetDoc());
@@ -2703,100 +2549,78 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursorByRange(const
throw uno::RuntimeException();
return aRef;
}
-/*-- 11.12.98 15:23:03---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< container::XEnumeration > SwXTextFrame::createEnumeration(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< container::XEnumeration > aRef;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
{
SwPosition aPos(pFmt->GetCntnt().GetCntntIdx()->GetNode());
::std::auto_ptr<SwUnoCrsr> pUnoCursor(
- GetDoc()->CreateUnoCrsr(aPos, sal_False));
+ GetDoc()->CreateUnoCrsr(aPos, false));
pUnoCursor->Move(fnMoveForward, fnGoNode);
// // no Cursor in protected sections
// SwCrsrSaveState aSave( *pUnoCrsr );
-// if(pUnoCrsr->IsInProtectTable( sal_True ) ||
+// if(pUnoCrsr->IsInProtectTable(true) ||
// pUnoCrsr->IsSelOvr( SELOVER_TOGGLE | SELOVER_CHANGEPOS ))
// throw uno::RuntimeException() );
aRef = new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_FRAME);
}
return aRef;
}
-/*-- 11.12.98 15:23:04---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SwXTextFrame::getElementType(void) throw( uno::RuntimeException )
{
return ::getCppuType(static_cast<uno::Reference<text::XTextRange>*>(0));
}
-/*-- 11.12.98 15:23:04---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextFrame::hasElements(void) throw( uno::RuntimeException )
{
return sal_True;
}
-/*-- 11.12.98 15:23:04---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextFrame::attach(const uno::Reference< text::XTextRange > & xTextRange)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
SwXFrame::attach(xTextRange);
}
-/*-- 11.12.98 15:23:04---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SwXTextFrame::getAnchor(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return SwXFrame::getAnchor();
}
-/*-- 11.12.98 15:23:05---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextFrame::dispose(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwXFrame::dispose();
}
-/*-- 11.12.98 15:23:05---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextFrame::addEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException )
{
SwXFrame::addEventListener(aListener);
}
-/*-- 11.12.98 15:23:05---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextFrame::removeEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException )
{
SwXFrame::removeEventListener(aListener);
}
-/* -----------------03.05.99 12:28-------------------
- *
- * --------------------------------------------------*/
+
OUString SwXTextFrame::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXTextFrame");
}
-/* -----------------03.05.99 12:28-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwXTextFrame::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return COMPARE_EQUAL == rServiceName.compareToAscii("com.sun.star.text.Text")||
COMPARE_EQUAL == rServiceName.compareToAscii("com.sun.star.text.TextFrame")||
SwXFrame::supportsService(rServiceName);
}
-/* -----------------03.05.99 12:28-------------------
- *
- * --------------------------------------------------*/
+
uno::Sequence< OUString > SwXTextFrame::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence < OUString > aRet = SwXFrame::getSupportedServiceNames();
@@ -2806,16 +2630,12 @@ uno::Sequence< OUString > SwXTextFrame::getSupportedServiceNames(void) throw( un
pArray[aRet.getLength() - 1] = C2U("com.sun.star.text.Text");
return aRet;
}
-/* -----------------------------20.06.00 10:02--------------------------------
- ---------------------------------------------------------------------------*/
void * SAL_CALL SwXTextFrame::operator new( size_t t) throw()
{
return SwXTextFrameBaseClass::operator new( t);
}
-/* -----------------------------20.06.00 10:02--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextFrame::operator delete( void * p) throw()
{
SwXTextFrameBaseClass::operator delete(p);
@@ -2826,9 +2646,7 @@ uno::Reference<container::XNameReplace > SAL_CALL SwXTextFrame::getEvents()
{
return new SwFrameEventDescriptor( *this );
}
-/* -----------------------------10.01.01 13:27--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXTextFrame::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -2838,13 +2656,11 @@ sal_Int64 SAL_CALL SwXTextFrame::getSomething( const uno::Sequence< sal_Int8 >&
return nRet;
}
-/* -----------------------------19.03.2002 16:43------------------------------
- ---------------------------------------------------------------------------*/
::uno::Any SwXTextFrame::getPropertyValue(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
::uno::Any aRet;
if(rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_START_REDLINE))||
rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_END_REDLINE)))
@@ -2857,48 +2673,36 @@ sal_Int64 SAL_CALL SwXTextFrame::getSomething( const uno::Sequence< sal_Int8 >&
aRet = SwXFrame::getPropertyValue(rPropertyName);
return aRet;
}
+
/******************************************************************
* SwXTextGraphicObject
******************************************************************/
-/*-- 14.01.99 11:27:51---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextGraphicObject::SwXTextGraphicObject( SwDoc *pDoc ) :
SwXFrame(FLYCNTTYPE_GRF, aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_GRAPHIC), pDoc)
{
}
-/*-- 11.12.98 16:02:25---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextGraphicObject::SwXTextGraphicObject(SwFrmFmt& rFmt) :
SwXFrame(rFmt, FLYCNTTYPE_GRF, aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_GRAPHIC))
{
}
-/*-- 11.12.98 16:02:26---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextGraphicObject::~SwXTextGraphicObject()
{
}
-/* -----------------------------15.03.00 16:30--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextGraphicObject::acquire( )throw()
{
SwXFrame::acquire();
}
-/* -----------------------------15.03.00 16:30--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextGraphicObject::release( )throw()
{
SwXFrame::release();
}
-/* -----------------------------15.03.00 16:30--------------------------------
- ---------------------------------------------------------------------------*/
::uno::Any SAL_CALL SwXTextGraphicObject::queryInterface( const uno::Type& aType )
throw(uno::RuntimeException)
{
@@ -2907,9 +2711,7 @@ void SAL_CALL SwXTextGraphicObject::release( )throw()
aRet = SwXTextGraphicObjectBaseClass::queryInterface(aType);
return aRet;
}
-/* -----------------------------15.03.00 16:30--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Type > SAL_CALL
SwXTextGraphicObject::getTypes( ) throw(uno::RuntimeException)
{
@@ -2929,78 +2731,60 @@ uno::Sequence< uno::Type > SAL_CALL
return aGraphicTypes;
}
-/* -----------------------------15.03.00 16:30--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< sal_Int8 > SAL_CALL SwXTextGraphicObject::getImplementationId( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
- static sal_Bool bInit = sal_False;
+ static bool bInit = false;
if(!bInit)
{
- rtl_createUuid( (sal_uInt8 *)(aId.getArray() ), 0, sal_True );
- bInit = sal_True;
+ rtl_createUuid((sal_uInt8 *)(aId.getArray() ), 0, true);
+ bInit = true;
}
return aId;
}
-/*-- 11.12.98 16:02:27---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextGraphicObject::attach(const uno::Reference< text::XTextRange > & xTextRange) throw( lang::IllegalArgumentException, uno::RuntimeException )
{
SwXFrame::attach(xTextRange);
}
-/*-- 11.12.98 16:02:27---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SwXTextGraphicObject::getAnchor(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return SwXFrame::getAnchor();
}
-/*-- 11.12.98 16:02:28---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextGraphicObject::dispose(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwXFrame::dispose();
}
-/*-- 11.12.98 16:02:29---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextGraphicObject::addEventListener(const uno::Reference< lang::XEventListener > & aListener)
throw( uno::RuntimeException )
{
SwXFrame::addEventListener(aListener);
}
-/*-- 11.12.98 16:02:29---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextGraphicObject::removeEventListener(const uno::Reference< lang::XEventListener > & aListener)
throw( uno::RuntimeException )
{
SwXFrame::removeEventListener(aListener);
}
-/* -----------------03.05.99 12:28-------------------
- *
- * --------------------------------------------------*/
+
OUString SwXTextGraphicObject::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXTextGraphicObject");
}
-/* -----------------03.05.99 12:28-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwXTextGraphicObject::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return COMPARE_EQUAL == rServiceName.compareToAscii("com.sun.star.text.TextGraphicObject") ||
SwXFrame::supportsService(rServiceName);
}
-/* -----------------03.05.99 12:28-------------------
- *
- * --------------------------------------------------*/
+
uno::Sequence< OUString > SwXTextGraphicObject::getSupportedServiceNames(void)
throw( uno::RuntimeException )
{
@@ -3010,23 +2794,17 @@ uno::Sequence< OUString > SwXTextGraphicObject::getSupportedServiceNames(void)
pArray[aRet.getLength() - 1] = C2U("com.sun.star.text.TextGraphicObject");
return aRet;
}
-/* -----------------------------20.06.00 10:02--------------------------------
- ---------------------------------------------------------------------------*/
void * SAL_CALL SwXTextGraphicObject::operator new( size_t t) throw()
{
return SwXTextGraphicObjectBaseClass::operator new(t);
}
-/* -----------------------------20.06.00 10:02--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextGraphicObject::operator delete( void * p) throw()
{
SwXTextGraphicObjectBaseClass::operator delete(p);
}
-/* -----------------------------15.12.00 12:45--------------------------------
- ---------------------------------------------------------------------------*/
uno::Reference<container::XNameReplace> SAL_CALL
SwXTextGraphicObject::getEvents()
throw(uno::RuntimeException)
@@ -3034,51 +2812,32 @@ uno::Reference<container::XNameReplace> SAL_CALL
return new SwFrameEventDescriptor( *this );
}
-/******************************************************************
- *
- ******************************************************************/
-/*-- 11.12.98 16:16:53---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextEmbeddedObject::SwXTextEmbeddedObject( SwDoc *pDoc ) :
SwXFrame(FLYCNTTYPE_OLE, aSwMapProvider.GetPropertySet(PROPERTY_MAP_EMBEDDED_OBJECT), pDoc)
{
}
-/*-- 11.12.98 16:16:53---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextEmbeddedObject::SwXTextEmbeddedObject(SwFrmFmt& rFmt) :
SwXFrame(rFmt, FLYCNTTYPE_OLE, aSwMapProvider.GetPropertySet(PROPERTY_MAP_EMBEDDED_OBJECT))
{
}
-/*-- 11.12.98 16:16:54---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextEmbeddedObject::~SwXTextEmbeddedObject()
{
}
-/*-- 11.12.98 16:16:54---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-/* -----------------------------15.03.00 16:32--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextEmbeddedObject::acquire()throw()
{
SwXFrame::acquire();
}
-/* -----------------------------15.03.00 16:32--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextEmbeddedObject::release()throw()
{
SwXFrame::release();
}
-/* -----------------------------15.03.00 16:32--------------------------------
- ---------------------------------------------------------------------------*/
::uno::Any SAL_CALL SwXTextEmbeddedObject::queryInterface( const uno::Type& aType )
throw( uno::RuntimeException)
{
@@ -3087,9 +2846,7 @@ void SAL_CALL SwXTextEmbeddedObject::release()throw()
aRet = SwXTextEmbeddedObjectBaseClass::queryInterface(aType);
return aRet;
}
-/* -----------------------------15.03.00 16:32--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Type > SAL_CALL SwXTextEmbeddedObject::getTypes( ) throw(uno::RuntimeException)
{
uno::Sequence< uno::Type > aTextEmbeddedTypes = SwXTextEmbeddedObjectBaseClass::getTypes();
@@ -3109,61 +2866,46 @@ uno::Sequence< uno::Type > SAL_CALL SwXTextEmbeddedObject::getTypes( ) throw(un
return aTextEmbeddedTypes;
}
-/* -----------------------------15.03.00 16:32--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< sal_Int8 > SAL_CALL SwXTextEmbeddedObject::getImplementationId( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
- static sal_Bool bInit = sal_False;
+ static bool bInit = false;
if(!bInit)
{
- rtl_createUuid( (sal_uInt8 *)(aId.getArray() ), 0, sal_True );
- bInit = sal_True;
+ rtl_createUuid((sal_uInt8 *)(aId.getArray() ), 0, true);
+ bInit = true;
}
return aId;
}
-/*-- 11.12.98 16:16:54---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextEmbeddedObject::attach(const uno::Reference< text::XTextRange > & xTextRange) throw( lang::IllegalArgumentException, uno::RuntimeException )
{
SwXFrame::attach(xTextRange);
}
-/*-- 11.12.98 16:16:54---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SwXTextEmbeddedObject::getAnchor(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return SwXFrame::getAnchor();
}
-/*-- 11.12.98 16:16:54---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextEmbeddedObject::dispose(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwXFrame::dispose();
}
-/*-- 11.12.98 16:16:55---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextEmbeddedObject::addEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException )
{
SwXFrame::addEventListener(aListener);
}
-/*-- 11.12.98 16:16:55---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextEmbeddedObject::removeEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException )
{
SwXFrame::removeEventListener(aListener);
}
-/*-- 11.12.98 16:16:55---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< lang::XComponent > SwXTextEmbeddedObject::getEmbeddedObject(void) throw( uno::RuntimeException )
{
@@ -3206,11 +2948,6 @@ uno::Reference< lang::XComponent > SwXTextEmbeddedObject::getEmbeddedObject(voi
return xRet;
}
-/* --18.05.2006 16:39---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-
-
uno::Reference< embed::XEmbeddedObject > SAL_CALL SwXTextEmbeddedObject::getExtendedControlOverEmbeddedObject()
throw( uno::RuntimeException )
{
@@ -3304,25 +3041,18 @@ uno::Reference< graphic::XGraphic > SAL_CALL SwXTextEmbeddedObject::getReplaceme
return uno::Reference< graphic::XGraphic >();
}
-/* -----------------03.05.99 12:28-------------------
- *
- * --------------------------------------------------*/
OUString SwXTextEmbeddedObject::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXTextEmbeddedObject");
}
-/* -----------------03.05.99 12:28-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwXTextEmbeddedObject::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return COMPARE_EQUAL == rServiceName.compareToAscii("com.sun.star.text.TextEmbeddedObject")||
SwXFrame::supportsService(rServiceName);
}
-/* -----------------03.05.99 12:28-------------------
- *
- * --------------------------------------------------*/
+
uno::Sequence< OUString > SwXTextEmbeddedObject::getSupportedServiceNames(void)
throw( uno::RuntimeException )
{
@@ -3332,23 +3062,17 @@ uno::Sequence< OUString > SwXTextEmbeddedObject::getSupportedServiceNames(void)
pArray[aRet.getLength() - 1] = C2U("com.sun.star.text.TextEmbeddedObject");
return aRet;
}
-/* -----------------------------20.06.00 10:02--------------------------------
- ---------------------------------------------------------------------------*/
void * SAL_CALL SwXTextEmbeddedObject::operator new( size_t t) throw()
{
return SwXTextEmbeddedObjectBaseClass::operator new(t);
}
-/* -----------------------------20.06.00 10:02--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextEmbeddedObject::operator delete( void * p) throw()
{
SwXTextEmbeddedObjectBaseClass::operator delete(p);
}
-/* -----------------------------15.12.00 12:45--------------------------------
- ---------------------------------------------------------------------------*/
uno::Reference<container::XNameReplace> SAL_CALL
SwXTextEmbeddedObject::getEvents()
throw(uno::RuntimeException)
@@ -3356,29 +3080,21 @@ uno::Reference<container::XNameReplace> SAL_CALL
return new SwFrameEventDescriptor( *this );
}
-
-/******************************************************************
- *
- ******************************************************************/
TYPEINIT1(SwXOLEListener, SwClient);
-/* -----------------------------18.01.2002 09:59------------------------------
- ---------------------------------------------------------------------------*/
SwXOLEListener::SwXOLEListener( SwFmt& rOLEFmt, uno::Reference< XModel > xOLE) :
SwClient(&rOLEFmt),
xOLEModel(xOLE)
{
}
-/* -----------------------------18.01.2002 09:59------------------------------
- ---------------------------------------------------------------------------*/
SwXOLEListener::~SwXOLEListener()
{}
void SwXOLEListener::modified( const lang::EventObject& /*rEvent*/ )
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwOLENode* pNd = 0;
SwFmt* pFmt = GetFmt();
@@ -3403,17 +3119,14 @@ void SwXOLEListener::modified( const lang::EventObject& /*rEvent*/ )
}
// if the OLE-Node is UI-Active do nothing
- pNd->SetOLESizeInvalid( sal_True );
+ pNd->SetOLESizeInvalid(true);
pNd->GetDoc()->SetOLEObjModified();
}
-/* ---------------------------------------------------------------------------
-
- ---------------------------------------------------------------------------*/
void SwXOLEListener::disposing( const lang::EventObject& rEvent )
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< util::XModifyListener > xListener( this );
@@ -3428,12 +3141,10 @@ void SwXOLEListener::disposing( const lang::EventObject& rEvent )
}
catch(uno::Exception const &)
{
- DBG_ERROR("OLE Listener couldn't be removed");
+ OSL_FAIL("OLE Listener couldn't be removed");
}
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
void SwXOLEListener::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
ClientModify(this, pOld, pNew);
@@ -3441,3 +3152,4 @@ void SwXOLEListener::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
xOLEModel = 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx
index d0d74fa023c7..1e6f98b63496 100644
--- a/sw/source/core/unocore/unoftn.cxx
+++ b/sw/source/core/unocore/unoftn.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <rtl/uuid.h>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <comphelper/sequence.hxx>
@@ -57,7 +58,6 @@ using ::rtl::OUString;
/******************************************************************
* SwXFootnote
******************************************************************/
-
class SwXFootnote::Impl
: public SwClient
{
@@ -105,9 +105,6 @@ public:
};
-/* -----------------------------07.01.00 12:39--------------------------------
-
- ---------------------------------------------------------------------------*/
void SwXFootnote::Impl::Invalidate()
{
if (GetRegisteredIn())
@@ -119,9 +116,6 @@ void SwXFootnote::Impl::Invalidate()
m_rThis.SetDoc(0);
}
-/* -----------------18.01.99 09:12-------------------
- *
- * --------------------------------------------------*/
void SwXFootnote::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -145,25 +139,18 @@ void SwXFootnote::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
-/*-- 10.12.98 15:31:44---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXFootnote::SwXFootnote(const bool bEndnote)
: SwXText(0, CURSOR_FOOTNOTE)
, m_pImpl( new SwXFootnote::Impl(*this, 0, 0, bEndnote) )
{
}
-/*-- 10.12.98 15:31:45---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXFootnote::SwXFootnote(SwDoc & rDoc, const SwFmtFtn& rFmt)
: SwXText(& rDoc, CURSOR_FOOTNOTE)
, m_pImpl( new SwXFootnote::Impl(*this, &rDoc, &rFmt, rFmt.IsEndNote()) )
{
}
-/*-- 10.12.98 15:31:45---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXFootnote::~SwXFootnote()
{
}
@@ -177,24 +164,6 @@ SwXFootnote::GetXFootnote(
// to do this properly requires the SwXFootnote to register at the
// SwFmtFtn directly, not at the unocallback
// also this function must return a uno Reference!
-#if 0
- SwClientIter aIter( rUnoCB );
- SwXFootnote::Impl * pXFootnote = static_cast<SwXFootnote::Impl*>(
- aIter.First( TYPE( SwXFootnote::Impl )));
- while (pXFootnote)
- {
- SwDoc *const pDoc = pXFootnote->m_rThis.GetDoc();
- if (pDoc)
- {
- SwFmtFtn const*const pFtn = pXFootnote->GetFootnoteFormat();
- if (pFtn == &rFootnoteFmt)
- {
- return & pXFootnote->m_rThis;
- }
- }
- pXFootnote = static_cast<SwXFootnote::Impl*>(aIter.Next());
- }
-#endif
return 0;
}
@@ -208,17 +177,12 @@ SwXFootnote::CreateXFootnote(SwDoc & rDoc, SwFmtFtn const& rFootnoteFmt)
: new SwXFootnote(rDoc, rFootnoteFmt);
}
-/* -----------------------------13.03.00 12:15--------------------------------
-
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXFootnote::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL
SwXFootnote::getSomething(const uno::Sequence< sal_Int8 >& rId)
throw (uno::RuntimeException)
@@ -227,18 +191,12 @@ throw (uno::RuntimeException)
return (nRet) ? nRet : SwXText::getSomething(rId);
}
-/* -----------------------------06.04.00 16:36--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SAL_CALL
SwXFootnote::getImplementationName() throw (uno::RuntimeException)
{
return C2U("SwXFootnote");
}
-/* -----------------------------06.04.00 16:36--------------------------------
-
- ---------------------------------------------------------------------------*/
static char const*const g_ServicesFootnote[] =
{
"com.sun.star.text.TextContent",
@@ -246,14 +204,16 @@ static char const*const g_ServicesFootnote[] =
"com.sun.star.text.Text",
"com.sun.star.text.Endnote", // NB: only supported for endnotes!
};
+
static const size_t g_nServicesEndnote(
- sizeof(g_ServicesFootnote)/sizeof(g_ServicesFootnote[0]));
+ SAL_N_ELEMENTS(g_ServicesFootnote));
+
static const size_t g_nServicesFootnote( g_nServicesEndnote - 1 ); // NB: omit!
sal_Bool SAL_CALL SwXFootnote::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return ::sw::SupportsServiceImpl(
(m_pImpl->m_bIsEndnote) ? g_nServicesEndnote : g_nServicesFootnote,
g_ServicesFootnote, rServiceName);
@@ -262,15 +222,12 @@ throw (uno::RuntimeException)
uno::Sequence< OUString > SAL_CALL
SwXFootnote::getSupportedServiceNames() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return ::sw::GetSupportedServiceNamesImpl(
(m_pImpl->m_bIsEndnote) ? g_nServicesEndnote : g_nServicesFootnote,
g_ServicesFootnote);
}
-/* -----------------------------21.03.00 15:39--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Type > SAL_CALL
SwXFootnote::getTypes() throw (uno::RuntimeException)
{
@@ -279,13 +236,10 @@ SwXFootnote::getTypes() throw (uno::RuntimeException)
return ::comphelper::concatSequences(aTypes, aTextTypes);
}
-/* -----------------------------21.03.00 15:39--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Sequence< sal_Int8 > SAL_CALL
SwXFootnote::getImplementationId() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -295,9 +249,7 @@ SwXFootnote::getImplementationId() throw (uno::RuntimeException)
}
return aId;
}
-/* -----------------------------21.03.00 15:46--------------------------------
- ---------------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXFootnote::queryInterface(const uno::Type& rType)
throw (uno::RuntimeException)
@@ -308,12 +260,9 @@ throw (uno::RuntimeException)
: ret;
}
-/*-- 10.12.98 15:31:47---------------------------------------------------
-
- -----------------------------------------------------------------------*/
OUString SAL_CALL SwXFootnote::getLabel() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
::rtl::OUString sRet;
SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat();
@@ -332,13 +281,10 @@ OUString SAL_CALL SwXFootnote::getLabel() throw (uno::RuntimeException)
return sRet;
}
-/*-- 10.12.98 15:31:48---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXFootnote::setLabel(const OUString& aLabel) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat();
if(pFmt)
@@ -360,14 +306,11 @@ SwXFootnote::setLabel(const OUString& aLabel) throw (uno::RuntimeException)
}
}
-/* -----------------18.02.99 13:32-------------------
- *
- * --------------------------------------------------*/
void SAL_CALL
SwXFootnote::attach(const uno::Reference< text::XTextRange > & xTextRange)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!m_pImpl->m_bIsDescriptor)
{
@@ -432,13 +375,10 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
SetDoc(pNewDoc);
}
-/*-- 10.12.98 15:31:48---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SAL_CALL
SwXFootnote::getAnchor() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
@@ -451,12 +391,10 @@ SwXFootnote::getAnchor() throw (uno::RuntimeException)
SwXTextRange::CreateXTextRange(*GetDoc(), *aPam.Start(), aPam.End());
return xRet;
}
-/*-- 10.12.98 15:31:49---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXFootnote::dispose() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
@@ -468,15 +406,12 @@ void SAL_CALL SwXFootnote::dispose() throw (uno::RuntimeException)
GetDoc()->DeleteAndJoin( aPam );
}
-/*-- 10.12.98 15:31:49---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXFootnote::addEventListener(
const uno::Reference< lang::XEventListener > & xListener)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->GetFootnoteFormat())
{
@@ -484,15 +419,13 @@ throw (uno::RuntimeException)
}
m_pImpl->m_ListenerContainer.AddListener(xListener);
}
-/*-- 10.12.98 15:31:50---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXFootnote::removeEventListener(
const uno::Reference< lang::XEventListener > & xListener)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->GetFootnoteFormat() ||
!m_pImpl->m_ListenerContainer.RemoveListener(xListener))
@@ -501,9 +434,6 @@ throw (uno::RuntimeException)
}
}
-/* -----------------06.05.99 15:31-------------------
- *
- * --------------------------------------------------*/
const SwStartNode *SwXFootnote::GetStartNode() const
{
SwFmtFtn const*const pFmt = m_pImpl->GetFootnoteFormat();
@@ -524,13 +454,10 @@ SwXFootnote::CreateCursor() throw (uno::RuntimeException)
return createTextCursor();
}
-/*-- 10.12.98 15:31:50---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextCursor > SAL_CALL
SwXFootnote::createTextCursor() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
@@ -545,15 +472,12 @@ SwXFootnote::createTextCursor() throw (uno::RuntimeException)
return xRet;
}
-/*-- 10.12.98 15:31:51---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextCursor > SAL_CALL
SwXFootnote::createTextCursorByRange(
const uno::Reference< text::XTextRange > & xTextPosition)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
@@ -579,13 +503,10 @@ throw (uno::RuntimeException)
return xRet;
}
-/*-- 13.06.00 14:28:23---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< container::XEnumeration > SAL_CALL
SwXFootnote::createEnumeration() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFmtFtn const& rFmt( m_pImpl->GetFootnoteFormatOrThrow() );
@@ -599,38 +520,27 @@ SwXFootnote::createEnumeration() throw (uno::RuntimeException)
return xRet;
}
-/*-- 13.06.00 14:28:24---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Type SAL_CALL SwXFootnote::getElementType() throw (uno::RuntimeException)
{
return text::XTextRange::static_type();
}
-/*-- 13.06.00 14:28:24---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL SwXFootnote::hasElements() throw (uno::RuntimeException)
{
return sal_True;
}
-/*-- 11.09.00 13:12:03---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SAL_CALL
SwXFootnote::getPropertySetInfo()
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
static uno::Reference< beans::XPropertySetInfo > xRet =
aSwMapProvider.GetPropertySet(PROPERTY_MAP_FOOTNOTE)
->getPropertySetInfo();
return xRet;
}
-/*-- 11.09.00 13:12:04---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXFootnote::setPropertyValue(const ::rtl::OUString&, const uno::Any&)
throw (beans::UnknownPropertyException, beans::PropertyVetoException,
@@ -640,15 +550,13 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
//no values to be set
throw lang::IllegalArgumentException();
}
-/*-- 11.09.00 13:12:04---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXFootnote::getPropertyValue(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
if (! ::sw::GetDefaultTextContentValue(aRet, rPropertyName))
@@ -683,9 +591,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
return aRet;
}
-/*-- 11.09.00 13:12:04---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXFootnote::addPropertyChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -730,3 +635,4 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
"SwXFootnote::removeVetoableChangeListener(): not implemented");
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 7fc598921b72..c94bdb72151b 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,15 +38,9 @@
#include <com/sun/star/text/XTextDocument.hpp>
#include <tools/debug.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <editeng/unolingu.hxx>
-#include <com/sun/star/text/ChapterFormat.hpp>
-#include <com/sun/star/text/ReferenceFieldPart.hpp>
-#include <com/sun/star/text/BibliographyDataField.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/text/XTextDocument.hpp>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <hints.hxx>
#include <cmdid.h>
#include <swtypes.hxx>
@@ -76,7 +71,6 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
-//-----------------------------------------------------------------------------
static OUString
lcl_AnyToString(uno::Any const& rVal) throw (lang::IllegalArgumentException)
{
@@ -87,7 +81,7 @@ lcl_AnyToString(uno::Any const& rVal) throw (lang::IllegalArgumentException)
}
return sRet;
}
-//-----------------------------------------------------------------------------
+
static sal_Int16
lcl_AnyToInt16(uno::Any const& rVal) throw (lang::IllegalArgumentException)
{
@@ -98,7 +92,7 @@ lcl_AnyToInt16(uno::Any const& rVal) throw (lang::IllegalArgumentException)
}
return nRet;
}
-//-----------------------------------------------------------------------------
+
static sal_Bool
lcl_AnyToBool(uno::Any const& rVal) throw (lang::IllegalArgumentException)
{
@@ -119,6 +113,7 @@ throw (lang::IllegalArgumentException)
? (rBitMask | nBit)
: (rBitMask & ~nBit);
}
+
static void
lcl_BitMaskToAny(uno::Any & o_rValue,
const sal_uInt16 nBitMask, const sal_uInt16 nBit)
@@ -127,7 +122,6 @@ lcl_BitMaskToAny(uno::Any & o_rValue,
o_rValue <<= bRet;
}
-//-----------------------------------------------------------------------------
static void
lcl_ReAssignTOXType(SwDoc* pDoc, SwTOXBase& rTOXBase, const OUString& rNewName)
{
@@ -150,7 +144,7 @@ lcl_ReAssignTOXType(SwDoc* pDoc, SwTOXBase& rTOXBase, const OUString& rNewName)
//has to be non-const-casted
((SwTOXType*)pNewType)->Add(&rTOXBase);
}
-//-----------------------------------------------------------------------------
+
static const char cUserDefined[] = "User-Defined";
static const char cUserSuffix[] = " (user)";
#define USER_LEN 12
@@ -171,7 +165,7 @@ void lcl_ConvertTOUNameToProgrammaticName(OUString& rTmp)
rTmp += C2U(cUserSuffix);
}
}
-//-----------------------------------------------------------------------------
+
static void
lcl_ConvertTOUNameToUserName(OUString& rTmp)
{
@@ -192,9 +186,6 @@ lcl_ConvertTOUNameToUserName(OUString& rTmp)
}
}
-/* -----------------13.09.99 16:39-------------------
-
- --------------------------------------------------*/
typedef ::cppu::WeakImplHelper2
< lang::XServiceInfo
, container::XIndexReplace
@@ -240,9 +231,6 @@ public:
};
-/* -----------------13.09.99 16:39-------------------
-
- --------------------------------------------------*/
typedef ::cppu::WeakImplHelper2
< lang::XServiceInfo
, container::XIndexReplace
@@ -289,14 +277,9 @@ public:
};
-
/******************************************************************
* SwXDocumentIndex
******************************************************************/
-
-/* -----------------20.06.98 11:06-------------------
- *
- * --------------------------------------------------*/
class SwDocIndexDescriptorProperties_Impl
{
private:
@@ -310,9 +293,7 @@ public:
const OUString& GetTypeName() const { return m_sUserTOXTypeName; }
void SetTypeName(const OUString& rSet) { m_sUserTOXTypeName = rSet; }
};
-/* -----------------20.06.98 11:41-------------------
- *
- * --------------------------------------------------*/
+
SwDocIndexDescriptorProperties_Impl::SwDocIndexDescriptorProperties_Impl(
SwTOXType const*const pType)
{
@@ -410,9 +391,6 @@ public:
};
-/*-- 14.12.98 09:35:07---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXDocumentIndex::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -423,26 +401,18 @@ void SwXDocumentIndex::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
-/*-- 14.12.98 09:35:03---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXDocumentIndex::SwXDocumentIndex(
SwTOXBaseSection const& rBaseSection, SwDoc & rDoc)
: m_pImpl( new SwXDocumentIndex::Impl( *this,
rDoc, rBaseSection.SwTOXBase::GetType(), & rBaseSection) )
{
}
-/* -----------------15.01.99 14:59-------------------
- *
- * --------------------------------------------------*/
+
SwXDocumentIndex::SwXDocumentIndex(const TOXTypes eType, SwDoc& rDoc)
: m_pImpl( new SwXDocumentIndex::Impl( *this, rDoc, eType, 0) )
{
}
-/*-- 14.12.98 09:35:04---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXDocumentIndex::~SwXDocumentIndex()
{
}
@@ -465,17 +435,12 @@ SwXDocumentIndex::CreateXDocumentIndex(
return xIndex;
}
-/* -----------------------------10.03.00 18:02--------------------------------
-
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXDocumentIndex::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL
SwXDocumentIndex::getSomething(const uno::Sequence< sal_Int8 >& rId)
throw (uno::RuntimeException)
@@ -483,46 +448,39 @@ throw (uno::RuntimeException)
return ::sw::UnoTunnelImpl<SwXDocumentIndex>(rId, this);
}
-/* -----------------------------06.04.00 15:01--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SAL_CALL
SwXDocumentIndex::getImplementationName() throw (uno::RuntimeException)
{
return C2U("SwXDocumentIndex");
}
-/* -----------------------------06.04.00 15:01--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXDocumentIndex::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return C2U("com.sun.star.text.BaseIndex") == rServiceName
|| ((TOX_INDEX == m_pImpl->m_eTOXType) &&
- rServiceName.equalsAscii("com.sun.star.text.DocumentIndex"))
+ rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentIndex")))
|| ((TOX_CONTENT == m_pImpl->m_eTOXType) &&
- rServiceName.equalsAscii("com.sun.star.text.ContentIndex"))
+ rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.ContentIndex")))
|| ((TOX_USER == m_pImpl->m_eTOXType) &&
- rServiceName.equalsAscii("com.sun.star.text.UserDefinedIndex"))
+ rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.UserDefinedIndex")))
|| ((TOX_ILLUSTRATIONS == m_pImpl->m_eTOXType) &&
- rServiceName.equalsAscii("com.sun.star.text.IllustrationsIndex"))
+ rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.IllustrationsIndex")))
|| ((TOX_TABLES == m_pImpl->m_eTOXType) &&
- rServiceName.equalsAscii("com.sun.star.text.TableIndex"))
+ rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TableIndex")))
|| ((TOX_OBJECTS == m_pImpl->m_eTOXType) &&
- rServiceName.equalsAscii("com.sun.star.text.ObjectIndex"))
+ rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.ObjectIndex")))
|| ((TOX_AUTHORITIES == m_pImpl->m_eTOXType) &&
- rServiceName.equalsAscii("com.sun.star.text.Bibliography"));
+ rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.Bibliography")));
}
-/* -----------------------------06.04.00 15:01--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SAL_CALL
SwXDocumentIndex::getSupportedServiceNames() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
uno::Sequence< OUString > aRet(2);
OUString* pArray = aRet.getArray();
@@ -554,13 +512,10 @@ SwXDocumentIndex::getSupportedServiceNames() throw (uno::RuntimeException)
return aRet;
}
-/*-- 14.12.98 09:35:05---------------------------------------------------
-
- -----------------------------------------------------------------------*/
OUString SAL_CALL SwXDocumentIndex::getServiceName()
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
sal_uInt16 nObjectType = SW_SERVICE_TYPE_INDEX;
switch (m_pImpl->m_eTOXType)
@@ -584,12 +539,9 @@ throw (uno::RuntimeException)
return SwXServiceProvider::GetProviderName(nObjectType);
}
-/*-- 14.12.98 09:35:05---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL SwXDocumentIndex::update() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt();
SwTOXBaseSection *const pTOXBase = (pFmt) ?
@@ -603,22 +555,16 @@ void SAL_CALL SwXDocumentIndex::update() throw (uno::RuntimeException)
pTOXBase->UpdatePageNum();
}
-/*-- 14.12.98 09:35:05---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SAL_CALL
SwXDocumentIndex::getPropertySetInfo() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
const uno::Reference< beans::XPropertySetInfo > xRef =
m_pImpl->m_rPropSet.getPropertySetInfo();
return xRef;
}
-/*-- 14.12.98 09:35:05---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXDocumentIndex::setPropertyValue(
const OUString& rPropertyName, const uno::Any& rValue)
@@ -626,7 +572,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SfxItemPropertySimpleEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap()->getByName(rPropertyName);
@@ -736,7 +682,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
case WID_CREATE_FROM_OUTLINE:
lcl_AnyToBitMask(rValue, nCreate, nsSwTOXElement::TOX_OUTLINELEVEL);
break;
-// case WID_PARAGRAPH_STYLE_NAMES :DBG_ERROR("not implemented")
+// case WID_PARAGRAPH_STYLE_NAMES :OSL_FAIL("not implemented")
// break;
case WID_CREATE_FROM_CHAPTER:
rTOXBase.SetFromChapter(lcl_AnyToBool(rValue));
@@ -936,15 +882,12 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
}
-/*-- 14.12.98 09:35:05---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXDocumentIndex::getPropertyValue(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
SfxItemPropertySimpleEntry const*const pEntry =
@@ -1287,9 +1230,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
return aRet;
}
-/*-- 14.12.98 09:35:06---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXDocumentIndex::addPropertyChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -1334,14 +1274,11 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
"SwXDocumentIndex::removeVetoableChangeListener(): not implemented");
}
-/* -----------------18.02.99 13:39-------------------
- *
- * --------------------------------------------------*/
void SAL_CALL
SwXDocumentIndex::attach(const uno::Reference< text::XTextRange > & xTextRange)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!m_pImpl->m_bIsDescriptor)
{
@@ -1399,13 +1336,10 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
m_pImpl->m_bIsDescriptor = sal_False;
}
-/*-- 15.01.99 14:23:56---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SAL_CALL
SwXDocumentIndex::getAnchor() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
if (!pSectionFmt)
@@ -1428,9 +1362,6 @@ SwXDocumentIndex::getAnchor() throw (uno::RuntimeException)
return xRet;
}
-/*-- 15.01.99 15:46:48---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void lcl_RemoveChildSections(SwSectionFmt& rParentFmt)
{
SwSections aTmpArr;
@@ -1452,7 +1383,7 @@ void lcl_RemoveChildSections(SwSectionFmt& rParentFmt)
void SAL_CALL SwXDocumentIndex::dispose() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
if (pSectionFmt)
@@ -1463,15 +1394,12 @@ void SAL_CALL SwXDocumentIndex::dispose() throw (uno::RuntimeException)
}
}
-/*-- 15.01.99 15:46:49---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXDocumentIndex::addEventListener(
const uno::Reference< lang::XEventListener > & xListener)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->GetRegisteredIn())
{
@@ -1479,15 +1407,13 @@ throw (uno::RuntimeException)
}
m_pImpl->m_ListenerContainer.AddListener(xListener);
}
-/*-- 15.01.99 15:46:54---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXDocumentIndex::removeEventListener(
const uno::Reference< lang::XEventListener > & xListener)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->GetRegisteredIn() ||
!m_pImpl->m_ListenerContainer.RemoveListener(xListener))
@@ -1496,12 +1422,9 @@ throw (uno::RuntimeException)
}
}
-/* -----------------30.07.99 11:28-------------------
-
- --------------------------------------------------*/
OUString SAL_CALL SwXDocumentIndex::getName() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
OUString uRet;
SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
@@ -1519,13 +1442,11 @@ OUString SAL_CALL SwXDocumentIndex::getName() throw (uno::RuntimeException)
}
return uRet;
}
-/* -----------------30.07.99 11:28-------------------
- --------------------------------------------------*/
void SAL_CALL
SwXDocumentIndex::setName(const OUString& rName) throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!rName.getLength())
{
@@ -1574,9 +1495,6 @@ uno::Reference<frame::XModel> SwXDocumentIndex::GetModel()
/******************************************************************
* SwXDocumentIndexMark
******************************************************************/
-/* -----------------21.04.99 09:36-------------------
- *
- * --------------------------------------------------*/
static sal_uInt16
lcl_TypeToPropertyMap_Mark(const TOXTypes eType)
{
@@ -1671,9 +1589,6 @@ public:
virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew);
};
-/* -----------------------------16.10.00 11:24--------------------------------
-
- ---------------------------------------------------------------------------*/
void SwXDocumentIndexMark::Impl::Invalidate()
{
if (GetRegisteredIn())
@@ -1693,9 +1608,6 @@ void SwXDocumentIndexMark::Impl::Invalidate()
m_pTOXMark = 0;
}
-/*-- 14.12.98 10:25:47---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXDocumentIndexMark::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -1706,25 +1618,18 @@ void SwXDocumentIndexMark::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
-/*-- 14.12.98 10:25:43---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXDocumentIndexMark::SwXDocumentIndexMark(const TOXTypes eToxType)
: m_pImpl( new SwXDocumentIndexMark::Impl(*this, 0, eToxType, 0, 0) )
{
}
-/*-- 14.12.98 10:25:44---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXDocumentIndexMark::SwXDocumentIndexMark(SwDoc & rDoc,
SwTOXType & rType, SwTOXMark & rMark)
: m_pImpl( new SwXDocumentIndexMark::Impl(*this, &rDoc, rType.GetType(),
&rType, &rMark) )
{
}
-/*-- 14.12.98 10:25:44---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXDocumentIndexMark::~SwXDocumentIndexMark()
{
}
@@ -1747,17 +1652,12 @@ SwXDocumentIndexMark::CreateXDocumentIndexMark(
return xTOXMark;
}
-/* -----------------------------10.03.00 18:02--------------------------------
-
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXDocumentIndexMark::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL
SwXDocumentIndexMark::getSomething(const uno::Sequence< sal_Int8 >& rId)
throw (uno::RuntimeException)
@@ -1772,22 +1672,17 @@ static const sal_Char cIdxMarkAsian[] = "com.sun.star.text.DocumentIndexMarkAsi
static const sal_Char cUserMark[] = "com.sun.star.text.UserIndexMark";
static const sal_Char cTextContent[] = "com.sun.star.text.TextContent";
-/* -----------------------------06.04.00 15:07--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SAL_CALL
SwXDocumentIndexMark::getImplementationName() throw (uno::RuntimeException)
{
return C2U("SwXDocumentIndexMark");
}
-/* -----------------------------06.04.00 15:07--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXDocumentIndexMark::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return rServiceName.equalsAscii(cBaseMark)
|| rServiceName.equalsAscii(cTextContent)
@@ -1800,13 +1695,11 @@ throw (uno::RuntimeException)
|| ((m_pImpl->m_eTOXType == TOX_INDEX)
&& rServiceName.equalsAscii(cIdxMarkAsian));
}
-/* -----------------------------06.04.00 15:07--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SAL_CALL
SwXDocumentIndexMark::getSupportedServiceNames() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
const sal_Int32 nCnt = (m_pImpl->m_eTOXType == TOX_INDEX) ? 4 : 3;
uno::Sequence< OUString > aRet(nCnt);
@@ -1832,13 +1725,10 @@ SwXDocumentIndexMark::getSupportedServiceNames() throw (uno::RuntimeException)
return aRet;
}
-/*-- 14.12.98 10:25:45---------------------------------------------------
-
- -----------------------------------------------------------------------*/
OUString SAL_CALL
SwXDocumentIndexMark::getMarkEntry() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
OUString sRet;
SwTOXType *const pType = m_pImpl->GetTOXType();
@@ -1856,14 +1746,12 @@ SwXDocumentIndexMark::getMarkEntry() throw (uno::RuntimeException)
}
return sRet;
}
-/*-- 14.12.98 10:25:45---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXDocumentIndexMark::setMarkEntry(const OUString& rIndexEntry)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTOXType *const pType = m_pImpl->GetTOXType();
if (pType && m_pImpl->m_pTOXMark)
@@ -1893,15 +1781,12 @@ throw (uno::RuntimeException)
}
}
-/* -----------------18.02.99 13:40-------------------
- *
- * --------------------------------------------------*/
void SAL_CALL
SwXDocumentIndexMark::attach(
const uno::Reference< text::XTextRange > & xTextRange)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!m_pImpl->m_bIsDescriptor)
{
@@ -1966,7 +1851,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
SwUnoInternalPaM aPam(*pDoc);
- //das muss jetzt sal_True liefern
+ //which must now return sal_True
::sw::XTextRangeToSwPaM(aPam, xTextRange);
SwTOXMark aMark (pTOXType);
if (m_pImpl->m_sAltText.getLength())
@@ -2105,13 +1990,10 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
const_cast<SwTOXType &>(rTOXType).Add(& m_TypeDepend);
}
-/*-- 14.12.98 10:25:45---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SAL_CALL
SwXDocumentIndexMark::getAnchor() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTOXType *const pType = m_pImpl->GetTOXType();
if (!pType || !m_pImpl->m_pTOXMark)
@@ -2142,13 +2024,10 @@ SwXDocumentIndexMark::getAnchor() throw (uno::RuntimeException)
return xRet;
}
-/*-- 14.12.98 10:25:45---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXDocumentIndexMark::dispose() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTOXType *const pType = m_pImpl->GetTOXType();
if (pType && m_pImpl->m_pTOXMark)
@@ -2156,15 +2035,13 @@ SwXDocumentIndexMark::dispose() throw (uno::RuntimeException)
m_pImpl->DeleteTOXMark(); // call Invalidate() via modify!
}
}
-/*-- 14.12.98 10:25:45---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXDocumentIndexMark::addEventListener(
const uno::Reference< lang::XEventListener > & xListener)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->GetRegisteredIn())
{
@@ -2172,15 +2049,13 @@ throw (uno::RuntimeException)
}
m_pImpl->m_ListenerContainer.AddListener(xListener);
}
-/*-- 14.12.98 10:25:46---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXDocumentIndexMark::removeEventListener(
const uno::Reference< lang::XEventListener > & xListener)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->GetRegisteredIn() ||
!m_pImpl->m_ListenerContainer.RemoveListener(xListener))
@@ -2189,13 +2064,10 @@ throw (uno::RuntimeException)
}
}
-/*-- 14.12.98 10:25:46---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SAL_CALL
SwXDocumentIndexMark::getPropertySetInfo() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
static uno::Reference< beans::XPropertySetInfo > xInfos[3];
int nPos = 0;
@@ -2221,9 +2093,6 @@ SwXDocumentIndexMark::getPropertySetInfo() throw (uno::RuntimeException)
return xInfos[nPos];
}
-/*-- 14.12.98 10:25:46---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXDocumentIndexMark::setPropertyValue(
const OUString& rPropertyName, const uno::Any& rValue)
@@ -2231,7 +2100,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SfxItemPropertySimpleEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap()->getByName(rPropertyName);
@@ -2350,15 +2219,12 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
}
-/*-- 14.12.98 10:25:46---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXDocumentIndexMark::getPropertyValue(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
SfxItemPropertySimpleEntry const*const pEntry =
@@ -2460,9 +2326,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
return aRet;
}
-/*-- 14.12.98 10:25:46---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXDocumentIndexMark::addPropertyChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -2507,27 +2370,18 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
"SwXDocumentIndexMark::removeVetoableChangeListener(): not implemented");
}
-
/******************************************************************
* SwXDocumentIndexes
******************************************************************/
-/*-- 05.05.99 13:14:59---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXDocumentIndexes::SwXDocumentIndexes(SwDoc *const _pDoc)
: SwUnoCollection(_pDoc)
{
}
-/*-- 05.05.99 13:15:00---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXDocumentIndexes::~SwXDocumentIndexes()
{
}
-/* -----------------------------06.04.00 15:08--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SAL_CALL
SwXDocumentIndexes::getImplementationName() throw (uno::RuntimeException)
{
@@ -2538,8 +2392,9 @@ static char const*const g_ServicesDocumentIndexes[] =
{
"com.sun.star.text.DocumentIndexes",
};
+
static const size_t g_nServicesDocumentIndexes(
- sizeof(g_ServicesDocumentIndexes)/sizeof(g_ServicesDocumentIndexes[0]));
+ SAL_N_ELEMENTS(g_ServicesDocumentIndexes));
sal_Bool SAL_CALL
SwXDocumentIndexes::supportsService(const OUString& rServiceName)
@@ -2556,13 +2411,10 @@ SwXDocumentIndexes::getSupportedServiceNames() throw (uno::RuntimeException)
g_nServicesDocumentIndexes, g_ServicesDocumentIndexes);
}
-/*-- 05.05.99 13:15:01---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Int32 SAL_CALL
SwXDocumentIndexes::getCount() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
@@ -2581,15 +2433,12 @@ SwXDocumentIndexes::getCount() throw (uno::RuntimeException)
return nRet;
}
-/*-- 05.05.99 13:15:01---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXDocumentIndexes::getByIndex(sal_Int32 nIndex)
throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
@@ -2616,15 +2465,12 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
throw lang::IndexOutOfBoundsException();
}
-/*-- 31.01.00 10:12:31---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXDocumentIndexes::getByName(const OUString& rName)
throw (container::NoSuchElementException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
@@ -2650,13 +2496,10 @@ throw (container::NoSuchElementException, lang::WrappedTargetException,
throw container::NoSuchElementException();
}
-/*-- 31.01.00 10:12:31---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SAL_CALL
SwXDocumentIndexes::getElementNames() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
@@ -2690,14 +2533,11 @@ SwXDocumentIndexes::getElementNames() throw (uno::RuntimeException)
return aRet;
}
-/*-- 31.01.00 10:12:31---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXDocumentIndexes::hasByName(const OUString& rName)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
@@ -2720,17 +2560,12 @@ throw (uno::RuntimeException)
return sal_False;
}
-/*-- 05.05.99 13:15:01---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Type SAL_CALL
SwXDocumentIndexes::getElementType() throw (uno::RuntimeException)
{
return text::XDocumentIndex::static_type();
}
-/*-- 05.05.99 13:15:02---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXDocumentIndexes::hasElements() throw (uno::RuntimeException)
{
@@ -2740,25 +2575,16 @@ SwXDocumentIndexes::hasElements() throw (uno::RuntimeException)
/******************************************************************
* SwXDocumentIndex::StyleAccess_Impl
******************************************************************/
-
-/*-- 13.09.99 16:52:28---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXDocumentIndex::StyleAccess_Impl::StyleAccess_Impl(
SwXDocumentIndex& rParentIdx)
: m_xParent(&rParentIdx)
{
}
-/*-- 13.09.99 16:52:29---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXDocumentIndex::StyleAccess_Impl::~StyleAccess_Impl()
{
}
-/* -----------------------------06.04.00 15:08--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SAL_CALL
SwXDocumentIndex::StyleAccess_Impl::getImplementationName()
throw (uno::RuntimeException)
@@ -2770,8 +2596,9 @@ static char const*const g_ServicesIndexStyleAccess[] =
{
"com.sun.star.text.DocumentIndexParagraphStyles",
};
+
static const size_t g_nServicesIndexStyleAccess(
- sizeof(g_ServicesIndexStyleAccess)/sizeof(g_ServicesIndexStyleAccess[0]));
+ SAL_N_ELEMENTS(g_ServicesIndexStyleAccess));
sal_Bool SAL_CALL
SwXDocumentIndex::StyleAccess_Impl::supportsService(
@@ -2790,16 +2617,13 @@ throw (uno::RuntimeException)
g_nServicesIndexStyleAccess, g_ServicesIndexStyleAccess);
}
-/*-- 13.09.99 16:52:29---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXDocumentIndex::StyleAccess_Impl::replaceByIndex(
sal_Int32 nIndex, const uno::Any& rElement)
throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(nIndex < 0 || nIndex > MAXLEVEL)
{
@@ -2830,23 +2654,19 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
}
rTOXBase.SetStyleNames(sSetStyles, static_cast<sal_uInt16>(nIndex));
}
-/*-- 13.09.99 16:52:29---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SAL_CALL
SwXDocumentIndex::StyleAccess_Impl::getCount() throw (uno::RuntimeException)
{
return MAXLEVEL;
}
-/*-- 13.09.99 16:52:30---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXDocumentIndex::StyleAccess_Impl::getByIndex(sal_Int32 nIndex)
throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(nIndex < 0 || nIndex > MAXLEVEL)
{
@@ -2873,18 +2693,14 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
uno::Any aRet(&aStyles, ::getCppuType((uno::Sequence<OUString>*)0));
return aRet;
}
-/*-- 13.09.99 16:52:30---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SAL_CALL
SwXDocumentIndex::StyleAccess_Impl::getElementType()
throw (uno::RuntimeException)
{
return ::getCppuType((uno::Sequence<OUString>*)0);
}
-/*-- 13.09.99 16:52:30---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXDocumentIndex::StyleAccess_Impl::hasElements() throw (uno::RuntimeException)
{
@@ -2894,24 +2710,16 @@ SwXDocumentIndex::StyleAccess_Impl::hasElements() throw (uno::RuntimeException)
/******************************************************************
* SwXDocumentIndex::TokenAccess_Impl
******************************************************************/
-/*-- 13.09.99 16:52:28---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXDocumentIndex::TokenAccess_Impl::TokenAccess_Impl(
SwXDocumentIndex& rParentIdx)
: m_xParent(&rParentIdx)
{
}
-/*-- 13.09.99 16:52:29---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXDocumentIndex::TokenAccess_Impl::~TokenAccess_Impl()
{
}
-/* -----------------------------06.04.00 15:08--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SAL_CALL
SwXDocumentIndex::TokenAccess_Impl::getImplementationName()
throw (uno::RuntimeException)
@@ -2923,8 +2731,9 @@ static char const*const g_ServicesIndexTokenAccess[] =
{
"com.sun.star.text.DocumentIndexLevelFormat",
};
+
static const size_t g_nServicesIndexTokenAccess(
- sizeof(g_ServicesIndexTokenAccess)/sizeof(g_ServicesIndexTokenAccess[0]));
+ SAL_N_ELEMENTS(g_ServicesIndexTokenAccess));
sal_Bool SAL_CALL
SwXDocumentIndex::TokenAccess_Impl::supportsService(
@@ -2962,16 +2771,13 @@ static const struct TokenType g_TokenTypes[] =
{ 0, static_cast<enum FormTokenType>(0) }
};
-/*-- 13.09.99 16:52:29---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXDocumentIndex::TokenAccess_Impl::replaceByIndex(
sal_Int32 nIndex, const uno::Any& rElement)
throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTOXBase & rTOXBase( m_xParent->m_pImpl->GetTOXSectionOrThrow() );
@@ -2997,7 +2803,8 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
SwFormToken aToken(TOKEN_END);
for(sal_Int32 j = 0; j < nProperties; j++)
{
- if (pProperties[j].Name.equalsAscii("TokenType"))
+ if (pProperties[j].Name.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("TokenType")))
{
const OUString sTokenType =
lcl_AnyToString(pProperties[j].Value);
@@ -3090,7 +2897,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
}
aToken.nChapterFormat = nFormat;
}
-//--->i53420
+// #i53420#
else if (pProperties[j].Name.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("ChapterLevel")))
{
@@ -3101,7 +2908,6 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
}
aToken.nOutlineLevel = nLevel;
}
-//<---
else if (pProperties[j].Name.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("BibliographyDataField")))
{
@@ -3136,7 +2942,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
{
aToken.eTokenType = TOKEN_ENTRY;
}
-//---> i53420
+// #i53420#
// check for chapter format allowed values if it was TOKEN_ENTRY_NO type
// only allowed value are CF_NUMBER and CF_NUM_NOPREPST_TITLE
// reading from file
@@ -3151,7 +2957,6 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
throw lang::IllegalArgumentException();
}
}
-//<---
sPattern += aToken.GetString();
}
SwForm aForm(rTOXBase.GetTOXForm());
@@ -3159,27 +2964,21 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
rTOXBase.SetTOXForm(aForm);
}
-/*-- 13.09.99 16:52:29---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Int32 SAL_CALL
SwXDocumentIndex::TokenAccess_Impl::getCount() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const sal_Int32 nRet = m_xParent->m_pImpl->GetFormMax();
return nRet;
}
-/*-- 13.09.99 16:52:30---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXDocumentIndex::TokenAccess_Impl::getByIndex(sal_Int32 nIndex)
throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTOXBase & rTOXBase( m_xParent->m_pImpl->GetTOXSectionOrThrow() );
@@ -3215,7 +3014,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
{
case TOKEN_ENTRY_NO:
{
-//--->i53420
+// #i53420#
// writing to file (from doc to properties)
sal_Int32 nElements = 2;
sal_Int32 nCurrentElement = 0;
@@ -3236,7 +3035,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
pArr[nCurrentElement].Name = C2U("TokenType");
pArr[nCurrentElement++].Value <<=
- OUString::createFromAscii("TokenEntryNumber");
+ OUString(RTL_CONSTASCII_USTRINGPARAM("TokenEntryNumber"));
pArr[nCurrentElement].Name = C2U("CharacterStyleName");
pArr[nCurrentElement++].Value <<= aProgCharStyle;
@@ -3266,7 +3065,6 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
pArr[nCurrentElement].Name = C2U("ChapterLevel");
pArr[nCurrentElement].Value <<= aToken.nOutlineLevel;
}
-//<---
}
break;
case TOKEN_ENTRY: // no difference between Entry and Entry Text
@@ -3276,7 +3074,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
beans::PropertyValue* pArr = rCurTokenSeq.getArray();
pArr[0].Name = C2U("TokenType");
- pArr[0].Value <<= OUString::createFromAscii("TokenEntryText");
+ pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenEntryText"));
pArr[1].Name = C2U("CharacterStyleName");
pArr[1].Value <<= aProgCharStyle;
@@ -3288,7 +3086,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
beans::PropertyValue* pArr = rCurTokenSeq.getArray();
pArr[0].Name = C2U("TokenType");
- pArr[0].Value <<= OUString::createFromAscii("TokenTabStop");
+ pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenTabStop"));
if(SVX_TAB_ADJUST_END == aToken.eTabAlign)
{
@@ -3319,7 +3117,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
beans::PropertyValue* pArr = rCurTokenSeq.getArray();
pArr[0].Name = C2U("TokenType");
- pArr[0].Value <<= OUString::createFromAscii("TokenText");
+ pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenText"));
pArr[1].Name = C2U("CharacterStyleName");
pArr[1].Value <<= aProgCharStyle;
@@ -3334,7 +3132,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
beans::PropertyValue* pArr = rCurTokenSeq.getArray();
pArr[0].Name = C2U("TokenType");
- pArr[0].Value <<= OUString::createFromAscii("TokenPageNumber");
+ pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenPageNumber"));
pArr[1].Name = C2U("CharacterStyleName");
pArr[1].Value <<= aProgCharStyle;
@@ -3346,7 +3144,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
beans::PropertyValue* pArr = rCurTokenSeq.getArray();
pArr[0].Name = C2U("TokenType");
- pArr[0].Value <<= OUString::createFromAscii("TokenChapterInfo");
+ pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenChapterInfo"));
pArr[1].Name = C2U("CharacterStyleName");
pArr[1].Value <<= aProgCharStyle;
@@ -3372,11 +3170,9 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
break;
}
pArr[2].Value <<= nVal;
-//--->i53420
+// #i53420#
pArr[3].Name = C2U("ChapterLevel");
- //
pArr[3].Value <<= aToken.nOutlineLevel;
-//<---
}
break;
case TOKEN_LINK_START:
@@ -3386,7 +3182,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
pArr[0].Name = C2U("TokenType");
pArr[0].Value <<=
- OUString::createFromAscii("TokenHyperlinkStart");
+ OUString(RTL_CONSTASCII_USTRINGPARAM("TokenHyperlinkStart"));
pArr[1].Name = C2U("CharacterStyleName");
pArr[1].Value <<= aProgCharStyle;
}
@@ -3398,7 +3194,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
pArr[0].Name = C2U("TokenType");
pArr[0].Value <<=
- OUString::createFromAscii("TokenHyperlinkEnd");
+ OUString(RTL_CONSTASCII_USTRINGPARAM("TokenHyperlinkEnd"));
}
break;
case TOKEN_AUTHORITY:
@@ -3408,7 +3204,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
pArr[0].Name = C2U("TokenType");
pArr[0].Value <<=
- OUString::createFromAscii("TokenBibliographyDataField");
+ OUString(RTL_CONSTASCII_USTRINGPARAM("TokenBibliographyDataField"));
pArr[1].Name = C2U("CharacterStyleName");
pArr[1].Value <<= aProgCharStyle;
@@ -3422,7 +3218,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
;
}
- aIt++; // #i21237#
+ ++aIt; // #i21237#
}
uno::Any aRet;
@@ -3430,18 +3226,13 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
return aRet;
}
-/*-- 13.09.99 16:52:30---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Type SAL_CALL
SwXDocumentIndex::TokenAccess_Impl::getElementType()
throw (uno::RuntimeException)
{
return ::getCppuType((uno::Sequence< beans::PropertyValues >*)0);
}
-/*-- 13.09.99 16:52:30---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXDocumentIndex::TokenAccess_Impl::hasElements()
throw (uno::RuntimeException)
@@ -3449,3 +3240,4 @@ throw (uno::RuntimeException)
return sal_True;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index b0ef867efe71..b6ed84989dbf 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,9 +35,8 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/text/PageNumberType.hpp>
#include <com/sun/star/script/XLibraryContainer.hpp>
-// --> OD 2004-08-06 #i28749#
+// #i28749#
#include <com/sun/star/drawing/HomogenMatrix3.hpp>
-// <--
#include <swtypes.hxx>
#include <unomap.hxx>
#include <unoprnms.hxx>
@@ -64,9 +64,6 @@ using namespace ::comphelper;
SwUnoPropertyMapProvider aSwMapProvider;
-/* -----------------24.06.98 18:12-------------------
- *
- * --------------------------------------------------*/
SwUnoPropertyMapProvider::SwUnoPropertyMapProvider()
{
for( sal_uInt16 i = 0; i < PROPERTY_MAP_END; i++ )
@@ -76,9 +73,6 @@ SwUnoPropertyMapProvider::SwUnoPropertyMapProvider()
}
}
-/* -----------------19.02.99 08:31-------------------
- *
- * --------------------------------------------------*/
SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider()
{
}
@@ -131,9 +125,6 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider()
{SW_PROP_NMID(UNO_NAME_REDLINE_TEXT), 0, CPPU_E2T(CPPUTYPE_REFTEXT), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0},\
{SW_PROP_NMID(UNO_NAME_MERGE_LAST_PARA), 0, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0},
-/* -----------------24.06.98 18:12-------------------
- *
- * --------------------------------------------------*/
#define COMMON_CRSR_PARA_PROPERTIES_FN_ONLY \
{ SW_PROP_NMID(UNO_NAME_PARA_STYLE_NAME), FN_UNO_PARA_STYLE, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID, 0}, \
{ SW_PROP_NMID(UNO_NAME_PAGE_STYLE_NAME), FN_UNO_PAGE_STYLE, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0}, \
@@ -152,7 +143,7 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider()
{ SW_PROP_NMID(UNO_NAME_PARA_IS_NUMBERING_RESTART), FN_NUMBER_NEWSTART, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::MAYBEVOID, 0 }, \
{ SW_PROP_NMID(UNO_NAME_PARA_CONTINUEING_PREVIOUS_SUB_TREE), FN_UNO_PARA_CONT_PREV_SUBTREE, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::READONLY, 0 }, \
{ SW_PROP_NMID(UNO_NAME_PARA_LIST_LABEL_STRING), FN_UNO_PARA_NUM_STRING, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::READONLY, 0 }, \
- { SW_PROP_NMID(UNO_NAME_OUTLINE_LEVEL), RES_PARATR_OUTLINELEVEL, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, 0}, //#outline level, zhaojianwei
+ { SW_PROP_NMID(UNO_NAME_OUTLINE_LEVEL), RES_PARATR_OUTLINELEVEL, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, 0},
#define COMMON_HYPERLINK_PROPERTIES \
{ SW_PROP_NMID(UNO_NAME_HYPER_LINK_U_R_L), RES_TXTATR_INETFMT, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID ,MID_URL_URL}, \
@@ -296,9 +287,7 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider()
#define ANCHOR_TYPES_PROPERTY { SW_PROP_NMID(UNO_NAME_ANCHOR_TYPES), FN_UNO_ANCHOR_TYPES, CPPU_E2T(CPPUTYPE_SEQANCHORTYPE),PropertyAttribute::READONLY, 0xff},
-// OD 18.09.2003 #i18732# - add property
-// OD 2004-05-05 #i28701# - add property 'WrapInfluenceOnObjPos'
-// OD 2009-07-13 #i73249# - add properties 'Title' and 'Description'
+// #i18732# #i28701# #i73249#
#define COMMON_FRAME_PROPERTIES \
{ SW_PROP_NMID(UNO_NAME_ANCHOR_PAGE_NO), RES_ANCHOR, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_ANCHOR_PAGENUM }, \
{ SW_PROP_NMID(UNO_NAME_ANCHOR_TYPE), RES_ANCHOR, CPPU_E2T(CPPUTYPE_TXTCNTANCHOR), PROPERTY_NONE, MID_ANCHOR_ANCHORTYPE}, \
@@ -380,8 +369,6 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider()
{ SW_PROP_NMID(UNO_NAME_CHAR_DIFF_HEIGHT_COMPLEX), RES_CHRATR_CTL_FONTSIZE , CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE , MID_FONTHEIGHT_DIFF|CONVERT_TWIPS},
-//#outline level, zhaojianwei delete { SW_PROP_NMID(UNO_NAME_DEFAULT_OUTLINE_LEVEL), FN_UNO_DEFAULT_OUTLINE_LEVEL, CPPU_E2T(CPPUTYPE_INT8), PropertyAttribute::MAYBEVOID, 0},
-//add { SW_PROP_NMID(UNO_NAME_OUTLINE_LEVEL), RES_PARATR_OUTLINELEVEL,CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, 0},
#define COMMON_PARA_STYLE_PROPERTIES \
{ SW_PROP_NMID(UNO_NAME_BREAK_TYPE), RES_BREAK, CPPU_E2T(CPPUTYPE_BREAK), PROPERTY_NONE, 0},\
{ SW_PROP_NMID(UNO_NAME_PAGE_DESC_NAME), RES_PAGEDESC, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID, MID_PAGEDESC_PAGEDESCNAME },\
@@ -535,7 +522,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_PARA_CHAPTER_NUMBERING_LEVEL), FN_UNO_PARA_CHAPTER_NUMBERING_LEVEL,CPPU_E2T(CPPUTYPE_INT8), PROPERTY_NONE, 0}, \
{ SW_PROP_NMID(UNO_NAME_PARA_CONDITIONAL_STYLE_NAME), RES_FRMATR_CONDITIONAL_STYLE_NAME, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0}, \
{ SW_PROP_NMID(UNO_NAME_PARA_IS_NUMBERING_RESTART), FN_NUMBER_NEWSTART, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::MAYBEVOID, 0 }, \
- { SW_PROP_NMID(UNO_NAME_OUTLINE_LEVEL), RES_PARATR_OUTLINELEVEL, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, 0}, //#outline level,zhaojianwei
+ { SW_PROP_NMID(UNO_NAME_OUTLINE_LEVEL), RES_PARATR_OUTLINELEVEL, CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, 0},
COMMON_CRSR_PARA_PROPERTIES_WITHOUT_FN
TABSTOPS_MAP_ENTRY
COMMON_TEXT_CONTENT_PROPERTIES
@@ -689,9 +676,8 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_BACK_GRAPHIC_URL), RES_BACKGROUND, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE ,MID_GRAPHIC_URL },
{ SW_PROP_NMID(UNO_NAME_BACK_GRAPHIC_FILTER), RES_BACKGROUND, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE ,MID_GRAPHIC_FILTER },
{ SW_PROP_NMID(UNO_NAME_BACK_GRAPHIC_LOCATION), RES_BACKGROUND, CPPU_E2T(CPPUTYPE_GRAPHICLOC), PROPERTY_NONE ,MID_GRAPHIC_POSITION},
- // --> OD 2005-06-06 #i50322# - add missing map entry for transparency of graphic background
+ // #i50322# - add missing map entry for transparency of graphic background
{ SW_PROP_NMID(UNO_NAME_BACK_GRAPHIC_TRANSPARENCY), RES_BACKGROUND, CPPU_E2T(CPPUTYPE_INT8), PROPERTY_NONE ,MID_GRAPHIC_TRANSPARENCY},
- // <--
{ SW_PROP_NMID(UNO_NAME_LEFT_MARGIN), RES_LR_SPACE, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, MID_L_MARGIN|CONVERT_TWIPS},
{ SW_PROP_NMID(UNO_NAME_RIGHT_MARGIN), RES_LR_SPACE, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, MID_R_MARGIN|CONVERT_TWIPS},
{ SW_PROP_NMID(UNO_NAME_HORI_ORIENT), RES_HORI_ORIENT, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE ,MID_HORIORIENT_ORIENT },
@@ -743,9 +729,9 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_IS_PHYSICAL), FN_UNO_IS_PHYSICAL, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_IS_AUTO_UPDATE), FN_UNO_IS_AUTO_UPDATE, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_DISPLAY_NAME), FN_UNO_DISPLAY_NAME, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::READONLY, 0},
- // OD 18.09.2003 #i18732#
+ // #i18732#
{ SW_PROP_NMID(UNO_NAME_IS_FOLLOWING_TEXT_FLOW), RES_FOLLOW_TEXT_FLOW, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
- // OD 2004-05-05 #i28701#
+ // #i28701#
{ SW_PROP_NMID(UNO_NAME_WRAP_INFLUENCE_ON_POSITION), RES_WRAP_INFLUENCE_ON_OBJPOS, CPPU_E2T(CPPUTYPE_INT8), PROPERTY_NONE, MID_WRAP_INFLUENCE},
{ SW_PROP_NMID(UNO_NAME_WRITING_MODE), RES_FRAMEDIR, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, 0 },
{0,0,0,0,0,0}
@@ -924,9 +910,8 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_WRITING_MODE), RES_FRAMEDIR, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, 0 },
{ SW_PROP_NMID(UNO_NAME_TABLE_NAME), FN_UNO_TABLE_NAME, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0 },
{ SW_PROP_NMID(UNO_NAME_PAGE_STYLE_NAME), RES_PAGEDESC, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0},
- // --> collapsing borders DVO, FME 2005-05-27 #i29550#
+ // #i29550#
{ SW_PROP_NMID(UNO_NAME_COLLAPSING_BORDERS), RES_COLLAPSING_BORDERS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
- // <-- collapsing
_REDLINE_NODE_PROPERTIES
{0,0,0,0,0,0}
};
@@ -978,17 +963,6 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_BACK_GRAPHIC_LOCATION), FN_UNO_TABLE_CELL_BACKGROUND, CPPU_E2T(CPPUTYPE_GRAPHICLOC), PropertyAttribute::MAYBEVOID|PropertyAttribute::MAYBEVOID ,MID_GRAPHIC_POSITION},
{ SW_PROP_NMID(UNO_NAME_BACK_TRANSPARENT), FN_UNO_TABLE_CELL_BACKGROUND, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::MAYBEVOID|PropertyAttribute::MAYBEVOID ,MID_GRAPHIC_TRANSPARENT },
{ SW_PROP_NMID(UNO_NAME_NUMBER_FORMAT), RES_BOXATR_FORMAT, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID ,0 },
- // commented properties already found in
- // COMMON_CRSR_PARA_PROPERTIES_WITHOUT_FN_01
-// { SW_PROP_NMID(UNO_NAME_LEFT_BORDER), RES_BOX, CPPU_E2T(CPPUTYPE_BORDERLINE), 0, LEFT_BORDER |CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_RIGHT_BORDER), RES_BOX, CPPU_E2T(CPPUTYPE_BORDERLINE), 0, RIGHT_BORDER |CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_TOP_BORDER), RES_BOX, CPPU_E2T(CPPUTYPE_BORDERLINE), 0, TOP_BORDER |CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_BOTTOM_BORDER), RES_BOX, CPPU_E2T(CPPUTYPE_BORDERLINE), 0, BOTTOM_BORDER|CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_BORDER_DISTANCE), RES_BOX, CPPU_E2T(CPPUTYPE_INT32), 0, BORDER_DISTANCE|CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_LEFT_BORDER_DISTANCE), RES_BOX, CPPU_E2T(CPPUTYPE_INT32), 0, LEFT_BORDER_DISTANCE |CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_RIGHT_BORDER_DISTANCE), RES_BOX, CPPU_E2T(CPPUTYPE_INT32), 0, RIGHT_BORDER_DISTANCE |CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_TOP_BORDER_DISTANCE), RES_BOX, CPPU_E2T(CPPUTYPE_INT32), 0, TOP_BORDER_DISTANCE |CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_BOTTOM_BORDER_DISTANCE), RES_BOX, CPPU_E2T(CPPUTYPE_INT32), 0, BOTTOM_BORDER_DISTANCE|CONVERT_TWIPS },
{ SW_PROP_NMID(UNO_NAME_VERT_ORIENT), RES_VERT_ORIENT, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE ,MID_VERTORIENT_ORIENT },
{ SW_PROP_NMID(UNO_NAME_CHART_ROW_AS_LABEL), FN_UNO_RANGE_ROW_LABEL, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::MAYBEVOID, 0},
{ SW_PROP_NMID(UNO_NAME_CHART_COLUMN_AS_LABEL), FN_UNO_RANGE_COL_LABEL, CPPU_E2T(CPPUTYPE_BOOLEAN) , PropertyAttribute::MAYBEVOID, 0},
@@ -1010,9 +984,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_FILE_LINK), WID_SECT_LINK , CPPU_E2T(CPPUTYPE_SECTFILELNK), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_IS_VISIBLE), WID_SECT_VISIBLE , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_IS_PROTECTED), WID_SECT_PROTECTED, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
- // --> FME 2004-06-22 #114856# edit in readonly sections
{ SW_PROP_NMID(UNO_NAME_EDIT_IN_READONLY), WID_SECT_EDIT_IN_READONLY, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
- // <--
{ SW_PROP_NMID(UNO_NAME_LINK_REGION), WID_SECT_REGION , CPPU_E2T(CPPUTYPE_OUSTRING) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_TEXT_COLUMNS), RES_COL, CPPU_E2T(CPPUTYPE_REFTEXTCOL), PROPERTY_NONE, MID_COLUMNS},
{ SW_PROP_NMID(UNO_NAME_BACK_GRAPHIC_URL), RES_BACKGROUND, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE ,MID_GRAPHIC_URL },
@@ -1044,10 +1016,8 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
_REDLINE_NODE_PROPERTIES
{ SW_PROP_NMID(UNO_NAME_IS_CURRENTLY_VISIBLE), WID_SECT_CURRENTLY_VISIBLE, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_WRITING_MODE), RES_FRAMEDIR, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, 0 },
- /* -> #109700# */
{ SW_PROP_NMID(UNO_NAME_SECT_LEFT_MARGIN), RES_LR_SPACE, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_L_MARGIN|CONVERT_TWIPS}, \
{ SW_PROP_NMID(UNO_NAME_SECT_RIGHT_MARGIN), RES_LR_SPACE, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_R_MARGIN|CONVERT_TWIPS}, \
- /* <- #1097001# */
{0,0,0,0,0,0}
};
aMapEntriesArr[nPropertyId] = aSectionPropertyMap_Impl;
@@ -1060,7 +1030,6 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_SEARCH_ALL), WID_SEARCH_ALL, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_SEARCH_BACKWARDS), WID_BACKWARDS, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_SEARCH_CASE_SENSITIVE), WID_CASE_SENSITIVE, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
- // { SW_PROP_NMID(UNO_NAME_SEARCH_IN_SELECTION), WID_IN_SELECTION, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_SEARCH_REGULAR_EXPRESSION), WID_REGULAR_EXPRESSION, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_SEARCH_SIMILARITY), WID_SIMILARITY, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_SEARCH_SIMILARITY_ADD), WID_SIMILARITY_ADD, CPPU_E2T(CPPUTYPE_INT16) , PROPERTY_NONE, 0},
@@ -1084,7 +1053,6 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_CHAIN_PREV_NAME), RES_CHAIN, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID ,MID_CHAIN_PREVNAME},
/*not impl*/ { SW_PROP_NMID(UNO_NAME_CLIENT_MAP), RES_URL, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE ,MID_URL_CLIENTMAP },
{ SW_PROP_NMID(UNO_NAME_EDIT_IN_READONLY), RES_EDIT_IN_READONLY, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
- // { SW_PROP_NMID(UNO_NAME_GRAPHIC), RES_BACKGROUND, &, PROPERTY_NONE, MID_GRAPHIC
{ SW_PROP_NMID(UNO_NAME_TEXT_COLUMNS), RES_COL, CPPU_E2T(CPPUTYPE_REFTEXTCOL), PROPERTY_NONE, MID_COLUMNS},
//next elements are part of the service description
{ SW_PROP_NMID(UNO_NAME_FRAME_HEIGHT_ABSOLUTE), RES_FRM_SIZE, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, MID_FRMSIZE_HEIGHT|CONVERT_TWIPS },
@@ -1115,7 +1083,6 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_GRAPHIC_FILTER), FN_UNO_GRAPHIC_FILTER, CPPU_E2T(CPPUTYPE_OUSTRING), 0, 0 },
{ SW_PROP_NMID(UNO_NAME_GRAPHIC), FN_UNO_GRAPHIC, CPPU_E2T(CPPUTYPE_REFXGRAPHIC), 0, 0 },
{ SW_PROP_NMID(UNO_NAME_ACTUAL_SIZE), FN_UNO_ACTUAL_SIZE, CPPU_E2T(CPPUTYPE_AWTSIZE), PropertyAttribute::READONLY, CONVERT_TWIPS},
-// { SW_PROP_NMID(UNO_NAME_ALTERNATIVE_TEXT), FN_UNO_ALTERNATIVE_TEXT,CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE , 0 },
{ SW_PROP_NMID(UNO_NAME_CONTOUR_POLY_POLYGON), FN_PARAM_COUNTOUR_PP, CPPU_E2T(CPPUTYPE_PNTSEQSEQ), PropertyAttribute::MAYBEVOID, 0 },
{ SW_PROP_NMID(UNO_NAME_IS_PIXEL_CONTOUR), FN_UNO_IS_PIXEL_CONTOUR, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0 },
{ SW_PROP_NMID(UNO_NAME_IS_AUTOMATIC_CONTOUR), FN_UNO_IS_AUTOMATIC_CONTOUR , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0 },
@@ -1151,7 +1118,6 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_GRAPHIC), FN_UNO_REPLACEMENT_GRAPHIC, CPPU_E2T(CPPUTYPE_REFXGRAPHIC), PropertyAttribute::MAYBEVOID, 0 },
{ SW_PROP_NMID(UNO_NAME_COMPONENT),FN_UNO_COMPONENT, CPPU_E2T(CPPUTYPE_REFCOMPONENT), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_EMBEDDED_OBJECT),FN_EMBEDDED_OBJECT, CPPU_E2T(CPPUTPYE_REFEMBEDDEDOBJECT), PropertyAttribute::READONLY, 0},
-// { SW_PROP_NMID(UNO_NAME_ALTERNATIVE_TEXT), FN_UNO_ALTERNATIVE_TEXT,CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE , 0 },
{0,0,0,0,0,0}
};
aMapEntriesArr[nPropertyId] = aEmbeddedPropertyMap_Impl;
@@ -1182,11 +1148,11 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_TEXT_RANGE), FN_TEXT_RANGE, CPPU_E2T(CPPUTYPE_REFTXTRANGE), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_OPAQUE), RES_OPAQUE, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_ANCHOR_POSITION), FN_ANCHOR_POSITION, CPPU_E2T(CPPUTYPE_AWTPOINT), PropertyAttribute::READONLY, 0},
- // OD 2004-05-04 #i26791#
+ // #i26791#
{ SW_PROP_NMID(UNO_NAME_IS_FOLLOWING_TEXT_FLOW), RES_FOLLOW_TEXT_FLOW, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
- // --> OD 2004-06-29 #i28701#
+ // #i28701#
{ SW_PROP_NMID(UNO_NAME_WRAP_INFLUENCE_ON_POSITION), RES_WRAP_INFLUENCE_ON_OBJPOS, CPPU_E2T(CPPUTYPE_INT8), PROPERTY_NONE, MID_WRAP_INFLUENCE},
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
{ SW_PROP_NMID( UNO_NAME_TRANSFORMATION_IN_HORI_L2R),
FN_SHAPE_TRANSFORMATION_IN_HORI_L2R,
CPPU_E2T(CPPUTYPE_TRANSFORMATIONINHORIL2R),
@@ -1195,8 +1161,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
FN_SHAPE_POSITION_LAYOUT_DIR,
CPPU_E2T(CPPUTYPE_INT16),
PROPERTY_NONE, 0},
- // <--
- // --> OD 2004-10-28 #i36248#
+ // #i36248#
{ SW_PROP_NMID( UNO_NAME_STARTPOSITION_IN_HORI_L2R),
FN_SHAPE_STARTPOSITION_IN_HORI_L2R,
CPPU_E2T(CPPUTYPE_AWTPOINT),
@@ -1205,11 +1170,9 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
FN_SHAPE_ENDPOSITION_IN_HORI_L2R,
CPPU_E2T(CPPUTYPE_AWTPOINT),
PropertyAttribute::READONLY, 0},
- // <--
- // --> OD 2006-11-09 #i71182#
+ // #i71182#
// missing map entry for property <PageToogle>
{ SW_PROP_NMID(UNO_NAME_PAGE_TOGGLE), RES_HORI_ORIENT, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE ,MID_HORIORIENT_PAGETOGGLE },
- // <--
{0,0,0,0,0,0}
};
aMapEntriesArr[nPropertyId] = aShapeMap_Impl;
@@ -1272,7 +1235,6 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_USE_DASH), WID_USE_DASH , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_USE_UPPER_CASE), WID_USE_UPPER_CASE , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_LEVEL_FORMAT), WID_LEVEL_FORMAT , CPPU_E2T(CPPUTYPE_REFIDXREPL) , PROPERTY_NONE, 0},
- // { SW_PROP_NMID(UNO_NAME_??? ), WID_??? , &_getReflection , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_MAIN_ENTRY_CHARACTER_STYLE_NAME), WID_MAIN_ENTRY_CHARACTER_STYLE_NAME , CPPU_E2T(CPPUTYPE_OUSTRING) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_TEXT_COLUMNS), RES_COL, CPPU_E2T(CPPUTYPE_REFTEXTCOL), PROPERTY_NONE, MID_COLUMNS},
{ SW_PROP_NMID(UNO_NAME_BACK_GRAPHIC_URL), RES_BACKGROUND, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE ,MID_GRAPHIC_URL },
@@ -1303,14 +1265,11 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_LEVEL), WID_LEVEL , CPPU_E2T(CPPUTYPE_INT16) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_CREATE_FROM_MARKS), WID_CREATE_FROM_MARKS , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_CREATE_FROM_OUTLINE), WID_CREATE_FROM_OUTLINE , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
- // { SW_PROP_NMID(UNO_NAME_PARAGRAPH_STYLE_NAMES), WID_PARAGRAPH_STYLE_NAMES , CPPU_E2T(CPPUTYPE_REFIDXREPL) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_CREATE_FROM_CHAPTER), WID_CREATE_FROM_CHAPTER , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_IS_PROTECTED), WID_PROTECTED , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_LEVEL_FORMAT), WID_LEVEL_FORMAT , CPPU_E2T(CPPUTYPE_REFIDXREPL) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_LEVEL_PARAGRAPH_STYLES), WID_LEVEL_PARAGRAPH_STYLES , CPPU_E2T(CPPUTYPE_REFIDXREPL) , PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_CREATE_FROM_LEVEL_PARAGRAPH_STYLES), WID_CREATE_FROM_PARAGRAPH_STYLES, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
- // { SW_PROP_NMID(UNO_NAME_RECALC_TAB_STOPS), WID_RECALC_TAB_STOPS , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
- // { SW_PROP_NMID(UNO_NAME_??? ), WID_??? , &_getReflection , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_TEXT_COLUMNS), RES_COL, CPPU_E2T(CPPUTYPE_REFTEXTCOL), PROPERTY_NONE, MID_COLUMNS},
{ SW_PROP_NMID(UNO_NAME_BACK_GRAPHIC_URL), RES_BACKGROUND, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE ,MID_GRAPHIC_URL },
{ SW_PROP_NMID(UNO_NAME_BACK_GRAPHIC_FILTER), RES_BACKGROUND, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE ,MID_GRAPHIC_FILTER },
@@ -1341,7 +1300,6 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{
_BASE_INDEX_PROPERTIES_
{ SW_PROP_NMID(UNO_NAME_CREATE_FROM_MARKS), WID_CREATE_FROM_MARKS , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
- // { SW_PROP_NMID(UNO_NAME_PARAGRAPH_STYLE_NAMES), WID_PARAGRAPH_STYLE_NAMES , CPPU_E2T(CPPUTYPE_REFIDXREPL) , PROPERTY_NONE,0},
{ SW_PROP_NMID(UNO_NAME_CREATE_FROM_CHAPTER), WID_CREATE_FROM_CHAPTER , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_IS_PROTECTED), WID_PROTECTED , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_USE_LEVEL_FROM_SOURCE), WID_USE_LEVEL_FROM_SOURCE , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0},
@@ -1471,8 +1429,6 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_SIZE_TYPE), RES_FRM_SIZE, CPPU_E2T(CPPUTYPE_INT16) , PROPERTY_NONE, MID_FRMSIZE_SIZE_TYPE },
{ SW_PROP_NMID(UNO_NAME_WIDTH_TYPE), RES_FRM_SIZE, CPPU_E2T(CPPUTYPE_INT16) , PROPERTY_NONE, MID_FRMSIZE_WIDTH_TYPE },
{ SW_PROP_NMID(UNO_NAME_IS_SPLIT_ALLOWED), RES_ROW_SPLIT, CPPU_E2T(CPPUTYPE_BOOLEAN) , PropertyAttribute::MAYBEVOID, 0},
- // { SW_PROP_NMID(UNO_NAME_HEIGHT), RES_FRM_SIZE, CPPU_E2T(CPPUTYPE_INT32) , PROPERTY_NONE, MID_FRMSIZE_HEIGHT|CONVERT_TWIPS },
- // { SW_PROP_NMID(UNO_NAME_SHADOW_FORMAT), RES_SHADOW, CPPU_E2T(CPPUTYPE_SHADOWFMT), PROPERTY_NONE, CONVERT_TWIPS},
{0,0,0,0,0,0}
};
@@ -1494,17 +1450,6 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_BACK_GRAPHIC_LOCATION), RES_BACKGROUND, CPPU_E2T(CPPUTYPE_GRAPHICLOC), PROPERTY_NONE ,MID_GRAPHIC_POSITION},
{ SW_PROP_NMID(UNO_NAME_NUMBER_FORMAT), RES_BOXATR_FORMAT, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID ,0 },
{ SW_PROP_NMID(UNO_NAME_BACK_TRANSPARENT), RES_BACKGROUND, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE , MID_GRAPHIC_TRANSPARENT },
- // commented ones are already part of
- // COMMON_CRSR_PARA_PROPERTIES_WITHOUT_FN_01:
-// { SW_PROP_NMID(UNO_NAME_LEFT_BORDER), RES_BOX, CPPU_E2T(CPPUTYPE_BORDERLINE), 0, LEFT_BORDER |CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_RIGHT_BORDER), RES_BOX, CPPU_E2T(CPPUTYPE_BORDERLINE), 0, RIGHT_BORDER |CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_TOP_BORDER), RES_BOX, CPPU_E2T(CPPUTYPE_BORDERLINE), 0, TOP_BORDER |CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_BOTTOM_BORDER), RES_BOX, CPPU_E2T(CPPUTYPE_BORDERLINE), 0, BOTTOM_BORDER|CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_BORDER_DISTANCE), RES_BOX, CPPU_E2T(CPPUTYPE_INT32), 0, BORDER_DISTANCE|CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_LEFT_BORDER_DISTANCE), RES_BOX, CPPU_E2T(CPPUTYPE_INT32), 0, LEFT_BORDER_DISTANCE |CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_RIGHT_BORDER_DISTANCE), RES_BOX, CPPU_E2T(CPPUTYPE_INT32), 0, RIGHT_BORDER_DISTANCE |CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_TOP_BORDER_DISTANCE), RES_BOX, CPPU_E2T(CPPUTYPE_INT32), 0, TOP_BORDER_DISTANCE |CONVERT_TWIPS },
-// { SW_PROP_NMID(UNO_NAME_BOTTOM_BORDER_DISTANCE), RES_BOX, CPPU_E2T(CPPUTYPE_INT32), 0, BOTTOM_BORDER_DISTANCE|CONVERT_TWIPS },
{ SW_PROP_NMID(UNO_NAME_USER_DEFINED_ATTRIBUTES), RES_UNKNOWNATR_CONTAINER, CPPU_E2T(CPPUTYPE_REFNAMECNT), PropertyAttribute::MAYBEVOID, 0 },
{ SW_PROP_NMID(UNO_NAME_TEXT_SECTION), FN_UNO_TEXT_SECTION, CPPU_E2T(CPPUTYPE_REFTEXTSECTION), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 },
{ SW_PROP_NMID(UNO_NAME_IS_PROTECTED), RES_PROTECT, CPPU_E2T(CPPUTYPE_BOOLEAN), 0, MID_PROTECT_CONTENT},
@@ -1581,11 +1526,13 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_CHAR_LOCALE), RES_CHRATR_LANGUAGE , CPPU_E2T(CPPUTYPE_LOCALE), PropertyAttribute::MAYBEVOID, MID_LANG_LOCALE },
{ SW_PROP_NMID(UNO_NAME_CHARACTER_COUNT), WID_DOC_CHAR_COUNT, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_DIALOG_LIBRARIES), WID_DOC_DIALOG_LIBRARIES, CPPU_E2T(CPPUTYPE_REFLIBCONTAINER), PropertyAttribute::READONLY, 0},
+ { SW_PROP_NMID(UNO_NAME_VBA_DOCOBJ), WID_DOC_VBA_DOCOBJ, CPPU_E2T(CPPUTYPE_PROPERTYVALUE), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_INDEX_AUTO_MARK_FILE_U_R_L), WID_DOC_AUTO_MARK_URL, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_PARAGRAPH_COUNT), WID_DOC_PARA_COUNT, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_RECORD_CHANGES), WID_DOC_CHANGES_RECORD, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_SHOW_CHANGES), WID_DOC_CHANGES_SHOW, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_WORD_COUNT), WID_DOC_WORD_COUNT, CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::READONLY, 0},
+ { SW_PROP_NMID(UNO_NAME_IS_TEMPLATE), WID_DOC_ISTEMPLATEID, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_WORD_SEPARATOR), WID_DOC_WORD_SEPARATOR, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_HIDE_FIELD_TIPS), WID_DOC_HIDE_TIPS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_REDLINE_DISPLAY_TYPE), WID_DOC_REDLINE_DISPLAY, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, 0},
@@ -1598,9 +1545,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_LOCK_UPDATES), WID_DOC_LOCK_UPDATES, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_HAS_VALID_SIGNATURES), WID_DOC_HAS_VALID_SIGNATURES, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_BUILDID), WID_DOC_BUILDID, CPPU_E2T(CPPUTYPE_OUSTRING), 0, 0},
- // --> OD 2006-03-21 #b6375613#
{ SW_PROP_NMID(UNO_NAME_APPLY_WORKAROUND_FOR_B6375613), WID_APPLY_WORKAROUND_FOR_B6375613, CPPU_E2T(CPPUTYPE_BOOLEAN), 0, 0},
- // <--
{0,0,0,0,0,0}
};
aMapEntriesArr[nPropertyId] = aDocMap_Impl;
@@ -1695,9 +1640,8 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
COMMON_HYPERLINK_PROPERTIES
{ SW_PROP_NMID(UNO_NAME_CHAR_STYLE_NAME), RES_TXTATR_CHARFMT, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID, 0},
{ SW_PROP_NMID(UNO_NAME_IS_SPLIT_ALLOWED), RES_ROW_SPLIT, CPPU_E2T(CPPUTYPE_BOOLEAN) , PropertyAttribute::MAYBEVOID, 0},
- // --> collapsing borders DVO, FME 2005-05-27 #i29550#
+ // #i29550#
{ SW_PROP_NMID(UNO_NAME_COLLAPSING_BORDERS), RES_COLLAPSING_BORDERS, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
- // <-- collapsing
//text grid enhancement for better CJK support. 2007-04-01
//just export the default page mode property, other properties are not handled in this version
@@ -2492,7 +2436,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
break;
default:
- DBG_ERROR( "unexpected property map ID" );
+ OSL_FAIL( "unexpected property map ID" );
}
//fill the character pointers and types into the arrays
SfxItemPropertyMapEntry* p = aMapEntriesArr[nPropertyId];
@@ -2511,9 +2455,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
}
return aMapEntriesArr[nPropertyId];
}
-/*-- 17.02.2009 15:29:58---------------------------------------------------
- -----------------------------------------------------------------------*/
const SfxItemPropertySet* SwUnoPropertyMapProvider::GetPropertySet( sal_uInt16 nPropertyId)
{
if( !aPropertySetArr[nPropertyId] )
@@ -3108,17 +3050,10 @@ const SfxItemPropertySet* SwUnoPropertyMapProvider::GetPropertySet( sal_uInt16
return aPropertySetArr[nPropertyId];
}
-/* -----------------04.07.98 11:42-------------------
- *
- * --------------------------------------------------*/
sal_Bool SwItemPropertySet::FillItem(SfxItemSet& /*rSet*/, sal_uInt16 /*nWhich*/, sal_Bool /*bGetProperty*/) const
{
sal_Bool bRet = sal_False;
-/* if(nWhich == SID_ATTR_PAGE_PAPERBIN)
- {
- rSet.Put(SvxPaperBinItem(SID_ATTR_PAGE_PAPERBIN, 0));
- bRet = sal_True;
- }*/
return bRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index d09f195e4dc4..23998469c2b8 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -106,7 +107,7 @@
#include <unoidx.hxx>
#include <unoframe.hxx>
#include <fmthdft.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <fmtflcnt.hxx>
#define _SVSTDARR_USHORTS
@@ -129,7 +130,6 @@ using namespace ::com::sun::star;
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
-
/****************************************************************************
static methods
****************************************************************************/
@@ -141,17 +141,15 @@ uno::Sequence< sal_Int8 > CreateUnoTunnelId()
rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
return aSeq;
}
+
/****************************************************************************
Hilfsklassen
****************************************************************************/
-
-/* -----------------13.05.98 12:15-------------------
- *
- * --------------------------------------------------*/
SwUnoInternalPaM::SwUnoInternalPaM(SwDoc& rDoc) :
SwPaM(rDoc.GetNodes())
{
}
+
SwUnoInternalPaM::~SwUnoInternalPaM()
{
while( GetNext() != this)
@@ -181,9 +179,6 @@ SwUnoInternalPaM& SwUnoInternalPaM::operator=(const SwPaM& rPaM)
return *this;
}
-/*-----------------09.03.98 08:29-------------------
-
---------------------------------------------------*/
void SwUnoCursorHelper::SelectPam(SwPaM & rPam, const bool bExpand)
{
if (bExpand)
@@ -199,9 +194,6 @@ void SwUnoCursorHelper::SelectPam(SwPaM & rPam, const bool bExpand)
}
}
-/* -----------------20.05.98 14:59-------------------
- *
- * --------------------------------------------------*/
void SwUnoCursorHelper::GetTextFromPam(SwPaM & rPam, OUString & rBuffer)
{
if (!rPam.HasMark())
@@ -267,9 +259,6 @@ void SwUnoCursorHelper::GetTextFromPam(SwPaM & rPam, OUString & rBuffer)
}
}
-/* -----------------06.07.98 07:33-------------------
- *
- * --------------------------------------------------*/
static void
lcl_setCharStyle(SwDoc *const pDoc, const uno::Any & rValue, SfxItemSet & rSet)
throw (lang::IllegalArgumentException)
@@ -295,9 +284,7 @@ throw (lang::IllegalArgumentException)
rSet.Put(aFmt);
}
};
-/* -----------------08.06.06 10:43-------------------
- *
- * --------------------------------------------------*/
+
static void
lcl_setAutoStyle(IStyleAccess & rStyleAccess, const uno::Any & rValue,
SfxItemSet & rSet, const bool bPara)
@@ -324,9 +311,7 @@ throw (lang::IllegalArgumentException)
throw lang::IllegalArgumentException();
}
};
-/* -----------------30.06.98 08:46-------------------
- *
- * --------------------------------------------------*/
+
void
SwUnoCursorHelper::SetTxtFmtColl(const uno::Any & rAny, SwPaM & rPaM)
throw (lang::IllegalArgumentException)
@@ -358,9 +343,6 @@ throw (lang::IllegalArgumentException)
pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
-/* -----------------06.07.98 07:38-------------------
- *
- * --------------------------------------------------*/
bool
SwUnoCursorHelper::SetPageDesc(
const uno::Any& rValue, SwDoc & rDoc, SfxItemSet & rSet)
@@ -412,9 +394,6 @@ SwUnoCursorHelper::SetPageDesc(
return true;
}
-/* -----------------30.06.98 10:29-------------------
- *
- * --------------------------------------------------*/
static void
lcl_SetNodeNumStart(SwPaM & rCrsr, uno::Any const& rValue)
{
@@ -545,9 +524,6 @@ lcl_setRubyCharstyle(SfxItemSet & rItemSet, uno::Any const& rValue)
rItemSet.Put(*pRuby);
}
-/* -----------------17.09.98 09:44-------------------
- *
- * --------------------------------------------------*/
bool
SwUnoCursorHelper::SetCursorPropertyValue(
SfxItemPropertySimpleEntry const& rEntry, const uno::Any& rValue,
@@ -593,11 +569,7 @@ throw (lang::IllegalArgumentException)
{
// multi selection is not considered
SwTxtNode *const pTxtNd = rPam.GetNode()->GetTxtNode();
- // --> OD 2008-05-14 #refactorlists# - check on list style not needed
-// const SwNumRule* pRule = pTxtNd->GetNumRule();
-// if( FN_UNO_NUM_LEVEL == rEntry.nWID && pRule != NULL )
if (FN_UNO_NUM_LEVEL == rEntry.nWID)
- // <--
{
sal_Int16 nLevel = 0;
if (rValue >>= nLevel)
@@ -685,9 +657,6 @@ throw (lang::IllegalArgumentException)
return bRet;
}
-/* -----------------30.06.98 08:39-------------------
- *
- * --------------------------------------------------*/
SwFmtColl *
SwUnoCursorHelper::GetCurTxtFmtColl(SwPaM & rPaM, const bool bConditional)
{
@@ -734,7 +703,7 @@ SwUnoCursorHelper::GetCurTxtFmtColl(SwPaM & rPaM, const bool bConditional)
return (bError) ? 0 : pFmt;
}
-/* -----------------26.06.98 16:20-------------------
+/* --------------------------------------------------
* Hilfsfunktion fuer PageDesc
* --------------------------------------------------*/
SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName)
@@ -772,7 +741,6 @@ SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName)
/******************************************************************
* SwXTextCursor
******************************************************************/
-
class SwXTextCursor::Impl
: public SwClient
{
@@ -845,7 +813,6 @@ void SwXTextCursor::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
-
SwUnoCrsr const* SwXTextCursor::GetCursor() const
{
return m_pImpl->GetCursor();
@@ -856,9 +823,6 @@ SwUnoCrsr * SwXTextCursor::GetCursor()
return m_pImpl->GetCursor();
}
-/*-- 09.12.98 14:19:01---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwPaM const* SwXTextCursor::GetPaM() const
{
return m_pImpl->GetCursor();
@@ -869,25 +833,16 @@ SwPaM * SwXTextCursor::GetPaM()
return m_pImpl->GetCursor();
}
-/*-- 09.12.98 14:19:02---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwDoc const* SwXTextCursor::GetDoc() const
{
return m_pImpl->GetCursor() ? m_pImpl->GetCursor()->GetDoc() : 0;
}
-/* -----------------22.07.99 13:52-------------------
- --------------------------------------------------*/
SwDoc * SwXTextCursor::GetDoc()
{
return m_pImpl->GetCursor() ? m_pImpl->GetCursor()->GetDoc() : 0;
}
-
-/*-- 09.12.98 14:19:19---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextCursor::SwXTextCursor(
SwDoc & rDoc,
uno::Reference< text::XText > const& xParent,
@@ -899,9 +854,6 @@ SwXTextCursor::SwXTextCursor(
{
}
-/* -----------------04.03.99 09:02-------------------
- *
- * --------------------------------------------------*/
SwXTextCursor::SwXTextCursor(uno::Reference< text::XText > const& xParent,
SwPaM const& rSourceCursor, const enum CursorType eType)
: m_pImpl( new SwXTextCursor::Impl(*this, *rSourceCursor.GetDoc(), eType,
@@ -910,16 +862,10 @@ SwXTextCursor::SwXTextCursor(uno::Reference< text::XText > const& xParent,
{
}
-/*-- 09.12.98 14:19:20---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextCursor::~SwXTextCursor()
{
}
-/*-- 09.12.98 14:19:18---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXTextCursor::DeleteAndInsert(const ::rtl::OUString& rText,
const bool bForceExpandHints)
{
@@ -956,7 +902,6 @@ void SwXTextCursor::DeleteAndInsert(const ::rtl::OUString& rText,
}
}
-
enum ForceIntoMetaMode { META_CHECK_BOTH, META_INIT_START, META_INIT_END };
static sal_Bool
@@ -966,14 +911,14 @@ lcl_ForceIntoMeta(SwPaM & rCursor,
{
sal_Bool bRet( sal_True ); // means not forced in META_CHECK_BOTH
SwXMeta const * const pXMeta( dynamic_cast<SwXMeta*>(xParentText.get()) );
- ASSERT(pXMeta, "no parent?");
+ OSL_ENSURE(pXMeta, "no parent?");
if (!pXMeta)
throw uno::RuntimeException();
SwTxtNode * pTxtNode;
xub_StrLen nStart;
xub_StrLen nEnd;
const bool bSuccess( pXMeta->SetContentRange(pTxtNode, nStart, nEnd) );
- ASSERT(bSuccess, "no pam?");
+ OSL_ENSURE(bSuccess, "no pam?");
if (!bSuccess)
throw uno::RuntimeException();
// force the cursor back into the meta if it has moved outside
@@ -1010,7 +955,7 @@ bool SwXTextCursor::IsAtEndOfMeta() const
SwUnoCrsr const * const pCursor( m_pImpl->GetCursor() );
SwXMeta const*const pXMeta(
dynamic_cast<SwXMeta*>(m_pImpl->m_xParentText.get()) );
- ASSERT(pXMeta, "no meta?");
+ OSL_ENSURE(pXMeta, "no meta?");
if (pCursor && pXMeta)
{
SwTxtNode * pTxtNode;
@@ -1018,7 +963,7 @@ bool SwXTextCursor::IsAtEndOfMeta() const
xub_StrLen nEnd;
const bool bSuccess(
pXMeta->SetContentRange(pTxtNode, nStart, nEnd) );
- ASSERT(bSuccess, "no pam?");
+ OSL_ENSURE(bSuccess, "no pam?");
if (bSuccess)
{
const SwPosition end(*pTxtNode, nEnd);
@@ -1033,17 +978,11 @@ bool SwXTextCursor::IsAtEndOfMeta() const
return false;
}
-/*-- 09.12.98 14:19:19---------------------------------------------------
-
- -----------------------------------------------------------------------*/
OUString SwXTextCursor::getImplementationName() throw (uno::RuntimeException)
{
return C2U("SwXTextCursor");
}
-/*-- 09.12.98 14:19:19---------------------------------------------------
-
- -----------------------------------------------------------------------*/
static char const*const g_ServicesTextCursor[] =
{
"com.sun.star.text.TextCursor",
@@ -1055,8 +994,9 @@ static char const*const g_ServicesTextCursor[] =
"com.sun.star.style.ParagraphPropertiesComplex",
"com.sun.star.text.TextSortable",
};
+
static const size_t g_nServicesTextCursor(
- sizeof(g_ServicesTextCursor)/sizeof(g_ServicesTextCursor[0]));
+ SAL_N_ELEMENTS(g_ServicesTextCursor));
sal_Bool SAL_CALL SwXTextCursor::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
@@ -1072,17 +1012,12 @@ SwXTextCursor::getSupportedServiceNames() throw (uno::RuntimeException)
g_nServicesTextCursor, g_ServicesTextCursor);
}
-/* -----------------------------10.03.00 18:02--------------------------------
-
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXTextCursor::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL
SwXTextCursor::getSomething(const uno::Sequence< sal_Int8 >& rId)
throw (uno::RuntimeException)
@@ -1091,12 +1026,9 @@ throw (uno::RuntimeException)
return (nRet) ? nRet : OTextCursorHelper::getSomething(rId);
}
-/*-- 09.12.98 14:18:12---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL SwXTextCursor::collapseToStart() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1109,12 +1041,10 @@ void SAL_CALL SwXTextCursor::collapseToStart() throw (uno::RuntimeException)
rUnoCursor.DeleteMark();
}
}
-/*-- 09.12.98 14:18:14---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXTextCursor::collapseToEnd() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1127,12 +1057,10 @@ void SAL_CALL SwXTextCursor::collapseToEnd() throw (uno::RuntimeException)
rUnoCursor.DeleteMark();
}
}
-/*-- 09.12.98 14:18:41---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL SwXTextCursor::isCollapsed() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_True;
SwUnoCrsr *const pUnoCrsr = m_pImpl->GetCursor();
@@ -1143,14 +1071,11 @@ sal_Bool SAL_CALL SwXTextCursor::isCollapsed() throw (uno::RuntimeException)
return bRet;
}
-/*-- 09.12.98 14:18:42---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::goLeft(sal_Int16 nCount, sal_Bool Expand)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1164,14 +1089,12 @@ throw (uno::RuntimeException)
}
return bRet;
}
-/*-- 09.12.98 14:18:42---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::goRight(sal_Int16 nCount, sal_Bool Expand)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1186,13 +1109,10 @@ throw (uno::RuntimeException)
return bRet;
}
-/*-- 09.12.98 14:18:43---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXTextCursor::gotoStart(sal_Bool Expand) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1244,13 +1164,11 @@ SwXTextCursor::gotoStart(sal_Bool Expand) throw (uno::RuntimeException)
lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText, META_INIT_START);
}
}
-/*-- 09.12.98 14:18:43---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXTextCursor::gotoEnd(sal_Bool Expand) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1279,7 +1197,7 @@ SwXTextCursor::gotoRange(
const uno::Reference< text::XTextRange > & xRange, sal_Bool bExpand)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!xRange.is())
{
@@ -1401,12 +1319,9 @@ throw (uno::RuntimeException)
}
}
-/*-- 09.12.98 14:18:44---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL SwXTextCursor::isStartOfWord() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1414,12 +1329,10 @@ sal_Bool SAL_CALL SwXTextCursor::isStartOfWord() throw (uno::RuntimeException)
rUnoCursor.IsStartWordWT( i18n::WordType::DICTIONARY_WORD );
return bRet;
}
-/*-- 09.12.98 14:18:44---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL SwXTextCursor::isEndOfWord() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1428,13 +1341,10 @@ sal_Bool SAL_CALL SwXTextCursor::isEndOfWord() throw (uno::RuntimeException)
return bRet;
}
-/*-- 09.12.98 14:18:44---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::gotoNextWord(sal_Bool Expand) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1478,13 +1388,10 @@ SwXTextCursor::gotoNextWord(sal_Bool Expand) throw (uno::RuntimeException)
return bRet;
}
-/*-- 09.12.98 14:18:45---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::gotoPreviousWord(sal_Bool Expand) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1521,13 +1428,10 @@ SwXTextCursor::gotoPreviousWord(sal_Bool Expand) throw (uno::RuntimeException)
return bRet;
}
-/*-- 09.12.98 14:18:45---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::gotoEndOfWord(sal_Bool Expand) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1559,13 +1463,11 @@ SwXTextCursor::gotoEndOfWord(sal_Bool Expand) throw (uno::RuntimeException)
return bRet;
}
-/*-- 09.12.98 14:18:46---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::gotoStartOfWord(sal_Bool Expand) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1598,13 +1500,10 @@ SwXTextCursor::gotoStartOfWord(sal_Bool Expand) throw (uno::RuntimeException)
return bRet;
}
-/*-- 09.12.98 14:18:46---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::isStartOfSentence() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1623,13 +1522,11 @@ SwXTextCursor::isStartOfSentence() throw (uno::RuntimeException)
}
return bRet;
}
-/*-- 09.12.98 14:18:47---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::isEndOfSentence() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1650,13 +1547,10 @@ SwXTextCursor::isEndOfSentence() throw (uno::RuntimeException)
return bRet;
}
-/*-- 09.12.98 14:18:47---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::gotoNextSentence(sal_Bool Expand) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1687,14 +1581,12 @@ SwXTextCursor::gotoNextSentence(sal_Bool Expand) throw (uno::RuntimeException)
}
return bRet;
}
-/*-- 09.12.98 14:18:47---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::gotoPreviousSentence(sal_Bool Expand)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1719,14 +1611,11 @@ throw (uno::RuntimeException)
return bRet;
}
-/* -----------------15.10.99 08:24-------------------
-
- --------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::gotoStartOfSentence(sal_Bool Expand)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1746,13 +1635,11 @@ throw (uno::RuntimeException)
}
return bRet;
}
-/* -----------------15.10.99 08:24-------------------
- --------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::gotoEndOfSentence(sal_Bool Expand) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1774,26 +1661,21 @@ SwXTextCursor::gotoEndOfSentence(sal_Bool Expand) throw (uno::RuntimeException)
return bRet;
}
-/*-- 09.12.98 14:18:48---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::isStartOfParagraph() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
const sal_Bool bRet = SwUnoCursorHelper::IsStartOfPara(rUnoCursor);
return bRet;
}
-/*-- 09.12.98 14:18:48---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::isEndOfParagraph() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1801,14 +1683,11 @@ SwXTextCursor::isEndOfParagraph() throw (uno::RuntimeException)
return bRet;
}
-/*-- 09.12.98 14:18:49---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::gotoStartOfParagraph(sal_Bool Expand)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1829,13 +1708,11 @@ throw (uno::RuntimeException)
DBG_ASSERT( bRet, "gotoStartOfParagraph failed" );
return bRet;
}
-/*-- 09.12.98 14:18:49---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::gotoEndOfParagraph(sal_Bool Expand) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1857,13 +1734,10 @@ SwXTextCursor::gotoEndOfParagraph(sal_Bool Expand) throw (uno::RuntimeException)
return bRet;
}
-/*-- 09.12.98 14:18:50---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::gotoNextParagraph(sal_Bool Expand) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1875,14 +1749,12 @@ SwXTextCursor::gotoNextParagraph(sal_Bool Expand) throw (uno::RuntimeException)
const sal_Bool bRet = rUnoCursor.MovePara(fnParaNext, fnParaStart);
return bRet;
}
-/*-- 09.12.98 14:18:50---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXTextCursor::gotoPreviousParagraph(sal_Bool Expand)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1895,24 +1767,18 @@ throw (uno::RuntimeException)
return bRet;
}
-/*-- 09.12.98 14:18:50---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XText > SAL_CALL
SwXTextCursor::getText() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->m_xParentText;
}
-/*-- 09.12.98 14:18:50---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SAL_CALL
SwXTextCursor::getStart() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1934,13 +1800,11 @@ SwXTextCursor::getStart() throw (uno::RuntimeException)
}
return xRet;
}
-/*-- 09.12.98 14:18:51---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SAL_CALL
SwXTextCursor::getEnd() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1963,12 +1827,9 @@ SwXTextCursor::getEnd() throw (uno::RuntimeException)
return xRet;
}
-/*-- 09.12.98 14:18:51---------------------------------------------------
-
- -----------------------------------------------------------------------*/
OUString SAL_CALL SwXTextCursor::getString() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -1976,13 +1837,11 @@ OUString SAL_CALL SwXTextCursor::getString() throw (uno::RuntimeException)
SwUnoCursorHelper::GetTextFromPam(rUnoCursor, aTxt);
return aTxt;
}
-/*-- 09.12.98 14:18:52---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXTextCursor::setString(const OUString& aString) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
(void) rUnoCursor; // just to check if valid
@@ -1994,9 +1853,6 @@ SwXTextCursor::setString(const OUString& aString) throw (uno::RuntimeException)
DeleteAndInsert(aString, bForceExpandHints);
}
-/* -----------------------------03.05.00 12:56--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Any SwUnoCursorHelper::GetPropertyValue(
SwPaM& rPaM, const SfxItemPropertySet& rPropSet,
const OUString& rPropertyName)
@@ -2032,9 +1888,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
return aAny;
}
-/* -----------------------------03.05.00 12:57--------------------------------
- ---------------------------------------------------------------------------*/
void SwUnoCursorHelper::SetPropertyValue(
SwPaM& rPaM, const SfxItemPropertySet& rPropSet,
const OUString& rPropertyName,
@@ -2074,9 +1928,6 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
SwUnoCursorHelper::SetCrsrAttr(rPaM, aItemSet, nAttrMode, bTableMode);
}
-/* -----------------------------03.05.00 13:16--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Sequence< beans::PropertyState >
SwUnoCursorHelper::GetPropertyStates(
SwPaM& rPaM, const SfxItemPropertySet& rPropSet,
@@ -2190,9 +2041,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
}
return aRet;
}
-/* -----------------------------03.05.00 13:17--------------------------------
- ---------------------------------------------------------------------------*/
beans::PropertyState SwUnoCursorHelper::GetPropertyState(
SwPaM& rPaM, const SfxItemPropertySet& rPropSet,
const OUString& rPropertyName)
@@ -2205,9 +2054,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY );
return aSeq[0];
}
-/* -----------------------------03.05.00 13:20--------------------------------
- ---------------------------------------------------------------------------*/
static void
lcl_SelectParaAndReset( SwPaM &rPaM, SwDoc & rDoc,
SvUShortsSort const*const pWhichIds = 0 )
@@ -2230,7 +2077,6 @@ lcl_SelectParaAndReset( SwPaM &rPaM, SwDoc & rDoc,
rDoc.ResetAttrs(*pTemp, sal_True, pWhichIds);
}
-
void SwUnoCursorHelper::SetPropertyToDefault(
SwPaM& rPaM, const SfxItemPropertySet& rPropSet,
const OUString& rPropertyName)
@@ -2272,9 +2118,6 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
}
}
-/* -----------------------------03.05.00 13:19--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Any SwUnoCursorHelper::GetPropertyDefault(
SwPaM& rPaM, const SfxItemPropertySet& rPropSet,
const OUString& rPropertyName)
@@ -2301,13 +2144,10 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
return aRet;
}
-/*-- 09.12.98 14:18:54---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SAL_CALL
SwXTextCursor::getPropertySetInfo() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
static uno::Reference< beans::XPropertySetInfo > xRef;
if(!xRef.is())
@@ -2329,9 +2169,6 @@ SwXTextCursor::getPropertySetInfo() throw (uno::RuntimeException)
return xRef;
}
-/*-- 09.12.98 14:18:54---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXTextCursor::setPropertyValue(
const OUString& rPropertyName, const uno::Any& rValue)
@@ -2339,7 +2176,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -2369,15 +2206,12 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
}
-/*-- 09.12.98 14:18:55---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXTextCursor::getPropertyValue(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -2401,9 +2235,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
return aAny;
}
-/*-- 09.12.98 14:18:55---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXTextCursor::addPropertyChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -2415,9 +2246,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
"SwXTextCursor::addPropertyChangeListener(): not implemented");
}
-/*-- 09.12.98 14:18:57---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXTextCursor::removePropertyChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -2429,9 +2257,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
"SwXTextCursor::removePropertyChangeListener(): not implemented");
}
-/*-- 09.12.98 14:18:57---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXTextCursor::addVetoableChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -2443,9 +2268,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
"SwXTextCursor::addVetoableChangeListener(): not implemented");
}
-/*-- 09.12.98 14:18:58---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXTextCursor::removeVetoableChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -2457,14 +2279,11 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
"SwXTextCursor::removeVetoableChangeListener(): not implemented");
}
-/*-- 05.03.99 11:36:11---------------------------------------------------
-
- -----------------------------------------------------------------------*/
beans::PropertyState SAL_CALL
SwXTextCursor::getPropertyState(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -2472,15 +2291,13 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
rUnoCursor, m_pImpl->m_rPropSet, rPropertyName);
return eRet;
}
-/*-- 05.03.99 11:36:11---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyState > SAL_CALL
SwXTextCursor::getPropertyStates(
const uno::Sequence< OUString >& rPropertyNames)
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -2488,9 +2305,6 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
rUnoCursor, m_pImpl->m_rPropSet, rPropertyNames);
}
-/*-- 05.03.99 11:36:12---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXTextCursor::setPropertyToDefault(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, uno::RuntimeException)
@@ -2499,9 +2313,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
uno::Sequence < OUString > aSequence ( &rPropertyName, 1 );
setPropertiesToDefault ( aSequence );
}
-/*-- 05.03.99 11:36:12---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXTextCursor::getPropertyDefault(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
@@ -2516,9 +2328,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
static sal_uInt16 g_ParaResetableSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
- // --> OD 2008-02-25 #refactorlists#
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
- // <--
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
@@ -2551,7 +2361,7 @@ void SAL_CALL
SwXTextCursor::setAllPropertiesToDefault()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -2575,7 +2385,7 @@ SwXTextCursor::setPropertiesToDefault(
const uno::Sequence< OUString >& rPropertyNames)
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -2647,7 +2457,7 @@ SwXTextCursor::getPropertyDefaults(
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -2687,40 +2497,31 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
return aRet;
}
-/*-- 10.03.2008 09:58:47---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXTextCursor::makeRedline(
const ::rtl::OUString& rRedlineType,
const uno::Sequence< beans::PropertyValue >& rRedlineProperties)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
SwUnoCursorHelper::makeRedline(rUnoCursor, rRedlineType, rRedlineProperties);
}
-/*-- 09.12.98 14:18:58---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL SwXTextCursor::insertDocumentFromURL(const OUString& rURL,
const uno::Sequence< beans::PropertyValue >& rOptions)
throw (lang::IllegalArgumentException, io::IOException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
SwUnoCursorHelper::InsertFile(&rUnoCursor, rURL, rOptions);
}
-/* -----------------------------15.12.00 14:01--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Sequence< beans::PropertyValue >
SwUnoCursorHelper::CreateSortDescriptor(const bool bFromTable)
{
@@ -2792,20 +2593,14 @@ SwUnoCursorHelper::CreateSortDescriptor(const bool bFromTable)
return aRet;
}
-/*-- 09.12.98 14:18:58---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyValue > SAL_CALL
SwXTextCursor::createSortDescriptor() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return SwUnoCursorHelper::CreateSortDescriptor(false);
}
-/* -----------------------------15.12.00 14:06--------------------------------
-
- ---------------------------------------------------------------------------*/
sal_Bool SwUnoCursorHelper::ConvertSortProperties(
const uno::Sequence< beans::PropertyValue >& rDescriptor,
SwSortOptions& rSortOpt)
@@ -2843,7 +2638,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
const OUString& rPropName = pProperties[n].Name;
// old and new sortdescriptor
- if (rPropName.equalsAscii("IsSortInTable"))
+ if (rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsSortInTable")))
{
if (aValue.getValueType() == ::getBooleanCppuType())
{
@@ -2854,7 +2649,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
bRet = sal_False;
}
}
- else if (rPropName.equalsAscii("Delimiter"))
+ else if (rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Delimiter")))
{
sal_Unicode uChar = sal_Unicode();
if (aValue >>= uChar)
@@ -2867,7 +2662,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
}
}
// old sortdescriptor
- else if (rPropName.equalsAscii("SortColumns"))
+ else if (rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SortColumns")))
{
bOldSortdescriptor = sal_True;
sal_Bool bTemp(sal_False);
@@ -2880,7 +2675,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
bRet = sal_False;
}
}
- else if ( rPropName.equalsAscii("IsCaseSensitive"))
+ else if ( rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsCaseSensitive")))
{
bOldSortdescriptor = sal_True;
sal_Bool bTemp(sal_False);
@@ -2893,7 +2688,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
bRet = sal_False;
}
}
- else if (rPropName.equalsAscii("CollatorLocale"))
+ else if (rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CollatorLocale")))
{
bOldSortdescriptor = sal_True;
lang::Locale aLocale;
@@ -2981,7 +2776,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
}
}
// new sortdescriptor
- else if (rPropName.equalsAscii("IsSortColumns"))
+ else if (rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsSortColumns")))
{
bNewSortdescriptor = sal_True;
if (aValue.getValueType() == ::getBooleanCppuType())
@@ -2994,7 +2789,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
bRet = sal_False;
}
}
- else if (rPropName.equalsAscii("SortFields"))
+ else if (rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SortFields")))
{
bNewSortdescriptor = sal_True;
uno::Sequence < table::TableSortField > aFields;
@@ -3053,14 +2848,11 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
return bRet && rSortOpt.aKeys.Count() > 0;
}
-/*-- 09.12.98 14:19:00---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXTextCursor::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -3100,16 +2892,13 @@ throw (uno::RuntimeException)
}
}
-/* -----------------------------03.04.00 09:11--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Reference< container::XEnumeration > SAL_CALL
SwXTextCursor::createContentEnumeration(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
- if (!rServiceName.equalsAscii("com.sun.star.text.TextContent"))
+ if (!rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextContent")))
{
throw uno::RuntimeException();
}
@@ -3121,13 +2910,10 @@ throw (uno::RuntimeException)
return xRet;
}
-/* -----------------------------07.03.01 14:53--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Reference< container::XEnumeration > SAL_CALL
SwXTextCursor::createEnumeration() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
@@ -3165,36 +2951,26 @@ SwXTextCursor::createEnumeration() throw (uno::RuntimeException)
return xRet;
}
-/* -----------------------------07.03.01 15:43--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Type SAL_CALL
SwXTextCursor::getElementType() throw (uno::RuntimeException)
{
return text::XTextRange::static_type();
}
-/* -----------------------------07.03.01 15:43--------------------------------
-
- ---------------------------------------------------------------------------*/
sal_Bool SAL_CALL SwXTextCursor::hasElements() throw (uno::RuntimeException)
{
return sal_True;
}
-/* -----------------------------03.04.00 09:11--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SAL_CALL
SwXTextCursor::getAvailableServiceNames() throw (uno::RuntimeException)
{
uno::Sequence< OUString > aRet(1);
OUString* pArray = aRet.getArray();
- pArray[0] = OUString::createFromAscii("com.sun.star.text.TextContent");
+ pArray[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextContent"));
return aRet;
}
-// ---------------------------------------------------------------------------
IMPLEMENT_FORWARD_REFCOUNT( SwXTextCursor,SwXTextCursor_Base )
uno::Any SAL_CALL
@@ -3206,3 +2982,4 @@ throw (uno::RuntimeException)
: SwXTextCursor_Base::queryInterface(rType);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 3990355937d4..54324b24e74a 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,7 +106,7 @@
#include <unoidx.hxx>
#include <unoframe.hxx>
#include <fmthdft.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <fmtflcnt.hxx>
#define _SVSTDARR_USHORTS
@@ -131,7 +132,6 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
-
namespace sw {
sal_Bool SupportsServiceImpl(
@@ -155,14 +155,13 @@ GetSupportedServiceNamesImpl(
uno::Sequence< ::rtl::OUString > ret(nServices);
for (size_t i = 0; i < nServices; ++i)
{
- ret[i] = C2U(pServices[i]);
+ ret[i] = rtl::OUString::createFromAscii(pServices[i]);
}
return ret;
}
} // namespace sw
-
namespace sw {
void DeepCopyPaM(SwPaM const & rSource, SwPaM & rTarget)
@@ -189,7 +188,7 @@ void DeepCopyPaM(SwPaM const & rSource, SwPaM & rTarget)
struct FrameDependSortListLess
{
bool operator() (FrameDependSortListEntry const& r1,
- FrameDependSortListEntry const& r2)
+ FrameDependSortListEntry const& r2) const
{
return (r1.nIndex < r2.nIndex)
|| ((r1.nIndex == r2.nIndex) && (r1.nOrder < r2.nOrder));
@@ -280,9 +279,6 @@ UnoActionContext::UnoActionContext(SwDoc *const pDoc)
}
}
-/*-----------------04.03.98 11:56-------------------
-
---------------------------------------------------*/
UnoActionContext::~UnoActionContext()
{
// Doc may already have been removed here
@@ -309,9 +305,6 @@ UnoActionRemoveContext::UnoActionRemoveContext(SwDoc *const pDoc)
}
}
-/* -----------------07.07.98 12:05-------------------
- *
- * --------------------------------------------------*/
UnoActionRemoveContext::~UnoActionRemoveContext()
{
SwRootFrm *const pRootFrm = m_pDoc->GetRootFrm();
@@ -321,10 +314,6 @@ UnoActionRemoveContext::~UnoActionRemoveContext()
}
}
-
-/*-- 10.12.98 11:52:15---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew)
{
switch( pOld ? pOld->Which() : 0 )
@@ -344,10 +333,6 @@ void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
-
-/*-- 09.12.98 14:19:03---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam,
const SfxItemSet& rSet,
const SetAttrMode nAttrMode, const bool bTableMode)
@@ -391,9 +376,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam,
}
//<-end,zhaojianwei
}
-/*-- 09.12.98 14:19:04---------------------------------------------------
- -----------------------------------------------------------------------*/
// --> OD 2006-07-12 #i63870#
// split third parameter <bCurrentAttrOnly> into new parameters <bOnlyTxtAttr>
// and <bGetFromChrFmt> to get better control about resulting <SfxItemSet>
@@ -466,7 +449,6 @@ void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam,
/******************************************************************
* SwXParagraphEnumeration
******************************************************************/
-
class SwXParagraphEnumeration::Impl
: public SwClient
{
@@ -546,9 +528,6 @@ void SwXParagraphEnumeration::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
ClientModify(this, pOld, pNew);
}
-/*-- 10.12.98 11:52:12---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXParagraphEnumeration::SwXParagraphEnumeration(
uno::Reference< text::XText > const& xParent,
::std::auto_ptr<SwUnoCrsr> pCursor,
@@ -558,30 +537,24 @@ SwXParagraphEnumeration::SwXParagraphEnumeration(
pStartNode, pTable) )
{
}
-/*-- 10.12.98 11:52:12---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXParagraphEnumeration::~SwXParagraphEnumeration()
{
}
-/* -----------------------------06.04.00 16:33--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SAL_CALL
SwXParagraphEnumeration::getImplementationName() throw (uno::RuntimeException)
{
return C2U("SwXParagraphEnumeration");
}
-/* -----------------------------06.04.00 16:33--------------------------------
- ---------------------------------------------------------------------------*/
static char const*const g_ServicesParagraphEnum[] =
{
"com.sun.star.text.ParagraphEnumeration",
};
+
static const size_t g_nServicesParagraphEnum(
- sizeof(g_ServicesParagraphEnum)/sizeof(g_ServicesParagraphEnum[0]));
+ SAL_N_ELEMENTS(g_ServicesParagraphEnum));
sal_Bool SAL_CALL
SwXParagraphEnumeration::supportsService(const OUString& rServiceName)
@@ -590,9 +563,7 @@ throw (uno::RuntimeException)
return ::sw::SupportsServiceImpl(
g_nServicesParagraphEnum, g_ServicesParagraphEnum, rServiceName);
}
-/* -----------------------------06.04.00 16:33--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SAL_CALL
SwXParagraphEnumeration::getSupportedServiceNames()
throw (uno::RuntimeException)
@@ -601,19 +572,13 @@ throw (uno::RuntimeException)
g_nServicesParagraphEnum, g_ServicesParagraphEnum);
}
-/*-- 10.12.98 11:52:13---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXParagraphEnumeration::hasMoreElements() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return (m_pImpl->m_bFirstParagraph) ? sal_True : m_pImpl->m_xNextPara.is();
}
-/*-- 14.08.03 13:10:14---------------------------------------------------
-
- -----------------------------------------------------------------------*/
//!! compare to SwShellTableCrsr::FillRects() in viscrs.cxx
static SwTableNode *
@@ -632,7 +597,6 @@ lcl_FindTopLevelTable(
return pLast;
}
-
static bool
lcl_CursorIsInSection(
SwUnoCrsr const*const pUnoCrsr, SwStartNode const*const pOwnStartNode)
@@ -650,7 +614,6 @@ lcl_CursorIsInSection(
return bRes;
}
-
uno::Reference< text::XTextContent >
SwXParagraphEnumeration::Impl::NextElement_Impl()
throw (container::NoSuchElementException, lang::WrappedTargetException,
@@ -754,14 +717,12 @@ throw (container::NoSuchElementException, lang::WrappedTargetException,
return xRef;
}
-/*-- 10.12.98 11:52:14---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL SwXParagraphEnumeration::nextElement()
throw (container::NoSuchElementException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (m_pImpl->m_bFirstParagraph)
{
@@ -783,7 +744,6 @@ throw (container::NoSuchElementException, lang::WrappedTargetException,
/******************************************************************
* SwXTextRange
******************************************************************/
-
class SwXTextRange::Impl
: public SwClient
{
@@ -859,7 +819,6 @@ void SwXTextRange::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
-
SwXTextRange::SwXTextRange(SwPaM& rPam,
const uno::Reference< text::XText > & xParent,
const enum RangePosition eRange)
@@ -894,7 +853,6 @@ SwDoc * SwXTextRange::GetDoc()
return & m_pImpl->m_rDoc;
}
-
void SwXTextRange::Invalidate()
{
m_pImpl->Invalidate();
@@ -960,7 +918,7 @@ throw (uno::RuntimeException)
OUString SAL_CALL
SwXTextRange::getImplementationName() throw (uno::RuntimeException)
{
- return OUString::createFromAscii("SwXTextRange");
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("SwXTextRange"));
}
static char const*const g_ServicesTextRange[] =
@@ -973,8 +931,9 @@ static char const*const g_ServicesTextRange[] =
"com.sun.star.style.ParagraphPropertiesAsian",
"com.sun.star.style.ParagraphPropertiesComplex",
};
+
static const size_t g_nServicesTextRange(
- sizeof(g_ServicesTextRange)/sizeof(g_ServicesTextRange[0]));
+ SAL_N_ELEMENTS(g_ServicesTextRange));
sal_Bool SAL_CALL SwXTextRange::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
@@ -993,7 +952,7 @@ SwXTextRange::getSupportedServiceNames() throw (uno::RuntimeException)
uno::Reference< text::XText > SAL_CALL
SwXTextRange::getText() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!m_pImpl->m_xParentText.is())
{
@@ -1016,7 +975,7 @@ SwXTextRange::getText() throw (uno::RuntimeException)
uno::Reference< text::XTextRange > SAL_CALL
SwXTextRange::getStart() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > xRet;
::sw::mark::IMark const * const pBkmk = m_pImpl->GetBookmark();
@@ -1044,7 +1003,7 @@ SwXTextRange::getStart() throw (uno::RuntimeException)
uno::Reference< text::XTextRange > SAL_CALL
SwXTextRange::getEnd() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > xRet;
::sw::mark::IMark const * const pBkmk = m_pImpl->GetBookmark();
@@ -1071,7 +1030,7 @@ SwXTextRange::getEnd() throw (uno::RuntimeException)
OUString SAL_CALL SwXTextRange::getString() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
OUString sRet;
// for tables there is no bookmark, thus also no text
@@ -1087,7 +1046,7 @@ OUString SAL_CALL SwXTextRange::getString() throw (uno::RuntimeException)
void SAL_CALL SwXTextRange::setString(const OUString& rString)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
DeleteAndInsert(rString, false);
}
@@ -1348,9 +1307,9 @@ uno::Reference< container::XEnumeration > SAL_CALL
SwXTextRange::createContentEnumeration(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
- if (!rServiceName.equalsAscii("com.sun.star.text.TextContent"))
+ if (!rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextContent")))
{
throw uno::RuntimeException();
}
@@ -1375,7 +1334,7 @@ throw (uno::RuntimeException)
uno::Reference< container::XEnumeration > SAL_CALL
SwXTextRange::createEnumeration() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!GetDoc() || !m_pImpl->GetBookmark())
{
@@ -1415,14 +1374,14 @@ SwXTextRange::getAvailableServiceNames() throw (uno::RuntimeException)
{
uno::Sequence< OUString > aRet(1);
OUString* pArray = aRet.getArray();
- pArray[0] = OUString::createFromAscii("com.sun.star.text.TextContent");
+ pArray[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextContent"));
return aRet;
}
uno::Reference< beans::XPropertySetInfo > SAL_CALL
SwXTextRange::getPropertySetInfo() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Reference< beans::XPropertySetInfo > xRef =
m_pImpl->m_rPropSet.getPropertySetInfo();
@@ -1436,7 +1395,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!GetDoc() || !m_pImpl->GetBookmark())
{
@@ -1453,7 +1412,7 @@ SwXTextRange::getPropertyValue(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!GetDoc() || !m_pImpl->GetBookmark())
{
@@ -1513,7 +1472,7 @@ beans::PropertyState SAL_CALL
SwXTextRange::getPropertyState(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!GetDoc() || !m_pImpl->GetBookmark())
{
@@ -1529,7 +1488,7 @@ uno::Sequence< beans::PropertyState > SAL_CALL
SwXTextRange::getPropertyStates(const uno::Sequence< OUString >& rPropertyName)
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!GetDoc() || !m_pImpl->GetBookmark())
{
@@ -1544,7 +1503,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
void SAL_CALL SwXTextRange::setPropertyToDefault(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!GetDoc() || !m_pImpl->GetBookmark())
{
@@ -1561,7 +1520,7 @@ SwXTextRange::getPropertyDefault(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!GetDoc() || !m_pImpl->GetBookmark())
{
@@ -1579,7 +1538,7 @@ SwXTextRange::makeRedline(
const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!GetDoc() || !m_pImpl->GetBookmark())
{
@@ -1593,7 +1552,6 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
/******************************************************************
* SwXTextRanges
******************************************************************/
-
class SwXTextRanges::Impl
: public SwClient
{
@@ -1631,17 +1589,11 @@ public:
};
-/*-- 10.12.98 13:57:02---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXTextRanges::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
}
-/* -----------------10.12.98 14:25-------------------
- *
- * --------------------------------------------------*/
void SwXTextRanges::Impl::MakeRanges()
{
SwUnoCrsr *const pCursor = GetCursor();
@@ -1668,32 +1620,21 @@ const SwUnoCrsr* SwXTextRanges::GetCursor() const
return m_pImpl->GetCursor();
}
-/*-- 10.12.98 13:57:22---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextRanges::SwXTextRanges(SwPaM *const pPaM)
: m_pImpl( new SwXTextRanges::Impl(pPaM) )
{
}
-/*-- 10.12.98 13:57:22---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextRanges::~SwXTextRanges()
{
}
-/* -----------------------------13.03.00 12:15--------------------------------
-
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXTextRanges::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL
SwXTextRanges::getSomething(const uno::Sequence< sal_Int8 >& rId)
throw (uno::RuntimeException)
@@ -1707,23 +1648,19 @@ throw (uno::RuntimeException)
* danach wird ein Array mit uno::Reference< XTextPosition > angelegt
*
****************************************************************************/
-/* -----------------------------06.04.00 16:36--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SAL_CALL
SwXTextRanges::getImplementationName() throw (uno::RuntimeException)
{
return C2U("SwXTextRanges");
}
-/* -----------------------------06.04.00 16:36--------------------------------
- ---------------------------------------------------------------------------*/
static char const*const g_ServicesTextRanges[] =
{
"com.sun.star.text.TextRanges",
};
+
static const size_t g_nServicesTextRanges(
- sizeof(g_ServicesTextRanges)/sizeof(g_ServicesTextRanges[0]));
+ SAL_N_ELEMENTS(g_ServicesTextRanges));
sal_Bool SAL_CALL SwXTextRanges::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
@@ -1732,9 +1669,6 @@ throw (uno::RuntimeException)
g_nServicesTextRanges, g_ServicesTextRanges, rServiceName);
}
-/* -----------------------------06.04.00 16:36--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SAL_CALL
SwXTextRanges::getSupportedServiceNames() throw (uno::RuntimeException)
{
@@ -1742,23 +1676,18 @@ SwXTextRanges::getSupportedServiceNames() throw (uno::RuntimeException)
g_nServicesTextRanges, g_ServicesTextRanges);
}
-/*-- 10.12.98 13:57:24---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Int32 SAL_CALL SwXTextRanges::getCount() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return static_cast<sal_Int32>(m_pImpl->m_Ranges.size());
}
-/*-- 10.12.98 13:57:25---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL SwXTextRanges::getByIndex(sal_Int32 nIndex)
throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if ((nIndex < 0) ||
(static_cast<size_t>(nIndex) >= m_pImpl->m_Ranges.size()))
@@ -1770,26 +1699,18 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
return ret;
}
-/*-- 10.12.98 13:57:25---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Type SAL_CALL
SwXTextRanges::getElementType() throw (uno::RuntimeException)
{
return text::XTextRange::static_type();
}
-/*-- 10.12.98 13:57:26---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL SwXTextRanges::hasElements() throw (uno::RuntimeException)
{
// no mutex necessary: getCount() does locking
return getCount() > 0;
}
-/* -----------------11.12.98 10:07-------------------
- *
- * --------------------------------------------------*/
void SwUnoCursorHelper::SetString(SwCursor & rCursor, const OUString& rString)
{
// Start/EndAction
@@ -1816,7 +1737,6 @@ void SwUnoCursorHelper::SetString(SwCursor & rCursor, const OUString& rString)
/******************************************************************
* SwXParaFrameEnumeration
******************************************************************/
-
class SwXParaFrameEnumeration::Impl
: public SwClient
{
@@ -1852,10 +1772,6 @@ public:
};
-/*-- 23.03.99 13:22:37---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-
struct InvalidFrameDepend {
bool operator() (::boost::shared_ptr<SwDepend> const & rEntry)
{ return !rEntry->GetRegisteredIn(); }
@@ -1879,9 +1795,6 @@ void SwXParaFrameEnumeration::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
-/* -----------------23.03.99 13:38-------------------
- *
- * --------------------------------------------------*/
static sal_Bool
lcl_CreateNextObject(SwUnoCrsr& i_rUnoCrsr,
uno::Reference<text::XTextContent> & o_rNextObject,
@@ -1946,9 +1859,6 @@ lcl_FillFrame(SwClient & rEnum, SwUnoCrsr& rUnoCrsr,
}
}
-/*-- 23.03.99 13:22:29---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXParaFrameEnumeration::SwXParaFrameEnumeration(
const SwPaM& rPaM, const enum ParaFrameMode eParaFrameMode,
SwFrmFmt *const pFmt)
@@ -2006,20 +1916,15 @@ SwXParaFrameEnumeration::SwXParaFrameEnumeration(
lcl_FillFrame(*m_pImpl.get(), *m_pImpl->GetCursor(), m_pImpl->m_Frames);
}
}
-/*-- 23.03.99 13:22:30---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXParaFrameEnumeration::~SwXParaFrameEnumeration()
{
}
-/*-- 23.03.99 13:22:32---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL
SwXParaFrameEnumeration::hasMoreElements() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!m_pImpl->GetCursor())
throw uno::RuntimeException();
@@ -2029,14 +1934,12 @@ SwXParaFrameEnumeration::hasMoreElements() throw (uno::RuntimeException)
: lcl_CreateNextObject(*m_pImpl->GetCursor(),
m_pImpl->m_xNextObject, m_pImpl->m_Frames);
}
-/*-- 23.03.99 13:22:33---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL SwXParaFrameEnumeration::nextElement()
throw (container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!m_pImpl->GetCursor())
{
@@ -2058,24 +1961,19 @@ throw (container::NoSuchElementException,
return aRet;
}
-/* -----------------------------06.04.00 16:39--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SAL_CALL
SwXParaFrameEnumeration::getImplementationName() throw (uno::RuntimeException)
{
return C2U("SwXParaFrameEnumeration");
}
-/* -----------------------------06.04.00 16:39--------------------------------
-
- ---------------------------------------------------------------------------*/
static char const*const g_ServicesParaFrameEnum[] =
{
"com.sun.star.util.ContentEnumeration",
};
+
static const size_t g_nServicesParaFrameEnum(
- sizeof(g_ServicesParaFrameEnum)/sizeof(g_ServicesParaFrameEnum[0]));
+ SAL_N_ELEMENTS(g_ServicesParaFrameEnum));
sal_Bool SAL_CALL
SwXParaFrameEnumeration::supportsService(const OUString& rServiceName)
@@ -2085,9 +1983,6 @@ throw (uno::RuntimeException)
g_nServicesParaFrameEnum, g_ServicesParaFrameEnum, rServiceName);
}
-/* -----------------------------06.04.00 16:39--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SAL_CALL
SwXParaFrameEnumeration::getSupportedServiceNames()
throw (uno::RuntimeException)
@@ -2096,3 +1991,4 @@ throw (uno::RuntimeException)
g_nServicesParaFrameEnum, g_ServicesParaFrameEnum);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index 0c26b7efc849..605f08dfbbf2 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,7 @@
#include <unocrsrhelper.hxx>
#include <doc.hxx>
#include <ndtxt.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <docsh.hxx>
@@ -60,10 +61,6 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
-
-/* -----------------------------01.12.00 18:09--------------------------------
-
- ---------------------------------------------------------------------------*/
class SwParaSelection
{
SwCursor & m_rCursor;
@@ -101,11 +98,9 @@ SwParaSelection::~SwParaSelection()
}
}
-
/******************************************************************
* forward declarations
******************************************************************/
-
beans::PropertyState lcl_SwXParagraph_getPropertyState(
const SwTxtNode& rTxtNode,
const SwAttrSet** ppSet,
@@ -116,7 +111,6 @@ beans::PropertyState lcl_SwXParagraph_getPropertyState(
/******************************************************************
* SwXParagraph
******************************************************************/
-
class SwXParagraph::Impl
: public SwClient
{
@@ -189,9 +183,6 @@ public:
};
-/*-- 11.12.98 08:12:58---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXParagraph::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -201,17 +192,11 @@ void SwXParagraph::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
-/*-- 11.12.98 08:12:47---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXParagraph::SwXParagraph()
: m_pImpl( new SwXParagraph::Impl(*this) )
{
}
-/*-- 11.12.98 08:12:47---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXParagraph::SwXParagraph(
uno::Reference< text::XText > const & xParent,
SwTxtNode & rTxtNode,
@@ -221,9 +206,6 @@ SwXParagraph::SwXParagraph(
{
}
-/*-- 11.12.98 08:12:48---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXParagraph::~SwXParagraph()
{
}
@@ -290,17 +272,12 @@ bool SwXParagraph::SelectPaM(SwPaM & rPaM)
return true;
}
-/* -----------------------------13.03.00 12:15--------------------------------
-
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXParagraph::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL
SwXParagraph::getSomething(const uno::Sequence< sal_Int8 >& rId)
throw (uno::RuntimeException)
@@ -308,17 +285,12 @@ throw (uno::RuntimeException)
return ::sw::UnoTunnelImpl<SwXParagraph>(rId, this);
}
-/* -----------------------------06.04.00 16:37--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SAL_CALL
SwXParagraph::getImplementationName() throw (uno::RuntimeException)
{
return C2U("SwXParagraph");
}
-/* -----------------------------06.04.00 16:37--------------------------------
- ---------------------------------------------------------------------------*/
static char const*const g_ServicesParagraph[] =
{
"com.sun.star.text.TextContent",
@@ -330,8 +302,9 @@ static char const*const g_ServicesParagraph[] =
"com.sun.star.style.ParagraphPropertiesAsian",
"com.sun.star.style.ParagraphPropertiesComplex",
};
+
static const size_t g_nServicesParagraph(
- sizeof(g_ServicesParagraph)/sizeof(g_ServicesParagraph[0]));
+ SAL_N_ELEMENTS(g_ServicesParagraph));
sal_Bool SAL_CALL
SwXParagraph::supportsService(const OUString& rServiceName)
@@ -340,9 +313,7 @@ throw (uno::RuntimeException)
return ::sw::SupportsServiceImpl(
g_nServicesParagraph, g_ServicesParagraph, rServiceName);
}
-/* -----------------------------06.04.00 16:37--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SAL_CALL
SwXParagraph::getSupportedServiceNames() throw (uno::RuntimeException)
{
@@ -350,9 +321,6 @@ SwXParagraph::getSupportedServiceNames() throw (uno::RuntimeException)
g_nServicesParagraph, g_ServicesParagraph);
}
-/* -----------------------------11.07.00 14:48--------------------------------
-
- ---------------------------------------------------------------------------*/
void
SwXParagraph::attachToText(SwXText & rParent, SwTxtNode & rTxtNode)
{
@@ -372,22 +340,17 @@ SwXParagraph::attachToText(SwXText & rParent, SwTxtNode & rTxtNode)
}
}
-/*-- 11.12.98 08:12:49---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SAL_CALL
SwXParagraph::getPropertySetInfo()
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
static uno::Reference< beans::XPropertySetInfo > xRef =
m_pImpl->m_rPropSet.getPropertySetInfo();
return xRef;
}
-/*-- 11.12.98 08:12:49---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXParagraph::setPropertyValue(const OUString& rPropertyName,
const uno::Any& rValue)
@@ -395,7 +358,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence<OUString> aPropertyNames(1);
aPropertyNames.getArray()[0] = rPropertyName;
uno::Sequence<uno::Any> aValues(1);
@@ -403,24 +366,19 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
m_pImpl->SetPropertyValues_Impl( aPropertyNames, aValues );
}
-/*-- 11.12.98 08:12:49---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Any
SwXParagraph::getPropertyValue(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence<OUString> aPropertyNames(1);
aPropertyNames.getArray()[0] = rPropertyName;
const uno::Sequence< uno::Any > aRet =
m_pImpl->GetPropertyValues_Impl(aPropertyNames);
return aRet.getConstArray()[0];
}
-/* -----------------------------02.04.01 11:43--------------------------------
- ---------------------------------------------------------------------------*/
void SwXParagraph::Impl::SetPropertyValues_Impl(
const uno::Sequence< OUString >& rPropertyNames,
const uno::Sequence< uno::Any >& rValues )
@@ -465,7 +423,7 @@ void SAL_CALL SwXParagraph::setPropertyValues(
throw (beans::PropertyVetoException, lang::IllegalArgumentException,
lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// workaround for bad designed API
try
@@ -482,9 +440,6 @@ throw (beans::PropertyVetoException, lang::IllegalArgumentException,
}
}
-/* -----------------------------02.04.01 11:43--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Any > SwXParagraph::Impl::GetPropertyValues_Impl(
const uno::Sequence< OUString > & rPropertyNames )
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
@@ -526,14 +481,11 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
return aValues;
}
-/* -----------------------------04.11.03 11:43--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Any > SAL_CALL
SwXParagraph::getPropertyValues(const uno::Sequence< OUString >& rPropertyNames)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< uno::Any > aValues;
// workaround for bad designed API
@@ -557,9 +509,6 @@ throw (uno::RuntimeException)
return aValues;
}
-/* -----------------------------02.04.01 11:43--------------------------------
-
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXParagraph::addPropertiesChangeListener(
const uno::Sequence< OUString >& /*aPropertyNames*/,
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
@@ -568,9 +517,7 @@ throw (uno::RuntimeException)
OSL_ENSURE(false,
"SwXParagraph::addPropertiesChangeListener(): not implemented");
}
-/* -----------------------------02.04.01 11:43--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXParagraph::removePropertiesChangeListener(
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
throw (uno::RuntimeException)
@@ -578,9 +525,7 @@ throw (uno::RuntimeException)
OSL_ENSURE(false,
"SwXParagraph::removePropertiesChangeListener(): not implemented");
}
-/* -----------------------------02.04.01 11:43--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXParagraph::firePropertiesChangeEvent(
const uno::Sequence< OUString >& /*aPropertyNames*/,
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
@@ -589,9 +534,6 @@ void SAL_CALL SwXParagraph::firePropertiesChangeEvent(
OSL_ENSURE(false,
"SwXParagraph::firePropertiesChangeEvent(): not implemented");
}
-/* -----------------------------25.09.03 11:09--------------------------------
-
- ---------------------------------------------------------------------------*/
/* disabled for #i46921# */
@@ -601,7 +543,7 @@ SwXParagraph::setPropertyValuesTolerant(
const uno::Sequence< uno::Any >& rValues )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (rPropertyNames.getLength() != rValues.getLength())
{
@@ -664,7 +606,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
catch (beans::UnknownPropertyException &)
{
// should not occur because property was searched for before
- DBG_ERROR( "unexpected exception catched" );
+ OSL_FAIL( "unexpected exception catched" );
pFailed[ nFailed++ ].Result =
beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
}
@@ -689,13 +631,12 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
return aFailed;
}
-
uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL
SwXParagraph::getPropertyValuesTolerant(
const uno::Sequence< OUString >& rPropertyNames )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
uno::Sequence< beans::GetDirectPropertyTolerantResult > aTmpRes(
m_pImpl->GetPropertyValuesTolerant_Impl( rPropertyNames, false ) );
@@ -713,25 +654,23 @@ throw (uno::RuntimeException)
return aRes;
}
-
uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL
SwXParagraph::getDirectPropertyValuesTolerant(
const uno::Sequence< OUString >& rPropertyNames )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return m_pImpl->GetPropertyValuesTolerant_Impl( rPropertyNames, true );
}
-
uno::Sequence< beans::GetDirectPropertyTolerantResult >
SwXParagraph::Impl::GetPropertyValuesTolerant_Impl(
const uno::Sequence< OUString >& rPropertyNames,
bool bDirectValuesOnly )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
SwTxtNode & rTxtNode(GetTxtNodeOrThrow());
@@ -820,7 +759,7 @@ throw (uno::RuntimeException)
catch (beans::UnknownPropertyException &)
{
// should not occur because property was searched for before
- DBG_ERROR( "unexpected exception caught" );
+ OSL_FAIL( "unexpected exception caught" );
rResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
}
catch (lang::IllegalArgumentException &)
@@ -843,9 +782,6 @@ throw (uno::RuntimeException)
return aResult;
}
-/* -----------------------------12.09.00 11:09--------------------------------
-
- ---------------------------------------------------------------------------*/
bool ::sw::GetDefaultTextContentValue(
uno::Any& rAny, const OUString& rPropertyName, sal_uInt16 nWID)
{
@@ -877,9 +813,7 @@ bool ::sw::GetDefaultTextContentValue(
}
return sal_True;
}
-/*-- 11.12.98 08:12:50---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXParagraph::addPropertyChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -891,9 +825,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
"SwXParagraph::addPropertyChangeListener(): not implemented");
}
-/*-- 11.12.98 08:12:50---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXParagraph::removePropertyChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -905,9 +836,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
"SwXParagraph::removePropertyChangeListener(): not implemented");
}
-/*-- 11.12.98 08:12:50---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXParagraph::addVetoableChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -919,9 +847,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
"SwXParagraph::addVetoableChangeListener(): not implemented");
}
-/*-- 11.12.98 08:12:51---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXParagraph::removeVetoableChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -933,7 +858,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
"SwXParagraph::removeVetoableChangeListener(): not implemented");
}
-//-----------------------------------------------------------------------------
beans::PropertyState lcl_SwXParagraph_getPropertyState(
// SwUnoCrsr& rUnoCrsr,
const SwTxtNode& rTxtNode,
@@ -993,14 +917,11 @@ throw (beans::UnknownPropertyException)
return eRet;
}
-/*-- 05.03.99 11:37:30---------------------------------------------------
-
- -----------------------------------------------------------------------*/
beans::PropertyState SAL_CALL
SwXParagraph::getPropertyState(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
@@ -1019,16 +940,13 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
lcl_SwXParagraph_getPropertyState(rTxtNode, &pSet, *pEntry, bDummy);
return eRet;
}
-/*-- 05.03.99 11:37:32---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyState > SAL_CALL
SwXParagraph::getPropertyStates(
const uno::Sequence< OUString >& PropertyNames)
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
@@ -1066,14 +984,11 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
return aRet;
}
-/*-- 05.03.99 11:37:33---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXParagraph::setPropertyToDefault(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
@@ -1143,15 +1058,12 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
}
}
-/*-- 05.03.99 11:37:33---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXParagraph::getPropertyDefault(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
@@ -1181,27 +1093,21 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
return aRet;
}
-/*-- 11.12.98 08:12:51---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXParagraph::attach(const uno::Reference< text::XTextRange > & /*xTextRange*/)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// SwXParagraph will only created in order to be inserted by
// 'insertTextContentBefore' or 'insertTextContentAfter' therefore
// they cannot be attached
throw uno::RuntimeException();
}
-/*-- 11.12.98 08:12:51---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SAL_CALL
SwXParagraph::getAnchor() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
@@ -1214,12 +1120,9 @@ SwXParagraph::getAnchor() throw (uno::RuntimeException)
return xRet;
}
-/*-- 11.12.98 08:12:52---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL SwXParagraph::dispose() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTxtNode *const pTxtNode( m_pImpl->GetTxtNode() );
if (pTxtNode)
@@ -1234,14 +1137,11 @@ void SAL_CALL SwXParagraph::dispose() throw (uno::RuntimeException)
}
}
-/*-- 11.12.98 08:12:52---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL SwXParagraph::addEventListener(
const uno::Reference< lang::XEventListener > & xListener)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->GetTxtNode())
{
@@ -1249,14 +1149,12 @@ throw (uno::RuntimeException)
}
m_pImpl->m_ListenerContainer.AddListener(xListener);
}
-/*-- 11.12.98 08:12:53---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXParagraph::removeEventListener(
const uno::Reference< lang::XEventListener > & xListener)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->GetTxtNode() ||
!m_pImpl->m_ListenerContainer.RemoveListener(xListener))
@@ -1265,13 +1163,10 @@ throw (uno::RuntimeException)
}
}
-/*-- 11.12.98 08:12:53---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< container::XEnumeration > SAL_CALL
SwXParagraph::createEnumeration() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
@@ -1283,40 +1178,29 @@ SwXParagraph::createEnumeration() throw (uno::RuntimeException)
return xRef;
}
-/*-- 11.12.98 08:12:54---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Type SAL_CALL SwXParagraph::getElementType() throw (uno::RuntimeException)
{
return text::XTextRange::static_type();
}
-/*-- 11.12.98 08:12:54---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SAL_CALL SwXParagraph::hasElements() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return (GetTxtNode()) ? sal_True : sal_False;
}
-/*-- 11.12.98 08:12:55---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XText > SAL_CALL
SwXParagraph::getText() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->m_xParentText;
}
-/*-- 11.12.98 08:12:55---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SAL_CALL
SwXParagraph::getStart() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
@@ -1329,13 +1213,11 @@ SwXParagraph::getStart() throw (uno::RuntimeException)
new SwXTextRange(aPam, xParent);
return xRet;
}
-/*-- 11.12.98 08:12:56---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SAL_CALL
SwXParagraph::getEnd() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTxtNode & rTxtNode(m_pImpl->GetTxtNodeOrThrow());
@@ -1349,12 +1231,9 @@ SwXParagraph::getEnd() throw (uno::RuntimeException)
return xRet;
}
-/*-- 11.12.98 08:12:56---------------------------------------------------
-
- -----------------------------------------------------------------------*/
OUString SAL_CALL SwXParagraph::getString() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
OUString aRet;
SwTxtNode const*const pTxtNode( GetTxtNode() );
if (pTxtNode)
@@ -1374,13 +1253,11 @@ OUString SAL_CALL SwXParagraph::getString() throw (uno::RuntimeException)
}
return aRet;
}
-/*-- 11.12.98 08:12:57---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXParagraph::setString(const OUString& aString)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTxtNode const*const pTxtNode( GetTxtNode() );
if (pTxtNode)
@@ -1407,16 +1284,13 @@ throw (uno::RuntimeException)
}
}
-/* -----------------23.03.99 12:49-------------------
- *
- * --------------------------------------------------*/
uno::Reference< container::XEnumeration > SAL_CALL
SwXParagraph::createContentEnumeration(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
- if (!rServiceName.equalsAscii("com.sun.star.text.TextContent"))
+ if (!rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextContent")))
{
throw uno::RuntimeException();
}
@@ -1429,9 +1303,7 @@ throw (uno::RuntimeException)
new SwXParaFrameEnumeration(aPam, PARAFRAME_PORTION_PARAGRAPH);
return xRet;
}
-/* -----------------23.03.99 12:49-------------------
- *
- * --------------------------------------------------*/
+
uno::Sequence< OUString > SAL_CALL
SwXParagraph::getAvailableServiceNames() throw (uno::RuntimeException)
{
@@ -1441,7 +1313,6 @@ SwXParagraph::getAvailableServiceNames() throw (uno::RuntimeException)
return aRet;
}
-
// MetadatableMixin
::sfx2::Metadatable* SwXParagraph::GetCoreObject()
{
@@ -1460,3 +1331,4 @@ uno::Reference<frame::XModel> SwXParagraph::GetModel()
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index 6e68c8582d26..28bd86c51759 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <cmdid.h>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <svl/itemprop.hxx>
@@ -58,11 +59,9 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
-
/******************************************************************
* SwXTextPortion
******************************************************************/
-
static void init(SwXTextPortion & rPortion, const SwUnoCrsr* pPortionCursor)
{
SwUnoCrsr* pUnoCursor =
@@ -75,9 +74,6 @@ static void init(SwXTextPortion & rPortion, const SwUnoCrsr* pPortionCursor)
pUnoCursor->Add(& rPortion);
}
-/*-- 11.12.98 09:56:55---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextPortion::SwXTextPortion(const SwUnoCrsr* pPortionCrsr,
uno::Reference< text::XText > const& rParent,
SwTextPortionType eType)
@@ -100,9 +96,6 @@ SwXTextPortion::SwXTextPortion(const SwUnoCrsr* pPortionCrsr,
init(*this, pPortionCrsr);
}
-/* -----------------24.03.99 16:30-------------------
- *
- * --------------------------------------------------*/
SwXTextPortion::SwXTextPortion(const SwUnoCrsr* pPortionCrsr,
uno::Reference< text::XText > const& rParent,
SwFrmFmt& rFmt )
@@ -122,9 +115,6 @@ SwXTextPortion::SwXTextPortion(const SwUnoCrsr* pPortionCrsr,
init(*this, pPortionCrsr);
}
-/* -----------------------------19.02.01 10:52--------------------------------
-
- ---------------------------------------------------------------------------*/
SwXTextPortion::SwXTextPortion(const SwUnoCrsr* pPortionCrsr,
SwTxtRuby const& rAttr,
uno::Reference< text::XText > const& xParent,
@@ -154,30 +144,23 @@ SwXTextPortion::SwXTextPortion(const SwUnoCrsr* pPortionCrsr,
}
}
-/*-- 11.12.98 09:56:55---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextPortion::~SwXTextPortion()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCursor();
delete pUnoCrsr;
}
-/*-- 11.12.98 09:56:56---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XText > SwXTextPortion::getText()
throw( uno::RuntimeException )
{
return m_xParentText;
}
-/*-- 11.12.98 09:56:56---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SwXTextPortion::getStart()
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > xRet;
SwUnoCrsr* pUnoCrsr = GetCursor();
if (!pUnoCrsr)
@@ -188,13 +171,11 @@ throw( uno::RuntimeException )
xRet = new SwXTextRange(aPam, xParent);
return xRet;
}
-/*-- 11.12.98 09:56:57---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SwXTextPortion::getEnd()
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > xRet;
SwUnoCrsr* pUnoCrsr = GetCursor();
if (!pUnoCrsr)
@@ -205,13 +186,11 @@ throw( uno::RuntimeException )
xRet = new SwXTextRange(aPam, xParent);
return xRet;
}
-/*-- 11.12.98 09:56:57---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwXTextPortion::getString()
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
OUString aTxt;
SwUnoCrsr* pUnoCrsr = GetCursor();
if (!pUnoCrsr)
@@ -227,25 +206,21 @@ throw( uno::RuntimeException )
}
return aTxt;
}
-/*-- 11.12.98 09:56:57---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextPortion::setString(const OUString& aString) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCursor();
if (!pUnoCrsr)
throw uno::RuntimeException();
SwUnoCursorHelper::SetString(*pUnoCrsr, aString);
}
-/*-- 11.12.98 09:56:57---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXTextPortion::getPropertySetInfo()
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
//! PropertySetInfo for text portion extensions
static uno::Reference< beans::XPropertySetInfo >
xTxtPorExtRef = aSwMapProvider.GetPropertySet(
@@ -258,15 +233,13 @@ throw( uno::RuntimeException )
return (PORTION_REDLINE_START == m_ePortionType ||
PORTION_REDLINE_END == m_ePortionType) ? xRedlPorRef : xTxtPorExtRef;
}
-/*-- 11.12.98 09:56:57---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextPortion::setPropertyValue(const OUString& rPropertyName,
const uno::Any& aValue)
throw( beans::UnknownPropertyException,
beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCursor();
if (!pUnoCrsr)
throw uno::RuntimeException();
@@ -274,9 +247,7 @@ void SwXTextPortion::setPropertyValue(const OUString& rPropertyName,
SwUnoCursorHelper::SetPropertyValue(*pUnoCrsr, *m_pPropSet,
rPropertyName, aValue);
}
-/*-- 04.11.03 09:56:58---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextPortion::GetPropertyValue(
uno::Any &rVal,
const SfxItemPropertySimpleEntry& rEntry,
@@ -320,7 +291,7 @@ void SwXTextPortion::GetPropertyValue(
OUString sRet;
if( pRet )
- sRet = C2U( pRet );
+ sRet = rtl::OUString::createFromAscii( pRet );
rVal <<= sRet;
}
break;
@@ -430,7 +401,6 @@ void SwXTextPortion::GetPropertyValue(
}
}
-
uno::Sequence< uno::Any > SAL_CALL SwXTextPortion::GetPropertyValues_Impl(
const uno::Sequence< OUString >& rPropertyNames )
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
@@ -462,21 +432,17 @@ uno::Sequence< uno::Any > SAL_CALL SwXTextPortion::GetPropertyValues_Impl(
}
return aValues;
}
-/*-- 11.12.98 09:56:58---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXTextPortion::getPropertyValue(
const OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< ::rtl::OUString > aPropertyNames(1);
aPropertyNames.getArray()[0] = rPropertyName;
return GetPropertyValues_Impl(aPropertyNames).getConstArray()[0];
}
-/* -----------------------------02.04.01 11:44--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextPortion::SetPropertyValues_Impl(
const uno::Sequence< OUString >& rPropertyNames,
const uno::Sequence< uno::Any >& rValues )
@@ -511,7 +477,7 @@ void SwXTextPortion::setPropertyValues(
throw(beans::PropertyVetoException, lang::IllegalArgumentException,
lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// workaround for bad designed API
try
@@ -527,14 +493,12 @@ void SwXTextPortion::setPropertyValues(
throw aWExc;
}
}
-/* -----------------------------02.04.01 11:44--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Any > SwXTextPortion::getPropertyValues(
const uno::Sequence< OUString >& rPropertyNames )
throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< uno::Any > aValues;
// workaround for bad designed API
@@ -553,18 +517,14 @@ uno::Sequence< uno::Any > SwXTextPortion::getPropertyValues(
return aValues;
}
-/* -----------------------------29.09.03 11:44--------------------------------
-
- ---------------------------------------------------------------------------*/
/* disabled for #i46921# */
-
uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL SwXTextPortion::setPropertyValuesTolerant(
const uno::Sequence< OUString >& rPropertyNames,
const uno::Sequence< uno::Any >& rValues )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (rPropertyNames.getLength() != rValues.getLength())
throw lang::IllegalArgumentException();
@@ -610,7 +570,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL SwXTextPortion::setPr
catch (beans::UnknownPropertyException &)
{
// should not occur because property was searched for before
- DBG_ERROR( "unexpected exception catched" );
+ OSL_FAIL( "unexpected exception catched" );
pFailed[ nFailed++ ].Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
}
catch (lang::IllegalArgumentException &)
@@ -631,12 +591,11 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL SwXTextPortion::setPr
return aFailed;
}
-
uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL SwXTextPortion::getPropertyValuesTolerant(
const uno::Sequence< OUString >& rPropertyNames )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
uno::Sequence< beans::GetDirectPropertyTolerantResult > aTmpRes(
GetPropertyValuesTolerant_Impl( rPropertyNames, sal_False ) );
@@ -651,22 +610,20 @@ uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL SwXTextPortion::getPr
return aRes;
}
-
uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion::getDirectPropertyValuesTolerant(
const uno::Sequence< OUString >& rPropertyNames )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return GetPropertyValuesTolerant_Impl( rPropertyNames, sal_True );
}
-
uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion::GetPropertyValuesTolerant_Impl(
const uno::Sequence< OUString >& rPropertyNames,
sal_Bool bDirectValuesOnly )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = this->GetCursor();
if(!pUnoCrsr)
@@ -725,7 +682,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion:
catch (beans::UnknownPropertyException &)
{
// should not occur because property was searched for before
- DBG_ERROR( "unexpected exception catched" );
+ OSL_FAIL( "unexpected exception catched" );
aResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
}
catch (lang::IllegalArgumentException &)
@@ -755,33 +712,23 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion:
return aResult;
}
-
-/* -----------------------------02.04.01 11:44--------------------------------
-
- ---------------------------------------------------------------------------*/
void SwXTextPortion::addPropertiesChangeListener(
const uno::Sequence< OUString >& /*aPropertyNames*/,
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
throw(uno::RuntimeException)
{}
-/* -----------------------------02.04.01 11:44--------------------------------
- ---------------------------------------------------------------------------*/
void SwXTextPortion::removePropertiesChangeListener(
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
throw(uno::RuntimeException)
{}
-/* -----------------------------02.04.01 11:44--------------------------------
- ---------------------------------------------------------------------------*/
void SwXTextPortion::firePropertiesChangeEvent(
const uno::Sequence< OUString >& /*aPropertyNames*/,
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
throw(uno::RuntimeException)
{}
-/*-- 11.12.98 09:56:58---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextPortion::addPropertyChangeListener(
const OUString& /*PropertyName*/,
const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/)
@@ -789,34 +736,26 @@ void SwXTextPortion::addPropertyChangeListener(
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 09:56:58---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextPortion::removePropertyChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 09:56:58---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextPortion::addVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 09:56:59---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextPortion::removeVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 08.03.99 09:41:43---------------------------------------------------
- -----------------------------------------------------------------------*/
beans::PropertyState SwXTextPortion::getPropertyState(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
beans::PropertyState eRet = beans::PropertyState_DEFAULT_VALUE;
SwUnoCrsr* pUnoCrsr = GetCursor();
if (!pUnoCrsr)
@@ -834,14 +773,12 @@ beans::PropertyState SwXTextPortion::getPropertyState(const OUString& rPropertyN
}
return eRet;
}
-/*-- 08.03.99 09:41:47---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyState > SwXTextPortion::getPropertyStates(
const uno::Sequence< OUString >& rPropertyNames)
throw( beans::UnknownPropertyException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCursor();
if(!pUnoCrsr)
throw uno::RuntimeException();
@@ -862,13 +799,11 @@ uno::Sequence< beans::PropertyState > SwXTextPortion::getPropertyStates(
}
return aRet;
}
-/*-- 08.03.99 09:41:47---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextPortion::setPropertyToDefault(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCursor();
if (!pUnoCrsr)
throw uno::RuntimeException();
@@ -876,13 +811,11 @@ void SwXTextPortion::setPropertyToDefault(const OUString& rPropertyName)
SwUnoCursorHelper::SetPropertyToDefault(
*pUnoCrsr, *m_pPropSet, rPropertyName);
}
-/*-- 08.03.99 09:41:48---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXTextPortion::getPropertyDefault(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
SwUnoCrsr* pUnoCrsr = GetCursor();
if (!pUnoCrsr)
@@ -893,24 +826,19 @@ uno::Any SwXTextPortion::getPropertyDefault(const OUString& rPropertyName)
return aRet;
}
-/*-- 11.12.98 09:56:59---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXTextPortion::attach(const uno::Reference< text::XTextRange > & /*xTextRange*/)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// SwXTextPortion cannot be created at the factory therefore
// they cannot be attached
throw uno::RuntimeException();
}
-/*-- 11.12.98 09:57:00---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SwXTextPortion::getAnchor()
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > aRet;
SwUnoCrsr* pUnoCrsr = GetCursor();
if (!pUnoCrsr)
@@ -919,13 +847,11 @@ throw( uno::RuntimeException )
aRet = new SwXTextRange(*pUnoCrsr, m_xParentText);
return aRet;
}
-/*-- 11.12.98 09:57:00---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextPortion::dispose()
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCursor();
if (!pUnoCrsr)
throw uno::RuntimeException();
@@ -933,33 +859,27 @@ throw( uno::RuntimeException )
setString(aEmptyStr);
pUnoCrsr->Remove(this);
}
-/*-- 11.12.98 09:57:00---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextPortion::addEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!GetRegisteredIn())
throw uno::RuntimeException();
m_ListenerContainer.AddListener(aListener);
}
-/*-- 11.12.98 09:57:01---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextPortion::removeEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!GetRegisteredIn() || !m_ListenerContainer.RemoveListener(aListener))
throw uno::RuntimeException();
}
-/* -----------------24.03.99 13:30-------------------
- *
- * --------------------------------------------------*/
+
uno::Reference< container::XEnumeration > SwXTextPortion::createContentEnumeration(const OUString& /*aServiceName*/)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCursor();
if(!pUnoCrsr)
throw uno::RuntimeException();
@@ -970,17 +890,13 @@ uno::Reference< container::XEnumeration > SwXTextPortion::createContentEnumerat
return xRet;
}
-/* -----------------------------04.07.01 08:52--------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXTextPortion::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------04.07.01 08:52--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SwXTextPortion::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -992,32 +908,26 @@ sal_Int64 SwXTextPortion::getSomething( const uno::Sequence< sal_Int8 >& rId )
}
return 0;
}
-/* -----------------24.03.99 13:30-------------------
- *
- * --------------------------------------------------*/
+
uno::Sequence< OUString > SwXTextPortion::getAvailableServiceNames()
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< OUString > aRet(1);
OUString* pArray = aRet.getArray();
pArray[0] = C2U("com.sun.star.text.TextContent");
return aRet;
}
-/* -----------------25.03.99 10:30-------------------
- *
- * --------------------------------------------------*/
+
OUString SwXTextPortion::getImplementationName()
throw( uno::RuntimeException )
{
return C2U("SwXTextPortion");
}
-/* -----------------25.03.99 10:30-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwXTextPortion::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCursor();
if(!pUnoCrsr)
throw uno::RuntimeException();
@@ -1036,13 +946,11 @@ sal_Bool SwXTextPortion::supportsService(const OUString& rServiceName) throw( un
return bRet;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXTextPortion::getSupportedServiceNames()
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCursor();
if (!pUnoCrsr)
throw uno::RuntimeException();
@@ -1058,9 +966,7 @@ throw( uno::RuntimeException )
pArray[6] = C2U("com.sun.star.style.ParagraphPropertiesComplex");
return aRet;
}
-/*-- 11.12.98 09:57:01---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextPortion::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -1070,3 +976,4 @@ void SwXTextPortion::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 560fdc27a5b3..3226f6b19b42 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,7 +58,7 @@
#include <unoidx.hxx>
#include <redline.hxx>
#include <crsskip.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <set>
@@ -83,7 +84,6 @@ static void lcl_CreatePortions(
FrameDependSortList_t & i_rFrames,
const sal_Int32 i_nStartPos, const sal_Int32 i_nEndPos );
-
namespace
{
static const sal_uInt8 BKM_TYPE_START = 0;
@@ -112,7 +112,7 @@ namespace
struct BookmarkCompareStruct
{
bool operator () ( const SwXBookmarkPortion_ImplSharedPtr &r1,
- const SwXBookmarkPortion_ImplSharedPtr &r2 )
+ const SwXBookmarkPortion_ImplSharedPtr &r2 ) const
{
// #i16896# for bookmark portions at the same position, the start should
// always precede the end. Hence compare positions, and use bookmark type
@@ -193,21 +193,15 @@ namespace
}
}
-
/******************************************************************
* SwXTextPortionEnumeration
******************************************************************/
-/* -----------------------------13.03.00 12:15--------------------------------
-
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXTextPortionEnumeration::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXTextPortionEnumeration::getSomething(
const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
@@ -220,26 +214,20 @@ throw(uno::RuntimeException)
}
return 0;
}
-/* -----------------------------06.04.00 16:39--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXTextPortionEnumeration::getImplementationName()
throw( RuntimeException )
{
return C2U("SwXTextPortionEnumeration");
}
-/* -----------------------------06.04.00 16:39--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool
SwXTextPortionEnumeration::supportsService(const OUString& rServiceName)
throw( RuntimeException )
{
return C2U("com.sun.star.text.TextPortionEnumeration") == rServiceName;
}
-/* -----------------------------06.04.00 16:39--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXTextPortionEnumeration::getSupportedServiceNames()
throw( RuntimeException )
{
@@ -249,9 +237,6 @@ throw( RuntimeException )
return aRet;
}
-/*-- 27.01.99 10:44:43---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextPortionEnumeration::SwXTextPortionEnumeration(
SwPaM& rParaCrsr,
uno::Reference< XText > const & xParentText,
@@ -283,34 +268,27 @@ SwXTextPortionEnumeration::SwXTextPortionEnumeration(
pUnoCrsr->Add(this);
}
-/*-- 27.01.99 10:44:44---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextPortionEnumeration::~SwXTextPortionEnumeration()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCursor();
delete pUnoCrsr;
}
-/*-- 27.01.99 10:44:44---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextPortionEnumeration::hasMoreElements()
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return (m_Portions.size() > 0) ? sal_True : sal_False;
}
-/*-- 27.01.99 10:44:45---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXTextPortionEnumeration::nextElement()
throw( container::NoSuchElementException, lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!m_Portions.size())
throw container::NoSuchElementException();
@@ -321,8 +299,6 @@ throw( container::NoSuchElementException, lang::WrappedTargetException,
return any;
}
-//======================================================================
-
typedef ::std::deque< xub_StrLen > FieldMarks_t;
static void
@@ -353,13 +329,13 @@ lcl_ExportFieldMark(
SwDoc* pDoc = pUnoCrsr->GetDoc();
//flr: maybe its a good idea to add a special hint to the hints array and rely on the hint segmentation....
const xub_StrLen start = pUnoCrsr->Start()->nContent.GetIndex();
- ASSERT(pUnoCrsr->End()->nContent.GetIndex() == start,
+ OSL_ENSURE(pUnoCrsr->End()->nContent.GetIndex() == start,
"hmm --- why is this different");
pUnoCrsr->Right(1, CRSR_SKIP_CHARS, sal_False, sal_False);
if ( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
{
- ASSERT(false, "cannot move cursor?");
+ OSL_ENSURE(false, "cannot move cursor?");
return 0;
}
@@ -376,7 +352,7 @@ lcl_ExportFieldMark(
pUnoCrsr, i_xParentText, PORTION_FIELD_START);
xRef = pPortion;
if (pPortion && pFieldmark && pDoc)
- pPortion->SetBookmark(new SwXFieldmark(false, pFieldmark, pDoc));
+ pPortion->SetBookmark( SwXFieldmark::CreateXFieldmark( *pDoc, *pFieldmark ) );
}
else if (CH_TXT_ATR_FIELDEND == Char)
{
@@ -390,7 +366,7 @@ lcl_ExportFieldMark(
pUnoCrsr, i_xParentText, PORTION_FIELD_END);
xRef = pPortion;
if (pPortion && pFieldmark && pDoc)
- pPortion->SetBookmark(new SwXFieldmark(false, pFieldmark, pDoc));
+ pPortion->SetBookmark( SwXFieldmark::CreateXFieldmark( *pDoc, *pFieldmark ) );
}
else if (CH_TXT_ATR_FORMELEMENT == Char)
{
@@ -404,18 +380,15 @@ lcl_ExportFieldMark(
pUnoCrsr, i_xParentText, PORTION_FIELD_START_END);
xRef = pPortion;
if (pPortion && pFieldmark && pDoc)
- pPortion->SetBookmark(new SwXFieldmark(true, pFieldmark, pDoc));
+ pPortion->SetBookmark( SwXFieldmark::CreateXFieldmark( *pDoc, *pFieldmark ) );
}
else
{
- ASSERT(false, "no fieldmark found?");
+ OSL_ENSURE(false, "no fieldmark found?");
}
return xRef;
}
-/* -----------------------------31.08.00 14:28--------------------------------
-
- ---------------------------------------------------------------------------*/
static Reference<XTextRange>
lcl_CreateRefMarkPortion(
Reference<XText> const& xParent,
@@ -446,7 +419,6 @@ lcl_CreateRefMarkPortion(
return pPortion;
}
-//-----------------------------------------------------------------------------
static void
lcl_InsertRubyPortion(
TextRangeList_t & rPortions,
@@ -460,7 +432,6 @@ lcl_InsertRubyPortion(
pPortion->SetCollapsed(rAttr.GetEnd() ? false : true);
}
-//-----------------------------------------------------------------------------
static Reference<XTextRange>
lcl_CreateTOXMarkPortion(
Reference<XText> const& xParent,
@@ -490,7 +461,6 @@ lcl_CreateTOXMarkPortion(
return pPortion;
}
-//-----------------------------------------------------------------------------
static uno::Reference<text::XTextRange>
lcl_CreateMetaPortion(
uno::Reference<text::XText> const& xParent,
@@ -517,7 +487,6 @@ lcl_CreateMetaPortion(
return pPortion;
}
-//-----------------------------------------------------------------------------
static void
lcl_ExportBookmark(
TextRangeList_t & rPortions,
@@ -585,11 +554,6 @@ lcl_ExportSoftPageBreak(
}
}
-
-/* -----------------------------18.12.00 14:51--------------------------------
-
- ---------------------------------------------------------------------------*/
-//-----------------------------------------------------------------------------
#define REDLINE_PORTION_START_REMOVE 0//removed redlines are visible
#define REDLINE_PORTION_END_REMOVE 1//removed redlines are visible
#define REDLINE_PORTION_REMOVE 2//removed redlines are NOT visible
@@ -634,7 +598,6 @@ struct RedlineCompareStruct
typedef std::multiset < SwXRedlinePortion_ImplSharedPtr, RedlineCompareStruct >
SwXRedlinePortion_ImplList;
-//-----------------------------------------------------------------------------
static Reference<XTextRange>
lcl_ExportHints(
PortionStack_t & rPortionStack,
@@ -694,7 +657,7 @@ lcl_ExportHints(
case RES_TXTATR_META:
case RES_TXTATR_METAFIELD:
{
- ASSERT(*pAttr->GetStart() != *pAttr->GetEnd(),
+ OSL_ENSURE(*pAttr->GetStart() != *pAttr->GetEnd(),
"empty meta?");
if ((i_nStartPos > 0) &&
(*pAttr->GetStart() < i_nStartPos))
@@ -713,7 +676,7 @@ lcl_ExportHints(
PortionList_t Top = rPortionStack.top();
if (Top.second != pAttr)
{
- ASSERT(false, "ExportHints: stack error" );
+ OSL_ENSURE(false, "ExportHints: stack error" );
}
else
{
@@ -846,7 +809,7 @@ lcl_ExportHints(
case RES_TXTATR_CHARFMT:
break; // these are handled as properties of a "Text" portion
default:
- DBG_ERROR("unknown attribute");
+ OSL_FAIL("unknown attribute");
break;
}
}
@@ -885,7 +848,6 @@ lcl_ExportHints(
return xRef;
}
-//-----------------------------------------------------------------------------
void lcl_MoveCursor( SwUnoCrsr * const pUnoCrsr,
const xub_StrLen nCurrentIndex,
const sal_Int32 nNextFrameIndex, const sal_Int32 nNextPortionIndex,
@@ -926,7 +888,6 @@ void lcl_MoveCursor( SwUnoCrsr * const pUnoCrsr,
}
}
-//-----------------------------------------------------------------------------
static void
lcl_FillRedlineArray(SwDoc const & rDoc, SwUnoCrsr const & rUnoCrsr,
SwXRedlinePortion_ImplList& rRedArr )
@@ -954,7 +915,6 @@ lcl_FillRedlineArray(SwDoc const & rDoc, SwUnoCrsr const & rUnoCrsr,
}
}
-//-----------------------------------------------------------------------------
static void
lcl_FillSoftPageBreakArray(
SwUnoCrsr const & rUnoCrsr, SwSoftPageBreakList& rBreakArr )
@@ -965,9 +925,6 @@ lcl_FillSoftPageBreakArray(
pTxtNode->fillSoftPageBreakList( rBreakArr );
}
-/* -----------------------------19.12.00 12:25--------------------------------
-
- ---------------------------------------------------------------------------*/
static void
lcl_ExportRedline(
TextRangeList_t & rPortions,
@@ -999,9 +956,6 @@ lcl_ExportRedline(
}
}
-/* -----------------------------19.12.00 13:09--------------------------------
-
- ---------------------------------------------------------------------------*/
static void
lcl_ExportBkmAndRedline(
TextRangeList_t & rPortions,
@@ -1022,7 +976,6 @@ lcl_ExportBkmAndRedline(
lcl_ExportSoftPageBreak(rPortions, xParent, pUnoCrsr, rBreakArr, nIndex);
}
-//-----------------------------------------------------------------------------
static sal_Int32
lcl_ExportFrames(
TextRangeList_t & rPortions,
@@ -1049,7 +1002,6 @@ lcl_ExportFrames(
return i_rFrames.size() ? i_rFrames.front().nIndex : -1;
}
-//-----------------------------------------------------------------------------
static sal_Int32
lcl_GetNextIndex(
SwXBookmarkPortion_ImplList const & rBkmArr,
@@ -1077,7 +1029,6 @@ lcl_GetNextIndex(
return nRet;
};
-//-----------------------------------------------------------------------------
static void
lcl_CreatePortions(
TextRangeList_t & i_rPortions,
@@ -1129,7 +1080,7 @@ lcl_CreatePortions(
SwTxtNode * const pTxtNode = pUnoCrsr->GetNode()->GetTxtNode();
if (!pTxtNode)
{
- DBG_ERROR("lcl_CreatePortions: no TextNode - what now ?");
+ OSL_FAIL("lcl_CreatePortions: no TextNode - what now ?");
return;
}
@@ -1163,7 +1114,7 @@ lcl_CreatePortions(
bCursorMoved, nNextAttrIndex);
if (PortionStack.empty())
{
- ASSERT(false, "CreatePortions: stack underflow");
+ OSL_ENSURE(false, "CreatePortions: stack underflow");
return;
}
}
@@ -1180,7 +1131,7 @@ lcl_CreatePortions(
}
else
{
- ASSERT(!FieldMarks.size() ||
+ OSL_ENSURE(!FieldMarks.size() ||
(FieldMarks.front() != nCurrentIndex),
"fieldmark and hint with CH_TXTATR at same pos?");
}
@@ -1212,15 +1163,13 @@ lcl_CreatePortions(
}
}
- ASSERT((PortionStack.size() == 1) && !PortionStack.top().second,
+ OSL_ENSURE((PortionStack.size() == 1) && !PortionStack.top().second,
"CreatePortions: stack error" );
}
-/*-- 27.01.99 10:44:45---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXTextPortionEnumeration::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx
index 7b8e1fc8dadb..9e3437915ee5 100644
--- a/sw/source/core/unocore/unoprnms.cxx
+++ b/sw/source/core/unocore/unoprnms.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -778,8 +779,12 @@ const SwPropNameTab aPropNameTab = {
/* 0736 UNO_NAME_OUTLINE_LEVEL */ {MAP_CHAR_LEN("OutlineLevel")},//#outline level,add<-zhaojianwei Outlinelevel
/* 0737 UNO_NAME_DESCRIPTION */ {MAP_CHAR_LEN("Description")},
/* 0738 UNO_NAME_META */ {MAP_CHAR_LEN("InContentMetadata")},
-/* 0739 UNO_NAME_NESTED_TEXT_CONTENT */ {MAP_CHAR_LEN("NestedTextContent")},
+// FIXME: these numbers are not correct post merge ...
+/* 0739 UNO_NAME_IS_TEMPLATE */ {MAP_CHAR_LEN("IsTemplate")},
/* 0740 UNO_NAME_EMBEDDED_OBJECT */ {MAP_CHAR_LEN("EmbeddedObject")},
+/* 0740 UNO_NAME_VBA_DOCOBJ */ {MAP_CHAR_LEN("ThisVBADocObj")},
+
+/* 0741 UNO_NAME_NESTED_TEXT_CONTENT */ {MAP_CHAR_LEN("NestedTextContent")},
};
const SwPropNameLen& SwGetPropName( sal_uInt16 nId )
@@ -792,3 +797,5 @@ const SwPropNameLen& GetPropName( sal_uInt16 nId )
"GetPropName(): Wrong index" );
return aPropNameTab[ nId - SW_PROPNAME_BEGIN];
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index 9e9d042c519d..18b30f77df44 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,7 @@
#include <com/sun/star/text/XTextTable.hpp>
#include <rtl/ustrbuf.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <pagedesc.hxx>
@@ -56,25 +57,17 @@ using namespace ::com::sun::star;
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
-
-/* ---------------------------------------------------------------------------
-
- ---------------------------------------------------------------------------*/
SwXRedlineText::SwXRedlineText(SwDoc* _pDoc, SwNodeIndex aIndex) :
SwXText(_pDoc, CURSOR_REDLINE),
aNodeIndex(aIndex)
{
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
const SwStartNode* SwXRedlineText::GetStartNode() const
{
return aNodeIndex.GetNode().GetStartNode();
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
uno::Any SwXRedlineText::queryInterface( const uno::Type& rType )
throw(uno::RuntimeException)
{
@@ -97,9 +90,7 @@ uno::Any SwXRedlineText::queryInterface( const uno::Type& rType )
return aRet;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence<uno::Type> SwXRedlineText::getTypes()
throw(uno::RuntimeException)
{
@@ -113,13 +104,11 @@ uno::Sequence<uno::Type> SwXRedlineText::getTypes()
return aTypes;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence<sal_Int8> SwXRedlineText::getImplementationId()
throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -129,13 +118,11 @@ uno::Sequence<sal_Int8> SwXRedlineText::getImplementationId()
}
return aId;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursor(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwPosition aPos(aNodeIndex);
SwXTextCursor *const pXCursor =
@@ -174,9 +161,7 @@ uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursor(void)
return static_cast<text::XWordCursor*>(pXCursor);
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursorByRange(
const uno::Reference<text::XTextRange> & aTextRange)
throw( uno::RuntimeException )
@@ -186,55 +171,41 @@ uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursorByRange(
xCursor->gotoRange(aTextRange->getEnd(), sal_True);
return xCursor;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
uno::Reference<container::XEnumeration> SwXRedlineText::createEnumeration(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwPaM aPam(aNodeIndex);
aPam.Move(fnMoveForward, fnGoNode);
::std::auto_ptr<SwUnoCrsr> pUnoCursor(
GetDoc()->CreateUnoCrsr(*aPam.Start(), sal_False));
return new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_REDLINE);
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
uno::Type SwXRedlineText::getElementType( ) throw(uno::RuntimeException)
{
return ::getCppuType((uno::Reference<text::XTextRange>*)0);
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXRedlineText::hasElements( ) throw(uno::RuntimeException)
{
return sal_True; // we always have a content index
}
-/* -----------------------------19.12.00 11:36--------------------------------
- ---------------------------------------------------------------------------*/
SwXRedlinePortion::SwXRedlinePortion( const SwRedline* pRed,
const SwUnoCrsr* pPortionCrsr,
uno::Reference< text::XText > xParent, sal_Bool bStart) :
SwXTextPortion(pPortionCrsr, xParent, bStart ? PORTION_REDLINE_START : PORTION_REDLINE_END),
-// SwXText(pPortionCrsr->GetDoc(), CURSOR_REDLINE),
-// SwXRedlineText(pPortionCrsr->GetDoc(), *pRed->GetContentIdx()),
pRedline(pRed)
{
SetCollapsed(!pRedline->HasMark());
}
-/*-- 19.12.00 11:37:24---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXRedlinePortion::~SwXRedlinePortion()
{
}
-/* -----------------------------19.12.00 11:46--------------------------------
- ---------------------------------------------------------------------------*/
static util::DateTime lcl_DateTimeToUno(const DateTime& rDT)
{
util::DateTime aRetDT;
@@ -248,7 +219,6 @@ static util::DateTime lcl_DateTimeToUno(const DateTime& rDT)
return aRetDT;
}
-// ---------------------------------------------------------------------------
static OUString lcl_RedlineTypeToOUString(RedlineType_t eType)
{
OUString sRet;
@@ -263,7 +233,6 @@ static OUString lcl_RedlineTypeToOUString(RedlineType_t eType)
return sRet;
}
-// ---------------------------------------------------------------------------
static uno::Sequence<beans::PropertyValue> lcl_GetSuccessorProperties(const SwRedline& rRedline)
{
uno::Sequence<beans::PropertyValue> aValues(4);
@@ -272,24 +241,24 @@ static uno::Sequence<beans::PropertyValue> lcl_GetSuccessorProperties(const SwRe
if(pNext)
{
beans::PropertyValue* pValues = aValues.getArray();
- pValues[0].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_AUTHOR));
+ pValues[0].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_AUTHOR));
// GetAuthorString(n) walks the SwRedlineData* chain;
// here we always need element 1
pValues[0].Value <<= OUString(rRedline.GetAuthorString(1));
- pValues[1].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_DATE_TIME));
+ pValues[1].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_DATE_TIME));
pValues[1].Value <<= lcl_DateTimeToUno(pNext->GetTimeStamp());
- pValues[2].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_COMMENT));
+ pValues[2].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_COMMENT));
pValues[2].Value <<= OUString(pNext->GetComment());
- pValues[3].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_TYPE));
+ pValues[3].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_TYPE));
pValues[3].Value <<= lcl_RedlineTypeToOUString(pNext->GetType());
}
return aValues;
}
-// ---------------------------------------------------------------------------
+
uno::Any SwXRedlinePortion::getPropertyValue( const OUString& rPropertyName )
throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Validate();
uno::Any aRet;
if(rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_TEXT)))
@@ -317,9 +286,7 @@ uno::Any SwXRedlinePortion::getPropertyValue( const OUString& rPropertyName )
}
return aRet;
}
-/* -----------------------------19.12.00 15:16--------------------------------
- ---------------------------------------------------------------------------*/
void SwXRedlinePortion::Validate() throw( uno::RuntimeException )
{
SwUnoCrsr* pUnoCrsr = GetCursor();
@@ -334,12 +301,10 @@ void SwXRedlinePortion::Validate() throw( uno::RuntimeException )
if(!bFound)
throw uno::RuntimeException();
}
-/* -----------------------------21.03.00 15:39--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< sal_Int8 > SAL_CALL SwXRedlinePortion::getImplementationId( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -349,9 +314,7 @@ uno::Sequence< sal_Int8 > SAL_CALL SwXRedlinePortion::getImplementationId( ) th
}
return aId;
}
-/* -----------------------------11.01.01 16:39--------------------------------
- ---------------------------------------------------------------------------*/
uno::Any SwXRedlinePortion::GetPropertyValue( const OUString& rPropertyName, const SwRedline& rRedline ) throw()
{
uno::Any aRet;
@@ -391,9 +354,7 @@ uno::Any SwXRedlinePortion::GetPropertyValue( const OUString& rPropertyName, co
}
return aRet;
}
-/* -----------------------------11.01.01 11:22--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< beans::PropertyValue > SwXRedlinePortion::CreateRedlineProperties(
const SwRedline& rRedline, sal_Bool bIsStart ) throw()
{
@@ -405,25 +366,25 @@ uno::Sequence< beans::PropertyValue > SwXRedlinePortion::CreateRedlineProperties
sRedlineIdBuf.append( sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(&rRedline) ) );
sal_Int32 nPropIdx = 0;
- pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_AUTHOR));
+ pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_AUTHOR));
pRet[nPropIdx++].Value <<= OUString(rRedline.GetAuthorString());
- pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_DATE_TIME));
+ pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_DATE_TIME));
pRet[nPropIdx++].Value <<= lcl_DateTimeToUno(rRedline.GetTimeStamp());
- pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_COMMENT));
+ pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_COMMENT));
pRet[nPropIdx++].Value <<= OUString(rRedline.GetComment());
- pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_TYPE));
+ pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_TYPE));
pRet[nPropIdx++].Value <<= lcl_RedlineTypeToOUString(rRedline.GetType());
- pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_IDENTIFIER));
+ pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_IDENTIFIER));
pRet[nPropIdx++].Value <<= sRedlineIdBuf.makeStringAndClear();
- pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_IS_COLLAPSED));
+ pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_IS_COLLAPSED));
sal_Bool bTmp = !rRedline.HasMark();
pRet[nPropIdx++].Value.setValue(&bTmp, ::getBooleanCppuType()) ;
- pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_IS_START));
+ pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_IS_START));
pRet[nPropIdx++].Value.setValue(&bIsStart, ::getBooleanCppuType()) ;
bTmp = !rRedline.IsDelLastPara();
- pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_MERGE_LAST_PARA));
+ pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_MERGE_LAST_PARA));
pRet[nPropIdx++].Value.setValue(&bTmp, ::getBooleanCppuType()) ;
SwNodeIndex* pNodeIdx = rRedline.GetContentIdx();
@@ -432,7 +393,7 @@ uno::Sequence< beans::PropertyValue > SwXRedlinePortion::CreateRedlineProperties
if ( 1 < ( pNodeIdx->GetNode().EndOfSectionIndex() - pNodeIdx->GetNode().GetIndex() ) )
{
uno::Reference<text::XText> xRet = new SwXRedlineText(rRedline.GetDoc(), *pNodeIdx);
- pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_TEXT));
+ pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_TEXT));
pRet[nPropIdx++].Value <<= xRet;
}
else {
@@ -441,15 +402,13 @@ uno::Sequence< beans::PropertyValue > SwXRedlinePortion::CreateRedlineProperties
}
if(pNext)
{
- pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_SUCCESSOR_DATA));
+ pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_SUCCESSOR_DATA));
pRet[nPropIdx++].Value <<= lcl_GetSuccessorProperties(rRedline);
}
aRet.realloc(nPropIdx);
return aRet;
}
-/*-- 11.01.01 17:06:07---------------------------------------------------
- -----------------------------------------------------------------------*/
TYPEINIT1(SwXRedline, SwClient);
SwXRedline::SwXRedline(SwRedline& rRedline, SwDoc& rDoc) :
SwXText(&rDoc, CURSOR_REDLINE),
@@ -458,41 +417,32 @@ SwXRedline::SwXRedline(SwRedline& rRedline, SwDoc& rDoc) :
{
pDoc->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
}
-/*-- 11.01.01 17:06:08---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXRedline::~SwXRedline()
{
}
-/*-- 11.01.01 17:06:08---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXRedline::getPropertySetInfo( ) throw(uno::RuntimeException)
{
static uno::Reference< beans::XPropertySetInfo > xRef =
aSwMapProvider.GetPropertySet(PROPERTY_MAP_REDLINE)->getPropertySetInfo();
return xRef;
}
-/*-- 11.01.01 17:06:08---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXRedline::setPropertyValue( const OUString& rPropertyName, const uno::Any& aValue )
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException,
lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
if(rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_AUTHOR)))
{
- DBG_ERROR("currently not available");
+ OSL_FAIL("currently not available");
}
else if(rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_DATE_TIME)))
{
- DBG_ERROR("currently not available");
-// util::DateTime aDT;
-// if(aValue >>= aDT)
-// pRedline->SetTimeStamp(lcl_DateTimeFromUno(aDT));
+ OSL_FAIL("currently not available");
}
else if(rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_COMMENT)))
{
@@ -501,57 +451,25 @@ void SwXRedline::setPropertyValue( const OUString& rPropertyName, const uno::Any
}
else if(rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_TYPE)))
{
- DBG_ERROR("currently not available");
+ OSL_FAIL("currently not available");
OUString sTmp; aValue >>= sTmp;
if(!sTmp.getLength())
throw lang::IllegalArgumentException();
-// pRedline->SetType(lcl_OUStringToRedlineType(sTmp));
}
else if(rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_SUCCESSOR_DATA)))
{
- DBG_ERROR("currently not available");
-/* SwRedlineData* pNext = pRedline->GetRedlineData().Next();
- uno::Sequence<beans::PropertyValue> aValues;
- if(!(aValue =>> aValues) || !pNext)
- throw lang::IllegalArgumentException();
-
- const beans::PropertyValue* pValues = aValues.getConstArray();
- for(sal_Int32 nValue = 0; nValue < aValues.getLength(); nValue++)
- {
- if(pValues[nValue].Name.equalsAscii(UNO_NAME_REDLINE_AUTHOR.pName)
- {
- DBG_ERROR("currently not available");
- }
- else if(pValues[nValue].Name.equalsAscii(UNO_NAME_REDLINE_DATE_TIME.pName))
- {
- util::DateTime aDT;
- if(pValues[nValue].Value >>= aDT)
- pNext->SetTimeStamp(lcl_DateTimeFromUno(aDT));
- }
- else if(pValues[nValue].Name.equalsAscii(UNO_NAME_REDLINE_COMMENT.pName))
- {
- OUString sTmp; pValues[nValue].Value >>= sTmp;
- pNext->SetComment(sTmp);
- }
- else if(pValues[nValue].Name.equalsAscii(UNO_NAME_REDLINE_TYPE.pName))
- {
- OUString sTmp; pValues[nValue].Value >>= sTmp;
- pNext->SetType(lcl_OUStringToRedlineType(sTmp);
- }
- }
-*/ }
+ OSL_FAIL("currently not available");
+ }
else
{
throw lang::IllegalArgumentException();
}
}
-/*-- 11.01.01 17:06:08---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
uno::Any aRet;
@@ -594,7 +512,7 @@ uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
}
break;
default:
- DBG_ERROR("illegal node type");
+ OSL_FAIL("illegal node type");
}
aRet <<= xRet;
}
@@ -617,42 +535,32 @@ uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
aRet = SwXRedlinePortion::GetPropertyValue(rPropertyName, *pRedline);
return aRet;
}
-/*-- 11.01.01 17:06:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXRedline::addPropertyChangeListener(
const OUString& /*aPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ )
throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
}
-/*-- 11.01.01 17:06:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXRedline::removePropertyChangeListener(
const OUString& /*aPropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ )
throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
}
-/*-- 11.01.01 17:06:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXRedline::addVetoableChangeListener(
const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
}
-/*-- 11.01.01 17:06:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXRedline::removeVetoableChangeListener(
const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
}
-/*-- 11.01.01 17:06:10---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXRedline::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -662,12 +570,10 @@ void SwXRedline::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
pRedline = 0;
}
}
-/*-- 19.12.00 11:37:25---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< container::XEnumeration > SwXRedline::createEnumeration(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< container::XEnumeration > xRet;
if(!pDoc)
throw uno::RuntimeException();
@@ -683,28 +589,22 @@ uno::Reference< container::XEnumeration > SwXRedline::createEnumeration(void) t
}
return xRet;
}
-/* -----------------------------19.12.00 12:34--------------------------------
- ---------------------------------------------------------------------------*/
uno::Type SwXRedline::getElementType( ) throw(uno::RuntimeException)
{
return ::getCppuType((uno::Reference<text::XTextRange>*)0);
}
-/* -----------------------------19.12.00 12:34--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXRedline::hasElements( ) throw(uno::RuntimeException)
{
if(!pDoc)
throw uno::RuntimeException();
return 0 != pRedline->GetContentIdx();
}
-/* -----------------------------19.12.00 15:11--------------------------------
- ---------------------------------------------------------------------------*/
uno::Reference< text::XTextCursor > SwXRedline::createTextCursor(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
@@ -737,18 +637,14 @@ uno::Reference< text::XTextCursor > SwXRedline::createTextCursor(void) throw( u
}
return xRet;
}
-/* -----------------------------19.12.00 15:11--------------------------------
- ---------------------------------------------------------------------------*/
uno::Reference< text::XTextCursor > SwXRedline::createTextCursorByRange(
const uno::Reference< text::XTextRange > & /*aTextPosition*/)
throw( uno::RuntimeException )
{
throw uno::RuntimeException();
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
uno::Any SwXRedline::queryInterface( const uno::Type& rType )
throw(uno::RuntimeException)
{
@@ -759,9 +655,7 @@ uno::Any SwXRedline::queryInterface( const uno::Type& rType )
}
return aRet;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence<uno::Type> SwXRedline::getTypes()
throw(uno::RuntimeException)
{
@@ -775,13 +669,11 @@ uno::Sequence<uno::Type> SwXRedline::getTypes()
pTypes[nCurType++] = pBaseTypes[nType];
return aTypes;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence<sal_Int8> SwXRedline::getImplementationId()
throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -792,3 +684,4 @@ uno::Sequence<sal_Int8> SwXRedline::getImplementationId()
return aId;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx
index 774e9732e949..332cfc406b4b 100644
--- a/sw/source/core/unocore/unoredlines.cxx
+++ b/sw/source/core/unocore/unoredlines.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <tools/debug.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <unoredlines.hxx>
@@ -47,37 +48,28 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
-/*-- 11.01.01 15:28:54---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXRedlines::SwXRedlines(SwDoc* _pDoc) :
SwUnoCollection(_pDoc)
{
}
-/*-- 11.01.01 15:28:55---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXRedlines::~SwXRedlines()
{
}
-/*-- 11.01.01 15:28:55---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXRedlines::getCount( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
const SwRedlineTbl& rRedTbl = GetDoc()->GetRedlineTbl();
return rRedTbl.Count();
}
-/*-- 11.01.01 15:28:55---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXRedlines::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
const SwRedlineTbl& rRedTbl = GetDoc()->GetRedlineTbl();
@@ -91,63 +83,49 @@ uno::Any SwXRedlines::getByIndex(sal_Int32 nIndex)
throw lang::IndexOutOfBoundsException();
return aRet;
}
-/*-- 11.01.01 15:28:55---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< container::XEnumeration > SwXRedlines::createEnumeration(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
return uno::Reference< container::XEnumeration >(new SwXRedlineEnumeration(*GetDoc()));
}
-/*-- 11.01.01 15:28:55---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SwXRedlines::getElementType( ) throw(uno::RuntimeException)
{
return ::getCppuType((uno::Reference<beans::XPropertySet>*)0);
}
-/*-- 11.01.01 15:28:56---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXRedlines::hasElements( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw uno::RuntimeException();
const SwRedlineTbl& rRedTbl = GetDoc()->GetRedlineTbl();
return rRedTbl.Count() > 0;
}
-/*-- 11.01.01 15:28:56---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwXRedlines::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXRedlines");
}
-/*-- 11.01.01 15:28:56---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXRedlines::supportsService(const rtl::OUString& /*ServiceName*/)
throw( uno::RuntimeException )
{
- DBG_ERROR("not implemented");
+ OSL_FAIL("not implemented");
return sal_False;
}
-/*-- 11.01.01 15:28:57---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXRedlines::getSupportedServiceNames(void)
throw( uno::RuntimeException )
{
- DBG_ERROR("not implemented");
+ OSL_FAIL("not implemented");
return uno::Sequence< OUString >();
}
-/*-- 11.01.01 15:28:57---------------------------------------------------
- -----------------------------------------------------------------------*/
beans::XPropertySet* SwXRedlines::GetObject( SwRedline& rRedline, SwDoc& rDoc )
{
SwPageDesc* pStdDesc = rDoc.GetPageDescFromPool(RES_POOLPAGE_STANDARD);
@@ -163,33 +141,25 @@ beans::XPropertySet* SwXRedlines::GetObject( SwRedline& rRedline, SwDoc& rDoc
pxRedline = new SwXRedline(rRedline, rDoc);
return pxRedline;
}
-/*-- 12.01.01 15:06:10---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXRedlineEnumeration::SwXRedlineEnumeration(SwDoc& rDoc) :
pDoc(&rDoc),
nCurrentIndex(0)
{
pDoc->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
}
-/*-- 12.01.01 15:06:10---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXRedlineEnumeration::~SwXRedlineEnumeration()
{
}
-/*-- 12.01.01 15:06:10---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXRedlineEnumeration::hasMoreElements(void) throw( uno::RuntimeException )
{
if(!pDoc)
throw uno::RuntimeException();
return pDoc->GetRedlineTbl().Count() > nCurrentIndex;
}
-/*-- 12.01.01 15:06:10---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXRedlineEnumeration::nextElement(void)
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
{
@@ -203,33 +173,27 @@ uno::Any SwXRedlineEnumeration::nextElement(void)
aRet <<= xRet;
return aRet;
}
-/*-- 12.01.01 15:06:10---------------------------------------------------
- -----------------------------------------------------------------------*/
rtl::OUString SwXRedlineEnumeration::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXRedlineEnumeration");
}
-/*-- 12.01.01 15:06:10---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXRedlineEnumeration::supportsService(const rtl::OUString& /*ServiceName*/) throw( uno::RuntimeException )
{
return sal_False;
}
-/*-- 12.01.01 15:06:11---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXRedlineEnumeration::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
return uno::Sequence< OUString >();
}
-/*-- 12.01.01 15:06:11---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXRedlineEnumeration::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
if(!GetRegisteredIn())
pDoc = 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 1bb59d0eee65..ea10f94d8e10 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <unomid.h>
@@ -52,7 +53,6 @@ using ::rtl::OUString;
/******************************************************************
* SwXReferenceMark
******************************************************************/
-
class SwXReferenceMark::Impl
: public SwClient
{
@@ -88,9 +88,6 @@ public:
};
-/* -----------------------------07.01.00 12:51--------------------------------
-
- ---------------------------------------------------------------------------*/
void SwXReferenceMark::Impl::Invalidate()
{
if (IsValid())
@@ -102,9 +99,6 @@ void SwXReferenceMark::Impl::Invalidate()
m_pMarkFmt = 0;
}
-/*-- 11.12.98 10:28:37---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXReferenceMark::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -128,19 +122,12 @@ void SwXReferenceMark::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
-
-/*-- 11.12.98 10:28:32---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXReferenceMark::SwXReferenceMark(
SwDoc *const pDoc, SwFmtRefMark const*const pRefMark)
: m_pImpl( new SwXReferenceMark::Impl(*this, pDoc, pRefMark) )
{
}
-/*-- 11.12.98 10:28:33---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXReferenceMark::~SwXReferenceMark()
{
}
@@ -152,20 +139,6 @@ SwXReferenceMark::GetReferenceMark(
// #i105557#: do not iterate over the registered clients: race condition
// to do this properly requires the SwXReferenceMark to register at the
// SwFmtRefMark directly, not at the unocallback
-#if 0
- SwClientIter aIter( rUnoCB );
- SwXReferenceMark::Impl * pXMark =
- static_cast<SwXReferenceMark::Impl*>(
- aIter.First( TYPE( SwXReferenceMark::Impl ) ));
- while (pXMark)
- {
- if (pXMark->m_pMarkFmt == &rMarkFmt)
- {
- return &pXMark->m_rThis;
- }
- pXMark = static_cast<SwXReferenceMark::Impl*>(aIter.Next());
- }
-#endif
return 0;
}
@@ -180,41 +153,33 @@ SwXReferenceMark::CreateXReferenceMark(
: new SwXReferenceMark(&rDoc, &rMarkFmt);
}
-/* -----------------------------13.03.00 12:15--------------------------------
-
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXReferenceMark::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL
SwXReferenceMark::getSomething(const uno::Sequence< sal_Int8 >& rId)
throw (uno::RuntimeException)
{
return ::sw::UnoTunnelImpl<SwXReferenceMark>(rId, this);
}
-/* -----------------------------06.04.00 16:41--------------------------------
- ---------------------------------------------------------------------------*/
OUString SAL_CALL SwXReferenceMark::getImplementationName()
throw (uno::RuntimeException)
{
return C2U("SwXReferenceMark");
}
-/* -----------------------------06.04.00 16:41--------------------------------
- ---------------------------------------------------------------------------*/
static char const*const g_ServicesReferenceMark[] =
{
"com.sun.star.text.TextContent",
"com.sun.star.text.ReferenceMark",
};
+
static const size_t g_nServicesReferenceMark(
- sizeof(g_ServicesReferenceMark)/sizeof(g_ServicesReferenceMark[0]));
+ SAL_N_ELEMENTS(g_ServicesReferenceMark));
sal_Bool SAL_CALL
SwXReferenceMark::supportsService(const OUString& rServiceName)
@@ -223,9 +188,7 @@ throw (uno::RuntimeException)
return ::sw::SupportsServiceImpl(
g_nServicesReferenceMark, g_ServicesReferenceMark, rServiceName);
}
-/* -----------------------------06.04.00 16:41--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SAL_CALL
SwXReferenceMark::getSupportedServiceNames()
throw (uno::RuntimeException)
@@ -234,9 +197,6 @@ throw (uno::RuntimeException)
g_nServicesReferenceMark, g_ServicesReferenceMark);
}
-/* -----------------03.11.99 14:14-------------------
-
- --------------------------------------------------*/
template<typename T> struct NotContainedIn
{
::std::vector<T> const& m_rVector;
@@ -301,8 +261,10 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
}
else
{
- pTxtAttr = rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
- rPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_REFMARK);
+ SwTxtNode *pTxtNd = rPam.GetNode()->GetTxtNode();
+ OSL_ASSERT(pTxtNd);
+ pTxtAttr = pTxtNd ? rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
+ rPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_REFMARK) : NULL;
}
if (!pTxtAttr)
@@ -316,14 +278,11 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
pDoc2->GetUnoCallBack()->Add(this);
}
-/*-- 11.12.98 10:28:34---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXReferenceMark::attach(const uno::Reference< text::XTextRange > & xTextRange)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!m_pImpl->m_bIsDescriptor)
{
@@ -353,13 +312,10 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
m_pImpl->m_pDoc = pDocument;
}
-/*-- 11.12.98 10:28:34---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SAL_CALL
SwXReferenceMark::getAnchor() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (m_pImpl->IsValid())
{
@@ -386,12 +342,10 @@ SwXReferenceMark::getAnchor() throw (uno::RuntimeException)
}
return 0;
}
-/*-- 11.12.98 10:28:35---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXReferenceMark::dispose() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (m_pImpl->IsValid())
{
SwFmtRefMark const*const pNewMark =
@@ -419,14 +373,12 @@ void SAL_CALL SwXReferenceMark::dispose() throw (uno::RuntimeException)
m_pImpl->Invalidate();
}
}
-/*-- 11.12.98 10:28:35---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXReferenceMark::addEventListener(
const uno::Reference< lang::XEventListener > & xListener)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->IsValid())
{
@@ -434,14 +386,12 @@ throw (uno::RuntimeException)
}
m_pImpl->m_ListenerContainer.AddListener(xListener);
}
-/*-- 11.12.98 10:28:35---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXReferenceMark::removeEventListener(
const uno::Reference< lang::XEventListener > & xListener)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->IsValid() ||
!m_pImpl->m_ListenerContainer.RemoveListener(xListener))
@@ -449,13 +399,11 @@ throw (uno::RuntimeException)
throw uno::RuntimeException();
}
}
-/*-- 11.12.98 10:28:36---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SAL_CALL SwXReferenceMark::getName()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!m_pImpl->IsValid() ||
!m_pImpl->m_pDoc->GetRefMark(m_pImpl->m_sMarkName))
{
@@ -463,13 +411,11 @@ throw (uno::RuntimeException)
}
return m_pImpl->m_sMarkName;
}
-/*-- 11.12.98 10:28:36---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXReferenceMark::setName(const OUString& rName)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (m_pImpl->m_bIsDescriptor)
{
m_pImpl->m_sMarkName = rName;
@@ -513,22 +459,17 @@ throw (uno::RuntimeException)
}
}
-/*-- 12.09.00 12:58:20---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SAL_CALL
SwXReferenceMark::getPropertySetInfo() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
static uno::Reference< beans::XPropertySetInfo > xRef =
aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH_EXTENSIONS)
->getPropertySetInfo();
return xRef;
}
-/*-- 12.09.00 12:58:20---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXReferenceMark::setPropertyValue(
const OUString& /*rPropertyName*/, const uno::Any& /*rValue*/ )
throw (beans::UnknownPropertyException, beans::PropertyVetoException,
@@ -537,9 +478,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
{
throw lang::IllegalArgumentException();
}
-/*-- 12.09.00 12:58:20---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXReferenceMark::getPropertyValue(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
@@ -553,9 +492,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
return aRet;
}
-/*-- 12.09.00 12:58:20---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXReferenceMark::addPropertyChangeListener(
const OUString& /*rPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/)
@@ -565,9 +502,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
OSL_ENSURE(false,
"SwXReferenceMark::addPropertyChangeListener(): not implemented");
}
-/*-- 12.09.00 12:58:20---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXReferenceMark::removePropertyChangeListener(
const OUString& /*rPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/)
@@ -577,9 +512,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
OSL_ENSURE(false,
"SwXReferenceMark::removePropertyChangeListener(): not implemented");
}
-/*-- 12.09.00 12:58:20---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXReferenceMark::addVetoableChangeListener(
const OUString& /*rPropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/)
@@ -589,9 +522,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
OSL_ENSURE(false,
"SwXReferenceMark::addVetoableChangeListener(): not implemented");
}
-/*-- 12.09.00 12:58:21---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXReferenceMark::removeVetoableChangeListener(
const OUString& /*rPropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*xListener*/)
@@ -610,12 +541,9 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
#include <fmtmeta.hxx>
#include <docsh.hxx>
-//=============================================================================
-
/******************************************************************
* SwXMetaText
******************************************************************/
-
class SwXMetaText
: public SwXText
{
@@ -736,11 +664,9 @@ SwXMetaText::createTextCursorByRange(
/******************************************************************
* SwXMeta
******************************************************************/
-
// the Meta has a cached list of text portions for its contents
// this list is created by SwXTextPortionEnumeration
// the Meta listens at the SwTxtNode and throws away the cache when it changes
-
class SwXMeta::Impl
: public SwClient
{
@@ -876,7 +802,6 @@ SwXMeta::CreateXMeta(::sw::Meta & rMeta,
return xMeta;
}
-
bool SwXMeta::SetContentRange(
SwTxtNode *& rpNode, xub_StrLen & rStart, xub_StrLen & rEnd ) const
{
@@ -906,7 +831,7 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb)
xub_StrLen nMetaStart;
xub_StrLen nMetaEnd;
const bool bSuccess( SetContentRange(pTxtNode, nMetaStart, nMetaEnd) );
- ASSERT(bSuccess, "no pam?");
+ OSL_ENSURE(bSuccess, "no pam?");
if (!bSuccess)
throw lang::DisposedException();
@@ -987,8 +912,9 @@ static char const*const g_ServicesMeta[] =
"com.sun.star.text.TextContent",
"com.sun.star.text.InContentMetadata",
};
+
static const size_t g_nServicesMeta(
- sizeof(g_ServicesMeta)/sizeof(g_ServicesMeta[0]));
+ SAL_N_ELEMENTS(g_ServicesMeta));
sal_Bool SAL_CALL
SwXMeta::supportsService(const ::rtl::OUString& rServiceName)
@@ -1004,14 +930,13 @@ SwXMeta::getSupportedServiceNames() throw (uno::RuntimeException)
return ::sw::GetSupportedServiceNamesImpl(g_nServicesMeta, g_ServicesMeta);
}
-
// XComponent
void SAL_CALL
SwXMeta::addEventListener(
uno::Reference< lang::XEventListener> const & xListener )
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
m_pImpl->m_ListenerContainer.AddListener(xListener);
if (m_pImpl->m_bIsDisposed)
@@ -1025,7 +950,7 @@ SwXMeta::removeEventListener(
uno::Reference< lang::XEventListener> const & xListener )
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->m_bIsDisposed)
{
@@ -1036,7 +961,7 @@ throw (uno::RuntimeException)
void SAL_CALL
SwXMeta::dispose() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_pImpl->m_bIsDescriptor)
{
@@ -1051,7 +976,7 @@ SwXMeta::dispose() throw (uno::RuntimeException)
xub_StrLen nMetaStart;
xub_StrLen nMetaEnd;
const bool bSuccess(SetContentRange(pTxtNode, nMetaStart, nMetaEnd));
- ASSERT(bSuccess, "no pam?");
+ OSL_ENSURE(bSuccess, "no pam?");
if (bSuccess)
{
// -1 because of CH_TXTATR
@@ -1065,13 +990,12 @@ SwXMeta::dispose() throw (uno::RuntimeException)
}
}
-
void SAL_CALL
SwXMeta::AttachImpl(const uno::Reference< text::XTextRange > & i_xTextRange,
const sal_uInt16 i_nWhich)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_pImpl->m_bIsDisposed)
{
@@ -1140,7 +1064,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
if (!pTxtAttr)
{
- ASSERT(false, "meta inserted, but has no text attribute?");
+ OSL_ENSURE(false, "meta inserted, but has no text attribute?");
throw uno::RuntimeException(
C2S("SwXMeta::attach(): cannot create meta"),
static_cast< ::cppu::OWeakObject* >(this));
@@ -1165,7 +1089,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
uno::Reference< text::XTextRange > SAL_CALL
SwXMeta::getAnchor() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_pImpl->m_bIsDisposed)
{
@@ -1182,7 +1106,7 @@ SwXMeta::getAnchor() throw (uno::RuntimeException)
xub_StrLen nMetaStart;
xub_StrLen nMetaEnd;
const bool bSuccess(SetContentRange(pTxtNode, nMetaStart, nMetaEnd));
- ASSERT(bSuccess, "no pam?");
+ OSL_ENSURE(bSuccess, "no pam?");
if (!bSuccess)
{
throw lang::DisposedException(
@@ -1199,35 +1123,35 @@ SwXMeta::getAnchor() throw (uno::RuntimeException)
uno::Reference< text::XText > SAL_CALL
SwXMeta::getText() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return this;
}
uno::Reference< text::XTextRange > SAL_CALL
SwXMeta::getStart() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->m_Text.getStart();
}
uno::Reference< text::XTextRange > SAL_CALL
SwXMeta::getEnd() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->m_Text.getEnd();
}
rtl::OUString SAL_CALL
SwXMeta::getString() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->m_Text.getString();
}
void SAL_CALL
SwXMeta::setString(const rtl::OUString& rString) throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->m_Text.setString(rString);
}
@@ -1235,7 +1159,7 @@ SwXMeta::setString(const rtl::OUString& rString) throw (uno::RuntimeException)
uno::Reference< text::XTextCursor > SAL_CALL
SwXMeta::createTextCursor() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->m_Text.createTextCursor();
}
@@ -1244,7 +1168,7 @@ SwXMeta::createTextCursorByRange(
const uno::Reference<text::XTextRange> & xTextPosition)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->m_Text.createTextCursorByRange(xTextPosition);
}
@@ -1253,7 +1177,7 @@ SwXMeta::insertString(const uno::Reference<text::XTextRange> & xRange,
const rtl::OUString& rString, sal_Bool bAbsorb)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->m_Text.insertString(xRange, rString, bAbsorb);
}
@@ -1262,7 +1186,7 @@ SwXMeta::insertControlCharacter(const uno::Reference<text::XTextRange> & xRange,
sal_Int16 nControlCharacter, sal_Bool bAbsorb)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->m_Text.insertControlCharacter(xRange, nControlCharacter,
bAbsorb);
}
@@ -1273,7 +1197,7 @@ SwXMeta::insertTextContent( const uno::Reference<text::XTextRange> & xRange,
const uno::Reference<text::XTextContent> & xContent, sal_Bool bAbsorb)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->m_Text.insertTextContent(xRange, xContent, bAbsorb);
}
@@ -1282,7 +1206,7 @@ SwXMeta::removeTextContent(
const uno::Reference< text::XTextContent > & xContent)
throw (container::NoSuchElementException, uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->m_Text.removeTextContent(xContent);
}
@@ -1290,7 +1214,7 @@ SwXMeta::removeTextContent(
uno::Reference< uno::XInterface > SAL_CALL
SwXMeta::getParent() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
SwTxtNode * pTxtNode;
xub_StrLen nMetaStart;
xub_StrLen nMetaEnd;
@@ -1323,7 +1247,7 @@ SwXMeta::getElementType() throw (uno::RuntimeException)
sal_Bool SAL_CALL
SwXMeta::hasElements() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->GetRegisteredIn() ? sal_True : sal_False;
}
@@ -1332,7 +1256,7 @@ SwXMeta::hasElements() throw (uno::RuntimeException)
uno::Reference< container::XEnumeration > SAL_CALL
SwXMeta::createEnumeration() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_pImpl->m_bIsDisposed)
{
@@ -1349,7 +1273,7 @@ SwXMeta::createEnumeration() throw (uno::RuntimeException)
xub_StrLen nMetaStart;
xub_StrLen nMetaEnd;
const bool bSuccess(SetContentRange(pTxtNode, nMetaStart, nMetaEnd));
- ASSERT(bSuccess, "no pam?");
+ OSL_ENSURE(bSuccess, "no pam?");
if (!bSuccess)
throw lang::DisposedException();
@@ -1366,7 +1290,6 @@ SwXMeta::createEnumeration() throw (uno::RuntimeException)
}
}
-
// MetadatableMixin
::sfx2::Metadatable* SwXMeta::GetCoreObject()
{
@@ -1388,11 +1311,9 @@ uno::Reference<frame::XModel> SwXMeta::GetModel()
return 0;
}
-
/******************************************************************
* SwXMetaField
******************************************************************/
-
inline const ::sw::MetaField * SwXMeta::Impl::GetMetaField() const
{
return static_cast< const ::sw::MetaField * >(GetRegisteredIn());
@@ -1403,7 +1324,7 @@ SwXMetaField::SwXMetaField(SwDoc *const pDoc, ::sw::Meta *const pMeta,
TextRangeList_t const*const pPortions)
: SwXMetaField_Base(pDoc, pMeta, xParentText, pPortions)
{
- ASSERT(pMeta && dynamic_cast< ::sw::MetaField* >(pMeta),
+ OSL_ENSURE(pMeta && dynamic_cast< ::sw::MetaField* >(pMeta),
"SwXMetaField created for wrong hint!");
}
@@ -1429,8 +1350,9 @@ static char const*const g_ServicesMetaField[] =
"com.sun.star.text.TextField",
"com.sun.star.text.textfield.MetadataField",
};
+
static const size_t g_nServicesMetaField(
- sizeof(g_ServicesMetaField)/sizeof(g_ServicesMetaField[0]));
+ SAL_N_ELEMENTS(g_ServicesMetaField));
sal_Bool SAL_CALL
SwXMetaField::supportsService(const ::rtl::OUString& rServiceName)
@@ -1488,7 +1410,7 @@ SwXMetaField::getAnchor() throw (uno::RuntimeException)
uno::Reference< beans::XPropertySetInfo > SAL_CALL
SwXMetaField::getPropertySetInfo() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
static uno::Reference< beans::XPropertySetInfo > xRef(
aSwMapProvider.GetPropertySet(PROPERTY_MAP_METAFIELD)
@@ -1503,14 +1425,14 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
::sw::MetaField * const pMeta(
const_cast< ::sw::MetaField * >(m_pImpl->GetMetaField()) );
if (!pMeta)
throw lang::DisposedException();
- if (rPropertyName.equalsAscii("NumberFormat"))
+ if (rPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("NumberFormat")))
{
sal_Int32 nNumberFormat(0);
if (rValue >>= nNumberFormat)
@@ -1518,7 +1440,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
pMeta->SetNumberFormat(static_cast<sal_uInt32>(nNumberFormat));
}
}
- else if (rPropertyName.equalsAscii("IsFixedLanguage"))
+ else if (rPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsFixedLanguage")))
{
bool b(false);
if (rValue >>= b)
@@ -1537,7 +1459,7 @@ SwXMetaField::getPropertyValue(const ::rtl::OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
::sw::MetaField const * const pMeta( m_pImpl->GetMetaField() );
if (!pMeta)
@@ -1545,12 +1467,12 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::Any any;
- if (rPropertyName.equalsAscii("NumberFormat"))
+ if (rPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("NumberFormat")))
{
const ::rtl::OUString text( getPresentation(sal_False) );
any <<= static_cast<sal_Int32>(pMeta->GetNumberFormat(text));
}
- else if (rPropertyName.equalsAscii("IsFixedLanguage"))
+ else if (rPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsFixedLanguage")))
{
any <<= pMeta->IsFixedLanguage();
}
@@ -1678,7 +1600,7 @@ getPrefixAndSuffix(
throw;
} catch (uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
- ::rtl::OUString::createFromAscii("getPrefixAndSuffix: exception"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPrefixAndSuffix: exception")),
0, uno::makeAny(e));
}
}
@@ -1688,7 +1610,7 @@ getPrefixAndSuffix(
SwXMetaField::getPresentation(sal_Bool bShowCommand)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (bShowCommand)
{
@@ -1706,3 +1628,4 @@ throw (uno::RuntimeException)
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index f95ac3385938..f532cd1b878c 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,7 +39,7 @@
#include <editeng/xmlcnitm.hxx>
#include <sfx2/linkmgr.hxx>
#include <sfx2/lnkbase.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <fmtclds.hxx>
#include <unotextrange.hxx>
@@ -61,20 +62,14 @@
#include <doctxm.hxx>
#include <fmtftntx.hxx>
#include <fmtclbl.hxx>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <editeng/frmdiritem.hxx>
#include <fmtcntnt.hxx>
-/* #109700# */
#include <editeng/lrspitem.hxx>
using namespace ::com::sun::star;
using ::rtl::OUString;
-
-/******************************************************************
- *
- ******************************************************************/
struct SwTextSectionProperties_Impl
{
uno::Sequence<sal_Int8> m_Password;
@@ -90,15 +85,13 @@ struct SwTextSectionProperties_Impl
::std::auto_ptr<SvXMLAttrContainerItem> m_pXMLAttr;
::std::auto_ptr<SwFmtNoBalancedColumns> m_pNoBalanceItem;
::std::auto_ptr<SvxFrameDirectionItem> m_pFrameDirItem;
- ::std::auto_ptr<SvxLRSpaceItem> m_pLRSpaceItem; // #109700#
+ ::std::auto_ptr<SvxLRSpaceItem> m_pLRSpaceItem;
bool m_bDDE;
bool m_bHidden;
bool m_bCondHidden;
bool m_bProtect;
- // --> FME 2004-06-22 #114856# edit in readonly sections
bool m_bEditInReadonly;
- // <--
bool m_bUpdateType;
SwTextSectionProperties_Impl()
@@ -106,16 +99,13 @@ struct SwTextSectionProperties_Impl
, m_bHidden(false)
, m_bCondHidden(false)
, m_bProtect(false)
- // --> FME 2004-06-22 #114856# edit in readonly sections
, m_bEditInReadonly(false)
- // <--
, m_bUpdateType(true)
{
}
};
-
class SwXTextSection::Impl
: public SwClient
{
@@ -175,9 +165,6 @@ public:
};
-/*-- 10.12.98 14:42:52---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXTextSection::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -187,17 +174,11 @@ void SwXTextSection::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
-/*-- 20.12.2005 10:27:33---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwSectionFmt * SwXTextSection::GetFmt() const
{
return m_pImpl->GetSectionFmt();
}
-/*-- 20.12.2005 09:56:36---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextSection >
SwXTextSection::CreateXTextSection(
SwSectionFmt *const pFmt, const bool bIndexHeader)
@@ -221,33 +202,22 @@ SwXTextSection::CreateXTextSection(
return xSection;
}
-/*-- 10.12.98 14:47:05---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextSection::SwXTextSection(
SwSectionFmt *const pFmt, const bool bIndexHeader)
: m_pImpl( new SwXTextSection::Impl(*this, pFmt, bIndexHeader) )
{
}
-/*-- 10.12.98 14:47:07---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextSection::~SwXTextSection()
{
}
-/* -----------------------------13.03.00 12:15--------------------------------
-
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXTextSection::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL
SwXTextSection::getSomething(const uno::Sequence< sal_Int8 >& rId)
throw (uno::RuntimeException)
@@ -255,13 +225,10 @@ throw (uno::RuntimeException)
return ::sw::UnoTunnelImpl<SwXTextSection>(rId, this);
}
-/*-- 10.12.98 14:47:08---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextSection > SAL_CALL
SwXTextSection::getParentSection() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwSectionFmt & rSectionFmt( m_pImpl->GetSectionFmtOrThrow() );
@@ -271,13 +238,10 @@ SwXTextSection::getParentSection() throw (uno::RuntimeException)
return xRet;
}
-/*-- 10.12.98 14:47:08---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Sequence< uno::Reference< text::XTextSection > > SAL_CALL
SwXTextSection::getChildSections() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwSectionFmt & rSectionFmt( m_pImpl->GetSectionFmtOrThrow() );
@@ -293,14 +257,11 @@ SwXTextSection::getChildSections() throw (uno::RuntimeException)
return aSeq;
}
-/* -----------------18.02.99 13:31-------------------
- *
- * --------------------------------------------------*/
void SAL_CALL
SwXTextSection::attach(const uno::Reference< text::XTextRange > & xTextRange)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->m_bIsDescriptor)
{
@@ -382,15 +343,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
aSect.SetHidden(m_pImpl->m_pProps->m_bHidden);
aSect.SetProtectFlag(m_pImpl->m_pProps->m_bProtect);
- // --> FME 2004-06-22 #114856# edit in readonly sections
aSect.SetEditInReadonlyFlag(m_pImpl->m_pProps->m_bEditInReadonly);
- // <--
SfxItemSet aSet(pDoc->GetAttrPool(),
RES_COL, RES_COL,
RES_BACKGROUND, RES_BACKGROUND,
RES_FTN_AT_TXTEND, RES_FRAMEDIR,
- RES_LR_SPACE, RES_LR_SPACE, // #109700#
+ RES_LR_SPACE, RES_LR_SPACE,
RES_UNKNOWNATR_CONTAINER,RES_UNKNOWNATR_CONTAINER,
0);
if (m_pImpl->m_pProps->m_pBrushItem.get())
@@ -421,7 +380,6 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
{
aSet.Put(*m_pImpl->m_pProps->m_pFrameDirItem);
}
- /* #109700# */
if (m_pImpl->m_pProps->m_pLRSpaceItem.get())
{
aSet.Put(*m_pImpl->m_pProps->m_pLRSpaceItem);
@@ -437,7 +395,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
pRet->GetFmt()->Add(m_pImpl.get());
pRet->GetFmt()->SetXObject(static_cast< ::cppu::OWeakObject*>(this));
- // #97450# XML import must hide sections depending on their old
+ // XML import must hide sections depending on their old
// condition status
if (m_pImpl->m_pProps->m_sCondition.getLength() != 0)
{
@@ -462,21 +420,17 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
m_pImpl->m_bIsDescriptor = false;
}
-/*-- 10.12.98 14:47:09---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SAL_CALL
SwXTextSection::getAnchor() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > xRet;
SwSectionFmt *const pSectFmt = m_pImpl->GetSectionFmt();
if(pSectFmt)
{
- const SwSection* pSect;
const SwNodeIndex* pIdx;
- if( 0 != ( pSect = pSectFmt->GetSection() ) &&
+ if( 0 != ( pSectFmt->GetSection() ) &&
0 != ( pIdx = pSectFmt->GetCntnt().GetCntntIdx() ) &&
pIdx->GetNode().GetNodes().IsDocNodes() )
{
@@ -492,12 +446,10 @@ SwXTextSection::getAnchor() throw (uno::RuntimeException)
}
return xRet;
}
-/*-- 10.12.98 14:47:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXTextSection::dispose() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwSectionFmt *const pSectFmt = m_pImpl->GetSectionFmt();
if (pSectFmt)
@@ -505,14 +457,12 @@ void SAL_CALL SwXTextSection::dispose() throw (uno::RuntimeException)
pSectFmt->GetDoc()->DelSectionFmt( pSectFmt );
}
}
-/*-- 10.12.98 14:47:10---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXTextSection::addEventListener(
const uno::Reference< lang::XEventListener > & xListener)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->GetSectionFmt())
{
@@ -520,14 +470,12 @@ throw (uno::RuntimeException)
}
m_pImpl->m_ListenerContainer.AddListener(xListener);
}
-/*-- 10.12.98 14:47:10---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXTextSection::removeEventListener(
const uno::Reference< lang::XEventListener > & xListener)
throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_pImpl->GetSectionFmt() ||
!m_pImpl->m_ListenerContainer.RemoveListener(xListener))
@@ -535,22 +483,17 @@ throw (uno::RuntimeException)
throw uno::RuntimeException();
}
}
-/*-- 10.12.98 14:47:11---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SAL_CALL
SwXTextSection::getPropertySetInfo() throw (uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
static const uno::Reference< beans::XPropertySetInfo > aRef =
m_pImpl->m_rPropSet.getPropertySetInfo();
return aRef;
}
-/* -----------------------------12.02.01 10:45--------------------------------
-
- ---------------------------------------------------------------------------*/
static void
lcl_UpdateLinkType(SwSection & rSection, bool const bLinkUpdateAlways = true)
{
@@ -845,7 +788,6 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
}
break;
- // --> FME 2004-06-22 #114856# edit in readonly sections
case WID_SECT_EDIT_IN_READONLY:
{
sal_Bool bVal(sal_False);
@@ -862,7 +804,6 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
pSectionData->SetEditInReadonlyFlag(bVal);
}
}
- // <--
break;
case WID_SECT_PASSWORD:
{
@@ -956,7 +897,6 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
else if (RES_LR_SPACE == pEntry->nWID)
{
- // #109700#
if (!m_pProps->m_pLRSpaceItem.get())
{
m_pProps->m_pLRSpaceItem.reset(
@@ -985,7 +925,7 @@ SwXTextSection::setPropertyValues(
throw (beans::PropertyVetoException, lang::IllegalArgumentException,
lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// workaround for bad designed API
try
@@ -1001,16 +941,14 @@ throw (beans::PropertyVetoException, lang::IllegalArgumentException,
throw aWExc;
}
}
-/*-- 10.12.98 14:47:11---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextSection::setPropertyValue(
const OUString& rPropertyName, const uno::Any& rValue)
throw (beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< ::rtl::OUString > aPropertyNames(1);
aPropertyNames.getArray()[0] = rPropertyName;
@@ -1019,9 +957,6 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
m_pImpl->SetPropertyValues_Impl( aPropertyNames, aValues );
}
-/* -----------------------------12.02.01 10:43--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Any >
SwXTextSection::Impl::GetPropertyValues_Impl(
const uno::Sequence< OUString > & rPropertyNames )
@@ -1086,7 +1021,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
case WID_SECT_DDE_AUTOUPDATE:
{
// GetUpdateType() returns .._ALWAYS or .._ONCALL
- if (pSect && pSect->IsLinkType() && pSect->IsConnected()) // lijian i73247
+ if (pSect && pSect->IsLinkType() && pSect->IsConnected()) // #i73247#
{
const sal_Bool bTemp =
(pSect->GetUpdateType() == sfx2::LINKUPDATE_ALWAYS);
@@ -1153,7 +1088,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
pRet[nProperty] <<= bTemp;
}
break;
- // --> FME 2004-06-22 #114856# edit in readonly sections
case WID_SECT_EDIT_IN_READONLY:
{
const sal_Bool bTemp = (m_bIsDescriptor)
@@ -1161,7 +1095,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
pRet[nProperty] <<= bTemp;
}
break;
- // <--
case FN_PARAM_LINK_DISPLAY_NAME:
{
if (pFmt)
@@ -1210,7 +1143,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
case FN_UNO_REDLINE_NODE_END:
{
if (!pFmt)
- break; // lijian i73247
+ break; // #i73247#
SwNode* pSectNode = pFmt->GetSectionNode();
if (FN_UNO_REDLINE_NODE_END == pEntry->nWID)
{
@@ -1316,7 +1249,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
pQueryItem = m_pProps->m_pFrameDirItem.get();
}
- /* -> #109700# */
else if (RES_LR_SPACE == pEntry->nWID)
{
if (!m_pProps->m_pLRSpaceItem.get())
@@ -1326,7 +1258,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
pQueryItem = m_pProps->m_pLRSpaceItem.get();
}
- /* <- #109700# */
if (pQueryItem)
{
pQueryItem->QueryValue(pRet[nProperty],
@@ -1339,15 +1270,12 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
return aRet;
}
-/* -----------------------------04.11.03 10:43--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Any > SAL_CALL
SwXTextSection::getPropertyValues(
const uno::Sequence< ::rtl::OUString >& rPropertyNames)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< uno::Any > aValues;
// workaround for bad designed API
@@ -1370,23 +1298,19 @@ throw (uno::RuntimeException)
return aValues;
}
-/*-- 10.12.98 14:47:12---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXTextSection::getPropertyValue(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< ::rtl::OUString > aPropertyNames(1);
aPropertyNames.getArray()[0] = rPropertyName;
return m_pImpl->GetPropertyValues_Impl(aPropertyNames).getConstArray()[0];
}
-/* -----------------------------12.02.01 10:30--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextSection::addPropertiesChangeListener(
const uno::Sequence< OUString >& /*aPropertyNames*/,
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
@@ -1396,9 +1320,6 @@ throw (uno::RuntimeException)
"SwXTextSection::addPropertiesChangeListener(): not implemented");
}
-/* -----------------------------12.02.01 10:30--------------------------------
-
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextSection::removePropertiesChangeListener(
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
throw (uno::RuntimeException)
@@ -1407,9 +1328,6 @@ throw (uno::RuntimeException)
"SwXTextSection::removePropertiesChangeListener(): not implemented");
}
-/* -----------------------------12.02.01 10:30--------------------------------
-
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextSection::firePropertiesChangeEvent(
const uno::Sequence< OUString >& /*aPropertyNames*/,
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
@@ -1419,9 +1337,6 @@ void SAL_CALL SwXTextSection::firePropertiesChangeEvent(
"SwXTextSection::firePropertiesChangeEvent(): not implemented");
}
-/*-- 10.12.98 14:47:13---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXTextSection::addPropertyChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -1466,28 +1381,23 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
"SwXTextSection::removeVetoableChangeListener(): not implemented");
}
-/*-- 08.11.00 10:47:55---------------------------------------------------
-
- -----------------------------------------------------------------------*/
beans::PropertyState SAL_CALL
SwXTextSection::getPropertyState(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< OUString > aNames(1);
aNames.getArray()[0] = rPropertyName;
return getPropertyStates(aNames).getConstArray()[0];
}
-/*-- 08.11.00 10:47:55---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyState > SAL_CALL
SwXTextSection::getPropertyStates(
const uno::Sequence< OUString >& rPropertyNames)
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt();
if (!pFmt && !m_pImpl->m_bIsDescriptor)
@@ -1520,9 +1430,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
case WID_SECT_REGION :
case WID_SECT_VISIBLE:
case WID_SECT_PROTECTED:
- // --> FME 2004-06-22 #114856# edit in readonly sections
case WID_SECT_EDIT_IN_READONLY:
- // <--
case FN_PARAM_LINK_DISPLAY_NAME:
case FN_UNO_ANCHOR_TYPES:
case FN_UNO_TEXT_WRAP:
@@ -1567,14 +1475,11 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
return aStates;
}
-/*-- 08.11.00 10:47:55---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXTextSection::setPropertyToDefault(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt();
if (!pFmt && !m_pImpl->m_bIsDescriptor)
@@ -1669,7 +1574,6 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
}
}
break;
- // --> FME 2004-06-22 #114856# edit in readonly sections
case WID_SECT_EDIT_IN_READONLY:
{
if (m_pImpl->m_bIsDescriptor)
@@ -1717,15 +1621,12 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
lcl_UpdateSection(pFmt, pSectionData, pNewAttrSet, bLinkModeChanged);
}
-/*-- 08.11.00 10:47:56---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXTextSection::getPropertyDefault(const OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt();
@@ -1760,9 +1661,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
break;
case WID_SECT_PROTECTED:
- // --> FME 2004-06-22 #114856# edit in readonly sections
case WID_SECT_EDIT_IN_READONLY:
- // <--
{
sal_Bool bTemp = sal_False;
aRet.setValue( &bTemp, ::getCppuBooleanType());
@@ -1785,12 +1684,9 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
return aRet;
}
-/*-- 10.12.98 14:47:15---------------------------------------------------
-
- -----------------------------------------------------------------------*/
OUString SAL_CALL SwXTextSection::getName() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
::rtl::OUString sRet;
SwSectionFmt const*const pFmt = m_pImpl->GetSectionFmt();
@@ -1808,13 +1704,11 @@ OUString SAL_CALL SwXTextSection::getName() throw (uno::RuntimeException)
}
return sRet;
}
-/*-- 10.12.98 14:47:16---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXTextSection::setName(const OUString& rName)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt();
if(pFmt)
@@ -1858,26 +1752,21 @@ throw (uno::RuntimeException)
throw uno::RuntimeException();
}
}
-/* -----------------02.11.99 11:30-------------------
- --------------------------------------------------*/
OUString SAL_CALL
SwXTextSection::getImplementationName() throw (uno::RuntimeException)
{
return C2U("SwXTextSection");
}
-/* -----------------02.11.99 11:30-------------------
-
- --------------------------------------------------*/
static char const*const g_ServicesTextSection[] =
{
"com.sun.star.text.TextContent",
"com.sun.star.text.TextSection",
"com.sun.star.document.LinkTarget",
};
-static const size_t g_nServicesTextSection(
- sizeof(g_ServicesTextSection)/sizeof(g_ServicesTextSection[0]));
+
+static const size_t g_nServicesTextSection(SAL_N_ELEMENTS(g_ServicesTextSection));
sal_Bool SAL_CALL SwXTextSection::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
@@ -1886,9 +1775,6 @@ throw (uno::RuntimeException)
g_nServicesTextSection, g_ServicesTextSection, rServiceName);
}
-/* -----------------02.11.99 11:30-------------------
-
- --------------------------------------------------*/
uno::Sequence< OUString > SAL_CALL
SwXTextSection::getSupportedServiceNames() throw (uno::RuntimeException)
{
@@ -1896,7 +1782,6 @@ SwXTextSection::getSupportedServiceNames() throw (uno::RuntimeException)
g_nServicesTextSection, g_ServicesTextSection);
}
-
// MetadatableMixin
::sfx2::Metadatable* SwXTextSection::GetCoreObject()
{
@@ -1915,3 +1800,4 @@ uno::Reference<frame::XModel> SwXTextSection::GetModel()
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index b175cbc709d4..dc407cbed2bb 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,16 +66,14 @@
#include <editeng/flstitem.hxx>
#include <vcl/metric.hxx>
#include <svtools/ctrltool.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <editeng/unofdesc.hxx>
#include <fmtornt.hxx>
#include <SwStyleNameMapper.hxx>
-// --> OD 2008-01-15 #newlistlevelattrs#
#include <com/sun/star/text/PositionAndSpaceMode.hpp>
#include <com/sun/star/text/LabelFollow.hpp>
-// <--
#include <numrule.hxx>
using ::rtl::OUString;
@@ -85,6 +84,8 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::text;
using namespace ::com::sun::star::style;
+using rtl::OUString;
+
struct PropValData
{
uno::Any aVal;
@@ -138,6 +139,7 @@ const SfxItemPropertySet* GetFootnoteSet()
static SfxItemPropertySet aFootnoteSet_Impl(aFootnoteMap_Impl);
return &aFootnoteSet_Impl;
}
+
const SfxItemPropertySet* GetEndnoteSet()
{
static SfxItemPropertyMapEntry aEndnoteMap_Impl[] =
@@ -155,6 +157,7 @@ const SfxItemPropertySet* GetEndnoteSet()
static SfxItemPropertySet aEndnoteSet_Impl(aEndnoteMap_Impl);
return &aEndnoteSet_Impl;
}
+
const SfxItemPropertySet* GetNumberingRulesSet()
{
static SfxItemPropertyMapEntry aNumberingRulesMap_Impl[] =
@@ -170,6 +173,7 @@ const SfxItemPropertySet* GetNumberingRulesSet()
static SfxItemPropertySet aNumberingRulesSet_Impl( aNumberingRulesMap_Impl );
return &aNumberingRulesSet_Impl;
}
+
#define WID_NUM_ON 0
#define WID_SEPARATOR_INTERVAL 1
#define WID_NUMBERING_TYPE 2
@@ -177,7 +181,6 @@ const SfxItemPropertySet* GetNumberingRulesSet()
#define WID_DISTANCE 4
#define WID_INTERVAL 5
#define WID_SEPARATOR_TEXT 6
-//#define WID_CHARACTER_STYLE 7
#define WID_COUNT_EMPTY_LINES 8
#define WID_COUNT_LINES_IN_FRAMES 9
#define WID_RESTART_AT_EACH_PAGE 10
@@ -203,9 +206,6 @@ const SfxItemPropertySet* GetLineNumberingSet()
return &aLineNumberingSet_Impl;
}
-/* -----------------05.05.98 08:30-------------------
- *
- * --------------------------------------------------*/
SwCharFmt* lcl_getCharFmt(SwDoc* pDoc, const uno::Any& aValue)
{
SwCharFmt* pRet = 0;
@@ -226,9 +226,7 @@ SwCharFmt* lcl_getCharFmt(SwDoc* pDoc, const uno::Any& aValue)
}
return pRet;
}
-/* -----------------05.05.98 08:30-------------------
- *
- * --------------------------------------------------*/
+
SwTxtFmtColl* lcl_GetParaStyle(SwDoc* pDoc, const uno::Any& aValue)
{
OUString uTmp;
@@ -244,9 +242,7 @@ SwTxtFmtColl* lcl_GetParaStyle(SwDoc* pDoc, const uno::Any& aValue)
}
return pRet;
}
-/* -----------------05.05.98 08:30-------------------
- *
- * --------------------------------------------------*/
+
SwPageDesc* lcl_GetPageDesc(SwDoc* pDoc, const uno::Any& aValue)
{
SwPageDesc* pRet = 0;
@@ -273,9 +269,7 @@ SwPageDesc* lcl_GetPageDesc(SwDoc* pDoc, const uno::Any& aValue)
}
return pRet;
}
-/******************************************************************************
- *
- ******************************************************************************/
+
// Numerierung
const unsigned short aSvxToUnoAdjust[] =
{
@@ -300,23 +294,16 @@ const unsigned short aUnoToSvxAdjust[] =
/******************************************************************
* SwXFootnoteProperties
******************************************************************/
-/* -----------------------------06.04.00 11:43--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXFootnoteProperties::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXFootnoteProperties");
}
-/* -----------------------------06.04.00 11:43--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXFootnoteProperties::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.FootnoteSettings") == rServiceName;
}
-/* -----------------------------06.04.00 11:43--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXFootnoteProperties::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
@@ -324,37 +311,29 @@ Sequence< OUString > SwXFootnoteProperties::getSupportedServiceNames(void) throw
pArray[0] = C2U("com.sun.star.text.FootnoteSettings");
return aRet;
}
-/*-- 14.12.98 14:03:20---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXFootnoteProperties::SwXFootnoteProperties(SwDoc* pDc) :
pDoc(pDc),
m_pPropertySet(GetFootnoteSet())
{
}
-/*-- 14.12.98 14:03:20---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXFootnoteProperties::~SwXFootnoteProperties()
{
}
-/*-- 14.12.98 14:03:20---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXFootnoteProperties::getPropertySetInfo(void)
throw( uno::RuntimeException )
{
static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
return aRef;
}
-/*-- 14.12.98 14:03:20---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue)
throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(pDoc)
{
const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap()->getByName( rPropertyName );
@@ -472,13 +451,11 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons
else
throw uno::RuntimeException();
}
-/*-- 14.12.98 14:03:21---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
if(pDoc)
{
@@ -595,36 +572,28 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
throw uno::RuntimeException();
return aRet;
}
-/*-- 14.12.98 14:03:21---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFootnoteProperties::addPropertyChangeListener(
const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 14:03:21---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFootnoteProperties::removePropertyChangeListener(
const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 14:03:21---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFootnoteProperties::addVetoableChangeListener(
const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 14:03:22---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFootnoteProperties::removeVetoableChangeListener(
const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
@@ -635,23 +604,16 @@ void SwXFootnoteProperties::removeVetoableChangeListener(
/******************************************************************
* SwXEndnoteProperties
******************************************************************/
-/* -----------------------------06.04.00 11:45--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXEndnoteProperties::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXEndnoteProperties");
}
-/* -----------------------------06.04.00 11:45--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXEndnoteProperties::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.FootnoteSettings") == rServiceName;
}
-/* -----------------------------06.04.00 11:45--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXEndnoteProperties::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
@@ -659,38 +621,30 @@ Sequence< OUString > SwXEndnoteProperties::getSupportedServiceNames(void) throw(
pArray[0] = C2U("com.sun.star.text.FootnoteSettings");
return aRet;
}
-/*-- 14.12.98 14:27:39---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXEndnoteProperties::SwXEndnoteProperties(SwDoc* pDc) :
pDoc(pDc),
m_pPropertySet(GetEndnoteSet())
{
}
-/*-- 14.12.98 14:27:39---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXEndnoteProperties::~SwXEndnoteProperties()
{
}
-/*-- 14.12.98 14:27:40---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXEndnoteProperties::getPropertySetInfo(void) throw( uno::RuntimeException )
{
static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
return aRef;
}
-/*-- 14.12.98 14:27:40---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue)
throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException,
lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(pDoc)
{
const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap()->getByName( rPropertyName );
@@ -763,13 +717,11 @@ void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const
throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
}
}
-/*-- 14.12.98 14:27:41---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
if(pDoc)
{
@@ -853,60 +805,46 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName)
}
return aRet;
}
-/*-- 14.12.98 14:27:41---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXEndnoteProperties::addPropertyChangeListener(
const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 14:27:41---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXEndnoteProperties::removePropertyChangeListener(const OUString& /*PropertyName*/,
const uno:: Reference< beans::XPropertyChangeListener > & /*xListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 14:27:41---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXEndnoteProperties::addVetoableChangeListener(const OUString& /*PropertyName*/,
const uno:: Reference< beans::XVetoableChangeListener > & /*xListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 14:27:42---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXEndnoteProperties::removeVetoableChangeListener(const OUString& /*PropertyName*/, const uno:: Reference< beans::XVetoableChangeListener > & /*xListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
+
/******************************************************************
* SwXLineNumberingProperties
******************************************************************/
-/* -----------------------------06.04.00 11:47--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXLineNumberingProperties::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXLineNumberingProperties");
}
-/* -----------------------------06.04.00 11:47--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXLineNumberingProperties::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.LineNumberingProperties") == rServiceName;
}
-/* -----------------------------06.04.00 11:47--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXLineNumberingProperties::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
@@ -914,39 +852,31 @@ Sequence< OUString > SwXLineNumberingProperties::getSupportedServiceNames(void)
pArray[0] = C2U("com.sun.star.text.LineNumberingProperties");
return aRet;
}
-/*-- 14.12.98 14:33:36---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXLineNumberingProperties::SwXLineNumberingProperties(SwDoc* pDc) :
pDoc(pDc),
m_pPropertySet(GetLineNumberingSet())
{
}
-/*-- 14.12.98 14:33:37---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXLineNumberingProperties::~SwXLineNumberingProperties()
{
}
-/*-- 14.12.98 14:33:37---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXLineNumberingProperties::getPropertySetInfo(void) throw( uno::RuntimeException )
{
static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
return aRef;
}
-/*-- 14.12.98 14:33:37---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXLineNumberingProperties::setPropertyValue(
const OUString& rPropertyName, const Any& aValue)
throw( UnknownPropertyException, PropertyVetoException,
IllegalArgumentException, WrappedTargetException, RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(pDoc)
{
const SfxItemPropertySimpleEntry* pEntry = m_pPropertySet->getPropertyMap()->getByName( rPropertyName );
@@ -1060,13 +990,11 @@ void SwXLineNumberingProperties::setPropertyValue(
else
throw uno::RuntimeException();
}
-/*-- 14.12.98 14:33:38---------------------------------------------------
- -----------------------------------------------------------------------*/
Any SwXLineNumberingProperties::getPropertyValue(const OUString& rPropertyName)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Any aRet;
if(pDoc)
{
@@ -1166,35 +1094,28 @@ Any SwXLineNumberingProperties::getPropertyValue(const OUString& rPropertyName)
throw uno::RuntimeException();
return aRet;
}
-/*-- 14.12.98 14:33:38---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXLineNumberingProperties::addPropertyChangeListener(const OUString& /*rPropertyName*/, const uno:: Reference< beans::XPropertyChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 14:33:38---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXLineNumberingProperties::removePropertyChangeListener(const OUString& /*rPropertyName*/, const uno:: Reference< beans::XPropertyChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 14:33:39---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXLineNumberingProperties::addVetoableChangeListener(const OUString& /*rPropertyName*/, const uno:: Reference< beans::XVetoableChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 14:33:39---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXLineNumberingProperties::removeVetoableChangeListener(const OUString& /*rPropertyName*/, const uno:: Reference< beans::XVetoableChangeListener > & /*xListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
+
/******************************************************************
* SwXNumberingRules
******************************************************************/
@@ -1204,17 +1125,13 @@ const String& SwXNumberingRules::GetInvalidStyle()
{
return sInvalidStyle;
}
-/* -----------------------------10.03.00 17:05--------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXNumberingRules::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 17:05--------------------------------
- ---------------------------------------------------------------------------*/
// return implementation specific data
sal_Int64 SwXNumberingRules::getSomething( const uno::Sequence< sal_Int8 > & rId ) throw(uno::RuntimeException)
{
@@ -1227,23 +1144,16 @@ sal_Int64 SwXNumberingRules::getSomething( const uno::Sequence< sal_Int8 > & rId
return 0;
}
-/* -----------------------------06.04.00 11:47--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXNumberingRules::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXNumberingRules");
}
-/* -----------------------------06.04.00 11:47--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXNumberingRules::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.NumberingRules") == rServiceName;
}
-/* -----------------------------06.04.00 11:47--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXNumberingRules::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
@@ -1252,9 +1162,6 @@ Sequence< OUString > SwXNumberingRules::getSupportedServiceNames(void) throw( Ru
return aRet;
}
-/*-- 14.12.98 14:57:57---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXNumberingRules::SwXNumberingRules(const SwNumRule& rRule) :
pDoc(0),
pDocShell(0),
@@ -1284,9 +1191,7 @@ SwXNumberingRules::SwXNumberingRules(const SwNumRule& rRule) :
sNewBulletFontNames[i] = SwXNumberingRules::GetInvalidStyle();
}
}
-/* -----------------22.02.99 16:35-------------------
- *
- * --------------------------------------------------*/
+
SwXNumberingRules::SwXNumberingRules(SwDocShell& rDocSh) :
pDoc(0),
pDocShell(&rDocSh),
@@ -1296,9 +1201,7 @@ SwXNumberingRules::SwXNumberingRules(SwDocShell& rDocSh) :
{
pDocShell->GetDoc()->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
}
-/* -----------------------------24.08.00 11:36--------------------------------
- ---------------------------------------------------------------------------*/
SwXNumberingRules::SwXNumberingRules(SwDoc& rDoc) :
pDoc(&rDoc),
pDocShell(0),
@@ -1311,35 +1214,29 @@ SwXNumberingRules::SwXNumberingRules(SwDoc& rDoc) :
#if OSL_DEBUG_LEVEL > 1
sal_uInt16 nIndex =
#endif
- // --> OD 2008-02-11 #newlistlevelattrs#
rDoc.MakeNumRule( sCreatedNumRuleName, 0, sal_False,
// --> OD 2008-06-06 #i89178#
numfunc::GetDefaultPositionAndSpaceMode() );
// <--
- // <--
#if OSL_DEBUG_LEVEL > 1
(void)nIndex;
#endif
}
-/*-- 14.12.98 14:57:57---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXNumberingRules::~SwXNumberingRules()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(pDoc && sCreatedNumRuleName.Len())
pDoc->DelNumRule( sCreatedNumRuleName );
if( pNumRule && bOwnNumRuleCreated )
delete pNumRule;
}
-/*-- 14.12.98 14:57:58---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXNumberingRules::replaceByIndex(sal_Int32 nIndex, const uno::Any& rElement)
throw( lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(nIndex < 0 || MAXLEVEL <= nIndex)
throw lang::IndexOutOfBoundsException();
@@ -1353,12 +1250,8 @@ void SwXNumberingRules::replaceByIndex(sal_Int32 nIndex, const uno::Any& rElemen
rProperties, nIndex);
else if(pDocShell)
{
- // --> OD 2008-04-21 #i87650# - correction of cws swwarnings:
- // Do not set member <pNumRule>
-// pNumRule = pDocShell->GetDoc()->GetOutlineNumRule();
-// SwNumRule aNumRule(*pNumRule);
+ // #i87650# - correction of cws swwarnings:
SwNumRule aNumRule( *(pDocShell->GetDoc()->GetOutlineNumRule()) );
- // <--
SwXNumberingRules::SetNumberingRuleByIndex( aNumRule,
rProperties, nIndex);
//hier noch die Zeichenformate bei Bedarf setzen
@@ -1410,21 +1303,17 @@ void SwXNumberingRules::replaceByIndex(sal_Int32 nIndex, const uno::Any& rElemen
throw uno::RuntimeException();
}
-/*-- 14.12.98 14:57:58---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXNumberingRules::getCount(void) throw( uno::RuntimeException )
{
return MAXLEVEL;
}
-/*-- 14.12.98 14:57:58---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXNumberingRules::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(nIndex < 0 || MAXLEVEL <= nIndex)
throw lang::IndexOutOfBoundsException();
@@ -1449,28 +1338,22 @@ uno::Any SwXNumberingRules::getByIndex(sal_Int32 nIndex)
throw uno::RuntimeException();
return aVal;
}
-/*-- 14.12.98 14:57:59---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SwXNumberingRules::getElementType(void)
throw( uno::RuntimeException )
{
return ::getCppuType((uno::Sequence<beans::PropertyValue>*)0);
}
-/*-- 14.12.98 14:57:59---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXNumberingRules::hasElements(void) throw( uno::RuntimeException )
{
return sal_True;
}
-/*-- 14.12.98 14:57:59---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
const SwNumRule& rNumRule, sal_Int32 nIndex) const
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
DBG_ASSERT( 0 <= nIndex && nIndex < MAXLEVEL, "index out of range" );
const SwNumFmt& rFmt = rNumRule.Get( (sal_uInt16)nIndex );
@@ -1522,7 +1405,6 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
pData = new PropValData((void*)&nINT16, "StartWith", ::getCppuType((const sal_Int16*)0));
aPropertyValues.Insert(pData, aPropertyValues.Count());
- // --> OD 2008-01-23 #newlistlevelattrs#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
//leftmargin
@@ -1540,9 +1422,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
pData = new PropValData((void*)&nINT32, SW_PROP_NAME_STR(UNO_NAME_FIRST_LINE_OFFSET), ::getCppuType((const sal_Int32*)0));
aPropertyValues.Insert(pData, aPropertyValues.Count());
}
- // <--
- // --> OD 2008-01-15 #newlistlevelattrs#
// PositionAndSpaceMode
nINT16 = PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION;
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
@@ -1592,7 +1472,6 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
::getCppuType((const sal_Int32*)0));
aPropertyValues.Insert(pData, aPropertyValues.Count());
}
- // <--
//numberingtype
nINT16 = rFmt.GetNumberingType();
@@ -1659,11 +1538,8 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
aPropertyValues.Insert(pData, aPropertyValues.Count());
}
Size aSize = rFmt.GetGraphicSize();
- // --> OD 2010-05-04 #i101131# - applying patch from CMC
+ // #i101131#
// adjust conversion due to type mismatch between <Size> and <awt::Size>
-// aSize.Width() = TWIP_TO_MM100( aSize.Width() );
-// aSize.Height() = TWIP_TO_MM100( aSize.Height() );
-// pData = new PropValData((void*)&aSize, SW_PROP_NAME_STR(UNO_NAME_GRAPHIC_SIZE), ::getCppuType((const awt::Size*)0));
awt::Size aAwtSize(TWIP_TO_MM100(aSize.Width()), TWIP_TO_MM100(aSize.Height()));
pData = new PropValData((void*)&aAwtSize, SW_PROP_NAME_STR(UNO_NAME_GRAPHIC_SIZE), ::getCppuType((const awt::Size*)0));
// <--
@@ -1728,12 +1604,10 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
aPropertyValues.DeleteAndDestroy(0, aPropertyValues.Count());
return aSeq;
}
-/*-- 14.12.98 14:57:59---------------------------------------------------
- -----------------------------------------------------------------------*/
PropValData* lcl_FindProperty(const char* cName, PropValDataArr& rPropertyValues)
{
- OUString sCmp = C2U(cName);
+ OUString sCmp = rtl::OUString::createFromAscii(cName);
for(sal_uInt16 i = 0; i < rPropertyValues.Count(); i++)
{
PropValData* pTemp = rPropertyValues.GetObject(i);
@@ -1742,14 +1616,13 @@ PropValData* lcl_FindProperty(const char* cName, PropValDataArr& rPropertyVal
}
return 0;
}
-//-----------------------------------------------------------------------
void SwXNumberingRules::SetNumberingRuleByIndex(
SwNumRule& rNumRule,
const uno::Sequence<beans::PropertyValue>& rProperties, sal_Int32 nIndex)
throw( uno::RuntimeException, lang::IllegalArgumentException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
DBG_ASSERT( 0 <= nIndex && nIndex < MAXLEVEL, "index out of range" );
// the order of the names is important!
@@ -1764,13 +1637,11 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
SW_PROP_NAME_STR(UNO_NAME_LEFT_MARGIN), //6
SW_PROP_NAME_STR(UNO_NAME_SYMBOL_TEXT_DISTANCE), //7
SW_PROP_NAME_STR(UNO_NAME_FIRST_LINE_OFFSET), //8
- // --> OD 2008-01-15 #newlistlevelattrs#
SW_PROP_NAME_STR(UNO_NAME_POSITION_AND_SPACE_MODE), //9
SW_PROP_NAME_STR(UNO_NAME_LABEL_FOLLOWED_BY), //10
SW_PROP_NAME_STR(UNO_NAME_LISTTAB_STOP_POSITION), //11
SW_PROP_NAME_STR(UNO_NAME_FIRST_LINE_INDENT), //12
SW_PROP_NAME_STR(UNO_NAME_INDENT_AT), //13
- // <--
"NumberingType", //14
"BulletId", //15
SW_PROP_NAME_STR(UNO_NAME_BULLET_FONT), //16
@@ -1782,10 +1653,8 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
SW_PROP_NAME_STR(UNO_NAME_VERT_ORIENT), //22
SW_PROP_NAME_STR(UNO_NAME_HEADING_STYLE_NAME) //23
};
- // --> OD 2008-01-15 #newlistlevelattrs#
const sal_uInt16 nPropNameCount = 24;
const sal_uInt16 nNotInChapter = 15;
- // <--
const beans::PropertyValue* pPropArray = rProperties.getConstArray();
PropValDataArr aPropertyValues;
@@ -1909,10 +1778,9 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
}
}
aFmt.SetCharFmt( pCharFmt );
- // os 2005-08-22 #i51842#
+ // #i51842#
// If the character format has been found it's name should not be in the
// char style names array
- //sNewCharStyleNames[(sal_uInt16)nIndex] = sCharFmtName;
sNewCharStyleNames[(sal_uInt16)nIndex].Erase();
}
else
@@ -1953,7 +1821,6 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
aFmt.SetFirstLineOffset((short)nValue);
}
break;
- // --> OD 2008-01-15 #newlistlevelattrs#
case 9: // UNO_NAME_POSITION_AND_SPACE_MODE
{
sal_Int16 nValue = 0;
@@ -2025,7 +1892,6 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
aFmt.SetIndentAt( nValue );
}
break;
- // <--
case 14: //"NumberingType"
{
sal_Int16 nSet = 0;
@@ -2050,7 +1916,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
awt::FontDescriptor* pDesc = (awt::FontDescriptor*)pData->aVal.getValue();
if(pDesc)
{
- // --> OD 2008-09-11 #i93725#
+ // #i93725#
// do not accept "empty" font
if ( pDesc->Name.getLength() > 0 )
{
@@ -2179,12 +2045,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
SwTxtFmtColl &rTxtColl = *((*pColls)[k]);
if(rTxtColl.IsDefault())
continue;
- //if(rTxtColl.GetOutlineLevel() == nIndex && //#outline level,removed by zhaojianwei
- // rTxtColl.GetName() != sStyleName)
- // rTxtColl..SetOutlineLevel(NO_NUMBERING);
- //else if(rTxtColl.GetName() == sStyleName)
- // rTxtColl.SetOutlineLevel(sal_Int8(nIndex));
- if ( rTxtColl.IsAssignedToListLevelOfOutlineStyle() && //add by zhaojianwei
+ if ( rTxtColl.IsAssignedToListLevelOfOutlineStyle() &&
rTxtColl.GetAssignedOutlineStyleLevel() == nIndex &&
rTxtColl.GetName() != sStyleName )
{
@@ -2193,7 +2054,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
else if ( rTxtColl.GetName() == sStyleName )
{
rTxtColl.AssignToListLevelOfOutlineStyle( nIndex );
- } //<-end,,zhaojianwei,
+ }
}
}
break;
@@ -2245,18 +2106,14 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
rNumRule.Set( (sal_uInt16)nIndex, aFmt );
}
-/*-- 19.07.00 07:49:17---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< XPropertySetInfo > SwXNumberingRules::getPropertySetInfo()
throw(RuntimeException)
{
static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropertySet->getPropertySetInfo();
return aRef;
}
-/*-- 19.07.00 07:49:17---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXNumberingRules::setPropertyValue( const OUString& rPropertyName, const Any& rValue )
throw(UnknownPropertyException, PropertyVetoException,
IllegalArgumentException, WrappedTargetException, RuntimeException)
@@ -2310,13 +2167,11 @@ void SwXNumberingRules::setPropertyValue( const OUString& rPropertyName, const A
pDocRule ? pDocRule->SetRuleType(eNumRuleType) :
pCreatedRule ? pCreatedRule->SetRuleType(eNumRuleType) : pNumRule->SetRuleType(eNumRuleType);
}
- // --> OD 2008-04-23 #refactorlists#
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DEFAULT_LIST_ID)))
{
delete pDocRule;
throw IllegalArgumentException();
}
- // <--
else
throw UnknownPropertyException();
@@ -2330,9 +2185,7 @@ void SwXNumberingRules::setPropertyValue( const OUString& rPropertyName, const A
pCreatedRule->Validate();
}
}
-/*-- 19.07.00 07:49:18---------------------------------------------------
- -----------------------------------------------------------------------*/
Any SwXNumberingRules::getPropertyValue( const OUString& rPropertyName )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
@@ -2367,53 +2220,41 @@ Any SwXNumberingRules::getPropertyValue( const OUString& rPropertyName )
sal_Bool bVal = pRule->IsOutlineRule();
aRet.setValue(&bVal, ::getBooleanCppuType());
}
- // --> OD 2008-04-23 #refactorlists#
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DEFAULT_LIST_ID)))
{
- ASSERT( pRule->GetDefaultListId().Len() != 0,
+ OSL_ENSURE( pRule->GetDefaultListId().Len() != 0,
"<SwXNumberingRules::getPropertyValue(..)> - no default list id found. Serious defect -> please inform OD." );
aRet <<= OUString(pRule->GetDefaultListId());
}
- // <--
else
throw UnknownPropertyException();
return aRet;
}
-/*-- 19.07.00 07:49:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXNumberingRules::addPropertyChangeListener(
const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
}
-/*-- 19.07.00 07:49:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXNumberingRules::removePropertyChangeListener(
const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
}
-/*-- 19.07.00 07:49:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXNumberingRules::addVetoableChangeListener(
const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
}
-/*-- 19.07.00 07:49:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXNumberingRules::removeVetoableChangeListener(
const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
}
-/* -----------------------------17.10.00 14:23--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXNumberingRules::getName() throw( RuntimeException )
{
String aString;
@@ -2422,7 +2263,7 @@ OUString SwXNumberingRules::getName() throw( RuntimeException )
SwStyleNameMapper::FillProgName(pNumRule->GetName(), aString, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE, sal_True );
return OUString ( aString );
}
- // --> OD 2005-10-25 #126347# - consider chapter numbering <SwXNumberingRules>
+ // consider chapter numbering <SwXNumberingRules>
else if ( pDocShell )
{
SwStyleNameMapper::FillProgName( pDocShell->GetDoc()->GetOutlineNumRule()->GetName(),
@@ -2433,18 +2274,14 @@ OUString SwXNumberingRules::getName() throw( RuntimeException )
else
return sCreatedNumRuleName;
}
-/* -----------------------------17.10.00 14:23--------------------------------
- ---------------------------------------------------------------------------*/
void SwXNumberingRules::setName(const OUString& /*rName*/) throw( RuntimeException )
{
RuntimeException aExcept;
aExcept.Message = C2U("readonly");
throw aExcept;
}
-/*-- 14.12.98 14:58:00---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXNumberingRules::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -2456,25 +2293,19 @@ void SwXNumberingRules::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
pDoc = 0;
}
}
-/* -----------------------------06.04.00 11:47--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXChapterNumbering::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXChapterNumbering");
}
-/* -----------------------------06.04.00 11:47--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXChapterNumbering::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
String sServiceName(rServiceName);
return sServiceName.EqualsAscii("com.sun.star.text.ChapterNumbering") ||
sServiceName.EqualsAscii("com.sun.star.text.NumberingRules");
}
-/* -----------------------------06.04.00 11:47--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXChapterNumbering::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(2);
@@ -2483,16 +2314,12 @@ Sequence< OUString > SwXChapterNumbering::getSupportedServiceNames(void) throw(
pArray[1] = C2U("com.sun.star.text.NumberingRules");
return aRet;
}
-/* -----------------22.02.99 16:33-------------------
- *
- * --------------------------------------------------*/
+
SwXChapterNumbering::SwXChapterNumbering(SwDocShell& rDocSh) :
SwXNumberingRules(rDocSh)
{
}
-/* -----------------22.02.99 16:33-------------------
- *
- * --------------------------------------------------*/
+
SwXChapterNumbering::~SwXChapterNumbering()
{
}
@@ -2500,23 +2327,16 @@ SwXChapterNumbering::~SwXChapterNumbering()
/******************************************************************
* SwXTextColumns
******************************************************************/
-/* -----------------------------06.04.00 11:47--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXTextColumns::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXTextColumns");
}
-/* -----------------------------06.04.00 11:47--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXTextColumns::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.TextColumns") == rServiceName;
}
-/* -----------------------------06.04.00 11:47--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXTextColumns::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
@@ -2524,9 +2344,7 @@ Sequence< OUString > SwXTextColumns::getSupportedServiceNames(void) throw( Runti
pArray[0] = C2U("com.sun.star.text.TextColumns");
return aRet;
}
-/* -----------------------------24.10.00 16:45--------------------------------
- ---------------------------------------------------------------------------*/
SwXTextColumns::SwXTextColumns(sal_uInt16 nColCount) :
nReference(0),
bIsAutomaticWidth(sal_True),
@@ -2541,9 +2359,7 @@ SwXTextColumns::SwXTextColumns(sal_uInt16 nColCount) :
if(nColCount)
setColumnCount(nColCount);
}
-/*-- 16.12.98 14:06:53---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextColumns::SwXTextColumns(const SwFmtCol& rFmtCol) :
nReference(0),
aTextColumns(rFmtCol.GetNumCols()),
@@ -2582,35 +2398,27 @@ SwXTextColumns::SwXTextColumns(const SwFmtCol& rFmtCol) :
case COLADJ_NONE: nSepLineVertAlign = style::VerticalAlignment_MIDDLE;
}
}
-/*-- 16.12.98 14:06:54---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextColumns::~SwXTextColumns()
{
}
-/*-- 16.12.98 14:06:54---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXTextColumns::getReferenceValue(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return nReference;
}
-/*-- 16.12.98 14:06:55---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int16 SwXTextColumns::getColumnCount(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return static_cast< sal_Int16>( aTextColumns.getLength() );
}
-/*-- 16.12.98 14:06:55---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextColumns::setColumnCount(sal_Int16 nColumns) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(nColumns <= 0)
throw uno::RuntimeException();
bIsAutomaticWidth = sal_True;
@@ -2628,21 +2436,17 @@ void SwXTextColumns::setColumnCount(sal_Int16 nColumns) throw( uno::RuntimeExcep
}
pCols[nColumns - 1].Width += nDiff;
}
-/*-- 16.12.98 14:06:55---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< TextColumn > SwXTextColumns::getColumns(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return aTextColumns;
}
-/*-- 16.12.98 14:06:56---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextColumns::setColumns(const uno::Sequence< TextColumn >& rColumns)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int32 nReferenceTemp = 0;
const TextColumn* prCols = rColumns.getConstArray();
for(long i = 0; i < rColumns.getLength(); i++)
@@ -2653,17 +2457,13 @@ void SwXTextColumns::setColumns(const uno::Sequence< TextColumn >& rColumns)
nReference = !nReferenceTemp ? USHRT_MAX : nReferenceTemp;
aTextColumns = rColumns;
}
-/*-- 25.10.00 10:15:39---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< XPropertySetInfo > SwXTextColumns::getPropertySetInfo( ) throw(RuntimeException)
{
static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropSet->getPropertySetInfo();
return aRef;
}
-/*-- 25.10.00 10:15:39---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextColumns::setPropertyValue( const OUString& rPropertyName, const Any& aValue )
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException,
WrappedTargetException, RuntimeException)
@@ -2734,9 +2534,7 @@ void SwXTextColumns::setPropertyValue( const OUString& rPropertyName, const Any&
break;
}
}
-/*-- 25.10.00 10:15:40---------------------------------------------------
- -----------------------------------------------------------------------*/
Any SwXTextColumns::getPropertyValue( const OUString& rPropertyName )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
@@ -2771,49 +2569,37 @@ Any SwXTextColumns::getPropertyValue( const OUString& rPropertyName )
}
return aRet;
}
-/*-- 25.10.00 10:15:40---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextColumns::addPropertyChangeListener(
const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
}
-/*-- 25.10.00 10:15:40---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextColumns::removePropertyChangeListener(
const OUString& /*rPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
}
-/*-- 25.10.00 10:15:40---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextColumns::addVetoableChangeListener(
const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
}
-/*-- 25.10.00 10:15:40---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextColumns::removeVetoableChangeListener(
const OUString& /*rPropertyName*/, const uno::Reference< XVetoableChangeListener >& /*xListener*/ )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
}
-/* -----------------------------25.10.00 11:04--------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXTextColumns::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXTextColumns::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -2826,3 +2612,4 @@ sal_Int64 SAL_CALL SwXTextColumns::getSomething( const uno::Sequence< sal_Int8 >
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx
index 0283773062ec..5d531b17d899 100644
--- a/sw/source/core/unocore/unosrch.cxx
+++ b/sw/source/core/unocore/unosrch.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,7 @@
#include <unobaseclass.hxx>
#include <unomid.h>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include "editeng/unolingu.hxx"
#include <com/sun/star/util/SearchOptions.hpp>
@@ -46,13 +47,6 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
-/******************************************************************************
- *
- ******************************************************************************/
-
-/* -----------------23.06.99 12:19-------------------
-
- --------------------------------------------------*/
class SwSearchProperties_Impl
{
beans::PropertyValue** pValueArr; //
@@ -69,9 +63,7 @@ public:
void FillItemSet(SfxItemSet& rSet, sal_Bool bIsValueSearch) const;
sal_Bool HasAttributes() const;
};
-/* -----------------23.06.99 13:08-------------------
- --------------------------------------------------*/
SwSearchProperties_Impl::SwSearchProperties_Impl() :
nArrLen(0),
aPropertyEntries( aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR)->getPropertyMap()->getPropertyEntries())
@@ -81,18 +73,14 @@ SwSearchProperties_Impl::SwSearchProperties_Impl() :
for(sal_uInt32 i = 0; i < nArrLen; i++)
pValueArr[i] = 0;
}
-/* -----------------23.06.99 13:08-------------------
- --------------------------------------------------*/
SwSearchProperties_Impl::~SwSearchProperties_Impl()
{
for(sal_uInt32 i = 0; i < nArrLen; i++)
delete pValueArr[i];
delete[] pValueArr;
}
-/* -----------------23.06.99 13:09-------------------
- --------------------------------------------------*/
void SwSearchProperties_Impl::SetProperties(const uno::Sequence< beans::PropertyValue >& aSearchAttribs)
throw( beans::UnknownPropertyException, lang::IllegalArgumentException, uno::RuntimeException )
{
@@ -121,9 +109,7 @@ void SwSearchProperties_Impl::SetProperties(const uno::Sequence< beans::Prope
pValueArr[nIndex] = new beans::PropertyValue(pProps[i]);
}
}
-/* -----------------23.06.99 13:08-------------------
- --------------------------------------------------*/
const uno::Sequence< beans::PropertyValue > SwSearchProperties_Impl::GetProperties() const
{
sal_uInt32 nPropCount = 0;
@@ -144,9 +130,7 @@ const uno::Sequence< beans::PropertyValue > SwSearchProperties_Impl::GetProperti
}
return aRet;
}
-/* -----------------23.06.99 13:06-------------------
- --------------------------------------------------*/
void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, sal_Bool bIsValueSearch) const
{
//
@@ -480,9 +464,7 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, sal_Bool bIsValueSea
delete pCasemapItem ;
delete pBrushItem ;
}
-/* -----------------23.06.99 14:18-------------------
- --------------------------------------------------*/
sal_Bool SwSearchProperties_Impl::HasAttributes() const
{
for(sal_uInt32 i = 0; i < nArrLen; i++)
@@ -491,9 +473,6 @@ sal_Bool SwSearchProperties_Impl::HasAttributes() const
return sal_False;
}
-/*-- 14.12.98 13:07:10 ---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextSearch::SwXTextSearch() :
pSearchProperties( new SwSearchProperties_Impl),
pReplaceProperties( new SwSearchProperties_Impl),
@@ -512,25 +491,19 @@ SwXTextSearch::SwXTextSearch() :
bIsValueSearch(sal_True)
{
}
-/*-- 14.12.98 13:07:12 ---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextSearch::~SwXTextSearch()
{
delete pSearchProperties;
delete pReplaceProperties;
}
-/* -----------------------------10.03.00 18:02--------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXTextSearch::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXTextSearch::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -542,55 +515,43 @@ sal_Int64 SAL_CALL SwXTextSearch::getSomething( const uno::Sequence< sal_Int8 >&
}
return 0;
}
-/*-- 14.12.98 13:07:12---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwXTextSearch::getSearchString(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return sSearchText;
}
-/*-- 14.12.98 13:07:12---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextSearch::setSearchString(const OUString& rString)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sSearchText = String(rString);
}
-/*-- 14.12.98 13:07:12---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwXTextSearch::getReplaceString(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return sReplaceText;
}
-/*-- 14.12.98 13:07:12---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextSearch::setReplaceString(const OUString& rReplaceString) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sReplaceText = String(rReplaceString);
}
-/*-- 14.12.98 13:07:13---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXTextSearch::getPropertySetInfo(void) throw( uno::RuntimeException )
{
static uno::Reference< beans::XPropertySetInfo > aRef = m_pPropSet->getPropertySetInfo();
return aRef;
}
-/*-- 14.12.98 13:07:13---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextSearch::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue)
throw( beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName(rPropertyName);
if(pEntry)
{
@@ -618,19 +579,17 @@ void SwXTextSearch::setPropertyValue(const OUString& rPropertyName, const uno::A
else
throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
}
-/*-- 14.12.98 13:07:13---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXTextSearch::getPropertyValue(const OUString& rPropertyName) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName(rPropertyName);
sal_Bool bSet = sal_False;
- sal_Int16 nSet = 0;
if(pEntry)
{
+ sal_Int16 nSet = 0;
switch(pEntry->nWID)
{
case WID_SEARCH_ALL : bSet = bAll; goto SET_BOOL;
@@ -657,127 +616,93 @@ SET_UINT16:
throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
return aRet;
}
-/*-- 14.12.98 13:07:13---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextSearch::addPropertyChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 13:07:13---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextSearch::removePropertyChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/) throw(beans::UnknownPropertyException, lang::WrappedTargetException,uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 13:07:14---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextSearch::addVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/) throw(beans::UnknownPropertyException, lang::WrappedTargetException,uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 13:07:14---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextSearch::removeVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/) throw(beans::UnknownPropertyException, lang::WrappedTargetException,uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 14.12.98 13:07:14---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextSearch::getValueSearch(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return bIsValueSearch;
}
-/*-- 14.12.98 13:07:15---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextSearch::setValueSearch(sal_Bool ValueSearch_) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
bIsValueSearch = ValueSearch_;
}
-/*-- 14.12.98 13:07:15---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyValue > SwXTextSearch::getSearchAttributes(void) throw( uno::RuntimeException )
{
return pSearchProperties->GetProperties();
}
-/*-- 14.12.98 13:07:16---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextSearch::setSearchAttributes(const uno::Sequence< beans::PropertyValue >& rSearchAttribs)
throw( beans::UnknownPropertyException, lang::IllegalArgumentException, uno::RuntimeException )
{
pSearchProperties->SetProperties(rSearchAttribs);
}
-/*-- 14.12.98 13:07:16---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyValue > SwXTextSearch::getReplaceAttributes(void)
throw( uno::RuntimeException )
{
return pReplaceProperties->GetProperties();
}
-/*-- 14.12.98 13:07:17---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextSearch::setReplaceAttributes(const uno::Sequence< beans::PropertyValue >& rReplaceAttribs)
throw( beans::UnknownPropertyException, lang::IllegalArgumentException, uno::RuntimeException )
{
pReplaceProperties->SetProperties(rReplaceAttribs);
}
-/* -----------------23.06.99 14:13-------------------
- --------------------------------------------------*/
void SwXTextSearch::FillSearchItemSet(SfxItemSet& rSet) const
{
pSearchProperties->FillItemSet(rSet, bIsValueSearch);
}
-/* -----------------23.06.99 14:14-------------------
- --------------------------------------------------*/
void SwXTextSearch::FillReplaceItemSet(SfxItemSet& rSet) const
{
pReplaceProperties->FillItemSet(rSet, bIsValueSearch);
}
-/* -----------------23.06.99 14:17-------------------
- --------------------------------------------------*/
sal_Bool SwXTextSearch::HasSearchAttributes() const
{
return pSearchProperties->HasAttributes();
}
-/* -----------------23.06.99 14:17-------------------
- --------------------------------------------------*/
sal_Bool SwXTextSearch::HasReplaceAttributes() const
{
return pReplaceProperties->HasAttributes();
}
-/* -----------------------------19.04.00 14:43--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXTextSearch::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXTextSearch");
}
-/* -----------------------------19.04.00 14:43--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXTextSearch::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.util.SearchDescriptor") == rServiceName ||
C2U("com.sun.star.util.ReplaceDescriptor") == rServiceName;
}
-/* -----------------------------19.04.00 14:43--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXTextSearch::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(2);
@@ -818,5 +743,4 @@ void SwXTextSearch::FillSearchOptions( util::SearchOptions& rSearchOpt ) const
// aSrchParam.SetSrchInSelection(TypeConversion::toBOOL(aVal));
}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index a039160d8360..95ca4eca6cf6 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <svx/svxids.hrc>
#include <hintids.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <svl/smplhint.hxx>
#include <svtools/ctrltool.hxx>
@@ -115,10 +116,6 @@ const IStyleAccess::SwAutoStyleFamily aAutoStyleByIndex[] =
using namespace ::com::sun::star;
using ::rtl::OUString;
-/******************************************************************************
- *
- ******************************************************************************/
-
//convert FN_... to RES_ in header and footer itemset
sal_uInt16 lcl_ConvertFNToRES(sal_uInt16 nFNId)
{
@@ -194,27 +191,19 @@ public:
SwDoc* getDoc() const { return pDoc; }
};
-
/******************************************************************
* SwXStyleFamilies
******************************************************************/
-/* -----------------------------06.04.00 11:24--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXStyleFamilies::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXStyleFamilies");
}
-/* -----------------------------06.04.00 11:24--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXStyleFamilies::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.style.StyleFamilies") == rServiceName;
}
-/* -----------------------------06.04.00 11:24--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXStyleFamilies::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(1);
@@ -222,9 +211,7 @@ uno::Sequence< OUString > SwXStyleFamilies::getSupportedServiceNames(void) throw
pArray[0] = C2U("com.sun.star.style.StyleFamilies");
return aRet;
}
-/*-- 16.12.98 15:13:26---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXStyleFamilies::SwXStyleFamilies(SwDocShell& rDocShell) :
SwUnoCollection(rDocShell.GetDoc()),
pDocShell(&rDocShell),
@@ -236,9 +223,7 @@ SwXStyleFamilies::SwXStyleFamilies(SwDocShell& rDocShell) :
{
}
-/*-- 16.12.98 15:13:26---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXStyleFamilies::~SwXStyleFamilies()
{
delete pxCharStyles;
@@ -247,16 +232,14 @@ SwXStyleFamilies::~SwXStyleFamilies()
delete pxPageStyles;
delete pxNumberingStyles;
}
-/*-- 21.12.98 12:05:22---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL SwXStyleFamilies::getByName(const OUString& Name)
throw(
container::NoSuchElementException,
lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// der Index kommt aus const unsigned short aStyleByIndex[] =
uno::Any aRet;
if(!IsValid())
@@ -275,9 +258,7 @@ uno::Any SAL_CALL SwXStyleFamilies::getByName(const OUString& Name)
throw container::NoSuchElementException();
return aRet;
}
-/*-- 21.12.98 12:05:22---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXStyleFamilies::getElementNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aNames(STYLE_FAMILY_COUNT);
@@ -289,9 +270,7 @@ uno::Sequence< OUString > SwXStyleFamilies::getElementNames(void) throw( uno::Ru
pNames[4] = C2U("NumberingStyles");
return aNames;
}
-/*-- 21.12.98 12:05:22---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXStyleFamilies::hasByName(const OUString& Name) throw( uno::RuntimeException )
{
if( Name.compareToAscii("CharacterStyles") == 0 ||
@@ -303,20 +282,16 @@ sal_Bool SwXStyleFamilies::hasByName(const OUString& Name) throw( uno::RuntimeEx
else
return sal_False;
}
-/*-- 16.12.98 15:13:27---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXStyleFamilies::getCount(void) throw( uno::RuntimeException )
{
return STYLE_FAMILY_COUNT;
}
-/*-- 16.12.98 15:13:27---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXStyleFamilies::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
if(nIndex < 0 || nIndex >= STYLE_FAMILY_COUNT)
throw lang::IndexOutOfBoundsException();
@@ -383,30 +358,24 @@ uno::Any SwXStyleFamilies::getByIndex(sal_Int32 nIndex)
throw uno::RuntimeException();
return aRet;
}
-/*-- 16.12.98 15:13:27---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SwXStyleFamilies::getElementType(void)
throw( uno::RuntimeException )
{
return ::getCppuType((const uno::Reference<container::XNameContainer>*)0);
}
-/*-- 16.12.98 15:13:28---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXStyleFamilies::hasElements(void) throw( uno::RuntimeException )
{
return sal_True;
}
-/*-- 16.12.98 15:13:28---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyleFamilies::loadStylesFromURL(const OUString& rURL,
const uno::Sequence< beans::PropertyValue >& aOptions)
throw( io::IOException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bLoadStyleText = sal_True;
sal_Bool bLoadStylePage = sal_True;
sal_Bool bLoadStyleOverwrite = sal_True;
@@ -449,50 +418,41 @@ void SwXStyleFamilies::loadStylesFromURL(const OUString& rURL,
else
throw uno::RuntimeException();
}
-/*-- 16.12.98 15:13:28---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyValue > SwXStyleFamilies::getStyleLoaderOptions(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< beans::PropertyValue > aSeq(5);
beans::PropertyValue* pArray = aSeq.getArray();
uno::Any aVal;
sal_Bool bTemp = sal_True;
aVal.setValue(&bTemp, ::getCppuBooleanType());
- pArray[0] = beans::PropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_LOAD_TEXT_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[0] = beans::PropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LOAD_TEXT_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
aVal.setValue(&bTemp, ::getCppuBooleanType());
- pArray[1] = beans::PropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_LOAD_FRAME_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[1] = beans::PropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LOAD_FRAME_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
aVal.setValue(&bTemp, ::getCppuBooleanType());
- pArray[2] = beans::PropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_LOAD_PAGE_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[2] = beans::PropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LOAD_PAGE_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
aVal.setValue(&bTemp, ::getCppuBooleanType());
- pArray[3] = beans::PropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_LOAD_NUMBERING_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[3] = beans::PropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LOAD_NUMBERING_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
aVal.setValue(&bTemp, ::getCppuBooleanType());
- pArray[4] = beans::PropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_OVERWRITE_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[4] = beans::PropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_OVERWRITE_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
return aSeq;
}
/******************************************************************
* SwXStyleFamily
******************************************************************/
-/* -----------------------------06.04.00 11:24--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXStyleFamily::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXStyleFamily");
}
-/* -----------------------------06.04.00 11:24--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXStyleFamily::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.style.StyleFamily") == rServiceName;
}
-/* -----------------------------06.04.00 11:24--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXStyleFamily::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(1);
@@ -500,41 +460,20 @@ uno::Sequence< OUString > SwXStyleFamily::getSupportedServiceNames(void) throw(
pArray[0] = C2U("com.sun.star.style.StyleFamily");
return aRet;
}
-/*-- 16.12.98 16:03:56---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXStyleFamily::SwXStyleFamily(SwDocShell* pDocSh, sal_uInt16 nFamily) :
eFamily((SfxStyleFamily)nFamily),
pBasePool(pDocSh->GetStyleSheetPool()),
pDocShell(pDocSh)
{
-/* switch( nFamily )
- {
- case SFX_STYLE_FAMILY_CHAR:
- _pPropMap = aSwMapProvider.GetPropertyMap(PROPERTY_MAP_CHAR_STYLE);
- break;
- case SFX_STYLE_FAMILY_PARA:
- _pPropMap = aSwMapProvider.GetPropertyMap(PROPERTY_MAP_PARA_STYLE);
- break;
- case SFX_STYLE_FAMILY_PAGE:
- _pPropMap = aSwMapProvider.GetPropertyMap(PROPERTY_MAP_PAGE_STYLE);
- break;
- case SFX_STYLE_FAMILY_FRAME:
- _pPropMap = aSwMapProvider.GetPropertyMap(PROPERTY_MAP_FRAME_STYLE);
- break;
- case SFX_STYLE_FAMILY_PSEUDO:
- _pPropMap = aSwMapProvider.GetPropertyMap(PROPERTY_MAP_NUM_STYLE);
- break;
- }*/
StartListening(*pBasePool);
}
-/*-- 16.12.98 16:03:56---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXStyleFamily::~SwXStyleFamily()
{
}
+
sal_Int32 lcl_GetCountOrName ( const SwDoc &rDoc, SfxStyleFamily eFamily, String *pString, sal_uInt16 nIndex = USHRT_MAX )
{
sal_Int32 nCount = 0;
@@ -629,8 +568,6 @@ sal_Int32 lcl_GetCountOrName ( const SwDoc &rDoc, SfxStyleFamily eFamily, String
{
const SwPageDesc& rDesc = rDoc.GetPageDesc(i);
- /*if(rDesc.IsDefault() || rDesc.IsAuto())
- continue;*/
if ( IsPoolUserFmt ( rDesc.GetPoolFmtId() ) )
{
if ( nIndex == nCount )
@@ -673,21 +610,17 @@ sal_Int32 lcl_GetCountOrName ( const SwDoc &rDoc, SfxStyleFamily eFamily, String
}
return nCount;
}
-/*-- 16.12.98 16:03:57---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXStyleFamily::getCount(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return lcl_GetCountOrName ( *pDocShell->GetDoc(), eFamily, NULL );
}
-/*-- 16.12.98 16:03:57---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXStyleFamily::getByIndex(sal_Int32 nTempIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
if ( nTempIndex >= 0 && nTempIndex < USHRT_MAX )
{
@@ -820,13 +753,11 @@ uno::Any SwXStyleFamily::getByIndex(sal_Int32 nTempIndex)
return aRet;
}
-/*-- 16.12.98 16:03:57---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXStyleFamily::getByName(const OUString& rName)
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
String sStyleName;
SwStyleNameMapper::FillUIName(rName, sStyleName, lcl_GetSwEnumFromSfxEnum ( eFamily ), sal_True );
@@ -855,12 +786,10 @@ uno::Any SwXStyleFamily::getByName(const OUString& rName)
return aRet;
}
-/*-- 16.12.98 16:03:57---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXStyleFamily::getElementNames(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< OUString > aRet;
if(pBasePool)
{
@@ -880,12 +809,10 @@ uno::Sequence< OUString > SwXStyleFamily::getElementNames(void) throw( uno::Runt
throw uno::RuntimeException();
return aRet;
}
-/*-- 16.12.98 16:03:57---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXStyleFamily::hasByName(const OUString& rName) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(pBasePool)
{
@@ -900,30 +827,24 @@ sal_Bool SwXStyleFamily::hasByName(const OUString& rName) throw( uno::RuntimeExc
return bRet;
}
-/*-- 16.12.98 16:03:58---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SwXStyleFamily::getElementType(void) throw( uno::RuntimeException )
{
return ::getCppuType((const uno::Reference<style::XStyle>*)0);
}
-/*-- 16.12.98 16:03:58---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXStyleFamily::hasElements(void) throw( uno::RuntimeException )
{
if(!pBasePool)
throw uno::RuntimeException();
return sal_True;
}
-/*-- 16.12.98 16:03:58---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyleFamily::insertByName(const OUString& rName, const uno::Any& rElement)
throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(pBasePool)
{
String sStyleName;
@@ -989,13 +910,11 @@ void SwXStyleFamily::insertByName(const OUString& rName, const uno::Any& rElemen
else
throw uno::RuntimeException();
}
-/*-- 16.12.98 16:03:59---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyleFamily::replaceByName(const OUString& rName, const uno::Any& rElement)
throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(pBasePool)
{
pBasePool->SetSearchMask(eFamily);
@@ -1024,12 +943,10 @@ void SwXStyleFamily::replaceByName(const OUString& rName, const uno::Any& rEleme
else
throw uno::RuntimeException();
}
-/*-- 16.12.98 16:03:59---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyleFamily::removeByName(const OUString& rName) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(pBasePool)
{
pBasePool->SetSearchMask(eFamily, SFXSTYLEBIT_ALL );
@@ -1063,7 +980,7 @@ uno::Any SAL_CALL SwXStyleFamily::getPropertyValue( const ::rtl::OUString& sProp
if ( sPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DisplayName") ) )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_uInt32 nResId = 0;
switch ( eFamily )
{
@@ -1114,10 +1031,6 @@ void SAL_CALL SwXStyleFamily::removeVetoableChangeListener( const ::rtl::OUStrin
OSL_ENSURE( 0, "###unexpected!" );
}
-
-/*-- 16.12.98 16:03:59---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXStyleFamily::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
SfxSimpleHint *pHint = PTR_CAST( SfxSimpleHint, &rHint );
@@ -1128,9 +1041,7 @@ void SwXStyleFamily::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
EndListening(rBC);
}
}
-/*-- 16.12.98 16:03:59---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXStyle* SwXStyleFamily::_FindStyle(const String& rStyleName)const
{
sal_uInt16 nLCount = pBasePool->GetListenerCount();
@@ -1146,9 +1057,7 @@ SwXStyle* SwXStyleFamily::_FindStyle(const String& rStyleName)const
}
return 0;
}
-/******************************************************************
- *
- ******************************************************************/
+
class SwStyleProperties_Impl
{
const PropertyEntryVector_t aPropertyEntries;
@@ -1168,22 +1077,18 @@ public:
const PropertyEntryVector_t& GetPropertyVector() const {return aPropertyEntries; }
};
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
+
SwStyleProperties_Impl::SwStyleProperties_Impl(const SfxItemPropertyMap* pMap) :
-// _pMap(pMap),
aPropertyEntries( pMap->getPropertyEntries() ),
nArrLen(0)
{
nArrLen = aPropertyEntries.size();
- //const SfxItemPropertyMap* pTmp = _pMap;
pAnyArr = new uno::Any* [nArrLen];
for ( sal_uInt32 i =0 ; i < nArrLen; i++ )
pAnyArr[i] = 0;
}
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
+
SwStyleProperties_Impl::~SwStyleProperties_Impl()
{
for ( sal_uInt16 i =0 ; i < nArrLen; i++ )
@@ -1191,8 +1096,6 @@ SwStyleProperties_Impl::~SwStyleProperties_Impl()
delete[] pAnyArr;
}
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
sal_Bool SwStyleProperties_Impl::SetProperty(const ::rtl::OUString& rName, uno::Any aVal)
{
sal_uInt16 nPos = 0;
@@ -1232,6 +1135,7 @@ sal_Bool SwStyleProperties_Impl::ClearProperty( const OUString& rName )
}
return bRet;
}
+
void SwStyleProperties_Impl::ClearAllProperties( )
{
for ( sal_uInt16 i = 0; i < nArrLen; i++ )
@@ -1240,8 +1144,7 @@ void SwStyleProperties_Impl::ClearAllProperties( )
pAnyArr[ i ] = 0;
}
}
-//--------------------------------------------------------------------
-//--------------------------------------------------------------------
+
sal_Bool SwStyleProperties_Impl::GetProperty(const ::rtl::OUString& rName, uno::Any*& rpAny )
{
sal_Bool bRet = sal_False;
@@ -1267,20 +1170,12 @@ void SwStyleProperties_Impl::GetProperty( const OUString &rPropertyName, const u
rAny = rxPropertySet->getPropertyValue( rPropertyName );
}
-/******************************************************************
- *
- ******************************************************************/
-/* -----------------------------10.03.00 18:02--------------------------------
-
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXStyle::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXStyle::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -1294,16 +1189,12 @@ sal_Int64 SAL_CALL SwXStyle::getSomething( const uno::Sequence< sal_Int8 >& rId
}
TYPEINIT1(SwXStyle, SfxListener);
-/* -----------------------------06.04.00 11:24--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXStyle::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXStyle");
}
-/* -----------------------------06.04.00 11:24--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXStyle::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
sal_Bool bRet = C2U("com.sun.star.style.Style") == rServiceName;
@@ -1323,9 +1214,7 @@ sal_Bool SwXStyle::supportsService(const OUString& rServiceName) throw( uno::Run
return bRet;
}
-/* -----------------------------06.04.00 11:24--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXStyle::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
long nCount = 1;
@@ -1368,9 +1257,7 @@ uno::Sequence< OUString > SwXStyle::getSupportedServiceNames(void) throw( uno::R
}
return aRet;
}
-/*-- 17.12.98 08:26:49---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, sal_Bool bConditional) :
m_pDoc( pDoc ),
pBasePool(0),
@@ -1398,8 +1285,6 @@ SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, sal_Bool bConditional) :
aAny = xFamilies->getByName ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "CharacterStyles" ) ) );
// Get the Frame family (and keep it for later)
aAny >>= mxStyleFamily;
- //aAny = mxStyleFamily->getByName ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Standard" ) ) );
- //aAny >>= mxStyleData;
}
break;
case SFX_STYLE_FAMILY_PARA:
@@ -1439,7 +1324,6 @@ SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, sal_Bool bConditional) :
pPropImpl = new SwStyleProperties_Impl(aSwMapProvider.GetPropertySet(nMapId)->getPropertyMap());
}
-
SwXStyle::SwXStyle(SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam,
SwDoc* pDoc, const String& rStyleName) :
m_pDoc(pDoc),
@@ -1466,18 +1350,14 @@ SwXStyle::SwXStyle(SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam,
}
}
}
-/*-- 17.12.98 08:26:50---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXStyle::~SwXStyle()
{
if(pBasePool)
EndListening(*pBasePool);
delete pPropImpl;
}
-/*-- 17.12.98 08:26:51---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyle::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -1488,9 +1368,10 @@ void SwXStyle::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
mxStyleFamily.clear();
}
}
+
OUString SwXStyle::getName(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
String aString;
if(pBasePool)
{
@@ -1505,12 +1386,10 @@ OUString SwXStyle::getName(void) throw( uno::RuntimeException )
aString = sStyleName;
return OUString (aString);
}
-/*-- 17.12.98 08:26:51---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyle::setName(const OUString& rName) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(pBasePool)
{
pBasePool->SetSearchMask(eFamily, SFXSTYLEBIT_ALL );
@@ -1530,12 +1409,10 @@ void SwXStyle::setName(const OUString& rName) throw( uno::RuntimeException )
else
sStyleName = String(rName);
}
-/*-- 17.12.98 08:26:51---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXStyle::isUserDefined(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(pBasePool)
{
@@ -1549,12 +1426,10 @@ sal_Bool SwXStyle::isUserDefined(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return bRet;
}
-/*-- 17.12.98 08:26:51---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXStyle::isInUse(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(pBasePool)
{
@@ -1567,12 +1442,10 @@ sal_Bool SwXStyle::isInUse(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return bRet;
}
-/*-- 17.12.98 08:26:52---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwXStyle::getParentStyle(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
String aString;
if(pBasePool)
{
@@ -1588,13 +1461,11 @@ OUString SwXStyle::getParentStyle(void) throw( uno::RuntimeException )
SwStyleNameMapper::FillProgName(aString, aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), sal_True );
return OUString ( aString );
}
-/*-- 17.12.98 08:26:52---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyle::setParentStyle(const OUString& rParentStyle)
throw( container::NoSuchElementException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
String sParentStyle;
SwStyleNameMapper::FillUIName(rParentStyle, sParentStyle, lcl_GetSwEnumFromSfxEnum ( eFamily ), sal_True );
if(pBasePool)
@@ -1638,9 +1509,6 @@ void SwXStyle::setParentStyle(const OUString& rParentStyle)
else
throw uno::RuntimeException();
}
-/*-- 17.12.98 08:26:52---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > lcl_getPropertySetInfo( SfxStyleFamily eFamily, sal_Bool bIsConditional )
{
@@ -1710,9 +1578,7 @@ uno::Reference< beans::XPropertySetInfo > SwXStyle::getPropertySetInfo(void)
{
return lcl_getPropertySetInfo( eFamily, bIsConditional );
}
-/* -----------------23.04.99 13:28-------------------
- *
- * --------------------------------------------------*/
+
void SwXStyle::ApplyDescriptorProperties()
{
bIsDescriptor = sal_False;
@@ -1731,9 +1597,6 @@ void SwXStyle::ApplyDescriptorProperties()
}
}
-/*-- 18.04.01 13:07:27---------------------------------------------------
-
- -----------------------------------------------------------------------*/
struct SwStyleBase_Impl
{
SwDoc& rDoc;
@@ -1767,9 +1630,7 @@ struct SwStyleBase_Impl
const SwPageDesc& GetOldPageDesc();
};
-/* -----------------------------25.04.01 12:44--------------------------------
- ---------------------------------------------------------------------------*/
const SwPageDesc& SwStyleBase_Impl::GetOldPageDesc()
{
if(!pOldPageDesc)
@@ -1813,10 +1674,6 @@ const SwPageDesc& SwStyleBase_Impl::GetOldPageDesc()
return *pOldPageDesc;
}
-/* -----------------------------19.04.01 09:44--------------------------------
-
- ---------------------------------------------------------------------------*/
-
void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
const SfxItemPropertySet& rPropSet,
const uno::Any& rValue,
@@ -1950,23 +1807,14 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
throw lang::IllegalArgumentException();
}
break;
- // case FN_UNO_DEFAULT_OUTLINE_LEVEL: //#outline level,removed by zahojianwei
- //{
- // sal_Int8 nLevel = 0;
- // if( rValue >>= nLevel )
- // rBase.mxNewBase->GetCollection()->SetOutlineLevel( nLevel );
- // else
- // rBase.mxNewBase->GetCollection()->SetOutlineLevel( NO_NUMBERING );
- //}
- //break;
- case RES_PARATR_OUTLINELEVEL: //add by zahojianwei
+ case RES_PARATR_OUTLINELEVEL:
{
sal_Int16 nLevel = 0;
rValue >>= nLevel;
if( 0 <= nLevel && nLevel <= MAXLEVEL)
rBase.mxNewBase->GetCollection()->SetAttrOutlineLevel( nLevel );
}
- break; //<-end,zhaojianwei
+ break;
case FN_UNO_FOLLOW_STYLE:
{
OUString sTmp;
@@ -1999,7 +1847,6 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
SwStyleNameMapper::FillUIName(uDescName, sDescName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, sal_True );
if(!pNewDesc->GetPageDesc() || pNewDesc->GetPageDesc()->GetName() != sDescName)
{
- //sal_uInt16 nCount = pDoc->GetPageDescCnt();
sal_Bool bPut = sal_False;
if(sDescName.Len())
{
@@ -2060,7 +1907,7 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
// check for correct context and style name
//
sal_Int16 nIdx = GetCommandContextIndex( pSeq[i].Name );
- //
+
pBasePool->SetSearchMask( SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL );
sal_Bool bStyleFound = sal_False;
const SfxStyleSheetBase* pBase = pBasePool->First();
@@ -2070,7 +1917,7 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
bStyleFound = sal_True;
pBase = pBasePool->Next();
}
- //
+
if (nIdx == -1 || !bStyleFound)
{
bFailed = sal_True;
@@ -2162,7 +2009,6 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
throw lang::IllegalArgumentException();
}
goto put_itemset;
- //break;
case RES_PARATR_DROP:
{
if( MID_DROPCAP_CHAR_STYLE_NAME == rEntry.nMemberId)
@@ -2204,12 +2050,11 @@ put_itemset:
aSet.SetParent(&rStyleSet);
rPropSet.setPropertyValue(rEntry, rValue, aSet);
rStyleSet.Put(aSet);
- // --> OD 2006-10-18 #i70223#
+ // #i70223#
if ( SFX_STYLE_FAMILY_PARA == eFamily &&
rEntry.nWID == RES_PARATR_NUMRULE &&
rBase.mxNewBase.is() && rBase.mxNewBase->GetCollection() &&
- //rBase.mxNewBase->GetCollection()->GetOutlineLevel() < MAXLEVEL /* assigned to list level of outline style */) //#outline level,removed by zhaojianwei
- rBase.mxNewBase->GetCollection()->IsAssignedToListLevelOfOutlineStyle() ) ////<-end,add by zhaojianwei
+ rBase.mxNewBase->GetCollection()->IsAssignedToListLevelOfOutlineStyle() )
{
OUString sNewNumberingRuleName;
@@ -2218,17 +2063,13 @@ put_itemset:
if ( sNewNumberingRuleName.getLength() == 0 ||
sTmp != pDoc->GetOutlineNumRule()->GetName() )
{
- // delete assignment to list level of outline style.
- //rBase.mxNewBase->GetCollection()->SetOutlineLevel( NO_NUMBERING ); //#outline level,removed by zhaojianwei
- rBase.mxNewBase->GetCollection()->DeleteAssignmentToListLevelOfOutlineStyle(); //<-end,adde by zhaojianwei
+ rBase.mxNewBase->GetCollection()->DeleteAssignmentToListLevelOfOutlineStyle();
}
}
}
}
}
-/* -----------------------------18.04.01 13:29--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXStyle::SetPropertyValues_Impl(
const uno::Sequence< OUString >& rPropertyNames,
const uno::Sequence< uno::Any >& rValues )
@@ -2302,7 +2143,7 @@ void SwXStyle::setPropertyValues(
throw(beans::PropertyVetoException, lang::IllegalArgumentException,
lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// workaround for bad designed API
try
@@ -2319,7 +2160,6 @@ void SwXStyle::setPropertyValues(
}
}
-
uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
const SfxItemPropertySet& rPropSet,
SwStyleBase_Impl& rBase,
@@ -2374,21 +2214,13 @@ uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
aRet.setValue(&xRules, ::getCppuType((uno::Reference<container::XIndexReplace>*)0));
}
break;
- //case FN_UNO_DEFAULT_OUTLINE_LEVEL: //#outline level,removed by zahojianwei
- //{
- // DBG_ASSERT( SFX_STYLE_FAMILY_PARA == eFamily, "only paras" );
- // sal_uInt8 nLevel = rBase.mxNewBase->GetCollection()->GetOutlineLevel();
- // if( nLevel != NO_NUMBERING )
- // aRet <<= static_cast<sal_Int8>( nLevel );
- //}
- //break;
- case RES_PARATR_OUTLINELEVEL: //add by zahojianwei
+ case RES_PARATR_OUTLINELEVEL:
{
DBG_ASSERT( SFX_STYLE_FAMILY_PARA == eFamily, "only paras" );
int nLevel = rBase.mxNewBase->GetCollection()->GetAttrOutlineLevel();
aRet <<= static_cast<sal_Int16>( nLevel );
}
- break; //<-end,zhaojianwei
+ break;
case FN_UNO_FOLLOW_STYLE:
{
String aString;
@@ -2434,7 +2266,6 @@ uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
{
DBG_ASSERT(COND_COMMAND_COUNT == 28,
"invalid size of comman count?");
- //SfxItemSet& rStyleSet = rBase.GetItemSet();
uno::Sequence< beans::NamedValue > aSeq(COND_COMMAND_COUNT);
beans::NamedValue *pSeq = aSeq.getArray();
@@ -2514,9 +2345,7 @@ query_itemset:
throw uno::RuntimeException();
return aRet;
}
-/* -----------------------------19.04.01 09:26--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Any > SAL_CALL SwXStyle::GetPropertyValues_Impl(
const uno::Sequence< OUString > & rPropertyNames )
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
@@ -2611,13 +2440,11 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::GetPropertyValues_Impl(
}
return aRet;
}
-/* -----------------------------04.11.03 09:26--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Any > SwXStyle::getPropertyValues(
const uno::Sequence< OUString >& rPropertyNames ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< uno::Any > aValues;
// workaround for bad designed API
@@ -2636,34 +2463,27 @@ uno::Sequence< uno::Any > SwXStyle::getPropertyValues(
return aValues;
}
-/*-- 18.04.01 13:07:29---------------------------------------------------
- -----------------------------------------------------------------------*/
+
void SwXStyle::addPropertiesChangeListener(
const uno::Sequence< OUString >& /*aPropertyNames*/,
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
throw(uno::RuntimeException)
{
}
-/*-- 18.04.01 13:07:30---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyle::removePropertiesChangeListener(
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
throw(uno::RuntimeException)
{
}
-/*-- 18.04.01 13:07:30---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyle::firePropertiesChangeEvent(
const uno::Sequence< OUString >& /*aPropertyNames*/,
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
throw(uno::RuntimeException)
{
}
-/*-- 17.12.98 08:26:53---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyle::setPropertyValue(const OUString& rPropertyName, const uno::Any& rValue)
throw( beans::UnknownPropertyException,
beans::PropertyVetoException,
@@ -2671,52 +2491,42 @@ void SwXStyle::setPropertyValue(const OUString& rPropertyName, const uno::Any& r
lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const uno::Sequence<OUString> aProperties(&rPropertyName, 1);
const uno::Sequence<uno::Any> aValues(&rValue, 1);
SetPropertyValues_Impl( aProperties, aValues );
}
-/*-- 17.12.98 08:26:53---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXStyle::getPropertyValue(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const uno::Sequence<OUString> aProperties(&rPropertyName, 1);
return GetPropertyValues_Impl(aProperties).getConstArray()[0];
}
-/*-- 17.12.98 08:26:53---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyle::addPropertyChangeListener(const OUString& /*rPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 17.12.98 08:26:54---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyle::removePropertyChangeListener(const OUString& /*rPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 17.12.98 08:26:54---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyle::addVetoableChangeListener(const OUString& /*rPropertyName*/,
const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 17.12.98 08:26:54---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyle::removeVetoableChangeListener(const OUString& /*rPropertyName*/,
const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
@@ -2724,13 +2534,10 @@ void SwXStyle::removeVetoableChangeListener(const OUString& /*rPropertyName*/,
DBG_WARNING("not implemented");
}
-/*-- 08.03.99 10:50:26---------------------------------------------------
-
- -----------------------------------------------------------------------*/
beans::PropertyState SwXStyle::getPropertyState(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< OUString > aNames(1);
OUString* pNames = aNames.getArray();
@@ -2738,14 +2545,12 @@ beans::PropertyState SwXStyle::getPropertyState(const OUString& rPropertyName)
uno::Sequence< beans::PropertyState > aStates = getPropertyStates(aNames);
return aStates.getConstArray()[0];
}
-/*-- 08.03.99 10:50:27---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates(
const uno::Sequence< OUString >& rPropertyNames)
throw( beans::UnknownPropertyException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< beans::PropertyState > aRet(rPropertyNames.getLength());
beans::PropertyState* pStates = aRet.getArray();
if(pBasePool)
@@ -2783,14 +2588,6 @@ uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates(
{
pStates[i] = beans::PropertyState_DIRECT_VALUE;
}
- // else if( FN_UNO_DEFAULT_OUTLINE_LEVEL == pEntry->nWID ) //#outline level,removed by zahojianwei
- // {
- // pStates[i] =
- // ( xStyle->GetCollection()->GetOutlineLevel()
- // == NO_NUMBERING )
- // ? beans::PropertyState_DEFAULT_VALUE
- // : beans::PropertyState_DIRECT_VALUE;
- // } //<-end,zhaojianwei
else if(SFX_STYLE_FAMILY_PAGE == eFamily &&
(rPropName.EqualsAscii("Header", 0, 6)
|| rPropName.EqualsAscii("Footer", 0, 6)))
@@ -2842,9 +2639,7 @@ uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates(
throw uno::RuntimeException();
return aRet;
}
-/*-- 08.03.99 10:50:27---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXStyle::setPropertyToDefault(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, uno::RuntimeException )
{
@@ -2855,7 +2650,7 @@ void SwXStyle::setPropertyToDefault(const OUString& rPropertyName)
void SAL_CALL SwXStyle::setPropertiesToDefault( const uno::Sequence< OUString >& aPropertyNames )
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFmt *pTargetFmt = 0;
if(pBasePool)
@@ -2914,14 +2709,10 @@ void SAL_CALL SwXStyle::setPropertiesToDefault( const uno::Sequence< OUString >&
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY )
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "setPropertiesToDefault: property is read-only: " ) ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) );
- //if( pEntry->nWID == FN_UNO_DEFAULT_OUTLINE_LEVEL ) //#outline level, removed by zhaojianwei
- // static_cast<SwTxtFmtColl*>(pTargetFmt)->SetOutlineLevel( NO_NUMBERING );
- //else
- // pTargetFmt->ResetFmtAttr( pEntry->nWID );
- if( pEntry->nWID == RES_PARATR_OUTLINELEVEL ) //add by zhaojianwei
+ if( pEntry->nWID == RES_PARATR_OUTLINELEVEL )
static_cast<SwTxtFmtColl*>(pTargetFmt)->DeleteAssignmentToListLevelOfOutlineStyle();
else
- pTargetFmt->ResetFmtAttr( pEntry->nWID ); //<-end,zhaojianwei
+ pTargetFmt->ResetFmtAttr( pEntry->nWID );
}
}
else if ( bIsDescriptor )
@@ -2934,7 +2725,7 @@ void SAL_CALL SwXStyle::setPropertiesToDefault( const uno::Sequence< OUString >&
void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(pBasePool)
{
pBasePool->SetSearchMask(eFamily);
@@ -2955,13 +2746,8 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
case SFX_STYLE_FAMILY_PARA :
{
pTargetFmt = xStyle->GetCollection();
- // --> OD 2007-07-25 #132402# - make code robust
if ( xStyle->GetCollection() )
- {
- // xStyle->GetCollection()->SetOutlineLevel( NO_NUMBERING ); //#outline level,removed by zhaojianwei
- xStyle->GetCollection()->DeleteAssignmentToListLevelOfOutlineStyle(); //<-end,add by zhaojianwei
- }
- // <--
+ xStyle->GetCollection()->DeleteAssignmentToListLevelOfOutlineStyle();
}
break;
case SFX_STYLE_FAMILY_FRAME:
@@ -3011,13 +2797,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
aFrmSz.SetSize( aPhysSize );
}
else
- {
- // --> OD 2008-07-25 #i91928#
-// aFrmSz.SetWidth( LONG_MAX );
-// aFrmSz.SetHeight( LONG_MAX );
aFrmSz.SetSize( SvxPaperInfo::GetDefaultPaperSize() );
- // <--
- }
}
else
@@ -3033,11 +2813,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
pTargetFmt->SetFmtAttr( aFrmSz );
}
else
- {
- // --> OD 2007-01-25 #i73790# - method renamed
pTargetFmt->ResetAllFmtAttr();
- // <--
- }
if( USHRT_MAX != nPgDscPos )
m_pDoc->ChgPageDesc( nPgDscPos,
@@ -3058,7 +2834,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
uno::Sequence< uno::Any > SAL_CALL SwXStyle::getPropertyDefaults( const uno::Sequence< OUString >& aPropertyNames )
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int32 nCount = aPropertyNames.getLength();
uno::Sequence < uno::Any > aRet ( nCount );
if ( nCount )
@@ -3111,18 +2887,14 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::getPropertyDefaults( const uno::Seq
}
return aRet;
}
-/*-- 08.03.99 10:50:27---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXStyle::getPropertyDefault(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
const uno::Sequence < OUString > aSequence ( &rPropertyName, 1 );
return getPropertyDefaults ( aSequence ).getConstArray()[0];
}
-/* -----------------21.01.99 13:08-------------------
- *
- * --------------------------------------------------*/
+
void SwXStyle::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
SfxSimpleHint *pHint = PTR_CAST( SfxSimpleHint, &rHint );
@@ -3145,9 +2917,7 @@ void SwXStyle::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
}
}
-/* -----------------------------15.08.00 11:35--------------------------------
- ---------------------------------------------------------------------------*/
void SwXStyle::Invalidate()
{
sStyleName.Erase();
@@ -3157,40 +2927,29 @@ void SwXStyle::Invalidate()
mxStyleFamily.clear();
}
-
/******************************************************************
* SwXPageStyle
******************************************************************/
-/*-- 17.12.98 08:43:35---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXPageStyle::SwXPageStyle(SfxStyleSheetBasePool& rPool,
SwDocShell* pDocSh, SfxStyleFamily eFam,
- const String& rStyleName)://, const SfxItemPropertyMap* _pMap) :
- SwXStyle(rPool, eFam, pDocSh->GetDoc(), rStyleName),//, _pMap),
+ const String& rStyleName):
+ SwXStyle(rPool, eFam, pDocSh->GetDoc(), rStyleName),
pDocShell(pDocSh)
{
}
-/* -----------------23.08.99 15:52-------------------
- --------------------------------------------------*/
SwXPageStyle::SwXPageStyle(SwDocShell* pDocSh) :
SwXStyle(pDocSh->GetDoc(), SFX_STYLE_FAMILY_PAGE),
pDocShell(pDocSh)
{
}
-/*-- 17.12.98 08:43:35---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXPageStyle::~SwXPageStyle()
{
}
-/* -----------------------------18.04.01 13:50--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
const uno::Sequence< OUString >& rPropertyNames,
const uno::Sequence< uno::Any >& rValues )
@@ -3255,7 +3014,6 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
case FN_UNO_FOOTER_HEIGHT:
case FN_UNO_FOOTER_EAT_SPACING:
{
- sal_Bool bSetItem = sal_False;
sal_Bool bFooter = sal_False;
sal_uInt16 nItemType = TYPE_BOOL;
sal_uInt16 nRes = 0;
@@ -3331,7 +3089,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
case TYPE_BOX: pNewItem = new SvxBoxItem(nRes); break;
}
}
- bSetItem = pNewItem->PutValue(pValues[nProp], pEntry->nMemberId);
+ pNewItem->PutValue(pValues[nProp], pEntry->nMemberId);
rSetSet.Put(*pNewItem);
aBaseImpl.GetItemSet().Put(*pNewSetItem);
delete pNewItem;
@@ -3413,7 +3171,7 @@ void SwXPageStyle::setPropertyValues(
const uno::Sequence< uno::Any >& rValues )
throw(beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// workaround for bad designed API
try
@@ -3429,9 +3187,7 @@ void SwXPageStyle::setPropertyValues(
throw aWExc;
}
}
-/* -----------------------------04.11.03 13:50--------------------------------
- ---------------------------------------------------------------------------*/
static uno::Reference<text::XText>
lcl_makeHeaderFooter(
const sal_uInt16 nRes, const bool bHeader, SwFrmFmt const*const pFrmFmt)
@@ -3488,7 +3244,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
}
sal_uInt16 nRes = 0;
bool bHeader = false;
- sal_Bool bAll = sal_False, bLeft = sal_False, bRight = sal_False;
+ sal_Bool bLeft = sal_False;
switch(pEntry->nWID)
{
case FN_UNO_HEADER_ON:
@@ -3588,20 +3344,19 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
}
break;
case FN_UNO_HEADER :
- bAll = sal_True; goto Header;
+ goto Header;
case FN_UNO_HEADER_LEFT :
bLeft = sal_True; goto Header;
case FN_UNO_HEADER_RIGHT :
- bRight = sal_True; goto Header;
+ goto Header;
Header:
bHeader = true;
nRes = RES_HEADER; goto MakeObject;
case FN_UNO_FOOTER :
- bAll = sal_True; goto Footer;
+ goto Footer;
case FN_UNO_FOOTER_LEFT :
bLeft = sal_True; goto Footer;
case FN_UNO_FOOTER_RIGHT :
- bRight = sal_True;
Footer:
nRes = RES_FOOTER;
MakeObject:
@@ -3656,14 +3411,12 @@ MakeObject:
}
return aRet;
}
-/* -----------------------------18.04.01 13:50--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Any > SwXPageStyle::getPropertyValues(
const uno::Sequence< OUString >& rPropertyNames )
throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< uno::Any > aValues;
// workaround for bad designed API
@@ -3682,19 +3435,15 @@ uno::Sequence< uno::Any > SwXPageStyle::getPropertyValues(
return aValues;
}
-/*-- 17.12.98 08:43:36---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXPageStyle::getPropertyValue(const OUString& rPropertyName) throw(
beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const uno::Sequence<OUString> aProperties(&rPropertyName, 1);
return GetPropertyValues_Impl(aProperties).getConstArray()[0];
}
-/*-- 17.12.98 08:43:36---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXPageStyle::setPropertyValue(const OUString& rPropertyName, const uno::Any& rValue)
throw( beans::UnknownPropertyException,
beans::PropertyVetoException,
@@ -3702,7 +3451,7 @@ void SwXPageStyle::setPropertyValue(const OUString& rPropertyName, const uno::An
lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const uno::Sequence<OUString> aProperties(&rPropertyName, 1);
const uno::Sequence<uno::Any> aValues(&rValue, 1);
SetPropertyValues_Impl( aProperties, aValues );
@@ -3712,15 +3461,11 @@ SwXFrameStyle::SwXFrameStyle ( SwDoc *pDoc )
: SwXStyle ( pDoc, SFX_STYLE_FAMILY_FRAME, sal_False)
{
}
-/* -----------------------------15.12.00 15:45--------------------------------
- ---------------------------------------------------------------------------*/
SwXFrameStyle::~SwXFrameStyle()
{
}
-/* -----------------------------15.12.00 14:30--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Type > SwXFrameStyle::getTypes( ) throw(uno::RuntimeException)
{
uno::Sequence< uno::Type > aTypes = SwXStyle::getTypes();
@@ -3729,9 +3474,7 @@ uno::Sequence< uno::Type > SwXFrameStyle::getTypes( ) throw(uno::RuntimeExcepti
aTypes.getArray()[nLen] = ::getCppuType((uno::Reference<XEventsSupplier>*)0);
return aTypes;
}
-/* -----------------------------15.12.00 14:30--------------------------------
- ---------------------------------------------------------------------------*/
uno::Any SwXFrameStyle::queryInterface( const uno::Type& rType ) throw(uno::RuntimeException)
{
uno::Any aRet;
@@ -3741,41 +3484,31 @@ uno::Any SwXFrameStyle::queryInterface( const uno::Type& rType ) throw(uno::Runt
aRet = SwXStyle::queryInterface(rType);
return aRet;
}
-/* -----------------------------15.12.00 14:30--------------------------------
- ---------------------------------------------------------------------------*/
uno::Reference< container::XNameReplace > SwXFrameStyle::getEvents( ) throw(uno::RuntimeException)
{
return new SwFrameStyleEventDescriptor( *this );
}
-/*-- 19.05.2006 11:23:55---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXAutoStyles::SwXAutoStyles(SwDocShell& rDocShell) :
SwUnoCollection(rDocShell.GetDoc()), pDocShell( &rDocShell )
{
}
-/*-- 19.05.2006 11:23:56---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXAutoStyles::~SwXAutoStyles()
{
}
-/*-- 19.05.2006 11:23:57---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXAutoStyles::getCount(void) throw( uno::RuntimeException )
{
return AUTOSTYLE_FAMILY_COUNT;
}
-/*-- 19.05.2006 11:23:57---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXAutoStyles::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
if(nIndex < 0 || nIndex >= AUTOSTYLE_FAMILY_COUNT)
throw lang::IndexOutOfBoundsException();
@@ -3816,23 +3549,17 @@ uno::Any SwXAutoStyles::getByIndex(sal_Int32 nIndex)
throw uno::RuntimeException();
return aRet;
}
-/*-- 19.05.2006 11:23:57---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SwXAutoStyles::getElementType( ) throw(uno::RuntimeException)
{
return ::getCppuType((const uno::Reference<style::XAutoStyleFamily>*)0);
}
-/*-- 19.05.2006 11:23:58---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXAutoStyles::hasElements( ) throw(uno::RuntimeException)
{
return sal_True;
}
-/*-- 19.05.2006 11:23:58---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXAutoStyles::getByName(const rtl::OUString& Name)
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
{
@@ -3847,9 +3574,7 @@ uno::Any SwXAutoStyles::getByName(const rtl::OUString& Name)
throw container::NoSuchElementException();
return aRet;
}
-/*-- 19.05.2006 11:23:59---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< rtl::OUString > SwXAutoStyles::getElementNames(void)
throw( uno::RuntimeException )
{
@@ -3860,9 +3585,7 @@ uno::Sequence< rtl::OUString > SwXAutoStyles::getElementNames(void)
pNames[2] = C2U("ParagraphStyles");
return aNames;
}
-/*-- 19.05.2006 11:24:00---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXAutoStyles::hasByName(const rtl::OUString& Name)
throw( uno::RuntimeException )
{
@@ -3874,18 +3597,13 @@ sal_Bool SwXAutoStyles::hasByName(const rtl::OUString& Name)
return sal_False;
}
-/*-- 19.05.2006 11:24:02---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXAutoStyleFamily::SwXAutoStyleFamily(SwDocShell* pDocSh, IStyleAccess::SwAutoStyleFamily nFamily) :
pDocShell( pDocSh ), eFamily(nFamily)
{
// Register ourselves as a listener to the document (via the page descriptor)
pDocSh->GetDoc()->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
}
-/*-- 19.05.2006 11:24:02---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXAutoStyleFamily::~SwXAutoStyleFamily()
{
}
@@ -3897,9 +3615,6 @@ void SwXAutoStyleFamily::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
pDocShell = 0;
}
-/*-- 31.05.2006 11:24:02---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
const uno::Sequence< beans::PropertyValue >& Values )
throw (uno::RuntimeException)
@@ -3943,11 +3658,11 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
}
catch (beans::UnknownPropertyException &)
{
- ASSERT( false, "Unknown property" );
+ OSL_ENSURE( false, "Unknown property" );
}
catch (lang::IllegalArgumentException &)
{
- ASSERT( false, "Illegal argument" );
+ OSL_ENSURE( false, "Illegal argument" );
}
}
@@ -3955,9 +3670,7 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
uno::Reference<style::XAutoStyle> xRet = new SwXAutoStyle(pDocShell->GetDoc(), pSet, eFamily);
return xRet;
}
-/*-- 31.05.2006 11:24:02---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< container::XEnumeration > SwXAutoStyleFamily::createEnumeration( )
throw (uno::RuntimeException)
{
@@ -3966,24 +3679,17 @@ uno::Reference< container::XEnumeration > SwXAutoStyleFamily::createEnumeration(
return uno::Reference< container::XEnumeration >
(new SwXAutoStylesEnumerator( pDocShell->GetDoc(), eFamily ));
}
-/*-- 19.05.2006 11:24:03---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SwXAutoStyleFamily::getElementType( ) throw(uno::RuntimeException)
{
return ::getCppuType((const uno::Reference<style::XAutoStyle>*)0);
}
-/*-- 19.05.2006 11:24:04---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXAutoStyleFamily::hasElements( ) throw(uno::RuntimeException)
{
return sal_False;
}
-/*-- 31.05.2006 11:24:05---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAutoStyleFamily eFam )
: pDoc( pInitDoc ), eFamily( eFam )
{
@@ -4018,18 +3724,13 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAut
aIter = mAutoStyles.begin();
}
-/*-- 31.05.2006 11:24:05---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXAutoStylesEnumerator::SwXAutoStylesEnumerator( SwDoc* pDoc, IStyleAccess::SwAutoStyleFamily eFam )
: pImpl( new SwAutoStylesEnumImpl( pDoc, eFam ) )
{
// Register ourselves as a listener to the document (via the page descriptor)
pDoc->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
}
-/*-- 31.05.2006 11:24:05---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXAutoStylesEnumerator::~SwXAutoStylesEnumerator()
{
delete pImpl;
@@ -4045,10 +3746,6 @@ void SwXAutoStylesEnumerator::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
-
-/*-- 31.05.2006 11:24:05---------------------------------------------------
-
- -----------------------------------------------------------------------*/
::sal_Bool SwXAutoStylesEnumerator::hasMoreElements( )
throw (uno::RuntimeException)
{
@@ -4056,9 +3753,7 @@ void SwXAutoStylesEnumerator::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
throw uno::RuntimeException();
return pImpl->hasMoreElements();
}
-/*-- 31.05.2006 11:24:05---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXAutoStylesEnumerator::nextElement( )
throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
@@ -4074,9 +3769,7 @@ uno::Any SwXAutoStylesEnumerator::nextElement( )
}
return aRet;
}
-/*-- 19.05.2006 11:24:09---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXAutoStyle::SwXAutoStyle( SwDoc* pDoc, SfxItemSet_Pointer_t pInitSet, IStyleAccess::SwAutoStyleFamily eFam )
: pSet( pInitSet ), eFamily( eFam )
{
@@ -4084,9 +3777,6 @@ SwXAutoStyle::SwXAutoStyle( SwDoc* pDoc, SfxItemSet_Pointer_t pInitSet, IStyleAc
pDoc->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
}
-/*-- 19.05.2006 11:24:09---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXAutoStyle::~SwXAutoStyle()
{
}
@@ -4098,9 +3788,6 @@ void SwXAutoStyle::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
pSet.reset();
}
-/*-- 19.05.2006 11:24:09---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXAutoStyle::getPropertySetInfo( )
throw (uno::RuntimeException)
{
@@ -4147,9 +3834,6 @@ uno::Reference< beans::XPropertySetInfo > SwXAutoStyle::getPropertySetInfo( )
return xRet;
}
-/*-- 19.05.2006 11:24:09---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXAutoStyle::setPropertyValue( const OUString& /*rPropertyName*/, const uno::Any& /*rValue*/ )
throw( beans::UnknownPropertyException,
beans::PropertyVetoException,
@@ -4159,22 +3843,16 @@ void SwXAutoStyle::setPropertyValue( const OUString& /*rPropertyName*/, const un
{
}
-/*-- 19.05.2006 11:24:09---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Any SwXAutoStyle::getPropertyValue( const OUString& rPropertyName )
throw( beans::UnknownPropertyException,
lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const uno::Sequence<OUString> aProperties(&rPropertyName, 1);
return GetPropertyValues_Impl(aProperties).getConstArray()[0];
}
-/*-- 19.05.2006 11:24:09---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXAutoStyle::addPropertyChangeListener( const OUString& /*aPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ )
throw( beans::UnknownPropertyException,
@@ -4183,9 +3861,6 @@ void SwXAutoStyle::addPropertyChangeListener( const OUString& /*aPropertyName*/,
{
}
-/*-- 19.05.2006 11:24:09---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXAutoStyle::removePropertyChangeListener( const OUString& /*aPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ )
throw( beans::UnknownPropertyException,
@@ -4194,9 +3869,6 @@ void SwXAutoStyle::removePropertyChangeListener( const OUString& /*aPropertyName
{
}
-/*-- 19.05.2006 11:24:09---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXAutoStyle::addVetoableChangeListener( const OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
throw( beans::UnknownPropertyException,
@@ -4205,9 +3877,6 @@ void SwXAutoStyle::addVetoableChangeListener( const OUString& /*PropertyName*/,
{
}
-/*-- 19.05.2006 11:24:09---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXAutoStyle::removeVetoableChangeListener( const OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
throw( beans::UnknownPropertyException,
@@ -4216,9 +3885,6 @@ void SwXAutoStyle::removeVetoableChangeListener( const OUString& /*PropertyName*
{
}
-/*-- 19.05.2006 11:24:09---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXAutoStyle::setPropertyValues(
const uno::Sequence< ::rtl::OUString >& /*aPropertyNames*/,
const uno::Sequence< uno::Any >& /*aValues*/ )
@@ -4227,9 +3893,6 @@ void SwXAutoStyle::setPropertyValues(
{
}
-/*-- 19.05.2006 11:24:09---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Sequence< uno::Any > SwXAutoStyle::GetPropertyValues_Impl(
const uno::Sequence< OUString > & rPropertyNames )
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
@@ -4275,14 +3938,11 @@ uno::Sequence< uno::Any > SwXAutoStyle::GetPropertyValues_Impl(
return aRet;
}
-/*-- 19.05.2006 11:24:09---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Sequence< uno::Any > SwXAutoStyle::getPropertyValues (
const uno::Sequence< ::rtl::OUString >& rPropertyNames )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< uno::Any > aValues;
// workaround for bad designed API
@@ -4302,9 +3962,6 @@ uno::Sequence< uno::Any > SwXAutoStyle::getPropertyValues (
return aValues;
}
-/*-- 19.05.2006 11:24:10---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXAutoStyle::addPropertiesChangeListener(
const uno::Sequence< ::rtl::OUString >& /*aPropertyNames*/,
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
@@ -4312,18 +3969,12 @@ void SwXAutoStyle::addPropertiesChangeListener(
{
}
-/*-- 19.05.2006 11:24:10---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXAutoStyle::removePropertiesChangeListener(
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
throw (uno::RuntimeException)
{
}
-/*-- 19.05.2006 11:24:11---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXAutoStyle::firePropertiesChangeEvent(
const uno::Sequence< ::rtl::OUString >& /*aPropertyNames*/,
const uno::Reference< beans::XPropertiesChangeListener >& /*xListener*/ )
@@ -4331,14 +3982,11 @@ void SwXAutoStyle::firePropertiesChangeEvent(
{
}
-/*-- 19.05.2006 11:24:11---------------------------------------------------
-
- -----------------------------------------------------------------------*/
beans::PropertyState SwXAutoStyle::getPropertyState( const OUString& rPropertyName )
throw( beans::UnknownPropertyException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< OUString > aNames(1);
OUString* pNames = aNames.getArray();
@@ -4347,18 +3995,12 @@ beans::PropertyState SwXAutoStyle::getPropertyState( const OUString& rPropertyNa
return aStates.getConstArray()[0];
}
-/*-- 19.05.2006 11:24:11---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXAutoStyle::setPropertyToDefault( const OUString& /*PropertyName*/ )
throw( beans::UnknownPropertyException,
uno::RuntimeException )
{
}
-/*-- 19.05.2006 11:24:11---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Any SwXAutoStyle::getPropertyDefault( const OUString& rPropertyName )
throw( beans::UnknownPropertyException,
lang::WrappedTargetException,
@@ -4368,16 +4010,13 @@ uno::Any SwXAutoStyle::getPropertyDefault( const OUString& rPropertyName )
return getPropertyDefaults ( aSequence ).getConstArray()[0];
}
-/*-- 19.05.2006 11:24:12---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyState > SwXAutoStyle::getPropertyStates(
const uno::Sequence< ::rtl::OUString >& rPropertyNames )
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
if( !pSet.get() )
throw uno::RuntimeException();
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< beans::PropertyState > aRet(rPropertyNames.getLength());
beans::PropertyState* pStates = aRet.getArray();
const OUString* pNames = rPropertyNames.getConstArray();
@@ -4406,26 +4045,17 @@ uno::Sequence< beans::PropertyState > SwXAutoStyle::getPropertyStates(
return aRet;
}
-/*-- 19.05.2006 11:24:12---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXAutoStyle::setAllPropertiesToDefault( )
throw (uno::RuntimeException)
{
}
-/*-- 19.05.2006 11:24:13---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXAutoStyle::setPropertiesToDefault(
const uno::Sequence< ::rtl::OUString >& /*aPropertyNames*/ )
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
}
-/*-- 19.05.2006 11:24:14---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Sequence< uno::Any > SwXAutoStyle::getPropertyDefaults(
const uno::Sequence< ::rtl::OUString >& /*aPropertyNames*/ )
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
@@ -4435,14 +4065,11 @@ uno::Sequence< uno::Any > SwXAutoStyle::getPropertyDefaults(
return aRet;
}
-/*-- 19.05.2006 11:24:14---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyValue > SwXAutoStyle::getProperties() throw (uno::RuntimeException)
{
if( !pSet.get() )
throw uno::RuntimeException();
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
std::vector< beans::PropertyValue > aPropertyVector;
sal_Int8 nPropSetId = 0;
@@ -4458,22 +4085,6 @@ uno::Sequence< beans::PropertyValue > SwXAutoStyle::getProperties() throw (uno::
const SfxItemPropertySet* pPropSet = aSwMapProvider.GetPropertySet(nPropSetId);
const SfxItemPropertyMap *pMap = pPropSet->getPropertyMap();
PropertyEntryVector_t aPropVector = pMap->getPropertyEntries();
-// struct compareWhichIds
-// {
-// bool operator()(const sal_uInt16 w1, const sal_uInt16 w2) const
-// {
-// return w1 < w2;
-// }
-// };
-// typedef std::map<const sal_uInt16, SfxItemPropertyNamedEntry, compareWhichIds> PropertyMap_t;
-// PropertyMap_t aPropMap;
-// aPropMap.reserve( aPropVector.size() );
-// PropertyEntryVector_t::const_iterator aIt = aPropertyEntries.begin();
-// while( aIt != aPropertyEntries.end() )
-// {
-// aPropMap[aIt->nWID] = *aIt;
-// ++aIt;
-// }
SfxItemSet& rSet = *pSet.get();
SfxItemIter aIter(rSet);
@@ -4483,14 +4094,6 @@ uno::Sequence< beans::PropertyValue > SwXAutoStyle::getProperties() throw (uno::
{
const sal_uInt16 nWID = pItem->Which();
-// PropertyMap_t::const_iterator aMapIt = aPropMap[nWID];
-// if( aMapIt != aPropMap.getEnd() )
-// {
-// beans::PropertyValue aPropertyValue;
-// aPropertyValue.Name = aIt->sName;
-// pItem->QueryValue( aPropertyValue.Value, aIt->nMemberId );
-// aPropertyVector.push_back( aPropertyValue );
-// }
// TODO: Optimize - and fix! the old iteration filled each WhichId
// only once but there are more properties than WhichIds
PropertyEntryVector_t::const_iterator aIt = aPropVector.begin();
@@ -4505,20 +4108,6 @@ uno::Sequence< beans::PropertyValue > SwXAutoStyle::getProperties() throw (uno::
}
++aIt;
}
-/* int i = 0;
- while ( pMap[i].nWID != 0 )
- {
- if ( pMap[i].nWID == nWID )
- {
- beans::PropertyValue aPropertyValue;
- String sString( OUString::createFromAscii( pMap[i].pName ) );
- aPropertyValue.Name = sString;
- pItem->QueryValue( aPropertyValue.Value, pMap[i].nMemberId );
- aPropertyVector.push_back( aPropertyValue );
- break;
- }
- ++i;
- }*/
pItem = aIter.NextItem();
}
@@ -4533,3 +4122,5 @@ uno::Sequence< beans::PropertyValue > SwXAutoStyle::getProperties() throw (uno::
return aRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 6160f196d987..2f03fcc92c28 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,6 +70,7 @@
#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <com/sun/star/text/TableColumnSeparator.hpp>
#include <com/sun/star/text/XTextSection.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/table/ShadowFormat.hpp>
#include <com/sun/star/table/TableBorder.hpp>
#include <com/sun/star/table/TableBorderDistances.hpp>
@@ -81,7 +83,6 @@
#include <com/sun/star/chart2/data/XDataSequence.hpp>
#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
#include <com/sun/star/table/CellContentType.hpp>
-#include <unotbl.hxx>
#include <unotextrange.hxx>
#include <unotextcursor.hxx>
#include <unoparagraph.hxx>
@@ -94,31 +95,26 @@
#include <editeng/keepitem.hxx>
#include <fmtlsplt.hxx>
#include <swundo.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <SwStyleNameMapper.hxx>
#include <frmatr.hxx>
#include <crsskip.hxx>
#include <unochart.hxx>
#include <sortopt.hxx>
#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 );
#define UNO_TABLE_COLUMN_SUM 10000
-/* -----------------17.07.98 15:47-------------------
- *
- * --------------------------------------------------*/
table::BorderLine lcl_SvxLineToLine(const SvxBorderLine* pLine)
{
- table::BorderLine aLine;
+ table::BorderLine2 aLine;
if(pLine)
{
aLine.Color = pLine->GetColor().GetColor() ;
@@ -130,9 +126,7 @@ table::BorderLine lcl_SvxLineToLine(const SvxBorderLine* pLine)
aLine.Color = aLine.InnerLineWidth = aLine.OuterLineWidth = aLine.LineDistance = 0;
return aLine;
}
-/* -----------------17.07.98 15:52-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine)
{
rSvxLine.SetColor( Color(rLine.Color));
@@ -142,9 +136,7 @@ sal_Bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLi
sal_Bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0;
return bRet;
}
-/* -----------------11.12.98 14:22-------------------
- *
- * --------------------------------------------------*/
+
void lcl_SetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry* pEntry, const uno::Any& aValue)
throw (lang::IllegalArgumentException)
{
@@ -176,10 +168,10 @@ void lcl_SetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry* pE
case FN_TABLE_WIDTH:
case FN_TABLE_RELATIVE_WIDTH:
{
- sal_Int32 nWidth = 0;
SwFmtFrmSize aSz( pFmt->GetFrmSize() );
if(FN_TABLE_WIDTH == pEntry->nWID)
{
+ sal_Int32 nWidth = 0;
aValue >>= nWidth;
aSz.SetWidthPercent(0);
aSz.SetWidth ( MM100_TO_TWIP ( nWidth ) );
@@ -226,9 +218,6 @@ void lcl_SetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry* pE
}
}
-/* -----------------27.04.98 08:50-------------------
- *
- * --------------------------------------------------*/
uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry* pEntry )
{
uno::Any aRet;
@@ -326,10 +315,6 @@ uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry
}
return aRet;
}
-/* -----------------19.10.05 08:32-------------------
- *
- * --------------------------------------------------*/
-
// returns the position for the cell with the specified name
// (note that the indices rColumn and rRow are 0 based here)
@@ -389,7 +374,6 @@ void lcl_GetCellPosition( const String &rCellName,
#endif
}
-
// arguments: must be non-empty strings with valid cell names
//
// returns: -1 if first cell < second cell
@@ -412,7 +396,6 @@ int lcl_CompareCellsByRowFirst( const String &rCellName1, const String &rCellNam
return +1;
}
-
// arguments: must be non-empty strings with valid cell names
//
// returns: -1 if first cell < second cell
@@ -435,7 +418,6 @@ int lcl_CompareCellsByColFirst( const String &rCellName1, const String &rCellNam
return +1;
}
-
// arguments: must be non-empty strings with valid cell names
//
// returns: -1 if first cell range < second cell range
@@ -464,11 +446,6 @@ int lcl_CompareCellRanges(
return +1;
}
-
-/* -----------------25.06.98 08:32-------------------
- *
- * --------------------------------------------------*/
-
// returns the cell name for the cell at the specified position
// (note that the indices nColumn and nRow are 0 based here)
String lcl_GetCellName( sal_Int32 nColumn, sal_Int32 nRow )
@@ -503,7 +480,6 @@ 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;
@@ -530,9 +506,6 @@ const SwTableBox* lcl_FindCornerTableBox(const SwTableLines& rTableLines, const
return pBox;
}
-/* -----------------21.11.05 14:46-------------------
-
- --------------------------------------------------*/
// start cell should be in the upper-left corner of the range and
// end cell in the lower-right.
// I.e. from the four possible representation
@@ -569,10 +542,6 @@ void SwRangeDescriptor::Normalize()
}
}
-
-/* -----------------25.06.98 08:32-------------------
- *
- * --------------------------------------------------*/
SwXCell* lcl_CreateXCell(SwFrmFmt* pFmt, sal_Int32 nColumn, sal_Int32 nRow)
{
SwXCell* pXCell = 0;
@@ -585,9 +554,7 @@ SwXCell* lcl_CreateXCell(SwFrmFmt* pFmt, sal_Int32 nColumn, sal_Int32 nRow)
}
return pXCell;
}
-/* -----------------20.07.98 12:35-------------------
- *
- * --------------------------------------------------*/
+
void lcl_InspectLines(SwTableLines& rLines, SvStrings& rAllNames)
{
for( sal_uInt16 i = 0; i < rLines.Count(); i++ )
@@ -607,9 +574,7 @@ void lcl_InspectLines(SwTableLines& rLines, SvStrings& rAllNames)
}
}
}
-/* -----------------02.10.98 15:55-------------------
- *
- * --------------------------------------------------*/
+
void lcl_FormatTable(SwFrmFmt* pTblFmt)
{
SwClientIter aIter( *pTblFmt );
@@ -625,9 +590,7 @@ void lcl_FormatTable(SwFrmFmt* pTblFmt)
}
}
}
-/* -----------------20.07.98 13:15-------------------
- *
- * --------------------------------------------------*/
+
void lcl_CrsrSelect(SwPaM* pCrsr, sal_Bool bExpand)
{
if(bExpand)
@@ -639,9 +602,7 @@ void lcl_CrsrSelect(SwPaM* pCrsr, sal_Bool bExpand)
pCrsr->DeleteMark();
}
-/* -----------------17.07.98 14:36-------------------
- *
- * --------------------------------------------------*/
+
void lcl_GetTblSeparators(uno::Any& rRet, SwTable* pTable, SwTableBox* pBox, sal_Bool bRow)
{
SwTabCols aCols;
@@ -670,9 +631,7 @@ void lcl_GetTblSeparators(uno::Any& rRet, SwTable* pTable, SwTableBox* pBox, sal
rRet.setValue(&aColSeq, ::getCppuType((uno::Sequence< text::TableColumnSeparator>*)0));
}
-/* -----------------17.07.98 14:36-------------------
- *
- * --------------------------------------------------*/
+
void lcl_SetTblSeparators(const uno::Any& rVal, SwTable* pTable, SwTableBox* pBox, sal_Bool bRow, SwDoc* pDoc)
{
SwTabCols aOldCols;
@@ -716,15 +675,14 @@ void lcl_SetTblSeparators(const uno::Any& rVal, SwTable* pTable, SwTableBox* pBo
}
}
}
-/* -----------------30.04.02 08:00-------------------
- *
- * --------------------------------------------------*/
+
inline rtl::OUString lcl_getString( SwXCell &rCell )
{
// getString is a member function of the base class...
return rCell.getString();
}
-/* -----------------30.04.02 08:00-------------------
+
+/* --------------------------------------------------
* non UNO function call to set string in SwXCell
* --------------------------------------------------*/
void lcl_setString( SwXCell &rCell, const rtl::OUString &rTxt,
@@ -742,7 +700,8 @@ void lcl_setString( SwXCell &rCell, const rtl::OUString &rTxt,
}
rCell.SwXText::setString(rTxt);
}
-/* -----------------30.04.02 08:00-------------------
+
+/* --------------------------------------------------
* non UNO function call to get value from SwXCell
* --------------------------------------------------*/
double lcl_getValue( SwXCell &rCell )
@@ -754,7 +713,8 @@ double lcl_getValue( SwXCell &rCell )
::rtl::math::setNan( &fRet );
return fRet;
}
-/* -----------------30.04.02 08:00-------------------
+
+/* --------------------------------------------------
* non UNO function call to set value in SwXCell
* --------------------------------------------------*/
void lcl_setValue( SwXCell &rCell, double nVal )
@@ -790,13 +750,12 @@ void lcl_setValue( SwXCell &rCell, double nVal )
pDoc->UpdateTblFlds( &aTblUpdate );
}
}
+
/******************************************************************
* SwXCell
******************************************************************/
TYPEINIT1(SwXCell, SwClient);
-/*-- 11.12.98 10:56:23---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXCell::SwXCell(SwFrmFmt* pTblFmt, SwTableBox* pBx, sal_uInt16 nPos ) :
SwXText(pTblFmt->GetDoc(), CURSOR_TBLTEXT),
SwClient(pTblFmt),
@@ -806,9 +765,7 @@ SwXCell::SwXCell(SwFrmFmt* pTblFmt, SwTableBox* pBx, sal_uInt16 nPos ) :
nFndPos(nPos)
{
}
-/* -----------------------------09.08.00 15:59--------------------------------
- ---------------------------------------------------------------------------*/
SwXCell::SwXCell(SwFrmFmt* pTblFmt, const SwStartNode& rStartNode) :
SwXText(pTblFmt->GetDoc(), CURSOR_TBLTEXT),
SwClient(pTblFmt),
@@ -819,24 +776,17 @@ SwXCell::SwXCell(SwFrmFmt* pTblFmt, const SwStartNode& rStartNode) :
{
}
-/*-- 11.12.98 10:56:24---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXCell::~SwXCell()
{
}
-/* -----------------------------10.03.00 18:02--------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXCell::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXCell::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -849,9 +799,7 @@ sal_Int64 SAL_CALL SwXCell::getSomething( const uno::Sequence< sal_Int8 >& rId )
else
return SwXText::getSomething(rId);
}
-/* -----------------------------18.05.00 10:18--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Type > SAL_CALL SwXCell::getTypes( ) throw(uno::RuntimeException)
{
static uno::Sequence< uno::Type > aRetTypes;
@@ -873,12 +821,10 @@ uno::Sequence< uno::Type > SAL_CALL SwXCell::getTypes( ) throw(uno::RuntimeExce
}
return aRetTypes;
}
-/* -----------------------------18.05.00 10:18--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< sal_Int8 > SAL_CALL SwXCell::getImplementationId( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -888,23 +834,17 @@ uno::Sequence< sal_Int8 > SAL_CALL SwXCell::getImplementationId( ) throw(uno::R
}
return aId;
}
-/* -----------------------------18.05.00 10:18--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXCell::acquire( ) throw()
{
SwXCellBaseClass::acquire();
}
-/* -----------------------------18.05.00 10:18--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXCell::release( ) throw()
{
SwXCellBaseClass::release();
}
-/* -----------------------------18.05.00 10:23--------------------------------
- ---------------------------------------------------------------------------*/
uno::Any SAL_CALL SwXCell::queryInterface( const uno::Type& aType )
throw (uno::RuntimeException)
{
@@ -913,9 +853,7 @@ uno::Any SAL_CALL SwXCell::queryInterface( const uno::Type& aType )
aRet = SwXText::queryInterface(aType);
return aRet;
}
-/*-- 11.12.98 10:56:24---------------------------------------------------
- -----------------------------------------------------------------------*/
const SwStartNode *SwXCell::GetStartNode() const
{
const SwStartNode *pSttNd = 0;
@@ -931,9 +869,7 @@ SwXCell::CreateCursor() throw (uno::RuntimeException)
{
return createTextCursor();
}
-/*-- 11.12.98 10:56:24---------------------------------------------------
- -----------------------------------------------------------------------*/
bool SwXCell::IsValid() const
{
// FIXME: this is now a const method, to make SwXText::IsValid invisible
@@ -955,12 +891,10 @@ bool SwXCell::IsValid() const
}
return 0 != pBox;
}
-/*-- 11.12.98 10:56:25---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwXCell::getFormula(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
OUString sRet;
if(IsValid())
{
@@ -971,12 +905,10 @@ OUString SwXCell::getFormula(void) throw( uno::RuntimeException )
}
return sRet;
}
-/*-- 11.12.98 10:56:26---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCell::setFormula(const OUString& rFormula) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(IsValid())
{
// Der Text mu? zunaechst (vielleicht) geloescht werden
@@ -1004,31 +936,25 @@ void SwXCell::setFormula(const OUString& rFormula) throw( uno::RuntimeException
pMyDoc->UpdateTblFlds( &aTblUpdate );
}
}
-/*-- 11.12.98 10:56:26---------------------------------------------------
- -----------------------------------------------------------------------*/
double SwXCell::getValue(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
double const fRet = lcl_getValue( *this );
// #i112652# a table cell may contain NaN as a value, do not filter that
return fRet;
}
-/*-- 11.12.98 10:56:26---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCell::setValue(double rValue) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
lcl_setValue( *this, rValue );
}
-/*-- 11.12.98 10:56:26---------------------------------------------------
- -----------------------------------------------------------------------*/
table::CellContentType SwXCell::getType(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
table::CellContentType nRes = table::CellContentType_EMPTY;
sal_uInt32 nNdPos = pBox->IsFormulaOrValueBox();
@@ -1039,34 +965,27 @@ table::CellContentType SwXCell::getType(void) throw( uno::RuntimeException )
case RES_BOXATR_VALUE : nRes = table::CellContentType_VALUE; break;
case RES_BOXATR_FORMULA : nRes = table::CellContentType_FORMULA; break;
default :
- DBG_ERROR( "unexpected case" );
+ OSL_FAIL( "unexpected case" );
}
return nRes;
}
-/* -----------------27.04.99 12:06-------------------
- *
- * --------------------------------------------------*/
+
void SwXCell::setString(const OUString& aString) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
lcl_setString( *this, aString );
}
-/*-- 11.12.98 10:56:27---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Int32 SwXCell::getError(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
OUString sContent = getString();
return sContent.equals(ViewShell::GetShellRes()->aCalc_Error);
}
-/*-- 11.12.98 10:56:28---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextCursor > SwXCell::createTextCursor(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextCursor > aRef;
if(pStartNode || IsValid())
{
@@ -1087,13 +1006,11 @@ uno::Reference< text::XTextCursor > SwXCell::createTextCursor(void) throw( uno:
throw uno::RuntimeException();
return aRef;
}
-/*-- 11.12.98 10:56:28---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextCursor > SwXCell::createTextCursorByRange(const uno::Reference< text::XTextRange > & xTextPosition)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextCursor > aRef;
SwUnoInternalPaM aPam(*GetDoc());
if ((pStartNode || IsValid())
@@ -1116,53 +1033,74 @@ uno::Reference< text::XTextCursor > SwXCell::createTextCursorByRange(const uno:
throw uno::RuntimeException();
return aRef;
}
-/*-- 11.12.98 10:56:33---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXCell::getPropertySetInfo(void) throw( uno::RuntimeException )
{
static uno::Reference< beans::XPropertySetInfo > xRef = m_pPropSet->getPropertySetInfo();
return xRef;
}
-/*-- 11.12.98 10:56:34---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue)
throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(IsValid())
{
- const SfxItemPropertySimpleEntry* pEntry =
- m_pPropSet->getPropertyMap()->getByName(rPropertyName);
- if( !pEntry )
+ // Hack to support hidden property to transfer textDirection
+ if ( rPropertyName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FRMDirection") ) ) )
{
- beans::UnknownPropertyException aEx;
- aEx.Message = rPropertyName;
- throw( aEx );
- }
- if( pEntry->nWID == FN_UNO_CELL_ROW_SPAN )
- {
- sal_Int32 nRowSpan = 0;
- if( aValue >>= nRowSpan )
- pBox->setRowSpan( nRowSpan );
+ SvxFrameDirection eDir = FRMDIR_ENVIRONMENT;
+ sal_Int16 nNum = 0;
+ aValue >>= nNum;
+ OSL_TRACE("FRMDirection val %d", nNum );
+ switch (nNum)
+ {
+ case 0:
+ eDir = FRMDIR_HORI_LEFT_TOP;
+ break;
+ case 1:
+ eDir = FRMDIR_HORI_RIGHT_TOP;
+ break;
+ case 2:
+ eDir = FRMDIR_VERT_TOP_RIGHT;
+ break;
+ default:
+ OSL_ENSURE( false, "unknown direction code, maybe its a bitfield");
+ }
+ SvxFrameDirectionItem aItem( eDir, RES_FRAMEDIR);
+ pBox->GetFrmFmt()->SetFmtAttr(aItem);
}
else
{
- SwFrmFmt* pBoxFmt = pBox->ClaimFrmFmt();
- SwAttrSet aSet(pBoxFmt->GetAttrSet());
- m_pPropSet->setPropertyValue(rPropertyName, aValue, aSet);
- pBoxFmt->GetDoc()->SetAttr(aSet, *pBoxFmt);
+ const SfxItemPropertySimpleEntry* pEntry =
+ m_pPropSet->getPropertyMap()->getByName(rPropertyName);
+ if( !pEntry )
+ {
+ beans::UnknownPropertyException aEx;
+ aEx.Message = rPropertyName;
+ throw( aEx );
+ }
+ if( pEntry->nWID == FN_UNO_CELL_ROW_SPAN )
+ {
+ sal_Int32 nRowSpan = 0;
+ if( aValue >>= nRowSpan )
+ pBox->setRowSpan( nRowSpan );
+ }
+ else
+ {
+ SwFrmFmt* pBoxFmt = pBox->ClaimFrmFmt();
+ SwAttrSet aSet(pBoxFmt->GetAttrSet());
+ m_pPropSet->setPropertyValue(rPropertyName, aValue, aSet);
+ pBoxFmt->GetDoc()->SetAttr(aSet, *pBoxFmt);
+ }
}
}
}
-/*-- 11.12.98 10:56:34---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
if(IsValid())
{
@@ -1214,40 +1152,30 @@ uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName)
}
return aRet;
}
-/*-- 11.12.98 10:56:35---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCell::addPropertyChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 10:56:35---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCell::removePropertyChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 10:56:36---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCell::addVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 10:56:36---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCell::removeVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 10:56:37---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< container::XEnumeration > SwXCell::createEnumeration(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< container::XEnumeration > aRef;
if(IsValid())
{
@@ -1273,31 +1201,23 @@ uno::Reference< container::XEnumeration > SwXCell::createEnumeration(void) thro
}
return aRef;
}
-/*-- 11.12.98 10:56:38---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SAL_CALL SwXCell::getElementType(void) throw( uno::RuntimeException )
{
return ::getCppuType((const uno::Reference<text::XTextRange>*)0);
}
-/*-- 11.12.98 10:56:38---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXCell::hasElements(void) throw( uno::RuntimeException )
{
return sal_True;
}
-/*-- 11.12.98 10:56:37---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCell::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
}
-/* -----------------12.06.98 07:54-------------------
- *
- * --------------------------------------------------*/
+
SwXCell* SwXCell::CreateXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, SwTable *pTable )
{
SwXCell* pRet = 0;
@@ -1330,7 +1250,8 @@ SwXCell* SwXCell::CreateXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, SwTable *pTab
}
return pRet;
}
-/* -----------------12.06.98 07:37-------------------
+
+/* --------------------------------------------------
* exitstiert die Box in der angegebenen Tabelle?
* --------------------------------------------------*/
SwTableBox* SwXCell::FindBox(SwTable* pTable, SwTableBox* pBox2)
@@ -1348,24 +1269,18 @@ SwTableBox* SwXCell::FindBox(SwTable* pTable, SwTableBox* pBox2)
nFndPos = USHRT_MAX;
return 0;
}
-/* -----------------------------19.04.00 15:20--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXCell::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXCell");
}
-/* -----------------------------19.04.00 15:20--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXCell::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
String sServiceName(rServiceName);
return sServiceName.EqualsAscii("com.sun.star.text.CellProperties");
}
-/* -----------------------------19.04.00 15:20--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXCell::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(1);
@@ -1377,23 +1292,16 @@ uno::Sequence< OUString > SwXCell::getSupportedServiceNames(void) throw( uno::Ru
/******************************************************************
* SwXTextTableRow
******************************************************************/
-/* -----------------------------19.04.00 15:20--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXTextTableRow::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXTextTableRow");
}
-/* -----------------------------19.04.00 15:20--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXTextTableRow::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.text.TextTableRow") == rServiceName;
}
-/* -----------------------------19.04.00 15:20--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXTextTableRow::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(1);
@@ -1402,9 +1310,7 @@ uno::Sequence< OUString > SwXTextTableRow::getSupportedServiceNames(void) throw(
return aRet;
}
TYPEINIT1(SwXTextTableRow, SwClient);
-/*-- 11.12.98 12:04:44---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextTableRow::SwXTextTableRow(SwFrmFmt* pFmt, SwTableLine* pLn) :
SwClient(pFmt),
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_TABLE_ROW)),
@@ -1412,29 +1318,23 @@ SwXTextTableRow::SwXTextTableRow(SwFrmFmt* pFmt, SwTableLine* pLn) :
{
}
-/*-- 11.12.98 12:04:45---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextTableRow::~SwXTextTableRow()
{
}
-/*-- 11.12.98 12:04:46---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXTextTableRow::getPropertySetInfo(void) throw( uno::RuntimeException )
{
static uno::Reference< beans::XPropertySetInfo > xRef = m_pPropSet->getPropertySetInfo();
return xRef;
}
-/*-- 11.12.98 12:04:46---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName,
const uno::Any& aValue)
throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
{
@@ -1490,12 +1390,10 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName,
}
}
}
-/*-- 11.12.98 12:04:47---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
@@ -1539,44 +1437,32 @@ uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName) throw(
}
return aRet;
}
-/*-- 11.12.98 12:04:47---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTableRow::addPropertyChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 12:04:48---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTableRow::removePropertyChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 12:04:48---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTableRow::addVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 12:04:49---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTableRow::removeVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 12:04:49---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTableRow::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
}
-/*-- 11.12.98 12:04:50---------------------------------------------------
- -----------------------------------------------------------------------*/
SwTableLine* SwXTextTableRow::FindLine(SwTable* pTable, SwTableLine* pLine)
{
SwTableLine* pRet = 0;
@@ -1593,21 +1479,16 @@ SwTableLine* SwXTextTableRow::FindLine(SwTable* pTable, SwTableLine* pLine)
/******************************************************************
* SwXTextTableCursor
******************************************************************/
-/* -----------------------------19.04.00 15:21--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXTextTableCursor::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXTextTableCursor");
}
-/* -----------------------------19.04.00 15:21--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXTextTableCursor::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.text.TextTableCursor") == rServiceName;
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XINTERFACE2(SwXTextTableCursor,SwXTextTableCursor_Base,OTextCursorHelper)
const SwPaM* SwXTextTableCursor::GetPaM() const { return GetCrsr(); }
SwPaM* SwXTextTableCursor::GetPaM() { return GetCrsr(); }
@@ -1615,9 +1496,7 @@ const SwDoc* SwXTextTableCursor::GetDoc() const { return GetFrmFmt()->Ge
SwDoc* SwXTextTableCursor::GetDoc() { return GetFrmFmt()->GetDoc(); }
const SwUnoCrsr* SwXTextTableCursor::GetCrsr() const { return (SwUnoCrsr*)aCrsrDepend.GetRegisteredIn(); }
SwUnoCrsr* SwXTextTableCursor::GetCrsr() { return (SwUnoCrsr*)aCrsrDepend.GetRegisteredIn(); }
-/* -----------------------------19.04.00 15:21--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXTextTableCursor::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(1);
@@ -1626,9 +1505,6 @@ uno::Sequence< OUString > SwXTextTableCursor::getSupportedServiceNames(void) thr
return aRet;
}
-/*-- 11.12.98 12:16:13---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextTableCursor::SwXTextTableCursor(SwFrmFmt* pFmt, SwTableBox* pBox) :
SwClient(pFmt),
aCrsrDepend(this, 0),
@@ -1643,9 +1519,7 @@ SwXTextTableCursor::SwXTextTableCursor(SwFrmFmt* pFmt, SwTableBox* pBox) :
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
pTblCrsr->MakeBoxSels();
}
-/*-- 11.12.98 12:16:14---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextTableCursor::SwXTextTableCursor(SwFrmFmt& rTableFmt, const SwTableCursor* pTableSelection) :
SwClient(&rTableFmt),
aCrsrDepend(this, 0),
@@ -1666,22 +1540,18 @@ SwXTextTableCursor::SwXTextTableCursor(SwFrmFmt& rTableFmt, const SwTableCursor*
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
pTblCrsr->MakeBoxSels();
}
-/*-- 11.12.98 12:16:14---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextTableCursor::~SwXTextTableCursor()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(pUnoCrsr)
delete pUnoCrsr;
}
-/*-- 11.12.98 12:16:15---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwXTextTableCursor::getRangeName(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
OUString aRet;
SwUnoCrsr* pUnoCrsr = GetCrsr();
@@ -1718,13 +1588,11 @@ OUString SwXTextTableCursor::getRangeName(void) throw( uno::RuntimeException )
}
return aRet;
}
-/*-- 11.12.98 12:16:15---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextTableCursor::gotoCellByName(const OUString& CellName, sal_Bool Expand)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(pUnoCrsr)
@@ -1736,12 +1604,10 @@ sal_Bool SwXTextTableCursor::gotoCellByName(const OUString& CellName, sal_Bool E
}
return bRet;
}
-/*-- 11.12.98 12:16:15---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextTableCursor::goLeft(sal_Int16 Count, sal_Bool Expand) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(pUnoCrsr)
@@ -1752,12 +1618,10 @@ sal_Bool SwXTextTableCursor::goLeft(sal_Int16 Count, sal_Bool Expand) throw( uno
}
return bRet;
}
-/*-- 11.12.98 12:16:15---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextTableCursor::goRight(sal_Int16 Count, sal_Bool Expand) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(pUnoCrsr)
@@ -1768,12 +1632,10 @@ sal_Bool SwXTextTableCursor::goRight(sal_Int16 Count, sal_Bool Expand) throw( un
}
return bRet;
}
-/*-- 11.12.98 12:16:16---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextTableCursor::goUp(sal_Int16 Count, sal_Bool Expand) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(pUnoCrsr)
@@ -1784,12 +1646,10 @@ sal_Bool SwXTextTableCursor::goUp(sal_Int16 Count, sal_Bool Expand) throw( uno::
}
return bRet;
}
-/*-- 11.12.98 12:16:16---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextTableCursor::goDown(sal_Int16 Count, sal_Bool Expand) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(pUnoCrsr)
@@ -1800,12 +1660,10 @@ sal_Bool SwXTextTableCursor::goDown(sal_Int16 Count, sal_Bool Expand) throw( uno
}
return bRet;
}
-/*-- 11.12.98 12:16:16---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTableCursor::gotoStart(sal_Bool Expand) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(pUnoCrsr)
{
@@ -1814,12 +1672,10 @@ void SwXTextTableCursor::gotoStart(sal_Bool Expand) throw( uno::RuntimeException
pTblCrsr->MoveTable(fnTableCurr, fnTableStart);
}
}
-/*-- 11.12.98 12:16:16---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTableCursor::gotoEnd(sal_Bool Expand) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(pUnoCrsr)
{
@@ -1828,12 +1684,10 @@ void SwXTextTableCursor::gotoEnd(sal_Bool Expand) throw( uno::RuntimeException )
pTblCrsr->MoveTable(fnTableCurr, fnTableEnd);
}
}
-/*-- 11.12.98 12:16:16---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextTableCursor::mergeRange(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(pUnoCrsr)
@@ -1859,12 +1713,10 @@ sal_Bool SwXTextTableCursor::mergeRange(void) throw( uno::RuntimeException )
}
return bRet;
}
-/*-- 11.12.98 12:16:16---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextTableCursor::splitRange(sal_Int16 Count, sal_Bool Horizontal) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (Count <= 0)
throw uno::RuntimeException( OUString( RTL_CONSTASCII_USTRINGPARAM( "Illegal first argument: needs to be > 0" ) ), static_cast < cppu::OWeakObject * > ( this ) );
sal_Bool bRet = sal_False;
@@ -1885,17 +1737,13 @@ sal_Bool SwXTextTableCursor::splitRange(sal_Int16 Count, sal_Bool Horizontal) th
}
return bRet;
}
-/*-- 11.12.98 12:16:17---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXTextTableCursor::getPropertySetInfo(void) throw( uno::RuntimeException )
{
static uno::Reference< beans::XPropertySetInfo > xRef = m_pPropSet->getPropertySetInfo();
return xRef;
}
-/*-- 11.12.98 12:16:17---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName,
const uno::Any& aValue)
throw( beans::UnknownPropertyException,
@@ -1904,7 +1752,7 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName,
lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(pUnoCrsr)
{
@@ -1961,13 +1809,11 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName,
throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
}
}
-/*-- 11.12.98 12:16:17---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(pUnoCrsr)
@@ -2023,48 +1869,38 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName)
}
return aRet;
}
-/*-- 11.12.98 12:16:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTableCursor::addPropertyChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 12:16:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTableCursor::removePropertyChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 12:16:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTableCursor::addVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 12:16:19---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTableCursor::removeVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 12:16:19---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTableCursor::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
}
+
/******************************************************************
* SwXTextTable
******************************************************************/
/****************************************************************************
Tabellenbeschreibung
****************************************************************************/
-
class SwTableProperties_Impl
{
SwUnoCursorHelper::SwAnyMapHelper aAnyMap;
@@ -2078,36 +1914,24 @@ public:
void ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc);
};
-/* -----------------22.06.98 09:43-------------------
- *
- * --------------------------------------------------*/
SwTableProperties_Impl::SwTableProperties_Impl()
{
}
-/* -----------------22.06.98 09:51-------------------
- *
- * --------------------------------------------------*/
+
SwTableProperties_Impl::~SwTableProperties_Impl()
{
}
-/* -----------------22.06.98 09:51-------------------
- *
- * --------------------------------------------------*/
+
void SwTableProperties_Impl::SetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any& rVal)
{
aAnyMap.SetValue( nWhichId, nMemberId, rVal );
}
-/* -----------------22.06.98 09:51-------------------
- *
- * --------------------------------------------------*/
sal_Bool SwTableProperties_Impl::GetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any*& rpAny )
{
return aAnyMap.FillValue( nWhichId, nMemberId, rpAny );
}
-/* -----------------13.01.99 15:42-------------------
- *
- * --------------------------------------------------*/
+
void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
{
SfxItemSet aSet(rDoc.GetAttrPool(),
@@ -2205,17 +2029,14 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
aSet.Put(aKeep);
}
- sal_Bool bFullAlign = sal_True;
const uno::Any* pHOrient;
if(GetProperty(RES_HORI_ORIENT, MID_HORIORIENT_ORIENT, pHOrient))
{
SwFmtHoriOrient aOrient ( rFrmFmt.GetHoriOrient() );
((SfxPoolItem&)aOrient).PutValue(*pHOrient, MID_HORIORIENT_ORIENT|CONVERT_TWIPS);
- bFullAlign = (aOrient.GetHoriOrient() == text::HoriOrientation::FULL);
aSet.Put(aOrient);
}
-
const uno::Any* pSzRel = 0;
GetProperty(FN_TABLE_IS_RELATIVE_WIDTH, 0xff, pSzRel );
const uno::Any* pRelWidth = 0;
@@ -2286,17 +2107,12 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
rDoc.SetAttr( aSet, *rTbl.GetFrmFmt() );
}
}
-/* -----------------------------10.03.00 18:02--------------------------------
-
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXTextTable::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXTextTable::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -2308,14 +2124,9 @@ sal_Int64 SAL_CALL SwXTextTable::getSomething( const uno::Sequence< sal_Int8 >&
}
return 0;
}
-/*-- 11.12.98 12:42:43---------------------------------------------------
- -----------------------------------------------------------------------*/
TYPEINIT1(SwXTextTable, SwClient)
-/*-- 11.12.98 12:42:43---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextTable::SwXTextTable() :
aLstnrCntnr( (text::XTextTable*)this),
aChartLstnrCntnr( (text::XTextTable*)this),
@@ -2329,9 +2140,7 @@ SwXTextTable::SwXTextTable() :
{
}
-/*-- 11.12.98 12:42:44---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextTable::SwXTextTable(SwFrmFmt& rFrmFmt) :
SwClient( &rFrmFmt ),
aLstnrCntnr( (text::XTextTable*)this),
@@ -2346,16 +2155,12 @@ SwXTextTable::SwXTextTable(SwFrmFmt& rFrmFmt) :
{
}
-/*-- 11.12.98 12:42:44---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextTable::~SwXTextTable()
{
delete pTableProps;
}
-/*-- 11.12.98 12:42:44---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::initialize(sal_Int32 nR, sal_Int32 nC) throw( uno::RuntimeException )
{
if(!bIsDescriptor || nR <= 0 || nC <= 0 || nR >= USHRT_MAX || nC >= USHRT_MAX )
@@ -2366,12 +2171,10 @@ void SwXTextTable::initialize(sal_Int32 nR, sal_Int32 nC) throw( uno::RuntimeExc
nColumns = (sal_uInt16)nC;
}
}
-/*-- 11.12.98 12:42:45---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< table::XTableRows > SwXTextTable::getRows(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< table::XTableRows > xRet;
if (SwFrmFmt* pFmt = GetFrmFmt())
{
@@ -2385,12 +2188,10 @@ uno::Reference< table::XTableRows > SwXTextTable::getRows(void) throw( uno::Run
throw uno::RuntimeException();
return xRet;
}
-/*-- 11.12.98 12:42:45---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< table::XTableColumns > SwXTextTable::getColumns(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< table::XTableColumns > xRet;
if (SwFrmFmt* pFmt = GetFrmFmt())
{
@@ -2404,12 +2205,10 @@ uno::Reference< table::XTableColumns > SwXTextTable::getColumns(void) throw( un
throw uno::RuntimeException();
return xRet;
}
-/*-- 11.12.98 12:42:45---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< table::XCell > SwXTextTable::getCellByName(const OUString& CellName) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< table::XCell > xRet;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
@@ -2426,12 +2225,10 @@ uno::Reference< table::XCell > SwXTextTable::getCellByName(const OUString& Cell
throw uno::RuntimeException();
return xRet;
}
-/*-- 11.12.98 12:42:45---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXTextTable::getCellNames(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
{
@@ -2453,13 +2250,11 @@ uno::Sequence< OUString > SwXTextTable::getCellNames(void) throw( uno::RuntimeEx
}
return uno::Sequence< OUString >();
}
-/*-- 11.12.98 12:42:45---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextTableCursor > SwXTextTable::createCursorByCellName(const OUString& CellName)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextTableCursor > xRet;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
@@ -2476,9 +2271,7 @@ uno::Reference< text::XTextTableCursor > SwXTextTable::createCursorByCellName(c
throw uno::RuntimeException();
return xRet;
}
-/* -----------------18.02.99 13:36-------------------
- *
- * --------------------------------------------------*/
+
void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTextRange)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
@@ -2571,34 +2364,28 @@ void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTex
else
throw lang::IllegalArgumentException();
}
-/*-- 11.12.98 12:42:45---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::attach(const uno::Reference< text::XTextRange > & xTextRange)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
attachToRange( xTextRange );
}
-/*-- 11.12.98 12:42:46---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SwXTextTable::getAnchor(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if(!pFmt)
throw uno::RuntimeException();
uno::Reference< text::XTextRange > xRet = new SwXTextRange(*pFmt);
return xRet;
}
-/*-- 11.12.98 12:42:46---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::dispose(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
{
@@ -2611,30 +2398,24 @@ void SwXTextTable::dispose(void) throw( uno::RuntimeException )
else
throw uno::RuntimeException();
}
-/*-- 11.12.98 12:42:46---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::addEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException )
{
if(!GetRegisteredIn())
throw uno::RuntimeException();
aLstnrCntnr.AddListener(aListener);
}
-/*-- 11.12.98 12:42:46---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::removeEventListener(const uno::Reference< lang::XEventListener > & aListener) throw( uno::RuntimeException )
{
if(!GetRegisteredIn() || !aLstnrCntnr.RemoveListener(aListener))
throw uno::RuntimeException();
}
-/*-- 11.12.98 12:42:46---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< table::XCell > SwXTextTable::getCellByPosition(sal_Int32 nColumn, sal_Int32 nRow)
throw( uno::RuntimeException, lang::IndexOutOfBoundsException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< table::XCell > aRef;
SwFrmFmt* pFmt = GetFrmFmt();
// Sheet interessiert nicht
@@ -2649,14 +2430,12 @@ uno::Reference< table::XCell > SwXTextTable::getCellByPosition(sal_Int32 nColum
return aRef;
}
-/* -----------------11.12.98 13:26-------------------
- *
- * --------------------------------------------------*/
+
uno::Reference< table::XCellRange > SwXTextTable::GetRangeByName(SwFrmFmt* pFmt, SwTable* pTable,
const String& rTLName, const String& rBRName,
SwRangeDescriptor& rDesc)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< table::XCellRange > aRef;
String sTLName(rTLName);
String sBRName(rBRName);
@@ -2688,14 +2467,12 @@ uno::Reference< table::XCellRange > SwXTextTable::GetRangeByName(SwFrmFmt* pFmt
}
return aRef;
}
-/*-- 11.12.98 12:42:46---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< table::XCellRange > SwXTextTable::getCellRangeByPosition(sal_Int32 nLeft, sal_Int32 nTop,
sal_Int32 nRight, sal_Int32 nBottom)
throw( uno::RuntimeException, lang::IndexOutOfBoundsException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< table::XCellRange > aRef;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt && nRight < USHRT_MAX && nBottom < USHRT_MAX &&
@@ -2723,13 +2500,11 @@ uno::Reference< table::XCellRange > SwXTextTable::getCellRangeByPosition(sal_In
throw lang::IndexOutOfBoundsException();
return aRef;
}
-/*-- 11.12.98 12:42:47---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< table::XCellRange > SwXTextTable::getCellRangeByName(const OUString& aRange)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< table::XCellRange > aRef;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
@@ -2760,15 +2535,13 @@ uno::Reference< table::XCellRange > SwXTextTable::getCellRangeByName(const OUSt
throw uno::RuntimeException();
return aRef;
}
-/*-- 29.04.02 11:42:47---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXTextTable::getDataArray()
throw (uno::RuntimeException)
{
// see SwXTextTable::getData(...) also
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nRowCount = getRowCount();
sal_Int16 nColCount = getColumnCount();
if(!nRowCount || !nColCount)
@@ -2822,16 +2595,14 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXTextTable::getDataArray()
throw uno::RuntimeException();
return aRowSeq;
}
-/*-- 29.04.02 11:42:47---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXTextTable::setDataArray(
const uno::Sequence< uno::Sequence< uno::Any > >& rArray )
throw (uno::RuntimeException)
{
// see SwXTextTable::setData(...) also
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nRowCount = getRowCount();
sal_Int16 nColCount = getColumnCount();
@@ -2892,13 +2663,11 @@ void SAL_CALL SwXTextTable::setDataArray(
}
}
}
-/*-- 11.12.98 12:42:47---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< uno::Sequence< double > > SwXTextTable::getData(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nRowCount = getRowCount();
sal_Int16 nColCount = getColumnCount();
if(!nRowCount || !nColCount)
@@ -2936,13 +2705,11 @@ uno::Sequence< uno::Sequence< double > > SwXTextTable::getData(void)
throw uno::RuntimeException();
return aRowSeq;
}
-/*-- 11.12.98 12:42:47---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::setData(const uno::Sequence< uno::Sequence< double > >& rData)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nRowCount = getRowCount();
sal_Int16 nColCount = getColumnCount();
sal_Bool bChanged = sal_False;
@@ -2986,12 +2753,10 @@ void SwXTextTable::setData(const uno::Sequence< uno::Sequence< double > >& rData
aChartLstnrCntnr.ChartDataChanged();
}
}
-/*-- 11.12.98 12:42:47---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXTextTable::getRowDescriptions(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nRowCount = getRowCount();
if(!nRowCount)
{
@@ -3021,19 +2786,17 @@ uno::Sequence< OUString > SwXTextTable::getRowDescriptions(void) throw( uno::Run
}
else
{
- DBG_ERROR("Wo kommen die Labels her?");
+ OSL_FAIL("Wo kommen die Labels her?");
}
}
else
throw uno::RuntimeException();
return aRet;
}
-/*-- 11.12.98 12:42:47---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::setRowDescriptions(const uno::Sequence< OUString >& rRowDesc) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
{
@@ -3059,19 +2822,17 @@ void SwXTextTable::setRowDescriptions(const uno::Sequence< OUString >& rRowDesc)
}
else
{
- DBG_ERROR("Wohin mit den Labels?");
+ OSL_FAIL("Wohin mit den Labels?");
}
}
else
throw uno::RuntimeException();
}
-/*-- 11.12.98 12:42:48---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXTextTable::getColumnDescriptions(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nColCount = getColumnCount();
if(!nColCount)
{
@@ -3101,19 +2862,17 @@ uno::Sequence< OUString > SwXTextTable::getColumnDescriptions(void)
}
else
{
- DBG_ERROR("Wo kommen die Labels her?");
+ OSL_FAIL("Wo kommen die Labels her?");
}
}
else
throw uno::RuntimeException();
return aRet;
}
-/*-- 11.12.98 12:42:48---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::setColumnDescriptions(const uno::Sequence< OUString >& rColumnDesc) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nColCount = getColumnCount();
if(!nColCount)
{
@@ -3141,15 +2900,13 @@ void SwXTextTable::setColumnDescriptions(const uno::Sequence< OUString >& rColum
}
else
{
- DBG_ERROR("Wo kommen die Labels her?");
+ OSL_FAIL("Wo kommen die Labels her?");
}
}
else
throw uno::RuntimeException();
}
-/*-- 11.12.98 12:42:48---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::addChartDataChangeEventListener(
const uno::Reference< chart::XChartDataChangeEventListener > & aListener)
throw( uno::RuntimeException )
@@ -3158,9 +2915,7 @@ void SwXTextTable::addChartDataChangeEventListener(
throw uno::RuntimeException();
aChartLstnrCntnr.AddListener(aListener.get());
}
-/*-- 11.12.98 12:42:48---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::removeChartDataChangeEventListener(
const uno::Reference< chart::XChartDataChangeEventListener > & aListener)
throw( uno::RuntimeException )
@@ -3168,41 +2923,33 @@ void SwXTextTable::removeChartDataChangeEventListener(
if(!GetRegisteredIn() || !aChartLstnrCntnr.RemoveListener(aListener.get()))
throw uno::RuntimeException();
}
-/* -----------------08.03.99 15:33-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwXTextTable::isNotANumber(double nNumber) throw( uno::RuntimeException )
{
// We use DBL_MIN because starcalc does (which uses it because chart
// wants it that way!)
return ( nNumber == DBL_MIN );
}
-/* -----------------08.03.99 15:34-------------------
- *
- * --------------------------------------------------*/
+
double SwXTextTable::getNotANumber(void) throw( uno::RuntimeException )
{
// We use DBL_MIN because starcalc does (which uses it because chart
// wants it that way!)
return DBL_MIN;
}
-/*-- 11.12.98 12:42:48---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyValue > SwXTextTable::createSortDescriptor(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return SwUnoCursorHelper::CreateSortDescriptor(true);
}
-/*-- 11.12.98 12:42:49---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwSortOptions aSortOpt;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt &&
@@ -3220,12 +2967,10 @@ void SwXTextTable::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor
pFmt->GetDoc()->SortTbl(aBoxes, aSortOpt);
}
}
-/*-- 11.12.98 12:42:49---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::autoFormat(const OUString& aName) throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
{
@@ -3255,23 +3000,19 @@ void SwXTextTable::autoFormat(const OUString& aName) throw( lang::IllegalArgumen
else
throw uno::RuntimeException();
}
-/*-- 11.12.98 12:42:49---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXTextTable::getPropertySetInfo(void) throw( uno::RuntimeException )
{
static uno::Reference< beans::XPropertySetInfo > xRef = m_pPropSet->getPropertySetInfo();
return xRef;
}
-/*-- 11.12.98 12:42:50---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
const uno::Any& aValue)
throw( beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if(!aValue.hasValue())
throw lang::IllegalArgumentException();
@@ -3475,12 +3216,10 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
else
throw uno::RuntimeException();
}
-/*-- 11.12.98 12:42:51---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
SwFrmFmt* pFmt = GetFrmFmt();
const SfxItemPropertySimpleEntry* pEntry =
@@ -3690,40 +3429,30 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
throw uno::RuntimeException();
return aRet;
}
-/*-- 11.12.98 12:42:51---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::addPropertyChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 12:42:52---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::removePropertyChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 12:42:58---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::addVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 12:42:58---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::removeVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 12:42:58---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwXTextTable::getName(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
String sRet;
SwFrmFmt* pFmt = GetFrmFmt();
if(!pFmt && !bIsDescriptor)
@@ -3736,18 +3465,16 @@ OUString SwXTextTable::getName(void) throw( uno::RuntimeException )
sRet = m_sTableName;
return sRet;
}
-/*-- 11.12.98 12:42:59---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::setName(const OUString& rName) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
String sNewTblName(rName);
if((!pFmt && !bIsDescriptor) ||
- !sNewTblName.Len() ||
- STRING_NOTFOUND != sNewTblName.Search('.') ||
- STRING_NOTFOUND != sNewTblName.Search(' ') )
+ !sNewTblName.Len() ||
+ STRING_NOTFOUND != sNewTblName.Search('.') ||
+ STRING_NOTFOUND != sNewTblName.Search(' ') )
throw uno::RuntimeException();
if(pFmt)
@@ -3796,12 +3523,10 @@ void SwXTextTable::setName(const OUString& rName) throw( uno::RuntimeException )
else
m_sTableName = sNewTblName;
}
-/*-----------------11.02.98 09:58-------------------
---------------------------------------------------*/
sal_uInt16 SwXTextTable::getRowCount(void)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nRet = 0;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
@@ -3814,12 +3539,10 @@ sal_uInt16 SwXTextTable::getRowCount(void)
}
return nRet;
}
-/*-----------------11.02.98 09:58-------------------
---------------------------------------------------*/
sal_uInt16 SwXTextTable::getColumnCount(void)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
sal_Int16 nRet = 0;
if(pFmt)
@@ -3834,9 +3557,7 @@ sal_uInt16 SwXTextTable::getColumnCount(void)
}
return nRet;
}
-/*-- 11.12.98 12:42:59---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextTable::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
if(pOld && pOld->Which() == RES_REMOVE_UNO_OBJECT &&
@@ -3852,16 +3573,12 @@ void SwXTextTable::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
else
aChartLstnrCntnr.ChartDataChanged();
}
-/* -----------------25.10.99 15:12-------------------
- --------------------------------------------------*/
OUString SAL_CALL SwXTextTable::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXTextTable");
}
-/* -----------------25.10.99 15:12-------------------
- --------------------------------------------------*/
sal_Bool SwXTextTable::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
String sServiceName(rServiceName);
@@ -3870,9 +3587,7 @@ sal_Bool SwXTextTable::supportsService(const OUString& rServiceName) throw( uno:
sServiceName.EqualsAscii("com.sun.star.text.TextContent") ||
sServiceName.EqualsAscii("com.sun.star.text.TextSortable"));
}
-/* -----------------25.10.99 15:12-------------------
- --------------------------------------------------*/
uno::Sequence< OUString > SwXTextTable::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(4);
@@ -3884,20 +3599,12 @@ uno::Sequence< OUString > SwXTextTable::getSupportedServiceNames(void) throw( un
return aRet;
}
-/******************************************************************
- *
- ******************************************************************/
-/* -----------------------------10.03.00 18:02--------------------------------
-
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXCellRange::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXCellRange::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -3909,20 +3616,14 @@ sal_Int64 SAL_CALL SwXCellRange::getSomething( const uno::Sequence< sal_Int8 >&
}
return 0;
}
-/* -----------------28.04.98 10:29-------------------
- *
- * --------------------------------------------------*/
+
TYPEINIT1(SwXCellRange, SwClient);
-/* -----------------------------19.04.00 15:21--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXCellRange::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXCellRange");
}
-/* -----------------------------19.04.00 15:21--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXCellRange::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return
@@ -3934,9 +3635,7 @@ sal_Bool SwXCellRange::supportsService(const OUString& rServiceName) throw( uno:
rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.style.ParagraphPropertiesAsian" ) ) ||
rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.style.ParagraphPropertiesComplex" ) );
}
-/* -----------------------------19.04.00 15:21--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXCellRange::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(7);
@@ -3951,9 +3650,6 @@ uno::Sequence< OUString > SwXCellRange::getSupportedServiceNames(void) throw( un
return aRet;
}
-/*-- 11.12.98 14:27:33---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXCellRange::SwXCellRange(SwUnoCrsr* pCrsr, SwFrmFmt& rFrmFmt,
SwRangeDescriptor& rDesc)
:
@@ -3968,21 +3664,17 @@ SwXCellRange::SwXCellRange(SwUnoCrsr* pCrsr, SwFrmFmt& rFrmFmt,
{
aRgDesc.Normalize();
}
-/*-- 11.12.98 14:27:33---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXCellRange::~SwXCellRange()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
delete pTblCrsr;
}
-/*-- 11.12.98 14:27:34---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< table::XCell > SwXCellRange::getCellByPosition(sal_Int32 nColumn, sal_Int32 nRow)
throw( uno::RuntimeException, lang::IndexOutOfBoundsException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< table::XCell > aRet;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
@@ -4000,14 +3692,12 @@ uno::Reference< table::XCell > SwXCellRange::getCellByPosition(sal_Int32 nColum
throw lang::IndexOutOfBoundsException();
return aRet;
}
-/*-- 11.12.98 14:27:34---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< table::XCellRange > SwXCellRange::getCellRangeByPosition(
sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom)
throw( uno::RuntimeException, lang::IndexOutOfBoundsException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< table::XCellRange > aRet;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt && getColumnCount() > nRight && getRowCount() > nBottom &&
@@ -4058,13 +3748,11 @@ uno::Reference< table::XCellRange > SwXCellRange::getCellRangeByPosition(
return aRet;
}
-/*-- 11.12.98 14:27:34---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< table::XCellRange > SwXCellRange::getCellRangeByName(const OUString& rRange)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
String sRange(rRange);
String sTLName(sRange.GetToken(0, ':'));
String sBRName(sRange.GetToken(1, ':'));
@@ -4078,23 +3766,19 @@ uno::Reference< table::XCellRange > SwXCellRange::getCellRangeByName(const OUSt
return getCellRangeByPosition(aDesc.nLeft - aRgDesc.nLeft, aDesc.nTop - aRgDesc.nTop,
aDesc.nRight - aRgDesc.nLeft, aDesc.nBottom - aRgDesc.nTop);
}
-/*-- 11.12.98 14:27:35---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXCellRange::getPropertySetInfo(void) throw( uno::RuntimeException )
{
static uno::Reference< beans::XPropertySetInfo > xRef = m_pPropSet->getPropertySetInfo();
return xRef;
}
-/*-- 11.12.98 14:27:35---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCellRange::setPropertyValue(const OUString& rPropertyName,
const uno::Any& aValue) throw( beans::UnknownPropertyException,
beans::PropertyVetoException, lang::IllegalArgumentException,
lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
{
@@ -4167,6 +3851,14 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName,
pDoc->SetBoxAttr( *pCrsr, aNumberFormat);
}
break;
+ case RES_VERT_ORIENT:
+ {
+ sal_Int16 nAlign = -1;
+ aValue >>= nAlign;
+ if( nAlign >= text::VertOrientation::NONE && nAlign <= text::VertOrientation::BOTTOM)
+ pDoc->SetBoxAlign( *pCrsr, nAlign );
+ }
+ break;
case FN_UNO_RANGE_ROW_LABEL:
{
sal_Bool bTmp = *(sal_Bool*)aValue.getValue();
@@ -4207,12 +3899,10 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName,
throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
}
}
-/*-- 11.12.98 14:27:35---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
@@ -4246,6 +3936,15 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) throw( be
rBoxItem.QueryValue(aRet, pEntry->nMemberId);
}
break;
+ case RES_VERT_ORIENT:
+ {
+ SwFmtVertOrient aVertOrient;
+ if( pTblCrsr->GetDoc()->GetBoxAttr( *pTblCrsr, aVertOrient ) )
+ {
+ aVertOrient.QueryValue( aRet, pEntry->nMemberId );
+ }
+ }
+ break;
case RES_BOXATR_FORMAT:
//GetAttr fuer Tabellenselektion am Doc fehlt noch
DBG_WARNING("not implemented");
@@ -4291,39 +3990,27 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) throw( be
}
return aRet;
}
-/*-- 11.12.98 14:27:35---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCellRange::addPropertyChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 14:27:35---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCellRange::removePropertyChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 14:27:36---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCellRange::addVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-- 11.12.98 14:27:36---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCellRange::removeVetoableChangeListener(const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
DBG_WARNING("not implemented");
}
-/*-----------------------------------------------------------------------
-
- -----------------------------------------------------------------------*/
-
void SwXCellRange::GetDataSequence(
uno::Sequence< uno::Any > *pAnySeq, //-> first pointer != 0 is used
uno::Sequence< OUString > *pTxtSeq, //-> as output sequence
@@ -4333,7 +4020,7 @@ void SwXCellRange::GetDataSequence(
// from 0 even if the cell is formatted to text
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// compare to SwXCellRange::getDataArray (note different return types though)
@@ -4356,7 +4043,7 @@ void SwXCellRange::GetDataSequence(
pDblSeq->realloc( nSize );
else
{
- DBG_ERROR( "argument missing" );
+ OSL_FAIL( "argument missing" );
return;
}
uno::Any *pAnyData = pAnySeq ? pAnySeq->getArray() : 0;
@@ -4453,7 +4140,7 @@ void SwXCellRange::GetDataSequence(
pDblData[nDtaCnt++] = fVal;
}
else {
- DBG_ERROR( "output sequence missing" );
+ OSL_FAIL( "output sequence missing" );
}
}
}
@@ -4468,16 +4155,13 @@ void SwXCellRange::GetDataSequence(
pDblSeq->realloc( nDtaCnt );
}
-/*-- 29.04.02 11:42:47---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXCellRange::getDataArray()
throw (uno::RuntimeException)
{
// see SwXCellRange::getData also
// also see SwXCellRange::GetDataSequence
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nRowCount = getRowCount();
sal_Int16 nColCount = getColumnCount();
//
@@ -4532,16 +4216,14 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXCellRange::getDataArray()
}
return aRowSeq;
}
-/*-- 29.04.02 11:42:47---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXCellRange::setDataArray(
const uno::Sequence< uno::Sequence< uno::Any > >& rArray )
throw (uno::RuntimeException)
{
// see SwXCellRange::setData also
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nRowCount = getRowCount();
sal_Int16 nColCount = getColumnCount();
if(!nRowCount || !nColCount)
@@ -4600,12 +4282,10 @@ void SAL_CALL SwXCellRange::setDataArray(
}
}
}
-/*-- 11.12.98 14:27:36---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< uno::Sequence< double > > SwXCellRange::getData(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nRowCount = getRowCount();
sal_Int16 nColCount = getColumnCount();
//
@@ -4641,13 +4321,11 @@ uno::Sequence< uno::Sequence< double > > SwXCellRange::getData(void) throw( uno:
}
return aRowSeq;
}
-/*-- 11.12.98 14:27:37---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCellRange::setData(const uno::Sequence< uno::Sequence< double > >& rData)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nRowCount = getRowCount();
sal_Int16 nColCount = getColumnCount();
if(!nRowCount || !nColCount)
@@ -4686,13 +4364,11 @@ void SwXCellRange::setData(const uno::Sequence< uno::Sequence< double > >& rData
}
}
}
-/*-- 11.12.98 14:27:37---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXCellRange::getRowDescriptions(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nRowCount = getRowCount();
if(!nRowCount)
{
@@ -4721,20 +4397,18 @@ uno::Sequence< OUString > SwXCellRange::getRowDescriptions(void)
}
else
{
- DBG_ERROR("Wo kommen die Labels her?");
+ OSL_FAIL("Wo kommen die Labels her?");
}
}
else
throw uno::RuntimeException();
return aRet;
}
-/*-- 11.12.98 14:27:37---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCellRange::setRowDescriptions(const uno::Sequence< OUString >& rRowDesc)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
{
@@ -4760,17 +4434,15 @@ void SwXCellRange::setRowDescriptions(const uno::Sequence< OUString >& rRowDesc)
}
else
{
- DBG_ERROR("Wohin mit den Labels?");
+ OSL_FAIL("Wohin mit den Labels?");
}
}
}
-/*-- 11.12.98 14:27:37---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXCellRange::getColumnDescriptions(void)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nColCount = getColumnCount();
if(!nColCount)
{
@@ -4799,20 +4471,18 @@ uno::Sequence< OUString > SwXCellRange::getColumnDescriptions(void)
}
else
{
- DBG_ERROR("Wo kommen die Labels her?");
+ OSL_FAIL("Wo kommen die Labels her?");
}
}
else
throw uno::RuntimeException();
return aRet;
}
-/*-- 11.12.98 14:27:37---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCellRange::setColumnDescriptions(const uno::Sequence< OUString >& ColumnDesc)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nColCount = getColumnCount();
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
@@ -4835,60 +4505,48 @@ void SwXCellRange::setColumnDescriptions(const uno::Sequence< OUString >& Column
}
else
{
- DBG_ERROR("Wo kommen die Labels her?");
+ OSL_FAIL("Wo kommen die Labels her?");
}
}
}
-/*-- 11.12.98 14:27:38---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCellRange::addChartDataChangeEventListener(const uno::Reference< chart::XChartDataChangeEventListener > & aListener) throw( uno::RuntimeException )
{
if(!GetRegisteredIn())
throw uno::RuntimeException();
aChartLstnrCntnr.AddListener(aListener.get());
}
-/*-- 11.12.98 14:27:38---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXCellRange::removeChartDataChangeEventListener(const uno::Reference< chart::XChartDataChangeEventListener > & aListener) throw( uno::RuntimeException )
{
if(!GetRegisteredIn() || !aChartLstnrCntnr.RemoveListener(aListener.get()))
throw uno::RuntimeException();
}
-/* -----------------08.03.99 15:36-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwXCellRange::isNotANumber(double /*fNumber*/) throw( uno::RuntimeException )
{
DBG_WARNING("not implemented");
return sal_False;
}
-/* -----------------08.03.99 15:36-------------------
- *
- * --------------------------------------------------*/
+
double SwXCellRange::getNotANumber(void) throw( uno::RuntimeException )
{
DBG_WARNING("not implemented");
return 0.;
}
-/*-- 11.12.98 14:27:38---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyValue > SwXCellRange::createSortDescriptor(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return SwUnoCursorHelper::CreateSortDescriptor(true);
}
-/*-- 11.12.98 14:27:39---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL SwXCellRange::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwSortOptions aSortOpt;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt &&
@@ -4900,23 +4558,17 @@ void SAL_CALL SwXCellRange::sort(const uno::Sequence< beans::PropertyValue >& rD
pFmt->GetDoc()->SortTbl(pTableCrsr->GetBoxes(), aSortOpt);
}
}
-/* -----------------27.04.98 16:54-------------------
- *
- * --------------------------------------------------*/
+
sal_uInt16 SwXCellRange::getColumnCount(void)
{
return static_cast< sal_uInt16 >(aRgDesc.nRight - aRgDesc.nLeft + 1);
}
-/* -----------------27.04.98 16:54-------------------
- *
- * --------------------------------------------------*/
+
sal_uInt16 SwXCellRange::getRowCount(void)
{
return static_cast< sal_uInt16 >(aRgDesc.nBottom - aRgDesc.nTop + 1);
}
-/* -----------------------------05.06.01 09:19--------------------------------
- ---------------------------------------------------------------------------*/
const SwUnoCrsr* SwXCellRange::GetTblCrsr() const
{
const SwUnoCrsr* pRet = 0;
@@ -4926,9 +4578,6 @@ const SwUnoCrsr* SwXCellRange::GetTblCrsr() const
return pRet;
}
-/*-- 11.12.98 14:27:39---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXCellRange::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew );
@@ -4946,26 +4595,20 @@ void SwXCellRange::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
else
aChartLstnrCntnr.ChartDataChanged();
}
+
/******************************************************************
* SwXTableRows
******************************************************************/
-/* -----------------------------19.04.00 15:22--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXTableRows::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXTableRows");
}
-/* -----------------------------19.04.00 15:22--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXTableRows::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.text.TableRows") == rServiceName;
}
-/* -----------------------------19.04.00 15:22--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXTableRows::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(1);
@@ -4974,24 +4617,19 @@ uno::Sequence< OUString > SwXTableRows::getSupportedServiceNames(void) throw( un
return aRet;
}
TYPEINIT1(SwXTableRows, SwClient);
-/*-- 03.02.99 07:37:41---------------------------------------------------
- -----------------------------------------------------------------------*/
+
SwXTableRows::SwXTableRows(SwFrmFmt& rFrmFmt) :
SwClient(&rFrmFmt)
{
}
-/*-- 03.02.99 07:37:41---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTableRows::~SwXTableRows()
{
}
-/*-- 03.02.99 07:37:41---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXTableRows::getCount(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int32 nRet = 0;
SwFrmFmt* pFrmFmt = GetFrmFmt();
if(!pFrmFmt)
@@ -5003,13 +4641,11 @@ sal_Int32 SwXTableRows::getCount(void) throw( uno::RuntimeException )
}
return nRet;
}
-/*-- 03.02.99 07:37:41---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXTableRows::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
SwFrmFmt* pFrmFmt = GetFrmFmt();
if(!pFrmFmt || nIndex < 0 )
@@ -5042,31 +4678,25 @@ uno::Any SwXTableRows::getByIndex(sal_Int32 nIndex)
}
return aRet;
}
-/*-- 03.02.99 07:37:42---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SAL_CALL SwXTableRows::getElementType(void) throw( uno::RuntimeException )
{
return ::getCppuType((const uno::Reference<beans::XPropertySet>*)0);
}
-/*-- 03.02.99 07:37:42---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTableRows::hasElements(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFrmFmt = GetFrmFmt();
if(!pFrmFmt)
throw uno::RuntimeException();
//es gibt keine Tabelle ohne Zeilen
return sal_True;
}
-/*-- 03.02.99 07:37:42---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTableRows::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (nCount == 0)
return;
SwFrmFmt* pFrmFmt = GetFrmFmt();
@@ -5117,12 +4747,10 @@ void SwXTableRows::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( uno:
}
}
}
-/*-- 03.02.99 07:37:43---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (nCount == 0)
return;
SwFrmFmt* pFrmFmt = GetFrmFmt();
@@ -5179,9 +4807,7 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( uno:
}
}
}
-/*-- 03.02.99 07:37:43---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTableRows::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -5190,23 +4816,16 @@ void SwXTableRows::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
/******************************************************************
* SwXTableColumns
******************************************************************/
-/* -----------------------------19.04.00 15:23--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXTableColumns::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXTableColumns");
}
-/* -----------------------------19.04.00 15:23--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXTableColumns::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.text.TableColumns") == rServiceName;
}
-/* -----------------------------19.04.00 15:23--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXTableColumns::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(1);
@@ -5214,25 +4833,21 @@ uno::Sequence< OUString > SwXTableColumns::getSupportedServiceNames(void) throw(
pArray[0] = C2U("com.sun.star.text.TableColumns");
return aRet;
}
+
TYPEINIT1(SwXTableColumns, SwClient);
-/*-- 03.02.99 07:37:41---------------------------------------------------
- -----------------------------------------------------------------------*/
+
SwXTableColumns::SwXTableColumns(SwFrmFmt& rFrmFmt) :
SwClient(&rFrmFmt)
{
}
-/*-- 03.02.99 07:37:41---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTableColumns::~SwXTableColumns()
{
}
-/*-- 03.02.99 07:37:41---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXTableColumns::getCount(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int32 nRet = 0;
SwFrmFmt* pFrmFmt = GetFrmFmt();
if(!pFrmFmt)
@@ -5249,13 +4864,11 @@ sal_Int32 SwXTableColumns::getCount(void) throw( uno::RuntimeException )
}
return nRet;
}
-/*-- 03.02.99 07:37:41---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXTableColumns::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< uno::XInterface > xRet;
SwFrmFmt* pFrmFmt = GetFrmFmt();
if(!pFrmFmt)
@@ -5276,31 +4889,24 @@ uno::Any SwXTableColumns::getByIndex(sal_Int32 nIndex)
}
return uno::Any(&xRet, ::getCppuType((const uno::Reference<uno::XInterface>*)0));
}
-/*-- 03.02.99 07:37:42---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Type SAL_CALL SwXTableColumns::getElementType(void) throw( uno::RuntimeException )
{
return ::getCppuType((uno::Reference<uno::XInterface>*)0);
}
-/*-- 03.02.99 07:37:42---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTableColumns::hasElements(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFrmFmt = GetFrmFmt();
if(!pFrmFmt)
throw uno::RuntimeException();
return sal_True;
}
-/*-- 03.02.99 07:37:42---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTableColumns::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (nCount == 0)
return;
SwFrmFmt* pFrmFmt = GetFrmFmt();
@@ -5350,12 +4956,10 @@ void SwXTableColumns::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( u
}
}
}
-/*-- 03.02.99 07:37:43---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (nCount == 0)
return;
SwFrmFmt* pFrmFmt = GetFrmFmt();
@@ -5412,16 +5016,12 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( u
}
}
}
-/*-- 03.02.99 07:37:43---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTableColumns::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
}
-/* -----------------------------22.09.00 11:11--------------------------------
- ---------------------------------------------------------------------------*/
void SwChartEventListenerContainer::ChartDataChanged()
{
if(pListenerArr)
@@ -5451,5 +5051,4 @@ void SwChartEventListenerContainer::ChartDataChanged()
}
}
-///////////////////////////////////////////////////////////////////////////
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 875d0e23235d..429d73145b9a 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,7 @@
#include <rtl/uuid.h>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <comphelper/sequence.hxx>
@@ -86,7 +87,6 @@ const sal_Char cInvalidObject[] = "this object is invalid";
/******************************************************************
* SwXText
******************************************************************/
-
class SwXText::Impl
{
@@ -132,24 +132,15 @@ public:
};
-/* -----------------------------15.03.2002 12:39------------------------------
-
- ---------------------------------------------------------------------------*/
SwXText::SwXText(SwDoc *const pDoc, const enum CursorType eType)
: m_pImpl( new SwXText::Impl(*this, pDoc, eType) )
{
}
-/*-- 09.12.98 12:43:55---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXText::~SwXText()
{
}
-/*-- 09.12.98 12:44:07---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-
const SwDoc * SwXText::GetDoc() const
{
return m_pImpl->m_pDoc;
@@ -185,7 +176,7 @@ SwXText::PrepareForAttach(uno::Reference< text::XTextRange > &, const SwPaM &)
bool SwXText::CheckForOwnMemberMeta(const SwPaM &, const bool)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- ASSERT(CURSOR_META != m_pImpl->m_eType, "should not be called!");
+ OSL_ENSURE(CURSOR_META != m_pImpl->m_eType, "should not be called!");
return false;
}
@@ -209,9 +200,6 @@ SwXText::CreateCursor() throw (uno::RuntimeException)
return xRet;
}
-/*-- 09.12.98 12:43:02---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXText::queryInterface(const uno::Type& rType) throw (uno::RuntimeException)
{
@@ -282,9 +270,7 @@ SwXText::queryInterface(const uno::Type& rType) throw (uno::RuntimeException)
}
return aRet;
}
-/* -----------------------------15.03.00 17:42--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Type > SAL_CALL
SwXText::getTypes() throw (uno::RuntimeException)
{
@@ -312,7 +298,7 @@ SwXText::insertString(const uno::Reference< text::XTextRange >& xTextRange,
const OUString& rString, sal_Bool bAbsorb)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!xTextRange.is())
{
@@ -411,16 +397,13 @@ throw (uno::RuntimeException)
}
}
-/*-- 09.12.98 12:43:16---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXText::insertControlCharacter(
const uno::Reference< text::XTextRange > & xTextRange,
sal_Int16 nControlCharacter, sal_Bool bAbsorb)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!xTextRange.is())
{
@@ -527,9 +510,6 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
}
-/*-- 09.12.98 12:43:17---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXText::insertTextContent(
const uno::Reference< text::XTextRange > & xRange,
@@ -537,7 +517,7 @@ SwXText::insertTextContent(
sal_Bool bAbsorb)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!xRange.is())
{
@@ -644,16 +624,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
xContent->attach(xTempRange);
}
-/* -----------------------------10.07.00 15:40--------------------------------
-
- ---------------------------------------------------------------------------*/
void SAL_CALL
SwXText::insertTextContentBefore(
const uno::Reference< text::XTextContent>& xNewContent,
const uno::Reference< text::XTextContent>& xSuccessor)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!GetDoc())
{
@@ -708,16 +685,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
pPara->attachToText(*this, *pTxtNode);
}
-/* -----------------------------10.07.00 15:40--------------------------------
-
- ---------------------------------------------------------------------------*/
void SAL_CALL
SwXText::insertTextContentAfter(
const uno::Reference< text::XTextContent>& xNewContent,
const uno::Reference< text::XTextContent>& xPredecessor)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!GetDoc())
{
@@ -769,15 +743,12 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
pPara->attachToText(*this, *pTxtNode);
}
-/* -----------------------------10.07.00 15:40--------------------------------
-
- ---------------------------------------------------------------------------*/
void SAL_CALL
SwXText::removeTextContentBefore(
const uno::Reference< text::XTextContent>& xSuccessor)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!GetDoc())
{
@@ -825,15 +796,12 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
}
-/* -----------------------------10.07.00 15:40--------------------------------
-
- ---------------------------------------------------------------------------*/
void SAL_CALL
SwXText::removeTextContentAfter(
const uno::Reference< text::XTextContent>& xPredecessor)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!GetDoc())
{
@@ -882,9 +850,6 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
}
-/*-- 09.12.98 12:43:19---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXText::removeTextContent(
const uno::Reference< text::XTextContent > & xContent)
@@ -900,25 +865,19 @@ throw (container::NoSuchElementException, uno::RuntimeException)
xContent->dispose();
}
-/*-- 09.12.98 12:43:22---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XText > SAL_CALL
SwXText::getText() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const uno::Reference< text::XText > xRet(this);
return xRet;
}
-/*-- 09.12.98 12:43:24---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SAL_CALL
SwXText::getStart() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const uno::Reference< text::XTextCursor > xRef = CreateCursor();
if(!xRef.is())
@@ -931,13 +890,11 @@ SwXText::getStart() throw (uno::RuntimeException)
const uno::Reference< text::XTextRange > xRet(xRef, uno::UNO_QUERY);
return xRet;
}
-/*-- 09.12.98 12:43:27---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SAL_CALL
SwXText::getEnd() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const uno::Reference< text::XTextCursor > xRef = CreateCursor();
if(!xRef.is())
@@ -951,12 +908,9 @@ SwXText::getEnd() throw (uno::RuntimeException)
return xRet;
}
-/*-- 09.12.98 12:43:29---------------------------------------------------
-
- -----------------------------------------------------------------------*/
OUString SAL_CALL SwXText::getString() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const uno::Reference< text::XTextCursor > xRet = CreateCursor();
if(!xRet.is())
@@ -968,13 +922,11 @@ OUString SAL_CALL SwXText::getString() throw (uno::RuntimeException)
xRet->gotoEnd(sal_True);
return xRet->getString();
}
-/*-- 09.12.98 12:43:30---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXText::setString(const OUString& rString) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!GetDoc())
{
@@ -1126,16 +1078,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
return nCompare;
}
-/*-- 28.03.00 10:37:22---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Int16 SAL_CALL
SwXText::compareRegionStarts(
const uno::Reference<text::XTextRange>& xRange1,
const uno::Reference<text::XTextRange>& xRange2)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!xRange1.is() || !xRange2.is())
{
@@ -1146,16 +1095,14 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
return m_pImpl->ComparePositions(xStart1, xStart2);
}
-/*-- 28.03.00 10:37:25---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int16 SAL_CALL
SwXText::compareRegionEnds(
const uno::Reference<text::XTextRange>& xRange1,
const uno::Reference<text::XTextRange>& xRange2)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!xRange1.is() || !xRange2.is())
{
@@ -1167,22 +1114,16 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
return m_pImpl->ComparePositions(xEnd1, xEnd2);
}
-/*-- 15.03.2002 12:30:40---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SAL_CALL
SwXText::getPropertySetInfo() throw(uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
static uno::Reference< beans::XPropertySetInfo > xInfo =
m_pImpl->m_rPropSet.getPropertySetInfo();
return xInfo;
}
-/*-- 15.03.2002 12:30:42---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXText::setPropertyValue(const ::rtl::OUString& /*aPropertyName*/,
const uno::Any& /*aValue*/)
@@ -1192,16 +1133,14 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
{
throw lang::IllegalArgumentException();
}
-/*-- 15.03.2002 12:30:42---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXText::getPropertyValue(
const ::rtl::OUString& rPropertyName)
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
{
@@ -1251,9 +1190,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
return aRet;
}
-/*-- 15.03.2002 12:30:42---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXText::addPropertyChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -1264,9 +1200,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
OSL_ENSURE(false,
"SwXText::addPropertyChangeListener(): not implemented");
}
-/*-- 15.03.2002 12:30:43---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXText::removePropertyChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -1277,9 +1211,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
OSL_ENSURE(false,
"SwXText::removePropertyChangeListener(): not implemented");
}
-/*-- 15.03.2002 12:30:43---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXText::addVetoableChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -1290,9 +1222,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
OSL_ENSURE(false,
"SwXText::addVetoableChangeListener(): not implemented");
}
-/*-- 15.03.2002 12:30:43---------------------------------------------------
- -----------------------------------------------------------------------*/
void SAL_CALL
SwXText::removeVetoableChangeListener(
const ::rtl::OUString& /*rPropertyName*/,
@@ -1304,17 +1234,12 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
"SwXText::removeVetoableChangeListener(): not implemented");
}
-/* -----------------------------08.01.01 09:07--------------------------------
-
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXText::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------08.01.01 09:07--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL
SwXText::getSomething(const uno::Sequence< sal_Int8 >& rId)
throw (uno::RuntimeException)
@@ -1322,34 +1247,26 @@ throw (uno::RuntimeException)
return ::sw::UnoTunnelImpl<SwXText>(rId, this);
}
-/*-- 23.06.2006 08:56:30---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SAL_CALL
SwXText::appendParagraph(
const uno::Sequence< beans::PropertyValue > & rProperties)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->finishOrAppendParagraph(false, rProperties);
}
-/*-- 23.06.2006 08:56:22---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SAL_CALL
SwXText::finishParagraph(
const uno::Sequence< beans::PropertyValue > & rProperties)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
return m_pImpl->finishOrAppendParagraph(true, rProperties);
}
-/*-- 08.05.2006 13:26:26---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange >
SwXText::Impl::finishOrAppendParagraph(
const bool bFinish,
@@ -1462,7 +1379,7 @@ SwXText::appendTextPortion(
rCharacterAndParagraphProperties)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
{
@@ -1567,7 +1484,7 @@ SwXText::appendTextContent(
rCharacterAndParagraphProperties)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!IsValid())
{
@@ -1628,7 +1545,7 @@ SwXText::convertToTextFrame(
const uno::Sequence< beans::PropertyValue >& rFrameProperties)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
{
@@ -1733,11 +1650,20 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
SfxItemSet aFrameItemSet(m_pImpl->m_pDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
0 );
-
+ // If there is no content in the frame the shape is in
+ // it gets deleted in the DelFullPara call below,
+ // In this case insert a tmp text node ( we delete it later )
+ if ( aStartPam.Start()->nNode == pEndPam->Start()->nNode
+ && aStartPam.End()->nNode == pEndPam->End()->nNode )
+ {
+ SwPosition aEnd(*aStartPam.End());
+ bParaAfterInserted = GetDoc()->AppendTxtNode( aEnd );
+ pEndPam->DeleteMark();
+ *pEndPam->GetPoint() = aEnd;
+ }
aStartPam.SetMark();
*aStartPam.End() = *pEndPam->End();
pEndPam.reset(0);
-
SwXTextFrame *const pNewFrame = new SwXTextFrame(m_pImpl->m_pDoc);
const uno::Reference< text::XTextFrame > xNewFrame = pNewFrame;
pNewFrame->SetSelection( aStartPam );
@@ -1835,7 +1761,6 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
/*-- 11.05.2006 15:46:26---------------------------------------------------
Move previously imported paragraphs into a new text table.
-
-----------------------------------------------------------------------*/
struct VerticallyMergedCell
{
@@ -1851,7 +1776,9 @@ struct VerticallyMergedCell
aCells.push_back( rxCell );
}
};
+
#define COL_POS_FUZZY 2
+
static bool lcl_SimilarPosition( const sal_Int32 nPos1, const sal_Int32 nPos2 )
{
return abs( nPos1 - nPos2 ) < COL_POS_FUZZY;
@@ -1861,10 +1788,7 @@ void SwXText::copyText(
const uno::Reference< text::XTextCopy >& xSource )
throw ( uno::RuntimeException )
{
- uno::Reference< lang::XUnoTunnel > xTTunnel( xSource, uno::UNO_QUERY_THROW );
- SwXText* pText = 0;
- pText = reinterpret_cast< SwXText* >(
- sal::static_int_cast< sal_IntPtr >( xTTunnel->getSomething( SwXText::getUnoTunnelId()) ));
+ SolarMutexGuard aGuard;
uno::Reference< text::XText > xText( xSource, uno::UNO_QUERY_THROW );
uno::Reference< text::XTextCursor > xCursor = xText->createTextCursor( );
@@ -2110,7 +2034,6 @@ lcl_DebugCellProperties(
//--<
#endif
-
static void
lcl_ApplyCellProperties(
const sal_Int32 nCell,
@@ -2125,7 +2048,7 @@ lcl_ApplyCellProperties(
{
const OUString & rName = rCellProperties[nProperty].Name;
const uno::Any & rValue = rCellProperties[nProperty].Value;
- if (rName.equalsAscii("VerticalMerge"))
+ if (rName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("VerticalMerge")))
{
// determine left border position
// add the cell to a queue of merged cells
@@ -2238,7 +2161,7 @@ lcl_MergeCells(::std::vector<VerticallyMergedCell> & rMergedCells)
while (aCellIter != aMergedIter->aCells.end())
{
(*aCellIter)->setPropertyValue(
- C2U(SW_PROP_NAME_STR(UNO_NAME_ROW_SPAN)),
+ rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ROW_SPAN)),
uno::makeAny(nCellCount));
if (bFirstCell)
{
@@ -2264,7 +2187,7 @@ SwXText::convertToTable(
const uno::Sequence< beans::PropertyValue >& rTableProperties)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
{
@@ -2395,30 +2318,23 @@ SwXBodyText::SwXBodyText(SwDoc *const pDoc)
{
}
-/*-- 10.12.98 11:17:27---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXBodyText::~SwXBodyText()
{
-
}
-/* -----------------------------06.04.00 16:33--------------------------------
- ---------------------------------------------------------------------------*/
OUString SAL_CALL
SwXBodyText::getImplementationName() throw (uno::RuntimeException)
{
return C2U("SwXBodyText");
}
-/* -----------------------------06.04.00 16:33--------------------------------
- ---------------------------------------------------------------------------*/
static char const*const g_ServicesBodyText[] =
{
"com.sun.star.text.Text",
};
+
static const size_t g_nServicesBodyText(
- sizeof(g_ServicesBodyText)/sizeof(g_ServicesBodyText[0]));
+ SAL_N_ELEMENTS(g_ServicesBodyText));
sal_Bool SAL_CALL SwXBodyText::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
@@ -2434,9 +2350,6 @@ SwXBodyText::getSupportedServiceNames() throw (uno::RuntimeException)
g_nServicesBodyText, g_ServicesBodyText);
}
-/*-- 10.12.98 11:17:27---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXBodyText::queryAggregation(const uno::Type& rType)
throw (uno::RuntimeException)
@@ -2465,9 +2378,6 @@ throw (uno::RuntimeException)
return aRet;
}
-/*-- 10.12.98 11:17:28---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Sequence< uno::Type > SAL_CALL
SwXBodyText::getTypes() throw (uno::RuntimeException)
{
@@ -2475,13 +2385,11 @@ SwXBodyText::getTypes() throw (uno::RuntimeException)
const uno::Sequence< uno::Type > aTextTypes = SwXText::getTypes();
return ::comphelper::concatSequences(aTypes, aTextTypes);
}
-/* -----------------------------21.03.00 15:39--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< sal_Int8 > SAL_CALL
SwXBodyText::getImplementationId() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -2491,9 +2399,7 @@ SwXBodyText::getImplementationId() throw (uno::RuntimeException)
}
return aId;
}
-/*-- 10.12.98 11:17:28---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXBodyText::queryInterface(const uno::Type& rType)
throw (uno::RuntimeException)
@@ -2503,9 +2409,7 @@ throw (uno::RuntimeException)
? SwXBodyText_Base::queryInterface(rType)
: ret;
}
-/* -----------------------------05.01.00 11:07--------------------------------
- ---------------------------------------------------------------------------*/
SwXTextCursor * SwXBodyText::CreateTextCursor(const bool bIgnoreTables)
{
if(!IsValid())
@@ -2534,13 +2438,10 @@ SwXTextCursor * SwXBodyText::CreateTextCursor(const bool bIgnoreTables)
return new SwXTextCursor(*GetDoc(), this, CURSOR_BODY, *aPam.GetPoint());
}
-/*-- 10.12.98 11:17:29---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextCursor > SAL_CALL
SwXBodyText::createTextCursor() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const uno::Reference< text::XTextCursor > xRef(
static_cast<text::XWordCursor*>(CreateTextCursor(false)) );
@@ -2552,15 +2453,13 @@ SwXBodyText::createTextCursor() throw (uno::RuntimeException)
}
return xRef;
}
-/*-- 10.12.98 11:17:29---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextCursor > SAL_CALL
SwXBodyText::createTextCursorByRange(
const uno::Reference< text::XTextRange > & xTextPosition)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
{
@@ -2597,14 +2496,11 @@ throw (uno::RuntimeException)
return aRef;
}
-/*-- 10.12.98 11:17:30---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< container::XEnumeration > SAL_CALL
SwXBodyText::createEnumeration()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!IsValid())
{
@@ -2623,21 +2519,16 @@ throw (uno::RuntimeException)
return xRet;
}
-/* -----------------18.12.98 13:36-------------------
- *
- * --------------------------------------------------*/
uno::Type SAL_CALL
SwXBodyText::getElementType() throw (uno::RuntimeException)
{
return text::XTextRange::static_type();
}
-/* -----------------18.12.98 13:36-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SAL_CALL
SwXBodyText::hasElements() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (!IsValid())
{
@@ -2652,7 +2543,6 @@ SwXBodyText::hasElements() throw (uno::RuntimeException)
/******************************************************************
* SwXHeadFootText
******************************************************************/
-
class SwXHeadFootText::Impl
: public SwClient
{
@@ -2687,9 +2577,6 @@ public:
};
-/*-- 11.12.98 10:14:51---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXHeadFootText::Impl::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
@@ -2718,9 +2605,6 @@ SwXHeadFootText::CreateXHeadFootText(
return xText;
}
-/*-- 11.12.98 10:14:48---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXHeadFootText::SwXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader)
: SwXText(rHeadFootFmt.GetDoc(),
(bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER)
@@ -2728,31 +2612,22 @@ SwXHeadFootText::SwXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader)
{
}
-/*-- 11.12.98 10:14:48---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXHeadFootText::~SwXHeadFootText()
{
}
-/* -----------------------------06.04.00 16:40--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SAL_CALL
SwXHeadFootText::getImplementationName() throw (uno::RuntimeException)
{
return C2U("SwXHeadFootText");
}
-/* -----------------------------06.04.00 16:40--------------------------------
-
- ---------------------------------------------------------------------------*/
static char const*const g_ServicesHeadFootText[] =
{
"com.sun.star.text.Text",
};
-static const size_t g_nServicesHeadFootText(
- sizeof(g_ServicesHeadFootText)/sizeof(g_ServicesHeadFootText[0]));
+
+static const size_t g_nServicesHeadFootText(SAL_N_ELEMENTS(g_ServicesHeadFootText));
sal_Bool SAL_CALL SwXHeadFootText::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
@@ -2768,9 +2643,6 @@ SwXHeadFootText::getSupportedServiceNames() throw (uno::RuntimeException)
g_nServicesHeadFootText, g_ServicesHeadFootText);
}
-/*-- 11.12.98 10:14:49---------------------------------------------------
-
- -----------------------------------------------------------------------*/
const SwStartNode *SwXHeadFootText::GetStartNode() const
{
const SwStartNode *pSttNd = 0;
@@ -2791,9 +2663,7 @@ SwXHeadFootText::CreateCursor() throw (uno::RuntimeException)
{
return createTextCursor();
}
-/* -----------------------------21.03.00 15:39--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Type > SAL_CALL
SwXHeadFootText::getTypes() throw (uno::RuntimeException)
{
@@ -2802,13 +2672,10 @@ SwXHeadFootText::getTypes() throw (uno::RuntimeException)
return ::comphelper::concatSequences(aTypes, aTextTypes);
}
-/* -----------------------------21.03.00 15:39--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Sequence< sal_Int8 > SAL_CALL
SwXHeadFootText::getImplementationId() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -2818,9 +2685,7 @@ SwXHeadFootText::getImplementationId() throw (uno::RuntimeException)
}
return aId;
}
-/* -----------------------------21.03.00 15:46--------------------------------
- ---------------------------------------------------------------------------*/
uno::Any SAL_CALL
SwXHeadFootText::queryInterface(const uno::Type& rType)
throw (uno::RuntimeException)
@@ -2831,13 +2696,10 @@ throw (uno::RuntimeException)
: ret;
}
-/*-- 11.12.98 10:14:50---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextCursor > SAL_CALL
SwXHeadFootText::createTextCursor() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt & rHeadFootFmt( m_pImpl->GetHeadFootFmtOrThrow() );
@@ -2880,15 +2742,12 @@ SwXHeadFootText::createTextCursor() throw (uno::RuntimeException)
return xRet;
}
-/*-- 11.12.98 10:14:50---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextCursor > SAL_CALL
SwXHeadFootText::createTextCursorByRange(
const uno::Reference< text::XTextRange > & xTextPosition)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt & rHeadFootFmt( m_pImpl->GetHeadFootFmtOrThrow() );
@@ -2919,14 +2778,11 @@ throw (uno::RuntimeException)
return xRet;
}
-/* -----------------19.03.99 15:44-------------------
- *
- * --------------------------------------------------*/
uno::Reference< container::XEnumeration > SAL_CALL
SwXHeadFootText::createEnumeration()
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt & rHeadFootFmt( m_pImpl->GetHeadFootFmtOrThrow() );
@@ -2943,19 +2799,15 @@ throw (uno::RuntimeException)
return aRef;
}
-/* -----------------19.03.99 15:50-------------------
- *
- * --------------------------------------------------*/
uno::Type SAL_CALL
SwXHeadFootText::getElementType() throw (uno::RuntimeException)
{
return text::XTextRange::static_type();
}
-/* -----------------19.03.99 15:50-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SAL_CALL SwXHeadFootText::hasElements() throw (uno::RuntimeException)
{
return sal_True;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unotextmarkup.cxx b/sw/source/core/unocore/unotextmarkup.cxx
index 3181d7aadb66..c41db578dd15 100644
--- a/sw/source/core/unocore/unotextmarkup.cxx
+++ b/sw/source/core/unocore/unotextmarkup.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include "precompiled_sw.hxx"
#include <unotextmarkup.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <SwSmartTagMgr.hxx>
#include <com/sun/star/text/TextMarkupType.hpp>
@@ -58,7 +59,7 @@ SwXTextMarkup::~SwXTextMarkup()
uno::Reference< container::XStringKeyMap > SAL_CALL SwXTextMarkup::getMarkupInfoContainer() throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< container::XStringKeyMap > xProp = new SwXStringKeyMap;
return xProp;
@@ -72,7 +73,7 @@ void SAL_CALL SwXTextMarkup::commitTextMarkup(
const uno::Reference< container::XStringKeyMap > & xMarkupInfoContainer)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// paragraph already dead or modified?
if ( !mpTxtNode || nLength <= 0 )
@@ -100,7 +101,7 @@ void SAL_CALL SwXTextMarkup::commitTextMarkup(
if( pGrammarContact )
{
pWList = pGrammarContact->getGrammarCheck( *mpTxtNode, true );
- ASSERT( pWList, "GrammarContact _has_ to deliver a wrong list" )
+ OSL_ENSURE( pWList, "GrammarContact _has_ to deliver a wrong list" );
}
else
{
@@ -126,7 +127,7 @@ void SAL_CALL SwXTextMarkup::commitTextMarkup(
}
else
{
- ASSERT( false, "Unknown mark-up type" )
+ OSL_ENSURE( false, "Unknown mark-up type" );
return;
}
@@ -240,7 +241,7 @@ void lcl_commitGrammarMarkUp(
::sal_Int32 nLength,
const uno::Reference< container::XStringKeyMap > & xMarkupInfoContainer)
{
- ASSERT( nType == text::TextMarkupType::PROOFREADING || nType == text::TextMarkupType::SENTENCE, "Wrong mark-up type" )
+ OSL_ENSURE( nType == text::TextMarkupType::PROOFREADING || nType == text::TextMarkupType::SENTENCE, "Wrong mark-up type" );
const ModelToViewHelper::ModelPosition aStartPos =
ModelToViewHelper::ConvertToModelPosition( pConversionMap, nStart );
const ModelToViewHelper::ModelPosition aEndPos =
@@ -331,7 +332,7 @@ void SAL_CALL SwXTextMarkup::commitMultiTextMarkup(
const uno::Sequence< text::TextMarkupDescriptor > &rMarkups )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// paragraph already dead or modified?
if ( !mpTxtNode )
@@ -372,7 +373,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
if( pGrammarContact )
{
pWList = pGrammarContact->getGrammarCheck( *mpTxtNode, true );
- ASSERT( pWList, "GrammarContact _has_ to deliver a wrong list" )
+ OSL_ENSURE( pWList, "GrammarContact _has_ to deliver a wrong list" );
}
else
{
@@ -429,7 +430,7 @@ void SwXTextMarkup::Modify( SfxPoolItem* /*pOld*/, SfxPoolItem* /*pNew*/ )
pRegisteredIn->Remove( this );
// <--
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
mpTxtNode = 0;
}
@@ -484,3 +485,4 @@ uno::Any SAL_CALL SwXStringKeyMap::getValueByIndex(::sal_Int32 nIndex) throw (un
return uno::Any();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index cd652d0e3428..d5c8b49ff77a 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
#include <pagepreviewlayout.hxx>
-#ifndef _PREVWPAGE_HXX
#include <prevwpage.hxx>
-#endif
#include <algorithm>
#include <vcl/window.hxx>
@@ -40,18 +39,14 @@
#include <viewimp.hxx>
#include <viewopt.hxx>
#include <swregion.hxx>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
-// OD 19.02.2003 #107369# - method <SwAlignRect(..)>
#include <frmtool.hxx>
-// OD 24.09.2003 #i19975#
#include <svx/zoomitem.hxx>
#include <printdata.hxx>
#include <IDocumentDeviceAccess.hxx>
-// OD 20.02.2003 #107369# - method to update statics for paint
+// method to update statics for paint
// Note: method defined in '/sw/source/core/layout/paintfrm.cxx'
extern void SwCalcPixStatics( OutputDevice *pOut );
@@ -67,7 +62,6 @@ SwPagePreviewLayout::SwPagePreviewLayout( ViewShell& _rParentViewShell,
{
_Clear();
- // OD 2004-03-05 #i18143#
mbBookPreview = false;
mbBookPreviewModeToggled = false;
@@ -103,7 +97,6 @@ void SwPagePreviewLayout::_Clear()
mnSelectedPageNum = 0;
_ClearPrevwPageData();
- // OD 07.11.2003 #i22014#
mbInPaint = false;
mbNewLayoutDuringPaint = false;
}
@@ -131,12 +124,6 @@ void SwPagePreviewLayout::_ClearPrevwPageData()
maPrevwPages.clear();
}
-/** calculate page preview layout sizes
-
- OD 18.12.2002 #103492#
-
- @author OD
-*/
void SwPagePreviewLayout::_CalcPrevwLayoutSizes()
{
// calculate maximal page size; calculate also number of pages
@@ -175,7 +162,6 @@ void SwPagePreviewLayout::_CalcPrevwLayoutSizes()
// document height
// determine number of rows needed for <nPages> in preview layout
- // OD 19.02.2003 #107369# - use method <GetRowOfPage(..)>.
sal_uInt16 nDocRows = GetRowOfPage( mnPages );
aDocSize.Height() = nDocRows * maMaxPageSize.Height() +
(nDocRows+1) * mnYFree;
@@ -186,14 +172,12 @@ void SwPagePreviewLayout::_CalcPrevwLayoutSizes()
/** init page preview layout
- OD 11.12.2002 #103492#
initialize the page preview settings for a given layout.
side effects:
(1) If parameter <_bCalcScale> is true, mapping mode with calculated
scaling is set at the output device and the zoom at the view options of
the given view shell is set with the calculated scaling.
- @author OD
*/
bool SwPagePreviewLayout::Init( const sal_uInt16 _nCols,
const sal_uInt16 _nRows,
@@ -204,13 +188,13 @@ bool SwPagePreviewLayout::Init( const sal_uInt16 _nCols,
// check environment and parameters
{
bool bColsRowsValid = (_nCols != 0) && (_nRows != 0);
- ASSERT( bColsRowsValid, "preview layout parameters not correct - preview layout can *not* be initialized" );
+ OSL_ENSURE( bColsRowsValid, "preview layout parameters not correct - preview layout can *not* be initialized" );
if ( !bColsRowsValid )
return false;
bool bPxWinSizeValid = (_rPxWinSize.Width() >= 0) &&
(_rPxWinSize.Height() >= 0);
- ASSERT( bPxWinSizeValid, "no window size - preview layout can *not* be initialized" );
+ OSL_ENSURE( bPxWinSizeValid, "no window size - preview layout can *not* be initialized" );
if ( !bPxWinSizeValid )
return false;
}
@@ -252,7 +236,6 @@ bool SwPagePreviewLayout::Init( const sal_uInt16 _nCols,
aMapMode.SetScaleX( aYScale );
// set created mapping mode with calculated scaling at output device.
mrParentViewShell.GetOut()->SetMapMode( aMapMode );
- // OD 20.02.2003 #107369# - update statics for paint.
::SwCalcPixStatics( mrParentViewShell.GetOut() );
}
@@ -264,37 +247,25 @@ bool SwPagePreviewLayout::Init( const sal_uInt16 _nCols,
return true;
}
-/** apply new zoom at given view shell
-
- OD 11.12.2002 #103492# - implementation of <_ApplyNewZoomAtViewShell>
-
- @author OD
-*/
void SwPagePreviewLayout::_ApplyNewZoomAtViewShell( sal_uInt8 _aNewZoom )
{
SwViewOption aNewViewOptions = *(mrParentViewShell.GetViewOptions());
if ( aNewViewOptions.GetZoom() != _aNewZoom )
{
aNewViewOptions.SetZoom( _aNewZoom );
- // OD 24.09.2003 #i19975# - consider zoom type.
+ //#i19975# - consider zoom type.
enum SvxZoomType eZoomType = SVX_ZOOM_PERCENT;
aNewViewOptions.SetZoomType( eZoomType );
mrParentViewShell.ApplyViewOptions( aNewViewOptions );
}
}
-/** method to adjust page preview layout to document changes
-
- OD 18.12.2002 #103492#
-
- @author OD
-*/
bool SwPagePreviewLayout::ReInit()
{
// check environment and parameters
{
bool bLayoutSettingsValid = mbLayoutInfoValid && mbLayoutSizesValid;
- ASSERT( bLayoutSettingsValid,
+ OSL_ENSURE( bLayoutSettingsValid,
"no valid preview layout info/sizes - no re-init of page preview layout");
if ( !bLayoutSettingsValid )
return false;
@@ -309,13 +280,8 @@ bool SwPagePreviewLayout::ReInit()
// =============================================================================
// methods to prepare paint of page preview
// =============================================================================
-/** prepare paint of page preview
-
- OD 12.12.2002 #103492#
- OD 21.03.2003 #108282# - delete parameter _onStartPageVirtNum
- @author OD, _nProposedStartPageNum, _onStartPageNum are absolute
-*/
+// _nProposedStartPageNum, _onStartPageNum are absolute
bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
const Point _aProposedStartPos,
const Size& _rPxWinSize,
@@ -328,13 +294,13 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
// check environment and parameters
{
bool bLayoutSettingsValid = mbLayoutInfoValid && mbLayoutSizesValid;
- ASSERT( bLayoutSettingsValid,
+ OSL_ENSURE( bLayoutSettingsValid,
"no valid preview layout info/sizes - no prepare of preview paint");
if ( !bLayoutSettingsValid )
return false;
bool bStartPageRangeValid = nProposedStartPageNum <= mnPages;
- ASSERT( bStartPageRangeValid,
+ OSL_ENSURE( bStartPageRangeValid,
"proposed start page not existing - no prepare of preview paint");
if ( !bStartPageRangeValid )
return false;
@@ -343,13 +309,13 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
_aProposedStartPos.X() >= 0 && _aProposedStartPos.Y() >= 0 &&
_aProposedStartPos.X() <= maPreviewDocRect.Right() &&
_aProposedStartPos.Y() <= maPreviewDocRect.Bottom();
- ASSERT( bStartPosRangeValid,
+ OSL_ENSURE( bStartPosRangeValid,
"proposed start position out of range - no prepare of preview paint");
if ( !bStartPosRangeValid )
return false;
bool bWinSizeValid = _rPxWinSize.Width() != 0 && _rPxWinSize.Height() != 0;
- ASSERT ( bWinSizeValid, "no window size - no prepare of preview paint");
+ OSL_ENSURE( bWinSizeValid, "no window size - no prepare of preview paint");
if ( !bWinSizeValid )
return false;
@@ -373,8 +339,7 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
// determine start page
if ( _bStartWithPageAtFirstCol )
{
- // OD 19.02.2003 #107369# - leaving left-top-corner blank is
- // controlled by <mbBookPreview>.
+ // leaving left-top-corner blank is controlled by <mbBookPreview>.
if ( mbBookPreview &&
( nProposedStartPageNum == 1 || nRowOfProposed == 1 )
)
@@ -413,16 +378,14 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
sal_uInt16 nRowOfProposed =
static_cast<sal_uInt16>(_aProposedStartPos.Y() / mnRowHeight) + 1;
// determine start page == page at proposed start position
- // OD 19.02.2003 #107369# - leaving left-top-corner blank is
- // controlled by <mbBookPreview>.
+ // leaving left-top-corner blank is controlled by <mbBookPreview>.
if ( mbBookPreview &&
( nRowOfProposed == 1 && nColOfProposed == 1 )
)
mnPaintPhyStartPageNum = 1;
else
{
- // OD 19.02.2003 #107369# - leaving left-top-corner blank is
- // controlled by <mbBookPreview>.
+ // leaving left-top-corner blank is controlled by <mbBookPreview>.
mnPaintPhyStartPageNum = (nRowOfProposed-1) * mnCols + nColOfProposed;
if ( mbBookPreview )
--mnPaintPhyStartPageNum;
@@ -453,8 +416,7 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
_CalcDocPrevwPaintRect();
_orDocPreviewPaintRect = maPaintedPrevwDocRect;
- // OD 20.01.2003 #103492# - shift visible preview document area to the left,
- // if on the right is an area left blank.
+ // shift visible preview document area to the left,if on the right is an area left blank.
if ( !mbDoesLayoutColsFitIntoWindow &&
maPaintedPrevwDocRect.GetWidth() < maWinSize.Width() )
{
@@ -464,9 +426,7 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
_rPxWinSize, _onStartPageNum,
_orDocPreviewPaintRect, _bStartWithPageAtFirstCol );
}
-
- // OD 20.01.2003 #103492# - shift visible preview document area to the top,
- // if on the botton is an area left blank.
+ // shift visible preview document area to the left,if on the right is an area left blank.
if ( mbBookPreviewModeToggled &&
maPaintedPrevwDocRect.Bottom() == maPreviewDocRect.Bottom() &&
maPaintedPrevwDocRect.GetHeight() < maWinSize.Height() )
@@ -496,7 +456,7 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
// accessible pages with needed data.
_CalcPreviewPages();
- // OD 07.11.2003 #i22014# - indicate new layout, if print preview is in paint
+ // indicate new layout, if print preview is in paint
if ( mbInPaint )
{
mbNewLayoutDuringPaint = true;
@@ -511,12 +471,6 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
return true;
}
-/** calculate additional paint offset
-
- OD 12.12.2002 #103492#
-
- @author OD
-*/
void SwPagePreviewLayout::_CalcAdditionalPaintOffset()
{
if ( mnPrevwLayoutWidth <= maWinSize.Width() &&
@@ -544,12 +498,6 @@ void SwPagePreviewLayout::_CalcAdditionalPaintOffset()
}
}
-/** calculate painted preview document rectangle
-
- OD 12.12.2002 #103492#
-
- @author OD
-*/
void SwPagePreviewLayout::_CalcDocPrevwPaintRect()
{
Point aTopLeftPos = maPaintPreviewDocOffset;
@@ -557,14 +505,12 @@ void SwPagePreviewLayout::_CalcDocPrevwPaintRect()
Size aSize;
if ( mbDoesLayoutColsFitIntoWindow )
- //aSize.Width() = mnPrevwLayoutWidth;
aSize.Width() = Min( mnPrevwLayoutWidth,
maPreviewDocRect.GetWidth() - aTopLeftPos.X() );
else
aSize.Width() = Min( maPreviewDocRect.GetWidth() - aTopLeftPos.X(),
maWinSize.Width() - maAdditionalPaintOffset.X() );
if ( mbDoesLayoutRowsFitIntoWindow )
- //aSize.Height() = mnPrevwLayoutHeight;
aSize.Height() = Min( mnPrevwLayoutHeight,
maPreviewDocRect.GetHeight() - aTopLeftPos.Y() );
else
@@ -573,12 +519,6 @@ void SwPagePreviewLayout::_CalcDocPrevwPaintRect()
maPaintedPrevwDocRect.SetSize( aSize );
}
-/** calculate preview pages
-
- OD 12.12.2002 #103492#
-
- @author OD
-*/
void SwPagePreviewLayout::_CalcPreviewPages()
{
_ClearPrevwPageData();
@@ -633,8 +573,7 @@ void SwPagePreviewLayout::_CalcPreviewPages()
}
if ( aCurrPaintOffset.X() < maWinSize.Width() )
{
- // OD 19.02.2003 #107369# - leaving left-top-corner blank is
- // controlled by <mbBookPreview>.
+ // leaving left-top-corner blank is controlled by <mbBookPreview>.
if ( mbBookPreview && pPage->GetPhyPageNum() == 1 && mnCols != 1 && nCurrCol == 1
)
{
@@ -675,12 +614,6 @@ void SwPagePreviewLayout::_CalcPreviewPages()
}
}
-/** determines preview data for a given page and a given preview offset
-
- OD 13.12.2002 #103492#
-
- @author OD
-*/
bool SwPagePreviewLayout::_CalcPreviewDataForPage( const SwPageFrm& _rPage,
const Point& _rPrevwOffset,
PrevwPage* _opPrevwPage )
@@ -719,12 +652,6 @@ bool SwPagePreviewLayout::_CalcPreviewDataForPage( const SwPageFrm& _rPage,
return true;
}
-/** enable/disable book preview
-
- OD 2004-03-04 #i18143#
-
- @author OD
-*/
bool SwPagePreviewLayout::SetBookPreviewMode( const bool _bEnableBookPreview,
sal_uInt16& _onStartPageNum,
Rectangle& _orDocPreviewPaintRect )
@@ -762,12 +689,7 @@ bool SwPagePreviewLayout::SetBookPreviewMode( const bool _bEnableBookPreview,
// methods to determine new data for changing the current shown part of the
// document preview.
// =============================================================================
-/** calculate start position for new scale
-
- OD 12.12.2002 #103492#
- @author OD
-*/
Point SwPagePreviewLayout::GetPreviewStartPosForNewScale(
const Fraction& _aNewScale,
const Fraction& _aOldScale,
@@ -827,8 +749,6 @@ Point SwPagePreviewLayout::GetPreviewStartPosForNewScale(
/** determines, if page with given page number is visible in preview
- OD 12.12.2002 #103492#
-
@author OD, _nPageNum is absolut!
*/
bool SwPagePreviewLayout::IsPageVisible( const sal_uInt16 _nPageNum ) const
@@ -839,8 +759,6 @@ bool SwPagePreviewLayout::IsPageVisible( const sal_uInt16 _nPageNum ) const
/** calculate data to bring new selected page into view.
- OD 12.12.2002 #103492#
-
@author OD, IN/OUT parameters are absolute page numbers!!!
*/
bool SwPagePreviewLayout::CalcStartValuesForSelectedPageMove(
@@ -854,7 +772,7 @@ bool SwPagePreviewLayout::CalcStartValuesForSelectedPageMove(
sal_uInt16 nTmpRelSelPageNum = ConvertAbsoluteToRelativePageNum( mnSelectedPageNum );
sal_uInt16 nNewRelSelectedPageNum = nTmpRelSelPageNum;
- // OD 19.02.2003 #107369# - leaving left-top-corner blank is controlled
+ // leaving left-top-corner blank is controlled
// by <mbBookPreview>.
if ( mbBookPreview )
{
@@ -896,7 +814,7 @@ bool SwPagePreviewLayout::CalcStartValuesForSelectedPageMove(
{
if ( _nHoriMove != 0 && _nVertMove != 0 )
{
- ASSERT( false, "missing implementation for moving preview selected page horizontal AND vertical");
+ OSL_ENSURE( false, "missing implementation for moving preview selected page horizontal AND vertical");
return false;
}
@@ -905,13 +823,13 @@ bool SwPagePreviewLayout::CalcStartValuesForSelectedPageMove(
sal_Int16 nTotalRows = GetRowOfPage( mnPages );
if ( (_nHoriMove > 0 || _nVertMove > 0) &&
mbDoesLayoutRowsFitIntoWindow &&
- mbDoesLayoutColsFitIntoWindow && // OD 20.02.2003 #107369# - add condition
+ mbDoesLayoutColsFitIntoWindow &&
nCurrRow > nTotalRows - mnRows )
{
// new proposed start page = left-top-corner of last possible
// preview page.
nNewStartPage = (nTotalRows - mnRows) * mnCols + 1;
- // OD 19.02.2003 #107369# - leaving left-top-corner blank is controlled
+ // leaving left-top-corner blank is controlled
// by <mbBookPreview>.
if ( mbBookPreview )
{
@@ -937,8 +855,6 @@ bool SwPagePreviewLayout::CalcStartValuesForSelectedPageMove(
/** checks, if given position is inside a shown document page
- OD 17.12.2002 #103492#
-
@author OD
*/
struct PrevwPosInsidePagePred
@@ -1001,8 +917,6 @@ bool SwPagePreviewLayout::IsPrevwPosInDocPrevwPage( const Point _aPrevwPos,
/** determine window page scroll amount
- OD 17.12.2002 #103492#
-
@author OD
*/
SwTwips SwPagePreviewLayout::GetWinPagesScrollAmount(
@@ -1016,14 +930,14 @@ SwTwips SwPagePreviewLayout::GetWinPagesScrollAmount(
else
nScrollAmount = _nWinPagesToScroll * maPaintedPrevwDocRect.GetHeight();
- // OD 19.02.2003 #107369# - check, if preview layout size values are valid.
+ // check, if preview layout size values are valid.
// If not, the checks for an adjustment of the scroll amount aren't useful.
if ( mbLayoutSizesValid )
{
if ( (maPaintedPrevwDocRect.Top() + nScrollAmount) <= 0 )
nScrollAmount = -maPaintedPrevwDocRect.Top();
- // OD 14.02.2003 #107369# - correct scroll amount
+ // correct scroll amount
if ( nScrollAmount > 0 &&
maPaintedPrevwDocRect.Bottom() == maPreviewDocRect.Bottom()
)
@@ -1045,12 +959,7 @@ SwTwips SwPagePreviewLayout::GetWinPagesScrollAmount(
// =============================================================================
// methods to paint page preview layout
// =============================================================================
-/** paint prepared preview
-
- OD 12.12.2002 #103492#
- @author OD
-*/
bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
{
// check environment and parameters
@@ -1059,13 +968,13 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
!mrParentViewShell.GetOut()->GetConnectMetaFile() )
return false;
- ASSERT( mbPaintInfoValid,
+ OSL_ENSURE( mbPaintInfoValid,
"invalid preview settings - no paint of preview" );
if ( !mbPaintInfoValid )
return false;
}
- // OD 17.11.2003 #i22014# - no paint, if <superfluous> flag is set at layout
+ // #i22014# no paint if <superfluous> flag is set at layout
if ( mrLayoutRootFrm.IsSuperfluous() )
{
return true;
@@ -1073,7 +982,7 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
// environment and parameter ok
- // OD 07.11.2003 #i22014#
+ // #i22014#
if ( mbInPaint )
{
return false;
@@ -1116,8 +1025,6 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
const Font& rEmptyPgFont = SwPageFrm::GetEmptyPageFont();
- Color aEmptyPgShadowBorderColor = SwViewOption::GetFontColor();
-
for ( std::vector<PrevwPage*>::const_iterator aPageIter = maPrevwPages.begin();
aPageIter != maPrevwPages.end();
++aPageIter )
@@ -1136,8 +1043,8 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
const Color aRetouche( mrParentViewShell.Imp()->GetRetoucheColor() );
if( pOutputDev->GetFillColor() != aRetouche )
pOutputDev->SetFillColor( aRetouche );
- pOutputDev->SetLineColor(); // OD 20.02.2003 #107369# - no line color
- // OD 20.02.2003 #107369# - use aligned page rectangle
+ pOutputDev->SetLineColor(); // no line color
+ // use aligned page rectangle
{
SwRect aTmpPageRect( aPageRect );
::SwAlignRect( aTmpPageRect, &mrParentViewShell);
@@ -1154,9 +1061,8 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
TEXT_DRAW_CLIP );
pOutputDev->SetFont( aOldFont );
// paint shadow and border for empty page
- // OD 19.02.2003 #107369# - use new method to paint page border and
- // shadow
- SwPageFrm::PaintBorderAndShadow( aPageRect, &mrParentViewShell, true, true );
+ // use new method to paint page border and shadow
+ SwPageFrm::PaintBorderAndShadow( aPageRect, &mrParentViewShell, true, false, true );
}
else
{
@@ -1164,20 +1070,17 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
aPxPaintRect.Intersection( aPxOutRect );
Rectangle aPaintRect = pOutputDev->PixelToLogic( aPxPaintRect );
mrParentViewShell.Paint( aPaintRect );
- // --> OD 2007-08-15 #i80691#
- // paint page border and shadow
+ // #i80691# paint page border and shadow
{
SwRect aPageBorderRect;
SwPageFrm::GetBorderAndShadowBoundRect( SwRect( aPageRect ), &mrParentViewShell, aPageBorderRect, true );
const Region aDLRegion(aPageBorderRect.SVRect());
mrParentViewShell.DLPrePaint2(aDLRegion);
- SwPageFrm::PaintBorderAndShadow( aPageRect, &mrParentViewShell, true, true );
+ SwPageFrm::PaintBorderAndShadow( aPageRect, &mrParentViewShell, true, false, true );
mrParentViewShell.DLPostPaint2(true);
}
- // <--
}
- // OD 07.11.2003 #i22014# - stop painting, because new print
- // preview layout is created during paint.
+ // #i22014# stop painting, because new print preview layout is created during paint.
if ( mbNewLayoutDuringPaint )
{
break;
@@ -1191,8 +1094,7 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
}
}
- // OD 17.11.2003 #i22014# - no update of accessible preview, if a new
- // print preview layout is created during paint.
+ // #i22014# no update of accessible preview, if a new print preview layout is created during paint.
if ( !mbNewLayoutDuringPaint )
{
// update at accessiblilty interface
@@ -1206,19 +1108,12 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
pOutputDev->SetMapMode( aSavedMapMode );
mrParentViewShell.aVisArea.Clear();
- // OD 07.11.2003 #i22014#
mbInPaint = false;
mbNewLayoutDuringPaint = false;
return true;
}
-/** repaint pages on page preview
-
- OD 18.12.2002 #103492#
-
- @author OD
-*/
void SwPagePreviewLayout::Repaint( const Rectangle _aInvalidCoreRect ) const
{
// check environment and parameters
@@ -1227,7 +1122,7 @@ void SwPagePreviewLayout::Repaint( const Rectangle _aInvalidCoreRect ) const
!mrParentViewShell.GetOut()->GetConnectMetaFile() )
return;
- ASSERT( mbPaintInfoValid,
+ OSL_ENSURE( mbPaintInfoValid,
"invalid preview settings - no paint of preview" );
if ( !mbPaintInfoValid )
return;
@@ -1264,12 +1159,6 @@ void SwPagePreviewLayout::Repaint( const Rectangle _aInvalidCoreRect ) const
}
}
-/** paint selection mark at page
-
- OD 17.12.2002 #103492#
-
- @author OD
-*/
void SwPagePreviewLayout::_PaintSelectMarkAtPage(
const PrevwPage* _aSelectedPrevwPage ) const
{
@@ -1295,20 +1184,20 @@ void SwPagePreviewLayout::_PaintSelectMarkAtPage(
// calculate page rectangle in pixel coordinates
SwRect aPageRect( _aSelectedPrevwPage->aLogicPos,
_aSelectedPrevwPage->aPageSize );
- // OD 19.02.2003 #107369# - use aligned page rectangle, as it is used for
+ // use aligned page rectangle, as it is used for
// page border and shadow paint - see <SwPageFrm::PaintBorderAndShadow(..)>
::SwAlignRect( aPageRect, &mrParentViewShell);
Rectangle aPxPageRect = pOutputDev->LogicToPixel( aPageRect.SVRect() );
// draw two rectangle
- // OD 19.02.2003 #107369# - adjust position of select mark rectangle
+ // adjust position of select mark rectangle
Rectangle aRect( aPxPageRect.Left(), aPxPageRect.Top(),
aPxPageRect.Right(), aPxPageRect.Bottom() );
aRect = pOutputDev->PixelToLogic( aRect );
- pOutputDev->SetFillColor(); // OD 20.02.2003 #107369# - no fill color
+ pOutputDev->SetFillColor(); // no fill color
pOutputDev->SetLineColor( aSelPgLineColor );
pOutputDev->DrawRect( aRect );
- // OD 19.02.2003 #107369# - adjust position of select mark rectangle
+ // adjust position of select mark rectangle
aRect = Rectangle( aPxPageRect.Left()+1, aPxPageRect.Top()+1,
aPxPageRect.Right()-1, aPxPageRect.Bottom()-1 );
aRect = pOutputDev->PixelToLogic( aRect );
@@ -1322,14 +1211,8 @@ void SwPagePreviewLayout::_PaintSelectMarkAtPage(
pOutputDev->SetMapMode( aSavedMapMode );
}
-/** paint to mark new selected page
-
- OD 17.12.2002 #103492#
- Perform paint for current selected page in order to unmark it.
- Set new selected page and perform paint to mark this page.
-
- @author OD, _nSelectedPage, mnSelectedPage are absolut
-*/
+// Perform paint for current selected page in order to unmark it.
+// Set new selected page and perform paint to mark this page.
void SwPagePreviewLayout::MarkNewSelectedPage( const sal_uInt16 _nSelectedPage )
{
sal_uInt16 nOldSelectedPageNum = mnSelectedPageNum;
@@ -1339,7 +1222,7 @@ void SwPagePreviewLayout::MarkNewSelectedPage( const sal_uInt16 _nSelectedPage )
const PrevwPage* pOldSelectedPrevwPage = _GetPrevwPageByPageNum( nOldSelectedPageNum );
if ( pOldSelectedPrevwPage && pOldSelectedPrevwPage->bVisible )
{
- // OD 20.02.2003 #107369# - invalidate only areas of selection mark.
+ // invalidate only areas of selection mark.
SwRect aPageRect( pOldSelectedPrevwPage->aPrevwWinPos,
pOldSelectedPrevwPage->aPageSize );
::SwAlignRect( aPageRect, &mrParentViewShell);
@@ -1373,12 +1256,7 @@ void SwPagePreviewLayout::MarkNewSelectedPage( const sal_uInt16 _nSelectedPage )
// =============================================================================
// helper methods
// =============================================================================
-/** get preview page by physical page number
- OD 17.12.2002 #103492#
-
- @author OD
-*/
struct EqualsPageNumPred
{
const sal_uInt16 mnPageNum;
@@ -1401,16 +1279,9 @@ const PrevwPage* SwPagePreviewLayout::_GetPrevwPageByPageNum( const sal_uInt16 _
return (*aFoundPrevwPageIter);
}
-/** determine row the page with the given number is in
-
- OD 17.01.2003 #103492#
-
- @author OD, _nPageNum is relative
-*/
sal_uInt16 SwPagePreviewLayout::GetRowOfPage( sal_uInt16 _nPageNum ) const
{
- // OD 19.02.2003 #107369# - leaving left-top-corner blank is controlled
- // by <mbBookPreview>.
+ // leaving left-top-corner blank is controlled by <mbBookPreview>.
if ( mbBookPreview )
{
// Note: increase given physical page number by one, because left-top-corner
@@ -1424,17 +1295,9 @@ sal_uInt16 SwPagePreviewLayout::GetRowOfPage( sal_uInt16 _nPageNum ) const
return nRow;
}
-
-/** determine column the page with the given number is in
-
- OD 17.01.2003 #103492#
-
- @author OD, _nPageNum is relative
-*/
sal_uInt16 SwPagePreviewLayout::GetColOfPage( sal_uInt16 _nPageNum ) const
{
- // OD 19.02.2003 #107369# - leaving left-top-corner blank is controlled
- // by <mbBookPreview>.
+ // leaving left-top-corner blank is controlled by <mbBookPreview>.
if ( mbBookPreview )
{
// Note: increase given physical page number by one, because left-top-corner
@@ -1451,16 +1314,10 @@ sal_uInt16 SwPagePreviewLayout::GetColOfPage( sal_uInt16 _nPageNum ) const
Size SwPagePreviewLayout::GetPrevwDocSize() const
{
- ASSERT( PreviewLayoutValid(), "PagePreviewLayout not valid" );
+ OSL_ENSURE( PreviewLayoutValid(), "PagePreviewLayout not valid" );
return maPreviewDocRect.GetSize();
}
-/** get size of a preview page by its physical page number
-
- OD 15.01.2003 #103492#
-
- @author OD
-*/
Size SwPagePreviewLayout::GetPrevwPageSizeByPageNum( sal_uInt16 _nPageNum ) const
{
const PrevwPage* pPrevwPage = _GetPrevwPageByPageNum( _nPageNum );
@@ -1474,12 +1331,6 @@ Size SwPagePreviewLayout::GetPrevwPageSizeByPageNum( sal_uInt16 _nPageNum ) cons
}
}
-/** get virtual page number by its physical page number
-
- OD 21.03.2003 #108282#
-
- @author OD
-*/
sal_uInt16 SwPagePreviewLayout::GetVirtPageNumByPageNum( sal_uInt16 _nPageNum ) const
{
const PrevwPage* pPrevwPage = _GetPrevwPageByPageNum( _nPageNum );
@@ -1493,10 +1344,6 @@ sal_uInt16 SwPagePreviewLayout::GetVirtPageNumByPageNum( sal_uInt16 _nPageNum )
}
}
-/** Convert absolute to relative page numbers (see PrintEmptyPages)
-
- @author FME
-*/
sal_uInt16 SwPagePreviewLayout::ConvertAbsoluteToRelativePageNum( sal_uInt16 _nAbsPageNum ) const
{
if ( mbBookPreview || mbPrintEmptyPages || !_nAbsPageNum )
@@ -1519,10 +1366,6 @@ sal_uInt16 SwPagePreviewLayout::ConvertAbsoluteToRelativePageNum( sal_uInt16 _nA
return nRet;
}
-/** Convert relative to absolute page numbers (see PrintEmptyPages)
-
- @author FME
-*/
sal_uInt16 SwPagePreviewLayout::ConvertRelativeToAbsolutePageNum( sal_uInt16 _nRelPageNum ) const
{
if ( mbBookPreview || mbPrintEmptyPages || !_nRelPageNum )
@@ -1545,3 +1388,5 @@ sal_uInt16 SwPagePreviewLayout::ConvertRelativeToAbsolutePageNum( sal_uInt16 _nR
return pRet->GetPhyPageNum();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index 4be694cc3baa..19193935cb76 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/**************************************************************************
*
*
@@ -7,9 +8,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: vprint.cxx,v $
- * $Revision: 1.46 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -101,8 +99,8 @@ void SwRenderData::DeletePostItData()
{
if (HasPostItData())
{
- m_pPostItDoc->setPrinter( 0, false, false ); //damit am echten DOC der Drucker bleibt
- delete m_pPostItShell; //Nimmt das PostItDoc mit ins Grab.
+ m_pPostItDoc->setPrinter( 0, false, false ); // So that the printer remains at the real DOC
+ delete m_pPostItShell;
delete m_pPostItFields;
m_pPostItDoc = 0;
m_pPostItShell = 0;
@@ -540,3 +538,4 @@ bool SwPrintUIOptions::processPropertiesAndCheckFormat( const uno::Sequence< bea
//////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index c9581d26251f..d787806203de 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,11 +39,9 @@
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
-/// OD 29.08.2002 #102450#
-/// include <svx/svdoutl.hxx>
#include <svx/svdoutl.hxx>
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
#include <svx/fmglob.hxx>
#endif
@@ -61,123 +60,45 @@
#include <IDocumentDrawModelAccess.hxx>
-/*************************************************************************
-|*
-|* SwSaveHdl
-|*
-|* Ersterstellung MA 14. Feb. 95
-|* Letzte Aenderung MA 02. Jun. 98
-|*
-|*************************************************************************/
-//SwSaveHdl::SwSaveHdl( SwViewImp *pI ) :
-// pImp( pI ),
-// bXorVis( sal_False )
-//{
- //if ( pImp->HasDrawView() )
- //{
- // bXorVis = pImp->GetDrawView()->IsShownXorVisible( pImp->GetShell()->GetOut());
- // if ( bXorVis )
- // pImp->GetDrawView()->HideShownXor( pImp->GetShell()->GetOut() );
- //}
-//}
-
-
-//SwSaveHdl::~SwSaveHdl()
-//{
- //if ( bXorVis )
- // pImp->GetDrawView()->ShowShownXor( pImp->GetShell()->GetOut() );
-//}
-
-
-/*************************************************************************
-|*
-|* SwViewImp::StartAction(), EndAction()
-|*
-|* Ersterstellung MA 14. Feb. 95
-|* Letzte Aenderung MA 14. Sep. 98
-|*
-|*************************************************************************/
-
-
void SwViewImp::StartAction()
{
if ( HasDrawView() )
{
SET_CURR_SHELL( GetShell() );
if ( pSh->ISA(SwFEShell) )
- ((SwFEShell*)pSh)->HideChainMarker(); //Kann sich geaendert haben
- //bResetXorVisibility = GetDrawView()->IsShownXorVisible( GetShell()->GetOut());
- //GetDrawView()->HideShownXor( GetShell()->GetOut() );
+ ((SwFEShell*)pSh)->HideChainMarker();
}
}
-
-
void SwViewImp::EndAction()
{
if ( HasDrawView() )
{
SET_CURR_SHELL( GetShell() );
- //if ( bResetXorVisibility )
- // GetDrawView()->ShowShownXor( GetShell()->GetOut() );
if ( pSh->ISA(SwFEShell) )
- ((SwFEShell*)pSh)->SetChainMarker(); //Kann sich geaendert haben
+ ((SwFEShell*)pSh)->SetChainMarker(); // May have changed
}
}
-/*************************************************************************
-|*
-|* SwViewImp::LockPaint(), UnlockPaint()
-|*
-|* Ersterstellung MA 11. Jun. 96
-|* Letzte Aenderung MA 11. Jun. 96
-|*
-|*************************************************************************/
-
-
void SwViewImp::LockPaint()
{
if ( HasDrawView() )
{
- //HMHbShowHdlPaint = GetDrawView()->IsMarkHdlShown();
- //HMHif ( bShowHdlPaint )
- //HMH GetDrawView()->HideMarkHdl();
bResetHdlHiddenPaint = !GetDrawView()->areMarkHandlesHidden();
GetDrawView()->hideMarkHandles();
}
else
{
- //HMHbShowHdlPaint = sal_False;
bResetHdlHiddenPaint = sal_False;
}
}
-
-
void SwViewImp::UnlockPaint()
{
if ( bResetHdlHiddenPaint )
GetDrawView()->showMarkHandles();
- //HMHif ( bShowHdlPaint )
- //HMH GetDrawView()->ShowMarkHdl();
}
-
-/*************************************************************************
-|*
-|* SwViewImp::PaintLayer(), PaintDispatcher()
-|*
-|* Ersterstellung MA 20. Dec. 94
-|* Letzte Aenderung AMA 04. Jun. 98
-|*
-|*************************************************************************/
-// OD 29.08.2002 #102450#
-// add 3rd paramter <const Color* pPageBackgrdColor> for setting this
-// color as the background color at the outliner of the draw view.
-// OD 09.12.2002 #103045# - add 4th parameter for the horizontal text direction
-// of the page in order to set the default horizontal text direction at the
-// outliner of the draw view for painting layers <hell> and <heaven>.
-// OD 25.06.2003 #108784# - correct type of 1st parameter
void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
SwPrintData const*const pPrintData,
const SwRect& ,
@@ -196,20 +117,17 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
pOutDev->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL |
DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT );
}
-
- // OD 29.08.2002 #102450#
// For correct handling of accessibility, high contrast, the page background
// color is set as the background color at the outliner of the draw view.
// Only necessary for the layers hell and heaven
Color aOldOutlinerBackgrdColor;
- // OD 09.12.2002 #103045# - set default horizontal text direction on
- // painting <hell> or <heaven>.
+ // set default horizontal text direction on painting <hell> or <heaven>.
EEHorizontalTextDirection aOldEEHoriTextDir = EE_HTEXTDIR_L2R;
const IDocumentDrawModelAccess* pIDDMA = GetShell()->getIDocumentDrawModelAccess();
if ( (_nLayerID == pIDDMA->GetHellId()) ||
(_nLayerID == pIDDMA->GetHeavenId()) )
{
- ASSERT( _pPageBackgrdColor,
+ OSL_ENSURE( _pPageBackgrdColor,
"incorrect usage of SwViewImp::PaintLayer: pPageBackgrdColor have to be set for painting layer <hell> or <heaven>");
if ( _pPageBackgrdColor )
{
@@ -235,9 +153,8 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
GetPageView()->DrawLayer(_nLayerID, pOutDev);
pOutDev->Pop();
- // OD 29.08.2002 #102450#
// reset background color of the outliner
- // OD 09.12.2002 #103045# - reset default horizontal text direction
+ // reset default horizontal text direction
if ( (_nLayerID == pIDDMA->GetHellId()) ||
(_nLayerID == pIDDMA->GetHeavenId()) )
{
@@ -249,14 +166,6 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
}
}
-/*************************************************************************
-|*
-|* SwViewImp::IsDragPossible()
-|*
-|* Ersterstellung MA 19. Jan. 93
-|* Letzte Aenderung MA 16. Jan. 95
-|*
-|*************************************************************************/
#define WIEDUWILLST 400
sal_Bool SwViewImp::IsDragPossible( const Point &rPoint )
@@ -288,15 +197,6 @@ sal_Bool SwViewImp::IsDragPossible( const Point &rPoint )
return aRect.IsInside( rPoint );
}
-/*************************************************************************
-|*
-|* SwViewImp::NotifySizeChg()
-|*
-|* Ersterstellung MA 23. Jun. 93
-|* Letzte Aenderung MA 05. Oct. 98
-|*
-|*************************************************************************/
-
void SwViewImp::NotifySizeChg( const Size &rNewSz )
{
if ( !HasDrawView() )
@@ -305,7 +205,6 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
if ( GetPageView() )
GetPageView()->GetPage()->SetSize( rNewSz );
- //Begrenzung des Arbeitsbereiches.
const Rectangle aRect( Point( DOCUMENTBORDER, DOCUMENTBORDER ), rNewSz );
const Rectangle &rOldWork = GetDrawView()->GetWorkArea();
sal_Bool bCheckDrawObjs = sal_False;
@@ -318,7 +217,7 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
if ( !bCheckDrawObjs )
return;
- ASSERT( pSh->getIDocumentDrawModelAccess()->GetDrawModel(), "NotifySizeChg without DrawModel" );
+ OSL_ENSURE( pSh->getIDocumentDrawModelAccess()->GetDrawModel(), "NotifySizeChg without DrawModel" );
SdrPage* pPage = pSh->getIDocumentDrawModelAccess()->GetDrawModel()->GetPage( 0 );
const sal_uLong nObjs = pPage->GetObjCount();
for( sal_uLong nObj = 0; nObj < nObjs; ++nObj )
@@ -326,8 +225,6 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
SdrObject *pObj = pPage->GetObj( nObj );
if( !pObj->ISA(SwVirtFlyDrawObj) )
{
- //Teilfix(26793): Objekte, die in Rahmen verankert sind, brauchen
- //nicht angepasst werden.
const SwContact *pCont = (SwContact*)GetUserCall(pObj);
//JP - 16.3.00 Bug 73920: this function might be called by the
// InsertDocument, when a PageDesc-Attribute is
@@ -344,7 +241,7 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
continue;
}
- // OD 19.06.2003 #108784# - no move for drawing objects in header/footer
+ // no move for drawing objects in header/footer
if ( pAnchor->FindFooterOrHeader() )
{
continue;
@@ -361,7 +258,7 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
if ( aSz.Width() || aSz.Height() )
pObj->Move( aSz );
- //Notanker: Grosse Objekte nicht nach oben verschwinden lassen.
+ //Note anchor: Large objects can not disappear from the top.
aSz.Width() = aSz.Height() = 0;
if ( aBound.Bottom() < aRect.Top() )
aSz.Width() = (aBound.Bottom() - aRect.Top()) - MINFLY;
@@ -376,3 +273,4 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index b384d0763ef4..aa60644f8adb 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,7 +34,6 @@
#include "rootfrm.hxx"
#include "pagefrm.hxx"
#include "viewimp.hxx"
-#include "errhdl.hxx"
#include "viewopt.hxx"
#include "flyfrm.hxx"
#include "frmfmt.hxx"
@@ -46,7 +46,6 @@
#include <svx/svdpage.hxx>
#include <accmap.hxx>
-// OD 12.12.2002 #103492#
#include <pagepreviewlayout.hxx>
#include <comcore.hrc>
@@ -56,19 +55,10 @@
#include <IDocumentDeviceAccess.hxx>
#include <IDocumentSettingAccess.hxx>
-/*************************************************************************
-|*
-|* SwViewImp::Init()
-|*
-|* Ersterstellung MA 25. Jul. 94
-|* Letzte Aenderung MA 03. Nov. 95
-|*
-|*************************************************************************/
-
void SwViewImp::Init( const SwViewOption *pNewOpt )
{
- ASSERT( pDrawView, "SwViewImp::Init without DrawView" );
- //Jetzt die PageView erzeugen wenn sie noch nicht existiert.
+ OSL_ENSURE( pDrawView, "SwViewImp::Init without DrawView" );
+ //Now create the page view if it does not exist.
SwRootFrm *pRoot = pSh->getIDocumentLayoutAccess()->GetRootFrm();
if ( !pSdrPageView )
{
@@ -80,8 +70,7 @@ void SwViewImp::Init( const SwViewOption *pNewOpt )
pRoot->GetDrawPage()->SetSize( pRoot->Frm().SSize() );
pSdrPageView = pDrawView->ShowSdrPage( pRoot->GetDrawPage());
- // OD 26.06.2003 #108784# - notify drawing page view about invisible
- // layers.
+ // notify drawing page view about invisible layers.
pIDDMA->NotifyInvisibleLayers( *pSdrPageView );
}
pDrawView->SetDragStripes( pNewOpt->IsCrossHair() );
@@ -110,15 +99,6 @@ void SwViewImp::Init( const SwViewOption *pNewOpt )
pDrawView->SetMarkHdlSizePixel(pNewOpt->IsBigMarkHdl() ? 9 : 7);
}
-/*************************************************************************
-|*
-|* SwViewImp::SwViewImp() CTor fuer die Core-Internas
-|*
-|* Ersterstellung MA 25. Jul. 94
-|* Letzte Aenderung MA 06. Sep. 96
-|*
-|*************************************************************************/
-
SwViewImp::SwViewImp( ViewShell *pParent ) :
pSh( pParent ),
pDrawView( 0 ),
@@ -130,33 +110,19 @@ SwViewImp::SwViewImp( ViewShell *pParent ) :
pAccMap( 0 ),
pSdrObjCached(NULL),
nRestoreActions( 0 ),
- // OD 12.12.2002 #103492#
mpPgPrevwLayout( 0 )
{
- //bResetXorVisibility =
- //HMHbShowHdlPaint =
bResetHdlHiddenPaint =
bSmoothUpdate = bStopSmooth = bStopPrt = sal_False;
bFirstPageInvalid = sal_True;
}
-/******************************************************************************
-|*
-|* SwViewImp::~SwViewImp()
-|*
-|* Ersterstellung MA 25. Jul. 94
-|* Letzte Aenderung MA 16. Dec. 94
-|*
-******************************************************************************/
-
SwViewImp::~SwViewImp()
{
delete pAccMap;
- // OD 12.12.2002 #103492#
delete mpPgPrevwLayout;
- //JP 29.03.96: nach ShowSdrPage muss auch HideSdrPage gemacht werden!!!
if( pDrawView )
pDrawView->HideSdrPage();
@@ -164,33 +130,15 @@ SwViewImp::~SwViewImp()
DelRegion();
- ASSERT( !pLayAct, "Have action for the rest of your life." );
- ASSERT( !pIdleAct,"Be idle for the rest of your life." );
+ OSL_ENSURE( !pLayAct, "Have action for the rest of your life." );
+ OSL_ENSURE( !pIdleAct,"Be idle for the rest of your life." );
}
-/******************************************************************************
-|*
-|* SwViewImp::DelRegions()
-|*
-|* Ersterstellung MA 14. Apr. 94
-|* Letzte Aenderung MA 14. Apr. 94
-|*
-******************************************************************************/
-
void SwViewImp::DelRegion()
{
DELETEZ(pRegion);
}
-/******************************************************************************
-|*
-|* SwViewImp::AddPaintRect()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 27. Jul. 94
-|*
-******************************************************************************/
-
sal_Bool SwViewImp::AddPaintRect( const SwRect &rRect )
{
if ( rRect.IsOver( pSh->VisArea() ) )
@@ -203,31 +151,12 @@ sal_Bool SwViewImp::AddPaintRect( const SwRect &rRect )
return sal_False;
}
-
-/******************************************************************************
-|*
-|* ViewImp::CheckWaitCrsr()
-|*
-|* Ersterstellung MA 10. Aug. 94
-|* Letzte Aenderung MA 10. Aug. 94
-|*
-******************************************************************************/
-
void SwViewImp::CheckWaitCrsr()
{
if ( pLayAct )
pLayAct->CheckWaitCrsr();
}
-/******************************************************************************
-|*
-|* ViewImp::IsCalcLayoutProgress()
-|*
-|* Ersterstellung MA 12. Aug. 94
-|* Letzte Aenderung MA 12. Aug. 94
-|*
-******************************************************************************/
-
sal_Bool SwViewImp::IsCalcLayoutProgress() const
{
if ( pLayAct )
@@ -235,15 +164,6 @@ sal_Bool SwViewImp::IsCalcLayoutProgress() const
return sal_False;
}
-/******************************************************************************
-|*
-|* ViewImp::IsUpdateExpFlds()
-|*
-|* Ersterstellung MA 28. Mar. 96
-|* Letzte Aenderung MA 28. Mar. 96
-|*
-******************************************************************************/
-
sal_Bool SwViewImp::IsUpdateExpFlds()
{
if ( pLayAct && pLayAct->IsCalcLayout() )
@@ -254,24 +174,12 @@ sal_Bool SwViewImp::IsUpdateExpFlds()
return sal_False;
}
-
-/******************************************************************************
-|*
-|* SwViewImp::SetFirstVisPage(), ImplGetFirstVisPage();
-|*
-|* Ersterstellung MA 21. Sep. 93
-|* Letzte Aenderung MA 08. Mar. 94
-|*
-******************************************************************************/
-
void SwViewImp::SetFirstVisPage()
{
if ( pSh->bDocSizeChgd && pSh->VisArea().Top() > pSh->GetLayout()->Frm().Height() )
{
- //Wir stecken in einer Action und die VisArea sitzt wegen
- //Loeschoperationen hinter der erste sichtbaren Seite.
- //Damit nicht zu heftig Formatiert wird, liefern wir die letzte Seite
- //zurueck.
+ //We are in an "Action", and the VisArea is behind the first visible page due
+ //to delete operations. To prevent expensive formatting, return the last page
pFirstVisPage = (SwPageFrm*)pSh->GetLayout()->Lower();
while ( pFirstVisPage && pFirstVisPage->GetNext() )
pFirstVisPage = (SwPageFrm*)pFirstVisPage->GetNext();
@@ -301,15 +209,6 @@ void SwViewImp::SetFirstVisPage()
bFirstPageInvalid = sal_False;
}
-/******************************************************************************
-|*
-|* SwViewImp::MakeDrawView();
-|*
-|* Ersterstellung AMA 01. Nov. 95
-|* Letzte Aenderung AMA 01. Nov. 95
-|*
-******************************************************************************/
-
void SwViewImp::MakeDrawView()
{
IDocumentDrawModelAccess* pIDDMA = GetShell()->getIDocumentDrawModelAccess();
@@ -334,7 +233,6 @@ void SwViewImp::MakeDrawView()
if(!pOutDevForDrawView)
{
- // pOutDevForDrawView = (OutputDevice*)GetShell()->getIDocumentDeviceAccess()->getPrinter( false );
pOutDevForDrawView = GetShell()->GetOut();
}
@@ -345,22 +243,10 @@ void SwViewImp::MakeDrawView()
const SwViewOption* pSwViewOption = GetShell()->GetViewOptions();
Init(pSwViewOption);
- // #i68597# If document is read-only, we will not profit from overlay,
- // so switch it off.
+ // #i68597# If document is read-only, we will not profit from overlay, so switch it off.
if(pDrawView && pDrawView->IsBufferedOverlayAllowed())
{
- bool bIsReadOnly(pSwViewOption->IsReadonly());
-
-#ifdef DBG_UTIL
- // add test possibilities
- static bool bAlwaysActivateForTest(false);
- if(bAlwaysActivateForTest && bIsReadOnly)
- {
- bIsReadOnly = false;
- }
-#endif
-
- if(bIsReadOnly)
+ if(pSwViewOption->IsReadonly())
{
pDrawView->SetBufferedOverlayAllowed(false);
}
@@ -368,15 +254,6 @@ void SwViewImp::MakeDrawView()
}
}
-/******************************************************************************
-|*
-|* SwViewImp::GetRetoucheColor()
-|*
-|* Ersterstellung MA 24. Jun. 98
-|* Letzte Aenderung MA 24. Jun. 98
-|*
-******************************************************************************/
-
Color SwViewImp::GetRetoucheColor() const
{
Color aRet( COL_TRANSPARENT );
@@ -395,15 +272,9 @@ Color SwViewImp::GetRetoucheColor() const
return aRet;
}
-/** create page preview layout
-
- OD 12.12.2002 #103492#
-
- @author OD
-*/
void SwViewImp::InitPagePreviewLayout()
{
- ASSERT( pSh->GetLayout(), "no layout - page preview layout can not be created.");
+ OSL_ENSURE( pSh->GetLayout(), "no layout - page preview layout can not be created.");
if ( pSh->GetLayout() )
mpPgPrevwLayout = new SwPagePreviewLayout( *pSh, *(pSh->GetLayout()) );
}
@@ -413,8 +284,8 @@ void SwViewImp::UpdateAccessible()
// We require a layout and an XModel to be accessible.
IDocumentLayoutAccess* pIDLA = GetShell()->getIDocumentLayoutAccess();
Window *pWin = GetShell()->GetWin();
- ASSERT( pIDLA->GetRootFrm(), "no layout, no access" );
- ASSERT( pWin, "no window, no access" );
+ OSL_ENSURE( pIDLA->GetRootFrm(), "no layout, no access" );
+ OSL_ENSURE( pWin, "no window, no access" );
if( IsAccessible() && pIDLA->GetRootFrm() && pWin )
GetAccessibleMap().GetDocumentView();
@@ -424,7 +295,7 @@ void SwViewImp::DisposeAccessible( const SwFrm *pFrm,
const SdrObject *pObj,
sal_Bool bRecursive )
{
- ASSERT( !pFrm || pFrm->IsAccessibleFrm(), "frame is not accessible" );
+ OSL_ENSURE( !pFrm || pFrm->IsAccessibleFrm(), "frame is not accessible" );
ViewShell *pVSh = GetShell();
ViewShell *pTmp = pVSh;
do
@@ -438,7 +309,7 @@ void SwViewImp::DisposeAccessible( const SwFrm *pFrm,
void SwViewImp::MoveAccessible( const SwFrm *pFrm, const SdrObject *pObj,
const SwRect& rOldFrm )
{
- ASSERT( !pFrm || pFrm->IsAccessibleFrm(), "frame is not accessible" );
+ OSL_ENSURE( !pFrm || pFrm->IsAccessibleFrm(), "frame is not accessible" );
ViewShell *pVSh = GetShell();
ViewShell *pTmp = pVSh;
do
@@ -452,7 +323,7 @@ void SwViewImp::MoveAccessible( const SwFrm *pFrm, const SdrObject *pObj,
void SwViewImp::InvalidateAccessibleFrmContent( const SwFrm *pFrm )
{
- ASSERT( pFrm->IsAccessibleFrm(), "frame is not accessible" );
+ OSL_ENSURE( pFrm->IsAccessibleFrm(), "frame is not accessible" );
ViewShell *pVSh = GetShell();
ViewShell *pTmp = pVSh;
do
@@ -503,12 +374,7 @@ void SwViewImp::InvalidateAccessibleRelationSet( const SwFlyFrm *pMaster,
} while ( pTmp != pVSh );
}
- /** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
-
- OD 2005-12-01 #i27138#
-
- @author OD
-*/
+// #i27138# invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
void SwViewImp::_InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
const SwTxtFrm* _pToTxtFrm )
{
@@ -539,12 +405,7 @@ void SwViewImp::_InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxt
} while ( pTmp != pVSh );
}
-/** invalidate text selection for paragraphs
-
- OD 2005-12-12 #i27301#
-
- @author OD
-*/
+//#i27301# invalidate text selection for paragraphs
void SwViewImp::_InvalidateAccessibleParaTextSelection()
{
ViewShell* pVSh = GetShell();
@@ -560,12 +421,7 @@ void SwViewImp::_InvalidateAccessibleParaTextSelection()
} while ( pTmp != pVSh );
}
-/** invalidate attributes for paragraphs
-
- OD 2009-01-06 #i88069#
-
- @author OD
-*/
+//#i88069# invalidate attributes for paragraphs
void SwViewImp::_InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
{
ViewShell* pVSh = GetShell();
@@ -581,7 +437,6 @@ void SwViewImp::_InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
} while ( pTmp != pVSh );
}
-// OD 15.01.2003 #103492# - method signature change due to new page preview functionality
void SwViewImp::UpdateAccessiblePreview( const std::vector<PrevwPage*>& _rPrevwPages,
const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm,
@@ -600,7 +455,7 @@ void SwViewImp::InvalidateAccessiblePreViewSelection( sal_uInt16 nSelPage )
SwAccessibleMap *SwViewImp::CreateAccessibleMap()
{
- ASSERT( !pAccMap, "accessible map exists" )
+ OSL_ENSURE( !pAccMap, "accessible map exists" );
pAccMap = new SwAccessibleMap( GetShell() );
return pAccMap;
}
@@ -618,3 +473,4 @@ IMPL_LINK(SwViewImp, SetStopPrt, void *, EMPTYARG)
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index e2a8ec46567f..209528f33436 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,7 +59,6 @@
using namespace ::com::sun::star;
-// OD 12.12.2002 #103492#
SwPagePreviewLayout* ViewShell::PagePreviewLayout()
{
return Imp()->PagePreviewLayout();
@@ -69,15 +69,12 @@ void ViewShell::ShowPreViewSelection( sal_uInt16 nSelPage )
Imp()->InvalidateAccessiblePreViewSelection( nSelPage );
}
-/** adjust view options for page preview
-
- OD 09.01.2003 #i6467#
-*/
+//#i6467# adjust view options for page preview
void ViewShell::AdjustOptionsForPagePreview(SwPrintData const& rPrintOptions)
{
if ( !IsPreView() )
{
- ASSERT( false, "view shell doesn't belongs to a page preview - no adjustment of its view options");
+ OSL_ENSURE( false, "view shell doesn't belongs to a page preview - no adjustment of its view options");
return;
}
@@ -87,9 +84,7 @@ void ViewShell::AdjustOptionsForPagePreview(SwPrintData const& rPrintOptions)
}
-// print brochure
-// OD 05.05.2003 #i14016# - consider empty pages on calculation of the scaling
-// for a page to be printed.
+//#i14016# - consider empty pages on calculation of the scaling for a page to be printed.
void ViewShell::PrintProspect(
OutputDevice *pOutDev,
const SwPrintData &rPrintData,
@@ -110,14 +105,12 @@ void ViewShell::PrintProspect(
std::pair< sal_Int32, sal_Int32 > rPagesToPrint =
rPrintData.GetRenderData().GetPagePairsForProspectPrinting()[ nRenderer ];
-// const sal_uInt16 nPageMax = static_cast< sal_uInt16 >(rPagesToPrint.first > rPagesToPrint.second ?
-// rPagesToPrint.first : rPagesToPrint.second);
#if OSL_DEBUG_LEVEL > 1
DBG_ASSERT( rPagesToPrint.first == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.first ) == 1, "first Page not valid" );
DBG_ASSERT( rPagesToPrint.second == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.second ) == 1, "second Page not valid" );
#endif
- // eine neue Shell fuer den Printer erzeugen
+ // create a new shell for the Printer
ViewShell aShell( *this, 0, pPrinter );
SET_CURR_SHELL( &aShell );
@@ -147,8 +140,7 @@ void ViewShell::PrintProspect(
pNxtPage = aIt->second;
}
- // OD 05.05.2003 #i14016# - consider empty pages on calculation
- // of page size, used for calculation of scaling.
+ //#i14016# - consider empty pages on calculation of page size, used for calculation of scaling.
Size aSttPageSize;
if ( pStPage )
{
@@ -196,7 +188,6 @@ void ViewShell::PrintProspect(
nMaxRowSz = Max( aNxtPageSize.Height(), aSttPageSize.Height() );
}
- // den MapMode einstellen
aMapMode.SetOrigin( Point() );
{
Fraction aScX( aPrtSize.Width(), nMaxColSz );
@@ -205,8 +196,6 @@ void ViewShell::PrintProspect(
aScY = aScX;
{
- // fuer Drawing, damit diese ihre Objecte vernuenftig Painten
- // koennen, auf "glatte" Prozentwerte setzen
aScY *= Fraction( 1000, 1 );
long nTmp = (long)aScY;
if( 1 < nTmp )
@@ -256,3 +245,4 @@ void ViewShell::PrintProspect(
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 115ced0d37c6..afeaa33de325 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#define _SVX_PARAITEM_HXX
#define _SVX_TEXTITEM_HXX
@@ -39,9 +39,6 @@
#include <svx/srchdlg.hxx>
#include <svx/svdobj.hxx>
#include <sfx2/viewsh.hxx>
-#ifndef _SHL_HXX
-//#include <tools/shl.hxx>
-#endif
#include <swwait.hxx>
#include <swmodule.hxx>
#include <fesh.hxx>
@@ -63,9 +60,7 @@
#include <fntcache.hxx>
#include <ptqueue.hxx>
#include <tabfrm.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <pagedesc.hxx>
#include <ndole.hxx>
#include <ndindex.hxx>
@@ -73,18 +68,11 @@
#include <svtools/colorcfg.hxx>
#include <svtools/accessibilityoptions.hxx>
#include <accessibilityoptions.hxx>
-#ifndef _STATSTR_HRC
#include <statstr.hrc>
-#endif
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
-// OD 14.01.2003 #103492#
#include <pagepreviewlayout.hxx>
-// --> OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
#include <anchoredobject.hxx>
-// <--
#include "../../ui/inc/view.hxx"
#include <PostItMgr.hxx>
@@ -92,7 +80,6 @@
#include <vcl/svapp.hxx>
-// #i74769#
#include <svx/sdrpaintwindow.hxx>
sal_Bool ViewShell::bLstAct = sal_False;
@@ -177,17 +164,9 @@ void ViewShell::DLPostPaint2(bool bPaintFormLayer)
//////////////////////////////////////////////////////////////////////////////
-/******************************************************************************
-|*
-|* ViewShell::ImplEndAction()
-|*
-|* Letzte Aenderung MA 04. Sep. 96
-|*
-******************************************************************************/
-
void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
{
- //Fuer den Drucker gibt es hier nichts zu tun.
+ //There is nothing to do here for the printer
if ( !GetWin() || IsPreView() )
{
bPaintWorks = sal_True;
@@ -197,12 +176,13 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
bInEndAction = sal_True;
- //Laeuft hiermit das EndAction der Letzten Shell im Ring?
ViewShell::bLstAct = sal_True;
ViewShell *pSh = (ViewShell*)this->GetNext();
while ( pSh != this )
- { if ( pSh->ActionPend() )
- { ViewShell::bLstAct = sal_False;
+ {
+ if ( pSh->ActionPend() )
+ {
+ ViewShell::bLstAct = sal_False;
pSh = this;
}
else
@@ -233,9 +213,8 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
if ( bIsShellForCheckViewLayout )
GetLayout()->CheckViewLayout( GetViewOptions(), &aVisArea );
- //Wenn wir selbst keine Paints erzeugen, so warten wir auf das Paint
- //vom System. Dann ist das Clipping korrekt gesetzt; Beispiel: verschieben
- //eines DrawObjektes.
+ //If we do not generate Paints, we wait for the paint by the system.
+ //Then, the clipping is set correctly, for example: move a DrawObject.
if ( Imp()->GetRegion() ||
aInvalidRect.HasArea() ||
bExtraData )
@@ -256,12 +235,6 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
SwRegionRects *pRegion = Imp()->GetRegion();
- //JP 27.11.97: wer die Selection hided, muss sie aber auch
- // wieder Showen. Sonst gibt es Paintfehler!
- // z.B.: addional Mode, Seite vertikal hab zu sehen, in der
- // Mitte eine Selektion und mit einem anderen Cursor an linken
- // rechten Rand springen. Ohne ShowCrsr verschwindet die
- // Selektion
sal_Bool bShowCrsr = pRegion && IsA( TYPE(SwCrsrShell) );
if( bShowCrsr )
((SwCrsrShell*)this)->HideCrsrs();
@@ -272,7 +245,7 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
Imp()->pRegion = NULL;
- //Erst Invert dann Compress, niemals andersherum!
+ // First Invert then Compress, never the other way round!
pRegion->Invert();
pRegion->Compress();
@@ -286,7 +259,6 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
sal_Bool bPaint = sal_True;
if ( IsEndActionByVirDev() )
{
- //virtuelles device erzeugen und einstellen.
if ( !pVout )
pVout = new VirtualDevice( *GetOut() );
MapMode aMapMode( GetOut()->GetMapMode() );
@@ -316,11 +288,9 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
{
bPaint = sal_False;
- // --> OD 2007-07-26 #i79947#
// #i72754# start Pre/PostPaint encapsulation before pOut is changed to the buffering VDev
const Region aRepaintRegion(aRect.SVRect());
DLPrePaint2(aRepaintRegion);
- // <--
OutputDevice *pOld = GetOut();
pVout->SetLineColor( pOld->GetLineColor() );
@@ -360,7 +330,7 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
DLPostPaint2(true);
}
- // --> OD 2009-12-03 #i107365#
+ // #i107365#
// Direct paint has been performed. Thus, take care of
// transparent child windows.
if ( GetWin() )
@@ -389,7 +359,6 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
}
}
}
- // <--
}
delete pVout;
@@ -413,10 +382,6 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
Imp()->EndAction();
- //Damit sich die automatischen Scrollbars auch richtig anordnen k?nnen
- //muessen wir die Aktion hier kuenstlich beenden (EndAction loesst ein
- //Notify aus, und das muss Start-/EndAction rufen um die Scrollbars
- //klarzubekommen.
--nStartAction;
UISizeNotify();
++nStartAction;
@@ -425,35 +390,16 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
Imp()->FireAccessibleEvents();
}
-/******************************************************************************
-|*
-|* ViewShell::ImplStartAction()
-|*
-|* Ersterstellung MA 25. Jul. 94
-|* Letzte Aenderung MA 25. Jul. 94
-|*
-******************************************************************************/
-
void ViewShell::ImplStartAction()
{
bPaintWorks = sal_False;
Imp()->StartAction();
}
-
-/******************************************************************************
-|*
-|* ViewShell::ImplLockPaint(), ImplUnlockPaint()
-|*
-|* Ersterstellung MA 11. Jun. 96
-|* Letzte Aenderung MA 11. Jun. 96
-|*
-******************************************************************************/
-
void ViewShell::ImplLockPaint()
{
if ( GetWin() && GetWin()->IsVisible() )
- GetWin()->EnablePaint( sal_False ); //Auch die Controls abklemmen.
+ GetWin()->EnablePaint( sal_False );
Imp()->LockPaint();
}
@@ -465,7 +411,7 @@ void ViewShell::ImplUnlockPaint( sal_Bool bVirDev )
{
if ( (bInSizeNotify || bVirDev ) && VisArea().HasArea() )
{
- //Refresh mit virtuellem Device um das Flackern zu verhindern.
+ //prevent refresh with virtual device to flicker.
VirtualDevice *pVout = new VirtualDevice( *pOut );
pVout->SetMapMode( pOut->GetMapMode() );
Size aSize( VisArea().SSize() );
@@ -513,15 +459,6 @@ void ViewShell::ImplUnlockPaint( sal_Bool bVirDev )
Imp()->UnlockPaint();
}
-/******************************************************************************
-|*
-|* ViewShell::AddPaintRect()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 09. Feb. 97
-|*
-******************************************************************************/
-
sal_Bool ViewShell::AddPaintRect( const SwRect & rRect )
{
sal_Bool bRet = sal_False;
@@ -529,7 +466,6 @@ sal_Bool ViewShell::AddPaintRect( const SwRect & rRect )
do
{
if ( pSh->IsPreView() && pSh->GetWin() )
-// pSh->GetWin()->Invalidate();
::RepaintPagePreview( pSh, rRect );
else
bRet |= pSh->Imp()->AddPaintRect( rRect );
@@ -539,15 +475,6 @@ sal_Bool ViewShell::AddPaintRect( const SwRect & rRect )
return bRet;
}
-/******************************************************************************
-|*
-|* ViewShell::InvalidateWindows()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 09. Feb. 97
-|*
-******************************************************************************/
-
void ViewShell::InvalidateWindows( const SwRect &rRect )
{
if ( !Imp()->IsCalcLayoutProgress() )
@@ -558,7 +485,6 @@ void ViewShell::InvalidateWindows( const SwRect &rRect )
if ( pSh->GetWin() )
{
if ( pSh->IsPreView() )
-// pSh->GetWin()->Invalidate();
::RepaintPagePreview( pSh, rRect );
else if ( pSh->VisArea().IsOver( rRect ) )
pSh->GetWin()->Invalidate( rRect.SVRect() );
@@ -569,15 +495,6 @@ void ViewShell::InvalidateWindows( const SwRect &rRect )
}
}
-/******************************************************************************
-|*
-|* ViewShell::MakeVisible()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung AMA 10. Okt. 95
-|*
-******************************************************************************/
-
void ViewShell::MakeVisible( const SwRect &rRect )
{
if ( !VisArea().IsInside( rRect ) || IsScrollMDI( this, rRect ) || GetCareWin(*this) )
@@ -596,11 +513,10 @@ void ViewShell::MakeVisible( const SwRect &rRect )
EndAction();
} while( nOldH != pRoot->Frm().Height() && nLoopCnt-- );
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
{
- //MA: 04. Nov. 94, braucht doch keiner oder??
- ASSERT( !this, "MakeVisible fuer Drucker wird doch gebraucht?" );
+ OSL_ENSURE( !this, "MakeVisible fuer Drucker wird doch gebraucht?" );
}
#endif
@@ -608,15 +524,6 @@ void ViewShell::MakeVisible( const SwRect &rRect )
}
}
-/******************************************************************************
-|*
-|* ViewShell::CareChildWindow()
-|*
-|* Ersterstellung AMA 10. Okt. 95
-|* Letzte Aenderung AMA 10. Okt. 95
-|*
-******************************************************************************/
-
Window* ViewShell::CareChildWin(ViewShell& rVSh)
{
if(rVSh.pSfxViewShell)
@@ -631,33 +538,15 @@ Window* ViewShell::CareChildWin(ViewShell& rVSh)
return NULL;
}
-/******************************************************************************
-|*
-|* ViewShell::GetPagePos()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 04. Aug. 93
-|*
-******************************************************************************/
-
Point ViewShell::GetPagePos( sal_uInt16 nPageNum ) const
{
return GetLayout()->GetPagePos( nPageNum );
}
-/******************************************************************************
-|*
-|* ViewShell::GetNumPages()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 20. Apr. 94
-|*
-******************************************************************************/
-
sal_uInt16 ViewShell::GetNumPages()
{
- //Es kann sein, das noch kein Layout existiert weil die Methode vom
- //Root-Ctor gerufen wird.
+ //It can happen that there still no Layout exists due to the
+ //method being called from the Root ctor.
return GetLayout() ? GetLayout()->GetPageNum() : 0;
}
@@ -666,18 +555,6 @@ sal_Bool ViewShell::IsDummyPage( sal_uInt16 nPageNum ) const
return GetLayout() ? GetLayout()->IsDummyPage( nPageNum ) : 0;
}
-/*************************************************************************
-|*
-|* ViewShell::UpdateFlds()
-|*
-|* Ersterstellung BP 04.05.92
-|* Beschreibung erzwingt ein Update fuer jedes Feld
-|*
-|* UpdateFlds benachrichtigt alle Felder mit pNewHt.
-|* Wenn pNewHt == 0 ist (default), wird der Feldtyp verschickt.
-|*
-*************************************************************************/
-
void ViewShell::UpdateFlds(sal_Bool bCloseDB)
{
SET_CURR_SHELL( this );
@@ -723,26 +600,16 @@ sal_Bool ViewShell::HasCharts() const
return bRet;
}
-/*************************************************************************
-|*
-|* ViewShell::LayoutIdle()
-|*
-|* Ersterstellung MA 26. May. 92
-|* Letzte Aenderung OG 19. Mar. 96
-|*
-*************************************************************************/
-
void ViewShell::LayoutIdle()
{
#ifdef TCOVER
- //fuer TCV-Version: Ende der Startphase des Programmes
TCovCall::Idle();
#endif
if( !pOpt->IsIdle() || !GetWin() ||
( Imp()->HasDrawView() && Imp()->GetDrawView()->IsDragObj() ) )
return;
- //Kein Idle wenn gerade gedruckt wird.
+
ViewShell *pSh = this;
do
{ if ( !pSh->GetWin() )
@@ -753,8 +620,7 @@ void ViewShell::LayoutIdle()
SET_CURR_SHELL( this );
-#ifdef DBG_UTIL
- // Wenn Test5 gedrueckt ist, wird der IdleFormatierer abgeknipst.
+#if OSL_DEBUG_LEVEL > 1
if( pOpt->IsTest5() )
return;
#endif
@@ -762,12 +628,8 @@ void ViewShell::LayoutIdle()
{
DBG_PROFSTART( LayoutIdle );
- //Cache vorbereiten und restaurieren, damit er nicht versaut wird.
SwSaveSetLRUOfst aSave( *SwTxtFrm::GetTxtCache(),
SwTxtFrm::GetTxtCache()->GetCurMax() - 50 );
- // #125243# there are lots of stacktraces indicating that Imp() returns NULL
- // this ViewShell seems to be invalid - but it's not clear why
- // this return is only a workaround!
DBG_ASSERT(Imp(), "ViewShell already deleted?");
if(!Imp())
return;
@@ -802,7 +664,7 @@ void lcl_InvalidateAllCntnt( ViewShell& rSh, sal_uInt8 nInv )
objects (Writer fly frame and drawing objects), which are anchored
to paragraph or to character.
- OD 2004-03-16 #i11860#
+ #i11860#
@author OD
*/
@@ -887,8 +749,6 @@ void ViewShell::SetUseVirDev( bool bNewVirtual )
}
}
-// OD 2004-02-16 #106629# - control, if paragraph and table spacing is added
-// at bottom of table cells
void ViewShell::SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
@@ -901,7 +761,7 @@ void ViewShell::SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells
}
}
-// OD 06.01.2004 #i11859# - control, if former formatting of text lines with
+// #i11859# - control, if former formatting of text lines with
// proportional line spacing is used or not.
void ViewShell::SetUseFormerLineSpacing( bool _bUseFormerLineSpacing )
{
@@ -915,7 +775,7 @@ void ViewShell::SetUseFormerLineSpacing( bool _bUseFormerLineSpacing )
}
}
-// OD 2004-03-12 #i11860# - control, if former object positioning is used or not.
+// #i11860# - control, if former object positioning is used or not.
void ViewShell::SetUseFormerObjectPositioning( bool _bUseFormerObjPos )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
@@ -927,7 +787,7 @@ void ViewShell::SetUseFormerObjectPositioning( bool _bUseFormerObjPos )
}
}
-// OD 2004-05-05 #i28701#
+// #i28701#
void ViewShell::SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
@@ -939,7 +799,6 @@ void ViewShell::SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos )
}
}
-// --> FME #108724#
void ViewShell::SetUseFormerTextWrapping( bool _bUseFormerTextWrapping )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
@@ -951,9 +810,8 @@ void ViewShell::SetUseFormerTextWrapping( bool _bUseFormerTextWrapping )
lcl_InvalidateAllCntnt( *this, nInv );
}
}
-// <--
-// -> PB 2007-06-11 #i45491#
+// #i45491#
void ViewShell::SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
@@ -965,25 +823,11 @@ void ViewShell::SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWit
lcl_InvalidateAllCntnt( *this, nInv );
}
}
-// <--
-
-/******************************************************************************
-|*
-|* ViewShell::Reformat
-|*
-|* Ersterstellung BP ???
-|* Letzte Aenderung MA 13. Feb. 98
-|*
-******************************************************************************/
void ViewShell::Reformat()
{
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
- // Wir gehen auf Nummer sicher:
- // Wir muessen die alten Fontinformationen wegschmeissen,
- // wenn die Druckeraufloesung oder der Zoomfaktor sich aendert.
- // Init() und Reformat() sind die sichersten Stellen.
#ifdef FNTMET
aFntMetList.Flush();
#else
@@ -1007,26 +851,14 @@ void ViewShell::Reformat()
Reformat();
}
-/******************************************************************************
-|*
-|* ViewShell::CalcLayout()
-|* Vollstaendige Formatierung von Layout und Inhalt.
-|*
-|* Ersterstellung MA 31. Jan. 94
-|* Letzte Aenderung MA 08. Oct. 96
-|*
-******************************************************************************/
-
void ViewShell::CalcLayout()
{
SET_CURR_SHELL( this );
SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
- //Cache vorbereiten und restaurieren, damit er nicht versaut wird.
SwSaveSetLRUOfst aSaveLRU( *SwTxtFrm::GetTxtCache(),
SwTxtFrm::GetTxtCache()->GetCurMax() - 50 );
- //Progress einschalten wenn noch keiner Lauft.
const sal_Bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
if ( bEndProgress )
{
@@ -1044,8 +876,8 @@ void ViewShell::CalcLayout()
aAction.Action();
GetDoc()->UnlockExpFlds();
- //Das SetNewFldLst() am Doc wurde unterbunden und muss nachgeholt
- //werden (siehe flowfrm.cxx, txtfld.cxx)
+ // The SetNewFldLst() on Doc was stopped and has to be rescheduled
+ // (see flowfrm.cxx, txtfld.cxx)
if ( aAction.IsExpFlds() )
{
aAction.Reset();
@@ -1066,15 +898,6 @@ void ViewShell::CalcLayout()
::EndProgress( GetDoc()->GetDocShell() );
}
-/******************************************************************************
-|*
-|* ViewShell::SetFirstVisPageInvalid()
-|*
-|* Ersterstellung MA 19. May. 94
-|* Letzte Aenderung MA 19. May. 94
-|*
-******************************************************************************/
-
void ViewShell::SetFirstVisPageInvalid()
{
ViewShell *pSh = this;
@@ -1085,15 +908,6 @@ void ViewShell::SetFirstVisPageInvalid()
} while ( pSh != this );
}
-/******************************************************************************
-|*
-|* ViewShell::SizeChgNotify()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 17. Sep. 96
-|*
-******************************************************************************/
-
void ViewShell::SizeChgNotify()
{
if ( !pWin )
@@ -1122,32 +936,20 @@ void ViewShell::SizeChgNotify()
}
}
-/******************************************************************************
-|*
-|* ViewShell::VisPortChgd()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 22. Jul. 96
-|*
-******************************************************************************/
-
void ViewShell::VisPortChgd( const SwRect &rRect)
{
- ASSERT( GetWin(), "VisPortChgd ohne Window." );
+ OSL_ENSURE( GetWin(), "VisPortChgd ohne Window." );
if ( rRect == VisArea() )
return;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if ( bInEndAction )
{
- //Da Rescheduled doch schon wieder irgendwo einer?
- ASSERT( !this, "Scroll waehrend einer EndAction." );
+ OSL_ENSURE( !this, "Scroll waehrend einer EndAction." );
}
#endif
- //Ersteinmal die alte sichtbare Seite holen, dann braucht nacher nicht
- //lange gesucht werden.
const SwFrm *pOldPage = Imp()->GetFirstVisPage();
const SwRect aPrevArea( VisArea() );
@@ -1155,9 +957,9 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
aVisArea = rRect;
SetFirstVisPageInvalid();
- //Wenn noch eine PaintRegion herumsteht und sich die VisArea geaendert hat,
- //so ist die PaintRegion spaetestens jetzt obsolete. Die PaintRegion kann
- //vom RootFrm::Paint erzeugt worden sein.
+ // When there is still a PaintRegion and the VisArea has changed,
+ // Then the PaintRegion becomes obsolete. The PaintRegion can have been
+ // produced by RootFrm::Paint.
if ( !bInEndAction &&
Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea() )
Imp()->DelRegion();
@@ -1172,16 +974,12 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
GetWin()->Invalidate();
else
{
- // Betrag ausrechnen, um den gescrolled werden muss.
const long nXDiff = aPrevArea.Left() - VisArea().Left();
const long nYDiff = aPrevArea.Top() - VisArea().Top();
if( !nXDiff && !getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
(!Imp()->HasDrawView() || !Imp()->GetDrawView()->IsGridVisible() ) )
{
- //Falls moeglich die Wiese nicht mit Scrollen.
- //Also linke und rechte Kante des Scrollbereiches auf die
- //Seiten begrenzen.
const SwPageFrm *pPage = (SwPageFrm*)GetDoc()->GetRootFrm()->Lower();
if ( pPage->Frm().Top() > pOldPage->Frm().Top() )
pPage = (SwPageFrm*)pOldPage;
@@ -1207,10 +1005,6 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
if ( aPageRect.IsOver( aBoth ) )
{
- // OD 12.02.2003 #i9719#, #105645# - consider new border
- // and shadow width
- const SwTwips nBorderWidth =
- GetOut()->PixelToLogic( Size( pPage->BorderPxWidth(), 0 ) ).Width();
const SwTwips nShadowWidth =
GetOut()->PixelToLogic( Size( pPage->ShadowPxWidth(), 0 ) ).Width();
@@ -1220,14 +1014,14 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
{
case sw::sidebarwindows::SIDEBAR_LEFT:
{
- nPageLeft = aPageRect.Left() - nBorderWidth - nSidebarWidth;
- nPageRight = aPageRect.Right() + nBorderWidth + nShadowWidth;
+ nPageLeft = aPageRect.Left() - nSidebarWidth;
+ nPageRight = aPageRect.Right() + nShadowWidth;
}
break;
case sw::sidebarwindows::SIDEBAR_RIGHT:
{
- nPageLeft = aPageRect.Left() - nBorderWidth;
- nPageRight = aPageRect.Right() + nBorderWidth + nShadowWidth + nSidebarWidth;
+ nPageLeft = aPageRect.Left();
+ nPageRight = aPageRect.Right() + nShadowWidth + nSidebarWidth;
}
break;
case sw::sidebarwindows::SIDEBAR_NONE:
@@ -1238,9 +1032,6 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
nMinLeft = nPageLeft;
if( nPageRight > nMaxRight )
nMaxRight = nPageRight;
- //Zus. auf die Zeichenobjekte abgleichen.
- //Einen Ofst beruecksichtigen, weil die Objekte u.U.
- //selektiert sind und die Henkel dann hinausstehen.
if ( pPage->GetSortedObjs() )
{
const long nOfst = GetOut()->PixelToLogic(
@@ -1250,7 +1041,6 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
{
SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
const Rectangle &rBound = pObj->GetObjRect().SVRect();
- // OD 03.03.2003 #107927# - use correct datatype
const SwTwips nL = Max( 0L, rBound.Left() - nOfst );
if ( nL < nMinLeft )
nMinLeft = nL;
@@ -1275,7 +1065,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
else
GetWin()->Invalidate( aRect );
}
- else if ( !nLockPaint ) //Wird im UnLock erledigt
+ else if ( !nLockPaint )
{
if( VisArea().IsOver( aPrevArea ) )
{
@@ -1302,14 +1092,13 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
}
GetWin()->Update();
- // --> OD 2010-02-11 #i88070#
+ // #i88070#
if ( pPostItMgr )
{
pPostItMgr->Rescale();
pPostItMgr->CalcRects();
pPostItMgr->LayoutPostIts();
}
- // <--
if ( !bScrolled && pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() )
pPostItMgr->CorrectPositions();
@@ -1319,15 +1108,6 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
}
-/******************************************************************************
-|*
-|* ViewShell::SmoothScroll()
-|*
-|* Ersterstellung MA 04. Jul. 96
-|* Letzte Aenderung MA 25. Mar. 97
-|*
-******************************************************************************/
-
sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
{
const sal_uLong nColCnt = pOut->GetColorCount();
@@ -1351,7 +1131,7 @@ sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRe
// #i75172# isolated static conditions
const bool bOnlyYScroll(!lXDiff && Abs(lYDiff) != 0 && Abs(lYDiff) < lMax);
const bool bAllowedWithChildWindows(GetWin()->GetWindowClipRegionPixel(WINDOW_GETCLIPREGION_NOCHILDREN|WINDOW_GETCLIPREGION_NULL).IsNull());
-// --> OD 2009-08-12 #i98766# - disable smooth scrolling for Mac port builds
+// #i98766# - disable smooth scrolling for Mac port builds
#ifdef QUARTZ
const bool bSmoothScrollAllowed(false);
(void) bOnlyYScroll;
@@ -1359,7 +1139,7 @@ sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRe
#else
const bool bSmoothScrollAllowed(bOnlyYScroll && bEnableSmooth && GetViewOptions()->IsSmoothScroll() && bAllowedWithChildWindows);
#endif
-// <-
+
const bool bIAmCursorShell(ISA(SwCrsrShell));
(void) bIAmCursorShell;
@@ -1375,7 +1155,6 @@ sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRe
const SwRect aOldVis( VisArea() );
- //Virtuelles Device erzeugen und einstellen.
const Size aPixSz = GetWin()->PixelToLogic(Size(1,1));
VirtualDevice *pVout = new VirtualDevice( *GetWin() );
pVout->SetLineColor( GetWin()->GetLineColor() );
@@ -1389,7 +1168,6 @@ sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRe
{
nLockPaint++;
- //Ersteinmal alles neue in das VirDev Painten.
SwRect aRect( VisArea() );
aRect.Height( aSize.Height() );
if ( pRect )
@@ -1441,31 +1219,11 @@ sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRe
// end paint and destroy ObjectContact again
DLPostPaint2(true);
pDrawView->DeleteWindowFromPaintView(pVout);
-
- // temporary debug paint checking...
- static bool bDoSaveForVisualControl(false);
- if(bDoSaveForVisualControl)
- {
- const bool bMapModeWasEnabledVDev(pVout->IsMapModeEnabled());
- pVout->EnableMapMode(false);
- const Bitmap aBitmap(pVout->GetBitmap(Point(), pVout->GetOutputSizePixel()));
- const String aTmpString(ByteString( "c:\\test.bmp" ), RTL_TEXTENCODING_UTF8);
- SvFileStream aNew(aTmpString, STREAM_WRITE|STREAM_TRUNC);
- aNew << aBitmap;
- pVout->EnableMapMode(bMapModeWasEnabledVDev);
- }
}
pOut = pOld;
aVisArea = aOldVis;
- //Jetzt Stueckchenweise schieben und die neuen Pixel aus dem
- //VirDev kopieren.
-
- // ??????????????????????
- // or is it better to get the scrollfactor from the User
- // as option?
- // ??????????????????????
long lMaDelta = aPixSz.Height();
if ( Abs(lYDiff) > ( aVisArea.Height() / 3 ) )
lMaDelta *= 6;
@@ -1535,9 +1293,6 @@ sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRe
if(!Imp()->bStopSmooth)
{
- static bool bDoItOnPixels(true);
- if(bDoItOnPixels)
- {
// start paint on logic base
const Rectangle aTargetLogic(Imp()->aSmoothRect.SVRect());
DLPrePaint2(Region(aTargetLogic));
@@ -1555,21 +1310,6 @@ sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRe
rTargetDevice.EnableMapMode(false);
pVout->EnableMapMode(false);
- // copy content
- static bool bTestDirectToWindowPaint(false);
- if(bTestDirectToWindowPaint)
- {
- const bool bMapModeWasEnabledWin(GetWin()->IsMapModeEnabled());
- GetWin()->EnableMapMode(false);
-
- GetWin()->DrawOutDev(
- aTargetPixel.TopLeft(), aTargetPixel.GetSize(), // dest
- aSourceTopLeft, aTargetPixel.GetSize(), // source
- *pVout);
-
- GetWin()->EnableMapMode(bMapModeWasEnabledWin);
- }
-
rTargetDevice.DrawOutDev(
aTargetPixel.TopLeft(), aTargetPixel.GetSize(), // dest
aSourceTopLeft, aTargetPixel.GetSize(), // source
@@ -1581,34 +1321,6 @@ sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRe
// end paint on logoc base
DLPostPaint2(true);
- }
- else
- {
- Rectangle aRectangle(Imp()->aSmoothRect.SVRect());
- aRectangle.Left() -= aPixSz.Width();
- aRectangle.Right() += aPixSz.Width();
- aRectangle.Top() -= aPixSz.Height();
- aRectangle.Bottom() += aPixSz.Height();
- const Point aUpdateTopLeft(aRectangle.TopLeft());
- const Size aUpdateSize(aRectangle.GetSize());
-
- // #i75172# the part getting visible needs to be handled like a repaint.
- // For that, start with DLPrePaint2 and the correct Rectangle
- DLPrePaint2(Region(aRectangle));
-
- static bool bTestDirectToWindowPaint(false);
- if(bTestDirectToWindowPaint)
- {
- GetWin()->DrawOutDev(aUpdateTopLeft, aUpdateSize, aUpdateTopLeft, aUpdateSize, *pVout);
- }
-
- mpTargetPaintWindow->GetTargetOutputDevice().DrawOutDev(aUpdateTopLeft, aUpdateSize, aUpdateTopLeft, aUpdateSize, *pVout);
-
- // #i75172# Corret repaint end
- // Note: This also correcty creates the overlay, thus smooth scroll will
- // also be allowed now wth selection (see big IF above)
- DLPostPaint2(true);
- }
}
else
--nLockPaint;
@@ -1633,24 +1345,10 @@ sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRe
return sal_False;
}
-/******************************************************************************
-|*
-|* ViewShell::PaintDesktop()
-|*
-|* Ersterstellung MA 16. Dec. 93
-|* Letzte Aenderung MA 30. Nov. 95
-|*
-******************************************************************************/
-
void ViewShell::PaintDesktop( const SwRect &rRect )
{
if ( !GetWin() && !GetOut()->GetConnectMetaFile() )
- return; //Fuer den Drucker tun wir hier nix
-
- //Sonderfaelle abfangen, damit es nicht gar so ueberraschend aussieht.
- //Kann z.B. waehrend des Idle'ns zwischenzeitlich auftreten.
- //Die Rechtecke neben den Seiten muessen wir leider auf jedenfall Painten,
- //den diese werden spaeter beim VisPortChgd ausgespart.
+ return;
sal_Bool bBorderOnly = sal_False;
const SwRootFrm *pRoot = GetDoc()->GetRootFrm();
if ( rRect.Top() > pRoot->Frm().Bottom() )
@@ -1666,7 +1364,7 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
SwRegionRects aRegion( rRect );
- //mod #i6193: remove sidebar area to avoid flickering
+ //#i6193: remove sidebar area to avoid flickering
const SwPostItMgr* pPostItMgr = GetPostItMgr();
const SwTwips nSidebarWidth = pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ?
pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth() :
@@ -1698,9 +1396,9 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
{
const SwFrm *pPage = Imp()->GetFirstVisPage();
const SwTwips nBottom = rRect.Bottom();
- //const SwTwips nRight = rRect.Right();
+
while ( pPage && aRegion.Count() &&
- (pPage->Frm().Top() <= nBottom) ) // PAGES01 && (pPage->Frm().Left() <= nRight))
+ (pPage->Frm().Top() <= nBottom) )
{
SwRect aPageRect( pPage->Frm() );
if ( bBookMode )
@@ -1724,11 +1422,8 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
_PaintDesktop( aRegion );
}
-
-// PaintDesktop gesplittet, dieser Teil wird auch von PreViewPage benutzt
void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
{
- // OD 2004-04-23 #116347#
GetOut()->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
GetOut()->SetLineColor();
@@ -1777,15 +1472,6 @@ void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
GetOut()->Pop();
}
-/******************************************************************************
-|*
-|* ViewShell::CheckInvalidForPaint()
-|*
-|* Ersterstellung MA 19. May. 94
-|* Letzte Aenderung MA 09. Jun. 94
-|*
-******************************************************************************/
-
sal_Bool ViewShell::CheckInvalidForPaint( const SwRect &rRect )
{
if ( !GetWin() )
@@ -1826,8 +1512,6 @@ sal_Bool ViewShell::CheckInvalidForPaint( const SwRect &rRect )
SwRegionRects *pRegion = Imp()->GetRegion();
if ( pRegion && aAction.IsBrowseActionStop() )
{
- //Nur dann interessant, wenn sich im sichtbaren Bereich etwas
- //veraendert hat.
sal_Bool bStop = sal_True;
for ( sal_uInt16 i = 0; i < pRegion->Count(); ++i )
{
@@ -1844,7 +1528,7 @@ sal_Bool ViewShell::CheckInvalidForPaint( const SwRect &rRect )
if ( pRegion )
{
- //Erst Invert dann Compress, niemals andersherum!
+ //First Invert, then Compress, never the other way round!
pRegion->Invert();
pRegion->Compress();
bRet = sal_False;
@@ -1890,15 +1574,6 @@ sal_Bool ViewShell::CheckInvalidForPaint( const SwRect &rRect )
return bRet;
}
-/******************************************************************************
-|*
-|* ViewShell::Paint()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 17. Sep. 96
-|*
-******************************************************************************/
-
void ViewShell::Paint(const Rectangle &rRect)
{
if ( nLockPaint )
@@ -1926,7 +1601,7 @@ void ViewShell::Paint(const Rectangle &rRect)
return;
}
- //MA 30. Jul. 95: fix(16787): mit !nStartAction versuche ich mal mich gegen
+ // mit !nStartAction versuche ich mal mich gegen
//fehlerhaften Code an anderen Stellen zu wehren. Hoffentlich fuehrt das
//nicht zu Problemen!?
if ( bPaintWorks && !nStartAction )
@@ -1965,34 +1640,23 @@ void ViewShell::Paint(const Rectangle &rRect)
}
else
{
- //SwSaveHdl *pSaveHdl = 0;
- //if ( Imp()->HasDrawView() )
- // pSaveHdl = new SwSaveHdl( Imp() );
-
- //Wenn eine der sichtbaren Seiten noch irgendetwas zum Repaint
- //angemeldet hat, so muessen Repaints ausgeloest werden.
if ( !CheckInvalidForPaint( aRect ) )
{
- // --> OD 2009-08-12 #i101192#
- // start Pre/PostPaint encapsulation to avoid screen blinking
+ // #i101192# start Pre/PostPaint encapsulation to avoid screen blinking
const Region aRepaintRegion(aRect.SVRect());
DLPrePaint2(aRepaintRegion);
- // <--
+
PaintDesktop( aRect );
- //Falls sinnvoll gleich das alte InvalidRect verarbeiten bzw.
- //vernichten.
+
if ( aRect.IsInside( aInvalidRect ) )
ResetInvalidRect();
ViewShell::bLstAct = sal_True;
GetLayout()->Paint( aRect );
ViewShell::bLstAct = sal_False;
- // --> OD 2009-08-12 #i101192#
- // end Pre/PostPaint encapsulation
+ // #i101192# end Pre/PostPaint encapsulation
DLPostPaint2(true);
- // <--
- }
- //delete pSaveHdl;
+ }
}
SwRootFrm::SetNoVirDev( sal_False );
bPaintInProgress = sal_False;
@@ -2022,7 +1686,6 @@ void ViewShell::Paint(const Rectangle &rRect)
const Region aDLRegion(rRect);
DLPrePaint2(aDLRegion);
- // OD 2004-04-23 #116347#
pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
pOut->SetFillColor( Imp()->GetRetoucheColor() );
pOut->SetLineColor();
@@ -2035,15 +1698,6 @@ void ViewShell::Paint(const Rectangle &rRect)
}
}
-/******************************************************************************
-|*
-|* ViewShell::SetBrowseBorder()
-|*
-|* Ersterstellung AMA 20. Aug. 96
-|* Letzte Aenderung AMA 20. Aug. 96
-|*
-******************************************************************************/
-
void ViewShell::SetBrowseBorder( const Size& rNew )
{
if( rNew != aBrowseBorder )
@@ -2073,15 +1727,6 @@ sal_Int32 ViewShell::GetBrowseWidth() const
return aVisArea.Width() - 2 * GetOut()->PixelToLogic(aBrowseBorder).Width();
}
-/******************************************************************************
-|*
-|* ViewShell::CheckBrowseView()
-|*
-|* Ersterstellung MA 04. Mar. 96
-|* Letzte Aenderung MA 04. Jul. 96
-|*
-******************************************************************************/
-
void ViewShell::CheckBrowseView( sal_Bool bBrowseChgd )
{
if ( !bBrowseChgd &&
@@ -2090,7 +1735,7 @@ void ViewShell::CheckBrowseView( sal_Bool bBrowseChgd )
SET_CURR_SHELL( this );
- ASSERT( GetLayout(), "Layout not ready" );
+ OSL_ENSURE( GetLayout(), "Layout not ready" );
// Wenn das Layout noch nicht einmal eine Hoehe hat,
// ist sowieso nichts formatiert.
@@ -2141,16 +1786,6 @@ void ViewShell::CheckBrowseView( sal_Bool bBrowseChgd )
UnlockPaint();
}
-/*************************************************************************
-|*
-|* ViewShell::GetLayout()
-|* ViewShell::GetNodes()
-|*
-|* Ersterstellung OK 26. May. 92
-|* Letzte Aenderung MA 16. Sep. 93
-|*
-*************************************************************************/
-
SwRootFrm *ViewShell::GetLayout() const
{
return GetDoc()->GetRootFrm();
@@ -2198,15 +1833,6 @@ SfxItemPool& ViewShell::GetAttrPool()
return GetDoc()->GetAttrPool();
}
-/******************************************************************************
-|*
-|* ViewShell::ApplyViewOptions(), ImplApplyViewOptions()
-|*
-|* Ersterstellung ??
-|* Letzte Aenderung MA 03. Mar. 98
-|*
-******************************************************************************/
-
void ViewShell::ApplyViewOptions( const SwViewOption &rOpt )
{
@@ -2218,7 +1844,7 @@ void ViewShell::ApplyViewOptions( const SwViewOption &rOpt )
ImplApplyViewOptions( rOpt );
- //Einige Aenderungen muessen synchronisiert werden.
+ //Some changes have to be synchronized
pSh = (ViewShell*)this->GetNext();
while ( pSh != this )
{
@@ -2251,7 +1877,7 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
Window *pMyWin = GetWin();
if( !pMyWin )
{
- ASSERT( pMyWin, "ViewShell::ApplyViewOptions: no window" );
+ OSL_ENSURE( pMyWin, "ViewShell::ApplyViewOptions: no window" );
return;
}
@@ -2342,7 +1968,7 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
sal_Bool bOnlineSpellChgd = pOpt->IsOnlineSpell() != rOpt.IsOnlineSpell();
- *pOpt = rOpt; // Erst jetzt werden die Options uebernommen.
+ *pOpt = rOpt;
pOpt->SetUIOptions(rOpt);
pDoc->set(IDocumentSettingAccess::HTML_MODE, 0 != ::GetHtmlMode(pDoc->GetDocShell()));
@@ -2372,15 +1998,6 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
}
-/******************************************************************************
-|*
-|* ViewShell::SetUIOptions()
-|*
-|* Ersterstellung OS 29.07.96
-|* Letzte Aenderung OS 29.07.96
-|*
-******************************************************************************/
-
void ViewShell::SetUIOptions( const SwViewOption &rOpt )
{
pOpt->SetUIOptions(rOpt);
@@ -2392,24 +2009,10 @@ void ViewShell::SetUIOptions( const SwViewOption &rOpt )
pOpt->SetSymbolFont(rOpt.GetSymbolFont());
}
-/******************************************************************************
-|*
-|* ViewShell::SetReadonly()
-|*
-|* Ersterstellung OS 05.09.96
-|* Letzte Aenderung MA 12. Feb. 97
-|*
-******************************************************************************/
-
void ViewShell::SetReadonlyOption(sal_Bool bSet)
{
- //JP 01.02.99: bei ReadOnly Flag richtig abfragen und ggfs. neu
- // formatieren; Bug 61335
-
- // Schalten wir gerade von Readonly auf Bearbeiten um?
if( bSet != pOpt->IsReadonly() )
{
- // damit die Flags richtig erfragt werden koennen.
pOpt->SetReadonly( sal_False );
sal_Bool bReformat = pOpt->IsFldName();
@@ -2430,9 +2033,7 @@ void ViewShell::SetReadonlyOption(sal_Bool bSet)
Imp()->InvalidateAccessibleEditableState( sal_False );
}
}
-/* -----------------28.08.2003 15:45-----------------
- --------------------------------------------------*/
void ViewShell::SetPDFExportOption(sal_Bool bSet)
{
if( bSet != pOpt->IsPDFExport() )
@@ -2443,9 +2044,7 @@ void ViewShell::SetPDFExportOption(sal_Bool bSet)
pOpt->SetPDFExport(bSet);
}
}
-/* -----------------------------2002/07/31 17:06------------------------------
- ---------------------------------------------------------------------------*/
void ViewShell::SetReadonlySelectionOption(sal_Bool bSet)
{
if( bSet != pOpt->IsSelectionInReadonly() )
@@ -2453,30 +2052,12 @@ void ViewShell::SetReadonlySelectionOption(sal_Bool bSet)
pOpt->SetSelectionInReadonly(bSet);
}
}
-/******************************************************************************
-|*
-|* ViewShell::SetPrtFormatOption()
-|*
-|* Ersterstellung AMA 10. Sep. 97
-|* Letzte Aenderung AMA 10. Sep. 97
-|*
-******************************************************************************/
void ViewShell::SetPrtFormatOption( sal_Bool bSet )
{
pOpt->SetPrtFormat( bSet );
}
-/******************************************************************************
-|*
-|* ViewShell::UISizeNotify()
-|*
-|* Ersterstellung MA 14. Jan. 97
-|* Letzte Aenderung MA 14. Jan. 97
-|*
-******************************************************************************/
-
-
void ViewShell::UISizeNotify()
{
if ( bDocSizeChgd )
@@ -2512,8 +2093,8 @@ uno::Reference< ::com::sun::star::accessibility::XAccessible > ViewShell::Create
SwDoc *pMyDoc = GetDoc();
// We require a layout and an XModel to be accessible.
- ASSERT( pMyDoc->GetRootFrm(), "no layout, no access" );
- ASSERT( GetWin(), "no window, no access" );
+ OSL_ENSURE( pMyDoc->GetRootFrm(), "no layout, no access" );
+ OSL_ENSURE( GetWin(), "no window, no access" );
if( pMyDoc->GetRootFrm() && GetWin() )
xAcc = Imp()->GetAccessibleMap().GetDocumentView();
@@ -2528,13 +2109,11 @@ ViewShell::CreateAccessiblePreview()
"Can't create accessible preview for non-preview ViewShell" );
// We require a layout and an XModel to be accessible.
- ASSERT( pDoc->GetRootFrm(), "no layout, no access" );
- ASSERT( GetWin(), "no window, no access" );
+ OSL_ENSURE( pDoc->GetRootFrm(), "no layout, no access" );
+ OSL_ENSURE( GetWin(), "no window, no access" );
- // OD 15.01.2003 #103492# - add condition <IsPreView()>
if ( IsPreView() && pDoc->GetRootFrm() && GetWin() )
{
- // OD 14.01.2003 #103492# - adjustment for new method signature
return Imp()->GetAccessibleMap().GetDocumentPreview(
PagePreviewLayout()->maPrevwPages,
GetWin()->GetMapMode().GetScaleX(),
@@ -2550,12 +2129,7 @@ void ViewShell::InvalidateAccessibleFocus()
Imp()->GetAccessibleMap().InvalidateFocus();
}
-/** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
-
- OD 2005-12-01 #i27138#
-
- @author OD
-*/
+// #i27138# invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
void ViewShell::InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
const SwTxtFrm* _pToTxtFrm )
{
@@ -2565,12 +2139,7 @@ void ViewShell::InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtF
}
}
-/** invalidate text selection for paragraphs
-
- OD 2005-12-12 #i27301#
-
- @author OD
-*/
+// #i27301# invalidate text selection for paragraphs
void ViewShell::InvalidateAccessibleParaTextSelection()
{
if ( GetLayout() && GetLayout()->IsAnyShellAccessible() )
@@ -2579,12 +2148,7 @@ void ViewShell::InvalidateAccessibleParaTextSelection()
}
}
-/** invalidate attributes for paragraphs
-
- OD 2009-01-06 #i88069#
-
- @author OD
-*/
+// #i88069# invalidate attributes for paragraphs
void ViewShell::InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
{
if ( GetLayout() && GetLayout()->IsAnyShellAccessible() )
@@ -2602,9 +2166,6 @@ SwAccessibleMap* ViewShell::GetAccessibleMap()
return 0;
}
-/* -----------------------------06.05.2002 13:23------------------------------
-
- ---------------------------------------------------------------------------*/
void ViewShell::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions)
{
if(pOpt->IsPagePreview() && !rAccessibilityOptions.GetIsForPagePreviews())
@@ -2619,7 +2180,7 @@ void ViewShell::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibility
pAccOptions->SetStopAnimatedGraphics(! rAccessibilityOptions.GetIsAllowAnimatedGraphics());
pAccOptions->SetStopAnimatedText(! rAccessibilityOptions.GetIsAllowAnimatedText());
- // --> FME 2004-06-29 #114856# Formular view
+ // Formular view
// Always set this option, not only if document is read-only:
pOpt->SetSelectionInReadonly(rAccessibilityOptions.IsSelectionInReadonly());
}
@@ -2636,22 +2197,21 @@ void ViewShell::SetCareWin( Window* pNew )
}
-// --> FME 2004-06-15 #i12836# enhanced pdf export
+// #i12836# enhanced pdf export
sal_Int32 ViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const
{
- ASSERT( GetLayout(), "GetPageNumAndSetOffsetForPDF assumes presence of layout" )
+ OSL_ENSURE( GetLayout(), "GetPageNumAndSetOffsetForPDF assumes presence of layout" );
sal_Int32 nRet = -1;
- // --> FME 2005-01-07 #i40059# Position out of bounds:
+ // #i40059# Position out of bounds
SwRect aRect( rRect );
aRect.Pos().X() = Max( aRect.Left(), GetLayout()->Frm().Left() );
- // <--
const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aRect.Center() );
if ( pPage )
{
- ASSERT( pPage, "GetPageNumAndSetOffsetForPDF: No page found" )
+ OSL_ENSURE( pPage, "GetPageNumAndSetOffsetForPDF: No page found" );
Point aOffset( pPage->Frm().Pos() );
aOffset.X() = -aOffset.X();
@@ -2666,32 +2226,25 @@ sal_Int32 ViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwR
return nRet;
}
-// <--
-// --> PB 2007-05-30 #146850#
const BitmapEx& ViewShell::GetReplacementBitmap( bool bIsErrorState )
{
BitmapEx** ppRet;
- sal_uInt16 nResId = 0, nHCResId = 0;
+ sal_uInt16 nResId = 0;
if( bIsErrorState )
{
ppRet = &pErrorBmp;
nResId = RID_GRAPHIC_ERRORBMP;
- nHCResId = RID_GRAPHIC_ERRORBMP_HC;
}
else
{
ppRet = &pReplaceBmp;
nResId = RID_GRAPHIC_REPLACEBMP;
- nHCResId = RID_GRAPHIC_REPLACEBMP_HC;
}
if( !*ppRet )
{
- sal_uInt16 nBmpResId =
- Application::GetSettings().GetStyleSettings().GetHighContrastMode()
- ? nHCResId : nResId;
- *ppRet = new BitmapEx( SW_RES( nBmpResId ) );
+ *ppRet = new BitmapEx( SW_RES( nResId ) );
}
return **ppRet;
}
@@ -2701,7 +2254,6 @@ void ViewShell::DeleteReplacementBitmaps()
DELETEZ( pErrorBmp );
DELETEZ( pReplaceBmp );
}
-// <--
SwPostItMgr* ViewShell::GetPostItMgr()
{
@@ -2737,7 +2289,7 @@ IDocumentUndoRedo & ViewShell::GetIDocumentUndoRedo()
IDocumentUndoRedo const& ViewShell::GetIDocumentUndoRedo() const
{ return pDoc->GetIDocumentUndoRedo(); }
-// --> OD 2007-11-14 #i83479#
+// #i83479#
const IDocumentListItems* ViewShell::getIDocumentListItemsAccess() const
{
return pDoc;
@@ -2746,4 +2298,5 @@ const IDocumentOutlineNodes* ViewShell::getIDocumentOutlineNodesAccess() const
{
return pDoc;
}
-// <--
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index bc454c4b0e7b..56ab8dd12671 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,48 +39,31 @@
#include <rootfrm.hxx>
#include <viewimp.hxx>
#include <viewopt.hxx>
-#include <txtfrm.hxx> // Zugriff auf TxtCache
+#include <txtfrm.hxx>
#include <notxtfrm.hxx>
#include <fntcache.hxx>
#include <docufld.hxx>
#include <ptqueue.hxx>
-#include <dview.hxx> // SdrView
+#include <dview.hxx>
#include <ndgrf.hxx>
#include <ndindex.hxx>
#include <accessibilityoptions.hxx>
-
-/*************************************************************************
-|*
-|* ViewShell::Init()
-|*
-|* Letzte Aenderung MA 14. Jun. 96
-|*
-|*************************************************************************/
-
void ViewShell::Init( const SwViewOption *pNewOpt )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "ViewShell::Init" );
bDocSizeChgd = sal_False;
- // Wir gehen auf Nummer sicher:
- // Wir muessen die alten Fontinformationen wegschmeissen,
- // wenn die Druckeraufloesung oder der Zoomfaktor sich aendert.
- // Init() und Reformat() sind die sichersten Stellen.
pFntCache->Flush( );
- // ViewOptions werden dynamisch angelegt
if( !pOpt )
{
pOpt = new SwViewOption;
- // Ein ApplyViewOptions braucht nicht gerufen zu werden
if( pNewOpt )
{
*pOpt = *pNewOpt;
- // Der Zoomfaktor muss eingestellt werden, weil in der CTOR-
- // phase aus Performancegruenden kein ApplyViewOptions gerufen wird.
if( GetWin() && 100 != pOpt->GetZoom() )
{
MapMode aMode( pWin->GetMapMode() );
@@ -94,35 +78,27 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
SwDocShell* pDShell = pDoc->GetDocShell();
pDoc->set(IDocumentSettingAccess::HTML_MODE, 0 != ::GetHtmlMode( pDShell ) );
- // JP 02.02.99: Bug 61335 - Readonly-Flag an den ViewOptions setzen,
- // bevor das Layout angelegt wird. Ansonsten muesste man
- // nochmals durchformatieren!!
if( pDShell && pDShell->IsReadOnly() )
pOpt->SetReadonly( sal_True );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "View::Init - before InitPrt" );
- // --> FME 2007-11-06 #i82967#
+ // #i82967#
OutputDevice* pPDFOut = 0;
+
if ( pOut && pOut->GetPDFWriter() )
pPDFOut = pOut;
- // <--
-
- // --> FME 2005-01-21 #i41075#
- // Only setup the printer if we need one:
+ // #i41075# Only setup the printer if we need one:
const IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
const bool bBrowseMode = pIDSA->get(IDocumentSettingAccess::BROWSE_MODE);
if( pPDFOut )
InitPrt( pPDFOut );
- // <--
-
- // --> FME 2005-03-16 #i44963# Good occasion to check if page sizes in
- // page descriptions are still set to (LONG_MAX, LONG_MAX) (html import)
+ // #i44963# Good occasion to check if page sizes in page descriptions
+ // are still set to (LONG_MAX, LONG_MAX) (html import)
if ( !bBrowseMode )
{
pDoc->CheckDefaultPageFmt();
}
- // <--
RTL_LOGFILE_CONTEXT_TRACE( aLog, "View::Init - after InitPrt" );
@@ -141,7 +117,7 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
SizeChgNotify();
- // --> #i31958#
+ // #i31958#
// XForms mode: initialize XForms mode, based on design mode (draw view)
// MakeDrawView() requires layout
if( GetDoc()->isXForms() )
@@ -150,17 +126,8 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
MakeDrawView();
pOpt->SetFormView( ! GetDrawView()->IsDesignMode() );
}
- // <-- #i31958#
}
-/*************************************************************************
-|*
-|* ViewShell::ViewShell() CTor fuer die erste Shell.
-|*
-|* Letzte Aenderung MA 29. Aug. 95
-|*
-|*************************************************************************/
-
ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
const SwViewOption *pNewOpt, OutputDevice *pOutput,
long nFlags )
@@ -175,18 +142,18 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
mpTmpRef( 0 ),
pOpt( 0 ),
pAccOptions( new SwAccessibilityOptions ),
- mpTargetPaintWindow(0), // #i74769#
- mpBufferedOut(0), // #i74769#
+ mpTargetPaintWindow(0),
+ mpBufferedOut(0),
pDoc( &rDocument ),
nStartAction( 0 ),
nLockPaint( 0 ),
- mnPrePostPaintCount(0L), // #i72754#
- mpPrePostOutDev(0), // #i72754#
+ mnPrePostPaintCount(0L),
+ mpPrePostOutDev(0),
maPrePostMapMode()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "ViewShell::SwViewShell" );
- // OD 2004-06-01 #i26791# - in order to suppress event handling in
+ // #i26791# in order to suppress event handling in
// <SwDrawContact::Changed> during contruction of <ViewShell> instance
mbInConstructor = true;
@@ -195,20 +162,17 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
bPaintWorks = bEnableSmooth = sal_True;
bPreView = 0 !=( VSHELLFLAG_ISPREVIEW & nFlags );
- // --> OD 2005-02-11 #i38810# - Do not reset modified state of document,
- // if it's already been modified.
+ // #i38810# Do not reset modified state of document, if it's already been modified.
const bool bIsDocModified( pDoc->IsModified() );
// <--
pDoc->acquire();
pOutput = pOut;
- Init( pNewOpt ); //verstellt ggf. das Outdev (InitPrt())
+ Init( pNewOpt );
pOut = pOutput;
- // OD 28.03.2003 #108470# - initialize print preview layout after layout
- // is created in <ViewShell::Init(..)> - called above.
+ // initialize print preview layout after layout is created in <ViewShell::Init(..)> - called above.
if ( bPreView )
{
- // OD 12.12.2002 #103492# - init page preview layout
pImp->InitPagePreviewLayout();
}
@@ -217,33 +181,22 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
((SwHiddenTxtFieldType*)pDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
SetHiddenFlag( !pOpt->IsShowHiddenField() );
- //In Init wird ein Standard-FrmFmt angelegt.
- // --> OD 2005-02-11 #i38810#
+ // #i38810#
if ( !pDoc->GetIDocumentUndoRedo().IsUndoNoResetModified()
&& !bIsDocModified )
- // <--
{
pDoc->ResetModified();
}
- //Format-Cache erweitern.
if ( SwTxtFrm::GetTxtCache()->GetCurMax() < 2550 )
SwTxtFrm::GetTxtCache()->IncreaseMax( 100 );
if( pOpt->IsGridVisible() || getIDocumentDrawModelAccess()->GetDrawModel() )
Imp()->MakeDrawView();
- // OD 2004-06-01 #i26791#
+ // #i26791#
mbInConstructor = false;
}
-/*************************************************************************
-|*
-|* ViewShell::ViewShell() CTor fuer weitere Shells auf ein Dokument.
-|*
-|* Letzte Aenderung MA 29. Aug. 95
-|*
-|*************************************************************************/
-
ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
OutputDevice *pOutput, long nFlags ) :
Ring( &rShell ),
@@ -257,18 +210,18 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
mpTmpRef( 0 ),
pOpt( 0 ),
pAccOptions( new SwAccessibilityOptions ),
- mpTargetPaintWindow(0), // #i74769#
- mpBufferedOut(0), // #i74769#
+ mpTargetPaintWindow(0),
+ mpBufferedOut(0),
pDoc( rShell.GetDoc() ),
nStartAction( 0 ),
nLockPaint( 0 ),
- mnPrePostPaintCount(0L), // #i72754#
- mpPrePostOutDev(0), // #i72754#
+ mnPrePostPaintCount(0L),
+ mpPrePostOutDev(0),
maPrePostMapMode()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "ViewShell::SwViewShell" );
- // OD 2004-06-01 #i26791# - in order to suppress event handling in
+ // #i26791# in order to suppress event handling in
// <SwDrawContact::Changed> during contruction of <ViewShell> instance
mbInConstructor = true;
@@ -276,7 +229,7 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
bPaintInProgress = bViewLocked = bInEndAction = bFrameView =
bEndActionByVirDev = sal_False;
bPreView = 0 !=( VSHELLFLAG_ISPREVIEW & nFlags );
- // OD 12.12.2002 #103492#
+
if ( bPreView )
pImp->InitPagePreviewLayout();
@@ -286,45 +239,34 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
sal_Bool bModified = pDoc->IsModified();
pOutput = pOut;
- Init( rShell.GetViewOptions() ); //verstellt ggf. das Outdev (InitPrt())
+ Init( rShell.GetViewOptions() );
pOut = pOutput;
((SwHiddenTxtFieldType*)pDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
SetHiddenFlag( !pOpt->IsShowHiddenField() );
- // in Init wird ein Standard-FrmFmt angelegt
if( !bModified && !pDoc->GetIDocumentUndoRedo().IsUndoNoResetModified() )
{
pDoc->ResetModified();
}
- //Format-Cache erweitern.
if ( SwTxtFrm::GetTxtCache()->GetCurMax() < 2550 )
SwTxtFrm::GetTxtCache()->IncreaseMax( 100 );
if( pOpt->IsGridVisible() || getIDocumentDrawModelAccess()->GetDrawModel() )
Imp()->MakeDrawView();
- // OD 2004-06-01 #i26791#
+ // #i26791#
mbInConstructor = false;
}
-/******************************************************************************
-|*
-|* ViewShell::~ViewShell()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 10. May. 95
-|*
-******************************************************************************/
-
ViewShell::~ViewShell()
{
{
SET_CURR_SHELL( this );
bPaintWorks = sal_False;
- // FME 2004-06-21 #i9684# Stopping the animated graphics is not
+ // #i9684#Stopping the animated graphics is not
// necessary during printing or pdf export, because the animation
// has not been started in this case.
if( pDoc && GetWin() )
@@ -345,7 +287,7 @@ ViewShell::~ViewShell()
for( SwFrm* pFrm = (SwFrm*)aIter.First( TYPE(SwFrm) );
pFrm; pFrm = (SwFrm*)aIter.Next() )
{
- ASSERT( pFrm->IsNoTxtFrm(), "GraphicNode with Text?" );
+ OSL_ENSURE( pFrm->IsNoTxtFrm(), "GraphicNode with Text?" );
((SwNoTxtFrm*)pFrm)->StopAnimation( pOut );
}
}
@@ -356,7 +298,7 @@ ViewShell::~ViewShell()
GetDoc()->StopNumRuleAnimations( pOut );
}
- delete pImp; //Erst loeschen, damit die LayoutViews vernichtet werden.
+ delete pImp;
pImp = 0; // Set to zero, because ~SwFrm relies on it.
if ( pDoc )
@@ -369,14 +311,12 @@ ViewShell::~ViewShell()
delete pOpt;
- //Format-Cache zurueckschrauben.
if ( SwTxtFrm::GetTxtCache()->GetCurMax() > 250 )
SwTxtFrm::GetTxtCache()->DecreaseMax( 100 );
- //Ggf. aus der PaintQueue entfernen lassen
SwPaintQueue::Remove( this );
- ASSERT( !nStartAction, "EndAction() pending." );
+ OSL_ENSURE( !nStartAction, "EndAction() pending." );
}
if ( pDoc )
@@ -407,3 +347,5 @@ SdrView* ViewShell::GetDrawViewWithValidMarkList()
pDView->ValidateMarkList();
return pDView;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 74cbdf946800..ad2f92b9c1f6 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/**************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,6 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Any.hxx>
-#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/view/XRenderable.hpp>
#include <hintids.hxx>
@@ -74,21 +74,19 @@
#include <viewopt.hxx>
#include <printdata.hxx> // SwPrintData
#include <pagedesc.hxx>
-#include <poolfmt.hxx> // fuer RES_POOLPAGE_JAKET
-#include <mdiexp.hxx> // Ansteuern der Statusleiste
-#include <statstr.hrc> // -- " --
+#include <poolfmt.hxx>
+#include <mdiexp.hxx>
+#include <statstr.hrc>
#include <ptqueue.hxx>
#include <tabfrm.hxx>
-#include <txtfrm.hxx> // MinPrtLine
-#include <viscrs.hxx> // SwShellCrsr
+#include <txtfrm.hxx> // MinPrtLine
+#include <viscrs.hxx> // SwShellCrsr
#include <fmtpdsc.hxx> // SwFmtPageDesc
#include <globals.hrc>
using namespace ::com::sun::star;
-//--------------------------------------------------------------------
-//Klasse zum Puffern von Paints
class SwQueuedPaint
{
public:
@@ -194,16 +192,9 @@ void SwPaintQueue::Remove( ViewShell *pSh )
}
}
-/******************************************************************************
- * Methode : void SetSwVisArea( ViewShell *pSh, Point aPrtOffset, ...
- * Beschreibung:
- * Erstellt : OK 04.11.94 16:27
- * Aenderung :
- ******************************************************************************/
-
void SetSwVisArea( ViewShell *pSh, const SwRect &rRect, sal_Bool /*bPDFExport*/ )
{
- ASSERT( !pSh->GetWin(), "Drucken mit Window?" );
+ OSL_ENSURE( !pSh->GetWin(), "Drucken mit Window?" );
pSh->aVisArea = rRect;
pSh->Imp()->SetFirstVisPageInvalid();
Point aPt( rRect.Pos() );
@@ -248,16 +239,9 @@ void ViewShell::InitPrt( OutputDevice *pOutDev )
pOut = pOutDev; //Oder was sonst?
}
-/******************************************************************************
- * Methode : void ViewShell::ChgAllPageOrientation
- * Erstellt : MA 08. Aug. 95
- * Aenderung :
- ******************************************************************************/
-
-
void ViewShell::ChgAllPageOrientation( sal_uInt16 eOri )
{
- ASSERT( nStartAction, "missing an Action" );
+ OSL_ENSURE( nStartAction, "missing an Action" );
SET_CURR_SHELL( this );
sal_uInt16 nAll = GetDoc()->GetPageDescCnt();
@@ -278,10 +262,6 @@ void ViewShell::ChgAllPageOrientation( sal_uInt16 eOri )
aNew.SetLandscape( bNewOri );
SwFrmFmt& rFmt = aNew.GetMaster();
SwFmtFrmSize aSz( rFmt.GetFrmSize() );
- // Groesse anpassen.
- // PORTRAIT -> Hoeher als Breit
- // LANDSCAPE -> Breiter als Hoch
- // Hoehe ist die VarSize, Breite ist die FixSize (per Def.)
if( bNewOri ? aSz.GetHeight() > aSz.GetWidth()
: aSz.GetHeight() < aSz.GetWidth() )
{
@@ -295,16 +275,9 @@ void ViewShell::ChgAllPageOrientation( sal_uInt16 eOri )
}
}
-/******************************************************************************
- * Methode : void ViewShell::ChgAllPageOrientation
- * Erstellt : MA 08. Aug. 95
- * Aenderung :
- ******************************************************************************/
-
-
void ViewShell::ChgAllPageSize( Size &rSz )
{
- ASSERT( nStartAction, "missing an Action" );
+ OSL_ENSURE( nStartAction, "missing an Action" );
SET_CURR_SHELL( this );
SwDoc* pMyDoc = GetDoc();
@@ -342,7 +315,6 @@ void ViewShell::CalcPagesForPrint( sal_uInt16 nMax )
SET_CURR_SHELL( this );
SwRootFrm* pLayout = GetLayout();
- // sal_uLong nStatMax = pLayout->GetPageNum();
const SwFrm *pPage = pLayout->Lower();
SwLayAction aAction( pLayout, Imp() );
@@ -361,9 +333,9 @@ void ViewShell::CalcPagesForPrint( sal_uInt16 nMax )
aAction.Action();
- aVisArea = aOldVis; //Zuruecksetzen wg. der Paints!
+ aVisArea = aOldVis;
Imp()->SetFirstVisPageInvalid();
-// SwPaintQueue::Repaint();
+
}
pLayout->EndAllAction();
}
@@ -372,17 +344,12 @@ void ViewShell::CalcPagesForPrint( sal_uInt16 nMax )
SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
{
- ASSERT( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
+ OSL_ENSURE( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
SwFEShell* pFESh = (SwFEShell*)this;
- // Wir bauen uns ein neues Dokument
-// SwDoc *pPrtDoc = new SwDoc;
-// pPrtDoc->acquire();
-// pPrtDoc->SetRefForDocShell( (SvEmbeddedObjectRef*)&(long&)rDocShellRef );
pPrtDoc->LockExpFlds();
- // Der Drucker wird uebernommen
- //! Make a copy of it since it gets destroyed with the temporary document
- //! used for PDF export
+ // Make a copy of it since it gets destroyed with the temporary document
+ // used for PDF export
if (pPrt)
pPrtDoc->setPrinter( new SfxPrinter(*pPrt), true, true );
@@ -392,19 +359,15 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
if( 0 != ( pCpyItem = rPool.GetPoolDefaultItem( nWh ) ) )
pPrtDoc->GetAttrPool().SetPoolDefaultItem( *pCpyItem );
- // JP 29.07.99 - Bug 67951 - set all Styles from the SourceDoc into
- // the PrintDoc - will be replaced!
pPrtDoc->ReplaceStyles( *GetDoc() );
SwShellCrsr *pActCrsr = pFESh->_GetCrsr();
SwShellCrsr *pFirstCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetNext());
- if( !pActCrsr->HasMark() ) // bei Multiselektion kann der aktuelle Cursor leer sein
+ if( !pActCrsr->HasMark() )
{
pActCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetPrev());
}
- // Die Y-Position der ersten Selektion
- // Die Y-Position der ersten Selektion
Point aSelPoint;
if( pFESh->IsTableMode() )
{
@@ -426,33 +389,28 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
}
const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint );
- ASSERT( pPage, "no page found!" );
+ 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() )
- { // 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 );
}
- // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
-//REMOVE // if( aDocShellRef.Is() )
-//REMOVE // SwDataExchange::InitOle( aDocShellRef, pPrtDoc );
- // und fuellen es mit dem selektierten Bereich
pFESh->Copy( pPrtDoc );
- //Jetzt noch am ersten Absatz die Seitenvorlage setzen
{
SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
- SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx ); // gehe zum 1. ContentNode
+ SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx );
if( pFESh->IsTableMode() )
{
SwTableNode* pTNd = pCNd->FindTableNode();
@@ -469,7 +427,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 );
}
@@ -485,9 +443,6 @@ sal_Bool ViewShell::PrintOrPDFExport(
SwPrintData const& rPrintData,
sal_Int32 nRenderer /* the index in the vector of pages to be printed */ )
{
-//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-//Immer die Druckroutinen in viewpg.cxx (PrintProspect) mitpflegen!!
-//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
const sal_Int32 nMaxRenderer = rPrintData.GetRenderData().GetPagesToPrint().size() - 1;
#if OSL_DEBUG_LEVEL > 1
@@ -500,7 +455,6 @@ sal_Bool ViewShell::PrintOrPDFExport(
// output device is now provided by a call from outside the Writer)
pOutDev->Push();
- // eine neue Shell fuer den Printer erzeugen
ViewShell *pShell;
SwDoc *pOutDevDoc;
@@ -520,12 +474,10 @@ sal_Bool ViewShell::PrintOrPDFExport(
pDrawView->SetBufferedOverlayAllowed( false );
}
- { //Zusaetzlicher Scope, damit die CurrShell vor dem zerstoeren der
- //Shell zurueckgesetzt wird.
-
+ {
SET_CURR_SHELL( pShell );
- //JP 01.02.99: das ReadOnly Flag wird NIE mitkopiert; Bug 61335
+
if( pOpt->IsReadonly() )
pShell->pOpt->SetReadonly( sal_True );
@@ -563,7 +515,6 @@ sal_Bool ViewShell::PrintOrPDFExport(
// FIXME disabled because rPrintData.aOffset is always (0,0)
#if 0
- // wenn wir einen Umschlag drucken wird ein Offset beachtet
if( pStPage->GetFmt()->GetPoolFmtId() == RES_POOLPAGE_JAKET )
{
Point aNewOrigin = pOutDev->GetMapMode().GetOrigin();
@@ -583,7 +534,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
pStPage->GetUpper()->Paint( pStPage->Frm(), &rPrintData );
SwPaintQueue::Repaint();
- } //Zus. Scope wg. CurShell!
+ }
delete pShell;
@@ -594,21 +545,9 @@ sal_Bool ViewShell::PrintOrPDFExport(
return sal_True;
}
-/******************************************************************************
- * Methode : PrtOle2()
- * Beschreibung:
- * Erstellt : PK 07.12.94
- * Aenderung : MA 16. Feb. 95
- ******************************************************************************/
-
-
-
void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
OutputDevice* pOleOut, const Rectangle& rRect )
{
- //Wir brauchen eine Shell fuer das Drucken. Entweder hat das Doc schon
- //eine, dann legen wir uns eine neue Sicht an, oder das Doc hat noch
- //keine, dann erzeugen wir die erste Sicht.
ViewShell *pSh;
if( pDoc->GetRootFrm() && pDoc->GetRootFrm()->GetCurrShell() )
pSh = new ViewShell( *pDoc->GetRootFrm()->GetCurrShell(), 0, pOleOut );
@@ -630,7 +569,6 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
pDoc->GetRootFrm()->Lower()->InvalidateSize();
}
- // --> FME 2005-02-10 #119474#
// CalcPagesForPrint() should not be necessary here. The pages in the
// visible area will be formatted in SwRootFrm::Paint().
// Removing this gives us a performance gain during saving the
@@ -638,29 +576,16 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
// formatting of the document.
// Seiten fuers Drucken formatieren
// pSh->CalcPagesForPrint( SHRT_MAX );
- // <--
-
- //#39275# jetzt will der Meyer doch ein Clipping
pOleOut->Push( PUSH_CLIPREGION );
pOleOut->IntersectClipRegion( aSwRect.SVRect() );
pSh->GetLayout()->Paint( aSwRect );
-// SFX_APP()->SpoilDemoOutput( *pOleOut, rRect );
+
pOleOut->Pop();
- // erst muss das CurrShell Object zerstoert werden!!
}
delete pSh;
}
-/******************************************************************************
- * Methode : IsAnyFieldInDoc()
- * Beschreibung: Stellt fest, ob im DocNodesArray Felder verankert sind
- * Erstellt : JP 27.07.95
- * Aenderung : JP 10.12.97
- ******************************************************************************/
-
-
-
sal_Bool ViewShell::IsAnyFieldInDoc() const
{
const SfxPoolItem* pItem;
@@ -670,7 +595,7 @@ sal_Bool ViewShell::IsAnyFieldInDoc() const
{
const SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
- //#i101026# mod: do not include postits in field check
+ //#i101026# do not include postits in field check
const SwField* pFld = pFmtFld->GetFld();
if( pTxtFld && pTxtFld->GetTxtNode().GetNodes().IsDocNodes() && (pFld->Which() != RES_POSTITFLD))
return sal_True;
@@ -678,14 +603,6 @@ sal_Bool ViewShell::IsAnyFieldInDoc() const
return sal_False;
}
-
-
-/******************************************************************************
- * SwDrawViewSave
- *
- * Saves some settings at the draw view
- ******************************************************************************/
-
SwDrawViewSave::SwDrawViewSave( SdrView* pSdrView )
: pDV( pSdrView )
{
@@ -705,10 +622,9 @@ SwDrawViewSave::~SwDrawViewSave()
}
-// OD 09.01.2003 #i6467# - method also called for page preview
+// #i6467# - method also called for page preview
void ViewShell::PrepareForPrint( const SwPrintData &rOptions )
{
- // Viewoptions fuer den Drucker setzen
pOpt->SetGraphic ( sal_True == rOptions.bPrintGraphic );
pOpt->SetTable ( sal_True == rOptions.bPrintTable );
pOpt->SetDraw ( sal_True == rOptions.bPrintDraw );
@@ -721,7 +637,7 @@ void ViewShell::PrepareForPrint( const SwPrintData &rOptions )
SdrView *pDrawView = GetDrawView();
String sLayerNm;
sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("Controls" ));
- // OD 09.01.2003 #i6467# - consider, if view shell belongs to page preview
+ // #i6467# - consider, if view shell belongs to page preview
if ( !IsPreView() )
{
pDrawView->SetLayerPrintable( sLayerNm, rOptions.bPrintControl );
@@ -733,3 +649,4 @@ void ViewShell::PrepareForPrint( const SwPrintData &rOptions )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index 590a63ea915f..9142689b1c87 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -225,3 +226,4 @@ SwNodeFnTab aASCNodeFnTab = {
/* RES_OLENODE */ 0
};
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index b2e46cef10f9..fd4ab7226e1a 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,8 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
#include <tools/stream.hxx>
#include <hintids.hxx>
@@ -48,9 +47,7 @@
#include <pagedesc.hxx>
#include <breakit.hxx>
#include <swerror.h>
-#ifndef _STATSTR_HRC
#include <statstr.hrc> // ResId fuer Statusleiste
-#endif
#include <mdiexp.hxx> // ...Percent()
#include <poolfmt.hxx>
@@ -87,13 +84,12 @@ sal_uLong AsciiReader::Read( SwDoc &rDoc, const String&, SwPaM &rPam, const Stri
{
if( !pStrm )
{
- ASSERT( !this, "ASCII-Read ohne Stream" );
+ OSL_ENSURE( !this, "ASCII-Read ohne Stream" );
return ERR_SWG_READ_ERROR;
}
- //JP 18.01.96: Alle Ueberschriften sind normalerweise ohne
- // Kapitelnummer. Darum hier explizit abschalten
- // weil das Default jetzt wieder auf AN ist.
+ // Alle Ueberschriften sind normalerweise ohne Kapitelnummer.
+ // Darum hier explizit abschalten weil das Default jetzt wieder auf AN ist.
if( !bInsertMode )
Reader::SetNoOutlineNum( rDoc );
@@ -109,7 +105,8 @@ sal_uLong AsciiReader::Read( SwDoc &rDoc, const String&, SwPaM &rPam, const Stri
SwASCIIParser::SwASCIIParser(SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
int bReadNewDoc, const SwAsciiOptions& rOpts)
- : pDoc(pD), rInput(rIn), rOpt(rOpts), nScript(0), bNewDoc(bReadNewDoc)
+ : pDoc(pD), rInput(rIn), rOpt(rOpts), nFileSize(0), nScript(0)
+ , bNewDoc(bReadNewDoc)
{
pPam = new SwPaM( *rCrsr.GetPoint() );
pArr = new sal_Char [ ASC_BUFFLEN + 2 ];
@@ -249,7 +246,7 @@ sal_uLong SwASCIIParser::CallParser()
pInsPam->GetCntntNode(), nSttCntnt );
// !!!!!
- ASSERT( !this, "Have to change - hard attr. to para. style" );
+ OSL_ENSURE( !this, "Have to change - hard attr. to para. style" );
pDoc->InsertItemSet( *pInsPam, *pItemSet, 0 );
}
}
@@ -282,7 +279,7 @@ sal_uLong SwASCIIParser::ReadChars()
nOrig = nLen = rInput.Read(pArr, ASC_BUFFLEN);
CharSet eCharSet;
bool bRet = SwIoSystem::IsDetectableText(pArr, nLen, &eCharSet, &bSwapUnicode);
- ASSERT(bRet, "Autodetect of text import without nag dialog must "
+ OSL_ENSURE(bRet, "Autodetect of text import without nag dialog must "
"have failed");
if (bRet && eCharSet != RTL_TEXTENCODING_DONTKNOW)
{
@@ -302,7 +299,7 @@ sal_uLong SwASCIIParser::ReadChars()
if( currentCharSet == RTL_TEXTENCODING_DONTKNOW )
currentCharSet = RTL_TEXTENCODING_ASCII_US;
hConverter = rtl_createTextToUnicodeConverter( currentCharSet );
- ASSERT( hConverter, "no string convert avaiable" );
+ OSL_ENSURE( hConverter, "no string convert avaiable" );
if (!hConverter)
return ERROR_SW_READ_BASE;
bSwapUnicode = false;
@@ -331,7 +328,6 @@ sal_uLong SwASCIIParser::ReadChars()
break; // aus der WHILE-Schleife heraus
/*
- #98380#
If there was some unconverted bytes on the last cycle then they
were put at the beginning of the array, so total bytes available
to convert this cycle includes them. If we found 0 following bytes
@@ -390,7 +386,7 @@ sal_uLong SwASCIIParser::ReadChars()
pLastStt = ++pStt;
cLastCR = 0;
nLineLen = 0;
- // JP 03.04.96: das letze am Ende nehmen wir nicht
+ // das letze am Ende nehmen wir nicht
if( !rInput.IsEof() || !(pEnd == pStt ||
( !*pEnd && pEnd == pStt+1 ) ) )
pDoc->SplitNode( *pPam->GetPoint(), false );
@@ -400,12 +396,6 @@ sal_uLong SwASCIIParser::ReadChars()
bool bIns = true, bSplitNode = false;
switch( *pStt )
{
-//JP 12.11.2001: task 94636 - don't ignore all behind the zero character,
-// change it to the default "control character"
-// case 0:
-// pEnd = pStt;
-// bIns = false ;
-// break;
case 0x0a: if( LINEEND_LF == pUseMe->GetParaFlags() )
{
@@ -413,7 +403,7 @@ sal_uLong SwASCIIParser::ReadChars()
*pStt = 0;
++pStt;
- // JP 03.04.96: das letze am Ende nehmen wir nicht
+ // das letze am Ende nehmen wir nicht
if( !rInput.IsEof() || pEnd != pStt )
bSplitNode = true;
}
@@ -439,7 +429,7 @@ sal_uLong SwASCIIParser::ReadChars()
else
bChkSplit = true;
- // JP 03.04.96: das letze am Ende nehmen wir nicht
+ // das letze am Ende nehmen wir nicht
if( bChkSplit && ( !rInput.IsEof() || pEnd != pStt ))
bSplitNode = true;
}
@@ -451,8 +441,6 @@ sal_uLong SwASCIIParser::ReadChars()
*pStt++ = 0;
if( nLineLen )
{
- // Change to charset system!!!!
- //rOpt.GetCharSet();
InsertText( String( pLastStt ));
}
pDoc->SplitNode( *pPam->GetPoint(), false );
@@ -524,4 +512,4 @@ void SwASCIIParser::InsertText( const String& rStr )
nScript |= pBreakIt->GetAllScriptsOfText( rStr );
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx
index ef8f58ebc462..656fa2e40eeb 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,9 +40,7 @@
#include <frmfmt.hxx>
#include <wrtasc.hxx>
-#ifndef _STATSTR_HRC
#include <statstr.hrc> // ResId fuer Statusleiste
-#endif
//-----------------------------------------------------------------
@@ -181,7 +180,6 @@ sal_uLong SwASCWriter::WriteStream()
sal_uInt8(0xBF);
break;
case RTL_TEXTENCODING_UCS2:
- //Strm().StartWritingUnicodeText();
Strm().SetEndianSwap(sal_False);
#ifdef OSL_LITENDIAN
Strm() << sal_uInt8(0xFF) << sal_uInt8(0xFE);
@@ -223,3 +221,4 @@ void GetASCWriter( const String& rFltNm, const String& /*rBaseURL*/, WriterRef&
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ascii/wrtasc.hxx b/sw/source/filter/ascii/wrtasc.hxx
index e1758e9c406a..c073dddbc337 100644
--- a/sw/source/filter/ascii/wrtasc.hxx
+++ b/sw/source/filter/ascii/wrtasc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,5 @@ public:
#endif // _WRTASC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/basflt/docfact.cxx b/sw/source/filter/basflt/docfact.cxx
index d63d0ab3fd24..26db2c7d9a44 100644
--- a/sw/source/filter/basflt/docfact.cxx
+++ b/sw/source/filter/basflt/docfact.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,19 +33,13 @@
#include <doc.hxx>
#include <node.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
/******************************************************************************
* Methode : SwDocFac::SwDocFac( SwDoc *pDoc )
- * Beschreibung:
- * Erstellt : OK 01-24-94 11:32am
- * Aenderung : OK 01-24-94 11:32am
******************************************************************************/
-
SwDocFac::SwDocFac( SwDoc *pDc )
: pDoc( pDc )
{
@@ -54,9 +49,6 @@ SwDocFac::SwDocFac( SwDoc *pDc )
/******************************************************************************
* Methode : SwDocFac::~SwDocFac()
- * Beschreibung:
- * Erstellt : OK 01-24-94 11:33am
- * Aenderung : OK 01-24-94 11:33am
******************************************************************************/
@@ -69,11 +61,8 @@ SwDocFac::~SwDocFac()
/******************************************************************************
* Methode : SwDoc *SwDocFac::GetDoc()
* Beschreibung: Diese Methode legt immer einen Drucker an.
- * Erstellt : OK 01-24-94 11:34am
- * Aenderung : OK 01-24-94 11:34am
******************************************************************************/
-
SwDoc *SwDocFac::GetDoc()
{
if( !pDoc )
@@ -83,3 +72,5 @@ SwDoc *SwDocFac::GetDoc()
}
return pDoc;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index ab9f74c31fba..7d0b8a816f03 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,7 +50,6 @@
#include <docary.hxx>
#include <pam.hxx>
#include <shellio.hxx>
-#include <errhdl.hxx>
#include <docsh.hxx>
#include <wdocsh.hxx>
#include <fltini.hxx>
@@ -59,7 +59,6 @@
#include <swtable.hxx>
#include <fmtcntnt.hxx>
#include <editeng/boxitem.hxx>
-#include <frmatr.hxx>
#include <frmfmt.hxx>
#include <numrule.hxx>
#include <ndtxt.hxx>
@@ -121,11 +120,6 @@ void SwReaderWriterEntry::GetWriter( const String& rNm, const String& rBaseURL,
xWrt = WriterRef(0);
}
-/*SwRead SwGetReaderSw3() // SW_DLLPUBLIC
-{
- return ReadSw3;
-}
-*/
SwRead SwGetReaderXML() // SW_DLLPUBLIC
{
return ReadXML;
@@ -147,12 +141,6 @@ void _InitFilter()
_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 );
}
@@ -205,120 +193,6 @@ SwRead GetReader( const String& rFltName )
} // namespace SwReaderWriter
-/* */
-
-/////////////// die Storage Reader/Writer ////////////////////////////////
-
-/*void GetSw3Writer( const String&, const String& rBaseURL, WriterRef& xRet )
-{
- DBG_ERROR( "Shouldn't happen!");
- xRet = new Sw3Writer;
-}
-*/
-
-sal_uLong StgReader::OpenMainStream( SvStorageStreamRef& rRef, sal_uInt16& rBuffSize )
-{
- sal_uLong nRet = ERR_SWG_READ_ERROR;
- ASSERT( 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() )
- {
- sal_uInt16 nOld = rRef->GetBufferSize();
- rRef->SetBufferSize( rBuffSize );
- rBuffSize = nOld;
- nRet = 0;
- }
- else
- nRet = rRef->GetError();
- }
- }
- return nRet;
-}
-
-/* */
-/*
-sal_uLong Sw3Reader::Read( SwDoc &rDoc, SwPaM &rPam, const String & )
-{
- sal_uLong nRet;
- if( pStg && pIO )
- {
- // sal_True: Vorlagen ueberschreiben
- pIO->SetReadOptions( aOpt,sal_True );
- if( !bInsertMode )
- {
- // Im Laden-Modus darf der PaM-Content-Teil nicht
- // in den Textbereich zeigen (Nodes koennen geloescht werden)
- rPam.GetBound( sal_True ).nContent.Assign( 0, 0 );
- rPam.GetBound( sal_False ).nContent.Assign( 0, 0 );
- }
- nRet = pIO->Load( pStg, bInsertMode ? &rPam : 0 );
- aOpt.ResetAllFmtsOnly();
- pIO->SetReadOptions( aOpt, sal_True );
- }
- else
- {
- ASSERT( !this, "Sw3-Read ohne Storage und/oder IO-System" );
- nRet = ERR_SWG_READ_ERROR;
- }
- return nRet;
-}
-
- // read the sections of the document, which is equal to the medium.
- // returns the count of it
-sal_uInt16 Sw3Reader::GetSectionList( SfxMedium& rMedium,
- SvStrings& rStrings ) const
-{
- SvStorageRef aStg( rMedium.GetStorage() );
- const SfxFilter* pFlt = rMedium.GetFilter();
- ASSERT( pFlt && pFlt->GetVersion(),
- "Kein Filter oder Filter ohne FF-Version" );
- if( pFlt && pFlt->GetVersion() )
- aStg->SetVersion( (long)pFlt->GetVersion() );
-
- if( pIO )
- pIO->GetSectionList( &aStg, rStrings );
- return rStrings.Count();
- return 0;
-}
-*/
-
-/*sal_uLong Sw3Writer::WriteStorage()
-{
- sal_uLong nRet;
- if( pIO )
- {
- // der gleiche Storage -> Save, sonst SaveAs aufrufen
- if( !bSaveAs )
- nRet = pIO->Save( pOrigPam, bWriteAll );
- else
- nRet = pIO->SaveAs( pStg, pOrigPam, bWriteAll );
-
- pIO = 0; // nach dem Schreiben ist der Pointer ungueltig !!
- }
- else
- {
- ASSERT( !this, "Sw3-Writer ohne IO-System" )
- nRet = ERR_SWG_WRITE_ERROR;
- }
- return nRet;
-}
-
-sal_uLong Sw3Writer::WriteMedium( SfxMedium& )
-{
- DBG_ERROR( "Shouldn't be used currently!");
- return WriteStorage();
-}
-
-sal_Bool Sw3Writer::IsSw3Writer() const { return sal_True; }
-*/
-
void Writer::SetPasswd( const String& ) {}
@@ -326,7 +200,6 @@ void Writer::SetVersion( const String&, long ) {}
sal_Bool Writer::IsStgWriter() const { return sal_False; }
-//sal_Bool Writer::IsSw3Writer() const { return sal_False; }
sal_Bool StgWriter::IsStgWriter() const { return sal_True; }
@@ -490,18 +363,6 @@ void SwRelNumRuleSpaces::SetNumRelSpaces( SwDoc& rDoc )
// Rule noch gueltig und am Doc vorhanden?
if( USHRT_MAX != rDoc.GetNumRuleTbl().GetPos( pRule ))
{
- // --> OD 2008-02-19 #refactorlists#
-// SwNumRuleInfo aUpd( pRule->GetName() );
-// aUpd.MakeList( rDoc );
-
-// // bei allen nmumerierten Absaetzen vom linken Rand
-// // den absoluten Wert des NumFormates abziehen
-// for( sal_uLong nUpdPos = 0; nUpdPos < aUpd.GetList().Count();
-// ++nUpdPos )
-// {
-// SwTxtNode* pNd = aUpd.GetList().GetObject( nUpdPos );
-// SetNumLSpace( *pNd, *pRule );
-// }
SwNumRule::tTxtNodeList aTxtNodeList;
pRule->GetTxtNodeList( aTxtNodeList );
for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin();
@@ -510,7 +371,6 @@ void SwRelNumRuleSpaces::SetNumRelSpaces( SwDoc& rDoc )
SwTxtNode* pNd = *aIter;
SetNumLSpace( *pNd, *pRule );
}
- // <--
}
}
}
@@ -550,16 +410,14 @@ void SwRelNumRuleSpaces::SetOultineRelSpaces( const SwNodeIndex& rStt,
void SwRelNumRuleSpaces::SetNumLSpace( SwTxtNode& rNd, const SwNumRule& rRule )
{
sal_Bool bOutlineRule = OUTLINE_RULE == rRule.GetRuleType();
- // --> OD 2005-11-18 #128056#
// correction of refactoring done by cws swnumtree:
// - assure a correct level for retrieving numbering format.
-// sal_uInt8 nLvl = rNd.GetLevel();
sal_uInt8 nLvl = 0;
if ( rNd.GetActualListLevel() >= 0 && rNd.GetActualListLevel() < MAXLEVEL )
{
nLvl = static_cast< sal_uInt8 >(rNd.GetActualListLevel());
}
- // <--
+
const SwNumFmt& rFmt = rRule.Get( nLvl );
const SvxLRSpaceItem& rLR = rNd.GetSwAttrSet().GetLRSpace();
@@ -575,11 +433,9 @@ void SwRelNumRuleSpaces::SetNumLSpace( SwTxtNode& rNd, const SwNumRule& rRule )
if( 0 < rLR.GetTxtFirstLineOfst() )
nParaLeft += rLR.GetTxtFirstLineOfst();
else if( nParaLeft >= nLeft )
- // #82963#/#82962#: set correct paragraph indent
+ // 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 );
}
@@ -856,7 +712,7 @@ rtl_TextEncoding CharSetFromName(const String& rChrSetStr)
}
}
- ASSERT(nRet != pStart->eCode, "TXT: That was an unknown language!");
+ OSL_ENSURE(nRet != pStart->eCode, "TXT: That was an unknown language!");
return nRet;
}
@@ -879,7 +735,7 @@ String NameFromCharSet(rtl_TextEncoding nChrSet)
}
}
- ASSERT(pRet != pStart->pName, "TXT: That was an unknown language!");
+ OSL_ENSURE(pRet != pStart->pName, "TXT: That was an unknown language!");
return String::CreateFromAscii(pRet);
}
@@ -1034,4 +890,4 @@ sal_uLong GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS )
return ERRCODE_NONE;
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index aaabab41895f..81012d99768c 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,6 @@
#include <iodetect.hxx>
-#include <errhdl.hxx>
#include <osl/endian.h>
#include <sot/storage.hxx>
#include <svtools/parhtml.hxx>
@@ -148,7 +148,7 @@ sal_Bool SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < co
try
{
sal_uLong nStgFmtId = SotStorage::GetFormatID( rStg );
- bRet = rStg->isStreamElement( ::rtl::OUString::createFromAscii("content.xml") );
+ bRet = rStg->isStreamElement( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("content.xml")) );
if ( bRet )
bRet = ( nStgFmtId && ( rFilter.GetFormat() == nStgFmtId ) );
}
@@ -193,17 +193,15 @@ sal_Bool SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter
bRet = !(nByte & 1);
}
}
- // else if( !rFilter.GetUserData().EqualsAscii(sCExcel) )
- // bRet = rFilter.GetFormat() == nStgFmtId;
}
return bRet;
}
void TerminateBuffer(sal_Char *pBuffer, sal_uLong nBytesRead, sal_uLong nBufferLen)
{
- ASSERT(nBytesRead <= nBufferLen - 2,
+ OSL_ENSURE(nBytesRead <= nBufferLen - 2,
"what you read must be less than the max + null termination");
- ASSERT(!(nBufferLen & 0x00000001), "nMaxReadBuf must be an even number");
+ OSL_ENSURE(!(nBufferLen & 0x00000001), "nMaxReadBuf must be an even number");
if (nBytesRead <= nBufferLen - 2)
{
pBuffer[nBytesRead] = '\0';
@@ -309,14 +307,12 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
{
// package storage or OLEStorage based format
SotStorageRef xStg;
- sal_Bool bDeleteMedium = sal_False;
if (!pMedium )
{
INetURLObject aObj;
aObj.SetSmartProtocol( INET_PROT_FILE );
aObj.SetSmartURL( rFileName );
pMedium = new SfxMedium( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ, sal_False );
- bDeleteMedium = sal_True;
}
// templates should not get precedence over "normal" filters (#i35508, #i33168)
@@ -391,18 +387,6 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
nBytesRead = pIStrm->Read(aBuffer, nMaxRead);
pIStrm->Seek( nCurrPos );
}
- /*
- else
- {
- SvFileStream aStrm( rFileName, STREAM_READ );
-
- // ohne FileName oder ohne Stream gibts nur den ANSI-Filter
- if( !rFileName.Len() || SVSTREAM_OK != aStrm.GetError() )
- return 0;
-
- nBytesRead = aStrm.Read(aBuffer, nMaxRead);
- aStrm.Close();
- }*/
TerminateBuffer(aBuffer, nBytesRead, sizeof(aBuffer));
@@ -445,10 +429,10 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, sal_uLong &rLen,
bool bSwap = false;
CharSet eCharSet = RTL_TEXTENCODING_DONTKNOW;
bool bLE = true;
- sal_uLong nHead=0;
/*See if its a known unicode type*/
if (rLen >= 2)
{
+ sal_uLong nHead=0;
if (rLen > 2 && sal_uInt8(pBuf[0]) == 0xEF && sal_uInt8(pBuf[1]) == 0xBB &&
sal_uInt8(pBuf[2]) == 0xBF)
{
@@ -470,8 +454,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, sal_uLong &rLen,
rLen-=nHead;
}
- bool bCR = false, bLF = false, bNoNormalChar = false,
- bIsBareUnicode = false;
+ bool bCR = false, bLF = false, bIsBareUnicode = false;
if (eCharSet != RTL_TEXTENCODING_DONTKNOW)
{
@@ -560,8 +543,6 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, sal_uLong &rLen,
case 0x9:
break;
default:
- if (0x20 > (sal_uInt8)*pBuf)
- bNoNormalChar = true;
break;
}
}
@@ -590,3 +571,5 @@ const SfxFilter* SwIoSystem::GetTextFilter( const sal_Char* pBuf, sal_uLong nLen
const sal_Char* pNm = bAuto ? FILTER_TEXT : FILTER_TEXT_DLG;
return SwIoSystem::GetFilterOfFormat( String::CreateFromAscii(pNm), 0 );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 90abdf79231b..aeb5946a6aa7 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,13 +61,10 @@
#include <docsh.hxx>
#include <redline.hxx>
#include <swerror.h>
-
#include <paratr.hxx>
-// --> OD 2007-03-30 #i73788#
+// #i73788#
#include <pausethreadstarting.hxx>
-// <--
-
using namespace ::com::sun::star;
@@ -96,12 +94,6 @@ sal_uLong SwReader::Read( const Reader& rOptions )
GetDoc();
- // am Sw3-Reader noch den pIo-Pointer "loeschen"
- /*
- if( po == ReadSw3 && pDoc->GetDocShell() &&
- ((Sw3Reader*)po)->GetSw3Io() != pDoc->GetDocShell()->GetIoSystem() )
- ((Sw3Reader*)po)->SetSw3Io( pDoc->GetDocShell()->GetIoSystem() );*/
-
// waehrend des einlesens kein OLE-Modified rufen
Link aOLELink( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
@@ -211,6 +203,16 @@ sal_uLong SwReader::Read( const Reader& rOptions )
else
nEndCntnt = nLen - nEndCntnt;
pPam->GetPoint()->nContent.Assign( pCNd, nEndCntnt );
+
+ const SwStartNode* pTblBoxStart = pCNd->FindTableBoxStartNode();
+ if ( pTblBoxStart )
+ {
+ SwTableBox* pBox = pTblBoxStart->GetTblBox();
+ if ( pBox )
+ {
+ pDoc->ChkBoxNumFmt( *pBox, sal_True );
+ }
+ }
}
if( pCrsr )
@@ -373,7 +375,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
{
delete pPam; // ein neues aufgemacht.
- // --> FME 2005-02-25 #i42634# Moved common code of SwReader::Read() and
+ // #i42634# Moved common code of SwReader::Read() and
// SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks():
// ATM still with Update
pDoc->UpdateLinks( sal_True );
@@ -391,7 +393,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
if( pCrsr ) // das Doc ist jetzt modifiziert
pDoc->SetModified();
- // --> OD 2005-02-11 #i38810# - If links have been updated, the document
+ // #i38810# - If links have been updated, the document
// have to be modified. During update of links the OLE link at the document
// isn't set. Thus, the document's modified state has to be set again after
// the OLE link is restored - see above <pDoc->SetOle2Link( aOLELink )>.
@@ -399,10 +401,6 @@ sal_uLong SwReader::Read( const Reader& rOptions )
{
pDoc->SetModified();
}
- // <--
-
-// if( po == ReadSw3 ) // am Sw3-Reader noch den pIo-Pointer "loeschen"
-// ((Sw3Reader*)po)->SetSw3Io( 0 );
po->SetReadUTF8( sal_False );
po->SetBlockMode( sal_False );
@@ -417,20 +415,6 @@ sal_uLong SwReader::Read( const Reader& rOptions )
* Konstruktoren, Destruktor
*/
-// Initiales Einlesben
-
- /*
-SwReader::SwReader(SvStorage& rStg, const String& rFileName, SwDoc *pDoc)
- : SwDocFac(pDoc), pStrm(0), pStg(&rStg), pMedium(0), pCrsr(0),
- aFileName(rFileName)
-{
-}
-
-SwReader::SwReader(const uno::Reference < embed::XStorage >& rStg, const String& rFileName, SwDoc *pDoc)
- : SwDocFac(pDoc), pStrm(0), pMedium(0), pCrsr(0), xStg( rStg ), aFileName(rFileName)
-{
-}
- */
SwReader::SwReader(SfxMedium& rMedium, const String& rFileName, SwDoc *pDocument)
: SwDocFac(pDocument), pStrm(0), pMedium(&rMedium), pCrsr(0),
aFileName(rFileName)
@@ -446,13 +430,7 @@ SwReader::SwReader(SvStream& rStrm, const String& rFileName, const String& rBase
{
SetBaseURL( rBaseURL );
}
-/*
-SwReader::SwReader(SvStorage& rStg, const String& rFileName, SwPaM& rPam)
- : SwDocFac(rPam.GetDoc()), pStrm(0), pStg(&rStg), pMedium(0), pCrsr(&rPam),
- aFileName(rFileName)
-{
-}
-*/
+
SwReader::SwReader(SfxMedium& rMedium, const String& rFileName, SwPaM& rPam)
: SwDocFac(rPam.GetDoc()), pStrm(0), pMedium(&rMedium),
pCrsr(&rPam), aFileName(rFileName)
@@ -526,9 +504,9 @@ SwDoc* Reader::GetTemplateDoc()
if( bLoad )
{
ClearTemplate();
- ASSERT( !pTemplate, "Who holds the template doc?" );
+ OSL_ENSURE( !pTemplate, "Who holds the template doc?" );
- // #95605#: If the writer module is not installed,
+ // If the writer module is not installed,
// we cannot create a SwDocShell. We could create a
// SwWebDocShell however, because this exists always
// for the help.
@@ -558,7 +536,7 @@ SwDoc* Reader::GetTemplateDoc()
}
}
- ASSERT( !pTemplate || FStatHelper::IsDocument( aFileName ) ||
+ OSL_ENSURE( !pTemplate || FStatHelper::IsDocument( aFileName ) ||
aTemplateNm.EqualsAscii( "$$Dummy$$" ),
"TemplatePtr but no template exist!" );
}
@@ -617,7 +595,7 @@ void Reader::MakeHTMLDummyTemplateDoc()
// muessen die Methode ueberladen
int Reader::SetStrmStgPtr()
{
- ASSERT( pMedium, "Wo ist das Medium??" );
+ OSL_ENSURE( pMedium, "Wo ist das Medium??" );
if( pMedium->IsStorage() )
{
@@ -660,7 +638,7 @@ void Reader::SetFltName( const String& )
void Reader::SetNoOutlineNum( SwDoc& /*rDoc*/ )
{
- // JP 10.03.96: jetzt wieder keine Nummerierung in den Vorlagen
+ // jetzt wieder keine Nummerierung in den Vorlagen
}
@@ -680,7 +658,7 @@ void Reader::ResetFrmFmts( SwDoc& rDoc )
switch (i)
{
default:
- ASSERT(i == 0, "Impossible");
+ OSL_ENSURE(i == 0, "Impossible");
//fallthrough
case 0:
nPoolId = RES_POOLFRM_FRAME;
@@ -805,9 +783,8 @@ SwWriter::SwWriter(SfxMedium& rMedium, SwDoc &rDocument)
sal_uLong SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
{
- // --> OD 2007-03-30 #i73788#
+ // #i73788#
SwPauseThreadStarting aPauseThreadStarting;
- // <--
sal_Bool bHasMark = sal_False;
SwPaM * pPam;
@@ -830,7 +807,7 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
SwTableNode* pTblNd = (SwTableNode*)aBoxes[0]->GetSttNd()->StartOfSectionNode();
SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), 2 );
SwCntntNode *pNd = aIdx.GetNode().GetCntntNode();
- ASSERT( pNd, "Node not found" );
+ OSL_ENSURE( pNd, "Node not found" );
SwPosition aPos( aIdx, SwIndex( pNd ) );
pTblNd->GetTable().MakeCopy( pDoc, aPos, aBoxes );
}
@@ -896,7 +873,7 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
// falls der Standart PageDesc. immer noch auf initalen Werten steht
// (wenn z.B. kein Drucker gesetzt wurde) dann setze jetzt auf DIN A4
- // --> OD 2004-11-17 #i37248# - Modifications are only allowed at a new document.
+ // #i37248# - Modifications are only allowed at a new document.
// <pOutDoc> contains a new document, if <pDoc> is set - see above.
if ( pDoc && !pOutDoc->getPrinter( false ) )
// <--
@@ -967,10 +944,8 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
if ( !IsError( nError ) && !pDoc )
{
rDoc.ResetModified();
- // --> OD 2005-02-11 #i38810# - reset also flag, that indicates
- // updated links
+ // #i38810# - reset also flag, that indicates updated links
rDoc.SetLinksUpdated( sal_False );
- // <-
}
}
@@ -1012,3 +987,4 @@ sal_Bool SetHTMLTemplate( SwDoc & rDoc )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx
index a6ae6622a340..5891531d53c1 100644
--- a/sw/source/filter/html/SwAppletImpl.cxx
+++ b/sw/source/filter/html/SwAppletImpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -147,14 +148,14 @@ void SwApplet_Impl::CreateApplet( const String& rCode, const String& rName,
uno::Reference < beans::XPropertySet > xSet( xApplet->getComponent(), uno::UNO_QUERY );
if ( xSet.is() )
{
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletCode"), uno::makeAny( ::rtl::OUString( rCode ) ) );
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletName"), uno::makeAny( ::rtl::OUString( rName ) ) );
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletIsScript"), uno::makeAny( sal_Bool(bMayScript) ) );
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletDocBase"), uno::makeAny( ::rtl::OUString(sDocBase) ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCode")), uno::makeAny( ::rtl::OUString( rCode ) ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletName")), uno::makeAny( ::rtl::OUString( rName ) ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletIsScript")), uno::makeAny( sal_Bool(bMayScript) ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletDocBase")), uno::makeAny( ::rtl::OUString(sDocBase) ) );
if ( rCodeBase.Len() )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletCodeBase"), uno::makeAny( ::rtl::OUString( rCodeBase ) ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCodeBase")), uno::makeAny( ::rtl::OUString( rCodeBase ) ) );
else
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletCodeBase"), uno::makeAny( ::rtl::OUString( sDocBase ) ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCodeBase")), uno::makeAny( ::rtl::OUString( sDocBase ) ) );
}
}
#ifdef SOLAR_JAVA
@@ -190,13 +191,12 @@ SwApplet_Impl::~SwApplet_Impl()
}
void SwApplet_Impl::FinishApplet()
{
- //xApplet->EnableSetModified( sal_True );
uno::Reference < beans::XPropertySet > xSet( xApplet->getComponent(), uno::UNO_QUERY );
if ( xSet.is() )
{
uno::Sequence < beans::PropertyValue > aProps;
aCommandList.FillSequence( aProps );
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletCommands"), uno::makeAny( aProps ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")), uno::makeAny( aProps ) );
}
}
@@ -206,3 +206,5 @@ void SwApplet_Impl::AppendParam( const String& rName, const String& rValue )
aCommandList.Append( rName, rValue );
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 63925788ee1a..c6bcc0cb50f1 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,7 +50,6 @@
#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>
@@ -111,7 +111,7 @@
* diese Section und die dazugeherigen Tabellen muessen in folgenden Files
* gepflegt werden: rtf\rtfatr.cxx, sw6\sw6atr.cxx, w4w\w4watr.cxx
*/
-#if !defined(UNX) && !defined(MSC) && !defined(PPC) && !defined(CSET) && !defined(__MWERKS__) && !defined(WTC) && !defined(__MINGW32__) && !defined(OS2)
+#if !defined(UNX) && !defined(MSC) && !defined(PPC) && !defined(__MINGW32__) && !defined(OS2)
#define ATTRFNTAB_SIZE 130
#if ATTRFNTAB_SIZE != POOLATTR_END - POOLATTR_BEGIN
@@ -139,11 +139,11 @@ using namespace ::com::sun::star;
//-----------------------------------------------------------------------
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_rule_end, " }" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_span_tag_end, "\">" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_rule_end, " }" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_span_tag_end, "\">" );
const sal_Char cCSS1_style_opt_end = '\"';
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sHTML_FTN_fontheight, "57%" );
+sal_Char CSS1_CONSTASCII_DEF( sHTML_FTN_fontheight, "57%" );
extern SwAttrFnTab aCSS1AttrFnTab;
@@ -176,7 +176,6 @@ static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
sal_uInt16 nMode, const String *pGrfName );
static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt );
-static Writer& OutCSS1_SvxBox( Writer& rWrt, const SfxPoolItem& rHt );
static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
sal_uInt16 nMode );
static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt,
@@ -338,7 +337,7 @@ static void AddUnitPropertyValue( long nVal, FieldUnit eUnit, ByteString& rOut )
switch( eUnit )
{
case FUNIT_100TH_MM:
- ASSERT( FUNIT_MM == eUnit, "Masseinheit wird nicht unterstuetzt" );
+ OSL_ENSURE( FUNIT_MM == eUnit, "Masseinheit wird nicht unterstuetzt" );
case FUNIT_MM:
// 0.01mm = 0.57twip
nMul = 25400; // 25.4 * 1000
@@ -349,51 +348,30 @@ static void AddUnitPropertyValue( long nVal, FieldUnit eUnit, ByteString& rOut )
case FUNIT_M:
case FUNIT_KM:
- ASSERT( FUNIT_CM == eUnit, "Masseinheit wird nicht unterstuetzt" );
+ OSL_ENSURE( FUNIT_CM == eUnit, "Masseinheit wird nicht unterstuetzt" );
case FUNIT_CM:
-#ifdef EXACT_VALUES
- // 0.001cm = 0.57twip
- nMul = 25400; // 2.54 * 10000
- nDiv = 1440; // 72 * 20;
- nFac = 1000;
-#else
// 0.01cm = 5.7twip (ist zwar ungenau, aber die UI ist auch ungenau)
nMul = 2540; // 2.54 * 1000
nDiv = 1440; // 72 * 20;
nFac = 100;
-#endif
pUnit = sCSS1_UNIT_cm;
break;
case FUNIT_TWIP:
- ASSERT( FUNIT_POINT == eUnit, "Masseinheit wird nicht unterstuetzt" );
+ OSL_ENSURE( FUNIT_POINT == eUnit, "Masseinheit wird nicht unterstuetzt" );
case FUNIT_POINT:
-#ifdef EXACT_VALUES
- // 0.01pt = 0.2twip
- nMul = 1000;
- nDiv = 20;
- nFac = 100;
-#else
// 0.1pt = 2.0twip (ist zwar ungenau, aber die UI ist auch ungenau)
nMul = 100;
nDiv = 20;
nFac = 10;
-#endif
pUnit = sCSS1_UNIT_pt;
break;
case FUNIT_PICA:
-#ifdef EXACT_VALUES
- // 0.001pc = 0.24twip
- nMul = 10000;
- nDiv = 12 * 20;
- nFac = 1000;
-#else
// 0.01pc = 2.40twip (ist zwar ungenau, aber die UI ist auch ungenau)
nMul = 1000;
nDiv = 240; // 12 * 20;
nFac = 100;
-#endif
pUnit = sCSS1_UNIT_pc;
break;
@@ -404,18 +382,11 @@ static void AddUnitPropertyValue( long nVal, FieldUnit eUnit, ByteString& rOut )
case FUNIT_PERCENT:
case FUNIT_INCH:
default:
- ASSERT( FUNIT_INCH == eUnit, "Masseinheit wird nicht unterstuetzt" );
-#ifdef EXACT_VALUES
- // 0.0001in = 0.144twip
- nMul = 100000;
- nDiv = 1440; // 72 * 20;
- nFac = 10000;
-#else
+ OSL_ENSURE( FUNIT_INCH == eUnit, "Masseinheit wird nicht unterstuetzt" );
// 0.01in = 14.4twip (ist zwar ungenau, aber die UI ist auch ungenau)
nMul = 1000;
nDiv = 1440; // 72 * 20;
nFac = 100;
-#endif
pUnit = sCSS1_UNIT_inch;
break;
}
@@ -879,7 +850,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
// Wenn eine PoolId gesetzt ist, entspricht der Name der
// Vorlage dem szugehoerigen Token
- ASSERT( rRefPoolId != 0 == rToken.Len() > 0,
+ OSL_ENSURE( (rRefPoolId != 0) == (rToken.Len() > 0),
"Token missing" );
}
else
@@ -1106,7 +1077,7 @@ const SwFmt *SwHTMLWriter::GetTemplateFmt( sal_uInt16 nPoolFmtId,
if( pTemplate )
{
- ASSERT( !(USER_FMT & nPoolFmtId),
+ OSL_ENSURE( !(USER_FMT & nPoolFmtId),
"In der Dok-Vorlage gibt es keine Benutzer-Vorlagen" );
if( POOLGRP_NOCOLLID & nPoolFmtId )
pRefFmt = pTemplate->GetCharFmtFromPool( nPoolFmtId );
@@ -1119,7 +1090,7 @@ const SwFmt *SwHTMLWriter::GetTemplateFmt( sal_uInt16 nPoolFmtId,
const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, sal_uInt16 nDeep )
{
- ASSERT( nDeep != USHRT_MAX, "GetParent fuer HTML-Vorlage aufgerufen!" );
+ OSL_ENSURE( nDeep != USHRT_MAX, "GetParent fuer HTML-Vorlage aufgerufen!" );
const SwFmt *pRefFmt = 0;
if( nDeep > 0 )
@@ -1151,7 +1122,7 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
sal_Bool bClearSame,
const SfxItemSet *pRefScriptItemSet )
{
- ASSERT( bSetDefaults || bClearSame,
+ OSL_ENSURE( bSetDefaults || bClearSame,
"SwHTMLWriter::SubtractItemSet: Bei diesen Flags passiert nix" );
SfxItemSet aRefItemSet( *rRefItemSet.GetPool(), rRefItemSet.GetRanges() );
aRefItemSet.Set( rRefItemSet );
@@ -2160,10 +2131,10 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
sal_Bool bOutXPos = sal_False, bOutYPos = sal_False;
if( RES_DRAWFRMFMT == rFrmFmt.Which() )
{
- ASSERT( pSdrObj, "Kein SdrObject uebergeben. Ineffizient" );
+ OSL_ENSURE( pSdrObj, "Kein SdrObject uebergeben. Ineffizient" );
if( !pSdrObj )
pSdrObj = rFrmFmt.FindSdrObject();
- ASSERT( pSdrObj, "Wo ist das SdrObject" );
+ OSL_ENSURE( pSdrObj, "Wo ist das SdrObject" );
if( pSdrObj )
{
Point aPos( pSdrObj->GetRelativePos() );
@@ -2227,10 +2198,10 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
{
if( RES_DRAWFRMFMT == rFrmFmt.Which() )
{
- ASSERT( pSdrObj, "Kein SdrObject uebergeben. Ineffizient" );
+ OSL_ENSURE( pSdrObj, "Kein SdrObject uebergeben. Ineffizient" );
if( !pSdrObj )
pSdrObj = rFrmFmt.FindSdrObject();
- ASSERT( pSdrObj, "Wo ist das SdrObject" );
+ OSL_ENSURE( pSdrObj, "Wo ist das SdrObject" );
if( pSdrObj )
{
Size aTwipSz( pSdrObj->GetLogicRect().GetSize() );
@@ -2254,9 +2225,9 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
}
else
{
- ASSERT( HTML_FRMOPT_ABSSIZE & nFrmOpts,
+ OSL_ENSURE( HTML_FRMOPT_ABSSIZE & nFrmOpts,
"Absolute Groesse wird exportiert" );
- ASSERT( HTML_FRMOPT_ANYSIZE & nFrmOpts,
+ OSL_ENSURE( HTML_FRMOPT_ANYSIZE & nFrmOpts,
"Jede Groesse wird exportiert" );
sal_uInt16 nMode = 0;
if( nFrmOpts & HTML_FRMOPT_S_WIDTH )
@@ -2346,7 +2317,6 @@ static sal_Bool OutCSS1_FrmFmtBrush( SwHTMLWriter& rWrt,
const SvxBrushItem& rBrushItem )
{
sal_Bool bWritten = sal_False;
- /// OD 02.09.2002 #99657#
/// output brush of frame format, if its background color is not "no fill"/"auto fill"
/// or it has a background graphic.
if( rBrushItem.GetColor() != COL_TRANSPARENT ||
@@ -2426,7 +2396,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtBackground( const SwFrmFmt& rFrmFmt )
// Schliesslich bleibt noch der Hintergrund der Seite uebrig und als
// letzte Rettung das Item der Config.
- ASSERT( pCurrPageDesc, "Keine Seiten-Vorlage gemerkt" );
+ OSL_ENSURE( pCurrPageDesc, "Keine Seiten-Vorlage gemerkt" );
if( !OutCSS1_FrmFmtBrush( *this,
pCurrPageDesc->GetMaster().GetBackground() ) )
{
@@ -2478,7 +2448,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
{
// das geht auch in HTML und muss nicht als STYLE-Option
// und darf nicht als Hint geschrieben werden
- ASSERT( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
+ OSL_ENSURE( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
"Underline als Hint schreiben?" );
pUStr = sCSS1_PV_underline;
}
@@ -2501,7 +2471,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
{
// das geht auch in HTML und muss nicht als STYLE-Option
// und darf nicht als Hint geschrieben werden
- ASSERT( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
+ OSL_ENSURE( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
"Overline als Hint schreiben?" );
pOStr = sCSS1_PV_overline;
}
@@ -2524,7 +2494,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
{
// das geht auch in HTML und muss nicht als STYLE-Option
// und darf nicht als Hint geschrieben werden
- ASSERT( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
+ OSL_ENSURE( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
"CrossedOut als Hint schreiben?" );
pCOStr = sCSS1_PV_line_through;
}
@@ -2543,7 +2513,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
{
// das geht auch in HTML und muss nicht als STYLE-Option
// und darf nicht als Hint geschrieben werden
- ASSERT( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
+ OSL_ENSURE( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
"Blink als Hint schreiben?" );
pBStr = sCSS1_PV_blink;
}
@@ -2617,7 +2587,7 @@ static Writer& OutCSS1_SvxColor( Writer& rWrt, const SfxPoolItem& rHt )
if( rHTMLWrt.IsCSS1Source( CSS1_OUTMODE_PARA ) &&
!rHTMLWrt.bCfgPreferStyles )
return rWrt;
- ASSERT( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
+ OSL_ENSURE( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
"Farbe wirklich als Hint ausgeben?" );
Color aColor( ((const SvxColorItem&)rHt).GetValue() );
@@ -2662,7 +2632,7 @@ static Writer& OutCSS1_SvxFont( Writer& rWrt, const SfxPoolItem& rHt )
if( !rHTMLWrt.IsCSS1Script( nScript ) )
return rWrt;
- ASSERT( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
+ OSL_ENSURE( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
"Font wirklich als Hint ausgeben?" );
String sOut;
@@ -2736,7 +2706,7 @@ static Writer& OutCSS1_SvxPosture( Writer& rWrt, const SfxPoolItem& rHt )
{
// das geht auch in HTML und muss nicht als STYLE-Option
// und darf nicht als Hint geschrieben werden
- ASSERT( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
+ OSL_ENSURE( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
"Italic als Hint schreiben?" );
pStr = sCSS1_PV_italic;
}
@@ -2804,7 +2774,7 @@ static Writer& OutCSS1_SvxLanguage( Writer& rWrt, const SfxPoolItem& rHt )
if( !rHTMLWrt.IsCSS1Script( nScript ) )
return rWrt;
- ASSERT( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
+ OSL_ENSURE( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
"Language wirklich als Hint ausgeben?" );
LanguageType eLang = ((const SvxLanguageItem &)rHt).GetLanguage();
@@ -2870,7 +2840,7 @@ static Writer& OutCSS1_SvxFontWeight( Writer& rWrt, const SfxPoolItem& rHt )
{
// das geht auch in HTML und muss nicht als STYLE-Option
// und darf nicht als Hint geschrieben werden
- ASSERT( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
+ OSL_ENSURE( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
"Fett als Hint schreiben?" );
pStr = sCSS1_PV_bold;
}
@@ -2902,7 +2872,7 @@ static Writer& OutCSS1_SvxLineSpacing( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
- // #60393#: Netscape4 hat massive Probleme mit den Zellenhoehen
+ // Netscape4 hat massive Probleme mit den Zellenhoehen
// wenn der Zeilenabstand innerhalb einer Tabelle geaendert wird
// und die Breite der Tabelle nicht automatisch berechnet wird
// (also wenn eine WIDTH-Option vorhanden ist).
@@ -3123,7 +3093,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
bOutHeight = (nMode & CSS1_FRMSIZE_VARHEIGHT) != 0;
break;
default:
- ASSERT( bOutHeight, "Hoehe wird nicht exportiert" );
+ OSL_ENSURE( bOutHeight, "Hoehe wird nicht exportiert" );
break;
}
@@ -3382,14 +3352,13 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
{
// Fuer Seitenvorlagen wurde der Grafik-Name uebergeben. Es wird
// nur ein Attribut ausgegeben, wenn die Grafik nicht gekachelt ist.
- ASSERT( pLink, "Wo ist der Grafik-Name der Seitenvorlage?" );
+ OSL_ENSURE( pLink, "Wo ist der Grafik-Name der Seitenvorlage?" );
if( !pLink || !pLink->Len() || GPOS_TILED==ePos )
return rWrt;
}
// Erstmal die Farbe holen
sal_Bool bColor = sal_False;
- /// OD 02.09.2002 #99657#
/// set <bTransparent> to sal_True, if color is "no fill"/"auto fill"
sal_Bool bTransparent = (rColor.GetColor() == COL_TRANSPARENT);
Color aColor;
@@ -3600,8 +3569,24 @@ static void OutCSS1_SvxBorderLine( SwHTMLWriter& rHTMLWrt,
}
// Linien-Stil: solid oder double
- ((sOut += ' ')
- += (bDouble ? sCSS1_PV_double : sCSS1_PV_solid)) += ' ';
+ sOut += ' ';
+ if ( bDouble )
+ sOut += sCSS1_PV_double;
+ else
+ {
+ switch ( pLine->GetStyle( ) )
+ {
+ case DOTTED:
+ sOut += sCSS1_PV_dotted;
+ break;
+ case DASHED:
+ sOut += sCSS1_PV_dashed;
+ break;
+ default:
+ sOut += sCSS1_PV_solid;
+ }
+ }
+ sOut += ' ';
// und noch die Farbe
GetCSS1Color( pLine->GetColor(), sOut );
@@ -3609,15 +3594,10 @@ static void OutCSS1_SvxBorderLine( SwHTMLWriter& rHTMLWrt,
rHTMLWrt.OutCSS1_PropertyAscii( pProperty, sOut );
}
-static Writer& OutCSS1_SvxBox( Writer& rWrt, const SfxPoolItem& rHt )
+Writer& OutCSS1_SvxBox( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
- // Das Zeichen-Attribut wird nicht ausgegeben, wenn gerade
- // Optionen ausgegeben werden
- if( !rHTMLWrt.IsHTMLMode(HTMLMODE_PARA_BORDER))
- return rWrt;
-
const SvxBoxItem& rBoxItem = (const SvxBoxItem&)rHt;
const SvxBorderLine *pTop = rBoxItem.GetTop();
const SvxBorderLine *pBottom = rBoxItem.GetBottom();
@@ -3857,3 +3837,5 @@ SwAttrFnTab aCSS1AttrFnTab = {
/* RES_BOXATR_FORMULA */ 0,
/* RES_BOXATR_VALUE */ 0
};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/css1kywd.cxx b/sw/source/filter/html/css1kywd.cxx
index 63d319a8ac12..66dccb126045 100644
--- a/sw/source/filter/html/css1kywd.cxx
+++ b/sw/source/filter/html/css1kywd.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,97 +34,97 @@
/* */
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS_mimetype, "text/css" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS_mimetype, "text/css" );
/* */
// ein par allgemeine Strings
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_import, "import" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_import, "import" );
// Feature: PrintExt
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_page, "page" );
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_media, "media" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_page, "page" );
+//sal_Char CSS1_CONSTASCII_DEF( sCSS1_media, "media" );
// /Feature: PrintExt
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_important, "important" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_important, "important" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_link, "link" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_visited, "visited" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_first_letter, "first-letter" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_link, "link" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_visited, "visited" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_first_letter, "first-letter" );
// Feature: PrintExt
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_left, "left" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_right, "right" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_first, "first" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_left, "left" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_right, "right" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_first, "first" );
// /Feature: PrintExt
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_url, "url" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_rgb, "rgb" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_url, "url" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_rgb, "rgb" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_UNIT_pt, "pt" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_UNIT_mm, "mm" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_UNIT_cm, "cm" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_UNIT_pc, "pc" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_UNIT_inch, "in" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_UNIT_px, "px" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_UNIT_em, "em" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_UNIT_ex, "ex" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_UNIT_pt, "pt" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_UNIT_mm, "mm" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_UNIT_cm, "cm" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_UNIT_pc, "pc" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_UNIT_inch, "in" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_UNIT_px, "px" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_UNIT_em, "em" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_UNIT_ex, "ex" );
/* */
// Strings fuer Font-Properties
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_font_family, "font-family" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_font_family, "font-family" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_serif, "serif" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_sans_serif, "sans-serif" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_cursive, "cursive" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_fantasy, "fantasy" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_monospace, "monospace" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_serif, "serif" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_sans_serif, "sans-serif" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_cursive, "cursive" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_fantasy, "fantasy" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_monospace, "monospace" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_font_style, "font-style" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_font_style, "font-style" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_normal, "normal" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_italic, "italic" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_oblique, "oblique" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_normal, "normal" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_italic, "italic" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_oblique, "oblique" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_font_variant, "font-variant" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_font_variant, "font-variant" );
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_normal, "normal" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_small_caps, "small-caps" );
+//sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_normal, "normal" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_small_caps, "small-caps" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_font_weight, "font-weight" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_font_weight, "font-weight" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_extra_light, "extra-light" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_light, "light" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_demi_light, "demi-light" );
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_medium, "medium" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_demi_bold, "demi-bold" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_bold, "bold" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_extra_bold, "extra-bold" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_lighter, "lighter" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_bolder, "bolder" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_extra_light, "extra-light" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_light, "light" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_demi_light, "demi-light" );
+//sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_medium, "medium" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_demi_bold, "demi-bold" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_bold, "bold" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_extra_bold, "extra-bold" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_lighter, "lighter" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_bolder, "bolder" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_font_size, "font-size" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_font_size, "font-size" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_xx_small, "xx-small" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_x_small, "x-small" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_small, "small" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_medium, "medium" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_large, "large" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_x_large, "x-large" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_xx_large, "xx-large" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_xx_small, "xx-small" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_x_small, "x-small" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_small, "small" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_medium, "medium" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_large, "large" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_x_large, "x-large" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_xx_large, "xx-large" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_larger, "larger" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_smaller, "smaller" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_larger, "larger" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_smaller, "smaller" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_font, "font" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_font, "font" );
@@ -131,120 +132,120 @@ sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_font, "font" );
// Strings fuer Farb- und Hintergrund-Properties
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_color, "color" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_color, "color" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_background, "background" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_background_color, "background-color" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_background, "background" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_background_color, "background-color" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_transparent, "transparent" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_transparent, "transparent" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_repeat, "repeat" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_repeat_x, "repeat-x" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_repeat_y, "repeat-y" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_no_repeat, "no-repeat" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_repeat, "repeat" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_repeat_x, "repeat-x" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_repeat_y, "repeat-y" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_no_repeat, "no-repeat" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_top, "top" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_middle, "middle" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_bottom, "bottom" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_top, "top" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_middle, "middle" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_bottom, "bottom" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_scroll, "scroll" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_scroll, "scroll" );
/* */
// Strings fuer Text-Properties
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_letter_spacing, "letter-spacing" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_letter_spacing, "letter-spacing" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_text_decoration, "text-decoration" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_text_decoration, "text-decoration" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_none, "none" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_underline, "underline" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_overline, "overline" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_line_through, "line-through" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_blink, "blink" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_none, "none" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_underline, "underline" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_overline, "overline" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_line_through, "line-through" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_blink, "blink" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_text_align, "text-align" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_text_align, "text-align" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_left, "left" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_center, "center" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_right, "right" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_justify, "justify" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_left, "left" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_center, "center" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_right, "right" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_justify, "justify" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_text_indent, "text-indent" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_text_indent, "text-indent" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_line_height, "line-height" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_line_height, "line-height" );
/* */
// Strings fuer Box-Properties
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_margin_left, "margin-left" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_margin_right, "margin-right" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_margin_top, "margin-top" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_margin_bottom, "margin-bottom" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_margin, "margin" );
-
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_padding_top, "padding-top" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_padding_bottom, "padding-bottom" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_padding_left, "padding-left" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_padding_right, "padding-right" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_padding, "padding" );
-
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_auto, "auto" );
-
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_border_left_width, "border-left-width" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_border_right_width, "border-right-width" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_border_top_width, "border-top-width" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_border_bottom_width, "border-bottom-width" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_border_width, "border-width" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_border_color, "border-color" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_border_style, "border-style" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_border_left, "border-left" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_border_right, "border-right" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_border_top, "border-top" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_border_bottom, "border-bottom" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_border, "border" );
-
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_thin, "thin" );
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_medium, "medium" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_thick, "thick" );
-
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_none, "none" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_dotted, "dotted" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_dashed, "dashed" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_solid, "solid" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_double, "double" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_groove, "groove" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_ridge, "ridge" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_inset, "inset" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_outset, "outset" );
-
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_width, "width" );
-
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_height, "height" );
-
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_float, "float" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_margin_left, "margin-left" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_margin_right, "margin-right" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_margin_top, "margin-top" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_margin_bottom, "margin-bottom" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_margin, "margin" );
+
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_padding_top, "padding-top" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_padding_bottom, "padding-bottom" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_padding_left, "padding-left" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_padding_right, "padding-right" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_padding, "padding" );
+
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_auto, "auto" );
+
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_border_left_width, "border-left-width" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_border_right_width, "border-right-width" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_border_top_width, "border-top-width" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_border_bottom_width, "border-bottom-width" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_border_width, "border-width" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_border_color, "border-color" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_border_style, "border-style" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_border_left, "border-left" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_border_right, "border-right" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_border_top, "border-top" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_border_bottom, "border-bottom" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_border, "border" );
+
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_thin, "thin" );
+//sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_medium, "medium" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_thick, "thick" );
+
+//sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_none, "none" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_dotted, "dotted" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_dashed, "dashed" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_solid, "solid" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_double, "double" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_groove, "groove" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_ridge, "ridge" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_inset, "inset" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_outset, "outset" );
+
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_width, "width" );
+
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_height, "height" );
+
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_float, "float" );
/* */
// Strings fuer Positioning
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_position, "position" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_position, "position" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_absolute, "absolute" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_relative, "relative" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_static, "static" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_absolute, "absolute" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_relative, "relative" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_static, "static" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_left, "left" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_left, "left" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_top, "top" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_top, "top" );
/* */
@@ -252,30 +253,32 @@ sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_top, "top" );
// Strings fuer Printing Extensions
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_page_break_before, "page-break-before" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_page_break_after, "page-break-after" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_page_break_inside, "page-break-inside" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_size, "size" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_widows, "widows" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_orphans, "orphans" );
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_marks, "marks" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_page_break_before, "page-break-before" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_page_break_after, "page-break-after" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_page_break_inside, "page-break-inside" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_size, "size" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_widows, "widows" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_orphans, "orphans" );
+//sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_marks, "marks" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_always, "always" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_avoid, "avoid" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_always, "always" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_avoid, "avoid" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_portrait, "portrait" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_landscape, "landscape" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_portrait, "portrait" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_landscape, "landscape" );
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_crop, "crop" );
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_cross, "cross" );
+//sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_crop, "crop" );
+//sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_cross, "cross" );
// /Feature: PrintExt
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_class_abs_pos, "sd-abs-pos" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_class_abs_pos, "sd-abs-pos" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_so_language, "so-language" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_so_language, "so-language" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_direction, "direction" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_ltr, "ltr" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_rtl, "rtl" );
-sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_inherit, "inherit" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_direction, "direction" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_ltr, "ltr" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_rtl, "rtl" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_inherit, "inherit" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/css1kywd.hxx b/sw/source/filter/html/css1kywd.hxx
index 7994ab32c616..eafd0396e273 100644
--- a/sw/source/filter/html/css1kywd.hxx
+++ b/sw/source/filter/html/css1kywd.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,97 +40,97 @@
/* */
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS_mimetype, "text/css" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS_mimetype, "text/css" );
/* */
// ein par allgemeine Strings
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_import, "import" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_import, "import" );
// Feature: PrintExt
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_page, "page" );
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_media, "media" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_page, "page" );
+//sal_Char CSS1_CONSTASCII_DECL( sCSS1_media, "media" );
// /Feature: PrintExt
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_important, "important" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_important, "important" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_link, "link" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_visited, "visited" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_first_letter, "first-letter" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_link, "link" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_visited, "visited" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_first_letter, "first-letter" );
// Feature: PrintExt
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_left, "left" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_right, "right" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_first, "first" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_left, "left" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_right, "right" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_first, "first" );
// /Feature: PrintExt
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_url, "url" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_rgb, "rgb" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_url, "url" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_rgb, "rgb" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_UNIT_pt, "pt" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_UNIT_mm, "mm" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_UNIT_cm, "cm" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_UNIT_pc, "pc" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_UNIT_inch, "in" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_UNIT_px, "px" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_UNIT_em, "em" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_UNIT_ex, "ex" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_UNIT_pt, "pt" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_UNIT_mm, "mm" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_UNIT_cm, "cm" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_UNIT_pc, "pc" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_UNIT_inch, "in" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_UNIT_px, "px" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_UNIT_em, "em" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_UNIT_ex, "ex" );
/* */
// Strings fuer Font-Properties
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_font_family, "font-family" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_font_family, "font-family" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_serif, "serif" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_sans_serif, "sans-serif" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_cursive, "cursive" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_fantasy, "fantasy" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_monospace, "monospace" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_serif, "serif" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_sans_serif, "sans-serif" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_cursive, "cursive" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_fantasy, "fantasy" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_monospace, "monospace" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_font_style, "font-style" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_font_style, "font-style" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_normal, "normal" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_italic, "italic" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_oblique, "oblique" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_normal, "normal" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_italic, "italic" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_oblique, "oblique" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_font_variant, "font-variant" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_font_variant, "font-variant" );
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_normal, "normal" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_small_caps, "small-caps" );
+//sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_normal, "normal" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_small_caps, "small-caps" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_font_weight, "font-weight" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_font_weight, "font-weight" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_extra_light, "extra-light" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_light, "light" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_demi_light, "demi-light" );
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_medium, "medium" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_demi_bold, "demi-bold" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_bold, "bold" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_extra_bold, "extra-bold" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_lighter, "lighter" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_bolder, "bolder" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_extra_light, "extra-light" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_light, "light" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_demi_light, "demi-light" );
+//sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_medium, "medium" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_demi_bold, "demi-bold" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_bold, "bold" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_extra_bold, "extra-bold" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_lighter, "lighter" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_bolder, "bolder" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_font_size, "font-size" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_font_size, "font-size" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_xx_small, "xx-small" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_x_small, "x-small" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_small, "small" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_medium, "medium" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_large, "large" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_x_large, "x-large" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_xx_large, "xx-large" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_xx_small, "xx-small" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_x_small, "x-small" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_small, "small" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_medium, "medium" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_large, "large" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_x_large, "x-large" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_xx_large, "xx-large" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_larger, "larger" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_smaller, "smaller" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_larger, "larger" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_smaller, "smaller" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_font, "font" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_font, "font" );
@@ -137,120 +138,120 @@ extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_font, "font" );
// Strings fuer Farb- und Hintergrund-Properties
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_color, "color" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_color, "color" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_background, "background" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_background_color, "background-color" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_background, "background" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_background_color, "background-color" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_transparent, "transparent" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_transparent, "transparent" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_repeat, "repeat" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_repeat_x, "repeat-x" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_repeat_y, "repeat-y" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_no_repeat, "no-repeat" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_repeat, "repeat" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_repeat_x, "repeat-x" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_repeat_y, "repeat-y" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_no_repeat, "no-repeat" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_top, "top" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_middle, "middle" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_bottom, "bottom" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_top, "top" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_middle, "middle" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_bottom, "bottom" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_scroll, "scroll" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_scroll, "scroll" );
/* */
// Strings fuer Text-Properties
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_letter_spacing, "letter-spacing" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_letter_spacing, "letter-spacing" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_text_decoration, "text-decoration" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_text_decoration, "text-decoration" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_none, "none" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_underline, "underline" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_overline, "overline" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_line_through, "line-through" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_blink, "blink" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_none, "none" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_underline, "underline" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_overline, "overline" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_line_through, "line-through" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_blink, "blink" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_text_align, "text-align" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_text_align, "text-align" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_left, "left" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_center, "center" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_right, "right" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_justify, "justify" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_left, "left" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_center, "center" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_right, "right" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_justify, "justify" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_text_indent, "text-indent" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_text_indent, "text-indent" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_line_height, "line-height" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_line_height, "line-height" );
/* */
// Strings fuer Box-Properties
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_margin_left, "margin-left" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_margin_right, "margin-right" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_margin_top, "margin-top" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_margin_bottom, "margin-bottom" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_margin, "margin" );
-
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_padding_top, "padding-top" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_padding_bottom, "padding-bottom" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_padding_left, "padding-left" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_padding_right, "padding-right" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_padding, "padding" );
-
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_auto, "auto" );
-
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_border_left_width, "border-left-width" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_border_right_width, "border-right-width" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_border_top_width, "border-top-width" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_border_bottom_width, "border-bottom-width" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_border_width, "border-width" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_border_color, "border-color" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_border_style, "border-style" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_border_left, "border-left" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_border_right, "border-right" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_border_top, "border-top" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_border_bottom, "border-bottom" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_border, "border" );
-
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_thin, "thin" );
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_medium, "medium" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_thick, "thick" );
-
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_none, "none" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_dotted, "dotted" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_dashed, "dashed" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_solid, "solid" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_double, "double" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_groove, "groove" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_ridge, "ridge" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_inset, "inset" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_outset, "outset" );
-
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_width, "width" );
-
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_height, "height" );
-
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_float, "float" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_margin_left, "margin-left" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_margin_right, "margin-right" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_margin_top, "margin-top" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_margin_bottom, "margin-bottom" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_margin, "margin" );
+
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_padding_top, "padding-top" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_padding_bottom, "padding-bottom" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_padding_left, "padding-left" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_padding_right, "padding-right" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_padding, "padding" );
+
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_auto, "auto" );
+
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_border_left_width, "border-left-width" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_border_right_width, "border-right-width" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_border_top_width, "border-top-width" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_border_bottom_width, "border-bottom-width" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_border_width, "border-width" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_border_color, "border-color" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_border_style, "border-style" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_border_left, "border-left" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_border_right, "border-right" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_border_top, "border-top" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_border_bottom, "border-bottom" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_border, "border" );
+
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_thin, "thin" );
+//sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_medium, "medium" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_thick, "thick" );
+
+//sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_none, "none" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_dotted, "dotted" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_dashed, "dashed" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_solid, "solid" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_double, "double" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_groove, "groove" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_ridge, "ridge" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_inset, "inset" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_outset, "outset" );
+
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_width, "width" );
+
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_height, "height" );
+
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_float, "float" );
/* */
// Strings fuer Positioning
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_position, "position" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_position, "position" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_absolute, "absolute" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_relative, "relative" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_static, "static" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_absolute, "absolute" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_relative, "relative" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_static, "static" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_left, "left" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_left, "left" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_top, "top" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_top, "top" );
/* */
@@ -258,34 +259,35 @@ extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_top, "top" );
// Strings fuer Printing Extensions
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_page_break_before, "page-break-before" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_page_break_after, "page-break-after" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_page_break_inside, "page-break-inside" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_size, "size" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_widows, "widows" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_orphans, "orphans" );
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_marks, "marks" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_page_break_before, "page-break-before" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_page_break_after, "page-break-after" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_page_break_inside, "page-break-inside" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_size, "size" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_widows, "widows" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_orphans, "orphans" );
+//sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_marks, "marks" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_always, "always" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_avoid, "avoid" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_always, "always" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_avoid, "avoid" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_portrait, "portrait" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_landscape, "landscape" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_portrait, "portrait" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_landscape, "landscape" );
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_crop, "crop" );
-//sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_cross, "cross" );
+//sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_crop, "crop" );
+//sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_cross, "cross" );
// /Feature: PrintExt
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_class_abs_pos, "sd-abs-pos" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_class_abs_pos, "sd-abs-pos" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_so_language, "so-language" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_direction, "direction" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_ltr, "ltr" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_rtl, "rtl" );
-extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_inherit, "inherit" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_so_language, "so-language" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_direction, "direction" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_ltr, "ltr" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_rtl, "rtl" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_inherit, "inherit" );
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index c057db76e72c..1747205b5fb6 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,21 +103,13 @@ using namespace ::com::sun::star;
* diese Section und die dazugeherigen Tabellen muessen in folgenden Files
* gepflegt werden: rtf\rtfatr.cxx, sw6\sw6atr.cxx, w4w\w4watr.cxx
*/
-#if !defined(UNX) && !defined(MSC) && !defined(PPC) && !defined(CSET) && !defined(__MWERKS__) && !defined(WTC) && !defined(__MINGW32__) && !defined(OS2)
+#if !defined(UNX) && !defined(MSC) && !defined(PPC) && !defined(__MINGW32__) && !defined(OS2)
#define ATTRFNTAB_SIZE 130
#if ATTRFNTAB_SIZE != POOLATTR_END - POOLATTR_BEGIN
#error Attribut-Tabelle ist ungueltigt. Wurden neue Hint-IDs zugefuegt ??
#endif
-#ifdef FORMAT_TABELLE
-// da sie nicht benutzt wird!
-#define FORMATTAB_SIZE 7
-#if FORMATTAB_SIZE != RES_FMT_END - RES_FMT_BEGIN
-#error Format-Tabelle ist ungueltigt. Wurden neue Hint-IDs zugefuegt ??
-#endif
-#endif
-
#define NODETAB_SIZE 3
#if NODETAB_SIZE != RES_NODE_END - RES_NODE_BEGIN
#error Node-Tabelle ist ungueltigt. Wurden neue Hint-IDs zugefuegt ??
@@ -132,7 +125,7 @@ using namespace ::com::sun::star;
//-----------------------------------------------------------------------
-HTMLOutEvent __FAR_DATA aAnchorEventTable[] =
+HTMLOutEvent aAnchorEventTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_O_SDonclick, OOO_STRING_SVTOOLS_HTML_O_onclick, SFX_EVENT_MOUSECLICK_OBJECT },
{ OOO_STRING_SVTOOLS_HTML_O_SDonmouseover, OOO_STRING_SVTOOLS_HTML_O_onmouseover, SFX_EVENT_MOUSEOVER_OBJECT },
@@ -144,7 +137,7 @@ static Writer& OutHTML_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt );
static Writer& OutHTML_HoriSpacer( Writer& rWrt, sal_Int16 nSize )
{
- ASSERT( nSize>0, "horizontaler SPACER mit negativem Wert?" )
+ OSL_ENSURE( nSize>0, "horizontaler SPACER mit negativem Wert?" );
if( nSize <= 0 )
return rWrt;
@@ -325,7 +318,7 @@ struct SwHTMLFmtInfo
// Konstruktor fuer einen Dummy zum Suchen
SwHTMLFmtInfo( const SwFmt *pF ) :
- pFmt( pF ), pItemSet( 0 )
+ pFmt( pF ), pRefFmt(0), pItemSet( 0 ), nFirstLineIndent(0)
{}
@@ -356,15 +349,15 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
sal_Bool bOutStyles,
LanguageType eDfltLang,
sal_uInt16 nCSS1Script, sal_Bool bHardDrop ) :
- pFmt( pF ), pItemSet( 0 ), bScriptDependent( sal_False )
+ pFmt( pF ), pRefFmt(0), pItemSet( 0 ), bScriptDependent( sal_False )
{
sal_uInt16 nRefPoolId = 0;
// Den Selektor des Formats holen
sal_uInt16 nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass,
nRefPoolId );
- ASSERT( nDeep ? aToken.Len()>0 : aToken.Len()==0,
+ OSL_ENSURE( nDeep ? aToken.Len()>0 : aToken.Len()==0,
"Hier stimmt doch was mit dem Token nicht!" );
- ASSERT( nDeep ? nRefPoolId : !nRefPoolId,
+ OSL_ENSURE( nDeep ? nRefPoolId : !nRefPoolId,
"Hier stimmt doch was mit der Vergleichs-Vorlage nicht!" );
sal_Bool bTxtColl = pFmt->Which() == RES_TXTFMTCOLL ||
@@ -575,7 +568,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
const SfxItemSet *pNodeItemSet,
SwHTMLTxtCollOutputInfo& rInfo )
{
- ASSERT( RES_CONDTXTFMTCOLL==rFmt.Which() || RES_TXTFMTCOLL==rFmt.Which(),
+ OSL_ENSURE( RES_CONDTXTFMTCOLL==rFmt.Which() || RES_TXTFMTCOLL==rFmt.Which(),
"keine Absatz-Vorlage" );
SwHTMLWriter & rHWrt = (SwHTMLWriter&)rWrt;
@@ -618,15 +611,15 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
bNumbered = aNumInfo.IsNumbered();
sal_uInt8 nLvl = aNumInfo.GetLevel();
- ASSERT( pTxtNd->GetActualListLevel() == nLvl,
+ OSL_ENSURE( pTxtNd->GetActualListLevel() == nLvl,
"Gemerkter Num-Level ist falsch" );
- ASSERT( bNumbered == static_cast< sal_Bool >(pTxtNd->IsCountedInList()),
+ OSL_ENSURE( bNumbered == static_cast< sal_Bool >(pTxtNd->IsCountedInList()),
"Gemerkter Numerierungs-Zustand ist falsch" );
if( bNumbered )
{
nBulletGrfLvl = nLvl; // nur veruebergehend!!!
- // --> OD 2005-11-15 #i57919#
+ // #i57919#
// correction of re-factoring done by cws swnumtree:
// - <nNumStart> has to contain the restart value, if the
// numbering is restarted at this text node. Value <USHRT_MAX>
@@ -673,13 +666,13 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// der erste Buchstabe reicht meistens
switch( rInfo.aToken.GetChar( 0 ) )
{
- case 'A': ASSERT( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_address),
+ case 'A': OSL_ENSURE( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_address),
"Doch kein ADDRESS?" );
rInfo.bParaPossible = sal_True;
rHWrt.bNoAlign = sal_True;
break;
- case 'B': ASSERT( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_blockquote),
+ case 'B': OSL_ENSURE( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_blockquote),
"Doch kein BLOCKQUOTE?" );
rInfo.bParaPossible = sal_True;
rHWrt.bNoAlign = sal_True;
@@ -691,7 +684,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
}
else
{
- ASSERT( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_preformtxt),
+ OSL_ENSURE( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_preformtxt),
"Doch kein PRE?" );
if( HTML_PREFORMTXT_ON == rHWrt.nLastParaToken )
{
@@ -706,7 +699,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
}
break;
- case 'D': ASSERT( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_dt) ||
+ case 'D': OSL_ENSURE( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_dt) ||
rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_dd),
"Doch kein DD/DT?" );
bDT = rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_dt);
@@ -728,7 +721,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// Falls noetig, die harte Attributierung der Vorlage uebernehmen
if( pFmtInfo->pItemSet )
{
- ASSERT( !rInfo.pItemSet, "Wo kommt der Item-Set her?" );
+ OSL_ENSURE( !rInfo.pItemSet, "Wo kommt der Item-Set her?" );
rInfo.pItemSet = new SfxItemSet( *pFmtInfo->pItemSet );
}
@@ -857,7 +850,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// ggf. eine Aufzaehlung- oder Numerierungsliste beginnen
if( rInfo.bInNumBulList )
{
- ASSERT( !rHWrt.nDefListLvl, "DL in OL geht nicht!" );
+ OSL_ENSURE( !rHWrt.nDefListLvl, "DL in OL geht nicht!" );
OutHTML_NumBulListStart( rHWrt, aNumInfo );
if( bNumbered )
@@ -899,7 +892,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
else
{
rHWrt.nDfltTopMargin = pFmtInfo->nTopMargin;
- // #60393#: Wenn im letzten Absatz einer Tabelle der
+ // Wenn im letzten Absatz einer Tabelle der
// untere Absatz-Abstand veraendert wird, vertut sich
// Netscape total. Deshalb exportieren wir hier erstmal
// nichts, indem wir den Abstand aus dem Absatz als Default
@@ -946,7 +939,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
rHWrt.IsHTMLMode( HTMLMODE_NO_CONTROL_CENTERING ) &&
rHWrt.HasControls() )
{
- // #64687#: The align=... attribute does behave strange in netscape
+ // The align=... attribute does behave strange in netscape
// if there are controls in a paragraph, because the control and
// all text behind the control does not recognize this attribute.
ByteString sOut( '<' );
@@ -1114,8 +1107,8 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( nBulletGrfLvl != 255 )
{
- ASSERT( aNumInfo.GetNumRule(), "Wo ist die Numerierung geblieben???" );
- ASSERT( nBulletGrfLvl < MAXLEVEL, "So viele Ebenen gibt's nicht" );
+ OSL_ENSURE( aNumInfo.GetNumRule(), "Wo ist die Numerierung geblieben???" );
+ OSL_ENSURE( nBulletGrfLvl < MAXLEVEL, "So viele Ebenen gibt's nicht" );
const SwNumFmt& rNumFmt = aNumInfo.GetNumRule()->Get(nBulletGrfLvl);
OutHTML_BulletImage( rWrt, OOO_STRING_SVTOOLS_HTML_image, 0,
@@ -1340,7 +1333,7 @@ sal_uInt16 HTMLEndPosLst::_FindStartPos( const HTMLSttEndPos *pPos ) const
for( i = 0; i < aStartLst.Count() && aStartLst[i] != pPos; i++ )
;
- ASSERT( i != aStartLst.Count(), "Item nicht in Start-Liste gefunden!" );
+ OSL_ENSURE( i != aStartLst.Count(), "Item nicht in Start-Liste gefunden!" );
return i==aStartLst.Count() ? USHRT_MAX : i;
}
@@ -1352,7 +1345,7 @@ sal_uInt16 HTMLEndPosLst::_FindEndPos( const HTMLSttEndPos *pPos ) const
for( i = 0; i < aEndLst.Count() && aEndLst[i] != pPos; i++ )
;
- ASSERT( i != aEndLst.Count(), "Item nicht in Ende-Liste gefunden" );
+ OSL_ENSURE( i != aEndLst.Count(), "Item nicht in Ende-Liste gefunden" );
return i==aEndLst.Count() ? USHRT_MAX : i;
}
@@ -1529,10 +1522,6 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem )
case RES_PARATR_DROP:
eState = HTML_DROPCAP_VALUE;
break;
-
-// default:
-// eState = HTML_NOT_SUPPORTED;
-// break;
}
return eState;
@@ -1805,8 +1794,8 @@ HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl,
HTMLEndPosLst::~HTMLEndPosLst()
{
- ASSERT( !aStartLst.Count(), "Start-Liste im Destruktor nicht leer" );
- ASSERT( !aEndLst.Count(), "End-Liste im Destruktor nicht leer" );
+ OSL_ENSURE( !aStartLst.Count(), "Start-Liste im Destruktor nicht leer" );
+ OSL_ENSURE( !aEndLst.Count(), "End-Liste im Destruktor nicht leer" );
}
@@ -1858,7 +1847,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
case HTML_CHRFMT_VALUE:
{
- ASSERT( RES_TXTATR_CHARFMT == rItem.Which(),
+ OSL_ENSURE( RES_TXTATR_CHARFMT == rItem.Which(),
"Doch keine Zeichen-Vorlage" );
const SwFmtCharFmt& rChrFmt = (const SwFmtCharFmt&)rItem;
const SwCharFmt* pFmt = rChrFmt.GetCharFmt();
@@ -1891,7 +1880,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
// Eine Vordergrund-Farbe als Absatz-Attribut wird nur
// exportiert, wenn sie nicht der Default-Farbe entspricht.
{
- ASSERT( RES_CHRATR_COLOR == rItem.Which(),
+ OSL_ENSURE( RES_CHRATR_COLOR == rItem.Which(),
"Doch keine Vordergrund-Farbe" );
Color aColor( ((const SvxColorItem&)rItem).GetValue() );
if( COL_AUTO == aColor.GetColor() )
@@ -1903,7 +1892,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
case HTML_DROPCAP_VALUE:
{
- ASSERT( RES_PARATR_DROP == rItem.Which(),
+ OSL_ENSURE( RES_PARATR_DROP == rItem.Which(),
"Doch kein Drop-Cap" );
const SwFmtDrop& rDrop = (const SwFmtDrop&)rItem;
nEnd = nStart + rDrop.GetChars();
@@ -2084,7 +2073,7 @@ sal_uInt16 HTMLEndPosLst::GetScriptAtPos( xub_StrLen nPos ,
size_t i=0;
while( i < nScriptChgs && nPos >= aScriptChgLst[i] )
i++;
- ASSERT( i < nScriptChgs, "script list is to short" );
+ OSL_ENSURE( i < nScriptChgs, "script list is to short" );
if( i < nScriptChgs )
{
if( i18n::ScriptType::WEAK == aScriptLst[i] )
@@ -2164,7 +2153,7 @@ void HTMLEndPosLst::OutEndAttrs( SwHTMLWriter& rHWrt, xub_StrLen nPos,
{
// Das Attribut wird vor der aktuellen Position beendet. Das
// darf nicht sein, aber wie koennen trotzdem damit umgehen
- ASSERT( nEnd >= nPos,
+ OSL_ENSURE( nEnd >= nPos,
"Das Attribut sollte schon laengst beendet sein" );
i++;
}
@@ -2416,7 +2405,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
xub_StrLen nOffset = 0;
String aOutlineTxt;
String aFullText;
- // --> OD 2006-06-12 #b6435904#
+
// export numbering string as plain text only for the outline numbering,
// because the outline numbering isn't exported as a numbering - see <SwHTMLNumRuleInfo::Set(..)>
if ( pNd->IsOutline() &&
@@ -2581,7 +2570,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
else
{
// Hints ohne-Ende werden als letztes ausgebeben
- ASSERT( !pTxtHt,
+ OSL_ENSURE( !pTxtHt,
"Wieso gibt es da schon ein Attribut ohne Ende?" );
if( rHTMLWrt.nTxtAttrsToIgnore>0 )
{
@@ -2687,7 +2676,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
if( bFlysLeft )
bFlysLeft = rHTMLWrt.OutFlyFrm( rNode.GetIndex(),
nEnde, HTML_POS_INSIDE );
- ASSERT( !bFlysLeft, "Es wurden nicht alle Rahmen gespeichert!" );
+ OSL_ENSURE( !bFlysLeft, "Es wurden nicht alle Rahmen gespeichert!" );
rHTMLWrt.bTxtAttr = sal_False;
@@ -2792,11 +2781,6 @@ static Writer& OutHTML_SvxColor( Writer& rWrt, const SfxPoolItem& rHt )
if( rHTMLWrt.bOutOpts )
return rWrt;
- // die Default-Farbe nur Schreiben, wenn sie als Hint vorkommt
- //if( rHTMLWrt.bTagOn && !rHTMLWrt.bTxtAttr && rHTMLWrt.pDfltColor
- // && rColor == *rHTMLWrt.pDfltColor )
- // return rWrt;
-
if( !rHTMLWrt.bTxtAttr && rHTMLWrt.bCfgOutStyles && rHTMLWrt.bCfgPreferStyles )
{
// Font-Farbe nicht als Tag schreiben, wenn Styles normalen Tags
@@ -3122,14 +3106,10 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, sal_Bool bO
rWrt.Strm() << sOut.GetBuffer();
-#define REL_HACK
-#ifdef REL_HACK
String sRel;
-#endif
if( aURL.Len() || bEvents )
{
-#ifdef REL_HACK
String sTmp( aURL );
sTmp.ToUpperAscii();
xub_StrLen nPos = sTmp.SearchAscii( "\" REL=" );
@@ -3138,7 +3118,6 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, sal_Bool bO
sRel = aURL.Copy( nPos+1 );
aURL.Erase( nPos );
}
-#endif
aURL.EraseLeadingChars().EraseTrailingChars();
((sOut = ' ') += OOO_STRING_SVTOOLS_HTML_O_href) += "=\"";
@@ -3167,10 +3146,9 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, sal_Bool bO
sOut = '\"';
}
-#ifdef REL_HACK
if( sRel.Len() )
sOut += ByteString( sRel, RTL_TEXTENCODING_ASCII_US );
-#endif
+
if( sOut.Len() )
rWrt.Strm() << sOut.GetBuffer();
@@ -3215,7 +3193,7 @@ static Writer& OutHTML_SwFmtINetFmt( Writer& rWrt, const SfxPoolItem& rHt )
// das
OutHTML_INetFmt( rWrt, rINetFmt, sal_False );
- ASSERT( rHTMLWrt.aINetFmts.Count(), "da fehlt doch ein URL-Attribut" );
+ OSL_ENSURE( rHTMLWrt.aINetFmts.Count(), "da fehlt doch ein URL-Attribut" );
if( rHTMLWrt.aINetFmts.Count() )
{
// das eigene Attribut vom Stack holen
@@ -3259,7 +3237,7 @@ static Writer& OutHTML_SwTxtCharFmt( Writer& rWrt, const SfxPoolItem& rHt )
return rWrt;
const SwHTMLFmtInfo *pFmtInfo = rHTMLWrt.aChrFmtInfos[nPos];
- ASSERT( pFmtInfo, "Wieso gint es keine Infos ueber die Zeichenvorlage?" );
+ OSL_ENSURE( pFmtInfo, "Wieso gint es keine Infos ueber die Zeichenvorlage?" );
if( rHTMLWrt.bTagOn )
{
@@ -3492,3 +3470,5 @@ SwAttrFnTab aHTMLAttrFnTab = {
/* RES_BOXATR_FORMULA */ 0,
/* RES_BOXATR_VALUE */ 0
};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index da10cc927b35..339b4da73042 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,7 +63,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
-static HTMLOutEvent __FAR_DATA aBodyEventTable[] =
+static HTMLOutEvent aBodyEventTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_O_SDonload, OOO_STRING_SVTOOLS_HTML_O_onload, SFX_EVENT_OPENDOC },
{ OOO_STRING_SVTOOLS_HTML_O_SDonunload, OOO_STRING_SVTOOLS_HTML_O_onunload, SFX_EVENT_PREPARECLOSEDOC },
@@ -102,10 +103,6 @@ void SwHTMLParser::EndScript()
bIgnoreRawData = sal_False;
aScriptSource.ConvertLineEnd();
-// MIB 23.5.97: SGML-Kommentare brauchen nicht mehr entfernt zu werden,
-// weil JS das jetzt selber kann.
-// RemoveSGMLComment( aScriptSource, sal_True );
-
// Ausser StarBasic und unbenutzem JavaScript jedes Script oder den
// Modulnamen in einem Feld merken merken
if( bInsSrcIntoFld && !bIgnoreHTMLComments )
@@ -132,7 +129,7 @@ void SwHTMLParser::EndScript()
if( aBasicLib.Len() )
aLibName = aBasicLib;
else
- aLibName = ::rtl::OUString::createFromAscii( "Standard" );
+ aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
// get module library container
Reference< script::XLibraryContainer > xModLibContainer( pDocSh->GetBasicContainer(), UNO_QUERY );
@@ -254,12 +251,12 @@ void SwHTMLParser::InsertBasicDocEvent( rtl::OUString aEvent, const String& rNam
ScriptType eScrType,
const String& rScrType )
{
- ASSERT( rName.Len(), "InsertBasicDocEvent() ohne Macro gerufen" );
+ OSL_ENSURE( rName.Len(), "InsertBasicDocEvent() ohne Macro gerufen" );
if( !rName.Len() )
return;
SwDocShell *pDocSh = pDoc->GetDocShell();
- ASSERT( pDocSh, "Wo ist die DocShell?" );
+ OSL_ENSURE( pDocSh, "Wo ist die DocShell?" );
if( !pDocSh )
return;
@@ -281,8 +278,8 @@ void SwHTMLWriter::OutBasic()
return;
BasicManager *pBasicMan = pDoc->GetDocShell()->GetBasicManager();
- ASSERT( pBasicMan, "Wo ist der Basic-Manager?" );
- //JP 17.07.96: Bug 29538 - nur das DocumentBasic schreiben
+ OSL_ENSURE( pBasicMan, "Wo ist der Basic-Manager?" );
+ // nur das DocumentBasic schreiben
if( !pBasicMan || pBasicMan == SFX_APP()->GetBasicManager() )
{
return;
@@ -299,7 +296,7 @@ void SwHTMLWriter::OutBasic()
for( sal_uInt16 j=0; j<pModules->Count(); j++ )
{
const SbModule *pModule = PTR_CAST( SbModule, pModules->Get(j) );
- ASSERT( pModule, "Wo ist das Modul?" );
+ OSL_ENSURE( pModule, "Wo ist das Modul?" );
String sLang(
String::CreateFromAscii( SVX_MACRO_LANGUAGE_STARBASIC ) );
@@ -361,3 +358,4 @@ void SwHTMLWriter::OutBasicBodyEvents()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 2287bddb9e21..a8b8d5b03411 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,7 +43,6 @@
#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>
@@ -113,7 +113,7 @@ void SwCSS1Parser::ChgPageDesc( const SwPageDesc *pPageDesc,
return;
}
- ASSERT( i<nPageDescs, "Seitenvorlage nicht gefunden" );
+ OSL_ENSURE( i<nPageDescs, "Seitenvorlage nicht gefunden" );
}
SwCSS1Parser::SwCSS1Parser( SwDoc *pD, sal_uInt32 aFHeights[7], const String& rBaseURL, sal_Bool bNewDoc ) :
@@ -174,9 +174,6 @@ sal_Bool SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet,
case SVX_CSS1_PBREAK_AUTO:
bSetBreak = bSetPageDesc = sal_True;
break;
-// case SVX_CSS1_PBREAK_AVOID:
- // Hier koennte man SvxKeepItem am Absatz davor einfuegen
-// break;
default:
;
}
@@ -241,7 +238,7 @@ static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet )
void SwCSS1Parser::SetLinkCharFmts()
{
- ASSERT( !bLinkCharFmtsSet, "Aufruf von SetLinkCharFmts unnoetig" );
+ OSL_ENSURE( !bLinkCharFmtsSet, "Aufruf von SetLinkCharFmts unnoetig" );
SvxCSS1MapEntry *pStyleEntry =
GetTag( String::CreateFromAscii(OOO_STRING_SVTOOLS_HTML_anchor) );
@@ -361,7 +358,7 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
void SwCSS1Parser::SetTableTxtColl( sal_Bool bHeader )
{
- ASSERT( !(bHeader ? bTableHeaderTxtCollSet : bTableTxtCollSet),
+ OSL_ENSURE( !(bHeader ? bTableHeaderTxtCollSet : bTableTxtCollSet),
"Aufruf von SetTableTxtColl unnoetig" );
sal_uInt16 nPoolId;
@@ -658,7 +655,7 @@ static CSS1SelectorType GetTokenAndClass( const CSS1Selector *pSelector,
if( CSS1_SELTYPE_ELEM_CLASS==eType )
{
xub_StrLen nPos = rToken.Search( '.' );
- ASSERT( nPos != STRING_NOTFOUND, "kein Punkt in Class-Selektor???" );
+ OSL_ENSURE( nPos != STRING_NOTFOUND, "kein Punkt in Class-Selektor???" );
if( nPos != STRING_NOTFOUND )
{
rClass = rToken.Copy( nPos+1 );
@@ -704,7 +701,7 @@ static void RemoveScriptItems( SfxItemSet& rItemSet, sal_uInt16 nScript,
case CSS1_SCRIPT_ALL:
break;
default:
- ASSERT( aClearItems[0], "unknown script type" );
+ OSL_ENSURE( aClearItems[0], "unknown script type" );
break;
}
@@ -762,13 +759,12 @@ sal_Bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
(pNext->GetString().EqualsIgnoreCaseAscii(sCSS1_left) ||
pNext->GetString().EqualsIgnoreCaseAscii(sCSS1_right) ||
pNext->GetString().EqualsIgnoreCaseAscii(sCSS1_first)) ) )
- // || CSS1_SELTYPE_ELEMENT == pNext->GetType() )
{
String aName;
if( pNext )
aName = pNext->GetString();
InsertPage( aName,
- pNext != 0 /*CSS1_SELTYPE_PSEUDO == pNext->GetType()*/,
+ pNext != 0,
rItemSet, rPropInfo );
}
}
@@ -852,7 +848,6 @@ sal_Bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
const SvxBrushItem *pBrushItem =
(const SvxBrushItem *)pItem;
- /// OD 02.09.2002 #99657#
/// Body has a background color, if it is not "no fill"/"auto fill"
if( pBrushItem->GetColor() != COL_TRANSPARENT )
bBodyBGColorSet = sal_True;
@@ -1020,12 +1015,8 @@ sal_Bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
{
if( !pNext ||
(CSS1_SELTYPE_PSEUDO==eNextType &&
-#ifdef FULL_FIRST_LETTER
- pNext->GetString().EqualsIgnoreCaseAscii(sCSS1_first_letter)) )
-#else
pNext->GetString().EqualsIgnoreCaseAscii(sCSS1_first_letter) &&
SVX_ADJUST_LEFT == rPropInfo.eFloat) )
-#endif
{
// Entweder kein zusammengesetzter Selektor oder
// ein X:first-line { float: left; ... }
@@ -1230,7 +1221,7 @@ SwCharFmt* SwCSS1Parser::GetChrFmt( sal_uInt16 nToken2, const String& rClass ) c
}
}
- ASSERT( pCFmt, "Keine Zeichen-Vorlage???" );
+ OSL_ENSURE( pCFmt, "Keine Zeichen-Vorlage???" );
// Wenn es eine Klasse gibt, die Klassen-Vorlage suchen aber nicht
// neu anlegen.
@@ -1324,7 +1315,7 @@ SwTxtFmtColl *SwCSS1Parser::GetTxtFmtColl( sal_uInt16 nTxtColl,
String sName;
if( USER_FMT & nTxtColl ) // eine vom Reader angelegte
{
- ASSERT( !this, "Wo kommt die Benutzer-Vorlage her?" );
+ OSL_ENSURE( !this, "Wo kommt die Benutzer-Vorlage her?" );
pColl = GetTxtCollFromPool( RES_POOLCOLL_STANDARD );
}
else
@@ -1332,7 +1323,7 @@ SwTxtFmtColl *SwCSS1Parser::GetTxtFmtColl( sal_uInt16 nTxtColl,
pColl = GetTxtCollFromPool( nTxtColl );
}
- ASSERT( pColl, "Keine Absatz-Vorlage???" );
+ OSL_ENSURE( pColl, "Keine Absatz-Vorlage???" );
if( aClass.Len() )
{
String aTmp( pColl->GetName() );
@@ -1421,7 +1412,7 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( sal_uInt16 nPoolId, sal_Bool bCreat
// dazu brauchen wir auch die Nummer der neuen Vorlage
pPageDesc = FindPageDesc( pDoc, nPoolId, nPage );
- ASSERT( pPageDesc==pNewPageDesc, "Seitenvorlage nicht gefunden" );
+ OSL_ENSURE( pPageDesc==pNewPageDesc, "Seitenvorlage nicht gefunden" );
pDoc->CopyPageDesc( *pMasterPageDesc, *pNewPageDesc, sal_False );
@@ -1515,11 +1506,7 @@ sal_Bool SwCSS1Parser::MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
void SwCSS1Parser::AddClassName( String& rFmtName, const String& rClass )
{
- ASSERT( rClass.Len(), "Style-Klasse ohne Laenge?" );
-
-// ??????????
-// String aTmp( rClass );
-// GetpApp()->GetAppInternational().ToLower( aTmp );
+ OSL_ENSURE( rClass.Len(), "Style-Klasse ohne Laenge?" );
(rFmtName += '.') += rClass;
}
@@ -1555,11 +1542,7 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
// Bei harter Attributierung (pName==0) koennen wir aufhoehren, wenn
// das Initial nur ueber eine Zeile geht.
-#ifdef FULL_FIRST_LETTER
- if( nLines<=1 && !pName )
-#else
if( nLines<=1 )
-#endif
return;
rDrop.GetLines() = nLines;
@@ -1809,7 +1792,7 @@ sal_Bool SwHTMLParser::FileDownload( const String& rURL,
#endif
CallStartAction( pOldVSh );
#if OSL_DEBUG_LEVEL > 1
- ASSERT( pOldVSh == pVSh, "FileDownload: ViewShell wurde ausgetauscht" );
+ OSL_ENSURE( pOldVSh == pVSh, "FileDownload: ViewShell wurde ausgetauscht" );
(void) pVSh;
#endif
@@ -1821,13 +1804,13 @@ void SwHTMLParser::InsertLink()
sal_Bool bFinishDownload = sal_False;
if( pPendStack )
{
- ASSERT( ShouldFinishFileDownload(),
+ OSL_ENSURE( ShouldFinishFileDownload(),
"Pending-Stack ohne File-Download?" );
SwPendingStack* pTmp = pPendStack->pNext;
delete pPendStack;
pPendStack = pTmp;
- ASSERT( !pPendStack, "Wo kommt der Pending-Stack her?" );
+ OSL_ENSURE( !pPendStack, "Wo kommt der Pending-Stack her?" );
bFinishDownload = sal_True;
}
@@ -1918,13 +1901,6 @@ sal_Bool SwCSS1Parser::ParseStyleSheet( const String& rIn )
pPageEntry->GetPropertyInfo() );
SetPageDescAttrs( GetRightPageDesc(), pPageEntry->GetItemSet(),
pPageEntry->GetPropertyInfo() );
-// if( pNamedPageDescs )
-// {
-// for( sal_uInt16 i=0; i<pNamedPageDescs->Count(); i++ )
-// SetPageDescAttrs( (*pNamedPageDescs)[i],
-// pPageEntry->GetItemSet(),
-// pPageEntry->GetPropertyInfo() );
-// }
}
@@ -1949,29 +1925,6 @@ sal_Bool SwCSS1Parser::ParseStyleSheet( const String& rIn )
SetPageDescAttrs( GetLeftPageDesc(sal_True), pPageEntry->GetItemSet(),
pPageEntry->GetPropertyInfo() );
- // und jetzt noch die benannten Vorlagen
-// for( sal_uInt16 i=0; i < GetPageCount(); i++ )
-// {
-// pPageEntry = GetPage( i );
-// const String& rKey = pPageEntry->GetKey();
-// if( !rKey.Len() || rKey.GetChar(0) == ':' )
-// continue;
-//
-// String aName( rKey );
-// GetpApp()->GetAppInternational().ToLower( aName );
-// sal_uInt16 nPage = pDoc->MakePageDesc( aName );
-// SwPageDesc *pPageDesc = &pDoc->_GetPageDesc( nPage );
-//
-// // Die neue Seitenvorlage entsteht aus dem Master durch kopieren.
-// pDoc->CopyPageDesc( *pMasterPageDesc, *pPageDesc );
-// SetPageDescAttrs( pPageDesc, pPageEntry->GetItemSet(),
-// pPageEntry->GetPropertyInfo() );
-//
-// if( !pNamedPageDescs )
-// pNamedPageDescs = new SwHTMLPageDescs;
-// pNamedPageDescs->Insert( pPageDesc, pNamedPageDescs->Count() );
-// }
-
return sal_True;
}
@@ -2475,3 +2428,5 @@ void SwCSS1Parser::SetDfltEncoding( rtl_TextEncoding eEnc )
SvxCSS1Parser::SetDfltEncoding( eEnc );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index e60f6800cd58..3717496db121 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -149,7 +150,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
- ASSERT( !aParaAttrs.Count(),
+ OSL_ENSURE( !aParaAttrs.Count(),
"Hoechste Gefahr: Es gibt noch nicht-endgueltige Absatz-Attribute" );
if( aParaAttrs.Count() )
aParaAttrs.Remove( 0, aParaAttrs.Count() );
@@ -357,7 +358,7 @@ void SwHTMLParser::EndContext( _HTMLAttrContext *pContext )
while( aContexts.Count() > nContextStMin )
{
_HTMLAttrContext *pCntxt = PopContext();
- ASSERT( pCntxt != pContext,
+ OSL_ENSURE( pCntxt != pContext,
"Kontext noch im Stack" );
if( pCntxt == pContext )
break;
@@ -413,10 +414,10 @@ void SwHTMLParser::ClearContext( _HTMLAttrContext *pContext )
DeleteAttr( rAttrs[i] );
}
- ASSERT( !pContext->GetSpansSection(),
+ OSL_ENSURE( !pContext->GetSpansSection(),
"Bereich kann nicht mehr verlassen werden" );
- ASSERT( !pContext->HasSaveDocContext(),
+ OSL_ENSURE( !pContext->HasSaveDocContext(),
"Rahmen kann nicht mehr verlassen werden" );
// PRE-/LISTING- und XMP-Umgebungen wieder starten
@@ -542,7 +543,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
pCSS1Parser->SetFmtBreak( rItemSet, rPropInfo );
// /Feature: PrintExt
- ASSERT( aContexts.Count() <= nContextStAttrMin ||
+ OSL_ENSURE( aContexts.Count() <= nContextStAttrMin ||
aContexts[aContexts.Count()-1] != pContext,
"SwHTMLParser::InsertAttrs: Kontext doch schon auf dem Stack" );
@@ -587,7 +588,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
// eingefuegt.
if( rPropInfo.bLeftMargin )
{
- ASSERT( rPropInfo.nLeftMargin < 0 ||
+ OSL_ENSURE( rPropInfo.nLeftMargin < 0 ||
rPropInfo.nLeftMargin == pLRItem->GetTxtLeft(),
"linker Abstand stimmt nicht mit Item ueberein" );
if( rPropInfo.nLeftMargin < 0 &&
@@ -598,7 +599,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
}
if( rPropInfo.bRightMargin )
{
- ASSERT( rPropInfo.nRightMargin < 0 ||
+ OSL_ENSURE( rPropInfo.nRightMargin < 0 ||
rPropInfo.nRightMargin == pLRItem->GetRight(),
"rechter Abstand stimmt nicht mit Item ueberein" );
if( rPropInfo.nRightMargin < 0 &&
@@ -750,3 +751,5 @@ SfxItemSet *_HTMLAttrContext::GetFrmItemSet( SwDoc *pCreateDoc )
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
return pFrmItemSet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmldraw.cxx b/sw/source/filter/html/htmldraw.cxx
index e973ad3df26d..ac895745bdfa 100644
--- a/sw/source/filter/html/htmldraw.cxx
+++ b/sw/source/filter/html/htmldraw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,7 +79,7 @@ const sal_uInt32 HTML_FRMOPTS_MARQUEE_CSS1 =
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SPACE;
-static HTMLOptionEnum __FAR_DATA aHTMLMarqBehaviorTable[] =
+static HTMLOptionEnum aHTMLMarqBehaviorTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_BEHAV_scroll, SDRTEXTANI_SCROLL },
{ OOO_STRING_SVTOOLS_HTML_BEHAV_alternate, SDRTEXTANI_ALTERNATE },
@@ -86,7 +87,7 @@ static HTMLOptionEnum __FAR_DATA aHTMLMarqBehaviorTable[] =
{ 0, 0 }
};
-static HTMLOptionEnum __FAR_DATA aHTMLMarqDirectionTable[] =
+static HTMLOptionEnum aHTMLMarqDirectionTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_AL_left, SDRTEXTANI_LEFT },
{ OOO_STRING_SVTOOLS_HTML_AL_right, SDRTEXTANI_RIGHT },
@@ -103,8 +104,8 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
sal_Bool bHidden )
{
// always on top of text.
- // OD 02.07.2003 #108784# but in invisible layer. <ConnectToLayout> will
- // move the object to the visible layer.
+ // but in invisible layer. <ConnectToLayout> will move the object
+ // to the visible layer.
pNewDrawObj->SetLayer( pDoc->GetInvisibleHeavenId() );
SfxItemSet aFrmSet( pDoc->GetAttrPool(),
@@ -195,7 +196,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
{
aAnchor.SetType( FLY_AT_PAGE );
}
- // OD 2004-04-13 #i26791# - direct positioning for <SwDoc::Insert(..)>
+ // #i26791# - direct positioning for <SwDoc::Insert(..)>
pNewDrawObj->SetRelativePos( Point(rCSS1PropInfo.nLeft + nLeftSpace,
rCSS1PropInfo.nTop + nUpperSpace) );
aFrmSet.Put( SwFmtSurround(SURROUND_THROUGHT) );
@@ -206,7 +207,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
aAnchor.SetType( FLY_AT_PARA );
aFrmSet.Put( SwFmtSurround(bHidden ? SURROUND_THROUGHT
: SURROUND_RIGHT) );
- // OD 2004-04-13 #i26791# - direct positioning for <SwDoc::Insert(..)>
+ // #i26791# - direct positioning for <SwDoc::Insert(..)>
pNewDrawObj->SetRelativePos( Point(nLeftSpace, nUpperSpace) );
}
else if( text::VertOrientation::NONE != eVertOri )
@@ -277,7 +278,7 @@ static void PutEEPoolItem( SfxItemSet &rEEItemSet,
void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
{
- ASSERT( !pMarquee, "Marquee in Marquee???" );
+ OSL_ENSURE( !pMarquee, "Marquee in Marquee???" );
aContents.Erase();
String aId, aStyle, aClass;
@@ -386,9 +387,9 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
}
// Ein DrawTxtobj anlegen
- // --> OD 2005-08-08 #i52858# - method name changed
+ // #i52858# - method name changed
SdrModel* pModel = pDoc->GetOrCreateDrawModel();
- // <--
+
SdrPage* pPg = pModel->GetPage( 0 );
pMarquee = SdrObjFactory::MakeNewObject( SdrInventor,
OBJ_TEXT, pPg, pModel );
@@ -568,7 +569,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
void SwHTMLParser::EndMarquee()
{
- ASSERT( pMarquee && OBJ_TEXT==pMarquee->GetObjIdentifier(),
+ OSL_ENSURE( pMarquee && OBJ_TEXT==pMarquee->GetObjIdentifier(),
"kein Marquee oder falscher Typ" );
if( bFixMarqueeWidth )
@@ -596,7 +597,7 @@ void SwHTMLParser::EndMarquee()
void SwHTMLParser::InsertMarqueeText()
{
- ASSERT( pMarquee && OBJ_TEXT==pMarquee->GetObjIdentifier(),
+ OSL_ENSURE( pMarquee && OBJ_TEXT==pMarquee->GetObjIdentifier(),
"kein Marquee oder falscher Typ" );
// das akteulle Textstueck an den Text anhaengen
@@ -605,7 +606,7 @@ void SwHTMLParser::InsertMarqueeText()
void SwHTMLParser::ResizeDrawObject( SdrObject* pObj, SwTwips nWidth )
{
- ASSERT( OBJ_TEXT==pObj->GetObjIdentifier(),
+ OSL_ENSURE( OBJ_TEXT==pObj->GetObjIdentifier(),
"kein Marquee oder falscher Typ" );
if( OBJ_TEXT!=pObj->GetObjIdentifier() )
@@ -692,7 +693,7 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt,
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
- ASSERT( rWrt.pDoc->GetDrawModel(), "Da gibt's ein Draw-Obj ohne ein Draw-Model zu haben?" );
+ OSL_ENSURE( rWrt.pDoc->GetDrawModel(), "Da gibt's ein Draw-Obj ohne ein Draw-Model zu haben?" );
const SdrTextObj *pTextObj = (const SdrTextObj *)&rSdrObject;
// Gibt es ueberhaupt auszugebenden Text
@@ -709,10 +710,10 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt,
// BEHAVIOUR
SdrTextAniKind eAniKind = pTextObj->GetTextAniKind();
- ASSERT( SDRTEXTANI_SCROLL==eAniKind ||
+ OSL_ENSURE( SDRTEXTANI_SCROLL==eAniKind ||
SDRTEXTANI_ALTERNATE==eAniKind ||
SDRTEXTANI_SLIDE==eAniKind,
- "Text-Draw-Objekt nicht fuer Marquee geeignet" )
+ "Text-Draw-Objekt nicht fuer Marquee geeignet" );
const sal_Char *pStr = 0;
switch( eAniKind )
@@ -857,3 +858,4 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index 1419f771fe71..3f5c753e117e 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,7 +56,7 @@ struct HTMLNumFmtTblEntry
NfIndexTableOffset eFmt;
};
-static HTMLOptionEnum __FAR_DATA aHTMLFldTypeTable[] =
+static HTMLOptionEnum aHTMLFldTypeTable[] =
{
{ OOO_STRING_SW_HTML_FT_author, RES_AUTHORFLD },
{ OOO_STRING_SW_HTML_FT_sender, RES_EXTUSERFLD },
@@ -69,7 +70,7 @@ static HTMLOptionEnum __FAR_DATA aHTMLFldTypeTable[] =
{ 0, 0 }
};
-static HTMLNumFmtTblEntry __FAR_DATA aHTMLDateFldFmtTable[] =
+static HTMLNumFmtTblEntry aHTMLDateFldFmtTable[] =
{
{ "SSYS", NF_DATE_SYSTEM_SHORT },
{ "LSYS", NF_DATE_SYSTEM_LONG },
@@ -91,7 +92,7 @@ static HTMLNumFmtTblEntry __FAR_DATA aHTMLDateFldFmtTable[] =
{ 0, NF_NUMERIC_START }
};
-static HTMLNumFmtTblEntry __FAR_DATA aHTMLTimeFldFmtTable[] =
+static HTMLNumFmtTblEntry aHTMLTimeFldFmtTable[] =
{
{ "SYS", NF_TIME_HHMMSS },
{ "SSMM24", NF_TIME_HHMM },
@@ -99,7 +100,7 @@ static HTMLNumFmtTblEntry __FAR_DATA aHTMLTimeFldFmtTable[] =
{ 0, NF_NUMERIC_START }
};
-static HTMLOptionEnum __FAR_DATA aHTMLPageNumFldFmtTable[] =
+static HTMLOptionEnum aHTMLPageNumFldFmtTable[] =
{
{ OOO_STRING_SW_HTML_FF_uletter, SVX_NUM_CHARS_UPPER_LETTER },
{ OOO_STRING_SW_HTML_FF_lletter, SVX_NUM_CHARS_LOWER_LETTER },
@@ -115,7 +116,7 @@ static HTMLOptionEnum __FAR_DATA aHTMLPageNumFldFmtTable[] =
};
-static HTMLOptionEnum __FAR_DATA aHTMLExtUsrFldSubTable[] =
+static HTMLOptionEnum aHTMLExtUsrFldSubTable[] =
{
{ OOO_STRING_SW_HTML_FS_company, EU_COMPANY },
{ OOO_STRING_SW_HTML_FS_firstname, EU_FIRSTNAME },
@@ -135,14 +136,14 @@ static HTMLOptionEnum __FAR_DATA aHTMLExtUsrFldSubTable[] =
{ 0, 0 }
};
-static HTMLOptionEnum __FAR_DATA aHTMLAuthorFldFmtTable[] =
+static HTMLOptionEnum aHTMLAuthorFldFmtTable[] =
{
{ OOO_STRING_SW_HTML_FF_name, AF_NAME },
{ OOO_STRING_SW_HTML_FF_shortcut, AF_SHORTCUT },
{ 0, 0 }
};
-static HTMLOptionEnum __FAR_DATA aHTMLPageNumFldSubTable[] =
+static HTMLOptionEnum aHTMLPageNumFldSubTable[] =
{
{ OOO_STRING_SW_HTML_FS_random, PG_RANDOM },
{ OOO_STRING_SW_HTML_FS_next, PG_NEXT },
@@ -158,7 +159,7 @@ static HTMLOptionEnum __FAR_DATA aHTMLPageNumFldSubTable[] =
const SwDocInfoSubType DI_INFO3 = DI_SUBTYPE_END + 3;
const SwDocInfoSubType DI_INFO4 = DI_SUBTYPE_END + 4;
-static HTMLOptionEnum __FAR_DATA aHTMLDocInfoFldSubTable[] =
+static HTMLOptionEnum aHTMLDocInfoFldSubTable[] =
{
{ OOO_STRING_SW_HTML_FS_title, DI_TITEL },
{ OOO_STRING_SW_HTML_FS_theme, DI_THEMA },
@@ -174,7 +175,7 @@ static HTMLOptionEnum __FAR_DATA aHTMLDocInfoFldSubTable[] =
{ 0, 0 }
};
-static HTMLOptionEnum __FAR_DATA aHTMLDocInfoFldFmtTable[] =
+static HTMLOptionEnum aHTMLDocInfoFldFmtTable[] =
{
{ OOO_STRING_SW_HTML_FF_author, DI_SUB_AUTHOR },
{ OOO_STRING_SW_HTML_FF_time, DI_SUB_TIME },
@@ -182,7 +183,7 @@ static HTMLOptionEnum __FAR_DATA aHTMLDocInfoFldFmtTable[] =
{ 0, 0 }
};
-static HTMLOptionEnum __FAR_DATA aHTMLDocStatFldSubTable[] =
+static HTMLOptionEnum aHTMLDocStatFldSubTable[] =
{
{ OOO_STRING_SW_HTML_FS_page, DS_PAGE },
{ OOO_STRING_SW_HTML_FS_para, DS_PARA },
@@ -194,7 +195,7 @@ static HTMLOptionEnum __FAR_DATA aHTMLDocStatFldSubTable[] =
{ 0, 0 }
};
-static HTMLOptionEnum __FAR_DATA aHTMLFileNameFldFmtTable[] =
+static HTMLOptionEnum aHTMLFileNameFldFmtTable[] =
{
{ OOO_STRING_SW_HTML_FF_name, FF_NAME },
{ OOO_STRING_SW_HTML_FF_pathname, FF_PATHNAME },
@@ -558,25 +559,25 @@ void SwHTMLParser::EndField()
switch( pField->Which() )
{
case RES_DOCINFOFLD:
- ASSERT( ((SwDocInfoField*)pField)->IsFixed(),
+ OSL_ENSURE( ((SwDocInfoField*)pField)->IsFixed(),
"DokInfo-Feld haette nicht gemerkt werden muessen" );
((SwDocInfoField*)pField)->SetExpansion( aContents );
break;
case RES_EXTUSERFLD:
- ASSERT( ((SwExtUserField*)pField)->IsFixed(),
+ OSL_ENSURE( ((SwExtUserField*)pField)->IsFixed(),
"ExtUser-Feld haette nicht gemerkt werden muessen" );
((SwExtUserField*)pField)->SetExpansion( aContents );
break;
case RES_AUTHORFLD:
- ASSERT( ((SwAuthorField*)pField)->IsFixed(),
+ OSL_ENSURE( ((SwAuthorField*)pField)->IsFixed(),
"Author-Feld haette nicht gemerkt werden muessen" );
((SwAuthorField*)pField)->SetExpansion( aContents );
break;
case RES_FILENAMEFLD:
- ASSERT( ((SwFileNameField*)pField)->IsFixed(),
+ OSL_ENSURE( ((SwFileNameField*)pField)->IsFixed(),
"FileName-Feld haette nicht gemerkt werden muessen" );
((SwFileNameField*)pField)->SetExpansion( aContents );
break;
@@ -668,3 +669,4 @@ void SwHTMLParser::InsertComment( const String& rComment, const sal_Char *pTag )
pPam->Move( fnMoveForward );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlfld.hxx b/sw/source/filter/html/htmlfld.hxx
index 2ba89a9af6de..812e895ca287 100644
--- a/sw/source/filter/html/htmlfld.hxx
+++ b/sw/source/filter/html/htmlfld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,3 +91,4 @@
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index 177d39dc5d4b..1d2def315b93 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -114,7 +115,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
default:
;
}
- ASSERT( pSubStr, "ubekannter Subtyp fuer SwExtUserField" );
+ OSL_ENSURE( pSubStr, "ubekannter Subtyp fuer SwExtUserField" );
bFixed = ((const SwExtUserField*)pFld)->IsFixed();
break;
@@ -125,7 +126,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
case AF_NAME: pFmtStr = OOO_STRING_SW_HTML_FF_name; break;
case AF_SHORTCUT: pFmtStr = OOO_STRING_SW_HTML_FF_shortcut; break;
}
- ASSERT( pFmtStr, "ubekanntes Format fuer SwAuthorField" );
+ OSL_ENSURE( pFmtStr, "ubekanntes Format fuer SwAuthorField" );
bFixed = ((const SwAuthorField*)pFld)->IsFixed();
break;
@@ -149,7 +150,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
case PG_NEXT: pSubStr = OOO_STRING_SW_HTML_FS_next; break;
case PG_PREV: pSubStr = OOO_STRING_SW_HTML_FS_prev; break;
}
- ASSERT( pSubStr, "ubekannter Subtyp fuer SwPageNumberField" );
+ OSL_ENSURE( pSubStr, "ubekannter Subtyp fuer SwPageNumberField" );
pFmtStr = SwHTMLWriter::GetNumFormat( static_cast< sal_uInt16 >(nFmt) );
if( (SvxExtNumType)nFmt==SVX_NUM_CHAR_SPECIAL )
@@ -216,7 +217,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
{
// Fuer ein fixes Feld och den Num-Value ausgeben.
// Fixe Felder ohne Zahlenformate sollte es
- // eigentlich nicht geben. ASSERT ist unten.
+ // eigentlich nicht geben. OSL_ENSURE(ist unten.
dNumValue = ((const SwDocInfoField*)pFld)->GetValue();
bNumValue = sal_True;
}
@@ -261,7 +262,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
;
}
bFixed = ((const SwFileNameField*)pFld)->IsFixed();
- ASSERT( pFmtStr, "unbekanntes Format fuer SwFileNameField" );
+ OSL_ENSURE( pFmtStr, "unbekanntes Format fuer SwFileNameField" );
break;
}
@@ -291,7 +292,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
}
if( bNumFmt )
{
- ASSERT( nFmt, "Zahlenformat ist 0" );
+ OSL_ENSURE( nFmt, "Zahlenformat ist 0" );
sOut = HTMLOutFuncs::CreateTableDataOptionsValNum( sOut,
bNumValue, dNumValue, nFmt,
*rHTMLWrt.pDoc->GetNumberFormatter(),
@@ -528,7 +529,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
else
{
const SwTxtFld *pTxtFld = rFld.GetTxtFld();
- ASSERT( pTxtFld, "Where is the txt fld?" );
+ OSL_ENSURE( pTxtFld, "Where is the txt fld?" );
if( pTxtFld )
OutHTML_SwField( rWrt, pFld, pTxtFld->GetTxtNode(),
*pTxtFld->GetStart() );
@@ -537,3 +538,4 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 9fcf12461db4..0fc846d0dab8 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -155,9 +156,9 @@ static Writer& OutHTML_FrmFmtAsMarquee( Writer& rWrt, const SwFrmFmt& rFrmFmt,
const SdrObject& rSdrObj );
//-----------------------------------------------------------------------
-extern HTMLOutEvent __FAR_DATA aAnchorEventTable[];
+extern HTMLOutEvent aAnchorEventTable[];
-static HTMLOutEvent __FAR_DATA aImageEventTable[] =
+static HTMLOutEvent aImageEventTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_O_SDonload, OOO_STRING_SVTOOLS_HTML_O_onload, SVX_EVENT_IMAGE_LOAD },
{ OOO_STRING_SVTOOLS_HTML_O_SDonabort, OOO_STRING_SVTOOLS_HTML_O_onabort, SVX_EVENT_IMAGE_ABORT },
@@ -165,7 +166,7 @@ static HTMLOutEvent __FAR_DATA aImageEventTable[] =
{ 0, 0, 0 }
};
-static HTMLOutEvent __FAR_DATA aIMapEventTable[] =
+static HTMLOutEvent aIMapEventTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_O_SDonmouseover, OOO_STRING_SVTOOLS_HTML_O_onmouseover, SFX_EVENT_MOUSEOVER_OBJECT },
{ OOO_STRING_SVTOOLS_HTML_O_SDonmouseout, OOO_STRING_SVTOOLS_HTML_O_onmouseout, SFX_EVENT_MOUSEOUT_OBJECT },
@@ -279,7 +280,6 @@ sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
if( bEmpty )
{
const SvxBrushItem& rBrush = rFrmFmt.GetBackground();
- /// OD 02.09.2002 #99657#
/// background is not empty, if it has a background graphic
/// or its background color is not "no fill"/"auto fill".
if( GPOS_NONE != rBrush.GetGraphicPos() ||
@@ -310,7 +310,7 @@ sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
void SwHTMLWriter::CollectFlyFrms()
{
- ASSERT( HTML_CFG_MAX+1 == MAX_BROWSERS,
+ OSL_ENSURE( HTML_CFG_MAX+1 == MAX_BROWSERS,
"number of browser configurations has changed" );
sal_uInt8 nSz = (sal_uInt8)Min( pDoc->GetSpzFrmFmts()->Count(), sal_uInt16(255) );
@@ -487,7 +487,7 @@ void SwHTMLWriter::OutFrmFmt( sal_uInt8 nMode, const SwFrmFmt& rFrmFmt,
switch( nOutMode )
{
case HTML_OUT_TBLNODE: // OK
- ASSERT( !pCntnrStr, "Table: Container ist hier nicht vorgesehen" );
+ OSL_ENSURE( !pCntnrStr, "Table: Container ist hier nicht vorgesehen" );
OutHTML_FrmFmtTableNode( *this, rFrmFmt );
break;
case HTML_OUT_GRFNODE: // OK
@@ -501,14 +501,14 @@ void SwHTMLWriter::OutFrmFmt( sal_uInt8 nMode, const SwFrmFmt& rFrmFmt,
break;
case HTML_OUT_DIV:
case HTML_OUT_SPAN:
- ASSERT( !pCntnrStr, "Div: Container ist hier nicht vorgesehen" );
+ OSL_ENSURE( !pCntnrStr, "Div: Container ist hier nicht vorgesehen" );
OutHTML_FrmFmtAsDivOrSpan( *this, rFrmFmt, HTML_OUT_SPAN==nOutMode );
break;
case HTML_OUT_MULTICOL: // OK
OutHTML_FrmFmtAsMulticol( *this, rFrmFmt, pCntnrStr != 0 );
break;
case HTML_OUT_SPACER: // OK
- ASSERT( !pCntnrStr, "Spacer: Container ist hier nicht vorgesehen" );
+ OSL_ENSURE( !pCntnrStr, "Spacer: Container ist hier nicht vorgesehen" );
OutHTML_FrmFmtAsSpacer( *this, rFrmFmt );
break;
case HTML_OUT_CONTROL: // OK
@@ -520,7 +520,7 @@ void SwHTMLWriter::OutFrmFmt( sal_uInt8 nMode, const SwFrmFmt& rFrmFmt,
OutHTML_FrmFmtAsMarquee( *this, rFrmFmt, *pSdrObject );
break;
case HTML_OUT_MARQUEE:
- ASSERT( !pCntnrStr, "Marquee: Container ist hier nicht vorgesehen" );
+ OSL_ENSURE( !pCntnrStr, "Marquee: Container ist hier nicht vorgesehen" );
OutHTML_DrawFrmFmtAsMarquee( *this,
(const SwDrawFrmFmt &)rFrmFmt, *pSdrObject );
break;
@@ -709,7 +709,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
(nPrcHeight ? 0
: pFSItem->GetHeight()-aTwipSpc.Height()) );
- ASSERT( aTwipSz.Width() >= 0 && aTwipSz.Height() >= 0,
+ OSL_ENSURE( aTwipSz.Width() >= 0 && aTwipSz.Height() >= 0,
"Rahmengroesse minus Abstand < 0!!!???" );
if( aTwipSz.Width() < 0 )
aTwipSz.Width() = 0;
@@ -787,7 +787,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
break;
default:
- // #67508#: If a frame is centered, it gets left aligned. This
+ // If a frame is centered, it gets left aligned. This
// should be taken into account here, too.
{
switch( eSurround )
@@ -897,7 +897,6 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
} while( bFound );
sal_Bool bScale = sal_False;
- //Size aGrfSize( rNode.GetTwipSize() );
Fraction aScaleX( 1, 1 );
Fraction aScaleY( 1, 1 );
@@ -910,7 +909,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
nWidth -= ( rBox.CalcLineSpace(BOX_LINE_LEFT) +
rBox.CalcLineSpace(BOX_LINE_RIGHT) );
- ASSERT( nWidth>0, "Gibt es 0 twip breite Grafiken!?" );
+ OSL_ENSURE( nWidth>0, "Gibt es 0 twip breite Grafiken!?" );
if( nWidth<=0 ) // sollte nicht passieren
nWidth = 1;
@@ -926,7 +925,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
nHeight -= ( rBox.CalcLineSpace(BOX_LINE_TOP) +
rBox.CalcLineSpace(BOX_LINE_BOTTOM) );
- ASSERT( nHeight>0, "Gibt es 0 twip hohe Grafiken!?" );
+ OSL_ENSURE( nHeight>0, "Gibt es 0 twip hohe Grafiken!?" );
if( nHeight<=0 )
nHeight = 1;
@@ -1340,11 +1339,11 @@ static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt )
bTopCaption = sal_True;
pTblNd = rHTMLWrt.pDoc->GetNodes()[nStt+1]->GetTableNode();
}
- ASSERT( pTblNd, "Rahmen enthaelt keine Tabelle" );
+ OSL_ENSURE( pTblNd, "Rahmen enthaelt keine Tabelle" );
if( pTblNd )
{
sal_uLong nTblEnd = pTblNd->EndOfSectionIndex();
- ASSERT( nTblEnd == nEnd - 1 ||
+ OSL_ENSURE( nTblEnd == nEnd - 1 ||
(nTblEnd == nEnd - 2 && !bTopCaption),
"Ungeuelter Rahmen-Inhalt fuer Tabelle" );
@@ -1426,7 +1425,7 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode();
- ASSERT( pSttNd, "Wo ist der Start-Node" );
+ OSL_ENSURE( pSttNd, "Wo ist der Start-Node" );
{
// in einem Block damit rechtzeitig vor dem Ende der alte Zustand
@@ -1438,8 +1437,6 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
rHTMLWrt.Out_SwDoc( rWrt.pCurPam );
}
-// rHTMLWrt.ChangeParaToken( 0 ); // MIB 8.7.97: Passiert jetzt in Out_SwDoc
-
rHTMLWrt.DecIndentLevel(); // den Inhalt von Multicol einruecken;
if( rHTMLWrt.bLFPossible )
rHTMLWrt.OutNewLine();
@@ -1517,7 +1514,7 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
rHTMLWrt.OutFlyFrm( nStt, 0, HTML_POS_ANY );
const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode();
- ASSERT( pSttNd, "Wo ist der Start-Node" );
+ OSL_ENSURE( pSttNd, "Wo ist der Start-Node" );
{
// in einem Block damit rechtzeitig vor dem Ende der alte Zustand
@@ -1581,7 +1578,7 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
SwGrfNode *pGrfNd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetGrfNode();
- ASSERT( pGrfNd, "Grf-Node erwartet" );
+ OSL_ENSURE( pGrfNd, "Grf-Node erwartet" );
if( !pGrfNd )
return rWrt;
@@ -1708,7 +1705,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode();
- ASSERT( pSttNd, "Wo ist der Start-Node" );
+ OSL_ENSURE( pSttNd, "Wo ist der Start-Node" );
if( !bHeader && aSpacer.Len() )
{
@@ -1891,7 +1888,7 @@ SwHTMLPosFlyFrm::SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
// Auto-gebundene Rahmen werden ein Zeichen weiter hinten
// ausgegeben, weil dann die Positionierung mit Netscape
// uebereinstimmt.
- ASSERT( rAnchor.GetCntntAnchor(), "Keine Anker-Position?" );
+ OSL_ENSURE( rAnchor.GetCntntAnchor(), "Keine Anker-Position?" );
if( rAnchor.GetCntntAnchor() )
{
nCntntIdx = rAnchor.GetCntntAnchor()->nContent.GetIndex();
@@ -1900,7 +1897,7 @@ SwHTMLPosFlyFrm::SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
if( text::RelOrientation::FRAME == eHoriRel || text::RelOrientation::PRINT_AREA == eHoriRel )
{
const SwCntntNode *pCNd = pNdIdx->GetNode().GetCntntNode();
- ASSERT( pCNd, "Kein Content-Node an PaM-Position" );
+ OSL_ENSURE( pCNd, "Kein Content-Node an PaM-Position" );
if( pCNd && nCntntIdx < pCNd->Len() )
nCntntIdx++;
}
@@ -1927,3 +1924,4 @@ sal_Bool SwHTMLPosFlyFrm::operator<( const SwHTMLPosFlyFrm& rFrm ) const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx
index ff91c0a3732c..e18cfcc100f1 100644
--- a/sw/source/filter/html/htmlfly.hxx
+++ b/sw/source/filter/html/htmlfly.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <tools/solar.h>
#include <tools/string.hxx>
-#ifndef _SVARRAY_H
#include <svl/svarray.hxx>
-#endif
class SdrObject;
class SwFrmFmt;
@@ -135,3 +134,5 @@ SV_DECL_PTRARR_SORT( SwHTMLPosFlyFrms, SwHTMLPosFlyFrmPtr, 10, 10 )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlflyt.cxx b/sw/source/filter/html/htmlflyt.cxx
index fa1f82ded113..5e5023b2470d 100644
--- a/sw/source/filter/html/htmlflyt.cxx
+++ b/sw/source/filter/html/htmlflyt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -514,3 +515,4 @@ sal_uInt8 aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS] =
}
};
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index d3a92cf01b85..4b3b6fb0034d 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,14 +96,14 @@ using ::rtl::OUString;
const sal_uInt16 TABINDEX_MIN = 0;
const sal_uInt16 TABINDEX_MAX = 32767;
-static HTMLOptionEnum __FAR_DATA aHTMLFormMethodTable[] =
+static HTMLOptionEnum aHTMLFormMethodTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_METHOD_get, FormSubmitMethod_GET },
{ OOO_STRING_SVTOOLS_HTML_METHOD_post, FormSubmitMethod_POST },
{ 0, 0 }
};
-static HTMLOptionEnum __FAR_DATA aHTMLFormEncTypeTable[] =
+static HTMLOptionEnum aHTMLFormEncTypeTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_ET_url, FormSubmitEncoding_URL },
{ OOO_STRING_SVTOOLS_HTML_ET_multipart, FormSubmitEncoding_MULTIPART },
@@ -112,7 +113,7 @@ static HTMLOptionEnum __FAR_DATA aHTMLFormEncTypeTable[] =
enum HTMLWordWrapMode { HTML_WM_OFF, HTML_WM_HARD, HTML_WM_SOFT };
-static HTMLOptionEnum __FAR_DATA aHTMLTextAreaWrapTable[] =
+static HTMLOptionEnum aHTMLTextAreaWrapTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_WW_off, HTML_WM_OFF },
{ OOO_STRING_SVTOOLS_HTML_WW_hard, HTML_WM_HARD },
@@ -122,7 +123,7 @@ static HTMLOptionEnum __FAR_DATA aHTMLTextAreaWrapTable[] =
{ 0, 0 }
};
-HTMLEventType __FAR_DATA aEventTypeTable[] =
+HTMLEventType aEventTypeTable[] =
{
HTML_ET_ONSUBMITFORM,
HTML_ET_ONRESETFORM,
@@ -135,7 +136,7 @@ HTMLEventType __FAR_DATA aEventTypeTable[] =
HTML_ET_END
};
-const sal_Char * __FAR_DATA aEventListenerTable[] =
+const sal_Char * aEventListenerTable[] =
{
"XSubmitListener",
"XResetListener",
@@ -147,7 +148,7 @@ const sal_Char * __FAR_DATA aEventListenerTable[] =
""
};
-const sal_Char * __FAR_DATA aEventMethodTable[] =
+const sal_Char * aEventMethodTable[] =
{
"approveSubmit",
"approveReset",
@@ -159,7 +160,7 @@ const sal_Char * __FAR_DATA aEventMethodTable[] =
""
};
-const sal_Char * __FAR_DATA aEventSDOptionTable[] =
+const sal_Char * aEventSDOptionTable[] =
{
OOO_STRING_SVTOOLS_HTML_O_SDonsubmit,
OOO_STRING_SVTOOLS_HTML_O_SDonreset,
@@ -171,7 +172,7 @@ const sal_Char * __FAR_DATA aEventSDOptionTable[] =
0
};
-const sal_Char * __FAR_DATA aEventOptionTable[] =
+const sal_Char * aEventOptionTable[] =
{
OOO_STRING_SVTOOLS_HTML_O_onsubmit,
OOO_STRING_SVTOOLS_HTML_O_onreset,
@@ -216,7 +217,7 @@ public:
pDocSh( pDSh ),
pHeaderAttrs( pDSh ? pDSh->GetHeaderAttributes() : 0 )
{
- ASSERT( pDocSh, "Keine DocShell, keine Controls" );
+ OSL_ENSURE( pDocSh, "Keine DocShell, keine Controls" );
}
const uno::Reference< XMultiServiceFactory >& GetServiceFactory();
@@ -285,7 +286,7 @@ const uno::Reference< XMultiServiceFactory >& SwHTMLForm_Impl::GetServiceFactory
xServiceFactory =
uno::Reference< XMultiServiceFactory >( pDocSh->GetBaseModel(),
UNO_QUERY );
- ASSERT( xServiceFactory.is(),
+ OSL_ENSURE( xServiceFactory.is(),
"XServiceFactory nicht vom Model erhalten" );
}
return xServiceFactory;
@@ -298,10 +299,10 @@ const uno::Reference< drawing::XDrawPage >& SwHTMLForm_Impl::GetDrawPage()
{
uno::Reference< drawing::XDrawPageSupplier > xTxtDoc( pDocSh->GetBaseModel(),
UNO_QUERY );
- ASSERT( xTxtDoc.is(),
+ OSL_ENSURE( xTxtDoc.is(),
"drawing::XDrawPageSupplier nicht vom XModel erhalten" );
xDrawPage = xTxtDoc->getDrawPage();
- ASSERT( xDrawPage.is(), "drawing::XDrawPage nicht erhalten" );
+ OSL_ENSURE( xDrawPage.is(), "drawing::XDrawPage nicht erhalten" );
}
return xDrawPage;
}
@@ -314,7 +315,7 @@ const uno::Reference< container::XIndexContainer >& SwHTMLForm_Impl::GetForms()
if( xDrawPage.is() )
{
uno::Reference< XFormsSupplier > xFormsSupplier( xDrawPage, UNO_QUERY );
- ASSERT( xFormsSupplier.is(),
+ OSL_ENSURE( xFormsSupplier.is(),
"XFormsSupplier nicht vom drawing::XDrawPage erhalten" );
uno::Reference< container::XNameContainer > xNameCont =
@@ -322,7 +323,7 @@ const uno::Reference< container::XIndexContainer >& SwHTMLForm_Impl::GetForms()
xForms = uno::Reference< container::XIndexContainer >( xNameCont,
UNO_QUERY );
- ASSERT( xForms.is(), "XForms nicht erhalten" );
+ OSL_ENSURE( xForms.is(), "XForms nicht erhalten" );
}
}
return xForms;
@@ -337,7 +338,7 @@ const uno::Reference< drawing::XShapes > & SwHTMLForm_Impl::GetShapes()
if( xDrawPage.is() )
{
xShapes = uno::Reference< drawing::XShapes >( xDrawPage, UNO_QUERY );
- ASSERT( xShapes.is(),
+ OSL_ENSURE( xShapes.is(),
"XShapes nicht vom drawing::XDrawPage erhalten" );
}
}
@@ -351,7 +352,7 @@ const uno::Reference< script::XEventAttacherManager >&
{
xControlEventManager =
uno::Reference< script::XEventAttacherManager >( xFormComps, UNO_QUERY );
- ASSERT( xControlEventManager.is(),
+ OSL_ENSURE( xControlEventManager.is(),
"uno::Reference< XEventAttacherManager > nicht von xFormComps erhalten" );
}
@@ -368,7 +369,7 @@ const uno::Reference< script::XEventAttacherManager >&
{
xFormEventManager =
uno::Reference< script::XEventAttacherManager >( xForms, UNO_QUERY );
- ASSERT( xFormEventManager.is(),
+ OSL_ENSURE( xFormEventManager.is(),
"uno::Reference< XEventAttacherManager > nicht von xForms erhalten" );
}
}
@@ -437,7 +438,7 @@ SwHTMLImageWatcher::SwHTMLImageWatcher(
uno::Reference< awt::XControlModel > xControlModel(
xControlShape->getControl() );
xSrc = uno::Reference< XImageProducerSupplier >( xControlModel, UNO_QUERY );
- ASSERT( xSrc.is(), "Kein XImageProducerSupplier" );
+ OSL_ENSURE( xSrc.is(), "Kein XImageProducerSupplier" );
// Als Event-Listener am Shape anmelden, damit wir es beim dispose
// loslassen ko”nnen ...
@@ -476,7 +477,7 @@ void SwHTMLImageWatcher::clear()
void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height )
throw( uno::RuntimeException )
{
- ASSERT( bSetWidth || bSetHeight,
+ OSL_ENSURE( bSetWidth || bSetHeight,
"Breite oder Hoehe muss angepasst werden" );
// Wenn keine Breite oder Hoehe angegeben ist, ist das das init von
@@ -534,7 +535,7 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height )
xTunnel->getSomething(SwXShape::getUnoTunnelId()) ))
: 0;
- ASSERT( pSwShape, "Wo ist das SW-Shape?" );
+ OSL_ENSURE( pSwShape, "Wo ist das SW-Shape?" );
if( pSwShape )
{
SwFrmFmt *pFrmFmt = pSwShape->GetFrmFmt();
@@ -636,25 +637,25 @@ static void lcl_html_setFixedFontProperty(
DEFAULTFONT_FLAGS_ONLYONE ) );
Any aTmp;
aTmp <<= OUString( aFixedFont.GetName() );
- rPropSet->setPropertyValue( OUString::createFromAscii("FontName"), aTmp );
+ rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontName")), aTmp );
aTmp <<= OUString( aFixedFont.GetStyleName() );
- rPropSet->setPropertyValue( OUString::createFromAscii("FontStyleName"),
+ rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontStyleName")),
aTmp );
aTmp <<= (sal_Int16) aFixedFont.GetFamily();
- rPropSet->setPropertyValue( OUString::createFromAscii("FontFamily"), aTmp );
+ rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontFamily")), aTmp );
aTmp <<= (sal_Int16) aFixedFont.GetCharSet();
- rPropSet->setPropertyValue( OUString::createFromAscii("FontCharset"),
+ rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontCharset")),
aTmp );
aTmp <<= (sal_Int16) aFixedFont.GetPitch();
- rPropSet->setPropertyValue( OUString::createFromAscii("FontPitch"), aTmp );
+ rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontPitch")), aTmp );
float fVal(10.);
aTmp.setValue( &fVal, ::getCppuType(&fVal ));
- rPropSet->setPropertyValue( OUString::createFromAscii("FontHeight"), aTmp );
+ rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontHeight")), aTmp );
}
class SwHTMLFormPendingStackData_Impl: public SwPendingStackData
@@ -681,30 +682,27 @@ public:
sal_Bool IsMinHeight() const { return bMinHeight; }
};
-void SwHTMLParser::SetPendingControlSize( int nToken )
+void SwHTMLParser::SetPendingControlSize()
{
- ASSERT( pPendStack, "Wo ist der Pending Stack?" );
+ OSL_ENSURE( pPendStack, "Wo ist der Pending Stack?" );
SwHTMLFormPendingStackData_Impl *pData =
(SwHTMLFormPendingStackData_Impl *)pPendStack->pData;
SwPendingStack* pTmp = pPendStack->pNext;
delete pPendStack;
pPendStack = pTmp;
- ASSERT( !pPendStack, "Wo kommt der Pending-Stack her?" );
+ OSL_ENSURE( !pPendStack, "Wo kommt der Pending-Stack her?" );
SetControlSize( pData->GetShape(), pData->GetTextSize(),
- pData->IsMinWidth(), pData->IsMinHeight(),
- nToken );
+ pData->IsMinWidth(), pData->IsMinHeight() );
delete pData;
}
void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rShape,
const Size& rTextSz,
sal_Bool bMinWidth,
- sal_Bool bMinHeight,
- int nToken )
+ sal_Bool bMinHeight )
{
- nToken = 0;
if( !rTextSz.Width() && !rTextSz.Height() && !bMinWidth && !bMinHeight )
return;
@@ -741,16 +739,16 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha
xTunnel->getSomething(SwXShape::getUnoTunnelId()) ))
: 0;
- ASSERT( pSwShape, "Wo ist das SW-Shape?" );
+ OSL_ENSURE( pSwShape, "Wo ist das SW-Shape?" );
// es muss ein Draw-Format sein
SwFrmFmt *pFrmFmt = pSwShape->GetFrmFmt();
- ASSERT( RES_DRAWFRMFMT == pFrmFmt->Which(), "Kein DrawFrmFmt" );
+ OSL_ENSURE( RES_DRAWFRMFMT == pFrmFmt->Which(), "Kein DrawFrmFmt" );
// Schauen, ob es ein SdrObject dafuer gibt
const SdrObject *pObj = pFrmFmt->FindSdrObject();
- ASSERT( pObj, "SdrObject nicht gefunden" );
- ASSERT( FmFormInventor == pObj->GetObjInventor(), "falscher Inventor" );
+ OSL_ENSURE( pObj, "SdrObject nicht gefunden" );
+ OSL_ENSURE( FmFormInventor == pObj->GetObjInventor(), "falscher Inventor" );
const SdrView* pDrawView = pVSh ? pVSh->GetDrawView() : 0;
@@ -777,7 +775,7 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha
if( rTextSz.Width() || rTextSz.Height())
{
uno::Reference< awt::XTextLayoutConstrains > xLC( xControl, UNO_QUERY );
- ASSERT( xLC.is(), "kein XTextLayoutConstrains" );
+ OSL_ENSURE( xLC.is(), "kein XTextLayoutConstrains" );
if( xLC.is() )
{
awt::Size aTmpSz( rTextSz.Width(), rTextSz.Height() );
@@ -968,7 +966,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
uno::Reference< XInterface > xCreate =
rServiceFactory ->createInstance(
- OUString::createFromAscii("com.sun.star.drawing.ControlShape"));
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape")));
if( !xCreate.is() )
return xShape;
@@ -1008,11 +1006,11 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
Any aAny2;
aAny2 <<= (sal_Int32)nLeftSpace;
xShapePropSet->setPropertyValue(
- OUString::createFromAscii( "LeftMargin" ), aAny2 );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("LeftMargin")), aAny2 );
aAny2 <<= (sal_Int32)nRightSpace;
xShapePropSet->setPropertyValue(
- OUString::createFromAscii( "RightMargin" ), aAny2 );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("RightMargin")), aAny2 );
}
// oberen/unteren Rand setzen
@@ -1039,26 +1037,24 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
uno::Any aAny2;
aAny2 <<= (sal_Int32)nUpperSpace;
xShapePropSet->setPropertyValue(
- OUString::createFromAscii( "TopMargin" ), aAny2 );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("TopMargin")), aAny2 );
aAny2 <<= (sal_Int32)nLowerSpace;
xShapePropSet->setPropertyValue(
- OUString::createFromAscii( "BottomMargin" ), aAny2 );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), aAny2 );
}
uno::Reference< beans::XPropertySetInfo > xPropSetInfo =
rFCompPropSet->getPropertySetInfo();
- OUString sPropName = OUString::createFromAscii( "BackgroundColor" );
+ OUString sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("BackgroundColor"));
if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_BACKGROUND, sal_True,
&pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
{
const Color &rColor = ((const SvxBrushItem *)pItem)->GetColor();
- /// OD 02.09.2002 #99657#
/// copy color, if color is not "no fill"/"auto fill"
if( rColor.GetColor() != COL_TRANSPARENT )
{
- /// OD 02.09.2002 #99657#
/// copy complete color with transparency
aTmp <<= static_cast<sal_Int32>(rColor.GetColor());
rFCompPropSet->setPropertyValue( sPropName, aTmp );
@@ -1066,7 +1062,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
}
- sPropName = OUString::createFromAscii( "TextColor" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("TextColor"));
if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_COLOR, sal_True,
&pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
@@ -1076,7 +1072,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString::createFromAscii( "FontHeight" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontHeight"));
if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_FONTSIZE,
sal_True, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
@@ -1091,31 +1087,31 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
&pItem ) )
{
const SvxFontItem *pFontItem = (SvxFontItem *)pItem;
- sPropName = OUString::createFromAscii( "FontName" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontName"));
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp <<= OUString( pFontItem->GetFamilyName() );
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString::createFromAscii( "FontStyleName" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontStyleName"));
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp <<= OUString( pFontItem->GetStyleName() );
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString::createFromAscii( "FontFamily" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontFamily"));
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp <<= (sal_Int16)pFontItem->GetFamily() ;
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString::createFromAscii( "FontCharset" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontCharset"));
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp <<= (sal_Int16)pFontItem->GetCharSet() ;
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString::createFromAscii( "FontPitch" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontPitch"));
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp <<= (sal_Int16)pFontItem->GetPitch() ;
@@ -1123,7 +1119,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
}
}
- sPropName = OUString::createFromAscii( "FontWeight" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontWeight"));
if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_WEIGHT,
sal_True, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
@@ -1134,7 +1130,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString::createFromAscii( "FontSlant" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontSlant"));
if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_POSTURE,
sal_True, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
@@ -1143,7 +1139,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString::createFromAscii( "FontUnderline" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontUnderline"));
if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_UNDERLINE,
sal_True, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
@@ -1152,7 +1148,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString::createFromAscii( "FontStrikeout" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontStrikeout"));
if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_CROSSEDOUT,
sal_True, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
@@ -1240,18 +1236,18 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
}
aTmp <<= (sal_Int16)nVertOri ;
xShapePropSet->setPropertyValue(
- OUString::createFromAscii( "VertOrient" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrient")), aTmp );
}
aTmp <<= (sal_Int16)nAnchorType ;
xShapePropSet->setPropertyValue(
- OUString::createFromAscii( "AnchorType" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("AnchorType")), aTmp );
if( text::TextContentAnchorType_AT_PAGE == nAnchorType )
{
aTmp <<= (sal_Int16) 1 ;
xShapePropSet->setPropertyValue(
- OUString::createFromAscii( "AnchorPageNo" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("AnchorPageNo")), aTmp );
}
else
{
@@ -1264,30 +1260,30 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
aTmp.setValue( &xTxtRg,
::getCppuType((uno::Reference< text::XTextRange>*)0));
xShapePropSet->setPropertyValue(
- OUString::createFromAscii( "TextRange" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("TextRange")), aTmp );
}
if( bSetPos )
{
aTmp <<= (sal_Int16)text::HoriOrientation::NONE;
xShapePropSet->setPropertyValue(
- OUString::createFromAscii( "HoriOrient" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrient")), aTmp );
aTmp <<= (sal_Int32)nXPos ;
xShapePropSet->setPropertyValue(
- OUString::createFromAscii( "HoriOrientPosition" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition")), aTmp );
aTmp <<= (sal_Int16)text::VertOrientation::NONE;
xShapePropSet->setPropertyValue(
- OUString::createFromAscii( "VertOrient" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrient")), aTmp );
aTmp <<= (sal_Int32)nYPos ;
xShapePropSet->setPropertyValue(
- OUString::createFromAscii( "VertOrientPosition" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientPosition")), aTmp );
}
if( bSetSurround )
{
aTmp <<= (sal_Int16)nSurround ;
xShapePropSet->setPropertyValue(
- OUString::createFromAscii( "Surround" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Surround")), aTmp );
}
pFormImpl->GetShapes()->add(xShape);
@@ -1414,7 +1410,7 @@ void SwHTMLParser::NewForm( sal_Bool bAppend )
return;
uno::Reference< XInterface > xInt = rSrvcMgr->createInstance(
- OUString::createFromAscii( "com.sun.star.form.component.Form" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.Form")) );
if( !xInt.is() )
return;
@@ -1428,7 +1424,7 @@ void SwHTMLParser::NewForm( sal_Bool bAppend )
Any aTmp;
aTmp <<= OUString(sName);
- xFormPropSet->setPropertyValue( OUString::createFromAscii( "Name" ), aTmp );
+ xFormPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aTmp );
if( aAction.Len() )
{
@@ -1441,24 +1437,24 @@ void SwHTMLParser::NewForm( sal_Bool bAppend )
aAction = aURLObj.GetPartBeforeLastName();
}
aTmp <<= OUString(aAction);
- xFormPropSet->setPropertyValue( OUString::createFromAscii( "TargetURL" ),
+ xFormPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")),
aTmp );
FormSubmitMethod eMethod = (FormSubmitMethod)nMethod;
aTmp.setValue( &eMethod, ::getCppuType((const FormSubmitMethod*)0) );
- xFormPropSet->setPropertyValue( OUString::createFromAscii( "SubmitMethod" ),
+ xFormPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("SubmitMethod")),
aTmp );
FormSubmitEncoding eEncType = (FormSubmitEncoding)nEncType;
aTmp.setValue( &eEncType, ::getCppuType((const FormSubmitEncoding*)0) );
xFormPropSet->setPropertyValue(
- OUString::createFromAscii( "SubmitEncoding" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("SubmitEncoding")), aTmp );
if( sTarget.Len() )
{
aTmp <<= OUString(sTarget);
xFormPropSet->setPropertyValue(
- OUString::createFromAscii( "TargetFrame" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("TargetFrame")), aTmp );
}
const uno::Reference< container::XIndexContainer > & rForms =
@@ -1492,7 +1488,7 @@ void SwHTMLParser::InsertInput()
{
if( pPendStack )
{
- SetPendingControlSize( HTML_INPUT );
+ SetPendingControlSize();
return;
}
@@ -1651,7 +1647,6 @@ void SwHTMLParser::InsertInput()
// ALIGN fuer alle Controls auszuwerten ist keine so gute Idee,
// solange Absatz-gebundene Controls die Hoehe von Tabellen-Zellen
// nicht beeinflussen
- // (#64110#, http://www.telekom.de/katalog-online/onlineshop.html)
eVertOri = text::VertOrientation::TOP;
eHoriOri = text::HoriOrientation::NONE;
}
@@ -1712,7 +1707,7 @@ void SwHTMLParser::InsertInput()
return;
String sServiceName(
- OUString::createFromAscii("com.sun.star.form.component.") );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.")) );
sServiceName.AppendAscii( pType );
uno::Reference< XInterface > xInt =
rServiceFactory->createInstance( sServiceName );
@@ -1727,21 +1722,21 @@ void SwHTMLParser::InsertInput()
Any aTmp;
aTmp <<= OUString(sName);
- xPropSet->setPropertyValue( OUString::createFromAscii( "Name" ), aTmp );
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aTmp );
if( HTML_IT_HIDDEN != eType )
{
if( nTabIndex >= TABINDEX_MIN && nTabIndex <= TABINDEX_MAX )
{
aTmp <<= (sal_Int16) (sal_Int16)nTabIndex ;
- xPropSet->setPropertyValue( OUString::createFromAscii( "TabIndex" ), aTmp );
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("TabIndex")), aTmp );
}
if( bDisabled )
{
sal_Bool bFalse = sal_False;
aTmp.setValue(&bFalse, ::getBooleanCppuType() );
- xPropSet->setPropertyValue( OUString::createFromAscii( "Enabled" ), aTmp );
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")), aTmp );
}
}
@@ -1757,13 +1752,13 @@ void SwHTMLParser::InsertInput()
case HTML_IT_RADIO:
{
if( !bValue )
- aTmp <<= OUString::createFromAscii( OOO_STRING_SVTOOLS_HTML_on );
- xPropSet->setPropertyValue( OUString::createFromAscii( "RefValue" ),
+ aTmp <<= OUString(RTL_CONSTASCII_USTRINGPARAM( OOO_STRING_SVTOOLS_HTML_on ));
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("RefValue")),
aTmp );
aTmp <<= OUString();
- xPropSet->setPropertyValue( OUString::createFromAscii( "Label" ),
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Label")),
aTmp );
- // #53559#: Beim RadioButton darf die DefaultChecked-Property
+ // Beim RadioButton darf die DefaultChecked-Property
// erst gesetzt werden, wenn das Control angelegt und ein
// activateTabOrder gerufen wurde, weil es sonst noch zu der
// vorhergehenden Gruppe gehoert.
@@ -1771,7 +1766,7 @@ void SwHTMLParser::InsertInput()
{
aTmp <<= (sal_Int16) nChecked ;
xPropSet->setPropertyValue(
- OUString::createFromAscii( "DefaultState" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultState")), aTmp );
}
SvxMacro *pMacro = aMacroTbl.Get( HTML_ET_ONCLICK );
@@ -1800,10 +1795,10 @@ void SwHTMLParser::InsertInput()
aTmp.setValue( &eButtonType,
::getCppuType((const FormButtonType*)0));
xPropSet->setPropertyValue(
- OUString::createFromAscii( "ButtonType" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("ButtonType")), aTmp );
aTmp <<= (sal_Int16) 0 ;
- xPropSet->setPropertyValue( OUString::createFromAscii( "Border" ),
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Border")),
aTmp );
}
break;
@@ -1832,13 +1827,13 @@ void SwHTMLParser::InsertInput()
;
}
aTmp <<= OUString(sText);
- xPropSet->setPropertyValue( OUString::createFromAscii( "Label" ),
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Label")),
aTmp );
aTmp.setValue( &eButtonType,
::getCppuType((const FormButtonType*)0));
xPropSet->setPropertyValue(
- OUString::createFromAscii( "ButtonType" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("ButtonType")), aTmp );
bMinWidth = bMinHeight = sal_True;
bUseSize = sal_True;
@@ -1852,19 +1847,19 @@ void SwHTMLParser::InsertInput()
{
// Beim File-Control wird der VALUE aus Sicherheitsgruenden ignoriert.
xPropSet->setPropertyValue(
- OUString::createFromAscii( "DefaultText" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultText")), aTmp );
if( nMaxLen != 0 )
{
aTmp <<= (sal_Int16) nMaxLen ;
xPropSet->setPropertyValue(
- OUString::createFromAscii( "MaxTextLen" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("MaxTextLen")), aTmp );
}
}
if( HTML_IT_PASSWORD == eType )
{
aTmp <<= (sal_Int16)'*' ;
- xPropSet->setPropertyValue( OUString::createFromAscii( "EchoChar" ),
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("EchoChar")),
aTmp );
}
@@ -1877,7 +1872,7 @@ void SwHTMLParser::InsertInput()
break;
case HTML_IT_HIDDEN:
- xPropSet->setPropertyValue( OUString::createFromAscii( "HiddenValue" ),
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("HiddenValue")),
aTmp );
bHidden = sal_True;
break;
@@ -1893,7 +1888,7 @@ void SwHTMLParser::InsertInput()
aNewSz = Application::GetDefaultDevice()
->PixelToLogic( aNewSz, MapMode( MAP_100TH_MM ) );
aSz.Width() = aNewSz.Width();
- ASSERT( !aTextSz.Width(), "Text-Breite ist gegeben" );
+ OSL_ENSURE( !aTextSz.Width(), "Text-Breite ist gegeben" );
bMinWidth = sal_False;
}
}
@@ -1951,14 +1946,14 @@ void SwHTMLParser::InsertInput()
bHidden );
if( aTextSz.Width() || aTextSz.Height() || bMinWidth || bMinHeight )
{
- ASSERT( !(bSetGrfWidth || bSetGrfHeight), "Grafikgroesse anpassen???" );
- SetControlSize( xShape, aTextSz, bMinWidth, bMinHeight, HTML_INPUT );
+ OSL_ENSURE( !(bSetGrfWidth || bSetGrfHeight), "Grafikgroesse anpassen???" );
+ SetControlSize( xShape, aTextSz, bMinWidth, bMinHeight );
}
if( HTML_IT_RADIO == eType )
{
aTmp <<= (sal_Int16) nChecked ;
- xPropSet->setPropertyValue( OUString::createFromAscii( "DefaultState" ), aTmp );
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultState")), aTmp );
}
if( HTML_IT_IMAGE == eType )
@@ -1967,7 +1962,7 @@ void SwHTMLParser::InsertInput()
// Download der Grafik erst dann am XModel anmelden kann,
// wenn das Control eingefuegt ist.
aTmp <<= OUString( URIHelper::SmartRel2Abs(INetURLObject(sBaseURL), sImgSrc, Link(), false));
- xPropSet->setPropertyValue( OUString::createFromAscii( "ImageURL" ),
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("ImageURL")),
aTmp );
}
@@ -1984,12 +1979,12 @@ void SwHTMLParser::NewTextArea()
{
if( pPendStack )
{
- SetPendingControlSize( HTML_TEXTAREA_ON );
+ SetPendingControlSize();
return;
}
- ASSERT( !bTextArea, "TextArea in TextArea???" );
- ASSERT( !pFormImpl || !pFormImpl->GetFCompPropSet().is(),
+ OSL_ENSURE( !bTextArea, "TextArea in TextArea???" );
+ OSL_ENSURE( !pFormImpl || !pFormImpl->GetFCompPropSet().is(),
"TextArea in Control???" );
if( !pFormImpl || !pFormImpl->GetFormComps().is() )
@@ -2116,7 +2111,7 @@ void SwHTMLParser::NewTextArea()
return;
}
uno::Reference< uno::XInterface > xInt = rSrvcMgr->createInstance(
- OUString::createFromAscii( "com.sun.star.form.component.TextField" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.TextField")) );
if( !xInt.is() )
{
FinishTextArea();
@@ -2130,24 +2125,24 @@ void SwHTMLParser::NewTextArea()
Any aTmp;
aTmp <<= OUString(sName);
- xPropSet->setPropertyValue( OUString::createFromAscii( "Name" ), aTmp );
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aTmp );
sal_Bool bTrue = sal_True;
aTmp.setValue( &bTrue, ::getBooleanCppuType() );
- xPropSet->setPropertyValue( OUString::createFromAscii( "MultiLine" ),
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("MultiLine")),
aTmp );
- xPropSet->setPropertyValue( OUString::createFromAscii( "VScroll" ), aTmp );
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("VScroll")), aTmp );
if( HTML_WM_OFF == nWrap )
- xPropSet->setPropertyValue( OUString::createFromAscii( "HScroll" ),
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("HScroll")),
aTmp );
if( HTML_WM_HARD == nWrap )
xPropSet->setPropertyValue(
- OUString::createFromAscii( "HardLineBreaks" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("HardLineBreaks")), aTmp );
if( nTabIndex >= TABINDEX_MIN && nTabIndex <= TABINDEX_MAX )
{
aTmp <<= (sal_Int16)nTabIndex ;
- xPropSet->setPropertyValue( OUString::createFromAscii( "TabIndex" ),
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("TabIndex")),
aTmp );
}
@@ -2157,11 +2152,11 @@ void SwHTMLParser::NewTextArea()
{
sal_Bool bFalse = sal_False;
aTmp.setValue( &bFalse, ::getBooleanCppuType() );
- xPropSet->setPropertyValue( OUString::createFromAscii( "Enabled" ),
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")),
aTmp );
}
- ASSERT( !pFormImpl->GetText().Len(), "Text ist nicht leer!" );
+ OSL_ENSURE( !pFormImpl->GetText().Len(), "Text ist nicht leer!" );
if( !nCols )
nCols = 20;
@@ -2201,8 +2196,7 @@ void SwHTMLParser::NewTextArea()
aMacroTbl, aUnoMacroTbl,
aUnoMacroParamTbl );
if( aTextSz.Width() || aTextSz.Height() )
- SetControlSize( xShape, aTextSz, sal_False, sal_False,
- HTML_TEXTAREA_ON );
+ SetControlSize( xShape, aTextSz, sal_False, sal_False );
// einen neuen Kontext anlegen
_HTMLAttrContext *pCntxt = new _HTMLAttrContext( HTML_TEXTAREA_ON );
@@ -2217,8 +2211,8 @@ void SwHTMLParser::NewTextArea()
void SwHTMLParser::EndTextArea()
{
- ASSERT( bTextArea, "keine TextArea oder falscher Typ" );
- ASSERT( pFormImpl && pFormImpl->GetFCompPropSet().is(),
+ OSL_ENSURE( bTextArea, "keine TextArea oder falscher Typ" );
+ OSL_ENSURE( pFormImpl && pFormImpl->GetFCompPropSet().is(),
"TextArea fehlt" );
const uno::Reference< beans::XPropertySet > & rPropSet =
@@ -2226,7 +2220,7 @@ void SwHTMLParser::EndTextArea()
Any aTmp;
aTmp <<= OUString(pFormImpl->GetText());
- rPropSet->setPropertyValue( OUString::createFromAscii( "DefaultText" ),
+ rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultText")),
aTmp );
pFormImpl->EraseText();
@@ -2247,8 +2241,8 @@ void SwHTMLParser::EndTextArea()
void SwHTMLParser::InsertTextAreaText( sal_uInt16 nToken )
{
- ASSERT( bTextArea, "keine TextArea oder falscher Typ" );
- ASSERT( pFormImpl && pFormImpl->GetFCompPropSet().is(),
+ OSL_ENSURE( bTextArea, "keine TextArea oder falscher Typ" );
+ OSL_ENSURE( pFormImpl && pFormImpl->GetFCompPropSet().is(),
"TextArea fehlt" );
String& rText = pFormImpl->GetText();
@@ -2279,12 +2273,12 @@ void SwHTMLParser::NewSelect()
{
if( pPendStack )
{
- SetPendingControlSize( HTML_SELECT_ON );
+ SetPendingControlSize();
return;
}
- ASSERT( !bSelect, "Select in Select???" );
- ASSERT( !pFormImpl || !pFormImpl->GetFCompPropSet().is(),
+ OSL_ENSURE( !bSelect, "Select in Select???" );
+ OSL_ENSURE( !pFormImpl || !pFormImpl->GetFCompPropSet().is(),
"Select in Control???" );
if( !pFormImpl || !pFormImpl->GetFormComps().is() )
@@ -2396,7 +2390,7 @@ void SwHTMLParser::NewSelect()
return;
}
uno::Reference< uno::XInterface > xInt = rSrvcMgr->createInstance(
- OUString::createFromAscii( "com.sun.star.form.component.ListBox" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.ListBox")) );
if( !xInt.is() )
{
FinishTextArea();
@@ -2410,12 +2404,12 @@ void SwHTMLParser::NewSelect()
Any aTmp;
aTmp <<= OUString(sName);
- xPropSet->setPropertyValue( OUString::createFromAscii( "Name" ), aTmp );
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aTmp );
if( nTabIndex >= TABINDEX_MIN && nTabIndex <= TABINDEX_MAX )
{
aTmp <<= (sal_Int16)nTabIndex ;
- xPropSet->setPropertyValue( OUString::createFromAscii( "TabIndex" ),
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("TabIndex")),
aTmp );
}
@@ -2423,7 +2417,7 @@ void SwHTMLParser::NewSelect()
{
sal_Bool bFalse = sal_False;
aTmp.setValue( &bFalse, ::getBooleanCppuType() );
- xPropSet->setPropertyValue( OUString::createFromAscii( "Enabled" ),
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")),
aTmp );
}
@@ -2433,7 +2427,7 @@ void SwHTMLParser::NewSelect()
{
sal_Bool bTrue = sal_True;
aTmp.setValue( &bTrue, ::getBooleanCppuType() );
- xPropSet->setPropertyValue( OUString::createFromAscii( "Dropdown" ),
+ xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Dropdown")),
aTmp );
}
else
@@ -2446,7 +2440,7 @@ void SwHTMLParser::NewSelect()
sal_Bool bTrue = sal_True;
aTmp.setValue( &bTrue, ::getBooleanCppuType() );
xPropSet->setPropertyValue(
- OUString::createFromAscii( "MultiSelection" ), aTmp );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("MultiSelection")), aTmp );
}
aTextSz.Height() = nSelectEntryCnt;
bMinHeight = sal_False;
@@ -2488,8 +2482,7 @@ void SwHTMLParser::NewSelect()
if( bFixSelectWidth )
pFormImpl->SetShape( xShape );
if( aTextSz.Height() || bMinWidth || bMinHeight )
- SetControlSize( xShape, aTextSz, bMinWidth, bMinHeight,
- HTML_SELECT_ON );
+ SetControlSize( xShape, aTextSz, bMinWidth, bMinHeight );
// einen neuen Kontext anlegen
_HTMLAttrContext *pCntxt = new _HTMLAttrContext( HTML_SELECT_ON );
@@ -2505,12 +2498,12 @@ void SwHTMLParser::EndSelect()
{
if( pPendStack )
{
- SetPendingControlSize( HTML_SELECT_OFF );
+ SetPendingControlSize();
return;
}
- ASSERT( bSelect, "keine Select" );
- ASSERT( pFormImpl && pFormImpl->GetFCompPropSet().is(),
+ OSL_ENSURE( bSelect, "keine Select" );
+ OSL_ENSURE( pFormImpl && pFormImpl->GetFCompPropSet().is(),
"kein Select-Control" );
const uno::Reference< beans::XPropertySet > & rPropSet =
@@ -2541,15 +2534,15 @@ void SwHTMLParser::EndSelect()
Any aAny( &aList, ::getCppuType((uno::Sequence<OUString>*)0) );
rPropSet->setPropertyValue(
- OUString::createFromAscii( "StringItemList" ), aAny );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("StringItemList")), aAny );
aAny <<= ListSourceType_VALUELIST;
rPropSet->setPropertyValue(
- OUString::createFromAscii( "ListSourceType" ), aAny );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("ListSourceType")), aAny );
aAny.setValue( &aValueList, ::getCppuType((uno::Sequence<OUString>*)0) );
- rPropSet->setPropertyValue( OUString::createFromAscii( "ListSource" ),
+ rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("ListSource")),
aAny );
sal_uInt16 nSelCnt = pFormImpl->GetSelectedList().Count();
@@ -2570,7 +2563,7 @@ void SwHTMLParser::EndSelect()
::getCppuType((uno::Sequence<sal_Int16>*)0) );
rPropSet->setPropertyValue(
- OUString::createFromAscii( "DefaultSelection" ), aAny );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultSelection")), aAny );
pFormImpl->EraseStringList();
pFormImpl->EraseValueList();
@@ -2580,10 +2573,9 @@ void SwHTMLParser::EndSelect()
if( bFixSelectWidth )
{
- ASSERT( pFormImpl->GetShape().is(), "Kein Shape gemerkt" );
+ OSL_ENSURE( pFormImpl->GetShape().is(), "Kein Shape gemerkt" );
Size aTextSz( -1, 0 );
- SetControlSize( pFormImpl->GetShape(), aTextSz, sal_False, sal_False,
- HTML_SELECT_OFF );
+ SetControlSize( pFormImpl->GetShape(), aTextSz, sal_False, sal_False );
}
pFormImpl->ReleaseFCompPropSet();
@@ -2602,8 +2594,8 @@ void SwHTMLParser::EndSelect()
void SwHTMLParser::InsertSelectOption()
{
- ASSERT( bSelect, "keine Select" );
- ASSERT( pFormImpl && pFormImpl->GetFCompPropSet().is(),
+ OSL_ENSURE( bSelect, "keine Select" );
+ OSL_ENSURE( pFormImpl && pFormImpl->GetFCompPropSet().is(),
"kein Select-Control" );
bLBEntrySelected = sal_False;
@@ -2639,8 +2631,8 @@ void SwHTMLParser::InsertSelectOption()
void SwHTMLParser::InsertSelectText()
{
- ASSERT( bSelect, "keine Select" );
- ASSERT( pFormImpl && pFormImpl->GetFCompPropSet().is(),
+ OSL_ENSURE( bSelect, "keine Select" );
+ OSL_ENSURE( pFormImpl && pFormImpl->GetFCompPropSet().is(),
"kein Select-Control" );
sal_uInt16 nEntryCnt = pFormImpl->GetStringList().Count();
@@ -2659,3 +2651,4 @@ void SwHTMLParser::InsertSelectText()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlform.hxx b/sw/source/filter/html/htmlform.hxx
index 2deac9db0b5c..635392a72519 100644
--- a/sw/source/filter/html/htmlform.hxx
+++ b/sw/source/filter/html/htmlform.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,11 +39,11 @@ enum HTMLEventType
HTML_ET_END
};
-extern HTMLEventType __FAR_DATA aEventTypeTable[];
-extern const sal_Char * __FAR_DATA aEventListenerTable[];
-extern const sal_Char * __FAR_DATA aEventMethodTable[];
-extern const sal_Char * __FAR_DATA aEventSDOptionTable[];
-extern const sal_Char * __FAR_DATA aEventOptionTable[];
+extern HTMLEventType aEventTypeTable[];
+extern const sal_Char * aEventListenerTable[];
+extern const sal_Char * aEventMethodTable[];
+extern const sal_Char * aEventSDOptionTable[];
+extern const sal_Char * aEventOptionTable[];
@@ -50,3 +51,4 @@ extern const sal_Char * __FAR_DATA aEventOptionTable[];
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index d44a543dfa5a..47ce516701f2 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -129,7 +130,7 @@ void lcl_html_outEvents( SvStream& rStrm,
{
uno::Reference< container::XChild > xChild( rFormComp, uno::UNO_QUERY );
uno::Reference< uno::XInterface > xParentIfc = xChild->getParent();
- ASSERT( xParentIfc.is(), "lcl_html_outEvents: no parent interface" );
+ OSL_ENSURE( xParentIfc.is(), "lcl_html_outEvents: no parent interface" );
if( !xParentIfc.is() )
return;
uno::Reference< container::XIndexAccess > xIndexAcc( xParentIfc, uno::UNO_QUERY );
@@ -143,7 +144,7 @@ void lcl_html_outEvents( SvStream& rStrm,
for( nPos = 0 ; nPos < nCount; nPos++ )
{
uno::Any aTmp = xIndexAcc->getByIndex(nPos);
- ASSERT( aTmp.getValueType() ==
+ OSL_ENSURE( aTmp.getValueType() ==
::getCppuType( (uno::Reference<form::XFormComponent>*)0 ) ||
aTmp.getValueType() ==
::getCppuType( (uno::Reference<form::XForm>*)0 ),
@@ -400,27 +401,27 @@ void SwHTMLWriter::OutHiddenForms()
uno::Reference< drawing::XDrawPageSupplier > xDPSupp( pDocSh->GetBaseModel(),
uno::UNO_QUERY );
- ASSERT( xDPSupp.is(), "XTextDocument nicht vom XModel erhalten" );
+ OSL_ENSURE( xDPSupp.is(), "XTextDocument nicht vom XModel erhalten" );
uno::Reference< drawing::XDrawPage > xDrawPage = xDPSupp->getDrawPage();
- ASSERT( xDrawPage.is(), "XDrawPage nicht erhalten" );
+ OSL_ENSURE( xDrawPage.is(), "XDrawPage nicht erhalten" );
if( !xDrawPage.is() )
return;
uno::Reference< form::XFormsSupplier > xFormsSupplier( xDrawPage, uno::UNO_QUERY );
- ASSERT( xFormsSupplier.is(),
+ OSL_ENSURE( xFormsSupplier.is(),
"XFormsSupplier nicht vom XDrawPage erhalten" );
uno::Reference< container::XNameContainer > xTmp = xFormsSupplier->getForms();
- ASSERT( xTmp.is(), "XForms nicht erhalten" );
+ OSL_ENSURE( xTmp.is(), "XForms nicht erhalten" );
uno::Reference< container::XIndexContainer > xForms( xTmp, uno::UNO_QUERY );
- ASSERT( xForms.is(), "XForms ohne container::XIndexContainer?" );
+ OSL_ENSURE( xForms.is(), "XForms ohne container::XIndexContainer?" );
sal_Int32 nCount = xForms->getCount();
for( sal_Int32 i=0; i<nCount; i++)
{
uno::Any aTmp = xForms->getByIndex( i );
- ASSERT( aTmp.getValueType() ==
+ OSL_ENSURE( aTmp.getValueType() ==
::getCppuType((uno::Reference< form::XForm >*)0),
"OutHiddenForms: falsche Reflection" );
if( aTmp.getValueType() ==
@@ -440,7 +441,7 @@ void SwHTMLWriter::OutHiddenForm( const uno::Reference< form::XForm > & rForm )
for( sal_Int32 i=0; i<nCount; i++ )
{
uno::Any aTmp = xFormComps->getByIndex( i );
- ASSERT( aTmp.getValueType() ==
+ OSL_ENSURE( aTmp.getValueType() ==
::getCppuType((uno::Reference<form::XFormComponent>*)0),
"OutHiddenForm: falsche Reflection" );
if( aTmp.getValueType() !=
@@ -456,7 +457,7 @@ void SwHTMLWriter::OutHiddenForm( const uno::Reference< form::XForm > & rForm )
if( bHiddenOnly )
{
uno::Reference< beans::XPropertySet > xPropSet( xFormComp, uno::UNO_QUERY );
- OUString sPropName = OUString::createFromAscii( "ClassId" );
+ OUString sPropName(RTL_CONSTASCII_USTRINGPARAM("ClassId"));
if( xPropSet->getPropertySetInfo()->hasPropertyByName( sPropName ) )
{
uno::Any aAny2 = xPropSet->getPropertyValue( sPropName );
@@ -507,7 +508,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn,
uno::Reference< beans::XPropertySet > xFormPropSet( rFormComps, uno::UNO_QUERY );
uno::Any aTmp = xFormPropSet->getPropertyValue(
- OUString::createFromAscii( "Name" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
((OUString*)aTmp.getValue())->getLength() )
{
@@ -519,7 +520,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn,
}
aTmp = xFormPropSet->getPropertyValue(
- OUString::createFromAscii( "TargetURL" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
((OUString*)aTmp.getValue())->getLength() )
{
@@ -532,7 +533,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn,
}
aTmp = xFormPropSet->getPropertyValue(
- OUString::createFromAscii( "SubmitMethod" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("SubmitMethod")) );
if( aTmp.getValueType() == ::getCppuType((const form::FormSubmitMethod*)0) )
{
form::FormSubmitMethod eMethod =
@@ -545,7 +546,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn,
}
}
aTmp = xFormPropSet->getPropertyValue(
- OUString::createFromAscii( "SubmitEncoding" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("SubmitEncoding")) );
if( aTmp.getValueType()==::getCppuType((const form::FormSubmitEncoding*)0) )
{
form::FormSubmitEncoding eEncType =
@@ -572,7 +573,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn,
}
aTmp = xFormPropSet->getPropertyValue(
- OUString::createFromAscii( "TargetFrame" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("TargetFrame")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0)&&
((OUString*)aTmp.getValue())->getLength() )
{
@@ -605,7 +606,7 @@ void SwHTMLWriter::OutHiddenControls(
for( nPos=0; !bDone && nPos < nCount; nPos++ )
{
uno::Any aTmp = rFormComps->getByIndex( nPos );
- ASSERT( aTmp.getValueType() ==
+ OSL_ENSURE( aTmp.getValueType() ==
::getCppuType((uno::Reference< form::XFormComponent>*)0),
"OutHiddenControls: falsche Reflection" );
bDone = aTmp.getValueType() ==
@@ -618,7 +619,7 @@ void SwHTMLWriter::OutHiddenControls(
for( ; nPos < nCount; nPos++ )
{
uno::Any aTmp = rFormComps->getByIndex( nPos );
- ASSERT( aTmp.getValueType() ==
+ OSL_ENSURE( aTmp.getValueType() ==
::getCppuType((uno::Reference< form::XFormComponent>*)0),
"OutHiddenControls: falsche Reflection" );
if( aTmp.getValueType() !=
@@ -628,7 +629,7 @@ void SwHTMLWriter::OutHiddenControls(
*(uno::Reference< form::XFormComponent > *)aTmp.getValue();
uno::Reference< beans::XPropertySet > xPropSet( xFC, uno::UNO_QUERY );
- OUString sPropName = OUString::createFromAscii( "ClassId" );
+ OUString sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("ClassId"));
if( !xPropSet->getPropertySetInfo()->hasPropertyByName( sPropName ) )
continue;
@@ -646,7 +647,7 @@ void SwHTMLWriter::OutHiddenControls(
OOO_STRING_SVTOOLS_HTML_O_type) += '=') += OOO_STRING_SVTOOLS_HTML_IT_hidden;
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "Name" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
((OUString*)aTmp.getValue())->getLength() )
{
@@ -657,7 +658,7 @@ void SwHTMLWriter::OutHiddenControls(
sOut = '\"';
}
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "HiddenValue" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("HiddenValue")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
((OUString*)aTmp.getValue())->getLength() )
{
@@ -686,7 +687,7 @@ void SwHTMLWriter::OutHiddenControls(
const SdrObject *SwHTMLWriter::GetHTMLControl( const SwDrawFrmFmt& rFmt )
{
// es muss ein Draw-Format sein
- ASSERT( RES_DRAWFRMFMT == rFmt.Which(),
+ OSL_ENSURE( RES_DRAWFRMFMT == rFmt.Which(),
"GetHTMLControl nuer fuer Draw-Formate erlaubt" );
// Schauen, ob es ein SdrObject dafuer gibt
@@ -698,13 +699,13 @@ const SdrObject *SwHTMLWriter::GetHTMLControl( const SwDrawFrmFmt& rFmt )
uno::Reference< awt::XControlModel > xControlModel =
pFormObj->GetUnoControlModel();
- ASSERT( xControlModel.is(), "UNO-Control ohne Model" );
+ OSL_ENSURE( xControlModel.is(), "UNO-Control ohne Model" );
if( !xControlModel.is() )
return 0;
uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY );
- OUString sPropName = OUString::createFromAscii( "ClassId" );
+ OUString sPropName(RTL_CONSTASCII_USTRINGPARAM("ClassId"));
if( !xPropSet->getPropertySetInfo()->hasPropertyByName( sPropName ) )
return 0;
@@ -729,11 +730,11 @@ static void GetControlSize( const SdrObject& rSdrObj, Size& rSz,
SdrUnoObj *pFormObj = PTR_CAST( SdrUnoObj, &rSdrObj );
uno::Reference< awt::XControl > xControl;
SdrView* pDrawView = pVSh->GetDrawView();
- ASSERT( pDrawView && pVSh->GetWin(), "no DrawView or window!" );
+ OSL_ENSURE( pDrawView && pVSh->GetWin(), "no DrawView or window!" );
if ( pDrawView && pVSh->GetWin() )
xControl = pFormObj->GetUnoControl( *pDrawView, *pVSh->GetWin() );
uno::Reference< awt::XTextLayoutConstrains > xLC( xControl, uno::UNO_QUERY );
- ASSERT( xLC.is(), "kein XTextLayoutConstrains" );
+ OSL_ENSURE( xLC.is(), "kein XTextLayoutConstrains" );
if( !xLC.is() )
return;
@@ -754,7 +755,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
uno::Reference< awt::XControlModel > xControlModel =
pFormObj->GetUnoControlModel();
- ASSERT( xControlModel.is(), "UNO-Control ohne Model" );
+ OSL_ENSURE( xControlModel.is(), "UNO-Control ohne Model" );
if( !xControlModel.is() )
return rWrt;
@@ -762,8 +763,6 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
uno::Reference< beans::XPropertySetInfo > xPropSetInfo =
xPropSet->getPropertySetInfo();
-//!!! if( rHTMLWrt.pForm != pVCSbxCtrl->GetVCForm() )
-//!!! rHTMLWrt.nWarn = 1; // Control wird falscher Form zugeordnet
rHTMLWrt.nFormCntrlCnt++;
enum Tag { TAG_INPUT, TAG_SELECT, TAG_TEXTAREA, TAG_NONE };
@@ -785,7 +784,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
ByteString sOptions;
sal_Bool bEmptyValue = sal_False;
uno::Any aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "ClassId" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("ClassId")) );
sal_Int16 nClassId = *(sal_Int16*) aTmp.getValue();
sal_uInt32 nFrmOpts = HTML_FRMOPTS_CONTROL;
switch( nClassId )
@@ -795,7 +794,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
eType = (form::FormComponentType::CHECKBOX == nClassId
? TYPE_CHECKBOX : TYPE_RADIO);
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "DefaultState" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultState")) );
if( aTmp.getValueType() == ::getCppuType((const sal_Int16*)0) &&
STATE_NOCHECK != *(sal_Int16*) aTmp.getValue() )
{
@@ -803,7 +802,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
}
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "RefValue" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("RefValue")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) )
{
@@ -819,7 +818,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
{
form::FormButtonType eButtonType = form::FormButtonType_PUSH;
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "ButtonType" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("ButtonType")) );
if( aTmp.getValueType() ==
::getCppuType((const form::FormButtonType*)0) )
eButtonType = *( form::FormButtonType*)aTmp.getValue();
@@ -838,7 +837,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
}
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "Label" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
((OUString*)aTmp.getValue())->getLength() )
{
@@ -852,7 +851,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
rHTMLWrt.OutNewLine( sal_True );
eTag = TAG_SELECT;
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "Dropdown" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Dropdown")) );
if( aTmp.getValueType() == ::getBooleanCppuType() &&
!*(sal_Bool*)aTmp.getValue() )
{
@@ -865,7 +864,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
+= ByteString::CreateFromInt32( aSz.Height() );
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "MultiSelection" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("MultiSelection")) );
if( aTmp.getValueType() == ::getBooleanCppuType() &&
*(sal_Bool*)aTmp.getValue() )
{
@@ -880,7 +879,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
GetControlSize( rSdrObject, aSz, rWrt.pDoc );
sal_Bool bMultiLine = sal_False;
- OUString sMultiLine( OUString::createFromAscii( "MultiLine" ) );
+ OUString sMultiLine(RTL_CONSTASCII_USTRINGPARAM("MultiLine"));
if( xPropSetInfo->hasPropertyByName( sMultiLine ) )
{
aTmp = xPropSet->getPropertyValue( sMultiLine );
@@ -902,14 +901,14 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
+= ByteString::CreateFromInt32( aSz.Width() );
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "HScroll" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("HScroll")) );
if( aTmp.getValueType() == ::getVoidCppuType() ||
(aTmp.getValueType() == ::getBooleanCppuType() &&
!*(sal_Bool*)aTmp.getValue()) )
{
const sal_Char *pWrapStr = 0;
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "HardLineBreaks" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("HardLineBreaks")) );
pWrapStr =
(aTmp.getValueType() == ::getBooleanCppuType() &&
*(sal_Bool*)aTmp.getValue()) ? OOO_STRING_SVTOOLS_HTML_WW_hard
@@ -920,7 +919,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
else
{
eType = TYPE_TEXT;
- OUString sEchoChar( OUString::createFromAscii( "EchoChar" ) );
+ OUString sEchoChar(RTL_CONSTASCII_USTRINGPARAM("EchoChar"));
if( xPropSetInfo->hasPropertyByName( sEchoChar ) )
{
aTmp = xPropSet->getPropertyValue( sEchoChar );
@@ -934,7 +933,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
+= ByteString::CreateFromInt32( aSz.Width() );
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "MaxTextLen" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("MaxTextLen")) );
if( aTmp.getValueType() == ::getCppuType((const sal_Int16*)0) &&
*(sal_Int16*) aTmp.getValue() != 0 )
{
@@ -943,7 +942,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
*(sal_Int16*) aTmp.getValue() );
}
- OUString sDefaultText( OUString::createFromAscii( "DefaultText" ) );
+ OUString sDefaultText(RTL_CONSTASCII_USTRINGPARAM("DefaultText"));
if( xPropSetInfo->hasPropertyByName( sDefaultText ) )
{
aTmp = xPropSet->getPropertyValue( sDefaultText );
@@ -991,7 +990,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
(((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_type) += '=') +=
TypeNames[eType];
- aTmp = xPropSet->getPropertyValue( OUString::createFromAscii( "Name" ) );
+ aTmp = xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
((OUString*)aTmp.getValue())->getLength() )
{
@@ -1002,7 +1001,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
sOut = '\"';
}
- aTmp = xPropSet->getPropertyValue( OUString::createFromAscii( "Enabled" ) );
+ aTmp = xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")) );
if( aTmp.getValueType() == ::getBooleanCppuType() &&
!*(sal_Bool*)aTmp.getValue() )
{
@@ -1022,7 +1021,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
if( TYPE_IMAGE == eType )
{
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "ImageURL" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("ImageURL")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
((OUString*)aTmp.getValue())->getLength() )
{
@@ -1059,7 +1058,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
}
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "TabIndex" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("TabIndex")) );
if( aTmp.getValueType() == ::getCppuType((const sal_Int16*)0) )
{
sal_Int16 nTabIndex = *(sal_Int16*) aTmp.getValue();
@@ -1079,7 +1078,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
sOut.Erase();
}
- ASSERT( !bInCntnr, "Container wird fuer Controls nicht unterstuertzt" );
+ OSL_ENSURE( !bInCntnr, "Container wird fuer Controls nicht unterstuertzt" );
if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_DRAW ) && !bInCntnr )
{
// Wenn Zeichen-Objekte nicht absolut positioniert werden duerfen,
@@ -1099,7 +1098,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
SfxItemSet aItemSet( rHTMLWrt.pDoc->GetAttrPool(), RES_CHRATR_BEGIN,
RES_CHRATR_END );
- OUString sPropName = OUString::createFromAscii( "BackgroundColor" );
+ OUString sPropName(RTL_CONSTASCII_USTRINGPARAM("BackgroundColor"));
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp = xPropSet->getPropertyValue( sPropName );
@@ -1109,7 +1108,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
aItemSet.Put( SvxBrushItem( aCol, RES_CHRATR_BACKGROUND ) );
}
}
- sPropName = OUString::createFromAscii( "TextColor" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("TextColor"));
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp = xPropSet->getPropertyValue( sPropName );
@@ -1119,7 +1118,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
aItemSet.Put( SvxColorItem( aColor, RES_CHRATR_COLOR ) );
}
}
- sPropName = OUString::createFromAscii( "FontHeight" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontHeight"));
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp = xPropSet->getPropertyValue( sPropName );
@@ -1131,7 +1130,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
aItemSet.Put( SvxFontHeightItem( sal_Int16(nHeight * 20.), 100, RES_CHRATR_FONTSIZE ) );
}
}
- sPropName = OUString::createFromAscii( "FontName" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontName"));
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp = xPropSet->getPropertyValue( sPropName );
@@ -1145,7 +1144,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
if( !bEdit || aFName != aFixedFont.GetName() )
{
FontFamily eFamily = FAMILY_DONTKNOW;
- sPropName = OUString::createFromAscii( "FontFamily" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontFamily"));
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp = xPropSet->getPropertyValue( sPropName );
@@ -1157,7 +1156,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
}
}
}
- sPropName = OUString::createFromAscii( "FontWeight" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontWeight"));
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp = xPropSet->getPropertyValue( sPropName );
@@ -1169,7 +1168,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
aItemSet.Put( SvxWeightItem( eWeight, RES_CHRATR_WEIGHT ) );
}
}
- sPropName = OUString::createFromAscii( "FontSlant" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontSlant"));
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp = xPropSet->getPropertyValue( sPropName );
@@ -1180,7 +1179,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
aItemSet.Put( SvxPostureItem( eItalic, RES_CHRATR_POSTURE ) );
}
}
- sPropName = OUString::createFromAscii( "FontUnderline" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontUnderline"));
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp = xPropSet->getPropertyValue( sPropName );
@@ -1193,7 +1192,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
aItemSet.Put( SvxUnderlineItem( eUnderline, RES_CHRATR_UNDERLINE ) );
}
}
- sPropName = OUString::createFromAscii( "FontStrikeout" );
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontStrikeout"));
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp = xPropSet->getPropertyValue( sPropName );
@@ -1220,7 +1219,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
if( TAG_SELECT == eTag )
{
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "StringItemList" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("StringItemList")) );
if( aTmp.getValueType() == ::getCppuType((uno::Sequence<OUString>*)0) )
{
rHTMLWrt.IncIndentLevel(); // der Inhalt von Select darf
@@ -1232,7 +1231,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
const OUString *pValues = 0;
sal_Int32 nValCnt = 0;
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "ListSource" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("ListSource")) );
uno::Sequence<OUString> aValList;
if( aTmp.getValueType() == ::getCppuType((uno::Sequence<OUString>*)0) )
{
@@ -1242,7 +1241,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
}
uno::Any aSelTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "DefaultSelection" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultSelection")) );
const sal_Int16 *pSels = 0;
sal_Int32 nSel = 0;
sal_Int32 nSelCnt = 0;
@@ -1303,7 +1302,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
// werden!
String sVal;
aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "DefaultText" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultText")) );
if( aTmp.getValueType() == ::getCppuType((const OUString*)0)&&
((OUString*)aTmp.getValue())->getLength() )
{
@@ -1326,7 +1325,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
}
else if( TYPE_CHECKBOX == eType || TYPE_RADIO == eType )
{
- aTmp = xPropSet->getPropertyValue( OUString::createFromAscii("Label") );
+ aTmp = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Label")));
if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
((OUString*)aTmp.getValue())->getLength() )
{
@@ -1356,7 +1355,7 @@ static void AddControl( HTMLControls& rControls,
sal_uInt32 nNodeIdx )
{
SdrUnoObj *pFormObj = PTR_CAST( SdrUnoObj, pSdrObj );
- ASSERT( pFormObj, "Doch kein FormObj" );
+ OSL_ENSURE( pFormObj, "Doch kein FormObj" );
uno::Reference< awt::XControlModel > xControlModel =
pFormObj->GetUnoControlModel();
if( !xControlModel.is() )
@@ -1366,7 +1365,7 @@ static void AddControl( HTMLControls& rControls,
uno::Reference< uno::XInterface > xIfc = xFormComp->getParent();
uno::Reference< form::XForm > xForm(xIfc, uno::UNO_QUERY);
- ASSERT( xForm.is(), "Wo ist die Form?" );
+ OSL_ENSURE( xForm.is(), "Wo ist die Form?" );
if( xForm.is() )
{
uno::Reference< container::XIndexContainer > xFormComps( xForm, uno::UNO_QUERY );
@@ -1401,7 +1400,7 @@ void SwHTMLWriter::GetControls()
continue;
const SdrObject *pSdrObj = pPosFlyFrm->GetSdrObject();
- ASSERT( pSdrObj, "Wo ist das SdrObject?" );
+ OSL_ENSURE( pSdrObj, "Wo ist das SdrObject?" );
if( !pSdrObj )
continue;
@@ -1445,3 +1444,4 @@ HTMLControl::~HTMLControl()
{}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 6c96722b5009..700c1233378b 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,7 +34,6 @@
#include <svtools/htmlout.hxx>
#include <svtools/htmlkywd.hxx>
-#include <errhdl.hxx>
#include <ndindex.hxx>
#include <fmtftn.hxx>
#include <txtftn.hxx>
@@ -301,7 +301,7 @@ Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt )
if( rFmtFtn.IsEndNote() )
{
nPos = rHTMLWrt.pFootEndNotes ? rHTMLWrt.pFootEndNotes->Count() : 0;
- ASSERT( nPos == rHTMLWrt.nFootNote + rHTMLWrt.nEndNote,
+ OSL_ENSURE( nPos == rHTMLWrt.nFootNote + rHTMLWrt.nEndNote,
"OutHTML_SwFmtFtn: Position falsch" );
sClass.AssignAscii( OOO_STRING_SVTOOLS_HTML_sdendnote_anc );
sFtnName.AssignAscii( OOO_STRING_SVTOOLS_HTML_sdendnote );
@@ -346,12 +346,12 @@ Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt )
void SwHTMLWriter::OutFootEndNotes()
{
- ASSERT( pFootEndNotes,
+ OSL_ENSURE( pFootEndNotes,
"SwHTMLWriter::OutFootEndNotes(): unnoetiger Aufruf" );
if( !pFootEndNotes )
return;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uInt16 nFtn = nFootNote, nEn = nEndNote;
#endif
nFootNote = 0, nEndNote = 0;
@@ -386,9 +386,9 @@ void SwHTMLWriter::OutFootEndNotes()
bLFPossible = sal_True;
IncIndentLevel(); // Inhalt von <DIV> einruecken
- ASSERT( pTxtFtn, "SwHTMLWriter::OutFootEndNotes: SwTxtFtn fehlt" );
+ OSL_ENSURE( pTxtFtn, "SwHTMLWriter::OutFootEndNotes: SwTxtFtn fehlt" );
SwNodeIndex *pSttNdIdx = pTxtFtn->GetStartNode();
- ASSERT( pSttNdIdx,
+ OSL_ENSURE( pSttNdIdx,
"SwHTMLWriter::OutFootEndNotes: StartNode-Index fehlt" );
if( pSttNdIdx )
{
@@ -403,7 +403,7 @@ void SwHTMLWriter::OutFootEndNotes()
HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_division, sal_False );
bLFPossible = sal_True;
- ASSERT( !pFmtFtn,
+ OSL_ENSURE( !pFmtFtn,
"SwHTMLWriter::OutFootEndNotes: Ftn wurde nicht ausgegeben" );
if( pFmtFtn )
{
@@ -416,10 +416,10 @@ void SwHTMLWriter::OutFootEndNotes()
}
}
-#ifdef DBG_UTIL
- ASSERT( nFtn == nFootNote,
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( nFtn == nFootNote,
"SwHTMLWriter::OutFootEndNotes: Anzahl Fussnoten stimmt nicht" );
- ASSERT( nEn == nEndNote,
+ OSL_ENSURE( nEn == nEndNote,
"SwHTMLWriter::OutFootEndNotes: Anzahl Endnoten stimmt nicht" );
#endif
@@ -619,3 +619,4 @@ void SwHTMLWriter::OutFootEndNoteInfo()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 415c6447fac8..82c2e41aa403 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,6 @@
#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>
@@ -54,13 +54,11 @@
#include <fmtornt.hxx>
#include <fmturl.hxx>
-#include <fmtanchr.hxx>
#include <fmtsrnd.hxx>
#include <fmtinfmt.hxx>
#include <fmtcntnt.hxx>
#include <fmtanchr.hxx>
#include <fmtfsize.hxx>
-#include <fmtinfmt.hxx>
#include "frmatr.hxx"
#include "charatr.hxx"
#include <frmfmt.hxx>
@@ -83,7 +81,7 @@
using namespace ::com::sun::star;
-HTMLOptionEnum __FAR_DATA aHTMLImgHAlignTable[] =
+HTMLOptionEnum aHTMLImgHAlignTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_AL_left, text::HoriOrientation::LEFT },
{ OOO_STRING_SVTOOLS_HTML_AL_right, text::HoriOrientation::RIGHT },
@@ -91,7 +89,7 @@ HTMLOptionEnum __FAR_DATA aHTMLImgHAlignTable[] =
};
-HTMLOptionEnum __FAR_DATA aHTMLImgVAlignTable[] =
+HTMLOptionEnum aHTMLImgVAlignTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_VA_top, text::VertOrientation::LINE_TOP },
{ OOO_STRING_SVTOOLS_HTML_VA_texttop, text::VertOrientation::CHAR_TOP },
@@ -110,7 +108,7 @@ ImageMap *SwHTMLParser::FindImageMap( const String& rName ) const
{
ImageMap *pMap = 0;
- ASSERT( rName.GetChar(0) != '#', "FindImageName: Name beginnt mit #!" );
+ OSL_ENSURE( rName.GetChar(0) != '#', "FindImageName: Name beginnt mit #!" );
if( pImageMaps )
{
@@ -454,7 +452,7 @@ IMAGE_SETEVENT:
if( pTxtNode && ! pTxtNode->IsCountedInList())
{
- ASSERT( pTxtNode->GetActualListLevel() == GetNumInfo().GetLevel(),
+ OSL_ENSURE( pTxtNode->GetActualListLevel() == GetNumInfo().GetLevel(),
"Numerierungs-Ebene stimmt nicht" );
pTxtNode->SetCountedInList( true );
@@ -689,7 +687,7 @@ IMAGE_SETEVENT:
// min. Werte einhalten !!
if( nPrcWidth )
{
- ASSERT( !aTwipSz.Width(),
+ OSL_ENSURE( !aTwipSz.Width(),
"Wieso ist da trotz %-Angabe eine Breite gesetzt?" );
aTwipSz.Width() = aGrfSz.Width() ? aGrfSz.Width()
: HTML_DFLT_IMG_WIDTH;
@@ -702,7 +700,7 @@ IMAGE_SETEVENT:
}
if( nPrcHeight )
{
- ASSERT( !aTwipSz.Height(),
+ OSL_ENSURE( !aTwipSz.Height(),
"Wieso ist da trotz %-Angabe eine Hoehe gesetzt?" );
aTwipSz.Height() = aGrfSz.Height() ? aGrfSz.Height()
: HTML_DFLT_IMG_HEIGHT;
@@ -763,7 +761,7 @@ IMAGE_SETEVENT:
{
const SvxMacro *pMacro;
- static sal_uInt16 __READONLY_DATA aEvents[] = {
+ static sal_uInt16 aEvents[] = {
SFX_EVENT_MOUSEOVER_OBJECT,
SFX_EVENT_MOUSECLICK_OBJECT,
SFX_EVENT_MOUSEOUT_OBJECT,
@@ -893,9 +891,6 @@ void SwHTMLParser::InsertBodyOptions()
break;
case HTML_O_ONERROR:
-// if( bAnyStarBasic )
-// InsertBasicDocEvent( SFX_EVENT_ACTIVATEDOC,
-// pOption->GetString() );
break;
case HTML_O_STYLE:
@@ -1018,9 +1013,9 @@ void SwHTMLParser::InsertBodyOptions()
if( aLang.Len() )
{
LanguageType eLang = MsLangId::convertIsoStringToLanguage( aLang );
- sal_uInt16 nWhich = 0;
if( LANGUAGE_DONTKNOW != eLang )
{
+ sal_uInt16 nWhich = 0;
switch( SvtLanguageOptions::GetScriptTypeOfLanguage( eLang ) )
{
case SCRIPTTYPE_LATIN:
@@ -1384,10 +1379,10 @@ void SwHTMLParser::StripTrailingPara()
SwCntntNode* pNd = pDoc->GetNodes().GoPrevious(&nNewNdIdx);
if(!pNd)
{
- ASSERT(!this, "Hoppla, wo ist mein Vorgaenger-Node");
+ OSL_ENSURE(!this, "Hoppla, wo ist mein Vorgaenger-Node");
return;
}
- // --> OD 2007-09-27 #i81002# - refactoring
+ // #i81002# - refactoring
// Do not directly manipulate member of <SwBookmark>
{
SwPosition aNewPos(*pNd);
@@ -1445,3 +1440,4 @@ void SwHTMLParser::StripTrailingPara()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx
index e6df6e3978e0..6ff9bfe73cbf 100644
--- a/sw/source/filter/html/htmlnum.cxx
+++ b/sw/source/filter/html/htmlnum.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,7 +63,7 @@ using namespace ::com::sun::star;
// <UL TYPE=...>
-static HTMLOptionEnum __FAR_DATA aHTMLULTypeTable[] =
+static HTMLOptionEnum aHTMLULTypeTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_ULTYPE_disc, HTML_BULLETCHAR_DISC },
{ OOO_STRING_SVTOOLS_HTML_ULTYPE_circle, HTML_BULLETCHAR_CIRCLE },
@@ -74,9 +75,6 @@ static HTMLOptionEnum __FAR_DATA aHTMLULTypeTable[] =
void SwHTMLNumRuleInfo::Set( const SwTxtNode& rTxtNd )
{
- // --> OD 2006-06-12 #b6435904#
- // export all numberings, except the outline numbering.
-// if( rTxtNd.GetNumRule() && ! rTxtNd.IsOutline())
const SwNumRule* pTxtNdNumRule( rTxtNd.GetNumRule() );
if ( pTxtNdNumRule &&
pTxtNdNumRule != rTxtNd.GetDoc()->GetOutlineNumRule() )
@@ -84,15 +82,11 @@ void SwHTMLNumRuleInfo::Set( const SwTxtNode& rTxtNd )
pNumRule = const_cast<SwNumRule*>(pTxtNdNumRule);
nDeep = static_cast< sal_uInt16 >(pNumRule ? rTxtNd.GetActualListLevel() + 1 : 0);
bNumbered = rTxtNd.IsCountedInList();
- // --> OD 2008-02-27 #refactorlists#
- // --> OD 2005-11-16 #i57919#
- // correction of refactoring done by cws swnumtree:
+ // #i57919# - correction of refactoring done by cws swnumtree:
// <bRestart> has to be set to <true>, if numbering is restarted at this
// text node and the start value equals <USHRT_MAX>.
// Start value <USHRT_MAX> indicates, that at this text node the numbering
// is restarted with the value given at the corresponding level.
-// bRestart = rTxtNd.IsListRestart() &&
-// GetNum() && rTxtNd.GetNum()->GetStartValue() == USHRT_MAX;
bRestart = rTxtNd.IsListRestart() && !rTxtNd.HasAttrListRestartValue();
// <--
}
@@ -152,8 +146,7 @@ void SwHTMLParser::NewNumBulList( int nToken )
// so macht. Dadurch wurd immer auch eine 9pt-Schrift
// eingestellt, was in Netscape nicht der Fall ist. Bisher hat
// das noch niemanden gestoert.
- // --> OD 2008-06-03 #i63395#
- // Only apply user defined default bullet font
+ // #i63395# - Only apply user defined default bullet font
if ( numfunc::IsDefBulletFontUserDefined() )
{
aNumFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
@@ -308,11 +301,7 @@ void SwHTMLParser::NewNumBulList( int nToken )
// den aktuellen Absatz erst einmal nicht numerieren
{
sal_uInt8 nLvl = nLevel;
- // --> OD 2008-04-02 #refactorlists#
-// SetNoNum(&nLvl, sal_True); // #115962#
-// SetNodeNum( nLvl );
SetNodeNum( nLvl, false );
- // <--
}
// einen neuen Kontext anlegen
@@ -359,8 +348,7 @@ void SwHTMLParser::NewNumBulList( int nToken )
if( !aPropInfo.bRightMargin )
aItemSet.ClearItem( RES_LR_SPACE );
- // --> OD 2008-06-26 #i89812#
- // Perform change to list style before calling <DoPositioning(..)>,
+ // #i89812# - Perform change to list style before calling <DoPositioning(..)>,
// because <DoPositioning(..)> may open a new context and thus may
// clear the <SwHTMLNumRuleInfo> instance hold by local variable <rInfo>.
if( bChangeNumFmt )
@@ -441,8 +429,7 @@ void SwHTMLParser::EndNumBulList( int nToken )
? pRefNumFmt->GetNumberingType() : style::NumberingType::CHAR_SPECIAL);
if( SVX_NUM_CHAR_SPECIAL == aNumFmt.GetNumberingType() )
{
- // --> OD 2008-06-03 #i63395#
- // Only apply user defined default bullet font
+ // #i63395# - Only apply user defined default bullet font
if ( numfunc::IsDefBulletFontUserDefined() )
{
aNumFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
@@ -469,9 +456,7 @@ void SwHTMLParser::EndNumBulList( int nToken )
}
else
{
- // den naechsten Absatz erstmal nicht numerieren
- // --> OD 2008-04-02 #refactorlists#
-// SetNodeNum( rInfo.GetLevel() | NO_NUMLEVEL );
+ // the next paragraph not numbered first
SetNodeNum( rInfo.GetLevel(), false );
// <--
}
@@ -538,11 +523,7 @@ void SwHTMLParser::NewNumBulListItem( int nToken )
AppendTxtNode( AM_NOSPACE, sal_False );
bNoParSpace = sal_False; // In <LI> wird kein Abstand eingefuegt!
- // --> OD 2008-04-02 #refactorlists#
-// if( HTML_LISTHEADER_ON==nToken )
-// SetNoNum(&nLevel, sal_True);
const bool bCountedInList( HTML_LISTHEADER_ON==nToken ? false : true );
- // <--
_HTMLAttrContext *pCntxt = new _HTMLAttrContext( static_cast< sal_uInt16 >(nToken) );
@@ -554,13 +535,10 @@ void SwHTMLParser::NewNumBulListItem( int nToken )
else
{
aNumRuleName = pDoc->GetUniqueNumRuleName();
- // --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule aNumRule( aNumRuleName,
SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
- // <--
SwNumFmt aNumFmt( aNumRule.Get( 0 ) );
- // --> OD 2008-06-03 #i63395#
- // Only apply user defined default bullet font
+ // #i63395# - Only apply user defined default bullet font
if ( numfunc::IsDefBulletFontUserDefined() )
{
aNumFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
@@ -575,7 +553,7 @@ void SwHTMLParser::NewNumBulListItem( int nToken )
pDoc->MakeNumRule( aNumRuleName, &aNumRule );
- ASSERT( !nOpenParaToken,
+ OSL_ENSURE( !nOpenParaToken,
"Jetzt geht ein offenes Absatz-Element verloren" );
// Wir tun so, als ob wir in einem Absatz sind. Dann wird
// beim naechsten Absatz wenigstens die Numerierung
@@ -587,16 +565,13 @@ void SwHTMLParser::NewNumBulListItem( int nToken )
SwTxtNode* pTxtNode = pPam->GetNode()->GetTxtNode();
((SwCntntNode *)pTxtNode)->SetAttr( SwNumRuleItem(aNumRuleName) );
pTxtNode->SetAttrListLevel(nLevel);
- // --> OD 2005-11-14 #i57656#
- // <IsCounted()> state of text node has to be adjusted accordingly.
- if ( /*nLevel >= 0 &&*/ nLevel < MAXLEVEL )
+ // #i57656# - <IsCounted()> state of text node has to be adjusted accordingly.
+ if ( nLevel < MAXLEVEL )
{
- // --> OD 2008-04-02 #refactorlists#
pTxtNode->SetCountedInList( bCountedInList );
- // <--
}
// <--
- // --> OD 2005-11-15 #i57919#
+ // #i57919#
// correction of refactoring done by cws swnumtree
// - <nStart> contains the start value, if the numbering has to be restarted
// at this text node. Value <USHRT_MAX> indicates, that numbering isn't
@@ -682,32 +657,17 @@ void SwHTMLParser::EndNumBulListItem( int nToken, sal_Bool bSetColl,
/* */
-// --> OD 2008-04-02 #refactorlists#
void SwHTMLParser::SetNodeNum( sal_uInt8 nLevel, bool bCountedInList )
{
SwTxtNode* pTxtNode = pPam->GetNode()->GetTxtNode();
- ASSERT( pTxtNode, "Kein Text-Node an PaM-Position" );
+ OSL_ENSURE( pTxtNode, "Kein Text-Node an PaM-Position" );
- ASSERT( GetNumInfo().GetNumRule(), "Kein Numerierungs-Regel" );
+ OSL_ENSURE( GetNumInfo().GetNumRule(), "Kein Numerierungs-Regel" );
const String& rName = GetNumInfo().GetNumRule()->GetName();
((SwCntntNode *)pTxtNode)->SetAttr( SwNumRuleItem(rName) );
- // --> OD 2008-04-02 #refactorlists#
-// // --> OD 2005-11-14 #i57656#
-// // consider usage of NO_NUMLEVEL - see implementation of <SwTxtNode::SetLevel(..)>
-// if ( /*nLevel >= 0 &&*/ ( nLevel & NO_NUMLEVEL ) )
-// {
-// pTxtNode->SetAttrListLevel( nLevel & ~NO_NUMLEVEL );
-// pTxtNode->SetCountedInList( false );
-// }
-// else
-// {
-// pTxtNode->SetAttrListLevel( nLevel );
-// pTxtNode->SetCountedInList( true );
-// }
pTxtNode->SetAttrListLevel( nLevel );
pTxtNode->SetCountedInList( bCountedInList );
- // <--
// NumRule invalidieren, weil sie durch ein EndAction bereits
// auf valid geschaltet worden sein kann.
@@ -809,7 +769,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
break;
}
- ASSERT(! pTxtNd->IsOutline(),
+ OSL_ENSURE(! pTxtNd->IsOutline(),
"outline not expected");
if( pTxtNd->GetActualListLevel() + 1 <
@@ -915,7 +875,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
sal_uInt16 nStartVal = rNumFmt.GetStart();
if( bStartValue && 1 == nStartVal && i == rInfo.GetDepth()-1 )
{
- // --> OD 2005-11-02 #i51089 - TUNING#
+ // #i51089 - TUNING#
if ( rWrt.pCurPam->GetNode()->GetTxtNode()->GetNum() )
{
nStartVal = static_cast< sal_uInt16 >( rWrt.pCurPam->GetNode()
@@ -923,7 +883,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<OutHTML_NumBulListStart(..) - text node has no number." );
}
}
@@ -985,3 +945,5 @@ Writer& OutHTML_NumBulListEnd( SwHTMLWriter& rWrt,
return rWrt;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlnum.hxx b/sw/source/filter/html/htmlnum.hxx
index 7f7f02bc1015..d747b79746f7 100644
--- a/sw/source/filter/html/htmlnum.hxx
+++ b/sw/source/filter/html/htmlnum.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -129,3 +130,4 @@ inline void SwHTMLNumRuleInfo::SetNodeStartValue( sal_uInt8 nLvl, sal_uInt16 nVa
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index e5bddbd5eb5e..6c82e8141d88 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,7 +65,6 @@
#include "htmlfly.hxx"
#include "swcss1.hxx"
#include <com/sun/star/embed/XClassifiedObject.hpp>
-#include <com/sun/star/embed/EmbedStates.hpp>
#include <comphelper/embeddedobjectcontainer.hxx>
#include <sot/clsids.hxx>
@@ -416,7 +416,7 @@ void SwHTMLParser::InsertEmbed()
INetURLObject(sBaseURL), aURL,
URIHelper::GetMaybeFileHdl()) );
- // #109761# do not insert plugin if it has neither URL nor type
+ // do not insert plugin if it has neither URL nor type
bool bHasType = aType.Len() != 0;
if( !bHasURL && !bHasType )
return;
@@ -431,18 +431,16 @@ void SwHTMLParser::InsertEmbed()
if ( xSet.is() )
{
if( bHasURL )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginURL"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")),
uno::makeAny( ::rtl::OUString( aURL ) ) );
if( bHasType )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginMimeType"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")),
uno::makeAny( ::rtl::OUString( aType ) ) );
uno::Sequence < beans::PropertyValue > aProps;
aCmdLst.FillSequence( aProps );
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginCommands"), uno::makeAny( aProps ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")), uno::makeAny( aProps ) );
- // TODO/LATER: EnableSetModified?!
- //pPlugin->EnableSetModified( sal_True );
}
}
@@ -895,7 +893,6 @@ void SwHTMLParser::InsertFloatingFrame()
::rtl::OUString aObjName;
uno::Reference < embed::XEmbeddedObject > xObj = aCnt.CreateEmbeddedObject( SvGlobalName( SO3_IFRAME_CLASSID ).GetByteSequence(), aObjName );
- //pFrame->EnableSetModified( sal_False );
try
{
// TODO/MBA: testing
@@ -909,27 +906,23 @@ void SwHTMLParser::InsertFloatingFrame()
sal_Bool bHasBorder = aFrameDesc.HasFrameBorder();
Size aMargin = aFrameDesc.GetMargin();
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameURL"), uno::makeAny( ::rtl::OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::NO_DECODE ) ) ) );
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameName"), uno::makeAny( aName ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")), uno::makeAny( ::rtl::OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::NO_DECODE ) ) ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")), uno::makeAny( aName ) );
if ( eScroll == ScrollingAuto )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoScroll"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll")),
uno::makeAny( sal_True ) );
else
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsScrollingMode"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode")),
uno::makeAny( (sal_Bool) ( eScroll == ScrollingYes) ) );
- //if ( aFrmDescr.IsFrameBorderSet() )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsBorder"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder")),
uno::makeAny( bHasBorder ) );
- /*else
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoBorder"),
- uno::makeAny( sal_True ) );*/
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginWidth"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth")),
uno::makeAny( sal_Int32( aMargin.Width() ) ) );
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginHeight"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight")),
uno::makeAny( sal_Int32( aMargin.Height() ) ) );
}
}
@@ -938,8 +931,6 @@ void SwHTMLParser::InsertFloatingFrame()
{
}
- //pFrame->EnableSetModified( sal_True );
-
SfxItemSet aItemSet( pDoc->GetAttrPool(), pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( HasStyleOptions( aStyle, aId, aClass ) )
@@ -978,89 +969,6 @@ void SwHTMLParser::InsertFloatingFrame()
/* */
-/*
-#define SWHTML_OPTTYPE_IGNORE 0
-#define SWHTML_OPTTYPE_TAG 1
-#define SWHTML_OPTTYPE_PARAM 2
-
-
-static sal_uInt16 GetOptionType( const String& rName, sal_Bool bApplet )
-{
- sal_uInt16 nType = bApplet ? SWHTML_OPTTYPE_PARAM : SWHTML_OPTTYPE_TAG;
-
- switch( rName.GetChar(0) )
- {
- case 'A':
- case 'a':
- if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_align ) ||
- rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_alt ) )
- nType = SWHTML_OPTTYPE_IGNORE;
- else if( bApplet &&
- (rName.EqualsIgnoreCaseAscii( sHTML_O_archive ) ||
- rName.EqualsIgnoreCaseAscii( sHTML_O_Archives )) )
- nType = SWHTML_OPTTYPE_TAG;
- break;
- case 'C':
- case 'c':
- if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_class ) ||
- (bApplet && (rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_code ) ||
- rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_codebase ))) )
- nType = SWHTML_OPTTYPE_IGNORE;
- break;
- case 'H':
- case 'h':
- if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_height ) ||
- rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_hspace ) ||
- (!bApplet && rName.EqualsIgnoreCaseAscii( OOO_STRING_SW_HTML_O_Hidden )) )
- nType = SWHTML_OPTTYPE_IGNORE;
- break;
- case 'I':
- case 'i':
- if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_id ) )
- nType = SWHTML_OPTTYPE_IGNORE;
- break;
- case 'M':
- case 'm':
- if( bApplet && rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_mayscript ) )
- nType = SWHTML_OPTTYPE_IGNORE;
- break;
- case 'N':
- case 'n':
- if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_name ) )
- nType = SWHTML_OPTTYPE_IGNORE;
- break;
- case 'O':
- case 'o':
- if( bApplet && rName.EqualsIgnoreCaseAscii( sHTML_O_Object ) )
- nType = SWHTML_OPTTYPE_TAG;
- break;
- case 'S':
- case 's':
- if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_style ) ||
- (!bApplet && rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_src )) )
- nType = SWHTML_OPTTYPE_IGNORE;
- break;
- case 'T':
- case 't':
- if( !bApplet && rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_type ) )
- nType = SWHTML_OPTTYPE_IGNORE;
- break;
- case 'V':
- case 'v':
- if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_vspace ) )
- nType = SWHTML_OPTTYPE_IGNORE;
- break;
- case 'W':
- case 'w':
- if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_width ) )
- nType = SWHTML_OPTTYPE_IGNORE;
- break;
- }
-
- return nType;
-}
-*/
-
sal_uInt16 SwHTMLWriter::GuessOLENodeFrmType( const SwNode& rNode )
{
SwOLEObj& rObj = ((SwOLENode*)rNode.GetOLENode())->GetOLEObj();
@@ -1096,7 +1004,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
SwOLENode *pOLENd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetOLENode();
- ASSERT( pOLENd, "OLE-Node erwartet" );
+ OSL_ENSURE( pOLENd, "OLE-Node erwartet" );
if( !pOLENd )
return rWrt;
@@ -1111,7 +1019,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
if( !xSet.is() )
{
- DBG_ERROR("Unknown Object" );
+ OSL_FAIL("Unknown Object" );
return rWrt;
}
@@ -1135,7 +1043,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
::rtl::OUString aStr;
String aURL;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("PluginURL" ) );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")) );
if( (aAny >>= aStr) && aStr.getLength() )
{
aURL = URIHelper::simpleNormalizedMakeRelative( rWrt.GetBaseURL(),
@@ -1151,7 +1059,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
}
::rtl::OUString aType;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("PluginMimeType" ) );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")) );
if( (aAny >>= aType) && aType.getLength() )
{
((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_type) += "=\"";
@@ -1182,7 +1090,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// CODEBASE
::rtl::OUString aCd;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletCodeBase" ) );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCodeBase")) );
if( (aAny >>= aCd) && aCd.getLength() )
{
String sCodeBase( URIHelper::simpleNormalizedMakeRelative(rWrt.GetBaseURL(), aCd) );
@@ -1197,7 +1105,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// CODE
::rtl::OUString aClass;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletCode" ) );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCode")) );
aAny >>= aClass;
((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_code) += "=\"";
rWrt.Strm() << sOut.GetBuffer();
@@ -1206,7 +1114,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// NAME
::rtl::OUString aAppletName;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletName" ) );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletName")) );
aAny >>= aAppletName;
if( aAppletName.getLength() )
{
@@ -1217,7 +1125,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
}
sal_Bool bScript = sal_False;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletIsScript" ) );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletIsScript")) );
aAny >>= bScript;
if( bScript )
(sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_mayscript;
@@ -1258,7 +1166,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// und ein </APPLET> schreiben
uno::Sequence < beans::PropertyValue > aProps;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletCommands" ) );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")) );
aAny >>= aProps;
SvCommandList aCommands;
@@ -1315,7 +1223,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// fuer Plugins die Paramater als Optionen schreiben
uno::Sequence < beans::PropertyValue > aProps;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("PluginCommands" ) );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")) );
aAny >>= aProps;
SvCommandList aCommands;
@@ -1360,16 +1268,11 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt,
sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
SwOLENode *pOLENd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetOLENode();
- ASSERT( pOLENd, "OLE-Node erwartet" );
+ OSL_ENSURE( pOLENd, "OLE-Node erwartet" );
if( !pOLENd )
return rWrt;
- // Inhalt des Nodes als Grafik speichern
- //uno::Reference < embed::XEmbeddedObject > xObj = pOLENd->GetOLEObj().GetOleRef();
- //GDIMetaFile aPic;
- //if( xObj.is() && xRef->GetGDIMetaFile( aPic ).GetActionCount() )
{
- //Graphic aGrf( aPic );
Graphic aGrf( *pOLENd->GetGraphic() );
String aGrfNm;
const String* pTempFileName = rHTMLWrt.GetOrigFileName();
@@ -1399,3 +1302,4 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 2959a55a0ea8..e1bf61ee49ed 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,7 +67,6 @@
#define CONTEXT_FLAGS_MULTICOL (HTML_CNTXT_STRIP_PARA | \
HTML_CNTXT_KEEP_NUMRULE | \
HTML_CNTXT_KEEP_ATTRS)
-//#define CONTEXT_FLAGS_HDRFTR (HTML_CNTXT_STRIP_PARA|HTML_CNTXT_PROTECT_STACK)
#define CONTEXT_FLAGS_HDRFTR (CONTEXT_FLAGS_MULTICOL)
#define CONTEXT_FLAGS_FTN (CONTEXT_FLAGS_MULTICOL)
@@ -429,7 +429,7 @@ void SwHTMLParser::FixHeaderFooterDistance( sal_Bool bHeader,
SwFrmFmt *pHdFtFmt =
bHeader ? (SwFrmFmt*)rPageFmt.GetHeader().GetHeaderFmt()
: (SwFrmFmt*)rPageFmt.GetFooter().GetFooterFmt();
- ASSERT( pHdFtFmt, "Doch keine Kopf- oder Fusszeile" );
+ OSL_ENSURE( pHdFtFmt, "Doch keine Kopf- oder Fusszeile" );
const SwFmtCntnt& rFlyCntnt = pHdFtFmt->GetCntnt();
const SwNodeIndex& rCntntStIdx = *rFlyCntnt.GetCntntIdx();
@@ -524,7 +524,7 @@ sal_Bool SwHTMLParser::EndSection( sal_Bool bLFStripped )
return sal_True;
}
- ASSERT( !this, "Falsche PaM Position Beenden eines Bereichs" );
+ OSL_ENSURE( !this, "Falsche PaM Position Beenden eines Bereichs" );
return sal_False;
}
@@ -814,7 +814,7 @@ void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd,
SwCntntNode* pDestCntntNd =
pDoc->GetNodes()[nDestIdx]->GetCntntNode();
- ASSERT( pDestCntntNd, "Wieso ist das Ziel kein Content-Node?" );
+ OSL_ENSURE( pDestCntntNd, "Wieso ist das Ziel kein Content-Node?" );
if( pSrcNd->IsCntntNode() )
{
@@ -858,3 +858,4 @@ void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd,
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 28d87439c73f..d2cbded94ee0 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,14 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-//#define TEST_RESIZE
-
#include "hintids.hxx"
#include <vcl/svapp.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <editeng/boxitem.hxx>
#include <editeng/brshitem.hxx>
#include <editeng/adjitem.hxx>
@@ -64,9 +61,6 @@
#include "poolfmt.hxx"
#include "swtable.hxx"
#include "cellatr.hxx"
-#ifdef TEST_RESIZE
-#include "viewsh.hxx"
-#endif
#include "htmltbl.hxx"
#include "swtblfmt.hxx"
#include "htmlnum.hxx"
@@ -83,7 +77,7 @@
using namespace ::com::sun::star;
-static HTMLOptionEnum __FAR_DATA aHTMLTblVAlignTable[] =
+static HTMLOptionEnum aHTMLTblVAlignTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_VA_top, text::VertOrientation::NONE },
{ OOO_STRING_SVTOOLS_HTML_VA_middle, text::VertOrientation::CENTER },
@@ -731,7 +725,7 @@ void HTMLTableCnts::Add( HTMLTableCnts* pNewCnts )
inline void HTMLTableCnts::SetTableBox( SwTableBox *pBox )
{
- ASSERT( pLayoutInfo, "Da sit noch keine Layout-Info" );
+ OSL_ENSURE( pLayoutInfo, "Da sit noch keine Layout-Info" );
if( pLayoutInfo )
pLayoutInfo->SetTableBox( pBox );
}
@@ -765,6 +759,7 @@ HTMLTableCell::HTMLTableCell():
bRelWidth( sal_False ),
bHasNumFmt(sal_False),
bHasValue(sal_False),
+ bNoWrap(sal_False),
mbCovered(sal_False)
{}
@@ -861,7 +856,7 @@ HTMLTableRow::HTMLTableRow( sal_uInt16 nCells ):
pCells->Insert( new HTMLTableCell, pCells->Count() );
}
- ASSERT( nCells==pCells->Count(),
+ OSL_ENSURE( nCells==pCells->Count(),
"Zellenzahl in neuer HTML-Tabellenzeile stimmt nicht" );
}
@@ -879,7 +874,7 @@ inline void HTMLTableRow::SetHeight( sal_uInt16 nHght )
inline HTMLTableCell *HTMLTableRow::GetCell( sal_uInt16 nCell ) const
{
- ASSERT( nCell<pCells->Count(),
+ OSL_ENSURE( nCell<pCells->Count(),
"ungueltiger Zellen-Index in HTML-Tabellenzeile" );
return (*pCells)[nCell];
}
@@ -901,15 +896,15 @@ void HTMLTableRow::Expand( sal_uInt16 nCells, sal_Bool bOneCell )
nColSpan--;
}
- ASSERT( nCells==pCells->Count(),
+ OSL_ENSURE( nCells==pCells->Count(),
"Zellenzahl in expandierter HTML-Tabellenzeile stimmt nicht" );
}
void HTMLTableRow::Shrink( sal_uInt16 nCells )
{
- ASSERT( nCells < pCells->Count(), "Anzahl Zellen falsch" );
+ OSL_ENSURE( nCells < pCells->Count(), "Anzahl Zellen falsch" );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uInt16 nEnd = pCells->Count();
#endif
// The colspan of empty cells at the end has to be fixed to the new
@@ -920,22 +915,24 @@ void HTMLTableRow::Shrink( sal_uInt16 nCells )
HTMLTableCell *pCell = (*pCells)[--i];
if( !pCell->GetContents() )
{
- ASSERT( pCell->GetColSpan() == nEnd - i,
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( pCell->GetColSpan() == nEnd - i,
"invalid col span for empty cell at row end" );
+#endif
pCell->SetColSpan( nCells-i);
}
else
break;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
for( i=nCells; i<nEnd; i++ )
{
HTMLTableCell *pCell = (*pCells)[i];
- ASSERT( pCell->GetRowSpan() == 1,
+ OSL_ENSURE( pCell->GetRowSpan() == 1,
"RowSpan von zu loesender Zelle ist falsch" );
- ASSERT( pCell->GetColSpan() == nEnd - i,
+ OSL_ENSURE( pCell->GetColSpan() == nEnd - i,
"ColSpan von zu loesender Zelle ist falsch" );
- ASSERT( !pCell->GetContents(), "Zu loeschende Zelle hat Inhalt" );
+ OSL_ENSURE( !pCell->GetContents(), "Zu loeschende Zelle hat Inhalt" );
}
#endif
@@ -974,7 +971,7 @@ inline SwHTMLTableLayoutColumn *HTMLTableColumn::CreateLayoutInfo()
inline sal_uInt16 HTMLTableColumn::GetFrmFmtIdx( sal_Bool bBorderLine,
sal_Int16 eVertOrient ) const
{
- ASSERT( text::VertOrientation::TOP != eVertOrient, "Top ist nicht erlaubt" );
+ OSL_ENSURE( text::VertOrientation::TOP != eVertOrient, "Top ist nicht erlaubt" );
sal_uInt16 n = bBorderLine ? 3 : 0;
switch( eVertOrient )
{
@@ -1303,7 +1300,7 @@ const SwStartNode* HTMLTable::GetPrevBoxStartNode( sal_uInt16 nRow, sal_uInt16 n
}
}
}
- ASSERT( pPrevCnts, "keine gefuellte Vorgaenger-Zelle gefunden" );
+ OSL_ENSURE( pPrevCnts, "keine gefuellte Vorgaenger-Zelle gefunden" );
if( !pPrevCnts )
{
pPrevCnts = GetCell(0,0)->GetContents();
@@ -1353,7 +1350,7 @@ sal_uInt16 HTMLTable::GetTopCellSpace( sal_uInt16 nRow, sal_uInt16 nRowSpan,
else if( bSwBorders && ((*pRows)[nRow+nRowSpan-1])->bBottomBorder &&
nSpace < MIN_BORDER_DIST )
{
- ASSERT( !nCellPadding, "GetTopCellSpace: CELLPADDING!=0" );
+ OSL_ENSURE( !nCellPadding, "GetTopCellSpace: CELLPADDING!=0" );
// Wenn die Gegenueberliegende Seite umrandet ist muessen
// wir zumindest den minimalen Abstand zum Inhalt
// beruecksichtigen. (Koennte man zusaetzlich auch an
@@ -1391,9 +1388,9 @@ sal_uInt16 HTMLTable::GetBottomCellSpace( sal_uInt16 nRow, sal_uInt16 nRowSpan,
}
else if( nRow==0 && bTopBorder && nSpace < MIN_BORDER_DIST )
{
- ASSERT( GetBorderWidth( aTopBorderLine, sal_True ) > 0,
+ OSL_ENSURE( GetBorderWidth( aTopBorderLine, sal_True ) > 0,
"GetBottomCellSpace: |aTopLine| == 0" );
- ASSERT( !nCellPadding, "GetBottomCellSpace: CELLPADDING!=0" );
+ OSL_ENSURE( !nCellPadding, "GetBottomCellSpace: CELLPADDING!=0" );
// Wenn die Gegenueberliegende Seite umrandet ist muessen
// wir zumindest den minimalen Abstand zum Inhalt
// beruecksichtigen. (Koennte man zusaetzlich auch an
@@ -1545,8 +1542,7 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox,
if( bSet )
{
- // fix #30588#: BorderDist nicht mehr Bestandteil
- // einer Zelle mit fixer Breite
+ // BorderDist nicht mehr Bestandteil einer Zelle mit fixer Breite
sal_uInt16 nBDist = static_cast< sal_uInt16 >(
(2*nCellPadding <= nInnerFrmWidth) ? nCellPadding
: (nInnerFrmWidth / 2) );
@@ -1567,8 +1563,7 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox,
else
pFrmFmt->ResetFmtAttr( RES_BACKGROUND );
- // fix #41003#: Format nur setzten, wenn es auch einen Value
- // gibt oder die Box leer ist.
+ // Format nur setzten, wenn es auch einen Value gibt oder die Box leer ist.
if( bHasNumFmt && (bHasValue || IsBoxEmpty(pBox)) )
{
sal_Bool bLock = pFrmFmt->GetDoc()->GetNumberFormatter()
@@ -1609,7 +1604,7 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox,
else
pFrmFmt->ResetFmtAttr( RES_BOXATR_FORMAT );
- ASSERT( eVOri != text::VertOrientation::TOP, "text::VertOrientation::TOP ist nicht erlaubt!" );
+ OSL_ENSURE( eVOri != text::VertOrientation::TOP, "text::VertOrientation::TOP ist nicht erlaubt!" );
if( text::VertOrientation::NONE != eVOri )
{
pFrmFmt->SetFmtAttr( SwFmtVertOrient( 0, eVOri ) );
@@ -1630,7 +1625,7 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox,
}
else
{
- ASSERT( pBox->GetSttNd() ||
+ OSL_ENSURE( pBox->GetSttNd() ||
SFX_ITEM_SET!=pFrmFmt->GetAttrSet().GetItemState(
RES_VERT_ORIENT, sal_False ),
"Box ohne Inhalt hat vertikale Ausrichtung" );
@@ -1697,7 +1692,7 @@ static void ResetLineFrmFmtAttrs( SwFrmFmt *pFrmFmt )
{
pFrmFmt->ResetFmtAttr( RES_FRM_SIZE );
pFrmFmt->ResetFmtAttr( RES_BACKGROUND );
- ASSERT( SFX_ITEM_SET!=pFrmFmt->GetAttrSet().GetItemState(
+ OSL_ENSURE( SFX_ITEM_SET!=pFrmFmt->GetAttrSet().GetItemState(
RES_VERT_ORIENT, sal_False ),
"Zeile hat vertikale Ausrichtung" );
}
@@ -1782,15 +1777,15 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper,
sal_Bool bSplitted = sal_False;
while( !bSplitted )
{
- ASSERT( nCol < nRightCol, "Zu weit gelaufen" );
+ OSL_ENSURE( nCol < nRightCol, "Zu weit gelaufen" );
HTMLTableCell *pCell = GetCell(nTopRow,nCol);
const sal_Bool bSplit = 1 == pCell->GetColSpan();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( nCol == nRightCol-1 )
{
- ASSERT( bSplit, "Split-Flag falsch" );
+ OSL_ENSURE( bSplit, "Split-Flag falsch" );
}
#endif
if( bSplit )
@@ -1841,7 +1836,7 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper,
bSplitted = sal_True;
}
- ASSERT( pBox, "Colspan trouble" )
+ OSL_ENSURE( pBox, "Colspan trouble" );
if( pBox )
rBoxes.C40_INSERT( SwTableBox, pBox, rBoxes.Count() );
@@ -1954,7 +1949,7 @@ void HTMLTable::InheritBorders( const HTMLTable *pParent,
sal_uInt16 nRowSpan, sal_uInt16 /*nColSpan*/,
sal_Bool bFirstPara, sal_Bool bLastPara )
{
- ASSERT( nRows>0 && nCols>0 && nCurRow==nRows,
+ OSL_ENSURE( nRows>0 && nCols>0 && nCurRow==nRows,
"Wurde CloseTable nicht aufgerufen?" );
// Die Child-Tabelle muss einen Rahmen bekommen, wenn die umgebende
@@ -2065,7 +2060,7 @@ void HTMLTable::SetBorders()
if( HTML_TF_BELOW==eFrame || HTML_TF_HSIDES==eFrame ||
HTML_TF_BOX==eFrame )
((*pRows)[nRows-1])->bBottomBorder = sal_True;
- if( /*bRightAlwd &&*/ (HTML_TF_RHS==eFrame || HTML_TF_VSIDES==eFrame ||
+ if( (HTML_TF_RHS==eFrame || HTML_TF_VSIDES==eFrame ||
HTML_TF_BOX==eFrame) )
bRightBorder = sal_True;
if( HTML_TF_LHS==eFrame || HTML_TF_VSIDES==eFrame || HTML_TF_BOX==eFrame )
@@ -2122,7 +2117,7 @@ sal_uInt16 HTMLTable::GetBorderWidth( const SvxBorderLine& rBLine,
inline HTMLTableCell *HTMLTable::GetCell( sal_uInt16 nRow,
sal_uInt16 nCell ) const
{
- ASSERT( nRow<pRows->Count(),
+ OSL_ENSURE( nRow<pRows->Count(),
"ungueltiger Zeilen-Index in HTML-Tabelle" );
return ((*pRows)[nRow])->GetCell( nCell );
}
@@ -2148,7 +2143,7 @@ sal_Int16 HTMLTable::GetInheritedVertOri() const
if( text::VertOrientation::TOP==eVOri )
eVOri = eVertOri;
- ASSERT( eVertOri != text::VertOrientation::TOP, "text::VertOrientation::TOP ist nicht erlaubt!" );
+ OSL_ENSURE( eVertOri != text::VertOrientation::TOP, "text::VertOrientation::TOP ist nicht erlaubt!" );
return eVOri;
}
@@ -2178,7 +2173,7 @@ void HTMLTable::InsertCell( HTMLTableCnts *pCnts,
for( i=0; i<nRows; i++ )
((*pRows)[i])->Expand( nColsReq, i<nCurRow );
nCols = nColsReq;
- ASSERT( pColumns->Count()==nCols,
+ OSL_ENSURE( pColumns->Count()==nCols,
"Anzahl der Spalten nach Expandieren stimmt nicht" );
}
if( nColsReq > nFilledCols )
@@ -2191,7 +2186,7 @@ void HTMLTable::InsertCell( HTMLTableCnts *pCnts,
for( i=nRows; i<nRowsReq; i++ )
pRows->Insert( new HTMLTableRow(nCols), pRows->Count() );
nRows = nRowsReq;
- ASSERT( nRows==pRows->Count(), "Zeilenzahl in Insert stimmt nicht" );
+ OSL_ENSURE( nRows==pRows->Count(), "Zeilenzahl in Insert stimmt nicht" );
}
// Testen, ob eine Ueberschneidung vorliegt und diese
@@ -2274,11 +2269,10 @@ void HTMLTable::InsertCell( HTMLTableCnts *pCnts,
inline void HTMLTable::CloseSection( sal_Bool bHead )
{
// die vorhergende Section beenden, falls es schon eine Zeile gibt
- ASSERT( nCurRow<=nRows, "ungeultige aktuelle Zeile" );
+ OSL_ENSURE( nCurRow<=nRows, "ungeultige aktuelle Zeile" );
if( nCurRow>0 && nCurRow<=nRows )
((*pRows)[nCurRow-1])->SetEndOfGroup();
- if( bHead /*&& nCurRow==1*/ )
-// bHeadlineRepeat = sal_True;
+ if( bHead )
nHeadlineRepeat = nCurRow;
}
@@ -2293,7 +2287,7 @@ void HTMLTable::OpenRow( SvxAdjust eAdjust, sal_Int16 eVertOrient,
for( sal_uInt16 i=nRows; i<nRowsReq; i++ )
pRows->Insert( new HTMLTableRow(nCols), pRows->Count() );
nRows = nRowsReq;
- ASSERT( nRows==pRows->Count(),
+ OSL_ENSURE( nRows==pRows->Count(),
"Zeilenzahl in OpenRow stimmt nicht" );
}
@@ -2313,7 +2307,7 @@ void HTMLTable::OpenRow( SvxAdjust eAdjust, sal_Int16 eVertOrient,
void HTMLTable::CloseRow( sal_Bool bEmpty )
{
- ASSERT( nCurRow<nRows, "aktulle Zeile hinter dem Tabellenende" );
+ OSL_ENSURE( nCurRow<nRows, "aktulle Zeile hinter dem Tabellenende" );
// leere Zellen bekommen einfach einen etwas dickeren unteren Rand!
if( bEmpty )
@@ -2354,7 +2348,7 @@ inline void HTMLTable::CloseColGroup( sal_uInt16 nSpan, sal_uInt16 _nWidth,
if( nSpan )
InsertCol( nSpan, _nWidth, bRelWidth, eAdjust, eVertOrient );
- ASSERT( nCurCol<=nCols, "ungueltige Spalte" );
+ OSL_ENSURE( nCurCol<=nCols, "ungueltige Spalte" );
if( nCurCol>0 && nCurCol<=nCols )
((*pColumns)[nCurCol-1])->SetEndOfGroup();
}
@@ -2362,10 +2356,9 @@ inline void HTMLTable::CloseColGroup( sal_uInt16 nSpan, sal_uInt16 _nWidth,
void HTMLTable::InsertCol( sal_uInt16 nSpan, sal_uInt16 nColWidth, sal_Bool bRelWidth,
SvxAdjust eAdjust, sal_Int16 eVertOrient )
{
- // --> OD, MIB 2004-11-08 #i35143# - no columns, if rows already exist.
+ // #i35143# - no columns, if rows already exist.
if ( nRows > 0 )
return;
- // <--
sal_uInt16 i;
@@ -2503,10 +2496,10 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
sal_uInt16 nRelAvail, sal_uInt16 nAbsLeftSpace,
sal_uInt16 nAbsRightSpace, sal_uInt16 nInhAbsSpace )
{
- ASSERT( nRows>0 && nCols>0 && nCurRow==nRows,
+ OSL_ENSURE( nRows>0 && nCols>0 && nCurRow==nRows,
"Wurde CloseTable nicht aufgerufen?" );
- ASSERT( (pLayoutInfo==0) == (this==pTopTable),
+ OSL_ENSURE( (pLayoutInfo==0) == (this==pTopTable),
"Top-Tabelle hat keine Layout-Info oder umgekehrt" );
if( this==pTopTable )
@@ -2602,7 +2595,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
pFrmFmt->SetFmtAttr( SwFmtHoriOrient(0,eHoriOri) );
if( text::HoriOrientation::LEFT_AND_WIDTH==eHoriOri )
{
- ASSERT( nLeftMargin || nRightMargin,
+ OSL_ENSURE( nLeftMargin || nRightMargin,
"Da gibt's wohl noch Reste von relativen Breiten" );
// The right margin will be ignored anyway.
@@ -2645,7 +2638,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
( pLayoutInfo->GetRelLeftFill() > 0 ||
pLayoutInfo->GetRelRightFill() > 0 ) )
{
- ASSERT( pBox, "kein TableBox fuer Tabelle in Tabelle" );
+ OSL_ENSURE( pBox, "kein TableBox fuer Tabelle in Tabelle" );
SwTableLines& rLines = pBox->GetTabLines();
@@ -2749,7 +2742,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
// rechts umflossen werden soll, dann stacken wir sie
// in einem Rahmen mit 100%-Breite, damit ihre Groesse
// angepasst wird. Der Rahmen darf nicht angepasst werden.
- ASSERT( HasToFly(), "Warum ist die Tabelle in einem Rahmen?" );
+ OSL_ENSURE( HasToFly(), "Warum ist die Tabelle in einem Rahmen?" );
sal_uInt32 nMin = pLayoutInfo->GetMin();
if( nMin > USHRT_MAX )
nMin = USHRT_MAX;
@@ -2886,7 +2879,7 @@ void _HTMLTableContext::RestorePREListingXMP( SwHTMLParser& rParser )
const SwStartNode *SwHTMLParser::InsertTableSection
( const SwStartNode *pPrevStNd )
{
- ASSERT( pPrevStNd, "Start-Node ist NULL" );
+ OSL_ENSURE( pPrevStNd, "Start-Node ist NULL" );
pCSS1Parser->SetTDTagStyles();
SwTxtFmtColl *pColl = pCSS1Parser->GetTxtCollFromPool( RES_POOLCOLL_TABLE );
@@ -3003,14 +2996,6 @@ xub_StrLen SwHTMLParser::StripTrailingLF()
if( nLFCount )
{
-// MIB 6.6.97: Warum sollte man bei leeren Absaetzen nur ein LF loeschen?
-// Das stimmt doch irgendwi nicht ...
-// if( nLFCount == nLen )
-// {
-// // nur Lfs, dann nur ein LF loeschen
-// nLFCount = 1;
-// }
-// else if( nLFCount > 2 )
if( nLFCount > 2 )
{
// Bei Netscape entspricht ein Absatz-Ende zwei LFs
@@ -3156,7 +3141,7 @@ void _SectionSaveStruct::Restore( SwHTMLParser& rParser )
rParser.nFontStHeadStart = nFontStHeadStartSave;
// Der Kontext-Stack muss schon aufgeraeumt sein!
- ASSERT( rParser.aContexts.Count() == rParser.nContextStMin &&
+ OSL_ENSURE( rParser.aContexts.Count() == rParser.nContextStMin &&
rParser.aContexts.Count() == rParser.nContextStAttrMin,
"Der Kontext-Stack wurde nicht aufgeraeumt" );
rParser.nContextStMin = nContextStMinSave;
@@ -3391,7 +3376,7 @@ void _CellSaveStruct::AddContents( HTMLTableCnts *pNewCnts )
void _CellSaveStruct::InsertCell( SwHTMLParser& rParser,
HTMLTable *pCurTable )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// Die Attribute muessen schon beim Auefrauemen des Kontext-Stacks
// entfernt worden sein, sonst ist etwas schiefgelaufen. Das
// Checken wir mal eben ...
@@ -3414,7 +3399,7 @@ void _CellSaveStruct::InsertCell( SwHTMLParser& rParser,
for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; ++pTbl )
{
- ASSERT( !*pTbl, "Die Attribut-Tabelle ist nicht leer" );
+ OSL_ENSURE( !*pTbl, "Die Attribut-Tabelle ist nicht leer" );
}
}
#endif
@@ -3503,9 +3488,7 @@ HTMLTableCnts *SwHTMLParser::InsertTableContents(
{
// 1. Absatz auf nicht numeriert setzen
sal_uInt8 nLvl = GetNumInfo().GetLevel();
- // --> OD 2008-04-02 #refactorlists#
-// SetNoNum(&nLvl, sal_True);
-// SetNodeNum( nLvl);
+
SetNodeNum( nLvl, false );
}
@@ -3521,7 +3504,7 @@ HTMLTableCnts *SwHTMLParser::InsertTableContents(
_HTMLAttr *pAttr = *pTbl;
while( pAttr )
{
- ASSERT( !pAttr->GetPrev(), "Attribut hat Previous-Liste" );
+ OSL_ENSURE( !pAttr->GetPrev(), "Attribut hat Previous-Liste" );
pAttr->nSttPara = rSttPara;
pAttr->nEndPara = rSttPara;
pAttr->nSttCntnt = nSttCnt;
@@ -3647,16 +3630,8 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
// Entweder kommt die Tabelle in keinen Rahmen und befindet
// sich in keinem Rahmen (wird also durch Zellen simuliert),
// oder es gibt bereits Inhalt an der entsprechenden Stelle.
- ASSERT( !bForceFrame || pCurTable->HasParentSection(),
+ OSL_ENSURE( !bForceFrame || pCurTable->HasParentSection(),
"Tabelle im Rahmen hat keine Umgebung!" );
-// SCHOEN WAER'S, aber wie bekommen den Inhalt nicht zurueck
-// in die umgebende Zelle
-// if( bForceFrame && !pCurTable->HasParentSection() )
-// {
-// pCurTable->SetParentContents(
-// InsertTableContents( sal_False, SVX_ADJUST_END ) );
-// pCurTable->SetHasParentSection( sal_True );
-// }
sal_Bool bAppend = sal_False;
if( bForceFrame )
@@ -3832,18 +3807,13 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
pDoc->GetNodes().GoNext( &(pPam->GetPoint()->nNode) );
pPam->GetPoint()->nContent.Assign( pCNd, 0 );
- // automatisch verankerte Rahmen muessen noch um
- // eine Position nach vorne verschoben werden.
- //if( FLY_AUTO_CNTNT==eAnchorId )
- // aMoveFlyFrms.C40_INSERT( SwFrmFmt, pFrmFmt,
- // aMoveFlyFrms.Count() );
}
// eine SwTable mit einer Box anlegen und den PaM in den
// Inhalt der Box-Section bewegen (der Ausrichtungs-Parameter
// ist erstmal nur ein Dummy und wird spaeter noch richtig
// gesetzt)
- ASSERT( !pPam->GetPoint()->nContent.GetIndex(),
+ OSL_ENSURE( !pPam->GetPoint()->nContent.GetIndex(),
"Der Absatz hinter der Tabelle ist nicht leer!" );
const SwTable* pSwTable = pDoc->InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ),
@@ -3870,7 +3840,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
{
SwTxtNode *const pOldTxtNd =
pSavePos->nNode.GetNode().GetTxtNode();
- ASSERT( pOldTxtNd, "Wieso stehen wir in keinem Txt-Node?" );
+ OSL_ENSURE( pOldTxtNd, "Wieso stehen wir in keinem Txt-Node?" );
SwFrmFmt *pFrmFmt = pSwTable->GetFrmFmt();
const SfxPoolItem* pItem2;
@@ -3912,7 +3882,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
nLeftSpace, nRightSpace,
pSwTable, bForceFrame );
- ASSERT( !pPostIts, "ubenutzte PostIts" );
+ OSL_ENSURE( !pPostIts, "ubenutzte PostIts" );
}
else
{
@@ -3971,7 +3941,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
nToken = FilterToken( nToken );
- ASSERT( pPendStack || !bCallNextToken || pSaveStruct->IsInSection(),
+ OSL_ENSURE( pPendStack || !bCallNextToken || pSaveStruct->IsInSection(),
"Wo ist die Section gebieben?" );
if( !pPendStack && bCallNextToken && pSaveStruct->IsInSection() )
{
@@ -4066,7 +4036,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
// nur wenn die Tabelle wirklich zu Ende ist!
if( pSubTable )
{
- ASSERT( pSubTable->GetTableAdjust(sal_False)!= SVX_ADJUST_LEFT &&
+ OSL_ENSURE( pSubTable->GetTableAdjust(sal_False)!= SVX_ADJUST_LEFT &&
pSubTable->GetTableAdjust(sal_False)!= SVX_ADJUST_RIGHT,
"links oder rechts ausgerichtete Tabellen gehoehren in Rahmen" );
@@ -4075,7 +4045,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
pSubTable->GetParentContents();
if( pParentContents )
{
- ASSERT( !pSaveStruct->IsInSection(),
+ OSL_ENSURE( !pSaveStruct->IsInSection(),
"Wo ist die Section geblieben" );
// Wenn jetzt keine Tabelle kommt haben wir eine
@@ -4088,7 +4058,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
if( pSubTable->GetContext() )
{
- ASSERT( !pSubTable->GetContext()->GetFrmFmt(),
+ OSL_ENSURE( !pSubTable->GetContext()->GetFrmFmt(),
"Tabelle steht im Rahmen" );
if( pCapStNd && pSubTable->IsTopCaption() )
@@ -4172,7 +4142,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
break;
}
- ASSERT( !bPending || !pPendStack,
+ OSL_ENSURE( !bPending || !pPendStack,
"SwHTMLParser::BuildTableCell: Es gibt wieder einen Pend-Stack" );
bPending = sal_False;
if( IsParserWorking() )
@@ -4199,7 +4169,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
if( !pSaveStruct->GetFirstContents() ||
(!pSaveStruct->IsInSection() && !pCurTable->HasColTags()) )
{
- ASSERT( pSaveStruct->GetFirstContents() ||
+ OSL_ENSURE( pSaveStruct->GetFirstContents() ||
!pSaveStruct->IsInSection(),
"Section oder nicht, das ist hier die Frage" );
const SwStartNode *pStNd =
@@ -4376,7 +4346,7 @@ void SwHTMLParser::BuildTableRow( HTMLTable *pCurTable, sal_Bool bReadOptions,
nToken = FilterToken( nToken );
- ASSERT( pPendStack || !bCallNextToken ||
+ OSL_ENSURE( pPendStack || !bCallNextToken ||
pCurTable->GetContext() || pCurTable->HasParentSection(),
"Wo ist die Section gebieben?" );
if( !pPendStack && bCallNextToken &&
@@ -4394,10 +4364,7 @@ void SwHTMLParser::BuildTableRow( HTMLTable *pCurTable, sal_Bool bReadOptions,
SkipToken( -1 );
bDone = sal_True;
}
-// else
-// {
-// NextToken( nToken );
-// }
+
break;
case HTML_TABLEROW_ON:
case HTML_THEAD_ON:
@@ -4463,7 +4430,7 @@ void SwHTMLParser::BuildTableRow( HTMLTable *pCurTable, sal_Bool bReadOptions,
break;
}
- ASSERT( !bPending || !pPendStack,
+ OSL_ENSURE( !bPending || !pPendStack,
"SwHTMLParser::BuildTableRow: Es gibt wieder einen Pend-Stack" );
bPending = sal_False;
if( IsParserWorking() )
@@ -4555,7 +4522,7 @@ void SwHTMLParser::BuildTableSection( HTMLTable *pCurTable,
nToken = FilterToken( nToken );
- ASSERT( pPendStack || !bCallNextToken ||
+ OSL_ENSURE( pPendStack || !bCallNextToken ||
pCurTable->GetContext() || pCurTable->HasParentSection(),
"Wo ist die Section gebieben?" );
if( !pPendStack && bCallNextToken &&
@@ -4573,10 +4540,7 @@ void SwHTMLParser::BuildTableSection( HTMLTable *pCurTable,
SkipToken( -1 );
bDone = sal_True;
}
-// else
-// {
-// NextToken( nToken );
-// }
+
break;
case HTML_THEAD_ON:
case HTML_TFOOT_ON:
@@ -4626,7 +4590,7 @@ void SwHTMLParser::BuildTableSection( HTMLTable *pCurTable,
NextToken( nToken );
}
- ASSERT( !bPending || !pPendStack,
+ OSL_ENSURE( !bPending || !pPendStack,
"SwHTMLParser::BuildTableSection: Es gibt wieder einen Pend-Stack" );
bPending = sal_False;
if( IsParserWorking() )
@@ -4648,7 +4612,7 @@ void SwHTMLParser::BuildTableSection( HTMLTable *pCurTable,
delete pSaveStruct;
}
- // wir stehen jetzt (wahrscheinlich) vor <TBODY>,... oder </TABLE>
+ // now we stand (perhaps) in front of <TBODY>,... or </TABLE>
}
struct _TblColGrpSaveStruct : public SwPendingStackData
@@ -4753,7 +4717,7 @@ void SwHTMLParser::BuildTableColGroup( HTMLTable *pCurTable,
nToken = FilterToken( nToken );
- ASSERT( pPendStack || !bCallNextToken ||
+ OSL_ENSURE( pPendStack || !bCallNextToken ||
pCurTable->GetContext() || pCurTable->HasParentSection(),
"Wo ist die Section gebieben?" );
if( !pPendStack && bCallNextToken &&
@@ -4771,10 +4735,7 @@ void SwHTMLParser::BuildTableColGroup( HTMLTable *pCurTable,
SkipToken( -1 );
bDone = sal_True;
}
-// else
-// {
-// NextToken( nToken );
-// }
+
break;
case HTML_COLGROUP_ON:
case HTML_THEAD_ON:
@@ -4846,7 +4807,7 @@ void SwHTMLParser::BuildTableColGroup( HTMLTable *pCurTable,
NextToken( nToken );
}
- ASSERT( !bPending || !pPendStack,
+ OSL_ENSURE( !bPending || !pPendStack,
"SwHTMLParser::BuildTableColGrp: Es gibt wieder einen Pend-Stack" );
bPending = sal_False;
if( IsParserWorking() )
@@ -4926,7 +4887,7 @@ void SwHTMLParser::BuildTableCaption( HTMLTable *pCurTable )
delete pPendStack;
pPendStack = pTmp;
nToken = pPendStack ? pPendStack->nToken : GetSaveToken();
- ASSERT( !pPendStack, "Wo kommt hier ein Pending-Stack her?" );
+ OSL_ENSURE( !pPendStack, "Wo kommt hier ein Pending-Stack her?" );
SaveState( nToken );
}
@@ -5023,15 +4984,13 @@ void SwHTMLParser::BuildTableCaption( HTMLTable *pCurTable )
bDone = sal_True;
break;
default:
- int nNxtToken = nToken;
if( pPendStack )
{
SwPendingStack* pTmp = pPendStack->pNext;
delete pPendStack;
pPendStack = pTmp;
- ASSERT( !pTmp, "weiter kann es nicht gehen!" );
- nNxtToken = 0; // neu lesen
+ OSL_ENSURE( !pTmp, "weiter kann es nicht gehen!" );
}
if( IsParserWorking() )
@@ -5123,10 +5082,10 @@ void _TblSaveStruct::MakeTable( sal_uInt16 nWidth, SwPosition& rPos, SwDoc *pDoc
pCurTable->MakeTable( 0, nWidth );
_HTMLTableContext *pTCntxt = pCurTable->GetContext();
- ASSERT( pTCntxt, "Wo ist der Tabellen-Kontext" );
+ OSL_ENSURE( pTCntxt, "Wo ist der Tabellen-Kontext" );
SwTableNode *pTblNd = pTCntxt->GetTableNode();
- ASSERT( pTblNd, "Wo ist der Tabellen-Node" );
+ OSL_ENSURE( pTblNd, "Wo ist der Tabellen-Node" );
if( pDoc->GetRootFrm() && pTblNd )
{
@@ -5143,7 +5102,7 @@ void _TblSaveStruct::MakeTable( sal_uInt16 nWidth, SwPosition& rPos, SwDoc *pDoc
{
pTblNd->DelFrms();
SwNodeIndex aIdx( *pTblNd->EndOfSectionNode(), 1 );
- ASSERT( aIdx.GetIndex() <= pTCntxt->GetPos()->nNode.GetIndex(),
+ OSL_ENSURE( aIdx.GetIndex() <= pTCntxt->GetPos()->nNode.GetIndex(),
"unerwarteter Node fuer das Tabellen-Layout" );
pTblNd->MakeFrms( &aIdx );
}
@@ -5351,7 +5310,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
nToken = FilterToken( nToken );
- ASSERT( pPendStack || !bCallNextToken ||
+ OSL_ENSURE( pPendStack || !bCallNextToken ||
pCurTable->GetContext() || pCurTable->HasParentSection(),
"Wo ist die Section gebieben?" );
if( !pPendStack && bCallNextToken &&
@@ -5371,10 +5330,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
SkipToken( -1 );
bDone = sal_True;
}
-// else
-// {
-// NextToken( nToken );
-// }
+
break;
case HTML_TABLE_OFF:
bDone = sal_True;
@@ -5424,7 +5380,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
break;
}
- ASSERT( !bPending || !pPendStack,
+ OSL_ENSURE( !bPending || !pPendStack,
"SwHTMLParser::BuildTable: Es gibt wieder einen Pend-Stack" );
bPending = sal_False;
if( IsParserWorking() )
@@ -5480,8 +5436,8 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
sal_Bool bTop = pTable->IsTopCaption();
SwStartNode *pTblStNd = pTCntxt->GetTableNode();
- ASSERT( pTblStNd, "Wo ist der Tabellen-Node" );
- ASSERT( pTblStNd==pPam->GetNode()->FindTableNode(),
+ OSL_ENSURE( pTblStNd, "Wo ist der Tabellen-Node" );
+ OSL_ENSURE( pTblStNd==pPam->GetNode()->FindTableNode(),
"Stehen wir in der falschen Tabelle?" );
SwNode* pNd;
@@ -5516,26 +5472,6 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
// SwTable aufbereiten
sal_uInt16 nBrowseWidth = (sal_uInt16)GetCurrentBrowseWidth();
pSaveStruct->MakeTable( nBrowseWidth, *pPam->GetPoint(), pDoc );
-
-#ifdef TEST_RESIZE
- const SwTable *pSwTable = pTable->GetSwTable();
- SwHTMLTableLayout *pLayoutInfo =
- pSwTable ? ((SwTable *)pSwTable)->GetHTMLTableLayout() : 0;
- if( pLayoutInfo )
- {
- ViewShell *pVSh = CheckActionViewShell();
- if( pVSh )
- {
- CallEndAction( sal_False, sal_False );
- CallStartAction( pVSh, sal_False );
-
- sal_uInt16 nNewBrwoseWidth =
- (sal_uInt16)GetCurrentBrowseWidth();
- if( nBrowseWidth != nNewBrowseWidth )
- pLayoutInfo->Resize( nNewBrowseWidth );
- }
- }
-#endif
}
GetNumInfo().Set( pTCntxt->GetNumInfo() );
@@ -5558,9 +5494,9 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
eJumpTo = JUMPTO_NONE;
}
- // fix #37886#: Wenn Import abgebrochen wurde kein erneutes Show
+ // Wenn Import abgebrochen wurde kein erneutes Show
// aufrufen, weil die ViewShell schon geloescht wurde!
- // fix #41669#: Genuegt nicht. Auch im ACCEPTING_STATE darf
+ // Genuegt nicht. Auch im ACCEPTING_STATE darf
// kein Show aufgerufen werden, weil sonst waehrend des
// Reschedules der Parser zerstoert wird, wenn noch ein
// DataAvailable-Link kommt. Deshalb: Nur im WORKING-State.
@@ -5597,3 +5533,4 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 8560061d9131..82628e810b8c 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,9 +35,7 @@
#include <svtools/htmlout.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <editeng/ulspitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/brshitem.hxx>
@@ -64,15 +63,12 @@
#include <htmlnum.hxx>
#include <wrthtml.hxx>
#include <wrtswtbl.hxx>
-#ifdef DBG_UTIL
-#ifndef _VIEWSH_HXX
+#if OSL_DEBUG_LEVEL > 1
#include <viewsh.hxx>
-#endif
#include <viewopt.hxx>
#endif
#include <sal/types.h>
-//#define MAX_DEPTH (USHRT_MAX)
#define MAX_DEPTH (3)
using namespace ::com::sun::star;
@@ -150,7 +146,7 @@ void SwHTMLWrtTable::PixelizeBorders()
sal_Bool SwHTMLWrtTable::HasTabBackground( const SwTableBox& rBox,
sal_Bool bTop, sal_Bool bBottom, sal_Bool bLeft, sal_Bool bRight )
{
- ASSERT( bTop || bBottom || bLeft || bRight,
+ OSL_ENSURE( bTop || bBottom || bLeft || bRight,
"HasTabBackground: darf nicht aufgerufen werden" );
sal_Bool bRet = sal_False;
@@ -159,7 +155,6 @@ sal_Bool SwHTMLWrtTable::HasTabBackground( const SwTableBox& rBox,
const SvxBrushItem& rBrushItem =
rBox.GetFrmFmt()->GetBackground();
- /// OD 02.09.2002 #99657#
/// The table box has a background, if its background color is not "no fill"/
/// "auto fill" or it has a background graphic.
bRet = rBrushItem.GetColor() != COL_TRANSPARENT ||
@@ -185,12 +180,11 @@ sal_Bool SwHTMLWrtTable::HasTabBackground( const SwTableBox& rBox,
sal_Bool SwHTMLWrtTable::HasTabBackground( const SwTableLine& rLine,
sal_Bool bTop, sal_Bool bBottom, sal_Bool bLeft, sal_Bool bRight )
{
- ASSERT( bTop || bBottom || bLeft || bRight,
+ OSL_ENSURE( bTop || bBottom || bLeft || bRight,
"HasTabBackground: darf nicht aufgerufen werden" );
sal_Bool bRet = sal_False;
const SvxBrushItem& rBrushItem = rLine.GetFrmFmt()->GetBackground();
- /// OD 02.09.2002 #99657#
/// The table line has a background, if its background color is not "no fill"/
/// "auto fill" or it has a background graphic.
bRet = rBrushItem.GetColor() != COL_TRANSPARENT ||
@@ -284,10 +278,11 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
if ( !nRowSpan )
return;
+#ifndef PURE_HTML
SwWriteTableCol *pCol = aCols[nCol];
+#endif
-// sal_Bool bOutWidth = nColSpan>1 || pCol->GetOutWidth();
- sal_Bool bOutWidth = sal_True; //nColSpan==1 && pCol->GetOutWidth();
+ sal_Bool bOutWidth = sal_True;
const SwStartNode* pSttNd = pBox->GetSttNd();
sal_Bool bHead = sal_False;
@@ -438,6 +433,11 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
OutCSS1_TableBGStyleOpt( rWrt, *pBrushItem );
}
+ ((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_style ) += "=\"";
+ rWrt.Strm() << sOut.GetBuffer( );
+ OutCSS1_SvxBox( rWrt, pBox->GetFrmFmt()->GetBox() );
+ sOut = '"';
+
sal_uInt32 nNumFmt = 0;
double nValue = 0.0;
sal_Bool bNumFmt = sal_False, bValue = sal_False;
@@ -675,7 +675,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
}
else
{
- ASSERT( Application::GetDefaultDevice(), "kein Application-Window!?" );
+ OSL_ENSURE( Application::GetDefaultDevice(), "kein Application-Window!?" );
sOut += "100%";
}
}
@@ -708,19 +708,6 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
// Anderenfalls enthaelt nBorder naemlich nur die Breite der Umrandung,
// die genutzt wird, wenn gar kein sheet::Border angegeben ist.
sal_Bool bHasAnyBorders = nFrameMask || bColsHaveBorder || bRowsHaveBorder;
- if( bCollectBorderWidth || nBorder==0 || bHasAnyBorders )
- (((sOut += ' ' ) += OOO_STRING_SVTOOLS_HTML_O_border ) += '=')
- += ByteString::CreateFromInt32( rWrt.ToPixel( nBorder ) );
-
- // BORDERCOLOR ausgeben
-
- if( (sal_uInt32)-1 != nBorderColor && rWrt.bCfgOutStyles && bHasAnyBorders )
- {
- ((sOut += ' ' ) += OOO_STRING_SVTOOLS_HTML_O_bordercolor ) += '=';
- rWrt.Strm() << sOut.GetBuffer();
- HTMLOutFuncs::Out_Color( rWrt.Strm(), nBorderColor, rWrt.eDestEnc );
- sOut.Erase();
- }
// CELLPADDING ausgeben: Stammt aus Layout oder ist berechnet
(((sOut += ' ' ) += OOO_STRING_SVTOOLS_HTML_O_cellpadding ) += '=')
@@ -743,9 +730,6 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
case 4: pFrame = OOO_STRING_SVTOOLS_HTML_TF_lhs ;break;
case 8: pFrame = OOO_STRING_SVTOOLS_HTML_TF_rhs ;break;
case 12: pFrame = OOO_STRING_SVTOOLS_HTML_TF_vsides ;break;
- //FRAME=BOX ist der default wenn BORDER>0
- //case 15:
- //default: pFrame = OOO_STRING_SVTOOLS_HTML_TF_box ;break; // geht nicht
};
if( pFrame )
(((sOut += ' ' ) += OOO_STRING_SVTOOLS_HTML_O_frame ) += '=') += pFrame;
@@ -1095,7 +1079,7 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode,
if( bCheckDefList )
{
- ASSERT( !rHTMLWrt.GetNumInfo().GetNumRule() ||
+ OSL_ENSURE( !rHTMLWrt.GetNumInfo().GetNumRule() ||
rHTMLWrt.GetNextNumInfo(),
"NumInfo fuer naechsten Absatz fehlt!" );
const SvxLRSpaceItem& aLRItem = pFmt->GetLRSpace();
@@ -1200,7 +1184,7 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode,
const SwHTMLTableLayout *pLayout = rTbl.GetHTMLTableLayout();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
ViewShell *pSh;
rWrt.pDoc->GetEditShell( &pSh );
if ( pSh && pSh->GetViewOptions()->IsTest1() )
@@ -1266,3 +1250,4 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlvsh.hxx b/sw/source/filter/html/htmlvsh.hxx
index 18e0129fd0a3..99343566048a 100644
--- a/sw/source/filter/html/htmlvsh.hxx
+++ b/sw/source/filter/html/htmlvsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx
index 8c43bd6206ae..d8743e92ab85 100644
--- a/sw/source/filter/html/parcss1.cxx
+++ b/sw/source/filter/html/parcss1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
@@ -69,10 +69,8 @@
#endif
-
const sal_Int32 MAX_LEN = 1024;
-/* */
void CSS1Parser::InitRead( const String& rIn )
{
@@ -112,8 +110,6 @@ sal_Unicode CSS1Parser::GetNextChar()
return c;
}
-/* */
-
// Diese Funktion realisiert den in
//
// http://www.w3.orh/pub/WWW/TR/WD-css1.html
@@ -173,7 +169,7 @@ CSS1Token CSS1Parser::GetNextToken()
} while( ('A' <= cNextCh && cNextCh <= 'Z') ||
('a' <= cNextCh && cNextCh <= 'z') ||
('0' <= cNextCh && cNextCh <= '9') ||
- '-'==cNextCh && !IsEOF() );
+ ('-'==cNextCh && !IsEOF()) );
aToken += String(sTmpBuffer.makeStringAndClear());
@@ -271,7 +267,7 @@ CSS1Token CSS1Parser::GetNextToken()
} while( ('A' <= cNextCh && cNextCh <= 'Z') ||
('a' <= cNextCh && cNextCh <= 'z') ||
('0' <= cNextCh && cNextCh <= '9') ||
- '-' == cNextCh && !IsEOF() );
+ ('-' == cNextCh && !IsEOF()) );
aToken += String(sTmpBuffer.makeStringAndClear());
@@ -423,7 +419,7 @@ CSS1Token CSS1Parser::GetNextToken()
// Ist es eine Einheit?
const sal_Char *pCmp1 = 0, *pCmp2 = 0, *pCmp3 = 0;
- double nScale1 = 1., nScale2 = 1., nScale3 = 1.;
+ double nScale1 = 1., nScale2 = 1.;
CSS1Token nToken1 = CSS1_LENGTH,
nToken2 = CSS1_LENGTH,
nToken3 = CSS1_LENGTH;
@@ -481,7 +477,7 @@ CSS1Token CSS1Parser::GetNextToken()
else if( pCmp3 &&
aIdent.EqualsIgnoreCaseAscii(pCmp3) )
{
- nScale = nScale3;
+ nScale = 1.; // nScale3
nRet = nToken3;
}
else
@@ -524,8 +520,6 @@ CSS1Token CSS1Parser::GetNextToken()
nRet = bPrevWhiteSpace ? CSS1_DOT_W_WS : CSS1_DOT_WO_WS;
break;
- // case '/': siehe oben
-
case '+': // '+'
nRet = CSS1_PLUS;
break;
@@ -691,9 +685,6 @@ CSS1Token CSS1Parser::GetNextToken()
}
-/* */
-
-
// Dies folegenden Funktionen realisieren den in
//
// http://www.w3.orh/pub/WWW/TR/WD-css1.html
@@ -1153,9 +1144,11 @@ CSS1Expression *CSS1Parser::ParseDeclaration( String& rProperty )
return pRoot;
}
-/* */
CSS1Parser::CSS1Parser()
+ : nValue(0)
+ , eState(CSS1_PAR_ACCEPTED)
+ , nToken(CSS1_NULL)
{
}
@@ -1163,7 +1156,6 @@ CSS1Parser::~CSS1Parser()
{
}
-/* */
sal_Bool CSS1Parser::ParseStyleSheet( const String& rIn )
{
@@ -1253,8 +1245,6 @@ sal_Bool CSS1Parser::DeclarationParsed( const String& /*rProperty*/,
}
-/* */
-
CSS1Selector::~CSS1Selector()
{
delete pNext;
@@ -1405,7 +1395,6 @@ sal_Bool CSS1Expression::GetColor( Color &rColor ) const
nColor += c;
}
}
- // bRet = i==6;
bRet = sal_True;
}
break;
@@ -1424,3 +1413,4 @@ sal_Bool CSS1Expression::GetColor( Color &rColor ) const
return bRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/parcss1.hxx b/sw/source/filter/html/parcss1.hxx
index 7d85f05e4a7f..570f96b7e969 100644
--- a/sw/source/filter/html/parcss1.hxx
+++ b/sw/source/filter/html/parcss1.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -305,3 +306,4 @@ inline sal_uInt32 CSS1Parser::SetLinePos( sal_uInt32 nlPos )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 0590f7881799..b9ce6940a08d 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <stdlib.h>
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include <i18npool/mslangid.hxx>
#include <svtools/ctrltool.hxx>
#include <svl/urihelper.hxx>
@@ -77,7 +76,7 @@ SV_IMPL_PTRARR( CSS1Selectors, CSS1Selector* )
/* */
-static CSS1PropertyEnum __READONLY_DATA aFontSizeTable[] =
+static CSS1PropertyEnum const aFontSizeTable[] =
{
{ sCSS1_PV_xx_small, 0 },
{ sCSS1_PV_x_small, 1 },
@@ -89,7 +88,7 @@ static CSS1PropertyEnum __READONLY_DATA aFontSizeTable[] =
{ 0, 0 }
};
-static CSS1PropertyEnum __READONLY_DATA aFontFamilyTable[] =
+static CSS1PropertyEnum const aFontFamilyTable[] =
{
{ sCSS1_PV_serif, FAMILY_ROMAN },
{ sCSS1_PV_sans_serif, FAMILY_SWISS },
@@ -99,7 +98,7 @@ static CSS1PropertyEnum __READONLY_DATA aFontFamilyTable[] =
{ 0, 0 }
};
-static CSS1PropertyEnum __READONLY_DATA aFontWeightTable[] =
+static CSS1PropertyEnum const aFontWeightTable[] =
{
{ sCSS1_PV_extra_light, WEIGHT_NORMAL }, // WEIGHT_ULTRALIGHT (OBS)
{ sCSS1_PV_light, WEIGHT_NORMAL }, // WEIGHT_LIGHT (OBSOLETE)
@@ -114,7 +113,7 @@ static CSS1PropertyEnum __READONLY_DATA aFontWeightTable[] =
{ 0, 0 }
};
-static CSS1PropertyEnum __READONLY_DATA aFontStyleTable[] =
+static CSS1PropertyEnum const aFontStyleTable[] =
{
{ sCSS1_PV_normal, ITALIC_NONE },
{ sCSS1_PV_italic, ITALIC_NORMAL },
@@ -122,14 +121,14 @@ static CSS1PropertyEnum __READONLY_DATA aFontStyleTable[] =
{ 0, 0 }
};
-static CSS1PropertyEnum __READONLY_DATA aFontVariantTable[] =
+static CSS1PropertyEnum const aFontVariantTable[] =
{
{ sCSS1_PV_normal, SVX_CASEMAP_NOT_MAPPED },
{ sCSS1_PV_small_caps, SVX_CASEMAP_KAPITAELCHEN },
{ 0, 0 }
};
-static CSS1PropertyEnum __READONLY_DATA aDirectionTable[] =
+static CSS1PropertyEnum const aDirectionTable[] =
{
{ sCSS1_PV_ltr, FRMDIR_HORI_LEFT_TOP },
{ sCSS1_PV_rtl, FRMDIR_HORI_RIGHT_TOP },
@@ -139,7 +138,7 @@ static CSS1PropertyEnum __READONLY_DATA aDirectionTable[] =
/* */
-static CSS1PropertyEnum __READONLY_DATA aBGRepeatTable[] =
+static CSS1PropertyEnum const aBGRepeatTable[] =
{
{ sCSS1_PV_repeat, GPOS_TILED },
{ sCSS1_PV_repeat_x, GPOS_TILED },
@@ -148,7 +147,7 @@ static CSS1PropertyEnum __READONLY_DATA aBGRepeatTable[] =
{ 0, 0 }
};
-static CSS1PropertyEnum __READONLY_DATA aBGHoriPosTable[] =
+static CSS1PropertyEnum const aBGHoriPosTable[] =
{
{ sCSS1_PV_left, GPOS_LT },
{ sCSS1_PV_center, GPOS_MT },
@@ -156,7 +155,7 @@ static CSS1PropertyEnum __READONLY_DATA aBGHoriPosTable[] =
{ 0, 0 }
};
-static CSS1PropertyEnum __READONLY_DATA aBGVertPosTable[] =
+static CSS1PropertyEnum const aBGVertPosTable[] =
{
{ sCSS1_PV_top, GPOS_LT },
{ sCSS1_PV_middle, GPOS_LM },
@@ -166,7 +165,7 @@ static CSS1PropertyEnum __READONLY_DATA aBGVertPosTable[] =
/* */
-static CSS1PropertyEnum __READONLY_DATA aTextAlignTable[] =
+static CSS1PropertyEnum const aTextAlignTable[] =
{
{ sCSS1_PV_left, SVX_ADJUST_LEFT },
{ sCSS1_PV_center, SVX_ADJUST_CENTER },
@@ -177,7 +176,7 @@ static CSS1PropertyEnum __READONLY_DATA aTextAlignTable[] =
/* */
-static CSS1PropertyEnum __READONLY_DATA aBorderWidthTable[] =
+static CSS1PropertyEnum const aBorderWidthTable[] =
{
{ sCSS1_PV_thin, 0 }, // DEF_LINE_WIDTH_0 / DEF_DOUBLE_LINE0
{ sCSS1_PV_medium, 1 }, // DEF_LINE_WIDTH_1 / DEF_DOUBLE_LINE1
@@ -185,13 +184,13 @@ static CSS1PropertyEnum __READONLY_DATA aBorderWidthTable[] =
{ 0, 0 }
};
-enum CSS1BorderStyle { CSS1_BS_NONE, CSS1_BS_SINGLE, CSS1_BS_DOUBLE };
+enum CSS1BorderStyle { CSS1_BS_NONE, CSS1_BS_SINGLE, CSS1_BS_DOUBLE, CSS1_BS_DOTTED, CSS1_BS_DASHED };
-static CSS1PropertyEnum __READONLY_DATA aBorderStyleTable[] =
+static CSS1PropertyEnum const aBorderStyleTable[] =
{
{ sCSS1_PV_none, CSS1_BS_NONE },
- { sCSS1_PV_dotted, CSS1_BS_SINGLE },
- { sCSS1_PV_dashed, CSS1_BS_SINGLE },
+ { sCSS1_PV_dotted, CSS1_BS_DOTTED },
+ { sCSS1_PV_dashed, CSS1_BS_DASHED },
{ sCSS1_PV_solid, CSS1_BS_SINGLE },
{ sCSS1_PV_double, CSS1_BS_DOUBLE },
{ sCSS1_PV_groove, CSS1_BS_SINGLE },
@@ -201,7 +200,7 @@ static CSS1PropertyEnum __READONLY_DATA aBorderStyleTable[] =
{ 0, 0 }
};
-static CSS1PropertyEnum __READONLY_DATA aFloatTable[] =
+static CSS1PropertyEnum const aFloatTable[] =
{
{ sCSS1_PV_left, SVX_ADJUST_LEFT },
{ sCSS1_PV_right, SVX_ADJUST_RIGHT },
@@ -209,7 +208,7 @@ static CSS1PropertyEnum __READONLY_DATA aFloatTable[] =
{ 0, 0 }
};
-static CSS1PropertyEnum __READONLY_DATA aPositionTable[] =
+static CSS1PropertyEnum const aPositionTable[] =
{
{ sCSS1_PV_absolute, SVX_CSS1_POS_ABSOLUTE },
{ sCSS1_PV_relative, SVX_CSS1_POS_RELATIVE },
@@ -218,7 +217,7 @@ static CSS1PropertyEnum __READONLY_DATA aPositionTable[] =
};
// Feature: PrintExt
-static CSS1PropertyEnum __READONLY_DATA aSizeTable[] =
+static CSS1PropertyEnum const aSizeTable[] =
{
{ sCSS1_PV_auto, SVX_CSS1_STYPE_AUTO },
{ sCSS1_PV_landscape, SVX_CSS1_STYPE_LANDSCAPE },
@@ -226,7 +225,7 @@ static CSS1PropertyEnum __READONLY_DATA aSizeTable[] =
{ 0, 0 }
};
-static CSS1PropertyEnum __READONLY_DATA aPageBreakTable[] =
+static CSS1PropertyEnum const aPageBreakTable[] =
{
{ sCSS1_PV_auto, SVX_CSS1_PBREAK_AUTO },
{ sCSS1_PV_always, SVX_CSS1_PBREAK_ALWAYS },
@@ -260,13 +259,13 @@ static CSS1PropertyEnum __READONLY_DATA aPageBreakTable[] =
DEF_DOUBLE_LINE##n##_DIST
-static sal_uInt16 __READONLY_DATA aSBorderWidths[] =
+static sal_uInt16 aSBorderWidths[] =
{
SBORDER_ENTRY( 0 ), SBORDER_ENTRY( 1 ), SBORDER_ENTRY( 2 ),
SBORDER_ENTRY( 3 ), SBORDER_ENTRY( 4 )
};
-static sal_uInt16 __READONLY_DATA aDBorderWidths[] =
+static sal_uInt16 aDBorderWidths[] =
{
DBORDER_ENTRY( 0 ),
DBORDER_ENTRY( 7 ),
@@ -280,7 +279,7 @@ static sal_uInt16 __READONLY_DATA aDBorderWidths[] =
DBORDER_ENTRY( 5 )
};
-static sal_uInt16 __READONLY_DATA aTDBorderWidths[] =
+static sal_uInt16 aTDBorderWidths[] =
{
TDBORDER_ENTRY( 7 ), TDBORDER_ENTRY( 8 ), TDBORDER_ENTRY( 9 ),
TDBORDER_ENTRY( 10 )
@@ -369,6 +368,12 @@ void SvxCSS1BorderInfo::SetBorderLine( sal_uInt16 nLine, SvxBoxItem &rBoxItem )
// Linien-Stil doppelt oder einfach?
sal_Bool bDouble = eStyle == CSS1_BS_DOUBLE;
+ if ( eStyle == CSS1_BS_DOTTED )
+ aBorderLine.SetStyle( DOTTED );
+ else if ( eStyle == CSS1_BS_DASHED )
+ aBorderLine.SetStyle( DASHED );
+ else
+ aBorderLine.SetStyle( SOLID );
// benannte Breite umrechnenen, wenn keine absolute gegeben ist
if( nAbsWidth==USHRT_MAX )
@@ -707,7 +712,7 @@ SvxCSS1MapEntry::SvxCSS1MapEntry( const String& rKey, const SfxItemSet& rItemSet
aKey.ToUpperAscii();
}
-#if defined( ICC ) || defined( BLC )
+#if defined( ICC )
sal_Bool operator==( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
{
return rE1.aKey==rE2.aKey;
@@ -736,7 +741,7 @@ sal_Bool SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
{
if( bFirst )
{
- DBG_ASSERT( pSheetItemSet, "Wo ist der Item-Set fuer Style-Sheets?" );
+ DBG_ASSERT( pSheetItemSet, "Where is the Item-Set for Style-Sheets?" );
// Dieses ist der erste Selektor einer Rule, also muessen
// die bisher geparsten Items auf die Styles verteilt werden
@@ -762,7 +767,7 @@ sal_Bool SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
sal_Bool SvxCSS1Parser::DeclarationParsed( const String& rProperty,
const CSS1Expression *pExpr )
{
- DBG_ASSERT( pExpr, "DeclarationParsed() ohne Expression" );
+ DBG_ASSERT( pExpr, "DeclarationParsed() without Expression" );
if( !pExpr )
return sal_True;
@@ -851,8 +856,6 @@ sal_Bool SvxCSS1Parser::ParseStyleSheet( const String& rIn )
sal_Bool bSuccess = CSS1Parser::ParseStyleSheet( rIn );
- // die bisher geparsten Items auf die Styles verteilt werden
-// pSheetPropInfo->CreateBoxItem( *pSheetItemSet, GetDfltBorderDist() );
for( sal_uInt16 i=0; i<aSelectors.Count(); i++ )
{
StyleParsed( aSelectors[i], *pSheetItemSet, *pSheetPropInfo );
@@ -879,7 +882,6 @@ sal_Bool SvxCSS1Parser::ParseStyleOption( const String& rIn,
sal_Bool bSuccess = CSS1Parser::ParseStyleOption( rIn );
rItemSet.ClearItem( aItemIds.nDirection );
-// pPropInfo->CreateBoxItem( *pItemSet, GetDfltBorderDist() );
pItemSet = 0;
pPropInfo = 0;
@@ -947,7 +949,7 @@ void SvxCSS1Parser::SetBorderWidth( SvxBorderLine& aBorderLine, sal_uInt16 nWidt
nWidth <= ((aWidths[i] + aWidths[i-4]) / 2) )
{
DBG_ASSERT( aWidths[i] > aWidths[i-4],
- "Linienbreiten sind nicht sortiert!" );
+ "line widths are not sorted!" );
i -= 4;
}
@@ -1074,7 +1076,7 @@ static void ParseCSS1_font_size( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& /*rPropInfo*/,
const SvxCSS1Parser& rParser )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
sal_uLong nHeight = 0;
sal_uInt16 nPropHeight = 100;
@@ -1092,33 +1094,19 @@ static void ParseCSS1_font_size( const CSS1Expression *pExpr,
nHeight = (sal_uLong)nPHeight;
}
break;
-//#ifdef PERCENTAGE_POSSIBLE
case CSS1_PERCENTAGE:
// nur fuer Drop-Caps!
nPropHeight = (sal_uInt16)pExpr->GetNumber();
break;
-//#endif
case CSS1_IDENT:
{
sal_uInt16 nSize;
-#ifdef PERCENTAGE_POSSIBLE
- const String& rValue = pExpr->GetString();
-#endif
+
if( SvxCSS1Parser::GetEnum( aFontSizeTable, pExpr->GetString(),
nSize ) )
{
nHeight = rParser.GetFontHeight( nSize );
}
-#ifdef PERCENTAGE_POSSIBLE
- else if( rValue.EqualsIgnoreCaseAscii( sCSS1_PV_larger ) )
- {
- nPropHeight = 150;
- }
- else if( rValue.EqualsIgnoreCaseAscii( sCSS1_PV_smaller ) )
- {
- nPropHeight = 67;
- }
-#endif
}
break;
@@ -1153,7 +1141,7 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& /*rPropInfo*/,
const SvxCSS1Parser& rParser )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
String aName, aStyleName, aDfltName;
FontFamily eFamily = FAMILY_DONTKNOW;
@@ -1234,7 +1222,7 @@ static void ParseCSS1_font_weight( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& /*rPropInfo*/,
const SvxCSS1Parser& rParser )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
switch( pExpr->GetType() )
{
@@ -1293,7 +1281,7 @@ static void ParseCSS1_font_style( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& /*rPropInfo*/,
const SvxCSS1Parser& rParser )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
sal_Bool bPosture = sal_False;
sal_Bool bCaseMap = sal_False;
@@ -1364,7 +1352,7 @@ static void ParseCSS1_font_variant( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& /*rPropInfo*/,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
// normal | small-caps
@@ -1392,7 +1380,7 @@ static void ParseCSS1_color( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& /*rPropInfo*/,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
switch( pExpr->GetType() )
{
@@ -1416,7 +1404,7 @@ static void ParseCSS1_direction( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& /*rPropInfo*/,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
sal_uInt16 nDir;
switch( pExpr->GetType() )
@@ -1441,7 +1429,7 @@ static void ParseCSS1_direction( const CSS1Expression *pExpr,
static void MergeHori( SvxGraphicPosition& ePos, SvxGraphicPosition eHori )
{
DBG_ASSERT( GPOS_LT==eHori || GPOS_MT==eHori || GPOS_RT==eHori,
- "vertikale Position nicht oben" );
+ "vertical position not at the top" );
switch( ePos )
{
@@ -1471,7 +1459,7 @@ static void MergeHori( SvxGraphicPosition& ePos, SvxGraphicPosition eHori )
static void MergeVert( SvxGraphicPosition& ePos, SvxGraphicPosition eVert )
{
DBG_ASSERT( GPOS_LT==eVert || GPOS_LM==eVert || GPOS_LB==eVert,
- "horizontale Position nicht links" );
+ "horizontal position not on the left side" );
switch( ePos )
{
@@ -1503,7 +1491,7 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& /*rPropInfo*/,
const SvxCSS1Parser& rParser )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
Color aColor;
String aURL;
@@ -1643,7 +1631,7 @@ static void ParseCSS1_background_color( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& /*rPropInfo*/,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
Color aColor;
@@ -1691,7 +1679,7 @@ static void ParseCSS1_line_height( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& /*rPropInfo*/,
const SvxCSS1Parser& rParser )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
sal_uInt16 nHeight = 0;
sal_uInt8 nPropHeight = 0;
@@ -1731,7 +1719,6 @@ static void ParseCSS1_line_height( const CSS1Expression *pExpr,
nHeight = rParser.GetMinFixLineSpace();
SvxLineSpacingItem aLSItem( nHeight, aItemIds.nLineSpacing );
aLSItem.SetLineHeight( nHeight );
- // --> OD 2006-07-26 #138463#
// interpret <line-height> attribute as minimum line height
aLSItem.GetLineSpaceRule() = SVX_LINE_SPACE_MIN;
// <--
@@ -1758,7 +1745,7 @@ static void ParseCSS1_font( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
FontItalic eItalic = ITALIC_NONE;
SvxCaseMap eCaseMap = SVX_CASEMAP_NOT_MAPPED;
@@ -1868,7 +1855,7 @@ static void ParseCSS1_letter_spacing( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& /*rPropInfo*/,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
switch( pExpr->GetType() )
{
@@ -1913,7 +1900,7 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& /*rPropInfo*/,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
sal_Bool bUnderline = sal_False;
sal_Bool bOverline = sal_False;
@@ -2023,7 +2010,7 @@ static void ParseCSS1_text_align( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& /*rPropInfo*/,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
if( CSS1_IDENT==pExpr->GetType() ||
CSS1_STRING==pExpr->GetType() ) // MS-IE, mal wieder
@@ -2045,7 +2032,7 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
short nIndent = 0;
sal_Bool bSet = sal_False;
@@ -2098,7 +2085,7 @@ static void ParseCSS1_margin_left( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
long nLeft = 0;
sal_Bool bSet = sal_False;
@@ -2155,7 +2142,7 @@ static void ParseCSS1_margin_right( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
long nRight = 0;
sal_Bool bSet = sal_False;
@@ -2212,7 +2199,7 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
sal_uInt16 nUpper = 0;
sal_Bool bSet = sal_False;
@@ -2272,7 +2259,7 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
sal_uInt16 nLower = 0;
sal_Bool bSet = sal_False;
@@ -2332,7 +2319,7 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
long nMargins[4] = { 0, 0, 0, 0 };
sal_Bool bSetMargins[4] = { sal_False, sal_False, sal_False, sal_False };
@@ -2475,7 +2462,7 @@ static sal_Bool ParseCSS1_padding_xxx( const CSS1Expression *pExpr,
const SvxCSS1Parser& /*rParser*/,
sal_uInt16 nWhichLine )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
sal_Bool bSet = sal_False;
sal_uInt16 nDist = 0;
@@ -2597,7 +2584,7 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
const SvxCSS1Parser& /*rParser*/,
sal_uInt16 nWhichLine, sal_Bool bAll )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
sal_uInt16 nWidth = USHRT_MAX; // die Linien-Dicke
sal_uInt16 nNWidth = 1; // benannte Linien-Dicke (und default)
@@ -2692,7 +2679,7 @@ static void ParseCSS1_border_xxx_width( const CSS1Expression *pExpr,
const SvxCSS1Parser& /*rParser*/,
sal_uInt16 nWhichLine )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
sal_uInt16 nWidth = USHRT_MAX; // die Linien-Dicke
sal_uInt16 nNWidth = 1; // benannte Linien-Dicke (und default)
@@ -2884,7 +2871,7 @@ static void ParseCSS1_float( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
if( CSS1_IDENT==pExpr->GetType() )
{
@@ -2902,7 +2889,7 @@ static void ParseCSS1_position( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- DBG_ASSERT( pExpr, "kein Ausdruck" );
+ DBG_ASSERT( pExpr, "no expression" );
if( CSS1_IDENT==pExpr->GetType() )
{
@@ -3183,7 +3170,7 @@ struct CSS1PropEntry
// die Tabelle mit den Zuordnungen
-static CSS1PropEntry __FAR_DATA aCSS1PropFnTab[] =
+static CSS1PropEntry aCSS1PropFnTab[] =
{
CSS1_PROP_ENTRY(background),
CSS1_PROP_ENTRY(background_color),
@@ -3241,7 +3228,7 @@ static CSS1PropEntry __FAR_DATA aCSS1PropFnTab[] =
/* */
-static int __FAR_DATA bSortedPropFns = sal_False;
+static int bSortedPropFns = sal_False;
extern "C"
{
@@ -3281,7 +3268,7 @@ static int
void SvxCSS1Parser::ParseProperty( const String& rProperty,
const CSS1Expression *pExpr )
{
- DBG_ASSERT( pItemSet, "DeclarationParsed() ohne ItemSet" );
+ DBG_ASSERT( pItemSet, "DeclarationParsed() without ItemSet" );
if( !bSortedPropFns )
{
@@ -3309,3 +3296,5 @@ void SvxCSS1Parser::ParseProperty( const String& rProperty,
(((CSS1PropEntry*)pFound)->pFunc)( pExpr, *pItemSet, *pPropInfo, *this );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx
index e5f706334538..b4d2a13fdf5d 100644
--- a/sw/source/filter/html/svxcss1.hxx
+++ b/sw/source/filter/html/svxcss1.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -205,7 +206,7 @@ typedef SvxCSS1MapEntry *SvxCSS1MapEntryPtr;
SV_DECL_PTRARR_SORT_DEL( SvxCSS1Map, SvxCSS1MapEntryPtr, 5, 5 )
-#if !defined( ICC ) && !defined( BLC )
+#if !defined( ICC )
inline sal_Bool operator==( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
{
return rE1.aKey==rE2.aKey;
@@ -433,3 +434,4 @@ inline SvxCSS1MapEntry *SvxCSS1Parser::GetTag( const String& rTag ) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/swcss1.hxx b/sw/source/filter/html/swcss1.hxx
index f0bbd758dce3..8c7265016e71 100644
--- a/sw/source/filter/html/swcss1.hxx
+++ b/sw/source/filter/html/swcss1.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -225,3 +226,4 @@ inline void SwCSS1Parser::SetDelayedStyles()
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index b9c8b63d60f7..39fec37e444d 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,7 @@
#include <com/sun/star/i18n/ScriptType.hpp>
#include <sfx2/sfx.hrc>
#include <svx/svxids.hrc>
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
#include <stdlib.h>
#endif
#include <hintids.hxx>
@@ -133,7 +134,7 @@
using namespace ::com::sun::star;
// <P ALIGN=xxx>, <Hn ALIGN=xxx>, <TD ALIGN=xxx> usw.
-HTMLOptionEnum __FAR_DATA aHTMLPAlignTable[] =
+HTMLOptionEnum aHTMLPAlignTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_AL_left, SVX_ADJUST_LEFT },
{ OOO_STRING_SVTOOLS_HTML_AL_center, SVX_ADJUST_CENTER },
@@ -145,7 +146,7 @@ HTMLOptionEnum __FAR_DATA aHTMLPAlignTable[] =
};
// <SPACER TYPE=...>
-static HTMLOptionEnum __FAR_DATA aHTMLSpacerTypeTable[] =
+static HTMLOptionEnum aHTMLSpacerTypeTable[] =
{
{ OOO_STRING_SVTOOLS_HTML_SPTYPE_block, HTML_SPTYPE_BLOCK },
{ OOO_STRING_SVTOOLS_HTML_SPTYPE_horizontal, HTML_SPTYPE_HORI },
@@ -168,9 +169,8 @@ String HTMLReader::GetTemplateName() const
sTemplate.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM("html") );
String sTemplateWithoutExt( sTemplate );
#ifndef MAC_WITHOUT_EXT
- // --> OD 2005-01-26 - first search for OpenDocument Writer/Web template
+ // first search for OpenDocument Writer/Web template
sTemplate.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM(".oth") );
- // <--
#endif
SvtPathOptions aPathOpt;
@@ -182,7 +182,7 @@ String HTMLReader::GetTemplateName() const
{
// 6.0 (extension .stw)
sTemplate = sTemplateWithoutExt;
- // --> OD 2005-01-26 - no OpenDocument Writer/Web template found.
+ // no OpenDocument Writer/Web template found.
// search for OpenOffice.org Writer/Web template
sTemplate.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM(".stw") );
// <--
@@ -193,7 +193,7 @@ String HTMLReader::GetTemplateName() const
if( !bSet )
{
sTemplate.Erase();
- ASSERT( !this,
+ OSL_ENSURE( !this,
"Die html.vor befindet sich nicht mehr im definierten Directory!");
}
@@ -202,7 +202,7 @@ String HTMLReader::GetTemplateName() const
int HTMLReader::SetStrmStgPtr()
{
- ASSERT( pMedium, "Wo ist das Medium??" );
+ OSL_ENSURE( pMedium, "Wo ist das Medium??" );
if( pMedium->IsRemote() || !pMedium->IsStorage() )
{
@@ -218,7 +218,7 @@ sal_uLong HTMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, co
{
if( !pStrm )
{
- ASSERT( pStrm, "HTML-Read ohne Stream" );
+ OSL_ENSURE( pStrm, "HTML-Read ohne Stream" );
return ERR_SWG_READ_ERROR;
}
@@ -298,13 +298,13 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
nSBModuleCnt( 0 ),
nMissingImgMaps( 0 ),
nParaCnt( 5 ),
- // --> OD 2007-10-26 #i83625#
+ // #i83625#
nContextStMin( 0 ),
nContextStAttrMin( 0 ),
// <--
nOpenParaToken( 0 ),
eJumpTo( JUMPTO_NONE ),
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
nContinue( 0 ),
#endif
eParaAdjust( SVX_ADJUST_END ),
@@ -324,7 +324,6 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
bSelect( sal_False ),
bInFootEndNoteAnchor( sal_False ),
bInFootEndNoteSymbol( sal_False ),
-// bIgnoreHTMLComments( bNoHTMLComments )
bIgnoreHTMLComments( bNoHTMLComments ),
bRemoveHidden( sal_False ),
pTempViewFrame(0)
@@ -432,10 +431,10 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
}
}
-__EXPORT SwHTMLParser::~SwHTMLParser()
+SwHTMLParser::~SwHTMLParser()
{
-#ifdef DBG_UTIL
- ASSERT( !nContinue, "DTOR im Continue - Das geht schief!!!" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( !nContinue, "DTOR im Continue - Das geht schief!!!" );
#endif
sal_Bool bAsync = pDoc->IsInLoadAsynchron();
pDoc->SetInLoadAsynchron( sal_False );
@@ -457,7 +456,7 @@ __EXPORT SwHTMLParser::~SwHTMLParser()
if ( pDoc->GetDocShell()->IsLoading() )
{
- // --> OD 2006-11-07 #i59688#
+ // #i59688#
pDoc->GetDocShell()->LoadingFinished();
}
}
@@ -466,7 +465,7 @@ __EXPORT SwHTMLParser::~SwHTMLParser()
if( aSetAttrTab.Count() )
{
- ASSERT( !aSetAttrTab.Count(),"Es stehen noch Attribute auf dem Stack" );
+ OSL_ENSURE( !aSetAttrTab.Count(),"Es stehen noch Attribute auf dem Stack" );
aSetAttrTab.DeleteAndDestroy( 0, aSetAttrTab.Count() );
}
@@ -476,11 +475,10 @@ __EXPORT SwHTMLParser::~SwHTMLParser()
DeleteFormImpl();
DeleteFootEndNoteImpl();
- ASSERT( !pTable, "Es existiert noch eine offene Tabelle" );
+ OSL_ENSURE( !pTable, "Es existiert noch eine offene Tabelle" );
delete pImageMaps;
- //delete pTable;
- ASSERT( !pPendStack,
+ OSL_ENSURE( !pPendStack,
"SwHTMLParser::~SwHTMLParser: Hier sollte es keinen Pending-Stack mehr geben" );
while( pPendStack )
{
@@ -511,7 +509,7 @@ IMPL_LINK( SwHTMLParser, AsyncCallback, void*, /*pVoid*/ )
{
nEventId=0;
- // --> FME 2005-08-18 #i47907# If the document has already been destructed,
+ // #i47907# - If the document has already been destructed,
// the parser should be aware of this:
if( ( pDoc->GetDocShell() && pDoc->GetDocShell()->IsAbortingImport() )
|| 1 == pDoc->getReferenceCount() )
@@ -525,7 +523,7 @@ IMPL_LINK( SwHTMLParser, AsyncCallback, void*, /*pVoid*/ )
return 0;
}
-SvParserState __EXPORT SwHTMLParser::CallParser()
+SvParserState SwHTMLParser::CallParser()
{
// einen temporaeren Index anlegen, auf Pos 0 so wird er nicht bewegt!
pSttNdIdx = new SwNodeIndex( pDoc->GetNodes() );
@@ -542,7 +540,7 @@ SvParserState __EXPORT SwHTMLParser::CallParser()
pPam->Move( fnMoveBackward );
- // #106634# split any redline over the insertion point
+ // split any redline over the insertion point
aInsertionRangePam.SetMark();
*aInsertionRangePam.GetPoint() = *pPam->GetPoint();
aInsertionRangePam.Move( fnMoveBackward );
@@ -583,17 +581,17 @@ SvParserState __EXPORT SwHTMLParser::CallParser()
return eRet;
}
-void __EXPORT SwHTMLParser::Continue( int nToken )
+void SwHTMLParser::Continue( int nToken )
{
-#ifdef DBG_UTIL
- ASSERT( !nContinue, "Continue im Continue - Das sollte doch nicht sein, oder?" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( !nContinue, "Continue im Continue - Das sollte doch nicht sein, oder?" );
nContinue++;
#endif
// Wenn der Import (vom SFX) abgebrochen wurde, wird ein Fehler
// gesetzt aber trotzdem noch weiter gemacht, damit vernuenftig
// aufgeraeumt wird.
- ASSERT( SVPAR_ERROR!=eState,
+ OSL_ENSURE( SVPAR_ERROR!=eState,
"SwHTMLParser::Continue: bereits ein Fehler gesetzt" );
if( pDoc->GetDocShell() && pDoc->GetDocShell()->IsAbortingImport() )
eState = SVPAR_ERROR;
@@ -611,7 +609,7 @@ void __EXPORT SwHTMLParser::Continue( int nToken )
bViewCreated = sal_True;
pDoc->SetInLoadAsynchron( sal_True );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
nContinue--;
#endif
@@ -639,11 +637,11 @@ void __EXPORT SwHTMLParser::Continue( int nToken )
// beendet wird.
if( SVPAR_ERROR == eState )
{
- ASSERT( !pPendStack || pPendStack->nToken,
+ OSL_ENSURE( !pPendStack || pPendStack->nToken,
"SwHTMLParser::Continue: Pending-Stack ohne Token" );
if( pPendStack && pPendStack->nToken )
NextToken( pPendStack->nToken );
- ASSERT( !pPendStack,
+ OSL_ENSURE( !pPendStack,
"SwHTMLParser::Continue: Es gibt wieder einen Pend-Stack" );
}
else
@@ -685,7 +683,7 @@ void __EXPORT SwHTMLParser::Continue( int nToken )
while( GetNumInfo().GetNumRule() )
EndNumBulList();
- ASSERT( !nContextStMin, "Es gibt geschuetzte Kontexte" );
+ OSL_ENSURE( !nContextStMin, "Es gibt geschuetzte Kontexte" );
nContextStMin = 0;
while( aContexts.Count() )
{
@@ -721,11 +719,11 @@ void __EXPORT SwHTMLParser::Continue( int nToken )
pPam->GetPoint()->nContent.Assign( pTxtNode, nStt );
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// !!! sollte nicht moeglich sein, oder ??
-ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_True ).nNode.GetIndex(),
+OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_True ).nNode.GetIndex(),
"Pam.Bound1 steht noch im Node" );
-ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_False ).nNode.GetIndex(),
+OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_False ).nNode.GetIndex(),
"Pam.Bound2 steht noch im Node" );
if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_True ).nNode.GetIndex() )
@@ -865,7 +863,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_False ).nNode.GetIndex() )
xDPS->getDocumentProperties());
DBG_ASSERT(xDocProps.is(), "DocumentProperties is null");
if ( xDocProps.is() && (xDocProps->getAutoloadSecs() > 0) &&
- xDocProps->getAutoloadURL().equalsAscii("") )
+ (xDocProps->getAutoloadURL().getLength() == 0) )
{
xDocProps->setAutoloadURL(aPathToFile);
}
@@ -921,7 +919,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_False ).nNode.GetIndex() )
// wieder rekonstruieren.
CallEndAction( sal_True );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
nContinue--;
#endif
}
@@ -943,7 +941,7 @@ void SwHTMLParser::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
void SwHTMLParser::DocumentDetected()
{
- ASSERT( !bDocInitalized, "DocumentDetected mehrfach aufgerufen" );
+ OSL_ENSURE( !bDocInitalized, "DocumentDetected mehrfach aufgerufen" );
bDocInitalized = sal_True;
if( IsNewDoc() )
{
@@ -962,7 +960,7 @@ void SwHTMLParser::DocumentDetected()
}
// wird fuer jedes Token gerufen, das in CallParser erkannt wird
-void __EXPORT SwHTMLParser::NextToken( int nToken )
+void SwHTMLParser::NextToken( int nToken )
{
if( ( pDoc->GetDocShell() && pDoc->GetDocShell()->IsAbortingImport() )
|| 1 == pDoc->getReferenceCount() )
@@ -970,13 +968,13 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
// wurde der Import vom SFX abgebrochen? Wenn ein Pending-Stack
// existiert den noch aufraumen
eState = SVPAR_ERROR;
- ASSERT( !pPendStack || pPendStack->nToken,
+ OSL_ENSURE( !pPendStack || pPendStack->nToken,
"SwHTMLParser::NextToken: Pending-Stack ohne Token" );
if( 1 == pDoc->getReferenceCount() || !pPendStack )
return ;
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( pPendStack )
{
switch( nToken )
@@ -993,7 +991,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
case HTML_SELECT_OFF:
break;
default:
- ASSERT( !pPendStack, "Unbekanntes Token fuer Pending-Stack" );
+ OSL_ENSURE( !pPendStack, "Unbekanntes Token fuer Pending-Stack" );
break;
}
}
@@ -1103,7 +1101,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
break;
default:
- ASSERT( !this, "SwHTMLParser::NextToken: ungueltiges Tag" );
+ OSL_ENSURE( !this, "SwHTMLParser::NextToken: ungueltiges Tag" );
break;
}
@@ -1238,6 +1236,21 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
}
else if( aUnknownToken.Len() )
{
+ // Paste content of unknown tags.
+ if (aToken.Len() > 0)
+ {
+ if( !bDocInitalized )
+ DocumentDetected();
+ pDoc->InsertString( *pPam, aToken );
+
+ // wenn es noch vorlaefige Absatz-Attribute gibt, der Absatz aber
+ // nicht leer ist, dann sind die Absatz-Attribute entgueltig.
+ if( aParaAttrs.Count() )
+ aParaAttrs.Remove( 0, aParaAttrs.Count() );
+
+ SetAttr();
+ }
+
// Unbekannte Token im Header werden nur durch ein passendes
// End-Token, </HEAD> oder <BODY> wieder beendet. Darin wird Text
// ignoriert.
@@ -1255,6 +1268,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
case HTML_TEXTTOKEN:
return;
default:
+ aUnknownToken.Erase();
break;
}
}
@@ -1685,7 +1699,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
{
if( nOpenParaToken )
EndPara();
- ASSERT( !pTable, "Tabelle in Tabelle darf hier nicht vorkommen" );
+ OSL_ENSURE( !pTable, "Tabelle in Tabelle darf hier nicht vorkommen" );
if( !pTable && (IsNewDoc() || !pPam->GetNode()->FindTableNode()) &&
(pPam->GetPoint()->nNode.GetIndex() >
pDoc->GetNodes().GetEndOfExtras().GetIndex() ||
@@ -1953,7 +1967,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
if( ( aToken.Len() > 5 ) && ( ! bIgnoreHTMLComments ) )
{
// als Post-It einfuegen
- // MIB 8.12.2000: If there are no space characters right behind
+ // If there are no space characters right behind
// the <!-- and on front of the -->, leave the comment untouched.
if( ' ' == aToken.GetChar( 3 ) &&
' ' == aToken.GetChar( aToken.Len()-3 ) )
@@ -2184,7 +2198,7 @@ sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNu
{
const SwTxtNode *pTxtNd =
pAttr->GetSttPara().GetNode().GetTxtNode();
- ASSERT( pTxtNd, "No text node" );
+ OSL_ENSURE( pTxtNd, "No text node" );
if( pTxtNd )
{
const String& rText = pTxtNd->GetTxt();
@@ -2230,7 +2244,7 @@ sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNu
// darf es auch nicht in die Prev-Liste eines ausseren
// Attributs eingetragen werden, denn dieses wird ja
// erstmal nicht gesetzt. Das fuehrt zu verschiebenungen,
- // wenn Felder ins Rennen kommen (siehe #51020#)
+ // wenn Felder ins Rennen kommen
if( !pNext || bWholePara )
{
sal_uInt16 nTmp = pSetAttr->bInsAtStart ? 0
@@ -2269,11 +2283,7 @@ sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNu
if( GetNumInfo().GetDepth() )
{
sal_uInt8 nLvl = GetNumInfo().GetLevel();
- // --> OD 2008-04-02 #refactorlists#
-// SetNoNum (&nLvl, sal_True);
-// SetNodeNum( nLvl);
SetNodeNum( nLvl, false );
- // <--
}
else
pPam->GetNode()->GetTxtNode()->ResetAttr( RES_PARATR_NUMRULE );
@@ -2285,7 +2295,7 @@ sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNu
// Now it is time to get rid of all script dependent hints that are
// equal to the settings in the style
SwTxtNode *pTxtNd = rEndIdx.GetNode().GetTxtNode();
- ASSERT( pTxtNd, "There is the txt node" );
+ OSL_ENSURE( pTxtNd, "There is the txt node" );
sal_uInt16 nCntAttr = (pTxtNd && pTxtNd->GetpSwpHints())
? pTxtNd->GetSwpHints().Count() : 0;
if( nCntAttr )
@@ -2352,7 +2362,7 @@ sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNu
{
// The hint starts before another one ends.
// The hint in this case is not deleted
- ASSERT( pHt->GetEnd() && *pHt->GetEnd() <= aEndPos[nIdx],
+ OSL_ENSURE( pHt->GetEnd() && *pHt->GetEnd() <= aEndPos[nIdx],
"hints aren't nested properly!" );
}
}
@@ -2407,7 +2417,7 @@ void SwHTMLParser::Show()
// - die eiegen View-Shell wieder gesetzt
// - und Start-Action gerufen
- ASSERT( SVPAR_WORKING==eState, "Show nicht im Working-State - Das kann ins Auge gehen" );
+ OSL_ENSURE( SVPAR_WORKING==eState, "Show nicht im Working-State - Das kann ins Auge gehen" );
ViewShell *pOldVSh = CallEndAction();
GetpApp()->Reschedule();
@@ -2439,7 +2449,7 @@ void SwHTMLParser::ShowStatline()
// - die eiegen View-Shell wieder gesetzt
// - ein Start/End-Action gerufen, wenn gescrollt wurde.
- ASSERT( SVPAR_WORKING==eState, "ShowStatLine nicht im Working-State - Das kann ins Auge gehen" );
+ OSL_ENSURE( SVPAR_WORKING==eState, "ShowStatLine nicht im Working-State - Das kann ins Auge gehen" );
// Laufbalkenanzeige
if( !GetMedium() || !GetMedium()->IsRemote() )
@@ -2467,16 +2477,16 @@ void SwHTMLParser::ShowStatline()
ViewShell *SwHTMLParser::CallStartAction( ViewShell *pVSh, sal_Bool bChkPtr )
{
- ASSERT( !pActionViewShell, "CallStartAction: ViewShell schon gesetzt" );
+ OSL_ENSURE( !pActionViewShell, "CallStartAction: ViewShell schon gesetzt" );
if( !pVSh || bChkPtr )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
ViewShell *pOldVSh = pVSh;
#endif
pDoc->GetEditShell( &pVSh );
- ASSERT( !pVSh || !pOldVSh || pOldVSh == pVSh, "CallStartAction: Wer hat die ViewShell ausgetauscht?" );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( !pVSh || !pOldVSh || pOldVSh == pVSh, "CallStartAction: Wer hat die ViewShell ausgetauscht?" );
if( pOldVSh && !pVSh )
pVSh = 0;
#endif
@@ -2500,7 +2510,7 @@ ViewShell *SwHTMLParser::CallEndAction( sal_Bool bChkAction, sal_Bool bChkPtr )
{
ViewShell *pVSh = 0;
pDoc->GetEditShell( &pVSh );
- ASSERT( !pVSh || pActionViewShell == pVSh,
+ OSL_ENSURE( !pVSh || pActionViewShell == pVSh,
"CallEndAction: Wer hat die ViewShell ausgetauscht?" );
#if OSL_DEBUG_LEVEL > 1
if( pActionViewShell && !pVSh )
@@ -2566,7 +2576,7 @@ ViewShell *SwHTMLParser::CheckActionViewShell()
{
ViewShell *pVSh = 0;
pDoc->GetEditShell( &pVSh );
- ASSERT( !pVSh || pActionViewShell == pVSh,
+ OSL_ENSURE( !pVSh || pActionViewShell == pVSh,
"CheckActionViewShell: Wer hat die ViewShell ausgetauscht?" );
#if OSL_DEBUG_LEVEL > 1
if( pActionViewShell && !pVSh )
@@ -2601,7 +2611,7 @@ void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable,
sal_Bool bSetAttr;
if( bChkEnd )
{
- // fix #42192#: Zechen-Attribute mit Ende moeglich frueh,
+ // Zechen-Attribute mit Ende moeglich frueh,
// also noch im aktuellen Absatz setzen (wegen JavaScript
// und diversen Chats). das darf man aber nicht fuer Attribute,
// die ueber den ganzen Absatz aufgspannt werden sollen, weil
@@ -2637,7 +2647,7 @@ void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable,
sal_uInt16 ii = aParaAttrs.Count();
while( ii-- )
{
- ASSERT( pAttr != aParaAttrs[ii],
+ OSL_ENSURE( pAttr != aParaAttrs[ii],
"SetAttr: Attribut duerfte noch nicht gesetzt werden" );
aParaAttrs.Remove( ii );
}
@@ -2678,7 +2688,7 @@ void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable,
pAttr->nSttCntnt = 0;
else
{
- ASSERT( !this, "SetAttr: GoNext() failed!" );
+ OSL_ENSURE( !this, "SetAttr: GoNext() failed!" );
delete pAttr;
pAttr = pPrev;
continue; // break;
@@ -2706,7 +2716,7 @@ void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable,
pAttr->nEndCntnt = pCNd->Len();
else
{
- ASSERT( !this, "SetAttr: GoPrevious() failed!" );
+ OSL_ENSURE( !this, "SetAttr: GoPrevious() failed!" );
pAttrPam->DeleteMark();
delete pAttr;
pAttr = pPrev;
@@ -2741,7 +2751,7 @@ void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable,
if( pAttrPam->GetMark()->nNode.GetIndex() !=
rEndIdx.GetIndex() )
{
- ASSERT( !pAttrPam->GetPoint()->nContent.GetIndex(),
+ OSL_ENSURE( !pAttrPam->GetPoint()->nContent.GetIndex(),
"Content-Position vor Tabelle nicht 0???" );
pAttrPam->Move( fnMoveBackward );
}
@@ -2808,7 +2818,7 @@ void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable,
pCNd->SetAttr( *pAttr->pItem );
break;
}
- ASSERT( !this,
+ OSL_ENSURE( !this,
"LRSpace ueber mehrere Absaetze gesetzt!" );
// kein break (hier sollen wir trotzdem nie hinkommen;
default:
@@ -2837,7 +2847,7 @@ void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable,
SwFrmFmt *pFrmFmt = aMoveFlyFrms[ --n ];
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
- ASSERT( FLY_AT_PARA == rAnchor.GetAnchorId(),
+ OSL_ENSURE( FLY_AT_PARA == rAnchor.GetAnchorId(),
"Nur Auto-Rahmen brauchen eine Spezialbehandlung" );
const SwPosition *pFlyPos = rAnchor.GetCntntAnchor();
sal_uLong nFlyParaIdx = pFlyPos->nNode.GetIndex();
@@ -2897,8 +2907,8 @@ void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable,
if( bBeforeTable &&
pAttrPam->GetPoint()->nNode.GetIndex() == rEndIdx.GetIndex() )
{
- ASSERT( !bBeforeTable, "Aha, der Fall tritt also doch ein" );
- ASSERT( !pAttrPam->GetPoint()->nContent.GetIndex(),
+ OSL_ENSURE( !bBeforeTable, "Aha, der Fall tritt also doch ein" );
+ OSL_ENSURE( !pAttrPam->GetPoint()->nContent.GetIndex(),
"Content-Position vor Tabelle nicht 0???" );
// !!!
pAttrPam->Move( fnMoveBackward );
@@ -2935,11 +2945,11 @@ void SwHTMLParser::NewAttr( _HTMLAttr **ppAttr, const SfxPoolItem& rItem )
void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
sal_Bool bChkEmpty )
{
- ASSERT( !ppDepAttr, "SwHTMLParser::EndAttr: ppDepAttr-Feature ungetestet?" );
+ OSL_ENSURE( !ppDepAttr, "SwHTMLParser::EndAttr: ppDepAttr-Feature ungetestet?" );
// Der Listenkopf ist im Attribut gespeichert
_HTMLAttr **ppHead = pAttr->ppHead;
- ASSERT( ppHead, "keinen Attributs-Listenkopf gefunden!" );
+ OSL_ENSURE( ppHead, "keinen Attributs-Listenkopf gefunden!" );
// die aktuelle Psoition als Ende-Position merken
const SwNodeIndex* pEndIdx = &pPam->GetPoint()->nNode;
@@ -2959,17 +2969,12 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
while( pLast && pLast->GetNext() != pAttr )
pLast = pLast->GetNext();
- ASSERT( pLast, "Attribut nicht in eigener Liste gefunden!" );
-
- // das Attribut nicht an der PaM-Psoition beenden, sondern da,
- // wo das danch gestartete Attribut anfing???
- //pEndIdx = &pPrev->GetSttPara();
- //nEndCnt = pPrev->GetSttCnt();
+ OSL_ENSURE( pLast, "Attribut nicht in eigener Liste gefunden!" );
}
sal_Bool bMoveBack = sal_False;
sal_uInt16 nWhich = pAttr->pItem->Which();
- if( /*!pLast &&*/ !nEndCnt && RES_PARATR_BEGIN <= nWhich &&
+ if( !nEndCnt && RES_PARATR_BEGIN <= nWhich &&
*pEndIdx != pAttr->GetSttPara() )
{
// dann eine Cntntnt Position zurueck!
@@ -3006,7 +3011,7 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
{
const SwTxtNode *pTxtNd = pAttr->GetSttPara().GetNode()
.GetTxtNode();
- ASSERT( pTxtNd, "No text node" );
+ OSL_ENSURE( pTxtNd, "No text node" );
const String& rText = pTxtNd->GetTxt();
sal_uInt16 nScriptTxt = pBreakIt->GetBreakIter()->getScriptType(
rText, pAttr->GetSttCnt() );
@@ -3103,7 +3108,7 @@ void SwHTMLParser::DeleteAttr( _HTMLAttr* pAttr )
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
- ASSERT( !aParaAttrs.Count(),
+ OSL_ENSURE( !aParaAttrs.Count(),
"Hoechste Gefahr: Es gibt noch nicht-endgueltige Absatz-Attribute" );
if( aParaAttrs.Count() )
aParaAttrs.Remove( 0, aParaAttrs.Count() );
@@ -3111,7 +3116,7 @@ void SwHTMLParser::DeleteAttr( _HTMLAttr* pAttr )
// Der Listenkopf ist im Attribut gespeichert
_HTMLAttr **ppHead = pAttr->ppHead;
- ASSERT( ppHead, "keinen Attributs-Listenkopf gefunden!" );
+ OSL_ENSURE( ppHead, "keinen Attributs-Listenkopf gefunden!" );
// Wird das zueltzt gestartete oder ein frueher gestartetes Attribut
// entfernt?
@@ -3127,7 +3132,7 @@ void SwHTMLParser::DeleteAttr( _HTMLAttr* pAttr )
while( pLast && pLast->GetNext() != pAttr )
pLast = pLast->GetNext();
- ASSERT( pLast, "Attribut nicht in eigener Liste gefunden!" );
+ OSL_ENSURE( pLast, "Attribut nicht in eigener Liste gefunden!" );
}
// nun das Attrubut entfernen
@@ -3159,7 +3164,7 @@ void SwHTMLParser::SaveAttrTab( _HTMLAttrTable& rNewAttrTab )
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
- ASSERT( !aParaAttrs.Count(),
+ OSL_ENSURE( !aParaAttrs.Count(),
"Hoechste Gefahr: Es gibt noch nicht-endgueltige Absatz-Attribute" );
if( aParaAttrs.Count() )
aParaAttrs.Remove( 0, aParaAttrs.Count() );
@@ -3188,7 +3193,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
- ASSERT( !aParaAttrs.Count(),
+ OSL_ENSURE( !aParaAttrs.Count(),
"Hoechste Gefahr: Es gibt noch nicht-endgueltige Absatz-Attribute" );
if( aParaAttrs.Count() )
aParaAttrs.Remove( 0, aParaAttrs.Count() );
@@ -3292,7 +3297,7 @@ void SwHTMLParser::RestoreAttrTab( const _HTMLAttrTable& rNewAttrTab,
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
- ASSERT( !aParaAttrs.Count(),
+ OSL_ENSURE( !aParaAttrs.Count(),
"Hoechste Gefahr: Es gibt noch nicht-endgueltige Absatz-Attribute" );
if( aParaAttrs.Count() )
aParaAttrs.Remove( 0, aParaAttrs.Count() );
@@ -3303,7 +3308,7 @@ void SwHTMLParser::RestoreAttrTab( const _HTMLAttrTable& rNewAttrTab,
for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; (++pTbl, ++pSaveTbl) )
{
- ASSERT( !*pTbl, "Die Attribut-Tabelle ist nicht leer!" );
+ OSL_ENSURE( !*pTbl, "Die Attribut-Tabelle ist nicht leer!" );
const SwPosition *pPos = pPam->GetPoint();
const SwNodeIndex& rSttPara = pPos->nNode;
@@ -3314,7 +3319,7 @@ void SwHTMLParser::RestoreAttrTab( const _HTMLAttrTable& rNewAttrTab,
_HTMLAttr *pAttr = *pTbl;
while( pAttr )
{
- ASSERT( !pAttr->GetPrev() || !pAttr->GetPrev()->ppHead,
+ OSL_ENSURE( !pAttr->GetPrev() || !pAttr->GetPrev()->ppHead,
"Previous-Attribut hat noch einen Header" );
pAttr->SetHead( pTbl );
if( bSetNewStart )
@@ -3461,12 +3466,12 @@ void SwHTMLParser::NewStdAttr( int nToken,
InsertAttr( ppAttr ,rItem, pCntxt );
if( pItem2 )
{
- ASSERT( ppAttr2, "missing table entry for item2" );
+ OSL_ENSURE( ppAttr2, "missing table entry for item2" );
InsertAttr( ppAttr2, *pItem2, pCntxt );
}
if( pItem3 )
{
- ASSERT( ppAttr3, "missing table entry for item3" );
+ OSL_ENSURE( ppAttr3, "missing table entry for item3" );
InsertAttr( ppAttr3, *pItem3, pCntxt );
}
}
@@ -3677,7 +3682,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
nFontHeight = aFontHeights[nSize-1];
}
- ASSERT( !nSize == !nFontHeight, "HTML-Font-Size != Font-Height" );
+ OSL_ENSURE( !nSize == !nFontHeight, "HTML-Font-Size != Font-Height" );
String aFontName, aStyleName;
FontFamily eFamily = FAMILY_DONTKNOW; // Family und Pitch,
@@ -3855,7 +3860,7 @@ void SwHTMLParser::NewPara()
if( ParseStyleOptions( aStyle, aId, aEmptyStr, aItemSet, aPropInfo, &aLang, &aDir ) )
{
- ASSERT( !aClass.Len() || !pCSS1Parser->GetClass( aClass ),
+ OSL_ENSURE( !aClass.Len() || !pCSS1Parser->GetClass( aClass ),
"Class wird nicht beruecksichtigt" );
DoPositioning( aItemSet, aPropInfo, pCntxt );
InsertAttrs( aItemSet, aPropInfo, pCntxt );
@@ -3874,7 +3879,7 @@ void SwHTMLParser::NewPara()
// Laufbalkenanzeige
ShowStatline();
- ASSERT( !nOpenParaToken, "Jetzt geht ein offenes Absatz-Element verloren" );
+ OSL_ENSURE( !nOpenParaToken, "Jetzt geht ein offenes Absatz-Element verloren" );
nOpenParaToken = HTML_PARABREAK_ON;
}
@@ -3882,10 +3887,10 @@ void SwHTMLParser::EndPara( sal_Bool bReal )
{
if( HTML_LI_ON==nOpenParaToken && pTable )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
const SwNumRule *pNumRule = pPam->GetNode()->GetTxtNode()->GetNumRule();
+ OSL_ENSURE( pNumRule, "Wo ist die Numrule geblieben" );
#endif
- ASSERT( pNumRule, "Wo ist die Numrule geblieben" );
}
// leere Absaetze werden von Netscape uebersprungen, von uns jetzt auch
@@ -3990,7 +3995,7 @@ void SwHTMLParser::NewHeading( int nToken )
if( ParseStyleOptions( aStyle, aId, aEmptyStr, aItemSet, aPropInfo, &aLang, &aDir ) )
{
- ASSERT( !aClass.Len() || !pCSS1Parser->GetClass( aClass ),
+ OSL_ENSURE( !aClass.Len() || !pCSS1Parser->GetClass( aClass ),
"Class wird nicht beruecksichtigt" );
DoPositioning( aItemSet, aPropInfo, pCntxt );
InsertAttrs( aItemSet, aPropInfo, pCntxt );
@@ -4106,7 +4111,7 @@ void SwHTMLParser::NewTxtFmtColl( int nToken, sal_uInt16 nColl )
eMode = AM_SOFTNOSPACE;
break;
default:
- ASSERT( !this, "unbekannte Vorlage" );
+ OSL_ENSURE( !this, "unbekannte Vorlage" );
break;
}
if( pPam->GetPoint()->nContent.GetIndex() )
@@ -4125,7 +4130,7 @@ void SwHTMLParser::NewTxtFmtColl( int nToken, sal_uInt16 nColl )
if( ParseStyleOptions( aStyle, aId, aEmptyStr, aItemSet, aPropInfo, &aLang, &aDir ) )
{
- ASSERT( !aClass.Len() || !pCSS1Parser->GetClass( aClass ),
+ OSL_ENSURE( !aClass.Len() || !pCSS1Parser->GetClass( aClass ),
"Class wird nicht beruecksichtigt" );
DoPositioning( aItemSet, aPropInfo, pCntxt );
InsertAttrs( aItemSet, aPropInfo, pCntxt );
@@ -4159,7 +4164,7 @@ void SwHTMLParser::EndTxtFmtColl( int nToken )
eMode = AM_SOFTNOSPACE;
break;
default:
- ASSERT( !this, "unbekannte Vorlage" );
+ OSL_ENSURE( !this, "unbekannte Vorlage" );
break;
}
if( pPam->GetPoint()->nContent.GetIndex() )
@@ -4341,7 +4346,7 @@ void SwHTMLParser::NewDefListItem( int nToken )
if( !bInDefList )
{
nDefListDeep++;
- ASSERT( !nOpenParaToken,
+ OSL_ENSURE( !nOpenParaToken,
"Jetzt geht ein offenes Absatz-Element verloren" );
nOpenParaToken = static_cast< sal_uInt16 >(nToken);
}
@@ -4437,7 +4442,7 @@ sal_Bool SwHTMLParser::HasCurrentParaFlys( sal_Bool bNoSurroundOnly,
}
else
{
- // fix #42282#: Wenn Rahmen mit Umlauf gesucht sind,
+ // Wenn Rahmen mit Umlauf gesucht sind,
// auch keine mit Durchlauf beachten. Dabei handelt es
// sich (noch) um HIDDEN-Controls, und denen weicht man
// besser auch nicht aus.
@@ -4740,7 +4745,7 @@ void SwHTMLParser::NewCharFmt( int nToken )
// die Vorlage setzen und im Kontext merken
SwCharFmt* pCFmt = pCSS1Parser->GetChrFmt( static_cast< sal_uInt16 >(nToken), aClass );
- ASSERT( pCFmt, "keine Zeichenvorlage zu Token gefunden" );
+ OSL_ENSURE( pCFmt, "keine Zeichenvorlage zu Token gefunden" );
// Styles parsen (zu Class siehe auch NewPara)
@@ -4751,7 +4756,7 @@ void SwHTMLParser::NewCharFmt( int nToken )
if( ParseStyleOptions( aStyle, aId, aEmptyStr, aItemSet, aPropInfo, &aLang, &aDir ) )
{
- ASSERT( !aClass.Len() || !pCSS1Parser->GetClass( aClass ),
+ OSL_ENSURE( !aClass.Len() || !pCSS1Parser->GetClass( aClass ),
"Class wird nicht beruecksichtigt" );
DoPositioning( aItemSet, aPropInfo, pCntxt );
InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
@@ -5271,10 +5276,6 @@ void SwHTMLParser::InsertHorzRule()
// Sinn. Um zu Vermeiden, dass die Linie bei der Breitenberechnung
// beruecksichtigt wird, bekommt sie aber trotzdem entsprechendes
// LRSpace-Item verpasst.
-#ifdef FIX41370
- const SwFmtColl *pColl = GetCurrFmtColl();
- SvxLRSpaceItem aLRItem( pColl->GetLRSpace() );
-#endif
if( !pTable )
{
// Laenge und Ausrichtung der Linie ueber Absatz-Einzuege "tuerken"
@@ -5286,10 +5287,8 @@ void SwHTMLParser::InsertHorzRule()
if( (long)nWidth < nBrowseWidth )
{
-#ifndef FIX41370
const SwFmtColl *pColl = GetCurrFmtColl();
SvxLRSpaceItem aLRItem( pColl->GetLRSpace() );
-#endif
long nDist = nBrowseWidth - nWidth;
switch( eAdjust )
@@ -5308,17 +5307,10 @@ void SwHTMLParser::InsertHorzRule()
break;
}
-#ifndef FIX41370
_HTMLAttr* pTmp = new _HTMLAttr( *pPam->GetPoint(), aLRItem );
aSetAttrTab.Insert( pTmp, aSetAttrTab.Count() );
-#endif
}
}
-
-#ifdef FIX41370
- _HTMLAttr* pTmp = new _HTMLAttr( *pPam->GetPoint(), aLRItem );
- aSetAttrTab.Insert( pTmp, aSetAttrTab.Count() );
-#endif
}
// Bookmarks koennen nicht in Hyperlinks eingefueht werden
@@ -5327,7 +5319,7 @@ void SwHTMLParser::InsertHorzRule()
// den aktuellen Kontext vom Stack holen
_HTMLAttrContext *pPoppedContext = PopContext( HTML_HORZRULE );
- ASSERT( pPoppedContext==pCntxt, "wo kommt denn da ein HR-Kontext her?" );
+ OSL_ENSURE( pPoppedContext==pCntxt, "wo kommt denn da ein HR-Kontext her?" );
delete pPoppedContext;
pPam->Move( fnMoveForward );
@@ -5478,11 +5470,11 @@ void _HTMLAttr::Reset( const SwNodeIndex& rSttPara, sal_uInt16 nSttCnt,
void _HTMLAttr::InsertPrev( _HTMLAttr *pPrv )
{
- ASSERT( !pPrv->pNext || pPrv->pNext == this,
+ OSL_ENSURE( !pPrv->pNext || pPrv->pNext == this,
"_HTMLAttr::InsertPrev: pNext falsch" );
pPrv->pNext = 0;
- ASSERT( 0 == pPrv->ppHead || ppHead == pPrv->ppHead,
+ OSL_ENSURE( 0 == pPrv->ppHead || ppHead == pPrv->ppHead,
"_HTMLAttr::InsertPrev: ppHead falsch" );
pPrv->ppHead = 0;
@@ -5521,3 +5513,4 @@ void SwHTMLParser::AddMetaUserDefined( ::rtl::OUString const & i_rMetaName )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index c7f897018dc7..19ed5fe9c5de 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,9 +80,9 @@ class SvxCSS1PropertyInfo;
#define HTML_DFLT_IMG_HEIGHT (MM50*2)
// ein par Sachen, die man oefter mal braucht
-extern HTMLOptionEnum __FAR_DATA aHTMLPAlignTable[];
-extern HTMLOptionEnum __FAR_DATA aHTMLImgHAlignTable[];
-extern HTMLOptionEnum __FAR_DATA aHTMLImgVAlignTable[];
+extern HTMLOptionEnum aHTMLPAlignTable[];
+extern HTMLOptionEnum aHTMLImgHAlignTable[];
+extern HTMLOptionEnum aHTMLImgVAlignTable[];
// der Attribut Stack:
@@ -450,7 +451,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
enum JumpToMarks { JUMPTO_NONE, JUMPTO_MARK, JUMPTO_TABLE, JUMPTO_FRAME,
JUMPTO_REGION, JUMPTO_GRAPHIC } eJumpTo;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uInt16 nContinue; // Tiefe der Continue-Aufrufe
#endif
@@ -570,10 +571,8 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
SwTwips GetCurrentBrowseWidth();
SwHTMLNumRuleInfo& GetNumInfo() { return *pNumRuleInfo; }
- // --> OD 2008-04-02 #refactorlists#
// add parameter <bCountedInList>
void SetNodeNum( sal_uInt8 nLevel, bool bCountedInList );
- // <--
// Verwalten von Absatz-Vorlagen
@@ -822,8 +821,8 @@ private:
sal_Bool bSetPropSet = sal_True,
sal_Bool bHidden = sal_False );
void SetControlSize( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rShape, const Size& rTextSz,
- sal_Bool bMinWidth, sal_Bool bMinHeight, int nToken );
- void SetPendingControlSize( int nToken );
+ sal_Bool bMinWidth, sal_Bool bMinHeight );
+ void SetPendingControlSize();
public:
void ResizeDrawObject( SdrObject* pObj, SwTwips nWidth );
@@ -1038,3 +1037,4 @@ inline void SwHTMLParser::PushContext( _HTMLAttrContext *pCntxt )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 0e14dc1f42de..f8adde26bbc3 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,17 +81,13 @@
#include <swtable.hxx>
#include <fldbas.hxx>
#include <fmtclds.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <wrthtml.hxx>
#include <htmlnum.hxx>
#include <htmlfly.hxx>
#include <swmodule.hxx>
-#ifndef _STATSTR_HRC
#include <statstr.hrc> // ResId fuer Statusleiste
-#endif
#include <swerror.h>
#define MAX_INDENT_LEVEL 20
@@ -98,10 +95,10 @@
#if defined(UNX)
const sal_Char SwHTMLWriter::sNewLine = '\012';
#else
-const sal_Char __FAR_DATA SwHTMLWriter::sNewLine[] = "\015\012";
+const sal_Char SwHTMLWriter::sNewLine[] = "\015\012";
#endif
-static sal_Char __FAR_DATA sIndentTabs[MAX_INDENT_LEVEL+2] =
+static sal_Char sIndentTabs[MAX_INDENT_LEVEL+2] =
"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
SwHTMLWriter::SwHTMLWriter( const String& rBaseURL )
@@ -122,7 +119,7 @@ SwHTMLWriter::SwHTMLWriter( const String& rBaseURL )
}
-__EXPORT SwHTMLWriter::~SwHTMLWriter()
+SwHTMLWriter::~SwHTMLWriter()
{
delete pNumRuleInfo;
}
@@ -160,7 +157,6 @@ sal_uLong SwHTMLWriter::WriteStream()
nHTMLMode |= HTMLMODE_ABS_POS_FLY|HTMLMODE_ABS_POS_DRAW;
if( HTML_CFG_WRITER==nExportMode )
-// nHTMLMode |= HTMLMODE_FLY_MARGINS | HTMLMODE_FRSTLINE_IN_NUMBUL;
nHTMLMode |= HTMLMODE_FLY_MARGINS;
if( HTML_CFG_NS40==nExportMode )
@@ -196,14 +192,6 @@ sal_uLong SwHTMLWriter::WriteStream()
rtl_getBestMimeCharsetFromTextEncoding( eDestEnc );
eDestEnc = rtl_getTextEncodingFromMimeCharset( pCharSet );
- // fuer Netscape optimieren heisst Spacer- und Multicol ausgeben
-// bCfgMultiCol = pHtmlOptions->IsNetscape3();
-// bCfgSpacer = pHtmlOptions->IsNetscape3();
-
- // wenn Styles exportiert werden, wird ein Style einem HTML-Tag manchmal
- // vorgezogen, wenn nicht fuer Netscape exportiert wird
- // bCfgPreferStyles = bCfgOutStyles; // && !pHtmlOptions->IsNetscape3();
-
// Nur noch fuer den MS-IE ziehen wir den Export von Styles vor.
bCfgPreferStyles = HTML_CFG_MSIE==nExportMode;
@@ -216,7 +204,7 @@ sal_uLong SwHTMLWriter::WriteStream()
sal_Bool bOldHTMLMode = sal_False;
sal_uInt16 nOldTxtFmtCollCnt = 0, nOldCharFmtCnt = 0;
- ASSERT( !pTemplate, "Wo kommt denn die HTML-Vorlage hier her?" );
+ OSL_ENSURE( !pTemplate, "Wo kommt denn die HTML-Vorlage hier her?" );
pTemplate = ((HTMLReader*)ReadHTML)->GetTemplateDoc();
if( pTemplate )
{
@@ -308,7 +296,7 @@ sal_uLong SwHTMLWriter::WriteStream()
}
else
{
- ASSERT( FILE_LINK_SECTION != pSNd->GetSection().GetType(),
+ OSL_ENSURE( FILE_LINK_SECTION != pSNd->GetSection().GetType(),
"Export gelinkter Bereiche am Dok-Anfang ist nicht implemntiert" );
// nur das Tag fuer die Section merken
@@ -391,7 +379,7 @@ sal_uLong SwHTMLWriter::WriteStream()
// loesche die Tabelle mit den freifliegenden Rahmen
sal_uInt16 i;
- ASSERT( !pHTMLPosFlyFrms, "Wurden nicht alle Rahmen ausgegeben" );
+ OSL_ENSURE( !pHTMLPosFlyFrms, "Wurden nicht alle Rahmen ausgegeben" );
if( pHTMLPosFlyFrms )
{
pHTMLPosFlyFrms->DeleteAndDestroy( 0, pHTMLPosFlyFrms->Count() );
@@ -437,7 +425,7 @@ sal_uLong SwHTMLWriter::WriteStream()
delete pxFormComps;
pxFormComps = 0;
- ASSERT( !pFootEndNotes,
+ OSL_ENSURE( !pFootEndNotes,
"SwHTMLWriter::Write: Ftns nicht durch OutFootEndNotes geloescht" );
pCurrPageDesc = 0;
@@ -459,13 +447,13 @@ sal_uLong SwHTMLWriter::WriteStream()
sal_uInt16 nTxtFmtCollCnt = pTemplate->GetTxtFmtColls()->Count();
while( nTxtFmtCollCnt > nOldTxtFmtCollCnt )
pTemplate->DelTxtFmtColl( --nTxtFmtCollCnt );
- ASSERT( pTemplate->GetTxtFmtColls()->Count() == nOldTxtFmtCollCnt,
+ OSL_ENSURE( pTemplate->GetTxtFmtColls()->Count() == nOldTxtFmtCollCnt,
"falsche Anzahl TxtFmtColls geloescht" );
sal_uInt16 nCharFmtCnt = pTemplate->GetCharFmts()->Count();
while( nCharFmtCnt > nOldCharFmtCnt )
pTemplate->DelCharFmt( --nCharFmtCnt );
- ASSERT( pTemplate->GetCharFmts()->Count() == nOldCharFmtCnt,
+ OSL_ENSURE( pTemplate->GetCharFmts()->Count() == nOldCharFmtCnt,
"falsche Anzahl CharFmts geloescht" );
// HTML-Modus wieder restaurieren
@@ -532,7 +520,7 @@ void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt,
const SwFmtCol *pCol,
sal_Bool bContinued=sal_False )
{
- ASSERT( pCol || !bContinued, "Continuation of DIV" );
+ OSL_ENSURE( pCol || !bContinued, "Continuation of DIV" );
if( rHTMLWrt.bLFPossible )
rHTMLWrt.OutNewLine();
@@ -659,7 +647,7 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd )
const SwSection& rSection = rSectNd.GetSection();
const SwSectionFmt *pFmt = rSection.GetFmt();
- ASSERT( pFmt, "Section without a format?" );
+ OSL_ENSURE( pFmt, "Section without a format?" );
sal_Bool bStartTag = sal_True;
sal_Bool bEndTag = sal_True;
@@ -758,7 +746,7 @@ void SwHTMLWriter::Out_SwDoc( SwPaM* pPam )
{
SwNode * pNd = pCurPam->GetNode();
- ASSERT( !(pNd->IsGrfNode() || pNd->IsOLENode()),
+ OSL_ENSURE( !(pNd->IsGrfNode() || pNd->IsOLENode()),
"Grf- oder OLE-Node hier unerwartet" );
if( pNd->IsTxtNode() )
{
@@ -885,7 +873,7 @@ sal_uInt16 SwHTMLWriter::OutHeaderAttrs()
0==(pTxtNd=pDoc->GetNodes()[nIdx]->GetTxtNode()) )
nIdx++;
- ASSERT( pTxtNd, "Kein Text-Node gefunden" );
+ OSL_ENSURE( pTxtNd, "Kein Text-Node gefunden" );
if( !pTxtNd || !pTxtNd->HasHints() )
return 0;
@@ -937,7 +925,6 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
// DokumentInfo
ByteString sIndent;
GetIndentString( sIndent );
-// OutNewLine();
using namespace ::com::sun::star;
uno::Reference<document::XDocumentProperties> xDocProps;
SwDocShell *pDocShell(pDoc->GetDocShell());
@@ -958,8 +945,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
OutFootEndNoteInfo();
const SwPageDesc *pPageDesc = 0;
- //if( !pDoc->IsHTMLMode() )
- //{
+
// In Nicht-HTML-Dokumenten wird die erste gesetzte Seitenvorlage
// exportiert und wenn keine gesetzt ist die Standard-Vorlage
sal_uLong nNodeIdx = pCurPam->GetPoint()->nNode.GetIndex();
@@ -985,12 +971,6 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
if( !pPageDesc )
pPageDesc = &const_cast<const SwDoc *>(pDoc)->GetPageDesc( 0 );
- //}
- //else
- //{
- // In HTML-Dokumenten nehmen wir immer die HTML-Vorlage
- // pPageDesc = pDoc->GetPageDescFromPool( RES_POOLPAGE_HTML );
- //}
// und nun ... das Style-Sheet!!!
if( bCfgOutStyles )
@@ -1151,7 +1131,6 @@ void SwHTMLWriter::OutBackground( const SvxBrushItem *pBrushItem,
String& rEmbGrfNm, sal_Bool bGraphic )
{
const Color &rBackColor = pBrushItem->GetColor();
- /// OD 02.09.2002 #99657#
/// check, if background color is not "no fill"/"auto fill", instead of
/// only checking, if transparency is not set.
if( rBackColor.GetColor() != COL_TRANSPARENT )
@@ -1437,3 +1416,4 @@ void GetHTMLWriter( const String&, const String& rBaseURL, WriterRef& xRet )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index bee6d63b805e..61b7e99a9bf3 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -221,7 +222,7 @@ public:
#if defined(UNX)
static const sal_Char sNewLine; // nur \012 oder \015
#else
- static const sal_Char __FAR_DATA sNewLine[]; // \015\012
+ static const sal_Char sNewLine[]; // \015\012
#endif
SvStringsDtor aImgMapNames; // geschriebene Image Maps
@@ -370,9 +371,6 @@ public:
void OutFootEndNoteSym( const SwFmtFtn& rFmtFtn, const String& rNum,
sal_uInt16 nScript );
-#ifdef JAVA_BASIC_IDE
- void OutBasicModule( const String& rName, const String& rLanguage );
-#endif
void OutBasic();
void OutAndSetDefList( sal_uInt16 nNewLvl );
@@ -598,6 +596,8 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
Writer& OutHTML_NumBulListEnd( SwHTMLWriter& rWrt,
const SwHTMLNumRuleInfo& rNextInfo );
+Writer& OutCSS1_SvxBox( Writer& rWrt, const SfxPoolItem& rHt );
#endif // _WRTHTML_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/inc/fltbase.hxx b/sw/source/filter/inc/fltbase.hxx
index cc8e9b6f41f1..c53613c983e6 100644
--- a/sw/source/filter/inc/fltbase.hxx
+++ b/sw/source/filter/inc/fltbase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -125,3 +126,4 @@ inline void SwFilterBase::ClearBytesLeft( void )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/inc/fltglbls.hxx b/sw/source/filter/inc/fltglbls.hxx
index 38867a4125e4..773c47b27fc4 100644
--- a/sw/source/filter/inc/fltglbls.hxx
+++ b/sw/source/filter/inc/fltglbls.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -122,3 +123,5 @@ inline void FilterGlobals::RowLimitter( sal_uInt16 &rRow )
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/inc/fltini.hxx b/sw/source/filter/inc/fltini.hxx
index f92edaa83f87..5b546c031895 100644
--- a/sw/source/filter/inc/fltini.hxx
+++ b/sw/source/filter/inc/fltini.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,7 +73,6 @@ public:
void GetWW8Writer( const String&, const String&, WriterRef& );
-// JP 17.03.99 - 63049
// Umsetzen der LRSpaces im aktuell importierten Doc. Die Fremd-Filter
// liefern immer absolute Werte fuer die Ebenen einer NumRule. Wir
// verarbeiten jetzt aber relative Werte bezogen auf das LR-Space-Item.
@@ -106,3 +106,5 @@ SW_DLLPUBLIC void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnch
SwTwips nPageWidth);
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index 2c5adee0381c..61208b30c445 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -400,7 +401,7 @@ public:
void Reset()
{
- // --> OD 2007-01-25 #i73790# - method renamed
+ // #i73790# - method renamed
pColl->ResetAllFmtAttr();
// <--
pColl->SetAuto(sal_False); // nach Empfehlung JP
@@ -565,8 +566,8 @@ public:
// methoden zur verwaltung von styles:
void BeginStyle(sal_uInt16 nUserCode, RES_POOL_COLLFMT_TYPE aType)
{
- ASSERT(nUserCode<sizeof(pColls)/sizeof(*pColls), "code out of bounds");
- ASSERT(pColls[nUserCode] == NULL, "user codes dublicate");
+ OSL_ENSURE(nUserCode<sizeof(pColls)/sizeof(*pColls), "code out of bounds");
+ OSL_ENSURE(pColls[nUserCode] == NULL, "user codes dublicate");
if (eSubMode == Style)
EndStyle();
pOut = pColls[nUserCode] = new SwFltFormatCollection(GetDoc(), aType);
@@ -575,8 +576,8 @@ public:
}
void BeginStyle( sal_uInt16 nUserCode, const String& rName )
{
- ASSERT(nUserCode<sizeof(pColls)/sizeof(*pColls), "code out of bounds");
- ASSERT(pColls[nUserCode] == NULL, "user codes dublicate");
+ OSL_ENSURE(nUserCode<sizeof(pColls)/sizeof(*pColls), "code out of bounds");
+ OSL_ENSURE(pColls[nUserCode] == NULL, "user codes dublicate");
if (eSubMode == Style)
EndStyle();
pOut = pColls[nUserCode] = new SwFltFormatCollection(GetDoc(), rName );
@@ -587,8 +588,8 @@ public:
{ return pColls[nUserCode] != 0; }
void BaseStyle(sal_uInt16 nBased)
{
- ASSERT(eSubMode == Style, "wrong state for style");
- ASSERT(pColls[nBased], "Style based on noexistent style" );
+ OSL_ENSURE(eSubMode == Style, "wrong state for style");
+ OSL_ENSURE(pColls[nBased], "Style based on noexistent style" );
if( eSubMode == Style && pColls[nBased]->GetColl() )
((SwFltFormatCollection*)pOut)->Derived(pColls[nBased]->GetColl());
}
@@ -596,7 +597,7 @@ public:
void EndStyle()
{
-// ASSERT(eSubMode == Style, "wrong state for style");
+// OSL_ENSURE(eSubMode == Style, "wrong state for style");
nAktStyle = 0;
pOut = pOutDoc;
eSubMode = None;
@@ -626,4 +627,4 @@ SW_DLLPUBLIC void UpdatePageDescs(SwDoc &rDoc, sal_uInt16 nInPageDescOffset);
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx
index d4f02f690245..f7b72790a37d 100644
--- a/sw/source/filter/inc/msfilter.hxx
+++ b/sw/source/filter/inc/msfilter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,8 +25,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-/// @HTML
#ifndef SW_MS_MSFILTER_HXX
#define SW_MS_MSFILTER_HXX
@@ -33,11 +32,11 @@
#include <set>
#include <map>
#include <vector>
-# include <swtypes.hxx> //SwTwips
-# include <tools/string.hxx> //String
-# include "wwstyles.hxx" //ww::sti
-# include <rtl/textenc.h> //rtl_TextEncoding
-# include <tools/gen.hxx> //Size
+#include <swtypes.hxx> //SwTwips
+#include <tools/string.hxx> //String
+#include "wwstyles.hxx" //ww::sti
+#include <rtl/textenc.h> //rtl_TextEncoding
+#include <tools/gen.hxx> //Size
#include <tools/datetime.hxx>
#include <fltshell.hxx> // fuer den Attribut Stack
#include <redline.hxx>
@@ -120,7 +119,7 @@ namespace sw
@author
<a href="mailto:mmaher@openoffice.org">Martin Maher</a
*/
- sal_uLong MSDateTimeFormatToSwFormat(String& rParams, SvNumberFormatter *pFormatter, sal_uInt16 &rLang, bool bHijri);
+ sal_uLong MSDateTimeFormatToSwFormat(String& rParams, SvNumberFormatter *pFormatter, sal_uInt16 &rLang, bool bHijri, sal_uInt16 nDocLang);
/** Used by MSDateTimeFormatToSwFormat to identify AM time fields
@@ -525,4 +524,5 @@ namespace sw
}
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/inc/rtf.hxx b/sw/source/filter/inc/rtf.hxx
index 4ca97a99648e..e138cc3a4399 100644
--- a/sw/source/filter/inc/rtf.hxx
+++ b/sw/source/filter/inc/rtf.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -130,3 +131,4 @@ public:
#endif // _RTF_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/inc/wrt_fn.hxx b/sw/source/filter/inc/wrt_fn.hxx
index 80bf3b2ec35b..05f724707235 100644
--- a/sw/source/filter/inc/wrt_fn.hxx
+++ b/sw/source/filter/inc/wrt_fn.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,5 @@ SW_DLLPUBLIC Writer& Out( const SwNodeFnTab, SwNode&, Writer & rWrt );
#endif // _WRT_FN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx
index c717cfb5d96c..3ab7614986db 100644
--- a/sw/source/filter/inc/wrtswtbl.hxx
+++ b/sw/source/filter/inc/wrtswtbl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -259,7 +260,7 @@ protected:
sal_Bool bRelWidths : 1; // Breiten relativ ausgeben?
sal_Bool bUseLayoutHeights : 1; // Layout zur Hoehenbestimmung nehmen?
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool bGetLineHeightCalled : 1;
#endif
@@ -332,3 +333,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/inc/wwstyles.hxx b/sw/source/filter/inc/wwstyles.hxx
index 75b819676adc..e2053fd5eaa7 100644
--- a/sw/source/filter/inc/wwstyles.hxx
+++ b/sw/source/filter/inc/wwstyles.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,8 +26,6 @@
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-/// @HTML
#ifndef WW_WWSTYLES_HXX
#define WW_WWSTYLES_HXX
@@ -218,4 +217,5 @@ namespace ww
} // namespace ww
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/rtf/rtffld.cxx b/sw/source/filter/rtf/rtffld.cxx
index 694558ba9b5e..e0e32329b1af 100644
--- a/sw/source/filter/rtf/rtffld.cxx
+++ b/sw/source/filter/rtf/rtffld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,17 +28,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <ctype.h>
#include <hintids.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
+#include <sal/macros.h>
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
-#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
-#endif
#include <svl/urihelper.hxx>
#include <svtools/rtftoken.h>
#include <svl/zforlist.hxx>
@@ -60,9 +57,7 @@
#include <docufld.hxx>
#include <flddat.hxx>
#include <charfmt.hxx>
-#ifndef _fmtruby_HXX
#include <fmtruby.hxx>
-#endif
#include <breakit.hxx>
#include <reffld.hxx>
#include <SwStyleNameMapper.hxx>
@@ -97,29 +92,29 @@ static RTF_FLD_TYPES _WhichFld( String& rName, String& rNext )
{
// Strings sind PascalStrings; Laenge steht an 1. Stellen, dadurch wird
// sich der Aufruf von strlen erspart!!!
- sal_Char __READONLY_DATA sTOC[]= "\x03""toc";
- sal_Char __READONLY_DATA sIMPORT[]= "\x06""import";
- sal_Char __READONLY_DATA sINDEX[]= "\x05""index";
- sal_Char __READONLY_DATA sSYMBOL[]= "\x06""symbol";
- sal_Char __READONLY_DATA sPAGE[]= "\x04""page";
- sal_Char __READONLY_DATA sNUMPAGES[]= "\x08""numpages";
- sal_Char __READONLY_DATA sDATE[]= "\x04""date";
- sal_Char __READONLY_DATA sTIME[]= "\x04""time";
- sal_Char __READONLY_DATA sDATA[]= "\x04""data";
- sal_Char __READONLY_DATA sMERGEFLD[]= "\x0A""mergefield";
- sal_Char __READONLY_DATA sIMPORT2[]= "\x0E""includepicture";
- sal_Char __READONLY_DATA sHYPERLINK[]= "\x09""hyperlink";
- sal_Char __READONLY_DATA sREF[]= "\x03""ref";
- sal_Char __READONLY_DATA sPAGEREF[]= "\x07""pageref";
- sal_Char __READONLY_DATA sEQ[]= "\x02""eq";
- sal_Char __READONLY_DATA sINCLUDETEXT[]="\x0B""includetext";
+ sal_Char const sTOC[]= "\x03""toc";
+ sal_Char const sIMPORT[]= "\x06""import";
+ sal_Char const sINDEX[]= "\x05""index";
+ sal_Char const sSYMBOL[]= "\x06""symbol";
+ sal_Char const sPAGE[]= "\x04""page";
+ sal_Char const sNUMPAGES[]= "\x08""numpages";
+ sal_Char const sDATE[]= "\x04""date";
+ sal_Char const sTIME[]= "\x04""time";
+ sal_Char const sDATA[]= "\x04""data";
+ sal_Char const sMERGEFLD[]= "\x0A""mergefield";
+ sal_Char const sIMPORT2[]= "\x0E""includepicture";
+ sal_Char const sHYPERLINK[]= "\x09""hyperlink";
+ sal_Char const sREF[]= "\x03""ref";
+ sal_Char const sPAGEREF[]= "\x07""pageref";
+ sal_Char const sEQ[]= "\x02""eq";
+ sal_Char const sINCLUDETEXT[]="\x0B""includetext";
struct _Dummy_RTF_FLD_TYPES
{
RTF_FLD_TYPES eFldType;
const sal_Char* pFldNm;
};
- __READONLY_DATA _Dummy_RTF_FLD_TYPES aFldNmArr[RTFFLD_INCLUDETEXT + 1] = {
+ const _Dummy_RTF_FLD_TYPES aFldNmArr[RTFFLD_INCLUDETEXT + 1] = {
{RTFFLD_TOC, sTOC},
{RTFFLD_IMPORT, sIMPORT},
{RTFFLD_INDEX, sINDEX},
@@ -144,14 +139,14 @@ static RTF_FLD_TYPES _WhichFld( String& rName, String& rNext )
String sNm( rName );
sNm = sNm.EraseLeadingChars().GetToken(0, ' ');
- ASSERT( sNm.Len(), "Feldname hat keine Laenge!" );
+ OSL_ENSURE( sNm.Len(), "Feldname hat keine Laenge!" );
if( !sNm.Len() )
return RTFFLD_UNKNOWN;
xub_StrLen nTokenStt = rName.Search( sNm );
sNm.ToLowerAscii();
- for (size_t n = 0; n < sizeof(aFldNmArr) / sizeof(aFldNmArr[0]); ++n)
+ for (size_t n = 0; n < SAL_N_ELEMENTS(aFldNmArr); ++n)
{
const sal_Char* pCmp = aFldNmArr[n].pFldNm;
int nLen = *pCmp++;
@@ -160,7 +155,6 @@ static RTF_FLD_TYPES _WhichFld( String& rName, String& rNext )
( !nFndPos || !isalpha(sNm.GetChar( static_cast< xub_StrLen >(nFndPos-1) )) ) &&
( nFndPos+nLen == sNm.Len() || !isalpha(sNm.GetChar( static_cast< xub_StrLen >(nFndPos+nLen) ) ) ) )
{
-// rName = sNm.Copy( nFndPos, nLen );
rName = rName.Copy( nFndPos, static_cast< xub_StrLen >(nLen) );
nFndPos += nTokenStt + static_cast< xub_StrLen >(nLen);
while( rNext.GetChar( nFndPos ) == ' ' ) ++nFndPos;
@@ -186,7 +180,7 @@ static sal_uInt16 CheckNumberFmtStr( const String& rNStr )
"\x04""PAGE" /* PAGEDESC */
};
- ASSERT(sizeof(aNumberTypeTab) / sizeof(sal_Char *)
+ OSL_ENSURE(sizeof(aNumberTypeTab) / sizeof(sal_Char *)
>= SVX_NUM_PAGEDESC - SVX_NUM_CHARS_UPPER_LETTER, "impossible");
for (sal_uInt16 n = SVX_NUM_CHARS_UPPER_LETTER; n <= SVX_NUM_PAGEDESC; ++n)
@@ -412,9 +406,6 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
break;
case RTFFLD_IMPORT:
{
-//JP 11.03.96: vertraegt sich nicht so ganz mit Internet!
-// if( STRING_NOTFOUND != ( nPos = aSaveStr.Search( '.' )))
-// aSaveStr.Erase( nPos+4 );
aSaveStr.EraseLeadingAndTrailingChars();
if( aSaveStr.Len() )
@@ -430,7 +421,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
INetURLObject(GetBaseURL()), aSaveStr,
URIHelper::GetMaybeFileHdl() );
}
-// SkipGroup(); // ueberlese den Rest
+
}
break;
@@ -491,7 +482,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
aSaveStr.SearchAndReplaceAscii( "AM", aEmptyStr );
aSaveStr.SearchAndReplaceAscii( "PM", aEmptyStr );
- // #117892# M.M. Put the word date and time formatter stuff in a common area
+ // Put the word date and time formatter stuff in a common area
// and get the rtf filter to use it
SwField *pFld = 0;
short nNumFmtType = NUMBERFORMAT_UNDEFINED;
@@ -507,7 +498,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
if( pFormatter )
{
- nFmtIdx = sw::ms::MSDateTimeFormatToSwFormat(aSaveStr, pFormatter, rLang, bHijri);
+ nFmtIdx = sw::ms::MSDateTimeFormatToSwFormat(aSaveStr, pFormatter, rLang, bHijri, rLang);
if (nFmtIdx)
nNumFmtType = pFormatter->GetType(nFmtIdx);
}
@@ -692,7 +683,6 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
case 1: aData.nJustificationCode = 3; break;
case 2: aData.nJustificationCode = 4; break;
case 4: aData.nJustificationCode = 2; break;
-// case 3:
default: aData.nJustificationCode = 0; break;
}
@@ -1053,7 +1043,7 @@ void SwRTFParser::ReadField()
{
const SwField *pFld = pFldAttr->GetFld().GetFld();
SwFieldType *pTyp = pFld ? pFld->GetTyp() : 0;
- ASSERT(pTyp->Which() == RES_USERFLD, "expected a user field");
+ OSL_ENSURE(pTyp->Which() == RES_USERFLD, "expected a user field");
if (pTyp->Which() == RES_USERFLD)
{
SwUserFieldType *pUsrTyp = (SwUserFieldType*)pTyp;
@@ -1101,7 +1091,7 @@ void SwRTFParser::ReadField()
{
if(nRet == RTFFLD_PAGEREF)
{
- // #17371 Nasty hack to get a pageref within a hyperlink working
+ // Nasty hack to get a pageref within a hyperlink working
sNestedFieldStr = sFieldStr;
}
@@ -1228,4 +1218,4 @@ INSINGLECHAR:
SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx
index 3679612db775..3d2adf049cdf 100644
--- a/sw/source/filter/rtf/rtffly.cxx
+++ b/sw/source/filter/rtf/rtffly.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <hintids.hxx>
-#include <tools/list.hxx>
#include <tools/cachestr.hxx>
#include <svtools/rtftoken.h>
#include <svl/itemiter.hxx>
@@ -65,15 +64,12 @@
#include <deque>
#include <map>
#include <utility>
-// --> OD 2004-06-30 #i27767#
+// #i27767#
#include <fmtwrapinfluenceonobjpos.hxx>
// <--
#include <editeng/brshitem.hxx>
#include <fmtfollowtextflow.hxx>
-// --> OD, FLR 2006-02-16 #131205#
#include "dcontact.hxx"
-// <--
-
using namespace ::com::sun::star;
@@ -237,17 +233,16 @@ void SwRTFParser::SetFlysInDoc()
{
SwFlySave* pFlySave = aFlyArr[ n ];
- ASSERT( !pFlySave->nSttNd.GetNode().FindFlyStartNode(),
+ OSL_ENSURE( !pFlySave->nSttNd.GetNode().FindFlyStartNode(),
"Content vom Fly steht in einem Fly" );
- ASSERT( pFlySave->nSttNd.GetIndex() <= pFlySave->nEndNd.GetIndex(),
+ OSL_ENSURE( pFlySave->nSttNd.GetIndex() <= pFlySave->nEndNd.GetIndex(),
"Fly hat falschen Bereich" );
- //JP 21.09.98: wenn ein DropCap ist, dann Text im Node belassen, am
- // Absatz das Absatz Attribut setzen. Ggfs noch die
- // FontSize zuruecksetzen, damit das DropCap nicht zu
- // gro? wird.
+ // wenn ein DropCap ist, dann Text im Node belassen,
+ // am Absatz das Absatz Attribut setzen. Ggfs noch die FontSize zuruecksetzen,
+ // damit das DropCap nicht zu gross wird.
if( pFlySave->nDropAnchor )
{
SwTxtNode* pSttNd = pFlySave->nSttNd.GetNode().GetTxtNode();
@@ -396,7 +391,7 @@ void SwRTFParser::SetFlysInDoc()
// patch from cmc for #i52542#
if (pSttNd->GetIndex() + 1 == pSttNd->EndOfSectionIndex())
{
- ASSERT(!this, "nothing in this frame, not legal");
+ OSL_ENSURE(!this, "nothing in this frame, not legal");
delete pFlySave;
continue;
}
@@ -411,7 +406,7 @@ void SwRTFParser::SetFlysInDoc()
// border or backgorund, then put it to the frame
// Not in our own RTF-Format!
// <<<<< DOES NOT MAKE SENSE TO ME (flr)
- // #102781#. Added support for transparent frames.
+ // Added support for transparent frames.
if( pSttNd->GetIndex() + 1 != pSttNd->EndOfSectionIndex() &&
!bSwPageDesc )
{
@@ -441,7 +436,7 @@ void SwRTFParser::SetFlysInDoc()
aTmpSet.Put(aBrush, RES_BACKGROUND);
}
}
- // #117914# Topic 6.
+ // Topic 6.
pFlySave->aFlySet.Put( aTmpSet );
if( pSrcNd && pSrcNd->HasSwAttrSet() )
{
@@ -455,17 +450,16 @@ void SwRTFParser::SetFlysInDoc()
if (FLY_AS_CHAR != rAnchor.GetAnchorId())
{
// korrigiere noch den Absatz, ist immer der vorhergehende !
- // JP 20.09.95: wenn es diesen gibt! (DocAnfang!)
+ // wenn es diesen gibt! (DocAnfang!)
- //JP 02.08.99: that is wrong. The anchor is ever the NEXT!
- //JP 05.08.99: there are an Bug in the ExportFilter which will
+ // that is wrong. The anchor is ever the NEXT!
+ // there are an Bug in the ExportFilter which will
// be fixed in the Version 517 - by SWG-Export
// the fly will be after the paragraph - but in RTF
// the flys will be before the paragraph.
if( !bSwPageDesc || 5430 < GetVersionNo() )
pFlySave->nSttNd++;
-// if( !pFlySave->nSttNd.GetNode().IsCntntNode() )
{
// Seitenumbrueche in den Bodybereich verschieben!
SwCntntNode* pSrcNd = aRg.aStart.GetNode().GetCntntNode();
@@ -495,9 +489,9 @@ void SwRTFParser::SetFlysInDoc()
for (myIter aIter = rDeque.begin(); aIter != aEnd; ++aIter)
{
aIter->second.SetAnchor(&aPos);
- // --> OD 2004-06-30 #i27767# - push on front to keep order
- // of objects for the correct object positioning
- //aPrevFmts[pCurrentAnchor].push_back(*aIter);
+ // #i27767# - push on front to keep order of objects
+ // for the correct object positioning
+ // aPrevFmts[pCurrentAnchor].push_back(*aIter);
aPrevFmts[pCurrentAnchor].push_front(*aIter);
}
rDeque.clear();
@@ -505,7 +499,6 @@ void SwRTFParser::SetFlysInDoc()
}
}
- // --> OD, FLR 2006-02-16 #131205#
// Create draw contact object, which also creates a <SdrObject> instance,
// in order to set the order number.
// The order number is assumed to be the order of the text flow.
@@ -560,12 +553,12 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
InsertPara();
// RTF-Defaults setzen:
- // --> OD 2004-06-24 #i27767#
+ // #i27767#
SwFmtAnchor aAnchor( FLY_AT_PARA );
-
SwFmtHoriOrient aHori( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME );
SwFmtVertOrient aVert( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME );
// <--
+
SvxFrameDirectionItem aFrmDir( FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR );
sal_uInt16 nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
@@ -852,7 +845,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
}
break;
-// JP 26.09.94: die Bindung an die Spalte gibt es nicht mehr !!
+// die Bindung an die Spalte gibt es nicht mehr !!
// case RTF_FLY_COLUMN:
}
break;
@@ -952,8 +945,8 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
pSet->Put( aHori );
pSet->Put( aVert );
- // --> OD 2004-06-30 #i27767# - set wrapping style influence
- // --> OD 2004-10-18 #i35017# - constant name has changed
+ // #i27767# - set wrapping style influence
+ // #i35017# - constant name has changed
pSet->Put( SwFmtWrapInfluenceOnObjPos(
text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ));
// <--
@@ -981,16 +974,6 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
nTmp *= USHRT_MAX;
nTmp /= nWidth;
pCol->SetWishWidth( sal_uInt16(nTmp) );
-/*
- JP 07.07.95: der Dialog kennt nur eine Breite fuer alle Spalten
- darum hier nicht weiter beachten
- nTmp = aColumns[ n+1 ];
- if( nTmp )
- pCol->SetRight( sal_uInt16(nTmp) );
- else
- pCol->SetRight( 0 );
- pCol->SetLeft( 0 );
-*/
}
}
pSet->Put( aCol );
@@ -1031,9 +1014,8 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
}
}
aFlyArr.Insert( pFlySave, nFlyArrCnt++ );
- // --> OD 2008-12-22 #i83368# - reset
+ // #i83368# - reset
mbReadCellWhileReadSwFly = false;
- // <--
}
}
@@ -1049,7 +1031,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
if( !IsPardTokenRead() )
{
- // #102781#. Added support for transparent frames.
+ // Added support for transparent frames.
if (nToken == RTF_CBPAT && nFlyArrCnt > 0)
{
sal_uInt16 _index=sal_uInt16(nTokenValue);
@@ -1113,8 +1095,6 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
pPam->GetPoint()->nNode == pFlySave->nSttNd &&
!pPam->GetPoint()->nContent.GetIndex() )
{
-// // dann erzeuge mindestens einen leeren TextNode
-// pDoc->AppendTxtNode(*pPam);
// dann zerstoere den FlySave wieder.
aFlyArr.DeleteAndDestroy( --nFlyArrCnt );
@@ -1247,11 +1227,8 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf,
// kennzeichen fuer Swg-Dokumente:
// (dann ist das FlyFmt fuer die Grafik!)
SwGrfNode * pGrfNd;
- // --> OD 2008-12-22 #i83368#
- // Assure that graphic node is enclosed by fly frame node.
-// if( bReadSwFly )
+ // #i83368# - Assure that graphic node is enclosed by fly frame node.
if ( bReadSwFly && !mbReadCellWhileReadSwFly )
- // <--
{
// erzeuge nur einen normalen GrafikNode und ersetze diesen gegen
// den vorhandenen Textnode
@@ -1277,8 +1254,7 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf,
else
{
// wenn normale RTF-Grafik, dann steht diese im Textfluss !
- SwAttrSet aFlySet( pDoc->GetAttrPool(), RES_OPAQUE, /*RES_OPAQUE,
- RES_VERT_ORIENT,*/ RES_ANCHOR );
+ SwAttrSet aFlySet( pDoc->GetAttrPool(), RES_OPAQUE, RES_ANCHOR );
const SwPosition* pPos = pPam->GetPoint();
SwFmtAnchor aAnchor( FLY_AS_CHAR );
@@ -1357,7 +1333,7 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
else
{
// von 100TH_MM nach TWIP umrechenen!
- // #117879# when \picwgoal resp \pichgoal are present, then use them.
+ // When \picwgoal resp \pichgoal are present, then use them.
// The values of \picwgoal and \picwgoal are already given in twips.
aSize.Width() = (pPicType->nGoalWidth?pPicType->nGoalWidth:(pPicType->nWidth*144)/254);
aSize.Height() = (pPicType->nGoalHeight?pPicType->nGoalHeight:(pPicType->nHeight*144)/254);
@@ -1390,8 +1366,7 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
}
}
- //JP 8.11.2001: bug 94450 - if no size exist, then the size is set by
- // the swapin of the graphic.
+ // if no size exist, then the size is set by the swapin of the graphic.
SwGrfNode* pGrfNd;
if( !aSize.Width() && !aSize.Height() &&
0 != (pGrfNd = (SwGrfNode*)rNd.GetGrfNode() ) && pGrfNd->IsGrfLink() )
@@ -1408,33 +1383,6 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
sal_Bool bChg = sal_False;
SwCropGrf aCrop;
-/*
- JP 28.07.99: Bug 67800 - no crop by MAC_QUICKDRAW. At time i dont know why
- it has been coded. But this has used for any
- RTF-File, but i dont found them.
- if( SvxRTFPictureType::MAC_QUICKDRAW == pPicType->eStyle )
- {
- // evt. ein wenig Croppen ??
- // IMMER auf 72 DPI bezogen, also 1pt == 20 Twip !!
- long nTmp = pPicType->nWidth * 20;
- if( nTmp != aSize.Width() )
- {
- // in der Breite (also rechts) croppen
- aCrop.Right() = nTmp - aSize.Width();
- aSize.Width() = nTmp;
- bChg = sal_True;
- }
-
- nTmp = pPicType->nHeight * 20;
- if( nTmp != aSize.Height() )
- {
- // in der Hoehe (also unten) croppen
- aCrop.Bottom() = nTmp - aSize.Height();
- aSize.Height() = nTmp;
- bChg = sal_True;
- }
- }
-*/
if( pPicType->nCropT )
{
aCrop.SetTop( pPicType->nCropT );
@@ -1467,7 +1415,7 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
void SwRTFParser::GetPageSize( Size& rSize )
{
- ASSERT(!maSegments.empty(), "not possible");
+ OSL_ENSURE(!maSegments.empty(), "not possible");
if (maSegments.empty())
{
rSize.Width() = 12240 - 1800 - 1800;
@@ -1649,4 +1597,4 @@ void SwRTFParser::ReadOLEData()
}
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx
index 32a33b5c2abd..5552ed7c5cb5 100644
--- a/sw/source/filter/rtf/rtfnum.cxx
+++ b/sw/source/filter/rtf/rtfnum.cxx
@@ -1,29 +1,4 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
@@ -43,6 +18,7 @@
#include <editeng/colritem.hxx>
#include <editeng/udlnitem.hxx>
#include <editeng/wrlmitem.hxx>
+#include <editeng/numitem.hxx>
#include <shellio.hxx>
#include <fltini.hxx>
#include <swtypes.hxx>
@@ -54,9 +30,7 @@
#include <charfmt.hxx>
#include <charatr.hxx>
#include <paratr.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <numrule.hxx>
#define RTF_NUMRULE_NAME "RTF_Num"
@@ -68,7 +42,7 @@ void lcl_ExpandNumFmts( SwNumRule& rRule )
if( !rRule.GetNumFmt( n ) )
{
SwNumFmt aNumFmt( rRule.Get( 0 ));
- aNumFmt.SetAbsLSpace( aNumFmt.GetAbsLSpace() * ( n + 1 ) );
+ aNumFmt.SetIndentAt( aNumFmt.GetIndentAt() * ( n + 1 ) );
rRule.Set( n, aNumFmt );
}
}
@@ -95,13 +69,13 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, sal_uInt8 nNumLvl )
int nLvlTxtLevel = 0, nLvlNumberLevel = 0;
String sLvlText, sLvlNumber;
SwNumFmt* pCurNumFmt;
- String aStringFollow = aEmptyStr;
+ SvxNumberFormat::SvxNumLabelFollowedBy eFollowedBy = SvxNumberFormat::NOTHING;
if( MAXLEVEL >= nNumLvl )
{
pCurNumFmt = (SwNumFmt*)rRule.GetNumFmt( nNumLvl );
- pCurNumFmt->SetAbsLSpace( 0 );
- pCurNumFmt->SetFirstLineOffset( 0 );
+ pCurNumFmt->SetIndentAt( 0 );
+ pCurNumFmt->SetFirstLineIndent( 0 );
}
else
pCurNumFmt = 0;
@@ -137,9 +111,6 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, sal_uInt8 nNumLvl )
// Unknown und alle bekannten nicht ausgewerteten Gruppen
// sofort ueberspringen
else if( RTF_UNKNOWNCONTROL != ( nToken = GetNextToken() ))
-// RTF_PANOSE != nToken && RTF_FALT != nToken &&
-// RTF_FALT != nToken && RTF_FNAME != nToken &&
-// RTF_FONTEMB != nToken && RTF_FONTFILE != nToken )
nToken = SkipToken( -2 );
else
{
@@ -206,17 +177,16 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, sal_uInt8 nNumLvl )
break;
case RTF_LEVELFOLLOW:
- /* removed; waiting for swnum02 to be integrated!
+ /* removed; waiting for swnum02 to be integrated! */
switch (nTokenValue)
{
case 0:
- aStringFollow=String('\t');
+ eFollowedBy = SvxNumberFormat::LISTTAB;
break;
case 1:
- aStringFollow=String(' ');
+ eFollowedBy = SvxNumberFormat::SPACE;
break;
}
- */
break;
case RTF_LEVELOLD:
@@ -240,8 +210,8 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, sal_uInt8 nNumLvl )
// and put the current "LRSpace" into the set
{
SvxLRSpaceItem aLR( RES_LR_SPACE );
- aLR.SetTxtLeft( pCurNumFmt->GetAbsLSpace() );
- aLR.SetTxtFirstLineOfst(pCurNumFmt->GetFirstLineOffset());
+ aLR.SetTxtLeft( pCurNumFmt->GetIndentAt() );
+ aLR.SetTxtFirstLineOfst(pCurNumFmt->GetFirstLineIndent());
aSet.Put( aLR );
}
@@ -260,8 +230,9 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, sal_uInt8 nNumLvl )
sal_False, &pItem ))
{
const SvxLRSpaceItem& rLR = *(SvxLRSpaceItem*)pItem;
- pCurNumFmt->SetAbsLSpace( static_cast< short >(rLR.GetTxtLeft()) );
- pCurNumFmt->SetFirstLineOffset( rLR.GetTxtFirstLineOfst());
+ pCurNumFmt->SetListtabPos( rLR.GetTxtLeft( ) );
+ pCurNumFmt->SetIndentAt( rLR.GetTxtLeft() );
+ pCurNumFmt->SetFirstLineIndent( rLR.GetTxtFirstLineOfst());
}
// dann aus der Vorlage den Font holen
@@ -302,16 +273,13 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, sal_uInt8 nNumLvl )
pCurNumFmt->SetSuffix( sLvlText );
}
- String newSuffix=pCurNumFmt->GetSuffix();
- newSuffix+=aStringFollow;
- pCurNumFmt->SetSuffix(newSuffix);
- /* removed; waiting for swnum02 to be integrated!
- if (aStringFollow.GetChar(0)=='\t' && !pCurNumFmt->IsItemize())
+ /* removed; waiting for swnum02 to be integrated!*/
+ pCurNumFmt->SetLabelFollowedBy( eFollowedBy );
+ if (eFollowedBy == SvxNumberFormat::LISTTAB && !pCurNumFmt->IsItemize())
{
- pCurNumFmt->SetAbsLSpace(0);
- pCurNumFmt->SetFirstLineOffset(0);
+ pCurNumFmt->SetIndentAt(0);
+ pCurNumFmt->SetFirstLineIndent(0);
}
- */
}
SkipToken( -1 );
@@ -352,9 +320,6 @@ void SwRTFParser::ReadListTable()
// Unknown und alle bekannten nicht ausgewerteten Gruppen
// sofort ueberspringen
else if( RTF_UNKNOWNCONTROL != ( nToken = GetNextToken() ))
-// RTF_PANOSE != nToken && RTF_FALT != nToken &&
-// RTF_FALT != nToken && RTF_FNAME != nToken &&
-// RTF_FONTEMB != nToken && RTF_FONTFILE != nToken )
nToken = SkipToken( -2 );
else
{
@@ -376,12 +341,12 @@ void SwRTFParser::ReadListTable()
String sTmp( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( RTF_NUMRULE_NAME " 1" )));
- aEntry.nListDocPos = pDoc->MakeNumRule( sTmp );
+ aEntry.nListDocPos = pDoc->MakeNumRule( sTmp, 0, sal_False, SvxNumberFormat::LABEL_ALIGNMENT );
pCurRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ];
- // --> OD 2008-07-08 #i91400#
+ // #i91400#
pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, sal_False ),
*pDoc );
- // <--
+
pCurRule->SetAutoRule( sal_False );
nNumLvl = (sal_uInt8)-1;
}
@@ -393,15 +358,14 @@ void SwRTFParser::ReadListTable()
case RTF_LISTRESTARTHDN:
break;
case RTF_LISTNAME:
- if (nNextCh=='}') break; // #118989# empty listnames
+ if (nNextCh=='}') break; // empty listnames
if( RTF_TEXTTOKEN == GetNextToken() )
{
String sTmp( DelCharAtEnd( aToken, ';' ));
if( sTmp.Len() && !pDoc->FindNumRulePtr( sTmp ))
{
- // --> OD 2008-07-08 #i91400#
+ // #i91400#
pCurRule->SetName( sTmp, *pDoc );
- // <--
}
}
SkipGroup();
@@ -580,10 +544,10 @@ void SwRTFParser::ReadListOverrideTable()
RTL_CONSTASCII_STRINGPARAM( RTF_NUMRULE_NAME " 1" )));
aEntry.nListDocPos = pDoc->MakeNumRule( sTmp, pRule );
pRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ];
- // --> OD 2008-07-08 #i91400#
+ // #i91400#
pRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, sal_False ),
*pDoc );
- // <--
+
pRule->SetAutoRule( sal_False );
nNumLvl = (sal_uInt8)-1;
aListArr.push_back( aEntry );
@@ -634,17 +598,6 @@ void SwRTFParser::ReadListOverrideTable()
const SwNumRule *pNumRule = 0;
SvxRTFStyleType* pStyle = GetStyleTbl().First();
do {
- // --> OD 2007-12-17 #151213#
- // suppress deletion of outline list style.
- // refactoring of code: no assignments in if-condition
-// if( MAXLEVEL > pStyle->nOutlineNo &&
-// 0 != ( pColl = aTxtCollTbl.Get( (sal_uInt16)GetStyleTbl().
-// GetCurKey() )) &&
-// SFX_ITEM_SET == pColl->GetItemState( RES_PARATR_NUMRULE,
-// sal_False, &pItem ) &&
-// USHRT_MAX != (nRulePos = pDoc->FindNumRule(
-// ((SwNumRuleItem*)pItem)->GetValue() )) &&
-// (pNumRule = pDoc->GetNumRuleTbl()[ nRulePos ])->IsAutoRule() )
if ( MAXLEVEL > pStyle->nOutlineNo )
{
pColl = aTxtCollTbl.Get( (sal_uInt16)GetStyleTbl().GetCurKey() );
@@ -727,10 +680,10 @@ void SwRTFParser::RemoveUnusedNumRule( SwNumRule* pRule )
}
pDoc->DelNumRule( pRule->GetName() );
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
{
- ASSERT( pRule, "NumRulePointer 0 kann nicht geloescht werden" );
+ OSL_ENSURE( pRule, "NumRulePointer 0 kann nicht geloescht werden" );
}
#endif
}
@@ -845,9 +798,9 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
aEntry.nListNo = nListNo;
aListArr.push_back( aEntry );
pCurRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ];
- // --> OD 2008-07-08 #i91400#
+ // #i91400#
pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, sal_False ), *pDoc );
- // <--
+
pCurRule->SetAutoRule( sal_False );
pCurRule->SetContinusNum( bContinus );
}
@@ -1007,8 +960,8 @@ NUMATTR_SETUNDERLINE:
case RTF_PNINDENT:
if( 0 > short( nTokenValue ) )
nTokenValue = - (short)nTokenValue;
- pCurNumFmt->SetFirstLineOffset( - short( nTokenValue ));
- pCurNumFmt->SetAbsLSpace( (nLevel + 1 ) * sal_uInt16( nTokenValue ));
+ pCurNumFmt->SetFirstLineIndent( - nTokenValue );
+ pCurNumFmt->SetIndentAt( (nLevel + 1 ) * nTokenValue );
break;
case RTF_PNSP:
pCurNumFmt->SetCharTextDistance( sal_uInt16( nTokenValue ));
@@ -1100,28 +1053,4 @@ NUMATTR_SETUNDERLINE:
return pCurRule;
}
-
-/* */
-
-// dann noch die Ausgabe-Funktionen (nur fuer WinWord 97)
-
-sal_Bool lcl_IsExportNumRule( const SwNumRule& rRule, sal_uInt8* pEnd = 0 )
-{
- sal_uInt8 nEnd = MAXLEVEL;
- while( nEnd-- && !rRule.GetNumFmt( nEnd ))
- ;
- ++nEnd;
-
- const SwNumFmt* pNFmt;
- sal_uInt8 nLvl;
-
- for( nLvl = 0; nLvl < nEnd; ++nLvl )
- if( SVX_NUM_NUMBER_NONE != ( pNFmt = &rRule.Get( nLvl ))
- ->GetNumberingType() || pNFmt->GetPrefix().Len() ||
- (pNFmt->GetSuffix().Len() && pNFmt->GetSuffix() != aDotStr ))
- break;
-
- if( pEnd )
- *pEnd = nEnd;
- return nLvl != nEnd;
-}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx
index 8bc859c3d320..d7dff9ab154c 100644
--- a/sw/source/filter/rtf/rtftbl.cxx
+++ b/sw/source/filter/rtf/rtftbl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,11 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-#ifdef WTC
-#define private public
-#endif
#include <hintids.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/boxitem.hxx>
@@ -50,6 +47,7 @@
#include <tblenum.hxx>
#include <frmatr.hxx>
#include <fmtrowsplt.hxx>
+#include <vector>
using namespace ::com::sun::star;
@@ -115,7 +113,7 @@ static void SetRowBorder(SfxItemSet& rSet, const Row &rRow)
void rtfSections::PrependedInlineNode(const SwPosition &rPos,
const SwNode &rNode)
{
- ASSERT(!mrReader.IsNewDoc() || !maSegments.empty(),
+ OSL_ENSURE(!mrReader.IsNewDoc() || !maSegments.empty(),
"should not be possible, must be at least one segment in a new document");
if ((!maSegments.empty()) && (maSegments.back().maStart == rPos.nNode))
maSegments.back().maStart = SwNodeIndex(rNode);
@@ -165,7 +163,7 @@ void SwRTFParser::ReadTable( int nToken )
enum Limits {eMAXCELLS=64000};
- SvBools aMergeBackup(aMergeBoxes);
+ std::vector<bool> aMergeBackup(aMergeBoxes);
// kein TROWD aber ein TabellenToken -> zwischen TROWD und Tab.Token
// waren andere Zeichen (siehe Bug 27445.rtf)
@@ -176,7 +174,7 @@ void SwRTFParser::ReadTable( int nToken )
// Flag for delete merged boxes
aMergeBoxes.clear();
- aMergeBoxes.push_back( (sal_Bool)sal_False );
+ aMergeBoxes.push_back(false);
m_nCurrentBox = 0;
// wenn schon in einer Tabellen, dann splitte oder benutze
@@ -220,7 +218,6 @@ void SwRTFParser::ReadTable( int nToken )
sal_Int16 eVerOrient = text::VertOrientation::NONE;
long nLineHeight = 0;
- size_t nBoxCnt = aMergeBoxes.size()-1;
SwBoxFrmFmts aBoxFmts;
SwTableBoxFmt* pBoxFmt = pDoc->MakeTableBoxFmt();
SvxFrameDirection eDir = FRMDIR_HORI_LEFT_TOP;
@@ -287,7 +284,7 @@ void SwRTFParser::ReadTable( int nToken )
case RTF_CLMRG:
// would crash later on reading \cellx (#i112657#):
// the first cell cannot be merged with earlier ones.
- if (nBoxCnt != 0)
+ if (aMergeBoxes.size() > 1)
{
aMergeBoxes.back() = sal_True;
}
@@ -316,9 +313,9 @@ void SwRTFParser::ReadTable( int nToken )
else
pFmt = aBoxFmts[ aBoxFmts.Count()-1 ];
- // --> OD 2007-01-25 #i73790# - method renamed
+ // #i73790# - method renamed
pBoxFmt->ResetAllFmtAttr();
- // <--
+
nSize += pFmt->GetFrmSize().GetWidth();
}
else
@@ -337,8 +334,7 @@ void SwRTFParser::ReadTable( int nToken )
nSize = COL_DFLT_WIDTH;
pFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nSize, 0 ));
nTblSz = nTokenValue;
- aMergeBoxes.push_back( (sal_Bool)sal_False );
- ++nBoxCnt;
+ aMergeBoxes.push_back(sal_False);
SvxBoxItem aBox(pFmt->GetBox());
@@ -355,73 +351,6 @@ void SwRTFParser::ReadTable( int nToken )
aBox.SetDistance( static_cast< sal_uInt16 >(nTopCellPad), BOX_LINE_LEFT);
- /*#106415# The Cell Borders are now balanced on import to
- improve the layout of tables.
- */
-/*
- if ( aBoxFmts.Count()>1)
- {
-
- SwTableBoxFmt* prevpFmt = aBoxFmts[ aBoxFmts.Count()-2 ];
- SvxBoxItem prevaBox(prevpFmt->GetBox());
- sal_uInt16 prevWidthRight=0;
- sal_uInt16 currWidthLeft=0;
- bool bDoubleLine=false;
- const SvxBorderLine* brdrline ;
- const Color* pPrevRightColor;
- if(prevaBox.GetRight())
- {
- brdrline=prevaBox.GetRight();
- prevWidthRight = brdrline->GetOutWidth();
- pPrevRightColor = &brdrline->GetColor();
- if(brdrline->GetInWidth())
- bDoubleLine=true;
- }
- if(aBox.GetLeft())
- {
- brdrline=aBox.GetLeft();
- currWidthLeft = brdrline->GetOutWidth();
- if(brdrline->GetInWidth())
- bDoubleLine=true;
- }
-
- if((currWidthLeft >0 || prevWidthRight >0) &&
- !bDoubleLine)
- {
- sal_uInt16 newBorderWidth=(currWidthLeft+prevWidthRight)/2 ;
- if(newBorderWidth /2 ==DEF_LINE_WIDTH_0 )
- {
- newBorderWidth =DEF_LINE_WIDTH_0;
- }
- else if(newBorderWidth /2 >=(DEF_LINE_WIDTH_4-DEF_LINE_WIDTH_3))
- {
- newBorderWidth =DEF_LINE_WIDTH_4;
- }
- else if(newBorderWidth /2 >=(DEF_LINE_WIDTH_3-DEF_LINE_WIDTH_2))
- {
- newBorderWidth =DEF_LINE_WIDTH_3;
- }
- else if(newBorderWidth /2>=(DEF_LINE_WIDTH_2-DEF_LINE_WIDTH_1))
- {
- newBorderWidth =DEF_LINE_WIDTH_2;
- }
- else if(newBorderWidth /2>=(DEF_LINE_WIDTH_1 - DEF_LINE_WIDTH_0) )
- {
- newBorderWidth =DEF_LINE_WIDTH_1;
- }
- else
- {
- newBorderWidth =DEF_LINE_WIDTH_0;
- }
- const SvxBorderLine newbrdrline(pPrevRightColor, newBorderWidth,0,0);
- aBox.SetLine(&newbrdrline,BOX_LINE_LEFT);
- prevaBox.SetLine(&newbrdrline,BOX_LINE_RIGHT);
- prevpFmt->SetAttr(prevaBox);
- }
-
- }
-*/
-
pFmt->SetFmtAttr(aBox);
bUseLeftCellPad = false;
@@ -432,7 +361,7 @@ void SwRTFParser::ReadTable( int nToken )
break;
case RTF_TRGAPH:
- //$flr bug #117887#: RTF: wrong internal table cell margin imported (A13)
+ //$flr bug: RTF: wrong internal table cell margin imported (A13)
aRow.mnBrdDist = (nTokenValue>0?(sal_uInt16)nTokenValue:0); // filter out negative values of \trgaph
break;
@@ -441,7 +370,6 @@ void SwRTFParser::ReadTable( int nToken )
case RTF_TRQC: eAdjust = text::HoriOrientation::CENTER; break;
// mit text::VertOrientation::TOP kommt der Dialog nicht klar!
- // Bug #65126#
case RTF_CLVERTALT: eVerOrient = text::VertOrientation::NONE; break;
case RTF_CLVERTALC: eVerOrient = text::VertOrientation::CENTER; break;
@@ -526,10 +454,9 @@ void SwRTFParser::ReadTable( int nToken )
delete pBoxFmt;
// It has been recognized as not single box
- if ((m_nCurrentBox == nBoxCnt) || ( bReadNewCell && !pTableNode ))
+ if( m_nCurrentBox == aMergeBoxes.size()-1 || ( bReadNewCell && !pTableNode ))
{
- aMergeBoxes = aMergeBackup;
- SkipToken( -1 ); // go back to the last valid
+ aMergeBoxes.insert(aMergeBoxes.begin(), aMergeBackup.begin(), aMergeBackup.end());
return;
}
@@ -652,7 +579,7 @@ void SwRTFParser::ReadTable( int nToken )
bNewTbl = sal_False;
{
- // JP 13.08.98: TabellenUmrandungen optimieren - Bug 53525
+ //TabellenUmrandungen optimieren
void* p = pFmt;
aTblFmts.Insert( p, aTblFmts.Count() );
}
@@ -719,7 +646,7 @@ void SwRTFParser::ReadTable( int nToken )
pDoc->InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 0 ),
*pPam->GetPoint(), 1, 1, eAdjust, 0, 0, sal_False, sal_False );
- bContainsTablePara=true; //#117881#
+ bContainsTablePara=true;
pTableNode = pTable ? pTable->GetTableNode() : 0;
if (pTableNode)
@@ -752,7 +679,7 @@ void SwRTFParser::ReadTable( int nToken )
pOldTblNd = pTableNode;
{
- // JP 13.08.98: TabellenUmrandungen optimieren - Bug 53525
+ // TabellenUmrandungen optimieren
void* p = pFmt;
aTblFmts.Insert( p, aTblFmts.Count() );
}
@@ -788,7 +715,7 @@ void SwRTFParser::ReadTable( int nToken )
aBoxFmts[0]->Add( pBox );
SwTxtNode* pTNd = pDoc->GetNodes()[ pBox->GetSttIdx()+1 ]
->GetTxtNode();
- ASSERT( pTNd, "wo ist der Textnode dieser Box?" );
+ OSL_ENSURE( pTNd, "wo ist der Textnode dieser Box?" );
pTNd->ChgFmtColl( pColl );
++nStt;
nRowsToRepeat=0;
@@ -834,7 +761,7 @@ void SwRTFParser::ReadTable( int nToken )
}
}
- ASSERT(!bFailure, "RTF Table failure");
+ OSL_ENSURE(!bFailure, "RTF Table failure");
if (bFailure)
{
SkipToken( -1 ); // zum Letzen gueltigen zurueck
@@ -843,7 +770,7 @@ void SwRTFParser::ReadTable( int nToken )
//It might be that there was content at this point which is not already in
//a table, but which is being followed by properties to place it into the
- //table. e.g. #109199#. If this is the case then move the para/char
+ //table. If this is the case then move the para/char
//properties inside the table, and move any content of that paragraph into
//the table
bool bInTable = aRg.GetPoint()->nNode.GetNode().FindTableNode();
@@ -880,7 +807,7 @@ void SwRTFParser::GotoNextBox()
{
nInsTblRow = USHRT_MAX;
- ASSERT( pTableNode, "Kein Tabellennode, dann auch keine Box" );
+ OSL_ENSURE( pTableNode, "Kein Tabellennode, dann auch keine Box" );
if (!pTableNode)
return;
@@ -890,11 +817,8 @@ void SwRTFParser::GotoNextBox()
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
SwTableBox* pBox = rBoxes[ rBoxes.Count()-1 ];
- if (++m_nCurrentBox >= aMergeBoxes.size())
- {
- OSL_ENSURE(aMergeBoxes.size() < SAL_MAX_UINT16, "too many boxes?");
- m_nCurrentBox = static_cast<sal_uInt16>(aMergeBoxes.size()-1);
- }
+ if( ++m_nCurrentBox >= aMergeBoxes.size() )
+ m_nCurrentBox = aMergeBoxes.size()-1;
if (!aMergeBoxes[ m_nCurrentBox ])
{
@@ -914,8 +838,7 @@ void SwRTFParser::GotoNextBox()
}
}
- if (bMove &&
- (static_cast<size_t>(m_nCurrentBox + 1) == aMergeBoxes.size()))
+ if( bMove && m_nCurrentBox + 1U == aMergeBoxes.size() )
// dann hinter die Tabelle
pPam->Move( fnMoveForward, fnGoNode );
}
@@ -973,7 +896,6 @@ void SwRTFParser::NewTblLine()
pLns = &pTableNode->GetTable().GetTabLines();
}
else
-// pDoc->InsertRow( aBoxes );
pTableNode->GetTable().AppendRow( pDoc );
pBox = (*pLns)[ pLns->Count()-1 ]->GetTabBoxes()[0];
@@ -1031,4 +953,4 @@ void SwRTFParser::CheckInsNewTblLine()
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index e52161de98f2..ee40c39471ee 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <hintids.hxx>
#include <stack>
@@ -106,7 +106,6 @@
#include <editeng/outlobj.hxx>
#include <editeng/paperinf.hxx>
-#include <tools/stream.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/range/b2drange.hxx>
@@ -137,11 +136,11 @@ sal_uLong RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, con
{
if( !pStrm )
{
- ASSERT( sal_False, "RTF-Read ohne Stream" );
+ OSL_ENSURE( sal_False, "RTF-Read ohne Stream" );
return ERR_SWG_READ_ERROR;
}
- //JP 18.01.96: Alle Ueberschriften sind normalerweise ohne
+ // Alle Ueberschriften sind normalerweise ohne
// Kapitelnummer. Darum hier explizit abschalten
// weil das Default jetzt wieder auf AN ist.
if( !bInsertMode )
@@ -214,9 +213,8 @@ SwRTFParser::SwRTFParser(SwDoc* pD,
nInsTblRow(USHRT_MAX),
nNewNumSectDef(USHRT_MAX),
nRowsToRepeat(0),
- // --> OD 2008-12-22 #i83368#
- mbReadCellWhileReadSwFly( false ),
- // <--
+ mbReadCellWhileReadSwFly( false ), // #i83368#
+
bTrowdRead(0),
nReadFlyDepth(0),
nZOrder(0)
@@ -297,11 +295,11 @@ void SwRTFParser::Continue( int nToken )
pDoc->set(IDocumentSettingAccess::USE_FORMER_OBJECT_POS, false);
pDoc->set(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING, false);
pDoc->set(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION, true);
- pDoc->set(IDocumentSettingAccess::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT, false); // --> FME 2005-08-11 #i53199#
- // --> FME 2006-02-10 #131283#
+ pDoc->set(IDocumentSettingAccess::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT, false); // #i53199#
+
pDoc->set(IDocumentSettingAccess::TABLE_ROW_KEEP, true);
pDoc->set(IDocumentSettingAccess::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION, true);
-
+ pDoc->set(IDocumentSettingAccess::INVERT_BORDER_SPACING, true);
//
// COMPATIBILITY FLAGS END
//
@@ -323,7 +321,7 @@ void SwRTFParser::Continue( int nToken )
pPam->Move( fnMoveBackward );
- // #106634# split any redline over the insertion point
+ // split any redline over the insertion point
aInsertionRangePam.SetMark();
*aInsertionRangePam.GetPoint() = *pPam->GetPoint();
aInsertionRangePam.Move( fnMoveBackward );
@@ -379,12 +377,12 @@ void SwRTFParser::Continue( int nToken )
pPam->GetPoint()->nContent.Assign( pTxtNode, nStt );
}
-#ifdef DBG_UTIL
-// !!! sollte nicht moeglich sein, oder ??
-ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_True ).nNode.GetIndex(),
- "Pam.Bound1 steht noch im Node" );
-ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_False ).nNode.GetIndex(),
- "Pam.Bound2 steht noch im Node" );
+#if OSL_DEBUG_LEVEL > 1
+ // !!! sollte nicht moeglich sein, oder ??
+ OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( TRUE ).nNode.GetIndex(),
+ "Pam.Bound1 steht noch im Node" );
+ OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_False ).nNode.GetIndex(),
+ "Pam.Bound2 steht noch im Node" );
if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_True ).nNode.GetIndex() )
{
@@ -414,8 +412,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_False ).nNode.GetIndex() )
// den letzen Bereich wieder zumachen
if( pRegionEndIdx )
{
- // JP 06.01.00: Task 71411 - the last section in WW are not a
- // balanced Section.
+ // the last section in WW are not a balanced Section.
if( !GetVersionNo() )
{
SwSectionNode* pSectNd = pRegionEndIdx->GetNode().
@@ -435,7 +432,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_False ).nNode.GetIndex() )
maSegments.InsertSegments(IsNewDoc());
UpdatePageDescs(*pDoc, nPageDescOffset);
//$flr folloing garbe collecting code has been moved from the previous procedure
- // UpdatePageDescs to here in order to fix bug #117882#
+ // UpdatePageDescs to here in order to fix a bug
rtfSections::myrDummyIter aDEnd = maSegments.maDummyPageNos.rend();
for (rtfSections::myrDummyIter aI = maSegments.maDummyPageNos.rbegin(); aI != aDEnd; ++aI)
pDoc->DelPageDesc(*aI);
@@ -454,8 +451,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_False ).nNode.GetIndex() )
SwNode* pTmp = pDoc->GetNodes()[ nNodeIdx -1 ];
if( pTmp->IsCntntNode() && !pTmp->FindTableNode() )
{
- // --> FME 2006-02-15 #131200# Do not delete the paragraph
- // if it has anchored objects:
+ // Do not delete the paragraph if it has anchored objects:
bool bAnchoredObjs = false;
const SwSpzFrmFmts* pFrmFmts = pDoc->GetSpzFrmFmts();
if ( pFrmFmts && pFrmFmts->Count() )
@@ -746,10 +742,7 @@ void rtfSections::SetSegmentToPageDesc(const rtfSection &rSection,
{
SwPageDesc &rPage = bTitlePage ? *rSection.mpTitlePage : *rSection.mpPage;
-// SetNumberingType(rSection, rPage);
-
SwFrmFmt &rFmt = rPage.GetMaster();
-// mrReader.SetDocumentGrid(rFmt, rSection);
wwULSpaceData aULData;
GetPageULData(rSection, bTitlePage, aULData);
@@ -789,20 +782,16 @@ void rtfSections::MoveFrom(SwPageDesc &rFrom, SwPageDesc &rDest)
SwFrmFmt &rFromMaster = rFrom.GetMaster();
rDestMaster.SetFmtAttr(rFromMaster.GetHeader());
rDestMaster.SetFmtAttr(rFromMaster.GetFooter());
- //rFromMaster.SetAttr(SwFmtHeader()); //$flr uncommented due to bug fix #117882#
- //rFromMaster.SetAttr(SwFmtFooter()); //$flr uncommented due to bug fix #117882#
SwFrmFmt &rDestLeft = rDest.GetLeft();
SwFrmFmt &rFromLeft = rFrom.GetLeft();
rDestLeft.SetFmtAttr(rFromLeft.GetHeader());
rDestLeft.SetFmtAttr(rFromLeft.GetFooter());
- //rFromLeft.SetAttr(SwFmtHeader()); //$flr uncommented due to bug fix #117882#
- //rFromLeft.SetAttr(SwFmtFooter()); //$flr uncommented due to bug fix #117882#
}
void rtfSections::SetHdFt(rtfSection &rSection)
{
- ASSERT(rSection.mpPage, "makes no sense to call without a main page");
+ OSL_ENSURE(rSection.mpPage, "makes no sense to call without a main page");
if (rSection.mpPage && rSection.maPageInfo.mpPageHdFt)
{
if (rSection.maPageInfo.mbPageHdFtUsed)
@@ -845,7 +834,7 @@ SwSectionFmt *rtfSections::InsertSection(SwPaM& rMyPaM, rtfSection &rSection)
rSection.mpSection =
mrReader.pDoc->InsertSwSection( rMyPaM, aSectionData, 0, &aSet );
- ASSERT(rSection.mpSection, "section not inserted!");
+ OSL_ENSURE(rSection.mpSection, "section not inserted!");
if (!rSection.mpSection)
return 0;
@@ -858,7 +847,7 @@ SwSectionFmt *rtfSections::InsertSection(SwPaM& rMyPaM, rtfSection &rSection)
break;
}
- ASSERT(pPage, "no page outside this section!");
+ OSL_ENSURE(pPage, "no page outside this section!");
if (!pPage)
pPage = &mrReader.pDoc->_GetPageDesc(0);
@@ -874,7 +863,7 @@ SwSectionFmt *rtfSections::InsertSection(SwPaM& rMyPaM, rtfSection &rSection)
long nRight = rLR.GetRight();
SwSectionFmt *pFmt = rSection.mpSection->GetFmt();
- ASSERT(pFmt, "impossible");
+ OSL_ENSURE(pFmt, "impossible");
if (!pFmt)
return 0;
SetCols(*pFmt, rSection, (sal_uInt16)(nWidth - nLeft - nRight) );
@@ -928,11 +917,11 @@ void rtfSections::InsertSegments(bool bNewDoc)
else
{
sal_uInt16 nPos = mrReader.pDoc->MakePageDesc(
- ViewShell::GetShellRes()->GetPageDescName(nDesc)
+ ViewShell::GetShellRes()->GetPageDescName(nDesc, ShellResource::NORMAL_PAGE)
, 0, false);
aIter->mpTitlePage = &mrReader.pDoc->_GetPageDesc(nPos);
}
- ASSERT(aIter->mpTitlePage, "no page!");
+ OSL_ENSURE(aIter->mpTitlePage, "no page!");
if (!aIter->mpTitlePage)
continue;
@@ -950,11 +939,11 @@ void rtfSections::InsertSegments(bool bNewDoc)
{
sal_uInt16 nPos = mrReader.pDoc->MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(nDesc,
- false, aIter->HasTitlePage()),
+ aIter->HasTitlePage() ? ShellResource::FIRST_PAGE : ShellResource::NORMAL_PAGE),
aIter->mpTitlePage, false);
aIter->mpPage = &mrReader.pDoc->_GetPageDesc(nPos);
}
- ASSERT(aIter->mpPage, "no page!");
+ OSL_ENSURE(aIter->mpPage, "no page!");
if (!aIter->mpPage)
continue;
@@ -984,7 +973,7 @@ void rtfSections::InsertSegments(bool bNewDoc)
SwTable& rTable =
aIter->maStart.GetNode().GetTableNode()->GetTable();
SwFrmFmt* pApply = rTable.GetFrmFmt();
- ASSERT(pApply, "impossible");
+ OSL_ENSURE(pApply, "impossible");
if (pApply)
pApply->SetFmtAttr(aPgDesc);
}
@@ -1079,7 +1068,7 @@ void InsertedTablesManager::DelAndMakeTblFrms()
// exitiert schon ein Layout, dann muss an dieser Tabelle die BoxFrames
// neu erzeugt
SwTableNode *pTable = aIter->first->GetTableNode();
- ASSERT(pTable, "Why no expected table");
+ OSL_ENSURE(pTable, "Why no expected table");
if (pTable)
{
SwFrmFmt * pFrmFmt = pTable->GetTable().GetFrmFmt();
@@ -1184,7 +1173,7 @@ void SwRTFParser::ReadShpTxt(String& s)
}
/*
- * #127429#. Very basic support for the "Buchhalternase".
+ * Very basic support for the "Buchhalternase".
*/
void SwRTFParser::ReadDrawingObject()
{
@@ -1239,15 +1228,7 @@ void SwRTFParser::ReadDrawingObject()
}
}
SkipToken(-1);
- /*
- const Point aPointC1( 0, 0 );
- const Point aPointC2( 100, 200 );
- const Point aPointC3( 300, 400 );
- XPolygon aPolygonC(3);
- aPolygonC[0] = aPointC1;
- aPolygonC[1] = aPointC2;
- aPolygonC[2] = aPointC3;
- */
+
if(bPolygonActive && aPolygon.count())
{
SdrPathObj* pStroke = new SdrPathObj(OBJ_PLIN, ::basegfx::B2DPolyPolygon(aPolygon));
@@ -1258,52 +1239,13 @@ void SwRTFParser::ReadDrawingObject()
aFlySet.Put( aSur );
SwFmtFollowTextFlow aFollowTextFlow( sal_False );
aFlySet.Put( aFollowTextFlow );
- /*
- sw::util::SetLayer aSetLayer(*pDoc);
- aSetLayer.SendObjectToHeaven(*pStroke);
- */
+
SwFmtAnchor aAnchor( FLY_AT_PARA );
aAnchor.SetAnchor( pPam->GetPoint() );
aFlySet.Put( aAnchor );
- /*
- text::RelOrientation::FRAME, // Absatz inkl. Raender
- text::RelOrientation::PRINT_AREA, // Absatz ohne Raender
- text::RelOrientation::CHAR, // an einem Zeichen
- text::RelOrientation::PAGE_LEFT, // im linken Seitenrand
- text::RelOrientation::PAGE_RIGHT, // im rechten Seitenrand
- text::RelOrientation::FRAME_LEFT, // im linken Absatzrand
- text::RelOrientation::FRAME_RIGHT, // im rechten Absatzrand
- text::RelOrientation::PAGE_FRAME, // Seite inkl. Raender, bei seitengeb. identisch mit text::RelOrientation::FRAME
- text::RelOrientation::PAGE_PRINT_AREA, // Seite ohne Raender, bei seitengeb. identisch mit text::RelOrientation::PRTAREA
- // OD 11.11.2003 #i22341#
- text::RelOrientation::TEXT_LINE, // vertical relative to top of text line, only for to-character
- // anchored objects.
-
-
- text::HoriOrientation::NONE, //Der Wert in nYPos gibt die RelPos direkt an.
- text::HoriOrientation::RIGHT, //Der Rest ist fuer automatische Ausrichtung.
- text::HoriOrientation::CENTER,
- text::HoriOrientation::LEFT,
- text::HoriOrientation::INSIDE,
- text::HoriOrientation::OUTSIDE,
- text::HoriOrientation::FULL, //Spezialwert fuer Tabellen
- text::HoriOrientation::LEFT_AND_WIDTH //Auch fuer Tabellen
- */
SwFmtHoriOrient aHori( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME );
aFlySet.Put( aHori );
- /*
- text::VertOrientation::NONE, //Der Wert in nYPos gibt die RelPos direkt an.
- text::VertOrientation::TOP, //Der Rest ist fuer automatische Ausrichtung.
- text::VertOrientation::CENTER,
- text::VertOrientation::BOTTOM,
- text::VertOrientation::CHAR_TOP, //Ausrichtung _nur_ fuer Zeichengebundene Rahmen
- text::VertOrientation::CHAR_CENTER, //wie der Name jew. sagt wird der RefPoint des Rahmens
- text::VertOrientation::CHAR_BOTTOM, //entsprechend auf die Oberkante, Mitte oder Unterkante
- text::VertOrientation::LINE_TOP, //der Zeile gesetzt. Der Rahmen richtet sich dann
- text::VertOrientation::LINE_CENTER, //entsprechend aus.
- text::VertOrientation::LINE_BOTTOM
- */
SwFmtVertOrient aVert( 0, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME );
aFlySet.Put( aVert );
@@ -1314,7 +1256,7 @@ void SwRTFParser::ReadDrawingObject()
pStroke->SetSnapRect(aRect);
- /* SwFrmFmt* pRetFrmFmt = */pDoc->Insert(*pPam, *pStroke, &aFlySet, NULL);
+ pDoc->Insert(*pPam, *pStroke, &aFlySet, NULL);
}
}
@@ -1346,7 +1288,7 @@ void SwRTFParser::InsertShpObject(SdrObject* pStroke, int _nZOrder)
SdrPage* pDrawPg = pDrawModel->GetPage(0);
pDrawPg->InsertObject(pStroke);
pDrawPg->SetObjectOrdNum(pStroke->GetOrdNum(), _nZOrder);
- /* SwFrmFmt* pRetFrmFmt = */pDoc->Insert(*pPam, *pStroke, &aFlySet, NULL);
+ pDoc->Insert(*pPam, *pStroke, &aFlySet, NULL);
}
::basegfx::B2DPoint rotate(const ::basegfx::B2DPoint& rStart, const ::basegfx::B2DPoint& rEnd)
@@ -1402,7 +1344,7 @@ void SwRTFParser::ReadShapeObject()
break;
case RTF_SN:
nToken = GetNextToken();
- ASSERT(nToken==RTF_TEXTTOKEN, "expected name");
+ OSL_ENSURE(nToken==RTF_TEXTTOKEN, "expected name");
sn=aToken;
break;
case RTF_SV:
@@ -1514,7 +1456,6 @@ void SwRTFParser::ReadShapeObject()
rOutliner.Read(aStream, String::CreateFromAscii(""), EE_FORMAT_RTF);
OutlinerParaObject* pParaObject=rOutliner.CreateParaObject();
pStroke->NbcSetOutlinerParaObject(pParaObject);
- //delete pParaObject;
rOutliner.Clear();
}
if (txflTextFlow==2) {
@@ -1534,7 +1475,6 @@ void SwRTFParser::ReadShapeObject()
SdrPathObj* pStroke = new SdrPathObj(OBJ_PLIN, ::basegfx::B2DPolyPolygon(aLine));
pSdrObject = pStroke;
- //pStroke->SetSnapRect(aRect);
InsertShpObject(pStroke, this->nZOrder++);
SfxItemSet aSet(pStroke->GetMergedItemSet());
@@ -1573,7 +1513,6 @@ extern void sw3io_ConvertFromOldField( SwDoc& rDoc, sal_uInt16& rWhich,
sal_uInt16 SwRTFParser::ReadRevTbl()
{
- // rStr.Erase( 0 );
int nNumOpenBrakets = 1, nToken; // die erste wurde schon vorher erkannt !!
sal_uInt16 nAuthorTableIndex = 0;
@@ -1763,7 +1702,7 @@ void SwRTFParser::NextToken( int nToken )
break;
case RTF_PAGE:
- if (pTableNode==NULL) { //#117410#: A \page command within a table is ignored by Word.
+ if (pTableNode==NULL) { //A \page command within a table is ignored by Word.
if (lcl_UsedPara(*pPam))
InsertPara();
CheckInsNewTblLine();
@@ -1776,9 +1715,7 @@ void SwRTFParser::NextToken( int nToken )
ReadSectControls( nToken );
break;
case RTF_CELL:
- // --> OD 2008-12-22 #i83368#
- mbReadCellWhileReadSwFly = bReadSwFly;
- // <--
+ mbReadCellWhileReadSwFly = bReadSwFly; // #i83368#
if (CantUseTables())
InsertPara();
else
@@ -2144,7 +2081,7 @@ void SwRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos )
SwCntntNode* pNode = pDoc->GetNodes().GoPrevious( &aIdx );
if( !pNode )
{
- ASSERT( sal_False, "keinen vorherigen ContentNode gefunden" );
+ OSL_ENSURE( sal_False, "keinen vorherigen ContentNode gefunden" );
}
rpNodePos = new SwNodeIdx( aIdx );
@@ -2158,12 +2095,12 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
SwPaM aPam( *pPam->GetPoint() );
-#ifdef DBG_UTIL
- ASSERT( nSNd <= nENd, "Start groesser als Ende" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( nSNd <= nENd, "Start groesser als Ende" );
SwNode* pDebugNd = pDoc->GetNodes()[ nSNd ];
- ASSERT( pDebugNd->IsCntntNode(), "Start kein ContentNode" );
+ OSL_ENSURE( pDebugNd->IsCntntNode(), "Start kein ContentNode" );
pDebugNd = pDoc->GetNodes()[ nENd ];
- ASSERT( pDebugNd->IsCntntNode(), "Ende kein ContentNode" );
+ OSL_ENSURE( pDebugNd->IsCntntNode(), "Ende kein ContentNode" );
#endif
SwCntntNode* pCNd = pDoc->GetNodes()[ nSNd ]->GetCntntNode();
@@ -2484,7 +2421,11 @@ void SwRTFParser::SetBorderLine(SvxBoxItem& rBox, sal_uInt16 nLine)
break;
case RTF_BRDRDOT: // SO does not have dashed or dotted lines
+ nIdx = 6;
+ break;
case RTF_BRDRDASH:
+ nIdx = 7;
+ break;
case RTF_BRDRDASHSM:
case RTF_BRDRDASHD:
case RTF_BRDRDASHDD:
@@ -2713,7 +2654,7 @@ void SwRTFParser::ReadDocControls( int nToken )
pColl = pDoc->GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false );
}
- ASSERT(pColl, "impossible to have no standard style");
+ OSL_ENSURE(pColl, "impossible to have no standard style");
if (pColl)
{
@@ -2742,11 +2683,8 @@ void SwRTFParser::MakeStyleTab()
if( !IsNewDoc() )
{
// search all outlined collections
- //sal_uInt8 nLvl;
const SwTxtFmtColls& rColls = *pDoc->GetTxtFmtColls();
for( sal_uInt16 n = rColls.Count(); n; )
- //if( MAXLEVEL > (nLvl = rColls[ --n ]->GetOutlineLevel() ))//#outline level,zhaojianwei
- // nValidOutlineLevels |= 1 << nLvl;
if( rColls[ --n ]->IsAssignedToListLevelOfOutlineStyle())
nValidOutlineLevels |= 1 << rColls[ n ]->GetAssignedOutlineStyleLevel();//<-end,zhaojianwei
}
@@ -2865,7 +2803,7 @@ void SwRTFParser::ReadSectControls( int nToken )
return;
}
- ASSERT(!maSegments.empty(), "suspicious to have a section with no "
+ OSL_ENSURE(!maSegments.empty(), "suspicious to have a section with no "
"page info, though probably legal");
if (maSegments.empty())
{
@@ -2887,7 +2825,7 @@ void SwRTFParser::ReadSectControls( int nToken )
{
case RTF_SECT:
bNewSection = true;
- bForceNewTable = true; // #117882#
+ bForceNewTable = true;
break;
case RTF_SECTD: {
//Reset to page defaults
@@ -3020,13 +2958,13 @@ void SwRTFParser::ReadSectControls( int nToken )
_pKeepHeader = &aNewSection.mpPageHdFt->GetMaster().GetHeader();
}
bKeepFooter = false;
- if (!bNewSectionHeader) { //see #117914# topic 2). If a header is redefined in a section
- bNewSectionHeader=true; // a new header must be created.
+ if (!bNewSectionHeader) { // If a header is redefined in a section
+ bNewSectionHeader=true; // a new header must be created.
aNewSection.mpPageHdFt=NULL;
}
if (!aNewSection.mpPageHdFt)
{
- String aName(RTL_CONSTASCII_STRINGPARAM("rtfHdFt"));
+ String aName(RTL_CONSTASCII_USTRINGPARAM("rtfHdFt"));
aName += String::CreateFromInt32(maSegments.size());
sal_uInt16 nPageNo = pDoc->MakePageDesc(aName);
aNewSection.mpPageHdFt = &pDoc->_GetPageDesc(nPageNo);
@@ -3041,7 +2979,7 @@ void SwRTFParser::ReadSectControls( int nToken )
case RTF_HEADERF:
if (!aNewSection.mpTitlePageHdFt)
{
- String aTitle(RTL_CONSTASCII_STRINGPARAM("rtfTitleHdFt"));
+ String aTitle(RTL_CONSTASCII_USTRINGPARAM("rtfTitleHdFt"));
aTitle += String::CreateFromInt32(maSegments.size());
sal_uInt16 nPageNo = pDoc->MakePageDesc(aTitle);
aNewSection.mpTitlePageHdFt = &pDoc->_GetPageDesc(nPageNo);
@@ -3136,7 +3074,7 @@ void SwRTFParser::ReadSectControls( int nToken )
case RTF_MARGT:
case RTF_MARGB:
case RTF_FACINGP:
- ASSERT(!this, "why are these tokens found in this section?");
+ OSL_ENSURE(!this, "why are these tokens found in this section?");
ReadDocControls( nToken );
break;
default:
@@ -3158,8 +3096,8 @@ void SwRTFParser::ReadSectControls( int nToken )
if (bNewSection || maSegments.empty())
{
- AttrGroupEnd(); //#106493#
- if(!bContainsPara && !bContainsTablePara) //#117881#: bContainsTablePara is set in rtftbl.cxx
+ AttrGroupEnd();
+ if(!bContainsPara && !bContainsTablePara) // bContainsTablePara is set in rtftbl.cxx
pDoc->AppendTxtNode(*pPam->GetPoint());
bContainsPara = false;
bContainsTablePara = false;
@@ -3197,7 +3135,7 @@ void SwRTFParser::LeaveEnvironment()
void SwRTFParser::SkipPageDescTbl()
{
- // M.M. #117907# I have to use this glorified SkipGroup because the
+ // I have to use this glorified SkipGroup because the
// SvParser SkipGroup uses nNextCh which is not set correctly <groan>
int nNumOpenBrakets = 1;
@@ -3222,6 +3160,21 @@ void SwRTFParser::SkipPageDescTbl()
SkipToken( -1 );
}
+
+#define SETPAGEDESC_DEFAULTS() \
+ do {\
+ aSz.SetWidth( a4.Width() ); aSz.SetHeight( a4.Height() );\
+ aLR.SetLeft( 0 ); aLR.SetRight( 0 ); \
+ aUL.SetLower( 0 ); aUL.SetUpper( 0 ); \
+ aHLR.SetLeft( 0 ); aHLR.SetRight( 0 ); \
+ aHUL.SetLower( 0 ); aHUL.SetUpper( 0 ); \
+ aFLR.SetLeft( 0 ); aFLR.SetRight( 0 ); \
+ aFUL.SetLower( 0 ); aFUL.SetUpper( 0 ); \
+ nCols = USHRT_MAX; nColSpace = USHRT_MAX; nAktCol = 0; \
+ aFSz.SetHeightSizeType( ATT_MIN_SIZE ); aFSz.SetHeight( 0 ); \
+ aHSz.SetHeightSizeType( ATT_MIN_SIZE ); aHSz.SetHeight( 0 ); \
+ } while (0)
+
void SwRTFParser::ReadPageDescTbl()
{
// dann erzeuge aus der SvxStyle-Tabelle die Swg-Collections, damit
@@ -3264,7 +3217,7 @@ void SwRTFParser::ReadPageDescTbl()
case '}':
if (1 == --nNumOpenBrakets)
{
- ASSERT(pPgFmt && pPg, "Serious problem here");
+ OSL_ENSURE(pPgFmt && pPg, "Serious problem here");
if (pPgFmt && pPg)
{
// PageDesc ist fertig, setze am Doc
@@ -3300,25 +3253,14 @@ void SwRTFParser::ReadPageDescTbl()
if (nPos != pDoc->MakePageDesc(
String::CreateFromInt32(nTokenValue)))
{
- ASSERT( sal_False, "PageDesc an falscher Position" );
+ OSL_ENSURE( sal_False, "PageDesc an falscher Position" );
}
}
pPg = &pDoc->_GetPageDesc(nPos);
pPg->SetLandscape( sal_False );
pPgFmt = &pPg->GetMaster();
-#ifndef CFRONT
- SETPAGEDESC_DEFAULTS:
-#endif
- aSz.SetWidth( a4.Width() ); aSz.SetHeight( a4.Height() );
- aLR.SetLeft( 0 ); aLR.SetRight( 0 );
- aUL.SetLower( 0 ); aUL.SetUpper( 0 );
- aHLR.SetLeft( 0 ); aHLR.SetRight( 0 );
- aHUL.SetLower( 0 ); aHUL.SetUpper( 0 );
- aFLR.SetLeft( 0 ); aFLR.SetRight( 0 );
- aFUL.SetLower( 0 ); aFUL.SetUpper( 0 );
- nCols = USHRT_MAX; nColSpace = USHRT_MAX; nAktCol = 0;
- aFSz.SetHeightSizeType( ATT_MIN_SIZE ); aFSz.SetHeight( 0 );
- aHSz.SetHeightSizeType( ATT_MIN_SIZE ); aHSz.SetHeight( 0 );
+
+ SETPAGEDESC_DEFAULTS();
break;
case RTF_PGDSCUSE:
@@ -3356,21 +3298,9 @@ void SwRTFParser::ReadPageDescTbl()
}
pPgFmt = &pPg->GetLeft();
-#ifndef CFRONT
- goto SETPAGEDESC_DEFAULTS;
-#else
- aLR.SetLeft( 0 ); aLR.SetRight( 0 );
- aUL.SetLower( 0 ); aUL.SetUpper( 0 );
- aHLR.SetLeft( 0 ); aHLR.SetRight( 0 );
- aHUL.SetLower( 0 ); aHUL.SetUpper( 0 );
- aFLR.SetLeft( 0 ); aFLR.SetRight( 0 );
- aFUL.SetLower( 0 ); aFUL.SetUpper( 0 );
- aSz.SetWidth( a4.Width() ); aSz.SetHeight( a4.Height() ); // DIN A4 default
- nCols = USHRT_MAX; nColSpace = USHRT_MAX; nAktCol = 0;
- aFSz.SetHeightSizeType( ATT_MIN_SIZE ); aFSz.SetHeight( 0 );
- aHSz.SetHeightSizeType( ATT_MIN_SIZE ); aHSz.SetHeight( 0 );
+
+ SETPAGEDESC_DEFAULTS();
break;
-#endif
case RTF_RTLSECT:
aFrmDir.SetValue(FRMDIR_HORI_RIGHT_TOP);
@@ -3463,7 +3393,7 @@ void SwRTFParser::ReadPageDescTbl()
case RTF_TEXTTOKEN:
if (!DelCharAtEnd(aToken, ';' ).Len())
break;
- ASSERT(pPg, "Unexpected missing pPg");
+ OSL_ENSURE(pPg, "Unexpected missing pPg");
if (pPg)
{
pPg->SetName(aToken);
@@ -3525,20 +3455,6 @@ void SwRTFParser::ReadPageDescTbl()
SkipToken( -1 );
}
-// -------------- Methoden --------------------
-
-/*
-void SwRTFParser::ReadUnknownData()
-{
- SvRTFParser::ReadUnknownData();
-}
-
-void SwRTFParser::ReadOLEData()
-{
- SvRTFParser::ReadOLEData();
-}
-*/
-
void SwRTFParser::ReadPrtData()
{
while( IsParserWorking() )
@@ -3553,7 +3469,7 @@ void SwRTFParser::ReadPrtData()
static const SwNodeIndex* SetHeader(SwFrmFmt* pHdFtFmt, sal_Bool bReuseOld)
{
- ASSERT(pHdFtFmt, "Impossible, no header");
+ OSL_ENSURE(pHdFtFmt, "Impossible, no header");
const SwFrmFmt* pExisting = bReuseOld ?
pHdFtFmt->GetHeader().GetHeaderFmt() : 0;
if (!pExisting)
@@ -3567,7 +3483,7 @@ static const SwNodeIndex* SetHeader(SwFrmFmt* pHdFtFmt, sal_Bool bReuseOld)
static const SwNodeIndex* SetFooter(SwFrmFmt* pHdFtFmt, sal_Bool bReuseOld)
{
- ASSERT(pHdFtFmt, "Impossible, no footer");
+ OSL_ENSURE(pHdFtFmt, "Impossible, no footer");
const SwFrmFmt* pExisting = bReuseOld ?
pHdFtFmt->GetFooter().GetFooterFmt() : 0;
if (!pExisting)
@@ -3582,7 +3498,7 @@ static const SwNodeIndex* SetFooter(SwFrmFmt* pHdFtFmt, sal_Bool bReuseOld)
void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
{
- ASSERT( RTF_FOOTNOTE == nToken ||
+ OSL_ENSURE( RTF_FOOTNOTE == nToken ||
RTF_FLY_INPARA == nToken ||
pPageDesc, "PageDesc is missing" );
@@ -3632,7 +3548,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
pTxtAttr = pTxtNd->InsertItem( aFtnNote, nPos, nPos,
bDelFirstChar ? nsSetAttrMode::SETATTR_NOTXTATRCHR : 0 );
- ASSERT( pTxtAttr, "konnte die Fussnote nicht einfuegen/finden" );
+ OSL_ENSURE( pTxtAttr, "konnte die Fussnote nicht einfuegen/finden" );
if( pTxtAttr )
pSttIdx = ((SwTxtFtn*)pTxtAttr)->GetStartNode();
@@ -3659,7 +3575,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
pTxtAttr = pPam->GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
nPos, RES_TXTATR_FLYCNT );
- ASSERT( pTxtAttr, "konnte den Fly nicht einfuegen/finden" );
+ OSL_ENSURE( pTxtAttr, "konnte den Fly nicht einfuegen/finden" );
pSttIdx = pHdFtFmt->GetCntnt().GetCntntIdx();
bSetFlyInDoc = sal_False;
@@ -3884,29 +3800,6 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
}
-
-/*
- ????????????????????????????????????????????????????????????????????
- ?? muss die LineSpacing Hoehe 200Twip betragen ??
- ?? in rtfitem.hxx wird es auf 0 defaultet. Wenn ja, dann muss hier
- ?? ein neues Item gesetzt werden!!!!
- ????????????????????????????????????????????????????????????????????
-
- // LineSpacing korrigieren
- if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_LINESPACING, sal_False, &pItem ))
- {
- const SvxLineSpacingItem* pLS = (const SvxLineSpacingItem*)pItem;
- SvxLineSpacingItem aNew;
-
- aNew.SetInterLineSpace( pLS->GetInterLineSpace() );
- aNew.GetLineSpaceRule() = pLS->GetLineSpaceRule();
- aNew.SetPropLineSpace( pLS->GetPropLineSpace() );
- aNew.GetInterLineSpaceRule() = pLS->GetInterLineSpaceRule();
-
- rSet.Put( aNew );
- }
-?????????????????????????????????????????????????????????????????? */
-
}
@@ -3914,23 +3807,21 @@ SwTxtFmtColl* SwRTFParser::MakeColl(const String& rName, sal_uInt16 nPos,
sal_uInt8 nOutlineLevel, bool& rbCollExist)
{
if( sal_uInt8(-1) == nOutlineLevel )
- //nOutlineLevel = NO_NUMBERING;
- nOutlineLevel = MAXLEVEL;//#outline level,zhaojianwei
+ nOutlineLevel = MAXLEVEL;
rbCollExist = false;
SwTxtFmtColl* pColl;
String aNm( rName );
if( !aNm.Len() )
{
- ASSERT(!this, "not a bug, but I (cmc) want to see an example of this");
+ OSL_ENSURE(!this, "not a bug, but I (cmc) want to see an example of this");
if( !nPos )
{
pColl = pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false );
- //pColl->SetOutlineLevel( nOutlineLevel ); //#outline level,removed by zhaojianwei
- if(nOutlineLevel < MAXLEVEL ) //->add by zhaojianwei
+ if(nOutlineLevel < MAXLEVEL )
pColl->AssignToListLevelOfOutlineStyle( nOutlineLevel );
else
- pColl->DeleteAssignmentToListLevelOfOutlineStyle(); //<-end,zhaojianwei
+ pColl->DeleteAssignmentToListLevelOfOutlineStyle();
return pColl;
}
@@ -3946,19 +3837,16 @@ SwTxtFmtColl* SwRTFParser::MakeColl(const String& rName, sal_uInt16 nPos,
rbCollExist = aResult.second;
if (IsNewDoc() && rbCollExist)
{
- // --> OD 2007-01-25 #i73790# - method renamed
- pColl->ResetAllFmtAttr();
- // <--
+ pColl->ResetAllFmtAttr(); // #i73790# - method renamed
rbCollExist = false;
}
if (!rbCollExist)
{
- //pColl->SetOutlineLevel( nOutlineLevel ); //#outline level,removed by zhaojianwei
- if(nOutlineLevel < MAXLEVEL) //->add by zhaojianwei
+ if(nOutlineLevel < MAXLEVEL)
pColl->AssignToListLevelOfOutlineStyle( nOutlineLevel );
else
- pColl->DeleteAssignmentToListLevelOfOutlineStyle(); //<-end,zhaojianwei
+ pColl->DeleteAssignmentToListLevelOfOutlineStyle();
}
return pColl;
@@ -3972,7 +3860,7 @@ SwCharFmt* SwRTFParser::MakeCharFmt(const String& rName, sal_uInt16 nPos,
String aNm( rName );
if( !aNm.Len() )
{
- ASSERT(!this, "not a bug, but I (cmc) want to see an example of this");
+ OSL_ENSURE(!this, "not a bug, but I (cmc) want to see an example of this");
aNm.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "NoName(" ));
aNm += String::CreateFromInt32( nPos );
aNm += ')';
@@ -3985,9 +3873,7 @@ SwCharFmt* SwRTFParser::MakeCharFmt(const String& rName, sal_uInt16 nPos,
rbCollExist = aResult.second;
if (IsNewDoc() && rbCollExist)
{
- // --> OD 2007-01-25 #i73790# - method renamed
- pFmt->ResetAllFmtAttr();
- // <--
+ pFmt->ResetAllFmtAttr(); // #i73790# - method renamed
rbCollExist = false;
}
return pFmt;
@@ -4147,7 +4033,7 @@ void SwRTFParser::DelLastNode()
{
sal_uLong nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
SwCntntNode* pCNd = pDoc->GetNodes()[ nNodeIdx ]->GetCntntNode();
- // paragraphs with page break information are not empty! see #117914# topic 1)
+ // paragraphs with page break information are not empty!)
if(const SfxPoolItem* pItem=&(pCNd->GetAttr( RES_PAGEDESC, sal_False)))
{
SwFmtPageDesc* pPageDescItem = ((SwFmtPageDesc*)pItem);
@@ -4200,7 +4086,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
NewTblLine(); // evt. Line copieren
else
{
- static int _do=0; //$flr See #117881# for explanation.
+ static int _do=0; //$flr
// Crsr nicht mehr in der Tabelle ?
if( !pPam->GetNode()->FindTableNode() && _do )
{
@@ -4272,7 +4158,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
{
// wir sind in der Style-Definitions - Phase. Der Name
// wird dann spaeter umgesetzt
- //#117891# pSet->Put( SwNumRuleItem( String::CreateFromInt32( nTokenValue )));
+ // pSet->Put( SwNumRuleItem( String::CreateFromInt32( nTokenValue )));
}
}
@@ -4287,19 +4173,12 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
}
break;
-/*
- case RTF_SBYS:
- case RTF_EXPND:
- case RTF_KEEP:
- case RTF_KEEPN:
-*/
-
}
}
void SwRTFParser::ReadInfo( const sal_Char* pChkForVerNo )
{
-sal_Char __READONLY_DATA aChkForVerNo[] = "StarWriter";
+sal_Char const aChkForVerNo[] = "StarWriter";
// falls nicht schon was vorgegeben wurde, setzen wir unseren Namen
// rein. Wenn das im Kommentar match, wird im Parser die VersionNummer
@@ -4421,4 +4300,4 @@ xub_StrLen SwxPosition::GetCntIdx() const
return pPam->GetPoint()->nContent.GetIndex();
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/rtf/swparrtf.hxx b/sw/source/filter/rtf/swparrtf.hxx
index 3f13b397ad2f..fe87687554d5 100644
--- a/sw/source/filter/rtf/swparrtf.hxx
+++ b/sw/source/filter/rtf/swparrtf.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,22 +25,13 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#ifndef _SWPARRTF_HXX
#define _SWPARRTF_HXX
-#ifndef __SGI_STL_DEQUE
#include <deque>
-#endif
-#ifndef __SGI_STL_VECTOR
#include <vector>
-#endif
-#ifndef _SVSTDARR_HXX
-#define _SVSTDARR_BOOLS
-#include <svl/svstdarr.hxx>
-#endif
#include <editeng/svxrtf.hxx>
#include <editeng/numitem.hxx>
#include <editeng/boxitem.hxx>
@@ -245,7 +237,7 @@ private:
{
bool bHasHeader, bHasFooter;
short nSwHLo, nHdUL, nSwFUp, nFtUL, nSwUp, nSwLo;
- wwULSpaceData() : bHasHeader(false), bHasFooter(false) {}
+ wwULSpaceData() : bHasHeader(false), bHasFooter(false), nSwHLo(0), nHdUL(0), nSwFUp(0), nFtUL(0), nSwUp(0), nSwLo(0) {}
};
void SetSegmentToPageDesc(const rtfSection &rSection, bool bTitlePage,
@@ -297,7 +289,7 @@ class SwRTFParser : public SvxRTFParser
SwRTFStyleTbl aTxtCollTbl;
SwRTFCharStyleTbl aCharFmtTbl;
SwFlySaveArr aFlyArr; // Flys als Letzes im Doc setzen
- SvBools aMergeBoxes; // Flags fuer gemergte Zellen
+ std::vector<bool> aMergeBoxes; // Flags fuer gemergte Zellen
SwListArr aListArr;
SvPtrarr aTblFmts;
SvPtrarr aRubyCharFmts;
@@ -327,9 +319,7 @@ class SwRTFParser : public SvxRTFParser
bool bSwPageDesc;
bool bReadSwFly; // lese Swg-Fly (wichtig fuer Bitmaps!)
- // --> OD 2008-12-22 #i83368#
- bool mbReadCellWhileReadSwFly;
- // <--
+ bool mbReadCellWhileReadSwFly; // #i83368#
bool mbReadNoTbl; // verhinder Tabelle in Tabelle/FootNote
bool mbIsFootnote;
bool bFootnoteAutoNum; // automatische Numerierung ?
@@ -475,4 +465,4 @@ public:
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index 908fd33490f0..40537c7dde23 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,6 @@
#include <editeng/fontitem.hxx>
#include <editeng/eeitem.hxx>
#include <shellio.hxx>
-#include <pam.hxx>
#include <doc.hxx>
#include <docary.hxx>
#include <IMark.hxx>
@@ -73,7 +73,8 @@ struct Writer_Impl
Writer_Impl::Writer_Impl()
: m_pStream(0)
- , pSrcArr( 0 ), pDestArr( 0 ), pFontRemoveLst( 0 ), pBkmkNodePos( 0 )
+ , pSrcArr( 0 ), pDestArr( 0 ), pFontRemoveLst( 0 )
+ , pBkmkArr( 0 ), pBkmkNodePos( 0 )
{
}
@@ -93,7 +94,7 @@ Writer_Impl::~Writer_Impl()
void Writer_Impl::RemoveFontList( SwDoc& rDoc )
{
- ASSERT( pFontRemoveLst, "wo ist die FontListe?" );
+ OSL_ENSURE( pFontRemoveLst, "wo ist die FontListe?" );
for( sal_uInt16 i = pFontRemoveLst->Count(); i; )
{
SvxFontItem* pItem = (SvxFontItem*)(*pFontRemoveLst)[ --i ];
@@ -232,7 +233,7 @@ Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndId
SwCntntNode* pCNode = aStt.GetNode().GetCntntNode();
if( !pCNode && 0 == ( pCNode = pNds->GoNext( &aStt )) )
{
- ASSERT( false, "An StartPos kein ContentNode mehr" );
+ OSL_ENSURE( false, "An StartPos kein ContentNode mehr" );
}
SwPaM* pNew = new SwPaM( aStt );
@@ -241,7 +242,7 @@ Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndId
if( 0 == (pCNode = aStt.GetNode().GetCntntNode()) &&
0 == (pCNode = pNds->GoPrevious( &aStt )) )
{
- ASSERT( false, "An StartPos kein ContentNode mehr" );
+ OSL_ENSURE( false, "An StartPos kein ContentNode mehr" );
}
pCNode->MakeEndIndex( &pNew->GetPoint()->nContent );
pNew->GetPoint()->nNode = aStt;
@@ -253,7 +254,7 @@ Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndId
// Stream-spezifisches
SvStream& Writer::Strm()
{
- ASSERT( m_pImpl->m_pStream, "Oh-oh. Writer with no Stream!" );
+ OSL_ENSURE( m_pImpl->m_pStream, "Oh-oh. Writer with no Stream!" );
return *m_pImpl->m_pStream;
}
@@ -345,13 +346,13 @@ sal_uLong Writer::Write( SwPaM& rPam, SfxMedium& rMed, const String* pFileName )
sal_uLong Writer::Write( SwPaM& /*rPam*/, SvStorage&, const String* )
{
- ASSERT( !this, "Schreiben in Storages auf einem Stream?" );
+ OSL_ENSURE( !this, "Schreiben in Storages auf einem Stream?" );
return ERR_SWG_WRITE_ERROR;
}
sal_uLong Writer::Write( SwPaM&, const uno::Reference < embed::XStorage >&, const String*, SfxMedium* )
{
- ASSERT( !this, "Schreiben in Storages auf einem Stream?" );
+ OSL_ENSURE( !this, "Schreiben in Storages auf einem Stream?" );
return ERR_SWG_WRITE_ERROR;
}
@@ -363,9 +364,6 @@ sal_Bool Writer::CopyLocalFileToINet( String& rFileNm )
sal_Bool bRet = sal_False;
INetURLObject aFileUrl( rFileNm ), aTargetUrl( *pOrigFileName );
-// JP 01.11.00: what is the correct question for the portal??
-// if( aFileUrl.GetProtocol() == aFileUrl.GetProtocol() )
-// return bRet;
// this is our old without the Mail-Export
if( ! ( INET_PROT_FILE == aFileUrl.GetProtocol() &&
INET_PROT_FILE != aTargetUrl.GetProtocol() &&
@@ -427,8 +425,6 @@ void Writer::PutNumFmtFontsInAttrPool()
const SwNumRuleTbl& rListTbl = pDoc->GetNumRuleTbl();
const SwNumRule* pRule;
const SwNumFmt* pFmt;
- // --> OD 2006-06-27 #b644095#
-// const Font *pFont, *pDefFont = &SwNumRule::GetDefBulletFont();
const Font* pFont;
const Font* pDefFont = &numfunc::GetDefBulletFont();
// <--
@@ -537,7 +533,7 @@ void Writer::CreateBookmarkTbl()
sal_uInt16 Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt,
xub_StrLen nEnd, SvPtrarr& rArr)
{
- ASSERT( !rArr.Count(), "es sind noch Eintraege vorhanden" );
+ OSL_ENSURE( !rArr.Count(), "es sind noch Eintraege vorhanden" );
sal_uLong nNd = rNd.GetIndex();
SvPtrarr* pArr = (m_pImpl->pBkmkNodePos) ?
@@ -581,7 +577,7 @@ sal_uInt16 Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt,
sal_uLong StgWriter::WriteStream()
{
- ASSERT( !this, "Schreiben in Streams auf einem Storage?" );
+ OSL_ENSURE( !this, "Schreiben in Streams auf einem Storage?" );
return ERR_SWG_WRITE_ERROR;
}
@@ -626,3 +622,4 @@ sal_uLong StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage
return nRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx
index f9ac75b3a5d1..13c848bc032e 100644
--- a/sw/source/filter/writer/wrt_fn.cxx
+++ b/sw/source/filter/writer/wrt_fn.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,7 +34,6 @@
#include "shellio.hxx"
#include "wrt_fn.hxx"
-#include "pam.hxx"
#include "node.hxx"
#include "format.hxx"
@@ -42,7 +42,7 @@
Writer& Out( const SwAttrFnTab pTab, const SfxPoolItem& rHt, Writer & rWrt )
{
sal_uInt16 nId = rHt.Which();
- ASSERT( nId < POOLATTR_END && nId >= POOLATTR_BEGIN, "SwAttrFnTab::Out()" );
+ OSL_ENSURE( nId < POOLATTR_END && nId >= POOLATTR_BEGIN, "SwAttrFnTab::Out()" );
FnAttrOut pOut;
if( 0 != ( pOut = pTab[ nId - RES_CHRATR_BEGIN] ))
(*pOut)( rWrt, rHt );
@@ -66,11 +66,11 @@ Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt,
if( !pSet )
return rWrt;
}
- const SfxPoolItem* pItem;
+ const SfxPoolItem* pItem(0);
FnAttrOut pOut;
if( !bDeep || !pSet->GetParent() )
{
- ASSERT( rSet.Count(), "Wurde doch schon behandelt oder?" );
+ OSL_ENSURE( rSet.Count(), "Wurde doch schon behandelt oder?" );
SfxItemIter aIter( *pSet );
pItem = aIter.GetCurItem();
do {
@@ -119,7 +119,7 @@ Writer& Out( const SwNodeFnTab pTab, SwNode& rNode, Writer & rWrt )
nId = RES_OLENODE;
break;
default:
- ASSERT(false, "was fuer ein Node ist es denn nun?");
+ OSL_ENSURE(false, "was fuer ein Node ist es denn nun?");
break;
}
FnNodeOut pOut;
@@ -129,3 +129,4 @@ Writer& Out( const SwNodeFnTab pTab, SwNode& rNode, Writer & rWrt )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index 20c55ac8c48d..ab080c8ac6f1 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -111,7 +112,7 @@ sal_uInt32 SwWriteTable::GetBoxWidth( const SwTableBox *pBox )
long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool bOldGetLineHeightCalled = bGetLineHeightCalled;
bGetLineHeightCalled = sal_True;
#endif
@@ -126,14 +127,13 @@ long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
return nHeight;
// Wenn kein Layout gefunden wurde, gehen wir von festen Hoehen aus.
- // --> FME 2007-3-26 #i60390# in some cases we still want to continue
+ // #i60390# - in some cases we still want to continue
// to use the layout heights even if one of the rows has a height of 0
// ('hidden' rows)
- // <--
bUseLayoutHeights = bLayoutAvailable; /*sal_False;*/
-#ifdef DBG_UTIL
- ASSERT( bLayoutAvailable || !bOldGetLineHeightCalled, "Layout ungueltig?" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bLayoutAvailable || !bOldGetLineHeightCalled, "Layout ungueltig?" );
#endif
}
@@ -361,7 +361,7 @@ sal_uInt16 SwWriteTable::GetAbsWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) con
nWidth -= GetLeftSpace( nCol ) + GetRightSpace( nCol, nColSpan );
- ASSERT( nWidth > 0, "Spaltenbreite <= 0. OK?" );
+ OSL_ENSURE( nWidth > 0, "Spaltenbreite <= 0. OK?" );
return nWidth > 0 ? (sal_uInt16)nWidth : 0;
}
@@ -408,7 +408,7 @@ long SwWriteTable::GetAbsHeight( long nRawHeight, sal_uInt16 nRow,
nRawHeight -= nBorder;
}
- ASSERT( nRawHeight > 0, "Zeilenheohe <= 0. OK?" );
+ OSL_ENSURE( nRawHeight > 0, "Zeilenheohe <= 0. OK?" );
return nRawHeight > 0 ? nRawHeight : 0;
}
@@ -428,7 +428,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
sal_Bool bSubExpanded = sal_False;
sal_uInt16 nLines = rLines.Count();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uInt32 nEndCPos = 0;
#endif
@@ -449,7 +449,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
layout, you may run into this robust code.
It's not allowed that subrows leaves their parentrow. If this would happen the line
height of subrow is reduced to a part of the remaining height */
- ASSERT( sal_False, "Corrupt line height I" );
+ OSL_ENSURE( sal_False, "Corrupt line height I" );
nRPos -= nLineHeight;
nLineHeight = nStartRPos + nParentLineHeight - nRPos; // remaining parent height
nLineHeight /= nLines - nLine; // divided through the number of remaining sub rows
@@ -464,17 +464,17 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
}
else
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
long nCheckPos = nRPos + GetLineHeight( pLine );
#endif
nRPos = nStartRPos + nParentLineHeight;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
SwWriteTableRow aRow( nStartRPos + nParentLineHeight, bUseLayoutHeights );
- ASSERT( aRows.Seek_Entry(&aRow),
+ OSL_ENSURE( aRows.Seek_Entry(&aRow),
"Parent-Zeile nicht gefunden" );
SwWriteTableRow aRowCheckPos(nCheckPos,bUseLayoutHeights);
SwWriteTableRow aRowRPos(nRPos,bUseLayoutHeights);
- ASSERT( !bUseLayoutHeights ||
+ OSL_ENSURE( !bUseLayoutHeights ||
aRowCheckPos == aRowRPos,
"Hoehe der Zeilen stimmt nicht mit Parent ueberein" );
#endif
@@ -504,14 +504,14 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
if( nBox==nBoxes-1 )
{
- ASSERT( nLine==0 && nParentLineWidth==0,
+ OSL_ENSURE( nLine==0 && nParentLineWidth==0,
"Jetzt wird die Parent-Breite plattgemacht!" );
nParentLineWidth = nCPos-nStartCPos;
}
}
else
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uInt32 nCheckPos = nCPos + GetBoxWidth( pBox );
if( !nEndCPos )
{
@@ -519,17 +519,17 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
}
else
{
- ASSERT( SwWriteTableCol(nCheckPos) ==
+ OSL_ENSURE( SwWriteTableCol(nCheckPos) ==
SwWriteTableCol(nEndCPos),
"Zelle enthaelt unterschiedlich breite Zeilen" );
}
#endif
nCPos = nStartCPos + nParentLineWidth;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
SwWriteTableCol aCol( nStartCPos + nParentLineWidth );
- ASSERT( aCols.Seek_Entry(&aCol),
+ OSL_ENSURE( aCols.Seek_Entry(&aCol),
"Parent-Zelle nicht gefunden" );
- ASSERT( SwWriteTableCol(nCheckPos) ==
+ OSL_ENSURE( SwWriteTableCol(nCheckPos) ==
SwWriteTableCol(nCPos),
"Breite der Zellen stimmt nicht mit Parent ueberein" );
#endif
@@ -578,7 +578,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
if( nParentLineHeight && nStartRPos + nParentLineHeight <= nRPos )
{
/* See comment in CollectTableRowCols */
- ASSERT( sal_False, "Corrupt line height II" );
+ OSL_ENSURE( sal_False, "Corrupt line height II" );
nRPos -= nLineHeight;
nLineHeight = nStartRPos + nParentLineHeight - nRPos; // remaining parent height
nLineHeight /= nLines - nLine; // divided through the number of remaining sub rows
@@ -591,13 +591,15 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
// Und ihren Index
sal_uInt16 nOldRow = nRow;
SwWriteTableRow aRow( nRPos,bUseLayoutHeights );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool bFound =
#endif
aRows.Seek_Entry( &aRow, &nRow );
- ASSERT( bFound, "Wo ist die Zeile geblieben?" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bFound, "Wo ist die Zeile geblieben?" );
+#endif
- ASSERT( nOldRow <= nRow, "Don't look back!" );
+ OSL_ENSURE( nOldRow <= nRow, "Don't look back!" );
if( nOldRow > nRow )
{
nOldRow = nRow;
@@ -608,7 +610,6 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
SwWriteTableRow *pRow = aRows[nOldRow];
SwWriteTableRow *pEndRow = aRows[nRow];
-// if( nLine==0 && nParentLineHeight==0 )
if( nLine+1==nNumOfHeaderRows && nParentLineHeight==0 )
nHeadEndRow = nRow;
@@ -676,11 +677,13 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
// Und ihren Index
sal_uInt16 nOldCol = nCol;
SwWriteTableCol aCol( nCPos );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool bFound2 =
#endif
aCols.Seek_Entry( &aCol, &nCol );
- ASSERT( bFound2, "Wo ist die Spalte geblieben?" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bFound2, "Wo ist die Spalte geblieben?" );
+#endif
if( !ShouldExpandSub( pBox, bSubExpanded, nDepth ) )
{
@@ -711,7 +714,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
if (!(nBorderMask & 4) && nOldCol < aCols.Count())
{
SwWriteTableCol *pCol = aCols[nOldCol];
- ASSERT(pCol, "No TableCol found, panic!");
+ OSL_ENSURE(pCol, "No TableCol found, panic!");
if (pCol)
pCol->bLeftBorder = sal_False;
}
@@ -719,7 +722,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
if (!(nBorderMask & 8))
{
SwWriteTableCol *pCol = aCols[nCol];
- ASSERT(pCol, "No TableCol found, panic!");
+ OSL_ENSURE(pCol, "No TableCol found, panic!");
if (pCol)
pCol->bRightBorder = sal_False;
}
@@ -739,16 +742,6 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
pEndRow->nBottomBorder = nBottomBorder;
}
}
-// MIB: 13.12.2000: Why should a cell that contains a subtable
-// not have borders? Moreover, switching them, off switches off
-// the fill border lines between the columns and rows. (#74222#)
-// else
-// {
-// aCols[nOldCol]->bLeftBorder = sal_False;
-// aCols[nCol]->bRightBorder = sal_False;
-// pRow->bTopBorder = sal_False;
-// pEndRow->bBottomBorder = sal_False;
-// }
}
else
{
@@ -773,7 +766,7 @@ SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth,
nInnerBorder(0), nBaseWidth(nBWidth), nHeadEndRow(USHRT_MAX),
nLeftSub(nLSub), nRightSub(nRSub), nTabWidth(nWidth), bRelWidths(bRel),
bUseLayoutHeights(true),
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bGetLineHeightCalled(false),
#endif
bColsOption(false), bColTags(true), bLayoutExport(false),
@@ -800,7 +793,7 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
nInnerBorder(0), nBaseWidth(pLayoutInfo->GetWidthOption()), nHeadEndRow(0),
nLeftSub(0), nRightSub(0), nTabWidth(pLayoutInfo->GetWidthOption()),
bRelWidths(pLayoutInfo->HasPrcWidthOption()), bUseLayoutHeights(false),
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bGetLineHeightCalled(false),
#endif
bColsOption(pLayoutInfo->HasColsOption()),
@@ -871,7 +864,7 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
sal_uInt16 nRowSpan = pLayoutCell->GetRowSpan();
sal_uInt16 nColSpan = pLayoutCell->GetColSpan();
const SwTableBox *pBox = pLayoutCnts->GetTableBox();
- ASSERT( pBox,
+ OSL_ENSURE( pBox,
"Tabelle in Tabelle kann nicht ueber Layout exportiert werden" );
long nHeight = bHeightExported ? 0 : GetLineHeight( pBox );
@@ -917,3 +910,5 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
SwWriteTable::~SwWriteTable()
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index c6e093c11935..668244a95383 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,6 @@
#include <vcl/graph.hxx>
#include <svl/urihelper.hxx>
#include <editeng/boxitem.hxx>
-#include <editeng/boxitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/cmapitem.hxx>
#include <editeng/cntritem.hxx>
@@ -85,7 +85,7 @@ static SwCntntNode* GetCntntNode(SwDoc* pDoc, SwNodeIndex& rIdx, sal_Bool bNext)
{
pCNd = bNext ? pDoc->GetNodes().GoPrevious(&rIdx)
: pDoc->GetNodes().GoNext(&rIdx);
- ASSERT(pCNd, "kein ContentNode gefunden");
+ OSL_ENSURE(pCNd, "kein ContentNode gefunden");
}
return pCNd;
}
@@ -160,7 +160,7 @@ sal_Bool SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, sal_Bool bChec
}
rRegion.GetPoint()->nContent.Assign(pCNd, nPtCntnt);
#if OSL_DEBUG_LEVEL > 1
- ASSERT( CheckNodesRange( rRegion.Start()->nNode,
+ OSL_ENSURE( CheckNodesRange( rRegion.Start()->nNode,
rRegion.End()->nNode, sal_True ),
"Attribut oder AEhnliches ueber Bereichs-Grenzen" );
#endif
@@ -179,7 +179,7 @@ SwFltControlStack::SwFltControlStack(SwDoc* pDo, sal_uLong nFieldFl)
SwFltControlStack::~SwFltControlStack()
{
- ASSERT(!Count(), "noch Attribute auf dem Stack");
+ OSL_ENSURE(!Count(), "noch Attribute auf dem Stack");
}
// MoveAttrs() ist fuer folgendes Problem:
@@ -202,14 +202,14 @@ void SwFltControlStack::MoveAttrs( const SwPosition& rPos )
if(( pEntry->nMkNode.GetIndex() + 1 == nPosNd )
&&( pEntry->nMkCntnt >= nPosCt )){
pEntry->nMkCntnt++;
- ASSERT( pEntry->nMkCntnt
+ OSL_ENSURE( pEntry->nMkCntnt
<= pDoc->GetNodes()[nPosNd]->GetCntntNode()->Len(),
"Attribut-Anfang hinter Zeilenende" );
}
if(( pEntry->nPtNode.GetIndex() + 1 == nPosNd )
&&( pEntry->nPtCntnt >= nPosCt )){
pEntry->nPtCntnt++;
- ASSERT( pEntry->nPtCntnt
+ OSL_ENSURE( pEntry->nPtCntnt
<= pDoc->GetNodes()[nPosNd]->GetCntntNode()->Len(),
"Attribut-Ende hinter Zeilenende" );
}
@@ -235,7 +235,7 @@ void SwFltControlStack::NewAttr(const SwPosition& rPos, const SfxPoolItem & rAtt
void SwFltControlStack::DeleteAndDestroy(Entries::size_type nCnt)
{
- ASSERT(nCnt < maEntries.size(), "Out of range!");
+ OSL_ENSURE(nCnt < maEntries.size(), "Out of range!");
if (nCnt < maEntries.size())
{
myEIter aElement = maEntries.begin() + nCnt;
@@ -300,10 +300,10 @@ void SwFltControlStack::KillUnlockedAttrs(const SwPosition& pPos)
void SwFltControlStack::SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId,
sal_Bool bTstEnde, long nHand, sal_Bool consumedByField )
{
- ASSERT(!nAttrId ||
+ OSL_ENSURE(!nAttrId ||
(POOLATTR_BEGIN <= nAttrId && POOLATTR_END > nAttrId) ||
(RES_FLTRATTR_BEGIN <= nAttrId && RES_FLTRATTR_END > nAttrId),
- "Falsche Id fuers Attribut")
+ "Falsche Id fuers Attribut");
sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
@@ -369,8 +369,6 @@ static void MakeBookRegionOrPoint(SwFltStackEntry* pEntry, SwDoc* pDoc,
{
if (pEntry->MakeRegion(pDoc, rRegion, bCheck )){
// sal_Bool b1 = rNds[rRegion.GetPoint()->nNode]->FindTableNode() != 0;
-// const SwStartNode* p1 = rNds[rRegion.GetPoint()->nNode]->FindTableBoxStartNode();
-// const SwStartNode* p2 = rNds[rRegion.GetMark()->nNode]->FindTableBoxStartNode();
if (rRegion.GetPoint()->nNode.GetNode().FindTableBoxStartNode()
!= rRegion.GetMark()->nNode.GetNode().FindTableBoxStartNode())
{
@@ -459,10 +457,8 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
aTmpStart, aTmpEnd ) )
{
SwPaM aTmpPam( aTmpStart, aTmpEnd );
- // --> OD 2008-03-17 #refactorlists#
// no start of a new list
pDoc->SetNumRule( aTmpPam, *pRul, false );
- // <--
aTmpStart = aTmpEnd; // Start fuer naechstes Teilstueck
aTmpStart++;
@@ -631,7 +627,6 @@ const SfxPoolItem* SwFltControlStack::GetFmtAttr(const SwPosition& rPos, sal_uIn
return (const SfxPoolItem*)pHt;
// im Stack ist das Attribut nicht vorhanden, also befrage das Dokument
-// SwCntntNode * pNd = rPaM.GetCntntNode();
SwCntntNode * pNd = rPos.nNode.GetNode().GetCntntNode();
if (!pNd) // kein ContentNode, dann das dflt. Attribut
@@ -652,7 +647,7 @@ void SwFltControlStack::Delete(const SwPaM &rPam)
sal_uInt16 nEndIdx = pEnd->nContent.GetIndex();
//We don't support deleting content that is over one node, or removing a node.
- ASSERT(aEndNode == aStartNode, "nodes must be the same, or this method extended");
+ OSL_ENSURE(aEndNode == aStartNode, "nodes must be the same, or this method extended");
if (aEndNode != aStartNode)
return;
@@ -765,7 +760,7 @@ int SwFltAnchor::operator==(const SfxPoolItem& rItem) const
return pFrmFmt == ((SwFltAnchor&)rItem).pFrmFmt;
}
-SfxPoolItem* __EXPORT SwFltAnchor::Clone(SfxItemPool*) const
+SfxPoolItem* SwFltAnchor::Clone(SfxItemPool*) const
{
return new SwFltAnchor(*this);
}
@@ -882,7 +877,7 @@ int SwFltSection::operator==(const SfxPoolItem& rItem) const
return m_pSection == ((SwFltSection&)rItem).m_pSection;
}
-SfxPoolItem* __EXPORT SwFltSection::Clone(SfxItemPool*) const
+SfxPoolItem* SwFltSection::Clone(SfxItemPool*) const
{
return new SwFltSection(*this);
}
@@ -1005,7 +1000,7 @@ SwFltShell::~SwFltShell()
SwFltShell& SwFltShell::operator << ( const String& rStr )
{
- ASSERT(eSubMode != Style, "char insert while in style-mode");
+ OSL_ENSURE(eSubMode != Style, "char insert while in style-mode");
GetDoc().InsertString( *pPaM, rStr );
return *this;
}
@@ -1042,7 +1037,7 @@ String SwFltShell::QuoteStr( const String& rIn )
SwFltShell& SwFltShell::operator << ( const sal_Unicode c )
{
- ASSERT( eSubMode != Style, "char insert while in style-mode");
+ OSL_ENSURE( eSubMode != Style, "char insert while in style-mode");
GetDoc().InsertString( *pPaM, c );
return *this;
}
@@ -1132,7 +1127,7 @@ SwFltShell& SwFltShell::SetStyle( sal_uInt16 nStyle )
}
else
{
- ASSERT( sal_False, "Ungueltiger SwFltStyleCode" );
+ OSL_ENSURE( sal_False, "Ungueltiger SwFltStyleCode" );
}
return *this;
}
@@ -1155,7 +1150,7 @@ SwFltShell& SwFltShell::EndItem( sal_uInt16 nAttrId )
switch( nAttrId )
{
case RES_FLTR_BOOKMARK:
- ASSERT( sal_False, "Falscher Aufruf fuer Bookmark-Ende" );
+ OSL_ENSURE( sal_False, "Falscher Aufruf fuer Bookmark-Ende" );
break;
case RES_FLTR_TOX:
@@ -1287,64 +1282,64 @@ SwFltOutBase::SwFltOutBase(SwDoc& rDocu)
const SfxPoolItem& SwFltOutBase::GetCellAttr(sal_uInt16 nWhich)
{
- ASSERT(sal_False, "GetCellAttr ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "GetCellAttr ausserhalb von normalem Text");
return GetDoc().GetAttrPool().GetDefaultItem(nWhich);
}
sal_Bool SwFltOutBase::BeginTable()
{
- ASSERT(sal_False, "BeginTable ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "BeginTable ausserhalb von normalem Text");
return sal_False;
}
void SwFltOutBase::NextTableCell()
{
- ASSERT(sal_False, "NextTableCell ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "NextTableCell ausserhalb von normalem Text");
}
void SwFltOutBase::NextTableRow()
{
- ASSERT(sal_False, "NextTableRow ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "NextTableRow ausserhalb von normalem Text");
}
void SwFltOutBase::SetTableWidth(SwTwips /*nW*/)
{
- ASSERT(sal_False, "SetTableWidth ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetTableWidth ausserhalb von normalem Text");
}
void SwFltOutBase::SetTableOrient(sal_Int16 /*eOri*/)
{
- ASSERT(sal_False, "SetTableOrient ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetTableOrient ausserhalb von normalem Text");
}
void SwFltOutBase::SetCellWidth(SwTwips /*nWidth*/, sal_uInt16 /*nCell*/)
{
- ASSERT(sal_False, "SetCellWidth ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetCellWidth ausserhalb von normalem Text");
}
void SwFltOutBase::SetCellHeight(SwTwips /*nH*/)
{
- ASSERT(sal_False, "SetCellHeight ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetCellHeight ausserhalb von normalem Text");
}
void SwFltOutBase::SetCellBorder(const SvxBoxItem& /*rFmtBox*/, sal_uInt16 /*nCell*/)
{
- ASSERT(sal_False, "SetCellBorder ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetCellBorder ausserhalb von normalem Text");
}
void SwFltOutBase::SetCellSpace(sal_uInt16 /*nSp*/)
{
- ASSERT(sal_False, "SetCellSpace ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetCellSpace ausserhalb von normalem Text");
}
void SwFltOutBase::DeleteCell(sal_uInt16 /*nCell*/)
{
- ASSERT(sal_False, "DeleteCell ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "DeleteCell ausserhalb von normalem Text");
}
void SwFltOutBase::EndTable()
{
- ASSERT(sal_False, "EndTable ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "EndTable ausserhalb von normalem Text");
}
/*virtual*/ sal_Bool SwFltOutDoc::IsInTable()
@@ -1358,7 +1353,7 @@ sal_Bool SwFltOutDoc::BeginTable()
return sal_False;
if (pTable){
- ASSERT(sal_False, "BeginTable in Table");
+ OSL_ENSURE(sal_False, "BeginTable in Table");
return sal_False;
}
// Alle Attribute schliessen, da sonst Attribute
@@ -1367,7 +1362,7 @@ sal_Bool SwFltOutDoc::BeginTable()
rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// create table:
- ASSERT(pTabSavedPos == NULL, "SwFltOutDoc");
+ OSL_ENSURE(pTabSavedPos == NULL, "SwFltOutDoc");
pTabSavedPos = new SwPosition(*pPaM->GetPoint());
pTable = GetDoc().InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ),
@@ -1384,7 +1379,7 @@ sal_Bool SwFltOutDoc::BeginTable()
SwTableBox* SwFltOutDoc::GetBox(sal_uInt16 ny, sal_uInt16 nx /*= USHRT_MAX */)
{
if(!pTable){
- ASSERT(pTable, "GetBox ohne Tabelle");
+ OSL_ENSURE(pTable, "GetBox ohne Tabelle");
return 0;
}
if( nx == USHRT_MAX ) // aktuelle Zelle
@@ -1393,44 +1388,44 @@ SwTableBox* SwFltOutDoc::GetBox(sal_uInt16 ny, sal_uInt16 nx /*= USHRT_MAX */)
// get structs to table cells
const SwTableLines* pTableLines = &pTable->GetTabLines();
if(!pTableLines){
- ASSERT(sal_False, "SwFltOutDoc:GetBox:pTableLines");
+ OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:pTableLines");
return 0;
}
if( ny >= pTableLines->Count() ){ // Notbremse
- ASSERT( sal_False, "SwFltOutDoc:GetBox:ny >= Count()");
+ OSL_ENSURE( sal_False, "SwFltOutDoc:GetBox:ny >= Count()");
ny = pTableLines->Count() - 1;
}
SwTableLine* pTableLine = (*pTableLines)[ny];
if(!pTableLine){
- ASSERT(sal_False, "SwFltOutDoc:GetBox:pTableLine");
+ OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:pTableLine");
return 0;
}
SwTableBoxes* pTableBoxes = &pTableLine->GetTabBoxes();
if(!pTableBoxes){
- ASSERT(sal_False, "SwFltOutDoc:GetBox:pTableBoxes");
+ OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:pTableBoxes");
return 0;
}
if( nx >= pTableBoxes->Count() ){ // Notbremse
- ASSERT(sal_False, "SwFltOutDoc:GetBox:nx >= Count()");
+ OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:nx >= Count()");
nx = pTableBoxes->Count() - 1;
}
SwTableBox* pTableBox = (*pTableBoxes)[nx];
- ASSERT(pTableBox != 0, "SwFltOutDoc:GetBox:pTableBox");
+ OSL_ENSURE(pTableBox != 0, "SwFltOutDoc:GetBox:pTableBox");
return pTableBox;
}
void SwFltOutDoc::NextTableCell()
{
if(!pTable){
- ASSERT(pTable, "NextTableCell ohne Tabelle");
+ OSL_ENSURE(pTable, "NextTableCell ohne Tabelle");
return;
}
const SwTableLines* pTableLines = &pTable->GetTabLines();
SwTableLine* pTableLine = (*pTableLines)[usTableY];
SwTableBoxes* pTableBoxes = &pTableLine->GetTabBoxes();
SwTableBox* pTableBox = (*pTableBoxes)[usTableX];
- ASSERT(pTableBox != 0, "SwFltOutDoc:NextTableCell:pTableBox");
+ OSL_ENSURE(pTableBox != 0, "SwFltOutDoc:NextTableCell:pTableBox");
if(!pTableBox)
return;
//#pragma message(__FILE__ "(?) : Sw's const problem")
@@ -1445,7 +1440,7 @@ void SwFltOutDoc::NextTableCell()
pTableBoxes->Count());
SeekCell(usTableY, usTableX, sal_True);
pTableBox = (*pTableBoxes)[usTableX];
- ASSERT(pTableBox != 0, "SwFltOutDoc:pTableBox");
+ OSL_ENSURE(pTableBox != 0, "SwFltOutDoc:pTableBox");
if(pTableBox)
(*pTableBoxes)[usTableX]->ClaimFrmFmt();
}
@@ -1469,10 +1464,10 @@ void SwFltOutDoc::NextTableRow()
void SwFltOutDoc::SetTableWidth(SwTwips nSwWidth)
{
if(!pTable){
- ASSERT(pTable, "SetTableWidth ohne Tabelle");
+ OSL_ENSURE(pTable, "SetTableWidth ohne Tabelle");
return;
}
- ASSERT( nSwWidth > MINLAY, "Tabellenbreite <= MINLAY" );
+ OSL_ENSURE( nSwWidth > MINLAY, "Tabellenbreite <= MINLAY" );
if( nSwWidth != nTableWidth ){
if( nTableWidth ) // Nicht beim ersten Setzen
SplitTable();
@@ -1484,7 +1479,7 @@ void SwFltOutDoc::SetTableWidth(SwTwips nSwWidth)
void SwFltOutDoc::SetTableOrient(sal_Int16 eOri)
{
if(!pTable){
- ASSERT(pTable, "SetTableOrient ohne Tabelle");
+ OSL_ENSURE(pTable, "SetTableOrient ohne Tabelle");
return;
}
pTable->GetFrmFmt()->SetFmtAttr( SwFmtHoriOrient( 0, eOri ));
@@ -1493,10 +1488,10 @@ void SwFltOutDoc::SetTableOrient(sal_Int16 eOri)
void SwFltOutDoc::SetCellWidth(SwTwips nWidth, sal_uInt16 nCell /* = USHRT_MAX */ )
{
if(!pTable){
- ASSERT(pTable, "SetCellWidth ohne Tabelle");
+ OSL_ENSURE(pTable, "SetCellWidth ohne Tabelle");
return;
}
- ASSERT( nWidth > MINLAY, "Tabellenzellenbreite <= MINLAY" );
+ OSL_ENSURE( nWidth > MINLAY, "Tabellenzellenbreite <= MINLAY" );
if (nWidth < MINLAY)
nWidth = MINLAY;
@@ -1511,7 +1506,7 @@ void SwFltOutDoc::SetCellWidth(SwTwips nWidth, sal_uInt16 nCell /* = USHRT_MAX *
void SwFltOutDoc::SetCellHeight(SwTwips nHeight)
{
if(!pTable){
- ASSERT(pTable, "SetCellHeight ohne Tabelle");
+ OSL_ENSURE(pTable, "SetCellHeight ohne Tabelle");
return;
}
@@ -1527,7 +1522,7 @@ void SwFltOutDoc::SetCellHeight(SwTwips nHeight)
const SfxPoolItem& SwFltOutDoc::GetCellAttr(sal_uInt16 nWhich)
{
if (!pTable){
- ASSERT(pTable, "GetCellAttr ohne Table");
+ OSL_ENSURE(pTable, "GetCellAttr ohne Table");
return GetDoc().GetAttrPool().GetDefaultItem(nWhich);
}
@@ -1549,7 +1544,7 @@ void SwFltOutDoc::SetCellBorder(const SvxBoxItem& rFmtBox,
void SwFltOutDoc::SetCellSpace(sal_uInt16 nDist)
{
if(!pTable){
- ASSERT(pTable, "SetCellSpace ohne Tabelle");
+ OSL_ENSURE(pTable, "SetCellSpace ohne Tabelle");
return;
}
SwTableBox* pTableBox = GetBox(usTableY, usTableX);
@@ -1584,7 +1579,7 @@ void SwFltOutDoc::SplitTable()
{
if(!pTable)
{
- ASSERT(pTable, "SplitTable ohne Tabelle");
+ OSL_ENSURE(pTable, "SplitTable ohne Tabelle");
return;
}
SwTableBox* pAktBox = GetBox(usTableY, usTableX);
@@ -1597,7 +1592,7 @@ void SwFltOutDoc::SplitTable()
void SwFltOutDoc::EndTable()
{
if (!pTable){
- ASSERT(pTable, "EndTable ohne Table");
+ OSL_ENSURE(pTable, "EndTable ohne Table");
return;
}
// Alle Attribute schliessen, da sonst Attribute
@@ -1630,7 +1625,7 @@ sal_Bool SwFltOutDoc::SeekCell(short nRow, short nCol, sal_Bool bPam)
if ((sal_uInt16)nRow >= pTableLines->Count())
{
- ASSERT((sal_uInt16)nRow >= pTableLines->Count(), "SwFltOutDoc");
+ OSL_ENSURE((USHORT)nRow >= pTableLines->Count(), "SwFltOutDoc");
return sal_False;
}
pTableLine = (*pTableLines)[nRow];
@@ -1640,7 +1635,7 @@ sal_Bool SwFltOutDoc::SeekCell(short nRow, short nCol, sal_Bool bPam)
pTableBox = (*pTableBoxes)[nCol];
if( !pTableBox->GetSttNd() )
{
- ASSERT(pTableBox->GetSttNd(), "SwFltOutDoc");
+ OSL_ENSURE(pTableBox->GetSttNd(), "SwFltOutDoc");
return sal_False;
}
if(bPam)
@@ -1681,12 +1676,14 @@ SfxItemSet* SwFltOutBase::NewFlyDefaults()
sal_Bool SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
sal_Bool bAbsolutePos /*= sal_False*/,
const SfxItemSet*
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
pMoreAttrs /*= 0*/
#endif
)
{
- ASSERT(!pMoreAttrs, "SwFltOutBase:BeginFly mit pMoreAttrs" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE(!pMoreAttrs, "SwFltOutBase:BeginFly mit pMoreAttrs" );
+#endif
eFlyAnchor = eAnchor;
bFlyAbsPos = bAbsolutePos; // Bloedsinn eigentlich
return sal_True;
@@ -1695,11 +1692,11 @@ sal_Bool SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
/*virtual*/ void SwFltOutBase::SetFlyAnchor( RndStdIds eAnchor )
{
if( !IsInFly() ){
- ASSERT( sal_False, "SetFlyAnchor() ohne Fly" );
+ OSL_ENSURE( sal_False, "SetFlyAnchor() ohne Fly" );
return;
}
if ( eAnchor == FLY_AS_CHAR ){
- ASSERT( sal_False, "SetFlyAnchor( FLY_AS_CHAR ) nicht implementiert" );
+ OSL_ENSURE( sal_False, "SetFlyAnchor( FLY_AS_CHAR ) nicht implementiert" );
return;
}
SwFmtAnchor& rAnchor = (SwFmtAnchor&)GetFlyFrmAttr( RES_ANCHOR );
@@ -1730,9 +1727,9 @@ SwFrmFmt* SwFltOutDoc::MakeFly( RndStdIds eAnchor, SfxItemSet* pSet )
return pFly;
}
-sal_Bool SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
- sal_Bool bAbsolutePos /*= sal_False*/,
- const SfxItemSet* pMoreAttrs /*= 0*/ )
+sal_Bool SwFltOutDoc::BeginFly( RndStdIds eAnchor,
+ sal_Bool bAbsolutePos ,
+ const SfxItemSet* pMoreAttrs)
{
SwFltOutBase::BeginFly( eAnchor, bAbsolutePos, 0 );
@@ -1744,7 +1741,7 @@ sal_Bool SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// create Fly:
- ASSERT(pFlySavedPos == NULL, "BeginFly in Fly"); // rekursiv geht noch nicht
+ OSL_ENSURE(pFlySavedPos == NULL, "BeginFly in Fly"); // rekursiv geht noch nicht
pFlySavedPos = new SwPosition(*pPaM->GetPoint());
@@ -1757,7 +1754,6 @@ sal_Bool SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
// dieses NICHT bei Seitengebundenem Fly mit Seiten-NUMMER !
aAnchor.SetAnchor(pPaM->GetPoint()); // braucht erstaunlicherweise
// den Stack nicht
-// aStack.NewAttr( *pPaM->GetPoint(), SwFltAnchor( pFly ) );
pSet->Put( aAnchor );
SwFrmFmt* pF = MakeFly( eAnchor, pSet );
@@ -1765,7 +1761,7 @@ sal_Bool SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
// set pam in Fly
const SwFmtCntnt& rCntnt = pF->GetCntnt();
- ASSERT( rCntnt.GetCntntIdx(), "Kein Inhalt vorbereitet." );
+ OSL_ENSURE( rCntnt.GetCntntIdx(), "Kein Inhalt vorbereitet." );
pPaM->GetPoint()->nNode = rCntnt.GetCntntIdx()->GetIndex() + 1;
SwCntntNode *pNode = pPaM->GetCntntNode();
pPaM->GetPoint()->nContent.Assign( pNode, 0 );
@@ -1778,7 +1774,7 @@ sal_Bool SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
if (pFly){
pFly->SetFmtAttr( rAttr );
}else{
- ASSERT(pFly, "SetFlyAttr ohne Doc-Fly");
+ OSL_ENSURE(pFly, "SetFlyAttr ohne Doc-Fly");
return;
}
}
@@ -1788,7 +1784,7 @@ sal_Bool SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
if (pFly){
return pFly->GetFmtAttr( nWhich );
}else{
- ASSERT(pFly, "GetFlyAttr ohne Fly");
+ OSL_ENSURE(pFly, "GetFlyAttr ohne Fly");
return GetDoc().GetAttrPool().GetDefaultItem(nWhich);
}
}
@@ -1796,7 +1792,7 @@ sal_Bool SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
void SwFltOutDoc::EndFly()
{
if( pTable ){
- ASSERT( sal_False, "SwFltOutDoc::EndFly() in Table" );
+ OSL_ENSURE( sal_False, "SwFltOutDoc::EndFly() in Table" );
return;
}
// Alle Attribute schliessen, da sonst Attribute
@@ -1829,16 +1825,15 @@ void SwFltOutDoc::EndFly()
/*virtual*/ const SfxPoolItem& SwFltFormatCollection::GetFlyFrmAttr(sal_uInt16 nWhich)
{
-// ASSERT( pFlyAttrs, "GetFlyFrmAttr ohne Coll-FlyAttrs" );
if( pFlyAttrs )
return pFlyAttrs->Get( nWhich, sal_False );
else
return GetDoc().GetAttrPool().GetDefaultItem(nWhich);
}
-sal_Bool SwFltFormatCollection::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
- sal_Bool bAbsolutePos /*= sal_False*/,
- const SfxItemSet* pMoreAttrs /*= 0*/ )
+sal_Bool SwFltFormatCollection::BeginFly( RndStdIds eAnchor,
+ sal_Bool bAbsolutePos,
+ const SfxItemSet* pMoreAttrs)
{
SwFltOutBase::BeginFly( eAnchor, bAbsolutePos, pMoreAttrs );
@@ -1852,8 +1847,8 @@ void SwFltFormatCollection::EndFly() // Wird nie aufgerufen
sal_Bool SwFltFormatCollection::BeginStyleFly( SwFltOutDoc* pOutDoc )
{
- ASSERT( pOutDoc, "BeginStyleFly ohne pOutDoc" );
- ASSERT( pOutDoc && !pOutDoc->IsInFly(), "BeginStyleFly in Fly" );
+ OSL_ENSURE( pOutDoc, "BeginStyleFly ohne pOutDoc" );
+ OSL_ENSURE( pOutDoc && !pOutDoc->IsInFly(), "BeginStyleFly in Fly" );
if( pOutDoc && !pOutDoc->IsInFly() )
return pOutDoc->BeginFly( eFlyAnchor, bFlyAbsPos, pFlyAttrs );
else
@@ -1864,16 +1859,15 @@ sal_Bool SwFltFormatCollection::BeginStyleFly( SwFltOutDoc* pOutDoc )
// Flys in SwFltShell
//-----------------------------------------------------------------------------
-sal_Bool SwFltShell::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
- sal_Bool bAbsolutePos /*= sal_False*/ )
-
+sal_Bool SwFltShell::BeginFly( RndStdIds eAnchor,
+ sal_Bool bAbsolutePos)
{
if (pOut->IsInFly()){
- ASSERT(sal_False, "BeginFly in Fly");
+ OSL_ENSURE(sal_False, "BeginFly in Fly");
return sal_False;
}
if (pOutDoc->IsInTable()){
- ASSERT(sal_False, "BeginFly in Table");
+ OSL_ENSURE(sal_False, "BeginFly in Table");
return sal_False;
}
pOut->BeginFly( eAnchor, bAbsolutePos, pColls[nAktStyle]->GetpFlyAttrs() );
@@ -1881,14 +1875,14 @@ sal_Bool SwFltShell::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
return sal_True;
}
-void SwFltShell::SetFlyXPos( short nXPos, sal_Int16 eHRel /*= text::RelOrientation::FRAME*/,
- sal_Int16 eHAlign /*= text::HoriOrientation::NONE*/ )
+void SwFltShell::SetFlyXPos( short nXPos, sal_Int16 eHRel,
+ sal_Int16 eHAlign)
{
SetFlyFrmAttr( SwFmtHoriOrient( nXPos, eHAlign, eHRel ) );
}
-void SwFltShell::SetFlyYPos( short nYPos, sal_Int16 eVRel /*= text::RelOrientation::FRAME*/,
- sal_Int16 eVAlign /*= text::VertOrientation::NONE*/ )
+void SwFltShell::SetFlyYPos( short nYPos, sal_Int16 eVRel,
+ sal_Int16 eVAlign)
{
SetFlyFrmAttr( SwFmtVertOrient( nYPos, eVAlign, eVRel ) );
}
@@ -1897,11 +1891,11 @@ void SwFltShell::SetFlyYPos( short nYPos, sal_Int16 eVRel /*= text::RelOrientati
void SwFltShell::EndFly()
{
if (!pOut->IsInFly()){
- ASSERT(sal_False, "EndFly ohne Fly");
+ OSL_ENSURE(sal_False, "EndFly ohne Fly");
return;
}
if (pOutDoc->IsInTable()){ // Table verschraenkt mit Fly macht keinen Sinn
- ASSERT(sal_False, "EndFly in Table ( verschraenkt )");
+ OSL_ENSURE(sal_False, "EndFly in Table ( verschraenkt )");
EndTable(); // -> Table beenden
}
pOut->EndFly();
@@ -1915,35 +1909,34 @@ void SwFltShell::EndFly()
void SwFltShell::BeginFootnote()
{
if( pOut->IsInFly() ){ // Passiert z.B. bei Fussnote in Fly
- ASSERT(sal_False, "Fussnote in Fly nicht erlaubt");
+ OSL_ENSURE(sal_False, "Fussnote in Fly nicht erlaubt");
return;
}
if( pOutDoc->IsInTable() ){
- ASSERT(sal_False, "Fussnote in Table z.Zt. nicht erlaubt");
+ OSL_ENSURE(sal_False, "Fussnote in Table z.Zt. nicht erlaubt");
return;
}
// Alle Attribute schliessen, da sonst Attribute entstehen koennen,
// die in Fussnoten reinragen
aStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
-// aEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// EndStack erstmal nicht zwangs-Schliessen, damit Bookmarks ueber
// Fussnoten im PMW uebernommen werden
SwFmtFtn aFtn;
GetDoc().InsertPoolItem(*pPaM, aFtn, 0);
- ASSERT(pSavedPos == NULL, "SwFltShell");
+ OSL_ENSURE(pSavedPos == NULL, "SwFltShell");
pSavedPos = new SwPosition(*pPaM->GetPoint());
pPaM->Move(fnMoveBackward, fnGoCntnt);
SwTxtNode* pTxt = pPaM->GetNode()->GetTxtNode();
SwTxtAttr *const pFN = pTxt->GetTxtAttrForCharAt(
pPaM->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
if( !pFN ){ // Passiert z.B. bei Fussnote in Fly
- ASSERT(pFN, "Probleme beim Anlegen des Fussnoten-Textes");
+ OSL_ENSURE(pFN, "Probleme beim Anlegen des Fussnoten-Textes");
return;
}
const SwNodeIndex* pStartIndex = ((SwTxtFtn*)pFN)->GetStartNode();
- ASSERT(pStartIndex, "Probleme beim Anlegen des Fussnoten-Textes");
+ OSL_ENSURE(pStartIndex, "Probleme beim Anlegen des Fussnoten-Textes");
pPaM->GetPoint()->nNode = pStartIndex->GetIndex() + 1;
pPaM->GetPoint()->nContent.Assign(pPaM->GetCntntNode(), 0);
eSubMode = Footnote;
@@ -1956,7 +1949,6 @@ void SwFltShell::EndFootnote()
// Alle Attribute schliessen, da sonst Attribute
// entstehen koennen, die aus Fussnoten rausragen
aStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
-// aEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// EndStack erstmal nicht zwangs-Schliessen, damit Bookmarks ueber
// Fussnoten im PMW uebernommen werden
@@ -1967,15 +1959,14 @@ void SwFltShell::EndFootnote()
void SwFltShell::BeginHeader(SwPageDesc* /*pPD*/)
{
- SwFrmFmt* pFmt = &pCurrentPageDesc->GetMaster(
- ); //(bUseLeft) ? &pCurrentPageDesc->GetLeft() :
+ SwFrmFmt* pFmt = &pCurrentPageDesc->GetMaster();
SwFrmFmt* pHdFtFmt;
pFmt->SetFmtAttr(SwFmtHeader(sal_True));
pHdFtFmt = (SwFrmFmt*)pFmt->GetHeader().GetHeaderFmt();
const SwNodeIndex* pStartIndex = pHdFtFmt->GetCntnt().GetCntntIdx();
if (!pStartIndex)
return;
- ASSERT(pSavedPos == NULL, "SwFltShell");
+ OSL_ENSURE(pSavedPos == NULL, "SwFltShell");
pSavedPos = new SwPosition(*pPaM->GetPoint());
pPaM->GetPoint()->nNode = pStartIndex->GetIndex() + 1;
pPaM->GetPoint()->nContent.Assign(pPaM->GetCntntNode(), 0);
@@ -1984,15 +1975,14 @@ void SwFltShell::BeginHeader(SwPageDesc* /*pPD*/)
void SwFltShell::BeginFooter(SwPageDesc* /*pPD*/)
{
- SwFrmFmt* pFmt = &pCurrentPageDesc->GetMaster(
- ); //(bUseLeft) ? &pCurrentPageDesc->GetLeft() :
+ SwFrmFmt* pFmt = &pCurrentPageDesc->GetMaster();
SwFrmFmt* pHdFtFmt;
pFmt->SetFmtAttr(SwFmtFooter(sal_True));
pHdFtFmt = (SwFrmFmt*)pFmt->GetFooter().GetFooterFmt();
const SwNodeIndex* pStartIndex = pHdFtFmt->GetCntnt().GetCntntIdx();
if (!pStartIndex)
return;
- ASSERT(pSavedPos == NULL, "SwFltShell");
+ OSL_ENSURE(pSavedPos == NULL, "SwFltShell");
pSavedPos = new SwPosition(*pPaM->GetPoint());
pPaM->GetPoint()->nNode = pStartIndex->GetIndex() + 1;
pPaM->GetPoint()->nContent.Assign(pPaM->GetCntntNode(), 0);
@@ -2020,7 +2010,7 @@ SwPageDesc* SwFltShell::MakePageDesc(SwPageDesc* pFirstPageDesc)
// fuer dopp. Namen ist gering)
nPos = GetDoc().MakePageDesc( ViewShell::GetShellRes()->GetPageDescName(
- GetDoc().GetPageDescCnt(), sal_False, bFollow ),
+ GetDoc().GetPageDescCnt(), bFollow ? ShellResource::FOLLOW_PAGE : ShellResource::NORMAL_PAGE),
pFirstPageDesc, sal_False );
pNewPD = &((SwPageDesc&)const_cast<const SwDoc &>(GetDoc()).
@@ -2062,8 +2052,8 @@ SwFltFormatCollection::SwFltFormatCollection(
void SwFltShell::NextStyle(sal_uInt16 nWhich, sal_uInt16 nNext)
{
- ASSERT(pColls[nWhich], "Next style for noexistent style" );
- ASSERT(pColls[nNext], "Next style to noexistent style" );
+ OSL_ENSURE(pColls[nWhich], "Next style for noexistent style" );
+ OSL_ENSURE(pColls[nNext], "Next style to noexistent style" );
if( pColls[nWhich] && pColls[nNext] )
pColls[nWhich]->GetColl()->SetNextTxtFmtColl(
*pColls[nNext]->GetColl() );
@@ -2084,4 +2074,4 @@ void UpdatePageDescs(SwDoc &rDoc, sal_uInt16 nInPageDescOffset)
rDoc.ChgPageDesc(i, const_cast<const SwDoc &>(rDoc).GetPageDesc(i));
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww1/w1class.cxx b/sw/source/filter/ww1/w1class.cxx
index 9f7ddb08093c..caf5b4d01652 100644
--- a/sw/source/filter/ww1/w1class.cxx
+++ b/sw/source/filter/ww1/w1class.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,9 +33,7 @@
#include <string.h>
#include <tools/stream.hxx>
-#ifndef _W1CLASS_HXX
#include <w1class.hxx>
-#endif
#ifdef DUMP
@@ -119,7 +118,7 @@ sal_uInt16 Ww1Style::ReadName( sal_uInt8*&p, sal_uInt16& rnCountBytes, sal_uInt1
rnCountBytes--;
if( !nCountBytes ) // default
{
- static const sal_Char* __READONLY_DATA names[] =
+ static const sal_Char* const names[] =
{
"W1 Null", //222
"W1 Annotation reference", //223
@@ -502,7 +501,6 @@ sal_uInt16 Ww1SingleSprmByteSized::Size(sal_uInt8* pSprm)
sal_uInt16 nRet;
nRet = SVBT8ToByte(pSprm);
nRet += sizeof(SVBT8); // var. l. byte-size
-// pSprm += sizeof(SVBT8); // var. l. byte-size
nRet = nRet + nCountBytes;
return nRet;
}
@@ -512,7 +510,6 @@ sal_uInt16 Ww1SingleSprmWordSized::Size(sal_uInt8* pSprm)
sal_uInt16 nRet;
nRet = SVBT16ToShort(pSprm);
nRet += sizeof(SVBT16); // var. l. word-size
-// pSprm += sizeof(SVBT16); // var. l. word-size
nRet = nRet + nCountBytes;
return nRet;
}
@@ -521,7 +518,6 @@ static sal_uInt8 nLast = 0;
static sal_uInt8 nCurrent = 0;
sal_uInt16 Ww1Sprm::GetSize(sal_uInt8 nId, sal_uInt8* pSprm)
{
- //DBG_ASSERT( nId < sizeof(aTab) / sizeof(*aTab), "Ww1Sprm" );
sal_uInt16 nL = 0;
nL = GetTab(nId).Size(pSprm);
nLast = nCurrent;
@@ -531,7 +527,6 @@ sal_uInt16 Ww1Sprm::GetSize(sal_uInt8 nId, sal_uInt8* pSprm)
sal_Bool Ww1Sprm::Fill(sal_uInt16 index, sal_uInt8& nId, sal_uInt16& nL, sal_uInt8*& pSprm)
{
- //DBG_ASSERT( nId < sizeof(aTab) / sizeof(*aTab), "Ww1Sprm");
DBG_ASSERT(index < Count(), "Ww1Sprm");
pSprm = p + pArr[index];
nId = SVBT8ToByte(pSprm);
@@ -797,20 +792,6 @@ sal_uInt8* Ww1Plc::GetData(sal_uInt16 nIndex)
return pRet;
}
-/////////////////////////////////////////////////////////////////// Sep
-
-//////////////////////////////////////////////////////////////// PlcSep
-
-//////////////////////////////////////////////////////////////// PlcPap
-
-//////////////////////////////////////////////////////////////// PlcChp
-
-//////////////////////////////////////////////////////////////// PlcFnr
-
-///////////////////////////////////////////////////////////// PlcFnText
-
-///////////////////////////////////////////////////////////// PlcFields
-
///////////////////////////////////////////////////////////// PlcBookmarks
// class Ww1StringList liest im Ctor eine Anzahl von P-Strings aus dem Stream
// in den Speicher und patcht sie zu C-Strings um.
@@ -994,7 +975,6 @@ sal_Bool Ww1FkpPap::Fill(sal_uInt16 nIndex, sal_uInt8*& p, sal_uInt16& rnCountBy
if (nOffset)
{
DBG_ASSERT(nOffset>(sal_uInt16)(Count()*sizeof(SVBT32)), "calc error");
-// rnCountBytes = SVBT8ToByte(aFkp+nOffset) * 2 + 1; // SH: +1 ?????
rnCountBytes = SVBT8ToByte(aFkp+nOffset) * 2;
nOffset += sizeof(SVBT8);
if( nOffset + rnCountBytes < 511 ) // SH: Assert schlug 1 zu frueh zu
@@ -1096,7 +1076,6 @@ sal_uLong Ww1Pap::Where( sal_Bool bSetIndex )
nFkpIndex = 0;
}
if (pPap != NULL)
-// if (nFkpIndex < pPap->Count())
if (nFkpIndex <= pPap->Count())
ulRet = pPap->Where(nFkpIndex) - rFib.GetFIB().fcMinGet();
return ulRet;
@@ -1105,7 +1084,6 @@ sal_uLong Ww1Pap::Where( sal_Bool bSetIndex )
void Ww1Pap::operator++(int)
{
if (pPap != NULL)
-// if (++nFkpIndex >= pPap->Count())
if (++nFkpIndex > pPap->Count())
{
delete pPap;
@@ -1197,7 +1175,6 @@ sal_uLong Ww1Chp::Where( sal_Bool bSetIndex )
nFkpIndex = 0;
}
if (pChp != NULL)
-// if (nFkpIndex < pChp->Count())
if (nFkpIndex <= pChp->Count())
ulRet = pChp->Where(nFkpIndex) -
rFib.GetFIB().fcMinGet() - ulOffset;
@@ -1207,7 +1184,6 @@ sal_uLong Ww1Chp::Where( sal_Bool bSetIndex )
void Ww1Chp::operator++(int)
{
if (pChp != NULL)
-// if (++nFkpIndex >= pChp->Count())
if (++nFkpIndex > pChp->Count())
{
delete pChp;
@@ -1254,3 +1230,5 @@ sal_Bool Ww1Manager::HasPDxaAbs()
{
return aPap.HasId(26); // Ww1SingleSprmPDxaAbs
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww1/w1class.hxx b/sw/source/filter/ww1/w1class.hxx
index a018b42a9d8c..bb156851f8f0 100644
--- a/sw/source/filter/ww1/w1class.hxx
+++ b/sw/source/filter/ww1/w1class.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#include <tools/debug.hxx>
// local
-#ifndef _W1STRUCT_HXX
#include <w1struct.hxx>
-#endif
#ifdef DUMP
#include <fstream.h>
@@ -268,7 +267,6 @@ public:
void SetParent(Ww1StyleSheet* newParent) { pParent = newParent; }
void SetName(const String& rName) { bUsed = sal_True; aName = rName; }
const String& GetName() const { return aName; }
-// Ww1Style& GetNext();
Ww1Style& GetBase();
sal_uInt16 GetnBase() const { return stcBase; }
sal_uInt16 GetnNext() const { return stcNext; }
@@ -391,7 +389,6 @@ public:
class Ww1SingleSprmByteSized : public Ww1SingleSprm {
public:
-// ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
sal_uInt16 Size(sal_uInt8*);
Ww1SingleSprmByteSized(sal_uInt16 nBytes, sal_Char* sName = 0) :
Ww1SingleSprm(nBytes, sName) {
@@ -400,7 +397,6 @@ public:
class Ww1SingleSprmWordSized : public Ww1SingleSprm {
public:
-// ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
sal_uInt16 Size(sal_uInt8*);
Ww1SingleSprmWordSized(sal_uInt16 nBytes, sal_Char* sName = 0) :
Ww1SingleSprm(nBytes, sName) {
@@ -410,7 +406,6 @@ public:
class Ww1SingleSprmByte : public Ww1SingleSprm {
public:
ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
-// sal_uInt16 Size(sal_uInt8*);
Ww1SingleSprmByte(sal_Char* sName = 0) :
Ww1SingleSprm(1, sName) {
}
@@ -419,7 +414,6 @@ public:
class Ww1SingleSprmBool : public Ww1SingleSprmByte {
public:
ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
-// sal_uInt16 Size(sal_uInt8*);
Ww1SingleSprmBool(sal_Char* sName = 0) :
Ww1SingleSprmByte(sName) {
}
@@ -428,7 +422,6 @@ public:
class Ww1SingleSprm4State : public Ww1SingleSprmByte {
public:
ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
-// sal_uInt16 Size(sal_uInt8*);
Ww1SingleSprm4State(sal_Char* sName = 0) :
Ww1SingleSprmByte(sName) {
}
@@ -437,7 +430,6 @@ public:
class Ww1SingleSprmWord : public Ww1SingleSprm {
public:
ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
-// sal_uInt16 Size(sal_uInt8*);
Ww1SingleSprmWord(sal_Char* sName = 0)
: Ww1SingleSprm(2, sName) {}
};
@@ -445,7 +437,6 @@ public:
class Ww1SingleSprmLong : public Ww1SingleSprm {
public:
ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
-// sal_uInt16 Size(sal_uInt8*);
Ww1SingleSprmLong(sal_Char* sName = 0) :
Ww1SingleSprm(4, sName) {
}
@@ -530,7 +521,6 @@ public:
class Ww1SingleSprmPBrc : public Ww1SingleSprmWord {
protected:
-// SvxBorderLine* SetBorder(SvxBorderLine*, W1_BRC*);
// spezielle start-routine, je nach sprm verschieden versorgt
// mit einem BoxItem.
void Start(Ww1Shell&, sal_uInt8, W1_BRC10*, sal_uInt16, Ww1Manager&, SvxBoxItem&);
@@ -651,14 +641,6 @@ public:
: Ww1SingleSprmWord(sName) {}
};
-//class Ww1SingleSprmTDxaLeft : public Ww1SingleSprmWord {
-//public:
-// Ww1SingleSprmTDxaLeft(sal_Char* sName) :
-// Ww1SingleSprmWord(sName) {
-// }
-// void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
-//};
-
class Ww1SingleSprmTDxaGapHalf : public Ww1SingleSprmWord {
public:
Ww1SingleSprmTDxaGapHalf(sal_Char* sName) :
@@ -686,57 +668,6 @@ public:
// Klassendefinitionen fuer Tabellen-Fastsave-Attribute
// Da wir kein Fastsave unterstuetzen, brauchen wir's nicht
-#if 0
-
-class Ww1SingleSprmTInsert : public Ww1SingleSprm {
-public:
- Ww1SingleSprmTInsert(sal_Char* sName) :
- Ww1SingleSprm(4, sName) {
- }
- void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
-};
-
-class Ww1SingleSprmTDelete : public Ww1SingleSprmWord {
-public:
- Ww1SingleSprmTDelete(sal_Char* sName) :
- Ww1SingleSprmWord(sName) {
- }
- void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
-};
-
-class Ww1SingleSprmTDxaCol : public Ww1SingleSprm {
-public:
- Ww1SingleSprmTDxaCol(sal_Char* sName) :
- Ww1SingleSprm(4, sName) {
- }
- void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
-};
-
-class Ww1SingleSprmTMerge : public Ww1SingleSprmWord {
-public:
- Ww1SingleSprmTMerge(sal_Char* sName) :
- Ww1SingleSprmWord(sName) {
- }
- void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
-};
-
-class Ww1SingleSprmTSplit : public Ww1SingleSprmWord {
-public:
- Ww1SingleSprmTSplit(sal_Char* sName) :
- Ww1SingleSprmWord(sName) {
- }
- void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
-};
-
-class Ww1SingleSprmTSetBrc10 : public Ww1SingleSprm {
-public:
- Ww1SingleSprmTSetBrc10(sal_Char* sName) :
- Ww1SingleSprm(5, sName) {
- }
- void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
-};
-#endif // 0
-
// Klassendefinitionen fuer Apos ( == Flys )
class Ww1SingleSprmPpc : public Ww1SingleSprmByte {
@@ -987,7 +918,6 @@ public:
///////////////////////////////////////////////////////////// PlcFields
class Ww1PlcFields : public Ww1Plc
{
- //sal_uInt16 Fill(sal_uInt16, sal_uInt8&, String&, String&, String&);
public:
Ww1PlcFields(Ww1Fib& rFibL, sal_uLong start, sal_uInt16 nBytes)
: Ww1Plc(rFibL, start, nBytes, 2)
@@ -1024,7 +954,6 @@ public:
class Ww1PlcBookmarkPos : public Ww1Plc
{
-// sal_uInt16 Fill(sal_uInt16, sal_uInt8&, String&, String&, String&);
public:
Ww1PlcBookmarkPos(Ww1Fib& _rFib, sal_uLong start, sal_uInt16 nBytes, sal_Bool bEnd)
: Ww1Plc(_rFib, start, nBytes, (bEnd) ? 0 : 2)
@@ -1040,7 +969,6 @@ public:
? Ww1Plc::Where(nIndex) + rFib.GetFIB().fcMinGet()
: 0xffffffff;
}
-// friend ostream& operator <<(ostream&, Ww1PlcBookmarks&);
};
//////////////////////////////////////////////////////////////// PlcHdd
@@ -1199,7 +1127,6 @@ public:
if (grpfIhdt & 0x0002) nFtnFollowSep = nextIhdd++;
if (grpfIhdt & 0x0004) nFtnNote = nextIhdd++;
}
-// ~Ww1HeaderFooter() {}
void SetGrpfIhdt(sal_uInt16 grpfIhdt)
{
if (grpfIhdt & 0x0001) nEvenHeadL = nextIhdd++;
@@ -1301,7 +1228,6 @@ public:
Ww1Fields(Ww1Fib& rFibL, sal_uLong ulFilePos, sal_uInt16 nBytes)
: Ww1PlcFields(rFibL, ulFilePos, nBytes), nPlcIndex(0), pField(0)
{}
-// ~Ww1Fields() {}
// innerhalb des textes
sal_uLong Where() { return Where(nPlcIndex); }
void operator++(int)
@@ -1368,8 +1294,6 @@ class Ww1Bookmarks
sal_uInt16 nPlcIdx[2];
sal_uInt16 nIsEnd;
sal_Bool bOK;
-// sal_uLong Where(sal_uInt16 nIndex) { // innerhalb des textes
-// return Ww1PlcFields::Where(nIndex) - rFib.GetFIB().fcMinGet(); }
public:
Ww1Bookmarks(Ww1Fib& rFib);
~Ww1Bookmarks()
@@ -1400,7 +1324,6 @@ public:
Ww1Footnotes(Ww1Fib& rFibL)
: Ww1PlcFootnoteRef(rFibL), nPlcIndex(0), aText(rFibL), bStarted(sal_False)
{}
-// ~Ww1Footnotes() {}
// innerhalb des textes
sal_uLong Where()
{
@@ -1435,7 +1358,6 @@ public:
void SetGrpfIhdt(sal_uInt8 grpfIhdt)
{
GetHdd().SetGrpfIhdt(grpfIhdt);
-// GetHdd().Start(rOut, rMan);
}
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell& rOut, Ww1Manager& rMan, sal_Unicode& c)
@@ -1647,3 +1569,5 @@ public:
void Push1(Ww1PlainText* pDoc, sal_uLong ulSeek, sal_uLong ulSeek2 = 0,
Ww1Fields* = 0);
};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index b27c2c2b2f11..e0feb5bc1791 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,18 +34,14 @@
#include <comphelper/string.hxx>
#include <editeng/paperinf.hxx>
#include <svtools/filter.hxx>
-#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
-#endif
#include <editeng/fontitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/crsditem.hxx>
-#ifndef _SVX_CNTRITEM_HXX //autogen
#include <editeng/cntritem.hxx>
-#endif
#include <editeng/cmapitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/udlnitem.hxx>
@@ -52,9 +49,7 @@
#include <editeng/colritem.hxx>
#include <editeng/kernitem.hxx>
#include <editeng/escpitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <editeng/tstpitem.hxx>
-#endif
#include <svl/urihelper.hxx>
#include <fmtfsize.hxx>
#include <doc.hxx>
@@ -73,9 +68,7 @@
#include <docsh.hxx>
#include <swerror.h>
#include <mdiexp.hxx>
-#ifndef _STATSTR_HRC
#include <statstr.hrc>
-#endif
#if OSL_DEBUG_LEVEL > 1
#include <stdio.h>
#endif
@@ -260,7 +253,6 @@ void Ww1Manager::Out(Ww1Shell& rOut, sal_Unicode cUnknown)
break;
case 0x0b: // linebreak
if (rOut.IsInTable())
-// rOut.NextBand(); // war Stuss
;
else
rOut.NextLine();
@@ -409,7 +401,6 @@ void Ww1Footnotes::Stop(Ww1Shell& /*rOut*/, Ww1Manager& rMan, sal_Unicode& c)
if (bStarted && rMan.Where() > Where())
{
DBG_ASSERT(nPlcIndex < Count(), "Ww1Footnotes");
-// DBG_ASSERT(c==0x02, "Ww1Footnotes"); // scheint Stuss zu sein
c = ' ';
(*this)++;
}
@@ -492,7 +483,7 @@ static WWDateTime GetTimeDatePara( const String& rForm,
if( STRING_NOTFOUND != nDPos ) // Monat -> Datum ?
{
- static SwDateFormat __READONLY_DATA aDateA[32] =
+ static SwDateFormat const aDateA[32] =
{
DFF_DMY, DFF_DMMY, DFF_DMYY, DFF_DMMYY,
DFF_DMMMY, DFF_DMMMY, DFF_DMMMYY, DFF_DMMMYY,
@@ -643,10 +634,7 @@ oncemore:
REF_BOOKMARK,
0,
REF_CONTENT );
-// pField = new SwGetExpField((SwGetExpFieldType*)
-// rOut.GetSysFldType(RES_GETEXPFLD), sFormel, nsSwGetSetExpType::GSE_STRING);
-// ,
-// nsSwGetSetExpType::GSE_STRING, VVF_SYS);
+
break;
case 6: // set command
{
@@ -861,10 +849,6 @@ oncemore:
break;
aFName.SearchAndReplaceAscii( "\\\\", String( '\\' ));
-// char* pBook = FindNextPara( pNext, 0 ); //!! Bookmark/Feld-Name
-// //!! erstmal nicht
-
-// ConvertFFileName( aPara, pFName ); //!! WW1 ????
aFName = URIHelper::SmartRel2Abs(
INetURLObject(rOut.GetBaseURL()), aFName );
@@ -897,9 +881,6 @@ oncemore:
pField = new SwSetExpField((SwSetExpFieldType*)pFT, aStr );
((SwSetExpField*)pField)->SetInputFlag( sal_True );
((SwSetExpField*)pField)->SetSubType(nsSwExtendedSubType::SUB_INVISIBLE);
-// pField.SetPromptText( aQ ); //!! fehlt noch
-// aFld.SetPar2( aDef ); //!! dito
- // das Ignorieren des Bookmarks ist nicht implementiert
}
case 39: // fillin command
pField = new SwInputField(
@@ -970,9 +951,6 @@ oncemore:
case 4: // index entry
// wwpar5: 1351/1454
case 5: // footnote ref
-// pField = new SwGetRefField(
-// (SwGetRefFieldType*)rDoc.GetSysFldType(RES_GETREFFLD),
-// sFormel, REF_FOOTNOTE, 0, REF_BEGIN);
case 7: // if command
case 8: // create index
// wwpar5: 1351/1454
@@ -1083,7 +1061,6 @@ void Ww1Pap::Stop(Ww1Shell& rOut, Ww1Manager& rMan, sal_Unicode&)
aSprm.Stop(rOut, rMan);
}else{
DBG_ASSERT( !nPlcIndex || rMan.IsStopAll(), "Pap-Attribut-Stop verloren" );
-// rMan.IsStopAll() ist nicht schoen.
}
}
}
@@ -1462,7 +1439,6 @@ SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode)
void Ww1Dop::Out(Ww1Shell& rOut)
{
//~ mdt: fehlt
- // aDop.fWidowControlGet(); // keine Absatztrennung fuer einzelne Zeilen
long nDefTabSiz = aDop.dxaTabGet();
if (nDefTabSiz < 56)
nDefTabSiz = 709;
@@ -1494,7 +1470,6 @@ void Ww1Dop::Out(Ww1Shell& rOut)
case 2: aInfo.ePos = FTNPOS_PAGE; break;
default: aInfo.ePos = FTNPOS_CHAPTER; break;
}
-// aInfo.eNum = ( rDOP.fFtnRestartGet() ) ? FTNNUM_CHAPTER : FTNNUM_DOC;
// Da Sw unter Chapter anscheinend was anderes versteht als PMW
// hier also immer Doc !
aInfo.eNum = FTNNUM_DOC;
@@ -1647,12 +1622,7 @@ void Ww1StyleSheet::OutOne(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc)
{
const RES_POOL_COLLFMT_TYPE RES_NONE = RES_POOLCOLL_DOC_END;
RES_POOL_COLLFMT_TYPE aType = RES_NONE;
-// aType = RES_POOLCOLL_JAKETADRESS; break;
-// aType = RES_POOLCOLL_LISTS_BEGIN; break;
-// aType = RES_POOLCOLL_SENDADRESS; break;
-// aType = RES_POOLCOLL_SIGNATURE; break;
-// aType = RES_POOLCOLL_TEXT_NEGIDENT; break;
-// aType = RES_POOLCOLL_TOX_IDXH; break;
+
switch (stc)
{
case 222: // Null
@@ -1725,7 +1695,6 @@ void Ww1StyleSheet::OutOne(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc)
aType = RES_POOLCOLL_TEXT_IDENT; break;
case 0: // Normal
aType = RES_POOLCOLL_STANDARD; break;
-// aType = RES_POOLCOLL_TEXT; break; // Das ist "textkoerper"
}
if (aType == RES_NONE)
rOut.BeginStyle(stc, GetStyle(stc).GetName() );
@@ -1734,7 +1703,6 @@ void Ww1StyleSheet::OutOne(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc)
OutDefaults(rOut, rMan, stc);
GetStyle(stc).Out(rOut, rMan);
rOut.EndStyle();
-// rMan.SetInApo(sal_False);
}
// OutOneWithBase() liest einen Style mit OutOne() einen Style ein
// Jedoch liest er, wenn noch nicht geschehen, den Basisstyle rekursiv ein
@@ -1801,8 +1769,8 @@ void Ww1Picture::WriteBmp(SvStream& rOut)
sal_uInt16 padx = ((maxx + 7) / 8) * 8;
sal_uInt16 maxy = pPic->mfp.yExtGet();
- /*sal_uInt16 unknown1 = SVBT16ToShort(p);*/ p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
- /*sal_uInt16 unknown2 = SVBT16ToShort(p);*/ p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
+ p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
+ p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
#if OSL_DEBUG_LEVEL > 1
sal_uInt16 x = SVBT16ToShort(p);
(void) x;
@@ -1962,13 +1930,11 @@ void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/)
String aDir( (sal_Char*)pPic->rgbGet(),
(sal_uInt16)(pPic->lcbGet() - (sizeof(*pPic)-sizeof(pPic->rgb))),
RTL_TEXTENCODING_MS_1252 );
- //SvFileStream aOut(aDir, STREAM_READ|STREAM_WRITE|STREAM_TRUNC);
+
rOut.AddGraphic( aDir );
}
break;
case 97: // embedded bitmap
-// case 99: // SH: bei meinem BspDoc 41738.doc auch embedded Bitmap,
- // aber leider anderes Format
{
sal_uLong nSiz = GuessPicSize(pPic);
SvMemoryStream aOut(nSiz, 8192);
@@ -2052,12 +2018,11 @@ void Ww1HeaderFooter::Start(Ww1Shell& rOut, Ww1Manager& rMan)
void Ww1HeaderFooter::Stop(Ww1Shell& rOut, Ww1Manager& rMan, sal_Unicode&)
{
- if (!rMan.Pushed() && eHeaderFooterMode != None
-// && rMan.GetText().Where() >= rMan.GetText().Count()
- )
+ if (!rMan.Pushed() && eHeaderFooterMode != None)
{
Start(rOut, rMan);
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww1/w1par.cxx b/sw/source/filter/ww1/w1par.cxx
index a6fcef57890c..0f0b1f4beaff 100644
--- a/sw/source/filter/ww1/w1par.cxx
+++ b/sw/source/filter/ww1/w1par.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,14 +35,10 @@
#include <ndtxt.hxx> // class SwTxtNode
#include <fltini.hxx> // Ww1Reader
#include <w1par.hxx>
-#ifndef _SWFLTOPT_HXX
#include <swfltopt.hxx>
-#endif
#include <mdiexp.hxx> // StatLine...()
#include <swerror.h> // ERR_WW1_...
-#ifndef _STATSTR_HRC
#include <statstr.hrc> // ResId fuer Statusleiste
-#endif
//----------------------------------------
// Initialisieren der Feld-FilterFlags
@@ -76,7 +73,7 @@ static sal_uLong WW1_Read_FieldIniFlags()
sal_uLong WW1Reader::Read(SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam, const String& /*cName*/)
{
sal_uLong nRet = ERR_SWG_READ_ERROR;
- ASSERT(pStrm!=NULL, "W1-Read ohne Stream");
+ OSL_ENSURE(pStrm!=NULL, "W1-Read ohne Stream");
if (pStrm != NULL)
{
sal_Bool bNew = !bInsertMode; // Neues Doc ( kein Einfuegen )
@@ -139,3 +136,4 @@ Ww1Shell::Ww1Shell( SwDoc& rD, SwPaM& rPam, const String& rBaseURL, sal_Bool bNe
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww1/w1par.hxx b/sw/source/filter/ww1/w1par.hxx
index 2db214f0ceb1..33c4c14b78dd 100644
--- a/sw/source/filter/ww1/w1par.hxx
+++ b/sw/source/filter/ww1/w1par.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#define _W1PAR_HXX
#include <fltshell.hxx>
-#ifndef _W1CLASS_HXX
#include <w1class.hxx>
-#endif
////////////////////////////////////////////////////////////// Ww1Shell
class Ww1Shell : public SwFltShell
@@ -43,3 +42,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx
index f652ee31d877..584ca7a73291 100644
--- a/sw/source/filter/ww1/w1sprm.cxx
+++ b/sw/source/filter/ww1/w1sprm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,7 +48,6 @@
#include <charatr.hxx>
#include <frmatr.hxx>
#include <doc.hxx>
-#include <errhdl.hxx>
#include <fltini.hxx>
#include <docufld.hxx>
#include <pagedesc.hxx>
@@ -65,7 +65,6 @@ using namespace ::com::sun::star;
void Ww1Sprm::Stop( Ww1Shell& rOut, Ww1Manager& rMan)
{
if(IsUsed())
-// for(sal_uInt16 i=0;i<Count();i++)
for(short i=Count()-1;i>=0;i--){ // rueckwaerts
sal_uInt8 nId;
sal_uInt16 nSize;
@@ -102,7 +101,7 @@ void Ww1SingleSprm::Start(
void Ww1SingleSprm::Stop(
Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&)
{
-// ASSERT(sal_False, "Unknown Sprm");
+// OSL_ENSURE(FALSE, "Unknown Sprm");
}
////////////////////////////////////////////////////////////////// STOP
@@ -168,7 +167,7 @@ STOP1(Ww1SingleSprmPDxa, RES_LR_SPACE)
void Ww1SingleSprmPJc::Start(
Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
- static SvxAdjust __READONLY_DATA aAdj[] = {
+ static SvxAdjust const aAdj[] = {
SVX_ADJUST_LEFT,
SVX_ADJUST_CENTER,
SVX_ADJUST_RIGHT,
@@ -208,39 +207,49 @@ STOP1(Ww1SingleSprmPPageBreakBefore, RES_BREAK)
SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc)
{
sal_uInt16 nCode;
+ SvxBorderStyle eStyle = SOLID;
if(pBrc->dxpLine2WidthGet() == 0)
{
switch(pBrc->dxpLine1WidthGet())
{
- default: ASSERT(sal_False, "unknown linewidth");
+ default: OSL_ENSURE(sal_False, "unknown linewidth");
case 0: return 0; // keine Linie
case 1: nCode = DEF_LINE_WIDTH_0; break;
case 2: nCode = DEF_LINE_WIDTH_1; break;
case 3: nCode = DEF_LINE_WIDTH_2; break;
case 4: nCode = DEF_LINE_WIDTH_3; break;
case 5: nCode = DEF_LINE_WIDTH_4; break;
+ case 6:
+ nCode = DEF_LINE_WIDTH_5;
+ eStyle = DOTTED;
+ break;
+ case 7:
+ nCode = DEF_LINE_WIDTH_5;
+ eStyle = DASHED;
+ break;
}
pLine->SetOutWidth(nCode);
pLine->SetInWidth(0);
+ pLine->SetStyle( eStyle );
}
else
{
switch(pBrc->dxpLine1WidthGet())
{
- default: ASSERT(sal_False, "unknown linewidth");
+ default: OSL_ENSURE(sal_False, "unknown linewidth");
case 1: nCode = DEF_DOUBLE_LINE0_IN; break;
}
pLine->SetOutWidth(nCode);
switch(pBrc->dxpLine2WidthGet())
{
- default: ASSERT(sal_False, "unknown linewidth");
+ default: OSL_ENSURE(sal_False, "unknown linewidth");
case 1: nCode = DEF_DOUBLE_LINE0_OUT; break;
}
pLine->SetInWidth(nCode);
}
switch(pBrc->dxpLine1WidthGet())
{
- default: ASSERT(sal_False, "unknown space");
+ default: OSL_ENSURE(sal_False, "unknown space");
case 0: nCode = DEF_DOUBLE_LINE0_DIST; break;
case 1: nCode = DEF_DOUBLE_LINE1_DIST; break;
case 2: nCode = DEF_DOUBLE_LINE2_DIST; break;
@@ -254,14 +263,16 @@ void Ww1SingleSprmPBrc::Start(
Ww1Shell& rOut, sal_uInt8,
W1_BRC10* pBrc,
sal_uInt16
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
nSize
#endif
,
Ww1Manager& /*rMan*/,
SvxBoxItem& aBox)
{
- ASSERT(sizeof(W1_BRC10) == nSize, "sizemissmatch");
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE(sizeof(W1_BRC10) == nSize, "sizemissmatch");
+#endif
if(pBrc->dxpSpaceGet())
aBox.SetDistance(10 + 20 * pBrc->dxpSpaceGet());
//??? Warum 10+... ????
@@ -285,7 +296,7 @@ void Ww1SingleSprmPBrc::Start(
STOP2(Ww1SingleSprmPBrc, RES_BOX, RES_SHADOW)
-static sal_uInt16 __READONLY_DATA nBrcTrans[BRC_ANZ] =
+static sal_uInt16 nBrcTrans[BRC_ANZ] =
{ BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT };
void Ww1SingleSprmPBrc10::Start(
@@ -297,7 +308,6 @@ void Ww1SingleSprmPBrc10::Start(
rOut.GetFlyFrmAttr(RES_BOX) :rOut.GetAttr(RES_BOX));
const SvxBoxItem &rBoxItem = (const SvxBoxItem&)rItem;
SvxBoxItem aBox( rBoxItem );
-// rOut >> aBox;
SvxBorderLine aLine;
aBox.SetLine(SetBorder(&aLine, pBrc), nBrcTrans[nLine] );
Ww1SingleSprmPBrc::Start(rOut, nId, pBrc, nSize, rMan, aBox);
@@ -355,12 +365,8 @@ void Ww1SingleSprmPDyaLine::Start(
void Ww1SingleSprmPChgTabsPapx::Start(
Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
-#if OSL_DEBUG_LEVEL > 1
-// rOut << 'T';
-#endif
+
short nLeftPMgn = 0; // Koordinaten etwa gleich ??
-// ( pAktColl ) ? pCollA[nAktColl].nLeftParaMgn
-// : nLeftParaMgn; // Absatz L-Space
short i;
sal_uInt8 nDel = pSprm[1];
@@ -454,15 +460,16 @@ void Ww1SingleSprmPFInTable::Start(
void Ww1SingleSprmPFInTable::Stop(
Ww1Shell&
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
rOut
#endif
,
sal_uInt8, sal_uInt8*, sal_uInt16,
Ww1Manager& rMan)
{
- ASSERT(rOut.IsInTable(), "");
- rMan.SetInTtp( sal_False );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE(rOut.IsInTable(), "");
+#endif
}
void Ww1SingleSprmTDxaGapHalf::Start(
@@ -490,8 +497,6 @@ void Ww1SingleSprmTDefTable10::Start(
// Erstmal die Zellenpositionen einlesen
short nPos = SVBT16ToShort( p ); // signed, kann auch neg. sein !!!
-// if( !rOut.IsTableWidthSet() ){ // Muss Tabellenbreite und -Ausrichtung
- // noch gesetzt werden ?
{
short nWholeWidth = SVBT16ToShort( p + 2 * nCount ) - nPos;
rOut.SetTableWidth( (sal_uInt16)nWholeWidth ); // Tabellenbreite setzen
@@ -537,7 +542,6 @@ void Ww1SingleSprmTDefTable10::Start(
if( pTc0 ){ // gibts TCs ueberhaupt ?
W1_TC* pTc2 = (W1_TC*)pTc0;
sal_Bool bMerged2 = pTc2->fMergedGet();
-// ASSERT( !bMerged2, "Gemergte Tabellenzellen noch nicht vollstaendig implementiert" );
if( !bMerged2 ){
// und nun die Umrandungen
SvxBoxItem aBox( (SvxBoxItem&)rOut.GetCellAttr( RES_BOX ));
@@ -578,31 +582,15 @@ void Ww1SingleSprmPpc::Start(
return; // nicht
RndStdIds eAnchor; // Bindung
- sal_Int16 eHRel; // Seite oder Seitenrand
- sal_Int16 eVRel; // Seite oder Seitenrand
-
- switch ( ( nPpc & 0x30 ) >> 4 ){ // Y - Bindung bestimmt Sw-Bindung
- case 0: eAnchor = FLY_AT_PARA; // Vert Margin
- eVRel = text::RelOrientation::PRINT_AREA;
-// if( nYPos < 0 )
-// nYPos = 0; // koennen wir nicht
- break;
-/* case 1:*/ // Vert. Seite
- default:eAnchor = FLY_AT_PAGE; // Vert Page oder unknown
- eVRel = text::RelOrientation::FRAME;
- break; // 2=Vert. Paragraph, 3=Use Default
- }
- switch ( ( nPpc & 0xc0 ) >> 6 ){ // X - Bindung -> Koordinatentransformation
- case 0: // Hor. Spalte
- case 1: // Hor. Absatz
- eHRel = text::RelOrientation::PRINT_AREA;
-// nXPos += nPgLeft; // in Seiten-Koordinaten umrechnen
- break;
-/* case 2:*/ // Hor. Seite
- default:
- eHRel = text::RelOrientation::FRAME;
+ switch ( ( nPpc & 0x30 ) >> 4 ) // Y - Bindung bestimmt Sw-Bindung
+ {
+ case 0:
+ eAnchor = FLY_AT_PARA; // Vert Margin
break;
+ default:
+ eAnchor = FLY_AT_PAGE; // Vert Page oder unknown
+ break; // 2=Vert. Paragraph, 3=Use Default
}
if( !rOut.IsInFly() && rMan.IsInStyle() ){
@@ -632,7 +620,7 @@ void Ww1SingleSprmPDxaAbs::Start(
case -4: eHAlign = text::HoriOrientation::CENTER; nXPos = 0; break; // zentriert
case -8: // rechts
case -16: eHAlign = text::HoriOrientation::RIGHT; nXPos = 0; break; // Mogel: aussen -> rechts
-// default: nXPos += (short)nIniFlyDx; break; // Korrekturen per Ini-Datei
+
}
rOut.SetFlyXPos( nXPos, eHRel, eHAlign );
}
@@ -648,7 +636,7 @@ void Ww1SingleSprmPDyaAbs::Start(
case -4: eVAlign = text::VertOrientation::TOP; nYPos = 0; break; // oben
case -8: eVAlign = text::VertOrientation::CENTER; nYPos = 0; break; // zentriert
case -12: eVAlign = text::VertOrientation::BOTTOM; nYPos = 0; break; // unten
-// default: nYPos += (short)nIniFlyDy; break; // Korrekturen per Ini-Datei
+
}
rOut.SetFlyYPos( nYPos, eVRel, eVAlign );
}
@@ -682,3 +670,4 @@ void Ww1SingleSprmPFromText::Start(
#undef STOP2
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww1/w1struct.hxx b/sw/source/filter/ww1/w1struct.hxx
index 0e3a91ffc0c6..d3560288caf5 100644
--- a/sw/source/filter/ww1/w1struct.hxx
+++ b/sw/source/filter/ww1/w1struct.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -847,82 +848,6 @@ struct W1_TC //////////////////////////////////////////////////////////
};
// cbTC (count of bytes of a TC) is 10(decimal), A(hex).
-#if 0
-struct W1_SHD ////////////////////////////////////////////// struct SHD
-{
- SVBT16 aBits1;
- // SVBT16 nFore : 5;// 0x001f ForegroundColor
- sal_uInt16 GetFore() { return SVBT16ToShort(aBits1) & 0x01; };
- void SetFore( short nVal ){
- ShortToSVBT16((SVBT16ToShort(aBits1)&0xffe0)|(nVal&0x1f), aBits1); };
- // SVBT16 nBack : 5;// 0x03e0 BackgroundColor
- W1_SHD() { ShortToSVBT16( 0, aBits1 ); };
- sal_uInt16 GetBack() { return (SVBT16ToShort(aBits1) >> 5 & 0x1f ); };
- void SetBack( short nVal ){
- ShortToSVBT16((SVBT16ToShort(aBits1)&0xfc1f)|(nVal&0x1f)<<5, aBits1); };
- // SVBT16 nStyle : 5;// 0x7c00 Percentage and Style
- sal_uInt16 GetStyle() { return (SVBT16ToShort(aBits1) >> 10 & 0x1f ); };
- void SetStyle( short nVal ){
- ShortToSVBT16((SVBT16ToShort(aBits1)&0x83ff)|(nVal&0x1f)<<10, aBits1); };
- // SVBT16 nDontKnow : 1;// 0x8000 ???
-};
-
-struct W1_ANLV ////////////////////////////////////////////////////////
-{
- SVBT8 nfc;// 0 number format code, 0=Arabic, 1=Upper case Roman, 2=Lower case Roman
- // 3=Upper case Letter, 4=Lower case letter, 5=Ordinal
- SVBT8 cbTextBefore;// 1 offset into anld.rgch limit of prefix text
- SVBT8 cbTextAfter;// 2
- SVBT8 aBits1;
-// SVBT8 jc : 2;// 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify
-// SVBT8 fPrev : 1;// 0x04 when ==1, include previous levels
-// SVBT8 fHang : 1;// 0x08 when ==1, number will be displayed using a hanging indent
-// SVBT8 fSetBold : 1;// 0x10 when ==1, boldness of number will be determined by anld.fBold.
-// SVBT8 fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic
-// SVBT8 fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not.
-// SVBT8 fSetCaps : 1;// 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not
- SVBT8 aBits2;
-// SVBT8 fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not.
-// SVBT8 fSetKul : 1;// 0x02 when ==1, anld.kul will determine the underlining state of the autonumber.
-// SVBT8 fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character
-// SVBT8 fBold : 1;// 0x08 determines boldness of autonumber when anld.fSetBold == 1.
-// SVBT8 fItalic : 1;// 0x10 determines italicness of autonumber when anld.fSetItalic == 1.
-// SVBT8 fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1.
-// SVBT8 fCaps : 1;// 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1.
-// SVBT8 fStrike : 1;// 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1.
- SVBT8 aBits3;
-// SVBT8 kul : 3;// 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1.
-// SVBT8 ico : 5;// 0xF1 color of autonumber
- SVBT16 ftc;// 6 font code of autonumber
- SVBT16 hps;// 8 font half point size (or 0=auto)
- SVBT16 iStartAt;// 0x0a starting value (0 to 65535)
- SVBT16 dxaIndent;// 0x0c *short?* *sal_uInt16?* width of prefix text (same as indent)
- SVBT16 dxaSpace;// 0x0e minimum space between number and paragraph
-};
-// *cbANLV (count of bytes of ANLV) is 16 (decimal), 10(hex).
-
-struct W1_ANLD ////////////////////////////////////////////////////////
-{
- W1_ANLV eAnlv;// 0
- SVBT8 fNumber1;// 0x10 number only 1 item per table cell
- SVBT8 fNumberAcross;// 0x11 number across cells in table rows(instead of down)
- SVBT8 fRestartHdn;// 0x12 restart heading number on section boundary
- SVBT8 fSpareX;// 0x13 unused( should be 0)
- sal_Char rgchAnld[32];// 0x14 characters displayed before/after autonumber
-};
-
-
-struct W1_OLST ////////////////////////////////////////////////////////
-{
- W1_ANLV rganlv[9];// 0 an array of 9 ANLV structures (heading levels)
- SVBT8 fRestartHdr;// 0x90 when ==1, restart heading on section break
- SVBT8 fSpareOlst2;// 0x91 reserved
- SVBT8 fSpareOlst3;// 0x92 reserved
- SVBT8 fSpareOlst4;// 0x93 reserved
- sal_Char rgch[64];// 0x94 array of 64 chars text before/after number
-};
-// cbOLST is 212(decimal), D4(hex).
-
-#endif
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/README-rtf.txt b/sw/source/filter/ww8/README-rtf.txt
index 2ae4872311b6..6acddaa61eee 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
---------------------------------------------------------------------
diff --git a/sw/source/filter/ww8/WW8FFData.cxx b/sw/source/filter/ww8/WW8FFData.cxx
index 062971252567..65fa2b6b6cd7 100644
--- a/sw/source/filter/ww8/WW8FFData.cxx
+++ b/sw/source/filter/ww8/WW8FFData.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -174,3 +175,4 @@ void WW8FFData::Write(SvStream * pDataStrm)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/WW8FFData.hxx b/sw/source/filter/ww8/WW8FFData.hxx
index 3db24d2cdab8..fcb46d5ff987 100644
--- a/sw/source/filter/ww8/WW8FFData.hxx
+++ b/sw/source/filter/ww8/WW8FFData.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -114,3 +115,5 @@ public:
void Write(SvStream * pDataStrm);
};
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/WW8FibData.cxx b/sw/source/filter/ww8/WW8FibData.cxx
index 9f146b28b0b4..5226f4b0d669 100644
--- a/sw/source/filter/ww8/WW8FibData.cxx
+++ b/sw/source/filter/ww8/WW8FibData.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,7 +25,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include "WW8FibData.hxx"
@@ -60,3 +60,5 @@ bool WW8FibData::getWriteReservation() const
return m_bWriteReservation;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/WW8FibData.hxx b/sw/source/filter/ww8/WW8FibData.hxx
index 5985dbc995ed..b6a886be9886 100644
--- a/sw/source/filter/ww8/WW8FibData.hxx
+++ b/sw/source/filter/ww8/WW8FibData.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,7 +25,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
+
#ifndef INCLUDED_WW8_FIB_DATA_HXX
#define INCLUDED_WW8_FIB_DATA_HXX
#include <IDocumentExternalData.hxx>
@@ -49,3 +50,5 @@ public:
}
#endif // INCLUDED_WW8_FIB_DATA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx
index a8929dd78ae1..3b411a9b4cc9 100644
--- a/sw/source/filter/ww8/WW8Sttbf.cxx
+++ b/sw/source/filter/ww8/WW8Sttbf.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,13 +25,16 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <iostream>
#include <dbgoutsw.hxx>
#include "WW8Sttbf.hxx"
#include <cstdio>
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
namespace ww8
{
WW8Struct::WW8Struct(SvStream& rSt, sal_uInt32 nPos, sal_uInt32 nSize)
@@ -117,3 +121,5 @@ namespace ww8
return aResult;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/WW8Sttbf.hxx b/sw/source/filter/ww8/WW8Sttbf.hxx
index 467c3c504924..f4c2e6b08bf6 100644
--- a/sw/source/filter/ww8/WW8Sttbf.hxx
+++ b/sw/source/filter/ww8/WW8Sttbf.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,7 +25,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <vector>
#include <boost/shared_ptr.hpp>
@@ -143,3 +143,5 @@ typedef ::std::vector<rtl::OUString> StringVector_t;
{
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index 28180f598f6e..665a73f2721f 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -205,7 +206,7 @@ GridColsPtr WW8TableNodeInfoInner::getGridColsOfRow(AttributeOutputBase & rBase)
WidthsPtr pWidths(getWidthsOfRow());
const SwFrmFmt *pFmt = getTable()->GetFrmFmt();
- ASSERT(pFmt,"Impossible");
+ OSL_ENSURE(pFmt,"Impossible");
if (!pFmt)
return pResult;
@@ -222,7 +223,7 @@ GridColsPtr WW8TableNodeInfoInner::getGridColsOfRow(AttributeOutputBase & rBase)
Widths::const_iterator aWidthsEnd = pWidths->end();
for ( Widths::const_iterator aIt = pWidths->begin();
aIt != aWidthsEnd;
- aIt++)
+ ++aIt)
{
nSz += *aIt;
SwTwips nCalc = nSz;
@@ -251,9 +252,6 @@ WidthsPtr WW8TableNodeInfoInner::getWidthsOfRow()
pWidths = WidthsPtr(new Widths);
// number of cell written
sal_uInt32 nBoxes = rTabBoxes.Count();
- if ( nBoxes > 32 )
- nBoxes = 32;
-
for (sal_uInt32 n = 0; n < nBoxes; n++)
{
const SwFrmFmt* pBoxFmt = rTabBoxes[ n ]->GetFrmFmt();
@@ -282,9 +280,6 @@ RowSpansPtr WW8TableNodeInfoInner::getRowSpansOfRow()
const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes();
sal_uInt32 nBoxes = rTabBoxes.Count();
- if (nBoxes > 32)
- nBoxes = 32;
-
for (sal_uInt32 n = 0; n < nBoxes; ++n)
{
pResult->push_back(rTabBoxes[n]->getRowSpan());
@@ -1154,7 +1149,7 @@ void WW8TableCellGrid::addShadowCells()
if (bBeginningOfCell)
{
RowTops_t::const_iterator aRowSpanIt(aTopsIt);
- aRowSpanIt++;
+ ++aRowSpanIt;
if (aRowSpanIt != getRowTopsEnd() &&
*aRowSpanIt < aCellIt->bottom())
@@ -1172,7 +1167,7 @@ void WW8TableCellGrid::addShadowCells()
while (aRowSpanIt != getRowTopsEnd() &&
*aRowSpanIt < aCellIt->bottom())
{
- aRowSpanIt++;
+ ++aRowSpanIt;
nRowSpan++;
}
@@ -1187,7 +1182,7 @@ void WW8TableCellGrid::addShadowCells()
pNodeInfo->setVertMerge(bVertMerge);
}
- aCellIt++;
+ ++aCellIt;
bBeginningOfCell = (aRect.Left() != aCellIt->left());
aRect = aCellIt->getRect();
@@ -1197,7 +1192,7 @@ void WW8TableCellGrid::addShadowCells()
if (pRow.get() != NULL)
pRow->setRowSpans(pRowSpans);
- aTopsIt++;
+ ++aTopsIt;
}
#ifdef DEBUG
::std::clog << "</addShadowCells>" << ::std::endl;
@@ -1273,7 +1268,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells()
pTableBoxes->push_back(NULL);
}
- aCellIt++;
+ ++aCellIt;
bBeginningOfCell = false;
if (aCellIt != aCellEndIt && aCellIt->left() != nCellX)
@@ -1306,7 +1301,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells()
nShadows = 0;
- aTopsIt++;
+ ++aTopsIt;
nRow++;
}
@@ -1340,7 +1335,7 @@ string WW8TableCellGrid::toString()
sResult += "<shadow/>\n";
sResult += "</cellInfo>\n";
- aCellIt++;
+ ++aCellIt;
}
WW8TableCellGridRow::Pointer_t pRow = getRow(*aTopsIt);
@@ -1352,7 +1347,7 @@ string WW8TableCellGrid::toString()
Widths::const_iterator aItEnd = pWidths->end();
for (Widths::const_iterator aIt = pWidths->begin();
aIt != aItEnd;
- aIt++)
+ ++aIt)
{
if (aIt != pWidths->begin())
sResult += ", ";
@@ -1372,7 +1367,7 @@ string WW8TableCellGrid::toString()
RowSpans::const_iterator aItEnd = pRowSpans->end();
for (RowSpans::const_iterator aIt = pRowSpans->begin();
aIt != aItEnd;
- aIt++)
+ ++aIt)
{
if (aIt != pRowSpans->begin())
sResult += ", ";
@@ -1385,7 +1380,7 @@ string WW8TableCellGrid::toString()
}
sResult += "</row>\n";
- aTopsIt++;
+ ++aTopsIt;
}
sResult += "</WW8TableCellGrid>\n";
@@ -1515,3 +1510,5 @@ CellInfo::CellInfo(const SwRect & aRect, WW8TableNodeInfo * pNodeInfo)
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx
index b844615fecad..2ba703ab031f 100644
--- a/sw/source/filter/ww8/WW8TableInfo.hxx
+++ b/sw/source/filter/ww8/WW8TableInfo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,11 +28,13 @@
#ifndef WW8_TABLE_INFO_HXX
#define WW8_TABLE_INFO_HXX
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <string>
#include <map>
+#include <set>
#include <functional>
#include <boost/shared_ptr.hpp>
+#include <vector>
#include <sal/types.h>
#include <swrect.hxx>
@@ -251,13 +254,13 @@ public:
class WW8TableInfo
{
friend class WW8TableNodeInfoInner;
- typedef hash_map<const SwNode *, WW8TableNodeInfo::Pointer_t, hashNode > Map_t;
+ typedef boost::unordered_map<const SwNode *, WW8TableNodeInfo::Pointer_t, hashNode > Map_t;
Map_t mMap;
- typedef hash_map<const SwTable *, WW8TableCellGrid::Pointer_t, hashTable > CellGridMap_t;
+ typedef boost::unordered_map<const SwTable *, WW8TableCellGrid::Pointer_t, hashTable > CellGridMap_t;
CellGridMap_t mCellGridMap;
- typedef hash_map<const SwTable *, const SwNode *, hashTable > FirstInTableMap_t;
+ typedef boost::unordered_map<const SwTable *, const SwNode *, hashTable > FirstInTableMap_t;
FirstInTableMap_t mFirstInTableMap;
WW8TableNodeInfo *
@@ -352,3 +355,5 @@ public:
}
#endif // WW8_TABLE_INFO_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index 9e1bd653545b..25fc96566def 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -169,6 +170,9 @@ public:
/// Called after we end outputting the attributes.
virtual void EndRunProperties( const SwRedlineData* pRedlineData ) = 0;
+ /// docx requires footnoteRef/endnoteRef tag at the beginning of each of them
+ virtual void FootnoteEndnoteRefTag() {};
+
/// Output text (inside a run).
virtual void RunText( const String& rText, rtl_TextEncoding eCharSet ) = 0;
@@ -176,7 +180,7 @@ public:
virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet ) = 0;
/// Output ruby start.
- virtual void StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby ) = 0;
+ virtual void StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, const SwFmtRuby& rRuby ) = 0;
/// Output ruby end.
virtual void EndRuby() = 0;
@@ -247,7 +251,8 @@ public:
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId ) = 0;
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
+ bool bAutoUpdate ) = 0;
/// End of a style in the styles table.
virtual void EndStyle() = 0;
@@ -563,6 +568,9 @@ public:
/// Return the right export class.
virtual MSWordExportBase& GetExport() = 0;
+ /// @overload
+ const MSWordExportBase& GetExport() const { return const_cast< AttributeOutputBase* >( this )->GetExport(); }
+
/// Call the right virtual function according to the type of the item.
void OutputItem( const SfxPoolItem& rHt );
@@ -580,4 +588,4 @@ public:
#endif // _ATTRIBUTEOUTPUTBASE_HXX_
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 802025a2fd94..443483f36c59 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,10 +28,18 @@
#include "docxattributeoutput.hxx"
#include "docxexport.hxx"
+#include "docxexportfilter.hxx"
#include "docxfootnotes.hxx"
#include "writerwordglue.hxx"
#include "wrtww8.hxx"
#include "ww8par.hxx"
+#include "fmtcntnt.hxx"
+#include "fmtsrnd.hxx"
+#include "fchrfmt.hxx"
+#include "tgrditem.hxx"
+#include "fmtruby.hxx"
+#include "charfmt.hxx"
+#include "breakit.hxx"
#include <oox/token/tokens.hxx>
#include <oox/export/drawingml.hxx>
@@ -82,12 +91,15 @@
#include <editeng/frmdiritem.hxx>
#include <editeng/blnkitem.hxx>
#include <editeng/charhiddenitem.hxx>
+#include <editeng/opaqitem.hxx>
#include <svx/svdmodel.hxx>
#include <svx/svdobj.hxx>
+#include <anchoredobject.hxx>
#include <docufld.hxx>
#include <flddropdown.hxx>
#include <format.hxx>
+#include <fmtanchr.hxx>
#include <fmtclds.hxx>
#include <fmtinfmt.hxx>
#include <fmtfld.hxx>
@@ -117,8 +129,14 @@
#include <tools/color.hxx>
#include <com/sun/star/i18n/ScriptType.hdl>
-
-#if OSL_DEBUG_LEVEL > 0
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <IMark.hxx>
+
+#if OSL_DEBUG_LEVEL > 1
#include <stdio.h>
#endif
@@ -134,7 +152,82 @@ using namespace sax_fastparser;
using namespace nsSwDocInfoSubType;
using namespace nsFieldFlags;
using namespace sw::util;
+using namespace ::com::sun::star;
+
+class FFDataWriterHelper
+{
+ ::sax_fastparser::FSHelperPtr m_pSerializer;
+ void writeCommonStart( const rtl::OUString& rName )
+ {
+ m_pSerializer->startElementNS( XML_w, XML_ffData, FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_name,
+ FSNS( XML_w, XML_val ), OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr(),
+ FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_enabled, FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_calcOnExit,
+ FSNS( XML_w, XML_val ),
+ "0", FSEND );
+ }
+ void writeFinish()
+ {
+ m_pSerializer->endElementNS( XML_w, XML_ffData );
+ }
+public:
+ FFDataWriterHelper( const ::sax_fastparser::FSHelperPtr pSerializer ) : m_pSerializer( pSerializer ){}
+ void WriteFormCheckbox( const rtl::OUString& rName, const rtl::OUString& rDefault, bool bChecked )
+ {
+ writeCommonStart( rName );
+ // Checkbox specific bits
+ m_pSerializer->startElementNS( XML_w, XML_checkBox, FSEND );
+ // currently hardcoding autosize
+ // #TODO check if this defaulted
+ m_pSerializer->startElementNS( XML_w, XML_sizeAuto, FSEND );
+ m_pSerializer->endElementNS( XML_w, XML_sizeAuto );
+ if ( rDefault.getLength() )
+ {
+ m_pSerializer->singleElementNS( XML_w, XML_default,
+ FSNS( XML_w, XML_val ),
+ rtl::OUStringToOString( rDefault, RTL_TEXTENCODING_UTF8 ).getStr(), FSEND );
+ }
+ if ( bChecked )
+ m_pSerializer->singleElementNS( XML_w, XML_checked, FSEND );
+ m_pSerializer->endElementNS( XML_w, XML_checkBox );
+ writeFinish();
+ }
+ void WriteFormText( const rtl::OUString& rName, const rtl::OUString& rDefault )
+ {
+ writeCommonStart( rName );
+ if ( rDefault.getLength() )
+ {
+ m_pSerializer->startElementNS( XML_w, XML_textInput, FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_default,
+ FSNS( XML_w, XML_val ),
+ rtl::OUStringToOString( rDefault, RTL_TEXTENCODING_UTF8 ).getStr(), FSEND );
+ m_pSerializer->endElementNS( XML_w, XML_textInput );
+ }
+ writeFinish();
+ }
+};
+class FieldMarkParamsHelper
+{
+ const sw::mark::IFieldmark& mrFieldmark;
+ public:
+ FieldMarkParamsHelper( const sw::mark::IFieldmark& rFieldmark ) : mrFieldmark( rFieldmark ) {}
+ rtl::OUString getName() { return mrFieldmark.GetName(); }
+ template < typename T >
+ bool extractParam( const rtl::OUString& rKey, T& rResult )
+ {
+ bool bResult = false;
+ if ( mrFieldmark.GetParameters() )
+ {
+ sw::mark::IFieldmark::parameter_map_t::const_iterator it = mrFieldmark.GetParameters()->find( rKey );
+ if ( it != mrFieldmark.GetParameters()->end() )
+ bResult = ( it->second >>= rResult );
+ }
+ return bResult;
+ }
+};
void DocxAttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 /*nScript*/ )
{
if (bIsRTL)
@@ -208,6 +301,25 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
FinishTableRowCell( pTextNodeInfoInner );
m_bParagraphOpened = false;
+
+ // Write the anchored frame if any
+ if ( m_pParentFrame )
+ {
+ const SwFrmFmt& rFrmFmt = m_pParentFrame->GetFrmFmt( );
+ const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx();
+
+ sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
+ sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
+
+ m_rExport.SaveData( nStt, nEnd );
+
+ m_rExport.mpParentFrame = m_pParentFrame;
+ m_pParentFrame = NULL;
+
+ m_rExport.WriteText( );
+
+ m_rExport.RestoreData();
+ }
}
void DocxAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool bForceEmptyParagraph )
@@ -220,8 +332,15 @@ void DocxAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointe
const SwTable *pTable = pInner->getTable( );
const SwTableLines& rLines = pTable->GetTabLines( );
sal_uInt16 nLinesCount = rLines.Count( );
-
- if ( pInner->isEndOfCell() )
+ // HACK
+ // msoffice seems to have an internal limitation of 63 columns for tables
+ // and refuses to load .docx with more, even though the spec seems to allow that;
+ // so simply if there are more columns, don't close the last one msoffice will handle
+ // and merge the contents of the remaining ones into it (since we don't close the cell
+ // here, following ones will not be opened)
+ bool limitWorkaround = ( pInner->getCell() >= 62 && !pInner->isEndOfLine());
+
+ if ( pInner->isEndOfCell() && !limitWorkaround )
{
if ( bForceEmptyParagraph )
m_pSerializer->singleElementNS( XML_w, XML_p, FSEND );
@@ -264,9 +383,7 @@ void DocxAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode )
m_rExport.OutputSectionBreaks( &(pFmt->GetAttrSet()), *pTableNode );
}
- // postpone the output so that we can later [in EndParagraphProperties()]
- // prepend the properties before the run
- m_pSerializer->mark();
+ m_pSerializer->mark( );
m_pSerializer->startElementNS( XML_w, XML_pPr, FSEND );
@@ -282,18 +399,79 @@ void DocxAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode )
void DocxAttributeOutput::InitCollectedParagraphProperties()
{
- m_pSpacingAttrList = NULL;
+ m_pParagraphSpacingAttrList = NULL;
+
+ // Write the elements in the spec order
+ static const sal_Int32 aOrder[] =
+ {
+ FSNS( XML_w, XML_pStyle ),
+ FSNS( XML_w, XML_keepNext ),
+ FSNS( XML_w, XML_keepLines ),
+ FSNS( XML_w, XML_pageBreakBefore ),
+ FSNS( XML_w, XML_framePr ),
+ FSNS( XML_w, XML_widowControl ),
+ FSNS( XML_w, XML_numPr ),
+ FSNS( XML_w, XML_suppressLineNumbers ),
+ FSNS( XML_w, XML_pBdr ),
+ FSNS( XML_w, XML_shd ),
+ FSNS( XML_w, XML_tabs ),
+ FSNS( XML_w, XML_suppressAutoHyphens ),
+ FSNS( XML_w, XML_kinsoku ),
+ FSNS( XML_w, XML_wordWrap ),
+ FSNS( XML_w, XML_overflowPunct ),
+ FSNS( XML_w, XML_topLinePunct ),
+ FSNS( XML_w, XML_autoSpaceDE ),
+ FSNS( XML_w, XML_autoSpaceDN ),
+ FSNS( XML_w, XML_bidi ),
+ FSNS( XML_w, XML_adjustRightInd ),
+ FSNS( XML_w, XML_snapToGrid ),
+ FSNS( XML_w, XML_spacing ),
+ FSNS( XML_w, XML_ind ),
+ FSNS( XML_w, XML_contextualSpacing ),
+ FSNS( XML_w, XML_mirrorIndents ),
+ FSNS( XML_w, XML_suppressOverlap ),
+ FSNS( XML_w, XML_jc ),
+ FSNS( XML_w, XML_textDirection ),
+ FSNS( XML_w, XML_textAlignment ),
+ FSNS( XML_w, XML_textboxTightWrap ),
+ FSNS( XML_w, XML_outlineLvl ),
+ FSNS( XML_w, XML_divId ),
+ FSNS( XML_w, XML_cnfStyle ),
+ FSNS( XML_w, XML_rPr ),
+ FSNS( XML_w, XML_sectPr ),
+ FSNS( XML_w, XML_pPrChange )
+ };
+
+ // postpone the output so that we can later [in EndParagraphProperties()]
+ // prepend the properties before the run
+ sal_Int32 len = sizeof ( aOrder ) / sizeof( sal_Int32 );
+ uno::Sequence< sal_Int32 > aSeqOrder( len );
+ for ( sal_Int32 i = 0; i < len; i++ )
+ aSeqOrder[i] = aOrder[i];
+
+ m_pSerializer->mark( aSeqOrder );
}
void DocxAttributeOutput::WriteCollectedParagraphProperties()
{
- if ( m_pSpacingAttrList )
+ if ( m_pFlyAttrList )
+ {
+ XFastAttributeListRef xAttrList( m_pFlyAttrList );
+ m_pFlyAttrList = NULL;
+
+ m_pSerializer->singleElementNS( XML_w, XML_framePr, xAttrList );
+ }
+
+ if ( m_pParagraphSpacingAttrList )
{
- XFastAttributeListRef xAttrList( m_pSpacingAttrList );
- m_pSpacingAttrList = NULL;
+ XFastAttributeListRef xAttrList( m_pParagraphSpacingAttrList );
+ m_pParagraphSpacingAttrList = NULL;
m_pSerializer->singleElementNS( XML_w, XML_spacing, xAttrList );
}
+
+ // Merge the marks for the ordered elements
+ m_pSerializer->mergeTopMarks( );
}
void DocxAttributeOutput::EndParagraphProperties()
@@ -352,7 +530,6 @@ void DocxAttributeOutput::EndRun()
}
}
-
// write the run properties + the text, already in the correct order
m_pSerializer->mergeTopMarks(); // merges with "postponed text", see above
@@ -372,7 +549,7 @@ void DocxAttributeOutput::EndRun()
for ( std::vector<FieldInfos>::iterator pIt = m_Fields.begin(); pIt != m_Fields.end(); ++pIt )
{
// Add the fields starts for hyperlinks, TOCs and index marks
- if ( pIt->bOpen )
+ if ( pIt->bOpen && !pIt->pField )
{
StartField_Impl( *pIt, sal_True );
@@ -449,12 +626,56 @@ void DocxAttributeOutput::DoWriteBookmarks()
m_rMarksEnd.clear();
}
+void DocxAttributeOutput::WriteFFData( const FieldInfos& rInfos )
+{
+ const ::sw::mark::IFieldmark& rFieldmark = *rInfos.pFieldmark;
+ if ( rInfos.eType == ww::eFORMDROPDOWN )
+ {
+ uno::Sequence< ::rtl::OUString> vListEntries;
+ rtl::OUString sName, sHelp, sToolTip, sSelected;
+
+ FieldMarkParamsHelper params( rFieldmark );
+ params.extractParam( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_LISTENTRY) ), vListEntries );
+ sName = params.getName();
+ sal_Int32 nSelectedIndex = 0;
+
+ if ( params.extractParam( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_RESULT) ), nSelectedIndex ) )
+ {
+ if (nSelectedIndex < vListEntries.getLength() )
+ sSelected = vListEntries[ nSelectedIndex ];
+ }
+
+ GetExport().DoComboBox( sName, sHelp, sToolTip, sSelected, vListEntries );
+ }
+ else if ( rInfos.eType == ww::eFORMCHECKBOX )
+ {
+ rtl::OUString sName, sDefault;
+ bool bChecked = false;
+
+ FieldMarkParamsHelper params( rFieldmark );
+ params.extractParam( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_FORMCHECKBOX_NAME ) ), sName );
+
+ const sw::mark::ICheckboxFieldmark* pCheckboxFm = dynamic_cast<const sw::mark::ICheckboxFieldmark*>(&rFieldmark);
+ if ( pCheckboxFm && pCheckboxFm->IsChecked() )
+ bChecked = true;
+
+ FFDataWriterHelper ffdataOut( m_pSerializer );
+ ffdataOut.WriteFormCheckbox( sName, rtl::OUString(), bChecked );
+ }
+ else if ( rInfos.eType == ww::eFORMTEXT )
+ {
+ FieldMarkParamsHelper params( rFieldmark );
+ FFDataWriterHelper ffdataOut( m_pSerializer );
+ ffdataOut.WriteFormText( params.getName(), rtl::OUString() );
+ }
+}
+
void DocxAttributeOutput::StartField_Impl( FieldInfos& rInfos, sal_Bool bWriteRun )
{
if ( rInfos.pField && rInfos.eType == ww::eUNKNOWN )
{
// Expand unsupported fields
- RunText( rInfos.pField->Expand( ) );
+ RunText( rInfos.pField->GetFieldName() );
}
else if ( rInfos.eType != ww::eNONE ) // HYPERLINK fields are just commands
{
@@ -466,28 +687,38 @@ void DocxAttributeOutput::StartField_Impl( FieldInfos& rInfos, sal_Bool bWriteRu
m_pSerializer->startElementNS( XML_w, XML_fldChar,
FSNS( XML_w, XML_fldCharType ), "begin",
FSEND );
-
- const SwDropDownField& rFld2 = *(SwDropDownField*)rInfos.pField;
- uno::Sequence<rtl::OUString> aItems =
- rFld2.GetItemSequence();
- GetExport().DoComboBox(rFld2.GetName(),
- rFld2.GetHelp(),
- rFld2.GetToolTip(),
- rFld2.GetSelectedItem(), aItems);
-
+ if ( rInfos.pFieldmark && !rInfos.pField )
+ WriteFFData( rInfos );
+ if ( rInfos.pField )
+ {
+ const SwDropDownField& rFld2 = *(SwDropDownField*)rInfos.pField;
+ uno::Sequence<rtl::OUString> aItems =
+ rFld2.GetItemSequence();
+ GetExport().DoComboBox(rFld2.GetName(),
+ rFld2.GetHelp(),
+ rFld2.GetToolTip(),
+ rFld2.GetSelectedItem(), aItems);
+ }
m_pSerializer->endElementNS( XML_w, XML_fldChar );
if ( bWriteRun )
m_pSerializer->endElementNS( XML_w, XML_r );
+ if ( !rInfos.pField )
+ CmdField_Impl( rInfos );
}
else
{
// Write the field start
- m_pSerializer->singleElementNS( XML_w, XML_fldChar,
+ m_pSerializer->startElementNS( XML_w, XML_fldChar,
FSNS( XML_w, XML_fldCharType ), "begin",
FSEND );
+ if ( rInfos.pFieldmark )
+ WriteFFData( rInfos );
+
+ m_pSerializer->endElementNS( XML_w, XML_fldChar );
+
if ( bWriteRun )
m_pSerializer->endElementNS( XML_w, XML_r );
@@ -526,7 +757,6 @@ void DocxAttributeOutput::CmdField_Impl( FieldInfos& rInfos )
m_pSerializer->endElementNS( XML_w, XML_r );
-
// Write the Field separator
m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
m_pSerializer->singleElementNS( XML_w, XML_fldChar,
@@ -559,7 +789,7 @@ void DocxAttributeOutput::EndField_Impl( FieldInfos& rInfos )
m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
// Find another way for hyperlinks
- RunText( rInfos.pField->Expand( ) );
+ RunText( rInfos.pField->GetFieldName() );
m_pSerializer->endElementNS( XML_w, XML_r );
}
@@ -574,13 +804,14 @@ void DocxAttributeOutput::EndField_Impl( FieldInfos& rInfos )
}
// Write the Field end
- m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_fldChar,
- FSNS( XML_w, XML_fldCharType ), "end",
- FSEND );
- m_pSerializer->endElementNS( XML_w, XML_r );
-
-
+ if ( rInfos.bClose )
+ {
+ m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_fldChar,
+ FSNS( XML_w, XML_fldCharType ), "end",
+ FSEND );
+ m_pSerializer->endElementNS( XML_w, XML_r );
+ }
// Write the ref field if a bookmark had to be set and the field
// should be visible
if ( rInfos.pField )
@@ -628,6 +859,61 @@ void DocxAttributeOutput::InitCollectedRunProperties()
m_pFontsAttrList = NULL;
m_pEastAsianLayoutAttrList = NULL;
m_pCharLangAttrList = NULL;
+
+ // Write the elements in the spec order
+ static const sal_Int32 aOrder[] =
+ {
+ FSNS( XML_w, XML_rStyle ),
+ FSNS( XML_w, XML_rFonts ),
+ FSNS( XML_w, XML_b ),
+ FSNS( XML_w, XML_bCs ),
+ FSNS( XML_w, XML_i ),
+ FSNS( XML_w, XML_iCs ),
+ FSNS( XML_w, XML_caps ),
+ FSNS( XML_w, XML_smallCaps ),
+ FSNS( XML_w, XML_strike ),
+ FSNS( XML_w, XML_dstrike ),
+ FSNS( XML_w, XML_outline ),
+ FSNS( XML_w, XML_shadow ),
+ FSNS( XML_w, XML_emboss ),
+ FSNS( XML_w, XML_imprint ),
+ FSNS( XML_w, XML_noProof ),
+ FSNS( XML_w, XML_snapToGrid ),
+ FSNS( XML_w, XML_vanish ),
+ FSNS( XML_w, XML_webHidden ),
+ FSNS( XML_w, XML_color ),
+ FSNS( XML_w, XML_spacing ),
+ FSNS( XML_w, XML_w ),
+ FSNS( XML_w, XML_kern ),
+ FSNS( XML_w, XML_position ),
+ FSNS( XML_w, XML_sz ),
+ FSNS( XML_w, XML_szCs ),
+ FSNS( XML_w, XML_highlight ),
+ FSNS( XML_w, XML_u ),
+ FSNS( XML_w, XML_effect ),
+ FSNS( XML_w, XML_bdr ),
+ FSNS( XML_w, XML_shd ),
+ FSNS( XML_w, XML_fitText ),
+ FSNS( XML_w, XML_vertAlign ),
+ FSNS( XML_w, XML_rtl ),
+ FSNS( XML_w, XML_cs ),
+ FSNS( XML_w, XML_em ),
+ FSNS( XML_w, XML_lang ),
+ FSNS( XML_w, XML_eastAsianLayout ),
+ FSNS( XML_w, XML_specVanish ),
+ FSNS( XML_w, XML_oMath ),
+ FSNS( XML_w, XML_rPrChange )
+ };
+
+ // postpone the output so that we can later [in EndParagraphProperties()]
+ // prepend the properties before the run
+ sal_Int32 len = sizeof ( aOrder ) / sizeof( sal_Int32 );
+ uno::Sequence< sal_Int32 > aSeqOrder( len );
+ for ( sal_Int32 i = 0; i < len; i++ )
+ aSeqOrder[i] = aOrder[i];
+
+ m_pSerializer->mark( aSeqOrder );
+
}
void DocxAttributeOutput::WriteCollectedRunProperties()
@@ -656,6 +942,9 @@ void DocxAttributeOutput::WriteCollectedRunProperties()
m_pSerializer->singleElementNS( XML_w, XML_lang, xAttrList );
}
+
+ // Merge the marks for the ordered elements
+ m_pSerializer->mergeTopMarks();
}
void DocxAttributeOutput::EndRunProperties( const SwRedlineData* /*pRedlineData*/ )
@@ -672,6 +961,14 @@ void DocxAttributeOutput::EndRunProperties( const SwRedlineData* /*pRedlineData*
m_pSerializer->mergeTopMarks( sax_fastparser::MERGE_MARKS_PREPEND );
}
+void DocxAttributeOutput::FootnoteEndnoteRefTag()
+{
+ if( m_footnoteEndnoteRefTag == 0 )
+ return;
+ m_pSerializer->singleElementNS( XML_w, m_footnoteEndnoteRefTag, FSEND );
+ m_footnoteEndnoteRefTag = 0;
+}
+
/** Output sal_Unicode* as a run text (<t>the text</t>).
When bMove is true, update rBegin to point _after_ the end of the text +
@@ -746,14 +1043,74 @@ void DocxAttributeOutput::RawText( const String& /*rText*/, bool /*bForceUnicode
OSL_TRACE("TODO DocxAttributeOutput::RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet )\n" );
}
-void DocxAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, const SwFmtRuby& /*rRuby*/ )
+void DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, const SwFmtRuby& rRuby )
{
OSL_TRACE("TODO DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby )\n" );
+ m_pSerializer->startElementNS( XML_w, XML_ruby, FSEND );
+ m_pSerializer->startElementNS( XML_w, XML_rubyPr, FSEND );
+ // hps
+ // hpsBaseText
+ // hpsRaise
+ // lid
+ lang::Locale aLocale( SwBreakIt::Get()->GetLocale(
+ rNode.GetLang( nPos ) ) );
+ OUString sLang( aLocale.Language );
+ if ( aLocale.Country.getLength( ) > 0 )
+ sLang += OUString(RTL_CONSTASCII_USTRINGPARAM( "-" )) + OUString( aLocale.Country );
+ m_pSerializer->singleElementNS( XML_w, XML_lid,
+ FSNS( XML_w, XML_val ),
+ OUStringToOString( sLang, RTL_TEXTENCODING_UTF8 ).getStr( ), FSEND );
+
+ OString sAlign ( "center" );
+ switch ( rRuby.GetAdjustment( ) )
+ {
+ case 0:
+ sAlign = OString( "left" );
+ break;
+ case 1:
+ // Defaults to center
+ break;
+ case 2:
+ sAlign = OString( "right" );
+ break;
+ case 3:
+ sAlign = OString( "distributeLetter" );
+ break;
+ case 4:
+ sAlign = OString( "distributeSpace" );
+ break;
+ default:
+ break;
+ }
+ m_pSerializer->singleElementNS( XML_w, XML_rubyAlign,
+ FSNS( XML_w, XML_val ), sAlign.getStr(), FSEND );
+ m_pSerializer->endElementNS( XML_w, XML_rubyPr );
+
+ m_pSerializer->startElementNS( XML_w, XML_rt, FSEND );
+ StartRun( NULL );
+ StartRunProperties( );
+ SwWW8AttrIter aAttrIt( m_rExport, rNode );
+ aAttrIt.OutAttr( nPos, true );
+ sal_uInt16 nStyle = m_rExport.GetId( *rRuby.GetTxtRuby()->GetCharFmt() );
+ OString aStyleId( "style" );
+ aStyleId += OString::valueOf( sal_Int32( nStyle ) );
+ m_pSerializer->singleElementNS( XML_w, XML_rStyle,
+ FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND );
+ EndRunProperties( NULL );
+ RunText( rRuby.GetText( ) );
+ EndRun( );
+ m_pSerializer->endElementNS( XML_w, XML_rt );
+
+ m_pSerializer->startElementNS( XML_w, XML_rubyBase, FSEND );
+ StartRun( NULL );
}
void DocxAttributeOutput::EndRuby()
{
OSL_TRACE( "TODO DocxAttributeOutput::EndRuby()\n" );
+ EndRun( );
+ m_pSerializer->endElementNS( XML_w, XML_rubyBase );
+ m_pSerializer->endElementNS( XML_w, XML_ruby );
}
bool DocxAttributeOutput::AnalyzeURL( const String& rUrl, const String& rTarget, String* pLinkURL, String* pMark )
@@ -971,23 +1328,6 @@ void DocxAttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
m_pSerializer->singleElementNS( XML_w, XML_pStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND );
}
-#if 0
-void DocxAttributeOutput::InTable()
-{
-#if OSL_DEBUG_LEVEL > 0
- OSL_TRACE( "TODO DocxAttributeOutput::InTable()\n" );
-#endif
-}
-
-
-void DocxAttributeOutput::TableRowProperties( bool /*bHeader*/, long /*nCellHeight*/, bool /*bCannotSplit*/, bool /*bRightToLeft*/ )
-{
-#if OSL_DEBUG_LEVEL > 0
- OSL_TRACE( "TODO DocxAttributeOutput::TableRowProperties()\n" );
-#endif
-}
-#endif
-
static OString impl_ConvertColor( const Color &rColor )
{
OString color( "auto" );
@@ -1037,6 +1377,20 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
pVal = ( sal_Char* )"thickThinMediumGap";
}
}
+ else
+ {
+ switch ( pBorderLine->GetStyle( ) )
+ {
+ case DOTTED:
+ pVal = ( sal_Char* )"dotted";
+ break;
+ case DASHED:
+ pVal = ( sal_Char* )"dashed";
+ break;
+ default:
+ break;
+ }
+ }
pAttr->add( FSNS( XML_w, XML_val ), OString( pVal ) );
@@ -1065,16 +1419,19 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
pSerializer->singleElementNS( XML_w, elementToken, xAttrs );
}
-static void impl_pageBorders( FSHelperPtr pSerializer, const SvxBoxItem& rBox )
+static void impl_pageBorders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, bool bUseStartEnd = false )
{
static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
- static const sal_uInt16 aXmlElements[] =
+ const sal_Int32 aXmlElements[] =
{
- XML_top, XML_left, XML_bottom, XML_right
+ XML_top,
+ bUseStartEnd ? XML_start : XML_left,
+ XML_bottom,
+ bUseStartEnd ? XML_end : XML_right
};
const sal_uInt16* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
@@ -1091,11 +1448,25 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
const SwTableBox *pTblBox = pTableTextNodeInfoInner->getTableBox( );
- // The cell borders
- m_pSerializer->startElementNS( XML_w, XML_tcBorders, FSEND );
- SwFrmFmt *pFmt = pTblBox->GetFrmFmt( );
- impl_pageBorders( m_pSerializer, pFmt->GetBox( ) );
- m_pSerializer->endElementNS( XML_w, XML_tcBorders );
+ bool bEcma = GetExport().GetFilter().getVersion( ) == oox::core::ECMA_DIALECT;
+
+ // Cell prefered width
+ SwTwips nWidth = GetGridCols( pTableTextNodeInfoInner )->at( pTableTextNodeInfoInner->getCell() );
+ m_pSerializer->singleElementNS( XML_w, XML_tcW,
+ FSNS( XML_w, XML_w ), OString::valueOf( sal_Int32( nWidth ) ).getStr( ),
+ FSNS( XML_w, XML_type ), "dxa",
+ FSEND );
+
+ // Horizontal spans
+ const SwWriteTableRows& aRows = m_pTableWrt->GetRows( );
+ SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ];
+ SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
+
+ sal_uInt16 nColSpan = pCell->GetColSpan();
+ if ( nColSpan > 1 )
+ m_pSerializer->singleElementNS( XML_w, XML_gridSpan,
+ FSNS( XML_w, XML_val ), OString::valueOf( sal_Int32( nColSpan ) ).getStr(),
+ FSEND );
// Vertical merges
long vSpan = pTblBox->getRowSpan( );
@@ -1112,26 +1483,14 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
FSEND );
}
- // Horizontal spans
- const SwWriteTableRows& aRows = m_pTableWrt->GetRows( );
- SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ];
- SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
-
- sal_uInt16 nColSpan = pCell->GetColSpan();
- if ( nColSpan > 1 )
- m_pSerializer->singleElementNS( XML_w, XML_gridSpan,
- FSNS( XML_w, XML_val ), OString::valueOf( sal_Int32( nColSpan ) ).getStr(),
- FSEND );
+ // The cell borders
+ m_pSerializer->startElementNS( XML_w, XML_tcBorders, FSEND );
+ SwFrmFmt *pFmt = pTblBox->GetFrmFmt( );
+ impl_pageBorders( m_pSerializer, pFmt->GetBox( ), !bEcma );
+ m_pSerializer->endElementNS( XML_w, XML_tcBorders );
TableBackgrounds( pTableTextNodeInfoInner );
- // Cell prefered width
- SwTwips nWidth = GetGridCols( pTableTextNodeInfoInner )[ pTableTextNodeInfoInner->getCell() ];
- m_pSerializer->singleElementNS( XML_w, XML_tcW,
- FSNS( XML_w, XML_w ), OString::valueOf( sal_Int32( nWidth ) ).getStr( ),
- FSNS( XML_w, XML_type ), "dxa",
- FSEND );
-
// Cell margins
m_pSerializer->startElementNS( XML_w, XML_tcMar, FSEND );
const SvxBoxItem& rBox = pFmt->GetBox( );
@@ -1140,9 +1499,12 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
- static const sal_uInt16 aXmlElements[] =
+ const sal_Int32 aXmlElements[] =
{
- XML_top, XML_left, XML_bottom, XML_right
+ XML_top,
+ bEcma ? XML_left : XML_start,
+ XML_bottom,
+ bEcma ? XML_right : XML_end
};
const sal_uInt16* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
@@ -1167,7 +1529,7 @@ void DocxAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t
bool bRelBoxSize = false;
// Create the SwWriteTable instance to use col spans (and maybe other infos)
- GetTablePageSize( pTableTextNodeInfoInner, nPageSize, bRelBoxSize );
+ GetTablePageSize( pTableTextNodeInfoInner.get(), nPageSize, bRelBoxSize );
const SwTable* pTable = pTableTextNodeInfoInner->getTable( );
const SwFrmFmt *pFmt = pTable->GetFrmFmt( );
@@ -1229,7 +1591,6 @@ void DocxAttributeOutput::EndTableRow( )
m_pSerializer->endElementNS( XML_w, XML_tr );
}
-
void DocxAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
{
if ( !m_pTableWrt )
@@ -1260,6 +1621,8 @@ void DocxAttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t /*
void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
{
+ bool bEcma = GetExport().GetFilter().getVersion( ) == oox::core::ECMA_DIALECT;
+
// Write the table properties
m_pSerializer->startElementNS( XML_w, XML_tblPr, FSEND );
@@ -1267,7 +1630,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
bool bRelBoxSize = false;
// Create the SwWriteTable instance to use col spans (and maybe other infos)
- GetTablePageSize( pTableTextNodeInfoInner, nPageSize, bRelBoxSize );
+ GetTablePageSize( pTableTextNodeInfoInner.get(), nPageSize, bRelBoxSize );
// Output the table prefered width
if ( nPageSize != 0 )
@@ -1276,10 +1639,6 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
FSNS( XML_w, XML_type ), "dxa",
FSEND );
- // Output the table borders
- TableDefaultBorders( pTableTextNodeInfoInner );
- TableBidi( pTableTextNodeInfoInner );
-
// Output the table alignement
const SwTable *pTable = pTableTextNodeInfoInner->getTable();
SwFrmFmt *pTblFmt = pTable->GetFrmFmt( );
@@ -1291,13 +1650,19 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
pJcVal = "center";
break;
case text::HoriOrientation::RIGHT:
- pJcVal = "right";
+ if ( bEcma )
+ pJcVal = "right";
+ else
+ pJcVal = "end";
break;
default:
case text::HoriOrientation::NONE:
case text::HoriOrientation::LEFT_AND_WIDTH:
{
- pJcVal = "left";
+ if ( bEcma )
+ pJcVal = "left";
+ else
+ pJcVal = "start";
nIndent = sal_Int32( pTblFmt->GetLRSpace( ).GetLeft( ) );
break;
}
@@ -1306,6 +1671,10 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
FSNS( XML_w, XML_val ), pJcVal,
FSEND );
+ // Output the table borders
+ TableDefaultBorders( pTableTextNodeInfoInner );
+ TableBidi( pTableTextNodeInfoInner );
+
// Table indent
if ( nIndent != 0 )
m_pSerializer->singleElementNS( XML_w, XML_tblInd,
@@ -1315,12 +1684,11 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
m_pSerializer->endElementNS( XML_w, XML_tblPr );
-
// Write the table grid infos
m_pSerializer->startElementNS( XML_w, XML_tblGrid, FSEND );
- std::vector<SwTwips> gridCols = GetGridCols( pTableTextNodeInfoInner );
- for ( std::vector<SwTwips>::const_iterator it = gridCols.begin(); it != gridCols.end(); ++it )
+ ww8::GridColsPtr pGridCols = GetGridCols( pTableTextNodeInfoInner );
+ for ( ww8::GridCols::const_iterator it = pGridCols->begin(); it != pGridCols->end(); ++it )
m_pSerializer->singleElementNS( XML_w, XML_gridCol,
FSNS( XML_w, XML_w ), OString::valueOf( sal_Int32( *it ) ).getStr( ),
FSEND );
@@ -1333,9 +1701,11 @@ void DocxAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Point
const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox();
const SwFrmFmt * pFrmFmt = pTabBox->GetFrmFmt();
+ bool bEcma = GetExport().GetFilter().getVersion( ) == oox::core::ECMA_DIALECT;
+
// the defaults of the table are taken from the top-left cell
m_pSerializer->startElementNS( XML_w, XML_tblBorders, FSEND );
- impl_pageBorders( m_pSerializer, pFrmFmt->GetBox( ) );
+ impl_pageBorders( m_pSerializer, pFrmFmt->GetBox( ), !bEcma );
m_pSerializer->endElementNS( XML_w, XML_tblBorders );
}
@@ -1351,10 +1721,11 @@ void DocxAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_
else
aColor = COL_AUTO;
- OString sColor = impl_ConvertColor( aColor );
- m_pSerializer->singleElementNS( XML_w, XML_shd,
- FSNS( XML_w, XML_fill ), sColor.getStr( ),
- FSEND );
+ OString sColor = impl_ConvertColor( aColor );
+ m_pSerializer->singleElementNS( XML_w, XML_shd,
+ FSNS( XML_w, XML_fill ), sColor.getStr( ),
+ FSNS( XML_w, XML_val ), "clear",
+ FSEND );
}
void DocxAttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
@@ -1391,7 +1762,7 @@ void DocxAttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t p
const SwFrmFmt * pLineFmt = pTabLine->GetFrmFmt();
const SwFmtRowSplit& rSplittable = pLineFmt->GetRowSplit( );
- const char* pCantSplit = ( !rSplittable.GetValue( ) ) ? "on" : "off";
+ const char* pCantSplit = ( !rSplittable.GetValue( ) ) ? "true" : "false";
m_pSerializer->singleElementNS( XML_w, XML_cantSplit,
FSNS( XML_w, XML_val ), pCantSplit,
@@ -1406,7 +1777,7 @@ void DocxAttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTabl
if ( m_rExport.TrueFrameDirection( *pFrmFmt ) == FRMDIR_HORI_RIGHT_TOP )
{
m_pSerializer->singleElementNS( XML_w, XML_bidiVisual,
- FSNS( XML_w, XML_val ), "on",
+ FSNS( XML_w, XML_val ), "true",
FSEND );
}
}
@@ -1443,7 +1814,7 @@ void DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_
void DocxAttributeOutput::TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ )
{
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "TODO: DocxAttributeOutput::TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" );
#endif
}
@@ -1468,7 +1839,7 @@ void DocxAttributeOutput::EndStyles( sal_uInt16 /*nNumberOfStyles*/ )
void DocxAttributeOutput::DefaultStyle( sal_uInt16 nStyle )
{
// are these the values of enum ww::sti (see ../inc/wwstyles.hxx)?
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 1
OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( sal_uInt16 nStyle )- %d\n", nStyle );
#else
(void) nStyle; // to quiet the warning
@@ -1477,9 +1848,7 @@ void DocxAttributeOutput::DefaultStyle( sal_uInt16 nStyle )
void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize )
{
-#if OSL_DEBUG_LEVEL > 0
OSL_TRACE( "TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ) - some stuff still missing\n" );
-#endif
// create the relation ID
OString aRelId;
sal_Int32 nImageType;
@@ -1516,10 +1885,56 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size
m_pSerializer->startElementNS( XML_w, XML_drawing,
FSEND );
- m_pSerializer->startElementNS( XML_wp, XML_inline,
- XML_distT, "0", XML_distB, "0", XML_distL, "0", XML_distR, "0",
- FSEND );
-
+ bool isAnchor = rGrfNode.GetFlyFmt()->GetAnchor().GetAnchorId() != FLY_AS_CHAR;
+ if( isAnchor )
+ {
+ m_pSerializer->startElementNS( XML_wp, XML_anchor,
+ XML_distT, "0", XML_distB, "0", XML_distL, "0", XML_distR, "0", XML_simplePos, "0",
+ XML_relativeHeight, "0", // TODO
+ XML_behindDoc, rGrfNode.GetFlyFmt()->GetOpaque().GetValue() ? "0" : "1",
+ XML_locked, "0", XML_layoutInCell, "1", XML_allowOverlap, "1", // TODO
+ FSEND );
+ m_pSerializer->singleElementNS( XML_wp, XML_simplePos, XML_x, "0", XML_y, "0", FSEND ); // required, unused
+ const char* relativeFromH;
+ const char* relativeFromV;
+ switch( rGrfNode.GetFlyFmt()->GetAnchor().GetAnchorId())
+ {
+ case FLY_AT_PAGE:
+ relativeFromV = relativeFromH = "page";
+ break;
+ case FLY_AT_PARA:
+ relativeFromH = "column";
+ relativeFromV = "paragraph";
+ break;
+ case FLY_AT_CHAR:
+ default:
+ relativeFromH = "character";
+ relativeFromV = "line";
+ break;
+ };
+ Point pos( 0, 0 );
+ if( SwFlyFrmFmt* flyfmt = dynamic_cast<SwFlyFrmFmt*>(rGrfNode.GetFlyFmt())) // TODO is always true?
+ pos = flyfmt->GetAnchoredObj()->GetCurrRelPos();
+ OString x( OString::valueOf( TwipsToEMU( pos.X())));
+ OString y( OString::valueOf( TwipsToEMU( pos.Y())));
+ m_pSerializer->startElementNS( XML_wp, XML_positionH, XML_relativeFrom, relativeFromH, FSEND );
+ m_pSerializer->startElementNS( XML_wp, XML_posOffset, FSEND );
+ m_pSerializer->write( x );
+ m_pSerializer->endElementNS( XML_wp, XML_posOffset );
+ m_pSerializer->endElementNS( XML_wp, XML_positionH );
+ m_pSerializer->startElementNS( XML_wp, XML_positionV, XML_relativeFrom, relativeFromV, FSEND );
+ m_pSerializer->startElementNS( XML_wp, XML_posOffset, FSEND );
+ m_pSerializer->write( y );
+ m_pSerializer->endElementNS( XML_wp, XML_posOffset );
+ m_pSerializer->endElementNS( XML_wp, XML_positionV );
+ }
+ else
+ {
+ m_pSerializer->startElementNS( XML_wp, XML_inline,
+ XML_distT, "0", XML_distB, "0", XML_distL, "0", XML_distR, "0",
+ FSEND );
+ }
+ // now the common parts
// extent of the image
OString aWidth( OString::valueOf( TwipsToEMU( rSize.Width() ) ) );
OString aHeight( OString::valueOf( TwipsToEMU( rSize.Height() ) ) );
@@ -1532,6 +1947,27 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size
XML_l, "0", XML_t, "0", XML_r, "0", XML_b, "0",
FSEND );
+ if( isAnchor )
+ {
+ switch( rGrfNode.GetFlyFmt()->GetSurround().GetValue())
+ {
+ case SURROUND_NONE:
+ m_pSerializer->singleElementNS( XML_wp, XML_wrapTopAndBottom, FSEND );
+ break;
+ case SURROUND_THROUGHT:
+ m_pSerializer->singleElementNS( XML_wp, XML_wrapNone, FSEND );
+ break;
+ case SURROUND_PARALLEL:
+ m_pSerializer->singleElementNS( XML_wp, XML_wrapSquare,
+ XML_wrapText, "bothSides", FSEND );
+ break;
+ case SURROUND_IDEAL:
+ default:
+ m_pSerializer->singleElementNS( XML_wp, XML_wrapSquare,
+ XML_wrapText, "largest", FSEND );
+ break;
+ }
+ }
// picture description
// TODO the right image description
m_pSerializer->startElementNS( XML_wp, XML_docPr,
@@ -1645,11 +2081,84 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size
m_pSerializer->endElementNS( XML_a, XML_graphicData );
m_pSerializer->endElementNS( XML_a, XML_graphic );
- m_pSerializer->endElementNS( XML_wp, XML_inline );
+ m_pSerializer->endElementNS( XML_wp, isAnchor ? XML_anchor : XML_inline );
m_pSerializer->endElementNS( XML_w, XML_drawing );
}
+void DocxAttributeOutput::WriteOLE2Obj( const SdrObject* pSdrObj, const Size& rSize )
+{
+ uno::Reference< chart2::XChartDocument > xChartDoc;
+ uno::Reference< drawing::XShape > xShape( ((SdrObject*)pSdrObj)->getUnoShape(), uno::UNO_QUERY );
+ if( xShape.is() )
+ {
+ uno::Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY );
+ if( xPropSet.is() )
+ xChartDoc.set( xPropSet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Model")) ), uno::UNO_QUERY );
+ }
+
+ if( xChartDoc.is() )
+ {
+ OSL_TRACE("DocxAttributeOutput::WriteOLE2Obj: export chart ");
+ m_pSerializer->startElementNS( XML_w, XML_drawing,
+ FSEND );
+ m_pSerializer->startElementNS( XML_wp, XML_inline,
+ XML_distT, "0", XML_distB, "0", XML_distL, "0", XML_distR, "0",
+ FSEND );
+
+ OString aWidth( OString::valueOf( TwipsToEMU( rSize.Width() ) ) );
+ OString aHeight( OString::valueOf( TwipsToEMU( rSize.Height() ) ) );
+ m_pSerializer->singleElementNS( XML_wp, XML_extent,
+ XML_cx, aWidth.getStr(),
+ XML_cy, aHeight.getStr(),
+ FSEND );
+ // TODO - the right effectExtent, extent including the effect
+ m_pSerializer->singleElementNS( XML_wp, XML_effectExtent,
+ XML_l, "0", XML_t, "0", XML_r, "0", XML_b, "0",
+ FSEND );
+
+ // should get the unique id
+ sal_Int32 nID = 1;
+ OUString sName(RTL_CONSTASCII_USTRINGPARAM("Object 1"));
+ uno::Reference< container::XNamed > xNamed( xShape, uno::UNO_QUERY );
+ if( xNamed.is() )
+ sName = xNamed->getName();
+
+ m_pSerializer->singleElementNS( XML_wp, XML_docPr,
+ XML_id, I32S( nID ),
+ XML_name, USS( sName ),
+ FSEND );
+
+ m_pSerializer->singleElementNS( XML_wp, XML_cNvGraphicFramePr,
+ FSEND );
+
+ m_pSerializer->startElementNS( XML_a, XML_graphic,
+ FSNS( XML_xmlns, XML_a ), "http://schemas.openxmlformats.org/drawingml/2006/main",
+ FSEND );
+
+ m_pSerializer->startElementNS( XML_a, XML_graphicData,
+ XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/chart",
+ FSEND );
+
+ OString aRelId;
+ static sal_Int32 nChartCount = 0;
+ nChartCount++;
+ uno::Reference< frame::XModel > xModel( xChartDoc, uno::UNO_QUERY );
+ aRelId = m_rExport.OutputChart( xModel, nChartCount );
+
+ m_pSerializer->singleElementNS( XML_c, XML_chart,
+ FSNS( XML_xmlns, XML_c ), "http://schemas.openxmlformats.org/drawingml/2006/chart",
+ FSNS( XML_xmlns, XML_r ), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
+ FSNS( XML_r, XML_id ), aRelId.getStr(),
+ FSEND );
+
+ m_pSerializer->endElementNS( XML_a, XML_graphicData );
+ m_pSerializer->endElementNS( XML_a, XML_graphic );
+ m_pSerializer->endElementNS( XML_wp, XML_inline );
+ m_pSerializer->endElementNS( XML_w, XML_drawing );
+ }
+}
+
void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Point& /*rNdTopLeft*/ )
{
m_pSerializer->mark();
@@ -1694,13 +2203,24 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po
}
}
break;
+ case sw::Frame::eTxtBox:
+ {
+ // The frame output is postponed at the end of the anchor paragraph
+ m_pParentFrame = &rFrame;
+ }
+ break;
+ case sw::Frame::eOle:
+ {
+ const SdrObject* pSdrObj = rFrame.GetFrmFmt().FindRealSdrObject();
+ if ( pSdrObj )
+ WriteOLE2Obj( pSdrObj, rFrame.GetLayoutSize() );
+ }
+ break;
default:
-#if OSL_DEBUG_LEVEL > 0
OSL_TRACE( "TODO DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Point& rNdTopLeft ) - frame type '%s'\n",
rFrame.GetWriterType() == sw::Frame::eTxtBox? "eTxtBox":
( rFrame.GetWriterType() == sw::Frame::eOle? "eOle":
( rFrame.GetWriterType() == sw::Frame::eFormControl? "eFormControl": "???" ) ) );
-#endif
break;
}
@@ -1708,7 +2228,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po
}
void DocxAttributeOutput::StartStyle( const String& rName, bool bPapFmt,
- sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId )
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId, bool bAutoUpdate )
{
OString aStyle( "style" );
@@ -1731,6 +2251,9 @@ void DocxAttributeOutput::StartStyle( const String& rName, bool bPapFmt,
m_pSerializer->singleElementNS( XML_w, XML_next,
FSNS( XML_w, XML_val ), ( aStyle + OString::valueOf( sal_Int32( nNext ) ) ).getStr(),
FSEND );
+
+ if ( bAutoUpdate )
+ m_pSerializer->singleElementNS( XML_w, XML_autoRedefine, FSEND );
}
void DocxAttributeOutput::EndStyle()
@@ -1782,7 +2305,7 @@ void DocxAttributeOutput::PageBreakBefore( bool bBreak )
m_pSerializer->singleElementNS( XML_w, XML_pageBreakBefore, FSEND );
else
m_pSerializer->singleElementNS( XML_w, XML_pageBreakBefore,
- FSNS( XML_w, XML_val ), "off",
+ FSNS( XML_w, XML_val ), "false",
FSEND );
}
@@ -1824,9 +2347,7 @@ void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectio
}
break;
default:
-#if OSL_DEBUG_LEVEL > 0
OSL_TRACE( "Unknown section break to write: %d\n", nC );
-#endif
break;
}
}
@@ -1835,19 +2356,58 @@ void DocxAttributeOutput::StartSection()
{
m_pSerializer->startElementNS( XML_w, XML_sectPr, FSEND );
m_bOpenedSectPr = true;
+
+ // Write the elements in the spec order
+ static const sal_Int32 aOrder[] =
+ {
+ FSNS( XML_w, XML_headerReference ),
+ FSNS( XML_w, XML_footerReference ),
+ FSNS( XML_w, XML_footnotePr ),
+ FSNS( XML_w, XML_endnotePr ),
+ FSNS( XML_w, XML_type ),
+ FSNS( XML_w, XML_pgSz ),
+ FSNS( XML_w, XML_pgMar ),
+ FSNS( XML_w, XML_paperSrc ),
+ FSNS( XML_w, XML_pgBorders ),
+ FSNS( XML_w, XML_lnNumType ),
+ FSNS( XML_w, XML_pgNumType ),
+ FSNS( XML_w, XML_cols ),
+ FSNS( XML_w, XML_formProt ),
+ FSNS( XML_w, XML_vAlign ),
+ FSNS( XML_w, XML_noEndnote ),
+ FSNS( XML_w, XML_titlePg ),
+ FSNS( XML_w, XML_textDirection ),
+ FSNS( XML_w, XML_bidi ),
+ FSNS( XML_w, XML_rtlGutter ),
+ FSNS( XML_w, XML_docGrid ),
+ FSNS( XML_w, XML_printerSettings ),
+ FSNS( XML_w, XML_sectPrChange )
+ };
+
+ // postpone the output so that we can later [in EndParagraphProperties()]
+ // prepend the properties before the run
+ sal_Int32 len = sizeof ( aOrder ) / sizeof( sal_Int32 );
+ uno::Sequence< sal_Int32 > aSeqOrder( len );
+ for ( sal_Int32 i = 0; i < len; i++ )
+ aSeqOrder[i] = aOrder[i];
+
+ m_pSerializer->mark( aSeqOrder );
}
void DocxAttributeOutput::EndSection()
{
// Write the section properties
- if ( m_pSpacingAttrList )
+ if ( m_pSectionSpacingAttrList )
{
- XFastAttributeListRef xAttrList( m_pSpacingAttrList );
- m_pSpacingAttrList = NULL;
+ XFastAttributeListRef xAttrList( m_pSectionSpacingAttrList );
+ m_pSectionSpacingAttrList = NULL;
m_pSerializer->singleElementNS( XML_w, XML_pgMar, xAttrList );
}
+ // Order the elements
+ m_pSerializer->mergeTopMarks( );
+
m_pSerializer->endElementNS( XML_w, XML_sectPr );
m_bOpenedSectPr = false;
}
@@ -1858,15 +2418,13 @@ void DocxAttributeOutput::SectionFormProtection( bool bProtected )
m_pSerializer->singleElementNS( XML_w, XML_formProt, FSEND );
else
m_pSerializer->singleElementNS( XML_w, XML_formProt,
- FSNS( XML_w, XML_val ), "off", FSEND );
+ FSNS( XML_w, XML_val ), "false", FSEND );
}
void DocxAttributeOutput::SectionLineNumbering( sal_uLong /*nRestartNo*/, const SwLineNumberInfo& /*rLnNumInfo*/ )
{
// see 2.6.8 lnNumType (Line Numbering Settings)
-#if OSL_DEBUG_LEVEL > 0
OSL_TRACE( "TODO DocxAttributeOutput::SectionLineNumbering()\n" );
-#endif
}
void DocxAttributeOutput::SectionTitlePage()
@@ -1878,7 +2436,6 @@ void DocxAttributeOutput::SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmF
{
// Output the margins
-
const SvxBoxItem& rBox = pFmt->GetBox( );
const SvxBorderLine* pBottom = rBox.GetBottom( );
@@ -1950,9 +2507,7 @@ void DocxAttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16
m_pSerializer->singleElementNS( XML_w, XML_pgNumType, xAttrs );
// see 2.6.12 pgNumType (Page Numbering Settings)
-#if OSL_DEBUG_LEVEL > 0
OSL_TRACE( "TODO DocxAttributeOutput::SectionPageNumbering()\n" );
-#endif
}
void DocxAttributeOutput::SectionType( sal_uInt8 nBreakCode )
@@ -1995,15 +2550,22 @@ void DocxAttributeOutput::FontAlternateName( const String& rName ) const
FSEND );
}
-void DocxAttributeOutput::FontCharset( sal_uInt8 nCharSet ) const
+void DocxAttributeOutput::FontCharset( sal_uInt8 nCharSet, rtl_TextEncoding nEncoding ) const
{
+ FastAttributeList* pAttr = m_pSerializer->createAttrList();
+
OString aCharSet( OString::valueOf( sal_Int32( nCharSet ), 16 ) );
if ( aCharSet.getLength() == 1 )
aCharSet = OString( "0" ) + aCharSet;
+ pAttr->add( FSNS( XML_w, XML_val ), aCharSet.getStr());
- m_pSerializer->singleElementNS( XML_w, XML_charset,
- FSNS( XML_w, XML_val ), aCharSet.getStr(),
- FSEND );
+ if( GetExport().GetFilter().getVersion( ) != oox::core::ECMA_DIALECT )
+ {
+ if( const char* charset = rtl_getMimeCharsetFromTextEncoding( nEncoding ))
+ pAttr->add( FSNS( XML_w, XML_characterSet ), charset );
+ }
+
+ m_pSerializer->singleElementNS( XML_w, XML_charset, XFastAttributeListRef( pAttr ));
}
void DocxAttributeOutput::FontFamilyType( FontFamily eFamily ) const
@@ -2056,7 +2618,7 @@ void DocxAttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &
FSNS( XML_w, XML_val ), aId.getStr(),
FSEND );
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 1
// TODO ww8 version writes this, anything to do about it here?
if ( rRule.IsContinusNum() )
OSL_TRACE( "TODO DocxAttributeOutput::NumberingDefinition()\n" );
@@ -2089,7 +2651,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
sal_Int16 nFirstLineIndex,
- sal_Int16 /*nListTabPos*/,
+ sal_Int16 nListTabPos,
const String &rNumberingString )
{
m_pSerializer->startElementNS( XML_w, XML_lvl,
@@ -2109,18 +2671,6 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
FSNS( XML_w, XML_val ), aFmt.getStr(),
FSEND );
- // justification
- const char *pJc;
- switch ( eAdjust )
- {
- case SVX_ADJUST_CENTER: pJc = "center"; break;
- case SVX_ADJUST_RIGHT: pJc = "right"; break;
- default: pJc = "left"; break;
- }
- m_pSerializer->singleElementNS( XML_w, XML_lvlJc,
- FSNS( XML_w, XML_val ), pJc,
- FSEND );
-
// suffix
const char *pSuffix = NULL;
switch ( nFollow )
@@ -2162,10 +2712,34 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
FSNS( XML_w, XML_val ), OUStringToOString( aBuffer.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ).getStr(),
FSEND );
+ // justification
+ const char *pJc;
+ bool ecmaDialect = ( m_rExport.GetFilter().getVersion() == oox::core::ECMA_DIALECT );
+ switch ( eAdjust )
+ {
+ case SVX_ADJUST_CENTER: pJc = "center"; break;
+ case SVX_ADJUST_RIGHT: pJc = !ecmaDialect ? "end" : "right"; break;
+ default: pJc = !ecmaDialect ? "start" : "left"; break;
+ }
+ m_pSerializer->singleElementNS( XML_w, XML_lvlJc,
+ FSNS( XML_w, XML_val ), pJc,
+ FSEND );
+
// indentation
m_pSerializer->startElementNS( XML_w, XML_pPr, FSEND );
+ if( nListTabPos != 0 )
+ {
+ m_pSerializer->startElementNS( XML_w, XML_tabs, FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_tab,
+ FSNS( XML_w, XML_val ), "num",
+ FSNS( XML_w, XML_pos ), OString::valueOf( static_cast<sal_Int32>(nListTabPos) ).getStr(),
+ FSEND );
+ m_pSerializer->endElementNS( XML_w, XML_tabs );
+ }
+
+ sal_Int32 nToken = ecmaDialect ? XML_left : XML_start;
m_pSerializer->singleElementNS( XML_w, XML_ind,
- FSNS( XML_w, XML_left ), OString::valueOf( sal_Int32( nIndentAt ) ).getStr(),
+ FSNS( XML_w, nToken ), OString::valueOf( sal_Int32( nIndentAt ) ).getStr(),
FSNS( XML_w, XML_hanging ), OString::valueOf( sal_Int32( -nFirstLineIndex ) ).getStr(),
FSEND );
m_pSerializer->endElementNS( XML_w, XML_pPr );
@@ -2177,6 +2751,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
if ( pFont )
{
+ GetExport().GetId( *pFont ); // ensure font info is written to fontTable.xml
OString aFamilyName( OUStringToOString( OUString( pFont->GetFamilyName() ), RTL_TEXTENCODING_UTF8 ) );
m_pSerializer->singleElementNS( XML_w, XML_rFonts,
FSNS( XML_w, XML_ascii ), aFamilyName.getStr(),
@@ -2185,7 +2760,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
FSNS( XML_w, XML_hint ), "default",
FSEND );
}
- m_rExport.OutputItemSet( *pOutSet, false, true, i18n::ScriptType::LATIN );
+ m_rExport.OutputItemSet( *pOutSet, false, true, i18n::ScriptType::LATIN, m_rExport.mbExportModeRTF );
m_pSerializer->endElementNS( XML_w, XML_rPr );
}
@@ -2206,8 +2781,8 @@ void DocxAttributeOutput::CharCaseMap( const SvxCaseMapItem& rCaseMap )
m_pSerializer->singleElementNS( XML_w, XML_caps, FSEND );
break;
default: // Something that ooxml does not support
- m_pSerializer->singleElementNS( XML_w, XML_smallCaps, FSNS( XML_w, XML_val ), "off", FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_caps, FSNS( XML_w, XML_val ), "off", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_smallCaps, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_caps, FSNS( XML_w, XML_val ), "false", FSEND );
break;
}
}
@@ -2228,7 +2803,7 @@ void DocxAttributeOutput::CharContour( const SvxContourItem& rContour )
if ( rContour.GetValue() )
m_pSerializer->singleElementNS( XML_w, XML_outline, FSEND );
else
- m_pSerializer->singleElementNS( XML_w, XML_outline, FSNS( XML_w, XML_val ), "off", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_outline, FSNS( XML_w, XML_val ), "false", FSEND );
}
void DocxAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut )
@@ -2239,8 +2814,8 @@ void DocxAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut )
m_pSerializer->singleElementNS( XML_w, XML_dstrike, FSEND );
break;
case STRIKEOUT_NONE:
- m_pSerializer->singleElementNS( XML_w, XML_dstrike, FSNS( XML_w, XML_val ), "off", FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_strike, FSNS( XML_w, XML_val ), "off", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_dstrike, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_strike, FSNS( XML_w, XML_val ), "false", FSEND );
break;
default:
m_pSerializer->singleElementNS( XML_w, XML_strike, FSEND );
@@ -2248,11 +2823,43 @@ void DocxAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut )
}
}
-void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& /*rEscapement*/ )
+void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
{
-#if OSL_DEBUG_LEVEL > 0
- OSL_TRACE( "TODO DocxAttributeOutput::CharEscapement()\n" );
-#endif
+ OString sIss;
+ short nEsc = rEscapement.GetEsc(), nProp = rEscapement.GetProp();
+ if ( !nEsc )
+ {
+ sIss = OString( "baseline" );
+ nEsc = 0;
+ nProp = 100;
+ }
+ else if ( DFLT_ESC_PROP == nProp )
+ {
+ if ( DFLT_ESC_SUB == nEsc || DFLT_ESC_AUTO_SUB == nEsc )
+ sIss = OString( "subscript" );
+ else if ( DFLT_ESC_SUPER == nEsc || DFLT_ESC_AUTO_SUPER == nEsc )
+ sIss = OString( "superscript" );
+ }
+
+ if ( sIss.getLength( ) > 0 )
+ m_pSerializer->singleElementNS( XML_w, XML_vertAlign,
+ FSNS( XML_w, XML_val ), sIss.getStr(), FSEND );
+
+ if ( sIss.getLength() == 0 || sIss.match( OString( "baseline" ) ) )
+ {
+ long nHeight = ((SvxFontHeightItem&)m_rExport.GetItem(
+ RES_CHRATR_FONTSIZE )).GetHeight();
+ OString sPos = OString::valueOf( ( nHeight * nEsc + 500 ) / 1000 );
+ m_pSerializer->singleElementNS( XML_w, XML_position,
+ FSNS( XML_w, XML_val ), sPos.getStr( ), FSEND );
+
+ if( 100 != nProp || sIss.match( OString( "baseline" ) ) )
+ {
+ OString sSize = OString::valueOf( ( nHeight * nProp + 500 ) / 1000 );
+ m_pSerializer->singleElementNS( XML_w, XML_sz,
+ FSNS( XML_w, XML_val ), sSize.getStr( ), FSEND );
+ }
+ }
}
void DocxAttributeOutput::CharFont( const SvxFontItem& rFont)
@@ -2284,7 +2891,7 @@ void DocxAttributeOutput::CharFontSize( const SvxFontHeightItem& rFontSize)
void DocxAttributeOutput::CharKerning( const SvxKerningItem& rKerning )
{
OString aKerning = OString::valueOf( ( sal_Int32 ) rKerning.GetValue() );
- m_pSerializer->singleElementNS( XML_w, XML_kern, FSNS(XML_w, XML_val), aKerning.getStr(), FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_spacing, FSNS(XML_w, XML_val), aKerning.getStr(), FSEND );
}
void DocxAttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
@@ -2317,7 +2924,7 @@ void DocxAttributeOutput::CharPosture( const SvxPostureItem& rPosture )
if ( rPosture.GetPosture() != ITALIC_NONE )
m_pSerializer->singleElementNS( XML_w, XML_i, FSEND );
else
- m_pSerializer->singleElementNS( XML_w, XML_i, FSNS( XML_w, XML_val ), "off", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_i, FSNS( XML_w, XML_val ), "false", FSEND );
}
void DocxAttributeOutput::CharShadow( const SvxShadowedItem& rShadow )
@@ -2325,7 +2932,7 @@ void DocxAttributeOutput::CharShadow( const SvxShadowedItem& rShadow )
if ( rShadow.GetValue() )
m_pSerializer->singleElementNS( XML_w, XML_shadow, FSEND );
else
- m_pSerializer->singleElementNS( XML_w, XML_shadow, FSNS( XML_w, XML_val ), "off", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_shadow, FSNS( XML_w, XML_val ), "false", FSEND );
}
void DocxAttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
@@ -2362,14 +2969,12 @@ void DocxAttributeOutput::CharWeight( const SvxWeightItem& rWeight )
if ( rWeight.GetWeight() == WEIGHT_BOLD )
m_pSerializer->singleElementNS( XML_w, XML_b, FSEND );
else
- m_pSerializer->singleElementNS( XML_w, XML_b, FSNS( XML_w, XML_val ), "off", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_b, FSNS( XML_w, XML_val ), "false", FSEND );
}
void DocxAttributeOutput::CharAutoKern( const SvxAutoKernItem& )
{
-#if OSL_DEBUG_LEVEL > 0
OSL_TRACE( "TODO DocxAttributeOutput::CharAutoKern()\n" );
-#endif
}
void DocxAttributeOutput::CharAnimatedText( const SvxBlinkItem& rBlink )
@@ -2383,7 +2988,9 @@ void DocxAttributeOutput::CharAnimatedText( const SvxBlinkItem& rBlink )
void DocxAttributeOutput::CharBackground( const SvxBrushItem& rBrush )
{
m_pSerializer->singleElementNS( XML_w, XML_shd,
- FSNS( XML_w, XML_fill ), impl_ConvertColor( rBrush.GetColor() ).getStr(), FSEND );
+ FSNS( XML_w, XML_fill ), impl_ConvertColor( rBrush.GetColor() ).getStr(),
+ FSNS( XML_w, XML_val ), "clear",
+ FSEND );
}
void DocxAttributeOutput::CharFontCJK( const SvxFontItem& rFont )
@@ -2400,7 +3007,7 @@ void DocxAttributeOutput::CharPostureCJK( const SvxPostureItem& rPosture )
if ( rPosture.GetPosture() != ITALIC_NONE )
m_pSerializer->singleElementNS( XML_w, XML_i, FSEND );
else
- m_pSerializer->singleElementNS( XML_w, XML_i, FSNS( XML_w, XML_val ), "off", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_i, FSNS( XML_w, XML_val ), "false", FSEND );
}
void DocxAttributeOutput::CharWeightCJK( const SvxWeightItem& rWeight )
@@ -2408,7 +3015,7 @@ void DocxAttributeOutput::CharWeightCJK( const SvxWeightItem& rWeight )
if ( rWeight.GetWeight() == WEIGHT_BOLD )
m_pSerializer->singleElementNS( XML_w, XML_b, FSEND );
else
- m_pSerializer->singleElementNS( XML_w, XML_b, FSNS( XML_w, XML_val ), "off", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_b, FSNS( XML_w, XML_val ), "false", FSEND );
}
void DocxAttributeOutput::CharFontCTL( const SvxFontItem& rFont )
@@ -2426,7 +3033,7 @@ void DocxAttributeOutput::CharPostureCTL( const SvxPostureItem& rPosture)
if ( rPosture.GetPosture() != ITALIC_NONE )
m_pSerializer->singleElementNS( XML_w, XML_iCs, FSEND );
else
- m_pSerializer->singleElementNS( XML_w, XML_iCs, FSNS( XML_w, XML_val ), "off", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_iCs, FSNS( XML_w, XML_val ), "false", FSEND );
}
void DocxAttributeOutput::CharWeightCTL( const SvxWeightItem& rWeight )
@@ -2434,7 +3041,7 @@ void DocxAttributeOutput::CharWeightCTL( const SvxWeightItem& rWeight )
if ( rWeight.GetWeight() == WEIGHT_BOLD )
m_pSerializer->singleElementNS( XML_w, XML_bCs, FSEND );
else
- m_pSerializer->singleElementNS( XML_w, XML_bCs, FSNS( XML_w, XML_val ), "off", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_bCs, FSNS( XML_w, XML_val ), "false", FSEND );
}
void DocxAttributeOutput::CharRotate( const SvxCharRotateItem& rRotate)
@@ -2512,8 +3119,8 @@ void DocxAttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
m_pSerializer->singleElementNS( XML_w, XML_imprint, FSEND );
break;
default:
- m_pSerializer->singleElementNS( XML_w, XML_emboss, FSNS( XML_w, XML_val ), "off", FSEND );
- m_pSerializer->singleElementNS( XML_w, XML_imprint, FSNS( XML_w, XML_val ), "off", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_emboss, FSNS( XML_w, XML_val ), "false", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_imprint, FSNS( XML_w, XML_val ), "false", FSEND );
break;
}
}
@@ -2523,7 +3130,7 @@ void DocxAttributeOutput::CharHidden( const SvxCharHiddenItem& rHidden )
if ( rHidden.GetValue() )
m_pSerializer->singleElementNS( XML_w, XML_vanish, FSEND );
else
- m_pSerializer->singleElementNS( XML_w, XML_vanish, FSNS( XML_w, XML_val ), "off", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_vanish, FSNS( XML_w, XML_val ), "false", FSEND );
}
void DocxAttributeOutput::TextINetFormat( const SwFmtINetFmt& rLink )
@@ -2537,11 +3144,12 @@ void DocxAttributeOutput::TextINetFormat( const SwFmtINetFmt& rLink )
m_pSerializer->singleElementNS( XML_w, XML_rStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND );
}
-void DocxAttributeOutput::TextCharFormat( const SwFmtCharFmt& )
+void DocxAttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt )
{
-#if OSL_DEBUG_LEVEL > 0
- OSL_TRACE( "TODO DocxAttributeOutput::TextCharFormat()\n" );
-#endif
+ OString aStyleId( "style" );
+ aStyleId += OString::valueOf( sal_Int32( m_rExport.GetId( *rCharFmt.GetCharFmt() ) ) );
+
+ m_pSerializer->singleElementNS( XML_w, XML_rStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND );
}
void DocxAttributeOutput::RefField( const SwField& rFld, const String& rRef )
@@ -2562,16 +3170,12 @@ void DocxAttributeOutput::RefField( const SwField& rFld, const String& rRef )
void DocxAttributeOutput::HiddenField( const SwField& /*rFld*/ )
{
-#if OSL_DEBUG_LEVEL > 0
OSL_TRACE( "TODO DocxAttributeOutput::HiddenField()\n" );
-#endif
}
void DocxAttributeOutput::PostitField( const SwField* /* pFld*/ )
{
-#if OSL_DEBUG_LEVEL > 0
OSL_TRACE( "TODO DocxAttributeOutput::PostitField()\n" );
-#endif
}
bool DocxAttributeOutput::DropdownField( const SwField* pFld )
@@ -2606,7 +3210,6 @@ void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType
infos.eType = eType;
infos.bClose = WRITEFIELD_CLOSE & nMode;
infos.bOpen = WRITEFIELD_START & nMode;
-
m_Fields.push_back( infos );
if ( pFld )
@@ -2628,6 +3231,12 @@ void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType
}
}
+void DocxAttributeOutput::WriteFormData_Impl( const ::sw::mark::IFieldmark& rFieldmark )
+{
+ if ( !m_Fields.empty() )
+ m_Fields.begin()->pFieldmark = &rFieldmark;
+}
+
void DocxAttributeOutput::WriteBookmarks_Impl( std::vector< OUString >& rStarts,
std::vector< OUString >& rEnds )
{
@@ -2747,6 +3356,8 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes )
FSEND );
const SwNodeIndex* pIndex = (*i)->GetTxtFtn()->GetStartNode();
+ // tag required at the start of each footnote/endnote
+ m_footnoteEndnoteRefTag = bFootnotes ? XML_footnoteRef : XML_endnoteRef;
m_rExport.WriteSpecialText( pIndex->GetIndex() + 1,
pIndex->GetNode().EndOfSectionIndex(),
@@ -2759,36 +3370,63 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes )
}
-void DocxAttributeOutput::ParaLineSpacing_Impl( short nSpace, short /*nMulti*/ )
+void DocxAttributeOutput::ParaLineSpacing_Impl( short nSpace, short nMulti )
{
- if ( !m_pSpacingAttrList )
- m_pSpacingAttrList = m_pSerializer->createAttrList();
+ if ( !m_pParagraphSpacingAttrList )
+ m_pParagraphSpacingAttrList = m_pSerializer->createAttrList();
if ( nSpace < 0 )
{
- m_pSpacingAttrList->add( FSNS( XML_w, XML_lineRule ), "exact" );
- m_pSpacingAttrList->add( FSNS( XML_w, XML_line ), OString::valueOf( sal_Int32( -nSpace ) ) );
+ m_pParagraphSpacingAttrList->add( FSNS( XML_w, XML_lineRule ), "exact" );
+ m_pParagraphSpacingAttrList->add( FSNS( XML_w, XML_line ), OString::valueOf( sal_Int32( -nSpace ) ) );
+ }
+ else if( nMulti )
+ {
+ m_pParagraphSpacingAttrList->add( FSNS( XML_w, XML_lineRule ), "auto" );
+ m_pParagraphSpacingAttrList->add( FSNS( XML_w, XML_line ), OString::valueOf( sal_Int32( nSpace ) ) );
}
else if ( nSpace > 0 )
{
- m_pSpacingAttrList->add( FSNS( XML_w, XML_lineRule ), "atLeast" );
- m_pSpacingAttrList->add( FSNS( XML_w, XML_line ), OString::valueOf( sal_Int32( nSpace ) ) );
+ m_pParagraphSpacingAttrList->add( FSNS( XML_w, XML_lineRule ), "atLeast" );
+ m_pParagraphSpacingAttrList->add( FSNS( XML_w, XML_line ), OString::valueOf( sal_Int32( nSpace ) ) );
}
else
- m_pSpacingAttrList->add( FSNS( XML_w, XML_lineRule ), "auto" );
+ m_pParagraphSpacingAttrList->add( FSNS( XML_w, XML_lineRule ), "auto" );
}
void DocxAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
{
const char *pAdjustString;
+ bool bEcma = GetExport().GetFilter().getVersion( ) == oox::core::ECMA_DIALECT;
+
+ const SfxItemSet* pItems = GetExport().GetCurItemSet();
+ const SvxFrameDirectionItem* rFrameDir = static_cast< const SvxFrameDirectionItem* >( pItems->GetItem( RES_FRAMEDIR ) );
+
+ bool bRtl = false;
+ short nDir = rFrameDir->GetValue();
+ bRtl = ( nDir == FRMDIR_HORI_RIGHT_TOP );
+
+ if ( nDir == FRMDIR_ENVIRONMENT )
+ nDir = GetExport( ).GetDefaultFrameDirection( );
+
switch ( rAdjust.GetAdjust() )
{
case SVX_ADJUST_LEFT:
- pAdjustString = "left";
+ if ( bEcma )
+ pAdjustString = "left";
+ else if ( bRtl )
+ pAdjustString = "end";
+ else
+ pAdjustString = "start";
break;
case SVX_ADJUST_RIGHT:
- pAdjustString = "right";
+ if ( bEcma )
+ pAdjustString = "right";
+ else if ( bRtl )
+ pAdjustString = "start";
+ else
+ pAdjustString = "end";
break;
case SVX_ADJUST_BLOCKLINE:
case SVX_ADJUST_BLOCK:
@@ -2806,7 +3444,7 @@ void DocxAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
void DocxAttributeOutput::ParaSplit( const SvxFmtSplitItem& rSplit )
{
if (rSplit.GetValue())
- m_pSerializer->singleElementNS( XML_w, XML_keepLines, FSNS( XML_w, XML_val ), "off", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_keepLines, FSNS( XML_w, XML_val ), "false", FSEND );
else
m_pSerializer->singleElementNS( XML_w, XML_keepLines, FSEND );
}
@@ -2816,7 +3454,7 @@ void DocxAttributeOutput::ParaWidows( const SvxWidowsItem& rWidows )
if (rWidows.GetValue())
m_pSerializer->singleElementNS( XML_w, XML_widowControl, FSEND );
else
- m_pSerializer->singleElementNS( XML_w, XML_widowControl, FSNS( XML_w, XML_val ), "off", FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_widowControl, FSNS( XML_w, XML_val ), "false", FSEND );
}
static void impl_WriteTabElement( FSHelperPtr pSerializer,
@@ -2955,9 +3593,22 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
{
if ( m_rExport.bOutFlyFrmAttrs )
{
- #if OSL_DEBUG_LEVEL > 0
- OSL_TRACE( "TODO DocxAttributeOutput::FormatFrameSize() - Fly frames\n" );
- #endif
+ if ( !m_pFlyAttrList )
+ m_pFlyAttrList = m_pSerializer->createAttrList( );
+
+ if ( rSize.GetWidth() && rSize.GetWidthSizeType() == ATT_FIX_SIZE )
+ {
+ m_pFlyAttrList->add( FSNS( XML_w, XML_w ), OString::valueOf( rSize.GetWidth( ) ) );
+ }
+
+ if ( rSize.GetHeight() )
+ {
+ OString sRule( "exact" );
+ if ( rSize.GetHeightSizeType() == ATT_MIN_SIZE )
+ sRule = OString( "atLeast" );
+ m_pFlyAttrList->add( FSNS( XML_w, XML_hRule ), sRule );
+ m_pFlyAttrList->add( FSNS( XML_w, XML_h ), OString::valueOf( rSize.GetHeight( ) ) );
+ }
}
else if ( m_rExport.bOutPageDescs )
{
@@ -2965,7 +3616,6 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
if ( m_rExport.pAktPageDesc->GetLandscape( ) )
attrList->add( FSNS( XML_w, XML_orient ), "landscape" );
-
attrList->add( FSNS( XML_w, XML_w ), OString::valueOf( rSize.GetWidth( ) ) );
attrList->add( FSNS( XML_w, XML_h ), OString::valueOf( rSize.GetHeight( ) ) );
@@ -2978,24 +3628,26 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
void DocxAttributeOutput::FormatPaperBin( const SvxPaperBinItem& )
{
-#if OSL_DEBUG_LEVEL > 0
OSL_TRACE( "TODO DocxAttributeOutput::FormatPaperBin()\n" );
-#endif
}
void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
{
+ bool bEcma = m_rExport.GetFilter().getVersion( ) == oox::core::ECMA_DIALECT;
+
if ( m_rExport.bOutFlyFrmAttrs )
{
-#if OSL_DEBUG_LEVEL > 0
- OSL_TRACE( "DocxAttributeOutput::FormatLRSpace() - Fly frames\n" );
-#endif
+ if ( !m_pFlyAttrList )
+ m_pFlyAttrList = m_pSerializer->createAttrList();
+
+ m_pFlyAttrList->add( FSNS( XML_w, XML_hSpace ),
+ OString::valueOf(
+ sal_Int32( ( rLRSpace.GetLeft() + rLRSpace.GetRight() ) / 2 ) ) );
}
else if ( m_rExport.bOutPageDescs )
{
- if ( !m_pSpacingAttrList )
- m_pSpacingAttrList = m_pSerializer->createAttrList();
-
+ if ( !m_pSectionSpacingAttrList )
+ m_pSectionSpacingAttrList = m_pSerializer->createAttrList();
sal_uInt16 nLDist, nRDist;
const SfxPoolItem* pItem = m_rExport.HasItem( RES_BOX );
@@ -3009,15 +3661,15 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
nLDist = nLDist + (sal_uInt16)rLRSpace.GetLeft();
nRDist = nRDist + (sal_uInt16)rLRSpace.GetRight();
- m_pSpacingAttrList->add( FSNS( XML_w, XML_left ), OString::valueOf( sal_Int32( nLDist ) ) );
- m_pSpacingAttrList->add( FSNS( XML_w, XML_right ), OString::valueOf( sal_Int32( nRDist ) ) );
+ m_pSectionSpacingAttrList->add( FSNS( XML_w, XML_left ), OString::valueOf( sal_Int32( nLDist ) ) );
+ m_pSectionSpacingAttrList->add( FSNS( XML_w, XML_right ), OString::valueOf( sal_Int32( nRDist ) ) );
}
else
{
FastAttributeList *pLRSpaceAttrList = m_pSerializer->createAttrList();
- pLRSpaceAttrList->add( FSNS( XML_w, XML_left ), OString::valueOf( (sal_Int32) rLRSpace.GetTxtLeft() ) );
- pLRSpaceAttrList->add( FSNS( XML_w, XML_right ), OString::valueOf( (sal_Int32) rLRSpace.GetRight() ) );
+ pLRSpaceAttrList->add( FSNS( XML_w, ( bEcma ? XML_left : XML_start ) ), OString::valueOf( (sal_Int32) rLRSpace.GetTxtLeft() ) );
+ pLRSpaceAttrList->add( FSNS( XML_w, ( bEcma ? XML_right : XML_end ) ), OString::valueOf( (sal_Int32) rLRSpace.GetRight() ) );
sal_Int32 nFirstLineAdjustment = rLRSpace.GetTxtFirstLineOfst();
if (nFirstLineAdjustment > 0)
@@ -3030,78 +3682,205 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace )
{
- if (!m_pSpacingAttrList)
- m_pSpacingAttrList = m_pSerializer->createAttrList();
if ( m_rExport.bOutFlyFrmAttrs )
{
+ if ( !m_pFlyAttrList )
+ m_pFlyAttrList = m_pSerializer->createAttrList();
+
+ m_pFlyAttrList->add( FSNS( XML_w, XML_vSpace ),
+ OString::valueOf(
+ sal_Int32( ( rULSpace.GetLower() + rULSpace.GetUpper() ) / 2 ) ) );
}
else if (m_rExport.bOutPageDescs )
{
- ASSERT( m_rExport.GetCurItemSet(), "Impossible" );
+ OSL_ENSURE( m_rExport.GetCurItemSet(), "Impossible" );
if ( !m_rExport.GetCurItemSet() )
return;
+ if ( !m_pSectionSpacingAttrList )
+ m_pSectionSpacingAttrList = m_pSerializer->createAttrList();
+
HdFtDistanceGlue aDistances( *m_rExport.GetCurItemSet() );
+ sal_Int32 nHeader = 0;
if ( aDistances.HasHeader() )
- {
- // Header top
- m_pSpacingAttrList->add( FSNS( XML_w, XML_header ),
- OString::valueOf( sal_Int32( aDistances.dyaHdrTop ) ) );
- }
+ nHeader = sal_Int32( aDistances.dyaHdrTop );
+ m_pSectionSpacingAttrList->add( FSNS( XML_w, XML_header ), OString::valueOf( nHeader ) );
// Page top
- m_pSpacingAttrList->add( FSNS( XML_w, XML_top ),
+ m_pSectionSpacingAttrList->add( FSNS( XML_w, XML_top ),
OString::valueOf( sal_Int32( aDistances.dyaTop ) ) );
+ sal_Int32 nFooter = 0;
if ( aDistances.HasFooter() )
- {
- // Footer bottom
- m_pSpacingAttrList->add( FSNS( XML_w, XML_footer ),
- OString::valueOf( sal_Int32( aDistances.dyaHdrBottom ) ) );
- }
+ nFooter = sal_Int32( aDistances.dyaHdrBottom );
+ m_pSectionSpacingAttrList->add( FSNS( XML_w, XML_footer ), OString::valueOf( nFooter ) );
// Page Bottom
- m_pSpacingAttrList->add( FSNS( XML_w, XML_bottom ),
+ m_pSectionSpacingAttrList->add( FSNS( XML_w, XML_bottom ),
OString::valueOf( sal_Int32( aDistances.dyaBottom ) ) );
+ // FIXME Page Gutter is not handled ATM, setting to 0 as it's mandatory for OOXML
+ m_pSectionSpacingAttrList->add( FSNS( XML_w, XML_gutter ),
+ OString::valueOf( sal_Int32( 0 ) ) );
+
}
else
{
- m_pSpacingAttrList->add( FSNS( XML_w, XML_before ),
+ if ( !m_pParagraphSpacingAttrList )
+ m_pParagraphSpacingAttrList = m_pSerializer->createAttrList();
+ m_pParagraphSpacingAttrList->add( FSNS( XML_w, XML_before ),
OString::valueOf( (sal_Int32)rULSpace.GetUpper() ) );
- m_pSpacingAttrList->add( FSNS( XML_w, XML_after ),
+ m_pParagraphSpacingAttrList->add( FSNS( XML_w, XML_after ),
OString::valueOf( (sal_Int32)rULSpace.GetLower() ) );
}
}
-void DocxAttributeOutput::FormatSurround( const SwFmtSurround& )
+void DocxAttributeOutput::FormatSurround( const SwFmtSurround& rSurround )
{
-#if OSL_DEBUG_LEVEL > 0
- OSL_TRACE( "TODO DocxAttributeOutput::FormatSurround()\n" );
-#endif
+ if ( m_rExport.bOutFlyFrmAttrs )
+ {
+ if ( !m_pFlyAttrList )
+ m_pFlyAttrList = m_pSerializer->createAttrList();
+
+ OString sWrap( "auto" );
+ switch ( rSurround.GetSurround( ) )
+ {
+ case SURROUND_NONE:
+ sWrap = OString( "none" );
+ break;
+ case SURROUND_THROUGHT:
+ sWrap = OString( "through" );
+ break;
+ case SURROUND_IDEAL:
+ case SURROUND_PARALLEL:
+ case SURROUND_LEFT:
+ case SURROUND_RIGHT:
+ default:
+ sWrap = OString( "around" );
+ }
+
+ m_pFlyAttrList->add( FSNS( XML_w, XML_wrap ), sWrap );
+ }
}
-void DocxAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& )
+void DocxAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert )
{
-#if OSL_DEBUG_LEVEL > 0
- OSL_TRACE( "TODO DocxAttributeOutput::FormatVertOrientation()\n" );
-#endif
+ if ( m_rExport.bOutFlyFrmAttrs )
+ {
+ if ( !m_pFlyAttrList )
+ m_pFlyAttrList = m_pSerializer->createAttrList();
+
+ OString sAlign;
+ switch( rFlyVert.GetVertOrient() )
+ {
+ case text::VertOrientation::NONE:
+ break;
+ case text::VertOrientation::CENTER:
+ case text::VertOrientation::LINE_CENTER:
+ sAlign = OString( "center" );
+ break;
+ case text::VertOrientation::BOTTOM:
+ case text::VertOrientation::LINE_BOTTOM:
+ sAlign = OString( "bottom" );
+ break;
+ case text::VertOrientation::TOP:
+ case text::VertOrientation::LINE_TOP:
+ default:
+ sAlign = OString( "top" );
+ break;
+ }
+
+ if ( sAlign.getLength() > 0 )
+ m_pFlyAttrList->add( FSNS( XML_w, XML_yAlign ), sAlign );
+ else
+ m_pFlyAttrList->add( FSNS( XML_w, XML_y ),
+ OString::valueOf( sal_Int32( rFlyVert.GetPos() ) ) );
+
+ OString sVAnchor( "page" );
+ switch ( rFlyVert.GetRelationOrient( ) )
+ {
+ case text::RelOrientation::CHAR:
+ case text::RelOrientation::PRINT_AREA:
+ case text::RelOrientation::TEXT_LINE:
+ sVAnchor = OString( "column" );
+ break;
+ case text::RelOrientation::FRAME:
+ case text::RelOrientation::PAGE_LEFT:
+ case text::RelOrientation::PAGE_RIGHT:
+ case text::RelOrientation::FRAME_LEFT:
+ case text::RelOrientation::FRAME_RIGHT:
+ sVAnchor = OString( "margin" );
+ break;
+ case text::RelOrientation::PAGE_FRAME:
+ case text::RelOrientation::PAGE_PRINT_AREA:
+ default:
+ break;
+ }
+
+ m_pFlyAttrList->add( FSNS( XML_w, XML_vAnchor ), sVAnchor );
+ }
}
-void DocxAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& )
+void DocxAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori )
{
-#if OSL_DEBUG_LEVEL > 0
- OSL_TRACE( "TODO DocxAttributeOutput::FormatHorizOrientation()\n" );
-#endif
+ if ( m_rExport.bOutFlyFrmAttrs )
+ {
+ if ( !m_pFlyAttrList )
+ m_pFlyAttrList = m_pSerializer->createAttrList();
+
+ OString sAlign;
+ switch( rFlyHori.GetHoriOrient() )
+ {
+ case text::HoriOrientation::NONE:
+ break;
+ case text::HoriOrientation::LEFT:
+ sAlign = OString( rFlyHori.IsPosToggle( ) ? "inside" : "left" );
+ break;
+ case text::HoriOrientation::RIGHT:
+ sAlign = OString( rFlyHori.IsPosToggle( ) ? "outside" : "right" );
+ break;
+ case text::HoriOrientation::CENTER:
+ case text::HoriOrientation::FULL: // FULL only for tables
+ default:
+ sAlign = OString( "center" );
+ break;
+ }
+
+ if ( sAlign.getLength() > 0 )
+ m_pFlyAttrList->add( FSNS( XML_w, XML_xAlign ), sAlign );
+ else
+ m_pFlyAttrList->add( FSNS( XML_w, XML_x ),
+ OString::valueOf( sal_Int32( rFlyHori.GetPos() ) ) );
+
+ OString sHAnchor( "page" );
+ switch ( rFlyHori.GetRelationOrient( ) )
+ {
+ case text::RelOrientation::CHAR:
+ case text::RelOrientation::PRINT_AREA:
+ sHAnchor = OString( "text" );
+ break;
+ case text::RelOrientation::FRAME:
+ case text::RelOrientation::PAGE_LEFT:
+ case text::RelOrientation::PAGE_RIGHT:
+ case text::RelOrientation::FRAME_LEFT:
+ case text::RelOrientation::FRAME_RIGHT:
+ sHAnchor = OString( "margin" );
+ break;
+ case text::RelOrientation::PAGE_FRAME:
+ case text::RelOrientation::PAGE_PRINT_AREA:
+ default:
+ break;
+ }
+
+ m_pFlyAttrList->add( FSNS( XML_w, XML_hAnchor ), sHAnchor );
+ }
}
void DocxAttributeOutput::FormatAnchor( const SwFmtAnchor& )
{
-#if OSL_DEBUG_LEVEL > 0
- OSL_TRACE( "TODO DocxAttributeOutput::FormatAnchor()\n" );
-#endif
+ // Fly frames: anchors here aren't matching the anchors in docx
}
void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
@@ -3111,12 +3890,9 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
OString sColor = impl_ConvertColor( rBrush.GetColor( ) );
m_pSerializer->singleElementNS( XML_w, XML_shd,
FSNS( XML_w, XML_fill ), sColor.getStr( ),
+ FSNS( XML_w, XML_val ), "clear",
FSEND );
}
-
-#if OSL_DEBUG_LEVEL > 0
- OSL_TRACE( "TODO DocxAttributeOutput::FormatBackground()\n" );
-#endif
}
void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
@@ -3199,9 +3975,52 @@ void DocxAttributeOutput::FormatKeep( const SvxFmtKeepItem& )
m_pSerializer->singleElementNS( XML_w, XML_keepNext, FSEND );
}
-void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& )
+void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
{
- OSL_TRACE( "TODO DocxAttributeOutput::FormatTextGrid()\n" );
+ FastAttributeList *pGridAttrList = m_pSerializer->createAttrList();
+
+ OString sGridType;
+ switch ( rGrid.GetGridType( ) )
+ {
+ default:
+ case GRID_NONE:
+ sGridType = OString( "default" );
+ break;
+ case GRID_LINES_ONLY:
+ sGridType = OString( "lines" );
+ break;
+ case GRID_LINES_CHARS:
+ if ( rGrid.IsSnapToChars( ) )
+ sGridType = OString( "snapToChars" );
+ else
+ sGridType = OString( "linesAndChars" );
+ break;
+ }
+ pGridAttrList->add( FSNS( XML_w, XML_type ), sGridType.getStr( ) );
+
+ sal_uInt16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
+ pGridAttrList->add( FSNS( XML_w, XML_linePitch ),
+ OString::valueOf( sal_Int32( nHeight ) ).getStr( ) );
+
+ MSWordStyles * pStyles = m_rExport.pStyles;
+ SwFmt * pSwFmt = pStyles->GetSwFmt();
+
+ sal_uInt32 nPageCharSize = 0;
+
+ if (pSwFmt != NULL)
+ {
+ nPageCharSize = ItemGet<SvxFontHeightItem>
+ (*pSwFmt, RES_CHRATR_FONTSIZE).GetHeight();
+ }
+
+ sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() :
+ rGrid.GetBaseWidth( );
+ sal_Int32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
+
+ pGridAttrList->add( FSNS( XML_w, XML_charSpace ),
+ OString::valueOf( sal_Int32( nCharSpace ) ).getStr( ) );
+
+ m_pSerializer->singleElementNS( XML_w, XML_docGrid, pGridAttrList );
}
void DocxAttributeOutput::FormatLineNumbering( const SwFmtLineNumber& rNumbering )
@@ -3257,10 +4076,13 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
m_pFontsAttrList( NULL ),
m_pEastAsianLayoutAttrList( NULL ),
m_pCharLangAttrList( NULL ),
- m_pSpacingAttrList( NULL ),
+ m_pSectionSpacingAttrList( NULL ),
+ m_pParagraphSpacingAttrList( NULL ),
m_pHyperlinkAttrList( NULL ),
+ m_pFlyAttrList( NULL ),
m_pFootnotesList( new ::docx::FootnotesList() ),
m_pEndnotesList( new ::docx::FootnotesList() ),
+ m_footnoteEndnoteRefTag( 0 ),
m_pSectionInfo( NULL ),
m_pRedlineData( NULL ),
m_nRedlineId( 0 ),
@@ -3271,7 +4093,8 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
m_bTableCellOpen( false ),
m_nTableDepth( 0 ),
m_bParagraphOpened( false ),
- m_nColBreakStatus( COLBRK_NONE )
+ m_nColBreakStatus( COLBRK_NONE ),
+ m_pParentFrame( NULL )
{
}
@@ -3280,16 +4103,19 @@ DocxAttributeOutput::~DocxAttributeOutput()
delete m_pFontsAttrList, m_pFontsAttrList = NULL;
delete m_pEastAsianLayoutAttrList, m_pEastAsianLayoutAttrList = NULL;
delete m_pCharLangAttrList, m_pCharLangAttrList = NULL;
- delete m_pSpacingAttrList, m_pSpacingAttrList = NULL;
+ delete m_pSectionSpacingAttrList, m_pSectionSpacingAttrList = NULL;
+ delete m_pParagraphSpacingAttrList, m_pParagraphSpacingAttrList = NULL;
delete m_pHyperlinkAttrList, m_pHyperlinkAttrList = NULL;
+ delete m_pFlyAttrList, m_pFlyAttrList = NULL;
delete m_pFootnotesList, m_pFootnotesList = NULL;
delete m_pEndnotesList, m_pEndnotesList = NULL;
delete m_pTableWrt, m_pTableWrt = NULL;
+ m_pParentFrame = NULL;
}
-MSWordExportBase& DocxAttributeOutput::GetExport()
+DocxExport& DocxAttributeOutput::GetExport()
{
return m_rExport;
}
@@ -3303,3 +4129,5 @@ bool DocxAttributeOutput::HasEndnotes()
{
return !m_pEndnotesList->isEmpty();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 280697d277bf..8eee66c51ad6 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,6 +31,8 @@
#include "attributeoutputbase.hxx"
#include "fields.hxx"
+#include "IMark.hxx"
+#include "docxexport.hxx"
#include <sax/fshelper.hxx>
#include <sax/fastattribs.hxx>
@@ -39,9 +42,8 @@
#include <vector>
-class DocxExport;
-
class SwGrfNode;
+class SdrObject;
namespace docx { class FootnotesList; }
namespace oox { namespace drawingml { class DrawingML; } }
@@ -49,10 +51,12 @@ namespace oox { namespace drawingml { class DrawingML; } }
struct FieldInfos
{
const SwField* pField;
+ const ::sw::mark::IFieldmark* pFieldmark;
ww::eField eType;
bool bOpen;
bool bClose;
String sCmd;
+ FieldInfos() : pField(NULL), pFieldmark(NULL), eType(ww::eUNKNOWN), bOpen(false), bClose(false){}
};
enum DocxColBreakStatus
@@ -62,6 +66,7 @@ enum DocxColBreakStatus
COLBRK_WRITE
};
+/// The class that has handlers for various resource types when exporting as DOCX.
class DocxAttributeOutput : public AttributeOutputBase
{
public:
@@ -95,6 +100,8 @@ public:
/// Called after we end outputting the attributes.
virtual void EndRunProperties( const SwRedlineData* pRedlineData );
+ virtual void FootnoteEndnoteRefTag();
+
/// Output text (inside a run).
virtual void RunText( const String& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8 );
@@ -102,7 +109,7 @@ public:
virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet );
/// Output ruby start.
- virtual void StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby );
+ virtual void StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, const SwFmtRuby& rRuby );
/// Output ruby end.
virtual void EndRuby();
@@ -137,29 +144,18 @@ public:
virtual void ParagraphStyle( sal_uInt16 nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo );
-
virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner );
-
virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
+ virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
virtual void TableRowEnd( sal_uInt32 nDepth = 1 );
/// Start of the styles table.
@@ -173,7 +169,8 @@ public:
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId );
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
+ bool bAutoUpdate );
/// End of a style in the styles table.
virtual void EndStyle();
@@ -234,7 +231,7 @@ public:
void FontAlternateName( const String& rName ) const;
/// Font charset.
- void FontCharset( sal_uInt8 nCharSet ) const;
+ void FontCharset( sal_uInt8 nCharSet, rtl_TextEncoding nEncoding ) const;
/// Font family.
void FontFamilyType( FontFamily eFamily ) const;
@@ -266,6 +263,7 @@ public:
const String &rNumberingString );
void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode );
+ void WriteFormData_Impl( const ::sw::mark::IFieldmark& rFieldmark );
void WriteBookmarks_Impl( std::vector< rtl::OUString >& rStarts, std::vector< rtl::OUString >& rEnds );
@@ -298,26 +296,21 @@ private:
/// Output graphic fly frames.
void FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize );
+ void WriteOLE2Obj( const SdrObject* pSdrObj, const Size& rSize );
void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void EndTableCell( );
-
void EndTableRow( );
-
void EndTable();
/// End cell, row, and even the entire table if necessary.
void FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool bForceEmptyParagraph = false );
+ void WriteFFData( const FieldInfos& rInfos );
protected:
/// Output frames - the implementation.
@@ -537,11 +530,14 @@ private:
::sax_fastparser::FastAttributeList *m_pFontsAttrList, *m_pEastAsianLayoutAttrList;
::sax_fastparser::FastAttributeList *m_pCharLangAttrList;
- ::sax_fastparser::FastAttributeList *m_pSpacingAttrList;
+ ::sax_fastparser::FastAttributeList *m_pSectionSpacingAttrList;
+ ::sax_fastparser::FastAttributeList *m_pParagraphSpacingAttrList;
::sax_fastparser::FastAttributeList *m_pHyperlinkAttrList;
+ ::sax_fastparser::FastAttributeList *m_pFlyAttrList;
::docx::FootnotesList *m_pFootnotesList;
::docx::FootnotesList *m_pEndnotesList;
+ int m_footnoteEndnoteRefTag;
const WW8_SepInfo *m_pSectionInfo;
@@ -581,13 +577,16 @@ private:
// beginning of the next paragraph
DocxColBreakStatus m_nColBreakStatus;
+ const sw::Frame *m_pParentFrame;
+
public:
DocxAttributeOutput( DocxExport &rExport, ::sax_fastparser::FSHelperPtr pSerializer, oox::drawingml::DrawingML* pDrawingML );
virtual ~DocxAttributeOutput();
/// Return the right export class.
- virtual MSWordExportBase& GetExport();
+ virtual DocxExport& GetExport();
+ const DocxExport& GetExport() const { return const_cast< DocxAttributeOutput* >( this )->GetExport(); }
/// For eg. the output of the styles, we need to switch the serializer to enother one.
void SetSerializer( ::sax_fastparser::FSHelperPtr pSerializer ) { m_pSerializer = pSerializer; }
@@ -607,4 +606,4 @@ public:
#endif // _DOCXATTRIBUTEOUTPUT_HXX_
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 1e8826f20b2a..0bd0908ed9e5 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,14 +28,17 @@
#include "docxexport.hxx"
#include "docxexportfilter.hxx"
+#include "docxattributeoutput.hxx"
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/i18n/ScriptType.hdl>
+#include <com/sun/star/frame/XModel.hpp>
#include <oox/token/tokens.hxx>
#include <oox/export/drawingml.hxx>
#include <oox/export/vmlexport.hxx>
+#include <oox/export/chartexport.hxx>
#include <map>
#include <algorithm>
@@ -60,6 +64,7 @@
#include <rtl/ustrbuf.hxx>
#include <vcl/font.hxx>
+using namespace sax_fastparser;
using namespace ::comphelper;
using namespace ::com::sun::star;
using namespace ::oox;
@@ -188,7 +193,7 @@ bool DocxExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt )
}
void DocxExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt )
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 /*nBreakCode*/ )
{
// headers
if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_EVEN )
@@ -209,6 +214,10 @@ void DocxExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_FIRST )
WriteHeaderFooter( rFirstPageFmt, false, "first" );
+
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "DocxExport::WriteHeadersFooters() - nBreakCode introduced, but ignored\n" );
+#endif
}
void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, sal_uInt8 nMode )
@@ -216,9 +225,16 @@ void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const St
m_pAttrOutput->WriteField_Impl( pFld, eFldType, rFldCmd, nMode );
}
-void DocxExport::WriteFormData( const ::sw::mark::IFieldmark& /*rFieldmark*/ )
+void DocxExport::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
+{
+ m_pAttrOutput->WriteFormData_Impl( rFieldmark );
+}
+
+void DocxExport::WriteHyperlinkData( const ::sw::mark::IFieldmark& /*rFieldmark*/ )
{
- OSL_TRACE( "TODO DocxExport::WriteFormData()\n" );
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "TODO DocxExport::WriteHyperlinkData()\n" );
+#endif
}
void DocxExport::DoComboBox(const rtl::OUString& rName,
@@ -281,6 +297,33 @@ void DocxExport::DoFormText(const SwInputField* /*pFld*/)
OSL_TRACE( "TODO DocxExport::ForFormText()\n" );
}
+rtl::OString DocxExport::OutputChart( uno::Reference< frame::XModel >& xModel, sal_Int32 nCount )
+{
+ rtl::OUString aFileName = rtl::OUStringBuffer()
+ .appendAscii("charts/chart")
+ .append(nCount)
+ .appendAscii( ".xml" )
+ .makeStringAndClear();
+
+ OUString sId = m_pFilter->addRelation( m_pDocumentFS->getOutputStream(),
+ S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart" ),
+ aFileName );
+
+ aFileName = rtl::OUStringBuffer()
+ .appendAscii("word/charts/chart")
+ .append(nCount)
+ .appendAscii( ".xml" )
+ .makeStringAndClear();
+
+ ::sax_fastparser::FSHelperPtr pChartFS =
+ m_pFilter->openFragmentStreamWithSerializer( aFileName,
+ S( "application/vnd.openxmlformats-officedocument.drawingml.chart" ) );
+
+ oox::drawingml::ChartExport aChartExport( XML_w, pChartFS, xModel, m_pFilter, oox::drawingml::DrawingML::DOCUMENT_DOCX );
+ aChartExport.ExportContent();
+ return ::rtl::OUStringToOString( sId, RTL_TEXTENCODING_UTF8 );
+}
+
void DocxExport::ExportDocument_Impl()
{
InitStyles();
@@ -363,6 +406,11 @@ void DocxExport::OutputOLENode( const SwOLENode& )
OSL_TRACE( "TODO DocxExport::OutputOLENode( const SwOLENode& )\n" );
}
+void DocxExport::OutputLinkedOLE( const OUString& )
+{
+ // Nothing to implement here: WW8 only
+}
+
sal_uLong DocxExport::ReplaceCr( sal_uInt8 )
{
// Completely unused for Docx export... only here for code sharing
@@ -381,7 +429,7 @@ void DocxExport::PrepareNewPageDesc( const SfxItemSet* pSet,
const SwSectionFmt* pFmt = GetSectionFormat( rNd );
const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd );
- ASSERT( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
+ OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
if ( pNewPgDescFmt )
{
@@ -404,7 +452,7 @@ void DocxExport::InitStyles()
S( "styles.xml" ) );
::sax_fastparser::FSHelperPtr pStylesFS =
- m_pFilter->openOutputStreamWithSerializer( S( "word/styles.xml" ),
+ m_pFilter->openFragmentStreamWithSerializer( S( "word/styles.xml" ),
S( "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml" ) );
// switch the serializer to redirect the output to word/styles.xml
@@ -427,7 +475,7 @@ void DocxExport::WriteFootnotesEndnotes()
S( "footnotes.xml" ) );
::sax_fastparser::FSHelperPtr pFootnotesFS =
- m_pFilter->openOutputStreamWithSerializer( S( "word/footnotes.xml" ),
+ m_pFilter->openFragmentStreamWithSerializer( S( "word/footnotes.xml" ),
S( "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml" ) );
// switch the serializer to redirect the output to word/footnotes.xml
@@ -448,7 +496,7 @@ void DocxExport::WriteFootnotesEndnotes()
S( "endnotes.xml" ) );
::sax_fastparser::FSHelperPtr pEndnotesFS =
- m_pFilter->openOutputStreamWithSerializer( S( "word/endnotes.xml" ),
+ m_pFilter->openFragmentStreamWithSerializer( S( "word/endnotes.xml" ),
S( "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml" ) );
// switch the serializer to redirect the output to word/endnotes.xml
@@ -471,7 +519,7 @@ void DocxExport::WriteNumbering()
S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" ),
S( "numbering.xml" ) );
- ::sax_fastparser::FSHelperPtr pNumberingFS = m_pFilter->openOutputStreamWithSerializer( S( "word/numbering.xml" ),
+ ::sax_fastparser::FSHelperPtr pNumberingFS = m_pFilter->openFragmentStreamWithSerializer( S( "word/numbering.xml" ),
S( "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml" ) );
// switch the serializer to redirect the output to word/nubering.xml
@@ -504,12 +552,10 @@ void DocxExport::WriteHeaderFooter( const SwFmt& rFmt, bool bHeader, const char*
S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" ),
aName );
- pFS = m_pFilter->openOutputStreamWithSerializer( OUStringBuffer().appendAscii( "word/" ).append( aName ).makeStringAndClear(),
+ pFS = m_pFilter->openFragmentStreamWithSerializer( OUStringBuffer().appendAscii( "word/" ).append( aName ).makeStringAndClear(),
S( "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml" ) );
- pFS->startElementNS( XML_w, XML_hdr,
- FSNS( XML_xmlns, XML_w ), "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
- FSEND );
+ pFS->startElementNS( XML_w, XML_hdr, MainXmlNamespaces( pFS ));
}
else
{
@@ -519,12 +565,10 @@ void DocxExport::WriteHeaderFooter( const SwFmt& rFmt, bool bHeader, const char*
S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" ),
aName );
- pFS = m_pFilter->openOutputStreamWithSerializer( OUStringBuffer().appendAscii( "word/" ).append( aName ).makeStringAndClear(),
+ pFS = m_pFilter->openFragmentStreamWithSerializer( OUStringBuffer().appendAscii( "word/" ).append( aName ).makeStringAndClear(),
S( "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml" ) );
- pFS->startElementNS( XML_w, XML_ftr,
- FSNS( XML_xmlns, XML_w ), "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
- FSEND );
+ pFS->startElementNS( XML_w, XML_ftr, MainXmlNamespaces( pFS ));
}
// switch the serializer to redirect the output to word/styles.xml
@@ -562,7 +606,7 @@ void DocxExport::WriteFonts()
S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" ),
S( "fontTable.xml" ) );
- ::sax_fastparser::FSHelperPtr pFS = m_pFilter->openOutputStreamWithSerializer(
+ ::sax_fastparser::FSHelperPtr pFS = m_pFilter->openFragmentStreamWithSerializer(
S( "word/fontTable.xml" ),
S( "application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml" ) );
@@ -606,14 +650,7 @@ VMLExport& DocxExport::VMLExporter()
void DocxExport::WriteMainText()
{
// setup the namespaces
- m_pDocumentFS->startElementNS( XML_w, XML_document,
- FSNS( XML_xmlns, XML_o ), "urn:schemas-microsoft-com:office:office",
- FSNS( XML_xmlns, XML_r ), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
- FSNS( XML_xmlns, XML_v ), "urn:schemas-microsoft-com:vml",
- FSNS( XML_xmlns, XML_w ), "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
- FSNS( XML_xmlns, XML_w10 ), "urn:schemas-microsoft-com:office:word",
- FSNS( XML_xmlns, XML_wp ), "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",
- FSEND );
+ m_pDocumentFS->startElementNS( XML_w, XML_document, MainXmlNamespaces( m_pDocumentFS ));
// body
m_pDocumentFS->startElementNS( XML_w, XML_body, FSEND );
@@ -633,6 +670,25 @@ void DocxExport::WriteMainText()
m_pDocumentFS->endElementNS( XML_w, XML_document );
}
+XFastAttributeListRef DocxExport::MainXmlNamespaces( FSHelperPtr serializer )
+{
+ FastAttributeList* pAttr = serializer->createAttrList();
+ pAttr->add( FSNS( XML_xmlns, XML_o ), "urn:schemas-microsoft-com:office:office" );
+ pAttr->add( FSNS( XML_xmlns, XML_r ), "http://schemas.openxmlformats.org/officeDocument/2006/relationships" );
+ pAttr->add( FSNS( XML_xmlns, XML_v ), "urn:schemas-microsoft-com:vml" );
+ pAttr->add( FSNS( XML_xmlns, XML_w ), "http://schemas.openxmlformats.org/wordprocessingml/2006/main" );
+ pAttr->add( FSNS( XML_xmlns, XML_w10 ), "urn:schemas-microsoft-com:office:word" );
+ pAttr->add( FSNS( XML_xmlns, XML_wp ), "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" );
+ return XFastAttributeListRef( pAttr );
+}
+
+bool DocxExport::ignoreAttributeForStyles( sal_uInt16 nWhich ) const
+{
+ if( nWhich == RES_TEXTGRID )
+ return true; // w:docGrid is written only to document.xml, not to styles.xml
+ return MSWordExportBase::ignoreAttributeForStyles( nWhich );
+}
+
DocxExport::DocxExport( DocxExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM *pOriginalPam )
: MSWordExportBase( pDocument, pCurrentPam, pOriginalPam ),
m_pFilter( pFilter ),
@@ -650,7 +706,7 @@ DocxExport::DocxExport( DocxExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCur
S( "word/document.xml" ) );
// the actual document
- m_pDocumentFS = m_pFilter->openOutputStreamWithSerializer( S( "word/document.xml" ),
+ m_pDocumentFS = m_pFilter->openFragmentStreamWithSerializer( S( "word/document.xml" ),
S( "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" ) );
// the DrawingML access
@@ -670,4 +726,4 @@ DocxExport::~DocxExport()
delete m_pDrawingML, m_pDrawingML = NULL;
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 3cf1397ea9b5..4838d55868c4 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,16 @@
#ifndef _DOCXEXPORT_HXX_
#define _DOCXEXPORT_HXX_
-#include "docxattributeoutput.hxx"
#include "wrtww8.hxx"
#include <sax/fshelper.hxx>
+#include <sax/fastattribs.hxx>
#include <rtl/ustring.hxx>
#include <cstdio>
#include <vector>
+class DocxAttributeOutput;
class DocxExportFilter;
class SwNode;
class SwEndNode;
@@ -52,6 +54,10 @@ namespace oox {
namespace vml { class VMLExport; }
}
+namespace com { namespace sun { namespace star {
+ namespace frame { class XModel; }
+} } }
+
/// The class that does all the actual DOCX export-related work.
class DocxExport : public MSWordExportBase
{
@@ -80,15 +86,20 @@ class DocxExport : public MSWordExportBase
oox::vml::VMLExport *m_pVMLExport;
public:
+
+ DocxExportFilter& GetFilter() { return *m_pFilter; };
+ const DocxExportFilter& GetFilter() const { return *m_pFilter; };
+
/// Access to the attribute output class.
virtual AttributeOutputBase& AttrOutput() const;
/// Access to the sections/headers/footres.
virtual MSWordSections& Sections() const;
- /// Hack, unfortunately necessary at some places for now.
- /// FIXME remove it when possible.
- virtual bool HackIsWW8OrHigher() const { return true; }
+ /// Determines if the format is expected to support unicode.
+ virtual bool SupportsUnicode() const { return true; }
+
+ virtual bool ignoreAttributeForStyles( sal_uInt16 nWhich ) const;
/// Guess the script (asian/western).
virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich );
@@ -108,7 +119,7 @@ public:
/// Output the actual headers and footers.
virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt );
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode );
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
@@ -116,6 +127,7 @@ public:
/// Write the data of the form field
virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark );
+ virtual void WriteHyperlinkData( const ::sw::mark::IFieldmark& rFieldmark );
virtual void DoComboBox(const rtl::OUString &rName,
const rtl::OUString &rHelp,
@@ -127,6 +139,9 @@ public:
virtual sal_uLong ReplaceCr( sal_uInt8 nChar );
+ /// Returns the relationd id
+ rtl::OString OutputChart( com::sun::star::uno::Reference< com::sun::star::frame::XModel >& xModel, sal_Int32 nCount );
+
protected:
/// Format-dependant part of the actual export.
virtual void ExportDocument_Impl();
@@ -146,10 +161,11 @@ protected:
/// Output SwOLENode
virtual void OutputOLENode( const SwOLENode& );
+ virtual void OutputLinkedOLE( const rtl::OUString& );
virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum );
- virtual void SectionBreaksAndFrames( const SwTxtNode& rNode ) {}
+ virtual void SectionBreaksAndFrames( const SwTxtNode& /*rNode*/ ) {}
/// Get ready for a new section.
virtual void PrepareNewPageDesc( const SfxItemSet* pSet,
@@ -176,6 +192,9 @@ private:
/// Write docProps/core.xml
void WriteProperties();
+ /// All xml namespaces to be used at the top of any text .xml file (main doc, headers, footers,...)
+ sax_fastparser::XFastAttributeListRef MainXmlNamespaces( sax_fastparser::FSHelperPtr serializer );
+
public:
/// FIXME this is temporary, remotely reminding the method of the same
/// name in WW8Export.
@@ -200,4 +219,5 @@ private:
};
#endif // _DOCXEXPORT_HXX_
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx
index 224f60ef6163..b784e8404b8f 100644
--- a/sw/source/filter/ww8/docxexportfilter.cxx
+++ b/sw/source/filter/ww8/docxexportfilter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,7 @@
#include <pam.hxx>
#include <unotxdoc.hxx>
-#include <cppuhelper/factory.hxx>
+#include <cppuhelper/implementationentry.hxx>
using namespace ::comphelper;
using namespace ::com::sun::star;
@@ -42,14 +43,14 @@ using ::rtl::OUString;
#define S( x ) OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
-DocxExportFilter::DocxExportFilter( const uno::Reference< lang::XMultiServiceFactory >& rMSF )
- : oox::core::XmlFilterBase( rMSF )
+DocxExportFilter::DocxExportFilter( const uno::Reference< uno::XComponentContext >& xContext )
+ : oox::core::XmlFilterBase( xContext )
{
}
bool DocxExportFilter::exportDocument()
{
- OSL_TRACE(, "DocxExportFilter::exportDocument()\n" ); // DEBUG remove me
+ OSL_TRACE( "DocxExportFilter::exportDocument()\n" ); // DEBUG remove me
// get SwDoc*
uno::Reference< uno::XInterface > xIfc( getModel(), uno::UNO_QUERY );
@@ -78,7 +79,7 @@ bool DocxExportFilter::exportDocument()
aExport.ExportDocument( true ); // FIXME support exporting selection only
}
- commit();
+ commitStorage();
// delete the pCurPam
if ( pCurPam )
@@ -114,15 +115,13 @@ uno::Sequence< OUString > SAL_CALL DocxExport_getSupportedServiceNames() throw()
return aSeq;
}
-uno::Reference< uno::XInterface > SAL_CALL DocxExport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception )
+uno::Reference< uno::XInterface > SAL_CALL DocxExport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
{
- return (cppu::OWeakObject*) new DocxExportFilter( rSMgr );
+ return (cppu::OWeakObject*) new DocxExportFilter( xCtx );
}
-#ifdef __cplusplus
extern "C"
{
-#endif
SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
{
@@ -133,50 +132,31 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const
// - component_getFactory -
// ------------------------
-SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
+::cppu::ImplementationEntry entries [] =
{
- 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 ) == 0 )
{
- const OUString aServiceName( OUString::createFromAscii( IMPL_NAME ) );
-
- xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
- reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- DocxExport_getImplementationName(),
- DocxExport_createInstance,
- DocxExport_getSupportedServiceNames() ) );
- } else 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() )
+ DocxExport_createInstance, DocxExport_getImplementationName,
+ DocxExport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
{
- xFactory->acquire();
- pRet = xFactory.get();
- }
-
- return pRet;
+ RtfExport_createInstance, RtfExport_getImplementationName,
+ RtfExport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
+ {
+ RtfImport_createInstance, RtfImport_getImplementationName,
+ RtfImport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+};
+
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* pRegistryKey )
+{
+ return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, entries );
}
-#ifdef __cplusplus
-}
-#endif
+} // extern "C"
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxexportfilter.hxx b/sw/source/filter/ww8/docxexportfilter.hxx
index 6565ad26c77c..68c11242ea0b 100644
--- a/sw/source/filter/ww8/docxexportfilter.hxx
+++ b/sw/source/filter/ww8/docxexportfilter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <oox/core/xmlfilterbase.hxx>
#include <oox/drawingml/chart/chartconverter.hxx>
-#include <oox/vml/drawing.hxx>
+#include <oox/vml/vmldrawing.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -38,14 +39,14 @@
class DocxExportFilter : public oox::core::XmlFilterBase
{
public:
- DocxExportFilter( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rMSF );
+ DocxExportFilter( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext );
// FIXME these should not even exist for the export-only filter!
// For now, let's just do empty implementations of those.
virtual bool importDocument() { return false; }
virtual const ::oox::drawingml::Theme* getCurrentTheme() const { return NULL; }
virtual sal_Int32 getSchemeClr( sal_Int32 ) const { return 0; }
- virtual const ::oox::vml::DrawingPtr getDrawings() { return ::oox::vml::DrawingPtr(); }
+ virtual ::oox::vml::Drawing* getVmlDrawing() { return NULL; }
virtual ::oox::drawingml::chart::ChartConverter& getChartConverter() { static ::oox::drawingml::chart::ChartConverter aConverter; return aConverter; }
virtual const ::oox::drawingml::table::TableStyleListPtr getTableStyles() { return ::oox::drawingml::table::TableStyleListPtr(); }
@@ -56,7 +57,13 @@ private:
/// Implementatio of the filter abstract method.
virtual ::rtl::OUString implGetImplementationName() const;
+
+ virtual ::oox::ole::VbaProject* implCreateVbaProject() const
+ {
+ return NULL; // FIXME: implement me !
+ }
};
#endif // _DOCXEXPORTFILTER_HXX_
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxfootnotes.hxx b/sw/source/filter/ww8/docxfootnotes.hxx
index ec91731bc6dd..300f50b34da8 100644
--- a/sw/source/filter/ww8/docxfootnotes.hxx
+++ b/sw/source/filter/ww8/docxfootnotes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,3 +98,5 @@ public:
} // namespace docx
#endif // _DOCXFOOTNOTES_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/dump/dump8.cxx b/sw/source/filter/ww8/dump/dump8.cxx
deleted file mode 100644
index f0679da25067..000000000000
--- a/sw/source/filter/ww8/dump/dump8.cxx
+++ /dev/null
@@ -1,171 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sw.hxx"
-
-
-#include <vcl/svapp.hxx>
-#include <vcl/wrkwin.hxx>
-#include <vcl/msgbox.hxx>
-
-#include <sot/storage.hxx>
-
-// globale Vars
-
-char** pPara;
-
-// Deklarationen
-
-int PrepareConvert( String& rName, String& rOutName, String& rMess );
-int DoConvert( const String& rName, sal_uInt8 nVersion );
-void DeInit();
-
-
-
-// -----------------------------------------------------------------------
-
-class MyApp : public Application
-{
-public:
- void Main();
-};
-
-// -----------------------------------------------------------------------
-
-MyApp aMyApp;
-
-// -----------------------------------------------------------------------
-
-class MyWin : public WorkWindow
-{
- String& rMessg;
-public:
- MyWin( Window* pParent, WinBits aWinStyle, String& rMess ) :
- WorkWindow(pParent, aWinStyle), rMessg( rMess ) {}
-
- void Paint( const Rectangle& );
- void Resize();
-
- void MouseButtonDown( const MouseEvent& rMEvt );
- void KeyInput( const KeyEvent& rKEvt );
-};
-
-// -----------------------------------------------------------------------
-
-extern SvStorageStreamRef xStrm;
-
-void MyApp::Main()
-{
- SvFactory::Init();
- String aMess, aName, aOutName;
- sal_uInt8 nVersion = 8;
-
- int nArgs = GetCommandLineParamCount();
- if (nArgs)
- {
- aName = GetCommandLineParam( 0 );
- if (aName.Search('.') == STRING_NOTFOUND)
- aName.AppendAscii( ".doc" );
- if (nArgs >= 2)
- {
- aOutName = GetCommandLineParam( 1 );
- if (nArgs > 2)
- {
- nVersion = GetCommandLineParam( 2 ).ToInt32();
- if( 6 > nVersion || 8 < nVersion )
- {
- aMess.AssignAscii( "Aufruf: Dump1 InFile [OutFile] [6|7|8]" );
- }
- }
- }
- else
- {
- aOutName = aName;
- aOutName.Erase(aOutName.Search('.'));
- aOutName.AppendAscii( ".dmp" );
- }
- }
-
- sal_Bool bOk = !aMess.Len()
- && !PrepareConvert( aName, aOutName, aMess )
- && !DoConvert( aName, nVersion );
-
- if( !bOk )
- {
- MyWin aMainWin( NULL, WB_APP | WB_STDWORK, aMess );
-
- aMainWin.SetText( String::CreateFromAscii( "WW8-Dumper" ));
- aMainWin.Show();
- aMainWin.Invalidate();
-
- Execute();
- }
- DeInit();
-// SvFactory::DeInit();
-}
-
-// -----------------------------------------------------------------------
-
-void MyWin::Paint( const Rectangle& )
-{
- String aText( String::CreateFromAscii( "Dumper fuer WinWord-Dateien !\n"
- "Die Wandlung ging schief. Ist es wirklich ein WW-File ?" ));
-
- Size aWinSize = GetOutputSizePixel();
- Size aTextSize( GetTextWidth( aText ), GetTextHeight());
- Point aPos( aWinSize.Width() / 2 - aTextSize.Width() / 2,
- aWinSize.Height() / 2 - aTextSize.Height() / 2 );
-
- DrawText( aPos, aText );
-
- aPos.Y() += 20;
- DrawText( aPos, rMessg );
-}
-
-// -----------------------------------------------------------------------
-
-void MyWin::Resize()
-{
- Invalidate();
-}
-
-// -----------------------------------------------------------------------
-
-void MyWin::MouseButtonDown( const MouseEvent& )
-{
-}
-
-// -----------------------------------------------------------------------
-
-void MyWin::KeyInput( const KeyEvent& rKEvt )
-{
- WorkWindow::KeyInput( rKEvt );
-}
-
-
-
diff --git a/sw/source/filter/ww8/dump/dump8a.cxx b/sw/source/filter/ww8/dump/dump8a.cxx
deleted file mode 100644
index 687386b1c9c0..000000000000
--- a/sw/source/filter/ww8/dump/dump8a.cxx
+++ /dev/null
@@ -1,2746 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sw.hxx"
-
-
-//#include <stdio.h> // SEEK_SET
-#include <string.h> // memset(), ...
-#include <io.h> // access()
-
-
-//#include "defs.hxx"
-#include <tools/solar.h>
-#include <sot/storage.hxx>
-#include "ww8struc.hxx"
-#include "ww8scan.hxx"
-#include "ww8darr.hxx"
-#include "ww8dout.hxx"
-
-#define ASSERT( a, b ) ( (a)?(void)0:(void)(*pOut<<endl1<<"ASSERTION failed "<< __FILE__<<__LINE__<< b <<endl1) )
-
-
-#define nWW8MaxListLevel 9
-
-WW8ScannerBase* pSBase = 0;
-//WW8PLCFMan* pPLCFMan = 0;
-
-WW8Fib* pWwFib = 0;
-SvStorageRef* pxStor;
-SvStorageStreamRef xStrm;
-SvStorageStreamRef xTableStream; // ist bei Ver6-7 mit xStrm identisch,
- // ansonsten entweder 0TABLE oder 1TABLE
-SvStorageStreamRef xDataStream; // ist bei Ver6-7 mit xStrm identisch,
- // ansonsten DATA
-
-typedef void (*FNDumpData)( void* );
-
-sal_Bool DumpChar( sal_uInt8 c );
-void DumpShortPlainText( WW8_CP nStartCp, long nTextLen, char* pName );
-void DumpPlainText( WW8_CP nStartCp, long nTextLen, char* pName );
-void DumpSprms( sal_uInt8 nVersion, SvStream& rSt, short nLen );
-
-
-sal_Bool WW8ReadINT32( SvStream& rStrm, sal_Int32& rTarget )
-{
- rStrm >> rTarget;
- return sal_True;
-
-
- SVBT32 nData;
- sal_Bool bOk = sal_True;
- if( 4 == rStrm.Read( &nData, 4 ) )
- rTarget = SVBT32ToUInt32( nData );
- else
- bOk = sal_False;
- return bOk;
-}
-
-sal_Bool WW8ReadINT16( SvStream& rStrm, sal_Int16& rTarget )
-{
- rStrm >> rTarget;
- return sal_True;
-
-
- SVBT16 nData;
- sal_Bool bOk = sal_True;
- if( 2 == rStrm.Read( &nData, 2 ) )
- {
- rTarget = SVBT16ToShort( nData );
- }
- else
- bOk = sal_False;
- return bOk;
-}
-
-sal_Bool WW8ReadBYTE( SvStream& rStrm, sal_uInt8& rTarget )
-{
- rStrm >> rTarget;
- return sal_True;
-
-
- SVBT8 nData;
- sal_Bool bOk = sal_True;
- if( 1 == rStrm.Read( &nData, 1 ) )
- rTarget = SVBT8ToByte( nData );
- else
- bOk = sal_False;
- return bOk;
-}
-
-sal_Bool WW8ReadUINT32( SvStream& rStrm, sal_uInt32& rTarget )
- { return WW8ReadINT32( rStrm, (sal_Int32&) rTarget ); }
-
-sal_Bool WW8ReadUINT16( SvStream& rStrm, sal_uInt16& rTarget )
- { return WW8ReadINT16( rStrm, (sal_Int16&) rTarget ); }
-
-
-static void Dump_LVL( sal_uInt16 nLevel )
-{
- indent( *pOut, *xTableStream );
-
- long nStart, dxaSpace, dxaIndent;
- sal_uInt8 nfc, nFlags, ixchFollow, cbChpx, cbPapx;
- sal_uInt8 aOfsNumsXCH[nWW8MaxListLevel];
- *xTableStream >> nStart >> nfc >> nFlags;
- xTableStream->Read( aOfsNumsXCH, 9 );
- *xTableStream >> ixchFollow >> dxaSpace >> dxaIndent
- >> cbChpx >> cbPapx;
- xTableStream->SeekRel( 2 );
-
- *pOut << " Level: " << nLevel << endl1;
- *pOut << indent2 << " Start: " << nStart
- << " Fmt: " << (sal_uInt16)nfc
- << " Follow: ";
- if( 0 == ixchFollow ) *pOut << "tab";
- else if( 1 == ixchFollow ) *pOut << "blank";
- else if( 2 == ixchFollow ) *pOut << "nothing";
- *pOut << endl1 << indent2<< " dxSpace: " << dxaSpace
- << " dxaIndent: " << dxaIndent << " LevelCharPos: ";
-
- for( sal_uInt8 x = 0; x < nWW8MaxListLevel; ++x )
- *pOut << (sal_uInt16)aOfsNumsXCH[ x ] << ", ";
- *pOut << endl1;
-
- if( cbPapx )
- {
- sal_uLong nXPos = xTableStream->Tell();
- DumpSprms( pWwFib->nVersion, *xTableStream, cbPapx );
- xTableStream->Seek( nXPos + cbPapx );
- }
- if( cbChpx )
- {
- sal_uLong nXPos = xTableStream->Tell();
- DumpSprms( pWwFib->nVersion, *xTableStream, cbChpx );
- xTableStream->Seek( nXPos + cbChpx );
- }
-
- sal_uInt16 nStrLen, nC;
- *xTableStream >> nStrLen;
- char* pStr = new char[ nStrLen+1 ], *p = pStr;
- while( nStrLen-- )
- {
- *xTableStream >> nC;
- if( 10 > nC ) nC += 0x30;
- *pStr++ = (char)nC;
- }
- *pStr = 0;
- *pOut << indent2 << "Str: \"" << p << '\"' << endl1 << endl1;
-}
-
-static void DumpNumList()
-{
- if( pWwFib->lcbSttbListNames )
- {
- sal_uLong nOldPos = xTableStream->Tell();
- xTableStream->Seek( pWwFib->fcSttbListNames );
-
- *pOut << endl1;
- begin( *pOut, *xTableStream ) << "ListNames, Size ";
-
- sal_uInt16 nDummy;
- sal_uInt32 nCount;
- *xTableStream >> nDummy >> nCount;
-
- *pOut << nCount << ", Dummy: " << nDummy << endl1;
-
- *pOut << indent2;
- for( ; nCount; --nCount )
- {
- sal_uInt16 nLen, nC;
- *xTableStream >> nLen;
- char * pChar = new char[ nLen + 1 ], *p = pChar;
- while( nLen-- )
- {
- *xTableStream >> nC;
- *pChar++ = (char)nC;
- }
- *pChar = 0;
- *pOut << '\"' << p << '\"';
- if( 1 < nCount ) *pOut << ", ";
- delete p;
- }
- *pOut << endl1;
-
- end( *pOut, *xTableStream ) << "ListNames" << endl1;
- xTableStream->Seek( nOldPos );
- }
-
- if( pWwFib->lcbPlcfLst )
- {
- sal_uLong nOldPos = xTableStream->Tell();
- xTableStream->Seek( pWwFib->fcPlcfLst );
-
- *pOut << endl1;
- begin( *pOut, *xTableStream ) << "LiST Data on File, Size ";
-
- sal_uInt16 nCount;
- *xTableStream >> nCount;
- *pOut << nCount << endl1;
-
- sal_uLong nLVLPos = pWwFib->fcPlcfLst + ( nCount * 0x1c ) + 2;
-
- // 1.1 alle LST einlesen
- for( sal_uInt16 nList = 0; nList < nCount; nList++ )
- {
- indent( *pOut, *xTableStream );
-
- sal_uInt8 nByte;
- sal_uInt32 nLstId, nTplId;
- *xTableStream >> nLstId >> nTplId;
-
- sal_uInt16 aStyleIdArr[ nWW8MaxListLevel ];
- for( sal_uInt16 nLevel = 0; nLevel < nWW8MaxListLevel; nLevel++ )
- *xTableStream >> aStyleIdArr[ nLevel ];
- *xTableStream >> nByte;
- xTableStream->SeekRel( 1 ); // Dummy ueberlesen
-
- *pOut << "ListId: " << nLstId
- << " TemplateId " << nTplId << endl1
- << indent2 << " StyleIds: ";
- for( nLevel = 0; nLevel < nWW8MaxListLevel; nLevel++ )
- *pOut << aStyleIdArr[ nLevel ] << ", ";
-
- *pOut << endl1;
- if( 1 & nByte ) *pOut << " <simple List>";
- if( 2 & nByte ) *pOut << " <restart at new section>";
- if( 3 & nByte ) *pOut << endl1;
-
- sal_uLong nTmpPos = xTableStream->Tell();
- xTableStream->Seek( nLVLPos );
-
- // 1.2 alle LVL aller aLST einlesen
- for( nLevel = 0; nLevel < ((1 & nByte) ? 1 : nWW8MaxListLevel); nLevel++ )
- Dump_LVL( nLevel );
-
- nLVLPos = xTableStream->Tell();
- xTableStream->Seek( nTmpPos );
- }
-
- end( *pOut, *xTableStream ) << "LiST Data on File" << endl1;
- xTableStream->Seek( nOldPos );
- }
-
- if( pWwFib->lcbPlfLfo )
- {
- sal_uLong nOldPos = xTableStream->Tell();
- xTableStream->Seek( pWwFib->fcPlfLfo );
-
- *pOut << endl1;
- begin( *pOut, *xTableStream ) << "List Format Override, Size ";
-
- sal_uInt32 nCount, nLstId;
- *xTableStream >> nCount;
- *pOut << nCount << endl1;
-
- sal_uLong nLVLPos = pWwFib->fcPlfLfo + ( nCount * 0x10 ) + 4;
-
- for( ; nCount; --nCount )
- {
- indent( *pOut, *xTableStream );
-
- sal_uInt8 nLevels;
- *xTableStream >> nLstId;
- xTableStream->SeekRel( 8 );
- *xTableStream >> nLevels;
- xTableStream->SeekRel( 3 );
-
- *pOut << "ListId: " << nLstId
- << " Override Levels: " << (sal_uInt16)nLevels << endl1;
-
- sal_uLong nTmpPos = xTableStream->Tell();
- xTableStream->Seek( nLVLPos );
-
- for( sal_uInt8 nLvl = 0; nLvl < nLevels; ++nLvl )
- {
- sal_uInt32 nStartAt;
- sal_uInt8 nFlags;
- do {
- *xTableStream >> nFlags;
- } while( 0xFF == nFlags );
- xTableStream->SeekRel( -1 );
-
- indent( *pOut, *xTableStream );
- *xTableStream >> nStartAt >> nFlags;
- xTableStream->SeekRel( 3 );
-
- if( nFlags & 0x10 ) *pOut << "<Override start>";
- if( nFlags & 0x20 ) *pOut << "<Override formattting>";
- if( nFlags & 0x30 ) *pOut << endl1;
-
- if( nFlags & 0x20 )
- Dump_LVL( nFlags & 0x0F );
- }
- nLVLPos = xTableStream->Tell();
- xTableStream->Seek( nTmpPos );
- }
-
- end( *pOut, *xTableStream ) << "List Format Override" << endl1 << endl1;
- xTableStream->Seek( nOldPos );
- }
-}
-
-static void DumpBookLow()
-{
- *pOut << begin2 << "Bookmarks Low" << endl1;
- *pOut << indent2 <<"Start: Adr " << hex6 << pWwFib->fcPlcfbkf
- << ", Len: " << pWwFib->lcbPlcfbkf << endl1;
- *pOut << indent2 << "End: Adr " << hex6 << pWwFib->fcPlcfbkl
- << ", Len: " << pWwFib->lcbPlcfbkl << endl1;
- *pOut << indent2 << "Strings: Adr " << hex6 << pWwFib->fcSttbfbkmk
- << ", Len: " << pWwFib->lcbSttbfbkmk << endl1;
- *pOut << endl1;
-
- WW8PLCFspecial aStarts( &xStrm, pWwFib->fcPlcfbkf, pWwFib->lcbPlcfbkf, 4 );
- WW8PLCFspecial aEnds( &xStrm, pWwFib->fcPlcfbkl, pWwFib->lcbPlcfbkl, 0, -1, sal_True );
-
- sal_uInt16 i = 0;
- while( 1 ){
- long nStart = aStarts.GetPos( i );
- if( nStart >= LONG_MAX )
- break;
-
- *pOut << indent2 << i << ".StartCp: " << hex6 << nStart;
-
- const void* p = aStarts.GetData( i );
- if( p ){
- *pOut << ", EndIdx: ";
- sal_uInt16 nEndIdx = *((sal_uInt16*)p);
- *pOut << nEndIdx;
- long nEnd = aEnds.GetPos( nEndIdx );
- *pOut << ", End: " << hex6 << nEnd << hex
- << ", Len: " << nEnd - nStart << dec;
- }else{
- *pOut << " aStarts.GetData() ging schief.";
- }
-
- *pOut << endl1;
- i++;
- }
- *pOut << end2 << "Bookmarks Low" << endl1 << endl1;
-}
-
-static void DumpBookHigh()
-{
- WW8PLCFx_Book aBook( &xStrm, &xTableStream, *pWwFib, 0 );
- if( !aBook.GetIMax() ){
- *pOut << indent1 << "No Bookmarks" << endl1 << endl1;
- return;
- }
-
- *pOut << indent1 << begin1 << "Bookmarks High" << endl1;
-
- sal_uInt16 i = 0;
- while( 1 )
- {
- long nPos = aBook.Where();
- if( nPos >= LONG_MAX )
- break;
- *pOut << indent2 << i << ". Cp:" << hex6 << nPos << dec;
- *pOut << ( ( aBook.GetIsEnd() ) ? " Ende " : " Anfang" );
- *pOut << " Handle: " << aBook.GetHandle();
-// *pOut << " Len: " << hex4 << aBook.GetLen() << dec;
- ByteString sName( *aBook.GetName(), RTL_TEXTENCODING_MS_1252 );
- if( sName.Len() )
- *pOut << " Name: " << sName.GetBuffer() << endl1;
- else
- *pOut << endl1;
- aBook++;
- i++;
- }
- *pOut << end2 << "Bookmarks High" << endl1 << endl1;
-}
-
-static sal_Bool DumpField3( WW8PLCFspecial& rPlc )
-{
- WW8FieldDesc aF;
-
- sal_Bool bOk = WW8GetFieldPara( pWwFib->nVersion, rPlc, aF );
- if( !bOk )
- {
- *pOut << " " << indent1 << "no WW8GetFieldPara()" << endl1;
- return sal_False;
- }
- *pOut << " " << indent1 << begin1 << "Field Cp: " << hex
- << aF.nSCode << ", Len: " << aF.nLCode << "; Cp: " << aF.nSRes
- << ", Len: "<< aF.nLRes << ", Typ: " << dec << (sal_uInt16)aF.nId
- << ", Options: " << hex << (sal_uInt16)aF.nOpt;
- if( aF.bCodeNest )
- *pOut << " Code Nested";
- if( aF.bResNest )
- *pOut << " Result Nested";
- *pOut << endl1;
- DumpShortPlainText( aF.nSCode, aF.nLCode, "Code" );
- DumpShortPlainText( aF.nSRes, aF.nLRes, "Result" );
- *pOut << " " << end1 << "Field" << endl1;
- return sal_True;
-}
-
-static sal_Bool DumpField2( WW8PLCFspecial& rPlc )
-{
- WW8_CP nSCode, nECode, nSRes, nERes;
- void* pData;
- if( !rPlc.Get( nSCode, pData ) ) // Ende des Plc1 ?
- return sal_False;
- rPlc++;
-
- if( ((sal_uInt8*)pData)[0] != 19 ){
- *pOut << "Field Error, " << (sal_uInt16)((sal_uInt8*)pData)[0] << endl1;
- return sal_True; // nicht abbrechen
- }
-
- *pOut << " " << indent1 << begin1 << "Field" << " Cp: " << hex
- << nSCode << " Typ: " << dec << (sal_uInt16)((sal_uInt8*)pData)[1] << endl1;
-
- if( !rPlc.Get( nECode, pData ) ) // Ende des Plc1 ?
- return sal_False;
-
- DumpShortPlainText( nSCode, nECode - nSCode, "Code" ); // Code, bei nested abgeschnitten
- nSRes = nECode; // Default
-
-
- while( ((sal_uInt8*)pData)[0] == 19 ){ // immer noch neue (nested) Anfaenge ?
- DumpField2( rPlc ); // nested Field im Beschreibungsteil
- if( !rPlc.Get( nSRes, pData ) ) // Ende des Plc1 ?
- return sal_False;
- }
-
- if( ((sal_uInt8*)pData)[0] == 20 ){ // Field Separator ?
- rPlc++;
- *pOut << " " << indent1 << "Field Seperator" << " Cp: " << hex << nSRes
- << ", Flags = 0x" << hex << (sal_uInt16)((sal_uInt8*)pData)[1] << dec << endl1;
- if( !rPlc.Get( nERes, pData ) ) // Ende des Plc1 ?
- return sal_False;
-
- while( ((sal_uInt8*)pData)[0] == 19 ){ // immer noch neue (nested) Anfaenge ?
- DumpField2( rPlc ); // nested Field im Resultatteil
- if( !rPlc.Get( nERes, pData ) ) // Ende des Plc1 ?
- return sal_False;
- }
- DumpShortPlainText( nSRes, nERes - nSRes, "Result" ); // Result, bei nested incl. nested Field
-
- }else{
- nERes = nSRes; // Kein Result vorhanden
- }
-
- rPlc++;
- if( ((sal_uInt8*)pData)[0] == 21 ){ // Field Ende ?
- *pOut << " " << end1 << " Field " << " Cp: " << hex << nERes
- << ", Flags = 0x" << hex << (sal_uInt16)((sal_uInt8*)pData)[1] << dec << endl1;
- }else{
- *pOut << " Unknown Field Type" << endl1;
- *pOut << " " << end1 << " Field " << endl1;
- }
-
- return sal_True;
-}
-
-static void DumpField1( WW8_FC nPos, long nLen, char* pName )
-{
- if( !nLen )
- {
- *pOut << pName << ": No Fields" << endl1 << endl1;
- return;
- }
-
- WW8PLCFspecial aPlc( &xTableStream, nPos, nLen, 2 );
-
- *pOut << hex6 << nPos << dec2 << ' ' << indent1 << begin1;
- *pOut << "Plc." << pName << ", Len: ";
- *pOut << nLen << ", ca. " << aPlc.GetIMax()/3 << " Elements"
-
- << " Idx: " << (long)aPlc.GetIdx()
- << " IMax: " << aPlc.GetIMax()
-
- << endl1;
-
-// while( DumpField2( aPlc ) ){}
- while( (long)aPlc.GetIdx() < aPlc.GetIMax() )
- {
- DumpField3( aPlc );
- aPlc++;
- }
-
- end( *pOut, *xStrm ) << "Plcx." << pName << endl1 << endl1;
-}
-
-
-//-----------------------------------------
-static void DumpFonts()
-{
- WW8Fonts aFonts( *xTableStream, *pWwFib );
-
- sal_uInt16 i;
-
- *pOut << endl1;
- *pOut << 'T' << hex6 << pWwFib->fcSttbfffn << dec2 << ' ' << indent1 << begin1 << "FFNs" << endl1;
-
- ByteString sOut;
-
- for( i=0; i<aFonts.GetMax(); i++){
- // const
- WW8_FFN* p = (WW8_FFN*)aFonts.GetFont( i );
-
- sOut = ByteString( p->sFontname, RTL_TEXTENCODING_MS_1252 );
- *pOut << "Id:" << i << " Name:\"" << sOut.GetBuffer() << '"'; // Name
- if( p->ibszAlt ) // gibt es einen alternativen Font ?
- {
- sOut = ByteString( p->sFontname.Copy( p->ibszAlt ),
- RTL_TEXTENCODING_MS_1252 );
- *pOut << ", Alternativ:" << '"' << sOut.GetBuffer() << '"';
- }
- *pOut << ", PitchRequest:" << (short)p->prg << ", TrueType:" << (short)p->fTrueType;
- *pOut << ", FontFamily:" << (short)p->ff;
- *pOut << ", BaseWeight:" << p->wWeight;
- *pOut << ", CharacterSet:" << (short)p->chs;
- *pOut << endl1;
- }
- *pOut << " " << end1 << "FFNs" << endl1 << endl1;
-}
-
-
-//-----------------------------------------
-// class DFib
-//-----------------------------------------
-
-class DFib: public WW8Fib
-{
-public:
- DFib( SvStream& rStrm, sal_uInt8 nVersion ) : WW8Fib( rStrm, nVersion ) {}
- void Dump();
-};
-
-//-----------------------------------------
-
-void DFib::Dump()
-{
- *pOut << "Adressen: FIB " << hex << 0 << ", Text "
- << fcMin << ", TextLen " << ccpText
- << ", Styles " << fcStshf << endl1;
-
- *pOut << "\twIdent: " << wIdent << endl1;
- *pOut << "\tnFib: " << nFib << endl1;
- *pOut << "\tnProduct: " << nProduct << endl1;
- *pOut << "\tlid: " << lid << endl1;
- *pOut << "\tpnNext: " << pnNext << endl1;
-
- *pOut << "\tfDot: " << (fDot ? '1' : '0') << endl1;
- *pOut << "\tfGlsy: " << (fGlsy ? '1' : '0') << endl1;
- *pOut << "\tfComplex: " << (fComplex ? '1' : '0') << endl1;
- *pOut << "\tfHasPic: " << (fHasPic ? '1' : '0') << endl1;
- *pOut << "\tcQuickSaves: " << (sal_uInt16)cQuickSaves << endl1;
- *pOut << "\tfEncrypted: " << (fEncrypted ? '1' : '0') << endl1;
- *pOut << "\tfWhichTblStm: " << (fWhichTblStm ? '1' : '0') << endl1;
- *pOut << "\tfExtChar: " << (fExtChar ? '1' : '0') << endl1;
-
- *pOut << "\tnFibBack: " << nFibBack << endl1;
- *pOut << "\tlKey1: " << lKey1 << endl1;
- *pOut << "\tlKey2: " << lKey2 << endl1;
- *pOut << "\tenvr: " << envr << endl1;
-
- *pOut << "\tfMac: " << (fMac ? '1' : '0') << endl1;
- *pOut << "\tfEmptySpecial: " << (fEmptySpecial ? '1' : '0') << endl1;
- *pOut << "\tfLoadOverridePage: " << (fLoadOverridePage ? '1' : '0') << endl1;
- *pOut << "\tfFuturesavedUndo: " << (fFuturesavedUndo ? '1' : '0') << endl1;
- *pOut << "\tfWord97Saved: " << (fWord97Saved ? '1' : '0') << endl1;
-
- *pOut << "\tchse: " << chse << endl1;
- *pOut << "\tchseTables: " << chseTables << endl1;
- *pOut << "\tfcMin: " << fcMin << endl1;
- *pOut << "\tfcMac: " << fcMac << endl1;
- *pOut << "\tcsw: " << csw << endl1;
- *pOut << "\twMagicCreated: " << wMagicCreated << endl1;
- *pOut << "\twMagicRevised: " << wMagicRevised << endl1;
- *pOut << "\twMagicCreatedPrivate: " << wMagicCreatedPrivate << endl1;
- *pOut << "\twMagicRevisedPrivate: " << wMagicRevisedPrivate << endl1;
- *pOut << "\tlidFE: " << lidFE << endl1;
- *pOut << "\tclw: " << clw << endl1;
- *pOut << "\tcbMac: " << cbMac << endl1;
- *pOut << "\tccpText: " << ccpText << endl1;
- *pOut << "\tccpFtn: " << ccpFtn << endl1;
- *pOut << "\tccpHdr: " << ccpHdr << endl1;
- *pOut << "\tccpMcr: " << ccpMcr << endl1;
- *pOut << "\tccpAtn: " << ccpAtn << endl1;
- *pOut << "\tccpEdn: " << ccpEdn << endl1;
- *pOut << "\tccpTxbx: " << ccpTxbx << endl1;
- *pOut << "\tccpHdrTxbx: " << ccpHdrTxbx << endl1;
- *pOut << "\tpnFbpChpFirst: " << pnFbpChpFirst << endl1;
- *pOut << "\tpnFbpPapFirst: " << pnFbpPapFirst << endl1;
- *pOut << "\tpnFbpLvcFirst: " << pnFbpLvcFirst << endl1;
- *pOut << "\tpnLvcFirst: " << pnLvcFirst << endl1;
- *pOut << "\tcpnBteLvc: " << cpnBteLvc << endl1;
- *pOut << "\tfcIslandFirst: " << fcIslandFirst << endl1;
- *pOut << "\tfcIslandLim: " << fcIslandLim << endl1;
- *pOut << "\tcfclcb: " << cfclcb << endl1;
- *pOut << "\tfcStshfOrig: " << fcStshfOrig << endl1;
- *pOut << "\tlcbStshfOrig: " << lcbStshfOrig << endl1;
- *pOut << "\tfcStshf: " << fcStshf << endl1;
- *pOut << "\tlcbStshf: " << lcbStshf << endl1;
- *pOut << "\tfcPlcffndRef: " << fcPlcffndRef << endl1;
- *pOut << "\tlcbPlcffndRef: " << lcbPlcffndRef << endl1;
- *pOut << "\tfcPlcffndTxt: " << fcPlcffndTxt << endl1;
- *pOut << "\tlcbPlcffndTxt: " << lcbPlcffndTxt << endl1;
- *pOut << "\tfcPlcfandRef: " << fcPlcfandRef << endl1;
- *pOut << "\tlcbPlcfandRef: " << lcbPlcfandRef << endl1;
- *pOut << "\tfcPlcfandTxt: " << fcPlcfandTxt << endl1;
- *pOut << "\tlcbPlcfandTxt: " << lcbPlcfandTxt << endl1;
- *pOut << "\tfcPlcfsed: " << fcPlcfsed << endl1;
- *pOut << "\tlcbPlcfsed: " << lcbPlcfsed << endl1;
- *pOut << "\tfcPlcfpad: " << fcPlcfpad << endl1;
- *pOut << "\tlcbPlcfpad: " << lcbPlcfpad << endl1;
- *pOut << "\tfcPlcfphe: " << fcPlcfphe << endl1;
- *pOut << "\tlcbPlcfphe: " << lcbPlcfphe << endl1;
- *pOut << "\tfcSttbfglsy: " << fcSttbfglsy << endl1;
- *pOut << "\tlcbSttbfglsy: " << lcbSttbfglsy << endl1;
- *pOut << "\tfcPlcfglsy: " << fcPlcfglsy << endl1;
- *pOut << "\tlcbPlcfglsy: " << lcbPlcfglsy << endl1;
- *pOut << "\tfcPlcfhdd: " << fcPlcfhdd << endl1;
- *pOut << "\tlcbPlcfhdd: " << lcbPlcfhdd << endl1;
- *pOut << "\tfcPlcfbteChpx: " << fcPlcfbteChpx << endl1;
- *pOut << "\tlcbPlcfbteChpx: " << lcbPlcfbteChpx << endl1;
- *pOut << "\tfcPlcfbtePapx: " << fcPlcfbtePapx << endl1;
- *pOut << "\tlcbPlcfbtePapx: " << lcbPlcfbtePapx << endl1;
- *pOut << "\tfcPlcfsea: " << fcPlcfsea << endl1;
- *pOut << "\tlcbPlcfsea: " << lcbPlcfsea << endl1;
- *pOut << "\tfcSttbfffn: " << fcSttbfffn << endl1;
- *pOut << "\tlcbSttbfffn: " << lcbSttbfffn << endl1;
- *pOut << "\tfcPlcffldMom: " << fcPlcffldMom << endl1;
- *pOut << "\tlcbPlcffldMom: " << lcbPlcffldMom << endl1;
- *pOut << "\tfcPlcffldHdr: " << fcPlcffldHdr << endl1;
- *pOut << "\tlcbPlcffldHdr: " << lcbPlcffldHdr << endl1;
- *pOut << "\tfcPlcffldFtn: " << fcPlcffldFtn << endl1;
- *pOut << "\tlcbPlcffldFtn: " << lcbPlcffldFtn << endl1;
- *pOut << "\tfcPlcffldAtn: " << fcPlcffldAtn << endl1;
- *pOut << "\tlcbPlcffldAtn: " << lcbPlcffldAtn << endl1;
- *pOut << "\tfcPlcffldMcr: " << fcPlcffldMcr << endl1;
- *pOut << "\tlcbPlcffldMcr: " << lcbPlcffldMcr << endl1;
- *pOut << "\tfcSttbfbkmk: " << fcSttbfbkmk << endl1;
- *pOut << "\tlcbSttbfbkmk: " << lcbSttbfbkmk << endl1;
- *pOut << "\tfcPlcfbkf: " << fcPlcfbkf << endl1;
- *pOut << "\tlcbPlcfbkf: " << lcbPlcfbkf << endl1;
- *pOut << "\tfcPlcfbkl: " << fcPlcfbkl << endl1;
- *pOut << "\tlcbPlcfbkl: " << lcbPlcfbkl << endl1;
- *pOut << "\tfcCmds: " << fcCmds << endl1;
- *pOut << "\tlcbCmds: " << lcbCmds << endl1;
- *pOut << "\tfcPlcfmcr: " << fcPlcfmcr << endl1;
- *pOut << "\tlcbPlcfmcr: " << lcbPlcfmcr << endl1;
- *pOut << "\tfcSttbfmcr: " << fcSttbfmcr << endl1;
- *pOut << "\tlcbSttbfmcr: " << lcbSttbfmcr << endl1;
- *pOut << "\tfcPrDrvr: " << fcPrDrvr << endl1;
- *pOut << "\tlcbPrDrvr: " << lcbPrDrvr << endl1;
- *pOut << "\tfcPrEnvPort: " << fcPrEnvPort << endl1;
- *pOut << "\tlcbPrEnvPort: " << lcbPrEnvPort << endl1;
- *pOut << "\tfcPrEnvLand: " << fcPrEnvLand << endl1;
- *pOut << "\tlcbPrEnvLand: " << lcbPrEnvLand << endl1;
- *pOut << "\tfcWss: " << fcWss << endl1;
- *pOut << "\tlcbWss: " << lcbWss << endl1;
- *pOut << "\tfcDop: " << fcDop << endl1;
- *pOut << "\tlcbDop: " << lcbDop << endl1;
- *pOut << "\tfcSttbfAssoc: " << fcSttbfAssoc << endl1;
- *pOut << "\tcbSttbfAssoc: " << cbSttbfAssoc << endl1;
- *pOut << "\tfcClx: " << fcClx << endl1;
- *pOut << "\tlcbClx: " << lcbClx << endl1;
- *pOut << "\tfcPlcfpgdFtn: " << fcPlcfpgdFtn << endl1;
- *pOut << "\tlcbPlcfpgdFtn: " << lcbPlcfpgdFtn << endl1;
- *pOut << "\tfcAutosaveSource: " << fcAutosaveSource << endl1;
- *pOut << "\tlcbAutosaveSource: " << lcbAutosaveSource << endl1;
- *pOut << "\tfcGrpStAtnOwners: " << fcGrpStAtnOwners << endl1;
- *pOut << "\tlcbGrpStAtnOwners: " << lcbGrpStAtnOwners << endl1;
- *pOut << "\tfcSttbfAtnbkmk: " << fcSttbfAtnbkmk << endl1;
- *pOut << "\tlcbSttbfAtnbkmk: " << lcbSttbfAtnbkmk << endl1;
- *pOut << "\tfcPlcfdoaMom: " << fcPlcfdoaMom << endl1;
- *pOut << "\tlcbPlcfdoaMom: " << lcbPlcfdoaMom << endl1;
- *pOut << "\tfcPlcfdoaHdr: " << fcPlcfdoaHdr << endl1;
- *pOut << "\tlcbPlcfdoaHdr: " << lcbPlcfdoaHdr << endl1;
- *pOut << "\tfcPlcfspaMom: " << fcPlcfspaMom << endl1;
- *pOut << "\tlcbPlcfspaMom: " << lcbPlcfspaMom << endl1;
- *pOut << "\tfcPlcfspaHdr: " << fcPlcfspaHdr << endl1;
- *pOut << "\tlcbPlcfspaHdr: " << lcbPlcfspaHdr << endl1;
- *pOut << "\tfcPlcfAtnbkf: " << fcPlcfAtnbkf << endl1;
- *pOut << "\tlcbPlcfAtnbkf: " << lcbPlcfAtnbkf << endl1;
- *pOut << "\tfcPlcfAtnbkl: " << fcPlcfAtnbkl << endl1;
- *pOut << "\tlcbPlcfAtnbkl: " << lcbPlcfAtnbkl << endl1;
- *pOut << "\tfcPms: " << fcPms << endl1;
- *pOut << "\tlcbPMS: " << lcbPMS << endl1;
- *pOut << "\tfcFormFldSttbf: " << fcFormFldSttbf << endl1;
- *pOut << "\tlcbFormFldSttbf: " << lcbFormFldSttbf << endl1;
- *pOut << "\tfcPlcfendRef: " << fcPlcfendRef << endl1;
- *pOut << "\tlcbPlcfendRef: " << lcbPlcfendRef << endl1;
- *pOut << "\tfcPlcfendTxt: " << fcPlcfendTxt << endl1;
- *pOut << "\tlcbPlcfendTxt: " << lcbPlcfendTxt << endl1;
- *pOut << "\tfcPlcffldEdn: " << fcPlcffldEdn << endl1;
- *pOut << "\tlcbPlcffldEdn: " << lcbPlcffldEdn << endl1;
- *pOut << "\tfcPlcfpgdEdn: " << fcPlcfpgdEdn << endl1;
- *pOut << "\tlcbPlcfpgdEdn: " << lcbPlcfpgdEdn << endl1;
- *pOut << "\tfcDggInfo: " << fcDggInfo << endl1;
- *pOut << "\tlcbDggInfo: " << lcbDggInfo << endl1;
- *pOut << "\tfcSttbfRMark: " << fcSttbfRMark << endl1;
- *pOut << "\tlcbSttbfRMark: " << lcbSttbfRMark << endl1;
- *pOut << "\tfcSttbfCaption: " << fcSttbfCaption << endl1;
- *pOut << "\tlcbSttbfCaption: " << lcbSttbfCaption << endl1;
- *pOut << "\tfcSttbAutoCaption: " << fcSttbAutoCaption << endl1;
- *pOut << "\tlcbSttbAutoCaption: " << lcbSttbAutoCaption << endl1;
- *pOut << "\tfcPlcfwkb: " << fcPlcfwkb << endl1;
- *pOut << "\tlcbPlcfwkb: " << lcbPlcfwkb << endl1;
- *pOut << "\tfcPlcfspl: " << fcPlcfspl << endl1;
- *pOut << "\tlcbPlcfspl: " << lcbPlcfspl << endl1;
- *pOut << "\tfcPlcftxbxTxt: " << fcPlcftxbxTxt << endl1;
- *pOut << "\tlcbPlcftxbxTxt: " << lcbPlcftxbxTxt << endl1;
- *pOut << "\tfcPlcffldTxbx: " << fcPlcffldTxbx << endl1;
- *pOut << "\tlcbPlcffldTxbx: " << lcbPlcffldTxbx << endl1;
- *pOut << "\tfcPlcfHdrtxbxTxt: " << fcPlcfHdrtxbxTxt << endl1;
- *pOut << "\tlcbPlcfHdrtxbxTxt: " << lcbPlcfHdrtxbxTxt << endl1;
- *pOut << "\tfcPlcffldHdrTxbx: " << fcPlcffldHdrTxbx << endl1;
- *pOut << "\tlcbPlcffldHdrTxbx: " << lcbPlcffldHdrTxbx << endl1;
- *pOut << "\tfcPlcfLst: " << fcPlcfLst << endl1;
- *pOut << "\tlcbPlcfLst: " << lcbPlcfLst << endl1;
- *pOut << "\tfcPlfLfo: " << fcPlfLfo << endl1;
- *pOut << "\tlcbPlfLfo: " << lcbPlfLfo << endl1;
- *pOut << "\tfcPlcftxbxBkd: " << fcPlcftxbxBkd << endl1;
- *pOut << "\tlcbPlcftxbxBkd: " << lcbPlcftxbxBkd << endl1;
- *pOut << "\tfcPlcfHdrtxbxBkd: " << fcPlcfHdrtxbxBkd << endl1;
- *pOut << "\tlcbPlcfHdrtxbxBkd: " << lcbPlcfHdrtxbxBkd << endl1;
- *pOut << "\tfcSttbListNames: " << fcSttbListNames << endl1;
- *pOut << "\tlcbSttbListNames: " << lcbSttbListNames << endl1;
-
- *pOut << "\tpnChpFirst: " << pnChpFirst << endl1;
- *pOut << "\tpnPapFirst: " << pnPapFirst << endl1;
- *pOut << "\tcpnBteChp: " << cpnBteChp << endl1;
- *pOut << "\tcpnBtePap: " << cpnBtePap << endl1;
-
-
- *pOut << dec << "END FIB" << endl1 << endl1;
-}
-
-//-----------------------------------------
-// class DStyle
-//-----------------------------------------
-
-class DStyle: public WW8Style
-{
- sal_uInt8 nVersion;
-public:
- DStyle( SvStream& rStream, WW8Fib& rFib )
- : WW8Style( rStream, rFib ){ nVersion = rFib.nVersion; }
- void Dump1Style( sal_uInt16 nNr );
- void Dump();
-};
-
-//-----------------------------------------
-// universelle Hilfsroutinen
-//-----------------------------------------
-
-static void DumpIt( SvStream& rSt, short nLen )
-{
- indent( *pOut, rSt );
- if( nLen <= 0 ){
- *pOut << endl1;
- return;
- }
- while ( nLen ){
- sal_uInt8 c;
- xStrm->Read( &c, sizeof(c) );
- *pOut << "<0x" << hex2 << (sal_uInt16)c << dec2 << "> ";
- nLen--;
- }
- *pOut << endl1;
-}
-
-static void DumpItSmall( SvStream& rStrm, short nLen )
-{
- if( nLen <= 0 )
- return;
-
- while ( nLen )
- {
- sal_uInt8 c;
-
- rStrm.Read( &c, sizeof(c) );
-
- if( c <= 9 )
- *pOut << (sal_uInt16)c;
- else
- *pOut << "0x" << hex2 << (sal_uInt16)c << dec2;
-
- nLen--;
-
- if( nLen )
- *pOut << ',';
- }
-}
-
-static short DumpSprm( sal_uInt8 nVersion, SvStream& rSt, short nSprmsLen )
-{
- long nSprmPos = rSt.Tell();
- sal_uInt8 nDelta;
-
- indent( *pOut, rSt );
-
- sal_uInt8 x[512];
- rSt.Read( x, 512 ); // Token und folgende lesen
-
- sal_uInt16 nId = WW8GetSprmId( nVersion, x, &nDelta );
-
- short nSprmL = WW8GetSprmSizeBrutto( nVersion, x, &nId );
- short nSprmNL = WW8GetSprmSizeNetto( nVersion, x, &nId );
-
- nSprmsLen -= nSprmL;
- if( nSprmsLen < 0 )
- *pOut << "!UEberhang um " << -nSprmsLen << " Bytes!" << endl1;
-
- // Ausgabe: Token in Dez
- if( 8 > nVersion )
- *pOut << (sal_uInt16)x[0];
- else
- *pOut << hex << nId << dec;
- *pOut << '/' << nSprmL; // Laenge incl. alles in Dez
- *pOut << '/' << nSprmNL; // Laenge excl Token in Dez
-
-
- const SprmDumpInfo& rSprm = WW8GetSprmDumpInfo( nId );
-
- *pOut << " = " << rSprm.pName << ' ';
-
- rSt.Seek( nSprmPos + 1 + nDelta + WW8SprmDataOfs( nId ) );// gehe zum eigentlichen
- // Inhalt
- if( rSprm.pOutFnc )
- rSprm.pOutFnc( rSt, nSprmNL ); // Rufe Ausgabefunktion
- else
- DumpItSmall( rSt, nSprmNL ); // oder Dumper
- *pOut << endl1;
-
- return nSprmsLen;
-}
-
-void DumpSprms( sal_uInt8 nVersion, SvStream& rSt, short nLen )
-{
- if( nLen <= 1 || rSt.IsEof() ){
- return;
- }
- begin( *pOut, rSt ) << "Sprms" << endl1;
- while ( nLen > 1 )
- {
- nLen = DumpSprm( nVersion, rSt, nLen );
- }
- end( *pOut, rSt ) << "Sprms" << endl1;
-}
-
-// DumpMemSprm() dumpt ein 2-Byte-Sprm, der im WW8_PCD eingebaut ist
-static void DumpMemSprm( sal_uInt8 nVersion, sal_Int16* pSprm )
-{
- sal_uInt8* p = (sal_uInt8*)pSprm;
- sal_uInt16 nId = WW8GetSprmId( nVersion, p, 0 );
-
- *pOut << (sal_uInt16)p[0]; // Ausgabe: Token in Dez
- *pOut << '/' << WW8GetSprmSizeBrutto( nVersion, p, &nId ); // Laenge incl. alles in Dez
- *pOut << '/' << WW8GetSprmSizeNetto( nVersion, p, &nId ); // Laenge excl Token in Dez
-
- *pOut << " = " << WW8GetSprmDumpInfo( nId ).pName;
-
- *pOut << " 0x" << hex2 << *(p + 1);
-}
-
-
-//-----------------------------------------
-// Hilfsroutinen: SEPX
-//-----------------------------------------
-void DumpSepx( sal_uInt8 nVersion, long nPos )
-{
- sal_uInt16 nLen;
- xStrm->Seek( nPos );
- begin( *pOut, *xStrm ) << "Sepx, Len: ";
- xStrm->Read( &nLen, 2 );
- *pOut << nLen << endl1;
-
- DumpSprms( nVersion, *xStrm, nLen );
-
- end( *pOut, *xStrm ) << "Sepx" << endl1;
-}
-
-
-//-----------------------------------------
-// Hilfsroutinen: FKP.CHPX, FKP.PAPX
-//-----------------------------------------
-static void DumpPhe( WW8_PHE_Base& rPhe )
-{
- if( rPhe.aBits1 == 0 && rPhe.nlMac == 0
- && SVBT16ToShort( rPhe.dxaCol ) == 0
- && SVBT16ToShort( rPhe.dyl ) == 0 )
- {
- *pOut << indent2 << " empty PHE" << endl1;
- }
- else
- {
- *pOut << begin2 << "PHE" << endl1;
- *pOut << indent2 << "fSpare: " << ( rPhe.aBits1 & 0x1 );
- *pOut << ", fUnk: " << (( rPhe.aBits1 >> 1 ) & 1 );
- *pOut << ", fDiffLines: " << (( rPhe.aBits1 >> 2 ) & 1 );
- *pOut << ", unused: " << (( rPhe.aBits1 >> 3 ) & 0x1F )
- << " (" << (short)(( rPhe.aBits1 >> 2 ) & 0x3F ) +
- (((short)rPhe.nlMac) << 8)
- << ")";
- *pOut << ", nLines: " << (short)rPhe.nlMac << ',' << endl1;
- *pOut << indent2 << "dxaCol: " << (short)SVBT16ToShort( rPhe.dxaCol );
- if( rPhe.aBits1 & 0x4 )
- {
- *pOut << ", total height: " << (sal_uInt16)SVBT16ToShort( rPhe.dyl );
- }
- else
- {
- *pOut << ", height per line: " << (short)SVBT16ToShort( rPhe.dyl );
- *pOut << ", total height: " << rPhe.nlMac * (short)SVBT16ToShort( rPhe.dyl );
- }
- *pOut << endl1;
- *pOut << end2 << "PHE" << endl1;
- }
-}
-
-//typedef enum{ CHP=0, PAP, SEP, PLC_END }ePlcT;
-static char* NameTab[PLCF_END+4]={ "chpx", "papx", "sepx", "head",
- "FootnoteRef", "EndnoteRef",
- "AnnotationRef" };
-
-void DumpFkp( sal_uInt8 nVersion, long nPos, short nItemSize, ePLCFT ePlc )
-{
- char nElem;
-
- xStrm->Seek( nPos+511 );
- xStrm->Read( &nElem, 1 );
-
-
- *pOut << 'D' << hex6 << nPos << dec2 << ' ' << indent1 << begin1 << "Fkp.";
- *pOut << NameTab[ePlc] << ", ";
- *pOut << (sal_uInt16)nElem << " Elements" << endl1;
-
- int i;
- WW8_FC aF[2];
- sal_uInt8 c;
- long nStartOfs = nPos + ( nElem + 1 ) * 4; // bei dieser Pos faengt Offset-Array an
- short nOfs;
- WW8_PHE_Base aPhe;
-
- for( i=0; i<nElem; i++ )
- {
- xStrm->Seek( nPos + i * 4 );
- indent( *pOut, *xStrm );
- xStrm->Read( aF, sizeof( aF ) ); // lese 2 FCs
-
- xStrm->Seek( nStartOfs + i * nItemSize );
- xStrm->Read( &c, 1 ); // lese Word Offset ( evtl. Teil von BX )
- if( ePlc == PAP )
- xStrm->Read( &aPhe, sizeof( aPhe ) );
-
- nOfs= c * 2; // -> Byte Offset
- xStrm->Seek( nPos + nOfs );
- xStrm->Read( &c, 1 );
-
- if( !c )
- xStrm->Read( &c, 1 );
-
- *pOut << "Fc: " << hex << aF[0] << ".." << aF[1];
- *pOut << " Cp: " << pSBase->WW8Fc2Cp( aF[0] )
- << ".." << pSBase->WW8Fc2Cp( aF[1] );
- *pOut << " Offset: " << nOfs << dec2;
- if ( nOfs )
- {
- switch ( ePlc )
- {
- case CHP:
- *pOut << ", Len: " << (short)c << endl1;
- DumpSprms( nVersion, *xStrm, (short)c );
- break;
-
- case PAP:
- short nLen = c * 2; // So weit bis zum naechsten !
-
- short nIStd;
-
- WW8ReadINT16( *xStrm, nIStd );
-
- *pOut << ", Len max: " << nLen << ", ID:" << nIStd << endl1;
- DumpSprms( nVersion, *xStrm, nLen - 2 );
- DumpPhe( aPhe );
- break;
- }
- }
- else
- {
- *pOut << dec2 << " No attribute" << endl1;
- }
-
- }
- end( *pOut, *xStrm ) << "Fkp." << NameTab[ePlc] << endl1;
-}
-
-//-----------------------------------------
-// WW8_DOP ( Document Properties )
-//-----------------------------------------
-
-//!!! WW8LoadDop gibt's jetzt auch in WW8scan.cxx
-void DumpDop( WW8Fib& rFib )
-{
- // nicht loeschen!
- xTableStream->Seek( rFib.fcDop ); // diese Aktion dient lediglich dazu, die
- // Positions-Ausgabe der folgenden Anweisung
- // mit dem alten Dumper uebereinstimmen zu lassen.
-
-// *pOut << begin( *pOut, *xTableStream ) << "Dop, Size " << rFib.lcbDop << ", DefaultSize 84" << endl1;
- begin( *pOut, *xTableStream ) << "Dop, Size " << rFib.lcbDop << ", DefaultSize 84" << endl1;
-
- WW8Dop* pD = new WW8Dop( *xTableStream, rFib.nFib, rFib.fcDop, rFib.lcbDop );
-
- *pOut << indent2 << "fFacingPages : " << pD->fFacingPages << endl1;
- *pOut << indent2 << "fWidowControl : " << pD->fWidowControl << endl1;
- *pOut << indent2 << "fPMHMainDoc : " << pD->fPMHMainDoc << endl1;
- *pOut << indent2 << "grfSuppression : " << pD->grfSuppression << endl1;
- *pOut << indent2 << "fpc : " << pD->fpc << endl1;
- *pOut << indent2 << "grpfIhdt : " << pD->grpfIhdt << endl1;
- *pOut << indent2 << "rncFtn : " << pD->rncFtn << endl1;
- *pOut << indent2 << "nFtn : " << pD->nFtn << endl1;
- *pOut << indent2 << "fOutlineDirtySave : " << pD->fOutlineDirtySave << endl1;
- *pOut << indent2 << "fOnlyMacPics : " << pD->fOnlyMacPics << endl1;
- *pOut << indent2 << "fOnlyWinPics : " << pD->fOnlyWinPics << endl1;
- *pOut << indent2 << "fLabelDoc : " << pD->fLabelDoc << endl1;
- *pOut << indent2 << "fHyphCapitals : " << pD->fHyphCapitals << endl1;
- *pOut << indent2 << "fAutoHyphen : " << pD->fAutoHyphen << endl1;
- *pOut << indent2 << "fFormNoFields : " << pD->fFormNoFields << endl1;
- *pOut << indent2 << "fLinkStyles : " << pD->fLinkStyles << endl1;
- *pOut << indent2 << "fRevMarking : " << pD->fRevMarking << endl1;
- *pOut << indent2 << "fBackup : " << pD->fBackup << endl1;
- *pOut << indent2 << "fExactCWords : " << pD->fExactCWords << endl1;
- *pOut << indent2 << "fPagHidden : " << pD->fPagHidden << endl1;
- *pOut << indent2 << "fPagResults : " << pD->fPagResults << endl1;
- *pOut << indent2 << "fLockAtn : " << pD->fLockAtn << endl1;
- *pOut << indent2 << "fMirrorMargins : " << pD->fMirrorMargins << endl1;
- *pOut << indent2 << "fReadOnlyRecommended : " << pD->fReadOnlyRecommended << endl1;
- *pOut << indent2 << "fDfltTrueType : " << pD->fDfltTrueType << endl1;
- *pOut << indent2 << "fPagSuppressTopSpacing : " << pD->fPagSuppressTopSpacing << endl1;
- *pOut << indent2 << "fProtEnabled : " << pD->fProtEnabled << endl1;
- *pOut << indent2 << "fDispFormFldSel : " << pD->fDispFormFldSel << endl1;
- *pOut << indent2 << "fRMView : " << pD->fRMView << endl1;
- *pOut << indent2 << "fRMPrint : " << pD->fRMPrint << endl1;
- *pOut << indent2 << "fWriteReservation : " << pD->fWriteReservation << endl1;
- *pOut << indent2 << "fLockRev : " << pD->fLockRev << endl1;
- *pOut << indent2 << "fEmbedFonts : " << pD->fEmbedFonts << endl1;
- *pOut << indent2 << "copts_fNoTabForInd : " << pD->copts_fNoTabForInd << endl1;
- *pOut << indent2 << "copts_fNoSpaceRaiseLower : " << pD->copts_fNoSpaceRaiseLower << endl1;
- *pOut << indent2 << "copts_fSupressSpbfAfterPgBrk : " << pD->copts_fSupressSpbfAfterPgBrk << endl1;
- *pOut << indent2 << "copts_fWrapTrailSpaces : " << pD->copts_fWrapTrailSpaces << endl1;
- *pOut << indent2 << "copts_fMapPrintTextColor : " << pD->copts_fMapPrintTextColor << endl1;
- *pOut << indent2 << "copts_fNoColumnBalance : " << pD->copts_fNoColumnBalance << endl1;
- *pOut << indent2 << "copts_fConvMailMergeEsc : " << pD->copts_fConvMailMergeEsc << endl1;
- *pOut << indent2 << "copts_fSupressTopSpacing : " << pD->copts_fSupressTopSpacing << endl1;
- *pOut << indent2 << "copts_fOrigWordTableRules : " << pD->copts_fOrigWordTableRules << endl1;
- *pOut << indent2 << "copts_fTransparentMetafiles : " << pD->copts_fTransparentMetafiles << endl1;
- *pOut << indent2 << "copts_fShowBreaksInFrames : " << pD->copts_fShowBreaksInFrames << endl1;
- *pOut << indent2 << "copts_fSwapBordersFacingPgs : " << pD->copts_fSwapBordersFacingPgs << endl1;
- *pOut << indent2 << "dxaTab : " << pD->dxaTab << endl1;
- *pOut << indent2 << "wSpare : " << pD->wSpare << endl1;
- *pOut << indent2 << "dxaHotZ : " << pD->dxaHotZ << endl1;
- *pOut << indent2 << "cConsecHypLim : " << pD->cConsecHypLim << endl1;
- *pOut << indent2 << "wSpare2 : " << pD->wSpare2 << endl1;
- *pOut << indent2 << "dttmCreated : " << pD->dttmCreated << endl1;
- *pOut << indent2 << "dttmRevised : " << pD->dttmRevised << endl1;
- *pOut << indent2 << "dttmLastPrint : " << pD->dttmLastPrint << endl1;
- *pOut << indent2 << "nRevision : " << pD->nRevision << endl1;
- *pOut << indent2 << "tmEdited : " << pD->tmEdited << endl1;
- *pOut << indent2 << "cWords : " << pD->cWords << endl1;
- *pOut << indent2 << "cCh : " << pD->cCh << endl1;
- *pOut << indent2 << "cPg : " << pD->cPg << endl1;
- *pOut << indent2 << "cParas : " << pD->cParas << endl1;
- *pOut << indent2 << "rncEdn : " << pD->rncEdn << endl1;
- *pOut << indent2 << "nEdn : " << pD->nEdn << endl1;
- *pOut << indent2 << "epc : " << pD->epc << endl1;
- *pOut << indent2 << "fPrintFormData : " << pD->fPrintFormData << endl1;
- *pOut << indent2 << "fSaveFormData : " << pD->fSaveFormData << endl1;
- *pOut << indent2 << "fShadeFormData : " << pD->fShadeFormData << endl1;
- *pOut << indent2 << "fWCFtnEdn : " << pD->fWCFtnEdn << endl1;
- *pOut << indent2 << "cLines : " << pD->cLines << endl1;
- *pOut << indent2 << "cWordsFtnEnd : " << pD->cWordsFtnEnd << endl1;
- *pOut << indent2 << "cChFtnEdn : " << pD->cChFtnEdn << endl1;
- *pOut << indent2 << "cPgFtnEdn : " << pD->cPgFtnEdn << endl1;
- *pOut << indent2 << "cParasFtnEdn : " << pD->cParasFtnEdn << endl1;
- *pOut << indent2 << "cLinesFtnEdn : " << pD->cLinesFtnEdn << endl1;
- *pOut << indent2 << "lKeyProtDoc : " << pD->lKeyProtDoc << endl1;
- *pOut << indent2 << "wvkSaved : " << pD->wvkSaved << endl1;
- *pOut << indent2 << "wScaleSaved : " << pD->wScaleSaved << endl1;
- *pOut << indent2 << "zkSaved : " << pD->zkSaved << endl1;
- *pOut << indent2 << "fNoTabForInd : " << pD->fNoTabForInd << endl1;
- *pOut << indent2 << "fNoSpaceRaiseLower : " << pD->fNoSpaceRaiseLower << endl1;
- *pOut << indent2 << "fSupressSpbfAfterPageBreak : " << pD->fSupressSpbfAfterPageBreak << endl1;
- *pOut << indent2 << "fWrapTrailSpaces : " << pD->fWrapTrailSpaces << endl1;
- *pOut << indent2 << "fMapPrintTextColor : " << pD->fMapPrintTextColor << endl1;
- *pOut << indent2 << "fNoColumnBalance : " << pD->fNoColumnBalance << endl1;
- *pOut << indent2 << "fConvMailMergeEsc : " << pD->fConvMailMergeEsc << endl1;
- *pOut << indent2 << "fSupressTopSpacing : " << pD->fSupressTopSpacing << endl1;
- *pOut << indent2 << "fOrigWordTableRules : " << pD->fOrigWordTableRules << endl1;
- *pOut << indent2 << "fTransparentMetafiles : " << pD->fTransparentMetafiles << endl1;
- *pOut << indent2 << "fShowBreaksInFrames : " << pD->fShowBreaksInFrames << endl1;
- *pOut << indent2 << "fSwapBordersFacingPgs : " << pD->fSwapBordersFacingPgs << endl1;
- *pOut << indent2 << "fSuppressTopSpacingMac5 : " << pD->fSuppressTopSpacingMac5 << endl1;
- *pOut << indent2 << "fTruncDxaExpand : " << pD->fTruncDxaExpand << endl1;
- *pOut << indent2 << "fPrintBodyBeforeHdr : " << pD->fPrintBodyBeforeHdr << endl1;
- *pOut << indent2 << "fNoLeading : " << pD->fNoLeading << endl1;
- *pOut << indent2 << "fMWSmallCaps : " << pD->fMWSmallCaps << endl1;
-
- *pOut << indent2 << "adt : " << pD->adt << endl1;
-
- *pOut << indent2 << "lvl : " << pD->lvl << endl1;
- *pOut << indent2 << "fHtmlDoc : " << pD->fHtmlDoc << endl1;
- *pOut << indent2 << "fSnapBorder : " << pD->fSnapBorder << endl1;
- *pOut << indent2 << "fIncludeHeader : " << pD->fIncludeHeader << endl1;
- *pOut << indent2 << "fIncludeFooter : " << pD->fIncludeFooter << endl1;
- *pOut << indent2 << "fForcePageSizePag : " << pD->fForcePageSizePag << endl1;
- *pOut << indent2 << "fMinFontSizePag : " << pD->fMinFontSizePag << endl1;
-
- *pOut << indent2 << "fHaveVersions : " << pD->fHaveVersions << endl1;
- *pOut << indent2 << "fAutoVersion : " << pD->fAutoVersion << endl1;
- *pOut << indent2 << "cChWS : " << pD->cChWS << endl1;
- *pOut << indent2 << "cChWSFtnEdn : " << pD->cChWSFtnEdn << endl1;
- *pOut << indent2 << "grfDocEvents : " << pD->grfDocEvents << endl1;
- *pOut << indent2 << "cDBC : " << pD->cDBC << endl1;
- *pOut << indent2 << "cDBCFtnEdn : " << pD->cDBCFtnEdn << endl1;
- *pOut << indent2 << "nfcFtnRef : " << pD->nfcFtnRef << endl1;
- *pOut << indent2 << "nfcEdnRef : " << pD->nfcEdnRef << endl1;
- *pOut << indent2 << "hpsZoonFontPag : " << pD->hpsZoonFontPag << endl1;
- *pOut << indent2 << "dywDispPag : " << pD->dywDispPag << endl1;
-
- end( *pOut, *xStrm ) << "Dop" << endl1 << endl1;
-
- DELETEZ( pD );
-}
-
-//-----------------------------------------
-// PLCF.PCD ( Piece Table )
-//-----------------------------------------
-
-#ifdef __WW8_NEEDS_PACK
-# pragma pack(2)
-#endif
-
-struct WW8_PCD1
-{
- sal_uInt8 aBits1;
- sal_uInt8 aBits2;
-// sal_Int16 fNoParaLast : 1; // when 1, means that piece contains no end of parag
-// sal_uInt8 fPaphNil : 1; // used internally by Word
-// sal_uInt8 fCopied : 1; // used internally by Word
- // * int :5
-// sal_uInt8 aBits2; // fn int:8, used internally by Word
- sal_Int32 fc; // file offset of beginning of piece. The size of th
- sal_Int16 prm; // PRM contains either a single sprm or else an inde
-};
-
-#ifdef __WW8_NEEDS_PACK
-# pragma pack()
-#endif
-
-static void DumpPLCFPcd( sal_uInt8 nVersion, long nPos, long nLen )
-{
- WW8PLCF aPlc( &xTableStream, nPos , nLen, 8 );
-
- *pOut << 'D' << hex6 << nPos << dec2 << ' ' << indent1 << begin1;
- *pOut << "Plcx.Pcd, Len: ";
- *pOut << nLen << ", " << aPlc.GetIMax() << " Elements" << endl1;
-
- int i;
- for( i=0; i<aPlc.GetIMax(); i++ )
- {
- long start, ende;
- void* pData;
- aPlc.Get( start, ende, pData );
- *pOut << indent2 << " Cp: " << hex6 << start << ".." << hex6 << ende;
-
- WW8_PCD1* p = (WW8_PCD1*) pData;
- *pOut << ", Bits: " << hex2 << (sal_uInt16)p->aBits1 << ' '
- << hex2 << (sal_uInt16)p->aBits2;
- *pOut << ", FcStart: ";
- if( 8 <= nVersion )
- {
- sal_Bool bUniCode;
- *pOut << hex6
- << WW8PLCFx_PCD::TransformPieceAddress( p->fc, bUniCode );
- if( bUniCode )
- *pOut << " (UniCode)";
- }
- else
- *pOut << hex6 << p->fc;
-
- *pOut << dec << ", prm ";
- if( p->prm & 0x1 ){
- *pOut << "No: " << ( p->prm >> 1 );
- }else if ( p-> prm == 0 ){
- *pOut << "-";
- }else{
- *pOut << "(Sprm): ";
- DumpMemSprm( nVersion, &(p->prm) );
- }
- *pOut << endl1;
-
- aPlc++;
- }
- end( *pOut, *xTableStream ) << "Plcx.Pcd" << endl1;
-}
-
-static void DumpPcd( sal_uInt8 nVersion, long nPos, long nLen )
-{
- long nLen1 = nLen;
- xTableStream->Seek( nPos );
-
- *pOut << 'D' << hex6 << nPos << dec2 << ' ' << indent1 << begin1;
- *pOut << "PieceTable, Len: " << nLen << endl1;
- if( sizeof( WW8_PCD1 ) != 8 )
- *pOut << "!!! Alignment-Problem !!! sizeof( WW8_PCD1 ) != 8 !!! " << endl1;
-
- long i = 0;
- while (1){
- sal_uInt8 c;
- sal_Int16 cb;
-
- xTableStream->Read( &c, 1 );
- nLen1 --;
- if( c == 2 )
- break;
- xTableStream->Read( &cb, 2 );
- nLen1 -= 2;
- indent( *pOut, *xTableStream ) << "grpprl No. " << i << ", Len: " << cb << endl1;
-
- long nPos = xTableStream->Tell();
- DumpSprms( nVersion, *xTableStream, cb ); // Dumpe Sprms
- xTableStream->Seek( nPos + cb ); // gehe hinter grpprl
- nLen1 -= cb;
- i++;
-// *pOut << " " << indent1 << "grpprl: " << cb << "Bytes ueberlesen";
-// *pOut << endl1;
- }
- sal_Int32 nLen2;
- xTableStream->Read( &nLen2, 4 );
- nLen1 -= 4;
- if( nLen1 != nLen2 )
- *pOut << "!!! nLen1 ( " << nLen1 << " ) != nLen2 ( " << nLen2 << " ) !"
- << endl1;
-
- DumpPLCFPcd( nVersion, xTableStream->Tell(), nLen2 );
-
- end( *pOut, *xTableStream ) << "PieceTable" << endl1 << endl1;
-}
-
-//-----------------------------------------
-// PLCF.CHPX, PLCF.PAPX, PLCF.SEPX
-//-----------------------------------------
-
-static void DumpPLCF( long nPos, long nLen, ePLCFT ePlc )
-{
- static int __READONLY_DATA WW8FkpSizeTabVer6[ PLCF_END ] = {
- 1, 7, 0 /*, 0, 0, 0*/ };
- static int __READONLY_DATA PlcSizeTabVer6[ PLCF_END+4 ] = {
- 2, 2, 12, 0, 2, 2, 20 };
-
- static int __READONLY_DATA WW8FkpSizeTabVer8[ PLCF_END ] = {
- 1, 13, 0 /*, 0, 0, 0*/ };
- static int __READONLY_DATA PlcSizeTabVer8[ PLCF_END+4 ] = {
- 4, 4, 12, 0, 2, 2, 30 };
-
- const int* pFkpSizeTab;
- const int* pPlcSizeTab;
-
- switch( pWwFib->nVersion )
- {
- case 6:
- case 7: pFkpSizeTab = WW8FkpSizeTabVer6;
- pPlcSizeTab = PlcSizeTabVer6;
- break;
- case 8: pFkpSizeTab = WW8FkpSizeTabVer8;
- pPlcSizeTab = PlcSizeTabVer8;
- break;
- default:// Programm-Fehler!
- /*
- ACHTUNG: im FILTER nicht "sal_False" sondern "!this()" schreiben,
- da sonst Warning unter OS/2
- */
- ASSERT( sal_False, "Es wurde vergessen, nVersion zu kodieren!" );
- return;
- }
-
-// SvStream* pSt = (SEP == ePlc) ? &xTableStream : &xStrm;
- SvStream* pSt = &xTableStream;
-
- WW8PLCF aPlc( pSt, nPos, nLen, pPlcSizeTab[ ePlc ] );
-
- *pOut << 'T' << hex6 << nPos << dec2 << ' ' << indent1 << begin1;
- *pOut << "Plcx." << NameTab[ePlc] << ", Len: ";
- *pOut << nLen << ", " << aPlc.GetIMax() << " Elements" << endl1;
-
- int i;
- for( i=0; i<aPlc.GetIMax(); i++ )
- {
- long start, ende;
- void* pData;
- aPlc.Get( start, ende, pData );
- *pOut << indent2 << "Plcx." << NameTab[ePlc];
- switch( ePlc ){
- case SEP: {
- *pOut << " Cp: " << hex << start << ".." << ende ;
- long nPo = *((long*)((char*)pData+2));
- if( nPo == 0xffffffffL )
- {
- *pOut << " Empty" << endl1;
- }
- else
- {
- *pOut << ", Sepx-Position: " << nPo << dec << endl1;
- DumpSepx( pWwFib->nVersion, nPo );
- }
- }
- break;
- case CHP:
- case PAP: {
- *pOut << " Fc: " << hex << start << ".." << ende ;
- long nPo;
- switch( pWwFib->nVersion )
- {
- case 6:
- case 7: nPo = *((sal_uInt16*)pData);
- break;
- case 8: nPo = *((sal_uInt32*)pData);
- break;
- default:// Programm-Fehler!
- /*
- ACHTUNG: im FILTER nicht "sal_False" sondern "!this()" schreiben,
- da sonst Warning unter OS/2
- */
- ASSERT( sal_False, "Es wurde vergessen, nVersion zu kodieren!" );
- return;
- }
-
- nPo <<= 9;
- *pOut << ", Offset: " << nPo << dec << endl1;
- DumpFkp( pWwFib->nVersion, nPo, pFkpSizeTab[ ePlc ], ePlc );
- }
- break;
-
- case PLCF_END+0:
- *pOut << " Cp: " << hex << start << ".." << ende << dec << endl1;
- break;
-
- case PLCF_END+1:
- case PLCF_END+2:
- {
- *pOut << " Cp: " << hex << start;
- sal_uInt16 nFlags= *((sal_uInt16*)pData);
- *pOut << ", Flags: 0x" << nFlags << dec << endl1;
- }
- break;
-
- case PLCF_END+3:
- {
- *pOut << " Cp: " << hex << start << ", Initial: \"";
- const char* p = (char*)pData;
- sal_uInt8 n = *p++;
- while( n-- )
- {
- if( 8 == pWwFib->nVersion )
- ++p;
- *pOut << *p++;
- }
-
- long nBkmkId;
- sal_uInt16 nId;
- if( 8 == pWwFib->nVersion )
- {
- nId = SVBT16ToShort( ((WW8_ATRD*)pData)->ibst );
- nBkmkId = SVBT32ToUInt32( ((WW8_ATRD*)pData)->ITagBkmk );
- }
- else
- {
- nId = SVBT16ToShort( ((WW67_ATRD*)pData )->ibst );
- nBkmkId = SVBT32ToUInt32( ((WW67_ATRD*)pData )->ITagBkmk );
- }
-
- *pOut << "\", AutorId: " << hex << nId
- << " BkmkId: " << nBkmkId << dec <<endl1;
- }
- break;
-
- }
- aPlc++;
- }
- end( *pOut, *xTableStream ) << "Plcx." << NameTab[ePlc] << endl1 << endl1;
-}
-
-//-----------------------------------------
-// Text ohne Attribute
-//-----------------------------------------
-
-static void DumpPlainText1( WW8_CP nStartCp, long nTextLen )
-{
- long l;
- sal_uInt8 c;
-
-
- xStrm->Seek( pSBase->WW8Cp2Fc( nStartCp ) );
-
- for (l=0; l<nTextLen; l++)
- {
- xStrm->Read( &c, sizeof(c) );
- if ( DumpChar( c ) )
- {
- *pOut << endl1;
- indent( *pOut, *xStrm );
- }
-// DumpChar( c );
- }
-}
-
-void DumpShortPlainText( WW8_CP nStartCp, long nTextLen, char* pName )
-{
- indent( *pOut, *xStrm ) << pName << " PlainText: Cp: "
- << hex << nStartCp
- << ".." << nStartCp + nTextLen << dec
- << " :\"";
- DumpPlainText1( nStartCp, nTextLen );
- *pOut << "\"" << endl1;
-}
-
-void DumpPlainText( WW8_CP nStartCp, long nTextLen, char* pName )
-{
- begin( *pOut, *xStrm ) << pName << " Text: Cp: " << hex << nStartCp
- << ".." << nStartCp + nTextLen << dec
- << endl1;
- indent( *pOut, *xStrm );
- DumpPlainText1( nStartCp, nTextLen );
- *pOut << endl1;
- end( *pOut, *xStrm ) << pName << " Text" << endl1;
-}
-
-//-----------------------------------------
-// Text mit Attributen
-//-----------------------------------------
-
-sal_Bool DumpChar( sal_uInt8 c )
-{
- if ( ( c >= 32 ) && ( c <= 127 ) ){
- *pOut << c;
- return sal_False;
- }else{
- switch (c){
- case 0xe4: // dt. Umlaute
- case 0xf6:
- case 0xfc:
- case 0xdf:
- case 0xc4:
- case 0xd6:
- case 0xdc: *pOut << c; return sal_False;
-
- case 0xd: *pOut << "<CR>";
- return sal_True;
- case 0x7:
- case 0xc: *pOut << "<0x" << hex2 << (sal_uInt16)c << dec2 << '>';
- return sal_True;
- default: *pOut << "<0x" << hex2 << (sal_uInt16)c << dec2 << '>';
- return sal_False;
- }
- }
-}
-
-//-----------------------------------------
-// Header / Footer
-//-----------------------------------------
-
-static void DumpPlcText( WW8_FC nPos, long nLen, long nOfs,
- char* pName, WW8ScannerBase* pBase,
- long nStruct = 0, FNDumpData pOutFnc = 0 )
-{
- if( !nLen ) return;
-
- WW8PLCF aPlc( &xTableStream, nPos , nLen, nStruct );
-
- *pOut << 'T' << hex6 << nPos << dec2 << ' ' << indent1 << begin1;
- *pOut << "Plc." << pName << " Text, Len: ";
- *pOut << nLen << ", " << aPlc.GetIMax() << " Elements" << endl1;
-
- int i;
- for( i=0; i < aPlc.GetIMax(); ++i )
- {
- WW8_CP start, ende;
- WW8_FC start2, ende2;
- void* pData;
- aPlc.Get( start, ende, pData );
- start2 = pSBase->WW8Cp2Fc(start + nOfs );
- ende2 = pSBase->WW8Cp2Fc(ende + nOfs );
-
- *pOut << " " << indent1 << "Plcx." << pName;
- *pOut << " Cp: " << hex << start << ".." << ende;
- *pOut << " entspricht Fc: " << start2 << ".." << ende2 << dec << endl1;
-
- DumpPlainText( nOfs + start, ende - start - 1, pName );
-
- if( pOutFnc )
- (*pOutFnc)( pData );
- aPlc++;
- }
- end( *pOut, *xTableStream ) << "Plcx." << pName << endl1 << endl1;
-}
-
-void DumpHeader( WW8ScannerBase* pBase )
-{
- DumpPlcText( pWwFib->fcPlcfhdd,
- pWwFib->lcbPlcfhdd,
- pWwFib->ccpText + pWwFib->ccpFtn,
- "Header/Footer", pBase );
-}
-
-static void DumpFootnotes( WW8ScannerBase* pBase )
-{
- if( !pWwFib->lcbPlcffndRef ){
- *pOut << "No Footnotes" << endl1 << endl1;
- return;
- }
-
- DumpPLCF( pWwFib->fcPlcffndRef,
- pWwFib->lcbPlcffndRef,
- ePLCFT(/*FNR*/PLCF_END + 1) );
- DumpPlcText( pWwFib->fcPlcffndTxt,
- pWwFib->lcbPlcffndTxt,
- pWwFib->ccpText,
- "FootNote" , pBase );
-}
-
-static void DumpEndnotes( WW8ScannerBase* pBase )
-{
- if( !pWwFib->lcbPlcfendRef ){
- *pOut << "No Endnotes" << endl1 << endl1;
- return;
- }
-
- DumpPLCF( pWwFib->fcPlcfendRef,
- pWwFib->lcbPlcfendRef,
- ePLCFT(/*ENR*/PLCF_END + 2) );
- DumpPlcText( pWwFib->fcPlcfendTxt,
- pWwFib->lcbPlcfendTxt,
- pWwFib->ccpText + pWwFib->ccpFtn
- + pWwFib->ccpHdr + pWwFib->ccpAtn,
- "EndNote", pBase );
-}
-
-static void DumpAnnotations( WW8ScannerBase* pBase )
-{
- if( !pWwFib->lcbPlcfandRef ){
- *pOut << "No Annotations" << endl1 << endl1;
- return;
- }
-
- DumpPLCF( pWwFib->fcPlcfandRef,
- pWwFib->lcbPlcfandRef,
- ePLCFT(/*ENR*/PLCF_END + 3) );
- DumpPlcText( pWwFib->fcPlcfandTxt,
- pWwFib->lcbPlcfandTxt,
- pWwFib->ccpText + pWwFib->ccpFtn
- + pWwFib->ccpHdr,
- "Annotation", pBase );
-}
-
-void DumpTxtStoryEntry( void* pData )
-{
- if( 8 == pWwFib->nVersion )
- {
- long* p = (long*)pData;
- begin( *pOut, *xStrm )
- << "TextboxStory" << hex << endl1;
-
- *pOut << " " << indent1 << "cTxbx/iNextReuse: 0x" << *p++;
- *pOut << " cReusable: 0x" << *p++;
- short* ps = (short*)p;
- *pOut << " fReusable: 0x" << *ps++ << endl1;
- p = (long*)ps;
- ++p; // reserved
- *pOut << " " << indent1 << "lid: 0x" << *p++;
- *pOut << " txidUndo: 0x" << *p++ << dec << endl1;
-
- end( *pOut, *xStrm ) << "TextboxStory" << endl1 << endl1;
- }
-}
-
-static void DumpTextBoxs( WW8ScannerBase* pBase )
-{
- if( pWwFib->lcbPlcftxbxTxt )
- {
- DumpPlcText( pWwFib->fcPlcftxbxTxt,
- pWwFib->lcbPlcftxbxTxt,
- pWwFib->ccpText + pWwFib->ccpFtn
- + pWwFib->ccpHdr + pWwFib->ccpAtn + pWwFib->ccpEdn,
- "TextBoxes", pBase,
- 8 == pWwFib->nVersion ? 22 : 0, &DumpTxtStoryEntry );
- }
- else
- *pOut << "No Textboxes" << endl1 << endl1;
-
- if( pWwFib->lcbPlcfHdrtxbxTxt )
- DumpPlcText( pWwFib->fcPlcfHdrtxbxTxt,
- pWwFib->lcbPlcfHdrtxbxTxt,
- pWwFib->ccpText + pWwFib->ccpFtn
- + pWwFib->ccpHdr + pWwFib->ccpAtn + pWwFib->ccpEdn
- + pWwFib->ccpTxbx,
- "HeaderTextBoxes", pBase,
- 8 == pWwFib->nVersion ? 22 : 0, &DumpTxtStoryEntry );
- else
- *pOut << "No HeaderTextboxes" << endl1 << endl1;
-
-}
-
-
-static void DumpDrawObjects( const char* pNm, long nStart, long nLen,
- long nOffset )
-{
- if( nStart && nLen )
- {
- WW8PLCFspecial aPLCF( &xTableStream, nStart, nLen,
- 8 == pWwFib->nVersion ? 26 : 6 );
- *pOut << 'T' << hex6 << nStart << dec2 << ' ' << indent1 << begin1
- << pNm << ", Len: " << nLen
- << ", " << aPLCF.GetIMax() << " Elements" << endl1;
-
- for( sal_uInt16 i = 0; i < aPLCF.GetIMax(); ++i )
- {
- long nCp = aPLCF.GetPos( i );
- if( nCp >= LONG_MAX )
- break;
-
- *pOut << indent2 << i << ".Cp: 0x" << hex << nCp + nOffset;
- long* pFSPA = (long*)aPLCF.GetData( i );
- if( 8 == pWwFib->nVersion )
- {
- *pOut << " ShapeId: 0x" << *pFSPA++;
- *pOut << " left: " << dec << *pFSPA++;
- *pOut << " top: " << *pFSPA++;
- *pOut << " right: " << *pFSPA++;
- *pOut << " bottom: " << *pFSPA++;
- sal_uInt16* pU = (sal_uInt16*)pFSPA;
- *pOut << " flags: 0x" << hex << *pU++;
- pFSPA = (long*)pU;
- *pOut << " xTxbx: " << dec << *pFSPA;
- }
- else
- {
- *pOut << " FC of DO: 0x" << *pFSPA++;
- *pOut << " ctcbx: " << dec << *(sal_uInt16*)pFSPA;
- }
-
- *pOut << endl1;
- }
- *pOut << end1;
- }
- else
- *pOut << "No ";
- *pOut << pNm << endl1 << endl1;
-}
-
-static void DumpTxtboxBrks( const char* pNm, long nStart, long nLen,
- long nOffset )
-{
- if( nStart && nLen )
- {
- WW8PLCFspecial aPLCF( &xTableStream, nStart, nLen, 6 );
- *pOut << 'T' << hex6 << nStart << dec2 << ' ' << indent1 << begin1
- << pNm << ", Len: " << nLen
- << ", " << aPLCF.GetIMax() << " Elements" << endl1;
-
- for( sal_uInt16 i = 0; i < aPLCF.GetIMax(); ++i )
- {
- long nCp = aPLCF.GetPos( i );
- if( nCp >= LONG_MAX )
- break;
-
- sal_uInt16* pBKD = (sal_uInt16*)aPLCF.GetData( i );
- *pOut << indent2 << i << ".Cp: 0x" << hex << nCp + nOffset
- << " itxbxs: 0x" << *pBKD++;
- *pOut << " dcpDepend: 0x" << *pBKD++;
- *pOut << " flags: 0x" << hex << *pBKD << dec << endl1;
- }
- *pOut << end2;
- }
- else
- *pOut << "No ";
- *pOut << pNm << endl1 << endl1;
-}
-
-static void DumpFdoa( WW8ScannerBase* pBase )
-{
- long nOffset = pWwFib->ccpText + pWwFib->ccpFtn
- + pWwFib->ccpHdr + pWwFib->ccpAtn + pWwFib->ccpEdn;
-
- if( 8 == pWwFib->nVersion )
- {
- DumpDrawObjects( "DrawObjects in Maintext",
- pWwFib->fcPlcfspaMom, pWwFib->lcbPlcfspaMom,
- /*nOffset*/0 );
- // PLCF fuer TextBox-Break-Deskriptoren im Maintext
- DumpTxtboxBrks( "TextBox-Break-Desk. im Maintext",
- pWwFib->fcPlcftxbxBkd, pWwFib->lcbPlcftxbxBkd,
- nOffset );
- }
- else
- DumpDrawObjects( "DrawObjects in Maintext",
- pWwFib->fcPlcfdoaMom, pWwFib->lcbPlcfdoaMom,
- /*nOffset*/0 );
-
- nOffset += pWwFib->ccpHdrTxbx;
-
- if( 8 == pWwFib->nVersion )
- {
- DumpDrawObjects( "DrawObjects in Head/Foot",
- pWwFib->fcPlcfspaHdr, pWwFib->lcbPlcfspaHdr,
- /*nOffset*/0 );
- // PLCF fuer TextBox-Break-Deskriptoren im Header-/Footer-Bereich
- DumpTxtboxBrks( "TextBox-Break-Desk. im Head/Foot",
- pWwFib->fcPlcfHdrtxbxBkd, pWwFib->lcbPlcfHdrtxbxBkd,
- nOffset );
- }
- else
- DumpDrawObjects( "DrawObjects in Head/Foot",
- pWwFib->fcPlcfdoaHdr, pWwFib->lcbPlcfdoaHdr,
- /*nOffset*/0 );
-}
-
-sal_Bool ReadEsherRec( SvStream& rStrm, sal_uInt8& rVer, sal_uInt16& rInst,
- sal_uInt16& rFbt, sal_uInt32& rLength )
-{
- sal_uInt16 aBits;
- if( !WW8ReadUINT16( rStrm, aBits ) ) return sal_False;
- rVer = aBits & 0x000F;
- rInst = (aBits & 0xFFF0) >> 4;
- //----------------------------------------------
- if( !WW8ReadUINT16( rStrm, rFbt ) ) return sal_False;
- //----------------------------------------------
- return WW8ReadUINT32( rStrm, rLength );
-}
-
-const char* _GetShapeTypeNm( sal_uInt16 nId )
-{
- const char* aNmArr[ 202 + 2 + 1 ] = {
-/* 0*/ "NotPrimitive","Rectangle","RoundRectangle","Ellipse","Diamond","IsocelesTriangle","RightTriangle","Parallelogram","Trapezoid","Hexagon",
-/* 10*/ "Octagon","Plus","Star","Arrow","ThickArrow","HomePlate","Cube","Balloon","Seal","Arc",
-/* 20*/ "Line","Plaque","Can","Donut","TextSimple","TextOctagon","TextHexagon","TextCurve","TextWave","TextRing",
-/* 30*/ "TextOnCurve","TextOnRing","StraightConnector1","BentConnector2","BentConnector3","BentConnector4","BentConnector5","CurvedConnector2","CurvedConnector3","CurvedConnector4",
-/* 40*/ "CurvedConnector5","Callout1","Callout2","Callout3","AccentCallout1","AccentCallout2","AccentCallout3","BorderCallout1","BorderCallout2","BorderCallout3",
-/* 50*/ "AccentBorderCallout1","AccentBorderCallout2","AccentBorderCallout3","Ribbon","Ribbon2","Chevron","Pentagon","NoSmoking","Seal8","Seal16",
-/* 60*/ "Seal32","WedgeRectCallout","WedgeRRectCallout","WedgeEllipseCallout","Wave","FoldedCorner","LeftArrow","DownArrow","UpArrow","LeftRightArrow",
-/* 70*/ "UpDownArrow","IrregularSeal1","IrregularSeal2","LightningBolt","Heart","PictureFrame","QuadArrow","LeftArrowCallout","RightArrowCallout","UpArrowCallout",
-/* 80*/ "DownArrowCallout","LeftRightArrowCallout","UpDownArrowCallout","QuadArrowCallout","Bevel","LeftBracket","RightBracket","LeftBrace","RightBrace","LeftUpArrow",
-/* 90*/ "BentUpArrow","BentArrow","Seal24","StripedRightArrow","NotchedRightArrow","BlockArc","SmileyFace","VerticalScroll","HorizontalScroll","CircularArrow",
-/* 100*/ "NotchedCircularArrow","UturnArrow","CurvedRightArrow","CurvedLeftArrow","CurvedUpArrow","CurvedDownArrow","CloudCallout","EllipseRibbon","EllipseRibbon2","FlowChartProcess",
-/* 110*/ "FlowChartDecision","FlowChartInputOutput","FlowChartPredefinedProcess","FlowChartInternalStorage","FlowChartDocument","FlowChartMultidocument","FlowChartTerminator","FlowChartPreparation","FlowChartManualInput","FlowChartManualOperation",
-/* 120*/ "FlowChartConnector","FlowChartPunchedCard","FlowChartPunchedTape","FlowChartSummingJunction","FlowChartOr","FlowChartCollate","FlowChartSort","FlowChartExtract","FlowChartMerge","FlowChartOfflineStorage",
-/* 130*/ "FlowChartOnlineStorage","FlowChartMagneticTape","FlowChartMagneticDisk","FlowChartMagneticDrum","FlowChartDisplay","FlowChartDelay","TextPlainText","TextStop","TextTriangle","TextTriangleInverted",
-/* 140*/ "TextChevron","TextChevronInverted","TextRingInside","TextRingOutside","TextArchUpCurve","TextArchDownCurve","TextCircleCurve","TextButtonCurve","TextArchUpPour","TextArchDownPour",
-/* 150*/ "TextCirclePour","TextButtonPour","TextCurveUp","TextCurveDown","TextCascadeUp","TextCascadeDown","TextWave1","TextWave2","TextWave3","TextWave4",
-/* 160*/ "TextInflate","TextDeflate","TextInflateBottom","TextDeflateBottom","TextInflateTop","TextDeflateTop","TextDeflateInflate","TextDeflateInflateDeflate","TextFadeRight","TextFadeLeft",
-/* 170*/ "TextFadeUp","TextFadeDown","TextSlantUp","TextSlantDown","TextCanUp","TextCanDown","FlowChartAlternateProcess","FlowChartOffpageConnector","Callout90","AccentCallout90",
-/* 180*/ "BorderCallout90","AccentBorderCallout90","LeftRightUpArrow","Sun","Moon","BracketPair","BracePair","Seal4","DoubleWave","ActionButtonBlank",
-/* 190*/ "ActionButtonHome","ActionButtonHelp","ActionButtonInformation","ActionButtonForwardNext","ActionButtonBackPrevious","ActionButtonEnd","ActionButtonBeginning","ActionButtonReturn","ActionButtonDocument","ActionButtonSound",
-/* 200*/ "ActionButtonMovie","HostControl","TextBox","Nil", "???"
- };
- if( 203 < nId )
- nId = 204;
- return aNmArr[ nId ];
-}
-
-void DumpEscherProp( sal_uInt16 nId, sal_Bool bBid, sal_Bool bComplex, sal_uInt32 nOp,
- sal_uInt32& rStreamOffset )
-{
- const char* pRecNm = 0;
- switch( nId )
- {
- case 4: pRecNm = "DFF_Prop_Rotation"; break;
-// Protection
- case 119: pRecNm = "DFF_Prop_LockRotation"; break;
- case 120: pRecNm = "DFF_Prop_LockAspectRatio"; break;
- case 121: pRecNm = "DFF_Prop_LockPosition"; break;
- case 122: pRecNm = "DFF_Prop_LockAgainstSelect"; break;
- case 123: pRecNm = "DFF_Prop_LockCropping"; break;
- case 124: pRecNm = "DFF_Prop_LockVertices"; break;
- case 125: pRecNm = "DFF_Prop_LockText"; break;
- case 126: pRecNm = "DFF_Prop_LockAdjustHandles"; break;
- case 127: pRecNm = "DFF_Prop_LockAgainstGrouping"; break;
-// Text
- case 128: pRecNm = "DFF_Prop_lTxid"; break;
- case 129: pRecNm = "DFF_Prop_dxTextLeft"; break;
- case 130: pRecNm = "DFF_Prop_dyTextTop"; break;
- case 131: pRecNm = "DFF_Prop_dxTextRight"; break;
- case 132: pRecNm = "DFF_Prop_dyTextBottom"; break;
- case 133: pRecNm = "DFF_Prop_WrapText"; break;
- case 134: pRecNm = "DFF_Prop_scaleText"; break;
- case 135: pRecNm = "DFF_Prop_anchorText"; break;
- case 136: pRecNm = "DFF_Prop_txflTextFlow"; break;
- case 137: pRecNm = "DFF_Prop_cdirFont"; break;
- case 138: pRecNm = "DFF_Prop_hspNext"; break;
- case 139: pRecNm = "DFF_Prop_txdir"; break;
- case 187: pRecNm = "DFF_Prop_SelectText"; break;
- case 188: pRecNm = "DFF_Prop_AutoTextMargin"; break;
- case 189: pRecNm = "DFF_Prop_RotateText"; break;
- case 190: pRecNm = "DFF_Prop_FitShapeToText"; break;
- case 191: pRecNm = "DFF_Prop_FitTextToShape"; break;
-// GeoText
- case 192: pRecNm = "DFF_Prop_gtextUNICODE"; break;
- case 193: pRecNm = "DFF_Prop_gtextRTF"; break;
- case 194: pRecNm = "DFF_Prop_gtextAlign"; break;
- case 195: pRecNm = "DFF_Prop_gtextSize"; break;
- case 196: pRecNm = "DFF_Prop_gtextSpacing"; break;
- case 197: pRecNm = "DFF_Prop_gtextFont"; break;
- case 240: pRecNm = "DFF_Prop_gtextFReverseRows"; break;
- case 241: pRecNm = "DFF_Prop_fGtext"; break;
- case 242: pRecNm = "DFF_Prop_gtextFVertical"; break;
- case 243: pRecNm = "DFF_Prop_gtextFKern"; break;
- case 244: pRecNm = "DFF_Prop_gtextFTight"; break;
- case 245: pRecNm = "DFF_Prop_gtextFStretch"; break;
- case 246: pRecNm = "DFF_Prop_gtextFShrinkFit"; break;
- case 247: pRecNm = "DFF_Prop_gtextFBestFit"; break;
- case 248: pRecNm = "DFF_Prop_gtextFNormalize"; break;
- case 249: pRecNm = "DFF_Prop_gtextFDxMeasure"; break;
- case 250: pRecNm = "DFF_Prop_gtextFBold"; break;
- case 251: pRecNm = "DFF_Prop_gtextFItalic"; break;
- case 252: pRecNm = "DFF_Prop_gtextFUnderline"; break;
- case 253: pRecNm = "DFF_Prop_gtextFShadow"; break;
- case 254: pRecNm = "DFF_Prop_gtextFSmallcaps"; break;
- case 255: pRecNm = "DFF_Prop_gtextFStrikethrough"; break;
-// Blip
- case 256: pRecNm = "DFF_Prop_cropFromTop"; break;
- case 257: pRecNm = "DFF_Prop_cropFromBottom"; break;
- case 258: pRecNm = "DFF_Prop_cropFromLeft"; break;
- case 259: pRecNm = "DFF_Prop_cropFromRight"; break;
- case 260: pRecNm = "DFF_Prop_pib"; break;
- case 261: pRecNm = "DFF_Prop_pibName"; break;
- case 262: pRecNm = "DFF_Prop_pibFlags"; break;
- case 263: pRecNm = "DFF_Prop_pictureTransparent"; break;
- case 264: pRecNm = "DFF_Prop_pictureContrast"; break;
- case 265: pRecNm = "DFF_Prop_pictureBrightness"; break;
- case 266: pRecNm = "DFF_Prop_pictureGamma"; break;
- case 267: pRecNm = "DFF_Prop_pictureId"; break;
- case 268: pRecNm = "DFF_Prop_pictureDblCrMod"; break;
- case 269: pRecNm = "DFF_Prop_pictureFillCrMod"; break;
- case 270: pRecNm = "DFF_Prop_pictureLineCrMod"; break;
- case 271: pRecNm = "DFF_Prop_pibPrint"; break;
- case 272: pRecNm = "DFF_Prop_pibPrintName"; break;
- case 273: pRecNm = "DFF_Prop_pibPrintFlags"; break;
- case 316: pRecNm = "DFF_Prop_fNoHitTestPicture"; break;
- case 317: pRecNm = "DFF_Prop_pictureGray"; break;
- case 318: pRecNm = "DFF_Prop_pictureBiLevel"; break;
- case 319: pRecNm = "DFF_Prop_pictureActive"; break;
-// Geometry
- case 320: pRecNm = "DFF_Prop_geoLeft"; break;
- case 321: pRecNm = "DFF_Prop_geoTop"; break;
- case 322: pRecNm = "DFF_Prop_geoRight"; break;
- case 323: pRecNm = "DFF_Prop_geoBottom"; break;
- case 324: pRecNm = "DFF_Prop_shapePath"; break;
- case 325: pRecNm = "DFF_Prop_pVertices"; break;
- case 326: pRecNm = "DFF_Prop_pSegmentInfo"; break;
- case 327: pRecNm = "DFF_Prop_adjustValue"; break;
- case 328: pRecNm = "DFF_Prop_adjust2Value"; break;
- case 329: pRecNm = "DFF_Prop_adjust3Value"; break;
- case 330: pRecNm = "DFF_Prop_adjust4Value"; break;
- case 331: pRecNm = "DFF_Prop_adjust5Value"; break;
- case 332: pRecNm = "DFF_Prop_adjust6Value"; break;
- case 333: pRecNm = "DFF_Prop_adjust7Value"; break;
- case 334: pRecNm = "DFF_Prop_adjust8Value"; break;
- case 335: pRecNm = "DFF_Prop_adjust9Value"; break;
- case 336: pRecNm = "DFF_Prop_adjust10Value"; break;
- case 378: pRecNm = "DFF_Prop_fShadowOK"; break;
- case 379: pRecNm = "DFF_Prop_f3DOK"; break;
- case 380: pRecNm = "DFF_Prop_fLineOK"; break;
- case 381: pRecNm = "DFF_Prop_fGtextOK"; break;
- case 382: pRecNm = "DFF_Prop_fFillShadeShapeOK"; break;
- case 383: pRecNm = "DFF_Prop_fFillOK"; break;
-// FillStyle
- case 384: pRecNm = "DFF_Prop_fillType"; break;
- case 385: pRecNm = "DFF_Prop_fillColor"; break;
- case 386: pRecNm = "DFF_Prop_fillOpacity"; break;
- case 387: pRecNm = "DFF_Prop_fillBackColor"; break;
- case 388: pRecNm = "DFF_Prop_fillBackOpacity"; break;
- case 389: pRecNm = "DFF_Prop_fillCrMod"; break;
- case 390: pRecNm = "DFF_Prop_fillBlip"; break;
- case 391: pRecNm = "DFF_Prop_fillBlipName"; break;
- case 392: pRecNm = "DFF_Prop_fillBlipFlags"; break;
- case 393: pRecNm = "DFF_Prop_fillWidth"; break;
- case 394: pRecNm = "DFF_Prop_fillHeight"; break;
- case 395: pRecNm = "DFF_Prop_fillAngle"; break;
- case 396: pRecNm = "DFF_Prop_fillFocus"; break;
- case 397: pRecNm = "DFF_Prop_fillToLeft"; break;
- case 398: pRecNm = "DFF_Prop_fillToTop"; break;
- case 399: pRecNm = "DFF_Prop_fillToRight"; break;
- case 400: pRecNm = "DFF_Prop_fillToBottom"; break;
- case 401: pRecNm = "DFF_Prop_fillRectLeft"; break;
- case 402: pRecNm = "DFF_Prop_fillRectTop"; break;
- case 403: pRecNm = "DFF_Prop_fillRectRight"; break;
- case 404: pRecNm = "DFF_Prop_fillRectBottom"; break;
- case 405: pRecNm = "DFF_Prop_fillDztype"; break;
- case 406: pRecNm = "DFF_Prop_fillShadePreset"; break;
- case 407: pRecNm = "DFF_Prop_fillShadeColors"; break;
- case 408: pRecNm = "DFF_Prop_fillOriginX"; break;
- case 409: pRecNm = "DFF_Prop_fillOriginY"; break;
- case 410: pRecNm = "DFF_Prop_fillShapeOriginX"; break;
- case 411: pRecNm = "DFF_Prop_fillShapeOriginY"; break;
- case 412: pRecNm = "DFF_Prop_fillShadeType"; break;
- case 443: pRecNm = "DFF_Prop_fFilled"; break;
- case 444: pRecNm = "DFF_Prop_fHitTestFill"; break;
- case 445: pRecNm = "DFF_Prop_fillShape"; break;
- case 446: pRecNm = "DFF_Prop_fillUseRect"; break;
- case 447: pRecNm = "DFF_Prop_fNoFillHitTest"; break;
-// LineStyle
- case 448: pRecNm = "DFF_Prop_lineColor"; break;
- case 449: pRecNm = "DFF_Prop_lineOpacity"; break;
- case 450: pRecNm = "DFF_Prop_lineBackColor"; break;
- case 451: pRecNm = "DFF_Prop_lineCrMod"; break;
- case 452: pRecNm = "DFF_Prop_lineType"; break;
- case 453: pRecNm = "DFF_Prop_lineFillBlip"; break;
- case 454: pRecNm = "DFF_Prop_lineFillBlipName"; break;
- case 455: pRecNm = "DFF_Prop_lineFillBlipFlags"; break;
- case 456: pRecNm = "DFF_Prop_lineFillWidth"; break;
- case 457: pRecNm = "DFF_Prop_lineFillHeight"; break;
- case 458: pRecNm = "DFF_Prop_lineFillDztype"; break;
- case 459: pRecNm = "DFF_Prop_lineWidth"; break;
- case 460: pRecNm = "DFF_Prop_lineMiterLimit"; break;
- case 461: pRecNm = "DFF_Prop_lineStyle"; break;
- case 462: pRecNm = "DFF_Prop_lineDashing"; break;
- case 463: pRecNm = "DFF_Prop_lineDashStyle"; break;
- case 464: pRecNm = "DFF_Prop_lineStartArrowhead"; break;
- case 465: pRecNm = "DFF_Prop_lineEndArrowhead"; break;
- case 466: pRecNm = "DFF_Prop_lineStartArrowWidth"; break;
- case 467: pRecNm = "DFF_Prop_lineStartArrowLength"; break;
- case 468: pRecNm = "DFF_Prop_lineEndArrowWidth"; break;
- case 469: pRecNm = "DFF_Prop_lineEndArrowLength"; break;
- case 470: pRecNm = "DFF_Prop_lineJoinStyle"; break;
- case 471: pRecNm = "DFF_Prop_lineEndCapStyle"; break;
- case 507: pRecNm = "DFF_Prop_fArrowheadsOK"; break;
- case 508: pRecNm = "DFF_Prop_fLine"; break;
- case 509: pRecNm = "DFF_Prop_fHitTestLine"; break;
- case 510: pRecNm = "DFF_Prop_lineFillShape"; break;
- case 511: pRecNm = "DFF_Prop_fNoLineDrawDash"; break;
-// ShadowStyle
- case 512: pRecNm = "DFF_Prop_shadowType"; break;
- case 513: pRecNm = "DFF_Prop_shadowColor"; break;
- case 514: pRecNm = "DFF_Prop_shadowHighlight"; break;
- case 515: pRecNm = "DFF_Prop_shadowCrMod"; break;
- case 516: pRecNm = "DFF_Prop_shadowOpacity"; break;
- case 517: pRecNm = "DFF_Prop_shadowOffsetX"; break;
- case 518: pRecNm = "DFF_Prop_shadowOffsetY"; break;
- case 519: pRecNm = "DFF_Prop_shadowSecondOffsetX"; break;
- case 520: pRecNm = "DFF_Prop_shadowSecondOffsetY"; break;
- case 521: pRecNm = "DFF_Prop_shadowScaleXToX"; break;
- case 522: pRecNm = "DFF_Prop_shadowScaleYToX"; break;
- case 523: pRecNm = "DFF_Prop_shadowScaleXToY"; break;
- case 524: pRecNm = "DFF_Prop_shadowScaleYToY"; break;
- case 525: pRecNm = "DFF_Prop_shadowPerspectiveX"; break;
- case 526: pRecNm = "DFF_Prop_shadowPerspectiveY"; break;
- case 527: pRecNm = "DFF_Prop_shadowWeight"; break;
- case 528: pRecNm = "DFF_Prop_shadowOriginX"; break;
- case 529: pRecNm = "DFF_Prop_shadowOriginY"; break;
- case 574: pRecNm = "DFF_Prop_fShadow"; break;
- case 575: pRecNm = "DFF_Prop_fshadowObscured"; break;
-// PerspectiveStyle
- case 576: pRecNm = "DFF_Prop_perspectiveType"; break;
- case 577: pRecNm = "DFF_Prop_perspectiveOffsetX"; break;
- case 578: pRecNm = "DFF_Prop_perspectiveOffsetY"; break;
- case 579: pRecNm = "DFF_Prop_perspectiveScaleXToX"; break;
- case 580: pRecNm = "DFF_Prop_perspectiveScaleYToX"; break;
- case 581: pRecNm = "DFF_Prop_perspectiveScaleXToY"; break;
- case 582: pRecNm = "DFF_Prop_perspectiveScaleYToY"; break;
- case 583: pRecNm = "DFF_Prop_perspectivePerspectiveX"; break;
- case 584: pRecNm = "DFF_Prop_perspectivePerspectiveY"; break;
- case 585: pRecNm = "DFF_Prop_perspectiveWeight"; break;
- case 586: pRecNm = "DFF_Prop_perspectiveOriginX"; break;
- case 587: pRecNm = "DFF_Prop_perspectiveOriginY"; break;
- case 639: pRecNm = "DFF_Prop_fPerspective"; break;
-// 3D Object
- case 640: pRecNm = "DFF_Prop_c3DSpecularAmt"; break;
- case 641: pRecNm = "DFF_Prop_c3DDiffuseAmt"; break;
- case 642: pRecNm = "DFF_Prop_c3DShininess"; break;
- case 643: pRecNm = "DFF_Prop_c3DEdgeThickness"; break;
- case 644: pRecNm = "DFF_Prop_c3DExtrudeForward"; break;
- case 645: pRecNm = "DFF_Prop_c3DExtrudeBackward"; break;
- case 646: pRecNm = "DFF_Prop_c3DExtrudePlane"; break;
- case 647: pRecNm = "DFF_Prop_c3DExtrusionColor"; break;
- case 648: pRecNm = "DFF_Prop_c3DCrMod"; break;
- case 700: pRecNm = "DFF_Prop_f3D"; break;
- case 701: pRecNm = "DFF_Prop_fc3DMetallic"; break;
- case 702: pRecNm = "DFF_Prop_fc3DUseExtrusionColor"; break;
- case 703: pRecNm = "DFF_Prop_fc3DLightFace"; break;
-// 3D Style
- case 704: pRecNm = "DFF_Prop_c3DYRotationAngle"; break;
- case 705: pRecNm = "DFF_Prop_c3DXRotationAngle"; break;
- case 706: pRecNm = "DFF_Prop_c3DRotationAxisX"; break;
- case 707: pRecNm = "DFF_Prop_c3DRotationAxisY"; break;
- case 708: pRecNm = "DFF_Prop_c3DRotationAxisZ"; break;
- case 709: pRecNm = "DFF_Prop_c3DRotationAngle"; break;
- case 710: pRecNm = "DFF_Prop_c3DRotationCenterX"; break;
- case 711: pRecNm = "DFF_Prop_c3DRotationCenterY"; break;
- case 712: pRecNm = "DFF_Prop_c3DRotationCenterZ"; break;
- case 713: pRecNm = "DFF_Prop_c3DRenderMode"; break;
- case 714: pRecNm = "DFF_Prop_c3DTolerance"; break;
- case 715: pRecNm = "DFF_Prop_c3DXViewpoint"; break;
- case 716: pRecNm = "DFF_Prop_c3DYViewpoint"; break;
- case 717: pRecNm = "DFF_Prop_c3DZViewpoint"; break;
- case 718: pRecNm = "DFF_Prop_c3DOriginX"; break;
- case 719: pRecNm = "DFF_Prop_c3DOriginY"; break;
- case 720: pRecNm = "DFF_Prop_c3DSkewAngle"; break;
- case 721: pRecNm = "DFF_Prop_c3DSkewAmount"; break;
- case 722: pRecNm = "DFF_Prop_c3DAmbientIntensity"; break;
- case 723: pRecNm = "DFF_Prop_c3DKeyX"; break;
- case 724: pRecNm = "DFF_Prop_c3DKeyY"; break;
- case 725: pRecNm = "DFF_Prop_c3DKeyZ"; break;
- case 726: pRecNm = "DFF_Prop_c3DKeyIntensity"; break;
- case 727: pRecNm = "DFF_Prop_c3DFillX"; break;
- case 728: pRecNm = "DFF_Prop_c3DFillY"; break;
- case 729: pRecNm = "DFF_Prop_c3DFillZ"; break;
- case 730: pRecNm = "DFF_Prop_c3DFillIntensity"; break;
- case 763: pRecNm = "DFF_Prop_fc3DConstrainRotation"; break;
- case 764: pRecNm = "DFF_Prop_fc3DRotationCenterAuto"; break;
- case 765: pRecNm = "DFF_Prop_fc3DParallel"; break;
- case 766: pRecNm = "DFF_Prop_fc3DKeyHarsh"; break;
- case 767: pRecNm = "DFF_Prop_fc3DFillHarsh"; break;
-// Shape
- case 769: pRecNm = "DFF_Prop_hspMaster"; break;
- case 771: pRecNm = "DFF_Prop_cxstyle"; break;
- case 772: pRecNm = "DFF_Prop_bWMode"; break;
- case 773: pRecNm = "DFF_Prop_bWModePureBW"; break;
- case 774: pRecNm = "DFF_Prop_bWModeBW"; break;
- case 826: pRecNm = "DFF_Prop_fOleIcon"; break;
- case 827: pRecNm = "DFF_Prop_fPreferRelativeResize"; break;
- case 828: pRecNm = "DFF_Prop_fLockShapeType"; break;
- case 830: pRecNm = "DFF_Prop_fDeleteAttachedObject"; break;
- case 831: pRecNm = "DFF_Prop_fBackground"; break;
-
-// Callout
- case 832: pRecNm = "DFF_Prop_spcot"; break;
- case 833: pRecNm = "DFF_Prop_dxyCalloutGap"; break;
- case 834: pRecNm = "DFF_Prop_spcoa"; break;
- case 835: pRecNm = "DFF_Prop_spcod"; break;
- case 836: pRecNm = "DFF_Prop_dxyCalloutDropSpecified"; break;
- case 837: pRecNm = "DFF_Prop_dxyCalloutLengthSpecified"; break;
- case 889: pRecNm = "DFF_Prop_fCallout"; break;
- case 890: pRecNm = "DFF_Prop_fCalloutAccentBar"; break;
- case 891: pRecNm = "DFF_Prop_fCalloutTextBorder"; break;
- case 892: pRecNm = "DFF_Prop_fCalloutMinusX"; break;
- case 893: pRecNm = "DFF_Prop_fCalloutMinusY"; break;
- case 894: pRecNm = "DFF_Prop_fCalloutDropAuto"; break;
- case 895: pRecNm = "DFF_Prop_fCalloutLengthSpecified"; break;
-
-// GroupShape
- case 896: pRecNm = "DFF_Prop_wzName"; break;
- case 897: pRecNm = "DFF_Prop_wzDescription"; break;
- case 898: pRecNm = "DFF_Prop_pihlShape"; break;
- case 899: pRecNm = "DFF_Prop_pWrapPolygonVertices"; break;
- case 900: pRecNm = "DFF_Prop_dxWrapDistLeft"; break;
- case 901: pRecNm = "DFF_Prop_dyWrapDistTop"; break;
- case 902: pRecNm = "DFF_Prop_dxWrapDistRight"; break;
- case 903: pRecNm = "DFF_Prop_dyWrapDistBottom"; break;
- case 904: pRecNm = "DFF_Prop_lidRegroup"; break;
- case 953: pRecNm = "DFF_Prop_fEditedWrap"; break;
- case 954: pRecNm = "DFF_Prop_fBehindDocument"; break;
- case 955: pRecNm = "DFF_Prop_fOnDblClickNotify"; break;
- case 956: pRecNm = "DFF_Prop_fIsButton"; break;
- case 957: pRecNm = "DFF_Prop_fOneD"; break;
- case 958: pRecNm = "DFF_Prop_fHidden"; break;
- case 959: pRecNm = "DFF_Prop_fPrint"; break;
- }
-
- *pOut << " " << indent1 << ' ';
- if( pRecNm )
- *pOut << pRecNm;
- else
- *pOut << "Prop" ;
-
- *pOut << " Id: " << dec << nId << " (=0x" << hex << nId << ')';
- if( bBid )
- *pOut << " Bid: 0x" << (sal_uInt16)bBid;
-
- if( bComplex )
- {
- *pOut << " Cmpl: 0x" << (sal_uInt16)bComplex;
- // ....
- rStreamOffset += nOp;
- }
-// else
- *pOut << " op: 0x" << nOp;
-
- *pOut << dec << endl1;
-}
-
-void DumpEscherRec( sal_uLong nPos, sal_uInt8 nVer, sal_uInt16 nInst,
- sal_uInt16 nFbt, sal_uInt32 nLength )
-{
- const char* pRecNm = 0;
- switch( nFbt )
- {
- case 0xF000: pRecNm = "DFF_msofbtDggContainer"; break;
- case 0xF006: pRecNm = "DFF_msofbtDgg"; break;
- case 0xF016: pRecNm = "DFF_msofbtCLSID"; break;
- case 0xF00B: pRecNm = "DFF_msofbtOPT"; break;
- case 0xF11A: pRecNm = "DFF_msofbtColorMRU"; break;
- case 0xF11E: pRecNm = "DFF_msofbtSplitMenuColors"; break;
- case 0xF001: pRecNm = "DFF_msofbtBstoreContainer"; break;
- case 0xF007: pRecNm = "DFF_msofbtBSE"; break;
- case 0xF018: pRecNm = "DFF_msofbtBlipFirst"; break;
- case 0xF117: pRecNm = "DFF_msofbtBlipLast"; break;
- case 0xF002: pRecNm = "DFF_msofbtDgContainer"; break;
- case 0xF008: pRecNm = "DFF_msofbtDg"; break;
- case 0xF118: pRecNm = "DFF_msofbtRegroupItems"; break;
- case 0xF120: pRecNm = "DFF_msofbtColorScheme"; break;
- case 0xF003: pRecNm = "DFF_msofbtSpgrContainer"; break;
- case 0xF004: pRecNm = "DFF_msofbtSpContainer"; break;
- case 0xF009: pRecNm = "DFF_msofbtSpgr"; break;
- case 0xF00A: pRecNm = "DFF_msofbtSp"; break;
- case 0xF00C: pRecNm = "DFF_msofbtTextbox"; break;
- case 0xF00D: pRecNm = "DFF_msofbtClientTextbox"; break;
- case 0xF00E: pRecNm = "DFF_msofbtAnchor"; break;
- case 0xF00F: pRecNm = "DFF_msofbtChildAnchor"; break;
- case 0xF010: pRecNm = "DFF_msofbtClientAnchor"; break;
- case 0xF011: pRecNm = "DFF_msofbtClientData"; break;
- case 0xF11F: pRecNm = "DFF_msofbtOleObject"; break;
- case 0xF11D: pRecNm = "DFF_msofbtDeletedPspl"; break;
- case 0xF005: pRecNm = "DFF_msofbtSolverContainer"; break;
- case 0xF012: pRecNm = "DFF_msofbtConnectorRule"; break;
- case 0xF013: pRecNm = "DFF_msofbtAlignRule"; break;
- case 0xF014: pRecNm = "DFF_msofbtArcRule"; break;
- case 0xF015: pRecNm = "DFF_msofbtClientRule"; break;
- case 0xF017: pRecNm = "DFF_msofbtCalloutRule"; break;
- case 0xF122: pRecNm = "DFF_msofbtUDefProp"; break;
- }
-
- *pOut << hex6 << nPos << indent1;
- if( pRecNm )
- *pOut << pRecNm;
- else
- *pOut << "Record:";
- *pOut << " Id: 0x" << hex << nFbt << " Instance: 0x" << nInst
- << " Version: 0x" << (sal_uInt16)nVer << " Laenge: 0x" << nLength
- << dec << endl1;
-
- switch( nFbt )
- {
- case 0xf00b: // DFF_msofbtOPT
- {
- sal_uInt16 nId; sal_uInt32 nOp, nStreamOffset = nInst * 6;
- sal_Bool bBid, bComplex;
- for( sal_uInt16 n = 0; n < nInst; ++n )
- {
- if( !WW8ReadUINT16( *xTableStream, nId ) ||
- !WW8ReadUINT32( *xTableStream, nOp ))
- break;
- bBid = ( nId >> 14 ) & 1;
- bComplex = ( nId >> 15 ) & 1;
- nId &= 0x3fff;
-
- ::DumpEscherProp( nId, bBid, bComplex, nOp, nStreamOffset );
- }
- }
- break;
-
- case 0xF00d: // DFF_msofbtClientTextbox
- case 0xF010: // DFF_msofbtClientAnchor
- case 0xF011: // DFF_msofbtClientData
- {
- sal_uInt32 nData;
- if( 4 == nLength && WW8ReadUINT32( *xTableStream, nData ))
- *pOut << " " << indent1 << " Data: "
- << hex << nData << dec << endl1;
- }
- break;
-
- case 0xf00a: // DFF_msofbtSp
- {
- sal_uInt32 nId, nData;
- if( WW8ReadUINT32( *xTableStream, nId ) &&
- WW8ReadUINT32( *xTableStream, nData ))
- {
- *pOut << " " << indent1 << " \""
- << _GetShapeTypeNm( nInst )
- << "\" Id: 0x" << hex << nId
- << " Flags: 0x" << nData << dec << endl1;
- }
- }
- break;
-
- case 0xf009: // DFF_msofbtSpgr
- case 0xf00f: // DFF_msofbtChildAnchor
- {
- sal_uInt32 nL, nT, nR, nB;
- if( WW8ReadUINT32( *xTableStream, nL ) &&
- WW8ReadUINT32( *xTableStream, nT ) &&
- WW8ReadUINT32( *xTableStream, nR ) &&
- WW8ReadUINT32( *xTableStream, nB ) )
- {
- *pOut << " " << indent1 << " Rect: (L/T/R/B): " << dec
- << nL << '/' << nT << '/' << nR << '/' << nB << endl;
- }
- }
- break;
-
- case 0xf006: //ESCHER_Dgg
- {
- sal_uInt32 spidMax, // The current maximum shape ID
- cidcl, // The number of ID clusters (FIDCLs)
- cspSaved, // The total number of shapes saved
- // (including deleted shapes, if undo
- // information was saved)
- cdgSaved; // The total number of drawings saved
-
- if( WW8ReadUINT32( *xTableStream, spidMax ) &&
- WW8ReadUINT32( *xTableStream, cidcl ) &&
- WW8ReadUINT32( *xTableStream, cspSaved ) &&
- WW8ReadUINT32( *xTableStream, cdgSaved ))
- {
- *pOut << " " << indent1 << " " << hex
- << " spidMax: 0x" << spidMax
- << " cidcl: 0x" << cidcl
- << " cspSaved: 0x" << cspSaved
- << " cdgSaved: 0x" << cdgSaved
- << dec << endl1;
-
-
- sal_uInt32 dgid, // DG owning the SPIDs in this cluster
- cspidCur; // number of SPIDs used so far
-
- for( sal_uInt32 n = 1; n < cidcl; ++n )
- {
- if( !WW8ReadUINT32( *xTableStream, dgid ) ||
- !WW8ReadUINT32( *xTableStream, cspidCur ))
- break;
-
- *pOut << " " << indent1 << " " << hex
- << " dgid: 0x" << dgid
- << " cspidCur: 0x" << cspidCur
- << dec << endl1;
- }
- }
- }
- break;
-
- case 0xF122:
- {
- if( 3 < nLength )
- {
- *pOut << " " << indent1 << " Data:" << hex;
- sal_uInt8 nParam;
- for( sal_uInt32 n = 0; n < nLength; ++n )
- {
- if( !WW8ReadBYTE( *xTableStream, nParam ) )
- break;
-
- sal_uInt16 nHexParam = nParam;
- *pOut << " 0x" << nHexParam;
- }
- *pOut << dec << endl1;
- }
- }
- break;
-
- case 0xF016: //ESCHER_CLSID
- case 0xF11A: //ESCHER_ColorMRU
- case 0xF11E: //ESCHER_SplitMenuColors
-// case 0xF001: //ESCHER_BstoreContainer
- case 0xF007: //ESCHER_BSE
- case 0xF018: //ESCHER_BlipFirst
- case 0xF117: //ESCHER_BlipLast
- case 0xF118: //ESCHER_RegroupItems
- case 0xF120: //ESCHER_ColorScheme
- case 0xF00C: //ESCHER_Textbox
- case 0xF00E: //ESCHER_Anchor
- case 0xF11F: //ESCHER_OleObject
- case 0xF11D: //ESCHER_DeletedPspl
- case 0xF005: //ESCHER_SolverContainer
- case 0xF012: //ESCHER_ConnectorRule
- case 0xF013: //ESCHER_AlignRule
- case 0xF014: //ESCHER_ArcRule
- case 0xF015: //ESCHER_ClientRule
- case 0xF017: //ESCHER_CalloutRule
- case 0xF119: //ESCHER_Selection
- case 0xf008: //ESCHER_Dg
- {
- int nCnt = 128;
- while( nLength )
- {
- if( 128 == nCnt || 16 == ++nCnt )
- {
- if( 128 != nCnt )
- *pOut << endl1;
- *pOut << " " << indent1 << " Data: ";
- nCnt = 0;
- }
-
- static char __READONLY_DATA sHex[17] = { "0123456789abcdef" };
- sal_uInt8 c;
- *xTableStream >> c;
- *pOut << sHex[ ( c & 0xf0 ) >> 4 ] << sHex[ c & 0x0f ] << ' ';
- --nLength;
- }
- *pOut << dec << endl1;
- }
- break;
- }
-
-
-}
-
-
-void DumpEscherRecs( sal_uLong nPos, sal_uInt32 nLength )
-{
- begin( *pOut, *xTableStream ) << endl1;
-
- sal_uInt16 nOldFbt = 0;
- sal_uLong nReadLen = 0;
- while( nReadLen < nLength )
- {
- sal_uInt8 nVer;
- sal_uInt16 nInst, nFbt;
- sal_uInt32 nRecLen;
-
- if( !::ReadEsherRec( *xTableStream, nVer, nInst, nFbt, nRecLen ))
- break;
-
- if( (0xf000 > nFbt) )//|| (0xf122 < nFbt) )
- {
- xTableStream->Seek( nPos + nReadLen );
- unsigned char c;
- *xTableStream >> c;
-
- ++nReadLen;
- if( ( !::ReadEsherRec( *xTableStream, nVer, nInst, nFbt, nRecLen ) )
- || ( 0xf000 > nFbt )
- //|| ( 0xf122 < nFbt )
- )
- break;
-
- *pOut << hex6 << nPos + nReadLen - 1 << indent1
- << "DummyChar: 0x" << hex << (int)c << dec << endl1;
- }
-
- ::DumpEscherRec( nPos + nReadLen, nVer, nInst,
- nFbt, nRecLen );
-
- nReadLen += 2 * sizeof( sal_uInt32 );
- switch( nFbt )
- {
- case 0xF000:
- case 0xF001: //ESCHER_BstoreContainer
- case 0xF002:
- case 0xF003:
- case 0xF004:
- DumpEscherRecs( nPos + nReadLen, nRecLen );
- break;
- }
-
- nReadLen += nRecLen;
- xTableStream->Seek( nPos + nReadLen );
- nOldFbt = nFbt;
- }
- end( *pOut, *xTableStream ) << endl1;
-}
-
-
-void DumpDrawing()
-{
- if( pWwFib->lcbDggInfo )
- {
- sal_uLong nOldPos = xTableStream->Tell(), nReadLen = 0;
- xTableStream->Seek( pWwFib->fcDggInfo );
-
- *pOut << endl << hex6 << pWwFib->fcDggInfo << dec2 << ' ' << indent1
- << begin1 << "Escher (DggInfo): Len: " << pWwFib->lcbDggInfo
- << endl1;
-
- ::DumpEscherRecs( pWwFib->fcDggInfo, (sal_uLong)pWwFib->lcbDggInfo );
-
- end( *pOut, *xTableStream ) << endl1 << endl1;
- xTableStream->Seek( nOldPos );
- }
-}
-
-
-//-----------------------------------------
-// Hilfroutinen fuer Styles
-//-----------------------------------------
-
-static short DumpStyleUPX( sal_uInt8 nVersion, short nLen, sal_Bool bPAP )
-{
- short cbUPX;
- sal_Bool bEmpty;
-
-
- if( nLen <= 0 ){
- indent( *pOut, *xTableStream );
- *pOut << "very empty UPX." << ((bPAP) ? "papx " : "chpx ");
- *pOut << "Len:" << nLen << endl1;
- return nLen;
- }
-
- nLen -= WW8SkipOdd( &xTableStream );
- indent( *pOut, *xTableStream );
-
- xTableStream->Read( &cbUPX, 2 );
- nLen-= 2;
-
- if ( cbUPX > nLen )
- {
- *pOut << "!cbUPX auf nLen verkleinert! ";
- cbUPX = nLen;
- }
-
- bEmpty = ( cbUPX <= 0 ) || ( bPAP && ( cbUPX <= 2 ) );
-
- if ( bEmpty )
- *pOut << "empty ";
- else
- *pOut << begin1;
-
- *pOut << "UPX." << ((bPAP) ? "papx " : "chpx ");
- *pOut << "Len:" << nLen << " cbUPX:" << cbUPX << ' ';
-
- if( bPAP )
- {
- sal_uInt16 id;
-
- xTableStream->Read( &id, 2 );
- cbUPX-= 2;
- nLen-= 2;
- *pOut << "ID:" << id;
- }
-
- *pOut << endl1;
-
- sal_uLong nPos = xTableStream->Tell(); // falls etwas falsch interpretiert
- // wird, gehts danach wieder richtig
- DumpSprms( nVersion, *xTableStream, cbUPX );
-
- if ( xTableStream->Tell() != nPos + cbUPX ){
- *pOut << "!Um " << xTableStream->Tell() - nPos + cbUPX
- << " Bytes falsch positioniert!" << endl1;
- xTableStream->Seek( nPos+cbUPX );
- }
-
- nLen -= cbUPX;
-
- if ( !bEmpty )
- end( *pOut, *xTableStream ) << "UPX." << ((bPAP) ? "papx " : "chpx ") << endl1;
-
- return nLen;
-}
-
-static void DumpStyleGrupx( sal_uInt8 nVersion, short nLen, sal_Bool bPara )
-{
- if( nLen <= 0 )
- return;
- nLen -= WW8SkipOdd( &xTableStream );
-
- begin( *pOut, *xTableStream ) << "Grupx, Len:" << nLen << endl1;
-
- if( bPara ) nLen = DumpStyleUPX( nVersion, nLen, sal_True ); // Grupx.Papx
- DumpStyleUPX( nVersion, nLen, sal_False ); // Grupx.Chpx
-
- end( *pOut, *xTableStream ) << "Grupx" << endl1;
-}
-
-static void PrintStyleId( sal_uInt16 nId )
-{
- switch ( nId ){
- case 0xffe: *pOut << "User "; break;
- case 0xfff: *pOut << "Nil "; break;
- default: *pOut << nId << ' '; break;
- }
-}
-
-//-----------------------------------------
-// Styles
-//-----------------------------------------
-
-void DStyle::Dump1Style( sal_uInt16 nNr )
-{
- short nSkip, cbStd;
- String aStr;
- char c;
- indent( *pOut, *xTableStream );
-
- WW8_STD* pStd = Read1Style( nSkip, &aStr, &cbStd ); // lese Style
-
- if ( aStr.Len() ) // echter Style
- {
- *pOut << begin1;
- switch ( pStd->sgc ){
- case 1: c = 'P'; break;
- case 2: c = 'C'; break;
- default: c = '?'; break;
- }
- *pOut << c << "-Style Nr:" << nNr << ' ';
- *pOut << "ID:"; PrintStyleId( pStd->sti );
- *pOut << "BasedOn:"; PrintStyleId( pStd->istdBase );
- ByteString sName( aStr, RTL_TEXTENCODING_MS_1252 );
- *pOut << "Next:" << pStd->istdNext << " Name:\"" << sName.GetBuffer() << "\"";
- *pOut << endl1 << " ";
- *pOut << "cbStd:" << cbStd << ' ';
- *pOut << "No of Upx & Upe:" << pStd->cupx << ' ';
- *pOut << "bchUpe:" << pStd->bchUpe << ' ';
- *pOut << "nSkip:" << nSkip << endl1;
- }else{ // leerer Slot
- *pOut << "empty Slot Nr:" << nNr << endl1;
- }
-
- long nPos = xTableStream->Tell(); // falls etwas falsch interpretiert
- // wird, gehts danach wieder richtig
-
- if( pStd && ( pStd->sgc == 1 || pStd->sgc == 2 ) )
- DumpStyleGrupx( nVersion, nSkip, pStd->sgc == 1 );
-
- if ( aStr.Len() ) // echter Style
- end( *pOut, *xTableStream ) << c << "-Style" << endl1;
-
- xTableStream->Seek( nPos+nSkip );
-
- DELETEZ( pStd );
-}
-
-void DStyle::Dump()
-{
- *pOut << hex6 << nStyleStart << ' ' << dec2 << indent1;
-
- *pOut << begin1 << cstd << " Styles, ";
- *pOut << "Base:" << cbSTDBaseInFile;
- *pOut << ", Written:" << (fStdStylenamesWritten) ? 'T' : 'F';
- *pOut << ", MaxSti:" << stiMaxWhenSaved;
- *pOut << ", MaxFix:" << istdMaxFixedWhenSaved;
- *pOut << ", BuildIn:" << nVerBuiltInNamesWhenSaved;
- *pOut << ", StdFnt:" << ftcStandardChpStsh << endl1;
-
- sal_uInt16 i;
- for( i=0; i<cstd; i++ )
- Dump1Style( i );
-
- end( *pOut, *xTableStream ) << "Styles" << endl1 << endl1;
-}
-
-//-----------------------------------------
-// Main
-//-----------------------------------------
-
-//char cName [266];
-//char cOutName [266];
-
-int PrepareConvert( String& rName, String& rOutName, String& rMess )
-{
- pxStor = new SvStorageRef( new SvStorage( rName, STREAM_STD_READ ) );
- xStrm = (*pxStor)->OpenStream( String::CreateFromAscii( "WordDocument" ),
- STREAM_STD_READ );
-
- if ( !xStrm.Is() /* || xStrm->GetError() */ ){
- rMess.AppendAscii( "Kann StorageStream \"WordDocument\" in " );
- rMess += rName;
- rMess.AppendAscii( " nicht zum Lesen oeffnen" );
- DELETEZ( pxStor );
- return 1;
- }
-
- sal_uLong nL;
- if ( xStrm->Read( &nL, sizeof( nL ) ) == 0 ){
- rMess.AppendAscii( "Kann aus StorageStream \"WordDocument\" in ");
- rMess += rName;
- rMess.AppendAscii( " nicht Lesen" );
- return 1;
- }
- xStrm->Seek( 0 );
-
- ByteString sOutName( rOutName, RTL_TEXTENCODING_MS_1252 );
- pOut = new fstream( sOutName.GetBuffer(), ios::out );
- if ( !pOut )
- {
- rMess.AppendAscii( "Kann Ausgabedatei " );
- rMess += rOutName;
- rMess.AppendAscii( " nicht zum Schreiben oeffnen" );
- return 1;
- }
-
- rMess.AppendAscii( "Ausgabe von " );
- rMess += rName;
- rMess.AppendAscii( " in Datei " );
- rMess += rOutName;
- rMess.AppendAscii( "......" );
-
- if ( xStrm->Read( &nL, sizeof( nL ) ) == 0 ){
- return 1;
- }
- xStrm->Seek( 0 );
-
- return 0;
-}
-
-int DoConvert( const String& rName, sal_uInt8 nVersion )
-{
- sal_uLong nL;
- if ( xStrm->Read( &nL, sizeof( nL ) ) == 0 ){
- return 1;
- }
- xStrm->Seek( 0 );
-
- pWwFib = new DFib( *xStrm, nVersion );
-
- if ( pWwFib->nFibError )
- return 1;
-
- // Nachdem wir nun den FIB eingelesen haben, wissen wir ja,
- // welcher Table-Stream gueltig ist.
- // Diesen oeffnen wir nun.
-
- switch( pWwFib->nVersion ) // 6 steht fuer "6 ODER 7", 7 steht fuer "NUR 7"
- {
- case 6:
- case 7:
- xTableStream = &xStrm;
- xDataStream = &xStrm;
- break;
- case 8:
- xTableStream = (*pxStor)->OpenStream( String::CreateFromAscii(
- ( 1 == pWwFib->fWhichTblStm ) ? "1Table" : "0Table" ),
- STREAM_STD_READ );
- xDataStream = (*pxStor)->OpenStream( String::CreateFromAscii(
- "Data" ), STREAM_STD_READ | STREAM_NOCREATE );
- if( !xDataStream.Is() || SVSTREAM_OK != xDataStream->GetError() )
- xDataStream = &xStrm;
- break;
- default:// Programm-Fehler!
- /*
- ACHTUNG: im FILTER nicht "sal_False" sondern "!this()" schreiben,
- da sonst Warning unter OS/2
- */
- ASSERT( sal_False, "Es wurde vergessen, nVersion zu kodieren!" );
- return 1;
- }
-
-
- // dann erstmal den Dateinamen schreiben:
- {
- ByteString sName( rName, RTL_TEXTENCODING_MS_1252 );
- *pOut << "Datei: " << sName.GetBuffer() << endl;
- }
- pSBase = new WW8ScannerBase( &xStrm, &xTableStream, &xDataStream, pWwFib );
-
- // erstmal die Lowlevel-Funktionen
-
- ((DFib*)pWwFib)->Dump(); // FIB
- DumpDop( *pWwFib ); // WW8_DOP
-
- if( ( 8 > pWwFib->nVersion && pWwFib->fComplex ) ||
- pWwFib->lcbClx )
- DumpPcd( pWwFib->nVersion, pWwFib->fcClx, pWwFib->lcbClx );
-
- DumpBookLow();
-
- DumpBookHigh();
-
-
- DumpPLCF( pWwFib->fcPlcfsed, pWwFib->lcbPlcfsed, SEP ); // SEPX
-
- DumpPLCF( pWwFib->fcPlcfbteChpx, pWwFib->lcbPlcfbteChpx, CHP ); // CHPX
-
- DumpPLCF( pWwFib->fcPlcfbtePapx, pWwFib->lcbPlcfbtePapx, PAP ); // PAPX
-
- {
- DStyle aStyle( *xTableStream, *pWwFib ); // Styles
- aStyle.Dump();
- }
-
- DumpFonts(); // WW8_FFN
-
- // ... und jetzt die High-Level-Funktionen
-
- WW8_CP nStartCp = 0;
-
- DumpPlainText( nStartCp, pWwFib->ccpText, "Main" );
- *pOut << endl1;
- DumpField1( pWwFib->fcPlcffldMom, pWwFib->lcbPlcffldMom,
- "MainText Fields" );
-
- DumpHeader( pSBase ); // Header / Footer
- DumpField1( pWwFib->fcPlcffldHdr, pWwFib->lcbPlcffldHdr,
- "Header/Footer Fields" );
-
- DumpFootnotes( pSBase );
- DumpField1( pWwFib->fcPlcffldFtn, pWwFib->lcbPlcffldFtn,
- "Footnote Fields" );
-
- DumpEndnotes( pSBase );
- DumpField1( pWwFib->fcPlcffldEdn, pWwFib->lcbPlcffldEdn,
- "Endnote Fields" );
-
- DumpAnnotations( pSBase );
-
- DumpTextBoxs( pSBase );
-
- DumpField1( pWwFib->fcPlcffldTxbx, pWwFib->lcbPlcffldTxbx,
- "Textbox Fields" );
- DumpField1( pWwFib->fcPlcffldHdrTxbx, pWwFib->lcbPlcffldHdrTxbx,
- "Header/Footer Textbox Fields" );
-
- if( 8 == pWwFib->nVersion )
- DumpNumList();
-
- DumpFdoa( pSBase );
-
- if( pWwFib->lcbPlcfspaHdr || pWwFib->lcbPlcfspaMom )
- DumpDrawing();
-
- DELETEZ( pSBase );
- DELETEZ( pWwFib );
- return 0;
-}
-
-void DeInit()
-{
-// DELETEZ( aWwStor );
- xStrm.Clear();
- DELETEZ( pxStor );
- DELETEZ( pOut );
-}
-
-
diff --git a/sw/source/filter/ww8/dump/msvbasic.cxx b/sw/source/filter/ww8/dump/msvbasic.cxx
deleted file mode 100644
index f102235ed152..000000000000
--- a/sw/source/filter/ww8/dump/msvbasic.cxx
+++ /dev/null
@@ -1,536 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sw.hxx"
-
-
-#include <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
- * */
-
-sal_uInt8 VBA_Impl::ReadPString(SvStorageStreamRef &xVBAProject)
-{
- sal_uInt16 idlen;
- sal_uInt8 type=0;
- *xVBAProject >> idlen;
- sal_uInt8 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 sal_uInt8 stest[8] =
- {
- 0x06, 0x02, 0x01, 0x00, 0x08, 0x02, 0x00, 0x00
- };
-
- sal_uInt8 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 sal_uInt8 stest[12]={0};
- sal_uInt8 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 sal_uInt8 stest[12]={0,0,0,0,0,0,0,0,0,0,1,0};
- sal_uInt8 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 sal_uInt8 stest[20] =
- {
- 0x00, 0x00, 0xe1, 0x2e, 0x45, 0x0d, 0x8f, 0xe0,
- 0x1a, 0x10, 0x85, 0x2e, 0x02, 0x60, 0x8c, 0x4d,
- 0x0b, 0xb4, 0x00, 0x00
- };
-
- sal_uInt8 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 sal_uInt8 stest[20] =
- {
- 0x00, 0x00, 0x2e, 0xc9, 0x27, 0x8e, 0x64, 0x12,
- 0x1c, 0x10, 0x8a, 0x2f, 0x04, 0x02, 0x24, 0x00,
- 0x9c, 0x02, 0x00, 0x00
- };
-
- sal_uInt8 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 sal_uInt8 *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;
- sal_uInt8 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
- };
- sal_uInt8 headerin[30];
-
- xVBAProject->Read(headerin,30);
- if (memcmp(header,headerin,30) != 0)
- DBG_WARNING("Warning VBA header is different, please report");
- sal_uInt16 value;
- *xVBAProject >> value;
- //*pOut << "Trigger value 1 is " << value << endl;
- sal_uInt16 svalue;
- *xVBAProject >> svalue;
- if (svalue != 0x02)
- DBG_WARNING("Warning VBA number is different, please report");
-
- int count=0;
- sal_uInt8 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;
-
- sal_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);
-
- sal_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;
- }
-
- sal_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++)
- {
- sal_uInt8 discard;
- sal_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);
- sal_uInt8 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);
- }
-
-sal_Bool VBA_Impl::Open( const String &rToplevel,const String &rSublevel )
-{
- /* beginning test for vba stuff */
- sal_Bool bRet = sal_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 = sal_True;
- }
- }
- /* end test for vba stuff */
- return bRet;
-}
-
-const String &VBA_Impl::Decompress( sal_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 )
-{
- sal_uInt8 leadbyte;
- unsigned int pos = 0;
-
- //*pOut << "jumping to " << hex << offsets[nIndex].offset << endl;
- xVBAStream->Seek(pOffsets[nIndex].nOffset+3);
-
- int len;
- sal_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
deleted file mode 100644
index 9b5128a70e7c..000000000000
--- a/sw/source/filter/ww8/dump/msvbasic.hxx
+++ /dev/null
@@ -1,102 +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 _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, sal_Bool bCmmntd = sal_True )
- : xStor(&rIn), pOffsets(0), nOffsets(0), bCommented(bCmmntd)
- {}
- ~VBA_Impl() {if (nOffsets) delete [] pOffsets;}
- //0 for failure, 1 for success
- sal_Bool Open( const String &rToplevel, const String &rSublevel);
- const String & Decompress( sal_uInt16 nIndex, int *pOverflow=0);
- sal_uInt16 GetNoStreams() const { return nOffsets; }
- const String &GetStreamName( sal_uInt16 nIndex ) const
- {
- DBG_ASSERT( nIndex < nOffsets, "Index out of range" );
- return pOffsets[ nIndex ].sName;
- }
- virtual void Output(int len,const sal_uInt8 *data);
-private:
- struct VBAOffset_Impl
- {
- String sName;
- sal_uInt32 nOffset;
- };
-
- SvStorageRef xVBA;
- String sVBAString;
- SvStorageRef xStor;
- VBAOffset_Impl *pOffsets;
- sal_uInt16 nOffsets;
- sal_uInt8 aHistory[ WINDOWLEN ];
- sal_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);
- sal_uInt8 ReadPString(SvStorageStreamRef &xVBAProject);
-};
-
-
-
-
-#endif
diff --git a/sw/source/filter/ww8/dump/ww8darr.cxx b/sw/source/filter/ww8/dump/ww8darr.cxx
deleted file mode 100644
index cf142e703bc3..000000000000
--- a/sw/source/filter/ww8/dump/ww8darr.cxx
+++ /dev/null
@@ -1,546 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sw.hxx"
-
-#include <stdlib.h>
-
-#include "ww8dout.hxx" // OutShort()
-#include "ww8darr.hxx"
-
-
-
-
-//-----------------------------------------
-
-
-
-SprmDumpInfo aSprmDumpTab[] = {
- 0, (FnOut)0, "NOP(0)",
- 2, OutShort, "sprmPIstd", // pap.istd (style code)
- 3, (FnOut)0, "sprmPIstdPermute", // pap.istd permutation
- 4, OutByte, "sprmPIncLv1", // pap.istddifference
- 5, OutByte, "sprmPJc", // pap.jc (justification)
- 6, OutBool, "sprmPFSideBySide", // pap.fSideBySide
- 7, OutBool, "sprmPFKeep", // pap.fKeep
- 8, OutBool, "sprmPFKeepFollow ", // pap.fKeepFollow
- 9, OutBool, "sprmPPageBreakBefore", // pap.fPageBreakBefore
-
- 10, (FnOut)0, "sprmPBrcl", // pap.brcl
- 11, (FnOut)0, "sprmPBrcp ", // pap.brcp
- 12, (FnOut)0, "sprmPAnld", // pap.anld (ANLD structure)
- 13, OutByte, "sprmPNLvlAnm", // pap.nLvlAnm nn
- 14, OutBool, "sprmPFNoLineNumb", //ap.fNoLnn
-
- //??
- 15, OutTab, "?sprmPChgTabsPapx", // pap.itbdMac, ...
-
-
- 16, OutShort, "sprmPDxaRight", // pap.dxaRight
- 17, OutShort, "sprmPDxaLeft", // pap.dxaLeft
- 18, OutWord, "sprmPNest", // pap.dxaLeft
- 19, OutShort, "sprmPDxaLeft1", // pap.dxaLeft1
-
- 20, OutShorts, "sprmPDyaLine", // pap.lspd an LSPD
- 21, OutWord, "sprmPDyaBefore", // pap.dyaBefore
- 22, OutWord, "sprmPDyaAfter", // pap.dyaAfter
-
-
- //??
- 23, (FnOut)0, "?sprmPChgTabs", // pap.itbdMac, pap.rgdxaTab, ...
-
-
- 24, OutBool, "sprmPFInTable", // pap.fInTable
- 25, OutBool, "sprmPTtp", // pap.fTtp
- 26, OutWord, "sprmPDxaAbs", // pap.dxaAbs
- 27, OutWord, "sprmPDyaAbs", // pap.dyaAbs
- 28, OutWord, "sprmPDxaWidth", // pap.dxaWidth
- 29, (FnOut)0, "sprmPPc", // pap.pcHorz, pap.pcVert
-
- 30, (FnOut)0, "sprmPBrcTop10", // pap.brcTop BRC10
- 31, (FnOut)0, "sprmPBrcLeft10", // pap.brcLeft BRC10
- 32, (FnOut)0, "sprmPBrcBottom10", // pap.brcBottom BRC10
- 33, (FnOut)0, "sprmPBrcRight10", // pap.brcRight BRC10
- 34, (FnOut)0, "sprmPBrcBetween10", // pap.brcBetween BRC10
- 35, (FnOut)0, "sprmPBrcBar10", // pap.brcBar BRC10
- 36, OutWord, "sprmPFromText10", // pap.dxaFromText dxa
- 37, (FnOut)0, "sprmPWr", // pap.wr wr
- 38, OutWordHex, "sprmPBrcTop", // pap.brcTop BRC
- 39, OutWordHex, "sprmPBrcLeft", // pap.brcLeft BRC
-
- 40, OutWordHex, "sprmPBrcBottom", // pap.brcBottom BRC
- 41, OutWordHex, "sprmPBrcRight", // pap.brcRight BRC
- 42, (FnOut)0, "sprmPBrcBetween", // pap.brcBetween BRC
- 43, (FnOut)0, "sprmPBrcBar",//pap.brcBar BRC word
- 44, OutBool, "sprmPFNoAutoHyph",//pap.fNoAutoHyph
- 45, OutWord, "sprmPWHeightAbs",//pap.wHeightAbs w
- 46, (FnOut)0, "sprmPDcs",//pap.dcs DCS
- 47, OutWordHex, "sprmPShd",//pap.shd SHD
- 48, OutWord, "sprmPDyaFromText",//pap.dyaFromText dya
- 49, OutWord, "sprmPDxaFromText",//pap.dxaFromText dxa
-
- 50, OutBool, "sprmPFLocked", // pap.fLocked 0 or 1 byte
- 51, OutBool, "sprmPFWidowControl", // pap.fWidowControl 0 or 1 byte
-
-
- //??
- 52, (FnOut)0, "?sprmPRuler 52", //???
-
-
- 65, OutBool, "sprmCFStrikeRM", // chp.fRMarkDel 1 or 0 bit
- 66, OutBool, "sprmCFRMark", // chp.fRMark 1 or 0 bit
- 67, OutBool, "sprmCFFldVanish", // chp.fFldVanish 1 or 0 bit
- 68, OutTab68, "sprmCPicLocation", // chp.fcPic and chp.fSpec
- 69, OutShort, "sprmCIbstRMark", // chp.ibstRMark index into sttbRMark
-
- 70, (FnOut)0, "sprmCDttmRMark", // chp.dttm DTTM long
- 71, OutBool, "sprmCFData", // chp.fData 1 or 0 bit
- 72, OutShort, "sprmCRMReason", // chp.idslRMReason an index to a table
- 73, (FnOut)0, "sprmCChse", // chp.fChsDiff and chp.chse see below 3 bytes
- 74, (FnOut)0, "sprmCSymbol", // chp.fSpec, chp.chSym and chp.ftcSym
- 75, OutBool, "sprmCFOle2", // chp.fOle2 1 or 0 bit
-
- 80, OutShort, "sprmCIstd", // chp.istd istd, see stylesheet definition short
- 81, (FnOut)0, "sprmCIstdPermute", // chp.istd permutation vector (see below)
- 82, (FnOut)0, "sprmCDefault", // whole CHP (see below) none variable length
- 83, (FnOut)0, "sprmCPlain", // whole CHP (see below) none 0
- 84, (FnOut)0, "??84",
- 85, OutBool4, "sprmCFBold", // chp.fBold 0,1, 128, or 129 (see below) byte
- 86, OutBool4, "sprmCFItalic", // chp.fItalic 0,1, 128, or 129 (see below) byte
- 87, OutBool4, "sprmCFStrike", // chp.fStrike 0,1, 128, or 129 (see below) byte
- 88, OutBool4, "sprmCFOutline", // chp.fOutline 0,1, 128, or 129 (see below) byte
- 89, OutBool4, "sprmCFShadow", // chp.fShadow 0,1, 128, or 129 (see below) byte
-
- 90, OutBool4, "sprmCFSmallCaps", // chp.fSmallCaps 0,1, 128, or 129 (see below) byte
- 91, OutBool4, "sprmCFCaps", // chp.fCaps 0,1, 128, or 129 (see below) byte
- 92, OutBool4, "sprmCFVanish", // chp.fVanish 0,1, 128, or 129 (see below) byte
- 93, OutWord, "sprmCFtc", // chp.ftc ftc word
- 94, OutByte, "sprmCKul", // chp.kul kul byte
- 95, (FnOut)0, "sprmCSizePos", // chp.hps, chp.hpsPos (see below) 3 bytes
- 96, OutWord, "sprmCDxaSpace", // chp.dxaSpace dxa word
- 97, OutWord, "sprmCLid", // chp.lid LID word
- 98, OutByte, "sprmCIco", // chp.ico ico byte
- 99, OutWord, "sprmCHps", // chp.hps hps word!
-
- 100, OutByte, "sprmCHpsInc", // chp.hps (see below) byte
- 101, OutWord, "sprmCHpsPos", // chp.hpsPos hps byte
- 102, OutByte, "sprmCHpsPosAdj", // chp.hpsPos hps (see below) byte
-
-
- //??
- 103, (FnOut)0, "?sprmCMajority", // chp.fBold, chp.fItalic, chp.fSmallCaps, ...
-
-
- 104, OutByte, "sprmCIss", // chp.iss iss byte
- 105, (FnOut)0, "sprmCHpsNew50", // chp.hps hps variable width, length always recorded as 2
- 106, (FnOut)0, "sprmCHpsInc1", // chp.hps complex (see below) variable width, length always recorded as 2
- 107, OutShort, "sprmCHpsKern", // chp.hpsKern hps short
- 108, (FnOut)0, "sprmCMajority50", // chp.fBold, chp.fItalic, chp.fSmallCaps, chp.fVanish, ...
- 109, OutShort, "sprmCHpsMul", // chp.hps percentage to grow hps short
-
- 110, OutShort, "sprmCCondHyhen", // chp.ysri ysri short
- 117, OutBool, "sprmCFSpec", // chp.fSpec 1 or 0 bit
- 118, OutBool, "sprmCFObj", // chp.fObj 1 or 0 bit
- 119, (FnOut)0, "sprmPicBrcl", // pic.brcl brcl (see PIC structure definition) byte
-
- 120, (FnOut)0, "sprmPicScale", // pic.mx, pic.my, pic.dxaCropleft,
- 121, (FnOut)0, "sprmPicBrcTop", // pic.brcTop BRC word
- 122, (FnOut)0, "sprmPicBrcLeft", // pic.brcLeft BRC word
- 123, (FnOut)0, "sprmPicBrcBottom", // pic.brcBottom BRC word
- 124, (FnOut)0, "sprmPicBrcRight", // pic.brcRight BRC word
- 131, OutByte, "sprmSScnsPgn", // sep.cnsPgn cns byte
- 132, (FnOut)0, "sprmSiHeadingPgn", // sep.iHeadingPgn heading number level byte
- 133, (FnOut)0, "sprmSOlstAnm", // sep.olstAnm OLST variable length
- 136, (FnOut)0, "sprmSDxaColWidth", // sep.rgdxaColWidthSpacing complex (see below) 3 bytes
- 137, (FnOut)0, "sprmSDxaColSpacing", // sep.rgdxaColWidthSpacing complex (see below) 3 bytes
- 138, OutBool, "sprmSFEvenlySpaced", // sep.fEvenlySpaced 1 or 0 byte
- 139, OutBool, "sprmSFProtected", // sep.fUnlocked 1 or 0 byte
-
- 140, OutWord, "sprmSDmBinFirst", // sep.dmBinFirst word
- 141, OutWord, "sprmSDmBinOther", // sep.dmBinOther word
- 142, OutByte, "sprmSBkc", // sep.bkc bkc byte
- 143, OutBool, "sprmSFTitlePage", // sep.fTitlePage 0 or 1 byte
- 144, OutWord, "sprmSCcolumns", // sep.ccolM1 # of cols - 1 word
- 145, OutWord, "sprmSDxaColumns", // sep.dxaColumns dxa word
- 146, (FnOut)0, "sprmSFAutoPgn", // sep.fAutoPgn obsolete byte
- 147, OutByte, "sprmSNfcPgn", // sep.nfcPgn nfc byte
- 148, OutShort, "sprmSDyaPgn", // sep.dyaPgn dya short
- 149, OutShort, "sprmSDxaPgn", // sep.dxaPgn dya short
-
- 150, OutBool, "sprmSFPgnRestart", // sep.fPgnRestart 0 or 1 byte
- 151, OutBool, "sprmSFEndnote", // sep.fEndnote 0 or 1 byte
- 152, OutByte, "sprmSLnc", // sep.lnc lnc byte
- 153, (FnOut)0, "sprmSGprfIhdt", // sep.grpfIhdt grpfihdt (see Headers and Footers topic) byte
- 154, OutWord, "sprmSNLnnMod", // sep.nLnnMod non-neg int. word
- 155, OutWord, "sprmSDxaLnn", // sep.dxaLnn dxa word
- 156, OutWord, "sprmSDyaHdrTop", // sep.dyaHdrTop dya word
- 157, OutWord, "sprmSDyaHdrBottom", // sep.dyaHdrBottom dya word
- 158, OutBool, "sprmSLBetween", // sep.fLBetween 0 or 1 byte
- 159, OutByte, "sprmSVjc", // sep.vjc vjc byte
-
- 160, OutWord, "sprmSLnnMin", // sep.lnnMin lnn word
- 161, OutWord, "sprmSPgnStart", // sep.pgnStart pgn word
- 162, OutByte, "sprmSBOrientation", // sep.dmOrientPage dm byte
-
-
- //??
- 163, OutWord, "?SprmSBCustomize 163", //???
-
-
- 164, OutWord, "sprmSXaPage", // sep.xaPage xa word
- 165, OutWord, "sprmSYaPage", // sep.yaPage ya word
- 166, OutWord, "sprmSDxaLeft", // sep.dxaLeft dxa word
- 167, OutWord, "sprmSDxaRight", // sep.dxaRight dxa word
- 168, OutWord, "sprmSDyaTop", // sep.dyaTop dya word
- 169, OutWord, "sprmSDyaBottom", // sep.dyaBottom dya word
-
- 170, OutWord, "sprmSDzaGutter", // sep.dzaGutter dza word
- 171, OutWord, "sprmSDMPaperReq", // sep.dmPaperReq dm word
- 182, OutWord, "sprmTJc", // tap.jc jc word (low order byte is significant)
- 183, OutWord, "sprmTDxaLeft", // tap.rgdxaCenter (see below) dxa word
- 184, OutWord, "sprmTDxaGapHalf", // tap.dxaGapHalf, tap.rgdxaCenter (see below) dxa word
- 185, OutBool, "sprmTFCantSplit", // tap.fCantSplit 1 or 0 byte
- 186, OutBool, "sprmTTableHeader", // tap.fTableHeader 1 or 0 byte
- 187, OutWordsHex, "sprmTTableBorders", // tap.rgbrcTable complex(see below) 12 bytes
- 188, (FnOut)0, "sprmTDefTable10", // tap.rgdxaCenter, tap.rgtc complex (see below) variable length
- 189, OutShort, "sprmTDyaRowHeight", // tap.dyaRowHeight dya word
-
-
- //??
- 190, OutTab190, "sprmTDefTable", // tap.rgtc complex (see below)
-
-
- //??
- 191, OutTab191, "sprmTDefTableShd", // tap.rgshd complex (see below)
-
-
- 192, OutTab192, "sprmTTlp", // tap.tlp TLP 4 bytes
- 193, (FnOut)0, "sprmTSetBrc", // tap.rgtc[].rgbrc complex (see below) 5 bytes
- 194, (FnOut)0, "sprmTInsert", // tap.rgdxaCenter,tap.rgtc complex (see below) 4 bytes
- 195, (FnOut)0, "sprmTDelete", // tap.rgdxaCenter, tap.rgtc complex (see below) word
- 196, (FnOut)0, "sprmTDxaCol", // tap.rgdxaCenter complex (see below) 4 bytes
- 197, (FnOut)0, "sprmTMerge", // tap.fFirstMerged, tap.fMerged complex (see below) word
- 198, (FnOut)0, "sprmTSplit", // tap.fFirstMerged, tap.fMerged complex (see below) word
- 199, (FnOut)0, "sprmTSetBrc10", // tap.rgtc[].rgbrc complex (see below) 5 bytes
-
- 200, (FnOut)0, "sprmTSetShd", // tap.rgshd complex (see below) 4 bytes
-
-
-
- // ab hier Selbstdefinierte Ids
-
- 256, (FnOut)0, "FootNote",
- 257, (FnOut)0, "EndNote",
- 258, (FnOut)0, "??258 selbstdef.",
- 259, (FnOut)0, "??259 selbstdef.",
- 260, (FnOut)0, "Field",
-
-//- neue ab Ver8 ------------------------------------------------------------
-
- 0x4600, OutShort,"sprmPIstd", // pap.istd;istd (style code);short;
- 0xC601, (FnOut)0,"sprmPIstdPermute", // pap.istd;permutation vector (see below);variable length;
- 0x2602, OutByte, "sprmPIncLvl", // pap.istd, pap.lvl;difference between istd of base PAP and istd of PAP to be produced (see below);byte;
- 0x2403, OutByte, "sprmPJc", // pap.jc;jc (justification);byte;
- 0x2404, OutByte, "sprmPFSideBySide", // pap.fSideBySide;0 or 1;byte;
- 0x2405, OutByte, "sprmPFKeep", // pap.fKeep;0 or 1;byte;
- 0x2406, OutByte, "sprmPFKeepFollow", // pap.fKeepFollow;0 or 1;byte;
- 0x2407, OutByte, "sprmPFPageBreakBefore", // pap.fPageBreakBefore;0 or 1;byte;
- 0x2408, OutByte, "sprmPBrcl", // pap.brcl;brcl;byte;
- 0x2409, OutByte, "sprmPBrcp", // pap.brcp;brcp;byte;
- 0x260A, OutByte, "sprmPIlvl", // pap.ilvl;ilvl;byte;
- 0x460B, OutShort, "sprmPIlfo", // pap.ilfo;ilfo (list index) ;short;
- 0x240C, OutByte, "sprmPFNoLineNumb", // pap.fNoLnn;0 or 1;byte;
- 0xC60D, OutTab, "sprmPChgTabsPapx", // pap.itbdMac, pap.rgdxaTab, pap.rgtbd;complex - see below;variable length
- 0x840E, OutWord, "sprmPDxaRight", // pap.dxaRight;dxa;word;
- 0x840F, OutWord, "sprmPDxaLeft", // pap.dxaLeft;dxa;word;
- 0x4610, OutWord, "sprmPNest", // pap.dxaLeft;dxa-see below;word;
- 0x8411, OutWord, "sprmPDxaLeft1", // pap.dxaLeft1;dxa;word;
- 0x6412,OutLongHex,"sprmPDyaLine", // pap.lspd;an LSPD, a long word structure consisting of a short of dyaLine followed by a short of fMultLinespace - see below;long;
- 0xA413, OutWord, "sprmPDyaBefore", // pap.dyaBefore;dya;word;
- 0xA414, OutWord, "sprmPDyaAfter", // pap.dyaAfter;dya;word;
- 0xC615, (FnOut)0,"sprmPChgTabs", // pap.itbdMac, pap.rgdxaTab, pap.rgtbd;complex - see below;variable length;
- 0x2416, OutByte, "sprmPFInTable", // pap.fInTable;0 or 1;byte;
- 0x2417, OutByte, "sprmPFTtp", // pap.fTtp;0 or 1;byte;
- 0x8418, OutWord, "sprmPDxaAbs", // pap.dxaAbs;dxa;word;
- 0x8419, OutWord, "sprmPDyaAbs", // pap.dyaAbs;dya;word;
- 0x841A, OutWord, "sprmPDxaWidth", // pap.dxaWidth;dxa;word;
- 0x261B, OutByte, "sprmPPc", // pap.pcHorz, pap.pcVert;complex - see below;byte;
- 0x461C, OutWord, "sprmPBrcTop10", // pap.brcTop;BRC10;word;
- 0x461D, OutWord, "sprmPBrcLeft10", // pap.brcLeft;BRC10;word;
- 0x461E, OutWord, "sprmPBrcBottom10", // pap.brcBottom;BRC10;word;
- 0x461F, OutWord, "sprmPBrcRight10", // pap.brcRight;BRC10;word;
- 0x4620, OutWord, "sprmPBrcBetween10", // pap.brcBetween;BRC10;word;
- 0x4621, OutWord, "sprmPBrcBar10", // pap.brcBar;BRC10;word;
- 0x4622, OutWord, "sprmPDxaFromText10", // pap.dxaFromText;dxa;word;
- 0x2423, OutByte, "sprmPWr", // pap.wr;wr (see description of PAP for definition;byte;
- 0x6424,OutLongHex,"sprmPBrcTop", // pap.brcTop;BRC;long;
- 0x6425,OutLongHex,"sprmPBrcLeft", // pap.brcLeft;BRC;long;
- 0x6426,OutLongHex,"sprmPBrcBottom", // pap.brcBottom;BRC;long;
- 0x6427,OutLongHex,"sprmPBrcRight", // pap.brcRight;BRC;long;
- 0x6428,OutLongHex,"sprmPBrcBetween", // pap.brcBetween;BRC;long;
- 0x6629,OutLongHex,"sprmPBrcBar", // pap.brcBar;BRC;long;
- 0x242A, OutByte, "sprmPFNoAutoHyph", // pap.fNoAutoHyph;0 or 1;byte;
- 0x442B, OutWord, "sprmPWHeightAbs", // pap.wHeightAbs;w;word;
- 0x442C, OutShort,"sprmPDcs", // pap.dcs;DCS;short;
- 0x442D, OutWord, "sprmPShd", // pap.shd;SHD;word;
- 0x842E, OutWord, "sprmPDyaFromText", // pap.dyaFromText;dya;word;
- 0x842F, OutWord, "sprmPDxaFromText", // pap.dxaFromText;dxa;word;
- 0x2430, OutByte, "sprmPFLocked", // pap.fLocked;0 or 1;byte;
- 0x2431, OutByte, "sprmPFWidowControl", // pap.fWidowControl;0 or 1;byte;
- 0xC632, (FnOut)0,"sprmPRuler", // ;;variable length;
- 0x2433, OutByte, "sprmPFKinsoku", // pap.fKinsoku;0 or 1;byte;
- 0x2434, OutByte, "sprmPFWordWrap", // pap.fWordWrap;0 or 1;byte;
- 0x2435, OutByte, "sprmPFOverflowPunct", // pap.fOverflowPunct;0 or 1;byte;
- 0x2436, OutByte, "sprmPFTopLinePunct", // pap.fTopLinePunct;0 or 1;byte;
- 0x2437, OutByte, "sprmPFAutoSpaceDE", // pap.fAutoSpaceDE;0 or 1;byte;
- 0x2438, OutByte, "sprmPFAutoSpaceDN", // pap.fAutoSpaceDN;0 or 1;byte;
- 0x4439, OutWord, "sprmPWAlignFont", // pap.wAlignFont;iFa (see description of PAP for definition);word;
- 0x443A, OutWord, "sprmPFrameTextFlow", // pap.fVertical pap.fBackward pap.fRotateFont;complex (see description of PAP for definition);word;
- 0x243B, OutByte, "sprmPISnapBaseLine", // obsolete: not applicable in Word97 and later versions;;byte;
- 0xC63E, (FnOut)0,"sprmPAnld", // pap.anld;;variable length;
- 0xC63F, (FnOut)0,"sprmPPropRMark", // pap.fPropRMark;complex (see below);variable length;
- 0x2640, OutByte, "sprmPOutLvl", // pap.lvl;has no effect if pap.istd is < 1 or is > 9;byte;
- 0x2441, OutByte, "sprmPFBiDi", // ;;byte;
- 0x2443, OutBool, "sprmPFNumRMIns", // pap.fNumRMIns;1 or 0;bit;
- 0x2444, OutByte, "sprmPCrLf", // ;;byte;
- 0xC645, (FnOut)0,"sprmPNumRM", // pap.numrm;;variable length;
- 0x6645,OutHugeHex,"sprmPHugePapx", // see below;fc in the data stream to locate the huge grpprl (see below);long;
- 0x6646,OutHugeHex,"sprmPHugePapx", // see below;fc in the data stream to locate the huge grpprl (see below);long;
- 0x2447, OutByte, "sprmPFUsePgsuSettings", // pap.fUsePgsuSettings;1 or 0;byte;
- 0x2448, OutByte, "sprmPFAdjustRight", // pap.fAdjustRight;1 or 0;byte;
- 0x0800, OutBool, "sprmCFRMarkDel", // chp.fRMarkDel;1 or 0;bit;
- 0x0801, OutBool, "sprmCFRMark", // chp.fRMark;1 or 0;bit;
- 0x0802, OutBool, "sprmCFFldVanish", // chp.fFldVanish;1 or 0;bit;
- 0x6A03, OutTab68,"sprmCPicLocation", // chp.fcPic and chp.fSpec;see below;variable length, length recorded is always 4;
- 0x4804, OutShort,"sprmCIbstRMark", // chp.ibstRMark;index into sttbRMark;short;
- 0x6805,OutLongHex,"sprmCDttmRMark", // chp.dttmRMark;DTTM;long;
- 0x0806, OutBool, "sprmCFData", // chp.fData;1 or 0;bit;
- 0x4807, OutShort, "sprmCIdslRMark", // chp.idslRMReason;an index to a table of strings defined in Word 6.0 executables;short;
- 0xEA08, (FnOut)0,"sprmCChs", // chp.fChsDiff and chp.chse;see below;3 bytes;
- 0x6A09, (FnOut)0,"sprmCSymbol", // chp.fSpec, chp.xchSym and chp.ftcSym;see below;variable length, length recorded is always 4;
- 0x080A, OutBool, "sprmCFOle2", // chp.fOle2;1 or 0;bit;
-//0x480B, obsolete,"sprmCIdCharType", // obsolete: not applicable in Word97 and later versions;;;
- 0x2A0C, OutByte, "sprmCHighlight", // chp.fHighlight, chp.icoHighlight;ico (fHighlight is set to 1 iff ico is not 0);byte;
- 0x680E,OutLongHex,"sprmCObjLocation", // chp.fcObj;FC;long;
-//0x2A10, ? ? ? , "sprmCFFtcAsciSymb", // ;;;
- 0x4A30, OutShort, "sprmCIstd", // chp.istd;istd, see stylesheet definition;short;
- 0xCA31, (FnOut)0,"sprmCIstdPermute", // chp.istd;permutation vector (see below);variable length;
- 0x2A32, (FnOut)0,"sprmCDefault", // whole CHP (see below);none;variable length;
- 0x2A33, (FnOut)0,"sprmCPlain", // whole CHP (see below);none; Laenge: 0;
- 0x2A34, OutByte, "sprmCKcd", // ;;;
- 0x0835, OutByte, "sprmCFBold", // chp.fBold;0,1, 128, or 129 (see below);byte;
- 0x0836, OutByte, "sprmCFItalic", // chp.fItalic;0,1, 128, or 129 (see below);byte;
- 0x0837, OutByte, "sprmCFStrike", // chp.fStrike;0,1, 128, or 129 (see below);byte;
- 0x0838, OutByte, "sprmCFOutline", // chp.fOutline;0,1, 128, or 129 (see below);byte;
- 0x0839, OutByte, "sprmCFShadow", // chp.fShadow;0,1, 128, or 129 (see below);byte;
- 0x083A, OutByte, "sprmCFSmallCaps", // chp.fSmallCaps;0,1, 128, or 129 (see below);byte;
- 0x083B, OutByte, "sprmCFCaps", // chp.fCaps;0,1, 128, or 129 (see below);byte;
- 0x083C, OutByte, "sprmCFVanish", // chp.fVanish;0,1, 128, or 129 (see below);byte;
- 0x4A3D, OutWord, "sprmCFtcDefault", // ;ftc, only used internally, never stored in file;word;
- 0x2A3E, OutByte, "sprmCKul", // chp.kul;kul;byte;
- 0xEA3F, (FnOut)0,"sprmCSizePos", // chp.hps, chp.hpsPos;(see below);3 bytes;
- 0x8840, OutWord, "sprmCDxaSpace", // chp.dxaSpace;dxa;word;
- 0x4A41, OutWord, "sprmCLid", // ;only used internally never stored;word;
- 0x2A42, OutByte, "sprmCIco", // chp.ico;ico;byte;
- 0x4A43, OutWord, "sprmCHps", // chp.hps;hps;word;
- 0x2A44, OutByte, "sprmCHpsInc", // chp.hps;(see below);byte;
- 0x4845, OutByte, "sprmCHpsPos", // chp.hpsPos;hps;byte;
- 0x2A46, OutByte, "sprmCHpsPosAdj", // chp.hpsPos;hps (see below);byte;
- 0xCA47, (FnOut)0,"sprmCMajority", // chp.fBold, chp.fItalic, chp.fSmallCaps, chp.fVanish, chp.fStrike, chp.fCaps, chp.rgftc, chp.hps, chp.hpsPos, chp.kul, chp.dxaSpace, chp.ico, chp.rglid;complex (see below);variable length, length byte plus size of following grpprl;
- 0x2A48, OutByte, "sprmCIss", // chp.iss;iss;byte;
- 0xCA49, (FnOut)0,"sprmCHpsNew50", // chp.hps;hps;variable width, length always recorded as 2;
- 0xCA4A, (FnOut)0,"sprmCHpsInc1", // chp.hps;complex (see below);variable width, length always recorded as 2;
- 0x484B, OutShort,"sprmCHpsKern", // chp.hpsKern;hps;short;
- 0xCA4C, (FnOut)0,"sprmCMajority50", // chp.fBold, chp.fItalic, chp.fSmallCaps, chp.fVanish, chp.fStrike, chp.fCaps, chp.ftc, chp.hps, chp.hpsPos, chp.kul, chp.dxaSpace, chp.ico,;complex (see below);variable length;
- 0x4A4D, OutShort,"sprmCHpsMul", // chp.hps;percentage to grow hps;short;
- 0x484E, OutShort,"sprmCYsri", // chp.ysri;ysri;short;
- 0x4A4F, OutShort,"sprmCRgFtc0", // chp.rgftc[0];ftc for ASCII text (see below);short;
- 0x4A50, OutShort,"sprmCRgFtc1", // chp.rgftc[1];ftc for Far East text (see below);short;
- 0x4A51, OutShort,"sprmCRgFtc2", // chp.rgftc[2];ftc for non-Far East text (see below);short;
-//0x4852, ? ? ? , "sprmCCharScale", // ;;;
- 0x2A53, OutByte, "sprmCFDStrike", // chp.fDStrike;;byte;
- 0x0854, OutBool, "sprmCFImprint", // chp.fImprint;1 or 0;bit;
- 0x0855, OutBool, "sprmCFSpec", // chp.fSpec ;1 or 0;bit;
- 0x0856, OutBool, "sprmCFObj", // chp.fObj;1 or 0;bit;
- 0xCA57, (FnOut)0,"sprmCPropRMark", // chp.fPropRMark, chp.ibstPropRMark, chp.dttmPropRMark;Complex (see below);variable length always recorded as 7 bytes;
- 0x0858, OutBool, "sprmCFEmboss", // chp.fEmboss;1 or 0;bit;
- 0x2859, OutByte, "sprmCSfxText", // chp.sfxtText;text animation;byte;
-//0x085A, ? ? ? , "sprmCFBiDi", // ;;;
-//0x085B, ? ? ? , "sprmCFDiacColor", // ;;;
-//0x085C, ? ? ? , "sprmCFBoldBi", // ;;;
-//0x085D, ? ? ? , "sprmCFItalicBi", // ;;;
- 0x4A5E, OutWord, "sprmCFtcBi", // ;;;
- 0x485F, OutWord, "sprmCLidBi", // ;;;
-//0x4A60, ? ? ? , "sprmCIcoBi", // ;;;
- 0x4A61, OutWord, "sprmCHpsBi", // ;;;
- 0xCA62, (FnOut)0,"sprmCDispFldRMark", // chp.fDispFldRMark, chp.ibstDispFldRMark, chp.dttmDispFldRMark ;Complex (see below);variable length always recorded as 39 bytes;
- 0x4863, OutShort,"sprmCIbstRMarkDel", // chp.ibstRMarkDel;index into sttbRMark;short;
- 0x6864,OutLongHex,"sprmCDttmRMarkDel", // chp.dttmRMarkDel;DTTM;long;
- 0x6865,OutLongHex,"sprmCBrc", // chp.brc;BRC;long;
- 0x4866, OutShort,"sprmCShd", // chp.shd;SHD;short;
- 0x4867, OutShort,"sprmCIdslRMarkDel", // chp.idslRMReasonDel;an index to a table of strings defined in Word 6.0 executables;short;
- 0x0868, OutBool, "sprmCFUsePgsuSettings", // chp.fUsePgsuSettings;1 or 0;bit;
- 0x486B, OutWord, "sprmCCpg", // ;;word;
- 0x486D, OutWord, "sprmCRgLid0", // chp.rglid[0];LID: for non-Far East text;word;
- 0x486E, OutWord, "sprmCRgLid1", // chp.rglid[1];LID: for Far East text;word;
- 0x286F, OutByte, "sprmCIdctHint", // chp.idctHint;IDCT: (see below);byte;
- 0x2E00, OutByte, "sprmPicBrcl", // pic.brcl;brcl (see PIC structure definition);byte;
- 0xCE01, (FnOut)0,"sprmPicScale", // pic.mx, pic.my, pic.dxaCropleft, pic.dyaCropTop pic.dxaCropRight, pic.dyaCropBottom;Complex (see below);length byte plus 12 bytes;
- 0x6C02,OutLongHex,"sprmPicBrcTop", // pic.brcTop;BRC;long;
- 0x6C03,OutLongHex,"sprmPicBrcLeft", // pic.brcLeft;BRC;long;
- 0x6C04,OutLongHex,"sprmPicBrcBottom", // pic.brcBottom;BRC;long;
- 0x6C05,OutLongHex,"sprmPicBrcRight", // pic.brcRight;BRC;long;
- 0x3000, OutByte, "sprmScnsPgn", // sep.cnsPgn;cns;byte;
- 0x3001, OutByte, "sprmSiHeadingPgn", // sep.iHeadingPgn;heading number level;byte;
- 0xD202, (FnOut)0,"sprmSOlstAnm", // sep.olstAnm;OLST;variable length;
- 0xF203, (FnOut)0,"sprmSDxaColWidth", // sep.rgdxaColWidthSpacing;complex (see below);3 bytes;
- 0xF204, (FnOut)0,"sprmSDxaColSpacing", // sep.rgdxaColWidthSpacing;complex (see below);3 bytes;
- 0x3005, OutByte, "sprmSFEvenlySpaced", // sep.fEvenlySpaced;1 or 0;byte;
- 0x3006, OutByte, "sprmSFProtected", // sep.fUnlocked;1 or 0;byte;
- 0x5007, OutWord, "sprmSDmBinFirst", // sep.dmBinFirst;;word;
- 0x5008, OutWord, "sprmSDmBinOther", // sep.dmBinOther;;word;
- 0x3009, OutByte, "sprmSBkc", // sep.bkc;bkc;byte;
- 0x300A, OutByte, "sprmSFTitlePage", // sep.fTitlePage;0 or 1;byte;
- 0x500B, OutWord, "sprmSCcolumns", // sep.ccolM1;# of cols - 1;word;
- 0x900C, OutWord, "sprmSDxaColumns", // sep.dxaColumns;dxa;word;
- 0x300D, OutByte, "sprmSFAutoPgn", // sep.fAutoPgn;obsolete;byte;
- 0x300E, OutByte, "sprmSNfcPgn", // sep.nfcPgn;nfc;byte;
- 0xB00F, OutShort,"sprmSDyaPgn", // sep.dyaPgn;dya;short;
- 0xB010, OutShort,"sprmSDxaPgn", // sep.dxaPgn;dya;short;
- 0x3011, OutByte, "sprmSFPgnRestart", // sep.fPgnRestart;0 or 1;byte;
- 0x3012, OutByte, "sprmSFEndnote", // sep.fEndnote;0 or 1;byte;
- 0x3013, OutByte, "sprmSLnc", // sep.lnc;lnc;byte;
- 0x3014, OutByte, "sprmSGprfIhdt", // sep.grpfIhdt;grpfihdt (see Headers and Footers topic);byte;
- 0x5015, OutWord, "sprmSNLnnMod", // sep.nLnnMod;non-neg int.;word;
- 0x9016, OutWord, "sprmSDxaLnn", // sep.dxaLnn;dxa;word;
- 0xB017, OutWord, "sprmSDyaHdrTop", // sep.dyaHdrTop;dya;word;
- 0xB018, OutWord, "sprmSDyaHdrBottom", // sep.dyaHdrBottom;dya;word;
- 0x3019, OutByte, "sprmSLBetween", // sep.fLBetween;0 or 1;byte;
- 0x301A, OutByte, "sprmSVjc", // sep.vjc;vjc;byte;
- 0x501B, OutWord, "sprmSLnnMin", // sep.lnnMin;lnn;word;
- 0x501C, OutWord, "sprmSPgnStart", // sep.pgnStart;pgn;word;
- 0x301D, OutByte, "sprmSBOrientation", // sep.dmOrientPage;dm;byte;
-//0x301E, ? ? ? , "sprmSBCustomize", // ;;;
- 0xB01F, OutWord, "sprmSXaPage", // sep.xaPage;xa;word;
- 0xB020, OutWord, "sprmSYaPage", // sep.yaPage;ya;word;
- 0xB021, OutWord, "sprmSDxaLeft", // sep.dxaLeft;dxa;word;
- 0xB022, OutWord, "sprmSDxaRight", // sep.dxaRight;dxa;word;
- 0x9023, OutWord, "sprmSDyaTop", // sep.dyaTop;dya;word;
- 0x9024, OutWord, "sprmSDyaBottom", // sep.dyaBottom;dya;word;
- 0xB025, OutWord, "sprmSDzaGutter", // sep.dzaGutter;dza;word;
- 0x5026, OutWord, "sprmSDmPaperReq", // sep.dmPaperReq;dm;word;
- 0xD227, (FnOut)0,"sprmSPropRMark", // sep.fPropRMark, sep.ibstPropRMark, sep.dttmPropRMark ;complex (see below);variable length always recorded as 7 bytes;
-//0x3228, ? ? ? , "sprmSFBiDi", // ;;;
-//0x3229, ? ? ? , "sprmSFFacingCol", // ;;;
-//0x322A, ? ? ? , "sprmSFRTLGutter", // ;;;
- 0x702B,OutLongHex,"sprmSBrcTop", // sep.brcTop;BRC;long;
- 0x702C,OutLongHex,"sprmSBrcLeft", // sep.brcLeft;BRC;long;
- 0x702D,OutLongHex,"sprmSBrcBottom", // sep.brcBottom;BRC;long;
- 0x702E,OutLongHex,"sprmSBrcRight", // sep.brcRight;BRC;long;
- 0x522F, OutWord, "sprmSPgbProp", // sep.pgbProp;;word;
- 0x7030,OutLongHex,"sprmSDxtCharSpace", // sep.dxtCharSpace;dxt;long;
- 0x9031,OutLongHex,"sprmSDyaLinePitch", // sep.dyaLinePitch;dya;long;
-//0x5032, ? ? ? , "sprmSClm", // ;;;
- 0x5033, OutShort,"sprmSTextFlow", // sep.wTextFlow;complex (see below);short;
- 0x5400, OutWord, "sprmTJc", // tap.jc;jc;word (low order byte is significant);
- 0x9601, OutWord, "sprmTDxaLeft", // tap.rgdxaCenter (see below);dxa;word;
- 0x9602, OutWord, "sprmTDxaGapHalf", // tap.dxaGapHalf, tap.rgdxaCenter (see below);dxa;word;
- 0x3403, OutByte, "sprmTFCantSplit", // tap.fCantSplit;1 or 0;byte;
- 0x3404, OutByte, "sprmTTableHeader", // tap.fTableHeader;1 or 0;byte;
- 0xD605, (FnOut)0,"sprmTTableBorders", // tap.rgbrcTable;complex(see below);24 bytes;
- 0xD606, (FnOut)0,"sprmTDefTable10", // tap.rgdxaCenter, tap.rgtc;complex (see below);variable length;
- 0x9407, OutShort, "sprmTDyaRowHeight", // tap.dyaRowHeight;dya;word;
- 0xD608, OutTabD608,"sprmTDefTable", // tap.rgtc;complex (see below);;
- 0xD609, OutTabD609,"sprmTDefTableShd", // tap.rgshd;complex (see below);;
- 0x740A, (FnOut)0,"sprmTTlp", // tap.tlp;TLP;4 bytes;
-//0x560B, ? ? ? , "sprmTFBiDi", // ;;;
-//0x740C, ? ? ? , "sprmTHTMLProps", // ;;;
- 0xD620, (FnOut)0,"sprmTSetBrc", // tap.rgtc[].rgbrc;complex (see below);5 bytes;
- 0x7621, (FnOut)0,"sprmTInsert", // tap.rgdxaCenter, tap.rgtc;complex (see below);4 bytes;
- 0x5622, OutWord, "sprmTDelete", // tap.rgdxaCenter, tap.rgtc;complex (see below);word;
- 0x7623, (FnOut)0,"sprmTDxaCol", // tap.rgdxaCenter;complex (see below);4 bytes;
- 0x5624, OutWord, "sprmTMerge", // tap.fFirstMerged, tap.fMerged;complex (see below);word;
- 0x5625, OutWord, "sprmTSplit", // tap.fFirstMerged, tap.fMerged;complex (see below);word;
- 0xD626, (FnOut)0,"sprmTSetBrc10", // tap.rgtc[].rgbrc;complex (see below);5 bytes;
- 0x7627, (FnOut)0,"sprmTSetShd", // tap.rgshd;complex (see below);4 bytes;
- 0x7628, (FnOut)0,"sprmTSetShdOdd", // tap.rgshd;complex (see below);4 bytes;
- 0x7629, OutWord, "sprmTTextFlow", // tap.rgtc[].fVerticaltap.rgtc[].fBackwardtap.rgtc[].fRotateFont;0 or 10 or 10 or 1;word;
-//0xD62A, ? ? ? , "sprmTDiagLine", // ;;;
- 0xD62B, (FnOut)0,"sprmTVertMerge", // tap.rgtc[].vertMerge;complex (see below);variable length always recorded as 2 bytes;
- 0xD62C, (FnOut)0,"sprmTVertAlign", // tap.rgtc[].vertAlign;complex (see below);variable length always recorded as 3 byte;
-
- 0x4873, OutWord, "sprm?? CJK ??", // CJK-Unknown
- 0x4874, OutWord, "sprm?? CJK ??", // CJK-Unknown
-
-};
-
-
-static int
-#if defined( WNT )
- __cdecl
-#endif
-#if defined( ICC )
- _Optlink
-#endif
- CompSprmDumpId( const void *pFirst, const void *pSecond)
-{
- return( ((SprmDumpInfo*)pFirst )->nId - ((SprmDumpInfo*)pSecond)->nId );
-}
-
-
-SprmDumpInfo& WW8GetSprmDumpInfo( sal_uInt16 nId )
-{
- // ggfs. Tab sortieren
- static sal_Bool bInit = sal_False;
- if( !bInit )
- {
- qsort( (void*)aSprmDumpTab,
- sizeof( aSprmDumpTab ) / sizeof (aSprmDumpTab[ 0 ]),
- sizeof( aSprmDumpTab[ 0 ] ),
- CompSprmDumpId );
- bInit = sal_True;
- }
- // Sprm heraussuchen
- void* pFound;
- SprmDumpInfo aSrch;
- aSrch.nId = nId;
- if( 0 == ( pFound = bsearch( (char *) &aSrch,
- (void*) aSprmDumpTab,
- sizeof( aSprmDumpTab ) / sizeof (aSprmDumpTab[ 0 ]),
- sizeof( aSprmDumpTab[ 0 ] ),
- CompSprmDumpId )))
- {
- // im Fehlerfall auf Nulltes Element verweisen
- pFound = (void*)aSprmDumpTab;
- }
- return *(SprmDumpInfo*) pFound;
-}
-
-
-
-
diff --git a/sw/source/filter/ww8/dump/ww8darr.hxx b/sw/source/filter/ww8/dump/ww8darr.hxx
deleted file mode 100644
index ee63df9cf99c..000000000000
--- a/sw/source/filter/ww8/dump/ww8darr.hxx
+++ /dev/null
@@ -1,43 +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 _WW8DARR_HXX
-#define _WW8DARR_HXX
-
-typedef void (*FnOut)( SvStream& rSt, short );
-
-struct SprmDumpInfo
-{
- sal_uInt16 nId;
- FnOut pOutFnc;
- char* pName;
-};
-
-SprmDumpInfo& WW8GetSprmDumpInfo( sal_uInt16 nId );
-
-
-#endif
diff --git a/sw/source/filter/ww8/dump/ww8dout.cxx b/sw/source/filter/ww8/dump/ww8dout.cxx
deleted file mode 100644
index 5b4c2aa0f50a..000000000000
--- a/sw/source/filter/ww8/dump/ww8dout.cxx
+++ /dev/null
@@ -1,419 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sw.hxx"
-
-#include <stdio.h> // getchar
-
-//#include "defs.hxx"
-#include <tools/solar.h> // sal_uInt8
-//#include "wwscan.hxx" // aWwStor
-#include "ww8dout.hxx"
-#include <tools/stream.hxx>
-
-#include <sot/storage.hxx>
-
-extern SvStorageStreamRef xStrm;
-extern SvStorageStreamRef xTableStream;
-extern SvStorageStreamRef xDataStream; // ist bei Ver6-7 mit xStrm identisch,
-void DumpSprms( sal_uInt8 nVersion, SvStream& rSt, short nLen );
-
-ostream* pOut = 0;
-
-#define DumpVer8
-
-//-----------------------------------------
-// Streams
-//-----------------------------------------
-
-
-static int level = 0;
-static long lastpos = -1;
-
-ostream& __cdecl endl1( ostream& s ){
-//ostream& endl1( ostream& s ) {
- s << endl;
- return s;
-}
-
-ostream& __cdecl hex2( ostream& s ) {
- s.width( 2 ); s.fill( (const char)250 );
- s << hex;
- return s;
-}
-
-ostream& __cdecl hex4( ostream& s ) {
- s.width( 4 ); s.fill( (const char)250 );
- s << hex ;
- return s;
-}
-
-ostream& __cdecl hex6( ostream& s ) {
- s.width( 6 ); s.fill( (const char)250 );
- s << hex ;
- return s;
-}
-
-ostream& __cdecl hex8( ostream& s ) {
- s.width( 8 ); s.fill( (const char)250 );
- s << hex ;
- return s;
-}
-
-ostream& __cdecl dec2( ostream& s ) {
- s << dec;
- s.width( 0 ); s.fill( 0 );
- return s;
-}
-
-ostream& __cdecl filepos( ostream& s, SvStream& rSt ) {
- long pos = rSt.Tell();
-
- if ( pos != lastpos ){
-#ifndef DumpVer8
- if( &rSt == &xStrm )
- s << "D";
- else
- s << "T";
-#endif
- s.width( 6 );
- s.fill( (const char)250 );
- s << hex << pos << dec << ' ';
- s.width( 0 ); s.fill( 0 );
- lastpos = pos;
- }else{
-#ifndef DumpVer8
- s << " ";
-#else
- s << " ";
-#endif
- }
- return s;
-}
-
-ostream& __cdecl indent( ostream& s, SvStream& rSt ) {
- filepos( s, rSt );
- for( int i = 0; i < level; i++ ) s << " ";
- return s;
-}
-
-ostream& __cdecl indent1( ostream& s ) {
- for( int i = 0; i < level; i++ ) s << " ";
- return s;
-}
-
-ostream& __cdecl indent2( ostream& s ) {
-#ifndef DumpVer8
- s << " " << indent1;
-#else
- s << " " << indent1;
-#endif
- return s;
-}
-
-ostream& __cdecl begin( ostream& s, SvStream& rSt ) { indent( s, rSt ) << "BEGIN "; level++; return s; }
-
-// begin1 ohne indent
-ostream& __cdecl begin1( ostream& s ) { s << "BEGIN "; level++; return s; }
-
-// begin2 ohne Nummer
-ostream& __cdecl begin2( ostream& s ) { s << indent2 << "BEGIN "; level++; return s; }
-
-ostream& __cdecl end( ostream& s, SvStream& rSt ) { level--; return indent( s, rSt ) << "END "; }
-
-// end1 ohne filepos
-ostream& __cdecl end1( ostream& s ) { level--; return s << indent1 << "END "; }
-
-// end2 ohne Nummer
-ostream& __cdecl end2( ostream& s ) { level--; return s << indent2 << "END "; }
-
-//-----------------------------------------
-// Ausgabe-Funktionen
-//-----------------------------------------
-
-void OutBool( SvStream& rSt, short )
-{
- sal_uInt8 nPara;
-
- rSt.Read( &nPara, sizeof( nPara ) );
- switch( nPara ){
- case 0: *pOut << "F"; break;
- case 1: *pOut << "T"; break;
- default: *pOut << "ERROR:" << (sal_uInt16)nPara; break;
- }
-}
-
-void OutBool4( SvStream& rSt, short )
-{
- sal_uInt8 nPara;
-
- rSt.Read( &nPara, sizeof( nPara ) );
- switch( nPara ){
- case 0: *pOut << "F"; break;
- case 1: *pOut << "T"; break;
- case 128: *pOut << "==Style"; break;
- case 129: *pOut << "!=Style"; break;
- default: *pOut << "ERROR:" << (sal_uInt16)nPara; break;
- }
-}
-
-void OutByte( SvStream& rSt, short )
-{
- sal_uInt8 nPara;
-
- rSt.Read( &nPara, sizeof( nPara ) );
- *pOut << (sal_uInt16)nPara;
-}
-
-void OutShort( SvStream& rSt, short )
-{
- short nPara;
-
- rSt.Read( &nPara, sizeof( nPara ) );
- *pOut << nPara;
-}
-
-void OutShorts( SvStream& rSt, short nLen )
-{
- sal_Int16 nPara;
-
- for( short i = 0; i < nLen / 2; i++ ){
- rSt.Read( &nPara, sizeof( nPara ) );
- *pOut << nPara << ' ';
- }
-}
-
-void OutWord( SvStream& rSt, short )
-{
- sal_uInt16 nPara;
-
- rSt.Read( &nPara, sizeof( nPara ) );
- *pOut << nPara;
-}
-
-void OutWords( SvStream& rSt, short nLen )
-{
- sal_uInt16 nPara;
-
- for( short i = 0; i < nLen / 2; i++ ){
- rSt.Read( &nPara, sizeof( nPara ) );
- *pOut << nPara;
- }
-}
-
-void OutWordHex( SvStream& rSt, short )
-{
- sal_uInt16 nPara;
-
- rSt.Read( &nPara, sizeof( nPara ) );
- *pOut << "0x" << hex4 << nPara << dec;
-}
-
-void OutWordsHex( SvStream& rSt, short nLen )
-{
- sal_uInt16 nPara;
- nLen /= sizeof( nPara );
- for( short i = 0; i < nLen; i++ ){
- rSt.Read( &nPara, sizeof( nPara ) );
- *pOut << "0x" << hex4 << nPara << dec;
- if( i < nLen - 1 )
- *pOut << ' ';
- }
-}
-
-void OutLongsHex( SvStream& rSt, short nLen )
-{
- long nPara;
- nLen /= sizeof( nPara );
- for( short i = 0; i < nLen; i++ )
- {
- rSt.Read( &nPara, sizeof( nPara ) );
- *pOut << "0x" << hex8 << nPara << dec;
- if( i < nLen - 1 )
- *pOut << ' ';
- }
-}
-
-void OutLongHex( SvStream& rSt, short )
-{
- sal_uLong nPara;
-
- rSt.Read( &nPara, sizeof( nPara ) );
- *pOut << "0x" << hex8 << nPara << dec;
-}
-
-void OutTab68( SvStream& rSt, short )
-{
- sal_uLong nPara;
-
- rSt.Read( &nPara, sizeof( nPara ) );
- if( nPara == 0 )
- *pOut << "None";
- else
- *pOut << "0x" << hex8 << nPara << dec;
-}
-
-
-void OutTab( SvStream& rSt, short )
-{
- sal_uInt8 nDel, nIns, nType;
- short nPos, i;
-
- rSt.Read( &nDel, sizeof( nDel ) );
- *pOut << "Del " << (sal_uInt16)nDel;
- if ( nDel ) *pOut << ": ";
- else *pOut << ", ";
-
- for( i=1; i<=nDel; i++){
- rSt.Read( &nPos, sizeof( nPos ) );
- *pOut << nPos;
- if( i<nDel ) *pOut << ',';
- else *pOut << ' ';
- }
- rSt.Read( &nIns, sizeof( nIns ) );
- *pOut << "Ins " << (sal_uInt16)nIns;
- if ( nIns ) *pOut << ": ";
-
- for( i=1; i<=nIns; i++){
- rSt.Read( &nPos, sizeof( nPos ) );
- *pOut << nPos;
- if( i<nIns ) *pOut << ',';
- else *pOut << ' ';
- }
- if ( nIns ) *pOut << "Typ: ";
-
- for( i=1; i<=nIns; i++){
- rSt.Read( &nType, sizeof( nType ) );
- *pOut << (sal_uInt16)nType;
- if( i<nIns ) *pOut << ',';
- else *pOut << ' ';
- }
-
-// nSiz = 1 + 2 * nDel + 1 + nIns * 3; // genaue Laenge,
-// stimmt auch bei Laenge > 256
-// bei diesem Tab-Befehl anscheinend nicht noetig
-}
-
-void OutTab190( SvStream& rSt, short nLen )
-{
- sal_uInt8 nCols;
- rSt.Read( &nCols, sizeof( nCols ) );
- *pOut << (sal_uInt16)nCols << " Cols: ";
-
- short nPos, i;
- for( i = 0; i <= nCols; i++ ){
- rSt.Read( &nPos, sizeof( nPos ) );
- *pOut << nPos;
- if( i < nCols )
- *pOut << ", ";
- }
- *pOut << dec << "; ";
- for( i = 0; i < nCols; i++ ){
- *pOut << "Col " << i << " TC: ";
- OutWordsHex( rSt, 10 );
- if( i < nCols - 1 )
- *pOut << "; ";
- }
-}
-
-void OutTab191( SvStream& rSt, short nLen )
-{
- sal_uInt8 nCols;
- rSt.Read( &nCols, sizeof( nCols ) );
- *pOut << (sal_uInt16)nCols << " Cols, SHDs: ";
- OutWordsHex( rSt, ( nCols + 1 ) * 2 );
-}
-
-void OutTab192( SvStream& rSt, short )
-{
- OutWord( rSt, 0 );
- OutWordHex( rSt, 0 );
-}
-
-void OutHugeHex( SvStream& rSt, short nLen )
-{
- long nPos;
- rSt.Read( &nPos, sizeof( nPos ) );
-
- long nCurr = xDataStream->Tell();
- xDataStream->Seek( nPos );
-
- xDataStream->Read( &nLen, sizeof( nLen ) );
-
-// *pOut << ", Len max: " << nLen << ", ID:" << nIStd << endl1;
- *pOut << endl1;
- DumpSprms( 8, *xDataStream, nLen );
-
- xDataStream->Seek( nCurr );
-}
-
-void OutTabD608( SvStream& rSt, short nLen )
-{
- sal_uInt8 nHi, nCols;
- rSt.Read( &nHi, sizeof( nHi ) );
-// nLen += ((short)nHi) << 8;
-
- rSt.Read( &nCols, sizeof( nCols ) );
- *pOut << " Cols: " << (short)nCols << ' ' << endl1 << indent2;
-
- short nPos, i;
- for( i = 0; i <= nCols; ++i )
- {
- rSt.Read( &nPos, sizeof( nPos ) );
- *pOut << nPos;
- if( i < nCols )
- *pOut << ", ";
- }
- nLen -= ( nCols + 1 ) * 2;
- nLen /= 20;
-
- for( i = 0; i < nLen; ++i )
- {
- *pOut << endl1 << indent2 << "Col " << i << " TC: ";
- OutLongsHex( rSt, 20 );
- if( i < nLen - 1 )
- *pOut << "; ";
- }
-}
-
-void OutTabD609( SvStream& rSt, short nLen )
-{
- *pOut << " Brush(FBS): ";
- for( short i = 0; i < nLen / 2; ++i )
- {
- sal_uInt16 nVal;
- rSt.Read( &nVal, sizeof( nVal ) );
- *pOut << (nVal & 0x1f);
- *pOut << "|" << ((nVal >> 5) & 0x1f);
- *pOut << "|" << ((nVal >> 10) & 0x3f);
- if( i < nLen )
- *pOut << ", ";
- }
-}
-
-
diff --git a/sw/source/filter/ww8/dump/ww8dout.hxx b/sw/source/filter/ww8/dump/ww8dout.hxx
deleted file mode 100644
index ac301c0e62bf..000000000000
--- a/sw/source/filter/ww8/dump/ww8dout.hxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _WW8DOUT_HXX
-#define _WW8DOUT_HXX
-
-#ifndef INC_FSTREAM
- #include <fstream.h> // ostream
-#endif
-#ifndef SOLAR_H
- #include <tools/solar.h> // sal_uInt8
-#endif
-
-class SvStream;
-
-void OutByte( SvStream& rSt, short nLen );
-void OutBool( SvStream& rSt, short nLen );
-void OutShort( SvStream& rSt, short );
-void OutShorts( SvStream& rSt, short nLen );
-void OutWord( SvStream& rSt, short );
-void OutWords( SvStream& rSt, short nLen );
-void OutWordHex( SvStream& rSt, short );
-void OutWordsHex( SvStream& rSt, short );
-void OutLongHex( SvStream& rSt, short );
-void OutLongsHex( SvStream& rSt, short nLen );
-void OutTab( SvStream& rSt, short nLen );
-void OutTab68( SvStream& rSt, short nLen );
-void OutTab190( SvStream& rSt, short nLen );
-void OutTab191( SvStream& rSt, short nLen );
-void OutTab192( SvStream& rSt, short nLen );
-void OutBool4( SvStream& rSt, short nLen );
-void OutHugeHex( SvStream& rSt, short nLen );
-void OutTabD608( SvStream& rSt, short nLen );
-void OutTabD609( SvStream& rSt, short nLen );
-
-
-// unter WNTMSCI4 muss das __cdecl sein, damit nicht nur der Fkt-Pointer
-// ausgegeben wird....
-
-ostream& __cdecl filepos( ostream& s, SvStream& rSt );
-
-ostream& __cdecl endl1( ostream& s );
-ostream& __cdecl indent( ostream& s, SvStream& rSt );
-ostream& __cdecl indent1( ostream& s );
-ostream& __cdecl indent2( ostream& s );
-ostream& __cdecl hex2( ostream& s );
-ostream& __cdecl hex4( ostream& s );
-ostream& __cdecl hex6( ostream& s );
-ostream& __cdecl hex8( ostream& s );
-ostream& __cdecl dec2( ostream& s );
-
-ostream& __cdecl begin( ostream& s, SvStream& rSt );
-ostream& __cdecl begin1( ostream& s );
-ostream& __cdecl begin2( ostream& s );
-ostream& __cdecl end( ostream& s, SvStream& rSt );
-ostream& __cdecl end1( ostream& s );
-ostream& __cdecl end2( ostream& s );
-
-extern ostream* pOut;
-
-
-#endif
diff --git a/sw/source/filter/ww8/dump/ww8scan.cxx b/sw/source/filter/ww8/dump/ww8scan.cxx
deleted file mode 100644
index b099ea590022..000000000000
--- a/sw/source/filter/ww8/dump/ww8scan.cxx
+++ /dev/null
@@ -1,6667 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sw.hxx"
-
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
-
-#include <algorithm>
-#include <functional>
-
-#include <string.h> // memset()
-#include <osl/endian.h>
-#include <rtl/tencinfo.h>
-
-#ifdef DUMP
-
-#define ERR_SWG_READ_ERROR 1234
-#define ASSERT( a, b )
-
-#else // dump
-#include <swerror.h> // ERR_WW6_...
-#include <errhdl.hxx> // ASSERT()
-#include <swtypes.hxx> // DELETEZ
-
-#endif // dump
-#include <tools/debug.hxx>
-#include "ww8scan.hxx"
-
-#define ASSERT_RET_ON_FAIL( aCon, aError, aRet ) \
- ASSERT(aCon, aError); \
- if (!(aCon)) \
- return aRet;
-
-//-begin
-namespace SL
-{
-# define IMPLCONSTSTRINGARRAY(X) const char a##X[] = "" #X ""
- IMPLCONSTSTRINGARRAY(ObjectPool);
- IMPLCONSTSTRINGARRAY(1Table);
- IMPLCONSTSTRINGARRAY(0Table);
- IMPLCONSTSTRINGARRAY(Data);
- IMPLCONSTSTRINGARRAY(CheckBox);
- IMPLCONSTSTRINGARRAY(TextBox);
- IMPLCONSTSTRINGARRAY(TextField);
- IMPLCONSTSTRINGARRAY(MSMacroCmds);
-}
-
-template<class C> bool wwString<C>::TestBeltAndBraces(const SvStream& rStrm)
-{
- bool bRet = false;
- sal_uInt32 nOldPos = rStrm.Tell();
- SvStream &rMutableStrm = const_cast<SvStream &>(rStrm);
- sal_uInt32 nLen = rMutableStrm.Seek(STREAM_SEEK_TO_END);
- rMutableStrm.Seek(nOldPos);
- C nBelt;
- rMutableStrm >> nBelt;
- nBelt *= sizeof(C);
- if (nOldPos + sizeof(C) + nBelt + sizeof(C) <= nLen &&
- !rStrm.GetError() && !rStrm.IsEof())
- {
- rMutableStrm.SeekRel(nBelt);
- if (!rStrm.GetError())
- {
- C cBraces;
- rMutableStrm >> cBraces;
- if (!rMutableStrm.GetError() && cBraces == 0)
- bRet = true;
- }
- }
- rMutableStrm.Seek(nOldPos);
- return bRet;
-}
-
-template<class C> class wwSortedArray
-{
-private:
- //The array e.g. of sprms.
- C *mpWwSprmTab;
- size_t mnNoElems;
-public:
- wwSortedArray(C *pWwSprmTab, size_t nNoElems)
- : mpWwSprmTab(pWwSprmTab), mnNoElems(nNoElems)
- {
- ASSERT(mnNoElems && pWwSprmTab, "WW8: empty Array: Don't do that");
- std::sort(mpWwSprmTab, mpWwSprmTab + mnNoElems);
-#ifdef DEBUG
- bool bBroken=false;
- rtl::OUString sError;
- const C *pIter = mpWwSprmTab;
- const C *pBeforeEnd = mpWwSprmTab + mnNoElems - 1;
- while (pIter < pBeforeEnd)
- {
- if (*pIter == *(pIter+1))
- {
- if (!bBroken)
- {
- sError = rtl::OUString::createFromAscii(
- "WW8: Duplicate in list, almost certainly don't want that!\n"
- "(You will not see this message again unless you restart)\n"
- "Extra entries are...\n");
- bBroken=true;
- }
-
- size_t nSize = sizeof(C);
- const sal_uInt8 *pHack =
- reinterpret_cast<const sal_uInt8 *>(&(*pIter));
- for (size_t i=0; i < nSize; ++i)
- {
- sError += rtl::OUString::valueOf(
- static_cast<sal_Int32>(pHack[i]), 16);
- sError += rtl::OUString::valueOf(sal_Unicode(' '));
- }
- sError += rtl::OUString::valueOf(sal_Unicode('\n'));
- while (*pIter == *(pIter+1) && pIter < pBeforeEnd)
- ++pIter;
- }
- else
- ++pIter;
- }
- if (bBroken)
- DbgError(rtl::OUStringToOString(sError, RTL_TEXTENCODING_ASCII_US));
-#endif
- }
-
- //Find an entry, return its address if found and 0 if not
- const C *search(C aSrch) const;
-};
-
-template<class C> const C *wwSortedArray<C>::search(C aSrch) const
-{
- std::pair<C *, C *> aPair =
- std::equal_range(mpWwSprmTab, mpWwSprmTab + mnNoElems, aSrch);
- if (aPair.first != aPair.second)
- return aPair.first;
- else
- return 0;
-}
-
-bool operator==(const SprmInfo &rFirst, const SprmInfo &rSecond)
-{
- return (rFirst.nId == rSecond.nId);
-}
-
-bool operator<(const SprmInfo &rFirst, const SprmInfo &rSecond)
-{
- return (rFirst.nId < rSecond.nId);
-}
-
-const wwSprmSearcher *wwSprmParser::GetWW6SprmSearcher()
-{
- //double lock me
- // WW7- Sprms
- static SprmInfo aSprms[] =
- {
- { 0, 0, L_FIX}, // "Default-sprm", wird uebersprungen
- { 2, 2, L_FIX}, // "sprmPIstd", pap.istd (style code)
- { 3, 3, L_VAR}, // "sprmPIstdPermute pap.istd permutation
- { 4, 1, L_FIX}, // "sprmPIncLv1" pap.istddifference
- { 5, 1, L_FIX}, // "sprmPJc" pap.jc (justification)
- { 6, 1, L_FIX}, // "sprmPFSideBySide" pap.fSideBySide
- { 7, 1, L_FIX}, // "sprmPFKeep" pap.fKeep
- { 8, 1, L_FIX}, // "sprmPFKeepFollow " pap.fKeepFollow
- { 9, 1, L_FIX}, // "sprmPPageBreakBefore" pap.fPageBreakBefore
- { 10, 1, L_FIX}, // "sprmPBrcl" pap.brcl
- { 11, 1, L_FIX}, // "sprmPBrcp" pap.brcp
- { 12, 0, L_VAR}, // "sprmPAnld" pap.anld (ANLD structure)
- { 13, 1, L_FIX}, // "sprmPNLvlAnm" pap.nLvlAnm nn
- { 14, 1, L_FIX}, // "sprmPFNoLineNumb" pap.fNoLnn
- { 15, 0, L_VAR}, // "?sprmPChgTabsPapx" pap.itbdMac, ...
- { 16, 2, L_FIX}, // "sprmPDxaRight" pap.dxaRight
- { 17, 2, L_FIX}, // "sprmPDxaLeft" pap.dxaLeft
- { 18, 2, L_FIX}, // "sprmPNest" pap.dxaLeft
- { 19, 2, L_FIX}, // "sprmPDxaLeft1" pap.dxaLeft1
- { 20, 4, L_FIX}, // "sprmPDyaLine" pap.lspd an LSPD
- { 21, 2, L_FIX}, // "sprmPDyaBefore" pap.dyaBefore
- { 22, 2, L_FIX}, // "sprmPDyaAfter" pap.dyaAfter
- { 23, 0, L_VAR}, // "?sprmPChgTabs" pap.itbdMac, pap.rgdxaTab, ...
- { 24, 1, L_FIX}, // "sprmPFInTable" pap.fInTable
- { 25, 1, L_FIX}, // "sprmPTtp" pap.fTtp
- { 26, 2, L_FIX}, // "sprmPDxaAbs" pap.dxaAbs
- { 27, 2, L_FIX}, // "sprmPDyaAbs" pap.dyaAbs
- { 28, 2, L_FIX}, // "sprmPDxaWidth" pap.dxaWidth
- { 29, 1, L_FIX}, // "sprmPPc" pap.pcHorz, pap.pcVert
- { 30, 2, L_FIX}, // "sprmPBrcTop10" pap.brcTop BRC10
- { 31, 2, L_FIX}, // "sprmPBrcLeft10" pap.brcLeft BRC10
- { 32, 2, L_FIX}, // "sprmPBrcBottom10" pap.brcBottom BRC10
- { 33, 2, L_FIX}, // "sprmPBrcRight10" pap.brcRight BRC10
- { 34, 2, L_FIX}, // "sprmPBrcBetween10" pap.brcBetween BRC10
- { 35, 2, L_FIX}, // "sprmPBrcBar10" pap.brcBar BRC10
- { 36, 2, L_FIX}, // "sprmPFromText10" pap.dxaFromText dxa
- { 37, 1, L_FIX}, // "sprmPWr" pap.wr wr
- { 38, 2, L_FIX}, // "sprmPBrcTop" pap.brcTop BRC
- { 39, 2, L_FIX}, // "sprmPBrcLeft" pap.brcLeft BRC
- { 40, 2, L_FIX}, // "sprmPBrcBottom" pap.brcBottom BRC
- { 41, 2, L_FIX}, // "sprmPBrcRight" pap.brcRight BRC
- { 42, 2, L_FIX}, // "sprmPBrcBetween" pap.brcBetween BRC
- { 43, 2, L_FIX}, // "sprmPBrcBar" pap.brcBar BRC word
- { 44, 1, L_FIX}, // "sprmPFNoAutoHyph" pap.fNoAutoHyph
- { 45, 2, L_FIX}, // "sprmPWHeightAbs" pap.wHeightAbs w
- { 46, 2, L_FIX}, // "sprmPDcs" pap.dcs DCS
- { 47, 2, L_FIX}, // "sprmPShd" pap.shd SHD
- { 48, 2, L_FIX}, // "sprmPDyaFromText" pap.dyaFromText dya
- { 49, 2, L_FIX}, // "sprmPDxaFromText" pap.dxaFromText dxa
- { 50, 1, L_FIX}, // "sprmPFLocked" pap.fLocked 0 or 1 byte
- { 51, 1, L_FIX}, // "sprmPFWidowControl" pap.fWidowControl 0 or 1 byte
- { 52, 0, L_FIX}, // "?sprmPRuler 52"
- { 64, 0, L_VAR}, // rtl property ?
- { 65, 1, L_FIX}, // "sprmCFStrikeRM" chp.fRMarkDel 1 or 0 bit
- { 66, 1, L_FIX}, // "sprmCFRMark" chp.fRMark 1 or 0 bit
- { 67, 1, L_FIX}, // "sprmCFFldVanish" chp.fFldVanish 1 or 0 bit
- { 68, 0, L_VAR}, // "sprmCPicLocation" chp.fcPic and chp.fSpec
- { 69, 2, L_FIX}, // "sprmCIbstRMark" chp.ibstRMark index into sttbRMark
- { 70, 4, L_FIX}, // "sprmCDttmRMark" chp.dttm DTTM long
- { 71, 1, L_FIX}, // "sprmCFData" chp.fData 1 or 0 bit
- { 72, 2, L_FIX}, // "sprmCRMReason" chp.idslRMReason an index to a table
- { 73, 3, L_FIX}, // "sprmCChse" chp.fChsDiff and chp.chse
- { 74, 0, L_VAR}, // "sprmCSymbol" chp.fSpec, chp.chSym and chp.ftcSym
- { 75, 1, L_FIX}, // "sprmCFOle2" chp.fOle2 1 or 0 bit
- { 79, 0, L_VAR}, // unknown
- { 80, 2, L_FIX}, // "sprmCIstd" chp.istd istd, see stylesheet definition
- { 81, 0, L_VAR}, // "sprmCIstdPermute" chp.istd permutation vector
- { 82, 0, L_VAR}, // "sprmCDefault" whole CHP
- { 83, 0, L_FIX}, // "sprmCPlain" whole CHP
- { 85, 1, L_FIX}, // "sprmCFBold" chp.fBold 0,1, 128, or 129
- { 86, 1, L_FIX}, // "sprmCFItalic" chp.fItalic 0,1, 128, or 129
- { 87, 1, L_FIX}, // "sprmCFStrike" chp.fStrike 0,1, 128, or 129
- { 88, 1, L_FIX}, // "sprmCFOutline" chp.fOutline 0,1, 128, or 129
- { 89, 1, L_FIX}, // "sprmCFShadow" chp.fShadow 0,1, 128, or 129
- { 90, 1, L_FIX}, // "sprmCFSmallCaps" chp.fSmallCaps 0,1, 128, or 129
- { 91, 1, L_FIX}, // "sprmCFCaps" chp.fCaps 0,1, 128, or 129
- { 92, 1, L_FIX}, // "sprmCFVanish" chp.fVanish 0,1, 128, or 129
- { 93, 2, L_FIX}, // "sprmCFtc" chp.ftc ftc word
- { 94, 1, L_FIX}, // "sprmCKul" chp.kul kul byte
- { 95, 3, L_FIX}, // "sprmCSizePos" chp.hps, chp.hpsPos
- { 96, 2, L_FIX}, // "sprmCDxaSpace" chp.dxaSpace dxa
- { 97, 2, L_FIX}, // "sprmCLid" chp.lid LID
- { 98, 1, L_FIX}, // "sprmCIco" chp.ico ico byte
- { 99, 2, L_FIX}, // "sprmCHps" chp.hps hps !word!
- {100, 1, L_FIX}, // "sprmCHpsInc" chp.hps
- {101, 2, L_FIX}, // "sprmCHpsPos" chp.hpsPos hps !word!
- {102, 1, L_FIX}, // "sprmCHpsPosAdj" chp.hpsPos hps
- {103, 0, L_VAR}, // "?sprmCMajority" chp.fBold, chp.fItalic, ...
- {104, 1, L_FIX}, // "sprmCIss" chp.iss iss
- {105, 0, L_VAR}, // "sprmCHpsNew50" chp.hps hps variable width
- {106, 0, L_VAR}, // "sprmCHpsInc1" chp.hps complex
- {107, 2, L_FIX}, // "sprmCHpsKern" chp.hpsKern hps
- {108, 0, L_VAR}, // "sprmCMajority50" chp.fBold, chp.fItalic, ...
- {109, 2, L_FIX}, // "sprmCHpsMul" chp.hps percentage to grow hps
- {110, 2, L_FIX}, // "sprmCCondHyhen" chp.ysri ysri
- {111, 2, L_FIX}, // unknown
- {112, 2, L_FIX}, // unknown
- {113, 0, L_VAR}, // rtl property ?
- {115, 0, L_VAR}, // rtl property ?
- {116, 0, L_VAR}, // unknown
- {117, 1, L_FIX}, // "sprmCFSpec" chp.fSpec 1 or 0 bit
- {118, 1, L_FIX}, // "sprmCFObj" chp.fObj 1 or 0 bit
- {119, 1, L_FIX}, // "sprmPicBrcl" pic.brcl brcl (see PIC definition)
- {120,12, L_VAR}, // "sprmPicScale" pic.mx, pic.my, pic.dxaCropleft,
- {121, 2, L_FIX}, // "sprmPicBrcTop" pic.brcTop BRC word
- {122, 2, L_FIX}, // "sprmPicBrcLeft" pic.brcLeft BRC word
- {123, 2, L_FIX}, // "sprmPicBrcBottom" pic.brcBottom BRC word
- {124, 2, L_FIX}, // "sprmPicBrcRight" pic.brcRight BRC word
- {131, 1, L_FIX}, // "sprmSScnsPgn" sep.cnsPgn cns byte
- {132, 1, L_FIX}, // "sprmSiHeadingPgn" sep.iHeadingPgn
- {133, 0, L_VAR}, // "sprmSOlstAnm" sep.olstAnm OLST variable length
- {136, 3, L_FIX}, // "sprmSDxaColWidth" sep.rgdxaColWidthSpacing complex
- {137, 3, L_FIX}, // "sprmSDxaColSpacing" sep.rgdxaColWidthSpacing
- {138, 1, L_FIX}, // "sprmSFEvenlySpaced" sep.fEvenlySpaced 1 or 0
- {139, 1, L_FIX}, // "sprmSFProtected" sep.fUnlocked 1 or 0 byte
- {140, 2, L_FIX}, // "sprmSDmBinFirst" sep.dmBinFirst word
- {141, 2, L_FIX}, // "sprmSDmBinOther" sep.dmBinOther word
- {142, 1, L_FIX}, // "sprmSBkc" sep.bkc bkc byte
- {143, 1, L_FIX}, // "sprmSFTitlePage" sep.fTitlePage 0 or 1 byte
- {144, 2, L_FIX}, // "sprmSCcolumns" sep.ccolM1 # of cols - 1 word
- {145, 2, L_FIX}, // "sprmSDxaColumns" sep.dxaColumns dxa word
- {146, 1, L_FIX}, // "sprmSFAutoPgn" sep.fAutoPgn obsolete byte
- {147, 1, L_FIX}, // "sprmSNfcPgn" sep.nfcPgn nfc byte
- {148, 2, L_FIX}, // "sprmSDyaPgn" sep.dyaPgn dya short
- {149, 2, L_FIX}, // "sprmSDxaPgn" sep.dxaPgn dya short
- {150, 1, L_FIX}, // "sprmSFPgnRestart" sep.fPgnRestart 0 or 1 byte
- {151, 1, L_FIX}, // "sprmSFEndnote" sep.fEndnote 0 or 1 byte
- {152, 1, L_FIX}, // "sprmSLnc" sep.lnc lnc byte
- {153, 1, L_FIX}, // "sprmSGprfIhdt" sep.grpfIhdt grpfihdt
- {154, 2, L_FIX}, // "sprmSNLnnMod" sep.nLnnMod non-neg int. word
- {155, 2, L_FIX}, // "sprmSDxaLnn" sep.dxaLnn dxa word
- {156, 2, L_FIX}, // "sprmSDyaHdrTop" sep.dyaHdrTop dya word
- {157, 2, L_FIX}, // "sprmSDyaHdrBottom" sep.dyaHdrBottom dya word
- {158, 1, L_FIX}, // "sprmSLBetween" sep.fLBetween 0 or 1 byte
- {159, 1, L_FIX}, // "sprmSVjc" sep.vjc vjc byte
- {160, 2, L_FIX}, // "sprmSLnnMin" sep.lnnMin lnn word
- {161, 2, L_FIX}, // "sprmSPgnStart" sep.pgnStart pgn word
- {162, 1, L_FIX}, // "sprmSBOrientation" sep.dmOrientPage dm byte
- {163, 0, L_FIX}, // "?SprmSBCustomize 163"
- {164, 2, L_FIX}, // "sprmSXaPage" sep.xaPage xa word
- {165, 2, L_FIX}, // "sprmSYaPage" sep.yaPage ya word
- {166, 2, L_FIX}, // "sprmSDxaLeft" sep.dxaLeft dxa word
- {167, 2, L_FIX}, // "sprmSDxaRight" sep.dxaRight dxa word
- {168, 2, L_FIX}, // "sprmSDyaTop" sep.dyaTop dya word
- {169, 2, L_FIX}, // "sprmSDyaBottom" sep.dyaBottom dya word
- {170, 2, L_FIX}, // "sprmSDzaGutter" sep.dzaGutter dza word
- {171, 2, L_FIX}, // "sprmSDMPaperReq" sep.dmPaperReq dm word
- {179, 0, L_VAR}, // rtl property ?
- {181, 0, L_VAR}, // rtl property ?
- {182, 2, L_FIX}, // "sprmTJc" tap.jc jc (low order byte is significant)
- {183, 2, L_FIX}, // "sprmTDxaLeft" tap.rgdxaCenter dxa word
- {184, 2, L_FIX}, // "sprmTDxaGapHalf" tap.dxaGapHalf, tap.rgdxaCenter
- {185, 1, L_FIX}, // "sprmTFCantSplit" tap.fCantSplit 1 or 0 byte
- {186, 1, L_FIX}, // "sprmTTableHeader" tap.fTableHeader 1 or 0 byte
- {187,12, L_FIX}, // "sprmTTableBorders" tap.rgbrcTable complex 12 bytes
- {188, 0, L_VAR}, // "sprmTDefTable10" tap.rgdxaCenter, tap.rgtc complex
- {189, 2, L_FIX}, // "sprmTDyaRowHeight" tap.dyaRowHeight dya word
- {190, 0, L_VAR2},// "sprmTDefTable" tap.rgtc complex
- {191, 1, L_VAR}, // "sprmTDefTableShd" tap.rgshd complex
- {192, 4, L_FIX}, // "sprmTTlp" tap.tlp TLP 4 bytes
- {193, 5, L_FIX}, // "sprmTSetBrc" tap.rgtc[].rgbrc complex 5 bytes
- {194, 4, L_FIX}, // "sprmTInsert" tap.rgdxaCenter,tap.rgtc complex
- {195, 2, L_FIX}, // "sprmTDelete" tap.rgdxaCenter, tap.rgtc complex
- {196, 4, L_FIX}, // "sprmTDxaCol" tap.rgdxaCenter complex
- {197, 2, L_FIX}, // "sprmTMerge" tap.fFirstMerged, tap.fMerged complex
- {198, 2, L_FIX}, // "sprmTSplit" tap.fFirstMerged, tap.fMerged complex
- {199, 5, L_FIX}, // "sprmTSetBrc10" tap.rgtc[].rgbrc complex 5 bytes
- {200, 4, L_FIX} // "sprmTSetShd", tap.rgshd complex 4 bytes
- };
-
- static wwSprmSearcher aSprmSrch(aSprms, sizeof(aSprms) / sizeof(aSprms[0]));
- return &aSprmSrch;
-};
-
-const wwSprmSearcher *wwSprmParser::GetWW8SprmSearcher()
-{
- //double lock me
- //WW8+ Sprms
- static SprmInfo aSprms[] =
- {
- { 0, 0, L_FIX}, // "Default-sprm"/ wird uebersprungen
- {0x4600, 2, L_FIX}, // "sprmPIstd" pap.istd;istd (style code);short;
- {0xC601, 0, L_VAR}, // "sprmPIstdPermute" pap.istd;permutation vector
- {0x2602, 1, L_FIX}, // "sprmPIncLvl" pap.istd, pap.lvl;difference
- // between istd of base PAP and istd of PAP to be
- // produced
- {0x2403, 1, L_FIX}, // "sprmPJc" pap.jc;jc (justification);byte;
- {0x2404, 1, L_FIX}, // "sprmPFSideBySide" pap.fSideBySide;0 or 1;byte;
- {0x2405, 1, L_FIX}, // "sprmPFKeep" pap.fKeep;0 or 1;byte;
- {0x2406, 1, L_FIX}, // "sprmPFKeepFollow" pap.fKeepFollow;0 or 1;byte;
- {0x2407, 1, L_FIX}, // "sprmPFPageBreakBefore" pap.fPageBreakBefore;
- // 0 or 1
- {0x2408, 1, L_FIX}, // "sprmPBrcl" pap.brcl;brcl;byte;
- {0x2409, 1, L_FIX}, // "sprmPBrcp" pap.brcp;brcp;byte;
- {0x260A, 1, L_FIX}, // "sprmPIlvl" pap.ilvl;ilvl;byte;
- {0x460B, 2, L_FIX}, // "sprmPIlfo" pap.ilfo;ilfo (list index) ;short;
- {0x240C, 1, L_FIX}, // "sprmPFNoLineNumb" pap.fNoLnn;0 or 1;byte;
- {0xC60D, 0, L_VAR}, // "sprmPChgTabsPapx" pap.itbdMac, pap.rgdxaTab,
- // pap.rgtbd;complex
- {0x840E, 2, L_FIX}, // "sprmPDxaRight" pap.dxaRight;dxa;word;
- {0x840F, 2, L_FIX}, // "sprmPDxaLeft" pap.dxaLeft;dxa;word;
- {0x4610, 2, L_FIX}, // "sprmPNest" pap.dxaLeft;dxa
- {0x8411, 2, L_FIX}, // "sprmPDxaLeft1" pap.dxaLeft1;dxa;word;
- {0x6412, 4, L_FIX}, // "sprmPDyaLine" pap.lspd;an LSPD, a long word
- // structure consisting of a short of dyaLine
- // followed by a short of fMultLinespace
- {0xA413, 2, L_FIX}, // "sprmPDyaBefore" pap.dyaBefore;dya;word;
- {0xA414, 2, L_FIX}, // "sprmPDyaAfter" pap.dyaAfter;dya;word;
- {0xC615, 0, L_VAR}, // "sprmPChgTabs" pap.itbdMac, pap.rgdxaTab,
- // pap.rgtbd;complex
- {0x2416, 1, L_FIX}, // "sprmPFInTable" pap.fInTable;0 or 1;byte;
- {0x2417, 1, L_FIX}, // "sprmPFTtp" pap.fTtp;0 or 1;byte;
- {0x8418, 2, L_FIX}, // "sprmPDxaAbs" pap.dxaAbs;dxa;word;
- {0x8419, 2, L_FIX}, // "sprmPDyaAbs" pap.dyaAbs;dya;word;
- {0x841A, 2, L_FIX}, // "sprmPDxaWidth" pap.dxaWidth;dxa;word;
- {0x261B, 1, L_FIX}, // "sprmPPc" pap.pcHorz, pap.pcVert;complex
- {0x461C, 2, L_FIX}, // "sprmPBrcTop10" pap.brcTop;BRC10;word;
- {0x461D, 2, L_FIX}, // "sprmPBrcLeft10" pap.brcLeft;BRC10;word;
- {0x461E, 2, L_FIX}, // "sprmPBrcBottom10" pap.brcBottom;BRC10;word;
- {0x461F, 2, L_FIX}, // "sprmPBrcRight10" pap.brcRight;BRC10;word;
- {0x4620, 2, L_FIX}, // "sprmPBrcBetween10" pap.brcBetween;BRC10;word;
- {0x4621, 2, L_FIX}, // "sprmPBrcBar10" pap.brcBar;BRC10;word;
- {0x4622, 2, L_FIX}, // "sprmPDxaFromText10" pap.dxaFromText;dxa;word;
- {0x2423, 1, L_FIX}, // "sprmPWr" pap.wr;wr
- {0x6424, 4, L_FIX}, // "sprmPBrcTop" pap.brcTop;BRC;long;
- {0x6425, 4, L_FIX}, // "sprmPBrcLeft" pap.brcLeft;BRC;long;
- {0x6426, 4, L_FIX}, // "sprmPBrcBottom" pap.brcBottom;BRC;long;
- {0x6427, 4, L_FIX}, // "sprmPBrcRight" pap.brcRight;BRC;long;
- {0x6428, 4, L_FIX}, // "sprmPBrcBetween" pap.brcBetween;BRC;long;
- {0x6629, 4, L_FIX}, // "sprmPBrcBar" pap.brcBar;BRC;long;
- {0x242A, 1, L_FIX}, // "sprmPFNoAutoHyph" pap.fNoAutoHyph;0 or 1;byte;
- {0x442B, 2, L_FIX}, // "sprmPWHeightAbs" pap.wHeightAbs;w;word;
- {0x442C, 2, L_FIX}, // "sprmPDcs" pap.dcs;DCS;short;
- {0x442D, 2, L_FIX}, // "sprmPShd" pap.shd;SHD;word;
- {0x842E, 2, L_FIX}, // "sprmPDyaFromText" pap.dyaFromText;dya;word;
- {0x842F, 2, L_FIX}, // "sprmPDxaFromText" pap.dxaFromText;dxa;word;
- {0x2430, 1, L_FIX}, // "sprmPFLocked" pap.fLocked;0 or 1;byte;
- {0x2431, 1, L_FIX}, // "sprmPFWidowControl" pap.fWidowControl;0 or 1
- {0xC632, 0, L_VAR}, // "sprmPRuler" ;;variable length;
- {0x2433, 1, L_FIX}, // "sprmPFKinsoku" pap.fKinsoku;0 or 1;byte;
- {0x2434, 1, L_FIX}, // "sprmPFWordWrap" pap.fWordWrap;0 or 1;byte;
- {0x2435, 1, L_FIX}, // "sprmPFOverflowPunct" pap.fOverflowPunct;0 or 1
- {0x2436, 1, L_FIX}, // "sprmPFTopLinePunct" pap.fTopLinePunct;0 or 1
- {0x2437, 1, L_FIX}, // "sprmPFAutoSpaceDE" pap.fAutoSpaceDE;0 or 1
- {0x2438, 1, L_FIX}, // "sprmPFAutoSpaceDN" pap.fAutoSpaceDN;0 or 1
- {0x4439, 2, L_FIX}, // "sprmPWAlignFont" pap.wAlignFont;iFa
- {0x443A, 2, L_FIX}, // "sprmPFrameTextFlow" pap.fVertical pap.fBackward
- // pap.fRotateFont;complex
- {0x243B, 1, L_FIX}, // "sprmPISnapBaseLine" obsolete: not applicable in
- // Word97 and later versions;
- {0xC63E, 0, L_VAR}, // "sprmPAnld" pap.anld;;variable length;
- {0xC63F, 0, L_VAR}, // "sprmPPropRMark" pap.fPropRMark;complex
- {0x2640, 1, L_FIX}, // "sprmPOutLvl" pap.lvl;has no effect if pap.istd
- // is < 1 or is > 9
- {0x2441, 1, L_FIX}, // "sprmPFBiDi" ;;byte;
- {0x2443, 1, L_FIX}, // "sprmPFNumRMIns" pap.fNumRMIns;1 or 0;bit;
- {0x2444, 1, L_FIX}, // "sprmPCrLf" ;;byte;
- {0xC645, 0, L_VAR}, // "sprmPNumRM" pap.numrm;;variable length;
- {0x6645, 4, L_FIX}, // "sprmPHugePapx" fc in the data stream to locate
- // the huge grpprl
- {0x6646, 4, L_FIX}, // "sprmPHugePapx" fc in the data stream to locate
- // the huge grpprl
- {0x2447, 1, L_FIX}, // "sprmPFUsePgsuSettings" pap.fUsePgsuSettings;
- // 1 or 0
- {0x2448, 1, L_FIX}, // "sprmPFAdjustRight" pap.fAdjustRight;1 or 0;byte;
- {0x0800, 1, L_FIX}, // "sprmCFRMarkDel" chp.fRMarkDel;1 or 0;bit;
- {0x0801, 1, L_FIX}, // "sprmCFRMark" chp.fRMark;1 or 0;bit;
- {0x0802, 1, L_FIX}, // "sprmCFFldVanish" chp.fFldVanish;1 or 0;bit;
- {0x6A03, 4, L_FIX}, // "sprmCPicLocation" chp.fcPic and chp.fSpec;
- {0x4804, 2, L_FIX}, // "sprmCIbstRMark" chp.ibstRMark;index into
- // sttbRMark
- {0x6805, 4, L_FIX}, // "sprmCDttmRMark" chp.dttmRMark;DTTM;long;
- {0x0806, 1, L_FIX}, // "sprmCFData" chp.fData;1 or 0;bit;
- {0x4807, 2, L_FIX}, // "sprmCIdslRMark" chp.idslRMReason;an index to a
- // table of strings defined in Word 6.0
- // executables;short;
- {0xEA08, 1, L_FIX}, // "sprmCChs" chp.fChsDiff and chp.chse;
- {0x6A09, 4, L_FIX}, // "sprmCSymbol" chp.fSpec, chp.xchSym and
- // chp.ftcSym
- {0x080A, 1, L_FIX}, // "sprmCFOle2" chp.fOle2;1 or 0;bit;
- {0x480B, 0, L_FIX}, // "sprmCIdCharType" obsolete: not applicable in
- // Word97 and later versions;;;
- {0x2A0C, 1, L_FIX}, // "sprmCHighlight" chp.fHighlight,
- // chp.icoHighlight;ico (fHighlight is set to 1 iff
- // ico is not 0)
- {0x680E, 4, L_FIX}, // "sprmCObjLocation" chp.fcObj;FC;long;
- {0x2A10, 0, L_FIX}, // "sprmCFFtcAsciSymb" ;;;
- {0x4A30, 2, L_FIX}, // "sprmCIstd" chp.istd;istd, see stylesheet def
- {0xCA31, 0, L_VAR}, // "sprmCIstdPermute" chp.istd;permutation vector
- {0x2A32, 0, L_VAR}, // "sprmCDefault" whole CHP;none;variable length;
- {0x2A33, 0, L_FIX}, // "sprmCPlain" whole CHP;none;0;
- {0x2A34, 1, L_FIX}, // "sprmCKcd" ;;;
- {0x0835, 1, L_FIX}, // "sprmCFBold" chp.fBold;0,1, 128, or 129
- {0x0836, 1, L_FIX}, // "sprmCFItalic" chp.fItalic;0,1, 128, or 129
- {0x0837, 1, L_FIX}, // "sprmCFStrike" chp.fStrike;0,1, 128, or 129
- {0x0838, 1, L_FIX}, // "sprmCFOutline" chp.fOutline;0,1, 128, or 129
- {0x0839, 1, L_FIX}, // "sprmCFShadow" chp.fShadow;0,1, 128, or 129
- {0x083A, 1, L_FIX}, // "sprmCFSmallCaps" chp.fSmallCaps;0,1, 128, or 129
- {0x083B, 1, L_FIX}, // "sprmCFCaps" chp.fCaps;0,1, 128, or 129
- {0x083C, 1, L_FIX}, // "sprmCFVanish" chp.fVanish;0,1, 128, or 129
- {0x4A3D, 2, L_FIX}, // "sprmCFtcDefault" ;ftc, only used internally
- {0x2A3E, 1, L_FIX}, // "sprmCKul" chp.kul;kul;byte;
- {0xEA3F, 3, L_FIX}, // "sprmCSizePos" chp.hps, chp.hpsPos;3 bytes;
- {0x8840, 2, L_FIX}, // "sprmCDxaSpace" chp.dxaSpace;dxa;word;
- {0x4A41, 2, L_FIX}, // "sprmCLid" ;only used internally never stored
- {0x2A42, 1, L_FIX}, // "sprmCIco" chp.ico;ico;byte;
- {0x4A43, 2, L_FIX}, // "sprmCHps" chp.hps;hps
- {0x2A44, 1, L_FIX}, // "sprmCHpsInc" chp.hps;
- {0x4845, 2, L_FIX}, // "sprmCHpsPos" chp.hpsPos;hps;short; (doc wrong)
- {0x2A46, 1, L_FIX}, // "sprmCHpsPosAdj" chp.hpsPos;hps
- {0xCA47, 0, L_VAR}, // "sprmCMajority" chp.fBold, chp.fItalic,
- // chp.fSmallCaps, chp.fVanish, chp.fStrike,
- // chp.fCaps, chp.rgftc, chp.hps, chp.hpsPos,
- // chp.kul, chp.dxaSpace, chp.ico,
- // chp.rglid;complex;variable length, length byte
- // plus size of following grpprl;
- {0x2A48, 1, L_FIX}, // "sprmCIss" chp.iss;iss;byte;
- {0xCA49, 0, L_VAR}, // "sprmCHpsNew50" chp.hps;hps;variable width
- {0xCA4A, 0, L_VAR}, // "sprmCHpsInc1" chp.hps;complex
- {0x484B, 2, L_FIX}, // "sprmCHpsKern" chp.hpsKern;hps;short;
- {0xCA4C, 2, L_FIX}, // "sprmCMajority50" chp.fBold, chp.fItalic,
- // chp.fSmallCaps, chp.fVanish, chp.fStrike,
- // chp.fCaps, chp.ftc, chp.hps, chp.hpsPos, chp.kul,
- // chp.dxaSpace, chp.ico,;complex
- {0x4A4D, 2, L_FIX}, // "sprmCHpsMul" chp.hps;percentage to grow hps
- {0x484E, 2, L_FIX}, // "sprmCYsri" chp.ysri;ysri;short;
- {0x4A4F, 2, L_FIX}, // "sprmCRgFtc0" chp.rgftc[0];ftc for ASCII text
- {0x4A50, 2, L_FIX}, // "sprmCRgFtc1" chp.rgftc[1];ftc for Far East text
- {0x4A51, 2, L_FIX}, // "sprmCRgFtc2" chp.rgftc[2];ftc for non-FE text
- {0x4852, 2, L_FIX}, // "sprmCCharScale"
- {0x2A53, 1, L_FIX}, // "sprmCFDStrike" chp.fDStrike;;byte;
- {0x0854, 1, L_FIX}, // "sprmCFImprint" chp.fImprint;1 or 0;bit;
- {0x0855, 1, L_FIX}, // "sprmCFSpec" chp.fSpec ;1 or 0;bit;
- {0x0856, 1, L_FIX}, // "sprmCFObj" chp.fObj;1 or 0;bit;
- {0xCA57, 0, L_VAR}, // "sprmCPropRMark" chp.fPropRMark,
- // chp.ibstPropRMark, chp.dttmPropRMark;Complex
- {0x0858, 1, L_FIX}, // "sprmCFEmboss" chp.fEmboss;1 or 0;bit;
- {0x2859, 1, L_FIX}, // "sprmCSfxText" chp.sfxtText;text animation;byte;
- {0x085A, 1, L_FIX}, // "sprmCFBiDi" ;;;
- {0x085B, 1, L_FIX}, // "sprmCFDiacColor" ;;;
- {0x085C, 1, L_FIX}, // "sprmCFBoldBi" ;;;
- {0x085D, 1, L_FIX}, // "sprmCFItalicBi" ;;;
- {0x4A5E, 2, L_FIX},
- {0x485F, 2, L_FIX}, // "sprmCLidBi" ;;;
- {0x4A60, 1, L_FIX}, // "sprmCIcoBi" ;;;
- {0x4A61, 2, L_FIX}, // "sprmCHpsBi" ;;;
- {0xCA62, 0, L_VAR}, // "sprmCDispFldRMark" chp.fDispFldRMark,
- // chp.ibstDispFldRMark, chp.dttmDispFldRMark ;
- {0x4863, 2, L_FIX}, // "sprmCIbstRMarkDel" chp.ibstRMarkDel;index into
- // sttbRMark;short;
- {0x6864, 4, L_FIX}, // "sprmCDttmRMarkDel" chp.dttmRMarkDel;DTTM;long;
- {0x6865, 4, L_FIX}, // "sprmCBrc" chp.brc;BRC;long;
- {0x4866, 2, L_FIX}, // "sprmCShd" chp.shd;SHD;short;
- {0x4867, 2, L_FIX}, // "sprmCIdslRMarkDel" chp.idslRMReasonDel;an index
- // to a table of strings defined in Word 6.0
- // executables;short;
- {0x0868, 1, L_FIX}, // "sprmCFUsePgsuSettings"
- // chp.fUsePgsuSettings;1 or 0
- {0x486B, 2, L_FIX}, // "sprmCCpg" ;;word;
- {0x486D, 2, L_FIX}, // "sprmCRgLid0" chp.rglid[0];LID: for non-FE text
- {0x486E, 2, L_FIX}, // "sprmCRgLid1" chp.rglid[1];LID: for Far East text
- {0x286F, 1, L_FIX}, // "sprmCIdctHint" chp.idctHint;IDCT:
- {0x2E00, 1, L_FIX}, // "sprmPicBrcl" pic.brcl;brcl (see PIC definition)
- {0xCE01, 0, L_VAR}, // "sprmPicScale" pic.mx, pic.my, pic.dxaCropleft,
- // pic.dyaCropTop pic.dxaCropRight,
- // pic.dyaCropBottom;Complex
- {0x6C02, 4, L_FIX}, // "sprmPicBrcTop" pic.brcTop;BRC;long;
- {0x6C03, 4, L_FIX}, // "sprmPicBrcLeft" pic.brcLeft;BRC;long;
- {0x6C04, 4, L_FIX}, // "sprmPicBrcBottom" pic.brcBottom;BRC;long;
- {0x6C05, 4, L_FIX}, // "sprmPicBrcRight" pic.brcRight;BRC;long;
- {0x3000, 1, L_FIX}, // "sprmScnsPgn" sep.cnsPgn;cns;byte;
- {0x3001, 1, L_FIX}, // "sprmSiHeadingPgn" sep.iHeadingPgn;heading number
- // level;byte;
- {0xD202, 0, L_VAR}, // "sprmSOlstAnm" sep.olstAnm;OLST;variable length;
- {0xF203, 3, L_FIX}, // "sprmSDxaColWidth" sep.rgdxaColWidthSpacing;
- {0xF204, 3, L_FIX}, // "sprmSDxaColSpacing" sep.rgdxaColWidthSpacing;
- // complex
- {0x3005, 1, L_FIX}, // "sprmSFEvenlySpaced" sep.fEvenlySpaced;1 or 0
- {0x3006, 1, L_FIX}, // "sprmSFProtected" sep.fUnlocked;1 or 0;byte;
- {0x5007, 2, L_FIX}, // "sprmSDmBinFirst" sep.dmBinFirst;;word;
- {0x5008, 2, L_FIX}, // "sprmSDmBinOther" sep.dmBinOther;;word;
- {0x3009, 1, L_FIX}, // "sprmSBkc" sep.bkc;bkc;byte;
- {0x300A, 1, L_FIX}, // "sprmSFTitlePage" sep.fTitlePage;0 or 1;byte;
- {0x500B, 2, L_FIX}, // "sprmSCcolumns" sep.ccolM1;# of cols - 1;word;
- {0x900C, 2, L_FIX}, // "sprmSDxaColumns" sep.dxaColumns;dxa;word;
- {0x300D, 1, L_FIX}, // "sprmSFAutoPgn" sep.fAutoPgn;obsolete;byte;
- {0x300E, 1, L_FIX}, // "sprmSNfcPgn" sep.nfcPgn;nfc;byte;
- {0xB00F, 2, L_FIX}, // "sprmSDyaPgn" sep.dyaPgn;dya;short;
- {0xB010, 2, L_FIX}, // "sprmSDxaPgn" sep.dxaPgn;dya;short;
- {0x3011, 1, L_FIX}, // "sprmSFPgnRestart" sep.fPgnRestart;0 or 1;byte;
- {0x3012, 1, L_FIX}, // "sprmSFEndnote" sep.fEndnote;0 or 1;byte;
- {0x3013, 1, L_FIX}, // "sprmSLnc" sep.lnc;lnc;byte;
- {0x3014, 1, L_FIX}, // "sprmSGprfIhdt" sep.grpfIhdt;grpfihdt
- {0x5015, 2, L_FIX}, // "sprmSNLnnMod" sep.nLnnMod;non-neg int.;word;
- {0x9016, 2, L_FIX}, // "sprmSDxaLnn" sep.dxaLnn;dxa;word;
- {0xB017, 2, L_FIX}, // "sprmSDyaHdrTop" sep.dyaHdrTop;dya;word;
- {0xB018, 2, L_FIX}, // "sprmSDyaHdrBottom" sep.dyaHdrBottom;dya;word;
- {0x3019, 1, L_FIX}, // "sprmSLBetween" sep.fLBetween;0 or 1;byte;
- {0x301A, 1, L_FIX}, // "sprmSVjc" sep.vjc;vjc;byte;
- {0x501B, 2, L_FIX}, // "sprmSLnnMin" sep.lnnMin;lnn;word;
- {0x501C, 2, L_FIX}, // "sprmSPgnStart" sep.pgnStart;pgn;word;
- {0x301D, 1, L_FIX}, // "sprmSBOrientation" sep.dmOrientPage;dm;byte;
- {0x301E, 1, L_FIX}, // "sprmSBCustomize" ;;;
- {0xB01F, 2, L_FIX}, // "sprmSXaPage" sep.xaPage;xa;word;
- {0xB020, 2, L_FIX}, // "sprmSYaPage" sep.yaPage;ya;word;
- {0xB021, 2, L_FIX}, // "sprmSDxaLeft" sep.dxaLeft;dxa;word;
- {0xB022, 2, L_FIX}, // "sprmSDxaRight" sep.dxaRight;dxa;word;
- {0x9023, 2, L_FIX}, // "sprmSDyaTop" sep.dyaTop;dya;word;
- {0x9024, 2, L_FIX}, // "sprmSDyaBottom" sep.dyaBottom;dya;word;
- {0xB025, 2, L_FIX}, // "sprmSDzaGutter" sep.dzaGutter;dza;word;
- {0x5026, 2, L_FIX}, // "sprmSDmPaperReq" sep.dmPaperReq;dm;word;
- {0xD227, 0, L_VAR}, // "sprmSPropRMark" sep.fPropRMark,
- // sep.ibstPropRMark, sep.dttmPropRMark ;complex
- {0x3228, 1, L_FIX}, // "sprmSFBiDi" ;;;
- {0x3229, 1, L_FIX}, // "sprmSFFacingCol" ;;;
- {0x322A, 1, L_FIX}, // "sprmSFRTLGutter", set to one if gutter is on
- // right
- {0x702B, 4, L_FIX}, // "sprmSBrcTop" sep.brcTop;BRC;long;
- {0x702C, 4, L_FIX}, // "sprmSBrcLeft" sep.brcLeft;BRC;long;
- {0x702D, 4, L_FIX}, // "sprmSBrcBottom" sep.brcBottom;BRC;long;
- {0x702E, 4, L_FIX}, // "sprmSBrcRight" sep.brcRight;BRC;long;
- {0x522F, 2, L_FIX}, // "sprmSPgbProp" sep.pgbProp;;word;
- {0x7030, 4, L_FIX}, // "sprmSDxtCharSpace" sep.dxtCharSpace;dxt;long;
- {0x9031, 2, L_FIX}, // "sprmSDyaLinePitch"
- // sep.dyaLinePitch;dya; WRONG:long; RIGHT:short; !
- {0x5032, 2, L_FIX}, // "sprmSClm" ;;;
- {0x5033, 2, L_FIX}, // "sprmSTextFlow" sep.wTextFlow;complex
- {0x5400, 2, L_FIX}, // "sprmTJc" tap.jc;jc;word (low order byte is
- // significant);
- {0x9601, 2, L_FIX}, // "sprmTDxaLeft" tap.rgdxaCenter
- {0x9602, 2, L_FIX}, // "sprmTDxaGapHalf" tap.dxaGapHalf,
- // tap.rgdxaCenter
- {0x3403, 1, L_FIX}, // "sprmTFCantSplit" tap.fCantSplit;1 or 0;byte;
- {0x3404, 1, L_FIX}, // "sprmTTableHeader" tap.fTableHeader;1 or 0;byte;
- {0xD605, 0, L_VAR}, // "sprmTTableBorders" tap.rgbrcTable;complex
- {0xD606, 0, L_VAR}, // "sprmTDefTable10" tap.rgdxaCenter,
- // tap.rgtc;complex
- {0x9407, 2, L_FIX}, // "sprmTDyaRowHeight" tap.dyaRowHeight;dya;word;
- {0xD608, 0, L_VAR}, // "sprmTDefTable" tap.rgtc;complex
- {0xD609, 0, L_VAR}, // "sprmTDefTableShd" tap.rgshd;complex
- {0x740A, 4, L_FIX}, // "sprmTTlp" tap.tlp;TLP;4 bytes;
- {0x560B, 1, L_FIX}, // "sprmTFBiDi" ;;;
- {0x740C, 1, L_FIX}, // "sprmTHTMLProps" ;;;
- {0xD620, 0, L_VAR}, // "sprmTSetBrc" tap.rgtc[].rgbrc;complex
- {0x7621, 4, L_FIX}, // "sprmTInsert" tap.rgdxaCenter, tap.rgtc;complex
- {0x5622, 2, L_FIX}, // "sprmTDelete" tap.rgdxaCenter, tap.rgtc;complex
- {0x7623, 4, L_FIX}, // "sprmTDxaCol" tap.rgdxaCenter;complex
- {0x5624, 0, L_VAR}, // "sprmTMerge" tap.fFirstMerged, tap.fMerged;
- {0x5625, 0, L_VAR}, // "sprmTSplit" tap.fFirstMerged, tap.fMerged;
- {0xD626, 0, L_VAR}, // "sprmTSetBrc10" tap.rgtc[].rgbrc;complex
- {0x7627, 0, L_VAR}, // "sprmTSetShd" tap.rgshd;complex
- {0x7628, 0, L_VAR}, // "sprmTSetShdOdd" tap.rgshd;complex
- {0x7629, 0, L_VAR}, // "sprmTTextFlow" tap.rgtc[].fVerticaltap,
- // rgtc[].fBackwardtap, rgtc[].fRotateFont;0 or 10
- // or 10 or 1;word;
- {0xD62A, 1, L_FIX}, // "sprmTDiagLine" ;;;
- {0xD62B, 0, L_VAR}, // "sprmTVertMerge" tap.rgtc[].vertMerge
- {0xD62C, 0, L_VAR}, // "sprmTVertAlign" tap.rgtc[].vertAlign
- {0xCA78, 0, L_VAR}, // undocumented "sprmCDoubleLine ?"
- {0x6649, 4, L_FIX}, // undocumented
- {0xF614, 3, L_FIX}, // undocumented
- {0xD612, 0, L_VAR}, // undocumented, new background colours.
- {0xD613, 0, L_VAR}, // undocumented
- {0xD61A, 0, L_VAR}, // undocumented
- {0xD61B, 0, L_VAR}, // undocumented
- {0xD61C, 0, L_VAR}, // undocumented
- {0xD61D, 0, L_VAR}, // undocumented
- {0xD632, 0, L_VAR}, // undocumented
- {0xD634, 0, L_VAR}, // undocumented
- {0xD238, 0, L_VAR}, // undocumented sep
- {0xC64E, 0, L_VAR}, // undocumented
- {0xC64F, 0, L_VAR}, // undocumented
- {0xC650, 0, L_VAR}, // undocumented
- {0xC651, 0, L_VAR}, // undocumented
- {0xF661, 3, L_FIX}, // undocumented
- {0x4873, 2, L_FIX}, // undocumented
- {0x4874, 2, L_FIX}, // undocumented
- {0x6463, 4, L_FIX}, // undocumented
- {0x2461, 1, L_FIX}, // undoc, must be asian version of "sprmPJc"
- {0x845D, 2, L_FIX}, // undoc, must be asian version of "sprmPDxaRight"
- {0x845E, 2, L_FIX}, // undoc, must be asian version of "sprmPDxaLeft"
- {0x8460, 2, L_FIX}, // undoc, must be asian version of "sprmPDxaLeft1"
- {0x3615, 1, L_FIX}, // undocumented
- {0x360D, 1, L_FIX}, // undocumented
- {0x703A, 4, L_FIX}, // undocumented, sep, perhaps related to textgrids ?
- {0x303B, 1, L_FIX}, // undocumented, sep
- {0x244B, 1, L_FIX}, // undocumented, subtable "sprmPFInTable" equiv ?
- {0x244C, 1, L_FIX}, // undocumented, subtable "sprmPFTtp" equiv ?
- {0x940E, 2, L_FIX}, // undocumented
- {0x940F, 2, L_FIX}, // undocumented
- {0x9410, 2, L_FIX}, // undocumented
- {0x6815, 4, L_FIX}, // undocumented
- {0x6816, 4, L_FIX}, // undocumented
- {0x6870, 4, L_FIX}, // undocumented, text colour
- {0xC64D, 0, L_VAR}, // undocumented, para back colour
- {0x6467, 4, L_FIX}, // undocumented
- {0x646B, 4, L_FIX}, // undocumented
- {0xF617, 3, L_FIX}, // undocumented
- {0xD660, 0, L_VAR}, // undocumented, something to do with colour.
- {0xD670, 0, L_VAR}, // undocumented, something to do with colour.
- {0xCA71, 0, L_VAR}, // undocumented, text backcolour
- {0x303C, 1, L_FIX}, // undocumented, sep
- {0x245B, 1, L_FIX}, // undocumented, para autobefore
- {0x245C, 1, L_FIX} // undocumented, para autoafter
- };
-
- static wwSprmSearcher aSprmSrch(aSprms, sizeof(aSprms) / sizeof(aSprms[0]));
- return &aSprmSrch;
-};
-
-wwSprmParser::wwSprmParser(int nVersion) : mnVersion(nVersion)
-{
- ASSERT((mnVersion >= 6 && mnVersion <= 8), "Impossible value for version");
-
- mnDelta = (8 > mnVersion) ? 0 : 1;
-
- if (mnVersion < 8)
- mpKnownSprms = GetWW6SprmSearcher();
- else
- mpKnownSprms = GetWW8SprmSearcher();
-}
-
-SprmInfo wwSprmParser::GetSprmInfo(sal_uInt16 nId) const
-{
- // Find sprm
- SprmInfo aSrch;
- aSrch.nId = nId;
- const SprmInfo* pFound = mpKnownSprms->search(aSrch);
- if (pFound == 0)
- {
- ASSERT(mnVersion >= 8,
- "Unknown ww6 sprm, dangerous, report to development");
-
- aSrch.nId = 0;
- aSrch.nLen = 0;
- //All the unknown ww7 sprms appear to be variable (which makes sense)
- aSrch.nVari = L_VAR;
-
- if (mnVersion == 8) //We can recover perfectly in this case
- {
- aSrch.nVari = L_FIX;
- switch (nId >> 13)
- {
- case 0:
- case 1:
- aSrch.nLen = 1;
- break;
- case 2:
- aSrch.nLen = 2;
- break;
- case 3:
- aSrch.nLen = 4;
- break;
- case 4:
- case 5:
- aSrch.nLen = 2;
- break;
- case 6:
- aSrch.nLen = 0;
- aSrch.nVari = L_VAR;
- break;
- case 7:
- default:
- aSrch.nLen = 3;
- break;
- }
- }
-
- pFound = &aSrch;
- }
- return *pFound;
-}
-
-//-end
-
-inline sal_uInt8 Get_Byte( sal_uInt8 *& p )
-{
- sal_uInt8 n = SVBT8ToByte( *(SVBT8*)p );
- p += 1;
- return n;
-}
-
-inline sal_uInt16 Get_UShort( sal_uInt8 *& p )
-{
- sal_uInt16 n = SVBT16ToShort( *(SVBT16*)p );
- p += 2;
- return n;
-}
-
-inline short Get_Short( sal_uInt8 *& p )
-{
- return Get_UShort(p);
-}
-
-inline sal_uLong Get_ULong( sal_uInt8 *& p )
-{
- sal_uLong n = SVBT32ToUInt32( *(SVBT32*)p );
- p += 4;
- return n;
-}
-
-inline long Get_Long( sal_uInt8 *& p )
-{
- return Get_ULong(p);
-}
-
-WW8SprmIter::WW8SprmIter(const sal_uInt8* pSprms_, long nLen_,
- const wwSprmParser &rParser)
- : mrSprmParser(rParser), pSprms( pSprms_), nRemLen( nLen_)
-{
- UpdateMyMembers();
-}
-
-void WW8SprmIter::SetSprms(const sal_uInt8* pSprms_, long nLen_)
-{
- pSprms = pSprms_;
- nRemLen = nLen_;
- UpdateMyMembers();
-}
-
-const sal_uInt8* WW8SprmIter::operator ++( int )
-{
- if (nRemLen > 0)
- {
- pSprms += nAktSize;
- nRemLen -= nAktSize;
- UpdateMyMembers();
- }
- return pSprms;
-}
-
-void WW8SprmIter::UpdateMyMembers()
-{
- if (pSprms && nRemLen > 0)
- {
- nAktId = mrSprmParser.GetSprmId(pSprms);
- pAktParams = pSprms + mrSprmParser.DistanceToData(nAktId);
- nAktSize = mrSprmParser.GetSprmSize(nAktId, pSprms);
- }
- else
- {
- nAktId = 0;
- pAktParams = 0;
- nAktSize = 0;
- nRemLen = 0;
- }
-}
-
-const sal_uInt8* WW8SprmIter::FindSprm(sal_uInt16 nId)
-{
- while(GetSprms())
- {
- if( GetAktId() == nId )
- return GetAktParams(); // SPRM found!
- operator ++(0);
- }
-
- return 0; // SPRM _not_ found
-}
-
-//-----------------------------------------
-// temporaerer Test
-//-----------------------------------------
-// WW8PLCFx_PCDAttrs halten sich an WW8PLCF_Pcd fest und besitzen deshalb keine
-// eigenen Iteratoren. Alle sich auf Iteratoren beziehenden Methoden
-// sind deshalb Dummies.
-
-WW8PLCFx_PCDAttrs::WW8PLCFx_PCDAttrs(sal_uInt8 nVersion, WW8PLCFx_PCD* pPLCFx_PCD,
- const WW8ScannerBase* pBase)
- : WW8PLCFx(nVersion, true), pPcdI(pPLCFx_PCD->GetPLCFIter()),
- pPcd(pPLCFx_PCD), pGrpprls(pBase->pPieceGrpprls),
- nGrpprls(pBase->nPieceGrpprls)
-{
-}
-
-sal_uLong WW8PLCFx_PCDAttrs::GetIdx() const
-{
- return 0;
-}
-
-void WW8PLCFx_PCDAttrs::SetIdx( sal_uLong )
-{
-}
-
-bool WW8PLCFx_PCDAttrs::SeekPos(WW8_CP )
-{
- return true;
-}
-
-WW8PLCFx& WW8PLCFx_PCDAttrs::operator ++( int )
-{
- return *this;
-}
-
-WW8_CP WW8PLCFx_PCDAttrs::Where()
-{
- return ( pPcd ) ? pPcd->Where() : LONG_MAX;
-}
-
-void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
-{
- void* pData;
-
- p->bRealLineEnd = false;
- if ( !pPcdI || !pPcdI->Get(p->nStartPos, p->nEndPos, pData) )
- {
- // PLCF fully processed
- p->nStartPos = p->nEndPos = LONG_MAX;
- p->pMemPos = 0;
- p->nSprmsLen = 0;
- return;
- }
-
- sal_uInt16 nPrm = SVBT16ToShort( ( (WW8_PCD*)pData )->prm );
- if ( nPrm & 1 )
- {
- // PRM Variant 2
- sal_uInt16 nSprmIdx = nPrm >> 1;
-
- if( nSprmIdx >= nGrpprls )
- {
- // Invalid Index
- p->nStartPos = p->nEndPos = LONG_MAX;
- p->pMemPos = 0;
- p->nSprmsLen = 0;
- return;
- }
- const sal_uInt8* pSprms = pGrpprls[ nSprmIdx ];
-
- p->nSprmsLen = SVBT16ToShort( pSprms ); // Length
- pSprms += 2;
- p->pMemPos = pSprms; // Position
- }
- else
- {
- // PRM Variante 1: Sprm wird direkt in Member-Var abgelegt
- /*
- Dies sind die Attr, die in der Piece-Table stehen, statt im Text !
- */
-
- if(8 > GetVersion())
- {
- aShortSprm[0] = (sal_uInt8)( ( nPrm & 0xfe) >> 1 );
- aShortSprm[1] = (sal_uInt8)( nPrm >> 8 );
- p->nSprmsLen = ( nPrm ) ? 2 : 0; // Laenge
-
- // store Postion of internal mini storage in Data Pointer
- p->pMemPos = aShortSprm;
- }
- else
- {
- p->pMemPos = 0;
- p->nSprmsLen = 0;
- sal_uInt8 nSprmListIdx = (sal_uInt8)((nPrm & 0xfe) >> 1);
- if( nSprmListIdx )
- {
- // process Sprm Id Matching as explained in MS Doku
- //
- // ''Property Modifier(variant 1) (PRM)''
- // see file: s62f39.htm
- //
- // Since isprm is 7 bits, rgsprmPrm can hold 0x80 entries.
- static const sal_uInt16 aSprmId[0x80] =
- {
- // sprmNoop, sprmNoop, sprmNoop, sprmNoop
- 0x0000,0x0000,0x0000,0x0000,
- // sprmPIncLvl, sprmPJc, sprmPFSideBySide, sprmPFKeep
- 0x2402,0x2403,0x2404,0x2405,
- // sprmPFKeepFollow, sprmPFPageBreakBefore, sprmPBrcl,
- // sprmPBrcp
- 0x2406,0x2407,0x2408,0x2409,
- // sprmPIlvl, sprmNoop, sprmPFNoLineNumb, sprmNoop
- 0x260A,0x0000,0x240C,0x0000,
- // sprmNoop, sprmNoop, sprmNoop, sprmNoop
- 0x0000,0x0000,0x0000,0x0000,
- // sprmNoop, sprmNoop, sprmNoop, sprmNoop
- 0x0000,0x0000,0x0000,0x0000,
- // sprmPFInTable, sprmPFTtp, sprmNoop, sprmNoop
- 0x2416,0x2417,0x0000,0x0000,
- // sprmNoop, sprmPPc, sprmNoop, sprmNoop
- 0x0000,0x261B,0x0000,0x0000,
- // sprmNoop, sprmNoop, sprmNoop, sprmNoop
- 0x0000,0x0000,0x0000,0x0000,
- // sprmNoop, sprmPWr, sprmNoop, sprmNoop
- 0x0000,0x2423,0x0000,0x0000,
- // sprmNoop, sprmNoop, sprmNoop, sprmNoop
- 0x0000,0x0000,0x0000,0x0000,
- // sprmPFNoAutoHyph, sprmNoop, sprmNoop, sprmNoop
- 0x242A,0x0000,0x0000,0x0000,
- // sprmNoop, sprmNoop, sprmPFLocked, sprmPFWidowControl
- 0x0000,0x0000,0x2430,0x2431,
- // sprmNoop, sprmPFKinsoku, sprmPFWordWrap,
- // sprmPFOverflowPunct
- 0x0000,0x2433,0x2434,0x2435,
- // sprmPFTopLinePunct, sprmPFAutoSpaceDE,
- // sprmPFAutoSpaceDN, sprmNoop
- 0x2436,0x2437,0x2438,0x0000,
- // sprmNoop, sprmPISnapBaseLine, sprmNoop, sprmNoop
- 0x0000,0x243B,0x000,0x0000,
- // sprmNoop, sprmCFStrikeRM, sprmCFRMark, sprmCFFldVanish
- 0x0000,0x0800,0x0801,0x0802,
- // sprmNoop, sprmNoop, sprmNoop, sprmCFData
- 0x0000,0x0000,0x0000,0x0806,
- // sprmNoop, sprmNoop, sprmNoop, sprmCFOle2
- 0x0000,0x0000,0x0000,0x080A,
- // sprmNoop, sprmCHighlight, sprmCFEmboss, sprmCSfxText
- 0x0000,0x2A0C,0x0858,0x2859,
- // sprmNoop, sprmNoop, sprmNoop, sprmCPlain
- 0x0000,0x0000,0x0000,0x2A33,
- // sprmNoop, sprmCFBold, sprmCFItalic, sprmCFStrike
- 0x0000,0x0835,0x0836,0x0837,
- // sprmCFOutline, sprmCFShadow, sprmCFSmallCaps, sprmCFCaps,
- 0x0838,0x0839,0x083a,0x083b,
- // sprmCFVanish, sprmNoop, sprmCKul, sprmNoop,
- 0x083C,0x0000,0x2A3E,0x0000,
- // sprmNoop, sprmNoop, sprmCIco, sprmNoop,
- 0x0000,0x0000,0x2A42,0x0000,
- // sprmCHpsInc, sprmNoop, sprmCHpsPosAdj, sprmNoop,
- 0x2A44,0x0000,0x2A46,0x0000,
- // sprmCIss, sprmNoop, sprmNoop, sprmNoop,
- 0x2A48,0x0000,0x0000,0x0000,
- // sprmNoop, sprmNoop, sprmNoop, sprmNoop,
- 0x0000,0x0000,0x0000,0x0000,
- // sprmNoop, sprmNoop, sprmNoop, sprmCFDStrike,
- 0x0000,0x0000,0x0000,0x2A53,
- // sprmCFImprint, sprmCFSpec, sprmCFObj, sprmPicBrcl,
- 0x0854,0x0855,0x0856,0x2E00,
- // sprmPOutLvl, sprmPFBiDi, sprmNoop, sprmNoop,
- 0x2640,0x2441,0x0000,0x0000,
- // sprmNoop, sprmNoop, sprmPPnbrRMarkNot
- 0x0000,0x0000,0x0000,0x0000
- };
-
- // find real Sprm Id:
- sal_uInt16 nSprmId = aSprmId[ nSprmListIdx ];
-
- if( nSprmId )
- {
- // move Sprm Id and Sprm Param to internal mini storage:
- aShortSprm[0] = (sal_uInt8)( ( nSprmId & 0x00ff) );
- aShortSprm[1] = (sal_uInt8)( ( nSprmId & 0xff00) >> 8 );
- aShortSprm[2] = (sal_uInt8)( nPrm >> 8 );
-
- // store Sprm Length in member:
- p->nSprmsLen = ( nPrm ) ? 3 : 0;
-
- // store Postion of internal mini storage in Data Pointer
- p->pMemPos = aShortSprm;
- }
- }
- }
- }
-}
-
-//------------------------------------------------------------------------
-
-WW8PLCFx_PCD::WW8PLCFx_PCD(sal_uInt8 nVersion, WW8PLCFpcd* pPLCFpcd,
- WW8_CP nStartCp, bool bVer67P)
- : WW8PLCFx(nVersion, false), nClipStart(-1)
-{
- // eigenen Iterator konstruieren
- pPcdI = new WW8PLCFpcd_Iter(*pPLCFpcd, nStartCp);
- bVer67= bVer67P;
-}
-
-WW8PLCFx_PCD::~WW8PLCFx_PCD()
-{
- // pPcd-Dtor which in called from WW8ScannerBase
- delete pPcdI;
-}
-
-sal_uLong WW8PLCFx_PCD::GetIMax() const
-{
- return pPcdI ? pPcdI->GetIMax() : 0;
-}
-
-sal_uLong WW8PLCFx_PCD::GetIdx() const
-{
- return pPcdI ? pPcdI->GetIdx() : 0;
-}
-
-void WW8PLCFx_PCD::SetIdx( sal_uLong nIdx )
-{
- if (pPcdI)
- pPcdI->SetIdx( nIdx );
-}
-
-bool WW8PLCFx_PCD::SeekPos(WW8_CP nCpPos)
-{
- return pPcdI ? pPcdI->SeekPos( nCpPos ) : false;
-}
-
-WW8_CP WW8PLCFx_PCD::Where()
-{
- return pPcdI ? pPcdI->Where() : LONG_MAX;
-}
-
-long WW8PLCFx_PCD::GetNoSprms( long& rStart, long& rEnd, long& rLen )
-{
- void* pData;
- rLen = 0;
-
- if ( !pPcdI || !pPcdI->Get(rStart, rEnd, pData) )
- {
- rStart = rEnd = LONG_MAX;
- return -1;
- }
- return pPcdI->GetIdx();
-}
-
-WW8PLCFx& WW8PLCFx_PCD::operator ++( int )
-{
- if (pPcdI)
- (*pPcdI)++;
- else
- ASSERT( !this, "pPcdI fehlt");
- return *this;
-}
-
-WW8_FC WW8PLCFx_PCD::AktPieceStartCp2Fc( WW8_CP nCp )
-{
- WW8_CP nCpStart, nCpEnd;
- void* pData;
-
- if ( !pPcdI->Get(nCpStart, nCpEnd, pData) )
- {
- ASSERT( !this, "AktPieceStartCp2Fc() with false Cp found (1)" );
- return LONG_MAX;
- }
-
- ASSERT( nCp >= nCpStart && nCp < nCpEnd,
- "AktPieceCp2Fc() with false Cp found (2)" );
-
- if( nCp < nCpStart )
- nCp = nCpStart;
- if( nCp >= nCpEnd )
- nCp = nCpEnd - 1;
-
- bool bIsUnicode = false;
- WW8_FC nFC = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
- if( !bVer67 )
- nFC = WW8PLCFx_PCD::TransformPieceAddress( nFC, bIsUnicode );
-
- return nFC + (nCp - nCpStart) * (bIsUnicode ? 2 : 1);
-}
-
-
-void WW8PLCFx_PCD::AktPieceFc2Cp( long& rStartPos, long& rEndPos,
- const WW8ScannerBase *pSBase )
-{
- //No point going anywhere with this
- if ((rStartPos == LONG_MAX) && (rEndPos == LONG_MAX))
- return;
-
- rStartPos = pSBase->WW8Fc2Cp( rStartPos );
- rEndPos = pSBase->WW8Fc2Cp( rEndPos );
-}
-
-WW8_CP WW8PLCFx_PCD::AktPieceStartFc2Cp( WW8_FC nStartPos )
-{
- WW8_CP nCpStart, nCpEnd;
- void* pData;
- if ( !pPcdI->Get( nCpStart, nCpEnd, pData ) )
- {
- ASSERT( !this, "AktPieceStartFc2Cp() - Fehler" );
- return LONG_MAX;
- }
- bool bIsUnicode = false;
- sal_Int32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
- if( !bVer67 )
- nFcStart = WW8PLCFx_PCD::TransformPieceAddress( nFcStart, bIsUnicode );
-
- sal_Int32 nUnicodeFactor = bIsUnicode ? 2 : 1;
-
- if( nStartPos < nFcStart )
- nStartPos = nFcStart;
-
- if( nStartPos >= nFcStart + (nCpEnd - nCpStart) * nUnicodeFactor )
- nStartPos = nFcStart + (nCpEnd - nCpStart - 1) * nUnicodeFactor;
-
- return nCpStart + (nStartPos - nFcStart) / nUnicodeFactor;
-}
-
-//-----------------------------------------
-// Hilfsroutinen fuer alle
-//-----------------------------------------
-
-DateTime WW8ScannerBase::WW8DTTM2DateTime(long lDTTM)
-{
- /*
- mint short :6 0000003F minutes (0-59)
- hr short :5 000007C0 hours (0-23)
- dom short :5 0000F800 days of month (1-31)
- mon short :4 000F0000 months (1-12)
- yr short :9 1FF00000 years (1900-2411)-1900
- wdy short :3 E0000000 weekday(Sunday=0
- Monday=1
- ( wdy can be ignored ) Tuesday=2
- Wednesday=3
- Thursday=4
- Friday=5
- Saturday=6)
- */
- DateTime aDateTime(Date( 0 ), Time( 0 ));
- if( lDTTM )
- {
- sal_uInt16 lMin = (sal_uInt16)(lDTTM & 0x0000003F);
- lDTTM >>= 6;
- sal_uInt16 lHour= (sal_uInt16)(lDTTM & 0x0000001F);
- lDTTM >>= 5;
- sal_uInt16 lDay = (sal_uInt16)(lDTTM & 0x0000001F);
- lDTTM >>= 5;
- sal_uInt16 lMon = (sal_uInt16)(lDTTM & 0x0000000F);
- lDTTM >>= 4;
- sal_uInt16 lYear= (sal_uInt16)(lDTTM & 0x000001FF) + 1900;
- aDateTime = DateTime(Date(lDay, lMon, lYear), Time(lHour, lMin));
- }
- return aDateTime;
-}
-
-short WW8_BRC::DetermineBorderProperties(bool bVer67, short *pSpace,
- sal_uInt8 *pCol, short *pIdx) const
-{
- /*
- Word does not factor the width of the border into the width/height
- stored in the information for graphic/table/object widths, so we need
- to figure out this extra width here and utilize the returned size in
- our calculations
- */
- short nMSTotalWidth;
- sal_uInt8 nCol;
- short nIdx,nSpace;
- if( bVer67 )
- {
- sal_uInt16 aBrc1 = SVBT16ToShort(aBits1);
- nCol = ((aBrc1 >> 6) & 0x1f); // aBor.ico
- nSpace = (aBrc1 & 0xF800) >> 11;
-
- nMSTotalWidth = aBrc1 & 0x07;
- nIdx = (aBrc1 & 0x18) >> 3;
- //Dashed/Dotted unsets double/thick
- if (nMSTotalWidth > 5)
- {
- nMSTotalWidth=1;
- nIdx = 1;
- }
- nMSTotalWidth *= nIdx;
- nMSTotalWidth *= 15;
- }
- else
- {
- nIdx = aBits1[1];
- nCol = aBits2[0]; // aBor.ico
- nSpace = aBits2[1] & 0x1F; //space between line and object
-
- //Specification in 8ths of a point, 1 Point = 20 Twips, so by 2.5
- nMSTotalWidth = aBits1[ 0 ] * 20 / 8;
-
- //Figure out the real size of the border according to word
- switch (nIdx)
- {
- //Note that codes over 25 are undocumented, and I can't create
- //these 4 here in the wild.
- default:
- case 2:
- case 4:
- case 5:
- case 22:
- DBG_WARNING("Can't create these from the menus, please report");
- case 1:
- case 6:
- case 7:
- case 8:
- case 9:
- case 23: //Only 3pt in the menus, but honours the size setting.
- break;
- case 3:
- /*
- double line is three times the width of an ordinary line,
- except for the smallest 1/4 point size which appears to have
- exactly the same total border width as a 1/2 point size
- ordinary line, i.e. twice the nominal line width
- */
- nMSTotalWidth = (nMSTotalWidth == 5) ?
- nMSTotalWidth*2 : nMSTotalWidth*3;
- break;
- case 10:
- /*
- triple line is five times the width of an ordinary line,
- except that the smallest 1/4 point size appears to have
- exactly the same total border width as a 3/4 point size
- ordinary line, i.e. three times the nominal line width. The
- second smallest 1/2 point size appears to have exactly the
- total border width as a 2 1/4 border, i.e 4.5 times the size.
- */
- if (nMSTotalWidth == 5)
- nMSTotalWidth*=3;
- else if (nMSTotalWidth == 10)
- nMSTotalWidth = nMSTotalWidth*9/2;
- else
- nMSTotalWidth*=5;
- break;
- case 11:
- case 12:
- /*
- small gap thin thick and thick thin appears to have a 3/4
- point line, a 3/4 point gap and a thick line of the specified
- width
- */
- nMSTotalWidth = nMSTotalWidth + 15*2;
- break;
- case 13:
- /*
- thin thick thin appears to have two outside 3/4 point lines,
- two 3/4 point gaps and a thick line of the specified width
- */
- nMSTotalWidth = nMSTotalWidth + 15*4;
- break;
- case 14:
- case 15:
- /*
- medium gap thin thick and thick thin appears to have a line
- 50% of the thick line, and an equal sized gap and then the
- thick line of the specified width. But it appears to only
- use one of the existing predefined widths for the thin line,
- so the closest smallest existing border to the halved thick
- line is used.
- */
- switch (nMSTotalWidth)
- {
- case 45: //2 1/4, closest to half is 1
- nMSTotalWidth += 20 + (nMSTotalWidth-1)/2;
- break;
- case 5:
- case 10:
- nMSTotalWidth += 5;
- break;
- case 15: //3/4, closest to half is 1/4
- nMSTotalWidth += 5 + (nMSTotalWidth-1)/2;
- break;
- default:
- nMSTotalWidth*=2;
- break;
- }
- break;
- case 16:
- /*
- medium gap thin thick thin appears to have a line
- 50% of the thick line, and an equal sized gap and then the
- thick line of the specified width. But it appears to only
- use one of the existing predefined widths for the thin
- line, so the closest smallest existing border to the halved
- thick line is used. Though some fudging at smaller sizes is
- still required.
- */
- switch (nMSTotalWidth)
- {
- case 45: //2 1/4, closest to half is 1
- nMSTotalWidth += nMSTotalWidth + 20 * 2;
- break;
- case 20:
- case 15:
- nMSTotalWidth += nMSTotalWidth + 7 * 2;
- break;
- case 10:
- case 5:
- nMSTotalWidth += 5 + 4;
- break;
- default:
- nMSTotalWidth*=3;
- break;
- }
- break;
- case 17:
- case 18:
- /*
- large gap thin thick and thick thin appears to have a thick
- line of 1 1/2 pt and a narrow of 3/4 point, with a distance
- between the two of the explicitly set line width
- */
- nMSTotalWidth+=15+30;
- break;
- case 19:
- /*
- large gap thin thick thin appears to have a thick line of 1
- 1/2 pt and two narrows of 3/4 point, with a distance between
- the two of the explicitly set line width, though the narrowest
- line appears to behave as if it was even smaller
- */
- if (nMSTotalWidth == 5)
- nMSTotalWidth = 3;
- nMSTotalWidth = nMSTotalWidth*2 + 15*2 + 30;
- break;
- case 20:
- /*
- wave, the dimensions appear to be created by the drawing of
- the wave, so we have only two possibilites in the menus, 3/4
- point is equal to solid 3 point. This calculation seems to
- match well to results.
- */
- nMSTotalWidth +=45;
- break;
- case 21:
- /*
- double wave, the dimensions appear to be created by the
- drawing of the wave, so we have only one possibilites in the
- menus, that of 3/4 point is equal to solid 3 point. This
- calculation seems to match well to results.
- */
- nMSTotalWidth += 45*2;
- break;
- case 24:
- case 25:
- /*
- emboss and engrave consist of a three lines, the central is of
- the explicit point width, the other two (of equal size to each
- other are the shadows and are either 3/4 pt of 1 1/2 depending
- on if the central line is greater of less than 2 1/4 pt
- */
- if (nMSTotalWidth <= 45)
- nMSTotalWidth += 2*15;
- else
- nMSTotalWidth += 2*30;
- break;
- }
- }
-
- if (pIdx)
- *pIdx = nIdx;
- if (pSpace)
- *pSpace = nSpace*20;
- if (pCol)
- *pCol = nCol;
- return nMSTotalWidth;
-}
-
-WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
-{
- WW8_CP nFallBackCpEnd = LONG_MAX;
- if( nFcPos == LONG_MAX )
- return nFallBackCpEnd;
-
- bool bIsUnicode = false;
- if( pPieceIter ) // Complex File ?
- {
- sal_uLong nOldPos = pPieceIter->GetIdx();
-
- for (pPieceIter->SetIdx(0);
- pPieceIter->GetIdx() < pPieceIter->GetIMax();(*pPieceIter)++)
- {
- long nCpStart, nCpEnd;
- void* pData;
- if( !pPieceIter->Get( nCpStart, nCpEnd, pData ) )
- { // ausserhalb PLCFfpcd ?
- ASSERT( !this, "PLCFpcd-WW8Fc2Cp() ging schief" );
- break;
- }
- sal_Int32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
- if( 8 <= pWw8Fib->nVersion )
- nFcStart = WW8PLCFx_PCD::TransformPieceAddress( nFcStart,
- bIsUnicode );
- sal_Int32 nLen = (nCpEnd - nCpStart) * (bIsUnicode ? 2 : 1);
-
- /*
- If this cp is inside this piece, or its the last piece and we are
- on the very last cp of that piece
- */
- if (nFcPos >= nFcStart)
- {
- // found
- WW8_CP nTempCp =
- nCpStart + ((nFcPos - nFcStart) / (bIsUnicode ? 2 : 1));
- if (nFcPos < nFcStart + nLen)
- {
- pPieceIter->SetIdx( nOldPos );
- return nTempCp;
- }
- else if (nFcPos == nFcStart + nLen)
- {
- //Keep this cp as its on a piece boundary because we might
- //need it if tests fail
- nFallBackCpEnd = nTempCp;
- }
- }
- }
- // not found
- pPieceIter->SetIdx( nOldPos ); // not found
- /*
- If it was not found, then this is because it has fallen between two
- stools, i.e. either it is the last cp/fc of the last piece, or it is
- the last cp/fc of a disjoint piece.
- */
- return nFallBackCpEnd;
- }
- // No complex file
- if (pWw8Fib->fExtChar)
- bIsUnicode=true;
- return ((nFcPos - pWw8Fib->fcMin) / (bIsUnicode ? 2 : 1));
-}
-
-WW8_FC WW8ScannerBase::WW8Cp2Fc(WW8_CP nCpPos, bool* pIsUnicode,
- WW8_CP* pNextPieceCp, bool* pTestFlag) const
-{
- if( pTestFlag )
- *pTestFlag = true;
- if( LONG_MAX == nCpPos )
- return LONG_MAX;
-
- bool bIsUnicode;
- if( !pIsUnicode )
- pIsUnicode = &bIsUnicode;
-
- if( pPieceIter )
- { // Complex File
- if( pNextPieceCp )
- *pNextPieceCp = LONG_MAX;
-
- if( !pPieceIter->SeekPos( nCpPos ) )
- {
- if( pTestFlag )
- *pTestFlag = false;
- else
- ASSERT( !this, "Falscher CP an WW8Cp2Fc() uebergeben" );
- return LONG_MAX;
- }
- long nCpStart, nCpEnd;
- void* pData;
- if( !pPieceIter->Get( nCpStart, nCpEnd, pData ) )
- {
- if( pTestFlag )
- *pTestFlag = false;
- else
- ASSERT( !this, "PLCFfpcd-Get ging schief" );
- return LONG_MAX;
- }
- if( pNextPieceCp )
- *pNextPieceCp = nCpEnd;
-
- WW8_FC nRet = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
- if (8 > pWw8Fib->nVersion)
- *pIsUnicode = false;
- else
- nRet = WW8PLCFx_PCD::TransformPieceAddress( nRet, *pIsUnicode );
-
-
- nRet += (nCpPos - nCpStart) * (*pIsUnicode ? 2 : 1);
-
- return nRet;
- }
-
- // No complex file
- if (pWw8Fib->fExtChar)
- *pIsUnicode = true;
- else
- *pIsUnicode = false;
- return pWw8Fib->fcMin + nCpPos * (*pIsUnicode ? 2 : 1);
-}
-
-//-----------------------------------------
-// class WW8ScannerBase
-//-----------------------------------------
-
-WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
-{
- if ( ((8 > pWw8Fib->nVersion) && !pWwF->fComplex) || !pWwF->lcbClx )
- return 0;
-
- WW8_FC nClxPos = pWwF->fcClx;
- sal_Int32 nClxLen = pWwF->lcbClx;
- sal_Int32 nLeft = nClxLen;
- sal_Int16 nGrpprl = 0;
- sal_uInt8 clxt;
-
- pStr->Seek( nClxPos );
- while( 1 ) // Zaehle Zahl der Grpprls
- {
- *pStr >> clxt;
- nLeft--;
- if( 2 == clxt ) // PLCFfpcd ?
- break; // PLCFfpcd gefunden
- if( 1 == clxt ) // clxtGrpprl ?
- nGrpprl++;
- sal_uInt16 nLen;
- *pStr >> nLen;
- nLeft -= 2 + nLen;
- if( nLeft < 0 )
- return 0; // schiefgegangen
- pStr->SeekRel( nLen ); // ueberlies grpprl
- }
- pStr->Seek( nClxPos );
- nLeft = nClxLen;
- pPieceGrpprls = new sal_uInt8*[nGrpprl + 1];
- memset( pPieceGrpprls, 0, ( nGrpprl + 1 ) * 4 );
- nPieceGrpprls = nGrpprl;
- sal_Int16 nAktGrpprl = 0; // lies Grpprls ein
- while( 1 )
- {
- *pStr >> clxt;
- nLeft--;
- if( 2 == clxt) // PLCFfpcd ?
- break; // PLCFfpcd gefunden
- sal_uInt16 nLen;
- *pStr >> nLen;
- nLeft -= 2 + nLen;
- if( nLeft < 0 )
- return 0; // schiefgegangen
- if( 1 == clxt ) // clxtGrpprl ?
- {
- sal_uInt8* p = new sal_uInt8[nLen+2]; // alloziere
- ShortToSVBT16(nLen, p); // trage Laenge ein
- pStr->Read( p+2, nLen ); // lies grpprl
- pPieceGrpprls[nAktGrpprl++] = p; // trage in Array ein
- }
- else
- pStr->SeekRel( nLen ); // ueberlies nicht-Grpprl
- }
- // lies Piece Table PLCF ein
- sal_Int32 nPLCFfLen;
- *pStr >> nPLCFfLen;
- ASSERT( 65536 > nPLCFfLen, "PLCFfpcd ueber 64 k" );
- return new WW8PLCFpcd( pStr, pStr->Tell(), nPLCFfLen, 8 );
-}
-
-void WW8ScannerBase::DeletePieceTable()
-{
- if( pPieceGrpprls )
- {
- for( sal_uInt8** p = pPieceGrpprls; *p; p++ )
- delete[] (*p);
- delete[] pPieceGrpprls;
- pPieceGrpprls = 0;
- }
-}
-
-WW8ScannerBase::WW8ScannerBase( SvStream* pSt, SvStream* pTblSt,
- SvStream* pDataSt, const WW8Fib* pWwFib )
- : pWw8Fib(pWwFib), pMainFdoa(0), pHdFtFdoa(0), pMainTxbx(0),
- pMainTxbxBkd(0), pHdFtTxbx(0), pHdFtTxbxBkd(0), pMagicTables(0),
- pPieceGrpprls(0)
-{
- pPiecePLCF = OpenPieceTable( pTblSt, pWw8Fib ); // Complex
- if( pPiecePLCF )
- {
- pPieceIter = new WW8PLCFpcd_Iter( *pPiecePLCF );
- pPLCFx_PCD = new WW8PLCFx_PCD( pWwFib->nVersion, pPiecePLCF, 0,
- 8 > pWw8Fib->nVersion );
- pPLCFx_PCDAttrs = new WW8PLCFx_PCDAttrs( pWwFib->nVersion, pPLCFx_PCD,
- this);
- }
- else
- {
- pPieceIter = 0;
- pPLCFx_PCD = 0;
- pPLCFx_PCDAttrs = 0;
- }
-
- // pChpPLCF and pPapPLCF may NOT be created before pPLCFx_PCD !!
- pChpPLCF = new WW8PLCFx_Cp_FKP( pSt, pTblSt, pDataSt, *this, CHP ); // CHPX
- pPapPLCF = new WW8PLCFx_Cp_FKP( pSt, pTblSt, pDataSt, *this, PAP ); // PAPX
-
- pSepPLCF = new WW8PLCFx_SEPX( pSt, pTblSt, *pWwFib, 0 ); // SEPX
-
- // Footnotes
- pFtnPLCF = new WW8PLCFx_SubDoc( pTblSt, pWwFib->nVersion, 0,
- pWwFib->fcPlcffndRef, pWwFib->lcbPlcffndRef, pWwFib->fcPlcffndTxt,
- pWwFib->lcbPlcffndTxt, 2 );
- // Endnotes
- pEdnPLCF = new WW8PLCFx_SubDoc( pTblSt, pWwFib->nVersion, 0,
- pWwFib->fcPlcfendRef, pWwFib->lcbPlcfendRef, pWwFib->fcPlcfendTxt,
- pWwFib->lcbPlcfendTxt, 2 );
- // Anmerkungen
- pAndPLCF = new WW8PLCFx_SubDoc( pTblSt, pWwFib->nVersion, 0,
- pWwFib->fcPlcfandRef, pWwFib->lcbPlcfandRef, pWwFib->fcPlcfandTxt,
- pWwFib->lcbPlcfandTxt, (8 > pWwFib->nVersion) ? 20 : 30 );
-
- // Fields Main Text
- pFldPLCF = new WW8PLCFx_FLD(pTblSt, *pWwFib, MAN_MAINTEXT);
- // Fields Header / Footer
- pFldHdFtPLCF= new WW8PLCFx_FLD(pTblSt, *pWwFib, MAN_HDFT);
- // Fields Footnote
- pFldFtnPLCF = new WW8PLCFx_FLD(pTblSt, *pWwFib, MAN_FTN);
- // Fields Endnote
- pFldEdnPLCF = new WW8PLCFx_FLD(pTblSt, *pWwFib, MAN_EDN);
- // Fields Anmerkungen
- pFldAndPLCF = new WW8PLCFx_FLD(pTblSt, *pWwFib, MAN_AND);
- // Fields in Textboxes in Main Text
- pFldTxbxPLCF= new WW8PLCFx_FLD(pTblSt, *pWwFib, MAN_TXBX);
- // Fields in Textboxes in Header / Footer
- pFldTxbxHdFtPLCF = new WW8PLCFx_FLD(pTblSt,*pWwFib,MAN_TXBX_HDFT);
-
- // Note: 6 stands for "6 OR 7", 7 stands for "ONLY 7"
- switch( pWw8Fib->nVersion )
- {
- case 6:
- case 7:
- if( pWwFib->fcPlcfdoaMom && pWwFib->lcbPlcfdoaMom )
- {
- pMainFdoa = new WW8PLCFspecial( pTblSt, pWwFib->fcPlcfdoaMom,
- pWwFib->lcbPlcfdoaMom, 6 );
- }
- if( pWwFib->fcPlcfdoaHdr && pWwFib->lcbPlcfdoaHdr )
- {
- pHdFtFdoa = new WW8PLCFspecial( pTblSt, pWwFib->fcPlcfdoaHdr,
- pWwFib->lcbPlcfdoaHdr, 6 );
- }
- break;
- case 8:
- if( pWwFib->fcPlcfspaMom && pWwFib->lcbPlcfspaMom )
- {
- pMainFdoa = new WW8PLCFspecial( pTblSt, pWwFib->fcPlcfspaMom,
- pWwFib->lcbPlcfspaMom, 26 );
- }
- if( pWwFib->fcPlcfspaHdr && pWwFib->lcbPlcfspaHdr )
- {
- pHdFtFdoa = new WW8PLCFspecial( pTblSt, pWwFib->fcPlcfspaHdr,
- pWwFib->lcbPlcfspaHdr, 26 );
- }
- // PLCF fuer TextBox-Break-Deskriptoren im Maintext
- if( pWwFib->fcPlcftxbxBkd && pWwFib->lcbPlcftxbxBkd )
- {
- pMainTxbxBkd = new WW8PLCFspecial( pTblSt,
- pWwFib->fcPlcftxbxBkd, pWwFib->lcbPlcftxbxBkd, 0);
- }
- // PLCF fuer TextBox-Break-Deskriptoren im Header-/Footer-Bereich
- if( pWwFib->fcPlcfHdrtxbxBkd && pWwFib->lcbPlcfHdrtxbxBkd )
- {
- pHdFtTxbxBkd = new WW8PLCFspecial( pTblSt,
- pWwFib->fcPlcfHdrtxbxBkd, pWwFib->lcbPlcfHdrtxbxBkd, 0);
- }
- // Sub table cp positions
- if (pWwFib->fcMagicTable && pWwFib->lcbMagicTable)
- {
- pMagicTables = new WW8PLCFspecial( pTblSt,
- pWwFib->fcMagicTable, pWwFib->lcbMagicTable, 4);
- }
- break;
- default:
- ASSERT( !this, "Es wurde vergessen, nVersion zu kodieren!" );
- break;
- }
-
- // PLCF fuer TextBox-Stories im Maintext
- long nLenTxBxS = (8 > pWw8Fib->nVersion) ? 0 : 22;
- if( pWwFib->fcPlcftxbxTxt && pWwFib->lcbPlcftxbxTxt )
- {
- pMainTxbx = new WW8PLCFspecial( pTblSt, pWwFib->fcPlcftxbxTxt,
- pWwFib->lcbPlcftxbxTxt, nLenTxBxS );
- }
-
- // PLCF fuer TextBox-Stories im Header-/Footer-Bereich
- if( pWwFib->fcPlcfHdrtxbxTxt && pWwFib->lcbPlcfHdrtxbxTxt )
- {
- pHdFtTxbx = new WW8PLCFspecial( pTblSt, pWwFib->fcPlcfHdrtxbxTxt,
- pWwFib->lcbPlcfHdrtxbxTxt, nLenTxBxS );
- }
-
- pBook = new WW8PLCFx_Book(pTblSt, *pWwFib);
-}
-
-WW8ScannerBase::~WW8ScannerBase()
-{
- DeletePieceTable();
- delete pPLCFx_PCDAttrs;
- delete pPLCFx_PCD;
- delete pPieceIter;
- delete pPiecePLCF;
- delete pBook;
- delete pFldEdnPLCF;
- delete pFldFtnPLCF;
- delete pFldAndPLCF;
- delete pFldHdFtPLCF;
- delete pFldPLCF;
- delete pFldTxbxPLCF;
- delete pFldTxbxHdFtPLCF;
- delete pEdnPLCF;
- delete pFtnPLCF;
- delete pAndPLCF;
- delete pSepPLCF;
- delete pPapPLCF;
- delete pChpPLCF;
- // vergessene Schaeflein
- delete pMainFdoa;
- delete pHdFtFdoa;
- delete pMainTxbx;
- delete pMainTxbxBkd;
- delete pHdFtTxbx;
- delete pHdFtTxbxBkd;
- delete pMagicTables;
-}
-
-//-----------------------------------------
-// Fields
-//-----------------------------------------
-static bool WW8SkipField(WW8PLCFspecial& rPLCF)
-{
- void* pData;
- long nP;
-
- if (!rPLCF.Get(nP, pData)) // Ende des PLCFspecial ?
- return false;
-
- rPLCF++;
-
- if((((sal_uInt8*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
- return true; // Bei Fehler nicht abbrechen
-
- if( !rPLCF.Get( nP, pData ) )
- return false;
-
-
- while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
- {
- // immer noch neue (nested) Anfaenge ?
- WW8SkipField( rPLCF ); // nested Field im Beschreibungsteil
- if( !rPLCF.Get( nP, pData ) )
- return false;
- }
-
- if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x14 )
- {
-
- // Field Separator ?
- rPLCF++;
-
- if( !rPLCF.Get( nP, pData ) )
- return false;
-
- while ((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13)
- {
- // immer noch neue (nested) Anfaenge ?
- WW8SkipField( rPLCF ); // nested Field im Resultatteil
- if( !rPLCF.Get( nP, pData ) )
- return false;
- }
- }
- rPLCF++;
-
- return true;
-}
-
-static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
-{
- void* pData;
- sal_uLong nOldIdx = rPLCF.GetIdx();
-
- rF.nLen = rF.nId = rF.nOpt = rF.bCodeNest = rF.bResNest = 0;
-
- if( !rPLCF.Get( rF.nSCode, pData ) ) // Ende des PLCFspecial ?
- goto Err;
-
- rPLCF++;
-
- if((((sal_uInt8*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
- goto Err;
-
- rF.nId = ((sal_uInt8*)pData)[1];
-
- if( !rPLCF.Get( rF.nLCode, pData ) )
- goto Err;
-
- rF.nSRes = rF.nLCode; // Default
- rF.nSCode++; // ohne Marken
- rF.nLCode -= rF.nSCode; // Pos zu Laenge
-
- while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
- {
- // immer noch neue (nested) Anfaenge ?
- WW8SkipField( rPLCF ); // nested Field im Beschreibungsteil
- rF.bCodeNest = true;
- if( !rPLCF.Get( rF.nSRes, pData ) )
- goto Err;
- }
-
- if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x14 ){ // Field Separator ?
- rPLCF++;
-
- if( !rPLCF.Get( rF.nLRes, pData ) )
- goto Err;
-
- while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
- {
- // immer noch neue (nested) Anfaenge ?
- WW8SkipField( rPLCF ); // nested Field im Resultatteil
- rF.bResNest = true;
- if( !rPLCF.Get( rF.nLRes, pData ) )
- goto Err;
- }
- rF.nLen = rF.nLRes - rF.nSCode + 2; // nLRes ist noch die Endposition
- rF.nLRes -= rF.nSRes; // nun: nLRes = Laenge
- rF.nSRes++; // Endpos encl. Marken
- rF.nLRes--;
-
- }else{
- rF.nLRes = 0; // Kein Result vorhanden
- rF.nLen = rF.nSRes - rF.nSCode + 2; // Gesamtlaenge
- }
-
- rPLCF++;
- if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x15 )
- {
- // Field Ende ?
- // INDEX-Fld hat Bit7 gesetzt!?!
- rF.nOpt = ((sal_uInt8*)pData)[1]; // Ja -> Flags uebernehmen
- }else{
- rF.nId = 0; // Nein -> Feld ungueltig
- }
-
- rPLCF.SetIdx( nOldIdx );
- return true;
-Err:
- rPLCF.SetIdx( nOldIdx );
- return false;
-}
-
-
-//-----------------------------------------
-
-
-// WW8ReadPString liest einen Pascal-String ein und gibt ihn zurueck. Der
-// Pascal- String hat am Ende ein \0, der aber im Laengenbyte nicht
-// mitgezaehlt wird. Der Speicher fuer den Pascalstring wird alloziert.
-String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
- bool bAtEndSeekRel1)
-{
- ByteString aByteStr;
- sal_uInt8 b;
- rStrm >> b;
-
- if (b)
- {
- // Alloc methode automatically sets Zero at the end
- sal_Char* pByteData = aByteStr.AllocBuffer( b );
-
- sal_uLong nWasRead = rStrm.Read( pByteData, b );
- if( nWasRead != b )
- aByteStr.ReleaseBufferAccess(static_cast<xub_StrLen>(nWasRead));
- }
-
- if( bAtEndSeekRel1 )
- rStrm.SeekRel( 1 ); // ueberspringe das Null-Byte am Ende.
-
-
- return String( aByteStr, eEnc );
-}
-
-String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1)
-{
- sal_uInt16 b;
-
- if( nChars )
- b = nChars;
- else
- rStrm >> b;
-
- String aStr;
- if (b)
- {
- // Alloc methode automatically sets Zero at the end
- sal_Unicode* pData = aStr.AllocBuffer( b );
-
- sal_uLong nWasRead = rStrm.Read( (sal_Char*)pData, b * 2 );
- if( nWasRead != static_cast<sal_uLong>(b*2) )
- {
- b = static_cast<sal_uInt16>(nWasRead / 2);
- aStr.ReleaseBufferAccess( b );
- pData = aStr.GetBufferAccess();
- }
-
-#ifdef OSL_BIGENDIAN
- sal_uLong n;
- sal_Unicode *pWork;
- for( n = 0, pWork = pData; n < b; ++n, ++pWork )
- *pWork = SWAPSHORT( *pWork );
-#endif // ifdef OSL_BIGENDIAN
- }
-
- if( bAtEndSeekRel1 )
- rStrm.SeekRel( 2 ); // ueberspringe das Null-Character am Ende.
-
- return aStr;
-}
-
-static sal_uLong SafeReadString(ByteString &rStr,sal_uInt16 nLen,SvStream &rStrm)
-{
- sal_uLong nWasRead=0;
- if (nLen)
- {
- nWasRead = rStrm.Read( rStr.AllocBuffer( nLen ), nLen);
- if( nWasRead != nLen )
- rStr.ReleaseBufferAccess(static_cast<xub_StrLen>(nWasRead));
- }
- return nWasRead;
-}
-
-sal_uInt16 WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr,
- WW8_CP nAktStartCp, long nTotalLen, rtl_TextEncoding eEnc ) const
-{
- // Klartext einlesen, der sich ueber mehrere Pieces erstrecken kann
- rStr.Erase();
-
- long nTotalRead = 0;
- WW8_CP nBehindTextCp = nAktStartCp + nTotalLen;
- WW8_CP nNextPieceCp = nBehindTextCp; // Initialisierung wichtig fuer Ver6
- do
- {
- bool bIsUnicode, bPosOk;
- WW8_FC fcAct = WW8Cp2Fc(nAktStartCp,&bIsUnicode,&nNextPieceCp,&bPosOk);
-
- // vermutlich uebers Dateiende hinaus gezielt, macht nix!
- if( !bPosOk )
- break;
-
- rStrm.Seek( fcAct );
-
- long nLen = ( (nNextPieceCp < nBehindTextCp) ? nNextPieceCp
- : nBehindTextCp ) - nAktStartCp;
-
- if( 0 >= nLen )
- break;
-
- if( nLen > USHRT_MAX - 1 )
- nLen = USHRT_MAX - 1;
-
- if( bIsUnicode )
- rStr.Append(WW8Read_xstz(rStrm, (sal_uInt16)nLen, false));
- else
- {
- // Alloc method automatically sets Zero at the end
- ByteString aByteStr;
- SafeReadString(aByteStr,(sal_uInt16)nLen,rStrm);
- rStr += String( aByteStr, eEnc );
- }
- nTotalRead += nLen;
- nAktStartCp += nLen;
- if ( nTotalRead != rStr.Len() )
- break;
- }
- while( nTotalRead < nTotalLen );
-
- return rStr.Len();
-}
-
-//-----------------------------------------
-// WW8PLCFspecial
-//-----------------------------------------
-
-// Bei nStartPos < 0 wird das erste Element des PLCFs genommen
-WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
- long nStruct, long nStartPos, bool bNoEnd)
- : nIdx(0), nStru(nStruct)
-{
- nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
- // Pointer auf Pos- u. Struct-Array
- pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ];
-
- long nOldPos = pSt->Tell();
-
- pSt->Seek( nFilePos );
- pSt->Read( pPLCF_PosArray, nPLCF );
-#ifdef OSL_BIGENDIAN
- for( nIdx = 0; nIdx <= nIMax; nIdx++ )
- pPLCF_PosArray[nIdx] = SWAPLONG( pPLCF_PosArray[nIdx] );
- nIdx = 0;
-#endif // OSL_BIGENDIAN
- if( bNoEnd )
- nIMax++;
- if( nStruct ) // Pointer auf Inhalts-Array
- pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
- else
- pPLCF_Contents = 0; // kein Inhalt
- if( nStartPos >= 0 )
- SeekPos( nStartPos );
-
- pSt->Seek( nOldPos );
-}
-
-// WW8PLCFspecial::SeekPos() stellt den WW8PLCFspecial auf die Stelle nPos, wobei auch noch der
-// Eintrag benutzt wird, der vor nPos beginnt und bis hinter nPos reicht.
-// geeignet fuer normale Attribute. Allerdings wird der Attributanfang nicht
-// auf die Position nPos korrigiert.
-bool WW8PLCFspecial::SeekPos(long nP)
-{
- if( nP < pPLCF_PosArray[0] )
- {
- nIdx = 0;
- return false; // Not found: nP unterhalb kleinstem Eintrag
- }
-
- // Search from beginning?
- if( (1 > nIdx) || (nP < pPLCF_PosArray[ nIdx-1 ]) )
- nIdx = 1;
-
- long nI = nIdx ? nIdx : 1;
- long nEnd = nIMax;
-
- for(int n = (1==nIdx ? 1 : 2); n; --n )
- {
- for( ; nI <=nEnd; ++nI)
- { // Suchen mit um 1 erhoehtem Index
- if( nP < pPLCF_PosArray[nI] )
- { // Position gefunden
- nIdx = nI - 1; // nI - 1 ist der richtige Index
- return true; // ... und fertig
- }
- }
- nI = 1;
- nEnd = nIdx-1;
- }
- nIdx = nIMax; // Nicht gefunden, groesser als alle Eintraege
- return false;
-}
-
-// WW8PLCFspecial::SeekPosExact() wie SeekPos(), aber es wird sichergestellt,
-// dass kein Attribut angeschnitten wird, d.h. das naechste gelieferte
-// Attribut beginnt auf oder hinter nPos. Wird benutzt fuer Felder +
-// Bookmarks.
-bool WW8PLCFspecial::SeekPosExact(long nP)
-{
- if( nP < pPLCF_PosArray[0] )
- {
- nIdx = 0;
- return false; // Not found: nP unterhalb kleinstem Eintrag
- }
- // Search from beginning?
- if( nP <=pPLCF_PosArray[nIdx] )
- nIdx = 0;
-
- long nI = nIdx ? nIdx-1 : 0;
- long nEnd = nIMax;
-
- for(int n = (0==nIdx ? 1 : 2); n; --n )
- {
- for( ; nI < nEnd; ++nI)
- {
- if( nP <=pPLCF_PosArray[nI] )
- { // Position gefunden
- nIdx = nI; // nI ist der richtige Index
- return true; // ... und fertig
- }
- }
- nI = 0;
- nEnd = nIdx;
- }
- nIdx = nIMax; // Not found, groesser als alle Eintraege
- return false;
-}
-
-bool WW8PLCFspecial::Get(long& rPos, void*& rpValue) const
-{
- return GetData( nIdx, rPos, rpValue );
-}
-
-bool WW8PLCFspecial::GetData(long nInIdx, long& rPos, void*& rpValue) const
-{
- if ( nInIdx >= nIMax )
- {
- rPos = LONG_MAX;
- return false;
- }
- rPos = pPLCF_PosArray[nInIdx];
- rpValue = pPLCF_Contents ? (void*)&pPLCF_Contents[nInIdx * nStru] : 0;
- return true;
-}
-
-//-----------------------------------------
-// WW8PLCF z.B. fuer SEPX
-//-----------------------------------------
-
-// Ctor fuer *andere* als Fkps
-// Bei nStartPos < 0 wird das erste Element des PLCFs genommen
-WW8PLCF::WW8PLCF( SvStream* pSt, long nFilePos, long nPLCF, long nStruct,
- long nStartPos ) :nIdx( 0 ), nStru( nStruct )
-{
- ASSERT( nPLCF, "WW8PLCF: nPLCF ist Null!" );
-
- nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
-
- ReadPLCF( pSt, nFilePos, nPLCF );
-
- if( nStartPos >= 0 )
- SeekPos( nStartPos );
-}
-
-// Ctor *nur* fuer Fkps
-// Die letzten 2 Parameter sind fuer PLCF.Chpx und PLCF.Papx noetig. ist ncpN
-// != 0, dann wird ein unvollstaendiger PLCF vervollstaendigt. Das ist bei
-// WW6 bei Resourcenmangel und bei WordPad (W95) immer noetig. Bei nStartPos
-// < 0 wird das erste Element des PLCFs genommen
-WW8PLCF::WW8PLCF( SvStream* pSt, long nFilePos, long nPLCF, long nStruct,
- long nStartPos, long nPN, long ncpN ) :nIdx( 0 ), nStru( nStruct )
-{
- nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
-
- if( nIMax >= (long) ncpN )
- ReadPLCF( pSt, nFilePos, nPLCF );
- else
- GeneratePLCF( pSt, nPN, ncpN );
-
- if( nStartPos >= 0 )
- SeekPos( nStartPos );
-}
-
-void WW8PLCF::ReadPLCF( SvStream* pSt, long nFilePos, long nPLCF )
-{
- // Pointer auf Pos-Array
- pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ];
-
- long nOldPos = pSt->Tell();
-
- pSt->Seek( nFilePos );
- pSt->Read( pPLCF_PosArray, nPLCF );
-#ifdef OSL_BIGENDIAN
- for( nIdx = 0; nIdx <= nIMax; nIdx++ )
- pPLCF_PosArray[nIdx] = SWAPLONG( pPLCF_PosArray[nIdx] );
- nIdx = 0;
-#endif // OSL_BIGENDIAN
- // Pointer auf Inhalts-Array
- pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
-
- pSt->Seek( nOldPos );
-}
-
-void WW8PLCF::GeneratePLCF( SvStream* pSt, long nPN, long ncpN )
-{
- ASSERT( nIMax < (long)ncpN, "Pcl.Fkp: Warum ist PLCF zu gross ?" );
- nIMax = ncpN;
- long nSiz = 6 * nIMax + 4;
- pPLCF_PosArray = new sal_Int32[ ( nSiz + 3 ) / 4 ]; // Pointer auf Pos-Array
- memset( pPLCF_PosArray, 0, (size_t)nSiz );
-
- sal_Int32 nFc;
- sal_uInt16 i;
-
- for( i = 0; i < ncpN; i++ ){ // Baue FC-Eintraege
- pSt->Seek( ( nPN + i ) << 9 ); // erster FC-Eintrag jedes Fkp
- *pSt >> nFc;
- pPLCF_PosArray[i] = nFc;
- }
- sal_uLong nLastFkpPos = ( ( nPN + nIMax - 1 ) << 9 );
- pSt->Seek( nLastFkpPos + 511 ); // Anz. Fkp-Eintraege des letzten Fkp
- sal_uInt8 nb;
- *pSt >> nb;
- pSt->Seek( nLastFkpPos + nb * 4 ); // letzer FC-Eintrag des letzten Fkp
- *pSt >> nFc;
- pPLCF_PosArray[nIMax] = nFc; // Ende des letzten Fkp
-
- // Pointer auf Inhalts-Array
- pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
- sal_uInt8* p = pPLCF_Contents;
-
- for( i = 0; i < ncpN; i++ ) // Baue PNs
- {
- ShortToSVBT16(nPN + i, p);
- p+=2;
- }
-}
-
-bool WW8PLCF::SeekPos(long nPos)
-{
- long nP = nPos;
-
- if( nP < pPLCF_PosArray[0] )
- {
- nIdx = 0;
- // Nicht gefunden: nPos unterhalb kleinstem Eintrag
- return false;
- }
-
- // Search from beginning?
- if( (1 > nIdx) || (nP < pPLCF_PosArray[ nIdx-1 ]) )
- nIdx = 1;
-
- long nI = nIdx ? nIdx : 1;
- long nEnd = nIMax;
-
- for(int n = (1==nIdx ? 1 : 2); n; --n )
- {
- for( ; nI <=nEnd; ++nI) // Suchen mit um 1 erhoehtem Index
- {
- if( nP < pPLCF_PosArray[nI] ) // Position gefunden
- {
- nIdx = nI - 1; // nI - 1 ist der richtige Index
- return true; // ... und fertig
- }
- }
- nI = 1;
- nEnd = nIdx-1;
- }
-
- nIdx = nIMax; // Nicht gefunden, groesser als alle Eintraege
- return false;
-}
-
-bool WW8PLCF::Get(long& rStart, long& rEnd, void*& rpValue) const
-{
- if ( nIdx >= nIMax )
- {
- rStart = rEnd = LONG_MAX;
- return false;
- }
- rStart = pPLCF_PosArray[ nIdx ];
- rEnd = pPLCF_PosArray[ nIdx + 1 ];
- rpValue = (void*)&pPLCF_Contents[nIdx * nStru];
- return true;
-}
-
-long WW8PLCF::Where() const
-{
- if ( nIdx >= nIMax )
- return LONG_MAX;
-
- return pPLCF_PosArray[nIdx];
-}
-
-//-----------------------------------------
-// WW8PLCFpcd
-//-----------------------------------------
-
-WW8PLCFpcd::WW8PLCFpcd( SvStream* pSt, long nFilePos, long nPLCF, long nStruct )
- :nStru( nStruct )
-{
- nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
- pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ]; // Pointer auf Pos-Array
-
- long nOldPos = pSt->Tell();
-
- pSt->Seek( nFilePos );
- pSt->Read( pPLCF_PosArray, nPLCF );
-#ifdef OSL_BIGENDIAN
- for( long nI = 0; nI <= nIMax; nI++ )
- pPLCF_PosArray[nI] = SWAPLONG( pPLCF_PosArray[nI] );
-#endif // OSL_BIGENDIAN
-
- // Pointer auf Inhalts-Array
- pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
-
- pSt->Seek( nOldPos );
-}
-
-// Bei nStartPos < 0 wird das erste Element des PLCFs genommen
-WW8PLCFpcd_Iter::WW8PLCFpcd_Iter( WW8PLCFpcd& rPLCFpcd, long nStartPos )
- :rPLCF( rPLCFpcd ), nIdx( 0 )
-{
- if( nStartPos >= 0 )
- SeekPos( nStartPos );
-}
-
-bool WW8PLCFpcd_Iter::SeekPos(long nPos)
-{
- long nP = nPos;
-
- if( nP < rPLCF.pPLCF_PosArray[0] )
- {
- nIdx = 0;
- return false; // Nicht gefunden: nPos unterhalb kleinstem Eintrag
- }
- // Search from beginning?
- if( (1 > nIdx) || (nP < rPLCF.pPLCF_PosArray[ nIdx-1 ]) )
- nIdx = 1;
-
- long nI = nIdx ? nIdx : 1;
- long nEnd = rPLCF.nIMax;
-
- for(int n = (1==nIdx ? 1 : 2); n; --n )
- {
- for( ; nI <=nEnd; ++nI)
- { // Suchen mit um 1 erhoehtem Index
- if( nP < rPLCF.pPLCF_PosArray[nI] )
- { // Position gefunden
- nIdx = nI - 1; // nI - 1 ist der richtige Index
- return true; // ... und fertig
- }
- }
- nI = 1;
- nEnd = nIdx-1;
- }
- nIdx = rPLCF.nIMax; // Nicht gefunden, groesser als alle Eintraege
- return false;
-}
-
-bool WW8PLCFpcd_Iter::Get(long& rStart, long& rEnd, void*& rpValue) const
-{
- if( nIdx >= rPLCF.nIMax )
- {
- rStart = rEnd = LONG_MAX;
- return false;
- }
- rStart = rPLCF.pPLCF_PosArray[nIdx];
- rEnd = rPLCF.pPLCF_PosArray[nIdx + 1];
- rpValue = (void*)&rPLCF.pPLCF_Contents[nIdx * rPLCF.nStru];
- return true;
-}
-
-long WW8PLCFpcd_Iter::Where() const
-{
- if ( nIdx >= rPLCF.nIMax )
- return LONG_MAX;
-
- return rPLCF.pPLCF_PosArray[nIdx];
-}
-
-//-----------------------------------------
-bool WW8PLCFx_Fc_FKP::WW8Fkp::Entry::operator<
- (const WW8PLCFx_Fc_FKP::WW8Fkp::Entry& rSecond) const
-{
- return (mnFC < rSecond.mnFC);
-}
-
-WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(sal_uInt8 nFibVer, SvStream* pSt, SvStream* pDataSt,
- long _nFilePos, long nItemSiz, ePLCFT ePl, WW8_FC nStartFc)
- : nItemSize(nItemSiz), nFilePos(_nFilePos), nIdx(0), ePLCF(ePl),
- maSprmParser(nFibVer)
-{
- long nOldPos = pSt->Tell();
-
- pSt->Seek(nFilePos);
- pSt->Read(maRawData, 512);
- nIMax = maRawData[511];
-
- sal_uInt8 *pStart = maRawData;
- // Pointer to Offset-Location in maRawData
- sal_uInt8* pOfs = maRawData + (nIMax + 1) * 4;
-
- for (nIdx = 0; nIdx < nIMax; ++nIdx)
- {
- sal_uInt16 nOfs = (*(pOfs + nIdx * nItemSize)) * 2;
- Entry aEntry(Get_Long(pStart));
-
- if (nOfs)
- {
- switch (ePLCF)
- {
- case CHP:
- aEntry.mnLen = maRawData[nOfs];
- aEntry.mpData = maRawData + nOfs + 1;
- break;
- case PAP:
- sal_uInt8 nDelta = 0;
-
- aEntry.mnLen = maRawData[nOfs];
- if (8 <= nFibVer && !aEntry.mnLen)
- {
- aEntry.mnLen = maRawData[ nOfs+1 ];
- nDelta++;
- }
-
- aEntry.mnIStd = SVBT16ToShort(maRawData+nOfs+1+nDelta);
-
- aEntry.mpData = maRawData + nOfs + 3+ nDelta;
-
- sal_uInt16 nSpId = maSprmParser.GetSprmId(aEntry.mpData);
-
- if (0x6645 == nSpId || 0x6646 == nSpId)
- {
- sal_uInt32 nCurr = pDataSt->Tell();
-
- sal_uInt32 nPos = SVBT32ToUInt32(aEntry.mpData + 2);
- pDataSt->Seek(nPos);
- *pDataSt >> aEntry.mnLen;
- aEntry.mpData = new sal_uInt8[aEntry.mnLen];
- aEntry.mbMustDelete = true;
- pDataSt->Read(aEntry.mpData, aEntry.mnLen);
-
- pDataSt->Seek( nCurr );
- }
- else
- {
- aEntry.mnLen *= 2;
- aEntry.mnLen -= 2;
- }
- break;
- }
- }
-
- maEntries.push_back(aEntry);
- }
-
- //one more FC than grrpl entries
- maEntries.push_back(Entry(Get_Long(pStart)));
-
- //#104773#, we expect them sorted, but it appears possible
- //for them to arive unsorted
- std::sort(maEntries.begin(), maEntries.end());
-
- nIdx = 0;
-
- if (nStartFc >= 0)
- SeekPos(nStartFc);
-
- pSt->Seek(nOldPos);
-}
-
-WW8PLCFx_Fc_FKP::WW8Fkp::Entry::Entry(const Entry &rEntry)
- : mnFC(rEntry.mnFC), mnLen(rEntry.mnLen), mnIStd(rEntry.mnIStd),
- mbMustDelete(rEntry.mbMustDelete)
-{
- if (mbMustDelete)
- {
- mpData = new sal_uInt8[mnLen];
- memcpy(mpData, rEntry.mpData, mnLen);
- }
- else
- mpData = rEntry.mpData;
-}
-
-WW8PLCFx_Fc_FKP::WW8Fkp::Entry&
- WW8PLCFx_Fc_FKP::WW8Fkp::Entry::operator=(const Entry &rEntry)
-{
- if (mbMustDelete)
- delete[] mpData;
-
- mnFC = rEntry.mnFC;
- mnLen = rEntry.mnLen;
- mnIStd = rEntry.mnIStd;
- mbMustDelete = rEntry.mbMustDelete;
-
- if (mbMustDelete)
- {
- mpData = new sal_uInt8[mnLen];
- memcpy(mpData, rEntry.mpData, mnLen);
- }
- else
- mpData = rEntry.mpData;
- return *this;
-}
-
-WW8PLCFx_Fc_FKP::WW8Fkp::Entry::~Entry()
-{
- if (mbMustDelete)
- delete[] mpData;
-}
-
-void WW8PLCFx_Fc_FKP::WW8Fkp::Reset(WW8_FC nFc)
-{
- SetIdx(0);
- if (nFc >= 0)
- SeekPos(nFc);
-}
-
-bool WW8PLCFx_Fc_FKP::WW8Fkp::SeekPos(WW8_FC nFc)
-{
- if (nFc < maEntries[0].mnFC)
- {
- nIdx = 0;
- return false; // Nicht gefunden: nPos unterhalb kleinstem Eintrag
- }
- // Search from beginning?
- if( (1 > nIdx) || (nFc < maEntries[nIdx-1].mnFC) )
- nIdx = 1;
-
- long nI = nIdx ? nIdx : 1;
- long nEnd = nIMax;
-
- for(int n = (1==nIdx ? 1 : 2); n; --n )
- {
- for( ; nI <=nEnd; ++nI)
- { // Suchen mit um 1 erhoehtem Index
- if (nFc < maEntries[nI].mnFC)
- { // Position gefunden
- nIdx = nI - 1; // nI - 1 ist der richtige Index
- return true; // ... und fertig
- }
- }
- nI = 1;
- nEnd = nIdx-1;
- }
- nIdx = nIMax; // Nicht gefunden, groesser als alle Eintraege
- return false;
-}
-
-sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::Get( WW8_FC& rStart, WW8_FC& rEnd, long& rLen )
- const
-{
- rLen = 0;
-
- if( nIdx >= nIMax )
- {
- rStart = LONG_MAX;
- return 0;
- }
-
- rStart = maEntries[nIdx].mnFC;
- rEnd = maEntries[nIdx + 1].mnFC;
-
- sal_uInt8* pSprms = GetLenAndIStdAndSprms( rLen );
- return pSprms;
-}
-
-void WW8PLCFx_Fc_FKP::WW8Fkp::SetIdx( sal_uLong nI )
-{
- if( nI < nIMax)
- nIdx = (short)nI;
-}
-
-sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(long& rLen) const
-{
- rLen = maEntries[nIdx].mnLen;
- return maEntries[nIdx].mpData;
-}
-
-const sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm( sal_uInt16 nId )
-{
- if( nIdx >= nIMax )
- return 0;
-
- long nLen;
- sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
-
- WW8SprmIter aIter(pSprms, nLen, maSprmParser);
- return aIter.FindSprm(nId);
-}
-
-bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(sal_uInt16 nId,
- std::vector<const sal_uInt8 *> &rResult)
-{
- if (nIdx >= nIMax)
- return false;
-
- long nLen;
- sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
-
- WW8SprmIter aIter(pSprms, nLen, maSprmParser);
-
- while(aIter.GetSprms())
- {
- if (aIter.GetAktId() == nId)
- rResult.push_back(aIter.GetAktParams());
- aIter++;
- };
- return !rResult.empty();
-}
-
-//-----------------------------------------
-void WW8PLCFx::GetSprms( WW8PLCFxDesc* p )
-{
- ASSERT( !this, "Falsches GetSprms gerufen" );
- p->nStartPos = p->nEndPos = LONG_MAX;
- p->pMemPos = 0;
- p->nSprmsLen = 0;
- p->bRealLineEnd = false;
- return;
-}
-
-long WW8PLCFx::GetNoSprms( long& rStart, long& rEnd, long& rLen )
-{
- ASSERT( !this, "Falsches GetNoSprms gerufen" );
- rStart = rEnd = LONG_MAX;
- rLen = 0;
- return 0;
-}
-
-// ...Idx2: Default: ignorieren
-sal_uLong WW8PLCFx::GetIdx2() const
-{
- return 0;
-}
-
-void WW8PLCFx::SetIdx2(sal_uLong )
-{
-}
-
-class SamePos :
- public std::unary_function<const WW8PLCFx_Fc_FKP::WW8Fkp *, bool>
-{
-private:
- long mnPo;
-public:
- SamePos(long nPo) : mnPo(nPo) {};
- bool operator()(const WW8PLCFx_Fc_FKP::WW8Fkp *pFkp)
- {return mnPo == pFkp->GetFilePos();}
-};
-
-//-----------------------------------------
-bool WW8PLCFx_Fc_FKP::NewFkp()
-{
- long nPLCFStart, nPLCFEnd;
- void* pPage;
-
- static const int WW8FkpSizeTabVer6[ PLCF_END ] =
- {
- 1, 7, 0 /*, 0, 0, 0*/
- };
- static const int WW8FkpSizeTabVer8[ PLCF_END ] =
- {
- 1, 13, 0 /*, 0, 0, 0*/
- };
- const int* pFkpSizeTab;
- switch (GetVersion())
- {
- case 6:
- case 7:
- pFkpSizeTab = WW8FkpSizeTabVer6;
- break;
- case 8:
- pFkpSizeTab = WW8FkpSizeTabVer8;
- break;
- default:
- // Programm-Fehler!
- ASSERT( !this, "Es wurde vergessen, nVersion zu kodieren!" );
- return false;
- }
-
- if (!pPLCF->Get( nPLCFStart, nPLCFEnd, pPage ))
- {
- pFkp = 0;
- return false; // PLCF fertig abgearbeitet
- }
- (*pPLCF)++;
- long nPo = SVBT16ToShort( (sal_uInt8 *)pPage );
- nPo <<= 9; // shift als LONG
-
- long nAktFkpFilePos = pFkp ? pFkp->GetFilePos() : -1;
- if (nAktFkpFilePos == nPo)
- pFkp->Reset(GetStartFc()); // #79464# //
- else
- {
- myiter aIter =
- std::find_if(maFkpCache.begin(), maFkpCache.end(), SamePos(nPo));
- if (aIter != maFkpCache.end())
- {
- pFkp = *aIter;
- pFkp->Reset(GetStartFc());
- }
- else if ((pFkp = new WW8Fkp(GetVersion(), pFKPStrm, pDataStrm, nPo,
- pFkpSizeTab[ ePLCF ], ePLCF, GetStartFc())))
- {
- maFkpCache.push_back(pFkp);
-
- if (maFkpCache.size() > eMaxCache)
- {
- delete maFkpCache.front();
- maFkpCache.pop_front();
- }
- }
- }
-
- SetStartFc( -1 ); // Nur das erste Mal
- return true;
-}
-
-WW8PLCFx_Fc_FKP::WW8PLCFx_Fc_FKP(SvStream* pSt, SvStream* pTblSt,
- SvStream* pDataSt, const WW8Fib& rFib, ePLCFT ePl, WW8_FC nStartFcL)
- : WW8PLCFx(rFib.nVersion, true), pFKPStrm(pSt), pDataStrm(pDataSt),
- pFkp(0), ePLCF(ePl), pPCDAttrs(0)
-{
- SetStartFc(nStartFcL);
- long nLenStruct = (8 > rFib.nVersion) ? 2 : 4;
- if (ePl == CHP)
- {
- pPLCF = new WW8PLCF(pTblSt, rFib.fcPlcfbteChpx, rFib.lcbPlcfbteChpx,
- nLenStruct, GetStartFc(), rFib.pnChpFirst, rFib.cpnBteChp);
- }
- else
- {
- pPLCF = new WW8PLCF(pTblSt, rFib.fcPlcfbtePapx, rFib.lcbPlcfbtePapx,
- nLenStruct, GetStartFc(), rFib.pnPapFirst, rFib.cpnBtePap);
- }
-}
-
-WW8PLCFx_Fc_FKP::~WW8PLCFx_Fc_FKP()
-{
- myiter aEnd = maFkpCache.end();
- for (myiter aIter = maFkpCache.begin(); aIter != aEnd; ++aIter)
- delete *aIter;
- delete pPLCF;
- delete pPCDAttrs;
-}
-
-sal_uLong WW8PLCFx_Fc_FKP::GetIdx() const
-{
- sal_uLong u = pPLCF->GetIdx() << 8;
- if (pFkp)
- u |= pFkp->GetIdx();
- return u;
-}
-
-void WW8PLCFx_Fc_FKP::SetIdx( sal_uLong nIdx )
-{
- if( !( nIdx & 0xffffff00L ) )
- {
- pPLCF->SetIdx( nIdx >> 8 );
- pFkp = 0;
- }
- else
- { //Es gab einen Fkp
- //Lese PLCF um 1 Pos zurueck, um die Adresse des Fkp wiederzubekommen
- pPLCF->SetIdx( ( nIdx >> 8 ) - 1 );
- if ( NewFkp() ) // und lese Fkp wieder ein
- pFkp->SetIdx( nIdx & 0xff ); // Dann stelle Fkp-Pos wieder ein
- }
-}
-
-bool WW8PLCFx_Fc_FKP::SeekPos(WW8_FC nFcPos)
-{
- // StartPos for next Where()
- SetStartFc( nFcPos );
-
- // find StartPos for next pPLCF->Get()
- bool bRet = pPLCF->SeekPos(nFcPos);
-
- // make FKP invalid?
- long nPLCFStart, nPLCFEnd;
- void* pPage;
- if( pFkp && pPLCF->Get( nPLCFStart, nPLCFEnd, pPage ) )
- {
- long nPo = SVBT16ToShort( (sal_uInt8 *)pPage );
- nPo <<= 9; // shift als LONG
- if (nPo != pFkp->GetFilePos())
- pFkp = 0;
- else
- pFkp->SeekPos( nFcPos );
- }
- return bRet;
-}
-
-WW8_FC WW8PLCFx_Fc_FKP::Where()
-{
- if( !pFkp )
- {
- if( !NewFkp() )
- return LONG_MAX;
- }
- WW8_FC nP = pFkp->Where();
- if( nP != LONG_MAX )
- return nP;
-
- pFkp = 0; // FKP beendet -> hole neuen
- return Where(); // am einfachsten rekursiv
-}
-
-sal_uInt8* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, long& rLen)
-{
- rLen = 0; // Default
- rStart = rEnd = LONG_MAX;
-
- if( !pFkp ) // Fkp not there ?
- {
- if( !NewFkp() )
- return 0;
- }
-
- sal_uInt8* pPos = pFkp->Get( rStart, rEnd, rLen );
- if( rStart == LONG_MAX ) //Not found
- return 0;
- return pPos;
-}
-
-WW8PLCFx& WW8PLCFx_Fc_FKP::operator ++( int )
-{
- if( !pFkp )
- {
- if( !NewFkp() )
- return *this;
- }
-
- (*pFkp)++;
- if( pFkp->Where() == LONG_MAX )
- NewFkp();
-
- return *this;
-}
-
-sal_uInt16 WW8PLCFx_Fc_FKP::GetIstd() const
-{
- return pFkp ? pFkp->GetIstd() : 0xFFFF;
-}
-
-void WW8PLCFx_Fc_FKP::GetPCDSprms( WW8PLCFxDesc& rDesc )
-{
- rDesc.pMemPos = 0;
- rDesc.nSprmsLen = 0;
- if( pPCDAttrs )
- {
- if( !pFkp )
- {
- DBG_WARNING(
- "+Problem: GetPCDSprms: NewFkp necessay (not possible!)" );
- if( !NewFkp() )
- return;
- }
- pPCDAttrs->GetSprms(&rDesc);
- }
-}
-
-const sal_uInt8* WW8PLCFx_Fc_FKP::HasSprm( sal_uInt16 nId )
-{
- // const waere schoener, aber dafuer muesste NewFkp() ersetzt werden oder
- // wegfallen
- if( !pFkp )
- {
- DBG_WARNING( "+Motz: HasSprm: NewFkp noetig ( kein const moeglich )" );
- // Passiert bei BugDoc 31722
- if( !NewFkp() )
- return 0;
- }
-
- const sal_uInt8* pRes = pFkp->HasSprm( nId );
-
- if( !pRes )
- {
- WW8PLCFxDesc aDesc;
- GetPCDSprms( aDesc );
-
- if (aDesc.pMemPos)
- {
- WW8SprmIter aIter(aDesc.pMemPos, aDesc.nSprmsLen,
- pFkp->GetSprmParser());
- pRes = aIter.FindSprm(nId);
- }
- }
-
- return pRes;
-}
-
-bool WW8PLCFx_Fc_FKP::HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult)
-{
- // const waere schoener, aber dafuer muesste NewFkp() ersetzt werden oder
- // wegfallen
- if (!pFkp)
- {
- DBG_WARNING( "+Motz: HasSprm: NewFkp noetig ( kein const moeglich )" );
- // Passiert bei BugDoc 31722
- if( !NewFkp() )
- return 0;
- }
-
- pFkp->HasSprm(nId, rResult);
-
- WW8PLCFxDesc aDesc;
- GetPCDSprms( aDesc );
-
- if (aDesc.pMemPos)
- {
- WW8SprmIter aIter(aDesc.pMemPos, aDesc.nSprmsLen,
- pFkp->GetSprmParser());
- while(aIter.GetSprms())
- {
- if (aIter.GetAktId() == nId)
- rResult.push_back(aIter.GetAktParams());
- aIter++;
- };
- }
- return !rResult.empty();
-}
-
-//-----------------------------------------
-
-WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP( SvStream* pSt, SvStream* pTblSt,
- SvStream* pDataSt, const WW8ScannerBase& rBase, ePLCFT ePl )
- : WW8PLCFx_Fc_FKP(pSt, pTblSt, pDataSt, *rBase.pWw8Fib, ePl,
- rBase.WW8Cp2Fc(0)), rSBase(rBase), nAttrStart(-1), nAttrEnd(-1),
- bLineEnd(false),
- bComplex( (7 < rBase.pWw8Fib->nVersion) || (0 != rBase.pWw8Fib->fComplex) )
-{
- ResetAttrStartEnd();
-
- pPcd = rSBase.pPiecePLCF ? new WW8PLCFx_PCD( rBase.pWw8Fib->nVersion,
- rBase.pPiecePLCF, 0, ((6 == GetVersion()) || (7 == GetVersion())) )
- : 0;
-
- /*
- Make a copy of the piece attributes for so that the calls to HasSprm on a
- Fc_FKP will be able to take into account the current piece attributes,
- despite the fact that such attributes can only be found through a cp based
- mechanism.
- */
- if (pPcd)
- {
- pPCDAttrs = rSBase.pPLCFx_PCDAttrs ? new WW8PLCFx_PCDAttrs(
- rSBase.pWw8Fib->nVersion, pPcd, &rSBase) : 0;
- }
-
- pPieceIter = rSBase.pPieceIter;
-}
-
-WW8PLCFx_Cp_FKP::~WW8PLCFx_Cp_FKP()
-{
- delete pPcd;
-}
-
-void WW8PLCFx_Cp_FKP::ResetAttrStartEnd()
-{
- nAttrStart = -1;
- nAttrEnd = -1;
- bLineEnd = false;
-}
-
-sal_uLong WW8PLCFx_Cp_FKP::GetPCDIMax() const
-{
- return pPcd ? pPcd->GetIMax() : 0;
-}
-
-sal_uLong WW8PLCFx_Cp_FKP::GetPCDIdx() const
-{
- return pPcd ? pPcd->GetIdx() : 0;
-}
-
-void WW8PLCFx_Cp_FKP::SetPCDIdx( sal_uLong nIdx )
-{
- if( pPcd )
- pPcd->SetIdx( nIdx );
-}
-
-bool WW8PLCFx_Cp_FKP::SeekPos(WW8_CP nCpPos)
-{
- if( pPcd ) // Complex
- {
- if( !pPcd->SeekPos( nCpPos ) ) // Piece setzen
- return false;
- if (pPCDAttrs && !pPCDAttrs->GetIter()->SeekPos(nCpPos))
- return false;
- return WW8PLCFx_Fc_FKP::SeekPos(pPcd->AktPieceStartCp2Fc(nCpPos));
- }
- // KEINE Piece-Table !!!
- return WW8PLCFx_Fc_FKP::SeekPos( rSBase.WW8Cp2Fc(nCpPos) );
-}
-
-WW8_CP WW8PLCFx_Cp_FKP::Where()
-{
- WW8_FC nFc = WW8PLCFx_Fc_FKP::Where();
- if( pPcd )
- return pPcd->AktPieceStartFc2Cp( nFc ); // Piece ermitteln
- return rSBase.WW8Fc2Cp( nFc ); // KEINE Piece-Table !!!
-}
-
-void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
-{
- WW8_CP nOrigCp = p->nStartPos;
-
- if (!GetDirty()) //Normal case
- {
- p->pMemPos = WW8PLCFx_Fc_FKP::GetSprmsAndPos(p->nStartPos, p->nEndPos,
- p->nSprmsLen);
- }
- else
- {
- /*
- #93702#
- For the odd case where we have a location in a fastsaved file which
- does not have an entry in the FKP, perhaps its para end is in the next
- piece, or perhaps the cp just doesn't exist at all in this document.
- AdvSprm doesn't know so it sets the PLCF as dirty and we figure out
- in this method what the situation is
-
- It doesn't exist then the piece iterator will not be able to find it.
- Otherwise our cool fastsave algorithm can be brought to bear on the
- problem.
- */
- sal_uLong nOldPos = pPieceIter->GetIdx();
- bool bOk = pPieceIter->SeekPos(nOrigCp);
- pPieceIter->SetIdx( nOldPos );
- if (!bOk)
- return;
- }
-
- if( pPcd ) // Piece-Table vorhanden !!!
- {
- // Init ( noch kein ++ gerufen )
- if( (nAttrStart > nAttrEnd) || (nAttrStart == -1) )
- {
- p->bRealLineEnd = (ePLCF == PAP);
-
- if ( ((ePLCF == PAP ) || (ePLCF == CHP)) && (nOrigCp != LONG_MAX) )
- {
- bool bIsUnicode=false;
- /*
- To find the end of a paragraph for a character in a
- complex format file.
-
- It is necessary to know the piece that contains the
- character and the FC assigned to the character.
- */
-
- //We set the piece iterator to the piece that contains the
- //character, now we have the correct piece for this character
- sal_uLong nOldPos = pPieceIter->GetIdx();
- p->nStartPos = nOrigCp;
- pPieceIter->SeekPos( p->nStartPos);
-
- //This is the FC assigned to the character, but we already
- //have the result of the next stage, so we can skip this step
- //WW8_FC nStartFc = rSBase.WW8Cp2Fc(p->nStartPos, &bIsUnicode);
-
- /*
- Using the FC of the character, first search the FKP that
- describes the character to find the smallest FC in the rgfc
- that is larger than the character FC.
- */
- //But the search has already been done, the next largest FC is
- //p->nEndPos.
- WW8_FC nOldEndPos = p->nEndPos;
-
- /*
- If the FC found in the FKP is less than or equal to the limit
- FC of the piece, the end of the paragraph that contains the
- character is at the FKP FC minus 1.
- */
- long nCpStart, nCpEnd;
- void* pData;
- pPieceIter->Get(nCpStart, nCpEnd, pData);
-
- WW8_FC nLimitFC = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
- WW8_FC nBeginLimitFC = nLimitFC;
- if( 8 <= GetVersion() )
- {
- nBeginLimitFC =
- WW8PLCFx_PCD::TransformPieceAddress(nLimitFC,
- bIsUnicode);
- }
- nLimitFC = nBeginLimitFC +
- (nCpEnd - nCpStart) * (bIsUnicode ? 2 : 1);
-
- if (nOldEndPos <= nLimitFC)
- {
- p->nEndPos = nCpEnd -
- (nLimitFC-nOldEndPos) / (bIsUnicode ? 2 : 1);
- }
- else
- {
- if (ePLCF == CHP)
- p->nEndPos = nCpEnd;
- else
- {
- /*
- If the FKP FC that was found was greater than the FC
- of the end of the piece, scan piece by piece toward
- the end of the document until a piece is found that
- contains a paragraph end mark.
- */
-
- /*
- It's possible to check if a piece contains a paragraph
- mark by using the FC of the beginning of the piece to
- search in the FKPs for the smallest FC in the FKP rgfc
- that is greater than the FC of the beginning of the
- piece. If the FC found is less than or equal to the
- limit FC of the piece, then the character that ends
- the paragraph is the character immediately before the
- FKP fc
- */
-
- (*pPieceIter)++;
-
- for (;pPieceIter->GetIdx() < pPieceIter->GetIMax();
- (*pPieceIter)++)
- {
- if( !pPieceIter->Get( nCpStart, nCpEnd, pData ) )
- {
- ASSERT( !this, "piece iter broken!" );
- break;
- }
- bIsUnicode = false;
- sal_Int32 nFcStart=SVBT32ToUInt32(((WW8_PCD*)pData)->fc);
-
- if( 8 <= GetVersion() )
- {
- nFcStart =
- WW8PLCFx_PCD::TransformPieceAddress(
- nFcStart,bIsUnicode );
- }
- nLimitFC = nFcStart + (nCpEnd - nCpStart) *
- (bIsUnicode ? 2 : 1);
-
- //if it doesn't exist, skip it
- if (!SeekPos(nCpStart))
- continue;
-
- WW8_FC nOne,nSmallest;
- p->pMemPos = WW8PLCFx_Fc_FKP::GetSprmsAndPos(nOne,
- nSmallest, p->nSprmsLen);
-
- if (nSmallest <= nLimitFC)
- {
- p->nEndPos = nCpEnd -
- (nLimitFC-nSmallest) / (bIsUnicode ? 2 : 1);
- break;
- }
- }
- }
- }
- pPieceIter->SetIdx( nOldPos );
- }
- else
- pPcd->AktPieceFc2Cp( p->nStartPos, p->nEndPos,&rSBase );
- }
- else
- {
- p->nStartPos = nAttrStart;
- p->nEndPos = nAttrEnd;
- p->bRealLineEnd = bLineEnd;
- }
- }
- else // KEINE Piece-Table !!!
- {
- p->nStartPos = rSBase.WW8Fc2Cp( p->nStartPos );
- p->nEndPos = rSBase.WW8Fc2Cp( p->nEndPos );
- p->bRealLineEnd = ePLCF == PAP;
- }
-}
-
-WW8PLCFx& WW8PLCFx_Cp_FKP::operator ++( int )
-{
- WW8PLCFx_Fc_FKP::operator ++( 0 );
- // !pPcd: Notbremse
- if ( !bComplex || !pPcd )
- return *this;
-
- if( GetPCDIdx() >= GetPCDIMax() ) // End of PLCF
- {
- nAttrStart = nAttrEnd = LONG_MAX;
- return *this;
- }
-
- long nFkpLen; // Fkp-Eintrag
- // Fkp-Eintrag holen
- WW8PLCFx_Fc_FKP::GetSprmsAndPos(nAttrStart, nAttrEnd, nFkpLen);
-
- pPcd->AktPieceFc2Cp( nAttrStart, nAttrEnd, &rSBase );
- bLineEnd = (ePLCF == PAP);
- return *this;
-}
-
-//-----------------------------------------
-//-----------------------------------------
-
-WW8PLCFx_SEPX::WW8PLCFx_SEPX(SvStream* pSt, SvStream* pTblSt,
- const WW8Fib& rFib, WW8_CP nStartCp)
- : WW8PLCFx(rFib.nVersion, true), maSprmParser(rFib.nVersion), pStrm(pSt),
- nArrMax(256), nSprmSiz(0)
-{
- pPLCF = rFib.lcbPlcfsed
- ? new WW8PLCF(pTblSt, rFib.fcPlcfsed, rFib.lcbPlcfsed, 12, nStartCp)
- : 0;
-
- pSprms = new sal_uInt8[nArrMax]; // maximum length
-}
-
-WW8PLCFx_SEPX::~WW8PLCFx_SEPX()
-{
- delete pPLCF;
- delete[] pSprms;
-}
-
-sal_uLong WW8PLCFx_SEPX::GetIdx() const
-{
- return pPLCF ? pPLCF->GetIdx() : 0;
-}
-
-void WW8PLCFx_SEPX::SetIdx( sal_uLong nIdx )
-{
- if( pPLCF ) pPLCF->SetIdx( nIdx );
-}
-
-bool WW8PLCFx_SEPX::SeekPos(WW8_CP nCpPos)
-{
- return pPLCF ? pPLCF->SeekPos( nCpPos ) : 0;
-}
-
-WW8_CP WW8PLCFx_SEPX::Where()
-{
- return pPLCF ? pPLCF->Where() : 0;
-}
-
-void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
-{
- if( !pPLCF ) return;
-
- void* pData;
-
- p->bRealLineEnd = false;
- if (!pPLCF->Get( p->nStartPos, p->nEndPos, pData ))
- {
- p->nStartPos = p->nEndPos = LONG_MAX; // PLCF fertig abgearbeitet
- p->pMemPos = 0;
- p->nSprmsLen = 0;
- }
- else
- {
- long nPo = SVBT32ToUInt32( (sal_uInt8*)pData+2 );
- if (nPo == -1L)
- {
- p->nStartPos = p->nEndPos = LONG_MAX; // Sepx empty
- p->pMemPos = 0;
- p->nSprmsLen = 0;
- }
- else
- {
- pStrm->Seek( nPo );
- *pStrm >> nSprmSiz; // read len
-
- if( nSprmSiz > nArrMax )
- { // passt nicht
- delete[] pSprms;
- nArrMax = nSprmSiz; // Hole mehr Speicher
- pSprms = new sal_uInt8[nArrMax];
- }
- pStrm->Read( pSprms, nSprmSiz ); // read Sprms
-
- p->nSprmsLen = nSprmSiz;
- p->pMemPos = pSprms; // return Position
- }
- }
-}
-
-WW8PLCFx& WW8PLCFx_SEPX::operator ++( int )
-{
- if( pPLCF )
- (*pPLCF)++;
- return *this;
-}
-
-const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId ) const
-{
- return HasSprm( nId, pSprms, nSprmSiz);
-}
-
-const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, const sal_uInt8* pOtherSprms,
- long nOtherSprmSiz ) const
-{
- const sal_uInt8 *pRet = 0;
- if (pPLCF)
- {
- WW8SprmIter aIter(pOtherSprms, nOtherSprmSiz, maSprmParser);
- pRet = aIter.FindSprm(nId);
- }
- return pRet;
-}
-
-bool WW8PLCFx_SEPX::Find4Sprms(sal_uInt16 nId1,sal_uInt16 nId2,sal_uInt16 nId3,sal_uInt16 nId4,
- sal_uInt8*& p1, sal_uInt8*& p2, sal_uInt8*& p3, sal_uInt8*& p4) const
-{
- if( !pPLCF )
- return 0;
-
- bool bFound = false;
- p1 = 0;
- p2 = 0;
- p3 = 0;
- p4 = 0;
-
- sal_uInt8* pSp = pSprms;
- sal_uInt16 i=0;
- while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
- {
- // Sprm gefunden?
- sal_uInt16 nAktId = maSprmParser.GetSprmId(pSp);
- bool bOk = true;
- if( nAktId == nId1 )
- p1 = pSp + maSprmParser.DistanceToData(nId1);
- else if( nAktId == nId2 )
- p2 = pSp + maSprmParser.DistanceToData(nId2);
- else if( nAktId == nId3 )
- p3 = pSp + maSprmParser.DistanceToData(nId3);
- else if( nAktId == nId4 )
- p4 = pSp + maSprmParser.DistanceToData(nId4);
- else
- bOk = false;
- bFound |= bOk;
- // erhoehe Zeiger, so dass er auf naechsten Sprm zeigt
- sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSp);
- i += x;
- pSp += x;
- }
- return bFound;
-}
-
-const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const
-{
- if( !pPLCF )
- return 0;
-
- sal_uInt8* pSp = pSprms;
-
- sal_uInt16 i=0;
- while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
- {
- // Sprm gefunden?
- sal_uInt16 nAktId = maSprmParser.GetSprmId(pSp);
- if (nAktId == nId)
- {
- sal_uInt8 *pRet = pSp + maSprmParser.DistanceToData(nId);
- if (*pRet == n2nd)
- return pRet;
- }
- // erhoehe Zeiger, so dass er auf naechsten Sprm zeigt
- sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSp);
- i += x;
- pSp += x;
- }
-
- return 0; // Sprm nicht gefunden
-}
-
-//-----------------------------------------
-WW8PLCFx_SubDoc::WW8PLCFx_SubDoc(SvStream* pSt, sal_uInt8 nVersion,
- WW8_CP nStartCp, long nFcRef, long nLenRef, long nFcTxt, long nLenTxt,
- long nStruct)
- : WW8PLCFx(nVersion, false), pRef(0), pTxt(0)
-{
- if( nLenRef && nLenTxt )
- {
- pRef = new WW8PLCF( pSt, nFcRef, nLenRef, nStruct, nStartCp );
- pTxt = new WW8PLCF( pSt, nFcTxt, nLenTxt, 0, nStartCp );
- }
-}
-
-WW8PLCFx_SubDoc::~WW8PLCFx_SubDoc()
-{
- delete pRef;
- delete pTxt;
-}
-
-sal_uLong WW8PLCFx_SubDoc::GetIdx() const
-{
- // Wahrscheinlich pTxt... nicht noetig
- if( pRef )
- return ( pRef->GetIdx() << 16 | pTxt->GetIdx() );
- return 0;
-}
-
-void WW8PLCFx_SubDoc::SetIdx( sal_uLong nIdx )
-{
- if( pRef )
- {
- pRef->SetIdx( nIdx >> 16 );
- // Wahrscheinlich pTxt... nicht noetig
- pTxt->SetIdx( nIdx & 0xFFFF );
- }
-}
-
-bool WW8PLCFx_SubDoc::SeekPos( WW8_CP nCpPos )
-{
- return ( pRef ) ? pRef->SeekPos( nCpPos ) : false;
-}
-
-WW8_CP WW8PLCFx_SubDoc::Where()
-{
- return ( pRef ) ? pRef->Where() : LONG_MAX;
-}
-
-long WW8PLCFx_SubDoc::GetNoSprms( WW8_CP& rStart, long& rEnd, long& rLen )
-{
- void* pData;
- long nSt, nE;
- rEnd = LONG_MAX;
-
- if ( !pRef )
- {
- rStart = LONG_MAX; // Es gibt keine Noten
- rLen = 0;
- return -1;
- }
-
- sal_uLong nNr = pRef->GetIdx();
-
- if (!pRef->Get( rStart, nE, pData ))
- {
- rStart = LONG_MAX; // PLCF fertig abgearbeitet
- rLen = 0;
- return -1;
- }
- pTxt->SetIdx( nNr );
-
- if(!pTxt->Get( nSt, rLen, pData ))
- {
- rStart = LONG_MAX; // PLCF fertig abgearbeitet
- rLen = 0;
- return -1;
- }
-
- rLen -= nSt;
- return nSt;
-}
-
-WW8PLCFx& WW8PLCFx_SubDoc::operator ++( int )
-{
- if( pRef && pTxt )
- {
- (*pRef)++;
- (*pTxt)++;
- }
- return *this;
-}
-
-//-----------------------------------------
-// Felder
-//-----------------------------------------
-
-WW8PLCFx_FLD::WW8PLCFx_FLD( SvStream* pSt, const WW8Fib& rMyFib, short nType)
- : WW8PLCFx(rMyFib.nVersion, true), pPLCF(0), rFib(rMyFib)
-{
- long nFc, nLen;
-
- switch( nType )
- {
- case MAN_HDFT:
- nFc = rFib.fcPlcffldHdr;
- nLen = rFib.lcbPlcffldHdr;
- break;
- case MAN_FTN:
- nFc = rFib.fcPlcffldFtn;
- nLen = rFib.lcbPlcffldFtn;
- break;
- case MAN_EDN:
- nFc = rFib.fcPlcffldEdn;
- nLen = rFib.lcbPlcffldEdn;
- break;
- case MAN_AND:
- nFc = rFib.fcPlcffldAtn;
- nLen = rFib.lcbPlcffldAtn;
- break;
- case MAN_TXBX:
- nFc = rFib.fcPlcffldTxbx;
- nLen = rFib.lcbPlcffldTxbx;
- break;
- case MAN_TXBX_HDFT:
- nFc = rFib.fcPlcffldHdrTxbx;
- nLen = rFib.lcbPlcffldHdrTxbx;
- break;
- default:
- nFc = rFib.fcPlcffldMom;
- nLen = rFib.lcbPlcffldMom;
- break;
- }
-
- if( nLen )
- pPLCF = new WW8PLCFspecial( pSt, nFc, nLen, 2 );
-}
-
-WW8PLCFx_FLD::~WW8PLCFx_FLD()
-{
- delete pPLCF;
-}
-
-sal_uLong WW8PLCFx_FLD::GetIdx() const
-{
- return pPLCF ? pPLCF->GetIdx() : 0;
-}
-
-void WW8PLCFx_FLD::SetIdx( sal_uLong nIdx )
-{
- if( pPLCF )
- pPLCF->SetIdx( nIdx );
-}
-
-bool WW8PLCFx_FLD::SeekPos(WW8_CP nCpPos)
-{
- return pPLCF ? pPLCF->SeekPosExact( nCpPos ) : false;
-}
-
-WW8_CP WW8PLCFx_FLD::Where()
-{
- return pPLCF ? pPLCF->Where() : LONG_MAX;
-}
-
-bool WW8PLCFx_FLD::StartPosIsFieldStart()
-{
- void* pData;
- long nTest;
- if (
- (!pPLCF || !pPLCF->Get(nTest, pData) ||
- ((((sal_uInt8*)pData)[0] & 0x1f) != 0x13))
- )
- return false;
- return true;
-}
-
-bool WW8PLCFx_FLD::EndPosIsFieldEnd()
-{
- bool bRet = false;
-
- if (pPLCF)
- {
- long n = pPLCF->GetIdx();
-
- (*pPLCF)++;
-
- void* pData;
- long nTest;
- if ( pPLCF->Get(nTest, pData) && ((((sal_uInt8*)pData)[0] & 0x1f) == 0x15) )
- bRet = true;
-
- pPLCF->SetIdx(n);
- }
-
- return bRet;
-}
-
-void WW8PLCFx_FLD::GetSprms(WW8PLCFxDesc* p)
-{
- p->nStartPos = p->nEndPos = LONG_MAX;
- p->pMemPos = 0;
- p->nSprmsLen = 0;
- p->bRealLineEnd = false;
-
- if (!pPLCF)
- {
- p->nStartPos = LONG_MAX; // Es gibt keine Felder
- return;
- }
-
- long n = pPLCF->GetIdx();
-
- long nP;
- void *pData;
- if (!pPLCF->Get(nP, pData)) // Ende des PLCFspecial ?
- {
- p->nStartPos = LONG_MAX; // PLCF fertig abgearbeitet
- return;
- }
-
- p->nStartPos = nP;
-
- (*pPLCF)++;
- if (!pPLCF->Get(nP, pData)) // Ende des PLCFspecial ?
- {
- p->nStartPos = LONG_MAX; // PLCF fertig abgearbeitet
- return;
- }
-
- p->nEndPos = nP;
-
- pPLCF->SetIdx(n);
-
- p->nCp2OrIdx = pPLCF->GetIdx();
-}
-
-WW8PLCFx& WW8PLCFx_FLD::operator ++( int )
-{
- (*pPLCF)++;
- return *this;
-}
-
-bool WW8PLCFx_FLD::GetPara(long nIdx, WW8FieldDesc& rF)
-{
- ASSERT( pPLCF, "Aufruf ohne Feld PLCFspecial" );
- if( !pPLCF )
- return false;
-
- long n = pPLCF->GetIdx();
- pPLCF->SetIdx(nIdx);
-
- bool bOk = WW8GetFieldPara(*pPLCF, rF);
-
- pPLCF->SetIdx(n);
- return bOk;
-}
-
-//-----------------------------------------
-// class WW8PLCF_Book
-//-----------------------------------------
-
-/* to be optimized like this: */
-void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen,
- sal_uInt16 nExtraLen, rtl_TextEncoding eCS, std::vector<String> &rArray,
- std::vector<String>* pExtraArray)
-{
- sal_uLong nOldPos = rStrm.Tell();
- rStrm.Seek( nStart );
-
- sal_uInt16 nLen2;
- rStrm >> nLen2; // bVer67: total length of structure
- // bVer8 : count of strings
-
- if( bVer8 )
- {
- sal_uInt16 nStrings;
- bool bUnicode = (0xFFFF == nLen2);
- if( bUnicode )
- rStrm >> nStrings;
- else
- nStrings = nLen2;
-
- rStrm >> nExtraLen;
-
- for( sal_uInt16 i=0; i < nStrings; i++ )
- {
- if( bUnicode )
- rArray.push_back(WW8Read_xstz(rStrm, 0, false));
- else
- {
- sal_uInt8 nBChar;
- rStrm >> nBChar;
- ByteString aTmp;
- SafeReadString(aTmp,nBChar,rStrm);
- rArray.push_back(String(aTmp, eCS));
- }
-
- // Skip the extra data
- if( nExtraLen )
- {
- if (pExtraArray)
- {
- ByteString aTmp;
- SafeReadString(aTmp,nExtraLen,rStrm);
- pExtraArray->push_back(String(aTmp, eCS));
- }
- else
- rStrm.SeekRel( nExtraLen );
- }
- }
- }
- else
- {
- sal_uInt8 nBChar;
- if( nLen2 != nLen )
- {
- ASSERT( nLen2 == nLen, "Fib length and read length are different" );
- if (nLen > USHRT_MAX)
- nLen = USHRT_MAX;
- else if (nLen < 2 )
- nLen = 2;
- nLen2 = static_cast<sal_uInt16>(nLen);
- }
- sal_uLong nRead = 0;
- for( nLen2 -= 2; nRead < nLen2; )
- {
- rStrm >> nBChar; ++nRead;
- if (nBChar)
- {
- ByteString aTmp;
- nRead += SafeReadString(aTmp,nBChar,rStrm);
- rArray.push_back(String(aTmp, eCS));
- }
- else
- rArray.push_back(aEmptyStr);
-
- // #89125# Skip the extra data (for bVer67 versions this must come
- // from external knowledge)
- if (nExtraLen)
- {
- if (pExtraArray)
- {
- ByteString aTmp;
- SafeReadString(aTmp,nExtraLen,rStrm);
- pExtraArray->push_back(String(aTmp, eCS));
- }
- else
- rStrm.SeekRel( nExtraLen );
- nRead+=nExtraLen;
- }
- }
- }
- rStrm.Seek( nOldPos );
-}
-
-WW8PLCFx_Book::WW8PLCFx_Book(SvStream* pTblSt, const WW8Fib& rFib)
- : WW8PLCFx(rFib.nVersion, false), pStatus(0), nIsEnd(0)
-{
- if( !rFib.fcPlcfbkf || !rFib.lcbPlcfbkf || !rFib.fcPlcfbkl ||
- !rFib.lcbPlcfbkl || !rFib.fcSttbfbkmk || !rFib.lcbSttbfbkmk )
- {
- pBook[0] = pBook[1] = 0;
- nIMax = 0;
- }
- else
- {
- pBook[0] = new WW8PLCFspecial(pTblSt,rFib.fcPlcfbkf,rFib.lcbPlcfbkf,4);
-
- pBook[1] = new WW8PLCFspecial( pTblSt, rFib.fcPlcfbkl, rFib.lcbPlcfbkl,
- 0, -1, true);
-
- rtl_TextEncoding eStructChrSet = WW8Fib::GetFIBCharset(rFib.chseTables);
-
- WW8ReadSTTBF( (7 < rFib.nVersion), *pTblSt, rFib.fcSttbfbkmk,
- rFib.lcbSttbfbkmk, 0, eStructChrSet, aBookNames );
-
- nIMax = aBookNames.size();
-
- if( pBook[0]->GetIMax() < nIMax ) // Count of Bookmarks
- nIMax = pBook[0]->GetIMax();
- if( pBook[1]->GetIMax() < nIMax )
- nIMax = pBook[1]->GetIMax();
- pStatus = new eBookStatus[ nIMax ];
- memset( pStatus, 0, nIMax * sizeof( eBookStatus ) );
- }
-}
-
-WW8PLCFx_Book::~WW8PLCFx_Book()
-{
- delete[] pStatus;
- delete pBook[1];
- delete pBook[0];
-}
-
-sal_uLong WW8PLCFx_Book::GetIdx() const
-{
- return nIMax ? pBook[0]->GetIdx() : 0;
-}
-
-void WW8PLCFx_Book::SetIdx( sal_uLong nI )
-{
- if( nIMax )
- pBook[0]->SetIdx( nI );
-}
-
-sal_uLong WW8PLCFx_Book::GetIdx2() const
-{
- return nIMax ? ( pBook[1]->GetIdx() | ( ( nIsEnd ) ? 0x80000000 : 0 ) ) : 0;
-}
-
-void WW8PLCFx_Book::SetIdx2( sal_uLong nI )
-{
- if( nIMax )
- {
- pBook[1]->SetIdx( nI & 0x7fffffff );
- nIsEnd = (sal_uInt16)( ( nI >> 31 ) & 1 ); // 0 oder 1
- }
-}
-
-bool WW8PLCFx_Book::SeekPos(WW8_CP nCpPos)
-{
- if( !pBook[0] )
- return false;
-
- bool bOk = pBook[0]->SeekPosExact( nCpPos );
- bOk &= pBook[1]->SeekPosExact( nCpPos );
- nIsEnd = 0;
-
- return bOk;
-}
-
-WW8_CP WW8PLCFx_Book::Where()
-{
- return pBook[nIsEnd]->Where();
-}
-
-long WW8PLCFx_Book::GetNoSprms( long& rStart, long& rEnd, long& rLen )
-{
- void* pData;
- rEnd = LONG_MAX;
- rLen = 0;
-
- if (!pBook[0] || !pBook[1] || !nIMax || (pBook[nIsEnd]->GetIdx()) >= nIMax)
- {
- rStart = rEnd = LONG_MAX;
- return -1;
- }
-
- pBook[nIsEnd]->Get( rStart, pData ); // Pos. abfragen
-
- return pBook[nIsEnd]->GetIdx();
-}
-
-// Der Operator ++ hat eine Tuecke: Wenn 2 Bookmarks aneinandergrenzen, dann
-// sollte erst das Ende des ersten und dann der Anfang des 2. erreicht werden.
-// Liegen jedoch 2 Bookmarks der Laenge 0 aufeinander, *muss* von jedem Bookmark
-// erst der Anfang und dann das Ende gefunden werden.
-// Der Fall: ][
-// [...]
-// ][
-// ist noch nicht geloest, dabei muesste ich in den Anfangs- und Endindices
-// vor- und zurueckspringen, wobei ein weiterer Index oder ein Bitfeld
-// oder etwas aehnliches zum Merken der bereits abgearbeiteten Bookmarks
-// noetig wird.
-WW8PLCFx& WW8PLCFx_Book::operator ++( int )
-{
- if( pBook[0] && pBook[1] && nIMax )
- {
- (*pBook[nIsEnd])++;
-
- sal_uLong l0 = pBook[0]->Where();
- sal_uLong l1 = pBook[1]->Where();
- if( l0 < l1 )
- nIsEnd = 0;
- else if( l1 < l0 )
- nIsEnd = 1;
- else
- nIsEnd = ( nIsEnd ) ? 0 : 1;
- }
- return *this;
-}
-
-long WW8PLCFx_Book::GetLen() const
-{
- if( nIsEnd )
- {
- ASSERT( !this, "Falscher Aufruf (1) von PLCF_Book::GetLen()" );
- return 0;
- }
- void * p;
- WW8_CP nStartPos;
- if( !pBook[0]->Get( nStartPos, p ) )
- {
- ASSERT( !this, "Falscher Aufruf (2) von PLCF_Book::GetLen()" );
- return 0;
- }
- sal_uInt16 nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
- long nNum = pBook[1]->GetPos( nEndIdx );
- nNum -= nStartPos;
- return nNum;
-}
-
-void WW8PLCFx_Book::SetStatus(sal_uInt16 nIndex, eBookStatus eStat )
-{
- ASSERT(nIndex < nIMax, "set status of non existing bookmark!");
- pStatus[nIndex] = (eBookStatus)( pStatus[nIndex] | eStat );
-}
-
-eBookStatus WW8PLCFx_Book::GetStatus() const
-{
- if( !pStatus )
- return BOOK_NORMAL;
- long nEndIdx = GetHandle();
- return ( nEndIdx < nIMax ) ? pStatus[nEndIdx] : BOOK_NORMAL;
-}
-
-long WW8PLCFx_Book::GetHandle() const
-{
- if( !pBook[0] || !pBook[1] )
- return LONG_MAX;
-
- if( nIsEnd )
- return pBook[1]->GetIdx();
- else
- {
- if (const void* p = pBook[0]->GetData(pBook[0]->GetIdx()))
- return SVBT16ToShort( *((SVBT16*)p) );
- else
- return LONG_MAX;
- }
-}
-
-String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex)
-{
- bool bFound = false;
- sal_uInt16 i = 0;
- if( pBook[0] && pBook[1] )
- {
- WW8_CP nStartAkt, nEndAkt;
- do
- {
- void* p;
- sal_uInt16 nEndIdx;
-
- if( pBook[0]->GetData( i, nStartAkt, p ) && p )
- nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
- else
- {
- ASSERT( !this, "Bookmark-EndIdx nicht lesbar" );
- nEndIdx = i;
- }
-
- nEndAkt = pBook[1]->GetPos( nEndIdx );
-
- if ((nStartAkt >= nStart) && (nEndAkt <= nEnd))
- {
- nIndex = i;
- bFound=true;
- break;
- }
- ++i;
- }
- while (i < pBook[0]->GetIMax());
- }
- return bFound ? aBookNames[i] : aEmptyStr;
-}
-
-bool WW8PLCFx_Book::MapName(String& rName)
-{
- if( !pBook[0] || !pBook[1] )
- return false;
-
- bool bFound = false;
- sal_uInt16 i = 0;
- WW8_CP nStartAkt, nEndAkt;
- do
- {
- void* p;
- sal_uInt16 nEndIdx;
-
- if( pBook[0]->GetData( i, nStartAkt, p ) && p )
- nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
- else
- {
- ASSERT( !this, "Bookmark-EndIdx nicht lesbar" );
- nEndIdx = i;
- }
- nEndAkt = pBook[1]->GetPos( nEndIdx );
- if (COMPARE_EQUAL == rName.CompareIgnoreCaseToAscii(aBookNames[i]))
- {
- rName = aBookNames[i];
- bFound = true;
- }
- ++i;
- }
- while (!bFound && i < pBook[0]->GetIMax());
- return bFound;
-}
-
-const String* WW8PLCFx_Book::GetName() const
-{
- const String *pRet = 0;
- if (!nIsEnd && (pBook[0]->GetIdx() < nIMax))
- pRet = &(aBookNames[pBook[0]->GetIdx()]);
- return pRet;
-}
-
-//-----------------------------------------
-// WW8PLCFMan
-//-----------------------------------------
-
-#ifndef DUMP
-
-// Am Ende eines Absatzes reichen bei WW6 die Attribute bis hinter das <CR>.
-// Das wird fuer die Verwendung mit dem SW um 1 Zeichen zurueckgesetzt, wenn
-// dadurch kein AErger zu erwarten ist.
-void WW8PLCFMan::AdjustEnds( WW8PLCFxDesc& rDesc )
-{
- //Store old end position for supercool new property finder that uses
- //cp instead of fc's as nature intended
- rDesc.nOrigEndPos = rDesc.nEndPos;
- rDesc.nOrigStartPos = rDesc.nStartPos;
-
- /*
- Normally given ^XXX{para end}^ we don't actually insert a para end
- character into the document, so we clip the para end property one to the
- left to make the para properties end when the paragraph text does. In a
- drawing textbox we actually do insert a para end character, so we don't
- clip it. Making the para end properties end after the para end char.
- */
- if (GetDoingDrawTextBox())
- return;
-
- if ( (&rDesc == pPap) && rDesc.bRealLineEnd )
- {
- if ( pPap->nEndPos != LONG_MAX ) // Para adjust
- {
- nLineEnd = pPap->nEndPos;// nLineEnd zeigt *hinter* das <CR>
- pPap->nEndPos--; // Absatzende um 1 Zeichen verkuerzen
-
- // gibt es bereits ein CharAttr-Ende das auf das jetzige
- // Absatzende zeigt ? ... dann auch um 1 Zeichen verkuerzen
- if (pChp->nEndPos == nLineEnd)
- pChp->nEndPos--;
-
- // gibt es bereits ein Sep-Ende, das auf das jetzige Absatzende
- // zeigt ? ... dann auch um 1 Zeichen verkuerzen
- if( pSep->nEndPos == nLineEnd )
- pSep->nEndPos--;
- }
- }
- else if ( (&rDesc == pChp) || (&rDesc == pSep) )
- {
- // Char Adjust oder Sep Adjust Wenn Ende Char-Attr == Absatzende ...
- if( (rDesc.nEndPos == nLineEnd) && (rDesc.nEndPos > rDesc.nStartPos) )
- rDesc.nEndPos--; // ... dann um 1 Zeichen verkuerzen
- }
-}
-
-void WW8PLCFxDesc::ReduceByOffset()
-{
- ASSERT((LONG_MAX == nStartPos) || (nStartPos <= nEndPos),
- "Attr-Anfang und -Ende ueber Kreuz" );
-
- if( nStartPos != LONG_MAX )
- {
- /*
- ##516##,##517##
- Force the property change to happen at the beginning of this
- subdocument, same as in GetNewNoSprms, except that the target type is
- attributes attached to a piece that might span subdocument boundaries
- */
- if (nCpOfs > nStartPos)
- nStartPos = 0;
- else
- nStartPos -= nCpOfs;
- }
- if( nEndPos != LONG_MAX )
- {
- ASSERT(nCpOfs <= nEndPos,
- "oh oh, so much for the subdocument piece theory");
- nEndPos -= nCpOfs;
- }
-}
-
-void WW8PLCFMan::GetNewSprms( WW8PLCFxDesc& rDesc )
-{
- rDesc.pPLCFx->GetSprms(&rDesc);
- rDesc.ReduceByOffset();
-
- rDesc.bFirstSprm = true;
- AdjustEnds( rDesc );
- rDesc.nOrigSprmsLen = rDesc.nSprmsLen;
-}
-
-void WW8PLCFMan::GetNewNoSprms( WW8PLCFxDesc& rDesc )
-{
- rDesc.nCp2OrIdx = rDesc.pPLCFx->GetNoSprms(rDesc.nStartPos, rDesc.nEndPos,
- rDesc.nSprmsLen);
-
- ASSERT((LONG_MAX == rDesc.nStartPos) || (rDesc.nStartPos <= rDesc.nEndPos),
- "Attr-Anfang und -Ende ueber Kreuz" );
-
- rDesc.ReduceByOffset();
-
- rDesc.bFirstSprm = true;
- rDesc.nOrigSprmsLen = rDesc.nSprmsLen;
-}
-
-sal_uInt16 WW8PLCFMan::GetId(const WW8PLCFxDesc* p) const
-{
- sal_uInt16 nId;
-
- if (p == pFld)
- nId = eFLD;
- else if (p->nSprmsLen > 0)
- nId = maSprmParser.GetSprmId(p->pMemPos);
- else
- nId = 0; // Id = 0 for empty attributes
-
- return nId;
-}
-
-WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, short nType, long nStartCp,
- bool bDoingDrawTextBox)
- : maSprmParser(pBase->pWw8Fib->nVersion),
- mbDoingDrawTextBox(bDoingDrawTextBox)
-{
- pWwFib = pBase->pWw8Fib;
-
- nLastWhereIdxCp = 0;
- memset( aD, 0, sizeof( aD ) );
- nLineEnd = LONG_MAX;
- nManType = nType;
- sal_uInt16 i;
-
- if( MAN_MAINTEXT == nType )
- {
- // Suchreihenfolge der Attribute
- nPLCF = MAN_ANZ_PLCF;
- pFld = &aD[0];
- pBkm = &aD[1];
- pEdn = &aD[2];
- pFtn = &aD[3];
- pAnd = &aD[4];
-
- pPcd = ( pBase->pPLCFx_PCD ) ? &aD[5] : 0;
- //pPcdA index == pPcd index + 1
- pPcdA = ( pBase->pPLCFx_PCDAttrs ) ? &aD[6] : 0;
-
- pChp = &aD[7];
- pPap = &aD[8];
- pSep = &aD[9];
-
- pSep->pPLCFx = pBase->pSepPLCF;
- pFtn->pPLCFx = pBase->pFtnPLCF;
- pEdn->pPLCFx = pBase->pEdnPLCF;
- pBkm->pPLCFx = pBase->pBook;
- pAnd->pPLCFx = pBase->pAndPLCF;
-
- }
- else
- {
- // Suchreihenfolge der Attribute
- nPLCF = 7;
- pFld = &aD[0];
- pBkm = ( pBase->pBook ) ? &aD[1] : 0;
-
- pPcd = ( pBase->pPLCFx_PCD ) ? &aD[2] : 0;
- //pPcdA index == pPcd index + 1
- pPcdA= ( pBase->pPLCFx_PCDAttrs ) ? &aD[3] : 0;
-
- pChp = &aD[4];
- pPap = &aD[5];
- pSep = &aD[6]; // Dummy
-
- pAnd = pFtn = pEdn = 0; // unbenutzt bei SpezText
- }
-
- pChp->pPLCFx = pBase->pChpPLCF;
- pPap->pPLCFx = pBase->pPapPLCF;
- if( pPcd )
- pPcd->pPLCFx = pBase->pPLCFx_PCD;
- if( pPcdA )
- pPcdA->pPLCFx= pBase->pPLCFx_PCDAttrs;
- if( pBkm )
- pBkm->pPLCFx = pBase->pBook;
-
- pMagicTables = pBase->pMagicTables;
-
- switch( nType ) // Feld-Initialisierung
- {
- case MAN_HDFT:
- pFld->pPLCFx = pBase->pFldHdFtPLCF;
- nCpO = pWwFib->ccpText + pWwFib->ccpFtn;
- pFdoa = pBase->pHdFtFdoa;
- pTxbx = pBase->pHdFtTxbx;
- pTxbxBkd = pBase->pHdFtTxbxBkd;
- break;
- case MAN_FTN:
- pFld->pPLCFx = pBase->pFldFtnPLCF;
- nCpO = pWwFib->ccpText;
- pFdoa = pTxbx = pTxbxBkd = 0;
- break;
- case MAN_EDN:
- pFld->pPLCFx = pBase->pFldEdnPLCF;
- nCpO = pWwFib->ccpText + pWwFib->ccpFtn + pWwFib->ccpHdr +
- pWwFib->ccpAtn;
- pFdoa = pTxbx = pTxbxBkd = 0;
- break;
- case MAN_AND:
- pFld->pPLCFx = pBase->pFldAndPLCF;
- nCpO = pWwFib->ccpText + pWwFib->ccpFtn + pWwFib->ccpHdr;
- pFdoa = pTxbx = pTxbxBkd = 0;
- break;
- case MAN_TXBX:
- pFld->pPLCFx = pBase->pFldTxbxPLCF;
- nCpO = pWwFib->ccpText + pWwFib->ccpFtn + pWwFib->ccpHdr +
- pWwFib->ccpMcr + pWwFib->ccpAtn + pWwFib->ccpEdn;
- pTxbx = pBase->pMainTxbx;
- pTxbxBkd = pBase->pMainTxbxBkd;
- pFdoa = 0;
- break;
- case MAN_TXBX_HDFT:
- pFld->pPLCFx = pBase->pFldTxbxHdFtPLCF;
- nCpO = pWwFib->ccpText + pWwFib->ccpFtn + pWwFib->ccpHdr +
- pWwFib->ccpMcr + pWwFib->ccpAtn + pWwFib->ccpEdn +
- pWwFib->ccpTxbx;
- pTxbx = pBase->pHdFtTxbx;
- pTxbxBkd = pBase->pHdFtTxbxBkd;
- pFdoa = 0;
- break;
- default:
- pFld->pPLCFx = pBase->pFldPLCF;
- nCpO = 0;
- pFdoa = pBase->pMainFdoa;
- pTxbx = pBase->pMainTxbx;
- pTxbxBkd = pBase->pMainTxbxBkd;
- break;
- }
-
- if( nStartCp || nCpO )
- SeekPos( nStartCp ); // PLCFe auf Text-StartPos einstellen
-
- // initialisieren der Member-Vars Low-Level
- GetChpPLCF()->ResetAttrStartEnd();
- GetPapPLCF()->ResetAttrStartEnd();
- for( i=0; i < nPLCF; i++)
- {
- WW8PLCFxDesc* p = &aD[i];
-
- /*
- ##516##,##517##
- For subdocuments we modify the cp of properties to be relative to
- the beginning of subdocuments, we should also do the same for
- piecetable changes, and piecetable properties, otherwise a piece
- change that happens in a subdocument is lost.
- */
- p->nCpOfs = ( p == pChp || p == pPap || p == pBkm || p == pPcd ||
- p == pPcdA ) ? nCpO : 0;
-
- p->nCp2OrIdx = 0;
- p->bFirstSprm = false;
- p->pIdStk = 0;
-
- if ((p == pChp) || (p == pPap))
- p->nStartPos = p->nEndPos = nStartCp;
- else
- p->nStartPos = p->nEndPos = LONG_MAX;
- }
-
- // initialisieren der Member-Vars High-Level
- for( i=0; i<nPLCF; i++){
- WW8PLCFxDesc* p = &aD[i];
-
- if( !p->pPLCFx )
- {
- p->nStartPos = p->nEndPos = LONG_MAX;
- continue;
- }
-
- if( p->pPLCFx->IsSprm() )
- {
- // Vorsicht: nEndPos muss bereits
- p->pIdStk = new std::stack<sal_uInt16>;
- if ((p == pChp) || (p == pPap))
- {
- WW8_CP nTemp = p->nEndPos+p->nCpOfs;
- p->pMemPos = 0;
- p->nSprmsLen = 0;
- p->nStartPos = nTemp;
- if (!(*p->pPLCFx).SeekPos(p->nStartPos))
- p->nEndPos = p->nStartPos = LONG_MAX;
- else
- GetNewSprms( *p );
- }
- else
- GetNewSprms( *p ); // bei allen PLCFen initialisiert sein
- }
- else if( p->pPLCFx )
- GetNewNoSprms( *p );
- }
-}
-
-WW8PLCFMan::~WW8PLCFMan()
-{
- for( sal_uInt16 i=0; i<nPLCF; i++)
- delete aD[i].pIdStk;
-}
-
-// 0. welche Attr.-Klasse,
-// 1. ob ein Attr.-Start ist,
-// 2. CP, wo ist naechste Attr.-Aenderung
-sal_uInt16 WW8PLCFMan::WhereIdx(bool* pbStart, long* pPos) const
-{
- ASSERT(nPLCF,"What the hell");
- long nNext = LONG_MAX; // SuchReihenfolge:
- sal_uInt16 nNextIdx = nPLCF;// first ending found ( CHP, PAP, ( SEP ) ),
- bool bStart = true; // dann Anfaenge finden ( ( SEP ), PAP, CHP )
- sal_uInt16 i;
- const WW8PLCFxDesc* pD;
- for (i=0; i < nPLCF; i++)
- {
- pD = &aD[i];
- if (pD != pPcdA)
- {
- if( (pD->nEndPos < nNext) && (pD->nStartPos == LONG_MAX) )
- {
- // sonst ist Anfang = Ende
- nNext = pD->nEndPos;
- nNextIdx = i;
- bStart = false;
- }
- }
- }
- for (i=nPLCF; i > 0; i--)
- {
- pD = &aD[i-1];
- if (pD != pPcdA)
- {
- if( pD->nStartPos < nNext )
- {
- nNext = pD->nStartPos;
- nNextIdx = i-1;
- bStart = true;
- }
- }
- }
- if( pPos )
- *pPos = nNext;
- if( pbStart )
- *pbStart = bStart;
- return nNextIdx;
-}
-
-// gibt die CP-Pos der naechsten Attribut-Aenderung zurueck
-WW8_CP WW8PLCFMan::Where() const
-{
- long l;
- WhereIdx(0, &l);
- return l;
-}
-
-void WW8PLCFMan::SeekPos( long nNewCp )
-{
- pChp->pPLCFx->SeekPos( nNewCp + nCpO ); // Attribute neu
- pPap->pPLCFx->SeekPos( nNewCp + nCpO ); // aufsetzen
- pFld->pPLCFx->SeekPos( nNewCp );
- if( pPcd )
- pPcd->pPLCFx->SeekPos( nNewCp + nCpO );
- if( pBkm )
- pBkm->pPLCFx->SeekPos( nNewCp + nCpO );
-}
-
-void WW8PLCFMan::SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const
-{
- sal_uInt16 i, n=0;
- if( pPcd )
- pPcd->Save( rSave.aS[n++] );
- if( pPcdA )
- pPcdA->Save( rSave.aS[n++] );
-
- for(i=0; i<nPLCF; ++i)
- if( pPcd != &aD[i] && pPcdA != &aD[i] )
- aD[i].Save( rSave.aS[n++] );
-}
-
-void WW8PLCFMan::RestoreAllPLCFx( const WW8PLCFxSaveAll& rSave )
-{
- sal_uInt16 i, n=0;
- if( pPcd )
- pPcd->Restore( rSave.aS[n++] );
- if( pPcdA )
- pPcdA->Restore( rSave.aS[n++] );
-
- for(i=0; i<nPLCF; ++i)
- if( pPcd != &aD[i] && pPcdA != &aD[i] )
- aD[i].Restore( rSave.aS[n++] );
-}
-
-void WW8PLCFMan::GetSprmStart( short nIdx, WW8PLCFManResult* pRes ) const
-{
- memset( pRes, 0, sizeof( WW8PLCFManResult ) );
-
- // Pruefen !!!
-
- pRes->nMemLen = 0;
-
- const WW8PLCFxDesc* p = &aD[nIdx];
-
- // first Sprm in a Group
- if( p->bFirstSprm )
- {
- if( p == pPap )
- pRes->nFlags |= MAN_MASK_NEW_PAP;
- else if( p == pSep )
- pRes->nFlags |= MAN_MASK_NEW_SEP;
- }
- pRes->pMemPos = p->pMemPos;
- pRes->nSprmId = GetId(p);
- pRes->nCp2OrIdx = p->nCp2OrIdx;
- if (p->nSprmsLen)
- {
- // Length of actual sprm
- pRes->nMemLen = maSprmParser.GetSprmSize(pRes->nSprmId, pRes->pMemPos);
- }
-}
-
-void WW8PLCFMan::GetSprmEnd( short nIdx, WW8PLCFManResult* pRes ) const
-{
- memset( pRes, 0, sizeof( WW8PLCFManResult ) );
-
- const WW8PLCFxDesc* p = &aD[nIdx];
-
- if (!(p->pIdStk->empty()))
- pRes->nSprmId = p->pIdStk->top(); // get end position
- else
- {
- ASSERT( !this, "No Id on the Stack" );
- pRes->nSprmId = 0;
- }
-}
-
-void WW8PLCFMan::GetNoSprmStart( short nIdx, WW8PLCFManResult* pRes ) const
-{
- const WW8PLCFxDesc* p = &aD[nIdx];
-
- pRes->nCpPos = p->nStartPos;
- pRes->nMemLen = p->nSprmsLen;
- pRes->nCp2OrIdx = p->nCp2OrIdx;
-
- if( p == pFld )
- pRes->nSprmId = eFLD;
- else if( p == pFtn )
- pRes->nSprmId = eFTN;
- else if( p == pEdn )
- pRes->nSprmId = eEDN;
- else if( p == pBkm )
- pRes->nSprmId = eBKN;
- else if( p == pAnd )
- pRes->nSprmId = eAND;
- else if( p == pPcd )
- {
- //We slave the piece table attributes to the piece table, the piece
- //table attribute iterator contains the sprms for this piece.
- GetSprmStart( nIdx+1, pRes );
- }
- else
- pRes->nSprmId = 0; // default: not found
-}
-
-void WW8PLCFMan::GetNoSprmEnd( short nIdx, WW8PLCFManResult* pRes ) const
-{
- pRes->nMemLen = -1; // Ende-Kennzeichen
-
- if( &aD[nIdx] == pBkm )
- pRes->nSprmId = eBKN;
- else if( &aD[nIdx] == pPcd )
- {
- //We slave the piece table attributes to the piece table, the piece
- //table attribute iterator contains the sprms for this piece.
- GetSprmEnd( nIdx+1, pRes );
- }
- else
- pRes->nSprmId = 0;
-}
-
-bool WW8PLCFMan::TransferOpenSprms(std::stack<sal_uInt16> &rStack)
-{
- for (int i = 0; i < nPLCF; ++i)
- {
- WW8PLCFxDesc* p = &aD[i];
- if (!p || !p->pIdStk)
- continue;
- while (!p->pIdStk->empty())
- {
- rStack.push(p->pIdStk->top());
- p->pIdStk->pop();
- }
- }
- return rStack.empty();
-}
-
-void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
-{
- WW8PLCFxDesc* p = &aD[nIdx]; // Sprm-Klasse(!) ermitteln
-
- p->bFirstSprm = false;
- if( bStart )
- {
- sal_uInt16 nLastId = GetId(p);
- p->pIdStk->push(nLastId); // merke Id fuer Attribut-Ende
-
- if( p->nSprmsLen )
- { /*
- Pruefe, ob noch Sprm(s) abzuarbeiten sind
- */
- if( p->pMemPos )
- {
- // Length of last sprm
- sal_uInt16 nSprmL = maSprmParser.GetSprmSize(nLastId, p->pMemPos);
-
- // Gesamtlaenge Sprms um SprmLaenge verringern
- p->nSprmsLen -= nSprmL;
-
- // Pos des evtl. naechsten Sprm
- if (p->nSprmsLen < maSprmParser.MinSprmLen())
- {
- // sicherheitshalber auf Null setzen, da Enden folgen!
- p->pMemPos = 0;
- p->nSprmsLen = 0;
- }
- else
- p->pMemPos += nSprmL;
- }
- else
- p->nSprmsLen = 0;
- }
- if (p->nSprmsLen < maSprmParser.MinSprmLen())
- p->nStartPos = LONG_MAX; // es folgen Enden
- }
- else
- {
- if (!(p->pIdStk->empty()))
- p->pIdStk->pop();
- if (p->pIdStk->empty())
- {
- if ( (p == pChp) || (p == pPap) )
- {
- p->pMemPos = 0;
- p->nSprmsLen = 0;
- p->nStartPos = p->nOrigEndPos+p->nCpOfs;
-
- /*
- #93702#
- On failed seek we have run out of sprms, probably. But if its
- a fastsaved file (has pPcd) then we may be just in a sprm free
- gap between pieces that have them, so set dirty flag in sprm
- finder to consider than.
- */
- if (!(*p->pPLCFx).SeekPos(p->nStartPos))
- {
- p->nEndPos = LONG_MAX;
- p->pPLCFx->SetDirty(true);
- }
- if (!p->pPLCFx->GetDirty() || pPcd)
- GetNewSprms( *p );
- p->pPLCFx->SetDirty(false);
-
- /*
- #i2325#
- To get the character and paragraph properties you first get
- the pap and chp and then apply the fastsaved pPcd properties
- to the range. If a pap or chp starts inside the pPcd range
- then we must bring the current pPcd range to a halt so as to
- end those sprms, then the pap/chp will be processed, and then
- we must force a restart of the pPcd on that pap/chp starting
- boundary. Doing that effectively means that the pPcd sprms will
- be applied to the new range. Not doing it means that the pPcd
- sprms will only be applied to the first pap/chp set of
- properties contained in the pap/chp range.
-
- So we bring the pPcd to a halt on this location here, by
- settings its end to the current start, then store the starting
- position of the current range to clipstart. The pPcd sprms
- will end as normal (albeit earlier than originally expected),
- and the existance of a clipstart will force the pPcd iterater
- to reread the current set of sprms instead of advancing to its
- next set. Then the clipstart will be set as the starting
- position which will force them to be applied directly after
- the pap and chps.
- */
- if (pPcd && ((p->nStartPos > pPcd->nStartPos) ||
- (pPcd->nStartPos == LONG_MAX)) &&
- (pPcd->nEndPos != p->nStartPos))
- {
- pPcd->nEndPos = p->nStartPos;
- ((WW8PLCFx_PCD *)(pPcd->pPLCFx))->SetClipStart(
- p->nStartPos);
- }
-
- }
- else
- {
- (*p->pPLCFx)++; // next Group of Sprms
- p->pMemPos = 0; // !!!
- p->nSprmsLen = 0;
- GetNewSprms( *p );
- }
- ASSERT( p->nStartPos <= p->nEndPos, "Attribut ueber Kreuz" );
- }
- }
-}
-
-void WW8PLCFMan::AdvNoSprm(short nIdx, bool bStart)
-{
- /*
- For the case of a piece table we slave the piece table attribute iterator
- to the piece table and access it through that only. They are two seperate
- structures, but act together as one logical one. The attributes only go
- to the next entry when the piece changes
- */
- WW8PLCFxDesc* p = &aD[nIdx];
-
- if( p == pPcd )
- {
- AdvSprm(nIdx+1,bStart);
- if( bStart )
- p->nStartPos = aD[nIdx+1].nStartPos;
- else
- {
- if (aD[nIdx+1].pIdStk->empty())
- {
- WW8PLCFx_PCD *pTemp = (WW8PLCFx_PCD*)(pPcd->pPLCFx);
- /*
- #i2325#
- As per normal, go on to the next set of properties, i.e. we
- have traversed over to the next piece. With a clipstart set
- we are being told to reread the current piece sprms so as to
- reapply them to a new chp or pap range.
- */
- if (pTemp->GetClipStart() == -1)
- (*p->pPLCFx)++;
- p->pMemPos = 0;
- p->nSprmsLen = 0;
- GetNewSprms( aD[nIdx+1] );
- GetNewNoSprms( *p );
- if (pTemp->GetClipStart() != -1)
- {
- /*
- #i2325#, now we will force our starting position to the
- clipping start so as to force the application of these
- sprms after the current pap/chp sprms so as to apply the
- fastsave sprms to the current range.
- */
- p->nStartPos = pTemp->GetClipStart();
- pTemp->SetClipStart(-1);
- }
- }
- }
- }
- else
- { // NoSprm ohne Ende
- (*p->pPLCFx)++;
- p->pMemPos = 0; // MemPos ungueltig
- p->nSprmsLen = 0;
- GetNewNoSprms( *p );
- }
-}
-
-WW8PLCFMan& WW8PLCFMan::operator ++(int)
-{
- bool bStart;
- sal_uInt16 nIdx = WhereIdx(&bStart);
- if (nIdx < nPLCF)
- {
- WW8PLCFxDesc* p = &aD[nIdx];
-
- p->bFirstSprm = true; // Default
-
- if( p->pPLCFx->IsSprm() )
- AdvSprm( nIdx, bStart );
- else // NoSprm
- AdvNoSprm( nIdx, bStart );
- }
- return *this;
-}
-
-// Rueckgabe true fuer Anfang eines Attributes oder Fehler,
-// false fuer Ende d. Attr
-// Restliche Rueckgabewerte werden in der vom Aufrufer zu stellenden Struktur
-// WW8PclxManResults geliefert.
-bool WW8PLCFMan::Get(WW8PLCFManResult* pRes) const
-{
- memset( pRes, 0, sizeof( WW8PLCFManResult ) );
- bool bStart;
- sal_uInt16 nIdx = WhereIdx(&bStart);
-
- if( nIdx >= nPLCF )
- {
- ASSERT( !this, "Position not found" );
- return true;
- }
-
- if( aD[nIdx].pPLCFx->IsSprm() )
- {
- if( bStart )
- {
- GetSprmStart( nIdx, pRes );
- return true;
- }
- else
- {
- GetSprmEnd( nIdx, pRes );
- return false;
- }
- }
- else
- {
- if( bStart )
- {
- GetNoSprmStart( nIdx, pRes );
- return true;
- }
- else
- {
- GetNoSprmEnd( nIdx, pRes );
- return false;
- }
- }
-}
-
-sal_uInt16 WW8PLCFMan::GetColl() const
-{
- if( pPap->pPLCFx )
- return pPap->pPLCFx->GetIstd();
- else
- {
- ASSERT( !this, "GetColl ohne PLCF_Pap" );
- return 0;
- }
-}
-
-WW8PLCFx_FLD* WW8PLCFMan::GetFld() const
-{
- return (WW8PLCFx_FLD*)pFld->pPLCFx;
-}
-
-const sal_uInt8* WW8PLCFMan::HasParaSprm( sal_uInt16 nId ) const
-{
- return ((WW8PLCFx_Cp_FKP*)pPap->pPLCFx)->HasSprm( nId );
-}
-
-const sal_uInt8* WW8PLCFMan::HasCharSprm( sal_uInt16 nId ) const
-{
- return ((WW8PLCFx_Cp_FKP*)pChp->pPLCFx)->HasSprm( nId );
-}
-
-bool WW8PLCFMan::HasCharSprm(sal_uInt16 nId,
- std::vector<const sal_uInt8 *> &rResult) const
-{
- return ((WW8PLCFx_Cp_FKP*)pChp->pPLCFx)->HasSprm(nId, rResult);
-}
-
-#endif // !DUMP
-
-void WW8PLCFx::Save( WW8PLCFxSave1& rSave ) const
-{
- rSave.nPLCFxPos = GetIdx();
- rSave.nPLCFxPos2 = GetIdx2();
- rSave.nPLCFxMemOfs = 0;
- rSave.nStartFC = GetStartFc();
-}
-
-void WW8PLCFx::Restore( const WW8PLCFxSave1& rSave )
-{
- SetIdx( rSave.nPLCFxPos );
- SetIdx2( rSave.nPLCFxPos2 );
- SetStartFc( rSave.nStartFC );
-}
-
-sal_uLong WW8PLCFx_Cp_FKP::GetIdx2() const
-{
- return GetPCDIdx();
-}
-
-void WW8PLCFx_Cp_FKP::SetIdx2( sal_uLong nIdx )
-{
- SetPCDIdx( nIdx );
-}
-
-void WW8PLCFx_Cp_FKP::Save( WW8PLCFxSave1& rSave ) const
-{
- WW8PLCFx::Save( rSave );
-
- rSave.nAttrStart = nAttrStart;
- rSave.nAttrEnd = nAttrEnd;
- rSave.bLineEnd = bLineEnd;
-}
-
-void WW8PLCFx_Cp_FKP::Restore( const WW8PLCFxSave1& rSave )
-{
- WW8PLCFx::Restore( rSave );
-
- nAttrStart = rSave.nAttrStart;
- nAttrEnd = rSave.nAttrEnd;
- bLineEnd = rSave.bLineEnd;
-}
-
-void WW8PLCFxDesc::Save( WW8PLCFxSave1& rSave ) const
-{
- if( pPLCFx )
- {
- pPLCFx->Save( rSave );
- if( pPLCFx->IsSprm() )
- {
- WW8PLCFxDesc aD;
- aD.nStartPos = nOrigStartPos+nCpOfs;
- aD.nCpOfs = rSave.nCpOfs = nCpOfs;
- if (!(pPLCFx->SeekPos(aD.nStartPos)))
- {
- aD.nEndPos = LONG_MAX;
- pPLCFx->SetDirty(true);
- }
- pPLCFx->GetSprms(&aD);
- pPLCFx->SetDirty(false);
- aD.ReduceByOffset();
- rSave.nStartCp = aD.nStartPos;
- rSave.nPLCFxMemOfs = nOrigSprmsLen - nSprmsLen;
- }
- }
-}
-
-void WW8PLCFxDesc::Restore( const WW8PLCFxSave1& rSave )
-{
- if( pPLCFx )
- {
- pPLCFx->Restore( rSave );
- if( pPLCFx->IsSprm() )
- {
- WW8PLCFxDesc aD;
- aD.nStartPos = rSave.nStartCp+rSave.nCpOfs;
- nCpOfs = aD.nCpOfs = rSave.nCpOfs;
- if (!(pPLCFx->SeekPos(aD.nStartPos)))
- {
- aD.nEndPos = LONG_MAX;
- pPLCFx->SetDirty(true);
- }
- pPLCFx->GetSprms(&aD);
- pPLCFx->SetDirty(false);
- aD.ReduceByOffset();
- pMemPos = aD.pMemPos + rSave.nPLCFxMemOfs;
- }
- }
-}
-
-//-----------------------------------------
-
-
-WW8Fib::WW8Fib( SvStream& rSt, sal_uInt8 nWantedVersion,sal_uInt32 nOffset )
- : nFibError( 0 )
-{
- sal_uInt8 aBits1;
- sal_uInt8 aBits2;
- sal_uInt8 aVer8Bits1; // nur ab WinWord 8 benutzt
- rSt.Seek( nOffset );
- /*
- Wunsch-Nr vermerken, File-Versionsnummer ermitteln
- und gegen Wunsch-Nr. checken !
- */
- nVersion = nWantedVersion;
- rSt >> wIdent;
- rSt >> nFib;
- rSt >> nProduct;
- if( 0 != rSt.GetError() )
- {
- sal_Int16 nFibMin;
- sal_Int16 nFibMax;
- // note: 6 stands for "6 OR 7", 7 stands for "ONLY 7"
- switch( nVersion )
- {
- case 6:
- nFibMin = 0x0065; // von 101 WinWord 6.0
- // 102 "
- // und 103 WinWord 6.0 fuer Macintosh
- // 104 "
- nFibMax = 0x0069; // bis 105 WinWord 95
- break;
- case 7:
- nFibMin = 0x0069; // von 105 WinWord 95
- nFibMax = 0x0069; // bis 105 WinWord 95
- break;
- case 8:
- nFibMin = 0x006A; // von 106 WinWord 97
- nFibMax = 0x00c1; // bis 193 WinWord 97 (?)
- break;
- default:
- nFibMin = 0; // Programm-Fehler!
- nFibMax = 0;
- nFib = 1;
- ASSERT( !this, "Es wurde vergessen, nVersion zu kodieren!" );
- break;
- }
- if ( (nFib < nFibMin) || (nFib > nFibMax) )
- {
- nFibError = ERR_SWG_READ_ERROR; // Error melden
- return; // und hopp raus!
- }
- }
-
- // praktische Hilfsvariablen:
- bool bVer67 = ((6 == nVersion) || (7 == nVersion));
- bool bVer8 = (8 == nVersion);
-
- // Hilfs-Varis fuer Ver67:
- sal_Int16 pnChpFirst_Ver67=0;
- sal_Int16 pnPapFirst_Ver67=0;
- sal_Int16 cpnBteChp_Ver67=0;
- sal_Int16 cpnBtePap_Ver67=0;
-
- // und auf gehts: FIB einlesen
- rSt >> lid;
- rSt >> pnNext;
- rSt >> aBits1;
- rSt >> aBits2;
- rSt >> nFibBack;
- rSt >> lKey1;
- rSt >> lKey2;
- rSt >> envr;
- rSt >> aVer8Bits1; // unter Ver67 nur leeres Reservefeld
- // Inhalt von aVer8Bits1
- //
- // sal_uInt8 fMac :1;
- // sal_uInt8 fEmptySpecial :1;
- // sal_uInt8 fLoadOverridePage :1;
- // sal_uInt8 fFuturesavedUndo :1;
- // sal_uInt8 fWord97Saved :1;
- // sal_uInt8 :3;
- rSt >> chse;
- rSt >> chseTables;
- rSt >> fcMin;
- rSt >> fcMac;
-
-// Einschub fuer WW8 *****************************************************
- if( !bVer67 )
- {
- rSt >> csw;
-
- // Marke: "rgsw" Beginning of the array of shorts
- rSt >> wMagicCreated;
- rSt >> wMagicRevised;
- rSt >> wMagicCreatedPrivate;
- rSt >> wMagicRevisedPrivate;
- rSt.SeekRel( 9 * sizeof( sal_Int16 ) );
-
- /*
- // dies sind die 9 unused Felder:
- && (bVer67 || WW8ReadINT16( rSt, pnFbpChpFirst_W6 )) // 1
- && (bVer67 || WW8ReadINT16( rSt, pnChpFirst_W6 )) // 2
- && (bVer67 || WW8ReadINT16( rSt, cpnBteChp_W6 )) // 3
- && (bVer67 || WW8ReadINT16( rSt, pnFbpPapFirst_W6 )) // 4
- && (bVer67 || WW8ReadINT16( rSt, pnPapFirst_W6 )) // 5
- && (bVer67 || WW8ReadINT16( rSt, cpnBtePap_W6 )) // 6
- && (bVer67 || WW8ReadINT16( rSt, pnFbpLvcFirst_W6 )) // 7
- && (bVer67 || WW8ReadINT16( rSt, pnLvcFirst_W6 )) // 8
- && (bVer67 || WW8ReadINT16( rSt, cpnBteLvc_W6 )) // 9
- */
- rSt >> lidFE;
- rSt >> clw;
- }
-
-// Ende des Einschubs fuer WW8 *******************************************
-
- // Marke: "rglw" Beginning of the array of longs
- rSt >> cbMac;
-
- // 2 Longs uebergehen, da unwichtiger Quatsch
- rSt.SeekRel( 2 * sizeof( sal_Int32) );
-
- // weitere 2 Longs nur bei Ver67 ueberspringen
- if( bVer67 )
- rSt.SeekRel( 2 * sizeof( sal_Int32) );
-
- rSt >> ccpText;
- rSt >> ccpFtn;
- rSt >> ccpHdr;
- rSt >> ccpMcr;
- rSt >> ccpAtn;
- rSt >> ccpEdn;
- rSt >> ccpTxbx;
- rSt >> ccpHdrTxbx;
-
- // weiteres Long nur bei Ver67 ueberspringen
- if( bVer67 )
- rSt.SeekRel( 1 * sizeof( sal_Int32) );
- else
- {
-// Einschub fuer WW8 *****************************************************
- rSt >> pnFbpChpFirst;
- rSt >> pnChpFirst;
- rSt >> cpnBteChp;
- rSt >> pnFbpPapFirst;
- rSt >> pnPapFirst;
- rSt >> cpnBtePap;
- rSt >> pnFbpLvcFirst;
- rSt >> pnLvcFirst;
- rSt >> cpnBteLvc;
- rSt >> fcIslandFirst;
- rSt >> fcIslandLim;
- rSt >> cfclcb;
- }
-
-// Ende des Einschubs fuer WW8 *******************************************
-
- // Marke: "rgfclcb" Beginning of array of FC/LCB pairs.
- rSt >> fcStshfOrig;
- rSt >> lcbStshfOrig;
- rSt >> fcStshf;
- rSt >> lcbStshf;
- rSt >> fcPlcffndRef;
- rSt >> lcbPlcffndRef;
- rSt >> fcPlcffndTxt;
- rSt >> lcbPlcffndTxt;
- rSt >> fcPlcfandRef;
- rSt >> lcbPlcfandRef;
- rSt >> fcPlcfandTxt;
- rSt >> lcbPlcfandTxt;
- rSt >> fcPlcfsed;
- rSt >> lcbPlcfsed;
- rSt >> fcPlcfpad;
- rSt >> lcbPlcfpad;
- rSt >> fcPlcfphe;
- rSt >> lcbPlcfphe;
- rSt >> fcSttbfglsy;
- rSt >> lcbSttbfglsy;
- rSt >> fcPlcfglsy;
- rSt >> lcbPlcfglsy;
- rSt >> fcPlcfhdd;
- rSt >> lcbPlcfhdd;
- rSt >> fcPlcfbteChpx;
- rSt >> lcbPlcfbteChpx;
- rSt >> fcPlcfbtePapx;
- rSt >> lcbPlcfbtePapx;
- rSt >> fcPlcfsea;
- rSt >> lcbPlcfsea;
- rSt >> fcSttbfffn;
- rSt >> lcbSttbfffn;
- rSt >> fcPlcffldMom;
- rSt >> lcbPlcffldMom;
- rSt >> fcPlcffldHdr;
- rSt >> lcbPlcffldHdr;
- rSt >> fcPlcffldFtn;
- rSt >> lcbPlcffldFtn;
- rSt >> fcPlcffldAtn;
- rSt >> lcbPlcffldAtn;
- rSt >> fcPlcffldMcr;
- rSt >> lcbPlcffldMcr;
- rSt >> fcSttbfbkmk;
- rSt >> lcbSttbfbkmk;
- rSt >> fcPlcfbkf;
- rSt >> lcbPlcfbkf;
- rSt >> fcPlcfbkl;
- rSt >> lcbPlcfbkl;
- rSt >> fcCmds;
- rSt >> lcbCmds;
- rSt >> fcPlcfmcr;
- rSt >> lcbPlcfmcr;
- rSt >> fcSttbfmcr;
- rSt >> lcbSttbfmcr;
- rSt >> fcPrDrvr;
- rSt >> lcbPrDrvr;
- rSt >> fcPrEnvPort;
- rSt >> lcbPrEnvPort;
- rSt >> fcPrEnvLand;
- rSt >> lcbPrEnvLand;
- rSt >> fcWss;
- rSt >> lcbWss;
- rSt >> fcDop;
- rSt >> lcbDop;
- rSt >> fcSttbfAssoc;
- rSt >> cbSttbfAssoc;
- rSt >> fcClx;
- rSt >> lcbClx;
- rSt >> fcPlcfpgdFtn;
- rSt >> lcbPlcfpgdFtn;
- rSt >> fcAutosaveSource;
- rSt >> lcbAutosaveSource;
- rSt >> fcGrpStAtnOwners;
- rSt >> lcbGrpStAtnOwners;
- rSt >> fcSttbfAtnbkmk;
- rSt >> lcbSttbfAtnbkmk;
-
- // weiteres short nur bei Ver67 ueberspringen
- if (bVer67)
- {
- rSt.SeekRel( 1*sizeof( sal_Int16) );
-
- // folgende 4 Shorts existieren nur bei Ver67;
- rSt >> pnChpFirst_Ver67;
- rSt >> pnPapFirst_Ver67;
- rSt >> cpnBteChp_Ver67;
- rSt >> cpnBtePap_Ver67;
- }
-
- rSt >> fcPlcfdoaMom;
- rSt >> lcbPlcfdoaMom;
- rSt >> fcPlcfdoaHdr;
- rSt >> lcbPlcfdoaHdr;
- rSt >> fcPlcfspaMom;
- rSt >> lcbPlcfspaMom;
- rSt >> fcPlcfspaHdr;
- rSt >> lcbPlcfspaHdr;
-
- rSt >> fcPlcfAtnbkf;
- rSt >> lcbPlcfAtnbkf;
- rSt >> fcPlcfAtnbkl;
- rSt >> lcbPlcfAtnbkl;
- rSt >> fcPms;
- rSt >> lcbPMS;
- rSt >> fcFormFldSttbf;
- rSt >> lcbFormFldSttbf;
- rSt >> fcPlcfendRef;
- rSt >> lcbPlcfendRef;
- rSt >> fcPlcfendTxt;
- rSt >> lcbPlcfendTxt;
- rSt >> fcPlcffldEdn;
- rSt >> lcbPlcffldEdn;
- rSt >> fcPlcfpgdEdn;
- rSt >> lcbPlcfpgdEdn;
- rSt >> fcDggInfo;
- rSt >> lcbDggInfo;
- rSt >> fcSttbfRMark;
- rSt >> lcbSttbfRMark;
- rSt >> fcSttbfCaption;
- rSt >> lcbSttbfCaption;
- rSt >> fcSttbAutoCaption;
- rSt >> lcbSttbAutoCaption;
- rSt >> fcPlcfwkb;
- rSt >> lcbPlcfwkb;
- rSt >> fcPlcfspl;
- rSt >> lcbPlcfspl;
- rSt >> fcPlcftxbxTxt;
- rSt >> lcbPlcftxbxTxt;
- rSt >> fcPlcffldTxbx;
- rSt >> lcbPlcffldTxbx;
- rSt >> fcPlcfHdrtxbxTxt;
- rSt >> lcbPlcfHdrtxbxTxt;
- rSt >> fcPlcffldHdrTxbx;
- rSt >> lcbPlcffldHdrTxbx;
-
- if( 0 == rSt.GetError() )
- {
- // Bit-Flags setzen
- fDot = aBits1 & 0x01 ;
- fGlsy = ( aBits1 & 0x02 ) >> 1;
- fComplex = ( aBits1 & 0x04 ) >> 2;
- fHasPic = ( aBits1 & 0x08 ) >> 3;
- cQuickSaves = ( aBits1 & 0xf0 ) >> 4;
- fEncrypted = aBits2 & 0x01 ;
- fWhichTblStm= ( aBits2 & 0x02 ) >> 1;
- // dummy = ( aBits2 & 0x0e ) >> 1;
- fExtChar = ( aBits2 & 0x10 ) >> 4;
- // dummy = ( aBits2 & 0xe0 ) >> 5;
-
- /*
- ggfs. Ziel-Varaiblen, aus xxx_Ver67 fuellen
- oder Flags setzen
- */
- if (bVer67)
- {
- pnChpFirst = pnChpFirst_Ver67;
- pnPapFirst = pnPapFirst_Ver67;
- cpnBteChp = cpnBteChp_Ver67;
- cpnBtePap = cpnBtePap_Ver67;
- }
- else if( bVer8 )
- {
- fMac = aVer8Bits1 & 0x01 ;
- fEmptySpecial = ( aVer8Bits1 & 0x02 ) >> 1;
- fLoadOverridePage = ( aVer8Bits1 & 0x04 ) >> 2;
- fFuturesavedUndo = ( aVer8Bits1 & 0x08 ) >> 3;
- fWord97Saved = ( aVer8Bits1 & 0x10 ) >> 4;
- fWord2000Saved = ( aVer8Bits1 & 0x20 ) >> 5;
-
- /*
- speziell fuer WW8:
- ermittle die Werte fuer PLCF LST und PLF LFO
- und PLCF fuer TextBox-Break-Deskriptoren
- */
- long nOldPos = rSt.Tell();
- rSt.Seek( 0x02e2 );
- rSt >> fcPlcfLst;
- rSt >> lcbPlcfLst;
- rSt >> fcPlfLfo;
- rSt >> lcbPlfLfo;
- rSt >> fcPlcftxbxBkd;
- rSt >> lcbPlcftxbxBkd;
- rSt >> fcPlcfHdrtxbxBkd;
- rSt >> lcbPlcfHdrtxbxBkd;
- if( 0 != rSt.GetError() )
- {
- nFibError = ERR_SWG_READ_ERROR;
- }
-
- rSt.Seek( 0x372 ); // fcSttbListNames
- rSt >> fcSttbListNames;
- rSt >> lcbSttbListNames;
- rSt.Seek( 0x382 ); // MagicTables
- rSt >> fcMagicTable;
- rSt >> lcbMagicTable;
- if( 0 != rSt.GetError() )
- nFibError = ERR_SWG_READ_ERROR;
-
- rSt.Seek( nOldPos );
- }
- }
- else
- {
- nFibError = ERR_SWG_READ_ERROR; // Error melden
- }
-}
-
-
-WW8Fib::WW8Fib(sal_uInt8 nVer)
-{
- memset(this, 0, sizeof(*this));
- nVersion = nVer;
- if (8 == nVer)
- {
- fcMin = 0x400;
- wIdent = 0xa5ec;
- nFib = 0xc2;
- nFibBack = 0xbf;
- nProduct = 0x204D;
-
- csw = 0x0e; // muss das sein ???
- cfclcb = 0x6c; // -""-
- clw = 0x16; // -""-
- pnFbpChpFirst = pnFbpPapFirst = pnFbpLvcFirst = 0x000fffff;
- fExtChar = true;
- fWord97Saved = fWord2000Saved = true;
-
- // diese Flags muessen nicht gesetzt werden; koennen aber.
- // wMagicCreated = wMagicRevised = 0x6a62;
- // wMagicCreatedPrivate = wMagicRevisedPrivate = 0xb3b2;
- //
-
- wMagicCreated = 0x6143;
- wMagicRevised = 0x6C6F;
- wMagicCreatedPrivate = 0x6E61;
- wMagicRevisedPrivate = 0x3136;
- }
- else
- {
- fcMin = 0x300;
- wIdent = 0xa5dc;
- nFib = nFibBack = 0x65;
- nProduct = 0xc02d;
- }
-
- lid = lidFE = 0x407;
-}
-
-bool WW8Fib::Write(SvStream& rStrm)
-{
- sal_uInt8 *pDataPtr = new sal_uInt8[ fcMin ];
- sal_uInt8 *pData = pDataPtr;
- memset( pData, 0, fcMin );
-
- bool bVer8 = 8 == nVersion;
-
- sal_uLong nPos = rStrm.Tell();
- cbMac = rStrm.Seek( STREAM_SEEK_TO_END );
- rStrm.Seek( nPos );
-
- Set_UInt16( pData, wIdent );
- Set_UInt16( pData, nFib );
- Set_UInt16( pData, nProduct );
- Set_UInt16( pData, lid );
- Set_UInt16( pData, pnNext );
-
- sal_uInt16 nBits16 = 0;
- if( fDot ) nBits16 |= 0x0001;
- if( fGlsy) nBits16 |= 0x0002;
- if( fComplex ) nBits16 |= 0x0004;
- if( fHasPic ) nBits16 |= 0x0008;
- nBits16 |= (0xf0 & ( cQuickSaves << 4 ));
- if( fEncrypted ) nBits16 |= 0x0100;
- if( fWhichTblStm ) nBits16 |= 0x0200;
- if( fExtChar ) nBits16 |= 0x1000;
- Set_UInt16( pData, nBits16 );
-
- Set_UInt16( pData, nFibBack );
- Set_UInt16( pData, lKey1 );
- Set_UInt16( pData, lKey2 );
- Set_UInt8( pData, envr );
-
- sal_uInt8 nBits8 = 0;
- if( bVer8 )
- {
- if( fMac ) nBits8 |= 0x0001;
- if( fEmptySpecial ) nBits8 |= 0x0002;
- if( fLoadOverridePage ) nBits8 |= 0x0004;
- if( fFuturesavedUndo ) nBits8 |= 0x0008;
- if( fWord97Saved ) nBits8 |= 0x0010;
- if( fWord2000Saved ) nBits8 |= 0x0020;
- }
- // unter Ver67 these are only reserved
- Set_UInt8( pData, nBits8 );
-
- Set_UInt16( pData, chse );
- Set_UInt16( pData, chseTables );
- Set_UInt32( pData, fcMin );
- Set_UInt32( pData, fcMac );
-
-// Einschub fuer WW8 *****************************************************
-
- // Marke: "rgsw" Beginning of the array of shorts
- if( bVer8 )
- {
- Set_UInt16( pData, csw );
- Set_UInt16( pData, wMagicCreated );
- Set_UInt16( pData, wMagicRevised );
- Set_UInt16( pData, wMagicCreatedPrivate );
- Set_UInt16( pData, wMagicRevisedPrivate );
- pData += 9 * sizeof( sal_Int16 );
- Set_UInt16( pData, lidFE );
- Set_UInt16( pData, clw );
- }
-
-// Ende des Einschubs fuer WW8 *******************************************
-
- // Marke: "rglw" Beginning of the array of longs
- Set_UInt32( pData, cbMac );
-
- // 2 Longs uebergehen, da unwichtiger Quatsch
- pData += 2 * sizeof( sal_Int32);
-
- // weitere 2 Longs nur bei Ver67 ueberspringen
- if( !bVer8 )
- pData += 2 * sizeof( sal_Int32);
-
- Set_UInt32( pData, ccpText );
- Set_UInt32( pData, ccpFtn );
- Set_UInt32( pData, ccpHdr );
- Set_UInt32( pData, ccpMcr );
- Set_UInt32( pData, ccpAtn );
- Set_UInt32( pData, ccpEdn );
- Set_UInt32( pData, ccpTxbx );
- Set_UInt32( pData, ccpHdrTxbx );
-
- // weiteres Long nur bei Ver67 ueberspringen
- if( !bVer8 )
- pData += 1 * sizeof( sal_Int32);
-
-// Einschub fuer WW8 *****************************************************
- if( bVer8 )
- {
- Set_UInt32( pData, pnFbpChpFirst );
- Set_UInt32( pData, pnChpFirst );
- Set_UInt32( pData, cpnBteChp );
- Set_UInt32( pData, pnFbpPapFirst );
- Set_UInt32( pData, pnPapFirst );
- Set_UInt32( pData, cpnBtePap );
- Set_UInt32( pData, pnFbpLvcFirst );
- Set_UInt32( pData, pnLvcFirst );
- Set_UInt32( pData, cpnBteLvc );
- Set_UInt32( pData, fcIslandFirst );
- Set_UInt32( pData, fcIslandLim );
- Set_UInt16( pData, cfclcb );
- }
-// Ende des Einschubs fuer WW8 *******************************************
-
- // Marke: "rgfclcb" Beginning of array of FC/LCB pairs.
- Set_UInt32( pData, fcStshfOrig );
- Set_UInt32( pData, lcbStshfOrig );
- Set_UInt32( pData, fcStshf );
- Set_UInt32( pData, lcbStshf );
- Set_UInt32( pData, fcPlcffndRef );
- Set_UInt32( pData, lcbPlcffndRef );
- Set_UInt32( pData, fcPlcffndTxt );
- Set_UInt32( pData, lcbPlcffndTxt );
- Set_UInt32( pData, fcPlcfandRef );
- Set_UInt32( pData, lcbPlcfandRef );
- Set_UInt32( pData, fcPlcfandTxt );
- Set_UInt32( pData, lcbPlcfandTxt );
- Set_UInt32( pData, fcPlcfsed );
- Set_UInt32( pData, lcbPlcfsed );
- Set_UInt32( pData, fcPlcfpad );
- Set_UInt32( pData, lcbPlcfpad );
- Set_UInt32( pData, fcPlcfphe );
- Set_UInt32( pData, lcbPlcfphe );
- Set_UInt32( pData, fcSttbfglsy );
- Set_UInt32( pData, lcbSttbfglsy );
- Set_UInt32( pData, fcPlcfglsy );
- Set_UInt32( pData, lcbPlcfglsy );
- Set_UInt32( pData, fcPlcfhdd );
- Set_UInt32( pData, lcbPlcfhdd );
- Set_UInt32( pData, fcPlcfbteChpx );
- Set_UInt32( pData, lcbPlcfbteChpx );
- Set_UInt32( pData, fcPlcfbtePapx );
- Set_UInt32( pData, lcbPlcfbtePapx );
- Set_UInt32( pData, fcPlcfsea );
- Set_UInt32( pData, lcbPlcfsea );
- Set_UInt32( pData, fcSttbfffn );
- Set_UInt32( pData, lcbSttbfffn );
- Set_UInt32( pData, fcPlcffldMom );
- Set_UInt32( pData, lcbPlcffldMom );
- Set_UInt32( pData, fcPlcffldHdr );
- Set_UInt32( pData, lcbPlcffldHdr );
- Set_UInt32( pData, fcPlcffldFtn );
- Set_UInt32( pData, lcbPlcffldFtn );
- Set_UInt32( pData, fcPlcffldAtn );
- Set_UInt32( pData, lcbPlcffldAtn );
- Set_UInt32( pData, fcPlcffldMcr );
- Set_UInt32( pData, lcbPlcffldMcr );
- Set_UInt32( pData, fcSttbfbkmk );
- Set_UInt32( pData, lcbSttbfbkmk );
- Set_UInt32( pData, fcPlcfbkf );
- Set_UInt32( pData, lcbPlcfbkf );
- Set_UInt32( pData, fcPlcfbkl );
- Set_UInt32( pData, lcbPlcfbkl );
- Set_UInt32( pData, fcCmds );
- Set_UInt32( pData, lcbCmds );
- Set_UInt32( pData, fcPlcfmcr );
- Set_UInt32( pData, lcbPlcfmcr );
- Set_UInt32( pData, fcSttbfmcr );
- Set_UInt32( pData, lcbSttbfmcr );
- Set_UInt32( pData, fcPrDrvr );
- Set_UInt32( pData, lcbPrDrvr );
- Set_UInt32( pData, fcPrEnvPort );
- Set_UInt32( pData, lcbPrEnvPort );
- Set_UInt32( pData, fcPrEnvLand );
- Set_UInt32( pData, lcbPrEnvLand );
- Set_UInt32( pData, fcWss );
- Set_UInt32( pData, lcbWss );
- Set_UInt32( pData, fcDop );
- Set_UInt32( pData, lcbDop );
- Set_UInt32( pData, fcSttbfAssoc );
- Set_UInt32( pData, cbSttbfAssoc );
- Set_UInt32( pData, fcClx );
- Set_UInt32( pData, lcbClx );
- Set_UInt32( pData, fcPlcfpgdFtn );
- Set_UInt32( pData, lcbPlcfpgdFtn );
- Set_UInt32( pData, fcAutosaveSource );
- Set_UInt32( pData, lcbAutosaveSource );
- Set_UInt32( pData, fcGrpStAtnOwners );
- Set_UInt32( pData, lcbGrpStAtnOwners );
- Set_UInt32( pData, fcSttbfAtnbkmk );
- Set_UInt32( pData, lcbSttbfAtnbkmk );
-
- // weiteres short nur bei Ver67 ueberspringen
- if( !bVer8 )
- {
- pData += 1*sizeof( sal_Int16);
- Set_UInt16( pData, (sal_uInt16)pnChpFirst );
- Set_UInt16( pData, (sal_uInt16)pnPapFirst );
- Set_UInt16( pData, (sal_uInt16)cpnBteChp );
- Set_UInt16( pData, (sal_uInt16)cpnBtePap );
- }
-
- Set_UInt32( pData, fcPlcfdoaMom ); // nur bei Ver67, in Ver8 unused
- Set_UInt32( pData, lcbPlcfdoaMom ); // nur bei Ver67, in Ver8 unused
- Set_UInt32( pData, fcPlcfdoaHdr ); // nur bei Ver67, in Ver8 unused
- Set_UInt32( pData, lcbPlcfdoaHdr ); // nur bei Ver67, in Ver8 unused
-
- Set_UInt32( pData, fcPlcfspaMom ); // in Ver67 leere Reserve
- Set_UInt32( pData, lcbPlcfspaMom ); // in Ver67 leere Reserve
- Set_UInt32( pData, fcPlcfspaHdr ); // in Ver67 leere Reserve
- Set_UInt32( pData, lcbPlcfspaHdr ); // in Ver67 leere Reserve
-
- Set_UInt32( pData, fcPlcfAtnbkf );
- Set_UInt32( pData, lcbPlcfAtnbkf );
- Set_UInt32( pData, fcPlcfAtnbkl );
- Set_UInt32( pData, lcbPlcfAtnbkl );
- Set_UInt32( pData, fcPms );
- Set_UInt32( pData, lcbPMS );
- Set_UInt32( pData, fcFormFldSttbf );
- Set_UInt32( pData, lcbFormFldSttbf );
- Set_UInt32( pData, fcPlcfendRef );
- Set_UInt32( pData, lcbPlcfendRef );
- Set_UInt32( pData, fcPlcfendTxt );
- Set_UInt32( pData, lcbPlcfendTxt );
- Set_UInt32( pData, fcPlcffldEdn );
- Set_UInt32( pData, lcbPlcffldEdn );
- Set_UInt32( pData, fcPlcfpgdEdn );
- Set_UInt32( pData, lcbPlcfpgdEdn );
- Set_UInt32( pData, fcDggInfo ); // in Ver67 leere Reserve
- Set_UInt32( pData, lcbDggInfo ); // in Ver67 leere Reserve
- Set_UInt32( pData, fcSttbfRMark );
- Set_UInt32( pData, lcbSttbfRMark );
- Set_UInt32( pData, fcSttbfCaption );
- Set_UInt32( pData, lcbSttbfCaption );
- Set_UInt32( pData, fcSttbAutoCaption );
- Set_UInt32( pData, lcbSttbAutoCaption );
- Set_UInt32( pData, fcPlcfwkb );
- Set_UInt32( pData, lcbPlcfwkb );
- Set_UInt32( pData, fcPlcfspl ); // in Ver67 leere Reserve
- Set_UInt32( pData, lcbPlcfspl ); // in Ver67 leere Reserve
- Set_UInt32( pData, fcPlcftxbxTxt );
- Set_UInt32( pData, lcbPlcftxbxTxt );
- Set_UInt32( pData, fcPlcffldTxbx );
- Set_UInt32( pData, lcbPlcffldTxbx );
- Set_UInt32( pData, fcPlcfHdrtxbxTxt );
- Set_UInt32( pData, lcbPlcfHdrtxbxTxt );
- Set_UInt32( pData, fcPlcffldHdrTxbx );
- Set_UInt32( pData, lcbPlcffldHdrTxbx );
-
- if( bVer8 )
- {
- pData += 0x2e2 - 0x27a; // Pos + Offset (fcPlcfLst - fcStwUser)
- Set_UInt32( pData, fcPlcfLst );
- Set_UInt32( pData, lcbPlcfLst );
- Set_UInt32( pData, fcPlfLfo );
- Set_UInt32( pData, lcbPlfLfo );
- Set_UInt32( pData, fcPlcftxbxBkd );
- Set_UInt32( pData, lcbPlcftxbxBkd );
- Set_UInt32( pData, fcPlcfHdrtxbxBkd );
- Set_UInt32( pData, lcbPlcfHdrtxbxBkd );
-
- pData += 0x372 - 0x302; // Pos + Offset (fcSttbListNames - fcDocUndo)
- Set_UInt32( pData, fcSttbListNames );
- Set_UInt32( pData, lcbSttbListNames );
-
- pData += 0x382 - 0x37A;
- Set_UInt32( pData, fcMagicTable );
- Set_UInt32( pData, lcbMagicTable );
-
- pData += 0x3FA - 0x38A;
- Set_UInt16( pData, (sal_uInt16)0x0002);
- Set_UInt16( pData, (sal_uInt16)0x00D9);
- }
-
- rStrm.Write( pDataPtr, fcMin );
- delete[] pDataPtr;
- return 0 == rStrm.GetError();
-}
-
-rtl_TextEncoding WW8Fib::GetFIBCharset(sal_uInt16 chs)
-{
- ASSERT(chs <= 0x100, "overflowed winword charset set");
- rtl_TextEncoding eCharSet =
- (0x0100 == chs)
- ? RTL_TEXTENCODING_APPLE_ROMAN
- : rtl_getTextEncodingFromWindowsCharset( static_cast<sal_uInt8>(chs) );
- return eCharSet;
-}
-
-WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
- : rFib(rFibPara), rSt(rStream), cstd(0), cbSTDBaseInFile(0),
- stiMaxWhenSaved(0), istdMaxFixedWhenSaved(0), nVerBuiltInNamesWhenSaved(0),
- ftcStandardChpStsh(0), ftcStandardChpCJKStsh(0), ftcStandardChpCTLStsh(0)
-{
- nStyleStart = rFib.fcStshf;
- nStyleLen = rFib.lcbStshf;
-
- rSt.Seek(nStyleStart);
-
- sal_uInt16 cbStshi = 0; // 2 bytes size of the following STSHI structure
-
- // alte Version ?
- if (rFib.nFib < 67)
- cbStshi = 4; // -> Laengenfeld fehlt
- else // neue Version:
- // lies die Laenge der in der Datei gespeicherten Struktur
- rSt >> cbStshi;
-
- sal_uInt16 nRead = cbStshi;
- do
- {
- sal_uInt16 a16Bit;
-
- if( 2 > nRead ) break;
- rSt >> cstd;
-
- if( 4 > nRead ) break;
- rSt >> cbSTDBaseInFile;
-
- if( 6 > nRead ) break;
- rSt >> a16Bit;
- fStdStylenamesWritten = a16Bit & 0x0001;
-
- if( 8 > nRead ) break;
- rSt >> stiMaxWhenSaved;
-
- if( 10 > nRead ) break;
- rSt >> istdMaxFixedWhenSaved;
-
- if( 12 > nRead ) break;
- rSt >> nVerBuiltInNamesWhenSaved;
-
- if( 14 > nRead ) break;
- rSt >> ftcStandardChpStsh;
-
- if( 16 > nRead ) break;
- rSt >> ftcStandardChpCJKStsh;
-
- if ( 18 > nRead ) break;
- rSt >> ftcStandardChpCTLStsh;
-
- // ggfs. den Rest ueberlesen
- if( 18 < nRead )
- rSt.SeekRel( nRead-18 );
- }
- while( !this ); // Trick: obiger Block wird genau einmal durchlaufen
- // und kann vorzeitig per "break" verlassen werden.
-
- if( 0 != rSt.GetError() )
- {
- // wie denn nun den Error melden?
- }
-}
-
-// Read1STDFixed() liest ein Style ein. Wenn der Style vollstaendig vorhanden
-// ist, d.h. kein leerer Slot, dann wird Speicher alloziert und ein Pointer auf
-// die ( evtl. mit Nullen aufgefuellten ) STD geliefert. Ist es ein leerer
-// Slot, dann wird ein Nullpointer zurueckgeliefert.
-WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
-{
- WW8_STD* pStd = 0;
-
- sal_uInt16 cbStd;
- rSt >> cbStd; // lies Laenge
-
- sal_uInt16 nRead = cbSTDBaseInFile;
- if( cbStd >= cbSTDBaseInFile )
- {
- // Fixed part vollst. vorhanden
-
- // read fixed part of STD
- pStd = new WW8_STD;
- memset( pStd, 0, sizeof( *pStd ) );
-
- do
- {
- sal_uInt16 a16Bit;
-
- if( 2 > nRead ) break;
- rSt >> a16Bit;
- pStd->sti = a16Bit & 0x0fff ;
- pStd->fScratch = 0 != ( a16Bit & 0x1000 );
- pStd->fInvalHeight = 0 != ( a16Bit & 0x2000 );
- pStd->fHasUpe = 0 != ( a16Bit & 0x4000 );
- pStd->fMassCopy = 0 != ( a16Bit & 0x8000 );
-
- if( 4 > nRead ) break;
- rSt >> a16Bit;
- pStd->sgc = a16Bit & 0x000f ;
- pStd->istdBase = ( a16Bit & 0xfff0 ) >> 4;
-
- if( 6 > nRead ) break;
- rSt >> a16Bit;
- pStd->cupx = a16Bit & 0x000f ;
- pStd->istdNext = ( a16Bit & 0xfff0 ) >> 4;
-
- if( 8 > nRead ) break;
- rSt >> pStd->bchUpe;
-
- // ab Ver8 sollten diese beiden Felder dazukommen:
- if(10 > nRead ) break;
- rSt >> a16Bit;
- pStd->fAutoRedef = a16Bit & 0x0001 ;
- pStd->fHidden = ( a16Bit & 0x0002 ) >> 2;
-
- // man kann nie wissen: vorsichtshalber ueberlesen
- // wir eventuelle Fuellsel, die noch zum BASE-Part gehoeren...
- if( 10 < nRead )
- rSt.SeekRel( nRead-10 );
- }
- while( !this ); // Trick: obiger Block wird genau einmal durchlaufen
- // und kann vorzeitig per "break" verlassen werden.
-
- if( (0 != rSt.GetError()) || !nRead )
- DELETEZ( pStd ); // per NULL den Error melden
-
- rSkip = cbStd - cbSTDBaseInFile;
- }
- else
- { // Fixed part zu kurz
- if( cbStd )
- rSt.SeekRel( cbStd ); // ueberlies Reste
- rSkip = 0;
- }
- if( pcbStd )
- *pcbStd = cbStd;
- return pStd;
-}
-
-WW8_STD* WW8Style::Read1Style( short& rSkip, String* pString, short* pcbStd )
-{
- // Attention: MacWord-Documents have their Stylenames
- // always in ANSI, even if eStructCharSet == CHARSET_MAC !!
-
- WW8_STD* pStd = Read1STDFixed( rSkip, pcbStd ); // lese STD
-
- // String gewuenscht ?
- if( pString )
- { // echter Style ?
- if ( pStd )
- {
- switch( rFib.nVersion )
- {
- case 6:
- case 7:
- // lies Pascal-String
- *pString = WW8ReadPString( rSt, RTL_TEXTENCODING_MS_1252 );
- // leading len and trailing zero --> 2
- rSkip -= 2+ pString->Len();
- break;
- case 8:
- // handle Unicode-String with leading length short and
- // trailing zero
- if (ww8String::TestBeltAndBraces(rSt))
- {
- *pString = WW8Read_xstz(rSt, 0, true);
- rSkip -= (pString->Len() + 2) * 2;
- }
- else
- {
- /*
- #i8114#
- This is supposed to be impossible, its just supposed
- to be 16 bit count followed by the string and ending
- in a 0 short. But "Lotus SmartSuite Product: Word Pro"
- is creating invalid style names in ww7- format. So we
- use the belt and braces of the ms strings to see if
- they are not corrupt. If they are then we try them as
- 8bit ones
- */
- *pString = WW8ReadPString(rSt,RTL_TEXTENCODING_MS_1252);
- // leading len and trailing zero --> 2
- rSkip -= 2+ pString->Len();
- }
- break;
- default:
- ASSERT(!this, "Es wurde vergessen, nVersion zu kodieren!");
- break;
- }
- }
- else
- *pString = aEmptyStr; // Kann keinen Namen liefern
- }
- return pStd;
-}
-
-
-//-----------------------------------------
-
-
-struct WW8_FFN_Ver6 : public WW8_FFN_BASE
-{
- // ab Ver6
- sal_Char szFfn[65]; // 0x6 bzw. 0x40 ab Ver8 zero terminated string that
- // records name of font.
- // Maximal size of szFfn is 65 characters.
- // Vorsicht: Dieses Array kann auch kleiner sein!!!
- // Possibly followed by a second sz which records the
- // name of an alternate font to use if the first named
- // font does not exist on this system.
-};
-struct WW8_FFN_Ver8 : public WW8_FFN_BASE
-{
- // ab Ver8 sind folgende beiden Felder eingeschoben,
- // werden von uns ignoriert.
- sal_Char panose[ 10 ]; // 0x6 PANOSE
- sal_Char fs[ 24 ]; // 0x10 FONTSIGNATURE
-
- // ab Ver8 als Unicode
- sal_uInt16 szFfn[65]; // 0x6 bzw. 0x40 ab Ver8 zero terminated string that
- // records name of font.
- // Maximal size of szFfn is 65 characters.
- // Vorsicht: Dieses Array kann auch kleiner sein!!!
- // Possibly followed by a second sz which records the
- // name of an alternate font to use if the first named
- // font does not exist on this system.
-};
-
-WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
-{
- // Attention: MacWord-Documents have their Fontnames
- // always in ANSI, even if eStructCharSet == CHARSET_MAC !!
- if( rFib.lcbSttbfffn <= 2 )
- {
- ASSERT( !this, "Fonttabelle kaputt! (rFib.lcbSttbfffn < 2)" );
- pFontA = 0;
- nMax = 0;
- return;
- }
-
- bool bVer67 = (8 > rFib.nVersion);
-
- rSt.Seek( rFib.fcSttbfffn );
-
- // allocate Font Array
- sal_uInt8* pA = new sal_uInt8[ rFib.lcbSttbfffn - 2 ];
- WW8_FFN* p = (WW8_FFN*)pA;
-
- if( !bVer67 )
- {
- // bVer8: read the count of strings in nMax
- rSt >> nMax;
- }
-
- // Ver8: skip undefined uint16
- // Ver67: skip the herein stored total byte of structure
- // - we already got that information in rFib.lcbSttbfffn
- rSt.SeekRel( 2 );
-
- // read all font information
- rSt.Read( pA, rFib.lcbSttbfffn - 2 );
-
- if( bVer67 )
- {
- // try to figure out how many fonts are defined here
- nMax = 0;
- long nLeft = rFib.lcbSttbfffn - 2;
- for(;;)
- {
- short nNextSiz;
-
- nNextSiz = p->cbFfnM1 + 1;
- if( nNextSiz > nLeft )
- break;
- nMax++;
- nLeft -= nNextSiz;
- if( nLeft < 1 ) // can we read the given ammount of bytes ?
- break;
- // increase p by nNextSiz Bytes
- p = (WW8_FFN *)( ( (sal_uInt8*)p ) + nNextSiz );
- }
- }
-
- if( nMax )
- {
- // allocate Index Array
- pFontA = new WW8_FFN[ nMax ];
- p = pFontA;
-
- if( bVer67 )
- {
- WW8_FFN_Ver6* pVer6 = (WW8_FFN_Ver6*)pA;
- sal_uInt8 c2;
- for(sal_uInt16 i=0; i<nMax; ++i, ++p)
- {
- p->cbFfnM1 = pVer6->cbFfnM1;
- c2 = *(((sal_uInt8*)pVer6) + 1);
-
- p->prg = c2 & 0x02;
- p->fTrueType = (c2 & 0x04) >> 2;
- // ein Reserve-Bit ueberspringen
- p->ff = (c2 & 0x70) >> 4;
-
- p->wWeight = SVBT16ToShort( *(SVBT16*)&pVer6->wWeight );
- p->chs = pVer6->chs;
- p->ibszAlt = pVer6->ibszAlt;
- /*
- #i8726# 7- seems to encode the name in the same encoding as
- the font, e.g load the doc in 97 and save to see the unicode
- ver of the asian fontnames in that example to confirm.
- */
- rtl_TextEncoding eEnc = WW8Fib::GetFIBCharset(p->chs);
- if ((eEnc == RTL_TEXTENCODING_SYMBOL) || (eEnc == RTL_TEXTENCODING_DONTKNOW))
- eEnc = RTL_TEXTENCODING_MS_1252;
- p->sFontname = String(pVer6->szFfn, eEnc);
-// p->sFontname = String(pVer6->szFfn, RTL_TEXTENCODING_MS_1252);
- if (p->ibszAlt)
- {
- p->sFontname.Append(';');
- p->sFontname += String(pVer6->szFfn+p->ibszAlt, eEnc);
-// RTL_TEXTENCODING_MS_1252 );
- }
- pVer6 = (WW8_FFN_Ver6*)( ((sal_uInt8*)pVer6) + pVer6->cbFfnM1 + 1 );
- }
- }
- else
- {
- WW8_FFN_Ver8* pVer8 = (WW8_FFN_Ver8*)pA;
- sal_uInt8 c2;
- for(sal_uInt16 i=0; i<nMax; ++i, ++p)
- {
- p->cbFfnM1 = pVer8->cbFfnM1;
- c2 = *(((sal_uInt8*)pVer8) + 1);
-
- p->prg = c2 & 0x02;
- p->fTrueType = (c2 & 0x04) >> 2;
- // ein Reserve-Bit ueberspringen
- p->ff = (c2 & 0x70) >> 4;
-
- p->wWeight = SVBT16ToShort( *(SVBT16*)&pVer8->wWeight );
- p->chs = pVer8->chs;
- p->ibszAlt = pVer8->ibszAlt;
-
-#ifdef __WW8_NEEDS_COPY
- {
- sal_uInt8 nLen = 0x28;
- for( sal_uInt16* pTmp = pVer8->szFfn;
- nLen < pVer8->cbFfnM1 + 1 ; ++pTmp, nLen+=2 )
- {
- *pTmp = SVBT16ToShort( *(SVBT16*)pTmp );
- }
- }
-#endif // defined __WW8_NEEDS_COPY
-
- p->sFontname = pVer8->szFfn;
- if (p->ibszAlt)
- {
- p->sFontname.Append(';');
- p->sFontname.Append(pVer8->szFfn+p->ibszAlt);
- }
-
- // Zeiger auf Ursprungsarray einen Font nach hinten setzen
- pVer8 = (WW8_FFN_Ver8*)( ((sal_uInt8*)pVer8) + pVer8->cbFfnM1 + 1 );
- }
- }
- }
- delete[] pA;
-}
-
-const WW8_FFN* WW8Fonts::GetFont( sal_uInt16 nNum ) const
-{
- if( !pFontA || nNum >= nMax )
- return 0;
-
- return &pFontA[ nNum ];
-}
-
-
-
-//-----------------------------------------
-
-
-// Suche zu einem Header / Footer den Index in der WW-Liste von Headern / Footern
-//
-// Pferdefuesse bei WinWord6 und -7:
-// 1) Am Anfang des Einlesens muss WWPLCF_HdFt mit Fib und Dop konstruiert werden
-// 2) Der Haupttext muss sequentiell ueber alle Sections gelesen werden
-// 3) Fuer jedes vorkommende Header / Footer - Attribut des Haupttextes
-// ( Darf pro Section maximal eins sein ) muss UpdateIndex() genau einmal
-// mit dem Parameter des Attributes gerufen werden. Dieser Aufruf muss *nach*
-// dem letzten Aufruf von GetTextPos() passieren.
-// 4) GetTextPos() darf mit genau einem der obenstehen WW_... aufgerufen werden
-// ( nicht verodern ! )
-// -> dann liefert GetTextPos() vielleicht auch ein richtiges Ergebnis
-
-WW8PLCF_HdFt::WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop )
- : aPLCF( pSt, rFib.fcPlcfhdd , rFib.lcbPlcfhdd , 0 )
-{
- nIdxOffset = 0;
-
- /*
- cmc 23/02/2000: This dop.grpfIhdt has a bit set for each special
- footnote *and endnote!!* seperator,continuation seperator, and
- continuation notice entry, the documentation does not mention the
- endnote seperators, the documentation also gets the index numbers
- backwards when specifiying which bits to test. The bottom six bits
- of this value must be tested and skipped over. Each section's
- grpfIhdt is then tested for the existence of the appropiate headers
- and footers, at the end of each section the nIdxOffset must be updated
- to point to the beginning of the next section's group of headers and
- footers in this PLCF, UpdateIndex does that task.
- */
- for( sal_uInt8 nI = 0x1; nI <= 0x20; nI <<= 1 )
- if( nI & rDop.grpfIhdt ) // Bit gesetzt ?
- nIdxOffset++;
-
- nTextOfs = rFib.ccpText + rFib.ccpFtn; // Groesse des Haupttextes
- // und der Fussnoten
-}
-
-bool WW8PLCF_HdFt::GetTextPos(sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP& rStart,
- long& rLen)
-{
- sal_uInt8 nI = 0x01;
- short nIdx = nIdxOffset;
- while (true)
- {
- if( nI & nWhich )
- break; // found
- if( grpfIhdt & nI )
- nIdx++; // uninteresting Header / Footer
- nI <<= 1; // text next bit
- if( nI > 0x20 )
- return false; // not found
- }
- // nIdx ist HdFt-Index
- WW8_CP nEnd;
- void* pData;
-
- aPLCF.SetIdx( nIdx ); // Lookup suitable CP
- aPLCF.Get( rStart, nEnd, pData );
- rLen = nEnd - rStart;
- aPLCF++;
-
- return true;
-}
-
-bool WW8PLCF_HdFt::GetTextPosExact(short nIdx, WW8_CP& rStart, long& rLen)
-{
- WW8_CP nEnd;
- void* pData;
-
- aPLCF.SetIdx( nIdx ); // Lookup suitable CP
- aPLCF.Get( rStart, nEnd, pData );
- rLen = nEnd - rStart;
- return true;
-}
-
-void WW8PLCF_HdFt::UpdateIndex( sal_uInt8 grpfIhdt )
-{
- // Caution: Description is not correct
- for( sal_uInt8 nI = 0x01; nI <= 0x20; nI <<= 1 )
- if( nI & grpfIhdt )
- nIdxOffset++;
-}
-
-//-----------------------------------------
-// WW8Dop
-//-----------------------------------------
-
-WW8Dop::WW8Dop( SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_Int32 nSize )
-{
- sal_uInt8* pDataPtr = new sal_uInt8[ 500 ];
- sal_uInt8* pData = pDataPtr;
-
- sal_uInt32 nRead = 500 < nSize ? 500 : nSize;
- rSt.Seek( nPos );
- if( 2 > nSize || nRead != rSt.Read( pData, nRead ))
- {
- memset( &nDataStart, 0, (&nDataEnd - &nDataStart) );
- nDopError = ERR_SWG_READ_ERROR; // Error melden
- }
- else
- {
- if( 500 > nRead )
- memset( pData + nRead, 0, 500 - nRead );
-
- // dann mal die Daten auswerten
- sal_uInt32 a32Bit;
- sal_uInt16 a16Bit;
- sal_uInt8 a8Bit;
-
- a16Bit = Get_UShort( pData );
- fFacingPages = 0 != ( a16Bit & 0x0001 ) ;
- fWidowControl = 0 != ( a16Bit & 0x0002 ) ;
- fPMHMainDoc = 0 != ( a16Bit & 0x0004 ) ;
- grfSuppression = ( a16Bit & 0x0018 ) >> 3;
- fpc = ( a16Bit & 0x0060 ) >> 5;
- grpfIhdt = ( a16Bit & 0xff00 ) >> 8;
-
- a16Bit = Get_UShort( pData );
- rncFtn = a16Bit & 0x0003 ;
- nFtn = ( a16Bit & ~0x0003 ) >> 2 ;
-
- a8Bit = Get_Byte( pData );
- fOutlineDirtySave = 0 != ( a8Bit & 0x01 );
-
- a8Bit = Get_Byte( pData );
- fOnlyMacPics = 0 != ( a8Bit & 0x01 );
- fOnlyWinPics = 0 != ( a8Bit & 0x02 );
- fLabelDoc = 0 != ( a8Bit & 0x04 );
- fHyphCapitals = 0 != ( a8Bit & 0x08 );
- fAutoHyphen = 0 != ( a8Bit & 0x10 );
- fFormNoFields = 0 != ( a8Bit & 0x20 );
- fLinkStyles = 0 != ( a8Bit & 0x40 );
- fRevMarking = 0 != ( a8Bit & 0x80 );
-
- a8Bit = Get_Byte( pData );
- fBackup = 0 != ( a8Bit & 0x01 );
- fExactCWords = 0 != ( a8Bit & 0x02 );
- fPagHidden = 0 != ( a8Bit & 0x04 );
- fPagResults = 0 != ( a8Bit & 0x08 );
- fLockAtn = 0 != ( a8Bit & 0x10 );
- fMirrorMargins = 0 != ( a8Bit & 0x20 );
- fReadOnlyRecommended = 0 != ( a8Bit & 0x40 );
- fDfltTrueType = 0 != ( a8Bit & 0x80 );
-
- a8Bit = Get_Byte( pData );
- fPagSuppressTopSpacing = 0 != ( a8Bit & 0x01 );
- fProtEnabled = 0 != ( a8Bit & 0x02 );
- fDispFormFldSel = 0 != ( a8Bit & 0x04 );
- fRMView = 0 != ( a8Bit & 0x08 );
- fRMPrint = 0 != ( a8Bit & 0x10 );
- fWriteReservation = 0 != ( a8Bit & 0x20 );
- fLockRev = 0 != ( a8Bit & 0x40 );
- fEmbedFonts = 0 != ( a8Bit & 0x80 );
-
-
- a8Bit = Get_Byte( pData );
- copts_fNoTabForInd = 0 != ( a8Bit & 0x01 );
- copts_fNoSpaceRaiseLower = 0 != ( a8Bit & 0x02 );
- copts_fSupressSpbfAfterPgBrk = 0 != ( a8Bit & 0x04 );
- copts_fWrapTrailSpaces = 0 != ( a8Bit & 0x08 );
- copts_fMapPrintTextColor = 0 != ( a8Bit & 0x10 );
- copts_fNoColumnBalance = 0 != ( a8Bit & 0x20 );
- copts_fConvMailMergeEsc = 0 != ( a8Bit & 0x40 );
- copts_fSupressTopSpacing = 0 != ( a8Bit & 0x80 );
-
- a8Bit = Get_Byte( pData );
- copts_fOrigWordTableRules = 0 != ( a8Bit & 0x01 );
- copts_fTransparentMetafiles = 0 != ( a8Bit & 0x02 );
- copts_fShowBreaksInFrames = 0 != ( a8Bit & 0x04 );
- copts_fSwapBordersFacingPgs = 0 != ( a8Bit & 0x08 );
-
- dxaTab = Get_Short( pData );
- wSpare = Get_UShort( pData );
- dxaHotZ = Get_UShort( pData );
- cConsecHypLim = Get_UShort( pData );
- wSpare2 = Get_UShort( pData );
- dttmCreated = Get_Long( pData );
- dttmRevised = Get_Long( pData );
- dttmLastPrint = Get_Long( pData );
- nRevision = Get_Short( pData );
- tmEdited = Get_Long( pData );
- cWords = Get_Long( pData );
- cCh = Get_Long( pData );
- cPg = Get_Short( pData );
- cParas = Get_Long( pData );
-
- a16Bit = Get_UShort( pData );
- rncEdn = a16Bit & 0x0003 ;
- nEdn = ( a16Bit & ~0x0003 ) >> 2;
-
- a16Bit = Get_UShort( pData );
- epc = a16Bit & 0x0003 ;
- nfcFtnRef = ( a16Bit & 0x003c ) >> 2;
- nfcEdnRef = ( a16Bit & 0x03c0 ) >> 6;
- fPrintFormData = 0 != ( a16Bit & 0x0400 );
- fSaveFormData = 0 != ( a16Bit & 0x0800 );
- fShadeFormData = 0 != ( a16Bit & 0x1000 );
- fWCFtnEdn = 0 != ( a16Bit & 0x8000 );
-
- cLines = Get_Long( pData );
- cWordsFtnEnd = Get_Long( pData );
- cChFtnEdn = Get_Long( pData );
- cPgFtnEdn = Get_Short( pData );
- cParasFtnEdn = Get_Long( pData );
- cLinesFtnEdn = Get_Long( pData );
- lKeyProtDoc = Get_Long( pData );
-
- a16Bit = Get_UShort( pData );
- wvkSaved = a16Bit & 0x0007 ;
- wScaleSaved = ( a16Bit & 0x0ff8 ) >> 3 ;
- zkSaved = ( a16Bit & 0x3000 ) >> 12;
- fRotateFontW6 = ( a16Bit & 0x4000 ) >> 14;
- iGutterPos = ( a16Bit & 0x8000 ) >> 15;
- /*
- bei nFib >= 103 gehts weiter:
- */
- if( nFib >= 103 )
- {
- a32Bit = Get_ULong( pData );
- fNoTabForInd = ( a32Bit & 0x00000001 ) ;
- fNoSpaceRaiseLower = ( a32Bit & 0x00000002 ) >> 1 ;
- fSupressSpbfAfterPageBreak = ( a32Bit & 0x00000004 ) >> 2 ;
- fWrapTrailSpaces = ( a32Bit & 0x00000008 ) >> 3 ;
- fMapPrintTextColor = ( a32Bit & 0x00000010 ) >> 4 ;
- fNoColumnBalance = ( a32Bit & 0x00000020 ) >> 5 ;
- fConvMailMergeEsc = ( a32Bit & 0x00000040 ) >> 6 ;
- fSupressTopSpacing = ( a32Bit & 0x00000080 ) >> 7 ;
- fOrigWordTableRules = ( a32Bit & 0x00000100 ) >> 8 ;
- fTransparentMetafiles = ( a32Bit & 0x00000200 ) >> 9 ;
- fShowBreaksInFrames = ( a32Bit & 0x00000400 ) >> 10 ;
- fSwapBordersFacingPgs = ( a32Bit & 0x00000800 ) >> 11 ;
- fSuppressTopSpacingMac5 = ( a32Bit & 0x00010000 ) >> 16 ;
- fTruncDxaExpand = ( a32Bit & 0x00020000 ) >> 17 ;
- fPrintBodyBeforeHdr = ( a32Bit & 0x00040000 ) >> 18 ;
- fNoLeading = ( a32Bit & 0x00080000 ) >> 19 ;
- fMWSmallCaps = ( a32Bit & 0x00200000 ) >> 21 ;
-
- fUsePrinterMetrics = ( a32Bit & 0x80000000 ) >> 31 ;
- }
-
- /*
- bei nFib > 105 gehts weiter:
- */
- if( nFib > 105 )
- {
- adt = Get_Short( pData );
-
- doptypography.ReadFromMem(pData);
-
- memcpy( &dogrid, pData, sizeof( WW8_DOGRID ));
- pData += sizeof( WW8_DOGRID );
-
- a16Bit = Get_UShort( pData );
- // die untersten 9 Bit sind uninteressant
- fHtmlDoc = ( a16Bit & 0x0200 ) >> 9 ;
- fSnapBorder = ( a16Bit & 0x0800 ) >> 11 ;
- fIncludeHeader = ( a16Bit & 0x1000 ) >> 12 ;
- fIncludeFooter = ( a16Bit & 0x2000 ) >> 13 ;
- fForcePageSizePag = ( a16Bit & 0x4000 ) >> 14 ;
- fMinFontSizePag = ( a16Bit & 0x8000 ) >> 15 ;
-
- a16Bit = Get_UShort( pData );
- fHaveVersions = 0 != ( a16Bit & 0x0001 );
- fAutoVersion = 0 != ( a16Bit & 0x0002 );
-
- pData += 12;
-
- cChWS = Get_Long( pData );
- cChWSFtnEdn = Get_Long( pData );
- grfDocEvents = Get_Long( pData );
-
- pData += 4+30+8;
-
- cDBC = Get_Long( pData );
- cDBCFtnEdn = Get_Long( pData );
-
- pData += 1 * sizeof( long );
-
- nfcFtnRef = Get_Short( pData );
- nfcEdnRef = Get_Short( pData );
- hpsZoonFontPag = Get_Short( pData );
- dywDispPag = Get_Short( pData );
- }
- }
- delete[] pDataPtr;
-}
-
-WW8Dop::WW8Dop()
-{
- // first set everything to a default of 0
- memset( &nDataStart, 0, (&nDataEnd - &nDataStart) );
-
- fWidowControl = 1;
- fpc = 1;
- nFtn = 1;
- fOutlineDirtySave = 1;
- fHyphCapitals = 1;
- fBackup = 1;
- fPagHidden = 1;
- fPagResults = 1;
- fDfltTrueType = 1;
-
- /*
- Writer acts like this all the time at the moment, ideally we need an
- option for these two as well to import word docs that are not like
- this by default
- */
- fNoLeading = 1;
- fUsePrinterMetrics = 1;
-
- fRMView = 1;
- fRMPrint = 1;
- dxaTab = 0x2d0;
- dxaHotZ = 0x168;
- dttmCreated = 0x45FBAC69;
- dttmRevised = 0x45FBAC69;
- nRevision = 1;
- nEdn = 1;
-
- epc = 3;
- nfcEdnRef = 2;
- fShadeFormData = 1;
-
- wvkSaved = 2;
- wScaleSaved = 100;
- zkSaved = 0;
-
- lvl = 9;
- fIncludeHeader = 1;
- fIncludeFooter = 1;
-
- cChWS = /**!!**/ 0;
- cChWSFtnEdn = /**!!**/ 0;
-
- cDBC = /**!!**/ 0;
- cDBCFtnEdn = /**!!**/ 0;
-}
-
-sal_uInt32 WW8Dop::GetCompatabilityOptions() const
-{
- sal_uInt32 a32Bit = 0;
- if (fNoTabForInd) a32Bit |= 0x00000001;
- if (fNoSpaceRaiseLower) a32Bit |= 0x00000002;
- if (fSupressSpbfAfterPageBreak) a32Bit |= 0x00000004;
- if (fWrapTrailSpaces) a32Bit |= 0x00000008;
- if (fMapPrintTextColor) a32Bit |= 0x00000010;
- if (fNoColumnBalance) a32Bit |= 0x00000020;
- if (fConvMailMergeEsc) a32Bit |= 0x00000040;
- if (fSupressTopSpacing) a32Bit |= 0x00000080;
- if (fOrigWordTableRules) a32Bit |= 0x00000100;
- if (fTransparentMetafiles) a32Bit |= 0x00000200;
- if (fShowBreaksInFrames) a32Bit |= 0x00000400;
- if (fSwapBordersFacingPgs) a32Bit |= 0x00000800;
- if (fSuppressTopSpacingMac5) a32Bit |= 0x00010000;
- if (fTruncDxaExpand) a32Bit |= 0x00020000;
- if (fPrintBodyBeforeHdr) a32Bit |= 0x00040000;
- if (fNoLeading) a32Bit |= 0x00080000;
- if (fMWSmallCaps) a32Bit |= 0x00200000;
- if (fUsePrinterMetrics) a32Bit |= 0x80000000;
- return a32Bit;
-}
-
-bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
-{
- sal_Int32 nLen = 8 == rFib.nVersion ? 0x220 : 84;
- rFib.fcDop = rStrm.Tell();
- rFib.lcbDop = nLen;
-
- sal_uInt8 aData[ 0x220 ];
- memset( aData, 0, 0x220 );
- sal_uInt8* pData = aData;
-
- // dann mal die Daten auswerten
- sal_uInt16 a16Bit;
- sal_uInt8 a8Bit;
-
- a16Bit = 0;
- if (fFacingPages)
- a16Bit |= 0x0001;
- if (fWidowControl)
- a16Bit |= 0x0002;
- if (fPMHMainDoc)
- a16Bit |= 0x0004;
- a16Bit |= ( 0x0018 & (grfSuppression << 3));
- a16Bit |= ( 0x0060 & (fpc << 5));
- a16Bit |= ( 0xff00 & (grpfIhdt << 8));
- Set_UInt16( pData, a16Bit );
-
- a16Bit = 0;
- a16Bit |= ( 0x0003 & rncFtn );
- a16Bit |= ( ~0x0003 & (nFtn << 2));
- Set_UInt16( pData, a16Bit );
-
- a8Bit = 0;
- if( fOutlineDirtySave ) a8Bit |= 0x01;
- Set_UInt8( pData, a8Bit );
-
- a8Bit = 0;
- if( fOnlyMacPics ) a8Bit |= 0x01;
- if( fOnlyWinPics ) a8Bit |= 0x02;
- if( fLabelDoc ) a8Bit |= 0x04;
- if( fHyphCapitals ) a8Bit |= 0x08;
- if( fAutoHyphen ) a8Bit |= 0x10;
- if( fFormNoFields ) a8Bit |= 0x20;
- if( fLinkStyles ) a8Bit |= 0x40;
- if( fRevMarking ) a8Bit |= 0x80;
- Set_UInt8( pData, a8Bit );
-
- a8Bit = 0;
- if( fBackup ) a8Bit |= 0x01;
- if( fExactCWords ) a8Bit |= 0x02;
- if( fPagHidden ) a8Bit |= 0x04;
- if( fPagResults ) a8Bit |= 0x08;
- if( fLockAtn ) a8Bit |= 0x10;
- if( fMirrorMargins ) a8Bit |= 0x20;
- if( fReadOnlyRecommended ) a8Bit |= 0x40;
- if( fDfltTrueType ) a8Bit |= 0x80;
- Set_UInt8( pData, a8Bit );
-
- a8Bit = 0;
- if( fPagSuppressTopSpacing ) a8Bit |= 0x01;
- if( fProtEnabled ) a8Bit |= 0x02;
- if( fDispFormFldSel ) a8Bit |= 0x04;
- if( fRMView ) a8Bit |= 0x08;
- if( fRMPrint ) a8Bit |= 0x10;
- if( fWriteReservation ) a8Bit |= 0x20;
- if( fLockRev ) a8Bit |= 0x40;
- if( fEmbedFonts ) a8Bit |= 0x80;
- Set_UInt8( pData, a8Bit );
-
-
- a8Bit = 0;
- if( copts_fNoTabForInd ) a8Bit |= 0x01;
- if( copts_fNoSpaceRaiseLower ) a8Bit |= 0x02;
- if( copts_fSupressSpbfAfterPgBrk ) a8Bit |= 0x04;
- if( copts_fWrapTrailSpaces ) a8Bit |= 0x08;
- if( copts_fMapPrintTextColor ) a8Bit |= 0x10;
- if( copts_fNoColumnBalance ) a8Bit |= 0x20;
- if( copts_fConvMailMergeEsc ) a8Bit |= 0x40;
- if( copts_fSupressTopSpacing ) a8Bit |= 0x80;
- Set_UInt8( pData, a8Bit );
-
- a8Bit = 0;
- if( copts_fOrigWordTableRules ) a8Bit |= 0x01;
- if( copts_fTransparentMetafiles ) a8Bit |= 0x02;
- if( copts_fShowBreaksInFrames ) a8Bit |= 0x04;
- if( copts_fSwapBordersFacingPgs ) a8Bit |= 0x08;
- Set_UInt8( pData, a8Bit );
-
- Set_UInt16( pData, dxaTab );
- Set_UInt16( pData, wSpare );
- Set_UInt16( pData, dxaHotZ );
- Set_UInt16( pData, cConsecHypLim );
- Set_UInt16( pData, wSpare2 );
- Set_UInt32( pData, dttmCreated );
- Set_UInt32( pData, dttmRevised );
- Set_UInt32( pData, dttmLastPrint );
- Set_UInt16( pData, nRevision );
- Set_UInt32( pData, tmEdited );
- Set_UInt32( pData, cWords );
- Set_UInt32( pData, cCh );
- Set_UInt16( pData, cPg );
- Set_UInt32( pData, cParas );
-
- a16Bit = 0;
- a16Bit |= ( 0x0003 & rncEdn );
- a16Bit |= (~0x0003 & ( nEdn << 2));
- Set_UInt16( pData, a16Bit );
-
- a16Bit = 0;
- a16Bit |= (0x0003 & epc );
- a16Bit |= (0x003c & (nfcFtnRef << 2));
- a16Bit |= (0x03c0 & (nfcEdnRef << 6));
- if( fPrintFormData ) a16Bit |= 0x0400;
- if( fSaveFormData ) a16Bit |= 0x0800;
- if( fShadeFormData ) a16Bit |= 0x1000;
- if( fWCFtnEdn ) a16Bit |= 0x8000;
- Set_UInt16( pData, a16Bit );
-
- Set_UInt32( pData, cLines );
- Set_UInt32( pData, cWordsFtnEnd );
- Set_UInt32( pData, cChFtnEdn );
- Set_UInt16( pData, cPgFtnEdn );
- Set_UInt32( pData, cParasFtnEdn );
- Set_UInt32( pData, cLinesFtnEdn );
- Set_UInt32( pData, lKeyProtDoc );
-
- a16Bit = 0;
- if (wvkSaved)
- a16Bit |= 0x0007;
- a16Bit |= (0x0ff8 & (wScaleSaved << 3));
- a16Bit |= (0x3000 & (zkSaved << 12));
- Set_UInt16( pData, a16Bit );
-
- if( 8 == rFib.nVersion )
- {
- Set_UInt32(pData, GetCompatabilityOptions());
-
- Set_UInt16( pData, adt );
-
- doptypography.WriteToMem(pData);
-
- memcpy( pData, &dogrid, sizeof( WW8_DOGRID ));
- pData += sizeof( WW8_DOGRID );
-
- a16Bit = 0x12; // lvl auf 9 setzen
- if( fHtmlDoc ) a16Bit |= 0x0200;
- if( fSnapBorder ) a16Bit |= 0x0800;
- if( fIncludeHeader ) a16Bit |= 0x1000;
- if( fIncludeFooter ) a16Bit |= 0x2000;
- if( fForcePageSizePag ) a16Bit |= 0x4000;
- if( fMinFontSizePag ) a16Bit |= 0x8000;
- Set_UInt16( pData, a16Bit );
-
- a16Bit = 0;
- if( fHaveVersions ) a16Bit |= 0x0001;
- if( fAutoVersion ) a16Bit |= 0x0002;
- Set_UInt16( pData, a16Bit );
-
- pData += 12;
-
- Set_UInt32( pData, cChWS );
- Set_UInt32( pData, cChWSFtnEdn );
- Set_UInt32( pData, grfDocEvents );
-
- pData += 4+30+8;
-
- Set_UInt32( pData, cDBC );
- Set_UInt32( pData, cDBCFtnEdn );
-
- pData += 1 * sizeof( long );
-
- Set_UInt16( pData, nfcFtnRef );
- Set_UInt16( pData, nfcEdnRef );
- Set_UInt16( pData, hpsZoonFontPag );
- Set_UInt16( pData, dywDispPag );
-
- //500 -> 508, Appear to be repeated here in 2000+
- pData += 8;
- Set_UInt32(pData, GetCompatabilityOptions());
- }
- rStrm.Write( aData, nLen );
- return 0 == rStrm.GetError();
-}
-
-void WW8DopTypography::ReadFromMem(sal_uInt8 *&pData)
-{
- sal_uInt16 a16Bit = Get_UShort(pData);
- fKerningPunct = (a16Bit & 0x0001);
- iJustification = (a16Bit & 0x0006) >> 1;
- iLevelOfKinsoku = (a16Bit & 0x0018) >> 3;
- f2on1 = (a16Bit & 0x0020) >> 5;
- reserved1 = (a16Bit & 0x03C0) >> 6;
- reserved2 = (a16Bit & 0xFC00) >> 10;
-
- cchFollowingPunct = Get_Short(pData);
- cchLeadingPunct = Get_Short(pData);
-
- sal_Int16 i;
- for (i=0; i < nMaxFollowing; ++i)
- rgxchFPunct[i] = Get_Short(pData);
- for (i=0; i < nMaxLeading; ++i)
- rgxchLPunct[i] = Get_Short(pData);
-
- rgxchFPunct[cchFollowingPunct]=0;
- rgxchLPunct[cchLeadingPunct]=0;
-}
-
-void WW8DopTypography::WriteToMem(sal_uInt8 *&pData) const
-{
- sal_uInt16 a16Bit = fKerningPunct;
- a16Bit |= (iJustification << 1) & 0x0006;
- a16Bit |= (iLevelOfKinsoku << 3) & 0x0018;
- a16Bit |= (f2on1 << 5) & 0x002;
- a16Bit |= (reserved1 << 6) & 0x03C0;
- a16Bit |= (reserved2 << 10) & 0xFC00;
- Set_UInt16(pData,a16Bit);
-
- Set_UInt16(pData,cchFollowingPunct);
- Set_UInt16(pData,cchLeadingPunct);
-
- sal_Int16 i;
- for (i=0; i < nMaxFollowing; ++i)
- Set_UInt16(pData,rgxchFPunct[i]);
- for (i=0; i < nMaxLeading; ++i)
- Set_UInt16(pData,rgxchLPunct[i]);
-}
-
-sal_uInt16 WW8DopTypography::GetConvertedLang() const
-{
- sal_uInt16 nLang;
- //I have assumed peoples republic/taiwan == simplified/traditional
-
- //This isn't a documented issue, so we might have it all wrong,
- //i.e. i.e. whats with the powers of two ?
-
- /*
- #84082#
- One example of 3 for reserved1 which was really Japanese, perhaps last bit
- is for some other use ?, or redundant. If more examples trigger the assert
- we might be able to figure it out.
- */
- switch(reserved1 & 0xE)
- {
- case 2: //Japan
- nLang = LANGUAGE_JAPANESE;
- break;
- case 4: //Chinese (Peoples Republic)
- nLang = LANGUAGE_CHINESE_SIMPLIFIED;
- break;
- case 6: //Korean
- nLang = LANGUAGE_KOREAN;
- break;
- case 8: //Chinese (Taiwan)
- nLang = LANGUAGE_CHINESE_TRADITIONAL;
- break;
- default:
- ASSERT(!this, "Unknown MS Asian Typography language, report");
- nLang = LANGUAGE_CHINESE;
- break;
- case 0:
- //And here we have the possibility that it says 2, but its really
- //a bug and only japanese level 2 has been selected after a custom
- //version was chosen on last save!
- nLang = LANGUAGE_JAPANESE;
- break;
- }
- return nLang;
-}
-
-//-----------------------------------------
-// Sprms
-//-----------------------------------------
-sal_uInt16 wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
- const
-{
- SprmInfo aSprm = GetSprmInfo(nId);
- sal_uInt16 nL = 0; // number of Bytes to read
-
- //sprmPChgTabs
- switch( nId )
- {
- case 23:
- case 0xC615:
- if( pSprm[1 + mnDelta] != 255 )
- nL = pSprm[1 + mnDelta] + aSprm.nLen;
- else
- {
- sal_uInt8 nDel = pSprm[2 + mnDelta];
- sal_uInt8 nIns = pSprm[3 + mnDelta + 4 * nDel];
-
- nL = 2 + 4 * nDel + 3 * nIns;
- }
- break;
- case 0xD608:
- nL = SVBT16ToShort( &pSprm[1 + mnDelta] );
- break;
- default:
- switch (aSprm.nVari)
- {
- case L_FIX:
- nL = aSprm.nLen; // Excl. Token
- break;
- case L_VAR:
- // Variable 1-Byte Length?
- // Excl. Token + Var-Lengthbyte
- nL = pSprm[1 + mnDelta] + aSprm.nLen;
- break;
- case L_VAR2:
- // Variable 2-Byte Length?
- // Excl. Token + Var-Lengthbyte
- nL = SVBT16ToShort( &pSprm[1 + mnDelta] ) + aSprm.nLen - 1;
- break;
- default:
- ASSERT(!this, "Unknown sprm varient");
- break;
- }
- break;
- }
- return nL;
-}
-
-int wwSprmParser::CountSprms(const sal_uInt8* pSp, long nSprmSiz,
- const wwSprmSequence* pIgnoreSprms) const
-{
- sal_uInt16 nMySprms = 0;
- sal_uInt16 i=0;
- while (i+1+mnDelta < nSprmSiz)
- {
- sal_uInt16 nSpId = GetSprmId(pSp);
-
- if( !nSpId )
- break;
-
- sal_uInt16 nSpLen = GetSprmSize(nSpId, pSp);
- // increase pointers so to point to next sprm
- i += nSpLen;
- pSp += nSpLen;
-
- if (!pIgnoreSprms || !pIgnoreSprms->search(nSpId))
- ++nMySprms;
- }
- return nMySprms;
-}
-
-// one or two bytes at the beginning at the sprm id
-sal_uInt16 wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
-{
- ASSERT_RET_ON_FAIL(pSp, "Why GetSprmId with pSp of 0", 0);
-
- sal_uInt16 nId = 0;
- switch (mnVersion) // 6 stands for "6 OR 7", 7 stands for "ONLY 7"
- {
- case 6:
- case 7:
- nId = *pSp;
- if (0x0100 < nId)
- nId = 0;
- break;
- default:
- case 8:
- nId = SVBT16ToShort(pSp);
- if (0x0800 > nId)
- nId = 0;
- break;
- }
- return nId;
-}
-
-// with tokens and length byte
-sal_uInt16 wwSprmParser::GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const
-{
- return GetSprmTailLen(nId, pSprm) + 1 + mnDelta + SprmDataOfs(nId);
-}
-
-sal_uInt8 wwSprmParser::SprmDataOfs(sal_uInt16 nId) const
-{
- return GetSprmInfo(nId).nVari;
-}
-
-sal_uInt16 wwSprmParser::DistanceToData(sal_uInt16 nId) const
-{
- return 1 + mnDelta + SprmDataOfs(nId);
-}
-
-SEPr::SEPr() :
- bkc(2), fTitlePage(0), fAutoPgn(0), nfcPgn(0), fUnlocked(0), cnsPgn(0),
- fPgnRestart(0), fEndNote(1), lnc(0), grpfIhdt(0), nLnnMod(0), dxaLnn(0),
- dxaPgn(720), dyaPgn(720), fLBetween(0), vjc(0), dmBinFirst(0),
- dmBinOther(0), dmPaperReq(0), fPropRMark(0), ibstPropRMark(0),
- dttmPropRMark(0), dxtCharSpace(0), dyaLinePitch(0), clm(0), reserved1(0),
- dmOrientPage(0), iHeadingPgn(0), pgnStart(1), lnnMin(0), wTextFlow(0),
- reserved2(0), pgbApplyTo(0), pgbPageDepth(0), pgbOffsetFrom(0),
- xaPage(12242), yaPage(15842), xaPageNUp(12242), yaPageNUp(15842),
- dxaLeft(1800), dxaRight(1800), dyaTop(1440), dyaBottom(1440), dzaGutter(0),
- dyaHdrTop(720), dyaHdrBottom(720), ccolM1(0), fEvenlySpaced(1),
- reserved3(0), fBiDi(0), fFacingCol(0), fRTLGutter(0), fRTLAlignment(0),
- dxaColumns(720), dxaColumnWidth(0), dmOrientFirst(0), fLayout(0),
- reserved4(0)
-{
- memset(rgdxaColumnWidthSpacing, 0, sizeof(rgdxaColumnWidthSpacing));
-}
-
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
diff --git a/sw/source/filter/ww8/dump/ww8scan.hxx b/sw/source/filter/ww8/dump/ww8scan.hxx
deleted file mode 100644
index 02eba9b6a8e6..000000000000
--- a/sw/source/filter/ww8/dump/ww8scan.hxx
+++ /dev/null
@@ -1,1488 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _WW8SCAN_HXX
-#define _WW8SCAN_HXX
-
-
-#ifndef LONG_MAX
-#include <limits.h>
-#endif
-#ifndef _SAL_TYPES_H
-#include <sal/types.h>
-#endif
-#include <tools/solar.h> // UINTXX
-#ifndef _TABLE_HXX //autogen
-#include <tools/table.hxx>
-#endif
-#include <tools/datetime.hxx>
-#include <tools/stream.hxx>
-#include <tools/string.hxx>
-
-
-#define _SVSTDARR_STRINGS
-#include <svl/svstdarr.hxx>
-
-#ifndef WW8STRUC_HXX
-#include <ww8struc.hxx> // FIB, STSHI, STD
-#endif
-
-#include <ww8scan.hxx>
-
-using namespace nsHdFtFlags;
-
-
-#ifndef DELETEZ
-#define DELETEZ( p ) ( delete( p ), p = 0 )
-#endif
-
-
-//class SvStream;
-class UShortStk;
-class WW8Fib;
-class WW8ScannerBase;
-class WW8PLCFspecial;
-struct WW8PLCFxDesc;
-class WW8PLCFx_PCD;
-class SvUShortsSort;
-
-
-String WW8ReadPString( SvStream& rStrm, rtl_TextEncoding eEnc,
- sal_Bool bAtEndSeekRel1 = sal_True );
-
-// Folgende Methode liest einen 2-byter-UNICODE-String ein:
-// - falls bAtEndSeekRel1 gesetzt ist, wird am Ende genau EIN Byte uebersprungen,
-// - falls nChars (die Zeichen-Anzahl, NICHT die Byte-Anzahl) nicht gesetzt ist,
-// wird das erste sal_uInt16 als Lannengenangabe interpretiert,
-// ansonsten als erstes String-Zeichen genommen.
-String WW8Read_xstz(SvStream& rStrm,
- sal_uInt16 nChars,
- sal_Bool bAtEndSeekRel1);
-
-
-// read array of strings (see MS documentation: STring TaBle stored in File)
-// returns NOT the original pascal strings but an array of converted char*
-//
-// attention: the *extra data* of each string are SKIPPED and ignored
-
-/* to be optimized like this: */
-void WW8ReadSTTBF( sal_Bool bVer8, SvStream& rStrm,
- sal_uInt32 nStart, sal_Int32 nLen, sal_uInt16 nSkip,
- rtl_TextEncoding eCS,
- SvStrings &rArray, SvStrings* pExtraArray = 0 );
-
-
-
-sal_uInt16 WW8GetSprmId( sal_uInt8 nVersion, sal_uInt8* pSp, sal_uInt8* pDelta = 0 );
-short WW8GetSprmSizeNetto( sal_uInt8 nVersion, sal_uInt8* pSprm, sal_uInt16* pId );
-short WW8GetSprmSizeBrutto( sal_uInt8 nVersion, sal_uInt8* pSprm, sal_uInt16* pId );
-sal_uInt8 WW8SprmDataOfs( sal_uInt16 nId );
-
-struct WW8FieldDesc
-{
- long nLen; // Gesamtlaenge ( zum Text ueberlesen )
- WW8_CP nSCode; // Anfang Befehlscode
- long nLCode; // Laenge
- WW8_CP nSRes; // Anfang Ergebnis
- long nLRes; // Laenge ( == 0, falls kein Ergebnis )
- sal_uInt16 nId; // WW-Id fuer Felder
- sal_uInt8 nOpt; // WW-Flags ( z.B.: vom User geaendert )
- sal_Bool bCodeNest:1; // Befehl rekursiv verwendet
- sal_Bool bResNest:1; // Befehl in Resultat eingefuegt
-};
-
-sal_Bool WW8GetFieldPara( sal_uInt8 nVersion, WW8PLCFspecial& rPLCF, WW8FieldDesc& rF );
-
-
-struct WW8PLCFxSave1
-{
- sal_uLong nPLCFxPos;
- sal_uLong nPLCFxPos2; // fuer PLCF_Cp_Fkp: PieceIter-Pos
- long nPLCFxMemOfs;
- WW8_CP nAttrStart;
- WW8_CP nAttrEnd;
- sal_Bool bLineEnd;
-};
-
-
-/*
- u.a. fuer Felder, also genausoviele Attr wie Positionen,
- falls Ctor-Param bNoEnd = false
-*/
-class WW8PLCFspecial // Iterator fuer PLCFs
-{
- sal_Int32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
- sal_uInt8* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
- long nIMax; // Anzahl der Elemente
- long nIdx; // Merker, wo wir gerade sind
- long nStru;
-
-public:
- WW8PLCFspecial( SvStream* pSt, long nFilePos, long nPLCF,
- long nStruct, long nStartPos = -1, sal_Bool bNoEnd = sal_False );
- ~WW8PLCFspecial(){ delete( pPLCF_PosArray ); pPLCF_PosArray = 0; }
- sal_uLong GetIdx() const { return (sal_uLong)nIdx; }
- void SetIdx( sal_uLong nI ) { nIdx = (long)nI; } // geht ueber Nummer
- long GetIMax(){ return nIMax; }
- sal_Bool SeekPos( long nPos ); // geht ueber FC- bzw. CP-Wert
- // bzw. naechste groesseren Wert
- sal_Bool SeekPosExact( long nPos );
- long Where() { return ( nIdx >= nIMax ) ? LONG_MAX : pPLCF_PosArray[nIdx]; }
- sal_Bool Get( long& rStart, void*& rpValue );
- sal_Bool GetData( long nIdx, long& rPos, void*& rpValue );
-
- const void* GetData( long nIdx ) const {
- return ( nIdx >= nIMax ) ? 0 : (const void*)&pPLCF_Contents[nIdx * nStru]; }
- long GetPos( long nIdx ){
- return ( nIdx >= nIMax ) ? LONG_MAX : pPLCF_PosArray[nIdx]; }
-
- WW8PLCFspecial& operator ++( int ) { nIdx++; return *this; }
- WW8PLCFspecial& operator --( int ) { nIdx--; return *this; }
-};
-
-
-
-
-/*
- simple Iterator for SPRMs
-*/
-class WW8SprmIter
-{
- // these members will be updated
- sal_uInt8* pSprms; // remaining part of the SPRMs ( == start of akt. SPRM)
- sal_uInt8* pAktParams; // start of akt. SPRM's parameters
- sal_uInt16 nAktId;
- short nAktSizeBrutto;
-
- // these members will *not* be updated by UpdateMyMembers()
- sal_uInt8 nVersion;
- sal_uInt8 nDelta;
- short nRemLen; // length of remaining SPRMs (including akt. SPRM)
-
- void UpdateMyMembers();
-public:
- WW8SprmIter( sal_uInt8* pSprms_, short nLen_, sal_uInt8 nVersion_ );
- void SetSprms( sal_uInt8* pSprms_, short nLen_ );
- sal_uInt8* operator ++( int );
- sal_uInt8* GetSprms() const { return ( pSprms && (0 < nRemLen) )
- ? pSprms
- : 0; }
- sal_uInt8* GetAktParams() const { return pAktParams; }
- sal_uInt16 GetAktId() const { return nAktId; }
-};
-
-
-
-/*
- u.a. fuer FKPs auf normale Attr., also ein Attr weniger als Positionen
-*/
-class WW8PLCF // Iterator fuer PLCFs
-{
- sal_Int32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
- sal_uInt8* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
- long nIMax; // Anzahl der Elemente
- long nIdx;
- long nStru;
-
- void ReadPLCF( SvStream* pSt, long nFilePos, long nPLCF );
-
- /*
- Falls im Dok ein PLC fehlt und die FKPs solo dastehen,
- machen wir uns hiermit einen PLC:
- */
- void GeneratePLCF( SvStream* pSt, long nPN, long ncpN );
-
-public:
- WW8PLCF( SvStream* pSt, long nFilePos, long nPLCF,
- long nStruct, long nStartPos = -1 );
-
- /*
- folgender Ctor generiert ggfs. einen PLC aus nPN und ncpN
- */
- WW8PLCF( SvStream* pSt, long nFilePos, long nPLCF,
- long nStruct, long nStartPos, long nPN, long ncpN );
-
- ~WW8PLCF(){ delete( pPLCF_PosArray ); pPLCF_PosArray = 0; }
- sal_uLong GetIdx() const { return (sal_uLong)nIdx; }
- void SetIdx( sal_uLong nI ) { nIdx = (long)nI; }
- long GetIMax(){ return nIMax; }
- sal_Bool SeekPos( long nPos );
- long Where();
- sal_Bool Get( long& rStart, long& rEnd, void*& rpValue );
- WW8PLCF& operator ++( int ) { if( nIdx < nIMax ) nIdx++; return *this; }
-
- const void* GetData( long nIdx ) const {
- return ( nIdx >= nIMax ) ? 0 : (const void*)&pPLCF_Contents[nIdx * nStru]; }
-};
-
-
-DECLARE_TABLE( WW8Pcd_FC_sortArr, sal_Int32 )
-
-
-/*
- fuer Piece Table (bei Schnellspeicherung)
-*/
-class WW8PLCFpcd
-{
-friend class WW8PLCFpcd_Iter;
- WW8Pcd_FC_sortArr aFC_sort; // sorted PCD entries by FC
- sal_Int32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
- sal_uInt8* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
- long nIMax;
- long nStru;
-
-public:
- WW8PLCFpcd( SvStream* pSt, long nFilePos, long nPLCF, long nStruct );
- ~WW8PLCFpcd(){ delete( pPLCF_PosArray ); }
- sal_uLong FindIdx( WW8_FC nFC ) const;
-};
-
-/*
- mehrere WW8PLCFpcd_Iter koennen auf die gleiche WW8PLCFpcd zeigen !!!
-*/
-class WW8PLCFpcd_Iter
-{
- WW8PLCFpcd& rPLCF;
- long nIdx;
-
-public:
- WW8PLCFpcd_Iter( WW8PLCFpcd& rPLCFpcd, long nStartPos = -1 );
-// ~WW8PLCFpcd_Iter() {}
- sal_uLong GetIdx() const { return (sal_uLong)nIdx; }
- void SetIdx( sal_uLong nI ) { nIdx = (long)nI; }
- long GetIMax(){ return rPLCF.nIMax; }
- sal_Bool SeekPos( long nPos );
-// sal_Bool SeekMaxMainFC( WW8Fib& rWwF, long& rMaxPosData );
- long Where();
- sal_Bool Get( long& rStart, long& rEnd, void*& rpValue );
- sal_uLong FindIdx( WW8_FC nFC ) const { return rPLCF.FindIdx( nFC ); }
- WW8PLCFpcd_Iter& operator ++( int ) { if( nIdx < rPLCF.nIMax ) nIdx++; return *this; }
-};
-
-// PLCF-Typ:
-enum ePLCFT{ CHP=0, PAP, SEP, /*HED, FNR, ENR,*/ PLCF_END };
-
-/*
- pure virtual:
-*/
-class WW8PLCFx // virtueller Iterator fuer Piece Table Exceptions
-{
- sal_uInt8 nVersion; // Versionsnummer des FIB
- sal_Bool bIsSprm; // PLCF von Sprms oder von anderem ( Footnote, ... )
-
-public:
- WW8PLCFx( sal_uInt8 nFibVersion, sal_Bool bSprm )
- { bIsSprm = bSprm; nVersion = nFibVersion; }
- virtual ~WW8PLCFx() {}
- sal_Bool IsSprm() { return bIsSprm; }
- virtual sal_uLong GetIdx() const = 0;
- virtual void SetIdx( sal_uLong nIdx ) = 0;
- virtual sal_uLong GetIdx2() const;
- virtual void SetIdx2( sal_uLong nIdx );
- virtual sal_Bool SeekPos( WW8_CP nCpPos ) = 0;
- virtual long Where() = 0;
-// virtual sal_uInt8* GetSprms( long& rStart, long& rEnd, long& rLen );
- virtual void GetSprms( WW8PLCFxDesc* p );
- virtual long GetNoSprms( long& rStart, long&, long& rLen );
- virtual WW8PLCFx& operator ++( int ) = 0;
- virtual sal_uInt16 GetIstd() const { return 0xffff; }
- virtual void Save( WW8PLCFxSave1& rSave ) const;
- virtual void Restore( const WW8PLCFxSave1& rSave );
- sal_uInt8 GetVersion() const { return nVersion; }
-};
-
-enum eCutT { CUT_NONE = 0, CUT_START, CUT_END, CUT_BOTH };
-
-class WW8PLCFx_PCDAttrs : public WW8PLCFx
-{
- WW8PLCFpcd_Iter* pPcdI;
- WW8PLCFx_PCD* pPcd;
- sal_uInt8** pGrpprls; // Attribute an Piece-Table
- SVBT32 aShortSprm; // mini storage: can contain ONE sprm with
- // 1 byte param
- sal_uInt16 nGrpprls; // Attribut Anzahl davon
-
-public:
- WW8PLCFx_PCDAttrs( sal_uInt8 nVersion, WW8PLCFx_PCD* pPLCFx_PCD, WW8ScannerBase* pBase );
- virtual ~WW8PLCFx_PCDAttrs();
- virtual sal_uLong GetIdx() const;
- virtual void SetIdx( sal_uLong nI );
- virtual sal_Bool SeekPos( WW8_CP nCpPos );
- virtual long Where();
- virtual void GetSprms( WW8PLCFxDesc* p );
- virtual WW8PLCFx& operator ++( int );
-
- WW8PLCFpcd_Iter* GetIter() const { return pPcdI; }
-};
-
-class WW8PLCFx_PCD : public WW8PLCFx // Iterator fuer Piece Table
-{
- WW8PLCFpcd_Iter* pPcdI;
- sal_Bool bVer67;
-
-public:
- WW8PLCFx_PCD( sal_uInt8 nVersion, WW8PLCFpcd* pPLCFpcd, WW8_CP nStartCp, sal_Bool bVer67P );
- virtual ~WW8PLCFx_PCD();
- virtual sal_uLong GetIMax() const;
- virtual sal_uLong GetIdx() const;
- virtual void SetIdx( sal_uLong nI );
- virtual sal_Bool SeekPos( WW8_CP nCpPos );
- virtual long Where();
-// virtual void GetSprms( WW8PLCFxDesc* p );
- virtual long GetNoSprms( long& rStart, long&, long& rLen );
- virtual WW8PLCFx& operator ++( int );
- WW8_CP AktPieceStartFc2Cp( WW8_FC nStartPos );
- WW8_FC AktPieceStartCp2Fc( WW8_CP nCp );
- eCutT AktPieceFc2Cp( long& rStartPos, long& rEndPos );
- WW8PLCFpcd_Iter* GetPLCFIter() { return pPcdI; }
-
- static sal_Int32 TransformPieceAddress(long nfc, sal_Bool& bIsUnicodeAddress)
- {
- bIsUnicodeAddress = 0 == (0x40000000 & nfc);
- return bIsUnicodeAddress
- ? nfc
- : (nfc & 0x3fffFFFF) / 2;
- }
- sal_Bool IsVersion67() const { return bVer67; }
-};
-
-
-class WW8PLCFx_Fc_FKP : public WW8PLCFx // Iterator fuer Piece Table Exceptions of Fkps
- // arbeitet nur auf FCs, nicht auf CPs !
- // ( Low-Level )
-{
-
-
- class WW8Fkp // Iterator fuer Formatted Disk Page
- {
- struct WW8Grpprl
- {
- sal_uInt8* pData;
- sal_uInt16 nLen;
- sal_uInt16 nIStd; // nur bei Fkp.Papx gueltig (aktuelle Style-Nr)
- sal_Bool bMustDelete;
- };
-
- WW8Grpprl* pGrpprl; // Pointer of Meta Array (pointing
-
- sal_uInt8* pFkp; // gesamter Fkp
-
- long nItemSize; // entweder 1 Byte oder ein komplettes BX
- long nFilePos; // Offset in Stream where last read of 52 bytes took place
- short nIdx; // Pos-Merker
- ePLCFT ePLCF;
- sal_uInt8 nIMax; // Anzahl der Eintraege
- sal_uInt8 nVersion;
-
- public:
- WW8Fkp( sal_uInt8 nFibVer, SvStream* pFKPStrm, SvStream* pDataStrm,
- long _nFilePos, long nItemSiz,
- ePLCFT ePl, WW8_FC nStartFc = -1 );
- ~WW8Fkp();
- long GetFilePos() const { return nFilePos; }
- sal_uLong GetIdx() const { return (sal_uLong)nIdx; }
- void SetIdx( sal_uLong nI );
- sal_Bool SeekPos( long nPos );
- WW8_FC Where() { return ( nIdx<nIMax)
- ? ((WW8_FC*)pFkp)[nIdx]
- : LONG_MAX; }
- WW8Fkp& operator ++( int ) { if( nIdx < nIMax ) nIdx++;
- return *this; }
- sal_uInt8* Get( WW8_FC& rStart, WW8_FC& rEnd, short& rLen );
- sal_uInt16 GetIstd() const { return pGrpprl[ nIdx ].nIStd; }
-
- /*
- liefert einen echten Pointer auf das Sprm vom Typ nId,
- falls ein solches im Fkp drin ist.
- */
- sal_uInt8* GetLenAndIStdAndSprms(short& rLen);
-
- /*
- ruft GetLenAndIStdAndSprms() auf...
- */
- sal_uInt8* HasSprm( sal_uInt16 nId );
-
- sal_uLong GetParaHeight() const; // fuer Header/Footer bei Papx-Fkps
-
- sal_uInt8 GetVersion() const { return nVersion; }
- };
-
-
- WW8PLCFx_PCDAttrs* pPCDAttrs;
- SvStream* pFKPStrm; // Input-File
- SvStream* pDataStrm; // Input-File
- WW8PLCF* pPLCF;
- WW8Fkp* pFkp;
- WW8_FC nStartFc;
-
- sal_Bool NewFkp();
-
-protected:
- ePLCFT ePLCF;
-
-public:
- WW8PLCFx_Fc_FKP( SvStream* pSt, SvStream* pTblSt, SvStream* pDataSt,
- WW8Fib& rFib, ePLCFT ePl, WW8_FC nStartFcL,
- WW8PLCFx_PCDAttrs* pPLCFx_PCD );
- virtual ~WW8PLCFx_Fc_FKP();
- virtual sal_uLong GetIdx() const;
- virtual void SetIdx( sal_uLong nIdx );
- virtual sal_Bool SeekPos( WW8_FC nFcPos );
- virtual WW8_FC Where();
- sal_uInt8* GetSprms( WW8_FC& rStart, WW8_FC& rEnd, long& rLen );
- virtual WW8PLCFx& operator ++( int );
- virtual sal_uInt16 GetIstd() const;
- void GetPCDSprms( WW8PLCFxDesc& rDesc );
- sal_uInt8* HasSprm( sal_uInt16 nId );
- sal_uLong GetParaHeight() const;
- sal_Bool HasFkp() { return (0 != pFkp); }
-};
-
-// Iterator fuer Piece Table Exceptions of Fkps arbeitet auf CPs (High-Level)
-class WW8PLCFx_Cp_FKP : public WW8PLCFx_Fc_FKP
-{
- const WW8ScannerBase& rSBase;
- WW8PLCFx_PCD* pPcd;
- WW8_CP nAttrStart, nAttrEnd;
- sal_Bool bLineEnd : 1;
- sal_Bool bComplex : 1;
-
- void SearchParaEnd( long nOldEndCp );
-
-public:
- WW8PLCFx_Cp_FKP( SvStream* pSt, SvStream* pTblSt, SvStream* pDataSt, const WW8ScannerBase&
- rBase, ePLCFT ePl );
- virtual ~WW8PLCFx_Cp_FKP();
- void ResetAttrStartEnd();
- sal_uLong GetPCDIMax() const;
- sal_uLong GetPCDIdx() const;
- void SetPCDIdx( sal_uLong nIdx );
- virtual sal_uLong GetIdx2() const;
- virtual void SetIdx2( sal_uLong nIdx );
- virtual sal_Bool SeekPos( WW8_CP nCpPos );
- virtual WW8_CP Where();
- virtual void GetSprms( WW8PLCFxDesc* p );
- virtual WW8PLCFx& operator ++( int );
- virtual void Save( WW8PLCFxSave1& rSave ) const;
- virtual void Restore( const WW8PLCFxSave1& rSave );
-};
-
-
-
-class WW8PLCFx_SEPX : public WW8PLCFx // Iterator fuer Piece Table Exceptions of Sepx
-{
- SvStream* pStrm;
- WW8PLCF* pPLCF;
- sal_uInt8* pSprms;
- sal_uInt16 nArrMax;
- sal_uInt16 nSprmSiz;
-
-public:
- WW8PLCFx_SEPX( SvStream* pSt, SvStream* pTblxySt, WW8Fib& rFib, WW8_CP nStartCp );
- virtual ~WW8PLCFx_SEPX();
- virtual sal_uLong GetIdx() const;
- virtual void SetIdx( sal_uLong nIdx );
- long GetIMax() const { return ( pPLCF ) ? pPLCF->GetIMax() : 0; }
- virtual sal_Bool SeekPos( WW8_CP nCpPos );
- virtual long Where();
- virtual void GetSprms( WW8PLCFxDesc* p );
- virtual WW8PLCFx& operator ++( int );
- sal_uInt8* HasSprm( sal_uInt16 nId ) const;
- sal_uInt8* HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const;
- sal_uInt8* HasSprm( sal_uInt16 nId, sal_uInt8* pOtherSprms, long nOtherSprmSiz ) const;
- sal_Bool Find4Sprms(sal_uInt16 nId1, sal_uInt16 nId2, sal_uInt16 nId3, sal_uInt16 nId4,
- sal_uInt8*& p1, sal_uInt8*& p2, sal_uInt8*& p3, sal_uInt8*& p4 ) const;
- sal_Bool CompareSprms( sal_uInt8* pOtherSprms,
- long nOtherSprmSiz,
- const SvUShortsSort* pIgnoreSprms = 0 ) const;
-};
-
-// Iterator fuer Fuss-/Endnoten und Anmerkungen
-class WW8PLCFx_SubDoc : public WW8PLCFx
-{
- WW8PLCF* pRef;
- WW8PLCF* pTxt;
-
-public:
- WW8PLCFx_SubDoc( SvStream* pSt, sal_uInt8 nVersion, WW8_CP nStartCp,
- long nFcRef, long nLenRef,
- long nFcTxt, long nLenTxt, long nStruc = 0 );
- virtual ~WW8PLCFx_SubDoc();
- virtual sal_uLong GetIdx() const;
- virtual void SetIdx( sal_uLong nIdx );
- virtual sal_Bool SeekPos( WW8_CP nCpPos );
- virtual long Where();
-
- // liefert Reference Descriptoren
- const void* GetData( long nIdx = -1 ) const
- {
- return pRef ? pRef->GetData( -1L == nIdx ? pRef->GetIdx()
- : nIdx ) : 0;
- }
-
- /*
- liefert Angabe, wo Kopf und Fusszeilen-Text zu finden ist
- */
- sal_Bool Get( long& rStart, void*& rpValue );
- virtual long GetNoSprms( long& rStart, long&, long& rLen );
- virtual WW8PLCFx& operator ++( int );
- long Count() { return ( pRef ) ? pRef->GetIMax() : 0; }
-};
-
-class WW8PLCFx_FLD : public WW8PLCFx // Iterator fuer Fuss- und Endnoten
-{
- WW8PLCFspecial* pPLCF;
- WW8Fib& rFib;
-
-public:
- WW8PLCFx_FLD( SvStream* pSt, WW8Fib& rMyFib, short nType, WW8_CP nStartCp );
- virtual ~WW8PLCFx_FLD();
- virtual sal_uLong GetIdx() const;
- virtual void SetIdx( sal_uLong nIdx );
- virtual sal_Bool SeekPos( WW8_CP nCpPos );
- virtual long Where();
- virtual long GetNoSprms( long& rStart, long&, long& rLen );
- virtual WW8PLCFx& operator ++( int );
- sal_Bool GetPara( long nIdx, WW8FieldDesc& rF );
-};
-
-enum eBookStatus { BOOK_NORMAL = 0, BOOK_IGNORE = 0x1, BOOK_ONLY_REF = 0x2 };
-
-class WW8PLCFx_Book : public WW8PLCFx // Iterator fuer Booknotes
-{
- WW8PLCFspecial* pBook[2]; // Start- und EndPosition
- SvStrings aBookNames; // Name
- eBookStatus* pStatus;
- long nIMax; // Anzahl der Booknotes
- sal_uInt16 nIsEnd;
-public:
- WW8PLCFx_Book( SvStream* pSt, SvStream* pTblSt, WW8Fib& rFib, WW8_CP nStartCp );
- virtual ~WW8PLCFx_Book();
- long GetIMax(){ return nIMax; }
- virtual sal_uLong GetIdx() const;
- virtual void SetIdx( sal_uLong nI );
- virtual sal_uLong GetIdx2() const;
- virtual void SetIdx2( sal_uLong nIdx );
- virtual sal_Bool SeekPos( WW8_CP nCpPos );
- virtual long Where();
- virtual long GetNoSprms( long& rStart, long& rEnd, long& rLen );
- virtual WW8PLCFx& operator ++( int );
- const String* GetName() const
- { return ( !nIsEnd && ( (long)(pBook[0]->GetIdx()) < nIMax ) )
- ? aBookNames[ pBook[0]->GetIdx() ]
- : 0;
- }
- WW8_CP GetStartPos() const
- { return ( nIsEnd ) ? LONG_MAX : pBook[0]->Where(); }
- long GetLen() const;
- sal_Bool GetIsEnd() const { return ( nIsEnd ) ? sal_True : sal_False; }
- long GetHandle() const;
- sal_Bool SetStatus( WW8_CP nStartRegion, WW8_CP nEndRegion, const String& rName,
- eBookStatus eStat );
- eBookStatus GetStatus() const;
-};
-
-/*
- hiermit arbeiten wir draussen:
-*/
-struct WW8PLCFManResult
-{
- WW8_CP nCpPos; // Attribut-Anfangsposition
- long nMemLen; // Laenge dazu
- long nCp2OrIdx; // footnote-textpos oder Index in PLCF
- WW8_CP nAktCp; // wird nur vom Aufrufer benutzt
- sal_uInt8* pMemPos; // Mem-Pos fuer Sprms
- sal_uInt16 nSprmId; // Sprm-Id ( 0 = ungueltige Id -> ueberspringen! )
- // (2..255) oder Pseudo-Sprm-Id (256..260)
- // bzw. ab Winword-Ver8 die Sprm-Id (800..)
- sal_uInt8 nFlags; // Absatz- oder Section-Anfang
-};
-
-#define MAN_ANZ_PLCF 12
-
-#define MAN_MASK_NEW_PAP 1 // neue Zeile
-#define MAN_MASK_NEW_SEP 2 // neue Section
-
-
-#define MAN_MAINTEXT 0 // Defines fuer PLCFMan-ctor
-#define MAN_FTN 1
-#define MAN_EDN 2
-#define MAN_HDFT 3
-#define MAN_AND 4
-#define MAN_TXBX 5
-#define MAN_TXBX_HDFT 6
-
-struct WW8PLCFxSaveAll
-{
- WW8PLCFxSave1 aS[MAN_ANZ_PLCF];
-};
-
-/*
- hiermit arbeitet der Manager drinnen:
-*/
-struct WW8PLCFxDesc
-{
- WW8PLCFx* pPLCFx;
- UShortStk* pIdStk;// Speicher fuer Attr-Id fuer Attr-Ende(n)
- sal_uInt8* pMemPos; // wo liegen die Sprm(s)
- long nStartPos;
- long nEndPos;
- long nCp2OrIdx; // wo liegen die NoSprm(s)
- long nSprmsLen; // wie viele Bytes fuer weitere Sprms / Laenge Fussnote
- long nCpOfs; // fuer Offset Header .. Footnote
- sal_Bool bFirstSprm; // fuer Erkennung erster Sprm einer Gruppe
- sal_Bool bRealLineEnd; // sal_False bei Pap-Piece-Ende
- void Save( WW8PLCFxSave1& rSave ) const;
- void Restore( const WW8PLCFxSave1& rSave );
-};
-
-
-#ifndef DUMP
-
-class WW8PLCFMan
-{
- long nCpO; // Origin Cp -- the basis for nNewCp
-
- long nLineEnd; // zeigt *hinter* das <CR>
- long nLastWhereIdxCp; // last result of WhereIdx()
- sal_uInt16 nPLCF; // so viele PLCFe werden verwaltet
- short nManType;
-
- WW8PLCFxDesc aD[MAN_ANZ_PLCF];
- WW8PLCFxDesc *pChp, *pPap, *pSep, *pFld, *pFldTxbx, *pFldTxbxHdft,
- *pFtn, *pEdn,
- *pBkm, *pPcd, *pPcdA, *pAnd;
- WW8PLCFspecial *pFdoa, *pTxbx, *pTxbxBkd;
-
- WW8Fib* pWwFib;
- sal_uInt16* pNoAttrScan; // Attribute komplett(!) ignorieren, die ueber n CPs
- // aufgespannt sind; z.B. bei Char #7 (Zellen-/Zeilenende)
-
- short WhereIdx( sal_Bool* pbStart, long* pPos );
- void AdjustEnds( WW8PLCFxDesc& rDesc );
- void GetNewSprms( WW8PLCFxDesc& rDesc );
- void GetNewNoSprms( WW8PLCFxDesc& rDesc );
- void GetSprmStart( short nIdx, WW8PLCFManResult* pRes );
- void GetSprmEnd( short nIdx, WW8PLCFManResult* pRes );
- void GetNoSprmStart( short nIdx, WW8PLCFManResult* pRes );
- void GetNoSprmEnd( short nIdx, WW8PLCFManResult* pRes );
- void AdvSprm( short nIdx, sal_Bool bStart );
- void AdvNoSprm( short nIdx, sal_Bool bStart );
-
-public:
- WW8PLCFMan( WW8ScannerBase* pBase, short nType, long nStartCp );
- ~WW8PLCFMan();
-
- /*
- Where fragt, an welcher naechsten Position sich irgendein
- Attr aendert...
- */
- long Where();
-
- sal_Bool Get( WW8PLCFManResult* pResult );
- WW8PLCFMan& operator ++( int );
- sal_uInt16 GetColl() const; // liefert aktuellen Style
- WW8PLCFx_FLD* GetFld() const;
- WW8PLCFx_SubDoc* GetEdn() const { return (WW8PLCFx_SubDoc*)pEdn->pPLCFx; }
- WW8PLCFx_SubDoc* GetFtn() const { return (WW8PLCFx_SubDoc*)pFtn->pPLCFx; }
- WW8PLCFx_SubDoc* GetAtn() const { return (WW8PLCFx_SubDoc*)pAnd->pPLCFx; }
- WW8PLCFx_Book* GetBook() const { return (WW8PLCFx_Book*)pBkm->pPLCFx; }
- long GetCpOfs() const { return pChp->nCpOfs; } // fuer Header/Footer...
-
- /*
- fragt, ob *aktueller Absatz* einen Sprm diesen Typs hat
- */
- sal_uInt8* HasParaSprm( sal_uInt16 nId ) const;
-
- /*
- fragt, ob *aktueller Textrun* einen Sprm diesen Typs hat
- */
- sal_uInt8* HasCharSprm( sal_uInt16 nId ) const;
-
- WW8PLCFx_Cp_FKP* GetChpPLCF(){ return (WW8PLCFx_Cp_FKP*)pChp->pPLCFx; }
- WW8PLCFx_Cp_FKP* GetPapPLCF(){ return (WW8PLCFx_Cp_FKP*)pPap->pPLCFx; }
- WW8PLCFx_SEPX* GetSepPLCF(){ return (WW8PLCFx_SEPX*)pSep->pPLCFx; }
- WW8PLCFxDesc* GetPap(){ return pPap; }
- void SeekPos( long nNewCp );
- void SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const;
- void RestoreAllPLCFx( const WW8PLCFxSaveAll& rSave );
- WW8PLCFspecial* GetFdoa() { return pFdoa; }
- WW8PLCFspecial* GetTxbx() { return pTxbx; }
- WW8PLCFspecial* GetTxbxBkd(){ return pTxbxBkd; }
- short GetManType() { return nManType; }
-};
-
-#endif // !DUMP
-
-class WW8ScannerBase
-{
-friend WW8PLCFx_PCDAttrs::WW8PLCFx_PCDAttrs( sal_uInt8 nVersion, WW8PLCFx_PCD* pPLCFx_PCD, WW8ScannerBase* pBase );
-friend WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP( SvStream*, SvStream*, SvStream*,
- const WW8ScannerBase&, ePLCFT );
-
-#ifdef DUMP
-friend static void DumpPLCFText( WW8_FC nPos, long nLen, long nOfs, sal_Char* pName,
- WW8ScannerBase* pBase );
-friend static void DumpFtnShort( short nId, long nPos, long nFieldLen );
-#else
-friend WW8PLCFMan::WW8PLCFMan( WW8ScannerBase*, short, long );
-friend class SwWw8ImplReader;
-#endif
-
- WW8Fib* pWw8Fib;
- WW8PLCFx_Cp_FKP* pChpPLCF; // Character-Attrs
- WW8PLCFx_Cp_FKP* pPapPLCF; // Para-Attrs
- WW8PLCFx_SEPX* pSepPLCF; // Section-Attrs
- WW8PLCFx_SubDoc* pFtnPLCF; // Footnotes
- WW8PLCFx_SubDoc* pEdnPLCF; // EndNotes
- WW8PLCFx_SubDoc* pAndPLCF; // Anmerkungen
- WW8PLCFx_FLD* pFldPLCF; // Fields in Main Text
- WW8PLCFx_FLD* pFldHdFtPLCF; // Fields in Header / Footer
- WW8PLCFx_FLD* pFldTxbxPLCF; // Fields in Textboxes in Main Text
- WW8PLCFx_FLD* pFldTxbxHdFtPLCF; // Fields in Textboxes in Header / Footer
- WW8PLCFx_FLD* pFldFtnPLCF; // Fields in Footnotes
- WW8PLCFx_FLD* pFldEdnPLCF; // Fields in Endnotes
- WW8PLCFx_FLD* pFldAndPLCF; // Fields in Anmerkungen
- WW8PLCFspecial* pMainFdoa; // Graphic Primitives in Main Text
- WW8PLCFspecial* pHdFtFdoa; // Graphic Primitives in Header / Footer
- WW8PLCFspecial* pMainTxbx; // Textboxen in Main Text
- WW8PLCFspecial* pMainTxbxBkd; // Break-Deskriptoren fuer diese
- WW8PLCFspecial* pHdFtTxbx; // TextBoxen in Header / Footer
- WW8PLCFspecial* pHdFtTxbxBkd; // Break-Deskriptoren fuer diese
- WW8PLCFx_Book* pBook; // Bookmarks
-
- WW8PLCFpcd* pPiecePLCF; // fuer FastSave ( Basis-PLCF ohne Iterator )
- WW8PLCFpcd_Iter* pPieceIter; // fuer FastSave ( Iterator dazu )
- WW8PLCFx_PCD* pPLCFx_PCD; // dito
- WW8PLCFx_PCDAttrs* pPLCFx_PCDAttrs;
- sal_uInt8** pPieceGrpprls; // Attribute an Piece-Table
- sal_uInt16 nPieceGrpprls; // Anzahl davon
- sal_uInt16 nNoAttrScan; // Attribute komplett(!) ignorieren, die ueber n CPs
- // aufgespannt sind; z.B. bei Char #7 (Zellen-/Zeilenende)
-
- WW8PLCFpcd* OpenPieceTable( SvStream* pStr, WW8Fib* pWwF );
- void DeletePieceTable();
-
-public:
- WW8ScannerBase( SvStream* pSt, SvStream* pTblSt, SvStream* pDataSt,
- WW8Fib* pWwF );
- ~WW8ScannerBase();
- sal_Bool AreThereFootnotes() { return pFtnPLCF->Count() > 0; };
- sal_Bool AreThereEndnotes() { return pEdnPLCF->Count() > 0; };
- static DateTime WW8DTTM2DateTime(long lDTTM);
-
- WW8_CP WW8Fc2Cp( WW8_FC nFcPos ) const ;
- WW8_FC WW8Cp2Fc( WW8_CP nCpPos, sal_Bool* pIsUnicode = 0,
- WW8_CP* pNextPieceCp = 0, sal_Bool* pTestFlag = 0 ) const;
- void SetNoAttrScan( sal_uInt16 nValue ) { nNoAttrScan = nValue; };
-
- sal_uInt16 WW8ReadString( SvStream& rStrm, String& rStr,
- WW8_CP nAktStartCp, long nTotalLen,
- rtl_TextEncoding eEnc ) const;
-};
-
-
-
-/** FIB - File Information Block
-*/
-class WW8Fib
-{
-public:
- /*
- von uns verlangte Programm-Version:
- in Ctor wird geprueft, ob sie zu nFib passt
- */
- sal_uInt8 nVersion; // 6 steht fuer "WinWord 6 oder WinWord 95",
- // 7 steht fuer "nur WinWord 95"
- // 8 steht fuer "nur WinWord 97"
- /*
- Fehlerstatus
- */
- sal_uLong nFibError;
- /*
- vom Ctor aus dem FIB gelesene Daten
- (entspricht nur ungefaehr der tatsaechlichen Struktur
- des Winword-FIB)
- */
- sal_uInt16 wIdent; // 0x0 int magic number
- sal_uInt16 nFib; // 0x2 FIB version written
- sal_uInt16 nProduct; // 0x4 product version written by
- sal_Int16 lid; // 0x6 language stamp---localized version;
- WW8_PN pnNext; // 0x8
-
- sal_uInt16 fDot :1; // 0xa 0001
- sal_uInt16 fGlsy :1;
- sal_uInt16 fComplex :1; // 0004 when 1, file is in complex, fast-saved format.
- sal_uInt16 fHasPic :1; // 0008 file contains 1 or more pictures
- sal_uInt16 cQuickSaves :4; // 00F0 count of times file was quicksaved
- sal_uInt16 fEncrypted :1; //0100 1 if file is encrypted, 0 if not
- sal_uInt16 fWhichTblStm :1; //0200 When 0, this fib refers to the table stream
- // named "0Table", when 1, this fib refers to the
- // table stream named "1Table". Normally, a file
- // will have only one table stream, but under unusual
- // circumstances a file may have table streams with
- // both names. In that case, this flag must be used
- // to decide which table stream is valid.
- // sal_uInt16 u1 :2;
- sal_uInt16 fExtChar :1; // 1000 =1, when using extended character set in file
- // sal_uInt16 u2 :3;
-
- sal_uInt16 nFibBack; // 0xc
- sal_Int16 lKey1; // 0xe file encrypted key, only valid if fEncrypted.
- sal_Int16 lKey2; // 0x10 key in 2 Portionen wg. Misalignment
- sal_uInt8 envr; // 0x12 environment in which file was created
- // 0 created by Win Word / 1 created by Mac Word
- sal_uInt8 fMac :1; // 0x13 when 1, this file was last saved in the Mac environment
- sal_uInt8 fEmptySpecial :1;
- sal_uInt8 fLoadOverridePage :1;
- sal_uInt8 fFuturesavedUndo :1;
- sal_uInt8 fWord97Saved :1;
- sal_uInt8 :3;
-
- sal_uInt16 chse; // 0x14 default extended character set id for text in document stream. (overidden by chp.chse)
- // 0 = ANSI / 256 Macintosh character set.
- sal_uInt16 chseTables; // 0x16 default extended character set id for text in
- // internal data structures: 0 = ANSI, 256 = Macintosh
- WW8_FC fcMin; // 0x18 file offset of first character of text
- WW8_FC fcMac; // 0x1c file offset of last character of text + 1
-
- // Einschub fuer WW8 *****************************************************
- sal_uInt16 csw; // Count of fields in the array of "shorts"
-
- // Marke: "rgsw" Beginning of the array of shorts
- sal_uInt16 wMagicCreated; // unique number Identifying the File's creator
- // 0x6A62 is the creator ID for Word and is reserved.
- // Other creators should choose a different value.
- sal_uInt16 wMagicRevised; // identifies the File's last modifier
- sal_uInt16 wMagicCreatedPrivate; // private data
- sal_uInt16 wMagicRevisedPrivate; // private data
- /*
- sal_Int16 pnFbpChpFirst_W6; // not used
- sal_Int16 pnChpFirst_W6; // not used
- sal_Int16 cpnBteChp_W6; // not used
- sal_Int16 pnFbpPapFirst_W6; // not used
- sal_Int16 pnPapFirst_W6; // not used
- sal_Int16 cpnBtePap_W6; // not used
- sal_Int16 pnFbpLvcFirst_W6; // not used
- sal_Int16 pnLvcFirst_W6; // not used
- sal_Int16 cpnBteLvc_W6; // not used
- */
- sal_Int16 lidFE; // Language id if document was written by Far East version
- // of Word (i.e. FIB.fFarEast is on)
- sal_uInt16 clw; // Number of fields in the array of longs
-
- // Ende des Einschubs fuer WW8 *******************************************
-
- // Marke: "rglw" Beginning of the array of longs
- WW8_FC cbMac; // 0x20 file offset of last byte written to file + 1.
-
- // WW8_FC u4[4]; // 0x24
- WW8_CP ccpText; // 0x34 length of main document text stream
- WW8_CP ccpFtn; // 0x38 length of footnote subdocument text stream
- WW8_CP ccpHdr; // 0x3c length of header subdocument text stream
- WW8_CP ccpMcr; // 0x40 length of macro subdocument text stream
- WW8_CP ccpAtn; // 0x44 length of annotation subdocument text stream
- WW8_CP ccpEdn; // 0x48 length of endnote subdocument text stream
- WW8_CP ccpTxbx; // 0x4c length of textbox subdocument text stream
- WW8_CP ccpHdrTxbx; // 0x50 length of header textbox subdocument text stream
-
- // Einschub fuer WW8 *****************************************************
- sal_Int32 pnFbpChpFirst; // when there was insufficient memory for Word to expand
- // the PLCFbte at save time, the PLCFbte is written
- // to the file in a linked list of 512-byte pieces
- // starting with this pn.
- /*
- // folgende Felder existieren zwar so in der Datei,
- // wir benutzen jedoch unten deklarierte General-Variablen
- // fuer Ver67 und Ver8 gemeinsam.
- sal_Int32 pnChpFirst; // the page number of the lowest numbered page in the
- // document that records CHPX FKP information
- sal_Int32 cpnBteChp; // count of CHPX FKPs recorded in file. In non-complex
- // files if the number of entries in the PLCFbteChpx
- // is less than this, the PLCFbteChpx is incomplete.
- */
- sal_Int32 pnFbpPapFirst; // when there was insufficient memory for Word to expand
- // the PLCFbte at save time, the PLCFbte is written to
- // the file in a linked list of 512-byte pieces
- // starting with this pn
- /*
- // folgende Felder existieren zwar so in der Datei,
- // wir benutzen jedoch unten deklarierte General-Variablen
- // fuer Ver67 und Ver8 gemeinsam.
- sal_Int32 pnPapFirst; // the page number of the lowest numbered page in the
- // document that records PAPX FKP information
- sal_Int32 cpnBtePap; // count of PAPX FKPs recorded in file. In non-complex
- // files if the number of entries in the PLCFbtePapx is
- // less than this, the PLCFbtePapx is incomplete.
- */
- sal_Int32 pnFbpLvcFirst; // when there was insufficient memory for Word to expand
- // the PLCFbte at save time, the PLCFbte is written to
- // the file in a linked list of 512-byte pieces
- // starting with this pn
- sal_Int32 pnLvcFirst; // the page number of the lowest numbered page in the
- // document that records LVC FKP information
- sal_Int32 cpnBteLvc; // count of LVC FKPs recorded in file. In non-complex
- // files if the number of entries in the PLCFbtePapx is
- // less than this, the PLCFbtePapx is incomplete.
- sal_Int32 fcIslandFirst; // ?
- sal_Int32 fcIslandLim; // ?
- sal_uInt16 cfclcb; // Number of fields in the array of FC/LCB pairs.
-
- // Ende des Einschubs fuer WW8 *******************************************
-
- // Marke: "rgfclcb" Beginning of array of FC/LCB pairs.
- WW8_FC fcStshfOrig; // file offset of original allocation for STSH in table
- // stream. During fast save Word will attempt to reuse
- // this allocation if STSH is small enough to fit.
- sal_Int32 lcbStshfOrig; // 0x5c count of bytes of original STSH allocation
- WW8_FC fcStshf; // 0x60 file offset of STSH in file.
- sal_Int32 lcbStshf; // 0x64 count of bytes of current STSH allocation
- WW8_FC fcPlcffndRef; // 0x68 file offset of footnote reference PLCF.
- sal_Int32 lcbPlcffndRef; // 0x6c count of bytes of footnote reference PLCF
- // == 0 if no footnotes defined in document.
-
- WW8_FC fcPlcffndTxt; // 0x70 file offset of footnote text PLCF.
- sal_Int32 lcbPlcffndTxt; // 0x74 count of bytes of footnote text PLCF.
- // == 0 if no footnotes defined in document
-
- WW8_FC fcPlcfandRef; // 0x78 file offset of annotation reference PLCF.
- sal_Int32 lcbPlcfandRef; // 0x7c count of bytes of annotation reference PLCF.
-
- WW8_FC fcPlcfandTxt; // 0x80 file offset of annotation text PLCF.
- sal_Int32 lcbPlcfandTxt; // 0x84 count of bytes of the annotation text PLCF
-
- WW8_FC fcPlcfsed; // 8x88 file offset of section descriptor PLCF.
- sal_Int32 lcbPlcfsed; // 0x8c count of bytes of section descriptor PLCF.
-
- WW8_FC fcPlcfpad; // 0x90 file offset of paragraph descriptor PLCF
- sal_Int32 lcbPlcfpad; // 0x94 count of bytes of paragraph descriptor PLCF.
- // ==0 if file was never viewed in Outline view.
- // Should not be written by third party creators
-
- WW8_FC fcPlcfphe; // 0x98 file offset of PLCF of paragraph heights.
- sal_Int32 lcbPlcfphe; // 0x9c count of bytes of paragraph height PLCF.
- // ==0 when file is non-complex.
-
- WW8_FC fcSttbfglsy; // 0xa0 file offset of glossary string table.
- sal_Int32 lcbSttbfglsy; // 0xa4 count of bytes of glossary string table.
- // == 0 for non-glossary documents.
- // !=0 for glossary documents.
-
- WW8_FC fcPlcfglsy; // 0xa8 file offset of glossary PLCF.
- sal_Int32 lcbPlcfglsy; // 0xac count of bytes of glossary PLCF.
- // == 0 for non-glossary documents.
- // !=0 for glossary documents.
-
- WW8_FC fcPlcfhdd; // 0xb0 byte offset of header PLCF.
- sal_Int32 lcbPlcfhdd; // 0xb4 count of bytes of header PLCF.
- // == 0 if document contains no headers
-
- WW8_FC fcPlcfbteChpx; // 0xb8 file offset of character property bin table.PLCF.
- sal_Int32 lcbPlcfbteChpx;// 0xbc count of bytes of character property bin table PLCF.
-
- WW8_FC fcPlcfbtePapx; // 0xc0 file offset of paragraph property bin table.PLCF.
- sal_Int32 lcbPlcfbtePapx;// 0xc4 count of bytes of paragraph property bin table PLCF.
-
- WW8_FC fcPlcfsea; // 0xc8 file offset of PLCF reserved for private use. The SEA is 6 bytes long.
- sal_Int32 lcbPlcfsea; // 0xcc count of bytes of private use PLCF.
-
- WW8_FC fcSttbfffn; // 0xd0 file offset of font information STTBF. See the FFN file structure definition.
- sal_Int32 lcbSttbfffn; // 0xd4 count of bytes in sttbfffn.
-
- WW8_FC fcPlcffldMom; // 0xd8 offset in doc stream to the PLCF of field positions in the main document.
- sal_Int32 lcbPlcffldMom; // 0xdc
-
- WW8_FC fcPlcffldHdr; // 0xe0 offset in doc stream to the PLCF of field positions in the header subdocument.
- sal_Int32 lcbPlcffldHdr; // 0xe4
-
- WW8_FC fcPlcffldFtn; // 0xe8 offset in doc stream to the PLCF of field positions in the footnote subdocument.
- sal_Int32 lcbPlcffldFtn; // 0xec
-
- WW8_FC fcPlcffldAtn; // 0xf0 offset in doc stream to the PLCF of field positions in the annotation subdocument.
- sal_Int32 lcbPlcffldAtn; // 0xf4
-
- WW8_FC fcPlcffldMcr; // 0xf8 offset in doc stream to the PLCF of field positions in the macro subdocument.
- sal_Int32 lcbPlcffldMcr; // 9xfc
-
- WW8_FC fcSttbfbkmk; // 0x100 offset in document stream of the STTBF that records bookmark names in the main document
- sal_Int32 lcbSttbfbkmk; // 0x104
-
- WW8_FC fcPlcfbkf; // 0x108 offset in document stream of the PLCF that records the beginning CP offsets of bookmarks in the main document. See BKF
- sal_Int32 lcbPlcfbkf; // 0x10c
-
- WW8_FC fcPlcfbkl; // 0x110 offset in document stream of the PLCF that records the ending CP offsets of bookmarks recorded in the main document. See the BKL structure definition.
- sal_Int32 lcbPlcfbkl; // 0x114 sal_Int32
-
- WW8_FC fcCmds; // 0x118 FC
- sal_Int32 lcbCmds; // 0x11c
-
- WW8_FC fcPlcfmcr; // 0x120 FC
- sal_Int32 lcbPlcfmcr; // 0x124
-
- WW8_FC fcSttbfmcr; // 0x128 FC
- sal_Int32 lcbSttbfmcr; // 0x12c
-
- WW8_FC fcPrDrvr; // 0x130 file offset of the printer driver information (names of drivers, port etc...)
- sal_Int32 lcbPrDrvr; // 0x134 count of bytes of the printer driver information (names of drivers, port etc...)
-
- WW8_FC fcPrEnvPort; // 0x138 file offset of the print environment in portrait mode.
- sal_Int32 lcbPrEnvPort; // 0x13c count of bytes of the print environment in portrait mode.
-
- WW8_FC fcPrEnvLand; // 0x140 file offset of the print environment in landscape mode.
- sal_Int32 lcbPrEnvLand; // 0x144 count of bytes of the print environment in landscape mode.
-
- WW8_FC fcWss; // 0x148 file offset of Window Save State data structure. See WSS.
- sal_Int32 lcbWss; // 0x14c count of bytes of WSS. ==0 if unable to store the window state.
-
- WW8_FC fcDop; // 0x150 file offset of document property data structure.
- sal_Int32 lcbDop; // 0x154 count of bytes of document properties.
- // cbDOP is 84 when nFib < 103
-
-
- WW8_FC fcSttbfAssoc; // 0x158 offset to STTBF of associated strings. See STTBFASSOC.
- sal_Int32 cbSttbfAssoc; // 0x15C
-
- WW8_FC fcClx; // 0x160 file offset of beginning of information for complex files.
- sal_Int32 lcbClx; // 0x164 count of bytes of complex file information. 0 if file is non-complex.
-
- WW8_FC fcPlcfpgdFtn; // 0x168 file offset of page descriptor PLCF for footnote subdocument.
- sal_Int32 lcbPlcfpgdFtn; // 0x16C count of bytes of page descriptor PLCF for footnote subdocument.
- // ==0 if document has not been paginated. The length of the PGD is 8 bytes.
-
- WW8_FC fcAutosaveSource; // 0x170 file offset of the name of the original file.
- sal_Int32 lcbAutosaveSource; // 0x174 count of bytes of the name of the original file.
-
- WW8_FC fcGrpStAtnOwners; // 0x178 group of strings recording the names of the owners of annotations
- sal_Int32 lcbGrpStAtnOwners; // 0x17C count of bytes of the group of strings
-
- WW8_FC fcSttbfAtnbkmk; // 0x180 file offset of the sttbf that records names of bookmarks in the annotation subdocument
- sal_Int32 lcbSttbfAtnbkmk; // 0x184 length in bytes of the sttbf that records names of bookmarks in the annotation subdocument
-
- // Einschubs fuer WW67 ***************************************************
-
- // sal_Int16 wSpare4Fib; // Reserve, muss hier nicht deklariert werden
-
- /*
- // folgende Felder existieren zwar so in der Datei,
- // wir benutzen jedoch unten deklarierte General-Variablen
- // fuer Ver67 und Ver8 gemeinsam.
- WW8_PN pnChpFirst; // the page number of the lowest numbered page in
- // the document that records CHPX FKP information
- WW8_PN pnPapFirst; // the page number of the lowest numbered page in
- // the document that records PAPX FKP information
-
- WW8_PN cpnBteChp; // count of CHPX FKPs recorded in file. In non-complex
- // files if the number of entries in the PLCFbteChpx is
- // less than this, the PLCFbteChpx is incomplete.
- WW8_PN cpnBtePap; // count of PAPX FKPs recorded in file. In non-complex
- // files if the number of entries in the PLCFbtePapx is
- // less than this, the PLCFbtePapx is incomplete.
- */
-
- // Ende des Einschubs fuer WW67 ******************************************
-
- WW8_FC fcPlcfdoaMom; // 0x192 file offset of the FDOA (drawn object) PLCF for main document.
- // ==0 if document has no drawn objects. The length of the FDOA is 6 bytes.
- // ab Ver8 unused
- sal_Int32 lcbPlcfdoaMom; // 0x196 length in bytes of the FDOA PLCF of the main document
- // ab Ver8 unused
- WW8_FC fcPlcfdoaHdr; // 0x19A file offset of the FDOA (drawn object) PLCF for the header document.
- // ==0 if document has no drawn objects. The length of the FDOA is 6 bytes.
- // ab Ver8 unused
- sal_Int32 lcbPlcfdoaHdr; // 0x19E length in bytes of the FDOA PLCF of the header document
- // ab Ver8 unused
-
- WW8_FC fcPlcfspaMom; // offset in table stream of the FSPA PLCF for main document.
- // == 0 if document has no office art objects
- // war in Ver67 nur leere Reserve
- sal_Int32 lcbPlcfspaMom; // length in bytes of the FSPA PLCF of the main document
- // war in Ver67 nur leere Reserve
- WW8_FC fcPlcfspaHdr; // offset in table stream of the FSPA PLCF for header document.
- // == 0 if document has no office art objects
- // war in Ver67 nur leere Reserve
- sal_Int32 lcbPlcfspaHdr; // length in bytes of the FSPA PLCF of the header document
- // war in Ver67 nur leere Reserve
-
- WW8_FC fcPlcfAtnbkf; // 0x1B2 file offset of BKF (bookmark first) PLCF of the annotation subdocument
- sal_Int32 lcbPlcfAtnbkf; // 0x1B6 length in bytes of BKF (bookmark first) PLCF of the annotation subdocument
-
- WW8_FC fcPlcfAtnbkl; // 0x1BA file offset of BKL (bookmark last) PLCF of the annotation subdocument
- sal_Int32 lcbPlcfAtnbkl; // 0x1BE length in bytes of BKL (bookmark first) PLCF of the annotation subdocument
-
- WW8_FC fcPms; // 0x1C2 file offset of PMS (Print Merge State) information block
- sal_Int32 lcbPMS; // 0x1C6 length in bytes of PMS
-
- WW8_FC fcFormFldSttbf; // 0x1CA file offset of form field Sttbf which contains strings used in form field dropdown controls
- sal_Int32 lcbFormFldSttbf; // 0x1CE length in bytes of form field Sttbf
-
- WW8_FC fcPlcfendRef; // 0x1D2 file offset of PLCFendRef which points to endnote references in the main document stream
- sal_Int32 lcbPlcfendRef; // 0x1D6
-
- WW8_FC fcPlcfendTxt; // 0x1DA file offset of PLCFendRef which points to endnote text in the endnote document
- // stream which corresponds with the PLCFendRef
- sal_Int32 lcbPlcfendTxt; // 0x1DE
-
- WW8_FC fcPlcffldEdn; // 0x1E2 offset to PLCF of field positions in the endnote subdoc
- sal_Int32 lcbPlcffldEdn; // 0x1E6
-
- WW8_FC fcPlcfpgdEdn; // 0x1EA offset to PLCF of page boundaries in the endnote subdoc.
- sal_Int32 lcbPlcfpgdEdn; // 0x1EE
-
-
- WW8_FC fcDggInfo; // offset in table stream of the office art object table data.
- // The format of office art object table data is found in a separate document.
- // war in Ver67 nur leere Reserve
- sal_Int32 lcbDggInfo; // length in bytes of the office art object table data
- // war in Ver67 nur leere Reserve
-
- WW8_FC fcSttbfRMark; // 0x1fa offset to STTBF that records the author abbreviations...
- sal_Int32 lcbSttbfRMark; // 0x1fe
- WW8_FC fcSttbfCaption; // 0x202 offset to STTBF that records caption titles...
- sal_Int32 lcbSttbfCaption; // 0x206
- WW8_FC fcSttbAutoCaption; // offset in table stream to the STTBF that records the object names and
- // indices into the caption STTBF for objects which get auto captions.
- sal_Int32 lcbSttbAutoCaption; // 0x20e
-
- WW8_FC fcPlcfwkb; // 0x212 offset to PLCF that describes the boundaries of contributing documents...
- sal_Int32 lcbPlcfwkb; // 0x216
-
- WW8_FC fcPlcfspl; // offset in table stream of PLCF (of SPLS structures) that records spell check state
- // war in Ver67 nur leere Reserve
- sal_Int32 lcbPlcfspl; // war in Ver67 nur leere Reserve
-
- WW8_FC fcPlcftxbxTxt; // 0x222 ...PLCF of beginning CP in the text box subdoc
- sal_Int32 lcbPlcftxbxTxt; // 0x226
- WW8_FC fcPlcffldTxbx; // 0x22a ...PLCF of field boundaries recorded in the textbox subdoc.
- sal_Int32 lcbPlcffldTxbx; // 0x22e
- WW8_FC fcPlcfHdrtxbxTxt;// 0x232 ...PLCF of beginning CP in the header text box subdoc
- sal_Int32 lcbPlcfHdrtxbxTxt;// 0x236
- WW8_FC fcPlcffldHdrTxbx;// 0x23a ...PLCF of field boundaries recorded in the header textbox subdoc.
- sal_Int32 lcbPlcffldHdrTxbx;// 0x23e
-
- /*
- spezielle Listenverwaltung fuer WW8
- */
- WW8_FC fcPlcfLst; // 0x02e2 offset in the table stream of list format information.
- sal_Int32 lcbPlcfLst; // 0x02e6 length
- WW8_FC fcPlfLfo; // 0x02ea offset in the table stream of list format override information.
- sal_Int32 lcbPlfLfo; // 0x02ee length
- /*
- spezielle Break-Verwaltung fuer Text-Box-Stories in WW8
- */
- WW8_FC fcPlcftxbxBkd; // 0x02f2 PLCF fuer TextBox-Break-Deskriptoren im Maintext
- sal_Int32 lcbPlcftxbxBkd; // 0x02f6
- WW8_FC fcPlcfHdrtxbxBkd;// 0x02fa PLCF fuer TextBox-Break-Deskriptoren im Header-/Footer-Bereich
- sal_Int32 lcbPlcfHdrtxbxBkd;// 0x02fe
-
- // 0x302 - 372 == ignore
- /*
- ListNames (skip to here!)
- */
- WW8_FC fcSttbListNames;// 0x0372 PLCF for Listname Table
- sal_Int32 lcbSttbListNames;// 0x0376
- /*
- General-Varaiblen, die fuer Ver67 und Ver8 verwendet werden,
- obwohl sie in der jeweiligen DATEI verschiedene Groesse haben:
- */
- sal_Int32 pnChpFirst;
- sal_Int32 pnPapFirst;
- sal_Int32 cpnBteChp;
- sal_Int32 cpnBtePap;
- /*
- nun wird lediglich noch ein Ctor benoetigt
- */
- WW8Fib( SvStream& rStrm, sal_uInt8 nWantedVersion,sal_uInt32 nOffset=0 );
-
- /* leider falsch, man braucht auch noch einen fuer den Export */
- WW8Fib( sal_uInt8 nVersion = 6 );
- sal_Bool Write( SvStream& rStrm );
-};
-
-
-class WW8Style
-{
-protected:
- WW8Fib& rFib;
- SvStream& rSt;
- long nStyleStart;
- long nStyleLen;
-// WW8_STSHI* pStishi;
-
- sal_uInt16 cstd; // Count of styles in stylesheet
- sal_uInt16 cbSTDBaseInFile; // Length of STD Base as stored in a file
- sal_uInt16 fStdStylenamesWritten : 1; // Are built-in stylenames stored?
- sal_uInt16 : 15; // Spare flags
- sal_uInt16 stiMaxWhenSaved; // Max sti known when this file was written
- sal_uInt16 istdMaxFixedWhenSaved; // How many fixed-index istds are there?
- sal_uInt16 nVerBuiltInNamesWhenSaved; // Current version of built-in stylenames
- sal_uInt16 ftcStandardChpStsh; // ftc used by StandardChpStsh for this document
-
-public:
- WW8Style( SvStream& rSt, WW8Fib& rFibPara );
-// ~WW8Style(){ delete( pStishi ); pStishi = 0; }
- WW8_STD* Read1STDFixed( short& rSkip, short* pcbStd );
- WW8_STD* Read1Style( short& rSkip, String* pString, short* pcbStd );
- const sal_uInt16 GetCount() const { return cstd; }
-};
-
-
-class WW8Fonts
-{
-protected:
- WW8_FFN* pFontA; // Array of Pointers to Font Description
- // Hilfs-Vari
- sal_uInt16 nMax; // Array-Groesse
-public:
- WW8Fonts( SvStream& rSt, WW8Fib& rFib );
- ~WW8Fonts(){ if( pFontA ) delete [] pFontA; }
- const WW8_FFN* GetFont( sal_uInt16 nNum ) const;
- sal_uInt16 GetMax() const { return nMax; }
-};
-
-
-/** Document Properties
-*/
-class WW8Dop
-{
-public:
- /*
- Fehlerstatus
- */
- sal_uLong nDopError;
- /*
- vom Ctor aus dem FIB gelesene Daten
- (entspricht nur ungefaehr der tatsaechlichen Struktur
- des Winword-FIB)
- */
- // Initialisier-Dummy:
- sal_uInt8 nDataStart;
- //-------------------------
- sal_uInt16 fFacingPages : 1; // 1 when facing pages should be printed
- sal_uInt16 fWidowControl : 1; // 1 when widow control is in effect. 0 when widow control disabled.
- sal_uInt16 fPMHMainDoc : 1; // 1 when doc is a main doc for Print Merge Helper, 0 when not; default=0
- sal_uInt16 grfSuppression : 2; // 0 Default line suppression storage; 0= form letter line suppression; 1= no line suppression; default=0
- sal_uInt16 fpc : 2; // 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
- sal_uInt16 : 1; // 0 unused
- //-------------------------
- sal_uInt16 grpfIhdt : 8; // 0 specification of document headers and footers. See explanation under Headers and Footers topic.
- //-------------------------
- sal_uInt16 rncFtn : 2; // 0 restart index for footnotes, 0 don't restart note numbering, 1 section, 2 page
- sal_uInt16 nFtn : 14; // 1 initial footnote number for document
- sal_uInt16 fOutlineDirtySave : 1; // when 1, indicates that information in the hPLCFpad should be refreshed since outline has been dirtied
- sal_uInt16 : 7; // reserved
- sal_uInt16 fOnlyMacPics : 1; // when 1, Word believes all pictures recorded in the document were created on a Macintosh
- sal_uInt16 fOnlyWinPics : 1; // when 1, Word believes all pictures recorded in the document were created in Windows
- sal_uInt16 fLabelDoc : 1; // when 1, document was created as a print merge labels document
- sal_uInt16 fHyphCapitals : 1; // when 1, Word is allowed to hyphenate words that are capitalized. When 0, capitalized may not be hyphenated
- sal_uInt16 fAutoHyphen : 1; // when 1, Word will hyphenate newly typed text as a background task
- sal_uInt16 fFormNoFields : 1;
- sal_uInt16 fLinkStyles : 1; // when 1, Word will merge styles from its template
- sal_uInt16 fRevMarking : 1; // when 1, Word will mark revisions as the document is edited
- sal_uInt16 fBackup : 1; // always make backup when document saved when 1.
- sal_uInt16 fExactCWords : 1;
- sal_uInt16 fPagHidden : 1; //
- sal_uInt16 fPagResults : 1;
- sal_uInt16 fLockAtn : 1; // when 1, annotations are locked for editing
- sal_uInt16 fMirrorMargins : 1; // swap margins on left/right pages when 1.
- sal_uInt16 fReadOnlyRecommended : 1;// user has recommended that this doc be opened read-only when 1
- sal_uInt16 fDfltTrueType : 1; // when 1, use TrueType fonts by default (flag obeyed only when doc was created by WinWord 2.x)
- sal_uInt16 fPagSuppressTopSpacing : 1;//when 1, file created with SUPPRESSTOPSPACING=YES in win.ini. (flag obeyed only when doc was created by WinWord 2.x).
- sal_uInt16 fProtEnabled : 1; // when 1, document is protected from edit operations
- sal_uInt16 fDispFormFldSel : 1;// when 1, restrict selections to occur only within form fields
- sal_uInt16 fRMView : 1; // when 1, show revision markings on screen
- sal_uInt16 fRMPrint : 1; // when 1, print revision marks when document is printed
- sal_uInt16 fWriteReservation : 1;
- sal_uInt16 fLockRev : 1; // when 1, the current revision marking state is locked
- sal_uInt16 fEmbedFonts : 1; // when 1, document contains embedded True Type fonts
- // compatability options
- sal_uInt16 copts_fNoTabForInd : 1; // when 1, don�t add automatic tab stops for hanging indent
- sal_uInt16 copts_fNoSpaceRaiseLower : 1; // when 1, don�t add extra space for raised or lowered characters
- sal_uInt16 copts_fSupressSpbfAfterPgBrk : 1; // when 1, supress the paragraph Space Before and Space After options after a page break
- sal_uInt16 copts_fWrapTrailSpaces : 1; // when 1, wrap trailing spaces at the end of a line to the next line
- sal_uInt16 copts_fMapPrintTextColor : 1; // when 1, print colors as black on non-color printers
- sal_uInt16 copts_fNoColumnBalance : 1; // when 1, don�t balance columns for Continuous Section starts
- sal_uInt16 copts_fConvMailMergeEsc : 1;
- sal_uInt16 copts_fSupressTopSpacing : 1; // when 1, supress extra line spacing at top of page
- sal_uInt16 copts_fOrigWordTableRules : 1; // when 1, combine table borders like Word 5.x for the Macintosh
- sal_uInt16 copts_fTransparentMetafiles : 1; // when 1, don�t blank area between metafile pictures
- sal_uInt16 copts_fShowBreaksInFrames : 1; // when 1, show hard page or column breaks in frames
- sal_uInt16 copts_fSwapBordersFacingPgs : 1; // when 1, swap left and right pages on odd facing pages
-
- sal_Int16 dxaTab; // 720 twips default tab width
- sal_uInt16 wSpare; //
- sal_uInt16 dxaHotZ; // width of hyphenation hot zone measured in twips
- sal_uInt16 cConsecHypLim; // number of lines allowed to have consecutive hyphens
- sal_uInt16 wSpare2; // reserved
- sal_Int32 dttmCreated; // DTTM date and time document was created
- sal_Int32 dttmRevised; // DTTM date and time document was last revised
- sal_Int32 dttmLastPrint; // DTTM date and time document was last printed
- sal_Int16 nRevision; // number of times document has been revised since its creation
- sal_Int32 tmEdited; // time document was last edited
- sal_Int32 cWords; // count of words tallied by last Word Count execution
- sal_Int32 cCh; // count of characters tallied by last Word Count execution
- sal_Int16 cPg; // count of pages tallied by last Word Count execution
- sal_Int32 cParas; // count of paragraphs tallied by last Word Count execution
- sal_uInt16 rncEdn : 2; // restart endnote number code: 0 don�t restart endnote numbering, 1 section, 2 page
- sal_uInt16 nEdn : 14; // beginning endnote number
- sal_uInt16 epc : 2; // endnote position code: 0 at end of section, 3 at end of document
- // sal_uInt16 nfcFtnRef : 4; // number format code for auto footnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
- // 3 Upper case Letter, 4 Lower case Letter
- // ersetzt durch gleichlautendes Feld unten
- // sal_uInt16 nfcEdnRef : 4; // number format code for auto endnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
- // 3 Upper case Letter, 4 Lower case Letter
- // ersetzt durch gleichlautendes Feld unten
- sal_uInt16 fPrintFormData : 1; // only print data inside of form fields
- sal_uInt16 fSaveFormData : 1; // only save document data that is inside of a form field.
- sal_uInt16 fShadeFormData : 1; // shade form fields
- sal_uInt16 : 2; // reserved
- sal_uInt16 fWCFtnEdn : 1; // when 1, include footnotes and endnotes in word count
- sal_Int32 cLines; // count of lines tallied by last Word Count operation
- sal_Int32 cWordsFtnEnd; // count of words in footnotes and endnotes tallied by last Word Count operation
- sal_Int32 cChFtnEdn; // count of characters in footnotes and endnotes tallied by last Word Count operation
- sal_Int16 cPgFtnEdn; // count of pages in footnotes and endnotes tallied by last Word Count operation
- sal_Int32 cParasFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
- sal_Int32 cLinesFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
- sal_Int32 lKeyProtDoc; // document protection password key, only valid if dop.fProtEnabled, dop.fLockAtn or dop.fLockRev are 1.
- sal_uInt16 wvkSaved : 3; // document view kind: 0 Normal view, 1 Outline view, 2 Page View
- sal_uInt16 wScaleSaved : 9; //
- sal_uInt16 zkSaved : 2;
-
- // hier sollte bei nFib < 103 Schluss sein, sonst ist Datei fehlerhaft!
-
- /*
- bei nFib >= 103 gehts weiter:
- */
- sal_uInt32 fNoTabForInd :1; // see above in compatability options
- sal_uInt32 fNoSpaceRaiseLower :1; // see above
- sal_uInt32 fSupressSpbfAfterPageBreak :1; // see above
- sal_uInt32 fWrapTrailSpaces :1; // see above
- sal_uInt32 fMapPrintTextColor :1; // see above
- sal_uInt32 fNoColumnBalance :1; // see above
- sal_uInt32 fConvMailMergeEsc :1; // see above
- sal_uInt32 fSupressTopSpacing :1; // see above
- sal_uInt32 fOrigWordTableRules :1; // see above
- sal_uInt32 fTransparentMetafiles :1; // see above
- sal_uInt32 fShowBreaksInFrames :1; // see above
- sal_uInt32 fSwapBordersFacingPgs :1; // see above
- sal_uInt32 :4; // reserved
- sal_uInt32 fSuppressTopSpacingMac5 :1; // Suppress extra line spacing at top
- // of page like MacWord 5.x
- sal_uInt32 fTruncDxaExpand :1; // Expand/Condense by whole number of points
- sal_uInt32 fPrintBodyBeforeHdr :1; // Print body text before header/footer
- sal_uInt32 fNoLeading :1; // Don't add extra spacebetween rows of text
- sal_uInt32 :1; // reserved
- sal_uInt32 fMWSmallCaps :1; // Use larger small caps like MacWord 5.x
- sal_uInt32 :10;// reserved
-
- // hier sollte bei nFib <= 105 Schluss sein, sonst ist Datei fehlerhaft!
-
- /*
- bei nFib > 105 gehts weiter:
- */
- sal_Int16 adt; // Autoformat Document Type:
- // 0 for normal. 1 for letter, and 2 for email.
- WW8_DOPTYPOGRAPHY doptypography; // siehe WW8STRUC.HXX
- WW8_DOGRID dogrid; // siehe WW8STRUC.HXX
- sal_uInt16 :1; // reserved
- sal_uInt16 lvl :4; // Which outline levels are showing in outline view
- sal_uInt16 :4; // reserved
- sal_uInt16 fHtmlDoc :1; // This file is based upon an HTML file
- sal_uInt16 :1; // reserved
- sal_uInt16 fSnapBorder :1; // Snap table and page borders to page border
- sal_uInt16 fIncludeHeader :1; // Place header inside page border
- sal_uInt16 fIncludeFooter :1; // Place footer inside page border
- sal_uInt16 fForcePageSizePag :1; // Are we in online view
- sal_uInt16 fMinFontSizePag :1; // Are we auto-promoting
- // fonts to >= hpsZoonFontPag?
- sal_uInt16 fHaveVersions :1; // versioning is turned on
- sal_uInt16 fAutoVersion :1; // autoversioning is enabled
- sal_uInt16 :14; // reserved
- // hier 12 Byte ueberspringen: ASUMI
- sal_Int32 cChWS;
- sal_Int32 cChWSFtnEdn;
- sal_Int32 grfDocEvents;
- // hier 4+30+8 Bytes ueberspringen
- sal_Int32 cDBC;
- sal_Int32 cDBCFtnEdn;
- // hier 4 Bytes ueberspringen
- sal_Int16 nfcFtnRef;
- sal_Int16 nfcEdnRef;
- sal_Int16 hpsZoonFontPag;
- sal_Int16 dywDispPag;
-
- // 2. Initialisier-Dummy:
- sal_uInt8 nDataEnd;
-
- /*
- nun wird lediglich noch ein Ctor benoetigt,
- dem die FIB-Nummer uebergeben werden muss
- */
- WW8Dop( SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_Int32 nSize );
-
- /* leider falsch, man braucht auch noch einen fuer den Export */
- WW8Dop();
- sal_Bool Write( SvStream& rStrm, WW8Fib& rFib );
-};
-
-
-inline short WW8SkipOdd(SvStream* pSt )
-{
-#if defined HP9000 || defined SINIX
- short bRet = pSt->Tell() & 0x1;
- if (bRet) {
- sal_uInt8 c;
- pSt->Read( &c, 1 );
- }
- return bRet;
-#else
- if ( pSt->Tell() & 0x1 ){
- sal_uInt8 c;
- pSt->Read( &c, 1 );
- return 1;
- }
- return 0;
-#endif
-}
-
-
-class WW8PLCF_HdFt
-{
- WW8PLCF aPLCF;
- long nTextOfs;
- short nIdxOffset;
-
-public:
- WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop );
-// ~WW8PLCF_HdFt() {}
- sal_Bool GetTextPos( sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP& rStart, long& rLen );
- sal_Bool GetTextPosExact( short nIdx, WW8_CP& rStart, long& rLen );
- void UpdateIndex( sal_uInt8 grpfIhdt );
-};
-
-
-#endif
-
diff --git a/sw/source/filter/ww8/dump/ww8struc.hxx b/sw/source/filter/ww8/dump/ww8struc.hxx
deleted file mode 100644
index 6f86aa380f6d..000000000000
--- a/sw/source/filter/ww8/dump/ww8struc.hxx
+++ /dev/null
@@ -1,815 +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 _WW8STRUC_HXX
-#define _WW8STRUC_HXX
-
-#include <osl/endian.h>
-#include <tools/string.hxx>
-
-
-// max. Anzahl der Listen-Level in WW8: 1..9
-#define nWW8MaxListLevel 9
-
-
-inline sal_uInt8 Get_Byte( sal_uInt8 *& p )
- { sal_uInt8 n = SVBT8ToByte( *(SVBT8*)p ); p += 1; return n; }
-
-inline short Get_Short( sal_uInt8 *& p )
- { short n = SVBT16ToShort( *(SVBT16*)p ); p += 2; return n; }
-inline sal_uInt16 Get_UShort( sal_uInt8 *& p )
- { sal_uInt16 n = SVBT16ToShort( *(SVBT16*)p ); p += 2; return n; }
-
-inline long Get_Long( sal_uInt8 *& p )
- { long n = SVBT32ToUInt32( *(SVBT32*)p ); p += 4; return n; }
-inline sal_uLong Get_ULong( sal_uInt8 *& p )
- { sal_uLong n = SVBT32ToUInt32( *(SVBT32*)p ); p += 4; return n; }
-
-inline void Set_UInt8( sal_uInt8 *& p, sal_uInt8 n )
- { ByteToSVBT8( n, *(SVBT8*)p ); p+= 1; }
-
-inline void Set_UInt16( sal_uInt8 *& p, sal_uInt16 n )
- { ShortToSVBT16( n, *(SVBT16*)p ); p+= 2; }
-
-inline void Set_UInt32( sal_uInt8 *& p, sal_uInt32 n )
- { UInt32ToSVBT32( n, *(SVBT32*)p ); p+= 4; }
-
-
-#if defined OSL_BIGENDIAN || SAL_TYPES_ALIGNMENT4 > 2 || defined UNX
-#define __WW8_NEEDS_COPY
-#else
-#if defined WNT || defined OS2
-#define __WW8_NEEDS_PACK
-#pragma pack(2)
-#endif
-#endif
-
-typedef sal_Int16 WW8_PN;
-typedef sal_Int32 WW8_FC;
-typedef sal_Int32 WW8_CP;
-
-// STD: STyle Definition
-// The STD contains the entire definition of a style.
-// It has two parts, a fixed-length base (cbSTDBase bytes long)
-// and a variable length remainder holding the name, and the upx and upe
-// arrays (a upx and upe for each type stored in the style, std.cupx)
-// Note that new fields can be added to the BASE of the STD without
-// invalidating the file format, because the STSHI contains the length
-// that is stored in the file. When reading STDs from an older version,
-// new fields will be zero.
-struct WW8_STD
-{
- // Base part of STD:
- sal_uInt16 sti : 12; // invariant style identifier
- sal_uInt16 fScratch : 1; // spare field for any temporary use,
- // always reset back to zero!
- sal_uInt16 fInvalHeight : 1; // PHEs of all text with this style are wrong
- sal_uInt16 fHasUpe : 1; // UPEs have been generated
- sal_uInt16 fMassCopy : 1; // std has been mass-copied; if unused at
- // save time, style should be deleted
- sal_uInt16 sgc : 4; // style type code
- sal_uInt16 istdBase : 12; // base style
- sal_uInt16 cupx : 4; // # of UPXs (and UPEs)
- sal_uInt16 istdNext : 12; // next style
- sal_uInt16 bchUpe; // offset to end of upx's, start of upe's
- //-------- jetzt neu:
- // ab Ver8 gibts zwei Felder mehr:
- sal_uInt16 fAutoRedef : 1; /* auto redefine style when appropriate */
- sal_uInt16 fHidden : 1; /* hidden from UI? */
- sal_uInt16 : 14; /* unused bits */
-
- // Variable length part of STD:
- // sal_uInt8 stzName[2]; /* sub-names are separated by chDelimStyle
- // char grupx[];
- // the UPEs are not stored on the file; they are a cache of the based-on
- // chain
- // char grupe[];
-};
-
-/*
- Basis zum Einlesen UND zum Arbeiten (wird jeweils unter
- schiedlich beerbt)
-*/
-struct WW8_FFN_BASE // Font Descriptor
-{
- // ab Ver6
- sal_uInt8 cbFfnM1; // 0x0 total length of FFN - 1.
-
- sal_uInt8 prg: 2; // 0x1:03 pitch request
- sal_uInt8 fTrueType : 1; // 0x1:04 when 1, font is a TrueType font
- // 0x1:08 reserved
- sal_uInt8 ff : 3; // 0x1:70 font family id
- // 0x1:80 reserved
-
- short wWeight; // 0x2 base weight of font
- sal_uInt8 chs; // 0x4 character set identifier
- sal_uInt8 ibszAlt; // 0x5 index into ffn.szFfn to the name of the alternate font
-};
-
-/*
- Hiermit arbeiten wir im Parser (und Dumper)
-*/
-struct WW8_FFN : public WW8_FFN_BASE
-{
- // ab Ver8 als Unicode
- UniString sFontname;// 0x6 bzw. 0x40 ab Ver8 zero terminated string that
- // records name of font.
- // Maximal size of szFfn is 65 characters.
- // Vorsicht: Dieses Array kann auch kleiner sein!!!
- // Possibly followed by a second sz which records the
- // name of an alternate font to use if the first named
- // font does not exist on this system.
-};
-
-
-
-struct WW8_BRCVer6 // alter Border Code
-{
- SVBT16 aBits1;
-// sal_uInt16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
- // a single line of border in units of 0.75 points
- // Must be nonzero when brcType is nonzero.
- // 6 == dotted, 7 == dashed.
-// sal_uInt16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
-// sal_uInt16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
-// sal_uInt16 ico : 5; // 07C0 color code (see chp.ico)
-// sal_uInt16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
- // Must be 0 when BRC is a substructure of the TC. Stored in points for Windows.
-};
-
-struct WW8_BRC : public WW8_BRCVer6 // Border Code
-{
- SVBT16 aBits2;
-// sal_uInt16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
- // a single line of border in units of 0.75 points
- // Must be nonzero when brcType is nonzero.
- // 6 == dotted, 7 == dashed.
-// sal_uInt16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
-// sal_uInt16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
-// sal_uInt16 ico : 5; // 07C0 color code (see chp.ico)
-// sal_uInt16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
- // Must be 0 when BRC is a substructure of the TC. Stored in points for Windows.
-};
-
-typedef WW8_BRC WW8_BRC5[5]; // 5 * Border Code
-
-#define WW8_TOP 0
-#define WW8_LEFT 1
-#define WW8_BOT 2
-#define WW8_RIGHT 3
-#define WW8_BETW 4
-
-
-
-
-
-struct WW8_BordersSO // fuer StarOffice-Border Code
-{
- sal_uInt16 Out;
- sal_uInt16 In;
- sal_uInt16 Dist;
-};
-
-
-/*
-// Linien-Defaults in Twips: fruehere Writer-Defaults,
-// siehe auch <editeng/boxitem.hxx>
-#define DEF_LINE_WIDTH_0 1
-#define DEF_LINE_WIDTH_1 20
-#define DEF_LINE_WIDTH_2 50
-#define DEF_LINE_WIDTH_3 80
-#define DEF_LINE_WIDTH_4 100
-
-#define DEF_MAX_LINE_WIDHT DEF_LINE_WIDTH_4
-#define DEF_MAX_LINE_DIST DEF_LINE_WIDTH_2
-
-#define DEF_DOUBLE_LINE0_OUT DEF_LINE_WIDTH_0
-#define DEF_DOUBLE_LINE0_IN DEF_LINE_WIDTH_0
-#define DEF_DOUBLE_LINE0_DIST DEF_LINE_WIDTH_1
-
-#define DEF_DOUBLE_LINE1_OUT DEF_LINE_WIDTH_1
-#define DEF_DOUBLE_LINE1_IN DEF_LINE_WIDTH_1
-#define DEF_DOUBLE_LINE1_DIST DEF_LINE_WIDTH_1
-
-#define DEF_DOUBLE_LINE2_OUT DEF_LINE_WIDTH_2
-#define DEF_DOUBLE_LINE2_IN DEF_LINE_WIDTH_2
-#define DEF_DOUBLE_LINE2_DIST DEF_LINE_WIDTH_2
-
-#define DEF_DOUBLE_LINE3_OUT DEF_LINE_WIDTH_2
-#define DEF_DOUBLE_LINE3_IN DEF_LINE_WIDTH_1
-#define DEF_DOUBLE_LINE3_DIST DEF_LINE_WIDTH_2
-
-#define DEF_DOUBLE_LINE4_OUT DEF_LINE_WIDTH_1
-#define DEF_DOUBLE_LINE4_IN DEF_LINE_WIDTH_2
-#define DEF_DOUBLE_LINE4_DIST DEF_LINE_WIDTH_1
-
-#define DEF_DOUBLE_LINE5_OUT DEF_LINE_WIDTH_3
-#define DEF_DOUBLE_LINE5_IN DEF_LINE_WIDTH_2
-#define DEF_DOUBLE_LINE5_DIST DEF_LINE_WIDTH_2
-
-#define DEF_DOUBLE_LINE6_OUT DEF_LINE_WIDTH_2
-#define DEF_DOUBLE_LINE6_IN DEF_LINE_WIDTH_3
-#define DEF_DOUBLE_LINE6_DIST DEF_LINE_WIDTH_2
-
-#define DEF_DOUBLE_LINE7_OUT DEF_LINE_WIDTH_0
-#define DEF_DOUBLE_LINE7_IN DEF_LINE_WIDTH_0
-#define DEF_DOUBLE_LINE7_DIST DEF_LINE_WIDTH_2
-
-#define DEF_DOUBLE_LINE8_OUT DEF_LINE_WIDTH_1
-#define DEF_DOUBLE_LINE8_IN DEF_LINE_WIDTH_0
-#define DEF_DOUBLE_LINE8_DIST DEF_LINE_WIDTH_2
-
-#define DEF_DOUBLE_LINE9_OUT DEF_LINE_WIDTH_2
-#define DEF_DOUBLE_LINE9_IN DEF_LINE_WIDTH_0
-#define DEF_DOUBLE_LINE9_DIST DEF_LINE_WIDTH_2
-
-#define DEF_DOUBLE_LINE10_OUT DEF_LINE_WIDTH_3
-#define DEF_DOUBLE_LINE10_IN DEF_LINE_WIDTH_0
-#define DEF_DOUBLE_LINE10_DIST DEF_LINE_WIDTH_2
-*/
-// Deklarationen gemaess BOXITEM.HXX
-#define WW8_DECL_LINETAB_ARRAY \
- static WW8_BordersSO __READONLY_DATA nLineTabVer8[] = \
- { \
-/* 0*/ { DEF_LINE_WIDTH_0, 0, 0 }, \
-/* 1*/ { DEF_LINE_WIDTH_1, 0, 0 }, \
-/* 2*/ { DEF_LINE_WIDTH_2, 0, 0 }, \
-/* 3*/ { DEF_LINE_WIDTH_3, 0, 0 }, \
-/* 4*/ { DEF_LINE_WIDTH_4, 0, 0 }, \
-/* 5*/ { DEF_DOUBLE_LINE0_OUT, DEF_DOUBLE_LINE0_IN, DEF_DOUBLE_LINE0_DIST },\
-/* 6*/ { DEF_DOUBLE_LINE1_OUT, DEF_DOUBLE_LINE1_IN, DEF_DOUBLE_LINE1_DIST },\
-/* 7*/ { DEF_DOUBLE_LINE2_OUT, DEF_DOUBLE_LINE2_IN, DEF_DOUBLE_LINE2_DIST },\
-/* 8*/ { DEF_DOUBLE_LINE3_OUT, DEF_DOUBLE_LINE3_IN, DEF_DOUBLE_LINE3_DIST },\
-/* 9*/ { DEF_DOUBLE_LINE4_OUT, DEF_DOUBLE_LINE4_IN, DEF_DOUBLE_LINE4_DIST },\
-/*10*/ { DEF_DOUBLE_LINE5_OUT, DEF_DOUBLE_LINE5_IN, DEF_DOUBLE_LINE5_DIST },\
-/*11*/ { DEF_DOUBLE_LINE6_OUT, DEF_DOUBLE_LINE6_IN, DEF_DOUBLE_LINE6_DIST },\
-/*12*/ { DEF_DOUBLE_LINE7_OUT, DEF_DOUBLE_LINE7_IN, DEF_DOUBLE_LINE7_DIST },\
-/*13*/ { DEF_DOUBLE_LINE8_OUT, DEF_DOUBLE_LINE8_IN, DEF_DOUBLE_LINE8_DIST },\
-/*14*/ { DEF_DOUBLE_LINE9_OUT, DEF_DOUBLE_LINE9_IN, DEF_DOUBLE_LINE9_DIST },\
-/*15*/ { DEF_DOUBLE_LINE10_OUT,DEF_DOUBLE_LINE10_IN,DEF_DOUBLE_LINE10_DIST} \
- };
-
-#define WW8_DECL_LINETAB_OFS_DOUBLE 5 // Beginn des DOUBLE_LINE Abschnitts in meiner Liste
-
-
-
-
-struct WW8_XCHAR // Hilfs-Konstrukt fuer WW8_DOPTYPOGRAPHY
-{
- sal_Char A;
- sal_Char B;
-};
-
-struct WW8_DOPTYPOGRAPHY
-{ /*
- Document Typography Info (DOPTYPOGRAPHY)
- These options are Far East only, and are accessible
- through the Typography tab of the Tools/Options dialog.
- */
-
-
-
- /* a c h t u n g : es duerfen keine solchen Bitfelder ueber einen eingelesenes Byte-Array
- gelegt werden!!
- stattdessen ist ein aBits1 darueber zu legen, das mit & auszulesen ist
- GRUND: Compiler auf Intel und Sparc sortieren die Bits unterschiedlich
- */
-
-
-
- short fKerningPunct : 1; // true if we're kerning punctuation
- short iJustification : 2; // Kinsoku method of justification:
- // 0 = always expand
- // 1 = compress punctuation
- // 2 = compress punctuation and kana.
- short iLevelOfKinsoku: 2; // Level of Kinsoku:
- // 0 = Level 1
- // 1 = Level 2
- // 2 = Custom
- short f2on1 : 1; // 2-page-on-1 feature is turned on.
- short :10; // reserved
- short cchFollowingPunct; // length of rgxchFPunct
- short cchLeadingPunct; // length of rgxchLPunct
-
- WW8_XCHAR rgxchFPunct[101]; // array of characters that should
- // never appear at the start of a line
- WW8_XCHAR rgxchLPunct[51]; // array of characters that should
- // never appear at the end of a line
-};
-
-struct WW8_DOGRID
-{
- short xaGrid; // x-coord of the upper left-hand corner of the grid
- short yaGrid; // y-coord of the upper left-hand corner of the grid
- short dxaGrid; // width of each grid square
- short dyaGrid; // height of each grid square
-
-
-
- /* a c h t u n g : es duerfen keine solchen Bitfelder ueber einen eingelesenes Byte-Array
- gelegt werden!!
- stattdessen ist ein aBits1 darueber zu legen, das mit & auszulesen ist
- GRUND: Compiler auf Intel und Sparc sortieren die Bits unterschiedlich
- */
-
-
-
- short dyGridDisplay:7; // the number of grid squares (in the y direction)
- // between each gridline drawn on the screen. 0 means
- // don't display any gridlines in the y direction.
- short fTurnItOff :1; // suppress display of gridlines
- short dxGridDisplay:7; // the number of grid squares (in the x direction)
- // between each gridline drawn on the screen. 0 means
- // don't display any gridlines in the y direction.
- short fFollowMargins:1; // if true, the grid will start at the left and top
- // margins and ignore xaGrid and yaGrid.
-};
-
-struct WW8_PIC
-{
- sal_Int32 lcb; // 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file.
- sal_uInt16 cbHeader; // 0x4 number of bytes in the PIC (to allow for future expansion).
- struct {
- sal_Int16 mm; // 0x6 int
- sal_Int16 xExt; // 0x8 int
- sal_Int16 yExt; // 0xa int
- sal_Int16 hMF; // 0xc int
- }MFP;
-// sal_uInt8 bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
- sal_uInt8 rcWinMF[14]; // 0xe rc (rectangle - 8 bytes) rect for window origin
- // and extents when metafile is stored -- ignored if 0
- sal_Int16 dxaGoal; // 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
- sal_Int16 dyaGoal; // 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
- sal_uInt16 mx; // 0x20 horizontal scaling factor supplied by user in .1% units.
- sal_uInt16 my; // 0x22 vertical scaling factor supplied by user in .1% units.
- sal_Int16 dxaCropLeft; // 0x24 the amount the picture has been cropped on the left in twips.
- sal_Int16 dyaCropTop; // 0x26 the amount the picture has been cropped on the top in twips.
- sal_Int16 dxaCropRight; // 0x28 the amount the picture has been cropped on the right in twips.
- sal_Int16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
- sal_Int16 brcl : 4; // 000F Obsolete, superseded by brcTop, etc. In
- sal_Int16 fFrameEmpty : 1; // 0010 picture consists of a single frame
- sal_Int16 fBitmap : 1; // 0020 ==1, when picture is just a bitmap
- sal_Int16 fDrawHatch : 1; // 0040 ==1, when picture is an active OLE object
- sal_Int16 fError : 1; // 0080 ==1, when picture is just an error message
- sal_Int16 bpp : 8; // FF00 bits per pixel, 0 = unknown
- WW8_BRC rgbrc[4];
-// BRC brcTop; // 0x2e specification for border above picture
-// BRC brcLeft; // 0x30 specification for border to the left
-// BRC brcBottom; // 0x32 specification for border below picture
-// BRC brcRight; // 0x34 specification for border to the right
- sal_Int16 dxaOrigin; // 0x36 horizontal offset of hand annotation origin
- sal_Int16 dyaOrigin; // 0x38 vertical offset of hand annotation origin
-// sal_uInt8 rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
-};
-
-struct WW8_PIC_SHADOW
-{
- SVBT32 lcb; // 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file.
- SVBT16 cbHeader; // 0x4 number of bytes in the PIC (to allow for future expansion).
- struct {
- SVBT16 mm; // 0x6 int
- SVBT16 xExt; // 0x8 int
- SVBT16 yExt; // 0xa int
- SVBT16 hMF; // 0xc int
- }MFP;
-// SVBT8 bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
- SVBT8 rcWinMF[14]; // 0xe rc (rectangle - 8 bytes) rect for window origin
- // and extents when metafile is stored -- ignored if 0
- SVBT16 dxaGoal; // 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
- SVBT16 dyaGoal; // 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
- SVBT16 mx; // 0x20 horizontal scaling factor supplied by user in .1% units.
- SVBT16 my; // 0x22 vertical scaling factor supplied by user in .1% units.
- SVBT16 dxaCropLeft; // 0x24 the amount the picture has been cropped on the left in twips.
- SVBT16 dyaCropTop; // 0x26 the amount the picture has been cropped on the top in twips.
- SVBT16 dxaCropRight; // 0x28 the amount the picture has been cropped on the right in twips.
- SVBT16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
- SVBT8 aBits1; //0x2c
- SVBT8 aBits2;
- WW8_BRC rgbrc[4];
-// BRC brcTop; // 0x2e specification for border above picture
-// BRC brcLeft; // 0x30 specification for border to the left
-// BRC brcBottom; // 0x32 specification for border below picture
-// BRC brcRight; // 0x34 specification for border to the right
- SVBT16 dxaOrigin; // 0x36 horizontal offset of hand annotation origin
- SVBT16 dyaOrigin; // 0x38 vertical offset of hand annotation origin
-// SVBT8 rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
-};
-
-
-struct WW8_TBD
-{
- SVBT8 aBits1;
-// sal_uInt8 jc : 3; // 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
-// sal_uInt8 tlc : 3; // 0x38 tab leader code: 0=no leader, 1=dotted leader,
- // 2=hyphenated leader, 3=single line leader, 4=heavy line leader
-// * int :2 C0 reserved
-};
-
-struct WW8_TCell // hiermit wird weitergearbeitet (entspricht weitestgehend dem Ver8-Format)
-{
- sal_Bool bFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
- sal_Bool bMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell.
- sal_Bool bVertical : 1;// set to 1 when cell has vertical text flow
- sal_Bool bBackward : 1;// for a vertical table cell, text flow is bottom to top when 1 and is bottom to top when 0.
- sal_Bool bRotateFont : 1;// set to 1 when cell has rotated characters (i.e. uses @font)
- sal_Bool bVertMerge : 1;// set to 1 when cell is vertically merged with the cell(s) above and/or below. When cells are vertically merged, the display area of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell (the cell with fVertRestart set to 1), and all other vertically merged cells (those with fVertRestart set to 0) must be empty. Cells can only be merged vertically if their left and right boundaries are (nearly) identical (i.e. if corresponding entries in rgdxaCenter of the table rows differ by at most 3).
- sal_Bool bVertRestart : 1;// set to 1 when the cell is the first of a set of vertically merged cells. The contents of a cell with fVertStart set to 1 are displayed in the consolidated area belonging to the entire set of vertically merged cells. Vertically merged cells with fVertRestart set to 0 must be empty.
- sal_uInt8 nVertAlign : 2;// specifies the alignment of the cell contents relative to text flow (e.g. in a cell with bottom to top text flow and bottom vertical alignment, the text is shifted horizontally to match the cell's right boundary):
- // 0 top
- // 1 center
- // 2 bottom
- sal_uInt16 fUnused : 7;// reserved - nicht loeschen: macht das sal_uInt16 voll !!
-
- WW8_BRC rgbrc[4]; // border codes
-//notational convenience for referring to brcTop, brcLeft, etc fields.
-// BRC brcTop; // specification of the top border of a table cell
-// BRC brcLeft; // specification of left border of table row
-// BRC brcBottom; // specification of bottom border of table row
-// BRC brcRight; // specification of right border of table row.
-};
-// cbTC (count of bytes of a TC) is 18(decimal), 12(hex).
-
-
-struct WW8_TCellVer6 // wird aus der Datei gelesen
-{
- SVBT8 aBits1Ver6;
- SVBT8 aBits2Ver6;
-// sal_uInt16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
-// sal_uInt16 fMerged : 1; // 0002 set to 1 when cell has been merged with preceding cell.
-// sal_uInt16 fUnused : 14; // FFFC reserved
- WW8_BRCVer6 rgbrcVer6[4];
-// notational convenience for referring to brcTop, brcLeft, etc fields:
-// BRC brcTop; // specification of the top border of a table cell
-// BRC brcLeft; // specification of left border of table row
-// BRC brcBottom; // specification of bottom border of table row
-// BRC brcRight; // specification of right border of table row.
-};
-// cbTC (count of bytes of a TC) is 10(decimal), A(hex).
-
-struct WW8_TCellVer8 // wird aus der Datei gelesen
-{
- SVBT16 aBits1Ver8; // Dokumentation siehe oben unter WW8_TCell
- SVBT16 aUnused; // reserve
- WW8_BRC rgbrcVer8[4]; // Dokumentation siehe oben unter WW8_TCell
-};
-// cbTC (count of bytes of a TC) is 20(decimal), 14(hex).
-
-
-struct WW8_SHD // struct SHD fehlt in der Beschreibung
-{
-private:
- sal_uInt16 aBits;
-// sal_uInt16 nFore : 5; // 0x001f ForegroundColor
-// sal_uInt16 nBack : 5; // 0x03e0 BackgroundColor
-// sal_uInt16 nStyle : 5; // 0x7c00 Percentage and Style
-// sal_uInt16 nDontKnow : 1; // 0x8000 ??? ab Ver8: ebenfalls fuer Style
-
-public:
- WW8_SHD(){ aBits = 0; }
-
- sal_uInt8 GetFore() const { return (sal_uInt8)( aBits & 0x1f); }
- sal_uInt8 GetBack() const { return (sal_uInt8)((aBits >> 5 ) & 0x1f); }
- sal_uInt8 GetStyle(sal_Bool bVer67) const { return (sal_uInt8)((aBits >> 10) & ( bVer67?0x1f:0x3f ) ); }
-
- sal_uInt16 GetValue() const { return aBits; }
-
- void SetValue( sal_uInt16 nVal ){ aBits = nVal; }
- void SetWWValue( SVBT16 nVal ){ aBits = (sal_uInt16)SVBT16ToShort( nVal ); }
-
- void SetFore( sal_uInt8 nVal ){ aBits = (aBits & 0xffe0) | (nVal & 0x1f); }
- void SetBack( sal_uInt8 nVal ){ aBits = (aBits & 0xfc1f) | ((nVal & 0x1f)<<5); }
- void SetStyle( sal_Bool bVer67, sal_uInt8 nVal ){
- aBits = (aBits & ( bVer67?0x83ff:0x03ff ) )
- | ((nVal & ( bVer67?0x1f:0x2f ))<<10); }
-};
-
-
-struct WW8_ANLV
-{
- SVBT8 nfc; // 0 number format code, 0=Arabic, 1=Upper case Roman, 2=Lower case Roman
- // 3=Upper case Letter, 4=Lower case letter, 5=Ordinal
- SVBT8 cbTextBefore; // 1 offset into anld.rgch limit of prefix text
- SVBT8 cbTextAfter; // 2
- SVBT8 aBits1;
-// sal_uInt8 jc : 2; // 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify
-// sal_uInt8 fPrev : 1; // 0x04 when ==1, include previous levels
-// sal_uInt8 fHang : 1; // 0x08 when ==1, number will be displayed using a hanging indent
-// sal_uInt8 fSetBold : 1; // 0x10 when ==1, boldness of number will be determined by anld.fBold.
-// sal_uInt8 fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic
-// sal_uInt8 fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not.
-// sal_uInt8 fSetCaps : 1; // 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not
- SVBT8 aBits2;
-// sal_uInt8 fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not.
-// sal_uInt8 fSetKul : 1; // 0x02 when ==1, anld.kul will determine the underlining state of the autonumber.
-// sal_uInt8 fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character
-// sal_uInt8 fBold : 1; // 0x08 determines boldness of autonumber when anld.fSetBold == 1.
-// sal_uInt8 fItalic : 1; // 0x10 determines italicness of autonumber when anld.fSetItalic == 1.
-// sal_uInt8 fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1.
-// sal_uInt8 fCaps : 1; // 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1.
-// sal_uInt8 fStrike : 1; // 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1.
- SVBT8 aBits3;
-// sal_uInt8 kul : 3; // 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1.
-// sal_uInt8 ico : 5; // 0xF1 color of autonumber
- SVBT16 ftc; // 6 font code of autonumber
- SVBT16 hps; // 8 font half point size (or 0=auto)
- SVBT16 iStartAt; // 0x0a starting value (0 to 65535)
- SVBT16 dxaIndent; // 0x0c *short?* *sal_uInt16?* width of prefix text (same as indent)
- SVBT16 dxaSpace; // 0x0e minimum space between number and paragraph
-};
-// *cbANLV (count of bytes of ANLV) is 16 (decimal), 10(hex).
-
-struct WW8_ANLD
-{
- WW8_ANLV eAnlv; // 0
- SVBT8 fNumber1; // 0x10 number only 1 item per table cell
- SVBT8 fNumberAcross; // 0x11 number across cells in table rows(instead of down)
- SVBT8 fRestartHdn; // 0x12 restart heading number on section boundary
- SVBT8 fSpareX; // 0x13 unused( should be 0)
- sal_uInt8 rgchAnld[32]; // 0x14 characters displayed before/after autonumber
-};
-
-
-struct WW8_OLST
-{
- WW8_ANLV rganlv[9]; // 0 an array of 9 ANLV structures (heading levels)
- SVBT8 fRestartHdr; // 0x90 when ==1, restart heading on section break
- SVBT8 fSpareOlst2; // 0x91 reserved
- SVBT8 fSpareOlst3; // 0x92 reserved
- SVBT8 fSpareOlst4; // 0x93 reserved
- sal_uInt8 rgch[64]; // 0x94 array of 64 chars text before/after number
-};
-// cbOLST is 212(decimal), D4(hex).
-
-struct WW8_FDOA
-{
- SVBT32 fc; // 0 FC pointing to drawing object data
- SVBT16 ctxbx; // 4 count of textboxes in the drawing object
-};
-
-struct WW8_DO
-{
- SVBT16 dok; // 0 Drawn Object Kind, currently this is always 0
- SVBT16 cb; // 2 size (count of bytes) of the entire DO
- SVBT8 bx; // 4 x position relative to anchor CP
- SVBT8 by; // 5 y position relative to anchor CP
- SVBT16 dhgt; // 6 height of DO
- SVBT16 aBits1;
-// sal_uInt16 fAnchorLock : 1; // 8 1 if the DO anchor is locked
-// sal_uInt8[] rgdp; // 0xa variable length array of drawing primitives
-};
-
-struct WW8_DPHEAD
-{
- SVBT16 dpk; // 0 Drawn Primitive Kind REVIEW davebu
- // 0=start of grouping, 1=line, 2=textbox, 3=rectangle,
- // 4=arc, 5=elipse, 6=polyline, 7=callout textbox,
- // 8=end of grouping, 9=sample primitve holding default values
- SVBT16 cb; // 2 size (count of bytes) of this DP
- SVBT16 xa; // 4 These 2 points describe the rectangle
- SVBT16 ya; // 6 enclosing this DP relative to the origin of
- SVBT16 dxa; // 8 the DO
- SVBT16 dya; // 0xa
-};
-
-
-struct WW8_DP_LINETYPE
-{
- SVBT32 lnpc; // LiNe Property Color -- RGB color value
- SVBT16 lnpw; // line property weight in twips
- SVBT16 lnps; // line property style : 0=Solid, 1=Dashed
- // 2=Dotted, 3=Dash Dot, 4=Dash Dot Dot, 5=Hollow
-};
-
-struct WW8_DP_SHADOW // Schattierung!
-{
- SVBT16 shdwpi; // Shadow Property Intensity
- SVBT16 xaOffset; // x offset of shadow
- SVBT16 yaOffset; // y offset of shadow
-};
-
-struct WW8_DP_FILL
-{
- SVBT32 dlpcFg; // FiLl Property Color ForeGround -- RGB color value
- SVBT32 dlpcBg; // Property Color BackGround -- RGB color value
- SVBT16 flpp; // FiLl Property Pattern REVIEW davebu
-};
-
-struct WW8_DP_LINEEND
-{
- SVBT16 aStartBits;
-// sal_uInt16 eppsStart : 2; // Start EndPoint Property Style
- // 0=None, 1=Hollow, 2=Filled
-// sal_uInt16 eppwStart : 2; // Start EndPoint Property Weight
-// sal_uInt16 epplStart : 2; // Start EndPoint Property length
-// sal_uInt16 dummyStart : 10; // Alignment
- SVBT16 aEndBits;
-// sal_uInt16 eppsEnd : 2; // End EndPoint Property Style
-// sal_uInt16 eppwEnd : 2; // End EndPoint Property Weight
-// sal_uInt16 epplEnd : 2; // End EndPoint Property length
-// sal_uInt16 dummyEnd : 10; // Alignment
-};
-
-struct WW8_DP_LINE
-{
-// WW8_DPHEAD dphead; // 0 Common header for a drawing primitive
- SVBT16 xaStart; // starting point for line
- SVBT16 yaStart; //
- SVBT16 xaEnd; // ending point for line
- SVBT16 yaEnd;
- WW8_DP_LINETYPE aLnt;
- WW8_DP_LINEEND aEpp;
- WW8_DP_SHADOW aShd;
-};
-
-struct WW8_DP_TXTBOX
-{
- WW8_DP_LINETYPE aLnt;
- WW8_DP_FILL aFill;
- WW8_DP_SHADOW aShd;
- SVBT16 aBits1;
-// sal_uInt16 fRoundCorners : 1; //0x24 0001 1 if the textbox has rounded corners
-// sal_uInt16 zaShape : 15; // 0x24 000e REVIEW davebu
- SVBT16 dzaInternalMargin; // 0x26 REVIEW davebu
-};
-
-struct WW8_DP_RECT
-{
- WW8_DP_LINETYPE aLnt;
- WW8_DP_FILL aFill;
- WW8_DP_SHADOW aShd;
- SVBT16 aBits1;
-// sal_uInt16 fRoundCorners : 1; // 0x24 0001 1 if the textbox has rounded corners
-// sal_uInt16 zaShape : 15; // 0x24 000e REVIEW davebu
-};
-
-struct WW8_DP_ARC
-{
- WW8_DP_LINETYPE aLnt;
- WW8_DP_FILL aFill;
- WW8_DP_SHADOW aShd;
- SVBT8 fLeft; // 0x24 00ff REVIEW davebu
- SVBT8 fUp; // 0x24 ff00 REVIEW davebu
-// sal_uInt16 fLeft : 8; // 0x24 00ff REVIEW davebu
-// sal_uInt16 fUp : 8; // 0x24 ff00 REVIEW davebu
-};
-
-struct WW8_DP_ELIPSE
-{
- WW8_DP_LINETYPE aLnt;
- WW8_DP_FILL aFill;
- WW8_DP_SHADOW aShd;
-};
-
-struct WW8_DP_POLYLINE
-{
- WW8_DP_LINETYPE aLnt;
- WW8_DP_FILL aFill;
- WW8_DP_LINEEND aEpp;
- WW8_DP_SHADOW aShd;
- SVBT16 aBits1;
-// sal_uInt16 fPolygon : 1; // 0x28 0001 1 if this is a polygon
-// sal_uInt16 cpt : 15; // 0x28 00fe count of points
-// short xaFirst; // 0x2a These are the endpoints of the first line.
-// short yaFirst; // 0x2c
-// short xaEnd; // 0x2e
-// short yaEnd; // 0x30
-// short rgpta[]; // 0x32 An array of xa,ya pairs for the remaining points
-};
-
-struct WW8_DP_CALLOUT_TXTBOX
-{
- SVBT16 flags; // 0x0c REVIEW davebu flags
- SVBT16 dzaOffset; // 0x0e REVIEW davebu
- SVBT16 dzaDescent; // 0x10 REVIEW davebu
- SVBT16 dzaLength; // 0x12 REVIEW davebu
- WW8_DPHEAD dpheadTxbx; // 0x14 DPHEAD for a textbox
- WW8_DP_TXTBOX dptxbx; // 0x20 DP for a textbox
- WW8_DPHEAD dpheadPolyLine; // 0x4c DPHEAD for a Polyline
- WW8_DP_POLYLINE dpPolyLine; // 0x48 DP for a polyline
-};
-
-struct WW8_DP_DEFAULTS
-{
- WW8_DP_LINETYPE aLnt;
- WW8_DP_FILL aFill;
- WW8_DP_LINEEND aEpp;
- WW8_DP_SHADOW aShd;
- SVBT16 dzaOffset; // 0x2a REVIEW davebu
- SVBT16 dzaDescent; // 0x2c REVIEW davebu
- SVBT16 dzaLength; // 0x2e REVIEW davebu
-
- SVBT16 aBits3;
-// sal_uInt16 fRoundCorners : 1; // 0x30 0001 1 if the textbox has rounded corners
-// sal_uInt16 zaShape : 15; // 0x30 000fe REVIEW davebu
- SVBT16 dzaInternalMargin; // 0x32 REVIEW davebu
-};
-
-
-struct WW8_PCD
-{
- SVBT8 aBits1;
-// sal_uInt8 fNoParaLast : 1; // when 1, means that piece contains no end of paragraph marks.
-// sal_uInt8 fPaphNil : 1; // used internally by Word
-// sal_uInt8 fCopied : 1; // used internally by Word
-// * int :5
- SVBT8 aBits2; // fn int:8, used internally by Word
- SVBT32 fc; // file offset of beginning of piece. The size of the
- // ithpiece can be determined by subtracting rgcp[i] of
- // the containing plcfpcd from its rgcp[i+1].
- SVBT16 prm; // PRM contains either a single sprm or else an index number
- // of the grpprl which contains the sprms that modify the
- // properties of the piece.
-};
-
-struct WW8_PHE_Base
-{
- sal_uInt8 aBits1; //
-// 0 0 fSpare int :1 0001 reserved
-// fUnk int :1 0002 phe entry is invalid
-// when == 1
-// fDiffLines int :1 0004 when 1, total
-// height of paragraph is known but lines in
-// paragraph have different heights.
-// * int :5 00F8 reserved
- sal_uInt8 nlMac; // when fDiffLines is 0 is number of lines in
-// // paragraph
- SVBT16 dxaCol; // width of lines in paragraph
- SVBT16 dyl;
-// 4 4 dylLine int when fDiffLines is 0,
-// is height of every line in paragraph.in pixels
-// 4 4 dylHeight uns when fDiffLines is 1,
-// is the total height in pixels of the paragraph
-};
-
-/*
-eigentlich muessten wir das jetzt in etwa *so* praezisieren:
-
- struct WW8_PHE_Ver6 : public WW8_PHE_Base
- {
- // 6 Bytes gross
- };
- struct WW8_PHE_Ver6 : public WW8_PHE_Base
- {
- SVBT16 a;
- SVBT16 b;
- SVBT16 c; // 12 Byte gross
- };
-*/
-
-// AnnoTation Refernce Descriptor (ATRD)
-struct WW8_ATRD // fuer die 8-Version
-{
- SVBT16 xstUsrInitl[ 10 ]; // pascal-style String holding initials
- // of annotation author
- SVBT16 ibst; // index into GrpXstAtnOwners
- SVBT16 ak; // not used
- SVBT16 grfbmc; // not used
- SVBT32 ITagBkmk; // when not -1, this tag identifies the
- // annotation bookmark that locates the
- // range of CPs in the main document which
- // this annotation references.
-};
-
-struct WW67_ATRD // fuer die 6/7-Version
-{
- sal_Char xstUsrInitl[ 10 ]; // pascal-style String holding initials
- // of annotation author
- SVBT16 ibst; // index into GrpXstAtnOwners
- SVBT16 ak; // not used
- SVBT16 grfbmc; // not used
- SVBT32 ITagBkmk; // when not -1, this tag identifies the
- // annotation bookmark that locates the
- // range of CPs in the main document which
- // this annotation references.
-};
-
-
-#ifdef __WW8_NEEDS_PACK
-#pragma pack()
-#endif
-
-#endif
diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx
index 0a71b6620c5a..55de32d362b2 100644
--- a/sw/source/filter/ww8/escher.hxx
+++ b/sw/source/filter/ww8/escher.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,18 +26,14 @@
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
#ifndef _ESCHER_HXX
#define _ESCHER_HXX
-#ifndef _ESCHEREX_HXX
#include <filter/msfilter/escherex.hxx>
-#endif
const sal_uInt32 nInlineHack = 0x00010001;
class SwFrmFmt;
-// --> OD 2005-01-06 #i30669#
+// #i30669#
class SwFmtHoriOrient;
class SwFmtVertOrient;
// <--
@@ -50,7 +47,7 @@ public:
/** method to perform conversion of positioning attributes with the help
of corresponding layout information
- OD 2005-01-06 #i30669#
+ #i30669#
Because most of the Writer object positions doesn't correspond to the
object positions in WW8, this method converts the positioning
attributes. For this conversion the corresponding layout information
@@ -60,8 +57,6 @@ public:
object positions are already treated special in method <WriteData(..)>.
Usage of method: Used by method <SetAnchoring(..)>, nothing else
- @author OD
-
@param _iorHoriOri
input/output parameter - containing the current horizontal position
attributes, which are converted by this method.
@@ -186,4 +181,4 @@ private:
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/fields.cxx b/sw/source/filter/ww8/fields.cxx
index a44be9ab19b7..7b84c26f4c42 100644
--- a/sw/source/filter/ww8/fields.cxx
+++ b/sw/source/filter/ww8/fields.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,10 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include "fields.hxx"
-#include <errhdl.hxx> //ASSERT (use our own ww header later for asserts)
-
+#include <osl/diagnose.h>
+#include <sal/macros.h>
#include <stddef.h>
namespace ww
@@ -39,8 +39,7 @@ namespace ww
const char *GetEnglishFieldName(eField eIndex) throw()
{
//0 Signifies the field names I can't find.
- // --> OD 2005-06-08 #i43956#
- // field <eFOOTREF> = 5 should be mapped to "REF"
+ // #i43956# - field <eFOOTREF> = 5 should be mapped to "REF"
static const char *aFieldNames[] =
{
/* 0*/ 0,
@@ -142,11 +141,11 @@ namespace ww
};
size_t nIndex = static_cast<size_t>(eIndex);
- if (nIndex >= sizeof(aFieldNames) / sizeof(aFieldNames[0]))
+ if (nIndex >= SAL_N_ELEMENTS(aFieldNames))
eIndex = eNONE;
- ASSERT(eIndex != eNONE, "Unknown WinWord Field, let cmc know");
+ OSL_ENSURE(eIndex != eNONE, "Unknown WinWord Field, let cmc know");
return aFieldNames[eIndex];
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/fields.hxx b/sw/source/filter/ww8/fields.hxx
index 633da53c9d47..a491109c0b7d 100644
--- a/sw/source/filter/ww8/fields.hxx
+++ b/sw/source/filter/ww8/fields.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,7 +26,6 @@
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
/// @HTML
#ifndef WW_FIELDS_HXX
#define WW_FIELDS_HXX
@@ -154,4 +154,5 @@ namespace ww
}
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/hash_wrap.hxx b/sw/source/filter/ww8/hash_wrap.hxx
index 179ae8f6105b..5d665fb6eaa3 100644
--- a/sw/source/filter/ww8/hash_wrap.hxx
+++ b/sw/source/filter/ww8/hash_wrap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,18 +26,15 @@
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
-//this is a shameless rip from sortedarray.hxx but changed to hash_set
+//this is a shameless rip from sortedarray.hxx but changed to boost::unordered_set
#ifndef WW_HASH_WRAP_HXX
#define WW_HASH_WRAP_HXX
-#include <hash_set>
+#include <boost/unordered_set.hpp>
#include <tools/debug.hxx>
-#include <errhdl.hxx> // ASSERT()
-//simple wrapper around hash_set to behave like sorted array
+//simple wrapper around boost::unordered_set to behave like sorted array
namespace ww
{
/** simple template that manages a hash
@@ -45,10 +43,10 @@ namespace ww
@author
<a href="mailto:mikeleib@openoffice.org">Michael Leibowitz</a>
*/
- template<class C, class HashFcn = std::hash<C> > class WrappedHash
+ template<class C, class HashFcn = boost::hash<C> > class WrappedHash
{
private:
- std::hash_set<C, HashFcn> mHashSet;
+ boost::unordered_set<C, HashFcn> mHashSet;
//No copying
WrappedHash(const WrappedHash&);
@@ -57,7 +55,7 @@ namespace ww
//Find an entry, return its address if found and 0 if not
const C* search(C aSrch) const
{
- typename std::hash_set<C, HashFcn>::const_iterator it;
+ typename boost::unordered_set<C, HashFcn>::const_iterator it;
it= mHashSet.find(aSrch);
if (it != mHashSet.end())
return &(*it);
@@ -67,7 +65,7 @@ namespace ww
WrappedHash(const C *pWwSprmTab, const size_t nNoElems)
{
- ASSERT(nNoElems && pWwSprmTab, "WW8: empty Array: Don't do that");
+ OSL_ENSURE(nNoElems && pWwSprmTab, "WW8: empty Array: Don't do that");
const C *pIter = pWwSprmTab;
const C *pEnd = pWwSprmTab + nNoElems;
while (pIter < pEnd)
@@ -86,12 +84,12 @@ namespace ww
{
if (!bBroken)
{
- sError = rtl::OUString::createFromAscii(
+ sError = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"WW8: Duplicate in list, almost certainly don't "
"want that!\n"
"(You will not see this message again unless you "
"restart)\n"
- "Extra entries are...\n");
+ "Extra entries are...\n"));
bBroken=true;
}
@@ -121,4 +119,4 @@ namespace ww
}
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/needed_cast.hxx b/sw/source/filter/ww8/needed_cast.hxx
index f240374883b5..d2d6af415b97 100644
--- a/sw/source/filter/ww8/needed_cast.hxx
+++ b/sw/source/filter/ww8/needed_cast.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,12 +26,11 @@
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#ifndef WW_NEEDED_CAST_HXX
#define WW_NEEDED_CAST_HXX
#include <tools/debug.hxx>
-# include "staticassert.hxx"
+#include "staticassert.hxx"
namespace ww
{
@@ -60,4 +60,5 @@ namespace ww
}
}
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 1653b7e6ace7..4b7c86925779 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -175,8 +176,24 @@ static OString OutTBLBorderLine(RtfExport &rExport, const SvxBorderLine* pLine,
else
{
// single line
- if( DEF_LINE_WIDTH_1 >= pLine->GetOutWidth() )
- aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRS OOO_STRING_SVTOOLS_RTF_BRDRW).append((sal_Int32)pLine->GetOutWidth());
+ 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( ) )
+ {
+ case DOTTED:
+ aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDOT);
+ break;
+ case DASHED:
+ aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDASH);
+ break;
+ case SOLID:
+ default:
+ aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRS);
+ }
+ aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW).append((sal_Int32)pLine->GetOutWidth());
+ }
else
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTH OOO_STRING_SVTOOLS_RTF_BRDRW).append((sal_Int32)pLine->GetOutWidth() / 2);
}
@@ -438,7 +455,7 @@ void RtfAttributeOutput::RawText( const String& rText, bool /*bForceUnicode*/, r
m_aRunText.append(m_rExport.OutString(rText, eCharSet));
}
-void RtfAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, const SwFmtRuby& /*rRuby*/ )
+void RtfAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, xub_StrLen /*nPos*/, const SwFmtRuby& /*rRuby*/ )
{
OSL_TRACE("TODO: %s", OSL_THIS_FUNC);
}
@@ -567,8 +584,8 @@ void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
if ( !m_pTableWrt )
InitTableHelper( pTableTextNodeInfoInner );
- const SwTableBox *pTblBox = pTableTextNodeInfoInner->getTableBox( );
- SwFrmFmt *pFmt = pTblBox->GetFrmFmt( );
+ const SwTable *pTbl = pTableTextNodeInfoInner->getTable();
+ SwFrmFmt *pFmt = pTbl->GetFrmFmt( );
m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_TROWD);
TableOrientation( pTableTextNodeInfoInner );
@@ -608,6 +625,19 @@ void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
Point aPt;
SwRect aRect( pFmt->FindLayoutRect( false, &aPt ));
SwTwips nPageSize = aRect.Width();
+
+ // Handle the page size when not rendered
+ if( 0 == nPageSize )
+ {
+ const SwNode* pNode = pTableTextNodeInfoInner->getNode();
+ const SwFrmFmt* pFrmFmt = GetExport().mpParentFrame ? &GetExport().mpParentFrame->GetFrmFmt() :
+ const_cast<const SwDoc *>(GetExport().pDoc)
+ ->GetPageDesc(0).GetPageFmtOfNode(*pNode, false);
+
+ const SvxLRSpaceItem& rLR = pFrmFmt->GetLRSpace();
+ nPageSize = pFrmFmt->GetFrmSize().GetWidth() -
+ rLR.GetLeft() - rLR.GetRight();
+ }
SwTwips nTblSz = pFmt->GetFrmSize().GetWidth();
for( sal_uInt16 i = 0; i < pRow->GetCells().Count(); i++ )
{
@@ -956,7 +986,7 @@ void RtfAttributeOutput::EndTableRow( )
m_aAfterRuns.append(m_aTables.back());
m_aTables.pop_back();
}
- m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_ROW);
+ m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_ROW).append(OOO_STRING_SVTOOLS_RTF_PARD);
}
}
@@ -1030,7 +1060,8 @@ void RtfAttributeOutput::DefaultStyle( sal_uInt16 /*nStyle*/ )
}
void RtfAttributeOutput::StartStyle( const String& rName, bool bPapFmt,
- sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId )
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId,
+ bool /* bAutoUpdate */ )
{
OSL_TRACE("%s, rName = '%s'", OSL_THIS_FUNC,
OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ).getStr());
@@ -1063,7 +1094,7 @@ void RtfAttributeOutput::EndStyle()
m_rExport.InsStyle(m_nStyleId, aStyles);
m_aStylesheet.append(aStyles);
m_aStylesheet.append(' ');
- m_aStylesheet.append(OUStringToOString( OUString( m_rStyleName ), m_rExport.eCurrentEncoding ));
+ m_aStylesheet.append(m_rExport.OutString(m_rStyleName, m_rExport.eCurrentEncoding));
m_aStylesheet.append(";}");
m_aStylesheet.append(m_rExport.sNewLine);
}
@@ -1495,7 +1526,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
}
if ( pGrfNode )
- FlyFrameGraphic( dynamic_cast<const SwFlyFrmFmt*>( &rFrame.GetFrmFmt() ), *pGrfNode, rFrame.GetLayoutSize() );
+ FlyFrameGraphic( dynamic_cast<const SwFlyFrmFmt*>( &rFrame.GetFrmFmt() ), *pGrfNode );
break;
case sw::Frame::eDrawing:
{
@@ -1549,7 +1580,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
uno::Reference<beans::XPropertySet> xPropSet(xControlModel, uno::UNO_QUERY);
uno::Reference<beans::XPropertySetInfo> xPropSetInfo = xPropSet->getPropertySetInfo();
OUString sName;
- if (xInfo->supportsService(C2U("com.sun.star.form.component.CheckBox")))
+ if (xInfo->supportsService(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.CheckBox"))))
{
m_aRun.append(OUStringToOString(OUString(FieldString(ww::eFORMCHECKBOX)), m_rExport.eCurrentEncoding));
@@ -1559,7 +1590,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFHPS "20");
OUString aStr;
- sName = C2U("Name");
+ sName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"));
if (xPropSetInfo->hasPropertyByName(sName))
{
xPropSet->getPropertyValue(sName) >>= aStr;
@@ -1568,7 +1599,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_aRun.append('}');
}
- sName = C2U("HelpText");
+ sName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpText"));
if (xPropSetInfo->hasPropertyByName(sName))
{
xPropSet->getPropertyValue(sName) >>= aStr;
@@ -1578,7 +1609,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_aRun.append('}');
}
- sName = C2U("HelpF1Text");
+ sName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpF1Text"));
if (xPropSetInfo->hasPropertyByName(sName))
{
xPropSet->getPropertyValue(sName) >>= aStr;
@@ -1589,10 +1620,10 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
}
sal_Int16 nTemp = 0;
- xPropSet->getPropertyValue(C2U("DefaultState")) >>= nTemp;
+ xPropSet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultState"))) >>= nTemp;
m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFDEFRES);
m_aRun.append((sal_Int32)nTemp);
- xPropSet->getPropertyValue(C2U("State")) >>= nTemp;
+ xPropSet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("State"))) >>= nTemp;
m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFRES);
m_aRun.append((sal_Int32)nTemp);
@@ -1601,7 +1632,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
// field result is empty, ffres already contains the form result
m_aRun.append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " ");
}
- else if (xInfo->supportsService(C2U("com.sun.star.form.component.TextField")))
+ else if (xInfo->supportsService(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.TextField"))))
{
OStringBuffer aBuf;
OString aStr;
@@ -1611,12 +1642,12 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_aRun.append(OUStringToOString(OUString(FieldString(ww::eFORMTEXT)), m_rExport.eCurrentEncoding));
m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_DATAFIELD " ");
for (int i = 0; i < 8; i++) aBuf.append((sal_Char)0x00);
- xPropSet->getPropertyValue(C2U("Name")) >>= aTmp;
+ xPropSet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"))) >>= aTmp;
aStr = OUStringToOString(aTmp, m_rExport.eCurrentEncoding);
aBuf.append((sal_Char)aStr.getLength());
aBuf.append(aStr);
aBuf.append((sal_Char)0x00);
- xPropSet->getPropertyValue(C2U("DefaultText")) >>= aTmp;
+ xPropSet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultText"))) >>= aTmp;
aStr = OUStringToOString(aTmp, m_rExport.eCurrentEncoding);
aBuf.append((sal_Char)aStr.getLength());
aBuf.append(aStr);
@@ -1627,11 +1658,11 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_aRun.append(m_rExport.OutHex(*pStr, 2));
m_aRun.append('}');
m_aRun.append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " ");
- xPropSet->getPropertyValue(C2U("Text")) >>= aTmp;
+ xPropSet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Text"))) >>= aTmp;
m_aRun.append(OUStringToOString(aTmp, m_rExport.eCurrentEncoding));
m_aRun.append('}');
m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FORMFIELD "{");
- sName = C2U("HelpText");
+ sName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpText"));
if (xPropSetInfo->hasPropertyByName(sName))
{
xPropSet->getPropertyValue(sName) >>= aTmp;
@@ -1641,7 +1672,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_aRun.append('}');
}
- sName = C2U("HelpF1Text");
+ sName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpF1Text"));
if (xPropSetInfo->hasPropertyByName(sName))
{
xPropSet->getPropertyValue(sName) >>= aTmp;
@@ -1652,7 +1683,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
}
m_aRun.append("}");
}
- else if (xInfo->supportsService(C2U("com.sun.star.form.component.ListBox")))
+ else if (xInfo->supportsService(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.ListBox"))))
{
OUString aStr;
uno::Sequence<sal_Int16> aIntSeq;
@@ -1663,7 +1694,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFTYPE "2"); // 2 = list
m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFHASLISTBOX);
- xPropSet->getPropertyValue(C2U("DefaultSelection")) >>= aIntSeq;
+ xPropSet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultSelection"))) >>= aIntSeq;
if( aIntSeq.getLength() )
{
m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFDEFRES);
@@ -1671,7 +1702,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_aRun.append((sal_Int32)aIntSeq[0]);
}
- xPropSet->getPropertyValue(C2U("SelectedItems")) >>= aIntSeq;
+ xPropSet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SelectedItems"))) >>= aIntSeq;
if( aIntSeq.getLength() )
{
m_aRun.append(OOO_STRING_SVTOOLS_RTF_FFRES);
@@ -1679,7 +1710,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_aRun.append((sal_Int32)aIntSeq[0]);
}
- sName = C2U("Name");
+ sName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"));
if (xPropSetInfo->hasPropertyByName(sName))
{
xPropSet->getPropertyValue(sName) >>= aStr;
@@ -1688,7 +1719,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_aRun.append('}');
}
- sName = C2U("HelpText");
+ sName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpText"));
if (xPropSetInfo->hasPropertyByName(sName))
{
xPropSet->getPropertyValue(sName) >>= aStr;
@@ -1698,7 +1729,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_aRun.append('}');
}
- sName = C2U("HelpF1Text");
+ sName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpF1Text"));
if (xPropSetInfo->hasPropertyByName(sName))
{
xPropSet->getPropertyValue(sName) >>= aStr;
@@ -1709,7 +1740,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
}
- xPropSet->getPropertyValue(C2U("StringItemList")) >>= aStrSeq;
+ xPropSet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StringItemList"))) >>= aStrSeq;
sal_uInt32 nListItems = aStrSeq.getLength();
for (sal_uInt32 i = 0; i < nListItems; i++)
m_aRun.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFL " ")
@@ -2433,15 +2464,10 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
const SwNumRule* pRule = pTxtNd->GetNumRule();
- // --> OD 2008-03-18 #refactorlists#
- // if( pRule && MAXLEVEL > pTxtNd->GetActualListLevel() )
if( pRule && pTxtNd->IsInList() )
- // <--
{
- // --> OD 2008-03-18 #refactorlists#
- ASSERT( pTxtNd->GetActualListLevel() >= 0 && pTxtNd->GetActualListLevel() < MAXLEVEL,
+ OSL_ENSURE( pTxtNd->GetActualListLevel() >= 0 && pTxtNd->GetActualListLevel() < MAXLEVEL,
"<SwRTFWriter::OutListNum(..)> - text node does not have valid list level. Serious defect -> please inform OD" );
- // <--
const bool bExportNumRule = USHRT_MAX != nNumId;
const SwNumFmt* pFmt = pRule->GetNumFmt( nLvl );
@@ -2522,13 +2548,7 @@ void RtfAttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
case RES_PARATR_SCRIPTSPACE:
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ASPALPHA);
break;
- /* Is this needed?
- case RES_PARATR_HANGINGPUNCTUATION:
- m_aStyles.append(OOO_STRING_SVTOOLS_RTF_NOOVERFLOW);
- break;
- case RES_PARATR_FORBIDDEN_RULES:
- m_aStyles.append(OOO_STRING_SVTOOLS_RTF_NOCWRAP);
- break;*/
+
default:
break;
}
@@ -2545,7 +2565,7 @@ void RtfAttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign )
case SvxParaVertAlignItem::BOTTOM: pStr = OOO_STRING_SVTOOLS_RTF_FAVAR; break;
case SvxParaVertAlignItem::CENTER: pStr = OOO_STRING_SVTOOLS_RTF_FACENTER; break;
case SvxParaVertAlignItem::BASELINE: pStr = OOO_STRING_SVTOOLS_RTF_FAROMAN; break;
- // default == SvxParaVertAlignItem::AUTOMATIC
+
default: pStr = OOO_STRING_SVTOOLS_RTF_FAAUTO; break;
}
m_aStyles.append(pStr);
@@ -2643,8 +2663,7 @@ void RtfAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace )
{
if( m_rExport.bOutPageDescs )
{
-
- ASSERT( m_rExport.GetCurItemSet(), "Impossible" );
+ OSL_ENSURE( m_rExport.GetCurItemSet(), "Impossible" );
if ( !m_rExport.GetCurItemSet() )
return;
@@ -2819,7 +2838,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
- static sal_uInt16 __READONLY_DATA aBorders[] = {
+ static sal_uInt16 aBorders[] = {
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT };
static const sal_Char* aBorderNames[] = {
OOO_STRING_SVTOOLS_RTF_BRDRT, OOO_STRING_SVTOOLS_RTF_BRDRL, OOO_STRING_SVTOOLS_RTF_BRDRB, OOO_STRING_SVTOOLS_RTF_BRDRR };
@@ -2988,6 +3007,7 @@ bool RtfAttributeOutput::DropdownField( const SwField* /*pFld*/ )
RtfAttributeOutput::RtfAttributeOutput( RtfExport &rExport )
: m_rExport( rExport ),
+ m_bStrikeDouble( false ),
m_pTableWrt( NULL ),
m_bTableCellOpen( false ),
m_nTableDepth( 0 ),
@@ -3209,8 +3229,7 @@ static OString ExportPICT( const SwFlyFrmFmt* pFlyFrmFmt, const Size &rOrig, con
long nXCroppedSize = rOrig.Width()-(rCr.GetLeft() + rCr.GetRight());
long nYCroppedSize = rOrig.Height()-(rCr.GetTop() + rCr.GetBottom());
- /* #127543#: Graphic with a zero height or width, typically copied from webpages, caused
- crashes. */
+ /* Graphic with a zero height or width, typically copied from webpages, caused crashes. */
if( !nXCroppedSize )
nXCroppedSize = 100;
if( !nYCroppedSize )
@@ -3339,7 +3358,7 @@ void RtfAttributeOutput::FlyFrameOLE( const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode&
m_aRunText.append("}}}}");
}
-void RtfAttributeOutput::FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode& rGrfNode, const Size& rSize )
+void RtfAttributeOutput::FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode& rGrfNode)
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -3398,8 +3417,12 @@ 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();
+ aRendered.Width() = rS.GetWidth();
+ aRendered.Height() = rS.GetHeight();
+ }
/*
If the graphic is not of type WMF then we will have to store two
@@ -3444,4 +3467,4 @@ void RtfAttributeOutput::FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const S
m_aRunText.append(m_rExport.sNewLine);
}
-/* vi:set shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index 91c0db7568f4..fcf43b765543 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,6 +33,7 @@
#include <set>
#include "attributeoutputbase.hxx"
#include "fields.hxx"
+#include "rtfexport.hxx"
#include <vcl/vclenum.hxx>
@@ -40,13 +42,13 @@
#include <vector>
-class RtfExport;
class SwGrfNode;
class SwOLENode;
class SdrObject;
class SwFlyFrmFmt;
+/// The class that has handlers for various resource types when exporting as RTF
class RtfAttributeOutput : public AttributeOutputBase
{
public:
@@ -91,7 +93,7 @@ public:
virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet );
/// Output ruby start.
- virtual void StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby );
+ virtual void StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, const SwFmtRuby& rRuby );
/// Output ruby end.
virtual void EndRuby();
@@ -115,31 +117,18 @@ public:
virtual void ParagraphStyle( sal_uInt16 nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo );
-
virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner );
-
virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableRowEnd( sal_uInt32 nDepth );
/// Start of the styles table.
@@ -153,7 +142,8 @@ public:
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId );
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
+ bool bAutoUpdate );
/// End of a style in the styles table.
virtual void EndStyle();
@@ -430,28 +420,20 @@ protected:
private:
/// Output graphic fly frames.
- void FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode& rGrfNode, const Size& rSize );
+ void FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode& rGrfNode );
void FlyFrameOLE( const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode& rOLENode, const Size& rSize );
void FlyFrameOLEData( SwOLENode& rOLENode );
/*
* Table methods.
*/
-
void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void EndTableCell( );
-
void EndTableRow( );
-
void EndTable();
/// End cell, row, and even the entire table if necessary.
@@ -587,4 +569,4 @@ public:
#endif // _RTFATTRIBUTEOUTPUT_HXX_
-/* vi:set shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 357a7aff1e57..17dc1c03bb2f 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,6 +30,7 @@
#include "rtfexport.hxx"
#include "rtfexportfilter.hxx"
#include "rtfsdrexport.hxx"
+#include "rtfattributeoutput.hxx"
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
@@ -96,7 +98,7 @@ using sw::mark::IMark;
#if defined(UNX)
const sal_Char RtfExport::sNewLine = '\012';
#else
-const sal_Char __FAR_DATA RtfExport::sNewLine[] = "\015\012";
+const sal_Char RtfExport::sNewLine[] = "\015\012";
#endif
// the default text encoding for the export, if it doesn't fit unicode will
@@ -480,6 +482,10 @@ void RtfExport::WritePageDescTable()
}
Strm() << '}' << sNewLine;
bOutPageDescs = sal_False;
+
+ // reset table infos, otherwise the depth of the cells will be incorrect,
+ // in case the page style (header or footer) had tables
+ mpTableInfo = ww8::WW8TableInfo::Pointer_t(new ww8::WW8TableInfo());
}
void RtfExport::ExportDocument_Impl()
@@ -543,8 +549,7 @@ void RtfExport::ExportDocument_Impl()
// size and empty margins of the page
if( pDoc->GetPageDescCnt() )
{
- //JP 06.04.99: Bug 64361 - Seeking the first SwFmtPageDesc. If
- // no set, the default is valid
+ // Seeking the first SwFmtPageDesc. If no set, the default is valid
const SwFmtPageDesc* pSttPgDsc = 0;
{
const SwNode& rSttNd = *pDoc->GetNodes()[
@@ -645,7 +650,6 @@ void RtfExport::ExportDocument_Impl()
{
case FTNNUM_PAGE: pOut = OOO_STRING_SVTOOLS_RTF_FTNRSTPG; break;
case FTNNUM_DOC: pOut = OOO_STRING_SVTOOLS_RTF_FTNRSTCONT; break;
- // case FTNNUM_CHAPTER:
default: pOut = OOO_STRING_SVTOOLS_RTF_FTNRESTART; break;
}
Strm() << pOut;
@@ -659,7 +663,6 @@ void RtfExport::ExportDocument_Impl()
case SVX_NUM_ROMAN_LOWER: pOut = OOO_STRING_SVTOOLS_RTF_FTNNRLC; break;
case SVX_NUM_ROMAN_UPPER: pOut = OOO_STRING_SVTOOLS_RTF_FTNNRUC; break;
case SVX_NUM_CHAR_SPECIAL: pOut = OOO_STRING_SVTOOLS_RTF_FTNNCHI; break;
- // case SVX_NUM_ARABIC:
default: pOut = OOO_STRING_SVTOOLS_RTF_FTNNAR; break;
}
Strm() << pOut;
@@ -680,7 +683,6 @@ void RtfExport::ExportDocument_Impl()
case SVX_NUM_ROMAN_LOWER: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNRLC; break;
case SVX_NUM_ROMAN_UPPER: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNRUC; break;
case SVX_NUM_CHAR_SPECIAL: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNCHI; break;
- // case SVX_NUM_ARABIC:
default: pOut = OOO_STRING_SVTOOLS_RTF_AFTNNAR; break;
}
Strm() << pOut;
@@ -755,6 +757,17 @@ void RtfExport::OutputOLENode( const SwOLENode& )
/* noop, see RtfAttributeOutput::FlyFrameOLE */
}
+void RtfExport::OutputLinkedOLE( const rtl::OUString& )
+{
+ OSL_TRACE("%s", OSL_THIS_FUNC);
+}
+
+void RtfExport::OutputTextNode( const SwTxtNode& rNode )
+{
+ if ( !m_bOutOutlineOnly || rNode.IsOutline( ) )
+ MSWordExportBase::OutputTextNode( rNode );
+}
+
void RtfExport::AppendSection( const SwPageDesc* pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -763,13 +776,14 @@ void RtfExport::AppendSection( const SwPageDesc* pPageDesc, const SwSectionFmt*
AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() );
}
-RtfExport::RtfExport( RtfExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM *pOriginalPam, Writer* pWriter )
+RtfExport::RtfExport( RtfExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM *pOriginalPam, Writer* pWriter, bool bOutOutlineOnly )
: MSWordExportBase( pDocument, pCurrentPam, pOriginalPam ),
m_pFilter( pFilter ),
m_pWriter( pWriter ),
m_pAttrOutput( NULL ),
m_pSections( NULL ),
m_pSdrExport( NULL ),
+ m_bOutOutlineOnly( bOutOutlineOnly ),
eDefaultEncoding(
rtl_getTextEncodingFromWindowsCharset(
sw::ms::rtl_TextEncodingToWinCharset(DEF_ENCODING))),
@@ -845,7 +859,7 @@ OString RtfExport::OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEn
{
OStringBuffer aBuf;
const sal_Char* pStr = 0;
- // 0x0b instead of \n, etc because of the replacements in SwAttrIter::GetSnippet()
+ // 0x0b instead of \n, etc because of the replacements in SwWW8AttrIter::GetSnippet()
switch (c)
{
case 0x0b:
@@ -952,7 +966,7 @@ void RtfExport::OutDateTime(const sal_Char* pStr, const util::DateTime& rDT )
sal_uInt16 RtfExport::GetColor( const Color& rColor ) const
{
- for (RtfColorTbl::const_iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); it++ )
+ for (RtfColorTbl::const_iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); ++it )
if ((*it).second == rColor) {
OSL_TRACE("%s returning %d (%d,%d,%d)", OSL_THIS_FUNC, (*it).first, rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue());
return (*it).first;
@@ -964,9 +978,12 @@ sal_uInt16 RtfExport::GetColor( const Color& rColor ) const
void RtfExport::InsColor( const Color& rCol )
{
sal_uInt16 n;
- for (RtfColorTbl::iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); it++ )
+ bool bContainsAuto = false;
+ for (RtfColorTbl::iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); ++it )
if ((*it).second == rCol)
return; // Already in the table
+ else if ((*it).second == COL_AUTO)
+ bContainsAuto = true;
if (rCol.GetColor() == COL_AUTO)
n = 0;
else
@@ -976,6 +993,10 @@ void RtfExport::InsColor( const Color& rCol )
// gets overwritten by COL_AUTO
if (!n)
n++;
+
+ // Fix the case where the table doesn't contain the COL_AUTO at #0
+ else if (!bContainsAuto)
+ n++;
}
m_aColTbl.insert(std::pair<sal_uInt16,Color>( n, rCol ));
}
@@ -1059,7 +1080,7 @@ void RtfExport::OutColorTable()
{
InsColor( pBkgrd->GetColor() );
}
- }
+ }
}
// shadow color
@@ -1080,7 +1101,7 @@ void RtfExport::OutColorTable()
{
InsColor( pShadow->GetColor() );
}
- }
+ }
}
// frame border color
@@ -1094,7 +1115,7 @@ void RtfExport::OutColorTable()
{
if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem2( RES_BOX, n ) ))
InsColorLine( *pBox );
- }
+ }
}
for (size_t n = 0; n < m_aColTbl.size(); ++n)
@@ -1197,7 +1218,6 @@ void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, sal_Bool bWriteRes
AttrOutput().SectionPageNumbering(pAktPageDesc->GetNumType().GetNumberingType(), 0);
pAktPageDesc = pSave;
- //bOutPageDesc = bOldOut;
OSL_TRACE("%s end", OSL_THIS_FUNC);
}
@@ -1241,18 +1261,23 @@ void RtfExport::WriteHeaderFooter(const SwFrmFmt& rFmt, bool bHeader, const sal_
OSL_TRACE("%s end", OSL_THIS_FUNC);
}
+/// Glue class to call RtfExport as an internal filter, needed by copy&paste support.
class SwRTFWriter : public Writer
{
- public:
- SwRTFWriter( const String& rFilterName, const String& rBaseURL );
- virtual ~SwRTFWriter();
+ private:
+ bool bOutOutlineOnly;
+
+ public:
+ SwRTFWriter( const String& rFilterName, const String& rBaseURL );
+ virtual ~SwRTFWriter();
virtual sal_uLong WriteStream();
};
-SwRTFWriter::SwRTFWriter( const String& /*rFltName*/, const String & rBaseURL )
+SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
SetBaseURL( rBaseURL );
+ bOutOutlineOnly = 'O' == rFltName.GetChar( 0 );
}
SwRTFWriter::~SwRTFWriter()
@@ -1261,7 +1286,7 @@ SwRTFWriter::~SwRTFWriter()
sal_uLong SwRTFWriter::WriteStream()
{
OSL_TRACE("%s", OSL_THIS_FUNC);
- RtfExport aExport( NULL, pDoc, new SwPaM( *pCurPam->End(), *pCurPam->Start() ), pCurPam, this );
+ RtfExport aExport( NULL, pDoc, new SwPaM( *pCurPam->End(), *pCurPam->Start() ), pCurPam, this, bOutOutlineOnly );
aExport.ExportDocument( true );
return 0;
}
@@ -1272,4 +1297,4 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ExportRTF( const String& rFltName,
xRet = new SwRTFWriter( rFltName, rBaseURL );
}
-/* vi:set shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index e73cd9b822c5..60b6c347ae0c 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,6 @@
#define _RTFEXPORT_HXX_
#include <set>
-#include "rtfattributeoutput.hxx"
#include "wrtww8.hxx"
#include <rtl/ustring.hxx>
@@ -38,6 +38,7 @@
#include <cstdio>
#include <map>
+class RtfAttributeOutput;
class RtfExportFilter;
class RtfSdrExport;
typedef std::map<sal_uInt16,Color> RtfColorTbl;
@@ -70,6 +71,7 @@ class RtfExport : public MSWordExportBase
MSWordSections *m_pSections;
RtfSdrExport *m_pSdrExport;
+ bool m_bOutOutlineOnly;
public:
/// Access to the attribute output class.
@@ -81,8 +83,8 @@ public:
/// Access to the Rtf Sdr exporter.
virtual RtfSdrExport& SdrExporter() const;
- /// Hack, unfortunately necessary at some places for now.
- virtual bool HackIsWW8OrHigher() const { return false; }
+ /// Determines if the format is expected to support unicode.
+ virtual bool SupportsUnicode() const { return true; }
/// Guess the script (asian/western).
virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich );
@@ -137,18 +139,24 @@ protected:
/// Return value indicates if an inherited outline numbering is suppressed.
virtual bool DisallowInheritingOutlineNumbering(const SwFmt &rFmt);
+ /// Output SwTxtNode is depending on outline export mode
+ virtual void OutputTextNode( const SwTxtNode& );
+
/// Output SwGrfNode
virtual void OutputGrfNode( const SwGrfNode& );
/// Output SwOLENode
virtual void OutputOLENode( const SwOLENode& );
+ virtual void OutputLinkedOLE(const rtl::OUString&);
+
virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum );
public:
/// Pass the pDocument, pCurrentPam and pOriginalPam to the base class.
RtfExport( RtfExportFilter *pFilter, SwDoc *pDocument,
- SwPaM *pCurrentPam, SwPaM *pOriginalPam, Writer* pWriter );
+ SwPaM *pCurrentPam, SwPaM *pOriginalPam, Writer* pWriter,
+ bool bOutOutlineOnly = false );
/// Destructor.
virtual ~RtfExport();
@@ -156,7 +164,7 @@ public:
#if defined(UNX)
static const sal_Char sNewLine; // \012 or \015
#else
- static const sal_Char __FAR_DATA sNewLine[]; // \015\012
+ static const sal_Char sNewLine[]; // \015\012
#endif
rtl_TextEncoding eDefaultEncoding;
@@ -209,4 +217,5 @@ private:
};
#endif // _RTFEXPORT_HXX_
-/* vi:set shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx
index 31b298a06017..0aedd4add7f8 100644
--- a/sw/source/filter/ww8/rtfexportfilter.cxx
+++ b/sw/source/filter/ww8/rtfexportfilter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,8 +44,8 @@ using namespace ::comphelper;
using namespace ::com::sun::star;
using ::rtl::OUString;
-RtfExportFilter::RtfExportFilter( const uno::Reference< lang::XMultiServiceFactory >& xMSF) :
- m_xMSF( xMSF )
+RtfExportFilter::RtfExportFilter( const uno::Reference< uno::XComponentContext >& xCtx) :
+ m_xCtx( xCtx )
{
}
@@ -129,60 +130,9 @@ uno::Sequence< OUString > SAL_CALL RtfExport_getSupportedServiceNames() throw()
return aSeq;
}
-uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception )
+uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
{
- return (cppu::OWeakObject*) new RtfExportFilter( rSMgr );
+ return (cppu::OWeakObject*) new RtfExportFilter( xCtx );
}
-#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
-/* vi:set shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx
index d4595eab27b6..de7c94cf80ac 100644
--- a/sw/source/filter/ww8/rtfexportfilter.hxx
+++ b/sw/source/filter/ww8/rtfexportfilter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,7 @@
#include <tools/stream.hxx>
#include <shellio.hxx>
-// This is just here so that we don't have to copy&paste its string format methods
+/// Dummy Writer implementation to be able to use the string format methods of the base class
class RtfWriter : public Writer
{
protected:
@@ -51,11 +52,11 @@ class RtfExportFilter : public cppu::WeakImplHelper2
>
{
protected:
- ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xCtx;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xSrcDoc;
SvStream* m_pStream;
public:
- RtfExportFilter( const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF );
+ RtfExportFilter( const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xCtx );
virtual ~RtfExportFilter();
// XFilter
@@ -76,10 +77,11 @@ public:
throw();
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL RtfExport_createInstance(
const ::com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > &xMSF)
+ com::sun::star::uno::XComponentContext > &xCtx)
throw( ::com::sun::star::uno::Exception );
#define IMPL_NAME_RTFEXPORT "com.sun.star.comp.Writer.RtfExport"
#endif // _RTFEXPORTFILTER_HXX_
-/* vi:set shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfimportfilter.cxx b/sw/source/filter/ww8/rtfimportfilter.cxx
index d44a42db4fe3..980c96fd8974 100644
--- a/sw/source/filter/ww8/rtfimportfilter.cxx
+++ b/sw/source/filter/ww8/rtfimportfilter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,6 +41,7 @@
#include <unotools/ucbstreamhelper.hxx>
#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
using namespace ::comphelper;
@@ -47,8 +49,8 @@ using namespace ::com::sun::star;
using ::rtl::OUString;
using rtl::OUStringToOString;
-RtfImportFilter::RtfImportFilter( const uno::Reference< lang::XMultiServiceFactory >& xMSF) :
- m_xMSF( xMSF )
+RtfImportFilter::RtfImportFilter( const uno::Reference< uno::XComponentContext > &xCtx ) :
+ m_xCtx( xCtx )
{
}
@@ -129,9 +131,9 @@ uno::Sequence< OUString > SAL_CALL RtfImport_getSupportedServiceNames() throw()
return aSeq;
}
-uno::Reference< uno::XInterface > SAL_CALL RtfImport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception )
+uno::Reference< uno::XInterface > SAL_CALL RtfImport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
{
- return (cppu::OWeakObject*) new RtfImportFilter( rSMgr );
+ return (cppu::OWeakObject*) new RtfImportFilter( xCtx );
}
-/* vi:set shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfimportfilter.hxx b/sw/source/filter/ww8/rtfimportfilter.hxx
index 9026d6357397..9782dae31300 100644
--- a/sw/source/filter/ww8/rtfimportfilter.hxx
+++ b/sw/source/filter/ww8/rtfimportfilter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,10 +45,10 @@ class RtfImportFilter : public cppu::WeakImplHelper2
>
{
protected:
- ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xCtx;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xDstDoc;
public:
- RtfImportFilter( const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF );
+ RtfImportFilter( const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xCtx );
virtual ~RtfImportFilter();
// XFilter
@@ -66,10 +67,11 @@ public:
throw();
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL RtfImport_createInstance(
const ::com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > &xMSF)
+ com::sun::star::uno::XComponentContext > &xCtx)
throw( ::com::sun::star::uno::Exception );
#define IMPL_NAME_RTFIMPORT "com.sun.star.comp.Writer.RtfImport"
#endif // _RTFIMPORTFILTER_HXX_
-/* vi:set shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index f016cb0c46fc..99a166196d09 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,6 +30,7 @@
#include "rtfsdrexport.hxx"
#include "rtfexport.hxx"
#include "writerhelper.hxx"
+#include "rtfattributeoutput.hxx"
#include <com/sun/star/i18n/ScriptType.hdl>
#include <osl/diagnose.h>
@@ -473,7 +475,7 @@ sal_Int32 RtfSdrExport::StartShape()
// Ignore \shpbypage, \shpbymargin, and \shpbycolumn, in favor of the posrelh property.
m_rAttrOutput.RunText().append(OOO_STRING_SVTOOLS_RTF_SHPBYIGNORE);
- for(std::map<OString,OString>::reverse_iterator i = m_aShapeProps.rbegin(); i != m_aShapeProps.rend(); i++)
+ for(std::map<OString,OString>::reverse_iterator i = m_aShapeProps.rbegin(); i != m_aShapeProps.rend(); ++i)
lcl_AppendSP(m_rAttrOutput.RunText(), (*i).first, (*i).second );
lcl_AppendSP(m_rAttrOutput.RunText(), "wzDescription", RtfExport::OutString( m_pSdrObject->GetDescription(), m_rExport.eCurrentEncoding));
@@ -583,4 +585,4 @@ sal_uInt32 RtfSdrExport::AddSdrObject( const SdrObject& rObj )
return EscherEx::AddSdrObject(rObj);
}
-/* vi:set shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx
index ee161f8cde0d..f461357e5c61 100644
--- a/sw/source/filter/ww8/rtfsdrexport.hxx
+++ b/sw/source/filter/ww8/rtfsdrexport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,6 +39,7 @@
class RtfExport;
class RtfAttributeOutput;
+/// Handles export of drawings using RTF markup
class RtfSdrExport : public EscherEx
{
RtfExport &m_rExport;
@@ -112,4 +114,5 @@ private:
};
#endif // _RTFSdrEXPORT_HXX_
-/* vi:set shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/sortedarray.hxx b/sw/source/filter/ww8/sortedarray.hxx
index eaee2d209e26..a4d959ed1d74 100644
--- a/sw/source/filter/ww8/sortedarray.hxx
+++ b/sw/source/filter/ww8/sortedarray.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,13 +26,10 @@
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
#ifndef WW_SORTEDARRAY_HXX
#define WW_SORTEDARRAY_HXX
#include <algorithm>
-#include <errhdl.hxx> // ASSERT()
#include <tools/debug.hxx>
//simple template that manages a static [] array by sorting at construction
@@ -70,7 +68,7 @@ namespace ww
SortedArray(C *pWwSprmTab, size_t nNoElems)
: mpWwSprmTab(pWwSprmTab), mnNoElems(nNoElems)
{
- ASSERT(mnNoElems && pWwSprmTab, "WW8: empty Array: Don't do that");
+ OSL_ENSURE(mnNoElems && pWwSprmTab, "WW8: empty Array: Don't do that");
std::sort(mpWwSprmTab, mpWwSprmTab + mnNoElems);
#if OSL_DEBUG_LEVEL > 1
bool bBroken=false;
@@ -83,12 +81,12 @@ namespace ww
{
if (!bBroken)
{
- sError = rtl::OUString::createFromAscii(
+ sError = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"WW8: Duplicate in list, almost certainly don't "
"want that!\n"
"(You will not see this message again unless you "
"restart)\n"
- "Extra entries are...\n");
+ "Extra entries are...\n"));
bBroken=true;
}
@@ -118,4 +116,4 @@ namespace ww
}
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/staticassert.hxx b/sw/source/filter/ww8/staticassert.hxx
index 57edd277f6fe..3d1a3c2bceea 100644
--- a/sw/source/filter/ww8/staticassert.hxx
+++ b/sw/source/filter/ww8/staticassert.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,7 +26,6 @@
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#ifndef WW_STATICASSERT_HXX
#define WW_STATICASSERT_HXX
@@ -68,4 +68,5 @@ namespace ww
#endif
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/styles.cxx b/sw/source/filter/ww8/styles.cxx
index a0db7fd31a02..806ee13d9505 100644
--- a/sw/source/filter/ww8/styles.cxx
+++ b/sw/source/filter/ww8/styles.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include "../inc/wwstyles.hxx"
#include <functional> //std::unary_function
@@ -36,7 +36,7 @@
#include <tools/string.hxx> //do we have to...
#include <tools/debug.hxx>
-# include "staticassert.hxx" //StaticAssert
+#include "staticassert.hxx" //StaticAssert
namespace
{
@@ -147,7 +147,7 @@ namespace
"Plain Text"
};
- DBG_ASSERT( (sizeof(stiName) / sizeof(stiName[0])) == ww::stiMax, "WrongSizeOfArray" );
+ DBG_ASSERT( (SAL_N_ELEMENTS(stiName)) == ww::stiMax, "WrongSizeOfArray" );
return stiName;
}
@@ -215,4 +215,4 @@ namespace ww
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/tracer.cxx b/sw/source/filter/ww8/tracer.cxx
index 07d16eb78729..78b27197676f 100644
--- a/sw/source/filter/ww8/tracer.cxx
+++ b/sw/source/filter/ww8/tracer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <tools/urlobj.hxx> //INetURLObject
#include <sfx2/docfile.hxx> //SfxMedium
#include <filter/msfilter/msfiltertracer.hxx> //MSFilterTracer
@@ -206,4 +206,4 @@ namespace sw
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/tracer.hxx b/sw/source/filter/ww8/tracer.hxx
index 1cd7b16030be..df6d7c497108 100644
--- a/sw/source/filter/ww8/tracer.hxx
+++ b/sw/source/filter/ww8/tracer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,8 +26,6 @@
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
#ifndef SW_TRACER_HXX
#define SW_TRACER_HXX
@@ -88,4 +87,5 @@ namespace sw
}
}
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/types.hxx b/sw/source/filter/ww8/types.hxx
index ae03b7dfdd81..652baec7bfc1 100644
--- a/sw/source/filter/ww8/types.hxx
+++ b/sw/source/filter/ww8/types.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,8 +26,6 @@
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
#ifndef WW_TYPES
#define WW_TYPES
@@ -55,4 +54,5 @@ namespace ww
}
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/typessw.hxx b/sw/source/filter/ww8/typessw.hxx
index 11a92b17ec7a..7d12833d49fe 100644
--- a/sw/source/filter/ww8/typessw.hxx
+++ b/sw/source/filter/ww8/typessw.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,8 +26,6 @@
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
#ifndef WW_TYPESSW
#define WW_TYPESSW
@@ -43,4 +42,5 @@ namespace ww
}
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 5328d377e7a6..cb1471fa88ab 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,53 +28,41 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <com/sun/star/util/XCloseable.hpp>
#include <doc.hxx>
-# include "writerhelper.hxx"
-# include <msfilter.hxx>
+#include "writerhelper.hxx"
+#include <msfilter.hxx>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
#include <algorithm> //std::swap
#include <functional> //std::binary_function
-# include <svl/itemiter.hxx> //SfxItemIter
-# include <svx/svdobj.hxx> //SdrObject
-# include <svx/svdoole2.hxx> //SdrOle2Obj
-# include <svx/fmglob.hxx> //FmFormInventor
-# include <editeng/brkitem.hxx> //SvxFmtBreakItem
-# include <editeng/tstpitem.hxx> //SvxTabStopItem
-# include <ndtxt.hxx> //SwTxtNode
-# include <ndnotxt.hxx> //SwNoTxtNode
-# include <fmtcntnt.hxx> //SwFmtCntnt
-# include <swtable.hxx> //SwTable
-# include <frmfmt.hxx> //SwFrmFmt
-# include <flypos.hxx> //SwPosFlyFrms
-# include <fmtanchr.hxx> //SwFmtAnchor
-# include <ndgrf.hxx> //SwGrfNode
-# include <fmtfsize.hxx> //SwFmtFrmSize
-# include <SwStyleNameMapper.hxx> //SwStyleNameMapper
-# include <docary.hxx> //SwCharFmts
-# include <charfmt.hxx> //SwCharFmt
-# include <fchrfmt.hxx> //SwFmtCharFmt
+#include <svl/itemiter.hxx> //SfxItemIter
+#include <svx/svdobj.hxx> //SdrObject
+#include <svx/svdoole2.hxx> //SdrOle2Obj
+#include <svx/fmglob.hxx> //FmFormInventor
+#include <editeng/brkitem.hxx> //SvxFmtBreakItem
+#include <editeng/tstpitem.hxx> //SvxTabStopItem
+#include <ndtxt.hxx> //SwTxtNode
+#include <ndnotxt.hxx> //SwNoTxtNode
+#include <fmtcntnt.hxx> //SwFmtCntnt
+#include <swtable.hxx> //SwTable
+#include <frmfmt.hxx> //SwFrmFmt
+#include <flypos.hxx> //SwPosFlyFrms
+#include <fmtanchr.hxx> //SwFmtAnchor
+#include <ndgrf.hxx> //SwGrfNode
+#include <fmtfsize.hxx> //SwFmtFrmSize
+#include <SwStyleNameMapper.hxx> //SwStyleNameMapper
+#include <docary.hxx> //SwCharFmts
+#include <charfmt.hxx> //SwCharFmt
+#include <fchrfmt.hxx> //SwFmtCharFmt
#ifndef _UNOTOOLS_STREAMWRAP_HXX
-# include <unotools/streamwrap.hxx>
+#include <unotools/streamwrap.hxx>
#endif
#include <numrule.hxx>
-#ifdef DEBUGDUMP
-# include <vcl/svapp.hxx>
-# ifndef _TOOLS_URLOBJ_HXX
-# include <tools/urlobj.hxx>
-# endif
-# ifndef _UNOTOOLS_UCBSTREAMHELPER_HXX
-# include <unotools/ucbstreamhelper.hxx>
-# endif
-# include <unotools/localfilehelper.hxx>
-#endif
-
using namespace com::sun::star;
using namespace nsSwGetPoolIdFromName;
@@ -95,16 +84,15 @@ namespace
return res;
}
- // --> OD 2009-02-04 #i98791# - adjust sorting
- //Utility to sort SwTxtFmtColl's by their assigned outline style list level
+ // #i98791# - adjust sorting
+ // Utility to sort SwTxtFmtColl's by their assigned outline style list level
class outlinecmp : public
std::binary_function<const SwTxtFmtColl*, const SwTxtFmtColl*, bool>
{
public:
bool operator()(const SwTxtFmtColl *pA, const SwTxtFmtColl *pB) const
{
- // --> OD 2009-02-04 #i98791#
-// return pA->GetAttrOutlineLevel() < pB->GetAttrOutlineLevel(); //<-end,zhaojianwei
+ // #i98791#
bool bResult( false );
const bool bIsAAssignedToOutlineStyle( pA->IsAssignedToListLevelOfOutlineStyle() );
const bool bIsBAssignedToOutlineStyle( pB->IsAssignedToListLevelOfOutlineStyle() );
@@ -181,14 +169,11 @@ namespace sw
: mpFlyFrm(&rFmt),
maPos(rPos),
maSize(),
- // --> OD 2007-04-19 #i43447#
- maLayoutSize(),
- // <--
+ maLayoutSize(), // #i43447#
meWriterType(eTxtBox),
mpStartFrameContent(0),
- // --> OD 2007-04-19 #i43447# - move to initialization list
+ // #i43447# - move to initialization list
mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
- // <--
{
switch (rFmt.Which())
{
@@ -198,7 +183,7 @@ namespace sw
SwNodeIndex aIdx(*pIdx, 1);
const SwNode &rNd = aIdx.GetNode();
using sw::util::GetSwappedInSize;
- // --> OD 2007-04-19 #i43447# - determine layout size
+ // #i43447# - determine layout size
{
SwRect aLayRect( rFmt.FindLayoutRect() );
Rectangle aRect( aLayRect.SVRect() );
@@ -223,8 +208,7 @@ namespace sw
break;
default:
meWriterType = eTxtBox;
- // --> OD 2007-04-19 #i43447#
- // Size equals layout size for text boxes
+ // #i43447# - Size equals layout size for text boxes
maSize = maLayoutSize;
// <--
break;
@@ -233,7 +217,7 @@ namespace sw
}
else
{
- ASSERT(!this, "Impossible");
+ OSL_ENSURE(!this, "Impossible");
meWriterType = eTxtBox;
}
break;
@@ -248,7 +232,7 @@ namespace sw
}
else
{
- ASSERT(!this, "Impossible");
+ OSL_ENSURE(!this, "Impossible");
meWriterType = eDrawing;
}
break;
@@ -296,14 +280,12 @@ namespace sw
mxIPRef(rObj.GetObjRef()), mrPers(rPers),
mpGraphic( rObj.GetGraphic() )
{
- //rObj.SetPersistName(String());
- //rObj.SetObjRef(0);
rObj.AbandonObject();
}
bool DrawingOLEAdaptor::TransferToDoc( ::rtl::OUString &rName )
{
- ASSERT(mxIPRef.is(), "Transferring invalid object to doc");
+ OSL_ENSURE(mxIPRef.is(), "Transferring invalid object to doc");
if (!mxIPRef.is())
return false;
@@ -320,7 +302,6 @@ namespace sw
rName,
::rtl::OUString() );
- //mxIPRef->changeState( embed::EmbedStates::LOADED );
mxIPRef = 0;
}
@@ -345,51 +326,6 @@ namespace sw
mxIPRef = 0;
}
}
-
-#ifdef DEBUGDUMP
- SvStream *CreateDebuggingStream(const String &rSuffix)
- {
- SvStream* pDbgOut = 0;
- static sal_Int32 nCount;
- String aFileName(String(RTL_CONSTASCII_STRINGPARAM("wwdbg")));
- aFileName.Append(String::CreateFromInt32(++nCount));
- aFileName.Append(rSuffix);
- String aURLStr;
- if (::utl::LocalFileHelper::ConvertPhysicalNameToURL(
- Application::GetAppFileName(), aURLStr))
- {
- INetURLObject aURL(aURLStr);
- aURL.removeSegment();
- aURL.removeFinalSlash();
- aURL.Append(aFileName);
-
- pDbgOut = ::utl::UcbStreamHelper::CreateStream(
- aURL.GetMainURL(INetURLObject::NO_DECODE),
- STREAM_TRUNC | STREAM_WRITE);
- }
- return pDbgOut;
- }
-
- void DumpStream(const SvStream &rSrc, SvStream &rDest, sal_uInt32 nLen)
- {
- SvStream &rSource = const_cast<SvStream&>(rSrc);
- sal_uLong nOrigPos = rSource.Tell();
- if (nLen == STREAM_SEEK_TO_END)
- {
- rSource.Seek(STREAM_SEEK_TO_END);
- nLen = rSource.Tell();
- }
- if (nLen - nOrigPos)
- {
- rSource.Seek(nOrigPos);
- sal_Char* pDat = new sal_Char[nLen];
- rSource.Read(pDat, nLen);
- rDest.Write(pDat, nLen);
- delete[] pDat;
- rSource.Seek(nOrigPos);
- }
- }
-#endif
}
namespace util
@@ -441,15 +377,13 @@ namespace sw
std::swap(mnFormLayer, rOther.mnFormLayer);
}
- // --> OD 2004-12-13 #i38889# - by default put objects into the invisible
- // layers.
+ // #i38889# - by default put objects into the invisible layers.
SetLayer::SetLayer(const SwDoc &rDoc)
: mnHeavenLayer(rDoc.GetInvisibleHeavenId()),
mnHellLayer(rDoc.GetInvisibleHellId()),
mnFormLayer(rDoc.GetInvisibleControlsId())
{
}
- // <--
SetLayer::SetLayer(const SetLayer& rOther) throw()
: mnHeavenLayer(rOther.mnHeavenLayer),
@@ -558,12 +492,11 @@ namespace sw
return pFmt;
}
- // --> OD 2009-02-04 #i98791# - adjust sorting algorithm
+ // #i98791# - adjust sorting algorithm
void SortByAssignedOutlineStyleListLevel(ParaStyles &rStyles)
{
std::sort(rStyles.begin(), rStyles.end(), outlinecmp());
}
- // <--
/*
Utility to extract flyfmts from a document, potentially from a
@@ -579,21 +512,6 @@ namespace sw
return aRet;
}
-#if 0
- Frames GetFramesBetweenNodes(const Frames &rFrames,
- const SwNode &rStart, const SwNode &rEnd)
- {
- Frames aRet;
- sal_uLong nEnd = rEnd.GetIndex();
- for (sal_uLong nI = rStart.GetIndex(); nI < nEnd; ++nI)
- {
- my_copy_if(rFrames.begin(), rFrames.end(),
- std::back_inserter(aRet), anchoredto(nI));
- }
- return aRet;
-
- }
-#endif
Frames GetFramesInNode(const Frames &rFrames, const SwNode &rNode)
{
Frames aRet;
@@ -613,7 +531,7 @@ namespace sw
return &(pRule->Get( static_cast< sal_uInt16 >(rTxtNode.GetActualListLevel()) ));
}
- ASSERT(rTxtNode.GetDoc(), "No document for node?, suspicious");
+ OSL_ENSURE(rTxtNode.GetDoc(), "No document for node?, suspicious");
if (!rTxtNode.GetDoc())
return 0;
@@ -651,7 +569,7 @@ namespace sw
SwNoTxtNode *GetNoTxtNodeFromSwFrmFmt(const SwFrmFmt &rFmt)
{
const SwNodeIndex *pIndex = rFmt.GetCntnt().GetCntntIdx();
- ASSERT(pIndex, "No NodeIndex in SwFrmFmt ?, suspicious");
+ OSL_ENSURE(pIndex, "No NodeIndex in SwFrmFmt ?, suspicious");
if (!pIndex)
return 0;
SwNodeIndex aIdx(*pIndex, 1);
@@ -665,7 +583,7 @@ namespace sw
{
const SwTable& rTable = rNd.GetTableNode()->GetTable();
const SwFrmFmt* pApply = rTable.GetFrmFmt();
- ASSERT(pApply, "impossible");
+ OSL_ENSURE(pApply, "impossible");
if (pApply)
pBreak = &(ItemGet<SvxFmtBreakItem>(*pApply, RES_BREAK));
}
@@ -699,7 +617,7 @@ namespace sw
if(nPointCount > 0x0000ffff)
{
- DBG_ERROR("PolygonFromPolyPolygon: too many points for a single polygon (!)");
+ OSL_FAIL("PolygonFromPolyPolygon: too many points for a single polygon (!)");
nPointCount = 0x0000ffff;
}
@@ -743,13 +661,13 @@ namespace sw
}
}
- ASSERT(aGrTwipSz.Width() && aGrTwipSz.Height(), "0 x 0 graphic ?");
+ OSL_ENSURE(aGrTwipSz.Width() && aGrTwipSz.Height(), "0 x 0 graphic ?");
return aGrTwipSz;
}
void RedlineStack::open(const SwPosition& rPos, const SfxPoolItem& rAttr)
{
- ASSERT(rAttr.Which() == RES_FLTR_REDLINE, "not a redline");
+ OSL_ENSURE(rAttr.Which() == RES_FLTR_REDLINE, "not a redline");
maStack.push_back(new SwFltStackEntry(rPos,rAttr.Clone()));
}
@@ -860,12 +778,7 @@ namespace sw
}
return nRet;
}
-/*
- std::vector<String> WrtRedlineAuthor::GetNames()
- {
- return maAuthors;
- }
-*/
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index a2e3b95fcea0..2f16b06f770f 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,8 +25,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-/// @HTML
#ifndef SW_WRITERHELPER
#define SW_WRITERHELPER
@@ -45,11 +44,6 @@
#include <tools/poly.hxx> //Polygon, PolyPolygon
#include <doc.hxx> //SwDoc
-//Uncomment to dump debugging streams of graphics
-#if OSL_DEBUG_LEVEL > 1
-//# define DEBUGDUMP
-#endif
-
class SwTxtFmtColl;
class SwCharFmt;
class SdrObject;
@@ -116,12 +110,11 @@ namespace sw
const SwFrmFmt* mpFlyFrm;
SwPosition maPos;
Size maSize;
- // --> OD 2007-04-19 #i43447#
- // Size of the frame in the layout.
+ // #i43447# - Size of the frame in the layout.
// Especially needed for graphics, whose layout size can differ from its
// size, because it is scaled into its environment.
Size maLayoutSize;
- // <--
+
WriterSource meWriterType;
const SwNode *mpStartFrameContent;
bool mbIsInline;
@@ -202,8 +195,7 @@ namespace sw
/** The layout size of the contained element
- OD 2007-04-19 #i43447#
- Needed for graphics, which are scaled into its environment
+ #i43447# - Needed for graphics, which are scaled into its environment
@return layout size
*/
@@ -564,7 +556,7 @@ namespace sw
e.g. given Normal/Heading1/Heading2/.../Heading10 at their default
assigned outline style list levels of body level/level 1/level 2/.../level 10
- OD 2009-02-04 #i98791#
+ #i98791#
adjust the sorting algorithm due to introduced outline level attribute
@param rStyles
@@ -663,30 +655,6 @@ namespace sw
*/
Frames GetFramesInNode(const Frames &rFrames, const SwNode &rNode);
-#if 0
- /** Get the Frames anchored for all nodes between two points
-
- Given a container of frames, find the ones anchored to the nodes
- from start to end. Half open sequence, i.e. those anchored to
- start, but not those anchored to end
-
- @param rFrames
- The container of frames to search in
-
- @param rStart
- The SwNode to start check for anchors from
-
- @param rEnd
- The SwNode to end check for anchors from
-
- @return the Frames in rFrames anchored to rNode
-
- @author
- <a href="mailto:cmc@openoffice.org">Caol&aacute;n McNamara</a>
- */
- Frames GetFramesBetweenNodes(const Frames &rFrames,
- const SwNode &rStart, const SwNode &rEnd);
-#endif
/** Get the Numbering Format used on a paragraph
There are two differing types of numbering formats that may be on a
@@ -946,43 +914,9 @@ namespace sw
/// No copying allowed
DrawingOLEAdaptor(const DrawingOLEAdaptor &rDoc);
};
-
-#ifdef DEBUGDUMP
- /** Create a SvStream to dump data to during debugging
-
- This creates a file in the program dir of OOo, delete the SvStream
- after you are done with it
-
- @param rSuffix
- The suffix that will be appened to this debugging file
-
- @return a SvStream to dump data to
-
- @author
- <a href="mailto:cmc@openoffice.org">Caol&aacute;n McNamara</a>
- */
- SvStream *CreateDebuggingStream(const String &rSuffix);
-
- /** Dump one SvStream to another
-
- @param rSrc
- The source stream
-
- @param rDest
- The destination stream
-
- @param nLen
- Optional Length of data to copy from rSrc to rDest, if unused copy
- all available data from rSrc
-
- @author
- <a href="mailto:cmc@openoffice.org">Caol&aacute;n McNamara</a>
- */
- void DumpStream(const SvStream &rSrc, SvStream &rDest,
- sal_uInt32 nLen = STREAM_SEEK_TO_END);
-#endif
}
}
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index f00df65478eb..878286ccbb23 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,40 +28,34 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-/// @HTML
#include <msfilter.hxx>
-# include "writerwordglue.hxx"
+#include "writerwordglue.hxx"
#include <doc.hxx>
-# include "writerhelper.hxx"
+#include "writerhelper.hxx"
#include <algorithm> //std::find_if
#include <functional> //std::unary_function
#include <unicode/ubidi.h> //ubidi_getLogicalRun
-# include <tools/tenccvt.hxx> //GetExtendedTextEncoding
-# include <i18nutil/unicode.hxx> //unicode::getUnicodeScriptType
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
-# include <com/sun/star/i18n/ScriptType.hdl> //ScriptType
-#endif
-
-#ifndef SV_FONTCVT_HXX
-# include <unotools/fontcvt.hxx> //GetSubsFontName
-#endif
-# include <editeng/paperinf.hxx> //lA0Width...
-# include <editeng/lrspitem.hxx> //SvxLRSpaceItem
-# include <editeng/ulspitem.hxx> //SvxULSpaceItem
-# include <editeng/boxitem.hxx> //SvxBoxItem
-# include <editeng/fontitem.hxx> //SvxFontItem
-# include <frmfmt.hxx> //SwFrmFmt
-# include <fmtclds.hxx> //SwFmtCol
-# include <hfspacingitem.hxx> //SwHeaderAndFooterEatSpacingItem
-# include <fmtfsize.hxx> //SwFmtFrmSize
-# include <swrect.hxx> //SwRect
-# include <fmthdft.hxx> //SwFmtHeader/SwFmtFooter
-# include <frmatr.hxx> //GetLRSpace...
-# include <ndtxt.hxx> //SwTxtNode
-# include <breakit.hxx> //pBreakIt
+#include <tools/tenccvt.hxx> //GetExtendedTextEncoding
+#include <com/sun/star/i18n/ScriptType.hdl> //ScriptType
+
+#include <unotools/fontcvt.hxx> //GetSubsFontName
+#include <editeng/paperinf.hxx> //lA0Width...
+#include <editeng/lrspitem.hxx> //SvxLRSpaceItem
+#include <editeng/ulspitem.hxx> //SvxULSpaceItem
+#include <editeng/boxitem.hxx> //SvxBoxItem
+#include <editeng/fontitem.hxx> //SvxFontItem
+#include <frmfmt.hxx> //SwFrmFmt
+#include <fmtclds.hxx> //SwFmtCol
+#include <hfspacingitem.hxx> //SwHeaderAndFooterEatSpacingItem
+#include <fmtfsize.hxx> //SwFmtFrmSize
+#include <swrect.hxx> //SwRect
+#include <fmthdft.hxx> //SwFmtHeader/SwFmtFooter
+#include <frmatr.hxx> //GetLRSpace...
+#include <ndtxt.hxx> //SwTxtNode
+#include <breakit.hxx> //pBreakIt
+#include <i18npool/mslangid.hxx>
#define ASSIGN_CONST_ASC(s) AssignAscii(RTL_CONSTASCII_STRINGPARAM(s))
@@ -69,7 +64,6 @@ namespace myImplHelpers
SwTwips CalcHdFtDist(const SwFrmFmt& rFmt, sal_uInt16 nSpacing)
{
/*
- #98506#
The normal case for reexporting word docs is to have dynamic spacing,
as this is word's only setting, and the reason for the existance of the
dynamic spacing features. If we have dynamic spacing active then we can
@@ -162,14 +156,14 @@ namespace myImplHelpers
RES_NONE, RES_NONE, RES_NONE, RES_POOLCOLL_LISTS_BEGIN,
RES_NONE, RES_NONE, RES_NONE, RES_NONE, RES_NONE, RES_NONE,
RES_NONE, RES_NONE, RES_NONE, RES_NONE, RES_NONE, RES_NONE,
- RES_NONE, RES_NONE, RES_POOLCOLL_DOC_TITEL, RES_NONE,
+ RES_NONE, RES_NONE, RES_POOLCOLL_HEADLINE_BASE, RES_NONE,
RES_POOLCOLL_SIGNATURE, RES_NONE, RES_POOLCOLL_TEXT,
RES_POOLCOLL_TEXT_MOVE, RES_NONE, RES_NONE, RES_NONE, RES_NONE,
RES_NONE, RES_NONE, RES_POOLCOLL_DOC_SUBTITEL
};
- const size_t nArrSize = (sizeof(aArr) / sizeof(aArr[0]));
- ASSERT(nArrSize == 75, "Style Array has false size");
+ const size_t nArrSize = (SAL_N_ELEMENTS(aArr));
+ OSL_ENSURE(nArrSize == 75, "Style Array has false size");
SwTxtFmtColl* pRet = 0;
//If this is a built-in word style that has a built-in writer
@@ -336,33 +330,6 @@ namespace myImplHelpers
return sRet;
}
- /*
- Utility to categorize unicode characters into the best fit windows charset
- range for exporting to ww6, or as a hint to non \u unicode token aware rtf
- readers
- */
- rtl_TextEncoding getScriptClass(sal_Unicode cChar)
- {
- using namespace ::com::sun::star::i18n;
-
- static ScriptTypeList aScripts[] =
- {
- { UnicodeScript_kBasicLatin, UnicodeScript_kBasicLatin, RTL_TEXTENCODING_MS_1252},
- { UnicodeScript_kLatin1Supplement, UnicodeScript_kLatin1Supplement, RTL_TEXTENCODING_MS_1252},
- { UnicodeScript_kLatinExtendedA, UnicodeScript_kLatinExtendedA, RTL_TEXTENCODING_MS_1250},
- { UnicodeScript_kLatinExtendedB, UnicodeScript_kLatinExtendedB, RTL_TEXTENCODING_MS_1257},
- { UnicodeScript_kGreek, UnicodeScript_kGreek, RTL_TEXTENCODING_MS_1253},
- { UnicodeScript_kCyrillic, UnicodeScript_kCyrillic, RTL_TEXTENCODING_MS_1251},
- { UnicodeScript_kHebrew, UnicodeScript_kHebrew, RTL_TEXTENCODING_MS_1255},
- { UnicodeScript_kArabic, UnicodeScript_kArabic, RTL_TEXTENCODING_MS_1256},
- { UnicodeScript_kThai, UnicodeScript_kThai, RTL_TEXTENCODING_MS_1258},
- { UnicodeScript_kScriptCount, UnicodeScript_kScriptCount, RTL_TEXTENCODING_MS_1252}
- };
-
- return unicode::getUnicodeScriptType(cChar, aScripts,
- RTL_TEXTENCODING_MS_1252);
- }
-
//Utility to remove entries before a given starting position
class IfBeforeStart
: public std::unary_function<const sw::util::CharRunEntry&, bool>
@@ -532,7 +499,7 @@ namespace sw
const String &rTxt = rTxtNd.GetTxt();
bool bParaIsRTL = false;
- ASSERT(rTxtNd.GetDoc(), "No document for node?, suspicious");
+ OSL_ENSURE(rTxtNd.GetDoc(), "No document for node?, suspicious");
if (rTxtNd.GetDoc())
{
if (FRMDIR_HORI_RIGHT_TOP ==
@@ -617,10 +584,10 @@ namespace sw
while (nPos != nLen)
{
rtl_TextEncoding ScriptType =
- myImplHelpers::getScriptClass(rTxt.GetChar(nPos++));
+ getBestMSEncodingByChar(rTxt.GetChar(nPos++));
while (
(nPos != nLen) &&
- (ScriptType == myImplHelpers::getScriptClass(rTxt.GetChar(nPos)))
+ (ScriptType == getBestMSEncodingByChar(rTxt.GetChar(nPos)))
)
{
++nPos;
@@ -642,7 +609,6 @@ namespace sw
nScript);
if (nEnd2 < 0)
break;
-// nPos = writer_cast<xub_StrLen>(nEnd2);
nPos = static_cast< xub_StrLen >(nEnd2);
aScripts.push_back(ScriptEntry(nPos, nScript));
nScript = pBreakIt->GetBreakIter()->getScriptType(rTxt, nPos);
@@ -670,7 +636,6 @@ namespace sw
if (aBiDiIter != aBiDiEnd)
{
if (aBiDiIter->first < nMinPos)
-// nMinPos = writer_cast<xub_StrLen>(aBiDiIter->first);
nMinPos = static_cast< xub_StrLen >(aBiDiIter->first);
bCharIsRTL = aBiDiIter->second;
}
@@ -731,7 +696,7 @@ namespace sw
case RTL_TEXTENCODING_UTF7:
case RTL_TEXTENCODING_UTF8:
case RTL_TEXTENCODING_JAVA_UTF8:
- ASSERT(nRet != 0x80, "This method may be redundant");
+ OSL_ENSURE(nRet != 0x80, "This method may be redundant");
nRet = 0x80;
break;
default:
@@ -807,7 +772,8 @@ namespace sw
}
sal_uLong MSDateTimeFormatToSwFormat(String& rParams,
- SvNumberFormatter *pFormatter, sal_uInt16 &rLang, bool bHijri)
+ SvNumberFormatter *pFormatter, sal_uInt16 &rLang, bool bHijri,
+ sal_uInt16 nDocLang)
{
// tell the Formatter about the new entry
sal_uInt16 nCheckPos = 0;
@@ -816,9 +782,50 @@ namespace sw
SwapQuotesInField(rParams);
- //#102782#, #102815#, #108341# & #111944# have to work at the same time :-)
- bool bForceJapanese(false);
- bool bForceNatNum(false);
+ // Force to Japanese when finding one of 'geaE'
+ rtl::OUString sJChars(RTL_CONSTASCII_USTRINGPARAM("geE"));
+ bool bForceJapanese = ( STRING_NOTFOUND != rParams.SearchChar( sJChars.getStr() ) );
+ if ( bForceJapanese )
+ {
+ rParams.SearchAndReplaceAll( String::CreateFromAscii( "ee" ),
+ String::CreateFromAscii( "yyyy" ) );
+ rParams.SearchAndReplaceAll( String::CreateFromAscii( "EE" ),
+ String::CreateFromAscii( "YYYY" ) );
+ }
+ if (LANGUAGE_FRENCH != nDocLang)
+ {
+ // Handle the 'a' case here
+ xub_StrLen nLastPos = 0;
+ do
+ {
+ xub_StrLen nPos = rParams.Search( 'a', nLastPos + 1 );
+ bForceJapanese |= ( nPos != STRING_NOTFOUND && IsNotAM( rParams, nPos ) );
+ nLastPos = nPos;
+ } while ( STRING_NOTFOUND != nLastPos );
+ }
+
+ // Force to NatNum when finding one of 'oOA'
+ String sOldParams( rParams );
+ rParams.SearchAndReplaceAll( String::CreateFromAscii( "o" ),
+ String::CreateFromAscii( "m" ) );
+ rParams.SearchAndReplaceAll( String::CreateFromAscii( "O" ),
+ String::CreateFromAscii( "M" ) );
+ bool bForceNatNum = !sOldParams.Equals( rParams );
+ if (LANGUAGE_FRENCH != nDocLang)
+ {
+ // Handle the 'A' case here
+ xub_StrLen nLastPos = 0;
+ do
+ {
+ xub_StrLen nPos = rParams.Search( 'A', nLastPos + 1 );
+ bool bIsCharA = ( nPos != STRING_NOTFOUND && IsNotAM( rParams, nPos ) );
+ bForceNatNum |= bIsCharA;
+ if ( bIsCharA )
+ rParams.SetChar( nPos, 'D' );
+ nLastPos = nPos;
+ } while ( STRING_NOTFOUND != nLastPos );
+ }
+
xub_StrLen nLen = rParams.Len();
xub_StrLen nI = 0;
while (nI < nLen)
@@ -835,50 +842,21 @@ namespace sw
else //normal unquoted section
{
sal_Unicode nChar = rParams.GetChar(nI);
- if (nChar == 'O')
- {
- rParams.SetChar(nI, 'M');
- bForceNatNum = true;
- }
- else if (nChar == 'o')
- {
- rParams.SetChar(nI, 'm');
- bForceNatNum = true;
- }
- else if ((nChar == 'A') && IsNotAM(rParams, nI))
- {
- rParams.SetChar(nI, 'D');
- bForceNatNum = true;
- }
- else if ((nChar == 'g') || (nChar == 'G'))
- bForceJapanese = true;
- else if ((nChar == 'a') && IsNotAM(rParams, nI))
- bForceJapanese = true;
- else if (nChar == 'E')
- {
- if ((nI != nLen-1) && (rParams.GetChar(nI+1) == 'E'))
- {
- rParams.Replace(nI, 2, CREATE_CONST_ASC("YYYY"));
- nLen+=2;
- nI+=3;
- }
- bForceJapanese = true;
- }
- else if (nChar == 'e')
+
+ // Change the localized word string to english
+ switch ( nDocLang )
{
- if ((nI != nLen-1) && (rParams.GetChar(nI+1) == 'e'))
- {
- rParams.Replace(nI, 2, CREATE_CONST_ASC("yyyy"));
- nLen+=2;
- nI+=3;
- }
- bForceJapanese = true;
+ case LANGUAGE_FRENCH:
+ if ( ( nChar == 'a' || nChar == 'A' ) && IsNotAM(rParams, nI) )
+ rParams.SetChar(nI, 'Y');
+ break;
+ default:
+ ;
}
- else if (nChar == '/')
+ if (nChar == '/')
{
// MM We have to escape '/' in case it's used as a char
rParams.Replace(nI, 1, CREATE_CONST_ASC("\\/"));
- // rParams.Insert( nI, '\\' );
nI++;
nLen++;
}
@@ -887,112 +865,114 @@ namespace sw
// Should be made with i18n framework.
// The list of the mappings and of those "special" locales is to be found at:
// http://l10n.openoffice.org/i18n_framework/LocaleData.html
- switch ( rLang )
+ if ( !bForceJapanese && !bForceNatNum )
{
- case LANGUAGE_FINNISH:
- {
- if (nChar == 'y' || nChar == 'Y')
- rParams.SetChar (nI, 'V');
- else if (nChar == 'm' || nChar == 'M')
- rParams.SetChar (nI, 'K');
- else if (nChar == 'd' || nChar == 'D')
- rParams.SetChar (nI, 'P');
- else if (nChar == 'h' || nChar == 'H')
- rParams.SetChar (nI, 'T');
- }
- break;
- case LANGUAGE_DANISH:
- case LANGUAGE_NORWEGIAN:
- case LANGUAGE_NORWEGIAN_BOKMAL:
- case LANGUAGE_NORWEGIAN_NYNORSK:
- case LANGUAGE_SWEDISH:
- case LANGUAGE_SWEDISH_FINLAND:
- {
- if (nChar == 'h' || nChar == 'H')
- rParams.SetChar (nI, 'T');
- }
- break;
- case LANGUAGE_PORTUGUESE:
- case LANGUAGE_PORTUGUESE_BRAZILIAN:
- case LANGUAGE_SPANISH_MODERN:
- case LANGUAGE_SPANISH_DATED:
- case LANGUAGE_SPANISH_MEXICAN:
- case LANGUAGE_SPANISH_GUATEMALA:
- case LANGUAGE_SPANISH_COSTARICA:
- case LANGUAGE_SPANISH_PANAMA:
- case LANGUAGE_SPANISH_DOMINICAN_REPUBLIC:
- case LANGUAGE_SPANISH_VENEZUELA:
- case LANGUAGE_SPANISH_COLOMBIA:
- case LANGUAGE_SPANISH_PERU:
- case LANGUAGE_SPANISH_ARGENTINA:
- case LANGUAGE_SPANISH_ECUADOR:
- case LANGUAGE_SPANISH_CHILE:
- case LANGUAGE_SPANISH_URUGUAY:
- case LANGUAGE_SPANISH_PARAGUAY:
- case LANGUAGE_SPANISH_BOLIVIA:
- case LANGUAGE_SPANISH_EL_SALVADOR:
- case LANGUAGE_SPANISH_HONDURAS:
- case LANGUAGE_SPANISH_NICARAGUA:
- case LANGUAGE_SPANISH_PUERTO_RICO:
- {
- if (nChar == 'a' || nChar == 'A')
- rParams.SetChar (nI, 'O');
- else if (nChar == 'y' || nChar == 'Y')
- rParams.SetChar (nI, 'A');
- }
- break;
- case LANGUAGE_DUTCH:
- case LANGUAGE_DUTCH_BELGIAN:
+ // Convert to the localized equivalent for OOo
+ switch ( rLang )
{
- if (nChar == 'y' || nChar == 'Y')
- rParams.SetChar (nI, 'J');
- else if (nChar == 'u' || nChar == 'U')
- rParams.SetChar (nI, 'H');
- }
- break;
- case LANGUAGE_ITALIAN:
- case LANGUAGE_ITALIAN_SWISS:
- {
- if (nChar == 'a' || nChar == 'A')
- rParams.SetChar (nI, 'O');
- else if (nChar == 'g' || nChar == 'G')
- rParams.SetChar (nI, 'X');
- else if (nChar == 'y' || nChar == 'Y')
- rParams.SetChar(nI, 'A');
- else if (nChar == 'd' || nChar == 'D')
- rParams.SetChar (nI, 'G');
- }
- break;
- case LANGUAGE_GERMAN:
- case LANGUAGE_GERMAN_SWISS:
- case LANGUAGE_GERMAN_AUSTRIAN:
- case LANGUAGE_GERMAN_LUXEMBOURG:
- case LANGUAGE_GERMAN_LIECHTENSTEIN:
- {
- if (nChar == 'y' || nChar == 'Y')
- rParams.SetChar (nI, 'J');
- else if (nChar == 'd' || nChar == 'D')
- rParams.SetChar (nI, 'T');
- }
- break;
- case LANGUAGE_FRENCH:
- case LANGUAGE_FRENCH_BELGIAN:
- case LANGUAGE_FRENCH_CANADIAN:
- case LANGUAGE_FRENCH_SWISS:
- case LANGUAGE_FRENCH_LUXEMBOURG:
- case LANGUAGE_FRENCH_MONACO:
- {
- if (nChar == 'a' || nChar == 'A')
- rParams.SetChar (nI, 'O');
- else if (nChar == 'y' || nChar == 'Y')
- rParams.SetChar (nI, 'A');
- else if (nChar == 'd' || nChar == 'D')
- rParams.SetChar (nI, 'J');
- }
- break;
- default:
- {
- ; // Nothing
+ case LANGUAGE_FINNISH:
+ {
+ if (nChar == 'y' || nChar == 'Y')
+ rParams.SetChar (nI, 'V');
+ else if (nChar == 'm' || nChar == 'M')
+ rParams.SetChar (nI, 'K');
+ else if (nChar == 'd' || nChar == 'D')
+ rParams.SetChar (nI, 'P');
+ else if (nChar == 'h' || nChar == 'H')
+ rParams.SetChar (nI, 'T');
+ }
+ break;
+ case LANGUAGE_DANISH:
+ case LANGUAGE_NORWEGIAN:
+ case LANGUAGE_NORWEGIAN_BOKMAL:
+ case LANGUAGE_NORWEGIAN_NYNORSK:
+ case LANGUAGE_SWEDISH:
+ case LANGUAGE_SWEDISH_FINLAND:
+ {
+ if (nChar == 'h' || nChar == 'H')
+ rParams.SetChar (nI, 'T');
+ }
+ break;
+ case LANGUAGE_PORTUGUESE:
+ case LANGUAGE_PORTUGUESE_BRAZILIAN:
+ case LANGUAGE_SPANISH_MODERN:
+ case LANGUAGE_SPANISH_DATED:
+ case LANGUAGE_SPANISH_MEXICAN:
+ case LANGUAGE_SPANISH_GUATEMALA:
+ case LANGUAGE_SPANISH_COSTARICA:
+ case LANGUAGE_SPANISH_PANAMA:
+ case LANGUAGE_SPANISH_DOMINICAN_REPUBLIC:
+ case LANGUAGE_SPANISH_VENEZUELA:
+ case LANGUAGE_SPANISH_COLOMBIA:
+ case LANGUAGE_SPANISH_PERU:
+ case LANGUAGE_SPANISH_ARGENTINA:
+ case LANGUAGE_SPANISH_ECUADOR:
+ case LANGUAGE_SPANISH_CHILE:
+ case LANGUAGE_SPANISH_URUGUAY:
+ case LANGUAGE_SPANISH_PARAGUAY:
+ case LANGUAGE_SPANISH_BOLIVIA:
+ case LANGUAGE_SPANISH_EL_SALVADOR:
+ case LANGUAGE_SPANISH_HONDURAS:
+ case LANGUAGE_SPANISH_NICARAGUA:
+ case LANGUAGE_SPANISH_PUERTO_RICO:
+ {
+ if (nChar == 'a' || nChar == 'A')
+ rParams.SetChar (nI, 'O');
+ else if (nChar == 'y' || nChar == 'Y')
+ rParams.SetChar (nI, 'A');
+ }
+ break;
+ case LANGUAGE_DUTCH:
+ case LANGUAGE_DUTCH_BELGIAN:
+ {
+ if (nChar == 'y' || nChar == 'Y')
+ rParams.SetChar (nI, 'J');
+ else if (nChar == 'u' || nChar == 'U')
+ rParams.SetChar (nI, 'H');
+ }
+ break;
+ case LANGUAGE_ITALIAN:
+ case LANGUAGE_ITALIAN_SWISS:
+ {
+ if (nChar == 'a' || nChar == 'A')
+ rParams.SetChar (nI, 'O');
+ else if (nChar == 'g' || nChar == 'G')
+ rParams.SetChar (nI, 'X');
+ else if (nChar == 'y' || nChar == 'Y')
+ rParams.SetChar(nI, 'A');
+ else if (nChar == 'd' || nChar == 'D')
+ rParams.SetChar (nI, 'G');
+ }
+ break;
+ case LANGUAGE_GERMAN:
+ case LANGUAGE_GERMAN_SWISS:
+ case LANGUAGE_GERMAN_AUSTRIAN:
+ case LANGUAGE_GERMAN_LUXEMBOURG:
+ case LANGUAGE_GERMAN_LIECHTENSTEIN:
+ {
+ if (nChar == 'y' || nChar == 'Y')
+ rParams.SetChar (nI, 'J');
+ else if (nChar == 'd' || nChar == 'D')
+ rParams.SetChar (nI, 'T');
+ }
+ break;
+ case LANGUAGE_FRENCH:
+ case LANGUAGE_FRENCH_BELGIAN:
+ case LANGUAGE_FRENCH_CANADIAN:
+ case LANGUAGE_FRENCH_SWISS:
+ case LANGUAGE_FRENCH_LUXEMBOURG:
+ case LANGUAGE_FRENCH_MONACO:
+ {
+ if (nChar == 'y' || nChar == 'Y' || nChar == 'a')
+ rParams.SetChar (nI, 'A');
+ else if (nChar == 'd' || nChar == 'D' || nChar == 'j')
+ rParams.SetChar (nI, 'J');
+ }
+ break;
+ default:
+ {
+ ; // Nothing
+ }
}
}
}
@@ -1040,8 +1020,7 @@ namespace sw
}
}
-
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/writerwordglue.hxx b/sw/source/filter/ww8/writerwordglue.hxx
index ed022fa9cc39..7d5f9baea666 100644
--- a/sw/source/filter/ww8/writerwordglue.hxx
+++ b/sw/source/filter/ww8/writerwordglue.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,14 +25,12 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-/// @HTML
#ifndef SW_WRITERWORDGLUE
#define SW_WRITERWORDGLUE
-# include "needed_cast.hxx"
-# include "types.hxx"
+#include "needed_cast.hxx"
+#include "types.hxx"
class SwFrmFmt;
class SfxItemSet;
@@ -161,4 +160,5 @@ namespace sw
}
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index bae95df4f735..336ef5cee40d 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <com/sun/star/embed/Aspects.hpp>
@@ -66,7 +66,6 @@
#include <comphelper/seqstream.hxx>
#include <unotools/ucbstreamhelper.hxx>
-#include <svtools/filter.hxx>
#include <svx/fmglob.hxx>
#include <svx/svdouno.hxx>
#include <svx/unoapi.hxx>
@@ -78,9 +77,7 @@
#include <fmtsrnd.hxx>
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
-// --> OD 2005-01-06 #i30669#
-#include <fmtfollowtextflow.hxx>
-// <--
+#include <fmtfollowtextflow.hxx> // #i30669#
#include <dcontact.hxx>
#include <frmfmt.hxx>
#include <fmtcntnt.hxx>
@@ -102,9 +99,7 @@
#include "writerwordglue.hxx"
#include "wrtww8.hxx"
#include "escher.hxx"
-// --> OD 2007-07-24 #148096#
#include <ndtxt.hxx>
-// <--
#include "WW8FFData.hxx"
using namespace com::sun::star;
@@ -112,10 +107,10 @@ using namespace sw::util;
using namespace sw::types;
using namespace nsFieldFlags;
-//#110185# get a part fix for this type of element
+// get a part fix for this type of element
bool WW8Export::MiserableFormFieldExportHack(const SwFrmFmt& rFrmFmt)
{
- ASSERT(bWrtWW8, "Not allowed");
+ OSL_ENSURE(bWrtWW8, "Not allowed");
if (!bWrtWW8)
return false;
bool bHack = false;
@@ -170,9 +165,7 @@ void WW8Export::DoComboBox(uno::Reference<beans::XPropertySet> xPropSet)
rtl::OUString sHelp;
{
- // --> OD 2010-05-14 #160026#
// property "Help" does not exist and due to the no-existence an exception is thrown.
-// uno::Any aTmp = xPropSet->getPropertyValue(C2U("Help"));
try
{
uno::Any aTmp = xPropSet->getPropertyValue(C2U("HelpText"));
@@ -203,7 +196,7 @@ void WW8Export::DoComboBox(const rtl::OUString &rName,
const rtl::OUString &rSelected,
uno::Sequence<rtl::OUString> &rListItems)
{
- ASSERT(bWrtWW8, "Not allowed");
+ OSL_ENSURE(bWrtWW8, "Not allowed");
if (!bWrtWW8)
return;
OutputField(0, ww::eFORMDROPDOWN, FieldString(ww::eFORMDROPDOWN),
@@ -488,7 +481,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
Rectangle aRect;
SwFmtVertOrient rVOr = rFmt.GetVertOrient();
SwFmtHoriOrient rHOr = rFmt.GetHoriOrient();
- // --> OD 2005-01-06 #i30669# - convert the positioning attributes.
+ // #i30669# - convert the positioning attributes.
// Most positions are converted, if layout information exists.
const bool bPosConverted =
WinwordAnchoring::ConvertPosition( rHOr, rVOr, rFmt );
@@ -504,7 +497,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
aRect.SetSize( rFmt.GetFrmSize().GetSize() );
else
{
- // --> FME 2007-06-20 #i56090# Do not only consider the first client
+ // #i56090# Do not only consider the first client
// Note that we actually would have to find the maximum size of the
// frame format clients. However, this already should work in most cases.
const SwRect aSizeRect(rFmt.FindLayoutRect());
@@ -517,15 +510,15 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
}
else
{
- ASSERT(pObj, "wo ist das SDR-Object?");
+ OSL_ENSURE(pObj, "wo ist das SDR-Object?");
if (pObj)
{
aRect = pObj->GetSnapRect();
}
}
- // --> OD 2005-01-06 #i30669# - use converted position, if conversion
- // is performed. Unify position determination of Writer fly frames
+ // #i30669# - use converted position, if conversion is performed.
+ // Unify position determination of Writer fly frames
// and drawing objects.
if ( bPosConverted )
{
@@ -537,7 +530,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
aObjPos = aRect.TopLeft();
if (text::VertOrientation::NONE == rVOr.GetVertOrient())
{
- // CMC, OD 24.11.2003 #i22673#
+ // #i22673#
sal_Int16 eOri = rVOr.GetRelationOrient();
if (eOri == text::RelOrientation::CHAR || eOri == text::RelOrientation::TEXT_LINE)
aObjPos.Y() = -rVOr.GetPos();
@@ -619,7 +612,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
nFlags |= 0x0400 | nContour;
break;
default:
- ASSERT(!this, "Unsupported surround type for export");
+ OSL_ENSURE(!this, "Unsupported surround type for export");
break;
}
if (pObj && (pObj->GetLayer() == rWrt.pDoc->GetHellId() ||
@@ -769,8 +762,8 @@ sal_uInt32 WW8Export::GetSdrOrdNum( const SwFrmFmt& rFmt ) const
void WW8Export::AppendFlyInFlys(const sw::Frame& rFrmFmt,
const Point& rNdTopLeft)
{
- ASSERT(bWrtWW8, "this has gone horribly wrong");
- ASSERT(!pEscher, "der EscherStream wurde schon geschrieben!");
+ OSL_ENSURE(bWrtWW8, "this has gone horribly wrong");
+ OSL_ENSURE(!pEscher, "der EscherStream wurde schon geschrieben!");
if (pEscher)
return ;
PlcDrawObj *pDrwO;
@@ -787,7 +780,7 @@ void WW8Export::AppendFlyInFlys(const sw::Frame& rFrmFmt,
WW8_CP nCP = Fc2Cp(Strm().Tell());
bool bSuccess = pDrwO->Append(*this, nCP, rFrmFmt, rNdTopLeft);
- ASSERT(bSuccess, "Couldn't export a graphical element!");
+ OSL_ENSURE(bSuccess, "Couldn't export a graphical element!");
if (bSuccess)
{
@@ -868,7 +861,6 @@ xub_StrLen MSWord_SdrAttrIter::SearchNext( xub_StrLen nStartPos )
SetCharSet(rHt, true);
}
-//?? if( pHt->GetEnd() ) // Attr mit Ende
{
nPos = rHt.nEnd; // gibt letztes Attr-Zeichen + 1
if( nPos >= nStartPos && nPos < nMinPos )
@@ -877,16 +869,7 @@ xub_StrLen MSWord_SdrAttrIter::SearchNext( xub_StrLen nStartPos )
SetCharSet(rHt, false);
}
}
-/* else
- { // Attr ohne Ende
- nPos = rHt.nStart + 1; // Laenge 1 wegen CH_TXTATR im Text
- if( nPos >= nStartPos && nPos < nMinPos )
- {
- nMinPos = nPos;
- SetCharSet(rHt, false);
- }
- }
-*/
+
}
return nMinPos;
}
@@ -1055,7 +1038,7 @@ const SfxPoolItem& MSWord_SdrAttrIter::GetItem( sal_uInt16 nWhich ) const
{
SfxItemSet aSet(pEditObj->GetParaAttribs(nPara));
nWhich = GetSetWhichFromSwDocWhich(aSet, *m_rExport.pDoc, nWhich);
- ASSERT(nWhich, "Impossible, catastrophic failure imminent");
+ OSL_ENSURE(nWhich, "Impossible, catastrophic failure imminent");
pRet = &aSet.Get(nWhich);
}
return *pRet;
@@ -1100,7 +1083,7 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr)
void WW8Export::WriteSdrTextObj(const SdrObject& rObj, sal_uInt8 nTyp)
{
const SdrTextObj* pTxtObj = PTR_CAST(SdrTextObj, &rObj);
- ASSERT(pTxtObj, "That is no SdrTextObj!");
+ OSL_ENSURE(pTxtObj, "That is no SdrTextObj!");
if (!pTxtObj)
return;
@@ -1145,7 +1128,7 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp
rtl_TextEncoding eChrSet = aAttrIter.GetNodeCharSet();
- ASSERT( !pO->Count(), " pO ist am Zeilenanfang nicht leer" );
+ OSL_ENSURE( !pO->Count(), " pO ist am Zeilenanfang nicht leer" );
String aStr( rEditObj.GetText( n ));
xub_StrLen nAktPos = 0;
@@ -1182,7 +1165,7 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp
}
while( nAktPos < nEnd );
- ASSERT( !pO->Count(), " pO ist am ZeilenEnde nicht leer" );
+ OSL_ENSURE( !pO->Count(), " pO ist am ZeilenEnde nicht leer" );
pO->Insert( bNul, pO->Count() ); // Style # as short
pO->Insert( bNul, pO->Count() );
@@ -1238,7 +1221,7 @@ void WW8Export::CreateEscher()
GetItemState(RES_BACKGROUND);
if (pHFSdrObjs->size() || pSdrObjs->size() || SFX_ITEM_SET == eBackSet)
{
- ASSERT( !pEscher, "wer hat den Pointer nicht geloescht?" );
+ OSL_ENSURE( !pEscher, "wer hat den Pointer nicht geloescht?" );
SvMemoryStream* pEscherStrm = new SvMemoryStream;
pEscherStrm->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
pEscher = new SwEscherEx(pEscherStrm, *this);
@@ -1350,7 +1333,7 @@ sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nSh
sal_Int32 nBorderThick=0;
SwNoTxtNode *pNd = GetNoTxtNodeFromSwFrmFmt(rFmt);
SwGrfNode *pGrfNd = pNd ? pNd->GetGrfNode() : 0;
- ASSERT(pGrfNd, "No SwGrfNode ?, suspicious");
+ OSL_ENSURE(pGrfNd, "No SwGrfNode ?, suspicious");
if (!pGrfNd)
return nBorderThick;
@@ -1568,7 +1551,6 @@ sal_Int32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nSh
instead ==> allows unicode text to be preserved
*/
#ifdef OLE_PREVIEW_AS_EMF
- //Graphic aGraphic = wwUtility::MakeSafeGDIMetaFile(xObj);
Graphic* pGraphic = rOLENd.GetGraphic();
#endif
OpenContainer(ESCHER_SpContainer);
@@ -1697,6 +1679,21 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
rPropOpt.AddOpt( ESCHER_Prop_lineStyle, eStyle );
rPropOpt.AddOpt( ESCHER_Prop_lineWidth,
DrawModelToEmu( nLineWidth ));
+
+ MSO_LineDashing eDashing = mso_lineSolid;
+ switch ( pLine->GetStyle( ) )
+ {
+ case DASHED:
+ eDashing = mso_lineDashGEL;
+ break;
+ case DOTTED:
+ eDashing = mso_lineDotGEL;
+ break;
+ case SOLID:
+ default:
+ break;
+ }
+ rPropOpt.AddOpt( ESCHER_Prop_lineDashing, eDashing );
rPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x8000E );
//Use import logic to determine how much of border will go
@@ -1929,7 +1926,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
{
sal_Int32 nBorderThick=0;
DrawObj *pObj = (*aIter);
- ASSERT(pObj, "impossible");
+ OSL_ENSURE(pObj, "impossible");
if (!pObj)
continue;
const sw::Frame &rFrame = pObj->maCntnt;
@@ -1968,9 +1965,9 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
if (bSwapInPage)
(const_cast<SdrObject*>(pSdrObj))->SetPage(0);
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
- ASSERT( !this, "Where is the SDR-Object?" );
+ OSL_ENSURE( !this, "Where is the SDR-Object?" );
#endif
}
@@ -2005,13 +2002,6 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
aPropOpt.AddOpt( ESCHER_Prop_shadowColor, 0x8000002 );
aPropOpt.AddOpt( ESCHER_Prop_lineWidth, 0 );
-// winword defaults!
-// aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x100000 );
-// aPropOpt.AddOpt( ESCHER_Prop_lineWidth, 0 );
-// aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x80000 );
-// aPropOpt.AddOpt( ESCHER_Prop_bWMode, 0x9 );
-// aPropOpt.AddOpt( ESCHER_Prop_fBackground, 0x10001 );
-
aPropOpt.Commit( *pStrm );
AddAtom( 4, ESCHER_ClientData );
@@ -2037,7 +2027,7 @@ void SwEscherEx::FinishEscher()
/** method to perform conversion of positioning attributes with the help
of corresponding layout information
- OD 2005-01-06 #i30669#
+ #i30669#
Because most of the Writer object positions doesn't correspond to the
object positions in WW8, this method converts the positioning
attributes. For this conversion the corresponding layout information
@@ -2046,8 +2036,6 @@ void SwEscherEx::FinishEscher()
No conversion is performed for as-character anchored objects. Whose
object positions are already treated special in method <WriteData(..)>.
- @author OD
-
@param _iorHoriOri
input/output parameter - containing the current horizontal position
attributes, which are converted by this method.
@@ -2093,7 +2081,6 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri,
// be determined. --> no conversion
return false;
}
- // --> OD 2006-09-26 #141404#
// no conversion for anchored drawing object, which aren't attached to an
// anchor frame.
// This is the case for drawing objects, which are anchored inside a page
@@ -2111,7 +2098,6 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri,
// at page areas have to be converted, if it's set.
const bool bFollowTextFlow = _rFrmFmt.GetFollowTextFlow().GetValue();
- // --> OD 2007-07-24 #148096#
// check, if horizontal and vertical position have to be converted due to
// the fact, that the object is anchored at a paragraph, which has a "column
// break before" attribute
@@ -2146,7 +2132,6 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri,
}
// determine conversion type due to the position relation
- // --> OD 2007-07-24 #148096#
if ( bConvDueToAnchoredAtColBreakPara )
{
eHoriConv = CONV2PG;
@@ -2190,7 +2175,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri,
}
break;
default:
- ASSERT( false,
+ OSL_ENSURE( false,
"<WinwordAnchoring::ConvertPosition(..)> - unknown horizontal relation" );
}
}
@@ -2204,7 +2189,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri,
if ( eHoriConv == CONV2PG )
{
_iorHoriOri.SetRelationOrient( text::RelOrientation::PAGE_FRAME );
- // --> OD 2005-01-27 #i33818#
+ // #i33818#
bool bRelToTableCell( false );
aPos = pAnchoredObj->GetRelPosToPageFrm( bFollowTextFlow,
bRelToTableCell );
@@ -2253,7 +2238,6 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri,
}
// determine conversion type due to the position relation
- // --> OD 2007-07-24 #148096#
if ( bConvDueToAnchoredAtColBreakPara )
{
eVertConv = CONV2PG;
@@ -2304,11 +2288,11 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri,
case text::RelOrientation::FRAME_LEFT:
case text::RelOrientation::FRAME_RIGHT:
default:
- ASSERT( false,
+ OSL_ENSURE( false,
"<WinwordAnchoring::ConvertPosition(..)> - unknown vertical relation" );
}
}
- // <--
+
if ( eVertConv != NO_CONV )
{
_iorVertOri.SetVertOrient( text::VertOrientation::NONE );
@@ -2318,7 +2302,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri,
if ( eVertConv == CONV2PG )
{
_iorVertOri.SetRelationOrient( text::RelOrientation::PAGE_FRAME );
- // --> OD 2005-01-27 #i33818#
+ // #i33818#
bool bRelToTableCell( false );
aPos = pAnchoredObj->GetRelPosToPageFrm( bFollowTextFlow,
bRelToTableCell );
@@ -2358,14 +2342,12 @@ void WinwordAnchoring::SetAnchoring(const SwFrmFmt& rFmt)
SwFmtHoriOrient rHoriOri = rFmt.GetHoriOrient();
SwFmtVertOrient rVertOri = rFmt.GetVertOrient();
- // --> OD 2005-01-06 #i30669# - convert the positioning attributes.
+ // #i30669# - convert the positioning attributes.
// Most positions are converted, if layout information exists.
const bool bPosConverted = ConvertPosition( rHoriOri, rVertOri, rFmt );
- // <--
const sal_Int16 eHOri = rHoriOri.GetHoriOrient();
- // CMC, OD 24.11.2003 #i22673#
- const sal_Int16 eVOri = rVertOri.GetVertOrient();
+ const sal_Int16 eVOri = rVertOri.GetVertOrient(); // #i22673#
const sal_Int16 eHRel = rHoriOri.GetRelationOrient();
const sal_Int16 eVRel = rVertOri.GetRelationOrient();
@@ -2395,7 +2377,7 @@ void WinwordAnchoring::SetAnchoring(const SwFrmFmt& rFmt)
}
// vertical Adjustment
- // CMC, OD 24.11.2003 #i22673#
+ // #i22673#
// When adjustment is vertically relative to line or to char
// bottom becomes top and vice versa
const bool bVertSwap = !bPosConverted &&
@@ -2477,7 +2459,7 @@ void WinwordAnchoring::SetAnchoring(const SwFrmFmt& rFmt)
mnYRelTo = 2;
break;
case text::RelOrientation::CHAR:
- case text::RelOrientation::TEXT_LINE: // CMC, OD 24.11.2003 #i22673# - vertical alignment at top of line
+ case text::RelOrientation::TEXT_LINE: // #i22673# - vertical alignment at top of line
case text::RelOrientation::PAGE_LEFT: //nonsense
case text::RelOrientation::PAGE_RIGHT: //nonsense
case text::RelOrientation::FRAME_LEFT: //nonsense
@@ -2576,7 +2558,7 @@ sal_uInt16 FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex,
for (DrawObjPointerIter aIter = rPVec.begin(); aIter != aEnd; ++aIter)
{
const DrawObj *pObj = (*aIter);
- ASSERT(pObj, "Impossible");
+ OSL_ENSURE(pObj, "Impossible");
if (!pObj)
continue;
if (
@@ -2615,7 +2597,7 @@ sal_Int32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId,
switch (nDirection)
{
default:
- ASSERT(!this, "unknown direction type");
+ OSL_ENSURE(!this, "unknown direction type");
case FRMDIR_HORI_LEFT_TOP:
nFlow=mso_txflHorzN;
break;
@@ -2673,7 +2655,7 @@ void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, sal_uInt32 nShapeId )
SdrModel *pModel = rWrt.pDoc->GetDrawModel();
OutputDevice *pDevice = Application::GetDefaultDevice();
- ASSERT(pModel && pDevice, "no model or device");
+ OSL_ENSURE(pModel && pDevice, "no model or device");
// #i71538# use complete SdrViews
// SdrExchangeView aExchange(pModel, pDevice);
@@ -2828,4 +2810,4 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrObject *pOb
return true;
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 7f5e0eaae54e..d9f8c318ba0a 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <vector>
#include <list>
@@ -35,8 +35,9 @@
#include <algorithm>
#include <functional>
#include <iostream>
-#if OSL_DEBUG_LEVEL > 0
-# include <cstdio>
+
+#if OSL_DEBUG_LEVEL > 1
+#include <cstdio>
#endif
#include <hintids.hxx>
@@ -116,20 +117,20 @@ using namespace sw::types;
using namespace sw::mark;
using namespace nsFieldFlags;
-
static String lcl_getFieldCode( const IFieldmark* pFieldmark ) {
- ASSERT(pFieldmark!=NULL, "where is my fieldmark???");
- if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMTEXT ) ) {
+ OSL_ENSURE(pFieldmark!=NULL, "where is my fieldmark???");
+
+ if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) {
return String::CreateFromAscii(" FORMTEXT ");
- } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMDROPDOWN ) ) {
+ } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) ) {
return String::CreateFromAscii(" FORMDROPDOWN ");
- } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX ) ) {
+ } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) ) ) {
return String::CreateFromAscii(" FORMCHECKBOX ");
- } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_TOC ) ) {
+ } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_TOC ) ) ) {
return String::CreateFromAscii(" TOC ");
- } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_HYPERLINK ) ) {
+ } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_HYPERLINK ) ) ) {
return String::CreateFromAscii(" HYPERLINK ");
- } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_PAGEREF ) ) {
+ } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_PAGEREF ) ) ) {
return String::CreateFromAscii(" PAGEREF ");
} else {
return pFieldmark->GetFieldname();
@@ -137,18 +138,18 @@ static String lcl_getFieldCode( const IFieldmark* pFieldmark ) {
}
ww::eField lcl_getFieldId( const IFieldmark* pFieldmark ) {
- ASSERT(pFieldmark!=NULL, "where is my fieldmark???");
- if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMTEXT ) ) {
+ OSL_ENSURE(pFieldmark!=NULL, "where is my fieldmark???");
+ if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) {
return ww::eFORMTEXT;
- } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMDROPDOWN ) ) {
+ } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) ) {
return ww::eFORMDROPDOWN;
- } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX ) ) {
+ } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) ) ) {
return ww::eFORMCHECKBOX;
- } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_TOC ) ) {
+ } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_TOC ) ) ) {
return ww::eTOC;
- } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_HYPERLINK ) ) {
+ } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_HYPERLINK ) ) ) {
return ww::eHYPERLINK;
- } else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_PAGEREF ) ) {
+ } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_PAGEREF ) ) ) {
return ww::ePAGEREF;
} else {
return ww::eUNKNOWN;
@@ -168,76 +169,6 @@ MSWordAttrIter::~MSWordAttrIter()
m_rExport.pChpIter = pOld;
}
-// Die Klasse SwAttrIter ist eine Hilfe zum Aufbauen der Fkp.chpx.
-// Dabei werden nur Zeichen-Attribute beachtet; Absatz-Attribute brauchen
-// diese Behandlung nicht.
-// Die Absatz- und Textattribute des Writers kommen rein, und es wird
-// mit Where() die naechste Position geliefert, an der sich die Attribute
-// aendern. IsTxtAtr() sagt, ob sich an der mit Where() gelieferten Position
-// ein Attribut ohne Ende und mit \xff im Text befindet.
-// Mit OutAttr() werden die Attribute an der angegebenen SwPos
-// ausgegeben.
-
-class SwAttrIter : public MSWordAttrIter
-{
-private:
- const SwTxtNode& rNd;
-
- CharRuns maCharRuns;
- cCharRunIter maCharRunIter;
-
- rtl_TextEncoding meChrSet;
- sal_uInt16 mnScript;
- bool mbCharIsRTL;
-
- const SwRedline* pCurRedline;
- xub_StrLen nAktSwPos;
- sal_uInt16 nCurRedlinePos;
-
- bool mbParaIsRTL;
-
- const SwFmtDrop &mrSwFmtDrop;
-
- sw::Frames maFlyFrms; // #i2916#
- sw::FrameIter maFlyIter;
-
- xub_StrLen SearchNext( xub_StrLen nStartPos );
- void FieldVanish( const String& rTxt );
-
- void OutSwFmtRefMark(const SwFmtRefMark& rAttr, bool bStart);
-
- void IterToCurrent();
-
- //No copying
- SwAttrIter(const SwAttrIter&);
- SwAttrIter& operator=(const SwAttrIter&);
-public:
- SwAttrIter( MSWordExportBase& rWr, const SwTxtNode& rNd );
-
- bool IsTxtAttr( xub_StrLen nSwPos );
- bool IsRedlineAtEnd( xub_StrLen nPos ) const;
- bool IsDropCap( int nSwPos );
- bool RequiresImplicitBookmark();
-
- void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); }
-
- void OutAttr( xub_StrLen nSwPos );
- virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const;
- virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
- int OutAttrWithRange(xub_StrLen nPos);
- const SwRedlineData* GetRedline( xub_StrLen nPos );
- void OutFlys(xub_StrLen nSwPos);
-
- xub_StrLen WhereNext() const { return nAktSwPos; }
- sal_uInt16 GetScript() const { return mnScript; }
- bool IsCharRTL() const { return mbCharIsRTL; }
- bool IsParaRTL() const { return mbParaIsRTL; }
- rtl_TextEncoding GetCharSet() const { return meChrSet; }
- String GetSnippet(const String &rStr, xub_StrLen nAktPos,
- xub_StrLen nLen) const;
- const SwFmtDrop& GetSwFmtDrop() const { return mrSwFmtDrop; }
-};
-
class sortswflys :
public std::binary_function<const sw::Frame&, const sw::Frame&, bool>
{
@@ -248,18 +179,18 @@ public:
}
};
-void SwAttrIter::IterToCurrent()
+void SwWW8AttrIter::IterToCurrent()
{
- ASSERT(maCharRuns.begin() != maCharRuns.end(), "Impossible");
+ OSL_ENSURE(maCharRuns.begin() != maCharRuns.end(), "Impossible");
mnScript = maCharRunIter->mnScript;
meChrSet = maCharRunIter->meCharSet;
mbCharIsRTL = maCharRunIter->mbRTL;
}
-SwAttrIter::SwAttrIter(MSWordExportBase& rWr, const SwTxtNode& rTxtNd) :
+SwWW8AttrIter::SwWW8AttrIter(MSWordExportBase& rWr, const SwTxtNode& rTxtNd) :
MSWordAttrIter(rWr),
rNd(rTxtNd),
- maCharRuns(GetPseudoCharRuns(rTxtNd, 0, !rWr.HackIsWW8OrHigher())),
+ maCharRuns(GetPseudoCharRuns(rTxtNd, 0, !rWr.SupportsUnicode())),
pCurRedline(0),
nAktSwPos(0),
nCurRedlinePos(USHRT_MAX),
@@ -288,7 +219,7 @@ SwAttrIter::SwAttrIter(MSWordExportBase& rWr, const SwTxtNode& rTxtNd) :
only be supported by word anchored inline ("as character"), so force
this in the supportable case.
*/
- if (rWr.HackIsWW8OrHigher() && rWr.bInWriteEscher)
+ if (rWr.SupportsUnicode() && rWr.bInWriteEscher)
{
std::for_each(maFlyFrms.begin(), maFlyFrms.end(),
std::mem_fun_ref(&sw::Frame::ForceTreatAsInline));
@@ -323,7 +254,7 @@ xub_StrLen lcl_getMinPos( xub_StrLen pos1, xub_StrLen pos2 )
return min;
}
-xub_StrLen SwAttrIter::SearchNext( xub_StrLen nStartPos )
+xub_StrLen SwWW8AttrIter::SearchNext( xub_StrLen nStartPos )
{
xub_StrLen nPos;
xub_StrLen nMinPos = STRING_MAXLEN;
@@ -456,7 +387,14 @@ xub_StrLen SwAttrIter::SearchNext( xub_StrLen nStartPos )
return nMinPos;
}
-void SwAttrIter::OutAttr( xub_StrLen nSwPos )
+bool lcl_isFontsizeItem( const SfxPoolItem& rItem )
+{
+ return ( rItem.Which( ) == RES_CHRATR_FONTSIZE ||
+ rItem.Which( ) == RES_CHRATR_CJK_FONTSIZE ||
+ rItem.Which( ) == RES_CHRATR_CTL_FONTSIZE );
+}
+
+void SwWW8AttrIter::OutAttr( xub_StrLen nSwPos, bool bRuby )
{
m_rExport.AttrOutput().RTLAndCJKState( IsCharRTL(), GetScript() );
@@ -544,7 +482,10 @@ void SwAttrIter::OutAttr( xub_StrLen nSwPos )
sw::cPoolItemIter aEnd = aRangeItems.end();
for ( sw::cPoolItemIter aI = aRangeItems.begin(); aI != aEnd; ++aI )
- aExportItems[aI->first] = aI->second;
+ {
+ if ( !bRuby || !lcl_isFontsizeItem( *aI->second ) )
+ aExportItems[aI->first] = aI->second;
+ }
if ( !aExportItems.empty() )
{
@@ -559,7 +500,7 @@ void SwAttrIter::OutAttr( xub_StrLen nSwPos )
m_rExport.pOutFmtNode = pOldMod;
}
- ASSERT( pFont, "must be *some* font associated with this txtnode" );
+ OSL_ENSURE( pFont, "must be *some* font associated with this txtnode" );
if ( pFont )
{
SvxFontItem aFont( *pFont );
@@ -574,7 +515,7 @@ void SwAttrIter::OutAttr( xub_StrLen nSwPos )
this makes older nonunicode aware versions of word display the correct
characters.
*/
- if ( !m_rExport.HackIsWW8OrHigher() )
+ if ( !m_rExport.SupportsUnicode() )
aFont.GetCharSet() = GetCharSet();
if ( rParentFont != aFont )
@@ -582,7 +523,7 @@ void SwAttrIter::OutAttr( xub_StrLen nSwPos )
}
}
-void SwAttrIter::OutFlys(xub_StrLen nSwPos)
+void SwWW8AttrIter::OutFlys(xub_StrLen nSwPos)
{
/*
#i2916#
@@ -604,7 +545,7 @@ void SwAttrIter::OutFlys(xub_StrLen nSwPos)
}
}
-bool SwAttrIter::IsTxtAttr( xub_StrLen nSwPos )
+bool SwWW8AttrIter::IsTxtAttr( xub_StrLen nSwPos )
{
// search for attrs with CH_TXTATR
if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints())
@@ -620,7 +561,7 @@ bool SwAttrIter::IsTxtAttr( xub_StrLen nSwPos )
return false;
}
-bool SwAttrIter::IsDropCap( int nSwPos )
+bool SwWW8AttrIter::IsDropCap( int nSwPos )
{
// see if the current position falls on a DropCap
int nDropChars = mrSwFmtDrop.GetChars();
@@ -639,7 +580,7 @@ bool SwAttrIter::IsDropCap( int nSwPos )
return false;
}
-bool SwAttrIter::RequiresImplicitBookmark()
+bool SwWW8AttrIter::RequiresImplicitBookmark()
{
SwImplBookmarksIter bkmkIterEnd = m_rExport.maImplicitBookmarks.end();
for ( SwImplBookmarksIter aIter = m_rExport.maImplicitBookmarks.begin(); aIter != bkmkIterEnd; ++aIter )
@@ -658,13 +599,14 @@ bool SwAttrIter::RequiresImplicitBookmark()
// Attribut-Anfangposition fragen kann.
// Es koennen nur Attribute mit Ende abgefragt werden.
// Es wird mit bDeep gesucht
-const SfxPoolItem* SwAttrIter::HasTextItem( sal_uInt16 nWhich ) const
+const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const
{
const SfxPoolItem* pRet = 0;
const SwpHints* pTxtAttrs = rNd.GetpSwpHints();
- xub_StrLen nTmpSwPos = m_rExport.m_aCurrentCharPropStarts.top();
- if (pTxtAttrs)
+
+ if (pTxtAttrs && m_rExport.m_aCurrentCharPropStarts.size())
{
+ xub_StrLen nTmpSwPos = m_rExport.m_aCurrentCharPropStarts.top();
for (sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i)
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
@@ -691,13 +633,13 @@ void WW8Export::GetCurrentItems(WW8Bytes& rItems) const
rItems.Insert((*pO)[nI], rItems.Count());
}
-const SfxPoolItem& SwAttrIter::GetItem(sal_uInt16 nWhich) const
+const SfxPoolItem& SwWW8AttrIter::GetItem(sal_uInt16 nWhich) const
{
const SfxPoolItem* pRet = HasTextItem(nWhich);
return pRet ? *pRet : rNd.SwCntntNode::GetAttr(nWhich);
}
-void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby )
+void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen /*nPos*/, const SwFmtRuby& rRuby )
{
String aStr( FieldString( ww::eEQ ) );
aStr.APPEND_CONST_ASC( "\\* jc" );
@@ -725,7 +667,7 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRu
cDirective = 'd';
break;
default:
- ASSERT( !this,"Unhandled Ruby justication code" );
+ OSL_ENSURE( !this,"Unhandled Ruby justication code" );
break;
}
aStr += String::CreateFromInt32( nJC );
@@ -762,14 +704,14 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRu
/*Get defaults if no formatting on ruby text*/
const SfxItemPool *pPool = rNode.GetSwAttrSet().GetPool();
- const SfxItemPool &rPool = pPool ? *pPool : m_rWW8Export.pDoc->GetAttrPool();
+ pPool = pPool ? pPool : &m_rWW8Export.pDoc->GetAttrPool();
- const SvxFontItem &rFont = DefaultItemGet< SvxFontItem >( rPool,
+ const SvxFontItem &rFont = DefaultItemGet< SvxFontItem >( *pPool,
GetWhichOfScript( RES_CHRATR_FONT,nRubyScript ) );
sFamilyName = rFont.GetFamilyName();
const SvxFontHeightItem &rHeight = DefaultItemGet< SvxFontHeightItem >
- ( rPool, GetWhichOfScript( RES_CHRATR_FONTSIZE, nRubyScript ) );
+ ( *pPool, GetWhichOfScript( RES_CHRATR_FONTSIZE, nRubyScript ) );
nHeight = rHeight.GetHeight();
}
nHeight = (nHeight + 5)/10;
@@ -801,7 +743,14 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRu
aStr += String::CreateFromInt32(nHeight);
aStr += '(';
aStr += rRuby.GetText();
- aStr.APPEND_CONST_ASC( ");" );
+ aStr.APPEND_CONST_ASC( ")" );
+
+ // The parameter separator depends on the FIB.lid
+ if ( m_rWW8Export.pFib->getNumDecimalSep() == '.' )
+ aStr.APPEND_CONST_ASC( "," );
+ else
+ aStr.APPEND_CONST_ASC( ";" );
+
m_rWW8Export.OutputField( 0, ww::eEQ, aStr,
WRITEFIELD_START | WRITEFIELD_CMD_START );
}
@@ -817,7 +766,7 @@ String &TruncateBookmark( String &rRet )
{
if ( rRet.Len() > 40 )
rRet.Erase( 40 );
- ASSERT( rRet.Len() <= 40, "Word cannot have bookmarks longer than 40 chars" );
+ OSL_ENSURE( rRet.Len() <= 40, "Word cannot have bookmarks longer than 40 chars" );
return rRet;
}
@@ -849,7 +798,7 @@ bool AttributeOutputBase::AnalyzeURL( const String& rUrl, const String& /*rTarge
if ( bkmkName == sLink )
{
- sMark = String( RTL_CONSTASCII_STRINGPARAM( "_toc" ) );
+ sMark = String( RTL_CONSTASCII_USTRINGPARAM( "_toc" ) );
sMark += String::CreateFromInt32( aIter->second );
}
}
@@ -946,7 +895,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
//all links end up in the data stream as absolute references.
bool bAbsolute = !bBookMarkOnly;
- static sal_uInt8 __READONLY_DATA aURLData1[] = {
+ static sal_uInt8 aURLData1[] = {
0,0,0,0, // len of struct
0x44,0, // the start of "next" data
0,0,0,0,0,0,0,0,0,0, // PIC-Structure!
@@ -955,7 +904,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // |
0,0,0,0, // /
};
- static sal_uInt8 __READONLY_DATA MAGIC_A[] = {
+ static sal_uInt8 MAGIC_A[] = {
// start of "next" data
0xD0,0xC9,0xEA,0x79,0xF9,0xBA,0xCE,0x11,
0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B
@@ -976,17 +925,17 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, nFlag );
INetProtocol eProto = aURL.GetProtocol();
- if ( eProto == INET_PROT_FILE )
+ if ( eProto == INET_PROT_FILE || eProto == INET_PROT_SMB )
{
// version 1 (for a document)
- static sal_uInt8 __READONLY_DATA MAGIC_C[] = {
+ static sal_uInt8 MAGIC_C[] = {
0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46,
0x00, 0x00
};
- static sal_uInt8 __READONLY_DATA MAGIC_D[] = {
+ static sal_uInt8 MAGIC_D[] = {
0xFF, 0xFF, 0xAD, 0xDE, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
@@ -994,7 +943,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
// save the links to files as relative
sURL = URIHelper::simpleNormalizedMakeRelative( m_rWW8Export.GetWriter().GetBaseURL(), sURL );
- if ( sURL.EqualsAscii( "/", 0, 1 ) )
+ if ( eProto == INET_PROT_FILE && sURL.EqualsAscii( "/", 0, 1 ) )
sURL = aURL.PathToFileName();
// special case for the absolute windows names
@@ -1008,6 +957,15 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
sURL.SearchAndReplaceAll( '/', '\\' );
}
+ // n#261623 convert smb notation to '\\'
+ const char pSmb[] = "smb://";
+ if ( eProto == INET_PROT_SMB &&
+ sURL.EqualsAscii( pSmb, 0, sizeof( pSmb ) - 1 ) )
+ {
+ sURL.Erase( 0, sizeof( pSmb ) - 3 );
+ sURL.SearchAndReplaceAll( '/', '\\' );
+ }
+
m_rWW8Export.pDataStrm->Write( MAGIC_C, sizeof(MAGIC_C) );
SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, sURL.Len()+1 );
SwWW8Writer::WriteString8( *m_rWW8Export.pDataStrm, sURL, true,
@@ -1026,7 +984,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
// what the data mean, except for the URL.
// The First piece is the WW8_PIC structure.
//
- static sal_uInt8 __READONLY_DATA MAGIC_B[] = {
+ static sal_uInt8 MAGIC_B[] = {
0xE0,0xC9,0xEA,0x79,0xF9,0xBA,0xCE,0x11,
0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B
};
@@ -1072,7 +1030,7 @@ String BookmarkToWriter(const String &rBookmark)
INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_ASCII_US);
}
-void SwAttrIter::OutSwFmtRefMark(const SwFmtRefMark& rAttr, bool)
+void SwWW8AttrIter::OutSwFmtRefMark(const SwFmtRefMark& rAttr, bool)
{
if ( m_rExport.HasRefToObject( REF_SETREFATTR, &rAttr.GetRefName(), 0 ) )
m_rExport.AppendBookmark( m_rExport.GetBookmarkName( REF_SETREFATTR,
@@ -1164,7 +1122,7 @@ void AttributeOutputBase::TOXMark( const SwTxtNode& rNode, const SwTOXMark& rAtt
}
break;
default:
- ASSERT( !this, "Unhandled option for toc export" );
+ OSL_ENSURE( !this, "Unhandled option for toc export" );
break;
}
@@ -1172,7 +1130,7 @@ void AttributeOutputBase::TOXMark( const SwTxtNode& rNode, const SwTOXMark& rAtt
FieldVanish( sTxt, eType );
}
-int SwAttrIter::OutAttrWithRange(xub_StrLen nPos)
+int SwWW8AttrIter::OutAttrWithRange(xub_StrLen nPos)
{
int nRet = 0;
if ( const SwpHints* pTxtAttrs = rNd.GetpSwpHints() )
@@ -1217,7 +1175,7 @@ int SwAttrIter::OutAttrWithRange(xub_StrLen nPos)
case RES_TXTATR_CJK_RUBY:
if ( nPos == *pHt->GetStart() )
{
- m_rExport.AttrOutput().StartRuby( rNd, *static_cast< const SwFmtRuby* >( pItem ) );
+ m_rExport.AttrOutput().StartRuby( rNd, nPos, *static_cast< const SwFmtRuby* >( pItem ) );
++nRet;
}
if ( 0 != ( pEnd = pHt->GetEnd() ) && nPos == *pEnd )
@@ -1233,7 +1191,7 @@ int SwAttrIter::OutAttrWithRange(xub_StrLen nPos)
return nRet;
}
-bool SwAttrIter::IsRedlineAtEnd( xub_StrLen nEnd ) const
+bool SwWW8AttrIter::IsRedlineAtEnd( xub_StrLen nEnd ) const
{
bool bRet = false;
// search next Redline
@@ -1255,7 +1213,7 @@ bool SwAttrIter::IsRedlineAtEnd( xub_StrLen nEnd ) const
return bRet;
}
-const SwRedlineData* SwAttrIter::GetRedline( xub_StrLen nPos )
+const SwRedlineData* SwWW8AttrIter::GetRedline( xub_StrLen nPos )
{
if( pCurRedline )
{
@@ -1380,7 +1338,7 @@ short MSWordExportBase::TrueFrameDirection( const SwFrmFmt &rFlyFmt ) const
else
nRet = GetCurrentPageDirection();
- ASSERT( nRet != FRMDIR_ENVIRONMENT, "leaving with environment direction" );
+ OSL_ENSURE( nRet != FRMDIR_ENVIRONMENT, "leaving with environment direction" );
return nRet;
}
@@ -1450,7 +1408,7 @@ Convert characters that need to be converted, the basic replacements and the
ridicously complicated title case attribute mapping to hardcoded upper case
because word doesn't have the feature
*/
-String SwAttrIter::GetSnippet(const String &rStr, xub_StrLen nAktPos,
+String SwWW8AttrIter::GetSnippet(const String &rStr, xub_StrLen nAktPos,
xub_StrLen nLen) const
{
String aSnippet(rStr, nAktPos, nLen);
@@ -1646,7 +1604,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() );
}
-xub_StrLen MSWordExportBase::GetNextPos( SwAttrIter* aAttrIter, const SwTxtNode& rNode, xub_StrLen nAktPos )
+xub_StrLen MSWordExportBase::GetNextPos( SwWW8AttrIter* aAttrIter, const SwTxtNode& rNode, xub_StrLen nAktPos )
{
// Get the bookmarks for the normal run
xub_StrLen nNextPos = aAttrIter->WhereNext();
@@ -1659,7 +1617,7 @@ xub_StrLen MSWordExportBase::GetNextPos( SwAttrIter* aAttrIter, const SwTxtNode&
return std::min( nNextPos, nNextBookmark );
}
-void MSWordExportBase::UpdatePosition( SwAttrIter* aAttrIter, xub_StrLen nAktPos, xub_StrLen /*nEnd*/ )
+void MSWordExportBase::UpdatePosition( SwWW8AttrIter* aAttrIter, xub_StrLen nAktPos, xub_StrLen /*nEnd*/ )
{
xub_StrLen nNextPos;
@@ -1797,7 +1755,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// have to remember it in nStyle
sal_uInt16 nStyle = nStyleBeforeFly;
- SwAttrIter aAttrIter( *this, rNode );
+ SwWW8AttrIter aAttrIter( *this, rNode );
rtl_TextEncoding eChrSet = aAttrIter.GetCharSet();
if ( bStartTOX )
@@ -1829,14 +1787,11 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if ( aAttrIter.RequiresImplicitBookmark() )
{
- String sBkmkName = String( RTL_CONSTASCII_STRINGPARAM( "_toc" ) );
+ String sBkmkName = String( RTL_CONSTASCII_USTRINGPARAM( "_toc" ) );
sBkmkName += String::CreateFromInt32( rNode.GetIndex() );
AppendWordBookmark( sBkmkName );
}
- //Would need to move into WW8Export, probably not worth it
- //ASSERT( pO->Count(), " pO ist am Zeilenanfang nicht leer" );
-
String aStr( rNode.GetTxt() );
xub_StrLen nAktPos = 0;
@@ -1852,6 +1807,8 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
const SwRedlineData* pRedlineData = aAttrIter.GetRedline( nAktPos );
AttrOutput().StartRun( pRedlineData );
+ if( nTxtTyp == TXT_FTN || nTxtTyp == TXT_EDN )
+ AttrOutput().FootnoteEndnoteRefTag();
xub_StrLen nNextAttr = GetNextPos( &aAttrIter, rNode, nAktPos );
@@ -1874,27 +1831,77 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
if ( ch == CH_TXT_ATR_FIELDSTART )
{
- SwPosition aPosition( rNode, SwIndex( const_cast< SwTxtNode* >( &rNode ), nAktPos + 1 ) );
+ SwPosition aPosition( rNode, SwIndex( const_cast< SwTxtNode* >( &rNode ), nAktPos ) );
::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition );
OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" );
- if ( pFieldmark->GetFieldname().equalsAscii( ODF_FORMTEXT ) )
+ if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) )
AppendBookmark( pFieldmark->GetName(), false );
- OutputField( NULL, lcl_getFieldId( pFieldmark ), lcl_getFieldCode( pFieldmark ), WRITEFIELD_START | WRITEFIELD_CMD_START );
- if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMTEXT ) )
+ ww::eField eFieldId = lcl_getFieldId( pFieldmark );
+ String sCode = lcl_getFieldCode( pFieldmark );
+ if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) )
+ {
+ IFieldmark::parameter_map_t::const_iterator it = pFieldmark->GetParameters()->find(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_ID_PARAM )) );
+ if ( it != pFieldmark->GetParameters()->end() )
+ {
+ rtl::OUString sFieldId;
+ it->second >>= sFieldId;
+ eFieldId = (ww::eField)sFieldId.toInt32();
+ }
+
+ it = pFieldmark->GetParameters()->find(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_CODE_PARAM )) );
+ if ( it != pFieldmark->GetParameters()->end() )
+ {
+ rtl::OUString sOUCode;
+ it->second >>= sOUCode;
+ sCode = sOUCode;
+ }
+ }
+ OutputField( NULL, eFieldId, sCode, WRITEFIELD_START | WRITEFIELD_CMD_START );
+ if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) )
WriteFormData( *pFieldmark );
- else if ( pFieldmark->GetFieldname( ).equalsAscii( ODF_HYPERLINK ) )
+ else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_HYPERLINK ) ) )
WriteHyperlinkData( *pFieldmark );
OutputField( NULL, lcl_getFieldId( pFieldmark ), String(), WRITEFIELD_CMD_END );
+
+ if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) )
+ {
+ // Check for the presence of a linked OLE object
+ IFieldmark::parameter_map_t::const_iterator it = pFieldmark->GetParameters()->find(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_OLE_PARAM )) );
+ if ( it != pFieldmark->GetParameters()->end() )
+ {
+ rtl::OUString sOleId;
+ uno::Any aValue = it->second;
+ aValue >>= sOleId;
+ if ( sOleId.getLength( ) > 0 )
+ OutputLinkedOLE( sOleId );
+ }
+ }
}
else if ( ch == CH_TXT_ATR_FIELDEND )
{
- SwPosition aPosition( rNode, SwIndex( const_cast< SwTxtNode* >( &rNode ), nAktPos ) );
+ SwPosition aPosition( rNode, SwIndex( const_cast< SwTxtNode* >( &rNode ), nAktPos - 1 ) );
::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition );
- OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" );
+ OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDEND??" );
- OutputField( NULL, lcl_getFieldId( pFieldmark ), String(), WRITEFIELD_CLOSE );
- if ( pFieldmark->GetFieldname().equalsAscii( ODF_FORMTEXT ) )
+ ww::eField eFieldId = lcl_getFieldId( pFieldmark );
+ if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) )
+ {
+ IFieldmark::parameter_map_t::const_iterator it = pFieldmark->GetParameters()->find(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_ID_PARAM )) );
+ if ( it != pFieldmark->GetParameters()->end() )
+ {
+ rtl::OUString sFieldId;
+ it->second >>= sFieldId;
+ eFieldId = (ww::eField)sFieldId.toInt32();
+ }
+ }
+
+ OutputField( NULL, eFieldId, String(), WRITEFIELD_CLOSE );
+ if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) )
AppendBookmark( pFieldmark->GetName(), false );
}
else if ( ch == CH_TXT_ATR_FORMELEMENT )
@@ -1903,8 +1910,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 FIELDSTART??" );
- bool isDropdownOrCheckbox = pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMDROPDOWN ) ||
- pFieldmark->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX );
+ bool isDropdownOrCheckbox = pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) ||
+ pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) );
if ( isDropdownOrCheckbox )
AppendBookmark( pFieldmark->GetName(), 0 );
@@ -1936,7 +1943,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// Exception: footnotes at the end of line
if ( nNextAttr == nEnd )
{
- ASSERT( nOpenAttrWithRange >= 0, "odd to see this happening, expected >= 0" );
+ OSL_ENSURE( nOpenAttrWithRange >= 0, "odd to see this happening, expected >= 0" );
if ( !bTxtAtr && nOpenAttrWithRange <= 0 )
{
if ( aAttrIter.IsRedlineAtEnd( nEnd ) )
@@ -1965,13 +1972,13 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// Exception: footnotes at the end of line
if ( nNextAttr == nEnd )
{
- ASSERT(nOpenAttrWithRange >= 0,
+ OSL_ENSURE(nOpenAttrWithRange >= 0,
"odd to see this happening, expected >= 0");
bool bAttrWithRange = (nOpenAttrWithRange > 0);
if ( nAktPos != nEnd )
{
nOpenAttrWithRange += aAttrIter.OutAttrWithRange(nEnd);
- ASSERT(nOpenAttrWithRange == 0,
+ OSL_ENSURE(nOpenAttrWithRange == 0,
"odd to see this happening, expected 0");
}
@@ -2052,13 +2059,13 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
{
pTmpSet = new SfxItemSet( rNode.GetSwAttrSet() );
SvxULSpaceItem aUL( *(SvxULSpaceItem*)pItem );
- // OD, MMAHER 2004-03-01 #i25901#- consider compatibility option
+ // #i25901#- consider compatibility option
if (!pDoc->get(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES))
{
if( !(ND_HAS_PREV_LAYNODE & nPrvNxtNd ))
aUL.SetUpper( 0 );
}
- // OD, MMAHER 2004-03-01 #i25901# - consider compatibility option
+ // #i25901# - consider compatibility option
if (!pDoc->get(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS))
{
if( !(ND_HAS_NEXT_LAYNODE & nPrvNxtNd ))
@@ -2086,7 +2093,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
pTmpSet = new SfxItemSet( rNode.GetSwAttrSet() );
SvxLRSpaceItem aLR(ItemGet<SvxLRSpaceItem>(*pTmpSet, RES_LR_SPACE));
- // --> OD 2008-06-03 #i86652#
+ // #i86652#
if ( pFmt->GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -2096,7 +2103,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if( rNode.IsNumbered() && rNode.IsCountedInList() )
{
- // --> OD 2008-06-03 #i86652#
+ // #i86652#
if ( pFmt->GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -2107,7 +2114,6 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
}
// <--
- // --> OD 2009-03-09 #100020#
// correct fix for issue i94187
if (SFX_ITEM_SET !=
pTmpSet->GetItemState(RES_PARATR_NUMRULE, false) )
@@ -2131,7 +2137,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
else
pTmpSet->ClearItem(RES_PARATR_NUMRULE);
- // --> OD 2008-06-03 #i86652#
+ // #i86652#
if ( pFmt->GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -2165,7 +2171,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
pTmpSet->Put(SvxFrameDirectionItem(FRMDIR_HORI_RIGHT_TOP, RES_FRAMEDIR));
}
- // --> OD 2005-10-18 #126238# - move code for handling of numbered,
+ // move code for handling of numbered,
// but not counted paragraphs to this place. Otherwise, the paragraph
// isn't exported as numbered, but not counted, if no other attribute
// is found in <pTmpSet>
@@ -2194,7 +2200,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// new left margin = old left + label space
const SwNumRule* pRule = rNode.GetNumRule();
const SwNumFmt& rNumFmt = pRule->Get( static_cast< sal_uInt16 >(rNode.GetActualListLevel()) );
- // --> OD 2008-06-03 #i86652#
+ // #i86652#
if ( rNumFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -2217,7 +2223,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
}
}
- // --> OD 2007-04-24 #i75457#
+ // #i75457#
// Export page break after attribute from paragraph style.
// If page break attribute at the text node exist, an existing page
// break after at the paragraph style hasn't got to be considered.
@@ -2245,7 +2251,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
}
}
- // --> FME 2007-05-30 #i76520# Emulate non-splitting tables
+ // #i76520# Emulate non-splitting tables
if ( bOutTable )
{
const SwTableNode* pTableNode = rNode.FindTableNode();
@@ -2320,6 +2326,11 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
}
}
+ // write attributes of the node itself
+ AttrOutput().StartRunProperties();
+ OutputItemSet( rNode.GetSwAttrSet(), false, true, i18n::ScriptType::LATIN, false);
+ AttrOutput().EndRunProperties( NULL );
+
AttrOutput().EndParagraphProperties();
AttrOutput().EndParagraph( pTextNodeInfoInner );
@@ -2355,111 +2366,9 @@ void WW8AttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeIn
{
}
- aIt++;
- }
-}
-
-#if 0
-/* */
-
-sal_uInt16 WW8Export::StartTableFromFrmFmt( WW8Bytes &rAt, const SwFrmFmt *pFmt )
-{
- // Tell the undocumented table hack that everything between here and
- // the last table position is nontable text
- if ( WW8_CP nPos = Fc2Cp( Strm().Tell() ) )
- pMagicTable->Append(nPos,0);
-
- // sprmPDxaFromText10
- if( bWrtWW8 )
- {
- static sal_uInt8 __READONLY_DATA aTabLineAttr[] = {
- 0, 0, // Sty # 0
- 0x16, 0x24, 1, // sprmPFInTable
- 0x17, 0x24, 1 }; // sprmPFTtp
- rAt.Insert( aTabLineAttr, sizeof( aTabLineAttr ), rAt.Count() );
- }
- else
- {
- static sal_uInt8 __READONLY_DATA aTabLineAttr[] = {
- 0, 0, // Sty # 0
- 24, 1, // sprmPFInTable
- 25, 1 }; // sprmPFTtp
- rAt.Insert( aTabLineAttr, sizeof( aTabLineAttr ), rAt.Count() );
- }
-
- ASSERT( pFmt, "No pFmt!" );
- if ( pFmt )
- {
- const SwFmtHoriOrient &rHori = pFmt->GetHoriOrient();
- const SwFmtVertOrient &rVert = pFmt->GetVertOrient();
- if (
- (text::RelOrientation::PRINT_AREA == rHori.GetRelationOrient() ||
- text::RelOrientation::FRAME == rHori.GetRelationOrient())
- &&
- (text::RelOrientation::PRINT_AREA == rVert.GetRelationOrient() ||
- text::RelOrientation::FRAME == rVert.GetRelationOrient())
- )
- {
- sal_Int16 eHOri = rHori.GetHoriOrient();
- switch (eHOri)
- {
- case text::HoriOrientation::CENTER:
- case text::HoriOrientation::RIGHT:
- if( bWrtWW8 )
- SwWW8Writer::InsUInt16( rAt, NS_sprm::LN_TJc );
- else
- rAt.Insert( 182, rAt.Count() );
- SwWW8Writer::InsUInt16( rAt, (text::HoriOrientation::RIGHT == eHOri ? 2 : 1 ));
- break;
- default:
- break;
- }
- }
- }
- return rAt.Count();
-}
-
-//See #i19484# for why we need this
-static bool CellContainsProblematicGraphic( const SwWriteTableCell *pCell,
- const MSWordExportBase &rExport )
-{
- const SwNode *pStart = pCell ? pCell->GetBox()->GetSttNd() : 0;
- const SwNode *pEnd = pStart ? pStart->EndOfSectionNode() : 0;
- ASSERT( pStart && pEnd, "No start or end?" );
- if ( !pStart || !pEnd )
- return false;
-
- bool bHasGraphic = false;
-
- sw::Frames aFrames( GetFramesBetweenNodes( rExport.maFrames, *pStart, *pEnd ) );
- sw::FrameIter aEnd = aFrames.end();
- for ( sw::FrameIter aIter = aFrames.begin(); aIter != aEnd; ++aIter )
- {
- const SwFrmFmt &rEntry = aIter->GetFrmFmt();
- if ( rEntry.GetSurround().GetSurround() == SURROUND_THROUGHT )
- {
- bHasGraphic = true;
- break;
- }
- }
- return bHasGraphic;
-}
-
-static bool RowContainsProblematicGraphic( const SwWriteTableCellPtr *pRow,
- sal_uInt16 nCols, const MSWordExportBase &rExport )
-{
- bool bHasGraphic = false;
- for ( sal_uInt16 nI = 0; nI < nCols; ++nI )
- {
- if ( CellContainsProblematicGraphic( pRow[nI], rExport ) )
- {
- bHasGraphic = true;
- break;
- }
+ ++aIt;
}
- return bHasGraphic;
}
-#endif
//---------------------------------------------------------------------------
// Tabellen
//---------------------------------------------------------------------------
@@ -2569,7 +2478,7 @@ void WW8Export::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt*
void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd )
{
- ASSERT(!bWrtWW8, "I shouldn't be needed for Word >=8");
+ OSL_ENSURE(!bWrtWW8, "I shouldn't be needed for Word >=8");
if ( bWrtWW8 )
return;
@@ -2634,7 +2543,6 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
bUseEscher = true;
/*
- #110185#
A special case for converting some inline form controls to form fields
when in winword 8+ mode
*/
@@ -2647,7 +2555,7 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
if (bUseEscher)
{
- ASSERT( m_rWW8Export.bWrtWW8, "this has gone horribly wrong" );
+ OSL_ENSURE( m_rWW8Export.bWrtWW8, "this has gone horribly wrong" );
// write as escher
m_rWW8Export.AppendFlyInFlys(rFmt, rNdTopLeft);
}
@@ -2673,24 +2581,13 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
}
if( !bDone )
{
- // ein NICHT zeichengebundener Rahmen liegt vor
-
- // --> OD 2007-04-19 #i43447# - removed
-// const SwFmtFrmSize& rS = rFrmFmt.GetFrmSize();
-// nFlyWidth = rS.GetWidth(); // Fuer Anpassung Graphic-Groesse
-// nFlyHeight = rS.GetHeight();
- // <--
m_rWW8Export.SaveData( nStt, nEnd );
Point aOffset;
if ( m_rWW8Export.mpParentFrame )
{
- /*
- #90804#
- Munge flys in fly into absolutely positioned elements for
- word 6
- */
+ /* Munge flys in fly into absolutely positioned elements for word 6 */
const SwTxtNode* pParTxtNode = rAnch.GetCntntAnchor()->nNode.GetNode().GetTxtNode();
const SwRect aPageRect = pParTxtNode->FindPageFrmRect( sal_False, 0, sal_False );
@@ -2769,7 +2666,7 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline )
if ( pRedline->Next() )
Redline( pRedline->Next() );
- static sal_uInt16 __READONLY_DATA aSprmIds[ 2 * 2 * 3 ] =
+ static sal_uInt16 aSprmIds[ 2 * 2 * 3 ] =
{
// Ids for insert
NS_sprm::LN_CFRMark, NS_sprm::LN_CIbstRMark, NS_sprm::LN_CDttmRMark, // for WW8
@@ -2801,7 +2698,7 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline )
}
break;
default:
- ASSERT(!this, "Unhandled redline type for export");
+ OSL_ENSURE(!this, "Unhandled redline type for export");
break;
}
@@ -2846,11 +2743,9 @@ void MSWordExportBase::OutputContentNode( const SwCntntNode& rNode )
OutputOLENode( *rNode.GetOLENode() );
break;
default:
-#if OSL_DEBUG_LEVEL > 0
OSL_TRACE("Unhandled node, type == %d\n", rNode.GetNodeType() );
-#endif
break;
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index e8cb9a755087..5afc0075ca4e 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
#include <hintids.hxx>
#include <vcl/font.hxx>
#include <editeng/fontitem.hxx>
@@ -50,11 +49,6 @@
#include "wrtww8.hxx"
#include "ww8par.hxx"
-//#define DUMPSYMBOLS
-#ifdef DUMPSYMBOLS
-#include <fstream>
-#endif
-
using namespace ::com::sun::star;
using namespace sw::types;
using namespace sw::util;
@@ -64,11 +58,9 @@ sal_uInt16 MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, sal_uInt8
sal_uInt16 nNumId = USHRT_MAX;
String sPrefix( CREATE_CONST_ASC( "WW8TempExport" ) );
sPrefix += String::CreateFromInt32( nUniqueList++ );
- // --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule* pMyNumRule =
new SwNumRule( pDoc->GetUniqueNumRuleName( &sPrefix ),
SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
- // <--
pUsedNumTbl->Insert( pMyNumRule, pUsedNumTbl->Count() );
for ( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
@@ -95,8 +87,8 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule )
{
pUsedNumTbl = new SwNumRuleTbl;
pUsedNumTbl->Insert( &pDoc->GetNumRuleTbl(), 0 );
- // --> OD 2005-10-17 #126238# - Check, if the outline rule is
- // already inserted into <pUsedNumTbl>. If yes, do not insert it again.
+ // Check, if the outline rule is already inserted into <pUsedNumTbl>.
+ // If yes, do not insert it again.
bool bOutlineRuleAdded( false );
for ( sal_uInt16 n = pUsedNumTbl->Count(); n; )
{
@@ -123,8 +115,7 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule )
sal_uInt16 nRet = pUsedNumTbl->GetPos(p);
//Is this list now duplicated into a new list which we should use
- // --> OD 2007-05-30 #i77812#
- // perform 'deep' search in duplication map
+ // #i77812# - perform 'deep' search in duplication map
::std::map<sal_uInt16,sal_uInt16>::const_iterator aResult = aRuleDuplicates.end();
do {
aResult = aRuleDuplicates.find(nRet);
@@ -142,7 +133,7 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule )
//here in the ww export filter
sal_Int16 GetWordFirstLineOffset(const SwNumFmt &rFmt)
{
- ASSERT( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION,
+ OSL_ENSURE( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION,
"<GetWordFirstLineOffset> - misusage: position-and-space-mode does not equal LABEL_WIDTH_AND_POSITION" );
short nFirstLineOffset;
@@ -331,7 +322,7 @@ void MSWordExportBase::AbstractNumberingDefinitions()
const SwNumFmt& rFmt = rRule.Get( nLvl );
sal_uInt8 nFollow = 0;
- // --> OD 2008-06-03 #i86652#
+ // #i86652#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nFollow = 2; // ixchFollow: 0 - tab, 1 - blank, 2 - nothing
@@ -360,7 +351,7 @@ void MSWordExportBase::AbstractNumberingDefinitions()
default:
{
nFollow = 0;
- ASSERT( false,
+ OSL_ENSURE( false,
"unknown GetLabelFollowedBy() return value" );
}
}
@@ -393,17 +384,15 @@ void MSWordExportBase::AbstractNumberingDefinitions()
if ( sw::util::IsStarSymbol( sFontName ) )
SubstituteBullet( sNumStr, eChrSet, sFontName );
- // --> OD 2008-06-03 #i86652#
+ // #i86652#
if ( rFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
- // --> OD 2007-07-23 #148661#
// <nFollow = 2>, if minimum label width equals 0 and
// minimum distance between label and text equals 0
nFollow = ( rFmt.GetFirstLineOffset() == 0 &&
rFmt.GetCharTextDistance() == 0 )
? 2 : 0; // ixchFollow: 0 - tab, 1 - blank, 2 - nothing
- // <--
}
// <--
}
@@ -412,8 +401,8 @@ void MSWordExportBase::AbstractNumberingDefinitions()
if (SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType())
{
sal_uInt8* pLvlPos = aNumLvlPos;
- // --> OD 2005-10-17 #126238# - the numbering string
- // has to be restrict to the level currently working on.
+ // the numbering string has to be restrict
+ // to the level currently working on.
sNumStr = rRule.MakeNumString(aNumVector, false, true, nLvl);
// <--
@@ -429,17 +418,15 @@ void MSWordExportBase::AbstractNumberingDefinitions()
sNumStr.SetChar( nFnd, (char)i );
}
}
- // --> OD 2008-06-03 #i86652#
+ // #i86652#
if ( rFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
- // --> OD 2007-07-23 #148661#
// <nFollow = 2>, if minimum label width equals 0 and
// minimum distance between label and text equals 0
nFollow = ( rFmt.GetFirstLineOffset() == 0 &&
rFmt.GetCharTextDistance() == 0 )
? 2 : 0; // ixchFollow: 0 - tab, 1 - blank, 2 - nothing
- // <--
}
// <--
}
@@ -471,7 +458,7 @@ void MSWordExportBase::AbstractNumberingDefinitions()
sFontName = pBulletFont->GetName();
pPseudoFont = new wwFont( sFontName, pBulletFont->GetPitch(),
- eFamily, eChrSet, HackIsWW8OrHigher() );
+ eFamily, eChrSet, SupportsUnicode() );
}
else
pOutSet = &rFmt.GetCharFmt()->GetAttrSet();
@@ -481,7 +468,7 @@ void MSWordExportBase::AbstractNumberingDefinitions()
sal_Int16 nFirstLineIndex = 0;
sal_Int16 nListTabPos = 0;
- // --> OD 2008-06-03 #i86652#
+ // #i86652#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nIndentAt = nListTabPos = rFmt.GetAbsLSpace();
@@ -574,12 +561,12 @@ void WW8Export::OutputOlst( const SwNumRule& rRule )
if ( bWrtWW8 )
return;
- static sal_uInt8 __READONLY_DATA aAnlvBase[] = { // Defaults
+ static sal_uInt8 aAnlvBase[] = { // Defaults
1,0,0, // Upper Roman
0x0C, // Hanging Indent, fPrev
0,0,1,0x80,0,0,1,0,0x1b,1,0,0 };
- static sal_uInt8 __READONLY_DATA aSprmOlstHdr[] = { 133, 212 };
+ static sal_uInt8 aSprmOlstHdr[] = { 133, 212 };
pO->Insert( aSprmOlstHdr, sizeof( aSprmOlstHdr ), pO->Count() );
WW8_OLST aOlst;
@@ -610,10 +597,7 @@ void WW8Export::Out_WwNumLvl( sal_uInt8 nWwLevel )
void WW8Export::Out_SwNumLvl( sal_uInt8 nSwLevel )
{
- // --> OD 2008-04-02 #refactorlists#
-// ASSERT(IsNum(nSwLevel), "numbered?");
- ASSERT( nSwLevel < MAXLEVEL, "numbered?");
- // <--
+ OSL_ENSURE( nSwLevel < MAXLEVEL, "numbered?");
Out_WwNumLvl( nSwLevel + 1 );
}
@@ -640,7 +624,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
break;
}
- // --> OD 2008-06-03 #i86652#
+ // #i86652#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
if (GetWordFirstLineOffset(rFmt) < 0)
@@ -651,13 +635,9 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
if (1 < rCharLen)
{
- // --> OD 2006-06-27 #b6440955#
-// const Font& rFont = rFmt.GetBulletFont() ? *rFmt.GetBulletFont()
-// : SwNumRule::GetDefBulletFont();
const Font& rFont = rFmt.GetBulletFont()
? *rFmt.GetBulletFont()
: numfunc::GetDefBulletFont();
- // <--
String sNumStr = rFmt.GetBulletChar();
rtl_TextEncoding eChrSet = rFont.GetCharSet();
String sFontName = rFont.GetName();
@@ -701,7 +681,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
ShortToSVBT16(nFontId, rAnlv.ftc);
ByteToSVBT8( 1, rAnlv.cbTextBefore );
}
- // --> OD 2008-06-03 #i86652#
+ // #i86652#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
ShortToSVBT16( -GetWordFirstLineOffset(rFmt), rAnlv.dxaIndent );
@@ -719,7 +699,9 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
rtl_TextEncoding& rChrSet, String& rFontName ) const
{
StarSymbolToMSMultiFont *pConvert = 0;
- FontFamily eFamily = FAMILY_DECORATIVE;
+
+ if (!bSubstituteBullets)
+ return;
if (!bSubstituteBullets)
return;
@@ -727,15 +709,6 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
if (!pConvert)
{
pConvert = CreateStarSymbolToMSMultiFont();
-#ifdef DUMPSYMBOLS
- ::std::ofstream output("fontdebug");
- for (sal_Unicode i=0xE000;i<0xF8FF;i++)
- {
- String sFont = pConvert->ConvertChar(i);
- if (sFont.Len())
- output << ::std::hex << i << std::endl;
- }
-#endif
}
sal_Unicode cChar = rNumStr.GetChar(0);
String sFont = pConvert->ConvertChar(cChar);
@@ -746,7 +719,7 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
rFontName = sFont;
rChrSet = RTL_TEXTENCODING_SYMBOL;
}
- else if ( HackIsWW8OrHigher() &&
+ else if ( SupportsUnicode() &&
(rNumStr.GetChar(0) < 0xE000 || rNumStr.GetChar(0) > 0xF8FF) )
{
/*
@@ -756,7 +729,6 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
let words own font substitution kick in
*/
rChrSet = RTL_TEXTENCODING_UNICODE;
- eFamily = FAMILY_SWISS;
rFontName = ::GetFontToken(rFontName, 0);
}
else
@@ -848,7 +820,7 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
}
ShortToSVBT16( rFmt.GetStart(), rAnlv.iStartAt );
- // --> OD 2008-06-03 #i86652#
+ // #i86652#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
ShortToSVBT16( -GetWordFirstLineOffset(rFmt), rAnlv.dxaIndent );
@@ -865,7 +837,7 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
sal_uInt8 nSwLevel )
{
- static sal_uInt8 __READONLY_DATA aSprmAnldDefault[54] = {
+ static sal_uInt8 aSprmAnldDefault[54] = {
12, 52,
1,0,0,0x0c,0,0,1,0x80,0,0,1,0,0x1b,1,0,0,0x2e,
0,0,0,
@@ -896,7 +868,7 @@ bool WW8Export::Out_SwNum(const SwTxtNode* pNd)
if (nLevel < 0 || nLevel >= MAXLEVEL)
{
- ASSERT(sal_False, "Invalid level");
+ OSL_ENSURE(sal_False, "Invalid level");
return false;
}
@@ -910,7 +882,7 @@ bool WW8Export::Out_SwNum(const SwTxtNode* pNd)
bool bRet = true;
SwNumFmt aFmt(pRul->Get(nSwLevel));
- // --> OD 2008-06-03 #i86652#
+ // #i86652#
if ( aFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
const SvxLRSpaceItem& rLR = ItemGet<SvxLRSpaceItem>(*pNd, RES_LR_SPACE);
@@ -923,11 +895,7 @@ bool WW8Export::Out_SwNum(const SwTxtNode* pNd)
aFmt.GetNumberingType() == SVX_NUM_BITMAP
)
{
- // Aufzaehlung
- // --> OD 2008-04-02 #refactorlists#
-// Out_WwNumLvl(bNoNum ? 12 : 11);
Out_WwNumLvl(11);
- // <--
Out_NumRuleAnld(*pRul, aFmt, 11);
bRet = false;
}
@@ -936,24 +904,16 @@ bool WW8Export::Out_SwNum(const SwTxtNode* pNd)
(pRul->Get(1).GetIncludeUpperLevels() <= 1)
)
{
- // Nummerierung
- // --> OD 2008-04-02 #refactorlists#
-// Out_WwNumLvl(bNoNum ? 12 : 10);
Out_WwNumLvl(10);
- // <--
Out_NumRuleAnld(*pRul, aFmt, 10);
bRet = false;
}
else
{
- // Gliederung
- // --> OD 2008-04-02 #refactorlists#
-// Out_SwNumLvl(bNoNum ? 12 : nSwLevel);
Out_SwNumLvl(nSwLevel);
- // <--
Out_NumRuleAnld(*pRul, aFmt, nSwLevel);
}
return bRet;
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index d6134c5b1c10..83cece4881dc 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
#include <algorithm>
#include <functional>
@@ -40,7 +39,6 @@
#include <editeng/fontitem.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdotext.hxx>
-#include <svx/svdotext.hxx>
#include <svx/fmglob.hxx>
#include <editeng/frmdiritem.hxx>
#include <editeng/lrspitem.hxx>
@@ -198,8 +196,6 @@ sal_uInt16 MSWordStyles::BuildGetSlot( const SwFmt& rFmt )
nRet -= RES_POOLCOLL_HEADLINE1-1;
break;
- //case RES_POOLCHR_FOOTNOTE_ANCHOR: nRet =
- //case RES_POOLCHR_ENDNOTE_ANCHOR:
default:
nRet = nUsedSlots++;
break;
@@ -229,18 +225,39 @@ sal_uInt16 MSWordStyles::GetWWId( const SwFmt& rFmt ) const
switch( nPoolId )
{
case RES_POOLCOLL_FOOTNOTE: nRet = 29; break;
+ case RES_POOLCOLL_MARGINAL: nRet = 30; break;
case RES_POOLCOLL_HEADER: nRet = 31; break;
case RES_POOLCOLL_FOOTER: nRet = 32; break;
case RES_POOLCOLL_TOX_IDXH: nRet = 33; break;
+ case RES_POOLCOLL_LABEL: nRet = 34; break;
+ case RES_POOLCOLL_LABEL_DRAWING: nRet = 35; break;
case RES_POOLCOLL_JAKETADRESS: nRet = 36; break;
case RES_POOLCOLL_SENDADRESS: nRet = 37; break;
case RES_POOLCOLL_ENDNOTE: nRet = 43; break;
+ case RES_POOLCOLL_TOX_AUTHORITIESH: nRet = 44; break;
+ case RES_POOLCOLL_TOX_CNTNTH: nRet = 46; break;
+ case RES_POOLCOLL_BUL_LEVEL1: nRet = 48; break;
case RES_POOLCOLL_LISTS_BEGIN: nRet = 47; break;
+ case RES_POOLCOLL_NUM_LEVEL1: nRet = 49; break;
+ case RES_POOLCOLL_BUL_LEVEL2: nRet = 54; break;
+ case RES_POOLCOLL_BUL_LEVEL3: nRet = 55; break;
+ case RES_POOLCOLL_BUL_LEVEL4: nRet = 56; break;
+ case RES_POOLCOLL_BUL_LEVEL5: nRet = 57; break;
+ case RES_POOLCOLL_NUM_LEVEL2: nRet = 58; break;
+ case RES_POOLCOLL_NUM_LEVEL3: nRet = 59; break;
+ case RES_POOLCOLL_NUM_LEVEL4: nRet = 60; break;
+ case RES_POOLCOLL_NUM_LEVEL5: nRet = 61; break;
case RES_POOLCOLL_DOC_TITEL: nRet = 62; break;
case RES_POOLCOLL_SIGNATURE: nRet = 64; break;
case RES_POOLCOLL_TEXT: nRet = 66; break;
case RES_POOLCOLL_TEXT_MOVE: nRet = 67; break;
+ case RES_POOLCOLL_BUL_NONUM1: nRet = 68; break;
+ case RES_POOLCOLL_BUL_NONUM2: nRet = 69; break;
+ case RES_POOLCOLL_BUL_NONUM3: nRet = 70; break;
+ case RES_POOLCOLL_BUL_NONUM4: nRet = 71; break;
+ case RES_POOLCOLL_BUL_NONUM5: nRet = 72; break;
case RES_POOLCOLL_DOC_SUBTITEL: nRet = 74; break;
+ case RES_POOLCOLL_GREETING: nRet = 75; break;
case RES_POOLCOLL_TEXT_IDENT: nRet = 77; break;
case RES_POOLCHR_FOOTNOTE_ANCHOR: nRet = 38; break;
@@ -300,7 +317,7 @@ void WW8AttributeOutput::EndStyle()
}
void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, sal_uInt16 nWwBase,
- sal_uInt16 nWwNext, sal_uInt16 nWwId, sal_uInt16 /*nId*/ )
+ sal_uInt16 nWwNext, sal_uInt16 nWwId, sal_uInt16 /*nId*/, bool bAutoUpdate )
{
sal_uInt8 aWW8_STD[ sizeof( WW8_STD ) ];
sal_uInt8* pData = aWW8_STD;
@@ -322,12 +339,12 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, sal_uInt
if( m_rWW8Export.bWrtWW8 )
{
+ nBit16 = bAutoUpdate ? 1 : 0; // fAutoRedef : 1
+ Set_UInt16( pData, nBit16 );
//-------- jetzt neu:
// ab Ver8 gibts zwei Felder mehr:
- //sal_uInt16 fAutoRedef : 1; /* auto redefine style when appropriate */
//sal_uInt16 fHidden : 1; /* hidden from UI? */
//sal_uInt16 : 14; /* unused bits */
- pData += sizeof( sal_uInt16 );
}
@@ -390,7 +407,8 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
const bool* pFlags = aFlags + ( nStt - RES_CHRATR_BEGIN );
for ( n = nStt; n < nEnd; ++n, ++pFlags )
{
- if ( *pFlags && SFX_ITEM_SET != rFmt.GetItemState(n, false))
+ if ( *pFlags && !m_rExport.ignoreAttributeForStyles( n )
+ && SFX_ITEM_SET != rFmt.GetItemState(n, false))
{
//If we are a character property then see if it is one of the
//western/asian ones that must be collapsed together for export to
@@ -431,12 +449,12 @@ void MSWordStyles::WriteProperties( const SwFmt* pFmt, bool bParProp, sal_uInt16
{
m_rExport.AttrOutput().StartStyleProperties( bParProp, nPos );
- ASSERT( m_rExport.pCurrentStyle == NULL, "Current style not NULL" ); // set current style before calling out
+ OSL_ENSURE( m_rExport.pCurrentStyle == NULL, "Current style not NULL" ); // set current style before calling out
m_rExport.pCurrentStyle = pFmt;
m_rExport.OutputFormat( *pFmt, bParProp, !bParProp );
- ASSERT( m_rExport.pCurrentStyle == pFmt, "current style was changed" );
+ OSL_ENSURE( m_rExport.pCurrentStyle == pFmt, "current style was changed" );
// reset current style...
m_rExport.pCurrentStyle = NULL;
@@ -481,7 +499,7 @@ void WW8AttributeOutput::DefaultStyle( sal_uInt16 nStyle )
{
if ( m_rWW8Export.bWrtWW8 )
{
- static sal_uInt8 __READONLY_DATA aDefCharSty[] = {
+ static sal_uInt8 aDefCharSty[] = {
0x42, 0x00,
0x41, 0x40, 0xF2, 0xFF, 0xA1, 0x00, 0x42, 0x00,
0x00, 0x00, 0x19, 0x00, 0x41, 0x00, 0x62, 0x00,
@@ -496,7 +514,7 @@ void WW8AttributeOutput::DefaultStyle( sal_uInt16 nStyle )
}
else
{
- static sal_uInt8 __READONLY_DATA aDefCharSty[] = {
+ static sal_uInt8 aDefCharSty[] = {
0x26, 0x00,
0x41, 0x40, 0xF2, 0xFF, 0xA1, 0x00, 0x26, 0x00,
0x19, 0x41, 0x62, 0x73, 0x61, 0x74, 0x7A, 0x2D,
@@ -525,8 +543,13 @@ void MSWordStyles::OutputStyle( SwFmt* pFmt, sal_uInt16 nPos )
GetStyleData( pFmt, bFmtColl, nBase, nWwNext );
- m_rExport.AttrOutput().StartStyle( pFmt->GetName(), bFmtColl,
- nBase, nWwNext, GetWWId( *pFmt ), nPos );
+ String aName = pFmt->GetName();
+ if ( aName.EqualsAscii( "Default" ) )
+ aName = String::CreateFromAscii( "Normal" );
+
+ m_rExport.AttrOutput().StartStyle( aName, bFmtColl,
+ nBase, nWwNext, GetWWId( *pFmt ), nPos,
+ pFmt->IsAutoUpdateFmt() );
if ( bFmtColl )
WriteProperties( pFmt, true, nPos, nBase==0xfff ); // UPX.papx
@@ -552,7 +575,7 @@ void WW8AttributeOutput::StartStyles()
if ( m_rWW8Export.bWrtWW8 )
{
- static sal_uInt8 __READONLY_DATA aStShi[] = {
+ static sal_uInt8 aStShi[] = {
0x12, 0x00,
0x0F, 0x00, 0x0A, 0x00, 0x01, 0x00, 0x5B, 0x00,
0x0F, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -562,7 +585,7 @@ void WW8AttributeOutput::StartStyles()
}
else
{
- static sal_uInt8 __READONLY_DATA aStShi[] = {
+ static sal_uInt8 aStShi[] = {
0x0E, 0x00,
0x0F, 0x00, 0x08, 0x00, 0x01, 0x00, 0x4B, 0x00,
0x0F, 0x00, 0x00, 0x00, 0x00, 0x00 };
@@ -593,8 +616,6 @@ void MSWordStyles::OutputStylesTable()
m_rExport.bStyDef = false;
}
-/* */
-
//---------------------------------------------------------------------------
// Fonts
//---------------------------------------------------------------------------
@@ -664,7 +685,14 @@ wwFont::wwFont(const String &rFamilyName, FontPitch ePitch, FontFamily eFamily,
ShortToSVBT16( 400, &maWW8_FFN[2] ); // weiss ich nicht besser
// 400 == FW_NORMAL (windows.h)
- maWW8_FFN[4] = sw::ms::rtl_TextEncodingToWinCharset(eChrSet);
+ //
+ //#i61927# For unicode fonts like Arial Unicode, Word 97+ sets the chs
+ //to SHIFTJIS presumably to capture that it's a multi-byte encoding font
+ //but Word95 doesn't do this, and sets it to 0 (ANSI), so we should do the
+ //same
+ maWW8_FFN[4] = bWrtWW8 ?
+ sw::ms::rtl_TextEncodingToWinCharset(eChrSet) :
+ rtl_getBestWindowsCharsetFromTextEncoding(eChrSet);
if (mbAlt)
maWW8_FFN[5] = static_cast< sal_uInt8 >(msFamilyNm.Len() + 1);
@@ -697,7 +725,6 @@ bool wwFont::Write(SvStream *pTableStrm) const
return true;
}
-#ifdef DOCX
void wwFont::WriteDocx( const DocxAttributeOutput* rAttrOutput ) const
{
// no font embedding, panose id, subsetting, ... implemented
@@ -706,13 +733,12 @@ void wwFont::WriteDocx( const DocxAttributeOutput* rAttrOutput ) const
if ( mbAlt )
rAttrOutput->FontAlternateName( msAltNm );
- rAttrOutput->FontCharset( sw::ms::rtl_TextEncodingToWinCharset( meChrSet ) );
+ rAttrOutput->FontCharset( sw::ms::rtl_TextEncodingToWinCharset( meChrSet ), meChrSet );
rAttrOutput->FontFamilyType( meFamily );
rAttrOutput->FontPitchType( mePitch );
rAttrOutput->EndFont();
}
-#endif
void wwFont::WriteRtf( const RtfAttributeOutput* rAttrOutput ) const
{
@@ -859,7 +885,6 @@ void wwFontHelper::WriteFontTable(SvStream *pTableStream, WW8Fib& rFib)
}
}
-#ifdef DOCX
void wwFontHelper::WriteFontTable( const DocxAttributeOutput& rAttrOutput )
{
::std::vector<const wwFont *> aFontList( AsVector() );
@@ -867,7 +892,6 @@ void wwFontHelper::WriteFontTable( const DocxAttributeOutput& rAttrOutput )
::std::for_each( aFontList.begin(), aFontList.end(),
::std::bind2nd( ::std::mem_fun( &wwFont::WriteDocx ), &rAttrOutput ) );
}
-#endif
void wwFontHelper::WriteFontTable( const RtfAttributeOutput& rAttrOutput )
{
@@ -877,7 +901,6 @@ void wwFontHelper::WriteFontTable( const RtfAttributeOutput& rAttrOutput )
::std::bind2nd( ::std::mem_fun( &wwFont::WriteRtf ), &rAttrOutput ) );
}
-/* */
WW8_WrPlc0::WW8_WrPlc0( sal_uLong nOffset )
: aPos( 4, 4 ), nOfs( nOffset )
@@ -902,7 +925,6 @@ void WW8_WrPlc0::Write( SvStream& rStrm )
//------------------------------------------------------------------------------
-/* */
//------------------------------------------------------------------------------
// class MSWordSections : Uebersetzung PageDescs in Sections
// behandelt auch Header und Footer
@@ -961,7 +983,8 @@ WW8_WrPlcSepx::WW8_WrPlcSepx( MSWordExportBase& rExport )
: MSWordSections( rExport ),
aCps( 4, 4 ),
pAttrs( 0 ),
- pTxtPos( 0 )
+ pTxtPos( 0 ),
+ bNoMoreSections( false )
{
// to be in sync with the AppendSection() call in the MSWordSections
// constructor
@@ -986,7 +1009,7 @@ WW8_WrPlcSepx::~WW8_WrPlcSepx()
sal_uInt16 MSWordSections::CurrentNumberOfColumns( const SwDoc &rDoc ) const
{
- ASSERT( aSects.Count(), "no segement inserted yet" );
+ OSL_ENSURE( aSects.Count(), "no segement inserted yet" );
if ( !aSects.Count() )
return 1;
@@ -1001,7 +1024,7 @@ sal_uInt16 MSWordSections::NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo
if ( !pPd )
{
- ASSERT( pPd, "totally impossible" );
+ OSL_ENSURE( pPd, "totally impossible" );
return 1;
}
@@ -1037,9 +1060,12 @@ void MSWordSections::AppendSection( const SwPageDesc* pPd,
void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd,
const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
- aCps.Insert( nStartCp, aCps.Count() );
+ if ( !bNoMoreSections )
+ {
+ aCps.Insert( nStartCp, aCps.Count() );
- AppendSection( pPd, pSectionFmt, nLnNumRestartNo );
+ AppendSection( pPd, pSectionFmt, nLnNumRestartNo );
+ }
}
void MSWordSections::AppendSection( const SwFmtPageDesc& rPD,
@@ -1054,9 +1080,12 @@ void MSWordSections::AppendSection( const SwFmtPageDesc& rPD,
void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPD,
const SwNode& rNd, const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
- aCps.Insert(nStartCp, aCps.Count());
+ if ( !bNoMoreSections )
+ {
+ aCps.Insert(nStartCp, aCps.Count());
- AppendSection( rPD, rNd, pSectionFmt, nLnNumRestartNo );
+ AppendSection( rPD, rNd, pSectionFmt, nLnNumRestartNo );
+ }
}
// MSWordSections::SetNum() setzt in jeder Section beim 1. Aufruf den
@@ -1552,11 +1581,10 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
// und raus damit ins WW-File
const SfxItemSet* pOldI = pISet;
pISet = &aSet;
- // --> OD 2007-06-12 #TESTING#
+
// Switch off test on default item values, if page description
// set (value of <bOutPgDscSet>) isn't written.
AttrOutput().OutputStyleItemSet( aSet, true, bOutPgDscSet );
- // <--
//Cannot export as normal page framedir, as continous sections
//cannot contain any grid settings like proper sections
@@ -1724,7 +1752,7 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
pAttrs = new WW8_PdAttrDesc[ aSects.Count() ];
sal_uLong nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
- ASSERT( !pTxtPos, "wer hat den Pointer gesetzt?" );
+ OSL_ENSURE( !pTxtPos, "wer hat den Pointer gesetzt?" );
pTxtPos = new WW8_WrPlc0( nCpStart );
WriteFtnEndTxt( rWrt, nCpStart );
@@ -1741,6 +1769,8 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
WW8_SepInfo& rSepInfo = aSects[i];
rWrt.SectionProperties( rSepInfo, pA );
+
+ bNoMoreSections = true;
}
rWrt.SetHdFtIndex( nOldIndex ); //0
@@ -1785,7 +1815,7 @@ void WW8_WrPlcSepx::WriteSepx( SvStream& rStrm ) const
void WW8_WrPlcSepx::WritePlcSed( WW8Export& rWrt ) const
{
- ASSERT( aCps.Count() == aSects.Count() + 1, "WrPlcSepx: DeSync" );
+ OSL_ENSURE( aCps.Count() == aSects.Count() + 1, "WrPlcSepx: DeSync" );
sal_uLong nFcStart = rWrt.pTableStrm->Tell();
sal_uInt16 i;
@@ -1830,14 +1860,14 @@ void MSWordExportBase::WriteHeaderFooterText( const SwFmt& rFmt, bool bHeader )
{
bHasHdr = true;
const SwFmtHeader& rHd = rFmt.GetHeader();
- ASSERT( rHd.GetHeaderFmt(), "Header text is not here" );
+ OSL_ENSURE( rHd.GetHeaderFmt(), "Header text is not here" );
pCntnt = &rHd.GetHeaderFmt()->GetCntnt();
}
else
{
bHasFtr = true;
const SwFmtFooter& rFt = rFmt.GetFooter();
- ASSERT( rFt.GetFooterFmt(), "Footer text is not here" );
+ OSL_ENSURE( rFt.GetFooterFmt(), "Footer text is not here" );
pCntnt = &rFt.GetFooterFmt()->GetCntnt();
}
@@ -1865,12 +1895,11 @@ void MSWordExportBase::WriteHeaderFooterText( const SwFmt& rFmt, bool bHeader )
if ( !pSttIdx )
{
// es gibt keine Kopf-/Fusszeile, aber ein CR ist immer noch noetig
- ASSERT( pSttIdx, "K/F-Text nicht richtig da" );
+ OSL_ENSURE( pSttIdx, "K/F-Text nicht richtig da" );
AttrOutput().EmptyParagraph(); // CR ans Ende ( sonst mault WW )
}
}
-/* */
//------------------------------------------------------------------------------
// class WW8_WrPlcFtnEdn : Sammeln der Fuss/Endnoten und Ausgeben der Texte
// und Plcs am Ende des Docs.
@@ -1990,23 +2019,22 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp,
else
{
const SwFrmFmt* pFmt = ::FindFrmFmt( &rObj );
- ASSERT( pFmt, "wo ist das Format geblieben?" );
+ OSL_ENSURE( pFmt, "wo ist das Format geblieben?" );
const SwNodeIndex* pNdIdx = pFmt->GetCntnt().GetCntntIdx();
- ASSERT( pNdIdx, "wo ist der StartNode der Textbox?" );
+ OSL_ENSURE( pNdIdx, "wo ist der StartNode der Textbox?" );
rWrt.WriteSpecialText( pNdIdx->GetIndex() + 1,
pNdIdx->GetNode().EndOfSectionIndex(),
nTTyp );
- // --> OD 2008-08-07 #156757#
{
SwNodeIndex aContentIdx = *pNdIdx;
- aContentIdx++;
+ ++aContentIdx;
if ( aContentIdx.GetNode().IsTableNode() )
{
bool bContainsOnlyTables = true;
do {
aContentIdx = *(aContentIdx.GetNode().EndOfSectionNode());
- aContentIdx++;
+ ++aContentIdx;
if ( !aContentIdx.GetNode().IsTableNode() &&
aContentIdx.GetIndex() != pNdIdx->GetNode().EndOfSectionIndex() )
{
@@ -2022,7 +2050,6 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp,
}
}
}
- // <--
}
// CR at end of one textbox text ( otherwise WW gpft :-( )
@@ -2041,7 +2068,7 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp,
const SwFmtFtn* pFtn = (SwFmtFtn*)aCntnt[ i ];
rWrt.WriteFtnBegin( *pFtn );
const SwNodeIndex* pIdx = pFtn->GetTxtFtn()->GetStartNode();
- ASSERT( pIdx, "wo ist der StartNode der Fuss-/EndNote?" );
+ OSL_ENSURE( pIdx, "wo ist der StartNode der Fuss-/EndNote?" );
rWrt.WriteSpecialText( pIdx->GetIndex() + 1,
pIdx->GetNode().EndOfSectionIndex(),
nTTyp );
@@ -2049,7 +2076,7 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp,
break;
default:
- ASSERT( !this, "was ist das fuer ein SubDocType?" );
+ OSL_ENSURE( !this, "was ist das fuer ein SubDocType?" );
}
pTxtPos->Append( rWrt.Fc2Cp( rWrt.Strm().Tell() ));
@@ -2073,7 +2100,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp,
if ( !nLen )
return;
- ASSERT( aCps.Count() + 2 == pTxtPos->Count(), "WritePlc: DeSync" );
+ OSL_ENSURE( aCps.Count() + 2 == pTxtPos->Count(), "WritePlc: DeSync" );
::std::vector<String> aStrArr;
WW8Fib& rFib = *rWrt.pFib; // n+1-te CP-Pos nach Handbuch
@@ -2150,9 +2177,8 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp,
{
pTxtPos->Write( *rWrt.pTableStrm );
const SvULongs* pShapeIds = GetShapeIdArr();
- ASSERT( pShapeIds, "wo sind die ShapeIds?" );
+ OSL_ENSURE( pShapeIds, "wo sind die ShapeIds?" );
- // nLen = pTxtPos->Count();
for ( i = 0; i < nLen; ++i )
{
// write textbox story - FTXBXS
@@ -2213,7 +2239,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp,
//aStrArr is sorted
myiter aIter = ::std::lower_bound(aStrArr.begin(),
aStrArr.end(), rAtn.msOwner);
- ASSERT(aIter != aStrArr.end() && *aIter == rAtn.msOwner,
+ OSL_ENSURE(aIter != aStrArr.end() && *aIter == rAtn.msOwner,
"Impossible");
sal_uInt16 nFndPos = static_cast< sal_uInt16 >(aIter - aStrArr.begin());
String sAuthor(*aIter);
@@ -2243,11 +2269,6 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp,
SwWW8Writer::FillCount(*rWrt.pTableStrm, 9 - nNameLen);
}
- //SVBT16 ibst; // index into GrpXstAtnOwners
- //SVBT16 ak; // not used
- //SVBT16 grfbmc; // not used
- //SVBT32 ITagBkmk; // when not -1, this tag identifies the
-
SwWW8Writer::WriteShort( *rWrt.pTableStrm, nFndPos );
SwWW8Writer::WriteShort( *rWrt.pTableStrm, 0 );
SwWW8Writer::WriteShort( *rWrt.pTableStrm, 0 );
@@ -2299,4 +2320,4 @@ const SvULongs* WW8_WrPlcSubDoc::GetShapeIdArr() const
return 0;
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index c40ce759b3f2..9f63574adfd5 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <iostream>
@@ -42,7 +42,6 @@
#include <osl/endian.h>
#include <docsh.hxx>
-#define _SVSTDARR_BOOLS
#include <svl/svstdarr.hxx>
#include <unotools/fltrcfg.hxx>
@@ -193,12 +192,21 @@ public:
class WW8_WrtBookmarks
{
private:
- SvULongs aSttCps, aEndCps; // Array of Start- and End CPs
- SvBools aFieldMarks; // If the bookmark is in a field result
- std::vector<String> maSwBkmkNms; // Array of Sw - Bookmarknames
- typedef std::vector<String>::iterator myIter;
+ //! Holds information about a single bookmark.
+ struct BookmarkInfo {
+ sal_uLong startPos; //!< Starting character position.
+ sal_uLong endPos; //!< Ending character position.
+ bool isField; //!< True if the bookmark is in a field result.
+ String name; //!< Name of this bookmark.
+ inline BookmarkInfo(sal_uLong start, sal_uLong end, bool isFld, const String& bkName) : startPos(start), endPos(end), isField(isFld), name(bkName) {};
+ //! Operator < is defined purely for sorting.
+ inline bool operator<(const BookmarkInfo &other) const { return startPos < other.startPos; }
+ };
+ std::vector<BookmarkInfo> aBookmarks;
+ typedef std::vector<BookmarkInfo>::iterator BkmIter;
- sal_uInt16 GetPos( const String& rNm );
+ //! Return the position in aBookmarks where the string rNm can be found.
+ BkmIter GetPos( const String& rNm );
//No copying
WW8_WrtBookmarks(const WW8_WrtBookmarks&);
@@ -207,11 +215,13 @@ public:
WW8_WrtBookmarks();
~WW8_WrtBookmarks();
+ //! Add a new bookmark to the list OR add an end position to an existing bookmark.
void Append( WW8_CP nStartCp, const String& rNm, const ::sw::mark::IMark* pBkmk=NULL );
+ //! Write out bookmarks to file.
void Write( WW8Export& rWrt );
+ //! Move existing field marks from one position to another.
void MoveFieldMarks(sal_uLong nFrom,sal_uLong nTo);
-// String GetWWBkmkName( const String& rName ) const;
};
#define ANZ_DEFAULT_STYLES 16
@@ -460,7 +470,7 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
in OOo have been changed away from OUR defaults, and if one has then
export that. If more than one has in the future we may hack in something
which examines our document properties to see which language is used the
- most and choose that, for now we choose the first and throw an ASSERT.
+ most and choose that, for now we choose the first and throw an ASSERT
*/
/*Our default Japanese Level is 2, this is a special MS hack to set this*/
@@ -513,7 +523,7 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
}
}
- ASSERT( nNoNeeded<=1, "Example of unexportable forbidden chars" );
+ OSL_ENSURE( nNoNeeded<=1, "Example of unexportable forbidden chars" );
rTypo.reserved1=nUseReserved;
if (rTypo.iLevelOfKinsoku)
{
@@ -561,7 +571,7 @@ const SfxPoolItem* MSWordExportBase::HasItem( sal_uInt16 nWhich ) const
pItem = pChpIter->HasTextItem( nWhich );
else
{
- ASSERT( !this, "Wo ist mein ItemSet / pChpIter ?" );
+ OSL_ENSURE( !this, "Wo ist mein ItemSet / pChpIter ?" );
pItem = 0;
}
return pItem;
@@ -576,14 +586,14 @@ const SfxPoolItem& MSWordExportBase::GetItem(sal_uInt16 nWhich) const
// ourer own Ids. So the Id have to translate from our into the
// EditEngine Range
nWhich = sw::hack::GetSetWhichFromSwDocWhich(*pISet, *pDoc, nWhich);
- ASSERT(nWhich != 0, "All broken, Impossible");
+ OSL_ENSURE(nWhich != 0, "All broken, Impossible");
pItem = &pISet->Get(nWhich, true);
}
else if( pChpIter )
pItem = &pChpIter->GetItem( nWhich );
else
{
- ASSERT( !this, "Wo ist mein ItemSet / pChpIter ?" );
+ OSL_ENSURE( !this, "Wo ist mein ItemSet / pChpIter ?" );
pItem = 0;
}
return *pItem;
@@ -606,7 +616,7 @@ WW8_WrPlc1::~WW8_WrPlc1()
WW8_CP WW8_WrPlc1::Prev() const
{
sal_uInt16 nLen = aPos.Count();
- ASSERT(nLen,"Prev called on empty list");
+ OSL_ENSURE(nLen,"Prev called on empty list");
return nLen ? aPos[nLen-1] : 0;
}
@@ -760,9 +770,9 @@ sal_uLong SwWW8Writer::FillUntil( SvStream& rStrm, sal_uLong nEndPos )
if( nEndPos > nCurPos )
SwWW8Writer::FillCount( rStrm, nEndPos - nCurPos );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
- ASSERT( nEndPos == nCurPos, "Falsches FillUntil()" );
+ OSL_ENSURE( nEndPos == nCurPos, "Falsches FillUntil()" );
#endif
return rStrm.Tell();
}
@@ -833,7 +843,7 @@ void WW8_WrPlcPn::AppendFkpEntry(WW8_FC nEndFc,short nVarLen,const sal_uInt8* pS
aFkps.Insert( pF, aFkps.Count() );
if( !pF->Append( nEndFc, nVarLen, pNewSprms ) )
{
- ASSERT( !this, "Sprm liess sich nicht einfuegen" );
+ OSL_ENSURE( !this, "Sprm liess sich nicht einfuegen" );
}
}
if( pNewSprms != pSprms ) //Merge to new has created a new block
@@ -971,19 +981,19 @@ sal_uInt8 *WW8_WrFkp::CopyLastSprms(sal_uInt8 &rLen, bool bVer8)
bool WW8_WrFkp::Append( WW8_FC nEndFc, sal_uInt16 nVarLen, const sal_uInt8* pSprms )
{
- ASSERT( !nVarLen || pSprms, "Item-Pointer fehlt" );
- ASSERT( nVarLen < ( ( ePlc == PAP ) ? 497U : 502U ), "Sprms zu lang !" );
+ OSL_ENSURE( !nVarLen || pSprms, "Item-Pointer fehlt" );
+ OSL_ENSURE( nVarLen < ( ( ePlc == PAP ) ? 497U : 502U ), "Sprms zu lang !" );
if( bCombined )
{
- ASSERT( !this, "Fkp::Append: Fkp is already combined" );
+ OSL_ENSURE( !this, "Fkp::Append: Fkp is already combined" );
return false;
}
sal_Int32 n = ((sal_Int32*)pFkp)[nIMax]; // letzter Eintrag
if( nEndFc <= n )
{
- ASSERT( nEndFc >= n, "+Fkp: FC rueckwaerts" );
- ASSERT( !nVarLen || !pSprms || nEndFc != n,
+ OSL_ENSURE( nEndFc >= n, "+Fkp: FC rueckwaerts" );
+ OSL_ENSURE( !nVarLen || !pSprms || nEndFc != n,
"+Fkp: selber FC mehrfach benutzt" );
// selber FC ohne Sprm wird ohne zu mosern ignoriert.
@@ -1169,7 +1179,7 @@ void WW8_WrPct::AppendPc(WW8_FC nStartFc, bool bIsUnicode)
{
if ( 0 != pPcts->Count() )
{
- ASSERT( 1 == pPcts->Count(), "Leeres Piece !!");
+ OSL_ENSURE( 1 == pPcts->Count(), "Leeres Piece !!");
pPcts->DeleteAndDestroy( pPcts->Count() - 1 , 1);
}
}
@@ -1241,14 +1251,14 @@ void WW8_WrPct::WritePc( WW8Export& rWrt )
void WW8_WrPct::SetParaBreak()
{
- ASSERT( pPcts->Count(),"SetParaBreak : aPcts.Count = 0" );
+ OSL_ENSURE( pPcts->Count(),"SetParaBreak : aPcts.Count = 0" );
pPcts->GetObject( pPcts->Count() - 1)->SetStatus();
}
WW8_CP WW8_WrPct::Fc2Cp( sal_uLong nFc ) const
{
- ASSERT( nFc >= (sal_uLong)nOldFc, "FilePos liegt vorm letzten Piece" );
- ASSERT( pPcts->Count(), "Fc2Cp noch kein Piece vorhanden" );
+ OSL_ENSURE( nFc >= (sal_uLong)nOldFc, "FilePos liegt vorm letzten Piece" );
+ OSL_ENSURE( pPcts->Count(), "Fc2Cp noch kein Piece vorhanden" );
nFc -= nOldFc;
if( bIsUni )
@@ -1260,7 +1270,6 @@ WW8_CP WW8_WrPct::Fc2Cp( sal_uLong nFc ) const
/* */
WW8_WrtBookmarks::WW8_WrtBookmarks()
- : aSttCps( 0, 16 ), aEndCps( 0, 16 )
{
}
@@ -1270,71 +1279,63 @@ WW8_WrtBookmarks::~WW8_WrtBookmarks()
void WW8_WrtBookmarks::Append( WW8_CP nStartCp, const String& rNm, const ::sw::mark::IMark* )
{
- sal_uInt16 nPos = GetPos( rNm );
- if( USHRT_MAX == nPos )
+ BkmIter bkIter = GetPos( rNm );
+ if( bkIter == aBookmarks.end() )
{
- // new -> insert as start position
- nPos = aSttCps.Count();
- myIter aIter = maSwBkmkNms.end();
- // sort by startposition
- // theory: write continuous -> then the new position is at end
- while( nPos && aSttCps[ nPos - 1 ] > sal_uLong( nStartCp ))
- {
- --nPos;
- --aIter;
- }
-
- aSttCps.Insert(nStartCp, nPos);
- aEndCps.Insert(nStartCp, nPos);
- aFieldMarks.insert(aFieldMarks.begin() + nPos, sal_Bool(false));
- maSwBkmkNms.insert(aIter, rNm);
+ // new bookmark -> insert with start==end
+ aBookmarks.push_back( BookmarkInfo(nStartCp, nStartCp, false, rNm) );
}
else
{
- // old -> its the end position
- ASSERT( aEndCps[ nPos ] == aSttCps[ nPos ], "end position is valid" );
+ // old bookmark -> this should be the end position
+ OSL_ENSURE( bkIter->endPos == bkIter->startPos, "end position is valid" );
//If this bookmark was around a field in writer, then we want to move
//it to the field result in word. The end is therefore one cp
//backwards from the 0x15 end mark that was inserted.
- if (aFieldMarks[nPos])
+ if (bkIter->isField)
--nStartCp;
-
- aEndCps.Replace( nStartCp, nPos );
+ bkIter->endPos = nStartCp;
}
}
void WW8_WrtBookmarks::Write( WW8Export& rWrt )
{
- sal_uInt16 nCount = aSttCps.Count(), i;
- if( nCount )
+ if (!aBookmarks.empty())
{
- SvULongs aEndSortTab( 255 < nCount ? 255 : nCount, 4 );
- // sort then endpositions
- for( i = 0; i < nCount; ++i )
- {
- sal_uLong nCP = aEndCps[ i ];
- sal_uInt16 nPos = i;
- while( nPos && aEndSortTab[ nPos - 1 ] > nCP )
- --nPos;
- aEndSortTab.Insert( nCP, nPos );
- }
+ //Make sure the bookmarks are sorted in order of start position.
+ std::sort(aBookmarks.begin(), aBookmarks.end());
- // we have some bookmarks found in the document -> write them
- // first the Bookmark Name Stringtable
- rWrt.WriteAsStringTable(maSwBkmkNms, rWrt.pFib->fcSttbfbkmk,
- rWrt.pFib->lcbSttbfbkmk);
+ // First write the Bookmark Name Stringtable
+ std::vector<String> aNames;
+ aNames.reserve(aBookmarks.size());
+ for (BkmIter bIt = aBookmarks.begin(); bIt < aBookmarks.end(); ++bIt)
+ aNames.push_back(bIt->name);
+ rWrt.WriteAsStringTable(aNames, rWrt.pFib->fcSttbfbkmk, rWrt.pFib->lcbSttbfbkmk);
- // second the Bookmark start positions as pcf of longs
+ // Second write the Bookmark start positions as pcf of longs
SvStream& rStrm = rWrt.bWrtWW8 ? *rWrt.pTableStrm : rWrt.Strm();
rWrt.pFib->fcPlcfbkf = rStrm.Tell();
- for( i = 0; i < nCount; ++i )
- SwWW8Writer::WriteLong( rStrm, aSttCps[ i ] );
+ for (BkmIter bIt = aBookmarks.begin(); bIt < aBookmarks.end(); ++bIt)
+ SwWW8Writer::WriteLong( rStrm, bIt->startPos );
SwWW8Writer::WriteLong(rStrm, rWrt.pFib->ccpText + rWrt.pFib->ccpTxbx);
- for( i = 0; i < nCount; ++i )
- {
- sal_uLong nEndCP = aEndCps[ i ];
+
+ //Lastly, need to write out the end positions (sorted by end position). But
+ //before that we need a lookup table (sorted by start position) to link
+ //start and end positions.
+ // Start by sorting the end positions.
+ std::vector<sal_uLong> aEndSortTab;
+ aEndSortTab.reserve(aBookmarks.size());
+ for (BkmIter bIt = aBookmarks.begin(); bIt < aBookmarks.end(); ++bIt)
+ aEndSortTab.push_back(bIt->endPos);
+ std::sort(aEndSortTab.begin(), aEndSortTab.end());
+
+ //Now write out the lookups.
+ //Note that in most cases, the positions in both vectors will be very close.
+ for( sal_uLong i = 0; i < aBookmarks.size(); ++i )
+ {
+ sal_uLong nEndCP = aBookmarks[ i ].endPos;
sal_uInt16 nPos = i;
if( aEndSortTab[ nPos ] > nEndCP )
{
@@ -1344,43 +1345,39 @@ void WW8_WrtBookmarks::Write( WW8Export& rWrt )
else if( aEndSortTab[ nPos ] < nEndCP )
while( aEndSortTab[ ++nPos ] != nEndCP )
;
-
SwWW8Writer::WriteLong( rStrm, nPos );
}
rWrt.pFib->lcbPlcfbkf = rStrm.Tell() - rWrt.pFib->fcPlcfbkf;
- // third the Bookmark end positions
+ // Finally, the actual Bookmark end positions.
rWrt.pFib->fcPlcfbkl = rStrm.Tell();
- for( i = 0; i < nCount; ++i )
+ for(sal_uLong i = 0; i < aEndSortTab.size(); ++i )
SwWW8Writer::WriteLong( rStrm, aEndSortTab[ i ] );
SwWW8Writer::WriteLong(rStrm, rWrt.pFib->ccpText + rWrt.pFib->ccpTxbx);
rWrt.pFib->lcbPlcfbkl = rStrm.Tell() - rWrt.pFib->fcPlcfbkl;
}
}
-sal_uInt16 WW8_WrtBookmarks::GetPos( const String& rNm )
+WW8_WrtBookmarks::BkmIter WW8_WrtBookmarks::GetPos( const String& rNm )
{
- sal_uInt16 nRet = USHRT_MAX, n;
- for (n = 0; n < aSttCps.Count(); ++n)
- if (rNm == maSwBkmkNms[n])
- {
- nRet = n;
- break;
- }
- return nRet;
+ for (BkmIter bIt = aBookmarks.begin(); bIt < aBookmarks.end(); ++bIt) {
+ if (rNm == bIt->name)
+ return bIt;
+ }
+ return aBookmarks.end();
}
void WW8_WrtBookmarks::MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo)
{
- for (sal_uInt16 nI=0;nI<aSttCps.Count();++nI)
+ for (BkmIter i = aBookmarks.begin(); i < aBookmarks.end(); ++i)
{
- if (aSttCps[nI] == nFrom)
+ if (i->startPos == nFrom)
{
- aSttCps[nI] = nTo;
- if (aEndCps[nI] == nFrom)
+ i->startPos = nTo;
+ if (i->endPos == nFrom)
{
- aFieldMarks[nI] = true;
- aEndCps[nI] = nTo;
+ i->isField = true;
+ i->endPos = nTo;
}
}
}
@@ -1799,7 +1796,6 @@ void MSWordExportBase::SaveData( sal_uLong nStt, sal_uLong nEnd )
bOutTable = false;
// Caution: bIsInTable should not be set here
bOutFlyFrmAttrs = false;
-// pAttrSet = 0;
bStartTOX = false;
bInWriteTOX = false;
@@ -1858,14 +1854,14 @@ void WW8Export::RestoreData()
GetWriter().bWriteAll = rData.bOldWriteAll;
- ASSERT( !pO->Count(), "pO is not empty in WW8Export::RestoreData()" );
+ OSL_ENSURE( !pO->Count(), "pO is not empty in WW8Export::RestoreData()" );
if ( rData.pOOld )
{
delete pO;
pO = rData.pOOld;
}
- ASSERT( !mpTableAt || !mpTableAt->Count(), "mpTableAt is not empty in WW8Export::RestoreData()" );
+ OSL_ENSURE( !mpTableAt || !mpTableAt->Count(), "mpTableAt is not empty in WW8Export::RestoreData()" );
if ( mpTableAt )
delete mpTableAt;
mpTableAt = rData.mpTableAtOld;
@@ -2034,27 +2030,6 @@ void WW8AttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTab
const SwTableLine * pTabLine = pTabBox->GetUpper();
const SwFrmFmt * pLineFmt = pTabLine->GetFrmFmt();
-#if 0
- const SwTable * pTable = pTableTextNodeInfo->getTable();
- bool bNewTableModel = pTable->IsNewModel();
- bool bFixRowHeight = false;
- const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes();
- if (! bNewModel)
- {
- sal_uInt32 nBoxes = rTabBoxes.Count();
-
- for (sal_uInt32 n = 0; n < nBoxes; n++)
- {
- SwTableBox * pBox1 = rTabBoxes[n];
- if (pBox1->getRowspan() != 1)
- {
- bFixRowHeight = true;
- break;
- }
- }
- }
-#endif
-
// Zeilenhoehe ausgeben sprmTDyaRowHeight
long nHeight = 0;
const SwFmtFrmSize& rLSz = pLineFmt->GetFrmSize();
@@ -2082,7 +2057,7 @@ void WW8AttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t
const SwTable * pTable = pTableTextNodeInfoInner->getTable();
const SwFrmFmt *pFmt = pTable->GetFrmFmt();
- ASSERT(pFmt,"Impossible");
+ OSL_ENSURE(pFmt,"Impossible");
if (!pFmt)
return;
@@ -2184,7 +2159,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
*/
//const bool bNewTableModel = pTbl->IsNewModel();
const SwFrmFmt *pFmt = pTable->GetFrmFmt();
- ASSERT(pFmt,"Impossible");
+ OSL_ENSURE(pFmt,"Impossible");
if (!pFmt)
return;
@@ -2288,7 +2263,7 @@ void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableT
const SwTable *pTable = pTableTextNodeInfoInner->getTable( );
const SwFrmFmt *pFmt = pTable->GetFrmFmt();
- ASSERT(pFmt,"Impossible");
+ OSL_ENSURE(pFmt,"Impossible");
if (!pFmt)
return;
@@ -2301,7 +2276,7 @@ void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableT
unsigned long nTblSz = static_cast<unsigned long>(rSize.GetWidth());
if (nTblSz > USHRT_MAX/2 && !bRelBoxSize)
{
- ASSERT(bRelBoxSize, "huge table width but not relative, suspicious");
+ OSL_ENSURE(bRelBoxSize, "huge table width but not relative, suspicious");
bRelBoxSize = true;
}
@@ -2336,7 +2311,7 @@ void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableT
}
- ASSERT(nWidthPercent, "Impossible");
+ OSL_ENSURE(nWidthPercent, "Impossible");
if (nWidthPercent)
{
nPageSize *= nWidthPercent;
@@ -2467,44 +2442,18 @@ struct SwNodeHash
size_t operator()(SwNode * pNode) const { return reinterpret_cast<size_t>(pNode); }
};
-typedef ::std::hash_set<SwNode *, SwNodeHash> SwNodeHashSet;
+typedef ::boost::unordered_set<SwNode *, SwNodeHash> SwNodeHashSet;
typedef ::std::deque<SwNode *> SwNodeDeque;
#endif
void MSWordExportBase::WriteText()
{
-// whoever has need of the missing function should go and implement it!
-// This piece of code always breaks builds...
-//#ifdef DEBUG
-// ::std::clog << "<WriteText>" << ::std::endl;
-// ::std::clog << dbg_out(pCurPam->GetDoc()->GetNodes()) << ::std::endl;
-//
-// SwNodeHashSet aNodeSet;
-// SwNodeDeque aNodeDeque;
-//#endif
-
while( pCurPam->GetPoint()->nNode < pCurPam->GetMark()->nNode ||
( pCurPam->GetPoint()->nNode == pCurPam->GetMark()->nNode &&
pCurPam->GetPoint()->nContent.GetIndex() <= pCurPam->GetMark()->nContent.GetIndex() ) )
{
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() );
@@ -2694,7 +2643,7 @@ void WW8Export::WriteFkpPlcUsw()
if (pEscher || pDoc->ContainsMSVBasic())
{
/*
- #82587# Everytime MS 2000 creates an escher stream there is always
+ Everytime MS 2000 creates an escher stream there is always
an ObjectPool dir (even if empty). It turns out that if a copy of
MS 2000 is used to open a document that contains escher graphics
exported from StarOffice without this empty dir then *if* that
@@ -2709,10 +2658,7 @@ void WW8Export::WriteFkpPlcUsw()
the existence of an ObjectPool dir is necessary for triggering
some magic. cmc
*/
- /*
- #10570# Similiarly having msvbasic storage seems to also trigger
- creating this stream
- */
+ /* Similiarly having msvbasic storage seems to also trigger creating this stream */
GetWriter().GetStorage().OpenSotStorage(CREATE_CONST_ASC(SL::aObjectPool),
STREAM_READWRITE | STREAM_SHARE_DENYALL);
}
@@ -2745,8 +2691,8 @@ void WW8Export::WriteFkpPlcUsw()
// Write SttbfAssoc
WW8SttbAssoc * pSttbfAssoc = dynamic_cast<WW8SttbAssoc *>
(pDoc->getExternalData(::sw::STTBF_ASSOC).get());
- // --> OD 2009-10-19 #i106057#
- if ( pSttbfAssoc )
+
+ if ( pSttbfAssoc ) // #i106057#
// <--
{
::std::vector<String> aStrings;
@@ -2847,7 +2793,7 @@ void MSWordExportBase::AddLinkTarget(const String& rURL)
if( pDoc->GotoOutline( aPos, aOutline ) )
{
sal_uLong nIdx = aPos.nNode.GetIndex();
- aPair aImplicitBookmark;
+ aBookmarkPair aImplicitBookmark;
aImplicitBookmark.first = aOutline;
aImplicitBookmark.second = nIdx;
maImplicitBookmarks.push_back(aImplicitBookmark);
@@ -2936,9 +2882,6 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
pFlyOffset = 0;
eNewAnchorType = FLY_AT_PAGE;
nTxtTyp = TXT_MAINTEXT;
- // --> OD 2007-04-19 #i43447# - removed
-// nFlyWidth = nFlyHeight = 0;
- // <--
nStyleBeforeFly = nLastFmtId = 0;
pStyAttr = 0;
pCurrentStyle = NULL;
@@ -2970,10 +2913,8 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
if ( !pOCXExp )
pOCXExp = new SwMSConvertControls( pDoc->GetDocShell(), pCurPam );
- // --> OD 2007-10-08 #i81405#
- // Collect anchored objects before changing the redline mode.
+ // #i81405# - Collect anchored objects before changing the redline mode.
maFrames = GetFrames( *pDoc, bWriteAll? NULL : pOrigPam );
- // <--
mnRedlineMode = pDoc->GetRedlineMode();
if ( pDoc->GetRedlineTbl().Count() )
@@ -2982,7 +2923,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
nsRedlineMode_t::REDLINE_SHOW_INSERT) );
}
- maFontHelper.InitFontTable( HackIsWW8OrHigher(), *pDoc );
+ maFontHelper.InitFontTable( SupportsUnicode(), *pDoc );
GatherChapterFields();
CollectOutlineBookmarks(*pDoc);
@@ -3338,7 +3279,7 @@ void WW8Export::PrepareStorage()
sal_uLong SwWW8Writer::WriteStorage()
{
- // #i34818# #120099# - update layout (if present), for SwWriteTable
+ // #i34818# - update layout (if present), for SwWriteTable
ViewShell* pViewShell = NULL;
pDoc->GetEditShell( &pViewShell );
if( pViewShell != NULL )
@@ -3575,7 +3516,7 @@ void WW8SHDLong::Write( WW8Export& rExport )
void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
{
- ASSERT( bWrtWW8, "No 95 export yet" );
+ OSL_ENSURE( bWrtWW8, "No 95 export yet" );
if ( !bWrtWW8 )
return;
@@ -3583,19 +3524,21 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
const ::sw::mark::ICheckboxFieldmark* pAsCheckbox = dynamic_cast< const ::sw::mark::ICheckboxFieldmark* >( pFieldmark );
- ASSERT(rFieldmark.GetFieldname().equalsAscii( ODF_FORMTEXT ) || rFieldmark.GetFieldname().equalsAscii( ODF_FORMDROPDOWN ) || rFieldmark.GetFieldname().equalsAscii( ODF_FORMCHECKBOX ), "Unknown field type!!!");
- if ( ! ( rFieldmark.GetFieldname().equalsAscii( ODF_FORMTEXT ) ||
- rFieldmark.GetFieldname().equalsAscii( ODF_FORMDROPDOWN ) ||
- rFieldmark.GetFieldname().equalsAscii( ODF_FORMCHECKBOX ) ) )
+ OSL_ENSURE(rFieldmark.GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ||
+ rFieldmark.GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) ||
+ rFieldmark.GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) ), "Unknown field type!!!");
+ if ( ! ( rFieldmark.GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ||
+ rFieldmark.GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) ||
+ rFieldmark.GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) ) ) )
return;
int type = 0; // TextFieldmark
if ( pAsCheckbox )
type = 1;
- if ( rFieldmark.GetFieldname().equalsAscii( ODF_FORMDROPDOWN ) )
+ if ( rFieldmark.GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) )
type=2;
- ::sw::mark::IFieldmark::parameter_map_t::const_iterator pNameParameter = rFieldmark.GetParameters()->find(::rtl::OUString::createFromAscii("name"));
+ ::sw::mark::IFieldmark::parameter_map_t::const_iterator pNameParameter = rFieldmark.GetParameters()->find(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")));
::rtl::OUString ffname;
if(pNameParameter != rFieldmark.GetParameters()->end())
pNameParameter->second >>= ffname;
@@ -3617,32 +3560,38 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
pChpPlc->AppendFkpEntry( Strm().Tell(), sizeof( aArr1 ), aArr1 );
- sal_uInt8 aFldHeader[] =
+ struct FFDataHeader
{
- 0xFF, 0xFF, 0xFF, 0xFF, // Unicode Marker...
- 0, 0, 0, 0,// 0, 0, 0, 0
+ sal_uInt32 version;
+ sal_uInt16 bits;
+ sal_uInt16 cch;
+ sal_uInt16 hps;
+ FFDataHeader() : version( 0xFFFFFFFF ), bits(0), cch(0), hps(0) {}
};
- aFldHeader[4] |= (type & 0x03);
+
+ FFDataHeader aFldHeader;
+ aFldHeader.bits |= (type & 0x03);
+
sal_Int32 ffres = 0; // rFieldmark.GetFFRes();
if ( pAsCheckbox && pAsCheckbox->IsChecked() )
ffres = 1;
else if ( type == 2 )
{
- ::sw::mark::IFieldmark::parameter_map_t::const_iterator pResParameter = rFieldmark.GetParameters()->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN));
+ ::sw::mark::IFieldmark::parameter_map_t::const_iterator pResParameter = rFieldmark.GetParameters()->find(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_RESULT)));
if(pResParameter != rFieldmark.GetParameters()->end())
pResParameter->second >>= ffres;
else
ffres = 0;
}
- aFldHeader[4] |= ( (ffres<<2) & 0x7C );
+ aFldHeader.bits |= ( (ffres<<2) & 0x7C );
std::vector< ::rtl::OUString > aListItems;
if (type==2)
{
- aFldHeader[5] |= 0x80; // ffhaslistbox
+ aFldHeader.bits |= 0x8000; // 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));
+ ::sw::mark::IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_LISTENTRY)));
if(pListEntries != pParameters->end())
{
uno::Sequence< ::rtl::OUString > vListEntries;
@@ -3670,16 +3619,19 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
};
sal_uInt32 slen = sizeof(sal_uInt32)
+ sizeof(aFldData)
- + sizeof( aFldHeader )
+ + sizeof( aFldHeader.version ) + sizeof( aFldHeader.bits ) + sizeof( aFldHeader.cch ) + sizeof( aFldHeader.hps )
+ 2*ffname.getLength() + 4
- + 2*ffdeftext.getLength() + 4
+ 2*ffformat.getLength() + 4
+ 2*ffhelptext.getLength() + 4
+ 2*ffstattext.getLength() + 4
+ 2*ffentrymcr.getLength() + 4
+ 2*ffexitmcr.getLength() + 4;
+ if ( type )
+ slen += 2; // wDef
+ else
+ slen += 2*ffdeftext.getLength() + 4; //xstzTextDef
if ( type==2 ) {
- slen += 2; // for 0xFF, 0xFF
+ slen += 2; // sttb ( fExtend )
slen += 4; // for num of list items
const int items = aListItems.size();
for( int i = 0; i < items; i++ ) {
@@ -3694,17 +3646,15 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
OSL_ENSURE( len == 0x44-sizeof(sal_uInt32), "SwWW8Writer::WriteFormData(..) - wrong aFldData length" );
pDataStrm->Write( aFldData, len );
- len = sizeof( aFldHeader );
- OSL_ENSURE( len == 8, "SwWW8Writer::WriteFormData(..) - wrong aFldHeader length" );
-
- pDataStrm->Write( aFldHeader, len );
+ *pDataStrm << aFldHeader.version << aFldHeader.bits << aFldHeader.cch << aFldHeader.hps;
SwWW8Writer::WriteString_xstz( *pDataStrm, ffname, true ); // Form field name
- if ( type == 0 )
+ if ( !type )
SwWW8Writer::WriteString_xstz( *pDataStrm, ffdeftext, true );
- else
- pDataStrm->WriteNumber( (sal_uInt16)0 );
+ if ( type )
+ *pDataStrm << sal_uInt16(0);
+
SwWW8Writer::WriteString_xstz( *pDataStrm, String( ffformat ), true );
SwWW8Writer::WriteString_xstz( *pDataStrm, String( ffhelptext ), true );
@@ -3821,11 +3771,6 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
void MSWordExportBase::OutputStartNode( const SwStartNode & rNode)
{
-#if 0
-#ifdef DEBUG
- ::std::clog << "<OutWW8_SwStartNode>" << dbg_out(&rNode) << ::std::endl;
-#endif
-#endif
ww8::WW8TableNodeInfo::Pointer_t pNodeInfo =
mpTableInfo->getTableNodeInfo( &rNode );
@@ -3844,7 +3789,7 @@ void MSWordExportBase::OutputStartNode( const SwStartNode & rNode)
ww8::WW8TableNodeInfoInner::Pointer_t pInner = aIt->second;
AttrOutput().TableNodeInfoInner(pInner);
- aIt++;
+ ++aIt;
}
}
#ifdef DEBUG
@@ -3875,7 +3820,7 @@ void MSWordExportBase::OutputEndNode( const SwEndNode &rNode )
{
ww8::WW8TableNodeInfoInner::Pointer_t pInner = aIt->second;
AttrOutput().TableNodeInfoInner(pInner);
- aIt++;
+ ++aIt;
}
}
#ifdef DEBUG
@@ -3883,4 +3828,4 @@ void MSWordExportBase::OutputEndNode( const SwEndNode &rNode )
#endif
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 6350fb9f5512..a3a42d923386 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,7 +25,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#ifndef _WRTWW8_HXX
#define _WRTWW8_HXX
@@ -53,12 +53,12 @@
#include <expfld.hxx>
// einige Forward Deklarationen
+class SwWW8AttrIter;
namespace msfilter
{
class MSCodec_Std97;
}
-class SwAttrIter;
class AttributeOutputBase;
class DocxAttributeOutput;
class RtfAttributeOutput;
@@ -233,6 +233,7 @@ class WW8_WrPlcSepx : public MSWordSections
SvULongs aCps; // PTRARR von CPs
WW8_PdAttrDesc* pAttrs;
WW8_WrPlc0* pTxtPos; // Pos der einzelnen Header / Footer
+ bool bNoMoreSections;
// No copy, no assign
WW8_WrPlcSepx( const WW8_WrPlcSepx& );
@@ -300,9 +301,7 @@ public:
wwFont( const String &rFamilyName, FontPitch ePitch, FontFamily eFamily,
rtl_TextEncoding eChrSet, bool bWrtWW8 );
bool Write( SvStream *pTableStram ) const;
-#ifdef DOCX
void WriteDocx( const DocxAttributeOutput* rAttrOutput ) const;
-#endif
void WriteRtf( const RtfAttributeOutput* rAttrOutput ) const;
rtl::OUString GetFamilyName() const { return rtl::OUString( msFamilyNm ); }
friend bool operator < (const wwFont &r1, const wwFont &r2);
@@ -326,9 +325,7 @@ public:
sal_uInt16 GetId(const SvxFontItem& rFont);
sal_uInt16 GetId(const wwFont& rFont);
void WriteFontTable( SvStream *pTableStream, WW8Fib& pFib );
-#ifdef DOCX
void WriteFontTable( const DocxAttributeOutput& rAttrOutput );
-#endif
void WriteFontTable( const RtfAttributeOutput& rAttrOutput );
/// If true, all fonts are loaded before processing the document.
@@ -412,9 +409,9 @@ private:
HdFtPlcDrawObj& operator=(const HdFtPlcDrawObj&);
};
-typedef ::std::pair<String, sal_uLong> aPair;
-typedef std::vector<aPair> SwImplBookmarks;
-typedef std::vector<aPair>::iterator SwImplBookmarksIter;
+typedef ::std::pair<String, sal_uLong> aBookmarkPair;
+typedef std::vector<aBookmarkPair> SwImplBookmarks;
+typedef std::vector<aBookmarkPair>::iterator SwImplBookmarksIter;
class WW8_WrtRedlineAuthor : public sw::util::WrtRedlineAuthor
{
@@ -527,7 +524,7 @@ public:
HdFtPlcDrawObj *pHFSdrObjs; // Draw-/Fly-Objects in header or footer
SwEscherEx* pEscher; // escher export class
- // --> OD 2007-04-19 #i43447# - removed
+ // #i43447# - removed
// SwTwips nFlyWidth, nFlyHeight; // Fuer Anpassung Graphic
// <--
@@ -592,6 +589,17 @@ public:
sal_uInt16 GetId( const SwTOXType& rTOXType );
+ /// Return the numeric id of the font (and add it to the font list if needed)
+ sal_uInt16 GetId( const SvxFontItem& rFont)
+ {
+ return maFontHelper.GetId(rFont);
+ }
+ /// @overload
+ sal_uInt16 GetId( const wwFont& rFont)
+ {
+ return maFontHelper.GetId(rFont);
+ }
+
const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
/// Find the reference.
@@ -627,9 +635,11 @@ public:
/// Access to the sections/headers/footres.
virtual MSWordSections& Sections() const = 0;
- /// Hack, unfortunately necessary at some places for now.
- /// FIXME remove it when possible.
- virtual bool HackIsWW8OrHigher() const = 0;
+ /// Determines if the format is expected to support unicode.
+ virtual bool SupportsUnicode() const = 0;
+
+ /// Used to filter out attributes that can be e.g. written to .doc but not to .docx
+ virtual bool ignoreAttributeForStyles( sal_uInt16 /*nWhich*/ ) const { return false; }
/// Guess the script (asian/western).
///
@@ -751,13 +761,13 @@ protected:
virtual void ExportDocument_Impl() = 0;
/// Get the next position in the text node to output
- virtual xub_StrLen GetNextPos( SwAttrIter* pAttrIter, const SwTxtNode& rNode, xub_StrLen nAktPos );
+ virtual xub_StrLen GetNextPos( SwWW8AttrIter* pAttrIter, const SwTxtNode& rNode, xub_StrLen nAktPos );
/// Update the information for GetNextPos().
- virtual void UpdatePosition( SwAttrIter* pAttrIter, xub_StrLen nAktPos, xub_StrLen nEnd );
+ virtual void UpdatePosition( SwWW8AttrIter* pAttrIter, xub_StrLen nAktPos, xub_StrLen nEnd );
/// Output SwTxtNode
- void OutputTextNode( const SwTxtNode& );
+ virtual void OutputTextNode( const SwTxtNode& );
/// Output SwTableNode
void OutputTableNode( const SwTableNode& );
@@ -795,6 +805,9 @@ protected:
/// Output SwOLENode
virtual void OutputOLENode( const SwOLENode& ) = 0;
+ virtual void OutputLinkedOLE( const rtl::OUString& ) = 0;
+
+
/// Output SwSectionNode
virtual void OutputSectionNode( const SwSectionNode& );
@@ -928,7 +941,7 @@ public:
virtual MSWordSections& Sections() const;
/// False for WW6, true for WW8.
- virtual bool HackIsWW8OrHigher() const { return bWrtWW8; }
+ virtual bool SupportsUnicode() const { return bWrtWW8; }
private:
/// Format-dependant part of the actual export.
@@ -977,12 +990,6 @@ public:
WW8OleMaps& GetOLEMap() { return *pOleMap; }
void ExportDopTypography(WW8DopTypography &rTypo);
- using MSWordExportBase::GetId;
- sal_uInt16 GetId( const SvxFontItem& rFont)
- {
- return maFontHelper.GetId(rFont);
- }
-
sal_uInt16 AddRedlineAuthor( sal_uInt16 nId );
void WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pO = 0 );
@@ -1024,10 +1031,6 @@ public:
virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() );
void WriteChar( sal_Unicode c );
-#if 0
- sal_uInt16 StartTableFromFrmFmt(WW8Bytes &rAt, const SwFrmFmt *pFmt,
- SwTwips &rPageSize);
-#endif
void OutSwString(const String&, xub_StrLen nStt, xub_StrLen nLen,
bool bUnicode, rtl_TextEncoding eChrSet);
@@ -1044,7 +1047,7 @@ public:
virtual void SectionBreaksAndFrames( const SwTxtNode& rNode );
/// Helper method for OutputSectionBreaks() and OutputFollowPageDesc().
- // OD 2007-05-29 #i76300#
+ // #i76300#
virtual void PrepareNewPageDesc( const SfxItemSet* pSet,
const SwNode& rNd,
const SwFmtPageDesc* pNewPgDescFmt = 0,
@@ -1057,10 +1060,8 @@ public:
WW8_BRC TranslateBorderLine(const SvxBorderLine& pLine,
sal_uInt16 nDist, bool bShadow);
- // --> OD 2007-06-04 #i77805#
- // new return value indicates, if an inherited outline numbering is suppressed
+ // #i77805# - new return value indicates, if an inherited outline numbering is suppressed
virtual bool DisallowInheritingOutlineNumbering(const SwFmt &rFmt);
- // <--
unsigned int GetHdFtIndex() const { return mnHdFtIndex; }
void SetHdFtIndex(unsigned int nHdFtIndex) { mnHdFtIndex = nHdFtIndex; }
@@ -1134,6 +1135,8 @@ protected:
/// Output SwOLENode
virtual void OutputOLENode( const SwOLENode& );
+ virtual void OutputLinkedOLE( const rtl::OUString& );
+
virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum );
private:
@@ -1381,6 +1384,7 @@ public:
virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const = 0;
};
+/// Used to export formatted text associated to drawings.
class MSWord_SdrAttrIter : public MSWordAttrIter
{
private:
@@ -1411,7 +1415,7 @@ public:
bool IsTxtAttr(xub_StrLen nSwPos);
- void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); }
+ void NextPos() { if ( nAktSwPos < STRING_NOTFOUND ) nAktSwPos = SearchNext( nAktSwPos + 1 ); }
void OutAttr( xub_StrLen nSwPos );
virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const;
@@ -1422,6 +1426,75 @@ public:
rtl_TextEncoding GetNodeCharSet() const { return eNdChrSet; }
};
+// Die Klasse SwWW8AttrIter ist eine Hilfe zum Aufbauen der Fkp.chpx.
+// Dabei werden nur Zeichen-Attribute beachtet; Absatz-Attribute brauchen
+// diese Behandlung nicht.
+// Die Absatz- und Textattribute des Writers kommen rein, und es wird
+// mit Where() die naechste Position geliefert, an der sich die Attribute
+// aendern. IsTxtAtr() sagt, ob sich an der mit Where() gelieferten Position
+// ein Attribut ohne Ende und mit \xff im Text befindet.
+// Mit OutAttr() werden die Attribute an der angegebenen SwPos
+// ausgegeben.
+class SwWW8AttrIter : public MSWordAttrIter
+{
+private:
+ const SwTxtNode& rNd;
+
+ sw::util::CharRuns maCharRuns;
+ sw::util::cCharRunIter maCharRunIter;
+
+ rtl_TextEncoding meChrSet;
+ sal_uInt16 mnScript;
+ bool mbCharIsRTL;
+
+ const SwRedline* pCurRedline;
+ xub_StrLen nAktSwPos;
+ sal_uInt16 nCurRedlinePos;
+
+ bool mbParaIsRTL;
+
+ const SwFmtDrop &mrSwFmtDrop;
+
+ sw::Frames maFlyFrms; // #i2916#
+ sw::FrameIter maFlyIter;
+
+ xub_StrLen SearchNext( xub_StrLen nStartPos );
+ void FieldVanish( const String& rTxt );
+
+ void OutSwFmtRefMark(const SwFmtRefMark& rAttr, bool bStart);
+
+ void IterToCurrent();
+
+ //No copying
+ SwWW8AttrIter(const SwWW8AttrIter&);
+ SwWW8AttrIter& operator=(const SwWW8AttrIter&);
+public:
+ SwWW8AttrIter( MSWordExportBase& rWr, const SwTxtNode& rNd );
+
+ bool IsTxtAttr( xub_StrLen nSwPos );
+ bool IsRedlineAtEnd( xub_StrLen nPos ) const;
+ bool IsDropCap( int nSwPos );
+ bool RequiresImplicitBookmark();
+
+ void NextPos() { if ( nAktSwPos < STRING_NOTFOUND ) nAktSwPos = SearchNext( nAktSwPos + 1 ); }
+
+ void OutAttr( xub_StrLen nSwPos, bool bRuby = false );
+ virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const;
+ virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
+ int OutAttrWithRange(xub_StrLen nPos);
+ const SwRedlineData* GetRedline( xub_StrLen nPos );
+ void OutFlys(xub_StrLen nSwPos);
+
+ xub_StrLen WhereNext() const { return nAktSwPos; }
+ sal_uInt16 GetScript() const { return mnScript; }
+ bool IsCharRTL() const { return mbCharIsRTL; }
+ bool IsParaRTL() const { return mbParaIsRTL; }
+ rtl_TextEncoding GetCharSet() const { return meChrSet; }
+ String GetSnippet(const String &rStr, xub_StrLen nAktPos,
+ xub_StrLen nLen) const;
+ const SwFmtDrop& GetSwFmtDrop() const { return mrSwFmtDrop; }
+};
+
/// Class to collect and output the styles table.
class MSWordStyles
{
@@ -1496,4 +1569,4 @@ struct WW8_PdAttrDesc
#endif // _WRTWW8_HXX
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index fcaf4e07a293..e5898a607300 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,14 +29,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
-#if OSL_DEBUG_LEVEL > 0
-# include <cstdio>
+#if OSL_DEBUG_LEVEL > 1
+#include <cstdio>
#endif
#include <com/sun/star/embed/XEmbedPersist.hpp>
#include <com/sun/star/embed/Aspects.hpp>
+#include <com/sun/star/embed/ElementModes.hpp>
#include <rtl/math.hxx>
#include <svtools/filter.hxx>
#include <svl/itemiter.hxx>
@@ -49,7 +49,6 @@
#include <hintids.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/shaditem.hxx>
-#include <editeng/shaditem.hxx>
#include <filter/msfilter/msoleexp.hxx>
#include <editeng/lrspitem.hxx> // SvxLRSpaceItem
#include <editeng/ulspitem.hxx>
@@ -79,16 +78,13 @@
#include "docsh.hxx"
#include <cstdio>
+#if OSL_DEBUG_LEVEL > 1
+#include <stdio.h>
+#endif
+
using namespace ::com::sun::star;
using namespace nsFieldFlags;
-// Damit KA debuggen kann, ohne sich den ganzen Writer zu holen, ist
-// temporaer dieses Debug gesetzt. Ist ausserdem noch das passende IniFlag
-// gesetzt, dann werden in d:\ Hilfsdateien erzeugt.
-// !! sollte demnaechst wieder entfernt werden !!
-// #define DEBUG_KA
-
-
// ToDo:
// 5. Die MapModes, die Win nicht kann, umrechnen
@@ -100,7 +96,7 @@ using namespace nsFieldFlags;
void WW8Export::OutputGrfNode( const SwGrfNode& /*rNode*/ )
{
OSL_TRACE("WW8Export::OutputGrfNode( const SwGrfNode& )\n" );
- ASSERT( mpParentFrame, "frame not set!" );
+ OSL_ENSURE( mpParentFrame, "frame not set!" );
if ( mpParentFrame )
{
OutGrf( *mpParentFrame );
@@ -112,9 +108,6 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet,
SvStorageRef xOleStg, SvStorageRef xObjStg, String &rStorageName,
SwOLENode *pOLENd)
{
-#ifdef NO_OLE_SIZE_OPTIMIZE
- return true;
-#else
bool bGraphicNeeded = false;
SfxItemIter aIter( rSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
@@ -214,7 +207,6 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet,
else
bGraphicNeeded = true;
return bGraphicNeeded;
-#endif
}
void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
@@ -364,6 +356,48 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
}
}
+void WW8Export::OutputLinkedOLE( const rtl::OUString& rOleId )
+{
+ uno::Reference< embed::XStorage > xDocStg = pDoc->GetDocStorage();
+ uno::Reference< embed::XStorage > xOleStg = xDocStg->openStorageElement(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OLELinks")), embed::ElementModes::READ );
+ SotStorageRef xObjSrc = SotStorage::OpenOLEStorage( xOleStg, rOleId, STREAM_READ );
+
+ SotStorageRef xObjStg = GetWriter().GetStorage().OpenSotStorage(
+ CREATE_CONST_ASC(SL::aObjectPool), STREAM_READWRITE |
+ STREAM_SHARE_DENYALL );
+
+ if( xObjStg.Is() && xObjSrc.Is() )
+ {
+ SotStorageRef xOleDst = xObjStg->OpenSotStorage( rOleId,
+ STREAM_READWRITE | STREAM_SHARE_DENYALL );
+ if ( xOleDst.Is() )
+ xObjSrc->CopyTo( xOleDst );
+
+ if ( !xOleDst->GetError( ) )
+ {
+ xOleDst->Commit();
+
+ // Ouput the cPicLocation attribute
+ WW8Bytes* pBuf = new WW8Bytes( 128, 128 );
+ GetWriter().InsUInt16( *pBuf, NS_sprm::LN_CPicLocation );
+ GetWriter().InsUInt32( *pBuf, rOleId.copy( 1 ).toInt32() );
+
+ GetWriter().InsUInt16( *pBuf, NS_sprm::LN_CFOle2 );
+ pBuf->Insert( 1, pBuf->Count() );
+
+ GetWriter().InsUInt16( *pBuf, NS_sprm::LN_CFSpec );
+ pBuf->Insert( 1, pBuf->Count() );
+
+ GetWriter().InsUInt16( *pBuf, NS_sprm::LN_CFObj );
+ pBuf->Insert( 1, pBuf->Count() );
+
+ pChpPlc->AppendFkpEntry( Strm().Tell(), pBuf->Count(), pBuf->GetData() );
+ delete pBuf;
+ }
+ }
+}
+
void WW8Export::OutGrf(const sw::Frame &rFrame)
{
// GrfNode fuer spaeteres rausschreiben der Grafik merken
@@ -372,7 +406,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
pChpPlc->AppendFkpEntry( Strm().Tell(), pO->Count(), pO->GetData() );
pO->Remove( 0, pO->Count() ); // leeren
- // --> OD 2007-06-06 #i29408#
+ // #i29408#
// linked, as-character anchored graphics have to be exported as fields.
const SwGrfNode* pGrfNd = rFrame.IsInline() && rFrame.GetContent()
? rFrame.GetContent()->GetGrfNode() : 0;
@@ -458,7 +492,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
Set_UInt8( pArr, nAttrMagicIdx++ );
pChpPlc->AppendFkpEntry( Strm().Tell(), static_cast< short >(pArr - aArr), aArr );
- // --> OD 2007-04-23 #i75464#
+ // #i75464#
// Check, if graphic isn't exported as-character anchored.
// Otherwise, an additional paragraph is exported for a graphic, which is
// forced to be treated as inline, because it's anchored inside another frame.
@@ -469,7 +503,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
{
WriteChar( (char)0x0d ); // umgebenden Rahmen mit CR abschliessen
- static sal_uInt8 __READONLY_DATA nSty[2] = { 0, 0 };
+ static sal_uInt8 nSty[2] = { 0, 0 };
pO->Insert( nSty, 2, pO->Count() ); // Style #0
bool bOldGrf = bOutGrf;
bOutGrf = true;
@@ -480,7 +514,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
pPapPlc->AppendFkpEntry( Strm().Tell(), pO->Count(), pO->GetData() );
pO->Remove( 0, pO->Count() ); // leeren
}
- // --> OD 2007-06-06 #i29408#
+ // #i29408#
// linked, as-character anchored graphics have to be exported as fields.
else if ( pGrfNd && pGrfNd->IsLinkedFile() )
{
@@ -598,7 +632,6 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
Set_UInt16( pArr, mm ); // set mm
/*
- #92494#
Just in case our original size is too big to fit inside a ushort we can
substitute the final size and loose on retaining the scaling factor but
still keep the correct display size anyway.
@@ -651,21 +684,6 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
String aFileN;
rGrfNd.GetFileFilterNms( &aFileN, 0 );
- // --> OD 2007-06-06 #i29408# - take the file URL as it is.
-// aFileN = URIHelper::simpleNormalizedMakeRelative(rWrt.GetBaseURL(),
-// aFileN);
-// INetURLObject aUrl( aFileN );
-// if( aUrl.GetProtocol() == INET_PROT_FILE )
-// aFileN = aUrl.PathToFileName();
- // <--
-
-//JP 05.12.98: nach einigen tests hat sich gezeigt, das WW mit 99 nicht
-// klarkommt. Sie selbst schreiben aber bei Verknuepfunfen,
-// egal um welchen Type es sich handelt, immer den Wert 94.
-// Bug 59859
-// if ( COMPARE_EQUAL == aFiltN.ICompare( "TIF", 3 ) )
-// mm = 99; // 99 = TIFF
-// else
sal_uInt16 mm = 94; // 94 = BMP, GIF
WritePICFHeader(rStrm, rFly, mm, nWidth, nHeight,
@@ -735,7 +753,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
{
const SwNode *pNode = rItem.maFly.GetContent();
const SwGrfNode *pNd = pNode ? pNode->GetGrfNode() : 0;
- ASSERT(pNd, "Impossible");
+ OSL_ENSURE(pNd, "Impossible");
if (pNd)
WriteGrfFromGrfNode(rStrm, *pNd, rItem.maFly, nWidth, nHeight);
}
@@ -745,11 +763,11 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
#ifdef OLE_PREVIEW_AS_EMF
const SwNode *pNode = rItem.maFly.GetContent();
const SwOLENode *pNd = pNode ? pNode->GetOLENode() : 0;
- ASSERT(pNd, "Impossible");
+ OSL_ENSURE(pNd, "Impossible");
if (!rWrt.bWrtWW8)
{
SwOLENode *pOleNd = const_cast<SwOLENode*>(pNd);
- ASSERT( pOleNd, " Wer hat den OleNode versteckt ?" );
+ OSL_ENSURE( pOleNd, " Wer hat den OleNode versteckt ?" );
SwOLEObj& rSObj= pOleNd->GetOLEObj();
uno::Reference < embed::XEmbeddedObject > rObj( rSObj.GetOleRef() );
@@ -792,7 +810,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
#else
// cast away const
SwOLENode *pOleNd = const_cast<SwOLENode*>(pNd);
- ASSERT( pOleNd, " Wer hat den OleNode versteckt ?" );
+ OSL_ENSURE( pOleNd, " Wer hat den OleNode versteckt ?" );
SwOLEObj& rSObj= pOleNd->GetOLEObj();
// TODO/LATER: do we need to load object?
@@ -818,7 +836,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
case sw::Frame::eDrawing:
case sw::Frame::eTxtBox:
case sw::Frame::eFormControl:
- ASSERT(rWrt.bWrtWW8,
+ OSL_ENSURE(rWrt.bWrtWW8,
"You can't try and export these in WW8 format, a filter bug");
/*
#i3958# We only export an empty dummy picture frame here, this is
@@ -835,7 +853,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
}
break;
default:
- ASSERT(!this,
+ OSL_ENSURE(!this,
"Some inline export not implemented, remind cmc before we ship :-)");
break;
}
@@ -884,4 +902,4 @@ void SwWW8WrGrf::Write()
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 4e865bc0ca83..10cc74d8d88b 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
/*
* This file contains methods for the WW8 output
@@ -149,7 +149,7 @@ using namespace nsSwDocInfoSubType;
* gepflegt werden: rtf\rtfatr.cxx, sw6\sw6atr.cxx, w4w\w4watr.cxx
*/
-#if !defined(MSC) && !defined(UNX) && !defined(PPC) && !defined(CSET) && !defined(__MWERKS__) && !defined(WTC) && !defined(__MINGW32__) && !defined(OS2)
+#if !defined(MSC) && !defined(UNX) && !defined(PPC) && !defined(__MINGW32__) && !defined(OS2)
#define ATTRFNTAB_SIZE 130
#if ATTRFNTAB_SIZE != POOLATTR_END - POOLATTR_BEGIN
@@ -389,7 +389,7 @@ bool MSWordExportBase::SetAktPageDescFromNode(const SwNode &rNd)
{
bool bNewPageDesc = false;
const SwPageDesc* pCurrent = SwPageDesc::GetPageDescOfNode(rNd);
- ASSERT(pCurrent && pAktPageDesc, "Not possible surely");
+ OSL_ENSURE(pCurrent && pAktPageDesc, "Not possible surely");
if (pAktPageDesc && pCurrent)
{
if (pCurrent != pAktPageDesc)
@@ -451,7 +451,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
}
else if ( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, false, &pItem ) )
{
- // --> FME 2007-05-30 #146867# Word does not like hard break attributes in some table cells
+ // Word does not like hard break attributes in some table cells
bool bRemoveHardBreakInsideTable = false;
if ( bOutTable )
{
@@ -477,7 +477,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
if ( !bRemoveHardBreakInsideTable )
{
- ASSERT(pAktPageDesc, "should not be possible");
+ OSL_ENSURE(pAktPageDesc, "should not be possible");
/*
If because of this pagebreak the page desc following the page
break is the follow style of the current page desc then output a
@@ -488,8 +488,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
*/
if ( pAktPageDesc )
{
- // --> OD 2007-05-30 #i76301#
- // assure that there is a page break before set at the node.
+ // #i76301# - assure that there is a page break before set at the node.
const SvxFmtBreakItem* pBreak = dynamic_cast<const SvxFmtBreakItem*>(pItem);
if ( pBreak &&
pBreak->GetBreak() == SVX_BREAK_PAGE_BEFORE )
@@ -533,7 +532,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
if ( bHackInBreak )
{
- ASSERT( pAktPageDesc, "should not be possible" );
+ OSL_ENSURE( pAktPageDesc, "should not be possible" );
if ( pAktPageDesc )
bNewPageDesc = SetAktPageDescFromNode( rNd );
}
@@ -545,7 +544,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
bBreakBefore = false;
}
-// --> OD 2007-05-29 #i76300#
+// #i76300#
bool MSWordExportBase::OutputFollowPageDesc( const SfxItemSet* pSet, const SwTxtNode* pNd )
{
bool bRet = false;
@@ -609,7 +608,7 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet,
const SwSectionFmt* pFmt = GetSectionFormat( rNd );
const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd );
- ASSERT( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
+ OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
if ( pNewPgDescFmt )
{
@@ -688,12 +687,9 @@ void WW8AttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt
else
{
m_rWW8Export.Out_SwNumLvl( nLvl );
- // --> OD 2008-06-03 #i86652#
-// if (rNFmt.GetAbsLSpace())
if ( rNFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION &&
rNFmt.GetAbsLSpace() )
- // <--
{
SwNumFmt aNumFmt( rNFmt );
const SvxLRSpaceItem& rLR =
@@ -712,7 +708,7 @@ void WW8AttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt
}
}
-// --> OD 2007-06-04 #i77805#
+// #i77805#
bool WW8Export::DisallowInheritingOutlineNumbering(const SwFmt &rFmt)
{
bool bRet( false );
@@ -767,12 +763,9 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
if ( bStyDef )
AttrOutput().OutlineNumbering( static_cast< sal_uInt8 >( nLvl ), rNFmt, rFmt );
- // --> OD 2008-06-03 #i86652#
-// if (rNFmt.GetAbsLSpace())
if ( rNFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION &&
rNFmt.GetAbsLSpace() )
- // <--
{
SfxItemSet aSet( rFmt.GetAttrSet() );
SvxLRSpaceItem aLR(
@@ -792,7 +785,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
{
//otherwise we might have to remove outline numbering from
//what gets exported if the parent style was outline numbered
- // --> OD 2007-06-04 #i77805#
+ // #i77805#
// If inherited outline numbering is suppress, the left/right
// margins has to be exported explicitly.
if ( bStyDef && DisallowInheritingOutlineNumbering(rFmt) )
@@ -815,7 +808,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
case RES_FLYFRMFMT:
if (bFlyFmt)
{
- ASSERT(mpParentFrame, "No parent frame, all broken");
+ OSL_ENSURE(mpParentFrame, "No parent frame, all broken");
if (mpParentFrame)
{
@@ -850,7 +843,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
}
break;
default:
- ASSERT( !this, "Was wird hier ausgegeben ??? " );
+ OSL_ENSURE( !this, "Was wird hier ausgegeben ??? " );
break;
}
@@ -925,9 +918,7 @@ String MSWordExportBase::GetBookmarkName( sal_uInt16 nTyp, const String* pName,
sRet += String::CreateFromInt32( nSeqNo );
break;
}
- // --> OD 2005-06-08 #i43956# - encode bookmark accordingly
- return BookmarkToWord( sRet );
- // <--
+ return BookmarkToWord( sRet ); // #i43956# - encode bookmark accordingly
}
//-----------------------------------------------------------------------
@@ -1039,7 +1030,7 @@ void WW8AttributeOutput::OutputFKP()
void WW8AttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
- ASSERT( !m_rWW8Export.pO->Count(), " pO ist am ZeilenEnde nicht leer" );
+ OSL_ENSURE( !m_rWW8Export.pO->Count(), " pO ist am ZeilenEnde nicht leer" );
SVBT16 nSty;
ShortToSVBT16( nStyle, nSty );
@@ -1060,7 +1051,7 @@ void WW8AttributeOutput::OutputWW8Attribute( sal_uInt8 nId, bool bVal )
void WW8AttributeOutput::OutputWW8AttributeCTL( sal_uInt8 nId, bool bVal )
{
- ASSERT( nId <= 1, "out of range" );
+ OSL_ENSURE( nId <= 1, "out of range" );
if ( !m_rWW8Export.bWrtWW8 || nId > 1 )
return;
@@ -1086,20 +1077,26 @@ void WW8AttributeOutput::CharFont( const SvxFontItem& rFont )
void WW8AttributeOutput::CharFontCTL( const SvxFontItem& rFont )
{
+ //Can only export in 8+, in 7- export as normal varient and expect that
+ //upperlevel code has blocked exporting clobbering attributes
+ sal_uInt16 nFontID = m_rWW8Export.GetId( rFont );
if ( m_rWW8Export.bWrtWW8 )
- {
m_rWW8Export.InsUInt16( NS_sprm::LN_CFtcBi );
- m_rWW8Export.InsUInt16( m_rWW8Export.GetId( rFont ) );
- }
+ else
+ m_rWW8Export.pO->Insert( 93, m_rWW8Export.pO->Count() );
+ m_rWW8Export.InsUInt16( nFontID );
}
void WW8AttributeOutput::CharFontCJK( const SvxFontItem& rFont )
{
+ //Can only export in 8+, in 7- export as normal varient and expect that
+ //upperlevel code has blocked exporting clobbering attributes
+ sal_uInt16 nFontID = m_rWW8Export.GetId( rFont );
if ( m_rWW8Export.bWrtWW8 )
- {
m_rWW8Export.InsUInt16( NS_sprm::LN_CRgFtc1 );
- m_rWW8Export.InsUInt16( m_rWW8Export.GetId( rFont ) );
- }
+ else
+ m_rWW8Export.pO->Insert( 93, m_rWW8Export.pO->Count() );
+ m_rWW8Export.InsUInt16( nFontID );
}
void WW8AttributeOutput::CharWeightCTL( const SvxWeightItem& rWeight )
@@ -1300,7 +1297,7 @@ void WW8AttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
b = 0;
break;
default:
- ASSERT( rUnderline.GetLineStyle() == UNDERLINE_NONE, "Unhandled underline type" );
+ OSL_ENSURE( rUnderline.GetLineStyle() == UNDERLINE_NONE, "Unhandled underline type" );
break;
}
@@ -1315,10 +1312,10 @@ void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
switch ( rLanguage.Which() )
{
case RES_CHRATR_LANGUAGE:
- nId = NS_sprm::LN_CRgLid0;
+ nId = NS_sprm::LN_CRgLid0_80;
break;
case RES_CHRATR_CJK_LANGUAGE:
- nId = NS_sprm::LN_CRgLid1;
+ nId = NS_sprm::LN_CRgLid1_80;
break;
case RES_CHRATR_CTL_LANGUAGE:
nId = NS_sprm::LN_CLidBi;
@@ -1330,25 +1327,24 @@ void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
if ( nId )
{
- if ( m_rWW8Export.bWrtWW8 ) // use sprmCRgLid0 rather than sprmCLid
+ if ( m_rWW8Export.bWrtWW8 ) // use sprmCRgLid0_80 rather than sprmCLid
m_rWW8Export.InsUInt16( nId );
else
m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( rLanguage.GetLanguage() );
- // unknown as to exactly why, but this seems to shadow the other
- // paramater in word 2000 and without it spellchecking doesn't work
- if ( nId == NS_sprm::LN_CRgLid0 )
+ // Word 2000 and above apparently require both old and new versions of
+ // these sprms to be set, without it spellchecking doesn't work
+ if ( nId == NS_sprm::LN_CRgLid0_80 )
{
- m_rWW8Export.InsUInt16( 0x4873 );
+ m_rWW8Export.InsUInt16( NS_sprm::LN_CRgLid0 );
m_rWW8Export.InsUInt16( rLanguage.GetLanguage() );
}
- else if ( nId == NS_sprm::LN_CLidBi )
+ else if ( nId == NS_sprm::LN_CRgLid1_80 )
{
- m_rWW8Export.InsUInt16( 0x4874 );
+ m_rWW8Export.InsUInt16( NS_sprm::LN_CRgLid1 );
m_rWW8Export.InsUInt16( rLanguage.GetLanguage() );
}
-
}
}
@@ -1649,10 +1645,10 @@ void WW8AttributeOutput::TextINetFormat( const SwFmtINetFmt& rINet )
}
}
-// --> OD 2005-06-08 #i43956# - add optional parameter <pLinkStr>
+// #i43956# - add optional parameter <pLinkStr>
// It's needed to write the hyperlink data for a certain cross-reference
// - it contains the name of the link target, which is a bookmark.
-// --> OD 2008-08-14 #158418# - add optional parameter <bIncludeEmptyPicLocation>
+// add optional parameter <bIncludeEmptyPicLocation>
// It is needed to write an empty picture location for page number field separators
static void InsertSpecialChar( WW8Export& rWrt, sal_uInt8 c,
String* pLinkStr = 0L,
@@ -1669,7 +1665,6 @@ static void InsertSpecialChar( WW8Export& rWrt, sal_uInt8 c,
rWrt.WriteChar(c);
- // --> OD 2008-08-14 #158418#
// store empty sprmCPicLocation for field separator
if ( bIncludeEmptyPicLocation &&
( c == 0x13 || c == 0x14 || c == 0x15 ) )
@@ -1677,9 +1672,8 @@ static void InsertSpecialChar( WW8Export& rWrt, sal_uInt8 c,
SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CPicLocation );
SwWW8Writer::InsUInt32( aItems, 0x00000000 );
}
- // <--
- // --> OD 2005-06-08 #i43956# - write hyperlink data and attributes
+ // #i43956# - write hyperlink data and attributes
if ( rWrt.bWrtWW8 && c == 0x01 && pLinkStr )
{
// write hyperlink data to data stream
@@ -1781,7 +1775,7 @@ WW8_WrPlcFld* WW8Export::CurrentFieldPlc() const
pFldP = pFldHFTxtBxs;
break;
default:
- ASSERT( !this, "was ist das fuer ein SubDoc-Type?" );
+ OSL_ENSURE( !this, "was ist das fuer ein SubDoc-Type?" );
}
return pFldP;
}
@@ -1792,9 +1786,8 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
bool bUnicode = IsUnicode();
WW8_WrPlcFld* pFldP = CurrentFieldPlc();
- // --> OD 2008-08-14 #158418#
const bool bIncludeEmptyPicLocation = ( eFldType == ww::ePAGE );
- // <--
+
if (WRITEFIELD_START & nMode)
{
sal_uInt8 aFld13[2] = { 0x13, 0x00 }; // will change
@@ -1803,9 +1796,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
aFld13[0] |= 0x80;
aFld13[1] = static_cast< sal_uInt8 >(eFldType); // Typ nachtragen
pFldP->Append( Fc2Cp( Strm().Tell() ), aFld13 );
- // --> OD 2008-08-14 #158418#
InsertSpecialChar( *this, 0x13, 0, bIncludeEmptyPicLocation );
- // <--
}
if (WRITEFIELD_CMD_START & nMode)
{
@@ -1816,7 +1807,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
SwWW8Writer::WriteString8(Strm(), rFldCmd, false,
RTL_TEXTENCODING_MS_1252);
}
- // --> OD 2005-06-08 #i43956# - write hyperlink character including
+ // #i43956# - write hyperlink character including
// attributes and corresponding binary data for certain reference fields.
bool bHandleBookmark = false;
@@ -1827,11 +1818,6 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
eFldType == ww::eNOTEREF || eFldType == ww::eFOOTREF ))
bHandleBookmark = true;
-#if 0
- if (pFld->GetTyp()->Which() == RES_INPUTFLD &&
- eFldType == ww::eFORMTEXT)
- bHandleBookmark = true;
-#endif
}
if ( bHandleBookmark )
@@ -1864,9 +1850,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
static const sal_uInt8 aFld14[2] = { 0x14, 0xff };
pFldP->Append( Fc2Cp( Strm().Tell() ), aFld14 );
pFldP->ResultAdded();
- // --> OD 2008-08-14 #158418#
InsertSpecialChar( *this, 0x14, 0, bIncludeEmptyPicLocation );
- // <--
}
if (WRITEFIELD_END & nMode)
{
@@ -1934,9 +1918,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
}
pFldP->Append( Fc2Cp( Strm().Tell() ), aFld15 );
- // --> OD 2008-08-14 #158418#
InsertSpecialChar( *this, 0x15, 0, bIncludeEmptyPicLocation );
- // <--
}
}
@@ -2083,7 +2065,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
if( 3 == nRet )
aFillTxt = aTxt;
- else if ((4 == nRet) || (2 == nRet)) //#109414#
+ else if ((4 == nRet) || (2 == nRet))
aFillTxt = '\t';
else
aFillTxt.Erase();
@@ -2094,8 +2076,6 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
}
break;
-// case TOX_AUTHORITIES: eCode = eTOA; sStr = ???; break;
-
case TOX_ILLUSTRATIONS:
case TOX_OBJECTS:
case TOX_TABLES:
@@ -2120,8 +2100,6 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
}
break;
-// case TOX_USER:
-// case TOX_CONTENT:
default:
{
sStr = FieldString(eCode);
@@ -2144,39 +2122,8 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
if( nsSwTOXElement::TOX_OUTLINELEVEL & pTOX->GetCreateType() )
{
- // --> OD 2009-02-27 #i99641#
- // The following code does not determine the minimum outline
- // level for the TOC
-// // Search over all the outline styles used and figure out
-// // what is the minimum outline level we need to display
-// // (ignoring headline styles 1-9)
-// //sal_uInt8 nLvl = 0, nMinLvl = 0; //#outline level, removed by zhaojianwei
-// int nLvl = 0, nMinLvl = 0; //<-end,add by zhaojianwei
-// const SwTxtFmtColls& rColls = *GetExport().pDoc->GetTxtFmtColls();
-// const SwTxtFmtColl* pColl;
-// for( n = rColls.Count(); n; )
-// {
-// pColl = rColls[ --n ];
-// //nLvl = pColl->GetOutlineLevel(); //#outline level,zhaojianwei
-// //sal_uInt16 nPoolId = pColl->GetPoolFmtId();
-// //if( MAXLEVEL > nLvl && nMinLvl < nLvl && //<-end, ->add by zhaojianwei
-// sal_uInt16 nPoolId = pColl->GetPoolFmtId();
-// if( pColl->IsAssignedToListLevelOfOutlineStyle() &&
-// nMinLvl < (nLvl = pColl->GetAssignedOutlineStyleLevel()) && //<-end,zhaojianwei
-// ( RES_POOLCOLL_HEADLINE1 > nPoolId ||
-// RES_POOLCOLL_HEADLINE9 < nPoolId ))
-// {
-// // If we are using the default heading styles then use nTOXLvl
-// if(!nMinLvl)
-// nLvl = nTOXLvl;
-// else
-// nLvl = nMinLvl < nTOXLvl ? nMinLvl : (sal_uInt8)nTOXLvl;
-// nMinLvl = nLvl;
-// }
-// }
const int nMinLvl = nTOXLvl;
-// if( nLvl )
if ( nMinLvl > 0 )
{
int nTmpLvl = nMinLvl;
@@ -2188,34 +2135,6 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
sStr.AppendAscii(sEntryEnd);
}
- // <--
-
- // --> OD 2009-02-27 #i99641#
- // not needed to additional export paragraph style with
- // an outline level to the /t option
-// if( nMinLvl > 0 )
-// // <--
-// {
-// // collect this templates into the \t otion
-// const SwTxtFmtColls& rColls = *pDoc->GetTxtFmtColls();
-// const SwTxtFmtColl* pColl;
-// int nLvl = 0;
-// for( n = rColls.Count(); n;)
-// {
-// pColl = rColls[--n];
-// //nLvl = pColl->GetOutlineLevel(); //#outline level, removed by zhaojianwei
-// //if (MAXLEVEL > nLvl && nMinLvl <= nLvl)
-// //{ //<-end, ->add by zhaojianwei
-// if( pColl->IsAssignedToListLevelOfOutlineStyle() &&
-// nMinLvl <= ( nLvl = pColl->GetAssignedOutlineStyleLevel()))
-// { //<-end,zhaojianwei
-// if( sTOption.Len() )
-// sTOption += ';';
-// (( sTOption += pColl->GetName() ) += ';' )
-// += String::CreateFromInt32( nLvl + 1 );
-// }
-// }
-// }
}
@@ -2298,10 +2217,8 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
}
if( nsSwTOXElement::TOX_TEMPLATE & pTOX->GetCreateType() )
- // --> OD 2009-02-27 #i99641#
- // Consider additional styles regardless of TOX-outlinelevel
+ // #i99641# - Consider additional styles regardless of TOX-outlinelevel
for( n = 0; n < MAXLEVEL; ++n )
- // <--
{
const String& rStyles = pTOX->GetStyleNames( n );
if( rStyles.Len() )
@@ -2315,7 +2232,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
if( sStyle.Len() )
{
SwTxtFmtColl* pColl = GetExport().pDoc->FindTxtFmtCollByName(sStyle);
- if (!pColl->IsAssignedToListLevelOfOutlineStyle() || pColl->GetAssignedOutlineStyleLevel() < nTOXLvl)
+ if (!pColl || !pColl->IsAssignedToListLevelOfOutlineStyle() || pColl->GetAssignedOutlineStyleLevel() < nTOXLvl)
{
if( sTOption.Len() )
sTOption += ',';
@@ -2421,7 +2338,6 @@ bool MSWordExportBase::GetNumberFmt(const SwField& rFld, String& rStr)
const SvNumberformat* pNumFmt = pNFmtr->GetEntry( nFmtIdx );
if( pNumFmt )
{
- //sal_uInt16 nLng = rFld.GetLanguage();
LocaleDataWrapper aLocDat( pNFmtr->GetServiceManager(),
MsLangId::convertLanguageToLocale( LANGUAGE_ENGLISH_US ) );
@@ -2466,7 +2382,7 @@ void AttributeOutputBase::GetNumberPara( String& rStr, const SwField& rFld )
rStr.APPEND_CONST_ASC("\\*roman ");
break;
default:
- ASSERT(rFld.GetFormat() == SVX_NUM_ARABIC,
+ OSL_ENSURE(rFld.GetFormat() == SVX_NUM_ARABIC,
"Unknown numbering type exported as default\n");
case SVX_NUM_ARABIC:
rStr.APPEND_CONST_ASC("\\*Arabic ");
@@ -3144,7 +3060,7 @@ void WW8AttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign )
break;
default:
nVal = 4;
- ASSERT( false, "Unknown vert alignment" );
+ OSL_ENSURE( false, "Unknown vert alignment" );
break;
}
m_rWW8Export.InsUInt16( nVal );
@@ -3527,17 +3443,17 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
sal_uLong WW8Export::ReplaceCr( sal_uInt8 nChar )
{
- // Bug #49917#
- ASSERT( nChar, "gegen 0 ersetzt bringt WW97/95 zum Absturz" );
+ OSL_ENSURE( nChar, "gegen 0 ersetzt bringt WW97/95 zum Absturz" );
bool bReplaced = false;
SvStream& rStrm = Strm();
sal_uLong nRetPos = 0, nPos = rStrm.Tell();
- sal_uInt8 nBCode=0;
- sal_uInt16 nUCode=0;
//If there is at least two characters already output
if (nPos - (IsUnicode() ? 2 : 1) >= sal_uLong(pFib->fcMin))
{
+ sal_uInt8 nBCode=0;
+ sal_uInt16 nUCode=0;
+
rStrm.SeekRel(IsUnicode() ? -2 : -1);
if (IsUnicode())
rStrm >> nUCode;
@@ -3578,8 +3494,7 @@ sal_uLong WW8Export::ReplaceCr( sal_uInt8 nChar )
}
else if ((nUCode == 0x0c) && (nChar == 0x0e))
{
- //#108854# a column break after a section has
- //no effect in writer
+ // a column break after a section has no effect in writer
bReplaced = true;
}
rStrm.Seek( nPos );
@@ -3596,13 +3511,6 @@ sal_uLong WW8Export::ReplaceCr( sal_uInt8 nChar )
pChpPlc->AppendFkpEntry(rStrm.Tell());
nRetPos = rStrm.Tell();
}
-#ifndef DBG_UTIL
- else
- {
- ASSERT( nRetPos || nPos == (sal_uLong)pFib->fcMin,
- "WW8_ReplaceCr an falscher FilePos gerufen" );
- }
-#endif
return nRetPos;
}
@@ -3649,9 +3557,6 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak )
{
switch ( rBreak.GetBreak() )
{
- // JP 21.06.99: column breaks never change to pagebreaks
- // case SVX_BREAK_COLUMN_BEFORE:
- // case SVX_BREAK_COLUMN_BOTH:
case SVX_BREAK_NONE:
case SVX_BREAK_PAGE_BEFORE:
case SVX_BREAK_PAGE_BOTH:
@@ -3665,10 +3570,8 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak )
{
sal_uInt8 nC = 0;
bool bBefore = false;
- // --> OD 2007-05-29 #i76300#
- // Note: Can only be <true>, if <bBefore> equals <false>.
+ // #i76300# - Note: Can only be <true>, if <bBefore> equals <false>.
bool bCheckForFollowPageDesc = false;
- // <--
switch ( rBreak.GetBreak() )
{
@@ -3699,9 +3602,8 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak )
case SVX_BREAK_PAGE_AFTER:
case SVX_BREAK_PAGE_BOTH:
nC = msword::PageBreak;
- // --> OD 2007-05-29 #i76300#
- // check for follow page description, if current writing attributes
- // of a paragraph.
+ // #i76300# - check for follow page description,
+ // if current writing attributes of a paragraph.
if ( dynamic_cast< const SwTxtNode* >( GetExport().pOutFmtNode ) &&
GetExport().GetCurItemSet() )
{
@@ -3714,9 +3616,9 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak )
break;
}
- if ( ( bBefore == GetExport().bBreakBefore ) && nC ) // #49917#
+ if ( ( bBefore == GetExport().bBreakBefore ) && nC )
{
- // --> OD 2007-05-29 #i76300#
+ // #i76300#
bool bFollowPageDescWritten = false;
if ( bCheckForFollowPageDesc && !bBefore )
{
@@ -3746,7 +3648,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
switch ( rGrid.GetGridType() )
{
default:
- ASSERT(false, "Unknown grid type");
+ OSL_ENSURE(false, "Unknown grid type");
case GRID_NONE:
nGridType = 0;
break;
@@ -3775,25 +3677,12 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
if (pSwFmt != NULL)
{
nPageCharSize = ItemGet<SvxFontHeightItem>
- (*pSwFmt, RES_CHRATR_CJK_FONTSIZE).GetHeight();
+ (*pSwFmt, RES_CHRATR_FONTSIZE).GetHeight();
}
+ sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() :
+ rGrid.GetBaseWidth( );
+ sal_Int32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
- sal_Int32 nCharWidth = rGrid.GetBaseWidth() - nPageCharSize;
- sal_Int32 nFraction = 0;
- nFraction = nCharWidth % 20;
- if ( nCharWidth < 0 )
- nFraction = 20 + nFraction;
- nFraction = ( nFraction * 0xFFF ) / 20;
- nFraction = ( nFraction & 0x00000FFF );
-
- sal_Int32 nMain = 0;
- nMain = nCharWidth / 20;
- if ( nCharWidth < 0 )
- nMain -= 1;
- nMain = nMain * 0x1000;
- nMain = ( nMain & 0xFFFFF000 );
-
- sal_uInt32 nCharSpace = nFraction + nMain;
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxtCharSpace );
m_rWW8Export.InsUInt32( nCharSpace );
}
@@ -3922,7 +3811,7 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL )
}
else if ( m_rWW8Export.bOutPageDescs ) // Page-UL
{
- ASSERT( m_rWW8Export.GetCurItemSet(), "Impossible" );
+ OSL_ENSURE( m_rWW8Export.GetCurItemSet(), "Impossible" );
if ( !m_rWW8Export.GetCurItemSet() )
return;
@@ -4037,7 +3926,7 @@ void WW8AttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori
{
if ( !m_rWW8Export.mpParentFrame )
{
- ASSERT( m_rWW8Export.mpParentFrame, "HoriOrient without mpParentFrame !!" );
+ OSL_ENSURE( m_rWW8Export.mpParentFrame, "HoriOrient without mpParentFrame !!" );
return;
}
@@ -4076,7 +3965,7 @@ void WW8AttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori
void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
{
- ASSERT( m_rWW8Export.mpParentFrame, "Anchor without mpParentFrame !!" );
+ OSL_ENSURE( m_rWW8Export.mpParentFrame, "Anchor without mpParentFrame !!" );
if ( m_rWW8Export.bOutFlyFrmAttrs )
{
@@ -4156,7 +4045,23 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
else if( bThick )
brcType = 2;
else
+ {
+
brcType = 1;
+ if ( bWrtWW8 )
+ {
+ switch ( rLine.GetStyle( ) )
+ {
+ case DOTTED:
+ brcType = 6;
+ break;
+ case DASHED:
+ brcType = 7;
+ default:
+ break;
+ }
+ }
+ }
// BRC.dxpLineWidth
if( bThick )
@@ -4175,6 +4080,10 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
nWidth = ( nWidth + 7 ) / 15;
if( nWidth > 5 )
nWidth = 5;
+ if ( DOTTED == rLine.GetStyle( ) )
+ nWidth = 6;
+ else if ( DASHED == rLine.GetStyle( ) )
+ nWidth = 7;
}
if( 0 == nWidth ) // ganz duenne Linie
@@ -4222,7 +4131,7 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
void WW8Export::Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
sal_uInt16 nDist, sal_uInt16 nSprmNo, bool bShadow)
{
- ASSERT( ( nSprmNo == 0 ) ||
+ OSL_ENSURE( ( nSprmNo == 0 ) ||
( nSprmNo >= 38 && nSprmNo <= 41 ) ||
( nSprmNo >= NS_sprm::LN_PBrcTop && nSprmNo <= NS_sprm::LN_PBrcRight ) ||
( nSprmNo >= NS_sprm::LN_SBrcTop && nSprmNo <= NS_sprm::LN_SBrcRight ),
@@ -4384,25 +4293,6 @@ void WW8AttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol &
m_rWW8Export.pO->Insert( 138, m_rWW8Export.pO->Count( ) );
m_rWW8Export.pO->Insert( bEven ? 1 : 0, m_rWW8Export.pO->Count( ) );
-#if 0
- // FIXME what's the use of this code
- if ( bEven )
- {
- sal_uInt16 nSpace = rColumns[0]->GetRight() + rColumns[1]->GetLeft();
- for ( n = 2; n < nCols; n++ )
- {
- short nDiff = nSpace - ( rColumns[n - 1]->GetRight()
- + rColumns[n]->GetLeft() );
- if (nDiff > 10 || nDiff < -10)
- {
- // Toleranz: 10 tw
- bEven = false;
- break;
- }
- }
- }
-#endif
-
if ( !bEven )
{
for ( sal_uInt16 n = 0; n < nCols; ++n )
@@ -4574,7 +4464,7 @@ void AttributeOutputBase::ParaLineSpacing( const SvxLineSpacingItem& rSpacing )
getScriptType(pNd->GetTxt(), 0);
}
}
- ASSERT( pSet, "No attrset for lineheight :-(" );
+ OSL_ENSURE( pSet, "No attrset for lineheight :-(" );
if ( pSet )
{
nSpace = nSpace + (short)( AttrSetToLineHeight( *GetExport().pDoc,
@@ -4596,7 +4486,9 @@ void AttributeOutputBase::ParaLineSpacing( const SvxLineSpacingItem& rSpacing )
}
break;
}
-
+ // if nSpace is negative, it is a fixed size in 1/20 of a point
+ // if nSpace is positive and nMulti is 1, it is 1/240 of a single line height
+ // otherwise, I have no clue what the heck it is
ParaLineSpacing_Impl( nSpace, nMulti );
}
@@ -4715,7 +4607,7 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir
{
default:
//Can't get an unknown type here
- ASSERT(false, "Unknown frame direction");
+ OSL_ENSURE(false, "Unknown frame direction");
case FRMDIR_HORI_LEFT_TOP:
nTextFlow = 0;
break;
@@ -4864,8 +4756,8 @@ void SwWW8WrTabu::PutAll(WW8Export& rWrt)
{
if (!nAdd && !nDel) //It its a no-op
return;
- ASSERT(nAdd <= 255, "more than 255 added tabstops ?");
- ASSERT(nDel <= 255, "more than 244 removed tabstops ?");
+ OSL_ENSURE(nAdd <= 255, "more than 255 added tabstops ?");
+ OSL_ENSURE(nDel <= 255, "more than 244 removed tabstops ?");
if (nAdd > 255)
nAdd = 255;
if (nDel > 255)
@@ -5005,7 +4897,7 @@ void WW8AttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStops )
nCurrentLeft = ((const SvxLRSpaceItem*)pLR)->GetTxtLeft();
}
- // --> FLR 2009-03-17 #i100264#
+ // #i100264#
if ( m_rWW8Export.bStyDef &&
m_rWW8Export.pCurrentStyle != NULL &&
m_rWW8Export.pCurrentStyle->DerivedFrom() != NULL )
@@ -5288,7 +5180,7 @@ void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, sal_Bool b
const SfxPoolItem* pItem;
if ( !bDeep || !pSet->GetParent() )
{
- ASSERT( rSet.Count(), "Wurde doch schon behandelt oder?" );
+ OSL_ENSURE( rSet.Count(), "Wurde doch schon behandelt oder?" );
SfxItemIter aIter( *pSet );
pItem = aIter.GetCurItem();
do {
@@ -5313,4 +5205,4 @@ void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, sal_Bool b
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index e8013f9d450d..fa9c1703e3b7 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,7 +75,7 @@ public:
virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet );
/// Output ruby start.
- virtual void StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby );
+ virtual void StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, const SwFmtRuby& rRuby );
/// Output ruby end.
virtual void EndRuby();
@@ -101,31 +102,18 @@ public:
virtual void ParagraphStyle( sal_uInt16 nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo );
-
virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner );
-
virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableRowEnd( sal_uInt32 nDepth = 1 );
/// Start of the styles table.
@@ -139,7 +127,8 @@ public:
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwIdi, sal_uInt16 nId );
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwIdi, sal_uInt16 nId,
+ bool bAutoUpdate );
/// End of a style in the styles table.
virtual void EndStyle();
@@ -438,7 +427,8 @@ public:
virtual ~WW8AttributeOutput() {}
/// Return the right export class.
- virtual MSWordExportBase& GetExport() { return m_rWW8Export; }
+ virtual WW8Export& GetExport() { return m_rWW8Export; }
+ const WW8Export& GetExport() const { return m_rWW8Export; }
protected:
/// Output the bold etc. attributes
@@ -451,4 +441,4 @@ protected:
#endif // _WW8ATTRIBUTEOUTPUT_HXX_
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index d8ef195e763b..380b38a34411 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <tools/urlobj.hxx>
#include <svl/urihelper.hxx>
#include <rtl/tencinfo.h>
@@ -230,7 +230,7 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile )
*pD->GetNodes().GetEndOfContent().StartOfSectionNode(), 1);
if( !aIdx.GetNode().IsTxtNode() )
{
- ASSERT( !this, "wo ist der TextNode?" );
+ OSL_ENSURE( !this, "wo ist der TextNode?" );
pD->GetNodes().GoNext( &aIdx );
}
SwPaM aPamo( aIdx );
@@ -269,4 +269,4 @@ sal_uInt32 WW8GlossaryFib::FindGlossaryFibOffset(SvStream & /* rTableStrm */,
return nGlossaryFibOffset;
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx
index 72770557c110..fe7b4a33bf63 100644
--- a/sw/source/filter/ww8/ww8glsy.hxx
+++ b/sw/source/filter/ww8/ww8glsy.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,7 +25,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#ifndef _WW8GLSY_HXX
#define _WW8GLSY_HXX
@@ -89,4 +89,4 @@ private:
};
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index ab78cbbc59b1..047b3ace270c 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <svl/urihelper.hxx>
#include <hintids.hxx>
#include <osl/endian.h>
@@ -38,7 +38,6 @@
#include <svx/xlineit.hxx>
#include <svx/xfillit.hxx>
#include <svx/svdmodel.hxx>
-#include <svx/sdtaitm.hxx>
#include <svx/svdocapt.hxx>
#include <svx/sxctitm.hxx>
#include <editeng/editeng.hxx>
@@ -64,9 +63,8 @@
#include <svx/rectenum.hxx>
#include <editeng/opaqitem.hxx>
#include <editeng/shaditem.hxx>
-#include <editeng/shaditem.hxx>
#include <editeng/boxitem.hxx>
-#include <editeng/outliner.hxx> // #79453#
+#include <editeng/outliner.hxx>
#include <editeng/frmdiritem.hxx>
#include <svx/xfltrit.hxx>
#include <filter/msfilter/msdffimp.hxx>
@@ -93,7 +91,7 @@
#include <fmtinfmt.hxx>
#include <editeng/eeitem.hxx>
#include <editeng/flditem.hxx>
-// OD 30.09.2003 #i18732#
+// #i18732#
#include <fmtfollowtextflow.hxx>
#include "writerhelper.hxx"
#include "writerwordglue.hxx"
@@ -179,7 +177,7 @@ bool SwWW8ImplReader::ReadGrafStart(void* pData, short nDataSiz,
{
if (SVBT16ToShort(pHd->cb) < sizeof(WW8_DPHEAD) + nDataSiz)
{
- ASSERT( !this, "+Grafik-Element: Size ?" );
+ OSL_ENSURE( !this, "+Grafik-Element: Size ?" );
pStrm->SeekRel(SVBT16ToShort(pHd->cb) - sizeof(WW8_DPHEAD));
return false;
}
@@ -578,7 +576,7 @@ private:
long mnEndPos; //0x15
public:
explicit Chunk(long nStart, const String &rURL)
- : msURL(rURL), mnStartPos(nStart) {}
+ : msURL(rURL), mnStartPos(nStart), mnEndPos(0) {}
Chunk(const Chunk &rChunk)
: msURL(rChunk.msURL), mnStartPos(rChunk.mnStartPos),
mnEndPos(rChunk.mnEndPos) {}
@@ -810,7 +808,7 @@ bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
WW8PLCFspecial* pT = pPlcxMan ? pPlcxMan->GetTxbx() : 0;
if( !pT )
{
- ASSERT( !this, "+Wo ist der Grafik-Text (1) ?" );
+ OSL_ENSURE( !this, "+Wo ist der Grafik-Text (1) ?" );
return false;
}
@@ -823,7 +821,7 @@ bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
void* pT0;
if( !pT->Get( rStartCp, pT0 ) )
{
- ASSERT( !this, "+Wo ist der Grafik-Text (2) ?" );
+ OSL_ENSURE( !this, "+Wo ist der Grafik-Text (2) ?" );
return false;
}
@@ -835,7 +833,7 @@ bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
(*pT)++;
if( !pT->Get( rStartCp, pT0 ) )
{
- ASSERT( !this, "+Wo ist der Grafik-Text (2-a) ?" );
+ OSL_ENSURE( !this, "+Wo ist der Grafik-Text (2-a) ?" );
return false;
}
bReusable = (0 != SVBT16ToShort( ((WW8_TXBXS*)pT0)->fReusable ));
@@ -844,7 +842,7 @@ bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
(*pT)++;
if( !pT->Get( rEndCp, pT0 ) )
{
- ASSERT( !this, "+Wo ist der Grafik-Text (3) ?" );
+ OSL_ENSURE( !this, "+Wo ist der Grafik-Text (3) ?" );
return false;
}
@@ -865,7 +863,7 @@ bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
// den ersten Eintrag fuer diese TextBox-Story finden
if( !pT->SeekPos( rStartCp ) )
{
- ASSERT( !this, "+Wo ist der Grafik-Text (4) ?" );
+ OSL_ENSURE( !this, "+Wo ist der Grafik-Text (4) ?" );
return false;
}
// ggfs. entsprechende Anzahl Eintraege weitergehen
@@ -874,7 +872,7 @@ bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
if( (!pT->Get( rStartCp, pT0 ))
|| ( nMinStartCp > rStartCp ) )
{
- ASSERT( !this, "+Wo ist der Grafik-Text (5) ?" );
+ OSL_ENSURE( !this, "+Wo ist der Grafik-Text (5) ?" );
return false;
}
if( rStartCp >= nMaxEndCp )
@@ -885,7 +883,7 @@ bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
if( (!pT->Get( rEndCp, pT0 ))
|| ( nMaxEndCp < rEndCp-1 ) )
{
- ASSERT( !this, "+Wo ist der Grafik-Text (6) ?" );
+ OSL_ENSURE( !this, "+Wo ist der Grafik-Text (6) ?" );
return false;
}
rEndCp -= 1;
@@ -906,7 +904,7 @@ bool SwWW8ImplReader::GetRangeAsDrawingString(String& rString, long nStartCp, lo
WW8_CP nOffset = pWwFib->GetBaseCp(eType);
bool bOk = false;
- ASSERT(nStartCp <= nEndCp, "+Wo ist der Grafik-Text (7) ?");
+ OSL_ENSURE(nStartCp <= nEndCp, "+Wo ist der Grafik-Text (7) ?");
if (nStartCp == nEndCp)
rString.Erase(); // leerer String: durchaus denkbar!
else if (nStartCp < nEndCp)
@@ -914,7 +912,7 @@ bool SwWW8ImplReader::GetRangeAsDrawingString(String& rString, long nStartCp, lo
// den Text einlesen: kann sich ueber mehrere Pieces erstrecken!!!
sal_uInt16 nLen = pSBase->WW8ReadString(*pStrm, rString,
nStartCp + nOffset, nEndCp - nStartCp, GetCurrentCharSet());
- ASSERT(nLen, "+Wo ist der Grafik-Text (8) ?");
+ OSL_ENSURE(nLen, "+Wo ist der Grafik-Text (8) ?");
if (nLen)
{
bOk = true;
@@ -1052,17 +1050,15 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
Read_PicLoc(nAktId, pParams, 1);
break;
}
- aSprmIter++;
+ aSprmIter.advance();
}
- //if( bRead_Obj || bRead_PicLoc ) break;
if( !nLoop )
{
pChp->GetPCDSprms( aDesc );
aSprmIter.SetSprms( aDesc.pMemPos,
aDesc.nSprmsLen );
}
- //if( bRead_Obj || bRead_PicLoc ) break;
}
aSave.Restore(this);
bEmbeddObj=bOldEmbeddObj;
@@ -1132,6 +1128,7 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
MatchSdrItemsIntoFlySet( pTextObj,
aFlySet,
pRecord->eLineStyle,
+ pRecord->eLineDashing,
pRecord->eShapeType,
aInnerDist );
@@ -1314,10 +1311,9 @@ SdrObject *SwWW8ImplReader::ReadGroup( WW8_DPHEAD* pHd, const WW8_DO* pDo,
SfxAllItemSet aSet(pDrawModel->GetItemPool());
if (SdrObject *pObject = ReadGrafPrimitive(nLeft, pDo, aSet))
{
- // #116150#
// first add and then set ItemSet
SdrObjList *pSubGroup = pObj->GetSubList();
- ASSERT(pSubGroup, "Why no sublist available?");
+ OSL_ENSURE(pSubGroup, "Why no sublist available?");
if (pSubGroup)
pSubGroup->InsertObject(pObject, 0);
pObject->SetMergedItemSetAndBroadcast(aSet);
@@ -1375,7 +1371,7 @@ SdrObject* SwWW8ImplReader::ReadGrafPrimitive( short& rLeft, const WW8_DO* pDo,
}
else
{
- ASSERT( !this, "+Grafik-Overlap" );
+ OSL_ENSURE( !this, "+Grafik-Overlap" );
}
rLeft = rLeft - SVBT16ToShort( aHd.cb );
return pRet;
@@ -1388,13 +1384,13 @@ void SwWW8ImplReader::ReadGrafLayer1( WW8PLCFspecial* pPF, long nGrafAnchorCp )
void* pF0;
if( !pPF->Get( nStartFc, pF0 ) )
{
- ASSERT( !this, "+Wo ist die Grafik (2) ?" );
+ OSL_ENSURE( !this, "+Wo ist die Grafik (2) ?" );
return;
}
WW8_FDOA* pF = (WW8_FDOA*)pF0;
if( !SVBT32ToUInt32( pF->fc ) )
{
- ASSERT( !this, "+Wo ist die Grafik (3) ?" );
+ OSL_ENSURE( !this, "+Wo ist die Grafik (3) ?" );
return;
}
WW8_DO aDo;
@@ -1477,26 +1473,28 @@ const WW8_BordersSO &WW8_BordersSO::Get0x01LineMatch(eBorderCode eCode)
// Deklarationen gemaess BOXITEM.HXX
static const WW8_BordersSO aLineTabVer8[] =
{
-/* 0*/ { DEF_LINE_WIDTH_0, 0, 0 },
-/* 1*/ { DEF_LINE_WIDTH_1, 0, 0 },
-/* 2*/ { DEF_LINE_WIDTH_2, 0, 0 },
-/* 3*/ { DEF_LINE_WIDTH_3, 0, 0 },
-/* 4*/ { DEF_LINE_WIDTH_4, 0, 0 },
-/* 5*/ { DEF_LINE_WIDTH_5, 0, 0 },
-/* 6*/ { DEF_DOUBLE_LINE0_OUT, DEF_DOUBLE_LINE0_IN, DEF_DOUBLE_LINE0_DIST },
-/* 7*/ { DEF_DOUBLE_LINE1_OUT, DEF_DOUBLE_LINE1_IN, DEF_DOUBLE_LINE1_DIST },
-/* 8*/ { DEF_DOUBLE_LINE2_OUT, DEF_DOUBLE_LINE2_IN, DEF_DOUBLE_LINE2_DIST },
-/* 9*/ { DEF_DOUBLE_LINE3_OUT, DEF_DOUBLE_LINE3_IN, DEF_DOUBLE_LINE3_DIST },
-/*10*/ { DEF_DOUBLE_LINE4_OUT, DEF_DOUBLE_LINE4_IN, DEF_DOUBLE_LINE4_DIST },
-/*11*/ { DEF_DOUBLE_LINE5_OUT, DEF_DOUBLE_LINE5_IN, DEF_DOUBLE_LINE5_DIST },
-/*12*/ { DEF_DOUBLE_LINE6_OUT, DEF_DOUBLE_LINE6_IN, DEF_DOUBLE_LINE6_DIST },
-/*13*/ { DEF_DOUBLE_LINE7_OUT, DEF_DOUBLE_LINE7_IN, DEF_DOUBLE_LINE7_DIST },
-/*14*/ { DEF_DOUBLE_LINE8_OUT, DEF_DOUBLE_LINE8_IN, DEF_DOUBLE_LINE8_DIST },
-/*15*/ { DEF_DOUBLE_LINE9_OUT, DEF_DOUBLE_LINE9_IN, DEF_DOUBLE_LINE9_DIST },
-/*16*/ { DEF_DOUBLE_LINE10_OUT,DEF_DOUBLE_LINE10_IN,DEF_DOUBLE_LINE10_DIST}
+/* 0*/ { DEF_LINE_WIDTH_0, 0, 0, SOLID },
+/* 1*/ { DEF_LINE_WIDTH_1, 0, 0, SOLID },
+/* 2*/ { DEF_LINE_WIDTH_2, 0, 0, SOLID },
+/* 3*/ { DEF_LINE_WIDTH_3, 0, 0, SOLID },
+/* 4*/ { DEF_LINE_WIDTH_4, 0, 0, SOLID },
+/* 5*/ { DEF_LINE_WIDTH_5, 0, 0, SOLID },
+/* 6*/ { DEF_DOUBLE_LINE0_OUT, DEF_DOUBLE_LINE0_IN, DEF_DOUBLE_LINE0_DIST, SOLID },
+/* 7*/ { DEF_DOUBLE_LINE1_OUT, DEF_DOUBLE_LINE1_IN, DEF_DOUBLE_LINE1_DIST, SOLID },
+/* 8*/ { DEF_DOUBLE_LINE2_OUT, DEF_DOUBLE_LINE2_IN, DEF_DOUBLE_LINE2_DIST, SOLID },
+/* 9*/ { DEF_DOUBLE_LINE3_OUT, DEF_DOUBLE_LINE3_IN, DEF_DOUBLE_LINE3_DIST, SOLID },
+/*10*/ { DEF_DOUBLE_LINE4_OUT, DEF_DOUBLE_LINE4_IN, DEF_DOUBLE_LINE4_DIST, SOLID },
+/*11*/ { DEF_DOUBLE_LINE5_OUT, DEF_DOUBLE_LINE5_IN, DEF_DOUBLE_LINE5_DIST, SOLID },
+/*12*/ { DEF_DOUBLE_LINE6_OUT, DEF_DOUBLE_LINE6_IN, DEF_DOUBLE_LINE6_DIST, SOLID },
+/*13*/ { DEF_DOUBLE_LINE7_OUT, DEF_DOUBLE_LINE7_IN, DEF_DOUBLE_LINE7_DIST, SOLID },
+/*14*/ { DEF_DOUBLE_LINE8_OUT, DEF_DOUBLE_LINE8_IN, DEF_DOUBLE_LINE8_DIST, SOLID },
+/*15*/ { DEF_DOUBLE_LINE9_OUT, DEF_DOUBLE_LINE9_IN, DEF_DOUBLE_LINE9_DIST, SOLID },
+/*16*/ { DEF_DOUBLE_LINE10_OUT,DEF_DOUBLE_LINE10_IN,DEF_DOUBLE_LINE10_DIST, SOLID},
+/*17*/ { DEF_LINE_WIDTH_5, 0, 0, DASHED },
+/*18*/ { DEF_LINE_WIDTH_5, 0, 0, DOTTED }
};
size_t nPos = static_cast<size_t>(eCode);
- ASSERT(nPos < sizeof(aLineTabVer8), "Impossible");
+ OSL_ENSURE(nPos < sizeof(aLineTabVer8), "Impossible");
if (nPos >= sizeof(aLineTabVer8))
eCode = single0;
return aLineTabVer8[eCode];
@@ -1562,7 +1560,7 @@ sal_Int32 SwMSDffManager::GetEscherLineMatch(MSO_LineStyle eStyle,
//words positioning of borders around floating objects is that of a
//disturbed mind.
sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
- MSO_LineStyle eLineStyle, MSO_SPT eShapeType, sal_Int32 &rLineThick,
+ MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, sal_Int32 &rLineThick,
SvxBoxItem& rBox )
{
sal_Int32 nOutsideThick = 0;
@@ -1653,10 +1651,22 @@ sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
break;
// erroneously not implemented line style is set
default:
- ASSERT(!this, "eLineStyle is not (yet) implemented!");
+ OSL_ENSURE(!this, "eLineStyle is not (yet) implemented!");
break;
}
+ switch( eDashing )
+ {
+ case mso_lineDashGEL:
+ nIdx = WW8_BordersSO::dashed;
+ break;
+ case mso_lineDotGEL:
+ nIdx = WW8_BordersSO::dotted;
+ break;
+ default:
+ break;
+ }
+
if (WW8_BordersSO::none != nIdx)
{
SvxBorderLine aLine;
@@ -1667,6 +1677,7 @@ sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
aLine.SetOutWidth(rBorders.mnOut);
aLine.SetInWidth (rBorders.mnIn);
aLine.SetDistance(rBorders.mnDist);
+ aLine.SetStyle( rBorders.mnType );
for(sal_uInt16 nLine = 0; nLine < 4; ++nLine)
rBox.SetLine(new SvxBorderLine( aLine ), nLine);
@@ -1678,7 +1689,7 @@ sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
#define WW8ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
- SfxItemSet& rFlySet, MSO_LineStyle eLineStyle, MSO_SPT eShapeType,
+ SfxItemSet& rFlySet, MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType,
Rectangle& rInnerDist )
{
/*
@@ -1704,7 +1715,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
// einige Items koennen direkt so uebernommen werden
const sal_uInt16 nDirectMatch = 2;
- static RES_FRMATR __READONLY_DATA aDirectMatch[ nDirectMatch ] =
+ static RES_FRMATR const aDirectMatch[ nDirectMatch ] =
{
RES_LR_SPACE, // Aussenabstand links/rechts: SvxLRSpaceItem
RES_UL_SPACE // Aussenabstand Oben/unten: SvxULSpaceItem
@@ -1740,7 +1751,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
nLineThick = 15; // WW-default: 0.75 pt
nOutside = MatchSdrBoxIntoFlyBoxItem(aLineColor, eLineStyle,
- eShapeType, nLineThick, aBox);
+ eDashing, eShapeType, nLineThick, aBox);
}
rInnerDist.Left()+=nLineThick;
@@ -1836,13 +1847,6 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
SdrShadowXDistItem);
const sal_Int32 nShdDistY = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWYDIST,
SdrShadowYDistItem);
- //const sal_uInt16 nShdTrans= WW8ITEMVALUE(rOldSet,
- // SDRATTR_SHADOWTRANSPARENCE, SdrShadowTransparenceItem);
-
- // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- //
- // SfxVoidItem( SDRATTR_SHADOW3D )
- // SfxVoidItem( SDRATTR_SHADOWPERSP )
aShadow.SetColor( Color( aShdColor ) );
@@ -1901,6 +1905,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
}
break;
case XFILL_SOLID:
+ case XFILL_GRADIENT:
{
const Color aColor = static_cast< XFillColorItem const & >(
rOldSet.Get(XATTR_FILLCOLOR)).GetColorValue();
@@ -1912,8 +1917,8 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
bBrushItemOk = true;
}
break;
- case XFILL_GRADIENT:
- break;
+ //case XFILL_GRADIENT:
+ //break;
case XFILL_HATCH:
break;
case XFILL_BITMAP:
@@ -1953,11 +1958,17 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
void SwWW8ImplReader::AdjustLRWrapForWordMargins(
const SvxMSDffImportRec &rRecord, SvxLRSpaceItem &rLR)
{
+ sal_uInt32 nXRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
+ if ( rRecord.pXRelTo )
+ {
+ nXRelTo = *(rRecord.pXRelTo);
+ }
+
// Left adjustments - if horizontally aligned to left of
// margin or column then remove the left wrapping
if (rRecord.nXAlign == 1)
{
- if ((rRecord.nXRelTo == 0) || (rRecord.nXRelTo == 2))
+ if ((nXRelTo == 0) || (nXRelTo == 2))
rLR.SetLeft((sal_uInt16)0);
}
@@ -1965,18 +1976,18 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
// margin or column then remove the right wrapping
if (rRecord.nXAlign == 3)
{
- if ((rRecord.nXRelTo == 0) || (rRecord.nXRelTo == 2))
+ if ((nXRelTo == 0) || (nXRelTo == 2))
rLR.SetRight((sal_uInt16)0);
}
//Inside margin, remove left wrapping
- if ((rRecord.nXAlign == 4) && (rRecord.nXRelTo == 0))
+ if ((rRecord.nXAlign == 4) && (nXRelTo == 0))
{
rLR.SetLeft((sal_uInt16)0);
}
//Outside margin, remove left wrapping
- if ((rRecord.nXAlign == 5) && (rRecord.nXRelTo == 0))
+ if ((rRecord.nXAlign == 5) && (nXRelTo == 0))
{
rLR.SetRight((sal_uInt16)0);
}
@@ -1986,11 +1997,17 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
void SwWW8ImplReader::AdjustULWrapForWordMargins(
const SvxMSDffImportRec &rRecord, SvxULSpaceItem &rUL)
{
+ sal_uInt32 nYRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
+ if ( rRecord.pYRelTo )
+ {
+ nYRelTo = *(rRecord.pYRelTo);
+ }
+
// Top adjustment - remove upper wrapping if aligned to page
// printable area or to page
if (rRecord.nYAlign == 1)
{
- if ((rRecord.nYRelTo == 0) || (rRecord.nYRelTo == 1))
+ if ((nYRelTo == 0) || (nYRelTo == 1))
rUL.SetUpper((sal_uInt16)0);
}
@@ -1998,23 +2015,13 @@ void SwWW8ImplReader::AdjustULWrapForWordMargins(
// printable area or to page
if (rRecord.nYAlign == 3)
{
- if ((rRecord.nYRelTo == 0) || (rRecord.nYRelTo == 1))
+ if ((nYRelTo == 0) || (nYRelTo == 1))
rUL.SetLower((sal_uInt16)0);
}
//Remove top margin if aligned vertically inside margin
- if ((rRecord.nYAlign == 4) && (rRecord.nYRelTo == 0))
+ if ((rRecord.nYAlign == 4) && (nYRelTo == 0))
rUL.SetUpper((sal_uInt16)0);
-
- /*
- // Something like this needs to be done once inside and outside are
- // fixed
- if (rRecord.nYAlign == 4)
- {
- if (rRecord.nYRelTo == 0)
- rUL.SetUpper((sal_uInt16)0);
- }
- */
}
void SwWW8ImplReader::MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord,
@@ -2113,7 +2120,7 @@ void SwWW8ImplReader::MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord,
Fraction aMapPolyY(rOrigSize.Height(), ww::nWrap100Percent);
aPoly.Scale(aMapPolyX, aMapPolyY);
- // --> OD 2005-05-19 #i47277# - contour is already in unit of the
+ // #i47277# - contour is already in unit of the
// graphic prefered unit. Thus, call method <SetContour(..)>
pNd->SetContour(&aPoly);
// <--
@@ -2129,11 +2136,10 @@ void SwWW8ImplReader::SetAttributesAtGrfNode( SvxMSDffImportRec* pRecord,
if( pIdx && 0 != (pGrfNd = rDoc.GetNodes()[pIdx->GetIndex() + 1]->GetGrfNode() ))
{
Size aSz(pGrfNd->GetTwipSize());
- // --> OD 2005-08-01 #124722# - use type <sal_uInt64> instead of <sal_uLong>
- // to get correct results in the following calculations.
+ // use type <sal_uInt64> instead of sal_uLong to get correct results
+ // in the following calculations.
sal_uInt64 rHeight = aSz.Height();
sal_uInt64 rWidth = aSz.Width();
- // <--
if( !rWidth && pF)
rWidth = pF->nXaRight - pF->nXaLeft;
else if( !rHeight && pF)
@@ -2208,7 +2214,6 @@ SdrObject* SwWW8ImplReader::CreateContactObject(SwFrmFmt* pFlyFmt)
{
if (pFlyFmt)
{
- //JP 11.1.2002: task 96329
SdrObject* pNewObject = mbNewDoc ? 0 : pFlyFmt->FindRealSdrObject();
if (!pNewObject)
pNewObject = pFlyFmt->FindSdrObject();
@@ -2224,8 +2229,7 @@ SdrObject* SwWW8ImplReader::CreateContactObject(SwFrmFmt* pFlyFmt)
return 0;
}
-//#109311# Miserable miserable hack to fudge word's graphic layout in
-//RTL mode to ours.
+// Miserable miserable hack to fudge word's graphic layout in RTL mode to ours.
bool SwWW8ImplReader::MiserableRTLGraphicsHack(SwTwips &rLeft, SwTwips nWidth,
sal_Int16 eHoriOri, sal_Int16 eHoriRel)
{
@@ -2240,16 +2244,22 @@ bool SwWW8ImplReader::MiserableRTLGraphicsHack(SwTwips &rLeft, SwTwips nWidth,
RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
WW8_FSPA *pFSPA, SfxItemSet &rFlySet, bool /*bOrgObjectWasReplace*/)
{
- ASSERT(pRecord || pFSPA, "give me something! to work with for anchoring");
+ OSL_ENSURE(pRecord || pFSPA, "give me something! to work with for anchoring");
if (!pRecord && !pFSPA)
return FLY_AT_PAGE;
SvxMSDffImportRec aRecordFromFSPA;
if (!pRecord)
- {
pRecord = &aRecordFromFSPA;
- pRecord->nXRelTo = pFSPA->nbx;
- pRecord->nYRelTo = pFSPA->nby;
+ if (!(pRecord->pXRelTo) && pFSPA)
+ {
+ pRecord->pXRelTo = new sal_uInt32;
+ *(pRecord->pXRelTo) = pFSPA->nbx;
+ }
+ if (!(pRecord->pYRelTo) && pFSPA)
+ {
+ pRecord->pYRelTo = new sal_uInt32;
+ *(pRecord->pYRelTo) = pFSPA->nby;
}
// nXAlign - abs. Position, Left, Centered, Right, Inside, Outside
@@ -2269,32 +2279,29 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
if (pFSPA)
{
/*
- #74188# #i15718# #i19008#
+ #i15718# #i19008#
Strangely in this case the FSPA value seems to be considered before
the newer escher nXRelTo record.
*/
- // --> OD 2005-08-04 #i52565# - correct condition checking:
+ // #i52565# - correct condition checking:
// first check, if <nXRelTo> and <nYRelTo> have default values. This
// is a hint that these values aren't set by the escher import - see
// method <SwMSDffManager::ProcessObj(..)>. Then, check if for each
// values, if it differs from the one in the FSPA.
- if ( pRecord->nXRelTo == 2 && pRecord->nYRelTo == 2 )
+ if ( *(pRecord->pXRelTo) == 2 && *(pRecord->pYRelTo) == 2 )
{
// if <nYRelTo> differs from <FSPA.nby> overwrite <nYRelTo>
- if ( pFSPA->nby != pRecord->nYRelTo )
+ if ( pFSPA->nby != *(pRecord->pYRelTo) )
{
- pRecord->nYRelTo = pFSPA->nby;
+ *(pRecord->pYRelTo) = pFSPA->nby;
}
}
- // <--
}
- sal_uInt32 nXRelTo = nCntRelTo > pRecord->nXRelTo ? pRecord->nXRelTo : 1;
- sal_uInt32 nYRelTo = nCntRelTo > pRecord->nYRelTo ? pRecord->nYRelTo : 1;
+ sal_uInt32 nXRelTo = nCntRelTo > *(pRecord->pXRelTo) ? *(pRecord->pXRelTo) : 1;
+ sal_uInt32 nYRelTo = nCntRelTo > *(pRecord->pYRelTo) ? *(pRecord->pYRelTo) : 1;
- // --> OD 2005-03-03 #i43718#
- RndStdIds eAnchor = IsInlineEscherHack() ? FLY_AS_CHAR : FLY_AT_CHAR;
- // <--
+ RndStdIds eAnchor = IsInlineEscherHack() ? FLY_AS_CHAR : FLY_AT_CHAR; // #i43718#
SwFmtAnchor aAnchor( eAnchor );
aAnchor.SetAnchor( pPaM->GetPoint() );
@@ -2302,7 +2309,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
if (pFSPA)
{
- // OD 14.10.2003 #i18732#
+ // #i18732#
//Given new layout where everything is changed to be anchored to
//character the following 4 tables may need to be changed.
@@ -2313,7 +2320,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
text::HoriOrientation::LEFT, // left
text::HoriOrientation::CENTER, // centered
text::HoriOrientation::RIGHT, // right
- // --> OD 2004-12-06 #i36649#
+ // #i36649#
// - inside -> text::HoriOrientation::LEFT and outside -> text::HoriOrientation::RIGHT
text::HoriOrientation::LEFT, // inside
text::HoriOrientation::RIGHT // outside
@@ -2332,7 +2339,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
text::VertOrientation::LINE_BOTTOM // outside (obscure)
};
- // CMC,OD 24.11.2003 #i22673# - to-line vertical alignment
+ // #i22673# - to-line vertical alignment
static const sal_Int16 aToLineVertOriTab[ nCntYAlign ] =
{
text::VertOrientation::NONE, // below
@@ -2353,8 +2360,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
};
// Adjustment is vertically relative to...
- // CMC, OD 24.11.2003 #i22673# - adjustment for new vertical alignment
- // at top of line.
+ // #i22673# - adjustment for new vertical alignment at top of line.
static const sal_Int16 aVertRelOriTab[nCntRelTo] =
{
text::RelOrientation::PAGE_PRINT_AREA, // 0 is page textarea margin
@@ -2366,7 +2372,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
sal_Int16 eHoriOri = aHoriOriTab[ nXAlign ];
sal_Int16 eHoriRel = aHoriRelOriTab[ nXRelTo ];
- // --> OD 2004-12-06 #i36649# - adjustments for certain alignments
+ // #i36649# - adjustments for certain alignments
if ( eHoriOri == text::HoriOrientation::LEFT && eHoriRel == text::RelOrientation::PAGE_FRAME )
{
// convert 'left to page' to 'from left -<width> to page text area'
@@ -2387,11 +2393,11 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
}
// <--
- // --> OD 2005-02-07 #i24255# - position of floating screen objects in
+ // #i24255# - position of floating screen objects in
// R2L layout are given in L2R layout, thus convert them of all
// floating screen objects, which are imported.
{
- //#109311# Miserable miserable hack.
+ // Miserable miserable hack.
SwTwips nWidth = (pFSPA->nXaRight - pFSPA->nXaLeft);
SwTwips nLeft = pFSPA->nXaLeft;
if (MiserableRTLGraphicsHack(nLeft, nWidth, eHoriOri,
@@ -2403,15 +2409,13 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
}
// <--
- // --> OD 2005-01-20 #118546# - if the object is anchored inside
- // a table cell, is horizontal aligned at frame|character and
- // has wrap through, but its attribute 'layout in table cell' isn't set,
- // convert its horizontal alignment to page text area.
- // --> OD 2008-04-10 #i84783# - use new method <IsObjectLayoutInTableCell()>
+ // if the object is anchored inside a table cell, is horizontal aligned
+ // at frame|character and has wrap through, but its attribute
+ // 'layout in table cell' isn't set, convert its horizontal alignment to page text area.
+ // #i84783# - use new method <IsObjectLayoutInTableCell()>
if ( nInTable &&
( eHoriRel == text::RelOrientation::FRAME || eHoriRel == text::RelOrientation::CHAR ) &&
pFSPA->nwr == 3 &&
-// pRecord->nLayoutInTableCell == 0x80000000 )
!IsObjectLayoutInTableCell( pRecord->nLayoutInTableCell ) )
{
eHoriRel = text::RelOrientation::PAGE_PRINT_AREA;
@@ -2432,9 +2436,8 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
pRecord->nDxWrapDistRight=0;
sal_Int16 eVertRel;
- // OD 14.10.2003 #i18732#
- eVertRel = aVertRelOriTab[ nYRelTo ];
- // CMC, OD 24.11.2003 #i22673# - fill <eVertOri> in dependence of <eVertRel>
+ eVertRel = aVertRelOriTab[ nYRelTo ]; // #i18732#
+ // #i22673# - fill <eVertOri> in dependence of <eVertRel>
sal_Int16 eVertOri;
if ( eVertRel == text::RelOrientation::TEXT_LINE )
{
@@ -2448,7 +2451,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
//Below line in word is a positive value, while in writer its
//negative
long nYPos = pFSPA->nYaTop;
- // CMC, OD 24.11.2003 #i22673#
+ // #i22673#
if ((eVertRel == text::RelOrientation::TEXT_LINE) && (eVertOri == text::VertOrientation::NONE))
nYPos = -nYPos;
@@ -2467,7 +2470,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
return eAnchor;
}
-// --> OD 2008-04-10 #i84783#
+// #i84783#
bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const
{
bool bIsObjectLayoutInTableCell = false;
@@ -2480,7 +2483,7 @@ bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTable
case 0x0000: // version 8 aka Microsoft Word 97
{
bIsObjectLayoutInTableCell = false;
- ASSERT( nLayoutInTableCell == 0xFFFFFFFF,
+ OSL_ENSURE( nLayoutInTableCell == 0xFFFFFFFF,
"no explicit object attribute layout in table cell excepted." );
}
break;
@@ -2489,7 +2492,7 @@ bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTable
case 0x6000: // version 11 aka Microsoft Word 2003
case 0x8000: // version 12 aka Microsoft Word 2007
{
- // --> OD 2009-01-13 #i98037#
+ // #i98037#
// adjustment of conditions needed after deeper analysis of
// certain test cases.
if ( nLayoutInTableCell == 0xFFFFFFFF || // no explicit attribute value given
@@ -2508,7 +2511,7 @@ bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTable
break;
default:
{
- ASSERT( false,
+ OSL_ENSURE( false,
"unknown version." );
}
}
@@ -2532,7 +2535,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
WW8PLCFspecial* pPF = pPlcxMan->GetFdoa();
if( !pPF )
{
- ASSERT( !this, "Where is the grapic (1) ?" );
+ OSL_ENSURE( !this, "Where is the grapic (1) ?" );
return 0;
}
@@ -2553,7 +2556,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
WW8_FC nStartFc;
void* pF0;
if( !pPF->Get( nStartFc, pF0 ) ){
- ASSERT( !this, "+Wo ist die Grafik (2) ?" );
+ OSL_ENSURE( !this, "+Wo ist die Grafik (2) ?" );
return 0;
}
@@ -2568,7 +2571,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
#endif // defined __WW8_NEEDS_COPY
if( !pF->nSpId )
{
- ASSERT( !this, "+Wo ist die Grafik (3) ?" );
+ OSL_ENSURE( !this, "+Wo ist die Grafik (3) ?" );
return 0;
}
@@ -2594,7 +2597,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
if (!bOk)
{
- ASSERT( !this, "Where is the Shape ?" );
+ OSL_ENSURE( !this, "Where is the Shape ?" );
return 0;
}
@@ -2616,13 +2619,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
}
- // OD 14.10.2003 - keep wrapping of objects in page header/footer.
- /*
- //#108778# when in a header or footer word appears to treat all elements
- //are wrap through
- if (bIsHeader || bIsFooter)
- pF->nwr = 3;
- */
+ // when in a header or footer word appears to treat all elements as wrap through
// Umfluss-Modus ermitteln
SfxItemSet aFlySet(rDoc.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1);
@@ -2679,7 +2676,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
// eingelesenes Objekt (kann eine ganze Gruppe sein) jetzt korrekt
// positionieren usw.
- ASSERT(!((aData.GetRecCount() != 1) && bReplaceable),
+ OSL_ENSURE(!((aData.GetRecCount() != 1) && bReplaceable),
"Replaceable drawing with > 1 entries ?");
if (aData.GetRecCount() != 1)
@@ -2700,25 +2697,16 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
pRecord = 0;
}
- ASSERT(pRecord, "how did that happen?");
+ OSL_ENSURE(pRecord, "how did that happen?");
if (!pRecord)
return 0;
- // --> OD 2008-04-10 #i84783#
-// //cmc: We're in a table, and the element has the magic Word XP bit set
-// //to enable layout inside a cell
-// // --> OD 2005-08-10 #124714# - undo change made for issue #i33442#
-// bool bLayoutInTableCell = ( nInTable &&
-// pRecord->nLayoutInTableCell & 0x00008000 );
-// // <--
const bool bLayoutInTableCell =
nInTable && IsObjectLayoutInTableCell( pRecord->nLayoutInTableCell );
// <--
- // OD 14.10.2003 #i18732#
- // Switch on 'follow text flow',
- // if object is laid out inside table cell and
- // its wrapping isn't 'SURROUND_THROUGH'
+ // #i18732# - Switch on 'follow text flow', if object is laid out
+ // inside table cell and its wrapping isn't 'SURROUND_THROUGH'
if (bLayoutInTableCell && eSurround != SURROUND_THROUGHT)
{
SwFmtFollowTextFlow aFollowTextFlow( sal_True );
@@ -2735,10 +2723,8 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
// #i14045# MM If we are in a header or footer then make the object transparent
// Not exactly like word but close enough for now
- // --> OD 2005-03-07 #b6234902# - both flags <bBelowText> and <bDrawHell>
- // have to be set to move object into the background.
- // --> OD 2005-04-11 #i46794# - it reveals that value of flag <bBelowText>
- // can be neglected.
+ // both flags <bBelowText> and <bDrawHell> have to be set to move object into the background.
+ // #i46794# - it reveals that value of flag <bBelowText> can be neglected.
const bool bMoveToBackgrd = pRecord->bDrawHell ||
( ( bIsHeader || bIsFooter ) && pF->nwr == 3 );
if ( bMoveToBackgrd )
@@ -2784,12 +2770,8 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
if (!IsInlineEscherHack())
{
- /*
- #97824# Need to make sure that the correct layer ordering is
- applied.
- */
- // --> OD 2004-12-13 #117915# - pass information, if object
- // is in page header|footer to method.
+ /* Need to make sure that the correct layer ordering is applied. */
+ // pass information, if object is in page header|footer to method.
pWWZOrder->InsertEscherObject( pObject, pF->nSpId,
bIsHeader || bIsFooter );
// <--
@@ -2801,7 +2783,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
pRetFrmFmt = rDoc.Insert(*pPaM, *pObject, &aFlySet, NULL);
- ASSERT(pRetFrmFmt->GetAnchor().GetAnchorId() ==
+ OSL_ENSURE(pRetFrmFmt->GetAnchor().GetAnchorId() ==
eAnchor, "Not the anchor type requested!");
/*
@@ -2823,7 +2805,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
}
}
- // --> OD 2005-03-11 #i44344#, #i44681# - positioning attributes already set
+ // #i44344#, #i44681# - positioning attributes already set
if ( pRetFrmFmt /*#i52825# */ && pRetFrmFmt->ISA(SwDrawFrmFmt) )
{
static_cast<SwDrawFrmFmt*>(pRetFrmFmt)->PosAttrSet();
@@ -2833,7 +2815,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
MapWrapIntoFlyFmt(pRecord, pRetFrmFmt);
// Set frame name with object name
- if( aObjName.Len() )
+ if( pRetFrmFmt /*#i52825# */ && aObjName.Len() )
pRetFrmFmt->SetName( aObjName );
return AddAutoAnchor(pRetFrmFmt);
}
@@ -2969,18 +2951,15 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
long nStartCp;
long nEndCp;
- // Pruefen, ob in dieser Textbox-Kette denn Text enthalten ist. (
- // Umwandeln einer leeren Kette in Rahmen waere Unsinn. )
+ // Check if this textbox chain contains text as conversion of an empty
+ // chain would not make sense.
if ( TxbxChainContainsRealText(pRecord->aTextId.nTxBxS,nStartCp,nEndCp) )
{
- // Der Text wird nicht in das SdrTextObj eingelesen! Stattdessen wird
- // ein Rahmen eingefuegt und der Text von nStartCp bis nEndCp dort
- // hinein gelesen.
+ // The Text is not read into SdrTextObj! Rather insert a frame and
+ // insert the text from nStartCp to nEndCp.
//
- // Vorteil: im Rahmen sind viel mehr Attribute moeglich als in der
- // Edit-Enging, und es koennen auch Felder, OLEs oder Grafiken darin
- // sein...
-
+ // More attributes can be used in a frame compared to the
+ // Edit-Enging, and it can contain field, OLEs or graphics...
Rectangle aInnerDist(pRecord->nDxTextLeft, pRecord->nDyTextTop,
pRecord->nDxTextRight, pRecord->nDyTextBottom);
@@ -2989,7 +2968,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
rFlySet.Put(aFrmSize);
MatchSdrItemsIntoFlySet( rpObject, rFlySet, pRecord->eLineStyle,
- pRecord->eShapeType, aInnerDist );
+ pRecord->eLineDashing, pRecord->eShapeType, aInnerDist );
SdrTextObj *pSdrTextObj = PTR_CAST(SdrTextObj, rpObject);
@@ -2997,27 +2976,25 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
rFlySet.Put(SvxFrameDirectionItem(FRMDIR_VERT_TOP_RIGHT, RES_FRAMEDIR));
pRetFrmFmt = rDoc.MakeFlySection(eAnchor, pPaM->GetPoint(), &rFlySet);
- ASSERT(pRetFrmFmt->GetAnchor().GetAnchorId() == eAnchor,
+ OSL_ENSURE(pRetFrmFmt->GetAnchor().GetAnchorId() == eAnchor,
"Not the anchor type requested!");
- // falls alles Ok, Zeiger auf neues Objekt ermitteln und Z-Order-Liste
- // entsprechend korrigieren (oder Eintrag loeschen)
+ // if everything is OK, find pointer on new object and correct
+ // Z-order list (oder delete entry)
rpOurNewObject = CreateContactObject(pRetFrmFmt);
- // altes Objekt aus der Z-Order-Liste entfernen
+ // remove old object from the Z-Order list
pMSDffManager->RemoveFromShapeOrder( rpObject );
- // und das Objekt loeschen
+ // and delete the object
SdrObject::Free( rpObject );
/*
- Achtung: ab jetzt nur noch pOrgShapeObject
- abfragen!
+ NB: only query pOrgShapeObject starting here!
*/
if (rpOurNewObject)
{
/*
- #96375#
We do not store our rpOutNewObject in the ShapeOrder because we
have a FrmFmt from which we can regenerate the contact object when
we need it. Because, we can have frames anchored to paragraphs in
@@ -3032,23 +3009,20 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
(((sal_uLong)pRecord->aTextId.nTxBxS) << 16) +
pRecord->aTextId.nSequence, 0, pRetFrmFmt);
- // Das Kontakt-Objekt MUSS in die Draw-Page gesetzt werden, damit
- // in SwWW8ImplReader::LoadDoc1() die Z-Order festgelegt werden
- // kann !!!
+ // The Kontakt object has to be inserted into the draw page, so
+ // SwWW8ImplReader::LoadDoc1() can determine the z-order.
if (!rpOurNewObject->IsInserted())
{
- // --> OD 2004-12-13 #117915# - pass information, if object
- // is in page header|footer to method.
+ // pass information, if object is in page header|footer to method.
pWWZOrder->InsertEscherObject( rpOurNewObject, pF->nSpId,
bIsHeader || bIsFooter );
- // <--
}
}
- // Box-0 erhaelt den Text fuer die ganze Kette!
+ // Box-0 receives the text for the whole chain!
if( !pRecord->aTextId.nSequence )
{
- // rette Flags u.ae. und setze sie zurueck
+ // save flags etc and reset them
WW8ReaderSave aSave( this );
MoveInsideFly(pRetFrmFmt);
@@ -3057,7 +3031,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
pWWZOrder->InsideEscher(pF->nSpId);
- // lies den Text ein
+ // read in the text
bTxbxFlySection = true;
bool bJoined = ReadText(nStartCp, (nEndCp-nStartCp),
MAN_MAINTEXT == pPlcxMan->GetManType() ?
@@ -3114,7 +3088,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObject,
Rectangle aInnerDist(0, 0, 0, 0);
MatchSdrItemsIntoFlySet(rpObject, rFlySet, pRecord->eLineStyle,
- pRecord->eShapeType, aInnerDist);
+ pRecord->eLineDashing, pRecord->eShapeType, aInnerDist);
MatchEscherMirrorIntoFlySet(*pRecord, aGrSet);
}
@@ -3133,7 +3107,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObject,
URIHelper::SmartRel2Abs(
INetURLObject(sBaseURL), pGrf->GetFileName(),
URIHelper::GetMaybeFileHdl()));
- // --> OD 2005-07-04 #124117# - correction of fix for issue #i10939#:
+ // correction of fix for issue #i10939#:
// One of the two conditions have to be true to insert the graphic
// as a linked graphic -
if (GRAPHIC_NONE == eType || CanUseRemoteLink(aGrfName))
@@ -3188,8 +3162,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObject,
// SwWW8ImplReader::LoadDoc1() die Z-Order festgelegt werden kann !!!
if (!rpOurNewObject->IsInserted())
{
- // --> OD 2004-12-13 #117915# - pass information, if object
- // is in page header|footer to method.
+ // pass information, if object is in page header|footer to method.
pWWZOrder->InsertEscherObject( rpOurNewObject, pF->nSpId,
bIsHeader || bIsFooter );
// <--
@@ -3202,17 +3175,14 @@ void SwWW8ImplReader::GrafikCtor() // Fuer SVDraw und VCControls und Escher
{
if (!pDrawModel)
{
- // --> OD 2005-08-08 #i52858# - method name changed
- rDoc.GetOrCreateDrawModel();
- // <--
+ rDoc.GetOrCreateDrawModel(); // #i52858# - method name changed
pDrawModel = rDoc.GetDrawModel();
- ASSERT(pDrawModel, "Kann DrawModel nicht anlegen");
+ OSL_ENSURE(pDrawModel, "Kann DrawModel nicht anlegen");
pDrawPg = pDrawModel->GetPage(0);
pMSDffManager = new SwMSDffManager(*this);
pMSDffManager->SetModel(pDrawModel, 1440);
/*
- #79055#
Now the dff manager always needs a controls //converter as well, but a
control converter may still exist //without a dffmanager. cmc
*/
@@ -3231,7 +3201,7 @@ void SwWW8ImplReader::GrafikDtor()
void SwWW8FltAnchorStack::AddAnchor(const SwPosition& rPos, SwFrmFmt *pFmt)
{
- ASSERT(pFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR,
+ OSL_ENSURE(pFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR,
"Don't use fltanchors with inline frames, slap!");
NewAttr(rPos, SwFltAnchor(pFmt));
}
@@ -3249,4 +3219,4 @@ void SwWW8FltAnchorStack::Flush()
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8graf.hxx b/sw/source/filter/ww8/ww8graf.hxx
index 26a863533775..516660a5defa 100644
--- a/sw/source/filter/ww8/ww8graf.hxx
+++ b/sw/source/filter/ww8/ww8graf.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,8 +26,6 @@
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
#ifndef _WW8GRAF_HXX
#define _WW8GRAF_HXX
@@ -38,7 +37,7 @@ struct EscherShape
{
sal_uLong mnEscherShapeOrder;
sal_uLong mnNoInlines;
- // --> OD 2004-12-13 #117915# - new member <mbInHeaderFooter>
+ // new member <mbInHeaderFooter>
bool mbInHeaderFooter;
EscherShape( sal_uLong nEscherShapeOrder,
bool _bInHeaderFooter )
@@ -52,7 +51,7 @@ struct EscherShape
class wwZOrderer
{
private:
- // --> OD 2004-12-13 #117915# - consider that objects in page header/footer
+ // consider that objects in page header/footer
// are always behind objects in page body. Thus, assure, that in vector
// <maEscherLayer> objects in page header|footer are inserted before
// objects in page body - see method <GetEscherObjectPos(..)>.
@@ -76,7 +75,7 @@ private:
sal_uInt16 GetEscherObjectIdx(sal_uLong nSpId);
myeiter MapEscherIdxToIter(sal_uLong nIdx);
- // --> OD 2004-12-13 #117915# - new parameter <_bInHeaderFooter>, indicating
+ // new parameter <_bInHeaderFooter>, indicating
// that object is in header or footer
sal_uLong GetEscherObjectPos( sal_uLong nSpId,
const bool _bInHeaderFooter );
@@ -92,8 +91,7 @@ public:
instantiate the appropiate one at run time.
*/
void InsertDrawingObject(SdrObject* pObj, short nWwHeight);
- // --> OD 2004-12-13 #117915# - new parameter <_bInHeaderFooter>, indicating
- // that object is in header or footer
+ // new parameter <_bInHeaderFooter>, indicating that object is in header or footer
void InsertEscherObject( SdrObject* pObject,
sal_uLong nSpId,
const bool _bInHeaderFooter );
@@ -105,4 +103,4 @@ public:
void WW8FSPAShadowToReal( WW8_FSPA_SHADOW* pFSPAS, WW8_FSPA* pPic );
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 6303e9b8c6e6..2bd9ab8b5681 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,8 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
#include <iterator>
#include <hintids.hxx>
@@ -69,7 +68,7 @@ wwZOrderer::wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg,
mpShapeOrders(pShapeOrders)
{
mnNoInitialObjects = mpDrawPg->GetObjCount();
- ASSERT(mpDrawPg,"Missing draw page impossible!");
+ OSL_ENSURE(mpDrawPg,"Missing draw page impossible!");
}
void wwZOrderer::InsideEscher(sal_uLong nSpId)
@@ -82,7 +81,7 @@ void wwZOrderer::OutsideEscher()
maIndexes.pop();
}
-// --> OD 2004-12-13 #117915# - consider new parameter <_bInHeaderFooter>
+// consider new parameter <_bInHeaderFooter>
void wwZOrderer::InsertEscherObject( SdrObject* pObject,
sal_uLong nSpId,
const bool _bInHeaderFooter )
@@ -122,12 +121,12 @@ sal_uInt16 wwZOrderer::GetEscherObjectIdx(sal_uLong nSpId)
return nFound;
}
-// --> OD 2004-12-13 #117915# - consider new parameter <_bInHeaderFooter>
+// consider new parameter <_bInHeaderFooter>
sal_uLong wwZOrderer::GetEscherObjectPos( sal_uLong nSpId,
const bool _bInHeaderFooter )
{
/*
- #97824# EscherObjects have their own ordering which needs to be matched to
+ EscherObjects have their own ordering which needs to be matched to
the actual ordering that should be used when inserting them into the
document.
*/
@@ -139,8 +138,8 @@ sal_uLong wwZOrderer::GetEscherObjectPos( sal_uLong nSpId,
sal_uLong nRet=0;
myeiter aIter = maEscherLayer.begin();
myeiter aEnd = maEscherLayer.end();
- // --> OD 2004-12-13 #117915# - skip objects in page header|footer, if
- // current object isn't in page header|footer
+ // skip objects in page header|footer,
+ // if current object isn't in page header|footer
if ( !_bInHeaderFooter )
{
while ( aIter != aEnd )
@@ -156,7 +155,7 @@ sal_uLong wwZOrderer::GetEscherObjectPos( sal_uLong nSpId,
// <--
while (aIter != aEnd)
{
- // --> OD 2004-12-13 #117915# - insert object in page header|footer
+ // insert object in page header|footer
// before objects in page body
if ( _bInHeaderFooter && !aIter->mbInHeaderFooter )
{
@@ -209,7 +208,7 @@ void wwZOrderer::InsertTextLayerObject(SdrObject* pObject)
++aIter;
}
- ASSERT(aEnd != maEscherLayer.end(), "Something very wrong here");
+ OSL_ENSURE(aEnd != maEscherLayer.end(), "Something very wrong here");
if (aEnd != maEscherLayer.end())
{
aEnd->mnNoInlines++;
@@ -293,26 +292,6 @@ bool SwWW8ImplReader::ReadGrafFile(String& rFileName, Graphic*& rpGraphic,
if (pWwFib->envr != 1) // !MAC als Creator
{
-
-/* SJ: #i40742#, we will use the prefsize from the mtf directly.
-The scaling has been done in former days, because the wmf filter was sometimes not
-able to calculate the proper prefsize (especially if the wmf fileheader was missing)
-
-
- aWMF.SetPrefMapMode( MapMode( MAP_100TH_MM ) );
- // MetaFile auf neue Groesse skalieren und
- // neue Groesse am MetaFile setzen
- if (rPic.MFP.xExt && rPic.MFP.yExt)
- {
- Size aOldSiz(aWMF.GetPrefSize());
- Size aNewSiz(rPic.MFP.xExt, rPic.MFP.yExt );
- Fraction aFracX(aNewSiz.Width(), aOldSiz.Width());
- Fraction aFracY(aNewSiz.Height(), aOldSiz.Height());
-
- aWMF.Scale(aFracX, aFracY);
- aWMF.SetPrefSize(aNewSiz);
- }
-*/
rpGraphic = new Graphic( aWMF );
return true;
}
@@ -378,7 +357,7 @@ void SwWW8ImplReader::ReplaceObj(const SdrObject &rReplaceObj,
}
else
{
- ASSERT( !this, "Impossible!");
+ OSL_ENSURE( !this, "Impossible!");
}
}
@@ -538,11 +517,9 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
WW8FlySet aFlySet( *this, pPaM, aPic, aPD.nWidth, aPD.nHeight );
- //JP 17.1.2002: the correct anchor is set in Read_F_IncludePicture
- // and the current PaM point's behind the position if
- // it is anchored in content; because this anchor add
- // a character into the textnode.
- // IussueZilla task 2806
+ // the correct anchor is set in Read_F_IncludePicture and the current PaM point's
+ // behind the position if it is anchored in content; because this anchor add
+ // a character into the textnode. IussueZilla task 2806
if (FLY_AS_CHAR ==
pFlyFmtOfJustInsertedGraphic->GetAnchor().GetAnchorId() )
{
@@ -633,8 +610,8 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
pRecord->nDyTextBottom );
MatchSdrItemsIntoFlySet( pObject, aAttrSet,
- pRecord->eLineStyle, pRecord->eShapeType,
- aInnerDist );
+ pRecord->eLineStyle, pRecord->eLineDashing,
+ pRecord->eShapeType, aInnerDist );
//Groesse aus der WinWord PIC-Struktur als
//Grafik-Groesse nehmen
@@ -786,21 +763,6 @@ void WW8PicShadowToReal( WW8_PIC_SHADOW * pPicS, WW8_PIC * pPic )
void WW8FSPAShadowToReal( WW8_FSPA_SHADOW * pFSPAS, WW8_FSPA * pFSPA )
{
- //long nSpId; //Shape Identifier. Used in conjunction with the office art data (found via fcDggInfo in the FIB) to find the actual data for this shape.
- //long nXaLeft; //left of rectangle enclosing shape relative to the origin of the shape
- //long nYaTop; //top of rectangle enclosing shape relative to the origin of the shape
- //long nXaRight; //right of rectangle enclosing shape relative to the origin of the shape
- //long nYaBottom;//bottom of the rectangle enclosing shape relative to the origin of the shape
- //sal_uInt16 bHdr:1;
- //sal_uInt16 nbx:2;
- //sal_uInt16 nby:2;
- //sal_uInt16 nwr:4;
- //sal_uInt16 nwrk:4;
- //sal_uInt16 bRcaSimple:1;
- //sal_uInt16 bAnchorLock:1;
- //long nTxbx; //count of textboxes in shape (undo doc only)
-
-
pFSPA->nSpId = SVBT32ToUInt32( pFSPAS->nSpId );
pFSPA->nXaLeft = SVBT32ToUInt32( pFSPAS->nXaLeft );
pFSPA->nYaTop = SVBT32ToUInt32( pFSPAS->nYaTop );
@@ -821,4 +783,4 @@ void WW8FSPAShadowToReal( WW8_FSPA_SHADOW * pFSPAS, WW8_FSPA * pFSPA )
}
#endif // defined __WW8_NEEDS_COPY
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 3173dcfe476a..7bccdd6b027b 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
+#include <boost/unordered_set.hpp>
#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>
@@ -60,6 +60,7 @@
#include <editeng/langitem.hxx>
#include <editeng/opaqitem.hxx>
#include <editeng/charhiddenitem.hxx>
+#include <editeng/fontitem.hxx>
#include <filter/msfilter/svxmsbas.hxx>
#include <svx/unoapi.hxx>
#include <svx/svdoole2.hxx>
@@ -133,11 +134,21 @@
#include <svl/itemiter.hxx> //SfxItemIter
#include <stdio.h>
+#include <comphelper/processfactory.hxx>
+#include <basic/basmgr.hxx>
+
+#include "ww8toolbar.hxx"
+#include <osl/file.hxx>
+#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+
+#include <breakit.hxx>
#ifdef DEBUG
#include <iostream>
#include <dbgoutsw.hxx>
#endif
+#include <unotools/localfilehelper.hxx>
+#include <comphelper/configurationhelper.hxx>
#include "WW8Sttbf.hxx"
#include "WW8FibData.hxx"
@@ -149,6 +160,89 @@ using namespace sw::util;
using namespace sw::types;
using namespace nsHdFtFlags;
+#include <com/sun/star/document/XEventsSupplier.hpp>
+#include <com/sun/star/container/XNameReplace.hpp>
+#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <com/sun/star/i18n/ScriptType.hdl>
+#include <com/sun/star/frame/XModel.hpp>
+#include <filter/msfilter/msvbahelper.hxx>
+#include <unotools/pathoptions.hxx>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+
+class Sttb : TBBase
+{
+struct SBBItem
+{
+ sal_uInt16 cchData;
+ rtl::OUString data;
+ SBBItem() : cchData(0){}
+};
+ sal_uInt16 fExtend;
+ sal_uInt16 cData;
+ sal_uInt16 cbExtra;
+
+ std::vector< SBBItem > dataItems;
+
+ Sttb(const Sttb&);
+ Sttb& operator = ( const Sttb&);
+public:
+ Sttb();
+ ~Sttb();
+ bool Read(SvStream *pS);
+ void Print( FILE* fp );
+ rtl::OUString getStringAtIndex( sal_uInt32 );
+};
+
+Sttb::Sttb() : fExtend( 0 )
+,cData( 0 )
+,cbExtra( 0 )
+{
+}
+
+Sttb::~Sttb()
+{
+}
+
+bool Sttb::Read( SvStream* pS )
+{
+ OSL_TRACE("Sttb::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ *pS >> fExtend >> cData >> cbExtra;
+ if ( cData )
+ {
+ for ( sal_Int32 index = 0; index < cData; ++index )
+ {
+ SBBItem aItem;
+ *pS >> aItem.cchData;
+ aItem.data = readUnicodeString( pS, aItem.cchData );
+ dataItems.push_back( aItem );
+ }
+ }
+ return true;
+}
+
+void Sttb::Print( FILE* fp )
+{
+ fprintf( fp, "[ 0x%" SAL_PRIxUINT32 " ] Sttb - dump\n", nOffSet);
+ fprintf( fp, " fExtend 0x%x [expected 0xFFFF ]\n", fExtend );
+ fprintf( fp, " cData no. or string data items %d (0x%x)\n", cData, cData );
+
+ if ( cData )
+ {
+ for ( sal_Int32 index = 0; index < cData; ++index )
+ fprintf(fp," string dataItem[ %d(0x%x) ] has name %s\n", static_cast< int >( index ), static_cast< unsigned int >( index ), rtl::OUStringToOString( dataItems[ index ].data, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+
+}
+
+rtl::OUString
+Sttb::getStringAtIndex( sal_uInt32 index )
+{
+ rtl::OUString aRet;
+ if ( index < dataItems.size() )
+ aRet = dataItems[ index ].data;
+ return aRet;
+}
SwMSDffManager::SwMSDffManager( SwWW8ImplReader& rRdr )
: SvxMSDffManager(*rRdr.pTableStream, rRdr.GetBaseURL(), rRdr.pWwFib->fcDggInfo,
@@ -184,7 +278,7 @@ sal_uInt32 SwMSDffManager::GetFilterFlags()
*
* cmc
*/
-// --> OD 2004-12-14 #i32596# - consider new parameter <_nCalledByGroup>
+// #i32596# - consider new parameter <_nCalledByGroup>
SdrObject* SwMSDffManager::ImportOLE( long nOLEId,
const Graphic& rGrf,
const Rectangle& rBoundRect,
@@ -192,7 +286,7 @@ SdrObject* SwMSDffManager::ImportOLE( long nOLEId,
const int _nCalledByGroup,
sal_Int64 nAspect ) const
{
- // --> OD 2004-12-14 #i32596# - no import of OLE object, if it's inside a group.
+ // #i32596# - no import of OLE object, if it's inside a group.
// NOTE: This can be undone, if grouping of Writer fly frames is possible or
// if drawing OLE objects are allowed in Writer.
if ( _nCalledByGroup > 0 )
@@ -209,7 +303,7 @@ SdrObject* SwMSDffManager::ImportOLE( long nOLEId,
{
SvStorageRef xSrc = xSrcStg->OpenSotStorage( sStorageName,
STREAM_READWRITE| STREAM_SHARE_DENYALL );
- ASSERT(rReader.pFormImpl, "No Form Implementation!");
+ OSL_ENSURE(rReader.pFormImpl, "No Form Implementation!");
STAR_REFERENCE( drawing::XShape ) xShape;
if ( (!(rReader.bIsHeader || rReader.bIsFooter)) &&
rReader.pFormImpl->ReadOCXStream(xSrc,&xShape,true))
@@ -228,7 +322,7 @@ SdrObject* SwMSDffManager::ImportOLE( long nOLEId,
void SwMSDffManager::DisableFallbackStream()
{
- ASSERT(!pFallbackStream || !pOldEscherBlipCache,
+ OSL_ENSURE(!pFallbackStream || !pOldEscherBlipCache,
"if you're recursive, you're broken");
pFallbackStream = pStData2;
pOldEscherBlipCache = pEscherBlipCache;
@@ -301,10 +395,9 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
// process user (== Winword) defined parameters in 0xF122 record
- // --> OD 2008-04-10 #i84783#
- // set special value to determine, if property is provided or not.
+ // #i84783# - set special value to determine, if property is provided or not.
pImpRec->nLayoutInTableCell = 0xFFFFFFFF;
- // <--
+
if( maShapeRecords.SeekToContent( rSt,
DFF_msofbtUDefProp,
SEEK_FROM_CURRENT_AND_RESTART )
@@ -322,9 +415,19 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
switch( nPID )
{
case 0x038F: pImpRec->nXAlign = nUDData; break;
- case 0x0390: pImpRec->nXRelTo = nUDData; break;
+ case 0x0390:
+ if (pImpRec->pXRelTo)
+ delete pImpRec->pXRelTo;
+ pImpRec->pXRelTo = new sal_uInt32;
+ *(pImpRec->pXRelTo) = nUDData;
+ break;
case 0x0391: pImpRec->nYAlign = nUDData; break;
- case 0x0392: pImpRec->nYRelTo = nUDData; break;
+ case 0x0392:
+ if (pImpRec->pYRelTo)
+ delete pImpRec->pYRelTo;
+ pImpRec->pYRelTo = new sal_uInt32;
+ *(pImpRec->pYRelTo) = nUDData;
+ break;
case 0x03BF: pImpRec->nLayoutInTableCell = nUDData; break;
}
if ( rSt.GetError() != 0 )
@@ -355,7 +458,6 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
(pImpRec->eShapeType == mso_sptTextSimple) ||
(
(pImpRec->eShapeType == mso_sptRectangle)
- // && (eWrapMode == mso_wrapSquare)
&& ShapeHasText(pImpRec->nShapeId, rObjData.rSpHd.GetRecBegFilePos() )
)
);
@@ -475,7 +577,6 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
if( bIsSimpleDrawingTextBox )
ApplyAttributes( rSt, aSet, rObjData );
- bool bFitText = false;
if (GetPropertyValue(DFF_Prop_FitTextToShape) & 2)
{
aSet.Put( SdrTextAutoGrowHeightItem( sal_True ) );
@@ -483,7 +584,6 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
aNewRect.Bottom() - aNewRect.Top() ) );
aSet.Put( SdrTextMinFrameWidthItem(
aNewRect.Right() - aNewRect.Left() ) );
- bFitText = true;
}
else
{
@@ -515,7 +615,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
pImpRec->nDxTextRight = nTextRight;
pImpRec->nDyTextBottom = nTextBottom;
- // --> SJ 2009-03-06 : taking the correct default (which is mso_anchorTop)
+ // taking the correct default (which is mso_anchorTop)
MSO_Anchor eTextAnchor =
(MSO_Anchor)GetPropertyValue( DFF_Prop_anchorText, mso_anchorTop );
@@ -564,13 +664,6 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
eTVA = SDRTEXTVERTADJUST_BOTTOM;
}
break;
-/*
- case mso_anchorTopBaseline:
- case mso_anchorBottomBaseline:
- case mso_anchorTopCenteredBaseline:
- case mso_anchorBottomCenteredBaseline:
- break;
-*/
default:
;
}
@@ -716,18 +809,20 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
DFF_Prop_cropFromRight, 0 );
sal_uInt32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
- // --> OD 2008-06-16 #156765#
+
if ( !IsHardAttribute( DFF_Prop_fLine ) &&
pImpRec->eShapeType == mso_sptPictureFrame )
{
nLineFlags &= ~0x08;
}
- // <--
+
pImpRec->eLineStyle = (nLineFlags & 8)
? (MSO_LineStyle)GetPropertyValue(
DFF_Prop_lineStyle,
mso_lineSimple )
: (MSO_LineStyle)USHRT_MAX;
+ pImpRec->eLineDashing = (MSO_LineDashing)GetPropertyValue(
+ DFF_Prop_lineDashing, mso_lineSolid );
pImpRec->nFlags = rObjData.nSpFlags;
@@ -789,9 +884,9 @@ void SwWW8ImplReader::Read_Majority( sal_uInt16, const sal_uInt8* , short )
void SwWW8FltControlStack::NewAttr(const SwPosition& rPos,
const SfxPoolItem& rAttr)
{
- ASSERT(RES_TXTATR_FIELD != rAttr.Which(), "probably don't want to put"
+ OSL_ENSURE(RES_TXTATR_FIELD != rAttr.Which(), "probably don't want to put"
"fields into the control stack");
- ASSERT(RES_FLTR_REDLINE != rAttr.Which(), "probably don't want to put"
+ OSL_ENSURE(RES_FLTR_REDLINE != rAttr.Which(), "probably don't want to put"
"redlines into the control stack");
SwFltControlStack::NewAttr(rPos, rAttr);
}
@@ -821,7 +916,7 @@ void SwWW8FltControlStack::SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId,
long GetListFirstLineIndent(const SwNumFmt &rFmt)
{
- ASSERT( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION,
+ OSL_ENSURE( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION,
"<GetListFirstLineIndent> - misusage: position-and-space-mode does not equal LABEL_WIDTH_AND_POSITION" );
SvxAdjust eAdj = rFmt.GetNumAdjust();
@@ -838,7 +933,7 @@ long GetListFirstLineIndent(const SwNumFmt &rFmt)
long lcl_GetTrueMargin(const SvxLRSpaceItem &rLR, const SwNumFmt &rFmt,
long &rFirstLinePos)
{
- ASSERT( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION,
+ OSL_ENSURE( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION,
"<lcl_GetTrueMargin> - misusage: position-and-space-mode does not equal LABEL_WIDTH_AND_POSITION" );
const long nBodyIndent = rLR.GetTxtLeft();
@@ -852,8 +947,8 @@ long lcl_GetTrueMargin(const SvxLRSpaceItem &rLR, const SwNumFmt &rFmt,
return nExtraListIndent > 0 ? nExtraListIndent : 0;
}
-// --> OD 2010-05-06 #i103711#
-// --> OD 2010-05-11 #i105414#
+// #i103711#
+// #i105414#
void SyncIndentWithList( SvxLRSpaceItem &rLR,
const SwNumFmt &rFmt,
const bool bFirstLineOfstSet,
@@ -943,11 +1038,11 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
if ( pNum )
{
- // --> OD 2010-05-06 #i103711#
+ // #i103711#
const bool bFirstLineIndentSet =
( rReader.maTxtNodesHavingFirstLineOfstSet.end() !=
rReader.maTxtNodesHavingFirstLineOfstSet.find( pNode ) );
- // --> OD 2010-05-11 #i105414#
+ // #i105414#
const bool bLeftIndentSet =
( rReader.maTxtNodesHavingLeftIndentSet.end() !=
rReader.maTxtNodesHavingLeftIndentSet.find( pNode ) );
@@ -967,7 +1062,7 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
}
break;
case RES_TXTATR_FIELD:
- ASSERT(!this, "What is a field doing in the control stack,"
+ OSL_ENSURE(!this, "What is a field doing in the control stack,"
"probably should have been in the endstack");
break;
case RES_TXTATR_INETFMT:
@@ -1027,6 +1122,18 @@ const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos,
pItem = &(rReader.pCollA[rReader.nAktColl].maWordLR);
}
+ /*
+ If we're hunting for a character property, try and exact position
+ within the text node for lookup
+ */
+ if (pNd->IsTxtNode())
+ {
+ xub_StrLen nPos = rPos.nContent.GetIndex();
+ SfxItemSet aSet(pDoc->GetAttrPool(), nWhich, nWhich);
+ if (static_cast<const SwTxtNode*>(pNd)->GetAttr(aSet, nPos, nPos))
+ pItem = aSet.GetItem(nWhich);
+ }
+
if (!pItem)
pItem = &pNd->GetAttr(nWhich);
}
@@ -1048,7 +1155,11 @@ const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos,
{
if ( (pEntry->bLocked) || (
(pEntry->nMkNode <= aNode) && (pEntry->nPtNode >= aNode) &&
- (pEntry->nMkCntnt <= nIdx) && (pEntry->nPtCntnt >= nIdx) ) )
+ (pEntry->nMkCntnt <= nIdx) && (pEntry->nPtCntnt > nIdx) ) )
+ /*
+ * e.g. half-open range [0-3) so asking for properties at 3
+ * means props that end at 3 are not included
+ */
{
return (const SfxPoolItem*)pEntry->pAttr;
}
@@ -1096,7 +1207,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
SwFmtFld& rFmtFld = *(SwFmtFld*)pEntry->pAttr;
SwField* pFld = rFmtFld.GetFld();
- // OD 2004-03-19 - <NOT> got lost from revision 1.128 to 1.129
+ // <NOT> got lost from revision 1.128 to 1.129
if (!RefToVar(pFld,pEntry))
{
sal_uInt16 nBkmNo;
@@ -1133,7 +1244,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
break;
default:
case RES_FLTR_BOOKMARK:
- ASSERT(!this, "EndStck used with non field, not what we want");
+ OSL_ENSURE(!this, "EndStck used with non field, not what we want");
SwFltEndStack::SetAttrInDoc(rTmpPos, pEntry);
break;
}
@@ -1181,7 +1292,7 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
}
bool bFound = false;
- ::std::hash_set<size_t> aLoopWatch;
+ ::boost::unordered_set<size_t> aLoopWatch;
while (pSty && !bFound)
{
const SfxPoolItem* pTabs;
@@ -1335,7 +1446,7 @@ void SwWW8ImplReader::ImportDop()
// #i24363# tab stops relative to indent
rDoc.set(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT, false);
maTracer.Log(sw::log::eTabStopDistance);
- // OD 14.10.2003 #i18732# - adjust default of option 'FollowTextFlow'
+ // #i18732# - adjust default of option 'FollowTextFlow'
rDoc.SetDefault( SwFmtFollowTextFlow( sal_False ) );
// Import Default-Tabs
@@ -1359,45 +1470,32 @@ void SwWW8ImplReader::ImportDop()
rDoc.set(IDocumentSettingAccess::USE_HIRES_VIRTUAL_DEVICE, true);
rDoc.set(IDocumentSettingAccess::ADD_FLY_OFFSETS, true );
rDoc.set(IDocumentSettingAccess::ADD_EXT_LEADING, !pWDop->fNoLeading);
-
- // -> #111955#
rDoc.set(IDocumentSettingAccess::OLD_NUMBERING, false);
- // <- #111955#
-
- // --> FME 2005-05-27 #i47448#
- rDoc.set(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING, false);
- // <--
-
- // --> FME 2005-06-08 #i49277#
- rDoc.set(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, !pWDop->fExpShRtn); // #i56856#
- // --> FME 2005-08-11 #i53199#
- rDoc.set(IDocumentSettingAccess::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT, false);
-
+ rDoc.set(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING, false); // #i47448#
+ rDoc.set(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, !pWDop->fExpShRtn); // #i49277#, #i56856#
+ rDoc.set(IDocumentSettingAccess::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT, false); // #i53199#
rDoc.set(IDocumentSettingAccess::OLD_LINE_SPACING, false);
- // OD, MMAHER 2004-03-01 #i25901#- set new compatibility option
+ // #i25901# - set new compatibility option
// 'Add paragraph and table spacing at bottom of table cells'
rDoc.set(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS, true);
- // OD 2004-03-17 #i11860# - set new compatibility option
+ // #i11860# - set new compatibility option
// 'Use former object positioning' to <sal_False>
rDoc.set(IDocumentSettingAccess::USE_FORMER_OBJECT_POS, false);
- // OD 2004-05-10 #i27767# - set new compatibility option
+ // #i27767# - set new compatibility option
// 'Conder Wrapping mode when positioning object' to <sal_True>
rDoc.set(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION, true);
- // --> FME 2004-04-22 # #108724#, #i13832#, #i24135#
- rDoc.set(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING, false);
- // <--
+ rDoc.set(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING, false); // #i13832#, #i24135#
- // --> FME 2006-02-10 #131283#
rDoc.set(IDocumentSettingAccess::TABLE_ROW_KEEP, true); //SetTableRowKeep( true );
- // <--
- // --> FME 2006-03-01 #i3952#
- rDoc.set(IDocumentSettingAccess::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION, true);
- // <--
+ rDoc.set(IDocumentSettingAccess::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION, true); // #i3952#
+
+ rDoc.set(IDocumentSettingAccess::INVERT_BORDER_SPACING, true);
+ rDoc.set(IDocumentSettingAccess::COLLAPSE_EMPTY_CELL_PARA, true);
//
// COMPATIBILITY FLAGS END
@@ -1410,9 +1508,8 @@ void SwWW8ImplReader::ImportDop()
if (pWwFib->nFib > 105)
ImportDopTypography(pWDop->doptypography);
- // #110055# disable form design mode to be able to use imported controls directly
+ // disable form design mode to be able to use imported controls directly
// #i31239# always disable form design mode, not only in protected docs
-// if (pWDop->fProtEnabled)
{
using namespace com::sun::star;
@@ -1427,9 +1524,9 @@ void SwWW8ImplReader::ImportDop()
sal_Bool bValue = false;
if (xInfo.is())
{
- if (xInfo->hasPropertyByName(C2U("ApplyFormDesignMode")))
+ if (xInfo->hasPropertyByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ApplyFormDesignMode"))))
{
- xDocProps->setPropertyValue(C2U("ApplyFormDesignMode"),
+ xDocProps->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ApplyFormDesignMode")),
cppu::bool2any(bValue));
}
}
@@ -1678,7 +1775,7 @@ void SwWW8ImplReader::Read_HdFtTextAsHackedFrame(long nStart, long nLen,
SwFrmFmt &rHdFtFmt, sal_uInt16 nPageWidth)
{
const SwNodeIndex* pSttIdx = rHdFtFmt.GetCntnt().GetCntntIdx();
- ASSERT(pSttIdx, "impossible");
+ OSL_ENSURE(pSttIdx, "impossible");
if (!pSttIdx)
return;
@@ -1692,10 +1789,10 @@ void SwWW8ImplReader::Read_HdFtTextAsHackedFrame(long nStart, long nLen,
pFrame->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, nPageWidth, MINLAY));
pFrame->SetFmtAttr(SwFmtSurround(SURROUND_THROUGHT));
pFrame->SetFmtAttr(SwFmtHoriOrient(0, text::HoriOrientation::RIGHT)); //iFOO
- // --> OD 2005-02-28 #i43427# - send frame for header/footer into background.
+ // #i43427# - send frame for header/footer into background.
pFrame->SetFmtAttr( SvxOpaqueItem( RES_OPAQUE, false ) );
SdrObject* pFrmObj = CreateContactObject( pFrame );
- ASSERT( pFrmObj,
+ OSL_ENSURE( pFrmObj,
"<SwWW8ImplReader::Read_HdFtTextAsHackedFrame(..)> - missing SdrObject instance" );
if ( pFrmObj )
{
@@ -1774,12 +1871,9 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
}
else
{
- // --> OD 2008-08-06 #150965#
// Always read title page header/footer data - it could be used by following sections
-// nWhichItems =
-// rSection.maSep.grpfIhdt & (WW8_HEADER_FIRST | WW8_FOOTER_FIRST),
nWhichItems = ( WW8_HEADER_FIRST | WW8_FOOTER_FIRST );
- // <--
+
pPD = rSection.mpTitlePage;
}
@@ -1810,7 +1904,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
bool bFooter
= (nI & ( WW8_FOOTER_EVEN | WW8_FOOTER_ODD | WW8_FOOTER_FIRST )) ? true: false;
- SwFrmFmt* pFmt = bUseLeft ? &pPD->GetLeft() : &pPD->GetMaster();
+ SwFrmFmt& rFmt = bUseLeft ? pPD->GetLeft() : pPD->GetMaster();
SwFrmFmt* pHdFtFmt;
if (bFooter)
@@ -1821,7 +1915,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
pPD->GetMaster().SetFmtAttr(SwFmtFooter(true));
if (bUseLeft)
pPD->GetLeft().SetFmtAttr(SwFmtFooter(true));
- pHdFtFmt = (SwFrmFmt*)pFmt->GetFooter().GetFooterFmt();
+ pHdFtFmt = const_cast<SwFrmFmt*>(rFmt.GetFooter().GetFooterFmt());
}
else
{
@@ -1831,7 +1925,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
pPD->GetMaster().SetFmtAttr(SwFmtHeader(true));
if (bUseLeft)
pPD->GetLeft().SetFmtAttr(SwFmtHeader(true));
- pHdFtFmt = (SwFrmFmt*)pFmt->GetHeader().GetHeaderFmt();
+ pHdFtFmt = const_cast<SwFrmFmt*>(rFmt.GetHeader().GetHeaderFmt());
}
if (bOk)
@@ -1872,7 +1966,7 @@ void wwSectionManager::SetHdFt(wwSection &rSection, int nSect,
if (!rSection.maSep.grpfIhdt)
return;
- ASSERT(rSection.mpPage, "makes no sense to call with a main page");
+ OSL_ENSURE(rSection.mpPage, "makes no sense to call with a main page");
if (rSection.mpPage)
{
mrReader.Read_HdFt(false, nSect, pPrevious ? pPrevious->mpPage : 0,
@@ -2032,7 +2126,7 @@ void SwWW8ImplReader::EndSpecial()
if (maApos[0] == true)
StopApo();
- ASSERT(!nInTable, "unclosed table!");
+ OSL_ENSURE(!nInTable, "unclosed table!");
}
bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
@@ -2043,7 +2137,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
rbReSync = false;
- ASSERT(nInTable >= 0,"nInTable < 0!");
+ OSL_ENSURE(nInTable >= 0,"nInTable < 0!");
// TabRowEnd
bool bTableRowEnd = (pPlcxMan->HasParaSprm(bVer67 ? 25 : 0x2417) != 0 );
@@ -2368,7 +2462,7 @@ sal_Size Custom8BitToUnicode(rtl_TextToUnicodeConverter hConverter,
pOut+nDestChars, nOutLen-nDestChars,
nFlags, &nInfo, &nThisConverted);
- ASSERT(nInfo == 0, "A character conversion failed!");
+ OSL_ENSURE(nInfo == 0, "A character conversion failed!");
nConverted += nThisConverted;
@@ -2445,7 +2539,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
nLen = writer_cast<xub_StrLen>(nEnd - rPos);
else
nLen = STRING_MAXLEN-1;
- ASSERT(nLen, "String is 0");
+ OSL_ENSURE(nLen, "String is 0");
if (!nLen)
return true;
@@ -2515,7 +2609,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
aTest[0] = static_cast< sal_Char >((nUCode & 0xFF00) >> 8);
aTest[1] = static_cast< sal_Char >(nUCode & 0x00FF);
String aTemp(aTest, 2, eSrcCJKCharSet);
- ASSERT(aTemp.Len() == 1, "so much for that theory");
+ OSL_ENSURE(aTemp.Len() == 1, "so much for that theory");
*pWork = aTemp.GetChar(0);
}
else
@@ -2542,7 +2636,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
sPlainCharsBuf.ReleaseBufferAccess( nEndUsed );
- AddTextToParagraph(sPlainCharsBuf);
+ emulateMSWordAddTextToParagraph(sPlainCharsBuf);
rPos += nL2;
if (!maApos.back()) //a para end in apo doesn't count
bWasParaEnd = false; //kein CR
@@ -2554,47 +2648,181 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
return nL2 >= nLen;
}
-bool SwWW8ImplReader::AddTextToParagraph(const String& rAddString)
+#define MSASCII SAL_MAX_INT16
+
+namespace
{
- const SwTxtNode* pNd = pPaM->GetCntntNode()->GetTxtNode();
- if (rAddString.Len())
+ //We want to force weak chars inside 0x0020 to 0x007F to LATIN
+ sal_Int16 lcl_getScriptType(
+ const uno::Reference<i18n::XBreakIterator>& rBI,
+ const rtl::OUString &rString, sal_Int32 nPos)
{
-/*
-#ifdef DEBUG
-//!! does not compile with debug=t -> unresolved external (dbg_out),
-//!! sommeone who knows what he wants to get should fix this
-// ::std::clog << "<addTextToParagraph>" << dbg_out(rAddString)
-// << "</addTextToParagraph>" << ::std::endl;
-#endif
-*/
- if ((pNd->GetTxt().Len() + rAddString.Len()) < STRING_MAXLEN -1)
+ sal_Int16 nScript = rBI->getScriptType(rString, nPos);
+ if (nScript == i18n::ScriptType::WEAK && rString[nPos] >= 0x0020 && rString[nPos] <= 0x007F)
+ nScript = MSASCII;
+ return nScript;
+ }
+
+ //We want to know about WEAK segments, so endOfScript isn't
+ //useful, and see lcl_getScriptType anyway
+ sal_Int32 lcl_endOfScript(
+ const uno::Reference<i18n::XBreakIterator>& rBI,
+ const rtl::OUString &rString, sal_Int32 nPos, sal_Int16 nScript)
+ {
+ while (nPos < rString.getLength())
{
- rDoc.InsertString(*pPaM, rAddString);
+ sal_Int16 nNewScript = lcl_getScriptType(rBI, rString, nPos);
+ if (nScript != nNewScript)
+ break;
+ ++nPos;
}
- else
- {
+ return nPos;
+ }
+}
+
+//In writer we categorize text into CJK, CTL and "Western" for everything else.
+//Microsoft Word basically categorizes text into East Asian, Complex, ASCII,
+//NonEastAsian/HighAnsi, with some shared characters and some properties to to
+//hint as to which way to bias those shared characters.
+//
+//That's four categories, we however have three categories. Given that problem
+//here we would ideally find out "what would word do" to see what font/language
+//word would assign to characters based on the unicode range they fall into and
+//hack the word one onto the range we use. However it's unclear what word's
+//categorization is. So we don't do that here yet.
+//
+//Additional to the categorization, when word encounters weak text for ambigious
+//chars it uses idcthint to indicate which way to bias. We don't have a idcthint
+//feature in writer.
+//
+//So what we currently do here then is to split our text into non-weak/weak
+//sections and uses word's idcthint to determine what font it would use and
+//force that on for the segment. Following what we *do* know about word's
+//categorization, we know that the range 0x0020 and 0x007F is sprmCRgFtc0 in
+//word, something we map to LATIN, so we consider all weaks chars in that range
+//to auto-bias to LATIN.
+//
+//See https://bugs.freedesktop.org/show_bug.cgi?id=34319 for an example
+void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const rtl::OUString& rAddString)
+{
+ if (!rAddString.getLength())
+ return;
+
+ uno::Reference<i18n::XBreakIterator> xBI(pBreakIt->GetBreakIter());
+ if (!xBI.is())
+ {
+ simpleAddTextToParagraph(rAddString);
+ return;
+ }
+
+ sal_Int16 nScript = lcl_getScriptType(xBI, rAddString, 0);
+ sal_Int32 nLen = rAddString.getLength();
- if (pNd->GetTxt().Len()< STRING_MAXLEN -1)
+ sal_Int32 nPos = 0;
+ while (nPos < nLen)
+ {
+ sal_Int32 nEnd = lcl_endOfScript(xBI, rAddString, nPos, nScript);
+ if (nEnd < 0)
+ break;
+
+ rtl::OUString sChunk(rAddString.copy(nPos, nEnd-nPos));
+ const sal_uInt16 aIds[] = {RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT};
+ bool aForced[] = {false, false, false};
+
+ int nLclIdctHint = 0xFF;
+ if (nScript == i18n::ScriptType::WEAK)
+ nLclIdctHint = nIdctHint;
+ else if (nScript == MSASCII) //Force weak chars in ascii range to use LATIN font
+ nLclIdctHint = 0;
+
+ if (nLclIdctHint != 0xFF)
+ {
+ sal_uInt16 nForceFromFontId = 0;
+ switch (nLclIdctHint)
{
- String sTempStr (rAddString,0,
- STRING_MAXLEN - pNd->GetTxt().Len() -1);
- rDoc.InsertString(*pPaM, sTempStr);
- sTempStr = rAddString.Copy(sTempStr.Len(),
- rAddString.Len() - sTempStr.Len());
- AppendTxtNode(*pPaM->GetPoint());
- rDoc.InsertString(*pPaM, sTempStr);
+ case 0:
+ nForceFromFontId = RES_CHRATR_FONT;
+ break;
+ case 1:
+ nForceFromFontId = RES_CHRATR_CJK_FONT;
+ break;
+ case 2:
+ nForceFromFontId = RES_CHRATR_CTL_FONT;
+ break;
+ default:
+ break;
}
- else
+
+ const SvxFontItem *pSourceFont = (const SvxFontItem*)GetFmtAttr(nForceFromFontId);
+
+ for (size_t i = 0; i < SAL_N_ELEMENTS(aIds); ++i)
{
- AppendTxtNode(*pPaM->GetPoint());
- rDoc.InsertString(*pPaM, rAddString);
+ const SvxFontItem *pDestFont = (const SvxFontItem*)GetFmtAttr(aIds[i]);
+ aForced[i] = aIds[i] != nForceFromFontId && *pSourceFont != *pDestFont;
+ if (aForced[i])
+ {
+ SvxFontItem aForceFont(*pSourceFont);
+ aForceFont.SetWhich(aIds[i]);
+ pCtrlStck->NewAttr(*pPaM->GetPoint(), aForceFont);
+ }
}
}
- bReadTable = false;
+ simpleAddTextToParagraph(sChunk);
+
+ for (size_t i = 0; i < SAL_N_ELEMENTS(aIds); ++i)
+ {
+ if (aForced[i])
+ pCtrlStck->SetAttr(*pPaM->GetPoint(), aIds[i]);
+ }
+
+ nPos = nEnd;
+ if (nPos < nLen)
+ nScript = lcl_getScriptType(xBI, rAddString, nPos);
}
- return true;
+}
+
+void SwWW8ImplReader::simpleAddTextToParagraph(const String& rAddString)
+{
+ if (!rAddString.Len())
+ return;
+
+#ifdef DEBUG
+ {
+ rtl::OString sText(rtl::OUStringToOString(rAddString, RTL_TEXTENCODING_UTF8));
+ ::std::clog <<
+ "<addTextToParagraph>" << sText.getStr() << "</addTextToParagraph>"
+ << ::std::endl;
+ }
+#endif
+ const SwTxtNode* pNd = pPaM->GetCntntNode()->GetTxtNode();
+
+ if ((pNd->GetTxt().Len() + rAddString.Len()) < STRING_MAXLEN-1)
+ {
+ rDoc.InsertString(*pPaM, rAddString);
+ }
+ else
+ {
+
+ if (pNd->GetTxt().Len()< STRING_MAXLEN -1)
+ {
+ String sTempStr (rAddString,0,
+ STRING_MAXLEN - pNd->GetTxt().Len() -1);
+ rDoc.InsertString(*pPaM, sTempStr);
+ sTempStr = rAddString.Copy(sTempStr.Len(),
+ rAddString.Len() - sTempStr.Len());
+ AppendTxtNode(*pPaM->GetPoint());
+ rDoc.InsertString(*pPaM, sTempStr);
+ }
+ else
+ {
+ AppendTxtNode(*pPaM->GetPoint());
+ rDoc.InsertString(*pPaM, rAddString);
+ }
+ }
+
+ bReadTable = false;
}
// Returnwert: true for para end
@@ -2652,7 +2880,6 @@ bool SwWW8ImplReader::HandlePageBreakChar()
bPgSecBreak = true;
pCtrlStck->KillUnlockedAttrs(*pPaM->GetPoint());
/*
- #74468#
If its a 0x0c without a paragraph end before it, act like a
paragraph end, but nevertheless, numbering (and perhaps other
similiar constructs) do not exist on the para.
@@ -2711,16 +2938,16 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
}
break;
case 0xe:
- //#108817# if there is only one column word treats a column
- //break like a pagebreak.
+ // if there is only one column word treats a column break like a pagebreak.
if (maSectionManager.CurrentSectionColCount() < 2)
bRet = HandlePageBreakChar();
else if (!nInTable)
{
// Always insert a txtnode for a column break, e.g. ##
- AppendTxtNode(*pPaM->GetPoint());
- rDoc.InsertPoolItem(*pPaM,
- SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK), 0);
+ SwCntntNode *pCntNd=pPaM->GetCntntNode();
+ if (pCntNd!=NULL && pCntNd->Len()>0) // if par is empty not break is needed
+ AppendTxtNode(*pPaM->GetPoint());
+ rDoc.InsertPoolItem(*pPaM, SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK), 0);
}
break;
case 0x7:
@@ -2772,11 +2999,11 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
else if (bSpec)
pResult = ImportGraf();
- //#102160# If we have a bad 0x1 insert a space instead.
+ // If we have a bad 0x1 insert a space instead.
if (!pResult)
{
cInsert = ' ';
- ASSERT(!bObj && !bEmbeddObj && !nObjLocFc,
+ OSL_ENSURE(!bObj && !bEmbeddObj && !nObjLocFc,
"WW8: Please report this document, it may have a "
"missing graphic");
}
@@ -2846,7 +3073,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
{
String sInsert = ByteString::ConvertToUnicode(cInsert,
RTL_TEXTENCODING_MS_1252 );
- AddTextToParagraph(sInsert);
+ emulateMSWordAddTextToParagraph(sInsert);
}
if (!maApos.back()) //a para end in apo doesn't count
bWasParaEnd = bNewParaEnd;
@@ -2896,20 +3123,20 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTxtPos, bool& rbStartLine)
long nSkipChars = 0;
WW8PLCFManResult aRes;
- ASSERT(pPaM->GetNode()->GetTxtNode(), "Missing txtnode");
+ OSL_ENSURE(pPaM->GetNode()->GetTxtNode(), "Missing txtnode");
bool bStartAttr = pPlcxMan->Get(&aRes); // hole Attribut-Pos
aRes.nAktCp = rTxtPos; // Akt. Cp-Pos
bool bNewSection = (aRes.nFlags & MAN_MASK_NEW_SEP) && !bIgnoreText;
if ( bNewSection ) // neue Section
{
- ASSERT(pPaM->GetNode()->GetTxtNode(), "Missing txtnode");
+ OSL_ENSURE(pPaM->GetNode()->GetTxtNode(), "Missing txtnode");
// PageDesc erzeugen und fuellen
maSectionManager.CreateSep(rTxtPos, bPgSecBreak);
// -> 0xc war ein Sectionbreak, aber
// kein Pagebreak;
bPgSecBreak = false; // PageDesc erzeugen und fuellen
- ASSERT(pPaM->GetNode()->GetTxtNode(), "Missing txtnode");
+ OSL_ENSURE(pPaM->GetNode()->GetTxtNode(), "Missing txtnode");
}
// neuer Absatz ueber Plcx.Fkp.papx
@@ -3086,7 +3313,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
while ( l<nStartCp+nTextLen )
{
ReadAttrs( nNext, l, bStartLine );// behandelt auch Section-Breaks
- ASSERT(pPaM->GetNode()->GetTxtNode(), "Missing txtnode");
+ OSL_ENSURE(pPaM->GetNode()->GetTxtNode(), "Missing txtnode");
if (mpPostProcessAttrsInfo != NULL)
PostProcessAttrs();
@@ -3203,9 +3430,8 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
pPlcxMan->GetSepPLCF()->GetSprms(&aTemp);
if ((aTemp.nStartPos != l) && (aTemp.nEndPos != l))
{
- // --> OD 2005-01-07 #i39251# - insert text node for page break,
- // if no one inserted.
- // --> OD 2005-02-28 #i43118# - refine condition: the anchor
+ // #i39251# - insert text node for page break, if no one inserted.
+ // #i43118# - refine condition: the anchor
// control stack has to have entries, otherwise it's not needed
// to insert a text node.
if ( !bStartLine && pAnchorStck->Count() > 0 )
@@ -3253,12 +3479,8 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SvStorage* pStorage,
maGrfNameGenerator(bNewDoc,String('G')),
maParaStyleMapper(rD),
maCharStyleMapper(rD),
- // --> OD 2010-05-06 #i103711#
- maTxtNodesHavingFirstLineOfstSet(),
- // <--
- // --> OD 2010-05-11 #i105414#
- maTxtNodesHavingLeftIndentSet(),
- // <--
+ maTxtNodesHavingFirstLineOfstSet(), // #i103711#
+ maTxtNodesHavingLeftIndentSet(), // #i105414#
pMSDffManager(0),
mpAtnNames(0),
pAuthorInfos(0),
@@ -3349,7 +3571,7 @@ void SwWW8ImplReader::DeleteStk(SwFltControlStack* pStck)
}
else
{
- ASSERT( !this, "WW-Stack bereits geloescht" );
+ OSL_ENSURE( !this, "WW-Stack bereits geloescht" );
}
}
@@ -3376,7 +3598,7 @@ void wwSectionManager::SetSegmentToPageDesc(const wwSection &rSection,
{
SfxItemSet aSet(rFmt.GetAttrSet());
mrReader.MatchSdrItemsIntoFlySet(pObject, aSet, mso_lineSimple,
- mso_sptRectangle, aRect);
+ mso_lineSolid, mso_sptRectangle, aRect);
rFmt.SetFmtAttr(aSet.Get(RES_BACKGROUND));
}
}
@@ -3420,7 +3642,7 @@ void wwSectionManager::SetUseOn(wwSection &rSection)
if (!bEven)
eUse = (UseOnPage)(eUse | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE);
- ASSERT(rSection.mpPage, "Makes no sense to call me with no pages to set");
+ OSL_ENSURE(rSection.mpPage, "Makes no sense to call me with no pages to set");
if (rSection.mpPage)
rSection.mpPage->WriteUseOn(eUse);
if (rSection.mpTitlePage)
@@ -3445,7 +3667,7 @@ void GiveNodePageDesc(SwNodeIndex &rIdx, const SwFmtPageDesc &rPgDesc,
SwTable& rTable =
rIdx.GetNode().GetTableNode()->GetTable();
SwFrmFmt* pApply = rTable.GetFrmFmt();
- ASSERT(pApply, "impossible");
+ OSL_ENSURE(pApply, "impossible");
if (pApply)
pApply->SetFmtAttr(rPgDesc);
}
@@ -3466,10 +3688,7 @@ SwFmtPageDesc wwSectionManager::SetSwFmtPageDesc(mySegIter &rIter,
mySegIter &rStart, bool bIgnoreCols)
{
SwFmtPageDesc aEmpty;
- // --> OD 2008-08-06 #150965#
// Always read title page header/footer data - it could be used by following sections
-// if (rIter->HasTitlePage())
- // <--
{
if (IsNewDoc() && rIter == rStart)
{
@@ -3479,11 +3698,11 @@ SwFmtPageDesc wwSectionManager::SetSwFmtPageDesc(mySegIter &rIter,
else
{
sal_uInt16 nPos = mrReader.rDoc.MakePageDesc(
- ViewShell::GetShellRes()->GetPageDescName(mnDesc)
+ ViewShell::GetShellRes()->GetPageDescName(mnDesc, ShellResource::FIRST_PAGE)
, 0, false);
rIter->mpTitlePage = &mrReader.rDoc._GetPageDesc(nPos);
}
- ASSERT(rIter->mpTitlePage, "no page!");
+ OSL_ENSURE(rIter->mpTitlePage, "no page!");
if (!rIter->mpTitlePage)
return aEmpty;
@@ -3498,12 +3717,11 @@ SwFmtPageDesc wwSectionManager::SetSwFmtPageDesc(mySegIter &rIter,
else
{
sal_uInt16 nPos = mrReader.rDoc.MakePageDesc(
- ViewShell::GetShellRes()->GetPageDescName(mnDesc,
- false, rIter->HasTitlePage()),
+ ViewShell::GetShellRes()->GetPageDescName(mnDesc, ShellResource::NORMAL_PAGE),
rIter->mpTitlePage, false);
rIter->mpPage = &mrReader.rDoc._GetPageDesc(nPos);
}
- ASSERT(rIter->mpPage, "no page!");
+ OSL_ENSURE(rIter->mpPage, "no page!");
if (!rIter->mpPage)
return aEmpty;
@@ -3547,6 +3765,14 @@ void wwSectionManager::InsertSegments()
mySegIter aStart = maSegments.begin();
for (mySegIter aIter = aStart; aIter != aEnd; ++aIter)
{
+ // If the section is of type "New column" (0x01), then simply insert a column break
+ if ( aIter->maSep.bkc == 1 )
+ {
+ SwPaM start( aIter->maStart );
+ mrReader.rDoc.InsertPoolItem( start, SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK), 0);
+ continue;
+ }
+
mySegIter aNext = aIter+1;
mySegIter aPrev = (aIter == aStart) ? aIter : aIter-1;
@@ -3558,11 +3784,12 @@ void wwSectionManager::InsertSegments()
bool bInsertSection = (aIter != aStart) ? (aIter->IsContinous() && bThisAndPreviousAreCompatible): false;
bool bInsertPageDesc = !bInsertSection;
bool bProtected = SectionIsProtected(*aIter); // do we really need this ?? I guess I have a different logic in editshell which disales this...
- if (bUseEnhFields && mrReader.pWDop->fProtEnabled && aIter->IsNotProtected()) {
- // here we have the special case that the whole document is protected, with the execption of this section.
- // I want to address this when I do the section rework, so for the moment we disable the overall protection then...
- mrReader.rDoc.set(IDocumentSettingAccess::PROTECT_FORM, false );
- }
+ if (bUseEnhFields && mrReader.pWDop->fProtEnabled && aIter->IsNotProtected())
+ {
+ // here we have the special case that the whole document is protected, with the execption of this section.
+ // I want to address this when I do the section rework, so for the moment we disable the overall protection then...
+ mrReader.rDoc.set(IDocumentSettingAccess::PROTECT_FORM, false );
+ }
if (bInsertPageDesc)
@@ -3590,6 +3817,34 @@ void wwSectionManager::InsertSegments()
SwFmtPageDesc aDesc(SetSwFmtPageDesc(aIter, aStart, bIgnoreCols));
if (!aDesc.GetPageDesc())
continue;
+
+ // special case handling for odd/even section break
+ // a) as before create a new page style for the section break
+ // b) set Layout of generated page style to right/left ( according
+ // to section break odd/even )
+ // c) create a new style to follow the break page style
+ if ( aIter->maSep.bkc == 3 || aIter->maSep.bkc == 4 )
+ {
+ // SetSwFmtPageDesc calls some methods that could
+ // modify aIter (e.g. wwSection ).
+ // Since we call SetSwFmtPageDesc below to generate the
+ // 'Following' style of the Break style, it is safer
+ // to take a copy of the contents of aIter.
+ wwSection aTmpSection = *aIter;
+ // create a new following page style
+ SwFmtPageDesc aFollow(SetSwFmtPageDesc(aIter, aStart, bIgnoreCols));
+ // restore any contents of aIter trashed by SetSwFmtPageDesc
+ *aIter = aTmpSection;
+
+ // Handle the section break
+ UseOnPage eUseOnPage = nsUseOnPage::PD_LEFT;
+ if ( aIter->maSep.bkc == 4 ) // Odd ( right ) Section break
+ eUseOnPage = nsUseOnPage::PD_RIGHT;
+
+ aDesc.GetPageDesc()->WriteUseOn( eUseOnPage );
+ aDesc.GetPageDesc()->SetFollow( aFollow.GetPageDesc() );
+ }
+
GiveNodePageDesc(aIter->maStart, aDesc, mrReader.rDoc);
}
@@ -3649,7 +3904,6 @@ void wwSectionManager::InsertSegments()
bool bHasOwnHdFt = false;
/*
- #112027# #110379#
In this nightmare scenario the continuous section has its own
headers and footers so we will try and find a hard page break
between here and the end of the section and put the headers and
@@ -3717,6 +3971,10 @@ void SwWW8ImplReader::StoreMacroCmds()
pTableStream->Seek(pWwFib->fcCmds);
uno::Reference < embed::XStorage > xRoot(mpDocShell->GetStorage());
+
+ if (!xRoot.is())
+ return;
+
try
{
uno::Reference < io::XStream > xStream =
@@ -3787,11 +4045,167 @@ void SwWW8ImplReader::ReadDocInfo()
DBG_ASSERT(xDocProps.is(), "DocumentProperties is null");
if (xDocProps.is()) {
+ if ( pWwFib->fDot )
+ {
+ rtl::OUString sTemplateURL;
+ SfxMedium* pMedium = mpDocShell->GetMedium();
+ if ( pMedium )
+ {
+ rtl::OUString aName = pMedium->GetName();
+ INetURLObject aURL( aName );
+ sTemplateURL = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
+ if ( sTemplateURL.getLength() > 0 )
+ xDocProps->setTemplateURL( sTemplateURL );
+ }
+ }
+ else if (pWwFib->lcbSttbfAssoc) // not a template, and has a SttbfAssoc
+ {
+ long nCur = pTableStream->Tell();
+ Sttb aSttb;
+ pTableStream->Seek( pWwFib->fcSttbfAssoc ); // point at tgc record
+ if (!aSttb.Read( pTableStream ) )
+ OSL_TRACE("** Read of SttbAssoc data failed!!!! ");
+ pTableStream->Seek( nCur ); // return to previous position, is that necessary?
+#if DEBUG
+ aSttb.Print( stderr );
+#endif
+ String sPath = aSttb.getStringAtIndex( 0x1 );
+ String aURL;
+ // attempt to convert to url ( won't work for obvious reasons on linux
+ if ( sPath.Len() )
+ ::utl::LocalFileHelper::ConvertPhysicalNameToURL( sPath, aURL );
+ if ( aURL.Len() )
+ xDocProps->setTemplateURL( aURL );
+ else
+ xDocProps->setTemplateURL( sPath );
+
+ }
sfx2::LoadOlePropertySet(xDocProps, pStg);
}
}
}
+void lcl_createTemplateToProjectEntry( const uno::Reference< container::XNameContainer >& xPrjNameCache, const rtl::OUString& sTemplatePathOrURL, const rtl::OUString& sVBAProjName )
+{
+ if ( xPrjNameCache.is() )
+ {
+ INetURLObject aObj;
+ aObj.SetURL( sTemplatePathOrURL );
+ bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ rtl::OUString aURL;
+ if ( bIsURL )
+ aURL = sTemplatePathOrURL;
+ else
+ {
+ osl::FileBase::getFileURLFromSystemPath( sTemplatePathOrURL, aURL );
+ aObj.SetURL( aURL );
+ }
+ try
+ {
+ rtl::OUString templateNameWithExt = aObj.GetLastName();
+ rtl::OUString templateName;
+ sal_Int32 nIndex = templateNameWithExt.lastIndexOf( '.' );
+ if ( nIndex != -1 )
+ {
+ templateName = templateNameWithExt.copy( 0, nIndex );
+ xPrjNameCache->insertByName( templateName, uno::makeAny( sVBAProjName ) );
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+}
+
+class WW8Customizations
+{
+ SvStream* mpTableStream;
+ WW8Fib mWw8Fib;
+public:
+ WW8Customizations( SvStream*, WW8Fib& );
+ bool Import( SwDocShell* pShell );
+};
+
+WW8Customizations::WW8Customizations( SvStream* pTableStream, WW8Fib& rFib ) : mpTableStream(pTableStream), mWw8Fib( rFib )
+{
+}
+
+bool WW8Customizations::Import( SwDocShell* pShell )
+{
+ if ( mWw8Fib.lcbCmds == 0 )
+ return false;
+ Tcg aTCG;
+ long nCur = mpTableStream->Tell();
+ mpTableStream->Seek( mWw8Fib.fcCmds ); // point at tgc record
+ bool bReadResult = aTCG.Read( mpTableStream );
+ mpTableStream->Seek( nCur ); // return to previous position, is that necessary?
+ if ( !bReadResult )
+ {
+ OSL_TRACE("** Read of Customization data failed!!!! ");
+ return false;
+ }
+#if DEBUG
+ aTCG.Print( stderr );
+#endif
+ return aTCG.ImportCustomToolBar( *pShell );
+}
+
+bool SwWW8ImplReader::ReadGlobalTemplateSettings( const rtl::OUString& sCreatedFrom, const uno::Reference< container::XNameContainer >& xPrjNameCache )
+{
+ SvtPathOptions aPathOpt;
+ String aAddinPath = aPathOpt.GetAddinPath();
+ uno::Sequence< rtl::OUString > sGlobalTemplates;
+
+ // first get the autoload addins in the directory STARTUP
+ uno::Reference< ucb::XSimpleFileAccess > xSFA( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")) ), uno::UNO_QUERY_THROW );
+
+ if( xSFA->isFolder( aAddinPath ) )
+ sGlobalTemplates = xSFA->getFolderContents( aAddinPath, sal_False );
+
+ sal_Int32 nEntries = sGlobalTemplates.getLength();
+ bool bRes = true;
+ const SvtFilterOptions* pVBAFlags = SvtFilterOptions::Get();
+ for ( sal_Int32 i=0; i<nEntries; ++i )
+ {
+ INetURLObject aObj;
+ aObj.SetURL( sGlobalTemplates[ i ] );
+ bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ rtl::OUString aURL;
+ if ( bIsURL )
+ aURL = sGlobalTemplates[ i ];
+ else
+ osl::FileBase::getFileURLFromSystemPath( sGlobalTemplates[ i ], aURL );
+ if ( !aURL.endsWithIgnoreAsciiCaseAsciiL( ".dot", 4 ) || ( sCreatedFrom.getLength() && sCreatedFrom.equals( aURL ) ) )
+ continue; // don't try and read the same document as ourselves
+
+ SotStorageRef rRoot = new SotStorage( aURL, STREAM_STD_READWRITE, STORAGE_TRANSACTED );
+
+ // Read Macro Projects
+ SvxImportMSVBasic aVBasic(*mpDocShell, *rRoot,
+ pVBAFlags->IsLoadWordBasicCode(),
+ pVBAFlags->IsLoadWordBasicStorage() );
+
+
+ String s1(CREATE_CONST_ASC("Macros"));
+ String s2(CREATE_CONST_ASC("VBA"));
+ aVBasic.Import( s1, s2, !pVBAFlags->IsLoadWordBasicExecutable() );
+ lcl_createTemplateToProjectEntry( xPrjNameCache, aURL, aVBasic.GetVBAProjectName() );
+ // Read toolbars & menus
+ SvStorageStreamRef refMainStream = rRoot->OpenSotStream( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("WordDocument") ) );
+ refMainStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ WW8Fib aWwFib( *refMainStream, 8 );
+ SvStorageStreamRef xTableStream = rRoot->OpenSotStream(String::CreateFromAscii( aWwFib.fWhichTblStm ? SL::a1Table : SL::a0Table), STREAM_STD_READ);
+
+ if (xTableStream.Is() && SVSTREAM_OK == xTableStream->GetError())
+ {
+ xTableStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
+ WW8Customizations aGblCustomisations( xTableStream, aWwFib );
+ aGblCustomisations.Import( mpDocShell );
+ }
+ }
+ return bRes;
+}
+
sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
{
sal_uLong nErrRet = 0;
@@ -3867,48 +4281,6 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
::StartProgress(STR_STATSTR_W4WREAD, 0, 100, mpDocShell);
-#ifdef DEBUGDUMP
- //experimental embedded ttf dumper
- if (pWwFib->lcbSttbttmbd && (7 < pWwFib->nVersion))
- {
- pTableStream->Seek(pWwFib->fcSttbttmbd);
- sal_uInt16 nZeros;
- *pTableStream >> nZeros;
- sal_uInt16 nNoEntries;
- *pTableStream >> nNoEntries;
- sal_uInt32 nUnknown1;
- *pTableStream >> nUnknown1;
- sal_uInt16 nUnknown2;
- *pTableStream >> nUnknown2;
- std::vector<sal_uInt32> aOffsets;
- for (sal_uInt16 nI = 0; nI < nNoEntries; ++nI)
- {
- sal_uInt32 nOffset;
- *pTableStream >> nOffset;
- aOffsets.push_back(nOffset);
- sal_uInt32 nUnknown3;
- *pTableStream >> nUnknown3;
- sal_uInt32 nUnknown4;
- *pTableStream >> nUnknown4;
- }
- typedef std::vector<sal_uInt32>::iterator myIter;
- myIter aEnd = aOffsets.end();
- myIter aIter = aOffsets.begin();
- while (aIter != aEnd)
- {
- sal_uInt32 nOffset = *aIter;
- sal_uInt32 nLen = STREAM_SEEK_TO_END;
- ++aIter;
- pStrm->Seek(nOffset);
- if (aIter != aEnd)
- nLen = *aIter - nOffset;
- SvStream *pDbg = sw::hack::CreateDebuggingStream(CREATE_CONST_ASC(".ttf.dump"));
- sw::hack::DumpStream(*pStrm, *pDbg, nLen);
- delete pDbg;
- }
- }
-#endif
-
// read Font Table
pFonts = new WW8Fonts( *pTableStream, *pWwFib );
@@ -3945,7 +4317,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
aLinkStrings[i];
}
- ReadDocVars(); // #129053# import document variables as meta information.
+ ReadDocVars(); // import document variables as meta information.
::SetProgressState(nProgress, mpDocShell); // Update
@@ -4006,8 +4378,6 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
SwEndNoteInfo aInfo;
aInfo = rDoc.GetEndNoteInfo(); // parallel zu Ftn
- // Ich kann nicht setzen, wann neu nummerieren...
- // aInfo.eNum = eNumA[pWDop->pDop->rncEdn];
aInfo.aFmt.SetNumberingType( static_cast< sal_uInt16 >(eNumTA[pWDop->nfcEdnRef]) );
if( pWDop->nEdn )
aInfo.nFtnOffset = pWDop->nEdn - 1;
@@ -4074,7 +4444,61 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
}
else //ordinary case
{
+ if (mbNewDoc && pStg && !pGloss) /*meaningless for a glossary, cmc*/
+ {
+ mpDocShell->SetIsTemplate( pWwFib->fDot ); // point at tgc record
+ const SvtFilterOptions* pVBAFlags = SvtFilterOptions::Get();
+ maTracer.EnterEnvironment(sw::log::eMacros);
+// dissable below for 3.1 at the moment, 'cause it's kinda immature
+// similarly the project reference in svx/source/msvba
+#if 1
+ uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( mpDocShell->GetModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW );
+
+ rtl::OUString sCreatedFrom = xDocProps->getTemplateURL();
+ uno::Reference< container::XNameContainer > xPrjNameCache;
+ uno::Reference< lang::XMultiServiceFactory> xSF(mpDocShell->GetModel(), uno::UNO_QUERY);
+ if ( xSF.is() )
+ xPrjNameCache.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAProjectNameProvider" ) ) ), uno::UNO_QUERY );
+
+ // Read Global templates
+ ReadGlobalTemplateSettings( sCreatedFrom, xPrjNameCache );
+#endif
+ // Create and insert Word vba Globals
+ uno::Any aGlobs;
+ uno::Sequence< uno::Any > aArgs(1);
+ aArgs[ 0 ] <<= mpDocShell->GetModel();
+ aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Globals")), aArgs );
+ BasicManager *pBasicMan = mpDocShell->GetBasicManager();
+ if (pBasicMan)
+ pBasicMan->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
+
+ SvxImportMSVBasic aVBasic(*mpDocShell, *pStg,
+ pVBAFlags->IsLoadWordBasicCode(),
+ pVBAFlags->IsLoadWordBasicStorage() );
+ String s1(CREATE_CONST_ASC("Macros"));
+ String s2(CREATE_CONST_ASC("VBA"));
+ int nRet = aVBasic.Import( s1, s2, !pVBAFlags->IsLoadWordBasicExecutable() );
+// dissable below for 3.1 at the moment, 'cause it's kinda immature
+// similarly the project reference in svx/source/msvba
+#if 1
+ lcl_createTemplateToProjectEntry( xPrjNameCache, sCreatedFrom, aVBasic.GetVBAProjectName() );
+ WW8Customizations aCustomisations( pTableStream, *pWwFib );
+ aCustomisations.Import( mpDocShell );
+#endif
+ if( 2 & nRet )
+ {
+ maTracer.Log(sw::log::eContainsVisualBasic);
+ rDoc.SetContainsMSVBasic(true);
+ }
+
+ StoreMacroCmds();
+
+ maTracer.LeaveEnvironment(sw::log::eMacros);
+ }
ReadText(0, pWwFib->ccpText, MAN_MAINTEXT);
+
}
::SetProgressState(nProgress, mpDocShell); // Update
@@ -4148,26 +4572,6 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
eMode |= nsRedlineMode_t::REDLINE_ON;
if( pWDop->fRMView )
eMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE;
- if (pStg && !pGloss) /*meaningless for a glossary, cmc*/
- {
- const SvtFilterOptions* pVBAFlags = SvtFilterOptions::Get();
- maTracer.EnterEnvironment(sw::log::eMacros);
- SvxImportMSVBasic aVBasic(*mpDocShell, *pStg,
- pVBAFlags->IsLoadWordBasicCode(),
- pVBAFlags->IsLoadWordBasicStorage() );
- String s1(CREATE_CONST_ASC("Macros"));
- String s2(CREATE_CONST_ASC("VBA"));
- int nRet = aVBasic.Import( s1, s2 );
- if( 2 & nRet )
- {
- maTracer.Log(sw::log::eContainsVisualBasic);
- rDoc.SetContainsMSVBasic(true);
- }
-
- StoreMacroCmds();
-
- maTracer.LeaveEnvironment(sw::log::eMacros);
- }
}
maInsertedTables.DelAndMakeTblFrms();
@@ -4228,7 +4632,7 @@ sal_uLong SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream,
case 8:
if(!pStg)
{
- ASSERT( pStg, "Version 8 muss immer einen Storage haben!" );
+ OSL_ENSURE( pStg, "Version 8 muss immer einen Storage haben!" );
nErrRet = ERR_SWG_READ_ERROR;
break;
}
@@ -4253,7 +4657,7 @@ sal_uLong SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream,
break;
default:
// Programm-Fehler!
- ASSERT( !this, "Es wurde vergessen, nVersion zu kodieren!" );
+ OSL_ENSURE( !this, "Es wurde vergessen, nVersion zu kodieren!" );
nErrRet = ERR_SWG_READ_ERROR;
break;
}
@@ -4275,13 +4679,13 @@ namespace
void DecryptRC4(msfilter::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut)
{
rIn.Seek(STREAM_SEEK_TO_END);
- sal_uLong nLen = rIn.Tell();
+ const sal_Size nLen = rIn.Tell();
rIn.Seek(0);
sal_uInt8 in[WW_BLOCKSIZE];
- for (sal_uLong nI = 0, nBlock = 0; nI < nLen; nI += WW_BLOCKSIZE, ++nBlock)
+ for (sal_Size nI = 0, nBlock = 0; nI < nLen; nI += WW_BLOCKSIZE, ++nBlock)
{
- sal_uLong nBS = (nLen - nI > WW_BLOCKSIZE) ? WW_BLOCKSIZE : nLen - nI;
+ sal_Size nBS = (nLen - nI > WW_BLOCKSIZE) ? WW_BLOCKSIZE : nLen - nI;
rIn.Read(in, nBS);
rCtx.InitCipher(nBlock);
rCtx.Decode(in, nBS, in, nBS);
@@ -4554,13 +4958,24 @@ sal_uLong SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGlos
{
nErrRet = 0;
+ pTempMain = MakeTemp(aDecryptMain);
+
+ pStrm->Seek(0);
+ const sal_Size nUnencryptedHdr = 0x44;
+ sal_uInt8 *pIn = new sal_uInt8[nUnencryptedHdr];
+ pStrm->Read(pIn, nUnencryptedHdr);
+
+ DecryptRC4(aCtx, *pStrm, aDecryptMain);
+
+ aDecryptMain.Seek(0);
+ aDecryptMain.Write(pIn, nUnencryptedHdr);
+ delete [] pIn;
+
+
pTempTable = MakeTemp(aDecryptTable);
DecryptRC4(aCtx, *pTableStream, aDecryptTable);
pTableStream = &aDecryptTable;
- pTempMain = MakeTemp(aDecryptMain);
- DecryptRC4(aCtx, *pStrm, aDecryptMain);
-
if (!pDataStream || pDataStream == pStrm)
pDataStream = &aDecryptMain;
else
@@ -4609,7 +5024,6 @@ public:
outlineeq(sal_uInt8 nNum) : mnNum(nNum) {}
bool operator()(const SwTxtFmtColl *pTest) const
{
- //return pTest->GetOutlineLevel() == mnNum; //#outline level,zhaojianwei
return pTest->IsAssignedToListLevelOfOutlineStyle() && pTest->GetAssignedOutlineStyleLevel() == mnNum; //<-end,zhaojianwei
}
};
@@ -4620,19 +5034,17 @@ void SwWW8ImplReader::SetOutLineStyles()
#i3674# & #101291# Load new document and insert document cases.
*/
SwNumRule aOutlineRule(*rDoc.GetOutlineNumRule());
- // --> OD 2005-10-14 #i53044,i53213#
+ // #i53044,i53213#
// <mpChosenOutlineNumRule> has to be set to point to local variable
// <aOutlineRule>, because its used below to be compared this <&aOutlineRule>.
// But at the end of the method <mpChosenOutlineNumRule> has to be set to
// <rDoc.GetOutlineNumRule()>, because <aOutlineRule> will be destroyed.
-// mpChosenOutlineNumRule = rDoc.GetOutlineNumRule();
mpChosenOutlineNumRule = &aOutlineRule;
// <--
sw::ParaStyles aOutLined(sw::util::GetParaStyles(rDoc));
- // --> OD 2009-02-04 #i98791# - sorting algorithm adjusted
+ // #i98791# - sorting algorithm adjusted
sw::util::SortByAssignedOutlineStyleListLevel(aOutLined);
- // <--
typedef sw::ParaStyleIter myParaStyleIter;
/*
@@ -4642,14 +5054,11 @@ void SwWW8ImplReader::SetOutLineStyles()
sal_uInt16 nFlagsStyleOutlLevel = 0;
if (!mbNewDoc)
{
- // --> OD 2008-12-16 #i70748#
- // backward iteration needed due to the outline level attribute
+ // #i70748# - backward iteration needed due to the outline level attribute
sw::ParaStyles::reverse_iterator aEnd = aOutLined.rend();
for ( sw::ParaStyles::reverse_iterator aIter = aOutLined.rbegin(); aIter < aEnd; ++aIter)
// <--
{
- //if ((*aIter)->GetOutlineLevel() < MAXLEVEL) //#outline level,zhaojianwei,
- //nFlagsStyleOutlLevel |= 1 << (*aIter)->GetOutlineLevel();
if ((*aIter)->IsAssignedToListLevelOfOutlineStyle())
nFlagsStyleOutlLevel |= 1 << (*aIter)->GetAssignedOutlineStyleLevel();//<-end,zhaojianwei
else
@@ -4659,13 +5068,12 @@ void SwWW8ImplReader::SetOutLineStyles()
else
{
/*
- #111955#
Only import *one* of the possible multiple outline numbering rules, so
pick the one that affects most styles. If we're not importing a new
document, we got to stick with what is already there.
*/
- // --> OD 2005-11-07 #127520# - use index in text format collection
- // array <pCollA> as key of the outline numbering map <aRuleMap>
+ // use index in text format collection array <pCollA>
+ // as key of the outline numbering map <aRuleMap>
// instead of the memory pointer of the outline numbering rule
// to assure that, if two outline numbering rule affect the same
// count of text formats, always the same outline numbering rule is chosen.
@@ -4679,14 +5087,10 @@ void SwWW8ImplReader::SetOutLineStyles()
rSI.pFmt
)
{
- // --> OD 2005-11-07 #127520#
myIter aIter = aRuleMap.find(nI);
- // <--
if (aIter == aRuleMap.end())
{
- // --> OD 2005-11-07 #127520#
aRuleMap[nI] = 1;
- // <--
}
else
++(aIter->second);
@@ -4700,27 +5104,22 @@ void SwWW8ImplReader::SetOutLineStyles()
if (aIter->second > nMax)
{
nMax = aIter->second;
- // --> OD 2005-11-07 #127520#
mpChosenOutlineNumRule = pCollA[ aIter->first ].pOutlineNumrule;
- // <--
}
}
// <--
- ASSERT(mpChosenOutlineNumRule, "Impossible");
+ OSL_ENSURE(mpChosenOutlineNumRule, "Impossible");
if (mpChosenOutlineNumRule)
aOutlineRule = *mpChosenOutlineNumRule;
if (mpChosenOutlineNumRule != &aOutlineRule)
{
- // --> OD 2008-12-16 #i70748#
- // backward iteration needed due to the outline level attribute
+ // #i70748# - backward iteration needed due to the outline level attribute
sw::ParaStyles::reverse_iterator aEnd = aOutLined.rend();
for ( sw::ParaStyles::reverse_iterator aIter = aOutLined.rbegin(); aIter < aEnd; ++aIter)
// <--
{
- //if ((*aIter)->GetOutlineLevel() < MAXLEVEL)//#outline level,zhaojianwei
- // (*aIter)->SetOutlineLevel(NO_NUMBERING);
if((*aIter)->IsAssignedToListLevelOfOutlineStyle())
(*aIter)->DeleteAssignmentToListLevelOfOutlineStyle(); //<-end
@@ -4750,7 +5149,6 @@ void SwWW8ImplReader::SetOutLineStyles()
*/
rSI.pFmt->SetFmtAttr(
SwNumRuleItem( rSI.pOutlineNumrule->GetName() ) );
- //((SwTxtFmtColl*)rSI.pFmt)->SetOutlineLevel(NO_NUMBERING);
((SwTxtFmtColl*)rSI.pFmt)->DeleteAssignmentToListLevelOfOutlineStyle();//#outline level,zhaojianwei
}
else
@@ -4772,7 +5170,6 @@ void SwWW8ImplReader::SetOutLineStyles()
myParaStyleIter aEnd = aOutLined.end();
while (aResult != aEnd && aCmp(*aResult))
{
- //(*aResult)->SetOutlineLevel(NO_NUMBERING);//#outline level,zhaojianwei
(*aResult)->DeleteAssignmentToListLevelOfOutlineStyle();
++aResult;
}
@@ -4792,8 +5189,6 @@ void SwWW8ImplReader::SetOutLineStyles()
sal_uInt8 nToLevel = rSI.nOutlineLevel;
const SwNumFmt& rRule=rSI.pOutlineNumrule->Get(nFromLevel);
aOutlineRule.Set(nToLevel, rRule);
- // Set my outline level
- //((SwTxtFmtColl*)rSI.pFmt)->SetOutlineLevel(nToLevel);//#outline level,zhaojianwei
((SwTxtFmtColl*)rSI.pFmt)->AssignToListLevelOfOutlineStyle(nToLevel); //<-end,zhaojianwei
// If there are more styles on this level ignore them
nFlagsStyleOutlLevel |= nAktFlags;
@@ -4802,7 +5197,7 @@ void SwWW8ImplReader::SetOutLineStyles()
}
if (nOldFlags != nFlagsStyleOutlLevel)
rDoc.SetOutlineNumRule(aOutlineRule);
- // --> OD 2005-10-14 #i53044,i53213#
+ // #i53044,i53213#
if ( mpChosenOutlineNumRule == &aOutlineRule )
{
mpChosenOutlineNumRule = rDoc.GetOutlineNumRule();
@@ -4891,7 +5286,7 @@ sal_uLong SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
(nMagic < 0xa697 || nMagic > 0xa699)
)
{
- //JP 06.05.99: teste auf eigenen 97-Fake!
+ // teste auf eigenen 97-Fake!
if (pStg && 0xa5ec == nMagic)
{
sal_uLong nCurPos = pStrm->Tell();
@@ -4914,7 +5309,7 @@ sal_uLong SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
break;
default:
nErrRet = ERR_WW8_NO_WW8_FILE_ERR;
- ASSERT( !this, "Es wurde vergessen, nVersion zu kodieren!" );
+ OSL_ENSURE( !this, "Es wurde vergessen, nVersion zu kodieren!" );
break;
}
@@ -4931,6 +5326,29 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportDOC()
return new WW8Reader();
}
+sal_uLong WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, sal_uInt16& rBuffSize )
+{
+ sal_uLong nRet = ERR_SWG_READ_ERROR;
+ OSL_ENSURE( pStg, "wo ist mein Storage?" );
+ rRef = pStg->OpenSotStream(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WordDocument")),
+ STREAM_READ | STREAM_SHARE_DENYALL);
+
+ if( rRef.Is() )
+ {
+ if( SVSTREAM_OK == rRef->GetError() )
+ {
+ sal_uInt16 nOld = rRef->GetBufferSize();
+ rRef->SetBufferSize( rBuffSize );
+ rBuffSize = nOld;
+ nRet = 0;
+ }
+ else
+ nRet = rRef->GetError();
+ }
+ return nRet;
+}
+
sal_uLong WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & /* FileName */)
{
sal_uInt16 nOldBuffSize = 32768;
@@ -4950,7 +5368,7 @@ sal_uLong WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, cons
nVersion = 6;
else
{
- ASSERT(!this, "WinWord 95 Reader-Read ohne Stream");
+ OSL_ENSURE(!this, "WinWord 95 Reader-Read ohne Stream");
nRet = ERR_SWG_READ_ERROR;
}
}
@@ -4968,16 +5386,15 @@ sal_uLong WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, cons
}
else
{
- ASSERT(!this, "WinWord 95/97 Reader-Read ohne Storage");
+ OSL_ENSURE(!this, "WinWord 95/97 Reader-Read ohne Storage");
nRet = ERR_SWG_READ_ERROR;
}
}
if( !nRet )
{
- //JP 18.01.96: Alle Ueberschriften sind normalerweise ohne
- // Kapitelnummer. Darum hier explizit abschalten
- // weil das Default jetzt wieder auf AN ist.
+ // Alle Ueberschriften sind normalerweise ohne Kapitelnummer.
+ // Darum hier explizit abschalten weil das Default jetzt wieder auf AN ist.
if (bNew)
{
Reader::SetNoOutlineNum( rDoc );
@@ -5048,7 +5465,7 @@ sal_Bool SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
// sein. Wir brauchen hier aber nur das Sprm fuer die Picture Id
long nOldPos = rReader.pStrm->Tell();
{
- // --> OD 2004-12-08 #i32596# - consider return value of method
+ // #i32596# - consider return value of method
// <rReader.GetTxbxTextSttEndCp(..)>. If it returns false, method
// wasn't successful. Thus, continue in this case.
// Note: Ask MM for initialization of <nStartCp> and <nEndCp>.
@@ -5132,7 +5549,7 @@ bool SwWW8ImplReader::InEqualOrHigherApo(int nLvl) const
{
if (nLvl)
--nLvl;
- // --> OD 2006-01-19 #i60827#
+ // #i60827#
// check size of <maApos> to assure that <maApos.begin() + nLvl> can be performed.
if ( sal::static_int_cast< sal_Int32>(nLvl) >= sal::static_int_cast< sal_Int32>(maApos.size()) )
{
@@ -5178,4 +5595,4 @@ namespace sw
}
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 1de503093141..2851b8860a3a 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,7 +25,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#ifndef _WW8PAR_HXX
#define _WW8PAR_HXX
@@ -148,6 +148,7 @@ SV_DECL_PTRARR_SORT_DEL(WW8OleMaps, WW8OleMap_Ptr,16,16)
class WW8Reader : public StgReader
{
virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ sal_uLong OpenMainStream( SvStorageStreamRef& rRef, sal_uInt16& rBuffSize );
public:
virtual int GetReaderType();
@@ -362,11 +363,13 @@ class FieldEntry
private:
::rtl::OUString msBookmarkName;
::rtl::OUString msMarkType;
+ ::rtl::OUString msMarkCode;
::sw::mark::IFieldmark::parameter_map_t maParams;
public:
sw::hack::Position maStartPos;
sal_uInt16 mnFieldId;
+ sal_uLong mnObjLocFc;
FieldEntry(SwPosition &rPos, sal_uInt16 nFieldId) throw();
FieldEntry(const FieldEntry &rOther) throw();
FieldEntry &operator=(const FieldEntry &rOther) throw();
@@ -377,8 +380,10 @@ class FieldEntry
::rtl::OUString GetBookmarkName();
::rtl::OUString GetBookmarkType();
+ ::rtl::OUString GetBookmarkCode();
void SetBookmarkName(::rtl::OUString bookmarkName);
void SetBookmarkType(::rtl::OUString bookmarkType);
+ void SetBookmarkCode(::rtl::OUString bookmarkCode);
::sw::mark::IFieldmark::parameter_map_t& getParameters();
};
@@ -533,15 +538,6 @@ private:
WW8FormulaEditBox& operator=(const WW8FormulaEditBox&);
public:
WW8FormulaEditBox(SwWW8ImplReader &rR);
-#if 0
- //#i3029# we are no longer importing editboxes as uno textboxes, using
- //input fields instead for superior layout.
- virtual sal_Bool Import(const com::sun::star::uno::Reference <
- com::sun::star::lang::XMultiServiceFactory> &rServiceFactory,
- com::sun::star::uno::Reference <
- com::sun::star::form::XFormComponent> &rFComp,
- com::sun::star::awt::Size &rSz);
-#endif
};
class SwMSConvertControls: public SvxMSConvertOCXControls
@@ -568,7 +564,7 @@ private:
virtual sal_Bool GetOLEStorageName( long nOLEId, String& rStorageName,
SvStorageRef& rSrcStorage, com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rDestStorage ) const;
virtual sal_Bool ShapeHasText( sal_uLong nShapeId, sal_uLong nFilePos ) const;
- // --> OD 2004-12-14 #i32596# - new parameter <_nCalledByGroup>, which
+ // #i32596# - new parameter <_nCalledByGroup>, which
// indicates, if the OLE object is imported inside a group object
virtual SdrObject* ImportOLE( long nOLEId,
const Graphic& rGrf,
@@ -706,9 +702,7 @@ public:
sal_uInt32 GetPageLeft() const;
sal_uInt32 GetPageRight() const;
sal_uInt32 GetPageWidth() const;
- // --> OD 2007-07-03 #148498#
sal_uInt32 GetWWPageTopMargin() const;
- // <--
bool empty() const { return maSegments.empty(); }
sal_uInt32 GetTextAreaWidth() const;
};
@@ -946,12 +940,8 @@ private:
WW8PLCFMan* pPlcxMan;
std::map<short, String> aLinkStringMap;
- // --> OD 2010-05-06 #i103711#
- std::set<const SwNode*> maTxtNodesHavingFirstLineOfstSet;
- // <--
- // --> OD 2010-05-11 #i105414#
- std::set<const SwNode*> maTxtNodesHavingLeftIndentSet;
- // <--
+ std::set<const SwNode*> maTxtNodesHavingFirstLineOfstSet; // #i103711#
+ std::set<const SwNode*> maTxtNodesHavingLeftIndentSet; // #i105414#
WW8RStyle* pStyles; // Pointer auf die Style-Einleseklasse
SwFmt* pAktColl; // gerade zu erzeugende Collection
@@ -1128,7 +1118,8 @@ private:
pReffingStck = 0;
}
void DeleteAnchorStk() { DeleteStk( pAnchorStck ); pAnchorStck = 0; }
- bool AddTextToParagraph(const String& sAddString);
+ void emulateMSWordAddTextToParagraph(const rtl::OUString& rAddString);
+ void simpleAddTextToParagraph(const String& rAddString);
bool HandlePageBreakChar();
bool ReadChar(long nPosCp, long nCpOfs);
bool ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs);
@@ -1154,8 +1145,8 @@ private:
void ImportTox( int nFldId, String aStr );
void EndSprm( sal_uInt16 nId );
- // --> OD 2010-05-06 #i103711#
- // --> OD 2010-05-11 #i105414#
+ // #i103711#
+ // #i105414#
void NewAttr( const SfxPoolItem& rAttr,
const bool bFirstLineOfStSet = false,
const bool bLeftIndentSet = false );
@@ -1164,7 +1155,6 @@ private:
bool GetFontParams(sal_uInt16, FontFamily&, String&, FontPitch&,
rtl_TextEncoding&);
bool SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums, sal_uInt16 nWhich);
- sal_uInt16 CorrectResIdForCharset(CharSet nCharSet, sal_uInt16 nWhich);
void ResetCharSetVars();
void ResetCJKCharSetVars();
@@ -1178,13 +1168,10 @@ private:
//border which has been previously set to a value and for which becoming
//empty is valid. Set bCheBtwn to work with paragraphs that have a special
//between paragraphs border
-#if 0
- // #i20672# we can't properly support between lines so best to ignore
+
+ // Note #i20672# we can't properly support between lines so best to ignore
// them for now
bool SetBorder(SvxBoxItem& rBox, const WW8_BRC* pbrc, short *pSizeArray=0,
- sal_uInt8 nSetBorders=0xFF, bool bChkBtwn = false) const;
-#endif
- bool SetBorder(SvxBoxItem& rBox, const WW8_BRC* pbrc, short *pSizeArray=0,
sal_uInt8 nSetBorders=0xFF) const;
void GetBorderDistance(const WW8_BRC* pbrc, Rectangle& rInnerDist) const;
sal_uInt16 GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing);
@@ -1196,10 +1183,10 @@ private:
void SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) const;
sal_Int32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor,
- MSO_LineStyle eLineStyle, MSO_SPT eShapeType, sal_Int32 &rLineWidth,
+ MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, sal_Int32 &rLineWidth,
SvxBoxItem& rBox );
void MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, SfxItemSet &aFlySet,
- MSO_LineStyle eLineStyle, MSO_SPT eShapeType, Rectangle &rInnerDist );
+ MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, Rectangle &rInnerDist );
void AdjustLRWrapForWordMargins(const SvxMSDffImportRec &rRecord,
SvxLRSpaceItem &rLR);
void AdjustULWrapForWordMargins(const SvxMSDffImportRec &rRecord,
@@ -1413,11 +1400,11 @@ private:
void StoreMacroCmds();
- // --> OD 2008-04-10 #i84783#
+ // #i84783#
// determine object attribute "Layout in Table Cell"
bool IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const;
// <--
-
+ bool ReadGlobalTemplateSettings( const rtl::OUString& sCreatedFrom, const com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >& xPrjNameMap );
//No copying
SwWW8ImplReader(const SwWW8ImplReader &);
SwWW8ImplReader& operator=(const SwWW8ImplReader&);
@@ -1449,6 +1436,8 @@ public: // eigentlich private, geht aber leider nur public
void Read_SubSuperProp( sal_uInt16, const sal_uInt8*, short nLen );
void Read_Underline( sal_uInt16, const sal_uInt8*, short nLen );
void Read_TxtColor( sal_uInt16, const sal_uInt8*, short nLen );
+ void openFont(sal_uInt16 nFCode, sal_uInt16 nId);
+ void closeFont(sal_uInt16 nId);
void Read_FontCode( sal_uInt16, const sal_uInt8*, short nLen );
void Read_FontSize( sal_uInt16, const sal_uInt8*, short nLen );
void Read_CharSet(sal_uInt16 , const sal_uInt8* pData, short nLen);
@@ -1581,6 +1570,8 @@ public: // eigentlich private, geht aber leider nur public
eF_ResT Read_F_OCX(WW8FieldDesc*, String&);
eF_ResT Read_F_Hyperlink(WW8FieldDesc*, String& rStr);
eF_ResT Read_F_Shape(WW8FieldDesc* pF, String& rStr);
+ eF_ResT Read_F_HTMLControl( WW8FieldDesc* pF, String& rStr);
+
void DeleteFormImpl();
@@ -1617,8 +1608,8 @@ public: // eigentlich private, geht aber leider nur public
bool CanUseRemoteLink(const String &rGrfName);
void UseListIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt);
void SetStyleIndent(SwWW8StyInf &rStyleInfo, const SwNumFmt &rFmt);
-// --> OD 2010-05-06 #i103711#
-// --> OD 2010-05-11 #i105414#
+// #i103711#
+// #i105414#
void SyncIndentWithList( SvxLRSpaceItem &rLR,
const SwNumFmt &rFmt,
const bool bFirstLineOfStSet,
@@ -1636,4 +1627,4 @@ bool RTLDrawingsHack(long &rLeft, long nWidth,
SwTwips nPageRight, SwTwips nPageSize);
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index c2e9c8789d55..c4a13b75795d 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <tools/solar.h>
#include <vcl/vclenum.hxx>
@@ -40,7 +40,6 @@
#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>
@@ -66,12 +65,10 @@
#include <fltshell.hxx> // fuer den Attribut Stack
#include <fmtanchr.hxx>
#include <fmtrowsplt.hxx>
-// --> OD 2005-01-27 #i33818#
-#include <fmtfollowtextflow.hxx>
-// <--
+#include <fmtfollowtextflow.hxx> // #i33818#
#include <numrule.hxx>
-# include "../inc/wwstyles.hxx"
-# include "writerhelper.hxx"
+#include "../inc/wwstyles.hxx"
+#include "writerhelper.hxx"
#include "ww8struc.hxx" // struct TC
#include "ww8par.hxx"
#include "ww8par2.hxx"
@@ -132,11 +129,6 @@ struct WW8TabBandDesc
sal_uInt32* pNewSHDs;
WW8_BRC aDefBrcs[6];
-
- // nur fuer WW6-7: diese Zelle hat WW-Flag bMerged (horizontal) gesetzt
- //bool bWWMergedVer6[MAX_COL];
-
-
bool bExist[MAX_COL]; // Existiert diese Zelle ?
sal_uInt8 nTransCell[MAX_COL + 2]; // UEbersetzung WW-Index -> SW-Index
@@ -282,8 +274,8 @@ void sw::util::RedlineStack::close( const SwPosition& rPos,
{
if( pTabDesc && pTabDesc->getOldRedlineStack() )
{
-#ifdef DBG_UTIL
- ASSERT( pTabDesc->getOldRedlineStack()->close(rPos, eType), "close without open!");
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( pTabDesc->getOldRedlineStack()->close(rPos, eType), "close without open!");
#else
pTabDesc->getOldRedlineStack()->close( rPos, eType );
#endif
@@ -294,7 +286,7 @@ void sw::util::RedlineStack::close( const SwPosition& rPos,
void wwSectionManager::SetCurrentSectionHasFootnote()
{
- ASSERT(!maSegments.empty(),
+ OSL_ENSURE(!maSegments.empty(),
"should not be possible, must be at least one segment");
if (!maSegments.empty())
maSegments.back().mbHasFootnote = true;
@@ -302,7 +294,7 @@ void wwSectionManager::SetCurrentSectionHasFootnote()
bool wwSectionManager::CurrentSectionIsVertical() const
{
- ASSERT(!maSegments.empty(),
+ OSL_ENSURE(!maSegments.empty(),
"should not be possible, must be at least one segment");
if (!maSegments.empty())
return maSegments.back().IsVertical();
@@ -311,7 +303,7 @@ bool wwSectionManager::CurrentSectionIsVertical() const
bool wwSectionManager::CurrentSectionIsProtected() const
{
- ASSERT(!maSegments.empty(),
+ OSL_ENSURE(!maSegments.empty(),
"should not be possible, must be at least one segment");
if (!maSegments.empty())
return SectionIsProtected(maSegments.back());
@@ -338,17 +330,14 @@ sal_uInt32 wwSectionManager::GetTextAreaWidth() const
return !maSegments.empty() ? maSegments.back().GetTextAreaWidth() : 0;
}
-// --> OD 2007-07-03 #148498#
sal_uInt32 wwSectionManager::GetWWPageTopMargin() const
{
return !maSegments.empty() ? maSegments.back().maSep.dyaTop : 0;
}
-// <--
sal_uInt16 SwWW8ImplReader::End_Ftn()
{
/*
- #84095#
Ignoring Footnote outside of the normal Text. People will put footnotes
into field results and field commands.
*/
@@ -358,7 +347,7 @@ sal_uInt16 SwWW8ImplReader::End_Ftn()
return 0;
}
- ASSERT(!maFtnStack.empty(), "footnote end without start");
+ OSL_ENSURE(!maFtnStack.empty(), "footnote end without start");
if (maFtnStack.empty())
return 0;
@@ -383,7 +372,7 @@ sal_uInt16 SwWW8ImplReader::End_Ftn()
SwFmtFtn aFtn(rDesc.meType == MAN_EDN);
pFN = pTxt->InsertItem(aFtn, nPos, nPos);
}
- ASSERT(pFN, "Probleme beim Anlegen des Fussnoten-Textes");
+ OSL_ENSURE(pFN, "Probleme beim Anlegen des Fussnoten-Textes");
if (pFN)
{
@@ -393,7 +382,7 @@ sal_uInt16 SwWW8ImplReader::End_Ftn()
WW8PLCFMan* pOldPlcxMan = pPlcxMan;
const SwNodeIndex* pSttIdx = ((SwTxtFtn*)pFN)->GetStartNode();
- ASSERT(pSttIdx, "Probleme beim Anlegen des Fussnoten-Textes");
+ OSL_ENSURE(pSttIdx, "Probleme beim Anlegen des Fussnoten-Textes");
((SwTxtFtn*)pFN)->SetSeqNo( rDoc.GetFtnIdxs().Count() );
@@ -405,7 +394,7 @@ sal_uInt16 SwWW8ImplReader::End_Ftn()
bFtEdOk = true;
bFtnEdn = bOld;
- ASSERT(sChar.Len()==1 && ((rDesc.mbAutoNum == (sChar.GetChar(0) == 2))),
+ OSL_ENSURE(sChar.Len()==1 && ((rDesc.mbAutoNum == (sChar.GetChar(0) == 2))),
"footnote autonumbering must be 0x02, and everthing else must not be");
// If no automatic numbering use the following char from the main text
@@ -453,7 +442,6 @@ sal_uInt16 SwWW8ImplReader::End_Ftn()
long SwWW8ImplReader::Read_Ftn(WW8PLCFManResult* pRes)
{
/*
- #84095#
Ignoring Footnote outside of the normal Text. People will put footnotes
into field results and field commands.
*/
@@ -508,7 +496,7 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp,
}
else
{
- ASSERT(!nLevel || pLevel, "sublevel without level sprm");
+ OSL_ENSURE(!nLevel || pLevel, "sublevel without level sprm");
return true; // RowEnd found
}
}
@@ -537,7 +525,7 @@ ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd,
const WW8_TablePos *pTopLevelTable = nCellLevel <= 1 ? pTabPos : 0;
ApoTestResults aRet;
// Frame in Style Definition (word appears to ignore them if inside an
- // text autoshape, e.g. #94418#)
+ // text autoshape)
if (!bTxbxFlySection)
aRet.mpStyleApo = StyleExists(nAktColl) ? pCollA[nAktColl].pWWFly : 0;
@@ -592,12 +580,12 @@ ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd,
{
if (!pTableDesc)
{
- ASSERT(pTableDesc, "What!");
+ OSL_ENSURE(pTableDesc, "What!");
bTestAllowed = false;
}
else
{
- // --> OD 2005-02-01 #i39468#
+ // #i39468#
// If current cell isn't valid, the test is allowed.
// The cell isn't valid, if e.g. there is a new row
// <pTableDesc->nAktRow> >= <pTableDesc->pTabLines->Count()>
@@ -652,7 +640,6 @@ static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, sal_uInt8 nSwLevel )
if ((SVBT8ToByte(rAV.aBits1 ) & 0x4) >> 2)
rNum.SetIncludeUpperLevels(nSwLevel + 1);
rNum.SetStart( SVBT16ToShort( rAV.iStartAt ) );
-// rNum.eNumAdjust = eAdjA[rAV.jc];
rNum.SetNumAdjust( eAdjA[SVBT8ToByte( rAV.aBits1 ) & 0x3] );
rNum.SetCharTextDistance( SVBT16ToShort( rAV.dxaSpace ) );
@@ -707,8 +694,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
// replace by simple Bullet ?
if( bListSymbol )
- //JP 14.08.96: cBulletChar benutzen, damit auf dem MAC
- // richtig gemappt wird
+ //cBulletChar benutzen, damit auf dem MAC richtig gemappt wird
sTxt.Fill( SVBT8ToByte( rAV.cbTextBefore )
+ SVBT8ToByte( rAV.cbTextAfter ), cBulletChar );
}
@@ -716,8 +702,6 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
else
{ // Nummerierung / Aufzaehlung
bInsert = true;
-// if( SVBT16ToShort( rAV.ftc ) == 1
-// || SVBT16ToShort( rAV.ftc ) == 3 ){ // Symbol / WingDings
if( bListSymbol )
{
FontFamily eFamily;
@@ -726,18 +710,14 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
if( GetFontParams( SVBT16ToShort( rAV.ftc ), eFamily, aName,
ePitch, eCharSet ) ){
-// sal_uInt16 nSiz = ( SVBT16ToShort( rAV.hps ) ) ?
-// SVBT16ToShort( rAV.hps ) : 24; // Groesse in 1/2 Pt
-// darf nach JP nicht gesetzt werden, da immer die Size
-// genommen wird, die am ZeilenAnfang benutzt wird
+
Font aFont;
aFont.SetName( aName );
aFont.SetFamily( eFamily );
-// aFont.SetPitch( ePitch ); // darf nach JP nicht
+
aFont.SetCharSet( eCharSet );
rNum.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
-// if( rAV.ico ) // geht in UI und SWG-Writer/Reader nicht
-// aFont.SetColor( Color( GetCol( rAV.ico ) ) );
+
rNum.SetBulletFont( &aFont );
// take only the very first character
@@ -799,8 +779,7 @@ SwNumRule* SwWW8ImplReader::GetStyRule()
const String aBaseName(CREATE_CONST_ASC( "WW8StyleNum" ));
const String aName( rDoc.GetUniqueNumRuleName( &aBaseName, false) );
- // --> OD 2008-06-04 #i86652#
-// sal_uInt16 nRul = rDoc.MakeNumRule( aName );
+ // #i86652#
sal_uInt16 nRul = rDoc.MakeNumRule( aName, 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT );
// <--
@@ -833,7 +812,6 @@ void SwWW8ImplReader::Read_ANLevelNo( sal_uInt16, const sal_uInt8* pData, short
{
nSwNumLevel = *pData - 1;
if (!bNoAttrImport)
- //((SwTxtFmtColl*)pAktColl)->SetOutlineLevel( nSwNumLevel ); //#outline level,zhaojianwei
((SwTxtFmtColl*)pAktColl)->AssignToListLevelOfOutlineStyle( nSwNumLevel ); //<-end,zhaojianwei
// Bei WW-NoNumbering koennte auch NO_NUMBERING gesetzt
// werden. ( Bei normaler Nummerierung muss NO_NUM gesetzt
@@ -874,15 +852,13 @@ void SwWW8ImplReader::Read_ANLevelDesc( sal_uInt16, const sal_uInt8* pData, shor
// Falls bereits direkt oder durch
// Vererbung NumruleItems gesetzt sind,
- // dann jetzt ausschalten #56163
+ // dann jetzt ausschalten
pAktColl->SetFmtAttr( SwNumRuleItem() );
String aName(CREATE_CONST_ASC( "Outline" ));
- // --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule aNR( rDoc.GetUniqueNumRuleName( &aName ),
SvxNumberFormat::LABEL_WIDTH_AND_POSITION,
OUTLINE_RULE );
- // <--
aNR = *rDoc.GetOutlineNumRule();
SetAnld(&aNR, (WW8_ANLD*)pData, nSwNumLevel, true);
@@ -1025,8 +1001,7 @@ void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13)
{
if (!pNumRule)
{
- // --> OD 2008-06-04 #i86652#
-// pNumRule = rDoc.GetNumRuleTbl()[rDoc.MakeNumRule(sNumRule)];
+ // #i86652#
pNumRule = rDoc.GetNumRuleTbl()[
rDoc.MakeNumRule( sNumRule, 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT ) ];
@@ -1490,8 +1465,8 @@ void WW8TabBandDesc::ProcessDirection(const sal_uInt8* pParams)
sal_uInt8 nEndCell = *pParams++;
sal_uInt16 nCode = SVBT16ToShort(pParams);
- ASSERT(nStartCell < nEndCell, "not as I thought");
- ASSERT(nEndCell < MAX_COL + 1, "not as I thought");
+ OSL_ENSURE(nStartCell < nEndCell, "not as I thought");
+ OSL_ENSURE(nEndCell < MAX_COL + 1, "not as I thought");
if (nStartCell > MAX_COL)
return;
if (nEndCell > MAX_COL + 1)
@@ -1504,19 +1479,19 @@ void WW8TabBandDesc::ProcessDirection(const sal_uInt8* pParams)
void WW8TabBandDesc::ProcessSpacing(const sal_uInt8* pParams)
{
sal_uInt8 nLen = pParams ? *(pParams - 1) : 0;
- ASSERT(nLen == 6, "Unexpected spacing len");
+ OSL_ENSURE(nLen == 6, "Unexpected spacing len");
if (nLen != 6)
return;
mbHasSpacing=true;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uInt8 nWhichCell = *pParams;
- ASSERT(nWhichCell == 0, "Expected cell to be 0!");
+ OSL_ENSURE(nWhichCell == 0, "Expected cell to be 0!");
#endif
++pParams; //Skip which cell
++pParams; //unknown byte
sal_uInt8 nSideBits = *pParams++;
- ASSERT(nSideBits < 0x10, "Unexpected value for nSideBits");
+ OSL_ENSURE(nSideBits < 0x10, "Unexpected value for nSideBits");
++pParams; //unknown byte
sal_uInt16 nValue = SVBT16ToShort( pParams );
for (int i = wwTOP; i <= wwRIGHT; i++)
@@ -1538,7 +1513,7 @@ void WW8TabBandDesc::ProcessSpacing(const sal_uInt8* pParams)
case 0:
break;
default:
- ASSERT(!this, "Impossible");
+ OSL_ENSURE(!this, "Impossible");
break;
}
}
@@ -1547,24 +1522,25 @@ void WW8TabBandDesc::ProcessSpacing(const sal_uInt8* pParams)
void WW8TabBandDesc::ProcessSpecificSpacing(const sal_uInt8* pParams)
{
sal_uInt8 nLen = pParams ? *(pParams - 1) : 0;
- ASSERT(nLen == 6, "Unexpected spacing len");
+ OSL_ENSURE(nLen == 6, "Unexpected spacing len");
if (nLen != 6)
return;
sal_uInt8 nWhichCell = *pParams++;
- ASSERT(nWhichCell < MAX_COL + 1, "Cell out of range in spacings");
+ OSL_ENSURE(nWhichCell < MAX_COL + 1, "Cell out of range in spacings");
if (nWhichCell >= MAX_COL + 1)
return;
++pParams; //unknown byte
sal_uInt8 nSideBits = *pParams++;
- ASSERT(nSideBits < 0x10, "Unexpected value for nSideBits");
+ OSL_ENSURE(nSideBits < 0x10, "Unexpected value for nSideBits");
nOverrideSpacing[nWhichCell] |= nSideBits;
- ASSERT(nOverrideSpacing[nWhichCell] < 0x10,
+ OSL_ENSURE(nOverrideSpacing[nWhichCell] < 0x10,
"Unexpected value for nSideBits");
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uInt8 nUnknown2 = *pParams;
- ASSERT(nUnknown2 == 0x3, "Unexpected value for spacing2");
+ OSL_ENSURE(nUnknown2 == 0x3, "Unexpected value for spacing2");
+
#endif
++pParams;
sal_uInt16 nValue = SVBT16ToShort( pParams );
@@ -1979,7 +1955,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
default:
;
}
- aSprmIter++;
+ aSprmIter.advance();
}
if( !nLoop )
@@ -1989,7 +1965,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
}
}
- // #55171: WW-Tabellen koennen Fly-Wechsel beinhalten daher hier
+ // WW-Tabellen koennen Fly-Wechsel beinhalten daher hier
// Tabellen abbrechen und neu beginnen noch steht *pPap noch vor
// TabRowEnd, daher kann TestApo() mit letztem Parameter false und
// damit wirksam gerufen werden.
@@ -2072,7 +2048,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
aRes.pMemPos = 0;
aRes.nStartPos = nStartCp;
- // #114237 PlcxMan currently points too far ahead so we need to bring
+ // PlcxMan currently points too far ahead so we need to bring
// it back to where we are trying to make a table
pIo->pPlcxMan->GetPap()->nOrigStartPos = aRes.nStartPos;
if (!(pPap->SeekPos(aRes.nStartPos)))
@@ -2152,7 +2128,6 @@ void WW8TabDesc::CalcDefaults()
nMaxRight = SHRT_MIN;
/*
- #101175#
If we are an honestly inline centered table, then the normal rules of
engagement for left and right margins do not apply. The multiple rows are
centered regardless of the actual placement of rows, so we cannot have
@@ -2178,7 +2153,7 @@ void WW8TabDesc::CalcDefaults()
for( short i = 0; i < pR->nWwCols; i++ )
{
/*
- #74387# If the margins are so large as to make the displayable
+ If the margins are so large as to make the displayable
area inside them smaller than the minimum allowed then adjust the
width to fit. But only do it if the two cells are not the exact
same value, if they are then the cell does not really exist and will
@@ -2198,7 +2173,7 @@ void WW8TabDesc::CalcDefaults()
}
nSwWidth = nMaxRight - nMinLeft;
- // #109830# If the table is right aligned we need to align all rows to the
+ // If the table is right aligned we need to align all rows to the
// row that has the furthest right point
if(eOri == text::HoriOrientation::RIGHT)
@@ -2265,41 +2240,44 @@ void WW8TabDesc::CalcDefaults()
}
}
}
- /*
- Similiar to graphics and other elements word does not totally
- factor the width of the border into its calculations of size, we
- do so we must adjust out widths and other dimensions to fit. It
- appears that what occurs is that the last cell's right margin if
- the margin width that is not calculated into winwords table
- dimensions, so in that case increase the table to include the
- extra width of the right margin.
- */
- if ( pIo->bVer67 ?
- !(SVBT16ToShort(pR->pTCs[pR->nWwCols-1].rgbrc[3].aBits1) & 0x20)
- : !(SVBT16ToShort(pR->pTCs[pR->nWwCols-1].rgbrc[3].aBits2) & 0x2000))
+ if (pR->nWwCols)
{
- short nThickness = pR->pTCs[pR->nWwCols-1].rgbrc[3].
- DetermineBorderProperties(pIo->bVer67);
- pR->nCenter[pR->nWwCols] = pR->nCenter[pR->nWwCols] + nThickness;
- if (nThickness > nRightMaxThickness)
- nRightMaxThickness = nThickness;
- }
+ /*
+ Similiar to graphics and other elements word does not totally
+ factor the width of the border into its calculations of size, we
+ do so we must adjust out widths and other dimensions to fit. It
+ appears that what occurs is that the last cell's right margin if
+ the margin width that is not calculated into winwords table
+ dimensions, so in that case increase the table to include the
+ extra width of the right margin.
+ */
+ if ( pIo->bVer67 ?
+ !(SVBT16ToShort(pR->pTCs[pR->nWwCols-1].rgbrc[3].aBits1) & 0x20)
+ : !(SVBT16ToShort(pR->pTCs[pR->nWwCols-1].rgbrc[3].aBits2) & 0x2000))
+ {
+ short nThickness = pR->pTCs[pR->nWwCols-1].rgbrc[3].
+ DetermineBorderProperties(pIo->bVer67);
+ pR->nCenter[pR->nWwCols] = pR->nCenter[pR->nWwCols] + nThickness;
+ if (nThickness > nRightMaxThickness)
+ nRightMaxThickness = nThickness;
+ }
- /*
- The left space of the table is in nMinLeft, but again this
- does not consider the margin thickness to its left in the
- placement value, so get the thickness of the left border,
- half is placed to the left of the nominal left side, and
- half to the right.
- */
- if ( pIo->bVer67 ?
- !(SVBT16ToShort(pR->pTCs[0].rgbrc[1].aBits1) & 0x20)
- : !(SVBT16ToShort(pR->pTCs[0].rgbrc[1].aBits2) & 0x2000))
- {
- short nThickness = pR->pTCs[0].rgbrc[1].
- DetermineBorderProperties(pIo->bVer67);
- if (nThickness > nLeftMaxThickness)
- nLeftMaxThickness = nThickness;
+ /*
+ The left space of the table is in nMinLeft, but again this
+ does not consider the margin thickness to its left in the
+ placement value, so get the thickness of the left border,
+ half is placed to the left of the nominal left side, and
+ half to the right.
+ */
+ if ( pIo->bVer67 ?
+ !(SVBT16ToShort(pR->pTCs[0].rgbrc[1].aBits1) & 0x20)
+ : !(SVBT16ToShort(pR->pTCs[0].rgbrc[1].aBits2) & 0x2000))
+ {
+ short nThickness = pR->pTCs[0].rgbrc[1].
+ DetermineBorderProperties(pIo->bVer67);
+ if (nThickness > nLeftMaxThickness)
+ nLeftMaxThickness = nThickness;
+ }
}
}
nSwWidth = nSwWidth + nRightMaxThickness;
@@ -2330,10 +2308,9 @@ void WW8TabDesc::CalcDefaults()
}
}
- ASSERT(i,"no columns in row ?");
+ OSL_ENSURE(i,"no columns in row ?");
/*
- #96345#
If the last cell was "false" then there is no valid cell following it,
so the default mapping forward wont't work. So map it (and
contigious invalid cells backwards to the last valid cell instead.
@@ -2362,43 +2339,6 @@ void WW8TabDesc::CalcDefaults()
disjoint upper and lowers to see what happens there.
*/
- /* #i29550# FME 2004-06-02 Removed this code because of the implementation
- of the collapsing table borders model. So this should not be necessary
- anymore. */
-
- /* for (pR = pFirstBand; pR; pR = pR->pNextBand)
- {
- WW8TabBandDesc *pNext = pR->pNextBand;
- if (!pNext)
- break;
-
- for (int k = 0; k < pR->nWwCols; ++k)
- {
- WW8_BRC &rAbove = pR->pTCs[k].rgbrc[WW8_BOT];
- short nAboveThick = rAbove.IsEmpty(pIo->bVer67) ?
- 0 : rAbove.DetermineBorderProperties(pIo->bVer67);
- short nUpperLeft = pR->nCenter[k];
- short nUpperRight = pR->nCenter[k+1];
-
- for (int l = 0; l < pNext->nWwCols; ++l)
- {
- short nLowerLeft = pNext->nCenter[l];
- short nLowerRight = pNext->nCenter[l+1];
-
- if ((nLowerLeft < nUpperLeft) || (nLowerRight > nUpperRight))
- continue;
-
- WW8_BRC &rBelow = pNext->pTCs[l].rgbrc[WW8_TOP];
- short nBelowThick = rBelow.IsEmpty(pIo->bVer67) ?
- 0 : rBelow.DetermineBorderProperties(pIo->bVer67);
- if (nAboveThick > nBelowThick)
- rBelow = rAbove;
- }
-
- rAbove = WW8_BRC();
- }
- } */
-
if ((nMinLeft && !bIsBiDi && text::HoriOrientation::LEFT == eOri) ||
(nMinLeft != -108 && bIsBiDi && text::HoriOrientation::RIGHT == eOri)) // Word sets the first nCenter value to -108 when no indent is used
eOri = text::HoriOrientation::LEFT_AND_WIDTH; // absolutely positioned
@@ -2408,7 +2348,7 @@ void WW8TabDesc::CalcDefaults()
bOk = false;
pActBand = pFirstBand;
nAktBandRow = 0;
- ASSERT( pActBand, "pActBand ist 0" );
+ OSL_ENSURE( pActBand, "pActBand ist 0" );
}
void WW8TabDesc::SetSizePosition(SwFrmFmt* pFrmFmt)
@@ -2416,7 +2356,7 @@ void WW8TabDesc::SetSizePosition(SwFrmFmt* pFrmFmt)
SwFrmFmt* pApply = pFrmFmt;
if (!pApply )
pApply = pTable->GetFrmFmt();
- ASSERT(pApply,"No frame");
+ OSL_ENSURE(pApply,"No frame");
pApply->SetFmtAttr(aItemSet);
if (pFrmFmt)
{
@@ -2431,7 +2371,7 @@ void WW8TabDesc::SetSizePosition(SwFrmFmt* pFrmFmt)
void wwSectionManager::PrependedInlineNode(const SwPosition &rPos,
const SwNode &rNode)
{
- ASSERT(!maSegments.empty(),
+ OSL_ENSURE(!maSegments.empty(),
"should not be possible, must be at least one segment");
if ((!maSegments.empty()) && (maSegments.back().maStart == rPos.nNode))
maSegments.back().maStart = SwNodeIndex(rNode);
@@ -2489,12 +2429,12 @@ void WW8TabDesc::CreateSwTable()
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 0 ),
*pTmpPos, nBands, nDefaultSwCols, eOri, 0, 0, sal_False, sal_True );
- ASSERT(pTable && pTable->GetFrmFmt(), "insert table failed");
+ OSL_ENSURE(pTable && pTable->GetFrmFmt(), "insert table failed");
if (!pTable || !pTable->GetFrmFmt())
return;
SwTableNode* pTableNode = pTable->GetTableNode();
- ASSERT(pTableNode, "no table node!");
+ OSL_ENSURE(pTableNode, "no table node!");
if (pTableNode)
{
pIo->maSectionManager.PrependedInlineNode(*pIo->pPaM->GetPoint(),
@@ -2573,7 +2513,10 @@ void WW8TabDesc::CreateSwTable()
else
{
if (nPreferredWidth)
- nLeft = pIo->maSectionManager.GetTextAreaWidth() - nPreferredWidth - nOrgDxaLeft;
+ {
+ nLeft = pIo->maSectionManager.GetTextAreaWidth();
+ nLeft = nLeft - nPreferredWidth - nOrgDxaLeft;
+ }
else
nLeft = -GetMinLeft();
}
@@ -2596,12 +2539,11 @@ void WW8TabDesc::UseSwTable()
pTblNd = (SwTableNode*)(*pTabLines)[0]->GetTabBoxes()[0]->
GetSttNd()->FindTableNode();
- ASSERT( pTblNd, "wo ist mein TabellenNode" );
+ OSL_ENSURE( pTblNd, "wo ist mein TabellenNode" );
- // --> mloiseleur 2007-10-10 #i69519# Restrict rows to repeat to a decent value
+ // #i69519# - Restrict rows to repeat to a decent value
if ( nRowsToRepeat == static_cast<sal_uInt16>(nRows) )
nRowsToRepeat = 1;
- // <--
pTblNd->GetTable().SetRowsToRepeat( nRowsToRepeat );
// ggfs. Zusatz-Zellen einfuegen u.dgl.
@@ -2636,7 +2578,7 @@ void WW8TabDesc::MergeCells()
//
// ggfs. eine neue Merge-Gruppe beginnen
//
- ASSERT(nRow < pTabLines->Count(),
+ OSL_ENSURE(nRow < pTabLines->Count(),
"Too few lines, table ended early");
if (nRow >= pTabLines->Count())
return;
@@ -2644,9 +2586,9 @@ void WW8TabDesc::MergeCells()
pTabBoxes = &pTabLine->GetTabBoxes();
sal_uInt16 nCol = pActBand->nTransCell[ i ];
- if (!pActBand->bExist[i]) //#113434#
+ if (!pActBand->bExist[i])
continue;
- ASSERT(nCol < pTabBoxes->Count(),
+ OSL_ENSURE(nCol < pTabBoxes->Count(),
"Too few columns, table ended early");
if (nCol >= pTabBoxes->Count())
return;
@@ -2659,10 +2601,9 @@ void WW8TabDesc::MergeCells()
bMerge = true;
else if (rCell.bFirstMerged && pActBand->bExist[i])
{
- //#91211# Some tests to avoid merging cells
- //which previously were declared invalid because
- //of sharing the exact same dimensions as their
- //previous cell
+ // Some tests to avoid merging cells which previously were
+ // declared invalid because of sharing the exact same dimensions
+ // as their previous cell
//If theres anything underneath/above we're ok.
if (rCell.bVertMerge || rCell.bVertRestart)
@@ -2701,8 +2642,8 @@ void WW8TabDesc::MergeCells()
// 2. aktuelle Merge-Gruppe anlegen
pActMGroup = new WW8SelBoxInfo( nX1, nWidth );
- // --> OD 2005-02-04 #118544# - determine size of new
- // merge group before inserted the new merge group.
+ // determine size of new merge group
+ // before inserted the new merge group.
// Needed to correctly locked previously created merge groups.
// Gesamtbreite ermitteln und zuweisen
short nSizCell = pActBand->nWidth[ i ];
@@ -2717,9 +2658,8 @@ void WW8TabDesc::MergeCells()
pActMGroup->nGroupWidth = nSizCell;
// <--
- // --> OD 2005-02-03 #118544# - locked previously
- // created merge groups, after determining the size
- // for the new merge group.
+ // locked previously created merge groups,
+ // after determining the size for the new merge group.
// 1. ggfs. alte Mergegruppe(n) schliessen, die
// den von unserer neuen Gruppe betroffenen
// X-Bereich ueberdecken
@@ -2777,7 +2717,7 @@ void WW8TabDesc::ParkPaM()
void WW8TabDesc::MoveOutsideTable()
{
- ASSERT(pTmpPos && pIo, "I've forgotten where the table is anchored");
+ OSL_ENSURE(pTmpPos && pIo, "I've forgotten where the table is anchored");
if (pTmpPos && pIo)
*pIo->pPaM->GetPoint() = *pTmpPos;
}
@@ -2858,8 +2798,7 @@ bool WW8TabDesc::FindMergeGroup(short nX1, short nWidth, bool bExact,
short nGrX1;
short nGrX2;
- // --> OD 2005-02-04 #118544# - improvement: search backwards
- //for ( sal_uInt16 iGr = 0; iGr < pMergeGroups->Count(); iGr++ )
+ // improvement: search backwards
for ( short iGr = pMergeGroups->Count() - 1; iGr >= 0; --iGr )
{
// die aktuell untersuchte Gruppe
@@ -2910,7 +2849,7 @@ bool WW8TabDesc::InFirstParaInCell() const
//e.g. #i19718#
if (!pTabBox || !pTabBox->GetSttNd())
{
- ASSERT(false, "Problem with table");
+ OSL_ENSURE(false, "Problem with table");
return false;
}
@@ -2925,7 +2864,7 @@ bool WW8TabDesc::InFirstParaInCell() const
void WW8TabDesc::StartMiserableHackForUnsupportedDirection(short nWwCol)
{
- ASSERT(pActBand, "Impossible");
+ OSL_ENSURE(pActBand, "Impossible");
if (pActBand && pActBand->maDirections[nWwCol] == 3)
{
pIo->pCtrlStck->NewAttr(*pIo->pPaM->GetPoint(),
@@ -2935,20 +2874,20 @@ void WW8TabDesc::StartMiserableHackForUnsupportedDirection(short nWwCol)
void WW8TabDesc::EndMiserableHackForUnsupportedDirection(short nWwCol)
{
- ASSERT(pActBand, "Impossible");
+ OSL_ENSURE(pActBand, "Impossible");
if (pActBand && pActBand->maDirections[nWwCol] == 3)
pIo->pCtrlStck->SetAttr(*pIo->pPaM->GetPoint(), RES_CHRATR_ROTATE);
}
bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam)
{
- ASSERT( pActBand, "pActBand ist 0" );
+ OSL_ENSURE( pActBand, "pActBand ist 0" );
sal_uInt16 nCol = pActBand->nTransCell[nWwCol];
if ((sal_uInt16)nAktRow >= pTabLines->Count())
{
- ASSERT(!this, "Actual row bigger than expected." );
+ OSL_ENSURE(!this, "Actual row bigger than expected." );
if (bPam)
MoveOutsideTable();
return false;
@@ -2983,7 +2922,7 @@ bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam)
pTabBox = (*pTabBoxes)[nCol];
if( !pTabBox->GetSttNd() )
{
- ASSERT(pTabBox->GetSttNd(), "Probleme beim Aufbau der Tabelle");
+ OSL_ENSURE(pTabBox->GetSttNd(), "Probleme beim Aufbau der Tabelle");
if (bPam)
MoveOutsideTable();
return false;
@@ -3150,11 +3089,9 @@ SvxFrameDirection MakeDirection(sal_uInt16 nCode, sal_Bool bIsBiDi)
switch (nCode)
{
default:
- ASSERT(eDir == 4, "unknown direction code, maybe its a bitfield");
+ OSL_ENSURE(eDir == 4, "unknown direction code, maybe its a bitfield");
case 3:
- // --> FME/Alan Yaniger: 2006-09-15 #i38158# Consider RTL tables:
- eDir = bIsBiDi ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP;
- // <--
+ eDir = bIsBiDi ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP; // #i38158# - Consider RTL tables
break;
case 5:
eDir = FRMDIR_VERT_TOP_RIGHT;
@@ -3163,9 +3100,7 @@ SvxFrameDirection MakeDirection(sal_uInt16 nCode, sal_Bool bIsBiDi)
eDir = FRMDIR_VERT_TOP_RIGHT;
break;
case 4:
- // --> FME/Alan Yaniger: 2006-09-15 #i38158# Consider RTL tables:
- eDir = bIsBiDi ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP;
- // <--
+ eDir = bIsBiDi ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP; // #i38158# - Consider RTL tables
break;
}
return eDir;
@@ -3213,8 +3148,8 @@ void WW8TabDesc::AdjustNewBand()
InsertCells( pActBand->nSwCols - nDefaultSwCols );
SetPamInCell( 0, false);
- ASSERT( pTabBoxes && pTabBoxes->Count() == (sal_uInt16)pActBand->nSwCols,
- "Falsche Spaltenzahl in Tabelle" )
+ OSL_ENSURE( pTabBoxes && pTabBoxes->Count() == (sal_uInt16)pActBand->nSwCols,
+ "Falsche Spaltenzahl in Tabelle" );
if( bClaimLineFmt )
{
@@ -3347,7 +3282,7 @@ void WW8TabDesc::TableCellEnd()
nAktCol = 0;
nAktRow++;
nAktBandRow++;
- ASSERT( pActBand , "pActBand ist 0" );
+ OSL_ENSURE( pActBand , "pActBand ist 0" );
if( pActBand )
{
if( nAktRow >= nRows ) // am Tabellenende gibt's nichts sinnvolles
@@ -3358,7 +3293,7 @@ void WW8TabDesc::TableCellEnd()
{ // neues Band noetig ?
pActBand = pActBand->pNextBand; //
nAktBandRow = 0;
- ASSERT( pActBand, "pActBand ist 0" );
+ OSL_ENSURE( pActBand, "pActBand ist 0" );
AdjustNewBand();
}
else
@@ -3390,8 +3325,7 @@ SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell,
SwTableBox* pResult = 0;
// pruefen, ob die Box zu mergen ist
- // --> OD 2005-02-04 #118544# - If cell is the first one to be merged,
- // a new merge group has to be provided.
+ // If cell is the first one to be merged, a new merge group has to be provided.
// E.g., it could be that a cell is the first one to be merged, but no
// new merge group is provided, because the potential other cell to be merged
// doesn't exist - see method <WW8TabDesc::MergeCells>.
@@ -3472,11 +3406,11 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
if (pTableDesc)
maTableStack.push(pTableDesc);
- // --> OD 2005-01-27 #i33818# - determine absolute position object attributes,
+ // #i33818# - determine absolute position object attributes,
// if possible. It's needed for nested tables.
WW8FlyPara* pTableWFlyPara( 0L );
WW8SwFlyPara* pTableSFlyPara( 0L );
- // --> OD 2005-03-21 #i45301# - anchor nested table inside Writer fly frame
+ // #i45301# - anchor nested table inside Writer fly frame
// only at-character, if absolute position object attributes are available.
// Thus, default anchor type is as-character anchored.
RndStdIds eAnchor( FLY_AS_CHAR );
@@ -3501,18 +3435,15 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
pTableWFlyPara = ConstructApo( aApo, pNestedTabPos );
if ( pTableWFlyPara )
{
- // --> OD 2007-07-03 #148498#
// <WW8SwFlyPara> constructor has changed - new 4th parameter
// containing WW8 page top margin.
pTableSFlyPara = new WW8SwFlyPara(*pPaM, *this, *pTableWFlyPara,
maSectionManager.GetWWPageTopMargin(),
maSectionManager.GetPageLeft(), maSectionManager.GetTextAreaWidth(),
nIniFlyDx, nIniFlyDy);
- // <--
- // --> OD 2005-03-21 #i45301# - anchor nested table Writer fly
- // frame at-character
+
+ // #i45301# - anchor nested table Writer fly frame at-character
eAnchor = FLY_AT_CHAR;
- // <--
}
}
}
@@ -3525,7 +3456,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
int nNewInTable = nInTable + 1;
if (InEqualApo(nNewInTable))
{
- ASSERT(pSFlyPara->pFlyFmt,
+ OSL_ENSURE(pSFlyPara->pFlyFmt,
"how could we be in a local apo and have no apo");
}
@@ -3535,15 +3466,14 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
pTableDesc->pParentPos = new SwPosition(*pPaM->GetPoint());
SfxItemSet aItemSet(rDoc.GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END-1);
- // --> OD 2005-01-26 #i33818# - anchor the Writer fly frame for
- // the nested table at-character.
- // --> OD 2005-03-21 #i45301#
+ // #i33818# - anchor the Writer fly frame for the nested table at-character.
+ // #i45301#
SwFmtAnchor aAnchor( eAnchor );
aAnchor.SetAnchor( pTableDesc->pParentPos );
aItemSet.Put( aAnchor );
pTableDesc->pFlyFmt = rDoc.MakeFlySection( eAnchor,
pTableDesc->pParentPos, &aItemSet);
- ASSERT( pTableDesc->pFlyFmt->GetAnchor().GetAnchorId() == eAnchor,
+ OSL_ENSURE( pTableDesc->pFlyFmt->GetAnchor().GetAnchorId() == eAnchor,
"Not the anchor type requested!" );
// <--
MoveInsideFly(pTableDesc->pFlyFmt);
@@ -3552,9 +3482,8 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
if (pTableDesc->pFlyFmt)
{
pTableDesc->SetSizePosition(pTableDesc->pFlyFmt);
- // --> OD 2005-01-26 #i33818# - Use absolute position object
- // attributes, if existing, and apply them to the created Writer fly
- // frame.
+ // #i33818# - Use absolute position object attributes,
+ // if existing, and apply them to the created Writer fly frame.
if ( pTableWFlyPara && pTableSFlyPara )
{
WW8FlySet aFlySet( *this, pTableWFlyPara, pTableSFlyPara, false );
@@ -3571,7 +3500,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
pTableDesc->pFlyFmt->SetFmtAttr( SwFmtSurround( SURROUND_NONE ) );
}
// <--
- // --> OD 2005-01-27 #i33818# - The nested table doesn't have to leave
+ // #i33818# - The nested table doesn't have to leave
// the table cell. Thus, the Writer fly frame has to follow the text flow.
pTableDesc->pFlyFmt->SetFmtAttr( SwFmtFollowTextFlow( sal_True ) );
// <--
@@ -3583,7 +3512,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
else
PopTableDesc();
- // --> OD 2005-01-28 #i33818#
+ // #i33818#
delete pTableWFlyPara;
delete pTableSFlyPara;
// <--
@@ -3639,22 +3568,8 @@ bool lcl_PamContainsFly(SwPaM & rPam)
void SwWW8ImplReader::TabCellEnd()
{
if (nInTable && pTableDesc)
- {
pTableDesc->TableCellEnd();
- if (bReadTable
- && pWFlyPara == NULL
- && mpTableEndPaM.get() != NULL
- && (! SwPaM::Overlap(*pPaM, *mpTableEndPaM))
- && SwPaM::LessThan(*mpTableEndPaM, *pPaM)
- && mpTableEndPaM->GetPoint()->nNode.GetNode().IsTxtNode()
- && !lcl_PamContainsFly(*mpTableEndPaM)
- )
- {
- rDoc.DelFullPara(*mpTableEndPaM);
- }
- }
-
bFirstPara = true; // We have come to the end of a cell so FirstPara flag
bReadTable = false;
mpTableEndPaM.reset();
@@ -3693,7 +3608,7 @@ void SwWW8ImplReader::StopTable()
{
maTracer.LeaveEnvironment(sw::log::eTable);
- ASSERT(pTableDesc, "Panic, stop table with no table!");
+ OSL_ENSURE(pTableDesc, "Panic, stop table with no table!");
if (!pTableDesc)
return;
@@ -3711,13 +3626,11 @@ void SwWW8ImplReader::StopTable()
}
bReadTable = true;
- // --> OD 2009-04-16 #i101116#
- // Keep PaM on table end only for nested tables
+ // #i101116# - Keep PaM on table end only for nested tables
if ( nInTable > 1 )
{
mpTableEndPaM.reset(new SwPaM(*pPaM));
}
- // <--
}
// GetTableLeft() wird fuer absatzgebundene Grafikobjekte in Tabellen
@@ -3931,32 +3844,17 @@ WW8RStyle::WW8RStyle(WW8Fib& _rFib, SwWW8ImplReader* pI)
void WW8RStyle::Set1StyleDefaults()
{
+ // see #i25247#, #i25561#, #i48064#, #i92341# for default font
if (!bCJKFontChanged) // Style no CJK Font? set the default
- pIo->SetNewFontAttr(ftcStandardChpCJKStsh, true, RES_CHRATR_CJK_FONT);
-
- // see i25247
- const WW8_FFN* pF = pIo->pFonts->GetFont(3);
- if (pF)
- {
- rtl_TextEncoding eEnc = WW8Fib::GetFIBCharset(pF->chs);
- if ((ftcStandardChpCTLStsh == 0) && (eEnc == RTL_TEXTENCODING_MS_1255))
- ftcStandardChpCTLStsh = 3;
- }
-
- if (ftcStandardChpCJKStsh == 0)
- ftcStandardChpCJKStsh = 2;
+ pIo->SetNewFontAttr(ftcFE, true, RES_CHRATR_CJK_FONT);
if (!bCTLFontChanged) // Style no CTL Font? set the default
- pIo->SetNewFontAttr(ftcStandardChpCTLStsh, true, RES_CHRATR_CTL_FONT);
+ pIo->SetNewFontAttr(ftcBi, true, RES_CHRATR_CTL_FONT);
- //#88976# western 2nd to make western charset conversion the default
+ // western 2nd to make western charset conversion the default
if (!bFontChanged) // Style has no Font? set the default,
{
- pIo->SetNewFontAttr(ftcStandardChpStsh, true, RES_CHRATR_FONT);
- /* removed by a patch from cmc for #i52786#
- if (pIo->bVer67)
- SetStyleCharSet(pIo->pCollA[pIo->nAktColl]);
- */
+ pIo->SetNewFontAttr(ftcAsci, true, RES_CHRATR_FONT);
}
if( !pIo->bNoAttrImport )
@@ -4021,9 +3919,7 @@ bool WW8RStyle::PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisSty
{
if (bStyExist)
{
- // --> OD 2007-01-25 #i73790# - method renamed
- pColl->ResetAllFmtAttr();
- // <--
+ pColl->ResetAllFmtAttr(); // #i73790# - method renamed
}
pColl->SetAuto(false); // nach Empfehlung JP
} // macht die UI aber anders
@@ -4199,10 +4095,6 @@ void WW8RStyle::PostProcessStyles()
void WW8RStyle::ScanStyles() // untersucht Style-Abhaengigkeiten
{ // und ermittelt die Filepos fuer jeden Style
- /*
- WW8_FC nStyleStart = rFib.fcStshf;
- pStStrm->Seek( nStyleStart );
- */
for (sal_uInt16 i = 0; i < cstd; ++i)
{
short nSkip;
@@ -4286,7 +4178,6 @@ std::vector<sal_uInt8> ChpxToSprms(const Word2CHPX &rChpx)
SVBT16 a;
ShortToSVBT16(rChpx.hps, a);
aRet.push_back(a[0]);
-// aRet.push_back(a[1]);
}
if (rChpx.fsPos)
@@ -4750,4 +4641,4 @@ CharSet SwWW8StyInf::GetCJKCharSet() const
return eCJKFontSrcCharSet;
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx
index bba1310a24dc..5e3e2a8cff10 100644
--- a/sw/source/filter/ww8/ww8par2.hxx
+++ b/sw/source/filter/ww8/ww8par2.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,25 +25,18 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#ifndef _WW8PAR2_HXX
#define _WW8PAR2_HXX
-#ifndef SWTYPES_HXX
#include <swtypes.hxx> // enum RndStdIds
-#endif
#include <fmtfsize.hxx>
#include <fmtornt.hxx>
#include <fmtsrnd.hxx>
#include <editeng/lrspitem.hxx>
-#ifndef WW8SCAN_HXX
#include "ww8scan.hxx" // class WW8Style
-#endif
-#ifndef WW8PAR_HXX
#include "ww8par.hxx" // WW8_BRC5
-#endif
class WW8RStyle;
@@ -114,7 +108,6 @@ struct WW8SwFlyPara
bool bAutoWidth;
bool bToggelPos;
- // --> OD 2007-07-03 #148498#
// add parameter <nWWPgTop> - WW8's page top margin
WW8SwFlyPara( SwPaM& rPaM,
SwWW8ImplReader& rIo,
@@ -292,4 +285,4 @@ enum WW8LvlType {WW8_None, WW8_Outline, WW8_Numbering, WW8_Sequence, WW8_Pause};
WW8LvlType GetNumType(sal_uInt8 nWwLevelNo);
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index bcf4e1efbc9a..fd5edc4358b2 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,8 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
#include <svl/itemiter.hxx>
#include <vcl/svapp.hxx>
@@ -74,7 +73,6 @@
#include <editeng/udlnitem.hxx>
#include <editeng/postitem.hxx>
#include <filter/msfilter/msocximex.hxx>
-#include <errhdl.hxx>
#include <unotextrange.hxx>
#include <doc.hxx>
#include <docary.hxx>
@@ -97,7 +95,6 @@
#include <xmloff/odffields.hxx>
#include <stdio.h>
-#include <algorithm>
using namespace com::sun::star;
using namespace sw::util;
@@ -125,7 +122,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
ImportFormulaControl(aFormula,pF->nSCode+pF->nLCode-1, WW8_CT_EDIT);
}
- /* #80205#
+ /*
Here we have a small complication. This formula control contains
the default text that is displayed if you edit the form field in
the "default text" area. But MSOffice does not display that
@@ -142,13 +139,6 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
if (!bUseEnhFields) {
aFormula.sDefault = GetFieldResult(pF);
-#if 0 // why not? (flr)
- //substituting Unicode spacing 0x2002 with double space for layout
- aFormula.sDefault.SearchAndReplaceAll(
- String(static_cast< sal_Unicode >(0x2002)),
- CREATE_CONST_ASC(" "));
-#endif
-
SwInputField aFld((SwInputFieldType*)rDoc.GetSysFldType( RES_INPUTFLD ),
aFormula.sDefault , aFormula.sTitle , INP_TXT, 0 );
aFld.SetHelp(aFormula.sHelp);
@@ -181,9 +171,9 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
if (aBookmarkName.Len()>0) {
maFieldStack.back().SetBookmarkName(aBookmarkName);
- maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_FORMTEXT));
- maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Description")] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
- maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Name")] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
+ maFieldStack.back().SetBookmarkType(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMTEXT)));
+ maFieldStack.back().getParameters()[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Description"))] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
+ maFieldStack.back().getParameters()[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"))] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
}
return FLD_TEXT;
}
@@ -231,13 +221,14 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr )
IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( );
IFieldmark* pFieldmark = dynamic_cast<IFieldmark*>( pMarksAccess->makeNoTextFieldBookmark(
*pPaM, aBookmarkName,
- rtl::OUString::createFromAscii( ODF_FORMCHECKBOX ) ) );
- ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_FORMCHECKBOX )) ) );
+ OSL_ENSURE(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
if (pFieldmark!=NULL) {
IFieldmark::parameter_map_t* const pParameters = pFieldmark->GetParameters();
ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(pFieldmark);
- (*pParameters)[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_NAME)] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
- (*pParameters)[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_HELPTEXT)] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
+ (*pParameters)[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMCHECKBOX_NAME))] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
+ (*pParameters)[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMCHECKBOX_HELPTEXT))] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
+
if(pCheckboxFm)
pCheckboxFm->SetChecked(aFormula.nChecked);
// set field data here...
@@ -304,15 +295,15 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr)
IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( );
IFieldmark *pFieldmark = dynamic_cast<IFieldmark*>(
pMarksAccess->makeNoTextFieldBookmark( *pPaM, aBookmarkName,
- ::rtl::OUString::createFromAscii( ODF_FORMDROPDOWN ) ) );
- ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_FORMDROPDOWN )) ) );
+ OSL_ENSURE(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
if ( pFieldmark != NULL )
{
uno::Sequence< ::rtl::OUString > vListEntries(aFormula.maListEntries.size());
::std::copy(aFormula.maListEntries.begin(), aFormula.maListEntries.end(), ::comphelper::stl_begin(vListEntries));
- (*pFieldmark->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY)] = uno::makeAny(vListEntries);
+ (*pFieldmark->GetParameters())[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_LISTENTRY))] = uno::makeAny(vListEntries);
sal_Int32 nIndex = aFormula.fDropdownIndex < aFormula.maListEntries.size() ? aFormula.fDropdownIndex : 0;
- (*pFieldmark->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_RESULT)] = uno::makeAny(nIndex);
+ (*pFieldmark->GetParameters())[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_RESULT))] = uno::makeAny(nIndex);
// set field data here...
}
}
@@ -321,6 +312,14 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr)
}
}
+eF_ResT SwWW8ImplReader::Read_F_HTMLControl(WW8FieldDesc*, String&)
+{
+ if( bObj && nPicLocFc )
+ nObjLocFc = nPicLocFc;
+ bEmbeddObj = true;
+ return FLD_TEXT;
+}
+
void SwWW8ImplReader::DeleteFormImpl()
{
delete pFormImpl, pFormImpl = 0;
@@ -472,17 +471,17 @@ sal_uInt8* WW8ListManager::GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms,
sal_uInt8 nLen)
{
sal_uInt8* pSprms = &rSprms;
- sal_uInt16 i=0;
- while (i < nLen)
+ sal_uInt16 nRemLen=nLen;
+ while (nRemLen > (maSprmParser.getVersion()?1:0))
{
sal_uInt16 nAktId = maSprmParser.GetSprmId(pSprms);
if( nAktId == nId ) // Sprm found
return pSprms + maSprmParser.DistanceToData(nId);
// gib Zeiger auf Daten
- sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSprms);
- i = i + x;
- pSprms += x;
+ sal_uInt16 nSize = maSprmParser.GetSprmSize(nAktId, pSprms);
+ pSprms += nSize;
+ nRemLen -= nSize;
}
return 0; // Sprm not found
}
@@ -525,8 +524,8 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
std::deque<bool> &rNotReallyThere, sal_uInt16 nLevel,
ww::bytes &rParaSprms)
{
- sal_uInt8 aBits1;
- sal_uInt16 nStartNo = 0; // Start-Nr. fuer den Writer
+ sal_uInt8 aBits1(0);
+ sal_uInt16 nStartNo(0); // Start-Nr. fuer den Writer
SvxExtNumType eType; // Writer-Num-Typ
SvxAdjust eAdj; // Ausrichtung (Links/rechts/zent.)
sal_Unicode cBullet(0x2190); // default safe bullet
@@ -560,7 +559,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
if( !bLVLOkB )
return false;
- sal_uInt8 ixchFollow;
+ sal_uInt8 ixchFollow(0);
rSt >> ixchFollow;
if (ixchFollow == 0)
rReader.maTracer.Log(sw::log::eTabInNumbering);
@@ -574,9 +573,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
//
// 2. ggfs. PAPx einlesen und nach Einzug-Werten suchen
//
- // --> OD 2008-06-04 #i86652# - read tab setting
- short nTabPos = 0;
- // <--
+ short nTabPos = 0; // #i86652# - read tab setting
if( aLVL.nLenGrpprlPapx )
{
sal_uInt8 aGrpprlPapx[ 255 ];
@@ -609,7 +606,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
aLVL.nDxaLeft1 = SVBT16ToShort( pSprm );
}
- // --> OD 2008-06-04 #i86652# - read tab setting
+ // #i86652# - read tab setting
if(0 != (pSprm = GrpprlHasSprm(0xC615,aGrpprlPapx[0],aLVL.nLenGrpprlPapx)) )
{
bool bDone = false;
@@ -628,8 +625,9 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
}
}
}
- ASSERT(bDone, "tab setting in numbering is "
+ OSL_ENSURE(bDone, "tab setting in numbering is "
"of unexpected configuration");
+ (void)bDone;
}
if ( rNumFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -745,7 +743,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
eType = SVX_NUM_ARABIC;
break;
case 23:
- case 25: //#114412#
+ case 25:
eType = SVX_NUM_CHAR_SPECIAL;
break;
case 255:
@@ -785,7 +783,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
}
myIter aIter = std::remove(aOfsNumsXCH.begin(), aOfsNumsXCH.end(), 0);
myIter aEnd = aOfsNumsXCH.end();
- // --> OD 2006-01-16 #i60633# - suppress access on <aOfsNumsXCH.end()>
+ // #i60633# - suppress access on <aOfsNumsXCH.end()>
if ( aIter != aEnd )
{
// Somehow the first removed vector element, at which <aIter>
@@ -824,7 +822,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
else
{
/*
- #83154#, #82192#, #i173#, #109158#
+ #i173#
Our aOfsNumsXCH seems generally to be an array that contains the
offset into sNumString of locations where the numbers should be
filled in, so if the first "fill in a number" slot is greater than
@@ -872,7 +870,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
break;
default:
// undefied value
- ASSERT( !this, "Value of aLVL.nAlign is not supported" );
+ OSL_ENSURE( !this, "Value of aLVL.nAlign is not supported" );
// take default
eAdj = SVX_ADJUST_LEFT;
break;
@@ -901,7 +899,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
rNumFmt.SetIncludeUpperLevels( nUpperLevel );
}
- // --> OD 2008-06-04 #i89181#
+ // #i89181#
if ( rNumFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -1032,10 +1030,7 @@ void WW8ListManager::AdjustLVL( sal_uInt8 nLevel, SwNumRule& rNumRule,
Font aFont;
if( !pFmt )
{
- // --> OD 2006-06-27 #b6440955#
-// aFont = SwNumRule::GetDefBulletFont();
aFont = numfunc::GetDefBulletFont();
- // <--
}
else
{
@@ -1059,8 +1054,7 @@ SwNumRule* WW8ListManager::CreateNextRule(bool bSimple)
// wird erstmal zur Bildung des Style Namens genommen
String sPrefix(CREATE_CONST_ASC("WW8Num"));
sPrefix += String::CreateFromInt32(nUniqueList++);
- // --> OD 2008-06-04 #i86652#
-// sal_uInt16 nRul = rDoc.MakeNumRule(rDoc.GetUniqueNumRuleName(&sPrefix));
+ // #i86652#
sal_uInt16 nRul =
rDoc.MakeNumRule( rDoc.GetUniqueNumRuleName(&sPrefix), 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT );
@@ -1285,13 +1279,13 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
if( pLFOInfo->bOverride )
{
WW8LSTInfo* pParentListInfo = GetLSTByListId(pLFOInfo->nIdLst);
- if (!pParentListInfo) //e.g. #112324#
+ if (!pParentListInfo)
break;
//
// 2.2.1 eine neue NumRule fuer diese Liste anlegen
//
SwNumRule* pParentNumRule = pLFOInfo->pNumRule;
- ASSERT(pParentNumRule, "ww: Impossible lists, please report");
+ OSL_ENSURE(pParentNumRule, "ww: Impossible lists, please report");
if( !pParentNumRule )
break;
// Nauemsprefix aufbauen: fuer NumRule-Name (eventuell)
@@ -1517,10 +1511,9 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
return 0;
// #i25545#
- // --> OD 2009-03-12 #i100132# - a number format does not have to exist on given list level
-// SwNumFmt pFmt(*(pLFOInfo->pNumRule->GetNumFmt(nLevel)));
+ // #i100132# - a number format does not have to exist on given list level
SwNumFmt pFmt(pLFOInfo->pNumRule->Get(nLevel));
- // <--
+
if (rReader.IsRightToLeft() && nLastLFOPosition != nLFOPosition) {
if ( pFmt.GetNumAdjust() == SVX_ADJUST_RIGHT)
pFmt.SetNumAdjust(SVX_ADJUST_LEFT);
@@ -1569,7 +1562,7 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
if (pLFOInfo->bOverride && nLevel < pLFOInfo->nLfoLvl)
{
WW8LSTInfo* pParentListInfo = GetLSTByListId(pLFOInfo->nIdLst);
- ASSERT(pParentListInfo, "ww: Impossible lists, please report");
+ OSL_ENSURE(pParentListInfo, "ww: Impossible lists, please report");
if (pParentListInfo && pParentListInfo->pNumRule)
{
const WW8LFOLVL &rOverride = pLFOInfo->maOverrides[nLevel];
@@ -1613,7 +1606,7 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
{
pNode->SetAttrListLevel(nLevel);
- if (bRestart || bNewstart) //#112466# (I think)
+ if (bRestart || bNewstart)
pNode->SetListRestart(true);
if (bNewstart)
pNode->SetAttrListRestartValue(nStart);
@@ -1633,8 +1626,8 @@ bool SwWW8ImplReader::SetTxtFmtCollAndListLevel(const SwPaM& rRg,
bRes = rDoc.SetTxtFmtColl(rRg, (SwTxtFmtColl*)rStyleInfo.pFmt)
? true : false;
SwTxtNode* pTxtNode = pPaM->GetNode()->GetTxtNode();
- ASSERT( pTxtNode, "No Text-Node at PaM-Position" );
- // --> OD 2006-10-19 #134160# - make code robust
+ OSL_ENSURE( pTxtNode, "No Text-Node at PaM-Position" );
+ // make code robust
if ( !pTxtNode )
{
return bRes;
@@ -1660,16 +1653,12 @@ bool SwWW8ImplReader::SetTxtFmtCollAndListLevel(const SwPaM& rRg,
}
else
{
- // --> OD 2005-11-07 #127520#
// Use outline level set at the style info <rStyleInfo> instead of
// the outline level at the text format, because the WW8 document
// could contain more than one outline numbering rule and the one
// of the text format isn't the one, which a chosen as the Writer
// outline rule.
-// pTxtNode->
-// SetLevel(((SwTxtFmtColl*) rStyleInfo.pFmt)->GetOutlineLevel());
pTxtNode->SetAttrListLevel( rStyleInfo.nOutlineLevel );
- // <--
}
}
return bRes;
@@ -1677,7 +1666,7 @@ bool SwWW8ImplReader::SetTxtFmtCollAndListLevel(const SwPaM& rRg,
void UseListIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt)
{
- // --> OD 2008-06-03 #i86652#
+ // #i86652#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
const long nAbsLSpace = rFmt.GetAbsLSpace();
@@ -1693,17 +1682,13 @@ void UseListIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt)
void SetStyleIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt)
{
- // --> OD 2008-06-03 #i86652#
- if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
- // <--
+ if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) // #i86652#
{
SvxLRSpaceItem aLR(ItemGet<SvxLRSpaceItem>(*rStyle.pFmt, RES_LR_SPACE));
if (rStyle.bListReleventIndentSet)
{
- // --> OD 2010-05-06 #i103711#
- // --> OD 2010-05-11 #i105414#
- SyncIndentWithList( aLR, rFmt, false, false );
- // <--
+
+ SyncIndentWithList( aLR, rFmt, false, false ); // #i103711#, #i105414#
}
else
{
@@ -1720,7 +1705,7 @@ void SwWW8ImplReader::SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO,
SwWW8StyInf &rStyleInf = pCollA[nStyle];
if (rStyleInf.bValid)
{
- ASSERT(pAktColl, "Cannot be called outside of style import");
+ OSL_ENSURE(pAktColl, "Cannot be called outside of style import");
// Phase 1: Nummerierungsattribute beim Einlesen einer StyleDef
if( pAktColl )
{
@@ -1803,7 +1788,7 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
{
std::vector<sal_uInt8> aParaSprms;
SwTxtNode* pTxtNd = pPaM->GetNode()->GetTxtNode();
- ASSERT(pTxtNd, "Kein Text-Node an PaM-Position");
+ OSL_ENSURE(pTxtNd, "Kein Text-Node an PaM-Position");
const SwNumRule* pRule = bSetAttr ?
pLstManager->GetNumRuleForActivation( nActLFO, nActLevel,
@@ -1821,8 +1806,7 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
is the one that was chosen to be the outline numbering then all
is unchanged
*/
- // --> OD 2005-11-04 #???# - correct condition according to the
- // above given comment.
+ // correct condition according to the above given comment.
if ( pTxtNd->GetNumRule() == rDoc.GetOutlineNumRule() &&
pRule == mpChosenOutlineNumRule )
// <--
@@ -1844,23 +1828,16 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
}
}
}
- // --> OD 2005-10-17 #126238#
- // - re-introduce fix for issue #i49037#, which got lost by
- // accident on a re-synchronisation on the master.
-// if (pTxtNd->IsOutline() && pTxtNd->Len() == 0)
-// pTxtNd->SetCounted(false);
- // <--
-
pTxtNd->SetAttrListLevel(nActLevel);
- // --> OD 2005-11-01 #126924#
- // - <IsCounted()> state of text node has to be adjusted accordingly.
+
+ // <IsCounted()> state of text node has to be adjusted accordingly.
if ( /*nActLevel >= 0 &&*/ nActLevel < MAXLEVEL )
{
pTxtNd->SetCountedInList( true );
}
// <--
- // --> OD 2009-03-04 #i99822#
+ // #i99822#
// Direct application of the list level formatting no longer
// needed for list levels of mode LABEL_ALIGNMENT
bool bApplyListLevelIndentDirectlyAtPara( true );
@@ -1880,7 +1857,7 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
RES_LR_SPACE);
const SvxLRSpaceItem *pItem = (const SvxLRSpaceItem*)(
GetFmtAttr(RES_LR_SPACE));
- ASSERT(pItem, "impossible");
+ OSL_ENSURE(pItem, "impossible");
if (pItem)
aListIndent.Put(*pItem);
@@ -1907,7 +1884,7 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
const SvxLRSpaceItem *pLR =
HasItem<SvxLRSpaceItem>(aListIndent, RES_LR_SPACE);
- ASSERT(pLR, "Impossible");
+ OSL_ENSURE(pLR, "Impossible");
if (pLR)
{
pCtrlStck->NewAttr(*pPaM->GetPoint(), *pLR);
@@ -1951,7 +1928,6 @@ void SwWW8ImplReader::Read_ListLevel(sal_uInt16, const sal_uInt8* pData,
if (pStyles && !bVer67)
{
/*
- #94672#
if this is the case, then if the numbering is actually stored in
winword 6 format, and its likely that sprmPIlvl has been abused
to set the ww6 list level information which we will need when we
@@ -1996,7 +1972,6 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
if( 0 >= nData )
{
/*
- #94672# discussion
If you have a paragraph in word with left and/or hanging indent
and remove its numbering, then the indentation appears to get
reset, but not back to the base style, instead its goes to a blank
@@ -2009,17 +1984,11 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
if (pAktColl)
{
pAktColl->SetFmtAttr(*GetDfltAttr( RES_PARATR_NUMRULE));
- pAktColl->SetFmtAttr(SvxLRSpaceItem(RES_LR_SPACE)); //#94672#
+ pAktColl->SetFmtAttr(SvxLRSpaceItem(RES_LR_SPACE));
}
else if (SwTxtNode* pTxtNode = pPaM->GetNode()->GetTxtNode())
{
- // --> OD 2005-10-21 #i54393#
- // - Reset hard set numbering rule at paragraph instead of
- // setting hard no numbering.
-// pTxtNode->SwCntntNode::SetAttr
-// (*GetDfltAttr(RES_PARATR_NUMRULE));
- pTxtNode->ResetAttr( RES_PARATR_NUMRULE );
- // <--
+ pTxtNode->ResetAttr( RES_PARATR_NUMRULE ); // #i54393#
pTxtNode->SetCountedInList(false);
/*
@@ -2029,14 +1998,13 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
numbering, and then I can say when I come to say that I want no
number on the normal numbering rule, that should all work out
- #115901#
No special outline number in textnode any more
*/
if (pTxtNode->IsOutline())
{
- // OD 2005-10-21 #i54393#
+ // #i54393#
// It's not needed to call <SetCounted( false )> again - see above.
- // --> OD 2005-10-21 #i54393#
+ // #i54393#
// Assure that the numbering rule, which is retrieved at
// the paragraph is the outline numbering rule, instead of
// incorrectly setting the chosen outline rule.
@@ -2050,7 +2018,6 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
// <--
}
- //#94672#
pCtrlStck->NewAttr(*pPaM->GetPoint(), SvxLRSpaceItem(RES_LR_SPACE));
pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_LR_SPACE);
}
@@ -2060,7 +2027,6 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
{
nLFOPosition = (sal_uInt16)nData-1;
/*
- #94672#
If we are a ww8+ style with ww7- style lists then there is a
bizarre broken word bug where when the list is removed from a para
the ww6 list first line indent still affects the first line
@@ -2222,13 +2188,19 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
nChecked = true;
break;
case 25: //undefined, Undefined checkboxes are treated as unchecked
+ //but it appear that both visually and the value are picked up from the default in that case
+ break;
case 0: //unchecked
nChecked = false;
break;
default:
- ASSERT(!this, "unknown option, please report to cmc");
+ OSL_ENSURE(!this, "unknown option, please report to cmc");
break;
}
+ if ( nDefaultChecked )
+ sDefault = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("1") );
+ else
+ sDefault = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("0") );
}
else if (nWhich == WW8_CT_DROPDOWN)
*pDataStream >> nChecked;
@@ -2287,7 +2259,7 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
bAllOk = false;
*pDataStream >> nNoStrings;
}
- ASSERT(bAllOk,
+ OSL_ENSURE(bAllOk,
"Unknown formfield dropdown list structure. Report to cmc");
if (!bAllOk) //Not as expected, don't risk it at all.
nNoStrings = 0;
@@ -2338,7 +2310,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const String &rString,
{
bool bSet = true;
const SfxPoolItem* pItem = GetFmtAttr( pMap->nWhichId );
- ASSERT(pItem, "Impossible");
+ OSL_ENSURE(pItem, "Impossible");
if (!pItem)
continue;
@@ -2426,12 +2398,12 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const String &rString,
break;
}
- if (bSet && xPropSetInfo->hasPropertyByName(C2U(pMap->pPropNm)))
- rPropSet->setPropertyValue(C2U(pMap->pPropNm), aTmp);
+ if (bSet && xPropSetInfo->hasPropertyByName(rtl::OUString::createFromAscii(pMap->pPropNm)))
+ rPropSet->setPropertyValue(rtl::OUString::createFromAscii(pMap->pPropNm), aTmp);
}
// now calculate the size of the control
OutputDevice* pOut = Application::GetDefaultDevice();
- ASSERT(pOut, "Impossible");
+ OSL_ENSURE(pOut, "Impossible");
if (pOut)
{
pOut->Push( PUSH_FONT | PUSH_MAPMODE );
@@ -2638,7 +2610,4 @@ sal_Bool SwMSConvertControls::InsertControl(
return sal_True;
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index d6779fd360ac..cd91a87d1f08 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <doc.hxx>
#include "writerhelper.hxx"
#include <com/sun/star/embed/XClassifiedObject.hpp>
@@ -75,7 +75,6 @@ struct OLE_MFP
using namespace ::com::sun::star;
-// SV_IMPL_OP_PTRARR_SORT(WW8AuthorInfos, WW8AuthorInfo_Ptr)
SV_IMPL_OP_PTRARR_SORT(WW8OleMaps, WW8OleMap_Ptr)
static bool SwWw8ReadScaling(long& rX, long& rY, SvStorageRef& rSrc1)
@@ -99,7 +98,7 @@ static bool SwWw8ReadScaling(long& rX, long& rY, SvStorageRef& rSrc1)
pS->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
pS->Seek( STREAM_SEEK_TO_END );
- ASSERT( pS->Tell() >= 76, "+OLE-PIC-Stream is shorter than 76 Byte" );
+ OSL_ENSURE( pS->Tell() >= 76, "+OLE-PIC-Stream is shorter than 76 Byte" );
sal_Int32 nOrgWidth,
nOrgHeight,
@@ -124,7 +123,7 @@ static bool SwWw8ReadScaling(long& rX, long& rY, SvStorageRef& rSrc1)
rY = nOrgHeight - nCropTop - nCropBottom;
if (10 > nScaleX || 65536 < nScaleX || 10 > nScaleY || 65536 < nScaleY)
{
- ASSERT( !pS, "+OLE-Scalinginformation in PIC-Stream wrong" );
+ OSL_ENSURE( !pS, "+OLE-Scalinginformation in PIC-Stream wrong" );
return false;
}
else
@@ -155,23 +154,23 @@ static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp,
if( pMfp->mm == 94 || pMfp->mm == 99 )
{
- ASSERT( !pSt, "+OLE: Falscher Metafile-Typ" );
+ OSL_ENSURE( !pSt, "+OLE: Falscher Metafile-Typ" );
return false;
}
if( pMfp->mm != 8 )
{
- ASSERT( !pSt, "+OLE: Falscher Metafile-Typ ( nicht Anisotropic )" );
+ OSL_ENSURE( !pSt, "+OLE: Falscher Metafile-Typ ( nicht Anisotropic )" );
}
if( !pMfp->xExt || !pMfp->yExt )
{
- ASSERT( !pSt, "+OLE: Groesse von 0 ???" );
+ OSL_ENSURE( !pSt, "+OLE: Groesse von 0 ???" );
return false;
}
bool bOk = ReadWindowMetafile( *pSt, rWMF, NULL ) ? true : false; // WMF lesen
// *pSt >> aWMF geht nicht ohne placable Header
if (!bOk || pSt->GetError() || rWMF.GetActionCount() == 0)
{
- ASSERT( !pSt, "+OLE: Konnte Metafile nicht lesen" );
+ OSL_ENSURE( !pSt, "+OLE: Konnte Metafile nicht lesen" );
return false;
}
@@ -204,13 +203,6 @@ static bool SwWw6ReadMacPICTStream(Graphic& rGraph, SvStorageRef& rSrc1)
pStp->Seek( STREAM_SEEK_TO_BEGIN );
-#ifdef DEBUGDUMP
- SvStream *pDbg = sw::hack::CreateDebuggingStream(CREATE_CONST_ASC(".pct"));
- pDbg->Seek(0x200); //Prepend extra 0x200 of zeros to make this a valid PICT
- sw::hack::DumpStream(*pStp, *pDbg);
- delete pDbg;
-#endif
-
// Mac-Pict steht im 03PICT-StorageStream allerdings ohne die ersten 512
// Bytes, die bei einem MAC-PICT egal sind ( werden nicht ausgewertet )
return SwWW8ImplReader::GetPictGrafFromStream(rGraph, *pStp);
@@ -220,7 +212,7 @@ SwFlyFrmFmt* SwWW8ImplReader::InsertOle(SdrOle2Obj &rObject,
const SfxItemSet &rFlySet, const SfxItemSet &rGrfSet)
{
SfxObjectShell *pPersist = rDoc.GetPersist();
- ASSERT(pPersist, "No persist, cannot insert objects correctly");
+ OSL_ENSURE(pPersist, "No persist, cannot insert objects correctly");
if (!pPersist)
return 0;
@@ -253,7 +245,7 @@ SwFlyFrmFmt* SwWW8ImplReader::InsertOle(SdrOle2Obj &rObject,
::rtl::OUString sNewName;
bool bSuccess = aOLEObj.TransferToDoc(sNewName);
- ASSERT(bSuccess, "Insert OLE failed");
+ OSL_ENSURE(bSuccess, "Insert OLE failed");
if (bSuccess)
{
const SfxItemSet *pFlySet = pMathFlySet ? pMathFlySet : &rFlySet;
@@ -357,7 +349,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
const Graphic* pGrf, const SfxItemSet* pFlySet, const Rectangle& aVisArea )
{
SdrObject* pRet = 0;
- ASSERT( pStg, "ohne storage geht hier fast gar nichts!" );
+ OSL_ENSURE( pStg, "ohne storage geht hier fast gar nichts!" );
::SetProgressState( nProgress, rDoc.GetDocShell() ); // Update
@@ -415,11 +407,11 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
{
//Can't put them in headers/footers :-(
uno::Reference< drawing::XShape > xRef;
- ASSERT(pFormImpl, "Impossible");
+ OSL_ENSURE(pFormImpl, "Impossible");
if (pFormImpl && pFormImpl->ReadOCXStream(xSrc1, &xRef, false))
{
pRet = GetSdrObjectFromXShape(xRef);
- ASSERT(pRet, "Impossible");
+ OSL_ENSURE(pRet, "Impossible");
if (pRet)
pRet->SetLogicRect(aRect);
return pRet;
@@ -508,7 +500,6 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
else
{
/*
- #101578#
It is possible to have a number of date stamps for the created time
of the change, (possibly a word bug) so we must use the "get a full
list" varient of HasCharSprm and take the last one as the true one.
@@ -578,4 +569,4 @@ void SwWW8ImplReader::Read_CPropRMark(sal_uInt16 , const sal_uInt8* pData, short
Read_CRevisionMark( nsRedlineType_t::REDLINE_FORMAT, pData, nLen );
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 4e74a64722ab..be19f7453432 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,8 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
#include <ctype.h> // tolower
#include <stdio.h> // sscanf()
@@ -36,6 +35,13 @@
#include <sal/types.h>
#include <tools/solar.h>
+#include <comphelper/storagehelper.hxx>
+#include <sot/storinfo.hxx>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/embed/ElementModes.hpp>
+#include <com/sun/star/embed/XTransactedObject.hpp>
+#include <com/sun/star/io/XStream.hpp>
+
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <svl/urihelper.hxx>
#include <svl/zforlist.hxx>
@@ -79,7 +85,6 @@
#include <fmtclds.hxx>
#include <pagedesc.hxx>
#include <SwStyleNameMapper.hxx>
-#include <IMark.hxx>
#include "ww8scan.hxx" // WW8FieldDesc
#include "ww8par.hxx"
@@ -87,6 +92,7 @@
#include "writerhelper.hxx"
#include "fields.hxx"
#include <unotools/fltrcfg.hxx>
+#include <xmloff/odffields.hxx>
#include <algorithm> // #i24377#
@@ -146,13 +152,12 @@ _ReadFieldParams::_ReadFieldParams( const String& _rData )
nFnd = nNext;
nSavPtr = nNext;
-// cLastChar = aData.GetChar( nSavPtr );
}
_ReadFieldParams::~_ReadFieldParams()
{
-// aData.SetChar( nSavPtr, cLastChar );
+
}
@@ -226,19 +231,28 @@ xub_StrLen _ReadFieldParams::FindNextStringPiece(const xub_StrLen nStart)
while( (nLen > n) && (aData.GetChar( n ) == ' ') )
++n;
+ if ( aData.GetChar( n ) == 0x13 )
+ {
+ // Skip the nested field code since it's not supported
+ while ( ( nLen > n ) && ( aData.GetChar( n ) != 0x14 ) )
+ n++;
+ }
+
if( nLen == n )
return STRING_NOTFOUND; // String End reached!
if( (aData.GetChar( n ) == '"') // Anfuehrungszeichen vor Para?
|| (aData.GetChar( n ) == 0x201c)
- || (aData.GetChar( n ) == 132) )
+ || (aData.GetChar( n ) == 132)
+ || (aData.GetChar( n ) == 0x14) )
{
n++; // Anfuehrungszeichen ueberlesen
n2 = n; // ab hier nach Ende suchen
while( (nLen > n2)
&& (aData.GetChar( n2 ) != '"')
&& (aData.GetChar( n2 ) != 0x201d)
- && (aData.GetChar( n2 ) != 147) )
+ && (aData.GetChar( n2 ) != 147)
+ && (aData.GetChar( n2 ) != 0x15) )
n2++; // Ende d. Paras suchen
}
else // keine Anfuehrungszeichen
@@ -306,7 +320,7 @@ long SwWW8ImplReader::Read_Book(WW8PLCFManResult*)
WW8PLCFx_Book* pB = pPlcxMan->GetBook();
if( !pB )
{
- ASSERT( pB, "WW8PLCFx_Book - Pointer nicht da" );
+ OSL_ENSURE( pB, "WW8PLCFx_Book - Pointer nicht da" );
return 0;
}
@@ -329,8 +343,7 @@ long SwWW8ImplReader::Read_Book(WW8PLCFManResult*)
return 0;
#endif
- //JP 16.11.98: ToUpper darf auf keinen Fall gemacht werden, weil der
- //Bookmark- name ein Hyperlink-Ziel sein kann!
+ //ToUpper darf auf keinen Fall gemacht werden, weil der Bookmark- name ein Hyperlink-Ziel sein kann!
String aVal;
if( SwFltGetFlag( nFieldFlags, SwFltControlStack::BOOK_TO_VAR_REF ) )
@@ -345,11 +358,10 @@ long SwWW8ImplReader::Read_Book(WW8PLCFManResult*)
eStructCharSet );
pStrm->Seek( nOldPos );
- // JP 19.03.2001 - now here the implementation of the old
- // "QuoteString" and I hope with a better performance
- // as before. It's also only needed if the filterflags
- // say we will convert bookmarks to SetExpFields! And
- // this the exception!
+ // now here the implementation of the old "QuoteString" and
+ // I hope with a better performance as before. It's also only
+ // needed if the filterflags say we will convert bookmarks
+ // to SetExpFields! And this the exception!
String sHex(CREATE_CONST_ASC( "\\x" ));
bool bSetAsHex;
@@ -430,7 +442,7 @@ void SwWW8ImplReader::ConvertFFileName( String& rName, const String& rOrg )
if( rName.Len() && '"' == rName.GetChar( rName.Len()-1 ))
rName.Erase( rName.Len()-1, 1);
- //#82900# Need the more sophisticated url converter. cmc
+ // Need the more sophisticated url converter. cmc
if (rName.Len())
rName = URIHelper::SmartRel2Abs(
INetURLObject(sBaseURL), rName, Link(), false);
@@ -549,7 +561,7 @@ bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, sal_uInt16 nLang)
const SvxLanguageItem *pLang =
(const SvxLanguageItem*)GetFmtAttr(RES_CHRATR_LANGUAGE);
- ASSERT(pLang, "impossible");
+ OSL_ENSURE(pLang, "impossible");
sal_uInt16 nDefault = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
if (nLang != nDefault)
@@ -574,7 +586,7 @@ String GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, sal_uInt16 nL
aFormat.ConvertLanguage(*pFormatter, nLang, LANGUAGE_ENGLISH_US);
String sParams(aFormat.GetFormatstring());
- // --> OD 2007-02-09 #i36594#
+ // #i36594#
// Fix provided by mloiseleur@openoffice.org.
// A default date can have already 4 year digits, in some case
const xub_StrLen pos = sParams.Search( CREATE_CONST_ASC("YYYY") );
@@ -598,7 +610,7 @@ short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
}
RES_CHRATR eLang = bRTL ? RES_CHRATR_CTL_LANGUAGE : RES_CHRATR_LANGUAGE;
const SvxLanguageItem *pLang = (SvxLanguageItem*)GetFmtAttr( static_cast< sal_uInt16 >(eLang));
- ASSERT(pLang, "impossible");
+ OSL_ENSURE(pLang, "impossible");
rLang = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
SvNumberFormatter* pFormatter = rDoc.GetNumberFormatter();
@@ -638,7 +650,8 @@ short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
}
sal_uLong nFmtIdx =
- sw::ms::MSDateTimeFormatToSwFormat(sParams, pFormatter, rLang, bHijri);
+ sw::ms::MSDateTimeFormatToSwFormat(sParams, pFormatter, rLang, bHijri,
+ GetFib().lid);
short nNumFmtType = NUMBERFORMAT_UNDEFINED;
if (nFmtIdx)
nNumFmtType = pFormatter->GetType(nFmtIdx);
@@ -653,10 +666,6 @@ short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
// Am Ende des Einlesens entsprechende Felder updaten ( z.Zt. die Referenzen )
void SwWW8ImplReader::UpdateFields()
{
-// rDoc.GetSysFldType( RES_GETREFFLD )->UpdateFlds(); // Referenzen
-// rDoc.UpdateFlds(); // SetExp-Fields
-// rDoc.UpdateFlds(); // alles ???
-// rDoc.UpdateExpFlds(); // SetExp-Fields
rDoc.SetUpdateExpFldStat(true); // JP: neu fuer alles wichtige
rDoc.SetInitDBFields(true); // Datenbank-Felder auch
}
@@ -665,14 +674,14 @@ sal_uInt16 SwWW8ImplReader::End_Field()
{
sal_uInt16 nRet = 0;
WW8PLCFx_FLD* pF = pPlcxMan->GetFld();
- ASSERT(pF, "WW8PLCFx_FLD - Pointer nicht da");
+ OSL_ENSURE(pF, "WW8PLCFx_FLD - Pointer nicht da");
if (!pF || !pF->EndPosIsFieldEnd())
return nRet;
const SvtFilterOptions* pOpt = SvtFilterOptions::Get();
sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields());
- ASSERT(!maFieldStack.empty(), "Empty field stack\n");
+ OSL_ENSURE(!maFieldStack.empty(), "Empty field stack\n");
if (!maFieldStack.empty())
{
/*
@@ -689,8 +698,8 @@ sal_uInt16 SwWW8ImplReader::End_Field()
SwPaM aFldPam( maFieldStack.back().GetPtNode(), maFieldStack.back().GetPtCntnt(), aEndPos.nNode, aEndPos.nContent.GetIndex());
IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( );
IFieldmark *pFieldmark = dynamic_cast<IFieldmark*>( pMarksAccess->makeFieldBookmark(
- aFldPam, maFieldStack.back().GetBookmarkName(), ::rtl::OUString::createFromAscii(ODF_FORMTEXT ) ) );
- ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
+ aFldPam, maFieldStack.back().GetBookmarkName(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMTEXT )) ) );
+ OSL_ENSURE(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
if (pFieldmark!=NULL) {
const IFieldmark::parameter_map_t& pParametersToAdd = maFieldStack.back().getParameters();
pFieldmark->GetParameters()->insert(pParametersToAdd.begin(), pParametersToAdd.end());
@@ -707,7 +716,7 @@ sal_uInt16 SwWW8ImplReader::End_Field()
SwPosition aEndPos = *pPaM->GetPoint();
SwPaM aFldPam( maFieldStack.back().GetPtNode(), maFieldStack.back().GetPtCntnt(), aEndPos.nNode, aEndPos.nContent.GetIndex());
SwFieldBookmark *pFieldmark=(SwFieldBookmark*)rDoc.makeFieldBookmark(aFldPam, maFieldStack.back().GetBookmarkName(), maFieldStack.back().GetBookmarkType());
- ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
+ OSL_ENSURE(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
if (pFieldmark!=NULL) {
const IFieldmark::parameter_map_t& pParametersToAdd = maFieldStack.back().getParameters();
pFieldmark->GetParameters()->insert(pParameters.begin(), pParameters.end());
@@ -725,6 +734,72 @@ sal_uInt16 SwWW8ImplReader::End_Field()
*pPaM->GetPoint() = maFieldStack.back().maStartPos;
break;
default:
+ rtl::OUString aCode = maFieldStack.back().GetBookmarkCode();
+ if ( aCode.getLength() > 0 )
+ {
+ // Unhandled field with stored code
+ SwPosition aEndPos = *pPaM->GetPoint();
+ SwPaM aFldPam(
+ maFieldStack.back().GetPtNode(), maFieldStack.back().GetPtCntnt(),
+ aEndPos.nNode, aEndPos.nContent.GetIndex());
+
+ IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( );
+
+ IFieldmark* pFieldmark = pMarksAccess->makeFieldBookmark(
+ aFldPam,
+ maFieldStack.back().GetBookmarkName(),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_UNHANDLED )) );
+ if ( pFieldmark )
+ {
+ const IFieldmark::parameter_map_t& pParametersToAdd = maFieldStack.back().getParameters();
+ pFieldmark->GetParameters()->insert(pParametersToAdd.begin(), pParametersToAdd.end());
+ rtl::OUString sFieldId = rtl::OUString::valueOf( sal_Int32( maFieldStack.back().mnFieldId ) );
+ pFieldmark->GetParameters()->insert(
+ std::pair< rtl::OUString, uno::Any > (
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_ID_PARAM )),
+ uno::makeAny( sFieldId ) ) );
+ pFieldmark->GetParameters()->insert(
+ std::pair< rtl::OUString, uno::Any > (
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_CODE_PARAM )),
+ uno::makeAny( aCode ) ) );
+
+ if ( maFieldStack.back().mnObjLocFc > 0 )
+ {
+ // Store the OLE object as an internal link
+ String sOleId = '_';
+ sOleId += String::CreateFromInt32( maFieldStack.back().mnObjLocFc );
+
+ SvStorageRef xSrc0 = pStg->OpenSotStorage(CREATE_CONST_ASC(SL::aObjectPool));
+ SvStorageRef xSrc1 = xSrc0->OpenSotStorage( sOleId, STREAM_READ );
+
+ // Store it now!
+ uno::Reference< embed::XStorage > xDocStg = GetDoc().GetDocStorage();
+ uno::Reference< embed::XStorage > xOleStg = xDocStg->openStorageElement(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OLELinks")), embed::ElementModes::WRITE );
+ SotStorageRef xObjDst = SotStorage::OpenOLEStorage( xOleStg, sOleId );
+
+ if ( xObjDst.Is() )
+ {
+ xSrc1->CopyTo( xObjDst );
+
+ if ( !xObjDst->GetError() )
+ xObjDst->Commit();
+ }
+
+ uno::Reference< embed::XTransactedObject > xTransact( xOleStg, uno::UNO_QUERY );
+ if ( xTransact.is() )
+ xTransact->commit();
+
+ // Store the OLE Id as a parameter
+ pFieldmark->GetParameters()->insert(
+ std::pair< rtl::OUString, uno::Any >(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_OLE_PARAM )),
+ uno::makeAny( rtl::OUString( sOleId ) ) ) );
+ }
+
+ }
+ }
+
break;
}
maFieldStack.pop_back();
@@ -744,11 +819,9 @@ bool AcceptableNestedField(sal_uInt16 nFieldCode)
case 68:
case 79:
case 88:
- // --> OD 2007-01-02 #b6504125#
// Accept AutoTextList field as nested field.
// Thus, the field result is imported as plain text.
case 89:
- // <--
return true;
default:
return false;
@@ -756,12 +829,12 @@ bool AcceptableNestedField(sal_uInt16 nFieldCode)
}
FieldEntry::FieldEntry(SwPosition &rPos, sal_uInt16 nFieldId) throw()
- : maStartPos(rPos), mnFieldId(nFieldId)
+ : maStartPos(rPos), mnFieldId(nFieldId), mnObjLocFc(0)
{
}
FieldEntry::FieldEntry(const FieldEntry &rOther) throw()
- : maStartPos(rOther.maStartPos), mnFieldId(rOther.mnFieldId)
+ : maStartPos(rOther.maStartPos), mnFieldId(rOther.mnFieldId), mnObjLocFc(rOther.mnObjLocFc)
{
}
@@ -788,6 +861,11 @@ FieldEntry &FieldEntry::operator=(const FieldEntry &rOther) throw()
return msMarkType;
}
+::rtl::OUString FieldEntry::GetBookmarkCode()
+{
+ return msMarkCode;
+}
+
void FieldEntry::SetBookmarkName(::rtl::OUString bookmarkName)
{
msBookmarkName=bookmarkName;
@@ -798,6 +876,11 @@ void FieldEntry::SetBookmarkType(::rtl::OUString bookmarkType)
msMarkType=bookmarkType;
}
+void FieldEntry::SetBookmarkCode(::rtl::OUString bookmarkCode)
+{
+ msMarkCode = bookmarkCode;
+}
+
::sw::mark::IFieldmark::parameter_map_t& FieldEntry::getParameters() {
return maParams;
@@ -814,7 +897,7 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
static FNReadField aWW8FieldTab[eMax+1] =
{
0,
- 0,
+ &SwWW8ImplReader::Read_F_Input,
0,
&SwWW8ImplReader::Read_F_Ref, // 3
0,
@@ -871,7 +954,7 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
0,
- 0, // 56: VERKNUePFUNG // fehlt noch !!!!!!!!!!!!!!!!!!!!!!!
+ 0, // 56
&SwWW8ImplReader::Read_F_Symbol, // 57
@@ -908,18 +991,18 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
&SwWW8ImplReader::Read_F_Hyperlink, // 88
0, // 89
0, // 90
- 0, // 91
+ &SwWW8ImplReader::Read_F_HTMLControl, // 91
0, // 92
0, // 93
0, // 94
&SwWW8ImplReader::Read_F_Shape, // 95
0 // eMax - Dummy leer Methode
};
- ASSERT( ( sizeof( aWW8FieldTab ) / sizeof( *aWW8FieldTab ) == eMax+1 ),
+ OSL_ENSURE( ( sizeof( aWW8FieldTab ) / sizeof( *aWW8FieldTab ) == eMax+1 ),
"FeldFunc-Tabelle stimmt nicht" );
WW8PLCFx_FLD* pF = pPlcxMan->GetFld();
- ASSERT(pF, "WW8PLCFx_FLD - Pointer nicht da");
+ OSL_ENSURE(pF, "WW8PLCFx_FLD - Pointer nicht da");
if (!pF || !pF->StartPosIsFieldStart())
return 0;
@@ -939,8 +1022,10 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
WW8FieldDesc aF;
bool bOk = pF->GetPara(pRes->nCp2OrIdx, aF);
- ASSERT(bOk, "WW8: Bad Field!\n");
- if (aF.nId == 33) aF.bCodeNest=false; //#124716#: do not recurse into nested page fields
+ OSL_ENSURE(bOk, "WW8: Bad Field!\n");
+ if (aF.nId == 33) aF.bCodeNest=false; // do not recurse into nested page fields
+ bool bCodeNest = aF.bCodeNest;
+ if ( aF.nId == 6 ) bCodeNest = false; // We can handle them and loose the inner data
maFieldStack.push_back(FieldEntry(*pPaM->GetPoint(), aF.nId));
@@ -970,7 +1055,7 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
return aF.nLen;
// keine Routine vorhanden
- if (bNested || !aWW8FieldTab[aF.nId] || aF.bCodeNest)
+ if (bNested || !aWW8FieldTab[aF.nId] || bCodeNest)
{
if( nFieldTagBad[nI] & nMask ) // Flag: Tag it when bad
return Read_F_Tag( &aF ); // Resultat nicht als Text
@@ -984,24 +1069,45 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
aF.nSCode, aF.nLCode, eTextCharSet );
pStrm->Seek( nOldPos );
- //#124725# field codes which contain '/' or '.' are not displayed in WinWord
- if (!aStr.EqualsAscii(" ADDIN", 0, 6) &&
- (aStr.Search('.') != STRING_NOTFOUND ||
- aStr.Search('/') != STRING_NOTFOUND))
+ // field codes which contain '/' or '.' are not displayed in WinWord
+ xub_StrLen nSpacePos = aStr.Search( ' ', 1 );
+ if ( STRING_NOTFOUND == nSpacePos )
+ nSpacePos = aStr.Len( );
+ xub_StrLen nSearchPos = STRING_NOTFOUND;
+ if ( !( aStr.EqualsAscii( "=", 1, 1 ) ) && (
+ ( ( nSearchPos = aStr.Search('.') ) != STRING_NOTFOUND && nSearchPos < nSpacePos ) ||
+ ( ( nSearchPos = aStr.Search('/') ) != STRING_NOTFOUND && nSearchPos < nSpacePos ) ) )
return aF.nLen;
else
+ {
+ // Link fields aren't supported, but they are bound to an OLE object
+ // that needs to be roundtripped
+ if ( aF.nId == 56 )
+ bEmbeddObj = true;
+ // Field not supported: store the field code for later use
+ maFieldStack.back().SetBookmarkCode( aStr );
return aF.nLen - aF.nLRes - 1; // so viele ueberlesen, das Resultfeld
// wird wie Haupttext eingelesen
+ }
}
else
{ // Lies Feld
long nOldPos = pStrm->Tell();
String aStr;
- aF.nLCode = pSBase->WW8ReadString( *pStrm, aStr, pPlcxMan->GetCpOfs()+
- aF.nSCode, aF.nLCode, eTextCharSet );
+ if ( aF.nId == 6 && aF.bCodeNest )
+ {
+ // TODO Extract the whole code string using the nested codes
+ aF.nLCode = pSBase->WW8ReadString( *pStrm, aStr, pPlcxMan->GetCpOfs() +
+ aF.nSCode, aF.nSRes - aF.nSCode - 1, eTextCharSet );
+ }
+ else
+ {
+ aF.nLCode = pSBase->WW8ReadString( *pStrm, aStr, pPlcxMan->GetCpOfs()+
+ aF.nSCode, aF.nLCode, eTextCharSet );
+ }
- // --> OD 2005-07-25 #i51312# - graphics inside field code not supported
- // by Writer. Thus, delete character 0x01, which stands for such a graphic.
+ // #i51312# - graphics inside field code not supported by Writer.
+ // Thus, delete character 0x01, which stands for such a graphic.
if (aF.nId==51) //#i56768# only do it for the MACROBUTTON field, since DropListFields need the 0x01.
{
aStr.EraseAllChars( 0x01 );
@@ -1022,7 +1128,7 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
case FLD_TEXT:
// so viele ueberlesen, das Resultfeld wird wie Haupttext
// eingelesen
- // JP 15.07.99: attributes can start at char 0x14 so skip one
+ // attributes can start at char 0x14 so skip one
// char more back == "-2"
if (aF.nLRes)
return aF.nLen - aF.nLRes - 2;
@@ -1194,9 +1300,12 @@ eF_ResT SwWW8ImplReader::Read_F_Input( WW8FieldDesc* pF, String& rStr )
if( !aDef.Len() )
aDef = GetFieldResult( pF );
- SwInputField aFld( (SwInputFieldType*)rDoc.GetSysFldType( RES_INPUTFLD ),
- aDef, aQ, INP_TXT, 0 ); // sichtbar ( geht z.Zt. nicht anders )
- rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ if ( pF->nId != 0x01 ) // 0x01 fields have no result
+ {
+ SwInputField aFld( (SwInputFieldType*)rDoc.GetSysFldType( RES_INPUTFLD ),
+ aDef, aQ, INP_TXT, 0 ); // sichtbar ( geht z.Zt. nicht anders )
+ rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ }
return FLD_OK;
}
@@ -1270,7 +1379,7 @@ the appropiate set/ask field.
long SwWW8ImplReader::MapBookmarkVariables(const WW8FieldDesc* pF,
String &rOrigName, const String &rData)
{
- ASSERT(pPlcxMan,"No pPlcxMan");
+ OSL_ENSURE(pPlcxMan,"No pPlcxMan");
long nNo;
/*
If there was no bookmark associated with this set field, then we create a
@@ -1335,7 +1444,7 @@ SwFltStackEntry *SwWW8FltRefStack::RefToVar(const SwField* pFld,
String SwWW8ImplReader::GetMappedBookmark(const String &rOrigName)
{
String sName(BookmarkToWriter(rOrigName));
- ASSERT(pPlcxMan,"no pPlcxMan");
+ OSL_ENSURE(pPlcxMan,"no pPlcxMan");
pPlcxMan->GetBook()->MapName(sName);
//See if there has been a variable set with this name, if so get
@@ -1423,9 +1532,6 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8FieldDesc*, String& rStr )
{
String aSequenceName;
String aBook;
- bool bHidden = false;
- bool bFormat = false;
- bool bShowLast = false;
bool bCountOn = true;
String sStart;
SvxExtNumType eNumFormat = SVX_NUM_ARABIC;
@@ -1443,20 +1549,15 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8FieldDesc*, String& rStr )
break;
case 'h':
- if( !bFormat )
- bHidden = true; // Hidden-Flag aktivieren
break;
case '*':
- bFormat = true; // Format-Flag aktivieren
- bHidden = false; // Hidden-Flag deaktivieren
nRet = aReadParam.SkipToNextToken();
if( -2 == nRet )
eNumFormat = GetNumTypeFromName( aReadParam.GetResult() );
break;
case 'r':
- bShowLast = false; // Zaehler neu setzen
bCountOn = false;
nRet = aReadParam.SkipToNextToken();
if( -2 == nRet )
@@ -1464,13 +1565,11 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8FieldDesc*, String& rStr )
break;
case 'c':
- bShowLast = true; // zuletzt verwendete Nummer anzeigen
bCountOn = false;
break;
case 'n':
bCountOn = true; // Nummer um eins erhoehen (default)
- bShowLast = false;
break;
case 's': // Outline Level
@@ -1606,13 +1705,6 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
if( !bFldFound )
{
-/*
- SwUserFieldType aTmp( &rDoc, aDocProperty );
- aTmp.SetContent(GetFieldResult( pF ));
- SwUserField aUFld( (SwUserFieldType*)rDoc.InsertFldType( aTmp ));
- aUFld.ChangeFormat( UF_STRING );
- rDoc.Insert( *pPaM, SwFmtFld( aUFld ), 0);
-*/
SwDocInfoField aFld( (SwDocInfoFieldType*)
rDoc.GetSysFldType( RES_DOCINFOFLD ), DI_CUSTOM|nReg, aDocProperty, GetFieldResult( pF ) );
rDoc.InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
@@ -1704,7 +1796,6 @@ eF_ResT SwWW8ImplReader::Read_F_Author( WW8FieldDesc*, String& )
{
// SH: Das SwAuthorField bezeichnet nicht den urspruenglichen
// Autor, sondern den aktuellen Benutzer, also besser ueber DocInfo
- // (#56149)
SwDocInfoField aFld( (SwDocInfoFieldType*)
rDoc.GetSysFldType( RES_DOCINFOFLD ),
DI_CREATE|DI_SUB_AUTHOR, String() );
@@ -1725,7 +1816,6 @@ eF_ResT SwWW8ImplReader::Read_F_TemplName( WW8FieldDesc*, String& )
eF_ResT SwWW8ImplReader::Read_F_DateTime( WW8FieldDesc*pF, String& rStr )
{
bool bHijri = false;
- bool bSaka = false;
_ReadFieldParams aReadParam(rStr);
long nTok;
while (-1 != (nTok = aReadParam.SkipToNextToken()))
@@ -1740,7 +1830,7 @@ eF_ResT SwWW8ImplReader::Read_F_DateTime( WW8FieldDesc*pF, String& rStr )
bHijri = true;
break;
case 's':
- bSaka = true;
+ //Saka Calendar, should we do something with this ?
break;
}
}
@@ -1801,7 +1891,7 @@ eF_ResT SwWW8ImplReader::Read_F_FileName(WW8FieldDesc*, String &rStr)
aReadParam.SkipToNextToken();
break;
default:
- ASSERT(!this, "unknown option in FileName field");
+ OSL_ENSURE(!this, "unknown option in FileName field");
break;
}
}
@@ -2049,7 +2139,7 @@ eF_ResT SwWW8ImplReader::Read_F_Ref( WW8FieldDesc*, String& rStr )
*/
SwGetRefField aFld(
(SwGetRefFieldType*)rDoc.GetSysFldType( RES_GETREFFLD ),
- sOrigBkmName,REF_BOOKMARK,0,REF_CONTENT);
+ sBkmName,REF_BOOKMARK,0,REF_CONTENT);
pReffingStck->NewAttr( *pPaM->GetPoint(), SwFmtFld(aFld) );
pReffingStck->SetAttr( *pPaM->GetPoint(), RES_TXTATR_FIELD);
}
@@ -2069,7 +2159,6 @@ eF_ResT SwWW8ImplReader::Read_F_Ref( WW8FieldDesc*, String& rStr )
eF_ResT SwWW8ImplReader::Read_F_NoteReference( WW8FieldDesc*, String& rStr )
{
String aBkmName;
- bool bChapterNr = false;
bool bAboveBelow = false;
long nRet;
@@ -2083,7 +2172,7 @@ eF_ResT SwWW8ImplReader::Read_F_NoteReference( WW8FieldDesc*, String& rStr )
aBkmName = aReadParam.GetResult();
break;
case 'r':
- bChapterNr = true; // activate flag 'Chapter Number'
+ // activate flag 'Chapter Number'
break;
case 'p':
bAboveBelow = true;
@@ -2135,9 +2224,9 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, String& rStr )
#if defined(WW_NATIVE_TOC)
if (1) {
- ::rtl::OUString aBookmarkName=::rtl::OUString::createFromAscii("_REF");
+ ::rtl::OUString aBookmarkName=(RTL_CONSTASCII_USTRINGPARAM("_REF"));
maFieldStack.back().SetBookmarkName(aBookmarkName);
- maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_PAGEREF));
+ maFieldStack.back().SetBookmarkType(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_PAGEREF)));
maFieldStack.back().AddParam(rtl::OUString(), sName);
return FLD_TEXT;
}
@@ -2233,7 +2322,7 @@ bool CanUseRemoteLink(const String &rGrfName)
ucb::XCommandEnvironment >() );
rtl::OUString aTitle;
- aCnt.getPropertyValue(rtl::OUString::createFromAscii("Title" ))
+ aCnt.getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")))
>>= aTitle;
bUseRemote = (aTitle.getLength() > 0);
}
@@ -2361,11 +2450,11 @@ eF_ResT SwWW8ImplReader::Read_F_IncludeText( WW8FieldDesc* /*pF*/, String& rStr
SwSection *const pSection =
rDoc.InsertSwSection(*pPaM, aSection, 0, 0, false);
- ASSERT(pSection, "no section inserted");
+ OSL_ENSURE(pSection, "no section inserted");
if (!pSection)
return FLD_TEXT;
const SwSectionNode* pSectionNode = pSection->GetFmt()->GetSectionNode();
- ASSERT(pSectionNode, "no section node!");
+ OSL_ENSURE(pSectionNode, "no section node!");
if (!pSectionNode)
return FLD_TEXT;
@@ -2697,7 +2786,6 @@ bool SwWW8ImplReader::AddExtraOutlinesAsExtraStyles(SwTOXBase& rBase)
sal_uInt16 nStyleLevel = rSI.nOutlineLevel;
sal_uInt16 nMaxLevel = rBase.GetLevel();
if (
- //nStyleLevel != pFmt->GetOutlineLevel() && //#outline level,zhaojianwei
nStyleLevel != (pFmt->GetAttrOutlineLevel()-1) && //<-end,zhaojianwei
nStyleLevel < nMaxLevel
)
@@ -2747,8 +2835,7 @@ void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase,
{
xub_StrLen nIndex = 0;
- //#92940# Delimiters between styles and style levels appears to
- //allow both ; and ,
+ // Delimiters between styles and style levels appears to allow both ; and ,
String sTemplate( sParams.GetToken(0, ';', nIndex) );
if( STRING_NOTFOUND == nIndex )
@@ -2846,10 +2933,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
{
#if defined(WW_NATIVE_TOC)
if (1) {
- ::rtl::OUString aBookmarkName=::rtl::OUString::createFromAscii("_TOC");
+ ::rtl::OUString aBookmarkName=(RTL_CONSTASCII_USTRINGPARAM("_TOC"));
maFieldStack.back().SetBookmarkName(aBookmarkName);
- maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_TOC));
-// maFieldStack.back().AddParam(::rtl::OUString::createFromAscii("Description"), aFormula.sToolTip);
+ maFieldStack.back().SetBookmarkType(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_TOC)));
return FLD_TEXT;
}
#endif
@@ -2944,7 +3030,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
{
if (TOKEN_TAB_STOP == ePrevType)
{
- aIt--;
+ --aIt;
if(0x09 == sDelimiter.GetChar(0))
aIt->eTabAlign = SVX_TAB_ADJUST_END;
@@ -3069,7 +3155,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
{
if (TOKEN_TAB_STOP == ePrevType)
{
- aIt--;
+ --aIt;
SwFormToken aToken(TOKEN_TEXT);
aToken.sText = sDelimiter;
@@ -3124,7 +3210,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
if (eType == TOKEN_PAGE_NUMS)
{
aIt = aPattern.erase(aIt);
- aIt--;
+ --aIt;
if (
TOKEN_TAB_STOP ==
aIt->eTokenType
@@ -3193,11 +3279,10 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
if (AddExtraOutlinesAsExtraStyles(*pBase))
eCreateFrom |= (nsSwTOXElement::TOX_TEMPLATE | nsSwTOXElement::TOX_OUTLINELEVEL);
- // --> FME 2004-12-16 #i19683# Insert a text token " " between the
- // number and entry token. In an ideal world we could handle the
- // tab stop between the number and the entry correctly, but I
- // currently have no clue how to obtain the tab stop position.
- // It is _not_ set at the paragraph style.
+ // #i19683# Insert a text token " " between the number and entry token.
+ // In an ideal world we could handle the tab stop between the number and
+ // the entry correctly, but I currently have no clue how to obtain
+ // the tab stop position. It is _not_ set at the paragraph style.
SwForm* pForm = 0;
for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
@@ -3245,7 +3330,6 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
pBase->SetCreate( eCreateFrom );
/*
- #91214#
We don't know until here if we are an illustration
or not, and so have being used a TOX_CONTENT so far
which has 10 levels, while TOX has only two, this
@@ -3258,7 +3342,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
SwForm aForm( eType );
sal_uInt16 nEnd = aForm.GetFormMax()-1;
- // -> #i21237#
+ // #i21237#
for(sal_uInt16 nLevel = 1; nLevel <= nEnd; ++nLevel)
{
SwFormTokens aPattern = aOldForm.GetPattern(nLevel);
@@ -3266,20 +3350,21 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
SwFormTokens::iterator new_end=remove_if(aPattern.begin(), aPattern.end(),
SwFormTokenEqualToFormTokenType(TOKEN_ENTRY_NO));
- aPattern.erase (new_end, aPattern.end() ); // #124710#: table index imported with wrong page number format
+ // table index imported with wrong page number format
+ aPattern.erase (new_end, aPattern.end() );
aForm.SetPattern(nLevel, aPattern);
aForm.SetTemplate( nLevel,
aOldForm.GetTemplate(nLevel));
}
- // <- #i21237#
+ // <--
pBase->SetTOXForm( aForm );
}
break;
default:
- ASSERT(!this, "Unhandled toc options!");
+ OSL_ENSURE(!this, "Unhandled toc options!");
break;
}
}
@@ -3287,20 +3372,19 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
case TOX_USER:
break;
default:
- ASSERT(!this, "Unhandled toc options!");
+ OSL_ENSURE(!this, "Unhandled toc options!");
break;
} // ToxBase fertig
// Update fuer TOX anstossen
rDoc.SetUpdateTOX(true);
- // #i21237#
- // propagate tab stops from paragraph styles used in TOX to
- // patterns of the TOX
+ // #i21237# - propagate tab stops from paragraph styles
+ // used in TOX to patterns of the TOX
+
pBase->AdjustTabStops(rDoc, sal_True);
- //#i10028# inserting a toc implicltly acts like a parabreak
- //in word and writer
+ // #i10028# - inserting a toc implicltly acts like a parabreak in word and writer
if (pPaM->GetPoint()->nContent.GetIndex())
AppendTxtNode(*pPaM->GetPoint());
@@ -3335,7 +3419,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
//for future page/section segment insertion
SwPaM aRegion(*pPaM);
aRegion.Move(fnMoveBackward);
- ASSERT(rDoc.GetCurTOX(*aRegion.GetPoint()), "Misunderstood how toc works");
+ OSL_ENSURE(rDoc.GetCurTOX(*aRegion.GetPoint()), "Misunderstood how toc works");
if (SwTOXBase* pBase2 = (SwTOXBase*)rDoc.GetCurTOX(*aRegion.GetPoint()))
{
if(nIndexCols>1)
@@ -3374,10 +3458,9 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, String& rStr )
{
#if defined(WW_NATIVE_TOC)
if (1) {
- ::rtl::OUString aBookmarkName=::rtl::OUString::createFromAscii("_HYPERLINK");
+ ::rtl::OUString aBookmarkName=(RTL_CONSTASCII_USTRINGPARAM("_HYPERLINK"));
maFieldStack.back().SetBookmarkName(aBookmarkName);
- maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_HYPERLINK));
-// maFieldStack.back().AddParam(::rtl::OUString::createFromAscii("Description"), aFormula.sToolTip);
+ maFieldStack.back().SetBookmarkType(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_HYPERLINK)));
return FLD_TEXT;
}
#endif
@@ -3426,7 +3509,7 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, String& rStr )
break;
case 'h':
case 'm':
- ASSERT( !this, "Auswertung fehlt noch - Daten unbekannt" );
+ OSL_ENSURE( !this, "Auswertung fehlt noch - Daten unbekannt" );
case 's': //worthless fake anchor option
bOptions = true;
break;
@@ -3435,7 +3518,7 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, String& rStr )
}
// das Resultat uebernehmen
- ASSERT((sURL.Len() || sMark.Len()), "WW8: Empty URL")
+ OSL_ENSURE((sURL.Len() || sMark.Len()), "WW8: Empty URL");
if( sMark.Len() )
( sURL += INET_MARK_TOKEN ) += sMark;
@@ -3496,7 +3579,7 @@ void lcl_ImportTox(SwDoc &rDoc, SwPaM &rPaM, const String &rStr, bool bIdx)
break;
}
- ASSERT( rDoc.GetTOXTypeCount( eTox ), "Doc.GetTOXTypeCount() == 0 :-(" );
+ OSL_ENSURE( rDoc.GetTOXTypeCount( eTox ), "Doc.GetTOXTypeCount() == 0 :-(" );
const SwTOXType* pT = rDoc.GetTOXType( eTox, 0 );
SwTOXMark aM( pT );
@@ -3625,4 +3708,4 @@ void SwWW8ImplReader::Read_FldVanish( sal_uInt16, const sal_uInt8*, short nLen )
pStrm->Seek( nOldPos );
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 57c04a5226cf..484fb3020c67 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include <stdlib.h>
#include <svl/itemiter.hxx>
#include <rtl/tencinfo.h>
@@ -45,7 +45,6 @@
#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>
@@ -107,7 +106,7 @@
#include "ww8par2.hxx" // class WW8RStyle, class WwAnchorPara
#include "ww8graf.hxx"
-// OD 2004-05-18 #i27767#
+// #i27767#
#include <fmtwrapinfluenceonobjpos.hxx>
using namespace sw::util;
@@ -178,7 +177,7 @@ void wwSection::SetDirection()
switch (maSep.wTextFlow)
{
default:
- ASSERT(!this, "Unknown layout type");
+ OSL_ENSURE(!this, "Unknown layout type");
case 0:
meDir=FRMDIR_HORI_LEFT_TOP;
break;
@@ -215,7 +214,6 @@ bool wwSection::IsVertical() const
}
/*
- #113694#
This is something of festering mapping, I'm open to better ways of doing it,
but primarily the grid in writer is different to that in word. In writer the
grid elements are squares with ruby rows inbetween. While in word there is no
@@ -253,7 +251,7 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
eType = GRID_NONE;
break;
default:
- ASSERT(!this, "Unknown grid type");
+ OSL_ENSURE(!this, "Unknown grid type");
case 3:
eType = GRID_LINES_CHARS;
aGrid.SetSnapToChars(sal_True);
@@ -313,10 +311,6 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
aGrid.SetLines(writer_cast<sal_uInt16>(nTextareaHeight/nLinePitch));
aGrid.SetBaseHeight(writer_cast<sal_uInt16>(nLinePitch));
- // ruby height is not supported in ww8
- //sal_Int32 nRubyHeight = nLinePitch - nCharWidth;
- //if (nRubyHeight < 0)
- // nRubyHeight = 0;
sal_Int32 nRubyHeight = 0;
aGrid.SetRubyHeight(writer_cast<sal_uInt16>(nRubyHeight));
@@ -558,7 +552,7 @@ void wwSectionManager::GetPageULData(const wwSection &rSection, bool bFirst,
if( rData.bHasHeader )
{
rData.nSwUp = nWWHTop; // Header -> umrechnen
- // --> CMC, OD 2004-06-18 #i19922# - correction:
+ // #i19922# - correction:
// consider that <nWWUp> can be negative, compare only if it's positive
if ( nWWUp > 0 &&
static_cast<sal_uInt32>(abs(nWWUp)) >= nWWHTop )
@@ -566,7 +560,7 @@ void wwSectionManager::GetPageULData(const wwSection &rSection, bool bFirst,
else
rData.nSwHLo = 0;
- // --> OD 2004-06-18 #i19922# - minimum page header height is now 1mm
+ // #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
if (rData.nSwHLo < sal::static_int_cast< sal_uInt32 >(cMinHdFtHeight))
rData.nSwHLo = sal::static_int_cast< sal_uInt32 >(cMinHdFtHeight);
@@ -585,15 +579,14 @@ void wwSectionManager::GetPageULData(const wwSection &rSection, bool bFirst,
if( rData.bHasFooter )
{
rData.nSwLo = nWWFBot; // Footer -> Umrechnen
- // --> CMC, OD 2004-06-18 #i19922# - correction:
- // consider that <nWWLo> can be negative, compare only if it's positive
+ // #i19922# - correction: consider that <nWWLo> can be negative, compare only if it's positive
if ( nWWLo > 0 &&
static_cast<sal_uInt32>(abs(nWWLo)) >= nWWFBot )
rData.nSwFUp = nWWLo - nWWFBot;
else
rData.nSwFUp = 0;
- // --> OD 2004-06-18 #i19922# - minimum page header height is now 1mm
+ // #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
if (rData.nSwFUp < sal::static_int_cast< sal_uInt32 >(cMinHdFtHeight))
rData.nSwFUp = sal::static_int_cast< sal_uInt32 >(cMinHdFtHeight);
@@ -614,7 +607,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
if (!rSection.IsFixedHeightHeader()) //normal
{
pHdFmt->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, 0, rData.nSwHLo));
- // --> OD 2004-06-18 #i19922# - minimum page header height is now 1mm
+ // #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
aHdUL.SetLower( writer_cast<sal_uInt16>(rData.nSwHLo - cMinHdFtHeight) );
pHdFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
@@ -622,8 +615,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
}
else
{
- // --> OD 2005-05-20 #i48832# - set correct spacing between
- // header and body.
+ // #i48832# - set correct spacing between header and body.
const SwTwips nHdLowerSpace( Abs(rSection.maSep.dyaTop) - rData.nSwUp - rData.nSwHLo );
pHdFmt->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, 0, rData.nSwHLo + nHdLowerSpace));
aHdUL.SetLower( static_cast< sal_uInt16 >(nHdLowerSpace) );
@@ -643,7 +635,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
if (!rSection.IsFixedHeightFooter()) //normal
{
pFtFmt->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, 0, rData.nSwFUp));
- // --> OD 2004-06-18 #i19922# - minimum page header height is now 1mm
+ // #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
aFtUL.SetUpper( writer_cast<sal_uInt16>(rData.nSwFUp - cMinHdFtHeight) );
pFtFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
@@ -651,8 +643,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
}
else
{
- // --> OD 2005-05-20 #i48832# - set correct spacing between
- // footer and body.
+ // #i48832# - set correct spacing between footer and body.
const SwTwips nFtUpperSpace( Abs(rSection.maSep.dyaBottom) - rData.nSwLo - rData.nSwFUp );
pFtFmt->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, 0, rData.nSwFUp + nFtUpperSpace));
aFtUL.SetUpper( static_cast< sal_uInt16 >(nFtUpperSpace) );
@@ -690,7 +681,7 @@ SwSectionFmt *wwSectionManager::InsertSection(
rSection.mpSection =
mrReader.rDoc.InsertSwSection( rMyPaM, aSection, 0, & aSet );
- ASSERT(rSection.mpSection, "section not inserted!");
+ OSL_ENSURE(rSection.mpSection, "section not inserted!");
if (!rSection.mpSection)
return 0;
@@ -702,7 +693,7 @@ SwSectionFmt *wwSectionManager::InsertSection(
break;
}
- ASSERT(pPage, "no page outside this section!");
+ OSL_ENSURE(pPage, "no page outside this section!");
if (!pPage)
pPage = &mrReader.rDoc._GetPageDesc(0);
@@ -711,7 +702,7 @@ SwSectionFmt *wwSectionManager::InsertSection(
return 0;
SwSectionFmt *pFmt = rSection.mpSection->GetFmt();
- ASSERT(pFmt, "impossible");
+ OSL_ENSURE(pFmt, "impossible");
if (!pFmt)
return 0;
@@ -812,7 +803,7 @@ void wwSectionManager::SetNumberingType(const wwSection &rNewSection,
void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
{
/*
- #i1909# #100688# section/page breaks should not occur in tables or subpage
+ #i1909# section/page breaks should not occur in tables or subpage
elements like frames. Word itself ignores them in this case. The bug is
more likely that this filter created such documents in the past!
*/
@@ -820,7 +811,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
return;
WW8PLCFx_SEPX* pSep = mrReader.pPlcxMan->GetSepPLCF();
- ASSERT(pSep, "impossible!");
+ OSL_ENSURE(pSep, "impossible!");
if (!pSep)
return;
@@ -840,8 +831,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
SwSectionData aSection(FILE_LINK_SECTION, sSectionName);
aSection.SetLinkFileName( sSectionName );
aSection.SetProtectFlag(true);
- // --> CMC, OD 2004-06-18 #i19922# improvement:
- // return value of method <Insert> not used.
+ // #i19922# - improvement: return value of method <Insert> not used.
mrReader.rDoc.InsertSwSection(*mrReader.pPaM, aSection, 0, 0, false);
}
@@ -937,7 +927,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
//sprmSDxaColWidth
const sal_uInt8* pSW = pSep->HasSprm( (eVer <= ww::eWW7 ? 136 : 0xF203), sal_uInt8( i ) );
- ASSERT( pSW, "+Sprm 136 (bzw. 0xF203) (ColWidth) fehlt" );
+ OSL_ENSURE( pSW, "+Sprm 136 (bzw. 0xF203) (ColWidth) fehlt" );
sal_uInt16 nWidth = pSW ? SVBT16ToShort(pSW + 1) : 1440;
aNewSection.maSep.rgdxaColumnWidthSpacing[++nIdx] = nWidth;
@@ -947,7 +937,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
//sprmSDxaColSpacing
const sal_uInt8* pSD = pSep->HasSprm( (eVer <= ww::eWW7 ? 137 : 0xF204), sal_uInt8( i ) );
- ASSERT( pSD, "+Sprm 137 (bzw. 0xF204) (Colspacing) fehlt" );
+ OSL_ENSURE( pSD, "+Sprm 137 (bzw. 0xF204) (Colspacing) fehlt" );
if( pSD )
{
nWidth = SVBT16ToShort(pSD + 1);
@@ -1018,8 +1008,8 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aNewSection.maSep.dxaLeft = ReadUSprm( pSep, pIds[3], nLef[nLIdx]);
aNewSection.maSep.dxaRight = ReadUSprm( pSep, pIds[4], nRig[nLIdx]);
- //#110175# 2pages in 1sheet hackery ?
- //#i31806# but only swap if 2page in 1sheet is enabled.
+ // 2pages in 1sheet hackery ?
+ // #i31806# but only swap if 2page in 1sheet is enabled.
// its not clear if dmOrientPage is the correct member to
// decide on this but I am not about to 2nd guess cmc.
if(mrReader.pWDop->doptypography.f2on1 &&
@@ -1234,12 +1224,6 @@ static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const sal_uInt8* pS)
sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
const WW8RStyle* pSty, const WW8PLCFx_SEPX* pSep)
{
-// Ausgegend von diesen defines:
-// #define WW8_TOP 0
-// #define WW8_LEFT 1
-// #define WW8_BOT 2
-// #define WW8_RIGHT 3
-// #define WW8_BETW 4
//returns a sal_uInt8 filled with a bit for each position that had a sprm
//setting that border
@@ -1281,7 +1265,7 @@ sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
nBorder |= (_SetWW8_BRC( bVer67, brc[ i ], pSty->HasParaSprm( *pIds )))<<i;
}
else {
- ASSERT( pSty || pPap, "WW8PLCFx_Cp_FKP and WW8RStyle "
+ OSL_ENSURE( pSty || pPap, "WW8PLCFx_Cp_FKP and WW8RStyle "
"and WW8PLCFx_SEPX is 0" );
}
}
@@ -1325,13 +1309,17 @@ void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, sal_uInt
// object size
switch (nIdx)
{
+ case 6:
+ eCodeIdx = WW8_BordersSO::dotted;
+ break;
+ case 7:
+ eCodeIdx = WW8_BordersSO::dashed;
+ break;
// First the single lines
case 1:
case 2:
case 5:
// and the unsupported special cases which we map to a single line
- case 6:
- case 7:
case 8:
case 9:
case 22:
@@ -1456,6 +1444,7 @@ void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, sal_uInt
aLine.SetOutWidth(rBorders.mnOut);
aLine.SetInWidth(rBorders.mnIn);
aLine.SetDistance(rBorders.mnDist);
+ aLine.SetStyle( rBorders.mnType );
//No AUTO for borders as yet, so if AUTO, use BLACK
if (nCol == 0)
@@ -1574,7 +1563,7 @@ bool SwWW8ImplReader::SetShadow(SvxShadowItem& rShadow, const short *pSizeArray,
const WW8_BRC *pbrc) const
{
bool bRet = (
- ( bVer67 ? (pbrc[WW8_RIGHT].aBits1[ 1 ] & 0x20 )
+ ( bVer67 ? (pbrc[WW8_RIGHT].aBits1[ 0 ] & 0x20 )
: (pbrc[WW8_RIGHT].aBits2[ 1 ] & 0x20 ) )
&& (pSizeArray && pSizeArray[WW8_RIGHT])
);
@@ -1702,7 +1691,7 @@ bool WW8FlyPara::operator==(const WW8FlyPara& rSrc) const
/*
Compare the parts that word seems to compare for equivalence.
Interestingly being autoheight or absolute height (the & 0x7fff) doesn't
- matter to word e.g. #110507#
+ matter to word
*/
return
(
@@ -1903,7 +1892,7 @@ bool WW8FlyPara::IsEmpty() const
#107103# if wrong, so given that the empty is 2, if we are 0 then set
empty to 0 to make 0 equiv to 2 for empty checking
*/
- ASSERT(aEmpty.nSp37 == 2, "this is not what we expect for nSp37");
+ OSL_ENSURE(aEmpty.nSp37 == 2, "this is not what we expect for nSp37");
if (this->nSp37 == 0)
aEmpty.nSp37 = 0;
if (aEmpty == *this)
@@ -1911,7 +1900,7 @@ bool WW8FlyPara::IsEmpty() const
return false;
}
-// OD 14.10.2003 #i18732# - changes made on behalf of CMC
+// #i18732# - changes made on behalf of CMC
WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
SwWW8ImplReader& rIo,
WW8FlyPara& rWW,
@@ -1979,14 +1968,14 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
// Wenn der Fly links, rechts, oben oder unten aligned ist,
// wird der aeussere Textabstand ignoriert, da sonst
// der Fly an falscher Position landen wuerde
- // JP 18.11.98: Problematisch wird es nur bei Innen/Aussen
+ // Problematisch wird es nur bei Innen/Aussen
// Bindung
nYBind = (( rWW.nSp29 & 0x30 ) >> 4);
- // --> OD 2005-08-24 #i53725# - absolute positioned objects have to be
+ //#i53725# - absolute positioned objects have to be
// anchored at-paragraph to assure its correct anchor position.
eAnchor = FLY_AT_PARA;
- // <--
+
switch (nYBind)
{
case 0: //relative to margin
@@ -2000,7 +1989,7 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
break;
}
-// OD 14.10.2003 #i18732#
+// #i18732#
switch( rWW.nSp27 ) // besondere Y-Positionen ?
{
case -4:
@@ -2048,7 +2037,7 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
}
nXBind = ( rWW.nSp29 & 0xc0 ) >> 6;
-// OD 14.10.2003 #i18732#
+// #i18732#
switch (nXBind) // X - Bindung -> Koordinatentransformation
{
case 0: //relative to column
@@ -2062,15 +2051,14 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
break;
}
- // --> OD 2004-12-06 #i36649# - adjustments for certain horizontal alignments
+ // #i36649# - adjustments for certain horizontal alignments
// Note: These special adjustments found by an investigation of documents
// containing frames with different left/right border distances and
// distances to text. The outcome is some how strange.
// Note: These adjustments causes wrong horizontal positions for frames,
// which are aligned inside|outside to page|margin on even pages,
// the left and right border distances are different.
- // --> OD 2005-01-19 #119176# - no adjustments possible, if frame has
- // automatic width.
+ // no adjustments possible, if frame has automatic width.
// determine left border distance
sal_Int16 nLeBorderMgn( 0L );
if ( !bAutoWidth )
@@ -2150,7 +2138,6 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
}
}
- // --> OD 2007-07-03 #148498#
// adjustments for certain vertical alignments
if ( eVAlign == text::VertOrientation::NONE && eVRel == text::RelOrientation::PAGE_PRINT_AREA )
{
@@ -2159,7 +2146,6 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
eVRel = text::RelOrientation::PAGE_FRAME;
nYPos = static_cast< sal_Int16 >( nYPos + nWWPgTop );
}
- // <--
FlySecur1( nWidth, rWW.bBorderLines ); // passen Raender ?
FlySecur1( nHeight, rWW.bBorderLines );
@@ -2204,18 +2190,20 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW,
Put(SvxULSpaceItem(pFS->nUpMgn, pFS->nLoMgn, RES_UL_SPACE));
//we no longer need to hack around the header/footer problems
- Put(SwFmtSurround(pFS->eSurround));
+ SwFmtSurround aSurround(pFS->eSurround);
+ if ( pFS->eSurround == SURROUND_IDEAL )
+ aSurround.SetAnchorOnly( sal_True );
+ Put( aSurround );
short aSizeArray[5]={0};
rReader.SetFlyBordersShadow(*this,(const WW8_BRC*)pFW->brc,&aSizeArray[0]);
// der 5. Parameter ist immer 0, daher geht beim Cast nix verloren
- // OD 2004-05-18 #i27767#
- // --> OD 2004-10-18 #i35017# - constant name has changed
+ // #i27767#
+ // #i35017# - constant name has changed
Put( SwFmtWrapInfluenceOnObjPos(
text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ) );
- // <--
if( !bGraf )
{
@@ -2338,7 +2326,7 @@ void SwWW8ImplReader::MoveInsideFly(const SwFrmFmt *pFlyFmt)
// Setze Pam in den FlyFrame
const SwFmtCntnt& rCntnt = pFlyFmt->GetCntnt();
- ASSERT( rCntnt.GetCntntIdx(), "Kein Inhalt vorbereitet." );
+ OSL_ENSURE( rCntnt.GetCntntIdx(), "Kein Inhalt vorbereitet." );
pPaM->GetPoint()->nNode = rCntnt.GetCntntIdx()->GetIndex() + 1;
pPaM->GetPoint()->nContent.Assign( pPaM->GetCntntNode(), 0 );
@@ -2413,7 +2401,7 @@ WW8FlyPara *SwWW8ImplReader::ConstructApo(const ApoTestResults &rApo,
const WW8_TablePos *pTabPos)
{
WW8FlyPara *pRet = 0;
- ASSERT(rApo.HasFrame() || pTabPos,
+ OSL_ENSURE(rApo.HasFrame() || pTabPos,
"If no frame found, *MUST* be in a table");
pRet = new WW8FlyPara(bVer67, rApo.mpStyleApo);
@@ -2458,7 +2446,6 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo,
if (0 == (pWFlyPara = ConstructApo(rApo, pTabPos)))
return false;
- // --> OD 2007-07-03 #148498#
// <WW8SwFlyPara> constructor has changed - new 4th parameter
// containing WW8 page top margin.
pSFlyPara = new WW8SwFlyPara( *pPaM, *this, *pWFlyPara,
@@ -2466,7 +2453,6 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo,
maSectionManager.GetPageLeft(),
maSectionManager.GetTextAreaWidth(),
nIniFlyDx, nIniFlyDy);
- // <--
// If this paragraph is a Dropcap set the flag and we will deal with it later
if (IsDropCap())
@@ -2491,7 +2477,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo,
pSFlyPara->pFlyFmt = rDoc.MakeFlySection( pSFlyPara->eAnchor,
pPaM->GetPoint(), &aFlySet );
- ASSERT(pSFlyPara->pFlyFmt->GetAnchor().GetAnchorId() ==
+ OSL_ENSURE(pSFlyPara->pFlyFmt->GetAnchor().GetAnchorId() ==
pSFlyPara->eAnchor, "Not the anchor type requested!");
if (pSFlyPara->pFlyFmt)
@@ -2561,7 +2547,7 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr)
void SwWW8ImplReader::StopApo()
{
- ASSERT(pWFlyPara, "no pWFlyPara to close");
+ OSL_ENSURE(pWFlyPara, "no pWFlyPara to close");
if (!pWFlyPara)
return;
if (pWFlyPara->bGrafApo)
@@ -2575,13 +2561,12 @@ void SwWW8ImplReader::StopApo()
{
if (!pSFlyPara->pMainTextPos || !pWFlyPara)
{
- ASSERT( pSFlyPara->pMainTextPos, "StopApo: pMainTextPos ist 0" );
- ASSERT( pWFlyPara, "StopApo: pWFlyPara ist 0" );
+ OSL_ENSURE( pSFlyPara->pMainTextPos, "StopApo: pMainTextPos ist 0" );
+ OSL_ENSURE( pWFlyPara, "StopApo: pWFlyPara ist 0" );
return;
}
/*
- #104920#
What we are doing with this temporary nodeindex is as follows: The
stack of attributes normally only places them into the document when
the current insertion point has passed them by. Otherwise the end
@@ -2607,7 +2592,7 @@ void SwWW8ImplReader::StopApo()
if (SwTxtNode* pNd = aPref.GetNode().GetTxtNode())
{
/*
- #i582#/#114238#
+ #i582#
Take the last paragraph background colour and fill the frame with
it. Otherwise, make it transparent, this appears to be how MSWord
works
@@ -2638,7 +2623,7 @@ void SwWW8ImplReader::StopApo()
SwFmtFrmSize( pSFlyPara->eHeightFix, nW, pSFlyPara->nHeight ) );
}
/*
- #83307# Word set *no* width meaning its an automatic width. The
+ Word set *no* width meaning its an automatic width. The
SwFlyPara reader will have already set a fallback width of the
printable regions width, so we should reuse it. Despite the related
problems with layout addressed with a hack in WW8FlyPara's constructor
@@ -2687,7 +2672,7 @@ bool SwWW8ImplReader::TestSameApo(const ApoTestResults &rApo,
{
if( !pWFlyPara )
{
- ASSERT( pWFlyPara, " Wo ist mein pWFlyPara ? " );
+ OSL_ENSURE( pWFlyPara, " Wo ist mein pWFlyPara ? " );
return true;
}
@@ -2718,7 +2703,7 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr,
{
if (pAktColl)
{
- ASSERT(rAttr.Which() != RES_FLTR_REDLINE, "redline in style!");
+ OSL_ENSURE(rAttr.Which() != RES_FLTR_REDLINE, "redline in style!");
pAktColl->SetFmtAttr(rAttr);
}
else if (pAktItemSet)
@@ -2732,14 +2717,14 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr,
else
{
pCtrlStck->NewAttr(*pPaM->GetPoint(), rAttr);
- // --> OD 2010-05-06 #i103711#
+ // #i103711#
if ( bFirstLineOfStSet )
{
const SwNode* pNd = &(pPaM->GetPoint()->nNode.GetNode());
maTxtNodesHavingFirstLineOfstSet.insert( pNd );
}
// <--
- // --> OD 2010-05-11 #i105414#
+ // #i105414#
if ( bLeftIndentSet )
{
const SwNode* pNd = &(pPaM->GetPoint()->nNode.GetNode());
@@ -2819,7 +2804,14 @@ void SwWW8ImplReader::Read_Obj(sal_uInt16 , const sal_uInt8* pData, short nLen)
bObj = 0 != *pData;
if( bObj && nPicLocFc && bEmbeddObj )
- nObjLocFc = nPicLocFc;
+ {
+ if ( maFieldStack.back().mnFieldId == 56 ) {
+ // For LINK fields, store the nObjLocFc value in the field entry
+ maFieldStack.back().mnObjLocFc = nPicLocFc;
+ } else {
+ nObjLocFc = nPicLocFc;
+ }
+ }
}
}
@@ -2905,7 +2897,8 @@ void SwWW8ImplReader::Read_BoldUsw( sal_uInt16 nId, const sal_uInt8* pData, shor
const int nContigiousWestern = 8;
const int nWestern = nContigiousWestern + 1;
const int nEastern = 2;
- const int nIds = nWestern + nEastern;
+ const int nCTL = 2;
+ const int nIds = nWestern + nEastern + nCTL;
static const sal_uInt16 nEndIds[ nIds ] =
{
RES_CHRATR_WEIGHT, RES_CHRATR_POSTURE,
@@ -2915,7 +2908,9 @@ void SwWW8ImplReader::Read_BoldUsw( sal_uInt16 nId, const sal_uInt8* pData, shor
RES_CHRATR_CROSSEDOUT,
- RES_CHRATR_CJK_WEIGHT, RES_CHRATR_CJK_POSTURE
+ RES_CHRATR_CJK_WEIGHT, RES_CHRATR_CJK_POSTURE,
+
+ RES_CHRATR_CTL_WEIGHT, RES_CHRATR_CTL_POSTURE
};
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
@@ -2939,11 +2934,19 @@ void SwWW8ImplReader::Read_BoldUsw( sal_uInt16 nId, const sal_uInt8* pData, shor
if (nLen < 0)
{
- pCtrlStck->SetAttr( *pPaM->GetPoint(), nEndIds[ nI ] );
- // reset the CJK Weight and Posture, because they are the same as their
- // western equivalents in word
if (nI < 2)
+ {
+ if (eVersion <= ww::eWW6)
+ {
+ // reset the CTL Weight and Posture, because they are the same as their
+ // western equivalents in ww6
+ pCtrlStck->SetAttr( *pPaM->GetPoint(), nEndIds[ nWestern + nEastern + nI ] );
+ }
+ // reset the CJK Weight and Posture, because they are the same as their
+ // western equivalents in word
pCtrlStck->SetAttr( *pPaM->GetPoint(), nEndIds[ nWestern + nI ] );
+ }
+ pCtrlStck->SetAttr( *pPaM->GetPoint(), nEndIds[ nI ] );
pCtrlStck->SetToggleAttr(nI, false);
return;
}
@@ -3019,7 +3022,7 @@ void SwWW8ImplReader::Read_BoldBiDiUsw(sal_uInt16 nId, const sal_uInt8* pData,
else
nI = static_cast< sal_uInt8 >(nId - 0x085C);
- ASSERT(nI <= 1, "not happening");
+ OSL_ENSURE(nI <= 1, "not happening");
if (nI > 1)
return;
@@ -3091,7 +3094,7 @@ void SwWW8ImplReader::SetToggleBiDiAttr(sal_uInt8 nAttrId, bool bOn)
}
break;
default:
- ASSERT(!this, "Unhandled unknown bidi toggle attribute");
+ OSL_ENSURE(!this, "Unhandled unknown bidi toggle attribute");
break;
}
@@ -3099,6 +3102,8 @@ void SwWW8ImplReader::SetToggleBiDiAttr(sal_uInt8 nAttrId, bool bOn)
void SwWW8ImplReader::SetToggleAttr(sal_uInt8 nAttrId, bool bOn)
{
+ ww::WordVersion eVersion = pWwFib->GetFIBVersion();
+
switch (nAttrId)
{
case 0:
@@ -3107,6 +3112,11 @@ void SwWW8ImplReader::SetToggleAttr(sal_uInt8 nAttrId, bool bOn)
NewAttr( aAttr );
aAttr.SetWhich( RES_CHRATR_CJK_WEIGHT );
NewAttr( aAttr );
+ if (eVersion <= ww::eWW6)
+ {
+ aAttr.SetWhich( RES_CHRATR_CTL_WEIGHT );
+ NewAttr( aAttr );
+ }
}
break;
case 1:
@@ -3115,6 +3125,11 @@ void SwWW8ImplReader::SetToggleAttr(sal_uInt8 nAttrId, bool bOn)
NewAttr( aAttr );
aAttr.SetWhich( RES_CHRATR_CJK_POSTURE );
NewAttr( aAttr );
+ if (eVersion <= ww::eWW6)
+ {
+ aAttr.SetWhich( RES_CHRATR_CTL_POSTURE );
+ NewAttr( aAttr );
+ }
}
break;
case 2:
@@ -3142,7 +3157,7 @@ void SwWW8ImplReader::SetToggleAttr(sal_uInt8 nAttrId, bool bOn)
: STRIKEOUT_NONE, RES_CHRATR_CROSSEDOUT ) );
break;
default:
- ASSERT(!this, "Unhandled unknown toggle attribute");
+ OSL_ENSURE(!this, "Unhandled unknown toggle attribute");
break;
}
}
@@ -3209,7 +3224,6 @@ void SwWW8ImplReader::Read_SubSuper( sal_uInt16, const sal_uInt8* pData, short n
SwFrmFmt *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion)
{
/*
- #92489# & #92946#
For inline graphics and objects word has a hacked in feature to use
subscripting to force the graphic into a centered position on the line, so
we must check when applying sub/super to see if it the subscript range
@@ -3243,7 +3257,6 @@ SwFrmFmt *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion)
bool SwWW8ImplReader::ConvertSubToGraphicPlacement()
{
/*
- #92489# & #92946#
For inline graphics and objects word has a hacked in feature to use
subscripting to force the graphic into a centered position on the line, so
we must check when applying sub/super to see if it the subscript range
@@ -3285,11 +3298,11 @@ void SwWW8ImplReader::Read_SubSuperProp( sal_uInt16, const sal_uInt8* pData, sho
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
// Font-Position in HalfPoints
- short nPos = eVersion <= ww::eWW2 ? *pData : SVBT16ToShort( pData );
+ short nPos = eVersion <= ww::eWW2 ? static_cast< sal_Int8 >( *pData ) : SVBT16ToShort( pData );
sal_Int32 nPos2 = nPos * ( 10 * 100 ); // HalfPoints in 100 * tw
const SvxFontHeightItem* pF
= (const SvxFontHeightItem*)GetFmtAttr(RES_CHRATR_FONTSIZE);
- ASSERT(pF, "Expected to have the fontheight available here");
+ OSL_ENSURE(pF, "Expected to have the fontheight available here");
// #i59022: Check ensure nHeight != 0. Div by zero otherwise.
sal_Int32 nHeight = 240;
@@ -3551,23 +3564,6 @@ bool SwWW8ImplReader::GetFontParams( sal_uInt16 nFCode, FontFamily& reFamily,
return true;
}
-sal_uInt16 SwWW8ImplReader::CorrectResIdForCharset(CharSet nCharSet, sal_uInt16 nWhich)
-{
- sal_uInt16 nResult = 0;
-
- switch (nCharSet) {
- case RTL_TEXTENCODING_MS_932:
- nResult = RES_CHRATR_CJK_FONT;
- break;
-
- default:
- nResult = nWhich;
- break;
- }
-
- return nResult;
-}
-
bool SwWW8ImplReader::SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums,
sal_uInt16 nWhich)
{
@@ -3617,8 +3613,6 @@ bool SwWW8ImplReader::SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums,
SvxFontItem aFont( eFamily, aName, aEmptyStr, ePitch, eDstCharSet, nWhich);
- nWhich = CorrectResIdForCharset(eSrcCharSet, nWhich);
-
if( bSetEnums )
{
if( pAktColl ) // StyleDef
@@ -3654,18 +3648,41 @@ bool SwWW8ImplReader::SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums,
void SwWW8ImplReader::ResetCharSetVars()
{
- ASSERT(!maFontSrcCharSets.empty(),"no charset to remove");
+ OSL_ENSURE(!maFontSrcCharSets.empty(),"no charset to remove");
if (!maFontSrcCharSets.empty())
maFontSrcCharSets.pop();
}
void SwWW8ImplReader::ResetCJKCharSetVars()
{
- ASSERT(!maFontSrcCJKCharSets.empty(),"no charset to remove");
+ OSL_ENSURE(!maFontSrcCJKCharSets.empty(),"no charset to remove");
if (!maFontSrcCJKCharSets.empty())
maFontSrcCJKCharSets.pop();
}
+void SwWW8ImplReader::openFont(sal_uInt16 nFCode, sal_uInt16 nId)
+{
+ if (SetNewFontAttr(nFCode, true, nId) && pAktColl && pStyles)
+ {
+ // merken zur Simulation Default-Font
+ if (RES_CHRATR_CJK_FONT == nId)
+ pStyles->bCJKFontChanged = true;
+ else if (RES_CHRATR_CTL_FONT == nId)
+ pStyles->bCTLFontChanged = true;
+ else
+ pStyles->bFontChanged = true;
+ }
+}
+
+void SwWW8ImplReader::closeFont(sal_uInt16 nId)
+{
+ pCtrlStck->SetAttr( *pPaM->GetPoint(), nId );
+ if (nId == RES_CHRATR_CJK_FONT)
+ ResetCJKCharSetVars();
+ else
+ ResetCharSetVars();
+}
+
/*
Font ein oder ausschalten:
*/
@@ -3675,45 +3692,43 @@ void SwWW8ImplReader::Read_FontCode( sal_uInt16 nId, const sal_uInt8* pData, sho
{ // (siehe sprmCSymbol) gesetzte Font !
switch( nId )
{
- // case 0x4a51: //font to bias towards all else being equal ?
- case 113:
- case 0x4a5E:
+ case 113: //WW7
+ case 0x4A51: //"Other" font, override with BiDi if it exists
+ case 0x4A5E: //BiDi Font
nId = RES_CHRATR_CTL_FONT;
break;
- case 93:
- case 111:
- case 0x4a4f:
+ case 93: //WW6
+ case 111: //WW7
+ case 0x4A4f:
nId = RES_CHRATR_FONT;
break;
- case 112:
- case 0x4a50:
+ case 112: //WW7
+ case 0x4A50:
nId = RES_CHRATR_CJK_FONT;
break;
default:
return ;
}
+ ww::WordVersion eVersion = pWwFib->GetFIBVersion();
+
if( nLen < 0 ) // Ende des Attributes
{
- pCtrlStck->SetAttr( *pPaM->GetPoint(), nId );
- if (nId == RES_CHRATR_CJK_FONT)
- ResetCJKCharSetVars();
- else
- ResetCharSetVars();
+ if (eVersion <= ww::eWW6)
+ {
+ closeFont(RES_CHRATR_CTL_FONT);
+ closeFont(RES_CHRATR_CJK_FONT);
+ }
+ closeFont(nId);
}
else
{
sal_uInt16 nFCode = SVBT16ToShort( pData ); // Font-Nummer
- if (SetNewFontAttr(nFCode, true, nId) // Lies Inhalt
- && pAktColl && pStyles ) // Style-Def ?
+ openFont(nFCode, nId);
+ if (eVersion <= ww::eWW6)
{
- // merken zur Simulation Default-Font
- if (RES_CHRATR_CJK_FONT == nId)
- pStyles->bCJKFontChanged = true;
- else if (RES_CHRATR_CTL_FONT == nId)
- pStyles->bCTLFontChanged = true;
- else
- pStyles->bFontChanged = true;
+ openFont(nFCode, RES_CHRATR_CJK_FONT);
+ openFont(nFCode, RES_CHRATR_CTL_FONT);
}
}
}
@@ -3728,8 +3743,8 @@ void SwWW8ImplReader::Read_FontSize( sal_uInt16 nId, const sal_uInt8* pData, sho
case 0x4a43:
nId = RES_CHRATR_FONTSIZE;
break;
- case 85:
- case 116:
+ case 85: //WW2
+ case 116: //WW7
case 0x4a61:
nId = RES_CHRATR_CTL_FONTSIZE;
break;
@@ -3737,34 +3752,45 @@ void SwWW8ImplReader::Read_FontSize( sal_uInt16 nId, const sal_uInt8* pData, sho
return ;
}
+ ww::WordVersion eVersion = pWwFib->GetFIBVersion();
+
if( nLen < 0 ) // Ende des Attributes
{
pCtrlStck->SetAttr( *pPaM->GetPoint(), nId );
- if( RES_CHRATR_FONTSIZE == nId ) // reset additional the CJK size
+ if (eVersion <= ww::eWW6) // reset additionally the CTL size
+ pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_CTL_FONTSIZE );
+ if (RES_CHRATR_FONTSIZE == nId) // reset additionally the CJK size
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_CJK_FONTSIZE );
}
else
{
- ww::WordVersion eVersion = pWwFib->GetFIBVersion();
-
// Font-Size in half points e.g. 10 = 1440 / ( 72 * 2 )
sal_uInt16 nFSize = eVersion <= ww::eWW2 ? *pData : SVBT16ToShort(pData);
nFSize*= 10;
SvxFontHeightItem aSz( nFSize, 100, nId );
NewAttr( aSz );
- if( RES_CHRATR_FONTSIZE == nId ) // set additional the CJK size
+ if (RES_CHRATR_FONTSIZE == nId) // set additionally the CJK size
{
aSz.SetWhich( RES_CHRATR_CJK_FONTSIZE );
NewAttr( aSz );
}
+ if (eVersion <= ww::eWW6) // set additionally the CTL size
+ {
+ aSz.SetWhich( RES_CHRATR_CTL_FONTSIZE );
+ NewAttr( aSz );
+ }
if (pAktColl && pStyles) // Style-Def ?
{
// merken zur Simulation Default-FontSize
if (nId == RES_CHRATR_CTL_FONTSIZE)
pStyles->bFCTLSizeChanged = true;
else
+ {
pStyles->bFSizeChanged = true;
+ if (eVersion <= ww::eWW6)
+ pStyles->bFCTLSizeChanged= true;
+ }
}
}
}
@@ -3791,11 +3817,12 @@ void SwWW8ImplReader::Read_Language( sal_uInt16 nId, const sal_uInt8* pData, sho
switch( nId )
{
case 97:
- case 0x486D:
+ case 0x486D: //sprmCRgLid0_80
case 0x4873: //Methinks, uncertain
nId = RES_CHRATR_LANGUAGE;
break;
- case 0x486E:
+ case 0x486E: //sprmCRgLid1_80
+ case 0x4874: //Methinks, uncertain
nId = RES_CHRATR_CJK_LANGUAGE;
break;
case 83:
@@ -3898,7 +3925,7 @@ void SwWW8ImplReader::Read_TxtBackColor(sal_uInt16, const sal_uInt8* pData, shor
}
else
{
- ASSERT(nLen == 10, "Len of para back colour not 10!");
+ OSL_ENSURE(nLen == 10, "Len of para back colour not 10!");
if (nLen != 10)
return;
Color aColour(ExtractColour(pData, bVer67));
@@ -3968,6 +3995,29 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe
if( pLR )
aLR = *(const SvxLRSpaceItem*)pLR;
+ // Fix the regression issue: #i99822#: Discussion?
+ // Since the list lever formatting doesn't apply into paragraph style
+ // for list levels of mode LABEL_ALIGNMENT.(see ww8par3.cxx
+ // W8ImplReader::RegisterNumFmtOnTxtNode).
+ // Need to apply the list format to the paragraph here.
+ SwTxtNode* pTxtNode = pPaM->GetNode()->GetTxtNode();
+ if( pTxtNode && pTxtNode->AreListLevelIndentsApplicable() )
+ {
+ SwNumRule * pNumRule = pTxtNode->GetNumRule();
+ if( pNumRule )
+ {
+ sal_uInt8 nLvl = static_cast< sal_uInt8 >(pTxtNode->GetActualListLevel());
+ const SwNumFmt* pFmt = pNumRule->GetNumFmt( nLvl );
+ if ( pFmt && pFmt->GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
+ {
+ aLR.SetTxtLeft( pFmt->GetIndentAt() );
+ aLR.SetTxtFirstLineOfst( static_cast<short>(pFmt->GetFirstLineIndent()) );
+ // make paragraph have hard-set indent attributes
+ pTxtNode->SetAttr( aLR );
+ }
+ }
+ }
+
/*
The older word sprms mean left/right, while the new ones mean before/after.
Writer now also works with before after, so when we see old left/right and
@@ -3994,12 +4044,8 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe
}
}
- // --> OD 2010-05-06 #i103711#
- bool bFirstLinOfstSet( false );
- // <--
- // --> OD 2010-05-11 #i105414#
- bool bLeftIndentSet( false );
- // <--
+ bool bFirstLinOfstSet( false ); // #i103711#
+ bool bLeftIndentSet( false ); // #i105414#
switch (nId)
{
@@ -4012,16 +4058,13 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe
{
pCollA[nAktColl].bListReleventIndentSet = true;
}
- // --> OD 2010-05-11 #i105414#
- bLeftIndentSet = true;
- // <--
+ bLeftIndentSet = true; // #i105414#
break;
//sprmPDxaLeft1
case 19:
case 0x8411:
case 0x8460:
/*
- #94672# #99584#
As part of an attempt to break my spirit ww 8+ formats can contain
ww 7- lists. If they do and the list is part of the style, then
when removing the list from a paragraph of that style there
@@ -4049,9 +4092,7 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe
{
pCollA[nAktColl].bListReleventIndentSet = true;
}
- // --> OD 2010-05-06 #i103711#
- bFirstLinOfstSet = true;
- // <--
+ bFirstLinOfstSet = true; // #i103711#
break;
//sprmPDxaRight
case 16:
@@ -4063,10 +4104,7 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe
return;
}
- // --> OD 2010-05-06 #i103711#
- // --> OD 2010-05-11 #i105414#
- NewAttr( aLR, bFirstLinOfstSet, bLeftIndentSet );
- // <--
+ NewAttr( aLR, bFirstLinOfstSet, bLeftIndentSet ); // #i103711#, #i105414#
}
// Sprm 20
@@ -4107,10 +4145,6 @@ void SwWW8ImplReader::Read_LineSpace( sal_uInt16, const sal_uInt8* pData, short
// bei proportional betraegt er min( 0cm, FontSize*(nFach-1) ) sowohl "vor"
// wie auch "nach"
- sal_uInt16 nWwPre = 0;
- sal_uInt16 nWwPost = 0;
- sal_uInt16 nSwPre = 0;
- sal_uInt16 nSwPost = 0;
sal_uInt16 nSpaceTw = 0;
SvxLineSpacingItem aLSpc( LINE_SPACE_DEFAULT_HEIGHT, RES_PARATR_LINESPACING );
@@ -4119,16 +4153,12 @@ void SwWW8ImplReader::Read_LineSpace( sal_uInt16, const sal_uInt8* pData, short
{
long n = nSpace * 10 / 24; // WW: 240 = 100%, SW: 100 = 100%
-//JP 03.12.98: nach Absprache mit AMA ist die Begrenzung unsinnig
+// nach Absprache mit AMA ist die Begrenzung unsinnig
if( n>200 ) n = 200; // SW_UI-Maximum
aLSpc.SetPropLineSpace( (const sal_uInt8)n );
const SvxFontHeightItem* pH = (const SvxFontHeightItem*)
GetFmtAttr( RES_CHRATR_FONTSIZE );
nSpaceTw = (sal_uInt16)( n * pH->GetHeight() / 100 );
-
- if( n > 100 )
- nWwPost = nSwPre = nSwPost = (sal_uInt16)( ( n - 100 )
- * pH->GetHeight() / 100 );
}
else // Fixed / Minimum
{
@@ -4136,19 +4166,6 @@ void SwWW8ImplReader::Read_LineSpace( sal_uInt16, const sal_uInt8* pData, short
nSpaceTw = (sal_uInt16)nSpace;
aLSpc.SetLineHeight( nSpaceTw );
aLSpc.GetLineSpaceRule() = eLnSpc;
- nSwPre = nSpace;
-
- if( SVX_LINE_SPACE_FIX == eLnSpc ) // Genau
- {
- nWwPre = (sal_uInt16)( 8L * nSpace / 10 );
- nWwPost = (sal_uInt16)( 2L * nSpace / 10 );
- nSwPre = nSpace;
- }
- else // Minimum
- {
- nWwPre = (sal_uInt16)( 129L * nSpace / 100 - 95 );// erst bei groesseren
- // Zeilenabstaenden
- }
}
NewAttr( aLSpc );
if( pSFlyPara )
@@ -4235,7 +4252,7 @@ void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLe
// im Style "Normal" eingefuegt, der
// gar nicht da ist. Ueber das IniFlag WW8FL_NO_STY_DYA laesst sich dieses
// Verhalten auch fuer andere WW-Versionen erzwingen
-// ASSERT( !bStyNormal || bWWBugNormal, "+Dieses Doc deutet evtl. auf einen
+// OSL_ENSURE( !bStyNormal || bWWBugNormal, "+Dieses Doc deutet evtl. auf einen
// Fehler in der benutzten WW-Version hin. Wenn sich die Styles <Standard> bzw.
// <Normal> zwischen WW und SW im Absatz- oder Zeilenabstand unterscheiden,
// dann bitte dieses Doc SH zukommen lassen." );
@@ -4391,7 +4408,7 @@ void SwWW8ImplReader::Read_BoolItem( sal_uInt16 nId, const sal_uInt8* pData, sho
nId = RES_PARATR_SCRIPTSPACE;
break;
default:
- ASSERT( !this, "wrong Id" );
+ OSL_ENSURE( !this, "wrong Id" );
return ;
}
@@ -4489,7 +4506,7 @@ void SwWW8ImplReader::Read_Relief( sal_uInt16 nId, const sal_uInt8* pData, short
{
if( *pData )
{
-// JP 16.03.2001 - not so eays because this is also a toggle attribute!
+// not so eays because this is also a toggle attribute!
// 2 x emboss on -> no emboss !!!
// the actual value must be searched over the stack / template
@@ -4518,7 +4535,7 @@ void SwWW8ImplReader::Read_TxtAnim(sal_uInt16 /*nId*/, const sal_uInt8* pData, s
{
bool bBlink;
- // #110851# The 7 animated text effects available in word all get
+ // The 7 animated text effects available in word all get
// mapped to a blinking text effect in StarOffice
// 0 no animation 1 Las Vegas lights
// 2 background blink 3 sparkle text
@@ -4537,14 +4554,14 @@ void SwWW8ImplReader::Read_TxtAnim(sal_uInt16 /*nId*/, const sal_uInt8* pData, s
SwWW8Shade::SwWW8Shade(bool bVer67, const WW8_SHD& rSHD)
{
sal_uInt8 b = rSHD.GetFore();
- ASSERT(b < 17, "ww8: colour out of range");
+ OSL_ENSURE(b < 17, "ww8: colour out of range");
if (b >= 17)
b = 0;
ColorData nFore(SwWW8ImplReader::GetCol(b));
b = rSHD.GetBack();
- ASSERT(b < 17, "ww8: colour out of range");
+ OSL_ENSURE(b < 17, "ww8: colour out of range");
if( b >= 17 )
b = 0;
@@ -4641,7 +4658,7 @@ void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
nUseBack = COL_WHITE;
- if( nIndex >= sizeof( eMSGrayScale ) / sizeof ( eMSGrayScale[ 0 ] ) )
+ if( nIndex >= SAL_N_ELEMENTS(eMSGrayScale))
nIndex = 0;
sal_uLong nWW8BrushStyle = eMSGrayScale[nIndex];
@@ -4711,7 +4728,7 @@ void SwWW8ImplReader::Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, sho
}
else
{
- ASSERT(nLen == 10, "Len of para back colour not 10!");
+ OSL_ENSURE(nLen == 10, "Len of para back colour not 10!");
if (nLen != 10)
return;
NewAttr(SvxBrushItem(Color(ExtractColour(pData, bVer67)), RES_BACKGROUND));
@@ -4720,13 +4737,14 @@ void SwWW8ImplReader::Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, sho
sal_uInt32 SwWW8ImplReader::ExtractColour(const sal_uInt8* &rpData,
bool
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bVer67
#endif
)
{
- ASSERT(bVer67 == false, "Impossible");
- //ASSERT(SVBT32ToUInt32(rpData) == 0xFF000000, "Unknown 1 not 0xff000000");
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE(bVer67 == false, "Impossible");
+#endif
sal_uInt32 nFore = wwUtility::BGRToRGB(SVBT32ToUInt32(rpData));
rpData+=4;
sal_uInt32 nBack = wwUtility::BGRToRGB(SVBT32ToUInt32(rpData));
@@ -4737,7 +4755,7 @@ sal_uInt32 SwWW8ImplReader::ExtractColour(const sal_uInt8* &rpData,
//background through, it merely acts like white
if (nBack == 0xFF000000)
nBack = COL_AUTO;
- ASSERT(nBack == COL_AUTO || !(nBack & 0xFF000000),
+ OSL_ENSURE(nBack == COL_AUTO || !(nBack & 0xFF000000),
"ww8: don't know what to do with such a transparent bg colour, report");
SwWW8Shade aShade(nFore, nBack, nIndex);
return aShade.aColor.GetColor();
@@ -4777,9 +4795,8 @@ void SwWW8ImplReader::Read_Border(sal_uInt16 , const sal_uInt8* , short nLen)
{
// in Apo keine Umrandungen *ein*-schalten, da ich
// sonst die Flyumrandungen doppelt bekomme
- // JP 04.12.98: aber nur wenn am Fly ein gesetzt ist, keine
- // uebernehmen. Sonst wird gar keine gesetzt!
- // Bug #59619#
+ // aber nur wenn am Fly ein gesetzt ist, keine
+ // uebernehmen. Sonst wird gar keine gesetzt!
// auch wenn kein Rand gesetzt ist, muss das Attribut gesetzt
// werden, sonst ist kein hartes Ausschalten von Style-Attrs
@@ -4798,10 +4815,19 @@ void SwWW8ImplReader::Read_Border(sal_uInt16 , const sal_uInt8* , short nLen)
maTracer.Log(sw::log::eBorderDistOutside);
- aBox.SetDistance( (sal_uInt16)aInnerDist.Left(), BOX_LINE_LEFT );
- aBox.SetDistance( (sal_uInt16)aInnerDist.Top(), BOX_LINE_TOP );
- aBox.SetDistance( (sal_uInt16)aInnerDist.Right(), BOX_LINE_RIGHT );
- aBox.SetDistance( (sal_uInt16)aInnerDist.Bottom(), BOX_LINE_BOTTOM );
+ if ((nBorder & WW8_LEFT)==WW8_LEFT) {
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Left(), BOX_LINE_LEFT );
+ }
+ if ((nBorder & WW8_TOP)==WW8_TOP) {
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Top(), BOX_LINE_TOP );
+ }
+ if ((nBorder & WW8_RIGHT)==WW8_RIGHT) {
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Right(), BOX_LINE_RIGHT );
+ }
+
+ if ((nBorder & WW8_BOT)==WW8_BOT) {
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Bottom(), BOX_LINE_BOTTOM );
+ }
NewAttr( aBox );
@@ -4895,7 +4921,7 @@ void SwWW8ImplReader::Read_AlignFont( sal_uInt16, const sal_uInt8* pData, short
break;
default:
nVal = SvxParaVertAlignItem::AUTOMATIC;
- ASSERT(!this,"Unknown paragraph vertical align");
+ OSL_ENSURE(!this,"Unknown paragraph vertical align");
break;
}
NewAttr( SvxParaVertAlignItem( nVal, RES_PARATR_VERTALIGN ) );
@@ -5197,7 +5223,7 @@ const wwSprmDispatcher *GetWW2SprmDispatcher()
{99, 0} //"sprmPicBrcRight",
};
- static wwSprmDispatcher aSprmSrch(aSprms, sizeof(aSprms) / sizeof(aSprms[0]));
+ static wwSprmDispatcher aSprmSrch(aSprms, SAL_N_ELEMENTS(aSprms));
return &aSprmSrch;
}
@@ -5559,7 +5585,7 @@ const wwSprmDispatcher *GetWW6SprmDispatcher()
{207, 0}, //dunno
};
- static wwSprmDispatcher aSprmSrch(aSprms, sizeof(aSprms) / sizeof(aSprms[0]));
+ static wwSprmDispatcher aSprmSrch(aSprms, SAL_N_ELEMENTS(aSprms));
return &aSprmSrch;
}
@@ -5867,8 +5893,8 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
{0x085B, 0}, //"sprmCFDiacColor"
{0x085C, &SwWW8ImplReader::Read_BoldBiDiUsw},//"sprmCFBoldBi"
{0x085D, &SwWW8ImplReader::Read_BoldBiDiUsw},//"sprmCFItalicBi"
- {0x4A5E, &SwWW8ImplReader::Read_FontCode},
- {0x485F, &SwWW8ImplReader::Read_Language}, // "sprmCLidBi"
+ {0x4A5E, &SwWW8ImplReader::Read_FontCode}, //"sprmCFtcBi"
+ {0x485F, &SwWW8ImplReader::Read_Language}, //"sprmCLidBi"
//0x4A60, ? ? ?, //"sprmCIcoBi",
{0x4A61, &SwWW8ImplReader::Read_FontSize}, //"sprmCHpsBi"
{0xCA62, 0}, //"sprmCDispFldRMark"
@@ -5893,10 +5919,10 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
//chp.fUsePgsuSettings; 1 or 0;
//bit;
{0x486B, 0}, //"sprmCCpg" ;;word;
- {0x486D, &SwWW8ImplReader::Read_Language}, //"sprmCRgLid0" chp.rglid[0];
+ {0x486D, &SwWW8ImplReader::Read_Language}, //"sprmCRgLid0_80" chp.rglid[0];
//LID: for non-Far East text;
//word;
- {0x486E, &SwWW8ImplReader::Read_Language}, //"sprmCRgLid1" chp.rglid[1];
+ {0x486E, &SwWW8ImplReader::Read_Language}, //"sprmCRgLid1_80" chp.rglid[1];
//LID: for Far East text;word;
{0x286F, &SwWW8ImplReader::Read_IdctHint}, //"sprmCIdctHint" chp.idctHint;
//IDCT: byte;
@@ -6110,10 +6136,12 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
{0xC650, 0}, //undocumented
{0xC651, 0}, //undocumented
{0xF661, 0}, //undocumented
- {0x4873, &SwWW8ImplReader::Read_Language}, //"sprmCRgLid3?" chp.rglid[0];
- //LID: for non-Far East text
+ {0x4873, &SwWW8ImplReader::Read_Language}, //"sprmCRgLid0" chp.rglid[0];
+ //LID: for non-Far East text;
//(like a duplicate of 486D)
- {0x4874, 0}, //undocumented
+ {0x4874, 0}, //"sprmCRgLid1" chp.rglid[1];
+ //LID: for Far East text
+ //(like a duplicate of 486E)
{0x6463, 0}, //undocumented
{0x2461, &SwWW8ImplReader::Read_RTLJustify}, //undoc, must be asian version
//of "sprmPJc"
@@ -6146,7 +6174,7 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
{0x246D, &SwWW8ImplReader::Read_DontAddEqual}//undocumented, para
};
- static wwSprmDispatcher aSprmSrch(aSprms, sizeof(aSprms) / sizeof(aSprms[0]));
+ static wwSprmDispatcher aSprmSrch(aSprms, SAL_N_ELEMENTS(aSprms));
return &aSprmSrch;
}
@@ -6197,7 +6225,7 @@ short SwWW8ImplReader::ImportSprm(const sal_uInt8* pPos,sal_uInt16 nId)
nId = mpSprmParser->GetSprmId(pPos);
#if OSL_DEBUG_LEVEL > 1
- ASSERT( nId != 0xff, "Sprm FF !!!!" );
+ OSL_ENSURE( nId != 0xff, "Sprm FF !!!!" );
#endif
const SprmReadInfo& rSprm = GetSprmReadInfo(nId);
@@ -6211,4 +6239,4 @@ short SwWW8ImplReader::ImportSprm(const sal_uInt8* pPos,sal_uInt16 nId)
return nL;
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index da83e8617025..eaaa1e0b609a 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,37 +28,41 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
#include "ww8scan.hxx"
-
#include <functional>
#include <algorithm>
#include <string.h> // memset()
#include <rtl/tencinfo.h>
+#include <sal/macros.h>
#ifdef DUMP
#define ERR_SWG_READ_ERROR 1234
-#define ASSERT( a, b )
+#define OSL_ENSURE( a, b )
#else // dump
#include <swerror.h> // ERR_WW6_...
#include <swtypes.hxx> // DELETEZ
#endif // dump
+#include <comphelper/processfactory.hxx>
+#include <unotools/localedatawrapper.hxx>
#include <tools/debug.hxx>
#include <i18npool/lang.h>
+#include <editeng/unolingu.hxx>
#include <vcl/svapp.hxx> // Application #i90932#
#include <stdio.h>
#define ASSERT_RET_ON_FAIL( aCon, aError, aRet ) \
- ASSERT(aCon, aError); \
+ OSL_ENSURE(aCon, aError); \
if (!(aCon)) \
return aRet;
+using namespace ::com::sun::star::lang;
+
//-begin
namespace SL
{
@@ -251,7 +256,7 @@ const wwSprmSearcher *wwSprmParser::GetWW2SprmSearcher()
{164, 4, L_FIX}, // "sprmTSetShd", tap.rgshd complex 4 bytes
};
- static wwSprmSearcher aSprmSrch(aSprms, sizeof(aSprms) / sizeof(aSprms[0]));
+ static wwSprmSearcher aSprmSrch(aSprms, SAL_N_ELEMENTS(aSprms));
return &aSprmSrch;
};
@@ -434,7 +439,7 @@ const wwSprmSearcher *wwSprmParser::GetWW6SprmSearcher()
{207, 0, L_VAR} // rtl property ?
};
- static wwSprmSearcher aSprmSrch(aSprms, sizeof(aSprms) / sizeof(aSprms[0]));
+ static wwSprmSearcher aSprmSrch(aSprms, SAL_N_ELEMENTS(aSprms));
return &aSprmSrch;
};
@@ -623,8 +628,8 @@ const wwSprmSearcher *wwSprmParser::GetWW8SprmSearcher()
{0x0868, 1, L_FIX}, // "sprmCFUsePgsuSettings"
// chp.fUsePgsuSettings;1 or 0
{0x486B, 2, L_FIX}, // "sprmCCpg" ;;word;
- {0x486D, 2, L_FIX}, // "sprmCRgLid0" chp.rglid[0];LID: for non-FE text
- {0x486E, 2, L_FIX}, // "sprmCRgLid1" chp.rglid[1];LID: for Far East text
+ {0x486D, 2, L_FIX}, // "sprmCRgLid0_80" chp.rglid[0];LID: for non-FE text
+ {0x486E, 2, L_FIX}, // "sprmCRgLid1_80" chp.rglid[1];LID: for Far East text
{0x286F, 1, L_FIX}, // "sprmCIdctHint" chp.idctHint;IDCT:
{0x2E00, 1, L_FIX}, // "sprmPicBrcl" pic.brcl;brcl (see PIC definition)
{0xCE01, 0, L_VAR}, // "sprmPicScale" pic.mx, pic.my, pic.dxaCropleft,
@@ -740,8 +745,8 @@ const wwSprmSearcher *wwSprmParser::GetWW8SprmSearcher()
{0xC650, 0, L_VAR}, // undocumented
{0xC651, 0, L_VAR}, // undocumented
{0xF661, 3, L_FIX}, // undocumented
- {0x4873, 2, L_FIX}, // undocumented
- {0x4874, 2, L_FIX}, // undocumented
+ {0x4873, 2, L_FIX}, // "sprmCRgLid0" chp.rglid[0];LID: for non-FE text
+ {0x4874, 2, L_FIX}, // "sprmCRgLid1" chp.rglid[1];LID: for Far East text
{0x6463, 4, L_FIX}, // undocumented
{0x2461, 1, L_FIX}, // undoc, must be asian version of "sprmPJc"
{0x845D, 2, L_FIX}, // undoc, must be asian version of "sprmPDxaRight"
@@ -773,13 +778,13 @@ const wwSprmSearcher *wwSprmParser::GetWW8SprmSearcher()
{0x246D, 1, L_FIX}
};
- static wwSprmSearcher aSprmSrch(aSprms, sizeof(aSprms) / sizeof(aSprms[0]));
+ static wwSprmSearcher aSprmSrch(aSprms, SAL_N_ELEMENTS(aSprms));
return &aSprmSrch;
};
wwSprmParser::wwSprmParser(ww::WordVersion eVersion) : meVersion(eVersion)
{
- ASSERT((meVersion >= ww::eWW2 && meVersion <= ww::eWW8),
+ OSL_ENSURE((meVersion >= ww::eWW2 && meVersion <= ww::eWW8),
"Impossible value for version");
mnDelta = (ww::IsSevenMinus(meVersion)) ? 0 : 1;
@@ -800,7 +805,7 @@ SprmInfo wwSprmParser::GetSprmInfo(sal_uInt16 nId) const
const SprmInfo* pFound = mpKnownSprms->search(aSrch);
if (pFound == 0)
{
- ASSERT(ww::IsEightPlus(meVersion),
+ OSL_ENSURE(ww::IsEightPlus(meVersion),
"Unknown ww7- sprm, dangerous, report to development");
aSrch.nId = 0;
@@ -890,27 +895,22 @@ void WW8SprmIter::SetSprms(const sal_uInt8* pSprms_, long nLen_)
UpdateMyMembers();
}
-const sal_uInt8* WW8SprmIter::operator ++( int )
+void WW8SprmIter::advance()
{
if (nRemLen > 0 )
{
- if( nRemLen >= nAktSize )
- {
- pSprms += nAktSize;
- nRemLen -= nAktSize;
- UpdateMyMembers();
- }
- else
- {
- throw( ::std::exception() );
- }
+ sal_uInt16 nSize = nAktSize;
+ if (nSize > nRemLen)
+ nSize = nRemLen;
+ pSprms += nSize;
+ nRemLen -= nSize;
+ UpdateMyMembers();
}
- return pSprms;
}
void WW8SprmIter::UpdateMyMembers()
{
- if (pSprms && nRemLen > (mrSprmParser.getVersion()?1:0)) //see #125180#
+ if (pSprms && nRemLen > (mrSprmParser.getVersion()?1:0))
{
nAktId = mrSprmParser.GetSprmId(pSprms);
pAktParams = pSprms + mrSprmParser.DistanceToData(nAktId);
@@ -931,7 +931,7 @@ const sal_uInt8* WW8SprmIter::FindSprm(sal_uInt16 nId)
{
if( GetAktId() == nId )
return GetAktParams(); // SPRM found!
- operator ++(0);
+ advance();
}
return 0; // SPRM _not_ found
@@ -1192,7 +1192,7 @@ WW8PLCFx& WW8PLCFx_PCD::operator ++( int )
if (pPcdI)
(*pPcdI)++;
else {
- ASSERT( !this, "pPcdI fehlt");
+ OSL_ENSURE( !this, "pPcdI fehlt");
}
return *this;
}
@@ -1204,11 +1204,11 @@ WW8_FC WW8PLCFx_PCD::AktPieceStartCp2Fc( WW8_CP nCp )
if ( !pPcdI->Get(nCpStart, nCpEnd, pData) )
{
- ASSERT( !this, "AktPieceStartCp2Fc() with false Cp found (1)" );
+ OSL_ENSURE( !this, "AktPieceStartCp2Fc() with false Cp found (1)" );
return WW8_FC_MAX;
}
- ASSERT( nCp >= nCpStart && nCp < nCpEnd,
+ OSL_ENSURE( nCp >= nCpStart && nCp < nCpEnd,
"AktPieceCp2Fc() with false Cp found (2)" );
if( nCp < nCpStart )
@@ -1242,7 +1242,7 @@ WW8_CP WW8PLCFx_PCD::AktPieceStartFc2Cp( WW8_FC nStartPos )
void* pData;
if ( !pPcdI->Get( nCpStart, nCpEnd, pData ) )
{
- ASSERT( !this, "AktPieceStartFc2Cp() - Fehler" );
+ OSL_ENSURE( !this, "AktPieceStartFc2Cp() - Fehler" );
return WW8_CP_MAX;
}
bool bIsUnicode = false;
@@ -1288,8 +1288,8 @@ short WW8_BRC::DetermineBorderProperties(bool bVer67, short *pSpace,
//Dashed/Dotted unsets double/thick
if (nMSTotalWidth > 5)
{
+ nIdx = nMSTotalWidth;
nMSTotalWidth=1;
- nIdx = 1;
}
nMSTotalWidth = nMSTotalWidth * nIdx * 15;
}
@@ -1480,15 +1480,21 @@ short WW8_BRC::DetermineBorderProperties(bool bVer67, short *pSpace,
return nMSTotalWidth;
}
+/*
+ * WW8Cp2Fc is a good method, a CP always maps to a FC
+ * WW8Fc2Cp on the other hand is more dubious, a random FC
+ * may not map to a valid CP. Try and avoid WW8Fc2Cp where
+ * possible
+ */
WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
{
WW8_CP nFallBackCpEnd = WW8_CP_MAX;
if( nFcPos == WW8_FC_MAX )
return nFallBackCpEnd;
- bool bIsUnicode = false;
if( pPieceIter ) // Complex File ?
{
+ bool bIsUnicode = false;
sal_uLong nOldPos = pPieceIter->GetIdx();
for (pPieceIter->SetIdx(0);
@@ -1498,7 +1504,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
void* pData;
if( !pPieceIter->Get( nCpStart, nCpEnd, pData ) )
{ // ausserhalb PLCFfpcd ?
- ASSERT( !this, "PLCFpcd-WW8Fc2Cp() ging schief" );
+ OSL_ENSURE( !this, "PLCFpcd-WW8Fc2Cp() ging schief" );
break;
}
sal_Int32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
@@ -1546,9 +1552,11 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
return nFallBackCpEnd;
}
// No complex file
- if (pWw8Fib->fExtChar)
- bIsUnicode=true;
- return ((nFcPos - pWw8Fib->fcMin) / (bIsUnicode ? 2 : 1));
+ if (!pWw8Fib->fExtChar)
+ nFallBackCpEnd = (nFcPos - pWw8Fib->fcMin);
+ else
+ nFallBackCpEnd = (nFcPos - pWw8Fib->fcMin + 1) / 2;
+ return nFallBackCpEnd;
}
WW8_FC WW8ScannerBase::WW8Cp2Fc(WW8_CP nCpPos, bool* pIsUnicode,
@@ -1573,7 +1581,7 @@ WW8_FC WW8ScannerBase::WW8Cp2Fc(WW8_CP nCpPos, bool* pIsUnicode,
if( pTestFlag )
*pTestFlag = false;
else {
- ASSERT( !this, "Falscher CP an WW8Cp2Fc() uebergeben" );
+ OSL_ENSURE( !this, "Falscher CP an WW8Cp2Fc() uebergeben" );
}
return WW8_FC_MAX;
}
@@ -1584,7 +1592,7 @@ WW8_FC WW8ScannerBase::WW8Cp2Fc(WW8_CP nCpPos, bool* pIsUnicode,
if( pTestFlag )
*pTestFlag = false;
else {
- ASSERT( !this, "PLCFfpcd-Get ging schief" );
+ OSL_ENSURE( !this, "PLCFfpcd-Get ging schief" );
}
return WW8_FC_MAX;
}
@@ -1593,10 +1601,12 @@ WW8_FC WW8ScannerBase::WW8Cp2Fc(WW8_CP nCpPos, bool* pIsUnicode,
WW8_FC nRet = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
if (8 > pWw8Fib->nVersion)
- if (pWw8Fib->fExtChar)
+ {
+ if (pWw8Fib->fExtChar)
*pIsUnicode=true;
else
- *pIsUnicode = false;
+ *pIsUnicode = false;
+ }
else
nRet = WW8PLCFx_PCD::TransformPieceAddress( nRet, *pIsUnicode );
@@ -1682,7 +1692,7 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
}
else
*pStr >> nPLCFfLen;
- ASSERT( 65536 > nPLCFfLen, "PLCFfpcd ueber 64 k" );
+ OSL_ENSURE( 65536 > nPLCFfLen, "PLCFfpcd ueber 64 k" );
return new WW8PLCFpcd( pStr, pStr->Tell(), nPLCFfLen, 8 );
}
@@ -1816,7 +1826,7 @@ WW8ScannerBase::WW8ScannerBase( SvStream* pSt, SvStream* pTblSt,
break;
default:
- ASSERT( !this, "Es wurde vergessen, nVersion zu kodieren!" );
+ OSL_ENSURE( !this, "Es wurde vergessen, nVersion zu kodieren!" );
break;
}
@@ -2252,7 +2262,7 @@ bool WW8PLCFspecial::GetData(long nInIdx, WW8_CP& rPos, void*& rpValue) const
WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
WW8_CP nStartPos ) : pPLCF_PosArray(0), nIdx(0), nStru(nStruct)
{
- ASSERT( nPLCF, "WW8PLCF: nPLCF ist Null!" );
+ OSL_ENSURE( nPLCF, "WW8PLCF: nPLCF ist Null!" );
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
@@ -2313,7 +2323,7 @@ void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF )
pSt->Seek( nOldPos );
- ASSERT( !failure, "Document has corrupt PLCF, ignoring it" );
+ OSL_ENSURE( !failure, "Document has corrupt PLCF, ignoring it" );
if (failure)
MakeFailedPLCF();
@@ -2330,7 +2340,7 @@ void WW8PLCF::MakeFailedPLCF()
void WW8PLCF::GeneratePLCF( SvStream* pSt, sal_Int32 nPN, sal_Int32 ncpN )
{
- ASSERT( nIMax < ncpN, "Pcl.Fkp: Warum ist PLCF zu gross ?" );
+ OSL_ENSURE( nIMax < ncpN, "Pcl.Fkp: Warum ist PLCF zu gross ?" );
bool failure = false;
nIMax = ncpN;
@@ -2385,7 +2395,7 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, sal_Int32 nPN, sal_Int32 ncpN )
}
}
- ASSERT( !failure, "Document has corrupt PLCF, ignoring it" );
+ OSL_ENSURE( !failure, "Document has corrupt PLCF, ignoring it" );
if (failure)
MakeFailedPLCF();
@@ -2561,6 +2571,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
long nOldPos = pSt->Tell();
pSt->Seek(nFilePos);
+ memset(maRawData, 0, 512);
pSt->Read(maRawData, 512);
mnIMax = maRawData[511];
@@ -2605,24 +2616,36 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
aEntry.mnLen = maRawData[nOfs+1];
nDelta++;
}
-
aEntry.mnLen *= 2;
//stylecode, std/istd
if (eVersion == ww::eWW2)
{
- aEntry.mnIStd = *(maRawData+nOfs+1+nDelta);
- aEntry.mnLen--; //style code
- aEntry.mnLen-=6; //PHE
- //skipi stc, len byte + 6 byte PHE
- aEntry.mpData = maRawData + nOfs + 8;
+ if (aEntry.mnLen >= 1)
+ {
+ aEntry.mnIStd = *(maRawData+nOfs+1+nDelta);
+ aEntry.mnLen--; //style code
+ if (aEntry.mnLen >= 6)
+ {
+ aEntry.mnLen-=6; //PHE
+ //skipi stc, len byte + 6 byte PHE
+ aEntry.mpData = maRawData + nOfs + 8;
+ }
+ else
+ aEntry.mnLen=0; //Too short
+ }
}
else
{
- aEntry.mnIStd = SVBT16ToShort(maRawData+nOfs+1+nDelta);
- aEntry.mnLen-=2; //istd
- //skip istd, len byte + optional extra len byte
- aEntry.mpData = maRawData + nOfs + 3 + nDelta;
+ if (aEntry.mnLen >= 2)
+ {
+ aEntry.mnIStd = SVBT16ToShort(maRawData+nOfs+1+nDelta);
+ aEntry.mnLen-=2; //istd
+ //skip istd, len byte + optional extra len byte
+ aEntry.mpData = maRawData + nOfs + 3 + nDelta;
+ }
+ else
+ aEntry.mnLen=0; //Too short, ignore
}
sal_uInt16 nSpId = aEntry.mnLen ? maSprmParser.GetSprmId(aEntry.mpData) : 0;
@@ -2660,19 +2683,29 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
}
break;
default:
- ASSERT(false, "sweet god, what have you done!");
+ OSL_ENSURE(false, "sweet god, what have you done!");
break;
}
}
maEntries.push_back(aEntry);
+
+#ifdef DEBUGSPRMREADER
+ {
+ sal_Int32 nLen;
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
+
+ WW8SprmIter aIter(pSprms, nLen, maSprmParser);
+ while(aIter.GetSprms())
+ aIter.advance();
+ }
+#endif
}
//one more FC than grrpl entries
maEntries.push_back(Entry(Get_Long(pStart)));
- //#104773#, we expect them sorted, but it appears possible
- //for them to arive unsorted
+ //we expect them sorted, but it appears possible for them to arive unsorted
std::sort(maEntries.begin(), maEntries.end());
mnIdx = 0;
@@ -2699,6 +2732,9 @@ WW8PLCFx_Fc_FKP::WW8Fkp::Entry::Entry(const Entry &rEntry)
WW8PLCFx_Fc_FKP::WW8Fkp::Entry&
WW8PLCFx_Fc_FKP::WW8Fkp::Entry::operator=(const Entry &rEntry)
{
+ if (this == &rEntry)
+ return *this;
+
if (mbMustDelete)
delete[] mpData;
@@ -2823,7 +2859,7 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(sal_uInt16 nId,
{
if (aIter.GetAktId() == nId)
rResult.push_back(aIter.GetAktParams());
- aIter++;
+ aIter.advance();
};
return !rResult.empty();
}
@@ -2831,7 +2867,7 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(sal_uInt16 nId,
//-----------------------------------------
void WW8PLCFx::GetSprms( WW8PLCFxDesc* p )
{
- ASSERT( !this, "Falsches GetSprms gerufen" );
+ OSL_ENSURE( !this, "Falsches GetSprms gerufen" );
p->nStartPos = p->nEndPos = WW8_CP_MAX;
p->pMemPos = 0;
p->nSprmsLen = 0;
@@ -2841,7 +2877,7 @@ void WW8PLCFx::GetSprms( WW8PLCFxDesc* p )
long WW8PLCFx::GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen )
{
- ASSERT( !this, "Falsches GetNoSprms gerufen" );
+ OSL_ENSURE( !this, "Falsches GetNoSprms gerufen" );
rStart = rEnd = WW8_CP_MAX;
rLen = 0;
return 0;
@@ -2902,7 +2938,7 @@ bool WW8PLCFx_Fc_FKP::NewFkp()
break;
default:
// Programm-Fehler!
- ASSERT( !this, "Es wurde vergessen, nVersion zu kodieren!" );
+ OSL_ENSURE( !this, "Es wurde vergessen, nVersion zu kodieren!" );
return false;
}
@@ -2917,7 +2953,7 @@ bool WW8PLCFx_Fc_FKP::NewFkp()
long nAktFkpFilePos = pFkp ? pFkp->GetFilePos() : -1;
if (nAktFkpFilePos == nPo)
- pFkp->Reset(GetStartFc()); // #79464# //
+ pFkp->Reset(GetStartFc());
else
{
myiter aIter =
@@ -3146,7 +3182,7 @@ bool WW8PLCFx_Fc_FKP::HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rR
{
if (aIter.GetAktId() == nId)
rResult.push_back(aIter.GetAktParams());
- aIter++;
+ aIter.advance();
};
}
return !rResult.empty();
@@ -3243,7 +3279,6 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
else
{
/*
- #93702#
For the odd case where we have a location in a fastsaved file which
does not have an entry in the FKP, perhaps its para end is in the next
piece, or perhaps the cp just doesn't exist at all in this document.
@@ -3357,7 +3392,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
{
if( !pPieceIter->Get( nCpStart, nCpEnd, pData ) )
{
- ASSERT( !this, "piece iter broken!" );
+ OSL_ENSURE( !this, "piece iter broken!" );
break;
}
bIsUnicode = false;
@@ -3858,7 +3893,7 @@ WW8PLCFx& WW8PLCFx_FLD::operator ++( int )
bool WW8PLCFx_FLD::GetPara(long nIdx, WW8FieldDesc& rF)
{
- ASSERT( pPLCF, "Aufruf ohne Feld PLCFspecial" );
+ OSL_ENSURE( pPLCF, "Aufruf ohne Feld PLCFspecial" );
if( !pPLCF )
return false;
@@ -3932,7 +3967,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen
rStrm.SeekRel( nExtraLen );
}
}
- // #129053# read the value of the document variables, if requested.
+ // read the value of the document variables, if requested.
if (pValueArray)
{
for( sal_uInt16 i=0; i < nStrings; i++ )
@@ -3955,7 +3990,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen
sal_uInt8 nBChar;
if( nLen2 != nLen )
{
- ASSERT( nLen2 == nLen, "Fib length and read length are different" );
+ OSL_ENSURE( nLen2 == nLen, "Fib length and read length are different" );
if (nLen > USHRT_MAX)
nLen = USHRT_MAX;
else if (nLen < 2 )
@@ -3975,8 +4010,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen
else
rArray.push_back(aEmptyStr);
- // #89125# Skip the extra data (for bVer67 versions this must come
- // from external knowledge)
+ // Skip the extra data (for bVer67 versions this must come from external knowledge)
if (nExtraLen)
{
if (pExtraArray)
@@ -4129,14 +4163,14 @@ long WW8PLCFx_Book::GetLen() const
{
if( nIsEnd )
{
- ASSERT( !this, "Falscher Aufruf (1) von PLCF_Book::GetLen()" );
+ OSL_ENSURE( !this, "Falscher Aufruf (1) von PLCF_Book::GetLen()" );
return 0;
}
void * p;
WW8_CP nStartPos;
if( !pBook[0]->Get( nStartPos, p ) )
{
- ASSERT( !this, "Falscher Aufruf (2) von PLCF_Book::GetLen()" );
+ OSL_ENSURE( !this, "Falscher Aufruf (2) von PLCF_Book::GetLen()" );
return 0;
}
sal_uInt16 nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
@@ -4147,7 +4181,7 @@ long WW8PLCFx_Book::GetLen() const
void WW8PLCFx_Book::SetStatus(sal_uInt16 nIndex, eBookStatus eStat )
{
- ASSERT(nIndex < nIMax, "set status of non existing bookmark!");
+ OSL_ENSURE(nIndex < nIMax, "set status of non existing bookmark!");
pStatus[nIndex] = (eBookStatus)( pStatus[nIndex] | eStat );
}
@@ -4191,7 +4225,7 @@ String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex)
nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
else
{
- ASSERT( !this, "Bookmark-EndIdx nicht lesbar" );
+ OSL_ENSURE( !this, "Bookmark-EndIdx nicht lesbar" );
nEndIdx = i;
}
@@ -4238,20 +4272,8 @@ bool WW8PLCFx_Book::MapName(String& rName)
bool bFound = false;
sal_uInt16 i = 0;
- WW8_CP nStartAkt, nEndAkt;
do
{
- void* p;
- sal_uInt16 nEndIdx;
-
- if( pBook[0]->GetData( i, nStartAkt, p ) && p )
- nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
- else
- {
- ASSERT( !this, "Bookmark-EndIdx nicht lesbar" );
- nEndIdx = i;
- }
- nEndAkt = pBook[1]->GetPos( nEndIdx );
if (COMPARE_EQUAL == rName.CompareIgnoreCaseToAscii(aBookNames[i]))
{
rName = aBookNames[i];
@@ -4325,7 +4347,7 @@ void WW8PLCFMan::AdjustEnds( WW8PLCFxDesc& rDesc )
void WW8PLCFxDesc::ReduceByOffset()
{
- ASSERT((WW8_CP_MAX == nStartPos) || (nStartPos <= nEndPos),
+ OSL_ENSURE((WW8_CP_MAX == nStartPos) || (nStartPos <= nEndPos),
"Attr-Anfang und -Ende ueber Kreuz" );
if( nStartPos != WW8_CP_MAX )
@@ -4343,7 +4365,7 @@ void WW8PLCFxDesc::ReduceByOffset()
}
if( nEndPos != WW8_CP_MAX )
{
- ASSERT(nCpOfs <= nEndPos,
+ OSL_ENSURE(nCpOfs <= nEndPos,
"oh oh, so much for the subdocument piece theory");
nEndPos -= nCpOfs;
}
@@ -4364,7 +4386,7 @@ void WW8PLCFMan::GetNewNoSprms( WW8PLCFxDesc& rDesc )
rDesc.nCp2OrIdx = rDesc.pPLCFx->GetNoSprms(rDesc.nStartPos, rDesc.nEndPos,
rDesc.nSprmsLen);
- ASSERT((WW8_CP_MAX == rDesc.nStartPos) || (rDesc.nStartPos <= rDesc.nEndPos),
+ OSL_ENSURE((WW8_CP_MAX == rDesc.nStartPos) || (rDesc.nStartPos <= rDesc.nEndPos),
"Attr-Anfang und -Ende ueber Kreuz" );
rDesc.ReduceByOffset();
@@ -4578,7 +4600,7 @@ WW8PLCFMan::~WW8PLCFMan()
// 2. CP, wo ist naechste Attr.-Aenderung
sal_uInt16 WW8PLCFMan::WhereIdx(bool* pbStart, long* pPos) const
{
- ASSERT(nPLCF,"What the hell");
+ OSL_ENSURE(nPLCF,"What the hell");
long nNext = LONG_MAX; // SuchReihenfolge:
sal_uInt16 nNextIdx = nPLCF;// first ending found ( CHP, PAP, ( SEP ) ),
bool bStart = true; // dann Anfaenge finden ( ( SEP ), PAP, CHP )
@@ -4703,7 +4725,7 @@ void WW8PLCFMan::GetSprmEnd( short nIdx, WW8PLCFManResult* pRes ) const
pRes->nSprmId = p->pIdStk->top(); // get end position
else
{
- ASSERT( !this, "No Id on the Stack" );
+ OSL_ENSURE( !this, "No Id on the Stack" );
pRes->nSprmId = 0;
}
}
@@ -4819,7 +4841,6 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
p->nStartPos = p->nOrigEndPos+p->nCpOfs;
/*
- #93702#
On failed seek we have run out of sprms, probably. But if its
a fastsaved file (has pPcd) then we may be just in a sprm free
gap between pieces that have them, so set dirty flag in sprm
@@ -4874,7 +4895,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
p->nSprmsLen = 0;
GetNewSprms( *p );
}
- ASSERT( p->nStartPos <= p->nEndPos, "Attribut ueber Kreuz" );
+ OSL_ENSURE( p->nStartPos <= p->nEndPos, "Attribut ueber Kreuz" );
}
}
}
@@ -4965,7 +4986,7 @@ bool WW8PLCFMan::Get(WW8PLCFManResult* pRes) const
if( nIdx >= nPLCF )
{
- ASSERT( !this, "Position not found" );
+ OSL_ENSURE( !this, "Position not found" );
return true;
}
@@ -5003,7 +5024,7 @@ sal_uInt16 WW8PLCFMan::GetColl() const
return pPap->pPLCFx->GetIstd();
else
{
- ASSERT( !this, "GetColl ohne PLCF_Pap" );
+ OSL_ENSURE( !this, "GetColl ohne PLCF_Pap" );
return 0;
}
}
@@ -5157,15 +5178,16 @@ WW8_CP WW8Fib::GetBaseCp(ManTypes nType) const
case MAN_HDFT:
nOffset = ccpText + ccpFtn;
break;
-/*
- * A subdocument of this kind probably exists in some defunct version
- * of MSWord, but now ccpMcr is always 0
- */
-#if 0
+ /*
+ A subdocument of this kind (MAN_MACRO) probably exists in some defunct
+ version of MSWord, but now ccpMcr is always 0. If some example that
+ uses this comes to light, this is the likely calculation required
+
case MAN_MACRO:
nOffset = ccpText + ccpFtn + ccpHdr;
break;
-#endif
+
+ */
case MAN_AND:
nOffset = ccpText + ccpFtn + ccpHdr + ccpMcr;
break;
@@ -5186,6 +5208,22 @@ WW8_CP WW8Fib::GetBaseCp(ManTypes nType) const
ww::WordVersion WW8Fib::GetFIBVersion() const
{
ww::WordVersion eVer = ww::eWW8;
+ /*
+ * Word for Windows 2 I think (1.X might work too if anyone has an example.
+ * Various pages claim that the fileformats of Word 1 and 2 for Windows are
+ * equivalent to Word for Macintosh 4 and 5. On the other hand
+ *
+ * wIdents for Word for Mac versions...
+ * 0xFE32 for Word 1
+ * 0xFE34 for Word 3
+ * 0xFE37 for Word 4 et 5.
+ *
+ * and this document
+ * http://cmsdoc.cern.ch/documents/docformat/CMS_CERN_LetterHead.word is
+ * claimed to be "Word 5 for Mac" by Office etc and has that wIdent, but
+ * its format isn't the same as that of Word 2 for windows. Nor is it
+ * the same as that of Word for DOS/PCWord 5
+ */
if (wIdent == 0xa5db)
eVer = ww::eWW2;
else
@@ -5248,7 +5286,7 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset)
nFibMin = 0; // Programm-Fehler!
nFibMax = 0;
nFib = 1;
- ASSERT( !this, "Es wurde vergessen, nVersion zu kodieren!" );
+ OSL_ENSURE( !this, "Es wurde vergessen, nVersion zu kodieren!" );
break;
}
if ( (nFib < nFibMin) || (nFib > nFibMax) )
@@ -5616,11 +5654,6 @@ WW8Fib::WW8Fib(sal_uInt8 nVer)
fExtChar = true;
fWord97Saved = fWord2000Saved = true;
- // diese Flags muessen nicht gesetzt werden; koennen aber.
- // wMagicCreated = wMagicRevised = 0x6a62;
- // wMagicCreatedPrivate = wMagicRevisedPrivate = 0xb3b2;
- //
-
wMagicCreated = 0x6143;
wMagicRevised = 0x6C6F;
wMagicCreatedPrivate = 0x6E61;
@@ -5657,7 +5690,17 @@ WW8Fib::WW8Fib(sal_uInt8 nVer)
fFarEast = false;
break;
};
- // <-- #i90932#
+ // <--
+
+ Locale aTempLocale;
+ SvxLanguageToLocale( aTempLocale, lid );
+ LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), aTempLocale );
+ nNumDecimalSep = aLocaleWrapper.getNumDecimalSep().GetChar( 0 );
+}
+
+sal_Unicode WW8Fib::getNumDecimalSep() const
+{
+ return nNumDecimalSep;
}
bool WW8Fib::WriteHeader(SvStream& rStrm)
@@ -5977,7 +6020,7 @@ bool WW8Fib::Write(SvStream& rStrm)
rtl_TextEncoding WW8Fib::GetFIBCharset(sal_uInt16 chs)
{
- ASSERT(chs <= 0x100, "overflowed winword charset set");
+ OSL_ENSURE(chs <= 0x100, "overflowed winword charset set");
rtl_TextEncoding eCharSet =
(0x0100 == chs)
? RTL_TEXTENCODING_APPLE_ROMAN
@@ -5988,7 +6031,7 @@ rtl_TextEncoding WW8Fib::GetFIBCharset(sal_uInt16 chs)
WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
: rFib(rFibPara), rSt(rStream), cstd(0), cbSTDBaseInFile(0),
stiMaxWhenSaved(0), istdMaxFixedWhenSaved(0), nVerBuiltInNamesWhenSaved(0),
- ftcStandardChpStsh(0), ftcStandardChpCJKStsh(0), ftcStandardChpCTLStsh(0)
+ ftcAsci(0), ftcFE(0), ftcOther(0), ftcBi(0)
{
nStyleStart = rFib.fcStshf;
nStyleLen = rFib.lcbStshf;
@@ -6033,17 +6076,22 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
rSt >> nVerBuiltInNamesWhenSaved;
if( 14 > nRead ) break;
- rSt >> ftcStandardChpStsh;
+ rSt >> ftcAsci;
if( 16 > nRead ) break;
- rSt >> ftcStandardChpCJKStsh;
+ rSt >> ftcFE;
if ( 18 > nRead ) break;
- rSt >> ftcStandardChpCTLStsh;
+ rSt >> ftcOther;
+
+ ftcBi = ftcOther;
+
+ if ( 20 > nRead ) break;
+ rSt >> ftcBi;
// ggfs. den Rest ueberlesen
- if( 18 < nRead )
- rSt.SeekRel( nRead-18 );
+ if( 20 < nRead )
+ rSt.SeekRel( nRead-20 );
}
while( !this ); // Trick: obiger Block wird genau einmal durchlaufen
// und kann vorzeitig per "break" verlassen werden.
@@ -6176,7 +6224,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* pString, short* pcbStd )
}
break;
default:
- ASSERT(!this, "Es wurde vergessen, nVersion zu kodieren!");
+ OSL_ENSURE(!this, "Es wurde vergessen, nVersion zu kodieren!");
break;
}
}
@@ -6257,7 +6305,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
// always in ANSI, even if eStructCharSet == CHARSET_MAC !!
if( rFib.lcbSttbfffn <= 2 )
{
- ASSERT( !this, "Fonttabelle kaputt! (rFib.lcbSttbfffn < 2)" );
+ OSL_ENSURE( !this, "Fonttabelle kaputt! (rFib.lcbSttbfffn < 2)" );
pFontA = 0;
nMax = 0;
return;
@@ -6729,7 +6777,6 @@ WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize)
a32Bit = Get_Long( pData ); // 512 0x200
// i#78591#
- // fDontUseHTMLAutoSpacing = (a32Bit & 0x4) >> 2;
SetCompatabilityOptions2(a32Bit);
}
if (nRead >= 550)
@@ -7229,7 +7276,6 @@ sal_uInt16 WW8DopTypography::GetConvertedLang() const
//i.e. i.e. whats with the powers of two ?
/*
- #84082#
One example of 3 for reserved1 which was really Japanese, perhaps last bit
is for some other use ?, or redundant. If more examples trigger the assert
we might be able to figure it out.
@@ -7249,7 +7295,7 @@ sal_uInt16 WW8DopTypography::GetConvertedLang() const
nLang = LANGUAGE_CHINESE_TRADITIONAL;
break;
default:
- ASSERT(!this, "Unknown MS Asian Typography language, report");
+ OSL_ENSURE(!this, "Unknown MS Asian Typography language, report");
nLang = LANGUAGE_CHINESE;
break;
case 0:
@@ -7306,7 +7352,7 @@ sal_uInt16 wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
nL = static_cast< sal_uInt16 >(SVBT16ToShort( &pSprm[1 + mnDelta] ) + aSprm.nLen - 1);
break;
default:
- ASSERT(!this, "Unknown sprm varient");
+ OSL_ENSURE(!this, "Unknown sprm varient");
break;
}
break;
@@ -7371,4 +7417,4 @@ SEPr::SEPr() :
memset(rgdxaColumnWidthSpacing, 0, sizeof(rgdxaColumnWidthSpacing));
}
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 369f1199a2bd..96300f4fbe5a 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,8 +26,6 @@
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
#ifndef _WW8SCAN_HXX
#define _WW8SCAN_HXX
@@ -41,13 +40,10 @@
#include <tools/datetime.hxx>
#include <tools/stream.hxx>
#include <tools/string.hxx>
-#include <errhdl.hxx> // ASSERT()
#include "hash_wrap.hxx"
#include "sortedarray.hxx"
-#ifndef WW8STRUC_HXX
#include "ww8struc.hxx" // FIB, STSHI, STD...
-#endif
#include <types.hxx>
#include <unomid.h>
@@ -264,7 +260,7 @@ public:
const wwSprmParser &rSprmParser);
void SetSprms( const sal_uInt8* pSprms_, long nLen_ );
const sal_uInt8* FindSprm(sal_uInt16 nId);
- const sal_uInt8* operator ++( int );
+ void advance();
const sal_uInt8* GetSprms() const
{ return ( pSprms && (0 < nRemLen) ) ? pSprms : 0; }
const sal_uInt8* GetAktParams() const { return pAktParams; }
@@ -548,7 +544,6 @@ private:
WW8Fkp* pFkp;
/*
- #100042#
Keep a cache of eMaxCache entries of previously seen pFkps, which
speeds up considerably table parsing and load save plcfs for what turn
out to be small text frames, which frames generally are
@@ -686,7 +681,7 @@ public:
long Count() const { return ( pRef ) ? pRef->GetIMax() : 0; }
};
-/// Iterator for footnotes and endnotes
+/// Iterator for fields
class WW8PLCFx_FLD : public WW8PLCFx
{
private:
@@ -988,6 +983,9 @@ public:
*/
class WW8Fib
{
+private:
+ sal_Unicode nNumDecimalSep;
+
public:
/**
Program-Version asked for by us:
@@ -1445,6 +1443,7 @@ public:
static rtl_TextEncoding GetFIBCharset(sal_uInt16 chs);
ww::WordVersion GetFIBVersion() const;
WW8_CP GetBaseCp(ManTypes nType) const;
+ sal_Unicode getNumDecimalSep() const;
};
class WW8Style
@@ -1463,11 +1462,13 @@ protected:
sal_uInt16 istdMaxFixedWhenSaved; // How many fixed-index istds are there?
sal_uInt16 nVerBuiltInNamesWhenSaved; // Current version of built-in stylenames
// ftc used by StandardChpStsh for this document
- sal_uInt16 ftcStandardChpStsh;
+ sal_uInt16 ftcAsci;
// CJK ftc used by StandardChpStsh for this document
- sal_uInt16 ftcStandardChpCJKStsh;
+ sal_uInt16 ftcFE;
+ // CTL/Other ftc used by StandardChpStsh for this document
+ sal_uInt16 ftcOther;
// CTL ftc used by StandardChpStsh for this document
- sal_uInt16 ftcStandardChpCTLStsh;
+ sal_uInt16 ftcBi;
//No copying
WW8Style(const WW8Style&);
@@ -1781,4 +1782,4 @@ const sal_uInt16 lLetterHeight = 15842;
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx
index a4f80b77ca4a..7f2e7ab55ea4 100644
--- a/sw/source/filter/ww8/ww8struc.hxx
+++ b/sw/source/filter/ww8/ww8struc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,8 +26,6 @@
*
************************************************************************/
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-
#ifndef _WW8STRUC_HXX
#define _WW8STRUC_HXX
@@ -34,6 +33,8 @@
#include <tools/string.hxx>
#include <sal/config.h>
+#include <editeng/borderline.hxx>
+
#if defined OSL_BIGENDIAN || SAL_TYPES_ALIGNMENT4 > 2 || defined UNX
# define __WW8_NEEDS_COPY
#endif
@@ -289,12 +290,14 @@ public:
sal_uInt16 mnOut;
sal_uInt16 mnIn;
sal_uInt16 mnDist;
+ SvxBorderStyle mnType;
public:
enum eBorderCode
{
single0, single1, single2, single3, single4, single5,
double0, double1, double2, double3, double4, double5, double6,
double7, double8, double9, double10,
+ dashed, dotted,
none
};
static const WW8_BordersSO &Get0x01LineMatch(eBorderCode nIdx);
@@ -608,55 +611,6 @@ struct WW8_OLST
};
// cbOLST is 212(decimal), D4(hex).
-#if 0
-struct ANLV
-{
- ALNV();
- void ReadFromMem(const sal_uInt8 *&pData);
- sal_uInt8 nfc;
- sal_uInt8 cbTextBefore;
- sal_uInt8 cbTextAfter;
- sal_uInt8 jc : 2;
- sal_uInt8 fPrev : 1;
- sal_uInt8 fHang : 1;
- sal_uInt8 fSetBold : 1;
- sal_uInt8 fSetItalic : 1;
- sal_uInt8 fSetSmallCaps : 1;
- sal_uInt8 fSetCaps : 1;
- sal_uInt8 fSetStrike : 1;
- sal_uInt8 fSetKul : 1;
- sal_uInt8 fPrevSpace : 1;
- sal_uInt8 fBold : 1;
- sal_uInt8 fItalic : 1;
- sal_uInt8 fSmallCaps : 1;
- sal_uInt8 fCaps : 1;
- sal_uInt8 fStrike : 1;
- sal_uInt8 kul : 3;
- sal_uInt8 ico : 5;
- sal_uInt16 ftc;
- sal_uInt16 hps;
- sal_uInt16 iStartAt;
- sal_uInt16 dxaIndent;
- sal_uInt16 dxaSpace;
-};
-
-struct OLST
-{
- OLST();
- void ReadFromMem(const sal_uInt8 *&pData, bool bVer67)
- ANLV rganlv[9]; // 0 an array of 9 ANLV structures (heading levels)
- sal_uInt8 fRestartHdr; // when ==1, restart heading on section break
- sal_uInt8 fSpareOlst2; // reserved
- sal_uInt8 fSpareOlst3; // reserved
- sal_uInt8 fSpareOlst4; // reserved
- sal_uInt16 rgxch[64]; // array of 64 chars text before/after number
-#if 0
- sal_uInt16 rgxch[32]; // array of 32 chars text before/after number
- sal_uInt8 rgch[64]; // array of 64 chars text before/after number
-#endif
-};
-#endif
-
struct WW8_FDOA
{
SVBT32 fc; // 0 FC pointing to drawing object data
@@ -993,7 +947,7 @@ struct SEPr
sal_uInt16 dmBinFirst;
sal_uInt16 dmBinOther;
sal_uInt16 dmPaperReq;
-#if 0
+/*
28 1C brcTop BRC top page border
32 20 brcLeft BRC left page border
@@ -1001,7 +955,7 @@ struct SEPr
36 24 brcBottom BRC bottom page border
40 28 brcRight BRC right page border
-#endif
+*/
sal_Int16 fPropRMark;
sal_Int16 ibstPropRMark;
sal_Int32 dttmPropRMark; //DTTM
@@ -1043,9 +997,6 @@ struct SEPr
sal_uInt8 dmOrientFirst;
sal_uInt8 fLayout;
sal_Int16 reserved4;
-#if 0
- OLST olstAnm; //currently unused
-#endif
};
namespace wwUtility
@@ -1056,4 +1007,4 @@ namespace wwUtility
#endif
-/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
new file mode 100644
index 000000000000..0f4a644989e8
--- /dev/null
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -0,0 +1,1332 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Noel Power <noel.power@novell.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Noel Power <noel.power@novell.com>
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "ww8toolbar.hxx"
+#include <rtl/ustrbuf.hxx>
+#include <stdarg.h>
+#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
+#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XSingleComponentFactory.hpp>
+#include <com/sun/star/lang/XMultiComponentFactory.hpp>
+#include <com/sun/star/ui/XImageManager.hpp>
+#include <com/sun/star/ui/ItemType.hpp>
+#include <fstream>
+#include <comphelper/processfactory.hxx>
+#include <vcl/graph.hxx>
+#include <map>
+using namespace com::sun::star;
+
+// no. of visual data elements in a CTB ( fixed )
+const short nVisualData = 5;
+
+typedef std::map< sal_Int16, rtl::OUString > IdToString;
+
+class MSOWordCommandConvertor : public MSOCommandConvertor
+{
+ IdToString msoToOOcmd;
+ IdToString tcidToOOcmd;
+public:
+ MSOWordCommandConvertor();
+ virtual rtl::OUString MSOCommandToOOCommand( sal_Int16 msoCmd );
+ virtual rtl::OUString MSOTCIDToOOCommand( sal_Int16 key );
+};
+
+MSOWordCommandConvertor::MSOWordCommandConvertor()
+{
+ // mso command id to ooo command string
+ // #FIXME and *HUNDREDS* of id's to added here
+ msoToOOcmd[ 0x20b ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".uno:CloseDoc") );
+ msoToOOcmd[ 0x50 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".uno:Open") );
+
+ // mso tcid to ooo command string
+ // #FIXME and *HUNDREDS* of id's to added here
+ tcidToOOcmd[ 0x9d9 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".uno:Print") );
+}
+
+rtl::OUString MSOWordCommandConvertor::MSOCommandToOOCommand( sal_Int16 key )
+{
+ rtl::OUString sResult;
+ IdToString::iterator it = msoToOOcmd.find( key );
+ if ( it != msoToOOcmd.end() )
+ sResult = it->second;
+ return sResult;
+}
+
+rtl::OUString MSOWordCommandConvertor::MSOTCIDToOOCommand( sal_Int16 key )
+{
+ rtl::OUString sResult;
+ IdToString::iterator it = tcidToOOcmd.find( key );
+ if ( it != tcidToOOcmd.end() )
+ sResult = it->second;
+ return sResult;
+}
+
+
+CTBWrapper::CTBWrapper( bool bReadId ) : Tcg255SubStruct( bReadId )
+,reserved2(0)
+,reserved3(0)
+,reserved4(0)
+,reserved5(0)
+,cbTBD(0)
+,cCust(0)
+,cbDTBC(0)
+,rtbdc(0)
+{
+}
+
+CTBWrapper::~CTBWrapper()
+{
+}
+
+Customization* CTBWrapper::GetCustomizaton( sal_Int16 index )
+{
+ if ( index < 0 || index >= static_cast<sal_Int16>( rCustomizations.size() ) )
+ return NULL;
+ return &rCustomizations[ index ];
+}
+
+CTB* CTBWrapper::GetCustomizationData( const rtl::OUString& sTBName )
+{
+ CTB* pCTB = NULL;
+ for ( std::vector< Customization >::iterator it = rCustomizations.begin(); it != rCustomizations.end(); ++it )
+ {
+ if ( it->GetCustomizationData() && it->GetCustomizationData()->GetName().equals( sTBName ) )
+ {
+ pCTB = it->GetCustomizationData();
+ break;
+ }
+ }
+ return pCTB;
+}
+
+bool CTBWrapper::Read( SvStream* pS )
+{
+ OSL_TRACE("CTBWrapper::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ Tcg255SubStruct::Read( pS );
+ *pS >> reserved2 >> reserved3 >> reserved4 >> reserved5;
+ *pS >> cbTBD >> cCust >> cbDTBC;
+ long nExpectedPos = pS->Tell() + cbDTBC;
+ if ( cbDTBC )
+ {
+ // cbDTBC is the size in bytes of the TBC array
+ // but the size of a TBC element is dynamic ( and this relates to TBDelta's
+ int nStart = pS->Tell();
+
+ int bytesRead = 0;
+ int bytesToRead = cbDTBC - bytesRead;
+ // cbDTBC specifies the size ( in bytes ) taken by an array ( of unspecified size )
+ // of TBC records ( TBC records have dynamic length, so we need to check our position
+ // after each read )
+ do
+ {
+ TBC aTBC;
+ if ( !aTBC.Read( pS ) )
+ return false;
+ rtbdc.push_back( aTBC );
+ bytesToRead = cbDTBC - ( pS->Tell() - nStart );
+ } while ( bytesToRead > 0 );
+ }
+ if ( static_cast< long >( pS->Tell() ) != nExpectedPos )
+ {
+ // Strange error condition, shouldn't happen ( but does in at least
+ // one test document ) In the case where it happens the TBC &
+ // TBCHeader records seem blank??? ( and incorrect )
+ OSL_ENSURE( static_cast< long >(pS->Tell()) == nExpectedPos, "### Error: Expected pos not equal to actual pos after reading rtbdc");
+ OSL_TRACE("\tPos now is 0x%x should be 0x%x", pS->Tell(), nExpectedPos );
+ // seek to correct position after rtbdc
+ pS->Seek( nExpectedPos );
+ }
+ if ( cCust )
+ {
+ for ( sal_Int32 index = 0; index < cCust; ++index )
+ {
+ Customization aCust( this );
+ if ( !aCust.Read( pS ) )
+ return false;
+ rCustomizations.push_back( aCust );
+ }
+ }
+ std::vector< sal_Int16 >::iterator it_end = dropDownMenuIndices.end();
+ for ( std::vector< sal_Int16 >::iterator it = dropDownMenuIndices.begin(); it != it_end; ++it )
+ {
+ rCustomizations[ *it ].bIsDroppedMenuTB = true;
+ }
+ return true;
+}
+
+TBC* CTBWrapper::GetTBCAtOffset( sal_uInt32 nStreamOffset )
+{
+ for ( std::vector< TBC >::iterator it = rtbdc.begin(); it != rtbdc.end(); ++it )
+ {
+ if ( (*it).GetOffset() == nStreamOffset )
+ return &(*it);
+ }
+ return NULL;
+}
+
+void CTBWrapper::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf(fp,"[ 0x%x ] CTBWrapper - dump\n", nOffSet );
+ bool bRes = ( ch == 0x12 && reserved2 == 0x0 && reserved3 == 0x7 && reserved4 == 0x6 && reserved5 == 0xC );
+ if ( bRes )
+ indent_printf(fp," sanity check ( first 8 bytes conform )\n");
+ else
+ {
+ indent_printf(fp," reserved1(0x%x)\n",ch);
+ indent_printf(fp," reserved2(0x%x)\n",reserved2);
+ indent_printf(fp," reserved3(0x%x)\n",reserved3);
+ indent_printf(fp," reserved4(0x%x)\n",reserved4);
+ indent_printf(fp," reserved5(0x%x)\n",reserved5);
+ indent_printf(fp,"Quiting dump");
+ return;
+ }
+ indent_printf(fp," size of TBDelta structures 0x%x\n", cbTBD );
+ indent_printf(fp," cCust: no. of cCust structures 0x%x\n",cCust);
+ indent_printf(fp," cbDTBC: no. of bytes in rtbdc array 0x%x\n", static_cast< unsigned int >( cbDTBC ));
+
+ sal_Int32 index = 0;
+
+ for ( std::vector< TBC >::iterator it = rtbdc.begin(); it != rtbdc.end(); ++it, ++index )
+ {
+ indent_printf(fp," Dumping rtbdc[%d]\n", static_cast< int >( index ));
+ Indent b;
+ it->Print( fp );
+ }
+
+ index = 0;
+
+ for ( std::vector< Customization >::iterator it = rCustomizations.begin(); it != rCustomizations.end(); ++it, ++index )
+ {
+ indent_printf(fp," Dumping custimization [%d]\n", static_cast< int >( index ));
+ Indent c;
+ it->Print(fp);
+ }
+}
+
+bool CTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh )
+{
+ for ( std::vector< Customization >::iterator it = rCustomizations.begin(); it != rCustomizations.end(); ++it )
+ {
+ uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
+ uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( xMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ) ) ), uno::UNO_QUERY_THROW );
+ CustomToolBarImportHelper helper( rDocSh, xAppCfgSupp->getUIConfigurationManager( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument" ) ) ) );
+ helper.setMSOCommandMap( new MSOWordCommandConvertor() );
+
+ if ( !(*it).ImportCustomToolBar( *this, helper ) )
+ return false;
+ }
+ return false;
+}
+
+Customization::Customization( CTBWrapper* wrapper ) : tbidForTBD( 0 )
+,reserved1( 0 )
+, ctbds( 0 )
+, pWrapper( wrapper )
+, bIsDroppedMenuTB( false )
+{
+}
+
+Customization::~Customization()
+{
+}
+
+bool Customization::Read( SvStream *pS)
+{
+ OSL_TRACE("Custimization::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ *pS >> tbidForTBD >> reserved1 >> ctbds;
+ if ( tbidForTBD )
+ {
+ for ( sal_Int32 index = 0; index < ctbds; ++index )
+ {
+ TBDelta aTBDelta;
+ if (!aTBDelta.Read( pS ) )
+ return false;
+ customizationDataTBDelta.push_back( aTBDelta );
+ // Only set the drop down for menu's associated with standard toolbar
+ if ( aTBDelta.ControlDropsToolBar() && tbidForTBD == 0x25 )
+ pWrapper->InsertDropIndex( aTBDelta.CustomizationIndex() );
+ }
+ }
+ else
+ {
+ customizationDataCTB.reset( new CTB() );
+ if ( !customizationDataCTB->Read( pS ) )
+ return false;
+ }
+ return true;
+}
+
+void Customization::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf( fp,"[ 0x%x ] Customization -- dump \n", nOffSet );
+ indent_printf( fp," tbidForTBD 0x%x ( should be 0 for CTBs )\n", static_cast< unsigned int >( tbidForTBD ));
+ indent_printf( fp," reserved1 0x%x \n", reserved1);
+ indent_printf( fp," ctbds - number of customisations %d(0x%x) \n", ctbds, ctbds );
+ if ( !tbidForTBD && !ctbds )
+ customizationDataCTB->Print( fp );
+ else
+ {
+ const char* pToolBar = NULL;
+ switch ( tbidForTBD )
+ {
+ case 0x9:
+ pToolBar = "Standard";
+ break;
+ case 0x25:
+ pToolBar = "Builtin-Menu";
+ break;
+ default:
+ pToolBar = "Unknown toolbar";
+ break;
+ }
+
+ indent_printf( fp," TBDelta(s) are associated with %s toolbar.\n", pToolBar);
+ std::vector< TBDelta >::iterator it = customizationDataTBDelta.begin();
+ for ( sal_Int32 index = 0; index < ctbds; ++it,++index )
+ it->Print( fp );
+ }
+
+}
+
+bool Customization::ImportMenu( CTBWrapper& rWrapper, CustomToolBarImportHelper& helper )
+{
+ if ( tbidForTBD == 0x25 ) // we can handle in a limited way additions the built-in menu bar
+ {
+ for ( std::vector< TBDelta >::iterator it = customizationDataTBDelta.begin(); it != customizationDataTBDelta.end(); ++it )
+ {
+ // for each new menu ( control that drops a toolbar )
+ // import a toolbar
+ if ( it->ControlIsInserted() && it->ControlDropsToolBar() )
+ {
+ Customization* pCust = pWrapper->GetCustomizaton( it->CustomizationIndex() );
+ if ( pCust )
+ {
+ // currently only support built-in menu
+ rtl::OUString sMenuBar( RTL_CONSTASCII_USTRINGPARAM("private:resource/menubar/") );
+
+ sMenuBar = sMenuBar.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("menubar") ) );
+ // Get menu name
+ TBC* pTBC = pWrapper->GetTBCAtOffset( it->TBCStreamOffset() );
+ if ( !pTBC )
+ return false;
+ rtl::OUString sMenuName = pTBC->GetCustomText();
+ sMenuName = sMenuName.replace('&','~');
+
+ // see if the document has already setting for the menubar
+
+ uno::Reference< container::XIndexContainer > xIndexContainer;
+ bool bHasSettings = false;
+ if ( helper.getCfgManager()->hasSettings( sMenuBar ) )
+ {
+ xIndexContainer.set( helper.getCfgManager()->getSettings( sMenuBar, sal_True ), uno::UNO_QUERY_THROW );
+ bHasSettings = true;
+ }
+ else
+ {
+ if ( helper.getAppCfgManager()->hasSettings( sMenuBar ) )
+ xIndexContainer.set( helper.getAppCfgManager()->getSettings( sMenuBar, sal_True ), uno::UNO_QUERY_THROW );
+ else
+ xIndexContainer.set( helper.getAppCfgManager()->createSettings(), uno::UNO_QUERY_THROW );
+ }
+
+ uno::Reference< lang::XSingleComponentFactory > xSCF( xIndexContainer, uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
+ uno::Reference< uno::XComponentContext > xContext( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), uno::UNO_QUERY_THROW );
+ // create the popup menu
+ uno::Sequence< beans::PropertyValue > aPopupMenu( 4 );
+ aPopupMenu[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CommandURL") );
+ aPopupMenu[0].Value = uno::makeAny( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("vnd.openoffice.org:") ) + sMenuName );
+ aPopupMenu[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Label") );
+ aPopupMenu[1].Value <<= sMenuName;
+ aPopupMenu[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Type" ) );
+ aPopupMenu[2].Value <<= sal_Int32( 0 );
+ aPopupMenu[3].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ItemDescriptorContainer") );
+ uno::Reference< container::XIndexContainer > xMenuContainer( xSCF->createInstanceWithContext( xContext ), uno::UNO_QUERY_THROW );
+ aPopupMenu[3].Value <<= xMenuContainer;
+ if ( pCust->customizationDataCTB.get() && !pCust->customizationDataCTB->ImportMenuTB( rWrapper, xMenuContainer, helper ) )
+ return false;
+ OSL_TRACE("** there are %d menu items on the bar, inserting after that", xIndexContainer->getCount() );
+ xIndexContainer->insertByIndex( xIndexContainer->getCount(), uno::makeAny( aPopupMenu ) );
+
+ if ( bHasSettings )
+ helper.getCfgManager()->replaceSettings( sMenuBar, uno::Reference< container::XIndexAccess >( xIndexContainer, uno::UNO_QUERY_THROW ) );
+ else
+ helper.getCfgManager()->insertSettings( sMenuBar, uno::Reference< container::XIndexAccess >( xIndexContainer, uno::UNO_QUERY_THROW ) );
+ uno::Reference< ui::XUIConfigurationPersistence > xPersistence( helper.getCfgManager(), uno::UNO_QUERY_THROW );
+ xPersistence->store();
+ }
+ }
+ }
+ return true;
+ }
+ return true;
+}
+
+bool Customization::ImportCustomToolBar( CTBWrapper& rWrapper, CustomToolBarImportHelper& helper )
+{
+ if ( GetTBIDForTB() == 0x25 )
+ return ImportMenu( rWrapper, helper );
+ if ( !customizationDataCTB.get() )
+ return false;
+ if ( !customizationDataCTB->IsMenuToolbar() )
+ {
+ if ( !customizationDataCTB->ImportCustomToolBar( rWrapper, helper ) )
+ return false;
+ }
+ return true;
+}
+
+TBDelta::TBDelta() : doprfatendFlags(0)
+,ibts(0)
+,cidNext(0)
+,cid(0)
+,fc(0)
+,cbTBC(0)
+{
+}
+
+bool TBDelta::ControlIsModified()
+{
+ return ( ( doprfatendFlags & 0x3 ) == 0x2 );
+}
+
+bool TBDelta::ControlIsInserted()
+{
+ return ( ( doprfatendFlags & 0x3 ) == 0x1 );
+}
+
+bool TBDelta::ControlIsChanged()
+{
+ return ( ( doprfatendFlags & 0x3 ) == 0x1 );
+}
+
+bool TBDelta::ControlDropsToolBar()
+{
+ return !( CiTBDE & 0x8000 );
+}
+
+sal_Int32 TBDelta::TBCStreamOffset()
+{
+ return fc;
+}
+
+sal_Int16 TBDelta::CustomizationIndex()
+{
+ sal_Int16 nIndex = CiTBDE;
+ nIndex = nIndex >> 1;
+ nIndex &= 0x1ff; // only 13 bits are relevant
+ return nIndex;
+}
+
+bool TBDelta::Read(SvStream *pS)
+{
+ OSL_TRACE("TBDelta::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ *pS >> doprfatendFlags >> ibts >> cidNext >> cid >> fc ;
+ *pS >> CiTBDE >> cbTBC;
+ return true;
+}
+
+void TBDelta::Print( FILE* fp )
+{
+ // Like most of the debug output, it's raw and little ( no )
+ // interpretation of the data is output ( e.g. flag values etc. )
+ indent_printf( fp, "[ 0x%x ] TBDelta -- dump\n", nOffSet );
+ indent_printf( fp, " doprfatendFlags 0x%x\n",doprfatendFlags );
+
+ indent_printf( fp, " ibts 0x%x\n",ibts );
+ indent_printf( fp, " cidNext 0x%x\n", static_cast< unsigned int >( cidNext ) );
+ indent_printf( fp, " cid 0x%x\n", static_cast< unsigned int >( cid ) );
+ indent_printf( fp, " fc 0x%x\n", static_cast< unsigned int >( fc ) );
+ indent_printf( fp, " CiTBDE 0x%x\n",CiTBDE );
+ indent_printf( fp, " cbTBC 0x%x\n", cbTBC );
+ if ( ControlDropsToolBar() )
+ {
+ indent_printf( fp, " this delta is associated with a control that drops a menu toolbar\n", cbTBC );
+ indent_printf( fp, " the menu toolbar drops the toolbar defined at index[%d] in the rCustomizations array of the CTBWRAPPER that contains this TBDelta\n", CustomizationIndex() );
+ }
+}
+
+CTB::CTB() : cbTBData( 0 )
+,iWCTBl( 0 )
+,reserved( 0 )
+,unused( 0 )
+,cCtls( 0 )
+{
+}
+
+CTB::~CTB()
+{
+}
+
+bool CTB::IsMenuToolbar()
+{
+ return tb.IsMenuToolbar();
+}
+
+
+bool CTB::Read( SvStream *pS)
+{
+ OSL_TRACE("CTB::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ if ( !name.Read( pS ) )
+ return false;
+ *pS >> cbTBData;
+ if ( !tb.Read( pS ) )
+ return false;
+ for ( short index = 0; index < nVisualData; ++index )
+ {
+ TBVisualData aVisData;
+ aVisData.Read( pS );
+ rVisualData.push_back( aVisData );
+ }
+
+ *pS >> iWCTBl >> reserved >> unused >> cCtls;
+
+ if ( cCtls )
+ {
+ for ( sal_Int32 index = 0; index < cCtls; ++index )
+ {
+ TBC aTBC;
+ if ( !aTBC.Read( pS ) )
+ return false;
+ rTBC.push_back( aTBC );
+ }
+ }
+ return true;
+}
+
+void
+CTB::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf(fp, "[ 0x%x ] CTB - dump\n", nOffSet );
+ indent_printf(fp, " name %s\n", rtl::OUStringToOString( name.getString(), RTL_TEXTENCODING_UTF8 ).getStr() );
+ indent_printf(fp, " cbTBData size, in bytes, of this structure excluding the name, cCtls, and rTBC fields. %x\n", static_cast< unsigned int >( cbTBData ) );
+
+ tb.Print(fp);
+ for ( short counter = 0; counter < nVisualData; ++counter )
+ {
+ indent_printf( fp, " TBVisualData [%d]\n", counter);
+ Indent b;
+ rVisualData[ counter ].Print( fp );
+ }
+ indent_printf(fp, " iWCTBl 0x%x reserved 0x%x unused 0x%x cCtls( toolbar controls ) 0x%x \n", static_cast< unsigned int >( iWCTBl ), reserved, unused, static_cast< unsigned int >( cCtls ) );
+ if ( cCtls )
+ {
+ for ( sal_Int32 index = 0; index < cCtls; ++index )
+ {
+
+ indent_printf(fp, " dumping toolbar control 0x%x\n", static_cast< unsigned int >( index ) );
+ rTBC[ index ].Print( fp );
+ }
+ }
+}
+
+bool CTB::ImportCustomToolBar( CTBWrapper& rWrapper, CustomToolBarImportHelper& helper )
+{
+ static rtl::OUString sToolbarPrefix( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/custom_" ) );
+ bool bRes = false;
+ try
+ {
+ if ( !tb.IsEnabled() )
+ return true; // didn't fail, just ignoring
+ // Create default setting
+ uno::Reference< container::XIndexContainer > xIndexContainer( helper.getCfgManager()->createSettings(), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xIndexAccess( xIndexContainer, uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xProps( xIndexContainer, uno::UNO_QUERY_THROW );
+
+ // set UI name for toolbar
+ xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UIName") ), uno::makeAny( name.getString() ) );
+
+ rtl::OUString sToolBarName = sToolbarPrefix.concat( name.getString() );
+ for ( std::vector< TBC >::iterator it = rTBC.begin(); it != rTBC.end(); ++it )
+ {
+ // createToolBar item for control
+ if ( !it->ImportToolBarControl( rWrapper, xIndexContainer, helper, IsMenuToolbar() ) )
+ return false;
+ }
+
+ OSL_TRACE("Name of toolbar :-/ %s", rtl::OUStringToOString( sToolBarName, RTL_TEXTENCODING_UTF8 ).getStr() );
+
+ helper.getCfgManager()->insertSettings( sToolBarName, xIndexAccess );
+ helper.applyIcons();
+#if 1 // don't think this is necessary
+ uno::Reference< ui::XUIConfigurationPersistence > xPersistence( helper.getCfgManager()->getImageManager(), uno::UNO_QUERY_THROW );
+ xPersistence->store();
+
+ xPersistence.set( helper.getCfgManager(), uno::UNO_QUERY_THROW );
+ xPersistence->store();
+#endif
+ bRes = true;
+ }
+ catch( uno::Exception& e )
+ {
+ OSL_TRACE("***** For some reason we have an exception %s", rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+ bRes = false;
+ }
+ return bRes;
+}
+
+bool CTB::ImportMenuTB( CTBWrapper& rWrapper, const css::uno::Reference< css::container::XIndexContainer >& xIndexContainer, CustomToolBarImportHelper& rHelper )
+{
+ for ( std::vector< TBC >::iterator it = rTBC.begin(); it != rTBC.end(); ++it )
+ {
+ // createToolBar item for control
+ if ( !it->ImportToolBarControl( rWrapper, xIndexContainer, rHelper, true ) )
+ return false;
+ }
+ return true;
+}
+
+TBC::TBC()
+{
+}
+
+TBC::~TBC()
+{
+}
+
+bool TBC::Read( SvStream *pS )
+{
+ OSL_TRACE("TBC::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ if ( !tbch.Read( pS ) )
+ return false;
+ if ( tbch.getTcID() != 0x1 && tbch.getTcID() != 0x1051 )
+ {
+ cid.reset( new sal_uInt32 );
+ *pS >> *cid;
+ }
+ // MUST exist if tbch.tct is not equal to 0x16
+ if ( tbch.getTct() != 0x16 )
+ {
+ tbcd.reset( new TBCData( tbch ) );
+ if ( !tbcd->Read( pS ) )
+ return false;
+ }
+ return true;
+}
+
+void TBC::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf(fp,"[ 0x%x ] TBC -- dump\n", nOffSet );
+ indent_printf(fp," dumping header ( TBCHeader )\n");
+ tbch.Print( fp );
+ if ( cid.get() )
+ indent_printf(fp," cid = 0x%x\n", static_cast< unsigned int >( *cid ) );
+ if ( tbcd.get() )
+ {
+ indent_printf(fp," dumping toolbar data TBCData \n");
+ tbcd->Print(fp);
+ }
+}
+
+bool
+TBC::ImportToolBarControl( CTBWrapper& rWrapper, const css::uno::Reference< css::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuBar )
+{
+ // cmtFci 0x1 Command based on a built-in command. See CidFci.
+ // cmtMacro 0x2 Macro command. See CidMacro.
+ // cmtAllocated 0x3 Allocated command. See CidAllocated.
+ // cmtNil 0x7 No command. See Cid.
+ bool bBuiltin = false;
+ sal_uInt16 cmdId = 0;
+ if ( cid.get() )
+ {
+ sal_uInt16 arg2 = ( *( cid.get() ) & 0xFFFF );
+
+ sal_uInt8 cmt = ( arg2 & 0x7 );
+ arg2 = ( arg2 >> 3 );
+
+ switch ( cmt )
+ {
+ case 1:
+ OSL_TRACE("cmt is cmtFci builtin command 0x%x", arg2);
+ bBuiltin = true;
+ cmdId = arg2;
+ break;
+ case 2:
+ OSL_TRACE("cmt is cmtMacro macro 0x%x", arg2);
+ break;
+ case 3:
+ OSL_TRACE("cmt is cmtAllocated [???] 0x%x", arg2);
+ break;
+ case 7:
+ OSL_TRACE("cmt is cmNill no-phing 0x%x", arg2);
+ break;
+ default:
+ OSL_TRACE("illegal 0x%x", cmt);
+ break;
+ }
+ }
+
+ if ( tbcd.get() )
+ {
+ std::vector< css::beans::PropertyValue > props;
+ if ( bBuiltin )
+ {
+ rtl::OUString sCommand = helper.MSOCommandToOOCommand( cmdId );
+ if ( sCommand.getLength() > 0 )
+ {
+ beans::PropertyValue aProp;
+
+ aProp.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CommandURL") );
+ aProp.Value <<= sCommand;
+ props.push_back( aProp );
+ }
+ }
+ bool bBeginGroup = false;
+ if ( ! tbcd->ImportToolBarControl( helper, props, bBeginGroup, bIsMenuBar ) )
+ return false;
+
+ TBCMenuSpecific* pMenu = tbcd->getMenuSpecific();
+ if ( pMenu )
+ {
+ OSL_TRACE("** control has a menu, name of toolbar with menu items is %s", rtl::OUStringToOString( pMenu->Name(), RTL_TEXTENCODING_UTF8 ).getStr() );
+ // search for CTB with the appropriate name ( it contains the
+ // menu items, although we cannot import ( or create ) a menu on
+ // a custom toolbar we can import the menu items in a separate
+ // toolbar ( better than nothing )
+ CTB* pCustTB = rWrapper.GetCustomizationData( pMenu->Name() );
+ if ( pCustTB )
+ {
+ uno::Reference< container::XIndexContainer > xMenuDesc;
+ uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
+ xMenuDesc.set( xMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.IndexedPropertyValues" ) ) ), uno::UNO_QUERY_THROW );
+ if ( !pCustTB->ImportMenuTB( rWrapper,xMenuDesc, helper ) )
+ return false;
+ if ( !bIsMenuBar )
+ {
+ if ( !helper.createMenu( pMenu->Name(), uno::Reference< container::XIndexAccess >( xMenuDesc, uno::UNO_QUERY ), true ) )
+ return false;
+ }
+ else
+ {
+ beans::PropertyValue aProp;
+ aProp.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ItemDescriptorContainer") );
+ aProp.Value <<= xMenuDesc;
+ props.push_back( aProp );
+ }
+ }
+ }
+
+ if ( bBeginGroup )
+ {
+ // insert spacer
+ uno::Sequence< beans::PropertyValue > sProps( 1 );
+ sProps[ 0 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Type") );
+ sProps[ 0 ].Value = uno::makeAny( ui::ItemType::SEPARATOR_LINE );
+ toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( sProps ) );
+ }
+
+ uno::Sequence< beans::PropertyValue > sProps( props.size() );
+ beans::PropertyValue* pProp = sProps.getArray();
+
+ for ( std::vector< css::beans::PropertyValue >::iterator it = props.begin(); it != props.end(); ++it, ++pProp )
+ *pProp = *it;
+
+ toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( sProps ) );
+ }
+ return true;
+}
+
+rtl::OUString
+TBC::GetCustomText()
+{
+ rtl::OUString sCustomText;
+ if ( tbcd.get() )
+ sCustomText = tbcd->getGeneralInfo().CustomText();
+ return sCustomText;
+
+
+}
+
+bool
+Xst::Read( SvStream* pS )
+{
+ OSL_TRACE("Xst::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ sal_Int16 nChars = 0;
+ *pS >> nChars;
+ sString = readUnicodeString( pS, static_cast< sal_Int32 >( nChars ) );
+ return true;
+}
+
+void
+Xst::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf( fp, "[ 0x%x ] Xst -- dump\n", nOffSet );
+ indent_printf( fp, " %s", rtl::OUStringToOString( sString, RTL_TEXTENCODING_UTF8 ).getStr() );
+}
+
+Tcg::Tcg() : nTcgVer( 255 )
+{
+}
+
+bool Tcg::Read(SvStream *pS)
+{
+ OSL_TRACE("Tcg::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ *pS >> nTcgVer;
+ if ( nTcgVer != (sal_Int8)255 )
+ return false;
+ tcg.reset( new Tcg255() );
+ return tcg->Read( pS );
+}
+
+void Tcg::Print( FILE* fp )
+{
+ Indent a(true);
+ indent_printf(fp, "[ 0x%x ] Tcg - dump %d\n", nOffSet, nTcgVer);
+ indent_printf(fp," nTcgVer %d\n", nTcgVer);
+ if ( tcg.get() )
+ tcg->Print( fp );
+}
+
+bool Tcg::ImportCustomToolBar( SfxObjectShell& rDocSh )
+{
+ if ( tcg.get() )
+ return tcg->ImportCustomToolBar( rDocSh );
+ return false;
+}
+
+Tcg255::Tcg255()
+{
+}
+
+Tcg255::~Tcg255()
+{
+ std::vector< Tcg255SubStruct* >::iterator it = rgtcgData.begin();
+ for ( ; it != rgtcgData.end(); ++it )
+ delete *it;
+}
+
+bool Tcg255::processSubStruct( sal_uInt8 nId, SvStream *pS )
+{
+ Tcg255SubStruct* pSubStruct = NULL;
+ switch ( nId )
+ {
+ case 0x1:
+ {
+ pSubStruct = new PlfMcd( false ); // don't read the id
+ break;
+ }
+ case 0x2:
+ {
+ pSubStruct = new PlfAcd( false );
+ break;
+ }
+ case 0x3:
+ case 0x4:
+ {
+ pSubStruct = new PlfKme( false );
+ break;
+ }
+ case 0x10:
+ {
+ pSubStruct = new TcgSttbf( false );
+ break;
+ }
+ case 0x11:
+ {
+ pSubStruct = new MacroNames( false );
+ break;
+ }
+ case 0x12:
+ {
+ pSubStruct = new CTBWrapper( false );
+ break;
+ }
+ default:
+ OSL_TRACE("Unknown id 0x%x",nId);
+ return false;
+ }
+ pSubStruct->ch = nId;
+ if ( !pSubStruct->Read( pS ) )
+ return false;
+ rgtcgData.push_back( pSubStruct );
+ return true;
+}
+
+bool Tcg255::ImportCustomToolBar( SfxObjectShell& rDocSh )
+{
+ // Find the CTBWrapper
+ for ( std::vector< Tcg255SubStruct* >::const_iterator it = rgtcgData.begin(); it != rgtcgData.end(); ++it )
+ {
+ if ( (*it)->id() == 0x12 )
+ {
+ // not so great, shouldn't really have to do a horror casting
+ CTBWrapper* pCTBWrapper = dynamic_cast< CTBWrapper* > ( *it );
+ if ( pCTBWrapper )
+ {
+ if ( !pCTBWrapper->ImportCustomToolBar( rDocSh ) )
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+
+bool Tcg255::Read(SvStream *pS)
+{
+ OSL_TRACE("Tcg255::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ sal_uInt8 nId = 0; //
+ *pS >> nId;
+ while ( nId != 0x40 )
+ {
+ if ( !processSubStruct( nId, pS ) )
+ return false;
+ *pS >> nId;
+ }
+ return true;
+ // Peek at
+}
+
+void Tcg255::Print( FILE* fp)
+{
+ Indent a;
+ indent_printf(fp, "[ 0x%x ] Tcg255 - dump\n", nOffSet );
+ indent_printf(fp, " contains %d sub records\n", rgtcgData.size() );
+ std::vector< Tcg255SubStruct* >::iterator it = rgtcgData.begin();
+ std::vector< Tcg255SubStruct* >::iterator it_end = rgtcgData.end();
+
+ for( sal_Int32 count = 1; it != it_end ; ++it, ++count )
+ {
+ Indent b;
+ indent_printf(fp, " [%d] Tcg255SubStruct \n", static_cast< unsigned int >( count ) );
+ (*it)->Print(fp);
+ }
+}
+
+
+Tcg255SubStruct::Tcg255SubStruct( bool bReadId ) : mbReadId( bReadId ), ch(0)
+{
+}
+
+bool Tcg255SubStruct::Read(SvStream *pS)
+{
+ OSL_TRACE("Tcg255SubStruct::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ if ( mbReadId )
+ *pS >> ch;
+ return true;
+}
+
+PlfMcd::PlfMcd( bool bReadId ): Tcg255SubStruct( bReadId ), rgmcd( NULL )
+{
+}
+PlfMcd::~PlfMcd()
+{
+ if ( rgmcd )
+ delete[] rgmcd;
+}
+
+bool PlfMcd::Read(SvStream *pS)
+{
+ OSL_TRACE("PffMcd::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ Tcg255SubStruct::Read( pS );
+ *pS >> iMac;
+ if ( iMac )
+ {
+ rgmcd = new MCD[ iMac ];
+ for ( sal_Int32 index = 0; index < iMac; ++index )
+ {
+ if ( !rgmcd[ index ].Read( pS ) )
+ return false;
+ }
+ }
+ return true;
+}
+
+void PlfMcd::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf(fp, "[ 0x%x ] PlfMcd ( Tcg255SubStruct ) - dump\n", nOffSet );
+ indent_printf(fp, " contains %d MCD records\n", static_cast<int>( iMac ) );
+ for ( sal_Int32 count=0; count < iMac; ++count )
+ {
+ Indent b;
+ indent_printf(fp, "[%d] MCD\n", static_cast< int >( count ) );
+ rgmcd[ count ].Print( fp );
+ }
+
+}
+
+PlfAcd::PlfAcd( bool bReadId ) : Tcg255SubStruct( bReadId )
+,iMac(0)
+,rgacd(NULL)
+{
+}
+
+
+PlfAcd::~PlfAcd()
+{
+ if ( rgacd )
+ delete[] rgacd;
+}
+
+bool PlfAcd::Read( SvStream *pS)
+{
+ OSL_TRACE("PffAcd::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ Tcg255SubStruct::Read( pS );
+ *pS >> iMac;
+ if ( iMac )
+ {
+ rgacd = new Acd[ iMac ];
+ for ( sal_Int32 index = 0; index < iMac; ++index )
+ {
+ if ( !rgacd[ index ].Read( pS ) )
+ return false;
+ }
+ }
+ return true;
+}
+void PlfAcd::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf(fp, "[ 0x%x ] PlfAcd ( Tcg255SubStruct ) - dump\n", nOffSet );
+ indent_printf(fp, " contains %d ACD records\n", static_cast< int >( iMac ) );
+ for ( sal_Int32 count=0; count < iMac; ++count )
+ {
+ Indent b;
+ indent_printf(fp, "[%d] ACD\n", static_cast< int >( count ) );
+ rgacd[ count ].Print( fp );
+ }
+
+}
+
+PlfKme::PlfKme( bool bReadId ) : Tcg255SubStruct( bReadId )
+,iMac( 0 )
+,rgkme( NULL )
+{
+}
+
+PlfKme::~PlfKme()
+{
+ if ( rgkme )
+ delete[] rgkme;
+}
+
+bool PlfKme::Read(SvStream *pS)
+{
+ OSL_TRACE("PlfKme::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ Tcg255SubStruct::Read( pS );
+ *pS >> iMac;
+ if ( iMac )
+ {
+ rgkme = new Kme[ iMac ];
+ for( sal_Int32 index=0; index<iMac; ++index )
+ {
+ if ( !rgkme[ index ].Read( pS ) )
+ return false;
+ }
+ }
+ return true;
+}
+
+void PlfKme::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf(fp, "[ 0x%x ] PlfKme ( Tcg255SubStruct ) - dump\n", nOffSet );
+ indent_printf(fp, " contains %d Kme records\n", static_cast< int >( iMac ) );
+ for ( sal_Int32 count=0; count < iMac; ++count )
+ {
+ Indent b;
+ indent_printf(fp, "[%d] Kme\n", static_cast< int >( count ) );
+ rgkme[ count ].Print( fp );
+ }
+
+}
+
+TcgSttbf::TcgSttbf( bool bReadId ) : Tcg255SubStruct( bReadId )
+{
+}
+
+bool TcgSttbf::Read( SvStream *pS)
+{
+ OSL_TRACE("TcgSttbf::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ Tcg255SubStruct::Read( pS );
+ return sttbf.Read( pS );
+}
+
+void TcgSttbf::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf(fp,"[ 0x%x ] TcgSttbf - dump\n", nOffSet );
+ sttbf.Print( fp );
+}
+
+TcgSttbfCore::TcgSttbfCore() : fExtend( 0 )
+,cData( 0 )
+,cbExtra( 0 )
+,dataItems( NULL )
+{
+}
+
+TcgSttbfCore::~TcgSttbfCore()
+{
+ if ( dataItems )
+ delete[] dataItems;
+}
+
+bool TcgSttbfCore::Read( SvStream* pS )
+{
+ OSL_TRACE("TcgSttbfCore::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ *pS >> fExtend >> cData >> cbExtra;
+ if ( cData )
+ {
+ dataItems = new SBBItem[ cData ];
+ for ( sal_Int32 index = 0; index < cData; ++index )
+ {
+ *pS >> dataItems[ index ].cchData;
+ dataItems[ index ].data = readUnicodeString( pS, dataItems[ index ].cchData );
+ *pS >> dataItems[ index ].extraData;
+ }
+ }
+ return true;
+}
+
+void TcgSttbfCore::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf( fp, "[ 0x%x ] TcgSttbfCore - dump\n");
+ indent_printf( fp, " fExtend 0x%x [expected 0xFFFF ]\n", fExtend );
+ indent_printf( fp, " cbExtra 0x%x [expected 0x02 ]\n", cbExtra );
+ indent_printf( fp, " cData no. or string data items %d (0x%x)\n", cData, cData );
+
+ if ( cData )
+ {
+ for ( sal_Int32 index = 0; index < cData; ++index )
+ indent_printf(fp," string dataItem[ %d(0x%x) ] has name %s and if referenced %d times.\n", static_cast< int >( index ), static_cast< unsigned int >( index ), rtl::OUStringToOString( dataItems[ index ].data, RTL_TEXTENCODING_UTF8 ).getStr(), dataItems[ index ].extraData );
+ }
+
+}
+MacroNames::MacroNames( bool bReadId ) : Tcg255SubStruct( bReadId )
+,iMac( 0 )
+,rgNames( NULL )
+{
+}
+
+MacroNames::~MacroNames()
+{
+ if ( rgNames )
+ delete[] rgNames;
+}
+
+bool MacroNames::Read( SvStream *pS)
+{
+ OSL_TRACE("MacroNames::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ Tcg255SubStruct::Read( pS );
+ *pS >> iMac;
+ if ( iMac )
+ {
+ rgNames = new MacroName[ iMac ];
+ for ( sal_Int32 index = 0; index < iMac; ++index )
+ {
+ if ( !rgNames[ index ].Read( pS ) )
+ return false;
+ }
+ }
+ return true;
+}
+
+void MacroNames::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf(fp, "[ 0x%x ] MacroNames ( Tcg255SubStruct ) - dump\n");
+ indent_printf(fp, " contains %d MacroName records\n", iMac );
+ for ( sal_Int32 count=0; count < iMac; ++count )
+ {
+ Indent b;
+ indent_printf(fp, "[%d] MacroName\n", static_cast<int>( count ) );
+ rgNames[ count ].Print( fp );
+ }
+
+}
+
+MacroName::MacroName():ibst(0)
+{
+}
+
+
+bool MacroName::Read(SvStream *pS)
+{
+ OSL_TRACE("MacroName::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ *pS >> ibst;
+ return xstz.Read( pS );
+}
+
+void MacroName::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf( fp, "[ 0x%x ] MacroName - dump");
+ indent_printf( fp," index - 0x%x has associated following record\n", ibst );
+ xstz.Print( fp );
+}
+
+
+
+Xstz::Xstz():chTerm(0)
+{
+}
+
+bool
+Xstz::Read(SvStream *pS)
+{
+ OSL_TRACE("Xstz::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ if ( !xst.Read( pS ) )
+ return false;
+ *pS >> chTerm;
+ if ( chTerm != 0 ) // should be an assert
+ return false;
+ return true;
+}
+
+void Xstz::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf(fp,"[ 0x%x ] Xstz -- dump\n", nOffSet );
+ indent_printf(fp," Xst\n");
+ xst.Print( fp );
+ indent_printf(fp," chterm 0x%x ( should be zero )\n", chTerm);
+}
+
+Kme::Kme() : reserved1(0)
+,reserved2(0)
+,kcm1(0)
+,kcm2(0)
+,kt(0)
+,param(0)
+{
+}
+
+Kme::~Kme()
+{
+}
+
+bool
+Kme::Read(SvStream *pS)
+{
+ OSL_TRACE("Kme::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ *pS >> reserved1 >> reserved2 >> kcm1 >> kcm2 >> kt >> param;
+ return true;
+}
+
+void Kme::Print( FILE* fp )
+{
+ Indent a;
+
+ indent_printf( fp, "[ 0x%x ] Kme - dump\n", nOffSet );
+ indent_printf( fp, " reserved1 0x%x [expected 0x0 ]\n", reserved1 );
+ indent_printf( fp, " reserved2 0x%x [expected 0x0 ]\n", reserved2 );
+ indent_printf( fp, " kcm1 0x%x [shortcut key]\n", kcm1 );
+ indent_printf( fp, " kcm2 0x%x [shortcut key]\n", kcm2 );
+ indent_printf( fp, " kt 0x%x \n", kt );
+ indent_printf( fp, " param 0x%x \n", static_cast< unsigned int >( param ) );
+}
+
+Acd::Acd() : ibst( 0 )
+, fciBasedOnABC( 0 )
+{
+}
+
+bool Acd::Read(SvStream *pS)
+{
+ OSL_TRACE("Acd::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ *pS >> ibst >> fciBasedOnABC;
+ return true;
+}
+
+void Acd::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf( fp,"[ 0x%x ] ACD - dump\n", nOffSet );
+ // #TODO flesh out interpretation of these values
+ indent_printf( fp," ibst 0x%x\n", ibst);
+ indent_printf( fp," fciBaseObABC 0x%x\n", fciBasedOnABC);
+}
+
+MCD::MCD() : reserved1(0x56)
+,reserved2( 0 )
+,ibst( 0 )
+,ibstName( 0 )
+,reserved3( 0xFFFF )
+,reserved4( 0 )
+,reserved5( 0 )
+,reserved6( 0 )
+,reserved7( 0 )
+{
+}
+
+bool MCD::Read(SvStream *pS)
+{
+ OSL_TRACE("MCD::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ *pS >> reserved1 >> reserved2 >> ibst >> ibstName >> reserved3;
+ *pS >> reserved4 >> reserved5 >> reserved6 >> reserved7;
+ return true;
+}
+
+void MCD::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf( fp, "[ 0x%x ] MCD - dump\n", nOffSet );
+ indent_printf( fp, " reserved1 0x%x [expected 0x56 ]\n", reserved1 );
+ indent_printf( fp, " reserved2 0x%x [expected 0x0 ]\n", reserved2 );
+ indent_printf( fp, " ibst 0x%x specifies macro with MacroName.xstz = 0x%x\n", ibst, ibst );
+ indent_printf( fp, " ibstName 0x%x index into command string table ( TcgSttbf.sttbf )\n", ibstName );
+
+ indent_printf( fp, " reserved3 0x%x [expected 0xFFFF ]\n", reserved3 );
+ indent_printf( fp, " reserved4 0x%x\n", static_cast< unsigned int >( reserved4 ) );
+ indent_printf( fp, " reserved5 0x%x [expected 0x0 ]\n", static_cast< unsigned int >( reserved5 ) );
+ indent_printf( fp, " reserved6 0x%x\n", static_cast< unsigned int >( reserved6 ) );
+ indent_printf( fp, " reserved7 0x%x\n", static_cast< unsigned int >( reserved7 ) );
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8toolbar.hxx b/sw/source/filter/ww8/ww8toolbar.hxx
new file mode 100644
index 000000000000..b983eaff0c53
--- /dev/null
+++ b/sw/source/filter/ww8/ww8toolbar.hxx
@@ -0,0 +1,379 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Noel Power <noel.power@novell.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Noel Power <noel.power@novell.com>
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef _WW8TOOLBAR_HXX
+#define _WW8TOOLBAR_HXX
+
+#include <filter/msfilter/mstoolbar.hxx>
+
+namespace css = ::com::sun::star;
+
+class Xst : public TBBase
+{
+ rtl::OUString sString;
+public:
+ Xst(){}
+ bool Read(SvStream *pS);
+ rtl::OUString getString() { return sString; }
+ void Print( FILE* fp );
+};
+
+class CTBWrapper;
+class TBC : public TBBase
+{
+ TBCHeader tbch;
+ boost::shared_ptr< sal_uInt32 > cid; // optional
+ boost::shared_ptr<TBCData> tbcd;
+public:
+ TBC();
+ ~TBC();
+ bool Read(SvStream *pS);
+ void Print( FILE* );
+ bool ImportToolBarControl( CTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper&, bool );
+ rtl::OUString GetCustomText();
+};
+
+class CTB : public TBBase
+{
+ Xst name;
+ sal_Int32 cbTBData;
+ TB tb;
+ std::vector<TBVisualData> rVisualData;
+ sal_Int32 iWCTBl;
+ sal_uInt16 reserved;
+ sal_uInt16 unused;
+ sal_Int32 cCtls;
+ std::vector< TBC > rTBC;
+
+ CTB(const CTB&);
+ CTB& operator = ( const CTB&);
+public:
+ CTB();
+ ~CTB();
+ bool Read(SvStream *pS);
+ void Print( FILE* fp );
+ bool IsMenuToolbar();
+ bool ImportCustomToolBar( CTBWrapper&, CustomToolBarImportHelper& );
+ bool ImportMenuTB( CTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
+ rtl::OUString GetName() { return tb.getName().getString(); }
+};
+
+class TBDelta : public TBBase
+{
+ sal_uInt8 doprfatendFlags;
+
+ sal_uInt8 ibts;
+ sal_Int32 cidNext;
+ sal_Int32 cid;
+ sal_Int32 fc;
+ sal_uInt16 CiTBDE; // careful of this ( endian matters etc. )
+ sal_uInt16 cbTBC;
+public:
+ TBDelta();
+ ~TBDelta(){}
+ bool Read(SvStream *pS);
+ void Print( FILE* );
+ bool ControlIsModified();
+ bool ControlIsInserted();
+ bool ControlIsChanged();
+ bool ControlDropsToolBar();
+ sal_Int32 TBCStreamOffset();
+ sal_Int16 CustomizationIndex();
+
+};
+
+class Tcg255SubStruct : public TBBase
+{
+friend class Tcg255;
+ bool mbReadId;
+ Tcg255SubStruct(const Tcg255SubStruct&);
+ Tcg255SubStruct& operator = ( const Tcg255SubStruct&);
+protected:
+ sal_uInt8 ch;
+public:
+ Tcg255SubStruct( bool bReadId );
+ ~Tcg255SubStruct(){}
+ virtual sal_uInt8 id() const { return ch; }
+ bool Read(SvStream *pS);
+};
+
+class CTBWrapper;
+class Customization : public TBBase
+{
+friend class CTBWrapper;
+ sal_Int32 tbidForTBD;
+ sal_uInt16 reserved1;
+ sal_Int16 ctbds;
+ CTBWrapper* pWrapper;
+ boost::shared_ptr< CTB > customizationDataCTB;
+ std::vector< TBDelta > customizationDataTBDelta;
+ bool bIsDroppedMenuTB;
+ bool ImportMenu( CTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
+public:
+ Customization( CTBWrapper* rapper );
+ ~Customization();
+ bool Read(SvStream *pS);
+ bool ImportCustomToolBar( CTBWrapper&, CustomToolBarImportHelper& );
+ bool ImportMenu( CTBWrapper&, CustomToolBarImportHelper& );
+ void Print( FILE* );
+ sal_Int32 GetTBIDForTB(){ return tbidForTBD; }
+ CTB* GetCustomizationData() { return customizationDataCTB.get(); };
+};
+
+class SfxObjectShell;
+
+class CTBWrapper : public Tcg255SubStruct
+{
+ // reserved1 is the ch field of Tcg255SubStruct
+ sal_uInt16 reserved2;
+ sal_uInt8 reserved3;
+ sal_uInt16 reserved4;
+ sal_uInt16 reserved5;
+
+ sal_Int16 cbTBD;
+ sal_Int16 cCust;
+
+ sal_Int32 cbDTBC;
+
+ std::vector< TBC > rtbdc; //
+ std::vector< Customization > rCustomizations; // array of Customizations
+ std::vector< sal_Int16 > dropDownMenuIndices; // array of indexes of Customization toolbars that are dropped by a menu
+ CTBWrapper(const CTBWrapper&);
+ CTBWrapper& operator = ( const CTBWrapper&);
+public:
+ CTBWrapper( bool bReadId = true );
+ ~CTBWrapper();
+ void InsertDropIndex( sal_Int32 aIndex ) { dropDownMenuIndices.push_back( aIndex ); }
+ TBC* GetTBCAtOffset( sal_uInt32 nStreamOffset );
+ bool Read(SvStream *pS);
+ bool ImportCustomToolBar( SfxObjectShell& rDocSh );
+
+ Customization* GetCustomizaton( sal_Int16 index );
+ CTB* GetCustomizationData( const rtl::OUString& name );
+ void Print( FILE* );
+};
+
+class MCD : public TBBase
+{
+ sal_Int8 reserved1; // A signed integer that MUST be 0x56.
+ sal_uInt8 reserved2; // MUST be 0.
+ sal_uInt16 ibst; // Unsigned integer that specifies the name of the macro. Macro name is specified by MacroName.xstz of the MacroName entry in the MacroNames such that MacroName.ibst equals ibst. MacroNames MUST contain such an entry.
+ sal_uInt16 ibstName; // An unsigned integer that specifies the index into the Command String Table (TcgSttbf.sttbf) where the macro‘s name and arguments are specified.
+ sal_uInt16 reserved3; // An unsigned integer that MUST be 0xFFFF.
+ sal_uInt32 reserved4; //MUST be ignored.
+ sal_uInt32 reserved5; //MUST be 0.
+ sal_uInt32 reserved6; //MUST be ignored.
+ sal_uInt32 reserved7; //MUST be ignored
+
+ MCD(const MCD&);
+ MCD& operator = ( const MCD&);
+public:
+ MCD();
+ ~MCD(){}
+ bool Read(SvStream *pS);
+ void Print( FILE* );
+};
+
+class PlfMcd : public Tcg255SubStruct
+{
+ sal_Int32 iMac;
+ MCD* rgmcd; // array of MCD's
+ PlfMcd(const PlfMcd&);
+ PlfMcd& operator = ( const PlfMcd&);
+public:
+ PlfMcd( bool bReadId = true );
+ ~PlfMcd();
+ bool Read(SvStream *pS);
+ void Print( FILE* );
+};
+
+class Acd : public TBBase
+{
+ sal_Int16 ibst;
+ sal_uInt16 fciBasedOnABC; // fciBasedOn(13 bits) A(1bit)B(1bit)C(1Bit)
+ Acd(const Acd&);
+ Acd& operator = ( const Acd&);
+public:
+ Acd();
+ ~Acd(){}
+ bool Read(SvStream *pS);
+ void Print( FILE* );
+};
+
+class PlfAcd: public Tcg255SubStruct
+{
+ sal_Int32 iMac;
+ Acd* rgacd;
+ PlfAcd(const PlfAcd&);
+ PlfAcd& operator = ( const PlfAcd&);
+public:
+ PlfAcd( bool bReadId = true );
+ ~PlfAcd();
+ bool Read(SvStream *pS);
+ void Print(FILE*);
+};
+
+class Kme : public TBBase
+{
+ sal_Int16 reserved1; //MUST be zero.
+ sal_Int16 reserved2; //MUST be zero.
+ sal_uInt16 kcm1; //A Kcm that specifies the primary shortcut key.
+ sal_uInt16 kcm2; //A Kcm that specifies the secondary shortcut key, or 0x00FF if there is no secondary shortcut key.
+ sal_uInt16 kt; //A Kt that specifies the type of action to be taken when the key combination is pressed.
+ sal_uInt32 param; //The meaning of this field depends on the value of kt
+
+ Kme(const Kme&);
+ Kme& operator = ( const Kme&);
+public:
+ Kme();
+ ~Kme();
+ bool Read(SvStream *pS);
+ void Print( FILE* );
+};
+
+class PlfKme : public Tcg255SubStruct
+{
+ sal_Int32 iMac;
+ Kme* rgkme;
+ PlfKme(const PlfKme&);
+ PlfKme& operator = ( const PlfKme&);
+public:
+ PlfKme( bool bReadId = true );
+ ~PlfKme();
+ bool Read(SvStream *pS);
+ void Print( FILE* );
+};
+
+class TcgSttbfCore : public TBBase
+{
+struct SBBItem
+{
+ sal_uInt16 cchData;
+ rtl::OUString data;
+ sal_uInt16 extraData;
+ SBBItem() : cchData(0), extraData(0){}
+};
+ sal_uInt16 fExtend;
+ sal_uInt16 cData;
+ sal_uInt16 cbExtra;
+ SBBItem* dataItems;
+ TcgSttbfCore(const TcgSttbfCore&);
+ TcgSttbfCore& operator = ( const TcgSttbfCore&);
+public:
+ TcgSttbfCore();
+ ~TcgSttbfCore();
+ bool Read(SvStream *pS);
+ void Print( FILE* fp );
+};
+
+class TcgSttbf : public Tcg255SubStruct
+{
+ TcgSttbfCore sttbf;
+ TcgSttbf(const TcgSttbf&);
+ TcgSttbf& operator = ( const TcgSttbf&);
+public:
+ TcgSttbf( bool bReadId = true );
+ ~TcgSttbf(){}
+ bool Read(SvStream *pS);
+ void Print( FILE* fp );
+};
+
+class Xstz : public TBBase
+{
+ Xst xst; //An Xst specifying the string with its pre-pended length.
+ sal_uInt16 chTerm;
+
+ Xstz(const Xstz&);
+ Xstz& operator = ( const Xstz&);
+public:
+ Xstz();
+ ~Xstz(){}
+ bool Read(SvStream *pS);
+ void Print( FILE* fp );
+};
+
+class MacroName : public TBBase
+{
+ sal_uInt16 ibst; //An unsigned integer that specifies the index of the current entry in the macro name table. MUST NOT be the same as the index of any other entry.
+ Xstz xstz;
+ MacroName(const MacroName&);
+ MacroName& operator = ( const MacroName&);
+public:
+ MacroName();
+ ~MacroName(){}
+ bool Read(SvStream *pS);
+ void Print( FILE* );
+};
+
+class MacroNames : public Tcg255SubStruct
+{
+ sal_uInt16 iMac; //An unsigned integer that specifies the number of MacroName structures in rgNames.
+ MacroName* rgNames;
+
+ MacroNames(const MacroNames&);
+ MacroNames& operator = ( const MacroNames&);
+public:
+ MacroNames( bool bReadId = true );
+ ~MacroNames();
+ bool Read(SvStream *pS);
+ void Print( FILE* );
+};
+
+class Tcg255 : public TBBase
+{
+ std::vector< Tcg255SubStruct* > rgtcgData; // array of sub structures
+ Tcg255(const Tcg255&);
+ Tcg255& operator = ( const Tcg255&);
+ bool processSubStruct( sal_uInt8 nId, SvStream* );
+public:
+ Tcg255();
+ ~Tcg255();
+ bool Read(SvStream *pS);
+ void Print( FILE* );
+ bool ImportCustomToolBar( SfxObjectShell& rDocSh );
+};
+
+class Tcg: public TBBase
+{
+ sal_Int8 nTcgVer;
+ std::auto_ptr< Tcg255 > tcg;
+ Tcg(const Tcg&);
+ Tcg& operator = ( const Tcg&);
+public:
+ Tcg();
+ ~Tcg(){}
+ bool Read(SvStream *pS);
+ bool ImportCustomToolBar( SfxObjectShell& rDocSh );
+ void Print( FILE* );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/DocSettingNames.hxx b/sw/source/filter/xml/DocSettingNames.hxx
index 4062f148daae..968a33413011 100644
--- a/sw/source/filter/xml/DocSettingNames.hxx
+++ b/sw/source/filter/xml/DocSettingNames.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
const char* aNmArr[] = {
"ForbiddenCharacters" ,
"IsKernAsianPunctuation" ,
@@ -24,3 +25,5 @@ const char* aNmArr[] = {
"UpdateFromTemplate",
"PrintEmptyPages",
};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/ForbiddenCharactersEnum.hxx b/sw/source/filter/xml/ForbiddenCharactersEnum.hxx
index 721d44a93621..374d70593d87 100644
--- a/sw/source/filter/xml/ForbiddenCharactersEnum.hxx
+++ b/sw/source/filter/xml/ForbiddenCharactersEnum.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,3 +40,5 @@ enum ForbiddenCharactersEnum
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 21c9a3b93c75..cc72fa62eb26 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,7 +43,7 @@
// for locking SolarMutex: svapp + mutex
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
@@ -70,20 +71,20 @@ using ::com::sun::star::beans::XPropertySetInfo;
SwDoc* lcl_GetDocViaTunnel( Reference<XTextCursor> & rCursor )
{
Reference<XUnoTunnel> xTunnel( rCursor, UNO_QUERY);
- DBG_ASSERT( xTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xTunnel.is(), "missing XUnoTunnel for Cursor" );
OTextCursorHelper* pSwXCursor = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething(OTextCursorHelper::getUnoTunnelId())) );
- DBG_ASSERT( NULL != pSwXCursor, "OTextCursorHelper missing" );
+ OSL_ENSURE( NULL != pSwXCursor, "OTextCursorHelper missing" );
return pSwXCursor->GetDoc();
}
SwDoc* lcl_GetDocViaTunnel( Reference<XTextRange> & rRange )
{
Reference<XUnoTunnel> xTunnel(rRange, UNO_QUERY);
- DBG_ASSERT(xTunnel.is(), "Can't tunnel XTextRange");
+ OSL_ENSURE(xTunnel.is(), "Can't tunnel XTextRange");
SwXTextRange *pRange = reinterpret_cast< SwXTextRange *>(
sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething(SwXTextRange::getUnoTunnelId())) );
- DBG_ASSERT( NULL != pRange, "SwXTextRange missing" );
+ OSL_ENSURE( NULL != pRange, "SwXTextRange missing" );
return pRange->GetDoc();
}
@@ -156,11 +157,11 @@ void XTextRangeOrNodeIndexPosition::SetAsNodeIndex(
// SwXTextRange -> PaM
SwUnoInternalPaM aPaM(*pDoc);
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
sal_Bool bSuccess =
#endif
::sw::XTextRangeToSwPaM(aPaM, rRange);
- DBG_ASSERT(bSuccess, "illegal range");
+ OSL_ENSURE(bSuccess, "illegal range");
// PaM -> Index
Set(aPaM.GetPoint()->nNode);
@@ -168,17 +169,17 @@ void XTextRangeOrNodeIndexPosition::SetAsNodeIndex(
void XTextRangeOrNodeIndexPosition::CopyPositionInto(SwPosition& rPos)
{
- DBG_ASSERT(IsValid(), "Can't get Position");
+ OSL_ENSURE(IsValid(), "Can't get Position");
// create PAM from start cursor (if no node index is present)
if (NULL == pIndex)
{
SwUnoInternalPaM aUnoPaM(*GetDoc());
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
sal_Bool bSuccess =
#endif
::sw::XTextRangeToSwPaM(aUnoPaM, xRange);
- DBG_ASSERT(bSuccess, "illegal range");
+ OSL_ENSURE(bSuccess, "illegal range");
rPos = *aUnoPaM.GetPoint();
}
@@ -192,7 +193,7 @@ void XTextRangeOrNodeIndexPosition::CopyPositionInto(SwPosition& rPos)
SwDoc* XTextRangeOrNodeIndexPosition::GetDoc()
{
- DBG_ASSERT(IsValid(), "Can't get Doc");
+ OSL_ENSURE(IsValid(), "Can't get Doc");
return (NULL != pIndex) ? pIndex->GetNodes().GetDoc() : lcl_GetDocViaTunnel(xRange);
}
@@ -331,7 +332,7 @@ XMLRedlineImportHelper::~XMLRedlineImportHelper()
// and delete the incomplete ones. Finally, delete it.
if( IsReady(pInfo) )
{
- DBG_ERROR("forgotten RedlineInfo; now inserted");
+ OSL_ENSURE(false, "forgotten RedlineInfo; now inserted");
InsertIntoDocument( pInfo );
}
else
@@ -340,7 +341,7 @@ XMLRedlineImportHelper::~XMLRedlineImportHelper()
pInfo->bNeedsAdjustment = sal_False;
if( IsReady(pInfo) )
{
- DBG_ERROR("RedlineInfo without adjustment; now inserted");
+ OSL_ENSURE(false, "RedlineInfo without adjustment; now inserted");
InsertIntoDocument( pInfo );
}
else
@@ -349,7 +350,7 @@ XMLRedlineImportHelper::~XMLRedlineImportHelper()
// (i.e. end without start, or start without
// end). This may well be a problem in the file,
// rather than the code.
- DBG_ERROR("incomplete redline (maybe file was corrupt); "
+ OSL_ENSURE(false, "incomplete redline (maybe file was corrupt); "
"now deleted");
}
}
@@ -470,7 +471,7 @@ Reference<XTextCursor> XMLRedlineImportHelper::CreateRedlineTextSection(
Reference<XTextCursor> xReturn;
// this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// get RedlineInfo
RedlineMapType::iterator aFind = aRedlineMap.find(rId);
@@ -562,7 +563,7 @@ void XMLRedlineImportHelper::AdjustStartNodeCursor(
Reference<XTextRange> & /*rRange*/)
{
// this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// start + end nodes are treated the same. For either it's
// necessary that the target node already exists.
@@ -598,11 +599,11 @@ inline sal_Bool XMLRedlineImportHelper::IsReady(RedlineInfo* pRedline)
void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
{
- DBG_ASSERT(NULL != pRedlineInfo, "need redline info");
- DBG_ASSERT(IsReady(pRedlineInfo), "redline info not complete yet!");
+ OSL_ENSURE(NULL != pRedlineInfo, "need redline info");
+ OSL_ENSURE(IsReady(pRedlineInfo), "redline info not complete yet!");
// this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// Insert the Redline as described by pRedlineInfo into the
// document. If we are in insert mode, don't insert any redlines
@@ -625,7 +626,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
// cover three cases:
- // 1) empty redlines (no range, no content) #100921#
+ // 1) empty redlines (no range, no content)
// 2) check for:
// a) bIgnoreRedline (e.g. insert mode)
// b) illegal PaM range (CheckNodesRange())
@@ -684,9 +685,9 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
if( nPoint < pRedlineInfo->pContentIndex->GetIndex() ||
nPoint > pRedlineInfo->pContentIndex->GetNode().EndOfSectionIndex() )
pRedline->SetContentIdx(pRedlineInfo->pContentIndex);
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
- ASSERT( false, "Recursive change tracking" );
+ OSL_ENSURE( false, "Recursive change tracking" );
#endif
}
@@ -752,3 +753,5 @@ void XMLRedlineImportHelper::SetProtectionKey(
{
aProtectionKey = rKey;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.hxx b/sw/source/filter/xml/XMLRedlineImportHelper.hxx
index ab8f31f5e3a0..f6da99528225 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.hxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -162,3 +163,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 98ae19039002..17a026c8bddb 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,7 +66,6 @@
#include <sfx2/frame.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <swerror.h>
-#include <errhdl.hxx>
#include <fltini.hxx>
#include <doc.hxx>
#include <docsh.hxx>
@@ -75,25 +75,19 @@
#include <statstr.hrc>
-// --> OD 2005-09-06 #i44177#
+// #i44177#
#include <SwStyleNameMapper.hxx>
#include <poolfmt.hxx>
#include <numrule.hxx>
#include <paratr.hxx>
// <--
-// --> OD 2006-02-22 #b6382898#
#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
#include <svx/svditer.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdograf.hxx>
-// <--
-
-// --> OD 2008-12-17 #i70748#
-#include <sfx2/docfilt.hxx>
-// <--
-
+#include <sfx2/docfilt.hxx> // #i70748#
#include <istyleaccess.hxx>
#define LOGFILE_AUTHOR "mb93740"
@@ -174,7 +168,7 @@ sal_Int32 ReadThroughComponent(
// get parser
uno::Reference< xml::sax::XParser > xParser(
rFactory->createInstance(
- OUString::createFromAscii("com.sun.star.xml.sax.Parser") ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser"))),
UNO_QUERY );
DBG_ASSERT( xParser.is(), "Can't create parser" );
if( !xParser.is() )
@@ -235,7 +229,7 @@ sal_Int32 ReadThroughComponent(
return ERRCODE_SFX_WRONGPASSWORD;
#if OSL_DEBUG_LEVEL > 1
- ByteString aError( "SAX parse exception catched while importing:\n" );
+ ByteString aError( "SAX parse exception caught while importing:\n" );
aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
DBG_ERROR( aError.GetBuffer() );
#endif
@@ -254,7 +248,7 @@ sal_Int32 ReadThroughComponent(
}
else
{
- ASSERT( bMustBeSuccessfull, "Warnings are not supported" );
+ OSL_ENSURE( bMustBeSuccessfull, "Warnings are not supported" );
return *new StringErrorInfo( ERR_FORMAT_ROWCOL, sErr,
ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR );
}
@@ -269,7 +263,7 @@ sal_Int32 ReadThroughComponent(
return ERRCODE_SFX_WRONGPASSWORD;
#if OSL_DEBUG_LEVEL > 1
- ByteString aError( "SAX exception catched while importing:\n" );
+ ByteString aError( "SAX exception caught while importing:\n" );
aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
DBG_ERROR( aError.GetBuffer() );
#endif
@@ -280,7 +274,7 @@ sal_Int32 ReadThroughComponent(
{
(void)r;
#if OSL_DEBUG_LEVEL > 1
- ByteString aError( "Zip exception catched while importing:\n" );
+ ByteString aError( "Zip exception caught while importing:\n" );
aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
DBG_ERROR( aError.GetBuffer() );
#endif
@@ -290,7 +284,7 @@ sal_Int32 ReadThroughComponent(
{
(void)r;
#if OSL_DEBUG_LEVEL > 1
- ByteString aError( "IO exception catched while importing:\n" );
+ ByteString aError( "IO exception caught while importing:\n" );
aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
DBG_ERROR( aError.GetBuffer() );
#endif
@@ -300,7 +294,7 @@ sal_Int32 ReadThroughComponent(
{
(void)r;
#if OSL_DEBUG_LEVEL > 1
- ByteString aError( "uno exception catched while importing:\n" );
+ ByteString aError( "uno exception caught while importing:\n" );
aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
DBG_ERROR( aError.GetBuffer() );
#endif
@@ -408,7 +402,7 @@ sal_Int32 ReadThroughComponent(
return ERR_SWG_READ_ERROR;
}
-// --> OD 2005-09-06 #i44177#
+// #i44177#
void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
{
// array containing the names of the default outline styles ('Heading 1',
@@ -444,10 +438,8 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
for ( sal_uInt16 n = 1; n < rColls.Count(); ++n )
{
SwTxtFmtColl* pColl = rColls[ n ];
- //if ( pColl->GetOutlineLevel() != NO_NUMBERING ) //#outline level zhaojianwei
if ( pColl->IsAssignedToListLevelOfOutlineStyle() )
{
- // aOutlineLevelAssigned[ pColl->GetOutlineLevel() ] = true;
aOutlineLevelAssigned[ pColl->GetAssignedOutlineStyleLevel() ] = true;//<-end,zhaojianwei
}
@@ -467,17 +459,15 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
const SwNumRule* pOutlineRule = _rDoc.GetOutlineNumRule();
for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
- // --> OD 2007-01-11 #i73361#
+ // #i73361#
// Do not change assignment of already created default outline style
// to a certain outline level.
-// if ( aCreatedDefaultOutlineStyles[ i ] != 0 && !aOutlineLevelAssigned[ i ] )
if ( !aOutlineLevelAssigned[ i ] &&
aCreatedDefaultOutlineStyles[ i ] != 0 &&
! aCreatedDefaultOutlineStyles[ i ]->IsAssignedToListLevelOfOutlineStyle() )
// <--
{
// apply outline level at created default outline style
- //aCreatedDefaultOutlineStyles[ i ]->SetOutlineLevel( i );
aCreatedDefaultOutlineStyles[ i ]->AssignToListLevelOfOutlineStyle(i);//#outline level added by zhaojianwei
// apply outline numbering rule, if none is set.
@@ -494,7 +484,6 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
}
// <--
-// --> OD 2006-02-22 #b6382898#
void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SwDoc& _rDoc )
{
if ( _rDoc.GetDrawModel() &&
@@ -532,7 +521,6 @@ void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SwDoc& _rDoc )
}
}
}
-// <--
sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const String & rName )
@@ -540,7 +528,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
// Get service factory
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
- ASSERT( xServiceFactory.is(),
+ OSL_ENSURE( xServiceFactory.is(),
"XMLReader::Read: got no service manager" );
if( !xServiceFactory.is() )
return ERR_SWG_READ_ERROR;
@@ -579,11 +567,11 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
// Get the docshell, the model, and finally the model's component
SwDocShell *pDocSh = rDoc.GetDocShell();
- ASSERT( pDocSh, "XMLReader::Read: got no doc shell" );
+ OSL_ENSURE( pDocSh, "XMLReader::Read: got no doc shell" );
if( !pDocSh )
return ERR_SWG_READ_ERROR;
uno::Reference< lang::XComponent > xModelComp( pDocSh->GetModel(), UNO_QUERY );
- ASSERT( xModelComp.is(),
+ OSL_ENSURE( xModelComp.is(),
"XMLReader::Read: got no model" );
if( !xModelComp.is() )
return ERR_SWG_READ_ERROR;
@@ -649,17 +637,19 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
{ "OrganizerMode", sizeof("OrganizerMode")-1, 0,
&::getBooleanCppuType(),
beans::PropertyAttribute::MAYBEVOID, 0 },
- // --> OD 2004-08-10 #i28749# - Add property, which indicates, if the
+
+ // #i28749# - Add property, which indicates, if the
// shape position attributes are given in horizontal left-to-right layout.
// This is the case for the OpenOffice.org file format.
{ "ShapePositionInHoriL2R", sizeof("ShapePositionInHoriL2R")-1, 0,
&::getBooleanCppuType(),
beans::PropertyAttribute::MAYBEVOID, 0 },
// <--
+
{ "BuildId", sizeof("BuildId")-1, 0,
&::getCppuType( (OUString *)0 ),
beans::PropertyAttribute::MAYBEVOID, 0 },
- // --> OD 2007-12-19 #152540#
+
// Add property, which indicates, if a text document in OpenOffice.org
// file format is read.
// Note: Text documents read via the binary filter are also finally
@@ -757,19 +747,19 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
OUString *pSeq = aFamiliesSeq.getArray();
if( aOpt.IsFrmFmts() )
// SFX_STYLE_FAMILY_FRAME;
- *pSeq++ = OUString::createFromAscii("FrameStyles");
+ *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("FrameStyles"));
if( aOpt.IsPageDescs() )
// SFX_STYLE_FAMILY_PAGE;
- *pSeq++ = OUString::createFromAscii("PageStyles");
+ *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("PageStyles"));
if( aOpt.IsTxtFmts() )
{
// (SFX_STYLE_FAMILY_CHAR|SFX_STYLE_FAMILY_PARA);
- *pSeq++ = OUString::createFromAscii("CharacterStyles");
- *pSeq++ = OUString::createFromAscii("ParagraphStyles");
+ *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("CharacterStyles"));
+ *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles"));
}
if( aOpt.IsNumRules() )
// SFX_STYLE_FAMILY_PSEUDO;
- *pSeq++ = OUString::createFromAscii("NumberingStyles");
+ *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("NumberingStyles"));
OUString sStyleInsertModeFamilies(
RTL_CONSTASCII_USTRINGPARAM("StyleInsertModeFamilies"));
@@ -840,7 +830,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
}
else
{
- StreamPath = ::rtl::OUString::createFromAscii( "dummyObjectName" );
+ StreamPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dummyObjectName"));
}
if( StreamPath.getLength() )
@@ -873,7 +863,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
rDoc.SetRedlineMode_intern( nsRedlineMode_t::REDLINE_NONE );
const sal_Bool bOASIS = ( SotStorage::GetVersion( xStorage ) > SOFFICE_FILEFORMAT_60 );
- // --> OD 2004-08-10 #i28749# - set property <ShapePositionInHoriL2R>
+ // #i28749# - set property <ShapePositionInHoriL2R>
{
const sal_Bool bShapePositionInHoriL2R = !bOASIS;
xInfoSet->setPropertyValue(
@@ -881,14 +871,12 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
makeAny( bShapePositionInHoriL2R ) );
}
// <--
- // --> OD 2007-12-19 #152540#
{
const sal_Bool bTextDocInOOoFileFormat = !bOASIS;
xInfoSet->setPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("TextDocInOOoFileFormat")),
makeAny( bTextDocInOOoFileFormat ) );
}
- // <--
sal_uInt32 nWarnRDF = 0;
if ( !(IsOrganizerMode() || IsBlockMode() || aOpt.IsFmtsOnly() ||
@@ -1007,8 +995,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
rDoc.SetRedlineMode_intern((RedlineMode_t)( ~nRedlineMode ));
rDoc.SetRedlineMode( (RedlineMode_t)( nRedlineMode ));
- // #103728# move Pam into valid content
- lcl_EnsureValidPam( rPaM );
+ lcl_EnsureValidPam( rPaM ); // move Pam into valid content
if( pGraphicHelper )
SvXMLGraphicHelper::Destroy( pGraphicHelper );
@@ -1020,14 +1007,14 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
if ( !bOASIS )
{
- // --> OD 2005-09-06 #i44177# - assure that for documents in OpenOffice.org
+ // #i44177# - assure that for documents in OpenOffice.org
// file format the relation between outline numbering rule and styles is
// filled-up accordingly.
// Note: The OpenOffice.org file format, which has no content that applys
// a certain style, which is related to the outline numbering rule,
// has lost the information, that this certain style is related to
// the outline numbering rule.
- // --> OD 2008-12-17 #i70748# - only for templates
+ // #i70748# - only for templates
if ( pMedium && pMedium->GetFilter() &&
pMedium->GetFilter()->IsOwnTemplateFormat() )
{
@@ -1042,18 +1029,16 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con
rDoc.PropagateOutlineRule();
- // --> OD 2006-03-14 #i62875#
+ // #i62875#
if ( rDoc.get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) && !docfunc::ExistsDrawObjs( rDoc ) )
{
rDoc.set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
}
// <--
- // --> OD 2006-02-22 #b6382898#
// Convert all instances of <SdrOle2Obj> into <SdrGrafObj>, because the
// Writer doesn't support such objects.
lcl_ConvertSdrOle2ObjsToSdrGrafObjs( rDoc );
- // <--
// set BuildId on XModel for later OLE object loading
if( xInfoSet.is() )
@@ -1086,7 +1071,7 @@ sal_uInt16 XMLReader::GetSectionList( SfxMedium& rMedium,
{
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
- ASSERT( xServiceFactory.is(),
+ OSL_ENSURE( xServiceFactory.is(),
"XMLReader::Read: got no service manager" );
uno::Reference < embed::XStorage > xStg2;
if( xServiceFactory.is() && ( xStg2 = rMedium.GetStorage() ).is() )
@@ -1103,13 +1088,12 @@ sal_uInt16 XMLReader::GetSectionList( SfxMedium& rMedium,
// get parser
uno::Reference< XInterface > xXMLParser = xServiceFactory->createInstance(
- OUString::createFromAscii("com.sun.star.xml.sax.Parser") );
- ASSERT( xXMLParser.is(),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) );
+ OSL_ENSURE( xXMLParser.is(),
"XMLReader::Read: com.sun.star.xml.sax.Parser service missing" );
if( xXMLParser.is() )
{
// get filter
- // #110680#
// uno::Reference< xml::sax::XDocumentHandler > xFilter = new SwXMLSectionList( rStrings );
uno::Reference< xml::sax::XDocumentHandler > xFilter = new SwXMLSectionList( xServiceFactory, rStrings );
@@ -1141,3 +1125,4 @@ sal_uInt16 XMLReader::GetSectionList( SfxMedium& rMedium,
return rStrings.Count();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index 1f64db9fdae8..a6bbc52d92ad 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,7 +55,6 @@
#include <docsh.hxx>
#include <unotools/ucbstreamhelper.hxx>
-#include <errhdl.hxx>
#include <swerror.h>
#include <wrtxml.hxx>
#include <statstr.hrc>
@@ -80,7 +80,7 @@ SwXMLWriter::SwXMLWriter( const String& rBaseURL )
}
-__EXPORT SwXMLWriter::~SwXMLWriter()
+SwXMLWriter::~SwXMLWriter()
{
}
@@ -91,7 +91,7 @@ sal_uInt32 SwXMLWriter::_Write( SfxMedium* pTargetMedium )
// Get service factory
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
- ASSERT( xServiceFactory.is(),
+ OSL_ENSURE( xServiceFactory.is(),
"SwXMLWriter::Write: got no service manager" );
if( !xServiceFactory.is() )
return ERR_SWG_WRITE_ERROR;
@@ -104,7 +104,7 @@ sal_uInt32 SwXMLWriter::_Write( SfxMedium* pTargetMedium )
uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
SvXMLEmbeddedObjectHelper *pObjectHelper = 0;
- ASSERT( xStg.is(), "Where is my storage?" );
+ OSL_ENSURE( xStg.is(), "Where is my storage?" );
pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
GRAPHICHELPER_MODE_WRITE,
sal_False );
@@ -170,7 +170,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
{ "StyleFamilies", sizeof("StyleFamilies")-1, 0,
&::getCppuType( (Sequence<sal_Int32>*)0 ),
beans::PropertyAttribute::MAYBEVOID, 0 },
- // --> OD 2006-09-26 #i69627#
+ // #i69627#
{ "OutlineStyleAsNormalListStyle", sizeof("OutlineStyleAsNormalListStyle")-1, 0,
&::getBooleanCppuType(),
beans::PropertyAttribute::MAYBEVOID, 0 },
@@ -203,35 +203,6 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
pStatusBarItem->GetValue() >>= xStatusIndicator;
}
-// try
-// {
-// uno::Reference<frame::XModel> xModel( pDoc->GetDocShell()->GetModel());
-// if (xModel.is())
-// {
-// uno::Sequence< beans::PropertyValue > xMediaDescr
-// uno::Reference<frame::XController> xController(
-// xModel->getCurrentController());
-// if( xController.is())
-// {
-// uno::Reference<frame::XFrame> xFrame( xController->getFrame());
-// if( xFrame.is())
-// {
-// uno::Reference<task::XStatusIndicatorFactory> xFactory(
-// xFrame, uno::UNO_QUERY );
-// if( xFactory.is())
-// {
-// xStatusIndicator =
-// xFactory->createStatusIndicator();
-// }
-// }
-// }
-// }
-// }
-// catch( const RuntimeException& )
-// {
-// xStatusIndicator = 0;
-// }
-
// set progress range and start status indicator
sal_Int32 nProgressRange(1000000);
if (xStatusIndicator.is())
@@ -298,7 +269,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
xInfoSet->setPropertyValue( sAutoTextMode, aAny2 );
}
- // --> OD 2006-09-26 #i69627#
+ // #i69627#
const sal_Bool bOASIS = ( SotStorage::GetVersion( xStg ) > SOFFICE_FILEFORMAT_60 );
if ( bOASIS &&
docfunc::HasOutlineStyleToBeWrittenAsNormalListStyle( *pDoc ) )
@@ -342,7 +313,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
//Get model
uno::Reference< lang::XComponent > xModelComp(
pDoc->GetDocShell()->GetModel(), UNO_QUERY );
- ASSERT( xModelComp.is(), "XMLWriter::Write: got no model" );
+ OSL_ENSURE( xModelComp.is(), "XMLWriter::Write: got no model" );
if( !xModelComp.is() )
return ERR_SWG_WRITE_ERROR;
@@ -368,8 +339,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
{
const uno::Reference<beans::XPropertySet> xPropSet(xStg,
uno::UNO_QUERY_THROW);
- const ::rtl::OUString VersionProp(
- ::rtl::OUString::createFromAscii("Version"));
+ const ::rtl::OUString VersionProp(RTL_CONSTASCII_USTRINGPARAM("Version"));
try
{
::rtl::OUString Version;
@@ -472,8 +442,6 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
if( pDoc->GetRootFrm() && pDoc->GetDocStat().nPage > 1 &&
!(bOrganizerMode || bBlock || bErr) )
{
-// DBG_ASSERT( !pDoc->GetDocStat().bModified,
-// "doc stat is modified!" );
OUString sStreamName( RTL_CONSTASCII_USTRINGPARAM("layout-cache") );
try
{
@@ -642,9 +610,9 @@ sal_Bool SwXMLWriter::WriteThroughComponent(
const Sequence<Any> & rArguments,
const Sequence<PropertyValue> & rMediaDesc )
{
- ASSERT( xOutputStream.is(), "I really need an output stream!" );
- ASSERT( xComponent.is(), "Need component!" );
- ASSERT( NULL != pServiceName, "Need component name!" );
+ OSL_ENSURE( xOutputStream.is(), "I really need an output stream!" );
+ OSL_ENSURE( xComponent.is(), "Need component!" );
+ OSL_ENSURE( NULL != pServiceName, "Need component name!" );
RTL_LOGFILE_CONTEXT_AUTHOR( aFilterLog, "sw", LOGFILE_AUTHOR,
"SwXMLWriter::WriteThroughComponent" );
@@ -655,7 +623,7 @@ sal_Bool SwXMLWriter::WriteThroughComponent(
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(
"com.sun.star.xml.sax.Writer")) ),
UNO_QUERY );
- ASSERT( xSaxWriter.is(), "can't instantiate XML writer" );
+ OSL_ENSURE( xSaxWriter.is(), "can't instantiate XML writer" );
if(!xSaxWriter.is())
return sal_False;
@@ -675,7 +643,7 @@ sal_Bool SwXMLWriter::WriteThroughComponent(
uno::Reference< document::XExporter > xExporter(
rFactory->createInstanceWithArguments(
OUString::createFromAscii(pServiceName), aArgs), UNO_QUERY);
- ASSERT( xExporter.is(),
+ OSL_ENSURE( xExporter.is(),
"can't instantiate export filter component" );
if( !xExporter.is() )
return sal_False;
@@ -699,3 +667,5 @@ void GetXMLWriter( const String& /*rName*/, const String& rBaseURL, WriterRef& x
}
// -----------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/wrtxml.hxx b/sw/source/filter/xml/wrtxml.hxx
index 97e073a02f91..b53b952db616 100644
--- a/sw/source/filter/xml/wrtxml.hxx
+++ b/sw/source/filter/xml/wrtxml.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,3 +104,4 @@ private:
#endif // _WRTXML_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlbrsh.cxx b/sw/source/filter/xml/xmlbrsh.cxx
index 7235617f8666..4b94166d48c3 100644
--- a/sw/source/filter/xml/xmlbrsh.cxx
+++ b/sw/source/filter/xml/xmlbrsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,7 +69,7 @@ enum SvXMLTokenMapAttrs
XML_TOK_NGIMG_END=XML_TOK_UNKNOWN
};
-static __FAR_DATA SvXMLTokenMapEntry aBGImgAttributesAttrTokenMap[] =
+static SvXMLTokenMapEntry aBGImgAttributesAttrTokenMap[] =
{
{ XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_BGIMG_HREF },
{ XML_NAMESPACE_XLINK, XML_TYPE, XML_TOK_BGIMG_TYPE },
@@ -227,7 +228,6 @@ void SwXMLBrushItemExport::exportXML( const SvxBrushItem& rItem )
{
GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sValue );
GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
- // AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, ACP2WS(sXML_embed) );
GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
}
@@ -256,3 +256,4 @@ void SwXMLBrushItemExport::exportXML( const SvxBrushItem& rItem )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlbrshe.hxx b/sw/source/filter/xml/xmlbrshe.hxx
index 47acea0e7bb1..b0795a9d0869 100644
--- a/sw/source/filter/xml/xmlbrshe.hxx
+++ b/sw/source/filter/xml/xmlbrshe.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,3 +55,4 @@ public:
#endif // _XMLBRSHE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlbrshi.hxx b/sw/source/filter/xml/xmlbrshi.hxx
index eb7f68c56703..fb0f54f21bf3 100644
--- a/sw/source/filter/xml/xmlbrshi.hxx
+++ b/sw/source/filter/xml/xmlbrshi.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,4 @@ public:
#endif // _XMLBRSHI_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 5ba2fd3e68ab..ad314a6a1177 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,11 +66,9 @@
// for locking SolarMutex: svapp + mutex
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
-// --> OD 2007-03-30 #i73788#
-#include <pausethreadstarting.hxx>
-// <--
+#include <pausethreadstarting.hxx> // #i73788#
using ::rtl::OUString;
@@ -124,7 +123,6 @@ void SwXMLExport::SetCurPaM( SwPaM& rPaM, sal_Bool bWhole, sal_Bool bTabOnly )
}
#endif
-// #110680#
SwXMLExport::SwXMLExport(
const uno::Reference< lang::XMultiServiceFactory > xServiceFactory,
sal_uInt16 nExportFlags)
@@ -149,7 +147,7 @@ SwXMLExport::SwXMLExport(
}
#ifdef XML_CORE_API
-// #110680#
+
SwXMLExport::SwXMLExport(
const uno::Reference< lang::XMultiServiceFactory > xServiceFactory,
const Reference< XModel >& rModel,
@@ -187,19 +185,17 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
if( !GetModel().is() )
return ERR_SWG_WRITE_ERROR;
- // --> OD 2007-03-30 #i73788#
- SwPauseThreadStarting aPauseThreadStarting;
- // <--
+ SwPauseThreadStarting aPauseThreadStarting; // #i73788#
Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
Reference < XText > xText = xTextDoc->getText();
Reference<XUnoTunnel> xTextTunnel( xText, UNO_QUERY);
- ASSERT( xTextTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xTextTunnel.is(), "missing XUnoTunnel for Cursor" );
if( !xTextTunnel.is() )
return ERR_SWG_WRITE_ERROR;
- // from here, we use core interfaces -> lock Solar-Mutex (#91949#)
- vos::OGuard aGuard(Application::GetSolarMutex());
+ // from here, we use core interfaces -> lock Solar-Mutex
+ SolarMutexGuard aGuard;
{
Reference<XPropertySet> rInfoSet = getExportInfo();
@@ -220,7 +216,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
SwXText *pText = reinterpret_cast< SwXText * >(
sal::static_int_cast< sal_IntPtr >( xTextTunnel->getSomething( SwXText::getUnoTunnelId() )));
- ASSERT( pText, "SwXText missing" );
+ OSL_ENSURE( pText, "SwXText missing" );
if( !pText )
return ERR_SWG_WRITE_ERROR;
@@ -251,7 +247,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
{
const SvXMLAttrContainerItem *pUnknown =
PTR_CAST( SvXMLAttrContainerItem, pItem );
- ASSERT( pUnknown, "illegal attribute container item" );
+ OSL_ENSURE( pUnknown, "illegal attribute container item" );
if( pUnknown && (pUnknown->GetAttrCount() > 0) )
{
sal_uInt16 nIdx = pUnknown->GetFirstNamespaceIndex();
@@ -320,7 +316,6 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
nRef += pDoc->GetCharFmts()->Count() - 1;
nRef += pDoc->GetFrmFmts()->Count() - 1;
nRef += pDoc->GetTxtFmtColls()->Count() - 1;
-// nRef += pDoc->GetPageDescCnt();
nRef *= 2; // for the above styles, xmloff will increment by 2!
// #i93174#: count all paragraphs for the progress bar
nRef += aDocStat.nAllPara; // 1: only content, no autostyle
@@ -412,7 +407,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
if( pEmbeddedResolver )
SvXMLEmbeddedObjectHelper::Destroy( pEmbeddedResolver );
- ASSERT( !pTableLines, "there are table columns infos left" );
+ OSL_ENSURE( !pTableLines, "there are table columns infos left" );
return nRet;
}
@@ -435,8 +430,9 @@ XMLShapeExport* SwXMLExport::CreateShapeExport()
return pShapeExport;
}
-__EXPORT SwXMLExport::~SwXMLExport()
+SwXMLExport::~SwXMLExport()
{
+ DeleteTableLines();
_FinitItemExport();
}
@@ -452,7 +448,7 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps)
{
Reference< XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
- ASSERT( xServiceFactory.is(),
+ OSL_ENSURE( xServiceFactory.is(),
"XMLReader::Read: got no service manager" );
if( !xServiceFactory.is() )
return;
@@ -478,12 +474,12 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps)
Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
xText = xTextDoc->getText();
Reference<XUnoTunnel> xTextTunnel( xText, UNO_QUERY);
- ASSERT( xTextTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xTextTunnel.is(), "missing XUnoTunnel for Cursor" );
if( xTextTunnel.is() )
{
pText = reinterpret_cast< SwXText * >(
sal::static_int_cast< sal_IntPtr >( xTextTunnel->getSomething( SwXText::getUnoTunnelId()) ));
- ASSERT( pText, "SwXText missing" );
+ OSL_ENSURE( pText, "SwXText missing" );
}
}
@@ -498,7 +494,7 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps)
pDoc->GetDocShell()->GetVisArea( ASPECT_CONTENT );
sal_Bool bTwip = pDoc->GetDocShell()->GetMapUnit ( ) == MAP_TWIP;
- ASSERT ( bTwip, "Map unit for visible area is not in TWIPS!" );
+ OSL_ENSURE( bTwip, "Map unit for visible area is not in TWIPS!" );
pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaTop") );
pValue[nIndex++].Value <<= bTwip ? TWIP_TO_MM100 ( rRect.Top() ) : rRect.Top();
@@ -574,12 +570,12 @@ void SwXMLExport::SetBodyAttributes()
// export use of soft page breaks
{
Reference<XUnoTunnel> xTextTunnel( xText, UNO_QUERY);
- ASSERT( xTextTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xTextTunnel.is(), "missing XUnoTunnel for Cursor" );
if( xTextTunnel.is() )
{
SwXText *pText = reinterpret_cast< SwXText * >(
sal::static_int_cast< sal_IntPtr >( xTextTunnel->getSomething( SwXText::getUnoTunnelId() )));
- ASSERT( pText, "SwXText missing" );
+ OSL_ENSURE( pText, "SwXText missing" );
if( pText )
{
SwDoc *pDoc = pText->GetDoc();
@@ -607,13 +603,12 @@ void SwXMLExport::_ExportContent()
Reference<XDrawPage> xPage = xDrawPageSupplier->getDrawPage();
if (xPage.is())
{
- // #103597# prevent export of form controls which are embedded in
- // mute sections
+ // prevent export of form controls which are embedded in mute sections
Reference<XIndexAccess> xIAPage( xPage, UNO_QUERY );
GetTextParagraphExport()->PreventExportOfControlsInMuteSections(
xIAPage, GetFormExport() );
- // #i36597# / 2004-12-13 / fs@openoffice.org
+ // #i36597#
if ( GetFormExport()->pageContainsForms( xPage ) || GetFormExport()->documentContainsXForms() )
{
::xmloff::OOfficeFormsExport aOfficeForms(*this);
@@ -811,10 +806,6 @@ Reference< XInterface > SAL_CALL SwXMLExportStyles_createInstance(
const Reference< XMultiServiceFactory > & rSMgr)
throw( Exception )
{
- // #110680#
- //return (cppu::OWeakObject*)new SwXMLExport(
- // EXPORT_STYLES | EXPORT_MASTERSTYLES | EXPORT_AUTOSTYLES |
- // EXPORT_FONTDECLS );
return (cppu::OWeakObject*)new SwXMLExport( rSMgr,
EXPORT_STYLES | EXPORT_MASTERSTYLES | EXPORT_AUTOSTYLES |
EXPORT_FONTDECLS|EXPORT_OASIS );
@@ -838,10 +829,6 @@ Reference< XInterface > SAL_CALL SwXMLExportContent_createInstance(
const Reference< XMultiServiceFactory > & rSMgr)
throw( Exception )
{
- // #110680#
- //return (cppu::OWeakObject*)new SwXMLExport(
- // EXPORT_AUTOSTYLES | EXPORT_CONTENT | EXPORT_SCRIPTS |
- // EXPORT_FONTDECLS );
return (cppu::OWeakObject*)new SwXMLExport(
rSMgr,
EXPORT_AUTOSTYLES | EXPORT_CONTENT | EXPORT_SCRIPTS |
@@ -955,7 +942,7 @@ void SwXMLExport::ExportCurPaM( sal_Bool bExportWholePaM )
aNextNumInfo.Set( *pNd );
ExportListChange( aPrevNumInfo, aNextNumInfo );
- ASSERT( !(pNd->IsGrfNode() || pNd->IsOLENode()),
+ OSL_ENSURE( !(pNd->IsGrfNode() || pNd->IsOLENode()),
"SwXMLExport::exportCurPaM: grf or OLE node unexpected" );
if( pNd->IsTxtNode() )
{
@@ -993,3 +980,5 @@ void SwXMLExport::ExportCurPaM( sal_Bool bExportWholePaM )
ExportListChange( aPrevNumInfo, aNextNumInfo );
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx
index 12a272e62bda..779cdbfbf602 100644
--- a/sw/source/filter/xml/xmlexp.hxx
+++ b/sw/source/filter/xml/xmlexp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,6 +33,7 @@
#include "xmlitmap.hxx"
#include <xmloff/uniref.hxx>
#include <xmloff/xmltoken.hxx>
+#include <vector>
class SwPaM;
class SwFmt;
@@ -44,12 +46,14 @@ class SwTableLines;
class SwTableBox;
class SwXMLTableColumn_Impl;
class SwXMLTableLines_Impl;
-class SwXMLTableLinesCache_Impl;
class SwXMLTableColumnsSortByWidth_Impl;
class SwXMLTableFrmFmtsSort_Impl;
class SwXMLTableInfo_Impl;
class SwTableNode;
class XMLPropertySetMapper;
+class SwXMLTableLines_Impl;
+
+typedef ::std::vector< SwXMLTableLines_Impl* > SwXMLTableLinesCache_Impl;
class SwXMLExport : public SvXMLExport
{
@@ -60,10 +64,9 @@ class SwXMLExport : public SvXMLExport
SwPaM *pOrigPaM; // the original PaM
#endif
- SvXMLUnitConverter *pTwipUnitConv;
-
- SvXMLExportItemMapper *pTableItemMapper;
- SwXMLTableLinesCache_Impl *pTableLines;
+ SvXMLUnitConverter* pTwipUnitConv;
+ SvXMLExportItemMapper* pTableItemMapper;
+ SwXMLTableLinesCache_Impl* pTableLines;
SvXMLItemMapEntriesRef xTableItemMap;
SvXMLItemMapEntriesRef xTableRowItemMap;
@@ -123,7 +126,8 @@ class SwXMLExport : public SvXMLExport
const ::rtl::OUString sCell;
void setBlockMode();
-
+private:
+ void DeleteTableLines();
protected:
virtual XMLTextParagraphExport* CreateTextParagraphExport();
@@ -133,14 +137,11 @@ protected:
virtual XMLFontAutoStylePool* CreateFontAutoStylePool();
public:
-
- // #110680#
SwXMLExport(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
sal_uInt16 nExportFlags = EXPORT_ALL);
#ifdef XML_CORE_API
- // #110680#
SwXMLExport(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rModel,
@@ -188,3 +189,4 @@ inline const SvXMLUnitConverter& SwXMLExport::GetTwipUnitConverter() const
#endif // _XMLEXP_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index 07a4c911fc7e..f860df848496 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,9 +62,7 @@
#include "fmtornt.hxx"
#include "fmtfsize.hxx"
-#ifndef _FMTLSPLT_HXX
#include "fmtlsplt.hxx"
-#endif
#include "xmlithlp.hxx"
#include "fmtrowsplt.hxx"
@@ -343,7 +342,7 @@ void SvXMLExportItemMapper::handleSpecialItem( SvXMLAttributeList& /*rAttrList*/
const SvXMLNamespaceMap& /*rNamespaceMap*/,
const SfxItemSet* /*pSet*/ /* = NULL */ ) const
{
- DBG_ERROR( "special item not handled in xml export" );
+ OSL_FAIL( "special item not handled in xml export" );
}
/** this method is called for every item that has the
@@ -354,7 +353,7 @@ void SvXMLExportItemMapper::handleNoItem( SvXMLAttributeList& /*rAttrList*/,
const SvXMLNamespaceMap& /*rNamespaceMap*/,
const SfxItemSet& /*rSet*/ ) const
{
- DBG_ERROR( "no item not handled in xml export" );
+ OSL_FAIL( "no item not handled in xml export" );
}
/** this method is called for every item that has the
@@ -367,7 +366,7 @@ void SvXMLExportItemMapper::handleElementItem(
const SfxItemSet& /*rSet*/,
sal_uInt16 /*nFlags*/ ) const
{
- DBG_ERROR( "element item not handled in xml export" );
+ OSL_FAIL( "element item not handled in xml export" );
}
@@ -426,7 +425,7 @@ sal_Bool SvXMLExportItemMapper::QueryXMLValue(
break;
default:
- DBG_ERROR( "unknown member id!");
+ OSL_FAIL( "unknown member id!");
bOk = sal_False;
break;
}
@@ -455,7 +454,7 @@ sal_Bool SvXMLExportItemMapper::QueryXMLValue(
break;
default:
- DBG_ERROR("unknown MemberId");
+ OSL_FAIL("unknown MemberId");
};
bOk = sal_True;
@@ -695,8 +694,18 @@ sal_Bool SvXMLExportItemMapper::QueryXMLValue(
nWidth += pLine->GetInWidth();
}
- enum XMLTokenEnum eStyle =
- (0 == nDistance) ? XML_SOLID : XML_DOUBLE;
+ enum XMLTokenEnum eStyle = XML_SOLID;
+ switch ( pLine->GetStyle( ) )
+ {
+ case DOTTED:
+ eStyle = XML_DOTTED;
+ break;
+ case DASHED:
+ eStyle = XML_DASHED;
+ break;
+ default:
+ eStyle = (0 == nDistance) ? XML_SOLID : XML_DOUBLE;
+ }
rUnitConverter.convertMeasure( aOut, nWidth );
aOut.append( sal_Unicode( ' ' ) );
@@ -1037,7 +1046,7 @@ sal_Bool SvXMLExportItemMapper::QueryXMLValue(
break;
default:
- DBG_ERROR("GetXMLValue not implemented for this item.");
+ OSL_FAIL("GetXMLValue not implemented for this item.");
break;
}
@@ -1046,3 +1055,5 @@ sal_Bool SvXMLExportItemMapper::QueryXMLValue(
return bOk;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlexpit.hxx b/sw/source/filter/xml/xmlexpit.hxx
index 306e5bb31df5..108d8a50f0bf 100644
--- a/sw/source/filter/xml/xmlexpit.hxx
+++ b/sw/source/filter/xml/xmlexpit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -134,3 +135,5 @@ SvXMLExportItemMapper::setMapEntries( SvXMLItemMapEntriesRef rMapEntries )
}
#endif // _XMLITMPR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index 050f498c10c5..43b203637673 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -415,7 +416,7 @@ void SwXMLTextStyleContext_Impl::Finish( sal_Bool bOverwrite )
const SwDoc *pDoc = pStyle->GetDoc();
SwTxtFmtColl *pColl = pDoc->FindTxtFmtCollByName( pStyle->GetStyleName() );
- ASSERT( pColl, "Text collection not found" );
+ OSL_ENSURE( pColl, "Text collection not found" );
if( !pColl || RES_CONDTXTFMTCOLL != pColl->Which() )
return;
@@ -434,7 +435,7 @@ void SwXMLTextStyleContext_Impl::Finish( sal_Bool bOverwrite )
sal_True);
sName = aString;
SwTxtFmtColl* pCondColl = pDoc->FindTxtFmtCollByName( sName );
- ASSERT( pCondColl,
+ OSL_ENSURE( pCondColl,
"SwXMLItemSetStyleContext_Impl::ConnectConditions: cond coll missing" );
if( pCondColl )
{
@@ -541,7 +542,7 @@ SvXMLImportContext *SwXMLItemSetStyleContext_Impl::CreateItemSetContext(
sal_uInt16 nPrefix, const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- ASSERT( !pItemSet,
+ OSL_ENSURE( !pItemSet,
"SwXMLItemSetStyleContext_Impl::CreateItemSetContext: item set exists" );
SvXMLImportContext *pContext = 0;
@@ -564,7 +565,7 @@ SvXMLImportContext *SwXMLItemSetStyleContext_Impl::CreateItemSetContext(
pItemSet = new SfxItemSet( rItemPool, aTableBoxSetRange );
break;
default:
- ASSERT( !this,
+ OSL_ENSURE( !this,
"SwXMLItemSetStyleContext_Impl::CreateItemSetContext: unknown family" );
break;
}
@@ -659,8 +660,8 @@ void SwXMLItemSetStyleContext_Impl::ConnectPageDesc()
SwDoc *pDoc = SwImport::GetDocFromXMLImport( GetSwImport() );
String sName;
- // --> OD 2005-02-01 #i40788# - first determine the display name of the
- // page style, then map this name to the corresponding user interface name.
+ // #i40788# - first determine the display name of the page style,
+ // then map this name to the corresponding user interface name.
sName = GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_MASTER_PAGE,
GetMasterPageName() );
SwStyleNameMapper::FillUIName( sName,
@@ -948,12 +949,6 @@ OUString SwXMLStylesContext_Impl::GetServiceName( sal_uInt16 nFamily ) const
void SwXMLStylesContext_Impl::EndElement()
{
GetSwImport().InsertStyles( IsAutomaticStyle() );
- // --> OD 2006-10-11 #i69629#
- // assign paragraph styles to list levels of outline style after all styles
- // are imported and finished.
-// if( !bAutoStyles )
-// GetImport().GetTextImport()->SetOutlineStyles( sal_True );
- // <--
}
// ---------------------------------------------------------------------
@@ -1132,3 +1127,5 @@ sal_Bool SwXMLImport::FindAutomaticStyle(
return pStyle != 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index ab1bc8d9be2b..66b8edfca90d 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,6 +60,8 @@ using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::lang;
using namespace ::xmloff::token;
+using rtl::OUString;
+
void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily )
{
// <style:style ...>
@@ -80,15 +83,15 @@ void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily )
if( eFamily != XML_TOKEN_INVALID )
AddAttribute( XML_NAMESPACE_STYLE, XML_FAMILY, eFamily );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// style:parent-style-name="..." (if its not the default only)
const SwFmt* pParent = rFmt.DerivedFrom();
// Parent-Namen nur uebernehmen, wenn kein Default
- ASSERT( !pParent || pParent->IsDefault(), "unexpected parent" );
+ OSL_ENSURE( !pParent || pParent->IsDefault(), "unexpected parent" );
- ASSERT( USHRT_MAX == rFmt.GetPoolFmtId(), "pool ids arent'supported" );
- ASSERT( USHRT_MAX == rFmt.GetPoolHelpId(), "help ids arent'supported" );
- ASSERT( USHRT_MAX == rFmt.GetPoolHelpId() ||
+ OSL_ENSURE( USHRT_MAX == rFmt.GetPoolFmtId(), "pool ids arent'supported" );
+ OSL_ENSURE( USHRT_MAX == rFmt.GetPoolHelpId(), "help ids arent'supported" );
+ OSL_ENSURE( USHRT_MAX == rFmt.GetPoolHelpId() ||
UCHAR_MAX == rFmt.GetPoolHlpFileId(), "help file ids aren't supported" );
#endif
@@ -314,8 +317,7 @@ void SwXMLAutoStylePoolP::exportStyleAttributes(
{
OUString sStyleName;
aProperty->maValue >>= sStyleName;
- // --> OD 2008-11-19 #i70748#
- // export also empty list styles
+ // #i70748# - export also empty list styles
if( sStyleName.getLength() )
{
OUString sTmp = rExport.GetTextParagraphExport()->GetListAutoStylePool().Find( sStyleName );
@@ -361,3 +363,5 @@ SvXMLAutoStylePoolP* SwXMLExport::CreateAutoStylePool()
{
return new SwXMLAutoStylePoolP( *this );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx
index b611c02fe36c..222a388615b0 100644
--- a/sw/source/filter/xml/xmlfonte.cxx
+++ b/sw/source/filter/xml/xmlfonte.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,13 +60,13 @@ SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl(
Reference < XTextDocument > xTextDoc( _rExport.GetModel(), UNO_QUERY );
Reference < XText > xText = xTextDoc->getText();
Reference<XUnoTunnel> xTextTunnel( xText, UNO_QUERY);
- ASSERT( xTextTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xTextTunnel.is(), "missing XUnoTunnel for Cursor" );
if( !xTextTunnel.is() )
return;
SwXText *pText = reinterpret_cast< SwXText *>(
sal::static_int_cast< sal_IntPtr >( xTextTunnel->getSomething( SwXText::getUnoTunnelId() )));
- ASSERT( pText, "SwXText missing" );
+ OSL_ENSURE( pText, "SwXText missing" );
if( !pText )
return;
@@ -100,3 +101,5 @@ XMLFontAutoStylePool* SwXMLExport::CreateFontAutoStylePool()
{
return new SwXMLFontAutoStylePool_Impl( *this );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 279df96eb7cb..e39b227a2fb7 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,12 +64,12 @@
#include <xmloff/xmluconv.hxx>
#include <unotools/saveopt.hxx>
#include <tools/diagnose_ex.h>
-#include <hash_set>
+#include <boost/unordered_set.hpp>
#include <stringhash.hxx>
// for locking SolarMutex: svapp + mutex
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <unotxdoc.hxx> // for initXForms()
#include <xmloff/xmlmetai.hxx>
@@ -113,7 +114,7 @@ enum SwXMLDocTokens
XML_TOK_OFFICE_END=XML_TOK_UNKNOWN
};
-static __FAR_DATA SvXMLTokenMapEntry aDocTokenMap[] =
+static SvXMLTokenMapEntry aDocTokenMap[] =
{
{ XML_NAMESPACE_OFFICE, XML_FONT_FACE_DECLS, XML_TOK_DOC_FONTDECLS },
{ XML_NAMESPACE_OFFICE, XML_STYLES, XML_TOK_DOC_STYLES },
@@ -172,15 +173,14 @@ SvXMLImportContext *SwXMLBodyContext_Impl::CreateChildContext(
// ----------------------------------------------------------------------------
-// --> OD 2006-10-11 #i69629#
+// #i69629#
// enhance class <SwXMLDocContext_Impl> in order to be able to create subclasses
// NB: virtually inherit so we can multiply inherit properly
// in SwXMLOfficeDocContext_Impl
class SwXMLDocContext_Impl : public virtual SvXMLImportContext
{
-// --> OD 2006-10-11 #i69629#
-protected:
-// <--
+
+protected: // #i69629#
const SwXMLImport& GetSwImport() const
{ return (const SwXMLImport&)GetImport(); }
SwXMLImport& GetSwImport() { return (SwXMLImport&)GetImport(); }
@@ -239,10 +239,7 @@ SvXMLImportContext *SwXMLDocContext_Impl::CreateChildContext(
pContext = GetSwImport().CreateStylesContext( rLocalName, xAttrList,
sal_True );
break;
-// case XML_TOK_DOC_USESTYLES:
-// pContext = GetSwImport().CreateUseStylesContext( rLocalName,
-// xAttrList );
-// break;
+
case XML_TOK_DOC_MASTERSTYLES:
pContext = GetSwImport().CreateMasterStylesContext( rLocalName,
xAttrList );
@@ -273,8 +270,7 @@ SvXMLImportContext *SwXMLDocContext_Impl::CreateChildContext(
return pContext;
}
-// --> OD 2006-10-11 #i69629#
-// new subclass <SwXMLOfficeDocContext_Impl> of class <SwXMLDocContext_Impl>
+// #i69629# - new subclass <SwXMLOfficeDocContext_Impl> of class <SwXMLDocContext_Impl>
class SwXMLOfficeDocContext_Impl :
public SwXMLDocContext_Impl, public SvXMLMetaDocumentContext
{
@@ -343,8 +339,7 @@ SvXMLImportContext* SwXMLOfficeDocContext_Impl::CreateChildContext(
}
// <--
-// --> OD 2006-10-11 #i69629#
-// new subclass <SwXMLDocStylesContext_Impl> of class <SwXMLDocContext_Impl>
+// #i69629# - new subclass <SwXMLDocStylesContext_Impl> of class <SwXMLDocContext_Impl>
class SwXMLDocStylesContext_Impl : public SwXMLDocContext_Impl
{
public:
@@ -403,13 +398,9 @@ SvXMLImportContext *SwXMLImport::CreateContext(
{
SvXMLImportContext *pContext = 0;
- // --> OD 2006-10-11 #i69629#
- // own subclasses for <office:document> and <office:document-styles>
+ // #i69629# - own subclasses for <office:document> and <office:document-styles>
if( XML_NAMESPACE_OFFICE==nPrefix &&
-// ( IsXMLToken( rLocalName, XML_DOCUMENT ) ||
-// ( IsXMLToken( rLocalName, XML_DOCUMENT_META ) ||
( IsXMLToken( rLocalName, XML_DOCUMENT_SETTINGS ) ||
-// IsXMLToken( rLocalName, XML_DOCUMENT_STYLES ) ||
IsXMLToken( rLocalName, XML_DOCUMENT_CONTENT ) ))
pContext = new SwXMLDocContext_Impl( *this, nPrefix, rLocalName,
xAttrList );
@@ -422,8 +413,8 @@ SvXMLImportContext *SwXMLImport::CreateContext(
IsXMLToken( rLocalName, XML_DOCUMENT ) )
{
uno::Reference<xml::sax::XDocumentHandler> xDocBuilder(
- mxServiceFactory->createInstance(::rtl::OUString::createFromAscii(
- "com.sun.star.xml.dom.SAXDocumentBuilder")),
+ mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.xml.dom.SAXDocumentBuilder"))),
uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
GetModel(), UNO_QUERY_THROW);
@@ -444,7 +435,6 @@ SvXMLImportContext *SwXMLImport::CreateContext(
return pContext;
}
-// #110680#
SwXMLImport::SwXMLImport(
const uno::Reference< lang::XMultiServiceFactory > xServiceFactory,
sal_uInt16 nImportFlags)
@@ -470,7 +460,7 @@ SwXMLImport::SwXMLImport(
}
#ifdef XML_CORE_API
-// #110680#
+
SwXMLImport::SwXMLImport(
const uno::Reference< lang::XMultiServiceFactory > xServiceFactory,
SwDoc& rDoc,
@@ -563,12 +553,12 @@ sal_Int64 SAL_CALL SwXMLImport::getSomething( const Sequence< sal_Int8 >& rId )
OTextCursorHelper *lcl_xml_GetSwXTextCursor( const Reference < XTextCursor >& rTextCursor )
{
Reference<XUnoTunnel> xCrsrTunnel( rTextCursor, UNO_QUERY );
- ASSERT( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
if( !xCrsrTunnel.is() )
return 0;
OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper *>(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
- ASSERT( pTxtCrsr, "SwXTextCursor missing" );
+ OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" );
return pTxtCrsr;
}
@@ -583,7 +573,7 @@ void SwXMLImport::startDocument( void )
return;
// this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Reference< XPropertySet > xImportInfo( getImportInfo() );
@@ -693,12 +683,12 @@ void SwXMLImport::startDocument( void )
if( IMPORT_ALL == getImportFlags() )
{
pTxtCrsr = lcl_xml_GetSwXTextCursor( xTextCursor );
- ASSERT( pTxtCrsr, "SwXTextCursor missing" );
+ OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" );
if( !pTxtCrsr )
return;
pDoc = pTxtCrsr->GetDoc();
- ASSERT( pDoc, "SwDoc missing" );
+ OSL_ENSURE( pDoc, "SwDoc missing" );
if( !pDoc )
return;
@@ -726,12 +716,12 @@ void SwXMLImport::startDocument( void )
if( !pTxtCrsr )
pTxtCrsr = lcl_xml_GetSwXTextCursor( xTextCursor );
- ASSERT( pTxtCrsr, "SwXTextCursor missing" );
+ OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" );
if( !pTxtCrsr )
return;
SwDoc *pDoc = pTxtCrsr->GetDoc();
- ASSERT( pDoc, "SwDoc missing" );
+ OSL_ENSURE( pDoc, "SwDoc missing" );
if( !pDoc )
return;
@@ -758,14 +748,12 @@ void SwXMLImport::startDocument( void )
}
// We need a draw model to be able to set the z order
- // --> OD 2005-08-08 #i52858# - method name changed
- pDoc->GetOrCreateDrawModel();
- // <--
+ pDoc->GetOrCreateDrawModel(); // #i52858# - method name changed
// SJ: #i49801# locking the modell to disable repaints
SdrModel* pDrawModel = pDoc->GetDrawModel();
if ( pDrawModel )
- pDrawModel->setLock( sal_True );
+ pDrawModel->setLock(true);
if( !GetGraphicResolver().is() )
{
@@ -796,7 +784,7 @@ void SwXMLImport::endDocument( void )
return;
// this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if( pGraphicResolver )
SvXMLGraphicHelper::Destroy( pGraphicResolver );
@@ -814,10 +802,10 @@ void SwXMLImport::endDocument( void )
{
Reference<XUnoTunnel> xCrsrTunnel( GetTextImport()->GetCursor(),
UNO_QUERY);
- ASSERT( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper *>(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
- ASSERT( pTxtCrsr, "SwXTextCursor missing" );
+ OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" );
SwPaM *pPaM = pTxtCrsr->GetPaM();
if( IsInsertMode() && pSttNdIdx->GetIndex() )
{
@@ -838,12 +826,12 @@ void SwXMLImport::endDocument( void )
pTxtNode->GetTxt().Len() );
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// !!! This should be impossible !!!!
- ASSERT( pSttNdIdx->GetIndex()+1 !=
+ OSL_ENSURE( pSttNdIdx->GetIndex()+1 !=
pPaM->GetBound( sal_True ).nNode.GetIndex(),
"PaM.Bound1 point to new node " );
- ASSERT( pSttNdIdx->GetIndex()+1 !=
+ OSL_ENSURE( pSttNdIdx->GetIndex()+1 !=
pPaM->GetBound( sal_False ).nNode.GetIndex(),
"PaM.Bound2 points to new node" );
@@ -920,10 +908,6 @@ void SwXMLImport::endDocument( void )
if( pNextNd->CanJoinPrev(/* &pPos->nNode*/ ) &&
*pSttNdIdx != pPos->nNode )
{
-// SwTxtNode* pPrevNd = pPos->nNode.GetNode().GetTxtNode();
-// pPos->nContent.Assign( pPrevNd, 0 );
-// pPaM->SetMark(); pPaM->DeleteMark();
-// pPrevNd->JoinNext();
pNextNd->JoinPrev();
}
}
@@ -938,8 +922,7 @@ void SwXMLImport::endDocument( void )
}
}
- /* #108146# Was called too early. Moved from
- SwXMLBodyContext_Impl::EndElement */
+ /* Was called too early. Moved from SwXMLBodyContext_Impl::EndElement */
GetTextImport()->RedlineAdjustStartNodeCursor( sal_False );
@@ -971,7 +954,7 @@ void SwXMLImport::endDocument( void )
{
SdrModel* pDrawModel = pDoc->GetDrawModel();
if ( pDrawModel )
- pDrawModel->setLock( sal_False );
+ pDrawModel->setLock(false);
}
// #i90243#
@@ -1081,18 +1064,18 @@ void SwXMLImport::SetViewSettings(const Sequence < PropertyValue > & aViewProps)
return;
// this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
Reference < XText > xText = xTextDoc->getText();
Reference<XUnoTunnel> xTextTunnel( xText, UNO_QUERY);
- ASSERT( xTextTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xTextTunnel.is(), "missing XUnoTunnel for Cursor" );
if( !xTextTunnel.is() )
return;
SwXText *pText = reinterpret_cast< SwXText *>(
sal::static_int_cast< sal_IntPtr >( xTextTunnel->getSomething( SwXText::getUnoTunnelId() )));
- ASSERT( pText, "SwXText missing" );
+ OSL_ENSURE( pText, "SwXText missing" );
if( !pText )
return;
@@ -1145,9 +1128,7 @@ void SwXMLImport::SetViewSettings(const Sequence < PropertyValue > & aViewProps)
bShowRedlineChanges = *(sal_Bool *)(pValue->Value.getValue());
bChangeShowRedline = sal_True;
}
-// #105372#: Headers and footers are not displayed in BrowseView anymore
-// else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ShowHeaderWhileBrowsing" ) ) )
-// else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ShowFooterWhileBrowsing" ) ) )
+// Headers and footers are not displayed in BrowseView anymore
else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "InBrowseMode" ) ) )
{
bBrowseMode = *(sal_Bool *)(pValue->Value.getValue());
@@ -1168,7 +1149,7 @@ void SwXMLImport::SetViewSettings(const Sequence < PropertyValue > & aViewProps)
void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aConfigProps)
{
// this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Reference< lang::XMultiServiceFactory > xFac( GetModel(), UNO_QUERY );
if( !xFac.is() )
@@ -1182,8 +1163,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
if( !xInfo.is() )
return;
- // #111955#
- hash_set< String, StringHashRef, StringEqRef > aSet;
+ boost::unordered_set< String, StringHashRef, StringEqRef > aSet;
aSet.insert(String("ForbiddenCharacters", RTL_TEXTENCODING_ASCII_US));
aSet.insert(String("IsKernAsianPunctuation", RTL_TEXTENCODING_ASCII_US));
aSet.insert(String("CharacterCompressionType", RTL_TEXTENCODING_ASCII_US));
@@ -1208,9 +1188,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
aSet.insert(String("PrintSingleJobs", RTL_TEXTENCODING_ASCII_US));
aSet.insert(String("UpdateFromTemplate", RTL_TEXTENCODING_ASCII_US));
aSet.insert(String("PrinterIndependentLayout", RTL_TEXTENCODING_ASCII_US));
- // --> FME 2005-12-13 #b6354161#
aSet.insert(String("PrintEmptyPages", RTL_TEXTENCODING_ASCII_US));
- // <--
sal_Int32 nCount = aConfigProps.getLength();
const PropertyValue* pValues = aConfigProps.getConstArray();
@@ -1223,7 +1201,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
// default if they're missing. So we watch for them in the loop
// below, and set them if not found
bool bPrinterIndependentLayout = false;
- bool bUseOldNumbering = false; // #111955#
+ bool bUseOldNumbering = false;
bool bOutlineLevelYieldsOutlineRule = false;
bool bAddExternalLeading = false;
bool bAddParaSpacingToTableCells = false;
@@ -1309,17 +1287,15 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
}
catch( Exception& )
{
- DBG_ERROR( "SwXMLImport::SetConfigurationSettings: Exception!" );
+ OSL_FAIL( "SwXMLImport::SetConfigurationSettings: Exception!" );
}
}
pValues++;
}
// finally, treat the non-default cases
- // --> OD 2006-04-18 #b6402800#
// introduce boolean, that indicates a document, written by version prior SO8.
const bool bDocumentPriorSO8 = !bConsiderWrapOnObjPos;
- // <--
if( ! bPrinterIndependentLayout )
{
@@ -1349,7 +1325,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
OUString( RTL_CONSTASCII_USTRINGPARAM("UseFormerObjectPositioning")), makeAny( true ) );
}
- if( !bUseOldNumbering ) // #111955#
+ if( !bUseOldNumbering )
{
Any aAny;
sal_Bool bOldNum = true;
@@ -1388,7 +1364,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
OUString( RTL_CONSTASCII_USTRINGPARAM("ConsiderTextWrapOnObjPos")), makeAny( false ) );
}
- // FME 2005-05-27 #i47448#
+ // #i47448#
// For SO7pp4, part of the 'new numbering' stuff has been backported from
// SO8. Unfortunately, only part of it and by using the same compatibility option
// like in SO8. Therefore documents generated with SO7pp4, containing
@@ -1456,12 +1432,12 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
Reference < XText > xText = xTextDoc->getText();
Reference<XUnoTunnel> xTextTunnel( xText, UNO_QUERY);
- ASSERT( xTextTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xTextTunnel.is(), "missing XUnoTunnel for Cursor" );
if( xTextTunnel.is() )
{
SwXText *pText = reinterpret_cast< SwXText *>(
sal::static_int_cast< sal_IntPtr >( xTextTunnel->getSomething( SwXText::getUnoTunnelId() )));
- ASSERT( pText, "SwXText missing" );
+ OSL_ENSURE( pText, "SwXText missing" );
if( pText )
{
SwDoc *pDoc = pText->GetDoc();
@@ -1477,7 +1453,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
// it is required to clear it.
pDoc->SetOLEPrtNotifyPending( !pPrinter->IsKnown() );
- // FME 2007-05-14 #147385# old printer metrics compatibility
+ // old printer metrics compatibility
if ( pDoc->get(IDocumentSettingAccess::USE_OLD_PRINTER_METRICS ) &&
!pDoc->get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE ) )
{
@@ -1578,8 +1554,6 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMLImport_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
- // #110680#
- // return (cppu::OWeakObject*)new SwXMLImport(IMPORT_ALL);
return (cppu::OWeakObject*)new SwXMLImport( rSMgr, IMPORT_ALL );
}
@@ -1601,10 +1575,6 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMLImportStyles_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
- // #110680#
- //return (cppu::OWeakObject*)new SwXMLImport(
- // IMPORT_STYLES | IMPORT_MASTERSTYLES | IMPORT_AUTOSTYLES |
- // IMPORT_FONTDECLS );
return (cppu::OWeakObject*)new SwXMLImport(
rSMgr,
IMPORT_STYLES | IMPORT_MASTERSTYLES | IMPORT_AUTOSTYLES |
@@ -1629,10 +1599,6 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMLImportContent_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
- // #110680#
- //return (cppu::OWeakObject*)new SwXMLImport(
- // IMPORT_AUTOSTYLES | IMPORT_CONTENT | IMPORT_SCRIPTS |
- // IMPORT_FONTDECLS );
return (cppu::OWeakObject*)new SwXMLImport(
rSMgr,
IMPORT_AUTOSTYLES | IMPORT_CONTENT | IMPORT_SCRIPTS |
@@ -1657,8 +1623,6 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMLImportMeta_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
- // #110680#
- // return (cppu::OWeakObject*)new SwXMLImport( IMPORT_META );
return (cppu::OWeakObject*)new SwXMLImport( rSMgr, IMPORT_META );
}
@@ -1680,8 +1644,6 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMLImportSettings_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
throw( uno::Exception )
{
- // #110680#
- // return (cppu::OWeakObject*)new SwXMLImport( IMPORT_SETTINGS );
return (cppu::OWeakObject*)new SwXMLImport( rSMgr, IMPORT_SETTINGS );
}
@@ -1715,10 +1677,10 @@ SwDoc* SwImport::GetDocFromXMLImport( SvXMLImport& rImport )
uno::Reference<lang::XUnoTunnel> xModelTunnel( rImport.GetModel(), uno::UNO_QUERY );
SwXTextDocument *pTxtDoc = reinterpret_cast< SwXTextDocument *>(
sal::static_int_cast< sal_IntPtr >( xModelTunnel->getSomething(SwXTextDocument::getUnoTunnelId() )));
- ASSERT( pTxtDoc, "Where is my model?" )
- ASSERT( pTxtDoc->GetDocShell(), "Where is my shell?" )
+ OSL_ENSURE( pTxtDoc, "Where is my model?" );
+ OSL_ENSURE( pTxtDoc->GetDocShell(), "Where is my shell?" );
SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc();
- ASSERT( pDoc, "Where is my document?" )
+ OSL_ENSURE( pDoc, "Where is my document?" );
return pDoc;
}
@@ -1743,3 +1705,5 @@ void SwXMLImport::initXForms()
bInititedXForms = sal_True;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index 7a6a8d9e26c3..ff17d5cc849b 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112,14 +113,11 @@ protected:
virtual XMLShapeImportHelper* CreateShapeImport();
public:
-
- // #110680#
SwXMLImport(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
sal_uInt16 nImportFlags = IMPORT_ALL);
#ifdef XML_CORE_API
- // #110680#
SwXMLImport(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
SwDoc& rDoc,
@@ -229,3 +227,5 @@ inline void SwXMLImport::SetProgressValue( sal_Int32 nValue )
}
#endif // _XMLIMP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index c7e50f9fe8b1..889902f6a3a2 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,9 +54,7 @@
#include "fmtornt.hxx"
#include "fmtfsize.hxx"
-#ifndef _FMTLSPLT_HXX
#include "fmtlsplt.hxx"
-#endif
#include <xmloff/prhdlfac.hxx>
#include <xmloff/xmltypes.hxx>
#include "xmlithlp.hxx"
@@ -125,9 +124,6 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
if( 0 == (pEntry->nMemberId&MID_SW_FLAG_SPECIAL_ITEM_IMPORT) )
{
-// bPut = pNewItem->importXML( rValue,
-// pEntry->nMemberId & MID_SW_FLAG_MASK,
-// rUnitConverter );
bPut = PutXMLValue( *pNewItem, rValue,
static_cast<sal_uInt16>( pEntry->nMemberId & MID_SW_FLAG_MASK ),
rUnitConverter );
@@ -147,7 +143,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
}
else
{
- DBG_ERROR( "Could not get a needed item for xml import!" );
+ OSL_FAIL( "Could not get a needed item for xml import!" );
}
}
else if( 0 != (pEntry->nMemberId & MID_SW_FLAG_NO_ITEM_IMPORT) )
@@ -206,7 +202,7 @@ SvXMLImportItemMapper::handleSpecialItem( const SvXMLItemMapEntry& /*rEntry*/,
const SvXMLUnitConverter& /*rUnitConverter*/,
const SvXMLNamespaceMap& /*rNamespaceMap*/ ) const
{
- DBG_ERROR( "unsuported special item in xml import" );
+ OSL_FAIL( "unsuported special item in xml import" );
return sal_False;
}
@@ -218,7 +214,7 @@ sal_Bool SvXMLImportItemMapper::handleNoItem( const SvXMLItemMapEntry& /*rEntry*
const SvXMLUnitConverter& /*rUnitConverter*/,
const SvXMLNamespaceMap& /*rNamespaceMap*/ ) const
{
- DBG_ERROR( "unsuported no item in xml import" );
+ OSL_FAIL( "unsuported no item in xml import" );
return sal_False;
}
@@ -288,7 +284,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
case MID_FIRST_AUTO:
{
- sal_Bool bAutoFirst;
+ bool bAutoFirst;
bOk = rUnitConverter.convertBool( bAutoFirst, rValue );
if( bOk )
pLRSpace->SetAutoFirst( bAutoFirst );
@@ -296,7 +292,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
break;
default:
- DBG_ERROR( "unknown member id!");
+ OSL_FAIL( "unknown member id!");
}
}
break;
@@ -323,7 +319,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
pULSpace->SetLower( (sal_uInt16)nAbs, (sal_uInt16)nProp );
break;
default:
- DBG_ERROR("unknown MemberId");
+ OSL_FAIL("unknown MemberId");
}
}
break;
@@ -966,7 +962,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
break;
default:
- DBG_ERROR("Item not implemented!");
+ OSL_FAIL("Item not implemented!");
break;
}
@@ -974,3 +970,4 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlimpit.hxx b/sw/source/filter/xml/xmlimpit.hxx
index 703c0372392a..578084ee972a 100644
--- a/sw/source/filter/xml/xmlimpit.hxx
+++ b/sw/source/filter/xml/xmlimpit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108,3 +109,5 @@ SvXMLImportItemMapper::getMapEntries() const
#endif // _XMLIMPIT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlitem.cxx b/sw/source/filter/xml/xmlitem.cxx
index bc040877cee6..d2c41d380cdd 100644
--- a/sw/source/filter/xml/xmlitem.cxx
+++ b/sw/source/filter/xml/xmlitem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,4 @@ SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( sal_uInt16 nPrefix,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlitem.hxx b/sw/source/filter/xml/xmlitem.hxx
index 2d3e06bec48e..a47f73e06bb1 100644
--- a/sw/source/filter/xml/xmlitem.hxx
+++ b/sw/source/filter/xml/xmlitem.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,3 +79,4 @@ public:
#endif // _XMLITEM_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx
index 05c30ce7b496..1f38c952459e 100644
--- a/sw/source/filter/xml/xmliteme.cxx
+++ b/sw/source/filter/xml/xmliteme.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -231,7 +232,6 @@ inline void SwXMLTableItemMapper_Impl::SetAbsWidth( sal_uInt32 nAbs )
void SwXMLExport::_InitItemExport()
{
- // #110680#
pTwipUnitConv = new SvXMLUnitConverter( MAP_TWIP,
GetMM100UnitConverter().getXMLMeasureUnit(), getServiceFactory() );
@@ -254,3 +254,5 @@ void SwXMLExport::ExportTableFmt( const SwFrmFmt& rFmt, sal_uInt32 nAbsWidth )
->SetAbsWidth( nAbsWidth );
ExportFmt( rFmt, XML_TABLE );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index 1a421e6ca5ba..c875453e97f1 100644
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,26 +39,18 @@
#include "xmlitem.hxx"
#include <xmloff/i18nmap.hxx>
#include <xmloff/xmluconv.hxx>
-#ifndef _XMLOFF_FAMILIES_HXX
#include <xmloff/families.hxx>
-#endif
#include <svx/unomid.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/tstpitem.hxx>
-#include <editeng/boxitem.hxx>
#include <editeng/brshitem.hxx>
#include <editeng/langitem.hxx>
-#ifndef _XMLOFF_XMLTABI_HXX
-//#include <xmloff/xmltabi.hxx>
-#endif
#include "xmlbrshi.hxx"
#include <paratr.hxx>
#include <doc.hxx>
-#ifndef _UNOMID_H
#include <unomid.h>
-#endif
#include "xmlimp.hxx"
using ::rtl::OUString;
@@ -221,7 +214,6 @@ SvXMLImportContext *SwXMLItemSetContext_Impl::CreateChildContext(
void SwXMLImport::_InitItemImport()
{
- // #110680#
pTwipUnitConv = new SvXMLUnitConverter( MAP_TWIP, MAP_TWIP, getServiceFactory() );
xTableItemMap = new SvXMLItemMapEntries( aXMLTableItemMap );
@@ -270,3 +262,5 @@ SvXMLImportContext *SwXMLImport::CreateTableItemImportContext(
GetTableItemMapper(),
GetTwipUnitConverter() );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlitemm.cxx b/sw/source/filter/xml/xmlitemm.cxx
index e830601fcd18..5bc92baa071c 100644
--- a/sw/source/filter/xml/xmlitemm.cxx
+++ b/sw/source/filter/xml/xmlitemm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,9 +37,7 @@
#include "xmlitmap.hxx"
#include <xmloff/xmltoken.hxx>
-#ifndef _UNOMID_H
#include <unomid.h>
-#endif
using namespace ::xmloff::token;
@@ -294,3 +293,5 @@ SvXMLItemMapEntry aXMLTableCellItemMap[] =
M_END
};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index 84b320fa0ada..11c925cec7bf 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,9 +43,7 @@
#include "fmtornt.hxx"
#include "fmtfsize.hxx"
-#ifndef _FMTLSPLT_HXX
#include "fmtlsplt.hxx"
-#endif
#include <xmloff/xmluconv.hxx>
using ::rtl::OUString;
@@ -55,6 +54,8 @@ using namespace ::com::sun::star;
#define SVX_XML_BORDER_STYLE_NONE 0
#define SVX_XML_BORDER_STYLE_SOLID 1
#define SVX_XML_BORDER_STYLE_DOUBLE 2
+#define SVX_XML_BORDER_STYLE_DOTTED 3
+#define SVX_XML_BORDER_STYLE_DASHED 4
#define SVX_XML_BORDER_WIDTH_THIN 0
#define SVX_XML_BORDER_WIDTH_MIDDLE 1
@@ -67,8 +68,8 @@ const struct SvXMLEnumMapEntry psXML_BorderStyles[] =
{ XML_HIDDEN, SVX_XML_BORDER_STYLE_NONE },
{ XML_SOLID, SVX_XML_BORDER_STYLE_SOLID },
{ XML_DOUBLE, SVX_XML_BORDER_STYLE_DOUBLE },
- { XML_DOTTED, SVX_XML_BORDER_STYLE_SOLID },
- { XML_DASHED, SVX_XML_BORDER_STYLE_SOLID },
+ { XML_DOTTED, SVX_XML_BORDER_STYLE_DOTTED },
+ { XML_DASHED, SVX_XML_BORDER_STYLE_DASHED },
{ XML_GROOVE, SVX_XML_BORDER_STYLE_SOLID },
{ XML_RIDGE, SVX_XML_BORDER_STYLE_SOLID },
{ XML_INSET, SVX_XML_BORDER_STYLE_SOLID },
@@ -179,6 +180,23 @@ sal_Bool lcl_frmitems_parseXMLBorder( const OUString& rValue,
return rHasStyle || rHasWidth || rHasColor;
}
+void lcl_frmitems_setXMLBorderStyle( SvxBorderLine& rLine, sal_uInt16 nStyle )
+{
+ SvxBorderStyle eStyle = SOLID;
+ switch ( nStyle )
+ {
+ case SVX_XML_BORDER_STYLE_DOTTED:
+ eStyle = DOTTED;
+ break;
+ case SVX_XML_BORDER_STYLE_DASHED:
+ eStyle = DASHED;
+ break;
+ default:
+ eStyle = SOLID;
+ }
+ rLine.SetStyle( eStyle );
+}
+
void lcl_frmitems_setXMLBorderWidth( SvxBorderLine& rLine,
sal_uInt16 nOutWidth, sal_uInt16 nInWidth,
sal_uInt16 nDistance )
@@ -266,7 +284,6 @@ sal_Bool lcl_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
rpLine->SetOutWidth( aWidths[nNWidth+1] );
rpLine->SetInWidth( aWidths[nNWidth+2] );
rpLine->SetDistance( aWidths[nNWidth+3] );
-
}
else
{
@@ -276,6 +293,7 @@ sal_Bool lcl_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
lcl_frmitems_setXMLBorderWidth( *rpLine, nWidth, bDouble );
}
+ lcl_frmitems_setXMLBorderStyle( *rpLine, nStyle );
}
// set color
@@ -420,3 +438,4 @@ const struct SvXMLEnumMapEntry aXML_KeepTogetherType[] =
};
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlithlp.hxx b/sw/source/filter/xml/xmlithlp.hxx
index 22efde15bc92..76683e0046d4 100644
--- a/sw/source/filter/xml/xmlithlp.hxx
+++ b/sw/source/filter/xml/xmlithlp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,3 +100,5 @@ extern const struct SvXMLEnumMapEntry aXML_KeepTogetherType[];
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlitmap.hxx b/sw/source/filter/xml/xmlitmap.hxx
index e9cc562010da..978805643080 100644
--- a/sw/source/filter/xml/xmlitmap.hxx
+++ b/sw/source/filter/xml/xmlitmap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -94,3 +95,5 @@ SV_IMPL_REF( SvXMLItemMapEntries )
#endif // _XMLITMAP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlitmpr.cxx b/sw/source/filter/xml/xmlitmpr.cxx
index 0f9f05b1ab16..27c66e9b5640 100644
--- a/sw/source/filter/xml/xmlitmpr.cxx
+++ b/sw/source/filter/xml/xmlitmpr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,4 @@ sal_uInt16 SvXMLItemMapEntries::getCount() const
return mpImpl->mnCount;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx
index c337e231017a..92c743518cb6 100644
--- a/sw/source/filter/xml/xmlmeta.cxx
+++ b/sw/source/filter/xml/xmlmeta.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,8 +66,8 @@ SvXMLImportContext *SwXMLImport::CreateMetaContext(
if( !(IsStylesOnlyMode() || IsInsertMode()) )
{
uno::Reference<xml::sax::XDocumentHandler> xDocBuilder(
- mxServiceFactory->createInstance(::rtl::OUString::createFromAscii(
- "com.sun.star.xml.dom.SAXDocumentBuilder")),
+ mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.xml.dom.SAXDocumentBuilder"))),
uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
GetModel(), UNO_QUERY_THROW);
@@ -96,20 +97,6 @@ enum SvXMLTokenMapAttrs
XML_TOK_META_STAT_END=XML_TOK_UNKNOWN
};
-/*
-static __FAR_DATA SvXMLTokenMapEntry aMetaStatAttrTokenMap[] =
-{
- { XML_NAMESPACE_META, XML_TABLE_COUNT, XML_TOK_META_STAT_TABLE },
- { XML_NAMESPACE_META, XML_IMAGE_COUNT, XML_TOK_META_STAT_IMAGE },
- { XML_NAMESPACE_META, XML_OBJECT_COUNT, XML_TOK_META_STAT_OLE },
- { XML_NAMESPACE_META, XML_PARAGRAPH_COUNT, XML_TOK_META_STAT_PARA },
- { XML_NAMESPACE_META, XML_PAGE_COUNT, XML_TOK_META_STAT_PAGE },
- { XML_NAMESPACE_META, XML_WORD_COUNT, XML_TOK_META_STAT_WORD },
- { XML_NAMESPACE_META, XML_CHARACTER_COUNT, XML_TOK_META_STAT_CHAR },
- XML_TOKEN_MAP_END
-};
-*/
-
struct statistic {
SvXMLTokenMapAttrs token;
const char* name;
@@ -156,7 +143,7 @@ void SwXMLImport::SetStatistics(
}
nTokens |= pStat->token;
} else {
- DBG_ERROR("SwXMLImport::SetStatistics: invalid entry");
+ OSL_FAIL("SwXMLImport::SetStatistics: invalid entry");
}
}
}
@@ -198,3 +185,4 @@ void SwXMLExport::_ExportMeta()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlscript.cxx b/sw/source/filter/xml/xmlscript.cxx
index 48ba4971f9f5..cc9d683a2818 100644
--- a/sw/source/filter/xml/xmlscript.cxx
+++ b/sw/source/filter/xml/xmlscript.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,7 @@
#include <hintids.hxx>
#include <xmloff/xmlnmspe.hxx>
-#ifndef _XMLOFF_XMLMETAI_HXX
#include <xmloff/xmlscripti.hxx>
-#endif
#include "xmlimp.hxx"
#include "xmlexp.hxx"
@@ -63,3 +62,4 @@ SvXMLImportContext *SwXMLImport::CreateScriptContext(
return pContext;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 9180f910b09b..0205783d4611 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,7 +62,6 @@
#include "xmltexte.hxx"
#include "xmlexp.hxx"
-
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
using namespace ::com::sun::star;
@@ -72,7 +72,8 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
using namespace ::xmloff::token;
using table::XCell;
-
+using ::std::vector;
+using ::std::advance;
class SwXMLTableColumn_Impl : public SwWriteTableCol
{
@@ -136,7 +137,7 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
pLines( &rLines ),
nWidth( 0UL )
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uInt32 nEndCPos = 0U;
#endif
sal_uInt16 nLines = rLines.Count();
@@ -163,34 +164,26 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
if( nBox==nBoxes-1U )
{
- ASSERT( nLine==0U && nWidth==0UL,
+ OSL_ENSURE( nLine==0U && nWidth==0UL,
"parent width will be lost" );
nWidth = nCPos;
}
}
else
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_uInt32 nCheckPos =
nCPos + SwWriteTable::GetBoxWidth( pBox );
if( !nEndCPos )
{
nEndCPos = nCheckPos;
}
- else
- {
- /*
- ASSERT( SwXMLTableColumn_impl(nCheckPos) ==
- SwXMLTableColumn_Impl(nEndCPos),
- "rows have different total widths" );
- */
- }
#endif
nCPos = nWidth;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
SwXMLTableColumn_Impl aCol( nWidth );
- ASSERT( aCols.Seek_Entry(&aCol), "couldn't find last column" );
- ASSERT( SwXMLTableColumn_Impl(nCheckPos) ==
+ OSL_ENSURE( aCols.Seek_Entry(&aCol), "couldn't find last column" );
+ OSL_ENSURE( SwXMLTableColumn_Impl(nCheckPos) ==
SwXMLTableColumn_Impl(nCPos),
"rows have different total widths" );
#endif
@@ -199,19 +192,17 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
}
}
-typedef SwXMLTableLines_Impl *SwXMLTableLinesPtr;
-DECLARE_LIST( SwXMLTableLinesCache_Impl, SwXMLTableLinesPtr )
-
// ---------------------------------------------------------------------
-typedef SwFrmFmt *SwFrmFmtPtr;
-DECLARE_LIST( SwXMLFrmFmts_Impl, SwFrmFmtPtr )
+typedef vector< SwFrmFmt* > SwXMLFrmFmts_Impl;
-class SwXMLTableFrmFmtsSort_Impl : public SwXMLFrmFmts_Impl
+class SwXMLTableFrmFmtsSort_Impl
{
+private:
+ SwXMLFrmFmts_Impl aFormatList;
+
public:
- SwXMLTableFrmFmtsSort_Impl ( sal_uInt16 nInit, sal_uInt16 nGrow ) :
- SwXMLFrmFmts_Impl( nInit, nGrow )
+ SwXMLTableFrmFmtsSort_Impl ( sal_uInt16 /* nInit */, sal_uInt16 /*nGrow*/ )
{}
sal_Bool AddRow( SwFrmFmt& rFrmFmt, const OUString& rNamePrefix, sal_uInt32 nLine );
@@ -243,15 +234,14 @@ sal_Bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt,
return sal_False;
// order is: -/brush, size/-, size/brush
- sal_uInt32 nCount2 = Count();
sal_Bool bInsert = sal_True;
- sal_uInt32 i;
- for( i = 0; i < nCount2; ++i )
+ SwXMLFrmFmts_Impl::iterator i;
+ for( i = aFormatList.begin(); i < aFormatList.end(); ++i )
{
const SwFmtFrmSize *pTestFrmSize = 0;
const SwFmtRowSplit* pTestRowSplit = 0;
const SvxBrushItem *pTestBrush = 0;
- const SwFrmFmt *pTestFmt = GetObject(i);
+ const SwFrmFmt *pTestFmt = *i;
const SfxItemSet& rTestSet = pTestFmt->GetAttrSet();
if( SFX_ITEM_SET == rTestSet.GetItemState( RES_FRM_SIZE, sal_False,
&pItem ) )
@@ -322,7 +312,8 @@ sal_Bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt,
sBuffer.append( (sal_Int32)(nLine+1UL) );
rFrmFmt.SetName( sBuffer.makeStringAndClear() );
- Insert( &rFrmFmt, i );
+ if ( i != aFormatList.end() ) ++i;
+ aFormatList.insert( i, &rFrmFmt );
}
return bInsert;
@@ -388,17 +379,16 @@ sal_Bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt,
// vert/-/-/-, vert/-/-/num, vert/-/box/-, ver/-/box/num,
// vert/brush/-/-, vert/brush/-/num, vert/brush/box/-,
// vert/brush/box/num
- sal_uInt32 nCount2 = Count();
sal_Bool bInsert = sal_True;
- sal_uInt32 i;
- for( i = 0; i < nCount2; ++i )
+ SwXMLFrmFmts_Impl::iterator i;
+ for( i = aFormatList.begin(); i < aFormatList.end(); ++i )
{
const SwFmtVertOrient *pTestVertOrient = 0;
const SvxBrushItem *pTestBrush = 0;
const SvxBoxItem *pTestBox = 0;
const SwTblBoxNumFormat *pTestNumFmt = 0;
const SvxFrameDirectionItem *pTestFrameDir = 0;
- const SwFrmFmt *pTestFmt = GetObject(i);
+ const SwFrmFmt* pTestFmt = *i;
const SfxItemSet& rTestSet = pTestFmt->GetAttrSet();
if( SFX_ITEM_SET == rTestSet.GetItemState( RES_VERT_ORIENT, sal_False,
&pItem ) )
@@ -499,7 +489,8 @@ sal_Bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt,
OUStringBuffer sBuffer( rNamePrefix.getLength() + 8UL );
lcl_xmltble_appendBoxPrefix( sBuffer, rNamePrefix, nCol, nRow, bTop );
rFrmFmt.SetName( sBuffer.makeStringAndClear() );
- Insert( &rFrmFmt, i );
+ if ( i != aFormatList.end() ) ++i;
+ aFormatList.insert( i, &rFrmFmt );
}
return bInsert;
@@ -591,11 +582,11 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
sal_Bool bTop )
{
// pass 1: calculate columns
- SwXMLTableLines_Impl *pLines =
- new SwXMLTableLines_Impl( rLines );
+ SwXMLTableLines_Impl *pLines = new SwXMLTableLines_Impl( rLines );
if( !pTableLines )
- pTableLines = new SwXMLTableLinesCache_Impl( 5, 5 );
- pTableLines->Insert( pLines, pTableLines->Count() );
+ pTableLines = new SwXMLTableLinesCache_Impl();
+
+ pTableLines->push_back( pLines );
OUStringBuffer sBuffer( rNamePrefix.getLength() + 8L );
@@ -693,11 +684,13 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
// Und ihren Index
sal_uInt16 nOldCol = nCol;
SwXMLTableColumn_Impl aCol( nCPos );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool bFound =
#endif
pLines->GetColumns().Seek_Entry( &aCol, &nCol );
- ASSERT( bFound, "couldn't find column" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bFound, "couldn't find column" );
+#endif
const SwStartNode *pBoxSttNd = pBox->GetSttNd();
if( pBoxSttNd )
@@ -734,7 +727,7 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
}
}
else {
- DBG_ERROR("here should be a XCell");
+ OSL_FAIL("here should be a XCell");
}
}
else
@@ -875,8 +868,7 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox,
else if ( (-1 != nNumberFormat) && (xText->getString().getLength() > 0) )
{
// number format key:
- // (export values only if cell contains text;
- // cf. #83755#)
+ // (export values only if cell contains text;)
XMLNumberFormatAttributesExportHelper::
SetNumberFormatAttributes(
*this, nNumberFormat, xCell->getValue(),
@@ -913,7 +905,7 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox,
}
else
{
- DBG_ERROR("here should be a XCell");
+ OSL_FAIL("here should be a XCell");
ClearAttrList();
}
}
@@ -983,18 +975,19 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
const sal_uInt16 nOldCol = nCol;
{
SwXMLTableColumn_Impl aCol( nCPos );
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
const sal_Bool bFound =
#endif
rLines.GetColumns().Seek_Entry( &aCol, &nCol );
- ASSERT( bFound, "couldn't find column" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( bFound, "couldn't find column" );
+#endif
}
- // --> OD 2009-03-19 #i95726#
- // Some fault tolerance, if table is somehow corrupted.
+ // #i95726# - Some fault tolerance, if table is somehow corrupted.
if ( nCol < nOldCol )
{
- ASSERT( false, "table and/or table information seems to be corrupted." );
+ OSL_ENSURE( false, "table and/or table information seems to be corrupted." );
if ( nBox == nBoxes - 1 )
{
nCol = rLines.GetColumns().Count() - 1;
@@ -1027,33 +1020,36 @@ void SwXMLExport::ExportTableLines( const SwTableLines& rLines,
SwXMLTableInfo_Impl& rTblInfo,
sal_uInt16 nHeaderRows )
{
- ASSERT( pTableLines && pTableLines->Count(),
+ OSL_ENSURE( pTableLines && !pTableLines->empty(),
"SwXMLExport::ExportTableLines: table columns infos missing" );
- if( !pTableLines || 0 == pTableLines->Count() )
+ if( !pTableLines || pTableLines->empty() )
return;
- SwXMLTableLines_Impl *pLines = 0;
- sal_uInt16 nInfoPos;
- for( nInfoPos=0; nInfoPos < pTableLines->Count(); nInfoPos++ )
+ SwXMLTableLines_Impl* pLines = NULL;
+ size_t nInfoPos;
+ for( nInfoPos=0; nInfoPos < pTableLines->size(); nInfoPos++ )
{
- if( pTableLines->GetObject( nInfoPos )->GetLines() == &rLines )
+ if( pTableLines->at( nInfoPos )->GetLines() == &rLines )
{
- pLines = pTableLines->GetObject( nInfoPos );
+ pLines = pTableLines->at( nInfoPos );
break;
}
}
- ASSERT( pLines,
+ OSL_ENSURE( pLines,
"SwXMLExport::ExportTableLines: table columns info missing" );
- ASSERT( 0==nInfoPos,
+ OSL_ENSURE( 0==nInfoPos,
"SwXMLExport::ExportTableLines: table columns infos are unsorted" );
if( !pLines )
return;
- pTableLines->Remove( nInfoPos );
- if( 0 == pTableLines->Count() )
+ SwXMLTableLinesCache_Impl::iterator it = pTableLines->begin();
+ advance( it, nInfoPos );
+ pTableLines->erase( it );
+
+ if( pTableLines->empty() )
{
delete pTableLines ;
- pTableLines = 0;
+ pTableLines = NULL;
}
// pass 2: export columns
@@ -1215,23 +1211,23 @@ void SwXMLTextParagraphExport::exportTable(
{
pXTable = reinterpret_cast< SwXTextTable * >(
sal::static_int_cast< sal_IntPtr >( xTableTunnel->getSomething( SwXTextTable::getUnoTunnelId() )));
- ASSERT( pXTable, "SwXTextTable missing" );
+ OSL_ENSURE( pXTable, "SwXTextTable missing" );
}
if( pXTable )
{
SwFrmFmt *pFmt = pXTable->GetFrmFmt();
- ASSERT( pFmt, "table format missing" );
+ OSL_ENSURE( pFmt, "table format missing" );
const SwTable *pTbl = SwTable::FindTable( pFmt );
- ASSERT( pTbl, "table missing" );
+ OSL_ENSURE( pTbl, "table missing" );
const SwTableNode *pTblNd = pTbl->GetTableNode();
- ASSERT( pTblNd, "table node missing" );
+ OSL_ENSURE( pTblNd, "table node missing" );
if( bAutoStyles )
{
SwNodeIndex aIdx( *pTblNd );
// AUTOSTYLES: Optimization: Do not export table autostyle if
// we are currently exporting the content.xml stuff and
// the table is located in header/footer:
- // #144704: During the flat XML export (used e.g. by .sdw-export)
+ // During the flat XML export (used e.g. by .sdw-export)
// ALL flags are set at the same time.
const bool bExportStyles = ( GetExport().getExportFlags() & EXPORT_STYLES ) != 0;
if ( bExportStyles || !pFmt->GetDoc()->IsInHeaderFooter( aIdx ) )
@@ -1247,4 +1243,15 @@ void SwXMLTextParagraphExport::exportTable(
((SwXMLExport&)GetExport()).SetShowProgress( bOldShowProgress );
}
+void SwXMLExport::DeleteTableLines()
+{
+ if ( pTableLines )
+ {
+ for ( size_t i = 0, n = pTableLines->size(); i < n; ++i )
+ delete pTableLines->at( i );
+ pTableLines->clear();
+ delete pTableLines;
+ }
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 397ac1bda534..9f8b2501d557 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,7 +66,7 @@
// for locking SolarMutex: svapp + mutex
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include "ndtxt.hxx"
using ::rtl::OUString;
@@ -77,7 +78,8 @@ using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::table;
using namespace ::com::sun::star::xml::sax;
using namespace ::xmloff::token;
-using ::std::hash_map;
+using ::boost::unordered_map;
+using rtl::OUString;
enum SwXMLTableElemTokens
{
@@ -108,7 +110,7 @@ enum SwXMLTableCellAttrTokens
XML_TOK_TABLE_CELL_ATTR_END=XML_TOK_UNKNOWN
};
-static __FAR_DATA SvXMLTokenMapEntry aTableElemTokenMap[] =
+static SvXMLTokenMapEntry aTableElemTokenMap[] =
{
{ XML_NAMESPACE_TABLE, XML_TABLE_HEADER_COLUMNS,
XML_TOK_TABLE_HEADER_COLS },
@@ -131,7 +133,7 @@ static __FAR_DATA SvXMLTokenMapEntry aTableElemTokenMap[] =
XML_TOKEN_MAP_END
};
-static __FAR_DATA SvXMLTokenMapEntry aTableCellAttrTokenMap[] =
+static SvXMLTokenMapEntry aTableCellAttrTokenMap[] =
{
{ XML_NAMESPACE_XML, XML_ID, XML_TOK_TABLE_XMLID },
{ XML_NAMESPACE_TABLE, XML_STYLE_NAME, XML_TOK_TABLE_STYLE_NAME },
@@ -334,7 +336,7 @@ SwXMLTableRow_Impl::SwXMLTableRow_Impl( const OUString& rStyleName,
{
if( pDfltCellStyleName )
aDfltCellStyleName = *pDfltCellStyleName;
- ASSERT( nCells <= USHRT_MAX,
+ OSL_ENSURE( nCells <= USHRT_MAX,
"SwXMLTableRow_Impl::SwXMLTableRow_Impl: too many cells" );
if( nCells > USHRT_MAX )
nCells = USHRT_MAX;
@@ -347,19 +349,17 @@ SwXMLTableRow_Impl::SwXMLTableRow_Impl( const OUString& rStyleName,
inline SwXMLTableCell_Impl *SwXMLTableRow_Impl::GetCell( sal_uInt32 nCol ) const
{
- ASSERT( nCol < USHRT_MAX,
+ OSL_ENSURE( nCol < USHRT_MAX,
"SwXMLTableRow_Impl::GetCell: column number is to big" );
- // --> OD 2009-03-19 #i95726# - some fault tolerance
-// return aCells[(sal_uInt16)nCol];
- ASSERT( nCol < aCells.Count(),
+ // #i95726# - some fault tolerance
+ OSL_ENSURE( nCol < aCells.Count(),
"SwXMLTableRow_Impl::GetCell: column number is out of bound" );
return nCol < aCells.Count() ? aCells[(sal_uInt16)nCol] : 0;
- // <--
}
void SwXMLTableRow_Impl::Expand( sal_uInt32 nCells, sal_Bool bOneCell )
{
- ASSERT( nCells <= USHRT_MAX,
+ OSL_ENSURE( nCells <= USHRT_MAX,
"SwXMLTableRow_Impl::Expand: too many cells" );
if( nCells > USHRT_MAX )
nCells = USHRT_MAX;
@@ -373,7 +373,7 @@ void SwXMLTableRow_Impl::Expand( sal_uInt32 nCells, sal_Bool bOneCell )
nColSpan--;
}
- ASSERT( nCells<=aCells.Count(),
+ OSL_ENSURE( nCells<=aCells.Count(),
"SwXMLTableRow_Impl::Expand: wrong number of cells" );
}
@@ -535,7 +535,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
break;
case XML_TOK_TABLE_BOOLEAN_VALUE:
{
- sal_Bool bTmp;
+ bool bTmp;
if (SvXMLUnitConverter::convertBool(bTmp, rValue))
{
fValue = (bTmp ? 1.0 : 0.0);
@@ -545,7 +545,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
break;
case XML_TOK_TABLE_PROTECTED:
{
- sal_Bool bTmp;
+ bool bTmp;
if (SvXMLUnitConverter::convertBool(bTmp, rValue))
{
bProtect = bTmp;
@@ -575,7 +575,7 @@ inline void SwXMLTableCellContext_Impl::_InsertContent()
inline void SwXMLTableCellContext_Impl::InsertContent()
{
- ASSERT( !HasContent(), "content already there" );
+ OSL_ENSURE( !HasContent(), "content already there" );
bHasTextContent = sal_True;
_InsertContent();
}
@@ -675,10 +675,10 @@ void SwXMLTableCellContext_Impl::EndElement()
// Until we have an API for copying we have to use the core.
Reference<XUnoTunnel> xSrcCrsrTunnel( xSrcTxtCursor, UNO_QUERY);
- ASSERT( xSrcCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xSrcCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
OTextCursorHelper *pSrcTxtCrsr = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xSrcCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
- ASSERT( pSrcTxtCrsr, "SwXTextCursor missing" );
+ OSL_ENSURE( pSrcTxtCrsr, "SwXTextCursor missing" );
SwDoc *pDoc = pSrcTxtCrsr->GetDoc();
const SwPaM *pSrcPaM = pSrcTxtCrsr->GetPaM();
@@ -688,11 +688,11 @@ void SwXMLTableCellContext_Impl::EndElement()
Reference<XUnoTunnel> xDstCrsrTunnel(
GetImport().GetTextImport()->GetCursor(), UNO_QUERY);
- ASSERT( xDstCrsrTunnel.is(),
+ OSL_ENSURE( xDstCrsrTunnel.is(),
"missing XUnoTunnel for Cursor" );
OTextCursorHelper *pDstTxtCrsr = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xDstCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )) );
- ASSERT( pDstTxtCrsr, "SwXTextCursor missing" );
+ OSL_ENSURE( pDstTxtCrsr, "SwXTextCursor missing" );
SwPaM aSrcPaM( *pSrcPaM->GetPoint(),
*pSrcPaM->GetMark() );
SwPosition aDstPos( *pDstTxtCrsr->GetPaM()->GetPoint() );
@@ -1132,7 +1132,7 @@ void SwXMLDDETableContext_Impl::StartElement(
}
else if ( IsXMLToken( aLocalName, XML_AUTOMATIC_UPDATE ) )
{
- sal_Bool bTmp;
+ bool bTmp;
if (SvXMLUnitConverter::convertBool(bTmp, rValue))
{
bIsAutomaticUpdate = bTmp;
@@ -1153,11 +1153,6 @@ String lcl_GenerateFldTypeName(OUString sPrefix, SwTableNode* pTableNode)
{
sPrefixStr = String('_');
}
-// else if (sPrefixStr.Copy(0, 1).IsAlphaAscii())
-// {
-// sPrefixStr.Insert('_', 0);
-// }
- // else: name is OK.
// increase count until we find a name that is not yet taken
String sName;
@@ -1314,7 +1309,7 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
OUString sXmlId;
// this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for( sal_Int16 i=0; i < nAttrCount; i++ )
@@ -1362,13 +1357,13 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
const SwXTextTable *pXTable = 0;
Reference<XMultiServiceFactory> xFactory( GetImport().GetModel(),
UNO_QUERY );
- ASSERT( xFactory.is(), "factory missing" );
+ OSL_ENSURE( xFactory.is(), "factory missing" );
if( xFactory.is() )
{
OUString sService(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextTable" ) );
Reference<XInterface> xIfc = xFactory->createInstance( sService );
- ASSERT( xIfc.is(), "Couldn't create a table" );
+ OSL_ENSURE( xIfc.is(), "Couldn't create a table" );
if( xIfc.is() )
xTable = Reference< XTextTable > ( xIfc, UNO_QUERY );
@@ -1400,7 +1395,7 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
{
pXTable = reinterpret_cast< SwXTextTable * >(
sal::static_int_cast< sal_IntPtr >( xTableTunnel->getSomething( SwXTextTable::getUnoTunnelId() )));
- ASSERT( pXTable, "SwXTextTable missing" );
+ OSL_ENSURE( pXTable, "SwXTextTable missing" );
}
Reference < XCellRange > xCellRange( xTable, UNO_QUERY );
@@ -1415,11 +1410,11 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
if( pXTable )
{
SwFrmFmt *pTblFrmFmt = pXTable->GetFrmFmt();
- ASSERT( pTblFrmFmt, "table format missing" );
+ OSL_ENSURE( pTblFrmFmt, "table format missing" );
SwTable *pTbl = SwTable::FindTable( pTblFrmFmt );
- ASSERT( pTbl, "table missing" );
+ OSL_ENSURE( pTbl, "table missing" );
pTableNode = pTbl->GetTableNode();
- ASSERT( pTableNode, "table node missing" );
+ OSL_ENSURE( pTableNode, "table node missing" );
pTblFrmFmt->SetName( sTblName );
@@ -1529,7 +1524,7 @@ SvXMLImportContext *SwXMLTableContext::CreateChildContext( sal_uInt16 nPrefix,
void SwXMLTableContext::InsertColumn( sal_Int32 nWidth2, sal_Bool bRelWidth2,
const OUString *pDfltCellStyleName )
{
- ASSERT( nCurCol < USHRT_MAX,
+ OSL_ENSURE( nCurCol < USHRT_MAX,
"SwXMLTableContext::InsertColumn: no space left" );
if( nCurCol >= USHRT_MAX )
return;
@@ -1538,15 +1533,14 @@ void SwXMLTableContext::InsertColumn( sal_Int32 nWidth2, sal_Bool bRelWidth2,
nWidth2 = MINLAY;
else if( nWidth2 > USHRT_MAX )
nWidth2 = USHRT_MAX;
- aColumnWidths.Insert( (sal_uInt16)nWidth2, aColumnWidths.Count() );
- aColumnRelWidths.push_back( bRelWidth2 );
+ aColumnWidths.push_back( ColumnWidthInfo(nWidth2, bRelWidth2) );
if( (pDfltCellStyleName && pDfltCellStyleName->getLength() > 0) ||
pColumnDefaultCellStyleNames )
{
if( !pColumnDefaultCellStyleNames )
{
pColumnDefaultCellStyleNames = new SvStringsDtor;
- size_t nCount = aColumnRelWidths.size() - 1;
+ sal_uLong nCount = aColumnWidths.size() - 1;
while( nCount-- )
pColumnDefaultCellStyleNames->Insert( new String,
pColumnDefaultCellStyleNames->Count() );
@@ -1562,12 +1556,12 @@ sal_Int32 SwXMLTableContext::GetColumnWidth( sal_uInt32 nCol,
sal_uInt32 nColSpan ) const
{
sal_uInt32 nLast = nCol+nColSpan;
- if( nLast > aColumnWidths.Count() )
- nLast = aColumnWidths.Count();
+ if( nLast > aColumnWidths.size() )
+ nLast = aColumnWidths.size();
sal_Int32 nWidth2 = 0L;
- for( sal_uInt16 i=(sal_uInt16)nCol; i < nLast; i++ )
- nWidth2 += aColumnWidths[i];
+ for( sal_uInt32 i=nCol; i < nLast; ++i )
+ nWidth2 += aColumnWidths[i].width;
return nWidth2;
}
@@ -1592,17 +1586,17 @@ void SwXMLTableContext::InsertCell( const OUString& rStyleName,
double fValue,
sal_Bool bTextValue )
{
- ASSERT( nCurCol < GetColumnCount(),
+ OSL_ENSURE( nCurCol < GetColumnCount(),
"SwXMLTableContext::InsertCell: row is full" );
- ASSERT( nCurRow < USHRT_MAX,
+ OSL_ENSURE( nCurRow < USHRT_MAX,
"SwXMLTableContext::InsertCell: table is full" );
if( nCurCol >= USHRT_MAX || nCurRow > USHRT_MAX )
return;
- ASSERT( nRowSpan >=1UL, "SwXMLTableContext::InsertCell: row span is 0" );
+ OSL_ENSURE( nRowSpan >=1UL, "SwXMLTableContext::InsertCell: row span is 0" );
if( 0UL == nRowSpan )
nRowSpan = 1UL;
- ASSERT( nColSpan >=1UL, "SwXMLTableContext::InsertCell: col span is 0" );
+ OSL_ENSURE( nColSpan >=1UL, "SwXMLTableContext::InsertCell: col span is 0" );
if( 0UL == nColSpan )
nColSpan = 1UL;
@@ -1648,8 +1642,7 @@ void SwXMLTableContext::InsertCell( const OUString& rStyleName,
{
for( i=GetColumnCount(); i<nColsReq; i++ )
{
- aColumnWidths.Insert( MINLAY, aColumnWidths.Count() );
- aColumnRelWidths.push_back( sal_True );
+ aColumnWidths.push_back( ColumnWidthInfo(MINLAY, sal_True) );
}
// adjust columns in *all* rows, if columns must be inserted
for( i=0; i<pRows->Count(); i++ )
@@ -1701,7 +1694,7 @@ void SwXMLTableContext::InsertRow( const OUString& rStyleName,
sal_Bool bInHead,
const OUString & i_rXmlId )
{
- ASSERT( nCurRow < USHRT_MAX,
+ OSL_ENSURE( nCurRow < USHRT_MAX,
"SwXMLTableContext::InsertRow: no space left" );
if( nCurRow >= USHRT_MAX )
return;
@@ -1817,13 +1810,13 @@ const SwStartNode *SwXMLTableContext::GetPrevStartNode( sal_uInt32 nRow,
{
if( pPrevCell->GetStartNode() )
pSttNd = pPrevCell->GetStartNode();
- // --> OD 2009-03-19 #i95726# - Some fault tolerance
+ // #i95726# - Some fault tolerance
// else
else if ( pPrevCell->GetSubTable() )
// <--
pSttNd = pPrevCell->GetSubTable()->GetLastStartNode();
- ASSERT( pSttNd != 0,
+ OSL_ENSURE( pSttNd != 0,
"table corrupt" );
}
@@ -1915,9 +1908,7 @@ SwTableBoxFmt* SwXMLTableContext::GetSharedBoxFormat(
// (but preserve FillOrder)
pBoxFmt2 = (SwTableBoxFmt*)pBox->ClaimFrmFmt();
SwFmtFillOrder aFillOrder( pBoxFmt2->GetFillOrder() );
- // --> OD 2007-01-25 #i73790# - method renamed
- pBoxFmt2->ResetAllFmtAttr();
- // <--
+ pBoxFmt2->ResetAllFmtAttr(); // #i73790# - method renamed
pBoxFmt2->SetFmtAttr( aFillOrder );
bNew = sal_True; // it's a new format now
@@ -1962,9 +1953,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox( SwTableLine *pUpper,
// TODO: Share formats!
SwFrmFmt *pFrmFmt = pBox->ClaimFrmFmt();
SwFmtFillOrder aFillOrder( pFrmFmt->GetFillOrder() );
- // --> OD 2007-01-25 #i73790# - method renamed
- pFrmFmt->ResetAllFmtAttr();
- // <--
+ pFrmFmt->ResetAllFmtAttr(); // #i73790# - method renamed
pFrmFmt->SetFmtAttr( aFillOrder );
pFrmFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nColWidth ) );
@@ -2085,7 +2074,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
{
// set style
const SfxItemSet *pAutoItemSet = 0;
- if( pCell->GetStartNode() && sStyleName &&
+ if( pCell->GetStartNode() && sStyleName.getLength() &&
GetSwImport().FindAutomaticStyle(
XML_STYLE_FAMILY_TABLE_CELL, sStyleName, &pAutoItemSet ) )
{
@@ -2097,7 +2086,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
if( pCell->GetStartNode() )
{
- // #104801# try to rescue broken documents with a certain pattern
+ // try to rescue broken documents with a certain pattern
// if: 1) the cell has a default number format (number 0)
// 2) the call has no formula
// 3) the value is 0.0
@@ -2228,9 +2217,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
// TODO: Share formats!
SwFrmFmt *pFrmFmt = pLine->ClaimFrmFmt();
SwFmtFillOrder aFillOrder( pFrmFmt->GetFillOrder() );
- // --> OD 2007-01-25 #i73790# - method renamed
- pFrmFmt->ResetAllFmtAttr();
- // <--
+ pFrmFmt->ResetAllFmtAttr(); // #i73790# - method renamed
pFrmFmt->SetFmtAttr( aFillOrder );
const SfxItemSet *pAutoItemSet = 0;
@@ -2257,7 +2244,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
sal_Bool bSplitted = sal_False;
while( !bSplitted )
{
- ASSERT( nCol < nRightCol, "Zu weit gelaufen" );
+ OSL_ENSURE( nCol < nRightCol, "Zu weit gelaufen" );
// Kann hinter der aktuellen HTML-Tabellen-Spalte gesplittet
// werden? Wenn ja, koennte der enstehende Bereich auch noch
@@ -2300,10 +2287,10 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
// No subtabels: We use the new table model.
SwXMLTableCell_Impl *pCell = GetCell(nTopRow,nCol);
- // --> OD 2009-03-19 #i95726# - some fault tolerance
+ // #i95726# - some fault tolerance
if ( pCell == 0 )
{
- ASSERT( false, "table seems to be corrupt." );
+ OSL_ENSURE( false, "table seems to be corrupt." );
break;
}
// <--
@@ -2313,29 +2300,29 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
bSplit = 1UL == pCell->GetColSpan();
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if( nCol == nRightCol-1UL )
{
- ASSERT( bSplit, "Split-Flag falsch" );
+ OSL_ENSURE( bSplit, "Split-Flag falsch" );
if ( bHasSubTables )
{
- ASSERT( !bHoriSplitMayContinue,
+ OSL_ENSURE( !bHoriSplitMayContinue,
"HoriSplitMayContinue-Flag falsch" );
SwXMLTableCell_Impl *pTmpCell = GetCell( nTopRow, nStartCol );
- ASSERT( pTmpCell->GetRowSpan() != (nBottomRow-nTopRow) ||
+ OSL_ENSURE( pTmpCell->GetRowSpan() != (nBottomRow-nTopRow) ||
!bHoriSplitPossible, "HoriSplitPossible-Flag falsch" );
}
}
#endif
- ASSERT( !bHasSubTables || !bHoriSplitMayContinue || bHoriSplitPossible,
+ OSL_ENSURE( !bHasSubTables || !bHoriSplitMayContinue || bHoriSplitPossible,
"bHoriSplitMayContinue, aber nicht bHoriSplitPossible" );
if( bSplit )
{
SwTableBox* pBox = 0;
SwXMLTableCell_Impl *pCell = GetCell( nTopRow, nStartCol );
- // --> OD 2009-03-19 #i95726# - some fault tolerance
+ // #i95726# - some fault tolerance
if( ( !bHasSubTables || ( pCell->GetRowSpan() == (nBottomRow-nTopRow) ) ) &&
pCell->GetColSpan() == (nCol+1UL-nStartCol) &&
( pCell->GetStartNode() || pCell->GetSubTable() ) )
@@ -2387,9 +2374,9 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
// the split at the last split position we remembered.
if( bHoriSplitPossible || nSplitCol > nCol+1 )
{
- ASSERT( !bHoriSplitMayContinue,
+ OSL_ENSURE( !bHoriSplitMayContinue,
"bHoriSplitMayContinue==sal_True" );
- ASSERT( bHoriSplitPossible || nSplitCol == nRightCol,
+ OSL_ENSURE( bHoriSplitPossible || nSplitCol == nRightCol,
"bHoriSplitPossible-Flag sollte gesetzt sein" );
nSplitCol = nCol + 1UL;
@@ -2400,7 +2387,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
bSplitted = sal_True;
}
- ASSERT( bHasSubTables || pBox, "Colspan trouble" )
+ OSL_ENSURE( bHasSubTables || pBox, "Colspan trouble" );
if( pBox )
rBoxes.C40_INSERT( SwTableBox, pBox, rBoxes.Count() );
@@ -2416,7 +2403,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
{
// fix column widths
- sal_uInt32 i;
+ std::vector<ColumnWidthInfo>::iterator colIter;
sal_uInt32 nCols = GetColumnCount();
// If there are empty rows (because of some row span of previous rows)
@@ -2426,14 +2413,14 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
{
SwXMLTableRow_Impl *pPrevRow = (*pRows)[(sal_uInt16)nCurRow-1U];
SwXMLTableCell_Impl *pCell;
- for( i=0UL; i<nCols; i++ )
+ for( sal_uLong i = 0; i < aColumnWidths.size(); ++i )
{
if( ( pCell=pPrevRow->GetCell(i), pCell->GetRowSpan() > 1UL ) )
{
FixRowSpan( nCurRow-1UL, i, 1UL );
}
}
- for( i=(sal_uInt32)pRows->Count()-1UL; i>=nCurRow; i-- )
+ for( sal_uLong i = pRows->Count()-1UL; i>=nCurRow; --i )
pRows->DeleteAndDestroy( (sal_uInt16)i );
}
@@ -2443,28 +2430,27 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
InsertCell( aStyleName2, 1U, nCols, InsertTableSection() );
}
- // TODO: Do we have to keep both values, the realtive and the absolute
+ // TODO: Do we have to keep both values, the relative and the absolute
// width?
sal_Int32 nAbsWidth = 0L;
sal_Int32 nMinAbsColWidth = 0L;
sal_Int32 nRelWidth = 0L;
sal_Int32 nMinRelColWidth = 0L;
sal_uInt32 nRelCols = 0UL;
- for( i=0U; i < nCols; i++ )
+ for( colIter = aColumnWidths.begin(); colIter < aColumnWidths.end(); ++colIter)
{
- sal_Int32 nColWidth = aColumnWidths[(sal_uInt16)i];
- if( aColumnRelWidths[(sal_uInt16)i] )
+ if( colIter->isRelative )
{
- nRelWidth += nColWidth;
- if( 0L == nMinRelColWidth || nColWidth < nMinRelColWidth )
- nMinRelColWidth = nColWidth;
+ nRelWidth += colIter->width;
+ if( 0L == nMinRelColWidth || colIter->width < nMinRelColWidth )
+ nMinRelColWidth = colIter->width;
nRelCols++;
}
else
{
- nAbsWidth += nColWidth;
- if( 0L == nMinAbsColWidth || nColWidth < nMinAbsColWidth )
- nMinAbsColWidth = nColWidth;
+ nAbsWidth += colIter->width;
+ if( 0L == nMinAbsColWidth || colIter->width < nMinAbsColWidth )
+ nMinAbsColWidth = colIter->width;
}
}
sal_uInt32 nAbsCols = nCols - nRelCols;
@@ -2483,13 +2469,13 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
if( 0L == nMinRelColWidth )
nMinRelColWidth = nMinAbsColWidth;
- for( i=0UL; nAbsCols > 0UL && i < nCols; i++ )
+ for( colIter = aColumnWidths.begin(); nAbsCols > 0UL && colIter < aColumnWidths.end(); ++colIter)
{
- if( !aColumnRelWidths[(sal_uInt16)i] )
+ if( !colIter->isRelative )
{
- sal_Int32 nRelCol = (aColumnWidths[(sal_uInt16)i] * nMinRelColWidth) /
- nMinAbsColWidth;
- aColumnWidths.Replace( (sal_uInt16)nRelCol, (sal_uInt16)i );
+ sal_Int32 nRelCol = ( colIter->width * nMinRelColWidth) / nMinAbsColWidth;
+ colIter->width = nRelCol;
+ colIter->isRelative = true;
nRelWidth += nRelCol;
nAbsCols--;
}
@@ -2509,14 +2495,13 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
{
double n = (double)nWidth / (double)nRelWidth;
nRelWidth = 0L;
- for( i=0U; i < nCols-1UL; i++ )
+ for( colIter = aColumnWidths.begin(); colIter < aColumnWidths.end() - 1; ++colIter)
{
- sal_Int32 nW = (sal_Int32)(aColumnWidths[(sal_uInt16)i] * n);
- aColumnWidths.Replace( (sal_uInt16)nW, (sal_uInt16)i );
+ sal_Int32 nW = (sal_Int32)( colIter->width * n);
+ colIter->width = (sal_uInt16)nW;
nRelWidth += nW;
}
- aColumnWidths.Replace( (sal_uInt16)(nWidth-nRelWidth),
- (sal_uInt16)nCols-1U );
+ aColumnWidths.back().width = (nWidth-nRelWidth);
}
}
else
@@ -2564,9 +2549,9 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
// Otherwise, if there is enouth space for every column, every
// column gets this space.
- for( i=0UL; nRelCols > 0UL && i < nCols; i++ )
+ for( colIter = aColumnWidths.begin(); nRelCols > 0UL && colIter < aColumnWidths.end(); ++colIter )
{
- if( aColumnRelWidths[(sal_uInt16)i] )
+ if( colIter->isRelative )
{
sal_Int32 nAbsCol;
if( 1UL == nRelCols )
@@ -2583,18 +2568,17 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
}
else if( bMinExtra )
{
- sal_Int32 nExtraRelCol =
- aColumnWidths[(sal_uInt16)i] - nMinRelColWidth;
+ sal_Int32 nExtraRelCol = colIter->width - nMinRelColWidth;
nAbsCol = MINLAY + (nExtraRelCol * nExtraAbs) /
nExtraRel;
}
else
{
- nAbsCol = (aColumnWidths[(sal_uInt16)i] * nAbsForRelWidth) /
- nRelWidth;
+ nAbsCol = ( colIter->width * nAbsForRelWidth) / nRelWidth;
}
}
- aColumnWidths.Replace( (sal_uInt16)nAbsCol, (sal_uInt16)i );
+ colIter->width = nAbsCol;
+ colIter->isRelative = false;
nAbsForRelWidth -= nAbsCol;
nAbsWidth += nAbsCol;
nRelCols--;
@@ -2606,39 +2590,38 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
{
if( nAbsWidth < nWidth )
{
- // If the table's width is larger than the absolute column widths,
- // every column get some extra width.
+ // If the table's width is larger than the sum of the absolute
+ // column widths, every column get some extra width.
sal_Int32 nExtraAbs = nWidth - nAbsWidth;
- sal_Int32 nAbsLastCol =
- aColumnWidths[(sal_uInt16)nCols-1U] + nExtraAbs;
- for( i=0UL; i < nCols-1UL; i++ )
+ sal_Int32 nAbsLastCol = aColumnWidths.back().width + nExtraAbs;
+ for( colIter = aColumnWidths.begin(); colIter < aColumnWidths.end()-1UL; ++colIter )
{
- sal_Int32 nAbsCol = aColumnWidths[(sal_uInt16)i];
+ sal_Int32 nAbsCol = colIter->width;
sal_Int32 nExtraAbsCol = (nAbsCol * nExtraAbs) /
nAbsWidth;
nAbsCol += nExtraAbsCol;
- aColumnWidths.Replace( (sal_uInt16)nAbsCol, (sal_uInt16)i );
+ colIter->width = nAbsCol;
nAbsLastCol -= nExtraAbsCol;
}
- aColumnWidths.Replace( (sal_uInt16)nAbsLastCol, (sal_uInt16)nCols-1U );
+ aColumnWidths.back().width = nAbsLastCol;
}
else if( nAbsWidth > nWidth )
{
- // If the table's width is smaller than the absolute column
- // widths, every column gets the minimum width plus some extra
- // width.
+ // If the table's width is smaller than the sum of the absolute
+ // column widths, every column needs to shrink.
+ // Every column gets the minimum width plus some extra width.
sal_Int32 nExtraAbs = nWidth - (nCols * MINLAY);
sal_Int32 nAbsLastCol = MINLAY + nExtraAbs;
- for( i=0UL; i < nCols-1UL; i++ )
+ for( colIter = aColumnWidths.begin(); colIter < aColumnWidths.end()-1UL; ++colIter )
{
- sal_Int32 nAbsCol = aColumnWidths[(sal_uInt16)i];
+ sal_Int32 nAbsCol = colIter->width;
sal_Int32 nExtraAbsCol = (nAbsCol * nExtraAbs) /
nAbsWidth;
nAbsCol = MINLAY + nExtraAbsCol;
- aColumnWidths.Replace( (sal_uInt16)nAbsCol, (sal_uInt16)i );
+ colIter->width = nAbsCol;
nAbsLastCol -= nExtraAbsCol;
}
- aColumnWidths.Replace( (sal_uInt16)nAbsLastCol, (sal_uInt16)nCols-1U );
+ aColumnWidths.back().width = nAbsLastCol;
}
}
}
@@ -2649,7 +2632,7 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
sal_uInt32 nStartRow = 0UL;
sal_uInt32 nRows = pRows->Count();
- for( i=0UL; i<nRows; i++ )
+ for(sal_uInt32 i=0UL; i<nRows; ++i )
{
// Could we split the table behind the current line?
sal_Bool bSplit = sal_True;
@@ -2680,12 +2663,12 @@ void SwXMLTableContext::MakeTable()
// this method will modify the document directly -> lock SolarMutex
// This will call all other MakeTable*(..) methods, so
// those don't need to be locked separately.
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// #i97274# handle invalid tables
if (!pRows || !pRows->Count() || !GetColumnCount())
{
- ASSERT(false, "invalid table: no cells; deleting...");
+ OSL_ENSURE(false, "invalid table: no cells; deleting...");
pTableNode->GetDoc()->DeleteSection( pTableNode );
pTableNode = 0;
pBox1 = 0;
@@ -2755,7 +2738,7 @@ void SwXMLTableContext::MakeTable()
{
case text::HoriOrientation::FULL:
case text::HoriOrientation::NONE:
- // #78246#: For text::HoriOrientation::NONE we would prefere to use the sum
+ // For text::HoriOrientation::NONE we would prefere to use the sum
// of the relative column widths as reference width.
// Unfortunately this works only if this sum interpreted as
// twip value is larger than the space that is avaialable.
@@ -2879,10 +2862,10 @@ const SwStartNode *SwXMLTableContext::InsertTableSection(
const SwStartNode *pStNd;
Reference<XUnoTunnel> xCrsrTunnel( GetImport().GetTextImport()->GetCursor(),
UNO_QUERY);
- ASSERT( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
- ASSERT( pTxtCrsr, "SwXTextCursor missing" );
+ OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" );
if( bFirstSection )
{
@@ -2898,9 +2881,9 @@ const SwStartNode *SwXMLTableContext::InsertTableSection(
SwDoc* pDoc = SwImport::GetDocFromXMLImport( GetSwImport() );
const SwEndNode *pEndNd = pPrevSttNd ? pPrevSttNd->EndOfSectionNode()
: pTableNode->EndOfSectionNode();
- // --> OD 2007-07-02 #i78921# - make code robust
+ // #i78921# - make code robust
#if OSL_DEBUG_LEVEL > 1
- ASSERT( pDoc, "<SwXMLTableContext::InsertTableSection(..)> - no <pDoc> at <SwXTextCursor> instance - <SwXTextCurosr> doesn't seem to be registered at a <SwUnoCrsr> instance." );
+ OSL_ENSURE( pDoc, "<SwXMLTableContext::InsertTableSection(..)> - no <pDoc> at <SwXTextCursor> instance - <SwXTextCurosr> doesn't seem to be registered at a <SwUnoCrsr> instance." );
#endif
if ( !pDoc )
{
@@ -2913,10 +2896,9 @@ const SwStartNode *SwXMLTableContext::InsertTableSection(
pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false );
pStNd = pDoc->GetNodes().MakeTextSection( aIdx, SwTableBoxStartNode,
pColl );
- // --> FLR 2005-08-30 #125369#
// Consider the case that a table is defined without a row.
if( !pPrevSttNd && pBox1 != NULL )
- // <--
+
{
pBox1->pSttNd = pStNd;
SwCntntNode *pCNd = pDoc->GetNodes()[ pStNd->GetIndex() + 1 ]
@@ -2949,3 +2931,5 @@ Reference < XTextContent > SwXMLTableContext::GetXTextContent() const
{
return xTextContent;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx
index 3df8a8b8e41b..4d6d2cfc88e7 100644
--- a/sw/source/filter/xml/xmltbli.hxx
+++ b/sw/source/filter/xml/xmltbli.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,11 +32,11 @@
#include <xmloff/XMLTextTableContext.hxx>
// STL include
-#include <hash_map>
+#include <boost/unordered_map.hpp>
+#include <vector>
-#if !defined(_SVSTDARR_USHORTS_DECL) || !defined(_SVSTDARR_BOOLS_DECL) || !defined(_SVSTDARR_STRINGSDTOR_DECL)
+#if !defined(_SVSTDARR_USHORTS_DECL) || !defined(_SVSTDARR_STRINGSDTOR_DECL)
#define _SVSTDARR_USHORTS
-#define _SVSTDARR_BOOLS
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
#endif
@@ -67,8 +68,13 @@ class SwXMLTableContext : public XMLTextTableContext
/// NB: this contains the xml:id only if this table is a subtable!
::rtl::OUString mXmlId;
- SvUShorts aColumnWidths;
- SvBools aColumnRelWidths;
+ //! Holds basic information about a column's width.
+ struct ColumnWidthInfo {
+ sal_uInt16 width; //!< Column width (absolute or relative).
+ bool isRelative; //!< True for a relative width, false for absolute.
+ inline ColumnWidthInfo(sal_uInt16 wdth, bool isRel) : width(wdth), isRelative(isRel) {};
+ };
+ std::vector<ColumnWidthInfo> aColumnWidths;
SvStringsDtor *pColumnDefaultCellStyleNames;
::com::sun::star::uno::Reference <
@@ -87,7 +93,7 @@ class SwXMLTableContext : public XMLTextTableContext
// hash map of shared format, indexed by the (XML) style name,
// the column width, and protection flag
- typedef std::hash_map<TableBoxIndex,SwTableBoxFmt*,
+ typedef boost::unordered_map<TableBoxIndex,SwTableBoxFmt*,
TableBoxIndexHasher> map_BoxFmt;
map_BoxFmt* pSharedBoxFormats;
@@ -209,7 +215,7 @@ inline SwXMLTableContext *SwXMLTableContext::GetParentTable() const
inline sal_uInt32 SwXMLTableContext::GetColumnCount() const
{
- return aColumnWidths.Count();
+ return aColumnWidths.size();
}
inline const SwStartNode *SwXMLTableContext::GetLastStartNode() const
@@ -223,3 +229,5 @@ inline sal_Bool SwXMLTableContext::HasColumnDefaultCellStyleNames() const
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmltext.cxx b/sw/source/filter/xml/xmltext.cxx
index f9cf0f6cdc7c..8aeb334cfde3 100644
--- a/sw/source/filter/xml/xmltext.cxx
+++ b/sw/source/filter/xml/xmltext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,7 +88,7 @@ SvXMLImportContext *SwXMLBodyContentContext_Impl::CreateChildContext(
void SwXMLBodyContentContext_Impl::EndElement()
{
- /* #108146# Code moved to SwXMLOmport::endDocument */
+ /* Code moved to SwXMLOmport::endDocument */
GetImport().GetTextImport()->SetOutlineStyles( sal_False );
}
@@ -105,3 +106,5 @@ SvXMLImportContext *SwXMLImport::CreateBodyContentContext(
return pContext;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 775f23b6aa40..b99f10ad9365 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,6 +72,8 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::document;
using namespace ::com::sun::star::io;
using namespace ::xmloff::token;
+using rtl::OUString;
+using rtl::OUStringBuffer;
enum SvEmbeddedObjectTypes
{
@@ -89,10 +92,10 @@ SwNoTxtNode *SwXMLTextParagraphExport::GetNoTxtNode(
const Reference < XPropertySet >& rPropSet ) const
{
Reference<XUnoTunnel> xCrsrTunnel( rPropSet, UNO_QUERY );
- ASSERT( xCrsrTunnel.is(), "missing XUnoTunnel for embedded" );
+ OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for embedded" );
SwXFrame *pFrame = reinterpret_cast< SwXFrame * >(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( SwXFrame::getUnoTunnelId() )));
- ASSERT( pFrame, "SwXFrame missing" );
+ OSL_ENSURE( pFrame, "SwXFrame missing" );
SwFrmFmt *pFrmFmt = pFrame->GetFrmFmt();
const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt();
const SwNodeIndex *pNdIdx = rCntnt.GetCntntIdx();
@@ -115,7 +118,7 @@ void SwXMLTextParagraphExport::exportStyleContent(
const SwDoc *pDoc = pStyle->GetDoc();
const SwTxtFmtColl *pColl =
pDoc->FindTxtFmtCollByName( pStyle->GetStyleName() );
- ASSERT( pColl, "There is the text collection?" );
+ OSL_ENSURE( pColl, "There is the text collection?" );
if( pColl && RES_CONDTXTFMTCOLL == pColl->Which() )
{
const SwFmtCollConditions& rConditions =
@@ -224,7 +227,7 @@ void SwXMLTextParagraphExport::setTextEmbeddedGraphicURL(
SwGrfNode *pGrfNd = GetNoTxtNode( rPropSet )->GetGrfNode();
if( !pGrfNd->IsGrfLink() )
{
- String aNewURL( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.Package:") );
+ String aNewURL( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.Package:") );
aNewURL += String(rURL);
pGrfNd->SetNewStreamName( aNewURL );
@@ -233,13 +236,6 @@ void SwXMLTextParagraphExport::setTextEmbeddedGraphicURL(
pGrfNd->SwapOut();
}
}
-/*
-static void lcl_addParam ( SvXMLExport &rExport, const SvCommand &rCommand )
-{
- rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, rCommand.GetCommand() );
- rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, rCommand.GetArgument() );
- SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, XML_PARAM, sal_False, sal_True );
-}*/
static void lcl_addURL ( SvXMLExport &rExport, const String &rURL,
sal_Bool bToRel = sal_True )
@@ -289,22 +285,18 @@ void lcl_addOutplaceProperties(
if( aSize.Width() && aSize.Height() )
{
Any aAny;
- //aAny <<= (sal_Int32)rVisArea.Left();
aAny <<= 0L;
*pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_LEFT ), aAny );
pStates++;
- //aAny <<= (sal_Int32)rVisArea.Top();
aAny <<= 0L;
*pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_TOP ), aAny );
pStates++;
- //aAny <<= (sal_Int32)rVisArea.GetWidth();
aAny <<= (sal_Int32)aSize.Width();
*pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_WIDTH ), aAny );
pStates++;
- //aAny <<= (sal_Int32)rVisArea.GetHeight();
aAny <<= (sal_Int32)aSize.Height();
*pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_HEIGHT ), aAny );
pStates++;
@@ -325,35 +317,35 @@ void lcl_addFrameProperties(
return;
::rtl::OUString aURL;
- Any aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameURL") );
+ Any aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")) );
aAny >>= aURL;
::rtl::OUString aName;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameName") );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")));
aAny >>= aName;
sal_Bool bIsAutoScroll = sal_False, bIsScrollingMode;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoScroll") );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll")));
aAny >>= bIsAutoScroll;
if ( !bIsAutoScroll )
{
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameIsScrollingMode") );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode")) );
aAny >>= bIsScrollingMode;
}
sal_Bool bIsBorderSet, bIsAutoBorder = sal_False;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoBorder") );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoBorder")) );
aAny >>= bIsAutoBorder;
if ( !bIsAutoBorder )
{
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameIsBorder") );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder")) );
aAny >>= bIsBorderSet;
}
sal_Int32 nWidth, nHeight;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginWidth") );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth")) );
aAny >>= nWidth;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginHeight") );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight")) );
aAny >>= nHeight;
if( !bIsAutoScroll )
@@ -517,7 +509,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
catch( uno::Exception )
{
// TODO/LATER: error handling
- DBG_ERROR( "Link detection or retrieving of the URL of OOo link is failed!\n" );
+ OSL_FAIL( "Link detection or retrieving of the URL of OOo link is failed!\n" );
}
}
@@ -575,27 +567,27 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
{
uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
::rtl::OUString aStr;
- Any aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletCodeBase") );
+ Any aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCodeBase")) );
aAny2 >>= aStr;
if (aStr.getLength() )
lcl_addURL(rXMLExport, aStr);
- aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletName") );
+ aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletName")) );
aAny2 >>= aStr;
if (aStr.getLength())
rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_APPLET_NAME, aStr );
- aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletCode") );
+ aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCode")) );
aAny2 >>= aStr;
rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CODE, aStr );
sal_Bool bScript = sal_False;
- aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletIsScript") );
+ aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletIsScript")) );
aAny2 >>= bScript;
rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MAY_SCRIPT, bScript ? XML_TRUE : XML_FALSE );
uno::Sequence < beans::PropertyValue > aProps;
- aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletCommands") );
+ aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")) );
aAny2 >>= aProps;
sal_Int32 i = aProps.getLength();
@@ -622,11 +614,11 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
{
uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
::rtl::OUString aStr;
- Any aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("PluginURL") );
+ Any aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")) );
aAny2 >>= aStr;
lcl_addURL( rXMLExport, aStr );
- aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("PluginMimeType") );
+ aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")) );
aAny2 >>= aStr;
if (aStr.getLength())
rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, aStr );
@@ -641,12 +633,12 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
{
uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
::rtl::OUString aStr;
- Any aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameURL") );
+ Any aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")) );
aAny2 >>= aStr;
lcl_addURL( rXMLExport, aStr );
- aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameName") );
+ aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")) );
aAny2 >>= aStr;
if (aStr.getLength())
@@ -656,7 +648,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
}
break;
default:
- ASSERT( !this, "unknown object type! Base class should have been called!" );
+ OSL_ENSURE( !this, "unknown object type! Base class should have been called!" );
}
{
@@ -668,7 +660,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
if( (rXMLExport.getExportFlags() & EXPORT_EMBEDDED) != 0 )
{
Reference < XEmbeddedObjectSupplier > xEOS( rPropSet, UNO_QUERY );
- ASSERT( xEOS.is(), "no embedded object supplier for own object" );
+ OSL_ENSURE( xEOS.is(), "no embedded object supplier for own object" );
Reference < XComponent > xComp = xEOS->getEmbeddedObject();
rXMLExport.ExportEmbeddedOwnObject( xComp );
}
@@ -691,7 +683,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
{
uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
uno::Sequence < beans::PropertyValue > aProps;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletCommands") );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")) );
aAny >>= aProps;
sal_Int32 i = aProps.getLength();
@@ -717,7 +709,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
{
uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
uno::Sequence < beans::PropertyValue > aProps;
- aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("PluginCommands") );
+ aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")) );
aAny >>= aProps;
sal_Int32 i = aProps.getLength();
@@ -760,8 +752,8 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
// Lastly the stuff common to each of Applet/Plugin/Floating Frame
exportEvents( rPropSet );
- // --> OD 2009-07-22 #i73249#
- exportTitleAndDescription( rPropSet, rPropSetInfo );
- // <--
+ exportTitleAndDescription( rPropSet, rPropSetInfo ); // #i73249#
exportContour( rPropSet, rPropSetInfo );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmltexte.hxx b/sw/source/filter/xml/xmltexte.hxx
index ea0fd20356e9..37045870d389 100644
--- a/sw/source/filter/xml/xmltexte.hxx
+++ b/sw/source/filter/xml/xmltexte.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,3 +87,5 @@ public:
#endif // _XMLTEXTE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index d5f298b5292c..fdc9fbbad84a 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,7 +67,7 @@
// for locking SolarMutex: svapp + mutex
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <svtools/embedhlp.hxx>
@@ -152,7 +153,7 @@ static void lcl_setObjectVisualArea( const uno::Reference< embed::XEmbeddedObjec
}
catch( uno::Exception& )
{
- OSL_ASSERT( "Couldn't set visual area of the object!\n" );
+ OSL_FAIL( "Couldn't set visual area of the object!\n" );
}
}
}
@@ -175,8 +176,8 @@ SwXMLTextImportHelper::SwXMLTextImportHelper(
SwXMLTextImportHelper::~SwXMLTextImportHelper()
{
- // #90463# the redline helper destructor sets properties on the document
- // and may through an exception while doing so... catch this
+ // the redline helper destructor sets properties on the document
+ // and may through an exception while doing so... catch this
try
{
delete pRedlineHelper;
@@ -200,10 +201,10 @@ sal_Bool SwXMLTextImportHelper::IsInHeaderFooter() const
{
uno::Reference<XUnoTunnel> xCrsrTunnel(
((SwXMLTextImportHelper *)this)->GetCursor(), UNO_QUERY );
- ASSERT( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
- ASSERT( pTxtCrsr, "SwXTextCursor missing" );
+ OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" );
SwDoc *pDoc = pTxtCrsr->GetDoc();
return pDoc && pDoc->IsInHeaderFooter( pTxtCrsr->GetPaM()->GetPoint()->nNode );
@@ -218,7 +219,7 @@ SwOLENode *lcl_GetOLENode( const SwFrmFmt *pFrmFmt )
const SwNodeIndex *pNdIdx = rCntnt.GetCntntIdx();
pOLENd = pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetOLENode();
}
- ASSERT( pOLENd, "Where is the OLE node" );
+ OSL_ENSURE( pOLENd, "Where is the OLE node" );
return pOLENd;
}
@@ -230,7 +231,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
sal_Int32 nWidth, sal_Int32 nHeight )
{
// this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference < XPropertySet > xPropSet;
@@ -244,10 +245,10 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
return xPropSet;
uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY );
- ASSERT( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
- ASSERT( pTxtCrsr, "SwXTextCursor missing" );
+ OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" );
SwDoc *pDoc = SwImport::GetDocFromXMLImport( rImport );
SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
@@ -288,7 +289,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
{
// create object with desired ClassId
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
- ::rtl::OUString aName = ::rtl::OUString::createFromAscii( "DummyName" );
+ ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("DummyName"));
uno::Sequence < sal_Int8 > aClass( aClassName.GetByteSequence() );
uno::Reference < embed::XEmbedObjectCreator > xFactory( ::comphelper::getProcessServiceFactory()->createInstance(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.EmbeddedObjectCreator")) ), uno::UNO_QUERY );
@@ -384,7 +385,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt();
const SwNodeIndex *pNdIdx = rCntnt.GetCntntIdx();
SwOLENode *pOLENode = pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetOLENode();
- ASSERT( pOLENode, "Where is the OLE node" );
+ OSL_ENSURE( pOLENode, "Where is the OLE node" );
OUStringBuffer aBuffer( rTblName.getLength() );
sal_Bool bQuoted = sal_False;
@@ -466,7 +467,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
UniReference < SvXMLImportPropertyMapper > xImpPrMap =
pStyle->GetStyles()
->GetImportPropertyMapper(pStyle->GetFamily());
- ASSERT( xImpPrMap.is(), "Where is the import prop mapper?" );
+ OSL_ENSURE( xImpPrMap.is(), "Where is the import prop mapper?" );
if( xImpPrMap.is() )
{
UniReference<XMLPropertySetMapper> rPropMapper =
@@ -549,15 +550,15 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink(
sal_Int32 nWidth, sal_Int32 nHeight )
{
// this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference < XPropertySet > xPropSet;
uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY );
- ASSERT( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
- ASSERT( pTxtCrsr, "SwXTextCursor missing" );
+ OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" );
SwDoc *pDoc = SwImport::GetDocFromXMLImport( rImport );
SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
@@ -580,13 +581,13 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink(
try
{
// create object with desired ClassId
- ::rtl::OUString aName = ::rtl::OUString::createFromAscii( "DummyName" );
+ ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("DummyName"));
uno::Reference < embed::XLinkCreator > xFactory( ::comphelper::getProcessServiceFactory()->createInstance(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OOoEmbeddedObjectFactory")) ),
uno::UNO_QUERY_THROW );
uno::Sequence< beans::PropertyValue > aMediaDescriptor( 1 );
- aMediaDescriptor[0].Name = ::rtl::OUString::createFromAscii( "URL" );
+ aMediaDescriptor[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"));
aMediaDescriptor[0].Value <<= ::rtl::OUString( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
if ( pDoc && pDoc->GetDocShell() && pDoc->GetDocShell()->GetMedium() )
{
@@ -638,14 +639,14 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet(
sal_Int32 nWidth, sal_Int32 nHeight )
{
// this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference < XPropertySet > xPropSet;
uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY );
- ASSERT( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
- ASSERT( pTxtCrsr, "SwXTextCursor missing" );
+ OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" );
SwDoc *pDoc = pTxtCrsr->GetDoc();
SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
@@ -687,10 +688,10 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
{
uno::Reference < XPropertySet > xPropSet;
uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY );
- ASSERT( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
- ASSERT( pTxtCrsr, "SwXTextCursor missing" );
+ OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" );
SwDoc *pDoc = pTxtCrsr->GetDoc();
SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
@@ -712,7 +713,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
try
{
// create object with desired ClassId
- ::rtl::OUString aName = ::rtl::OUString::createFromAscii( "DummyName" );
+ ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("DummyName"));
uno::Sequence < sal_Int8 > aClass( SvGlobalName( SO3_PLUGIN_CLASSID ).GetByteSequence() );
uno::Reference < embed::XEmbedObjectCreator > xFactory( ::comphelper::getProcessServiceFactory()->createInstance(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.EmbeddedObjectCreator")) ), uno::UNO_QUERY );
@@ -733,10 +734,10 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
if ( xSet.is() )
{
if( bValidURL )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginURL"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")),
makeAny( ::rtl::OUString( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ) ) );
if( bValidMimeType )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginMimeType"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")),
makeAny( ::rtl::OUString( rMimeType ) ) );
}
@@ -765,14 +766,14 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
sal_Int32 nWidth, sal_Int32 nHeight )
{
// this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference < XPropertySet > xPropSet;
uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY );
- ASSERT( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
+ OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
- ASSERT( pTxtCrsr, "SwXTextCursor missing" );
+ OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" );
SwDoc *pDoc = pTxtCrsr->GetDoc();
SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
@@ -792,7 +793,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
UniReference < SvXMLImportPropertyMapper > xImpPrMap =
pStyle->GetStyles()
->GetImportPropertyMapper(pStyle->GetFamily());
- ASSERT( xImpPrMap.is(), "Where is the import prop mapper?" );
+ OSL_ENSURE( xImpPrMap.is(), "Where is the import prop mapper?" );
if( xImpPrMap.is() )
{
UniReference<XMLPropertySetMapper> rPropMapper =
@@ -844,7 +845,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
try
{
// create object with desired ClassId
- ::rtl::OUString aName = ::rtl::OUString::createFromAscii( "DummyName" );
+ ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("DummyName"));
uno::Sequence < sal_Int8 > aClass( SvGlobalName( SO3_IFRAME_CLASSID ).GetByteSequence() );
uno::Reference < embed::XEmbedObjectCreator > xFactory( ::comphelper::getProcessServiceFactory()->createInstance(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.EmbeddedObjectCreator")) ), uno::UNO_QUERY );
@@ -864,31 +865,31 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY );
if ( xSet.is() )
{
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameURL"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")),
makeAny( ::rtl::OUString( URIHelper::SmartRel2Abs(
INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) ) ) );
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameName"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")),
makeAny( ::rtl::OUString( rName ) ) );
if ( eScrollMode == ScrollingAuto )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoScroll"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll")),
makeAny( sal_True ) );
else
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsScrollingMode"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode")),
makeAny( (sal_Bool) (eScrollMode == ScrollingYes) ) );
if ( bIsBorderSet )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsBorder"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder")),
makeAny( bHasBorder ) );
else
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoBorder"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoBorder")),
makeAny( sal_True ) );
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginWidth"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth")),
makeAny( sal_Int32( aMargin.Width() ) ) );
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginHeight"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight")),
makeAny( sal_Int32( aMargin.Height() ) ) );
}
@@ -916,13 +917,13 @@ void SwXMLTextImportHelper::endAppletOrPlugin(
::std::map < const ::rtl::OUString, ::rtl::OUString, ::comphelper::UStringLess > &rParamMap)
{
// this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference<XUnoTunnel> xCrsrTunnel( rPropSet, UNO_QUERY );
- ASSERT( xCrsrTunnel.is(), "missing XUnoTunnel for embedded" );
+ OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for embedded" );
SwXFrame *pFrame = reinterpret_cast< SwXFrame * >(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( SwXFrame::getUnoTunnelId() )));
- ASSERT( pFrame, "SwXFrame missing" );
+ OSL_ENSURE( pFrame, "SwXFrame missing" );
SwFrmFmt *pFrmFmt = pFrame->GetFrmFmt();
const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt();
const SwNodeIndex *pNdIdx = rCntnt.GetCntntIdx();
@@ -951,14 +952,14 @@ void SwXMLTextImportHelper::endAppletOrPlugin(
}
// unfortunately the names of the properties are depending on the object
- ::rtl::OUString aParaName = ::rtl::OUString::createFromAscii("AppletCommands");
+ ::rtl::OUString aParaName(RTL_CONSTASCII_USTRINGPARAM("AppletCommands"));
try
{
xSet->setPropertyValue( aParaName, makeAny( aCommandSequence ) );
}
catch ( uno::Exception& )
{
- aParaName = ::rtl::OUString::createFromAscii("PluginCommands");
+ aParaName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands"));
try
{
xSet->setPropertyValue( aParaName, makeAny( aCommandSequence ) );
@@ -1060,3 +1061,4 @@ void SwXMLTextImportHelper::SetChangesProtectionKey(
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmltexti.hxx b/sw/source/filter/xml/xmltexti.hxx
index bdd68b082eb5..2107746cffed 100644
--- a/sw/source/filter/xml/xmltexti.hxx
+++ b/sw/source/filter/xml/xmltexti.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef _XMLTEXTI_HXX
#define _XMLTEXTI_HXX
-#ifndef _XMLOFF_TXTIMP_HXX
#include <xmloff/txtimp.hxx>
-#endif
#include <xmloff/functional.hxx>
class XMLRedlineImportHelper;
@@ -130,3 +129,4 @@ public:
#endif // _XMLTEXTI_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src
index e1a3d314d572..094d38bf372f 100644
--- a/sw/source/ui/app/app.src
+++ b/sw/source/ui/app/app.src
@@ -25,8 +25,6 @@
*
************************************************************************/
-
-
#include <svl/style.hrc>
#include <sfx2/sfx.hrc>
#include <svx/dialogs.hrc>
@@ -55,7 +53,7 @@ String STR_PAGE_COUNT_MACRO
Text [ en-US ] = "Changing the page count" ;
};
- // Image-Liste ----------------------------------------------------------------
+ // Image-list ----------------------------------------------------------------
// Don't use this image list for normal toolbar images. We have now our commandimagelist
// folder in default_images. This list is now only used for special toolboxes that are
// used in floating windows.
@@ -64,7 +62,7 @@ String STR_PAGE_COUNT_MACRO
IdList = { \
FN_FORMULA_CALC ;\
FN_FORMULA_CANCEL ;\
- FN_FORMULA_APPLY ;\
+ FN_FORMULA_APPLY ;\
}; \
IdCount = { \
3; \
@@ -76,6 +74,7 @@ ImageList RID_DEFAULTIMAGELIST_SC
MaskColor = IMAGE_MASK_COLOR ;
IMAGELIST_AND_COUNT
};
+
ImageList RID_DEFAULTIMAGELIST_LC
{
Prefix = "lc";
@@ -83,20 +82,7 @@ ImageList RID_DEFAULTIMAGELIST_LC
IMAGELIST_AND_COUNT
};
-ImageList RID_DEFAULTIMAGELIST_SCH
-{
- Prefix = "sch";
- MaskColor = IMAGE_MASK_COLOR ;
- IMAGELIST_AND_COUNT
-};
-ImageList RID_DEFAULTIMAGELIST_LCH
-{
- Prefix = "lch";
- MaskColor = IMAGE_MASK_COLOR ;
- IMAGELIST_AND_COUNT
-};
-
-// Vorlagen
+// Templates
#define STYLE_IMAGE_LISTEF \
MaskColor = IMAGE_MASK_COLOR ; \
IdList = \
@@ -113,65 +99,65 @@ SfxStyleFamilies DLG_STYLE_DESIGNER
{
Text [ en-US ] = "Paragraph Styles" ;
StyleFamily = SFX_STYLE_FAMILY_PARA ;
- FilterList [ en-US ] =
- {
- < "All Styles" ; SFXSTYLEBIT_ALL ; > ;
- < "Applied Styles" ; SFXSTYLEBIT_USED ; > ;
- < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ;
- < "Automatic" ; SFXSTYLEBIT_AUTO ; > ;
- < "Text Styles" ; SWSTYLEBIT_TEXT ; > ;
- < "Chapter Styles" ; SWSTYLEBIT_CHAPTER ; > ;
- < "List Styles" ; SWSTYLEBIT_LIST ; > ;
- < "Index Styles" ; SWSTYLEBIT_IDX ; > ;
- < "Special Styles" ; SWSTYLEBIT_EXTRA ; > ;
- < "HTML Styles" ; SWSTYLEBIT_HTML ; > ;
- < "Conditional Styles" ; SWSTYLEBIT_CONDCOLL ; > ;
+ FilterList [ en-US ] =
+ {
+ < "All Styles" ; SFXSTYLEBIT_ALL ; > ;
+ < "Applied Styles" ; SFXSTYLEBIT_USED ; > ;
+ < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ;
+ < "Automatic" ; SFXSTYLEBIT_AUTO ; > ;
+ < "Text Styles" ; SWSTYLEBIT_TEXT ; > ;
+ < "Chapter Styles" ; SWSTYLEBIT_CHAPTER ; > ;
+ < "List Styles" ; SWSTYLEBIT_LIST ; > ;
+ < "Index Styles" ; SWSTYLEBIT_IDX ; > ;
+ < "Special Styles" ; SWSTYLEBIT_EXTRA ; > ;
+ < "HTML Styles" ; SWSTYLEBIT_HTML ; > ;
+ < "Conditional Styles" ; SWSTYLEBIT_CONDCOLL ; > ;
+ };
};
- };
SfxStyleFamilyItem
{
Text [ en-US ] = "Character Styles" ;
StyleFamily = SFX_STYLE_FAMILY_CHAR ;
FilterList [ en-US ] =
{
- < "All" ; SFXSTYLEBIT_ALL ; > ;
- < "Applied Styles" ; SFXSTYLEBIT_USED ; > ;
- < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ;
+ < "All" ; SFXSTYLEBIT_ALL ; > ;
+ < "Applied Styles" ; SFXSTYLEBIT_USED ; > ;
+ < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ;
};
- };
+ };
SfxStyleFamilyItem
{
Text [ en-US ] = "Frame Styles" ;
StyleFamily = SFX_STYLE_FAMILY_FRAME ;
FilterList [ en-US ] =
{
- < "All" ; SFXSTYLEBIT_ALL ; > ;
- < "Applied Styles" ; SFXSTYLEBIT_USED ; > ;
- < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ;
+ < "All" ; SFXSTYLEBIT_ALL ; > ;
+ < "Applied Styles" ; SFXSTYLEBIT_USED ; > ;
+ < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ;
};
- };
+ };
SfxStyleFamilyItem
{
Text [ en-US ] = "Page Styles" ;
StyleFamily = SFX_STYLE_FAMILY_PAGE ;
FilterList [ en-US ] =
{
- < "All" ; SFXSTYLEBIT_ALL ; > ;
- < "Applied Styles" ; SFXSTYLEBIT_USED ; > ;
- < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ;
+ < "All" ; SFXSTYLEBIT_ALL ; > ;
+ < "Applied Styles" ; SFXSTYLEBIT_USED ; > ;
+ < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ;
};
- };
+ };
SfxStyleFamilyItem
{
StyleFamily = SFX_STYLE_FAMILY_PSEUDO ;
FilterList [ en-US ] =
{
- < "All" ; SFXSTYLEBIT_ALL ; > ;
- < "Applied Styles" ; SFXSTYLEBIT_USED ; > ;
- < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ;
+ < "All" ; SFXSTYLEBIT_ALL ; > ;
+ < "Applied Styles" ; SFXSTYLEBIT_USED ; > ;
+ < "Custom Styles" ; SFXSTYLEBIT_USERDEF ; > ;
};
Text [ en-US ] = "List Styles" ;
- };
+ };
};
ImageList 1 // == BMP_COLOR_NORMAL + 1
@@ -179,20 +165,12 @@ SfxStyleFamilies DLG_STYLE_DESIGNER
Prefix = "sf";
STYLE_IMAGE_LISTEF
};
- ImageList 2 // == BMP_COLOR_HIGHCONTRAST + 1
- {
- Prefix = "sfh";
- STYLE_IMAGE_LISTEF
- };
};
- // Default Bitmap fuer Toolbox
-BITMAP BMP_FEHLT { FILE = "x.bmp" ; };
- // Bitmap fuer die NumerierungsVorlagen im Organizer
+// Bitmap for the NumberingTemplates in the Organizer
Bitmap BMP_STYLES_FAMILY_NUM { File = "styfamnu.bmp" ; };
-Bitmap BMP_STYLES_FAMILY_NUM_HC { File = "styfamnu_h.bmp" ; };
String STR_ENV_TITLE
{
@@ -225,18 +203,17 @@ String STR_CANTCREATE
{
Text [ en-US ] = "Can't create document.";
};
+
String STR_DLLNOTFOUND
{
Text [ en-US ] = "Filter not found." ;
};
-
String STR_UNBENANNT
{
Text [ en-US ] = "Untitled" ;
};
-
String STR_LOAD_GLOBAL_DOC
{
Text [ en-US ] = "Name and Path of Master Document" ;
@@ -253,6 +230,7 @@ InfoBox MSG_ERROR_SEND_MAIL
DEFBUTTON = WB_DEF_OK ;
Message [ en-US ] = "Error sending mail." ;
};
+
InfoBox MSG_ERROR_PASSWD
{
BUTTONS = WB_OK ;
@@ -261,8 +239,8 @@ InfoBox MSG_ERROR_PASSWD
};
/*
- * auskommentiert, da die Toolbox z. Zt. nicht aus der Resource
- * geladen werden kann
+ * commented out, because the Toolbox can't be loaded from the resource
+ * at this time.
Window WIN_TOOLBOX {
"Bearbeitung von Text, Rahmen, Grafik, Tabellen oder "
"Numerierungen.";
@@ -286,7 +264,7 @@ String STR_DOC_STAT
};
// ----------------------------
- // Statusleisten-Ueberschriften
+ // Statusbar-titles
// ----------------------------
String STR_STATSTR_W4WREAD
@@ -397,16 +375,6 @@ Bitmap RID_GRAPHIC_ERRORBMP
File = "grafikde.bmp" ;
};
-Bitmap RID_GRAPHIC_REPLACEBMP_HC
-{
- File = "grafikei_h.bmp" ;
-};
-
-Bitmap RID_GRAPHIC_ERRORBMP_HC
-{
- File = "grafikde_h.bmp" ;
-};
-
String STR_TABLE_DEFNAME
{
Text [ en-US ] = "Table" ;
@@ -426,14 +394,17 @@ String STR_FRAME_DEFNAME
{
Text [ en-US ] = "Frame" ;
};
+
String STR_REGION_DEFNAME
{
Text [ en-US ] = "Section" ;
};
+
String STR_NUMRULE_DEFNAME
{
Text [ en-US ] = "Numbering" ;
};
+
String STR_EMPTYPAGE
{
Text [ en-US ] = "blank page" ;
@@ -458,6 +429,7 @@ QueryBox MSG_SAVEAS_HTML_QUERY
DEFBUTTON = WB_DEF_NO ;
Message [ en-US ] = "The source code can only be displayed if the document is saved in HTML format.\nWould you like to save the document as HTML?";
};
+
String STR_ABSTRACT_TITLE
{
Text [ en-US ] = "Abstract: " ;
@@ -470,10 +442,9 @@ String STR_FDLG_TEMPLATE_BUTTON
String STR_FDLG_TEMPLATE_NAME
{
- //Text [ en-US ] = "Styles: " ; //#outline level,removed by zhaojianwei
- Text [ en-US ] = "separated by: " ; //<-end,add by zhaojianwei
+ Text [ en-US ] = "separated by: " ;
};
-//#outline level,add by zhaojianwei
+
String STR_FDLG_OUTLINE_LEVEL
{
Text [ en-US ] = "Outline: Level ";
@@ -483,25 +454,27 @@ String STR_FDLG_STYLE
{
Text [ en-US ] = "Style: ";
};
-//<-end
-
String STR_PAGEOFFSET
{
Text [ en-US ] = "Page number: " ;
};
+
String STR_PAGEBREAK
{
Text [ en-US ] = "Break before new page" ;
};
+
String STR_WESTERN_FONT
{
Text [ en-US ] = "Western text: ";
};
+
String STR_CJK_FONT
{
Text [ en-US ] = "Asian text: ";
};
+
String STR_REDLINE_UNKNOWN_AUTHOR
{
Text [ en-US ] = "Unknown Author";
@@ -513,14 +486,7 @@ WarningBox MSG_DISABLE_UNDO_QUESTION
DEFBUTTON = WB_DEF_YES ;
Message [ en-US ] = "This action deletes the list of actions that can be undone. Previous changes made to the document are still valid, but cannot be undone. Do you want to continue formatting?";
};
-/*QueryBox MSG_INS_MERGE_FIELDS
-{
- HelpId = HID_MAIL_MERGE_INSERT_FIELDS;
- Buttons = WB_OK_CANCEL ;
- DefButton = WB_DEF_YES ;
- Message [ en-US ] = "Do you want to use names and addresses from a database?";
-};
-*/
+
QueryBox MSG_PRINT_AS_MERGE
{
HelpId = HID_PRINT_AS_MERGE;
@@ -528,6 +494,7 @@ QueryBox MSG_PRINT_AS_MERGE
DefButton = WB_DEF_YES ;
Message [ en-US ] = "Your document contains address database fields. Do you want to print a form letter?";
};
+
ModalDialog DLG_MERGE_SOURCE_UNAVAILABLE
{
HelpId = HID_MERGE_SOURCE_UNAVAILABLE;
@@ -560,6 +527,7 @@ ModalDialog DLG_MERGE_SOURCE_UNAVAILABLE
Size = MAP_APPFONT ( 50 , 14 ) ;
};
};
+
WarningBox MSG_DATA_SOURCES_UNAVAILABLE
{
HelpId = HID_DATA_SOURCES_UNAVAILABLE;
@@ -571,15 +539,17 @@ String RID_MODULE_TOOLBOX
{
Text [ en-US ] = "Function Bar (viewing mode)" ;
};
+
String STR_DONT_ASK_AGAIN
{
Text [ en-US ] = "~Do not show warning again" ;
};
-// --> OD 2008-04-14 #outlinelevel#
+
String STR_OUTLINE_NUMBERING
{
Text [ en-US ] = "Outline Numbering";
};
+
ToolBox RID_MODULE_TOOLBOX
{
HelpID = HID_MODULE_TOOLBOX ;
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index 0a2cf67d62ae..c08bfb5bf6df 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,11 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-#if STLPORT_VERSION>=321
#include <cstdarg>
-#endif
-
#include <hintids.hxx>
@@ -75,15 +72,9 @@
#include <crsskip.hxx>
#include <cmdid.h>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _APP_HRC
#include <app.hrc>
-#endif
-#ifndef _POOLFMT_HRC
#include <poolfmt.hrc>
-#endif
#include "swabstdlg.hxx"
#include "envelp.hrc"
#include "envimg.hxx"
@@ -93,11 +84,7 @@
#define ENV_CANCEL SHRT_MAX
-// --------------------------------------------------------------------------
-
-
-// Funktion wird fuer Etiketten und Briefumschlaege benutzt!
-// im applab.cxx und appenv.cxx
+// Function used for labels and envelopes in applab.cxx and appenv.cxx
String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText )
{
String sRet;
@@ -119,7 +106,6 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
{
sTmpText = aLine.Copy( 0, nPos );
aLine.Erase( 0, nPos );
-// sTmpText = aLine.Cut( 0, nPos );
}
else
{
@@ -128,15 +114,13 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
{
sTmpText = aLine;
aLine.Erase();
-// sTmpText = aLine.Cut();
}
else
{
sTmpText = aLine.Copy( 0, nPos + 1);
aLine.Erase( 0, nPos + 1);
-// sTmpText = aLine.Cut( 0, nPos + 1 );
- // Datenbankfelder muesen mind. 3 Punkte beinhalten!
+ // Database fields must contain at least 3 points!
String sDBName( sTmpText.Copy( 1, sTmpText.Len() - 2));
sal_uInt16 nCnt = sDBName.GetTokenCount('.');
if (nCnt >= 3)
@@ -154,14 +138,11 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
}
rSh.InsertLineBreak();
}
- rSh.DelLeft(); // Letzten Linebreak wieder l???schen
+ rSh.DelLeft(); // Again remove last linebreak
return sRet;
}
-// ----------------------------------------------------------------------------
-
-
void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, sal_uInt16 nCollId)
{
sal_uInt16 nCollCnt = pOldSh->GetTxtFmtCollCount();
@@ -171,12 +152,9 @@ void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, sal_uInt16 nCollId
pNewSh->GetTxtCollFromPool(nCollId)->SetFmtAttr(pColl->GetAttrSet());
}
-// ----------------------------------------------------------------------------
-
-
void SwModule::InsertEnv( SfxRequest& rReq )
{
-static sal_uInt16 nTitleNo = 0;
+ static sal_uInt16 nTitleNo = 0;
SwDocShell *pMyDocSh;
SfxViewFrame *pFrame;
@@ -184,34 +162,34 @@ static sal_uInt16 nTitleNo = 0;
SwWrtShell *pOldSh,
*pSh;
- //aktuelle Shell besorgen
+ // Get current shell
pMyDocSh = (SwDocShell*) SfxObjectShell::Current();
pOldSh = pMyDocSh ? pMyDocSh->GetWrtShell() : 0;
- // Neues Dokument erzeugen (kein Show!)
+ // Create new document (don't show!)
SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
xDocSh->DoInitNew( 0 );
pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
pNewView = (SwView*) pFrame->GetViewShell();
- pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird.
+ pNewView->AttrChangedNotify( &pNewView->GetWrtShell() ); // so that SelectShell is being called
pSh = pNewView->GetWrtShellPtr();
String aTmp( SW_RES(STR_ENV_TITLE) );
aTmp += String::CreateFromInt32( ++nTitleNo );
xDocSh->SetTitle( aTmp );
- // Ggf. alte Collections "Absender" und "Empfaenger" in neues
- // Dokument kopieren
+ // if applicable, copy the old Collections "Sender" and "Reciever" to
+ // a new document
if ( pOldSh )
{
::lcl_CopyCollAttr(pOldSh, pSh, RES_POOLCOLL_JAKETADRESS);
::lcl_CopyCollAttr(pOldSh, pSh, RES_POOLCOLL_SENDADRESS);
}
- // SwEnvItem aus Config lesen
+ // Read SwEnvItem from config
SwEnvCfgItem aEnvCfg;
- //Haben wir schon einen Briefumschlag.
+ // Check if there's already an envelope.
sal_Bool bEnvChange = sal_False;
SfxItemSet aSet(GetPool(), FN_ENVELOP, FN_ENVELOP, 0);
@@ -245,10 +223,10 @@ static sal_uInt16 nTitleNo = 0;
if ( !pItem )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pDlg = pFact->CreateSwEnvDlg( pParent, aSet, pOldSh, pTempPrinter, !bEnvChange, DLG_ENV );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
nMode = pDlg->Execute();
}
else
@@ -262,18 +240,18 @@ static sal_uInt16 nTitleNo = 0;
{
SwWait aWait( (SwDocShell&)*xDocSh, sal_True );
- // Dialog auslesen, Item in Config speichern
+ // Read dialog and save item to config
const SwEnvItem& rItem = pItem ? *pItem : (const SwEnvItem&) pDlg->GetOutputItemSet()->Get(FN_ENVELOP);
aEnvCfg.GetItem() = rItem;
aEnvCfg.Commit();
- //Wenn wir Drucken uebernehmen wir den eingestellten Jobsetup aus
- //dem Dialog. Die Informationen muessen hier vor dem evtl. zerstoeren
- //der neuen Shell gesetzt werden, weil deren Drucker an den Dialog
- //gereicht wurde.
+ // When we print we take the Jobsetup that is set up in the dialog.
+ // Information has to be set here, before a possible destruction of
+ // the new shell because the shell's printer has been handed to the
+ // dialog.
if ( nMode != ENV_NEWDOC )
{
- ASSERT(pOldSh, "Kein Dokument - war 'Einfuegen' nicht disabled???");
+ OSL_ENSURE(pOldSh, "No document - wasn't 'Insert' disabled???");
SvxPaperBinItem aItem( RES_PAPER_BIN );
aItem.SetValue((sal_uInt8)pSh->getIDocumentDeviceAccess()->getPrinter(true)->GetPaperBin());
pOldSh->GetPageDescFromPool(RES_POOLPAGE_JAKET)->GetMaster().SetFmtAttr(aItem);
@@ -289,29 +267,29 @@ static sal_uInt16 nTitleNo = 0;
if (nMode == ENV_INSERT)
{
- SetView(&pOldSh->GetView()); // Pointer auf oberste View restaurieren
+ SetView(&pOldSh->GetView()); // Set pointer to top view
- //Neues Dok wieder loeschen
+ // Delete new document
xDocSh->DoClose();
pSh = pOldSh;
//#i4251# selected text or objects in the document should
//not be deleted on inserting envelopes
pSh->EnterStdMode();
- // Los geht's (Einfuegen)
+ // Here it goes (insert)
pSh->StartUndo(UNDO_UI_INSERT_ENVELOPE, NULL);
pSh->StartAllAction();
pSh->SttEndDoc(sal_True);
if (bEnvChange)
{
- // Folgevorlage: Seite 2
+ // followup template: page 2
pFollow = pSh->GetPageDesc(pSh->GetCurPageDesc()).GetFollow();
- // Text der ersten Seite loeschen
+ // Delete text from the first page
if ( !pSh->SttNxtPg(sal_True) )
pSh->EndPg(sal_True);
pSh->DelRight();
- // Rahmen der ersten Seite loeschen
+ // Delete frame of the first page
if( pSh->GotoFly( rSendMark ) )
{
pSh->EnterSelFrmMode();
@@ -325,10 +303,10 @@ static sal_uInt16 nTitleNo = 0;
pSh->SttEndDoc(sal_True);
}
else
- // Folgevorlage: Seite 1
+ // Followup template: page 1
pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc());
- // Seitenumbruch einfuegen
+ // Insert page break
if ( pSh->IsCrsrInTbl() )
{
pSh->SplitNode();
@@ -344,12 +322,12 @@ static sal_uInt16 nTitleNo = 0;
else
{
pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc());
- // Los geht's (Drucken)
+ // Let's go (print)
pSh->StartAllAction();
pSh->DoUndo(sal_False);
- // Neue Collections "Absender" und "Empfaenger" wieder in neues
- // Dokument kopieren
+ // Again, copy the new collections "Sender" and "Reciever" to
+ // a new document
if ( pOldSh )
{
::lcl_CopyCollAttr(pOldSh, pSh, RES_POOLCOLL_JAKETADRESS);
@@ -358,21 +336,20 @@ static sal_uInt16 nTitleNo = 0;
}
SET_CURR_SHELL(pSh);
- pSh->SetNewDoc(); // Performanceprobleme vermeiden
+ pSh->SetNewDoc(); // Avoid performance problems
- // Flys dieser Seite merken
+ // Remember Flys of this site
SvPtrarr aFlyArr(0, 5);
if( ENV_NEWDOC != nMode && !bEnvChange )
pSh->GetPageObjs( aFlyArr );
- // Page-Desc ermitteln
+ // Get page description
SwPageDesc* pDesc = pSh->GetPageDescFromPool(RES_POOLPAGE_JAKET);
SwFrmFmt& rFmt = pDesc->GetMaster();
Printer *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( true );
- // Raender (setzen sich zusammen aus Shift-Offset und
- // Ausrichtung)
+ // Borders (are put together by Shift-Offset and alignment)
Size aPaperSize = pPrt->PixelToLogic( pPrt->GetPaperSizePixel(),
MAP_TWIP);
if ( !aPaperSize.Width() && !aPaperSize.Height() )
@@ -408,25 +385,25 @@ static sal_uInt16 nTitleNo = 0;
rFmt.SetFmtAttr(aLRMargin);
rFmt.SetFmtAttr(aULMargin);
- // Kopf-, Fusszeilen
+ // Header and footer
rFmt.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False)));
pDesc->ChgHeaderShare(sal_False);
rFmt.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False)));
pDesc->ChgFooterShare(sal_False);
- // Seitennumerierung
+ // Page numbering
pDesc->SetUseOn(nsUseOnPage::PD_ALL);
- // Einstellen der Seitengroesse
+ // Page size
rFmt.SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE,
nPageW + lLeft, nPageH + lUpper));
- // Einstellen der Numerierungsart der Seite
+ // Set type of page numbering
SvxNumberType aType;
aType.SetNumberingType(SVX_NUM_NUMBER_NONE);
pDesc->SetNumType(aType);
- // Folgevorlage
+ // Followup template
if (pFollow)
pDesc->SetFollow(pFollow);
@@ -434,7 +411,7 @@ static sal_uInt16 nTitleNo = 0;
pDesc->SetLandscape( rItem.eAlign >= ENV_VER_LEFT &&
rItem.eAlign <= ENV_VER_RGHT);
- // Page-Desc anwenden
+ // Apply page description
sal_uInt16 nPos;
pSh->FindPageDescByName( pDesc->GetName(),
@@ -445,17 +422,17 @@ static sal_uInt16 nTitleNo = 0;
pSh->ChgPageDesc( nPos, *pDesc);
pSh->ChgCurPageDesc(*pDesc);
- // Rahmen einfuegen
+ // Insert Frame
SwFlyFrmAttrMgr aMgr(sal_False, pSh, FRMMGR_TYPE_ENVELP);
SwFldMgr aFldMgr;
aMgr.SetHeightSizeType(ATT_VAR_SIZE);
- //Defaults ueberschreiben!
+ // Overwrite defaults!
aMgr.GetAttrSet().Put( SvxBoxItem(RES_BOX) );
aMgr.SetULSpace( 0L, 0L );
aMgr.SetLRSpace( 0L, 0L );
- // Absender
+ // Sender
if (rItem.bSend)
{
pSh->SttEndDoc(sal_True);
@@ -472,7 +449,7 @@ static sal_uInt16 nTitleNo = 0;
aMgr.UpdateAttrMgr();
}
- // Empfaenger
+ // Addressee
pSh->SttEndDoc(sal_True);
aMgr.InsertFlyFrm(FLY_AT_PAGE,
@@ -485,11 +462,11 @@ static sal_uInt16 nTitleNo = 0;
pSh->SetTxtFmtColl( pAddr );
InsertLabEnvText(*pSh, aFldMgr, rItem.aAddrText);
- // Flys auf die "alten" Seiten verschieben
+ // Move Flys to the "old" pages
if (aFlyArr.Count())
pSh->SetPageObjsNewPage(aFlyArr, 1);
- // Fertig
+ // Finished
pSh->SttEndDoc(sal_True);
pSh->EndAllAction();
@@ -505,7 +482,7 @@ static sal_uInt16 nTitleNo = 0;
if ( rItem.aAddrText.indexOf('<') >= 0 )
{
- static sal_uInt16 __READONLY_DATA aInva[] =
+ static sal_uInt16 const aInva[] =
{
SID_SBA_BRW_UPDATE,
SID_SBA_BRW_INSERT,
@@ -514,7 +491,7 @@ static sal_uInt16 nTitleNo = 0;
};
pFrame->GetBindings().Invalidate( aInva );
- // Datenbankbeamer oeffnen
+ // Open database beamer
ShowDBObj(*pNewView, pSh->GetDBData());
}
}
@@ -528,14 +505,14 @@ static sal_uInt16 nTitleNo = 0;
rReq.Done();
}
- else //Abbruch
+ else // Abort
{
rReq.Ignore();
xDocSh->DoClose();
--nTitleNo;
- // Pointer auf oberste View restaurieren
+ // Set pointer to top view
if (pOldSh)
SetView(&pOldSh->GetView());
}
@@ -543,3 +520,4 @@ static sal_uInt16 nTitleNo = 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index 012f08ff9684..013c2e909e01 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
#include <hintids.hxx>
#include <tools/urlobj.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <tools/link.hxx>
#define _SVSTDARR_STRINGSDTOR
@@ -49,7 +50,6 @@
#include <svl/eitem.hxx>
#include <svl/whiter.hxx>
#include <svl/isethint.hxx>
-#include <svx/hyprlink.hxx>
#include <sfx2/request.hxx>
#include <sfx2/fcontnr.hxx>
#include <svl/stritem.hxx>
@@ -72,7 +72,7 @@
#include <srcview.hxx>
#include <wrtsh.hxx>
#include <docsh.hxx>
-#include <cmdid.h> // Funktion-Ids
+#include <cmdid.h> // Function-Ids
#include <initui.hxx>
#include <uitool.hxx>
#include <swmodule.hxx>
@@ -86,7 +86,7 @@
#include <cfgitems.hxx>
#include <prtopt.hxx>
#include <modcfg.hxx>
-#include <globals.h> // globale Konstanten z.B.
+#include <globals.h> // e.g. global Constants
#include <app.hrc>
#include <fontcfg.hxx>
#include <barcfg.hxx>
@@ -119,12 +119,12 @@
using namespace ::com::sun::star;
/*--------------------------------------------------------------------
- Beschreibung: Slotmaps fuer Methoden der Applikation
+ Description: Slotmaps for the application's methods
--------------------------------------------------------------------*/
-// hier werden die SlotID's included
-// siehe Idl-File
+// here are the SlotID's being included
+// see Idl-file
//
#define SwModule
#define ViewSettings
@@ -140,7 +140,6 @@ using namespace ::com::sun::star;
SFX_IMPL_INTERFACE( SwModule, SfxModule, SW_RES(RID_SW_NAME) )
{
- SFX_CHILDWINDOW_REGISTRATION(SvxHyperlinkDlgWrapper::GetChildWindowId());
SFX_STATUSBAR_REGISTRATION(SW_RES(CFG_STATUSBAR));
SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_APPLICATION |
SFX_VISIBILITY_DESKTOP | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_CLIENT | SFX_VISIBILITY_VIEWER,
@@ -149,7 +148,7 @@ SFX_IMPL_INTERFACE( SwModule, SfxModule, SW_RES(RID_SW_NAME) )
/*--------------------------------------------------------------------
- Beschreibung: Andere States
+ Description: other states
--------------------------------------------------------------------*/
@@ -206,15 +205,12 @@ void SwModule::StateOther(SfxItemSet &rSet)
IsInsTblFormatNum( bWebView )));
break;
default:
- DBG_ERROR("::StateOther: default");
+ OSL_ENSURE(false, "::StateOther: default");
}
nWhich = aIter.NextWhich();
}
}
-/*-- 06.04.2004 15:21:43---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwView* lcl_LoadDoc(SwView* pView, const String& rURL)
{
SwView* pNewView = 0;
@@ -260,7 +256,7 @@ SwView* lcl_LoadDoc(SwView* pView, const String& rURL)
return pNewView;
}
/*--------------------------------------------------------------------
- Beschreibung: Felddialog starten
+ Description: start field dialog
--------------------------------------------------------------------*/
void NewXForms( SfxRequest& rReq ); // implementation: below
@@ -301,20 +297,20 @@ SwMailMergeWizardExecutor::SwMailMergeWizardExecutor()
SwMailMergeWizardExecutor::~SwMailMergeWizardExecutor()
{
- DBG_ASSERT( m_pWizard == 0, "SwMailMergeWizardExecutor: m_pWizard must be Null!" );
- DBG_ASSERT( m_pMMConfig == 0, "SwMailMergeWizardExecutor: m_pMMConfig must be Null!" );
+ OSL_ENSURE( m_pWizard == 0, "SwMailMergeWizardExecutor: m_pWizard must be Null!" );
+ OSL_ENSURE( m_pMMConfig == 0, "SwMailMergeWizardExecutor: m_pMMConfig must be Null!" );
}
void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs )
{
if ( m_pView )
{
- DBG_ERROR( "SwMailMergeWizardExecutor::ExecuteMailMergeWizard: Already executing the wizard!" );
+ OSL_ENSURE(false, "SwMailMergeWizardExecutor::ExecuteMailMergeWizard: Already executing the wizard!" );
return;
}
m_pView = ::GetActiveView(); // not owner!
- DBG_ASSERT(m_pView, "no current view?");
+ OSL_ENSURE(m_pView, "no current view?");
if(m_pView)
{
// keep self alive until done.
@@ -335,7 +331,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
m_pView->SetMailMergeConfigItem(0, 0, sal_True);
SfxViewFrame* pViewFrame = m_pView->GetViewFrame();
pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, sal_False);
- DBG_ASSERT(m_pMMConfig, "no MailMergeConfigItem available");
+ OSL_ENSURE(m_pMMConfig, "no MailMergeConfigItem available");
bRestoreWizard = true;
}
// to make it bullet proof ;-)
@@ -431,7 +427,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
#endif
{
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT( pDialog == m_pWizard, "wrong dialog passed to EndDialogHdl!" );
+ OSL_ENSURE( pDialog == m_pWizard, "wrong dialog passed to EndDialogHdl!" );
(void) pDialog;
#endif
@@ -473,7 +469,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
uno::Reference< frame::XFrame > xFrame =
m_pView->GetViewFrame()->GetFrame().GetFrameInterface();
xFrame->getContainerWindow()->setVisible(sal_False);
- DBG_ASSERT(pTargetView, "No target view has been created");
+ OSL_ENSURE(pTargetView, "No target view has been created");
if(pTargetView)
{
// destroy wizard asynchronously
@@ -489,7 +485,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
}
else
{
- //should not happen - just in case no target view has been created
+ // should not happen - just in case no target view has been created
ExecutionFinished( true );
}
break;
@@ -512,7 +508,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
{
SwView* pTargetView = m_pMMConfig->GetTargetView();
SwView* pSourceView = m_pMMConfig->GetSourceView();
- DBG_ASSERT(pTargetView && pSourceView, "source or target view not available" );
+ OSL_ENSURE(pTargetView && pSourceView, "source or target view not available" );
if(pTargetView && pSourceView)
{
m_pView2Close = pTargetView;
@@ -535,7 +531,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
}
else
{
- //should not happen - just in case no target view has been created
+ // should not happen - just in case no target view has been created
ExecutionFinished( true );
}
break;
@@ -547,7 +543,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
LINK( this, SwMailMergeWizardExecutor, CancelHdl ), m_pWizard );
break;
}
- default: //finish
+ default: // finish
{
SwView* pSourceView = m_pMMConfig->GetSourceView();
if(pSourceView)
@@ -682,11 +678,11 @@ void SwModule::ExecOther(SfxRequest& rReq)
}
/*--------------------------------------------------------------------
- Beschreibung: Notifies abfangen
+ Description: Catch notifications
--------------------------------------------------------------------*/
- // Hint abfangen fuer DocInfo
+// Catch hint for DocInfo
void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
if( rHint.ISA( SfxEventHint ) )
@@ -698,16 +694,8 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
SwWrtShell* pWrtSh = pDocSh ? pDocSh->GetWrtShell() : 0;
switch( rEvHint.GetEventId() )
{
-/* MA 07. Mar. 96: UpdateInputFlds() nur noch bei Dokument neu.
- (Und bei Einfuegen Textbaust.)
- case SFX_EVENT_OPENDOC:
- // dann am aktuellen Dokument die Input-Fedler updaten
- if( pWrtSh )
- pWrtSh->UpdateInputFlds();
- break;
-*/
case SFX_EVENT_CREATEDOC:
- // alle FIX-Date/Time Felder auf akt. setzen
+ // Update all FIX-Date/Time fields
if( pWrtSh )
{
SFX_ITEMSET_ARG( pDocSh->GetMedium()->GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
@@ -719,14 +707,14 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
pWrtSh->UpdateInputFlds();
- // Sind Datenbankfelder enthalten?
- // Erstmal alle verwendeten Datenbanken holen
+ // Are database fields contained?
+ // Get all used databases for the first time
SwDoc *pDoc = pDocSh->GetDoc();
SvStringsDtor aDBNameList;
pDoc->GetAllUsedDB( aDBNameList );
sal_uInt16 nCount = aDBNameList.Count();
if (nCount)
- { // Datenbankbeamer oeffnen
+ { // Open database beamer
ShowDBObj(pWrtSh->GetView(), pDoc->GetDBData());
}
}
@@ -802,6 +790,7 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal
sal_Int32 const nNew = GetUndoOptions().GetUndoCount();
bool const bUndo = (nNew != 0);
// switch Undo for all DocShells
+ // Iterate through DocShells and switch undos
TypeId aType(TYPE(SwDocShell));
SwDocShell * pDocShell =
static_cast<SwDocShell *>(SfxObjectShell::GetFirst(&aType));
@@ -865,18 +854,13 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal
}
-/* -----------------------------20.02.01 12:43--------------------------------
-
- ---------------------------------------------------------------------------*/
SwDBConfig* SwModule::GetDBConfig()
{
if(!pDBConfig)
pDBConfig = new SwDBConfig;
return pDBConfig;
}
-/* -----------------------------11.04.2002 15:27------------------------------
- ---------------------------------------------------------------------------*/
svtools::ColorConfig& SwModule::GetColorConfig()
{
if(!pColorConfig)
@@ -887,9 +871,7 @@ svtools::ColorConfig& SwModule::GetColorConfig()
}
return *pColorConfig;
}
-/* -----------------------------06.05.2002 09:42------------------------------
- ---------------------------------------------------------------------------*/
SvtAccessibilityOptions& SwModule::GetAccessibilityOptions()
{
if(!pAccessibilityOptions)
@@ -899,9 +881,7 @@ SvtAccessibilityOptions& SwModule::GetAccessibilityOptions()
}
return *pAccessibilityOptions;
}
-/* -----------------06.05.2003 14:52-----------------
- --------------------------------------------------*/
SvtCTLOptions& SwModule::GetCTLOptions()
{
if(!pCTLOptions)
@@ -911,9 +891,7 @@ SvtCTLOptions& SwModule::GetCTLOptions()
}
return *pCTLOptions;
}
-/* -----------------07.07.2003 09:31-----------------
- --------------------------------------------------*/
SvtUserOptions& SwModule::GetUserOptions()
{
if(!pUserOptions)
@@ -923,9 +901,7 @@ SvtUserOptions& SwModule::GetUserOptions()
}
return *pUserOptions;
}
-/* -----------------18.07.2003 13:31-----------------
- --------------------------------------------------*/
SvtUndoOptions& SwModule::GetUndoOptions()
{
if(!pUndoOptions)
@@ -935,16 +911,14 @@ SvtUndoOptions& SwModule::GetUndoOptions()
}
return *pUndoOptions;
}
-/*-----------------30.01.97 08.30-------------------
---------------------------------------------------*/
const SwMasterUsrPref *SwModule::GetUsrPref(sal_Bool bWeb) const
{
SwModule* pNonConstModule = (SwModule*)this;
if(bWeb && !pWebUsrPref)
{
- // im Load der SwMasterUsrPref wird der SpellChecker gebraucht, dort darf
- // er aber nicht angelegt werden #58256#
+ // The SpellChecker is needed in SwMasterUsrPref's Load, but it must not
+ // be created there #58256#
pNonConstModule->pWebUsrPref = new SwMasterUsrPref(sal_True);
}
else if(!bWeb && !pUsrPref)
@@ -973,3 +947,5 @@ void NewXForms( SfxRequest& rReq )
// set return value
rReq.SetReturnValue( SfxVoidItem( rReq.GetSlot() ) );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index 1bbdfc71eeb4..69623ddf05d2 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,11 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-#if STLPORT_VERSION>=321
#include <cstdarg>
-#endif
-
#include <hintids.hxx>
@@ -78,12 +75,8 @@
#include <pagedesc.hxx>
#include <poolfmt.hxx>
-#ifndef _APP_HRC
#include <app.hrc>
-#endif
-#ifndef _POOLFMT_HRC
#include <poolfmt.hrc>
-#endif
#include "swabstdlg.hxx"
#include "envelp.hrc"
#include <misc.hrc>
@@ -93,12 +86,10 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
-// steht im appenv.cxx
+// is in appenv.cxx
extern String InsertLabEnvText( SwWrtShell& , SwFldMgr& , const String& );
-const char __FAR_DATA MASTER_LABEL[] = "MasterLabel";
-
-// --------------------------------------------------------------------------
+const char MASTER_LABEL[] = "MasterLabel";
const SwFrmFmt *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem,
SwFrmFmt &rFmt,
@@ -117,18 +108,17 @@ const SwFrmFmt *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem,
aSet.Put(SwFmtVertOrient(rItem.lUpper + nRow * rItem.lVDist,
text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ));
}
- const SwFrmFmt *pFmt = rSh.NewFlyFrm(aSet, sal_True, &rFmt ); // Fly einfuegen
- ASSERT( pFmt, "Fly not inserted" );
+ const SwFrmFmt *pFmt = rSh.NewFlyFrm(aSet, sal_True, &rFmt ); // Insert Fly
+ OSL_ENSURE( pFmt, "Fly not inserted" );
- rSh.UnSelectFrm(); //Rahmen wurde automatisch selektiert
+ rSh.UnSelectFrm(); //Frame was selected automatically
rSh.SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_STANDARD ) );
- //
if(!rItem.bSynchron || !(nCol|nRow))
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( rItem.sGlossaryGroup );
@@ -157,14 +147,14 @@ const SwFrmFmt *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rItem,
aSet.Put(SwFmtVertOrient(rItem.lUpper + nRow * rItem.lVDist,
text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ));
}
- const SwFrmFmt *pFmt = rSh.NewFlyFrm(aSet, sal_True, &rFmt ); // Fly einfuegen
- ASSERT( pFmt, "Fly not inserted" );
+ const SwFrmFmt *pFmt = rSh.NewFlyFrm(aSet, sal_True, &rFmt ); // Insert Fly
+ OSL_ENSURE( pFmt, "Fly not inserted" );
- rSh.UnSelectFrm(); //Rahmen wurde automatisch selektiert
+ rSh.UnSelectFrm(); //Frame was selected automatically
rSh.SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_STANDARD ) );
- // Ggf. "Naechster Datensatz"
+ // If applicable "next dataset"
String sDBName;
if( (!rItem.bSynchron || !(nCol|nRow)) && (sDBName = InsertLabEnvText( rSh, rFldMgr, rItem.aWriting )).Len() && !bLast )
{
@@ -176,43 +166,41 @@ const SwFrmFmt *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rItem,
return pFmt;
}
-// ----------------------------------------------------------------------------
-
void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
{
-static sal_uInt16 nLabelTitleNo = 0;
-static sal_uInt16 nBCTitleNo = 0;
+ static sal_uInt16 nLabelTitleNo = 0;
+ static sal_uInt16 nBCTitleNo = 0;
- // DB-Manager anlegen
+ // Create DB-Manager
SwNewDBMgr* pNewDBMgr = new SwNewDBMgr;
- // SwLabItem aus Config lesen
+ // Read SwLabItem from Config
SwLabCfgItem aLabCfg(bLabel);
- // Dialog hochfahren
+ // Move up Dialog
SfxItemSet aSet( GetPool(), FN_LABEL, FN_LABEL, 0 );
aSet.Put( aLabCfg.GetItem() );
SwAbstractDialogFactory* pDialogFactory = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pDialogFactory, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pDialogFactory, "SwAbstractDialogFactory fail!");
- AbstarctSwLabDlg* pDlg = pDialogFactory->CreateSwLabDlg( 0, aSet, pNewDBMgr, bLabel, DLG_LAB );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ AbstractSwLabDlg* pDlg = pDialogFactory->CreateSwLabDlg( 0, aSet, pNewDBMgr, bLabel, DLG_LAB );
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( RET_OK == pDlg->Execute() )
{
- // Dialog auslesen, Item in Config speichern
+ // Read dialog, store item in config
const SwLabItem& rItem = (const SwLabItem&) pDlg->
GetOutputItemSet()->Get(FN_LABEL);
aLabCfg.GetItem() = rItem;
aLabCfg.Commit();
- // Neues Dokument erzeugen.
+ // Create new document
SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD));
xDocSh->DoInitNew( 0 );
- // Drucker
+ // Printer
Printer *pPrt = pDlg->GetPrt();
if (pPrt)
{
@@ -223,9 +211,9 @@ static sal_uInt16 nBCTitleNo = 0;
SfxViewFrame* pViewFrame = SfxViewFrame::DisplayNewDocument( *xDocSh, rReq );
SwView *pNewView = (SwView*) pViewFrame->GetViewShell();
- pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird.
+ pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );// So that SelectShell is being called.
- // Dokumenttitel setzen
+ // Set document title
String aTmp;
if(bLabel)
{
@@ -241,9 +229,9 @@ static sal_uInt16 nBCTitleNo = 0;
pViewFrame->GetFrame().Appear();
- // Shell ermitteln
+ // Determine Shell
SwWrtShell *pSh = pNewView->GetWrtShellPtr();
- ASSERT( pSh, "missing WrtShell" );
+ OSL_ENSURE( pSh, "missing WrtShell" );
{ // block for locks the dispatcher!!
@@ -254,12 +242,12 @@ static sal_uInt16 nBCTitleNo = 0;
pSh->DoUndo( sal_False );
pSh->StartAllAction();
- pSh->SetNewDoc(); // Performanceprobleme vermeiden
+ pSh->SetNewDoc(); // Avoid performance problems
SwPageDesc aDesc = pSh->GetPageDesc( 0 );
SwFrmFmt& rFmt = aDesc.GetMaster();
- // Raender
+ // Borders
SvxLRSpaceItem aLRMargin( RES_LR_SPACE );
SvxULSpaceItem aULMargin( RES_UL_SPACE );
aLRMargin.SetLeft ((sal_uInt16) rItem.lLeft );
@@ -269,26 +257,26 @@ static sal_uInt16 nBCTitleNo = 0;
rFmt.SetFmtAttr(aLRMargin);
rFmt.SetFmtAttr(aULMargin);
- // Kopf- und Fusszeilen
+ // Header and footer
rFmt.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False)));
aDesc.ChgHeaderShare(sal_False);
rFmt.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False)));
aDesc.ChgFooterShare(sal_False);
- aDesc.SetUseOn(nsUseOnPage::PD_ALL); // Seitennumerierung
+ aDesc.SetUseOn(nsUseOnPage::PD_ALL); // Site numbering
- // Einstellen der Seitengroesse
+ // Set page size
rFmt.SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE,
rItem.lLeft + rItem.nCols * rItem.lHDist + MINLAY,
rItem.lUpper + rItem.nRows * rItem.lVDist + MINLAY));
- // Numerierungsart
+ // Numbering type
SvxNumberType aType;
aType.SetNumberingType(SVX_NUM_NUMBER_NONE);
aDesc.SetNumType( aType );
- // Folgevorlage
+ // Followup template
const SwPageDesc &rFollow = pSh->GetPageDesc( pSh->GetCurPageDesc() );
aDesc.SetFollow( &rFollow );
@@ -297,23 +285,22 @@ static sal_uInt16 nBCTitleNo = 0;
aItem.SetValue((sal_Int8)pPrt->GetPaperBin());
rFmt.SetFmtAttr(aItem);
- //determine orientation by calculating the width and height of the resulting page
+ // Determine orientation by calculating the width and height of the resulting page
const int nResultWidth = rItem.lHDist * (rItem.nCols - 1) + rItem.lWidth + rItem.lLeft;
const int nResultHeight = rItem.lVDist * (rItem.nRows - 1) + rItem.lHeight + rItem.lUpper;
aDesc.SetLandscape(nResultWidth > nResultHeight);
pSh->ChgPageDesc( 0, aDesc );
- // Rahmen einfuegen
+ // Insert frame
SwFldMgr* pFldMgr = new SwFldMgr;
pFldMgr->SetEvalExpFlds(sal_False);
- //fix(24446): Damit der Text der Ettiketten nicht im unbedruckbaren
- //Bereich landet stellen wir entsprechende Raender ein. Um das Handling
- //so Optimal wie moeglich zu halten stellen wir zunaechst an der
- //aktuellen Absatzvorlage keinen Rand als hartes Attribut ein (Damit die
- //Formatierung wg. der Zeichengeb. Rahmen passt. Dann stellen wir die
- //Standarabsatzvorlage anhand des unbedruckbaren Bereiches ein.
+ //fix(24446): To avoid that labels end up in unprintable area, we set
+ //borders accordingly. To keep the handling as good as possible, we
+ //don't set any border as hard attribute at the current paragraph template
+ //(so that formating works, because of character-bound borders). Then
+ //we set the default paragraph template using the unprintable area.
const long nMin = pPrt->GetPageOffset().X() - rItem.lLeft;
if ( nMin > 0 )
{
@@ -325,7 +312,7 @@ static sal_uInt16 nBCTitleNo = 0;
pStandard->SetFmtAttr( aLR );
}
- // Rahmenvorlage vorbereiten
+ // Prepare border template
SwFrmFmt* pFmt = pSh->GetFrmFmtFromPool( RES_POOLFRM_LABEL );
SwFmtFrmSize aFrmSize( ATT_FIX_SIZE,
rItem.lHDist - (rItem.lHDist-rItem.lWidth),
@@ -392,15 +379,15 @@ static sal_uInt16 nBCTitleNo = 0;
sLinkName += String::CreateFromAscii(MASTER_LABEL);
aSect.SetLinkFileName(sLinkName);
aSect.SetProtectFlag(true);
- pSh->Insert(aDotStr); // Dummytext zum Zuweisen der Section
+ pSh->Insert(aDotStr); // Dummytext to allocate the Section
pSh->SttDoc();
- pSh->EndDoc(sal_True); // Alles im Rahmen selektieren
+ pSh->EndDoc(sal_True); // Select everything in the frame
pSh->InsertSection(aSect);
}
pSh->Pop( sal_False );
}
if ( i + 1 != rItem.nRows )
- pSh->SplitNode(); // Kleine Optimierung
+ pSh->SplitNode(); // Small optimisation
}
}
else
@@ -418,7 +405,7 @@ static sal_uInt16 nBCTitleNo = 0;
if(!bLabel)
{
uno::Reference< frame::XModel > xModel = pSh->GetView().GetDocShell()->GetBaseModel();
- DBG_ASSERT(pDialogFactory, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pDialogFactory, "SwAbstractDialogFactory fail!");
SwLabDlgMethod SwLabDlgUpdateFieldInformation = pDialogFactory->GetSwLabDlgStaticMethod ();
SwLabDlgUpdateFieldInformation(xModel, rItem);
}
@@ -436,14 +423,14 @@ static sal_uInt16 nBCTitleNo = 0;
if( rItem.aWriting.indexOf( '<' ) >= 0 )
{
- // Datenbankbrowser mit zuletzt verwendeter Datenbank oeffnen
+ // Open database browser on recently used database
ShowDBObj( *pNewView, pSh->GetDBData() );
}
if( rItem.bSynchron )
{
SfxDispatcher* pDisp = pViewFrame->GetDispatcher();
- ASSERT(pDisp, "Heute kein Dispatcher am Frame?");
+ OSL_ENSURE(pDisp, "No dispatcher in frame?");
pDisp->Execute(FN_SYNC_LABELS, SFX_CALLMODE_ASYNCHRON);
}
rReq.SetReturnValue(SfxVoidItem(bLabel ? FN_LABEL : FN_BUSINESS_CARD));
@@ -455,3 +442,4 @@ static sal_uInt16 nBCTitleNo = 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx
index ca39c1330790..6ab953e62193 100644
--- a/sw/source/ui/app/appopt.cxx
+++ b/sw/source/ui/app/appopt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <cmdid.h> // Function-Ids
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
@@ -58,8 +60,8 @@
#include <wrtsh.hxx>
#include <IDocumentDeviceAccess.hxx>
#include <uitool.hxx>
-#include <initui.hxx> // fuer ::GetGlossaries()
-#include <fldbas.hxx> //fuer UpdateFields
+#include <initui.hxx> // for ::GetGlossaries()
+#include <fldbas.hxx> //for UpdateFields
#include <wview.hxx>
#include <cfgitems.hxx>
#include <prtopt.hxx>
@@ -72,7 +74,7 @@
#include <unotools/lingucfg.hxx>
#include <editeng/unolingu.hxx>
#include <globals.hrc>
-#include <globals.h> // globale Konstanten z.B.
+#include <globals.h> // e.g. global Constants
#include <svl/slstitm.hxx>
#include "swabstdlg.hxx"
#include <swwrtshitem.hxx>
@@ -82,37 +84,31 @@
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-/* -----------------12.02.99 12:28-------------------
- *
- * --------------------------------------------------*/
-
SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
{
sal_Bool bTextDialog = (nId == SID_SW_EDITOPTIONS) ? sal_True : sal_False;
- // hier werden die Optionen fuer die Web- und den Textdialog zusmmengesetzt
+ // the options for the Web- and Textdialog are put together here
SwViewOption aViewOpt = *GetUsrPref(!bTextDialog);
SwMasterUsrPref* pPref = bTextDialog ? pUsrPref : pWebUsrPref;
- //kein MakeUsrPref, da hier nur die Optionen von Textdoks genommen werden duerfen
+ // no MakeUsrPref, because only options from textdoks can be used here
SwView* pAppView = GetView();
if(pAppView && pAppView->GetViewFrame() != SfxViewFrame::Current())
pAppView = 0;
if(pAppView)
{
- // wenn Text dann nicht WebView und umgekehrt
+ // if Text then no WebView and vice versa
sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
if( (bWebView && !bTextDialog) ||(!bWebView && bTextDialog))
{
aViewOpt = *pAppView->GetWrtShell().GetViewOptions();
}
else
- pAppView = 0; // mit View kann hier nichts gewonnen werden
+ pAppView = 0; // with View, there's nothing to win here
}
/********************************************************************/
- /* */
- /* Optionen/Bearbeiten */
- /* */
+ /* Options/Edit */
/********************************************************************/
SfxItemSet* pRet = new SfxItemSet (GetPool(), FN_PARAM_DOCDISP, FN_PARAM_ELEM,
SID_PRINTPREVIEW, SID_PRINTPREVIEW,
@@ -121,6 +117,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
FN_PARAM_WRTSHELL, FN_PARAM_WRTSHELL,
FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
SID_ATTR_METRIC, SID_ATTR_METRIC,
+ SID_ATTR_APPLYCHARUNIT, SID_ATTR_APPLYCHARUNIT,
SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,
RES_BACKGROUND, RES_BACKGROUND,
SID_HTML_MODE, SID_HTML_MODE,
@@ -130,7 +127,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
SID_ATTR_LANGUAGE, SID_ATTR_LANGUAGE,
SID_ATTR_CHAR_CJK_LANGUAGE, SID_ATTR_CHAR_CJK_LANGUAGE,
SID_ATTR_CHAR_CTL_LANGUAGE, SID_ATTR_CHAR_CTL_LANGUAGE,
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
FN_PARAM_SWTEST, FN_PARAM_SWTEST,
#endif
0);
@@ -163,32 +160,23 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
}
else
{
-/* Der Drucker wird jetzt von der TabPage erzeugt und auch geloescht
- * SfxItemSet* pSet = new SfxItemSet( SFX_APP()->GetPool(),
- SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
- SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- 0 );
-
- pPrt = new SfxPrinter(pSet);
- pRet->Put(SwPtrItem(FN_PARAM_PRINTER, pPrt));*/
-
SvtLinguConfig aLinguCfg;
Locale aLocale;
LanguageType nLang;
using namespace ::com::sun::star::i18n::ScriptType;
- Any aLang = aLinguCfg.GetProperty(C2U("DefaultLocale"));
+ Any aLang = aLinguCfg.GetProperty(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultLocale")));
aLang >>= aLocale;
nLang = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aLocale), LATIN);
pRet->Put(SvxLanguageItem(nLang, SID_ATTR_LANGUAGE));
- aLang = aLinguCfg.GetProperty(C2U("DefaultLocale_CJK"));
+ aLang = aLinguCfg.GetProperty(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultLocale_CJK")));
aLang >>= aLocale;
nLang = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aLocale), ASIAN);
pRet->Put(SvxLanguageItem(nLang, SID_ATTR_CHAR_CJK_LANGUAGE));
- aLang = aLinguCfg.GetProperty(C2U("DefaultLocale_CTL"));
+ aLang = aLinguCfg.GetProperty(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultLocale_CTL")));
aLang >>= aLocale;
nLang = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aLocale), COMPLEX);
pRet->Put(SvxLanguageItem(nLang, SID_ATTR_CHAR_CTL_LANGUAGE));
@@ -211,6 +199,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
pAppView->GetVLinealMetric(eUnit);
pRet->Put(SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit) ));
pRet->Put(SfxUInt16Item( SID_ATTR_METRIC, static_cast< sal_uInt16 >(pPref->GetMetric()) ));
+ pRet->Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, pPref->IsApplyCharUnit()));
if(bTextDialog)
{
if(pAppView)
@@ -224,10 +213,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
pRet->Put(SfxUInt16Item( SID_ATTR_DEFTABSTOP, (sal_uInt16)pPref->GetDefTab()));
}
- /*-----------------01.02.97 11.13-------------------
- Optionen fuer GridTabPage
- --------------------------------------------------*/
-
+ // Options for GridTabPage
SvxGridItem aGridItem( SID_ATTR_GRID_OPTIONS);
aGridItem.SetUseGridSnap( aViewOpt.IsSnap());
@@ -243,9 +229,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
pRet->Put(aGridItem);
- /*-----------------01.02.97 13.02-------------------
- Optionen fuer PrintTabPage
- --------------------------------------------------*/
+ // Options for PrintTabPage
const SwPrintData* pOpt = pAppView ?
&pAppView->GetWrtShell().getIDocumentDeviceAccess()->getPrintData() :
0;
@@ -256,42 +240,17 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
SwAddPrinterItem aAddPrinterItem (FN_PARAM_ADDPRINTER, *pOpt );
pRet->Put(aAddPrinterItem);
- /*-----------------01.02.97 13.12-------------------
- Optionen fuer Web-Hintergrund
- --------------------------------------------------*/
+ // Options for Web background
if(!bTextDialog)
{
pRet->Put(SvxBrushItem(aViewOpt.GetRetoucheColor(), RES_BACKGROUND));
}
-#ifdef DBG_UTIL
- /*-----------------01.02.97 13.02-------------------
- Test-Optionen
- --------------------------------------------------*/
- SwTestItem aTestItem(FN_PARAM_SWTEST);
- aTestItem.bTest1 = aViewOpt.IsTest1();
- aTestItem.bTest2 = aViewOpt.IsTest2();
- aTestItem.bTest3 = aViewOpt.IsTest3();
- aTestItem.bTest4 = aViewOpt.IsTest4();
- aTestItem.bTest5 = aViewOpt.IsTest5();
- aTestItem.bTest6 = aViewOpt.IsTest6();
- aTestItem.bTest7 = aViewOpt.IsTest7();
- aTestItem.bTest8 = aViewOpt.IsTest8();
- aTestItem.bTest9 = SwViewOption::IsTest9();
- aTestItem.bTest10 = aViewOpt.IsTest10();
- pRet->Put(aTestItem);
-#endif
- /*-----------------01.02.97 13.04-------------------
-
- --------------------------------------------------*/
if(!bTextDialog)
pRet->Put(SfxUInt16Item(SID_HTML_MODE, HTMLMODE_ON));
-// delete pPrt;
return pRet;
}
-/* -----------------12.02.99 12:28-------------------
- *
- * --------------------------------------------------*/
+
void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
{
sal_Bool bTextDialog = nId == SID_SW_EDITOPTIONS;
@@ -303,7 +262,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
// the text dialog mustn't apply data to the web view and vice versa
sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
if( (bWebView == bTextDialog))
- pAppView = 0; //
+ pAppView = 0;
}
SwViewOption aViewOpt = *GetUsrPref(!bTextDialog);
@@ -314,7 +273,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
: NULL;
/*---------------------------------------------------------------------
- Seite Dokumentansicht auswerten
+ Interpret the page Documentview
-----------------------------------------------------------------------*/
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, sal_False, &pItem ))
{
@@ -342,7 +301,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
}
/*---------------------------------------------------------------------
- Elemente - Item auswerten
+ Elements - interpret Item
-----------------------------------------------------------------------*/
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, sal_False, &pItem ) )
@@ -358,6 +317,14 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
::SetDfltMetric((FieldUnit)pMetricItem->GetValue(), !bTextDialog);
}
+ if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT,
+ sal_False, &pItem ) )
+ {
+ SFX_APP()->SetOptions(rSet);
+ const SfxBoolItem* pCharItem = (const SfxBoolItem*)pItem;
+ ::SetApplyCharUnit(pCharItem->GetValue(), !bTextDialog);
+ }
+
if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, sal_False, &pItem ) )
{
const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
@@ -389,8 +356,8 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
}
- /*-----------------01.02.97 11.36-------------------
- Hintergrund nur im WebDialog
+ /*------------------------------------------------
+ Background only in WebDialog
--------------------------------------------------*/
if(SFX_ITEM_SET == rSet.GetItemState(RES_BACKGROUND))
{
@@ -400,7 +367,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
}
/*--------------------------------------------------------------------
- Seite Rastereinstellungen auswerten
+ Interpret page Grid Settings
----------------------------------------------------------------------*/
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, sal_False, &pItem ))
@@ -429,9 +396,9 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
}
}
- //--------------------------------------------------------------------------
- // Writer Drucker Zusatzeinstellungen auswerten
- //----------------------------------------------------------------------------
+ /*--------------------------------------------------------------------
+ Interpret Writer Printer Options
+ ----------------------------------------------------------------------*/
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, sal_False, &pItem ))
{
@@ -471,33 +438,10 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
}
-#ifdef DBG_UTIL
- /*--------------------------------------------------------------------------
- Writer Testseite auswerten
- ----------------------------------------------------------------------------*/
-
- if( SFX_ITEM_SET == rSet.GetItemState(
- FN_PARAM_SWTEST, sal_False, &pItem ))
- {
- const SwTestItem* pTestItem = (const SwTestItem*)pItem;
- aViewOpt.SetTest1((sal_Bool)pTestItem->bTest1);
- aViewOpt.SetTest2((sal_Bool)pTestItem->bTest2);
- aViewOpt.SetTest3((sal_Bool)pTestItem->bTest3);
- aViewOpt.SetTest4((sal_Bool)pTestItem->bTest4);
- aViewOpt.SetTest5((sal_Bool)pTestItem->bTest5);
- aViewOpt.SetTest6((sal_Bool)pTestItem->bTest6);
- aViewOpt.SetTest7((sal_Bool)pTestItem->bTest7);
- aViewOpt.SetTest8((sal_Bool)pTestItem->bTest8);
- SwViewOption::SetTest9((sal_Bool)pTestItem->bTest9);
- aViewOpt.SetTest10((sal_Bool)pTestItem->bTest10);
- }
-#endif
- // dann an der akt. View und Shell die entsp. Elemente setzen
+ // set elements for the current view and shell
ApplyUsrPref( aViewOpt, pAppView, bTextDialog? VIEWOPT_DEST_TEXT : VIEWOPT_DEST_WEB);
}
-/* -----------------12.02.99 12:28-------------------
- *
- * --------------------------------------------------*/
+
SfxTabPage* SwModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet )
{
SfxTabPage* pRet = NULL;
@@ -566,7 +510,7 @@ SfxTabPage* SwModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxI
SwView* pCurrView = GetView();
if(pCurrView)
{
- // wenn Text dann nicht WebView und umgekehrt
+ // if text then not WebView and vice versa
sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pCurrView);
if( (bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE == nId) ||
(!bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE != nId) )
@@ -602,7 +546,7 @@ SfxTabPage* SwModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxI
}
}
break;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
case RID_SW_TP_OPTTEST_PAGE:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -640,7 +584,9 @@ SfxTabPage* SwModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxI
break;
}
- DBG_ASSERT( pRet, "SwModule::CreateTabPage(): Unknown tabpage id" );
+ OSL_ENSURE( pRet, "SwModule::CreateTabPage(): Unknown tabpage id" );
return pRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index f7bb6f4703cb..2326820e9191 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,11 +68,11 @@
#include <swwait.hxx>
#include <printdata.hxx>
#include <frmatr.hxx>
-#include <view.hxx> // fuer die aktuelle Sicht
+#include <view.hxx> // for the current view
#include <edtwin.hxx>
#include <PostItMgr.hxx>
-#include <wrtsh.hxx> // Verbindung zur Core
-#include <docsh.hxx> // Dokumenterzeugung
+#include <wrtsh.hxx> // connection to Core
+#include <docsh.hxx> // document creation
#include <basesh.hxx>
#include <viewopt.hxx>
#include <wdocsh.hxx>
@@ -94,18 +95,16 @@
#include <txtftn.hxx>
#include <ftnidx.hxx>
-// --> FME 2004-08-05 #i20883# Digital Signatures and Encryption
+// #i20883# Digital Signatures and Encryption
#include <fldbas.hxx>
#include <docary.hxx>
-// <--
-#include <swerror.h> // Fehlermeldungen
+#include <swerror.h> // Error messages
#include <helpid.h>
#include <cmdid.h>
#include <globals.hrc>
#include <app.hrc>
#include <cfgid.h>
-#include <unotools/moduleoptions.hxx>
#include <unotools/fltrcfg.hxx>
#include <svtools/htmlcfg.hxx>
#include <sfx2/fcontnr.hxx>
@@ -134,7 +133,6 @@ using namespace ::com::sun::star::container;
SFX_IMPL_INTERFACE( SwDocShell, SfxObjectShell, SW_RES(0) )
{
- SFX_CHILDWINDOW_REGISTRATION( SID_HYPERLINK_INSERT );
}
TYPEINIT2(SwDocShell, SfxObjectShell, SfxListener);
@@ -143,7 +141,7 @@ TYPEINIT2(SwDocShell, SfxObjectShell, SfxListener);
SFX_IMPL_OBJECTFACTORY(SwDocShell, SvGlobalName(SO3_SW_CLASSID), SFXOBJECTSHELL_STD_NORMAL|SFXOBJECTSHELL_HASMENU, "swriter" )
/*--------------------------------------------------------------------
- Beschreibung: Laden vorbereiten
+ Description: Prepare loading
--------------------------------------------------------------------*/
@@ -184,7 +182,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
else
return 0;
- // PassWord Checken
+ // Check password
String aPasswd;
if ((*ppRdr)->NeedsPasswd( *pRead ))
{
@@ -236,7 +234,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
}
/*--------------------------------------------------------------------
- Beschreibung: Laden
+ Description: Loading
--------------------------------------------------------------------*/
sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
@@ -251,7 +249,7 @@ sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
SwWait aWait( *this, sal_True );
- // SfxProgress unterdruecken, wenn man Embedded ist
+ // Suppress SfxProgress, when we are Embedded
SW_MOD()->SetEmbeddedLoadSave(
SFX_CREATE_MODE_EMBEDDED == GetCreateMode() );
@@ -262,7 +260,7 @@ sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
sal_uLong nErr = pRdr->Read( *pRead );
- // Evtl. ein altes Doc weg
+ // Maybe put away one old Doc
if ( pDoc != pRdr->GetDoc() )
{
if( pDoc )
@@ -285,16 +283,10 @@ sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
sal_Bool bOk = !IsError( nErr );
- // --> OD 2006-11-07 #i59688#
-// // StartFinishedLoading rufen. Nicht bei asynchronen Filtern!
-// // Diese muessen das selbst rufen!
-// if( bOk && !pDoc->IsInLoadAsynchron() )
-// StartLoadFinishedTimer();
if ( bOk && !pDoc->IsInLoadAsynchron() )
{
LoadingFinished();
}
- // <--
pRead->setSotStorageRef(pStg); // #i45333# save sot storage ref in case of recursive calls
@@ -302,7 +294,7 @@ sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
}
/*--------------------------------------------------------------------
- Beschreibung: Sichern des Default-Formats, Stg vorhanden
+ Description: Saving the Default-Format, Stg present
--------------------------------------------------------------------*/
@@ -315,7 +307,7 @@ sal_Bool SwDocShell::Save()
SwWait aWait( *this, sal_True );
CalcLayoutForOLEObjects(); // format for OLE objets
- // --> OD 2006-03-17 #i62875#
+ // #i62875#
// reset compatibility flag <DoNotCaptureDrawObjsOnPage>, if possible
if ( pWrtShell && pDoc &&
pDoc->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
@@ -323,7 +315,6 @@ sal_Bool SwDocShell::Save()
{
pDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
}
- // <--
sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
if( SfxObjectShell::Save() )
@@ -346,9 +337,9 @@ sal_Bool SwDocShell::Save()
break;
case SFX_CREATE_MODE_EMBEDDED:
- // SfxProgress unterdruecken, wenn man Embedded ist
+ // Suppress SfxProgress, if we are Embedded
SW_MOD()->SetEmbeddedLoadSave( sal_True );
- // kein break;
+ // no break;
case SFX_CREATE_MODE_STANDARD:
case SFX_CREATE_MODE_PREVIEW:
@@ -356,15 +347,12 @@ sal_Bool SwDocShell::Save()
{
if( pDoc->ContainsMSVBasic() )
{
- //TODO/MBA: it looks as that this code can be removed!
- //SvxImportMSVBasic aTmp( *this, pIo->GetStorage() );
- //aTmp.SaveOrDelMSVBAStorage( sal_False, aEmptyStr );
if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() )
nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) (*this) );
pDoc->SetContainsMSVBasic( sal_False );
}
- // TabellenBox Edit beenden!
+ // End TableBox Edit!
if( pWrtShell )
pWrtShell->EndAllTblBoxEdit();
@@ -399,7 +387,7 @@ sal_Bool SwDocShell::Save()
}
/*--------------------------------------------------------------------
- Beschreibung: Sichern im Defaultformat
+ Description: Save using the Defaultformat
--------------------------------------------------------------------*/
@@ -439,14 +427,14 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
GetModel(), uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentProperties> xDocProps
= xDPS->getDocumentProperties();
- xDocProps->setTemplateName(::rtl::OUString::createFromAscii(""));
- xDocProps->setTemplateURL(::rtl::OUString::createFromAscii(""));
+ xDocProps->setTemplateName(::rtl::OUString());
+ xDocProps->setTemplateURL(::rtl::OUString());
xDocProps->setTemplateDate(::util::DateTime());
}
}
CalcLayoutForOLEObjects(); // format for OLE objets
- // --> OD 2006-03-17 #i62875#
+ // #i62875#
// reset compatibility flag <DoNotCaptureDrawObjsOnPage>, if possible
if ( pWrtShell && pDoc &&
pDoc->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
@@ -454,7 +442,6 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
{
pDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
}
- // <--
sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
uno::Reference < embed::XStorage > xStor = rMedium.GetOutputStorage();
@@ -480,26 +467,23 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
if( pDoc->ContainsMSVBasic() )
{
- //TODO/MBA: it looks as that this code can be removed!
- //SvxImportMSVBasic aTmp( *this, pIo->GetStorage() );
- //aTmp.SaveOrDelMSVBAStorage( sal_False, aEmptyStr );
if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() )
nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) *this );
pDoc->SetContainsMSVBasic( sal_False );
}
- // TabellenBox Edit beenden!
+ // End TableBox Edit!
if( pWrtShell )
pWrtShell->EndAllTblBoxEdit();
- // Modified-Flag merken und erhalten ohne den Link zu Callen
- // (fuer OLE; nach Anweisung von MM)
+ // Remember and preserve Modified-Flag without calling the Link
+ // (for OLE; after Statement from MM)
sal_Bool bIsModified = pDoc->IsModified();
pDoc->GetIDocumentUndoRedo().LockUndoNoModifiedPosition();
Link aOldOLELnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- // SfxProgress unterdruecken, wenn man Embedded ist
+ // Suppress SfxProgress when we are Embedded
SW_MOD()->SetEmbeddedLoadSave(
SFX_CREATE_MODE_EMBEDDED == GetCreateMode() );
@@ -534,11 +518,11 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
}
/*--------------------------------------------------------------------
- Beschreibung: Sichern aller Formate
+ Description: Save all Formats
--------------------------------------------------------------------*/
SwSrcView* lcl_GetSourceView( SwDocShell* pSh )
{
- // sind wir in der SourceView?
+ // are we in SourceView?
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst( pSh );
SfxViewShell* pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
return PTR_CAST( SwSrcView, pViewShell);
@@ -554,7 +538,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
WriterRef xWriter;
SwReaderWriter::GetWriter( pFlt->GetUserData(), rMedium.GetBaseURL( true ), xWriter );
if( !xWriter.Is() )
- { // Der Filter ist nicht vorhanden
+ { // Filter not available
InfoBox( 0,
SW_RESSTR(STR_DLLNOTFOUND) ).Execute();
return sal_False;
@@ -582,7 +566,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
if ( bSave )
{
SvStorageRef xStg = new SotStorage( rMedium.GetOutStream(), sal_False );
- DBG_ASSERT( !xStg->GetError(), "No storage available for storing VBA macros!" );
+ OSL_ENSURE( !xStg->GetError(), "No storage available for storing VBA macros!" );
if ( !xStg->GetError() )
{
nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, String::CreateFromAscii("Macros") );
@@ -592,7 +576,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
}
}
- // TabellenBox Edit beenden!
+ // End TableBox Edit!
if( pWrtShell )
pWrtShell->EndAllTblBoxEdit();
@@ -623,12 +607,12 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
UpdateDocInfoForSave();
}
- // --> FME 2007-5-7 #i76360# Update document statistics
+ // #i76360# Update document statistics
SwDocStat aDocStat( pDoc->GetDocStat() );;
pDoc->UpdateDocStat( aDocStat );
- // <--
+
CalcLayoutForOLEObjects(); // format for OLE objets
- // --> OD 2006-03-17 #i62875#
+ // #i62875#
// reset compatibility flag <DoNotCaptureDrawObjsOnPage>, if possible
if ( pWrtShell && pDoc &&
pDoc->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
@@ -636,7 +620,6 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
{
pDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
}
- // <--
if( xWriter->IsStgWriter() &&
( /*xWriter->IsSw3Writer() ||*/
@@ -644,14 +627,14 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
pFlt->GetUserData().EqualsAscii( FILTER_XMLV ) ||
pFlt->GetUserData().EqualsAscii( FILTER_XMLVW ) ) )
{
- // eigenen Typ ermitteln
+ // determine the own Type
sal_uInt8 nMyType = 0;
if( ISA( SwWebDocShell) )
nMyType = 1;
else if( ISA( SwGlobalDocShell) )
nMyType = 2;
- // gewuenschten Typ ermitteln
+ // determine the desired Type
sal_uInt8 nSaveType = 0;
sal_uLong nSaveClipId = pFlt->GetFormat();
if( SOT_FORMATSTR_ID_STARWRITERWEB_8 == nSaveClipId ||
@@ -665,7 +648,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
SOT_FORMATSTR_ID_STARWRITERGLOB_40 == nSaveClipId )
nSaveType = 2;
- // Flags am Dokument entsprechend umsetzen
+ // Change Flags of the Document accordingly
sal_Bool bIsHTMLModeSave = GetDoc()->get(IDocumentSettingAccess::HTML_MODE);
sal_Bool bIsGlobalDocSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
sal_Bool bIsGlblDocSaveLinksSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
@@ -687,14 +670,14 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
// TODO/MBA: testing
uno::Reference < beans::XPropertySet > xSet( rMedium.GetStorage(), uno::UNO_QUERY );
if ( xSet.is() )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("MediaType"), uno::makeAny( ::rtl::OUString( SotExchange::GetFormatMimeType( nSaveClipId ) ) ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), uno::makeAny( ::rtl::OUString( SotExchange::GetFormatMimeType( nSaveClipId ) ) ) );
}
catch ( uno::Exception& )
{
}
}
- // Jetzt das Dokument normal speichern
+ // Now normally save the Document
sal_Bool bRet = SaveAs( rMedium );
if( nMyType != nSaveType )
@@ -726,40 +709,37 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
xWriter->SetAsciiOptions( aOpt );
}
- // SfxProgress unterdruecken, wenn man Embedded ist
+ // Suppress SfxProgress when we are Embedded
SW_MOD()->SetEmbeddedLoadSave(
SFX_CREATE_MODE_EMBEDDED == GetCreateMode());
- // Kontext aufspannen, um die Anzeige der Selektion zu unterbinden
+ // Span Context in order to suppress the Selection's View
sal_uLong nErrno;
String aFileName( rMedium.GetName() );
- //Keine View also das ganze Dokument!
+ // No View, so the whole Document!
if ( pWrtShell )
{
SwWait aWait( *this, sal_True );
- // --> OD 2009-12-31 #i106906#
+ // #i106906#
const sal_Bool bFormerLockView = pWrtShell->IsViewLocked();
pWrtShell->LockView( sal_True );
- // <--
pWrtShell->StartAllAction();
pWrtShell->Push();
SwWriter aWrt( rMedium, *pWrtShell, sal_True );
nErrno = aWrt.Write( xWriter, &aFileName );
- //JP 16.05.97: falls der SFX uns die View waehrend des speicherns
- // entzieht
+ //JP 16.05.97: In case the SFX revokes the View while saving
if( pWrtShell )
{
pWrtShell->Pop(sal_False);
pWrtShell->EndAllAction();
- // --> OD 2009-12-31 #i106906#
+ // #i106906#
pWrtShell->LockView( bFormerLockView );
- // <--
}
}
else
{
- // sind wir in der SourceView?
+ // are we in SourceView?
SwSrcView* pSrcView = ::lcl_GetSourceView( this );
if( pSrcView )
{
@@ -782,12 +762,12 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
}
/*--------------------------------------------------------------------
- Beschreibung: Haende weg
+ Description: Hands off
--------------------------------------------------------------------*/
/*--------------------------------------------------------------------
- Beschreibung: ??? noch nicht zu aktivieren, muss sal_True liefern
+ Description: ??? do not yet activate, must deliver TRUE
--------------------------------------------------------------------*/
@@ -797,7 +777,7 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
sal_Bool bRet = SfxObjectShell::SaveCompleted( xStor );
if( bRet )
{
- // erst hier entscheiden, ob das Speichern geklappt hat oder nicht
+ // Do not decide until here, whether Saving was successful or not
if( IsModified() )
pDoc->SetModified();
else
@@ -815,12 +795,8 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
{
if ( !pOLEChildList->MoveEmbeddedObject( aNames[n-1], GetEmbeddedObjectContainer() ) )
{
- DBG_ERROR( "Copying of objects didn't work!" );
+ OSL_ENSURE(false, "Copying of objects didn't work!" );
}
-
- //SvPersist* pPersist = this;
- //SvInfoObjectRef aRef( pInfList->GetObject( --n ));
- //pPersist->Move( &aRef, aRef->GetStorageName() );
}
DELETEZ( pOLEChildList );
@@ -831,26 +807,26 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
}
/*--------------------------------------------------------------------
- Beschreibung: Draw()-Overload fuer OLE2 (Sfx)
+ Description: Draw()-Overload for OLE2 (Sfx)
--------------------------------------------------------------------*/
void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
sal_uInt16 nAspect )
{
- //fix #25341# Draw sollte das Modified nicht beeinflussen
+ //fix #25341# Draw should not affect the Modified
sal_Bool bResetModified;
if ( sal_True == (bResetModified = IsEnableSetModified()) )
EnableSetModified( sal_False );
- //sollte am Document ein JobSetup haengen, dann kopieren wir uns diesen,
- //um nach dem PrtOle2 diesen wieder am Doc zu verankern.
- //Einen leeren JobSetup setzen wir nicht ein, denn der wuerde nur zu
- //fragwuerdigem Ergebnis nach teurer Neuformatierung fuehren (Preview!)
+ // When there is a JobSetup connected to the Document, we copy it to
+ // reconnect it after PrtOle2. We don't use an empty JobSetup because
+ // that would only lead to questionable results after expensive
+ // reformatting (Preview!)
JobSetup *pOrig = 0;
if ( rSetup.GetPrinterName().Len() && ASPECT_THUMBNAIL != nAspect )
{
pOrig = const_cast<JobSetup*>(pDoc->getJobsetup());
- if( pOrig ) // dann kopieren wir uns den
+ if( pOrig ) // then we copy that
pOrig = new JobSetup( *pOrig );
pDoc->setJobsetup( rSetup );
}
@@ -894,7 +870,7 @@ void SwDocShell::SetVisArea( const Rectangle &rRect )
nMoveY = aRect.Top() < 0 ? -aRect.Top() : 0;
aRect.Move( nMoveX, nMoveY );
- //Ruft das SfxInPlaceObject::SetVisArea()!
+ // Calls SfxInPlaceObject::SetVisArea()!
pView->SetVisArea( aRect, sal_True );
}
else
@@ -906,38 +882,12 @@ Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const
{
if ( nAspect == ASPECT_THUMBNAIL )
{
- //PreView: VisArea auf die erste Seite einstellen.
+ // PreView: set VisArea to the first page.
SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), 1 );
SwCntntNode* pNd = pDoc->GetNodes().GoNext( &aIdx );
const SwRect aPageRect = pNd->FindPageFrmRect( sal_False, 0, sal_False );
return aPageRect.SVRect();
-
- // Why does this have to be that complicated? I replaced this by the
- // call of FindPageFrmRect():
- /*
- //PageDesc besorgen, vom ersten Absatz oder den default.
- const SwFmtPageDesc &rDesc = pNd->GetSwAttrSet().GetPageDesc();
- const SwPageDesc* pDesc = rDesc.GetPageDesc();
- if( !pDesc )
- pDesc = &const_cast<const SwDoc *>(pDoc)->GetPageDesc( 0 );
-
- //Das Format wird evtl. von der virtuellen Seitennummer bestimmt.
- const sal_uInt16 nPgNum = rDesc.GetNumOffset();
- const sal_Bool bOdd = nPgNum % 2 ? sal_True : sal_False;
- const SwFrmFmt *pFmt = bOdd ? pDesc->GetRightFmt() : pDesc->GetLeftFmt();
- if ( !pFmt ) //#40568#
- pFmt = bOdd ? pDesc->GetLeftFmt() : pDesc->GetRightFmt();
-
- if ( pFmt->GetFrmSize().GetWidth() == LONG_MAX )
- //Jetzt wird es aber Zeit fuer die Initialisierung
- pDoc->getPrinter( true );
-
- const SwFmtFrmSize& rFrmSz = pFmt->GetFrmSize();
- const Size aSz( rFrmSz.GetWidth(), rFrmSz.GetHeight() );
- const Point aPt( DOCUMENTBORDER, DOCUMENTBORDER );
- const Rectangle aRect( aPt, aSz );
- return aRect;*/
}
return SfxObjectShell::GetVisArea( nAspect );
}
@@ -965,7 +915,7 @@ sal_uLong SwDocShell::GetMiscStatus() const
return SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE;
}
-// --> FME 2004-08-05 #i20883# Digital Signatures and Encryption
+// #i20883# Digital Signatures and Encryption
sal_uInt16 SwDocShell::GetHiddenInformationState( sal_uInt16 nStates )
{
// get global state like HIDDENINFORMATION_DOCUMENTVERSIONS
@@ -978,7 +928,7 @@ sal_uInt16 SwDocShell::GetHiddenInformationState( sal_uInt16 nStates )
}
if ( nStates & HIDDENINFORMATION_NOTES )
{
- ASSERT( GetWrtShell(), "No SwWrtShell, no information" )
+ OSL_ENSURE( GetWrtShell(), "No SwWrtShell, no information" );
if ( GetWrtShell() )
{
SwFieldType* pType = GetWrtShell()->GetFldType( RES_POSTITFLD, aEmptyStr );
@@ -999,12 +949,6 @@ sal_uInt16 SwDocShell::GetHiddenInformationState( sal_uInt16 nStates )
return nState;
}
-// <--
-
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
void SwDocShell::GetState(SfxItemSet& rSet)
@@ -1016,23 +960,13 @@ void SwDocShell::GetState(SfxItemSet& rSet)
{
switch (nWhich)
{
- // MT: MakroChosser immer enablen, weil Neu moeglich
- // case SID_BASICCHOOSER:
- // {
- // StarBASIC* pBasic = GetBasic();
- // StarBASIC* pAppBasic = SFX_APP()->GetBasic();
- // if ( !(pBasic->GetModules()->Count() ||
- // pAppBasic->GetModules()->Count()) )
- // rSet.DisableItem(nWhich);
- // }
- // break;
case SID_PRINTPREVIEW:
{
sal_Bool bDisable = IsInPlaceActive();
if ( !bDisable )
{
SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this);
- while (pTmpFrm) // Preview suchen
+ while (pTmpFrm) // Look for Preview
{
if ( PTR_CAST(SwView, pTmpFrm->GetViewShell()) &&
((SwView*)pTmpFrm->GetViewShell())->GetWrtShell().getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE))
@@ -1133,7 +1067,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
}
break;
- default: DBG_ASSERT(!this,"Hier darfst Du nicht hinein!");
+ default: OSL_ENSURE(!this,"You cannot get here!");
}
nWhich = aIter.NextWhich();
@@ -1141,15 +1075,15 @@ void SwDocShell::GetState(SfxItemSet& rSet)
}
/*--------------------------------------------------------------------
- Beschreibung: OLE-Hdls
+ Description: OLE-Hdls
--------------------------------------------------------------------*/
IMPL_LINK( SwDocShell, Ole2ModifiedHdl, void *, p )
{
- // vom Doc wird der Status mitgegeben (siehe doc.cxx)
- // Bit 0: -> alter Zustand
- // Bit 1: -> neuer Zustand
+ // the Status is handed over from Doc (see doc.cxx)
+ // Bit 0: -> old state
+ // Bit 1: -> new state
long nStatus = (long)p;
if( IsEnableSetModified() )
SetModified( (nStatus & 2) ? sal_True : sal_False );
@@ -1157,7 +1091,7 @@ IMPL_LINK( SwDocShell, Ole2ModifiedHdl, void *, p )
}
/*--------------------------------------------------------------------
- Beschreibung: Pool returnen Hier weil virtuelll
+ Description: return Pool here, because virtual
--------------------------------------------------------------------*/
@@ -1181,13 +1115,13 @@ void SwDocShell::PrepareReload()
::DelAllGrfCacheEntries( pDoc );
}
-// --> OD 2006-11-07 #i59688#
+// #i59688#
// linked graphics are now loaded on demand.
// Thus, loading of linked graphics no longer needed and necessary for
// the load of document being finished.
void SwDocShell::LoadingFinished()
{
- // --> OD 2007-10-08 #i38810#
+ // #i38810#
// Original fix fails after integration of cws xmlsec11:
// interface <SfxObjectShell::EnableSetModified(..)> no longer works, because
// <SfxObjectShell::FinishedLoading(..)> doesn't care about its status and
@@ -1195,23 +1129,8 @@ void SwDocShell::LoadingFinished()
// Thus, manuell modify the document, if its modified and its links are updated
// before <FinishedLoading(..)> is called.
const bool bHasDocToStayModified( pDoc->IsModified() && pDoc->LinksUpdated() );
-// // --> OD 2005-02-11 #i38810# - disable method <SetModified(..)>, if document
-// // has stay in modified state, due to the update of its links during load.
-// bool bResetEnableSetModified(false);
-// if ( IsEnableSetModified() &&
-// pDoc->IsModified() && pDoc->LinksUpdated() )
-// {
-// EnableSetModified( sal_False );
-// bResetEnableSetModified = true;
-// }
- // <--
+
FinishedLoading( SFX_LOADED_ALL );
-// // --> OD 2005-02-11 #i38810#
-// if ( bResetEnableSetModified )
-// {
-// EnableSetModified( sal_True );
-// }
-// // <--
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst(this);
if(pVFrame)
{
@@ -1220,18 +1139,17 @@ void SwDocShell::LoadingFinished()
((SwSrcView*)pShell)->Load(this);
}
- // --> OD 2007-10-08 #i38810#
+ // #i38810#
if ( bHasDocToStayModified && !pDoc->IsModified() )
{
pDoc->SetModified();
}
- // <--
}
-// eine Uebertragung wird abgebrochen (wird aus dem SFX gerufen)
+// a Transfer is cancelled (is called from SFX)
void SwDocShell::CancelTransfers()
{
- // alle Links vom LinkManager Canceln
+ // Cancel all links from LinkManager
aFinishedTimer.Stop();
pDoc->GetLinkManager().CancelTransfers();
SfxObjectShell::CancelTransfers();
@@ -1287,33 +1205,28 @@ void SwDocShell::CalcLayoutForOLEObjects()
}
-// --> FME 2005-02-25 #i42634# Overwrites SfxObjectShell::UpdateLinks
+// #i42634# Overwrites SfxObjectShell::UpdateLinks
// This new function is necessary to trigger update of links in docs
// read by the binary filter:
void SwDocShell::UpdateLinks()
{
GetDoc()->UpdateLinks(sal_True);
- // --> FME 2005-07-27 #i50703# Update footnote numbers
+ // #i50703# Update footnote numbers
SwTxtFtn::SetUniqueSeqRefNo( *GetDoc() );
SwNodeIndex aTmp( GetDoc()->GetNodes() );
GetDoc()->GetFtnIdxs().UpdateFtn( aTmp );
- // <--
}
uno::Reference< frame::XController >
SwDocShell::GetController()
{
::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > aRet;
- // --> FME 2007-10-15 #i82346# No view in page preview
+ // #i82346# No view in page preview
if ( GetView() )
- // <--
aRet = GetView()->GetController();
return aRet;
}
-/* -----------------------------12.02.01 12:08--------------------------------
-
- ---------------------------------------------------------------------------*/
static const char* pEventNames[] =
{
"OnPageCountChange",
@@ -1429,3 +1342,5 @@ bool SwDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 8963a837389c..5c653171f016 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,6 +61,7 @@
#include <editeng/svxacorr.hxx>
#include <editeng/langitem.hxx>
#include <svx/fmshell.hxx>
+#include <sfx2/linkmgr.hxx>
#include <svtools/htmlcfg.hxx>
#include <svx/ofaitem.hxx>
@@ -72,8 +74,8 @@
#include <swunodef.hxx>
#include <fmtcol.hxx>
#include <swevent.hxx>
-#include <view.hxx> // fuer die aktuelle Sicht
-#include <docsh.hxx> // Dokumenterzeugung
+#include <view.hxx> // for the current view
+#include <docsh.hxx> // creation of documents
#include <wrtsh.hxx>
#include <fldbas.hxx>
#include <viewopt.hxx>
@@ -110,16 +112,13 @@
#include <com/sun/star/ui/dialogs/ListboxControlActions.hpp>
#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
-#ifdef FUTURE_VBA
#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include <com/sun/star/script/vba/VBAEventId.hpp>
-#endif
#include <editeng/acorrcfg.hxx>
#include <SwStyleNameMapper.hxx>
#include <sfx2/fcontnr.hxx>
-#include "swabstdlg.hxx"
#include "dialog.hrc"
#include "swabstdlg.hxx"
@@ -134,24 +133,24 @@ using namespace ::sfx2;
extern sal_Bool FindPhyStyle( SwDoc& , const String& , SfxStyleFamily );
/*--------------------------------------------------------------------
- Beschreibung: DocInfo kreieren (virtuell)
+ Description: create DocInfo (virtual)
--------------------------------------------------------------------*/
SfxDocumentInfoDialog* SwDocShell::CreateDocumentInfoDialog(
Window *pParent, const SfxItemSet &rSet)
{
SfxDocumentInfoDialog* pDlg = new SfxDocumentInfoDialog(pParent, rSet);
- //nur mit Statistik, wenn dieses Doc auch angezeigt wird, nicht
- //aus dem Doc-Manager
+ //only with statistics, when this document is being shown, not
+ //from within the Doc-Manager
SwDocShell* pDocSh = (SwDocShell*) SfxObjectShell::Current();
if( pDocSh == this )
{
- //Nicht fuer SourceView.
+ //Not for SourceView.
SfxViewShell *pVSh = SfxViewShell::Current();
if ( pVSh && !pVSh->ISA(SwSrcView) )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pDlg->AddTabPage(TP_DOC_STAT, SW_RESSTR(STR_DOC_STAT),pFact->GetTabPageCreatorFunc( TP_DOC_STAT ),0);
}
}
@@ -159,7 +158,7 @@ SfxDocumentInfoDialog* SwDocShell::CreateDocumentInfoDialog(
}
-/// update text fields on document properties changes
+// update text fields on document properties changes
void SwDocShell::DoFlushDocInfo()
{
if ( !pDoc ) return;
@@ -181,7 +180,6 @@ void SwDocShell::DoFlushDocInfo()
}
}
-#ifdef FUTURE_VBA
void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVBAEventProcessor >& xVbaEvents, const SfxHint& rHint )
{
using namespace com::sun::star::script::vba::VBAEventId;
@@ -200,31 +198,26 @@ void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVBAEventP
}
}
}
-#endif
/*--------------------------------------------------------------------
- Beschreibung: Benachrichtigung bei geaenderter DocInfo
+ Description: Notification on DocInfo changes
--------------------------------------------------------------------*/
void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if( !pDoc )
{
-//MA: Kommt bei der OLE-Registration vor!
-// ASSERT( !this, "DocShell ist nicht richtig initialisiert!" );
return ;
}
-#ifdef FUTURE_VBA
uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor();
if( xVbaEvents.is() )
lcl_processCompatibleSfxHint( xVbaEvents, rHint );
-#endif
sal_uInt16 nAction = 0;
if( rHint.ISA(SfxSimpleHint) )
{
- // swithc for more actions
+ // switch for more actions
switch( ((SfxSimpleHint&) rHint).GetId() )
{
case SFX_HINT_TITLECHANGED:
@@ -236,9 +229,8 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if( rHint.ISA(SfxEventHint) &&
((SfxEventHint&) rHint).GetEventId() == SFX_EVENT_LOADFINISHED )
{
- // --> OD 2004-12-03 #i38126# - own action id
+ // #i38126# - own action id
nAction = 3;
- // <--
}
if( nAction )
@@ -255,9 +247,9 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
case 2:
pDoc->GetSysFldType( RES_FILENAMEFLD )->UpdateFlds();
break;
- // --> OD 2004-12-03 #i38126# - own action for event LOADFINISHED
+ // #i38126# - own action for event LOADFINISHED
// in order to avoid a modified document.
- // --> OD 2005-02-01 #i41679# - Also for the instance of <SwDoc>
+ // #i41679# - Also for the instance of <SwDoc>
// it has to be assured, that it's not modified.
// Perform the same as for action id 1, but disable <SetModified>.
case 3:
@@ -265,21 +257,18 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
const bool bResetModified = IsEnableSetModified();
if ( bResetModified )
EnableSetModified( sal_False );
- // --> OD 2005-02-01 #i41679#
+ // #i41679#
const bool bIsDocModified = pDoc->IsModified();
- // <--
pDoc->DocInfoChgd( );
- // --> OD 2005-02-01 #i41679#
+ // #i41679#
if ( !bIsDocModified )
pDoc->ResetModified();
- // <--
if ( bResetModified )
EnableSetModified( sal_True );
}
break;
- // <--
}
if( pWrtShell )
@@ -292,17 +281,16 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
/*--------------------------------------------------------------------
- Beschreibung: Benachrichtigung Doc schliessen
+ Description: Notification Close Doc
--------------------------------------------------------------------*/
sal_uInt16 SwDocShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
{
sal_uInt16 nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
- if( sal_True == nRet ) //Unbedingt auf sal_True abfragen! (RET_NEWTASK)
+ if( sal_True == nRet ) //has to be queried against TRUE! (RET_NEWTASK)
EndListening( *this );
-#ifdef FUTURE_VBA
if( pDoc && IsInPrepareClose() )
{
uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor();
@@ -313,28 +301,26 @@ sal_uInt16 SwDocShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
xVbaEvents->processVbaEvent( DOCUMENT_CLOSE, aArgs );
}
}
-#endif
return nRet;
}
/*--------------------------------------------------------------------
- Beschreibung: Organizer
+ Description: Organizer
--------------------------------------------------------------------*/
sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
- sal_uInt16 nSourceIdx1, // SourcePool: oberste Inhaltsebene (Vorlagen/Makros)
- sal_uInt16 nSourceIdx2, // Index in den Inhalt
- sal_uInt16 nSourceIdx3, // Index in die Inhaltsebene
- sal_uInt16 &rIdx1, // und das gleiche fuer den DestinationPool
+ sal_uInt16 nSourceIdx1, // SourcePool: uppermost content level (templates/macros)
+ sal_uInt16 nSourceIdx2, // Index in the content
+ sal_uInt16 nSourceIdx3, // Index in the content level
+ sal_uInt16 &rIdx1, // and the same for the DestinationPool
sal_uInt16 &rIdx2, // ""
sal_uInt16 &rIdx3, // ""
- sal_uInt16 &rRemovedIdx ) // falls doppelte geloescht werden, Pos zurueck
+ sal_uInt16 &rRemovedIdx ) // if doubles are being deleted, Pos back
{
- // --> OD 2005-05-10 #i48949# - actions aren't undoable. Thus, allow no undo
+ // #i48949# - actions aren't undoable. Thus, allow no undo
// actions
// Note: The undo action stack is cleared at the end of this method.
::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo());
- // <--
sal_Bool bRet = sal_False;
@@ -347,22 +333,22 @@ sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
SwDocStyleSheetPool* pMyPool =
(SwDocStyleSheetPool*)GetStyleSheetPool();
- // wir koennen nicht in uns selbst hin und her moven
+ // we can't move back and forth within ourselves
if( pHisPool == pMyPool )
return sal_False;
if( INDEX_IGNORE == rIdx2 )
rIdx2 = pMyPool->Count();
- // erstmal auf die Such-Maske "positionieren"
+ // firstly "position" to the search-mask
pHisPool->First();
SfxStyleSheetBase* pHisSheet = (*pHisPool)[nSourceIdx2];
- // wenn so eine Vorlage schon existiert: loeschen!
+ // when such a template already exists: delete!
const String& rOldName = pHisSheet->GetName();
SfxStyleFamily eOldFamily( pHisSheet->GetFamily() );
- // dflt. PageDesc und StandardZeichenvorlage nie loeschen !!!
+ // never delete default PageDesc and Standard Charactertemplate !!!
if( ( SFX_STYLE_FAMILY_PAGE == eOldFamily &&
const_cast<const SwDoc *>(pDoc)->GetPageDesc(0).GetName() ==
rOldName ) ||
@@ -377,20 +363,20 @@ sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
SfxStyleSheetBase* pExist;
if( ::FindPhyStyle( *pDoc, rOldName, eOldFamily ) )
{
- // Bug 20365: nur uebernehmen, wenn das gewuenscht ist!
+ // only take over, if desired!
if( ERRCODE_BUTTON_OK != ErrorHandler::HandleError(
*new MessageInfo( ERRCODE_SFXMSG_STYLEREPLACE, rOldName )) )
{
return sal_False;
}
- // Da Replace den aStyleSheet-Member selbst benoetigt, muss
- // das Ergebnis vom Find kopiert werden (s.u.))
+ // Because Replace needs the aStyleSheet-Member itself, the result
+ // has to be copied from Find (see below))
rtl::Reference< SwDocStyleSheet > xExist( new SwDocStyleSheet(
*(SwDocStyleSheet*)pMyPool->Find( rOldName, eOldFamily ) ) );
pMyPool->Replace( *pHisSheet, *xExist.get() );
- // An der Reihenfolge der Vorlagen im Pool aendert sich nichts.
+ // The ordering of the templates in the Pool is not changed.
rIdx2 = rIdx1 = INDEX_IGNORE;
GetDoc()->SetModified();
@@ -400,34 +386,32 @@ sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
pMyPool->SetSearchMask( eOldFamily, nMySrchMask );
- // MIB 18.12.98: SwDocStyleSheetPool::Make liefert einen
- // Pointer auf SwDocStyleSheetPool::aStyleSheet zurueck.
- // Der gleiche Member von SwDocStyleSheetPool::Find benutzt.
- // Deshalb muss hier mit einer Kopie gearbeitet werden.
- // Vorsicht: SfxStyleSheetBase::SetFollow ruft seinerseits
- // ein SwDocStyleSheetPool::Find auf, do dass es nicht genuegt
- // die Find-Aufrufe in dieser Methode zu eleminieren.
+ // SwDocStyleSheetPool::Make returns a pointer to
+ // SwDocStyleSheetPool::aStyleSheet that uses same members of
+ // SwDocStyleSheetPool::Find. Therefore a copy has to be used
+ // here. Attention: SfxStylessheetBase::SetFollow calls itself
+ // a SwDocStyleSheetPool::Find, so that it's not sufficiant to
+ // to eliminate the Find-calls in this method.
rtl::Reference< SwDocStyleSheet > xNewSheet( new SwDocStyleSheet( (SwDocStyleSheet&)pMyPool
->Make(rOldName, eOldFamily, pHisSheet->GetMask() ) ) );
if( SFX_STYLE_FAMILY_PAGE == eOldFamily && rSource.ISA(SwDocShell) )
{
- // gesondert behandeln!!
+ // to deal with separately!!
SwPageDesc* pDestDsc = (SwPageDesc*)xNewSheet->GetPageDesc();
SwPageDesc* pCpyDsc = (SwPageDesc*)((SwDocStyleSheet*)pHisSheet)->GetPageDesc();
pDoc->CopyPageDesc( *pCpyDsc, *pDestDsc );
}
else
- // die neue Vorlage mit den Attributen fuellen
+ // populate the new templates with the attributes
xNewSheet->SetItemSet( pHisSheet->GetItemSet() );
pMyPool->SetSearchMask( SFX_STYLE_FAMILY_ALL, nMySrchMask );
if( xNewSheet->IsUserDefined() || xNewSheet->IsUsed() )
{
- // Benutzte und Benutzer-definierte Vorlagen werden angezeigt.
- // Dshalb muss hier der Index der neuen Vorlage im Pool
- // ermittelt werden.
+ // Used and User-defined templates are being showed. That's why
+ // the Index of the template in the pool has to be found out.
pExist = pMyPool->First();
sal_uInt16 nIdx = 0;
while( pExist )
@@ -444,18 +428,12 @@ sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
}
else
{
- // Andere Vorlagen werden nicht angezeigt.
+ // Other templates are not being showed.
rIdx1 = rIdx2 = INDEX_IGNORE;
}
-/* pMyPool->Count(); //interne Liste neu fuellen lassen!!!!!
-
- // suchen, um die richige Insert-Position returnen zu koennen
- pMyPool->Find( rOldName, SFX_STYLE_FAMILY_ALL, nMySrchMask );
- rIdx2 = pMyPool->GetFindPos();*/
-
- // wer bekommt den Neuen als Parent? wer benutzt den Neuen als Follow?
- // (immer nur ueber die Instanziierten!!!)
+ // who gets the new one as parent? who uses the new one as Follow?
+ // (always using the instanciated!!!)
pMyPool->SetSearchMask( eOldFamily, nMySrchMask );
pMyPool->SetOrganizerMode( sal_True );
SfxStyleSheetBase* pTestSheet = pMyPool->First();
@@ -465,21 +443,21 @@ sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
pTestSheet->HasParentSupport() &&
pTestSheet->GetParent() == rOldName)
{
- pTestSheet->SetParent(rOldName); // Verknuepfung neu aufbauen
+ pTestSheet->SetParent(rOldName); // establish the link newly
}
if (pTestSheet->GetFamily() == eOldFamily &&
pTestSheet->HasFollowSupport() &&
pTestSheet->GetFollow() == rOldName)
{
- pTestSheet->SetFollow(rOldName); // Verknuepfung neu aufbauen
+ pTestSheet->SetFollow(rOldName); // establish the link newly
}
pTestSheet = pMyPool->Next();
}
pMyPool->SetOrganizerMode( SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
- // hat der Neue einen Parent? wenn ja, mit gleichem Namen bei uns suchen
+ // does the new one have a parent? if yes, search with the same name at our place.
if (pHisSheet->HasParentSupport())
{
const String& rParentName = pHisSheet->GetParent();
@@ -495,7 +473,7 @@ sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
}
}
- // hat der Neue einen Follow? wenn ja, mit gleichem Namen bei uns suchen
+ // does the new one have a Follow? if yes, search with the same name at our place.
if (pHisSheet->HasFollowSupport())
{
const String& rFollowName = pHisSheet->GetFollow();
@@ -511,11 +489,11 @@ sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
}
}
- // Bug 27347: alte Einstellung wieder setzen
+ // set old settings again
pMyPool->SetSearchMask( eMyOldFamily, nMySrchMask );
- // Model geaendert
- ASSERT(pDoc, "Doc fehlt");
+ // Model changed
+ OSL_ENSURE(pDoc, "Doc missing");
GetDoc()->SetModified();
bRet = sal_True;
@@ -530,22 +508,21 @@ sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
rIdx3,
rRemovedIdx);
- // --> OD 2005-05-10 #i48949# - actions aren't undoable and could have change
+ // #i48949# - actions aren't undoable and could have change
// the document node array. Thus, clear the undo action stack.
if (undoGuard.UndoWasEnabled())
{
GetDoc()->GetIDocumentUndoRedo().DelAllUndoObj();
}
- // <--
return bRet;
}
/*--------------------------------------------------------------------
- Beschreibung: Vorlagen Remove
+ Description: template Remove
--------------------------------------------------------------------*/
-sal_Bool SwDocShell::Remove(sal_uInt16 nIdx1, // siehe Insert
+sal_Bool SwDocShell::Remove(sal_uInt16 nIdx1, // see Insert
sal_uInt16 nIdx2,
sal_uInt16 nIdx3)
{
@@ -555,13 +532,13 @@ sal_Bool SwDocShell::Remove(sal_uInt16 nIdx1, // siehe Insert
{
SwDocStyleSheetPool* pMyPool = (SwDocStyleSheetPool*)GetStyleSheetPool();
- pMyPool->First(); // vorm Zugriff Pool aktualisieren!!
+ pMyPool->First(); // update Pool before access!!
SfxStyleSheetBase* pMySheet = (*pMyPool)[nIdx2];
String aName( pMySheet->GetName() );
SfxStyleFamily eFamily( pMySheet->GetFamily() );
- // dflt. PageDesc und StandardZeichenvorlage nie loeschen !!!
+ // never delete default PageDesc and Standard Character template!!!
if( ( SFX_STYLE_FAMILY_PAGE == eFamily &&
const_cast<const SwDoc *>(pDoc)->GetPageDesc(0).GetName()
== aName ) ||
@@ -570,10 +547,10 @@ sal_Bool SwDocShell::Remove(sal_uInt16 nIdx1, // siehe Insert
RES_POOLCOLL_TEXT_BEGIN ] ))
return sal_False;
- // also loeschen
+ // so delete
pMyPool->Remove( pMySheet );
- // jetzt noch die Parents/Follows aller Instanziierten korrigieren
+ // now correct the Parents/Follows of all instanciated
pMyPool->SetOrganizerMode( sal_True );
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
@@ -582,14 +559,14 @@ sal_Bool SwDocShell::Remove(sal_uInt16 nIdx1, // siehe Insert
pTestSheet->HasParentSupport() &&
pTestSheet->GetParent() == aName)
{
- pTestSheet->SetParent( aEmptyStr ); // Verknuepfung aufloesen
+ pTestSheet->SetParent( aEmptyStr ); // resolve link
}
if (pTestSheet->GetFamily() == eFamily &&
pTestSheet->HasFollowSupport() &&
pTestSheet->GetFollow() == aName)
{
- pTestSheet->SetFollow( aEmptyStr ); // Verknuepfung aufloesen
+ pTestSheet->SetFollow( aEmptyStr ); // resolve link
}
pTestSheet = pMyPool->Next();
@@ -604,17 +581,13 @@ sal_Bool SwDocShell::Remove(sal_uInt16 nIdx1, // siehe Insert
nIdx3 );
- // Model geaendert
- ASSERT(pDoc, "Doc fehlt");
+ // Model changed
+ OSL_ENSURE(pDoc, "Doc missing");
GetDoc()->SetModified();
return bRet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDocShell::Execute(SfxRequest& rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -628,10 +601,10 @@ void SwDocShell::Execute(SfxRequest& rReq)
SvxSwAutoFmtFlags* pAFlags = &SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags();
SwAutoCompleteWord& rACW = SwDoc::GetAutoCompleteWords();
- sal_Bool bOldLocked = rACW.IsLockWordLstLocked(),
+ bool bOldLocked = rACW.IsLockWordLstLocked(),
bOldAutoCmpltCollectWords = pAFlags->bAutoCmpltCollectWords;
- rACW.SetLockWordLstLocked( sal_True );
+ rACW.SetLockWordLstLocked( true );
SvStringsISortDtor aTmpLst;
aTmpLst.Insert( &rACW.GetWordList() );
@@ -645,8 +618,6 @@ void SwDocShell::Execute(SfxRequest& rReq)
// SMARTTAGS
pAFlags->pSmartTagMgr = &SwSmartTagMgr::Get();
- //pApp->ExecuteSlot(aAppReq);
-
SfxItemSet aSet( pApp->GetPool(), SID_AUTO_CORRECT_DLG, SID_AUTO_CORRECT_DLG, SID_OPEN_SMARTTAGOPTIONS, SID_OPEN_SMARTTAGOPTIONS, 0 );
aSet.Put( aSwOptions );
@@ -720,9 +691,9 @@ void SwDocShell::Execute(SfxRequest& rReq)
bSet = !bCurrent;
sal_uInt16 nSlotId = 0;
- if( bSet && !bFound ) // Keine gefunden, daher neue Preview anlegen
+ if( bSet && !bFound ) // Nothing found, so create new Preview
{
- //Keine neue anlegen fuer BrowseView!
+ // Don't create new one for BrowseView!
if( !GetDoc()->get(IDocumentSettingAccess::BROWSE_MODE) )
nSlotId = SID_VIEWSHELL1;
}
@@ -731,8 +702,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
if( nSlotId )
{
- //JP 23.8.2001: Bug 91360 - PagePreView in the WebDocShell
- // is found under Id ViewShell2.
+ // PagePreView in the WebDocShell
+ // is found under Id ViewShell2.
if( ISA(SwWebDocShell) && SID_VIEWSHELL1 == nSlotId )
nSlotId = SID_VIEWSHELL2;
@@ -813,7 +784,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SwDocShell::Factory().GetFilterContainer()->
GetFilter4FilterName(String::CreateFromAscii("writer8"));
- //#b6439685# make sure the default file format is also available
+ // make sure the default file format is also available
if(bWeb)
{
const String sWild = ((WildCard&)pOwnFlt->GetWildcard()).GetWildCard();
@@ -821,7 +792,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
bool bError = false;
- //#b6439685# catch expception if wrong filter is selected - should not happen anymore
+ // catch expception if wrong filter is selected - should not happen anymore
try
{
xFltMgr->setCurrentFilter( pOwnFlt->GetUIName() );
@@ -914,13 +885,13 @@ void SwDocShell::Execute(SfxRequest& rReq)
break;
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
{
sal_Bool bWeb = 0 != dynamic_cast<SwWebDocShell*>(this);
- DBG_ASSERT(bWeb == sal_True, "SourceView nur in der WebDocShell");
+ OSL_ENSURE(bWeb == TRUE, "SourceView only in WebDocShell");
}
#endif
- // die SourceView ist fuer die SwWebDocShell die 1
+ // the SourceView is not the 1 for SwWebDocShell
sal_uInt16 nSlot = SID_VIEWSHELL1;
sal_Bool bSetModified = sal_False;
SfxPrinter* pSavePrinter = 0;
@@ -949,24 +920,6 @@ void SwDocShell::Execute(SfxRequest& rReq)
nSlot = SID_VIEWSHELL0;
}
}
-/* OS 10.04.97 14.20: Im Web-Writer gibt es keinen Unterschied zwischen
- Export in den SourceMode und dem Speichern des Docs
- else if(IsModified())
- {
- sal_uInt16 nRet = QueryBox( SFX_APPWINDOW ,SW_RES(MSG_SAVE_HTML_QUERY)).Execute();
- if(RET_YES == nRet)
- {
- S F X _DISPATCHER().Execute(SID_SAVEDOC,
- SFX_CALLMODE_SYNCHRON);
- // der ReturnValue von SID_SAVEDOC ist etwas schwer verstaendlich
- if(IsModified())
- nSlot = 0;
- }
- else if( RET_CANCEL == nRet )
- {
- nSlot = 0;
- }
- }*/
if(nSlot)
pViewFrm->GetDispatcher()->Execute(nSlot, SFX_CALLMODE_SYNCHRON);
if(bSetModified)
@@ -974,7 +927,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
if(pSavePrinter)
{
GetDoc()->setPrinter( pSavePrinter, true, true);
- //pSavePrinter darf nicht wieder geloescht werden
+ //pSavePrinter must not be deleted again
}
pViewFrm->GetBindings().SetState(SfxBoolItem(SID_SOURCEVIEW, nSlot == SID_VIEWSHELL2));
pViewFrm->GetBindings().Invalidate( SID_BROWSER_MODE );
@@ -992,10 +945,10 @@ void SwDocShell::Execute(SfxRequest& rReq)
case FN_ABSTRACT_NEWDOC:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwInsertAbstractDlg* pDlg = pFact->CreateSwInsertAbstractDlg(0, DLG_INSERT_ABSTRACT );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
sal_uInt8 nLevel = pDlg->GetLevel();
@@ -1019,12 +972,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
uno::Reference< lang::XMultiServiceFactory > xORB = ::comphelper::getProcessServiceFactory();
uno::Reference< frame::XDispatchProvider > xProv(
- xORB->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.drawing.ModuleDispatcher")), UNO_QUERY );
+ xORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ModuleDispatcher"))), UNO_QUERY );
if ( xProv.is() )
{
- ::rtl::OUString aCmd = ::rtl::OUString::createFromAscii( "SendOutlineToImpress" );
+ ::rtl::OUString aCmd(RTL_CONSTASCII_USTRINGPARAM("SendOutlineToImpress"));
uno::Reference< frame::XDispatchHelper > xHelper(
- xORB->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.frame.DispatchHelper")), UNO_QUERY );
+ xORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.DispatchHelper"))), UNO_QUERY );
if ( xHelper.is() )
{
pStrm->Seek( STREAM_SEEK_TO_END );
@@ -1042,7 +995,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead );
uno::Sequence< beans::PropertyValue > aArgs(1);
- aArgs[0].Name = ::rtl::OUString::createFromAscii("RtfOutline");
+ aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RtfOutline"));
aArgs[0].Value <<= aSeq;
xHelper->executeDispatch( xProv, aCmd, ::rtl::OUString(), 0, aArgs );
}
@@ -1054,11 +1007,11 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
else
{
- // Neues Dokument erzeugen.
+ // Create new document
SfxViewFrame *pFrame = SfxViewFrame::LoadDocument( *xDocSh, 0 );
SwView *pCurrView = (SwView*) pFrame->GetViewShell();
- // Dokumenttitel setzen
+ // Set document's title
String aTmp( SW_RES(STR_ABSTRACT_TITLE) );
aTmp += GetTitle();
xDocSh->SetTitle( aTmp );
@@ -1090,12 +1043,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
uno::Reference< lang::XMultiServiceFactory > xORB = ::comphelper::getProcessServiceFactory();
uno::Reference< frame::XDispatchProvider > xProv(
- xORB->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.drawing.ModuleDispatcher")), UNO_QUERY );
+ xORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ModuleDispatcher"))), UNO_QUERY );
if ( xProv.is() )
{
- ::rtl::OUString aCmd = ::rtl::OUString::createFromAscii( "SendOutlineToImpress" );
+ ::rtl::OUString aCmd(RTL_CONSTASCII_USTRINGPARAM("SendOutlineToImpress"));
uno::Reference< frame::XDispatchHelper > xHelper(
- xORB->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.frame.DispatchHelper")), UNO_QUERY );
+ xORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.DispatchHelper"))), UNO_QUERY );
if ( xHelper.is() )
{
pStrm->Seek( STREAM_SEEK_TO_END );
@@ -1113,7 +1066,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead );
uno::Sequence< beans::PropertyValue > aArgs(1);
- aArgs[0].Name = ::rtl::OUString::createFromAscii("RtfOutline");
+ aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RtfOutline"));
aArgs[0].Value <<= aSeq;
xHelper->executeDispatch( xProv, aCmd, ::rtl::OUString(), 0, aArgs );
}
@@ -1144,7 +1097,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
break;
case SID_BROWSER_MODE:
- case FN_PRINT_LAYOUT: //Fuer Web, genau umgekehrt zum BrowserMode
+ case FN_PRINT_LAYOUT: // for Web, inverse to BrowserMode
{
int eState = STATE_TOGGLE;
sal_Bool bSet = sal_True;
@@ -1162,8 +1115,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
ToggleBrowserMode(bSet, 0);
- // OS: numerische Reihenfolge beachten!
- static sal_uInt16 __READONLY_DATA aInva[] =
+ // OS: mind the numerical order!
+ static sal_uInt16 const aInva[] =
{
SID_NEWWINDOW,/*5620*/
SID_BROWSER_MODE, /*6313*/
@@ -1285,7 +1238,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
if( bCreateHtml )
{
- // fuer HTML gibts es nur einen Filter!!
+ // for HTML there is only one filter!!
pFlt = SwIoSystem::GetFilterOfFormat(
String::CreateFromAscii("HTML"),
SwWebDocShell::Factory().GetFilterContainer() );
@@ -1293,8 +1246,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
else
{
- // Fuer Global-Dokumente bieten wir jetzt auch nur
- // noch den aktuellen an.
+ // for Global-documents we now only offer the current one.
pFlt = SwGlobalDocShell::Factory().GetFilterContainer()->
GetFilter4Extension( String::CreateFromAscii("odm") );
nStrId = STR_LOAD_GLOBAL_DOC;
@@ -1318,44 +1270,6 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
uno::Reference<XFilePickerControlAccess> xCtrlAcc(xFP, UNO_QUERY);
- //#removed by zhaojianwei
-
- // const sal_uInt16 nCount = pDoc->GetTxtFmtColls()->Count();
- // Sequence<OUString> aListBoxEntries(nCount);
- // OUString* pEntries = aListBoxEntries.getArray();
- // sal_Int32 nIdx = 0;
- // sal_Int16 nSelect = 0;
- // OUString sStartTemplate;
- // SwTxtFmtColl *pFnd = 0, *pAny = 0;
- // for(sal_uInt16 i = 0; i < nCount; ++i)
- // {
- // SwTxtFmtColl &rTxtColl =
- // *pDoc->GetTxtFmtColls()->GetObject( i );
- // if( !rTxtColl.IsDefault() && rTxtColl.IsAtDocNodeSet() )
- // {
- // //if( MAXLEVEL >= rTxtColl.GetOutlineLevel() && ( !pFnd || //#outline level,zhaojianwei
- //if( rTxtColl.IsAssignedToListLevelOfOutlineStyle() && ( !pFnd || //<-end,zhaojianwei
- // pFnd->GetAssignedOutlineStyleLevel() > rTxtColl.GetAssignedOutlineStyleLevel() ))
- // {
- // nSelect = (sal_Int16)nIdx;
- // pFnd = &rTxtColl;
- // sStartTemplate = rTxtColl.GetName();
- // }
- // else if( !pAny )
- // pAny = &rTxtColl;
- // //pEntries[nIdx++] = rTxtColl.GetName(); //#outline level,remove by zhaojianwei
- // pEntries[nIdx++] = sStyles + rTxtColl.GetName(); //#outline level,add by zhaojianwei
- // }
- // }
- // if(!sStartTemplate.getLength() && pAny)
- // sStartTemplate = pAny->GetName();
- // aListBoxEntries.realloc(nIdx);
- //<-end,zhaojianwei
-
-
- //#outline level,add by zhaojianwei
- /////////////////////////////////////////////////////////////////////
-
bool bOutline[MAXLEVEL] = {false};
const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
if( rOutlNds.Count() )
@@ -1394,8 +1308,6 @@ void SwDocShell::Execute(SfxRequest& rReq)
aListBoxEntries.realloc(nIdx);
sal_Int16 nSelect = 0;
- /////////////////////////////////////////////////////////////////////
- //<-end,zhaojianwei
try
{
@@ -1411,7 +1323,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
catch(Exception& )
{
- DBG_ERROR("control acces failed");
+ OSL_ENSURE(false, "control acces failed");
}
xFP->setTitle( SW_RESSTR( nStrId ));
@@ -1425,21 +1337,18 @@ void SwDocShell::Execute(SfxRequest& rReq)
ListboxControlActions::GET_SELECTED_ITEM );
OUString sTmpl;
aTemplateValue >>= sTmpl;
- //aTemplateName = sTmpl; //#outline level,removed by zhaojianwei
- //#outline level,add by zhaojianwei
sal_Int32 nColonPos = sTmpl.indexOf( sal_Unicode(':') );
OUString sPrefix = sTmpl.copy( 0L, nColonPos );
- if( sPrefix.equalsAscii("Style"))
+ if( sPrefix.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Style")))
{
aTemplateName = sTmpl.copy( 7L ); //get string behind "Style: "
}
- else if( sPrefix.equalsAscii("Outline"))
+ else if( sPrefix.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Outline")))
{
nTemplateOutlineLevel = ( sTmpl.copy( 15L )).toInt32(); //get string behind "Outline: Leve ";
bCreateByOutlineLevel = true;
}
- //<-end,zhaojianwei
if ( aFileName.Len() )
{
@@ -1451,22 +1360,15 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
}
- //const SwTxtFmtColl* pSplitColl = 0; //#outline level,removed by zhaojianwei
- // if ( aTemplateName.Len() )
- // pSplitColl = pDoc->FindTxtFmtCollByName(aTemplateName);
- //<-end,zhaojianwei
if( aFileName.Len() )
{
if( PrepareClose( sal_False ) )
{
SwWait aWait( *this, sal_True );
- //bDone = bCreateHtml //#outline level,removed by zhaojianwei
- // ? pDoc->GenerateHTMLDoc( aFileName, pSplitColl )
- // : pDoc->GenerateGlobalDoc( aFileName, pSplitColl );
- if ( bCreateByOutlineLevel ) //add by zhaojianwei
+ if ( bCreateByOutlineLevel )
{
- bDone = bCreateHtml //#outline level,removed by zhaojianwei
+ bDone = bCreateHtml
? pDoc->GenerateHTMLDoc( aFileName, nTemplateOutlineLevel )
: pDoc->GenerateGlobalDoc( aFileName, nTemplateOutlineLevel );
}
@@ -1475,11 +1377,10 @@ void SwDocShell::Execute(SfxRequest& rReq)
const SwTxtFmtColl* pSplitColl = 0;
if ( aTemplateName.Len() )
pSplitColl = pDoc->FindTxtFmtCollByName(aTemplateName);
- bDone = bCreateHtml //#outline level,removed by zhaojianwei
+ bDone = bCreateHtml
? pDoc->GenerateHTMLDoc( aFileName, pSplitColl )
: pDoc->GenerateGlobalDoc( aFileName, pSplitColl );
}
- //<-end,zhaojianwei
if( bDone )
{
SfxStringItem aName( SID_FILE_NAME, aFileName );
@@ -1523,9 +1424,9 @@ void SwDocShell::Execute(SfxRequest& rReq)
case SID_ATTR_YEAR2000:
if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_False, &pItem ))
{
- DBG_ASSERT(pItem->ISA(SfxUInt16Item), "falsches Item");
+ OSL_ENSURE(pItem->ISA(SfxUInt16Item), "wrong Item");
sal_uInt16 nYear2K = ((SfxUInt16Item*)pItem)->GetValue();
- //ueber Views iterieren und den State an den FormShells setzen
+ // iterate over Views and put the State to FormShells
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst( this );
SfxViewShell* pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
@@ -1543,14 +1444,38 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
break;
- default: DBG_ERROR("falscher Dispatcher");
+ default: OSL_ENSURE(false, "wrong Dispatcher");
}
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
+ // #FIXME - align with NEW event stuff ( if possible )
+#if 0
+void lcl_processCompatibleSfxHint( const uno::Reference< document::XVbaEventsHelper >& xVbaEventsHelper, const SfxHint& rHint )
+{
+ if ( rHint.ISA( SfxEventHint ) )
+ {
+ uno::Sequence< uno::Any > aArgs;
+ sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId();
+ switch( nEventId )
+ {
+ case SFX_EVENT_CREATEDOC:
+ {
+ xVbaEventsHelper->ProcessCompatibleVbaEvent( VBAEVENT_DOCUMENT_NEW, aArgs );
+ break;
+ }
+ case SFX_EVENT_OPENDOC:
+ {
+ xVbaEventsHelper->ProcessCompatibleVbaEvent( VBAEVENT_DOCUMENT_OPEN, aArgs );
+ break;
+ }
+ default:
+ {
+ //do nothing
+ }
+ }
+ }
+}
+#endif
long SwDocShell::DdeGetData( const String& rItem, const String& rMimeType,
uno::Any & rValue )
@@ -1558,30 +1483,24 @@ long SwDocShell::DdeGetData( const String& rItem, const String& rMimeType,
return pDoc->GetData( rItem, rMimeType, rValue );
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
long SwDocShell::DdeSetData( const String& rItem, const String& rMimeType,
const uno::Any & rValue )
{
return pDoc->SetData( rItem, rMimeType, rValue );
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
::sfx2::SvLinkSource* SwDocShell::DdeCreateLinkSource( const String& rItem )
{
return pDoc->CreateLinkSource( rItem );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
+void SwDocShell::ReconnectDdeLink(SfxObjectShell& rServer)
+{
+ if ( pDoc ) {
+ ::sfx2::LinkManager& rLinkManager = pDoc->GetLinkManager();
+ rLinkManager.ReconnectDdeLink(rServer);
+ }
+}
void SwDocShell::FillClass( SvGlobalName * pClassName,
sal_uInt32 * pClipFormat,
@@ -1603,15 +1522,16 @@ void SwDocShell::FillClass( SvGlobalName * pClassName,
*pClipFormat = bTemplate ? SOT_FORMATSTR_ID_STARWRITER_8_TEMPLATE : SOT_FORMATSTR_ID_STARWRITER_8;
*pLongUserName = SW_RESSTR(STR_WRITER_DOCUMENT_FULLTYPE);
}
+// #FIXME check with new Event handling
+#if 0
+ uno::Reference< document::XVbaEventsHelper > xVbaEventsHelper = pDoc->GetVbaEventsHelper();
+ if( xVbaEventsHelper.is() )
+ lcl_processCompatibleSfxHint( xVbaEventsHelper, rHint );
+#endif
*pUserName = SW_RESSTR(STR_HUMAN_SWDOC_NAME);
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDocShell::SetModified( sal_Bool bSet )
{
SfxObjectShell::SetModified( bSet );
@@ -1640,13 +1560,9 @@ void SwDocShell::SetModified( sal_Bool bSet )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDocShell::UpdateChildWindows()
{
- // Flddlg ggf neu initialisieren (z.B. fuer TYP_SETVAR)
+ // if necessary newly initialize Flddlg (i.e. for TYP_SETVAR)
if(!GetView())
return;
SfxViewFrame* pVFrame = GetView()->GetViewFrame();
@@ -1655,17 +1571,14 @@ void SwDocShell::UpdateChildWindows()
if( pWrp )
pWrp->ReInitDlg( this );
- // RedlineDlg ggf neu initialisieren
+ // if necessary newly initialize RedlineDlg
SwRedlineAcceptChild *pRed = (SwRedlineAcceptChild*)pVFrame->
GetChildWindow( SwRedlineAcceptChild::GetChildWindowId() );
if( pRed )
pRed->ReInitDlg( this );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-// --> OD 2005-08-02 #i48748#
+// #i48748#
class SwReloadFromHtmlReader : public SwReader
{
public:
@@ -1677,20 +1590,23 @@ class SwReloadFromHtmlReader : public SwReader
SetBaseURL( _rFilename );
}
};
-// <--
+
void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView )
{
sal_Bool bModified = IsModified();
- // MIB 23.6.97: Die HTTP-Header-Felder muessen geloescht werden,
- // sonst gibt es welche aus Meta-Tags hinter doppelt und dreifach.
+ // The HTTP-Header fields have to be removed, otherwise
+ // there are some from Meta-Tags dublicated or triplicated afterwards.
ClearHeaderAttributesForSourceViewHack();
- // MIB 24.07.97: Das Dokument-Basic muss auch noch d'ran glauben ...
+ // The Document-Basic also bites the dust ...
+ // A EnterBasicCall is not needed here, because nothing is called and
+ // there can't be any Dok-Basic, that has not yet been loaded inside
+ // of an HTML document.
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
- //#59620# HasBasic() zeigt an, dass es schon einen BasicManager an der DocShell
- // gibt. Der wurde im HTML-Import immer angelegt, wenn Macros im Quelltext
- // vorhanden sind.
+ //#59620# HasBasic() shows, that there already is a BasicManager at the DocShell.
+ // That was always generated in HTML-Import, when there are
+ // Macros in the source code.
if( pHtmlOptions && pHtmlOptions->IsStarBasic() && HasBasic())
{
BasicManager *pBasicMan = GetBasicManager();
@@ -1702,7 +1618,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
StarBASIC *pBasic = pBasicMan->GetLib( --nLibCount );
if( pBasic )
{
- // Die IDE benachrichtigen
+ // Notify the IDE
SfxUsrAnyItem aShellItem( SID_BASICIDE_ARG_DOCUMENT_MODEL, makeAny( GetModel() ) );
String aLibName( pBasic->GetName() );
SfxStringItem aLibNameItem( SID_BASICIDE_ARG_LIBNAME, aLibName );
@@ -1711,7 +1627,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
SFX_CALLMODE_SYNCHRON,
&aShellItem, &aLibNameItem, 0L );
- // Aus der Standard-Lib werden nur die Module geloescht
+ // Only the modules are deleted from the standard-lib
if( nLibCount )
pBasicMan->RemoveLib( nLibCount, sal_True );
else
@@ -1719,14 +1635,14 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
}
}
- ASSERT( pBasicMan->GetLibCount() <= 1,
- "Loschen des Basics hat nicht geklappt" );
+ OSL_ENSURE( pBasicMan->GetLibCount() <= 1,
+ "Deleting Basics didn't work" );
}
}
sal_Bool bWasBrowseMode = pDoc->get(IDocumentSettingAccess::BROWSE_MODE);
RemoveLink();
- //jetzt muss auch das UNO-Model ueber das neue Doc informiert werden #51535#
+ // now also the UNO-Model has to be informed about the new Doc #51535#
uno::Reference<text::XTextDocument> xDoc(GetBaseModel(), uno::UNO_QUERY);
text::XTextDocument* pxDoc = xDoc.get();
((SwXTextDocument*)pxDoc)->InitNewDoc();
@@ -1740,8 +1656,8 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
const String& rMedname = GetMedium()->GetName();
- // fix #51032#: Die HTML-Vorlage muss noch gesetzt werden
- SetHTMLTemplate( *GetDoc() ); //Styles aus HTML.vor
+ // The HTML template still has to be set
+ SetHTMLTemplate( *GetDoc() ); //Styles from HTML.vor
SfxViewShell* pViewShell = GetView() ? (SfxViewShell*)GetView()
: SfxViewShell::Current();
@@ -1751,12 +1667,12 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
SubInitNew();
SfxMedium aMed( rStreamName, STREAM_READ, sal_False );
- // --> OD 2005-08-01 #i48748# - use class <SwReloadFromHtmlReader>, because
+ // #i48748# - use class <SwReloadFromHtmlReader>, because
// the base URL has to be set to the filename of the document <rMedname>
// and not to the base URL of the temporary file <aMed> in order to get
// the URLs of the linked graphics correctly resolved.
SwReloadFromHtmlReader aReader( aMed, rMedname, pDoc );
- // <--
+
aReader.Read( *ReadHTML );
const SwView* pCurrView = GetView();
@@ -1770,9 +1686,9 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
}
- // MIB 23.6.97: Die HTTP-Header-Attribute wieder in die DokInfo
- // uebernehmen. Die Base-URL ist hier egal, da TLX zum absolutieren die
- // vom Dokument nimmt.
+ // Take HTTP-Header-Attibutes over into the DokInfo again.
+ // The Base-URL doesn't matter here because TLX uses the one from the document
+ // for absolutization.
SetHeaderAttributesForSourceViewHack();
if(bModified && !IsReadOnly())
@@ -1781,9 +1697,6 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
pDoc->ResetModified();
}
-/* -----------------------------14.12.99 16:52--------------------------------
-
- ---------------------------------------------------------------------------*/
void SwDocShell::ToggleBrowserMode(sal_Bool bSet, SwView* _pView )
{
GetDoc()->set(IDocumentSettingAccess::BROWSE_MODE, bSet );
@@ -1802,10 +1715,9 @@ void SwDocShell::ToggleBrowserMode(sal_Bool bSet, SwView* _pView )
SFX_PRINTER_PRINTER | SFX_PRINTER_JOBSETUP );
}
- // --> FME 2005-03-16 #i44963# Good occasion to check if page sizes in
+ // #i44963# Good occasion to check if page sizes in
// page descriptions are still set to (LONG_MAX, LONG_MAX) (html import)
GetDoc()->CheckDefaultPageFmt();
- // <--
// Currently there can be only one view (layout) if the document is viewed in Web layout
// So if there are more views we are in print layout and for toggling to Web layout all other views must be closed
@@ -1865,12 +1777,11 @@ sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL,
SwReader* pReader = 0;
SwPaM* pPam = 0;
- // Filter bestimmen:
-// const SfxFilter* pFlt = SwIoSystem::GetFileFilter( rURL, aEmptyStr );
+ // Set filter:
String sFactory(String::CreateFromAscii(SwDocShell::Factory().GetShortName()));
SfxFilterMatcher aMatcher( sFactory );
- //#b6445961# search for filter in WebDocShell, too
+ // search for filter in WebDocShell, too
SfxMedium aMed( rURL, STREAM_STD_READ, sal_False );
const SfxFilter* pFlt = 0;
aMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False );
@@ -1882,7 +1793,7 @@ sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL,
}
if( aMed.IsStorage() )
{
- DBG_ASSERT((pFlt ? pFlt->GetVersion() : 0) >= SOFFICE_FILEFORMAT_60, "which file version?");
+ OSL_ENSURE((pFlt ? pFlt->GetVersion() : 0) >= SOFFICE_FILEFORMAT_60, "which file version?");
pRead = ReadXML;
// the SW3IO - Reader need the pam/wrtshell, because only then he
// insert the styles!
@@ -1897,13 +1808,10 @@ sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL,
}
else if( pFlt )
{
-// if( pFlt->GetUserData().EqualsAscii( FILTER_SWG ) ||
-// pFlt->GetUserData().EqualsAscii( FILTER_SWGV ))
-// pRead = ReadSwg;
pReader = new SwReader( aMed, rURL, pDoc );
}
- ASSERT( pRead, "no reader found" );
+ OSL_ENSURE( pRead, "no reader found" );
if( pRead )
{
pRead->GetReaderOpt().SetTxtFmts( rOpt.IsTxtFmts() );
@@ -1947,3 +1855,4 @@ SfxInPlaceClient* SwDocShell::GetIPClient( const ::svt::EmbeddedObjectRef& xObjR
return pResult;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/docshdrw.cxx b/sw/source/ui/app/docshdrw.cxx
index cd6d2aee296d..58c892ff4f89 100644
--- a/sw/source/ui/app/docshdrw.cxx
+++ b/sw/source/ui/app/docshdrw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,35 +29,21 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
-
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
-
-
-
-
-
-
-
-
#include <svl/stritem.hxx>
#include <svx/drawitem.hxx>
#include <svx/svdmodel.hxx>
#include <svx/svdoutl.hxx>
#include <svx/xtable.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <doc.hxx>
using namespace ::com::sun::star;
/*--------------------------------------------------------------------
- Beschreibung: Document laden
+ Description: Load Document
--------------------------------------------------------------------*/
@@ -65,7 +52,7 @@ void SwDocShell::InitDraw()
SdrModel *pDrDoc = pDoc->GetDrawModel();
if( pDrDoc )
{
- // Listen, bzw. Tables im ItemSet der DocShell anlegen
+ // create Lists and Tables DocShell's ItemSet
PutItem( SvxGradientListItem( pDrDoc->GetGradientList(), SID_GRADIENT_LIST ) );
PutItem( SvxHatchListItem( pDrDoc->GetHatchList(), SID_HATCH_LIST ) );
PutItem( SvxBitmapListItem( pDrDoc->GetBitmapList(), SID_BITMAP_LIST ) );
@@ -82,3 +69,4 @@ void SwDocShell::InitDraw()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx
index 6c8e73931105..721db82f6632 100644
--- a/sw/source/ui/app/docshini.cxx
+++ b/sw/source/ui/app/docshini.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
#include <svx/dialogs.hrc>
@@ -105,13 +105,10 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
using ::rtl::OUString;
-/*-----------------21.09.96 15.29-------------------
-
---------------------------------------------------*/
/*--------------------------------------------------------------------
- Beschreibung: Document laden
+ Description: Load Document
--------------------------------------------------------------------*/
@@ -120,26 +117,19 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::InitNew" );
sal_Bool bRet = SfxObjectShell::InitNew( xStor );
- ASSERT( GetMapUnit() == MAP_TWIP, "map unit is not twip!" );
+ OSL_ENSURE( GetMapUnit() == MAP_TWIP, "map unit is not twip!" );
sal_Bool bHTMLTemplSet = sal_False;
if( bRet )
{
- AddLink(); // pDoc / pIo ggf. anlegen
+ AddLink(); // create pDoc / pIo if applicable
sal_Bool bWeb = ISA( SwWebDocShell );
if ( bWeb )
- bHTMLTemplSet = SetHTMLTemplate( *GetDoc() );//Styles aus HTML.vor
+ bHTMLTemplSet = SetHTMLTemplate( *GetDoc() );// Styles from HTML.vor
else if( ISA( SwGlobalDocShell ) )
GetDoc()->set(IDocumentSettingAccess::GLOBAL_DOCUMENT, true); // Globaldokument
-/*
- //JP 12.07.95: so einfach waere es fuer die neu Mimik
- pDoc->SetDefault( SvxTabStopItem( 1,
- GetStar Writer App()->GetUsrPref()->GetDefTabDist(),
- SVX_TAB_ADJUST_DEFAULT,
- RES_PARATR_TABSTOP));
-*/
if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
SwTransferable::InitOle( this, *pDoc );
@@ -164,7 +154,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
SubInitNew();
- // fuer alle
+ // for all
SwStdFontConfig* pStdFont = SW_MOD()->GetStdFontConfig();
SfxPrinter* pPrt = pDoc->getPrinter( false );
@@ -361,7 +351,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
}
/*--------------------------------------------------------------------
- Beschreibung: Ctor mit SfxCreateMode ?????
+ Description: Ctor with SfxCreateMode ?????
--------------------------------------------------------------------*/
@@ -380,7 +370,7 @@ SwDocShell::SwDocShell( SfxObjectCreateMode eMode ) :
}
/*--------------------------------------------------------------------
- Beschreibung: Ctor / Dtor
+ Description: Ctor / Dtor
--------------------------------------------------------------------*/
@@ -399,7 +389,7 @@ SwDocShell::SwDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
}
/*--------------------------------------------------------------------
- Beschreibung: Ctor / Dtor
+ Description: Ctor / Dtor
--------------------------------------------------------------------*/
@@ -418,7 +408,7 @@ SwDocShell::SwDocShell( SwDoc *pD, SfxObjectCreateMode eMode ):
}
/*--------------------------------------------------------------------
- Beschreibung: Dtor
+ Description: Dtor
--------------------------------------------------------------------*/
@@ -436,30 +426,28 @@ SwDocShell::SwDocShell( SwDoc *pD, SfxObjectCreateMode eMode ):
RemoveLink();
delete pFontList;
- // wir als BroadCaster werden auch unser eigener Listener
- // (fuer DocInfo/FileNamen/....)
+ // we, as BroadCaster also become our own Listener
+ // (for DocInfo/FileNames/....)
EndListening( *this );
SvxColorTableItem* pColItem = (SvxColorTableItem*)GetItem(SID_COLOR_TABLE);
- // wird nur die DocInfo fuer den Explorer gelesen, ist das Item nicht da
+ // when only DocInfo is read for the Explorer, the Item is not there
if(pColItem)
{
XColorTable* pTable = pColItem->GetColorTable();
- // wurde eine neue Table angelegt, muss sie auch geloescht werden.
+ // when a new Table was created, it has to be deleted as well.
if((void*)pTable != (void*)(XColorTable::GetStdColorTable()) )
delete pTable;
}
delete pOLEChildList;
}
-/* -----------------------------10.09.2001 15:59------------------------------
- ---------------------------------------------------------------------------*/
void SwDocShell::Init_Impl()
{
SetPool(&SW_MOD()->GetPool());
SetBaseModel(new SwXTextDocument(this));
- // wir als BroadCaster werden auch unser eigener Listener
- // (fuer DocInfo/FileNamen/....)
+ // we, as BroadCaster also become our own Listener
+ // (for DocInfo/FileNames/....)
StartListening( *this );
//position of the "Automatic" style filter for the stylist (app.src)
SetAutoStyleFilterIndex(3);
@@ -468,7 +456,7 @@ void SwDocShell::Init_Impl()
SetMapUnit( MAP_TWIP );
}
/*--------------------------------------------------------------------
- Beschreibung: AddLink
+ Description: AddLink
--------------------------------------------------------------------*/
@@ -483,18 +471,18 @@ void SwDocShell::AddLink()
}
else
pDoc->acquire();
- pDoc->SetDocShell( this ); // am Doc den DocShell-Pointer setzen
+ pDoc->SetDocShell( this ); // set the DocShell-Pointer for Doc
uno::Reference< text::XTextDocument > xDoc(GetBaseModel(), uno::UNO_QUERY);
((SwXTextDocument*)xDoc.get())->Reactivate(this);
SetPool(&pDoc->GetAttrPool());
- // am besten erst wenn eine sdbcx::View erzeugt wird !!!
+ // most suitably not until a sdbcx::View is created!!!
pDoc->SetOle2Link(LINK(this, SwDocShell, Ole2ModifiedHdl));
}
/*--------------------------------------------------------------------
- Beschreibung: neue FontList erzeugen Aenderung Drucker
+ Description: create new FontList Change Printer
--------------------------------------------------------------------*/
@@ -503,7 +491,7 @@ void SwDocShell::UpdateFontList()
if(!bInUpdateFontList)
{
bInUpdateFontList = true;
- ASSERT(pDoc, "Kein Doc keine FontList");
+ OSL_ENSURE(pDoc, "No Doc no FontList");
if( pDoc )
{
delete pFontList;
@@ -515,13 +503,13 @@ void SwDocShell::UpdateFontList()
}
/*--------------------------------------------------------------------
- Beschreibung: RemoveLink
+ Description: RemoveLink
--------------------------------------------------------------------*/
void SwDocShell::RemoveLink()
{
- // Uno-Object abklemmen
+ // disconnect Uno-Object
uno::Reference< text::XTextDocument > xDoc(GetBaseModel(), uno::UNO_QUERY);
((SwXTextDocument*)xDoc.get())->Invalidate();
aFinishedTimer.Stop();
@@ -537,24 +525,24 @@ void SwDocShell::RemoveLink()
pDoc->SetDocShell( 0 );
if( !nRefCt )
delete pDoc;
- pDoc = 0; // wir haben das Doc nicht mehr !!
+ pDoc = 0; // we don't have the Doc anymore!!
}
}
void SwDocShell::InvalidateModel()
{
- // Uno-Object abklemmen
+ // disconnect Uno-Object
uno::Reference< text::XTextDocument > xDoc(GetBaseModel(), uno::UNO_QUERY);
((SwXTextDocument*)xDoc.get())->Invalidate();
}
void SwDocShell::ReactivateModel()
{
- // Uno-Object abklemmen
+ // disconnect Uno-Object
uno::Reference< text::XTextDocument > xDoc(GetBaseModel(), uno::UNO_QUERY);
((SwXTextDocument*)xDoc.get())->Reactivate(this);
}
/*--------------------------------------------------------------------
- Beschreibung: Laden, Default-Format
+ Description: Load, Default-Format
--------------------------------------------------------------------*/
@@ -565,14 +553,14 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium )
if( SfxObjectShell::Load( rMedium ))
{
RTL_LOGFILE_CONTEXT_TRACE( aLog, "after SfxInPlaceObject::Load" );
- if( pDoc ) // fuer Letzte Version !!
- RemoveLink(); // das existierende Loslassen
+ if( pDoc ) // for last version!!
+ RemoveLink(); // release the existing
- AddLink(); // Link setzen und Daten updaten !!
+ AddLink(); // set Link and update Data!!
- // Das Laden
- // fuer MD
- ASSERT( !mxBasePool.is(), "wer hat seinen Pool nicht zerstoert?" );
+ // Loading
+ // for MD
+ OSL_ENSURE( !mxBasePool.is(), "who hasn't destroyed their Pool?" );
mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
if(GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
{
@@ -584,9 +572,6 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium )
sal_uInt32 nErr = ERR_SWG_READ_ERROR;
switch( GetCreateMode() )
{
-// case SFX_CREATE_MODE_INTERNAL:
-// nErr = 0;
-// break;
case SFX_CREATE_MODE_ORGANIZER:
{
@@ -603,12 +588,12 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium )
case SFX_CREATE_MODE_INTERNAL:
case SFX_CREATE_MODE_EMBEDDED:
{
- // fuer MWERKS (Mac-Compiler): kann nicht selbststaendig casten
+ // for MWERKS (Mac-Compiler): can't cast autonomously
SwTransferable::InitOle( this, *pDoc );
}
- // SfxProgress unterdruecken, wenn man Embedded ist
+ // suppress SfxProgress, when we are Embedded
SW_MOD()->SetEmbeddedLoadSave( sal_True );
- // kein break;
+ // no break;
case SFX_CREATE_MODE_STANDARD:
case SFX_CREATE_MODE_PREVIEW:
@@ -616,7 +601,7 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium )
Reader *pReader = ReadXML;
if( pReader )
{
- // die DocInfo vom Doc am DocShell-Medium setzen
+ // set Doc's DocInfo at DocShell-Medium
RTL_LOGFILE_CONTEXT_TRACE( aLog, "before ReadDocInfo" );
SwReader aRdr( rMedium, aEmptyStr, pDoc );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "before Read" );
@@ -637,15 +622,15 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium )
pDoc->set(IDocumentSettingAccess::GLOBAL_DOCUMENT, true);
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
- ASSERT( !this, "ohne Sw3Reader geht nichts" );
+ OSL_ENSURE( !this, "it won't do without Sw3Reader" );
#endif
}
break;
default:
- ASSERT( !this, "Load: new CreateMode?" );
+ OSL_ENSURE( !this, "Load: new CreateMode?" );
}
@@ -655,30 +640,19 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium )
SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
bRet = !IsError( nErr );
- // --> OD 2006-11-07 #i59688#
-// // StartFinishedLoading rufen.
-// if( bRet && !pDoc->IsInLoadAsynchron() &&
-// GetCreateMode() == SFX_CREATE_MODE_STANDARD )
-// StartLoadFinishedTimer();
if ( bRet && !pDoc->IsInLoadAsynchron() &&
GetCreateMode() == SFX_CREATE_MODE_STANDARD )
{
LoadingFinished();
}
- // <--
- // SfxProgress unterdruecken, wenn man Embedded ist
+ // suppress SfxProgress, when we are Embedded
SW_MOD()->SetEmbeddedLoadSave( sal_False );
}
return bRet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::LoadFrom" );
@@ -686,20 +660,19 @@ sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium )
if( pDoc )
RemoveLink();
- AddLink(); // Link setzen und Daten updaten !!
+ AddLink(); // set Link and update Data!!
do { // middle check loop
sal_uInt32 nErr = ERR_SWG_READ_ERROR;
- //const String& rNm = pStor->GetName();
String aStreamName;
aStreamName = String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("styles.xml"));
uno::Reference < container::XNameAccess > xAccess( rMedium.GetStorage(), uno::UNO_QUERY );
if ( xAccess->hasByName( aStreamName ) && rMedium.GetStorage()->isStreamElement( aStreamName ) )
{
- // Das Laden
+ // Loading
SwWait aWait( *this, sal_True );
{
- ASSERT( !mxBasePool.is(), "wer hat seinen Pool nicht zerstoert?" );
+ OSL_ENSURE( !mxBasePool.is(), "who hasn't destroyed their Pool?" );
mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
if( ReadXML )
{
@@ -712,25 +685,7 @@ sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium )
}
else
{
- DBG_ERROR("Code removed!");
- /*
- //TODO/LATER: looks like some binary stuff?!
- // sollte es sich um eine 2. Vrolage handeln ??
- if( SvStorage::IsStorageFile( rNm ) )
- break;
-
- const SfxFilter* pFltr = SwIoSystem::GetFileFilter( rNm, aEmptyStr );
- if( !pFltr || !pFltr->GetUserData().EqualsAscii( FILTER_SWG ))
- break;
-
- SfxMedium aMed( rNm, STREAM_STD_READ, sal_False );
- if( 0 == ( nErr = aMed.GetInStream()->GetError() ) )
- {
- SwWait aWait( *this, sal_True );
- SwReader aRead( aMed, rNm, pDoc );
- nErr = aRead.Read( *ReadSwg );
- }
- */
+ OSL_ENSURE(false, "Code removed!");
}
SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
@@ -746,7 +701,7 @@ sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium )
void SwDocShell::SubInitNew()
{
- ASSERT( !mxBasePool.is(), "wer hat seinen Pool nicht zerstoert?" );
+ OSL_ENSURE( !mxBasePool.is(), "who hasn't destroyed their Pool?" );
mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
UpdateFontList();
InitDraw();
@@ -765,8 +720,8 @@ void SwDocShell::SubInitNew()
0, 0, 0 };
if(!bWeb)
{
- nRange[ (sizeof(nRange)/sizeof(nRange[0])) - 3 ] = RES_PARATR_TABSTOP;
- nRange[ (sizeof(nRange)/sizeof(nRange[0])) - 2 ] = RES_PARATR_HYPHENZONE;
+ nRange[ (SAL_N_ELEMENTS(nRange)) - 3 ] = RES_PARATR_TABSTOP;
+ nRange[ (SAL_N_ELEMENTS(nRange)) - 2 ] = RES_PARATR_HYPHENZONE;
}
SfxItemSet aDfltSet( pDoc->GetAttrPool(), nRange );
@@ -816,3 +771,5 @@ void SwDocShell::SubInitNew()
IDocumentDeviceAccess* SwDocShell::getIDocumentDeviceAccess() { return pDoc; }
const IDocumentSettingAccess* SwDocShell::getIDocumentSettingAccess() const { return pDoc; }
IDocumentChartDataProviderAccess* SwDocShell::getIDocumentChartDataProviderAccess() { return pDoc; }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index 2e38cde62c52..066838575676 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,19 +83,13 @@
#include "app.hrc"
#include <fmtui.hrc>
#include "swabstdlg.hxx"
-// --> OD 2008-03-27 #refactorlists#
+
#include <list.hxx>
-// <--
#include <paratr.hxx> //#outline level,add by zhaojianwei
using namespace ::com::sun::star;
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
{
SfxWhichIter aIter(rSet);
@@ -121,14 +116,13 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
while (nWhich)
{
- // aktuelle Vorlage zu jeder Familie ermitteln
- //
+ // determine current template to every family
String aName;
switch (nWhich)
{
case SID_STYLE_APPLY:
- {//hier wird die Vorlage und ihre Familie an die StyleBox
- //uebergeben, damit diese Familie angezeigt wird
+ {// here the template and its family are passed to the StyleBox
+ // so that this family is being showed
if(pShell->IsFrmSelected())
{
SwFrmFmt* pFmt = pShell->GetCurFrmFmt();
@@ -260,7 +254,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
break;
default:
- DBG_ERROR( "Invalid SlotId");
+ OSL_ENSURE(false, "Invalid SlotId");
}
nWhich = aIter.NextWhich();
}
@@ -268,7 +262,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
/*--------------------------------------------------------------------
- Beschreibung: StyleSheet-Requeste auswerten
+ Description: evaluate StyleSheet-Requests
--------------------------------------------------------------------*/
@@ -328,7 +322,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
uno::Reference< beans::XPropertySet > xInfo;
xStyles->getByName( pNameItem->GetValue() ) >>= xInfo;
::rtl::OUString aUIName;
- xInfo->getPropertyValue( ::rtl::OUString::createFromAscii("DisplayName") ) >>= aUIName;
+ xInfo->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName")) ) >>= aUIName;
if ( aUIName.getLength() )
rReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aUIName ) );
}
@@ -386,7 +380,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
}
else
{
- ASSERT( pArgs->Count(), "SfxBug ItemSet ist leer");
+ OSL_ENSURE( pArgs->Count(), "SfxBug ItemSet is empty");
SwWrtShell* pShell = GetWrtShell();
if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ))
@@ -468,7 +462,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
nRet = Delete(aParam, nFamily);
break;
case SID_STYLE_APPLY:
- // Shellwechsel in ApplyStyles
+ // Shell-switch in ApplyStyles
nRet = ApplyStyles(aParam, nFamily, pActShell, rReq.GetModifier() );
break;
case SID_STYLE_WATERCAN:
@@ -488,7 +482,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
break;
default:
- DBG_ERROR( "Falsche Slot-Id");
+ OSL_ENSURE(false, "Invalid SlotId");
}
rReq.Done();
@@ -500,7 +494,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
if(bSetReturn)
{
- if(rReq.IsAPI()) // Basic bekommt nur sal_True oder sal_False
+ if(rReq.IsAPI()) // Basic only gets TRUE or FALSE
rReq.SetReturnValue(SfxUInt16Item(nSlot, nRet !=0));
else
rReq.SetReturnValue(SfxUInt16Item(nSlot, nRet));
@@ -509,7 +503,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
}
/*--------------------------------------------------------------------
- Beschreibung: Edit
+ Description: Edit
--------------------------------------------------------------------*/
@@ -517,7 +511,7 @@ sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uIn
sal_Bool bNew, sal_Bool bColumn, SwWrtShell* pActShell,
sal_Bool bBasic )
{
- ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
+ OSL_ENSURE(GetWrtShell(), "No Shell, no Styles");
SfxStyleSheetBase *pStyle = 0;
sal_uInt16 nRet = nMask;
@@ -532,7 +526,7 @@ sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uIn
pStyle = &mxBasePool->Make( rName, (SfxStyleFamily)nFamily, nMask );
- // die aktuellen als Parent setzen
+ // set the current one as Parent
SwDocStyleSheet* pDStyle = (SwDocStyleSheet*)pStyle;
switch( nFamily )
{
@@ -618,38 +612,23 @@ sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uIn
else
{
pStyle = mxBasePool->Find( rName, (SfxStyleFamily)nFamily );
- ASSERT(pStyle, "Vorlage nicht gefunden");
+ OSL_ENSURE(pStyle, "Vorlage nicht gefunden");
}
if(!pStyle)
return sal_False;
- // Dialoge zusammenstoepseln
- //
+ // put dialogues together
rtl::Reference< SwDocStyleSheet > xTmp( new SwDocStyleSheet( *(SwDocStyleSheet*)pStyle ) );
if( SFX_STYLE_FAMILY_PARA == nFamily )
{
SfxItemSet& rSet = xTmp->GetItemSet();
::SwToSfxPageDescAttr( rSet );
- // erstmal nur eine Null
+ // firstly only a Zero
rSet.Put(SwBackgroundDestinationItem(SID_PARA_BACKGRND_DESTINATION, 0));
- // --> OD 2008-02-13 #newlistlevelattrs#
// merge list level indent attributes into the item set if needed
xTmp->MergeIndentAttrsOfListStyle( rSet );
- // <--
}
-/* else if( SFX_STYLE_FAMILY_FRAME == nFamily )
- {
- // Auskommentiert wegen Bug #45776 (per default keine Breite&Groesse in Rahmenvorlagen)
- SfxItemSet& rSet = aTmp.GetItemSet();
- if( SFX_ITEM_SET != rSet.GetItemState( RES_FRM_SIZE ))
- {
- // dann sollten wir spaetesten hier eines anlegen
- SwFrmValid aFrmDefValues;
- rSet.Put( SwFmtFrmSize( ATT_VAR_SIZE, aFrmDefValues.nWidth,
- aFrmDefValues.nHeight ));
- }
- }*/
else if( SFX_STYLE_FAMILY_CHAR == nFamily )
{
SfxItemSet& rSet = xTmp->GetItemSet();
@@ -664,7 +643,7 @@ sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uIn
}
if (!bBasic)
{
- // vor dem Dialog wird der HtmlMode an der DocShell versenkt
+ // prior to the dialog the HtmlMode at the DocShell is being sunk
sal_uInt16 nHtmlMode = ::GetHtmlMode(this);
// In HTML mode, we do not always have a printer. In order to show
@@ -679,16 +658,16 @@ sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uIn
FieldUnit eMetric = ::GetDfltMetric(0 != (HTMLMODE_ON&nHtmlMode));
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateTemplateDialog( DLG_TEMPLATE_BASE,
0, *(xTmp.get()), nFamily, bColumn,
pActShell ? pActShell : pWrtShell, bNew);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
GetWrtShell()->StartAllAction();
- // nur bei Absatz-Vorlagen die Maske neu setzen
+ // newly set the mask only with paragraph-templates
if( bNew )
{
nRet = SFX_STYLE_FAMILY_PARA == pStyle->GetFamily()
@@ -702,11 +681,9 @@ sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uIn
{
SfxItemSet aSet( *pDlg->GetOutputItemSet() );
::SfxToSwPageDescAttr( *GetWrtShell(), aSet );
- // --> OD 2008-02-12 #newlistlevelattrs#
// reset indent attributes at paragraph style, if a list style
// will be applied and no indent attributes will be applied.
xTmp->SetItemSet( aSet, true );
- // <--
}
else
{
@@ -746,10 +723,9 @@ sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uIn
if( bNew )
mxBasePool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *xTmp.get() ) );
- // JP 19.09.97:
- // Dialog vorm EndAction zerstoeren - bei Seitenvorlagen kann
- // muss der ItemSet zerstoert werden, damit die Cursor aus den
- // Kopf-/Fusszeilen entfernt werden. Sonst kommts zu GPFs!!!
+ // Destroy dialog before EndAction - with page-templates the
+ // ItemSet must be destroyed, so that the cursors get removed
+ // from Headers/Footers. Otherwise "GPF" happen!!!
delete pDlg;
pDoc->SetModified();
@@ -764,8 +740,6 @@ sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uIn
{
if( bNew )
{
- // #116530#
- //pBasePool->Erase( &aTmp );
GetWrtShell()->Undo(1);
pDoc->GetIDocumentUndoRedo().ClearRedo();
}
@@ -777,12 +751,12 @@ sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uIn
}
else
{
- // vor dem Dialog wird der HtmlMode an der DocShell versenkt
+ // prior to the dialog the HtmlMode at the DocShell is being sunk
PutItem(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(this)));
GetWrtShell()->StartAllAction();
- // nur bei Absatz-Vorlagen die Maske neu setzen
+ // newly set the mask only with paragraph-templates
if( bNew )
{
nRet = SFX_STYLE_FAMILY_PARA == pStyle->GetFamily()
@@ -829,7 +803,7 @@ sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uIn
}
/*--------------------------------------------------------------------
- Beschreibung: Delete
+ Description: Delete
--------------------------------------------------------------------*/
@@ -839,7 +813,7 @@ sal_uInt16 SwDocShell::Delete(const String &rName, sal_uInt16 nFamily)
if(pStyle)
{
- ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
+ OSL_ENSURE(GetWrtShell(), "No Shell, no Styles");
GetWrtShell()->StartAllAction();
mxBasePool->Remove(pStyle);
@@ -851,7 +825,7 @@ sal_uInt16 SwDocShell::Delete(const String &rName, sal_uInt16 nFamily)
}
/*--------------------------------------------------------------------
- Beschreibung: Vorlage anwenden
+ Description: apply template
--------------------------------------------------------------------*/
@@ -861,13 +835,14 @@ sal_uInt16 SwDocShell::ApplyStyles(const String &rName, sal_uInt16 nFamily,
SwDocStyleSheet* pStyle =
(SwDocStyleSheet*)mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
- ASSERT(pStyle, "Wo ist der StyleSheet");
+ OSL_ENSURE(pStyle, "Where's the StyleSheet");
+
if(!pStyle)
return sal_False;
SwWrtShell *pSh = pShell ? pShell : GetWrtShell();
- ASSERT( pSh, "Keine Shell, keine Styles");
+ OSL_ENSURE( pSh, "No Shell, no Styles");
pSh->StartAllAction();
@@ -902,18 +877,15 @@ sal_uInt16 SwDocShell::ApplyStyles(const String &rName, sal_uInt16 nFamily,
}
case SFX_STYLE_FAMILY_PSEUDO:
{
- // --> OD 2008-02-08 #newlistlevelattrs#
// reset indent attribute on applying list style
- // --> OD 2008-03-17 #refactorlists#
// continue list of list style
const SwNumRule* pNumRule = pStyle->GetNumRule();
const String sListIdForStyle =pNumRule->GetDefaultListId();
pSh->SetCurNumRule( *pNumRule, false, sListIdForStyle, true );
- // <--
break;
}
default:
- DBG_ERROR("Unbekannte Familie");
+ OSL_ENSURE(false, "Unknown family");
}
pSh->EndAllAction();
@@ -921,20 +893,22 @@ sal_uInt16 SwDocShell::ApplyStyles(const String &rName, sal_uInt16 nFamily,
}
/*--------------------------------------------------------------------
- Beschreibung: Giesskanne starten
+ Description: start watering-can
--------------------------------------------------------------------*/
sal_uInt16 SwDocShell::DoWaterCan(const String &rName, sal_uInt16 nFamily)
{
- ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
+ OSL_ENSURE(GetWrtShell(), "No Shell, no Styles");
SwEditWin& rEdtWin = pView->GetEditWin();
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
sal_Bool bWaterCan = !(pApply && pApply->eType != 0);
+
if( !rName.Len() )
bWaterCan = sal_False;
+
SwApplyTemplate aTemplate;
aTemplate.eType = nFamily;
@@ -943,7 +917,8 @@ sal_uInt16 SwDocShell::DoWaterCan(const String &rName, sal_uInt16 nFamily)
SwDocStyleSheet* pStyle =
(SwDocStyleSheet*)mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
- ASSERT(pStyle, "Wo ist der StyleSheet");
+ OSL_ENSURE (pStyle, "Where's the StyleSheet");
+
if(!pStyle) return nFamily;
switch(nFamily)
@@ -965,27 +940,26 @@ sal_uInt16 SwDocShell::DoWaterCan(const String &rName, sal_uInt16 nFamily)
break;
default:
- DBG_ERROR( "Unbekannte Familie");
+ OSL_ENSURE(false, "Unknown family");
}
}
else
aTemplate.eType = 0;
- // Template anwenden
pView->GetEditWin().SetApplyTemplate(aTemplate);
return nFamily;
}
/*--------------------------------------------------------------------
- Beschreibung: Vorlage Updaten
+ Description: update template
--------------------------------------------------------------------*/
sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell)
{
SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell();
- ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
+ OSL_ENSURE(GetWrtShell(), "No Shell, no Styles");
SwDocStyleSheet* pStyle =
(SwDocStyleSheet*)mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
@@ -1007,8 +981,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWr
GetWrtShell()->StartUndo(UNDO_INSFMTATTR, &aRewriter);
GetWrtShell()->FillByEx(pColl);
- // Vorlage auch anwenden, um harte Attributierung
- // zu entfernen
+ // also apply template to remove hard set attributes
GetWrtShell()->SetTxtFmtColl( pColl );
GetWrtShell()->EndUndo();
GetWrtShell()->EndAllAction();
@@ -1031,8 +1004,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWr
pFrm->SetFmtAttr( aSet );
- // Vorlage auch anwenden, um harte Attributierung
- // zu entfernen
+ // also apply template to remove hard set attributes
pCurrWrtShell->SetFrmFmt( pFrm, sal_True );
pCurrWrtShell->EndAllAction();
}
@@ -1045,8 +1017,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWr
{
pCurrWrtShell->StartAllAction();
pCurrWrtShell->FillByEx(pChar);
- // Vorlage auch anwenden, um harte Attributierung
- // zu entfernen
+ // also apply template to remove hard set attributes
pCurrWrtShell->EndAllAction();
}
@@ -1059,10 +1030,9 @@ sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWr
0 != ( pCurRule = pCurrWrtShell->GetCurNumRule() ))
{
SwNumRule aRule( *pCurRule );
- // --> OD 2008-07-08 #i91400#
+ // #i91400#
aRule.SetName( pStyle->GetNumRule()->GetName(),
*(pCurrWrtShell->GetDoc()) );
- // <--
pCurrWrtShell->ChgNumRuleFmts( aRule );
}
}
@@ -1072,7 +1042,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWr
}
/*--------------------------------------------------------------------
- Beschreibung: NewByExample
+ Description: NewByExample
--------------------------------------------------------------------*/
@@ -1084,8 +1054,8 @@ sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily,
rName, (SfxStyleFamily)nFamily );
if(!pStyle)
{
- // JP 07.07.95: behalte die akt. Maske vom PI bei, dadurch werden
- // neue sofort in den sichtbaren Bereich einsortiert
+ // preserve the current mask of PI, then the new one is
+ // immediately merged with the viewable area
if( SFXSTYLEBIT_ALL == nMask || SFXSTYLEBIT_USED == nMask )
nMask = SFXSTYLEBIT_USERDEF;
else
@@ -1104,11 +1074,10 @@ sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily,
{
pCurrWrtShell->StartAllAction();
pCurrWrtShell->FillByEx(pColl);
- // Vorlage auch anwenden, um harte Attributierung
- // zu entfernen
+ // also apply template to remove hard set attributes
pColl->SetDerivedFrom(pCurrWrtShell->GetCurTxtFmtColl());
- // setze die Maske noch an der Collection:
+ // set the mask at the Collection:
sal_uInt16 nId = pColl->GetPoolFmtId() & 0x87ff;
switch( nMask & 0x0fff )
{
@@ -1151,23 +1120,8 @@ sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily,
SwFrmFmt* pFFmt = pCurrWrtShell->GetCurFrmFmt();
pFrm->SetDerivedFrom( pFFmt );
- // JP 10.06.98: nur automatische Orientierungen uebernehmen
-/* #61359# jetzt auch wieder alle Orientierungen
- const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == aSet.GetItemState( RES_VERT_ORIENT,
- sal_False, &pItem ) &&
- text::VertOrientation::NONE == ((SwFmtVertOrient*)pItem)->GetVertOrient())
- aSet.ClearItem( RES_VERT_ORIENT );
-
- if( SFX_ITEM_SET == aSet.GetItemState( RES_HORI_ORIENT,
- sal_False, &pItem ) &&
- text::HoriOrientation::NONE == ((SwFmtHoriOrient*)pItem)->GetHoriOrient())
- aSet.ClearItem( RES_HORI_ORIENT );
- */
-
pFrm->SetFmtAttr( aSet );
- // Vorlage auch anwenden, um harte Attributierung
- // zu entfernen
+ // also apply template to remove hard set attributes
pCurrWrtShell->SetFrmFmt( pFrm );
pCurrWrtShell->EndAllAction();
}
@@ -1201,12 +1155,12 @@ sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily,
pCurrWrtShell->GetDoc()->CopyPageDesc( rSrc, rDest );
- // PoolId darf NIE kopiert werden!
+ // PoolId must NEVER be copied!
rDest.SetPoolFmtId( nPoolId );
rDest.SetPoolHelpId( nHId );
rDest.SetPoolHlpFileId( nHFId );
- // werden Kopf-/Fusszeilen angelegt, so gibt es kein Undo mehr!
+ // when Headers/Footers are created, there is no Undo anymore!
pCurrWrtShell->GetDoc()->GetIDocumentUndoRedo().DelAllUndoObj();
pCurrWrtShell->EndAllAction();
@@ -1219,10 +1173,9 @@ sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily,
SwNumRule aRule( *pCurrWrtShell->GetCurNumRule() );
String sOrigRule( aRule.GetName() );
- // --> OD 2008-07-08 #i91400#
+ // #i91400#
aRule.SetName( pStyle->GetNumRule()->GetName(),
*(pCurrWrtShell->GetDoc()) );
- // <--
pCurrWrtShell->ChgNumRuleFmts( aRule );
pCurrWrtShell->ReplaceNumRule( sOrigRule, aRule.GetName() );
@@ -1248,23 +1201,21 @@ void SwDocShell::LoadStyles( SfxObjectShell& rSource )
--------------------------------------------------*/
void SwDocShell::_LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrentDocument )
{
-/* [Beschreibung]
-
- Diese Methode wird vom SFx gerufen, wenn aus einer Dokument-Vorlage
- Styles nachgeladen werden sollen. Bestehende Styles soll dabei
- "uberschrieben werden. Das Dokument mu"s daher neu formatiert werden.
- Daher werden die Applikationen in der Regel diese Methode "uberladen
- und in ihrer Implementierung die Implementierung der Basisklasse
- rufen.
+/* [Description]
+
+ This method is called by SFx if Styles have to be reloaded from a
+ document-template. Existing Styles should be overwritten by that.
+ That's why the document has to be reformatted. Therefore applications
+ will usually overload this method and call the baseclass' implementation
+ in their implementation.
*/
- // ist die Source unser Document, dann uebernehmen wir das
- // abpruefen selbst (wesentlich schneller und laeuft nicht ueber
- // die Kruecke SfxStylePool
+ // When the source is our document, we do the checking ourselves
+ // (much quicker and doesn't use the crutch StxStylePool).
if( rSource.ISA( SwDocShell ))
{
- //JP 28.05.99: damit die Kopf-/Fusszeilen nicht den fixen Inhalt
- // der Vorlage erhalten, einmal alle FixFelder der
- // Source aktualisieren
+ // in order for the Headers/Footers not to get the fixed content
+ // of the template, update all the Source's
+ // FixFields once.
if(!bPreserveCurrentDocument)
((SwDocShell&)rSource).pDoc->SetFixFields(false, NULL);
if( pWrtShell )
@@ -1279,8 +1230,8 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrent
pDoc->ReplaceStyles( *((SwDocShell&)rSource).pDoc );
if( !bModified && pDoc->IsModified() && !pView )
{
- // die View wird spaeter angelegt, ueberschreibt aber das
- // Modify-Flag. Per Undo ist sowieso nichts mehr zu machen
+ // the View is created later, but overwrites the Modify-Flag.
+ // Undo doesn't work anymore anyways.
pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
}
}
@@ -1295,18 +1246,13 @@ void SwDocShell::FormatPage( const String& rPage, sal_Bool bColumn, SwWrtShell*
Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, sal_False, bColumn, pActShell);
}
-Bitmap SwDocShell::GetStyleFamilyBitmap( SfxStyleFamily eFamily, BmpColorMode eColorMode )
+Bitmap SwDocShell::GetStyleFamilyBitmap( SfxStyleFamily eFamily )
{
if( SFX_STYLE_FAMILY_PSEUDO == eFamily )
- {
- if ( eColorMode == BMP_COLOR_NORMAL )
- return Bitmap( SW_RES( BMP_STYLES_FAMILY_NUM ));
- else
- return Bitmap( SW_RES( BMP_STYLES_FAMILY_NUM_HC ));
- }
-
- return SfxObjectShell::GetStyleFamilyBitmap( eFamily, eColorMode );
+ return Bitmap( SW_RES( BMP_STYLES_FAMILY_NUM ));
+ return SfxObjectShell::GetStyleFamilyBitmap( eFamily );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index 71a52cb582f5..5012f2dc45df 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,15 +38,12 @@
#include <unotools/syslocale.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/numitem.hxx>
-// --> OD 2008-02-13 #newlistlevelattrs#
#include <editeng/lrspitem.hxx>
-// <--
#include <fmtcol.hxx>
#include <uitool.hxx>
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <docsh.hxx>
-#include <errhdl.hxx>
#include <frmfmt.hxx>
#include <charfmt.hxx>
#include <poolfmt.hxx>
@@ -67,12 +65,10 @@
#include <numrule.hxx>
#include <fmthdft.hxx>
#include <svx/svxids.hrc>
-// --> OD 2008-02-12 #newlistlevelattrs#
#include <SwRewriter.hxx>
-// <--
-// MD 06.02.95: Die Formatnamen in der Liste aller Namen haben als
-// erstes Zeichen die Familie:
+// The Format names in the list of all names have the
+// following family as their first character:
#define cCHAR (sal_Unicode)'c'
#define cPARA (sal_Unicode)'p'
@@ -80,11 +76,11 @@
#define cPAGE (sal_Unicode)'g'
#define cNUMRULE (sal_Unicode)'n'
-// Dieses Zeichen wird bei der Herausgabe der Namen wieder entfernt und
-// die Familie wird neu generiert.
+// At the names' publication, this character is removed again and the
+// family is newly generated.
-// Ausserdem gibt es jetzt zusaetzlich das Bit bPhysical. Ist dieses Bit
-// sal_True, werden die Pool-Formatnamen NICHT mit eingetragen.
+// In addition now there is the Bit bPhysical. In case this Bit is
+// TRUE, the Pool-Formatnames are not being submitted.
class SwImplShellAction
{
@@ -122,8 +118,8 @@ SwImplShellAction::~SwImplShellAction()
}
/*--------------------------------------------------------------------
- Beschreibung: SwCharFormate finden/anlegen
- evtl. Style fuellen
+ Description: find/create SwCharFormate
+ possibly fill Style
--------------------------------------------------------------------*/
SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
@@ -138,12 +134,12 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
if( !pFmt && rName == *SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
RES_POOLCOLL_TEXT_BEGIN ] )
{
- // Standard-Zeichenvorlage
+ // Standard-Character template
pFmt = (SwCharFmt*)rDoc.GetDfltCharFmt();
}
if( !pFmt && bCreate )
- { // Pool abklappern
+ { // explore Pool
const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
if(nId != USHRT_MAX)
pFmt = rDoc.GetCharFmtFromPool(nId);
@@ -168,8 +164,8 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
/*--------------------------------------------------------------------
- Beschreibung: ParaFormate finden/erzeugen
- Style fuellen
+ Description: find/create ParaFormats
+ fill Style
--------------------------------------------------------------------*/
SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
@@ -183,7 +179,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
{
pColl = rDoc.FindTxtFmtCollByName( rName );
if( !pColl && bCreate )
- { // Pool abklappern
+ { // explore Pool
const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
if(nId != USHRT_MAX)
pColl = rDoc.GetTxtCollFromPool(nId);
@@ -211,7 +207,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
/*--------------------------------------------------------------------
- Beschreibung: Rahmenformate
+ Description: Border formats
--------------------------------------------------------------------*/
@@ -225,7 +221,7 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
{
pFmt = rDoc.FindFrmFmtByName( rName );
if( !pFmt && bCreate )
- { // Pool abklappern
+ { // explore Pool
const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
if(nId != USHRT_MAX)
pFmt = rDoc.GetFrmFmtFromPool(nId);
@@ -249,7 +245,7 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
}
/*--------------------------------------------------------------------
- Beschreibung: Seitendescriptoren
+ Description: Page descriptors
--------------------------------------------------------------------*/
@@ -324,7 +320,6 @@ sal_uInt16 lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam,
{
if( rLst.Count() )
{
- // suchen
String sSrch( ' ' );
switch( eFam )
{
@@ -364,7 +359,7 @@ sal_Bool FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam )
/*--------------------------------------------------------------------
- Beschreibung: Einfuegen von Strings in die Liste der Vorlagen
+ Description: Add Strings to the list of templates
--------------------------------------------------------------------*/
@@ -384,7 +379,7 @@ void SwPoolFmtList::Append( char cChar, const String& rStr )
}
/*--------------------------------------------------------------------
- Beschreibung: Liste kompletti loeschen
+ Description: Erase the list completely
--------------------------------------------------------------------*/
@@ -393,11 +388,9 @@ void SwPoolFmtList::Erase()
DeleteAndDestroy( 0, Count() );
}
-/* */
-
/*--------------------------------------------------------------------
- Beschreibung: UI-seitige implementierung von StyleSheets
- greift auf die Core-Engine zu
+ Description: UI-sided implementation of StyleSheets
+ uses the Core-Engine
--------------------------------------------------------------------*/
SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
@@ -417,9 +410,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
aCoreSet(GetPool().GetPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
RES_PARATR_BEGIN, RES_PARATR_END - 1,
- // --> OD 2008-02-25 #refactorlists#
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1,
- // <--
RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
SID_ATTR_PAGE, SID_ATTR_PAGE_EXT1,
@@ -461,7 +452,7 @@ SwDocStyleSheet::SwDocStyleSheet( const SwDocStyleSheet& rOrg) :
}
/*--------------------------------------------------------------------
- Beschreibung: Zuruecksetzen
+ Description: Reset
--------------------------------------------------------------------*/
@@ -474,7 +465,7 @@ void SwDocStyleSheet::Reset()
}
/*--------------------------------------------------------------------
- Beschreibung: virtuelle Methoden
+ Description: virtual methods
--------------------------------------------------------------------*/
@@ -482,7 +473,7 @@ const String& SwDocStyleSheet::GetParent() const
{
if( !bPhysical )
{
- // dann pruefe, ob schon im Doc vorhanden
+ // check if it's already in document
SwFmt* pFmt = 0;
SwGetPoolIdFromName eGetType;
switch(nFamily)
@@ -505,11 +496,11 @@ const String& SwDocStyleSheet::GetParent() const
case SFX_STYLE_FAMILY_PAGE:
case SFX_STYLE_FAMILY_PSEUDO:
default:
- return aEmptyStr; // es gibt keinen Parent
+ return aEmptyStr; // there's no parent
}
String sTmp;
- if( !pFmt ) // noch nicht vorhanden, also dflt. Parent
+ if( !pFmt ) // not yet there, so default Parent
{
sal_uInt16 i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType );
i = ::GetPoolParent( i );
@@ -529,7 +520,7 @@ const String& SwDocStyleSheet::GetParent() const
}
/*--------------------------------------------------------------------
- Beschreibung: Nachfolger
+ Description: Follower
--------------------------------------------------------------------*/
@@ -544,7 +535,7 @@ const String& SwDocStyleSheet::GetFollow() const
}
/*--------------------------------------------------------------------
- Beschreibung: Welche Verkettung ist moeglich
+ Description: What Linkage is possible
--------------------------------------------------------------------*/
@@ -558,13 +549,13 @@ sal_Bool SwDocStyleSheet::HasFollowSupport() const
case SFX_STYLE_FAMILY_CHAR :
case SFX_STYLE_FAMILY_PSEUDO: return sal_False;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
}
return sal_False;
}
/*--------------------------------------------------------------------
- Beschreibung: Parent ?
+ Description: Parent ?
--------------------------------------------------------------------*/
@@ -596,7 +587,7 @@ sal_Bool SwDocStyleSheet::HasClearParentSupport() const
}
/*--------------------------------------------------------------------
- Beschreibung: textuelle Beschreibung ermitteln
+ Description: determine textual description
--------------------------------------------------------------------*/
String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
{
@@ -667,7 +658,7 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
case SID_ATTR_AUTO_STYLE_UPDATE:
case SID_PARA_BACKGRND_DESTINATION:
case RES_PAGEDESC:
- //CTL no yet supported
+ //CTL not yet supported
case RES_CHRATR_CTL_FONT:
case RES_CHRATR_CTL_FONTSIZE:
case RES_CHRATR_CTL_LANGUAGE:
@@ -733,8 +724,8 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
}
pItem = aIter.NextItem();
}
- //Sonderbehandlung fuer Umburch, Seitenvorlage und Seitenoffset
- if(sBreak.Len() && !sModel.Len()) // wemm Model. dann ist Break ungueltig
+ // Special treatment for Break, Page template and Site offset
+ if(sBreak.Len() && !sModel.Len()) // when Model, break is invalid
{
if(aDesc.Len())
aDesc += sPlus;
@@ -758,9 +749,6 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
}
else if( SFX_STYLE_FAMILY_PSEUDO == nFamily )
{
-// if( pNumRule )
-// return pNumRule->GetName();
- //os: was sollte man bei Numerierungen schon anzeigen?
return aEmptyStr;
}
@@ -774,7 +762,7 @@ String SwDocStyleSheet::GetDescription()
}
/*--------------------------------------------------------------------
- Beschreibung: Namen setzen
+ Description: Set names
--------------------------------------------------------------------*/
@@ -796,7 +784,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
{
case SFX_STYLE_FAMILY_CHAR :
{
- ASSERT(pCharFmt, "SwCharFormat fehlt!");
+ OSL_ENSURE(pCharFmt, "SwCharFormat missing!");
if( pCharFmt && pCharFmt->GetName() != rStr )
{
pCharFmt->SetName( rStr );
@@ -806,7 +794,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
}
case SFX_STYLE_FAMILY_PARA :
{
- ASSERT(pColl, "Collektion fehlt!");
+ OSL_ENSURE(pColl, "Collection missing!");
if( pColl && pColl->GetName() != rStr )
{
if (pColl->GetName().Len() > 0)
@@ -820,7 +808,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
}
case SFX_STYLE_FAMILY_FRAME:
{
- ASSERT(pFrmFmt, "FrmFmt fehlt!");
+ OSL_ENSURE(pFrmFmt, "FrmFmt missing!");
if( pFrmFmt && pFrmFmt->GetName() != rStr )
{
if (pFrmFmt->GetName().Len() > 0)
@@ -833,13 +821,12 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
break;
}
case SFX_STYLE_FAMILY_PAGE :
- ASSERT(pDesc, "PageDesc fehlt!");
+ OSL_ENSURE(pDesc, "PageDesc missing!");
if( pDesc && pDesc->GetName() != rStr )
{
- //PageDesc setzen - mit vorherigem kopieren - ist fuer das
- //setzen des Namens wohl nicht notwendig. Deshalb erlauben
- //wir hier mal einen cast.
- // -> #116530#
+ // Set PageDesc - copy with earlier one - probably not
+ // necessary for setting the name. So here we allow a
+ // cast.
SwPageDesc aPageDesc(*((SwPageDesc*)pDesc));
String aOldName(aPageDesc.GetName());
@@ -849,16 +836,14 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
rDoc.GetIDocumentUndoRedo().DoUndo(aOldName.Len() > 0);
rDoc.ChgPageDesc(aOldName, aPageDesc);
rDoc.GetIDocumentUndoRedo().DoUndo(bDoesUndo);
- // <- #116530#
rDoc.SetModified();
bChg = sal_True;
}
break;
case SFX_STYLE_FAMILY_PSEUDO:
- ASSERT(pNumRule, "NumRule fehlt!");
+ OSL_ENSURE(pNumRule, "NumRule missing!");
- // -> #106897#
if (pNumRule)
{
String aOldName = pNumRule->GetName();
@@ -876,25 +861,23 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
}
else
{
- // --> OD 2008-07-08 #i91400#
+ // #i91400#
((SwNumRule*)pNumRule)->SetName( rStr, rDoc );
- // <--
rDoc.SetModified();
bChg = sal_True;
}
}
- // <- #106897#
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
}
if( bChg )
{
- rPool.First(); // interne Liste muss geupdatet werden
+ rPool.First(); // internal list has to be updated
rPool.Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *this ) );
SwEditShell* pSh = rDoc.GetEditShell();
if( pSh )
@@ -904,7 +887,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
}
/*--------------------------------------------------------------------
- Beschreibung: Ableitungshirachie
+ Description: hierarchy of deduction
--------------------------------------------------------------------*/
@@ -914,19 +897,19 @@ sal_Bool SwDocStyleSheet::SetParent( const String& rStr)
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR :
- ASSERT( pCharFmt, "SwCharFormat fehlt!" )
+ OSL_ENSURE( pCharFmt, "SwCharFormat missing!" );
if( 0 != ( pFmt = pCharFmt ) && rStr.Len() )
pParent = lcl_FindCharFmt(rDoc, rStr);
break;
case SFX_STYLE_FAMILY_PARA :
- ASSERT( pColl, "Collektion fehlt!")
+ OSL_ENSURE( pColl, "Collektion missing!");
if( 0 != ( pFmt = pColl ) && rStr.Len() )
pParent = lcl_FindParaFmt( rDoc, rStr );
break;
case SFX_STYLE_FAMILY_FRAME:
- ASSERT(pFrmFmt, "FrameFormat fehlt!");
+ OSL_ENSURE(pFrmFmt, "FrameFormat missing!");
if( 0 != ( pFmt = pFrmFmt ) && rStr.Len() )
pParent = lcl_FindFrmFmt( rDoc, rStr );
break;
@@ -935,7 +918,7 @@ sal_Bool SwDocStyleSheet::SetParent( const String& rStr)
case SFX_STYLE_FAMILY_PSEUDO:
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
}
sal_Bool bRet = sal_False;
@@ -959,7 +942,7 @@ sal_Bool SwDocStyleSheet::SetParent( const String& rStr)
}
/*--------------------------------------------------------------------
- Beschreibung: Nachfolger detzen
+ Description: Set Follower
--------------------------------------------------------------------*/
@@ -973,7 +956,7 @@ sal_Bool SwDocStyleSheet::SetFollow( const String& rStr)
{
case SFX_STYLE_FAMILY_PARA :
{
- ASSERT(pColl, "Collection fehlt!");
+ OSL_ENSURE(pColl, "Collection missing!");
if( pColl )
{
SwTxtFmtColl* pFollow = pColl;
@@ -986,7 +969,7 @@ sal_Bool SwDocStyleSheet::SetFollow( const String& rStr)
}
case SFX_STYLE_FAMILY_PAGE :
{
- ASSERT(pDesc, "PageDesc fehlt!");
+ OSL_ENSURE(pDesc, "PageDesc missing!");
if( pDesc )
{
const SwPageDesc* pFollowDesc = rStr.Len()
@@ -1009,14 +992,14 @@ sal_Bool SwDocStyleSheet::SetFollow( const String& rStr)
case SFX_STYLE_FAMILY_PSEUDO:
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknwown style family");
}
return sal_True;
}
/*--------------------------------------------------------------------
- Beschreibung: ueber Name und Family, Mask den ItemSet rausholen
+ Description: extract ItemSet to Name and Family, Mask
--------------------------------------------------------------------*/
SfxItemSet& SwDocStyleSheet::GetItemSet()
@@ -1028,8 +1011,9 @@ SfxItemSet& SwDocStyleSheet::GetItemSet()
{
case SFX_STYLE_FAMILY_CHAR:
{
- ASSERT(pCharFmt, "Wo ist das SwCharFmt");
+ OSL_ENSURE(pCharFmt, "Where's SwCharFmt");
aCoreSet.Put(pCharFmt->GetAttrSet());
+
if(pCharFmt->DerivedFrom())
aCoreSet.SetParent(&pCharFmt->DerivedFrom()->GetAttrSet());
}
@@ -1039,26 +1023,28 @@ SfxItemSet& SwDocStyleSheet::GetItemSet()
{
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
aBoxInfo.SetTable( sal_False );
- aBoxInfo.SetDist( sal_True); // Abstandsfeld immer anzeigen
- aBoxInfo.SetMinDist( sal_True );// Minimalgroesse in Tabellen und Absaetzen setzen
- aBoxInfo.SetDefDist( MIN_BORDER_DIST );// Default-Abstand immer setzen
- // Einzelne Linien koennen nur in Tabellen DontCare-Status haben
+ aBoxInfo.SetDist( sal_True ); // always show gap field
+ aBoxInfo.SetMinDist( sal_True );// set minimum size in tables and paragraphs
+ aBoxInfo.SetDefDist( MIN_BORDER_DIST );// always set Default-Gap
+ // Single lines can only have DontCare-Status in tables
aBoxInfo.SetValid( VALID_DISABLE, sal_True );
if ( nFamily == SFX_STYLE_FAMILY_PARA )
{
- ASSERT(pColl, "Wo ist die Collektion");
+ OSL_ENSURE(pColl, "Where's Collection");
aCoreSet.Put(pColl->GetAttrSet());
aCoreSet.Put( aBoxInfo );
aCoreSet.Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, pColl->IsAutoUpdateFmt()));
+
if(pColl->DerivedFrom())
aCoreSet.SetParent(&pColl->DerivedFrom()->GetAttrSet());
}
else
{
- ASSERT(pFrmFmt, "Wo ist das FrmFmt");
+ OSL_ENSURE(pFrmFmt, "Where's FrmFmt");
aCoreSet.Put(pFrmFmt->GetAttrSet());
aCoreSet.Put( aBoxInfo );
aCoreSet.Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, pFrmFmt->IsAutoUpdateFmt()));
+
if(pFrmFmt->DerivedFrom())
aCoreSet.SetParent(&pFrmFmt->DerivedFrom()->GetAttrSet());
}
@@ -1067,29 +1053,28 @@ SfxItemSet& SwDocStyleSheet::GetItemSet()
case SFX_STYLE_FAMILY_PAGE :
{
- ASSERT(pDesc, "Kein PageDescriptor");
+ OSL_ENSURE(pDesc, "No PageDescriptor");
::PageDescToItemSet(*((SwPageDesc*)pDesc), aCoreSet);
}
break;
case SFX_STYLE_FAMILY_PSEUDO:
{
- ASSERT(pNumRule, "Keine NumRule");
+ OSL_ENSURE(pNumRule, "No NumRule");
SvxNumRule aRule = pNumRule->MakeSvxNumRule();
aCoreSet.Put(SvxNumBulletItem(aRule));
}
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
}
- // Member der Basisklasse
+ // Member of Baseclass
pSet = &aCoreSet;
return aCoreSet;
}
-// --> OD 2008-02-13 #newlistlevelattrs#
void SwDocStyleSheet::MergeIndentAttrsOfListStyle( SfxItemSet& rSet )
{
if ( nFamily != SFX_STYLE_FAMILY_PARA )
@@ -1097,10 +1082,10 @@ void SwDocStyleSheet::MergeIndentAttrsOfListStyle( SfxItemSet& rSet )
return;
}
- ASSERT( pColl, "<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - missing paragraph style");
+ OSL_ENSURE( pColl, "<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - missing paragraph style");
if ( pColl->AreListLevelIndentsApplicable() )
{
- ASSERT( pColl->GetItemState( RES_PARATR_NUMRULE ) == SFX_ITEM_SET,
+ OSL_ENSURE( pColl->GetItemState( RES_PARATR_NUMRULE ) == SFX_ITEM_SET,
"<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - list level indents are applicable at paragraph style, but no list style found. Serious defect -> please inform OD." );
const String sNumRule = pColl->GetNumRule().GetValue();
if( sNumRule.Len() )
@@ -1120,33 +1105,25 @@ void SwDocStyleSheet::MergeIndentAttrsOfListStyle( SfxItemSet& rSet )
}
}
}
-// <--
-/*--------------------------------------------------------------------
- Beschreibung: ItemSet setzen
- --------------------------------------------------------------------*/
-
-// --> OD 2008-02-12 #newlistlevelattrs#
// handling of parameter <bResetIndentAttrsAtParagraphStyle>
void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
const bool bResetIndentAttrsAtParagraphStyle )
{
- // gegebenenfalls Format erst ermitteln
+ // if applicable determine format first
if(!bPhysical)
FillStyleSheet( FillPhysical );
SwImplShellAction aTmpSh( rDoc );
- ASSERT( &rSet != &aCoreSet, "SetItemSet mit eigenem Set ist nicht erlaubt" );
+ OSL_ENSURE( &rSet != &aCoreSet, "SetItemSet with own Set is not allowed" );
- // --> OD 2008-02-12 #newlistlevelattrs#
if (rDoc.GetIDocumentUndoRedo().DoesUndo())
{
SwRewriter aRewriter;
aRewriter.AddRule( UNDO_ARG1, GetName() );
rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_INSFMTATTR, &aRewriter );
}
- // <--
SwFmt* pFmt = 0;
SwPageDesc* pNewDsc = 0;
@@ -1156,14 +1133,14 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
case SFX_STYLE_FAMILY_CHAR :
{
- ASSERT(pCharFmt, "Wo ist das CharFormat");
+ OSL_ENSURE(pCharFmt, "Where's CharFormat");
pFmt = pCharFmt;
}
break;
case SFX_STYLE_FAMILY_PARA :
{
- ASSERT(pColl, "Wo ist die Collection");
+ OSL_ENSURE(pColl, "Where's Collection");
const SfxPoolItem* pAutoUpdate;
if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,sal_False, &pAutoUpdate ))
{
@@ -1192,24 +1169,23 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
}
}
- // Document auf die neue Bedingungen updaten
+ // Update document to new conditions
SwCondCollCondChg aMsg( pColl );
pColl->Modify( &aMsg, &aMsg );
}
else if( pCondItem && !pColl->GetDepends() )
{
- // keine bedingte Vorlage, dann erstmal erzeugen und
- // alle wichtigen Werte uebernehmen
+ // no conditional template, then first create and adopt
+ // all important values
SwConditionTxtFmtColl* pCColl = rDoc.MakeCondTxtFmtColl(
pColl->GetName(), (SwTxtFmtColl*)pColl->DerivedFrom() );
if( pColl != &pColl->GetNextTxtFmtColl() )
pCColl->SetNextTxtFmtColl( pColl->GetNextTxtFmtColl() );
- //pCColl->SetOutlineLevel( pColl->GetOutlineLevel() );//#outline level,zhaojianwei
if( pColl->IsAssignedToListLevelOfOutlineStyle())
pCColl->AssignToListLevelOfOutlineStyle(pColl->GetAssignedOutlineStyleLevel());
else
- pCColl->DeleteAssignmentToListLevelOfOutlineStyle();//<--end,zhaojianwei
+ pCColl->DeleteAssignmentToListLevelOfOutlineStyle();
@@ -1229,7 +1205,6 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
rDoc.DelTxtFmtColl( pColl );
pColl = pCColl;
}
- // --> OD 2008-02-12 #newlistlevelattrs#
if ( bResetIndentAttrsAtParagraphStyle &&
rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, 0 ) == SFX_ITEM_SET &&
rSet.GetItemState( RES_LR_SPACE, sal_False, 0 ) != SFX_ITEM_SET &&
@@ -1237,7 +1212,6 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
rDoc.ResetAttrAtFormat( RES_LR_SPACE, *pColl );
}
- // <--
// #i56252: If a standard numbering style is assigned to a standard paragraph style
// we have to create a physical instance of the numbering style. If we do not and
@@ -1291,7 +1265,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
}
case SFX_STYLE_FAMILY_FRAME:
{
- ASSERT(pFrmFmt, "Wo ist das FrmFmt");
+ OSL_ENSURE(pFrmFmt, "Where's FrmFmt");
const SfxPoolItem* pAutoUpdate;
if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,sal_False, &pAutoUpdate ))
{
@@ -1303,7 +1277,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
case SFX_STYLE_FAMILY_PAGE :
{
- ASSERT(pDesc, "Wo ist der PageDescriptor");
+ OSL_ENSURE(pDesc, "Where's PageDescriptor");
if( rDoc.FindPageDescByName( pDesc->GetName(), &nPgDscPos ))
{
@@ -1321,7 +1295,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
case SFX_STYLE_FAMILY_PSEUDO:
{
- ASSERT(pNumRule, "Wo ist die NumRule");
+ OSL_ENSURE(pNumRule, "Where's NumRule");
if (!pNumRule)
break;
@@ -1333,22 +1307,18 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
SvxNumRule* pSetRule = ((SvxNumBulletItem*)pItem)->GetNumRule();
pSetRule->UnLinkGraphics();
- //SwNumRule aSetRule(rDoc.GetUniqueNumRuleName());
SwNumRule aSetRule(*pNumRule);
aSetRule.SetSvxRule(*pSetRule, &rDoc);
rDoc.ChgNumRuleFmts( aSetRule );
}
break;
case SFX_ITEM_DONTCARE:
- // NumRule auf default Werte
- // was sind die default Werte?
+ // set NumRule to default values
+ // what are the default values?
{
- // --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule aRule( pNumRule->GetName(),
- // --> OD 2008-06-06 #i89178#
+ // #i89178#
numfunc::GetDefaultPositionAndSpaceMode() );
- // <--
- // <--
rDoc.ChgNumRuleFmts( aRule );
}
break;
@@ -1357,7 +1327,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
}
if( pFmt && rSet.Count())
@@ -1366,12 +1336,10 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
const SfxPoolItem* pItem = aIter.GetCurItem();
while( sal_True )
{
- if( IsInvalidItem( pItem ) ) // Clearen
+ if( IsInvalidItem( pItem ) ) // Clear
{
- // --> OD 2008-02-12 #newlistlevelattrs#
// use method <SwDoc::ResetAttrAtFormat(..)> in order to
// create an Undo object for the attribute reset.
-// pFmt->ResetAttr( rSet.GetWhichByPos(aIter.GetCurPos()));
rDoc.ResetAttrAtFormat( rSet.GetWhichByPos(aIter.GetCurPos()),
*pFmt );
}
@@ -1394,24 +1362,22 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
delete pNewDsc;
}
else
- rDoc.ChgFmt(*pFmt, aSet); // alles gesetzten Putten
+ rDoc.ChgFmt(*pFmt, aSet); // put all that is set
}
else
{
aCoreSet.ClearItem();
- if( pNewDsc ) // den muessen wir noch vernichten!!
+ if( pNewDsc ) // we still need to delete it
{
rDoc.PreDelPageDesc(pNewDsc); // #i7983#
delete pNewDsc;
}
}
- // --> OD 2008-02-12 #newlistlevelattrs#
if (rDoc.GetIDocumentUndoRedo().DoesUndo())
{
rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_END, 0);
}
- // <--
}
void lcl_SaveStyles( sal_uInt16 nFamily, SvPtrarr& rArr, SwDoc& rDoc )
@@ -1557,7 +1523,7 @@ void lcl_DeleteInfoStyles( sal_uInt16 nFamily, SvPtrarr& rArr, SwDoc& rDoc )
}
/*--------------------------------------------------------------------
- Beschreibung: Das Format ermitteln
+ Description: determine the format
--------------------------------------------------------------------*/
sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
@@ -1726,7 +1692,7 @@ sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
if( pFmt )
{
- ASSERT( bPhysical, "Format nicht gefunden" );
+ OSL_ENSURE( bPhysical, "Format not found" );
nHelpId = pFmt->GetPoolHelpId();
if( pFmt->GetPoolHlpFileId() != UCHAR_MAX )
@@ -1746,7 +1712,7 @@ sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
}
/*--------------------------------------------------------------------
- Beschreibung: Neues Format in der Core anlegen
+ Description: Create new format in Core
--------------------------------------------------------------------*/
@@ -1794,24 +1760,19 @@ void SwDocStyleSheet::Create()
pNumRule = lcl_FindNumRule( rDoc, aName );
if( !pNumRule )
{
- //JP 05.02.99: temp Namen erzeugen, damit kein ASSERT kommt
String sTmpNm( aName );
if( !aName.Len() )
sTmpNm = rDoc.GetUniqueNumRuleName();
- // --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule* pRule = rDoc.GetNumRuleTbl()[
rDoc.MakeNumRule( sTmpNm, 0, sal_False,
- // --> OD 2008-06-06 #i89178#
+ // #i89178#
numfunc::GetDefaultPositionAndSpaceMode() ) ];
- // <--
- // <--
pRule->SetAutoRule( sal_False );
if( !aName.Len() )
{
- // --> OD 2008-07-08 #i91400#
+ // #i91400#
pRule->SetName( aName, rDoc );
- // <--
}
pNumRule = pRule;
}
@@ -1822,12 +1783,6 @@ void SwDocStyleSheet::Create()
aCoreSet.ClearItem();
}
-/*--------------------------------------------------------------------
- Beschreibung: Konkrete Formate rausholen
- --------------------------------------------------------------------*/
-
-
-
SwCharFmt* SwDocStyleSheet::GetCharFmt()
{
if(!bPhysical)
@@ -1835,7 +1790,6 @@ SwCharFmt* SwDocStyleSheet::GetCharFmt()
return pCharFmt;
}
-
SwTxtFmtColl* SwDocStyleSheet::GetCollection()
{
if(!bPhysical)
@@ -1843,7 +1797,6 @@ SwTxtFmtColl* SwDocStyleSheet::GetCollection()
return pColl;
}
-
const SwPageDesc* SwDocStyleSheet::GetPageDesc()
{
if(!bPhysical)
@@ -1860,12 +1813,12 @@ const SwNumRule * SwDocStyleSheet::GetNumRule()
void SwDocStyleSheet::SetNumRule(const SwNumRule& rRule)
{
- DBG_ASSERT(pNumRule, "Wo ist die NumRule");
+ OSL_ENSURE(pNumRule, "Wo ist die NumRule");
rDoc.ChgNumRuleFmts( rRule );
}
-// Namen UND Familie aus String re-generieren
-// First() und Next() (s.u.) fuegen einen Kennbuchstaben an Pos.1 ein
+// re-generate Name AND Family from String
+// First() and Next() (see below) insert an identification letter at Pos.1
void SwDocStyleSheet::PresetNameAndFamily(const String& rName)
{
@@ -1882,7 +1835,7 @@ void SwDocStyleSheet::PresetNameAndFamily(const String& rName)
}
/*--------------------------------------------------------------------
- Beschreibung: Ist das Format physikalisch schon vorhanden
+ Description: Is the format physically present yet
--------------------------------------------------------------------*/
@@ -1906,7 +1859,6 @@ SwFrmFmt* SwDocStyleSheet::GetFrmFmt()
return pFrmFmt;
}
-
sal_Bool SwDocStyleSheet::IsUsed() const
{
if( !bPhysical )
@@ -1915,7 +1867,6 @@ sal_Bool SwDocStyleSheet::IsUsed() const
pThis->FillStyleSheet( FillOnlyName );
}
- // immer noch nicht ?
if( !bPhysical )
return sal_False;
@@ -1931,7 +1882,7 @@ sal_Bool SwDocStyleSheet::IsUsed() const
return pNumRule ? rDoc.IsUsed( *pNumRule ) : sal_False;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
return sal_False;
}
return rDoc.IsUsed( *pMod );
@@ -2008,7 +1959,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
return 0;
}
@@ -2024,7 +1975,6 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
const String *pTemplate = rDoc.GetDocPattern( nFileId );
if( pTemplate )
{
-// const String aHelpPath(MakeHelpPath(*pTemplate));
rFile = *pTemplate;
}
}
@@ -2033,9 +1983,9 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
nId = nPoolId;
}
- // weil sich der SFX so anstellt mit der HilfeId:
+ // because SFX acts like that, with HelpId:
if( USHRT_MAX == nId )
- nId = 0; // entsp. keine Hilfe anzeigen
+ nId = 0; // don't show Help accordingly
return nId;
}
@@ -2044,7 +1994,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
void SwDocStyleSheet::SetHelpId( const String& r, sal_uLong nId )
{
sal_uInt8 nFileId = static_cast< sal_uInt8 >(rDoc.SetDocPattern( r ));
- sal_uInt16 nHId = static_cast< sal_uInt16 >(nId); //!! SFX hat eigenmaechtig auf sal_uLong umgestellt!
+ sal_uInt16 nHId = static_cast< sal_uInt16 >(nId); //!! SFX changed over to ULONG arbitrarily!
SwFmt* pTmpFmt = 0;
switch( nFamily )
@@ -2063,7 +2013,7 @@ void SwDocStyleSheet::SetHelpId( const String& r, sal_uLong nId )
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
return ;
}
if( pTmpFmt )
@@ -2073,11 +2023,8 @@ void SwDocStyleSheet::SetHelpId( const String& r, sal_uLong nId )
}
}
-
-/* */
-
/*--------------------------------------------------------------------
- Beschreibung: Methoden fuer den DocStyleSheetPool
+ Description: methods for DocStyleSheetPool
--------------------------------------------------------------------*/
SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, sal_Bool bOrg )
@@ -2122,7 +2069,7 @@ SfxStyleSheetBase& SwDocStyleSheetPool::Make(
SfxStyleSheetBase* SwDocStyleSheetPool::Create( const SfxStyleSheetBase& /*rOrg*/)
{
- ASSERT(!this , "Create im SW-Stylesheet-Pool geht nicht" );
+ OSL_ENSURE(!this , "Create im SW-Stylesheet-Pool geht nicht" );
return NULL;
}
@@ -2130,7 +2077,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Create( const SfxStyleSheetBase& /*rOr
SfxStyleSheetBase* SwDocStyleSheetPool::Create( const String &,
SfxStyleFamily, sal_uInt16 )
{
- ASSERT( !this, "Create im SW-Stylesheet-Pool geht nicht" );
+ OSL_ENSURE( !this, "Create im SW-Stylesheet-Pool geht nicht" );
return NULL;
}
@@ -2164,7 +2111,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
sal_Bool bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName();
if( SFX_STYLE_FAMILY_PAGE == eFamily && bSwSrcPool )
{
- // gesondert behandeln!!
+ // deal with separately!
SwPageDesc* pDestDsc =
(SwPageDesc*)((SwDocStyleSheet&)rTarget).GetPageDesc();
SwPageDesc* pCpyDsc =
@@ -2207,8 +2154,8 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
}
break;
case SFX_STYLE_FAMILY_PSEUDO:
- // Eine NumRule besteht nur aus einem Item, also muss man
- // hier nichts loeschen.
+ // A NumRule only consists of one Item, so nothing has
+ // to be deleted here.
break;
default:; //prevent warning
}
@@ -2287,13 +2234,13 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
case SFX_STYLE_FAMILY_PSEUDO:
{
if( !rDoc.DelNumRule( rName ) )
- // Broadcast nur versenden, wenn etwas geloescht wurde
+ // Only send Broadcast, when something was deleted
bBroadcast = sal_False;
}
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
bBroadcast = sal_False;
}
@@ -2329,7 +2276,7 @@ sal_Bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
}
sal_Bool bRet = sal_False;
@@ -2343,7 +2290,7 @@ sal_Bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
if( bRet )
{
- // nur fuer das Broadcasting
+ // only for Broadcasting
mxStyleSheet->PresetName( rStyle );
mxStyleSheet->PresetParent( rParent );
if( SFX_STYLE_FAMILY_PARA == eFam )
@@ -2366,7 +2313,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
sal_uInt16 nSMask = n;
if( SFX_STYLE_FAMILY_PARA == eFam && rDoc.get(IDocumentSettingAccess::HTML_MODE) )
{
- // dann sind nur HTML-Vorlagen von Interesse
+ // then only HTML-Templates are of interest
if( USHRT_MAX == nSMask )
nSMask = SWSTYLEBIT_HTML | SFXSTYLEBIT_USERDEF | SFXSTYLEBIT_USED;
else
@@ -2412,18 +2359,18 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
!(bSearchUsed && (bOrganizer || rDoc.IsUsed(*pRule)) ) &&
(( nSMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
? !(pRule->GetPoolFmtId() & USER_FMT)
- // benutzte gesucht und keine gefunden
+ // searched for used and found none
: bSearchUsed ))
bFnd = sal_False;
}
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
}
}
- // dann noch die Maske auswerten:
+ // then evaluate the mask:
if( pMod && !(bSearchUsed && (bOrganizer || rDoc.IsUsed(*pMod)) ) )
{
const sal_uInt16 nId = SFX_STYLE_FAMILY_PAGE == eFam
@@ -2432,15 +2379,13 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
if( ( nSMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
? !(nId & USER_FMT)
- // benutzte gesucht und keine gefunden
+ // searched for used and found none
: bSearchUsed )
bFnd = sal_False;
}
return bFnd ? mxStyleSheet.get() : 0;
}
-/* */
-
SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
SfxStyleFamily eFam, sal_uInt16 n )
: SfxStyleSheetIterator( pBase, eFam, n ),
@@ -2459,7 +2404,7 @@ SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
sal_uInt16 SwStyleSheetIterator::Count()
{
- // Liste richtig fuellen lassen !!
+ // let the list fill correctly!!
if( !bFirstCalled )
First();
return aLst.Count();
@@ -2467,7 +2412,7 @@ sal_uInt16 SwStyleSheetIterator::Count()
SfxStyleSheetBase* SwStyleSheetIterator::operator[]( sal_uInt16 nIdx )
{
- // gefunden
+ // found
if( !bFirstCalled )
First();
mxStyleSheet->PresetNameAndFamily( *aLst[ nIdx ] );
@@ -2479,12 +2424,12 @@ SfxStyleSheetBase* SwStyleSheetIterator::operator[]( sal_uInt16 nIdx )
SfxStyleSheetBase* SwStyleSheetIterator::First()
{
- // Alte Liste loeschen
+ // Delete old list
bFirstCalled = sal_True;
nLastPos = 0;
aLst.Erase();
- // aktuellen loeschen
+ // Delete current
mxIterSheet->Reset();
SwDoc& rDoc = ((SwDocStyleSheetPool*)pBasePool)->GetDoc();
@@ -2506,13 +2451,13 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
const sal_Bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFmt));
if( !bUsed )
{
- // Standard ist keine Benutzervorlage #46181#
+ // Standard is no User template
const sal_uInt16 nId = rDoc.GetDfltCharFmt() == pFmt ?
sal_uInt16( RES_POOLCHR_INET_NORMAL ):
pFmt->GetPoolFmtId();
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
? !(nId & USER_FMT)
- // benutzte gesucht und keine gefunden
+ // searched for used and found none
: bIsSearchUsed )
continue;
@@ -2561,7 +2506,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
sal_uInt16 nSMask = nSrchMask;
if( rDoc.get(IDocumentSettingAccess::HTML_MODE) )
{
- // dann sind nur HTML-Vorlagen von Interesse
+ // then only HTML-Template are of interest
if( USHRT_MAX == nSMask )
nSMask = SWSTYLEBIT_HTML | SFXSTYLEBIT_USERDEF |
SFXSTYLEBIT_USED;
@@ -2604,15 +2549,14 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
case SWSTYLEBIT_EXTRA:
if((nId & COLL_GET_RANGE_BITS) != COLL_EXTRA_BITS) continue;
break;
-
case SWSTYLEBIT_HTML | SFXSTYLEBIT_USERDEF:
if(IsPoolUserFmt(nId))
break;
- // ansonten weiter
+ // otherwise move on
case SWSTYLEBIT_HTML:
if( (nId & COLL_GET_RANGE_BITS) != COLL_HTML_BITS)
{
- // einige wollen wir aber auch in dieser Section sehen
+ // but some we also want to see in this section
sal_Bool bWeiter = sal_True;
switch( nId )
{
@@ -2641,7 +2585,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( RES_CONDTXTFMTCOLL != pColl->Which() ) continue;
break;
default:
- // benutzte gesucht und keine gefunden
+ // searched for used and found none
if( bIsSearchUsed )
continue;
}
@@ -2681,7 +2625,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
bIsSearchUsed, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, cPARA ) ;
if( !bAll )
{
- // dann auch die, die wir mappen:
+ // then also the ones, that we are mapping:
static sal_uInt16 aPoolIds[] = {
RES_POOLCOLL_SENDADRESS, // --> ADDRESS
RES_POOLCOLL_TABLE_HDLN, // --> TH
@@ -2732,7 +2676,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
? !(nId & USER_FMT)
- // benutzte gesucht und keine gefunden
+ // searched for used and found none
: bIsSearchUsed )
{
continue;
@@ -2763,7 +2707,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
? !(nId & USER_FMT)
- // benutzte gesucht und keine gefunden
+ // searched for used and found none
: bIsSearchUsed )
continue;
}
@@ -2789,7 +2733,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
? !(rRule.GetPoolFmtId() & USER_FMT)
- // benutzte gesucht und keine gefunden
+ // searched for used and found none
: bIsSearchUsed )
continue;
}
@@ -2830,16 +2774,16 @@ SfxStyleSheetBase* SwStyleSheetIterator::Next()
SfxStyleSheetBase* SwStyleSheetIterator::Find( const UniString& rName )
{
- // suchen
+ // searching
if( !bFirstCalled )
First();
nLastPos = lcl_FindName( aLst, nSearchFamily, rName );
if( USHRT_MAX != nLastPos )
{
- // gefunden
+ // found
mxStyleSheet->PresetNameAndFamily(*aLst[nLastPos]);
- // neuer Name gesetzt, also bestimme seine Daten
+ // new name is set, so determine its Data
mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
if( !mxStyleSheet->IsPhysical() )
mxStyleSheet->SetPhysical( sal_False );
@@ -2874,7 +2818,7 @@ void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList,
bUsed = rDoc.IsPoolPageDescUsed( nId );
break;
default:
- ASSERT( !this, "unknown PoolFmt-Id" );
+ OSL_ENSURE( !this, "unknown PoolFmt-Id" );
}
if ( bUsed )
aLst.Append( cType, *rList[i] );
@@ -2887,7 +2831,7 @@ void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList,
void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- // suchen und aus der Anzeige-Liste entfernen !!
+ // search and remove from View-List!!
if( rHint.ISA( SfxStyleSheetHint ) &&
SFX_STYLESHEET_ERASED == ((SfxStyleSheetHint&) rHint).GetHint() )
{
@@ -2904,3 +2848,4 @@ void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/error.src b/sw/source/ui/app/error.src
index 30b9bc7c0e35..fbacdb7f87e9 100644
--- a/sw/source/ui/app/error.src
+++ b/sw/source/ui/app/error.src
@@ -24,18 +24,16 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#define __RSC
+#define __RSC
- //#include <tools/errcode.hxx>
#include "globals.hrc"
#include "app.hrc"
#include "swerror.h"
-#include "comcore.hrc" // MS: Warum gibst auf der Core-Seite
- // jetzt Resourcen
+#include "comcore.hrc" // MS: Why are there resources at the Core-Side now
/*--------------------------------------------------------------------
- Beschreibung: Strings
+ Description: Strings
--------------------------------------------------------------------*/
String STR_COMCORE_READERROR
@@ -47,7 +45,7 @@ String STR_COMCORE_CANT_SHOW
Text [ en-US ] = "Graphic cannot be displayed." ;
};
/*--------------------------------------------------------------------
- Beschreibung: Boxes
+ Description: Boxes
--------------------------------------------------------------------*/
InfoBox ERR_CLPBRD_WRITE
{
@@ -95,10 +93,6 @@ Resource RID_SW_ERRHDL
};
String ERR_CODE ( ERRCODE_CLASS_READ , ERR_WW6_FASTSAVE_ERR )
{
- /* ### ACHTUNG: Neuer Text in Resource? Diese Datei wurde mit der WinWord-Option 'Schnellspeichern' gespeichert. Bitte schalten Sie in WinWord die Option 'Schnellspeichern zulassen' aus und speichern sie die Datei erneut mit WinWord : Diese Datei wurde mit der WinWord-Option ''Schnellspeichern'' gespeichert. Bitte schalten Sie in WinWord die Option ''Schnellspeichern zulassen'' aus und speichern sie die Datei erneut mit WinWord */
- /* ### ACHTUNG: Neuer Text in Resource? Diese Datei wurde mit der WinWord-Option 'Schnellspeichern' gespeichert. Bitte schalten Sie in WinWord die Option 'Schnellspeichern zulassen' aus und speichern sie die Datei erneut mit WinWord : Diese Datei wurde mit der WinWord-Option ''Schnellspeichern'' gespeichert. Bitte schalten Sie in WinWord die Option ''Schnellspeichern zulassen'' aus und speichern sie die Datei erneut mit WinWord */
- /* ### ACHTUNG: Neuer Text in Resource? Diese Datei wurde mit der WinWord-Option 'Schnellspeichern' gespeichert. Bitte schalten Sie in WinWord die Option 'Schnellspeichern zulassen' aus und speichern sie die Datei erneut mit WinWord : Diese Datei wurde mit der WinWord-Option ''Schnellspeichern'' gespeichert. Bitte schalten Sie in WinWord die Option ''Schnellspeichern zulassen'' aus und speichern sie die Datei erneut mit WinWord */
- /* ### ACHTUNG: Neuer Text in Resource? Diese Datei wurde mit der WinWord-Option 'Schnellspeichern' gespeichert. Bitte schalten Sie in WinWord die Option 'Schnellspeichern zulassen' aus und speichern sie die Datei erneut mit WinWord : Diese Datei wurde mit der WinWord-Option ''Schnellspeichern'' gespeichert. Bitte schalten Sie in WinWord die Option ''Schnellspeichern zulassen'' aus und speichern sie die Datei erneut mit WinWord */
Text [ en-US ] = "This file was saved with WinWord in 'Fast Save' mode. Please unmark the WinWord option 'Allow Fast Saves' and save the file again." ;
};
String ERR_CODE ( ERRCODE_CLASS_READ , ERR_FORMAT_ROWCOL )
@@ -149,12 +143,10 @@ Resource RID_SW_ERRHDL
};
String ERR_CODE ( ERRCODE_CLASS_NONE , ERR_TBLSPLIT_ERROR )
{
- /* ### ACHTUNG: Neuer Text in Resource? Zellen können nicht mehr geteilt werden : Zellen k÷nnen nicht mehr geteilt werden */
Text [ en-US ] = "Cells cannot be further split." ;
};
String ERR_CODE ( ERRCODE_CLASS_NONE , ERR_TBLINSCOL_ERROR )
{
- /* ### ACHTUNG: Neuer Text in Resource? weitere Spalten können nicht eingefügt werden : weitere Spalten k÷nnen nicht eingef³gt werden */
Text [ en-US ] = "Additional columns cannot be inserted." ;
};
String ERR_CODE ( ERRCODE_CLASS_NONE , ERR_TBLDDECHG_ERROR )
@@ -180,22 +172,18 @@ Resource RID_SW_ERRHDL
};
String WARN_CODE ( ERRCODE_CLASS_READ , WARN_SWG_OLE )
{
- /* ### ACHTUNG: Neuer Text in Resource? Einige OLE-Objekte konnten nur als Grafiken übernommen werden : Einige OLE-Objekte konnten nur als Grafiken ³bernommen werden */
Text [ en-US ] = "Some OLE objects could only be loaded as graphics." ;
};
String WARN_CODE ( ERRCODE_CLASS_WRITE , WARN_SWG_OLE )
{
- /* ### ACHTUNG: Neuer Text in Resource? Einige OLE-Objekte konnten nur als Grafiken übernommen werden : Einige OLE-Objekte konnten nur als Grafiken ³bernommen werden */
Text [ en-US ] = "Some OLE objects could only be saved as graphics." ;
};
String WARN_CODE ( ERRCODE_CLASS_READ , WARN_SWG_POOR_LOAD )
{
- /* ### ACHTUNG: Neuer Text in Resource? Dokument konnte nicht vollständig geladen werden : Dokument konnte nicht vollstõndig geladen werden */
Text [ en-US ] = "Document could not be completely loaded." ;
};
String WARN_CODE ( ERRCODE_CLASS_WRITE , WARN_SWG_POOR_LOAD )
{
- /* ### ACHTUNG: Neuer Text in Resource? Dokument konnte nicht vollständig gespeichert werden : Dokument konnte nicht vollstõndig gespeichert werden */
Text [ en-US ] = "Document could not be completely saved." ;
};
String WARN_CODE ( ERRCODE_CLASS_WRITE , WARN_SWG_HTML_NO_MACROS)
diff --git a/sw/source/ui/app/mainwn.cxx b/sw/source/ui/app/mainwn.cxx
index d9750b737617..5ad53a445541 100644
--- a/sw/source/ui/app/mainwn.cxx
+++ b/sw/source/ui/app/mainwn.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,13 +34,9 @@
#include <mdiexp.hxx>
#include <tools/shl.hxx>
#include <tools/string.hxx>
-#ifndef _SVARRAY_HXX
#include <svl/svstdarr.hxx>
-#endif
#include <sfx2/progress.hxx>
-#ifndef _RESID_HXX //autogen
#include <tools/resid.hxx>
-#endif
#include <docsh.hxx>
#include <swmodule.hxx>
#include "swtypes.hxx"
@@ -163,3 +160,4 @@ void RescheduleProgress( SwDocShell *pDocShell )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src
index b3ae93cdf6ca..9a120f5bf9fd 100644
--- a/sw/source/ui/app/mn.src
+++ b/sw/source/ui/app/mn.src
@@ -34,9 +34,7 @@
#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
@@ -372,7 +370,7 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml
};
/*------------------------------------------------------------------------
- Beschreibung: Menu Window
+ Description: Menu Window
------------------------------------------------------------------------*/
#define MN_FRM_CAPTION_ITEM \
@@ -412,9 +410,7 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml
{\
Identifier = MN_CELL ; \
Command = ".uno:CellMenu" ; \
- /* ### ACHTUNG: Neuer Text in Resource? Ze~lle : Zelle */\
Text [ en-US ] = "~Cell" ; \
- /* ### ACHTUNG: Neuer Text in Resource? Einstellungen für die Tabellenzelle : Einstellungen f³r die Tabellenzelle */\
SubMenu = Menu\
{\
ItemList = \
@@ -455,7 +451,6 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml
{\
Identifier = FN_TABLE_SET_READ_ONLY_CELLS ; \
HelpId = CMD_FN_TABLE_SET_READ_ONLY_CELLS ; \
- /* ### ACHTUNG: Neuer Text in Resource? ~Schützen : ~Sch³tzen */\
Text [ en-US ] = "~Protect" ; \
};\
MenuItem\
@@ -474,9 +469,7 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml
Identifier = MN_SUB_TBLROW ; \
HelpID = HID_MN_SUB_TBLROW ; \
Command = ".uno:RowMenu" ; \
- /* ### ACHTUNG: Neuer Text in Resource? Ze~ile : Zeile */\
Text [ en-US ] = "~Row" ; \
- /* ### ACHTUNG: Neuer Text in Resource? Einstellungen für die Tabellenzeile : Einstellungen f³r die Tabellenzeile */\
SubMenu = Menu\
{\
ItemList = \
@@ -485,7 +478,6 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml
{\
Identifier = FN_TABLE_SET_ROW_HEIGHT ; \
HelpId = CMD_FN_TABLE_SET_ROW_HEIGHT ; \
- /* ### ACHTUNG: Neuer Text in Resource? ~Höhe... : ~H÷he... */\
Text [ en-US ] = "~Height..." ; \
};\
MenuItem\
@@ -498,14 +490,12 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml
{\
Identifier = FN_TABLE_OPTIMAL_HEIGHT ; \
HelpId = CMD_FN_TABLE_OPTIMAL_HEIGHT ; \
- /* ### ACHTUNG: Neuer Text in Resource? ~Optimale Höhe : ~Optimale H÷he */\
Text [ en-US ] = "~Optimal Height" ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_BALANCE_ROWS ; \
HelpId = CMD_FN_TABLE_BALANCE_ROWS ; \
- /* ### ACHTUNG: Neuer Text in Resource? Gleichmäßig ~verteilen : Gleichmõ˜ig ~verteilen */\
Text [ en-US ] = "Space ~Equally" ; \
};\
SEPARATOR ; \
@@ -513,22 +503,18 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml
{\
Identifier = FN_TABLE_SELECT_ROW ; \
HelpId = CMD_FN_TABLE_SELECT_ROW ; \
- /* ### ACHTUNG: Neuer Text in Resource? Ausw~ählen : Auswählen */\
- /* ### ACHTUNG: Neuer Text in Resource? Ausw~ählen : Ausw~õhlen */\
Text [ en-US ] = "~Select" ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_INSERT_ROW_DLG ; \
HelpId = CMD_FN_TABLE_INSERT_ROW_DLG ; \
- /* ### ACHTUNG: Neuer Text in Resource? ~Einfügen... : ~Einf³gen... */\
Text [ en-US ] = "~Insert..." ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_DELETE_ROW ; \
HelpId = CMD_FN_TABLE_DELETE_ROW ; \
- /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */\
Text [ en-US ] = "~Delete" ; \
};\
};\
@@ -540,7 +526,6 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml
HelpID = HID_MN_SUB_TBLCOL ; \
Command = ".uno:ColumnMenu" ; \
Text [ en-US ] = "Colu~mn" ; \
- /* ### ACHTUNG: Neuer Text in Resource? Einstellungen für die Tabellenspalte : Einstellungen f³r die Tabellenspalte */\
SubMenu = Menu\
{\
ItemList = \
@@ -561,7 +546,6 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml
{\
Identifier = FN_TABLE_BALANCE_CELLS ; \
HelpId = CMD_FN_TABLE_BALANCE_CELLS ; \
- /* ### ACHTUNG: Neuer Text in Resource? Gleichmäßig ~verteilen : Gleichmõ˜ig ~verteilen */\
Text [ en-US ] = "Space ~Equally" ; \
};\
SEPARATOR ; \
@@ -569,22 +553,18 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml
{\
Identifier = FN_TABLE_SELECT_COL ; \
HelpId = CMD_FN_TABLE_SELECT_COL ; \
- /* ### ACHTUNG: Neuer Text in Resource? Ausw~ählen : Auswählen */\
- /* ### ACHTUNG: Neuer Text in Resource? Ausw~ählen : Ausw~õhlen */\
Text [ en-US ] = "~Select" ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_INSERT_COL_DLG ; \
HelpId = CMD_FN_TABLE_INSERT_COL_DLG ; \
- /* ### ACHTUNG: Neuer Text in Resource? ~Einfügen... : ~Einf³gen... */\
Text [ en-US ] = "~Insert..." ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_DELETE_COL ; \
HelpId = CMD_FN_TABLE_DELETE_COL ; \
- /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */\
Text [ en-US ] = "~Delete" ; \
};\
};\
@@ -617,7 +597,6 @@ location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml
Text [ en-US ] = "Name..." ; \
};
-// #i68101#
#define MN_TITLE_DESCRIPTION_SHAPE\
MenuItem\
{\
@@ -845,12 +824,10 @@ Menu MN_TAB_POPUPMENU
ITEM_FORMAT_PARA_DLG
};
ITEM_TRANSLITERATE_MENU
- // MN_BB
SEPARATOR ;
MN_TAB1
MN_TAB2
MN_FRM_CAPTION_ITEM
- // SEPARATOR;
MenuItem
{
Identifier = FN_VIEW_TABLEGRID ;
@@ -1088,11 +1065,9 @@ Menu MN_DRAW_POPUPMENU
ITEM_FORMAT_ATTR_TRANSFORM
};
- //-#i68101#----------------------
SEPARATOR ;
MN_TITLE_DESCRIPTION_SHAPE
MN_NAME_SHAPE
- //-#i68101#----------------------
SEPARATOR ;
MN_DRAW5
@@ -1118,11 +1093,9 @@ Menu MN_DRAWFORM_POPUPMENU
ITEM_FORMAT_ATTR_TRANSFORM
};
- //-#i68101#----------------------
SEPARATOR ;
MN_TITLE_DESCRIPTION_SHAPE
MN_NAME_SHAPE
- //-#i68101#----------------------
SEPARATOR ;
MN_FORM
@@ -1167,9 +1140,6 @@ Menu MN_ANNOTATION_POPUPMENU
{
ItemList =
{
- //MN_RESET
- //SEPARATOR ;
- //MN_TEXT_ATTR
MenuItem\
{\
ITEM_FORMAT_ATTR_CHAR_WEIGHT\
@@ -1187,13 +1157,8 @@ Menu MN_ANNOTATION_POPUPMENU
ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\
};\
SEPARATOR ;
- //ITEM_TRANSLITERATE_MENU
- //SEPARATOR ;
- //MN_DRWTXT
- //MN_FRM_CAPTION_ITEM
SEPARATOR ;
MN_ANNOTATIONS
- //MN_REDCOMMENT
};
};
@@ -1298,10 +1263,8 @@ Menu MN_GRF_POPUPMENU
{
MN_ALIGN_FRAME
MN_MOUSE_FRAME_WITH_CONTOUR
- // --> OD 2009-07-14 #i73249#
SEPARATOR ;
MN_TITLE_DESCRIPTION_SHAPE
- // <--
SEPARATOR ;
MenuItem
{
@@ -1316,6 +1279,14 @@ Menu MN_GRF_POPUPMENU
Text [ en-US ] = "Save Graphics..." ;
};
MN_FRM_CAPTION_ITEM
+ SEPARATOR;
+ MenuItem
+ {
+ Identifier = FN_EXTERNAL_EDIT ;
+ HelpID = CMD_FN_EXTERNAL_EDIT ;
+ Text [ en-US ] = "Edit with External Tool...";
+ };
+ SEPARATOR;
MenuItem
{
ITEM_EDIT_IMAP
@@ -1328,6 +1299,29 @@ String MN_OLE_POPUPMENU
Text [ en-US ] = "Object" ;
};
+#define MN_OLE_EXPORT \
+ MenuItem\
+ {\
+ Text [ en-US ] = "Export..." ; \
+ SubMenu = Menu\
+ {\
+ ItemList = \
+ {\
+ MenuItem\
+ {\
+ Identifier = FN_EXPORT_OLE_AS_PDF ;\
+ HelpID = CMD_FN_EXPORT_OLE_AS_PDF ; \
+ Text [ en-US ] = "Export as P~DF..." ; \
+ };\
+ MenuItem\
+ {\
+ Identifier = FN_EXPORT_OLE_AS_GRAPHIC ;\
+ HelpID = CMD_FN_EXPORT_OLE_AS_GRAPHIC ; \
+ Text [ en-US ] = "Export as JPG..." ; \
+ };\
+ };\
+ };\
+ };
Menu MN_OLE_POPUPMENU
{
@@ -1335,10 +1329,8 @@ Menu MN_OLE_POPUPMENU
{
MN_ALIGN_FRAME
MN_MOUSE_FRAME_WITH_CONTOUR
- // --> OD 2009-07-14 #i73249#
SEPARATOR ;
MN_TITLE_DESCRIPTION_SHAPE
- // <--
SEPARATOR ;
MenuItem
{
@@ -1346,6 +1338,9 @@ Menu MN_OLE_POPUPMENU
HelpId = CMD_FN_FORMAT_FRAME_DLG ;
Text [ en-US ] = "Object..." ;
};
+ SEPARATOR ;
+ MN_OLE_EXPORT
+ SEPARATOR ;
MN_FRM_CAPTION_ITEM
};
};
@@ -1363,10 +1358,8 @@ Menu MN_FRM_POPUPMENU
{
MN_ALIGN_FRAME
MN_MOUSE_FRAME_WITHOUT_CONTOUR
- // --> OD 2009-07-07 #i73249#
SEPARATOR ;
MN_TITLE_DESCRIPTION_SHAPE
- // <--
SEPARATOR ;
MN_FRM
MN_FRM_CAPTION_ITEM
@@ -1392,13 +1385,11 @@ Menu MN_PPREVIEW_POPUPMENU
{
Identifier = FN_PAGEDOWN ;
HelpId = CMD_FN_PAGEDOWN ;
- /* ### ACHTUNG: Neuer Text in Resource? Nächste Seite : Nõchste Seite */
Text [ en-US ] = "Next Page" ;
};
MenuItem
{
ITEM_VIEW_ATTR_ZOOM
- /* ### ACHTUNG: Neuer Text in Resource? Schließt die Seitenvorschau : Schlie˜t die Seitenvorschau */
};
SEPARATOR ;
MenuItem
@@ -1431,11 +1422,9 @@ Menu MN_MEDIA_POPUPMENU
ITEM_FORMAT_ATTR_TRANSFORM
};
- //-#i68101#----------------------
SEPARATOR ;
MN_TITLE_DESCRIPTION_SHAPE
MN_NAME_SHAPE
- //-#i68101#----------------------
SEPARATOR ;
MN_DRAW6
diff --git a/sw/source/ui/app/swdll.cxx b/sw/source/ui/app/swdll.cxx
index 71409e4dedf3..0b6579a532de 100644
--- a/sw/source/ui/app/swdll.cxx
+++ b/sw/source/ui/app/swdll.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,13 +33,9 @@
#include <svx/svdobj.hxx>
#include <rtl/logfile.hxx>
-#ifndef _GLOBDOC_HRC
#include "globdoc.hrc"
-#endif
-#ifndef _SWDLL_HXX
#include <swdll.hxx>
-#endif
#include <wdocsh.hxx>
#include <globdoc.hxx>
#include <initui.hxx>
@@ -50,21 +47,12 @@
#include <unotools/moduleoptions.hxx>
-#ifndef _FM_FMOBJFAC_HXX
#include <svx/fmobjfac.hxx>
-#endif
#include <svx/svdfield.hxx>
#include <svx/objfac3d.hxx>
#include <unomid.h>
-
-/*************************************************************************
-|*
-|* Init
-|*
-\************************************************************************/
-
void SwDLL::Init()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDLL" );
@@ -96,26 +84,26 @@ void SwDLL::Init()
pDocFact->SetDocumentServiceName(C2S("com.sun.star.text.TextDocument"));
}
- // SvDraw-Felder registrieren
+ // register SvDraw-Fields
SdrRegisterFieldClasses();
- // 3D-Objekt-Factory eintragen
+ // register 3D-Objekt-Factory
E3dObjFactory();
- // form::component::Form-Objekt-Factory eintragen
+ // register form::component::Form-Objekt-Factory
FmFormObjFactory();
SdrObjFactory::InsertMakeObjectHdl( LINK( &aSwObjectFactory, SwObjectFactory, MakeObject ) );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "Init Core/UI/Filter" );
- //Initialisierung der Statics
+ // Initialisation of Statics
::_InitCore();
::_InitFilter();
::_InitUI();
pModule->InitAttrPool();
- //jetzt darf das SwModule seinen Pool anlegen
+ // now SWModule can create its Pool
// register your view-factories here
RegisterFactories();
@@ -127,30 +115,23 @@ void SwDLL::Init()
RegisterControls();
}
-
-
-/*************************************************************************
-|*
-|* Exit
-|*
-\************************************************************************/
-
void SwDLL::Exit()
{
// called directly befor unloading the DLL
// do whatever you want, Sw-DLL is accessible
- // der Pool muss vor den statics geloescht werden
+ // Pool has to be deleted before statics are
SW_MOD()->RemoveAttrPool();
::_FinitUI();
::_FinitFilter();
::_FinitCore();
- // Objekt-Factory austragen
+ // sign out Objekt-Factory
SdrObjFactory::RemoveMakeObjectHdl(LINK(&aSwObjectFactory, SwObjectFactory, MakeObject ));
- // the SwModule must be destroyed
+ // the SwModule must be destroyed
SwModule** ppShlPtr = (SwModule**) GetAppData(SHL_WRITER);
delete (*ppShlPtr);
(*ppShlPtr) = NULL;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index f5e79b9da72f..06d6aae15a77 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,6 +48,7 @@
#include <editeng/colritem.hxx>
#include <editeng/brshitem.hxx>
#include <vcl/msgbox.hxx>
+#include <svl/cjkoptions.hxx>
#include <swmodule.hxx>
#include <swtypes.hxx>
#include <usrpref.hxx>
@@ -58,7 +60,7 @@
#include <docsh.hxx>
#include <dbmgr.hxx>
#include <uinums.hxx>
-#include <prtopt.hxx> // fuer PrintOptions
+#include <prtopt.hxx> // for PrintOptions
#include <navicfg.hxx>
#include <doc.hxx>
#include <cmdid.h>
@@ -79,12 +81,9 @@ using namespace ::com::sun::star::view;
using namespace ::com::sun::star::lang;
-/*-----------------08/28/97 08:41pm-----------------
-
---------------------------------------------------*/
void lcl_SetUIPrefs(const SwViewOption* pPref, SwView* pView, ViewShell* pSh )
{
- // in FrameSets kann die tatsaechliche Sichtbarkeit von der Einstellung der ViewOptions abweichen
+ // in FrameSets the actual visibility can differ from the ViewOption's setting
sal_Bool bVScrollChanged = pPref->IsViewVScrollBar() != pSh->GetViewOptions()->IsViewVScrollBar();
sal_Bool bHScrollChanged = pPref->IsViewHScrollBar() != pSh->GetViewOptions()->IsViewHScrollBar();
sal_Bool bVAlignChanged = pPref->IsVRulerRight() != pSh->GetViewOptions()->IsVRulerRight();
@@ -92,7 +91,7 @@ void lcl_SetUIPrefs(const SwViewOption* pPref, SwView* pView, ViewShell* pSh )
pSh->SetUIOptions(*pPref);
const SwViewOption* pNewPref = pSh->GetViewOptions();
- // Scrollbars an / aus
+ // Scrollbars on / off
if(bVScrollChanged)
{
pView->ShowVScrollbar(pNewPref->IsViewVScrollBar());
@@ -105,13 +104,13 @@ void lcl_SetUIPrefs(const SwViewOption* pPref, SwView* pView, ViewShell* pSh )
if(bVAlignChanged && !bHScrollChanged && !bVScrollChanged)
pView->InvalidateBorder();
- // Lineale an / aus
+ // Rulers on / off
if(pNewPref->IsViewVRuler())
pView->CreateVLineal();
else
pView->KillVLineal();
- // TabWindow an/aus
+ // TabWindow on / off
if(pNewPref->IsViewHRuler())
pView->CreateTab();
else
@@ -120,11 +119,6 @@ void lcl_SetUIPrefs(const SwViewOption* pPref, SwView* pView, ViewShell* pSh )
pView->GetPostItMgr()->PrepareView(true);
}
-/*--------------------------------------------------------------------
- Beschreibung: Aktuelle SwWrtShell
- --------------------------------------------------------------------*/
-
-
SwWrtShell* GetActiveWrtShell()
{
SwView *pActive = ::GetActiveView();
@@ -133,41 +127,31 @@ SwWrtShell* GetActiveWrtShell()
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung: Pointer auf die aktuelle Sicht
- --------------------------------------------------------------------*/
-
-
SwView* GetActiveView()
{
SfxViewShell* pView = SfxViewShell::Current();
return PTR_CAST( SwView, pView );
}
-/*--------------------------------------------------------------------
- Beschreibung: Ueber Views iterieren - static
- --------------------------------------------------------------------*/
SwView* SwModule::GetFirstView()
{
- // liefert nur sichtbare SwViews
+ // returns only sivible SwView
const TypeId aTypeId = TYPE(SwView);
SwView* pView = (SwView*)SfxViewShell::GetFirst(&aTypeId);
return pView;
}
-
SwView* SwModule::GetNextView(SwView* pView)
{
- DBG_ASSERT(PTR_CAST(SwView, pView),"keine SwView uebergeben");
+ OSL_ENSURE(PTR_CAST(SwView, pView),"return no SwView");
const TypeId aTypeId = TYPE(SwView);
SwView* pNView = (SwView*)SfxViewShell::GetNext(*pView, &aTypeId, sal_True);
return pNView;
}
/*------------------------------------------------------------------------
- Beschreibung: Neuer Master fuer die Einstellungen wird gesetzt;
- dieser wirkt sich auf die aktuelle Sicht und alle
- folgenden aus.
+ Description: New Master for the settings is set; this affects the
+ current view and all following.
------------------------------------------------------------------------*/
void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
@@ -181,9 +165,9 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
VIEWOPT_DEST_TEXT== nDest ? sal_False :
pCurrView && pCurrView->ISA(SwWebView) ));
- //per Uno soll nur die sdbcx::View, aber nicht das Module veraendert werden
+ // with Uno, only sdbcx::View, but not the Module should be changed
sal_Bool bViewOnly = VIEWOPT_DEST_VIEW_ONLY == nDest;
- //PreView abfruehstuecken
+ // fob PreView off
SwPagePreView* pPPView;
if( !pCurrView && 0 != (pPPView = PTR_CAST( SwPagePreView, SfxViewShell::Current())) )
{
@@ -208,8 +192,13 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
if( !pCurrView )
return;
- // Weitergabe an die CORE
- const sal_Bool bReadonly = pCurrView->GetDocShell()->IsReadOnly();
+ // Passing on to CORE
+ sal_Bool bReadonly;
+ const SwDocShell* pDocSh = pCurrView->GetDocShell();
+ if (pDocSh)
+ bReadonly = pDocSh->IsReadOnly();
+ else //Use existing option if DocShell missing
+ bReadonly = pSh->GetViewOptions()->IsReadonly();
SwViewOption* pViewOpt;
if(!bViewOnly)
pViewOpt = new SwViewOption( *pPref );
@@ -218,7 +207,7 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
pViewOpt->SetReadonly( bReadonly );
if( !(*pSh->GetViewOptions() == *pViewOpt) )
{
- //Ist evtl. nur eine ViewShell
+ //is maybe only a ViewShell
pSh->StartAction();
pSh->ApplyViewOptions( *pViewOpt );
((SwWrtShell*)pSh)->SetReadOnlyAvailable(pViewOpt->IsCursorInProtectedArea());
@@ -229,13 +218,10 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
lcl_SetUIPrefs(pViewOpt, pCurrView, pSh);
- // zum Schluss wird das Idle-Flag wieder gesetzt
- // #42510#
+ // in the end the Idle-Flag is set again
pPref->SetIdle(sal_True);
}
-/* -----------------------------28.09.00 12:36--------------------------------
- ---------------------------------------------------------------------------*/
void SwModule::ApplyUserMetric( FieldUnit eMetric, sal_Bool bWeb )
{
SwMasterUsrPref* pPref;
@@ -259,7 +245,7 @@ void SwModule::ApplyUserMetric( FieldUnit eMetric, sal_Bool bWeb )
FieldUnit eVScrollMetric = pPref->IsVScrollMetric() ? pPref->GetVScrollMetric() : eMetric;
SwView* pTmpView = SwModule::GetFirstView();
- // fuer alle MDI-Fenster das Lineal umschalten
+ // switch the ruler for all MDI-Windows
while(pTmpView)
{
if(bWeb == (0 != PTR_CAST(SwWebView, pTmpView)))
@@ -271,9 +257,7 @@ void SwModule::ApplyUserMetric( FieldUnit eMetric, sal_Bool bWeb )
pTmpView = SwModule::GetNextView(pTmpView);
}
}
-/*-- 12.11.2008 14:47:58---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwModule::ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_Bool bWeb )
{
SwMasterUsrPref* pPref;
@@ -308,9 +292,69 @@ void SwModule::ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_Bo
pTmpView = SwModule::GetNextView(pTmpView);
}
}
-/*-----------------13.11.96 11.57-------------------
+/*-------------------------------------------------
+set the usrpref 's char unit attribute and set ruler
+'s unit as char if the "apply char unit" is checked
--------------------------------------------------*/
+void SwModule::ApplyUserCharUnit(sal_Bool bApplyChar, sal_Bool bWeb)
+{
+ SwMasterUsrPref* pPref;
+ if(bWeb)
+ {
+ if(!pWebUsrPref)
+ GetUsrPref(sal_True);
+ pPref = pWebUsrPref;
+ }
+ else
+ {
+ if(!pUsrPref)
+ GetUsrPref(sal_False);
+ pPref = pUsrPref;
+ }
+ sal_Bool bOldApplyCharUnit = pPref->IsApplyCharUnit();
+ sal_Bool bHasChanged = sal_False;
+ if(bOldApplyCharUnit != bApplyChar)
+ {
+ pPref->SetApplyCharUnit(bApplyChar);
+ bHasChanged = sal_True;
+ }
+
+ if( !bHasChanged )
+ return;
+
+ FieldUnit eHScrollMetric = pPref->IsHScrollMetric() ? pPref->GetHScrollMetric() : pPref->GetMetric();
+ FieldUnit eVScrollMetric = pPref->IsVScrollMetric() ? pPref->GetVScrollMetric() : pPref->GetMetric();
+ if(bApplyChar)
+ {
+ eHScrollMetric = FUNIT_CHAR;
+ eVScrollMetric = FUNIT_LINE;
+ }
+ else
+ {
+ SvtCJKOptions aCJKOptions;
+ if ( !aCJKOptions.IsAsianTypographyEnabled() && ( eHScrollMetric == FUNIT_CHAR ))
+ eHScrollMetric = FUNIT_INCH;
+ else if ( eHScrollMetric == FUNIT_CHAR )
+ eHScrollMetric = FUNIT_CM;
+ if ( !aCJKOptions.IsAsianTypographyEnabled() && ( eVScrollMetric == FUNIT_LINE ))
+ eVScrollMetric = FUNIT_INCH;
+ else if ( eVScrollMetric == FUNIT_LINE )
+ eVScrollMetric = FUNIT_CM;
+ }
+ SwView* pTmpView = SwModule::GetFirstView();
+ // switch rulers for all MDI-Windows
+ while(pTmpView)
+ {
+ if(bWeb == (0 != PTR_CAST(SwWebView, pTmpView)))
+ {
+ pTmpView->ChangeVLinealMetric(eVScrollMetric);
+ pTmpView->ChangeTabMetric(eHScrollMetric);
+ }
+
+ pTmpView = SwModule::GetNextView(pTmpView);
+ }
+}
SwNavigationConfig* SwModule::GetNavigationConfig()
{
@@ -321,10 +365,6 @@ SwNavigationConfig* SwModule::GetNavigationConfig()
return pNavigationConfig;
}
-/*-----------------05.02.97 08.03-------------------
-
---------------------------------------------------*/
-
SwPrintOptions* SwModule::GetPrtOptions(sal_Bool bWeb)
{
if(bWeb && !pWebPrtOpt)
@@ -339,9 +379,6 @@ SwPrintOptions* SwModule::GetPrtOptions(sal_Bool bWeb)
return bWeb ? pWebPrtOpt : pPrtOpt;
}
-/*-----------------26.06.97 07.52-------------------
-
---------------------------------------------------*/
SwChapterNumRules* SwModule::GetChapterNumRules()
{
if(!pChapterNumRules)
@@ -349,17 +386,13 @@ SwChapterNumRules* SwModule::GetChapterNumRules()
return pChapterNumRules;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, sal_Bool /*bOnlyIfAvailable*/)
{
Reference<XFrame> xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface();
Reference<XDispatchProvider> xDP(xFrame, uno::UNO_QUERY);
uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame(
- rtl::OUString::createFromAscii("_beamer"),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_beamer")),
FrameSearchFlag::CHILDREN);
if (xBeamerFrame.is())
{ // the beamer has been opened by the SfxViewFrame
@@ -375,13 +408,10 @@ void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, sal_Bool /*bOnlyI
xControllerSelection->select(makeAny(aSelection.createPropertyValueSequence()));
}
else {
- DBG_ERROR("no selection supplier in the beamer!");
+ OSL_ENSURE(false, "no selection supplier in the beamer!");
}
}
}
-/*--------------------------------------------------------------------
- Beschreibung: Redlining
- --------------------------------------------------------------------*/
sal_uInt16 SwModule::GetRedlineAuthor()
{
@@ -396,13 +426,9 @@ sal_uInt16 SwModule::GetRedlineAuthor()
return InsertRedlineAuthor( sActAuthor );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
const String& SwModule::GetRedlineAuthor(sal_uInt16 nPos)
{
- DBG_ASSERT(nPos<pAuthorNames->Count(), "author not found!"); //#i45342# RTF doc with no author table caused reader to crash
+ OSL_ENSURE(nPos<pAuthorNames->Count(), "author not found!"); //#i45342# RTF doc with no author table caused reader to crash
while (!(nPos<pAuthorNames->Count()))
{
InsertRedlineAuthor(String(RTL_CONSTASCII_USTRINGPARAM("nn")));
@@ -410,10 +436,6 @@ const String& SwModule::GetRedlineAuthor(sal_uInt16 nPos)
return *pAuthorNames->GetObject(nPos);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwModule::InsertRedlineAuthor(const String& rAuthor)
{
sal_uInt16 nPos = 0;
@@ -427,10 +449,6 @@ sal_uInt16 SwModule::InsertRedlineAuthor(const String& rAuthor)
return nPos;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void lcl_FillAuthorAttr( sal_uInt16 nAuthor, SfxItemSet &rSet,
const AuthorCharAttr &rAttr )
{
@@ -443,8 +461,7 @@ void lcl_FillAuthorAttr( sal_uInt16 nAuthor, SfxItemSet &rSet,
COL_AUTHOR4_DARK, COL_AUTHOR5_DARK, COL_AUTHOR6_DARK,
COL_AUTHOR7_DARK, COL_AUTHOR8_DARK, COL_AUTHOR9_DARK };
- aCol.SetColor( aColArr[ nAuthor % (sizeof( aColArr ) /
- sizeof( aColArr[0] )) ] );
+ aCol.SetColor( aColArr[ nAuthor % (SAL_N_ELEMENTS(aColArr)) ] );
}
sal_Bool bBackGr = COL_NONE == rAttr.nColor;
@@ -498,26 +515,18 @@ void lcl_FillAuthorAttr( sal_uInt16 nAuthor, SfxItemSet &rSet,
rSet.Put( SvxColorItem( aCol, RES_CHRATR_COLOR ) );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwModule::GetInsertAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet)
{
lcl_FillAuthorAttr(nAuthor, rSet, pModuleConfig->GetInsertAuthorAttr());
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwModule::GetDeletedAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet)
{
lcl_FillAuthorAttr(nAuthor, rSet, pModuleConfig->GetDeletedAuthorAttr());
}
/*--------------------------------------------------------------------
- Beschreibung: Fuer zukuenftige Erweiterung:
+ Description: For future extension:
--------------------------------------------------------------------*/
void SwModule::GetFormatAuthorAttr( sal_uInt16 nAuthor, SfxItemSet &rSet )
@@ -525,19 +534,11 @@ void SwModule::GetFormatAuthorAttr( sal_uInt16 nAuthor, SfxItemSet &rSet )
lcl_FillAuthorAttr( nAuthor, rSet, pModuleConfig->GetFormatAuthorAttr() );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwModule::GetRedlineMarkPos()
{
return pModuleConfig->GetMarkAlignMode();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwModule::IsInsTblFormatNum(sal_Bool bHTML) const
{
return pModuleConfig->IsInsTblFormatNum(bHTML);
@@ -548,41 +549,27 @@ sal_Bool SwModule::IsInsTblChangeNumFormat(sal_Bool bHTML) const
return pModuleConfig->IsInsTblChangeNumFormat(bHTML);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwModule::IsInsTblAlignNum(sal_Bool bHTML) const
{
return pModuleConfig->IsInsTblAlignNum(bHTML);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
const Color &SwModule::GetRedlineMarkColor()
{
return pModuleConfig->GetMarkAlignColor();
}
-/*-----------------03.03.98 16:47-------------------
-
---------------------------------------------------*/
const SwViewOption* SwModule::GetViewOption(sal_Bool bWeb)
{
return GetUsrPref( bWeb );
}
-// returne den definierten DocStat - WordDelimiter
const String& SwModule::GetDocStatWordDelim() const
{
return pModuleConfig->GetWordDelimiter();
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
-// Durchreichen der Metric von der ModuleConfig (fuer HTML-Export)
+// Passing-through of the ModuleConfig's Metric (for HTML-Export)
sal_uInt16 SwModule::GetMetric( sal_Bool bWeb ) const
{
SwMasterUsrPref* pPref;
@@ -600,46 +587,36 @@ sal_uInt16 SwModule::GetMetric( sal_Bool bWeb ) const
}
return static_cast< sal_uInt16 >(pPref->GetMetric());
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
-// Update-Stati durchreichen
+// Pass-through Update-Stati
sal_uInt16 SwModule::GetLinkUpdMode( sal_Bool ) const
{
if(!pUsrPref)
GetUsrPref(sal_False);
return (sal_uInt16)pUsrPref->GetUpdateLinkMode();
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
SwFldUpdateFlags SwModule::GetFldUpdateFlags( sal_Bool ) const
{
if(!pUsrPref)
GetUsrPref(sal_False);
return pUsrPref->GetFldUpdateFlags();
}
-/* -----------------------------28.09.00 14:18--------------------------------
- ---------------------------------------------------------------------------*/
void SwModule::ApplyFldUpdateFlags(SwFldUpdateFlags eFldFlags)
{
if(!pUsrPref)
GetUsrPref(sal_False);
pUsrPref->SetFldUpdateFlags(eFldFlags);
}
-/* -----------------------------28.09.00 14:18--------------------------------
- ---------------------------------------------------------------------------*/
void SwModule::ApplyLinkMode(sal_Int32 nNewLinkMode)
{
if(!pUsrPref)
GetUsrPref(sal_False);
pUsrPref->SetUpdateLinkMode(nNewLinkMode);
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
void SwModule::CheckSpellChanges( sal_Bool bOnlineSpelling,
sal_Bool bIsSpellWrongAgain, sal_Bool bIsSpellAllAgain, sal_Bool bSmartTags )
{
@@ -662,8 +639,6 @@ void SwModule::CheckSpellChanges( sal_Bool bOnlineSpelling,
pViewShell->GetWin()->Invalidate();
}
}
-// pSpell->SetSpellWrongAgain( sal_False );
-// pSpell->SetSpellAllAgain( sal_False );
}
}
@@ -673,3 +648,5 @@ void SwModule::ApplyDefaultPageMode(sal_Bool bIsSquaredPageMode)
GetUsrPref(sal_False);
pUsrPref->SetDefaultPageMode(bIsSquaredPageMode);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index 644faae08d26..09154f98e3fd 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <hintids.hxx>
-#ifndef _SWERROR_H
#include <swerror.h>
-#endif
#include <vcl/wrkwin.hxx>
#include <vcl/graph.hxx>
#include <svx/galbrws.hxx>
@@ -45,7 +44,7 @@
#include <svx/insctrl.hxx>
#include <svx/selctrl.hxx>
#include <svx/linectrl.hxx>
-#include <svx/tbxctl.hxx> //z-Zt falscher includeschutz!
+#include <svx/tbxctl.hxx> // at the moment wrong include-protection!
#include <svx/fillctrl.hxx>
#include <svx/tbcontrl.hxx>
#include <svx/verttexttbxctrl.hxx>
@@ -59,34 +58,28 @@
#include <svx/tbxcolor.hxx>
#include <svx/clipboardctl.hxx>
#include <svx/lboxctrl.hxx>
-#include <svx/hyprlink.hxx>
#include <svx/tbxcustomshapes.hxx>
#include <svx/imapdlg.hxx>
#include <svx/srchdlg.hxx>
#include <svx/hyperdlg.hxx>
#include <svx/extrusioncolorcontrol.hxx>
#include <svx/fontworkgallery.hxx>
+#include <svx/modctrl.hxx>
#include <com/sun/star/scanner/XScannerManager.hpp>
#include <com/sun/star/container/XSet.hpp>
#include <comphelper/processfactory.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <swmodule.hxx>
#include <swevent.hxx>
#include <swacorr.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <dobjfac.hxx>
#include <init.hxx>
#include <pview.hxx>
#include <wview.hxx>
#include <wdocsh.hxx>
#include <globdoc.hxx>
-#ifndef _SRCVIEW_HXX //autogen
#include <srcview.hxx>
-#endif
#include <glshell.hxx>
#include <tabsh.hxx>
#include <listsh.hxx>
@@ -99,21 +92,11 @@
#include <beziersh.hxx>
#include <wtextsh.hxx>
#include <wfrmsh.hxx>
-#ifndef _DRFORMSH_HXX
#include <drformsh.hxx>
-#endif
-#ifndef _WGRFSH_HXX
#include <wgrfsh.hxx>
-#endif
-#ifndef _WOLESH_HXX
#include <wolesh.hxx>
-#endif
-#ifndef _WLISTSH_HXX
#include <wlistsh.hxx>
-#endif
-#ifndef _WTABSH_HXX
#include <wtabsh.hxx>
-#endif
#include <navipi.hxx>
#include <chartins.hxx>
#include <inputwin.hxx>
@@ -129,12 +112,8 @@
#include <workctrl.hxx>
#include <tbxanchr.hxx>
#include <fldwrap.hxx>
-#ifndef _REDLNDLG_HXX
#include <redlndlg.hxx>
-#endif
-#ifndef _SYNCBTN_HXX
#include <syncbtn.hxx>
-#endif
#include <mailmergechildwindow.hxx>
#include <modcfg.hxx>
#include <fontcfg.hxx>
@@ -144,27 +123,23 @@
#include <swatrset.hxx>
#include <idxmrk.hxx>
#include <dlelstnr.hxx>
-#ifndef _BARCFG_HXX
#include <barcfg.hxx>
-#endif
#include <svx/rubydialog.hxx>
-// OD 14.02.2003 #107424#
#include <svtools/colorcfg.hxx>
#include <editeng/acorrcfg.hxx>
#include <unotools/moduleoptions.hxx>
-#ifndef _AVMEDIA_MEDIAPPLAYER_HXX
#include <avmedia/mediaplayer.hxx>
-#endif
#include <avmedia/mediatoolbox.hxx>
#include <annotsh.hxx>
+#include <navsh.hxx>
#include <app.hrc>
#include <svx/xmlsecctrl.hxx>
ResMgr *pSwResMgr = 0;
-sal_Bool bNoInterrupt = sal_False;
+sal_Bool bNoInterrupt = sal_False;
#include <sfx2/app.hxx>
@@ -180,8 +155,6 @@ TYPEINIT1( SwModule, SfxModule );
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-//************************************************************************
-
SwModule::SwModule( SfxObjectFactory* pWebFact,
SfxObjectFactory* pFact,
SfxObjectFactory* pGlobalFact )
@@ -220,16 +193,16 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
pModuleConfig = new SwModuleOptions;
- //Die brauchen wie sowieso
+ // We need them anyways
pToolbarConfig = new SwToolbarConfigItem( sal_False );
pWebToolbarConfig = new SwToolbarConfigItem( sal_True );
pStdFontConfig = new SwStdFontConfig;
- pAuthorNames = new SvStringsDtor(5, 1); // Alle Redlining-Autoren
+ pAuthorNames = new SvStringsDtor(5, 1); // All Redlining-Authors
- //JP 18.10.96: SvxAutocorrect gegen die SwAutocorrect austauschen
- SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get();
+ // replace SvxAutocorrect with SwAutocorrect
+ SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get();
if( pACfg )
{
const SvxAutoCorrect* pOld = pACfg->GetAutoCorrect();
@@ -243,9 +216,6 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
// at the view options.
GetColorConfig();
}
-
-//************************************************************************
-
uno::Reference< scanner::XScannerManager >
SwModule::GetScannerManager()
{
@@ -258,8 +228,8 @@ SwModule::GetScannerManager()
m_xScannerManager =
uno::Reference< scanner::XScannerManager >(
xMgr->createInstance(
- rtl::OUString::createFromAscii(
- "com.sun.star.scanner.ScannerManager" ) ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.scanner.ScannerManager")) ),
uno::UNO_QUERY );
}
}
@@ -275,15 +245,13 @@ uno::Reference< linguistic2::XLanguageGuessing > SwModule::GetLanguageGuesser()
{
m_xLanguageGuesser = uno::Reference< linguistic2::XLanguageGuessing >(
xMgr->createInstance(
- rtl::OUString::createFromAscii( "com.sun.star.linguistic2.LanguageGuessing" ) ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.LanguageGuessing"))),
uno::UNO_QUERY );
}
}
return m_xLanguageGuesser;
}
-//************************************************************************
-
SwModule::~SwModule()
{
SetPool(0);
@@ -292,24 +260,20 @@ SwModule::~SwModule()
EndListening( *SFX_APP() );
}
-//************************************************************************
-
void SwModule::CreateLngSvcEvtListener()
{
if (!xLngSvcEvtListener.is())
xLngSvcEvtListener = new SwLinguServiceEventListener;
}
-//************************************************************************
-
void SwDLL::RegisterFactories()
{
- //Diese Id's duerfen nicht geaendert werden. Mittels der Id's wird vom
- //Sfx die View (Dokumentansicht wiederherstellen) erzeugt.
+ // These Id's must not be changed. Through these Id's the View (resume Documentview)
+ // is created by Sfx.
if ( SvtModuleOptions().IsWriter() )
SwView::RegisterFactory ( 2 );
- SwWebView::RegisterFactory ( 5 );
+ SwWebView::RegisterFactory ( 5 );
if ( SvtModuleOptions().IsWriter() )
{
@@ -318,9 +282,6 @@ void SwDLL::RegisterFactories()
}
}
-//************************************************************************
-
-
void SwDLL::RegisterInterfaces()
{
SwModule* pMod = SW_MOD();
@@ -347,6 +308,7 @@ void SwDLL::RegisterInterfaces()
SwBezierShell::RegisterInterface(pMod);
SwGrfShell::RegisterInterface(pMod);
SwOleShell::RegisterInterface(pMod);
+ SwNavigationShell::RegisterInterface(pMod);
SwWebTextShell::RegisterInterface(pMod);
SwWebFrameShell::RegisterInterface(pMod);
SwWebGrfShell::RegisterInterface(pMod);
@@ -358,8 +320,6 @@ void SwDLL::RegisterInterfaces()
SwAnnotationShell::RegisterInterface(pMod);
}
-//************************************************************************
-
void SwDLL::RegisterControls()
{
SwModule* pMod = SW_MOD();
@@ -393,7 +353,6 @@ void SwDLL::RegisterControls()
SvxLineEndToolBoxControl::RegisterControl(SID_ATTR_LINEEND_STYLE, pMod );
SvxFontNameToolBoxControl::RegisterControl(SID_ATTR_CHAR_FONT, pMod );
-// SvxFontHeightToolBoxControl::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT, pMod );
SvxFontColorToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR, pMod );
SvxFontColorExtToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR2, pMod );
SvxFontColorExtToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR_BACKGROUND, pMod );
@@ -422,6 +381,7 @@ void SwDLL::RegisterControls()
SwBookmarkControl::RegisterControl(FN_STAT_PAGE, pMod );
SwTemplateControl::RegisterControl(FN_STAT_TEMPLATE, pMod );
SwViewLayoutControl::RegisterControl( SID_ATTR_VIEWLAYOUT, pMod );
+ SvxModifyControl::RegisterControl( SID_DOC_MODIFIED, pMod );
SvxZoomSliderControl::RegisterControl( SID_ATTR_ZOOMSLIDER, pMod );
SwTableOptimizeCtrl::RegisterControl(FN_OPTIMIZE_TABLE, pMod);
@@ -429,7 +389,6 @@ void SwDLL::RegisterControls()
SvxIMapDlgChildWindow::RegisterChildWindow( sal_False, pMod );
SvxSearchDialogWrapper::RegisterChildWindow( sal_False, pMod );
SvxHlinkDlgWrapper::RegisterChildWindow( sal_False, pMod );
- SvxHyperlinkDlgWrapper::RegisterChildWindow( sal_False, pMod, SFX_CHILDWIN_FORCEDOCK );
SvxFontWorkChildWindow::RegisterChildWindow( sal_False, pMod );
SwFldDlgWrapper::RegisterChildWindow( sal_False, pMod );
SwFldDataOnlyDlgWrapper::RegisterChildWindow( sal_False, pMod );
@@ -439,7 +398,6 @@ void SwDLL::RegisterControls()
SwRedlineAcceptChild::RegisterChildWindow( sal_False, pMod );
SwSyncChildWin::RegisterChildWindow( sal_True, pMod );
SwMailMergeChildWindow::RegisterChildWindow( sal_False, pMod );
-// SwSendMailChildWindow::RegisterChildWindow( sal_False, pMod );
SwInsertIdxMarkWrapper::RegisterChildWindow( sal_False, pMod );
SwInsertAuthMarkWrapper::RegisterChildWindow( sal_False, pMod );
SvxRubyChildWindow::RegisterChildWindow( sal_False, pMod);
@@ -475,22 +433,17 @@ void SwDLL::RegisterControls()
/*************************************************************************
|*
-|* Modul laden (nur Attrappe fuer das Linken der DLL)
+|* Load Module (only dummy for linking of the DLL)
|*
\************************************************************************/
-/* -----------------20.04.99 10:46-------------------
- *
- * --------------------------------------------------*/
void SwModule::InitAttrPool()
{
- DBG_ASSERT(!pAttrPool, "Pool ist schon da!");
+ OSL_ENSURE(!pAttrPool, "Pool already exists!");
pAttrPool = new SwAttrPool(0);
SetPool(pAttrPool);
}
-/* -----------------20.04.99 10:46-------------------
- *
- * --------------------------------------------------*/
+
void SwModule::RemoveAttrPool()
{
SetPool(0);
@@ -498,3 +451,4 @@ void SwModule::RemoveAttrPool()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/swwait.cxx b/sw/source/ui/app/swwait.cxx
index 95dd59900a13..e85e81732269 100644
--- a/sw/source/ui/app/swwait.cxx
+++ b/sw/source/ui/app/swwait.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,3 +74,4 @@ SwWait::~SwWait()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx
index 13d40f258552..105691be41ce 100644
--- a/sw/source/ui/cctrl/actctrl.cxx
+++ b/sw/source/ui/cctrl/actctrl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,14 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
-
-#include <tools/list.hxx>
#include "actctrl.hxx"
-
-
void NumEditAction::Action()
{
aActionLink.Call( this );
@@ -64,10 +59,6 @@ long NumEditAction::Notify( NotifyEvent& rNEvt )
return nHandled;
}
-/*------------------------------------------------------------------------
- Beschreibung: KeyInput fuer ShortName - Edits ohne Spaces
-------------------------------------------------------------------------*/
-
NoSpaceEdit::NoSpaceEdit( Window* pParent, const ResId& rResId)
: Edit(pParent, rResId),
sForbiddenChars(String::CreateFromAscii(" "))
@@ -90,9 +81,7 @@ void NoSpaceEdit::KeyInput(const KeyEvent& rEvt)
if(bCallParent)
Edit::KeyInput(rEvt);
}
-/* -----------------------------11.02.00 15:28--------------------------------
- ---------------------------------------------------------------------------*/
void NoSpaceEdit::Modify()
{
Selection aSel = GetSelection();
@@ -112,15 +101,11 @@ void NoSpaceEdit::Modify()
if(GetModifyHdl().IsSet())
GetModifyHdl().Call(this);
}
-/* -----------------25.06.2003 15:57-----------------
- --------------------------------------------------*/
ReturnActionEdit::~ReturnActionEdit()
{
}
-/* -----------------25.06.2003 15:58-----------------
- --------------------------------------------------*/
void ReturnActionEdit::KeyInput( const KeyEvent& rEvt)
{
const KeyCode aKeyCode = rEvt.GetKeyCode();
@@ -135,4 +120,4 @@ void ReturnActionEdit::KeyInput( const KeyEvent& rEvt)
Edit::KeyInput(rEvt);
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/cctrl/popbox.cxx b/sw/source/ui/cctrl/popbox.cxx
index 9d09a613283f..6e457738fcf2 100644
--- a/sw/source/ui/cctrl/popbox.cxx
+++ b/sw/source/ui/cctrl/popbox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,29 +31,20 @@
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <swtypes.hxx>
#include <popbox.hxx>
#include <navipi.hxx>
-
-// --- class SwHelpToolBox ---------------------------------------------
-
-
SwHelpToolBox::SwHelpToolBox( SwNavigationPI* pParent, const ResId& rResId )
: ToolBox( pParent, rResId ),
DropTargetHelper( this )
{
}
-
void SwHelpToolBox::MouseButtonDown(const MouseEvent &rEvt)
{
- // Zuerst DoubleClick-Link auswerten
- // Dessen Returnwert entscheidet ueber andere Verarbeitung
- // Doppelclickhandler nur, wenn nicht auf einen Button geclickt wurde
+ // If doubleclick is detected use doubleclick handler
if(rEvt.GetButtons() == MOUSE_RIGHT &&
0 == GetItemId(rEvt.GetPosPixel()))
{
@@ -62,20 +54,14 @@ void SwHelpToolBox::MouseButtonDown(const MouseEvent &rEvt)
ToolBox::MouseButtonDown(rEvt);
}
-
long SwHelpToolBox::DoubleClick( ToolBox* pCaller )
{
- // kein Doppelklick auf einen Button
+ // No doubleclick on button
if( 0 == pCaller->GetCurItemId() && aDoubleClickLink.Call(0) )
return sal_True;
return sal_False;
}
-/*-----------------26.02.94 00:36-------------------
- dtor ueberladen
---------------------------------------------------*/
-
-
SwHelpToolBox::~SwHelpToolBox() {}
sal_Int8 SwHelpToolBox::AcceptDrop( const AcceptDropEvent& rEvt )
@@ -89,3 +75,4 @@ sal_Int8 SwHelpToolBox::ExecuteDrop( const ExecuteDropEvent& rEvt )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index ebb91b5f7ff7..e11ff0b7630e 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include "precompiled_sw.hxx"
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <unotools/charclass.hxx>
#include <swtypes.hxx>
#include <swlbox.hxx>
@@ -39,11 +40,7 @@ using namespace nsSwComboBoxStyle;
SV_IMPL_PTRARR(SwEntryLst, SwBoxEntry*)
-/*--------------------------------------------------------------------
- Beschreibung: Ein ListboxElement
- --------------------------------------------------------------------*/
-
-
+// Description: ListboxElement
SwBoxEntry::SwBoxEntry() :
bModified(sal_False),
bNew(sal_False),
@@ -51,7 +48,6 @@ SwBoxEntry::SwBoxEntry() :
{
}
-
SwBoxEntry::SwBoxEntry(const String& aNam, sal_uInt16 nIdx) :
bModified(sal_False),
bNew(sal_False),
@@ -60,23 +56,19 @@ SwBoxEntry::SwBoxEntry(const String& aNam, sal_uInt16 nIdx) :
{
}
-
SwBoxEntry::SwBoxEntry(const SwBoxEntry& rOld) :
bModified(rOld.bModified),
bNew(rOld.bNew),
aName(rOld.aName),
nId(rOld.nId)
{
-
}
-
-
SwComboBox::SwComboBox(Window* pParent, const ResId& rId, sal_uInt16 nStyleBits ):
ComboBox(pParent, rId),
nStyle(nStyleBits)
{
- // Verwaltung fuer die Stringlist aus der Resource aufbauen
+ // create administration for the resource's Stringlist
sal_uInt16 nSize = GetEntryCount();
for( sal_uInt16 i=0; i < nSize; ++i )
{
@@ -85,67 +77,39 @@ SwComboBox::SwComboBox(Window* pParent, const ResId& rId, sal_uInt16 nStyleBits
}
}
-/*--------------------------------------------------------------------
- Beschreibung: Basisklasse Dtor
- --------------------------------------------------------------------*/
-
-
+// Basic class Dtor
SwComboBox::~SwComboBox()
{
-// das erledigen die Listen doch schon selbst im DTOR!
-// aEntryLst.DeleteAndDestroy(0, aEntryLst.Count());
-// aDelEntryLst.DeleteAndDestroy(0, aDelEntryLst.Count());
}
-/*--------------------------------------------------------------------
- Beschreibung: Eintrag in die ComboBox aufnehmen
- --------------------------------------------------------------------*/
-
-
void SwComboBox::InsertEntry(const SwBoxEntry& rEntry)
{
InsertSorted(new SwBoxEntry(rEntry));
}
-/*--------------------------------------------------------------------
- Beschreibung: Eintrag aus der Liste loeschen
- --------------------------------------------------------------------*/
-
-
void SwComboBox::RemoveEntry(sal_uInt16 nPos)
{
if(nPos >= aEntryLst.Count())
return;
- // Altes Element austragen
+ // Remove old element
SwBoxEntry* pEntry = aEntryLst[nPos];
aEntryLst.Remove(nPos, 1);
ComboBox::RemoveEntry(nPos);
- // keine neuen Eintraege in die Liste mit aufnehmen
+ // Don't add new entries to the list
if(pEntry->bNew)
return;
- // in DeleteListe eintragen
+ // add to DelEntryLst
aDelEntryLst.C40_INSERT(SwBoxEntry, pEntry, aDelEntryLst.Count());
}
-
-
-/*--------------------------------------------------------------------
- Beschreibung: Position by Name
- --------------------------------------------------------------------*/
-
sal_uInt16 SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
{
return ComboBox::GetEntryPos(rEntry.aName);
}
-/*--------------------------------------------------------------------
- Beschreibung: Rund um die Entries
- --------------------------------------------------------------------*/
-
-
const SwBoxEntry& SwComboBox::GetEntry(sal_uInt16 nPos) const
{
if(nPos < aEntryLst.Count())
@@ -154,17 +118,11 @@ const SwBoxEntry& SwComboBox::GetEntry(sal_uInt16 nPos) const
return aDefault;
}
-/*--------------------------------------------------------------------
- Beschreibung: geloeschte Eintraege
- --------------------------------------------------------------------*/
-
-
sal_uInt16 SwComboBox::GetRemovedCount() const
{
return aDelEntryLst.Count();
}
-
const SwBoxEntry& SwComboBox::GetRemovedEntry(sal_uInt16 nPos) const
{
if(nPos < aDelEntryLst.Count())
@@ -173,11 +131,6 @@ const SwBoxEntry& SwComboBox::GetRemovedEntry(sal_uInt16 nPos) const
return aDefault;
}
-/*--------------------------------------------------------------------
- Beschreibung: Sortiert einfuegen
- --------------------------------------------------------------------*/
-
-
void SwComboBox::InsertSorted(SwBoxEntry* pEntry)
{
ComboBox::InsertEntry(pEntry->aName);
@@ -185,12 +138,6 @@ void SwComboBox::InsertSorted(SwBoxEntry* pEntry)
aEntryLst.C40_INSERT(SwBoxEntry, pEntry, nPos);
}
-
-/*--------------------------------------------------------------------
- Beschreibung: Je nach Option bestimmte Zeichen ausblenden
- --------------------------------------------------------------------*/
-
-
void SwComboBox::KeyInput( const KeyEvent& rKEvt )
{
sal_uInt16 nChar = rKEvt.GetCharCode();
@@ -208,13 +155,7 @@ void SwComboBox::KeyInput( const KeyEvent& rKEvt )
ComboBox::KeyInput(rKEvt);
}
-
-
-/*--------------------------------------------------------------------
- Beschreibung: Text nach Option konvertieren
- --------------------------------------------------------------------*/
-
-
+// Convert text according to option
String SwComboBox::GetText() const
{
String aTxt( ComboBox::GetText() );
@@ -229,3 +170,4 @@ String SwComboBox::GetText() const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index ff4ec261b209..39287e7169bb 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,33 +36,21 @@
#include <sfx2/request.hxx>
#include <svl/stritem.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <uitool.hxx>
#include <swtypes.hxx>
#include <wrtsh.hxx>
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <viewopt.hxx>
#include <break.hxx>
#include <pagedesc.hxx>
#include <poolfmt.hxx>
-#ifndef _BREAK_HRC
#include <break.hrc>
-#endif
-#ifndef _CHRDLG_HRC
#include <chrdlg.hrc>
-#endif
#include <SwStyleNameMapper.hxx>
void SwBreakDlg::Apply()
@@ -83,7 +72,6 @@ void SwBreakDlg::Apply()
}
}
-
IMPL_LINK_INLINE_START( SwBreakDlg, ClickHdl, void *, EMPTYARG )
{
CheckEnable();
@@ -92,7 +80,7 @@ IMPL_LINK_INLINE_START( SwBreakDlg, ClickHdl, void *, EMPTYARG )
IMPL_LINK_INLINE_END( SwBreakDlg, ClickHdl, void *, EMPTYARG )
/*------------------------------------------------------------------------
- Beschreibung: Handler fuer Aendern Seitenummer
+ Description: Handler for Change Page Number
------------------------------------------------------------------------*/
IMPL_LINK_INLINE_START( SwBreakDlg, PageNumHdl, CheckBox *, pBox )
@@ -104,7 +92,7 @@ IMPL_LINK_INLINE_START( SwBreakDlg, PageNumHdl, CheckBox *, pBox )
IMPL_LINK_INLINE_END( SwBreakDlg, PageNumHdl, CheckBox *, pBox )
/*------------------------------------------------------------------------
- Beschreibung: Durch Aendern der Seitennummer wird die Checkbox gecheckt.
+ Description: By changing the Page number the checkbox is checked.
------------------------------------------------------------------------*/
IMPL_LINK_INLINE_START( SwBreakDlg, PageNumModifyHdl, Edit *, EMPTYARG )
@@ -115,18 +103,18 @@ IMPL_LINK_INLINE_START( SwBreakDlg, PageNumModifyHdl, Edit *, EMPTYARG )
IMPL_LINK_INLINE_END( SwBreakDlg, PageNumModifyHdl, Edit *, EMPTYARG )
/*------------------------------------------------------------------------
- Beschreibung: Ok-Handler;
- prueft, ob die Seitenummer nPage eine legale Seitennummer
- ist (linke Seiten mit geraden Nummern etc. bei einer Seitenvorlage
- mit wechselnden Seiten)
+ Description: Ok-Handler;
+ checks whether pagenumber nPage is a legal pagenumber
+ (left pages with even numbers etc. for a page template
+ with alternating pages)
------------------------------------------------------------------------*/
IMPL_LINK( SwBreakDlg, OkHdl, Button *, EMPTYARG )
{
if(aPageNumBox.IsChecked()) {
- // wenn unterschiedliche Seitenvorlagen, testen auf Gueltigkeit
+ // In case of differing page descriptions, test validity
const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos();
- // auf Position 0 steht 'Ohne'.
+ // position 0 says 'Without'.
const SwPageDesc *pPageDesc;
if ( 0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos )
pPageDesc = rSh.FindPageDescByName( aPageCollBox.GetSelectEntry(),
@@ -134,7 +122,7 @@ IMPL_LINK( SwBreakDlg, OkHdl, Button *, EMPTYARG )
else
pPageDesc = &rSh.GetPageDesc(rSh.GetCurPageDesc());
- ASSERT(pPageDesc, Seitenvorlage nicht gefunden.);
+ OSL_ENSURE(pPageDesc, "Page description not found.");
const sal_uInt16 nUserPage = sal_uInt16(aPageNumEdit.GetValue());
sal_Bool bOk = sal_True;
switch(pPageDesc->GetUseOn())
@@ -192,7 +180,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
aPageNumEdit.SetModifyHdl(LINK(this,SwBreakDlg,PageNumModifyHdl));
- // Einfuegen der vorhandenen Seitenvorlagen in die Listbox
+ // Insert page description to Listbox
const sal_uInt16 nCount = rSh.GetPageDescCnt();
sal_uInt16 i;
@@ -216,7 +204,6 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
FreeResource();
}
-
void SwBreakDlg::CheckEnable()
{
sal_Bool bEnable = sal_True;
@@ -241,7 +228,7 @@ void SwBreakDlg::CheckEnable()
bEnable &= bPage;
if ( bEnable )
{
- // auf Position 0 steht 'Ohne' Seitenvorlage.
+ // position 0 says 'Without' page template.
const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos();
if ( 0 == nPos || LISTBOX_ENTRY_NOTFOUND == nPos )
bEnable = sal_False;
@@ -253,3 +240,5 @@ void SwBreakDlg::CheckEnable()
SwBreakDlg::~SwBreakDlg()
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx
index f2099aabdda1..9a381071df56 100644
--- a/sw/source/ui/chrdlg/ccoll.cxx
+++ b/sw/source/ui/chrdlg/ccoll.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,17 +29,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "cmdid.h"
-#include <tools/list.hxx>
#include "swmodule.hxx"
#include "view.hxx"
#include "wrtsh.hxx"
#include "globals.hrc"
#include "helpid.h"
-
#include <sfx2/styfitem.hxx>
#include "uitool.hxx"
@@ -108,7 +105,7 @@ rtl::OUString GetCommandContextByIndex( sal_Int16 nIndex )
rtl::OUString aRes;
if (0 <= nIndex && nIndex < COND_COMMAND_COUNT)
{
- aRes = C2U( aCommandContext[ nIndex ] );
+ aRes = rtl::OUString::createFromAscii( aCommandContext[ nIndex ] );
}
return aRes;
}
@@ -152,7 +149,7 @@ CommandStruct SwCondCollItem::aCmds[] =
TYPEINIT1_AUTOFACTORY(SwCondCollItem, SfxPoolItem)
/****************************************************************************
- Item fuer den Transport der Bedingungstabelle
+ Item for the transport of the condition table
****************************************************************************/
@@ -161,33 +158,19 @@ SwCondCollItem::SwCondCollItem(sal_uInt16 _nWhich ) :
{
}
-/****************************************************************************
-
-****************************************************************************/
-
SwCondCollItem::~SwCondCollItem()
{
}
-/****************************************************************************
-
-****************************************************************************/
-
-
SfxPoolItem* SwCondCollItem::Clone( SfxItemPool * /*pPool*/ ) const
{
return new SwCondCollItem(*this);
}
-/****************************************************************************
-
-****************************************************************************/
-
-
int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
{
- DBG_ASSERT( SfxPoolItem::operator==(rItem), "unterschiedliche Typen" );
+ OSL_ENSURE( SfxPoolItem::operator==(rItem), "different types" );
sal_Bool bReturn = sal_True;
for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++)
if(sStyles[i] != ((SwCondCollItem&)rItem).sStyles[i])
@@ -199,38 +182,20 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
return bReturn;
}
-/****************************************************************************
-
-****************************************************************************/
-
-
const String& SwCondCollItem::GetStyle(sal_uInt16 nPos) const
{
return nPos < COND_COMMAND_COUNT ? sStyles[nPos] : aEmptyStr;
}
-/****************************************************************************
-
-****************************************************************************/
-
-
void SwCondCollItem::SetStyle(const String* pStyle, sal_uInt16 nPos)
{
if( nPos < COND_COMMAND_COUNT )
sStyles[nPos] = pStyle ? *pStyle : aEmptyStr;
}
-
-/****************************************************************************
-
-****************************************************************************/
-
-
const CommandStruct* SwCondCollItem::GetCmds()
{
return aCmds;
}
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/chrdlg/ccoll.src b/sw/source/ui/chrdlg/ccoll.src
index da20e56d0afd..8247888309cd 100644
--- a/sw/source/ui/chrdlg/ccoll.src
+++ b/sw/source/ui/chrdlg/ccoll.src
@@ -26,7 +26,6 @@
************************************************************************/
// #pragma ******************************************************************
- // #include *****************************************************************
#include "globals.hrc"
#include "chrdlg.hrc"
#include "ccoll.hrc"
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 15f6737b537c..fb5abe72b3a0 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,48 +36,29 @@
#include <hintids.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <svl/urihelper.hxx>
#include <svl/stritem.hxx>
#include <editeng/flstitem.hxx>
#include <svx/htmlmode.hxx>
#include <svl/cjkoptions.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#include <swtypes.hxx>
-#include <errhdl.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <uitool.hxx>
#include <fmtinfmt.hxx>
#include <macassgn.hxx>
-#ifndef _CHRDLG_HXX
-#include <chrdlg.hxx> // der Dialog
-#endif
+#include <chrdlg.hxx> // the dialog
#include <swmodule.hxx>
#include <poolfmt.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _CHRDLG_HRC
#include <chrdlg.hrc>
-#endif
-#ifndef _CHARDLG_HRC
#include <chardlg.hrc>
-#endif
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
#include <SwStyleNameMapper.hxx>
@@ -93,11 +75,6 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
using namespace ::sfx2;
-/*--------------------------------------------------------------------
- Beschreibung: Der Traeger des Dialoges
- --------------------------------------------------------------------*/
-
-
SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
const String* pStr, sal_Bool bIsDrwTxtDlg) :
SfxTabDialog(pParent, SW_RES(DLG_CHAR), &rCoreSet, pStr != 0),
@@ -106,8 +83,6 @@ SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
{
FreeResource();
- // bspFonr fuer beide Bsp-TabPages
-
if(pStr)
{
String aTmp( GetText() );
@@ -117,7 +92,7 @@ SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
SetText(aTmp);
}
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AddTabPage(TP_CHAR_STD, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 );
AddTabPage(TP_CHAR_EXT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), 0 );
AddTabPage(TP_CHAR_POS, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), 0 );
@@ -135,21 +110,15 @@ SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
else if(!aCJKOptions.IsDoubleLinesEnabled())
RemoveTabPage( TP_CHAR_TWOLN );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwCharDlg::~SwCharDlg()
{
}
/*--------------------------------------------------------------------
- Beschreibung: FontList setzen
+ Description: set FontList
--------------------------------------------------------------------*/
-
-
void SwCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
@@ -186,10 +155,6 @@ void SwCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
}
}
-/*-----------------14.08.96 11.28-------------------
-
---------------------------------------------------*/
-
SwCharURLPage::SwCharURLPage( Window* pParent,
const SfxItemSet& rCoreSet ) :
SfxTabPage( pParent, SW_RES( TP_CHAR_URL ), rCoreSet ),
@@ -245,38 +210,28 @@ SwCharURLPage::SwCharURLPage( Window* pParent,
TargetList* pList = new TargetList;
const SfxFrame& rFrame = pView->GetViewFrame()->GetTopFrame();
rFrame.GetTargetList(*pList);
- sal_uInt16 nCount = (sal_uInt16)pList->Count();
- if( nCount )
+ if ( !pList->empty() )
{
- sal_uInt16 i;
+ size_t nCount = pList->size();
+ size_t i;
for ( i = 0; i < nCount; i++ )
{
- aTargetFrmLB.InsertEntry(*pList->GetObject(i));
+ aTargetFrmLB.InsertEntry( *pList->at( i ) );
}
- for ( i = nCount; i; i-- )
+ for ( i = nCount; i; )
{
- delete pList->GetObject( i - 1 );
+ delete pList->at( --i );
}
}
delete pList;
-
-
}
-/*-----------------15.08.96 09.04-------------------
-
---------------------------------------------------*/
-
SwCharURLPage::~SwCharURLPage()
{
delete pINetItem;
}
-/*-----------------14.08.96 11.31-------------------
-
---------------------------------------------------*/
-
void SwCharURLPage::Reset(const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
@@ -315,10 +270,6 @@ void SwCharURLPage::Reset(const SfxItemSet& rSet)
}
}
-/*-----------------14.08.96 11.32-------------------
-
---------------------------------------------------*/
-
sal_Bool SwCharURLPage::FillItemSet(SfxItemSet& rSet)
{
::rtl::OUString sURL = aURLED.GetText();
@@ -338,7 +289,7 @@ sal_Bool SwCharURLPage::FillItemSet(SfxItemSet& rSet)
bModified |= aNameED.IsModified();
bModified |= aTargetFrmLB.GetSavedValue() != aTargetFrmLB.GetText();
- //zuerst die gueltigen Einstellungen setzen
+ // set valid settings first
String sEntry = aVisitedLB.GetSelectEntry();
sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
aINetFmt.SetVisitedFmtId(nId);
@@ -368,21 +319,12 @@ sal_Bool SwCharURLPage::FillItemSet(SfxItemSet& rSet)
return bModified;
}
-
-/*-----------------14.08.96 11.30-------------------
-
---------------------------------------------------*/
-
SfxTabPage* SwCharURLPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return ( new SwCharURLPage( pParent, rAttrSet ) );
}
-/*-----------------14.08.96 15.00-------------------
-
---------------------------------------------------*/
-
IMPL_LINK( SwCharURLPage, InsertFileHdl, PushButton *, EMPTYARG )
{
FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 );
@@ -393,9 +335,6 @@ IMPL_LINK( SwCharURLPage, InsertFileHdl, PushButton *, EMPTYARG )
}
return 0;
}
-/*-----------------14.08.96 15.00-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwCharURLPage, EventHdl, PushButton *, EMPTYARG )
{
@@ -405,3 +344,4 @@ IMPL_LINK( SwCharURLPage, EventHdl, PushButton *, EMPTYARG )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/chrdlg/chrdlg.src b/sw/source/ui/chrdlg/chrdlg.src
index 297668f6093a..b3c8ff6f294e 100644
--- a/sw/source/ui/chrdlg/chrdlg.src
+++ b/sw/source/ui/chrdlg/chrdlg.src
@@ -42,7 +42,6 @@ InfoBox MSG_ILLEGAL_PAGENUM
{
BUTTONS = WB_OK ;
DEFBUTTON = WB_DEF_OK ;
- /* ### ACHTUNG: Neuer Text in Resource? Seitennummer kann nicht gesetzt werden. Auf linken Seiten dürfen nur gerade Seitenzahlen, auf rechten Seiten nur ungerade Seitenzahlen verwendet werden. : Seitennummer kann nicht gesetzt werden. Auf linken Seiten d³rfen nur gerade Seitenzahlen, auf rechten Seiten nur ungerade Seitenzahlen verwendet werden. */
Message [ en-US ] = "Page numbers cannot be applied to the current page. Even numbers can be used on left pages, odd numbers on right pages." ;
};
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 8f02d0cc8796..7f54948fd56a 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,11 +32,12 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
-
#include <hintids.hxx>
#define _SVSTDARR_STRINGSDTOR
#define _SVSTDARR_STRINGSISORTDTOR
+#define _SVSTDARR_XUB_STRLEN
+#define _SVSTDARR_USHORTS
+#define _SVSTDARR_ULONGS
#include <svl/svstdarr.hxx>
#include "cmdid.h"
@@ -44,10 +46,7 @@
#include "wrtsh.hxx"
#include "globals.hrc"
-
-#ifndef _METRIC_HXX //autogen
#include <vcl/metric.hxx>
-#endif
#include <svl/stritem.hxx>
#include <editeng/fontitem.hxx>
#include <svx/htmlmode.hxx>
@@ -55,18 +54,11 @@
#include <editeng/svxfont.hxx>
#include <vcl/print.hxx>
#include <sfx2/printer.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <editeng/scripttypeitem.hxx>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <comphelper/processfactory.hxx>
-#define _SVSTDARR_XUB_STRLEN
-#define _SVSTDARR_USHORTS
-#define _SVSTDARR_ULONGS
-#include <svl/svstdarr.hxx>
-
#include "charatr.hxx"
#include "viewopt.hxx"
#include "drpcps.hxx"
@@ -89,15 +81,11 @@ using namespace ::com::sun::star::lang;
// Globals ******************************************************************
-static sal_uInt16 __FAR_DATA aPageRg[] = {
+static sal_uInt16 aPageRg[] = {
RES_PARATR_DROP, RES_PARATR_DROP,
0
};
-
-
-// class SwDropCapsPict *****************************************************
-
class SwDropCapsPict : public Control
{
String maText;
@@ -129,8 +117,14 @@ class SwDropCapsPict : public Control
void GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, sal_uInt16 _nWhich );
public:
- SwDropCapsPict(Window *pParent, const ResId &rResId) :
- Control(pParent, rResId), mpPrinter( NULL ), mbDelPrinter( sal_False ) {}
+ SwDropCapsPict(Window *pParent, const ResId &rResId)
+ : Control(pParent, rResId)
+ , mnTotLineH(0)
+ , mnLineH(0)
+ , mnTextH(0)
+ , mpPrinter( NULL )
+ , mbDelPrinter( sal_False )
+ {}
~SwDropCapsPict();
void UpdatePaintSettings( void ); // also invalidates control!
@@ -177,7 +171,7 @@ inline void SwDropCapsPict::InitPrinter( void )
}
/****************************************************************************
-Default-String aus Zeichenanzahl erzeugen (A, AB, ABC, ...)
+ Create Default-String from character-count (A, AB, ABC, ...)
****************************************************************************/
@@ -200,21 +194,12 @@ static void calcFontHeightAnyAscent( OutputDevice* _pWin, Font& _rFont, long& _n
}
}
-/****************************************************************************
-Pict: Dtor
-****************************************************************************/
-
-
SwDropCapsPict::~SwDropCapsPict()
{
if( mbDelPrinter )
delete mpPrinter;
}
-/****************************************************************************
-Pict: Update Font
-****************************************************************************/
-
#define LINES 10
#define BORDER 2
@@ -245,7 +230,7 @@ void SwDropCapsPict::UpdatePaintSettings( void )
SwDropCapsPage* pPage = ( SwDropCapsPage* ) GetParent();
if (!pPage->aTemplateBox.GetSelectEntryPos())
{
- // Font an Absatzanfang erfragen
+ // query the Font at paragraph's beginning
pPage->rSh.SttCrsrMove();
pPage->rSh.Push();
pPage->rSh.ClearMark();
@@ -266,11 +251,11 @@ void SwDropCapsPict::UpdatePaintSettings( void )
}
else
{
- // Font an Zeichenvorlage erfragen
+ // query Font at character template
SwCharFmt *pFmt = pPage->rSh.GetCharStyle(
pPage->aTemplateBox.GetSelectEntry(),
SwWrtShell::GETSTYLE_CREATEANY );
- ASSERT(pFmt, "Zeichenvorlage existiert nicht!");
+ OSL_ENSURE(pFmt, "character style doesn't exist!");
const SvxFontItem &rFmtFont = pFmt->GetFont();
aFont.SetFamily (rFmtFont.GetFamily());
@@ -334,13 +319,13 @@ void SwDropCapsPict::Paint(const Rectangle &/*rRect*/)
Size (aOutputSizePixel.Width () - 2 * BORDER,
aOutputSizePixel.Height() - 2 * BORDER))));
- ASSERT(mnLineH > 0, "So klein lassen wir uns nicht machen");
+ OSL_ENSURE(mnLineH > 0, "We cannot make it that small");
long nY0 = (aOutputSizePixel.Height() - (LINES * mnTotLineH)) / 2;
SetFillColor( maTextLineColor );
for (sal_uInt16 i = 0; i < LINES; ++i)
DrawRect(Rectangle(Point(BORDER, nY0 + i * mnTotLineH), Size(aOutputSizePixel.Width() - 2 * BORDER, mnLineH)));
- // Texthintergrund mit Abstand (240 twips ~ 1 Zeilenhoehe)
+ // Text background with gap (240 twips ~ 1 line height)
sal_uLong lDistance = mnDistance;
sal_uInt16 nDistW = (sal_uInt16) (sal_uLong) (((lDistance * 100) / 240) * mnTotLineH) / 100;
SetFillColor( maBackColor );
@@ -350,7 +335,7 @@ void SwDropCapsPict::Paint(const Rectangle &/*rRect*/)
aTextSize.Width() += nDistW;
DrawRect( Rectangle( Point( BORDER, nY0 ), aTextSize ) );
- // Text zeichnen
+ // draw Text
DrawPrev( Point( BORDER, nY0 - mnLeading ) );
}
@@ -418,7 +403,7 @@ void SwDropCapsPict::CheckScript( void )
{
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
xBreak = Reference< I18N::XBreakIterator >(xMSF->createInstance(
- ::rtl::OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ),UNO_QUERY);
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator")) ),UNO_QUERY);
}
if( xBreak.is() )
{
@@ -536,11 +521,6 @@ void SwDropCapsPict::_InitPrinter()
}
}
-/****************************************************************************
-Dlg: Ctor
-****************************************************************************/
-
-
SwDropCapsDlg::SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet ) :
SfxSingleTabDialog(pParent, rSet, 0)
@@ -551,20 +531,10 @@ SwDropCapsDlg::SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet ) :
SetTabPage(pNewPage);
}
-/****************************************************************************
-Dlg: Dtor
-****************************************************************************/
-
-
SwDropCapsDlg::~SwDropCapsDlg()
{
}
-/****************************************************************************
-Page: Ctor
-****************************************************************************/
-
-
SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
SfxTabPage(pParent, SW_RES(TP_DROPCAPS), rSet),
@@ -597,16 +567,16 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
- //Im Vorlagendialog kann der Text nicht beeinflusst werden
+ // In the template dialog the text is not influenceable
aTextText.Enable( !bFormat );
aTextEdit.Enable( !bFormat );
- // Metriken
+ // Metrics
SetMetric( aDistanceField, GetDfltMetric(bHtmlMode) );
pPict->SetBorderStyle( WINDOW_BORDER_MONO );
- // Handler installieren
+ // Install handler
Link aLk = LINK(this, SwDropCapsPage, ModifyHdl);
aDropCapsField.SetModifyHdl( aLk );
aLinesField .SetModifyHdl( aLk );
@@ -617,17 +587,11 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
aWholeWordCB .SetClickHdl (LINK(this, SwDropCapsPage, WholeWordHdl ));
}
-/****************************************************************************
-Page: Dtor
-****************************************************************************/
-
-
SwDropCapsPage::~SwDropCapsPage()
{
delete pPict;
}
-
int SwDropCapsPage::DeactivatePage(SfxItemSet * _pSet)
{
if ( _pSet )
@@ -640,7 +604,6 @@ int SwDropCapsPage::DeactivatePage(SfxItemSet * _pSet)
Page: Factory
****************************************************************************/
-
SfxTabPage* SwDropCapsPage::Create(Window *pParent,
const SfxItemSet &rSet)
{
@@ -651,7 +614,6 @@ SfxTabPage* SwDropCapsPage::Create(Window *pParent,
Page: FillItemSet-Overload
****************************************************************************/
-
sal_Bool SwDropCapsPage::FillItemSet(SfxItemSet &rSet)
{
if(bModified)
@@ -663,10 +625,9 @@ sal_Bool SwDropCapsPage::FillItemSet(SfxItemSet &rSet)
Page: Reset-Overload
****************************************************************************/
-
void SwDropCapsPage::Reset(const SfxItemSet &rSet)
{
- // Zeichen, Zeilen, Abstand und Text
+ // Characters, lines, gap and text
SwFmtDrop aFmtDrop((SwFmtDrop &) rSet.Get(RES_PARATR_DROP));
if (aFmtDrop.GetLines() > 1)
{
@@ -685,12 +646,13 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet)
::FillCharStyleListBox(aTemplateBox, rSh.GetView().GetDocShell(), sal_True);
aTemplateBox.InsertEntry(SW_RESSTR(SW_STR_NONE), 0);
- // Vorlage defaulten
+
+ // Reset format
aTemplateBox.SelectEntryPos(0);
if (aFmtDrop.GetCharFmt())
aTemplateBox.SelectEntry(aFmtDrop.GetCharFmt()->GetName());
- // Controls enablen
+ // Enable controls
aDropCapsBox.Check(aFmtDrop.GetLines() > 1);
const sal_uInt16 nVal = sal_uInt16(aDropCapsField.GetValue());
if (bFormat)
@@ -712,7 +674,7 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet)
}
/****************************************************************************
-Page: Click-Handler der CheckBox
+Page: CheckBox's Click-Handler
****************************************************************************/
@@ -747,7 +709,7 @@ IMPL_LINK( SwDropCapsPage, ClickHdl, Button *, EMPTYARG )
}
/****************************************************************************
-Page: Click-Handler der CheckBox
+Page: CheckBox's Click-Handler
****************************************************************************/
@@ -763,7 +725,7 @@ IMPL_LINK( SwDropCapsPage, WholeWordHdl, CheckBox *, EMPTYARG )
}
/****************************************************************************
-Page: Modify-Handler der SpinFields
+Page: SpinFields' Modify-Handler
****************************************************************************/
@@ -771,7 +733,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
{
String sPreview;
- // Ggf. Text setzen
+ // set text if applicable
if (pEdit == &aDropCapsField)
{
sal_uInt16 nVal;
@@ -801,7 +763,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
if (bSetText)
aTextEdit.SetText(sPreview);
}
- else if (pEdit == &aTextEdit) // Ggf. Anzahl setzen
+ else if (pEdit == &aTextEdit) // set quantity if applicable
{
sal_uInt16 nTmp = aTextEdit.GetText().Len();
aDropCapsField.SetValue(Max((sal_uInt16)1, nTmp));
@@ -809,7 +771,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
sPreview = aTextEdit.GetText().Copy(0, nTmp);
}
- // Bild anpassen
+ // adjust image
if (pEdit == &aDropCapsField || pEdit == &aTextEdit)
pPict->SetText (sPreview);
else if (pEdit == &aLinesField)
@@ -823,7 +785,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
}
/****************************************************************************
-Page: Select-Handler der Template-Box.
+Page: Template-Box' Select-Handler.
*****************************************************************************/
@@ -835,13 +797,11 @@ IMPL_LINK_INLINE_START( SwDropCapsPage, SelectHdl, ListBox *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwDropCapsPage, SelectHdl, ListBox *, EMPTYARG )
-
sal_uInt16* SwDropCapsPage::GetRanges()
{
return aPageRg;
}
-
void SwDropCapsPage::FillSet( SfxItemSet &rSet )
{
if(bModified)
@@ -851,13 +811,13 @@ void SwDropCapsPage::FillSet( SfxItemSet &rSet )
sal_Bool bOn = aDropCapsBox.IsChecked();
if(bOn)
{
- // Anzahl, Zeilen, Abstand
+ // quantity, lines, gap
aFmt.GetChars() = (sal_uInt8) aDropCapsField.GetValue();
aFmt.GetLines() = (sal_uInt8) aLinesField.GetValue();
aFmt.GetDistance() = (sal_uInt16) aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP));
aFmt.GetWholeWord() = aWholeWordCB.IsChecked();
- // Vorlage
+ // template
if (aTemplateBox.GetSelectEntryPos())
aFmt.SetCharFmt(rSh.GetCharStyle(aTemplateBox.GetSelectEntry()));
}
@@ -868,14 +828,14 @@ void SwDropCapsPage::FillSet( SfxItemSet &rSet )
aFmt.GetDistance() = 0;
}
- // Attribute setzen
+ // set attributes
const SfxPoolItem* pOldItem;
if(0 == (pOldItem = GetOldItem( rSet, FN_FORMAT_DROPCAPS )) ||
aFmt != *pOldItem )
rSet.Put(aFmt);
- // Harte Textformatierung
- // Bug 24974: In Gestalter/Vorlagenkatoplog macht das keinen Sinn!!
+ // hard text formatting
+ // Bug 24974: in designer/template catalog this doesn't make sense!!
if( !bFormat && aDropCapsBox.IsChecked() )
{
String sText(aTextEdit.GetText());
@@ -892,3 +852,4 @@ void SwDropCapsPage::FillSet( SfxItemSet &rSet )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/chrdlg/drpcps.src b/sw/source/ui/chrdlg/drpcps.src
index 458d83a5d079..82cdc5ecf445 100644
--- a/sw/source/ui/chrdlg/drpcps.src
+++ b/sw/source/ui/chrdlg/drpcps.src
@@ -25,7 +25,6 @@
*
************************************************************************/
- // #include *****************************************************************
#include "globals.hrc"
#include "chrdlg.hrc"
#include "drpcps.hrc"
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 20b99cc492fb..0b3de84f24b9 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,8 +33,6 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
-
#include "cmdid.h"
#include "swtypes.hxx"
#include "hintids.hxx"
@@ -41,28 +40,24 @@
#include "helpid.h"
#include <sfx2/objsh.hxx>
#include <svx/htmlmode.hxx>
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
#include <svl/intitem.hxx>
#include <fmtline.hxx>
#include <numpara.hxx>
#include <numpara.hrc>
-// --> OD 2008-04-14 #outlinelevel#
+
#include <app.hrc>
-// <--
+
// Globals ******************************************************************
-static sal_uInt16 __FAR_DATA aPageRg[] = {
+static sal_uInt16 aPageRg[] = {
FN_NUMBER_NEWSTART, FN_NUMBER_NEWSTART_AT,
0
};
-/*-----------------31.01.98 08:34-------------------
---------------------------------------------------*/
SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent,
const SfxItemSet& rAttr ) :
SfxTabPage(pParent, SW_RES(TP_NUMPARA), rAttr),
@@ -80,9 +75,7 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent,
aRestartParaCountCB ( this, SW_RES( CB_RESTART_PARACOUNT ) ),
aRestartFT ( this, SW_RES( FT_RESTART_NO ) ),
aRestartNF ( this, SW_RES( NF_RESTART_PARA ) ),
- // --> OD 2008-04-14 #outlinelevel#
msOutlineNumbering( SW_RES( STR_OUTLINE_NUMBERING ) ),
- // <--
bModified(sal_False),
bCurNumrule(sal_False)
{
@@ -114,36 +107,24 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent,
aNewStartNF.SetAccessibleName(aNewStartNumberCB.GetText());
aNewStartNF.SetAccessibleRelationLabeledBy(&aNewStartNumberCB);
}
-/*-----------------31.01.98 08:34-------------------
---------------------------------------------------*/
SwParagraphNumTabPage::~SwParagraphNumTabPage()
{
}
-/*-----------------31.01.98 08:38-------------------
-
---------------------------------------------------*/
SfxTabPage* SwParagraphNumTabPage::Create( Window* pParent,
const SfxItemSet& rSet )
{
return new SwParagraphNumTabPage(pParent, rSet);
}
-/*-----------------31.01.98 08:38-------------------
-
---------------------------------------------------*/
sal_uInt16* SwParagraphNumTabPage::GetRanges()
{
return aPageRg;
}
-/*-----------------31.01.98 08:38-------------------
-
---------------------------------------------------*/
sal_Bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
{
- //<-#outline level, added by zhaojianwei
if( aOutlineLvLB.GetSelectEntryPos() != aOutlineLvLB.GetSavedValue())
{
sal_uInt16 aOutlineLv = aOutlineLvLB.GetSelectEntryPos();
@@ -154,7 +135,7 @@ sal_Bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
delete pOutlineLv;
bModified = sal_True;
}
- //<-end
+
if( aNumberStyleLB.GetSelectEntryPos() != aNumberStyleLB.GetSavedValue())
{
String aStyle;
@@ -193,9 +174,6 @@ sal_Bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
return bModified;
}
-/*-----------------31.01.98 08:38-------------------
-
---------------------------------------------------*/
void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
{
sal_Bool bHasNumberStyle = sal_False;
@@ -223,7 +201,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
if(!aStyle.Len())
aStyle = aNumberStyleLB.GetEntry(0);
- if( aStyle.EqualsAscii("Outline"))// == String::CreateFromAscii("Outline")) //maybe need modify,zhaojianwei
+ if( aStyle.EqualsAscii("Outline"))
{
aNumberStyleLB.InsertEntry( msOutlineNumbering );
aNumberStyleLB.SelectEntry( msOutlineNumbering );
@@ -297,23 +275,18 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
bModified = sal_False;
}
-/*-----------------31.01.98 08:38-------------------
-
---------------------------------------------------*/
void SwParagraphNumTabPage::DisableOutline()
{
aOutlineLvFT.Disable();
aOutlineLvLB.Disable();
}
+
void SwParagraphNumTabPage::DisableNumbering()
{
aNumberStyleFT.Disable();
aNumberStyleLB.Disable();
}
-/*-----------------31.01.98 08:38-------------------
-
---------------------------------------------------*/
void SwParagraphNumTabPage::EnableNewStart()
{
aNewStartCB.Show();
@@ -321,9 +294,6 @@ void SwParagraphNumTabPage::EnableNewStart()
aNewStartNF.Show();
}
-/*-----------------31.01.98 08:56-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwParagraphNumTabPage, NewStartHdl_Impl, CheckBox*, EMPTYARG )
{
sal_Bool bEnable = aNewStartCB.IsChecked();
@@ -332,9 +302,6 @@ IMPL_LINK( SwParagraphNumTabPage, NewStartHdl_Impl, CheckBox*, EMPTYARG )
return 0;
}
-/*-----------------05.02.98 10:01-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwParagraphNumTabPage, LineCountHdl_Impl, CheckBox* , EMPTYARG)
{
aRestartParaCountCB.Enable(aCountParaCB.IsChecked());
@@ -347,15 +314,8 @@ IMPL_LINK( SwParagraphNumTabPage, LineCountHdl_Impl, CheckBox* , EMPTYARG)
return 0;
}
-/*-----------------05.02.98 13:39-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwParagraphNumTabPage, StyleHdl_Impl, ListBox*, pBox )
{
-// String dd=aNumberStyleLB.GetSavedValue();
-// if( msOutlineNumbering == dd)
- {
- }
sal_Bool bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0;
aNewStartCB.Enable(bEnable);
NewStartHdl_Impl(&aNewStartCB);
@@ -364,3 +324,4 @@ IMPL_LINK( SwParagraphNumTabPage, StyleHdl_Impl, ListBox*, pBox )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/chrdlg/numpara.src b/sw/source/ui/chrdlg/numpara.src
index a0747655ee03..67ce361330e9 100644
--- a/sw/source/ui/chrdlg/numpara.src
+++ b/sw/source/ui/chrdlg/numpara.src
@@ -26,7 +26,6 @@
************************************************************************/
// #pragma ******************************************************************
- // #include *****************************************************************
#include "globals.hrc"
#include "chrdlg.hrc"
#include "numpara.hrc"
diff --git a/sw/source/ui/chrdlg/paradlg.src b/sw/source/ui/chrdlg/paradlg.src
index 1384e4ae8fa3..8194ebbb799e 100644
--- a/sw/source/ui/chrdlg/paradlg.src
+++ b/sw/source/ui/chrdlg/paradlg.src
@@ -44,7 +44,6 @@ TabDialog DLG_PARA
PageItem
{
Identifier = TP_PARA_STD ;
- /* ### ACHTUNG: Neuer Text in Resource? Einzüge und Abstände : Einz³ge und Abstõnde */
Text [ en-US ] = "Indents & Spacing" ;
PageResID = TP_PARA_STD ;
};
@@ -57,7 +56,6 @@ TabDialog DLG_PARA
PageItem
{
Identifier = TP_PARA_EXT ;
- /* ### ACHTUNG: Neuer Text in Resource? Textflu?: Textflu?*/
Text [ en-US ] = "Text Flow" ;
PageResID = TP_PARA_EXT ;
};
@@ -112,7 +110,6 @@ TabDialog DLG_DRAWPARA
PageItem
{
Identifier = TP_PARA_STD ;
- /* ### ACHTUNG: Neuer Text in Resource? Einzüge und Abstände : Einz³ge und Abstõnde */
Text [ en-US ] = "Indents & Spacing" ;
PageResID = TP_PARA_STD ;
};
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index e91f2d67d880..b4f654e0de2c 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,8 +65,6 @@
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
#include <svx/flagsdef.hxx>
-// STATIC DATA -----------------------------------------------------------
-
SwParaDlg::SwParaDlg(Window *pParent,
SwView& rVw,
@@ -89,7 +88,7 @@ SwParaDlg::SwParaDlg(Window *pParent,
sal_Bool bHtmlMode = static_cast< sal_Bool >(nHtmlMode & HTMLMODE_ON);
if(pTitle)
{
- // Update des Titels
+ // Update title
String aTmp( GetText() );
aTmp += SW_RESSTR(STR_TEXTCOLL_HEADER);
aTmp += *pTitle;
@@ -98,19 +97,19 @@ SwParaDlg::SwParaDlg(Window *pParent,
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH), "GetTabPageRangesFunc fail!");
AddTabPage( TP_PARA_STD, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), "GetTabPageRangesFunc fail!");
AddTabPage( TP_PARA_ALIGN, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH) );
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
if (!bDrawParaDlg && (!bHtmlMode || pHtmlOpt->IsPrintLayoutExtension()))
{
- DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageRangesFunc fail!");
AddTabPage( TP_PARA_EXT, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH) );
}
@@ -120,8 +119,8 @@ SwParaDlg::SwParaDlg(Window *pParent,
SvtCJKOptions aCJKOptions;
if(!bHtmlMode && aCJKOptions.IsAsianTypographyEnabled())
{
- DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageRangesFunc fail!");
AddTabPage( TP_PARA_ASIAN, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN) );
}
else
@@ -133,8 +132,8 @@ SwParaDlg::SwParaDlg(Window *pParent,
RemoveTabPage(TP_TABULATOR);
else
{
- DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR), "GetTabPageRangesFunc fail!");
AddTabPage( TP_TABULATOR, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR) );
}
@@ -154,8 +153,8 @@ SwParaDlg::SwParaDlg(Window *pParent,
}
if(!bHtmlMode || (nHtmlMode & (HTMLMODE_SOME_STYLES|HTMLMODE_FULL_STYLES)))
{
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
}
else
@@ -164,8 +163,8 @@ SwParaDlg::SwParaDlg(Window *pParent,
}
if(!bHtmlMode || (nHtmlMode & HTMLMODE_PARA_BORDER))
{
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
AddTabPage(TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
}
else
@@ -177,17 +176,17 @@ SwParaDlg::SwParaDlg(Window *pParent,
}
-__EXPORT SwParaDlg::~SwParaDlg()
+SwParaDlg::~SwParaDlg()
{
}
-void __EXPORT SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
+void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
{
SwWrtShell& rSh = rView.GetWrtShell();
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
- // Bei Tabellenumrandung kann im Writer kein Schatten eingestellt werden
+ // Table borders cannot get any shade in Writer
if (nId == TP_BORDER)
{
aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,SW_BORDER_MODE_PARA));
@@ -216,8 +215,7 @@ void __EXPORT SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
}
else if( TP_PARA_EXT == nId )
{
- // Seitenumbruch nur, wenn der Cursor im Body-Bereich und nicht in
- // einer Tabelle steht
+ // pagebreak only when the cursor is in the body-area and not in a table
const sal_uInt16 eType = rSh.GetFrmType(0,sal_True);
if( !(FRMTYPE_BODY & eType) ||
rSh.GetSelectionType() & nsSelectionType::SEL_TBL )
@@ -241,12 +239,11 @@ void __EXPORT SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
}
else if( TP_NUMPARA == nId)
{
- //-->#outline level,added by zhaojianwei
SwTxtFmtColl* pTmpColl = rSh.GetCurTxtFmtColl();
if( pTmpColl && pTmpColl->IsAssignedToListLevelOfOutlineStyle() )
{
((SwParagraphNumTabPage&)rPage).DisableOutline() ;
- }//<-end
+ }
((SwParagraphNumTabPage&)rPage).EnableNewStart();
ListBox & rBox = ((SwParagraphNumTabPage&)rPage).GetStyleBox();
@@ -267,3 +264,4 @@ void __EXPORT SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/chrdlg/swbreak.src b/sw/source/ui/chrdlg/swbreak.src
index 2646ed141fec..c75e7d67ddf6 100644
--- a/sw/source/ui/chrdlg/swbreak.src
+++ b/sw/source/ui/chrdlg/swbreak.src
@@ -36,7 +36,6 @@ ModalDialog DLG_BREAK
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 161 , 114 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Umbruch einfügen : Umbruch einf³gen */
Text [ en-US ] = "Insert Break" ;
Moveable = TRUE ;
OKButton BT_OK
@@ -119,7 +118,6 @@ ModalDialog DLG_BREAK
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 */
Text [ en-US ] = "Change page ~number" ;
TabStop = TRUE ;
};
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 01aa945712cd..b37bd7b49382 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,17 +33,13 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
-
#include "cmdid.h"
-#include <tools/list.hxx>
#include "swmodule.hxx"
#include "view.hxx"
#include "wrtsh.hxx"
#include "globals.hrc"
#include "helpid.h"
-
#include <sfx2/styfitem.hxx>
#include "uitool.hxx"
@@ -59,22 +56,17 @@
#include "swuiccoll.hxx"
-static sal_uInt16 __FAR_DATA aPageRg[] = {
+static sal_uInt16 aPageRg[] = {
FN_COND_COLL, FN_COND_COLL,
0
};
-// Achtung im Code wird dieses Array direkt (0, 1, ...) indiziert
+// Warning! This table is indicated directly in code (0, 1, ...)
static long nTabs[] =
{ 2, // Number of Tabs
0, 100
};
-/****************************************************************************
-Page: Ctor
-****************************************************************************/
-
-
SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, SW_RES(TP_CONDCOLL), rSet),
@@ -103,7 +95,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
aAssignPB.SetAccessibleRelationMemberOf(&aConditionFL);
aTbLinks.SetAccessibleRelationLabeledBy(&aConditionCB);
- // Handler installieren
+ // Install handlers
aConditionCB.SetClickHdl( LINK(this, SwCondCollPage, OnOffHdl));
aTbLinks.SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
aStyleLB.SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
@@ -116,26 +108,25 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
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
+ aTbLinks.Resize(); // OS: Hack for the right selection
aTbLinks.SetSpaceBetweenEntries( 0 );
aTbLinks.SetHelpId(HID_COND_COLL_TABLIST);
SfxStyleFamilies aFamilies(SW_RES(DLG_STYLE_DESIGNER));
const SfxStyleFamilyItem* pFamilyItem = 0;
- sal_uInt16 nCount = aFamilies.Count();
- sal_uInt16 i;
- for( i = 0; i < nCount; ++i)
+ size_t nCount = aFamilies.size();
+ for( size_t i = 0; i < nCount; ++i )
{
- if(SFX_STYLE_FAMILY_PARA == (sal_uInt16)(pFamilyItem = aFamilies.GetObject(i))->GetFamily())
+ if(SFX_STYLE_FAMILY_PARA == (sal_uInt16)(pFamilyItem = aFamilies.at( i ))->GetFamily())
break;
}
const SfxStyleFilter& rFilterList = pFamilyItem->GetFilterList();
- for( i = 0; i < rFilterList.Count(); ++i)
+ for( size_t i = 0; i < rFilterList.size(); ++i )
{
- aFilterLB.InsertEntry(rFilterList.GetObject(i)->aName);
- sal_uInt16* pFilter = new sal_uInt16(rFilterList.GetObject(i)->nFlags);
+ aFilterLB.InsertEntry( rFilterList[ i ]->aName);
+ sal_uInt16* pFilter = new sal_uInt16(rFilterList[i]->nFlags);
aFilterLB.SetEntryData(i, pFilter);
}
aFilterLB.SelectEntryPos(1);
@@ -149,7 +140,7 @@ Page: Dtor
****************************************************************************/
-__EXPORT SwCondCollPage::~SwCondCollPage()
+SwCondCollPage::~SwCondCollPage()
{
for(sal_uInt16 i = 0; i < aFilterLB.GetEntryCount(); ++i)
delete (sal_uInt16*)aFilterLB.GetEntryData(i);
@@ -157,7 +148,7 @@ __EXPORT SwCondCollPage::~SwCondCollPage()
}
-int __EXPORT SwCondCollPage::DeactivatePage(SfxItemSet * _pSet)
+int SwCondCollPage::DeactivatePage(SfxItemSet * _pSet)
{
if( _pSet )
FillItemSet(*_pSet);
@@ -170,7 +161,7 @@ Page: Factory
****************************************************************************/
-SfxTabPage* __EXPORT SwCondCollPage::Create(Window *pParent, const SfxItemSet &rSet)
+SfxTabPage* SwCondCollPage::Create(Window *pParent, const SfxItemSet &rSet)
{
return new SwCondCollPage(pParent, rSet);
}
@@ -180,7 +171,7 @@ Page: FillItemSet-Overload
****************************************************************************/
-sal_Bool __EXPORT SwCondCollPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwCondCollPage::FillItemSet(SfxItemSet &rSet)
{
sal_Bool bModified = sal_True;
SwCondCollItem aCondItem;
@@ -198,7 +189,7 @@ Page: Reset-Overload
****************************************************************************/
-void __EXPORT SwCondCollPage::Reset(const SfxItemSet &/*rSet*/)
+void SwCondCollPage::Reset(const SfxItemSet &/*rSet*/)
{
if(bNewTemplate)
aConditionCB.Enable();
@@ -241,22 +232,11 @@ void __EXPORT SwCondCollPage::Reset(const SfxItemSet &/*rSet*/)
}
-/****************************************************************************
-
-****************************************************************************/
-
-
-sal_uInt16* __EXPORT SwCondCollPage::GetRanges()
+sal_uInt16* SwCondCollPage::GetRanges()
{
return aPageRg;
}
-
-/****************************************************************************
-
-****************************************************************************/
-
-
IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox )
{
const sal_Bool bEnable = pBox->IsChecked();
@@ -273,11 +253,6 @@ IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox )
return 0;
}
-/****************************************************************************
-
-****************************************************************************/
-
-
IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
{
SvLBoxEntry* pE = aTbLinks.FirstSelected();
@@ -285,7 +260,7 @@ IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
if( !pE || LISTBOX_ENTRY_NOTFOUND ==
( nPos = aTbLinks.GetModel()->GetAbsPos( pE ) ) )
{
- ASSERT( pE, "wo kommt der leere Eintrag her?" );
+ OSL_ENSURE( pE, "where's the empty entry from?" );
return 0;
}
@@ -307,11 +282,6 @@ IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
return 0;
}
-/****************************************************************************
-
-****************************************************************************/
-
-
IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
{
if(pBox == &aFilterLB)
@@ -322,6 +292,7 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
SfxStyleSheetBasePool* pPool = rSh.GetView().GetDocShell()->GetStyleSheetPool();
pPool->SetSearchMask(SFX_STYLE_FAMILY_PARA, nSearchFlags);
const SfxStyleSheetBase* pBase = pPool->First();
+
while( pBase )
{
if(!pFmt || pBase->GetName() != pFmt->GetName())
@@ -349,13 +320,10 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
return 0;
}
-/****************************************************************************
-
-****************************************************************************/
-
-
void SwCondCollPage::SetCollection( SwFmt* pFormat, sal_Bool bNew )
{
pFmt = pFormat;
bNewTemplate = bNew;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/chrdlg/tblnumfm.cxx b/sw/source/ui/chrdlg/tblnumfm.cxx
index 263cb9703ef5..f433d2d3d104 100644
--- a/sw/source/ui/chrdlg/tblnumfm.cxx
+++ b/sw/source/ui/chrdlg/tblnumfm.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,19 +33,12 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
-
-
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include <svx/numinf.hxx>
#include <swtypes.hxx>
#include <tblnumfm.hxx>
-#ifndef _CHRDLG_HRC
#include <chrdlg.hrc>
-#endif
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
@@ -54,10 +48,11 @@
SwNumFmtDlg::SwNumFmtDlg(Window* pParent, const SfxItemSet& rSet)
: SfxSingleTabDialog( pParent, rSet, 0 )
{
- // TabPage erzeugen
+ // Create TabPage
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT );
+
if ( fnCreatePage )
{
SfxTabPage* pNewPage = (*fnCreatePage)( this, rSet );
@@ -68,9 +63,9 @@ SwNumFmtDlg::SwNumFmtDlg(Window* pParent, const SfxItemSet& rSet)
}
}
-
SwNumFmtDlg::~SwNumFmtDlg()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/barcfg.cxx b/sw/source/ui/config/barcfg.cxx
index a271d50fd6dd..9fcc614f6de8 100644
--- a/sw/source/ui/config/barcfg.cxx
+++ b/sw/source/ui/config/barcfg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include "precompiled_sw.hxx"
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <wrtsh.hxx>
@@ -47,9 +48,6 @@ using namespace com::sun::star::uno;
#define SEL_TYPE_BEZIER 3
#define SEL_TYPE_GRAPHIC 4
-/* ---------------------------------------------------------------------------
-
- ---------------------------------------------------------------------------*/
SwToolbarConfigItem::SwToolbarConfigItem( sal_Bool bWeb ) :
ConfigItem(bWeb ? C2U("Office.WriterWeb/ObjectBar") : C2U("Office.Writer/ObjectBar"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE)
@@ -60,7 +58,7 @@ SwToolbarConfigItem::SwToolbarConfigItem( sal_Bool bWeb ) :
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength())
{
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -74,15 +72,11 @@ SwToolbarConfigItem::SwToolbarConfigItem( sal_Bool bWeb ) :
}
}
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
SwToolbarConfigItem::~SwToolbarConfigItem()
{
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
sal_Int32 lcl_getArrayIndex(int nSelType)
{
sal_Int32 nRet = -1;
@@ -101,9 +95,7 @@ sal_Int32 lcl_getArrayIndex(int nSelType)
nRet = SEL_TYPE_GRAPHIC;
return nRet;
}
-/* -----------------------------10.10.00 14:38--------------------------------
- ---------------------------------------------------------------------------*/
void SwToolbarConfigItem::SetTopToolbar( sal_Int32 nSelType, sal_Int32 nBarId )
{
sal_Int32 nProp = lcl_getArrayIndex(nSelType);
@@ -113,9 +105,7 @@ void SwToolbarConfigItem::SetTopToolbar( sal_Int32 nSelType, sal_Int32 nBarId )
SetModified();
}
}
-/* -----------------------------10.10.00 13:33--------------------------------
- ---------------------------------------------------------------------------*/
Sequence<OUString> SwToolbarConfigItem::GetPropertyNames()
{
static const char* aPropNames[] =
@@ -133,9 +123,7 @@ Sequence<OUString> SwToolbarConfigItem::GetPropertyNames()
pNames[i] = OUString::createFromAscii(aPropNames[i]);
return aNames;
}
-/* -----------------------------10.10.00 13:36--------------------------------
- ---------------------------------------------------------------------------*/
void SwToolbarConfigItem::Commit()
{
Sequence<OUString> aNames = GetPropertyNames();
@@ -150,3 +138,4 @@ void SwToolbarConfigItem::Commit()
void SwToolbarConfigItem::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/caption.cxx b/sw/source/ui/config/caption.cxx
index 25a3c85e1ee4..405a97694250 100644
--- a/sw/source/ui/config/caption.cxx
+++ b/sw/source/ui/config/caption.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include "precompiled_sw.hxx"
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include "numrule.hxx"
#include "caption.hxx"
@@ -37,15 +38,11 @@
#define VERSION_01 1
#define CAPTION_VERSION VERSION_01
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleId) :
bUseCaption(sal_False),
eObjType(eType),
nNumType(SVX_NUM_ARABIC),
- sNumberSeparator( ::rtl::OUString::createFromAscii(". ") ),
+ sNumberSeparator(RTL_CONSTASCII_USTRINGPARAM((". "))),
nPos(1),
nLevel(0),
sSeparator( String::CreateFromAscii( ": " ) ),
@@ -56,27 +53,15 @@ InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleI
aOleId = *pOleId;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
InsCaptionOpt::InsCaptionOpt(const InsCaptionOpt& rOpt)
{
*this = rOpt;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
InsCaptionOpt::~InsCaptionOpt()
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt )
{
bUseCaption = rOpt.bUseCaption;
@@ -96,87 +81,14 @@ InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt )
return *this;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
{
return (eObjType == rOpt.eObjType &&
- aOleId == rOpt.aOleId); // Damit gleiche Ole-IDs nicht mehrfach eingefuegt
- // werden koennen, auf nichts weiteres vergleichen
-
-
-/* &&
- sCategory == rOpt.sCategory &&
- nNumType == rOpt.nNumType &&
- sCaption == rOpt.sCaption &&
- nPos == rOpt.nPos &&
- nLevel == rOpt.nLevel &&
- cSeparator == rOpt.cSeparator);*/
-}
-
-/*************************************************************************
-|*
-|* InsCaptionOpt::operator>>()
-|*
-|* Beschreibung Stream-Leseoperator
-|*
-*************************************************************************/
-
-/*SvStream& operator>>( SvStream& rIStream, InsCaptionOpt& rCapOpt )
-{
- rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding();
- sal_uInt16 nVal;
- sal_uInt8 cVal;
- sal_uInt8 nVersion;
-
- rIStream >> nVersion;
- rIStream >> cVal; rCapOpt.UseCaption() = cVal != 0;
- rIStream >> nVal; rCapOpt.eObjType = (SwCapObjType)nVal;
- rIStream >> rCapOpt.aOleId;
-
- rIStream.ReadByteString( rCapOpt.sCategory, eEncoding );
- rIStream >> nVal; rCapOpt.nNumType = nVal;
- rIStream.ReadByteString( rCapOpt.sCaption, eEncoding );
- rIStream >> nVal; rCapOpt.nPos = nVal;
- rIStream >> nVal; rCapOpt.nLevel = nVal;
+ aOleId == rOpt.aOleId); // So that identical Ole-IDs can't be added multiple
+ // times, don't compare against anything else.
- rIStream >> cVal;
- rCapOpt.sSeparator = UniString(
- ByteString(static_cast< char >(cVal)) , eEncoding).GetChar(0);
- return rIStream;
}
-*/
-/*************************************************************************
-|*
-|* InsCaptionOpt::operator<<()
-|*
-|* Beschreibung Stream-Schreiboperator
-|*
-*************************************************************************/
-
-/*SvStream& operator<<( SvStream& rOStream, const InsCaptionOpt& rCapOpt )
-{
- rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding();
- rOStream << (sal_uInt8)CAPTION_VERSION
- << (sal_uInt8)rCapOpt.UseCaption()
- << (sal_uInt16)rCapOpt.eObjType
- << rCapOpt.aOleId;
- rOStream.WriteByteString( rCapOpt.sCategory, eEncoding );
-
- rOStream << (sal_uInt16)rCapOpt.nNumType;
-
- rOStream.WriteByteString( rCapOpt.sCaption, eEncoding );
-
- sal_uInt8 cSep = ByteString(rCapOpt.sSeparator, eEncoding).GetChar(0);
- rOStream << (sal_uInt16)rCapOpt.nPos
- << (sal_uInt16)rCapOpt.nLevel
- << cSep;
-
- return rOStream;
-}
-*/
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx
index 8197190b6c83..abacb5330812 100644
--- a/sw/source/ui/config/cfgitems.cxx
+++ b/sw/source/ui/config/cfgitems.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,13 +30,9 @@
#include "precompiled_sw.hxx"
-#ifndef __SBX_SBXVARIABLE_HXX //autogen
#include <basic/sbxvar.hxx>
-#endif
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
#include <editeng/svxenum.hxx>
@@ -46,14 +43,11 @@
#include "cfgitems.hxx"
#include "crstate.hxx"
-
-
TYPEINIT1_AUTOFACTORY(SwDocDisplayItem, SfxPoolItem)
TYPEINIT1_AUTOFACTORY(SwElemItem, SfxPoolItem)
TYPEINIT1_AUTOFACTORY(SwAddPrinterItem, SfxPoolItem)
TYPEINIT1_AUTOFACTORY(SwShadowCursorItem, SfxPoolItem)
-
SwDocDisplayItem::SwDocDisplayItem( sal_uInt16 _nWhich ) :
SfxPoolItem(_nWhich),
aIndexBackgrndCol(COL_GRAY)
@@ -70,20 +64,15 @@ SwDocDisplayItem::SwDocDisplayItem( sal_uInt16 _nWhich ) :
};
-/*------------OS 12.01.95 -------------------------------------------
- Item fuer Einstellungsdialog, Seite Dokumentansicht
+/*-------------------------------------------------------------------
+ Item for the Settings dialog, page document view
--------------------------------------------------------------------*/
-
SwDocDisplayItem::SwDocDisplayItem( const SwDocDisplayItem& rDocDisplayItem ):
SfxPoolItem(rDocDisplayItem)
{
*this = rDocDisplayItem;
};
-/*----------------------- -------------------------------------------
-
---------------------------------------------------------------------*/
-
SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich ) :
SfxPoolItem( _nWhich )
{
@@ -96,24 +85,16 @@ SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich
bFldHiddenText = rVOpt.IsShowHiddenField();
bManualBreak = rVOpt.IsLineBreak(sal_True);
bShowHiddenPara = rVOpt.IsShowHiddenPara();
-
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
SfxPoolItem* SwDocDisplayItem::Clone( SfxItemPool* ) const
{
return new SwDocDisplayItem( *this );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
int SwDocDisplayItem::operator==( const SfxPoolItem& rAttr ) const
{
- DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" );
+ OSL_ENSURE( SfxPoolItem::operator==(rAttr), "different types" );
const SwDocDisplayItem& rItem = (SwDocDisplayItem&)rAttr;
@@ -128,12 +109,6 @@ int SwDocDisplayItem::operator==( const SfxPoolItem& rAttr ) const
bShowHiddenPara == rItem.bShowHiddenPara );
}
-
-/*-----------------31.08.96 14.14-------------------
-
---------------------------------------------------*/
-
-
void SwDocDisplayItem::operator=( const SwDocDisplayItem& rDocDisplayItem)
{
bParagraphEnd = rDocDisplayItem.bParagraphEnd ;
@@ -147,9 +122,6 @@ void SwDocDisplayItem::operator=( const SwDocDisplayItem& rDocDisplayItem)
bShowHiddenPara = rDocDisplayItem.bShowHiddenPara ;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const
{
rVOpt.SetParagraph (bParagraphEnd );
@@ -163,10 +135,6 @@ void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const
rVOpt.SetShowHiddenPara(bShowHiddenPara );
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
SwElemItem::SwElemItem( sal_uInt16 _nWhich ) :
SfxPoolItem(_nWhich)
{
@@ -186,18 +154,12 @@ SwElemItem::SwElemItem( sal_uInt16 _nWhich ) :
bFieldName =
bNotes = sal_False;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
SwElemItem::SwElemItem( const SwElemItem& rElemItem ):
SfxPoolItem(rElemItem)
{
*this = rElemItem;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
SwElemItem::SwElemItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich) :
SfxPoolItem( _nWhich )
@@ -220,22 +182,14 @@ SwElemItem::SwElemItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich) :
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SfxPoolItem* SwElemItem::Clone( SfxItemPool* ) const
{
return new SwElemItem( *this );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
int SwElemItem::operator==( const SfxPoolItem& rAttr ) const
{
- DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" );
+ OSL_ENSURE( SfxPoolItem::operator==(rAttr), "different types" );
const SwElemItem& rItem = (SwElemItem&)rAttr;
@@ -256,11 +210,6 @@ int SwElemItem::operator==( const SfxPoolItem& rAttr ) const
bNotes == rItem.bNotes );
}
-/*-----------------31.08.96 14.13-------------------
-
---------------------------------------------------*/
-
-
void SwElemItem::operator=( const SwElemItem& rElemItem)
{
bHorzScrollbar = rElemItem. bHorzScrollbar ;
@@ -280,10 +229,6 @@ void SwElemItem::operator=( const SwElemItem& rElemItem)
bNotes = rElemItem.bNotes ;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const
{
rVOpt.SetViewHScrollBar(bHorzScrollbar );
@@ -304,11 +249,9 @@ void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const
rVOpt.SetPostIts (bNotes );
}
-
/*--------------------------------------------------------------------
- Beschreibung: CopyCTOR
+ Description: CopyCTOR
--------------------------------------------------------------------*/
-
SwAddPrinterItem::SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem ):
SfxPoolItem(rAddPrinterItem),
SwPrintData( rAddPrinterItem )
@@ -316,47 +259,39 @@ SwAddPrinterItem::SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem ):
}
/*--------------------------------------------------------------------
- Beschreibung: CTOR fuer leeres Item
+ Description: CTOR for empty Item
--------------------------------------------------------------------*/
-
SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich):
SfxPoolItem(_nWhich)
{
}
+
/*--------------------------------------------------------------------
- Beschreibung: CTOR aus SwPrintOptions
+ Description: CTOR from SwPrintOptions
--------------------------------------------------------------------*/
-
SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich, const SwPrintData& rPrtData ) :
SfxPoolItem(_nWhich)
{
SwPrintData::operator=(rPrtData);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
SfxPoolItem* SwAddPrinterItem::Clone( SfxItemPool* ) const
{
return new SwAddPrinterItem( *this );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
int SwAddPrinterItem::operator==( const SfxPoolItem& rAttr ) const
{
- DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" );
+ OSL_ENSURE( SfxPoolItem::operator==(rAttr), "different types" );
const SwAddPrinterItem& rItem = (SwAddPrinterItem&)rAttr;
return SwPrintData::operator==(rItem);
}
-/*-----------------03.11.97 10:00-------------------
- Item fuer Einstellungsdialog, ShadowCursorSeite
---------------------------------------------------*/
+/*--------------------------------------------------
+ Item for Settings dialog, ShadowCursorPage
+--------------------------------------------------*/
SwShadowCursorItem::SwShadowCursorItem( sal_uInt16 _nWhich )
: SfxPoolItem( _nWhich ),
eMode( FILL_TAB )
@@ -404,11 +339,7 @@ void SwShadowCursorItem::FillViewOptions( SwViewOption& rVOpt ) const
rVOpt.SetShdwCrsrFillMode( eMode );
}
-#ifdef DBG_UTIL
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
+#if OSL_DEBUG_LEVEL > 1
SwTestItem::SwTestItem( const SwTestItem& rTestItem ):
SfxPoolItem(rTestItem)
{
@@ -424,22 +355,14 @@ SwTestItem::SwTestItem( const SwTestItem& rTestItem ):
bTest10=rTestItem.bTest10;
};
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SfxPoolItem* SwTestItem::Clone( SfxItemPool* ) const
{
return new SwTestItem( *this );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
int SwTestItem::operator==( const SfxPoolItem& rAttr ) const
{
- DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" );
+ OSL_ENSURE( SfxPoolItem::operator==(rAttr), "different types" );
const SwTestItem& rItem = (const SwTestItem&) rAttr;
@@ -458,3 +381,5 @@ int SwTestItem::operator==( const SfxPoolItem& rAttr ) const
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/ui/config/config.hrc b/sw/source/ui/config/config.hrc
index 197e6482d7a1..33209779ed0c 100644
--- a/sw/source/ui/config/config.hrc
+++ b/sw/source/ui/config/config.hrc
@@ -29,9 +29,9 @@
#include "rcid.hrc"
-// Dialoge fuer die Konfiguration
+// dialogs for configuration
-// Strings fuer die Konfiguration
+// strings for configuration
#define STR_CFG_SIGNATUR (RC_CONFIG_BEGIN + 0)
#define DLG_CONFIG_VIEW (RC_CONFIG_BEGIN + 1)
#define DLG_CONFIG_MISC (RC_CONFIG_BEGIN + 2)
diff --git a/sw/source/ui/config/dbconfig.cxx b/sw/source/ui/config/dbconfig.cxx
index ade5163a5921..97761f63cd46 100644
--- a/sw/source/ui/config/dbconfig.cxx
+++ b/sw/source/ui/config/dbconfig.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <dbconfig.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <swdbdata.hxx>
@@ -42,7 +43,7 @@ using rtl::OUString;
using namespace com::sun::star::uno;
/*--------------------------------------------------------------------
- Beschreibung: Ctor
+ Description: Ctor
--------------------------------------------------------------------*/
const Sequence<OUString>& SwDBConfig::GetPropertyNames()
@@ -67,9 +68,7 @@ const Sequence<OUString>& SwDBConfig::GetPropertyNames()
}
return aNames;
}
-/* -----------------------------06.09.00 16:44--------------------------------
- ---------------------------------------------------------------------------*/
SwDBConfig::SwDBConfig() :
ConfigItem(C2U("Office.DataAccess"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
@@ -77,17 +76,13 @@ SwDBConfig::SwDBConfig() :
pBibImpl(0)
{
};
-/* -----------------------------06.09.00 16:50--------------------------------
- ---------------------------------------------------------------------------*/
SwDBConfig::~SwDBConfig()
{
delete pAdrImpl;
delete pBibImpl;
}
-/* -----------------------------20.02.01 12:32--------------------------------
- ---------------------------------------------------------------------------*/
void SwDBConfig::Load()
{
const Sequence<OUString>& rNames = GetPropertyNames();
@@ -101,7 +96,7 @@ void SwDBConfig::Load()
}
Sequence<Any> aValues = GetProperties(rNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == rNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == rNames.getLength(), "GetProperties failed");
if(aValues.getLength() == rNames.getLength())
{
for(int nProp = 0; nProp < rNames.getLength(); nProp++)
@@ -118,18 +113,14 @@ void SwDBConfig::Load()
}
}
}
-/* -----------------------------20.02.01 12:36--------------------------------
- ---------------------------------------------------------------------------*/
const SwDBData& SwDBConfig::GetAddressSource()
{
if(!pAdrImpl)
Load();
return *pAdrImpl;
}
-/* -----------------29.11.2002 11:43-----------------
- *
- * --------------------------------------------------*/
+
const SwDBData& SwDBConfig::GetBibliographySource()
{
if(!pBibImpl)
@@ -141,3 +132,4 @@ void SwDBConfig::Commit() {}
void SwDBConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx
index 140b8da8c42c..efc3c670fb15 100644
--- a/sw/source/ui/config/fontcfg.cxx
+++ b/sw/source/ui/config/fontcfg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <fontcfg.hxx>
#include <i18npool/mslangid.hxx>
#include <vcl/outdev.hxx>
@@ -44,18 +44,13 @@ using namespace utl;
using rtl::OUString;
using namespace com::sun::star::uno;
-/* -----------------07.10.2002 12:15-----------------
- *
- * --------------------------------------------------*/
inline LanguageType lcl_LanguageOfType(sal_Int16 nType, sal_Int16 eWestern, sal_Int16 eCJK, sal_Int16 eCTL)
{
return LanguageType(
nType < FONT_STANDARD_CJK ? eWestern :
nType >= FONT_STANDARD_CTL ? eCTL : eCJK);
}
-/* -----------------------------08.09.00 15:52--------------------------------
- ---------------------------------------------------------------------------*/
Sequence<OUString> SwStdFontConfig::GetPropertyNames()
{
Sequence<OUString> aNames;
@@ -104,9 +99,6 @@ Sequence<OUString> SwStdFontConfig::GetPropertyNames()
}
return aNames;
}
-/*-----------------03.09.96 15.00-------------------
-
---------------------------------------------------*/
SwStdFontConfig::SwStdFontConfig() :
utl::ConfigItem(C2U("Office.Writer"))
@@ -129,7 +121,7 @@ SwStdFontConfig::SwStdFontConfig() :
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength())
{
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -151,9 +143,7 @@ SwStdFontConfig::SwStdFontConfig() :
}
}
}
-/* -----------------------------08.09.00 15:58--------------------------------
- ---------------------------------------------------------------------------*/
void SwStdFontConfig::Commit()
{
Sequence<OUString> aNames = GetPropertyNames();
@@ -184,14 +174,11 @@ void SwStdFontConfig::Commit()
}
PutProperties(aNames, aValues);
}
-/* -----------------------------08.09.00 15:56--------------------------------
- ---------------------------------------------------------------------------*/
SwStdFontConfig::~SwStdFontConfig()
-{}
-/*-----------------18.01.97 10.05-------------------
+{
+}
---------------------------------------------------*/
sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const
{
sal_Bool bSame = sal_False;
@@ -250,9 +237,6 @@ sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const
return bSame;
}
-/* -----------------11.01.99 13:16-------------------
- * Standards auslesen
- * --------------------------------------------------*/
String SwStdFontConfig::GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang)
{
String sRet;
@@ -280,10 +264,6 @@ String SwStdFontConfig::GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang)
case FONT_INDEX_CTL :
nFontId = DEFAULTFONT_CTL_TEXT;
break;
-// case FONT_STANDARD:
-// case FONT_LIST :
-// case FONT_CAPTION :
-// case FONT_INDEX :
default:
nFontId = DEFAULTFONT_LATIN_TEXT;
}
@@ -291,9 +271,6 @@ String SwStdFontConfig::GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang)
return aFont.GetName();
}
-/*-- 11.10.2005 10:43:43---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Int32 SwStdFontConfig::GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang)
{
sal_Int32 nRet = FONTSIZE_DEFAULT;
@@ -303,7 +280,10 @@ sal_Int32 SwStdFontConfig::GetDefaultHeightFor(sal_uInt16 nFontType, LanguageTyp
case FONT_OUTLINE_CJK:
case FONT_OUTLINE_CTL:
nRet = FONTSIZE_OUTLINE;
- break;
+ break;
+ case FONT_STANDARD_CJK:
+ nRet = FONTSIZE_CJK_DEFAULT;
+ break;
}
if( eLang == LANGUAGE_THAI && nFontType >= FONT_STANDARD_CTL )
{
@@ -312,12 +292,9 @@ sal_Int32 SwStdFontConfig::GetDefaultHeightFor(sal_uInt16 nFontType, LanguageTyp
return nRet;
}
-/*-- 11.10.2005 10:50:06---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwStdFontConfig::ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight )
{
- DBG_ASSERT( nFontType < DEF_FONT_COUNT, "invalid index in SwStdFontConfig::ChangInt()");
+ OSL_ENSURE( nFontType < DEF_FONT_COUNT, "invalid index in SwStdFontConfig::ChangInt()");
if( nFontType < DEF_FONT_COUNT && nDefaultFontHeight[nFontType] != nHeight)
{
SvtLinguOptions aLinguOpt;
@@ -343,12 +320,9 @@ void SwStdFontConfig::ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight )
}
}
-/*-- 08.11.2005 14:18:26---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Int32 SwStdFontConfig::GetFontHeight( sal_uInt8 nFont, sal_uInt8 nScriptType, LanguageType eLang )
{
- DBG_ASSERT(nFont + FONT_PER_GROUP * nScriptType < DEF_FONT_COUNT, "wrong index in SwStdFontConfig::GetFontHeight()");
+ OSL_ENSURE(nFont + FONT_PER_GROUP * nScriptType < DEF_FONT_COUNT, "wrong index in SwStdFontConfig::GetFontHeight()");
sal_Int32 nRet = nDefaultFontHeight[nFont + FONT_PER_GROUP * nScriptType];
if(nRet <= 0)
return GetDefaultHeightFor(nFont + FONT_PER_GROUP * nScriptType, eLang);
@@ -357,3 +331,4 @@ sal_Int32 SwStdFontConfig::GetFontHeight( sal_uInt8 nFont, sal_uInt8 nScriptType
void SwStdFontConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index b8a34bad578b..4e45e713e49e 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,9 +41,7 @@
#include <svtools/headbar.hxx>
#include <mmconfigitem.hxx>
#include <mailmergehelper.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <vcl/svapp.hxx>
#include <comphelper/processfactory.hxx>
#include "com/sun/star/mail/MailServiceType.hpp"
@@ -59,9 +58,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::mail;
using namespace ::com::sun::star::beans;
using ::rtl::OUString;
-/*-- 06.05.2004 12:04:11---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwTestAccountSettingsDialog : public SfxModalDialog
{
FixedInfo m_aInfoFI;
@@ -99,9 +96,7 @@ public:
SwTestAccountSettingsDialog(SwMailConfigPage* pParent);
~SwTestAccountSettingsDialog();
};
-/*-- 19.08.2004 14:27:33---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwAuthenticationSettingsDialog : public SfxModalDialog
{
CheckBox m_aAuthenticationCB;
@@ -146,9 +141,6 @@ public:
~SwAuthenticationSettingsDialog();
};
-/*-- 06.05.2004 10:59:40---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwMailConfigPage::SwMailConfigPage( Window* pParent, const SfxItemSet& rSet ) :
SfxTabPage(pParent, SW_RES(TP_MAILCONFIG), rSet),
#ifdef MSC
@@ -181,23 +173,17 @@ SwMailConfigPage::SwMailConfigPage( Window* pParent, const SfxItemSet& rSet ) :
m_aServerAuthenticationPB.SetClickHdl(LINK(this, SwMailConfigPage, AuthenticationHdl));
m_aTestPB.SetClickHdl(LINK(this, SwMailConfigPage, TestHdl));
}
-/*-- 06.05.2004 10:59:40---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailConfigPage::~SwMailConfigPage()
{
delete m_pConfigItem;
}
-/*-- 06.05.2004 10:59:40---------------------------------------------------
- -----------------------------------------------------------------------*/
SfxTabPage* SwMailConfigPage::Create( Window* pParent, const SfxItemSet& rAttrSet)
{
return new SwMailConfigPage(pParent, rAttrSet);
}
-/*-- 06.05.2004 10:59:41---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ )
{
if(m_aDisplayNameED.GetText() != m_aDisplayNameED.GetSavedValue())
@@ -220,9 +206,7 @@ sal_Bool SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ )
m_pConfigItem->Commit();
return sal_True;
}
-/*-- 06.05.2004 10:59:41---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailConfigPage::Reset( const SfxItemSet& /*rSet*/ )
{
m_aDisplayNameED.SetText(m_pConfigItem->GetMailDisplayName());
@@ -245,9 +229,7 @@ void SwMailConfigPage::Reset( const SfxItemSet& /*rSet*/ )
m_aPortNF .SaveValue();
m_aSecureCB .SaveValue();
}
-/*-- 06.05.2004 10:59:41---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailConfigPage, ReplyToHdl, CheckBox*, pBox)
{
sal_Bool bEnable = pBox->IsChecked();
@@ -255,26 +237,20 @@ IMPL_LINK(SwMailConfigPage, ReplyToHdl, CheckBox*, pBox)
m_aReplyToED.Enable(bEnable);
return 0;
}
-/*-- 06.05.2004 10:59:41---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailConfigPage, AuthenticationHdl, PushButton*, EMPTYARG)
{
SwAuthenticationSettingsDialog aDlg(this, *m_pConfigItem);
aDlg.Execute();
return 0;
}
-/*-- 06.05.2004 10:59:42---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailConfigPage, TestHdl, PushButton*, EMPTYARG)
{
SwTestAccountSettingsDialog(this).Execute();
return 0;
}
-/*-- 06.05.2004 12:11:13---------------------------------------------------
- -----------------------------------------------------------------------*/
SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pParent) :
SfxModalDialog(pParent, SW_RES(DLG_MM_TESTACCOUNTSETTINGS)),
#ifdef MSC
@@ -292,7 +268,7 @@ SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pPare
#ifdef MSC
#pragma warning (default : 4355)
#endif
- m_aImageList( SW_RES( GetSettings().GetStyleSettings().GetHighContrastMode() ? ILIST_HC : ILIST) ),
+ m_aImageList( SW_RES(ILIST) ),
m_sTask( SW_RES( ST_TASK )),
m_sStatus( SW_RES( ST_STATUS )),
m_sEstablish( SW_RES( ST_ESTABLISH )),
@@ -338,23 +314,17 @@ SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pPare
Application::PostUserEvent( STATIC_LINK( this, SwTestAccountSettingsDialog, TestHdl ), this );
}
-/*-- 06.05.2004 12:11:13---------------------------------------------------
- -----------------------------------------------------------------------*/
SwTestAccountSettingsDialog::~SwTestAccountSettingsDialog()
{
}
-/*-- 06.05.2004 12:15:43---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwTestAccountSettingsDialog, StopHdl, PushButton*, EMPTYARG)
{
m_bStop = true;
return 0;
}
-/*-- 07.06.2004 12:44:50---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_STATIC_LINK(SwTestAccountSettingsDialog, TestHdl, void*, EMPTYARG)
{
pThis->EnterWait();
@@ -362,9 +332,7 @@ IMPL_STATIC_LINK(SwTestAccountSettingsDialog, TestHdl, void*, EMPTYARG)
pThis->LeaveWait();
return 0;
}
-/*-- 07.06.2004 12:45:45---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwTestAccountSettingsDialog::Test()
{
uno::Reference<XMultiServiceFactory> rMgr = ::comphelper::getProcessServiceFactory();
@@ -406,7 +374,7 @@ void SwTestAccountSettingsDialog::Test()
new SwConnectionContext(
m_pParent->m_pConfigItem->GetInServerName(),
m_pParent->m_pConfigItem->GetInServerPort(),
- ::rtl::OUString::createFromAscii( "Insecure" ));
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Insecure")));
xInMailService->connect(xConnectionContext, xAuthenticator);
}
if(m_bStop)
@@ -436,8 +404,7 @@ void SwTestAccountSettingsDialog::Test()
new SwConnectionContext(
m_pParent->m_aServerED.GetText(),
sal::static_int_cast< sal_Int16, sal_Int64 >(m_pParent->m_aPortNF.GetValue()),
- ::rtl::OUString::createFromAscii(
- m_pParent->m_aSecureCB.IsChecked() ? "Ssl" : "Insecure"));
+ m_pParent->m_aSecureCB.IsChecked() ? OUString(RTL_CONSTASCII_USTRINGPARAM("Ssl")) : OUString(RTL_CONSTASCII_USTRINGPARAM("Insecure")));
xMailService->connect(xConnectionContext, xAuthenticator);
bIsLoggedIn = xMailService->isConnected();
if( xInMailService.is() )
@@ -447,7 +414,7 @@ void SwTestAccountSettingsDialog::Test()
}
catch(uno::Exception&)
{
- DBG_ERROR("exception caught");
+ OSL_ENSURE(false, "exception caught");
}
}
@@ -473,24 +440,18 @@ void SwTestAccountSettingsDialog::Test()
m_eErrorsED.SetText( m_sErrorServer );
}
}
-/*-- 18.08.2004 12:18:38---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailConfigDlg::SwMailConfigDlg(Window* pParent, SfxItemSet& rSet ) :
SfxSingleTabDialog(pParent, rSet, 0)
{
- // TabPage erzeugen
+ // create TabPage
SetTabPage(SwMailConfigPage::Create( this, rSet ));
}
-/*-- 18.08.2004 12:18:38---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailConfigDlg::~SwMailConfigDlg()
{
}
-/*-- 19.08.2004 14:33:58---------------------------------------------------
- -----------------------------------------------------------------------*/
SwAuthenticationSettingsDialog::SwAuthenticationSettingsDialog(
SwMailConfigPage* pParent, SwMailMergeConfigItem& rItem) :
SfxModalDialog(pParent, SW_RES(DLG_MM_SERVERAUTHENTICATION)),
@@ -553,15 +514,11 @@ SwAuthenticationSettingsDialog::SwAuthenticationSettingsDialog(
CheckBoxHdl_Impl( &m_aAuthenticationCB );
}
-/*-- 19.08.2004 14:33:58---------------------------------------------------
- -----------------------------------------------------------------------*/
SwAuthenticationSettingsDialog::~SwAuthenticationSettingsDialog()
{
}
-/*-- 19.08.2004 14:33:59---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwAuthenticationSettingsDialog, OKHdl_Impl, OKButton*, EMPTYARG)
{
rConfigItem.SetAuthentication( m_aAuthenticationCB.IsChecked() );
@@ -577,9 +534,7 @@ IMPL_LINK( SwAuthenticationSettingsDialog, OKHdl_Impl, OKButton*, EMPTYARG)
EndDialog(RET_OK);
return 0;
}
-/*-- 19.08.2004 14:33:59---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwAuthenticationSettingsDialog, CheckBoxHdl_Impl, CheckBox*, pBox)
{
sal_Bool bChecked = pBox->IsChecked();
@@ -589,9 +544,7 @@ IMPL_LINK( SwAuthenticationSettingsDialog, CheckBoxHdl_Impl, CheckBox*, pBox)
return 0;
}
-/*-- 19.08.2004 14:33:59---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwAuthenticationSettingsDialog, RadioButtonHdl_Impl, RadioButton*, EMPTYARG)
{
sal_Bool bSeparate = m_aSeparateAuthenticationRB.IsChecked();
@@ -620,3 +573,5 @@ IMPL_LINK( SwAuthenticationSettingsDialog, RadioButtonHdl_Impl, RadioButton*, EM
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/mailconfigpage.hrc b/sw/source/ui/config/mailconfigpage.hrc
index a7115878ccf5..7ff97978f968 100644
--- a/sw/source/ui/config/mailconfigpage.hrc
+++ b/sw/source/ui/config/mailconfigpage.hrc
@@ -61,7 +61,6 @@
#define ST_FAILED 44
#define ST_ERROR_SERVER 46
#define ILIST 47
-#define ILIST_HC 48
#define CB_AUTHENTICATION 50
#define RB_SEP_AUTHENTICATION 51
diff --git a/sw/source/ui/config/mailconfigpage.src b/sw/source/ui/config/mailconfigpage.src
index 726754fa694e..523f25e8e5f9 100644
--- a/sw/source/ui/config/mailconfigpage.src
+++ b/sw/source/ui/config/mailconfigpage.src
@@ -230,13 +230,6 @@ ModalDialog DLG_MM_TESTACCOUNTSETTINGS
MaskColor = IMAGE_MASK_COLOR;
IMGLIST_IDS;
};
-
- ImageList ILIST_HC
- {
- Prefix = "sch";
- MaskColor = IMAGE_MASK_COLOR ;
- IMGLIST_IDS;
- };
String ST_TASK
{
Text[ en-US ] = "Task";
diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx
index 69414515a404..77febc6a21f1 100644
--- a/sw/source/ui/config/modcfg.cxx
+++ b/sw/source/ui/config/modcfg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,18 +35,14 @@
#include <tools/stream.hxx>
#include <vcl/svapp.hxx>
#include <svl/mailenum.hxx>
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
#include <editeng/svxenum.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <tools/globname.hxx>
#include <swtypes.hxx>
#include <itabenum.hxx>
-#ifndef _MODCFG_HXX
#include <modcfg.hxx>
-#endif
#include <fldupde.hxx>
#include <unotools/syslocaleoptions.hxx>
#include <caption.hxx>
@@ -64,9 +61,7 @@ using namespace com::sun::star::uno;
#define GLOB_NAME_CHART 4
SV_IMPL_PTRARR_SORT(InsCapOptArr, InsCaptionOptPtr)
-/* -----------------03.11.98 13:46-------------------
- *
- * --------------------------------------------------*/
+
InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalName *pOleId) const
{
for (sal_uInt16 i = 0; i < Count(); i++ )
@@ -82,16 +77,12 @@ InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalNa
return 0;
}
-/* -----------------03.11.98 15:05-------------------
- *
- * --------------------------------------------------*/
-
const InsCaptionOpt* SwModuleOptions::GetCapOption(
sal_Bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId)
{
if(bHTML)
{
- DBG_ERROR("no caption option in sw/web!");
+ OSL_ENSURE(false, "no caption option in sw/web!");
return 0;
}
else
@@ -108,17 +99,13 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption(
}
}
-/* -----------------03.11.98 15:05-------------------
- *
- * --------------------------------------------------*/
-
sal_Bool SwModuleOptions::SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt)
{
sal_Bool bRet = sal_False;
if(bHTML)
{
- DBG_ERROR("no caption option in sw/web!");
+ OSL_ENSURE(false, "no caption option in sw/web!");
}
else if (pOpt)
{
@@ -152,9 +139,7 @@ sal_Bool SwModuleOptions::SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt
return bRet;
}
-/*-----------------13.01.97 12.44-------------------
---------------------------------------------------*/
SwModuleOptions::SwModuleOptions() :
aInsertConfig(sal_False),
aWebInsertConfig(sal_True),
@@ -163,9 +148,7 @@ SwModuleOptions::SwModuleOptions() :
bHideFieldTips(sal_False)
{
}
-/* -----------------------------19.01.01 12:26--------------------------------
- ---------------------------------------------------------------------------*/
String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFromUI)
{
String sReturn;
@@ -205,7 +188,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFro
nVal -= 'a' - 10;
else
{
- DBG_ERROR( "ungueltiger Hex-Wert" );
+ OSL_ENSURE(false, "wrong hex value" );
bValidData = sal_False;
break;
}
@@ -218,7 +201,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFro
break;
}
- default: // Unbekannt, daher nur Backslash einfuegen
+ default: // Unknown, so insert backslash
sReturn += '\\';
i--;
break;
@@ -253,9 +236,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFro
}
return sReturn;
}
-/* -----------------------------10.10.00 16:22--------------------------------
- ---------------------------------------------------------------------------*/
const Sequence<OUString>& SwRevisionConfig::GetPropertyNames()
{
static Sequence<OUString> aNames;
@@ -280,9 +261,7 @@ const Sequence<OUString>& SwRevisionConfig::GetPropertyNames()
}
return aNames;
}
-/*-- 10.10.00 16:22:22---------------------------------------------------
- -----------------------------------------------------------------------*/
SwRevisionConfig::SwRevisionConfig() :
ConfigItem(C2U("Office.Writer/Revision"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE)
@@ -299,15 +278,11 @@ SwRevisionConfig::SwRevisionConfig() :
Load();
}
-/*-- 10.10.00 16:22:23---------------------------------------------------
- -----------------------------------------------------------------------*/
SwRevisionConfig::~SwRevisionConfig()
{
}
-/*-- 10.10.00 16:22:56---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 lcl_ConvertAttrToCfg(const AuthorCharAttr& rAttr)
{
sal_Int32 nRet = 0;
@@ -332,7 +307,7 @@ sal_Int32 lcl_ConvertAttrToCfg(const AuthorCharAttr& rAttr)
}
return nRet;
}
-//-----------------------------------------------------------------------------
+
void SwRevisionConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
void SwRevisionConfig::Commit()
@@ -359,9 +334,7 @@ void SwRevisionConfig::Commit()
}
PutProperties(aNames, aValues);
}
-/*-- 10.10.00 16:22:56---------------------------------------------------
- -----------------------------------------------------------------------*/
void lcl_ConvertCfgToAttr(sal_Int32 nVal, AuthorCharAttr& rAttr, sal_Bool bDelete = sal_False)
{
rAttr.nItemId = rAttr.nAttr = 0;
@@ -393,7 +366,7 @@ void SwRevisionConfig::Load()
const Sequence<OUString>& aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength())
{
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -417,9 +390,7 @@ void SwRevisionConfig::Load()
}
}
}
-/* -----------------------------10.10.00 16:22--------------------------------
- ---------------------------------------------------------------------------*/
enum InsertConfigProp
{
INS_PROP_TABLE_HEADER = 0,
@@ -628,15 +599,13 @@ const Sequence<OUString>& SwInsertConfig::GetPropertyNames()
OUString* pWebNames = aWebNames.getArray();
int i;
for(i = 0; i < nCount; i++)
- pNames[i] = C2U(aPropNames[i]);
+ pNames[i] = rtl::OUString::createFromAscii(aPropNames[i]);
for(i = 0; i < nWebCount; i++)
- pWebNames[i] = C2U(aPropNames[i]);
+ pWebNames[i] = rtl::OUString::createFromAscii(aPropNames[i]);
}
return bIsWeb ? aWebNames : aNames;
}
-/*-- 10.10.00 16:22:22---------------------------------------------------
- -----------------------------------------------------------------------*/
SwInsertConfig::SwInsertConfig(sal_Bool bWeb) :
ConfigItem(bWeb ? C2U("Office.WriterWeb/Insert") : C2U("Office.Writer/Insert"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
@@ -657,17 +626,13 @@ SwInsertConfig::SwInsertConfig(sal_Bool bWeb) :
Load();
}
-/*-- 10.10.00 16:22:23---------------------------------------------------
- -----------------------------------------------------------------------*/
SwInsertConfig::~SwInsertConfig()
{
delete pCapOptions;
delete pOLEMiscOpt;
}
-/*-- 10.10.00 16:22:56---------------------------------------------------
- -----------------------------------------------------------------------*/
void lcl_WriteOpt(const InsCaptionOpt& rOpt, Any* pValues, sal_Int32 nProp, sal_Int32 nOffset)
{
switch(nOffset)
@@ -689,7 +654,7 @@ void lcl_WriteOpt(const InsCaptionOpt& rOpt, Any* pValues, sal_Int32 nProp, sal_
case 9: pValues[nProp] <<= rOpt.CopyAttributes(); break; //ApplyAttributes
}
}
-//-----------------------------------------------------------------------------
+
void SwInsertConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
void SwInsertConfig::Commit()
@@ -867,9 +832,7 @@ void SwInsertConfig::Commit()
}
PutProperties(aNames, aValues);
}
-/*-- 10.10.00 16:22:56---------------------------------------------------
- -----------------------------------------------------------------------*/
void lcl_ReadOpt(InsCaptionOpt& rOpt, const Any* pValues, sal_Int32 nProp, sal_Int32 nOffset)
{
switch(nOffset)
@@ -936,13 +899,13 @@ void lcl_ReadOpt(InsCaptionOpt& rOpt, const Any* pValues, sal_Int32 nProp, sal_I
break;
}
}
-//-----------------------------------------------------------------------------
+
void SwInsertConfig::Load()
{
const Sequence<OUString>& aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength())
{
InsCaptionOpt* pWriterTableOpt = 0;
@@ -1167,9 +1130,7 @@ void SwInsertConfig::Load()
aInsTblOpts.mnInsMode = nInsTblFlags;
}
}
-/* -----------------------------10.10.00 16:22--------------------------------
- ---------------------------------------------------------------------------*/
const Sequence<OUString>& SwTableConfig::GetPropertyNames()
{
const int nCount = 8;
@@ -1190,24 +1151,18 @@ const Sequence<OUString>& SwTableConfig::GetPropertyNames()
pNames[i] = OUString::createFromAscii(aPropNames[i]);
return aNames;
}
-/*-- 10.10.00 16:22:22---------------------------------------------------
- -----------------------------------------------------------------------*/
SwTableConfig::SwTableConfig(sal_Bool bWeb) :
ConfigItem(bWeb ? C2U("Office.WriterWeb/Table") : C2U("Office.Writer/Table"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE)
{
Load();
}
-/*-- 10.10.00 16:22:23---------------------------------------------------
- -----------------------------------------------------------------------*/
SwTableConfig::~SwTableConfig()
{
}
-/*-- 10.10.00 16:22:56---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwTableConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
void SwTableConfig::Commit()
@@ -1233,15 +1188,13 @@ void SwTableConfig::Commit()
}
PutProperties(aNames, aValues);
}
-/*-- 10.10.00 16:22:56---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwTableConfig::Load()
{
const Sequence<OUString>& aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength())
{
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -1264,9 +1217,7 @@ void SwTableConfig::Load()
}
}
}
-/*-- 18.01.01 17:02:47---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMiscConfig::SwMiscConfig() :
ConfigItem(C2U("Office.Writer"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
@@ -1281,15 +1232,11 @@ SwMiscConfig::SwMiscConfig() :
{
Load();
}
-/*-- 18.01.01 17:02:47---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMiscConfig::~SwMiscConfig()
{
}
-/*-- 18.01.01 17:02:47---------------------------------------------------
- -----------------------------------------------------------------------*/
const Sequence<OUString>& SwMiscConfig::GetPropertyNames()
{
static Sequence<OUString> aNames;
@@ -1314,13 +1261,11 @@ const Sequence<OUString>& SwMiscConfig::GetPropertyNames()
};
OUString* pNames = aNames.getArray();
for(int i = 0; i < nCount; i++)
- pNames[i] = C2U(aPropNames[i]);
+ pNames[i] = rtl::OUString::createFromAscii(aPropNames[i]);
}
return aNames;
}
-/*-- 18.01.01 17:02:47---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMiscConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
void SwMiscConfig::Commit()
@@ -1353,15 +1298,13 @@ void SwMiscConfig::Commit()
}
PutProperties(aNames, aValues);
}
-/*-- 18.01.01 17:02:48---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMiscConfig::Load()
{
const Sequence<OUString>& aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength())
{
OUString sTmp;
@@ -1390,3 +1333,5 @@ void SwMiscConfig::Load()
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index e54ef583d50c..9c1881309084 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,9 +44,7 @@
#include "optcomp.hrc"
#include "globals.hrc"
#include <tools/urlobj.hxx>
-#ifndef _UTL__HXX_
#include <unotools/configmgr.hxx>
-#endif
#include <vcl/msgbox.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
@@ -182,15 +181,11 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe
m_aOptionsLB.SetSizePixel( aNewSz );
}
-// -----------------------------------------------------------------------
-
SwCompatibilityOptPage::~SwCompatibilityOptPage()
{
delete m_pImpl;
}
-// -----------------------------------------------------------------------
-
void SwCompatibilityOptPage::ReplaceFormatName( String& rEntry )
{
static const String sOpenOfficeName = String::CreateFromAscii("OpenOffice.org");
@@ -216,8 +211,6 @@ void SwCompatibilityOptPage::ReplaceFormatName( String& rEntry )
}
}
-// -----------------------------------------------------------------------
-
sal_uLong convertBools2Ulong_Impl
(
bool _bUsePrtMetrics,
@@ -272,8 +265,6 @@ sal_uLong convertBools2Ulong_Impl
return nRet;
}
-// -----------------------------------------------------------------------
-
void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
{
// init objectshell and detect document name
@@ -406,8 +397,6 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
}
}
-// -----------------------------------------------------------------------
-
IMPL_LINK( SwCompatibilityOptPage, SelectHdl, ListBox*, EMPTYARG )
{
sal_uInt16 nPos = m_aFormattingLB.GetSelectEntryPos();
@@ -417,8 +406,6 @@ IMPL_LINK( SwCompatibilityOptPage, SelectHdl, ListBox*, EMPTYARG )
return 0;
}
-// -----------------------------------------------------------------------
-
IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG )
{
QueryBox aBox( this, WinBits( WB_YES_NO | WB_DEF_YES ), m_sUseAsDefaultQuery );
@@ -449,7 +436,7 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG )
case COPT_EXPAND_WORDSPACE: pItem->m_bExpandWordSpace = bChecked; break;
default:
{
- DBG_ERRORFILE( "SwCompatibilityOptPage::UseAsDefaultHdl(): wrong option" );
+ OSL_ENSURE(false, "SwCompatibilityOptPage::UseAsDefaultHdl(): wrong option" );
}
}
}
@@ -463,12 +450,10 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG )
return 0;
}
-// -----------------------------------------------------------------------
-
void SwCompatibilityOptPage::SetCurrentOptions( sal_uLong nOptions )
{
sal_uLong nCount = m_aOptionsLB.GetEntryCount();
- DBG_ASSERT( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
+ OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
for ( sal_uInt16 i = 0; i < nCount; ++i )
{
sal_Bool bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 );
@@ -477,8 +462,6 @@ void SwCompatibilityOptPage::SetCurrentOptions( sal_uLong nOptions )
}
}
-// -----------------------------------------------------------------------
-
sal_uLong SwCompatibilityOptPage::GetDocumentOptions() const
{
sal_uLong nRet = 0;
@@ -501,8 +484,6 @@ sal_uLong SwCompatibilityOptPage::GetDocumentOptions() const
return nRet;
}
-// -----------------------------------------------------------------------
-
void SwCompatibilityOptPage::WriteOptions()
{
m_aConfigItem.Clear();
@@ -517,15 +498,11 @@ void SwCompatibilityOptPage::WriteOptions()
pItem->m_bExpandWordSpace );
}
-// -----------------------------------------------------------------------
-
SfxTabPage* SwCompatibilityOptPage::Create( Window* pParent, const SfxItemSet& rAttrSet )
{
return new SwCompatibilityOptPage( pParent, rAttrSet );
}
-// -----------------------------------------------------------------------
-
sal_Bool SwCompatibilityOptPage::FillItemSet( SfxItemSet& )
{
sal_Bool bModified = sal_False;
@@ -533,7 +510,7 @@ sal_Bool SwCompatibilityOptPage::FillItemSet( SfxItemSet& )
{
sal_uLong nSavedOptions = m_nSavedOptions;
sal_uLong nCount = m_aOptionsLB.GetEntryCount();
- DBG_ASSERT( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
+ OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
bool bSetParaSpaceMax = false;
@@ -615,8 +592,6 @@ sal_Bool SwCompatibilityOptPage::FillItemSet( SfxItemSet& )
return bModified;
}
-// -----------------------------------------------------------------------
-
void SwCompatibilityOptPage::Reset( const SfxItemSet& )
{
m_aOptionsLB.SelectEntryPos( 0 );
@@ -626,3 +601,4 @@ void SwCompatibilityOptPage::Reset( const SfxItemSet& )
m_nSavedOptions = nOptions;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc
index 5d93219fed98..4ae710af5ea0 100644
--- a/sw/source/ui/config/optdlg.hrc
+++ b/sw/source/ui/config/optdlg.hrc
@@ -25,7 +25,7 @@
*
************************************************************************/
-/* TabPage Ansicht*/
+/* TabPage View */
#define FL_DISP 1
#define FL_NOPRINT 2
#define FL_WINDOW 3
@@ -69,7 +69,7 @@
#define CB_TEST10 34
#define FL_TEST 35
-#define CB_FLD_HIDDEN_PARA 36 //Mittendrin, damit die HelpIds zum FPII kompatibel bleiben
+#define CB_FLD_HIDDEN_PARA 36 // right in the middle of it, so that HelpIds stay compatible to FPII
#define CB_SMOOTH_SCROLL 37
#define BT_OK 38
@@ -125,7 +125,7 @@
#define CB_TEXT_PLACEHOLDER 94
-// Tabpage Grundschriften
+// Tabpage Basic Fonts
#define FT_STANDARD 90
#define LB_STANDARD 91
#define FT_TITLE 92
@@ -150,7 +150,7 @@
#define LB_LABEL_SIZE 111
#define LB_INDEX_SIZE 112
-//Tabpage Tabelle
+//Tabpage Table
#define CB_HEADER 101
#define CB_REPEAT_HEADER 102
#define CB_DONT_SPLIT 103
diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src
index 400b3439b795..70113fdf6842 100644
--- a/sw/source/ui/config/optdlg.src
+++ b/sw/source/ui/config/optdlg.src
@@ -38,7 +38,7 @@
/**************************************************************************/
/* */
-/* TabPage Ansicht/Inhalt */
+/* TabPage View/Content */
/* */
/**************************************************************************/
TabPage TP_CONTENT_OPT
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 0bae918f3c4f..215932d8f326 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,9 +72,8 @@
using namespace ::com::sun::star;
-/* -----------------22.10.98 15:12-------------------
- *
- * --------------------------------------------------*/
+#include <svl/eitem.hxx>
+
SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
SfxTabPage( pParent, SW_RES( TP_OPTLOAD_PAGE ), rSet ),
@@ -94,6 +94,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
aTabFT ( this, SW_RES( FT_TAB ) ),
aTabMF ( this, SW_RES( MF_TAB ) ),
aUseSquaredPageMode ( this, SW_RES( CB_USE_SQUARE_PAGE_MODE ) ),
+ aUseCharUnit ( this , SW_RES( CB_USE_CHAR_UNIT ) ),
pWrtShell ( NULL ),
bHTMLMode ( sal_False ),
@@ -117,7 +118,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
case FUNIT_PICA:
case FUNIT_INCH:
{
- // nur diese Metriken benutzen
+ // use only these metrics
sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric );
aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit );
}
@@ -136,32 +137,23 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
SvtCJKOptions aCJKOptions;
if(!aCJKOptions.IsAsianTypographyEnabled())
+ {
aUseSquaredPageMode.Hide();
+ aUseCharUnit.Hide();
+ }
}
-/*-----------------18.01.97 12.43-------------------
-
---------------------------------------------------*/
-
SwLoadOptPage::~SwLoadOptPage()
{
}
-/*-----------------18.01.97 12.43-------------------
-
---------------------------------------------------*/
-
-SfxTabPage* __EXPORT SwLoadOptPage::Create( Window* pParent,
+SfxTabPage* SwLoadOptPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return new SwLoadOptPage(pParent, rAttrSet );
}
-/*-----------------18.01.97 12.42-------------------
-
---------------------------------------------------*/
-
-sal_Bool __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
{
sal_Bool bRet = sal_False;
SwModule* pMod = SW_MOD();
@@ -201,7 +193,7 @@ sal_Bool __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
const sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos();
if ( nMPos != aMetricLB.GetSavedValue() )
{
- // Doppel-Cast fuer VA3.0
+ // Double-Cast for VA3.0
sal_uInt16 nFieldUnit = (sal_uInt16)(long)aMetricLB.GetEntryData( nMPos );
rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) );
bRet = sal_True;
@@ -214,6 +206,15 @@ sal_Bool __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
bRet = sal_True;
}
+ sal_Bool bIsUseCharUnitFlag = aUseCharUnit.IsChecked();
+ SvtCJKOptions aCJKOptions;
+ bIsUseCharUnitFlag = bIsUseCharUnitFlag && aCJKOptions.IsAsianTypographyEnabled();
+ if( bIsUseCharUnitFlag != aUseCharUnit.GetSavedValue())
+ {
+ rSet.Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bIsUseCharUnitFlag ));
+ bRet = sal_True;
+ }
+
sal_Bool bIsSquaredPageModeFlag = aUseSquaredPageMode.IsChecked();
if ( bIsSquaredPageModeFlag != aUseSquaredPageMode.GetSavedValue() )
{
@@ -229,10 +230,8 @@ sal_Bool __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
return bRet;
}
-/*-----------------18.01.97 12.42-------------------
---------------------------------------------------*/
-void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet)
+void SwLoadOptPage::Reset( const SfxItemSet& rSet)
{
const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(sal_False);
const SfxPoolItem* pItem;
@@ -300,17 +299,28 @@ void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet)
aUseSquaredPageMode.Check( bSquaredPageMode );
aUseSquaredPageMode.SaveValue();
}
+
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT, sal_False, &pItem))
+ {
+ sal_Bool bUseCharUnit = ((const SfxBoolItem*)pItem)->GetValue();
+ aUseCharUnit.Check(bUseCharUnit);
+ }
+ else
+ {
+ aUseCharUnit.Check(pUsrPref->IsApplyCharUnit());
+ }
+ aUseCharUnit.SaveValue();
}
+
/*-----------------13.01.97 14.44-------------------
- Metric des Deftabstops umschalten
+ Switch Deftabstops' metric
--------------------------------------------------*/
-
IMPL_LINK(SwLoadOptPage, MetricHdl, ListBox*, EMPTYARG)
{
const sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos();
if(nMPos != USHRT_MAX)
{
- // Doppel-Cast fuer VA3.0
+ // Double-Cast for VA3.0
FieldUnit eFieldUnit = (FieldUnit)(long)aMetricLB.GetEntryData( nMPos );
sal_Bool bModified = aTabMF.IsModified();
long nVal = bModified ?
@@ -324,9 +334,6 @@ IMPL_LINK(SwLoadOptPage, MetricHdl, ListBox*, EMPTYARG)
return 0;
}
-/*********************************************************************/
-/* */
-/*********************************************************************/
IMPL_LINK(SwLoadOptPage, CaptionHdl, PushButton*, EMPTYARG)
{
@@ -336,29 +343,17 @@ IMPL_LINK(SwLoadOptPage, CaptionHdl, PushButton*, EMPTYARG)
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwCaptionOptDlg::SwCaptionOptDlg(Window* pParent, const SfxItemSet& rSet) :
SfxSingleTabDialog(pParent, rSet, 0)
{
- // TabPage erzeugen
+ // create TabPage
SetTabPage((SwCaptionOptPage*) SwCaptionOptPage::Create(this, rSet));
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwCaptionOptDlg::~SwCaptionOptDlg()
{
}
-/* -----------------22.10.98 15:12-------------------
- *
- * --------------------------------------------------*/
-
SwCaptionPreview::SwCaptionPreview( Window* pParent, const ResId& rResId )
: Window( pParent, rResId )
{
@@ -391,7 +386,6 @@ void SwCaptionPreview::Paint( const Rectangle& rRect )
DrawText( Point( 4, 6 ), maText );
}
-
SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
: SfxTabPage(pParent, SW_RES(TP_OPTCAPTION_PAGE), rSet),
aCheckFT (this, SW_RES(FT_OBJECTS )),
@@ -513,36 +507,24 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
aCheckLB.SetDeselectHdl( LINK(this, SwCaptionOptPage, SaveEntryHdl) );
}
-/*-----------------18.01.97 12.43-------------------
-
---------------------------------------------------*/
-
SwCaptionOptPage::~SwCaptionOptPage()
{
DelUserData();
delete pMgr;
}
-/*-----------------18.01.97 12.43-------------------
-
---------------------------------------------------*/
-
SfxTabPage* SwCaptionOptPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return new SwCaptionOptPage(pParent, rAttrSet );
}
-/*-----------------18.01.97 12.42-------------------
-
---------------------------------------------------*/
-
sal_Bool SwCaptionOptPage::FillItemSet( SfxItemSet& )
{
sal_Bool bRet = sal_False;
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
- SaveEntry(aCheckLB.FirstSelected()); // Aktuellen Eintrag uebernehmen
+ SaveEntry(aCheckLB.FirstSelected()); // apply current entry
SvLBoxEntry* pEntry = aCheckLB.First();
@@ -562,10 +544,6 @@ sal_Bool SwCaptionOptPage::FillItemSet( SfxItemSet& )
return bRet;
}
-/*-----------------18.01.97 12.42-------------------
-
---------------------------------------------------*/
-
void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
@@ -598,7 +576,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
aAny = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTVERSION );
if ( !( aAny >>= sTemp ) )
{
- DBG_ERRORFILE( "Couldn't get PRODUCTVERSION variable" );
+ OSL_ENSURE(false, "Couldn't get PRODUCTVERSION variable" );
}
else
{
@@ -608,7 +586,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
}
else
{
- DBG_ERRORFILE( "Couldn't get PRODUCTNAME variable" );
+ OSL_ENSURE(false, "Couldn't get PRODUCTNAME variable" );
}
SvObjectServerList aObjS;
@@ -632,10 +610,6 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
ModifyHdl();
}
-/*-----------------18.01.97 12.42-------------------
-
---------------------------------------------------*/
-
void SwCaptionOptPage::SetOptions(const sal_uInt16 nPos,
const SwCapObjType eObjType, const SvGlobalName *pOleId)
{
@@ -651,10 +625,6 @@ void SwCaptionOptPage::SetOptions(const sal_uInt16 nPos,
aCheckLB.SetEntryData(nPos, new InsCaptionOpt(eObjType, pOleId));
}
-/*-----------------18.01.97 12.42-------------------
-
---------------------------------------------------*/
-
void SwCaptionOptPage::DelUserData()
{
SvLBoxEntry* pEntry = aCheckLB.First();
@@ -667,10 +637,6 @@ void SwCaptionOptPage::DelUserData()
}
}
-/* -----------------26.10.98 11:06-------------------
- *
- * --------------------------------------------------*/
-
IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
{
SvLBoxEntry* pSelEntry = aCheckLB.FirstSelected();
@@ -796,24 +762,16 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
return 0;
}
-/* -----------------26.10.98 11:06-------------------
- *
- * --------------------------------------------------*/
-
IMPL_LINK( SwCaptionOptPage, SaveEntryHdl, SvxCheckListBox *, EMPTYARG )
{
SvLBoxEntry* pEntry = aCheckLB.GetHdlEntry();
- if (pEntry) // Alles speichern
+ if (pEntry) // save all
SaveEntry(pEntry);
return 0;
}
-/* -----------------05.11.98 16:23-------------------
- *
- * --------------------------------------------------*/
-
void SwCaptionOptPage::SaveEntry(SvLBoxEntry* pEntry)
{
if (pEntry)
@@ -846,19 +804,10 @@ void SwCaptionOptPage::SaveEntry(SvLBoxEntry* pEntry)
}
}
-/* -----------------26.10.98 11:06-------------------
- *
- * --------------------------------------------------*/
-
IMPL_LINK( SwCaptionOptPage, ModifyHdl, Edit *, EMPTYARG )
{
String sFldTypeName = aCategoryBox.GetText();
-/*
- SwFieldType* pType = sFldTypeName.Len() ? pMgr->GetFldType(RES_SETEXPFLD, sFldTypeName) : 0;
- ((SfxSingleTabDialog*)GetParent())->GetOKButton()->Enable( (!pType || ((SwSetExpFieldType*)pType)->GetType() == GSE_SEQ)
- && sFldTypeName.Len() != 0 );
-*/
SfxSingleTabDialog *pDlg = (SfxSingleTabDialog *)GetParent();
PushButton *pBtn = pDlg->GetOKButton();
if (pBtn)
@@ -874,19 +823,13 @@ IMPL_LINK( SwCaptionOptPage, ModifyHdl, Edit *, EMPTYARG )
return 0;
}
-/* -----------------26.10.98 10:58-------------------
- *
- * --------------------------------------------------*/
-
IMPL_LINK_INLINE_START( SwCaptionOptPage, SelectHdl, ListBox *, EMPTYARG )
{
DrawSample();
return 0;
}
IMPL_LINK_INLINE_END( SwCaptionOptPage, SelectHdl, ListBox *, EMPTYARG )
-/*-- 02.11.2007 10:00:36---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwCaptionOptPage, OrderHdl, ListBox*, pBox )
{
DrawSample();
@@ -895,9 +838,6 @@ IMPL_LINK( SwCaptionOptPage, OrderHdl, ListBox*, pBox )
aNumberingSeparatorED.Enable( nPos == 1 );
return 0;
}
-/* -----------------26.10.98 10:58-------------------
- *
- * --------------------------------------------------*/
void SwCaptionOptPage::DrawSample()
{
@@ -907,7 +847,7 @@ void SwCaptionOptPage::DrawSample()
{
//#i61007# order of captions
bool bOrderNumberingFirst = aLbCaptionOrder.GetSelectEntryPos() == 1;
- // Nummer
+ // number
sal_uInt16 nNumFmt = (sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(
aFormatBox.GetSelectEntryPos() );
if( SVX_NUM_NUMBER_NONE != nNumFmt )
@@ -915,7 +855,7 @@ void SwCaptionOptPage::DrawSample()
//#i61007# order of captions
if( !bOrderNumberingFirst )
{
- // Kategorie
+ // category
aStr += aCategoryBox.GetText();
aStr += ' ';
}
@@ -963,10 +903,7 @@ void SwCaptionOptPage::DrawSample()
aPreview.SetPreviewText( aStr );
}
-/*------------------------------------------------------------------------
- Beschreibung: ComboBox ohne Spaces
-------------------------------------------------------------------------*/
-
+// Description: ComboBox without Spaces
void CaptionComboBox::KeyInput(const KeyEvent& rEvt)
{
if( rEvt.GetKeyCode().GetCode() != KEY_SPACE )
@@ -975,3 +912,4 @@ void CaptionComboBox::KeyInput(const KeyEvent& rEvt)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/optload.hrc b/sw/source/ui/config/optload.hrc
index b396b2d9f9f0..201c83d2af51 100644
--- a/sw/source/ui/config/optload.hrc
+++ b/sw/source/ui/config/optload.hrc
@@ -41,6 +41,7 @@
#define FT_TAB 21
#define MF_TAB 22
#define CB_USE_SQUARE_PAGE_MODE 23
+#define CB_USE_CHAR_UNIT 24
// SwCaptionOptPage -----------------------------
diff --git a/sw/source/ui/config/optload.src b/sw/source/ui/config/optload.src
index be6473632b56..b5e51ef665ae 100644
--- a/sw/source/ui/config/optload.src
+++ b/sw/source/ui/config/optload.src
@@ -147,6 +147,15 @@ TabPage TP_OPTLOAD_PAGE
Text [ en-US ] = "Use square page mode for text grid";
Text [ zh-CN ] = "使用稿纸模å¼";
};
+
+ CheckBox CB_USE_CHAR_UNIT
+ {
+ Pos = MAP_APPFONT ( 12 , 130) ;
+ Size = MAP_APPFONT ( 109 , 10 ) ;
+ Text [ en-US ] = "Enable char unit";
+ Text [ x-comment ] = " ";
+ };
+
};
/**************************************************************************/
/* */
@@ -412,6 +421,8 @@ StringArray STR_ARR_METRIC
< "Miles" ; FUNIT_MILE ; > ;
< "Pica" ; FUNIT_PICA ; > ;
< "Point" ; FUNIT_POINT ; > ;
+ < "Char" ; FUNIT_CHAR ; >;
+ < "Line" ; FUNIT_LINE ; >;
};
};
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 84ab51621609..f4e5290b0fd9 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,7 +51,7 @@
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <uitool.hxx>
-#include <cfgitems.hxx>
+#include <cfgitems.hxx> //Items for Sw-pages
#include <poolfmt.hxx>
#include <uiitems.hxx>
#include <initui.hxx>
@@ -84,17 +85,8 @@
#include <vcl/svapp.hxx>
-
using namespace ::com::sun::star;
-
-/*******************************************************
- ******************************************************/
-
-/*-----------------31.08.96 10.16-------------------
- TabPage Anzeige/Inhalt
---------------------------------------------------*/
-
SwContentOptPage::SwContentOptPage( Window* pParent,
const SfxItemSet& rCoreSet ) :
SfxTabPage( pParent, SW_RES( TP_CONTENT_OPT ), rCoreSet ),
@@ -159,38 +151,41 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
case FUNIT_POINT:
case FUNIT_PICA:
case FUNIT_INCH:
+ case FUNIT_CHAR: // add two units , 'character' and 'line' , their ticks are not fixed
+ case FUNIT_LINE:
{
- // nur diese Metriken benutzen
- sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric );
- aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit );
- aVMetric.InsertEntry( sMetric );
- aVMetric.SetEntryData( nPos, (void*)(long)eFUnit );
- aHMetric.InsertEntry( sMetric );
- aHMetric.SetEntryData( nPos, (void*)(long)eFUnit );
+ // only use these metrics
+ // a horizontal ruler has not the 'line' unit
+ // there isn't 'line' unit in HTML format
+ if ( eFUnit != FUNIT_LINE )
+ {
+ sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric );
+ aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit );
+ aHMetric.InsertEntry( sMetric );
+ aHMetric.SetEntryData( nPos, (void*)(long)eFUnit );
+ }
+ // a vertical ruler has not the 'character' unit
+ if ( eFUnit != FUNIT_CHAR )
+ {
+ sal_uInt16 nPos = aVMetric.InsertEntry( sMetric );
+ aVMetric.SetEntryData( nPos, (void*)(long)eFUnit );
+ }
}
default:;//prevent warning
}
}
}
-/*-----------------31.08.96 13.58-------------------
-
---------------------------------------------------*/
SwContentOptPage::~SwContentOptPage()
{
}
-/*-----------------31.08.96 13.58-------------------
-
---------------------------------------------------*/
SfxTabPage* SwContentOptPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
return new SwContentOptPage(pParent, rAttrSet);
}
-/* -----------------------------07.04.01 16:57--------------------------------
- ---------------------------------------------------------------------------*/
static void lcl_SelectMetricLB(ListBox& rMetric, sal_uInt16 nSID, const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
@@ -208,9 +203,7 @@ static void lcl_SelectMetricLB(ListBox& rMetric, sal_uInt16 nSID, const SfxItemS
}
rMetric.SaveValue();
}
-/*-----------------31.08.96 13.58-------------------
---------------------------------------------------*/
void SwContentOptPage::Reset(const SfxItemSet& rSet)
{
const SwElemItem* pElemAttr = 0;
@@ -242,9 +235,6 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet)
AnyRulerHdl(&aAnyRulerCB);
}
-/*-----------------31.08.96 13.58-------------------
-
---------------------------------------------------*/
sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet)
{
const SwElemItem* pOldAttr = (const SwElemItem*)
@@ -277,7 +267,7 @@ sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet)
sal_uInt16 nGlobalMetricPos = nMPos;
if ( nMPos != aMetricLB.GetSavedValue() )
{
- // Doppel-Cast fuer VA3.0
+ // Double-Cast for VA3.0
sal_uInt16 nFieldUnit = (sal_uInt16)(long)aMetricLB.GetEntryData( nMPos );
rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) );
bRet = sal_True;
@@ -286,7 +276,7 @@ sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet)
nMPos = aHMetric.GetSelectEntryPos();
if ( nMPos != aHMetric.GetSavedValue() || nMPos != nGlobalMetricPos )
{
- // Doppel-Cast fuer VA3.0
+ // Double-Cast for VA3.0
sal_uInt16 nFieldUnit = (sal_uInt16)(long)aHMetric.GetEntryData( nMPos );
rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (sal_uInt16)nFieldUnit ) );
bRet = sal_True;
@@ -294,24 +284,20 @@ sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet)
nMPos = aVMetric.GetSelectEntryPos();
if ( nMPos != aVMetric.GetSavedValue() || nMPos != nGlobalMetricPos )
{
- // Doppel-Cast fuer VA3.0
+ // Double-Cast for VA3.0
sal_uInt16 nFieldUnit = (sal_uInt16)(long)aVMetric.GetEntryData( nMPos );
rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (sal_uInt16)nFieldUnit ) );
bRet = sal_True;
}
return bRet;
}
-/* -----------------------------05.03.2002 15:07------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwContentOptPage, VertRulerHdl, CheckBox*, pBox)
{
aVRulerRightCBox.Enable(pBox->IsEnabled() && pBox->IsChecked());
return 0;
}
-/* -----------------20.09.2002 11:30-----------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwContentOptPage, AnyRulerHdl, CheckBox*, pBox)
{
sal_Bool bChecked = pBox->IsChecked();
@@ -322,16 +308,14 @@ IMPL_LINK( SwContentOptPage, AnyRulerHdl, CheckBox*, pBox)
VertRulerHdl(&aVRulerCBox);
return 0;
}
-/*----------------- OS 27.01.95 -----------------------
- TabPage Drucker Zusatzeinstellungen
+/*------------------------------------------------------
+ TabPage Printer additional settings
-------------------------------------------------------*/
SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
const SfxItemSet& rCoreSet) :
SfxTabPage( pParent, SW_RES( TP_OPTPRINT_PAGE ), rCoreSet),
aFL1 (this, SW_RES(FL_1)),
aGrfCB (this, SW_RES(CB_PGRF)),
-// aTabCB (this, SW_RES(CB_PTAB)),
-// aDrawCB (this, SW_RES(CB_PDRAW)),
aCtrlFldCB (this, SW_RES(CB_CTRLFLD)),
aBackgroundCB (this, SW_RES(CB_BACKGROUND)),
aBlackFontCB (this, SW_RES(CB_BLACK_FONT)),
@@ -341,7 +325,6 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aFL2 (this, SW_RES(FL_2)),
aLeftPageCB (this, SW_RES(CB_LEFTP)),
aRightPageCB (this, SW_RES(CB_RIGHTP)),
-// aReverseCB (this, SW_RES(CB_REVERSE)),
aProspectCB (this, SW_RES(CB_PROSPECT)),
aProspectCB_RTL (this, SW_RES(CB_PROSPECT_RTL)),
aSeparatorRFL (this, SW_RES(FL_SEP_PRT_RIGHT)),
@@ -352,7 +335,6 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aEndPageRB (this, SW_RES(RB_PAGEEND)),
aFL4 (this, SW_RES(FL_4)),
aPrintEmptyPagesCB(this, SW_RES(CB_PRINTEMPTYPAGES)),
-// aSingleJobsCB (this, SW_RES(CB_SINGLEJOBS)),
aPaperFromSetupCB(this, SW_RES(CB_PAPERFROMSETUP)),
aFaxFT (this, SW_RES(FT_FAX)),
aFaxLB (this, SW_RES(LB_FAX)),
@@ -366,14 +348,11 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aGrfCB.SetClickHdl( aLk );
aRightPageCB.SetClickHdl( aLk );
aLeftPageCB.SetClickHdl( aLk );
-// aTabCB.SetClickHdl( aLk );
-// aDrawCB.SetClickHdl( aLk );
aCtrlFldCB.SetClickHdl( aLk );
aBackgroundCB.SetClickHdl( aLk );
aBlackFontCB.SetClickHdl( aLk );
aPrintHiddenTextCB.SetClickHdl( aLk );
aPrintTextPlaceholderCB.SetClickHdl( aLk );
-// aReverseCB.SetClickHdl( aLk );
aProspectCB.SetClickHdl( aLk );
aProspectCB_RTL.SetClickHdl( aLk );
aPaperFromSetupCB.SetClickHdl( aLk );
@@ -382,27 +361,20 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aEndRB.SetClickHdl( aLk );
aOnlyRB.SetClickHdl( aLk );
aNoRB.SetClickHdl( aLk );
-// aSingleJobsCB.SetClickHdl( aLk );
aFaxLB.SetSelectHdl( LINK( this, SwAddPrinterTabPage, SelectHdl ) );
const SfxPoolItem* pItem;
if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
-// aDrawCB .Hide();
aLeftPageCB .Hide();
aRightPageCB .Hide();
aPrintHiddenTextCB.Hide();
aPrintTextPlaceholderCB.Hide();
-// aReverseCB.SetPosPixel(aLeftPageCB.GetPosPixel());
aProspectCB.SetPosPixel(aLeftPageCB.GetPosPixel());
Point aPt( aRightPageCB.GetPosPixel() );
aPt.setX(aPt.getX() + 15); // indent
aProspectCB_RTL.SetPosPixel(aPt);
-// aBlackFontCB.SetPosPixel(aBackgroundCB.GetPosPixel());
-// aPrintHiddenTextCB.SetPosPixel(aBlackFontCB.GetPosPixel());
-// aBackgroundCB.SetPosPixel(aCtrlFldCB.GetPosPixel());
-// aCtrlFldCB.SetPosPixel(aDrawCB.GetPosPixel());
// hide aPrintEmptyPagesCB and move everything below up accordingly
long nDeltaY = aPaperFromSetupCB.GetPosPixel().getY() - aPrintEmptyPagesCB.GetPosPixel().getY();
@@ -422,8 +394,6 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aProspectCB_RTL.Show(aCTLOptions.IsCTLFontEnabled());
}
-//------------------------------------------------------------------------
-
void SwAddPrinterTabPage::SetPreview(sal_Bool bPrev)
{
bPreview = bPrev;
@@ -442,15 +412,11 @@ void SwAddPrinterTabPage::SetPreview(sal_Bool bPrev)
}
}
-//------------------------------------------------------------------------
-
SfxTabPage* SwAddPrinterTabPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return ( new SwAddPrinterTabPage( pParent, rAttrSet ) );
}
-//------------------------------------------------------------------------
-
sal_Bool SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
{
@@ -490,8 +456,6 @@ sal_Bool SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
}
return bAttrModified;
}
-//------------------------------------------------------------------------
-
void SwAddPrinterTabPage::Reset( const SfxItemSet& )
{
@@ -502,8 +466,6 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
(const SfxPoolItem**)&pAddPrinterAttr ))
{
aGrfCB.Check( pAddPrinterAttr->bPrintGraphic || pAddPrinterAttr->bPrintDraw );
-// aTabCB.Check( pAddPrinterAttr->bPrintTable);
-// aDrawCB.Check( pAddPrinterAttr->bPrintDraw);
aCtrlFldCB.Check( pAddPrinterAttr->bPrintControl);
aBackgroundCB.Check( pAddPrinterAttr->bPrintPageBackground);
aBlackFontCB.Check( pAddPrinterAttr->bPrintBlackFont);
@@ -511,12 +473,10 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
aPrintTextPlaceholderCB.Check(pAddPrinterAttr->bPrintTextPlaceholder);
aLeftPageCB.Check( pAddPrinterAttr->bPrintLeftPages);
aRightPageCB.Check( pAddPrinterAttr->bPrintRightPages);
-// aReverseCB.Check( pAddPrinterAttr->bPrintReverse);
aPaperFromSetupCB.Check(pAddPrinterAttr->bPaperFromSetup);
aPrintEmptyPagesCB.Check(pAddPrinterAttr->bPrintEmptyPages);
aProspectCB.Check( pAddPrinterAttr->bPrintProspect);
aProspectCB_RTL.Check( pAddPrinterAttr->bPrintProspectRTL);
-// aSingleJobsCB.Check( pAddPrinterAttr->bPrintSingleJobs);
aNoRB.Check (pAddPrinterAttr->nPrintPostIts== POSTITS_NONE ) ;
aOnlyRB.Check (pAddPrinterAttr->nPrintPostIts== POSTITS_ONLY ) ;
@@ -535,15 +495,11 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
else
aProspectCB_RTL.Enable( sal_False );
}
-//-----------------------------------------------------------------------
-
void SwAddPrinterTabPage::Init()
{
}
-//------------------------------------------------------------------------
-
IMPL_LINK_INLINE_START( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
{
@@ -560,9 +516,6 @@ IMPL_LINK_INLINE_START( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG
}
IMPL_LINK_INLINE_END( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
-//------------------------------------------------------------------------
-
-
void SwAddPrinterTabPage::SetFax( const SvStringsDtor& rFaxLst )
{
aFaxLB.InsertEntry(sNone);
@@ -571,9 +524,6 @@ void SwAddPrinterTabPage::SetFax( const SvStringsDtor& rFaxLst )
aFaxLB.SelectEntryPos(0);
}
-//------------------------------------------------------------------------
-
-
IMPL_LINK_INLINE_START( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG )
{
bAttrModified=sal_True;
@@ -583,7 +533,6 @@ IMPL_LINK_INLINE_END( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG )
void SwAddPrinterTabPage::PageCreated (SfxAllItemSet aSet)
{
- //SFX_ITEMSET_ARG (&aSet,pListItem,SfxStringListItem,SID_FAX_LIST,sal_False);
SFX_ITEMSET_ARG (&aSet,pListItem,SfxBoolItem,SID_FAX_LIST,sal_False);
SFX_ITEMSET_ARG (&aSet,pPreviewItem,SfxBoolItem,SID_PREVIEWFLAG_TYPE,sal_False);
if (pPreviewItem)
@@ -602,24 +551,12 @@ void SwAddPrinterTabPage::PageCreated (SfxAllItemSet aSet)
aFaxList.Insert(rpString, 0);
}
SetFax( aFaxList );
-/* SvStringsDtor aFaxList;
- const List *pList = (pListItem)->GetList();
- sal_uInt32 nCount = pList->Count();
- for(sal_uInt32 i = 0; i < nCount ; i++)
- {
- String* pString = (String*)(pList->GetObject(i));
- String* &rpString = pString;
- aFaxList.Insert(rpString, 0 );
- }
- SetFax(aFaxList);
-*/
}
}
-/*-----------------03.09.96 11.53-------------------
+
+/*--------------------------------------------------
Tabpage Standardfonts
--------------------------------------------------*/
-
-
SwStdFontTabPage::SwStdFontTabPage( Window* pParent,
const SfxItemSet& rSet ) :
SfxTabPage( pParent, SW_RES( TP_STD_FONT ), rSet),
@@ -700,28 +637,18 @@ SwStdFontTabPage::SwStdFontTabPage( Window* pParent,
aDocOnlyCB.Check(SW_MOD()->GetModuleConfig()->IsDefaultFontInCurrDocOnly());
}
-/*-----------------03.09.96 11.53-------------------
-
---------------------------------------------------*/
-
SwStdFontTabPage::~SwStdFontTabPage()
{
if(bDeletePrinter)
delete pPrt;
}
-/*-----------------03.09.96 11.53-------------------
-
---------------------------------------------------*/
SfxTabPage* SwStdFontTabPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return new SwStdFontTabPage(pParent, rAttrSet);
}
-/*-----------------03.09.96 11.53-------------------
-
---------------------------------------------------*/
void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
SfxPrinter* pPrt, const String& rStyle,
sal_uInt16 nFontWhich)
@@ -733,9 +660,7 @@ void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(),
aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
}
-/*-- 11.10.2005 15:47:52---------------------------------------------------
- -----------------------------------------------------------------------*/
void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
sal_Int32 nHeight, sal_uInt16 nFontHeightWhich)
{
@@ -744,9 +669,7 @@ void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(nType);
pColl->SetFmtAttr(SvxFontHeightItem(nHeight, 100, nFontHeightWhich));
}
-/*-----------------03.09.96 11.53-------------------
---------------------------------------------------*/
sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& )
{
sal_Bool bNotDocOnly = !aDocOnlyCB.IsChecked();
@@ -821,7 +744,6 @@ sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& )
aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
pColl->ResetFmtAttr(nFontWhich);
-// lcl_SetColl(pWrtShell, RES_POOLCOLL_STANDARD, pPrinter, sStandard);
bMod = sal_True;
}
if(bStandardHeightChanged)
@@ -885,9 +807,6 @@ sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& )
return sal_False;
}
-/*-----------------03.09.96 11.53-------------------
-
---------------------------------------------------*/
void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
{
const SfxPoolItem* pLang;
@@ -1080,11 +999,6 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
aIndexHeightLB. SaveValue();
}
-/*-----------------07.09.96 12.28-------------------
-
---------------------------------------------------*/
-
-
IMPL_LINK( SwStdFontTabPage, StandardHdl, PushButton *, EMPTYARG )
{
sal_uInt8 nFontOffset = nFontGroup * FONT_PER_GROUP;
@@ -1118,9 +1032,6 @@ IMPL_LINK( SwStdFontTabPage, StandardHdl, PushButton *, EMPTYARG )
return 0;
}
-/*-----------------17.01.97 15.43-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwStdFontTabPage, ModifyHdl, ComboBox*, pBox )
{
@@ -1149,9 +1060,6 @@ IMPL_LINK( SwStdFontTabPage, ModifyHdl, ComboBox*, pBox )
return 0;
}
-/*-- 11.10.2005 15:11:23---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK( SwStdFontTabPage, ModifyHeightHdl, FontSizeBox*, pBox )
{
if(pBox == &aStandardHeightLB)
@@ -1179,9 +1087,6 @@ IMPL_LINK( SwStdFontTabPage, ModifyHeightHdl, FontSizeBox*, pBox )
return 0;
}
-/*-- 28.09.2005 13:22:36---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK( SwStdFontTabPage, LoseFocusHdl, ComboBox*, pBox )
{
FontSizeBox* pHeightLB = 0;
@@ -1219,9 +1124,6 @@ void SwStdFontTabPage::PageCreated (SfxAllItemSet aSet)
if (pFlagItem)
SetFontMode(sal::static_int_cast< sal_uInt8, sal_uInt16>( pFlagItem->GetValue()));
}
-/*-----------------18.01.97 12.14-------------------
- Optionen Tabelle
---------------------------------------------------*/
SwTableOptionsTabPage::SwTableOptionsTabPage( Window* pParent, const SfxItemSet& rSet ) :
SfxTabPage(pParent, SW_RES(TP_OPTTABLE_PAGE), rSet),
@@ -1269,28 +1171,16 @@ SwTableOptionsTabPage::SwTableOptionsTabPage( Window* pParent, const SfxItemSet&
aHeaderCB.SetClickHdl(aLnk);
}
-/*-----------------18.01.97 12.43-------------------
-
---------------------------------------------------*/
-
SwTableOptionsTabPage::~SwTableOptionsTabPage()
{
}
-/*-----------------18.01.97 12.43-------------------
-
---------------------------------------------------*/
-
SfxTabPage* SwTableOptionsTabPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return new SwTableOptionsTabPage(pParent, rAttrSet );
}
-/*-----------------18.01.97 12.42-------------------
-
---------------------------------------------------*/
-
sal_Bool SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
{
sal_Bool bRet = sal_False;
@@ -1318,12 +1208,12 @@ sal_Bool SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
if(eMode != pModOpt->GetTblMode())
{
pModOpt->SetTblMode(eMode);
- // der Tabellen-Tastatur-Modus hat sich geaendert, das soll
- // jetzt auch die aktuelle Tabelle erfahren
+ // the table-keyboard-mode has changed, now the current
+ // table should know about that too.
if(pWrtShell && nsSelectionType::SEL_TBL & pWrtShell->GetSelectionType())
{
pWrtShell->SetTblChgMode(eMode);
- static sal_uInt16 __READONLY_DATA aInva[] =
+ static sal_uInt16 aInva[] =
{ FN_TABLE_MODE_FIX,
FN_TABLE_MODE_FIX_PROP,
FN_TABLE_MODE_VARIABLE,
@@ -1377,9 +1267,7 @@ sal_Bool SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
return bRet;
}
-/*-----------------18.01.97 12.42-------------------
---------------------------------------------------*/
void SwTableOptionsTabPage::Reset( const SfxItemSet& rSet)
{
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
@@ -1410,46 +1298,10 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet& rSet)
bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
}
- //bestimmte Controls fuer HTML verstecken
+ // hide certain controls for html
if(bHTMLMode)
{
-/* Point aPos(aCaptionFL.GetPosPixel());
- long nYDiff = aTableFL.GetPosPixel().Y() - aPos.Y();
- aTableFL.SetPosPixel(aPos);
-
- aPos = aHeaderCB.GetPosPixel();
- aPos.Y() -= nYDiff;
- aHeaderCB.SetPosPixel(aPos);
-
- aPos = aRepeatHeaderCB.GetPosPixel();
- aPos.Y() -= nYDiff;
- aRepeatHeaderCB.SetPosPixel(aPos);
-
- aPos = aDontSplitCB.GetPosPixel(); // hier muss eine Luecke geschlossen werden
- aPos.Y() -= nYDiff;
- aBorderCB.SetPosPixel(aPos);
- aPos = aTableInsertFL.GetPosPixel();
- aPos.Y() -= nYDiff;
- aTableInsertFL.SetPosPixel(aPos);
-
- aPos = aNumFormattingCB.GetPosPixel();
- aPos.Y() -= nYDiff;
- aNumFormattingCB.SetPosPixel(aPos);
-
- aPos = aNumFmtFormattingCB.GetPosPixel();
- aPos.Y() -= nYDiff;
- aNumFmtFormattingCB.SetPosPixel(aPos);
-
- aPos = aNumAlignmentCB.GetPosPixel();
- aPos.Y() -= nYDiff;
- aNumAlignmentCB.SetPosPixel(aPos);
-
- aCaptionFL.Hide();
- aCaptionCB.Hide();
- aCaptionFT.Hide();
- aCaptionPB.Hide();
-*/
aDontSplitCB.Hide();
}
@@ -1475,9 +1327,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet& rSet)
CheckBoxHdl(0);
}
-/*-----------------18.01.97 12.42-------------------
---------------------------------------------------*/
IMPL_LINK(SwTableOptionsTabPage, CheckBoxHdl, CheckBox*, EMPTYARG)
{
aNumFmtFormattingCB.Enable(aNumFormattingCB.IsChecked());
@@ -1492,11 +1342,6 @@ void SwTableOptionsTabPage::PageCreated (SfxAllItemSet aSet)
if (pWrtSh)
SetWrtShell(pWrtSh->GetValue());
}
-/* */
-
-/*-----------------31.10.97 17:55-------------------
- TabPage fuer ShadowCrsr
---------------------------------------------------*/
SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent,
const SfxItemSet& rSet )
@@ -1572,7 +1417,6 @@ SwShdwCrsrOptionsTabPage::~SwShdwCrsrOptionsTabPage()
{
}
-
SfxTabPage* SwShdwCrsrOptionsTabPage::Create( Window* pParent, const SfxItemSet& rSet )
{
return new SwShdwCrsrOptionsTabPage( pParent, rSet );
@@ -1628,7 +1472,7 @@ sal_Bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
SwDocDisplayItem aDisp;
if(pOldAttr)
aDisp = *pOldAttr;
- //
+
aDisp.bParagraphEnd = aParaCB .IsChecked();
aDisp.bTab = aTabCB .IsChecked();
aDisp.bSpace = aSpacesCB .IsChecked();
@@ -1686,18 +1530,17 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet )
}
}
-/*-----------------31.10.97 17:55-------------------
- TabPage fuer Redlining
+/*--------------------------------------------------
+ TabPage for Redlining
--------------------------------------------------*/
-
struct CharAttr
{
sal_uInt16 nItemId;
sal_uInt16 nAttr;
};
-// Editieren entspricht Einfuegen-Attributen
-static CharAttr __FAR_DATA aRedlineAttr[] =
+// Edit corresponds to Paste-attributes
+static CharAttr aRedlineAttr[] =
{
{ SID_ATTR_CHAR_CASEMAP, SVX_CASEMAP_NOT_MAPPED },
{ SID_ATTR_CHAR_WEIGHT, WEIGHT_BOLD },
@@ -1724,9 +1567,8 @@ static sal_uInt16 aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 };
static sal_uInt16 aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
/*-----------------------------------------------------------------------
- Beschreibung: Markierungsvorschau
+ Description: Preview of selection
-----------------------------------------------------------------------*/
-
SwMarkPreview::SwMarkPreview( Window *pParent, const ResId& rResID ) :
Window(pParent, rResID),
@@ -1740,7 +1582,7 @@ SwMarkPreview::SwMarkPreview( Window *pParent, const ResId& rResID ) :
const Size aSz(GetOutputSizePixel());
- // Seite
+ // Page
aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3));
sal_uLong nOutWPix = aPage.GetWidth();
@@ -1789,15 +1631,15 @@ void SwMarkPreview::DataChanged( const DataChangedEvent& rDCEvt )
void SwMarkPreview::Paint(const Rectangle &/*rRect*/)
{
- // Schatten zeichnen
+ // draw shadow
Rectangle aShadow(aPage);
aShadow += Point(3, 3);
DrawRect( aShadow, m_aShadowCol, m_aTransCol );
- // Seite zeichnen
+ // draw page
DrawRect( aPage, m_aBgCol, m_aLineCol );
- // Separator zeichnen
+ // draw separator
Rectangle aPageSeparator(aPage);
aPageSeparator.SetSize(Size(2, aPageSeparator.GetHeight()));
aPageSeparator.Move(aPage.GetWidth() / 2 - 1, 0);
@@ -1811,23 +1653,23 @@ void SwMarkPreview::Paint(const Rectangle &/*rRect*/)
switch (nMarkPos)
{
- case 1: // Links
+ case 1: // left
aRightMark.SetPos(Point(aRightPagePrtArea.Left() - 2 - aRightMark.GetWidth(), aRightMark.Top()));
break;
- case 2: // Rechts
+ case 2: // right
aLeftMark.SetPos(Point(aLeftPagePrtArea.Right() + 2, aLeftMark.Top()));
break;
- case 3: // Aussen
+ case 3: // outside
break;
- case 4: // Innen
+ case 4: // inside
aLeftMark.SetPos(Point(aLeftPagePrtArea.Right() + 2, aLeftMark.Top()));
aRightMark.SetPos(Point(aRightPagePrtArea.Left() - 2 - aRightMark.GetWidth(), aRightMark.Top()));
break;
- case 0: // Keine
+ case 0: // none
default:
return;
}
@@ -1837,10 +1679,10 @@ void SwMarkPreview::Paint(const Rectangle &/*rRect*/)
void SwMarkPreview::PaintPage(const Rectangle &rRect)
{
- // PrintArea zeichnen
+ // draw PrintArea
DrawRect(rRect, m_aTransCol, m_aPrintAreaCol );
- // Testabsatz zeichnen
+ // draw Testparagraph
sal_uLong nLTxtBorder = 4;
sal_uLong nRTxtBorder = 4;
sal_uLong nTTxtBorder = 4;
@@ -1857,8 +1699,7 @@ void SwMarkPreview::PaintPage(const Rectangle &rRect)
nStep = aTextLine.GetHeight() + 2;
nLines = (sal_uInt16)(rRect.GetHeight() / (aTextLine.GetHeight() + 2)) - 1;
- // Text simulieren
- //
+ // simulate text
for (sal_uInt16 i = 0; i < nLines; ++i)
{
if (i == (nLines - 1))
@@ -2095,7 +1936,7 @@ sal_Bool SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& )
nOldMarkColor != pOpt->GetMarkAlignColor().GetColor() ||
nOldMarkMode != pOpt->GetMarkAlignMode())
{
- // Alle Dokumente aktualisieren
+ // update all documents
TypeId aType(TYPE(SwDocShell));
SwDocShell* pDocShell = (SwDocShell*)SfxObjectShell::GetFirst(&aType);
@@ -2117,12 +1958,12 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
const AuthorCharAttr &rDeletedAttr = pOpt->GetDeletedAuthorAttr();
const AuthorCharAttr &rChangedAttr = pOpt->GetFormatAuthorAttr();
- // Preview initialisieren
+ // initialise preview
InitFontStyle(aInsertedPreviewWN);
InitFontStyle(aDeletedPreviewWN);
InitFontStyle(aChangedPreviewWN);
- // Farblistboxen initialisieren
+ // initialise colour list box
String sColor;
aInsertColorLB.SetUpdateMode(sal_False);
aDeletedColorLB.SetUpdateMode(sal_False);
@@ -2221,7 +2062,7 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
}
aMarkPosLB.SelectEntryPos(nPos);
- // Einstellungen in Preview anzeigen
+ // show settings in preview
AttribHdl(&aInsertLB);
ColorHdl(&aInsertColorLB);
AttribHdl(&aDeletedLB);
@@ -2461,12 +2302,7 @@ void SwRedlineOptionsTabPage::InitFontStyle(SvxFontPrevWindow& rExampleWin)
}
-#ifdef DBG_UTIL
-/*******************************************************
- ******************************************************/
-/*----------------- OS 11.01.95 -----------------------
- TabPage Testeinstellungen
--------------------------------------------------------*/
+#if OSL_DEBUG_LEVEL > 1
void lcl_SetPosSize(Window& rWin, Point aPos, Size aSize)
{
@@ -2530,17 +2366,11 @@ SwTestTabPage::SwTestTabPage( Window* pParent,
}
-
-//------------------------------------------------------------------------
-
-
SfxTabPage* SwTestTabPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return ( new SwTestTabPage( pParent, rAttrSet ) );
}
-//------------------------------------------------------------------------
-
sal_Bool SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet )
{
@@ -2562,8 +2392,6 @@ sal_Bool SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet )
}
return bAttrModified;
}
-//------------------------------------------------------------------------
-
void SwTestTabPage::Reset( const SfxItemSet& )
{
@@ -2585,8 +2413,6 @@ void SwTestTabPage::Reset( const SfxItemSet& )
aTest10CBox.Check(pTestAttr->bTest10);
}
}
-//------------------------------------------------------------------------
-
void SwTestTabPage::Init()
{
@@ -2603,8 +2429,6 @@ void SwTestTabPage::Init()
aTest9CBox.SetClickHdl( aLk );
aTest10CBox.SetClickHdl( aLk );
}
-//------------------------------------------------------------------------
-
IMPL_LINK_INLINE_START( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
{
@@ -2615,3 +2439,5 @@ IMPL_LINK_INLINE_END( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx
index cc6f0a4368c0..d3ecdc2c4a70 100644
--- a/sw/source/ui/config/prtopt.cxx
+++ b/sw/source/ui/config/prtopt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <unotools/configmgr.hxx>
#include <prtopt.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
@@ -42,7 +43,7 @@ using rtl::OUString;
using namespace com::sun::star::uno;
/*--------------------------------------------------------------------
- Beschreibung: Ctor
+ Description: Ctor
--------------------------------------------------------------------*/
Sequence<OUString> SwPrintOptions::GetPropertyNames()
@@ -77,9 +78,7 @@ Sequence<OUString> SwPrintOptions::GetPropertyNames()
}
return aNames;
}
-/* -----------------------------06.09.00 16:44--------------------------------
- ---------------------------------------------------------------------------*/
SwPrintOptions::SwPrintOptions(sal_Bool bWeb) :
ConfigItem(bWeb ? C2U("Office.WriterWeb/Print") : C2U("Office.Writer/Print"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
@@ -94,7 +93,7 @@ SwPrintOptions::SwPrintOptions(sal_Bool bWeb) :
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength())
{
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -138,15 +137,11 @@ SwPrintOptions::SwPrintOptions(sal_Bool bWeb) :
bPrintDraw = bPrintGraphic;
}
-/* -----------------------------06.09.00 16:50--------------------------------
- ---------------------------------------------------------------------------*/
SwPrintOptions::~SwPrintOptions()
{
}
-/* -----------------------------06.09.00 16:43--------------------------------
- ---------------------------------------------------------------------------*/
void SwPrintOptions::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
@@ -195,3 +190,4 @@ void SwPrintOptions::Commit()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx
index 640471e441f1..375ab39a0a6d 100644
--- a/sw/source/ui/config/uinums.cxx
+++ b/sw/source/ui/config/uinums.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,23 +29,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
-
#include <hintids.hxx>
#include <svl/urihelper.hxx>
#include <unotools/pathoptions.hxx>
#include <tools/stream.hxx>
-#ifndef _SFX_INIMGR_HXX
-#endif
#include <sfx2/docfile.hxx>
#include <svl/itemiter.hxx>
#include <editeng/brshitem.hxx>
-
#include <tools/resid.hxx>
#include <fmtornt.hxx>
-#include <swtypes.hxx> // Leerstring
+#include <swtypes.hxx> // empty string
#include <wrtsh.hxx>
#include <uinums.hxx>
#include <poolfmt.hxx>
@@ -66,21 +61,16 @@ using namespace ::com::sun::star;
#define NUMRULE_FILENAME "numrule.cfg"
#define CHAPTER_FILENAME "chapter.cfg"
-/*------------------------------------------------------------------------
- Beschreibung: Ops. zum Laden / Speichern
-------------------------------------------------------------------------*/
-
-
SV_IMPL_PTRARR( _SwNumFmtsAttrs, SfxPoolItem* )
// SwNumRulesWithName ----------------------------------------------------
// PUBLIC METHODES -------------------------------------------------------
/*------------------------------------------------------------------------
- Beschreibung: Speichern einer Regel
- Parameter: rCopy -- die zu speichernde Regel
- nIdx -- Position, an der die Regel zu speichern ist.
- Eine alte Regel an dieser Position wird ueberschrieben.
+ Description: Saving a rule
+ Parameter: rCopy -- the rule to save
+ nIdx -- position, where the rule is to be saved.
+ An old rule at that position will be overwritten.
------------------------------------------------------------------------*/
SwBaseNumRules::SwBaseNumRules( const String& rFileName )
@@ -92,9 +82,6 @@ SwBaseNumRules::SwBaseNumRules( const String& rFileName )
Init();
}
-/*-----------------26.06.97 08.30-------------------
-
---------------------------------------------------*/
SwBaseNumRules::~SwBaseNumRules()
{
if( bModified )
@@ -114,9 +101,6 @@ SwBaseNumRules::~SwBaseNumRules()
delete pNumRules[i];
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
void SwBaseNumRules::Init()
{
for(sal_uInt16 i = 0; i < nMaxRules; ++i )
@@ -131,29 +115,21 @@ void SwBaseNumRules::Init()
}
}
-/*-----------------26.06.97 08.30-------------------
-
---------------------------------------------------*/
-
void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx)
{
- ASSERT(nIdx < nMaxRules, Array der NumRules ueberindiziert.);
+ OSL_ENSURE(nIdx < nMaxRules, "Array der NumRules ueberindiziert.");
if( !pNumRules[nIdx] )
pNumRules[nIdx] = new SwNumRulesWithName( rCopy );
else
*pNumRules[nIdx] = rCopy;
}
-// PROTECTED METHODES ----------------------------------------------------
-/*------------------------------------------------------------------------
- Beschreibung: Speichern
-------------------------------------------------------------------------*/
-
-sal_Bool /**/ SwBaseNumRules::Store(SvStream &rStream)
+// PROTECTED METHODS ----------------------------------------------------
+sal_Bool SwBaseNumRules::Store(SvStream &rStream)
{
rStream << ACT_NUM_VERSION;
- // Schreiben, welche Positionen durch eine Regel belegt sind
- // Anschliessend Schreiben der einzelnen Rules
+ // Write, what positions are occupied by a rule
+ // Then write each of the rules
for(sal_uInt16 i = 0; i < nMaxRules; ++i)
{
if(pNumRules[i])
@@ -167,24 +143,17 @@ sal_Bool /**/ SwBaseNumRules::Store(SvStream &rStream)
return sal_True;
}
-
-
-/*------------------------------------------------------------------------
- Beschreibung: Speichern / Laden
-------------------------------------------------------------------------*/
-
-
int SwBaseNumRules::Load(SvStream &rStream)
{
int rc = 0;
rStream >> nVersion;
- // wegen eines kleinen aber schweren Fehlers schreibt die PreFinal die
- // gleiche VERSION_40A wie das SP2 #55402#
+ // due to a small but serious mistake, PreFinal writes the same VERION_40A as SP2
+ // #55402#
if(VERSION_40A == nVersion)
{
- DBG_ERROR("Version 364 ist nicht eindeutig #55402#");
+ OSL_ENSURE(false, "Version 364 is not clear #55402#");
}
else if( VERSION_30B == nVersion || VERSION_31B == nVersion ||
ACT_NUM_VERSION >= nVersion )
@@ -205,35 +174,21 @@ int SwBaseNumRules::Load(SvStream &rStream)
return rc;
}
-/*-----------------26.06.97 08.34-------------------
-
---------------------------------------------------*/
-
-/*------------------------------------------------------------------------*/
-
-
SwChapterNumRules::SwChapterNumRules() :
SwBaseNumRules(C2S(CHAPTER_FILENAME))
{
}
-/*------------------------------------------------------------------------*/
-
SwChapterNumRules::~SwChapterNumRules()
{
}
-/*-----------------26.06.97 08.23-------------------
-
---------------------------------------------------*/
void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx)
{
bModified = sal_True;
SwBaseNumRules::ApplyNumRules(rCopy, nIdx);
}
-/*------------------------------------------------------------------------*/
-
SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy,
const String &rName )
: aName(rName)
@@ -248,28 +203,18 @@ SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy,
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
SwNumRulesWithName::SwNumRulesWithName( const SwNumRulesWithName& rCopy )
{
memset( aFmts, 0, sizeof( aFmts ));
*this = rCopy;
}
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
SwNumRulesWithName::~SwNumRulesWithName()
{
for( int n = 0; n < MAXLEVEL; ++n )
delete aFmts[ n ];
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName &rCopy)
{
if( this != &rCopy )
@@ -289,9 +234,6 @@ const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName
return *this;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, sal_uInt16 nVersion )
{
CharSet eEncoding = gsl_getSystemTextEncoding();
@@ -302,10 +244,9 @@ SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, sal_uInt16 nVersion )
{
if( VERSION_30B == nVersion )
c = 1;
- // wegen eines kleinen aber schweren Fehlers schreibt die PreFinal die
- // gleiche VERSION_40A wie das SP2 #55402#
+ // due to a small but serious mistake, PreFinal writes the same VERION_40A as SP2
+ // #55402#
else if(nVersion < VERSION_40A && n > 5)
-// else if(nVersion < VERSION_50A && n > 5)
c = 0;
else
rStream >> c;
@@ -317,16 +258,10 @@ SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, sal_uInt16 nVersion )
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const
{
- // --> OD 2008-02-11 #newlistlevelattrs#
- // --> OD 2008-06-06 #i89178#
+ // #i89178#
rChg = SwNumRule( aName, numfunc::GetDefaultPositionAndSpaceMode() );
- // <--
rChg.SetAutoRule( sal_False );
_SwNumFmtGlobal* pFmt;
for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
@@ -338,9 +273,6 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
void SwNumRulesWithName::Store( SvStream &rStream )
{
CharSet eEncoding = gsl_getSystemTextEncoding();
@@ -358,15 +290,11 @@ void SwNumRulesWithName::Store( SvStream &rStream )
rStream << (char)0;
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const SwNumFmt& rFmt )
: aFmt( rFmt ), nCharPoolId( USHRT_MAX )
{
- // relative Abstaende ?????
+ // relative gaps?????
SwCharFmt* pFmt = rFmt.GetCharFmt();
if( pFmt )
@@ -390,10 +318,6 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const SwNumFmt& rFmt )
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const _SwNumFmtGlobal& rFmt )
:
aFmt( rFmt.aFmt ),
@@ -404,10 +328,6 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const _SwNumFmtGlobal& rFm
aItems.Insert( rFmt.aItems[ --n ]->Clone(), aItems.Count() );
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
sal_uInt16 nVersion )
: nCharPoolId( USHRT_MAX )
@@ -416,7 +336,6 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
{
sal_uInt16 nUS;
sal_Char cChar;
- short nShort;
sal_Bool bFlag;
String sStr;
@@ -445,8 +364,9 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
rStream >> nL; aFmt.SetLSpace( lNumIndent );
rStream >> nL; aFmt.SetFirstLineOffset( (short)nL );
}
- else // alter StartWert war ein Byte
+ else // old start-value was a Byte
{
+ short nShort;
rStream >> nUS; aFmt.SetStart( nUS );
rStream.ReadByteString(sStr, eEncoding);
aFmt.SetPrefix( sStr );
@@ -538,18 +458,9 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
}
}
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwNumRulesWithName::_SwNumFmtGlobal::~_SwNumFmtGlobal()
{
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
{
@@ -597,14 +508,14 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
{
SfxPoolItem* pItem = aItems[ --n ];
sal_uInt16 nIVers = pItem->GetVersion( SOFFICE_FILEFORMAT_50 );
- ASSERT( nIVers != USHRT_MAX,
+ OSL_ENSURE( nIVers != USHRT_MAX,
"Was'n das: Item-Version USHRT_MAX in der aktuellen Version" );
rStream << pItem->Which()
<< nIVers;
pItem->Store( rStream, nIVers );
}
- // Erweiterungen fuer Version 40A
+ // Extensions for 40A
if( SVX_NUM_BITMAP == aFmt.GetNumberingType() )
{
@@ -629,23 +540,19 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh,
SwNumFmt& rNew ) const
{
SwCharFmt* pFmt = 0;
if( sCharFmtName.Len() )
{
- // suche erstmal ueber den Namen
+ // at first, look for the name
sal_uInt16 nArrLen = rSh.GetCharFmtCount();
for( sal_uInt16 i = 1; i < nArrLen; ++i )
{
pFmt = &rSh.GetCharFmt( i );
if( COMPARE_EQUAL == pFmt->GetName().CompareTo( sCharFmtName ))
- // ist vorhanden, also belasse die Attribute wie sie sind!
+ // exists, so leave attributes as they are!
break;
pFmt = 0;
}
@@ -660,7 +567,7 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh,
else
pFmt = rSh.GetCharFmtFromPool( nCharPoolId );
- if( !pFmt->GetDepends() ) // Attribute setzen
+ if( !pFmt->GetDepends() ) // set attributes
for( sal_uInt16 n = aItems.Count(); n; )
pFmt->SetFmtAttr( *aItems[ --n ] );
}
@@ -671,3 +578,4 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh,
((SwNumFmt&)aFmt).SetCharFmt( 0 );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx
index c8b6bd7d3ab1..2d5acfa0c9a4 100644
--- a/sw/source/ui/config/usrpref.cxx
+++ b/sw/source/ui/config/usrpref.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,6 +32,7 @@
#include <tools/stream.hxx>
#include <unotools/syslocale.hxx>
+#include <svl/cjkoptions.hxx>
#include "swtypes.hxx"
#include "hintids.hxx"
@@ -46,10 +48,11 @@
#include <unomid.h>
using namespace utl;
-using namespace rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using ::rtl::OUString;
+
void SwMasterUsrPref::SetUsrPref(const SwViewOption &rCopy)
{
@@ -67,12 +70,20 @@ SwMasterUsrPref::SwMasterUsrPref(sal_Bool bWeb) :
aLayoutConfig(bWeb, *this),
aGridConfig(bWeb, *this),
aCursorConfig(*this),
- pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : 0)
+ pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : 0),
+ bApplyCharUnit(sal_False)
{
MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
+ SvtCJKOptions aCJKOptions;
eUserMetric = MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH;
- eHScrollMetric = eUserMetric;
- eVScrollMetric = eUserMetric;
+
+ sal_Bool bCJKEnabled = aCJKOptions.IsAsianTypographyEnabled();
+ bApplyCharUnit = bCJKEnabled;
+ eHScrollMetric = bApplyCharUnit ? FUNIT_CHAR : eUserMetric;
+ eVScrollMetric = bApplyCharUnit ? FUNIT_LINE : eUserMetric;
+
+ bIsHScrollMetricSet = bApplyCharUnit;
+ bIsVScrollMetricSet = bApplyCharUnit;
aContentConfig.Load();
aLayoutConfig.Load();
@@ -81,16 +92,12 @@ SwMasterUsrPref::SwMasterUsrPref(sal_Bool bWeb) :
if(pWebColorConfig)
pWebColorConfig->Load();
}
-/* -----------------------------13.02.01 09:48--------------------------------
- ---------------------------------------------------------------------------*/
SwMasterUsrPref::~SwMasterUsrPref()
{
delete pWebColorConfig;
}
-/*-- 28.09.00 09:55:32---------------------------------------------------
- -----------------------------------------------------------------------*/
Sequence<OUString> SwContentViewConfig::GetPropertyNames()
{
static const char* aPropNames[] =
@@ -107,13 +114,13 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames()
"NonprintingCharacter/Space", // 9
"NonprintingCharacter/Break", // 10
"NonprintingCharacter/ProtectedSpace", // 11
- "NonprintingCharacter/Tab", // 12 //not in Writer/Web
- "NonprintingCharacter/HiddenText", // 13
- "NonprintingCharacter/HiddenParagraph", // 14
- "NonprintingCharacter/HiddenCharacter", // 15
- "Update/Link", // 16
- "Update/Field", // 17
- "Update/Chart" // 18
+ "NonprintingCharacter/Tab", // 12 //not in Writer/Web
+ "NonprintingCharacter/HiddenText", // 13
+ "NonprintingCharacter/HiddenParagraph", // 14
+ "NonprintingCharacter/HiddenCharacter", // 15
+ "Update/Link", // 16
+ "Update/Field", // 17
+ "Update/Chart" // 18
};
@@ -126,9 +133,7 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames()
}
return aNames;
}
-/*-- 28.09.00 09:55:33---------------------------------------------------
- -----------------------------------------------------------------------*/
SwContentViewConfig::SwContentViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) :
ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Content") : C2U("Office.Writer/Content")),
rParent(rPar),
@@ -137,22 +142,16 @@ SwContentViewConfig::SwContentViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar)
Load();
EnableNotification( GetPropertyNames() );
}
-/*-- 28.09.00 09:55:33---------------------------------------------------
- -----------------------------------------------------------------------*/
SwContentViewConfig::~SwContentViewConfig()
{
}
-/*-- 09.02.07 09:55:33---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwContentViewConfig::Notify( const Sequence< OUString > & /*rPropertyNames*/ )
{
Load();
}
-/*-- 28.09.00 09:55:33---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwContentViewConfig::Commit()
{
Sequence<OUString> aNames = GetPropertyNames();
@@ -190,15 +189,13 @@ void SwContentViewConfig::Commit()
}
PutProperties(aNames, aValues);
}
-/*-- 28.09.00 09:55:34---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwContentViewConfig::Load()
{
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength())
{
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -238,9 +235,7 @@ void SwContentViewConfig::Load()
}
}
}
-/*-- 28.09.00 09:55:34---------------------------------------------------
- -----------------------------------------------------------------------*/
Sequence<OUString> SwLayoutViewConfig::GetPropertyNames()
{
static const char* aPropNames[] =
@@ -266,8 +261,9 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames()
"ViewLayout/Columns", //17
"ViewLayout/BookMode", //18
"Other/IsSquaredPageMode" //19
+ "Other/ApplyCharUnit" //20
};
- const int nCount = bWeb ? 15 : 20;
+ const int nCount = bWeb ? 15 : 21;
Sequence<OUString> aNames(nCount);
OUString* pNames = aNames.getArray();
for(int i = 0; i < nCount; i++)
@@ -276,9 +272,7 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames()
}
return aNames;
}
-/*-- 28.09.00 09:55:34---------------------------------------------------
- -----------------------------------------------------------------------*/
SwLayoutViewConfig::SwLayoutViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) :
ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Layout") : C2U("Office.Writer/Layout"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
@@ -286,15 +280,11 @@ SwLayoutViewConfig::SwLayoutViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) :
bWeb(bIsWeb)
{
}
-/*-- 28.09.00 09:55:35---------------------------------------------------
- -----------------------------------------------------------------------*/
SwLayoutViewConfig::~SwLayoutViewConfig()
{
}
-/*-- 28.09.00 09:55:36---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwLayoutViewConfig::Commit()
{
Sequence<OUString> aNames = GetPropertyNames();
@@ -335,19 +325,18 @@ void SwLayoutViewConfig::Commit()
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: rVal <<= (sal_Bool) rParent.IsApplyCharUnit(); break; // "Other/IsSquaredPageMode",
}
}
PutProperties(aNames, aValues);
}
-/*-- 28.09.00 09:55:36---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwLayoutViewConfig::Load()
{
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength())
{
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -391,6 +380,7 @@ void SwLayoutViewConfig::Load()
case 17: rParent.SetViewLayoutColumns( static_cast<sal_uInt16>(nInt32Val) ); break;// "ViewLayout/Columns",
case 18: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode",
case 19: rParent.SetDefaultPageMode(bSet,sal_True); break;// "Other/IsSquaredPageMode",
+ case 20: rParent.SetApplyCharUnit(bSet); break;// "Other/ApplyUserChar"
}
}
}
@@ -399,9 +389,6 @@ void SwLayoutViewConfig::Load()
void SwLayoutViewConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
-/* -----------------------------19.01.01 13:07--------------------------------
-
- ---------------------------------------------------------------------------*/
Sequence<OUString> SwGridConfig::GetPropertyNames()
{
static const char* aPropNames[] =
@@ -423,9 +410,7 @@ Sequence<OUString> SwGridConfig::GetPropertyNames()
}
return aNames;
}
-/* -----------------------------19.01.01 13:07--------------------------------
- ---------------------------------------------------------------------------*/
SwGridConfig::SwGridConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) :
ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Grid") : C2U("Office.Writer/Grid"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
@@ -433,15 +418,11 @@ SwGridConfig::SwGridConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) :
bWeb(bIsWeb)
{
}
-/* -----------------------------19.01.01 13:07--------------------------------
- ---------------------------------------------------------------------------*/
SwGridConfig::~SwGridConfig()
{
}
-/* -----------------------------19.01.01 13:07--------------------------------
- ---------------------------------------------------------------------------*/
void SwGridConfig::Commit()
{
Sequence<OUString> aNames = GetPropertyNames();
@@ -467,15 +448,13 @@ void SwGridConfig::Commit()
}
PutProperties(aNames, aValues);
}
-/* -----------------------------19.01.01 13:07--------------------------------
- ---------------------------------------------------------------------------*/
void SwGridConfig::Load()
{
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength())
{
Size aSnap(rParent.GetSnapSize());
@@ -505,9 +484,6 @@ void SwGridConfig::Load()
void SwGridConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
-/* -----------------------------19.01.01 13:07--------------------------------
-
- ---------------------------------------------------------------------------*/
Sequence<OUString> SwCursorConfig::GetPropertyNames()
{
static const char* aPropNames[] =
@@ -520,27 +496,21 @@ Sequence<OUString> SwCursorConfig::GetPropertyNames()
Sequence<OUString> aNames(nCount);
OUString* pNames = aNames.getArray();
for(int i = 0; i < nCount; i++)
- pNames[i] = C2U(aPropNames[i]);
+ pNames[i] = rtl::OUString::createFromAscii(aPropNames[i]);
return aNames;
}
-/* -----------------------------19.01.01 13:07--------------------------------
- ---------------------------------------------------------------------------*/
SwCursorConfig::SwCursorConfig(SwMasterUsrPref& rPar) :
ConfigItem(C2U("Office.Writer/Cursor"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
rParent(rPar)
{
}
-/* -----------------------------19.01.01 13:07--------------------------------
- ---------------------------------------------------------------------------*/
SwCursorConfig::~SwCursorConfig()
{
}
-/* -----------------------------19.01.01 13:07--------------------------------
- ---------------------------------------------------------------------------*/
void SwCursorConfig::Commit()
{
Sequence<OUString> aNames = GetPropertyNames();
@@ -562,15 +532,13 @@ void SwCursorConfig::Commit()
}
PutProperties(aNames, aValues);
}
-/* -----------------------------19.01.01 13:07--------------------------------
- ---------------------------------------------------------------------------*/
void SwCursorConfig::Load()
{
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength())
{
@@ -598,9 +566,6 @@ void SwCursorConfig::Load()
void SwCursorConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
-/*-- 28.09.00 09:55:33---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwWebColorConfig::SwWebColorConfig(SwMasterUsrPref& rPar) :
ConfigItem(C2U("Office.WriterWeb/Background"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
@@ -609,15 +574,11 @@ SwWebColorConfig::SwWebColorConfig(SwMasterUsrPref& rPar) :
{
aPropNames.getArray()[0] = C2U("Color");
}
-/*-- 28.09.00 09:55:33---------------------------------------------------
- -----------------------------------------------------------------------*/
SwWebColorConfig::~SwWebColorConfig()
{
}
-/*-- 28.09.00 09:55:33---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwWebColorConfig::Commit()
{
Sequence<Any> aValues(aPropNames.getLength());
@@ -634,14 +595,11 @@ void SwWebColorConfig::Commit()
void SwWebColorConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
-/*-- 28.09.00 09:55:34---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwWebColorConfig::Load()
{
Sequence<Any> aValues = GetProperties(aPropNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aPropNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aPropNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aPropNames.getLength())
{
for(int nProp = 0; nProp < aPropNames.getLength(); nProp++)
@@ -661,3 +619,4 @@ void SwWebColorConfig::Load()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index 7a2304f1a4f7..fc8c87827957 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,25 +33,17 @@
#include <svx/htmlmode.hxx>
#include <svtools/htmlcfg.hxx>
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
#include <editeng/svxenum.hxx>
#include <editeng/svxacorr.hxx>
#include <unotools/localedatawrapper.hxx>
-#ifndef _REGION_HXX //autogen
#include <vcl/region.hxx>
-#endif
-#ifndef _OUTDEV_HXX //autogen
#include <vcl/outdev.hxx>
-#endif
#include <vcl/window.hxx>
#include <swmodule.hxx>
#include <swtypes.hxx>
#include <viewopt.hxx>
-#ifndef _WDOCSH_HXX
#include <wdocsh.hxx>
-#endif
#include <swrect.hxx>
#include <crstate.hxx>
#include <svtools/colorcfg.hxx>
@@ -59,7 +52,7 @@
#include <editeng/acorrcfg.hxx>
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Bool SwViewOption::bTest9 = sal_False; //DrawingLayerNotLoading
#endif
Color SwViewOption::aDocBoundColor(COL_LIGHTGRAY);
@@ -79,9 +72,10 @@ Color SwViewOption::aFieldShadingsColor(COL_LIGHTGRAY);
Color SwViewOption::aSectionBoundColor(COL_LIGHTGRAY);
Color SwViewOption::aPageBreakColor(COL_BLUE);
Color SwViewOption::aScriptIndicatorColor(COL_GREEN);
+Color SwViewOption::aShadowColor(COL_GRAY);
sal_Int32 SwViewOption::nAppearanceFlags = VIEWOPT_DOC_BOUNDARIES|VIEWOPT_OBJECT_BOUNDARIES;
-sal_uInt16 SwViewOption::nPixelTwips = 0; //ein Pixel auf dem Bildschirm
+sal_uInt16 SwViewOption::nPixelTwips = 0; // one pixel on the screen
#define LINEBREAK_SIZE 12, 8
@@ -92,11 +86,7 @@ sal_uInt16 SwViewOption::nPixelTwips = 0; //ein Pixel auf dem Bildschirm
#define MIN_TABWIDTH 120
#define MIN_TABHEIGHT 200
-static const char __FAR_DATA aPostItStr[] = " ";
-
-/*************************************************************************
- * SwViewOption::IsEqualFlags()
- *************************************************************************/
+static const char aPostItStr[] = " ";
sal_Bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
{
@@ -113,8 +103,8 @@ sal_Bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
&& mbViewLayoutBookMode == rOpt.mbViewLayoutBookMode
&& bShowPlaceHolderFields == rOpt.bShowPlaceHolderFields
&& bIdle == rOpt.bIdle
-#ifdef DBG_UTIL
- // korrespondieren zu den Angaben in ui/config/cfgvw.src
+#if OSL_DEBUG_LEVEL > 1
+ // correspond to the statements in ui/config/cfgvw.src
&& bTest1 == rOpt.IsTest1()
&& bTest2 == rOpt.IsTest2()
&& bTest3 == rOpt.IsTest3()
@@ -128,10 +118,6 @@ sal_Bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
;
}
-/*************************************************************************
- * SwViewOption::DrawRect()
- *************************************************************************/
-
void SwViewOption::DrawRect( OutputDevice *pOut,
const SwRect &rRect, long nCol ) const
{
@@ -147,10 +133,6 @@ void SwViewOption::DrawRect( OutputDevice *pOut,
DrawRectPrinter( pOut, rRect );
}
-/*************************************************************************
- * SwViewOption::DrawRectPrinter()
- *************************************************************************/
-
void SwViewOption::DrawRectPrinter( OutputDevice *pOut,
const SwRect &rRect ) const
{
@@ -163,27 +145,19 @@ void SwViewOption::DrawRectPrinter( OutputDevice *pOut,
pOut->SetLineColor( aOldColor );
}
-/*************************************************************************
- * SwViewOption::GetPostItsWidth()
- *************************************************************************/
-
sal_uInt16 SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const
{
- ASSERT( pOut, "no Outdev" );
+ OSL_ENSURE( pOut, "no Outdev" );
return sal_uInt16(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr )));
}
-/*************************************************************************
- * SwViewOption::PaintPostIts()
- *************************************************************************/
-
void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, sal_Bool bIsScript ) const
{
if( pOut && bIsScript )
{
Color aOldLineColor( pOut->GetLineColor() );
pOut->SetLineColor( Color(COL_GRAY ) );
- // Wir ziehen ueberall zwei Pixel ab, damit es schick aussieht
+ // to make it look nice, we subtract two pixels everywhere
sal_uInt16 nPix = GetPixelTwips() * 2;
if( rRect.Width() <= 2 * nPix || rRect.Height() <= 2 * nPix )
nPix = 0;
@@ -195,16 +169,8 @@ void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, sal_Bo
}
}
-
-/*************************************************************************
-|*
-|* ViewOption::ViewOption()
-|*
-|* Letzte Aenderung MA 04. Aug. 93
-|*
-|*************************************************************************/
-
SwViewOption::SwViewOption() :
+ sSymbolFont( RTL_CONSTASCII_USTRINGPARAM( "symbol" ) ),
aRetoucheColor( COL_TRANSPARENT ),
mnViewLayoutColumns( 0 ),
nPagePrevRow( 1 ),
@@ -214,19 +180,17 @@ SwViewOption::SwViewOption() :
bStarOneSetting(sal_False),
bIsPagePreview(sal_False),
bSelectionInReadonly(sal_False),
- // --> FME 2004-06-29 #114856# Formular view
+ // #114856# Formular view
bFormView(sal_False),
- // <--
bBookview(sal_False),
mbViewLayoutBookMode(sal_False),
bShowPlaceHolderFields( sal_True ),
-
nZoom( 100 ),
eZoom( SVX_ZOOM_PERCENT ),
nTblDest(TBL_DEST_CELL)
{
- // Initialisierung ist jetzt etwas einfacher
- // alle Bits auf 0
+ // Initialisation is a little simpler now
+ // all Bits to 0
nCoreOptions = VIEWOPT_1_HARDBLANK | VIEWOPT_1_SOFTHYPH |
VIEWOPT_1_REF |
VIEWOPT_1_GRAPHIC |
@@ -246,8 +210,8 @@ SwViewOption::SwViewOption() :
bIdle = true;
-#ifdef DBG_UTIL
- // korrespondieren zu den Angaben in ui/config/cfgvw.src
+#if OSL_DEBUG_LEVEL > 1
+ // correspond to the statements in ui/config/cfgvw.src
bTest1 = bTest2 = bTest3 = bTest4 =
bTest5 = bTest6 = bTest7 = bTest8 = bTest10 = sal_False;
#endif
@@ -257,9 +221,8 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt)
{
bReadonly = sal_False;
bSelectionInReadonly = sal_False;
- // --> FME 2004-06-29 #114856# Formular view
+ // #114856# Formular view
bFormView = rVOpt.bFormView;
- // <--
nZoom = rVOpt.nZoom ;
aSnapSize = rVOpt.aSnapSize ;
mnViewLayoutColumns = rVOpt.mnViewLayoutColumns ;
@@ -282,7 +245,7 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt)
bShowPlaceHolderFields = rVOpt.bShowPlaceHolderFields;
bIdle = rVOpt.bIdle;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bTest1 = rVOpt.bTest1 ;
bTest2 = rVOpt.bTest2 ;
bTest3 = rVOpt.bTest3 ;
@@ -298,9 +261,8 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt)
SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt )
{
- // --> DVO FME 2004-06-29 #114856# Formular view
+ // #114856# Formular view
bFormView = rVOpt.bFormView ;
- // <--
nZoom = rVOpt.nZoom ;
aSnapSize = rVOpt.aSnapSize ;
mnViewLayoutColumns = rVOpt.mnViewLayoutColumns ;
@@ -323,7 +285,7 @@ SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt )
bShowPlaceHolderFields = rVOpt.bShowPlaceHolderFields;
bIdle = rVOpt.bIdle;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
bTest1 = rVOpt.bTest1 ;
bTest2 = rVOpt.bTest2 ;
bTest3 = rVOpt.bTest3 ;
@@ -342,14 +304,6 @@ SwViewOption::~SwViewOption()
{
}
-/*************************************************************************
-|*
-|* ViewOption::Init()
-|*
-|* Letzte Aenderung MA 04. Aug. 93
-|*
-|*************************************************************************/
-
void SwViewOption::Init( Window *pWin )
{
if( !nPixelTwips && pWin )
@@ -361,13 +315,9 @@ void SwViewOption::Init( Window *pWin )
sal_Bool SwViewOption::IsAutoCompleteWords() const
{
const SvxSwAutoFmtFlags& rFlags = SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags();
- return /*rFlags.bAutoCompleteWords &&*/ rFlags.bAutoCmpltCollectWords;
+ return rFlags.bAutoCmpltCollectWords;
}
-/*************************************************************************/
-/* */
-/*************************************************************************/
-
AuthorCharAttr::AuthorCharAttr() :
nItemId (SID_ATTR_CHAR_UNDERLINE),
nAttr (UNDERLINE_SINGLE),
@@ -375,10 +325,6 @@ AuthorCharAttr::AuthorCharAttr() :
{
}
-/*-----------------07.01.97 13.50-------------------
-
---------------------------------------------------*/
-
sal_uInt16 GetHtmlMode(const SwDocShell* pShell)
{
sal_uInt16 nRet = 0;
@@ -412,122 +358,92 @@ sal_uInt16 GetHtmlMode(const SwDocShell* pShell)
}
return nRet;
}
-/* -----------------------------24.04.2002 10:20------------------------------
- ---------------------------------------------------------------------------*/
Color& SwViewOption::GetDocColor()
{
return aDocColor;
}
-/* -----------------------------23.04.2002 17:18------------------------------
- ---------------------------------------------------------------------------*/
Color& SwViewOption::GetDocBoundariesColor()
{
return aDocBoundColor;
}
-/* -----------------------------23.04.2002 17:53------------------------------
- ---------------------------------------------------------------------------*/
Color& SwViewOption::GetObjectBoundariesColor()
{
return aObjectBoundColor;
}
-/* -----------------------------24.04.2002 10:41------------------------------
- ---------------------------------------------------------------------------*/
Color& SwViewOption::GetAppBackgroundColor()
{
return aAppBackgroundColor;
}
-/*-- 24.04.2002 10:50:11---------------------------------------------------
- -----------------------------------------------------------------------*/
Color& SwViewOption::GetTableBoundariesColor()
{
return aTableBoundColor;
}
-/*-- 24.04.2002 10:50:12---------------------------------------------------
- -----------------------------------------------------------------------*/
Color& SwViewOption::GetIndexShadingsColor()
{
return aIndexShadingsColor;
}
-/*-- 24.04.2002 10:50:12---------------------------------------------------
- -----------------------------------------------------------------------*/
Color& SwViewOption::GetLinksColor()
{
return aLinksColor;
}
-/*-- 24.04.2002 10:50:13---------------------------------------------------
- -----------------------------------------------------------------------*/
Color& SwViewOption::GetVisitedLinksColor()
{
return aVisitedLinksColor;
}
-/*-- 24.04.2002 10:50:13---------------------------------------------------
- -----------------------------------------------------------------------*/
Color& SwViewOption::GetDirectCursorColor()
{
return aDirectCursorColor;
}
-/*-- 24.04.2002 10:50:14---------------------------------------------------
- -----------------------------------------------------------------------*/
Color& SwViewOption::GetTextGridColor()
{
return aTextGridColor;
}
-/*-- 24.04.2002 10:50:14---------------------------------------------------
- -----------------------------------------------------------------------*/
Color& SwViewOption::GetSpellColor()
{
return aSpellColor;
}
-/*-- 24.04.2007 10:50:14---------------------------------------------------
- -----------------------------------------------------------------------*/
Color& SwViewOption::GetSmarttagColor()
{
return aSmarttagColor;
}
-/*-- 06.12.2002 10:50:11---------------------------------------------------
- -----------------------------------------------------------------------*/
+Color& SwViewOption::GetShadowColor()
+{
+ return aShadowColor;
+}
+
Color& SwViewOption::GetFontColor()
{
return aFontColor;
}
-/*-- 24.04.2002 10:50:15---------------------------------------------------
- -----------------------------------------------------------------------*/
Color& SwViewOption::GetFieldShadingsColor()
{
return aFieldShadingsColor;
}
-/*-- 24.04.2002 10:50:15---------------------------------------------------
- -----------------------------------------------------------------------*/
Color& SwViewOption::GetSectionBoundColor()
{
return aSectionBoundColor;
}
-/* -----------------------------2002/07/31 14:00------------------------------
- ---------------------------------------------------------------------------*/
Color& SwViewOption::GetPageBreakColor()
{
return aPageBreakColor;
}
-/* -----------------------------23.04.2002 17:41------------------------------
-
- ---------------------------------------------------------------------------*/
void SwViewOption::ApplyColorConfigValues(const svtools::ColorConfig& rConfig )
{
aDocColor.SetColor(rConfig.GetColorValue(svtools::DOCCOLOR).nColor);
@@ -565,6 +481,11 @@ void SwViewOption::ApplyColorConfigValues(const svtools::ColorConfig& rConfig )
if(aValue.bIsVisible)
nAppearanceFlags |= VIEWOPT_VISITED_LINKS;
+ aValue = rConfig.GetColorValue(svtools::SHADOWCOLOR);
+ aShadowColor.SetColor(aValue.nColor);
+ if(aValue.bIsVisible)
+ nAppearanceFlags |= VIEWOPT_SHADOW;
+
aDirectCursorColor.SetColor(rConfig.GetColorValue(svtools::WRITERDIRECTCURSOR).nColor);
aTextGridColor.SetColor(rConfig.GetColorValue(svtools::WRITERTEXTGRID).nColor);
@@ -590,9 +511,7 @@ void SwViewOption::ApplyColorConfigValues(const svtools::ColorConfig& rConfig )
aScriptIndicatorColor.SetColor(rConfig.GetColorValue(svtools::WRITERSCRIPTINDICATOR).nColor);
}
-/* -----------------------------23.04.2002 17:48------------------------------
- ---------------------------------------------------------------------------*/
void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bSaveInConfig )
{
if(bSet)
@@ -618,6 +537,7 @@ void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bS
{ VIEWOPT_VISITED_LINKS , svtools::LINKSVISITED },
{ VIEWOPT_FIELD_SHADINGS , svtools::WRITERFIELDSHADINGS },
{ VIEWOPT_SECTION_BOUNDARIES , svtools::WRITERSECTIONBOUNDARIES },
+ { VIEWOPT_SHADOW , svtools::SHADOWCOLOR },
{ 0 , svtools::ColorConfigEntryCount }
};
sal_uInt16 nPos = 0;
@@ -633,11 +553,10 @@ void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bS
}
}
}
-/* -----------------------------24.04.2002 10:42------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwViewOption::IsAppearanceFlag(sal_Int32 nFlag)
{
return 0 != (nAppearanceFlags & nFlag);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 0b5b9127b066..26cd88134280 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,9 +38,7 @@
#include <mailmergewizard.hxx>
#include <mmconfigitem.hxx>
#include <mmaddressblockpage.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <dbconfig.hxx>
#include <unotools/tempfile.hxx>
#include <vcl/msgbox.hxx>
@@ -55,9 +54,7 @@
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
#include <com/sun/star/sdbc/XRowSet.hpp>
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSERFACTORY_HPP_
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#endif
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
@@ -88,12 +85,8 @@ using namespace ::rtl;
#define ITEMID_NAME 1
#define ITEMID_TABLE 2
-//typedef SharedUNOComponent< XConnection > SharedConnection;
-
static const char* cUTF8 = "UTF-8";
-/*-- 07.05.2004 14:11:34---------------------------------------------------
- -----------------------------------------------------------------------*/
struct AddressUserData_Impl
{
uno::Reference<XDataSource> xSource;
@@ -109,6 +102,7 @@ struct AddressUserData_Impl
nTableAndQueryCount(-1)
{}
};
+
::rtl::OUString lcl_getFlatURL( uno::Reference<beans::XPropertySet>& xSourceProperties )
{
::rtl::OUString sURL;
@@ -154,9 +148,7 @@ struct AddressUserData_Impl
}
return sURL;
}
-/*-- 07.04.2004 16:35:43---------------------------------------------------
- -----------------------------------------------------------------------*/
SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) :
SfxModalDialog(pParent, SW_RES(DLG_MM_ADDRESSLISTDIALOG)),
#ifdef MSC
@@ -233,7 +225,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) :
SwMailMergeConfigItem& rConfigItem = m_pAddressPage->GetWizard()->GetConfigItem();
const SwDBData& rCurrentData = rConfigItem.GetCurrentDBData();
- DBG_ASSERT(m_xDBContext.is(), "service 'com.sun.star.sdb.DatabaseContext' not found!");
+ OSL_ENSURE(m_xDBContext.is(), "service 'com.sun.star.sdb.DatabaseContext' not found!");
sal_Bool bEnableEdit = sal_False;
sal_Bool bEnableOK = sal_True;
m_aListLB.SelectAll( sal_False );
@@ -284,9 +276,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) :
m_aListLB.SetSelectHdl(LINK(this, SwAddressListDialog, ListBoxSelectHdl_Impl));
TableSelectHdl_Impl(NULL);
}
-/*-- 07.04.2004 16:35:43---------------------------------------------------
- -----------------------------------------------------------------------*/
SwAddressListDialog::~SwAddressListDialog()
{
SvLBoxEntry* pEntry = m_aListLB.First();
@@ -297,9 +287,7 @@ SwAddressListDialog::~SwAddressListDialog()
pEntry = m_aListLB.Next( pEntry );
}
}
-/*-- 07.04.2004 16:35:44---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAddressListDialog, FilterHdl_Impl, PushButton*, EMPTYARG)
{
SvLBoxEntry* pSelect = m_aListLB.FirstSelected();
@@ -359,15 +347,13 @@ IMPL_LINK(SwAddressListDialog, FilterHdl_Impl, PushButton*, EMPTYARG)
}
catch(Exception& )
{
- DBG_ERROR("exception caught in SwAddressListDialog::FilterHdl_Impl");
+ OSL_ENSURE(false, "exception caught in SwAddressListDialog::FilterHdl_Impl");
}
}
}
return 0;
}
-/*-- 07.04.2004 16:35:44---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAddressListDialog, LoadHdl_Impl, PushButton*, EMPTYARG)
{
String sNewSource = SwNewDBMgr::LoadAndRegisterDataSource();
@@ -379,9 +365,7 @@ IMPL_LINK(SwAddressListDialog, LoadHdl_Impl, PushButton*, EMPTYARG)
}
return 0;
}
-/*-- 07.04.2004 16:35:44---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton)
{
String sInputURL;
@@ -433,7 +417,7 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton)
pInfo[2].Name = C2U("Extension");
pInfo[2].Value <<= ::rtl::OUString(aURL.getExtension());//C2U("csv");
pInfo[3].Name = C2U("CharSet");
- pInfo[3].Value <<= C2U(cUTF8);
+ pInfo[3].Value <<= rtl::OUString::createFromAscii(cUTF8);
aAny <<= aInfo;
xDataProperties->setPropertyValue(C2U("Info"), aAny);
@@ -471,9 +455,7 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton)
delete pDlg;
return 0;
}
-/*-- 22.04.2004 10:30:40---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAddressListDialog, EditHdl_Impl, PushButton*, pButton)
{
SvLBoxEntry* pEntry = m_aListLB.FirstSelected();
@@ -505,9 +487,7 @@ IMPL_LINK(SwAddressListDialog, EditHdl_Impl, PushButton*, pButton)
}
return 0;
};
-/*-- 19.04.2004 09:41:05---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAddressListDialog, ListBoxSelectHdl_Impl, SvTabListBox*, EMPTYARG)
{
SvLBoxEntry* pSelect = m_aListLB.FirstSelected();
@@ -515,6 +495,7 @@ IMPL_LINK(SwAddressListDialog, ListBoxSelectHdl_Impl, SvTabListBox*, EMPTYARG)
StaticListBoxSelectHdl_Impl ), pSelect );
return 0;
}
+
IMPL_STATIC_LINK(SwAddressListDialog, StaticListBoxSelectHdl_Impl, SvLBoxEntry*, pSelect)
{
//prevent nested calls of the select handler
@@ -538,6 +519,18 @@ IMPL_STATIC_LINK(SwAddressListDialog, StaticListBoxSelectHdl_Impl, SvLBoxEntry*,
pUserData = static_cast<AddressUserData_Impl*>(pSelect->GetUserData());
if(pUserData->nTableAndQueryCount > 1 || pUserData->nTableAndQueryCount == -1)
{
+ /*
+ * We're a callback from a selection from a list box, which takes
+ * place on mouse down before mouse up. The next dialog also has a
+ * list box. Spawning it means this list box doesn't get the mouse
+ * down event. So it sticks on "making selection" mode. So if you
+ * cancel the next dialog and just move the mouse out of this entry
+ * and back then the dialog pops up again, without requiring a click
+ *
+ * Most expedient thing to do is to manually end the parent selection
+ * here.
+ */
+ pThis->m_aListLB.EndSelection();
pThis->DetectTablesAndQueries(pSelect, !sTable.Len());
}
else
@@ -560,10 +553,8 @@ IMPL_STATIC_LINK(SwAddressListDialog, StaticListBoxSelectHdl_Impl, SvLBoxEntry*,
return 0;
}
-/*-- 13.05.2004 14:59:25---------------------------------------------------
- detect the number of tables for a data source
- if only one is available then set it at the entry
- -----------------------------------------------------------------------*/
+// detect the number of tables for a data source
+// if only one is available then set it at the entry
void SwAddressListDialog::DetectTablesAndQueries(
SvLBoxEntry* pSelect,
bool bWidthDialog)
@@ -656,14 +647,11 @@ void SwAddressListDialog::DetectTablesAndQueries(
}
catch(Exception& )
{
- DBG_ERROR("exception caught in SwAddressListDialog::DetectTablesAndQueries");
+ OSL_ENSURE(false, "exception caught in SwAddressListDialog::DetectTablesAndQueries");
m_aOK.Enable( sal_False );
}
}
-/*-- 13.05.2004 12:55:40---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAddressListDialog, TableSelectHdl_Impl, PushButton*, pButton)
{
EnterWait();
@@ -684,18 +672,12 @@ IMPL_LINK(SwAddressListDialog, TableSelectHdl_Impl, PushButton*, pButton)
return 0;
}
-/*-- 08.04.2004 14:52:11---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAddressListDialog, OKHdl_Impl, PushButton*, EMPTYARG)
{
EndDialog(sal_True);
return 0;
}
-/*-- 07.05.2004 14:17:47---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< XDataSource> SwAddressListDialog::GetSource()
{
uno::Reference< XDataSource> xRet;
@@ -708,9 +690,7 @@ uno::Reference< XDataSource> SwAddressListDialog::GetSource()
return xRet;
}
-/*-- 07.05.2004 14:17:48---------------------------------------------------
- -----------------------------------------------------------------------*/
SharedConnection SwAddressListDialog::GetConnection()
{
SharedConnection xRet;
@@ -722,9 +702,7 @@ SharedConnection SwAddressListDialog::GetConnection()
}
return xRet;
}
-/*-- 07.05.2004 14:17:48---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< XColumnsSupplier> SwAddressListDialog::GetColumnsSupplier()
{
uno::Reference< XColumnsSupplier> xRet;
@@ -736,9 +714,7 @@ uno::Reference< XColumnsSupplier> SwAddressListDialog::GetColumnsSupplier()
}
return xRet;
}
-/*-- 14.05.2004 15:04:09---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwAddressListDialog::GetFilter()
{
::rtl::OUString sRet;
@@ -750,3 +726,5 @@ uno::Reference< XColumnsSupplier> SwAddressListDialog::GetColumnsSupplier()
}
return sRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/addresslistdialog.hxx b/sw/source/ui/dbui/addresslistdialog.hxx
index 0623df315d39..bf84b16a8157 100644
--- a/sw/source/ui/dbui/addresslistdialog.hxx
+++ b/sw/source/ui/dbui/addresslistdialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include <sfx2/basedlgs.hxx>
#include <svtools/stdctrl.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <svtools/svtabbx.hxx>
#include <svtools/headbar.hxx>
#include <swdbdata.hxx>
@@ -51,9 +50,7 @@ namespace com{namespace sun{namespace star{
}
}}}
class SwMailMergeAddressBlockPage;
-/*-- 08.04.2004 14:04:29---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwAddressListDialog : public SfxModalDialog
{
FixedInfo m_aDescriptionFI;
@@ -86,9 +83,7 @@ class SwAddressListDialog : public SfxModalDialog
SwMailMergeAddressBlockPage* m_pAddressPage;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xDBContext;
-// ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> m_xSource;
-// ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
-// ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> m_xColumnsSupplier;
+
SwDBData m_aDBData;
void DetectTablesAndQueries(SvLBoxEntry* pSelect, bool bWidthDialog);
@@ -120,3 +115,4 @@ public:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 1eeedd3a0e0f..1c63829ba54d 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,9 +37,7 @@
#include <mmconfigitem.hxx>
#include <vcl/scrbar.hxx>
#include <vcl/msgbox.hxx>
-#ifndef _SVT_CONTROLDIMS_HRC_
#include <svtools/controldims.hrc>
-#endif
#include <unotools/pathoptions.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/docfilt.hxx>
@@ -60,9 +59,6 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::ui::dialogs;
using ::rtl::OUString;
-/*-- 19.04.2004 12:19:50---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SwAddressControl_Impl : public Control
{
ScrollBar m_aScrollBar;
@@ -100,9 +96,6 @@ public:
void SetCursorTo(sal_uInt32 nElement);
};
-/*-- 13.04.2004 10:09:42---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwAddressControl_Impl::SwAddressControl_Impl(Window* pParent, const ResId& rResId ) :
Control(pParent, rResId),
#ifdef MSC
@@ -126,9 +119,7 @@ SwAddressControl_Impl::SwAddressControl_Impl(Window* pParent, const ResId& rResI
m_aScrollBar.EnableDrag();
}
-/*-- 13.04.2004 10:09:43---------------------------------------------------
- -----------------------------------------------------------------------*/
SwAddressControl_Impl::~SwAddressControl_Impl()
{
::std::vector<FixedText*>::iterator aTextIter;
@@ -138,9 +129,7 @@ SwAddressControl_Impl::~SwAddressControl_Impl()
for(aEditIter = m_aEdits.begin(); aEditIter != m_aEdits.end(); ++aEditIter)
delete *aEditIter;
}
-/*-- 19.04.2004 12:22:41---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
{
m_pData = &rDBData;
@@ -189,7 +178,7 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
Link aEditModifyLink = LINK(this, SwAddressControl_Impl, EditModifyHdl_Impl);
Edit* pLastEdit = 0;
sal_Int32 nVisibleLines = 0;
- sal_Int32 nLines = 0;
+ sal_uIntPtr nLines = 0;
for(aHeaderIter = m_pData->aDBColumnHeaders.begin();
aHeaderIter != m_pData->aDBColumnHeaders.end();
++aHeaderIter, nEDYPos += m_nLineHeight, nFTYPos += m_nLineHeight, nLines++)
@@ -238,23 +227,21 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
}
}
-/*-- 21.04.2004 11:37:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressControl_Impl::SetCurrentDataSet(sal_uInt32 nSet)
{
if(m_bNoDataSet || m_nCurrentDataSet != nSet)
{
m_bNoDataSet = false;
m_nCurrentDataSet = nSet;
- DBG_ASSERT(m_pData->aDBData.size() > m_nCurrentDataSet, "wrong data set index");
+ OSL_ENSURE(m_pData->aDBData.size() > m_nCurrentDataSet, "wrong data set index");
if(m_pData->aDBData.size() > m_nCurrentDataSet)
{
::std::vector<Edit*>::iterator aEditIter;
sal_uInt32 nIndex = 0;
for(aEditIter = m_aEdits.begin(); aEditIter != m_aEdits.end(); ++aEditIter, ++nIndex)
{
- DBG_ASSERT(nIndex < m_pData->aDBData[m_nCurrentDataSet].size(),
+ OSL_ENSURE(nIndex < m_pData->aDBData[m_nCurrentDataSet].size(),
"number of colums doesn't match number of Edits");
(*aEditIter)->SetText(m_pData->aDBData[m_nCurrentDataSet][nIndex]);
}
@@ -262,9 +249,6 @@ void SwAddressControl_Impl::SetCurrentDataSet(sal_uInt32 nSet)
}
}
-/*-- 19.04.2004 14:17:50---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAddressControl_Impl, ScrollHdl_Impl, ScrollBar*, pScroll)
{
long nThumb = pScroll->GetThumbPos();
@@ -272,9 +256,7 @@ IMPL_LINK(SwAddressControl_Impl, ScrollHdl_Impl, ScrollBar*, pScroll)
return 0;
}
-/*-- 19.04.2004 16:16:25---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAddressControl_Impl, GotFocusHdl_Impl, Edit*, pEdit)
{
if(0 != (GETFOCUS_TAB & pEdit->GetGetFocusFlags()))
@@ -284,9 +266,7 @@ IMPL_LINK(SwAddressControl_Impl, GotFocusHdl_Impl, Edit*, pEdit)
}
return 0;
}
-/*-- 21.04.2004 14:56:54---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressControl_Impl::MakeVisible(const Rectangle & rRect)
{
long nThumb = m_aScrollBar.GetThumbPos();
@@ -307,24 +287,21 @@ void SwAddressControl_Impl::MakeVisible(const Rectangle & rRect)
ScrollHdl_Impl(&m_aScrollBar);
}
}
-/*-- 19.04.2004 16:16:25---------------------------------------------------
- copy data changes into database
- -----------------------------------------------------------------------*/
+
+// copy data changes into database
IMPL_LINK(SwAddressControl_Impl, EditModifyHdl_Impl, Edit*, pEdit)
{
//get the data element number of the current set
sal_Int32 nIndex = (sal_Int32)(sal_IntPtr)pEdit->GetData();
//get the index of the set
- DBG_ASSERT(m_pData->aDBData.size() > m_nCurrentDataSet, "wrong data set index" );
+ OSL_ENSURE(m_pData->aDBData.size() > m_nCurrentDataSet, "wrong data set index" );
if(m_pData->aDBData.size() > m_nCurrentDataSet)
{
m_pData->aDBData[m_nCurrentDataSet][nIndex] = pEdit->GetText();
}
return 0;
}
-/*-- 21.04.2004 14:51:54---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressControl_Impl::SetCursorTo(sal_uInt32 nElement)
{
if(nElement < m_aEdits.size())
@@ -336,9 +313,7 @@ void SwAddressControl_Impl::SetCursorTo(sal_uInt32 nElement)
}
}
-/*-- 19.04.2004 16:16:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressControl_Impl::Command( const CommandEvent& rCEvt )
{
switch ( rCEvt.GetCommand() )
@@ -358,9 +333,7 @@ void SwAddressControl_Impl::Command( const CommandEvent& rCEvt )
Control::Command(rCEvt);
}
}
-/*-- 19.04.2004 16:16:25---------------------------------------------------
- -----------------------------------------------------------------------*/
long SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt )
{
if(rNEvt.GetType() == EVENT_COMMAND)
@@ -375,9 +348,7 @@ long SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt )
}
return Control::PreNotify(rNEvt);
}
-/*-- 13.04.2004 10:08:59---------------------------------------------------
- -----------------------------------------------------------------------*/
SwCreateAddressListDialog::SwCreateAddressListDialog(
Window* pParent, const String& rURL, SwMailMergeConfigItem& rConfig) :
SfxModalDialog(pParent, SW_RES(DLG_MM_CREATEADDRESSLIST)),
@@ -452,7 +423,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
for( xub_StrLen nToken = 0; nToken < nHeaders; ++nToken)
{
String sHeader = sLine.GetToken( 0, '\t', nIndex );
- DBG_ASSERT(sHeader.Len() > 2 &&
+ OSL_ENSURE(sHeader.Len() > 2 &&
sHeader.GetChar(0) == '\"' && sHeader.GetChar(sHeader.Len() - 1) == '\"',
"Wrong format of header");
if(sHeader.Len() > 2)
@@ -470,7 +441,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
for( xub_StrLen nToken = 0; nToken < nDataCount; ++nToken)
{
String sData = sLine.GetToken( 0, '\t', nIndex );
- DBG_ASSERT(sData.Len() >= 2 &&
+ OSL_ENSURE(sData.Len() >= 2 &&
sData.GetChar(0) == '\"' && sData.GetChar(sData.Len() - 1) == '\"',
"Wrong format of line");
if(sData.Len() >= 2)
@@ -500,19 +471,14 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
m_aSetNoNF.SetMax(m_pCSVData->aDBData.size());
UpdateButtons();
}
-/*-- 13.04.2004 10:08:59---------------------------------------------------
- -----------------------------------------------------------------------*/
SwCreateAddressListDialog::~SwCreateAddressListDialog()
{
delete m_pAddressControl;
delete m_pCSVData;
delete m_pFindDlg;
}
-/*-- 13.04.2004 10:08:59---------------------------------------------------
- add a new data set of empty strings and set the address input control
- to that new set
- -----------------------------------------------------------------------*/
+
IMPL_LINK(SwCreateAddressListDialog, NewHdl_Impl, PushButton*, EMPTYARG)
{
sal_uInt32 nCurrent = m_pAddressControl->GetCurrentDataSet();
@@ -528,9 +494,7 @@ IMPL_LINK(SwCreateAddressListDialog, NewHdl_Impl, PushButton*, EMPTYARG)
UpdateButtons();
return 0;
}
-/*-- 13.04.2004 10:09:00---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCreateAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
{
sal_uInt32 nCurrent = m_pAddressControl->GetCurrentDataSet();
@@ -552,9 +516,7 @@ IMPL_LINK(SwCreateAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
UpdateButtons();
return 0;
}
-/*-- 13.04.2004 10:09:00---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCreateAddressListDialog, FindHdl_Impl, PushButton*, EMPTYARG)
{
if(!m_pFindDlg)
@@ -572,9 +534,7 @@ IMPL_LINK(SwCreateAddressListDialog, FindHdl_Impl, PushButton*, EMPTYARG)
m_pFindDlg->Show(!m_pFindDlg->IsVisible());
return 0;
}
-/*-- 13.04.2004 10:09:00---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCreateAddressListDialog, CustomizeHdl_Impl, PushButton*, pButton)
{
SwCustomizeAddressListDialog* pDlg = new SwCustomizeAddressListDialog(pButton, *m_pCSVData);
@@ -600,10 +560,7 @@ IMPL_LINK(SwCreateAddressListDialog, CustomizeHdl_Impl, PushButton*, pButton)
}
return 0;
}
-/*-- 23.04.2004 09:02:51---------------------------------------------------
- writes the data into a .csv file
- encoding is UTF8, separator is tab, strings are enclosed into "
- -----------------------------------------------------------------------*/
+
IMPL_LINK(SwCreateAddressListDialog, OkHdl_Impl, PushButton*, EMPTYARG)
{
if(!m_sURL.Len())
@@ -677,9 +634,7 @@ IMPL_LINK(SwCreateAddressListDialog, OkHdl_Impl, PushButton*, EMPTYARG)
return 0;
}
-/*-- 13.04.2004 10:09:01---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCreateAddressListDialog, DBCursorHdl_Impl, PushButton*, pButton)
{
sal_uInt32 nValue = static_cast< sal_uInt32 >(m_aSetNoNF.GetValue());
@@ -705,18 +660,14 @@ IMPL_LINK(SwCreateAddressListDialog, DBCursorHdl_Impl, PushButton*, pButton)
}
return 0;
}
-/*-- 21.04.2004 12:06:47---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCreateAddressListDialog, DBNumCursorHdl_Impl, NumericField*, EMPTYARG)
{
m_pAddressControl->SetCurrentDataSet( static_cast< sal_uInt32 >(m_aSetNoNF.GetValue() - 1) );
UpdateButtons();
return 0;
}
-/*-- 21.04.2004 13:22:27---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwCreateAddressListDialog::UpdateButtons()
{
sal_uInt32 nCurrent = static_cast< sal_uInt32 >(m_aSetNoNF.GetValue() );
@@ -727,9 +678,7 @@ void SwCreateAddressListDialog::UpdateButtons()
m_aEndPB.Enable(nCurrent != nSize);
m_aDeletePB.Enable(nSize > 0);
}
-/*-- 21.04.2004 13:22:27---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwCreateAddressListDialog::Find(const String& rSearch, sal_Int32 nColumn)
{
OUString sSearch = rSearch;
@@ -774,9 +723,7 @@ void SwCreateAddressListDialog::Find(const String& rSearch, sal_Int32 nColumn)
m_pAddressControl->SetCursorTo(nElement);
}
}
-/*-- 13.04.2004 13:48:38---------------------------------------------------
- -----------------------------------------------------------------------*/
SwFindEntryDialog::SwFindEntryDialog(SwCreateAddressListDialog* pParent) :
ModelessDialog(pParent, SW_RES(DLG_MM_FIND_ENTRY)),
#ifdef MSC
@@ -799,15 +746,11 @@ SwFindEntryDialog::SwFindEntryDialog(SwCreateAddressListDialog* pParent) :
m_aFindED.SetModifyHdl(LINK(this, SwFindEntryDialog, FindEnableHdl_Impl));
m_aCancel.SetClickHdl(LINK(this, SwFindEntryDialog, CloseHdl_Impl));
}
-/*-- 13.04.2004 13:48:38---------------------------------------------------
- -----------------------------------------------------------------------*/
SwFindEntryDialog::~SwFindEntryDialog()
{
}
-/*-- 21.04.2004 13:37:46---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwFindEntryDialog, FindHdl_Impl, PushButton*, EMPTYARG)
{
sal_Int32 nColumn = -1;
@@ -817,19 +760,17 @@ IMPL_LINK(SwFindEntryDialog, FindHdl_Impl, PushButton*, EMPTYARG)
m_pParent->Find(m_aFindED.GetText(), nColumn);
return 0;
}
-/*-- 21.04.2004 13:37:46---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwFindEntryDialog, FindEnableHdl_Impl, Edit*, EMPTYARG)
{
m_aFindPB.Enable(m_aFindED.GetText().Len() > 0);
return 0;
}
-/*-- 21.04.2004 15:36:36---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwFindEntryDialog, CloseHdl_Impl, PushButton*, EMPTYARG)
{
Show(sal_False);
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/createaddresslistdialog.hxx b/sw/source/ui/dbui/createaddresslistdialog.hxx
index b900d7d21ff6..6c9b64546a05 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.hxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include <sfx2/basedlgs.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <svtools/stdctrl.hxx>
#include <vcl/field.hxx>
#include <vcl/lstbox.hxx>
@@ -39,17 +38,14 @@
class SwAddressControl_Impl;
class SwMailMergeConfigItem;
-/*-- 19.04.2004 12:09:46---------------------------------------------------
- container of the created database
- -----------------------------------------------------------------------*/
+
+// container of the created database
struct SwCSVData
{
::std::vector< ::rtl::OUString > aDBColumnHeaders;
::std::vector< ::std::vector< ::rtl::OUString> > aDBData;
};
-/*-- 08.04.2004 14:04:39---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwFindEntryDialog;
class SwCreateAddressListDialog : public SfxModalDialog
{
@@ -98,9 +94,7 @@ public:
const String& GetURL() const { return m_sURL; }
void Find( const String& rSearch, sal_Int32 nColumn);
};
-/*-- 13.04.2004 13:30:21---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwFindEntryDialog : public ModelessDialog
{
FixedText m_aFindFT;
@@ -128,3 +122,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/createaddresslistdialog.src b/sw/source/ui/dbui/createaddresslistdialog.src
index 5f51d6a300fb..9911007c78f7 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.src
+++ b/sw/source/ui/dbui/createaddresslistdialog.src
@@ -29,9 +29,6 @@
#include <dbui.hrc>
#include <helpid.h>
-/*-- 13.04.2004 13:58:13---------------------------------------------------
-
- -----------------------------------------------------------------------*/
ModalDialog DLG_MM_CREATEADDRESSLIST
{
OutputSize = TRUE ;
@@ -173,9 +170,6 @@ ModalDialog DLG_MM_CREATEADDRESSLIST
};
};
-/*-- 13.04.2004 13:58:13---------------------------------------------------
-
- -----------------------------------------------------------------------*/
ModelessDialog DLG_MM_FIND_ENTRY
{
OutputSize = TRUE ;
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index d1da798202c0..b7be738f7019 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,11 +41,6 @@
#include <dbui.hrc>
#include <helpid.h>
-
-
-/*-- 13.04.2004 14:27:21---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwCustomizeAddressListDialog::SwCustomizeAddressListDialog(
Window* pParent, const SwCSVData& rOldData) :
SfxModalDialog(pParent, SW_RES(DLG_MM_CUSTOMIZE_ADDRESS_LIST)),
@@ -86,24 +82,17 @@ SwCustomizeAddressListDialog::SwCustomizeAddressListDialog(
m_aFieldsLB.SelectEntryPos(0);
UpdateButtons();
}
-/*-- 13.04.2004 14:34:07---------------------------------------------------
- -----------------------------------------------------------------------*/
SwCustomizeAddressListDialog::~SwCustomizeAddressListDialog()
{
}
-/*-- 12.08.2004 12:58:00---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressListDialog, ListBoxSelectHdl_Impl, ListBox*, EMPTYARG)
{
UpdateButtons();
return 0;
}
-/*-- 13.04.2004 15:02:14---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
{
bool bRename = pButton == &m_aRenamePB;
@@ -147,9 +136,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
UpdateButtons();
return 0;
}
-/*-- 13.04.2004 15:02:14---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
{
sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos();
@@ -166,9 +153,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
UpdateButtons();
return 0;
}
-/*-- 13.04.2004 15:02:15---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton)
{
sal_uInt16 nPos;
@@ -196,9 +181,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton)
UpdateButtons();
return 0;
}
-/*-- 19.04.2004 14:51:49---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwCustomizeAddressListDialog::UpdateButtons()
{
sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos();
@@ -208,17 +191,12 @@ void SwCustomizeAddressListDialog::UpdateButtons()
m_aDeletePB.Enable(nEntries > 0);
m_aRenamePB.Enable(nEntries > 0);
}
-/*-- 19.04.2004 14:51:49---------------------------------------------------
- -----------------------------------------------------------------------*/
SwCSVData* SwCustomizeAddressListDialog::GetNewData()
{
return m_pNewData;
}
-/*-- 13.04.2004 13:48:41---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwAddRenameEntryDialog::SwAddRenameEntryDialog(
Window* pParent, bool bRename, const ::std::vector< ::rtl::OUString >& rCSVHeader) :
SfxModalDialog(pParent, SW_RES(DLG_MM_ADD_RENAME_ENTRY)),
@@ -243,15 +221,11 @@ SwAddRenameEntryDialog::SwAddRenameEntryDialog(
m_aFieldNameED.SetModifyHdl(LINK(this, SwAddRenameEntryDialog, ModifyHdl_Impl));
ModifyHdl_Impl( &m_aFieldNameED );
}
-/*-- 13.04.2004 13:48:41---------------------------------------------------
- -----------------------------------------------------------------------*/
SwAddRenameEntryDialog::~SwAddRenameEntryDialog()
{
}
-/*-- 19.04.2004 15:31:34---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
{
::rtl::OUString sEntry = pEdit->GetText();
@@ -272,3 +246,5 @@ IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
m_aOK.Enable(!bFound);
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.hxx b/sw/source/ui/dbui/customizeaddresslistdialog.hxx
index 42298a463cbf..1989499cb7f7 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.hxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,17 +29,13 @@
#define _CUSTOMIZEADDRESSLISTDIALOG_HXX
#include <sfx2/basedlgs.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <svtools/stdctrl.hxx>
#include <vcl/field.hxx>
#include <vcl/lstbox.hxx>
struct SwCSVData;
-/*-- 08.04.2004 14:04:39---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwCustomizeAddressListDialog : public SfxModalDialog
{
FixedText m_aFieldsFT;
@@ -71,9 +68,7 @@ public:
SwCSVData* GetNewData();
};
-/*-- 13.04.2004 13:30:21---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwAddRenameEntryDialog : public SfxModalDialog
{
FixedText m_aFieldNameFT;
@@ -97,3 +92,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.src b/sw/source/ui/dbui/customizeaddresslistdialog.src
index 29de352b4cf3..6c4ae08a4d9c 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.src
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.src
@@ -29,9 +29,6 @@
#include <dbui.hrc>
#include <helpid.h>
-/*-- 13.04.2004 13:58:13---------------------------------------------------
-
- -----------------------------------------------------------------------*/
ModalDialog DLG_MM_CUSTOMIZE_ADDRESS_LIST
{
OutputSize = TRUE ;
@@ -114,9 +111,7 @@ ModalDialog DLG_MM_CUSTOMIZE_ADDRESS_LIST
Size = MAP_APPFONT ( 50 , 14 ) ;
};
};
-/*-- 13.04.2004 13:58:13---------------------------------------------------
- -----------------------------------------------------------------------*/
ModalDialog DLG_MM_ADD_RENAME_ENTRY
{
OutputSize = TRUE ;
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 64a3e3f455a0..cc95708888dc 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107,7 +108,6 @@
#include <unomid.h>
#include <IDocumentMarkAccess.hxx>
-
namespace swui
{
SwAbstractDialogFactory * GetFactory();
@@ -128,7 +128,7 @@ SV_IMPL_PTRARR( _SwTableAutoFmtTbl, SwTableAutoFmt* )
const char cDBFldStart = '<';
const char cDBFldEnd = '>';
-// Hilfsstruktur fuers einfuegen von Datenbankspalten als Felder oder Text
+// Helper structure for adding database rows as fields or text
struct _DB_Column
{
enum ColType { DB_FILLTEXT, DB_COL_FIELD, DB_COL_TEXT, DB_SPLITPARA } eColType;
@@ -210,15 +210,11 @@ private:
_DB_ColumnConfigData& operator =( const _DB_ColumnConfigData& );
};
-/* */
-
int SwInsDBColumn::operator<( const SwInsDBColumn& rCmp ) const
{
return 0 > GetAppCollator().compareString( sColumn, rCmp.sColumn );
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
Reference<XDataSource> xDataSource,
Reference<sdbcx::XColumnsSupplier> xColSupp,
@@ -358,7 +354,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
}
catch(const Exception& )
{
- DBG_ERROR("illegal number format key");
+ OSL_ENSURE(false, "illegal number format key");
}
}
}
@@ -373,13 +369,13 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
}
if( !aDBColumns.Insert( pNew ))
{
- ASSERT( !this, "Spaltenname mehrfach vergeben?" );
+ OSL_ENSURE( !this, "Spaltenname mehrfach vergeben?" );
delete pNew;
}
}
}
- // Absatzvorlagen-ListBox fuellen
+ // fill paragraph templates-ListBox
{
SfxStyleSheetBasePool* pPool = pView->GetDocShell()->GetStyleSheetPool();
pPool->SetSearchMask( SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL );
@@ -394,7 +390,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
aLbDbParaColl.SelectEntryPos( 0 );
}
- // steht der Cursor in einer Tabelle, darf NIE Tabelle auswaehlbar sein
+ // when the cursor is inside of a table, table must NEVER be selectable
if( pView->GetWrtShell().GetTableFmt() )
{
aRbAsTable.Enable( sal_False );
@@ -450,23 +446,18 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
// read configuration
Load();
- // Controls initialisieren:
+ // initialise Controls:
PageHdl( aRbAsTable.IsChecked() ? &aRbAsTable : &aRbAsField );
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
SwInsertDBColAutoPilot::~SwInsertDBColAutoPilot()
{
delete pTblSet;
delete pRep;
-// delete pConfig;
delete pTAutoFmt;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton )
{
sal_Bool bShowTbl = pButton == &aRbAsTable;
@@ -500,9 +491,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton )
return 0;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton )
{
sal_uInt16 nFndPos;
@@ -521,9 +510,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton )
return 0;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
{
sal_Bool bChgEnable = sal_True, bEnableTo = sal_True, bEnableFrom = sal_True;
@@ -572,7 +559,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
nDelPos = aLbTableCol.GetSelectEntryPos(),
nTopPos = aLbTableCol.GetTopEntry();
- // die richtige InsertPos suchen!!
+ // look for the right InsertPos!!
SwInsDBColumn aSrch( aLbTableCol.GetEntry( nDelPos ), 0 );
aDBColumns.Seek_Entry( &aSrch, &nFndPos );
if( !nFndPos || nFndPos == aDBColumns.Count()-1 )
@@ -616,7 +603,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
else if( pButton == &aIbDbcolToEdit )
{
bChgEnable = sal_False;
- // Daten ins Edit moven:
+ // move data to Edit:
String aFld( aLbTxtDbColumn.GetSelectEntry() );
if( aFld.Len() )
{
@@ -624,20 +611,20 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
sal_uInt16 nPos = (sal_uInt16)aEdDbText.GetSelection().Min();
sal_uInt16 nSel = sal_uInt16(aEdDbText.GetSelection().Max()) - nPos;
if( nSel )
- // dann loesche erstmal die bestehende Selektion
+ // first delete the existing selection
aStr.Erase( nPos, nSel );
aFld.Insert( cDBFldStart, 0 );
aFld += cDBFldEnd;
if( aStr.Len() )
{
- if( nPos ) // ein Space davor
+ if( nPos ) // one blank in front
{
sal_Unicode c = aStr.GetChar( nPos-1 );
if( '\n' != c && '\r' != c )
aFld.Insert( ' ', 0 );
}
- if( nPos < aStr.Len() ) // ein Space dahinter
+ if( nPos < aStr.Len() ) // one blank behind
{
sal_Unicode c = aStr.GetChar( nPos );
if( '\n' != c && '\r' != c )
@@ -670,9 +657,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
return 0;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox )
{
Button* pButton = 0;
@@ -688,9 +673,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox )
return 0;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
{
SwWrtShell& rSh = pView->GetWrtShell();
@@ -700,7 +683,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
bNewSet = sal_True;
pTblSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() );
- //Ersteinmal die einfachen Attribute besorgen.
+ // At first acquire the simple attributes
pTblSet->Put( SfxStringItem( FN_PARAM_TABLE_NAME, rSh.GetUniqueTblName() ));
pTblSet->Put( SfxUInt16Item( FN_PARAM_TABLE_HEADLINE, 1 ) );
@@ -713,15 +696,15 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
pTblSet->Put( aBrush, SID_ATTR_BRUSH_TABLE );
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
- // Tabellenvariante, wenn mehrere Tabellenzellen selektiert
+ // table variant, when multiple table cells are selected
aBoxInfo.SetTable( sal_True );
- // Abstandsfeld immer anzeigen
+ // always show gap field
aBoxInfo.SetDist( sal_True);
- // Minimalgroesse in Tabellen und Absaetzen setzen
+ // set minimum size in tables and paragraphs
aBoxInfo.SetMinDist( sal_False );
- // Default-Abstand immer setzen
+ // always set default-gap
aBoxInfo.SetDefDist( MIN_BORDER_DIST );
- // Einzelne Linien koennen nur in Tabellen DontCare-Status haben
+ // Single lines can have DontCare-status only in tables
aBoxInfo.SetValid( VALID_DISABLE, sal_True );
pTblSet->Put( aBoxInfo );
@@ -735,7 +718,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
const SwFmtCol& rCol = aPara.pFrmFmt->GetCol();
const SwColumns& rCols = rCol.GetColumns();
- //nStart und nEnd initialisieren fuer nNum == 0
+ // initialise nStart und nEnd for nNum == 0
long nWidth1 = 0,
nStart1 = 0,
nEnd1 = nWidth;
@@ -771,8 +754,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
if( aLbTableCol.GetEntryCount() != pRep->GetAllColCount() )
{
- // Anzahl der Spalten hat sich geaendert: dann muessen die
- // TabCols angepasst werden
+ // Number of columns has changed: then the TabCols have to be adjusted
long nWidth = pRep->GetWidth();
sal_uInt16 nCols = aLbTableCol.GetEntryCount() - 1;
SwTabCols aTabCols( nCols );
@@ -794,10 +776,10 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
}
SwAbstractDialogFactory* pFact = swui::GetFactory();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateSwTableTabDlg( pButton, rSh.GetAttrPool(),pTblSet, &rSh, DLG_FORMAT_TABLE );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute() )
pTblSet->Put( *pDlg->GetOutputItemSet() );
else if( bNewSet )
@@ -809,24 +791,20 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
return 0;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertDBColAutoPilot, AutoFmtHdl, PushButton*, pButton )
{
SwAbstractDialogFactory* pFact = swui::GetFactory();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(),DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
delete pDlg;
return 0;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
{
ListBox* pGetBox = pBox == &aLbDbFmtFromUsr
@@ -851,8 +829,8 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
}
else
{
- // an der FormatGroupBox den ausgewaehlten FeldNamen setzen, damit
- // klar ist, welches Feld ueber das Format eingestellt wird!
+ // set the selected FieldName at the FormatGroupBox, so that
+ // it's clear what field is configured by the format!
String sTxt( aFlFormat.GetText().Copy( 0, nGBFmtLen ));
if( !aSrch.sColumn.getLength() )
{
@@ -881,16 +859,14 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
aFlFormat.SetText( sTxt );
- // um spaeter zu wissen, welche ListBox die "aktive" war, wird sich
- // im 1. Eintrag ein Flag gemerkt,
+ // to know later on, what ListBox was the "active", a Flag
+ // is remembered in the 1st entry
void* pPtr = pBox == &aLbTableCol ? &aLbTableCol : 0;
aLbTableCol.SetEntryData( 0, pPtr );
}
return 0;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton )
{
if( pButton == &aCbTableHeadon )
@@ -902,9 +878,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton )
}
return 0;
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr )
{
_DB_Column* pNew;
@@ -926,17 +900,14 @@ static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr )
rColArr.Insert( pNew, rColArr.Count() );
}
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
_DB_Columns& rColArr,
sal_Bool bInsField )
{
- // aus dem Text wieder die einzelnen Datenbank - Spalten erzeugen
- // und dann in einem Array speichern
- // Die Datenbankspalten stehen in <> und muessen im Array der Spalten
- // vorhanden sein:
+ // create each of the database columns from the text again
+ // and then save in an array
+ // database columns are in <> and must be present in the columns' array:
String sTxt( rTxt );
sal_uInt16 nFndPos, nEndPos, nSttPos = 0;
@@ -945,12 +916,12 @@ sal_Bool SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
nSttPos = nFndPos + 1;
if( STRING_NOTFOUND != ( nEndPos = sTxt.Search( cDBFldEnd, nSttPos+1 )))
{
- // Text in <> geklammert gefunden: was ist es denn:
+ // Text in <> brackets found: what is it:
SwInsDBColumn aSrch( sTxt.Copy( nSttPos, nEndPos - nSttPos ), 0);
if( aDBColumns.Seek_Entry( &aSrch, &nFndPos ) )
{
- // das ist ein gueltiges Feld
- // also sicher den Text "davor":
+ // that is a valid field
+ // so surely the text "before":
const SwInsDBColumn& rFndCol = *aDBColumns[ nFndPos ];
_DB_Column* pNew;
@@ -998,15 +969,13 @@ sal_Bool SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
}
}
- // den letzten Text nicht vergessen
+ // don't forget the last text
if( sTxt.Len() )
::lcl_InsTextInArr( sTxt, rColArr );
return 0 != rColArr.Count();
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
Reference< XDataSource> xSource,
Reference< XConnection> xConnection,
@@ -1058,7 +1027,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
else
++nRows;
- // bereite das Array fuer die ausgewaehlten Spalten auf
+ // prepare the array for the selected columns
SwInsDBColumns_SAR aColFlds( 255 >= nCols ? (sal_uInt8)nCols : 255, 5 );
for( n = 0; n < nCols; ++n )
{
@@ -1067,19 +1036,19 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
if( aDBColumns.Seek_Entry( &aSrch, &nFndPos ) )
aColFlds.Insert( aDBColumns[ nFndPos ], n );
else {
- ASSERT( !this, "Datenbankspalte nicht mehr gefunden" );
+ OSL_ENSURE( !this, "database column not found" );
}
}
if( nCols != aColFlds.Count() )
{
- ASSERT( !this, "nicht alle Datenbankspalten gefunden" );
+ OSL_ENSURE( !this, "not all database columns found" );
nCols = aColFlds.Count();
}
if(!nRows || !nCols)
{
- ASSERT( !this, "wrong parameters" );
+ OSL_ENSURE( !this, "wrong parameters" );
break;
}
@@ -1137,9 +1106,9 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
for( n = 0; n < nCols; ++n )
{
- // beim aller erstenmal KEIN GoNextCell, weil wir schon
- // drin stehen. Auch nicht nach dem Insert das GoNextCell,
- // weil am Ende eine leere Zeile einfuegt wird.
+ // at the very first time, NO GoNextCell, because we're
+ // already in it. Also no GoNextCell after the Insert,
+ // because an empty line is added at the end.
if( i || n )
rSh.GoNextCell();
@@ -1209,12 +1178,14 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
}
catch(Exception&
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
aExcept
#endif
)
{
- DBG_ERROR(ByteString(String(aExcept.Message), gsl_getSystemTextEncoding()).GetBuffer());
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE(false, ByteString(String(aExcept.Message), gsl_getSystemTextEncoding()).GetBuffer());
+#endif
}
}
@@ -1241,13 +1212,13 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
rSh.SetAutoUpdateCells( bIsAutoUpdateCells );
}
- else // Daten als Felder/Text einfuegen
+ else // add data as fields/text
{
_DB_Columns aColArr;
if( SplitTextToColArr( aEdDbText.GetText(), aColArr, aRbAsField.IsChecked() ) )
{
- // jetzt kann bei jedem Datensatz einfach ueber das Array iteriert
- // und die Daten eingefuegt werden
+ // now for each data set, we can iterate over the array
+ // and add the data
if( !rSh.IsSttPara() )
rSh.SwEditShell::SplitNode();
@@ -1277,8 +1248,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
}
- // fuers Einfuegen als Felder -> nach jedem Datensatz ein
- // "NextField" einfuegen
+ // for adding as fields -> insert a "NextField" after
+ // every data set
SwDBFormatData aDBFormatData;
Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
if( xMgr.is() )
@@ -1349,8 +1320,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
case _DB_Column::DB_SPLITPARA:
rSh.SplitNode();
- // wenn nicht die gleiche Vorlage die Follow Vorlage
- // ist, dann muss die ausgewaehlte neu gesetzt werden
+ // when the template is not the same as the follow template,
+ // the selected has to be set newly
if( pColl && &pColl->GetNextTxtFmtColl() != pColl )
rSh.SetTxtFmtColl( pColl );
break;
@@ -1425,18 +1396,16 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
if( bSetCrsr && sIns.Len() )
{
- // zum Anfang und eine Mark setzen, damit der
- // Cursor am Ende wieder auf Anfangsposition
- // gesetzt werden kann.
+ // to the beginning and set a mark, so that
+ // the cursor can be set to the initial position
+ // at the end.
- // rSh.SwCrsrShell::MovePara( fnParaCurr, fnParaStart );
rSh.SwCrsrShell::MovePara(
GetfnParaCurr(), GetfnParaStart() );
pMark = rSh.SetBookmark(
KeyCode(),
::rtl::OUString(),
::rtl::OUString(), IDocumentMarkAccess::UNO_BOOKMARK );
- // rSh.SwCrsrShell::MovePara( fnParaCurr, fnParaEnd );
rSh.SwCrsrShell::MovePara(
GetfnParaCurr(), GetfnParaEnd() );
bSetCrsr = sal_False;
@@ -1487,6 +1456,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
if ( bDisposeResultSet )
::comphelper::disposeComponent(xResultSet);
}
+
void SwInsertDBColAutoPilot::SetTabSet()
{
SwWrtShell& rSh = pView->GetWrtShell();
@@ -1496,7 +1466,7 @@ void SwInsertDBColAutoPilot::SetTabSet()
{
if( pTAutoFmt->IsFrame() )
{
- // Umrandung kommt vom AutoFormat
+ // border is from AutoFormat
pTblSet->ClearItem( RES_BOX );
pTblSet->ClearItem( SID_ATTR_BORDER_INNER );
}
@@ -1509,9 +1479,9 @@ void SwInsertDBColAutoPilot::SetTabSet()
}
else
{
- // die Defaults wieder entfernen, es macht keinen Sinn sie zu setzen
+ // remove the defaults again, it makes no sense to set them
SvxBrushItem aBrush( RES_BACKGROUND );
- static sal_uInt16 __READONLY_DATA aIds[3] =
+ static sal_uInt16 aIds[3] =
{ RES_BACKGROUND, SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE };
for( int i = 0; i < 3; ++i )
if( SFX_ITEM_SET == pTblSet->GetItemState( aIds[ i ],
@@ -1534,14 +1504,8 @@ void SwInsertDBColAutoPilot::SetTabSet()
rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() );
}
-/* */
-
-
_DB_ColumnConfigData::~_DB_ColumnConfigData() {}
-/* -----------------------------05.12.00 16:15--------------------------------
-
- ---------------------------------------------------------------------------*/
static Sequence<rtl::OUString> lcl_createSourceNames(const String& rNodeName)
{
Sequence<rtl::OUString> aSourceNames(11);
@@ -1573,9 +1537,7 @@ static Sequence<rtl::OUString> lcl_createSourceNames(const String& rNodeName)
RTL_CONSTASCII_STRINGPARAM( "/IsEmptyHeadline" ));
return aSourceNames;
}
-/* -----------------------------05.12.00 16:25--------------------------------
- ---------------------------------------------------------------------------*/
static Sequence<rtl::OUString> lcl_CreateSubNames( const String& rSubNodeName )
{
Sequence<rtl::OUString> aSubSourceNames(6);
@@ -1596,9 +1558,7 @@ static Sequence<rtl::OUString> lcl_CreateSubNames( const String& rSubNodeName )
RTL_CONSTASCII_STRINGPARAM( "/NumberFormatLocale" ));
return aSubSourceNames;
}
-/* -----------------------------06.12.00 13:03--------------------------------
- ---------------------------------------------------------------------------*/
static rtl::OUString lcl_CreateUniqueName(const Sequence<rtl::OUString>& aNames)
{
sal_Int32 nIdx = aNames.getLength();
@@ -1622,9 +1582,7 @@ static rtl::OUString lcl_CreateUniqueName(const Sequence<rtl::OUString>& aNames)
}
return sRet;
}
-/* -----------------------------05.12.00 15:00--------------------------------
- ---------------------------------------------------------------------------*/
void SwInsertDBColAutoPilot::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
void SwInsertDBColAutoPilot::Commit()
@@ -1760,9 +1718,7 @@ void SwInsertDBColAutoPilot::Commit()
SetSetProperties(sColumnNode, aSubValues);
}
}
-/* -----------------------------05.12.00 15:00--------------------------------
- ---------------------------------------------------------------------------*/
void SwInsertDBColAutoPilot::Load()
{
Sequence <rtl::OUString> aNames = GetNodeNames(rtl::OUString());
@@ -1845,7 +1801,6 @@ void SwInsertDBColAutoPilot::Load()
pInsDBColumn->nUsrNumFmt = rNFmtr.GetEntryKey( pInsDBColumn->sUsrNumFmt,
pInsDBColumn->eUsrNumFmtLng );
-// pInsDBColumn->nDBNumFmt
pNewData->aDBColumns.Insert(pInsDBColumn);
}
@@ -1884,7 +1839,7 @@ void SwInsertDBColAutoPilot::Load()
sTmp = pNewData->sTAutoFmtNm;
if( sTmp.Len() )
{
- // dann erstmal die AutoFmt-Datei laden und das Autoformat suchen
+ // then load the AutoFmt file and look for Autoformat first
SwTableAutoFmtTbl aAutoFmtTbl;
aAutoFmtTbl.Load();
for( sal_uInt16 nAutoFmt = aAutoFmtTbl.Count(); nAutoFmt; )
@@ -1904,8 +1859,8 @@ void SwInsertDBColAutoPilot::Load()
aRbHeadlEmpty.Check( pNewData->bIsEmptyHeadln );
HeaderHdl(&aCbTableHeadon);
- // jetzt noch die benutzerdefinierten Numberformat Strings in die
- // Shell kopieren. Nur diese sind dann als ID verfuegbar
+ // now copy the user defined Numberformat strings to the
+ // Shell. Then only these are available as ID
for( n = 0; n < aDBColumns.Count() ; ++n )
{
SwInsDBColumn& rSet = *aDBColumns[ n ];
@@ -1934,7 +1889,7 @@ void SwInsertDBColAutoPilot::Load()
}
}
- // steht der Cursor in einer Tabelle, darf NIE Tabelle auswaehlbar sein
+ // when the cursor is inside of a table, table must NEVER be selectable
if( !aRbAsTable.IsEnabled() && aRbAsTable.IsChecked() )
aRbAsField.Check( sal_True );
delete pNewData;
@@ -1943,3 +1898,4 @@ void SwInsertDBColAutoPilot::Load()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 13645f395d04..0a32522b4eb0 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#if STLPORT_VERSION>=321
#include <cstdarg>
-#endif
#include <stdio.h>
#include <unotxdoc.hxx>
@@ -120,7 +119,7 @@
#include <sfx2/event.hxx>
#include <vcl/msgbox.hxx>
#include <svx/dataaccessdescriptor.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <rtl/textenc.h>
#include <ndindex.hxx>
#include <pam.hxx>
@@ -129,7 +128,6 @@
#include <osl/file.hxx>
#include <swabstdlg.hxx>
#include <fmthdft.hxx>
-#include <dbui.hrc>
#include <envelp.hrc>
#include <memory>
#include <vector>
@@ -196,7 +194,7 @@ bool lcl_getCountFromResultSet( sal_Int32& rCount, const uno::Reference<XResultS
}
return false;
}
-// #122799# copy compatibility options
+// copy compatibility options
void lcl_CopyCompatibilityOptions( SwWrtShell& rSourceShell, SwWrtShell& rTargetShell)
{
IDocumentSettingAccess* pIDsa = rSourceShell.getIDocumentSettingAccess();
@@ -213,9 +211,6 @@ void lcl_CopyCompatibilityOptions( SwWrtShell& rSourceShell, SwWrtShell& rTarget
rTargetShell.SetUseFormerTextWrapping( pIDsa->get(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING));
}
}
-/* -----------------09.12.2002 12:35-----------------
- *
- * --------------------------------------------------*/
class SwConnectionDisposedListener_Impl : public cppu::WeakImplHelper1
< lang::XEventListener >
@@ -228,7 +223,7 @@ public:
~SwConnectionDisposedListener_Impl();
};
-// -----------------------------------------------------------------------------
+
struct SwNewDBMgr_Impl
{
SwDSParam* pMergeData;
@@ -241,9 +236,7 @@ struct SwNewDBMgr_Impl
,xDisposeListener(new SwConnectionDisposedListener_Impl(rDBMgr))
{}
};
-/*-- 24.10.2003 15:54:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void lcl_InitNumberFormatter(SwDSParam& rParam, uno::Reference<XDataSource> xSource)
{
uno::Reference<XMultiServiceFactory> xMgr = ::comphelper::getProcessServiceFactory();
@@ -274,9 +267,7 @@ void lcl_InitNumberFormatter(SwDSParam& rParam, uno::Reference<XDataSource> xSou
}
}
}
-/* -----------------------------17.07.00 17:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
{
sal_Bool bRet = sal_False;
@@ -288,7 +279,7 @@ sal_Bool lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
}
else
{
- DBG_ERROR("no absolute positioning available");
+ OSL_ENSURE(false, "no absolute positioning available");
}
}
catch(Exception aExcept)
@@ -296,9 +287,7 @@ sal_Bool lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
}
return bRet;
}
-/* -----------------------------17.07.00 17:23--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool lcl_GetColumnCnt(SwDSParam* pParam,
const String& rColumnName, long nLanguage, String& rResult, double* pNumber)
{
@@ -332,14 +321,15 @@ sal_Bool lcl_GetColumnCnt(SwDSParam* pParam,
rResult = SwNewDBMgr::GetDBField( xColumnProps, aFormatData, pNumber);
return sal_True;
};
+
/*--------------------------------------------------------------------
- Beschreibung: Daten importieren
+ Description: import data
--------------------------------------------------------------------*/
sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
{
SetMergeType( rMergeDesc.nMergeType );
- DBG_ASSERT(!bInMerge && !pImpl->pMergeData, "merge already activated!");
+ OSL_ENSURE(!bInMerge && !pImpl->pMergeData, "merge already activated!");
SwDBData aData;
aData.nCommandType = CommandType::TABLE;
@@ -369,7 +359,7 @@ sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
*pTemp = *pImpl->pMergeData;
else
{
- //#94779# calls from the calculator may have added a connection with an invalid commandtype
+ // calls from the calculator may have added a connection with an invalid commandtype
//"real" data base connections added here have to re-use the already available
//DSData and set the correct CommandType
SwDBData aTempData(aData);
@@ -417,7 +407,7 @@ sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
{
pImpl->pMergeData->bEndOfDB = sal_True;
pImpl->pMergeData->CheckEndOfDB();
- DBG_ERROR("exception in MergeNew()");
+ OSL_ENSURE(false, "exception in MergeNew()");
}
uno::Reference<XDataSource> xSource = SwNewDBMgr::getDataSourceAsParent(xConnection,aData.sDataSource);
@@ -429,7 +419,7 @@ sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
if (IsInitDBFields())
{
- // Bei Datenbankfeldern ohne DB-Name DB-Name von Dok einsetzen
+ // with database fields without DB-Name, use DB-Name from Doc
SvStringsDtor aDBNames(1, 1);
aDBNames.Insert( new String(), 0);
SwDBData aInsertData = rMergeDesc.rSh.GetDBData();
@@ -446,7 +436,7 @@ sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
switch(rMergeDesc.nMergeType)
{
case DBMGR_MERGE:
- bRet = Merge(&rMergeDesc.rSh); // Mischen
+ bRet = Merge(&rMergeDesc.rSh);
break;
case DBMGR_MERGE_MAILMERGE: // printing merge from 'old' merge dialog or from UNO-component
@@ -458,8 +448,9 @@ sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
rMergeDesc);
break;
- default: // Einfuegen der selektierten Eintraege
- // (war: InsertRecord)
+ default:
+ // insert selected entries
+ // (was: InsertRecord)
ImportFromConnection(&rMergeDesc.rSh);
break;
}
@@ -469,10 +460,8 @@ sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
}
/*--------------------------------------------------------------------
- Beschreibung: Daten importieren
+ Description: import data
--------------------------------------------------------------------*/
-
-
sal_Bool SwNewDBMgr::Merge(SwWrtShell* pSh)
{
pSh->StartAllAction();
@@ -485,9 +474,6 @@ sal_Bool SwNewDBMgr::Merge(SwWrtShell* pSh)
return sal_True;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
{
if(pImpl->pMergeData && !pImpl->pMergeData->bEndOfDB)
@@ -521,9 +507,6 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
}
}
}
-/*-----------------24.02.97 10.30-------------------
-
---------------------------------------------------*/
String lcl_FindColumn(const String& sFormatStr,sal_uInt16 &nUsedPos, sal_uInt8 &nSeparator)
{
@@ -556,9 +539,6 @@ String lcl_FindColumn(const String& sFormatStr,sal_uInt16 &nUsedPos, sal_uInt8
return sReturn;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
void SwNewDBMgr::ImportDBEntry(SwWrtShell* pSh)
{
if(pImpl->pMergeData && !pImpl->pMergeData->bEndOfDB)
@@ -597,7 +577,7 @@ void SwNewDBMgr::ImportDBEntry(SwWrtShell* pSh)
}
else
{
- // Spalte nicht gefunden -> Fehler anzeigen
+ // column not found -> show error
String sInsert = '?';
sInsert += sColumn;
sInsert += '?';
@@ -624,12 +604,13 @@ void SwNewDBMgr::ImportDBEntry(SwWrtShell* pSh)
sStr += '\t';
}
pSh->SwEditShell::Insert2(sStr);
- pSh->SwFEShell::SplitNode(); // Zeilenvorschub
+ pSh->SwFEShell::SplitNode(); // line feed
}
}
}
+
/*--------------------------------------------------------------------
- Beschreibung: Listbox mit Tabellenliste fuellen
+ Description: fill Listbox with tablelist
--------------------------------------------------------------------*/
sal_Bool SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
{
@@ -680,7 +661,7 @@ sal_Bool SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
}
/*--------------------------------------------------------------------
- Beschreibung: Listbox mit Spaltennamen einer Datenbank fuellen
+ Description: fill Listbox with column names of a database
--------------------------------------------------------------------*/
sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox,
const String& rDBName, const String& rTableName, sal_Bool bAppend)
@@ -714,9 +695,7 @@ sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox,
}
return(sal_True);
}
-/* -----------------------------08.06.01 15:11--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox,
uno::Reference< XConnection> xConnection,
const String& rTableName, sal_Bool bAppend)
@@ -739,9 +718,8 @@ sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox,
}
/*--------------------------------------------------------------------
- Beschreibung: CTOR
+ Description: CTOR
--------------------------------------------------------------------*/
-
SwNewDBMgr::SwNewDBMgr() :
nMergeType(DBMGR_INSERT),
bInitDBFields(sal_False),
@@ -752,9 +730,7 @@ SwNewDBMgr::SwNewDBMgr() :
pMergeEvtSrc(NULL)
{
}
-/* -----------------------------18.07.00 08:56--------------------------------
- ---------------------------------------------------------------------------*/
SwNewDBMgr::~SwNewDBMgr()
{
for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
@@ -778,7 +754,7 @@ SwNewDBMgr::~SwNewDBMgr()
}
/*--------------------------------------------------------------------
- Beschreibung: Serienbriefe als einzelne Dokumente speichern
+ Description: save bulk letters as single documents
--------------------------------------------------------------------*/
String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageDesc, sal_uLong nDocNo )
{
@@ -791,15 +767,14 @@ String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageD
++nDocNo;
}while(true);
}
+
void lcl_CopyDynamicDefaults( const SwDoc& rSource, SwDoc& rTarget )
{
- sal_uInt16 __FAR_DATA aRangeOfDefaults[] = {
+ sal_uInt16 aRangeOfDefaults[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
- // --> OD 2008-02-25 #refactorlists##
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
- // <--
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
@@ -821,6 +796,7 @@ void lcl_CopyDynamicDefaults( const SwDoc& rSource, SwDoc& rTarget )
if( aNewDefaults.Count() )
rTarget.SetDefault( aNewDefaults );
}
+
void lcl_CopyFollowPageDesc(
SwWrtShell& rTargetShell,
const SwPageDesc& rSourcePageDesc,
@@ -879,7 +855,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
xMailDispatcher.set( new MailDispatcher(rMergeDescriptor.xSmtpServer));
if(!rMergeDescriptor.bSendAsAttachment && rMergeDescriptor.bSendAsHTML)
{
- sBodyMimeType = ::rtl::OUString::createFromAscii("text/html; charset=");
+ sBodyMimeType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("text/html; charset="));
sBodyMimeType += ::rtl::OUString::createFromAscii(
rtl_getBestMimeCharsetFromTextEncoding( eEncoding ));
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
@@ -887,7 +863,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
}
else
sBodyMimeType =
- ::rtl::OUString::createFromAscii("text/plain; charset=UTF-8; format=flowed");
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain; charset=UTF-8; format=flowed"));
}
uno::Reference< XPropertySet > xColumnProp;
@@ -976,7 +952,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
nStartingPageNo = pSourceShell->GetVirtPageNum();
sStartingPageDesc = sModifiedStartingPageDesc = pSourceShell->GetPageDesc(
pSourceShell->GetCurPageDesc()).GetName();
- // #122799# copy compatibility options
+ // copy compatibility options
lcl_CopyCompatibilityOptions( *pSourceShell, *pTargetShell);
// #72821# copy dynamic defaults
lcl_CopyDynamicDefaults( *pSourceShell->GetDoc(), *pTargetShell->GetDoc() );
@@ -995,10 +971,10 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
if (!IsMergeSilent())
aPrtMonDlg.Show();
- // Progress, um KeyInputs zu unterbinden
+ // Progress, to prohibit KeyInputs
SfxProgress aProgress(pSourrceDocSh, ::aEmptyStr, 1);
- // Alle Dispatcher sperren
+ // lock all dispatchers
SfxViewFrame* pViewFrm = SfxViewFrame::GetFirst(pSourrceDocSh);
while (pViewFrm)
{
@@ -1063,7 +1039,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
sStat += String::CreateFromInt32( nDocNo );
aPrtMonDlg.aPrintInfo.SetText(sStat);
- // Rechenzeit fuer Save-Monitor:
+ // computation time for Save-Monitor:
for (sal_uInt16 i = 0; i < 10; i++)
Application::Reschedule();
@@ -1088,7 +1064,6 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
pWorkDoc->UpdateFlds(NULL, false);
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE_FINISHED, SwDocShell::GetEventName(STR_SW_EVENT_FIELD_MERGE_FINISHED), xWorkDocSh));
- // alle versteckten Felder/Bereiche entfernen
pWorkDoc->RemoveInvisibleContent();
// launch MailMergeEvent if required
@@ -1102,7 +1077,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
if(rMergeDescriptor.bCreateSingleFile || bAsSingleFile )
{
- DBG_ASSERT( pTargetShell, "no target shell available!" );
+ OSL_ENSURE( pTargetShell, "no target shell available!" );
// copy created file into the target document
rWorkShell.ConvertFieldsToText();
rWorkShell.SetNumberingRestart();
@@ -1143,7 +1118,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
pTargetShell->InsertPageBreak( &sModifiedStartingPageDesc, nStartingPageNo );
else
pTargetShell->SetPageStyle(sModifiedStartingPageDesc);
- DBG_ASSERT(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended");
+ OSL_ENSURE(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended");
//#i51359# add a second paragraph in case there's only one
{
SwNodeIndex aIdx( pWorkDoc->GetNodes().GetEndOfExtras(), 2 );
@@ -1200,13 +1175,12 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
String sMailAddress = GetDBField( xColumnProp, aDBFormat);
if(!SwMailMergeHelper::CheckMailAddress( sMailAddress ))
{
- DBG_ERROR("invalid e-Mail address in database column");
+ OSL_ENSURE(false, "invalid e-Mail address in database column");
}
else
{
- SwMailMessage* pMessage = 0;
- uno::Reference< mail::XMailMessage > xMessage =
- pMessage = new SwMailMessage;
+ SwMailMessage* pMessage = new SwMailMessage;
+ uno::Reference< mail::XMailMessage > xMessage = pMessage;
if(rMergeDescriptor.pMailMergeConfigItem->IsMailReplyTo())
pMessage->setReplyToAddress(rMergeDescriptor.pMailMergeConfigItem->GetMailReplyTo());
pMessage->addRecipient( sMailAddress );
@@ -1229,7 +1203,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
//read in the temporary file and use it as mail body
SfxMedium aMedium( sFileURL, STREAM_READ, sal_True);
SvStream* pInStream = aMedium.GetInStream();
- DBG_ASSERT(pInStream, "no output file created?");
+ OSL_ENSURE(pInStream, "no output file created?");
if(pInStream)
{
pInStream->SetStreamCharSet( eEncoding );
@@ -1288,7 +1262,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
if( rMergeDescriptor.nMergeType != DBMGR_MERGE_MAILMERGE )
{
- DBG_ASSERT( aTempFile.get(), "Temporary file not available" );
+ OSL_ENSURE( aTempFile.get(), "Temporary file not available" );
INetURLObject aTempFileURL(bAsSingleFile ? sSubject : aTempFile->GetURL());
SfxMedium* pDstMed = new SfxMedium(
aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ),
@@ -1333,21 +1307,17 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
uno::Sequence< beans::PropertyValue > aOptions( rMergeDescriptor.aPrintOptions );
const sal_Int32 nOpts = aOptions.getLength();
aOptions.realloc( nOpts + 1 );
- aOptions[ nOpts ].Name = rtl::OUString::createFromAscii( "Wait" );
+ aOptions[ nOpts ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wait"));
aOptions[ nOpts ].Value <<= sal_True ;
-// aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, sal_True) );
-// // #i52629# aynchronous printing should only be done in silent mode - otherwise
-// // the printer dialog does not come up
-// aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, rMergeDescriptor.bPrintAsync ));
// move print options
const beans::PropertyValue* pPrintOptions = rMergeDescriptor.aPrintOptions.getConstArray();
for( sal_Int32 nOption = 0; nOption < rMergeDescriptor.aPrintOptions.getLength(); ++nOption)
{
- if( pPrintOptions[nOption].Name.equalsAscii( "CopyCount" )
- ||( pPrintOptions[nOption].Name.equalsAscii( "FileName" ))
- ||( pPrintOptions[nOption].Name.equalsAscii( "Collate" ))
- ||( pPrintOptions[nOption].Name.equalsAscii( "Pages" ))
- ||( pPrintOptions[nOption].Name.equalsAscii( "Wait" )))
+ if( pPrintOptions[nOption].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CopyCount"))
+ ||( pPrintOptions[nOption].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FileName")))
+ ||( pPrintOptions[nOption].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Collate" )))
+ ||( pPrintOptions[nOption].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Pages")))
+ ||( pPrintOptions[nOption].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Wait"))))
{
aOptions.realloc( nOpts + 1 );
aOptions[ nOpts ].Name = pPrintOptions[nOption].Name;
@@ -1355,14 +1325,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
}
}
-// const SwModuleOptions * pModOpt = SW_MOD()->GetModuleConfig();
-// if (pModOpt->IsSinglePrintJob())
-// {
-// }
-// else
-// {
pTargetView->ExecPrint( aOptions, IsMergeSilent(), rMergeDescriptor.bPrintAsync );
-// }
}
xTargetDocShell->DoClose();
}
@@ -1373,7 +1336,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
aFileIter != aFilesToRemove.end(); aFileIter++)
SWUnoHelper::UCB_DeleteFile( *aFileIter );
- // Alle Dispatcher freigeben
+ // unlock all dispatchers
pViewFrm = SfxViewFrame::GetFirst(pSourrceDocSh);
while (pViewFrm)
{
@@ -1397,10 +1360,6 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
return bLoop;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK_INLINE_START( SwNewDBMgr, PrtCancelHdl, Button *, pButton )
{
pButton->GetParent()->Hide();
@@ -1409,12 +1368,10 @@ IMPL_LINK_INLINE_START( SwNewDBMgr, PrtCancelHdl, Button *, pButton )
}
IMPL_LINK_INLINE_END( SwNewDBMgr, PrtCancelHdl, Button *, pButton )
-
/*--------------------------------------------------------------------
- Beschreibung: Numberformat der Spalte ermitteln und ggfs. in
- den uebergebenen Formatter uebertragen
+ Description: determine the column's Numberformat and transfer
+ to the forwarded Formatter, if applicable.
--------------------------------------------------------------------*/
-
sal_uLong SwNewDBMgr::GetColumnFmt( const String& rDBName,
const String& rTableName,
const String& rColNm,
@@ -1472,7 +1429,7 @@ sal_uLong SwNewDBMgr::GetColumnFmt( const String& rDBName,
}
catch(Exception&)
{
- DBG_ERROR("Exception in getColumns()");
+ OSL_ENSURE(false, "Exception in getColumns()");
}
if(!xCols.is() || !xCols->hasByName(rColNm))
return nRet;
@@ -1494,16 +1451,14 @@ sal_uLong SwNewDBMgr::GetColumnFmt( const String& rDBName,
}
return nRet;
}
-/* -----------------------------07.06.01 15:43--------------------------------
- ---------------------------------------------------------------------------*/
sal_uLong SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource,
uno::Reference< XConnection> xConnection,
uno::Reference< XPropertySet> xColumn,
SvNumberFormatter* pNFmtr,
long nLanguage )
{
- //JP 12.01.99: ggfs. das NumberFormat im Doc setzen
+ // set the NumberFormat in the doc if applicable
sal_uLong nRet = 0;
if(!xSource.is())
@@ -1564,14 +1519,14 @@ sal_uLong SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource,
}
catch(const Exception&)
{
- DBG_ERROR("illegal number format key");
+ OSL_ENSURE(false, "illegal number format key");
}
}
}
}
catch( const Exception& )
{
- DBG_ERROR("no FormatKey property found");
+ OSL_ENSURE(false, "no FormatKey property found");
}
if(bUseDefault)
nRet = SwNewDBMgr::GetDbtoolsClient().getDefaultNumberFormat(xColumn, xDocNumberFormatTypes, aLocale);
@@ -1579,9 +1534,6 @@ sal_uLong SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource,
return nRet;
}
-/* -----------------------------17.07.00 09:47--------------------------------
-
- ---------------------------------------------------------------------------*/
sal_Int32 SwNewDBMgr::GetColumnType( const String& rDBName,
const String& rTableName,
const String& rColNm )
@@ -1627,9 +1579,6 @@ sal_Int32 SwNewDBMgr::GetColumnType( const String& rDBName,
return nRet;
}
-/* -----------------------------03.07.00 17:12--------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Reference< sdbc::XConnection> SwNewDBMgr::GetConnection(const String& rDataSource,
uno::Reference<XDataSource>& rxSource)
{
@@ -1650,9 +1599,7 @@ uno::Reference< sdbc::XConnection> SwNewDBMgr::GetConnection(const String& rData
return xConnection;
}
-/* -----------------------------03.07.00 17:12--------------------------------
- ---------------------------------------------------------------------------*/
uno::Reference< sdbcx::XColumnsSupplier> SwNewDBMgr::GetColumnSupplier(uno::Reference<sdbc::XConnection> xConnection,
const String& rTableOrQuery,
sal_uInt8 eTableOrQuery)
@@ -1696,21 +1643,19 @@ uno::Reference< sdbcx::XColumnsSupplier> SwNewDBMgr::GetColumnSupplier(uno::Refe
}
catch( const uno::Exception& )
{
- DBG_ERROR("Exception in SwDBMgr::GetColumnSupplier");
+ OSL_ENSURE(false, "Exception in SwDBMgr::GetColumnSupplier");
}
return xRet;
}
-/* -----------------------------05.07.00 13:44--------------------------------
- ---------------------------------------------------------------------------*/
String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps,
const SwDBFormatData& rDBFormatData,
double* pNumber)
{
uno::Reference< XColumn > xColumn(xColumnProps, UNO_QUERY);
String sRet;
- DBG_ASSERT(xColumn.is(), "SwNewDBMgr::::ImportDBField: illegal arguments");
+ OSL_ENSURE(xColumn.is(), "SwNewDBMgr::::ImportDBField: illegal arguments");
if(!xColumn.is())
return sRet;
@@ -1745,8 +1690,6 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps,
case DataType::TIME:
case DataType::TIMESTAMP:
{
-// ::Date aTempDate(rDBFormatData.aNullDate.Day,
-// rDBFormatData.aNullDate.Month, rDBFormatData.aNullDate.Year);
try
{
@@ -1767,47 +1710,26 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps,
}
catch(Exception& )
{
- DBG_ERROR("exception caught");
+ OSL_ENSURE(false, "exception caught");
}
}
break;
-
-// case DataType::BINARY:
-// case DataType::VARBINARY:
-// case DataType::LONGVARBINARY:
-// case DataType::SQLNULL:
-// case DataType::OTHER:
-// case DataType::OBJECT:
-// case DataType::DISTINCT:
-// case DataType::STRUCT:
-// case DataType::ARRAY:
-// case DataType::BLOB:
-// case DataType::CLOB:
-// case DataType::REF:
-// default:
- }
-// if (pFormat)
-// {
-// SFX_ITEMSET_GET(*pCol, pFormatItem, SfxUInt32Item, SBA_DEF_FMTVALUE, sal_True);
-// *pFormat = pFormatItem->GetValue();
-// }
+ }
return sRet;
}
-/* -----------------------------06.07.00 14:28--------------------------------
- releases the merge data source table or query after merge is completed
- ---------------------------------------------------------------------------*/
+
+// releases the merge data source table or query after merge is completed
void SwNewDBMgr::EndMerge()
{
- DBG_ASSERT(bInMerge, "merge is not active");
+ OSL_ENSURE(bInMerge, "merge is not active");
bInMerge = sal_False;
delete pImpl->pMergeData;
pImpl->pMergeData = 0;
}
-/* -----------------------------06.07.00 14:28--------------------------------
- checks if a desired data source table or query is open
- ---------------------------------------------------------------------------*/
+
+// checks if a desired data source table or query is open
sal_Bool SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
const String& rTableOrQuery, sal_Bool bMergeOnly)
{
@@ -1831,9 +1753,8 @@ sal_Bool SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
}
return sal_False;
}
-/* -----------------------------17.07.00 16:44--------------------------------
- read column data a a specified position
- ---------------------------------------------------------------------------*/
+
+// read column data at a specified position
sal_Bool SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableName,
const String& rColumnName, sal_uInt32 nAbsRecordId,
long nLanguage,
@@ -1896,9 +1817,9 @@ sal_Bool SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTabl
}
return bRet;
}
-/* -----------------------------06.07.00 16:47--------------------------------
- reads the column data at the current position
- ---------------------------------------------------------------------------*/
+
+
+// reads the column data at the current position
sal_Bool SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, sal_uInt16 nLanguage,
String &rResult, double *pNumber, sal_uInt32 * /*pFormat*/)
{
@@ -1911,17 +1832,13 @@ sal_Bool SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, sal_uInt16
sal_Bool bRet = lcl_GetColumnCnt(pImpl->pMergeData, rColumnName, nLanguage, rResult, pNumber);
return bRet;
}
-/* -----------------------------07.07.00 14:28--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwNewDBMgr::ToNextMergeRecord()
{
- DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
+ OSL_ENSURE(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
return ToNextRecord(pImpl->pMergeData);
}
-/* -----------------------------10.07.01 14:28--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwNewDBMgr::ToNextRecord(
const String& rDataSource, const String& rCommand, sal_Int32 /*nCommandType*/)
{
@@ -1940,9 +1857,7 @@ sal_Bool SwNewDBMgr::ToNextRecord(
}
return ToNextRecord(pFound);
}
-/* -----------------------------10.07.01 14:38--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
{
sal_Bool bRet = sal_True;
@@ -1986,7 +1901,7 @@ sal_Bool SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
return bRet;
}
-/* -----------------------------13.07.00 17:23--------------------------------
+/* ------------------------------------------------------------------------
synchronized labels contain a next record field at their end
to assure that the next page can be created in mail merge
the cursor position must be validated
@@ -1995,13 +1910,11 @@ sal_Bool SwNewDBMgr::ExistsNextRecord() const
{
return pImpl->pMergeData && !pImpl->pMergeData->bEndOfDB;
}
-/* -----------------------------13.07.00 10:41--------------------------------
- ---------------------------------------------------------------------------*/
sal_uInt32 SwNewDBMgr::GetSelectedRecordId()
{
sal_uInt32 nRet = 0;
- DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
+ OSL_ENSURE(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is())
return sal_False;
try
@@ -2013,12 +1926,10 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId()
}
return nRet;
}
-/* -----------------------------13.07.00 10:58--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwNewDBMgr::ToRecordId(sal_Int32 nSet)
{
- DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
+ OSL_ENSURE(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is()|| nSet < 0)
return sal_False;
sal_Bool bRet = sal_False;
@@ -2033,9 +1944,6 @@ sal_Bool SwNewDBMgr::ToRecordId(sal_Int32 nSet)
return bRet;
}
-/* -----------------------------17.07.00 14:17--------------------------------
-
- ---------------------------------------------------------------------------*/
sal_Bool SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
sal_Int32 nCommandType, bool bCreate)
{
@@ -2069,7 +1977,7 @@ sal_Bool SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTa
}
catch(Exception&)
{
- //#98373# DB driver may not be ODBC 3.0 compliant
+ // DB driver may not be ODBC 3.0 compliant
pFound->bScrollable = sal_True;
}
pFound->xStatement = pFound->xConnection->createStatement();
@@ -2096,9 +2004,7 @@ sal_Bool SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTa
}
return pFound->xResultSet.is();
}
-/* -----------------------------14.08.2001 10:26------------------------------
- ---------------------------------------------------------------------------*/
uno::Reference< XConnection> SwNewDBMgr::RegisterConnection(rtl::OUString& rDataSource)
{
SwDSParam* pFound = SwNewDBMgr::FindDSConnection(rDataSource, sal_True);
@@ -2118,9 +2024,7 @@ uno::Reference< XConnection> SwNewDBMgr::RegisterConnection(rtl::OUString& rData
}
return pFound->xConnection;
}
-/* -----------------------------17.07.00 15:55--------------------------------
- ---------------------------------------------------------------------------*/
sal_uInt32 SwNewDBMgr::GetSelectedRecordId(
const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType)
{
@@ -2159,9 +2063,8 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId(
return nRet;
}
-/* -----------------------------17.07.00 14:18--------------------------------
- close all data sources - after fields were updated
- ---------------------------------------------------------------------------*/
+
+// close all data sources - after fields were updated
void SwNewDBMgr::CloseAll(sal_Bool bIncludingMerge)
{
//the only thing done here is to reset the selection index
@@ -2184,9 +2087,7 @@ void SwNewDBMgr::CloseAll(sal_Bool bIncludingMerge)
}
}
}
-/* -----------------------------17.07.00 14:54--------------------------------
- ---------------------------------------------------------------------------*/
SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, sal_Bool bCreate)
{
//prefer merge data if available
@@ -2207,7 +2108,7 @@ SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, sal_Bool bCreate)
(rData.nCommandType == -1 || rData.nCommandType == pParam->nCommandType ||
(bCreate && pParam->nCommandType == -1)))
{
- //#94779# calls from the calculator may add a connection with an invalid commandtype
+ // calls from the calculator may add a connection with an invalid commandtype
//later added "real" data base connections have to re-use the already available
//DSData and set the correct CommandType
if(bCreate && pParam->nCommandType == -1)
@@ -2235,9 +2136,6 @@ SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, sal_Bool bCreate)
}
return pFound;
}
-/* -----------------------------14.08.2001 10:27------------------------------
-
- ---------------------------------------------------------------------------*/
SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, sal_Bool bCreate)
{
@@ -2275,16 +2173,11 @@ SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, sal_B
return pFound;
}
-/* -----------------------------17.07.00 14:34--------------------------------
-
- ---------------------------------------------------------------------------*/
const SwDBData& SwNewDBMgr::GetAddressDBName()
{
return SW_MOD()->GetDBConfig()->GetAddressSource();
}
-/* -----------------------------18.07.00 13:13--------------------------------
- ---------------------------------------------------------------------------*/
Sequence<rtl::OUString> SwNewDBMgr::GetExistingDatabaseNames()
{
uno::Reference<XNameAccess> xDBContext;
@@ -2300,9 +2193,7 @@ Sequence<rtl::OUString> SwNewDBMgr::GetExistingDatabaseNames()
}
return Sequence<rtl::OUString>();
}
-/*-- 26.05.2004 14:33:13---------------------------------------------------
- -----------------------------------------------------------------------*/
String SwNewDBMgr::LoadAndRegisterDataSource()
{
sfx2::FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 );
@@ -2493,9 +2384,7 @@ String SwNewDBMgr::LoadAndRegisterDataSource()
return sFind;
}
-/* -----------------------------10.11.00 17:10--------------------------------
- ---------------------------------------------------------------------------*/
void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
const Sequence<PropertyValue>& rProperties,
sal_Bool bWithDataSourceBrowser)
@@ -2521,7 +2410,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
if(!sDataSource.getLength() || !sDataTableOrQuery.getLength())
{
- DBG_ERROR("PropertyValues missing or unset");
+ OSL_ENSURE(false, "PropertyValues missing or unset");
return;
}
@@ -2533,7 +2422,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
pFound = FindDSConnection(sDataSource, sal_True);
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
pImpl->pMergeDialog = pFact->CreateMailMergeDlg( DLG_MAILMERGE,
&rSh.GetView().GetViewFrame()->GetWindow(), rSh,
sDataSource,
@@ -2541,7 +2430,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
nCmdType,
xConnection,
bWithDataSourceBrowser ? 0 : &aSelection);
- DBG_ASSERT(pImpl->pMergeDialog, "Dialogdiet fail!");
+ OSL_ENSURE(pImpl->pMergeDialog, "Dialogdiet fail!");
if(pImpl->pMergeDialog->Execute() == RET_OK)
{
aDescriptor[daSelection] <<= pImpl->pMergeDialog->GetSelection();
@@ -2590,7 +2479,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
{
SfxViewFrame *pFrame = SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 );
SwView *pView = (SwView*) pFrame->GetViewShell();
- pView->AttrChangedNotify( &pView->GetWrtShell() );//Damit SelectShell gerufen wird.
+ pView->AttrChangedNotify( &pView->GetWrtShell() );// in order for SelectShell to be called
//set the current DBMgr
SwDoc* pWorkDoc = pView->GetWrtShell().GetDoc();
SwNewDBMgr* pWorkDBMgr = pWorkDoc->GetNewDBMgr();
@@ -2652,17 +2541,13 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
}
DELETEZ(pImpl->pMergeDialog);
}
-/* -----------------------------13.11.00 08:20--------------------------------
- ---------------------------------------------------------------------------*/
void SwNewDBMgr::InsertText(SwWrtShell& rSh,
const Sequence< PropertyValue>& rProperties)
{
rtl::OUString sDataSource, sDataTableOrQuery;
uno::Reference<XResultSet> xResSet;
Sequence<Any> aSelection;
- sal_Bool bHasSelectionProperty = sal_False;
- sal_Int32 nSelectionPos = 0;
sal_Int16 nCmdType = CommandType::TABLE;
const PropertyValue* pValues = rProperties.getConstArray();
uno::Reference< XConnection> xConnection;
@@ -2675,11 +2560,7 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh,
else if(pValues[nPos].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(cCursor)))
pValues[nPos].Value >>= xResSet;
else if(pValues[nPos].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(cSelection)))
- {
- bHasSelectionProperty = sal_True;
- nSelectionPos = nPos;
pValues[nPos].Value >>= aSelection;
- }
else if(pValues[nPos].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(cCommandType)))
pValues[nPos].Value >>= nCmdType;
else if(pValues[nPos].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(cActiveConnection)))
@@ -2687,7 +2568,7 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh,
}
if(!sDataSource.getLength() || !sDataTableOrQuery.getLength() || !xResSet.is())
{
- DBG_ERROR("PropertyValues missing or unset");
+ OSL_ENSURE(false, "PropertyValues missing or unset");
return;
}
uno::Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
@@ -2704,14 +2585,14 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh,
aDBData.nCommandType = nCmdType;
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwInsertDBColAutoPilot* pDlg = pFact->CreateSwInsertDBColAutoPilot( rSh.GetView(),
xSource,
xColSupp,
aDBData,
DLG_AP_INSERT_DB_SEL );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute() )
{
rtl::OUString sDummy;
@@ -2723,15 +2604,13 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh,
}
catch(Exception& )
{
- DBG_ERROR("exception caught");
+ OSL_ENSURE(false, "exception caught");
}
}
delete pDlg;
}
-/* -----------------------------30.08.2001 12:00------------------------------
- ---------------------------------------------------------------------------*/
SwDbtoolsClient* SwNewDBMgr::pDbtoolsClient = NULL;
SwDbtoolsClient& SwNewDBMgr::GetDbtoolsClient()
@@ -2740,17 +2619,13 @@ SwDbtoolsClient& SwNewDBMgr::GetDbtoolsClient()
pDbtoolsClient = new SwDbtoolsClient;
return *pDbtoolsClient;
}
-/* -----------------13.05.2003 15:34-----------------
- --------------------------------------------------*/
void SwNewDBMgr::RemoveDbtoolsClient()
{
delete pDbtoolsClient;
pDbtoolsClient = 0;
}
-/* -----------------------------20.08.2002 12:00------------------------------
- ---------------------------------------------------------------------------*/
uno::Reference<XDataSource> SwNewDBMgr::getDataSourceAsParent(const uno::Reference< XConnection>& _xConnection,const ::rtl::OUString& _sDataSourceName)
{
uno::Reference<XDataSource> xSource;
@@ -2764,13 +2639,11 @@ uno::Reference<XDataSource> SwNewDBMgr::getDataSourceAsParent(const uno::Referen
}
catch(const Exception&)
{
- DBG_ERROR("exception in getDataSourceAsParent caught");
+ OSL_ENSURE(false, "exception in getDataSourceAsParent caught");
}
return xSource;
}
-/* -----------------------------20.08.2002 12:00------------------------------
- ---------------------------------------------------------------------------*/
uno::Reference<XResultSet> SwNewDBMgr::createCursor(const ::rtl::OUString& _sDataSourceName,
const ::rtl::OUString& _sCommand,
sal_Int32 _nCommandType,
@@ -2806,15 +2679,13 @@ uno::Reference<XResultSet> SwNewDBMgr::createCursor(const ::rtl::OUString& _sDat
}
catch(const Exception&)
{
- DBG_ASSERT(0,"Caught exception while creating a new RowSet!");
+ OSL_ENSURE(false,"Caught exception while creating a new RowSet!");
}
return xResultSet;
}
-/*-- 13.05.2004 16:14:15---------------------------------------------------
- merge all data into one resulting document and return the number of
- merged documents
- -----------------------------------------------------------------------*/
+
+// merge all data into one resulting document and return the number of merged documents
sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
SwView& rSourceView )
{
@@ -2848,7 +2719,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
{
pImpl->pMergeData->bEndOfDB = sal_True;
pImpl->pMergeData->CheckEndOfDB();
- DBG_ERROR("exception in MergeNew()");
+ OSL_ENSURE(false, "exception in MergeNew()");
}
//bCancel is set from the PrintMonitor
@@ -2887,7 +2758,6 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
Window& rSourceWindow = rSourceView.GetViewFrame()->GetFrame().GetWindow();
rTargetWindow.SetPosPixel(rSourceWindow.GetPosPixel());
-// pTargetFrame->GetFrame().Appear();
SwView* pTargetView = static_cast<SwView*>( pTargetFrame->GetViewShell() );
rMMConfig.SetTargetView(pTargetView);
//initiate SelectShell() to create sub shells
@@ -2900,7 +2770,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
rMaster.GetFooter().IsActive();
- // #122799# copy compatibility options
+ // copy compatibility options
lcl_CopyCompatibilityOptions( rSourceShell, *pTargetShell);
// #72821# copy dynamic defaults
lcl_CopyDynamicDefaults( *rSourceShell.GetDoc(), *pTargetShell->GetDoc() );
@@ -2942,7 +2812,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
//create a ViewFrame
SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 )->GetViewShell() );
SwWrtShell& rWorkShell = pWorkView->GetWrtShell();
- pWorkView->AttrChangedNotify( &rWorkShell );//Damit SelectShell gerufen wird.
+ pWorkView->AttrChangedNotify( &rWorkShell );// in order for SelectShell to be called
// merge the data
SwDoc* pWorkDoc = rWorkShell.GetDoc();
@@ -3014,7 +2884,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
pTargetShell->SetPageStyle(sModifiedStartingPageDesc);
}
sal_uInt16 nPageCountBefore = pTargetShell->GetPageCnt();
- DBG_ASSERT(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended");
+ OSL_ENSURE(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended");
//#i51359# add a second paragraph in case there's only one
{
SwNodeIndex aIdx( pWorkDoc->GetNodes().GetEndOfExtras(), 2 );
@@ -3067,35 +2937,31 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
pTargetShell->EnterStdMode();
pTargetShell->SttDoc();
- //
+
}
catch( Exception& rEx)
{
(void)rEx;
- DBG_ERROR("exception caught in SwNewDBMgr::MergeDocuments");
+ OSL_ENSURE(false, "exception caught in SwNewDBMgr::MergeDocuments");
}
DELETEZ(pImpl->pMergeData);
bInMerge = sal_False;
return nRet;
}
-/* -----------------09.12.2002 12:38-----------------
- *
- * --------------------------------------------------*/
+
SwConnectionDisposedListener_Impl::SwConnectionDisposedListener_Impl(SwNewDBMgr& rMgr) :
rDBMgr(rMgr)
-{};
-/* -----------------09.12.2002 12:39-----------------
- *
- * --------------------------------------------------*/
+{
+};
+
SwConnectionDisposedListener_Impl::~SwConnectionDisposedListener_Impl()
-{};
-/* -----------------09.12.2002 12:39-----------------
- *
- * --------------------------------------------------*/
+{
+};
+
void SwConnectionDisposedListener_Impl::disposing( const EventObject& rSource )
throw (RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ ::SolarMutexGuard aGuard;
uno::Reference<XConnection> xSource(rSource.Source, UNO_QUERY);
for(sal_uInt16 nPos = rDBMgr.aDataSourceParams.Count(); nPos; nPos--)
{
@@ -3107,3 +2973,5 @@ void SwConnectionDisposedListener_Impl::disposing( const EventObject& rSource )
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
index 463e64279e08..7a5fa0302f74 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,9 +40,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XFrame.hpp>
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/unohlp.hxx>
-#endif
#include <dbui.hrc>
#include <dbtablepreviewdialog.hrc>
@@ -55,9 +54,6 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
using namespace ::rtl;
-/*-- 08.04.2004 15:12:24---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwDBTablePreviewDialog::SwDBTablePreviewDialog(Window* pParent, uno::Sequence< beans::PropertyValue>& rValues ) :
SfxModalDialog(pParent, SW_RES(DLG_MM_DBTABLEPREVIEWDIALOG)),
#ifdef MSC
@@ -74,7 +70,7 @@ SwDBTablePreviewDialog::SwDBTablePreviewDialog(Window* pParent, uno::Sequence< b
const beans::PropertyValue* pValues = rValues.getConstArray();
for(sal_Int32 nValue = 0; nValue < rValues.getLength(); ++nValue )
{
- if(pValues[nValue].Name.equalsAscii("Command"))
+ if(pValues[nValue].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Command")))
{
String sDescription = m_aDescriptionFI.GetText();
OUString sTemp;
@@ -113,25 +109,9 @@ SwDBTablePreviewDialog::SwDBTablePreviewDialog(Window* pParent, uno::Sequence< b
xD->dispatch(aURL, rValues);
m_pBeamerWIN->Show();
}
-/* uno::Reference<???::XController> xController = m_xFrame->getController();
- pImpl->xFController = uno::Reference<???::XFormController>(xController, uno::UNO_QUERY);
- if(pImpl->xFController.is())
- {
- uno::Reference< awt::XControl > xCtrl = pImpl->xFController->getCurrentControl( );
- pImpl->xSelSupp = uno::Reference<???::XSelectionSupplier>(xCtrl, uno::UNO_QUERY);
- if(pImpl->xSelSupp.is())
- {
- pImpl->xChgLstnr = new SwXSelChgLstnr_Impl(*this);
- pImpl->xSelSupp->addSelectionChangeListener( pImpl->xChgLstnr );
- }
- }
-*/ }
-
-
+ }
}
-/*-- 08.04.2004 15:12:24---------------------------------------------------
- -----------------------------------------------------------------------*/
SwDBTablePreviewDialog::~SwDBTablePreviewDialog()
{
if(m_xFrame.is())
@@ -142,3 +122,5 @@ SwDBTablePreviewDialog::~SwDBTablePreviewDialog()
else
delete m_pBeamerWIN;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.hxx b/sw/source/ui/dbui/dbtablepreviewdialog.hxx
index 212bb873ca4b..3c4b790e8fd4 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.hxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include <sfx2/basedlgs.hxx>
#include <svtools/stdctrl.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <com/sun/star/uno/Sequence.h>
namespace com{ namespace sun{ namespace star{
@@ -39,10 +38,6 @@ namespace com{ namespace sun{ namespace star{
namespace frame{ class XFrame; }
}}}
-
-/*-- 08.04.2004 14:04:29---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SwDBTablePreviewDialog : public SfxModalDialog
{
FixedInfo m_aDescriptionFI;
@@ -58,3 +53,4 @@ public:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx
index f2080f822547..4af7627b3a6b 100644
--- a/sw/source/ui/dbui/dbtree.cxx
+++ b/sw/source/ui/dbui/dbtree.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-// INCLUDE ---------------------------------------------------------------
-
-
#include <sot/formats.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -48,24 +46,16 @@
#include <cppuhelper/implbase1.hxx>
#include <svx/dbaexchange.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <swmodule.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <dbtree.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _UTLUI_HRC
#include <utlui.hrc>
-#endif
#include <unomid.h>
@@ -79,9 +69,6 @@ using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::task;
using namespace ::com::sun::star::beans;
-/* -----------------------------17.07.01 13:10--------------------------------
-
- ---------------------------------------------------------------------------*/
struct SwConnectionData
{
::rtl::OUString sSourceName;
@@ -91,9 +78,7 @@ struct SwConnectionData
typedef SwConnectionData* SwConnectionDataPtr;
SV_DECL_PTRARR_DEL( SwConnectionArr, SwConnectionDataPtr, 32, 32 )
SV_IMPL_PTRARR( SwConnectionArr, SwConnectionDataPtr )
-/* -----------------------------17.07.01 13:24--------------------------------
- ---------------------------------------------------------------------------*/
class SwDBTreeList_Impl : public cppu::WeakImplHelper1 < XContainerListener >
{
Reference< XNameAccess > xDBContext;
@@ -113,12 +98,10 @@ class SwDBTreeList_Impl : public cppu::WeakImplHelper1 < XContainerListener >
sal_Bool HasContext();
SwWrtShell* GetWrtShell() { return pWrtSh;}
void SetWrtShell(SwWrtShell& rSh) { pWrtSh = &rSh;}
- Reference< XNameAccess > GetContext() {return xDBContext;}
+ Reference< XNameAccess > GetContext() const {return xDBContext;}
Reference<XConnection> GetConnection(const rtl::OUString& rSourceName);
};
-/* -----------------------------17.07.01 13:24--------------------------------
- ---------------------------------------------------------------------------*/
SwDBTreeList_Impl::~SwDBTreeList_Impl()
{
Reference<XContainer> xContainer(xDBContext, UNO_QUERY);
@@ -133,19 +116,15 @@ SwDBTreeList_Impl::~SwDBTreeList_Impl()
m_refCount--;
}
}
-/* -----------------------------17.07.01 13:24--------------------------------
- ---------------------------------------------------------------------------*/
void SwDBTreeList_Impl::elementInserted( const ContainerEvent& ) throw (RuntimeException)
{
// information not needed
}
-/* -----------------------------17.07.01 13:24--------------------------------
- ---------------------------------------------------------------------------*/
void SwDBTreeList_Impl::elementRemoved( const ContainerEvent& rEvent ) throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
::rtl::OUString sSource;
rEvent.Accessor >>= sSource;
for(sal_uInt16 i = 0; i < aConnections.Count(); i++)
@@ -153,32 +132,22 @@ void SwDBTreeList_Impl::elementRemoved( const ContainerEvent& rEvent ) throw (Ru
SwConnectionDataPtr pPtr = aConnections[i];
if(pPtr->sSourceName == sSource)
{
-// SwConnectionDataPtr pPtr = aConnections[i];
-// Reference<XComponent> xComp(pPtr->xConnection, UNO_QUERY);
-// if(xComp.is())
-// xComp->dispose();
aConnections.DeleteAndDestroy(i);
break;
}
}
}
-/* -----------------------------17.07.01 13:24--------------------------------
- ---------------------------------------------------------------------------*/
void SwDBTreeList_Impl::disposing( const EventObject& ) throw (RuntimeException)
{
xDBContext = 0;
}
-/* -----------------------------17.07.01 13:24--------------------------------
- ---------------------------------------------------------------------------*/
void SwDBTreeList_Impl::elementReplaced( const ContainerEvent& rEvent ) throw (RuntimeException)
{
elementRemoved(rEvent);
}
-/* -----------------------------17.07.01 13:24--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwDBTreeList_Impl::HasContext()
{
if(!xDBContext.is())
@@ -193,13 +162,11 @@ sal_Bool SwDBTreeList_Impl::HasContext()
if(xContainer.is())
xContainer->addContainerListener( this );
}
- DBG_ASSERT(xDBContext.is(), "com.sun.star.sdb.DataBaseContext: service not available");
+ OSL_ENSURE(xDBContext.is(), "com.sun.star.sdb.DataBaseContext: service not available");
}
return xDBContext.is();
}
-/* -----------------------------17.07.01 13:24--------------------------------
- ---------------------------------------------------------------------------*/
Reference<XConnection> SwDBTreeList_Impl::GetConnection(const rtl::OUString& rSourceName)
{
Reference<XConnection> xRet;
@@ -221,16 +188,13 @@ Reference<XConnection> SwDBTreeList_Impl::GetConnection(const rtl::OUString& rS
}
return xRet;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
+
SwDBTreeList::SwDBTreeList(Window *pParent, const ResId& rResId,
SwWrtShell* pSh,
const String& rDefDBName, const sal_Bool bShowCol):
SvTreeListBox (pParent, rResId),
aImageList (SW_RES(ILIST_DB_DLG )),
- aImageListHC (SW_RES(ILIST_DB_DLG_HC )),
sDefDBName (rDefDBName),
bInitialized (sal_False),
bShowColumns (bShowCol),
@@ -242,31 +206,21 @@ SwDBTreeList::SwDBTreeList(Window *pParent, const ResId& rResId,
InitTreeList();
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
SwDBTreeList::~SwDBTreeList()
{
delete pImpl;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
void SwDBTreeList::InitTreeList()
{
if(!pImpl->HasContext() && pImpl->GetWrtShell())
return;
SetSelectionMode(SINGLE_SELECTION);
SetStyle(GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
- // Font nicht setzen, damit der Font des Controls uebernommen wird!
+ // don't set font, so that the Control's font is being applied!
SetSpaceBetweenEntries(0);
SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE),
- aImageList.GetImage(IMG_EXPAND ), BMP_COLOR_NORMAL );
- SetNodeBitmaps( aImageListHC.GetImage(IMG_COLLAPSE),
- aImageListHC.GetImage(IMG_EXPAND ), BMP_COLOR_HIGHCONTRAST );
+ aImageList.GetImage(IMG_EXPAND ) );
SetDragDropMode(SV_DRAGDROP_APP_COPY);
@@ -277,37 +231,25 @@ void SwDBTreeList::InitTreeList()
long nCount = aDBNames.getLength();
Image aImg = aImageList.GetImage(IMG_DB);
- Image aHCImg = aImageListHC.GetImage(IMG_DB);
for(long i = 0; i < nCount; i++)
{
String sDBName(pDBNames[i]);
- SvLBoxEntry* pEntry = InsertEntry(sDBName, aImg, aImg, NULL, sal_True);
- SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
- SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
+ InsertEntry(sDBName, aImg, aImg, NULL, sal_True);
}
String sDBName(sDefDBName.GetToken(0, DB_DELIM));
String sTableName(sDefDBName.GetToken(1, DB_DELIM));
String sColumnName(sDefDBName.GetToken(2, DB_DELIM));
Select(sDBName, sTableName, sColumnName);
-
bInitialized = sal_True;
}
-/*-- 27.05.2004 09:19:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwDBTreeList::AddDataSource(const String& rSource)
{
Image aImg = aImageList.GetImage(IMG_DB);
- Image aHCImg = aImageListHC.GetImage(IMG_DB);
SvLBoxEntry* pEntry = InsertEntry(rSource, aImg, aImg, NULL, sal_True);
- SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
- SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
SvTreeListBox::Select(pEntry);
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
void SwDBTreeList::ShowColumns(sal_Bool bShowCol)
{
@@ -341,10 +283,6 @@ void SwDBTreeList::ShowColumns(sal_Bool bShowCol)
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
{
if (!pParent->HasChilds())
@@ -368,7 +306,7 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
if(xTSupplier.is())
{
Reference<XNameAccess> xTbls = xTSupplier->getTables();
- DBG_ASSERT(xTbls->hasByName(sTableName), "table not available anymore?");
+ OSL_ENSURE(xTbls->hasByName(sTableName), "table not available anymore?");
try
{
Any aTable = xTbls->getByName(sTableName);
@@ -386,7 +324,7 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
if(xQSupplier.is())
{
Reference<XNameAccess> xQueries = xQSupplier->getQueries();
- DBG_ASSERT(xQueries->hasByName(sTableName), "table not available anymore?");
+ OSL_ENSURE(xQueries->hasByName(sTableName), "table not available anymore?");
try
{
Any aQuery = xQueries->getByName(sTableName);
@@ -419,7 +357,7 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
{
}
}
- else // Tabellennamen
+ else // table names
{
try
{
@@ -438,15 +376,12 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
long nCount = aTblNames.getLength();
const ::rtl::OUString* pTblNames = aTblNames.getConstArray();
Image aImg = aImageList.GetImage(IMG_DBTABLE);
- Image aHCImg = aImageListHC.GetImage(IMG_DBTABLE);
for (long i = 0; i < nCount; i++)
{
sTableName = pTblNames[i];
SvLBoxEntry* pTableEntry = InsertEntry(sTableName, aImg, aImg, pParent, bShowColumns);
//to discriminate between queries and tables the user data of table entries is set
pTableEntry->SetUserData((void*)0);
- SetExpandedEntryBmp(pTableEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
- SetCollapsedEntryBmp(pTableEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
}
}
@@ -459,14 +394,11 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
long nCount = aQueryNames.getLength();
const ::rtl::OUString* pQueryNames = aQueryNames.getConstArray();
Image aImg = aImageList.GetImage(IMG_DBQUERY);
- Image aHCImg = aImageListHC.GetImage(IMG_DBQUERY);
for (long i = 0; i < nCount; i++)
{
sQueryName = pQueryNames[i];
SvLBoxEntry* pQueryEntry = InsertEntry(sQueryName, aImg, aImg, pParent, bShowColumns);
pQueryEntry->SetUserData((void*)1);
- SetExpandedEntryBmp(pQueryEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
- SetCollapsedEntryBmp( pQueryEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
}
}
}
@@ -478,24 +410,16 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwDBTreeList, DBCompare, SvSortData*, pData )
{
SvLBoxEntry* pRight = (SvLBoxEntry*)(pData->pRight );
if (GetParent(pRight) && GetParent(GetParent(pRight)))
- return COMPARE_GREATER; // Spaltennamen nicht sortieren
+ return COMPARE_GREATER; // don't sort column names
- return DefaultCompare(pData); // Sonst Basisklasse rufen
+ return DefaultCompare(pData); // otherwise call base class
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
String SwDBTreeList::GetDBName(String& rTableName, String& rColumnName, sal_Bool* pbIsTable)
{
String sDBName;
@@ -506,7 +430,7 @@ String SwDBTreeList::GetDBName(String& rTableName, String& rColumnName, sal_Boo
if (GetParent(GetParent(pEntry)))
{
rColumnName = GetEntryText(pEntry);
- pEntry = GetParent(pEntry); // Spaltenname war selektiert
+ pEntry = GetParent(pEntry); // column name was selected
}
sDBName = GetEntryText(GetParent(pEntry));
if(pbIsTable)
@@ -519,10 +443,8 @@ String SwDBTreeList::GetDBName(String& rTableName, String& rColumnName, sal_Boo
}
/*------------------------------------------------------------------------
- Beschreibung: Format: Datenbank.Tabelle
+ Description: Format: database.table
------------------------------------------------------------------------*/
-
-
void SwDBTreeList::Select(const String& rDBName, const String& rTableName, const String& rColumnName)
{
SvLBoxEntry* pParent;
@@ -565,10 +487,6 @@ void SwDBTreeList::Select(const String& rDBName, const String& rTableName, const
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwDBTreeList::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ )
{
String sTableName, sColumnName;
@@ -579,7 +497,7 @@ void SwDBTreeList::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ )
STAR_REFERENCE( datatransfer::XTransferable ) xRef( pContainer );
if( sColumnName.Len() )
{
- // Datenbankfeld draggen
+ // drag database field
svx::OColumnTransferable aColTransfer(
sDBName
,::rtl::OUString()
@@ -604,19 +522,16 @@ void SwDBTreeList::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ )
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
sal_Int8 SwDBTreeList::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
{
return DND_ACTION_NONE;
}
-/*-- 07.10.2003 13:28:22---------------------------------------------------
- -----------------------------------------------------------------------*/
-void SwDBTreeList::SetWrtShell(SwWrtShell& rSh)
+void SwDBTreeList::SetWrtShell(SwWrtShell& rSh)
{
pImpl->SetWrtShell(rSh);
if (IsVisible() && !bInitialized)
InitTreeList();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/dbui.cxx b/sw/source/ui/dbui/dbui.cxx
index 9dc0c899f574..174f15242a90 100644
--- a/sw/source/ui/dbui/dbui.cxx
+++ b/sw/source/ui/dbui/dbui.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,20 +29,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-// INCLUDE ---------------------------------------------------------------
-
-
-#include <tools/list.hxx>
#include "wrtsh.hxx"
-
#include "dbui.hrc"
#include "dbui.hxx"
-/*---------------------------------------------------------------------
- Beschreibung:
----------------------------------------------------------------------*/
-
PrintMonitor::PrintMonitor( Window *pParent, PrintMonitorType eType )
: ModelessDialog( pParent, SW_RES(DLG_PRINTMONITOR) ),
aDocName (this, SW_RES( FT_DOCNAME )),
@@ -60,9 +52,7 @@ PrintMonitor::PrintMonitor( Window *pParent, PrintMonitorType eType )
}
FreeResource();
}
-/*---------------------------------------------------------------------
----------------------------------------------------------------------*/
void lcl_ResizeControl( Window* pWin, long nDiff )
{
Size aSize( pWin->GetSizePixel() );
@@ -102,10 +92,8 @@ void PrintMonitor::ResizeControls()
lcl_RePosControl( &aCancel, nDiff );
}
}
-/*---------------------------------------------------------------------
- Progress Indicator for Creation of personalized Mail Merge documents:
----------------------------------------------------------------------*/
+// Progress Indicator for Creation of personalized Mail Merge documents:
CreateMonitor::CreateMonitor( Window *pParent )
: ModelessDialog( pParent, SW_RES(DLG_MM_CREATIONMONITOR) ),
m_aStatus (this, SW_RES( FT_STATUS )),
@@ -149,3 +137,5 @@ void CreateMonitor::SetCancelHdl( const Link& rLink )
{
m_aCancelButton.SetClickHdl( rLink );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/dbui.src b/sw/source/ui/dbui/dbui.src
index 12c67d2644df..169c1b6a23ee 100644
--- a/sw/source/ui/dbui/dbui.src
+++ b/sw/source/ui/dbui/dbui.src
@@ -26,9 +26,9 @@
************************************************************************/
// #pragma ******************************************************************
- // #include *****************************************************************
#include "dbui.hrc"
#include "helpid.h"
+
ModalDialog DLG_DBSELECTION
{
HelpID = "sw:ModalDialog:DLG_DBSELECTION";
diff --git a/sw/source/ui/dbui/maildispatcher.cxx b/sw/source/ui/dbui/maildispatcher.cxx
index 2203f70c3404..ef073f6ebabf 100644
--- a/sw/source/ui/dbui/maildispatcher.cxx
+++ b/sw/source/ui/dbui/maildispatcher.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,7 +104,6 @@ namespace /* private */
} // namespace private
-
MailDispatcher::MailDispatcher(uno::Reference<mail::XSmtpService> mailserver) :
mailserver_ (mailserver),
run_(false),
@@ -285,12 +285,12 @@ void MailDispatcher::run()
}
} // end for SSH ALI
}
-/*-- 27.08.2004 12:04:46---------------------------------------------------
- -----------------------------------------------------------------------*/
void MailDispatcher::onTerminated()
{
//keep the reference until the end of onTerminated() because of the call order in the
//_threadFunc() from osl/thread.hxx
m_xSelfReference = 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx
index 276f7850f91e..2aa037f3c3d1 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.cxx
+++ b/sw/source/ui/dbui/mailmergechildwindow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,11 +58,6 @@
using namespace ::com::sun::star;
SFX_IMPL_FLOATINGWINDOW( SwMailMergeChildWindow, FN_MAILMERGE_CHILDWINDOW )
-//SFX_IMPL_FLOATINGWINDOW( SwSendMailChildWindow, FN_MAILMERGE_SENDMAIL_CHILDWINDOW )
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
SwMailMergeChildWindow::SwMailMergeChildWindow( Window* _pParent,
sal_uInt16 nId,
@@ -89,10 +85,6 @@ SwMailMergeChildWindow::SwMailMergeChildWindow( Window* _pParent,
pWindow->Show();
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwMailMergeChildWin::SwMailMergeChildWin( SfxBindings* _pBindings,
SfxChildWindow* pChild,
Window *pParent) :
@@ -100,8 +92,7 @@ SwMailMergeChildWin::SwMailMergeChildWin( SfxBindings* _pBindings,
m_aBackTB(this, SW_RES( TB_BACK ))
{
m_aBackTB.SetSelectHdl(LINK(this, SwMailMergeChildWin, BackHdl));
- sal_uInt16 nIResId = GetSettings().GetStyleSettings().GetHighContrastMode() ?
- ILIST_TBX_HC : ILIST_TBX;
+ sal_uInt16 nIResId = ILIST_TBX;
ResId aResId( nIResId, *pSwResMgr );
ImageList aIList(aResId);
FreeResource();
@@ -114,36 +105,23 @@ SwMailMergeChildWin::SwMailMergeChildWin( SfxBindings* _pBindings,
m_aBackTB.Show();
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwMailMergeChildWin::~SwMailMergeChildWin()
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwMailMergeChildWin, BackHdl, ToolBox *, EMPTYARG )
{
GetBindings().GetDispatcher()->Execute(FN_MAILMERGE_WIZARD, SFX_CALLMODE_ASYNCHRON);
return 0;
}
-/*-- 26.05.2004 10:12:44---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwMailMergeChildWin::FillInfo(SfxChildWinInfo& rInfo) const
{
SfxFloatingWindow::FillInfo(rInfo);
rInfo.aWinState.Erase();
rInfo.bVisible = sal_False;
}
-/*-- 21.05.2004 14:07:37---------------------------------------------------
- -----------------------------------------------------------------------*/
struct SwSendMailDialog_Impl
{
friend class SwSendMailDialog;
@@ -190,9 +168,6 @@ const SwMailDescriptor* SwSendMailDialog_Impl::GetNextDescriptor()
return 0;
}
-/*-- 23.06.2004 10:19:55---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SwMailDispatcherListener_Impl : public IMailDispatcherListener
{
SwSendMailDialog* m_pSendMailDialog;
@@ -212,66 +187,49 @@ public:
static void DeleteAttachments( uno::Reference< mail::XMailMessage >& xMessage );
};
-/*-- 23.06.2004 10:04:48---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwMailDispatcherListener_Impl::SwMailDispatcherListener_Impl(SwSendMailDialog& rParentDlg) :
m_pSendMailDialog(&rParentDlg)
{
}
-/*-- 23.06.2004 10:04:48---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailDispatcherListener_Impl::~SwMailDispatcherListener_Impl()
{
}
-/*-- 23.06.2004 10:04:49---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailDispatcherListener_Impl::started(::rtl::Reference<MailDispatcher> /*xMailDispatcher*/)
{
}
-/*-- 23.06.2004 10:04:49---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailDispatcherListener_Impl::stopped(
::rtl::Reference<MailDispatcher> /*xMailDispatcher*/)
{
}
-/*-- 23.06.2004 10:04:49---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailDispatcherListener_Impl::idle(::rtl::Reference<MailDispatcher> /*xMailDispatcher*/)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
m_pSendMailDialog->AllMailsSent();
}
-/*-- 23.06.2004 10:04:50---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailDispatcherListener_Impl::mailDelivered(
::rtl::Reference<MailDispatcher> /*xMailDispatcher*/,
uno::Reference< mail::XMailMessage> xMailMessage)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
m_pSendMailDialog->DocumentSent( xMailMessage, true, 0 );
DeleteAttachments( xMailMessage );
}
-/*-- 23.06.2004 10:04:51---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailDispatcherListener_Impl::mailDeliveryError(
::rtl::Reference<MailDispatcher> /*xMailDispatcher*/,
uno::Reference< mail::XMailMessage> xMailMessage,
const rtl::OUString& sErrorMessage)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
m_pSendMailDialog->DocumentSent( xMailMessage, false, &sErrorMessage );
DeleteAttachments( xMailMessage );
}
-/*-- 23.06.2004 12:30:39---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailDispatcherListener_Impl::DeleteAttachments( uno::Reference< mail::XMailMessage >& xMessage )
{
uno::Sequence< mail::MailAttachment > aAttachments = xMessage->getAttachments();
@@ -284,7 +242,7 @@ void SwMailDispatcherListener_Impl::DeleteAttachments( uno::Reference< mail::XMa
if( xTransferableProperties.is() )
{
::rtl::OUString sURL;
- xTransferableProperties->getPropertyValue( ::rtl::OUString::createFromAscii("URL") ) >>= sURL;
+ xTransferableProperties->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ) >>= sURL;
if(sURL.getLength())
SWUnoHelper::UCB_DeleteFile( sURL );
}
@@ -295,9 +253,7 @@ void SwMailDispatcherListener_Impl::DeleteAttachments( uno::Reference< mail::XMa
}
}
}
-/*-- 07.07.2004 13:45:51---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwSendWarningBox_Impl : public ModalDialog
{
FixedImage aWarningImageIM;
@@ -311,9 +267,7 @@ public:
SwSendWarningBox_Impl(Window* pParent, const String& rDetails);
~SwSendWarningBox_Impl();
};
-/*-- 07.07.2004 13:52:41---------------------------------------------------
- -----------------------------------------------------------------------*/
SwSendWarningBox_Impl::SwSendWarningBox_Impl(Window* pParent, const String& rDetails) :
ModalDialog(pParent, SW_RES( DLG_MM_SENDWARNING )),
aWarningImageIM(this, SW_RES( IM_WARNING )),
@@ -327,16 +281,11 @@ SwSendWarningBox_Impl::SwSendWarningBox_Impl(Window* pParent, const String& rDet
aWarningImageIM.SetImage(WarningBox::GetStandardImage());
aDetailED.SetText(rDetails);
}
-/*-- 07.07.2004 13:52:41---------------------------------------------------
- -----------------------------------------------------------------------*/
SwSendWarningBox_Impl::~SwSendWarningBox_Impl()
{
}
-/*-- 21.05.2004 14:10:39---------------------------------------------------
-
- -----------------------------------------------------------------------*/
#define ITEMID_TASK 1
#define ITEMID_STATUS 2
@@ -375,7 +324,6 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf
m_bCancel(false),
m_bDesctructionEnabled(false),
m_aImageList( SW_RES( ILIST ) ),
- m_aImageListHC( SW_RES( ILIST_HC ) ),
m_pImpl(new SwSendMailDialog_Impl),
m_pConfigItem(&rConfigItem),
m_nSendCount(0),
@@ -426,9 +374,7 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf
DetailsHdl_Impl( &m_aDetailsPB );
UpdateTransferStatus();
}
-/*-- 21.05.2004 14:10:39---------------------------------------------------
- -----------------------------------------------------------------------*/
SwSendMailDialog::~SwSendMailDialog()
{
if(m_pImpl->xMailDispatcher.is())
@@ -456,9 +402,7 @@ SwSendMailDialog::~SwSendMailDialog()
}
delete m_pImpl;
}
-/*-- 21.05.2004 14:10:40---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSendMailDialog::AddDocument( SwMailDescriptor& rDesc )
{
::osl::MutexGuard aGuard(m_pImpl->aDescriptorMutex);
@@ -470,26 +414,20 @@ void SwSendMailDialog::AddDocument( SwMailDescriptor& rDesc )
}
}
-/*-- 31.01.2005 08:59:35---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSendMailDialog::SetDocumentCount( sal_Int32 nAllDocuments )
{
m_pImpl->nDocumentCount = nAllDocuments;
UpdateTransferStatus();
}
-/*-- 21.05.2004 14:10:40---------------------------------------------------
- -----------------------------------------------------------------------*/
void lcl_Move(Control& rCtrl, long nYOffset)
{
Point aPos(rCtrl.GetPosPixel());
aPos.Y() += nYOffset;
rCtrl.SetPosPixel(aPos);
}
-/*-- 21.05.2004 14:10:40---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwSendMailDialog, DetailsHdl_Impl, PushButton*, EMPTYARG )
{
long nMove = 0;
@@ -514,9 +452,7 @@ IMPL_LINK( SwSendMailDialog, DetailsHdl_Impl, PushButton*, EMPTYARG )
return 0;
}
-/*-- 21.05.2004 14:10:40---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwSendMailDialog, StopHdl_Impl, PushButton*, pButton )
{
m_bCancel = true;
@@ -537,25 +473,19 @@ IMPL_LINK( SwSendMailDialog, StopHdl_Impl, PushButton*, pButton )
}
return 0;
}
-/*-- 21.05.2004 14:10:40---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwSendMailDialog, CloseHdl_Impl, PushButton*, EMPTYARG )
{
ModelessDialog::Show( sal_False );
return 0;
}
-/*-- 14.06.2004 09:48:30---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_STATIC_LINK_NOINSTANCE( SwSendMailDialog, StartSendMails, SwSendMailDialog*, pDialog )
{
pDialog->SendMails();
return 0;
}
-/*-- 14.06.2004 09:48:30---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_STATIC_LINK( SwSendMailDialog, RemoveThis, Timer*, pTimer )
{
if( pThis->m_pImpl->xMailDispatcher.is() )
@@ -578,9 +508,7 @@ IMPL_STATIC_LINK( SwSendMailDialog, RemoveThis, Timer*, pTimer )
}
return 0;
}
-/*-- 07.07.2004 14:34:05---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_STATIC_LINK_NOINSTANCE( SwSendMailDialog, StopSendMails, SwSendMailDialog*, pDialog )
{
if(pDialog->m_pImpl->xMailDispatcher.is() &&
@@ -592,14 +520,12 @@ IMPL_STATIC_LINK_NOINSTANCE( SwSendMailDialog, StopSendMails, SwSendMailDialog*,
}
return 0;
}
-/*-- 14.06.2004 10:38:04---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSendMailDialog::SendMails()
{
if(!m_pConfigItem)
{
- DBG_ERROR("config item not set");
+ OSL_ENSURE(false, "config item not set");
return;
}
String sErrorMessage;
@@ -614,7 +540,7 @@ void SwSendMailDialog::SendMails()
LeaveWait();
if(!bIsLoggedIn)
{
- DBG_ERROR("create error message");
+ OSL_ENSURE(false, "create error message");
return;
}
m_pImpl->xMailDispatcher.set( new MailDispatcher(xSmtpServer));
@@ -626,9 +552,7 @@ void SwSendMailDialog::SendMails()
m_pImpl->xMailDispatcher->start();
}
}
-/* -----------------28.01.2005 10:17-----------------
- --------------------------------------------------*/
void SwSendMailDialog::IterateMails()
{
const SwMailDescriptor* pCurrentMailDescriptor = m_pImpl->GetNextDescriptor();
@@ -636,9 +560,7 @@ void SwSendMailDialog::IterateMails()
{
if(!SwMailMergeHelper::CheckMailAddress( pCurrentMailDescriptor->sEMail ))
{
- ImageList& rImgLst = GetSettings().GetStyleSettings().GetHighContrastMode() ?
- m_aImageListHC : m_aImageList;
- Image aInsertImg = rImgLst.GetImage( FN_FORMULA_CANCEL );
+ Image aInsertImg = m_aImageList.GetImage( FN_FORMULA_CANCEL );
String sMessage = m_sSendingTo;
String sTmp(pCurrentMailDescriptor->sEMail);
@@ -652,8 +574,8 @@ void SwSendMailDialog::IterateMails()
pCurrentMailDescriptor = m_pImpl->GetNextDescriptor();
continue;
}
- SwMailMessage* pMessage = 0;
- uno::Reference< mail::XMailMessage > xMessage = pMessage = new SwMailMessage;
+ SwMailMessage* pMessage = new SwMailMessage;
+ uno::Reference< mail::XMailMessage > xMessage = pMessage;
if(m_pConfigItem->IsMailReplyTo())
pMessage->setReplyToAddress(m_pConfigItem->GetMailReplyTo());
pMessage->addRecipient( pCurrentMailDescriptor->sEMail );
@@ -707,18 +629,14 @@ void SwSendMailDialog::IterateMails()
}
UpdateTransferStatus();
}
-/*-- 27.08.2004 10:50:17---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSendMailDialog::ShowDialog()
{
Application::PostUserEvent( STATIC_LINK( this, SwSendMailDialog,
StartSendMails ), this );
ModelessDialog::Show();
}
-/*-- 27.08.2004 10:50:17---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSendMailDialog::StateChanged( StateChangedType nStateChange )
{
ModelessDialog::StateChanged( nStateChange );
@@ -730,9 +648,6 @@ void SwSendMailDialog::StateChanged( StateChangedType nStateChange )
}
}
-/*-- 23.06.2004 10:14:22---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwSendMailDialog::DocumentSent( uno::Reference< mail::XMailMessage> xMessage,
bool bResult,
const ::rtl::OUString* pError )
@@ -744,9 +659,7 @@ void SwSendMailDialog::DocumentSent( uno::Reference< mail::XMailMessage> xMessag
Application::PostUserEvent( STATIC_LINK( this, SwSendMailDialog,
StopSendMails ), this );
}
- ImageList& rImgLst = GetSettings().GetStyleSettings().GetHighContrastMode() ?
- m_aImageListHC : m_aImageList;
- Image aInsertImg = rImgLst.GetImage( bResult ? FN_FORMULA_APPLY : FN_FORMULA_CANCEL );
+ Image aInsertImg = m_aImageList.GetImage( bResult ? FN_FORMULA_APPLY : FN_FORMULA_CANCEL );
String sMessage = m_sSendingTo;
String sTmp(xMessage->getRecipients()[0]);
@@ -766,9 +679,7 @@ void SwSendMailDialog::DocumentSent( uno::Reference< mail::XMailMessage> xMessag
delete pDlg;
}
}
-/*-- 23.06.2004 11:25:31---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSendMailDialog::UpdateTransferStatus()
{
String sStatus( m_sTransferStatus );
@@ -785,12 +696,11 @@ void SwSendMailDialog::UpdateTransferStatus()
else
m_aProgressBar.SetValue(0);
}
-/*-- 23.06.2004 11:18:50---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSendMailDialog::AllMailsSent()
{
m_aStopPB.Enable(sal_False);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mailmergechildwindow.hrc b/sw/source/ui/dbui/mailmergechildwindow.hrc
index 9b5931522975..deaebd021340 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.hrc
+++ b/sw/source/ui/dbui/mailmergechildwindow.hrc
@@ -27,7 +27,6 @@
#define TB_BACK 1
#define ILIST_TBX 90
-#define ILIST_TBX_HC 91
#define FL_SEPARATOR 7
@@ -47,7 +46,6 @@
#define ST_TASK 73
#define ST_STATUS 74
#define ILIST 75
-#define ILIST_HC 76
#define ST_SEND 77
#define ST_SENDINGTO 78
#define ST_COMPLETED 79
diff --git a/sw/source/ui/dbui/mailmergechildwindow.src b/sw/source/ui/dbui/mailmergechildwindow.src
index 5b5b32a7cc8d..6f2f9da46b4c 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.src
+++ b/sw/source/ui/dbui/mailmergechildwindow.src
@@ -76,13 +76,6 @@ FloatingWindow DLG_MAILMERGECHILD\
MaskColor = IMAGE_MASK_COLOR;
IMGLIST1_IDS;
};
-
- ImageList ILIST_TBX_HC
- {
- Prefix = "sch";
- MaskColor = IMAGE_MASK_COLOR ;
- IMGLIST1_IDS;
- };
};
//FloatingWindow DLG_MM_SENDMAILS
@@ -196,13 +189,6 @@ ModelessDialog /*ModalDialog*/ DLG_MM_SENDMAILS
MaskColor = IMAGE_MASK_COLOR;
IMGLIST2_IDS;
};
-
- ImageList ILIST_HC
- {
- Prefix = "sch";
- MaskColor = IMAGE_MASK_COLOR ;
- IMGLIST2_IDS;
- };
String ST_TASK
{
Text[ en-US ] = "Task";
diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx
index 63f4adae3895..203f689bd4ae 100644
--- a/sw/source/ui/dbui/mailmergehelper.cxx
+++ b/sw/source/ui/dbui/mailmergehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <mailmergehelper.hxx>
#include <svtools/stdctrl.hxx>
#include <mmconfigitem.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <sfx2/filedlghelper.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/app.hxx>
@@ -47,9 +46,7 @@
#include "com/sun/star/mail/XSmtpService.hpp"
#include <comphelper/processfactory.hxx>
#include <vcl/msgbox.hxx>
-#ifndef _PASSWD_HXX
#include <sfx2/passwd.hxx>
-#endif
#include <dbui.hrc>
@@ -62,14 +59,9 @@ using namespace ::com::sun::star::sdbcx;
using rtl::OUString;
-//using ::rtl::OUString;
-
namespace SwMailMergeHelper
{
-/*-- 14.06.2004 12:29:19---------------------------------------------------
-
- -----------------------------------------------------------------------*/
String CallSaveAsDialog(String& rFilter)
{
ErrCode nRet;
@@ -88,11 +80,12 @@ String CallSaveAsDialog(String& rFilter)
}
return sRet;
}
-/*-- 20.08.2004 09:39:18---------------------------------------------------
+
+/*
simple address check: check for '@'
for at least one '.' after the '@'
and for at least to characters before and after the dot
- -----------------------------------------------------------------------*/
+*/
bool CheckMailAddress( const ::rtl::OUString& rMailAddress )
{
String sAddress(rMailAddress);
@@ -106,9 +99,6 @@ bool CheckMailAddress( const ::rtl::OUString& rMailAddress )
return true;
}
-/*-- 28.12.2004 10:16:02---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< mail::XSmtpService > ConnectToSmtpServer(
SwMailMergeConfigItem& rConfigItem,
uno::Reference< mail::XMailService >& rxInMailService,
@@ -152,7 +142,7 @@ uno::Reference< mail::XSmtpService > ConnectToSmtpServer(
new SwConnectionContext(
rConfigItem.GetInServerName(),
rConfigItem.GetInServerPort(),
- ::rtl::OUString::createFromAscii( "Insecure" ));
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Insecure")));
xInMailService->connect(xConnectionContext, xAuthenticator);
rxInMailService = xInMailService;
}
@@ -179,13 +169,13 @@ uno::Reference< mail::XSmtpService > ConnectToSmtpServer(
new SwConnectionContext(
rConfigItem.GetMailServer(),
rConfigItem.GetMailPort(),
- ::rtl::OUString::createFromAscii( rConfigItem.IsSecureConnection() ? "Ssl" : "Insecure"));
+ rConfigItem.IsSecureConnection() ? OUString(RTL_CONSTASCII_USTRINGPARAM("Ssl")) : OUString(RTL_CONSTASCII_USTRINGPARAM("Insecure")) );
xSmtpServer->connect(xConnectionContext, xAuthenticator);
rxInMailService = uno::Reference< mail::XMailService >( xSmtpServer, uno::UNO_QUERY );
}
catch(uno::Exception& )
{
- DBG_ERROR("exception caught");
+ OSL_ENSURE(false, "exception caught");
}
return xSmtpServer;
}
@@ -193,9 +183,6 @@ uno::Reference< mail::XSmtpService > ConnectToSmtpServer(
} //namespace
-/*-- 06.04.2004 10:31:27---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwBoldFixedInfo::SwBoldFixedInfo(Window* pParent, const ResId& rResId) :
FixedInfo(pParent, rResId)
{
@@ -203,12 +190,11 @@ SwBoldFixedInfo::SwBoldFixedInfo(Window* pParent, const ResId& rResId) :
aFont.SetWeight( WEIGHT_BOLD );
SetFont( aFont );
}
-/*-- 06.04.2004 10:31:27---------------------------------------------------
- -----------------------------------------------------------------------*/
SwBoldFixedInfo::~SwBoldFixedInfo()
{
}
+
struct SwAddressPreview_Impl
{
::std::vector< ::rtl::OUString > aAdresses;
@@ -225,9 +211,7 @@ struct SwAddressPreview_Impl
{
}
};
-/*-- 27.04.2004 14:01:22---------------------------------------------------
- -----------------------------------------------------------------------*/
SwAddressPreview::SwAddressPreview(Window* pParent, const ResId rResId) :
Window( pParent, rResId ),
aVScrollBar(this, WB_VSCROLL),
@@ -242,31 +226,23 @@ SwAddressPreview::SwAddressPreview(Window* pParent, const ResId rResId) :
aVScrollBar.SetPosPixel(aSrollPos);
Show();
}
-/*-- 27.04.2004 14:01:22---------------------------------------------------
- -----------------------------------------------------------------------*/
SwAddressPreview::~SwAddressPreview()
{
}
-/*-- 25.06.2004 11:50:55---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAddressPreview, ScrollHdl, ScrollBar*, EMPTYARG)
{
Invalidate();
return 0;
}
-/*-- 27.04.2004 14:01:22---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressPreview::AddAddress(const ::rtl::OUString& rAddress)
{
pImpl->aAdresses.push_back(rAddress);
UpdateScrollBar();
}
-/*-- 27.04.2004 14:01:23---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressPreview::SetAddress(const ::rtl::OUString& rAddress)
{
pImpl->aAdresses.clear();
@@ -274,20 +250,16 @@ void SwAddressPreview::SetAddress(const ::rtl::OUString& rAddress)
aVScrollBar.Show(sal_False);
Invalidate();
}
-/*-- 27.04.2004 14:01:23---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_uInt16 SwAddressPreview::GetSelectedAddress()const
{
- DBG_ASSERT(pImpl->nSelectedAddress < pImpl->aAdresses.size(), "selection invalid");
+ OSL_ENSURE(pImpl->nSelectedAddress < pImpl->aAdresses.size(), "selection invalid");
return pImpl->nSelectedAddress;
}
-/*-- 25.06.2004 10:32:48---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressPreview::SelectAddress(sal_uInt16 nSelect)
{
- DBG_ASSERT(pImpl->nSelectedAddress < pImpl->aAdresses.size(), "selection invalid");
+ OSL_ENSURE(pImpl->nSelectedAddress < pImpl->aAdresses.size(), "selection invalid");
pImpl->nSelectedAddress = nSelect;
// now make it visible..
sal_uInt16 nSelectRow = nSelect / pImpl->nColumns;
@@ -295,26 +267,20 @@ void SwAddressPreview::SelectAddress(sal_uInt16 nSelect)
if( (nSelectRow < nStartRow) || (nSelectRow >= (nStartRow + pImpl->nRows) ))
aVScrollBar.SetThumbPos( nSelectRow );
}
-/*-- 25.06.2004 11:00:40---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressPreview::Clear()
{
pImpl->aAdresses.clear();
pImpl->nSelectedAddress = 0;
UpdateScrollBar();
}
-/*-- 28.04.2004 12:05:50---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressPreview::ReplaceSelectedAddress(const ::rtl::OUString& rNew)
{
pImpl->aAdresses[pImpl->nSelectedAddress] = rNew;
Invalidate();
}
-/*-- 25.06.2004 11:30:41---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressPreview::RemoveSelectedAddress()
{
pImpl->aAdresses.erase(pImpl->aAdresses.begin() + pImpl->nSelectedAddress);
@@ -323,25 +289,19 @@ void SwAddressPreview::RemoveSelectedAddress()
UpdateScrollBar();
Invalidate();
}
-/*-- 27.04.2004 14:01:23---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressPreview::SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns)
{
pImpl->nRows = nRows;
pImpl->nColumns = nColumns;
UpdateScrollBar();
}
-/*-- 25.06.2004 13:54:03---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressPreview::EnableScrollBar(bool bEnable)
{
pImpl->bEnableScrollBar = bEnable;
}
-/*-- 25.06.2004 11:55:52---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressPreview::UpdateScrollBar()
{
if(pImpl->nColumns)
@@ -355,9 +315,7 @@ void SwAddressPreview::UpdateScrollBar()
aVScrollBar.SetThumbPos(nResultingRows);
}
}
-/*-- 27.04.2004 14:01:23---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressPreview::Paint(const Rectangle&)
{
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
@@ -402,9 +360,6 @@ void SwAddressPreview::Paint(const Rectangle&)
SetClipRegion();
}
-/*-- 07.06.2004 15:44:15---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwAddressPreview::MouseButtonDown( const MouseEvent& rMEvt )
{
Window::MouseButtonDown(rMEvt);
@@ -431,9 +386,7 @@ void SwAddressPreview::MouseButtonDown( const MouseEvent& rMEvt )
Invalidate();
}
}
-/*-- 01.07.2004 12:33:59---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressPreview::KeyInput( const KeyEvent& rKEvt )
{
sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode();
@@ -473,18 +426,14 @@ void SwAddressPreview::KeyInput( const KeyEvent& rKEvt )
else
Window::KeyInput(rKEvt);
}
-/*-- 05.07.2004 12:02:28---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressPreview::StateChanged( StateChangedType nStateChange )
{
if(nStateChange == STATE_CHANGE_ENABLE)
Invalidate();
Window::StateChanged(nStateChange);
}
-/*-- 27.04.2004 14:01:23---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAddressPreview::DrawText_Impl(
const ::rtl::OUString& rAddress, const Point& rTopLeft, const Size& rSize, bool bIsSelected)
{
@@ -507,9 +456,7 @@ void SwAddressPreview::DrawText_Impl(
aStart.Y() += nHeight;
}
}
-/*-- 29.04.2004 11:24:47---------------------------------------------------
- -----------------------------------------------------------------------*/
String SwAddressPreview::FillData(
const ::rtl::OUString& rAddress,
SwMailMergeConfigItem& rConfigItem,
@@ -594,7 +541,7 @@ String SwAddressPreview::FillData(
}
catch( sdbc::SQLException& )
{
- DBG_ERROR("SQLException caught");
+ OSL_ENSURE(false, "SQLException caught");
}
}
}
@@ -609,9 +556,6 @@ String SwAddressPreview::FillData(
return sAddress;
}
-/*-- 11.05.2004 15:42:08---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwMergeAddressItem SwAddressIterator::Next()
{
//currently the string may either start with a '<' then it's a column
@@ -623,7 +567,7 @@ SwMergeAddressItem SwAddressIterator::Next()
{
aRet.bIsColumn = true;
xub_StrLen nClose = sAddress.Search('>');
- DBG_ASSERT(nClose != STRING_NOTFOUND, "closing '>' not found");
+ OSL_ENSURE(nClose != STRING_NOTFOUND, "closing '>' not found");
if( nClose != STRING_NOTFOUND )
{
aRet.sText = sAddress.Copy(1, nClose - 1);
@@ -662,22 +606,16 @@ SwMergeAddressItem SwAddressIterator::Next()
return aRet;
}
-/*-- 21.05.2004 10:36:20---------------------------------------------------
- -----------------------------------------------------------------------*/
SwAuthenticator::~SwAuthenticator()
{
}
-/*-- 21.05.2004 10:36:20---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwAuthenticator::getUserName( ) throw (RuntimeException)
{
return m_aUserName;
}
-/*-- 21.05.2004 10:36:20---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwAuthenticator::getPassword( ) throw (RuntimeException)
{
if(m_aUserName.getLength() && !m_aPassword.getLength() && m_pParentWindow)
@@ -690,9 +628,7 @@ OUString SwAuthenticator::getPassword( ) throw (RuntimeException)
}
return m_aPassword;
}
-/*-- 25.08.2004 12:53:03---------------------------------------------------
- -----------------------------------------------------------------------*/
SwConnectionContext::SwConnectionContext(
const ::rtl::OUString& rMailServer, sal_Int16 nPort,
const ::rtl::OUString& rConnectionType) :
@@ -701,15 +637,11 @@ SwConnectionContext::SwConnectionContext(
m_sConnectionType(rConnectionType)
{
}
-/*-- 25.08.2004 12:53:03---------------------------------------------------
- -----------------------------------------------------------------------*/
SwConnectionContext::~SwConnectionContext()
{
}
-/*-- 25.08.2004 12:53:03---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwConnectionContext::getValueByName( const ::rtl::OUString& rName )
throw (uno::RuntimeException)
{
@@ -722,51 +654,37 @@ uno::Any SwConnectionContext::getValueByName( const ::rtl::OUString& rName )
aRet <<= m_sConnectionType;
return aRet;
}
-/*-- 21.05.2004 10:45:33---------------------------------------------------
- -----------------------------------------------------------------------*/
SwConnectionListener::~SwConnectionListener()
{
}
-/*-- 21.05.2004 10:45:33---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwConnectionListener::connected(const lang::EventObject& /*aEvent*/)
throw (uno::RuntimeException)
{
- //OSL_ENSURE(false, "Connection opened");
}
-/*-- 21.05.2004 10:45:33---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwConnectionListener::disconnected(const lang::EventObject& /*aEvent*/)
throw (uno::RuntimeException)
{
- //OSL_ENSURE(false, "Connection closed");
}
-/*-- 21.05.2004 10:45:33---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwConnectionListener::disposing(const lang::EventObject& /*aEvent*/)
throw(uno::RuntimeException)
{
}
-/*-- 21.05.2004 10:17:22---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< uno::XComponentContext> getCurrentCmpCtx(
uno::Reference<lang::XMultiServiceFactory> rSrvMgr)
{
uno::Reference< beans::XPropertySet > xPropSet =
uno::Reference< beans::XPropertySet>(rSrvMgr, uno::UNO_QUERY);
- Any aAny = xPropSet->getPropertyValue( ::rtl::OUString::createFromAscii("DefaultContext"));
+ Any aAny = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")));
uno::Reference< uno::XComponentContext> rCmpCtx;
aAny >>= rCmpCtx;
return rCmpCtx;
}
-/*-- 13.07.2004 09:07:01---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailTransferable::SwMailTransferable(const rtl::OUString& rBody, const rtl::OUString& rMimeType) :
cppu::WeakComponentImplHelper2< datatransfer::XTransferable, beans::XPropertySet >(m_aMutex),
m_aMimeType( rMimeType ),
@@ -774,9 +692,7 @@ SwMailTransferable::SwMailTransferable(const rtl::OUString& rBody, const rtl::OU
m_bIsBody( true )
{
}
-/*-- 13.07.2004 09:07:01---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailTransferable::SwMailTransferable(const rtl::OUString& rURL,
const rtl::OUString& rName, const rtl::OUString& rMimeType) :
cppu::WeakComponentImplHelper2< datatransfer::XTransferable, beans::XPropertySet >(m_aMutex),
@@ -786,15 +702,11 @@ SwMailTransferable::SwMailTransferable(const rtl::OUString& rURL,
m_bIsBody( false )
{
}
-/*-- 13.07.2004 09:07:08---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailTransferable::~SwMailTransferable()
{
}
-/*-- 13.07.2004 09:07:08---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwMailTransferable::getTransferData( const datatransfer::DataFlavor& /*aFlavor*/ )
throw (datatransfer::UnsupportedFlavorException,
io::IOException, uno::RuntimeException)
@@ -819,9 +731,7 @@ uno::Any SwMailTransferable::getTransferData( const datatransfer::DataFlavor& /*
}
return aRet;
}
-/*-- 13.07.2004 09:07:08---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< datatransfer::DataFlavor > SwMailTransferable::getTransferDataFlavors( )
throw (uno::RuntimeException)
{
@@ -838,70 +748,54 @@ uno::Sequence< datatransfer::DataFlavor > SwMailTransferable::getTransferDataFla
}
return aRet;
}
-/*-- 13.07.2004 09:07:08---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwMailTransferable::isDataFlavorSupported(
const datatransfer::DataFlavor& aFlavor )
throw (uno::RuntimeException)
{
return (aFlavor.MimeType == ::rtl::OUString(m_aMimeType));
}
-/*-- 28.04.2004 09:52:05---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwMailTransferable::getPropertySetInfo( ) throw(uno::RuntimeException)
{
return uno::Reference< beans::XPropertySetInfo >();
}
-/*-- 28.04.2004 09:52:05---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailTransferable::setPropertyValue( const ::rtl::OUString& , const uno::Any& )
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException,
lang::WrappedTargetException, uno::RuntimeException)
{
}
-/*-- 28.04.2004 09:52:05---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwMailTransferable::getPropertyValue( const ::rtl::OUString& rPropertyName )
throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
uno::Any aRet;
- if( rPropertyName.equalsAscii( "URL" ) )
+ if( rPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")))
aRet <<= m_aURL;
return aRet;
}
-/*-- 28.04.2004 09:52:05---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailTransferable::addPropertyChangeListener(
const ::rtl::OUString&, const uno::Reference< beans::XPropertyChangeListener >& )
throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
}
-/*-- 28.04.2004 09:52:05---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailTransferable::removePropertyChangeListener(
const ::rtl::OUString&,
const uno::Reference< beans::XPropertyChangeListener >& )
throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
}
-/*-- 28.04.2004 09:52:05---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailTransferable::addVetoableChangeListener(
const ::rtl::OUString&,
const uno::Reference< beans::XVetoableChangeListener >& )
throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
}
-/*-- 28.04.2004 09:52:05---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailTransferable::removeVetoableChangeListener(
const ::rtl::OUString& ,
const uno::Reference< beans::XVetoableChangeListener >& )
@@ -909,89 +803,64 @@ void SwMailTransferable::removeVetoableChangeListener(
{
}
-/*-- 22.06.2004 16:46:05---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwMailMessage::SwMailMessage() :
cppu::WeakComponentImplHelper1< mail::XMailMessage>(m_aMutex)
{
}
-/*-- 22.06.2004 16:46:06---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMessage::~SwMailMessage()
{
}
-/*-- 02.07.2007 16:00:07---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwMailMessage::getSenderName() throw (uno::RuntimeException)
{
return m_sSenderName;
}
-/*-- 22.06.2004 16:46:06---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwMailMessage::getSenderAddress() throw (uno::RuntimeException)
{
return m_sSenderAddress;
}
-/*-- 22.06.2004 16:46:06---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwMailMessage::getReplyToAddress() throw (uno::RuntimeException)
{
return m_sReplyToAddress;
}
-/*-- 22.06.2004 16:46:07---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMessage::setReplyToAddress( const ::rtl::OUString& _replytoaddress ) throw (uno::RuntimeException)
{
m_sReplyToAddress = _replytoaddress;
}
-/*-- 22.06.2004 16:46:07---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwMailMessage::getSubject() throw (uno::RuntimeException)
{
return m_sSubject;
}
-/*-- 22.06.2004 16:46:07---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMessage::setSubject( const ::rtl::OUString& _subject ) throw (uno::RuntimeException)
{
m_sSubject = _subject;
}
-/*-- 13.07.2004 09:57:18---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< datatransfer::XTransferable > SwMailMessage::getBody() throw (uno::RuntimeException)
{
return m_xBody;
}
-/*-- 13.07.2004 09:57:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMessage::setBody(
const uno::Reference< datatransfer::XTransferable >& rBody )
throw (uno::RuntimeException)
{
m_xBody = rBody;
}
-/*-- 22.06.2004 16:46:08---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMessage::addRecipient( const ::rtl::OUString& rRecipientAddress )
throw (uno::RuntimeException)
{
m_aRecipients.realloc(m_aRecipients.getLength() + 1);
m_aRecipients[m_aRecipients.getLength() - 1] = rRecipientAddress;
}
-/*-- 22.06.2004 16:46:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMessage::addCcRecipient( const ::rtl::OUString& rRecipientAddress )
throw (uno::RuntimeException)
{
@@ -999,49 +868,39 @@ void SwMailMessage::addCcRecipient( const ::rtl::OUString& rRecipientAddress )
m_aCcRecipients[m_aCcRecipients.getLength() - 1] = rRecipientAddress;
}
-/*-- 22.06.2004 16:46:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMessage::addBccRecipient( const ::rtl::OUString& rRecipientAddress ) throw (uno::RuntimeException)
{
m_aBccRecipients.realloc(m_aBccRecipients.getLength() + 1);
m_aBccRecipients[m_aBccRecipients.getLength() - 1] = rRecipientAddress;
}
-/*-- 22.06.2004 16:46:09---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< ::rtl::OUString > SwMailMessage::getRecipients( ) throw (uno::RuntimeException)
{
return m_aRecipients;
}
-/*-- 22.06.2004 16:46:10---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< ::rtl::OUString > SwMailMessage::getCcRecipients( ) throw (uno::RuntimeException)
{
return m_aCcRecipients;
}
-/*-- 22.06.2004 16:46:10---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< ::rtl::OUString > SwMailMessage::getBccRecipients( ) throw (uno::RuntimeException)
{
return m_aBccRecipients;
}
-/*-- 13.07.2004 09:59:48---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMessage::addAttachment( const mail::MailAttachment& rMailAttachment )
throw (uno::RuntimeException)
{
m_aAttachments.realloc(m_aAttachments.getLength() + 1);
m_aAttachments[m_aAttachments.getLength() - 1] = rMailAttachment;
}
-/*-- 13.07.2004 09:59:48---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< mail::MailAttachment > SwMailMessage::getAttachments( )
throw (uno::RuntimeException)
{
return m_aAttachments;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx
index 365c56b4c0ea..33ea1c257bb8 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,27 +44,19 @@
#include <mmlayoutpage.hxx>
#include <mmconfigitem.hxx>
#include <swabstdlg.hxx>
-#ifndef _DBUI_HRC
#include <dbui.hrc>
-#endif
#include <view.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <sfx2/viewfrm.hxx>
#include <wrtsh.hxx>
-#include <sfx2/viewfrm.hxx>
#include "vcl/msgbox.hxx" // RET_CANCEL
#include <helpid.h>
-#include <dbui.hrc>
#include <mailmergewizard.hrc>
using namespace svt;
using namespace ::com::sun::star;
-/*-- 01.04.2004 16:52:49---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem) :
RoadmapWizard(&rView.GetViewFrame()->GetWindow(),
SW_RES(DLG_MAILMERGEWIZARD),
@@ -122,15 +115,11 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem
ActivatePage();
UpdateRoadmap();
}
-/*-- 01.04.2004 16:52:53---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeWizard::~SwMailMergeWizard()
{
}
-/*-- 01.04.2004 16:52:53---------------------------------------------------
- -----------------------------------------------------------------------*/
OWizardPage* SwMailMergeWizard::createPage(WizardState _nState)
{
OWizardPage* pRet = 0;
@@ -145,16 +134,15 @@ OWizardPage* SwMailMergeWizard::createPage(WizardState _nState)
case MM_MERGEPAGE : pRet = new SwMailMergeMergePage(this); break;
case MM_OUTPUTPAGE : pRet = new SwMailMergeOutputPage(this); break;
}
- DBG_ASSERT(pRet, "no page created in ::createPage");
+ OSL_ENSURE(pRet, "no page created in ::createPage");
return pRet;
}
-/*-- 04.06.2004 13:18:47---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeWizard::enterState( WizardState _nState )
{
::svt::RoadmapWizard::enterState( _nState );
/*
+
entering a page after the layoutpage requires the insertion
of greeting and address block - if not yet done
entering the merge or output page requires to create the output document
@@ -201,9 +189,7 @@ void SwMailMergeWizard::enterState( WizardState _nState )
UpdateRoadmap();
}
-/*-- 04.06.2004 12:54:13---------------------------------------------------
- -----------------------------------------------------------------------*/
String SwMailMergeWizard::getStateDisplayName( WizardState _nState ) const
{
String sRet;
@@ -224,7 +210,7 @@ String SwMailMergeWizard::getStateDisplayName( WizardState _nState ) const
}
return sRet;
}
-/*-- 24.06.2004 09:24:45---------------------------------------------------
+/*----------------------------------------------------------------------
enables/disables pages in the roadmap depending on the current
page and state
-----------------------------------------------------------------------*/
@@ -297,7 +283,7 @@ void SwMailMergeWizard::UpdateRoadmap()
enableState( nPage, bEnable );
}
}
-/*-- 24.06.2004 09:24:45---------------------------------------------------
+/*-- --------------------------------------------------------------------
enables/disables pages in the roadmap depending on the current
page and state
-----------------------------------------------------------------------*/
@@ -309,28 +295,24 @@ void SwMailMergeWizard::CreateTargetDocument()
if( m_rConfigItem.GetTargetView() )
m_rConfigItem.GetTargetView()->GetViewFrame()->GetFrame().Appear();
}
-/*-- 23.08.2004 08:51:36---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeWizard::updateRoadmapItemLabel( WizardState _nState )
{
svt::RoadmapWizard::updateRoadmapItemLabel( _nState );
}
-// ------------------------------------------------------------------------
-
short SwMailMergeWizard::Execute()
{
- DBG_ERROR( "SwMailMergeWizard cannot be executed via Dialog::Execute!\n"
+ OSL_ENSURE(false, "SwMailMergeWizard cannot be executed via Dialog::Execute!\n"
"It creates a thread (MailDispatcher instance) that will call"
"back to VCL apartment => deadlock!\n"
"Use Dialog::StartExecuteModal to execute the dialog!" );
return RET_CANCEL;
}
-// ------------------------------------------------------------------------
-
void SwMailMergeWizard::StartExecuteModal( const Link& rEndDialogHdl )
{
::svt::RoadmapWizard::StartExecuteModal( rEndDialogHdl );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index f56da53ceeb2..831675298d91 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,16 +55,13 @@ using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
-//-------------------------------------------------------------------------
void lcl_Move(Control* pCtrl, long nYOffset)
{
Point aPos(pCtrl->GetPosPixel());
aPos.Y() += nYOffset;
pCtrl->SetPosPixel(aPos);
}
-/*-- 02.04.2004 12:46:40---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage( SwMailMergeWizard* _pParent) :
svt::OWizardPage(_pParent, SW_RES(DLG_MM_ADDRESSBLOCK_PAGE)),
#ifdef MSC
@@ -112,22 +110,16 @@ SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage( SwMailMergeWizard* _pP
m_aPrevSetIB.SetClickHdl(aLink);
m_aNextSetIB.SetClickHdl(aLink);
}
-/*-- 02.04.2004 12:46:40---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeAddressBlockPage::~SwMailMergeAddressBlockPage()
{
}
-/*-- 05.07.2004 13:55:15---------------------------------------------------
- -----------------------------------------------------------------------*/
bool SwMailMergeAddressBlockPage::canAdvance() const
{
return m_pWizard->GetConfigItem().GetResultSet().is();
}
-/*-- 16.06.2004 12:34:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeAddressBlockPage::ActivatePage()
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
@@ -172,18 +164,14 @@ void SwMailMergeAddressBlockPage::ActivatePage()
InsertDataHdl_Impl(0);
}
}
-/*-- 27.05.2004 13:59:15---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeAddressBlockPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if ( ::svt::WizardTypes::eTravelForward == _eReason && !m_pWizard->GetConfigItem().GetResultSet().is() )
return sal_False;
return sal_True;
}
-/*-- 07.04.2004 16:19:30---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeAddressBlockPage, AddressListHdl_Impl, PushButton*, EMPTYARG)
{
SwAddressListDialog* pAddrDialog = new SwAddressListDialog(this);
@@ -204,9 +192,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, AddressListHdl_Impl, PushButton*, EMPTYAR
delete pAddrDialog;
return 0;
}
-/*-- 07.04.2004 16:19:30---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeAddressBlockPage, SettingsHdl_Impl, PushButton*, pButton)
{
SwSelectAddressBlockDialog* pDlg =
@@ -233,9 +219,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, SettingsHdl_Impl, PushButton*, pButton)
GetWizard()->enableButtons(WZB_NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE));
return 0;
}
-/*-- 07.04.2004 16:19:31---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeAddressBlockPage, AssignHdl_Impl, PushButton*, pButton)
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
@@ -253,9 +237,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, AssignHdl_Impl, PushButton*, pButton)
delete pDlg;
return 0;
}
-/*-- 11.06.2004 13:37:22---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeAddressBlockPage::EnableAddressBlock(sal_Bool bAll, sal_Bool bSelective)
{
m_aSettingsFI.Enable(bAll);
@@ -273,9 +255,7 @@ void SwMailMergeAddressBlockPage::EnableAddressBlock(sal_Bool bAll, sal_Bool bSe
m_aPrevSetIB.Enable(bSelective);
m_aNextSetIB.Enable(bSelective);
}
-/*-- 28.04.2004 12:45:58---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeAddressBlockPage, AddressBlockHdl_Impl, CheckBox*, pBox)
{
EnableAddressBlock(pBox->IsEnabled(), pBox->IsChecked());
@@ -284,9 +264,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, AddressBlockHdl_Impl, CheckBox*, pBox)
m_pWizard->UpdateRoadmap();
return 0;
}
-/*-- 08.06.2004 13:00:29---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeAddressBlockPage, AddressBlockSelectHdl_Impl, SwAddressPreview*, EMPTYARG)
{
sal_uInt16 nSel = m_aSettingsWIN.GetSelectedAddress();
@@ -299,9 +277,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, AddressBlockSelectHdl_Impl, SwAddressPrev
GetWizard()->enableButtons(WZB_NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE));
return 0;
}
-/*-- 31.08.2005 15:34:55---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeAddressBlockPage, HideParagraphsHdl_Impl, CheckBox*, pBox)
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
@@ -309,7 +285,6 @@ IMPL_LINK(SwMailMergeAddressBlockPage, HideParagraphsHdl_Impl, CheckBox*, pBox)
return 0;
}
-// ------------------------------------------------------------------------------
IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton)
{
//if no pButton is given, the first set has to be pre-set
@@ -347,8 +322,6 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton
}
}
m_aPrevSetIB.Enable(bEnable);
- //m_aNextSetIB.Enable(bEnable);
- //m_aDocumentIndexFI.Enable(bEnable);
String sTemp(m_sDocument);
sTemp.SearchAndReplaceAscii("%1", String::CreateFromInt32(nPos));
m_aDocumentIndexFI.SetText(sTemp);
@@ -366,9 +339,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton
EnableAddressBlock(bHasResultSet, m_aAddressCB.IsChecked());
return 0;
}
-/*-- 13.04.2004 16:01:26---------------------------------------------------
- -----------------------------------------------------------------------*/
SwSelectAddressBlockDialog::SwSelectAddressBlockDialog(
Window* pParent, SwMailMergeConfigItem& rConfig) :
SfxModalDialog(pParent, SW_RES(DLG_MM_SELECTADDRESSBLOCK)),
@@ -409,15 +380,11 @@ SwSelectAddressBlockDialog::SwSelectAddressBlockDialog(
m_aPreview.SetLayout(2, 2);
m_aPreview.EnableScrollBar();
}
-/*-- 13.04.2004 16:01:27---------------------------------------------------
- -----------------------------------------------------------------------*/
SwSelectAddressBlockDialog::~SwSelectAddressBlockDialog()
{
}
-/*-- 28.04.2004 11:48:11---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSelectAddressBlockDialog::SetAddressBlocks(const uno::Sequence< ::rtl::OUString>& rBlocks,
sal_uInt16 nSelectedAddress)
{
@@ -426,9 +393,8 @@ void SwSelectAddressBlockDialog::SetAddressBlocks(const uno::Sequence< ::rtl::OU
m_aPreview.AddAddress(m_aAddressBlocks[nAddress]);
m_aPreview.SelectAddress(nSelectedAddress);
}
-/*-- 25.06.2004 10:51:36---------------------------------------------------
- return the address blocks and put the selected one to the first position
- -----------------------------------------------------------------------*/
+
+// return the address blocks and put the selected one to the first position
const uno::Sequence< ::rtl::OUString >& SwSelectAddressBlockDialog::GetAddressBlocks()
{
//put the selected block to the first position
@@ -451,9 +417,7 @@ const uno::Sequence< ::rtl::OUString >& SwSelectAddressBlockDialog::GetAddres
}
return m_aAddressBlocks;
}
-/*-- 28.04.2004 11:48:11---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSelectAddressBlockDialog::SetSettings(
sal_Bool bIsCountry, ::rtl::OUString rCountry)
{
@@ -466,9 +430,7 @@ void SwSelectAddressBlockDialog::SetSettings(
m_aNeverRB.Check();
m_aDeletePB.Enable(m_aAddressBlocks.getLength() > 1);
}
-/*-- 10.05.2004 11:17:06---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwSelectAddressBlockDialog::GetCountry() const
{
::rtl::OUString sRet;
@@ -477,9 +439,6 @@ void SwSelectAddressBlockDialog::SetSettings(
return sRet;
}
-/*-- 13.04.2004 16:02:32---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK(SwSelectAddressBlockDialog, DeleteHdl_Impl, PushButton*, pButton)
{
if(m_aAddressBlocks.getLength())
@@ -500,9 +459,7 @@ IMPL_LINK(SwSelectAddressBlockDialog, DeleteHdl_Impl, PushButton*, pButton)
}
return 0;
}
-/*-- 13.04.2004 16:02:32---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwSelectAddressBlockDialog, NewCustomizeHdl_Impl, PushButton*, pButton)
{
bool bCustomize = pButton == &m_aCustomizePB;
@@ -537,24 +494,17 @@ IMPL_LINK(SwSelectAddressBlockDialog, NewCustomizeHdl_Impl, PushButton*, pButton
delete pDlg;
return 0;
}
-/*-- 13.04.2004 16:02:33---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwSelectAddressBlockDialog, IncludeHdl_Impl, RadioButton*, pButton)
{
m_aCountryED.Enable(&m_aDependentRB == pButton);
return 0;
}
-/* -----------------------------28.02.05 09:00--------------------------------
-
- ---------------------------------------------------------------------------*/
SwRestrictedComboBox::~SwRestrictedComboBox()
{
}
-/* -----------------------------28.02.05 09:00--------------------------------
- ---------------------------------------------------------------------------*/
void SwRestrictedComboBox::KeyInput(const KeyEvent& rEvt)
{
sal_Bool bCallParent = sal_True;
@@ -567,9 +517,7 @@ void SwRestrictedComboBox::KeyInput(const KeyEvent& rEvt)
if(bCallParent)
ComboBox::KeyInput(rEvt);
}
-/* -----------------------------28.02.05 09:00--------------------------------
- ---------------------------------------------------------------------------*/
void SwRestrictedComboBox::Modify()
{
Selection aSel = GetSelection();
@@ -590,9 +538,6 @@ void SwRestrictedComboBox::Modify()
GetModifyHdl().Call(this);
}
-/*-- 13.04.2004 16:01:08---------------------------------------------------
-
- -----------------------------------------------------------------------*/
#define USER_DATA_SALUTATION -1
#define USER_DATA_PUNCTUATION -2
#define USER_DATA_TEXT -3
@@ -676,7 +621,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
{
const XubString& rHeader = rHeaders.GetString( i );
SvLBoxEntry* pEntry = m_aAddressElementsLB.InsertEntry(rHeader);
- pEntry->SetUserData((void*)(sal_Int32)i);
+ pEntry->SetUserData((void*)(sal_IntPtr)i);
}
m_aOK.SetClickHdl(LINK(this, SwCustomizeAddressBlockDialog, OKHdl_Impl));
m_aAddressElementsLB.SetSelectHdl(LINK(this, SwCustomizeAddressBlockDialog, ListBoxSelectHdl_Impl ));
@@ -694,23 +639,17 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
m_aDownIB.SetClickHdl(aImgButtonHdl);
UpdateImageButtons_Impl();
}
-/*-- 13.04.2004 16:01:08---------------------------------------------------
- -----------------------------------------------------------------------*/
SwCustomizeAddressBlockDialog::~SwCustomizeAddressBlockDialog()
{
}
-/*-- 07.06.2004 13:51:11---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressBlockDialog, OKHdl_Impl, OKButton*, EMPTYARG)
{
EndDialog(RET_OK);
return 0;
}
-/*-- 24.06.2004 11:36:05---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressBlockDialog, ListBoxSelectHdl_Impl, DDListBox*, pBox)
{
sal_Int32 nUserData = (sal_Int32)(sal_IntPtr)pBox->FirstSelected()->GetUserData();
@@ -718,9 +657,7 @@ IMPL_LINK(SwCustomizeAddressBlockDialog, ListBoxSelectHdl_Impl, DDListBox*, pBox
m_aInsertFieldIB.Enable(nUserData >= 0 || !HasItem_Impl(nUserData));
return 0;
}
-/*-- 25.06.2004 11:21:24---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressBlockDialog, EditModifyHdl_Impl, AddressMultiLineEdit*, EMPTYARG)
{
String sAddress = SwAddressPreview::FillData(
@@ -730,9 +667,7 @@ IMPL_LINK(SwCustomizeAddressBlockDialog, EditModifyHdl_Impl, AddressMultiLineEdi
UpdateImageButtons_Impl();
return 0;
}
-/*-- 25.06.2004 12:14:11---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressBlockDialog, ImageButtonHdl_Impl, ImageButton*, pButton)
{
if(&m_aInsertFieldIB == pButton)
@@ -764,9 +699,7 @@ IMPL_LINK(SwCustomizeAddressBlockDialog, ImageButtonHdl_Impl, ImageButton*, pBut
UpdateImageButtons_Impl();
return 0;
}
-/*-- 01.07.2004 09:27:02---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwCustomizeAddressBlockDialog::GetSelectedItem_Impl()
{
sal_Int32 nRet = USER_DATA_NONE;
@@ -784,9 +717,7 @@ sal_Int32 SwCustomizeAddressBlockDialog::GetSelectedItem_Impl()
}
return nRet;
}
-/*-- 01.07.2004 10:01:19---------------------------------------------------
- -----------------------------------------------------------------------*/
bool SwCustomizeAddressBlockDialog::HasItem_Impl(sal_Int32 nUserData)
{
//get the entry from the ListBox
@@ -808,9 +739,7 @@ bool SwCustomizeAddressBlockDialog::HasItem_Impl(sal_Int32 nUserData)
bool bRet = sText.Search(sEntry) != STRING_NOTFOUND;
return bRet;
}
-/*-- 25.06.2004 13:10:16---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressBlockDialog, SelectionChangedHdl_Impl, AddressMultiLineEdit*, pEdit)
{
// called in case the selection of the edit field changes.
@@ -863,9 +792,7 @@ IMPL_LINK(SwCustomizeAddressBlockDialog, SelectionChangedHdl_Impl, AddressMultiL
bOnEntry = false;
return 0;
}
-/*-- 25.06.2004 13:36:29---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressBlockDialog, FieldChangeHdl_Impl, ComboBox*, EMPTYARG)
{
//changing the field content changes the related members, too
@@ -888,9 +815,6 @@ IMPL_LINK(SwCustomizeAddressBlockDialog, FieldChangeHdl_Impl, ComboBox*, EMPTYAR
return 0;
}
-/*-- 25.06.2004 12:35:51---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwCustomizeAddressBlockDialog::UpdateImageButtons_Impl()
{
sal_uInt16 nMove = m_aDragED.IsCurrentItemMoveable();
@@ -903,18 +827,14 @@ void SwCustomizeAddressBlockDialog::UpdateImageButtons_Impl()
m_aInsertFieldIB.Enable( pEntry &&
(0 < (sal_Int32)(sal_IntPtr)pEntry->GetUserData() || m_aFieldCB.GetText().Len()));
}
-/*-- 28.04.2004 12:04:14---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwCustomizeAddressBlockDialog::SetAddress(const ::rtl::OUString& rAddress)
{
m_aDragED.SetText( rAddress );
UpdateImageButtons_Impl();
m_aDragED.Modify();
}
-/*-- 28.04.2004 12:04:14---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwCustomizeAddressBlockDialog::GetAddress()
{
String sAddress(m_aDragED.GetAddress());
@@ -938,9 +858,7 @@ void SwCustomizeAddressBlockDialog::SetAddress(const ::rtl::OUString& rAddress)
}
return sAddress;
}
-/*-- 28.02.2005 11:03:35---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwCustomizeAddressBlockDialog::MoveFocus( Window* pMember, bool bNext )
{
::std::vector< Window* > aControls;
@@ -966,7 +884,7 @@ void SwCustomizeAddressBlockDialog::MoveFocus( Window* pMember, bool bNext )
}
if( aMemberIter == aControls.end() )
{
- DBG_ERROR( "Window not found?" );
+ OSL_ENSURE(false, "Window not found?" );
return;
}
@@ -1007,9 +925,7 @@ void SwCustomizeAddressBlockDialog::MoveFocus( Window* pMember, bool bNext )
}
}
-/*-- 13.04.2004 17:49:45---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwAssignFieldsControl : public Control
{
friend class SwAssignFieldsDialog;
@@ -1048,10 +964,7 @@ public:
m_aModifyHdl.Call(this);
}
};
-/*-- 13.04.2004 17:51:27---------------------------------------------------
- -----------------------------------------------------------------------*/
-//-------------------------------------------------------------------------
SwAssignFieldsControl::SwAssignFieldsControl(
Window* pParent, const ResId& rResId, SwMailMergeConfigItem& rConfigItem) :
Control(pParent, rResId),
@@ -1172,9 +1085,6 @@ SwAssignFieldsControl::SwAssignFieldsControl(
m_aMatches.push_back(pNewLB);
m_aPreviews.push_back(pNewPreview);
}
- ListBox* pBottomBox = m_aMatches[rHeaders.Count() -1];
- long nYBottom = pBottomBox->GetPosPixel().Y();
- nYBottom += pBottomBox->GetDropDownPosSizePixel().GetHeight();
m_aVScroll.SetRange(Range(0, rHeaders.Count()));
m_aVScroll.SetPageSize((aOutputSize.Height() - nHBHeight - m_nLBStartTopPos)/ m_nYOffset);
m_aVScroll.EnableDrag();
@@ -1186,9 +1096,7 @@ SwAssignFieldsControl::SwAssignFieldsControl(
m_aVScroll.SetSizePixel(Size(m_aVScroll.GetSizePixel().Width(), aOutputSize.Height() - nHBHeight));
}
-/*-- 13.04.2004 17:51:28---------------------------------------------------
- -----------------------------------------------------------------------*/
SwAssignFieldsControl::~SwAssignFieldsControl()
{
::std::vector<FixedInfo*>::iterator aFIIter;
@@ -1201,9 +1109,6 @@ SwAssignFieldsControl::~SwAssignFieldsControl()
delete *aFIIter;
}
-/*-- 07.05.2004 13:11:26---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwAssignFieldsControl::Command( const CommandEvent& rCEvt )
{
switch ( rCEvt.GetCommand() )
@@ -1223,9 +1128,7 @@ void SwAssignFieldsControl::Command( const CommandEvent& rCEvt )
Control::Command(rCEvt);
}
}
-/*-- 07.05.2004 13:11:21---------------------------------------------------
- -----------------------------------------------------------------------*/
long SwAssignFieldsControl::PreNotify( NotifyEvent& rNEvt )
{
if(rNEvt.GetType() == EVENT_COMMAND)
@@ -1240,9 +1143,7 @@ long SwAssignFieldsControl::PreNotify( NotifyEvent& rNEvt )
}
return Control::PreNotify(rNEvt);
}
-/*-- 03.09.2004 13:19:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAssignFieldsControl::MakeVisible( sal_Int32 nIndex )
{
long nThumb = m_aVScroll.GetThumbPos();
@@ -1255,9 +1156,7 @@ void SwAssignFieldsControl::MakeVisible( sal_Int32 nIndex )
return;
ScrollHdl_Impl( &m_aVScroll );
}
-/*-- 30.04.2004 16:10:58---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll)
{
long nThumb = pScroll->GetThumbPos();
@@ -1282,9 +1181,6 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll)
return 0;
}
-/*-- 03.05.2004 15:37:52---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAssignFieldsControl, MatchHdl_Impl, ListBox*, pBox)
{
String sColumn = pBox->GetSelectEntry();
@@ -1320,9 +1216,7 @@ IMPL_LINK(SwAssignFieldsControl, MatchHdl_Impl, ListBox*, pBox)
m_aModifyHdl.Call(0);
return 0;
}
-/*-- 03.09.2004 13:16:04---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAssignFieldsControl, GotFocusHdl_Impl, ListBox*, pBox)
{
if(0 != (GETFOCUS_TAB & pBox->GetGetFocusFlags()))
@@ -1340,9 +1234,7 @@ IMPL_LINK(SwAssignFieldsControl, GotFocusHdl_Impl, ListBox*, pBox)
}
return 0;
}
-/*-- 13.04.2004 17:44:01---------------------------------------------------
- -----------------------------------------------------------------------*/
SwAssignFieldsDialog::SwAssignFieldsDialog(
Window* pParent, SwMailMergeConfigItem& rConfigItem,
const ::rtl::OUString& rPreview,
@@ -1394,16 +1286,12 @@ SwAssignFieldsDialog::SwAssignFieldsDialog(
m_aOK.SetClickHdl(LINK(this, SwAssignFieldsDialog, OkHdl_Impl));
}
-/*-- 13.04.2004 17:44:02---------------------------------------------------
- -----------------------------------------------------------------------*/
SwAssignFieldsDialog::~SwAssignFieldsDialog()
{
delete m_pFieldsControl;
}
-/*-- 05.05.2004 14:39:13---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< ::rtl::OUString > SwAssignFieldsDialog::CreateAssignments()
{
uno::Sequence< ::rtl::OUString > aAssignments(
@@ -1423,9 +1311,7 @@ uno::Sequence< ::rtl::OUString > SwAssignFieldsDialog::CreateAssignments()
}
return aAssignments;
}
-/*-- 03.05.2004 18:04:00---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAssignFieldsDialog, OkHdl_Impl, PushButton*, EMPTYARG)
{
m_rConfigItem.SetColumnAssignment(
@@ -1434,9 +1320,7 @@ IMPL_LINK(SwAssignFieldsDialog, OkHdl_Impl, PushButton*, EMPTYARG)
EndDialog(RET_OK);
return 0;
}
-/*-- 05.05.2004 14:37:19---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwAssignFieldsDialog, AssignmentModifyHdl_Impl, void*, EMPTYARG)
{
uno::Sequence< ::rtl::OUString > aAssignments = CreateAssignments();
@@ -1446,16 +1330,12 @@ IMPL_LINK(SwAssignFieldsDialog, AssignmentModifyHdl_Impl, void*, EMPTYARG)
return 0;
}
-/*-- 26.05.2004 11:20:11---------------------------------------------------
-
- -----------------------------------------------------------------------*/
DDListBox::DDListBox(SwCustomizeAddressBlockDialog* pParent, const ResId rResId) :
SvTreeListBox(pParent, rResId),
m_pParentDialog(pParent)
{
SetStyle( GetStyle() | /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/
WB_CLIPCHILDREN );
-// SetSpaceBetweenEntries(3);
SetSelectionMode( SINGLE_SELECTION );
SetDragDropMode( SV_DRAGDROP_CTRL_COPY );
EnableAsyncDrag(sal_True);
@@ -1465,15 +1345,11 @@ DDListBox::DDListBox(SwCustomizeAddressBlockDialog* pParent, const ResId rResId)
Show();
}
-/*-- 26.05.2004 11:20:15---------------------------------------------------
- -----------------------------------------------------------------------*/
DDListBox::~DDListBox()
{
}
-/*-- 26.05.2004 11:20:16---------------------------------------------------
- -----------------------------------------------------------------------*/
void DDListBox::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ )
{
SvLBoxEntry* pEntry = GetCurEntry();
@@ -1501,9 +1377,7 @@ void DDListBox::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ )
}
}
}
-/*-- 26.05.2004 13:14:53---------------------------------------------------
- -----------------------------------------------------------------------*/
AddressMultiLineEdit::AddressMultiLineEdit(SwCustomizeAddressBlockDialog* pParent, const ResId& rResId) :
MultiLineEdit(pParent, rResId),
m_pParentDialog(pParent)
@@ -1511,19 +1385,14 @@ AddressMultiLineEdit::AddressMultiLineEdit(SwCustomizeAddressBlockDialog* pParen
{
GetTextView()->SupportProtectAttribute(sal_True);
StartListening(*GetTextEngine());
- //DisableSelectionOnFocus();
EnableFocusSelectionHide(sal_False);
}
-/*-- 26.05.2004 13:14:53---------------------------------------------------
- -----------------------------------------------------------------------*/
AddressMultiLineEdit::~AddressMultiLineEdit()
{
EndListening(*GetTextEngine());
}
-/*-- 25.06.2004 13:02:49---------------------------------------------------
- -----------------------------------------------------------------------*/
void AddressMultiLineEdit::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
if(rHint.ISA(TextHint) &&
@@ -1533,9 +1402,7 @@ void AddressMultiLineEdit::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rH
m_aSelectionLink.Call(this);
}
}
-/*-- 26.05.2004 13:45:46---------------------------------------------------
- -----------------------------------------------------------------------*/
long AddressMultiLineEdit::PreNotify( NotifyEvent& rNEvt )
{
long nHandled = 0;
@@ -1560,9 +1427,7 @@ long AddressMultiLineEdit::PreNotify( NotifyEvent& rNEvt )
return nHandled;
}
-/*-- 25.06.2004 08:20:54---------------------------------------------------
- -----------------------------------------------------------------------*/
void AddressMultiLineEdit::SetText( const String& rStr )
{
MultiLineEdit::SetText(rStr);
@@ -1605,10 +1470,8 @@ void AddressMultiLineEdit::SetText( const String& rStr )
}
}
-/*-- 25.06.2004 12:32:41---------------------------------------------------
- Insert the new entry in front of the entry at the beginning of the selection
- -----------------------------------------------------------------------*/
+// Insert the new entry in front of the entry at the beginning of the selection
void AddressMultiLineEdit::InsertNewEntry( const String& rStr )
{
// insert new entry after current selected one.
@@ -1645,16 +1508,13 @@ void AddressMultiLineEdit::InsertNewEntryAtPosition( const String& rStr, sal_uLo
pTextView->SetSelection(aEntrySel);
m_aSelectionLink.Call(this);
}
-/*-- 25.06.2004 12:32:41---------------------------------------------------
- -----------------------------------------------------------------------*/
void AddressMultiLineEdit::RemoveCurrentEntry()
{
ExtTextEngine* pTextEngine = GetTextEngine();
ExtTextView* pTextView = GetTextView();
const TextSelection& rSelection = pTextView->GetSelection();
const TextCharAttrib* pBeginAttrib = pTextEngine->FindCharAttrib( rSelection.GetStart(), TEXTATTR_PROTECTED );
-// const TextCharAttrib* pEndAttrib = pTextEngine->FindCharAttrib( rSelection.GetEnd(), TEXTATTR_PROTECTED );
if(pBeginAttrib &&
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
@@ -1667,9 +1527,7 @@ void AddressMultiLineEdit::RemoveCurrentEntry()
Modify();
}
}
-/*-- 25.06.2004 12:32:41---------------------------------------------------
- -----------------------------------------------------------------------*/
void AddressMultiLineEdit::MoveCurrentItem(sal_uInt16 nMove)
{
ExtTextEngine* pTextEngine = GetTextEngine();
@@ -1742,9 +1600,7 @@ void AddressMultiLineEdit::MoveCurrentItem(sal_uInt16 nMove)
Modify();
}
}
-/*-- 25.06.2004 12:32:41---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_uInt16 AddressMultiLineEdit::IsCurrentItemMoveable()
{
sal_uInt16 nRet = 0;
@@ -1752,7 +1608,6 @@ sal_uInt16 AddressMultiLineEdit::IsCurrentItemMoveable()
ExtTextView* pTextView = GetTextView();
const TextSelection& rSelection = pTextView->GetSelection();
const TextCharAttrib* pBeginAttrib = pTextEngine->FindCharAttrib( rSelection.GetStart(), TEXTATTR_PROTECTED );
-// const TextCharAttrib* pEndAttrib = pTextEngine->FindCharAttrib( rSelection.GetEnd(), TEXTATTR_PROTECTED );
if(pBeginAttrib &&
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
@@ -1766,9 +1621,7 @@ sal_uInt16 AddressMultiLineEdit::IsCurrentItemMoveable()
}
return nRet;
}
-/*-- 25.06.2004 12:32:42---------------------------------------------------
- -----------------------------------------------------------------------*/
bool AddressMultiLineEdit::HasCurrentItem()
{
ExtTextEngine* pTextEngine = GetTextEngine();
@@ -1779,9 +1632,7 @@ bool AddressMultiLineEdit::HasCurrentItem()
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()));
}
-/*-- 01.07.2004 09:07:44---------------------------------------------------
- -----------------------------------------------------------------------*/
String AddressMultiLineEdit::GetCurrentItem()
{
String sRet;
@@ -1799,9 +1650,7 @@ String AddressMultiLineEdit::GetCurrentItem()
}
return sRet;
}
-/*-- 05.07.2004 14:29:02---------------------------------------------------
- -----------------------------------------------------------------------*/
void AddressMultiLineEdit::SelectCurrentItem()
{
ExtTextEngine* pTextEngine = GetTextEngine();
@@ -1818,11 +1667,7 @@ void AddressMultiLineEdit::SelectCurrentItem()
Invalidate();
}
}
-/*-- 25.06.2004 09:10:43---------------------------------------------------
- returns the address
- remove trailing spaces
- and trailing empty paragraphs
- -----------------------------------------------------------------------*/
+
String AddressMultiLineEdit::GetAddress()
{
String sRet;
@@ -1844,3 +1689,4 @@ String AddressMultiLineEdit::GetAddress()
return sRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index b5f4a3fc87a6..d6b92245e2ac 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#define _MAILMERGEADDRESSBLOCKPAGE_HXX
#include <svtools/wizardmachine.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <svtools/stdctrl.hxx>
#include <mailmergehelper.hxx>
#include <sfx2/basedlgs.hxx>
@@ -43,9 +42,7 @@
#include <svl/lstner.hxx>
class SwMailMergeWizard;
class SwMailMergeConfigItem;
-/*-- 13.04.2004 15:50:37---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergeAddressBlockPage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
@@ -107,9 +104,7 @@ public:
SwMailMergeWizard* GetWizard() { return m_pWizard;}
};
-/*-- 13.04.2004 15:45:31---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwSelectAddressBlockDialog : public SfxModalDialog
{
FixedText m_aSelectFT;
@@ -152,10 +147,6 @@ public:
::rtl::OUString GetCountry() const;
};
-
-/*-- 26.05.2004 11:16:25---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SwCustomizeAddressBlockDialog;
class DDListBox : public SvTreeListBox
{
@@ -166,9 +157,7 @@ public:
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
};
-/*-- 26.05.2004 11:16:25---------------------------------------------------
- -----------------------------------------------------------------------*/
#define MOVE_ITEM_LEFT 1
#define MOVE_ITEM_RIGHT 2
#define MOVE_ITEM_UP 4
@@ -206,10 +195,8 @@ public:
String GetCurrentItem();
void SelectCurrentItem();
};
-/*-- 13.04.2004 15:45:31---------------------------------------------------
- Dialog is used to create custom address blocks as well as
- custom greeting lines
- -----------------------------------------------------------------------*/
+
+// Dialog is used to create custom address blocks as well as custom greeting lines
class SwRestrictedComboBox : public ComboBox
{
String sForbiddenChars;
@@ -223,7 +210,7 @@ public:
~SwRestrictedComboBox();
- void SetForbiddenChars(const String& rSet){sForbiddenChars = rSet;}
+ void SetForbiddenChars(const String& rSet){sForbiddenChars = rSet;}
};
class SwCustomizeAddressBlockDialog : public SfxModalDialog
@@ -293,9 +280,7 @@ public:
void SetAddress(const ::rtl::OUString& rAddress);
::rtl::OUString GetAddress();
};
-/*-- 13.04.2004 17:41:11---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwAssignFieldsControl;
class SwAssignFieldsDialog : public SfxModalDialog
{
@@ -330,3 +315,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmaddressblockpage.src b/sw/source/ui/dbui/mmaddressblockpage.src
index 43d5b9126eb4..ced9027851b0 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.src
+++ b/sw/source/ui/dbui/mmaddressblockpage.src
@@ -194,9 +194,6 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE
};
};
-/*-- 13.04.2004 16:07:28---------------------------------------------------
-
- -----------------------------------------------------------------------*/
ModalDialog DLG_MM_SELECTADDRESSBLOCK
{
OutputSize = TRUE ;
@@ -301,10 +298,6 @@ ModalDialog DLG_MM_SELECTADDRESSBLOCK
};
};
-/*-- 13.04.2004 16:07:28---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-
#define WORKAROUND\
Text [ en-US ] = "New Address Block";
@@ -534,9 +527,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK
};
};
};
-/*-- 13.04.2004 17:45:24---------------------------------------------------
- -----------------------------------------------------------------------*/
ModalDialog DLG_MM_ASSIGNFIELDS
{
OutputSize = TRUE ;
diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx
index 442cb4de6e9c..61c968c703e3 100644
--- a/sw/source/ui/dbui/mmconfigitem.cxx
+++ b/sw/source/ui/dbui/mmconfigitem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include "precompiled_sw.hxx"
#include <mmconfigitem.hxx>
#include <swtypes.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/sdb/XCompletedConnection.hpp>
@@ -47,12 +48,8 @@
#include <unotools/configitem.hxx>
#include <mailmergehelper.hxx>
#include <swunohelper.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <dbui.hrc>
#include <vector>
@@ -82,9 +79,6 @@ const char* cDataCommandType = "DataSource/DataCommandType";
#define DEFAULT_PORT 25
#define POP_PORT 110
-/*-- 16.04.2004 09:41:36---------------------------------------------------
-
- -----------------------------------------------------------------------*/
struct DBAddressDataAssignment
{
SwDBData aDBData;
@@ -99,9 +93,6 @@ struct DBAddressDataAssignment
{}
};
-/*-- 16.04.2004 09:43:29---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SwMailMergeConfigItem_Impl : public utl::ConfigItem
{
friend class SwMailMergeConfigItem;
@@ -202,9 +193,6 @@ public:
};
-/*-- 06.05.2004 12:51:54---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() :
ConfigItem(C2U("Office.Writer/MailMergeWizard"), 0),
nResultSetCursorPos(-1),
@@ -237,7 +225,7 @@ SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() :
const Sequence<OUString>& rNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(rNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == rNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == rNames.getLength(), "GetProperties failed");
if(aValues.getLength() == rNames.getLength())
{
for(int nProp = 0; nProp < rNames.getLength(); nProp++)
@@ -314,7 +302,7 @@ SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() :
}
}
//read the list of data base assignments
- Sequence<OUString> aAssignments = GetNodeNames(C2U(cAddressDataAssignments));
+ Sequence<OUString> aAssignments = GetNodeNames(rtl::OUString::createFromAscii(cAddressDataAssignments));
if(aAssignments.getLength())
{
//create a list of property names to load the URLs of all data bases
@@ -325,18 +313,18 @@ SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() :
OUString sSlash = C2U("/");
for(nAssign = 0; nAssign < aAssignProperties.getLength(); nAssign += 4)
{
- String sAssignPath = C2U(cAddressDataAssignments);
+ String sAssignPath = rtl::OUString::createFromAscii(cAddressDataAssignments);
sAssignPath += '/';
sAssignPath += String(pAssignments[nAssign / 4]);
sAssignPath += '/';
pAssignProperties[nAssign] = sAssignPath;
- pAssignProperties[nAssign] += C2U(cDataSourceName);
+ pAssignProperties[nAssign] += rtl::OUString::createFromAscii(cDataSourceName);
pAssignProperties[nAssign + 1] = sAssignPath;
- pAssignProperties[nAssign + 1] += C2U(cDataTableName);
+ pAssignProperties[nAssign + 1] += rtl::OUString::createFromAscii(cDataTableName);
pAssignProperties[nAssign + 2] = sAssignPath;
- pAssignProperties[nAssign + 2] += C2U(cDataCommandType);
+ pAssignProperties[nAssign + 2] += rtl::OUString::createFromAscii(cDataCommandType);
pAssignProperties[nAssign + 3] = sAssignPath;
- pAssignProperties[nAssign + 3] += C2U(cDBColumnAssignments);
+ pAssignProperties[nAssign + 3] += rtl::OUString::createFromAscii(cDBColumnAssignments);
}
Sequence<Any> aAssignValues = GetProperties(aAssignProperties);
const Any* pAssignValues = aAssignValues.getConstArray();
@@ -372,15 +360,11 @@ SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() :
}
}
-/*-- 06.05.2004 12:51:54---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeConfigItem_Impl::~SwMailMergeConfigItem_Impl()
{
}
-/*-- 13.03.2006 12:12:59---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem_Impl::SetCurrentAddressBlockIndex( sal_Int32 nSet )
{
if(aAddressBlocks.size() >= sal::static_int_cast<sal_uInt32, sal_Int32>(nSet))
@@ -389,9 +373,7 @@ void SwMailMergeConfigItem_Impl::SetCurrentAddressBlockIndex( sal_Int32 nSet )
SetModified();
}
}
-/*-- 16.04.2004 13:06:07---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString lcl_CreateNodeName(Sequence<OUString>& rAssignments )
{
const OUString* pNames = rAssignments.getConstArray();
@@ -420,7 +402,7 @@ OUString lcl_CreateNodeName(Sequence<OUString>& rAssignments )
rAssignments.getArray()[rAssignments.getLength() - 1] = sNewName;
return sNewName;
}
-// --------------------------------------------------------------------------------
+
void lcl_ConvertToNumbers(OUString& rBlock, const ResStringArray& rHeaders )
{
//convert the strings used for UI to numbers used for the configuration
@@ -437,7 +419,7 @@ void lcl_ConvertToNumbers(OUString& rBlock, const ResStringArray& rHeaders )
}
rBlock = sBlock;
}
-// --------------------------------------------------------------------------------
+
void lcl_ConvertFromNumbers(OUString& rBlock, const ResStringArray& rHeaders)
{
//convert the numbers used for the configuration to strings used for UI to numbers
@@ -463,7 +445,7 @@ void lcl_ConvertFromNumbers(OUString& rBlock, const ResStringArray& rHeaders)
}
else
{
- DBG_ERROR("parse error in address block or greeting line");
+ OSL_ENSURE(false, "parse error in address block or greeting line");
}
}
else
@@ -472,9 +454,6 @@ void lcl_ConvertFromNumbers(OUString& rBlock, const ResStringArray& rHeaders)
rBlock = sBlock;
}
-/*--------------------------------------------------------------------
-
- --------------------------------------------------------------------*/
const Sequence<OUString>& SwMailMergeConfigItem_Impl::GetPropertyNames()
{
static Sequence<OUString> aNames;
@@ -532,9 +511,7 @@ const Sequence<OUString>& SwMailMergeConfigItem_Impl::GetPropertyNames()
}
return aNames;
}
-/*-- 15.04.2004 08:48:39---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem_Impl::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
void SwMailMergeConfigItem_Impl::Commit()
@@ -620,7 +597,7 @@ void SwMailMergeConfigItem_Impl::Commit()
//store the changed / new assignments
//load the existing node names to find new names
- Sequence<OUString> aAssignments = GetNodeNames(C2U(cAddressDataAssignments));
+ Sequence<OUString> aAssignments = GetNodeNames(rtl::OUString::createFromAscii(cAddressDataAssignments));
::std::vector<DBAddressDataAssignment>::iterator aAssignIter;
for(aAssignIter = aAddressDataAssignments.begin();
@@ -633,7 +610,7 @@ void SwMailMergeConfigItem_Impl::Commit()
aAssignIter->sConfigNodeName :
lcl_CreateNodeName(aAssignments);
OUString sSlash = C2U("/");
- OUString sNodePath = C2U(cAddressDataAssignments);
+ OUString sNodePath = rtl::OUString::createFromAscii(cAddressDataAssignments);
sNodePath += sSlash;
sNodePath += sNewNode;
sNodePath += sSlash;
@@ -641,27 +618,25 @@ void SwMailMergeConfigItem_Impl::Commit()
Sequence< PropertyValue > aNewValues(4);
PropertyValue* pNewValues = aNewValues.getArray();
pNewValues[0].Name = sNodePath;
- pNewValues[0].Name += C2U(cDataSourceName);
+ pNewValues[0].Name += rtl::OUString::createFromAscii(cDataSourceName);
pNewValues[0].Value <<= aAssignIter->aDBData.sDataSource;
pNewValues[1].Name = sNodePath;
- pNewValues[1].Name += C2U(cDataTableName);
+ pNewValues[1].Name += rtl::OUString::createFromAscii(cDataTableName);
pNewValues[1].Value <<= aAssignIter->aDBData.sCommand;
pNewValues[2].Name = sNodePath;
- pNewValues[2].Name += C2U(cDataCommandType);
+ pNewValues[2].Name += rtl::OUString::createFromAscii(cDataCommandType);
pNewValues[2].Value <<= aAssignIter->aDBData.nCommandType;
pNewValues[3].Name = sNodePath;
- pNewValues[3].Name += C2U(cDBColumnAssignments);
+ pNewValues[3].Name += rtl::OUString::createFromAscii(cDBColumnAssignments);
pNewValues[3].Value <<= aAssignIter->aDBColumnAssignments;
- SetSetProperties(C2U(cAddressDataAssignments), aNewValues);
+ SetSetProperties(rtl::OUString::createFromAscii(cAddressDataAssignments), aNewValues);
}
}
bUserSettingWereOverwritten = sal_False;
}
-/*-- 06.05.2004 13:04:36---------------------------------------------------
- -----------------------------------------------------------------------*/
const Sequence< ::rtl::OUString> SwMailMergeConfigItem_Impl::GetAddressBlocks(
sal_Bool bConvertToConfig) const
{
@@ -675,9 +650,7 @@ const Sequence< ::rtl::OUString> SwMailMergeConfigItem_Impl::GetAddressBlocks(
}
return aRet;
}
-/*-- 06.05.2004 13:04:36---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem_Impl::SetAddressBlocks(
const Sequence< ::rtl::OUString>& rBlocks,
sal_Bool bConvertFromConfig)
@@ -693,9 +666,7 @@ void SwMailMergeConfigItem_Impl::SetAddressBlocks(
nCurrentAddressBlock = 0;
SetModified();
}
-/*-- 30.04.2004 11:04:52---------------------------------------------------
- -----------------------------------------------------------------------*/
const Sequence< ::rtl::OUString> SwMailMergeConfigItem_Impl::GetGreetings(
SwMailMergeConfigItem::Gender eType, sal_Bool bConvertToConfig) const
{
@@ -713,9 +684,7 @@ const Sequence< ::rtl::OUString> SwMailMergeConfigItem_Impl::GetGreetings(
}
return aRet;
}
-/*-- 30.04.2004 11:04:52---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem_Impl::SetGreetings(
SwMailMergeConfigItem::Gender eType,
const Sequence< ::rtl::OUString>& rSetGreetings,
@@ -736,9 +705,7 @@ void SwMailMergeConfigItem_Impl::SetGreetings(
}
SetModified();
}
-/*-- 11.05.2004 13:13:54---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwMailMergeConfigItem_Impl::GetCurrentGreeting(
SwMailMergeConfigItem::Gender eType) const
{
@@ -751,9 +718,7 @@ sal_Int32 SwMailMergeConfigItem_Impl::GetCurrentGreeting(
}
return nRet;
}
-/*-- 11.05.2004 13:13:54---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem_Impl::SetCurrentGreeting(
SwMailMergeConfigItem::Gender eType, sal_Int32 nIndex)
{
@@ -779,9 +744,7 @@ void SwMailMergeConfigItem_Impl::SetCurrentGreeting(
static SwMailMergeConfigItem_Impl* pOptions = NULL;
static sal_Int32 nRefCount = 0;
static ::osl::Mutex aMutex;
-/*-- 15.04.2004 08:42:43---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeConfigItem::SwMailMergeConfigItem() :
m_bAddressInserted(false),
m_bMergeDone(false),
@@ -799,9 +762,7 @@ SwMailMergeConfigItem::SwMailMergeConfigItem() :
++nRefCount;
m_pImpl = pOptions;
}
-/*-- 15.04.2004 08:43:36---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeConfigItem::~SwMailMergeConfigItem()
{
// Global access, must be guarded (multithreading)
@@ -811,46 +772,34 @@ SwMailMergeConfigItem::~SwMailMergeConfigItem()
DELETEZ( pOptions );
}
}
-/*-- 06.05.2004 14:18:10---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::Commit()
{
if(m_pImpl->IsModified())
m_pImpl->Commit();
}
-/*-- 06.05.2004 12:59:50---------------------------------------------------
- -----------------------------------------------------------------------*/
const ResStringArray& SwMailMergeConfigItem::GetDefaultAddressHeaders() const
{
return m_pImpl->m_AddressHeaderSA;
}
-/*-- 27.04.2004 14:34:16---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetAddressBlocks(
const Sequence< ::rtl::OUString>& rBlocks)
{
m_pImpl->SetAddressBlocks(rBlocks);
}
-/*-- 27.04.2004 14:34:16---------------------------------------------------
- -----------------------------------------------------------------------*/
const Sequence< ::rtl::OUString> SwMailMergeConfigItem::GetAddressBlocks() const
{
return m_pImpl->GetAddressBlocks();
}
-/*-- 11.05.2004 17:08:45---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeConfigItem::IsAddressBlock()const
{
return m_pImpl->bIsAddressBlock && IsOutputToLetter();
}
-/*-- 11.05.2004 17:08:46---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetAddressBlock(sal_Bool bSet)
{
m_pImpl->bUserSettingWereOverwritten = sal_False;
@@ -861,16 +810,11 @@ void SwMailMergeConfigItem::SetAddressBlock(sal_Bool bSet)
}
}
-/*-- 30.08.2005 15:09:46---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeConfigItem::IsHideEmptyParagraphs() const
{
return m_pImpl->bIsHideEmptyParagraphs;
}
-/*-- 30.08.2005 15:09:47---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetHideEmptyParagraphs(sal_Bool bSet)
{
if(m_pImpl->bIsHideEmptyParagraphs != bSet)
@@ -879,23 +823,17 @@ void SwMailMergeConfigItem::SetHideEmptyParagraphs(sal_Bool bSet)
m_pImpl->SetModified();
}
}
-/*-- 28.04.2004 13:00:02---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeConfigItem::IsIncludeCountry() const
{
return m_pImpl->bIncludeCountry;
}
-/*-- 28.04.2004 13:00:02---------------------------------------------------
- -----------------------------------------------------------------------*/
rtl::OUString& SwMailMergeConfigItem::GetExcludeCountry() const
{
return m_pImpl->sExcludeCountry;
}
-/*-- 28.04.2004 13:00:02---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetCountrySettings(sal_Bool bSet, const rtl::OUString& rCountry)
{
if(m_pImpl->sExcludeCountry != rCountry ||
@@ -907,9 +845,6 @@ void SwMailMergeConfigItem::SetCountrySettings(sal_Bool bSet, const rtl::OUStrin
}
}
-/*-- 28.04.2004 15:35:16---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetCurrentConnection(
Reference< XDataSource> xSource,
SharedConnection xConnection,
@@ -924,23 +859,17 @@ void SwMailMergeConfigItem::SetCurrentConnection(
m_pImpl->nResultSetCursorPos = 0;
m_pImpl->SetModified();
}
-/*-- 28.04.2004 15:38:11---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XDataSource> SwMailMergeConfigItem::GetSource()
{
return m_pImpl->xSource;
}
-/*-- 28.04.2004 15:38:11---------------------------------------------------
- -----------------------------------------------------------------------*/
SharedConnection SwMailMergeConfigItem::GetConnection()
{
return m_pImpl->xConnection;
}
-/*-- 28.04.2004 15:38:11---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XColumnsSupplier> SwMailMergeConfigItem::GetColumnsSupplier()
{
if(!m_pImpl->xColumnsSupplier.is() && m_pImpl->xConnection.is())
@@ -952,17 +881,12 @@ Reference< XColumnsSupplier> SwMailMergeConfigItem::GetColumnsSupplier()
}
return m_pImpl->xColumnsSupplier;
}
-/*-- 30.04.2004 14:30:55---------------------------------------------------
- -----------------------------------------------------------------------*/
const SwDBData& SwMailMergeConfigItem::GetCurrentDBData() const
{
return m_pImpl->aDBData;
}
-/*-- 17.06.2004 13:18:47---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetCurrentDBData( const SwDBData& rDBData)
{
if(m_pImpl->aDBData != rDBData)
@@ -974,9 +898,7 @@ void SwMailMergeConfigItem::SetCurrentDBData( const SwDBData& rDBData)
m_pImpl->SetModified();
}
}
-/*-- 29.04.2004 11:34:36---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() const
{
if(!m_pImpl->xConnection.is() && m_pImpl->aDBData.sDataSource.getLength())
@@ -1008,7 +930,7 @@ Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() const
}
catch(Exception&)
{
- DBG_ERROR("exception caught in xResultSet->SetFilter()");
+ OSL_ENSURE(false, "exception caught in xResultSet->SetFilter()");
}
xRowSet->execute();
m_pImpl->xResultSet = xRowSet.get();
@@ -1018,14 +940,12 @@ Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() const
}
catch(Exception& )
{
- DBG_ERROR("exception caught in: SwMailMergeConfigItem::GetResultSet() ");
+ OSL_ENSURE(false, "exception caught in: SwMailMergeConfigItem::GetResultSet() ");
}
}
return m_pImpl->xResultSet;
}
-/*-- 13.08.2004 11:49:46---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::DisposeResultSet()
{
m_pImpl->xConnection.clear();
@@ -1034,16 +954,12 @@ void SwMailMergeConfigItem::DisposeResultSet()
::comphelper::disposeComponent( m_pImpl->xResultSet );
}
}
-/*-- 14.05.2004 15:07:55---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString& SwMailMergeConfigItem::GetFilter() const
{
return m_pImpl->sFilter;
}
-/*-- 14.05.2004 15:07:55---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetFilter(::rtl::OUString& rFilter)
{
if(m_pImpl->sFilter != rFilter)
@@ -1062,14 +978,12 @@ void SwMailMergeConfigItem::SetFilter(::rtl::OUString& rFilter)
}
catch(Exception&)
{
- DBG_ERROR("exception caught in SwMailMergeConfigItem::SetFilter()");
+ OSL_ENSURE(false, "exception caught in SwMailMergeConfigItem::SetFilter()");
}
}
}
}
-/*-- 29.04.2004 11:55:38---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwMailMergeConfigItem::MoveResultSet(sal_Int32 nTarget)
{
if(!m_pImpl->xResultSet.is())
@@ -1104,9 +1018,6 @@ sal_Int32 SwMailMergeConfigItem::MoveResultSet(sal_Int32 nTarget)
return m_pImpl->nResultSetCursorPos;
}
-/*-- 27.05.2004 13:56:18---------------------------------------------------
-
- -----------------------------------------------------------------------*/
bool SwMailMergeConfigItem::IsResultSetFirstLast(bool& bIsFirst, bool& bIsLast)
{
bool bRet = false;
@@ -1126,16 +1037,12 @@ bool SwMailMergeConfigItem::IsResultSetFirstLast(bool& bIsFirst, bool& bIsLast)
}
return bRet;
}
-/*-- 29.04.2004 11:55:38---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwMailMergeConfigItem::GetResultSetPosition() const
{
return m_pImpl->nResultSetCursorPos;
}
-/*-- 27.05.2004 14:49:53---------------------------------------------------
- -----------------------------------------------------------------------*/
bool SwMailMergeConfigItem::IsRecordExcluded(sal_Int32 nRecord)
{
bool bRet = false;
@@ -1147,9 +1054,7 @@ bool SwMailMergeConfigItem::IsRecordExcluded(sal_Int32 nRecord)
}
return bRet;
}
-/*-- 27.05.2004 14:49:53---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::ExcludeRecord(sal_Int32 nRecord, bool bExclude)
{
//nRecord is based on 1
@@ -1188,9 +1093,7 @@ void SwMailMergeConfigItem::ExcludeRecord(sal_Int32 nRecord, bool bExclude)
}
}
}
-/*-- 27.05.2004 15:08:35---------------------------------------------------
- -----------------------------------------------------------------------*/
Sequence< Any > SwMailMergeConfigItem::GetSelection() const
{
Sequence< Any > aRet(m_aSelection.getLength());
@@ -1208,17 +1111,13 @@ Sequence< Any > SwMailMergeConfigItem::GetSelection() const
aRet.realloc(nRetIndex);
return aRet;
}
-/*-- 16.06.2004 15:15:56---------------------------------------------------
- -----------------------------------------------------------------------*/
const uno::Sequence< ::rtl::OUString>&
SwMailMergeConfigItem::GetSavedDocuments() const
{
return m_pImpl->aSavedDocuments;
}
-/*-- 16.06.2004 15:15:56---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::AddSavedDocument(::rtl::OUString rName)
{
const ::rtl::OUString* pDocs = m_pImpl->aSavedDocuments.getConstArray();
@@ -1237,16 +1136,12 @@ void SwMailMergeConfigItem::AddSavedDocument(::rtl::OUString rName)
m_pImpl->aSavedDocuments[m_pImpl->aSavedDocuments.getLength() - 1] = rName;
}
}
-/*-- 28.04.2004 16:15:16---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeConfigItem::IsOutputToLetter()const
{
return m_pImpl->bIsOutputToLetter || !IsMailAvailable();
}
-/*-- 28.04.2004 16:15:16---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetOutputToLetter(sal_Bool bSet)
{
if(m_pImpl->bIsOutputToLetter != bSet)
@@ -1255,18 +1150,14 @@ void SwMailMergeConfigItem::SetOutputToLetter(sal_Bool bSet)
m_pImpl->SetModified();
}
}
-/*-- 30.04.2004 10:51:10---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeConfigItem::IsIndividualGreeting(sal_Bool bInEMail) const
{
return bInEMail ?
m_pImpl->bIsIndividualGreetingLineInMail :
m_pImpl->bIsIndividualGreetingLine;
}
-/*-- 30.04.2004 10:51:10---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetIndividualGreeting(
sal_Bool bSet, sal_Bool bInEMail)
{
@@ -1287,16 +1178,12 @@ void SwMailMergeConfigItem::SetIndividualGreeting(
}
}
}
-/*-- 30.04.2004 10:51:10---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeConfigItem::IsGreetingLine(sal_Bool bInEMail) const
{
return bInEMail ? m_pImpl->bIsGreetingLineInMail : m_pImpl->bIsGreetingLine;
}
-/*-- 30.04.2004 10:51:10---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetGreetingLine(sal_Bool bSet, sal_Bool bInEMail)
{
m_pImpl->bUserSettingWereOverwritten = sal_False;
@@ -1317,48 +1204,35 @@ void SwMailMergeConfigItem::SetGreetingLine(sal_Bool bSet, sal_Bool bInEMail
}
}
}
-/*-- 30.04.2004 11:04:52---------------------------------------------------
- -----------------------------------------------------------------------*/
const Sequence< ::rtl::OUString> SwMailMergeConfigItem::GetGreetings(
Gender eType ) const
{
return m_pImpl->GetGreetings(eType);
}
-/*-- 30.04.2004 11:04:52---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetGreetings(
Gender eType, const Sequence< ::rtl::OUString>& rSetGreetings)
{
m_pImpl->SetGreetings( eType, rSetGreetings);
}
-/*-- 11.05.2004 13:10:54---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Int32 SwMailMergeConfigItem::GetCurrentGreeting(
SwMailMergeConfigItem::Gender eType) const
{
return m_pImpl->GetCurrentGreeting(eType);
}
-/*-- 11.05.2004 13:10:55---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetCurrentGreeting(Gender eType, sal_Int32 nIndex)
{
m_pImpl->SetCurrentGreeting(eType, nIndex);
}
-/*-- 12.05.2004 12:29:59---------------------------------------------------
- -----------------------------------------------------------------------*/
const ::rtl::OUString& SwMailMergeConfigItem::GetFemaleGenderValue() const
{
return m_pImpl->sFemaleGenderValue;
}
-/*-- 12.05.2004 12:29:59---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetFemaleGenderValue(const ::rtl::OUString rValue)
{
if( m_pImpl->sFemaleGenderValue != rValue )
@@ -1368,9 +1242,6 @@ void SwMailMergeConfigItem::SetFemaleGenderValue(const ::rtl::OUString rValue)
}
}
-/*-- 30.04.2004 13:25:41---------------------------------------------------
-
- -----------------------------------------------------------------------*/
Sequence< ::rtl::OUString> SwMailMergeConfigItem::GetColumnAssignment(
const SwDBData& rDBData ) const
{
@@ -1387,9 +1258,9 @@ Sequence< ::rtl::OUString> SwMailMergeConfigItem::GetColumnAssignment(
}
return aRet;
}
-/*-- 21.05.2004 12:31:31---------------------------------------------------
- returns the name that is assigned as e-mail column of the current data base
- -----------------------------------------------------------------------*/
+
+
+// returns the name that is assigned as e-mail column of the current data base
::rtl::OUString SwMailMergeConfigItem::GetAssignedColumn(sal_uInt32 nColumn) const
{
::rtl::OUString sRet;
@@ -1400,9 +1271,7 @@ Sequence< ::rtl::OUString> SwMailMergeConfigItem::GetColumnAssignment(
sRet = m_pImpl->m_AddressHeaderSA.GetString(nColumn);
return sRet;
}
-/*-- 30.04.2004 13:25:41---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetColumnAssignment( const SwDBData& rDBData,
const Sequence< ::rtl::OUString>& rList)
{
@@ -1433,9 +1302,6 @@ void SwMailMergeConfigItem::SetColumnAssignment( const SwDBData& rDBData,
m_pImpl->SetModified();
}
-/*-- 07.09.2005 11:50:27---------------------------------------------------
-
- -----------------------------------------------------------------------*/
bool SwMailMergeConfigItem::IsAddressFieldsAssigned() const
{
bool bResult = true;
@@ -1481,9 +1347,7 @@ bool SwMailMergeConfigItem::IsAddressFieldsAssigned() const
}
return bResult;
}
-/*-- 07.09.2005 11:50:27---------------------------------------------------
- -----------------------------------------------------------------------*/
bool SwMailMergeConfigItem::IsGreetingFieldsAssigned() const
{
bool bResult = true;
@@ -1542,16 +1406,12 @@ bool SwMailMergeConfigItem::IsGreetingFieldsAssigned() const
}
return bResult;
}
-/*-- 05.05.2004 16:10:07---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwMailMergeConfigItem::GetMailDisplayName() const
{
return m_pImpl->sMailDisplayName;
}
-/*-- 05.05.2004 16:10:08---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetMailDisplayName(const ::rtl::OUString& rName)
{
if(m_pImpl->sMailDisplayName != rName)
@@ -1560,16 +1420,12 @@ void SwMailMergeConfigItem::SetMailDisplayName(const ::rtl::OUString& rName)
m_pImpl->SetModified();
}
}
-/*-- 05.05.2004 16:10:09---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwMailMergeConfigItem::GetMailAddress() const
{
return m_pImpl->sMailAddress;
}
-/*-- 05.05.2004 16:10:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetMailAddress(const ::rtl::OUString& rAddress)
{
if(m_pImpl->sMailAddress != rAddress )
@@ -1579,16 +1435,11 @@ void SwMailMergeConfigItem::SetMailAddress(const ::rtl::OUString& rAddress)
}
}
-/*-- 07.05.2004 12:40:59---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeConfigItem::IsMailReplyTo() const
{
return m_pImpl->bIsMailReplyTo;
}
-/*-- 07.05.2004 12:40:59---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetMailReplyTo(sal_Bool bSet)
{
if(m_pImpl->bIsMailReplyTo != bSet)
@@ -1597,16 +1448,12 @@ void SwMailMergeConfigItem::SetMailReplyTo(sal_Bool bSet)
m_pImpl->SetModified();
}
}
-/*-- 05.05.2004 16:10:09---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwMailMergeConfigItem::GetMailReplyTo() const
{
return m_pImpl->sMailReplyTo;
}
-/*-- 05.05.2004 16:10:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetMailReplyTo(const ::rtl::OUString& rReplyTo)
{
if(m_pImpl->sMailReplyTo != rReplyTo)
@@ -1615,16 +1462,12 @@ void SwMailMergeConfigItem::SetMailReplyTo(const ::rtl::OUString& rReplyTo)
m_pImpl->SetModified();
}
}
-/*-- 05.05.2004 16:10:09---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwMailMergeConfigItem::GetMailServer() const
{
return m_pImpl->sMailServer;
}
-/*-- 05.05.2004 16:10:10---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetMailServer(const ::rtl::OUString& rAddress)
{
if(m_pImpl->sMailServer != rAddress)
@@ -1633,18 +1476,14 @@ void SwMailMergeConfigItem::SetMailServer(const ::rtl::OUString& rAddress)
m_pImpl->SetModified();
}
}
-/*-- 05.05.2004 16:10:10---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int16 SwMailMergeConfigItem::GetMailPort() const
{
return m_pImpl->bIsDefaultPort ?
(m_pImpl->bIsSecureConnection ? SECURE_PORT : DEFAULT_PORT) :
m_pImpl->nMailPort;
}
-/*-- 05.05.2004 16:10:10---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetMailPort(sal_Int16 nSet)
{
if(m_pImpl->nMailPort != nSet || m_pImpl->bIsDefaultPort)
@@ -1654,16 +1493,12 @@ void SwMailMergeConfigItem::SetMailPort(sal_Int16 nSet)
m_pImpl->SetModified();
}
}
-/*-- 05.05.2004 16:10:11---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeConfigItem::IsSecureConnection() const
{
return m_pImpl->bIsSecureConnection;
}
-/*-- 05.05.2004 16:10:12---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetSecureConnection(sal_Bool bSet)
{
if(m_pImpl->bIsSecureConnection != bSet)
@@ -1672,16 +1507,12 @@ void SwMailMergeConfigItem::SetSecureConnection(sal_Bool bSet)
m_pImpl->SetModified();
}
}
-/*-- 05.05.2004 16:10:12---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeConfigItem::IsAuthentication() const
{
return m_pImpl->bIsAuthentication;
}
-/*-- 05.05.2004 16:10:13---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetAuthentication(sal_Bool bSet)
{
if(m_pImpl->bIsAuthentication != bSet)
@@ -1690,16 +1521,12 @@ void SwMailMergeConfigItem::SetAuthentication(sal_Bool bSet)
m_pImpl->SetModified();
}
}
-/*-- 05.05.2004 16:10:13---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwMailMergeConfigItem::GetMailUserName() const
{
return m_pImpl->sMailUserName;
}
-/*-- 05.05.2004 16:10:13---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetMailUserName(const ::rtl::OUString& rName)
{
if(m_pImpl->sMailUserName != rName)
@@ -1708,16 +1535,12 @@ void SwMailMergeConfigItem::SetMailUserName(const ::rtl::OUString& rName)
m_pImpl->SetModified();
}
}
-/*-- 05.05.2004 16:10:14---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwMailMergeConfigItem::GetMailPassword() const
{
return m_pImpl->sMailPassword;
}
-/*-- 05.05.2004 16:10:14---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetMailPassword(const ::rtl::OUString& rPassword)
{
if(m_pImpl->sMailPassword != rPassword)
@@ -1726,16 +1549,12 @@ void SwMailMergeConfigItem::SetMailPassword(const ::rtl::OUString& rPassword)
m_pImpl->SetModified();
}
}
-/*-- 19.08.2004 14:44:57---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeConfigItem::IsSMTPAfterPOP() const
{
return m_pImpl->bIsSMPTAfterPOP;
}
-/*-- 19.08.2004 14:44:57---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetSMTPAfterPOP(sal_Bool bSet)
{
if( m_pImpl->bIsSMPTAfterPOP != bSet)
@@ -1744,16 +1563,12 @@ void SwMailMergeConfigItem::SetSMTPAfterPOP(sal_Bool bSet)
m_pImpl->SetModified();
}
}
-/*-- 19.08.2004 14:44:57---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwMailMergeConfigItem::GetInServerName() const
{
return m_pImpl->sInServerName;
}
-/*-- 19.08.2004 14:44:57---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetInServerName(const ::rtl::OUString& rServer)
{
if(m_pImpl->sInServerName != rServer)
@@ -1762,16 +1577,12 @@ void SwMailMergeConfigItem::SetInServerName(const ::rtl::OUString& rServer)
m_pImpl->SetModified();
}
}
-/*-- 19.08.2004 14:44:58---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int16 SwMailMergeConfigItem::GetInServerPort() const
{
return m_pImpl->nInServerPort;
}
-/*-- 19.08.2004 14:44:58---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetInServerPort(sal_Int16 nSet)
{
if( m_pImpl->nInServerPort != nSet)
@@ -1780,16 +1591,12 @@ void SwMailMergeConfigItem::SetInServerPort(sal_Int16 nSet)
m_pImpl->SetModified();
}
}
-/*-- 20.08.2004 08:52:48---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeConfigItem::IsInServerPOP() const
{
return m_pImpl->bInServerPOP;
}
-/*-- 20.08.2004 08:52:49---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetInServerPOP(sal_Bool bSet)
{
if( m_pImpl->bInServerPOP != bSet)
@@ -1798,16 +1605,12 @@ void SwMailMergeConfigItem::SetInServerPOP(sal_Bool bSet)
m_pImpl->SetModified();
}
}
-/*-- 19.08.2004 14:44:58---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwMailMergeConfigItem::GetInServerUserName() const
{
return m_pImpl->sInServerUserName;
}
-/*-- 19.08.2004 14:44:58---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetInServerUserName(const ::rtl::OUString& rName)
{
if( m_pImpl->sInServerUserName != rName)
@@ -1816,16 +1619,12 @@ void SwMailMergeConfigItem::SetInServerUserName(const ::rtl::OUString& rName)
m_pImpl->SetModified();
}
}
-/*-- 19.08.2004 14:44:59---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwMailMergeConfigItem::GetInServerPassword() const
{
return m_pImpl->sInServerPassword;
}
-/*-- 19.08.2004 14:45:00---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetInServerPassword(const ::rtl::OUString& rPassword)
{
if(m_pImpl->sInServerPassword != rPassword)
@@ -1835,9 +1634,6 @@ void SwMailMergeConfigItem::SetInServerPassword(const ::rtl::OUString& rPassword
}
}
-/*-- 02.09.2004 14:43:27---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::DocumentReloaded()
{
m_bMergeDone = false;
@@ -1845,38 +1641,28 @@ void SwMailMergeConfigItem::DocumentReloaded()
m_bAddressInserted = false;
m_rAddressBlockFrame = ::rtl::OUString();
}
-/*-- 16.06.2004 12:24:18---------------------------------------------------
- -----------------------------------------------------------------------*/
bool SwMailMergeConfigItem::IsMailAvailable() const
{
return m_pImpl->bIsEMailSupported;
}
-/*-- 21.05.2004 12:20:05---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::AddMergedDocument(SwDocMergeInfo& rInfo)
{
m_pImpl->aMergeInfos.push_back(rInfo);
}
-/*-- 21.05.2004 12:20:05---------------------------------------------------
- -----------------------------------------------------------------------*/
SwDocMergeInfo& SwMailMergeConfigItem::GetDocumentMergeInfo(sal_uInt32 nDocument)
{
- DBG_ASSERT(m_pImpl->aMergeInfos.size() > nDocument,"invalid document index");
+ OSL_ENSURE(m_pImpl->aMergeInfos.size() > nDocument,"invalid document index");
return m_pImpl->aMergeInfos[nDocument];
}
-/*-- 14.06.2004 11:46:26---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_uInt32 SwMailMergeConfigItem::GetMergedDocumentCount() const
{
return m_pImpl->aMergeInfos.size();
}
-/*-- 11.06.2004 10:38:39---------------------------------------------------
- -----------------------------------------------------------------------*/
SwView* lcl_ExistsView(SwView* pView)
{
const TypeId aType(TYPE(SwView));
@@ -1890,9 +1676,7 @@ SwView* lcl_ExistsView(SwView* pView)
}
return 0;
}
-/*-- 16.06.2004 15:02:35---------------------------------------------------
- -----------------------------------------------------------------------*/
SwView* SwMailMergeConfigItem::GetTargetView()
{
//make sure that the pointer is really valid - the document may have been closed manually
@@ -1902,9 +1686,7 @@ SwView* SwMailMergeConfigItem::GetTargetView()
}
return m_pTargetView;
}
-/*-- 02.09.2004 17:04:11---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetTargetView(SwView* pView)
{
m_pTargetView = pView;
@@ -1914,17 +1696,13 @@ void SwMailMergeConfigItem::SetTargetView(SwView* pView)
m_pImpl->aMergeInfos.clear();
}
}
-/*-- 16.06.2004 15:02:35---------------------------------------------------
- -----------------------------------------------------------------------*/
SwView* SwMailMergeConfigItem::GetSourceView()
{
m_pSourceView = lcl_ExistsView(m_pSourceView);
return m_pSourceView;
}
-/*-- 04.11.2004 19:53 ---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetSourceView(SwView* pView)
{
m_pSourceView = pView;
@@ -1970,17 +1748,14 @@ void SwMailMergeConfigItem::SetSourceView(SwView* pView)
}
}
-/*-- 13.03.2006 12:15:06---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwMailMergeConfigItem::SetCurrentAddressBlockIndex( sal_Int32 nSet )
{
m_pImpl->SetCurrentAddressBlockIndex( nSet );
}
-/*-- 13.03.2006 12:15:07---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwMailMergeConfigItem::GetCurrentAddressBlockIndex() const
{
return m_pImpl->GetCurrentAddressBlockIndex();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index 5aa9e7032568..06ec019efd12 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,9 +41,7 @@
#include <sfx2/docfac.hxx>
#include <vcl/msgbox.hxx>
#include <view.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <mmdocselectpage.hxx>
#include <mailmergewizard.hxx>
#include <shellio.hxx>
@@ -61,9 +60,6 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace svt;
-/*-- 02.04.2004 09:40:14---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwMailMergeDocSelectPage::SwMailMergeDocSelectPage( SwMailMergeWizard* _pParent ) :
svt::OWizardPage(_pParent, SW_RES(DLG_MM_DOCSELECT_PAGE)),
#ifdef MSC
@@ -114,16 +110,10 @@ SwMailMergeDocSelectPage::SwMailMergeDocSelectPage( SwMailMergeWizard* _pParent
}
}
-/*-- 02.04.2004 09:40:14---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwMailMergeDocSelectPage::~SwMailMergeDocSelectPage()
{
}
-/*-- 05.04.2004 14:21:48---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeDocSelectPage, DocSelectHdl, RadioButton*, pButton)
{
m_aRecentDocLB.Enable(&m_aRecentDocRB == pButton);
@@ -133,9 +123,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, DocSelectHdl, RadioButton*, pButton)
return 0;
}
-/*-- 05.04.2004 14:25:12---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton)
{
bool bTemplate = &m_aBrowseTemplatePB == pButton;
@@ -144,7 +132,6 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton)
{
m_aLoadTemplateRB.Check();
SfxNewFileDialog* pNewFileDlg = new SfxNewFileDialog(this, 0);
- //pNewFileDlg->SetTemplateFlags(nFlags);
sal_uInt16 nRet = pNewFileDlg->Execute();
if(RET_TEMPLATE_LOAD == nRet)
bTemplate = false;
@@ -194,9 +181,6 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton)
return 0;
}
-/*-- 06.04.2004 12:52:24---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeDocSelectPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
sal_Bool bReturn = sal_False;
@@ -222,3 +206,5 @@ sal_Bool SwMailMergeDocSelectPage::commitPage( ::svt::WizardTypes::CommitPageRea
}
return bReturn;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx
index 6483025f88ed..76ced703a4ac 100644
--- a/sw/source/ui/dbui/mmdocselectpage.hxx
+++ b/sw/source/ui/dbui/mmdocselectpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,14 +31,10 @@
#include <svtools/wizardmachine.hxx>
#include <mailmergehelper.hxx>
#include <vcl/lstbox.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <svtools/stdctrl.hxx>
class SwMailMergeWizard;
-/*-- 02.04.2004 09:21:06---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergeDocSelectPage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
@@ -72,3 +69,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 807d52a95f77..01727d5098f7 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,7 +48,7 @@
using namespace svt;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-// -----------------------------------------------------------------------
+
void lcl_FillGreetingsBox(ListBox& rBox,
SwMailMergeConfigItem& rConfig,
SwMailMergeConfigItem::Gender eType)
@@ -57,7 +58,7 @@ void lcl_FillGreetingsBox(ListBox& rBox,
rBox.InsertEntry(rEntries[nEntry]);
rBox.SelectEntryPos((sal_uInt16)rConfig.GetCurrentGreeting(eType));
}
-// -----------------------------------------------------------------------
+
void lcl_FillGreetingsBox(ComboBox& rBox,
SwMailMergeConfigItem& rConfig,
SwMailMergeConfigItem::Gender eType)
@@ -67,7 +68,7 @@ void lcl_FillGreetingsBox(ComboBox& rBox,
rBox.InsertEntry(rEntries[nEntry]);
rBox.SelectEntryPos((sal_uInt16)rConfig.GetCurrentGreeting(eType));
}
-// -----------------------------------------------------------------------
+
void lcl_StoreGreetingsBox(ListBox& rBox,
SwMailMergeConfigItem& rConfig,
SwMailMergeConfigItem::Gender eType)
@@ -79,7 +80,7 @@ void lcl_StoreGreetingsBox(ListBox& rBox,
rConfig.SetGreetings(eType, aEntries);
rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos());
}
-// -----------------------------------------------------------------------
+
void lcl_StoreGreetingsBox(ComboBox& rBox,
SwMailMergeConfigItem& rConfig,
SwMailMergeConfigItem::Gender eType)
@@ -91,9 +92,7 @@ void lcl_StoreGreetingsBox(ComboBox& rBox,
rConfig.SetGreetings(eType, aEntries);
rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos());
}
-/*-- 30.04.2004 10:42:57---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwGreetingsHandler, IndividualHdl_Impl, CheckBox*, EMPTYARG)
{
sal_Bool bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked();
@@ -118,9 +117,7 @@ IMPL_LINK(SwGreetingsHandler, IndividualHdl_Impl, CheckBox*, EMPTYARG)
UpdatePreview();
return 0;
}
-/*-- 30.04.2004 10:42:57---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwGreetingsHandler, GreetingHdl_Impl, PushButton*, pButton)
{
SwCustomizeAddressBlockDialog* pDlg =
@@ -142,16 +139,12 @@ IMPL_LINK(SwGreetingsHandler, GreetingHdl_Impl, PushButton*, pButton)
delete pDlg;
return 0;
}
-/*-- 16.06.2004 10:56:21---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwGreetingsHandler::UpdatePreview()
{
//the base class does nothing
}
-/*-- 30.04.2004 10:42:59---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeGreetingsPage, AssignHdl_Impl, PushButton*, pButton)
{
String sPreview = m_aFemaleLB.GetSelectEntry();
@@ -168,17 +161,13 @@ IMPL_LINK(SwMailMergeGreetingsPage, AssignHdl_Impl, PushButton*, pButton)
delete pDlg;
return 0;
}
-/*-- 05.05.2004 15:25:56---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeGreetingsPage, GreetingSelectHdl_Impl, ListBox*, EMPTYARG)
{
UpdatePreview();
return 0;
}
-/*-- 05.05.2004 15:23:43---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeGreetingsPage::UpdatePreview()
{
//find out which type of greeting should be selected:
@@ -221,7 +210,7 @@ void SwMailMergeGreetingsPage::UpdatePreview()
}
catch( sdbc::SQLException& )
{
- DBG_ERROR("SQLException caught");
+ OSL_ENSURE(false, "SQLException caught");
}
}
}
@@ -233,9 +222,7 @@ void SwMailMergeGreetingsPage::UpdatePreview()
sPreview = SwAddressPreview::FillData(sPreview, m_pWizard->GetConfigItem());
m_aPreviewWIN.SetAddress(sPreview);
}
-/*-- 17.05.2004 15:44:53---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwGreetingsHandler::Contains(sal_Bool bContainsGreeting)
{
m_pPersonalizedCB->Enable(bContainsGreeting);
@@ -255,9 +242,7 @@ void SwGreetingsHandler::Contains(sal_Bool bContainsGreeting)
m_pNeutralFT->Enable(bContainsGreeting);
m_pNeutralCB->Enable(bContainsGreeting);
}
-/*-- 02.04.2004 14:17:52---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeGreetingsPage::SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent) :
svt::OWizardPage(_pParent, SW_RES(DLG_MM_GREETINGS_PAGE)),
#ifdef MSC
@@ -353,15 +338,11 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent)
sTemp.SearchAndReplaceAscii("%1", String::CreateFromInt32(1));
m_aDocumentIndexFI.SetText(sTemp);
}
-/*-- 02.04.2004 14:17:52---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeGreetingsPage::~SwMailMergeGreetingsPage()
{
}
-/*-- 18.06.2004 12:13:53---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeGreetingsPage::ActivatePage()
{
SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem();
@@ -387,9 +368,7 @@ void SwMailMergeGreetingsPage::ActivatePage()
UpdatePreview();
m_pWizard->enableButtons(WZB_NEXT, m_pWizard->isStateEnabled(MM_PREPAREMERGEPAGE));
}
-/*-- 11.05.2004 14:47:10---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason )
{
SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem();
@@ -421,9 +400,7 @@ sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPage
rConfig.SetIndividualGreeting(m_aPersonalizedCB.IsChecked(), sal_False);
return sal_True;
}
-/*-- 30.04.2004 10:42:57---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeGreetingsPage, ContainsHdl_Impl, CheckBox*, pBox)
{
sal_Bool bContainsGreeting = pBox->IsChecked();
@@ -439,9 +416,7 @@ IMPL_LINK(SwMailMergeGreetingsPage, ContainsHdl_Impl, CheckBox*, pBox)
m_pWizard->UpdateRoadmap();
return 0;
}
-/*-- 07.05.2004 12:56:42---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, ImageButton*, pButton)
{
//if no pButton is given, the first set has to be pre-set
@@ -473,9 +448,7 @@ IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, ImageButton*, pButton)
m_aDocumentIndexFI.SetText(sTemp);
return 0;
}
-/*-- 17.05.2004 15:11:19---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailBodyDialog::SwMailBodyDialog(Window* pParent, SwMailMergeWizard* _pWizard) :
SfxModalDialog(pParent, SW_RES(DLG_MM_MAILBODY)),
#ifdef MSC
@@ -570,25 +543,18 @@ SwMailBodyDialog::SwMailBodyDialog(Window* pParent, SwMailMergeWizard* _pWizard)
m_aFemaleFieldCB.SetText(rConfig.GetFemaleGenderValue());
m_aFemaleFieldCB.SaveValue();
}
-/*-- 17.05.2004 15:13:07---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailBodyDialog::~SwMailBodyDialog()
{
}
-/*-- 30.04.2004 10:42:57---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailBodyDialog, ContainsHdl_Impl, CheckBox*, pBox)
{
SwGreetingsHandler::Contains(pBox->IsChecked());
m_pWizard->GetConfigItem().SetGreetingLine(pBox->IsChecked(), sal_True);
return 0;
}
-/*-- 28.06.2004 11:22:42---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailBodyDialog, OKHdl, PushButton*, EMPTYARG)
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
@@ -617,3 +583,4 @@ IMPL_LINK(SwMailBodyDialog, OKHdl, PushButton*, EMPTYARG)
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx
index 3e237d797e2f..d0376ca72649 100644
--- a/sw/source/ui/dbui/mmgreetingspage.hxx
+++ b/sw/source/ui/dbui/mmgreetingspage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include <svtools/wizardmachine.hxx>
#include <sfx2/basedlgs.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <vcl/lstbox.hxx>
#include <vcl/combobox.hxx>
#include <svtools/stdctrl.hxx>
@@ -39,9 +38,7 @@
#include <svtools/svmedit.hxx>
class SwMailMergeWizard;
-/*-- 17.05.2004 14:51:45---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwGreetingsHandler
{
friend class SwMailBodyDialog;
@@ -77,9 +74,7 @@ class SwGreetingsHandler
void Contains(sal_Bool bContainsGreeting);
virtual void UpdatePreview();
};
-/*-- 02.04.2004 09:21:06---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergeGreetingsPage : public svt::OWizardPage,
public SwGreetingsHandler
{
@@ -128,9 +123,7 @@ public:
~SwMailMergeGreetingsPage();
};
-/*-- 17.05.2004 14:45:43---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailBodyDialog : public SfxModalDialog, public SwGreetingsHandler
{
CheckBox m_aGreetingLineCB;
@@ -174,3 +167,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 0ef952079635..bbd2d33cca55 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,9 +85,6 @@ using namespace ::com::sun::star::view;
#define DEFAULT_ADDRESS_WIDTH (MM50*15)// 7,5 cm
#define DEFAULT_ADDRESS_HEIGHT (MM50*7) // 3,5cm
-/*-- 15.04.2004 08:16:35---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) :
svt::OWizardPage( _pParent, SW_RES(DLG_MM_LAYOUT_PAGE)),
#ifdef MSC
@@ -179,18 +177,14 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) :
m_aAlignToBodyCB.SetClickHdl(LINK(this, SwMailMergeLayoutPage, AlignToTextHdl_Impl));
m_aAlignToBodyCB.Check();
}
-/*-- 15.04.2004 08:17:11---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeLayoutPage::~SwMailMergeLayoutPage()
{
delete m_pExampleFrame;
File::remove( m_sExampleURL );
}
-/*-- 27.05.2004 13:41:04---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeLayoutPage::ActivatePage()
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
@@ -251,9 +245,7 @@ void SwMailMergeLayoutPage::ActivatePage()
}
}
-/*-- 11.05.2004 10:41:26---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwMailMergeLayoutPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
//now insert the frame and the greeting
@@ -270,9 +262,7 @@ sal_Bool SwMailMergeLayoutPage::commitPage( ::svt::WizardTypes::CommitPageReason
}
return sal_True;
}
-/*-- 24.06.2004 09:50:26---------------------------------------------------
- -----------------------------------------------------------------------*/
SwFrmFmt* SwMailMergeLayoutPage::InsertAddressAndGreeting(SwView* pView,
SwMailMergeConfigItem& rConfigItem,
const Point& rAddressPosition,
@@ -300,9 +290,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressAndGreeting(SwView* pView,
pView->GetWrtShell().EndUndo(UNDO_INSERT);
return pAddressBlockFormat;
}
-/*-- 11.05.2004 12:49:04---------------------------------------------------
- -----------------------------------------------------------------------*/
SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame(
SwWrtShell& rShell,
SwMailMergeConfigItem& rConfigItem,
@@ -332,7 +320,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame(
rShell.NewFlyFrm(aSet, sal_True );
SwFrmFmt* pRet = rShell.GetFlyFrmFmt();
- ASSERT( pRet, "Fly not inserted" );
+ OSL_ENSURE( pRet, "Fly not inserted" );
rShell.UnSelectFrm();
const Sequence< ::rtl::OUString> aBlocks = rConfigItem.GetAddressBlocks();
@@ -458,9 +446,6 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame(
return pRet;
}
-/*-- 12.05.2004 12:20:19---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfigItem& rConfigItem, bool bExample)
{
//set the cursor to the desired position - if no text content is here then
@@ -497,7 +482,6 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
rShell.MovePara(GetfnParaCurr(), GetfnParaStart());
}
bool bSplitNode = rShell.GetText().Len() > 0;
-// rShell.SetTxtFmtColl( rShell.GetTxtCollFromPool( RES_POOLCOLL_GREETING ) );
sal_Int32 nMoves = rConfigItem.GetGreetingMoves();
if( !bExample && 0 != nMoves )
{
@@ -578,7 +562,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
// Female: [database.sGenderColumn] != "rFemaleGenderValue" && [database.NameColumn]
// Male: [database.sGenderColumn] == "rFemaleGenderValue" && [database.rGenderColumn]
// Neutral: [database.sNameColumn]
- DBG_ASSERT(sGenderColumn.Len() && rFemaleGenderValue.getLength(),
+ OSL_ENSURE(sGenderColumn.Len() && rFemaleGenderValue.getLength(),
"gender settings not available - how to form the condition?");
//column used as lastname
for(sal_Int8 eGender = SwMailMergeConfigItem::FEMALE;
@@ -687,11 +671,9 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
//put the cursor to the start of the paragraph
rShell.SttPara();
- DBG_ASSERT(0 == rShell.GetTableFmt(), "What to do with a table here?");
+ OSL_ENSURE(0 == rShell.GetTableFmt(), "What to do with a table here?");
}
-/*-- 10.05.2004 09:34:25---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, void*, EMPTYARG)
{
m_aExampleWIN.Show( sal_True );
@@ -705,7 +687,7 @@ IMPL_LINK(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, void*, EMPTYARG)
SwXTextDocument* pXDoc = reinterpret_cast<SwXTextDocument*>(xDocTunnel->getSomething(SwXTextDocument::getUnoTunnelId()));
SwDocShell* pDocShell = pXDoc->GetDocShell();
m_pExampleWrtShell = pDocShell->GetWrtShell();
- DBG_ASSERT(m_pExampleWrtShell, "No SwWrtShell found!");
+ OSL_ENSURE(m_pExampleWrtShell, "No SwWrtShell found!");
if(!m_pExampleWrtShell)
return 0;
@@ -725,19 +707,15 @@ IMPL_LINK(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, void*, EMPTYARG)
Any aZoom;
aZoom <<= (sal_Int16)DocumentZoomType::ENTIRE_PAGE;
- m_xViewProperties->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom);
+ m_xViewProperties->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom);
-
-// m_pExampleWrtShell->SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_STANDARD ) );
const SwFmtFrmSize& rPageSize = m_pExampleWrtShell->GetPageDesc(
m_pExampleWrtShell->GetCurPageDesc()).GetMaster().GetFrmSize();
m_aLeftMF.SetMax(rPageSize.GetWidth() - DEFAULT_LEFT_DISTANCE);
m_aTopMF.SetMax(rPageSize.GetHeight() - DEFAULT_TOP_DISTANCE);
return 0;
}
-/*-- 10.05.2004 14:05:24---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeLayoutPage, ZoomHdl_Impl, ListBox*, pBox)
{
if(m_pExampleWrtShell)
@@ -753,18 +731,14 @@ IMPL_LINK(SwMailMergeLayoutPage, ZoomHdl_Impl, ListBox*, pBox)
}
Any aZoom;
aZoom <<= eType;
- m_xViewProperties->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom);
+ m_xViewProperties->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom);
aZoom <<= nZoom;
- m_xViewProperties->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)), aZoom);
+ m_xViewProperties->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)), aZoom);
}
return 0;
}
-
-/*-- 10.05.2004 15:56:51---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeLayoutPage, ChangeAddressHdl_Impl, MetricField*, EMPTYARG)
{
if(m_pExampleWrtShell && m_pAddressBlockFormat)
@@ -786,9 +760,6 @@ IMPL_LINK(SwMailMergeLayoutPage, ChangeAddressHdl_Impl, MetricField*, EMPTYARG)
return 0;
}
-/*-- 10.05.2004 16:13:36---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeLayoutPage, GreetingsHdl_Impl, PushButton*, pButton)
{
bool bDown = pButton == &m_aDownPB;
@@ -803,9 +774,7 @@ IMPL_LINK(SwMailMergeLayoutPage, GreetingsHdl_Impl, PushButton*, pButton)
return 0;
}
-/*-- 15.07.2004 16:05:30---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeLayoutPage, AlignToTextHdl_Impl, CheckBox*, pBox)
{
sal_Bool bCheck = pBox->IsChecked() && pBox->IsEnabled();
@@ -814,3 +783,5 @@ IMPL_LINK(SwMailMergeLayoutPage, AlignToTextHdl_Impl, CheckBox*, pBox)
ChangeAddressHdl_Impl( 0 );
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx
index b7dd9dfab2e6..b3191f04da64 100644
--- a/sw/source/ui/dbui/mmlayoutpage.hxx
+++ b/sw/source/ui/dbui/mmlayoutpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include <svtools/wizardmachine.hxx>
#include <mailmergehelper.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <svtools/stdctrl.hxx>
#include <vcl/field.hxx>
#include <vcl/lstbox.hxx>
@@ -44,9 +43,7 @@ class SwWrtShell;
class SwView;
namespace com{ namespace sun{ namespace star{ namespace beans{ class XPropertySet;}}}}
-/*-- 02.04.2004 09:21:06---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergeLayoutPage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
@@ -112,3 +109,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmmergepage.cxx b/sw/source/ui/dbui/mmmergepage.cxx
index bb58496effd3..442380f0a484 100644
--- a/sw/source/ui/dbui/mmmergepage.cxx
+++ b/sw/source/ui/dbui/mmmergepage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,9 +35,7 @@
#include <mailmergewizard.hxx>
#include <mmconfigitem.hxx>
#include <swtypes.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <dbui.hrc>
#include <mmmergepage.hrc>
#include <svl/srchitem.hxx>
@@ -44,9 +43,6 @@
#include <svl/eitem.hxx>
#include <swabstdlg.hxx>
-/*-- 02.04.2004 16:38:45---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwMailMergeMergePage::SwMailMergeMergePage( SwMailMergeWizard* _pParent) :
svt::OWizardPage(_pParent, SW_RES(DLG_MM_MERGE_PAGE)),
#ifdef MSC
@@ -77,24 +73,18 @@ SwMailMergeMergePage::SwMailMergeMergePage( SwMailMergeWizard* _pParent) :
m_aFindED.SetReturnActionLink( LINK(this, SwMailMergeMergePage, EnteredFindStringHdl_Impl ));
}
-/*-- 02.04.2004 16:38:45---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeMergePage::~SwMailMergeMergePage()
{
}
-/*-- 25.05.2004 16:14:49---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwMailMergeMergePage, EditDocumentHdl_Impl, PushButton*, EMPTYARG)
{
m_pWizard->SetRestartPage(MM_MERGEPAGE);
m_pWizard->EndDialog(RET_EDIT_RESULT_DOC);
return 0;
}
-/*-- 25.05.2004 16:14:49---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwMailMergeMergePage, FindHdl_Impl, PushButton*, EMPTYARG)
{
SvxSearchItem aSearchItem( SID_SEARCH_ITEM );
@@ -107,7 +97,7 @@ IMPL_LINK( SwMailMergeMergePage, FindHdl_Impl, PushButton*, EMPTYARG)
aSearchItem.SetBackward(m_aBackwardsCB.IsChecked());
SwView* pTargetView = m_pWizard->GetConfigItem().GetTargetView();
- DBG_ASSERT(pTargetView, "no target view exists");
+ OSL_ENSURE(pTargetView, "no target view exists");
if(pTargetView)
{
pTargetView->GetViewFrame()->GetDispatcher()->Execute(
@@ -116,8 +106,11 @@ IMPL_LINK( SwMailMergeMergePage, FindHdl_Impl, PushButton*, EMPTYARG)
return 0;
}
+
IMPL_LINK( SwMailMergeMergePage, EnteredFindStringHdl_Impl, void*, EMPTYARG )
{
m_aFindPB.GetClickHdl().Call( &m_aFindPB );
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmmergepage.hxx b/sw/source/ui/dbui/mmmergepage.hxx
index ad3d51260bb2..03a644c6fcdd 100644
--- a/sw/source/ui/dbui/mmmergepage.hxx
+++ b/sw/source/ui/dbui/mmmergepage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,17 +29,13 @@
#define _MAILMERGEMERGEPAGE_HXX
#include <svtools/wizardmachine.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <vcl/edit.hxx>
#include <svtools/stdctrl.hxx>
#include <mailmergehelper.hxx>
#include <actctrl.hxx>
class SwMailMergeWizard;
-/*-- 02.04.2004 09:21:06---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergeMergePage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
@@ -71,3 +68,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 3bfc22da0310..a44021ed7419 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,16 +38,10 @@
#include <mailconfigpage.hxx>
#include <cmdid.h>
#include <swtypes.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
-#ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED
#include <IDocumentDeviceAccess.hxx>
-#endif
#include <hintids.hxx>
#include <editeng/scripttypeitem.hxx>
#include <editeng/langitem.hxx>
@@ -61,31 +56,18 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
-//#ifndef _SFX_DOCFILT_HACK_HXX
-//#include <sfx2/docfilt.hxx>
-//#endif
#include <tools/urlobj.hxx>
#include <svl/urihelper.hxx>
-#ifndef _VCL_PRINT_HXX
#include <vcl/print.hxx>
-#endif
#include <unotools/tempfile.hxx>
#include <osl/file.hxx>
#include <mmgreetingspage.hxx>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdb/XColumn.hpp>
-//#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
-//#include <com/sun/star/beans/PropertyValue.hpp>
-//#endif
-//#ifndef _BASEDLGS_HXX
-//#include <sfx2/basedlgs.hxx>
-//#endif
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <swunohelper.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <shellio.hxx>
#include <svtools/htmlcfg.hxx>
#include <sfx2/event.hxx>
@@ -102,9 +84,6 @@ using namespace svt;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-/*-- 01.07.2004 16:47:49---------------------------------------------------
-
- -----------------------------------------------------------------------*/
String lcl_GetExtensionForDocType(sal_uLong nDocType)
{
String sExtension;
@@ -118,9 +97,7 @@ String lcl_GetExtensionForDocType(sal_uLong nDocType)
}
return sExtension;
}
-/*-- 28.06.2004 11:49:21---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString lcl_GetColumnValueOf(const ::rtl::OUString& rColumn, Reference < container::XNameAccess>& rxColAccess )
{
::rtl::OUString sRet;
@@ -134,9 +111,7 @@ String lcl_GetExtensionForDocType(sal_uLong nDocType)
}
return sRet;
}
-/*-- 21.06.2004 14:01:13---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwSaveWarningBox_Impl : public ModalDialog
{
FixedImage aWarningImageIM;
@@ -156,9 +131,7 @@ public:
String GetFileName() const {return aFileNameED.GetText();}
};
-/*-- 02.07.2004 08:54:42---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwSendQueryBox_Impl : public ModalDialog
{
FixedImage aQueryImageIM;
@@ -190,9 +163,6 @@ public:
}
};
-/*-- 21.06.2004 14:11:58---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwSaveWarningBox_Impl::SwSaveWarningBox_Impl(Window* pParent, const String& rFileName) :
ModalDialog(pParent, SW_RES( DLG_MM_SAVEWARNING )),
aWarningImageIM(this, SW_RES( IM_WARNING )),
@@ -209,23 +179,17 @@ SwSaveWarningBox_Impl::SwSaveWarningBox_Impl(Window* pParent, const String& rFil
aFileNameED.SetModifyHdl(LINK(this, SwSaveWarningBox_Impl, ModifyHdl));
ModifyHdl( &aFileNameED );
}
-/*-- 21.06.2004 14:11:58---------------------------------------------------
- -----------------------------------------------------------------------*/
SwSaveWarningBox_Impl::~SwSaveWarningBox_Impl()
{
}
-/*-- 21.06.2004 14:11:58---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwSaveWarningBox_Impl, ModifyHdl, Edit*, pEdit)
{
aOKPB.Enable(pEdit->GetText().Len() > 0);
return 0;
}
-/*-- 02.07.2004 09:02:53---------------------------------------------------
- -----------------------------------------------------------------------*/
SwSendQueryBox_Impl::SwSendQueryBox_Impl(Window* pParent, const String& rText) :
ModalDialog(pParent, SW_RES( DLG_MM_QUERY )),
aQueryImageIM( this, SW_RES( IM_QUERY )),
@@ -242,24 +206,17 @@ SwSendQueryBox_Impl::SwSendQueryBox_Impl(Window* pParent, const String& rText) :
aTextED.SetModifyHdl(LINK(this, SwSendQueryBox_Impl, ModifyHdl));
ModifyHdl( &aTextED );
}
-/*-- 02.07.2004 08:58:45---------------------------------------------------
- -----------------------------------------------------------------------*/
SwSendQueryBox_Impl::~SwSendQueryBox_Impl()
{
}
-/*-- 02.07.2004 08:58:25---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwSendQueryBox_Impl, ModifyHdl, Edit*, pEdit)
{
aOKPB.Enable(bIsEmptyAllowed || (pEdit->GetText().Len() > 0));
return 0;
}
-/*-- 16.04.2004 16:34:48---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SwCopyToDialog : public SfxModalDialog
{
FixedInfo m_aDescriptionFI;
@@ -286,9 +243,6 @@ public:
void SetBCC(const String& rSet) {m_aBCCED.SetText(rSet);}
};
-/*-- 16.04.2004 16:43:18---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwCopyToDialog::SwCopyToDialog(Window* pParent) :
SfxModalDialog(pParent, SW_RES(DLG_MM_COPYTO)),
#ifdef MSC
@@ -310,16 +264,11 @@ SwCopyToDialog::SwCopyToDialog(Window* pParent) :
{
FreeResource();
}
-/*-- 16.04.2004 16:43:10---------------------------------------------------
- -----------------------------------------------------------------------*/
SwCopyToDialog::~SwCopyToDialog()
{
}
-/*-- 02.04.2004 13:15:54---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwMailMergeOutputPage::SwMailMergeOutputPage( SwMailMergeWizard* _pParent) :
svt::OWizardPage( _pParent, SW_RES(DLG_MM_OUTPUT_PAGE)),
#ifdef MSC
@@ -429,17 +378,12 @@ SwMailMergeOutputPage::SwMailMergeOutputPage( SwMailMergeWizard* _pParent) :
m_aPrintRB.Enable(!Application::GetSettings().GetMiscSettings().GetDisablePrinting());
}
-/*-- 02.04.2004 13:15:44---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwMailMergeOutputPage::~SwMailMergeOutputPage()
{
delete m_pTempPrinter;
delete m_pDocumentPrinterCopy;
}
-/*-- 31.01.2005 08:38:14---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergeOutputPage::ActivatePage()
{
//fill printer ListBox
@@ -456,7 +400,7 @@ void SwMailMergeOutputPage::ActivatePage()
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
SwView* pTargetView = rConfigItem.GetTargetView();
- DBG_ASSERT(pTargetView, "no target view exists");
+ OSL_ENSURE(pTargetView, "no target view exists");
if(pTargetView)
{
SfxPrinter* pPrinter = pTargetView->GetWrtShell().getIDocumentDeviceAccess()->getPrinter( true );
@@ -468,7 +412,7 @@ void SwMailMergeOutputPage::ActivatePage()
m_aPrinterLB.SelectEntry( rConfigItem.GetSelectedPrinter() );
SwView* pSourceView = rConfigItem.GetSourceView();
- DBG_ASSERT(pSourceView, "no source view exists");
+ OSL_ENSURE(pSourceView, "no source view exists");
if(pSourceView)
{
SwDocShell* pDocShell = pSourceView->GetDocShell();
@@ -480,16 +424,12 @@ void SwMailMergeOutputPage::ActivatePage()
}
}
}
-/*-- 05.07.2004 13:54:11---------------------------------------------------
- -----------------------------------------------------------------------*/
bool SwMailMergeOutputPage::canAdvance() const
{
return false;
}
-/*-- 02.04.2004 13:15:44---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
{
Control* aControls[] =
@@ -578,7 +518,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
aPos = m_aFromNF.GetPosPixel(); aPos.Y() = nNewRBXPos + nRB_FT_Offset; m_aFromNF.SetPosPixel(aPos);
aPos = m_aToNF.GetPosPixel(); aPos.Y() = nNewRBXPos + nRB_FT_Offset; m_aToNF.SetPosPixel(aPos);
}
- else /*if(&m_aSendMailRB == pButton)*/
+ else
{
Control* aMailControls[] =
{
@@ -652,9 +592,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
SetUpdateMode(sal_False);
return 0;
}
-/*-- 22.08.2005 12:15:10---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeOutputPage, DocumentSelectionHdl_Impl, RadioButton*, pButton)
{
sal_Bool bEnableFromTo = pButton == &m_aFromRB;
@@ -664,9 +602,6 @@ IMPL_LINK(SwMailMergeOutputPage, DocumentSelectionHdl_Impl, RadioButton*, pButto
return 0;
}
-/*-- 16.04.2004 16:45:10---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeOutputPage, CopyToHdl_Impl, PushButton*, pButton)
{
SwCopyToDialog* pDlg = new SwCopyToDialog(pButton);
@@ -680,14 +615,12 @@ IMPL_LINK(SwMailMergeOutputPage, CopyToHdl_Impl, PushButton*, pButton)
delete pDlg;
return 0;
}
-/*-- 17.05.2004 13:51:02---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton)
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
SwView* pSourceView = rConfigItem.GetSourceView();
- DBG_ASSERT( pSourceView, "source view missing");
+ OSL_ENSURE( pSourceView, "source view missing");
if(pSourceView)
{
SfxViewFrame* pSourceViewFrm = pSourceView->GetViewFrame();
@@ -722,22 +655,18 @@ IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton)
}
return 0;
}
-/*-- 17.07.2008 08:09:06---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeOutputPage, SaveCancelHdl_Impl, Button*, EMPTYARG )
{
m_bCancelSaving = true;
return 0;
}
-/*-- 17.05.2004 13:51:02---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
SwView* pTargetView = rConfigItem.GetTargetView();
- DBG_ASSERT(pTargetView, "no target view exists");
+ OSL_ENSURE(pTargetView, "no target view exists");
if(!pTargetView)
return 0;
@@ -857,7 +786,6 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
SfxObjectShellLock xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
xTempDocShell->DoInitNew( 0 );
SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 );
-// pTempFrame->GetFrame().Appear();
SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() );
pTargetView->GetWrtShell().StartAction();
SwgReaderOption aOpt;
@@ -877,8 +805,6 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
String sCounter('_');
sCounter += String::CreateFromInt32(nDoc);
sOutPath.Insert(sCounter, sOutPath.Len() - sExtension.Len() - 1);
- //SfxStringItem aName(SID_FILE_NAME, sOutPath);
- //SfxStringItem aFilter(SID_FILTER_NAME, sFilter);
while(true)
{
@@ -921,9 +847,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
m_pWizard->enableButtons(WZB_FINISH, sal_True);
return 0;
}
-/*-- 22.06.2004 11:51:30---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeOutputPage, PrinterChangeHdl_Impl, ListBox*, pBox)
{
if( m_pDocumentPrinterCopy && pBox->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
@@ -959,17 +883,13 @@ IMPL_LINK(SwMailMergeOutputPage, PrinterChangeHdl_Impl, ListBox*, pBox)
m_aPrinterSettingsPB.Disable();
m_pWizard->GetConfigItem().SetSelectedPrinter( pBox->GetSelectEntry() );
-// return m_pTempPrinter;
return 0;
}
-/*-- 17.05.2004 13:51:02---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG)
{
SwView* pTargetView = m_pWizard->GetConfigItem().GetTargetView();
- DBG_ASSERT(pTargetView, "no target view exists");
+ OSL_ENSURE(pTargetView, "no target view exists");
if(!pTargetView)
return 0;
@@ -993,7 +913,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG)
SwDocMergeInfo& rEndInfo = rConfigItem.GetDocumentMergeInfo(nEnd - 1);
rtl::OUString sPages(rtl::OUString::valueOf( rStartInfo.nStartPageInTarget ));
- sPages += rtl::OUString::createFromAscii( " - ");
+ sPages += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - "));
sPages += rtl::OUString::valueOf( rEndInfo.nEndPageInTarget );
SwWrtShell& rSh = pTargetView->GetWrtShell();
@@ -1007,14 +927,13 @@ IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG)
SfxObjectShell* pObjSh = pTargetView->GetViewFrame()->GetObjectShell();
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), pObjSh));
rSh.GetNewDBMgr()->SetMergeType( DBMGR_MERGE_DOCUMENTS );
- //SfxDispatcher *pDis = pTargetView->GetViewFrame()->GetDispatcher();
SfxBoolItem aMergeSilent(SID_SILENT, sal_False);
m_pWizard->enableButtons(WZB_CANCEL, sal_False);
uno::Sequence < beans::PropertyValue > aProps( 2 );
- aProps[0]. Name = rtl::OUString::createFromAscii("MonitorVisible");
+ aProps[0]. Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MonitorVisible"));
aProps[0].Value <<= sal_True;
- aProps[1]. Name = rtl::OUString::createFromAscii("Pages");
+ aProps[1]. Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Pages"));
aProps[1]. Value <<= sPages;
pTargetView->ExecPrint( aProps, false, true );
@@ -1025,9 +944,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG)
m_pWizard->enableButtons(WZB_FINISH, sal_True);
return 0;
}
-/*-- 17.05.2004 13:51:02---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeOutputPage, PrinterSetupHdl_Impl, PushButton*, pButton)
{
if( !m_pTempPrinter )
@@ -1036,9 +953,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrinterSetupHdl_Impl, PushButton*, pButton)
m_pTempPrinter->Setup(pButton);
return 0;
}
-/*-- 14.06.2004 09:34:01---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox)
{
sal_uLong nDocType = (sal_uLong)pBox->GetEntryData(pBox->GetSelectEntryPos());
@@ -1065,9 +980,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox)
}
return 0;
}
-/*-- 17.05.2004 13:51:02---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeOutputPage, SendAsHdl_Impl, PushButton*, pButton)
{
SwMailBodyDialog* pDlg = new SwMailBodyDialog(pButton, m_pWizard);
@@ -1078,6 +991,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendAsHdl_Impl, PushButton*, pButton)
}
return 0;
}
+
/*-- 21.05.2004 12:03:25---------------------------------------------------
Send documents as e-mail
-----------------------------------------------------------------------*/
@@ -1087,7 +1001,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
//get the composed document
SwView* pTargetView = rConfigItem.GetTargetView();
- DBG_ASSERT(pTargetView, "no target view exists");
+ OSL_ENSURE(pTargetView, "no target view exists");
if(!pTargetView)
return 0;
@@ -1123,7 +1037,6 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
nEnd = rConfigItem.GetMergedDocumentCount();
}
bool bAsBody = false;
- bool bIsPDF = false;
rtl_TextEncoding eEncoding = ::gsl_getSystemTextEncoding();
SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer();
const SfxFilter *pSfxFlt = 0;
@@ -1132,7 +1045,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
switch( nDocType )
{
case MM_DOCTYPE_OOO : break;
- case MM_DOCTYPE_PDF : bIsPDF = true;
+ case MM_DOCTYPE_PDF :
{
//the method SwIOSystemGetFilterOfFormat( ) returns the template filter
//because it uses the same user data :-(
@@ -1225,7 +1138,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
}
SfxStringItem aFilterName( SID_FILTER_NAME, pSfxFlt->GetFilterName() );
String sEMailColumn = m_aMailToLB.GetSelectEntry();
- DBG_ASSERT( sEMailColumn.Len(), "No email column selected");
+ OSL_ENSURE( sEMailColumn.Len(), "No email column selected");
Reference< sdbcx::XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), UNO_QUERY);
Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
if(!sEMailColumn.Len() || !xColAccess.is() || !xColAccess->hasByName(sEMailColumn))
@@ -1263,7 +1176,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
pDlg->ShowDialog();
//help to force painting the dialog
//TODO/CLEANUP
- //Sollbruchstelle
+ //predetermined breaking point
for ( sal_Int16 i = 0; i < 25; i++)
Application::Reschedule();
for(sal_uInt32 nDoc = nBegin; nDoc < nEnd; ++nDoc)
@@ -1276,7 +1189,6 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
SfxObjectShellLock xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
xTempDocShell->DoInitNew( 0 );
SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 );
-// pTempFrame->GetFrame().Appear();
SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() );
pTargetView->GetWrtShell().StartAction();
SwgReaderOption aOpt;
@@ -1297,14 +1209,6 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
INetURLObject(), utl::TempFile::CreateTempName(0),
URIHelper::GetMaybeFileHdl()) );
-/* if(bIsPDF)
- {
- SfxDispatcher* pSfxDispatcher = pTempView->GetViewFrame()->GetDispatcher();
- pSfxDispatcher->Execute(
- SID_DIRECTEXPORTDOCASPDF,
- SFX_CALLMODE_SYNCHRON, &aName, &aFilterName, 0L );
- }
- else*/
{
uno::Sequence< beans::PropertyValue > aFilterValues(MM_DOCTYPE_TEXT == nDocType ? 2 : 1);
beans::PropertyValue* pFilterValues = aFilterValues.getArray();
@@ -1321,12 +1225,10 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
}
xTempDocShell->DoClose();
-#ifdef DBG_UTIL
- sal_Int32 nTarget =
-#endif
- rConfigItem.MoveResultSet(rInfo.nDBRow);
- DBG_ASSERT( nTarget == rInfo.nDBRow, "row of current document could not be selected");
- DBG_ASSERT( sEMailColumn.Len(), "No email column selected");
+ sal_Int32 nTarget = rConfigItem.MoveResultSet(rInfo.nDBRow);
+ OSL_ENSURE( nTarget == rInfo.nDBRow, "row of current document could not be selected");
+ (void)nTarget;
+ OSL_ENSURE( sEMailColumn.Len(), "No email column selected");
::rtl::OUString sEMail = lcl_GetColumnValueOf(sEMailColumn, xColAccess);
SwMailDescriptor aDesc;
aDesc.sEMail = sEMail;
@@ -1341,7 +1243,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
pInStream->SetStreamCharSet( eEncoding );
else
{
- DBG_ERROR("no output file created?");
+ OSL_ENSURE(false, "no output file created?");
continue;
}
ByteString sLine;
@@ -1407,13 +1309,13 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
aDesc.sBodyContent = sBody;
if(MM_DOCTYPE_HTML == nDocType)
{
- aDesc.sBodyMimeType = ::rtl::OUString::createFromAscii("text/html; charset=");
+ aDesc.sBodyMimeType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("text/html; charset="));
aDesc.sBodyMimeType += ::rtl::OUString::createFromAscii(
rtl_getBestMimeCharsetFromTextEncoding( eEncoding ));
}
else
aDesc.sBodyMimeType =
- ::rtl::OUString::createFromAscii("text/plain; charset=UTF-8; format=flowed");
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain; charset=UTF-8; format=flowed"));
aDesc.sSubject = m_aSubjectED.GetText();
aDesc.sCC = m_sCC;
@@ -1438,3 +1340,5 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
//delete pDlg;
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx
index c48d6d210c4f..36c30428b024 100644
--- a/sw/source/ui/dbui/mmoutputpage.hxx
+++ b/sw/source/ui/dbui/mmoutputpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef _MAILMERGEOUTPUTPAGE_HXX
#define _MAILMERGEOUTPUTPAGE_HXX
#include <svtools/wizardmachine.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <svtools/stdctrl.hxx>
#include <vcl/combobox.hxx>
#include <vcl/field.hxx>
@@ -51,9 +50,7 @@ namespace com{ namespace sun{ namespace star{
class XMailMessage;
}
}}}
-/*-- 02.04.2004 09:21:06---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergeOutputPage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
@@ -146,9 +143,7 @@ public:
~SwMailMergeOutputPage();
};
-/*-- 21.05.2004 12:48:50---------------------------------------------------
- -----------------------------------------------------------------------*/
struct SwMailDescriptor
{
::rtl::OUString sEMail;
@@ -201,7 +196,6 @@ class SW_DLLPUBLIC SwSendMailDialog : public ModelessDialog //SfxModalDialog
bool m_bDesctructionEnabled;
ImageList m_aImageList;
- ImageList m_aImageListHC;
SwSendMailDialog_Impl* m_pImpl;
SwMailMergeConfigItem* m_pConfigItem;
@@ -240,3 +234,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 8d229b94c06c..c99de01ea052 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,16 +38,10 @@
#include <mailmergewizard.hxx>
#include <mmconfigitem.hxx>
#include <vcl/msgbox.hxx>
-#ifndef _DBUI_HRC
#include <dbui.hrc>
-#endif
#include <swtypes.hxx>
#include <mmoutputtypepage.hrc>
-#include <dbui.hrc>
-
-/*-- 02.04.2004 11:06:55---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeOutputTypePage::SwMailMergeOutputTypePage( SwMailMergeWizard* _pParent) :
svt::OWizardPage( _pParent, SW_RES(DLG_MM_OUTPUTTYPE_PAGE)),
#ifdef MSC
@@ -90,15 +85,11 @@ SwMailMergeOutputTypePage::SwMailMergeOutputTypePage( SwMailMergeWizard* _pParen
TypeHdl_Impl(&m_aLetterRB);
}
-/*-- 02.04.2004 11:06:55---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeOutputTypePage::~SwMailMergeOutputTypePage()
{
}
-/*-- 14.04.2004 14:44:07---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwMailMergeOutputTypePage, TypeHdl_Impl, RadioButton*, EMPTYARG )
{
bool bLetter = m_aLetterRB.IsChecked();
@@ -111,3 +102,4 @@ IMPL_LINK( SwMailMergeOutputTypePage, TypeHdl_Impl, RadioButton*, EMPTYARG )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmoutputtypepage.hxx b/sw/source/ui/dbui/mmoutputtypepage.hxx
index 9db02409cd1c..236b0fd6f40a 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.hxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,11 @@
#define _MAILMERGEOUTPUTTYPEPAGE_HXX
#include <svtools/wizardmachine.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <svtools/stdctrl.hxx>
#include <mailmergehelper.hxx>
class SwMailMergeWizard;
-/*-- 02.04.2004 09:21:06---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergeOutputTypePage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
@@ -65,3 +62,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx
index 8539f037ecdc..e38926479ee2 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.cxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,16 +35,10 @@
#include <mmpreparemergepage.hxx>
#include <mailmergewizard.hxx>
#include <mmconfigitem.hxx>
-#ifndef _DBUI_HRC
#include <dbui.hrc>
-#endif
#include <swtypes.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <wrtsh.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <com/sun/star/sdbc/XConnection.hpp>
@@ -51,7 +46,6 @@
#include <mmpreparemergepage.hrc>
-#include <dbui.hrc>
#include <unomid.h>
@@ -60,9 +54,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdbc;
using ::rtl::OUString;
-/*-- 02.04.2004 16:42:49---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwMailMergePrepareMergePage::SwMailMergePrepareMergePage( SwMailMergeWizard* _pParent) :
svt::OWizardPage( _pParent, SW_RES(DLG_MM_PREPAREMERGE_PAGE)),
#ifdef MSC
@@ -96,24 +87,18 @@ SwMailMergePrepareMergePage::SwMailMergePrepareMergePage( SwMailMergeWizard* _pP
m_ExcludeCB.SetClickHdl(LINK(this, SwMailMergePrepareMergePage, ExcludeHdl_Impl));
aMoveLink.Call(&m_aRecordED);
}
-/*-- 02.04.2004 16:42:49---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergePrepareMergePage::~SwMailMergePrepareMergePage()
{
}
-/*-- 13.05.2004 15:36:48---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwMailMergePrepareMergePage, EditDocumentHdl_Impl, PushButton*, EMPTYARG)
{
m_pWizard->SetRestartPage(MM_PREPAREMERGEPAGE);
m_pWizard->EndDialog(RET_EDIT_DOC);
return 0;
}
-/*-- 27.05.2004 14:16:37---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwMailMergePrepareMergePage, MoveHdl_Impl, void*, pCtrl)
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
@@ -172,22 +157,19 @@ IMPL_LINK( SwMailMergePrepareMergePage, MoveHdl_Impl, void*, pCtrl)
rSh.GetNewDBMgr()->MergeNew(aMergeDesc);
return 0;
}
-/*-- 27.05.2004 14:46:28---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwMailMergePrepareMergePage, ExcludeHdl_Impl, CheckBox*, pBox)
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
rConfigItem.ExcludeRecord( rConfigItem.GetResultSetPosition(), pBox->IsChecked());
return 0;
};
-/*-- 18.08.2004 10:36:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMailMergePrepareMergePage::ActivatePage()
{
MoveHdl_Impl(&m_aRecordED);
}
+
/*-- 13.05.2004 15:38:32---------------------------------------------------
merge the data into a new file
-----------------------------------------------------------------------*/
@@ -202,3 +184,5 @@ sal_Bool SwMailMergePrepareMergePage::commitPage( ::svt::WizardTypes::CommitPag
}
return sal_True;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmpreparemergepage.hxx b/sw/source/ui/dbui/mmpreparemergepage.hxx
index 8fb7ad938996..73b138938305 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.hxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,14 @@
#define _MAILMERGEPREPAREMERGEPAGE_HXX
#include <svtools/wizardmachine.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <vcl/field.hxx>
#include <svtools/stdctrl.hxx>
#include <mailmergehelper.hxx>
#include "actctrl.hxx"
class SwMailMergeWizard;
-/*-- 02.04.2004 09:21:06---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergePrepareMergePage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
@@ -75,3 +72,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 5659b45bfc3d..8d82198c0725 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,9 +58,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
-/*-- 08.04.2004 14:33:56---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwSelectDBTableDialog::SwSelectDBTableDialog(Window* pParent,
const uno::Reference< sdbc::XConnection>& rConnection) :
SfxModalDialog(pParent, SW_RES(DLG_MM_SELECTDBTABLEDDIALOG)),
@@ -148,15 +146,11 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(Window* pParent,
}
}
}
-/*-- 08.04.2004 14:33:57---------------------------------------------------
- -----------------------------------------------------------------------*/
SwSelectDBTableDialog::~SwSelectDBTableDialog()
{
}
-/*-- 08.04.2004 14:33:57---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwSelectDBTableDialog, PreviewHdl, PushButton*, pButton)
{
SvLBoxEntry* pEntry = m_aTableLB.FirstSelected();
@@ -173,7 +167,7 @@ IMPL_LINK(SwSelectDBTableDialog, PreviewHdl, PushButton*, pButton)
Reference<XPropertySet> xPrSet(xSource, UNO_QUERY);
xPrSet->getPropertyValue(C2U("Name")) >>= sDataSourceName;
}
- DBG_ASSERT(sDataSourceName.getLength(), "no data source found");
+ OSL_ENSURE(sDataSourceName.getLength(), "no data source found");
Sequence<PropertyValue> aProperties(5);
PropertyValue* pProperties = aProperties.getArray();
pProperties[0].Name = C2U("DataSourceName");
@@ -195,18 +189,14 @@ IMPL_LINK(SwSelectDBTableDialog, PreviewHdl, PushButton*, pButton)
return 0;
}
-/*-- 19.04.2004 10:03:26---------------------------------------------------
- -----------------------------------------------------------------------*/
String SwSelectDBTableDialog::GetSelectedTable(bool& bIsTable)
{
SvLBoxEntry* pEntry = m_aTableLB.FirstSelected();
bIsTable = pEntry->GetUserData() ? false : true;
return pEntry ? m_aTableLB.GetEntryText(pEntry, 0) : String();
}
-/*-- 13.05.2004 12:58:26---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSelectDBTableDialog::SetSelectedTable(const String& rTable, bool bIsTable)
{
SvLBoxEntry* pEntry = m_aTableLB.First();
@@ -221,3 +211,5 @@ void SwSelectDBTableDialog::SetSelectedTable(const String& rTable, bool bIsTab
pEntry = m_aTableLB.Next( pEntry );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/selectdbtabledialog.hxx b/sw/source/ui/dbui/selectdbtabledialog.hxx
index 25b23f692a4c..c69cae53572a 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.hxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include <sfx2/basedlgs.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <vcl/fixed.hxx>
#include <svtools/svtabbx.hxx>
#include <svtools/headbar.hxx>
@@ -41,9 +40,6 @@ namespace com{namespace sun{namespace star{
}
}}}
-/*-- 08.04.2004 14:04:39---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SwSelectDBTableDialog : public SfxModalDialog
{
FixedText m_aSelectFI;
@@ -77,3 +73,4 @@ public:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/swdbtoolsclient.cxx b/sw/source/ui/dbui/swdbtoolsclient.cxx
index bb932f0f9a04..72e4ded03340 100644
--- a/sw/source/ui/dbui/swdbtoolsclient.cxx
+++ b/sw/source/ui/dbui/swdbtoolsclient.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,8 +36,6 @@
#include <osl/diagnose.h>
#include <tools/solar.h>
-//........................................................................
-
using namespace ::connectivity::simple;
using namespace ::com::sun::star;
using namespace ::com::sun::star::sdbc;
@@ -80,12 +79,11 @@ namespace
}
// -----------------------------------------------------------------------------
}
-// -----------------------------------------------------------------------------
+
SwDbtoolsClient::SwDbtoolsClient()
{
}
-//--------------------------------------------------------------------
SwDbtoolsClient::~SwDbtoolsClient()
{
if(m_xDataAccessFactory.is())
@@ -98,7 +96,6 @@ SwDbtoolsClient::~SwDbtoolsClient()
}
}
-//--------------------------------------------------------------------
extern "C" { static void SAL_CALL thisModule() {} }
void SwDbtoolsClient::registerClient()
@@ -109,9 +106,7 @@ void SwDbtoolsClient::registerClient()
OSL_ENSURE(NULL == getDbToolsClientModule(), "SwDbtoolsClient::registerClient: inconsistence: already have a module!");
OSL_ENSURE(NULL == getDbToolsClientFactoryFunction(), "SwDbtoolsClient::registerClient: inconsistence: already have a factory function!");
- const ::rtl::OUString sModuleName = ::rtl::OUString::createFromAscii(
- SVLIBRARY( "dbtools" )
- );
+ const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM(SVLIBRARY("dbtools")));
// load the dbtools library
getDbToolsClientModule() = osl_loadModuleRelative(
@@ -120,7 +115,7 @@ void SwDbtoolsClient::registerClient()
if (NULL != getDbToolsClientModule())
{
// get the symbol for the method creating the factory
- const ::rtl::OUString sFactoryCreationFunc = ::rtl::OUString::createFromAscii("createDataAccessToolsFactory");
+ const ::rtl::OUString sFactoryCreationFunc(RTL_CONSTASCII_USTRINGPARAM("createDataAccessToolsFactory"));
// reinterpret_cast<createDataAccessToolsFactoryFunction> removed for gcc permissive
getDbToolsClientFactoryFunction() = reinterpret_cast< createDataAccessToolsFactoryFunction >(
osl_getFunctionSymbol(getDbToolsClientModule(), sFactoryCreationFunc.pData));
@@ -135,7 +130,6 @@ void SwDbtoolsClient::registerClient()
}
}
-//--------------------------------------------------------------------
void SwDbtoolsClient::revokeClient()
{
::osl::MutexGuard aGuard(getDbtoolsClientMutex());
@@ -147,9 +141,7 @@ void SwDbtoolsClient::revokeClient()
getDbToolsClientModule() = NULL;
}
}
-/* -----------------------------30.08.2001 14:58------------------------------
- ---------------------------------------------------------------------------*/
void SwDbtoolsClient::getFactory()
{
if(!m_xDataAccessFactory.is())
@@ -169,9 +161,7 @@ void SwDbtoolsClient::getFactory()
}
}
}
-/* -----------------------------30.08.2001 11:32------------------------------
- ---------------------------------------------------------------------------*/
::rtl::Reference< ::connectivity::simple::IDataAccessTools >
SwDbtoolsClient::getDataAccessTools()
{
@@ -183,9 +173,7 @@ void SwDbtoolsClient::getFactory()
}
return m_xDataAccessTools;
}
-/* -----------------------------30.08.2001 12:40------------------------------
- ---------------------------------------------------------------------------*/
::rtl::Reference< ::connectivity::simple::IDataAccessTypeConversion >
SwDbtoolsClient::getAccessTypeConversion()
{
@@ -198,9 +186,6 @@ void SwDbtoolsClient::getFactory()
return m_xAccessTypeConversion;
}
-/* -----------------------------30.08.2001 11:37------------------------------
-
- ---------------------------------------------------------------------------*/
Reference< XDataSource > SwDbtoolsClient::getDataSource(
const ::rtl::OUString& rRegisteredName,
const Reference< XMultiServiceFactory>& xFactory
@@ -212,9 +197,7 @@ Reference< XDataSource > SwDbtoolsClient::getDataSource(
xRet = xAccess->getDataSource(rRegisteredName, xFactory);
return xRet;
}
-/* -----------------------------30.08.2001 12:06------------------------------
- ---------------------------------------------------------------------------*/
sal_Int32 SwDbtoolsClient::getDefaultNumberFormat(
const Reference< XPropertySet >& rxColumn,
const Reference< XNumberFormatTypes >& rxTypes,
@@ -227,9 +210,7 @@ sal_Int32 SwDbtoolsClient::getDefaultNumberFormat(
nRet = xAccess->getDefaultNumberFormat( rxColumn, rxTypes, rLocale);
return nRet;
}
-/* -----------------------------30.08.2001 12:38------------------------------
- ---------------------------------------------------------------------------*/
::rtl::OUString SwDbtoolsClient::getFormattedValue(
const uno::Reference< beans::XPropertySet>& _rxColumn,
const uno::Reference< util::XNumberFormatter>& _rxFormatter,
@@ -246,3 +227,4 @@ sal_Int32 SwDbtoolsClient::getDefaultNumberFormat(
return sRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
index 3f021b3a1bc5..be5b1e3775ec 100644
--- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -144,9 +145,7 @@ struct SpellState
pOtherCursor = 0;
}
};
-/*-- 30.10.2003 14:33:26---------------------------------------------------
- -----------------------------------------------------------------------*/
void lcl_LeaveDrawText(SwWrtShell& rSh)
{
if(rSh.GetDrawView())
@@ -159,9 +158,7 @@ void lcl_LeaveDrawText(SwWrtShell& rSh)
rSh.GetView().AttrChangedNotify(&rSh);
}
}
-/*-- 09.09.2003 10:39:22---------------------------------------------------
- -----------------------------------------------------------------------*/
SwSpellDialogChildWindow::SwSpellDialogChildWindow (
Window* _pParent,
sal_uInt16 nId,
@@ -175,9 +172,7 @@ SwSpellDialogChildWindow::SwSpellDialogChildWindow (
String aPropName( String::CreateFromAscii(UPN_IS_GRAMMAR_INTERACTIVE ) );
SvtLinguConfig().GetProperty( aPropName ) >>= m_bIsGrammarCheckingOn;
}
-/*-- 09.09.2003 10:39:22---------------------------------------------------
- -----------------------------------------------------------------------*/
SwSpellDialogChildWindow::~SwSpellDialogChildWindow ()
{
SwWrtShell* pWrtShell = GetWrtShell_Impl();
@@ -186,9 +181,7 @@ SwSpellDialogChildWindow::~SwSpellDialogChildWindow ()
delete m_pSpellState;
}
-/*-- 09.09.2003 12:40:07---------------------------------------------------
- -----------------------------------------------------------------------*/
SfxChildWinInfo SwSpellDialogChildWindow::GetInfo (void) const
{
SfxChildWinInfo aInfo = svx::SpellDialogChildWindow::GetInfo();
@@ -196,10 +189,7 @@ SfxChildWinInfo SwSpellDialogChildWindow::GetInfo (void) const
return aInfo;
}
-/*-- 09.09.2003 10:39:40---------------------------------------------------
-
- -----------------------------------------------------------------------*/
svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
{
svx::SpellPortions aRet;
@@ -409,7 +399,7 @@ The code below would only be part of the solution.
bool bCloseMessage = true;
if(!aRet.size() && !m_pSpellState->m_bStartedInSelection)
{
- DBG_ASSERT(m_pSpellState->m_bDrawingsSpelled &&
+ OSL_ENSURE(m_pSpellState->m_bDrawingsSpelled &&
m_pSpellState->m_bOtherSpelled && m_pSpellState->m_bBodySpelled,
"not all parts of the document are already spelled");
if(m_pSpellState->m_xStartRange.is())
@@ -457,13 +447,11 @@ The code below would only be part of the solution.
return aRet;
}
-/*-- 09.09.2003 10:39:40---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rChanged, bool bRecheck)
{
SwWrtShell* pWrtShell = GetWrtShell_Impl();
- DBG_ASSERT(!m_pSpellState->m_bInitialCall, "ApplyChangedSentence in initial call or after resume");
+ OSL_ENSURE(!m_pSpellState->m_bInitialCall, "ApplyChangedSentence in initial call or after resume");
if(pWrtShell && !m_pSpellState->m_bInitialCall)
{
ShellModes eSelMode = pWrtShell->GetView().GetShellMode();
@@ -489,39 +477,29 @@ void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rC
}
}
}
-/*-- 21.10.2003 09:33:57---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSpellDialogChildWindow::AddAutoCorrection(
const String& rOld, const String& rNew, LanguageType eLanguage)
{
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get()->GetAutoCorrect();
pACorr->PutText( rOld, rNew, eLanguage );
}
-/*-- 21.10.2003 09:33:59---------------------------------------------------
- -----------------------------------------------------------------------*/
bool SwSpellDialogChildWindow::HasAutoCorrection()
{
return true;
}
-/*-- 16.06.2008 11:59:17---------------------------------------------------
- -----------------------------------------------------------------------*/
bool SwSpellDialogChildWindow::HasGrammarChecking()
{
return SvtLinguConfig().HasGrammarChecker();
}
-/*-- 18.06.2008 12:27:11---------------------------------------------------
- -----------------------------------------------------------------------*/
bool SwSpellDialogChildWindow::IsGrammarChecking()
{
return m_bIsGrammarCheckingOn;
}
-/*-- 18.06.2008 12:27:11---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSpellDialogChildWindow::SetGrammarChecking(bool bOn)
{
uno::Any aVal;
@@ -547,7 +525,7 @@ void SwSpellDialogChildWindow::SetGrammarChecking(bool bOn)
{
SdrView* pSdrView = pWrtShell->GetDrawView();
SdrOutliner* pOutliner = pSdrView ? pSdrView->GetTextEditOutliner() : 0;
- DBG_ASSERT(pOutliner, "No Outliner in SwSpellDialogChildWindow::SetGrammarChecking");
+ OSL_ENSURE(pOutliner, "No Outliner in SwSpellDialogChildWindow::SetGrammarChecking");
if(pOutliner)
{
pOutliner->PutSpellingToSentenceStart( pSdrView->GetTextEditOutlinerView()->GetEditView() );
@@ -555,9 +533,7 @@ void SwSpellDialogChildWindow::SetGrammarChecking(bool bOn)
}
}
}
-/*-- 28.10.2003 08:41:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSpellDialogChildWindow::GetFocus()
{
if(m_pSpellState->m_bLockFocus)
@@ -599,7 +575,7 @@ void SwSpellDialogChildWindow::GetFocus()
else
{
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
- DBG_ASSERT(pOLV, "no OutlinerView in SwSpellDialogChildWindow::GetFocus()");
+ OSL_ENSURE(pOLV, "no OutlinerView in SwSpellDialogChildWindow::GetFocus()");
if(!pOLV || !m_pSpellState->m_aESelection.IsEqual(pOLV->GetSelection()))
bInvalidate = true;
}
@@ -616,9 +592,7 @@ void SwSpellDialogChildWindow::GetFocus()
if(bInvalidate)
InvalidateSpellDialog();
}
-/*-- 28.10.2003 08:41:09---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSpellDialogChildWindow::LoseFocus()
{
//prevent initial invalidation
@@ -655,7 +629,7 @@ void SwSpellDialogChildWindow::LoseFocus()
SdrOutliner* pOutliner = pSdrView->GetTextEditOutliner();
m_pSpellState->m_pOutliner = pOutliner;
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
- DBG_ASSERT(pOutliner && pOLV, "no Outliner/OutlinerView in SwSpellDialogChildWindow::LoseFocus()");
+ OSL_ENSURE(pOutliner && pOLV, "no Outliner/OutlinerView in SwSpellDialogChildWindow::LoseFocus()");
if(pOLV)
{
m_pSpellState->m_aESelection = pOLV->GetSelection();
@@ -668,9 +642,7 @@ void SwSpellDialogChildWindow::LoseFocus()
else
m_pSpellState->m_eSelMode = SHELL_MODE_OBJECT;
}
-/*-- 18.09.2003 12:50:18---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSpellDialogChildWindow::InvalidateSpellDialog()
{
SwWrtShell* pWrtShell = GetWrtShell_Impl();
@@ -680,9 +652,6 @@ void SwSpellDialogChildWindow::InvalidateSpellDialog()
svx::SpellDialogChildWindow::InvalidateSpellDialog();
}
-/*-- 18.09.2003 12:54:59---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwWrtShell* SwSpellDialogChildWindow::GetWrtShell_Impl()
{
SfxDispatcher* pDispatch = GetBindings().GetDispatcher();
@@ -701,7 +670,7 @@ SwWrtShell* SwSpellDialogChildWindow::GetWrtShell_Impl()
return pView ? pView->GetWrtShellPtr(): 0;
}
-/*-- 13.10.2003 15:19:04---------------------------------------------------
+/*-------------------------------------------------------------------------
set the cursor into the body text - necessary if any object is selected
on start of the spelling dialog
-----------------------------------------------------------------------*/
@@ -715,7 +684,7 @@ bool SwSpellDialogChildWindow::MakeTextSelection_Impl(SwWrtShell& rShell, ShellM
case SHELL_MODE_TABLE_TEXT:
case SHELL_MODE_TABLE_LIST_TEXT:
case SHELL_MODE_DRAWTEXT:
- DBG_ERROR("text already active in SwSpellDialogChildWindow::MakeTextSelection_Impl()");
+ OSL_ENSURE(false, "text already active in SwSpellDialogChildWindow::MakeTextSelection_Impl()");
break;
case SHELL_MODE_FRAME:
@@ -770,7 +739,7 @@ bool SwSpellDialogChildWindow::MakeTextSelection_Impl(SwWrtShell& rShell, ShellM
}
return true;
}
-/*-- 13.10.2003 15:20:09---------------------------------------------------
+/*-------------------------------------------------------------------------
select the next draw text object that has a spelling error
-----------------------------------------------------------------------*/
bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
@@ -893,15 +862,13 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
return bNextDoc;
}
-/*-- 13.10.2003 15:24:27---------------------------------------------------
- -----------------------------------------------------------------------*/
bool SwSpellDialogChildWindow::SpellDrawText_Impl(SwWrtShell& rSh, ::svx::SpellPortions& rPortions)
{
bool bRet = false;
SdrView* pSdrView = rSh.GetDrawView();
SdrOutliner* pOutliner = pSdrView ? pSdrView->GetTextEditOutliner() : 0;
- DBG_ASSERT(pOutliner, "No Outliner in SwSpellDialogChildWindow::SpellDrawText_Impl");
+ OSL_ENSURE(pOutliner, "No Outliner in SwSpellDialogChildWindow::SpellDrawText_Impl");
if(pOutliner)
{
bRet = pOutliner->SpellSentence(pSdrView->GetTextEditOutlinerView()->GetEditView(), rPortions, m_bIsGrammarCheckingOn);
@@ -922,13 +889,12 @@ bool SwSpellDialogChildWindow::SpellDrawText_Impl(SwWrtShell& rSh, ::svx::SpellP
}
return bRet;
}
-/*-- 30.10.2003 14:54:59---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSpellDialogChildWindow::LockFocusNotification(bool bLock)
{
- DBG_ASSERT(m_pSpellState->m_bLockFocus != bLock, "invalid locking - no change of state");
+ OSL_ENSURE(m_pSpellState->m_bLockFocus != bLock, "invalid locking - no change of state");
m_pSpellState->m_bLockFocus = bLock;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/abstract.cxx b/sw/source/ui/dialog/abstract.cxx
index 3d4de9b187dc..0a651db3cb1f 100644
--- a/sw/source/ui/dialog/abstract.cxx
+++ b/sw/source/ui/dialog/abstract.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,10 +42,6 @@
#include "abstract.hrc"
-/*-----------------22.02.97 15.32-------------------
-
---------------------------------------------------*/
-
SwInsertAbstractDlg::SwInsertAbstractDlg( Window* pParent ) :
SfxModalDialog(pParent, SW_RES(DLG_INSERT_ABSTRACT)),
aFL (this, SW_RES(FL_1 )),
@@ -60,25 +57,14 @@ SwInsertAbstractDlg::SwInsertAbstractDlg( Window* pParent ) :
FreeResource();
}
-/*-----------------22.02.97 15.32-------------------
-
---------------------------------------------------*/
-
SwInsertAbstractDlg::~SwInsertAbstractDlg()
{
}
-/*-----------------22.02.97 15.34-------------------
-
---------------------------------------------------*/
-
sal_uInt8 SwInsertAbstractDlg::GetLevel() const
{
return static_cast< sal_uInt8 >(aLevelNF.GetValue() - 1);
}
-/*-----------------22.02.97 15.34-------------------
-
---------------------------------------------------*/
sal_uInt8 SwInsertAbstractDlg::GetPara() const
{
@@ -90,3 +76,4 @@ sal_uInt8 SwInsertAbstractDlg::GetPara() const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/abstract.src b/sw/source/ui/dialog/abstract.src
index 5cb877a1549b..9d318cba23a9 100644
--- a/sw/source/ui/dialog/abstract.src
+++ b/sw/source/ui/dialog/abstract.src
@@ -34,9 +34,6 @@ ModalDialog DLG_INSERT_ABSTRACT
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 239 , 68 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? AutoAbstract erzeugen : AutoAbstrakt erzeugen */
- /* ### ACHTUNG: Neuer Text in Resource? AutoAbstract erzeugen : AutoAbstrakt erzeugen */
- /* ### ACHTUNG: Neuer Text in Resource? AutoAbstract erzeugen : AutoAbstrakt erzeugen */
Moveable = TRUE ;
FixedLine FL_1
{
@@ -71,7 +68,6 @@ ModalDialog DLG_INSERT_ABSTRACT
{
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 120 , 8 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Absätze je Kapitel : Absõtze je Kapitel */
Text [ en-US ] = "Subpoints per level" ;
};
NumericField NF_PARA
@@ -94,7 +90,6 @@ ModalDialog DLG_INSERT_ABSTRACT
{
Pos = MAP_APPFONT ( 12 , 43 ) ;
Size = MAP_APPFONT ( 165 , 16 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Im Abstrakt erscheint die ausgewählte Anzahl von Absätzen aus den einbezogenen Kapitelebenen. : Im Abstrakt erscheint die ausgewõhlte Anzahl von Absõtzen aus den einbezogenen Kapitelebenen. */
WordBreak = TRUE ;
Text [ en-US ] = "The abstract contains the selected number of paragraphs from the included outline levels." ;
};
diff --git a/sw/source/ui/dialog/addrdlg.cxx b/sw/source/ui/dialog/addrdlg.cxx
index f168d0684a81..02ba71c344bd 100644
--- a/sw/source/ui/dialog/addrdlg.cxx
+++ b/sw/source/ui/dialog/addrdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,19 +37,13 @@
#include <svx/svxdlg.hxx>
#include <sfx2/sfx.hrc>
-/****************************************************************************
-Ctor
-****************************************************************************/
-
-
SwAddrDlg::SwAddrDlg(Window* pParent, const SfxItemSet& rSet ) :
SfxSingleTabDialog(pParent, rSet, 0)
{
- // TabPage erzeugen
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SFXPAGE_GENERAL );
if ( fnCreatePage )
{
@@ -57,13 +52,9 @@ SwAddrDlg::SwAddrDlg(Window* pParent, const SfxItemSet& rSet ) :
}
}
-/****************************************************************************
-Dtor
-****************************************************************************/
-
-
-__EXPORT SwAddrDlg::~SwAddrDlg()
+SwAddrDlg::~SwAddrDlg()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index f1661b4865c4..eb82e9f2fff5 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,14 +50,9 @@
#include <shellio.hxx>
#include <docsh.hxx>
#include <doc.hxx>
-#include <errhdl.hxx>
-#ifndef _DIALOG_HRC
#include <dialog.hrc>
-#endif
-#ifndef _ASCFLDLG_HRC
#include <ascfldlg.hrc>
-#endif
#include "vcl/metric.hxx"
@@ -64,8 +60,8 @@
using namespace ::com::sun::star;
const sal_Unicode cDialogExtraDataClose = '}';
-const char __FAR_DATA sDialogImpExtraData[] = "EncImpDlg:{";
-const char __FAR_DATA sDialogExpExtraData[] = "EncExpDlg:{";
+const char sDialogImpExtraData[] = "EncImpDlg:{";
+const char sDialogExpExtraData[] = "EncExpDlg:{";
const sal_uInt16 nDialogExtraDataLen = 11; // 12345678901
SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
@@ -125,8 +121,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
aBuffer[ nBytesRead + 2 ] = '0';
}
- sal_Bool bCR = sal_False, bLF = sal_False, bNoNormalChar = sal_False,
- bNullChar = sal_False;
+ sal_Bool bCR = sal_False, bLF = sal_False, bNullChar = sal_False;
for( sal_uInt16 nCnt = 0; nCnt < nBytesRead; ++nCnt )
switch( aBuffer[ nCnt ] )
{
@@ -136,9 +131,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
case 0xC:
case 0x1A:
case 0x9: break;
- default:
- if( 0x20 > aBuffer[ nCnt ] )
- bNoNormalChar = sal_True;
+ default: break;
}
if( !bNullChar )
@@ -148,21 +141,15 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
if( bLF )
{
aOpt.SetParaFlags( LINEEND_CRLF );
-// have to check if of CharSet is type of ANSI
-// aOpt.SetCharSet( CHARSET_ANSI );
}
else
{
aOpt.SetParaFlags( LINEEND_CR );
-// have to check if CharSet is type of MAC
-// aOpt.SetCharSet( CHARSET_MAC );
}
}
else if( bLF )
{
aOpt.SetParaFlags( LINEEND_LF );
-// have to check if of CharSet is type of ANSI
-// aOpt.SetCharSet( CHARSET_ANSI );
}
}
@@ -228,7 +215,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
delete pPrt;
}
- // initialisiere Sprache
+ // initialise language
{
if( !aOpt.GetLanguage() )
{
@@ -291,7 +278,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
SetSizePixel( aSize );
}
- // initialisiere Zeichensatz
+ // initialise character set
aCharSetLB.FillFromTextEncodingTable( pStream != NULL );
aCharSetLB.SelectTextEncoding( aOpt.GetCharSet() );
@@ -329,7 +316,7 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions )
rOptions.SetLanguage( sal_uInt16( nLng ) );
rOptions.SetParaFlags( GetCRLF() );
- // JP: Task #71802# save the user settings
+ // save the user settings
String sData;
rOptions.WriteUserData( sData );
if( sData.Len() )
@@ -460,3 +447,4 @@ IMPL_LINK( SwAsciiFilterDlg, LineEndHdl, RadioButton*, pBtn )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/dialog.src b/sw/source/ui/dialog/dialog.src
index 26b615bff7b2..25b2a38eeadd 100644
--- a/sw/source/ui/dialog/dialog.src
+++ b/sw/source/ui/dialog/dialog.src
@@ -28,7 +28,6 @@
CheckBox CB_USE_PASSWD
{
- /* ### ACHTUNG: Neuer Text in Resource? ~Paßwort : ~Pa˜wort */
Text [ en-US ] = "~Password" ;
};
CheckBox CB_READ_ONLY
@@ -37,7 +36,6 @@ CheckBox CB_READ_ONLY
};
String STR_LINKEDIT_TEXT
{
- /* ### ACHTUNG: Neuer Text in Resource? Verknüpfungen bearbeiten : Verkn³pfungen bearbeiten */
Text [ en-US ] = "Edit links" ;
};
String STR_PATH_NOT_FOUND
diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx
index 08bb7b96e45b..062d80255b77 100644
--- a/sw/source/ui/dialog/docstdlg.cxx
+++ b/sw/source/ui/dialog/docstdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,37 +37,20 @@
#include <ctype.h>
#include <swwait.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <swmodule.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
-#ifndef _PVIEW_HXX
#include <pview.hxx>
-#endif
#include <doc.hxx>
#include <docstdlg.hxx>
-#ifndef _MODCFG_HXX
#include <modcfg.hxx>
-#endif
-// fuer Statistikfelder
+// for statistics fields
#include <fldmgr.hxx>
#include <fldbas.hxx>
-#ifndef _DOCSTDLG_HRC
#include <docstdlg.hrc>
-#endif
-
-
-/*--------------------------------------------------------------------
- Beschreibung: Create
- --------------------------------------------------------------------*/
SfxTabPage * SwDocStatPage::Create(Window *pParent, const SfxItemSet &rSet)
@@ -74,11 +58,6 @@ SfxTabPage * SwDocStatPage::Create(Window *pParent, const SfxItemSet &rSet)
return new SwDocStatPage(pParent, rSet);
}
-/*--------------------------------------------------------------------
- Beschreibung: Ctor
- --------------------------------------------------------------------*/
-
-
SwDocStatPage::SwDocStatPage(Window *pParent, const SfxItemSet &rSet) :
SfxTabPage (pParent, SW_RES(TP_DOC_STAT), rSet),
@@ -121,7 +100,7 @@ SwDocStatPage::SwDocStatPage(Window *pParent, const SfxItemSet &rSet) :
}
/*--------------------------------------------------------------------
- Beschreibung: ItemSet fuellen bei Aenderung
+ Description: fill ItemSet when changed
--------------------------------------------------------------------*/
@@ -130,16 +109,11 @@ sal_Bool SwDocStatPage::FillItemSet(SfxItemSet & /*rSet*/)
return sal_False;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwDocStatPage::Reset(const SfxItemSet &/*rSet*/)
{
}
/*------------------------------------------------------------------------
- Beschreibung: Aktualisieren / Setzen der Daten
+ Description: update / set data
------------------------------------------------------------------------*/
@@ -155,7 +129,7 @@ void SwDocStatPage::SetData(const SwDocStat &rStat)
}
/*------------------------------------------------------------------------
- Beschreibung: Aktualisieren der Statistik
+ Description: update statistics
------------------------------------------------------------------------*/
@@ -168,7 +142,7 @@ void SwDocStatPage::Update()
else if ( pVSh->ISA(SwPagePreView) )
pSh = ((SwPagePreView*)pVSh)->GetViewShell();
- ASSERT( pSh, "Shell not found" );
+ OSL_ENSURE( pSh, "Shell not found" );
SwWait aWait( *pSh->GetDoc()->GetDocShell(), sal_True );
pSh->StartAction();
@@ -180,7 +154,7 @@ void SwDocStatPage::Update()
}
/*-----------------19.06.97 16.37-------------------
- Zeilennummer aktualisieren
+ upate line number
--------------------------------------------------*/
IMPL_LINK( SwDocStatPage, UpdateHdl, PushButton*, EMPTYARG)
{
@@ -193,3 +167,4 @@ IMPL_LINK( SwDocStatPage, UpdateHdl, PushButton*, EMPTYARG)
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index 4ae83ef60d77..d6379ba4294b 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,9 +39,7 @@
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
#include <svx/htmlmode.hxx>
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
#include <sfx2/app.hxx>
#include <vcl/msgbox.hxx>
@@ -63,7 +62,6 @@ using ::com::sun::star::frame::XFrame;
SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
{
- // const SfxItemSet& rSet = rPg.GetItemSet();
SfxEventNamesItem aItem(SID_EVENTCONFIG);
sal_Bool bHtmlMode = sal_False;
@@ -72,17 +70,15 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
switch( eType )
{
- case MACASSGN_TEXTBAUST: // Textbausteine
- // rPg.SetGetRangeLink( &_GetRangeHdl );
+ case MACASSGN_AUTOTEXT:
aItem.AddEvent( String( SW_RES(STR_EVENT_START_INS_GLOSSARY) ), String(),
SW_EVENT_START_INS_GLOSSARY );
aItem.AddEvent( String( SW_RES(STR_EVENT_END_INS_GLOSSARY) ), String(),
SW_EVENT_END_INS_GLOSSARY);
- // damit der neue Handler aktiv wird!
- // rPg.Reset( rSet );
+ // in order for the new handler to become active!
break;
case MACASSGN_ALLFRM:
- case MACASSGN_GRAPHIC: // Grafiken
+ case MACASSGN_GRAPHIC: // graphics
{
aItem.AddEvent( String( SW_RES(STR_EVENT_IMAGE_ERROR) ), String(),
SVX_EVENT_IMAGE_ERROR);
@@ -91,8 +87,8 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
aItem.AddEvent( String( SW_RES(STR_EVENT_IMAGE_LOAD) ), String(),
SVX_EVENT_IMAGE_LOAD);
}
- // kein break;
- case MACASSGN_FRMURL: // Frm - URL-Attribute
+ // no break;
+ case MACASSGN_FRMURL: // Frm - URL-Attributes
{
if( !bHtmlMode &&
(MACASSGN_FRMURL == eType || MACASSGN_ALLFRM == eType))
@@ -107,15 +103,15 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
SW_EVENT_FRM_MOVE );
}
}
- // kein break;
+ // no break;
case MACASSGN_OLE: // OLE
{
if( !bHtmlMode )
aItem.AddEvent( String( SW_RES(STR_EVENT_OBJECT_SELECT) ), String(),
SW_EVENT_OBJECT_SELECT );
}
- // kein break;
- case MACASSGN_INETFMT: // INetFmt-Attribute
+ // no break;
+ case MACASSGN_INETFMT: // INetFmt-Attributes
{
aItem.AddEvent( String( SW_RES(STR_EVENT_MOUSEOVER_OBJECT) ), String(),
SFX_EVENT_MOUSEOVER_OBJECT );
@@ -161,3 +157,5 @@ sal_Bool SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh,
}
return bRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index df22cbe9e2dc..74f1e206c7f2 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,7 +53,7 @@
#include <view.hxx>
#include <swmodule.hxx>
#include <wrtsh.hxx>
-#include <swundo.hxx> // fuer Undo-Ids
+#include <swundo.hxx> // for Undo-Ids
#include <column.hxx>
#include <fmtfsize.hxx>
#include <swunodef.hxx>
@@ -67,11 +68,6 @@
#include <svx/dlgutil.hxx>
#include "swabstdlg.hxx"
-/*--------------------------------------------------------------------
- Beschreibung: Bereiche einfuegen
- --------------------------------------------------------------------*/
-
-
void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
{
SwWrtShell& rSh = GetShell();
@@ -95,13 +91,13 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
long nWidth = aRect.Width();
aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth));
- // Hoehe=Breite fuer konsistentere Vorschau (analog zu Bereich bearbeiten)
+ // height=width for more consistent preview (analog to edit region)
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractInsertSectionTabDialog* aTabDlg = pFact->CreateInsertSectionTabDialog( DLG_INSERT_SECTION,
&GetView().GetViewFrame()->GetWindow(), aSet , rSh);
- DBG_ASSERT(aTabDlg, "Dialogdiet fail!");
+ OSL_ENSURE(aTabDlg, "Dialogdiet fail!");
aTabDlg->Execute();
rReq.Ignore();
delete aTabDlg;
@@ -147,17 +143,15 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
const sal_Bool bProtect = SFX_ITEM_SET ==
pSet->GetItemState(FN_PARAM_REGION_PROTECT, sal_True, &pItem)?
(sal_Bool)((const SfxBoolItem *)pItem)->GetValue():sal_False;
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
const sal_Bool bEditInReadonly = SFX_ITEM_SET ==
pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, sal_True, &pItem)?
(sal_Bool)((const SfxBoolItem *)pItem)->GetValue():sal_False;
- // <--
aSection.SetProtectFlag(bProtect);
aSection.SetHidden(bHidden);
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
aSection.SetEditInReadonlyFlag(bEditInReadonly);
- // <--
if(SFX_ITEM_SET ==
pSet->GetItemState(FN_PARAM_REGION_CONDITION, sal_True, &pItem))
@@ -208,13 +202,13 @@ IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSectionData*, pSect )
pThis->CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth));
- // Hoehe=Breite fuer konsistentere Vorschau (analog zu Bereich bearbeiten)
+ // height=width for more consistent preview (analog to edit region)
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractInsertSectionTabDialog* aTabDlg = pFact->CreateInsertSectionTabDialog( DLG_INSERT_SECTION,
&pThis->GetView().GetViewFrame()->GetWindow(),aSet , *pThis);
- DBG_ASSERT(aTabDlg, "Dialogdiet fail!");
+ OSL_ENSURE(aTabDlg, "Dialogdiet fail!");
aTabDlg->SetSectionData(*pSectionData);
aTabDlg->Execute();
@@ -223,10 +217,6 @@ IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSectionData*, pSect )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung: Bereich bearbeiten
- --------------------------------------------------------------------*/
-
void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -245,10 +235,10 @@ void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
if(bStart)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractEditRegionDlg* pEditRegionDlg = pFact->CreateEditRegionDlg( MD_EDIT_REGION,
pParentWin, rWrtShell);
- DBG_ASSERT(pEditRegionDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pEditRegionDlg, "Dialogdiet fail!");
if(pItem && pItem->ISA(SfxStringItem))
{
pEditRegionDlg->SelectSection(((const SfxStringItem*)pItem)->GetValue());
@@ -262,3 +252,5 @@ void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
break;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/regionsw.hrc b/sw/source/ui/dialog/regionsw.hrc
index 0535ed46a630..b9d027fa6398 100644
--- a/sw/source/ui/dialog/regionsw.hrc
+++ b/sw/source/ui/dialog/regionsw.hrc
@@ -83,13 +83,11 @@
#define FL_END 52
#define FL_FTN 53
#define IL_BITMAPS 54
-#define ILH_BITMAPS 55
-// --> FME 2004-06-22 #114856# edit in readonly sections
+// #114856# edit in readonly sections
#define FL_PROPERTIES 56
#define CB_EDIT_IN_READONLY 57
-// <--
-/* Globale Resourcen */
+/* global resources */
#define STR_REG_DUPLICATE (RC_REGIONSW_BEGIN+6)
#define STR_INFO_DUPLICATE (RC_REGIONSW_BEGIN+7)
diff --git a/sw/source/ui/dialog/regionsw.src b/sw/source/ui/dialog/regionsw.src
index 9b0671af93f8..97d7dabdd1ec 100644
--- a/sw/source/ui/dialog/regionsw.src
+++ b/sw/source/ui/dialog/regionsw.src
@@ -31,7 +31,7 @@
#include "helpid.h"
/*************************************************************************
- Dialog "Bereich einfuegen"
+ Dialog "paste region"
*************************************************************************/
#define FT_SUBREG_TEXT \
@@ -82,7 +82,7 @@
/*************************************************************************
- Dialog "Bereiche bearbeiten"
+ Dialog "edit region"
*************************************************************************/
ModalDialog MD_EDIT_REGION
@@ -326,12 +326,6 @@ ModalDialog MD_EDIT_REGION
MaskColor = IMAGE_MASK_COLOR ;
DLG_IMAGE_IDLIST
};
- ImageList ILH_BITMAPS
- {
- Prefix = "reh";
- MaskColor = IMAGE_MASK_COLOR ;
- DLG_IMAGE_IDLIST
- };
};
String STR_REG_DUPLICATE
{
diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx
index 7a119caecbf5..1f97f9ddf717 100644
--- a/sw/source/ui/dialog/swabstdlg.cxx
+++ b/sw/source/ui/dialog/swabstdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,8 +46,10 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
static const ::rtl::OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", sal_True));
if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( sLibName ) ) )
fp = ( SwAbstractDialogFactory* (__LOADONCALLAPI*)() )
- aDialogLibrary.getFunctionSymbol( ::rtl::OUString::createFromAscii("CreateDialogFactory") );
+ aDialogLibrary.getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateDialogFactory")));
if ( fp )
return fp();
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/swdialmgr.cxx b/sw/source/ui/dialog/swdialmgr.cxx
index 308411358efa..77132e3e68dc 100644
--- a/sw/source/ui/dialog/swdialmgr.cxx
+++ b/sw/source/ui/dialog/swdialmgr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,7 @@
#include <sfx2/app.hxx>
//copy from core\bastyp\swtypes.cxx
-String aEmptyStr; // Konstante Strings
+String aEmptyStr; // constant strings
ResMgr* pSwResMgr=0;
@@ -52,3 +53,5 @@ ResMgr* SwDialogsResMgr::GetResMgr()
return pSwResMgr;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 5610365e3167..e12ca876d899 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,13 +35,10 @@
#include "swdlgfact.hxx"
#include <svl/style.hxx>
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include "dialog.hrc"
#include "misc.hrc"
#include "chrdlg.hrc"
-#include "fldui.hrc"
#include "table.hrc"
#include "frmui.hrc"
#include "dbui.hrc"
@@ -94,6 +92,7 @@
#include <instable.hxx> //add for SwInsTableDlg
#include <javaedit.hxx> //add for SwJavaEditDialog
#include <linenum.hxx> //add for SwLineNumberingDlg
+#include <titlepage.hxx> //add for SwTitlePageDlg
#include <mailmrge.hxx> //add for SwMailMergeDlg, SwMailMergeCreateFromDlg, SwMailMergeFieldConnectionsDlg
#include <mergetbl.hxx> //add for SwMergeTblDlg
#include <multmrk.hxx> //add for SwMultiTOXMarkDlg
@@ -124,8 +123,8 @@ IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); //add for SwCharDlg, SwFootNoteOption
IMPL_ABSTDLG_BASE(AbstractSwConvertTableDlg_Impl); //add for SwConvertTableDlg
IMPL_ABSTDLG_BASE(AbstractSwInsertDBColAutoPilot_Impl); //add for SwInsertDBColAutoPilot
IMPL_ABSTDLG_BASE(AbstractDropDownFieldDialog_Impl); //add for DropDownFieldDialog
-IMPL_ABSTDLG_BASE(AbstarctSwLabDlg_Impl);//add for SwLabDlg
-IMPL_ABSTDLG_BASE(AbstarctSwSelGlossaryDlg_Impl);//add for SwSelGlossaryDlg
+IMPL_ABSTDLG_BASE(AbstractSwLabDlg_Impl);//add for SwLabDlg
+IMPL_ABSTDLG_BASE(AbstractSwSelGlossaryDlg_Impl);//add for SwSelGlossaryDlg
IMPL_ABSTDLG_BASE(AbstractSwAutoFormatDlg_Impl); //add for SwAutoFormatDlg
IMPL_ABSTDLG_BASE(AbstractSwFldDlg_Impl); //add for SwFldDlg
IMPL_ABSTDLG_BASE(AbstractSwRenameXNamedDlg_Impl); //add for SwRenameXNamedDlg
@@ -145,7 +144,6 @@ IMPL_ABSTDLG_BASE(AbstractInsertSectionTabDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractIndexMarkFloatDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractAuthMarkFloatDlg_Impl);
-// AbstractTabDialog_Impl begin
void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
@@ -165,24 +163,23 @@ void AbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
{
pDlg->SetInputSet( pInSet );
}
+
//From class Window.
void AbstractTabDialog_Impl::SetText( const XubString& rStr )
{
pDlg->SetText( rStr );
}
+
String AbstractTabDialog_Impl::GetText() const
{
return pDlg->GetText();
}
-//add for AbstractTabDialog_Impl end
-
void AbstractSwWordCountDialog_Impl::SetValues(const SwDocStat& rCurrent, const SwDocStat& rDoc)
{
pDlg->SetValues(rCurrent, rDoc);
}
-//add for SwInsertAbstractDlg begin
sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetLevel() const
{
return pDlg->GetLevel();
@@ -191,7 +188,6 @@ sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetPara() const
{
return pDlg->GetPara();
}
-//add for SwInsertAbstractDlg end
//add for SwAddrDlg, SwDropCapsDlg ,SwBackgroundDlg, SwNumFmtDlg SwBorderDlg SwWrapDlg SwFldEditDlg begin
const SfxItemSet* AbstractSfxDialog_Impl::GetOutputItemSet() const
@@ -203,26 +199,22 @@ void AbstractSfxDialog_Impl::SetText( const XubString& rStr )
{
pDlg->SetText( rStr );
}
+
String AbstractSfxDialog_Impl::GetText() const
{
return pDlg->GetText();
}
-//add for SwAddrDlg, SwDropCapsDlg ,SwBackgroundDlg, SwNumFmtDlg SwBorderDlg SwWrapDlg SwFldEditDlg end
-
-//add for SwAsciiFilterDlg begin
void AbstractSwAsciiFilterDlg_Impl::FillOptions( SwAsciiOptions& rOptions )
{
pDlg->FillOptions(rOptions);
}
-//add for SwAsciiFilterDlg end
-//add for SwSplitTblDlg
sal_uInt16 AbstractSplitTableDialog_Impl::GetSplitMode()
{
return pDlg->GetSplitMode();
}
-//add for SwBreakDlg begin
+
String AbstractSwBreakDlg_Impl::GetTemplateName()
{
return pDlg->GetTemplateName();
@@ -237,17 +229,13 @@ sal_uInt16 AbstractSwBreakDlg_Impl:: GetPageNumber()
{
return pDlg->GetPageNumber();
}
-//add for SwBreakDlg end
-//add for SwConvertTableDlg begin
void AbstractSwConvertTableDlg_Impl::GetValues( sal_Unicode& rDelim,SwInsertTableOptions& rInsTblFlags,
SwTableAutoFmt *& prTAFmt )
{
pDlg->GetValues(rDelim,rInsTblFlags, prTAFmt);
}
-//add for SwConvertTableDlg end
-//add for SwInsertDBColAutoPilot begin
void AbstractSwInsertDBColAutoPilot_Impl::DataToDoc( const uno::Sequence< uno::Any >& rSelection,
uno::Reference< sdbc::XDataSource> rxSource,
uno::Reference< sdbc::XConnection> xConnection,
@@ -255,86 +243,77 @@ void AbstractSwInsertDBColAutoPilot_Impl::DataToDoc( const uno::Sequence< uno::A
{
pDlg->DataToDoc(rSelection, rxSource, xConnection, xResultSet);
}
-//add for SwInsertDBColAutoPilot end
-// add for DropDownFieldDialog begin
ByteString AbstractDropDownFieldDialog_Impl::GetWindowState( sal_uLong nMask ) const
{
return pDlg->GetWindowState(nMask);
}
+
void AbstractDropDownFieldDialog_Impl::SetWindowState( const ByteString& rStr )
{
pDlg->SetWindowState(rStr);
}
-//add for DropDownFieldDialog end
-//add for SwLabDlg begin
-
-void AbstarctSwLabDlg_Impl::SetCurPageId( sal_uInt16 nId )
+void AbstractSwLabDlg_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
-const SfxItemSet* AbstarctSwLabDlg_Impl::GetOutputItemSet() const
+const SfxItemSet* AbstractSwLabDlg_Impl::GetOutputItemSet() const
{
return pDlg->GetOutputItemSet();
}
-const sal_uInt16* AbstarctSwLabDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstractSwLabDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
-void AbstarctSwLabDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
+void AbstractSwLabDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
{
pDlg->SetInputSet( pInSet );
}
-void AbstarctSwLabDlg_Impl::SetText( const XubString& rStr )
+void AbstractSwLabDlg_Impl::SetText( const XubString& rStr )
{
pDlg->SetText( rStr );
}
-String AbstarctSwLabDlg_Impl::GetText() const
+
+String AbstractSwLabDlg_Impl::GetText() const
{
return pDlg->GetText();
}
-const String& AbstarctSwLabDlg_Impl::GetBusinessCardStr() const
+
+const String& AbstractSwLabDlg_Impl::GetBusinessCardStr() const
{
return pDlg->GetBusinessCardStr();
}
-Printer * AbstarctSwLabDlg_Impl::GetPrt()
+
+Printer * AbstractSwLabDlg_Impl::GetPrt()
{
return pDlg->GetPrt();
}
-//add for SwLabDlg end
-
-//add for SwSelGlossaryDlg begin
-
-void AbstarctSwSelGlossaryDlg_Impl::InsertGlos(const String &rRegion, const String &rGlosName)
+void AbstractSwSelGlossaryDlg_Impl::InsertGlos(const String &rRegion, const String &rGlosName)
{
pDlg->InsertGlos( rRegion, rGlosName );
}
-sal_uInt16 AbstarctSwSelGlossaryDlg_Impl::GetSelectedIdx() const
+
+sal_uInt16 AbstractSwSelGlossaryDlg_Impl::GetSelectedIdx() const
{
return pDlg->GetSelectedIdx();
}
-void AbstarctSwSelGlossaryDlg_Impl::SelectEntryPos(sal_uInt16 nIdx)
+
+void AbstractSwSelGlossaryDlg_Impl::SelectEntryPos(sal_uInt16 nIdx)
{
pDlg->SelectEntryPos( nIdx );
}
-//add for SwSelGlossaryDlg end
-
-//add for SwAutoFormatDlg begin
-
void AbstractSwAutoFormatDlg_Impl::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const
{
pDlg->FillAutoFmtOfIndex(rToFill);
}
-//add for SwAutoFormatDlg end
-//add for SwFldDlg begin
void AbstractSwFldDlg_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
@@ -359,10 +338,12 @@ void AbstractSwFldDlg_Impl::SetText( const XubString& rStr )
{
pDlg->SetText( rStr );
}
+
String AbstractSwFldDlg_Impl::GetText() const
{
return pDlg->GetText();
}
+
void AbstractSwFldDlg_Impl::Start( sal_Bool bShowl )
{
pDlg->Start( bShowl );
@@ -377,10 +358,12 @@ void AbstractSwFldDlg_Impl::ReInitDlg()
{
pDlg->ReInitDlg();
}
+
void AbstractSwFldDlg_Impl::ActivateDatabasePage()
{
pDlg->ActivateDatabasePage();
}
+
Window* AbstractSwFldDlg_Impl::GetWindow()
{
return (Window*)pDlg;
@@ -389,9 +372,6 @@ void AbstractSwFldDlg_Impl::ShowPage( sal_uInt16 nId )
{
pDlg->ShowPage(nId);
}
-//add for SwFldD end
-
-//add for SwRenameXNamedDlg begin
void AbstractSwRenameXNamedDlg_Impl::SetForbiddenChars( const String& rSet )
{
@@ -404,17 +384,12 @@ void AbstractSwRenameXNamedDlg_Impl::SetAlternativeAccess(
{
pDlg->SetAlternativeAccess( xSecond, xThird);
}
-//add for SwRenameXNamedDlg end
-
-//add for SwModalRedlineAcceptDlg begin
void AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( sal_Bool bAccept )
{
pDlg->AcceptAll( bAccept);
}
-//add for SwModalRedlineAcceptDlg end
-// AbstractGlossaryDlg_Impl begin
String AbstractGlossaryDlg_Impl::GetCurrGrpName() const
{
return pDlg->GetCurrGrpName();
@@ -424,9 +399,7 @@ String AbstractGlossaryDlg_Impl::GetCurrShortName() const
{
return pDlg->GetCurrShortName();
}
-// AbstractGlossaryDlg_Impl end
-// AbstractFldInputDlg_Impl begin
void AbstractFldInputDlg_Impl::SetWindowState( const ByteString& rStr )
{
pDlg->SetWindowState( rStr );
@@ -436,9 +409,7 @@ ByteString AbstractFldInputDlg_Impl::GetWindowState( sal_uLong nMask ) const
{
return pDlg->GetWindowState( nMask );
}
-// AbstractFldInputDlg_Impl end
-// AbstractInsFootNoteDlg_Impl begin
String AbstractInsFootNoteDlg_Impl::GetFontName()
{
return pDlg->GetFontName();
@@ -447,6 +418,7 @@ sal_Bool AbstractInsFootNoteDlg_Impl::IsEndNote()
{
return pDlg->IsEndNote();
}
+
String AbstractInsFootNoteDlg_Impl::GetStr()
{
return pDlg->GetStr();
@@ -455,13 +427,12 @@ void AbstractInsFootNoteDlg_Impl::SetHelpId( const rtl::OString& sHelpId )
{
pDlg->SetHelpId( sHelpId );
}
+
void AbstractInsFootNoteDlg_Impl::SetText( const XubString& rStr )
{
pDlg->SetText( rStr );
}
-// AbstractInsFootNoteDlg_Impl end
-// AbstractInsertGrfRulerDlg_Impl begin
String AbstractInsertGrfRulerDlg_Impl::GetGraphicName()
{
return pDlg->GetGraphicName();
@@ -474,22 +445,19 @@ sal_Bool AbstractInsertGrfRulerDlg_Impl::HasImages() const
{
return pDlg->HasImages();
}
-// AbstractInsertGrfRulerDlg_Impl end
-// AbstractInsTableDlg_Impl begin
void AbstractInsTableDlg_Impl::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName,
SwTableAutoFmt *& prTAFmt )
{
pDlg->GetValues( rName, rRow, rCol, rInsTblFlags, rTableAutoFmtName, prTAFmt);
}
-// AbstractInsTableDlg_Impl end
-// AbstractJavaEditDialog_Impl begin
String AbstractJavaEditDialog_Impl::GetText()
{
return pDlg->GetText();
}
+
String AbstractJavaEditDialog_Impl::GetType()
{
return pDlg->GetType();
@@ -506,13 +474,12 @@ sal_Bool AbstractJavaEditDialog_Impl::IsUpdate()
{
return pDlg->IsUpdate();
}
-// AbstractJavaEditDialog_Impl end
-// AbstractMailMergeDlg_Impl begin
sal_uInt16 AbstractMailMergeDlg_Impl::GetMergeType()
{
return pDlg->GetMergeType();
}
+
const ::rtl::OUString& AbstractMailMergeDlg_Impl::GetSaveFilter() const
{
return pDlg->GetSaveFilter();
@@ -522,78 +489,72 @@ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > AbstractMail
{
return pDlg->GetSelection();
}
+
uno::Reference< sdbc::XResultSet> AbstractMailMergeDlg_Impl::GetResultSet() const
{
return pDlg->GetResultSet();
}
-// AbstractMailMergeDlg_Impl end
-// AbstractMailMergeCreateFromDlg_Impl begin
+
sal_Bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const
{
return pDlg->IsThisDocument();
}
-// AbstractMailMergeCreateFromDlg_Impl end
-//AbstractMailMergeFieldConnectionsDlg_Impl begin
+
sal_Bool AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const
{
return pDlg->IsUseExistingConnections();
}
-// AbstractMailMergeFieldConnectionsDlg_Impl end
-// AbstractMultiTOXTabDialog_Impl begin
SwForm* AbstractMultiTOXTabDialog_Impl::GetForm(CurTOXType eType)
{
return pDlg->GetForm(eType);
}
+
CurTOXType AbstractMultiTOXTabDialog_Impl::GetCurrentTOXType() const
{
return pDlg->GetCurrentTOXType();
}
+
SwTOXDescription& AbstractMultiTOXTabDialog_Impl::GetTOXDescription(CurTOXType eTOXTypes)
{
return pDlg->GetTOXDescription(eTOXTypes);
}
+
const SfxItemSet* AbstractMultiTOXTabDialog_Impl::GetOutputItemSet() const
{
return pDlg->GetOutputItemSet();
}
-// AbstractMultiTOXTabDialog_Impl end
-// AbstractEditRegionDlg_Impl begin
void AbstractEditRegionDlg_Impl::SelectSection(const String& rSectionName)
{
pDlg->SelectSection(rSectionName);
}
-// AbstractEditRegionDlg_Impl end
-//AbstractInsertSectionTabDialog_Impl begin
+
void
AbstractInsertSectionTabDialog_Impl::SetSectionData(SwSectionData const& rSect)
{
pDlg->SetSectionData(rSect);
}
-// AbstractInsertSectionTabDialog_Impl end
-//AbstractIndexMarkFloatDlg_Impl begin
void AbstractIndexMarkFloatDlg_Impl::ReInitDlg(SwWrtShell& rWrtShell)
{
pDlg->ReInitDlg( rWrtShell);
}
+
Window* AbstractIndexMarkFloatDlg_Impl::GetWindow()
{
return (Window*)pDlg;
}
-// AbstractIndexMarkFloatDlg_Impl end
-//AbstractAuthMarkFloatDlg_Impl begin
void AbstractAuthMarkFloatDlg_Impl::ReInitDlg(SwWrtShell& rWrtShell)
{
pDlg->ReInitDlg( rWrtShell);
}
+
Window* AbstractAuthMarkFloatDlg_Impl::GetWindow()
{
return (Window*)pDlg;
}
-// AbstractAuthMarkFloatDlg_Impl end
AbstractMailMergeWizard_Impl::~AbstractMailMergeWizard_Impl()
{
@@ -612,13 +573,15 @@ long AbstractMailMergeWizard_Impl::GetResult()
return pDlg->GetResult();
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
IMPL_LINK( AbstractMailMergeWizard_Impl, EndDialogHdl, SwMailMergeWizard*, pDialog )
#else
IMPL_LINK( AbstractMailMergeWizard_Impl, EndDialogHdl, SwMailMergeWizard*, EMPTYARG )
#endif
{
- DBG_ASSERT( pDialog == pDlg, "wrong dialog passed to EndDialogHdl!" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ENSURE( pDialog == pDlg, "wrong dialog passed to EndDialogHdl!" );
+#endif
aEndDlgHdl.Call( this );
aEndDlgHdl = Link();
@@ -630,6 +593,7 @@ void AbstractMailMergeWizard_Impl::SetReloadDocument(const String& rURL)
{
pDlg->SetReloadDocument(rURL);
}
+
const String& AbstractMailMergeWizard_Impl::GetReloadDocument() const
{
return pDlg->GetReloadDocument();
@@ -638,20 +602,18 @@ sal_Bool AbstractMailMergeWizard_Impl::ShowPage( sal_uInt16 nLevel )
{
return pDlg->skipUntil(nLevel);
}
+
sal_uInt16 AbstractMailMergeWizard_Impl::GetRestartPage() const
{
return pDlg->GetRestartPage();
}
-//-------------- SwAbstractDialogFactory implementation--------------
-
AbstractSwWordCountDialog* SwAbstractDialogFactory_Impl::CreateSwWordCountDialog(Window* pParent)
{
SwWordCountDialog* pDlg = new SwWordCountDialog( pParent );
return new AbstractSwWordCountDialog_Impl( pDlg );
}
-//add for SwInsertAbstractDlg begin
AbstractSwInsertAbstractDlg * SwAbstractDialogFactory_Impl::CreateSwInsertAbstractDlg( Window* pParent,
int nResId )
{
@@ -669,7 +631,6 @@ AbstractSwInsertAbstractDlg * SwAbstractDialogFactory_Impl::CreateSwInsertAbstra
return new AbstractSwInsertAbstractDlg_Impl( pDlg );
return 0;
}
-//add for SwInsertAbstractDlg end
SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent,
const SfxItemSet& rSet,
@@ -701,7 +662,6 @@ SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSfxDialog( Window* pParen
return 0;
}
-// add for SwAsciiFilterDlg begin
AbstractSwAsciiFilterDlg* SwAbstractDialogFactory_Impl::CreateSwAsciiFilterDlg( Window* pParent,
SwDocShell& rDocSh,
SvStream* pStream,
@@ -723,9 +683,6 @@ AbstractSwAsciiFilterDlg* SwAbstractDialogFactory_Impl::CreateSwAsciiFilterDlg(
return 0;
}
-//add for SwAsciiFilterDlg end
-
-// add for SwInsertBookmarkDlg begin
VclAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg( Window *pParent,
SwWrtShell &rSh,
SfxRequest& rReq,
@@ -747,10 +704,6 @@ VclAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg( Wind
return 0;
}
-//add for SwInsertBookmarkDlg end
-
-//add for SwBreakDlg begin
-
AbstractSwBreakDlg * SwAbstractDialogFactory_Impl::CreateSwBreakDlg ( Window *pParent,
SwWrtShell &rSh,
int nResId )
@@ -770,9 +723,7 @@ AbstractSwBreakDlg * SwAbstractDialogFactory_Impl::CreateSwBreakDlg ( Window *pP
return new AbstractSwBreakDlg_Impl( pDlg );
return 0;
}
-//add for SwBreakDlg end
-// add for SwChangeDBDlg begin
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg( SwView& rVw, int nResId )
{
Dialog* pDlg=NULL;
@@ -791,9 +742,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg( SwView&
return 0;
}
-// add for SwChangeDBDlg end
-// add for SwCharDlg begin
SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
const String* pFmtStr , sal_Bool bIsDrwTxtDlg )
{
@@ -813,9 +762,7 @@ SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwCharDlg(Window* pP
return 0;
}
-// add for SwCharDlg end
-//add for SwConvertTableDlg begin
AbstractSwConvertTableDlg* SwAbstractDialogFactory_Impl::CreateSwConvertTableDlg (
SwView& rView,int nResId, bool bToTable )
{
@@ -834,9 +781,6 @@ AbstractSwConvertTableDlg* SwAbstractDialogFactory_Impl::CreateSwConvertTableDlg
return 0;
}
-//add for SwConvertTableDlg end
-
-//add for SwCaptionDialog begin
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId)
{
Dialog* pDlg=NULL;
@@ -854,9 +798,6 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwCaptionDialog ( Window
return new VclAbstractDialog_Impl( pDlg );
return 0;
}
-//add for SwCaptionDialog end
-
-//add for SwInsertDBColAutoPilot begin
AbstractSwInsertDBColAutoPilot* SwAbstractDialogFactory_Impl::CreateSwInsertDBColAutoPilot( SwView& rView, // add for SwInsertDBColAutoPilot
uno::Reference< sdbc::XDataSource> rxSource,
@@ -878,8 +819,7 @@ AbstractSwInsertDBColAutoPilot* SwAbstractDialogFactory_Impl::CreateSwInsertDBCo
return new AbstractSwInsertDBColAutoPilot_Impl( pDlg );
return 0;
}
-//add for SwInsertDBColAutoPilot end
-//add for SwFootNoteOptionDlg begin
+
SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId)
{
SfxTabDialog* pDlg=NULL;
@@ -897,10 +837,6 @@ SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg(
return new AbstractTabDialog_Impl( pDlg );
return 0;
}
-//add for SwFootNoteOptionDlg begin
-
-
-//add for DropDownFieldDialog begin
AbstractDropDownFieldDialog * SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog
SwField* pField,int nResId, sal_Bool bNextButton )
@@ -920,9 +856,7 @@ AbstractDropDownFieldDialog * SwAbstractDialogFactory_Impl::CreateDropDownField
return new AbstractDropDownFieldDialog_Impl( pDlg );
return 0;
}
-//add for DropDownFieldDialog end
-//add for SwEnvDlg begin
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet,
SwWrtShell* pWrtSh, Printer* pPrt,
sal_Bool bInsert,int nResId ) //add for SwEnvDlg
@@ -942,11 +876,8 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( Window* pPa
return new AbstractTabDialog_Impl( pDlg );
return 0;
}
-//add for SwEnvDlg end
-//add for SwLabDlg begin
-
-AbstarctSwLabDlg* SwAbstractDialogFactory_Impl::CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
+AbstractSwLabDlg* SwAbstractDialogFactory_Impl::CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId )
{
SwLabDlg* pDlg=NULL;
@@ -961,7 +892,7 @@ AbstarctSwLabDlg* SwAbstractDialogFactory_Impl::CreateSwLabDlg ( Window* pParent
}
if ( pDlg )
- return new AbstarctSwLabDlg_Impl( pDlg );
+ return new AbstractSwLabDlg_Impl( pDlg );
return 0;
}
@@ -970,9 +901,7 @@ SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod ()
return SwLabDlg::UpdateFieldInformation;
}
-//add for SwLabDlg end
-//add for SwParaDlg begin
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwParaDlg ( Window *pParent, SwView& rVw,
const SfxItemSet& rCoreSet ,
sal_uInt8 nDialogMode,
@@ -996,9 +925,7 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwParaDlg ( Window *pP
return new AbstractTabDialog_Impl( pDlg );
return 0;
}
-//add for SwParaDlg end
-//add for SwTableHeightDlg SwSortDlg begin
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclAbstractDialog ( Window *pParent, SwWrtShell &rSh, int nResId )
{
Dialog* pDlg=NULL;
@@ -1025,16 +952,13 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclAbstractDialog ( Wind
return new VclAbstractDialog_Impl( pDlg );
return 0;
}
-//add for SwTableHeightDlg SwSortDlg ,end
-//add for SwSplitTblDlg begin
+
AbstractSplitTableDialog * SwAbstractDialogFactory_Impl::CreateSplitTblDialog ( Window *pParent, SwWrtShell &rSh )
{
return new AbstractSplitTableDialog_Impl( new SwSplitTblDlg( pParent, rSh) );
}
-//add SwSplitTblDlg end
-//add for SwSelGlossaryDlg begin
-AbstarctSwSelGlossaryDlg * SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId )
+AbstractSwSelGlossaryDlg * SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId )
{
SwSelGlossaryDlg* pDlg=NULL;
switch ( nResId )
@@ -1048,13 +972,10 @@ AbstarctSwSelGlossaryDlg * SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg
}
if ( pDlg )
- return new AbstarctSwSelGlossaryDlg_Impl( pDlg );
+ return new AbstractSwSelGlossaryDlg_Impl( pDlg );
return 0;
}
-//add for SwSelGlossaryDlg end
-
-//add for SwAutoFormatDlg begin
AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell,
int nResId,
sal_Bool bSetAutoFmt,
@@ -1075,9 +996,7 @@ AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg( W
return new AbstractSwAutoFormatDlg_Impl( pDlg );
return 0;
}
-//add for SwAutoFormatDlg end
-//add for SwBorderDlg begin
SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, sal_uInt16 nType,int nResId )
{
SfxModalDialog* pDlg=NULL;
@@ -1094,9 +1013,7 @@ SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pPa
return new AbstractSfxDialog_Impl( pDlg );
return 0;
}
-//add for SwBorderDlg end
-//add for SwWrapDlg begin
SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId )
{
SfxModalDialog* pDlg=NULL;
@@ -1113,9 +1030,7 @@ SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pPare
return new AbstractSfxDialog_Impl( pDlg );
return 0;
}
-//add for SwWrapDlg end
-//add for SwTableWidthDlg begin
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwTableWidthDlg ( Window *pParent, SwTableFUNC &rFnc , int nResId )
{
Dialog* pDlg=NULL;
@@ -1133,9 +1048,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwTableWidthDlg ( Window
return new VclAbstractDialog_Impl( pDlg );
return 0;
}
-//add for SwTableWidthDlg end
- //add for SwTableTabDlg begin
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTableTabDlg( Window* pParent, SfxItemPool& Pool,
const SfxItemSet* pItemSet, SwWrtShell* pSh,int nResId )
{
@@ -1154,9 +1067,7 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTableTabDlg( Window*
return new AbstractTabDialog_Impl( pDlg );
return 0;
}
- //add for SwTableTabDlg end
-//add for SwFldDlg begin
AbstractSwFldDlg * SwAbstractDialogFactory_Impl::CreateSwFldDlg ( SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent, int nResId )
{
SwFldDlg* pDlg=NULL;
@@ -1174,9 +1085,7 @@ AbstractSwFldDlg * SwAbstractDialogFactory_Impl::CreateSwFldDlg ( SfxBindings* p
return new AbstractSwFldDlg_Impl( pDlg );
return 0;
}
-//add for SwFldDlg end
-//add for SwFldEditDlg begin
SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwFldEditDlg ( SwView& rVw, int nResId )
{
SfxModalDialog* pDlg=NULL;
@@ -1193,9 +1102,7 @@ SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwFldEditDlg ( SwView&
return new AbstractSfxDialog_Impl( pDlg );
return 0;
}
-//add for SwFldEditDlg
-//add for SwRenameXNamedDlg begin
AbstractSwRenameXNamedDlg * SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDlg( Window* pParent,
STAR_REFERENCE( container::XNamed ) & xNamed,
STAR_REFERENCE( container::XNameAccess ) & xNameAccess,int nResId )
@@ -1215,9 +1122,6 @@ AbstractSwRenameXNamedDlg * SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDl
return 0;
}
-//add for SwRenameXNamedDlg end
-
-//add for SwModalRedlineAcceptDlg begin
AbstractSwModalRedlineAcceptDlg * SwAbstractDialogFactory_Impl::CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId )
{
SwModalRedlineAcceptDlg* pDlg=NULL;
@@ -1234,7 +1138,6 @@ AbstractSwModalRedlineAcceptDlg * SwAbstractDialogFactory_Impl::CreateSwModalRed
return new AbstractSwModalRedlineAcceptDlg_Impl( pDlg );
return 0;
}
-//add for SwModalRedlineAcceptDlg end
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwVclDialog( int nResId,
Window* pParent, sal_Bool& rWithPrev ) //add for SwMergeTblDlg
@@ -1252,6 +1155,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwVclDialog( int nResId,
return new VclAbstractDialog_Impl( pDlg );
return 0;
}
+
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog( int nResId,
SfxViewFrame *pFrame, Window *pParent,
const SfxItemSet& rCoreSet,
@@ -1355,6 +1259,14 @@ AbstractInsFootNoteDlg* SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg( int
return 0;
}
+VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateTitlePageDlg ( Window *pParent )
+{
+ Dialog* pDlg = new SwTitlePageDlg( pParent );
+ if ( pDlg )
+ return new VclAbstractDialog_Impl( pDlg );
+ return 0;
+}
+
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclSwViewDialog( int nResId,
SwView& rView, sal_Bool /*bCol*/ ) //add for SwInsRowColDlg, SwLineNumberingDlg
{
@@ -1446,6 +1358,7 @@ AbstractMailMergeDlg * SwAbstractDialogFactory_Impl::CreateMailMergeDlg( int nRe
return new AbstractMailMergeDlg_Impl( pDlg );
return 0;
}
+
AbstractMailMergeCreateFromDlg * SwAbstractDialogFactory_Impl::CreateMailMergeCreateFromDlg( int nResId,
Window* pParent ) //add for SwMailMergeCreateFromDlg
{
@@ -1462,6 +1375,7 @@ AbstractMailMergeCreateFromDlg * SwAbstractDialogFactory_Impl::CreateMailMergeCr
return new AbstractMailMergeCreateFromDlg_Impl( pDlg );
return 0;
}
+
AbstractMailMergeFieldConnectionsDlg * SwAbstractDialogFactory_Impl::CreateMailMergeFieldConnectionsDlg( int nResId,
Window* pParent ) //add for SwMailMergeFieldConnectionsDlg
{
@@ -1495,6 +1409,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXMarkDlg( int nRe
return new VclAbstractDialog_Impl( pDlg );
return 0;
}
+
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTabDialog( int nResId,
Window* pParent,
const SfxItemSet* pSwItemSet,
@@ -1517,6 +1432,7 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTabDialog( int nResI
return new AbstractTabDialog_Impl( pDlg );
return 0;
}
+
AbstractMultiTOXTabDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog( int nResId,
Window* pParent, const SfxItemSet& rSet,
SwWrtShell &rShell,
@@ -1536,6 +1452,7 @@ AbstractMultiTOXTabDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialo
return new AbstractMultiTOXTabDialog_Impl( pDlg );
return 0;
}
+
AbstractEditRegionDlg * SwAbstractDialogFactory_Impl::CreateEditRegionDlg( int nResId,
Window* pParent, SwWrtShell& rWrtSh ) //add for SwEditRegionDlg
{
@@ -1552,6 +1469,7 @@ AbstractEditRegionDlg * SwAbstractDialogFactory_Impl::CreateEditRegionDlg( int n
return new AbstractEditRegionDlg_Impl( pDlg );
return 0;
}
+
AbstractInsertSectionTabDialog * SwAbstractDialogFactory_Impl::CreateInsertSectionTabDialog( int nResId,
Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh) //add for SwInsertSectionTabDialog
{
@@ -1632,6 +1550,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateIndexMarkModalDlg( int n
return new VclAbstractDialog_Impl( pDlg );
return 0;
}
+
//add for SwIndexMarkModalDlg end
AbstractMailMergeWizard* SwAbstractDialogFactory_Impl::CreateMailMergeWizard(
SwView& rView, SwMailMergeConfigItem& rConfigItem)
@@ -1696,7 +1615,7 @@ CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nI
break;
case RID_SW_TP_OPTTEST_PAGE :
case TP_OPTTEST_PAGE :
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
pRet = SwTestTabPage::Create;
#endif
break;
@@ -1740,3 +1659,5 @@ GetTabPageRanges SwAbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 5ffd7fcd74ad..2c5709d85004 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,7 +28,6 @@
#ifndef _SW_DLGFACT_HXX
#define _SW_DLGFACT_HXX
-// include ---------------------------------------------------------------
#include "swabstdlg.hxx"
class SwSaveLabelDlg;
@@ -181,9 +181,9 @@ class AbstractDropDownFieldDialog_Impl : public AbstractDropDownFieldDialog //ad
//add for DropDownFieldDialog end
-class AbstarctSwLabDlg_Impl : public AbstarctSwLabDlg
+class AbstractSwLabDlg_Impl : public AbstractSwLabDlg
{
- DECL_ABSTDLG_BASE(AbstarctSwLabDlg_Impl,SwLabDlg)
+ DECL_ABSTDLG_BASE(AbstractSwLabDlg_Impl,SwLabDlg)
virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
@@ -197,9 +197,9 @@ class AbstarctSwLabDlg_Impl : public AbstarctSwLabDlg
//add for SwLabDlg end
//add for SwSelGlossaryDlg begin
-class AbstarctSwSelGlossaryDlg_Impl : public AbstarctSwSelGlossaryDlg
+class AbstractSwSelGlossaryDlg_Impl : public AbstractSwSelGlossaryDlg
{
- DECL_ABSTDLG_BASE(AbstarctSwSelGlossaryDlg_Impl,SwSelGlossaryDlg)
+ DECL_ABSTDLG_BASE(AbstractSwSelGlossaryDlg_Impl,SwSelGlossaryDlg)
virtual void InsertGlos(const String &rRegion, const String &rGlosName); // inline
virtual sal_uInt16 GetSelectedIdx() const; // inline
virtual void SelectEntryPos(sal_uInt16 nIdx); // inline
@@ -454,7 +454,7 @@ public:
virtual AbstractDropDownFieldDialog * CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog
SwField* pField,int nResId, sal_Bool bNextButton = sal_False );
virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert,int nResId ); //add for SwEnvDlg
- virtual AbstarctSwLabDlg* CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
+ virtual AbstractSwLabDlg* CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId );
virtual SwLabDlgMethod GetSwLabDlgStaticMethod (); //add for SwLabDlg
@@ -467,7 +467,7 @@ public:
sal_Bool bDraw = sal_False,
sal_uInt16 nDefPage = 0);
- virtual AbstarctSwSelGlossaryDlg * CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId ); //add for SwSelGlossaryDlg
+ virtual AbstractSwSelGlossaryDlg * CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId ); //add for SwSelGlossaryDlg
virtual VclAbstractDialog * CreateVclAbstractDialog ( Window * pParent, SwWrtShell &rSh, int nResId ); //add for SwTableHeightDlg SwSortDlg
virtual AbstractSplitTableDialog * CreateSplitTblDialog ( Window * pParent, SwWrtShell &rSh ); //add for SwSplitTblDlg
@@ -514,6 +514,7 @@ public:
SwField* pField, sal_Bool bNextButton = sal_False ); //add for SwFldInputDlg
virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId,
Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False); //add for SwInsFootNoteDlg
+ virtual VclAbstractDialog * CreateTitlePageDlg ( Window * pParent );
virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
SwView& rView, sal_Bool bCol = sal_False ); //add for SwInsRowColDlg, SwLineNumberingDlg
virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
@@ -582,3 +583,5 @@ struct SwDialogsResMgr
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx
index 3957a233f5e2..0c2bdd4c3a56 100644
--- a/sw/source/ui/dialog/swuiexp.cxx
+++ b/sw/source/ui/dialog/swuiexp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,5 @@ extern "C"
return ::swui::GetFactory();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/swwrtshitem.cxx b/sw/source/ui/dialog/swwrtshitem.cxx
index 8bc635cf769c..1385705b9488 100644
--- a/sw/source/ui/dialog/swwrtshitem.cxx
+++ b/sw/source/ui/dialog/swwrtshitem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,3 +50,5 @@ SfxPoolItem* SwWrtShellItem::Clone( SfxItemPool * /*pPool*/ ) const
{
return new SwWrtShellItem( *this );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index e0ec8cdf2a0b..4454b3a1ddd1 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,13 +55,13 @@
#include <IMark.hxx>
#include <section.hxx>
#include <docary.hxx>
-#include <doc.hxx> // fuers SwSectionFmt-Array
+#include <doc.hxx> // for the SwSectionFmt-Array
#include <basesh.hxx>
#include <wdocsh.hxx>
#include <view.hxx>
#include <swmodule.hxx>
#include <wrtsh.hxx>
-#include <swundo.hxx> // fuer Undo-Ids
+#include <swundo.hxx> // for Undo-Ids
#include <column.hxx>
#include <fmtfsize.hxx>
#include <swunodef.hxx>
@@ -148,9 +149,6 @@ void lcl_FillSubRegionList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pA
}
}
-/* -----------------25.06.99 15:38-------------------
-
- --------------------------------------------------*/
class SwTestPasswdDlg : public SfxPasswordDialog
{
public:
@@ -162,7 +160,7 @@ public:
};
/*----------------------------------------------------------------------------
- Beschreibung: User Data Klasse fuer Bereichsinformationen
+ Description: user data class for region information
----------------------------------------------------------------------------*/
class SectRepr
@@ -177,9 +175,9 @@ private:
SvxFrameDirectionItem m_FrmDirItem;
SvxLRSpaceItem m_LRSpaceItem;
sal_uInt16 m_nArrPos;
- // zeigt an, ob evtl. Textinhalt im Bereich ist
+ // shows, if maybe textcontent is in the region
bool m_bContent : 1;
- // fuer Multiselektion erst markieren, dann mit der TreeListBox arbeiten!
+ // for multiselection, mark at first, then work with TreeListBox!
bool m_bSelected : 1;
uno::Sequence<sal_Int8> m_TempPasswd;
@@ -255,7 +253,7 @@ void SectRepr::SetFile( const String& rFile )
if( rFile.Len() || sSub.Len() )
{
sNewFile += sfx2::cTokenSeperator;
- if( rFile.Len() ) // Filter nur mit FileName
+ if( rFile.Len() ) // Filter only with FileName
sNewFile += sOldFileName.GetToken( 1, sfx2::cTokenSeperator );
sNewFile += sfx2::cTokenSeperator;
@@ -349,14 +347,9 @@ String SectRepr::GetSubRegion() const
return sLinkFile;
}
-
-
/*----------------------------------------------------------------------------
- Beschreibung: Dialog Bearbeiten Bereiche
+ Description: dialog edit regions
----------------------------------------------------------------------------*/
-
-//---------------------------------------------------------------------
-
SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
: SfxModalDialog( pParent, SW_RES(MD_EDIT_REGION) ),
aNameFL ( this, SW_RES( FL_NAME ) ),
@@ -383,10 +376,9 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
aConditionFT ( this, SW_RES( FT_CONDITION ) ),
aConditionED ( this, SW_RES( ED_CONDITION ) ),
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
aPropertiesFL ( this, SW_RES( FL_PROPERTIES ) ),
aEditInReadonlyCB ( this, SW_RES( CB_EDIT_IN_READONLY ) ),
- // <--
aOK ( this, SW_RES( PB_OK ) ),
aCancel ( this, SW_RES( PB_CANCEL ) ),
@@ -395,7 +387,6 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
aHelp ( this, SW_RES( PB_HELP ) ),
aImageIL ( SW_RES(IL_BITMAPS)),
- aImageILH ( SW_RES(ILH_BITMAPS)),
rSh( rWrtSh ),
pAktEntry( 0 ),
@@ -415,9 +406,8 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
aPasswdCB.SetClickHdl ( LINK( this, SwEditRegionDlg, ChangePasswdHdl));
aPasswdPB.SetClickHdl ( LINK( this, SwEditRegionDlg, ChangePasswdHdl));
aHideCB.SetClickHdl ( LINK( this, SwEditRegionDlg, ChangeHideHdl));
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
aEditInReadonlyCB.SetClickHdl ( LINK( this, SwEditRegionDlg, ChangeEditInReadonlyHdl));
- // <--
aOptionsPB.Show();
aOptionsPB.SetClickHdl ( LINK( this, SwEditRegionDlg, OptionsHdl));
@@ -448,11 +438,10 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
aDDECB.SetClickHdl ( LINK( this, SwEditRegionDlg, DDEHdl ));
- //Ermitteln der vorhandenen Bereiche
pCurrSect = rSh.GetCurrSection();
RecurseList( 0, 0 );
- //falls der Cursor nicht in einem Bereich steht,
- //wird immer der erste selektiert
+ // if the cursor is not in a region
+ // the first one will always be selected
if( !aTree.FirstSelected() && aTree.First() )
aTree.Select( aTree.First() );
aTree.Show();
@@ -462,9 +451,7 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
aPasswdPB.SetAccessibleRelationLabeledBy(&aPasswdCB);
aSubRegionED.SetAccessibleName(aSubRegionFT.GetText());
}
-/* -----------------------------26.04.01 14:56--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
{
if(bDontCheckPasswd)
@@ -509,10 +496,10 @@ sal_Bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
return bRet;
}
+
/*---------------------------------------------------------------------
- Beschreibung: Durchsuchen nach Child-Sections, rekursiv
+ Description: recursively look for child-sections
---------------------------------------------------------------------*/
-
void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry )
{
SwSection* pSect = 0;
@@ -531,11 +518,8 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
{
SectRepr* pSectRepr = new SectRepr( n,
*(pSect=pFmt->GetSection()) );
- Image aImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), sal_False);
+ Image aImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden());
pEntry = aTree.InsertEntry(pSect->GetSectionName(), aImg, aImg);
- Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), sal_True);
- aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
- aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
pEntry->SetUserData(pSectRepr);
RecurseList( pFmt, pEntry );
if (pEntry->HasChilds())
@@ -564,12 +548,9 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
SectRepr* pSectRepr=new SectRepr(
FindArrPos( pSect->GetFmt() ), *pSect );
Image aImage = BuildBitmap( pSect->IsProtect(),
- pSect->IsHidden(), sal_False);
+ pSect->IsHidden());
pNEntry = aTree.InsertEntry(
pSect->GetSectionName(), aImage, aImage, pEntry);
- Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), sal_True);
- aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
- aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
pNEntry->SetUserData(pSectRepr);
RecurseList( aTmpArr[n]->GetFmt(), pNEntry );
if( pNEntry->HasChilds())
@@ -586,9 +567,6 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
aTree.Select(pSelEntry);
}
}
-/*---------------------------------------------------------------------
-
----------------------------------------------------------------------*/
sal_uInt16 SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt )
{
@@ -597,12 +575,9 @@ sal_uInt16 SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt )
if (pFmt==&rSh.GetSectionFmt(i))
return i;
- DBG_ERROR( "SectionFormat nicht in der Liste" );
+ OSL_ENSURE(false, "SectionFormat not on the list" );
return USHRT_MAX;
}
-/*---------------------------------------------------------------------
- Beschreibung:
----------------------------------------------------------------------*/
SwEditRegionDlg::~SwEditRegionDlg( )
{
@@ -616,9 +591,7 @@ SwEditRegionDlg::~SwEditRegionDlg( )
aSectReprArr.DeleteAndDestroy( 0, aSectReprArr.Count() );
delete m_pDocInserter;
}
-/* -----------------------------09.10.2001 15:41------------------------------
- ---------------------------------------------------------------------------*/
void SwEditRegionDlg::SelectSection(const String& rSectionName)
{
SvLBoxEntry* pEntry = aTree.First();
@@ -636,20 +609,20 @@ void SwEditRegionDlg::SelectSection(const String& rSectionName)
aTree.MakeVisible(pEntry);
}
}
+
/*---------------------------------------------------------------------
- Beschreibung: Selektierte Eintrag in der TreeListBox wird im
- Edit-Fenster angezeigt
- Bei Multiselektion werden einige Controls disabled
+ Description: selected entry in TreeListBox is showed in
+ Edit window
+ in case of multiselection some controls are disabled
---------------------------------------------------------------------*/
-
IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
{
bDontCheckPasswd = sal_True;
SvLBoxEntry* pEntry=pBox->FirstSelected();
aHideCB .Enable(sal_True);
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
aEditInReadonlyCB.Enable(sal_True);
- // <--
+
aProtectCB .Enable(sal_True);
aFileCB .Enable(sal_True);
UNO_NMSPC::Sequence <sal_Int8> aCurPasswd;
@@ -657,18 +630,18 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
{
aHideCB.EnableTriState( sal_True );
aProtectCB.EnableTriState( sal_True );
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
aEditInReadonlyCB.EnableTriState ( sal_True );
- // <--
+
aFileCB.EnableTriState( sal_True );
bool bHiddenValid = true;
bool bProtectValid = true;
bool bConditionValid = true;
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
bool bEditInReadonlyValid = true;
bool bEditInReadonly = true;
- // <--
+
bool bHidden = true;
bool bProtect = true;
String sCondition;
@@ -686,9 +659,9 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
sCondition = rData.GetCondition();
bHidden = rData.IsHidden();
bProtect = rData.IsProtectFlag();
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
bEditInReadonly = rData.IsEditInReadonlyFlag();
- // <--
+
bFile = (rData.GetType() != CONTENT_SECTION);
aCurPasswd = rData.GetPassword();
}
@@ -699,10 +672,10 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
bConditionValid = sal_False;
bHiddenValid = (bHidden == rData.IsHidden());
bProtectValid = (bProtect == rData.IsProtectFlag());
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
bEditInReadonlyValid =
(bEditInReadonly == rData.IsEditInReadonlyFlag());
- // <--
+
bFileValid = (bFile ==
(rData.GetType() != CONTENT_SECTION));
bPasswdValid = (aCurPasswd == rData.GetPassword());
@@ -715,10 +688,10 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
bHidden ? STATE_CHECK : STATE_NOCHECK);
aProtectCB.SetState( !bProtectValid ? STATE_DONTKNOW :
bProtect ? STATE_CHECK : STATE_NOCHECK);
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
aEditInReadonlyCB.SetState( !bEditInReadonlyValid ? STATE_DONTKNOW :
bEditInReadonly ? STATE_CHECK : STATE_NOCHECK);
- // <--
+
aFileCB.SetState(!bFileValid ? STATE_DONTKNOW :
bFile ? STATE_CHECK : STATE_NOCHECK);
@@ -726,7 +699,6 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
aConditionED.SetText(sCondition);
else
{
-// aConditionED.SetText(aEmptyStr);
aConditionFT.Enable(sal_False);
aConditionED.Enable(sal_False);
}
@@ -736,7 +708,6 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
aFileNameED .Enable(sal_False);
aSubRegionFT.Enable(sal_False);
aSubRegionED.Enable(sal_False);
-// aNameFT .Enable(sal_False);
aCurName .Enable(sal_False);
aOptionsPB .Enable(sal_False);
aDDECB .Enable(sal_False);
@@ -757,7 +728,6 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
}
else if (pEntry )
{
-// aNameFT .Enable(sal_True);
aCurName .Enable(sal_True);
aOptionsPB .Enable(sal_True);
SectRepr* pRepr=(SectRepr*) pEntry->GetUserData();
@@ -799,11 +769,10 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
? STATE_CHECK : STATE_NOCHECK);
aProtectCB.Enable();
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
aEditInReadonlyCB.SetState((rData.IsEditInReadonlyFlag())
? STATE_CHECK : STATE_NOCHECK);
aEditInReadonlyCB.Enable();
- // <--
sal_Bool bPasswdEnabled = aProtectCB.IsChecked();
aPasswdCB.Enable(bPasswdEnabled);
@@ -812,18 +781,16 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
bDontCheckPasswd = sal_False;
return 0;
}
-/*-----------------28.06.97 09:19-------------------
---------------------------------------------------*/
IMPL_LINK( SwEditRegionDlg, DeselectHdl, SvTreeListBox *, pBox )
{
if( !pBox->GetSelectionCount() )
{
aHideCB .Enable(sal_False);
aProtectCB .Enable(sal_False);
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
aEditInReadonlyCB.Enable(sal_False);
- // <--
+
aPasswdCB .Enable(sal_False);
aPasswdCB .Enable(sal_False);
aConditionFT .Enable(sal_False);
@@ -834,7 +801,6 @@ IMPL_LINK( SwEditRegionDlg, DeselectHdl, SvTreeListBox *, pBox )
aFileNameED .Enable(sal_False);
aSubRegionFT .Enable(sal_False);
aSubRegionED .Enable(sal_False);
-// aNameFT .Enable(sal_False);
aCurName .Enable(sal_False);
aDDECB .Enable(sal_False);
aDDECommandFT .Enable(sal_False);
@@ -846,19 +812,17 @@ IMPL_LINK( SwEditRegionDlg, DeselectHdl, SvTreeListBox *, pBox )
}
/*---------------------------------------------------------------------
- Beschreibung: Im OkHdl werden die veraenderten Einstellungen
- uebernommen und aufgehobene Bereiche geloescht
+ Description: in OkHdl the modified settings are being applied
+ and reversed regions are deleted
---------------------------------------------------------------------*/
-
IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
{
- // JP 13.03.96:
- // temp. Array weil sich waehrend des aendern eines Bereiches die
- // Position innerhalb des "Core-Arrays" verschieben kann:
- // - bei gelinkten Bereichen, wenn sie weitere SubBereiche haben oder
- // neu erhalten.
- // JP 30.05.97: StartUndo darf natuerlich auch erst nach dem Kopieren
- // der Formate erfolgen (ClearRedo!)
+ // temp. Array because during changing of a region the position
+ // inside of the "Core-Arrays" can be shifted:
+ // - at linked regions, when they have more SubRegions or get
+ // new ones.
+ // StartUndo must certainly also happen not before the formats
+ // are copied (ClearRedo!)
const SwSectionFmts& rDocFmts = rSh.GetDoc()->GetSections();
SwSectionFmts aOrigArray( 0, 5 );
@@ -916,12 +880,11 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
if( USHRT_MAX != nNewPos )
rSh.DelSectionFmt( nNewPos );
}
-// rSh.ChgSectionPasswd(aNewPasswd);
aOrigArray.Remove( 0, aOrigArray.Count() );
- //JP 21.05.97: EndDialog muss vor Ende der EndAction gerufen werden,
- // sonst kann es ScrollFehler geben.
+ // EndDialog must be called ahead of EndAction's end,
+ // otherwise ScrollError can occur.
EndDialog(RET_OK);
rSh.EndUndo();
@@ -929,58 +892,52 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
return 0;
}
+
/*---------------------------------------------------------------------
- Beschreibung: Toggle protect
+ Description: Toggle protect
---------------------------------------------------------------------*/
-
IMPL_LINK( SwEditRegionDlg, ChangeProtectHdl, TriStateBox *, pBox )
{
if(!CheckPasswd(pBox))
return 0;
pBox->EnableTriState( sal_False );
SvLBoxEntry* pEntry=aTree.FirstSelected();
- DBG_ASSERT(pEntry,"kein Entry gefunden");
+ OSL_ENSURE(pEntry,"no entry found");
sal_Bool bCheck = STATE_CHECK == pBox->GetState();
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
pRepr->GetSectionData().SetProtectFlag(bCheck);
Image aImage = BuildBitmap( bCheck,
- STATE_CHECK == aHideCB.GetState(), sal_False);
- aTree.SetExpandedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
- aTree.SetCollapsedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
- Image aHCImg = BuildBitmap( bCheck, STATE_CHECK == aHideCB.GetState(), sal_True);
- aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
- aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
+ STATE_CHECK == aHideCB.GetState());
+ aTree.SetExpandedEntryBmp( pEntry, aImage );
+ aTree.SetCollapsedEntryBmp( pEntry, aImage );
pEntry = aTree.NextSelected(pEntry);
}
aPasswdCB.Enable(bCheck);
aPasswdPB.Enable(bCheck);
return 0;
}
+
/*---------------------------------------------------------------------
- Beschreibung: Toggle hide
+ Description: Toggle hide
---------------------------------------------------------------------*/
-
IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox )
{
if(!CheckPasswd(pBox))
return 0;
pBox->EnableTriState( sal_False );
SvLBoxEntry* pEntry=aTree.FirstSelected();
- DBG_ASSERT(pEntry,"kein Entry gefunden");
+ OSL_ENSURE(pEntry,"no entry found");
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
pRepr->GetSectionData().SetHidden(STATE_CHECK == pBox->GetState());
+
Image aImage = BuildBitmap(STATE_CHECK == aProtectCB.GetState(),
- STATE_CHECK == pBox->GetState(), sal_False);
- aTree.SetExpandedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
- aTree.SetCollapsedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
- Image aHCImg = BuildBitmap( STATE_CHECK == aProtectCB.GetState(),
- STATE_CHECK == pBox->GetState(), sal_True);
- aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
- aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
+ STATE_CHECK == pBox->GetState());
+ aTree.SetExpandedEntryBmp( pEntry, aImage );
+ aTree.SetCollapsedEntryBmp( pEntry, aImage );
pEntry = aTree.NextSelected(pEntry);
}
@@ -992,16 +949,15 @@ IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox )
}
/*---------------------------------------------------------------------
- Beschreibung: Toggle edit in readonly
+ Description: Toggle edit in readonly
---------------------------------------------------------------------*/
-
IMPL_LINK( SwEditRegionDlg, ChangeEditInReadonlyHdl, TriStateBox *, pBox )
{
if(!CheckPasswd(pBox))
return 0;
pBox->EnableTriState( sal_False );
SvLBoxEntry* pEntry=aTree.FirstSelected();
- DBG_ASSERT(pEntry,"kein Entry gefunden");
+ OSL_ENSURE(pEntry,"no entry found");
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
@@ -1014,9 +970,8 @@ IMPL_LINK( SwEditRegionDlg, ChangeEditInReadonlyHdl, TriStateBox *, pBox )
}
/*---------------------------------------------------------------------
- Beschreibung: selektierten Bereich aufheben
+ Description: clear selected region
---------------------------------------------------------------------*/
-
IMPL_LINK( SwEditRegionDlg, ChangeDismissHdl, CheckBox *, EMPTYARG )
{
if(!CheckPasswd())
@@ -1024,7 +979,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeDismissHdl, CheckBox *, EMPTYARG )
SvLBoxEntry* pEntry = aTree.FirstSelected();
SvLBoxEntry* pChild;
SvLBoxEntry* pParent;
- //zuerst alle selektierten markieren
+ // at first mark all selected
while(pEntry)
{
const SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
@@ -1032,7 +987,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeDismissHdl, CheckBox *, EMPTYARG )
pEntry = aTree.NextSelected(pEntry);
}
pEntry = aTree.FirstSelected();
- // dann loeschen
+ // then delete
while(pEntry)
{
const SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
@@ -1043,7 +998,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeDismissHdl, CheckBox *, EMPTYARG )
aSectReprArr.Insert( pSectRepr );
while( (pChild = aTree.FirstChild(pEntry) )!= 0 )
{
- //durch das Umhaengen muss wieder am Anfang aufgesetzt werden
+ // because of the repositioning we have to start at the beginning again
bRestart = sal_True;
pParent=aTree.GetParent(pEntry);
aTree.GetModel()->Move(pChild, pParent, aTree.GetModel()->GetRelPos(pEntry));
@@ -1067,24 +1022,23 @@ IMPL_LINK( SwEditRegionDlg, ChangeDismissHdl, CheckBox *, EMPTYARG )
aProtectCB. Enable(sal_False);
aPasswdCB. Enable(sal_False);
aHideCB. Enable(sal_False);
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
aEditInReadonlyCB.Enable(sal_False);
aEditInReadonlyCB.SetState(STATE_NOCHECK);
- // <--
aProtectCB. SetState(STATE_NOCHECK);
aPasswdCB. Check(sal_False);
aHideCB. SetState(STATE_NOCHECK);
aFileCB. Check(sal_False);
- //sonst liegt der Focus auf dem HelpButton
+ // otherwise the focus would be on HelpButton
aOK.GrabFocus();
UseFileHdl(&aFileCB);
}
return 0;
}
+
/*---------------------------------------------------------------------
- Beschreibung: CheckBox mit Datei verknuepfen?
+ Description: link CheckBox to file?
---------------------------------------------------------------------*/
-
IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
{
if(!CheckPasswd(pBox))
@@ -1132,7 +1086,6 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
{
aDDECB.Check(sal_False);
DDEHdl(&aDDECB);
-// aFileNameED.SetText(aEmptyStr);
aSubRegionED.SetText(aEmptyStr);
}
}
@@ -1153,9 +1106,8 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
}
/*---------------------------------------------------------------------
- Beschreibung: Dialog Datei einfuegen rufen
+ Description: call dialog paste file
---------------------------------------------------------------------*/
-
IMPL_LINK( SwEditRegionDlg, FileSearchHdl, PushButton *, EMPTYARG )
{
if(!CheckPasswd(0))
@@ -1170,10 +1122,6 @@ IMPL_LINK( SwEditRegionDlg, FileSearchHdl, PushButton *, EMPTYARG )
return 0;
}
-/*---------------------------------------------------------------------
- Beschreibung:
----------------------------------------------------------------------*/
-
IMPL_LINK( SwEditRegionDlg, OptionsHdl, PushButton *, EMPTYARG )
{
if(!CheckPasswd())
@@ -1276,10 +1224,9 @@ IMPL_LINK( SwEditRegionDlg, OptionsHdl, PushButton *, EMPTYARG )
}
/*---------------------------------------------------------------------
- Beschreibung: Uebernahme des Dateinamen oder
- des verknuepften Bereichs
+ Description: Applying of the filename or the
+ linked region
---------------------------------------------------------------------*/
-
IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit )
{
Selection aSelect = pEdit->GetSelection();
@@ -1287,7 +1234,7 @@ IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit )
return 0;
pEdit->SetSelection(aSelect);
SvLBoxEntry* pEntry=aTree.FirstSelected();
- DBG_ASSERT(pEntry,"kein Entry gefunden");
+ OSL_ENSURE(pEntry,"no entry found");
SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
if(pEdit == &aFileNameED)
{
@@ -1328,9 +1275,6 @@ IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit )
}
return 0;
}
-/*---------------------------------------------------------------------
- Beschreibung:
----------------------------------------------------------------------*/
IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox )
{
@@ -1382,9 +1326,6 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox )
}
return 0;
}
-/*---------------------------------------------------------------------
-
----------------------------------------------------------------------*/
IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox )
{
@@ -1397,7 +1338,7 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox )
}
SvLBoxEntry* pEntry=aTree.FirstSelected();
sal_Bool bSet = bChange ? bChange : aPasswdCB.IsChecked();
- DBG_ASSERT(pEntry,"kein Entry gefunden");
+ OSL_ENSURE(pEntry,"no entry found");
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr)pEntry->GetUserData();
@@ -1438,18 +1379,18 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox )
}
return 0;
}
+
/*---------------------------------------------------------------------
- Beschreibung: Aktueller Bereichsname wird sofort beim editieren
- in die TreeListBox eingetragen, mit leerem String
- kein Ok()
+ Description: the current region name is being added to the
+ TreeListBox immediately during editing, with empty
+ string no Ok()
---------------------------------------------------------------------*/
-
IMPL_LINK( SwEditRegionDlg, NameEditHdl, Edit *, EMPTYARG )
{
if(!CheckPasswd(0))
return 0;
SvLBoxEntry* pEntry=aTree.FirstSelected();
- DBG_ASSERT(pEntry,"kein Entry gefunden");
+ OSL_ENSURE(pEntry,"no entry found");
if (pEntry)
{
String aName = aCurName.GetText();
@@ -1461,9 +1402,6 @@ IMPL_LINK( SwEditRegionDlg, NameEditHdl, Edit *, EMPTYARG )
}
return 0;
}
-/*---------------------------------------------------------------------
-
----------------------------------------------------------------------*/
IMPL_LINK( SwEditRegionDlg, ConditionEditHdl, Edit *, pEdit )
{
@@ -1472,7 +1410,7 @@ IMPL_LINK( SwEditRegionDlg, ConditionEditHdl, Edit *, pEdit )
return 0;
pEdit->SetSelection(aSelect);
SvLBoxEntry* pEntry = aTree.FirstSelected();
- DBG_ASSERT(pEntry,"kein Entry gefunden");
+ OSL_ENSURE(pEntry,"no entry found");
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr)pEntry->GetUserData();
@@ -1501,7 +1439,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg )
}
SvLBoxEntry* pEntry = aTree.FirstSelected();
- DBG_ASSERT( pEntry, "no entry found" );
+ OSL_ENSURE( pEntry, "no entry found" );
if ( pEntry )
{
SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
@@ -1514,9 +1452,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg )
Application::SetDefDialogParent( m_pOldDefDlgParent );
return 0;
}
-/*-- 03.09.2009 16:24:18---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent *, pEvent )
{
if( !bSubRegionsFilled && pEvent && pEvent->GetId() == VCLEVENT_DROPDOWN_PRE_OPEN )
@@ -1545,19 +1481,15 @@ IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent *, pEvent )
return 0;
}
-/* -----------------------------08.05.2002 15:00------------------------------
-
- ---------------------------------------------------------------------------*/
-Image SwEditRegionDlg::BuildBitmap(sal_Bool bProtect,sal_Bool bHidden, sal_Bool bHighContrast)
+Image SwEditRegionDlg::BuildBitmap( sal_Bool bProtect, sal_Bool bHidden )
{
- ImageList& rImgLst = bHighContrast ? aImageILH : aImageIL;
+ ImageList& rImgLst = aImageIL;
return rImgLst.GetImage((!bHidden+(bProtect<<1)) + 1);
}
/*--------------------------------------------------------------------
- Beschreibung: Hilfsfunktion - Bereichsnamen aus dem Medium lesen
+ Description: helper function - read region names from medium
--------------------------------------------------------------------*/
-
static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox )
{
rBox.Clear();
@@ -1576,9 +1508,7 @@ static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox )
aArr.DeleteAndDestroy(0, aArr.Count());
}
}
-/* -----------------21.05.99 10:16-------------------
- *
- * --------------------------------------------------*/
+
SwInsertSectionTabDialog::SwInsertSectionTabDialog(
Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh) :
SfxTabDialog( pParent, SW_RES(DLG_INSERT_SECTION), &rSet ),
@@ -1589,7 +1519,7 @@ SwInsertSectionTabDialog::SwInsertSectionTabDialog(
GetOKButton().SetText(sInsert);
FreeResource();
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AddTabPage(TP_INSERT_SECTION, SwInsertSectionTabPage::Create, 0);
AddTabPage(TP_COLUMN, SwColumnPage::Create, 0);
AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0);
@@ -1609,15 +1539,11 @@ SwInsertSectionTabDialog::SwInsertSectionTabDialog(
}
SetCurPageId(TP_INSERT_SECTION);
}
-/* -----------------21.05.99 10:17-------------------
- *
- * --------------------------------------------------*/
+
SwInsertSectionTabDialog::~SwInsertSectionTabDialog()
{
}
-/* -----------------21.05.99 10:23-------------------
- *
- * --------------------------------------------------*/
+
void SwInsertSectionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
if(TP_INSERT_SECTION == nId)
@@ -1638,21 +1564,16 @@ void SwInsertSectionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
else if(TP_SECTION_INDENTS == nId)
((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh);
}
-/* -----------------21.05.99 13:08-------------------
- *
- * --------------------------------------------------*/
void SwInsertSectionTabDialog::SetSectionData(SwSectionData const& rSect)
{
m_pSectionData.reset( new SwSectionData(rSect) );
}
-/* -----------------21.05.99 13:10-------------------
- *
- * --------------------------------------------------*/
+
short SwInsertSectionTabDialog::Ok()
{
short nRet = SfxTabDialog::Ok();
- DBG_ASSERT(m_pSectionData.get(),
+ OSL_ENSURE(m_pSectionData.get(),
"SwInsertSectionTabDialog: no SectionData?");
const SfxItemSet* pOutputItemSet = GetOutputItemSet();
rWrtSh.InsertSection(*m_pSectionData, pOutputItemSet);
@@ -1676,10 +1597,9 @@ short SwInsertSectionTabDialog::Ok()
m_pSectionData->IsHidden()));
aRequest.AppendItem(SfxBoolItem( FN_PARAM_REGION_PROTECT,
m_pSectionData->IsProtectFlag()));
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
aRequest.AppendItem(SfxBoolItem( FN_PARAM_REGION_EDIT_IN_READONLY,
m_pSectionData->IsEditInReadonlyFlag()));
- // <--
String sLinkFileName( m_pSectionData->GetLinkFileName() );
aRequest.AppendItem(SfxStringItem( FN_PARAM_1, sLinkFileName.GetToken( 0, sfx2::cTokenSeperator )));
@@ -1690,9 +1610,6 @@ short SwInsertSectionTabDialog::Ok()
return nRet;
}
-/* -----------------21.05.99 10:31-------------------
- *
- * --------------------------------------------------*/
SwInsertSectionTabPage::SwInsertSectionTabPage(
Window *pParent, const SfxItemSet &rAttrSet) :
SfxTabPage( pParent, SW_RES(TP_INSERT_SECTION), rAttrSet ),
@@ -1717,10 +1634,9 @@ SwInsertSectionTabPage::SwInsertSectionTabPage(
aHideCB ( this, SW_RES( CB_HIDE ) ),
aConditionFT ( this, SW_RES( FT_CONDITION ) ),
aConditionED ( this, SW_RES( ED_CONDITION ) ),
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
aPropertiesFL ( this, SW_RES( FL_PROPERTIES ) ),
aEditInReadonlyCB ( this, SW_RES( CB_EDIT_IN_READONLY ) ),
- // <--
m_pWrtSh(0),
m_pDocInserter(NULL),
@@ -1732,9 +1648,8 @@ SwInsertSectionTabPage::SwInsertSectionTabPage(
aPasswdCB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, ChangePasswdHdl));
aPasswdPB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, ChangePasswdHdl));
aHideCB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, ChangeHideHdl));
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
aEditInReadonlyCB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, ChangeEditInReadonlyHdl));
- // <--
aFileCB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, UseFileHdl ));
aFilePB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, FileSearchHdl ));
aCurName.SetModifyHdl ( LINK( this, SwInsertSectionTabPage, NameEditHdl));
@@ -1743,9 +1658,7 @@ SwInsertSectionTabPage::SwInsertSectionTabPage(
aPasswdPB.SetAccessibleRelationMemberOf(&aProtectFL);
aSubRegionED.EnableAutocomplete( sal_True, sal_True );
}
-/* -----------------21.05.99 10:31-------------------
- *
- * --------------------------------------------------*/
+
SwInsertSectionTabPage::~SwInsertSectionTabPage()
{
delete m_pDocInserter;
@@ -1786,9 +1699,7 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh)
aCurName.SetText( rSh.GetUniqueSectionName() );
}
}
-/* -----------------21.05.99 10:32-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
{
SwSectionData aSection(CONTENT_SECTION, aCurName.GetText());
@@ -1796,9 +1707,9 @@ sal_Bool SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
sal_Bool bProtected = aProtectCB.IsChecked();
aSection.SetProtectFlag(bProtected);
aSection.SetHidden(aHideCB.IsChecked());
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // edit in readonly sections
aSection.SetEditInReadonlyFlag(aEditInReadonlyCB.IsChecked());
- // <--
+
if(bProtected)
{
aSection.SetPassword(m_aNewPasswd);
@@ -1850,23 +1761,16 @@ sal_Bool SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
((SwInsertSectionTabDialog*)GetTabDialog())->SetSectionData(aSection);
return sal_True;
}
-/* -----------------21.05.99 10:32-------------------
- *
- * --------------------------------------------------*/
+
void SwInsertSectionTabPage::Reset( const SfxItemSet& )
{
}
-/* -----------------21.05.99 11:22-------------------
- *
- * --------------------------------------------------*/
+
SfxTabPage* SwInsertSectionTabPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
return new SwInsertSectionTabPage(pParent, rAttrSet);
}
-/*---------------------------------------------------------------------
-
----------------------------------------------------------------------*/
IMPL_LINK( SwInsertSectionTabPage, ChangeHideHdl, CheckBox *, pBox )
{
@@ -1875,17 +1779,11 @@ IMPL_LINK( SwInsertSectionTabPage, ChangeHideHdl, CheckBox *, pBox )
aConditionFT.Enable(bHide);
return 0;
}
-/*---------------------------------------------------------------------
-
----------------------------------------------------------------------*/
IMPL_LINK( SwInsertSectionTabPage, ChangeEditInReadonlyHdl, CheckBox *, EMPTYARG )
{
return 0;
}
-/*---------------------------------------------------------------------
-
----------------------------------------------------------------------*/
IMPL_LINK( SwInsertSectionTabPage, ChangeProtectHdl, CheckBox *, pBox )
{
@@ -1894,9 +1792,7 @@ IMPL_LINK( SwInsertSectionTabPage, ChangeProtectHdl, CheckBox *, pBox )
aPasswdPB.Enable(bCheck);
return 0;
}
-/* -----------------------------26.04.01 14:50--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton )
{
sal_Bool bChange = pButton == &aPasswdPB;
@@ -1927,9 +1823,6 @@ IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton )
m_aNewPasswd.realloc(0);
return 0;
}
-/*---------------------------------------------------------------------
-
----------------------------------------------------------------------*/
IMPL_LINK_INLINE_START( SwInsertSectionTabPage, NameEditHdl, Edit *, EMPTYARG )
{
@@ -1939,10 +1832,6 @@ IMPL_LINK_INLINE_START( SwInsertSectionTabPage, NameEditHdl, Edit *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwInsertSectionTabPage, NameEditHdl, Edit *, EMPTYARG )
-/*---------------------------------------------------------------------
-
----------------------------------------------------------------------*/
-
IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox )
{
if( pBox->IsChecked() )
@@ -1962,7 +1851,6 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox )
aDDECB.Enable(bFile);
if( bFile )
{
-// aFileNameED.SetText( aFileName );
aFileNameED.GrabFocus();
aProtectCB.Check( sal_True );
}
@@ -1970,15 +1858,10 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox )
{
aDDECB.Check(sal_False);
DDEHdl(&aDDECB);
-// aFileNameED.SetText(aEmptyStr);
}
return 0;
}
-/*---------------------------------------------------------------------
-
----------------------------------------------------------------------*/
-
IMPL_LINK( SwInsertSectionTabPage, FileSearchHdl, PushButton *, EMPTYARG )
{
m_pOldDefDlgParent = Application::GetDefDialogParent();
@@ -1990,10 +1873,6 @@ IMPL_LINK( SwInsertSectionTabPage, FileSearchHdl, PushButton *, EMPTYARG )
return 0;
}
-/*---------------------------------------------------------------------
-
----------------------------------------------------------------------*/
-
IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox )
{
sal_Bool bDDE = pBox->IsChecked();
@@ -2048,8 +1927,8 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil
// --------------------------------------------------------------
-// Numerierungsformat Umsetzung:
-// ListBox - Format - Enum-Wert
+// numbering format conversion:
+// ListBox - format - enum-value
// 0 - A, B, C, ... - 0
// 1 - a, b, c, ... - 1
// 2 - I, II, III, ... - 2
@@ -2204,7 +2083,6 @@ void SwSectionFtnEndTabPage::ResetState( sal_Bool bFtn,
sal_uInt16 eState = rAttr.GetValue();
switch( eState )
{
- // case FTNEND_ATPGORDOCEND:
case FTNEND_ATTXTEND_OWNNUMANDFMT:
pNtNumFmtCB->SetState( STATE_CHECK );
// no break;
@@ -2261,7 +2139,6 @@ SfxTabPage* SwSectionFtnEndTabPage::Create( Window* pParent,
IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox )
{
-// pBox->EnableTriState( sal_False );
sal_Bool bFoot = &aFtnNtAtTextEndCB == pBox || &aFtnNtNumCB == pBox ||
&aFtnNtNumFmtCB == pBox ;
@@ -2316,9 +2193,6 @@ IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox )
return 0;
}
-/* -----------------21.05.99 13:59-------------------
- *
- * --------------------------------------------------*/
SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh) :
SfxTabDialog(pParent, SW_RES(DLG_SECTION_PROPERTIES), &rSet),
@@ -2326,7 +2200,7 @@ SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
{
FreeResource();
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AddTabPage(TP_COLUMN, SwColumnPage::Create, 0);
AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
AddTabPage(TP_SECTION_FTNENDNOTES, SwSectionFtnEndTabPage::Create, 0);
@@ -2343,15 +2217,11 @@ SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
RemoveTabPage(TP_COLUMN);
}
}
-/* -----------------21.05.99 13:59-------------------
- *
- * --------------------------------------------------*/
+
SwSectionPropertyTabDialog::~SwSectionPropertyTabDialog()
{
}
-/* -----------------21.05.99 13:59-------------------
- *
- * --------------------------------------------------*/
+
void SwSectionPropertyTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
if( TP_BACKGROUND == nId )
@@ -2368,9 +2238,7 @@ void SwSectionPropertyTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage
else if(TP_SECTION_INDENTS == nId)
((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh);
}
-/*-- 13.06.2003 09:59:08---------------------------------------------------
- -----------------------------------------------------------------------*/
SwSectionIndentTabPage::SwSectionIndentTabPage( Window *pParent, const SfxItemSet &rAttrSet ) :
SfxTabPage(pParent, SW_RES(TP_SECTION_INDENTS), rAttrSet),
aIndentFL(this, SW_RES(FL_INDENT )),
@@ -2386,15 +2254,11 @@ SwSectionIndentTabPage::SwSectionIndentTabPage( Window *pParent, const SfxItemSe
aAfterMF.SetModifyHdl(aLk);
aPreviewWin.SetAccessibleName(aIndentFL.GetText());
}
-/*-- 13.06.2003 09:59:23---------------------------------------------------
- -----------------------------------------------------------------------*/
SwSectionIndentTabPage::~SwSectionIndentTabPage()
{
}
-/*-- 13.06.2003 09:59:23---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet)
{
if(aBeforeMF.IsValueModified() ||
@@ -2407,9 +2271,7 @@ sal_Bool SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet)
}
return sal_True;
}
-/*-- 13.06.2003 09:59:24---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSectionIndentTabPage::Reset( const SfxItemSet& rSet)
{
//this page doesn't show up in HTML mode
@@ -2435,16 +2297,12 @@ void SwSectionIndentTabPage::Reset( const SfxItemSet& rSet)
aAfterMF.SaveValue();
IndentModifyHdl(0);
}
-/*-- 13.06.2003 09:59:24---------------------------------------------------
- -----------------------------------------------------------------------*/
SfxTabPage* SwSectionIndentTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet)
{
return new SwSectionIndentTabPage(pParent, rAttrSet);
}
-/* -----------------13.06.2003 13:57-----------------
- --------------------------------------------------*/
void SwSectionIndentTabPage::SetWrtShell(SwWrtShell& rSh)
{
//set sensible values at the preview
@@ -2454,9 +2312,7 @@ void SwSectionIndentTabPage::SetWrtShell(SwWrtShell& rSh)
Size aPageSize(rPageRect.Width(), rPageRect.Height());
aPreviewWin.SetSize(aPageSize);
}
-/* -----------------13.06.2003 14:02-----------------
- --------------------------------------------------*/
IMPL_LINK(SwSectionIndentTabPage, IndentModifyHdl, MetricField*, EMPTYARG)
{
aPreviewWin.SetLeftMargin( static_cast< long >(aBeforeMF.Denormalize(aBeforeMF.GetValue(FUNIT_TWIP))) );
@@ -2465,3 +2321,4 @@ IMPL_LINK(SwSectionIndentTabPage, IndentModifyHdl, MetricField*, EMPTYARG)
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx
index 4af058eeae1f..4a98a4e19294 100644
--- a/sw/source/ui/dialog/wordcountdialog.cxx
+++ b/sw/source/ui/dialog/wordcountdialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,9 +48,6 @@
#include <helpid.h>
#endif /* ENABLE_LAYOUT */
-/*-- 06.04.2004 16:05:55---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwWordCountDialog::SwWordCountDialog(Window* pParent) :
SfxModalDialog(pParent, SW_RES(DLG_WORDCOUNT)),
#if defined _MSC_VER
@@ -60,12 +58,16 @@ SwWordCountDialog::SwWordCountDialog(Window* pParent) :
aCurrentWordFI( this, SW_RES( FI_CURRENTWORD )),
aCurrentCharacterFT( this, SW_RES( FT_CURRENTCHARACTER )),
aCurrentCharacterFI( this, SW_RES( FI_CURRENTCHARACTER )),
+ aCurrentCharacterExcludingSpacesFT( this, SW_RES( FT_CURRENTCHARACTEREXCLUDINGSPACES )),
+ aCurrentCharacterExcludingSpacesFI( this, SW_RES( FI_CURRENTCHARACTEREXCLUDINGSPACES )),
aDocFL( this, SW_RES( FL_DOC )),
aDocWordFT( this, SW_RES( FT_DOCWORD )),
aDocWordFI( this, SW_RES( FI_DOCWORD )),
aDocCharacterFT( this, SW_RES( FT_DOCCHARACTER )),
aDocCharacterFI( this, SW_RES( FI_DOCCHARACTER )),
+ aDocCharacterExcludingSpacesFT( this, SW_RES( FT_DOCCHARACTEREXCLUDINGSPACES )),
+ aDocCharacterExcludingSpacesFI( this, SW_RES( FI_DOCCHARACTEREXCLUDINGSPACES )),
aBottomFL(this, SW_RES( FL_BOTTOM )),
aOK( this, SW_RES( PB_OK )),
aHelp( this, SW_RES( PB_HELP ))
@@ -78,22 +80,19 @@ SwWordCountDialog::SwWordCountDialog(Window* pParent) :
#endif /* ENABLE_LAYOUT */
FreeResource();
}
-/*-- 06.04.2004 16:05:56---------------------------------------------------
- -----------------------------------------------------------------------*/
SwWordCountDialog::~SwWordCountDialog()
{
}
-/*-- 06.04.2004 16:05:57---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwWordCountDialog::SetValues(const SwDocStat& rCurrent, const SwDocStat& rDoc)
{
aCurrentWordFI.SetText( String::CreateFromInt32(rCurrent.nWord ));
aCurrentCharacterFI.SetText(String::CreateFromInt32(rCurrent.nChar ));
+ aCurrentCharacterExcludingSpacesFI.SetText(String::CreateFromInt32(rCurrent.nCharExcludingSpaces ));
aDocWordFI.SetText( String::CreateFromInt32(rDoc.nWord ));
aDocCharacterFI.SetText( String::CreateFromInt32(rDoc.nChar ));
+ aDocCharacterExcludingSpacesFI.SetText( String::CreateFromInt32(rDoc.nCharExcludingSpaces ));
}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/wordcountdialog.hrc b/sw/source/ui/dialog/wordcountdialog.hrc
index 00749412ac97..af6f3a79c76c 100644
--- a/sw/source/ui/dialog/wordcountdialog.hrc
+++ b/sw/source/ui/dialog/wordcountdialog.hrc
@@ -26,18 +26,22 @@
************************************************************************/
#ifndef SW_WORDCOUNTDIALOG_HRC
#define SW_WORDCOUNTDIALOG_HRC
-#define FL_CURRENT 1
-#define FT_CURRENTWORD 2
-#define FI_CURRENTWORD 3
-#define FT_CURRENTCHARACTER 4
-#define FI_CURRENTCHARACTER 5
-#define FL_DOC 6
-#define FT_DOCWORD 7
-#define FI_DOCWORD 8
-#define FT_DOCCHARACTER 9
-#define FI_DOCCHARACTER 10
-#define FL_BOTTOM 11
-#define PB_OK 12
-#define PB_HELP 13
+#define FL_CURRENT 1
+#define FT_CURRENTWORD 2
+#define FI_CURRENTWORD 3
+#define FT_CURRENTCHARACTER 4
+#define FI_CURRENTCHARACTER 5
+#define FT_CURRENTCHARACTEREXCLUDINGSPACES 6
+#define FI_CURRENTCHARACTEREXCLUDINGSPACES 7
+#define FL_DOC 8
+#define FT_DOCWORD 9
+#define FI_DOCWORD 10
+#define FT_DOCCHARACTER 11
+#define FI_DOCCHARACTER 12
+#define FT_DOCCHARACTEREXCLUDINGSPACES 13
+#define FI_DOCCHARACTEREXCLUDINGSPACES 14
+#define FL_BOTTOM 15
+#define PB_OK 16
+#define PB_HELP 17
#endif
diff --git a/sw/source/ui/dialog/wordcountdialog.src b/sw/source/ui/dialog/wordcountdialog.src
index 454a6c050b34..767913a0e5c9 100644
--- a/sw/source/ui/dialog/wordcountdialog.src
+++ b/sw/source/ui/dialog/wordcountdialog.src
@@ -32,7 +32,7 @@ ModalDialog DLG_WORDCOUNT
HelpID = HID_DLG_WORDCOUNT ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 170 , 108 ) ;
+ Size = MAP_APPFONT ( 170 , 132 ) ;
Text [ en-US ] = "Word Count" ;
Moveable = TRUE ;
@@ -66,50 +66,74 @@ ModalDialog DLG_WORDCOUNT
Size = MAP_APPFONT ( 50 , 8 ) ;
Right = TRUE;
};
+ FixedText FT_CURRENTCHARACTEREXCLUDINGSPACES
+ {
+ Pos = MAP_APPFONT ( 12 , 38 ) ;
+ Size = MAP_APPFONT ( 98 , 8 ) ;
+ Text [ en-US ] = "Characters excluding spaces:";
+ };
+ FixedText FI_CURRENTCHARACTEREXCLUDINGSPACES
+ {
+ Pos = MAP_APPFONT ( 111 , 38 ) ;
+ Size = MAP_APPFONT ( 50 , 8 ) ;
+ Right = TRUE;
+ };
FixedLine FL_DOC
{
- Pos = MAP_APPFONT ( 6, 40 ) ;
+ Pos = MAP_APPFONT ( 6, 52 ) ;
Size = MAP_APPFONT ( 158 , 8 ) ;
Text [ en-US ] = "Whole document";
};
FixedText FT_DOCWORD
{
- Pos = MAP_APPFONT ( 12, 51 ) ;
+ Pos = MAP_APPFONT ( 12, 63 ) ;
Size = MAP_APPFONT ( 80 , 8 ) ;
Text [ en-US ] = "Words:";
};
FixedText FI_DOCWORD
{
- Pos = MAP_APPFONT ( 111 , 51 ) ;
+ Pos = MAP_APPFONT ( 111 , 63 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Right = TRUE;
};
FixedText FT_DOCCHARACTER
{
- Pos = MAP_APPFONT ( 12 , 63 ) ;
+ Pos = MAP_APPFONT ( 12 , 75 ) ;
Size = MAP_APPFONT ( 80 , 8 ) ;
Text [ en-US ] = "Characters:";
};
FixedText FI_DOCCHARACTER
{
- Pos = MAP_APPFONT ( 111, 63 ) ;
+ Pos = MAP_APPFONT ( 111, 75 ) ;
+ Size = MAP_APPFONT ( 50, 8 ) ;
+ Right = TRUE;
+ };
+ FixedText FT_DOCCHARACTEREXCLUDINGSPACES
+ {
+ Pos = MAP_APPFONT ( 12 , 87 ) ;
+ Size = MAP_APPFONT ( 98 , 8 ) ;
+ Text [ en-US ] = "Characters excluding spaces:";
+ };
+ FixedText FI_DOCCHARACTEREXCLUDINGSPACES
+ {
+ Pos = MAP_APPFONT ( 111, 87 ) ;
Size = MAP_APPFONT ( 50, 8 ) ;
Right = TRUE;
};
FixedLine FL_BOTTOM
{
- Pos = MAP_APPFONT ( 6 , 77 ) ;
+ Pos = MAP_APPFONT ( 6 , 101 ) ;
Size = MAP_APPFONT ( 158 , 8 ) ;
};
OKButton PB_OK
{
- Pos = MAP_APPFONT ( 61 , 88 ) ;
+ Pos = MAP_APPFONT ( 61 , 112 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE ;
};
HelpButton PB_HELP
{
- Pos = MAP_APPFONT ( 114 , 88 ) ;
+ Pos = MAP_APPFONT ( 114 , 112 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
};
diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index 96ad51872363..23d54bfa0d80 100755..100644
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,12 +36,7 @@
#ifndef __RSC //autogen
#include <tools/errinf.hxx>
#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _MSGBOX_HXX //autogen
-#include <vcl/msgbox.hxx>
-#endif
#include <svl/macitem.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/docfile.hxx>
@@ -52,32 +48,24 @@
#include <fmtcol.hxx>
#include <docary.hxx>
#include <wrtsh.hxx>
-#include <uitool.hxx> // Fehlermeldungen
+#include <uitool.hxx> // error messages
#include <view.hxx>
#include <swevent.hxx>
#include <gloshdl.hxx>
#include <glosdoc.hxx>
#include <shellio.hxx>
-#include <swundo.hxx> // fuer Undo-Ids
+#include <swundo.hxx> // for Undo-Ids
#include <expfld.hxx>
-#include <initui.hxx> // fuer ::GetGlossaries()
+#include <initui.hxx> // for ::GetGlossaries()
#include <gloslst.hxx>
#include <swdtflvr.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <crsskip.hxx>
-#ifndef _DOCHDL_HRC
#include <dochdl.hrc>
-#endif
-#ifndef _SWERROR_H
#include <swerror.h>
-#endif
#include <frmmgr.hxx>
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
#include <editeng/acorrcfg.hxx>
#include "swabstdlg.hxx"
@@ -90,7 +78,7 @@ using namespace ::com::sun::star;
const short RET_EDIT = 100;
-// PUBLIC METHODES -------------------------------------------------------
+// PUBLIC METHODS -------------------------------------------------------
struct TextBlockInfo_Impl
{
String sTitle;
@@ -101,18 +89,17 @@ typedef TextBlockInfo_Impl* TextBlockInfo_ImplPtr;
SV_DECL_PTRARR_DEL( TextBlockInfoArr, TextBlockInfo_ImplPtr, 0, 4 )
SV_IMPL_PTRARR( TextBlockInfoArr, TextBlockInfo_ImplPtr )
SV_IMPL_REF( SwDocShell )
+
/*------------------------------------------------------------------------
- Beschreibung: Dialog fuer Bearbeiten Vorlagen
+ Description: Dialog for edit templates
------------------------------------------------------------------------*/
-
-
void SwGlossaryHdl::GlossaryDlg()
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractGlossaryDlg* pDlg = pFact->CreateGlossaryDlg( DLG_RENAME_GLOS,
pViewFrame, this, pWrtShell);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
String sName, sShortName;
if( RET_EDIT == pDlg->Execute() )
@@ -133,12 +120,9 @@ void SwGlossaryHdl::GlossaryDlg()
}
/*------------------------------------------------------------------------
- Beschreibung: Setzen der aktuellen Gruppe; falls aus dem Dialog
- gerufen, wird die Gruppe temp. erzeugt fuer einen
- schnelleren Zugriff
+ Description: set the default group; if called from the dialog
+ the group is created temporarily for faster access
------------------------------------------------------------------------*/
-
-
void SwGlossaryHdl::SetCurGroup(const String &rGrp, sal_Bool bApi, sal_Bool bAlwaysCreateNew )
{
String sGroup(rGrp);
@@ -172,12 +156,9 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, sal_Bool bApi, sal_Bool bAlw
sGroup.GetToken(0, GLOS_DELIM) == sCurBase)
bPathEqual = sal_True;
}
-// const String aMac_Tmp(pCurGrp->GetName());
- // Beim Pfadwechsel kann man sich auf den Namen nicht verlassen
- if(!bAlwaysCreateNew &&
- bPathEqual
-// aMac_Tmp == sGroup
- )
+
+ // When path changed, the name is not reliable
+ if(!bAlwaysCreateNew && bPathEqual)
return;
}
aCurGrp = sGroup;
@@ -192,21 +173,11 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, sal_Bool bApi, sal_Bool bAlw
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
sal_uInt16 SwGlossaryHdl::GetGroupCnt() const
{
return rStatGlossaries.GetGroupCnt();
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
String SwGlossaryHdl::GetGroupName( sal_uInt16 nId, String* pTitle )
{
String sRet = rStatGlossaries.GetGroupName(nId);
@@ -228,10 +199,6 @@ String SwGlossaryHdl::GetGroupName( sal_uInt16 nId, String* pTitle )
}
return sRet;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
sal_Bool SwGlossaryHdl::NewGroup(String &rGrpName, const String& rTitle)
{
@@ -239,9 +206,7 @@ sal_Bool SwGlossaryHdl::NewGroup(String &rGrpName, const String& rTitle)
FindGroupName(rGrpName);
return rStatGlossaries.NewGroupDoc(rGrpName, rTitle);
}
-/* -----------------23.11.98 13:10-------------------
- * Umbenennen eines Textbausteins
- * --------------------------------------------------*/
+
sal_Bool SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const String& rNewTitle)
{
sal_Bool bRet = sal_False;
@@ -271,9 +236,7 @@ sal_Bool SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const Str
}
return bRet;
}
-/* -----------------27.11.98 13:49-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSourceShortName,
const String& rDestGroupName, const String& rLongName, sal_Bool bMove )
{
@@ -282,18 +245,14 @@ sal_Bool SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSo
SwTextBlocks* pDestGroup = rStatGlossaries.GetGroupDoc(rDestGroupName, sal_False);
if(pDestGroup->IsReadOnly() || (bMove && pSourceGroup->IsReadOnly()) )
return sal_False;
- /*if(pDestGroup->IsOld()&& 0!= pDestGroup->ConvertToNew())
- return sal_False;
- if(bMove && pSourceGroup->IsOld() && 0 != pSourceGroup->ConvertToNew())
- return sal_False;*/
- //Der Index muss hier ermittelt werden, weil rSourceShortName in CopyBlock evtl veraendert wird
+ //The index must be determined here because rSourceShortName maybe changed in CopyBlock
sal_uInt16 nDeleteIdx = pSourceGroup->GetIndex( rSourceShortName );
- DBG_ASSERT(USHRT_MAX != nDeleteIdx, "Eintrag nicht gefunden");
+ OSL_ENSURE(USHRT_MAX != nDeleteIdx, "entry not found");
sal_uLong nRet = pSourceGroup->CopyBlock( *pDestGroup, rSourceShortName, rLongName );
if(!nRet && bMove)
{
- // der Index muss existieren
+ // the index must be existing
nRet = pSourceGroup->Delete( nDeleteIdx ) ? 0 : 1;
}
rStatGlossaries.PutGroupDoc( pSourceGroup );
@@ -302,10 +261,8 @@ sal_Bool SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSo
}
/*------------------------------------------------------------------------
- Beschreibung: Loeschen einer Textbausteindatei-Gruppe
+ Description: delete a autotext-file-group
------------------------------------------------------------------------*/
-
-
sal_Bool SwGlossaryHdl::DelGroup(const String &rGrpName)
{
String sGroup(rGrpName);
@@ -325,40 +282,28 @@ sal_Bool SwGlossaryHdl::DelGroup(const String &rGrpName)
}
/*------------------------------------------------------------------------
- Beschreibung: Anzahl Textbausteine erfragen
+ Description: ask for number of autotexts
------------------------------------------------------------------------*/
-
-
sal_uInt16 SwGlossaryHdl::GetGlossaryCnt()
{
return pCurGrp ? pCurGrp->GetCount() : 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
String SwGlossaryHdl::GetGlossaryName( sal_uInt16 nId )
{
- ASSERT(nId < GetGlossaryCnt(), Textbausteinarray ueberindiziert.);
+ OSL_ENSURE(nId < GetGlossaryCnt(), "Textbausteinarray ueberindiziert.");
return pCurGrp->GetLongName( nId );
}
-/* -----------------30.11.98 13:18-------------------
- *
- * --------------------------------------------------*/
+
String SwGlossaryHdl::GetGlossaryShortName(sal_uInt16 nId)
{
- ASSERT(nId < GetGlossaryCnt(), Textbausteinarray ueberindiziert.);
+ OSL_ENSURE(nId < GetGlossaryCnt(), "Textbausteinarray ueberindiziert.");
return pCurGrp->GetShortName( nId );
}
-
/*------------------------------------------------------------------------
- Beschreibung: Kurzname erfragen
+ Description: ask for short name
------------------------------------------------------------------------*/
-
-
String SwGlossaryHdl::GetGlossaryShortName(const String &rName)
{
String sReturn;
@@ -376,10 +321,8 @@ String SwGlossaryHdl::GetGlossaryShortName(const String &rName)
}
/*------------------------------------------------------------------------
- Beschreibung: Kuerzel fuer Textbaustein bereits verwendet?
+ Description: short name for autotext already used?
------------------------------------------------------------------------*/
-
-
sal_Bool SwGlossaryHdl::HasShortName(const String& rShortName) const
{
SwTextBlocks *pBlock = pCurGrp ? pCurGrp
@@ -390,32 +333,14 @@ sal_Bool SwGlossaryHdl::HasShortName(const String& rShortName) const
return bRet;
}
-/* -----------------------------20.03.01 10:52--------------------------------
-
- ---------------------------------------------------------------------------*/
sal_Bool SwGlossaryHdl::ConvertToNew(SwTextBlocks& /*rOld*/)
{
- /*if( rOld.IsOld() )
- {
- QueryBox aAsk( pWrtShell->GetView().GetWindow(), SW_RES( MSG_UPDATE_NEW_GLOS_FMT ) );
- if( aAsk.Execute() == RET_YES )
- {
- if( rOld.ConvertToNew() )
- {
- InfoBox(pWrtShell->GetView().GetWindow(), SW_RES(MSG_ERR_INSERT_GLOS)).Execute();
- return sal_False;
- }
- }
- else
- return sal_False;
- }*/
return sal_True;
}
/*------------------------------------------------------------------------
- Beschreibung: Erzeugen eines Textbausteines
+ Desription: Create autotext
------------------------------------------------------------------------*/
-
sal_Bool SwGlossaryHdl::NewGlossary(const String& rName, const String& rShortName,
sal_Bool bCreateGroup, sal_Bool bNoAttr)
{
@@ -449,10 +374,8 @@ sal_Bool SwGlossaryHdl::NewGlossary(const String& rName, const String& rShortNam
return sal_Bool( nSuccess != (sal_uInt16) -1 );
}
/*------------------------------------------------------------------------
- Beschreibung: Loeschen eines Textbausteines
+ Description: Delete a autotext
------------------------------------------------------------------------*/
-
-
sal_Bool SwGlossaryHdl::DelGlossary(const String &rShortName)
{
SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
@@ -470,18 +393,16 @@ sal_Bool SwGlossaryHdl::DelGlossary(const String &rShortName)
}
/*------------------------------------------------------------------------
- Beschreibung: Kurzform expandieren
+ Description: expand short name
------------------------------------------------------------------------*/
-
-
sal_Bool SwGlossaryHdl::ExpandGlossary()
{
- ASSERT(pWrtShell->CanInsert(), illegal);
+ OSL_ENSURE(pWrtShell->CanInsert(), "illegal");
SwTextBlocks *pGlossary;
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::GlossaryGetCurrGroup fnGetCurrGroup = pFact->GetGlossaryCurrGroupFunc( DLG_RENAME_GLOS );
- DBG_ASSERT(fnGetCurrGroup, "Dialogdiet fail!");
+ OSL_ENSURE(fnGetCurrGroup, "Dialogdiet fail!");
String sGroupName( (*fnGetCurrGroup)() );
if(STRING_NOTFOUND == sGroupName.Search(GLOS_DELIM))
FindGroupName(sGroupName);
@@ -489,7 +410,7 @@ sal_Bool SwGlossaryHdl::ExpandGlossary()
String aShortName;
- // bei Textselektion diese verwenden
+ // use this at text selection
if(pWrtShell->SwCrsrShell::HasSelection() && !pWrtShell->IsBlockMode())
{
aShortName = pWrtShell->GetSelTxt();
@@ -502,9 +423,9 @@ sal_Bool SwGlossaryHdl::ExpandGlossary()
pWrtShell->LeaveBlockMode();
else if(pWrtShell->IsExtMode())
pWrtShell->LeaveExtMode();
- // Wort selektieren
+ // select word
pWrtShell->SelNearestWrd();
- // Wort erfragen
+ // ask for word
if(pWrtShell->IsSelection())
aShortName = pWrtShell->GetSelTxt();
}
@@ -530,7 +451,7 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
sal_uInt16 nGroupCount = pGlossaryList->GetGroupCount();
for(sal_uInt16 i = 1; i <= nGroupCount; i++)
{
- // Gruppenname mit Pfad-Extension besorgen
+ // get group name with path-extension
String sTitle;
String sGroupName = pGlossaryList->GetGroupName(i - 1, sal_False, &sTitle);
if(sGroupName == pGlossary->GetName())
@@ -553,7 +474,7 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
}
}
}
- if( aFoundArr.Count() ) // einer wurde gefunden
+ if( aFoundArr.Count() ) // one was found
{
pGlossaries->PutGroupDoc(pGlossary);
if(1 == aFoundArr.Count())
@@ -565,10 +486,10 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
else
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- AbstarctSwSelGlossaryDlg* pDlg = pFact->CreateSwSelGlossaryDlg( 0, aShortName, DLG_SEL_GLOS );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ AbstractSwSelGlossaryDlg* pDlg = pFact->CreateSwSelGlossaryDlg( 0, aShortName, DLG_SEL_GLOS );
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
for(sal_uInt16 i = 0; i < aFoundArr.Count(); ++i)
{
TextBlockInfo_Impl* pData = aFoundArr.GetObject(i);
@@ -594,7 +515,7 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
}
}
- // nicht gefunden
+ // not found
if( nFound == (sal_uInt16) -1 )
{
if( !bCancel )
@@ -621,10 +542,10 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
SvxMacro aEndMacro(aEmptyStr, aEmptyStr, STARBASIC);
GetMacros( aShortName, aStartMacro, aEndMacro, pGlossary );
- // StartAction darf nich vor HasSelection und DelRight stehen,
- // sonst wird der moeglich Shellwechsel verzoegert und
- // API-Programme wuerden dann haengenbleiben
- // ausserdem darf das Ereignismacro ebenfalls nicht in einer Action gerufen werden
+ // StartAction must not be before HasSelection and DelRight,
+ // otherwise the possible Shell change gets delayed and
+ // API-programs would hang.
+ // Moreover the event macro must also not be called in an action
pWrtShell->StartUndo(UNDO_INSGLOSSARY);
if( aStartMacro.GetMacName().Len() )
pWrtShell->ExecMacro( aStartMacro );
@@ -632,7 +553,7 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
pWrtShell->DelLeft();
pWrtShell->StartAllAction();
- // alle InputFelder zwischenspeichern
+ // cache all InputFields
SwInputFieldList aFldLst( pWrtShell, sal_True );
pWrtShell->InsertGlossary(*pGlossary, aShortName);
@@ -643,7 +564,7 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
}
pWrtShell->EndUndo(UNDO_INSGLOSSARY);
- // fuer alle neuen InputFelder die Eingaben abfordern
+ // demand input for all new InputFields
if( aFldLst.BuildSortLst() )
pWrtShell->UpdateInputFlds( &aFldLst );
}
@@ -652,13 +573,11 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
}
/*------------------------------------------------------------------------
- Beschreibung: Textbaustein einfuegen
+ Description: add autotext
------------------------------------------------------------------------*/
-
-
sal_Bool SwGlossaryHdl::InsertGlossary(const String &rName)
{
- ASSERT(pWrtShell->CanInsert(), illegal);
+ OSL_ENSURE(pWrtShell->CanInsert(), "illegal");
SwTextBlocks *pGlos =
pCurGrp? pCurGrp: rStatGlossaries.GetGroupDoc(aCurGrp);
@@ -670,17 +589,17 @@ sal_Bool SwGlossaryHdl::InsertGlossary(const String &rName)
SvxMacro aEndMacro(aEmptyStr, aEmptyStr, STARBASIC);
GetMacros( rName, aStartMacro, aEndMacro, pGlos );
- // StartAction darf nich vor HasSelection und DelRight stehen,
- // sonst wird der moeglich Shellwechsel verzoegert und
- // API-Programme wuerden dann haengenbleiben
- // ausserdem darf das Ereignismacro ebenfalls nicht in einer Action gerufen werden
+ // StartAction must not be before HasSelection and DelRight,
+ // otherwise the possible Shell change gets delayed and
+ // API-programs would hang.
+ // Moreover the event macro must also not be called in an action
if( aStartMacro.GetMacName().Len() )
pWrtShell->ExecMacro( aStartMacro );
if( pWrtShell->HasSelection() )
pWrtShell->DelRight();
pWrtShell->StartAllAction();
- // alle InputFelder zwischenspeichern
+ // cache all InputFields
SwInputFieldList aFldLst( pWrtShell, sal_True );
pWrtShell->InsertGlossary(*pGlos, rName);
@@ -690,7 +609,7 @@ sal_Bool SwGlossaryHdl::InsertGlossary(const String &rName)
pWrtShell->ExecMacro( aEndMacro );
}
- // fuer alle neuen InputFelder die Eingaben abfordern
+ // demand input for all new InputFields
if( aFldLst.BuildSortLst() )
pWrtShell->UpdateInputFlds( &aFldLst );
@@ -700,10 +619,8 @@ sal_Bool SwGlossaryHdl::InsertGlossary(const String &rName)
}
/*------------------------------------------------------------------------
- Beschreibung: Macro setzen / erfragen
+ Description: set / ask for macro
------------------------------------------------------------------------*/
-
-
void SwGlossaryHdl::SetMacros(const String& rShortName,
const SvxMacro* pStart,
const SvxMacro* pEnd,
@@ -755,10 +672,8 @@ void SwGlossaryHdl::GetMacros( const String &rShortName,
/*------------------------------------------------------------------------
- Beschreibung: ctor, dtor
+ Description: ctor, dtor
------------------------------------------------------------------------*/
-
-
SwGlossaryHdl::SwGlossaryHdl(SfxViewFrame* pVwFrm, SwWrtShell *pSh)
: rStatGlossaries( *::GetGlossaries() ),
aCurGrp( rStatGlossaries.GetDefName() ),
@@ -768,7 +683,6 @@ SwGlossaryHdl::SwGlossaryHdl(SfxViewFrame* pVwFrm, SwWrtShell *pSh)
{
}
-
SwGlossaryHdl::~SwGlossaryHdl()
{
if( pCurGrp )
@@ -776,10 +690,8 @@ SwGlossaryHdl::~SwGlossaryHdl()
}
/*------------------------------------------------------------------------
- Beschreibung: Umbenennen eines Textbausteines
+ Description: rename an autotext
------------------------------------------------------------------------*/
-
-
sal_Bool SwGlossaryHdl::Rename(const String& rOldShort, const String& rNewShortName,
const String& rNewName )
{
@@ -839,17 +751,14 @@ sal_Bool SwGlossaryHdl::IsOld() const
return bRet;
}
-/*-----------------09.06.97 16:15-------------------
- Gruppe ohne Pfadindex finden
+/*--------------------------------------------------
+ find group without path index
--------------------------------------------------*/
sal_Bool SwGlossaryHdl::FindGroupName(String & rGroup)
{
return rStatGlossaries.FindGroupName(rGroup);
}
-/* -----------------29.07.99 08:34-------------------
-
- --------------------------------------------------*/
sal_Bool SwGlossaryHdl::CopyToClipboard(SwWrtShell& rSh, const String& rShortName)
{
SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
@@ -896,3 +805,4 @@ sal_Bool SwGlossaryHdl::ImportGlossaries( const String& rName )
return bRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dochdl/selglos.cxx b/sw/source/ui/dochdl/selglos.cxx
index 79c18bb96e54..981ff2b9f2d7 100644
--- a/sw/source/ui/dochdl/selglos.cxx
+++ b/sw/source/ui/dochdl/selglos.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,15 +64,15 @@ SwSelGlossaryDlg::SwSelGlossaryDlg(Window * pParent, const String &rShortName)
aGlosBox.SetDoubleClickHdl(LINK(this, SwSelGlossaryDlg, DoubleClickHdl));
}
-/*-----------------25.02.94 20:50-------------------
- dtor ueberladen
+/*--------------------------------------------------
+ overload dtor
--------------------------------------------------*/
SwSelGlossaryDlg::~SwSelGlossaryDlg() {}
-/* -----------------25.10.99 08:33-------------------
- --------------------------------------------------*/
IMPL_LINK(SwSelGlossaryDlg, DoubleClickHdl, ListBox*, /*pBox*/)
{
EndDialog(RET_OK);
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dochdl/selglos.src b/sw/source/ui/dochdl/selglos.src
index d48e61aea37b..960c7855d41c 100644
--- a/sw/source/ui/dochdl/selglos.src
+++ b/sw/source/ui/dochdl/selglos.src
@@ -37,7 +37,6 @@ ModalDialog DLG_SEL_GLOS
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 220 , 100 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? AutoText einfügen : AutoText einf³gen */
Text [ en-US ] = "Insert AutoText" ;
Moveable = TRUE ;
OKButton BT_OK
@@ -63,7 +62,6 @@ ModalDialog DLG_SEL_GLOS
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 152 , 8 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? AutoTexte zum Kürzel : AutoTexte zum K³rzel */
Text [ en-US ] = "AutoTexts for shortcut " ;
};
ListBox LB_GLOS
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 693723cc16b3..36da67eaee2a 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,7 +104,7 @@
#include <docsh.hxx>
#include <wdocsh.hxx>
#include <fldbas.hxx> //DDE
-#include <swundo.hxx> // fuer Undo-Ids
+#include <swundo.hxx> // for Undo-Ids
#include <pam.hxx>
#include <ndole.hxx>
#include <swwait.hxx>
@@ -134,7 +135,7 @@
#include <swcrsr.hxx>
#include <SwRewriter.hxx>
#include <globals.hrc>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <swserv.hxx>
@@ -233,9 +234,6 @@ public:
}
};
-
-// -----------------------------------------------------------------------
-
SwTransferable::SwTransferable( SwWrtShell& rSh )
: pWrtShell( &rSh ),
pCreatorView( 0 ),
@@ -266,13 +264,11 @@ SwTransferable::SwTransferable( SwWrtShell& rSh )
}
}
-// -----------------------------------------------------------------------
-
SwTransferable::~SwTransferable()
{
Application::GetSolarMutex().acquire();
- // der DDELink braucht noch die WrtShell!
+ // the DDELink still needs the WrtShell!
if( refDdeLink.Is() )
{
((SwTrnsfrDdeLink*)&refDdeLink)->Disconnect( sal_True );
@@ -281,14 +277,13 @@ SwTransferable::~SwTransferable()
pWrtShell = 0;
- // dvo 2002-05-30, #99239#: release reference to the document so that
- // aDocShellRef will delete it (if aDocShellRef is set). Otherwise, the OLE
- // nodes keep references to their sub-storage when the storage is already
- // dead.
+ // release reference to the document so that aDocShellRef will delete
+ // it (if aDocShellRef is set). Otherwise, the OLE nodes keep references
+ // to their sub-storage when the storage is already dead.
delete pClpDocFac;
- //JP 22.04.95: erst schliessen, dann kann die Ref. auch gecleared werden,
- // so das die DocShell auch tatsaechlich geloescht wird!
+ // first close, then the Ref. can be cleared as well, so that
+ // the DocShell really gets deleted!
if( aDocShellRef.Is() )
{
SfxObjectShell * pObj = aDocShellRef;
@@ -318,12 +313,10 @@ SwTransferable::~SwTransferable()
Application::GetSolarMutex().release();
}
-// -----------------------------------------------------------------------
-
static SwDoc * lcl_GetDoc(SwDocFac & rDocFac)
{
SwDoc *const pDoc = rDocFac.GetDoc();
- ASSERT( pDoc, "Document not found" );
+ OSL_ENSURE( pDoc, "Document not found" );
if (pDoc)
{
pDoc->SetClipBoard( true );
@@ -331,8 +324,6 @@ static SwDoc * lcl_GetDoc(SwDocFac & rDocFac)
return pDoc;
}
-// -----------------------------------------------------------------------
-
void SwTransferable::ObjectReleased()
{
SwModule *pMod = SW_MOD();
@@ -342,8 +333,6 @@ void SwTransferable::ObjectReleased()
pMod->pXSelection = 0;
}
-// -----------------------------------------------------------------------
-
void SwTransferable::AddSupportedFormats()
{
// only need if we are the current XSelection Object
@@ -354,20 +343,16 @@ void SwTransferable::AddSupportedFormats()
}
}
-// -----------------------------------------------------------------------
-
void SwTransferable::InitOle( SfxObjectShell* pDoc, SwDoc& rDoc )
{
- //OleVisArea einstellen. Linke obere Ecke der Seite und Groesse
- //der RealSize in Twips.
+ //set OleVisArea. Upper left corner of the page and size of
+ //RealSize in Twips.
const Size aSz( OLESIZE );
SwRect aVis( Point( DOCUMENTBORDER, DOCUMENTBORDER ), aSz );
pDoc->SetVisArea( aVis.SVRect() );
rDoc.set(IDocumentSettingAccess::BROWSE_MODE, true );
}
-// -----------------------------------------------------------------------
-
uno::Reference < embed::XEmbeddedObject > SwTransferable::FindOLEObj( sal_Int64& nAspect ) const
{
uno::Reference < embed::XEmbeddedObject > xObj;
@@ -387,8 +372,6 @@ uno::Reference < embed::XEmbeddedObject > SwTransferable::FindOLEObj( sal_Int64&
return xObj;
}
-// -----------------------------------------------------------------------
-
Graphic* SwTransferable::FindOLEReplacementGraphic() const
{
if( pClpDocFac )
@@ -406,17 +389,12 @@ Graphic* SwTransferable::FindOLEReplacementGraphic() const
return NULL;
}
-
-// -----------------------------------------------------------------------
-
void SwTransferable::RemoveDDELinkFormat( const Window& rWin )
{
RemoveFormat( SOT_FORMATSTR_ID_LINK );
CopyToClipboard( (Window*)&rWin );
}
-// -----------------------------------------------------------------------
-
sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
{
sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor );
@@ -432,7 +410,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
{
SelectionType nSelectionType = pWrtShell->GetSelectionType();
-// SEL_GRF kommt vom ContentType der editsh
+// SEL_GRF comes from ContentType of editsh
if( (nsSelectionType::SEL_GRF | nsSelectionType::SEL_DRW_FORM) & nSelectionType )
{
pClpGraphic = new Graphic;
@@ -442,7 +420,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
if( !pWrtShell->GetDrawObjGraphic( FORMAT_BITMAP, *pClpBitmap ))
pOrigGrf = pClpBitmap;
- // ist es ein URL-Button ?
+ // is it an URL-Button ?
String sURL, sDesc;
if( pWrtShell->GetURLFromButton( sURL, sDesc ) )
{
@@ -454,10 +432,10 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
pClpDocFac = new SwDocFac;
SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac);
- pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen
+ pTmpDoc->LockExpFlds(); // never update fields - leave text as it is
pWrtShell->Copy( pTmpDoc );
- // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
+ // in CORE a new one was created (OLE-Objekte copied!)
aDocShellRef = pTmpDoc->GetTmpDocShell();
if( aDocShellRef.Is() )
SwTransferable::InitOle( aDocShellRef, *pTmpDoc );
@@ -500,8 +478,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
if( TRNSFR_OLE == eBufferType )
{
//TODO/MBA: testing - is this the "single OLE object" case?!
- // aus dem ClipDoc das OLE-Object besorgen und von dem die Daten
- // besorgen.
+ // get OLE-Object from ClipDoc and get the data from that.
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; // will be set in the next statement
uno::Reference < embed::XEmbeddedObject > xObj = FindOLEObj( nAspect );
Graphic* pOLEGraph = FindOLEReplacementGraphic();
@@ -575,7 +552,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
bOK = SetGDIMetaFile( pClpGraphic->GetGDIMetaFile(), rFlavor );
break;
case SOT_FORMAT_BITMAP:
- // #126398# Neither pClpBitmap nor pClpGraphic are necessarily set
+ // Neither pClpBitmap nor pClpGraphic are necessarily set
if( (eBufferType & TRNSFR_GRAPHIC) && (pClpBitmap != 0 || pClpGraphic != 0))
bOK = SetBitmap( (pClpBitmap ? pClpBitmap
: pClpGraphic)->GetBitmap(),
@@ -603,7 +580,6 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
break;
case SOT_FORMATSTR_ID_EMBED_SOURCE:
-// default:
if( !aDocShellRef.Is() )
{
SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
@@ -621,8 +597,6 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
return bOK;
}
-// -----------------------------------------------------------------------
-
sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
void* pObject, sal_uInt32 nObjectType,
const DATA_FLAVOR& /*rFlavor*/ )
@@ -634,18 +608,17 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
{
case SWTRANSFER_OBJECTTYPE_DRAWMODEL:
{
- //JP 28.02.2001: dont change the sequence of commands - Bug 8
+ // dont change the sequence of commands
SdrModel *pModel = (SdrModel*)pObject;
xStream->SetBufferSize( 16348 );
- // #108584#
// for the changed pool defaults from drawing layer pool set those
// attributes as hard attributes to preserve them for saving
const SfxItemPool& rItemPool = pModel->GetItemPool();
const SvxFontHeightItem& rDefaultFontHeight = (const SvxFontHeightItem&)rItemPool.GetDefaultItem(EE_CHAR_FONTHEIGHT);
// SW should have no MasterPages
- DBG_ASSERT(0L == pModel->GetMasterPageCount(), "SW with MasterPages (!)");
+ OSL_ENSURE(0L == pModel->GetMasterPageCount(), "SW with MasterPages (!)");
for(sal_uInt16 a(0); a < pModel->GetPageCount(); a++)
{
@@ -745,7 +718,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
aAOpt.SetCharSet( RTL_TEXTENCODING_UTF8 );
xWrt->SetAsciiOptions( aAOpt );
- // #102841# no start char for clipboard
+ // no start char for clipboard
xWrt->bUCS2_WithStartChar = sal_False;
}
break;
@@ -769,8 +742,6 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
return bRet;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::Cut()
{
int nRet = Copy( sal_True );
@@ -779,13 +750,11 @@ int SwTransferable::Cut()
return nRet;
}
-// -----------------------------------------------------------------------
-
void SwTransferable::DeleteSelection()
{
if(!pWrtShell)
return;
- // Selektionsart vor Action-Klammerung erfragen
+ // ask for type of selection before action-bracketing
const int nSelection = pWrtShell->GetSelectionType();
pWrtShell->StartUndo( UNDO_DELETE );
if( ( nsSelectionType::SEL_TXT | nsSelectionType::SEL_TBL ) & nSelection )
@@ -794,8 +763,6 @@ void SwTransferable::DeleteSelection()
pWrtShell->EndUndo( UNDO_DELETE );
}
-// -----------------------------------------------------------------------
-
int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
{
int nRet = 1;
@@ -823,10 +790,8 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
PrepareOLE( aObjDesc );
AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
- // --> OD 2005-02-09 #119353# - robust
const Graphic* pGrf = pWrtShell->GetGraphic();
if( pGrf && pGrf->IsSupportedGraphic() )
- // <--
{
AddFormat( FORMAT_GDIMETAFILE );
AddFormat( FORMAT_BITMAP );
@@ -850,7 +815,7 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
AddFormat( FORMAT_GDIMETAFILE );
eBufferType = TRNSFR_OLE;
}
- //Gibt es ueberhaupt etwas zum bereitstellen?
+ // Is there anything to provide anyway?
else if ( pWrtShell->IsSelection() || pWrtShell->IsFrmSelected() ||
pWrtShell->IsObjSelected() )
{
@@ -860,10 +825,10 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
pClpDocFac = new SwDocFac;
- // zusaetzlichen Cursor erzeugen, damit eine Gleichbehandlung
- // von Tastatur- und Mausselektion moeglich ist.
- // Im AddMode wird bei Tastaturselektion der neue Cursor erst
- // beim Bewegen des Cursors nach Selektionsende erzeugt.
+ // create additional cursor so that equal treatment of keyboard
+ // and mouse selection is possible.
+ // In AddMode with keyboard selection, the new cursor is not created
+ // before the cursor is moved after end of selection.
if( pWrtShell->IsAddMode() && pWrtShell->SwCrsrShell::HasSelection() )
pWrtShell->CreateCrsr();
@@ -890,7 +855,7 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
pMarkAccess->deleteMark(*ppMark);
}
- // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
+ // a new one was created in CORE (OLE-Objekte copied!)
aDocShellRef = pTmpDoc->GetTmpDocShell();
if( aDocShellRef.Is() )
SwTransferable::InitOle( aDocShellRef, *pTmpDoc );
@@ -912,11 +877,10 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
bDDELink = pWrtShell->HasWholeTabSelection();
}
- //Wenn's einer braucht OLE'n wir ihm was.
+ //When someone needs it, we 'OLE' him something
AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
- //RTF vor das Metafile von OLE stellen, weil mit weniger verlusten
- //behaftet.
+ //put RTF ahead of the OLE's Metafile to have less loss
if( !pWrtShell->IsObjSelected() )
{
AddFormat( FORMAT_RTF );
@@ -942,7 +906,7 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
if( !pWrtShell->GetDrawObjGraphic( FORMAT_BITMAP, *pClpBitmap ))
pOrigGrf = pClpBitmap;
- // ist es ein URL-Button ?
+ // is it an URL-Button ?
String sURL, sDesc;
if( pWrtShell->GetURLFromButton( sURL, sDesc ) )
{
@@ -957,7 +921,7 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
}
}
- // beim Cut hat DDE-Link keinen Sinn!!
+ // at Cut, DDE-Link doesn't make sense!!
SwDocShell* pDShell;
if( !bIsCut && bDDELink &&
0 != ( pDShell = pWrtShell->GetDoc()->GetDocShell()) &&
@@ -967,9 +931,9 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
refDdeLink = new SwTrnsfrDdeLink( *this, *pWrtShell );
}
- //ObjectDescriptor wurde bereits aus der alten DocShell gefuellt.
- //Jetzt noch anpassen. Dadurch kann im GetData die erste Anfrage
- //auch noch mit delayed rendering beantwortet werden.
+ //ObjectDescriptor was already filly from the old DocShell.
+ //Now adjust it. Thus in GetData the first query can still
+ //be answered with delayed rendering.
aObjDesc.mbCanLink = sal_False;
Size aSz( OLESIZE );
aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM );
@@ -1014,8 +978,6 @@ int SwTransferable::Copy( sal_Bool bIsCut )
return nRet;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::CalculateAndCopy()
{
if(!pWrtShell)
@@ -1035,8 +997,6 @@ int SwTransferable::CalculateAndCopy()
return 1;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
const String& rStr )
{
@@ -1049,14 +1009,14 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
SwNodes& rNds = pCDoc->GetNodes();
SwNodeIndex aNodeIdx( *rNds.GetEndOfContent().StartOfSectionNode() );
- SwCntntNode* pCNd = rNds.GoNext( &aNodeIdx ); // gehe zum 1. ContentNode
+ SwCntntNode* pCNd = rNds.GoNext( &aNodeIdx ); // go to 1st ContentNode
SwPaM aPam( *pCNd );
- pCDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen
+ pCDoc->LockExpFlds(); // never update fields - leave text as it is
pCDoc->InsertGlossary( rGlossary, rStr, aPam, 0 );
- // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
+ // a new one was created in CORE (OLE-Objects copied!)
aDocShellRef = pCDoc->GetTmpDocShell();
if( aDocShellRef.Is() )
SwTransferable::InitOle( aDocShellRef, *pCDoc );
@@ -1064,15 +1024,15 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
eBufferType = TRNSFR_DOCUMENT;
- //Wenn's einer braucht OLE'n wir ihm was.
+ //When someone needs it, we 'OLE' her something.
AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
AddFormat( FORMAT_RTF );
AddFormat( SOT_FORMATSTR_ID_HTML );
AddFormat( FORMAT_STRING );
- //ObjectDescriptor wurde bereits aus der alten DocShell gefuellt.
- //Jetzt noch anpassen. Dadurch kann im GetData die erste Anfrage
- //auch noch mit delayed rendering beantwortet werden.
+ //ObjectDescriptor was already filled from the old DocShell.
+ //Now adjust it. Thus in GetData the first query can still
+ //be answered with delayed rendering.
aObjDesc.mbCanLink = sal_False;
Size aSz( OLESIZE );
aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM );
@@ -1089,13 +1049,12 @@ static inline uno::Reference < XTransferable > * lcl_getTransferPointer ( uno::R
{
return &xRef;
}
-// -----------------------------------------------------------------------
sal_Bool SwTransferable::IsPaste( const SwWrtShell& rSh,
const TransferableDataHelper& rData )
{
// Check the common case first: We can always paste our own data!
- // #106503#: If _only_ the internal format can be pasted, this check will
+ // If _only_ the internal format can be pasted, this check will
// yield 'true', while the one below would give a (wrong) result 'false'.
bool bIsPaste = ( GetSwTransferable( rData ) != NULL );
@@ -1132,8 +1091,6 @@ sal_Bool SwTransferable::IsPaste( const SwWrtShell& rSh,
return bIsPaste;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData )
{
sal_uInt16 nEventAction, nAction=0,
@@ -1178,8 +1135,6 @@ int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData )
nDestination, sal_False, sal_False );
}
-// -----------------------------------------------------------------------
-
int SwTransferable::PasteData( TransferableDataHelper& rData,
SwWrtShell& rSh, sal_uInt16 nAction, sal_uLong nFormat,
sal_uInt16 nDestination, sal_Bool bIsPasteFmt,
@@ -1210,13 +1165,10 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
case EXCHG_DEST_DOC_DRAWOBJ:
case EXCHG_DEST_DOC_URLBUTTON:
case EXCHG_DEST_DOC_GROUPOBJ:
- // Rahmen/Objecte selektieren
+ // select frames/objects
SwTransferable::SetSelInShell( rSh, sal_True, pPt );
break;
- // case EXCHG_DEST_DOC_TEXTFRAME:
- // case EXCHG_DEST_SWDOC_FREE_AREA:
- // case EXCHG_DEST_DOC_URLFIELD:
default:
SwTransferable::SetSelInShell( rSh, sal_False, pPt );
break;
@@ -1226,13 +1178,13 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
else if( ( !GetSwTransferable( rData ) || bIsPasteFmt ) &&
!rSh.IsTableMode() && rSh.HasSelection() )
{
- // dann die Selektionen loeschen
+ // then delete the selections
- //Selektierten Inhalt loeschen,
- // - nicht bei Tabellen-Selektion
- // - nicht bei ReRead einer Grafik/DDEDaten
- // - nicht bei D&D, fuer die richtige Selektion wurde im
- // Drop-Handler gesorgt
+ //don't delete selected content
+ // - at table-selection
+ // - at ReRead of a graphic/DDEData
+ // - at D&D, for the right selection was taken care of
+ // in Drop-Handler
sal_Bool bDelSel = sal_False;
switch( nDestination )
{
@@ -1245,20 +1197,12 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
}
if( bDelSel )
- // --> FME 2004-10-19 #i34830#
+ // #i34830#
pAction = new SwTrnsfrActionAndUndo( &rSh, UNDO_PASTE_CLIPBOARD, NULL,
sal_True );
- // <--
}
SwTransferable *pTrans=0, *pTunneledTrans=GetSwTransferable( rData );
-// uno::Reference<XUnoTunnel> xTunnel( rData.GetTransferable(), UNO_QUERY );
-// if ( xTunnel.is() )
-// {
-// sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() );
-// if ( nHandle )
-// pTunneledTrans = (SwTransferable*) (sal_IntPtr) nHandle;
-// }
if( pPt && ( bPasteSelection ? 0 != ( pTrans = pMod->pXSelection )
: 0 != ( pTrans = pMod->pDragDrop) ))
@@ -1277,25 +1221,24 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
{
if( !pAction )
{
- // #111827#
pAction = new SwTrnsfrActionAndUndo( &rSh, UNDO_PASTE_CLIPBOARD);
}
- // im Drag&Drop duerfen keine MessageBoxen angezeigt werden
+ // in Drag&Drop MessageBoxes must not be showed
sal_Bool bMsg = 0 == pPt;
sal_uInt8 nActionFlags = static_cast< sal_uInt8 >(( nAction >> 8 ) & 0xFF);
sal_uInt16 nClearedAction = ( nAction & EXCHG_ACTION_MASK );
- // Selektionen loeschen
+ // delete selections
switch( nClearedAction )
{
case EXCHG_OUT_ACTION_INSERT_PRIVATE:
-ASSERT( pPt, "EXCHG_OUT_ACTION_INSERT_PRIVATE: was soll hier passieren?" );
+ OSL_ENSURE( pPt, "EXCHG_OUT_ACTION_INSERT_PRIVATE: what should happen here?" );
break;
case EXCHG_OUT_ACTION_MOVE_PRIVATE:
-ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
+ OSL_ENSURE( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: what should happen here?" );
break;
@@ -1307,7 +1250,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
case EXCHG_OUT_ACTION_INSERT_IMAGEMAP:
case EXCHG_OUT_ACTION_REPLACE_IMAGEMAP:
- // dann muss ueber das Format gegangen werden
+ // then we have to use the format
switch( nFormat )
{
case SOT_FORMATSTR_ID_DRAWING:
@@ -1374,7 +1317,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
break;
case SOT_FORMAT_FILE_LIST:
- // dann nur als Grafiken einfuegen
+ // then insert as graphics only
nRet = SwTransferable::_PasteFileList( rData, rSh,
EXCHG_IN_ACTION_LINK == nClearedAction,
pPt, bMsg );
@@ -1409,7 +1352,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
break;
default:
- ASSERT( pPt, "unbekanntes Format" );
+ OSL_ENSURE( pPt, "unknown format" );
}
break;
@@ -1485,7 +1428,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
nActionFlags, bMsg );
break;
default:
- ASSERT( sal_False, "unbekanntes Format" );
+ OSL_ENSURE( false, "unknown format" );
}
break;
@@ -1524,7 +1467,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
break;
default:
- ASSERT( sal_False, "unbekannte Action" );
+ OSL_ENSURE(false, "unknown action" );
}
}
@@ -1543,8 +1486,6 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
return nRet;
}
-// -----------------------------------------------------------------------
-
sal_uInt16 SwTransferable::GetSotDestination( const SwWrtShell& rSh,
const Point* pPt )
{
@@ -1602,22 +1543,9 @@ sal_uInt16 SwTransferable::GetSotDestination( const SwWrtShell& rSh,
case OBJCNT_URLBUTTON: nRet = EXCHG_DEST_DOC_URLBUTTON; break;
case OBJCNT_GROUPOBJ: nRet = EXCHG_DEST_DOC_GROUPOBJ; break;
-// was mmchen wir bei Mehrfachselektion???
-// case OBJCNT_DONTCARE:
+// what do we do at multiple selections???
default:
{
-/*
-JP 13.07.98: Bug 52637: es wird ein URL-Feld erkannt also werden nur die
- Inhalte zugelassen. Das ist aber bestimmt nicht das
- gewollte.
- SwContentAtPos aCntntAtPos( SwContentAtPos::SW_INETATTR );
- SfxItemSet aSet( (SfxItemPool&)rSh.GetAttrPool(),
- RES_TXTATR_INETFMT, RES_TXTATR_INETFMT );
- if( pPt ? ((SwWrtShell&)rSh).GetContentAtPos( *pPt, aCntntAtPos, sal_False )
- : (rSh.GetAttr( aSet ) && aSet.Count()) )
- nRet = EXCHG_DEST_DOC_URLFIELD;
- else
-*/
if( rSh.GetView().GetDocShell()->ISA(SwWebDocShell) )
nRet = EXCHG_DEST_SWDOC_FREE_AREA_WEB;
else
@@ -1628,8 +1556,6 @@ JP 13.07.98: Bug 52637: es wird ein URL-Feld erkannt also werden nur die
return nRet;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bMsg )
{
@@ -1675,7 +1601,6 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
pStream = aMSE40ClpObj.IsValid( *xStrm );
pRead = ReadHTML;
pRead->SetReadUTF8( sal_True );
- //pRead->SetBaseURL( aMSE40ClpObj.GetBaseURL() );
sal_Bool bNoComments =
( nFmt == SOT_FORMATSTR_ID_HTML_NO_COMMENT );
@@ -1725,8 +1650,6 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
return nRet;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
sal_uLong nFmt, sal_uInt8 nActionFlags, sal_Bool bMsg )
{
@@ -1806,7 +1729,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
{
if ( !rData.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) )
{
- DBG_ASSERT( !xStrm.is(), "An object without descriptor in clipboard!");
+ OSL_ENSURE( !xStrm.is(), "An object without descriptor in clipboard!");
}
}
else
@@ -1853,18 +1776,6 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
Graphic aGraphic;
sal_uLong nGrFormat = 0;
-// (wg. Selection Manager bei Trustet Solaris)
-#ifndef SOLARIS
-/*
- if( rData.GetGraphic( SOT_FORMATSTR_ID_SVXB, aGraphic ) )
- nGrFormat = SOT_FORMATSTR_ID_SVXB;
- else if( rData.GetGraphic( FORMAT_GDIMETAFILE, aGraphic ) )
- nGrFormat = SOT_FORMAT_GDIMETAFILE;
- else if( rData.GetGraphic( FORMAT_BITMAP, aGraphic ) )
- nGrFormat = SOT_FORMAT_BITMAP;
-*/
-#endif
-
// insert replacement image ( if there is one ) into the object helper
if ( nGrFormat )
{
@@ -1884,8 +1795,8 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
xObjRef.SetGraphic( aGraphic, aMimeType );
}
- //Size einstellen. Ist ein Hack wg. Auslieferung, die Size sollte
- //an das InsertOle uebergeben werden!!!!!!!!!!
+ //set size. This is a hack because of handing over, size should be
+ //passed to the InsertOle!!!!!!!!!!
Size aSize;
if ( aObjDesc.mnViewAspect == embed::Aspects::MSOLE_ICON )
{
@@ -1899,7 +1810,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
}
else if( aObjDesc.maSize.Width() && aObjDesc.maSize.Height() )
{
- aSize = Size( aObjDesc.maSize ); //immer 100TH_MM
+ aSize = Size( aObjDesc.maSize ); //always 100TH_MM
MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( aObjDesc.mnViewAspect ) );
aSize = OutputDevice::LogicToLogic( aSize, MAP_100TH_MM, aUnit );
awt::Size aSz;
@@ -1932,7 +1843,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
{
}
}
- //Ende mit Hack!
+ //End of Hack!
rSh.InsertOleObject( xObjRef );
nRet = 1;
@@ -1948,11 +1859,6 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
return nRet;
}
-// -----------------------------------------------------------------------
-
-
-// -----------------------------------------------------------------------
-
int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
SwWrtShell& rSh, sal_uInt16 nAction,
const Point* pPt, sal_Bool bInsertGRF )
@@ -1969,8 +1875,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
String sURL( aINetImg.GetImageURL() );
SwTransferable::_CheckForURLOrLNKFile( rData, sURL );
- //!!! auf FileSystem abpruefen - nur dann ist es sinnvoll die
- // Grafiken zu testen !!!!
+ //!!! check at FileSystem - only then it make sense to test graphics !!!
Graphic aGrf;
GraphicFilter *pFlt = GraphicFilter::GetGraphicFilter();
nRet = GRFILTER_OK == GraphicFilter::LoadGraphic( sURL, aEmptyStr, aGrf, pFlt );
@@ -2032,15 +1937,12 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
return nRet;
}
-
-// -----------------------------------------------------------------------
-
void SwTransferable::SetSelInShell( SwWrtShell& rSh, sal_Bool bSelectFrm,
const Point* pPt )
{
if( bSelectFrm )
{
- // Rahmen/Objecte selektieren
+ // select frames/objects
if( pPt && !rSh.GetView().GetViewFrame()->GetDispatcher()->IsLocked() )
{
rSh.GetView().NoRotate();
@@ -2070,22 +1972,20 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, sal_Bool bSelectFrm,
}
}
-// -----------------------------------------------------------------------
-
int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
SwWrtShell& rWrtShell, sal_Bool bReReadGrf,
sal_Bool bMsg )
{
- // Daten aus dem Clipboardformat
+ // data from Clipboardformat
String aApp, aTopic, aItem;
{
SotStorageStreamRef xStrm;
if( !rData.GetSotStorageStream( SOT_FORMATSTR_ID_LINK, xStrm ))
{
- ASSERT( !&rWrtShell, "DDE Data not found." );
+ OSL_ENSURE( !&rWrtShell, "DDE Data not found." );
return 0;
- } //sinnvollen Fehler melden!!
+ } // report useful error!!
rtl_TextEncoding eEncoding = DDE_TXT_ENCODING;
xStrm->ReadCString( aApp, eEncoding );
@@ -2096,7 +1996,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
String aCmd;
sfx2::MakeLnkName( aCmd, &aApp, aTopic, aItem );
- // wollen wir jetzt eine Grafik einlesen ?
+ // do we want to read in a graphic now?
sal_uLong nFormat;
if( !rData.HasFormat( FORMAT_RTF ) &&
!rData.HasFormat( SOT_FORMATSTR_ID_HTML ) &&
@@ -2169,8 +2069,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
{
do { // middle checked loop
- // Wenn die Daten von einer Tabellenkalkulation kommen
- // fuegen wir eine DDE-Tabelle ein
+ // When data comes from a spreadsheet, we add a DDE-table
if( ( rData.HasFormat( SOT_FORMATSTR_ID_SYLK ) ||
rData.HasFormat( SOT_FORMATSTR_ID_SYLK_BIGCAPS ) ) &&
aExpand.Len() &&
@@ -2184,7 +2083,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
sTmp = sTmp.GetToken( 0, '\n' );
xub_StrLen nCols = sTmp.GetTokenCount( '\t' );
- // mindestens eine Spalte & Zeile muss vorhanden sein
+ // at least one column & row must be there
if( !nRows || !nCols )
{
if( bMsg )
@@ -2194,12 +2093,12 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
}
rWrtShell.InsertDDETable(
- SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ), // TODO MULTIHEADER
+ SwInsertTableOptions( tabopts::SPLIT_LAYOUT, 1 ), // TODO MULTIHEADER
pDDETyp, nRows, nCols );
}
else if( 1 < aExpand.GetTokenCount( '\n' ) )
{
- // mehrere Absaetze -> eine geschuetzte Section einfuegen
+ // multiple paragraphs -> insert a protected section
if( rWrtShell.HasSelection() )
rWrtShell.DelRight();
@@ -2208,7 +2107,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
aSect.SetProtectFlag(true);
rWrtShell.InsertSection( aSect );
- pDDETyp = 0; // FeldTypen wieder entfernen
+ pDDETyp = 0; // remove FieldTypes again
}
else
{
@@ -2220,11 +2119,11 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
} while( sal_False );
}
else
- pDDETyp = 0; // FeldTypen wieder entfernen
+ pDDETyp = 0; // remove FieldTypes again
if( !pDDETyp && !bDoublePaste )
{
- // FeldTyp wieder entfernen - Fehler aufgetreten!
+ // remove FieldType again - error occured!
for( j = nSize; j >= INIT_FLDTYPES; --j )
if( pTyp == rWrtShell.GetFldType( j ) )
{
@@ -2236,8 +2135,6 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
return 1;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData,
SwWrtShell& rSh, sal_uInt16 nAction,
const Point* pPt, sal_uInt8 nActionFlags )
@@ -2257,8 +2154,6 @@ int SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData,
return nRet;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
sal_uLong nFmt, sal_uInt16 nAction, const Point* pPt,
sal_uInt8 nActionFlags, sal_Bool /*bMsg*/ )
@@ -2281,13 +2176,6 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
case SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR:
if( 0 != ( nRet = rData.GetINetBookmark( nFmt, aBkmk ) ))
{
-/* if( SW_PASTESDR_SETATTR != nAction )
- {
- INetURLObject aURL( aBkmk.GetURL() );
- bCheckForGrf = INET_PROT_FILE == aURL.GetProtocol();
- nRet = 0 != bCheckForGrf;
- }
-*/
if( SW_PASTESDR_SETATTR == nAction )
nFmt = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK;
else
@@ -2319,17 +2207,16 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
if( bCheckForGrf )
{
- //!!! auf FileSystem abpruefen - nur dann ist es sinnvoll die
- // Grafiken zu testen !!!!
+ //!!! check at FileSystem - only then it makes sense to test the graphics !!!
GraphicFilter *pFlt = GraphicFilter::GetGraphicFilter();
nRet = GRFILTER_OK == GraphicFilter::LoadGraphic( aBkmk.GetURL(), aEmptyStr,
aGrf, pFlt );
if( !nRet && SW_PASTESDR_SETATTR == nAction &&
SOT_FORMAT_FILE == nFmt &&
- // Bug 63031 - nur bei Rahmenselektion
+ // only at frame selection
rSh.IsFrmSelected() )
{
- // dann als Hyperlink hinter die Grafik setzen
+ // then set as hyperlink after the graphic
nFmt = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK;
nRet = sal_True;
}
@@ -2401,7 +2288,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
}
else if( bCheckForImageMap )
{
- // oder sollte das File ein ImageMap-File sein?
+ // or should the file be an ImageMap-File?
ImageMap aMap;
SfxMedium aMed( INetURLObject(aBkmk.GetURL()).GetFull(),
STREAM_STD_READ, sal_False );
@@ -2425,8 +2312,6 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
return nRet;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::_PasteImageMap( TransferableDataHelper& rData,
SwWrtShell& rSh )
{
@@ -2438,7 +2323,7 @@ int SwTransferable::_PasteImageMap( TransferableDataHelper& rData,
SwFmtURL aURL( (SwFmtURL&)aSet.Get( RES_URL ) );
const ImageMap* pOld = aURL.GetMap();
- // setzen oder ersetzen ist hier die Frage
+ // set or replace, that is the question
ImageMap aImageMap;
if( rData.GetImageMap( SOT_FORMATSTR_ID_SVIM, aImageMap ) &&
( !pOld || aImageMap != *pOld ))
@@ -2452,8 +2337,6 @@ int SwTransferable::_PasteImageMap( TransferableDataHelper& rData,
return nRet;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData,
SwWrtShell& rSh, sal_uLong nFmt )
{
@@ -2464,7 +2347,7 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData,
String sDesc;
SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc );
- //#41801# ersteinmal die URL absolut machen
+ // first, make the URL absolute
INetURLObject aURL;
aURL.SetSmartProtocol( INET_PROT_FILE );
aURL.SetSmartURL( sFile );
@@ -2498,8 +2381,6 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData,
return nRet;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
SwWrtShell& rSh, sal_uLong nFmt,
sal_uInt16 nAction, const Point* pPt,
@@ -2530,22 +2411,14 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
{
sal_Bool bIsURLFile = SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc );
- //Eigenes FileFormat? -->Einfuegen, nicht fuer StarWriter/Web
+ //Own FileFormat? --> insert, not for StarWriter/Web
String sFileURL = URIHelper::SmartRel2Abs(INetURLObject(), sFile, Link(), false );
const SfxFilter* pFlt = SW_PASTESDR_SETATTR == nAction
? 0 : SwIoSystem::GetFileFilter(
sFileURL, aEmptyStr );
- if( pFlt && !rSh.GetView().GetDocShell()->ISA(SwWebDocShell)
- /*
- JP 02.07.98: warum nur fuer die Formate ??
- && ( pFlt->GetUserData() == FILTER_SW5 ||
- pFlt->GetUserData() == FILTER_SW4 ||
- pFlt->GetUserData() == FILTER_SW3 ||
- pFlt->GetUserData() == FILTER_SWG )
- */
- )
+ if( pFlt && !rSh.GetView().GetDocShell()->ISA(SwWebDocShell) )
{
- // und dann per PostUser Event den Bereich-Einfuegen-Dialog hochreissen
+ // and then pull up the insert-region-dialog by PostUser event
SwSectionData * pSect = new SwSectionData(
FILE_LINK_SECTION,
rSh.GetDoc()->GetUniqueSectionName() );
@@ -2559,10 +2432,9 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
else if( SW_PASTESDR_SETATTR == nAction ||
( bIsURLFile && SW_PASTESDR_INSERT == nAction ))
{
- //Fremde Files koennen wir immerhin noch als Links
- //Einfuegen.
+ //we can insert foreign files as links after all
- //#41801# ersteinmal die URL absolut machen
+ // first, make the URL absolute
INetURLObject aURL;
aURL.SetSmartProtocol( INET_PROT_FILE );
aURL.SetSmartURL( sFile );
@@ -2599,8 +2471,6 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
return nRet;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::_PasteDBData( TransferableDataHelper& rData,
SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bLink,
const Point* pDragPt, sal_Bool bMsg )
@@ -2703,8 +2573,6 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& rData,
return nRet;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::_PasteFileList( TransferableDataHelper& rData,
SwWrtShell& rSh, sal_Bool bLink,
const Point* pPt, sal_Bool bMsg )
@@ -2744,8 +2612,6 @@ int SwTransferable::_PasteFileList( TransferableDataHelper& rData,
return nRet;
}
-// -----------------------------------------------------------------------
-
sal_Bool SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData,
String& rFileName, String* pTitle )
{
@@ -2766,15 +2632,13 @@ sal_Bool SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData,
String sExt( rFileName.Copy( nLen - 3 ));
if( sExt.EqualsIgnoreCaseAscii( "url" ))
{
-ASSERT( !&rFileName, "how do we read today .URL - Files?" );
+ OSL_ENSURE( !&rFileName, "how do we read today .URL - Files?" );
}
}
}
return bIsURLFile;
}
-// -----------------------------------------------------------------------
-
sal_Bool SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell,
const TransferableDataHelper& rData )
{
@@ -2784,8 +2648,6 @@ sal_Bool SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell,
return aClipboardFmtItem.Count() > 0;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::PasteFormat( SwWrtShell& rSh,
TransferableDataHelper& rData,
sal_uLong nFormat )
@@ -2828,8 +2690,6 @@ int SwTransferable::PasteFormat( SwWrtShell& rSh,
return nRet;
}
-// -----------------------------------------------------------------------
-
int SwTransferable::_TestAllowedFormat( const TransferableDataHelper& rData,
sal_uLong nFormat, sal_uInt16 nDestination )
{
@@ -2846,8 +2706,6 @@ int SwTransferable::_TestAllowedFormat( const TransferableDataHelper& rData,
return EXCHG_INOUT_ACTION_NONE != nAction;
}
-// -----------------------------------------------------------------------
-
/**
* the list of formats which will be offered to the user in the 'Paste
* Special...' dialog and the paste button menu
@@ -2870,15 +2728,12 @@ static sal_uInt16 aPasteSpecialIds[] =
0
};
-
int SwTransferable::PasteUnformatted( SwWrtShell& rSh, TransferableDataHelper& rData )
{
// Plain text == unformatted
return SwTransferable::PasteFormat( rSh, rData, SOT_FORMAT_STRING );
}
-// -----------------------------------------------------------------------
-
int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData, sal_uLong& rFormatUsed )
{
int nRet = 0;
@@ -2950,7 +2805,6 @@ int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData
return nRet;
}
-
void SwTransferable::FillClipFmtItem( const SwWrtShell& rSh,
const TransferableDataHelper& rData,
SvxClipboardFmtItem & rToFill )
@@ -3013,10 +2867,8 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
if( nsSelectionType::SEL_GRF == nSelection)
{
AddFormat( SOT_FORMATSTR_ID_SVXB );
- // --> OD 2005-02-09 #119353# - robust
const Graphic* pGrf = pWrtShell->GetGraphic();
if ( pGrf && pGrf->IsSupportedGraphic() )
- // <--
{
AddFormat( FORMAT_GDIMETAFILE );
AddFormat( FORMAT_BITMAP );
@@ -3032,7 +2884,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
AddFormat( FORMAT_GDIMETAFILE );
eBufferType = TRNSFR_OLE;
}
- //Gibt es ueberhaupt etwas zum bereitstellen?
+ //Is there anything to provide anyway?
else if ( pWrtShell->IsSelection() || pWrtShell->IsFrmSelected() ||
pWrtShell->IsObjSelected() )
{
@@ -3052,8 +2904,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
- //RTF vor das Metafile von OLE stellen, weil mit weniger verlusten
- //behaftet.
+ //put RTF ahead of the OLE's Metafile for less loss
if( !pWrtShell->IsObjSelected() )
{
AddFormat( FORMAT_RTF );
@@ -3079,7 +2930,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
if( !pWrtShell->GetDrawObjGraphic( FORMAT_BITMAP, *pClpBitmap ))
pOrigGrf = pClpBitmap;
- // ist es ein URL-Button ?
+ // is it an URL-Button ?
String sURL, sDesc;
if( pWrtShell->GetURLFromButton( sURL, sDesc ) )
{
@@ -3093,9 +2944,9 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
}
}
- //ObjectDescriptor wurde bereits aus der alten DocShell gefuellt.
- //Jetzt noch anpassen. Dadurch kann im GetData die erste Anfrage
- //auch noch mit delayed rendering beantwortet werden.
+ //ObjectDescriptor was already filled from the old DocShell.
+ //Now adjust it. Thus in GetData the first query can still
+ //be answered with delayed rendering.
aObjDesc.mbCanLink = sal_False;
aObjDesc.maDragStartPos = rSttPos;
aObjDesc.maSize = OutputDevice::LogicToLogic( Size( OLESIZE ),
@@ -3105,7 +2956,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
}
else if( nSelection & nsSelectionType::SEL_TXT && !pWrtShell->HasMark() )
{
- // ist nur ein Feld - Selektiert?
+ // is only one field - selected?
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_INETATTR );
Point aPos( SwEditWin::GetDDStartPosX(), SwEditWin::GetDDStartPosY());
@@ -3167,13 +3018,13 @@ void SwTransferable::StartDrag( Window* pWin, const Point& rPos )
void SwTransferable::DragFinished( sal_Int8 nAction )
{
- //Und noch die letzten Nacharbeiten damit alle Stati stimmen.
+ //And the last finishing work so that all statuses are right
if( DND_ACTION_MOVE == nAction )
{
if( bCleanUp )
{
- //Es wurde auserhalb des Writers gedroped. Wir muessen noch
- //loeschen.
+ //It was dropped outside of Writer. We still have to
+ //delete.
pWrtShell->StartAllAction();
pWrtShell->StartUndo( UNDO_UI_DRAG_AND_MOVE );
@@ -3182,7 +3033,7 @@ void SwTransferable::DragFinished( sal_Int8 nAction )
else
{
if ( !(pWrtShell->IsSelFrmMode() || pWrtShell->IsObjSelected()) )
- //SmartCut, eines der Blanks mitnehmen.
+ //SmartCut, take one of the blanks along
pWrtShell->IntelligentCut( pWrtShell->GetSelectionType(), sal_True );
pWrtShell->DelRight();
}
@@ -3205,52 +3056,39 @@ void SwTransferable::DragFinished( sal_Int8 nAction )
pWrtShell->HideCrsr();
else
pWrtShell->ShowCrsr();
-//!! else if( DND_ACTION_NONE != nAction )
-//!! pWrtShell->ShowCrsr();
-//!! else
-//!! {
-//!! //Muss wohl sein weil gescrollt wurde und ?...?
-//!! pWrtShell->StartAction();
-//!! pWrtShell->EndAction();
-//!! }
((SwViewOption *)pWrtShell->GetViewOptions())->SetIdle( bOldIdle );
}
-
-/* */
-
int SwTransferable::PrivatePaste( SwWrtShell& rShell )
{
- // erst den SelectionType erfragen, dann Action-Klammerung !!!!
- // (sonst wird nicht in eine TabellenSelektion gepastet!!!)
- ASSERT( !rShell.ActionPend(), "Paste darf nie eine Actionklammerung haben" );
+ // first, ask for the SelectionType, then action-bracketing !!!!
+ // (otherwise it's not pasted into a TableSelection!!!)
+ OSL_ENSURE( !rShell.ActionPend(), "Paste darf nie eine Actionklammerung haben" );
if ( !pClpDocFac )
return sal_False; // the return value of the SwFEShell::Paste also is sal_Bool!
const int nSelection = rShell.GetSelectionType();
- // #111827#
SwRewriter aRewriter;
SwTrnsfrActionAndUndo aAction( &rShell, UNDO_PASTE_CLIPBOARD);
bool bKillPaMs = false;
- //Selektierten Inhalt loeschen, nicht bei Tabellen-Selektion und
- //Tabelle im Clipboard
+ //Delete selected content, not at table-selection and table in Clipboard
if( rShell.HasSelection() && !( nSelection & nsSelectionType::SEL_TBL_CELLS))
{
bKillPaMs = true;
rShell.SetRetainSelection( true );
rShell.DelRight();
- // war ein Fly selektiert, so muss jetzt fuer eine gueltige
- // Cursor-Position gesorgt werden! (geparkter Cursor!)
+ // when a Fly was selected, a valid cursor position has to be found now
+ // (parked Cursor!)
if( ( nsSelectionType::SEL_FRM | nsSelectionType::SEL_GRF |
nsSelectionType::SEL_OLE | nsSelectionType::SEL_DRW |
nsSelectionType::SEL_DRW_FORM ) & nSelection )
{
- // den Cursor wieder positionieren
+ // position the cursor again
Point aPt( rShell.GetCharRect().Pos() );
rShell.SwCrsrShell::SetCrsr( aPt, sal_True );
}
@@ -3261,14 +3099,9 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
bSmart = 0 != (TRNSFR_DOCUMENT_WORD & eBufferType);
if( bSmart )
{
-// #108491# Why not for other Scripts? If TRNSFR_DOCUMENT_WORD is set, we have
-// a word in the buffer, word in this context means 'something with spaces at
-// beginning and end'. In this case we definitely want these spaces to be inserted
-// here.
-// if( SCRIPTTYPE_LATIN != rShell.GetScriptType() )
-// bSmart = sal_False;
-// else
-// {
+// Why not for other Scripts? If TRNSFR_DOCUMENT_WORD is set, we have a word
+// in the buffer, word in this context means 'something with spaces at beginning
+// and end'. In this case we definitely want these spaces to be inserted here.
bInWrd = rShell.IsInWrd();
bEndWrd = rShell.IsEndWrd();
bSmart = bInWrd || bEndWrd;
@@ -3278,7 +3111,6 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
if( bSmart && !bSttWrd && (bInWrd || bEndWrd) )
rShell.SwEditShell::Insert(' ');
}
-// }
}
int nRet = rShell.Paste( pClpDocFac->GetDoc() );
@@ -3286,7 +3118,7 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
if( bKillPaMs )
rShell.KillPams();
- // Wenn Smart Paste dann Leerzeichen einfuegen
+ // If Smart Paste then insert blank
if( nRet && bSmart && ((bInWrd && !bEndWrd )|| bSttWrd) )
rShell.SwEditShell::Insert(' ');
@@ -3316,7 +3148,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
if( (TRNSFR_INETFLD & eBufferType) && pBkmk )
aTmp = *pBkmk;
- // Zielgrafik selektieren
+ // select target graphic
if( rSh.SelectObj( rDragPt ) )
{
rSh.HideCrsr();
@@ -3326,7 +3158,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
const int nSelection = rSh.GetSelectionType();
- // Draw-Objekte erstmal noch nicht beruecksichtigen
+ // not yet consider Draw objects
if( nsSelectionType::SEL_GRF & nSelection )
{
SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
@@ -3351,14 +3183,14 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
if( &rSh != &rSrcSh && (nsSelectionType::SEL_GRF & rSh.GetSelectionType()) &&
TRNSFR_GRAPHIC == eBufferType )
{
- // ReRead auf die Grafik
+ // ReRead the graphic
String sGrfNm, sFltNm;
rSrcSh.GetGrfNms( &sGrfNm, &sFltNm );
rSh.ReRead( sGrfNm, sFltNm, rSrcSh.GetGraphic() );
return 1;
}
- //Nicht in Selektionen oder selektierten Rahmen
+ //not in selections or selected frames
if( rSh.ChgCurrPam( rDragPt ) ||
( rSh.IsSelFrmMode() && rSh.IsInsideSelectedObj( rDragPt )) )
return 0;
@@ -3367,7 +3199,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
bTblSel = sal_True;
else if( rSrcSh.IsSelFrmMode() || rSrcSh.IsObjSelected() )
{
- // keine positionsgeschuetzten Objecte verschieben!
+ // don't move position-protected objects!
if( bMove && rSrcSh.IsSelObjProtected( FLYPROTECT_POS ) )
return 0;
@@ -3378,7 +3210,6 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
SwUndoId eUndoId = bMove ? UNDO_UI_DRAG_AND_MOVE : UNDO_UI_DRAG_AND_COPY;
- // #111827#
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, rSrcSh.GetSelDescr());
@@ -3400,13 +3231,13 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
{
if( !rSh.IsAddMode() )
{
- // --> OD 2008-03-19 #i87233#
+ // #i87233#
if ( rSh.IsBlockMode() )
{
// preserve order of cursors for block mode
rSh.GoPrevCrsr();
}
- // <--
+
rSh.SwCrsrShell::CreateCrsr();
}
rSh.SwCrsrShell::SetCrsr( rDragPt, sal_True, false );
@@ -3422,7 +3253,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
Point aSttPt( SwEditWin::GetDDStartPosX(), SwEditWin::GetDDStartPosY() );
- //JP 05.03.96: INetFelder erstmal selektieren !
+ // at first, select INetFelder!
if( TRNSFR_INETFLD == eBufferType )
{
if( &rSrcSh == &rSh )
@@ -3432,7 +3263,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
rSh.SelectTxtAttr( RES_TXTATR_INETFMT );
if( rSh.ChgCurrPam( rDragPt ) )
{
- // nicht in sich selbst kopieren/verschieben
+ // don't copy/move inside of yourself
rSh.DestroyCrsr();
rSh.EndUndo();
rSh.EndAction();
@@ -3447,15 +3278,15 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
rSrcSh.SelectTxtAttr( RES_TXTATR_INETFMT );
}
- // ist am Einfuege Punkt ein URL-Attribut? Dann das ersetzen,
- // also einfach eine Selektion aufspannen?
+ // is there an URL attribute at the insert point? Then replace that,
+ // so simply put up a selection?
rSh.DelINetAttrWithText();
bDDINetAttr = sal_True;
}
if ( rSrcSh.IsSelFrmMode() )
{
- //Hack: Spezialbehandlung austricksen
+ //Hack: fool the special treatment
aSttPt -= aSttPt - rSrcSh.GetObjRect().Pos();
}
@@ -3469,12 +3300,12 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
{
if ( bTblSel )
{
- /* #109590# delete table contents not cells */
+ /* delete table contents not cells */
rSrcSh.Delete();
}
else
{
- //SmartCut, eines der Blank mitnehmen.
+ //SmartCut, take one of the blanks along.
rSh.SwCrsrShell::DestroyCrsr();
if ( cWord == SwWrtShell::WORD_SPACE_BEFORE )
rSh.ExtendSelection( sal_False );
@@ -3486,7 +3317,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
rSrcSh.KillPams();
rSrcSh.Pop( sal_False );
- /* #109590# after dragging a table selection inside one shell
+ /* after dragging a table selection inside one shell
set cursor to the drop position. */
if( &rSh == &rSrcSh && ( bTblSel || rSh.IsBlockMode() ) )
{
@@ -3531,7 +3362,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
rSh.SwCrsrShell::CreateCrsr();
else
{
- // Selektionsmodus einschalten
+ // turn on selection mode
rSh.SttSelect();
rSh.EndSelect();
}
@@ -3545,7 +3376,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
rSrcSh.EndUndo();
rSh.EndUndo();
- // Shell in den richtigen Status versetzen
+ // put the shell in the right state
if( &rSrcSh != &rSh && ( rSh.IsFrmSelected() || rSh.IsObjSelected() ))
rSh.EnterSelFrmMode();
@@ -3561,7 +3392,6 @@ void SwTransferable::CreateSelection( SwWrtShell& rSh,
SwModule *pMod = SW_MOD();
SwTransferable* pNew = new SwTransferable( rSh );
- /* #96392#*/
pNew->pCreatorView = _pCreatorView;
uno::Reference<
@@ -3576,15 +3406,12 @@ void SwTransferable::ClearSelection( SwWrtShell& rSh,
SwModule *pMod = SW_MOD();
if( pMod->pXSelection &&
((!pMod->pXSelection->pWrtShell) || (pMod->pXSelection->pWrtShell == &rSh)) &&
- /* #96392# */
(!_pCreatorView || (pMod->pXSelection->pCreatorView == _pCreatorView)) )
{
TransferableHelper::ClearSelection( rSh.GetWin() );
}
}
-/* -----------------3/31/2003 11:46AM----------------
- --------------------------------------------------*/
const Sequence< sal_Int8 >& SwTransferable::getUnoTunnelId()
{
static Sequence< sal_Int8 > aSeq;
@@ -3597,9 +3424,7 @@ const Sequence< sal_Int8 >& SwTransferable::getUnoTunnelId()
}
return aSeq;
}
-/* -----------------3/31/2003 11:46AM----------------
- --------------------------------------------------*/
sal_Int64 SwTransferable::getSomething( const Sequence< sal_Int8 >& rId ) throw( RuntimeException )
{
sal_Int64 nRet;
@@ -3629,15 +3454,11 @@ SwTransferable* SwTransferable::GetSwTransferable( const TransferableDataHelper&
}
-/* */
-
-// -----------------------------------------------------------------------
-
SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
: rTrnsfr( rTrans ), pDocShell( 0 ),
bDelBookmrk( sal_False ), bInDisconnect( sal_False )
{
- // hier kommen wir nur bei Tabellen- oder Text-Selection an
+ // we only end up here with table- or text selection
const int nSelection = rSh.GetSelectionType();
if( nsSelectionType::SEL_TBL_CELLS & nSelection )
{
@@ -3672,14 +3493,12 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
if( sName.Len() &&
0 != ( pDocShell = rSh.GetDoc()->GetDocShell() ) )
{
- // dann erzeugen wir uns mal unseren "Server" und connecten uns
- // zu diesem
+ // then we create our "server" and connect to it
refObj = pDocShell->DdeCreateLinkSource( sName );
if( refObj.Is() )
{
refObj->AddConnectAdvise( this );
refObj->AddDataAdvise( this,
-// SotExchange::GetFormatMimeType( FORMAT_RTF ),
aEmptyStr,
ADVISEMODE_NODATA | ADVISEMODE_ONLYONCE );
nOldTimeOut = refObj->GetUpdateTimeout();
@@ -3688,20 +3507,16 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
}
}
-// -----------------------------------------------------------------------
-
SwTrnsfrDdeLink::~SwTrnsfrDdeLink()
{
if( refObj.Is() )
Disconnect( sal_True );
}
-// -----------------------------------------------------------------------
-
void SwTrnsfrDdeLink::DataChanged( const String& ,
const uno::Any& )
{
- // tja das wars dann mit dem Link
+ // well, that's it with the link
if( !bInDisconnect )
{
if( FindDocShell() && pDocShell->GetView() )
@@ -3710,8 +3525,6 @@ void SwTrnsfrDdeLink::DataChanged( const String& ,
}
}
-// -----------------------------------------------------------------------
-
sal_Bool SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
{
if( !refObj.Is() || !FindDocShell() )
@@ -3739,12 +3552,6 @@ sal_Bool SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
rStrm.Write( pMem, nLen );
delete[] pMem;
- //if( bDelBookmrk )
- //{
- // // er wird das erstemal abgeholt, also ins Undo mitaufnehmen
- // // aber wie??
- //}
-
IDocumentMarkAccess* const pMarkAccess = pDocShell->GetDoc()->getIDocumentMarkAccess();
IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->findMark(sName);
if(ppMark != pMarkAccess->getMarksEnd()
@@ -3782,27 +3589,23 @@ sal_Bool SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
return true;
}
-// -----------------------------------------------------------------------
-
void SwTrnsfrDdeLink::Disconnect( sal_Bool bRemoveDataAdvise )
{
- //JP 29.01.96 Bug 24432:
- // kein DataChanged mehr entgegen nehmen, wenn man
- // sich schon im Disconnet befindet!
- // (DTOR vom Bookmark verschickt einen DataChanged!)
+ // don't accept DataChanged anymore, when already in Disconnect!
+ // (DTOR from Bookmark sends a DataChanged!)
sal_Bool bOldDisconnect = bInDisconnect;
bInDisconnect = sal_True;
- // den nicht verwendeten Bookmark wieder zerstoeren (ohne Undo!)?
+ // destroy the unused bookmark again (without Undo!)?
if( bDelBookmrk && refObj.Is() && FindDocShell() )
{
SwDoc* pDoc = pDocShell->GetDoc();
::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
- // --> OD, CD, OS 2005-11-25 #i58448#
+ // #i58448#
Link aSavedOle2Link( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- // <--
+
sal_Bool bIsModified = pDoc->IsModified();
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
@@ -3810,9 +3613,8 @@ void SwTrnsfrDdeLink::Disconnect( sal_Bool bRemoveDataAdvise )
if( !bIsModified )
pDoc->ResetModified();
- // --> OD, CD, OS 2005-11-25 #i58448#
+ // #i58448#
pDoc->SetOle2Link( aSavedOle2Link );
- // <--
bDelBookmrk = sal_False;
}
@@ -3822,29 +3624,27 @@ void SwTrnsfrDdeLink::Disconnect( sal_Bool bRemoveDataAdvise )
refObj->SetUpdateTimeout( nOldTimeOut );
refObj->RemoveConnectAdvise( this );
if( bRemoveDataAdvise )
- // in einem DataChanged darf das SelectionObject NIE geloescht
- // werden; wird schon von der Basisklasse erledigt
+ // in a DataChanged the SelectionObject must NEVER be deleted
+ // is already handled by the base class
// (ADVISEMODE_ONLYONCE!!!!)
- // Im normalen Disconnet aber schon!
+ // but always in normal Disconnect!
refObj->RemoveAllDataAdvise( this );
refObj.Clear();
}
bInDisconnect = bOldDisconnect;
}
-// -----------------------------------------------------------------------
-
sal_Bool SwTrnsfrDdeLink::FindDocShell()
{
TypeId aType( TYPE( SwDocShell ) );
SfxObjectShell* pTmpSh = SfxObjectShell::GetFirst( &aType );
while( pTmpSh )
{
- if( pTmpSh == pDocShell ) // die wollen wir haben
+ if( pTmpSh == pDocShell ) // that's what we want to have
{
if( pDocShell->GetDoc() )
return sal_True;
- break; // das Doc ist nicht mehr vorhanden, also raus!
+ break; // the Doc is not there anymore, so leave!
}
pTmpSh = SfxObjectShell::GetNext( *pTmpSh, &aType );
}
@@ -3853,8 +3653,6 @@ sal_Bool SwTrnsfrDdeLink::FindDocShell()
return sal_False;
}
-// -----------------------------------------------------------------------
-
void SwTrnsfrDdeLink::Closed()
{
if( !bInDisconnect && refObj.Is() )
@@ -3864,3 +3662,5 @@ void SwTrnsfrDdeLink::Closed()
refObj.Clear();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/AnchorOverlayObject.cxx b/sw/source/ui/docvw/AnchorOverlayObject.cxx
index 5ed5b076a967..3e38eb97fb0a 100644
--- a/sw/source/ui/docvw/AnchorOverlayObject.cxx
+++ b/sw/source/ui/docvw/AnchorOverlayObject.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/************************************************************************* *
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: postit.cxx,v $
- * $Revision: 1.8.42.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -465,3 +463,4 @@ void AnchorOverlayObject::SetAnchorState( const AnchorState aState)
} } // end of namespace sw::annotation
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/AnchorOverlayObject.hxx b/sw/source/ui/docvw/AnchorOverlayObject.hxx
index cea567f22921..6cc02cf37a52 100644
--- a/sw/source/ui/docvw/AnchorOverlayObject.hxx
+++ b/sw/source/ui/docvw/AnchorOverlayObject.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,10 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- *
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -141,3 +138,5 @@ class AnchorOverlayObject: public sdr::overlay::OverlayObjectWithBasePosition
} } // end of namespace sw::annotation
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx
index 8cef565545ff..4407e1c6fd34 100644
--- a/sw/source/ui/docvw/AnnotationMenuButton.cxx
+++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/************************************************************************* *
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -171,7 +169,7 @@ void AnnotationMenuButton::Paint( const Rectangle& /*rRect*/ )
aFont.SetWeight(WEIGHT_MEDIUM);
SetFont( aFont );
DrawText( aRect ,
- rtl::OUString::createFromAscii("Edit Note"),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Edit Note")),
TEXT_DRAW_CENTER );
SetFont( aOldFont );
}
@@ -213,3 +211,4 @@ void AnnotationMenuButton::KeyInput( const KeyEvent& rKeyEvt )
} } // end of namespace sw::annotation
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/AnnotationMenuButton.hxx b/sw/source/ui/docvw/AnnotationMenuButton.hxx
index c74719f1cad4..a20eb86b0e02 100644
--- a/sw/source/ui/docvw/AnnotationMenuButton.hxx
+++ b/sw/source/ui/docvw/AnnotationMenuButton.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,10 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- *
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -61,3 +58,5 @@ class AnnotationMenuButton : public MenuButton
} } // end of namespace sw::annotation
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx
index 4675805e527c..9cf7dd76d018 100644
--- a/sw/source/ui/docvw/AnnotationWin.cxx
+++ b/sw/source/ui/docvw/AnnotationWin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/************************************************************************* *
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -216,18 +214,18 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText)
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, pWin->GetAuthor());
aText = aRewriter.Apply(aText);
- aText.Append(String(rtl::OUString::createFromAscii(" (") +
- String(rLocalData.getDate( pWin->GetDate())) + rtl::OUString::createFromAscii(", ") +
- String(rLocalData.getTime( pWin->GetTime(),false)) + rtl::OUString::createFromAscii("): \"")));
+ aText.Append(String(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" (")) +
+ String(rLocalData.getDate( pWin->GetDate())) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", ")) +
+ String(rLocalData.getTime( pWin->GetTime(),false)) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("): \""))));
GetOutlinerView()->InsertText(aText,false);
// insert old, selected text or "..."
// TOOD: iterate over all paragraphs, not only first one to find out if it is empty
- if (pText->GetTextObject().GetText(0) != String(rtl::OUString::createFromAscii("")))
+ if (pText->GetTextObject().GetText(0).Len())
GetOutlinerView()->GetEditView().InsertText(pText->GetTextObject());
else
- GetOutlinerView()->InsertText(rtl::OUString::createFromAscii("..."),false);
- GetOutlinerView()->InsertText(rtl::OUString::createFromAscii("\"\n"),false);
+ GetOutlinerView()->InsertText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("...")),false);
+ GetOutlinerView()->InsertText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n")),false);
GetOutlinerView()->SetSelection(ESelection(0x0,0x0,0xFFFF,0xFFFF));
SfxItemSet aAnswerSet( DocView().GetDocShell()->GetPool() );
@@ -266,7 +264,7 @@ SvxLanguageItem SwAnnotationWin::GetLanguage(void)
case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE ; break;
case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break;
case SCRIPTTYPE_COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break;
- default: DBG_ERROR("GetLanguage: wrong script tye");
+ default: OSL_ENSURE(false, "GetLanguage: wrong script type");
}
return SvxLanguageItem(mpFld->GetLanguage(),nLangWhichId);
}
@@ -294,3 +292,5 @@ Time SwAnnotationWin::GetTime()
}
} } // end of namespace sw::annotation
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx
index c52082028e16..bd9d8b126c37 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96,34 +97,10 @@
using namespace sw::sidebarwindows;
-/*
-bool comp_author( const SwPostItItem* a, const SwPostItItem* b)
-{
- return a->pFmtFld->GetFld()->GetPar1() < b->pFmtFld->GetFld()->GetPar1();
-}
-
-bool comp_date( const SwPostItItem* a, const SwPostItItem* b)
-{
- return static_cast<SwPostItField*>(a->pFmtFld->GetFld())->GetDate() < static_cast<SwPostItField*>(b->pFmtFld->GetFld())->GetDate();
-}
-*/
-
-//
bool comp_pos(const SwSidebarItem* a, const SwSidebarItem* b)
{
- // --> OD 2010-01-19 #i88070#
// sort by anchor position
-//// if position is on the same line, sort by x (Left) position, otherwise by y(Bottom) position
-//// if two notes are at the same position, sort by logical node position
-// return (a->maLayoutInfo.mPosition.Bottom() == b->maLayoutInfo.mPosition.Bottom())
-// ? ( ( (a->maLayoutInfo.mPosition.Left() == b->maLayoutInfo.mPosition.Left()) &&
-// (a->GetBroadCaster()->ISA(SwFmtFld) && b->GetBroadCaster()->ISA(SwFmtFld)) )
-// ? *(static_cast<SwFmtFld*>(a->GetBroadCaster())->GetTxtFld()->GetStart()) <
-// *(static_cast<SwFmtFld*>(b->GetBroadCaster())->GetTxtFld()->GetStart())
-// : a->maLayoutInfo.mPosition.Left() < b->maLayoutInfo.mPosition.Left() )
-// : a->maLayoutInfo.mPosition.Bottom() < b->maLayoutInfo.mPosition.Bottom();
return a->GetAnchorPosition() < b->GetAnchorPosition();
- // <--
}
SwPostItMgr::SwPostItMgr(SwView* pView)
@@ -174,7 +151,7 @@ SwPostItMgr::~SwPostItMgr()
RemoveSidebarWin();
EndListening( *mpView->GetDocShell() );
- for(std::vector<SwPostItPageItem*>::iterator i = mPages.begin(); i!= mPages.end() ; i++)
+ for(std::vector<SwPostItPageItem*>::iterator i = mPages.begin(); i!= mPages.end() ; ++i)
delete (*i);
mPages.clear();
@@ -221,7 +198,7 @@ void SwPostItMgr::InsertItem(SfxBroadcaster* pItem, bool bCheckExistance, bool b
{
if (bCheckExistance)
{
- for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
{
if ( (*i)->GetBroadCaster() == pItem )
return;
@@ -230,19 +207,14 @@ void SwPostItMgr::InsertItem(SfxBroadcaster* pItem, bool bCheckExistance, bool b
mbLayout = bFocus;
if (pItem->ISA(SwFmtFld))
mvPostItFlds.push_back(new SwAnnotationItem(static_cast<SwFmtFld*>(pItem), true, bFocus) );
- /*
- else
- if (pItem->ISA(SwRedline))
- mvPostItFlds.push_back(new SwRedCommentItem( static_cast<SwRedline*>(pItem), true, bFocus)) ;
- */
- DBG_ASSERT(pItem->ISA(SwFmtFld) /*|| pItem->ISA(SwRedline)*/,"Mgr::InsertItem: seems like new stuff was added");
+ OSL_ENSURE(pItem->ISA(SwFmtFld),"Mgr::InsertItem: seems like new stuff was added");
StartListening(*pItem);
}
void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast )
{
EndListening(*pBroadcast);
- for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
{
if ( (*i)->GetBroadCaster() == pBroadcast )
{
@@ -311,42 +283,13 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if ( mpView->GetDocShell() != &rBC )
{
// field to be removed is the broadcaster
- DBG_ERROR("Notification for removed SwFmtFld was not sent!");
+ OSL_ENSURE(false, "Notification for removed SwFmtFld was not sent!");
RemoveItem(&rBC);
}
break;
}
}
}
- /*
- else if ( rHint.IsA(TYPE(SwRedlineHint) ) )
- {
- const SwRedlineHint rRedlineHint = static_cast<const SwRedlineHint&>(rHint);
- SwRedline* pRedline = const_cast<SwRedline*>(rRedlineHint.GetRedline());
- switch ( rRedlineHint.Which() )
- {
- case SWREDLINE_INSERTED :
- {
- bool bEmpty = !HasNotes();
- InsertItem( pRedline, true, false );
- if (bEmpty && !mvPostItFlds.empty())
- PrepareView(true);
- break;
- }
- case SWREDLINE_REMOVED:
- {
- RemoveItem(pRedline);
- break;
- }
- case SWREDLINE_FOCUS:
- {
- if (rRedlineHint.GetView()== mpView)
- Focus(rBC);
- break;
- }
- }
- }
- */
else if ( rHint.IsA(TYPE(SwFmtFldHint) ) )
{
const SwFmtFldHint& rFmtHint = static_cast<const SwFmtFldHint&>(rHint);
@@ -370,7 +313,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
else
{
- DBG_ERROR( "Inserted field not in document!" );
+ OSL_ENSURE(false, "Inserted field not in document!" );
}
break;
}
@@ -396,7 +339,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
case SWFMTFLD_CHANGED:
{
SwFmtFld* pFmtFld = dynamic_cast<SwFmtFld*>(&rBC);
- for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
{
if ( pFmtFld == (*i)->GetBroadCaster() )
{
@@ -413,7 +356,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
case SWFMTFLD_LANGUAGE:
{
SwFmtFld* pFmtFld = dynamic_cast<SwFmtFld*>(&rBC);
- for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
{
if ( pFmtFld == (*i)->GetBroadCaster() )
{
@@ -447,7 +390,7 @@ void SwPostItMgr::Focus(SfxBroadcaster& rBC)
mpView->ExecViewOptions(aRequest);
}
- for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
{
// field to get the focus is the broadcaster
if ( &rBC == (*i)->GetBroadCaster() )
@@ -481,12 +424,12 @@ bool SwPostItMgr::CalcRects()
PreparePageContainer();
if ( !mvPostItFlds.empty() )
{
- for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
{
SwSidebarItem* pItem = (*i);
if ( !pItem->UseElement() )
{
- DBG_ERROR("PostIt is not in doc or other wrong use");
+ OSL_ENSURE(false, "PostIt is not in doc or other wrong use");
bRepair = true;
continue;
}
@@ -513,7 +456,7 @@ bool SwPostItMgr::CalcRects()
Sort(SORT_POS);
// sort the items into the right page vector, so layout can be done by page
- for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
{
SwSidebarItem* pItem = (*i);
if( SwPostItHelper::INVISIBLE == pItem->mLayoutStatus )
@@ -571,7 +514,7 @@ bool SwPostItMgr::CalcRects()
bool SwPostItMgr::HasScrollbars() const
{
- for(std::list<SwSidebarItem*>::const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
{
if ((*i)->bShow && (*i)->pPostIt && (*i)->pPostIt->HasScrollbar())
return true;
@@ -600,7 +543,7 @@ void SwPostItMgr::PreparePageContainer()
}
}
// only clear the list, DO NOT delete the objects itself
- for(std::vector<SwPostItPageItem*>::iterator i = mPages.begin(); i!= mPages.end() ; i++)
+ for(std::vector<SwPostItPageItem*>::iterator i = mPages.begin(); i!= mPages.end() ; ++i)
{
(*i)->mList->clear();
if (mvPostItFlds.empty())
@@ -769,17 +712,7 @@ void SwPostItMgr::LayoutPostIts()
(*i)->ShowAnchorOnly(Point(mPages[n]->mPageRect.Right(),
mPages[n]->mPageRect.Bottom()));
}
- DBG_ASSERT(mPages[n]->bScrollbar,"SwPostItMgr::LayoutByPage(): note overlaps, but bScrollbar is not true");
- }
- }
-
- // do some magic so we really see the focused note
- for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++)
- {
- if ((*i)->HasChildPathFocus())
- {
- MakeVisible((*i),n+1);
- break;
+ OSL_ENSURE(mPages[n]->bScrollbar,"SwPostItMgr::LayoutByPage(): note overlaps, but bScrollbar is not true");
}
}
}
@@ -809,7 +742,7 @@ void SwPostItMgr::LayoutPostIts()
SwSidebarItem* pItem = (*i);
if ( !pItem->UseElement() )
{
- DBG_ERROR("PostIt is not in doc!");
+ OSL_ENSURE(false, "PostIt is not in doc!");
bRepair = true;
continue;
}
@@ -842,13 +775,13 @@ bool SwPostItMgr::BorderOverPageBorder(unsigned long aPage) const
{
if ( mPages[aPage-1]->mList->empty() )
{
- DBG_ERROR("Notes SidePane painted but no rects and page lists calculated!");
+ OSL_ENSURE(false, "Notes SidePane painted but no rects and page lists calculated!");
return false;
}
SwSidebarItem_iterator aItem = mPages[aPage-1]->mList->end();
--aItem;
- DBG_ASSERT ((*aItem)->pPostIt,"BorderOverPageBorder: NULL postIt, should never happen");
+ OSL_ENSURE ((*aItem)->pPostIt,"BorderOverPageBorder: NULL postIt, should never happen");
if ((*aItem)->pPostIt)
{
const long aSidebarheight = mPages[aPage-1]->bScrollbar ? mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height() : 0;
@@ -861,7 +794,7 @@ bool SwPostItMgr::BorderOverPageBorder(unsigned long aPage) const
void SwPostItMgr::Scroll(const long lScroll,const unsigned long aPage)
{
- DBG_ASSERT((lScroll % GetScrollSize() )==0,"SwPostItMgr::Scroll: scrolling by wrong value");
+ OSL_ENSURE((lScroll % GetScrollSize() )==0,"SwPostItMgr::Scroll: scrolling by wrong value");
// do not scroll more than neccessary up or down
if ( ((mPages[aPage-1]->lOffset == 0) && (lScroll>0)) || ( BorderOverPageBorder(aPage) && (lScroll<0)) )
return;
@@ -1003,9 +936,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
long lTopBorder = rBorder.Top() + 5;
long lBottomBorder = rBorder.Bottom() - 5;
const long lVisibleHeight = lBottomBorder - lTopBorder; //rBorder.GetHeight() ;
- long lSpaceUsed = 0;
long lTranslatePos = 0;
- int loop = 0;
bool bDone = false;
bool bScrollbars = false;
@@ -1035,6 +966,8 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
//start the real layout so nothing overlaps anymore
if (aVisiblePostItList.size()>1)
{
+ long lSpaceUsed = 0;
+ int loop = 0;
// if no window is moved anymore we are finished
while (!bDone)
{
@@ -1108,7 +1041,6 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
//(*i) is the last visible item
SwSidebarWin_iterator aPrevPostIt = i;
--aPrevPostIt;
- //lTranslatePos = ( (*aPrevPostIt)->VirtualPos().Y() + (*aPrevPostIt)->VirtualSize().Height() + GetSpaceBetween() ) - (*i)->VirtualPos().Y();
lTranslatePos = ( (*aPrevPostIt)->VirtualPos().Y() + (*aPrevPostIt)->VirtualSize().Height() ) - (*i)->VirtualPos().Y();
if (lTranslatePos > 0)
{
@@ -1140,7 +1072,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
// security check so we don't loop forever
if (loop>MAX_LOOP_COUNT)
{
- DBG_ERROR("PostItMgr::Layout(): We are looping forever");
+ OSL_ENSURE(false, "PostItMgr::Layout(): We are looping forever");
break;
}
}
@@ -1163,22 +1095,6 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
return bScrollbars;
}
-/*
-void SwPostItMgr::AddRedlineComments(bool bCheckExistance, bool bFocus)
-{
- bool bEmpty = mvPostItFlds.empty();
- const SwRedlineTbl& aTable = mpView->GetDocShell()->GetDoc()->GetRedlineTbl();
- for( sal_uInt16 i = 0; i < aTable.Count(); ++i )
- {
- SwRedline* pRedline = const_cast<SwRedline*>((aTable)[i]);
- if ( pRedline->GetComment() != String(rtl::OUString::createFromAscii("")) )
- InsertItem(pRedline, bCheckExistance, bFocus);
- }
- if (bEmpty && !mvPostItFlds.empty())
- PrepareView(true);
- }
- */
-
void SwPostItMgr::AddPostIts(bool bCheckExistance, bool bFocus)
{
bool bEmpty = mvPostItFlds.empty();
@@ -1205,7 +1121,7 @@ void SwPostItMgr::RemoveSidebarWin()
{
if (!mvPostItFlds.empty())
{
- for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
{
EndListening( *((*i)->GetBroadCaster()) );
if ((*i)->pPostIt)
@@ -1237,12 +1153,12 @@ void SwPostItMgr::Delete(String aAuthor)
std::vector<SwFmtFld*> aTmp;
aTmp.reserve( mvPostItFlds.size() );
- for(std::list<SwSidebarItem*>::iterator pPostIt = mvPostItFlds.begin(); pPostIt!= mvPostItFlds.end() ; pPostIt++)
+ for(std::list<SwSidebarItem*>::iterator pPostIt = mvPostItFlds.begin(); pPostIt!= mvPostItFlds.end() ; ++pPostIt)
{
if ((*pPostIt)->GetFmtFld() && ((*pPostIt)->pPostIt->GetAuthor() == aAuthor) )
aTmp.push_back( (*pPostIt)->GetFmtFld() );
}
- for(std::vector<SwFmtFld*>::iterator i = aTmp.begin(); i!= aTmp.end() ; i++)
+ for(std::vector<SwFmtFld*>::iterator i = aTmp.begin(); i!= aTmp.end() ; ++i)
{
mpWrtShell->GotoField( *(*i) );
mpWrtShell->DelRight();
@@ -1265,34 +1181,17 @@ void SwPostItMgr::Delete()
std::vector<SwFmtFld*> aTmp;
aTmp.reserve( mvPostItFlds.size() );
- for(std::list<SwSidebarItem*>::iterator pPostIt = mvPostItFlds.begin(); pPostIt!= mvPostItFlds.end() ; pPostIt++)
+ for(std::list<SwSidebarItem*>::iterator pPostIt = mvPostItFlds.begin(); pPostIt!= mvPostItFlds.end() ; ++pPostIt)
{
if ((*pPostIt)->GetFmtFld())
aTmp.push_back( (*pPostIt)->GetFmtFld() );
}
- for(std::vector<SwFmtFld*>::iterator i = aTmp.begin(); i!= aTmp.end() ; i++)
+ for(std::vector<SwFmtFld*>::iterator i = aTmp.begin(); i!= aTmp.end() ; ++i)
{
mpWrtShell->GotoField( *(*i) );
mpWrtShell->DelRight();
}
-/*
- for(std::list<SwPostItItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
- {
- SwPostItItem* pItem = (*i);
- // stop listening, we delete ourselves
- EndListening( *(pItem->pFmtFld) );
- // delete the actual SwPostItField
- mpWrtShell->GotoField(*pItem->pFmtFld);
- mpWrtShell->DelRight();
- // delete visual representation
- delete pItem->pPostIt;
- // delete struct saving the pointers
- delete pItem;
- }
- mvPostItFlds.clear();
-*/
-
mpWrtShell->EndUndo();
PrepareView();
mpWrtShell->EndAllAction();
@@ -1300,26 +1199,6 @@ void SwPostItMgr::Delete()
CalcRects();
LayoutPostIts();
}
-#if 0
-void SwPostItMgr::Hide(SwPostItField* pPostItField )
-{
- for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
- {
- if ((*i)->GetFmtFld())
- {
- SwPostItField* pField = static_cast<SwPostItField*>((*i)->GetFmtFld()->GetFld());
- if (pPostItField==pField)
- {
- (*i)->bShow = false;
- (*i)->pPostIt->HideNote();
- break;
- }
- }
- }
-
- LayoutPostIts();
-}
-#endif
void SwPostItMgr::Hide( const String& rAuthor )
{
for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
@@ -1362,21 +1241,13 @@ void SwPostItMgr::Sort(const short aType)
case SORT_POS:
mvPostItFlds.sort(comp_pos);
break;
- /*
- case SORT_AUTHOR:
- mvPostItFlds.sort(comp_author);
- break;
- case SORT_DATE:
- mvPostItFlds.sort(comp_date);
- break;
- */
}
}
}
SwSidebarWin* SwPostItMgr::GetSidebarWin( const SfxBroadcaster* pBroadcaster) const
{
- for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
{
if ( (*i)->GetBroadCaster() == pBroadcaster)
return (*i)->pPostIt;
@@ -1386,7 +1257,7 @@ SwSidebarWin* SwPostItMgr::GetSidebarWin( const SfxBroadcaster* pBroadcaster) co
sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const SwPostItField* pFld) const
{
- for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
{
if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld() == pFld))
return dynamic_cast<sw::annotation::SwAnnotationWin*>((*i)->pPostIt);
@@ -1459,7 +1330,7 @@ long SwPostItMgr::GetNextBorder()
}
}
- DBG_ERROR("SwPostItMgr::GetNextBorder(): We have to find a next border here");
+ OSL_ENSURE(false, "SwPostItMgr::GetNextBorder(): We have to find a next border here");
return -1;
}
@@ -1521,7 +1392,6 @@ void SwPostItMgr::PrepareView(bool bIgnoreCount)
if (!HasNotes() || bIgnoreCount)
{
mpWrtShell->StartAllAction();
- //mpEditWin->Invalidate(); // really not needed anymore??
SwRootFrm* pLayout = mpWrtShell->GetLayout();
if ( pLayout )
SwPostItHelper::setSidebarChanged( pLayout,
@@ -1549,7 +1419,7 @@ bool SwPostItMgr::IsHit(const Point &aPointPixel)
if( nPageNum )
{
Rectangle aRect;
- DBG_ASSERT(mPages.size()>nPageNum-1,"SwPostitMgr:: page container size wrong");
+ OSL_ENSURE(mPages.size()>nPageNum-1,"SwPostitMgr:: page container size wrong");
aRect = mPages[nPageNum-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT
? Rectangle(Point(aPageFrm.Left()-GetSidebarWidth()-GetSidebarBorderWidth(),aPageFrm.Top()),Size(GetSidebarWidth(),aPageFrm.Height()))
: Rectangle( Point(aPageFrm.Right()+GetSidebarBorderWidth(),aPageFrm.Top()) , Size(GetSidebarWidth(),aPageFrm.Height()));
@@ -1642,14 +1512,13 @@ void SwPostItMgr::CorrectPositions()
return;
// yeah, I know, if this is a left page it could be wrong, but finding the page and the note is probably not even faster than just doing it
- // --> OD 2010-06-03 #i111964# - check, if anchor overlay object exists.
+ // check, if anchor overlay object exists.
const long aAnchorX = pFirstPostIt->Anchor()
? mpEditWin->LogicToPixel( Point((long)(pFirstPostIt->Anchor()->GetSixthPosition().getX()),0)).X()
: 0;
const long aAnchorY = pFirstPostIt->Anchor()
? mpEditWin->LogicToPixel( Point(0,(long)(pFirstPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1
: 0;
- // <--
if (Point(aAnchorX,aAnchorY) != pFirstPostIt->GetPosPixel())
{
long aAnchorPosX = 0;
@@ -1658,9 +1527,8 @@ void SwPostItMgr::CorrectPositions()
{
for(SwSidebarItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++)
{
- // --> OD 2010-06-03 #i111964# - check, if anchor overlay object exists.
+ // 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()
@@ -1716,7 +1584,7 @@ Color SwPostItMgr::GetColorDark(sal_uInt16 aAuthorIndex)
COL_AUTHOR4_NORMAL, COL_AUTHOR5_NORMAL, COL_AUTHOR6_NORMAL,
COL_AUTHOR7_NORMAL, COL_AUTHOR8_NORMAL, COL_AUTHOR9_NORMAL };
- return Color( aArrayNormal[ aAuthorIndex % (sizeof( aArrayNormal )/ sizeof( aArrayNormal[0] ))]);
+ return Color( aArrayNormal[ aAuthorIndex % (SAL_N_ELEMENTS(aArrayNormal))]);
}
else
return Color(COL_WHITE);
@@ -1731,7 +1599,7 @@ Color SwPostItMgr::GetColorLight(sal_uInt16 aAuthorIndex)
COL_AUTHOR4_LIGHT, COL_AUTHOR5_LIGHT, COL_AUTHOR6_LIGHT,
COL_AUTHOR7_LIGHT, COL_AUTHOR8_LIGHT, COL_AUTHOR9_LIGHT };
- return Color( aArrayLight[ aAuthorIndex % (sizeof( aArrayLight )/ sizeof( aArrayLight[0] ))]);
+ return Color( aArrayLight[ aAuthorIndex % (SAL_N_ELEMENTS(aArrayLight))]);
}
else
return Color(COL_WHITE);
@@ -1746,7 +1614,7 @@ Color SwPostItMgr::GetColorAnchor(sal_uInt16 aAuthorIndex)
COL_AUTHOR4_DARK, COL_AUTHOR5_DARK, COL_AUTHOR6_DARK,
COL_AUTHOR7_DARK, COL_AUTHOR8_DARK, COL_AUTHOR9_DARK };
- return Color( aArrayAnchor[ aAuthorIndex % (sizeof( aArrayAnchor ) / sizeof( aArrayAnchor[0] ))]);
+ return Color( aArrayAnchor[ aAuthorIndex % (SAL_N_ELEMENTS(aArrayAnchor))]);
}
else
return Color(COL_WHITE);
@@ -1780,7 +1648,7 @@ IMPL_LINK( SwPostItMgr, CalcHdl, void*, /* pVoid*/ )
mnEventId = 0;
if ( mbLayouting )
{
- DBG_ERROR("Reentrance problem in Layout Manager!");
+ OSL_ENSURE(false, "Reentrance problem in Layout Manager!");
mbWaitingForCalcRects = false;
return 0;
}
@@ -1796,7 +1664,7 @@ IMPL_LINK( SwPostItMgr, CalcHdl, void*, /* pVoid*/ )
void SwPostItMgr::Rescale()
{
- for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
if ( (*i)->pPostIt )
(*i)->pPostIt->Rescale();
}
@@ -1833,21 +1701,21 @@ sal_Int32 SwPostItMgr::GetSidebarScrollerHeight() const
void SwPostItMgr::SetSpellChecking()
{
- for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
if ( (*i)->pPostIt )
(*i)->pPostIt->SetSpellChecking();
}
void SwPostItMgr::SetReadOnlyState()
{
- for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
if ( (*i)->pPostIt )
(*i)->pPostIt->SetReadonly( mbReadOnly );
}
void SwPostItMgr::CheckMetaText()
{
- for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i)
if ( (*i)->pPostIt )
(*i)->pPostIt->CheckMetaText();
@@ -1902,7 +1770,6 @@ sal_uInt16 SwPostItMgr::SearchReplace(const SwFmtFld &pFld, const ::com::sun::st
void SwPostItMgr::AssureStdModeAtShell()
{
- //#i103373# #i103645#
// deselect any drawing or frame and leave editing mode
SdrView* pSdrView = mpWrtShell->GetDrawView();
if ( pSdrView && pSdrView->IsTextEdit() )
@@ -2043,3 +1910,5 @@ 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: */
diff --git a/sw/source/ui/docvw/ShadowOverlayObject.cxx b/sw/source/ui/docvw/ShadowOverlayObject.cxx
index b11fc914b5fd..0c60340e659b 100644
--- a/sw/source/ui/docvw/ShadowOverlayObject.cxx
+++ b/sw/source/ui/docvw/ShadowOverlayObject.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/************************************************************************* *
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: postit.cxx,v $
- * $Revision: 1.8.42.11 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -266,3 +264,4 @@ void ShadowOverlayObject::SetPosition( const basegfx::B2DPoint& rPoint1,
} } // end of namespace sw::sidebarwindows
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/ShadowOverlayObject.hxx b/sw/source/ui/docvw/ShadowOverlayObject.hxx
index a00aea380fdb..d33f0c69d671 100644
--- a/sw/source/ui/docvw/ShadowOverlayObject.hxx
+++ b/sw/source/ui/docvw/ShadowOverlayObject.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,10 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- *
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -78,3 +75,5 @@ class ShadowOverlayObject: public sdr::overlay::OverlayObjectWithBasePosition
} } // end of namespace sw::sidebarwindows
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx
index b0cc39372dd7..473c7b872bb4 100644
--- a/sw/source/ui/docvw/SidebarTxtControl.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/************************************************************************* *
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -362,7 +360,6 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt )
//!! call different Execute function to get rid of the new thesaurus sub menu
//!! pointer created in the call to Popup.
//!! Otherwise we would have a memory leak (see also #i107205#)
- //((PopupMenu*)pMgr->GetSVMenu())->Execute( this, aPos );
pMgr->Execute( aPos, this );
delete pMgr;
}
@@ -425,3 +422,4 @@ css::uno::Reference< css::accessibility::XAccessible > SidebarTxtControl::Create
} } // end of namespace sw::sidebarwindows
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/SidebarTxtControl.hxx b/sw/source/ui/docvw/SidebarTxtControl.hxx
index 08a5de0003c4..b1aa2caa81c4 100644
--- a/sw/source/ui/docvw/SidebarTxtControl.hxx
+++ b/sw/source/ui/docvw/SidebarTxtControl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,10 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- *
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -85,3 +82,5 @@ class SidebarTxtControl : public Control
} } // end of namespace sw::sidebarwindows
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
index 66b0bc88335c..52ddacabb3df 100644
--- a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/************************************************************************* *
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -180,7 +178,7 @@ class SidebarTxtControlAccessibleContext : public VCLXAccessibleComponent
SidebarTxtControl& mrSidebarTxtControl;
::accessibility::AccessibleTextHelper* mpAccessibleTextHelper;
- ::vos::OMutex maMutex;
+ ::osl::Mutex maMutex;
void defunc();
};
@@ -211,7 +209,7 @@ void SidebarTxtControlAccessibleContext::defunc()
sal_Int32 SAL_CALL SidebarTxtControlAccessibleContext::getAccessibleChildCount()
throw (::com::sun::star::uno::RuntimeException)
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
sal_Int32 nChildCount( 0 );
@@ -226,7 +224,7 @@ sal_Int32 SAL_CALL SidebarTxtControlAccessibleContext::getAccessibleChildCount()
css::uno::Reference< css::accessibility::XAccessible > SAL_CALL SidebarTxtControlAccessibleContext::getAccessibleChild( sal_Int32 i )
throw ( css::lang::IndexOutOfBoundsException, css::uno::RuntimeException )
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
css::uno::Reference< css::accessibility::XAccessible > xChild;
@@ -242,7 +240,7 @@ void SAL_CALL SidebarTxtControlAccessibleContext::addEventListener (
const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener)
throw (css::uno::RuntimeException)
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if ( mpAccessibleTextHelper )
{
@@ -254,7 +252,7 @@ void SAL_CALL SidebarTxtControlAccessibleContext::removeEventListener (
const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener)
throw (css::uno::RuntimeException)
{
- vos::OGuard aGuard( maMutex );
+ osl::MutexGuard aGuard( maMutex );
if ( mpAccessibleTextHelper )
{
@@ -315,3 +313,4 @@ css::uno::Reference< css::accessibility::XAccessibleContext > SidebarTxtControlA
} } // end of namespace sw::sidebarwindows
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.hxx b/sw/source/ui/docvw/SidebarTxtControlAcc.hxx
index 57edc50512d5..d711c2dd6bd3 100644
--- a/sw/source/ui/docvw/SidebarTxtControlAcc.hxx
+++ b/sw/source/ui/docvw/SidebarTxtControlAcc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,10 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- *
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -54,3 +51,5 @@ class SidebarTxtControlAccessible : public VCLXWindow
} } // end of namespace sw::sidebarwindows
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index 2deb8889c419..4dcb7d7d4c47 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/************************************************************************* *
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,7 +93,7 @@ namespace sw { namespace sidebarwindows {
#define POSTIT_SHADOW_BRIGHT Color(180,180,180)
#define POSTIT_SHADOW_DARK Color(83,83,83)
-#define EMPTYSTRING rtl::OUString::createFromAscii("")
+#define EMPTYSTRING rtl::OUString()
/************** SwSidebarWin************************************/
SwSidebarWin::SwSidebarWin( SwEditWin& rEditWin,
@@ -399,7 +400,7 @@ void SwSidebarWin::CheckMetaText()
else if (sMeta.Len() > 22)
{
sMeta.Erase(20);
- sMeta = sMeta + rtl::OUString::createFromAscii("...");
+ sMeta = sMeta + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("..."));
}
if ( mpMetadataAuthor->GetText() != sMeta )
{
@@ -425,7 +426,7 @@ void SwSidebarWin::CheckMetaText()
}
if (GetTime()!=0)
{
- sMeta = sMeta + rtl::OUString::createFromAscii(" ") + rLocalData.getTime( GetTime(),false );
+ sMeta = sMeta + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")) + rLocalData.getTime( GetTime(),false );
}
if ( mpMetadataDate->GetText() != sMeta )
{
@@ -492,7 +493,7 @@ void SwSidebarWin::SetPosAndSize()
}
break;
default:
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwSidebarWin::SetPosAndSize()> - unexpected position of sidebar" );
break;
}
@@ -757,7 +758,7 @@ void SwSidebarWin::SetColor(Color aColorDark,Color aColorLight, Color aColorAnch
AllSettings aSettings2 = mpVScrollbar->GetSettings();
StyleSettings aStyleSettings2 = aSettings2.GetStyleSettings();
aStyleSettings2.SetButtonTextColor(Color(0,0,0));
- aStyleSettings2.SetCheckedColor(mColorLight); //hintergund
+ aStyleSettings2.SetCheckedColor(mColorLight); // backgound
aStyleSettings2.SetShadowColor(mColorAnchor);
aStyleSettings2.SetFaceColor(mColorDark);
aSettings2.SetStyleSettings(aStyleSettings2);
@@ -996,11 +997,7 @@ IMPL_LINK( SwSidebarWin, WindowEventListener, VclSimpleEvent*, pEvent )
}
else if ( pMouseEvt->IsLeaveWindow())
{
- if (IsPreview())
- {
- //doLazyDelete();
- }
- else
+ if (!IsPreview())
{
mbMouseOver = false;
if ( !HasFocus() )
@@ -1055,18 +1052,14 @@ IMPL_LINK(SwSidebarWin, ScrollHdl, ScrollBar*, pScroll)
return 0;
}
-IMPL_LINK(SwSidebarWin, ModifyHdl, void*, pVoid)
+IMPL_LINK(SwSidebarWin, ModifyHdl, void*, EMPTYARG)
{
- // no warnings, please
- pVoid=0;
mrView.GetDocShell()->SetModified(sal_True);
return 0;
}
-IMPL_LINK(SwSidebarWin, DeleteHdl, void*, pVoid)
+IMPL_LINK(SwSidebarWin, DeleteHdl, void*, EMPTYARG)
{
- // no warnings, please
- pVoid=0;
mnEventId = 0;
Delete();
return 0;
@@ -1256,7 +1249,7 @@ void SwSidebarWin::ChangeSidebarItem( SwSidebarItem& rSidebarItem )
{
SidebarWinAccessible* pAcc =
static_cast<SidebarWinAccessible*>( GetWindowPeer() );
- ASSERT( dynamic_cast<SidebarWinAccessible*>( GetWindowPeer() ),
+ OSL_ENSURE( dynamic_cast<SidebarWinAccessible*>( GetWindowPeer() ),
"<SwSidebarWin::ChangeSidebarItem(..)> - unexpected type of window peer -> crash possible!" );
pAcc->ChangeSidebarItem( mrSidebarItem );
}
@@ -1283,110 +1276,4 @@ css::uno::Reference< css::accessibility::XAccessible > SwSidebarWin::CreateAcces
} } // eof of namespace sw::sidebarwindows
-/********** SwRedComment**************/
-/*
-SwRedComment::SwRedComment( Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits,SwRedline* pRed)
- : SwSidebarWin(pParent,nBits,aMgr,aBits),
- pRedline(pRed)
-{
-}
-
-void SwRedComment::SetPopup()
-{
- mpButtonPopup = new PopupMenu(SW_RES(MN_REDCOMMENT_BUTTON));
- //mpButtonPopup->SetMenuFlags(MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES);
-}
-
-void SwRedComment::UpdateData()
-{
- if ( Engine()->IsModified() )
- {
- // so we get a new layout of notes (Anchor position is still the same and we would otherwise not get one)
- Mgr()->SetLayout();
- // SetRedline is calling SetModified already
- DocView()->GetWrtShell().SetRedlineComment(Engine()->GetEditEngine().GetText());
- }
- Engine()->ClearModifyFlag();
- Engine()->GetUndoManager().Clear();
-}
-
-void SwRedComment::SetPostItText()
-{
- Engine()->SetModifyHdl( Link() );
- Engine()->EnableUndo( sal_False );
-
- Engine()->Clear();
- View()->SetAttribs(DefaultItem());
- View()->InsertText(pRedline->GetComment(),false);
-
- Engine()->ClearModifyFlag();
- Engine()->GetUndoManager().Clear();
- Engine()->EnableUndo( sal_True );
- Engine()->SetModifyHdl( LINK( this, SwSidebarWin, ModifyHdl ) );
- Invalidate();
-}
-
-void SwRedComment::DeactivatePostIt()
-{
- SwSidebarWin::DeactivatePostIt();
- // current Redline is still selected
- DocView()->GetWrtShellPtr()->ClearMark();
-}
-
-void SwRedComment::ActivatePostIt()
-{
- SwSidebarWin::ActivatePostIt();
-
- // do we want the redline selected?
- // otherwise, SwRedComment::ActivatePostIt() as well as SwRedComment::DeactivatePostIt()
- // can be thrown out completly
- DocView()->GetDocShell()->GetWrtShell()->GotoRedline(
- DocView()->GetDocShell()->GetWrtShell()->FindRedlineOfData(pRedline->GetRedlineData()),true);
-}
-
-void SwRedComment::MouseButtonDown( const MouseEvent& rMEvt )
-{
- if (mRectMetaButton.IsInside(PixelToLogic(rMEvt.GetPosPixel())) && rMEvt.IsLeft())
- {
- ExecuteCommand( mpButtonPopup->Execute( this,Rectangle(LogicToPixel(mRectMetaButton.BottomLeft()),LogicToPixel(mRectMetaButton.BottomLeft())),POPUPMENU_EXECUTE_DOWN | POPUPMENU_NOMOUSEUPCLOSE) );
- }
-}
-
-void SwRedComment::Delete()
-{
- SwSidebarWin::Delete();
- // we are not neccessarily on our redline, so let's move there
- GotoPos();
- DocView()->GetWrtShell().SetRedlineComment(EMPTYSTRING);
- DocView()->GetWrtShell().ClearMark();
- // so we get a new layout of notes (Anchor position is still the same and we would otherwise not get one)
- Mgr()->SetLayout();
- Mgr()->RemoveItem(pRedline);
-}
-
-void SwRedComment::GotoPos()
-{
- DocView()->GetDocShell()->GetWrtShell()->GotoRedline(
- DocView()->GetDocShell()->GetWrtShell()->FindRedlineOfData(pRedline->GetRedlineData()));
-}
-
-String SwRedComment::GetAuthor()
-{
- return pRedline->GetAuthorString();
-}
-
-Date SwRedComment::GetDate()
-{
- return pRedline->GetTimeStamp().GetDate();
-}
-
-Time SwRedComment::GetTime()
-{
- return pRedline->GetTimeStamp().GetTime();
-}
-
-bool SwRedComment::IsProtected()
-{
- return SwSidebarWin::IsProtected() || pRedline->Start()->nNode.GetNode().GetTxtNode()->IsInProtectSect();
-}
-*/
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/SidebarWinAcc.cxx b/sw/source/ui/docvw/SidebarWinAcc.cxx
index 214913963dcb..1702a3e6f4c4 100644
--- a/sw/source/ui/docvw/SidebarWinAcc.cxx
+++ b/sw/source/ui/docvw/SidebarWinAcc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/************************************************************************* *
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -66,7 +64,7 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent
void ChangeAnchor( const SwFrm* pAnchorFrm )
{
- vos::OGuard aGuard(maMutex);
+ osl::MutexGuard aGuard(maMutex);
mpAnchorFrm = pAnchorFrm;
}
@@ -74,7 +72,7 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
getAccessibleParent() throw (css::uno::RuntimeException)
{
- vos::OGuard aGuard(maMutex);
+ osl::MutexGuard aGuard(maMutex);
css::uno::Reference< css::accessibility::XAccessible > xAccParent;
@@ -89,7 +87,7 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent
virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (css::uno::RuntimeException)
{
- vos::OGuard aGuard(maMutex);
+ osl::MutexGuard aGuard(maMutex);
sal_Int32 nIndex( -1 );
@@ -107,7 +105,7 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent
ViewShell& mrViewShell;
const SwFrm* mpAnchorFrm;
- ::vos::OMutex maMutex;
+ ::osl::Mutex maMutex;
};
// =============================================================================
@@ -160,3 +158,4 @@ css::uno::Reference< css::accessibility::XAccessibleContext > SidebarWinAccessib
} } // end of namespace sw::sidebarwindows
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/SidebarWinAcc.hxx b/sw/source/ui/docvw/SidebarWinAcc.hxx
index 0abe1acbfaf5..e99b212c247b 100644
--- a/sw/source/ui/docvw/SidebarWinAcc.hxx
+++ b/sw/source/ui/docvw/SidebarWinAcc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,10 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- *
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -65,3 +62,5 @@ class SidebarWinAccessible : public VCLXWindow
} } // end of namespace sw::sidebarwindows
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/annotation.hrc b/sw/source/ui/docvw/annotation.hrc
index e43a90342409..f844b2829676 100644
--- a/sw/source/ui/docvw/annotation.hrc
+++ b/sw/source/ui/docvw/annotation.hrc
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/docvw/annotation.src b/sw/source/ui/docvw/annotation.src
index 8dcda9c25b8c..a727eae66dfb 100644
--- a/sw/source/ui/docvw/annotation.src
+++ b/sw/source/ui/docvw/annotation.src
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/docvw/docvw.hrc b/sw/source/ui/docvw/docvw.hrc
index c0f15291795b..9a8987c3f0cb 100644
--- a/sw/source/ui/docvw/docvw.hrc
+++ b/sw/source/ui/docvw/docvw.hrc
@@ -52,7 +52,7 @@
#define MN_READONLY_RELOAD (RC_DOCVW_BEGIN + 22)
#define MN_READONLY_COPY (RC_DOCVW_BEGIN + 23)
-//Bei den folgenden brauchen wir Luft fuer die Gallery-Themen
+//For the following we need space for the gallery-themes
#define MN_READONLY_GRAPHICTOGALLERY (RC_DOCVW_BEGIN + 24)
#define MN_READONLY_BACKGROUNDTOGALLERY (RC_DOCVW_BEGIN + 60)
diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src
index 459b673cb188..b4f57bbcc215 100644
--- a/sw/source/ui/docvw/docvw.src
+++ b/sw/source/ui/docvw/docvw.src
@@ -162,9 +162,6 @@ Menu MN_READONLY_POPUP
{
Identifier = MN_READONLY_COPYGRAPHIC ;
HelpID = HID_MN_READONLY_COPYGRAPHIC ;
- /* ### ACHTUNG: Neuer Text in Resource? Grafik ~kopieren : ~Grafik kopieren */
- /* ### ACHTUNG: Neuer Text in Resource? Grafik ~kopieren : ~Grafik kopieren */
- /* ### ACHTUNG: Neuer Text in Resource? Grafik ~kopieren : ~Grafik kopieren */
Text [ en-US ] = "Copy ~Graphics" ;
};
SEPARATOR
diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx
index 501394255fde..c5589a57d351 100644
--- a/sw/source/ui/docvw/edtdd.cxx
+++ b/sw/source/ui/docvw/edtdd.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,9 +35,6 @@
#include <svx/svdview.hxx>
#include <editeng/outliner.hxx>
-//#ifndef _SVDVMARK_HXX //autogen
-//#include <svx/svdvmark.hxx>
-//#endif
#include <svx/svdobj.hxx>
#include <sot/exchange.hxx>
#include <sot/formats.hxx>
@@ -47,15 +45,11 @@
#include <frmfmt.hxx>
#include <wrtsh.hxx>
#include <edtwin.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <viewopt.hxx>
#include <swdtflvr.hxx>
#include <swmodule.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <wdocsh.hxx>
#include <swundo.hxx>
@@ -106,14 +100,13 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel )
SdrObject *pObj = NULL;
Point aDocPos( PixelToLogic( rPosPixel ) );
if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, sal_True, sal_True))
- //Wir sind nicht beim Selektieren und stehen auf einer
- //Selektion
+ //We are not selecting and aren't at a selection
bStart = sal_True;
else if ( !bFrmDrag && rSh.IsSelFrmMode() &&
rSh.IsInsideSelectedObj( aDocPos ) )
{
- //Wir sind nicht am internen Draggen und stehen auf
- //einem Objekt (Rahmen, Zeichenobjekt)
+ //We are not dragging internally and are not at an
+ //object (frame, draw object)
bStart = sal_True;
}
@@ -179,7 +172,7 @@ void SwEditWin::DropCleanup()
{
SwWrtShell &rSh = rView.GetWrtShell();
- // Stati zuruecksetzen
+ // reset statuses
bNoInterrupt = sal_False;
if ( bOldIdleSet )
{
@@ -204,7 +197,7 @@ void SwEditWin::CleanupDropUserMarker()
}
-//Messehack (MA,MBA)
+//exhibition hack (MA,MBA)
void lcl_SelectShellForDrop( SwView &rView )
{
if ( !rView.GetCurShell() )
@@ -217,7 +210,7 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt )
DropCleanup();
sal_Int8 nRet = DND_ACTION_NONE;
- //Ein Drop auf eine offene OutlinerView geht uns nichts an (siehe auch QueryDrop)
+ //A Drop to an open OutlinerView doesn't concern us (also see QueryDrop)
SwWrtShell &rSh = rView.GetWrtShell();
const Point aDocPt( PixelToLogic( rEvt.maPosPixel ));
SdrObject *pObj = 0;
@@ -232,14 +225,13 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt )
if ( aRect.IsInside(aPos) )
{
rSh.StartAllAction();
-//!! sal_Int8 nRet = DND_ACTION_NONE/*pOLV->ExecuteDrop( rEvt )*/;
rSh.EndAllAction();
return nRet;
}
}
- // dvo 2002-05-27, #99027#: There's a special treatment for file lists with a single
+ // There's a special treatment for file lists with a single
// element, that depends on the actual content of the
// Transferable to be accessible. Since the transferable
// may only be accessed after the drop has been accepted
@@ -253,7 +245,6 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt )
GetDataFlavorExVector(),
m_nDropDestination,
rEvt.mnAction,
-//!! rEvt.GetSourceOptions(),
nUserOpt, m_nDropFormat, nEventAction, 0,
&rEvt.maDropEvent.Transferable );
@@ -262,10 +253,9 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt )
nRet = rEvt.mnAction;
if( !SwTransferable::PasteData( aData, rSh, m_nDropAction, m_nDropFormat,
m_nDropDestination, sal_False, rEvt.mbDefault, &aDocPt, nRet))
-//!! nRet = SFX_APP()->ExecuteDrop( rEvt );
nRet = DND_ACTION_NONE;
else if ( SW_MOD()->pDragDrop )
- //Bei internem D&D nicht mehr aufraeumen!
+ //Don't clean up anymore at internal D&D!
SW_MOD()->pDragDrop->SetCleanUp( sal_False );
return nRet;
@@ -282,7 +272,7 @@ sal_uInt16 SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppO
SdrObject *pObj = NULL;
const ObjCntType eType = rSh.GetObjCntType( aDocPt, pObj );
- //Drop auf OutlinerView (TextEdit im Drawing) soll diese selbst entscheiden!
+ //Drop to OutlinerView (TextEdit in Drawing) should decide it on its own!
if( pObj )
{
OutlinerView* pOLV = rSh.GetDrawView()->GetTextEditOutlinerView();
@@ -296,10 +286,10 @@ sal_uInt16 SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppO
}
}
- //Auf was wollen wir denn gerade droppen?
+ //What do we want to drop on now?
sal_uInt16 nDropDestination = 0;
- //Sonst etwas aus der DrawingEngine getroffen?
+ //Did anything else arrive from the DrawingEngine?
if( OBJCNT_NONE != eType )
{
switch ( eType )
@@ -332,7 +322,7 @@ sal_uInt16 SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppO
case OBJCNT_URLBUTTON: nDropDestination = EXCHG_DEST_DOC_URLBUTTON; break;
case OBJCNT_GROUPOBJ: nDropDestination = EXCHG_DEST_DOC_GROUPOBJ; break;
- default: ASSERT( !this, "new ObjectType?" );
+ default: OSL_ENSURE( !this, "new ObjectType?" );
}
}
if ( !nDropDestination )
@@ -410,19 +400,18 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
GetDataFlavorExVector(),
m_nDropDestination,
rEvt.mnAction,
-//!! rEvt.GetSourceOptions(),
nUserOpt, m_nDropFormat, nEventAction );
if( EXCHG_INOUT_ACTION_NONE != m_nDropAction )
{
const Point aDocPt( PixelToLogic( aPixPt ) );
- //Bei den default Aktionen wollen wir noch ein bischen mitreden.
+ //With the default action we still want to have a say.
SwModule *pMod = SW_MOD();
if( pMod->pDragDrop )
{
sal_Bool bCleanup = sal_False;
- //Zeichenobjekte in Kopf-/Fusszeilen sind nicht erlaubt
+ //Drawing objects in Headers/Footers are not allowed
SwWrtShell *pSrcSh = pMod->pDragDrop->GetShell();
if( (pSrcSh->GetSelFrmType() == FRMTYPE_DRAWOBJ) &&
@@ -431,7 +420,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
{
bCleanup = sal_True;
}
- // keine positionsgeschuetzten Objecte verschieben!
+ // don't more position protected objects!
else if( DND_ACTION_MOVE == rEvt.mnAction &&
pSrcSh->IsSelObjProtected( FLYPROTECT_POS ) )
{
@@ -439,8 +428,8 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
}
else if( rEvt.mbDefault )
{
- // JP 13.08.98: internes Drag&Drop: bei gleichem Doc ein Move
- // ansonten ein Copy - Task 54974
+ // internal Drag&Drop: within same Doc a Move
+ // otherwise a Copy - Task 54974
nEventAction = pSrcSh->GetDoc() == rSh.GetDoc()
? DND_ACTION_MOVE
: DND_ACTION_COPY;
@@ -454,7 +443,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
}
else
{
- //D&D von ausserhalb des SW soll per default ein Copy sein.
+ //D&D from outside of SW should be a Copy per default.
if( EXCHG_IN_ACTION_DEFAULT == nEventAction &&
DND_ACTION_MOVE == rEvt.mnAction )
nEventAction = DND_ACTION_COPY;
@@ -501,7 +490,6 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
CleanupDropUserMarker();
rSh.UnSetVisCrsr();
-//!! return SFX_APP()->AcceptDrop( rEvt );
return DND_ACTION_NONE;
}
@@ -525,3 +513,4 @@ IMPL_LINK( SwEditWin, DDHandler, Timer *, EMPTYARG )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 07f76bc30b56..47eb5f3680a3 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-#include <tools/list.hxx>
#include <swtypes.hxx>
#include <hintids.hxx>
#include <com/sun/star/accessibility/XAccessible.hpp>
@@ -120,19 +119,16 @@
#include <helpid.h>
#include <cmdid.h>
-#ifndef _DOCVW_HRC
#include <docvw.hrc>
-#endif
#include <uitool.hxx>
-// OD 18.09.2003 #i18732#
#include <fmtfollowtextflow.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <charfmt.hxx>
#include <numrule.hxx>
#include <pagedesc.hxx>
-#include <svtools/ruler.hxx> // #i23726#
+#include <svtools/ruler.hxx>
#include "formatclipboard.hxx"
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <IMark.hxx>
@@ -141,27 +137,23 @@
#include <PostItMgr.hxx>
-//JP 11.10.2001: enable test code for bug fix 91313
-#if defined(DBG_UTIL) && (OSL_DEBUG_LEVEL > 1)
-//#define TEST_FOR_BUG91313
-#endif
+#include "../../core/inc/rootfrm.hxx"
using namespace sw::mark;
using namespace ::com::sun::star;
/*--------------------------------------------------------------------
- Beschreibung: Globals
+ Description: Globals
--------------------------------------------------------------------*/
static bool bInputLanguageSwitched = false;
extern sal_Bool bNoInterrupt; // in mainwn.cxx
-//Normalerweise wird im MouseButtonUp eine Selektion aufgehoben wenn die
-//Selektion nicht gerade aufgezogen wird. Leider wird im MouseButtonDown
-//bei doppel-/dreifach-Klick Selektiert, diese Selektion wird in dem Handler
-//komplett abgeschlossen und kann deshalb im Up nicht mehr unterschieden
-//werden. Um dies Aufzuloese wird bHoldSelection im Down gesetzt und im
-//Up ausgewertet.
+// Usually in MouseButtonUp a selection is revoked when the selection is
+// not currently being pulled open. Unfortunately in MouseButtonDown there
+// is being selected at double/triple click. That selection is completely
+// finished in the Handler and thus can't be distinguished in the Up.
+// To resolve this bHoldSelection is set in Down at evaluated in Up.
static sal_Bool bHoldSelection = sal_False;
sal_Bool bFrmDrag = sal_False;
@@ -179,8 +171,7 @@ long SwEditWin::nDDStartPosY = 0;
long SwEditWin::nDDStartPosX = 0;
Color SwEditWin::aTextBackColor(COL_YELLOW);
Color SwEditWin::aTextColor(COL_RED);
-sal_Bool SwEditWin::bTransparentBackColor = sal_False; // Hintergrund nicht transparent
-
+sal_Bool SwEditWin::bTransparentBackColor = sal_False; // background not transparent
extern sal_Bool bExecuteDrag;
@@ -193,17 +184,13 @@ class SwAnchorMarker
SdrHdl* pHdl;
Point aHdlPos;
Point aLastPos;
- // --> OD 2010-09-16 #i114522#
bool bTopRightHandle;
- // <--
public:
SwAnchorMarker( SdrHdl* pH )
: pHdl( pH )
, aHdlPos( pH->GetPos() )
, aLastPos( pH->GetPos() )
- // --> OD 2010-09-16 #i114522#
, bTopRightHandle( pH->GetKind() == HDL_ANCHOR_TR )
- // <--
{}
const Point& GetLastPos() const { return aLastPos; }
void SetLastPos( const Point& rNew ) { aLastPos = rNew; }
@@ -213,14 +200,11 @@ public:
void ChgHdl( SdrHdl* pNew )
{
pHdl = pNew;
- // --> OD 2010-09-16 #i114522#
if ( pHdl )
{
bTopRightHandle = (pHdl->GetKind() == HDL_ANCHOR_TR);
}
- // <--
}
- // --> OD 2010-09-16 #i114522#
const Point GetPosForHitTest( const OutputDevice& rOut )
{
Point aHitTestPos( GetPos() );
@@ -237,7 +221,6 @@ public:
return aHitTestPos;
}
- // <--
};
struct QuickHelpData
@@ -271,12 +254,11 @@ struct QuickHelpData
void FillStrArr( SwWrtShell& rSh, const String& rWord );
};
-
/*--------------------------------------------------------------------
- Beschreibung: Minimale Bewegung Zittern vermeiden
+ Description: avoid minimal movement shiver
--------------------------------------------------------------------*/
-#define HIT_PIX 2 /* Hit-Toleranz in Pixel */
+#define HIT_PIX 2 /* hit tolerance in pixel */
#define MIN_MOVE 4
inline sal_Bool IsMinMove(const Point &rStartPos, const Point &rLPt)
@@ -286,10 +268,10 @@ inline sal_Bool IsMinMove(const Point &rStartPos, const Point &rLPt)
}
/*--------------------------------------------------------------------
- JP 30.07.98: fuer MouseButtonDown - feststellen, ob ein DrawObject
- und KEIN SwgFrame getroffen wurde! Shift/Ctrl sollen
- nur bei DrawObjecte zum Selektieren fuehren, bei SwgFlys
- ggfs zum ausloesen von Hyperlinks (DownLoad/NewWindow!)
+ for MouseButtonDown - determine whether a DrawObject
+ an NO SwgFrame was hit! Shift/Ctrl should only result
+ in selecting, with DrawObjects; at SwgFlys to trigger
+ hyperlinks if applicable (DownLoad/NewWindow!)
--------------------------------------------------------------------*/
inline sal_Bool IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
{
@@ -309,10 +291,9 @@ inline sal_Bool IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
}
/*--------------------------------------------------------------------
- Beschreibung: Pointer umschalten
+ Description: switch pointer
--------------------------------------------------------------------*/
-
void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
{
SwWrtShell &rSh = rView.GetWrtShell();
@@ -326,7 +307,6 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
delete pUserMarker;
pUserMarker = 0L;
}
-// rSh.SwCrsrShell::UnSetVisCrsr( rLPt );
eStyle = POINTER_NOTALLOWED;
}
else
@@ -345,7 +325,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
0 !=(pFmt = rSh.GetFmtFromObj( rLPt, &pRect )) &&
PTR_CAST(SwFlyFrmFmt, pFmt))
{
- //Highlight fuer Rahmen anwerfen
+ //turn on highlight for frame
Rectangle aTmp( pRect->SVRect() );
if ( !pUserMarker )
@@ -397,9 +377,6 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
return;
}
- // Removed ExecHyperlink option.
- //sal_Bool bExecHyperlinks = rSh.GetViewOptions()->IsExecHyperlinks() ^
- // (nModifier == KEY_MOD2 ? sal_True : sal_False);
sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
@@ -565,10 +542,9 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
}
/*--------------------------------------------------------------------
- Beschreibung: Timer fuer Selektion vergroessern
+ Description: increase timer for selection
--------------------------------------------------------------------*/
-
IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
{
DBG_PROFSTART(edithdl);
@@ -604,14 +580,13 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
else
(rSh.*rSh.fnSetCrsr)( &aModPt, sal_False );
- //fix(24138): Es kann sein, dass der "Sprung" ueber eine Tabelle so
- //nicht geschafft wird. Deshalb wir hier eben per Up/Down ueber die
- //Tabelle gesprungen.
+ // It can be that a "jump" over a table cannot be accomplished like
+ // that. So we jump over the table by Up/Down here.
const SwRect& rVisArea = rSh.VisArea();
if( aOldVis == rVisArea && !rSh.IsStartOfDoc() && !rSh.IsEndOfDoc() )
{
- //JP 11.10.2001 Bug 72294 - take the center point of VisArea to
- // decide in which direction the user want.
+ // take the center point of VisArea to
+ // decide in which direction the user want.
if( aModPt.Y() < ( rVisArea.Top() + rVisArea.Height() / 2 ) )
rSh.Up( sal_True, 1 );
else
@@ -625,11 +600,6 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwEditWin::JustifyAreaTimer()
{
const Rectangle &rVisArea = GetView().GetVisArea();
@@ -642,11 +612,7 @@ void SwEditWin::JustifyAreaTimer()
nDiff = Max(
Max( aMovePos.Y() - rVisArea.Bottom(), rVisArea.Top() - aMovePos.Y() ),
Max( aMovePos.X() - rVisArea.Right(), rVisArea.Left() - aMovePos.X()));
-#ifdef TEST_FOR_BUG91313
- aTimer.SetTimeout( Max( coMinLen, nTimeout - nDiff) );
-#else
aTimer.SetTimeout( Max( coMinLen, nTimeout - nDiff*2L) );
-#endif
}
void SwEditWin::LeaveArea(const Point &rPos)
@@ -665,10 +631,9 @@ inline void SwEditWin::EnterArea()
}
/*------------------------------------------------------------------------
- Beschreibung: Modus fuer Rahmen einfuegen
+ Description: insert mode for frames
------------------------------------------------------------------------*/
-
void SwEditWin::InsFrm(sal_uInt16 nCols)
{
StdDrawMode( OBJ_NONE, sal_False );
@@ -676,15 +641,10 @@ void SwEditWin::InsFrm(sal_uInt16 nCols)
nInsFrmColCount = nCols;
}
-
-
void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, sal_Bool bObjSelect )
{
SetSdrDrawMode( eSdrObjectKind );
-/* if (GetDrawFuncPtr())
- GetDrawFuncPtr()->Deactivate();*/
-
if (bObjSelect)
rView.SetDrawFuncPtr(new DrawSelection( &rView.GetWrtShell(), this, &rView ));
else
@@ -695,13 +655,11 @@ void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, sal_Bool bObjSelect )
if (bObjSelect)
rView.GetDrawFuncPtr()->Activate( SID_OBJECT_SELECT );
else
- rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< sal_uInt16 >(eSdrObjectKind) ); // don't know if this is useful at all; but it keeps functionality as it was...
+ rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< sal_uInt16 >(eSdrObjectKind) );
bInsFrm = sal_False;
nInsFrmColCount = 1;
}
-
-
void SwEditWin::StopInsFrm()
{
if (rView.GetDrawFuncPtr())
@@ -709,7 +667,7 @@ void SwEditWin::StopInsFrm()
rView.GetDrawFuncPtr()->Deactivate();
rView.SetDrawFuncPtr(NULL);
}
- rView.LeaveDrawCreate(); // Konstruktionsmode verlassen
+ rView.LeaveDrawCreate(); // leave construction mode
bInsFrm = sal_False;
nInsFrmColCount = 1;
}
@@ -717,7 +675,6 @@ void SwEditWin::StopInsFrm()
/*--------------------------------------------------------------------
--------------------------------------------------------------------*/
-
sal_Bool SwEditWin::IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const
{
const SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions();
@@ -744,12 +701,10 @@ sal_Bool SwEditWin::IsInputSequenceCheckingRequired( const String &rText, const
return (0 <= nCTLScriptPos && nCTLScriptPos <= rText.Len());
}
-
/*--------------------------------------------------------------------
- Beschreibung: Der Character Buffer wird in das Dokument eingefuegt
+ Description: character buffer is inserted into the document
--------------------------------------------------------------------*/
-
void SwEditWin::FlushInBuffer()
{
if ( aInBuffer.Len() )
@@ -850,7 +805,7 @@ void SwEditWin::FlushInBuffer()
// as well, we now expand the selection accordingly.
SwPaM &rCrsr = *rSh.GetCrsr();
xub_StrLen nCrsrStartPos = rCrsr.Start()->nContent.GetIndex();
- DBG_ASSERT( nCrsrStartPos >= nExpandSelection, "cannot expand selection as specified!!" );
+ OSL_ENSURE( nCrsrStartPos >= nExpandSelection, "cannot expand selection as specified!!" );
if (nExpandSelection && nCrsrStartPos >= nExpandSelection)
{
if (!rCrsr.HasMark())
@@ -863,9 +818,9 @@ void SwEditWin::FlushInBuffer()
rView.GetViewFrame()->GetBindings().GetRecorder();
if ( xRecorder.is() )
{
- //Shell ermitteln
+ // determine shell
SfxShell *pSfxShell = lcl_GetShellFromDispatcher( rView, TYPE(SwTextShell) );
- // Request generieren und recorden
+ // generate request and record
if (pSfxShell)
{
SfxRequest aReq( rView.GetViewFrame(), FN_INSERT_STRING );
@@ -873,7 +828,6 @@ void SwEditWin::FlushInBuffer()
aReq.Done();
}
}
- //#21019# apply CTL and CJK language to the text input
sal_Bool bLang = true;
if(eBufferLanguage != LANGUAGE_DONTKNOW)
{
@@ -895,7 +849,7 @@ void SwEditWin::FlushInBuffer()
if ( eLang == eBufferLanguage )
// current language attribute equal to language reported from system
bLang = sal_False;
- else if ( !bInputLanguageSwitched && RES_CHRATR_LANGUAGE == nWhich /* && (eLang&LANGUAGE_MASK_PRIMARY) == LANGUAGE_ENGLISH */ )
+ else if ( !bInputLanguageSwitched && RES_CHRATR_LANGUAGE == nWhich )
{
// special case: switching between two "LATIN" languages
// In case the current keyboard setting might be suitable for both languages we can't safely assume that the user
@@ -974,14 +928,11 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, sal_Bool bWeb )
SwWrtShell &rSh = rView.GetWrtShell();
SwRect aTmp = rSh.GetFlyRect();
if( aTmp.HasArea() &&
- // --> FME 2005-01-13 #i40348#
// IsSelObjProtected() seems to be the correct condition, not
// !HasReadonlySel(), otherwise frame is not moveable if content is
// protected.
!rSh.IsSelObjProtected( FLYPROTECT_POS|FLYPROTECT_SIZE ) )
- // <--
{
- // OD 18.09.2003 #i18732# - add item <RES_FOLLOW_TEXT_FLOW>
SfxItemSet aSet(rSh.GetAttrPool(),
RES_FRM_SIZE, RES_FRM_SIZE,
RES_VERT_ORIENT, RES_ANCHOR,
@@ -1009,13 +960,12 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, sal_Bool bWeb )
SwRect aBoundRect;
Point aRefPoint;
- // OD 18.09.2003 #i18732# - adjustment for allowing vertical position
- // aligned to page for fly frame anchored to paragraph or to character.
+ // adjustment for allowing vertical position
+ // aligned to page for fly frame anchored to paragraph or to character.
{
SwFmtVertOrient aVert( (SwFmtVertOrient&)aSet.Get(RES_VERT_ORIENT) );
const bool bFollowTextFlow =
static_cast<const SwFmtFollowTextFlow&>(aSet.Get(RES_FOLLOW_TEXT_FLOW)).GetValue();
- // OD 12.11.2003 #i22341# - additional provide content position
const SwPosition* pToCharCntntPos = ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetCntntAnchor();
rSh.CalcBoundRect( aBoundRect, eAnchorId,
text::RelOrientation::FRAME, aVert.GetRelationOrient(),
@@ -1034,12 +984,12 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, sal_Bool bWeb )
case MOVE_UP_BIG:
case MOVE_UP_SMALL: aTmp.Top( aTmp.Top() - nUp ); break;
case MOVE_RIGHT_SMALL: if( aTmp.Width() < aSnap.Width() + MINFLY ) break;
- nRight = aSnap.Width(); // kein break
+ nRight = aSnap.Width(); // no break
case MOVE_RIGHT_BIG: aTmp.Left( aTmp.Left() + nRight ); break;
case MOVE_DOWN_SMALL: if( aTmp.Height() < aSnap.Height() + MINFLY ) break;
- nDown = aSnap.Height(); // kein break
+ nDown = aSnap.Height(); // no break
case MOVE_DOWN_BIG: aTmp.Top( aTmp.Top() + nDown ); break;
- default: ASSERT( sal_True, "ChangeFly: Unknown direction." );
+ default: OSL_ENSURE(true, "ChangeFly: Unknown direction." );
}
sal_Bool bSet = sal_False;
if ((FLY_AS_CHAR == eAnchorId) && ( nDir % 2 ))
@@ -1133,16 +1083,13 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, sal_Bool bWeb )
rSh.EndAllAction();
}
}
-/* -----------------------------23.05.2002 11:35------------------------------
- ---------------------------------------------------------------------------*/
void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
{
- // --> OD 2005-01-31 #i40845# - start undo action in order to get only one
+ // start undo action in order to get only one
// undo action for this change.
SwWrtShell &rSh = rView.GetWrtShell();
rSh.StartUndo();
- // <--
long nX = 0;
long nY = 0;
@@ -1206,16 +1153,14 @@ void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
// if the object's position is not protected
if(0 == (nProtect&FLYPROTECT_POS))
{
- // --> FME 2005-04-26 #i47138#
// Check if object is anchored as character and move direction
sal_Bool bDummy1, bDummy2;
const bool bVertAnchor = rSh.IsFrmVertical( sal_True, bDummy1, bDummy2 );
- const bool bHoriMove = !bVertAnchor == !( nDir % 2 );
- const bool bMoveAllowed =
+ bool bHoriMove = !bVertAnchor == !( nDir % 2 );
+ bool bMoveAllowed =
!bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR);
if ( bMoveAllowed )
{
- // <--
pSdrView->MoveAllMarked(Size(nX, nY));
rSh.SetModified();
}
@@ -1271,17 +1216,13 @@ void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
rSh.EndAllAction();
}
- // --> OD 2005-01-31 #i40845# - end undo action
rSh.EndUndo();
- // <--
}
/*--------------------------------------------------------------------
- Beschreibung: KeyEvents
+ Description: KeyEvents
--------------------------------------------------------------------*/
-
-
void SwEditWin::KeyInput(const KeyEvent &rKEvt)
{
if( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE &&
@@ -1294,9 +1235,8 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
SfxObjectShell *pObjSh = (SfxObjectShell*)rView.GetViewFrame()->GetObjectShell();
if ( bLockInput || (pObjSh && pObjSh->GetProgress()) )
- // Wenn die Rechenleiste aktiv ist oder
- // auf dem Document ein Progress laeuft wird keine
- // Bestellungen angenommen.
+ // When the progress bar is active or a progress is
+ // running on a document, no order is being taken
return;
if( pShadCrsr )
@@ -1322,12 +1262,12 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
pQuickHlpData->Stop( rSh );
}
- // OS:auch die DrawView braucht noch ein readonly-Flag
+ // OS:the DrawView also needs a readonly-Flag as well
if ( !bIsDocReadOnly && rSh.GetDrawView() && rSh.GetDrawView()->KeyInput( rKEvt, this ) )
{
rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll( sal_False );
rSh.SetModified();
- return; // Event von der SdrView ausgewertet
+ return; // Event evaluated by SdrView
}
if ( rView.GetDrawFuncPtr() && bInsFrm )
@@ -1341,11 +1281,28 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
sal_Bool bChkInsBlank = pQuickHlpData->bChkInsBlank;
pQuickHlpData->bChkInsBlank = sal_False;
+#if OSL_DEBUG_LEVEL > 1
+ if (rKEvt.GetKeyCode().GetCode() == KEY_F12)
+ {
+ SwRootFrm* pLayout = GetView().GetDocShell()->GetWrtShell()->GetLayout();
+ xmlTextWriterPtr writer = xmlNewTextWriterFilename("layout.xml", 0);
+ if (writer!=NULL)
+ {
+ printf("dumping layout in \"layout.xml\"\n");
+ xmlTextWriterStartDocument(writer, NULL, NULL, NULL);
+ pLayout->dumpAsXml(writer);
+ xmlTextWriterEndDocument(writer);
+ xmlFreeTextWriter(writer);
+ }
+ return;
+ }
+#endif
+
KeyEvent aKeyEvent( rKEvt );
// look for vertical mappings
if( !bIsDocReadOnly && !rSh.IsSelFrmMode() && !rSh.IsObjSelected() )
{
- //JP 21.2.2002: must changed from switch to if, because the Linux
+ // must changed from switch to if, because the Linux
// compiler has problem with the code. Has to remove if the new general
// handler exist.
sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode();
@@ -1469,9 +1426,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
enum SW_KeyState { KS_Start,
KS_CheckKey, KS_InsChar, KS_InsTab,
KS_NoNum, KS_NumOff, KS_NumOrNoNum, KS_NumDown, KS_NumUp,
- // -> #i23725#
KS_NumIndentInc, KS_NumIndentDec,
- // <- #i23725#
KS_OutlineLvOff,
KS_NextCell, KS_PrevCell, KS_OutlineUp, KS_OutlineDown,
@@ -1509,20 +1464,16 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
KS_GotoPrevFieldMark,
KS_Ende };
-
-
SW_KeyState eKeyState = bIsDocReadOnly ? KS_CheckDocReadOnlyKeys
: KS_CheckKey,
eNextKeyState = KS_Ende;
sal_uInt8 nDir = 0;
- // -> #i23725#
if (nKS_NUMDOWN_Count > 0)
nKS_NUMDOWN_Count--;
if (nKS_NUMINDENTINC_Count > 0)
nKS_NUMINDENTINC_Count--;
- // <- #i23725#
while( KS_Ende != eKeyState )
{
@@ -1531,12 +1482,11 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
switch( eKeyState )
{
case KS_CheckKey:
- eKeyState = KS_KeyToView; // default weiter zur View
+ eKeyState = KS_KeyToView; // default forward to View
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- // JP 19.01.99: zum Umschalten des Cursor Verhaltens in ReadOnly
- // Bereichen
+ // for switching curor behaviour in ReadOnly regions
if( 0x7210 == rKeyCode.GetFullCode() )
rSh.SetReadOnlyAvailable( !rSh.IsReadOnlyAvailable() );
else
@@ -1545,16 +1495,16 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
if( !rKeyCode.IsMod2() && '=' == aCh &&
!rSh.IsTableMode() && rSh.GetTableFmt() &&
- rSh.IsSttPara() /*&& rSh.IsEndPara()*/ &&
+ rSh.IsSttPara() &&
!rSh.HasReadonlySel() )
{
- // in der Tabelle am Anfang der Zelle ein '=' ->
- // EditZeile aufrufen (F2-Funktionalitaet)
+ // at the beginning of the table's cell a '=' ->
+ // call EditRow (F2-functionality)
rSh.Push();
if( !rSh.MoveSection( fnSectionCurr, fnSectionStart) &&
!rSh.IsTableBoxTextFormat() )
{
- // steht also am Anfang der Box
+ // is at the beginning of the box
eKeyState = KS_EditFormula;
if( rSh.HasMark() )
rSh.SwapPam();
@@ -1622,12 +1572,6 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
eFlyState = KS_Fly_Change;
nDir = MOVE_DOWN_SMALL;
goto KEYINPUT_CHECKTABLE;
-// case KEY_UP | KEY_MOD2 | KEY_SHIFT:
-// eKeyState = KS_ColTopBig;
-// goto KEYINPUT_CHECKTABLE;
-// case KEY_DOWN | KEY_MOD2 | KEY_SHIFT:
-// eKeyState = KS_ColTopSmall;
-// goto KEYINPUT_CHECKTABLE;
case KEY_UP | KEY_MOD2 | KEY_MOD1:
eKeyState = KS_CellBottomSmall;
@@ -1678,7 +1622,6 @@ KEYINPUT_CHECKTABLE:
nTblChgSize = pModOpt->GetTblVInsert();
}
goto KEYINPUT_CHECKTABLE_INSDEL;
-// case KEY_RIGHT:
case KEY_RIGHT | KEY_MOD1:
{
eTblChgMode = nsTblChgWidthHeightType::WH_FLAG_INSDEL | nsTblChgWidthHeightType::WH_CELL_RIGHT;
@@ -1721,7 +1664,7 @@ KEYINPUT_CHECKTABLE:
KEYINPUT_CHECKTABLE_INSDEL:
if( rSh.IsTableMode() || !rSh.GetTableFmt() ||
!bTblInsDelMode ||
- sal_False /* Tabelle geschuetzt */
+ sal_False /* table protected */
)
{
const int nSelectionType = rSh.GetSelectionType();
@@ -1745,9 +1688,17 @@ KEYINPUT_CHECKTABLE_INSDEL:
break;
case KEY_DELETE:
- if (rSh.IsInFrontOfLabel() &&
- rSh.NumOrNoNum(sal_False))
- eKeyState = KS_NumOrNoNum;
+ if ( !rSh.HasReadonlySel() )
+ {
+ if (rSh.IsInFrontOfLabel() &&
+ rSh.NumOrNoNum(sal_False))
+ eKeyState = KS_NumOrNoNum;
+ }
+ else
+ {
+ InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute();
+ eKeyState = KS_Ende;
+ }
break;
case KEY_DELETE | KEY_MOD2:
@@ -1789,7 +1740,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
aTmpQHD.bIsAutoText )
eKeyState = KS_GlossaryExpand;
- //RETURN und leerer Absatz in Numerierung -> Num. beenden
+ //RETURN and empty paragraph in numbering -> end numbering
else if( !aInBuffer.Len() &&
rSh.GetCurNumRule() &&
!rSh.GetCurNumRule()->IsOutlineRule() &&
@@ -1797,7 +1748,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
rSh.IsSttPara() && rSh.IsEndPara() )
eKeyState = KS_NumOff, eNextKeyState = KS_OutlineLvOff;
- //RETURN fuer neuen Absatz mit AutoFormatierung
+ //RETURN for new paragraph with AutoFormating
else if( pACfg && pACfg->IsAutoFmtByInput() &&
!(nSelectionType & (nsSelectionType::SEL_GRF |
nsSelectionType::SEL_OLE | nsSelectionType::SEL_FRM |
@@ -1820,28 +1771,24 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KEY_BACKSPACE | KEY_SHIFT:
if( !rSh.HasReadonlySel() )
{
- // #i23725#
sal_Bool bDone = sal_False;
- // --> OD 2006-01-31 - try to add comment for code snip:
+ // try to add comment for code snip:
// Remove the paragraph indent, if the cursor is at the
// beginning of a paragraph, there is no selection
// and no numbering rule found at the current paragraph
- // --> OD 2006-01-31 #b6341339#, #i58776#
// Also try to remove indent, if current paragraph
// has numbering rule, but isn't counted and only
// key <backspace> is hit.
const bool bOnlyBackspaceKey(
KEY_BACKSPACE == rKeyCode.GetFullCode() );
if ( rSh.IsSttPara() &&
- !rSh.HasSelection() && // i40834
+ !rSh.HasSelection() &&
( NULL == rSh.GetCurNumRule() ||
( rSh.IsNoNum() && bOnlyBackspaceKey ) ) )
{
bDone = rSh.TryRemoveIndent();
}
- // <--
- // -> #i23725#
if (bDone)
eKeyState = KS_Ende;
else
@@ -1863,10 +1810,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
bDone = sal_True;
}
}
- // <- #i23725#
- // --> OD 2006-01-31 #b6341339#, #i58776#
- // --> OD 2006-04-21 #i63540#
- // revise fix for issues b6341339 and i58776:
+
// If the cursor is in an empty paragraph, which has
// a numbering, but not the oultine numbering, and
// there is no selection, the numbering has to be
@@ -1908,9 +1852,13 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
eKeyState = KS_NumOrNoNum;
}
- // <--
}
}
+ else
+ {
+ InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute();
+ eKeyState = KS_Ende;
+ }
break;
case KEY_RIGHT:
@@ -1935,11 +1883,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
!rSh.HasReadonlySel() )
{
- // --> OD 2007-10-02 #b660435#
-// if (rSh.IsFirstOfNumRule()) // #i23725#
if ( rSh.IsFirstOfNumRule() &&
numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() )
- // <--
eKeyState = KS_NumIndentInc;
else
eKeyState = KS_NumDown;
@@ -1966,10 +1911,9 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl();
if( pColl &&
- //0 <= pColl->GetOutlineLevel() && #i24560#
- //MAXLEVEL - 1 > pColl->GetOutlineLevel() )//#outline level,zhaojianwei
+
pColl->IsAssignedToListLevelOfOutlineStyle()
- && MAXLEVEL-1 > pColl->GetAssignedOutlineStyleLevel() )//<-end,zhaojianwei
+ && MAXLEVEL-1 > pColl->GetAssignedOutlineStyleLevel() )
eKeyState = KS_OutlineDown;
}
}
@@ -1990,11 +1934,9 @@ KEYINPUT_CHECKTABLE_INSDEL:
else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
!rSh.HasReadonlySel() )
{
- // --> OD 2007-10-02 #b660435#
-// if (rSh.IsFirstOfNumRule()) // #i23725#
+
if ( rSh.IsFirstOfNumRule() &&
numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() )
- // <--
eKeyState = KS_NumIndentDec;
else
eKeyState = KS_NumUp;
@@ -2020,8 +1962,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
if( rSh.IsSttOfPara() && !rSh.HasReadonlySel() )
{
SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl();
- //if( pColl && 0 < pColl->GetOutlineLevel() && //#outline level,zhaojianwei
- // MAXLEVEL - 1 >= pColl->GetOutlineLevel() )
if( pColl &&
pColl->IsAssignedToListLevelOfOutlineStyle() &&
0 < pColl->GetAssignedOutlineStyleLevel())
@@ -2039,7 +1979,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
if( aTmpQHD.HasCntnt() && !rSh.HasSelection() )
{
- // zum naechsten Tip
+ // to the next Tip
aTmpQHD.Inc( pACorr && pACorr->GetSwFlags().
bAutoCmpltEndless );
eKeyState = KS_NextPrevGlossary;
@@ -2062,7 +2002,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
if( aTmpQHD.HasCntnt() && !rSh.HasSelection() &&
!rSh.HasReadonlySel() )
{
- // zum vorherigen Tip
+ // to the previous Tip
aTmpQHD.Dec( pACorr && pACorr->GetSwFlags().
bAutoCmpltEndless );
eKeyState = KS_NextPrevGlossary;
@@ -2172,13 +2112,12 @@ KEYINPUT_CHECKTABLE_INSDEL:
bFlushBuffer = sal_True, bNormalChar = sal_False;
else
{
-// OS 22.09.95: Da der Sfx Acceleratoren nur aufruft, wenn sie beim letzten
-// Statusupdate enabled wurden, muss copy ggf. von uns
-// 'gewaltsam' gerufen werden.
+ // Because Sfx accelerators are only called when they were
+ // enabled at the last status update, copy has to called
+ // 'forcefully' by us if necessary.
if( rKeyCode.GetFunction() == KEYFUNC_COPY )
GetView().GetViewFrame()->GetBindings().Execute(SID_COPY);
-
if( !bIsDocReadOnly && bNormalChar )
{
const int nSelectionType = rSh.GetSelectionType();
@@ -2245,15 +2184,15 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
break;
case KS_InsTab:
- if( rView.ISA( SwWebView )) //Kein Tabulator fuer Web!
+ if( rView.ISA( SwWebView )) // no Tab for WebView
{
- // Bug 56196 - dann sollte der weiter gereicht werden.
+ // then it should be passed along
Window::KeyInput( aKeyEvent );
eKeyState = KS_Ende;
break;
}
aCh = '\t';
- // kein break!
+ // no break!
case KS_InsChar:
if (rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT)
{
@@ -2293,13 +2232,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
if( bChkInsBlank && bIsNormalChar &&
(aInBuffer.Len() || !rSh.IsSttPara() || !rSh.IsEndPara() ))
{
- // vor dem Zeichen noch ein Blank einfuegen. Dieses
- // kommt zwischen den Expandierten Text und dem neuen
- // "nicht Worttrenner".
+ // insert a blank ahead of the character. this ends up
+ // between the expanded text and the new "non-word-seperator".
aInBuffer.Expand( aInBuffer.Len() + 1, ' ' );
}
-
sal_Bool bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh );
sal_Bool bRunNext = pACorr && pACorr->HasRunNext();
if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) &&
@@ -2311,7 +2248,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
FlushInBuffer();
rSh.AutoCorrect( *pACorr, aCh );
- if( '\"' != aCh && '\'' != aCh ) // nur bei "*_" rufen!
+ if( '\"' != aCh && '\'' != aCh ) // only call when "*_"!
rSh.UpdateAttr();
}
else if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) &&
@@ -2339,7 +2276,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
else
{
InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute();
- // ??? Window::KeyInput( aKeyEvent );
eKeyState = KS_Ende;
}
break;
@@ -2352,12 +2288,6 @@ 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') );
@@ -2370,8 +2300,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
sal_uInt16 nSlotId = 0;
FlushInBuffer();
-//??? if( bFlushCharBuffer )
-//??? FlushInBuffer( &rSh );
switch( eKeyState )
{
case KS_SpecialInsert:
@@ -2383,7 +2311,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
break;
case KS_NumOff:
- // Shellwechsel - also vorher aufzeichnen
+ // shell change - so record in advance
rSh.DelNumRules();
eKeyState = eNextKeyState;
break;
@@ -2392,17 +2320,14 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KS_NumDown:
rSh.NumUpDown( sal_True );
- nKS_NUMDOWN_Count = 2; // #i23725#
+ nKS_NUMDOWN_Count = 2;
break;
case KS_NumUp:
rSh.NumUpDown( sal_False );
break;
- // -> #i23726#
case KS_NumIndentInc:
- // --> OD 2008-06-16 #i90078#
rSh.ChangeIndentOfAllListLevels(360);
- // <--
nKS_NUMINDENTINC_Count = 2;
break;
@@ -2421,11 +2346,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
break;
case KS_NumIndentDec:
- // --> OD 2008-06-16 #i90078#
rSh.ChangeIndentOfAllListLevels(-360);
- // <--
break;
- // <- #i23726#
case KS_OutlineDown:
rSh.OutlineUpDown( 1 );
@@ -2435,7 +2357,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
break;
case KS_NextCell:
- //In Tabelle immer 'flushen'
+ // always 'flush' in tables
rSh.GoNextCell();
nSlotId = FN_GOTO_NEXT_CELL;
break;
@@ -2447,8 +2369,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
rSh.SplitNode( sal_True );
break;
-// case KS_NumOrNoNum:
-// break;
case KS_NextObject:
case KS_PrevObject:
if(rSh.GotoObj( KS_NextObject == eKeyState, GOTOOBJ_GOTO_ANY))
@@ -2467,7 +2387,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
break;
case KS_GlossaryExpand:
{
- // ersetze das Wort oder Kuerzel durch den den Textbaustein
+ // replace the word or abbreviation with the auto text
rSh.StartUndo( UNDO_START );
String sFnd( *aTmpQHD.aArr[ aTmpQHD.nCurArrPos ] );
@@ -2518,9 +2438,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KS_ColRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break;
case KS_ColLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTblHMove() ); break;
case KS_ColRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTblHMove() ); break;
-// case KS_ColTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break;
case KS_ColBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break;
-// case KS_ColTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_TOP, pModOpt->GetTblVMove() ); break;
case KS_ColBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTblVMove() ); break;
case KS_CellLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break;
case KS_CellRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break;
@@ -2583,16 +2501,16 @@ KEYINPUT_CHECKTABLE_INSDEL:
bTblInsDelMode = sal_False;
}
- // falls die gepufferten Zeichen eingefuegt werden sollen
+ // in case the buffered characters are inserted
if( bFlushBuffer && aInBuffer.Len() )
{
- //OS 16.02.96 11.04: bFlushCharBuffer wurde hier nicht zurueckgesetzt
- // warum nicht?
+ // bFlushCharBuffer was not resetted here
+ // why not?
sal_Bool bSave = bFlushCharBuffer;
FlushInBuffer();
bFlushCharBuffer = bSave;
- // evt. Tip-Hilfe anzeigen
+ // maybe show Tip-Help
String sWord;
if( bNormalChar && pACfg && pACorr &&
( pACfg->IsAutoTextTip() ||
@@ -2605,23 +2523,20 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
/*--------------------------------------------------------------------
- Beschreibung: MouseEvents
+ Description: MouseEvents
--------------------------------------------------------------------*/
-
void SwEditWin::RstMBDownFlags()
{
- //Nicht auf allen Systemen kommt vor dem modalen
- //Dialog noch ein MouseButton Up (wie unter WINDOWS).
- //Daher hier die Stati zuruecksetzen und die Maus
- //fuer den Dialog freigeben.
+ // Not on all systems a MouseButtonUp is used ahead
+ // of the modal dialog (like on WINDOWS).
+ // So reset the statuses here and release the mouse
+ // for the dialog.
bMBPressed = bNoInterrupt = sal_False;
EnterArea();
ReleaseMouse();
}
-
-
void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
SwWrtShell &rSh = rView.GetWrtShell();
@@ -2632,7 +2547,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// opened by inplace client and we would deactivate the inplace client,
// the contex menu is closed by VCL asynchronously which in the end
// would work on deleted objects or the context menu has no parent anymore)
- // See #126086# and #128122#
SfxInPlaceClient* pIPClient = rSh.GetSfxViewShell()->GetIPClient();
sal_Bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
@@ -2674,8 +2588,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
return;
}
- //Nach GrabFocus sollte eine Shell gepusht sein. Das muss eigentlich
- //klappen aber in der Praxis ...
+ // After GrabFocus a shell should be pushed. That should actually
+ // work but in practice ...
lcl_SelectShellForDrop( rView );
sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly();
@@ -2686,7 +2600,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
pQuickHlpData->bChkInsBlank = sal_False;
if( rSh.FinishOLEObj() )
- return; //InPlace beenden und der Klick zaehlt nicht mehr
+ return; // end InPlace and the click doesn't count anymore
SET_CURR_SHELL( &rSh );
@@ -2696,11 +2610,10 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (pSdrView->MouseButtonDown( rMEvt, this ) )
{
rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
- return; // Event von der SdrView ausgewertet
+ return; // SdrView's event evaluated
}
}
-
bIsInMove = sal_False;
aStartPos = rMEvt.GetPosPixel();
aRszMvHdlPt.X() = 0, aRszMvHdlPt.Y() = 0;
@@ -2712,7 +2625,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
0 != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPos ) ) &&
!rSh.IsObjSelectable( aDocPos ) )
{
- // --> FME 2004-07-30 #i32329# Enhanced table selection
if ( SW_TABSEL_HORI <= nMouseTabCol && SW_TABCOLSEL_VERT >= nMouseTabCol )
{
rSh.EnterStdMode();
@@ -2728,11 +2640,10 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
return;
}
- // <--
if ( !rSh.IsTableMode() )
{
- //Zuppeln von Tabellenspalten aus dem Dokument heraus.
+ // comes from table columns out of the document.
if(SW_TABCOL_VERT == nMouseTabCol || SW_TABCOL_HORI == nMouseTabCol)
rView.SetTabColFromDoc( sal_True );
else
@@ -2757,7 +2668,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
}
}
- // #i23726#
else if (bTmp &&
rSh.IsNumLabel(aDocPos))
{
@@ -2767,10 +2677,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
SfxBindings& rBind = rView.GetViewFrame()->GetBindings();
rBind.Update();
- // --> OD 2005-02-21 #i42921#
if ( RulerMarginDrag( rMEvt,
rSh.IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPos ) ) )
- // <--
{
rView.SetNumRuleNodeFromDoc( NULL );
rView.InvalidateRulerPos();
@@ -2779,35 +2687,33 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
else
{
- // --> FME 2005-11-03 #125036# Make sure the pointer is set to 0,
+ // Make sure the pointer is set to 0,
// otherwise it may point to nowhere after deleting the corresponding
// text node.
rView.SetNumRuleNodeFromDoc( NULL );
- // <--
return;
}
}
- //Man kann sich in einem Selektionszustand befinden, wenn zuletzt
- //mit dem Keyboard selektiert wurde, aber noch kein CURSOR_KEY
- //anschliessend bewegt worden ist. In diesem Fall muss die vorher-
- //gehende Selektion zuerst beendet werden.
- //MA 07. Oct. 95: Und zwar nicht nur bei Linker Maustaste sondern immer.
- //siehe auch Bug: 19263
+ // One can be in a selection state when recently the keyboard was
+ // used to select but no CURSOR_KEY was moved yet after that. In
+ // that case the previous selction has to be finished first.
+ // MA 07. Oct. 95: Not only with left mouse button but always.
+ // also see Bug: 19263
if ( rSh.IsInSelect() )
rSh.EndSelect();
- //Abfrage auf LEFT, da sonst auch bei einem Click mit der rechten Taste
- //beispielsweise die Selektion aufgehoben wird.
+ // query against LEFT because otherwise for example also a right
+ // click releases the selection.
if ( MOUSE_LEFT == rMEvt.GetButtons() )
{
sal_Bool bOnlyText = sal_False;
bMBPressed = bNoInterrupt = sal_True;
- nKS_NUMDOWN_Count = 0; // #i23725#
+ nKS_NUMDOWN_Count = 0;
CaptureMouse();
- //ggf. Cursorpositionen zuruecksetzen
+ // reset curor position if applicable
rSh.ResetCursorStack();
switch ( rMEvt.GetModifier() + rMEvt.GetButtons() )
@@ -2840,7 +2746,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.Edit();
}
- // Ohne SHIFT, da sonst Toggle bei Selektion nicht funktioniert
+ // Without SHIFT because otherwise Toggle doesn't work at selection
if (rMEvt.GetClicks() == 1)
{
if ( rSh.IsSelFrmMode())
@@ -2855,7 +2761,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
if ( !pApplyTempl )
{
- //nur, wenn keine Position zum Sizen getroffen ist.
+ // only if no position to size was hit.
if (!bHitHandle)
{
StartDDTimer();
@@ -2881,11 +2787,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
bExecHyperlinks = sal_True;
}
- // --> FME 2004-07-30 #i32329# Enhanced selection
sal_uInt8 nNumberOfClicks = static_cast< sal_uInt8 >(rMEvt.GetClicks() % 4);
if ( 0 == nNumberOfClicks && 0 < rMEvt.GetClicks() )
nNumberOfClicks = 4;
- // <--
sal_Bool bExecDrawTextLink = sal_False;
@@ -2902,7 +2806,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- // URL in DrawText-Objekt getroffen?
+ // hit an URL in DrawText object?
if (bExecHyperlinks && pSdrView)
{
SdrViewEvent aVEvt;
@@ -2912,13 +2816,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
bExecDrawTextLink = sal_True;
}
- //Rahmen nur zu selektieren versuchen, wenn
- //der Pointer bereits entsprechend geschaltet wurde
+ // only try to select frame, if pointer already was
+ // switched accordingly
if ( aActHitType != SDRHIT_NONE && !rSh.IsSelFrmMode() &&
!GetView().GetViewFrame()->GetDispatcher()->IsLocked() &&
!bExecDrawTextLink)
{
- // #107513#
// Test if there is a draw object at that position and if it should be selected.
sal_Bool bShould = rSh.ShouldObjectBeSelected(aDocPos);
@@ -2936,9 +2839,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if( bSelObj )
{
- // falls im Macro der Rahmen deselektiert
- // wurde, muss nur noch der Cursor
- // wieder angezeigt werden.
+ // if the frame was deselected in the macro
+ // the cursor just has to be displayed again
if( FRMTYPE_NONE == rSh.GetSelFrmType() )
rSh.ShowCrsr();
else
@@ -3002,9 +2904,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if( !bSelObj )
{
- // Cursor hier umsetzen, damit er nicht zuerst
- // im Rahmen gezeichnet wird; ShowCrsr() geschieht
- // in LeaveSelFrmMode()
+ // move cursor here so that it is not drawn in the
+ // frame first; ShowCrsr() happens in LeaveSelFrmMode()
bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False));
rSh.LeaveSelFrmMode();
rView.AttrChangedNotify( &rSh );
@@ -3039,7 +2940,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( !bIsDocReadOnly && rSh.IsInsideSelectedObj(aDocPos) &&
0 == rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) )
-/* SJ: 01.03.2005: this is no good, on the one hand GetSelectionType is used as flag field (take a look into the GetSelectionType method)
+/* this is no good, on the one hand GetSelectionType is used as flag field (take a look into the GetSelectionType method)
on the other hand the return value is used in a switch without proper masking (very nice), this must lead to trouble
*/
switch ( rSh.GetSelectionType() &~ ( nsSelectionType::SEL_FONTWORK | nsSelectionType::SEL_EXTRUDED_CUSTOMSHAPE ) )
@@ -3051,7 +2952,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
SFX_CALLMODE_RECORD|SFX_CALLMODE_SLOT);
return;
- // Doppelklick auf OLE-Objekt --> OLE-InPlace
+ // double click on OLE object --> OLE-InPlace
case nsSelectionType::SEL_OLE:
if (!rSh.IsSelObjProtected(FLYPROTECT_CONTENT))
{
@@ -3074,9 +2975,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
return;
}
- //falls die Cursorposition korrigiert wurde oder
- // ein Fly im ReadOnlyModus selektiert ist,
- //keine Wortselektion.
+ // if the cursor position was corrected or if a Fly
+ // was selected in ReadOnlyMode, no word selection.
if ( !bValidCrsrPos ||
(rSh.IsFrmSelected() && rSh.IsFrmSelected() ))
return;
@@ -3100,8 +3000,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
case TYP_POSTITFLD:
case TYP_SCRIPTFLD:
{
- //falls es ein Readonly-Bereich ist, dann muss der Status
- //enabled werden
+ // if it's a Readonly region, status has to be enabled
sal_uInt16 nSlot = TYP_POSTITFLD == nTypeId ? FN_POSTIT : FN_JAVAEDIT;
SfxBoolItem aItem(nSlot, sal_True);
pVFrame->GetBindings().SetState(aItem);
@@ -3117,12 +3016,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
return;
}
- //im Extended Mode hat Doppel- und
- //Dreifachklick keine Auswirkungen.
+ // in extended mode double and triple
+ // click has no effect.
if ( rSh.IsExtMode() || rSh.IsBlockMode() )
return;
- //Wort selektieren, gfs. Additional Mode
+ // select work, AdditionalMode if applicable
if ( KEY_MOD1 == rMEvt.GetModifier() && !rSh.IsAddMode() )
{
rSh.EnterAddMode();
@@ -3138,30 +3037,27 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
case 4:
{
bFrmDrag = sal_False;
- //im Extended Mode hat Doppel- und
- //Dreifachklick keine Auswirkungen.
+ // in extended mode double and triple
+ // click has no effect.
if ( rSh.IsExtMode() )
return;
- //falls die Cursorposition korrigiert wurde oder
- // ein Fly im ReadOnlyModus selektiert ist,
- //keine Wortselektion.
+ // if the cursor position was corrected or if a Fly
+ // was selected in ReadOnlyMode, no word selection.
if ( !bValidCrsrPos || rSh.IsFrmSelected() )
return;
- //Zeile selektieren, gfs. Additional Mode
+ // select line, AdditionalMode if applicable
const bool bMod = KEY_MOD1 == rMEvt.GetModifier() &&
!rSh.IsAddMode();
if ( bMod )
rSh.EnterAddMode();
- // --> FME 2004-07-30 #i32329# Enhanced selection
if ( 3 == nNumberOfClicks )
rSh.SelSentence( &aDocPos );
else
rSh.SelPara( &aDocPos );
- // <--
if ( bMod )
rSh.LeaveAddMode();
@@ -3317,8 +3213,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
if ( !rSh.IsExtMode() )
{
- // keine Selection anfangen, wenn in ein URL-
- // Feld oder eine -Grafik geklickt wird
+ // don't start a selection when an
+ // URL field or a graphic is clicked
sal_Bool bSttSelect = rSh.HasSelection() ||
Pointer(POINTER_REFHAND) != GetPointer();
@@ -3386,15 +3282,15 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
int nTmpSetCrsr = 0;
- { // nur temp. Move-Kontext aufspannen, da sonst die
- // Abfrage auf die Inhaltsform nicht funktioniert!!!
+ { // only temporary generate Move-Kontext because otherwise
+ // the query to the content form doesn't work!!!
MV_KONTEXT( &rSh );
nTmpSetCrsr = (rSh.*rSh.fnSetCrsr)(&aDocPos,bOnlyText);
bValidCrsrPos = !(CRSR_POSCHG & nTmpSetCrsr);
bCallBase = sal_False;
}
- //#i42732# - notify the edit window that from now on we do not use the input language
+ // notify the edit window that from now on we do not use the input language
if ( !(CRSR_POSOLD & nTmpSetCrsr) )
SetUseInputLanguage( sal_False );
@@ -3406,13 +3302,11 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( !bOverURLGrf && !bOnlyText )
{
const int nSelType = rSh.GetSelectionType();
- // --> OD 2009-12-30 #i89920#
// Check in general, if an object is selectable at given position.
// Thus, also text fly frames in background become selectable via Ctrl-Click.
if ( nSelType & nsSelectionType::SEL_OLE ||
nSelType & nsSelectionType::SEL_GRF ||
rSh.IsObjSelectable( aDocPos ) )
- // <--
{
MV_KONTEXT( &rSh );
if( !rSh.IsFrmSelected() )
@@ -3421,11 +3315,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
bCallBase = sal_False;
}
}
- // nicht mehr hier zuruecksetzen, damit -- falls durch MouseMove
- // bei gedrueckter Ctrl-Taste eine Mehrfachselektion erfolgen soll,
- // im Drag nicht die vorherige Selektion aufgehoben wird.
-// if(bModePushed)
-// rSh.PopMode(sal_False);
+ // don't reset here any longer so that, in case through MouseMove
+ // with pressed Ctrl key a multiple-selection should happen,
+ // the previous selection is not released in Drag.
break;
}
}
@@ -3435,10 +3327,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
/*--------------------------------------------------------------------
- Beschreibung: MouseMove
+ Description: MouseMove
--------------------------------------------------------------------*/
-
void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
{
MouseEvent rMEvt(_rMEvt);
@@ -3452,8 +3343,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
_rMEvt.GetMode(), _rMEvt.GetButtons() );
}
- // solange eine Action laeuft sollte das MouseMove abgeklemmt sein
- // Ansonsten gibt es den Bug 40102
+ // as long as an action is running the MouseMove should be disconnected
+ // otherwise bug 40102 occurs
SwWrtShell &rSh = rView.GetWrtShell();
if( rSh.ActionPend() )
return ;
@@ -3465,8 +3356,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
SET_CURR_SHELL( &rSh );
- //aPixPt == Point in Pixel, rel. zu ChildWin
- //aDocPt == Point in Twips, Dokumentkoordinaten
+ //aPixPt == Point in Pixel, relative to ChildWin
+ //aDocPt == Point in Twips, document coordinates
const Point aPixPt( rMEvt.GetPosPixel() );
const Point aDocPt( PixelToLogic( aPixPt ) );
@@ -3486,24 +3377,11 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if ( !bIsDocReadOnly && pSdrView && pSdrView->MouseMove(rMEvt,this) )
{
SetPointer( POINTER_TEXT );
- return; // Event von der SdrView ausgewertet
+ return; // evaluate SdrView's event
}
const Point aOldPt( rSh.VisArea().Pos() );
-#ifdef TEST_FOR_BUG91313
- // n Pixel as FUZZY border
- SwRect aVis( rSh.VisArea() );
- Size aFuzzySz( 2, 2 );
- aFuzzySz = PixelToLogic( aFuzzySz );
-
- aVis.Top( aVis.Top() + aFuzzySz.Height() );
- aVis.Bottom( aVis.Bottom() - aFuzzySz.Height() );
- aVis.Left( aVis.Left() + aFuzzySz.Width() );
- aVis.Right( aVis.Right() - aFuzzySz.Width() );
- const sal_Bool bInsWin = aVis.IsInside( aDocPt );
-#else
const sal_Bool bInsWin = rSh.VisArea().IsInside( aDocPt );
-#endif
if( pShadCrsr && !bInsWin )
delete pShadCrsr, pShadCrsr = 0;
@@ -3516,14 +3394,14 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
return;
}
- // Position ist noetig fuer OS/2, da dort nach einem MB-Down
- // offensichtlich sofort ein MB-Move gerufen wird.
+ // position is necessary for OS/2 because obviously after a MB-Down
+ // a MB-Move is called immediately.
if( bDDTimerStarted )
{
Point aDD( SwEditWin::nDDStartPosX, SwEditWin::nDDStartPosY );
aDD = LogicToPixel( aDD );
Rectangle aRect( aDD.X()-3, aDD.Y()-3, aDD.X()+3, aDD.Y()+3 );
- if ( !aRect.IsInside( aPixPt ) ) // MA 23. May. 95: Tatterschutz.
+ if ( !aRect.IsInside( aPixPt ) )
StopDDTimer( &rSh, aDocPt );
}
@@ -3584,7 +3462,6 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
nPointer = POINTER_HSIZEBAR;
bChkTblSel = true;
break;
- // --> FME 2004-07-30 #i20126# Enhanced table selection
case SW_TABSEL_HORI :
nPointer = POINTER_TAB_SELECT_SE;
break;
@@ -3603,31 +3480,26 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
case SW_TABCOLSEL_VERT :
nPointer = POINTER_TAB_SELECT_W;
break;
- // <--
}
if ( USHRT_MAX != nPointer &&
- // --> FME 2004-10-20 #i35543#
- // Enhanced table selection is explicitely allowed in table mode
+ // i#35543 - Enhanced table selection is explicitely allowed in table mode
( !bChkTblSel || !rSh.IsTableMode() ) )
- // <--
{
SetPointer( nPointer );
}
return;
}
- // #i23726#
else if (rSh.IsNumLabel(aDocPt, RULER_MOUSE_MARGINWIDTH))
{
- // --> OD 2005-02-21 #i42921# - consider vertical mode
+ // i#42921 - consider vertical mode
SwTxtNode* pNodeAtPos = rSh.GetNumRuleNodeAtPos( aDocPt );
const sal_uInt16 nPointer =
rSh.IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPt )
? POINTER_VSIZEBAR
: POINTER_HSIZEBAR;
SetPointer( nPointer );
- // <--
return;
}
@@ -3649,10 +3521,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
// So the pAnchorMarker has to find the right SdrHdl, if it's
// the old one, it will find it with position aOld, if this one
// is destroyed, it will find a new one at position GetHdlPos().
- // --> OD 2010-09-16 #i114522#
-// const Point aOld = pAnchorMarker->GetPos();
+
const Point aOld = pAnchorMarker->GetPosForHitTest( *(rSh.GetOut()) );
- // <--
Point aNew = rSh.FindAnchorPos( aDocPt );
SdrHdl* pHdl;
if( (0!=( pHdl = pSdrView->PickHandle( aOld ) )||
@@ -3665,7 +3535,6 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
{
pAnchorMarker->SetPos( aNew );
pAnchorMarker->SetLastPos( aDocPt );
- //OLMpSdrView->RefreshAllIAOManagers();
}
}
else
@@ -3705,7 +3574,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if ( bIsInMove || IsMinMove( aStartPos, aPixPt ) )
{
- // Event-Verarbeitung fuers Resizen
+ // event processing for resizing
if( pSdrView->AreObjectsMarked() )
{
const SwFrmFmt* pFlyFmt;
@@ -3713,7 +3582,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
const Point aSttPt( PixelToLogic( aStartPos ) );
- // geht es los?
+ // can we start?
if( HDL_USER == eSdrMoveHdl )
{
SdrHdl* pHdl = pSdrView->PickHandle( aSttPt );
@@ -3727,9 +3596,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if( 0 != ( pFlyFmt = rSh.GetFlyFrmFmt() ) &&
0 != ( pMacro = pFlyFmt->GetMacro().GetMacroTable().
Get( nEvent )) &&
-// oder nur z.B. alle 20 Twip bescheid sagen?
-// ( 20 > Abs( aRszMvHdlPt.X() - aDocPt.X() ) ||
-// 20 > Abs( aRszMvHdlPt.Y() - aDocPt.Y() ) )
+// or notify only e.g. every 20 Twip?
aRszMvHdlPt != aDocPt )
{
aRszMvHdlPt = aDocPt;
@@ -3764,7 +3631,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
return ;
}
}
- // Event-Verarbeitung fuers Resizen
+ // event processing for resizing
if( bIsDocReadOnly )
break;
@@ -3815,9 +3682,6 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
}
else
{
- //JP 24.09.98: Fix fuer die Bugs 55592 / 55931
- //JP 23.04.99: Fix fuer den Bugs 65289
- //JP 06.07.99: Fix fuer den Bugs 67360
if( !rMEvt.IsSynthetic() &&
!(( MOUSE_LEFT + KEY_MOD1 ==
rMEvt.GetModifier() + rMEvt.GetButtons() ) &&
@@ -3836,10 +3700,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
{
if ( pApplyTempl )
{
- UpdatePointer(aDocPt, 0); // evtl. muss hier ein Rahmen markiert werden
+ UpdatePointer(aDocPt, 0); // maybe a frame has to be marked here
break;
}
- //#i6193#, change ui if mouse is over SwPostItField
+ // change ui if mouse is over SwPostItField
// TODO: do the same thing for redlines SW_REDLINE
SwRect aFldRect;
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD);
@@ -3889,14 +3753,14 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
aSaveCallEvent.Set( EVENT_OBJECT_URLITEM, pFmt );
}
- // sollte wir ueber einem InternetFeld mit einem
- // gebundenen Macro stehen?
+ // should be be over a InternetField with an
+ // embedded macro?
if( aSaveCallEvent != aLastCallEvent )
{
if( aLastCallEvent.HasEvent() )
rSh.CallEvent( SFX_EVENT_MOUSEOUT_OBJECT,
aLastCallEvent, sal_True );
- // 0 besagt, das das Object gar keine Tabelle hat
+ // 0 says that the object doesn't have any table
if( !rSh.CallEvent( SFX_EVENT_MOUSEOVER_OBJECT,
aSaveCallEvent ))
aSaveCallEvent.Clear();
@@ -3904,7 +3768,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
}
else if( aLastCallEvent.HasEvent() )
{
- // Cursor stand auf einem Object
+ // cursor was on an object
rSh.CallEvent( SFX_EVENT_MOUSEOUT_OBJECT,
aLastCallEvent, sal_True );
}
@@ -3948,10 +3812,9 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
}
/*--------------------------------------------------------------------
- Beschreibung: Button Up
+ Description: Button Up
--------------------------------------------------------------------*/
-
void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
sal_Bool bCallBase = sal_True;
@@ -3965,9 +3828,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
DELETEZ( pRowColumnSelectionStart );
SdrHdlKind eOldSdrMoveHdl = eSdrMoveHdl;
- eSdrMoveHdl = HDL_USER; // fuer die MoveEvents - wieder zuruecksetzen
+ eSdrMoveHdl = HDL_USER; // for MoveEvents - reset again
- // sicherheitshalber zuruecksetzen Bug 27900
+ // preventively reset
rView.SetTabColFromDoc( sal_False );
rView.SetNumRuleNodeFromDoc(NULL);
@@ -3981,16 +3844,15 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if ( pSdrView->MouseButtonUp( rMEvt,this ) )
{
rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
- return; // Event von der SdrView ausgewertet
+ return; // SdrView's event evaluated
}
}
- //MouseButtonUp nur bearbeiten, wenn auch das Down an dieses Fenster ging.
+ // only process MouseButtonUp when the Down went to that windows as well.
if ( !bMBPressed )
{
-// OS 25.02.97 Undo fuer die Giesskann ist bereits im CommandHdl
-//JP 29.09.95: so sollte es sein!!! if(pApplyTempl->bUndo)
-// if( pApplyTempl && MOUSE_RIGHT == rMEvt.GetModifier() + rMEvt.GetButtons() )
-// rSh.Do( SwWrtShell::UNDO );
+// Undo for the watering can is already in CommandHdl
+// that's the way it should be!
+
return;
}
@@ -4013,7 +3875,6 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if( pAnchorMarker )
{
Point aPnt( pAnchorMarker->GetLastPos() );
- //OLMpSdrView->RefreshAllIAOManagers();
DELETEZ( pAnchorMarker );
if( aPnt.X() || aPnt.Y() )
rSh.FindAnchorPos( aPnt, sal_True );
@@ -4022,7 +3883,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
if ( rView.GetDrawFuncPtr()->MouseButtonUp( rMEvt ) )
{
- if (rView.GetDrawFuncPtr()) // Koennte im MouseButtonUp zerstoert worden sein
+ if (rView.GetDrawFuncPtr()) // could have been destroyed in MouseButtonUp
{
rView.GetDrawFuncPtr()->Deactivate();
@@ -4056,7 +3917,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
rView.AttrChangedNotify( &rSh );
}
else if (rMEvt.GetButtons() == MOUSE_RIGHT && rSh.IsDrawCreate())
- rView.GetDrawFuncPtr()->BreakCreate(); // Zeichnen abbrechen
+ rView.GetDrawFuncPtr()->BreakCreate(); // abort drawing
bNoInterrupt = sal_False;
ReleaseMouse();
@@ -4085,9 +3946,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
case MOUSE_LEFT + KEY_SHIFT + KEY_MOD1:
if ( bFrmDrag && rSh.IsSelFrmMode() )
{
- if ( rMEvt.IsMod1() ) //Kopieren und nicht moven.
+ if ( rMEvt.IsMod1() ) // copy and don't move.
{
- //Drag abbrechen, statt dessen internes Copy verwenden
+ // abort drag, use internal Copy instead
Rectangle aRect;
rSh.GetDrawView()->TakeActionRect( aRect );
if (!aRect.IsEmpty())
@@ -4181,8 +4042,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if( bHoldSelection )
{
- //JP 27.04.99: Bug 65389 - das EndDrag sollte auf jedenfall
- // gerufen werden.
+ // the EndDrag should be called in any case
bHoldSelection = sal_False;
(rSh.*rSh.fnEndDrag)( &aDocPt, sal_False );
}
@@ -4192,8 +4052,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
const sal_Bool bTmpNoInterrupt = bNoInterrupt;
bNoInterrupt = sal_False;
- { // nur temp. Move-Kontext aufspannen, da sonst die
- // Abfrage auf die Inhaltsform nicht funktioniert!!!
+ { // create only temporary move context because otherwise
+ // the query to the content form doesn't work!!!
MV_KONTEXT( &rSh );
const Point aDocPos( PixelToLogic( aStartPos ) );
bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False));
@@ -4206,9 +4066,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
sal_Bool bInSel = rSh.IsInSelect();
(rSh.*rSh.fnEndDrag)( &aDocPt, sal_False );
- // Internetfield? --> Link-Callen (DocLaden!!)
-//JP 18.10.96: Bug 32437 -
-// if( !rSh.HasSelection() )
+ // Internetfield? --> call link (load doc!!)
if( !bInSel )
{
sal_uInt16 nFilter = URLLOAD_NOFILTER;
@@ -4255,19 +4113,17 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
else if ( SwContentAtPos::SW_FORMCTRL == aCntntAtPos.eCntntAtPos )
{
- ASSERT( aCntntAtPos.aFnd.pFldmark != NULL, "where is my field ptr???");
+ OSL_ENSURE( aCntntAtPos.aFnd.pFldmark != NULL, "where is my field ptr???");
if ( aCntntAtPos.aFnd.pFldmark != NULL)
{
IFieldmark *fieldBM = const_cast< IFieldmark* > ( aCntntAtPos.aFnd.pFldmark );
- //SwDocShell* pDocSh = rView.GetDocShell();
- //SwDoc *pDoc=pDocSh->GetDoc();
- if (fieldBM->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX ) )
+ if (fieldBM->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) ) )
{
ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(fieldBM);
pCheckboxFm->SetChecked(!pCheckboxFm->IsChecked());
pCheckboxFm->Invalidate();
rSh.InvalidateWindows( rView.GetVisArea() );
- } else if (fieldBM->GetFieldname().equalsAscii( ODF_FORMDROPDOWN) ) {
+ } else if (fieldBM->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) ) {
rView.ExecFieldPopup( aDocPt, fieldBM );
fieldBM->Invalidate();
rSh.InvalidateWindows( rView.GetVisArea() );
@@ -4276,7 +4132,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
}
}
- else // if ( SwContentAtPos::SW_INETATTR == aCntntAtPos.eCntntAtPos )
+ else
{
if ( bExecHyperlinks )
rSh.ClickToINetAttr( *(SwFmtINetFmt*)aCntntAtPos.aFnd.pAttr, nFilter );
@@ -4297,7 +4153,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if (pSdrView && aVEvt.eEvent == SDREVENT_EXECUTEURL)
{
- // URL-Feld getroffen
+ // hit URL field
const SvxURLField *pField = aVEvt.pURLField;
if (pField)
{
@@ -4309,7 +4165,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
else
{
- // Grafik getroffen
+ // hit graphic
ReleaseMouse();
if( rSh.ClickToINetGrf( aDocPt, nFilter ))
bCallShadowCrsr = sal_False;
@@ -4341,7 +4197,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
- // gfs. im Down gepushten Mode wieder zuruecksetzen
+ // reset pushed mode in Down again if applicable
if ( bPopMode && bModePushed )
{
rSh.PopMode();
@@ -4417,7 +4273,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
else if(rMEvt.GetClicks() == 1)
{
- // keine Selektion -> also Giesskanne abschalten
+ // no selection -> so turn off watering can
aTemplateTimer.Start();
}
}
@@ -4466,7 +4322,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
break;
}
case SFX_STYLE_FAMILY_PAGE:
- // Kein Undo bei Seitenvorlagen
+ // no Undo with page templates
rSh.ChgCurPageDesc( *pApplyTempl->aColl.pPageDesc );
if ( pApplyTempl->aColl.pPageDesc )
aStyleName = pApplyTempl->aColl.pPageDesc->GetName();
@@ -4475,11 +4331,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
case SFX_STYLE_FAMILY_PSEUDO:
if( !rSh.HasReadonlySel() )
{
- // --> OD 2008-03-17 #refactorlists#
rSh.SetCurNumRule( *pApplyTempl->aColl.pNumRule,
false,
pApplyTempl->aColl.pNumRule->GetDefaultListId() );
- // <--
bCallBase = sal_False;
pApplyTempl->bUndo = sal_True;
if( pApplyTempl->aColl.pNumRule )
@@ -4505,8 +4359,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
ReleaseMouse();
- // Hier kommen nur verarbeitete MouseEvents an; nur bei diesen duerfen
- // die Modi zurueckgesetzt werden.
+ // Only processed MouseEvents arrive here; only at these the moduses can
+ // be resetted.
bMBPressed = sal_False;
//sicherheitshalber aufrufen, da jetzt das Selektieren bestimmt zu Ende ist.
@@ -4518,12 +4372,10 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
Window::MouseButtonUp(rMEvt);
}
-
/*--------------------------------------------------------------------
- Beschreibung: Vorlage anwenden
+ Description: apply template
--------------------------------------------------------------------*/
-
void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl)
{
static sal_Bool bIdle = sal_False;
@@ -4564,7 +4416,7 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl)
rSh.Edit();
}
- static sal_uInt16 __READONLY_DATA aInva[] =
+ static sal_uInt16 aInva[] =
{
SID_STYLE_WATERCAN,
SID_ATTR_CHAR_COLOR_EXT,
@@ -4575,10 +4427,9 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl)
}
/*--------------------------------------------------------------------
- Beschreibung: ctor
+ Description: ctor
--------------------------------------------------------------------*/
-
SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
Window(pParent, WinBits(WB_CLIPCHILDREN | WB_DIALOGCONTROL)),
DropTargetHelper( this ),
@@ -4604,8 +4455,8 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
bLockInput(sal_False),
bObjectSelect( sal_False ),
- nKS_NUMDOWN_Count(0), // #i23725#
- nKS_NUMINDENTINC_Count(0) // #i23725#
+ nKS_NUMDOWN_Count(0),
+ nKS_NUMINDENTINC_Count(0)
{
SetHelpId(HID_EDIT_WIN);
EnableChildTransparentMode();
@@ -4613,7 +4464,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
bLinkRemoved = bMBPressed = bInsDraw = bInsFrm =
bIsInDrag = bOldIdle = bOldIdleSet = bChainMode = bWasShdwCrsr = sal_False;
- //#i42732# initially use the input language
+ // initially use the input language
bUseInputLanguage = sal_True;
SetMapMode(MapMode(MAP_TWIP));
@@ -4628,13 +4479,13 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
aKeyInputFlushTimer.SetTimeout( 200 );
aKeyInputFlushTimer.SetTimeoutHdl(LINK(this, SwEditWin, KeyInputFlushHandler));
- // TemplatePointer fuer Farben soll nach Einfachclick
- // ohne Selektion zurueckgesetzt werden
+ // TemplatePointer for colors should be resetted without
+ // selection after single click
aTemplateTimer.SetTimeout(400);
aTemplateTimer.SetTimeoutHdl(LINK(this, SwEditWin, TemplateTimerHdl));
- //JP 16.12.98: temporaere Loesung!!! Sollte bei jeder Cursorbewegung
- // den Font von der akt. einfuege Position setzen!
+ // temporary solution!!! Should set the font of the current
+ // insert position at every curor movement!
if( !rMyView.GetDocShell()->IsReadOnly() )
{
Font aFont;
@@ -4643,8 +4494,6 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
}
}
-
-
SwEditWin::~SwEditWin()
{
aKeyInputTimer.Stop();
@@ -4664,12 +4513,10 @@ SwEditWin::~SwEditWin()
delete pAnchorMarker;
}
-
/******************************************************************************
- * Beschreibung: DrawTextEditMode einschalten
+ * Description: turn on DrawTextEditMode
******************************************************************************/
-
void SwEditWin::EnterDrawTextMode( const Point& aDocPos )
{
if ( rView.EnterDrawTextMode(aDocPos) == sal_True )
@@ -4686,17 +4533,14 @@ void SwEditWin::EnterDrawTextMode( const Point& aDocPos )
}
/******************************************************************************
- * Beschreibung: DrawMode einschalten
+ * Description: turn on DrawMode
******************************************************************************/
-
-
sal_Bool SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
{
SwWrtShell &rSh = rView.GetWrtShell();
SdrView *pSdrView = rSh.GetDrawView();
-// if ( GetDrawFuncPtr() && (aActHitType == SDRHIT_NONE || rSh.IsDrawCreate()) )
if ( rView.GetDrawFuncPtr() )
{
if (rSh.IsDrawCreate())
@@ -4712,7 +4556,7 @@ sal_Bool SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
sal_Bool bUnLockView = !rSh.IsViewLocked();
rSh.LockView( sal_True );
- rSh.EndTextEdit(); // Danebengeklickt, Ende mit Edit
+ rSh.EndTextEdit(); // clicked aside, end Edit
rSh.SelectObj( aDocPos );
if ( !rSh.IsObjSelected() && !rSh.IsFrmSelected() )
rSh.LeaveSelFrmMode();
@@ -4730,23 +4574,11 @@ sal_Bool SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
return sal_False;
}
-/******************************************************************************
- * Beschreibung:
- ******************************************************************************/
-
-
-
sal_Bool SwEditWin::IsDrawSelMode()
{
-// return (IsFrmAction() == sal_False && GetSdrDrawMode() == OBJ_NONE);
return IsObjectSelect();
}
-/******************************************************************************
- * Beschreibung:
- ******************************************************************************/
-
-
void SwEditWin::GetFocus()
{
if ( rView.GetPostItMgr()->HasActiveSidebarWin() )
@@ -4761,12 +4593,6 @@ void SwEditWin::GetFocus()
}
}
-/******************************************************************************
- * Beschreibung:
- ******************************************************************************/
-
-
-
void SwEditWin::LoseFocus()
{
rView.GetWrtShell().InvalidateAccessibleFocus();
@@ -4776,19 +4602,13 @@ void SwEditWin::LoseFocus()
rView.LostFocus();
}
-/******************************************************************************
- * Beschreibung:
- ******************************************************************************/
-
-
-
void SwEditWin::Command( const CommandEvent& rCEvt )
{
SwWrtShell &rSh = rView.GetWrtShell();
if ( !rView.GetViewFrame() )
{
- //Wenn der ViewFrame in Kuerze stirbt kein Popup mehr!
+ // If ViewFrame dies shortly, no popup anymore!
Window::Command(rCEvt);
return;
}
@@ -4797,7 +4617,6 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
// menu from an inplace client has been closed. Now we have the chance
// to deactivate the inplace client without any problem regarding parent
// windows and code on the stack.
- // For more information, see #126086# and #128122#
SfxInPlaceClient* pIPClient = rSh.GetSfxViewShell()->GetIPClient();
sal_Bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
if ( bIsOleActive && ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ))
@@ -4851,8 +4670,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
aEvent.ExecutePosition.X = aPixPos.X();
aEvent.ExecutePosition.Y = aPixPos.Y();
Menu* pMenu = 0;
- ::rtl::OUString sMenuName =
- ::rtl::OUString::createFromAscii( "private:resource/ReadonlyContextMenu");
+ ::rtl::OUString sMenuName(RTL_CONSTASCII_USTRINGPARAM("private:resource/ReadonlyContextMenu"));
if( GetView().TryContextMenuInterception( *pROPopup, sMenuName, pMenu, aEvent ) )
{
if ( pMenu )
@@ -4886,7 +4704,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
case COMMAND_VOICE:
{
- //ggf. an Outliner weiterleiten
+ // forward to Outliner if applicable
if ( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() )
{
bCallBase = sal_False;
@@ -4898,7 +4716,6 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if ( VOICECOMMANDTYPE_CONTROL == pCData->GetType() )
break;
-
sal_uInt16 nSlotId = 0;
SfxPoolItem *pItem = 0;
@@ -4951,9 +4768,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
break;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
default:
- ASSERT( !this, "unknown speech command." );
+ OSL_ENSURE( !this, "unknown speech command." );
#endif
}
if ( nSlotId )
@@ -5017,7 +4834,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if ( sRecord.Len() )
{
- // #102812# convert quotes in IME text
+ // convert quotes in IME text
// works on the last input character, this is escpecially in Korean text often done
// quotes that are inside of the string are not replaced!
const sal_Unicode aCh = sRecord.GetChar(sRecord.Len() - 1);
@@ -5033,9 +4850,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if ( xRecorder.is() )
{
- //Shell ermitteln
+ // determine Shell
SfxShell *pSfxShell = lcl_GetShellFromDispatcher( rView, TYPE(SwTextShell) );
- // Request generieren und recorden
+ // generate request and record
if (pSfxShell)
{
SfxRequest aReq( rView.GetViewFrame(), FN_INSERT_STRING );
@@ -5145,7 +4962,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
GetView().GetViewFrame()->GetDispatcher()->Execute(SID_HANGUL_HANJA_CONVERSION);
break;
case COMMAND_INPUTLANGUAGECHANGE :
- //#i42732# update state of fontname if input language changes
+ // i#42732 - update state of fontname if input language changes
bInputLanguageSwitched = true;
SetUseInputLanguage( sal_True );
break;
@@ -5219,35 +5036,30 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
}
break;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
default:
- ASSERT( !this, "unknown command." );
+ OSL_ENSURE( !this, "unknown command." );
#endif
}
if (bCallBase)
Window::Command(rCEvt);
}
-/* -----------------25.08.2003 10:12-----------------
- #i18686#: select the object/cursor at the mouse
- position of the context menu request
- --------------------------------------------------*/
+/* i#18686 select the object/cursor at the mouse
+ position of the context menu request */
sal_Bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
{
sal_Bool bRet = sal_False;
const Point aDocPos( PixelToLogic( rMousePos ) );
- // --> OD 2005-02-17 #i42258#
const bool bIsInsideSelectedObj( rSh.IsInsideSelectedObj( aDocPos ) );
- // <--
//create a synthetic mouse event out of the coordinates
MouseEvent aMEvt(rMousePos);
SdrView *pSdrView = rSh.GetDrawView();
if ( pSdrView )
{
- // --> OD 2005-02-17 #i42258# - no close of insert_draw and reset of
+ // no close of insert_draw and reset of
// draw mode, if context menu position is inside a selected object.
if ( !bIsInsideSelectedObj && rView.GetDrawFuncPtr() )
- // <--
{
rView.GetDrawFuncPtr()->Deactivate();
@@ -5319,7 +5131,6 @@ sal_Bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
if( !rSh.IsSelFrmMode() &&
!GetView().GetViewFrame()->GetDispatcher()->IsLocked() )
{
- // #107513#
// Test if there is a draw object at that position and if it should be selected.
sal_Bool bShould = rSh.ShouldObjectBeSelected(aDocPos);
@@ -5337,9 +5148,8 @@ sal_Bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
if( bSelObj )
{
bRet = sal_True;
- // falls im Macro der Rahmen deselektiert
- // wurde, muss nur noch der Cursor
- // wieder angezeigt werden.
+ // in case the frame was deselected in the macro
+ // just the cursor has to be displayed again.
if( FRMTYPE_NONE == rSh.GetSelFrmType() )
rSh.ShowCrsr();
else
@@ -5386,9 +5196,8 @@ sal_Bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
if( !bSelObj )
{
- // Cursor hier umsetzen, damit er nicht zuerst
- // im Rahmen gezeichnet wird; ShowCrsr() geschieht
- // in LeaveSelFrmMode()
+ // move cursor here so that it is not drawn in the
+ // frame at first; ShowCrsr() happens in LeaveSelFrmMode()
bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False));
rSh.LeaveSelFrmMode();
rView.LeaveDrawCreate();
@@ -5432,8 +5241,8 @@ sal_Bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
if ( !bOverSelect )
{
- { // nur temp. Move-Kontext aufspannen, da sonst die
- // Abfrage auf die Inhaltsform nicht funktioniert!!!
+ { // create only temporary move context because otherwise
+ // the query against the content form doesn't work!!!
MV_KONTEXT( &rSh );
(rSh.*rSh.fnSetCrsr)(&aDocPos, sal_False);
bRet = sal_True;
@@ -5457,7 +5266,7 @@ sal_Bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType )
{
- //Shell ermitteln
+ // determine Shell
SfxShell* pShell;
SfxDispatcher* pDispatcher = rView.GetViewFrame()->GetDispatcher();
for(sal_uInt16 i = 0; sal_True; ++i )
@@ -5469,8 +5278,6 @@ SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType )
return pShell;
}
-
-
void SwEditWin::ClearTip()
{
}
@@ -5481,7 +5288,6 @@ IMPL_LINK( SwEditWin, KeyInputFlushHandler, Timer *, EMPTYARG )
return 0;
}
-
IMPL_LINK( SwEditWin, KeyInputTimerHandler, Timer *, EMPTYARG )
{
bTblInsDelMode = sal_False;
@@ -5497,28 +5303,20 @@ void SwEditWin::_FinitStaticData()
{
delete pQuickHlpData;
}
-/* -----------------23.01.2003 12:15-----------------
- * #i3370# remove quick help to prevent saving
- * of autocorrection suggestions
- * --------------------------------------------------*/
+/* i#3370 - remove quick help to prevent saving
+ * of autocorrection suggestions */
void SwEditWin::StopQuickHelp()
{
if( HasFocus() && pQuickHlpData && pQuickHlpData->bClear )
pQuickHlpData->Stop( rView.GetWrtShell() );
}
-/*-----------------23.02.97 18:39-------------------
-
---------------------------------------------------*/
-
-
IMPL_LINK(SwEditWin, TemplateTimerHdl, Timer*, EMPTYARG)
{
SetApplyTemplate(SwApplyTemplate());
return 0;
}
-
void SwEditWin::SetChainMode( sal_Bool bOn )
{
if ( !bChainMode )
@@ -5534,7 +5332,7 @@ void SwEditWin::SetChainMode( sal_Bool bOn )
if ( !bChainMode )
rView.GetViewFrame()->HideStatusText();
- static sal_uInt16 __READONLY_DATA aInva[] =
+ static sal_uInt16 aInva[] =
{
FN_FRAME_CHAIN, FN_FRAME_UNCHAIN, 0
};
@@ -5543,10 +5341,9 @@ void SwEditWin::SetChainMode( sal_Bool bOn )
uno::Reference< ::com::sun::star::accessibility::XAccessible > SwEditWin::CreateAccessible()
{
- vos::OGuard aGuard(Application::GetSolarMutex()); // this should have
- // happend already!!!
+ SolarMutexGuard aGuard; // this should have happend already!!!
SwWrtShell *pSh = rView.GetWrtShellPtr();
- ASSERT( pSh, "no writer shell, no accessible object" );
+ OSL_ENSURE( pSh, "no writer shell, no accessible object" );
uno::Reference<
::com::sun::star::accessibility::XAccessible > xAcc;
if( pSh )
@@ -5559,10 +5356,9 @@ uno::Reference< ::com::sun::star::accessibility::XAccessible > SwEditWin::Create
void QuickHelpData::Move( QuickHelpData& rCpy )
{
- // Pointer verschieben
+ // move pointer
aArr.Insert( &rCpy.aArr );
rCpy.aArr.Remove( (sal_uInt16)0, rCpy.aArr.Count() );
-// nTipId = rCpy.nTipId;
bClear = rCpy.bClear;
nLen = rCpy.nLen;
nCurArrPos = rCpy.nCurArrPos;
@@ -5592,7 +5388,6 @@ void QuickHelpData::ClearCntnt()
delete[] pAttrs, pAttrs = 0;
}
-
void QuickHelpData::Start( SwWrtShell& rSh, sal_uInt16 nWrdLen )
{
if( pCETID ) delete pCETID, pCETID = 0;
@@ -5640,8 +5435,6 @@ void QuickHelpData::Stop( SwWrtShell& rSh )
ClearCntnt();
}
-
-
void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord )
{
salhelper::SingletonRef<SwCalendarWrapper>* pCalendar = s_getCalendarWrapper();
@@ -5657,9 +5450,7 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord )
String sStr( aNames[ nPos ].FullName );
if( rWord.Len() + 1 < sStr.Len() &&
-//!!! UNICODE: fehlendes interface
-// pIntl->CompareEqual( rWord, sStr.Copy( 0, rWord.Len() ),
-// INTN_COMPARE_IGNORECASE ) )
+//!!! UNICODE: missing interface
COMPARE_EQUAL == rWord.CompareIgnoreCaseToAscii(
sStr, rWord.Len() ))
{
@@ -5681,22 +5472,40 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord )
while( nStt < nEnd )
{
const String& rS = rACLst[ nStt ];
- //JP 16.06.99: Bug 66927 - only if the count of chars
- // from the suggest greater as the
- // actual word
+ // only if the count of chars
+ // from the suggest greater as the
+ // actual word
if( rS.Len() > rWord.Len() )
{
- String* pNew = new String( rS );
- if( !aArr.Insert( pNew ) )
+ CharClass &rCC = GetAppCharClass();
+ String aMatch;
+ int upper = 0, lower = 0, letters = 0;
+ for( xub_StrLen i = 0; i < rWord.Len(); i++ ) {
+ sal_Int32 nCharType = rCC.getCharacterType( rWord, i );
+ if( !CharClass::isLetterType( nCharType ) )
+ continue;
+ letters++;
+ if( i18n::KCharacterType::LOWER & nCharType )
+ lower++;
+ if( i18n::KCharacterType::UPPER & nCharType )
+ upper++;
+ }
+ if (lower == letters)
+ aMatch = rCC.lower( rS );
+ else if (upper == letters)
+ aMatch = rCC.upper( rS );
+ else // mixed case - use what we have
+ aMatch = rS;
+
+ String *pNew = new String( aMatch );
+ if (!aArr.Insert( pNew ))
delete pNew;
}
++nStt;
}
}
}
-/* -----------------06.11.2002 12:01-----------------
- *
- * --------------------------------------------------*/
+
void SwEditWin::ShowAutoTextCorrectQuickHelp(
const String& rWord, SvxAutoCorrCfg* pACfg, SvxAutoCorrect* pACorr,
sal_Bool bFromIME )
@@ -5728,10 +5537,6 @@ void SwEditWin::ShowAutoTextCorrectQuickHelp(
pQuickHlpData->Start( rSh, rWord.Len() );
}
-/* -----------------29.03.2006 11:01-----------------
- *
- * --------------------------------------------------*/
-
void SwEditWin::SetUseInputLanguage( sal_Bool bNew )
{
if ( bNew || bUseInputLanguage )
@@ -5743,9 +5548,6 @@ void SwEditWin::SetUseInputLanguage( sal_Bool bNew )
bUseInputLanguage = bNew;
}
-/*-- 13.11.2008 10:18:17---------------------------------------------------
-
- -----------------------------------------------------------------------*/
XubString SwEditWin::GetSurroundingText() const
{
String sReturn;
@@ -5771,9 +5573,7 @@ XubString SwEditWin::GetSurroundingText() const
return sReturn;
}
-/*-- 13.11.2008 10:18:17---------------------------------------------------
- -----------------------------------------------------------------------*/
Selection SwEditWin::GetSurroundingTextSelection() const
{
SwWrtShell& rSh = rView.GetWrtShell();
@@ -5801,3 +5601,5 @@ Selection SwEditWin::GetSurroundingTextSelection() const
return Selection( nPos - nStartPos, nPos - nStartPos );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx
index fc3ed663ad6d..2fc5a877319b 100644
--- a/sw/source/ui/docvw/edtwin2.cxx
+++ b/sw/source/ui/docvw/edtwin2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
#include <hintids.hxx>
#include <doc.hxx>
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
#include <stdio.h>
#endif
@@ -81,7 +82,7 @@
// <--
/*--------------------------------------------------------------------
- Beschreibung: KeyEvents
+ Description: KeyEvents
--------------------------------------------------------------------*/
static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, sal_Bool bBalloon )
{
@@ -135,7 +136,6 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( bWeiter && bQuickBalloon)
{
SwRect aFldRect;
- sal_uInt16 nStyle = 0; // style of quick help
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD |
SwContentAtPos::SW_INETATTR |
SwContentAtPos::SW_FTN |
@@ -143,7 +143,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
SwContentAtPos::SW_TOXMARK |
SwContentAtPos::SW_REFMARK |
SwContentAtPos::SW_SMARTTAG |
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
SwContentAtPos::SW_TABLEBOXVALUE |
( bBalloon ? SwContentAtPos::SW_CURR_ATTRS : 0) |
#endif
@@ -151,13 +151,14 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
{
+ sal_uInt16 nStyle = 0; // style of quick help
switch( aCntntAtPos.eCntntAtPos )
{
case SwContentAtPos::SW_TABLEBOXFML:
sTxt.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "= " ));
sTxt += ((SwTblBoxFormula*)aCntntAtPos.aFnd.pAttr)->GetFormula();
break;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
case SwContentAtPos::SW_TABLEBOXVALUE:
{
sTxt = UniString(
@@ -191,7 +192,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
sSuffix.EqualsAscii( pMarkToOLE ))
sTxt = sTxt.Copy( 0, nFound - 1);
}
- // --> OD 2009-08-18 #i104300#
+ // #i104300#
// special handling if target is a cross-reference bookmark
{
String sTmpSearchStr = sTxt.Copy( 1, sTxt.Len() );
@@ -222,8 +223,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
}
}
}
- // <--
- // --> OD 2007-07-26 #i80029#
+ // #i80029#
sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
@@ -236,7 +236,6 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
sTxt.Insert( ViewShell::GetShellRes()->aHyperlinkClick, 0 );
}
}
- // <--
break;
}
case SwContentAtPos::SW_SMARTTAG:
@@ -311,27 +310,9 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case RES_POSTITFLD:
{
- /*
- SwPostItMgr* pMgr = rView.GetPostItMgr();
- if (pMgr->ShowNotes())
- {
- SwFmtFld* pSwFmtFld = 0;
- if (pMgr->ShowPreview(pFld,pSwFmtFld))
- {
- SwPostIt* pPostIt = new SwPostIt(static_cast<Window*>(this),0,pSwFmtFld,pMgr,PB_Preview);
- pPostIt->InitControls();
- pPostIt->SetReadonly(true);
- pMgr->SetColors(pPostIt,static_cast<SwPostItField*>(pSwFmtFld->GetFld()));
- pPostIt->SetVirtualPosSize(rEvt.GetMousePosPixel(),Size(180,70));
- pPostIt->ShowNote();
- SetPointerPosPixel(pPostIt->GetPosPixel() + Point(20,20));
- }
- return;
- }
- */
break;
}
- case RES_INPUTFLD: // BubbleHelp, da der Hinweis ggf ziemlich lang sein kann
+ case RES_INPUTFLD: // BubbleHelp, because the suggestion could be quite long
bBalloon = sal_True;
/* no break */
case RES_JUMPEDITFLD:
@@ -356,9 +337,9 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case RES_GETREFFLD:
{
- // --> OD 2008-01-09 #i85090#
+ // #i85090#
const SwGetRefField* pRefFld( dynamic_cast<const SwGetRefField*>(pFld) );
- ASSERT( pRefFld,
+ OSL_ENSURE( pRefFld,
"<SwEditWin::RequestHelp(..)> - unexpected type of <pFld>" );
if ( pRefFld )
{
@@ -379,7 +360,6 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
sTxt = ((SwGetRefField*)pFld)->GetSetRefName();
}
}
- // <--
}
break;
}
@@ -400,7 +380,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
Help::ShowBalloon( this, rEvt.GetMousePosPixel(), sTxt );
else
{
- // dann zeige die Hilfe mal an:
+ // the show the help
Rectangle aRect( aFldRect.SVRect() );
Point aPt( OutputToScreenPixel( LogicToPixel( aRect.TopLeft() )));
aRect.Left() = aPt.X();
@@ -428,7 +408,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case SW_TABROW_VERT:
nTabRes = STR_TABLE_ROW_ADJUST;
break;
- // --> FME 2004-07-30 #i32329# Enhanced table selection
+ // #i32329# Enhanced table selection
case SW_TABSEL_HORI:
case SW_TABSEL_HORI_RTL:
case SW_TABSEL_VERT:
@@ -443,7 +423,6 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case SW_TABCOLSEL_VERT:
nTabRes = STR_TABLE_SELECT_COL;
break;
- // <--
}
if(nTabRes)
{
@@ -456,14 +435,6 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
}
}
-/*
-aktuelle Zeichenvorlage anzeigen?
- if( bWeiter && rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON ))
- {
- SwCharFmt* pChrFmt = rSh.GetCurCharFmt();
-
- }
-*/
if( bWeiter && pSdrView && bQuickBalloon)
{
SdrViewEvent aVEvt;
@@ -473,7 +444,7 @@ aktuelle Zeichenvorlage anzeigen?
if ((pField = aVEvt.pURLField) != 0)
{
- // URL-Feld getroffen
+ // hit an URL field
if (pField)
{
pObj = aVEvt.pObj;
@@ -484,7 +455,7 @@ aktuelle Zeichenvorlage anzeigen?
}
if (bWeiter && eHit == SDRHIT_TEXTEDIT)
{
- // URL-Feld in zum Editieren ge?ffneten DrawText-Objekt suchen
+ // look for URL field in DrawText object that is opened for editing
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
const SvxFieldItem* pFieldItem;
@@ -540,16 +511,6 @@ void SwEditWin::PrePaint()
void SwEditWin::Paint(const Rectangle& rRect)
{
-#if defined(MYDEBUG)
- // StartUp-Statistik
- if ( pTickList )
- {
- SYSTICK( "Start SwEditWin::Paint" );
- READ_FIRST_TICKS()
- FLUSH_TICKS()
- }
-#endif
-
SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
if(!pWrtShell)
return;
@@ -557,28 +518,19 @@ void SwEditWin::Paint(const Rectangle& rRect)
if( pShadCrsr )
{
Rectangle aRect( pShadCrsr->GetRect());
- // liegt vollstaendig drin?
+ // fully resides inside?
if( rRect.IsInside( aRect ) )
// dann aufheben
delete pShadCrsr, pShadCrsr = 0;
else if( rRect.IsOver( aRect ))
{
- // liegt irgendwie drueber, dann ist alles ausserhalb geclippt
- // und wir muessen den "inneren Teil" am Ende vom Paint
- // wieder sichtbar machen. Sonst kommt es zu Paintfehlern!
+ // resides somewhat above, then everything is clipped outside
+ // and we have to make the "inner part" at the end of the
+ // Paint visible again. Otherwise Paint errors occur!
bPaintShadowCrsr = sal_True;
}
}
-/*
- //TODO/LATER: what's the replacement for this? Do we need it?
- SwDocShell* pDocShell = GetView().GetDocShell();
-
- SvInPlaceEnvironment *pIpEnv = pDocShell ?
- pDocShell->GetIPEnv() : 0;
- if ( pIpEnv && pIpEnv->GetRectsChangedLockCount() )
- //Wir stehen in Groessenverhandlungen (MM), Paint verzoegern
- Invalidate( rRect );
- else */
+
if ( GetView().GetVisArea().GetWidth() <= 0 ||
GetView().GetVisArea().GetHeight() <= 0 )
Invalidate( rRect );
@@ -590,3 +542,4 @@ void SwEditWin::Paint(const Rectangle& rRect)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/edtwin3.cxx b/sw/source/ui/docvw/edtwin3.cxx
index 1d0699e5cd81..34b4103d7537 100644
--- a/sw/source/ui/docvw/edtwin3.cxx
+++ b/sw/source/ui/docvw/edtwin3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,7 +51,7 @@
/*--------------------------------------------------------------------
- Beschreibung: Core-Notify
+ Description: Core-Notify
--------------------------------------------------------------------*/
@@ -64,7 +65,7 @@ void ScrollMDI( ViewShell* pVwSh, const SwRect &rRect,
}
/*--------------------------------------------------------------------
- Beschreibung: Docmdi - verschiebbar
+ Description: Docmdi - movable
--------------------------------------------------------------------*/
@@ -78,7 +79,7 @@ sal_Bool IsScrollMDI( ViewShell* pVwSh, const SwRect &rRect )
}
/*--------------------------------------------------------------------
- Beschreibung: Notify fuer Groessen-Aenderung
+ Description: Notify for size change
--------------------------------------------------------------------*/
@@ -96,7 +97,7 @@ void SizeNotify(ViewShell* pVwSh, const Size &rSize)
}
/*--------------------------------------------------------------------
- Beschreibung: Notify fuer Seitenzahl-Update
+ Description: Notify for page number update
--------------------------------------------------------------------*/
@@ -111,10 +112,8 @@ void PageNumNotify( ViewShell* pVwSh, sal_uInt16 nPhyNum, sal_uInt16 nVirtNum,
}
/******************************************************************************
- * Methode : void FrameNotify( DocMDIBase *pWin, FlyMode eMode )
- * Beschreibung:
- * Erstellt : OK 08.02.94 13:49
- * Aenderung :
+ * Method : void FrameNotify( DocMDIBase *pWin, FlyMode eMode )
+ * Description:
******************************************************************************/
@@ -126,7 +125,7 @@ void FrameNotify( ViewShell* pVwSh, FlyMode eMode )
}
/*--------------------------------------------------------------------
- Beschreibung: Notify fuer Seitenzahl-Update
+ Description: Notify for page number update
--------------------------------------------------------------------*/
sal_Bool SwEditWin::RulerColumnDrag( const MouseEvent& rMEvt, sal_Bool bVerticalMode)
{
@@ -137,7 +136,7 @@ sal_Bool SwEditWin::RulerColumnDrag( const MouseEvent& rMEvt, sal_Bool bVertical
}
// #i23726#
-// --> OD 2005-02-18 #i42921# - add 3rd parameter <bVerticalMode> in order
+// #i42921# - add 3rd parameter <bVerticalMode> in order
// to consider vertical layout
sal_Bool SwEditWin::RulerMarginDrag( const MouseEvent& rMEvt,
const bool bVerticalMode )
@@ -145,7 +144,6 @@ sal_Bool SwEditWin::RulerMarginDrag( const MouseEvent& rMEvt,
SvxRuler& rRuler = bVerticalMode ? rView.GetVLineal() : rView.GetHLineal();
return !rRuler.StartDocDrag( rMEvt, RULER_TYPE_INDENT);
}
-// <--
LAYOUT_NS Dialog* GetSearchDialog()
{
@@ -178,8 +176,8 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
Window::DataChanged( rDCEvt );
SwWrtShell* pSh = GetView().GetWrtShellPtr();
- //#99906# DataChanged() is sometimes called prior to creating
- // the SwWrtShell
+ // DataChanged() is sometimes called prior to creating
+ // the SwWrtShell
if(!pSh)
return;
sal_Bool bViewWasLocked = pSh->IsViewLocked(), bUnlockPaint = sal_False;
@@ -187,16 +185,16 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
switch( rDCEvt.GetType() )
{
case DATACHANGED_SETTINGS:
- // ScrollBars neu anordnen bzw. Resize ausloesen, da sich
- // ScrollBar-Groesse geaendert haben kann. Dazu muss dann im
- // Resize-Handler aber auch die Groesse der ScrollBars aus
- // den Settings abgefragt werden.
+ // rearrange ScrollBars, respectively trigger resize, because
+ // the ScrollBar size can have change. For that, in the reset
+ // handler, the size of the ScrollBars also has to be queried
+ // from the settings.
if( rDCEvt.GetFlags() & SETTINGS_STYLE )
{
pSh->LockPaint();
bUnlockPaint = sal_True;
ViewShell::DeleteReplacementBitmaps();
- GetView().InvalidateBorder(); //Scrollbarbreiten
+ GetView().InvalidateBorder(); //Scrollbar work
}
break;
@@ -206,7 +204,7 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
case DATACHANGED_FONTSUBSTITUTION:
pSh->LockPaint();
bUnlockPaint = sal_True;
- GetView().GetDocShell()->UpdateFontList(); //z.B. Druckerwechsel
+ GetView().GetDocShell()->UpdateFontList(); //e.g. printer change
break;
}
pSh->LockView( bViewWasLocked );
@@ -214,3 +212,4 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
pSh->UnlockPaint();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/extedit.cxx b/sw/source/ui/docvw/extedit.cxx
new file mode 100644
index 000000000000..73046addddcb
--- /dev/null
+++ b/sw/source/ui/docvw/extedit.cxx
@@ -0,0 +1,150 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * [ Surendran Mahendran <surenspost@gmail.com>]
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#include "precompiled_sw.hxx"
+#include <extedit.hxx>
+#include <view.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/bindings.hxx>
+#include <wrtsh.hxx>
+#include <osl/file.hxx>
+#include <osl/thread.hxx>
+#include <osl/process.h>
+#include <osl/time.h>
+#include <svtools/filter.hxx>
+#include <svtools/filechangedchecker.hxx>
+#include <svx/xoutbmp.hxx>
+#include <unotools/ucbstreamhelper.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/graph.hxx>
+#include <vcl/cvtgrf.hxx>
+#include <basesh.hxx>
+#include "romenu.hxx"
+#include "com/sun/star/system/XSystemShellExecute.hpp"
+#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
+#include <comphelper/processfactory.hxx>
+
+#include <boost/bind.hpp>
+
+using namespace ::com::sun::star;
+
+void HandleCloseEvent(const String& rURL, SwWrtShell *rSh)
+{
+ //create a new Graphic
+ Graphic newGraphic;
+
+ //import the temp file image stream into the newGraphic
+ SvStream* pStream = utl::UcbStreamHelper::CreateStream(rURL, STREAM_READ);
+ if(pStream)
+ {
+ GraphicConverter::Import(*pStream, newGraphic);
+
+ // Now update the Graphic in the shell by re-reading from the newGraphic
+ // TODO: Make this action Undoable !
+ rSh->ReRead(aEmptyStr, aEmptyStr, (const Graphic*) &newGraphic);
+
+ delete(pStream);
+ }
+}
+
+IMPL_LINK (ExternalProcessClass_Impl, StartListeningEvent, void*, pEvent)
+{
+ //Start an event listener implemented via VCL timeout
+ Data *pData = ( Data* )pEvent;
+ String aURL( pData->fileName );
+
+ new FileChangedChecker(
+ pData->fileName,
+ ::boost::bind(&HandleCloseEvent,aURL,pData->rSh));
+
+ return 0;
+}
+
+void pWorker(void *pThreadData)
+{
+ Data *pData = (Data*)(pThreadData);
+ rtl_uString *aFileName = new rtl_uString();
+ rtl_uString_newFromAscii (
+ &aFileName, rtl::OUStringToOString(
+ pData->fileName, RTL_TEXTENCODING_UTF8).getStr());
+
+ // Make an asynchronous call to listen to the event of temporary image file
+ // getting changed
+ Application::PostUserEvent(
+ LINK(NULL, ExternalProcessClass_Impl, StartListeningEvent), pThreadData);
+
+ uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
+ ::comphelper::getProcessServiceFactory()->createInstance(
+ DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), uno::UNO_QUERY_THROW );
+ xSystemShellExecute->execute( pData->fileName, rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
+}
+
+void EditWithExternalTool(GraphicObject *pGraphicObject, SwWrtShell *rSh)
+{
+ //Get the graphic from the GraphicObject
+ const Graphic pGraphic = pGraphicObject->GetGraphic();
+
+ //get the Preferred File Extension for this graphic
+ String fExt;
+ GetPreferedExtension(fExt, pGraphic);
+
+ //Create the temp File
+ rtl::OUString tempFileBase, tempFileName;
+ oslFileHandle pHandle;
+ osl::FileBase::createTempFile(0, &pHandle, &tempFileBase);
+
+ // Move it to a file name with image extension properly set
+ tempFileName = tempFileBase + rtl::OUString(String('.')) +
+ rtl::OUString(fExt);
+ osl::File::move(tempFileBase, tempFileName);
+
+ //Write Graphic to the Temp File
+ GraphicFilter& rGF = *GraphicFilter::GetGraphicFilter();
+ sal_uInt16 nFilter(rGF.GetExportFormatNumber(fExt));
+ String aFilter(rGF.GetExportFormatShortName(nFilter));
+ String sPath(tempFileName.getStr());
+
+ // Write the Graphic to the file now
+ XOutBitmap::WriteGraphic(pGraphic, sPath, aFilter,
+ XOUTBMP_USE_NATIVE_IF_POSSIBLE|XOUTBMP_DONT_EXPAND_FILENAME);
+
+ // There is a possiblity that sPath extnesion might have been changed if the
+ // provided extension is not writable
+ tempFileName = rtl::OUString(sPath);
+
+ //Create a thread
+ rtl_uString *fileName = new rtl_uString();
+ rtl_uString_newFromAscii(
+ &fileName, rtl::OUStringToOString(tempFileName,
+ RTL_TEXTENCODING_UTF8).getStr());
+
+ // Create the data that is needed by the thread later
+ Data *pThreadData = new Data();
+ pThreadData->pGraphicObject = pGraphicObject;
+ pThreadData->fileName = fileName;
+ pThreadData->rSh = rSh ;
+
+ osl_createThread(pWorker, pThreadData);
+
+}
diff --git a/sw/source/ui/docvw/frmsidebarwincontainer.cxx b/sw/source/ui/docvw/frmsidebarwincontainer.cxx
index b5e406dcf69b..29a4d4012b59 100644
--- a/sw/source/ui/docvw/frmsidebarwincontainer.cxx
+++ b/sw/source/ui/docvw/frmsidebarwincontainer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -214,3 +212,5 @@ void SwFrmSidebarWinContainer::getAll( const SwFrm& rFrm,
}
} } // eof of namespace sw::sidebarwindows::
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/frmsidebarwincontainer.hxx b/sw/source/ui/docvw/frmsidebarwincontainer.hxx
index 1583f36a0bb6..4df59c86d180 100644
--- a/sw/source/ui/docvw/frmsidebarwincontainer.hxx
+++ b/sw/source/ui/docvw/frmsidebarwincontainer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -71,3 +69,4 @@ class SwFrmSidebarWinContainer
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx
index 681eab61dee9..569c41be48c0 100644
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,7 +65,6 @@
#include <cmdid.h>
#include <helpid.h>
#include <docvw.hrc>
-#include <docvw.hrc>
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
@@ -76,20 +76,29 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::ui::dialogs;
using namespace ::sfx2;
-SwReadOnlyPopup::~SwReadOnlyPopup()
+void GetPreferedExtension( String &rExt, const Graphic &rGrf )
{
- String *pDel = (String*)aThemeList.First();
- while ( pDel )
+ // then propose the "best" filter using the native-info, if applicable
+ const sal_Char* pExt = "png";
+ switch( const_cast<Graphic&>(rGrf).GetLink().GetType() )
{
- delete pDel;
- pDel = (String*)aThemeList.Next();
+ case GFX_LINK_TYPE_NATIVE_GIF: pExt = "gif"; break;
+ case GFX_LINK_TYPE_NATIVE_TIF: pExt = "tif"; break;
+ case GFX_LINK_TYPE_NATIVE_WMF: pExt = "wmf"; break;
+ case GFX_LINK_TYPE_NATIVE_MET: pExt = "met"; break;
+ case GFX_LINK_TYPE_NATIVE_PCT: pExt = "pct"; break;
+ case GFX_LINK_TYPE_NATIVE_JPG: pExt = "jpg"; break;
+ default:; //prevent warning
}
+ rExt.AssignAscii( pExt );
+}
+
+SwReadOnlyPopup::~SwReadOnlyPopup()
+{
delete pImageMap;
delete pTargetURL;
}
-
-
void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rDis )
{
SfxPoolItem *_pItem = 0;
@@ -162,22 +171,22 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
}
}
- sal_Bool bEnableGraphicToGallery;
- if ( sal_True == (bEnableGraphicToGallery = bLink) )
+ bool bEnableGraphicToGallery = bLink;
+ if ( bEnableGraphicToGallery )
{
- GalleryExplorer::FillThemeList( aThemeList );
- if ( aThemeList.Count() )
+ if (GalleryExplorer::FillThemeList( aThemeList ))
{
PopupMenu *pMenu = GetPopupMenu(MN_READONLY_GRAPHICTOGALLERY);
pMenu->CheckItem( MN_READONLY_TOGALLERYLINK, bGrfToGalleryAsLnk );
pMenu->CheckItem( MN_READONLY_TOGALLERYCOPY, !bGrfToGalleryAsLnk );
- for ( sal_uInt16 i=0; i < aThemeList.Count(); ++i )
- pMenu->InsertItem( MN_READONLY_GRAPHICTOGALLERY+i + 3,
- *(String*)aThemeList.GetObject( i ) );
+
+ for ( sal_uInt16 i=0; i < aThemeList.size(); ++i )
+ pMenu->InsertItem( MN_READONLY_GRAPHICTOGALLERY+i + 3, aThemeList[ i ] );
}
else
- bEnableGraphicToGallery = sal_False;
+ bEnableGraphicToGallery = false;
}
+
EnableItem( MN_READONLY_GRAPHICTOGALLERY, bEnableGraphicToGallery );
SfxViewFrame * pVFrame = rV.GetViewFrame();
@@ -192,17 +201,18 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
bEnableBack = sal_True;
if ( pItem->GetGraphicLink() )
{
- if ( !aThemeList.Count() )
+ if ( aThemeList.empty() )
GalleryExplorer::FillThemeList( aThemeList );
- if ( aThemeList.Count() )
+
+ if ( !aThemeList.empty() )
{
PopupMenu *pMenu = GetPopupMenu(MN_READONLY_BACKGROUNDTOGALLERY);
pMenu->CheckItem( MN_READONLY_TOGALLERYLINK, bGrfToGalleryAsLnk );
pMenu->CheckItem( MN_READONLY_TOGALLERYCOPY, !bGrfToGalleryAsLnk );
bEnableBackGallery = sal_True;
- for ( sal_uInt16 i=0; i < aThemeList.Count(); ++i )
- pMenu->InsertItem( MN_READONLY_BACKGROUNDTOGALLERY+i + 3,
- *(String*)aThemeList.GetObject( i ) );
+
+ for ( sal_uInt16 i=0; i < aThemeList.size(); ++i )
+ pMenu->InsertItem( MN_READONLY_GRAPHICTOGALLERY+i + 3, aThemeList[ i ] );
}
}
}
@@ -292,10 +302,8 @@ void SwReadOnlyPopup::Execute( Window* pWin, sal_uInt16 nId )
sTmp = SaveGraphic( nSaveId );
if ( sTmp.Len() )
- {
- String sThemeName( *(String*)aThemeList.GetObject( nId ));
- GalleryExplorer::InsertURL( sThemeName, sTmp );
- }
+ GalleryExplorer::InsertURL( aThemeList[nId], sTmp );
+
return;
}
@@ -377,29 +385,11 @@ void SwReadOnlyPopup::Execute( Window* pWin, sal_uInt16 nId )
pClipCntnr->CopyToClipboard( pWin );
}
}
-static void lcl_GetPreferedExtension( String &rExt, const Graphic &rGrf )
-{
- // dann ggfs. ueber die native-Info der Grafik den "besten"
- // Filter vorschlagen
- const sal_Char* pExt = "png";
- switch( const_cast<Graphic&>(rGrf).GetLink().GetType() )
- {
- case GFX_LINK_TYPE_NATIVE_GIF: pExt = "gif"; break;
- case GFX_LINK_TYPE_NATIVE_TIF: pExt = "tif"; break;
- case GFX_LINK_TYPE_NATIVE_WMF: pExt = "wmf"; break;
- case GFX_LINK_TYPE_NATIVE_MET: pExt = "met"; break;
- case GFX_LINK_TYPE_NATIVE_PCT: pExt = "pct"; break;
- case GFX_LINK_TYPE_NATIVE_JPG: pExt = "jpg"; break;
- default:; //prevent warning
- }
- rExt.AssignAscii( pExt );
-}
-
String SwReadOnlyPopup::SaveGraphic( sal_uInt16 nId )
{
- //Namen der Grafik herausfischen.
+ // fish out the graphic's name
String aName;
if ( MN_READONLY_SAVEBACKGROUND == nId )
{
@@ -427,11 +417,10 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_SIMPLE, 0 );
Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
-// aExpDlg.SetHelpId(HID_FILEDLG_ROMENU);
INetURLObject aPath;
aPath.SetSmartURL( sGrfPath );
- //Namen der Grafik herausfischen.
+ // fish out the graphic's name
String aName = rGrfName;
aDlgHelper.SetTitle( SW_RESSTR(STR_EXPORT_GRAFIK_TITLE));
@@ -445,7 +434,7 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
String aExt( aURL.GetExtension() );
if( !aExt.Len() )
- lcl_GetPreferedExtension( aExt, rGraphic );
+ GetPreferedExtension( aExt, rGraphic );
aExt.ToLowerAscii();
sal_uInt16 nDfltFilter = USHRT_MAX;
@@ -460,8 +449,8 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
}
if ( USHRT_MAX == nDfltFilter )
{
- //"falsche" Extension?
- lcl_GetPreferedExtension( aExt, rGraphic );
+ // "wrong" extension?
+ GetPreferedExtension( aExt, rGraphic );
for ( sal_uInt16 i = 0; i < nCount; ++i )
if ( aExt == rGF.GetExportFormatShortName( i ).ToLowerAscii() )
{
@@ -477,14 +466,14 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
if( aDlgHelper.Execute() == ERRCODE_NONE )
{
String sPath( xFP->getFiles().getConstArray()[0] );
- //verwendeten Pfad merken - bitte nicht wieder wegoptimieren!
+ // remember used path - please don't optimize away!
aPath.SetSmartURL( sPath);
sGrfPath = aPath.GetPath();
if( rGrfName.Len() &&
nDfltFilter == rGF.GetExportFormatNumber( xFltMgr->getCurrentFilter()))
{
- //Versuchen die Originalgrafik zu speichern.
+ // try to save the original graphic
SfxMedium aIn( rGrfName, STREAM_READ | STREAM_NOCREATE,
sal_True );
if( aIn.GetInStream() && !aIn.GetInStream()->GetError() )
@@ -521,3 +510,4 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/romenu.hxx b/sw/source/ui/docvw/romenu.hxx
index db532a709264..25440ee8be79 100644
--- a/sw/source/ui/docvw/romenu.hxx
+++ b/sw/source/ui/docvw/romenu.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,14 +28,9 @@
#ifndef _ROMENU_HXX
#define _ROMENU_HXX
-
-#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
-#endif
-#include <tools/list.hxx>
-#ifndef _MENU_HXX //autogen
#include <vcl/menu.hxx>
-#endif
+#include <svl/stritem.hxx>
class SwView;
class SfxDispatcher;
@@ -52,7 +48,7 @@ class SwReadOnlyPopup : public PopupMenu
sTargetFrameName,
sDescription,
sGrfName;
- List aThemeList;
+ std::vector<String> aThemeList;
sal_Bool bGrfToGalleryAsLnk;
ImageMap* pImageMap;
INetImage* pTargetURL;
@@ -70,6 +66,8 @@ public:
void Execute( Window* pWin, sal_uInt16 nId );
};
+void GetPreferedExtension( String &rExt, const Graphic &rGrf );
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index 34c9711bd01b..0bb32d17affa 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,18 +31,12 @@
#include <hintids.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <svtools/textview.hxx>
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
-#ifndef _SCRBAR_HXX //autogen
#include <vcl/scrbar.hxx>
-#endif
#include <sfx2/dispatch.hxx>
#include <sfx2/app.hxx>
#include <svtools/htmltokn.h>
@@ -53,15 +48,9 @@
#include <svtools/ctrltool.hxx>
#include <tools/time.hxx>
#include <swmodule.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
-#ifndef _SRCVIEW_HXX
#include <srcview.hxx>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#include <deque>
@@ -79,7 +68,6 @@ struct SwTextPortion
typedef std::deque<SwTextPortion> SwTextPortions;
-
static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
{
const sal_Unicode cOpenBracket = '<';
@@ -94,10 +82,10 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
const sal_uInt16 nStrLen = rSource.Len();
- sal_uInt16 nInsert = 0; // Number of inserted Portions
- sal_uInt16 nActPos = 0; // Position, at the '<' was found
- sal_uInt16 nOffset = 0; // Offset of nActPos for '<'
- sal_uInt16 nPortStart = USHRT_MAX; // For the TextPortion
+ sal_uInt16 nInsert = 0; // number of inserted portions
+ sal_uInt16 nActPos = 0; // position, where '<' was found
+ sal_uInt16 nOffset = 0; // Offset of nActPos to '<'
+ sal_uInt16 nPortStart = USHRT_MAX; // for the TextPortion
sal_uInt16 nPortEnd = 0; //
SwTextPortion aText;
while(nActPos < nStrLen)
@@ -105,11 +93,11 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
svtools::ColorConfigEntry eFoundType = svtools::HTMLUNKNOWN;
if(rSource.GetChar(nActPos) == cOpenBracket && nActPos < nStrLen - 2 )
{
- // 'leere' Portion einfuegen
+ // insert 'empty' portion
if(nPortEnd < nActPos - 1 )
{
aText.nLine = 0;
- // am Anfang nicht verschieben
+ // don't move at the beginning
aText.nStart = nPortEnd;
if(nInsert)
aText.nStart += 1;
@@ -122,7 +110,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
sal_Unicode cFollowNext = rSource.GetChar((xub_StrLen)(nActPos + 2));
if(cExclamation == cFollowFirst)
{
- // "<!" SGML oder Kommentar
+ // "<!" SGML or comment
if(cMinus == cFollowNext &&
nActPos < nStrLen - 3 && cMinus == rSource.GetChar((xub_StrLen)(nActPos + 3)))
{
@@ -135,14 +123,14 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
}
else if(cSlash == cFollowFirst)
{
- // "</" Slash ignorieren
+ // "</" ignore slash
nPortStart = nActPos;
nActPos++;
nOffset++;
}
if(svtools::HTMLUNKNOWN == eFoundType)
{
- //jetzt koennte hier ein keyword folgen
+ // now here a keyword could follow
sal_uInt16 nSrchPos = nActPos;
while(++nSrchPos < nStrLen - 1)
{
@@ -159,29 +147,29 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
}
if(nSrchPos > nActPos + 1)
{
- //irgend ein String wurde gefunden
+ // some string was found
String sToken = rSource.Copy(nActPos + 1, nSrchPos - nActPos - 1 );
sToken.ToUpperAscii();
int nToken = ::GetHTMLToken(sToken);
if(nToken)
{
- //Token gefunden
+ // Token was found
eFoundType = svtools::HTMLKEYWORD;
nPortEnd = nSrchPos;
nPortStart = nActPos;
}
else
{
- //was war das denn?
+ // what was that?
#if OSL_DEBUG_LEVEL > 1
- DBG_ERROR("Token nicht erkannt!");
- DBG_ERROR(ByteString(sToken, gsl_getSystemTextEncoding()).GetBuffer());
+ OSL_ENSURE(false, "Token not recognised!");
+ OSL_ENSURE(false, ByteString(sToken, gsl_getSystemTextEncoding()).GetBuffer());
#endif
}
}
}
- // jetzt muss noch '>' gesucht werden
+ // now we still have to look for '>'
if(svtools::HTMLUNKNOWN != eFoundType)
{
sal_Bool bFound = sal_False;
@@ -194,7 +182,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
}
if(!bFound && (eFoundType == svtools::HTMLCOMMENT))
{
- // Kommentar ohne Ende in dieser Zeile
+ // comment without ending in this line
bFound = sal_True;
nPortEnd = nStrLen - 1;
}
@@ -226,11 +214,6 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) :
Window( pParent, WB_BORDER|WB_CLIPCHILDREN ),
@@ -253,9 +236,7 @@ SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) :
CreateTextEngine();
pSourceViewConfig->AddListener(this);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
+
SwSrcEditWindow::~SwSrcEditWindow()
{
pSourceViewConfig->RemoveListener(this);
@@ -275,10 +256,6 @@ SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) :
delete pOutWin;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwSrcEditWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
Window::DataChanged( rDCEvt );
@@ -286,10 +263,10 @@ void SwSrcEditWindow::DataChanged( const DataChangedEvent& rDCEvt )
switch ( rDCEvt.GetType() )
{
case DATACHANGED_SETTINGS:
- // ScrollBars neu anordnen bzw. Resize ausloesen, da sich
- // ScrollBar-Groesse geaendert haben kann. Dazu muss dann im
- // Resize-Handler aber auch die Groesse der ScrollBars aus
- // den Settings abgefragt werden.
+ // newly rearrange ScrollBars or trigger Resize, because
+ // ScrollBar size could have changed. For this, in the
+ // Resize handler the size of ScrollBars has to be queried
+ // from the settings as well.
if( rDCEvt.GetFlags() & SETTINGS_STYLE )
Resize();
break;
@@ -298,7 +275,7 @@ void SwSrcEditWindow::DataChanged( const DataChangedEvent& rDCEvt )
void SwSrcEditWindow::Resize()
{
- // ScrollBars, etc. passiert in Adjust...
+ // ScrollBars, etc. happens in Adjust...
if ( pTextView )
{
long nVisY = pTextView->GetStartDocPos().Y();
@@ -330,7 +307,7 @@ void SwSrcEditWindow::Resize()
pOutWin->SetOutputSizePixel(aOutSz);
InitScrollBars();
- // Zeile im ersten Resize setzen
+ // set line in first Resize
if(USHRT_MAX != nStartLine)
{
if(nStartLine < pTextEngine->GetParagraphCount())
@@ -348,10 +325,6 @@ void SwSrcEditWindow::Resize()
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void TextViewOutWin::DataChanged( const DataChangedEvent& rDCEvt )
{
Window::DataChanged( rDCEvt );
@@ -359,7 +332,7 @@ void TextViewOutWin::DataChanged( const DataChangedEvent& rDCEvt )
switch( rDCEvt.GetType() )
{
case DATACHANGED_SETTINGS:
- // den Settings abgefragt werden.
+ // query settings
if( rDCEvt.GetFlags() & SETTINGS_STYLE )
{
const Color &rCol = GetSettings().GetStyleSettings().GetWindowColor();
@@ -378,11 +351,6 @@ void TextViewOutWin::MouseMove( const MouseEvent &rEvt )
pTextView->MouseMove( rEvt );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void TextViewOutWin::MouseButtonUp( const MouseEvent &rEvt )
{
if ( pTextView )
@@ -395,11 +363,6 @@ void TextViewOutWin::MouseButtonUp( const MouseEvent &rEvt )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void TextViewOutWin::MouseButtonDown( const MouseEvent &rEvt )
{
GrabFocus();
@@ -407,11 +370,6 @@ void TextViewOutWin::MouseButtonDown( const MouseEvent &rEvt )
pTextView->MouseButtonDown( rEvt );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void TextViewOutWin::Command( const CommandEvent& rCEvt )
{
switch(rCEvt.GetCommand())
@@ -440,12 +398,6 @@ void TextViewOutWin::Command( const CommandEvent& rCEvt )
}
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void TextViewOutWin::KeyInput( const KeyEvent& rKEvt )
{
sal_Bool bDone = sal_False;
@@ -484,21 +436,11 @@ void TextViewOutWin::KeyInput( const KeyEvent& rKEvt )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void TextViewOutWin::Paint( const Rectangle& rRect )
{
pTextView->Paint( rRect );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwSrcEditWindow::CreateTextEngine()
{
const Color &rCol = GetSettings().GetStyleSettings().GetWindowColor();
@@ -507,14 +449,14 @@ void SwSrcEditWindow::CreateTextEngine()
pOutWin->SetPointer(Pointer(POINTER_TEXT));
pOutWin->Show();
- //Scrollbars anlegen
+ // create Scrollbars
pHScrollbar = new ScrollBar(this, WB_3DLOOK |WB_HSCROLL|WB_DRAG);
- pHScrollbar->EnableRTL( false ); // #107300# --- RTL --- no mirroring for scrollbars
+ pHScrollbar->EnableRTL( false ); // --- RTL --- no mirroring for scrollbars
pHScrollbar->SetScrollHdl(LINK(this, SwSrcEditWindow, ScrollHdl));
pHScrollbar->Show();
pVScrollbar = new ScrollBar(this, WB_3DLOOK |WB_VSCROLL|WB_DRAG);
- pVScrollbar->EnableRTL( false ); // #107300# --- RTL --- no mirroring for scrollbars
+ pVScrollbar->EnableRTL( false ); // --- RTL --- no mirroring for scrollbars
pVScrollbar->SetScrollHdl(LINK(this, SwSrcEditWindow, ScrollHdl));
pHScrollbar->EnableDrag();
pVScrollbar->Show();
@@ -548,31 +490,16 @@ void SwSrcEditWindow::CreateTextEngine()
SfxBindings& rBind = GetSrcView()->GetViewFrame()->GetBindings();
rBind.Invalidate( SID_TABLE_CELL );
-// rBind.Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwSrcEditWindow::SetScrollBarRanges()
{
- // Extra-Methode, nicht InitScrollBars, da auch fuer TextEngine-Events.
+ // Extra method, not InitScrollBars, because also for TextEngine events.
pHScrollbar->SetRange( Range( 0, nCurTextWidth-1 ) );
pVScrollbar->SetRange( Range(0, pTextEngine->GetTextHeight()-1) );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwSrcEditWindow::InitScrollBars()
{
SetScrollBarRanges();
@@ -589,11 +516,6 @@ void SwSrcEditWindow::InitScrollBars()
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
IMPL_LINK(SwSrcEditWindow, ScrollHdl, ScrollBar*, pScroll)
{
if(pScroll == pVScrollbar)
@@ -614,20 +536,15 @@ IMPL_LINK(SwSrcEditWindow, ScrollHdl, ScrollBar*, pScroll)
return 0;
}
-/*-----------------15.01.97 09.22-------------------
-
---------------------------------------------------*/
-
IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
{
Time aSyntaxCheckStart;
- DBG_ASSERT( pTextView, "Noch keine View, aber Syntax-Highlight ?!" );
- // pTextEngine->SetUpdateMode( sal_False );
+ OSL_ENSURE( pTextView, "Noch keine View, aber Syntax-Highlight ?!" );
bHighlighting = sal_True;
sal_uInt16 nLine;
sal_uInt16 nCount = 0;
- // zuerst wird der Bereich um dem Cursor bearbeitet
+ // at first the region around the cursor is processed
TextSelection aSel = pTextView->GetSelection();
sal_uInt16 nCur = (sal_uInt16)aSel.GetStart().GetPara();
if(nCur > 40)
@@ -653,7 +570,7 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
}
}
- // wenn dann noch etwas frei ist, wird von Beginn an weitergearbeitet
+ // when there is still anything left by then, go on from the beginning
void* p = aSyntaxLineTable.First();
while ( p && nCount < MAX_SYNTAX_HIGHLIGHT)
{
@@ -669,21 +586,11 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
break;
}
}
- // os: #43050# hier wird ein TextView-Problem umpopelt:
- // waehrend des Highlightings funktionierte das Scrolling nicht
- /* MT: Shouldn't be a oproblem any more, using IdeFormatter in Insert/RemoveAttrib now.
-
- TextView* pTmp = pTextEngine->GetActiveView();
- pTextEngine->SetActiveView(0);
- // pTextEngine->SetUpdateMode( sal_True );
- pTextEngine->SetActiveView(pTmp);
- pTextView->ShowCursor(sal_False, sal_False);
- */
if(aSyntaxLineTable.Count() && !pTimer->IsActive())
pTimer->Start();
- // SyntaxTimerHdl wird gerufen, wenn Text-Aenderung
- // => gute Gelegenheit, Textbreite zu ermitteln!
+ // SyntaxTimerHdl is called when text changed
+ // => good opportunity to determine text width!
long nPrevTextWidth = nCurTextWidth;
nCurTextWidth = pTextEngine->CalcTextWidth() + 25; // kleine Toleranz
if ( nCurTextWidth != nPrevTextWidth )
@@ -692,14 +599,11 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
return 0;
}
-/*-----------------15.01.97 10.01-------------------
-
---------------------------------------------------*/
void SwSrcEditWindow::DoSyntaxHighlight( sal_uInt16 nPara )
{
- // Durch das DelayedSyntaxHighlight kann es passieren,
- // dass die Zeile nicht mehr existiert!
+ // Because of DelayedSyntaxHighlight it could happen,
+ // that the line doesn't exist anymore!
if ( nPara < pTextEngine->GetParagraphCount() )
{
sal_Bool bTempModified = IsModified();
@@ -707,14 +611,11 @@ void SwSrcEditWindow::DoSyntaxHighlight( sal_uInt16 nPara )
String aSource( pTextEngine->GetText( nPara ) );
pTextEngine->SetUpdateMode( sal_False );
ImpDoHighlight( aSource, nPara );
- // os: #43050# hier wird ein TextView-Problem umpopelt:
- // waehrend des Highlightings funktionierte das Scrolling nicht
TextView* pTmp = pTextEngine->GetActiveView();
pTmp->SetAutoScroll(sal_False);
pTextEngine->SetActiveView(0);
pTextEngine->SetUpdateMode( sal_True );
pTextEngine->SetActiveView(pTmp);
- // Bug 72887 show the cursor
pTmp->SetAutoScroll(sal_True);
pTmp->ShowCursor( sal_False/*pTmp->IsAutoScroll()*/ );
@@ -723,10 +624,6 @@ void SwSrcEditWindow::DoSyntaxHighlight( sal_uInt16 nPara )
}
}
-/*-----------------15.01.97 09.49-------------------
-
---------------------------------------------------*/
-
void SwSrcEditWindow::DoDelayedSyntaxHighlight( sal_uInt16 nPara )
{
if ( !bHighlighting && bDoSyntaxHighlight )
@@ -736,10 +633,6 @@ void SwSrcEditWindow::DoDelayedSyntaxHighlight( sal_uInt16 nPara )
}
}
-/*-----------------15.01.97 11.32-------------------
-
---------------------------------------------------*/
-
void SwSrcEditWindow::ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff )
{
SwTextPortions aPortionList;
@@ -750,7 +643,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff
return;
SwTextPortion& rLast = aPortionList[nCount-1];
- if ( rLast.nStart > rLast.nEnd ) // Nur bis Bug von MD behoeben
+ if ( rLast.nStart > rLast.nEnd ) // Only until Bug from MD is resolved
{
nCount--;
aPortionList.pop_back();
@@ -758,32 +651,31 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff
return;
}
- // Evtl. Optimieren:
- // Wenn haufig gleiche Farbe, dazwischen Blank ohne Farbe,
- // ggf. zusammenfassen, oder zumindest das Blank,
- // damit weniger Attribute
+ // maybe optimize:
+ // If frequently the same color, blank without color in between,
+ // maybe summarize or at least the blank; for less attributes
sal_Bool bOptimizeHighlight = sal_True; // war in der BasicIDE static
if ( bOptimizeHighlight )
{
- // Es muessen nur die Blanks und Tabs mit attributiert werden.
- // Wenn zwei gleiche Attribute hintereinander eingestellt werden,
- // optimiert das die TextEngine.
+ // Only blanks and tabs have to be attributed along.
+ // When two identical attributes are placed consecutively,
+ // it optimises the TextEngine.
sal_uInt16 nLastEnd = 0;
-#ifdef DBG_UTIL
- sal_uInt16 nLine = aPortionList[0].nLine;
-#endif
for ( size_t i = 0; i < nCount; i++ )
{
SwTextPortion& r = aPortionList[i];
- DBG_ASSERT( r.nLine == nLine, "doch mehrere Zeilen ?" );
- if ( r.nStart > r.nEnd ) // Nur bis Bug von MD behoeben
+#if OSL_DEBUG_LEVEL > 1
+ sal_uInt16 nLine = aPortionList[0].nLine;
+ OSL_ENSURE( r.nLine == nLine, "doch mehrere Zeilen ?" );
+#endif
+ if ( r.nStart > r.nEnd ) // only until Bug from MD is resolved
continue;
if ( r.nStart > nLastEnd )
{
- // Kann ich mich drauf verlassen, dass alle ausser
- // Blank und Tab gehighlightet wird ?!
+ // Can I rely on the fact that all except blank and tab
+ // are being highlighted?!
r.nStart = nLastEnd;
}
nLastEnd = r.nEnd+1;
@@ -795,7 +687,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff
for ( size_t i = 0; i < aPortionList.size(); i++ )
{
SwTextPortion& r = aPortionList[i];
- if ( r.nStart > r.nEnd ) // Nur bis Bug von MD behoeben
+ if ( r.nStart > r.nEnd ) // only until Bug from MD is resolved
continue;
if(r.eType != svtools::HTMLSGML &&
r.eType != svtools::HTMLCOMMENT &&
@@ -808,10 +700,6 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff
}
}
-/*-----------------30.06.97 09:12-------------------
-
---------------------------------------------------*/
-
void SwSrcEditWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
if ( rHint.ISA( TextHint ) )
@@ -843,10 +731,6 @@ void SwSrcEditWindow::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdC
SetFont();
}
-/*-----------------30.06.97 13:22-------------------
-
---------------------------------------------------*/
-
void SwSrcEditWindow::Invalidate(sal_uInt16 )
{
pOutWin->Invalidate();
@@ -883,15 +767,6 @@ void SwSrcEditWindow::GetFocus()
pOutWin->GrabFocus();
}
-/*void SwSrcEditWindow::LoseFocus()
-{
- Window::LoseFocus();
-// pOutWin->LoseFocus();
-// rView.LostFocus();
-} */
-/* -----------------------------29.08.2002 13:21------------------------------
-
- ---------------------------------------------------------------------------*/
sal_Bool lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType aLanguages[])
{
switch(eEnc)
@@ -1048,8 +923,6 @@ sal_Bool lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType aLangu
case RTL_TEXTENCODING_TIS_620 :
aLanguages[0] = LANGUAGE_THAI;
break;
-// case RTL_TEXTENCODING_SYMBOL :
-// case RTL_TEXTENCODING_DONTKNOW: :
default: aLanguages[0] = Application::GetSettings().GetUILanguage();
}
return aLanguages[0] != LANGUAGE_SYSTEM;
@@ -1088,12 +961,11 @@ void SwSrcEditWindow::SetFont()
GetTextEngine()->SetFont( aFont );
pOutWin->SetFont(aFont);
}
-/* -----------------------------29.08.2002 13:47------------------------------
- ---------------------------------------------------------------------------*/
void SwSrcEditWindow::SetTextEncoding(rtl_TextEncoding eEncoding)
{
eSourceEncoding = eEncoding;
SetFont();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/envelp.src b/sw/source/ui/envelp/envelp.src
index 0381ad81d249..20cbcebff32a 100644
--- a/sw/source/ui/envelp/envelp.src
+++ b/sw/source/ui/envelp/envelp.src
@@ -26,7 +26,6 @@
************************************************************************/
// #pragma ******************************************************************
- // #include *****************************************************************
#include "envelp.hrc"
#include "globals.hrc"
// Strings ******************************************************************
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 328b7391ef46..705678104ffd 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,9 +33,6 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
-
-
#include <hintids.hxx>
#include <tools/pstm.hxx>
@@ -43,44 +41,30 @@
#define _SVSTDARR_LONGS
#include <svl/svstdarr.hxx>
#include <editeng/paperinf.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <editeng/tstpitem.hxx>
-#endif
#include <editeng/lrspitem.hxx>
#include <editeng/brshitem.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _MENU_HXX //autogen
#include <vcl/menu.hxx>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <frmatr.hxx>
#include <swtypes.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
#include <drpcps.hxx>
#include <envfmt.hxx>
#include <fmtcol.hxx>
-#ifndef _PARDLG_HXX
#include "swuipardlg.hxx"
-#endif
#include <pattern.hxx>
#include <poolfmt.hxx>
#include <uiborder.hxx>
#include <uitool.hxx>
-#ifndef _ENVFMT_HRC
#include <envfmt.hrc>
-#endif
+
+#include <vector>
#include "swabstdlg.hxx"
#include "chrdlg.hrc"
@@ -94,9 +78,6 @@ static PopupMenu *pMenu;
static long lUserW = 5669; // 10 cm
static long lUserH = 5669; // 10 cm
-// --------------------------------------------------------------------------
-
-
SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_ENV_FMT), rSet),
@@ -130,7 +111,7 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) :
FreeResource();
SetExchangeSupport();
- // Metriken
+ // Metrics
FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aAddrLeftField, aMetric);
SetMetric(aAddrTopField, aMetric);
@@ -139,12 +120,12 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) :
SetMetric(aSizeWidthField, aMetric);
SetMetric(aSizeHeightField, aMetric);
- // Menues einhaengen
+ // Hook in Menues
::pMenu = new PopupMenu(SW_RES(MNU_EDIT));
aAddrEditButton.SetPopupMenu(::pMenu);
aSendEditButton.SetPopupMenu(::pMenu);
- // Handler installieren
+ // Install handlers
Link aLk = LINK(this, SwEnvFmtPage, ModifyHdl);
aAddrLeftField .SetUpHdl( aLk );
aAddrTopField .SetUpHdl( aLk );
@@ -202,19 +183,13 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) :
}
-// --------------------------------------------------------------------------
-
-
-__EXPORT SwEnvFmtPage::~SwEnvFmtPage()
+SwEnvFmtPage::~SwEnvFmtPage()
{
aAddrEditButton.SetPopupMenu(0);
aSendEditButton.SetPopupMenu(0);
delete ::pMenu;
}
-// --------------------------------------------------------------------------
-
-
IMPL_LINK_INLINE_START( SwEnvFmtPage, ModifyHdl, Edit *, pEdit )
{
long lWVal = static_cast< long >(GetFldVal(aSizeWidthField ));
@@ -231,7 +206,7 @@ IMPL_LINK_INLINE_START( SwEnvFmtPage, ModifyHdl, Edit *, pEdit )
if (aIDs[i] == (sal_uInt16)ePaper)
aSizeFormatBox.SelectEntryPos(i);
- // Benutzergroesse merken
+ // remember user size
if (aIDs[aSizeFormatBox.GetSelectEntryPos()] == (sal_uInt16)PAPER_USER)
{
lUserW = lWidth ;
@@ -250,20 +225,17 @@ IMPL_LINK_INLINE_START( SwEnvFmtPage, ModifyHdl, Edit *, pEdit )
}
IMPL_LINK_INLINE_END( SwEnvFmtPage, ModifyHdl, Edit *, pEdit )
-// --------------------------------------------------------------------------
-
-
IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
{
SwWrtShell* pSh = GetParent()->pSh;
- ASSERT(pSh, "Shell fehlt");
+ OSL_ENSURE(pSh, "Shell missing");
- // Collection-Ptr ermitteln
+ // determine collection-ptr
sal_Bool bSender = pButton != &aAddrEditButton;
SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< sal_uInt16 >(
bSender ? RES_POOLCOLL_SENDADRESS : RES_POOLCOLL_JAKETADRESS));
- ASSERT(pColl, "Text-Collection fehlt");
+ OSL_ENSURE(pColl, "Text collection missing");
switch (pButton->GetCurItemId())
{
@@ -271,11 +243,11 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
{
SfxItemSet *pCollSet = GetCollItemSet(pColl, bSender);
- // Damit die Hintergrundfarbe nicht uebergebuegelt wird:
+ // In order for the background color not to get ironed over:
SfxAllItemSet aTmpSet(*pCollSet);
- // Das CHRATR_BACKGROUND-Attribut wird fuer den Dialog in
- // ein RES_BACKGROUND verwandelt und wieder zurueck ...
+ // The CHRATR_BACKGROUND attribute gets transformed into a
+ // RES_BACKGROUND for the dialog and back again ...
const SfxPoolItem *pTmpBrush;
if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_CHRATR_BACKGROUND,
@@ -289,10 +261,10 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
aTmpSet.ClearItem( RES_BACKGROUND );
SwAbstractDialogFactory* pFact = swui::GetFactory();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( GetParent(), pSh->GetView(), aTmpSet, DLG_CHAR ,&pColl->GetName() );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if (pDlg->Execute() == RET_OK)
{
SfxItemSet aOutputSet( *pDlg->GetOutputItemSet() );
@@ -315,10 +287,10 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
{
SfxItemSet *pCollSet = GetCollItemSet(pColl, bSender);
- // Damit die Tabulatoren nicht uebergebuegelt werden:
+ // In order for the tabulators not to get ironed over:
SfxAllItemSet aTmpSet(*pCollSet);
- // Tabulatoren, DefaultTabs ins ItemSet Stecken
+ // Insert tabs, default tabs into ItemSet
const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&)
pSh->GetView().GetCurShell()->GetPool().GetDefaultItem(RES_PARATR_TABSTOP);
@@ -326,27 +298,28 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
aTmpSet.Put( aDefDistItem );
- // Aktueller Tab
+ // Current tab
SfxUInt16Item aTabPos( SID_ATTR_TABSTOP_POS, 0 );
aTmpSet.Put( aTabPos );
- // linker Rand als Offset
+ // left border as offset
const long nOff = ((SvxLRSpaceItem&)aTmpSet.Get( RES_LR_SPACE )).
GetTxtLeft();
SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff );
aTmpSet.Put( aOff );
- // BoxInfo setzen
+ // set BoxInfo
::PrepareBoxInfo( aTmpSet, *pSh );
SwParaDlg *pDlg = new SwParaDlg(GetParent(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &pColl->GetName());
if ( pDlg->Execute() == RET_OK )
{
- // Defaults evtl umsetzen
+ // maybe relocate defaults
const SfxPoolItem* pItem = 0;
SfxItemSet* pOutputSet = (SfxItemSet*)pDlg->GetOutputItemSet();
sal_uInt16 nNewDist;
+
if( SFX_ITEM_SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS,
sal_False, &pItem ) &&
nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) )
@@ -358,7 +331,6 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
}
if( pOutputSet->Count() )
{
- //pColl->SetAttr( *pOutputSet );
pCollSet->Put(*pOutputSet);
}
}
@@ -370,7 +342,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
}
/*------------------------------------------------------------------------
- Beschreibung: Ein temporaeres Itemset, das bei Abbruch verworfen wird
+ Description: A temporary Itemset that gets discarded at abort
------------------------------------------------------------------------*/
SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender)
@@ -379,10 +351,10 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender)
if (!pAddrSet)
{
- // Range ermitteln (Ranges beider Itemsets mergen)
+ // determine range (merge both Itemsets' ranges)
const sal_uInt16 *pRanges = pColl->GetAttrSet().GetRanges();
- static sal_uInt16 __READONLY_DATA aRanges[] =
+ static sal_uInt16 const aRanges[] =
{
RES_PARATR_BEGIN, RES_PARATR_ADJUST,
RES_PARATR_TABSTOP, RES_PARATR_END-1,
@@ -395,7 +367,7 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender)
0, 0
};
- // BruteForce-Merge, weil MergeRange in SvTools buggy ist:
+ // BruteForce merge because MergeRange in SvTools is buggy:
sal_uInt16 i = 0;
SvLongsSort aMergedRanges( 0, 10 );
@@ -415,32 +387,30 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender)
i += 2;
}
- // Ranges kompaktieren
- SvLongs aCompactedRanges( 0, 10 );
+ // compact ranges
+ std::vector<sal_uInt16> aCompactedRanges;
- aCompactedRanges.Insert(aMergedRanges[0], aCompactedRanges.Count());
+ aCompactedRanges.push_back(aMergedRanges[0]);
- for (i = 0; i < aMergedRanges.Count(); i++)
+ for (i = 0; i < aMergedRanges.Count(); ++i)
{
while (i + 1 < aMergedRanges.Count() &&
aMergedRanges[i+1] - aMergedRanges[i] == 1)
{
i++;
}
- long nEnd = aMergedRanges[i];
- aCompactedRanges.Insert(nEnd, aCompactedRanges.Count());
+ aCompactedRanges.push_back( aMergedRanges[i] );
if (i + 1 < aMergedRanges.Count())
{
- long nStart = aMergedRanges[i+1];
- aCompactedRanges.Insert(nStart, aCompactedRanges.Count());
+ aCompactedRanges.push_back( aMergedRanges[i+1] );
}
}
- // Neue Ranges erzeugen
- sal_uInt16 *pNewRanges = new sal_uInt16[aCompactedRanges.Count() + 1];
- for (i = 0; i < aCompactedRanges.Count(); i++)
- pNewRanges[i] = (sal_uInt16)aCompactedRanges[i];
+ // create new ranges
+ sal_uInt16 *pNewRanges = new sal_uInt16[aCompactedRanges.size() + 1];
+ for (i = 0; i < aCompactedRanges.size(); ++i)
+ pNewRanges[i] = aCompactedRanges[i];
pNewRanges[i] = 0;
@@ -454,9 +424,6 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender)
return pAddrSet;
}
-// --------------------------------------------------------------------------
-
-
IMPL_LINK( SwEnvFmtPage, FormatHdl, ListBox *, EMPTYARG )
{
long lWidth;
@@ -499,9 +466,6 @@ IMPL_LINK( SwEnvFmtPage, FormatHdl, ListBox *, EMPTYARG )
return 0;
}
-// --------------------------------------------------------------------------
-
-
void SwEnvFmtPage::SetMinMax()
{
long lWVal = static_cast< long >(GetFldVal(aSizeWidthField ));
@@ -510,7 +474,7 @@ void SwEnvFmtPage::SetMinMax()
long lWidth = Max(lWVal, lHVal),
lHeight = Min(lWVal, lHVal);
- // Min und Max
+ // Min and Max
aAddrLeftField.SetMin((long) 100 * (GetFldVal(aSendLeftField) + 566), FUNIT_TWIP);
aAddrLeftField.SetMax((long) 100 * (lWidth - 2 * 566), FUNIT_TWIP);
aAddrTopField .SetMin((long) 100 * (GetFldVal(aSendTopField ) + 2 * 566), FUNIT_TWIP);
@@ -520,7 +484,7 @@ void SwEnvFmtPage::SetMinMax()
aSendTopField .SetMin((long) 100 * (566), FUNIT_TWIP);
aSendTopField .SetMax((long) 100 * (GetFldVal(aAddrTopField ) - 2 * 566), FUNIT_TWIP);
- // First und Last
+ // First and last
aAddrLeftField.SetFirst(aAddrLeftField.GetMin());
aAddrLeftField.SetLast (aAddrLeftField.GetMax());
aAddrTopField .SetFirst(aAddrTopField .GetMin());
@@ -530,7 +494,7 @@ void SwEnvFmtPage::SetMinMax()
aSendTopField .SetFirst(aSendTopField .GetMin());
aSendTopField .SetLast (aSendTopField .GetMax());
- // Fields neu formatieren
+ // Reformat fields
aAddrLeftField .Reformat();
aAddrTopField .Reformat();
aSendLeftField .Reformat();
@@ -539,37 +503,25 @@ void SwEnvFmtPage::SetMinMax()
aSizeHeightField.Reformat();
}
-// --------------------------------------------------------------------------
-
-
-SfxTabPage* __EXPORT SwEnvFmtPage::Create(Window* pParent, const SfxItemSet& rSet)
+SfxTabPage* SwEnvFmtPage::Create(Window* pParent, const SfxItemSet& rSet)
{
return new SwEnvFmtPage(pParent, rSet);
}
-// ----------------------------------------------------------------------------
-
-
-void __EXPORT SwEnvFmtPage::ActivatePage(const SfxItemSet& rSet)
+void SwEnvFmtPage::ActivatePage(const SfxItemSet& rSet)
{
SfxItemSet aSet(rSet);
aSet.Put(GetParent()->aEnvItem);
Reset(aSet);
}
-// ----------------------------------------------------------------------------
-
-
-int __EXPORT SwEnvFmtPage::DeactivatePage(SfxItemSet* _pSet)
+int SwEnvFmtPage::DeactivatePage(SfxItemSet* _pSet)
{
if( _pSet )
FillItemSet(*_pSet);
return SfxTabPage::LEAVE_PAGE;
}
-// --------------------------------------------------------------------------
-
-
void SwEnvFmtPage::FillItem(SwEnvItem& rItem)
{
rItem.lAddrFromLeft = static_cast< sal_Int32 >(GetFldVal(aAddrLeftField));
@@ -594,20 +546,14 @@ void SwEnvFmtPage::FillItem(SwEnvItem& rItem)
}
}
-// --------------------------------------------------------------------------
-
-
-sal_Bool __EXPORT SwEnvFmtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwEnvFmtPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(GetParent()->aEnvItem);
rSet.Put(GetParent()->aEnvItem);
return sal_True;
}
-// --------------------------------------------------------------------------
-
-
-void __EXPORT SwEnvFmtPage::Reset(const SfxItemSet& rSet)
+void SwEnvFmtPage::Reset(const SfxItemSet& rSet)
{
const SwEnvItem& rItem = (const SwEnvItem&) rSet.Get(FN_ENVELOP);
@@ -618,7 +564,7 @@ void __EXPORT SwEnvFmtPage::Reset(const SfxItemSet& rSet)
if (aIDs[i] == (sal_uInt16)ePaper)
aSizeFormatBox.SelectEntryPos(i);
- // Die MetricFields
+ // Metric fields
SetFldVal(aAddrLeftField, rItem.lAddrFromLeft);
SetFldVal(aAddrTopField , rItem.lAddrFromTop );
SetFldVal(aSendLeftField, rItem.lSendFromLeft);
@@ -633,3 +579,4 @@ void __EXPORT SwEnvFmtPage::Reset(const SfxItemSet& rSet)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/envfmt.hrc b/sw/source/ui/envelp/envfmt.hrc
index fb15678cacee..4fef2f5d9728 100644
--- a/sw/source/ui/envelp/envfmt.hrc
+++ b/sw/source/ui/envelp/envfmt.hrc
@@ -28,11 +28,9 @@
#ifndef _ENVFMT_HRC
#define _ENVFMT_HRC
-// #include *****************************************************************
-
#include "envelp.hrc"
-// Lokale Resourcen *********************************************************
+// local resources *********************************************************
#define FL_ADDRESSEE 11
#define TXT_ADDR_POS 12
@@ -66,11 +64,11 @@
#define MID_CHAR 1
#define MID_PARA 2
-// Globale Resourcen ********************************************************
+// global resources ********************************************************
#define MNU_EDIT (RC_ENVFMT_BEGIN )
-// Ueberlaufpruefung ********************************************************
+// overflow check ********************************************************
#define ENVFMT_ACT_END MNU_EDIT
diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx
index 90c35adc50ff..097eb46cfb47 100644
--- a/sw/source/ui/envelp/envfmt.hxx
+++ b/sw/source/ui/envelp/envfmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,15 +34,9 @@
#include <svl/svstdarr.hxx>
#endif
#include <svtools/stdctrl.hxx>
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
-#ifndef _MENUBTN_HXX //autogen
#include <vcl/menubtn.hxx>
-#endif
-#ifndef _GROUP_HXX //autogen
#include <vcl/group.hxx>
-#endif
#include "envlop.hxx"
@@ -110,3 +105,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/envfmt.src b/sw/source/ui/envelp/envfmt.src
index 5ad5a4b9d6a4..02ea2ea4487c 100644
--- a/sw/source/ui/envelp/envfmt.src
+++ b/sw/source/ui/envelp/envfmt.src
@@ -26,7 +26,6 @@
************************************************************************/
// #pragma ******************************************************************
- // #include *****************************************************************
#include "envfmt.hrc"
#include "helpid.h"
// TP_ENV_FMT ---------------------------------------------------------------
diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx
index 1a2ee6c27f22..535f3063e0fe 100644
--- a/sw/source/ui/envelp/envimg.cxx
+++ b/sw/source/ui/envelp/envimg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,16 +39,11 @@
#include <unotools/useroptions.hxx>
#include <tools/shl.hxx>
#include <swmodule.hxx>
-#include <errhdl.hxx>
#include <swtypes.hxx>
#include <envimg.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _ENVELP_HRC
#include <envelp.hrc>
-#endif
#include <unomid.h>
@@ -58,13 +54,13 @@
#endif
using namespace utl;
-using namespace rtl;
using namespace ::com::sun::star::uno;
+using ::rtl::OUString;
+
TYPEINIT1_AUTOFACTORY( SwEnvItem, SfxPoolItem );
-// --------------------------------------------------------------------------
SW_DLLPUBLIC String MakeSender()
{
SvtUserOptions& rUserOpt = SW_MOD()->GetUserOptions();
@@ -107,7 +103,7 @@ SW_DLLPUBLIC String MakeSender()
}
return sRet;
}
-// --------------------------------------------------------------------------
+
SwEnvItem::SwEnvItem() :
SfxPoolItem(FN_ENVELOP)
{
@@ -127,7 +123,7 @@ SwEnvItem::SwEnvItem() :
lAddrFromLeft = Max(lWidth, lHeight) / 2;
lAddrFromTop = Min(lWidth, lHeight) / 2;
}
-// --------------------------------------------------------------------------
+
SwEnvItem::SwEnvItem(const SwEnvItem& rItem) :
SfxPoolItem(FN_ENVELOP),
aAddrText (rItem.aAddrText),
@@ -146,7 +142,6 @@ SwEnvItem::SwEnvItem(const SwEnvItem& rItem) :
{
}
-// --------------------------------------------------------------------------
SwEnvItem& SwEnvItem::operator =(const SwEnvItem& rItem)
{
aAddrText = rItem.aAddrText;
@@ -164,7 +159,7 @@ SwEnvItem& SwEnvItem::operator =(const SwEnvItem& rItem)
lShiftDown = rItem.lShiftDown;
return *this;
}
-// --------------------------------------------------------------------------
+
int SwEnvItem::operator ==(const SfxPoolItem& rItem) const
{
const SwEnvItem& rEnv = (const SwEnvItem&) rItem;
@@ -184,13 +179,11 @@ int SwEnvItem::operator ==(const SfxPoolItem& rItem) const
lShiftDown == rEnv.lShiftDown;
}
-// --------------------------------------------------------------------------
SfxPoolItem* SwEnvItem::Clone(SfxItemPool*) const
{
return new SwEnvItem(*this);
}
-// --------------------------------------------------------------------------
-// --------------------------------------------------------------------------
+
SwEnvCfgItem::SwEnvCfgItem() :
ConfigItem(C2U("Office.Writer/Envelope"))
{
@@ -198,7 +191,7 @@ SwEnvCfgItem::SwEnvCfgItem() :
Sequence<Any> aValues = GetProperties(aNames);
EnableNotification(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength())
{
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -253,15 +246,11 @@ SwEnvCfgItem::SwEnvCfgItem() :
}
}
}
-/* -----------------------------26.09.00 14:04--------------------------------
- ---------------------------------------------------------------------------*/
SwEnvCfgItem::~SwEnvCfgItem()
{
}
-/* -----------------------------26.09.00 14:05--------------------------------
- ---------------------------------------------------------------------------*/
void SwEnvCfgItem::Commit()
{
Sequence<OUString> aNames = GetPropertyNames();
@@ -293,9 +282,6 @@ void SwEnvCfgItem::Commit()
void SwEnvCfgItem::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
-/* -----------------------------26.09.00 14:04--------------------------------
-
- ---------------------------------------------------------------------------*/
Sequence<rtl::OUString> SwEnvCfgItem::GetPropertyNames()
{
static const char* aPropNames[] =
@@ -317,14 +303,16 @@ Sequence<rtl::OUString> SwEnvCfgItem::GetPropertyNames()
const int nCount = 13;
Sequence<OUString> aNames(nCount);
OUString* pNames = aNames.getArray();
+
for(int i = 0; i < nCount; i++)
pNames[i] = OUString::createFromAscii(aPropNames[i]);
+
return aNames;
}
-sal_Bool SwEnvItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
+bool SwEnvItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
- sal_Bool bRet = sal_True;
+ sal_Bool bRet = true;
switch(nMemberId & ~CONVERT_TWIPS)
{
case MID_ENV_ADDR_TEXT : rVal <<= aAddrText; break;
@@ -341,17 +329,15 @@ sal_Bool SwEnvItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
case MID_ENV_SHIFT_RIGHT : rVal <<= lShiftRight; break;
case MID_ENV_SHIFT_DOWN : rVal <<= lShiftDown; break;
default:
- DBG_ERROR("Wrong memberId");
- bRet = sal_False;
+ OSL_ENSURE(false, "Wrong memberId");
+ bRet = false;
}
return bRet;
}
-/* -----------------------------26.04.01 12:26--------------------------------
- ---------------------------------------------------------------------------*/
-sal_Bool SwEnvItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
+bool SwEnvItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
switch(nMemberId & ~CONVERT_TWIPS)
{
case MID_ENV_ADDR_TEXT : bRet = (rVal >>= aAddrText); break;
@@ -375,7 +361,9 @@ sal_Bool SwEnvItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
case MID_ENV_SHIFT_RIGHT : bRet = (rVal >>= lShiftRight); break;
case MID_ENV_SHIFT_DOWN : bRet = (rVal >>= lShiftDown); break;
default:
- DBG_ERROR("Wrong memberId");
+ OSL_ENSURE(false,"Wrong memberId");
}
return bRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/envlop.hrc b/sw/source/ui/envelp/envlop.hrc
index 43f51d3a48df..04b2a1396826 100644
--- a/sw/source/ui/envelp/envlop.hrc
+++ b/sw/source/ui/envelp/envlop.hrc
@@ -28,11 +28,9 @@
#ifndef _ENVLOP_HRC
#define _ENVLOP_HRC
-// #include *****************************************************************
-
#include "envelp.hrc"
-// Lokale Resourcen *********************************************************
+// local resources *********************************************************
#define TXT_ADDR 1
#define EDT_ADDR 2
@@ -48,11 +46,11 @@
#define WIN_PREVIEW 12
#define ST_INSERT 13
#define ST_CHANGE 14
-// Globale Resourcen ********************************************************
+// global resources ********************************************************
#define STR_DOC_TITLE (RC_ENVLOP_BEGIN)
-// Ueberlaufpruefung ********************************************************
+// overflow check ********************************************************
#define ENVLOP_ACT_END STR_DOC_TITLE
diff --git a/sw/source/ui/envelp/envlop.src b/sw/source/ui/envelp/envlop.src
index 2b9a5a084cc8..32bc1856441b 100644
--- a/sw/source/ui/envelp/envlop.src
+++ b/sw/source/ui/envelp/envlop.src
@@ -26,7 +26,6 @@
************************************************************************/
// #pragma ******************************************************************
- // #include *****************************************************************
#include "envlop.hrc"
#include "helpid.h"
// DLG_ENV ------------------------------------------------------------------
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index baa0013392ab..a0e4525f8df3 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,8 +32,6 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
-
#include "dbmgr.hxx"
#include <sfx2/app.hxx>
#include <vcl/msgbox.hxx>
@@ -40,7 +39,6 @@
#include <viewopt.hxx>
#include "wrtsh.hxx"
-#include "errhdl.hxx"
#include "cmdid.h"
#include "helpid.h"
#include "envfmt.hxx"
@@ -65,8 +63,6 @@ using namespace ::rtl;
//impl in envimg.cxx
extern SW_DLLPUBLIC String MakeSender();
-// --------------------------------------------------------------------------
-
SwEnvPreview::SwEnvPreview(SfxTabPage* pParent, const ResId& rResID) :
Window(pParent, rResID)
@@ -75,15 +71,10 @@ SwEnvPreview::SwEnvPreview(SfxTabPage* pParent, const ResId& rResID) :
SetMapMode(MapMode(MAP_PIXEL));
}
-// --------------------------------------------------------------------------
-
-
-
SwEnvPreview::~SwEnvPreview()
{
}
-// ----------------------------------------------------------------------------
void SwEnvPreview::DataChanged( const DataChangedEvent& rDCEvt )
{
Window::DataChanged( rDCEvt );
@@ -91,8 +82,6 @@ void SwEnvPreview::DataChanged( const DataChangedEvent& rDCEvt )
SetBackground( GetSettings().GetStyleSettings().GetDialogColor() );
}
-// ----------------------------------------------------------------------------
-
void SwEnvPreview::Paint(const Rectangle &)
{
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
@@ -116,7 +105,7 @@ void SwEnvPreview::Paint(const Rectangle &)
SetLineColor( aFront );
- // Umschlag
+ // Envelope
long nW = (sal_uInt16) (f * nPageW),
nH = (sal_uInt16) (f * nPageH),
nX = (GetOutputSizePixel().Width () - nW) / 2,
@@ -124,7 +113,7 @@ void SwEnvPreview::Paint(const Rectangle &)
SetFillColor( aBack );
DrawRect(Rectangle(Point(nX, nY), Size(nW, nH)));
- // Absender
+ // Sender
if (rItem.bSend)
{
long nSendX = nX + (sal_uInt16) (f * rItem.lSendFromLeft),
@@ -136,7 +125,7 @@ void SwEnvPreview::Paint(const Rectangle &)
DrawRect(Rectangle(Point(nSendX, nSendY), Size(nSendW, nSendH)));
}
- // Empfaenger
+ // Addressee
long nAddrX = nX + (sal_uInt16) (f * rItem.lAddrFromLeft),
nAddrY = nY + (sal_uInt16) (f * rItem.lAddrFromTop ),
nAddrW = (sal_uInt16) (f * (nPageW - rItem.lAddrFromLeft - 566)),
@@ -144,7 +133,7 @@ void SwEnvPreview::Paint(const Rectangle &)
SetFillColor( aMedium );
DrawRect(Rectangle(Point(nAddrX, nAddrY), Size(nAddrW, nAddrH)));
- // Briefmarke
+ // Stamp
long nStmpW = (sal_uInt16) (f * 1417 /* 2,5 cm */),
nStmpH = (sal_uInt16) (f * 1701 /* 3,0 cm */),
nStmpX = nX + nW - (sal_uInt16) (f * 566) - nStmpW,
@@ -154,10 +143,6 @@ void SwEnvPreview::Paint(const Rectangle &)
DrawRect(Rectangle(Point(nStmpX, nStmpY), Size(nStmpW, nStmpH)));
}
-// --------------------------------------------------------------------------
-
-
-
SwEnvDlg::SwEnvDlg(Window* pParent, const SfxItemSet& rSet,
SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert) :
@@ -174,7 +159,7 @@ SwEnvDlg::SwEnvDlg(Window* pParent, const SfxItemSet& rSet,
GetOKButton().SetText(String(SW_RES(STR_BTN_NEWDOC)));
GetOKButton().SetHelpId(HID_ENVELOP_PRINT);
- GetOKButton().SetHelpText(aEmptyStr); // Damit generierter Hilfetext verwendet wird
+ GetOKButton().SetHelpText(aEmptyStr); // in order for generated help text to get used
if (GetUserButton())
{
GetUserButton()->SetText(bInsert ? sInsert : sChange);
@@ -186,20 +171,12 @@ SwEnvDlg::SwEnvDlg(Window* pParent, const SfxItemSet& rSet,
AddTabPage(TP_ENV_PRT, SwEnvPrtPage::Create, 0);
}
-// --------------------------------------------------------------------------
-
-
-
SwEnvDlg::~SwEnvDlg()
{
delete pAddresseeSet;
delete pSenderSet;
}
-// --------------------------------------------------------------------------
-
-
-
void SwEnvDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage)
{
if (nId == TP_ENV_PRT)
@@ -208,8 +185,6 @@ void SwEnvDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage)
}
}
-// --------------------------------------------------------------------------
-
short SwEnvDlg::Ok()
{
short nRet = SfxTabDialog::Ok();
@@ -231,10 +206,6 @@ short SwEnvDlg::Ok()
return nRet;
}
-// --------------------------------------------------------------------------
-
-
-
SwEnvPage::SwEnvPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_ENV_ENV), rSet),
@@ -257,7 +228,7 @@ SwEnvPage::SwEnvPage(Window* pParent, const SfxItemSet& rSet) :
SetExchangeSupport();
pSh = GetParent()->pSh;
- // Handler installieren
+ // Install handlers
aDatabaseLB .SetSelectHdl(LINK(this, SwEnvPage, DatabaseHdl ));
aTableLB .SetSelectHdl(LINK(this, SwEnvPage, DatabaseHdl ));
aInsertBT .SetClickHdl (LINK(this, SwEnvPage, FieldHdl ));
@@ -271,18 +242,10 @@ SwEnvPage::SwEnvPage(Window* pParent, const SfxItemSet& rSet) :
InitDatabaseBox();
}
-// --------------------------------------------------------------------------
-
-
-
SwEnvPage::~SwEnvPage()
{
}
-// --------------------------------------------------------------------------
-
-
-
IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox )
{
SwWait aWait( *pSh->GetView().GetDocShell(), sal_True );
@@ -295,26 +258,20 @@ IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox )
}
else
sActDBName.SetToken(1, DB_DELIM, aTableLB.GetSelectEntry());
- pSh->GetNewDBMgr()->GetColumnNames(
- &aDBFieldLB, aDatabaseLB.GetSelectEntry(), aTableLB.GetSelectEntry());
+ pSh->GetNewDBMgr()->GetColumnNames(&aDBFieldLB, aDatabaseLB.GetSelectEntry(),
+ aTableLB.GetSelectEntry());
return 0;
}
-// --------------------------------------------------------------------------
-
-
-
IMPL_LINK( SwEnvPage, FieldHdl, Button *, EMPTYARG )
{
String aStr ( '<' );
aStr += aDatabaseLB.GetSelectEntry();
aStr += '.';
-// aStr += DB_DELIM;
aStr += aTableLB.GetSelectEntry();
aStr += '.';
aStr += aTableLB.GetEntryData(aTableLB.GetSelectEntryPos()) == 0 ? '0' : '1';
aStr += '.';
-// aStr += DB_DELIM;
aStr += aDBFieldLB.GetSelectEntry();
aStr += '>';
aAddrEdit.ReplaceSelected(aStr);
@@ -324,10 +281,6 @@ IMPL_LINK( SwEnvPage, FieldHdl, Button *, EMPTYARG )
return 0;
}
-// --------------------------------------------------------------------------
-
-
-
IMPL_LINK( SwEnvPage, SenderHdl, Button *, EMPTYARG )
{
const sal_Bool bEnable = aSenderBox.IsChecked();
@@ -343,10 +296,6 @@ IMPL_LINK( SwEnvPage, SenderHdl, Button *, EMPTYARG )
return 0;
}
-// --------------------------------------------------------------------------
-
-
-
void SwEnvPage::InitDatabaseBox()
{
if (pSh->GetNewDBMgr())
@@ -354,6 +303,7 @@ void SwEnvPage::InitDatabaseBox()
aDatabaseLB.Clear();
Sequence<OUString> aDataNames = SwNewDBMgr::GetExistingDatabaseNames();
const OUString* pDataNames = aDataNames.getConstArray();
+
for (long i = 0; i < aDataNames.getLength(); i++)
aDatabaseLB.InsertEntry(pDataNames[i]);
@@ -371,19 +321,11 @@ void SwEnvPage::InitDatabaseBox()
}
}
-// --------------------------------------------------------------------------
-
-
-
SfxTabPage* SwEnvPage::Create(Window* pParent, const SfxItemSet& rSet)
{
return new SwEnvPage(pParent, rSet);
}
-// --------------------------------------------------------------------------
-
-
-
void SwEnvPage::ActivatePage(const SfxItemSet& rSet)
{
SfxItemSet aSet(rSet);
@@ -391,10 +333,6 @@ void SwEnvPage::ActivatePage(const SfxItemSet& rSet)
Reset(aSet);
}
-// --------------------------------------------------------------------------
-
-
-
int SwEnvPage::DeactivatePage(SfxItemSet* _pSet)
{
FillItem(GetParent()->aEnvItem);
@@ -403,10 +341,6 @@ int SwEnvPage::DeactivatePage(SfxItemSet* _pSet)
return SfxTabPage::LEAVE_PAGE;
}
-// --------------------------------------------------------------------------
-
-
-
void SwEnvPage::FillItem(SwEnvItem& rItem)
{
rItem.aAddrText = aAddrEdit .GetText();
@@ -414,10 +348,6 @@ void SwEnvPage::FillItem(SwEnvItem& rItem)
rItem.aSendText = aSenderEdit.GetText();
}
-// --------------------------------------------------------------------------
-
-
-
sal_Bool SwEnvPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(GetParent()->aEnvItem);
@@ -425,10 +355,6 @@ sal_Bool SwEnvPage::FillItemSet(SfxItemSet& rSet)
return sal_True;
}
-// ----------------------------------------------------------------------------
-
-
-
void SwEnvPage::Reset(const SfxItemSet& rSet)
{
SwEnvItem aItem = (const SwEnvItem&) rSet.Get(FN_ENVELOP);
@@ -439,3 +365,4 @@ void SwEnvPage::Reset(const SfxItemSet& rSet)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index f12eaa95240d..72b80d531a7d 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,10 +45,6 @@
#include "envprt.hrc"
-
-
-
-
SwEnvPrtPage::SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_ENV_PRT), rSet),
@@ -68,12 +65,12 @@ SwEnvPrtPage::SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet) :
FreeResource();
SetExchangeSupport();
- // Metriken
+ // Metrics
FieldUnit eUnit = ::GetDfltMetric(sal_False);
SetMetric(aRightField, eUnit);
SetMetric(aDownField , eUnit);
- // Handler installieren
+ // Install handlers
aTopButton .SetClickHdl(LINK(this, SwEnvPrtPage, ClickHdl));
aBottomButton.SetClickHdl(LINK(this, SwEnvPrtPage, ClickHdl));
@@ -85,58 +82,43 @@ SwEnvPrtPage::SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet) :
// ToolBox
Size aSz = aAlignBox.CalcWindowSizePixel();
aAlignBox.SetSizePixel(aSz);
-// aAlignBox.SetPosPixel(Point(aNoNameFL.GetPosPixel().X() + (aNoNameFL.GetSizePixel().Width() - aSz.Width()) / 2, aAlignBox.GetPosPixel().Y()));
aAlignBox.SetClickHdl(LINK(this, SwEnvPrtPage, AlignHdl));
-
}
-// --------------------------------------------------------------------------
-
-
-
SwEnvPrtPage::~SwEnvPrtPage()
{
}
-// --------------------------------------------------------------------------
-
-
-
IMPL_LINK( SwEnvPrtPage, ClickHdl, Button *, EMPTYARG )
{
- sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
if (aBottomButton.IsChecked())
{
- // Briefumschlaege von unten
- aAlignBox.SetItemImage(ITM_HOR_LEFT, Bitmap(SW_RES(bHC ? BMP_HOR_LEFT_LOWER_H : BMP_HOR_LEFT_LOWER)));
- aAlignBox.SetItemImage(ITM_HOR_CNTR, Bitmap(SW_RES(bHC ? BMP_HOR_CNTR_LOWER_H : BMP_HOR_CNTR_LOWER)));
- aAlignBox.SetItemImage(ITM_HOR_RGHT, Bitmap(SW_RES(bHC ? BMP_HOR_RGHT_LOWER_H : BMP_HOR_RGHT_LOWER)));
- aAlignBox.SetItemImage(ITM_VER_LEFT, Bitmap(SW_RES(bHC ? BMP_VER_LEFT_LOWER_H : BMP_VER_LEFT_LOWER)));
- aAlignBox.SetItemImage(ITM_VER_CNTR, Bitmap(SW_RES(bHC ? BMP_VER_CNTR_LOWER_H : BMP_VER_CNTR_LOWER)));
- aAlignBox.SetItemImage(ITM_VER_RGHT, Bitmap(SW_RES(bHC ? BMP_VER_RGHT_LOWER_H : BMP_VER_RGHT_LOWER)));
+ // Envelope from botton
+ aAlignBox.SetItemImage(ITM_HOR_LEFT, Bitmap(SW_RES(BMP_HOR_LEFT_LOWER)));
+ aAlignBox.SetItemImage(ITM_HOR_CNTR, Bitmap(SW_RES(BMP_HOR_CNTR_LOWER)));
+ aAlignBox.SetItemImage(ITM_HOR_RGHT, Bitmap(SW_RES(BMP_HOR_RGHT_LOWER)));
+ aAlignBox.SetItemImage(ITM_VER_LEFT, Bitmap(SW_RES(BMP_VER_LEFT_LOWER)));
+ aAlignBox.SetItemImage(ITM_VER_CNTR, Bitmap(SW_RES(BMP_VER_CNTR_LOWER)));
+ aAlignBox.SetItemImage(ITM_VER_RGHT, Bitmap(SW_RES(BMP_VER_RGHT_LOWER)));
}
else
{
- // Briefumschlaege von oben
- aAlignBox.SetItemImage(ITM_HOR_LEFT, Bitmap(SW_RES(bHC ? BMP_HOR_LEFT_UPPER_H : BMP_HOR_LEFT_UPPER)));
- aAlignBox.SetItemImage(ITM_HOR_CNTR, Bitmap(SW_RES(bHC ? BMP_HOR_CNTR_UPPER_H : BMP_HOR_CNTR_UPPER)));
- aAlignBox.SetItemImage(ITM_HOR_RGHT, Bitmap(SW_RES(bHC ? BMP_HOR_RGHT_UPPER_H : BMP_HOR_RGHT_UPPER)));
- aAlignBox.SetItemImage(ITM_VER_LEFT, Bitmap(SW_RES(bHC ? BMP_VER_LEFT_UPPER_H : BMP_VER_LEFT_UPPER)));
- aAlignBox.SetItemImage(ITM_VER_CNTR, Bitmap(SW_RES(bHC ? BMP_VER_CNTR_UPPER_H : BMP_VER_CNTR_UPPER)));
- aAlignBox.SetItemImage(ITM_VER_RGHT, Bitmap(SW_RES(bHC ? BMP_VER_RGHT_UPPER_H : BMP_VER_RGHT_UPPER)));
+ // Envelope from top
+ aAlignBox.SetItemImage(ITM_HOR_LEFT, Bitmap(SW_RES(BMP_HOR_LEFT_UPPER)));
+ aAlignBox.SetItemImage(ITM_HOR_CNTR, Bitmap(SW_RES(BMP_HOR_CNTR_UPPER)));
+ aAlignBox.SetItemImage(ITM_HOR_RGHT, Bitmap(SW_RES(BMP_HOR_RGHT_UPPER)));
+ aAlignBox.SetItemImage(ITM_VER_LEFT, Bitmap(SW_RES(BMP_VER_LEFT_UPPER)));
+ aAlignBox.SetItemImage(ITM_VER_CNTR, Bitmap(SW_RES(BMP_VER_CNTR_UPPER)));
+ aAlignBox.SetItemImage(ITM_VER_RGHT, Bitmap(SW_RES(BMP_VER_RGHT_UPPER)));
}
return 0;
}
-// --------------------------------------------------------------------------
-
-
-
IMPL_LINK( SwEnvPrtPage, ButtonHdl, Button *, pBtn )
{
if (pBtn == &aPrtSetup)
{
- // Druck-Setup aufrufen
+ // Call printer setup
if (pPrt)
{
PrinterSetupDialog* pDlg = new PrinterSetupDialog(this );
@@ -150,10 +132,6 @@ IMPL_LINK( SwEnvPrtPage, ButtonHdl, Button *, pBtn )
return 0;
}
-// --------------------------------------------------------------------------
-
-
-
IMPL_LINK( SwEnvPrtPage, AlignHdl, ToolBox *, EMPTYARG )
{
if (aAlignBox.GetCurItemId())
@@ -164,36 +142,24 @@ IMPL_LINK( SwEnvPrtPage, AlignHdl, ToolBox *, EMPTYARG )
}
else
{
- // GetCurItemId() == 0 ist moeglich!
+ // GetCurItemId() == 0 is possible!
const SwEnvItem& rItem = (const SwEnvItem&) GetItemSet().Get(FN_ENVELOP);
aAlignBox.CheckItem((sal_uInt16) rItem.eAlign + ITM_HOR_LEFT, sal_True);
}
return 0;
}
-// --------------------------------------------------------------------------
-
-
-
SfxTabPage* SwEnvPrtPage::Create(Window* pParent, const SfxItemSet& rSet)
{
return new SwEnvPrtPage(pParent, rSet);
}
-// --------------------------------------------------------------------------
-
-
-
void SwEnvPrtPage::ActivatePage(const SfxItemSet&)
{
if (pPrt)
aPrinterInfo.SetText(pPrt->GetName());
}
-// --------------------------------------------------------------------------
-
-
-
int SwEnvPrtPage::DeactivatePage(SfxItemSet* _pSet)
{
if( _pSet )
@@ -201,10 +167,6 @@ int SwEnvPrtPage::DeactivatePage(SfxItemSet* _pSet)
return SfxTabPage::LEAVE_PAGE;
}
-// --------------------------------------------------------------------------
-
-
-
void SwEnvPrtPage::FillItem(SwEnvItem& rItem)
{
sal_uInt16 nID = 0;
@@ -218,10 +180,6 @@ void SwEnvPrtPage::FillItem(SwEnvItem& rItem)
rItem.lShiftDown = static_cast< sal_Int32 >(GetFldVal(aDownField ));
}
-// --------------------------------------------------------------------------
-
-
-
sal_Bool SwEnvPrtPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(GetParent()->aEnvItem);
@@ -229,16 +187,9 @@ sal_Bool SwEnvPrtPage::FillItemSet(SfxItemSet& rSet)
return sal_True;
}
-// ----------------------------------------------------------------------------
-
-
-
void SwEnvPrtPage::Reset(const SfxItemSet& rSet)
{
-// SfxItemSet aSet(rSet);
-// aSet.Put(GetParent()->aEnvItem);
-
- // Item auslesen
+ // Read item
const SwEnvItem& rItem = (const SwEnvItem&) rSet.Get(FN_ENVELOP);
aAlignBox.CheckItem((sal_uInt16) rItem.eAlign + ITM_HOR_LEFT);
@@ -257,3 +208,4 @@ void SwEnvPrtPage::Reset(const SfxItemSet& rSet)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/envprt.hrc b/sw/source/ui/envelp/envprt.hrc
index 902416e80764..b4a98b0545ba 100644
--- a/sw/source/ui/envelp/envprt.hrc
+++ b/sw/source/ui/envelp/envprt.hrc
@@ -28,11 +28,9 @@
#ifndef _ENVPRT_HRC
#define _ENVPRT_HRC
-// #include *****************************************************************
-
#include "envelp.hrc"
-// Lokale Resourcen *********************************************************
+// local resources *********************************************************
#define BOX_ALIGN 1
#define BTN_TOP 7
@@ -46,7 +44,7 @@
#define BTN_PRTSETUP 15
#define FL_PRINTER 16
-// Globale Resourcen ********************************************************
+// global resources ********************************************************
#define BMP_HOR_LEFT_LOWER (RC_ENVPRT_BEGIN )
#define BMP_HOR_LEFT_UPPER (RC_ENVPRT_BEGIN + 1)
@@ -69,26 +67,11 @@
#define ITM_VER_CNTR (RC_ENVPRT_BEGIN + 16)
#define ITM_VER_RGHT (RC_ENVPRT_BEGIN + 17)
-#define BMP_HOR_LEFT_LOWER_H (RC_ENVPRT_HC_BEGIN )
-#define BMP_HOR_LEFT_UPPER_H (RC_ENVPRT_HC_BEGIN + 1)
-#define BMP_HOR_CNTR_LOWER_H (RC_ENVPRT_HC_BEGIN + 2)
-#define BMP_HOR_CNTR_UPPER_H (RC_ENVPRT_HC_BEGIN + 3)
-#define BMP_HOR_RGHT_LOWER_H (RC_ENVPRT_HC_BEGIN + 4)
-#define BMP_HOR_RGHT_UPPER_H (RC_ENVPRT_HC_BEGIN + 5)
-
-#define BMP_VER_LEFT_LOWER_H (RC_ENVPRT_HC_BEGIN + 6)
-#define BMP_VER_LEFT_UPPER_H (RC_ENVPRT_HC_BEGIN + 7)
-#define BMP_VER_CNTR_LOWER_H (RC_ENVPRT_HC_BEGIN + 8)
-#define BMP_VER_CNTR_UPPER_H (RC_ENVPRT_HC_BEGIN + 9)
-#define BMP_VER_RGHT_LOWER_H (RC_ENVPRT_HC_BEGIN + 10)
-#define BMP_VER_RGHT_UPPER_H (RC_ENVPRT_HC_BEGIN + 11)
-
-
-// Ueberlaufpruefung ********************************************************
+// overflow check ********************************************************
-#define ENVPRT_ACT_END BMP_VER_RGHT_UPPER_H
+#define ENVPRT_ACT_END ITM_VER_RGHT
-#if ENVPRT_ACT_END > RC_ENVPRT_HC_END
+#if ENVPRT_ACT_END > ITM_VER_RGHT
#error Resource-Ueberlauf in #file, #line
#endif
diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx
index afc7127c2702..c5a8903dc66e 100644
--- a/sw/source/ui/envelp/envprt.hxx
+++ b/sw/source/ui/envelp/envprt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,9 +35,7 @@
#include <vcl/field.hxx>
#include <vcl/fixed.hxx>
#include <vcl/group.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <svtools/stdctrl.hxx>
@@ -91,3 +90,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/envprt.src b/sw/source/ui/envelp/envprt.src
index a12db0d166f9..706040970163 100644
--- a/sw/source/ui/envelp/envprt.src
+++ b/sw/source/ui/envelp/envprt.src
@@ -26,7 +26,6 @@
************************************************************************/
// #pragma *****************************************************************
- // #include ****************************************************************
#include "envprt.hrc"
#include "helpid.h"
// TP_ENV_PRT ---------------------------------------------------------------
@@ -217,81 +216,3 @@ Bitmap BMP_VER_RGHT_UPPER
{
File = "envvr_u.bmp" ;
};
-// HighContrast Bitmaps
-Bitmap BMP_HOR_LEFT_LOWER_H
-{
- File = "envhl_l_h.bmp" ;
-};
-Bitmap BMP_HOR_LEFT_UPPER_H
-{
- File = "envhl_u_h.bmp" ;
-};
-Bitmap BMP_HOR_CNTR_LOWER_H
-{
- File = "envhc_l_h.bmp" ;
-};
-Bitmap BMP_HOR_CNTR_UPPER_H
-{
- File = "envhc_u_h.bmp" ;
-};
-Bitmap BMP_HOR_RGHT_LOWER_H
-{
- File = "envhr_l_h.bmp" ;
-};
-Bitmap BMP_HOR_RGHT_UPPER_H
-{
- File = "envhr_u_h.bmp" ;
-};
-Bitmap BMP_VER_LEFT_LOWER_H
-{
- File = "envvl_l_h.bmp" ;
-};
-Bitmap BMP_VER_LEFT_UPPER_H
-{
- File = "envvl_u_h.bmp" ;
-};
-Bitmap BMP_VER_CNTR_LOWER_H
-{
- File = "envvc_l_h.bmp" ;
-};
-Bitmap BMP_VER_CNTR_UPPER_H
-{
- File = "envvc_u_h.bmp" ;
-};
-Bitmap BMP_VER_RGHT_LOWER_H
-{
- File = "envvr_l_h.bmp" ;
-};
-Bitmap BMP_VER_RGHT_UPPER_H
-{
- File = "envvr_u_h.bmp" ;
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sw/source/ui/envelp/label.hrc b/sw/source/ui/envelp/label.hrc
index 3817ff92def4..4b563068cb66 100644
--- a/sw/source/ui/envelp/label.hrc
+++ b/sw/source/ui/envelp/label.hrc
@@ -28,11 +28,9 @@
#ifndef _LABEL_HRC
#define _LABEL_HRC
-// #include *****************************************************************
-
#include "envelp.hrc"
-// Lokale Resourcen *********************************************************
+// local resources *********************************************************
#define TXT_WRITING 1
#define BOX_ADDR 2
@@ -112,11 +110,11 @@
//#define FT_MOBILE 72
#define FT_FAX 73
-// Globale Resourcen ********************************************************
+// global resources ********************************************************
#define STR_DOC_TITLE (RC_LABEL_BEGIN)
#define STR_CUSTOM (RC_LABEL_BEGIN + 1)
-// Ueberlaufpruefung ********************************************************
+// overflow check ********************************************************
#define LABEL_ACT_END STR_CUSTOM
diff --git a/sw/source/ui/envelp/label.src b/sw/source/ui/envelp/label.src
index bd5be722ce46..7d554d282e8f 100644
--- a/sw/source/ui/envelp/label.src
+++ b/sw/source/ui/envelp/label.src
@@ -26,7 +26,6 @@
************************************************************************/
// #pragma ******************************************************************
- // #include *****************************************************************
#include "label.hrc"
#include "globals.hrc"
#include "helpid.h"
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 4ee1d3295ddc..86ddf85552d8 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,22 +43,12 @@
#include <labfmt.hxx>
#include <labprt.hxx>
#include <unotools.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include "uitool.hxx"
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _LABEL_HRC
#include <label.hrc>
-#endif
//impl in envimg.cxx
extern SW_DLLPUBLIC String MakeSender();
@@ -90,19 +81,14 @@ void SwLabRec::FillItem( SwLabItem& rItem ) const
rItem.nRows = nRows;
}
-// --------------------------------------------------------------------------
void SwLabDlg::_ReplaceGroup( const String &rMake )
{
- //Die alten Eintraege vernichten.
+ // Remove old entries
pRecs->Remove( 1, pRecs->Count() - 1 );
aLabelsCfg.FillLabels(rtl::OUString(rMake), *pRecs);
aLstGroup = rMake;
}
-// --------------------------------------------------------------------------
-
-
-
void SwLabDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage)
{
if (nId == TP_LAB_LAB)
@@ -119,10 +105,6 @@ void SwLabDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage)
pPrtPage = (SwLabPrtPage*)&rPage;
}
-// --------------------------------------------------------------------------
-
-
-
SwLabDlg::SwLabDlg(Window* pParent, const SfxItemSet& rSet,
SwNewDBMgr* pDBMgr, sal_Bool bLabel) :
SfxTabDialog( pParent, SW_RES(DLG_LAB), &rSet, sal_False ),
@@ -144,7 +126,7 @@ SwLabDlg::SwLabDlg(Window* pParent, const SfxItemSet& rSet,
GetOKButton().SetText(String(SW_RES(STR_BTN_NEW_DOC)));
GetOKButton().SetHelpId(HID_LABEL_INSERT);
- GetOKButton().SetHelpText(aEmptyStr); // Damit generierter Hilfetext verwendet wird
+ GetOKButton().SetHelpText(aEmptyStr); // in order for generated help text to get used
AddTabPage(TP_LAB_LAB, m_bLabel ? sFormat : sMedium ,SwLabPage ::Create, 0, sal_False, 0);
AddTabPage(TP_VISITING_CARDS, SwVisitingCardPage::Create, 0);
@@ -164,7 +146,7 @@ SwLabDlg::SwLabDlg(Window* pParent, const SfxItemSet& rSet,
{
SetText(sBusinessCardDlg);
}
- // Benutzer-Etikette aus writer.cfg lesen
+ // Read user label from writer.cfg
SwLabItem aItem((const SwLabItem&)rSet.Get( FN_LABEL ));
SwLabRec* pRec = new SwLabRec;
const String aTmp( SW_RES( STR_CUSTOM ) );
@@ -198,17 +180,15 @@ SwLabDlg::SwLabDlg(Window* pParent, const SfxItemSet& rSet,
if ( aMakes.Count() )
_ReplaceGroup( *aMakes[nLstGroup] );
+
if (pExampleSet)
pExampleSet->Put(aItem);
}
-// --------------------------------------------------------------------------
-
SwLabDlg::~SwLabDlg()
{
delete pRecs;
}
-// --------------------------------------------------------------------------
void SwLabDlg::GetLabItem(SwLabItem &rItem)
{
@@ -216,23 +196,21 @@ void SwLabDlg::GetLabItem(SwLabItem &rItem)
const SwLabItem& rOldItem = (const SwLabItem&)GetInputSetImpl()->Get(FN_LABEL);
if (rActItem != rOldItem)
- { // Wurde schon mal mit (hoffentlich) korrektem Inhalt "geputtet"
+ {
+ // Was already "put" with (hopefully) correct content
rItem = rActItem;
}
else
{
rItem = rOldItem;
- // Im rItem stehen (vom Namen mal abgesehen) immer nur die
- // benutzerdefinierbaren Einstellungen. Daher richtige Werte
- // direkt aus dem Record besorgen:
+ // In rItem there are only settings defined by users.
+ // Therefore get the real settings directly from Record
SwLabRec* pRec = GetRecord(rItem.aType, rItem.bCont);
pRec->FillItem( rItem );
}
}
-// --------------------------------------------------------------------------
-
SwLabRec* SwLabDlg::GetRecord(const String &rRecName, sal_Bool bCont)
{
SwLabRec* pRec = NULL;
@@ -250,14 +228,12 @@ SwLabRec* SwLabDlg::GetRecord(const String &rRecName, sal_Bool bCont)
break;
}
}
- if (!bFound) // Benutzerdefiniert
+ if (!bFound) // User defined
pRec = Recs()[0];
return(pRec);
}
-// --------------------------------------------------------------------------
-
Printer *SwLabDlg::GetPrt()
{
if (pPrtPage)
@@ -266,7 +242,6 @@ Printer *SwLabDlg::GetPrt()
return (NULL);
}
-// --------------------------------------------------------------------------
SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_LAB_LAB), rSet),
pNewDBMgr(NULL),
@@ -299,7 +274,7 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) :
SetExchangeSupport();
- // Handler installieren
+ // Install handlers
aAddrBox .SetClickHdl (LINK(this, SwLabPage, AddrHdl ));
aDatabaseLB .SetSelectHdl(LINK(this, SwLabPage, DatabaseHdl ));
aTableLB .SetSelectHdl(LINK(this, SwLabPage, DatabaseHdl ));
@@ -318,24 +293,19 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) :
{
String &rStr = *GetParent()->Makes()[i];
aMakeBox.InsertEntry( rStr );
+
if ( rStr == String(aItem.aLstMake) )
nLstGroup = i;
}
-// Reset(rSet);
+
aMakeBox.SelectEntryPos( nLstGroup );
aMakeBox.GetSelectHdl().Call( &aMakeBox );
}
-// --------------------------------------------------------------------------
-
-
-
SwLabPage::~SwLabPage()
{
}
-/* -----------------29.09.99 09:08-------------------
- --------------------------------------------------*/
void lcl_ChgYPos(Window& rWin, long nDiff)
{
Point aTempPos(rWin.GetPosPixel());
@@ -367,7 +337,6 @@ void SwLabPage::SetToBusinessCard()
Point aFLPos(aWritingFL.GetPosPixel());
long nDiffPos = aFormatFL.GetPosPixel().Y() - aFLPos.Y();
Size aFLSz(aFormatFL.GetSizePixel());
-// aFLSz.Height() += nDiffPos;
aFormatFL.SetPosSizePixel(aFLPos, aFLSz);
// move all controls up
@@ -387,23 +356,18 @@ void SwLabPage::SetToBusinessCard()
aTypeBox.SetPosPixel(aLBPos);
};
-// --------------------------------------------------------------------------
-
-
IMPL_LINK( SwLabPage, AddrHdl, Button *, EMPTYARG )
{
String aWriting;
+
if ( aAddrBox.IsChecked() )
aWriting = MakeSender();
+
aWritingEdit.SetText( aWriting.ConvertLineEnd() );
aWritingEdit.GrabFocus();
return 0;
}
-// --------------------------------------------------------------------------
-
-
-
IMPL_LINK( SwLabPage, DatabaseHdl, ListBox *, pListBox )
{
sActDBName = aDatabaseLB.GetSelectEntry();
@@ -412,12 +376,11 @@ IMPL_LINK( SwLabPage, DatabaseHdl, ListBox *, pListBox )
if (pListBox == &aDatabaseLB)
GetNewDBMgr()->GetTableNames(&aTableLB, sActDBName);
+
GetNewDBMgr()->GetColumnNames(&aDBFieldLB, sActDBName, aTableLB.GetSelectEntry());
return 0;
}
-
-
IMPL_LINK( SwLabPage, FieldHdl, Button *, EMPTYARG )
{
String aStr ( '<' );
@@ -436,10 +399,6 @@ IMPL_LINK( SwLabPage, FieldHdl, Button *, EMPTYARG )
return 0;
}
-// --------------------------------------------------------------------------
-
-
-
IMPL_LINK_INLINE_START( SwLabPage, PageHdl, Button *, EMPTYARG )
{
aMakeBox.GetSelectHdl().Call( &aMakeBox );
@@ -447,10 +406,6 @@ IMPL_LINK_INLINE_START( SwLabPage, PageHdl, Button *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwLabPage, PageHdl, Button *, EMPTYARG )
-// --------------------------------------------------------------------------
-
-
-
IMPL_LINK( SwLabPage, MakeHdl, ListBox *, EMPTYARG )
{
WaitObject aWait( GetParent() );
@@ -505,10 +460,6 @@ IMPL_LINK( SwLabPage, MakeHdl, ListBox *, EMPTYARG )
return 0;
}
-// --------------------------------------------------------------------------
-
-
-
IMPL_LINK_INLINE_START( SwLabPage, TypeHdl, ListBox *, EMPTYARG )
{
DisplayFormat();
@@ -517,10 +468,6 @@ IMPL_LINK_INLINE_START( SwLabPage, TypeHdl, ListBox *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwLabPage, TypeHdl, ListBox *, EMPTYARG )
-// --------------------------------------------------------------------------
-
-
-
void SwLabPage::DisplayFormat()
{
MetricField aField(this, WinBits(0));
@@ -552,8 +499,6 @@ void SwLabPage::DisplayFormat()
aFormatInfo.SetText(aText);
}
-// --------------------------------------------------------------------------
-
SwLabRec* SwLabPage::GetSelectedEntryPos()
{
String sSelEntry(aTypeBox.GetSelectEntry());
@@ -561,10 +506,6 @@ SwLabRec* SwLabPage::GetSelectedEntryPos()
return GetParent()->GetRecord(sSelEntry, aContButton.IsChecked());
}
-// --------------------------------------------------------------------------
-
-
-
void SwLabPage::InitDatabaseBox()
{
if( GetNewDBMgr() )
@@ -587,18 +528,16 @@ void SwLabPage::InitDatabaseBox()
}
}
-// --------------------------------------------------------------------------
SfxTabPage* SwLabPage::Create(Window* pParent, const SfxItemSet& rSet)
{
return new SwLabPage(pParent, rSet);
}
-// --------------------------------------------------------------------------
void SwLabPage::ActivatePage(const SfxItemSet& rSet)
{
Reset( rSet );
}
-// --------------------------------------------------------------------------
+
int SwLabPage::DeactivatePage(SfxItemSet* _pSet)
{
if (_pSet)
@@ -607,10 +546,6 @@ int SwLabPage::DeactivatePage(SfxItemSet* _pSet)
return sal_True;
}
-// --------------------------------------------------------------------------
-
-
-
void SwLabPage::FillItem(SwLabItem& rItem)
{
rItem.bAddr = aAddrBox.IsChecked();
@@ -627,10 +562,6 @@ void SwLabPage::FillItem(SwLabItem& rItem)
rItem.aLstType = aTypeBox.GetSelectEntry();
}
-// --------------------------------------------------------------------------
-
-
-
sal_Bool SwLabPage::FillItemSet(SfxItemSet& rSet)
{
FillItem( aItem );
@@ -639,8 +570,6 @@ sal_Bool SwLabPage::FillItemSet(SfxItemSet& rSet)
return sal_True;
}
-// --------------------------------------------------------------------------
-
void SwLabPage::Reset(const SfxItemSet& rSet)
{
aItem = (const SwLabItem&) rSet.Get(FN_LABEL);
@@ -685,10 +614,6 @@ void SwLabPage::Reset(const SfxItemSet& rSet)
aSheetButton.Check();
}
-/*-- 08.07.99 14:00:02---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-//-----------------------------------------------------------------------------
void SwVisitingCardPage::ClearUserData()
{
SvLBoxEntry* pEntry = aAutoTextLB.First();
@@ -699,8 +624,6 @@ void SwVisitingCardPage::ClearUserData()
}
}
-//-----------------------------------------------------------------------------
-
void SwVisitingCardPage::SetUserData( sal_uInt32 nCnt,
const rtl::OUString* pNames, const rtl::OUString* pValues )
{
@@ -711,8 +634,6 @@ void SwVisitingCardPage::SetUserData( sal_uInt32 nCnt,
}
}
-//-----------------------------------------------------------------------------
-
SwVisitingCardPage::SwVisitingCardPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_VISITING_CARDS), rSet),
aContentFL(this, SW_RES( FL_CONTENT )),
@@ -740,9 +661,7 @@ SwVisitingCardPage::SwVisitingCardPage(Window* pParent, const SfxItemSet& rSet)
aAutoTextGroupLB.Show();
InitFrameControl();
}
-/*-- 08.07.99 14:00:03---------------------------------------------------
- -----------------------------------------------------------------------*/
SwVisitingCardPage::~SwVisitingCardPage()
{
for(sal_uInt16 i = 0; i < aAutoTextGroupLB.GetEntryCount(); i++)
@@ -752,38 +671,31 @@ SwVisitingCardPage::~SwVisitingCardPage()
ClearUserData();
delete pExampleFrame;
}
-/*-- 08.07.99 14:00:03---------------------------------------------------
- -----------------------------------------------------------------------*/
SfxTabPage* SwVisitingCardPage::Create(Window* pParent, const SfxItemSet& rSet)
{
return new SwVisitingCardPage(pParent, rSet);
}
-/*-- 08.07.99 14:00:03---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwVisitingCardPage::ActivatePage(const SfxItemSet& rSet)
{
Reset( rSet );
UpdateFields();
}
-/*-- 08.07.99 14:00:04---------------------------------------------------
- -----------------------------------------------------------------------*/
int SwVisitingCardPage::DeactivatePage(SfxItemSet* _pSet)
{
if (_pSet)
FillItemSet(*_pSet);
return LEAVE_PAGE;
}
-/*-- 08.07.99 14:00:04---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwVisitingCardPage::FillItemSet(SfxItemSet& rSet)
{
String* pGroup = (String*)aAutoTextGroupLB.GetEntryData(
aAutoTextGroupLB.GetSelectEntryPos());
- DBG_ASSERT(pGroup, "no group selected?");
+ OSL_ENSURE(pGroup, "no group selected?");
+
if(pGroup)
aLabItem.sGlossaryGroup = *pGroup;
@@ -793,9 +705,7 @@ sal_Bool SwVisitingCardPage::FillItemSet(SfxItemSet& rSet)
rSet.Put(aLabItem);
return sal_True;
}
-/*-- 08.07.99 14:00:05---------------------------------------------------
- -----------------------------------------------------------------------*/
void lcl_SelectBlock(SvTreeListBox& rAutoTextLB, const String& rBlockName)
{
SvLBoxEntry* pEntry = rAutoTextLB.First();
@@ -810,7 +720,7 @@ void lcl_SelectBlock(SvTreeListBox& rAutoTextLB, const String& rBlockName)
pEntry = rAutoTextLB.Next(pEntry);
}
}
-//-----------------------------------------------------------------------------
+
sal_Bool lcl_FindBlock(SvTreeListBox& rAutoTextLB, const String& rBlockName)
{
SvLBoxEntry* pEntry = rAutoTextLB.First();
@@ -826,7 +736,6 @@ sal_Bool lcl_FindBlock(SvTreeListBox& rAutoTextLB, const String& rBlockName)
return sal_False;
}
-//-----------------------------------------------------------------------------
void SwVisitingCardPage::Reset(const SfxItemSet& rSet)
{
aLabItem = (const SwLabItem&) rSet.Get(FN_LABEL);
@@ -872,9 +781,6 @@ void SwVisitingCardPage::Reset(const SfxItemSet& rSet)
}
}
-/* -----------------29.09.99 08:55-------------------
-
- --------------------------------------------------*/
SwPrivateDataPage::SwPrivateDataPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_PRIVATE_DATA), rSet),
aDataFL (this, SW_RES( FL_DATA )),
@@ -913,38 +819,27 @@ SwPrivateDataPage::SwPrivateDataPage(Window* pParent, const SfxItemSet& rSet) :
SetExchangeSupport();
}
-/*-- 29.09.99 08:55:57---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwPrivateDataPage::~SwPrivateDataPage()
{
}
-/*-- 29.09.99 08:55:57---------------------------------------------------
- -----------------------------------------------------------------------*/
SfxTabPage* SwPrivateDataPage::Create(Window* pParent, const SfxItemSet& rSet)
{
return new SwPrivateDataPage(pParent, rSet);
}
-/*-- 29.09.99 08:55:57---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwPrivateDataPage::ActivatePage(const SfxItemSet& rSet)
{
Reset(rSet);
}
-/*-- 29.09.99 08:55:58---------------------------------------------------
- -----------------------------------------------------------------------*/
int SwPrivateDataPage::DeactivatePage(SfxItemSet* _pSet)
{
if (_pSet)
FillItemSet(*_pSet);
return LEAVE_PAGE;
}
-/*-- 29.09.99 08:55:58---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwPrivateDataPage::FillItemSet(SfxItemSet& rSet)
{
@@ -971,9 +866,7 @@ sal_Bool SwPrivateDataPage::FillItemSet(SfxItemSet& rSet)
rSet.Put(aItem);
return sal_True;
}
-/*-- 29.09.99 08:55:59---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwPrivateDataPage::Reset(const SfxItemSet& rSet)
{
const SwLabItem& aItem = (const SwLabItem&) rSet.Get(FN_LABEL);
@@ -996,9 +889,7 @@ void SwPrivateDataPage::Reset(const SfxItemSet& rSet)
aHomePageED .SetText(aItem.aPrivWWW);
aMailED .SetText(aItem.aPrivMail);
}
-/* -----------------29.09.99 08:56-------------------
- --------------------------------------------------*/
SwBusinessDataPage::SwBusinessDataPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_BUSINESS_DATA), rSet),
aDataFL (this, SW_RES( FL_DATA )),
@@ -1031,38 +922,28 @@ SwBusinessDataPage::SwBusinessDataPage(Window* pParent, const SfxItemSet& rSet)
SetExchangeSupport();
}
-/*-- 29.09.99 08:56:06---------------------------------------------------
- -----------------------------------------------------------------------*/
SwBusinessDataPage::~SwBusinessDataPage()
{
}
-/*-- 29.09.99 08:56:06---------------------------------------------------
- -----------------------------------------------------------------------*/
SfxTabPage* SwBusinessDataPage::Create(Window* pParent, const SfxItemSet& rSet)
{
return new SwBusinessDataPage(pParent, rSet);
}
-/*-- 29.09.99 08:56:06---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwBusinessDataPage::ActivatePage(const SfxItemSet& rSet)
{
Reset(rSet);
}
-/*-- 29.09.99 08:56:06---------------------------------------------------
- -----------------------------------------------------------------------*/
int SwBusinessDataPage::DeactivatePage(SfxItemSet* _pSet)
{
if (_pSet)
FillItemSet(*_pSet);
return LEAVE_PAGE;
}
-/*-- 29.09.99 08:56:06---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwBusinessDataPage::FillItemSet(SfxItemSet& rSet)
{
SwLabItem aItem = (const SwLabItem&) GetTabDialog()->GetExampleSet()->Get(FN_LABEL);
@@ -1085,9 +966,7 @@ sal_Bool SwBusinessDataPage::FillItemSet(SfxItemSet& rSet)
rSet.Put(aItem);
return sal_True;
}
-/*-- 29.09.99 08:56:07---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwBusinessDataPage::Reset(const SfxItemSet& rSet)
{
const SwLabItem& aItem = (const SwLabItem&) rSet.Get(FN_LABEL);
@@ -1109,3 +988,4 @@ void SwBusinessDataPage::Reset(const SfxItemSet& rSet)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/labelcfg.cxx b/sw/source/ui/envelp/labelcfg.cxx
index d9981dced2e9..2c74e5922a92 100644
--- a/sw/source/ui/envelp/labelcfg.cxx
+++ b/sw/source/ui/envelp/labelcfg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,27 +38,21 @@
#include <unomid.h>
using namespace utl;
-using namespace rtl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
-/* -----------------------------15.01.01 11:17--------------------------------
+using ::rtl::OUString;
- ---------------------------------------------------------------------------*/
SwLabelConfig::SwLabelConfig() :
ConfigItem(C2U("Office.Labels/Manufacturer"))
{
aNodeNames = GetNodeNames(OUString());
}
-/* -----------------------------06.09.00 16:50--------------------------------
- ---------------------------------------------------------------------------*/
SwLabelConfig::~SwLabelConfig()
{
}
-/* -----------------------------06.09.00 16:43--------------------------------
- ---------------------------------------------------------------------------*/
void SwLabelConfig::Commit()
{
// the config item is not writable yet
@@ -65,9 +60,6 @@ void SwLabelConfig::Commit()
void SwLabelConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
-/* -----------------------------15.01.01 11:42--------------------------------
-
- ---------------------------------------------------------------------------*/
Sequence<OUString> lcl_CreatePropertyNames(const OUString& rPrefix)
{
Sequence<OUString> aProperties(2);
@@ -79,7 +71,7 @@ Sequence<OUString> lcl_CreatePropertyNames(const OUString& rPrefix)
pProperties[ 1] += C2U("Measure");
return aProperties;
}
-//-----------------------------------------------------------------------------
+
SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufacturer)
{
SwLabRec* pNewRec = new SwLabRec;
@@ -95,8 +87,8 @@ SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufactur
case 0: pValues[nProp] >>= sTmp; pNewRec->aType = sTmp; break;
case 1:
{
-//all values are contained as colon-separated 1/100 mm values except for the
-//continuous flag ('C'/'S')
+ //all values are contained as colon-separated 1/100 mm values
+ //except for the continuous flag ('C'/'S')
pValues[nProp] >>= sTmp;
String sMeasure(sTmp);
sal_uInt16 nTokenCount = sMeasure.GetTokenCount(';');
@@ -124,7 +116,7 @@ SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufactur
}
return pNewRec;
}
-//-----------------------------------------------------------------------------
+
Sequence<PropertyValue> lcl_CreateProperties(
Sequence<OUString>& rPropNames, const SwLabRec& rRec)
{
@@ -158,7 +150,7 @@ Sequence<PropertyValue> lcl_CreateProperties(
}
return aRet;
}
-//-----------------------------------------------------------------------------
+
void SwLabelConfig::FillLabels(const OUString& rManufacturer, SwLabRecs& rLabArr)
{
OUString sManufacturer(wrapConfigurationElementName(rManufacturer));
@@ -176,9 +168,7 @@ void SwLabelConfig::FillLabels(const OUString& rManufacturer, SwLabRecs& rLab
rLabArr.C40_INSERT( SwLabRec, pNewRec, rLabArr.Count() );
}
}
-/* -----------------------------23.01.01 11:36--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwLabelConfig::HasLabel(const rtl::OUString& rManufacturer, const rtl::OUString& rType)
{
const OUString* pNode = aNodeNames.getConstArray();
@@ -215,9 +205,7 @@ sal_Bool SwLabelConfig::HasLabel(const rtl::OUString& rManufacturer, const rt
}
return sal_False;
}
-/* -----------------------------23.01.01 11:36--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool lcl_Exists(const OUString& rNode, const Sequence<OUString>& rLabels)
{
const OUString* pLabels = rLabels.getConstArray();
@@ -226,7 +214,7 @@ sal_Bool lcl_Exists(const OUString& rNode, const Sequence<OUString>& rLabels)
return sal_True;
return sal_False;
}
-//-----------------------------------------------------------------------------
+
void SwLabelConfig::SaveLabel( const rtl::OUString& rManufacturer,
const rtl::OUString& rType, const SwLabRec& rRec)
{
@@ -241,7 +229,7 @@ void SwLabelConfig::SaveLabel( const rtl::OUString& rManufacturer,
{
if(!AddNode(OUString(), rManufacturer))
{
- DBG_ERROR("New configuration node could not be created");
+ OSL_ENSURE(false, "New configuration node could not be created");
return ;
}
else
@@ -300,3 +288,4 @@ void SwLabelConfig::SaveLabel( const rtl::OUString& rManufacturer,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx
index 7af41110fff8..5e8bef108bb9 100644
--- a/sw/source/ui/envelp/labelexp.cxx
+++ b/sw/source/ui/envelp/labelexp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,9 +57,6 @@ using ::rtl::OUString;
#endif
#define SW_PROP_NAME_STR(nId) SwGetPropName((nId)).pName
-/* -----------------08.07.99 15:15-------------------
-
- --------------------------------------------------*/
void SwVisitingCardPage::InitFrameControl()
{
Link aLink(LINK(this, SwVisitingCardPage, FrameControlInitializedHdl));
@@ -75,7 +73,7 @@ void SwVisitingCardPage::InitFrameControl()
uno::Sequence<OUString> aNames = _xAutoText->getElementNames();
const OUString* pGroups = aNames.getConstArray();
- OUString uTitleName( C2U(SW_PROP_NAME_STR(UNO_NAME_TITLE)) );
+ OUString uTitleName( rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_TITLE)) );
for(sal_uInt16 i = 0; i < aNames.getLength(); i++)
{
@@ -126,9 +124,7 @@ void SwVisitingCardPage::InitFrameControl()
}
}
}
-/* -----------------01.10.99 13:19-------------------
- --------------------------------------------------*/
IMPL_LINK( SwVisitingCardPage, FrameControlInitializedHdl, void*, EMPTYARG )
{
SvLBoxEntry* pSel = aAutoTextLB.FirstSelected();
@@ -161,9 +157,7 @@ IMPL_LINK( SwVisitingCardPage, FrameControlInitializedHdl, void*, EMPTYARG )
}
return 0;
}
-/* -----------------22.07.99 11:06-------------------
- --------------------------------------------------*/
IMPL_LINK( SwVisitingCardPage, AutoTextSelectHdl, void*, pBox )
{
if(_xAutoText.is())
@@ -190,9 +184,6 @@ IMPL_LINK( SwVisitingCardPage, AutoTextSelectHdl, void*, pBox )
return 0;
}
-/* -----------------01.10.99 11:59-------------------
-
- --------------------------------------------------*/
void SwVisitingCardPage::UpdateFields()
{
uno::Reference< frame::XModel > xModel;
@@ -201,9 +192,7 @@ void SwVisitingCardPage::UpdateFields()
SwLabDlg::UpdateFieldInformation(xModel, aLabItem);
}
}
-/* -----------------01.10.99 15:16-------------------
- --------------------------------------------------*/
void SwLabDlg::UpdateFieldInformation(uno::Reference< frame::XModel > & xModel, const SwLabItem& rItem)
{
uno::Reference< text::XTextFieldsSupplier > xFlds(xModel, uno::UNO_QUERY);
@@ -252,7 +241,7 @@ void SwLabDlg::UpdateFieldInformation(uno::Reference< frame::XModel > & xModel,
{
String sFldName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM(
"com.sun.star.text.FieldMaster.User." )));
- OUString uCntName( C2U( SW_PROP_NAME_STR(UNO_NAME_CONTENT )));
+ OUString uCntName( rtl::OUString::createFromAscii( SW_PROP_NAME_STR(UNO_NAME_CONTENT )));
for( const _SwLabItemMap* p = aArr; p->pName; ++p )
{
String sCurFldName( sFldName );
@@ -279,3 +268,4 @@ void SwLabDlg::UpdateFieldInformation(uno::Reference< frame::XModel > & xModel,
xRefresh->refresh();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index a4ed05353058..4567ae74c747 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,15 +49,13 @@
#include <unomid.h>
using namespace utl;
-using namespace rtl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
-// #define ------------------------------------------------------------------
+using ::rtl::OUString;
#define ROUND(x) ((sal_uInt16) ((x) + .5))
-// --------------------------------------------------------------------------
SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
Window((Window*) pParent, rResID),
@@ -99,18 +98,17 @@ SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
lXHeight = GetTextHeight();
lXWidth = GetTextWidth('X');
- // Skalierungsfaktor
+ // Scale factor
float fx = (float)(lOutWPix - (2 * (lLeftWidth + 15))) / (float)lOutWPix;
lOutWPix23 = (long)((float)lOutWPix * fx);
lOutHPix23 = (long)((float)lOutHPix * fx);
}
-// --------------------------------------------------------------------------
SwLabPreview::~SwLabPreview()
{
}
-// --------------------------------------------------------------------------
+
void SwLabPreview::Paint(const Rectangle &)
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -130,7 +128,7 @@ void SwLabPreview::Paint(const Rectangle &)
aPaintFont.SetTransparent(sal_False);
SetFont(aPaintFont);
- // Groesse des darzustellenden Bereichs
+ // size of region to be displayed
long lDispW = ROUND(aItem.lLeft + aItem.lHDist);
long lDispH = ROUND(aItem.lUpper + aItem.lVDist);
if (aItem.nCols == 1)
@@ -142,12 +140,12 @@ void SwLabPreview::Paint(const Rectangle &)
else
lDispH += ROUND(aItem.lVDist / 10);
- // Skalierungsfaktor
+ // Scale factor
float fx = (float) lOutWPix23 / Max(1L, lDispW),
fy = (float) lOutHPix23 / Max(1L, lDispH),
f = fx < fy ? fx : fy;
- // Nullpunkt
+ // zero point
long lOutlineW = ROUND(f * lDispW);
long lOutlineH = ROUND(f * lDispH);
@@ -160,19 +158,19 @@ void SwLabPreview::Paint(const Rectangle &)
long lX3 = ROUND(lX0 + f * (aItem.lLeft + aItem.lHDist ));
long lY3 = ROUND(lY0 + f * (aItem.lUpper + aItem.lVDist ));
- // Umriss zeichnen (Flaeche)
+ // draw outline (area)
DrawRect(Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH)));
- // Umriss zeichnen (Umrandung)
+ // draw outline (border)
SetLineColor(rFieldTextColor);
- DrawLine(Point(lX0, lY0), Point(lX0 + lOutlineW - 1, lY0)); // Oben
- DrawLine(Point(lX0, lY0), Point(lX0, lY0 + lOutlineH - 1)); // Links
+ DrawLine(Point(lX0, lY0), Point(lX0 + lOutlineW - 1, lY0)); // Up
+ DrawLine(Point(lX0, lY0), Point(lX0, lY0 + lOutlineH - 1)); // Left
if (aItem.nCols == 1)
- DrawLine(Point(lX0 + lOutlineW - 1, lY0), Point(lX0 + lOutlineW - 1, lY0 + lOutlineH - 1)); // Rechts
+ DrawLine(Point(lX0 + lOutlineW - 1, lY0), Point(lX0 + lOutlineW - 1, lY0 + lOutlineH - 1)); // Right
if (aItem.nRows == 1)
- DrawLine(Point(lX0, lY0 + lOutlineH - 1), Point(lX0 + lOutlineW - 1, lY0 + lOutlineH - 1)); // Unten
+ DrawLine(Point(lX0, lY0 + lOutlineH - 1), Point(lX0 + lOutlineW - 1, lY0 + lOutlineH - 1)); // Down
- // Etiketten
+ // Labels
SetClipRegion (Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH)));
SetFillColor(rWinColor);
for (sal_uInt16 nRow = 0; nRow < Min((sal_uInt16) 2, (sal_uInt16) aItem.nRows); nRow++)
@@ -184,7 +182,7 @@ void SwLabPreview::Paint(const Rectangle &)
ROUND(f * aItem.lHeight))));
SetClipRegion();
- // Beschritung: Rand links
+ // annotation: left border
if (aItem.lLeft)
{
long lX = (lX0 + lX1) / 2;
@@ -193,14 +191,14 @@ void SwLabPreview::Paint(const Rectangle &)
DrawText(Point(lX1 - lLeftWidth, lY0 - 10 - lXHeight), aLeftStr);
}
- // Beschriftung: Rand oben
+ // annotation: upper border
if (aItem.lUpper)
{
DrawArrow(Point(lX0 - 5, lY0), Point(lX0 - 5, lY1), sal_False);
DrawText(Point(lX0 - 10 - lUpperWidth, ROUND(lY0 + f * aItem.lUpper / 2 - lXHeight / 2)), aUpperStr);
}
- // Beschriftung: Breite und Hoehe
+ // annotation: width and height
{
long lX = lX2 - lXWidth / 2 - lHeightWidth / 2;
long lY = lY1 + lXHeight;
@@ -212,7 +210,7 @@ void SwLabPreview::Paint(const Rectangle &)
DrawText(Point(lX - lHeightWidth / 2, lY2 - lXHeight - lXHeight / 2), aHeightStr);
}
- // Beschriftung: Horz. Abstand
+ // annotation: horizontal gap
if (aItem.nCols > 1)
{
long lX = (lX1 + lX3) / 2;
@@ -221,21 +219,21 @@ void SwLabPreview::Paint(const Rectangle &)
DrawText(Point(lX - lHDistWidth / 2, lY0 - 10 - lXHeight), aHDistStr);
}
- // Beschriftung: Vertikaler Abstand
+ // annotation: vertical gap
if (aItem.nRows > 1)
{
DrawArrow(Point(lX0 - 5, lY1), Point(lX0 - 5, lY3), sal_False);
DrawText(Point(lX0 - 10 - lVDistWidth, ROUND(lY1 + f * aItem.lVDist / 2 - lXHeight / 2)), aVDistStr);
}
- // Beschriftung: Spalten
+ // annotation: columns
{
long lY = lY0 + lOutlineH + 4;
DrawArrow(Point(lX0, lY), Point(lX0 + lOutlineW - 1, lY), sal_True);
DrawText(Point((lX0 + lX0 + lOutlineW - 1) / 2 - lColsWidth / 2, lY + 5), aColsStr);
}
- // Beschriftung: Zeilen
+ // annotation: lines
{
long lX = lX0 + lOutlineW + 4;
DrawArrow(Point(lX, lY0), Point(lX, lY0 + lOutlineH - 1), sal_True);
@@ -243,9 +241,7 @@ void SwLabPreview::Paint(const Rectangle &)
}
}
-// Pfeil bzw. Intervall zeichnen --------------------------------------------
-
-
+// Arror or interval character --------------------------------------------
void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, sal_Bool bArrow)
{
@@ -255,10 +251,10 @@ void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, sal_Bool bArrow
{
Point aArr[3];
- // Pfeil zeichnen
+ // Arrow character
if (rP1.Y() == rP2.Y())
{
- // Waagerecht
+ // Horizontal
aArr[0].X() = rP2.X() - 5;
aArr[0].Y() = rP2.Y() - 2;
aArr[1].X() = rP2.X();
@@ -268,7 +264,7 @@ void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, sal_Bool bArrow
}
else
{
- // Senkrecht
+ // Vertical
aArr[0].X() = rP2.X() - 2;
aArr[0].Y() = rP2.Y() - 5;
aArr[1].X() = rP2.X() + 2;
@@ -283,34 +279,28 @@ void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, sal_Bool bArrow
}
else
{
- // Intervall zeichnen
+ // Interval symbol
if (rP1.Y() == rP2.Y())
{
- // Waagerecht
+ // Horizontal
DrawLine(Point(rP1.X(), rP1.Y() - 2), Point(rP1.X(), rP1.Y() + 2));
DrawLine(Point(rP2.X(), rP2.Y() - 2), Point(rP2.X(), rP2.Y() + 2));
}
else
{
- // Senkrecht
+ // Vertical
DrawLine(Point(rP1.X() - 2, rP1.Y()), Point(rP1.X() + 2, rP1.Y()));
DrawLine(Point(rP2.X() - 2, rP2.Y()), Point(rP2.X() + 2, rP2.Y()));
}
}
}
-// --------------------------------------------------------------------------
-
void SwLabPreview::Update(const SwLabItem& rItem)
{
aItem = rItem;
Invalidate();
}
-// --------------------------------------------------------------------------
-
-
-
SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_LAB_FMT), rSet),
@@ -340,7 +330,7 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
FreeResource();
SetExchangeSupport();
- // Metriken
+ // Metrics
FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aHDistField , aMetric);
SetMetric(aVDistField , aMetric);
@@ -349,7 +339,7 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
SetMetric(aLeftField , aMetric);
SetMetric(aUpperField , aMetric);
- // Handler installieren
+ // Install handlers
Link aLk = LINK(this, SwLabFmtPage, ModifyHdl);
aHDistField .SetModifyHdl( aLk );
aVDistField .SetModifyHdl( aLk );
@@ -371,23 +361,16 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
aRowsField .SetLoseFocusHdl( aLk );
aSavePB.SetClickHdl( LINK (this, SwLabFmtPage, SaveHdl));
- // Timer einstellen
+ // Set timer
aPreviewTimer.SetTimeout(1000);
aPreviewTimer.SetTimeoutHdl(LINK(this, SwLabFmtPage, PreviewHdl));
}
-// --------------------------------------------------------------------------
-
-
-
SwLabFmtPage::~SwLabFmtPage()
{
}
-// Modify-Handler der MetricFields. Preview-Timer starten -------------------
-
-
-
+// Modify-handler of MetricFields. start preview timer
IMPL_LINK_INLINE_START( SwLabFmtPage, ModifyHdl, Edit *, EMPTYARG )
{
bModified = sal_True;
@@ -396,10 +379,7 @@ IMPL_LINK_INLINE_START( SwLabFmtPage, ModifyHdl, Edit *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwLabFmtPage, ModifyHdl, Edit *, EMPTYARG )
-// Preview invalidaten ------------------------------------------------------
-
-
-
+// Invalidate preview
IMPL_LINK_INLINE_START( SwLabFmtPage, PreviewHdl, Timer *, EMPTYARG )
{
aPreviewTimer.Stop();
@@ -411,10 +391,7 @@ IMPL_LINK_INLINE_START( SwLabFmtPage, PreviewHdl, Timer *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwLabFmtPage, PreviewHdl, Timer *, EMPTYARG )
-// LoseFocus-Handler: Bei Aenderung sofort updaten --------------------------
-
-
-
+// LoseFocus-Handler: Update on change --------------------------
IMPL_LINK_INLINE_START( SwLabFmtPage, LoseFocusHdl, Control *, pControl )
{
if (((Edit*) pControl)->IsModified())
@@ -423,14 +400,11 @@ IMPL_LINK_INLINE_START( SwLabFmtPage, LoseFocusHdl, Control *, pControl )
}
IMPL_LINK_INLINE_END( SwLabFmtPage, LoseFocusHdl, Control *, pControl )
-// Minima und Maxima fuer Fields festlegen ----------------------------------
-
-
void SwLabFmtPage::ChangeMinMax()
{
long lMax = 31748; // 56 cm
- // Min und Max
+ // Min and Max
long lLeft = static_cast< long >(GETFLDVAL(aLeftField )),
lUpper = static_cast< long >(GETFLDVAL(aUpperField)),
@@ -457,7 +431,7 @@ void SwLabFmtPage::ChangeMinMax()
aColsField .SetMax((lMax - lLeft ) / Max(1L, lHDist));
aRowsField .SetMax((lMax - lUpper) / Max(1L, lVDist));
- // First und Last
+ // First and Last
aHDistField .SetFirst(aHDistField .GetMin());
aVDistField .SetFirst(aVDistField .GetMin());
@@ -487,29 +461,17 @@ void SwLabFmtPage::ChangeMinMax()
aRowsField .Reformat();
}
-// --------------------------------------------------------------------------
-
-
-
SfxTabPage* SwLabFmtPage::Create(Window* pParent, const SfxItemSet& rSet)
{
return new SwLabFmtPage(pParent, rSet);
}
-// ----------------------------------------------------------------------------
-
-
-
void SwLabFmtPage::ActivatePage(const SfxItemSet& rSet)
{
SfxItemSet aSet(rSet);
Reset(aSet);
}
-// ----------------------------------------------------------------------------
-
-
-
int SwLabFmtPage::DeactivatePage(SfxItemSet* _pSet)
{
if (_pSet)
@@ -518,10 +480,6 @@ int SwLabFmtPage::DeactivatePage(SfxItemSet* _pSet)
return sal_True;
}
-// --------------------------------------------------------------------------
-
-
-
void SwLabFmtPage::FillItem(SwLabItem& rItem)
{
if (bModified)
@@ -540,10 +498,6 @@ void SwLabFmtPage::FillItem(SwLabItem& rItem)
}
}
-// --------------------------------------------------------------------------
-
-
-
sal_Bool SwLabFmtPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(aItem);
@@ -552,10 +506,9 @@ sal_Bool SwLabFmtPage::FillItemSet(SfxItemSet& rSet)
return sal_True;
}
-// --------------------------------------------------------------------------
void SwLabFmtPage::Reset(const SfxItemSet& )
{
- // Fields initialisieren
+ // Initialise fields
GetParent()->GetLabItem(aItem);
aHDistField .SetMax(100 * aItem.lHDist , FUNIT_TWIP);
@@ -581,9 +534,6 @@ void SwLabFmtPage::Reset(const SfxItemSet& )
aTypeFI.SetText(aItem.aType);
PreviewHdl(0);
}
-/* -----------------------------22.01.01 15:11--------------------------------
-
- ---------------------------------------------------------------------------*/
IMPL_LINK( SwLabFmtPage, SaveHdl, PushButton *, EMPTYARG )
{
@@ -620,9 +570,7 @@ IMPL_LINK( SwLabFmtPage, SaveHdl, PushButton *, EMPTYARG )
delete pSaveDlg;
return 0;
}
-/* -----------------------------23.01.01 10:41--------------------------------
- ---------------------------------------------------------------------------*/
SwSaveLabelDlg::SwSaveLabelDlg(SwLabFmtPage* pParent, SwLabRec& rRec) :
ModalDialog(pParent, SW_RES(DLG_SAVE_LABEL)),
aOptionsFL(this,SW_RES(FL_OPTIONS )),
@@ -654,9 +602,7 @@ SwSaveLabelDlg::SwSaveLabelDlg(SwLabFmtPage* pParent, SwLabRec& rRec) :
for(sal_Int32 i = 0; i < rMan.getLength(); i++)
aMakeCB.InsertEntry(pMan[i]);
}
-/* -----------------------------23.01.01 10:40--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwSaveLabelDlg, OkHdl, OKButton*, EMPTYARG)
{
SwLabelConfig& rCfg = pLabPage->GetParent()->GetLabelsConfig();
@@ -681,17 +627,13 @@ IMPL_LINK(SwSaveLabelDlg, OkHdl, OKButton*, EMPTYARG)
EndDialog(RET_OK);
return 0;
}
-/* -----------------------------23.01.01 11:22--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwSaveLabelDlg, ModifyHdl, Edit*, EMPTYARG)
{
aOKPB.Enable(aMakeCB.GetText().Len() && aTypeED.GetText().Len());
return 0;
}
-/* -----------------------------23.01.01 16:06--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwSaveLabelDlg::GetLabel(SwLabItem& rItem)
{
if(bSuccess)
@@ -710,3 +652,4 @@ sal_Bool SwSaveLabelDlg::GetLabel(SwLabItem& rItem)
return bSuccess;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/labfmt.hrc b/sw/source/ui/envelp/labfmt.hrc
index ae6786dce3a9..6033e7e96f7e 100644
--- a/sw/source/ui/envelp/labfmt.hrc
+++ b/sw/source/ui/envelp/labfmt.hrc
@@ -28,11 +28,9 @@
#ifndef _LABFMT_HRC
#define _LABFMT_HRC
-// #include *****************************************************************
-
#include "envelp.hrc"
-// Lokale Resourcen *********************************************************
+// local resources *********************************************************
#define WIN_PREVIEW 1
#define TXT_HDIST 2
@@ -66,7 +64,7 @@
#define PB_HELP 8
#define MB_QUERY 9
-// Globale Resourcen ********************************************************
+// global resources ********************************************************
#define STR_HDIST (RC_LABFMT_BEGIN + 1)
#define STR_VDIST (RC_LABFMT_BEGIN + 2)
@@ -77,7 +75,7 @@
#define STR_COLS (RC_LABFMT_BEGIN + 7)
#define STR_ROWS (RC_LABFMT_BEGIN + 8)
-// Ueberlaufpruefung ********************************************************
+// overflow check ********************************************************
#define LABFMT_ACT_END STR_ROWS
diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx
index 5b503c5da054..6019081157d1 100644
--- a/sw/source/ui/envelp/labfmt.hxx
+++ b/sw/source/ui/envelp/labfmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -137,9 +138,7 @@ public:
SwLabDlg* GetParent() {return (SwLabDlg*) SfxTabPage::GetParent()->GetParent();}
};
-/* -----------------------------23.01.01 10:26--------------------------------
- ---------------------------------------------------------------------------*/
class SwSaveLabelDlg : public ModalDialog
{
FixedLine aOptionsFL;
@@ -173,3 +172,4 @@ public:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/labfmt.src b/sw/source/ui/envelp/labfmt.src
index 58605e3db43d..1d0c7b7cb557 100644
--- a/sw/source/ui/envelp/labfmt.src
+++ b/sw/source/ui/envelp/labfmt.src
@@ -26,7 +26,6 @@
************************************************************************/
// #pragma ******************************************************************
- // #include *****************************************************************
#include "labfmt.hrc"
#include "helpid.h"
// TP_LAB_FMT ---------------------------------------------------------------
diff --git a/sw/source/ui/envelp/labimg.cxx b/sw/source/ui/envelp/labimg.cxx
index 88f78f950b3c..48715c375ece 100644
--- a/sw/source/ui/envelp/labimg.cxx
+++ b/sw/source/ui/envelp/labimg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <tools/stream.hxx>
-#ifndef _RESID_HXX //autogen
#include <tools/resid.hxx>
-#endif
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <unotools/useroptions.hxx>
@@ -44,11 +43,10 @@
#include <unomid.h>
using namespace utl;
-using namespace rtl;
using namespace ::com::sun::star::uno;
+using ::rtl::OUString;
-// ----------------------------------------------------------------------------
SwLabItem::SwLabItem() :
SfxPoolItem(FN_LABEL),
@@ -67,13 +65,12 @@ SwLabItem::SwLabItem() :
lHeight = 5669; // 10 cm
}
-// ----------------------------------------------------------------------------
SwLabItem::SwLabItem(const SwLabItem& rItem) :
SfxPoolItem(FN_LABEL)
{
*this = rItem;
}
-// ----------------------------------------------------------------------------
+
SwLabItem& SwLabItem::operator =(const SwLabItem& rItem)
{
bAddr = rItem.bAddr;
@@ -134,10 +131,6 @@ SwLabItem& SwLabItem::operator =(const SwLabItem& rItem)
return *this;
}
-// --------------------------------------------------------------------------
-
-
-
int SwLabItem::operator ==(const SfxPoolItem& rItem) const
{
const SwLabItem& rLab = (const SwLabItem&) rItem;
@@ -163,7 +156,7 @@ int SwLabItem::operator ==(const SfxPoolItem& rItem) const
aLstMake == rLab.aLstMake&&
aLstType == rLab.aLstType&&
sDBName == rLab.sDBName &&
- aPrivFirstName == rLab.aPrivFirstName&&
+ aPrivFirstName == rLab.aPrivFirstName&&
aPrivName == rLab.aPrivName&&
aPrivShortCut == rLab.aPrivShortCut&&
aPrivFirstName2 == rLab.aPrivFirstName2&&
@@ -199,15 +192,11 @@ int SwLabItem::operator ==(const SfxPoolItem& rItem) const
sGlossaryBlockName == rLab.sGlossaryBlockName;
}
-// --------------------------------------------------------------------------
SfxPoolItem* SwLabItem::Clone(SfxItemPool*) const
{
return new SwLabItem(*this);
}
-/* -----------------------------25.09.00 16:25--------------------------------
-
- ---------------------------------------------------------------------------*/
Sequence<rtl::OUString> SwLabCfgItem::GetPropertyNames()
{
static const char* aLabelPropNames[] =
@@ -279,9 +268,7 @@ Sequence<rtl::OUString> SwLabCfgItem::GetPropertyNames()
pNames[nIndex++] = OUString::createFromAscii(aBusinessPropNames[nBusiness]);
return aNames;
}
-/* ----------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
SwLabCfgItem::SwLabCfgItem(sal_Bool bLabel) :
ConfigItem(bLabel ? C2U("Office.Writer/Label") : C2U("Office.Writer/BusinessCard")),
bIsLabel(bLabel)
@@ -290,7 +277,7 @@ SwLabCfgItem::SwLabCfgItem(sal_Bool bLabel) :
Sequence<Any> aValues = GetProperties(aNames);
EnableNotification(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
sal_Bool bNoConfigValues = sal_True;
if(aValues.getLength() == aNames.getLength())
{
@@ -404,9 +391,7 @@ SwLabCfgItem::SwLabCfgItem(sal_Bool bLabel) :
SetModified();
}
}
-/* -----------------------------25.09.00 16:26--------------------------------
- ---------------------------------------------------------------------------*/
void SwLabCfgItem::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
void SwLabCfgItem::Commit()
@@ -480,3 +465,4 @@ void SwLabCfgItem::Commit()
PutProperties(aNames, aValues);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/labimp.hxx b/sw/source/ui/envelp/labimp.hxx
index 5176394e8249..603ec3f88e97 100644
--- a/sw/source/ui/envelp/labimp.hxx
+++ b/sw/source/ui/envelp/labimp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -116,3 +117,4 @@ SV_DECL_PTRARR_DEL( SwLabRecs, SwLabRec*, 110, 10 )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index 4341bc9c5b75..afabaf3cf234 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,21 +41,10 @@
#include <label.hxx>
#include <labprt.hxx>
#include <labimg.hxx>
-#ifndef _LABIMP_HXX
#include "swuilabimp.hxx"
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _LABPRT_HRC
#include <labprt.hrc>
-#endif
-
-
-// --------------------------------------------------------------------------
-
-
SwLabPrtPage::SwLabPrtPage(Window* pParent, const SfxItemSet& rSet) :
@@ -77,7 +67,7 @@ SwLabPrtPage::SwLabPrtPage(Window* pParent, const SfxItemSet& rSet) :
FreeResource();
SetExchangeSupport();
- // Handler installieren
+ // Install handlers
Link aLk = LINK(this, SwLabPrtPage, CountHdl);
aPageButton .SetClickHdl( aLk );
aSingleButton.SetClickHdl( aLk );
@@ -95,25 +85,17 @@ SwLabPrtPage::SwLabPrtPage(Window* pParent, const SfxItemSet& rSet) :
}
}
-// --------------------------------------------------------------------------
-
-
-
SwLabPrtPage::~SwLabPrtPage()
{
if (pPrinter)
delete pPrinter;
}
-// --------------------------------------------------------------------------
-
-
-
IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton )
{
if (pButton == &aPrtSetup)
{
- // Druck-Setup aufrufen
+ // Call printer setup
if (!pPrinter)
pPrinter = new Printer;
@@ -134,35 +116,23 @@ IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton )
if ( bEnable )
aColField.GrabFocus();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
- ASSERT( pButton == &aPageButton, "NewButton?" );
+ OSL_ENSURE( pButton == &aPageButton, "NewButton?" );
#endif
return 0;
}
-// --------------------------------------------------------------------------
-
-
-
SfxTabPage* SwLabPrtPage::Create(Window* pParent, const SfxItemSet& rSet)
{
return new SwLabPrtPage( pParent, rSet );
}
-// --------------------------------------------------------------------------
-
-
-
void SwLabPrtPage::ActivatePage( const SfxItemSet& rSet )
{
Reset(rSet);
}
-// --------------------------------------------------------------------------
-
-
-
int SwLabPrtPage::DeactivatePage(SfxItemSet* _pSet)
{
if ( _pSet )
@@ -171,10 +141,6 @@ int SwLabPrtPage::DeactivatePage(SfxItemSet* _pSet)
return sal_True;
}
-// --------------------------------------------------------------------------
-
-
-
void SwLabPrtPage::FillItem(SwLabItem& rItem)
{
rItem.bPage = aPageButton.IsChecked();
@@ -183,10 +149,6 @@ void SwLabPrtPage::FillItem(SwLabItem& rItem)
rItem.bSynchron = aSynchronCB.IsChecked() && aSynchronCB.IsEnabled();
}
-// --------------------------------------------------------------------------
-
-
-
sal_Bool SwLabPrtPage::FillItemSet(SfxItemSet& rSet)
{
SwLabItem aItem;
@@ -197,10 +159,6 @@ sal_Bool SwLabPrtPage::FillItemSet(SfxItemSet& rSet)
return sal_True;
}
-// --------------------------------------------------------------------------
-
-
-
void SwLabPrtPage::Reset(const SfxItemSet& )
{
SwLabItem aItem;
@@ -222,7 +180,7 @@ void SwLabPrtPage::Reset(const SfxItemSet& )
if (pPrinter)
{
- // Drucker anzeigen
+ // show printer
aPrinterInfo.SetText(pPrinter->GetName());
}
else
@@ -240,3 +198,4 @@ void SwLabPrtPage::Reset(const SfxItemSet& )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/labprt.hrc b/sw/source/ui/envelp/labprt.hrc
index 07453cb01e89..7b930e4c182c 100644
--- a/sw/source/ui/envelp/labprt.hrc
+++ b/sw/source/ui/envelp/labprt.hrc
@@ -28,11 +28,9 @@
#ifndef _LABPRT_HRC
#define _LABPRT_HRC
-// #include *****************************************************************
-
#include "envelp.hrc"
-// Lokale Resourcen *********************************************************
+// local resources *********************************************************
#define BTN_PAGE 1
#define BTN_SINGLE 2
@@ -46,7 +44,7 @@
#define FL_DONTKNOW 10
#define CB_SYNCHRON 11
-// Ueberlaufpruefung ********************************************************
+// overflow check ********************************************************
#define LABPRT_ACT_END 0
diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx
index 44fa4f4e9f3e..23f163d0a4b3 100644
--- a/sw/source/ui/envelp/labprt.hxx
+++ b/sw/source/ui/envelp/labprt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <vcl/group.hxx>
#include <vcl/field.hxx>
#include <svtools/stdctrl.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <sfx2/tabdlg.hxx>
@@ -43,7 +42,7 @@ class SwLabItem;
class SwLabPrtPage : public SfxTabPage
{
- Printer* pPrinter; //Fuer die Schachteinstellug - leider.
+ Printer* pPrinter; // for the shaft setting - unfortunately
FixedLine aFLDontKnow;
RadioButton aPageButton;
@@ -84,3 +83,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/labprt.src b/sw/source/ui/envelp/labprt.src
index 2a8b4e537bd0..35dac125468f 100644
--- a/sw/source/ui/envelp/labprt.src
+++ b/sw/source/ui/envelp/labprt.src
@@ -26,7 +26,6 @@
************************************************************************/
// #pragma ******************************************************************
- // #include *****************************************************************
#include "labprt.hrc"
#include "helpid.h"
// TP_LAB_PRT ---------------------------------------------------------------
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 106e792229e6..f54828262efd 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,7 +76,6 @@
#include <algorithm>
-using namespace rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
@@ -90,19 +90,18 @@ using namespace ::com::sun::star::form;
using namespace ::com::sun::star::view;
using namespace ::com::sun::star::ui::dialogs;
+using ::rtl::OUString;
-/* -----------------------------05.06.01 13:54--------------------------------
-
- ---------------------------------------------------------------------------*/
struct SwMailMergeDlg_Impl
{
uno::Reference<runtime::XFormController> xFController;
uno::Reference<XSelectionChangeListener> xChgLstnr;
uno::Reference<XSelectionSupplier> xSelSupp;
};
-/* -----------------------------05.06.01 13:47--------------------------------
+
+/* --------------------------------------------------------------------------
helper classes
- ---------------------------------------------------------------------------*/
+----------------------------------------------------------------------------*/
class SwXSelChgLstnr_Impl : public cppu::WeakImplHelper1
<
view::XSelectionChangeListener
@@ -116,20 +115,14 @@ public:
virtual void SAL_CALL selectionChanged( const EventObject& aEvent ) throw (RuntimeException);
virtual void SAL_CALL disposing( const EventObject& Source ) throw (RuntimeException);
};
-/* -----------------------------05.06.01 13:51--------------------------------
- ---------------------------------------------------------------------------*/
SwXSelChgLstnr_Impl::SwXSelChgLstnr_Impl(SwMailMergeDlg& rParentDlg) :
rParent(rParentDlg)
{}
-/* -----------------------------05.06.01 14:06--------------------------------
- ---------------------------------------------------------------------------*/
SwXSelChgLstnr_Impl::~SwXSelChgLstnr_Impl()
{}
-/* -----------------------------05.06.01 14:06--------------------------------
- ---------------------------------------------------------------------------*/
void SwXSelChgLstnr_Impl::selectionChanged( const EventObject& ) throw (RuntimeException)
{
//call the parent to enable selection mode
@@ -147,16 +140,12 @@ void SwXSelChgLstnr_Impl::selectionChanged( const EventObject& ) throw (Runtime
rParent.m_aSelection.realloc(0);
}
}
-/* -----------------------------05.06.01 14:06--------------------------------
- ---------------------------------------------------------------------------*/
void SwXSelChgLstnr_Impl::disposing( const EventObject& ) throw (RuntimeException)
{
- DBG_ERROR("disposing");
+ OSL_ENSURE(false, "disposing");
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
+
SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
const String& rSourceName,
const String& rTblName,
@@ -345,8 +334,6 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
pModOpt = SW_MOD()->GetModuleConfig();
- //aSingleJobsCB.Check(pModOpt->IsSinglePrintJob());// not supported in since cws printerpullpages anymore
-
sal_Int16 nMailingMode(pModOpt->GetMailingFormats());
aFormatSwCB.Check((nMailingMode & TXTFORMAT_OFFICE) != 0);
aFormatHtmlCB.Check((nMailingMode & TXTFORMAT_HTML) != 0);
@@ -354,7 +341,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
aAllRB.Check(sal_True);
- // Handler installieren
+ // Install handlers
Link aLk = LINK(this, SwMailMergeDlg, ButtonHdl);
aOkBTN.SetClickHdl(aLk);
@@ -445,9 +432,9 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
sCommand += String::CreateFromInt32(SFX_FILTER_NOTINFILEDLG);
sCommand += C2U(":default_first");
uno::Reference< container::XEnumeration > xList = xQuery->createSubSetEnumerationByQuery(sCommand);
- const ::rtl::OUString sName = OUString::createFromAscii("Name");
- const ::rtl::OUString sFlags = OUString::createFromAscii("Flags");
- const ::rtl::OUString sUIName = OUString::createFromAscii("UIName");
+ const ::rtl::OUString sName(RTL_CONSTASCII_USTRINGPARAM("Name"));
+ const ::rtl::OUString sFlags(RTL_CONSTASCII_USTRINGPARAM("Flags"));
+ const ::rtl::OUString sUIName(RTL_CONSTASCII_USTRINGPARAM("UIName"));
sal_uInt16 nODT = USHRT_MAX;
while(xList->hasMoreElements())
{
@@ -482,10 +469,6 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwMailMergeDlg::~SwMailMergeDlg()
{
if(xFrame.is())
@@ -504,34 +487,31 @@ SwMailMergeDlg::~SwMailMergeDlg()
delete pImpl;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwMailMergeDlg::Apply()
{
}
-/*-- 01.06.2007 13:06:50---------------------------------------------------
- -----------------------------------------------------------------------*/
void lcl_MoveControlY( Window* ppW, long nDiffSize )
{
Point aPos( ppW->GetPosPixel());
aPos.Y() += nDiffSize;
ppW->SetPosPixel( aPos );
}
+
void lcl_MoveControlX( Window* ppW, long nDiffSize )
{
Point aPos( ppW->GetPosPixel());
aPos.X() += nDiffSize;
ppW->SetPosPixel( aPos );
}
+
void lcl_ChangeWidth( Window* ppW, long nDiffSize )
{
Size aSize( ppW->GetSizePixel());
aSize.Width() += nDiffSize;
ppW->SetSizePixel( aSize );
}
+
void SwMailMergeDlg::Resize()
{
//the only controls that profit from the resize is pBeamerWin
@@ -609,10 +589,6 @@ void SwMailMergeDlg::Resize()
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwMailMergeDlg, ButtonHdl, Button *, pBtn )
{
if (pBtn == &aOkBTN)
@@ -623,10 +599,6 @@ IMPL_LINK( SwMailMergeDlg, ButtonHdl, Button *, pBtn )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwMailMergeDlg, OutputTypeHdl, RadioButton *, pBtn )
{
sal_Bool bPrint = pBtn == &aPrinterRB;
@@ -654,9 +626,7 @@ IMPL_LINK( SwMailMergeDlg, OutputTypeHdl, RadioButton *, pBtn )
return 0;
}
-/*-- 01.06.2007 12:36:43---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwMailMergeDlg, SaveTypeHdl, RadioButton*, pBtn )
{
bool bIndividual = pBtn == &aSaveIndividualRB;
@@ -678,9 +648,6 @@ IMPL_LINK( SwMailMergeDlg, SaveTypeHdl, RadioButton*, pBtn )
}
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
IMPL_LINK( SwMailMergeDlg, FilenameHdl, CheckBox*, pBox )
{
@@ -695,20 +662,12 @@ IMPL_LINK( SwMailMergeDlg, FilenameHdl, CheckBox*, pBox )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwMailMergeDlg, ModifyHdl, NumericField *, EMPTYARG )
{
aFromRB.Check();
return (0);
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
bool SwMailMergeDlg::ExecQryShell()
{
if(pImpl->xSelSupp.is())
@@ -768,7 +727,7 @@ bool SwMailMergeDlg::ExecQryShell()
pMgr->SetSubject(sPath);
}
- if (aFromRB.IsChecked()) // Liste Einfuegen
+ if (aFromRB.IsChecked()) // Insert list
{
// Safe: the maximal value of the fields is limited
sal_Int32 nStart = sal::static_int_cast<sal_Int32>(aFromNF.GetValue());
@@ -783,7 +742,7 @@ bool SwMailMergeDlg::ExecQryShell()
*pSelection <<= i;
}
else if (aAllRB.IsChecked() )
- m_aSelection.realloc(0); // Leere Selektion = Alles einfuegen
+ m_aSelection.realloc(0); // Empty selection = insert all
else
{
if(pImpl->xSelSupp.is())
@@ -823,10 +782,6 @@ bool SwMailMergeDlg::ExecQryShell()
return true;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwMailMergeDlg, InsertPathHdl, PushButton *, EMPTYARG )
{
String sPath( aPathED.GetText() );
@@ -845,7 +800,6 @@ IMPL_LINK( SwMailMergeDlg, InsertPathHdl, PushButton *, EMPTYARG )
C2U( "com.sun.star.ui.dialogs.FolderPicker" ) ),
UNO_QUERY );
}
-// pFileDlg->SetHelpId(HID_FILEDLG_MAILMRGE1);
xFP->setDisplayDirectory(sPath);
if( xFP->execute() == RET_OK )
{
@@ -858,17 +812,13 @@ IMPL_LINK( SwMailMergeDlg, InsertPathHdl, PushButton *, EMPTYARG )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwMailMergeDlg, AttachFileHdl, PushButton *, EMPTYARG )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
AbstractSvxMultiFileDialog* pFileDlg = pFact->CreateSvxMultiFileDialog( this );
- DBG_ASSERT(pFileDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pFileDlg, "Dialogdiet fail!");
pFileDlg->SetFiles(aAttachED.GetText());
pFileDlg->SetHelpId(HID_FILEDLG_MAILMRGE2);
@@ -879,9 +829,7 @@ IMPL_LINK( SwMailMergeDlg, AttachFileHdl, PushButton *, EMPTYARG )
}
return 0;
}
-/* -----------------------------05.06.01 14:56--------------------------------
- ---------------------------------------------------------------------------*/
uno::Reference<XResultSet> SwMailMergeDlg::GetResultSet() const
{
uno::Reference< XResultSet > xResSetClone;
@@ -894,9 +842,7 @@ uno::Reference<XResultSet> SwMailMergeDlg::GetResultSet() const
}
return xResSetClone;
}
-/*-- 27.11.2002 12:27:33---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeCreateFromDlg::SwMailMergeCreateFromDlg(Window* pParent) :
ModalDialog(pParent, SW_RES(DLG_MERGE_CREATE)),
aCreateFromFL( this, SW_RES( FL_CREATEFROM )),
@@ -908,15 +854,11 @@ SwMailMergeCreateFromDlg::SwMailMergeCreateFromDlg(Window* pParent) :
{
FreeResource();
}
-/*-- 27.11.2002 12:27:33---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeCreateFromDlg::~SwMailMergeCreateFromDlg()
{
}
-/* -----------------04.02.2003 13:45-----------------
- *
- * --------------------------------------------------*/
+
SwMailMergeFieldConnectionsDlg::SwMailMergeFieldConnectionsDlg(Window* pParent) :
ModalDialog(pParent, SW_RES(DLG_MERGE_FIELD_CONNECTIONS)),
aConnectionsFL( this, SW_RES( FL_CONNECTIONS )),
@@ -929,10 +871,9 @@ SwMailMergeFieldConnectionsDlg::SwMailMergeFieldConnectionsDlg(Window* pParent)
{
FreeResource();
}
-/* -----------------04.02.2003 13:45-----------------
- *
- * --------------------------------------------------*/
+
SwMailMergeFieldConnectionsDlg::~SwMailMergeFieldConnectionsDlg()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/mailmrge.hrc b/sw/source/ui/envelp/mailmrge.hrc
index f03c42663fe6..0068585379ef 100644
--- a/sw/source/ui/envelp/mailmrge.hrc
+++ b/sw/source/ui/envelp/mailmrge.hrc
@@ -28,11 +28,9 @@
#ifndef _MAILMRGE_HRC
#define _MAILMRGE_HRC
-// #include -----------------------------------------------------------------
-
#include "envelp.hrc"
-// Elemente -----------------------------------------------------------------
+// elements -----------------------------------------------------------------
#define FL_RECORD 1
#define RB_ALL 2
diff --git a/sw/source/ui/envelp/mailmrge.src b/sw/source/ui/envelp/mailmrge.src
index a19c36458366..bfce23e9eb2d 100644
--- a/sw/source/ui/envelp/mailmrge.src
+++ b/sw/source/ui/envelp/mailmrge.src
@@ -25,7 +25,6 @@
*
************************************************************************/
- // #include *****************************************************************
#include "mailmrge.hrc"
#include "cmdid.h"
#include "helpid.h"
@@ -290,7 +289,6 @@ ModalDialog DLG_MAILMERGE
Pos = MAP_APPFONT ( 220 , 156 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Disable = TRUE ;
- /* ### ACHTUNG: Neuer Text in Resource? HTM~L : HTML */
TabStop = TRUE ;
Text [ en-US ] = "HTM~L" ;
};
diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx
index 2bbbc8526f10..2f3558341797 100644
--- a/sw/source/ui/envelp/swuilabimp.hxx
+++ b/sw/source/ui/envelp/swuilabimp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96,9 +97,6 @@ public:
inline SwNewDBMgr* GetNewDBMgr() const { return pNewDBMgr; }
};
-/* -----------------08.07.99 13:48-------------------
-
- --------------------------------------------------*/
class SwOneExampleFrame;
class SwVisitingCardPage : public SfxTabPage
{
@@ -146,9 +144,7 @@ public:
virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
};
-/* -----------------29.09.99 08:51-------------------
- --------------------------------------------------*/
class SwPrivateDataPage : public SfxTabPage
{
FixedLine aDataFL;
@@ -198,9 +194,7 @@ public:
virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
};
-/* -----------------29.09.99 08:51-------------------
- --------------------------------------------------*/
class SwBusinessDataPage : public SfxTabPage
{
FixedLine aDataFL;
@@ -251,3 +245,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/syncbtn.cxx b/sw/source/ui/envelp/syncbtn.cxx
index d0b43dd2efc5..7998ea3ef264 100644
--- a/sw/source/ui/envelp/syncbtn.cxx
+++ b/sw/source/ui/envelp/syncbtn.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,10 +47,6 @@
SFX_IMPL_FLOATINGWINDOW( SwSyncChildWin, FN_SYNC_LABELS )
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwSyncChildWin::SwSyncChildWin( Window* _pParent,
sal_uInt16 nId,
SfxBindings* pBindings,
@@ -77,10 +74,6 @@ SwSyncChildWin::SwSyncChildWin( Window* _pParent,
pWindow->Show();
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwSyncBtnDlg::SwSyncBtnDlg( SfxBindings* _pBindings,
SfxChildWindow* pChild,
Window *pParent) :
@@ -91,18 +84,10 @@ SwSyncBtnDlg::SwSyncBtnDlg( SfxBindings* _pBindings,
aSyncBtn.SetClickHdl(LINK(this, SwSyncBtnDlg, BtnHdl));
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-__EXPORT SwSyncBtnDlg::~SwSyncBtnDlg()
+SwSyncBtnDlg::~SwSyncBtnDlg()
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwSyncBtnDlg, BtnHdl, PushButton *, EMPTYARG )
{
SfxViewFrame::Current()->GetDispatcher()->Execute(FN_UPDATE_ALL_LINKS, SFX_CALLMODE_ASYNCHRON);
@@ -110,3 +95,4 @@ IMPL_LINK( SwSyncBtnDlg, BtnHdl, PushButton *, EMPTYARG )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx
index 0379059682e8..247f57fef83d 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,7 +48,6 @@ using namespace ::com::sun::star;
/*--------------------------------------------------------------------
Beschreibung: Feldeinfuegen bearbeiten
--------------------------------------------------------------------*/
-
sw::DropDownFieldDialog::DropDownFieldDialog( Window *pParent, SwWrtShell &rS,
SwField* pField, sal_Bool bNextButton ) :
@@ -104,10 +104,6 @@ sw::DropDownFieldDialog::~DropDownFieldDialog()
{
}
-/*--------------------------------------------------------------------
-
- --------------------------------------------------------------------*/
-
void sw::DropDownFieldDialog::Apply()
{
if(pDropField)
@@ -128,12 +124,11 @@ void sw::DropDownFieldDialog::Apply()
}
}
}
-/* -----------------17.06.2003 10:50-----------------
- --------------------------------------------------*/
IMPL_LINK(sw::DropDownFieldDialog, ButtonHdl, PushButton*, pButton)
{
EndDialog(&aNextPB == pButton ? RET_OK : RET_YES );
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/FldRefTreeListBox.cxx b/sw/source/ui/fldui/FldRefTreeListBox.cxx
index 38910327754e..5a82ea186877 100644
--- a/sw/source/ui/fldui/FldRefTreeListBox.cxx
+++ b/sw/source/ui/fldui/FldRefTreeListBox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,5 @@ void SwFldRefTreeListBox::RequestHelp( const HelpEvent& rHEvt )
Window::RequestHelp( rHEvt );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/FldRefTreeListBox.hxx b/sw/source/ui/fldui/FldRefTreeListBox.hxx
index 92df954c8ddd..bbd209c119f9 100644
--- a/sw/source/ui/fldui/FldRefTreeListBox.hxx
+++ b/sw/source/ui/fldui/FldRefTreeListBox.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,4 @@ public:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index cbd24bf1c498..5ccadfee991b 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,22 +38,16 @@
#define _CHANGEDB_CXX
#include <svtools/stdctrl.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/sdb/XDatabaseAccess.hpp>
#include <comphelper/processfactory.hxx>
#include <sfx2/viewfrm.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <fldmgr.hxx>
#include <expfld.hxx>
#include <txtatr.hxx>
@@ -61,15 +56,9 @@
#include <dbfld.hxx>
#include <changedb.hxx>
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
-#ifndef _UTLUI_HRC
#include <utlui.hrc>
-#endif
-#ifndef _CHANGEDB_HRC
#include <changedb.hrc>
-#endif
#include <unomid.h>
@@ -81,8 +70,6 @@ using namespace ::com::sun::star::lang;
/*--------------------------------------------------------------------
Beschreibung: Feldeinfuegen bearbeiten
--------------------------------------------------------------------*/
-
-
SwChangeDBDlg::SwChangeDBDlg(SwView& rVw) :
SvxStandardDialog(&rVw.GetViewFrame()->GetWindow(), SW_RES(DLG_CHANGE_DB)),
@@ -98,10 +85,7 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw) :
aOKBT (this, SW_RES(BT_OK )),
aCancelBT (this, SW_RES(BT_CANCEL )),
aHelpBT (this, SW_RES(BT_HELP )),
-// aChangeBT (this, SW_RES(BT_CHANGEDB )),
aImageList (SW_RES(ILIST_DB_DLG )),
- aImageListHC (SW_RES(ILIST_DB_DLG_HC )),
-
pSh(rVw.GetWrtShellPtr()),
pMgr( new SwFldMgr() )
{
@@ -117,11 +101,7 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw) :
aUsedDBTLB.SetSelectionMode(MULTIPLE_SELECTION);
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 ), BMP_COLOR_NORMAL );
- aUsedDBTLB.SetNodeBitmaps( aImageListHC.GetImage(IMG_COLLAPSE),
- aImageListHC.GetImage(IMG_EXPAND ), BMP_COLOR_HIGHCONTRAST );
+ aUsedDBTLB.SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE), aImageList.GetImage(IMG_EXPAND));
Link aLink = LINK(this, SwChangeDBDlg, TreeSelectHdl);
@@ -135,8 +115,6 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw) :
/*--------------------------------------------------------------------
Beschreibung: Datenbank-Listboxen initialisieren
--------------------------------------------------------------------*/
-
-
void SwChangeDBDlg::FillDBPopup()
{
Reference<XNameAccess> xDBContext;
@@ -146,7 +124,7 @@ void SwChangeDBDlg::FillDBPopup()
Reference<XInterface> xInstance = xMgr->createInstance( C2U( "com.sun.star.sdb.DatabaseContext" ));
xDBContext = Reference<XNameAccess>(xInstance, UNO_QUERY) ;
}
- DBG_ASSERT(xDBContext.is(), "com.sun.star.sdb.DataBaseContext: service not available");
+ OSL_ENSURE(xDBContext.is(), "com.sun.star.sdb.DataBaseContext: service not available");
const SwDBData& rDBData = pSh->GetDBData();
String sDBName(rDBData.sDataSource);
@@ -188,16 +166,11 @@ void SwChangeDBDlg::FillDBPopup()
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SvLBoxEntry* SwChangeDBDlg::Insert(const String& rDBName)
{
String sDBName(rDBName.GetToken(0, DB_DELIM));
String sTableName(rDBName.GetToken(1, DB_DELIM));
- int nCommandType = rDBName.GetToken(2, DB_DELIM).ToInt32();
+ sal_IntPtr nCommandType = rDBName.GetToken(2, DB_DELIM).ToInt32();
SvLBoxEntry* pParent;
SvLBoxEntry* pChild;
@@ -207,11 +180,7 @@ SvLBoxEntry* SwChangeDBDlg::Insert(const String& rDBName)
Image aTableImg = aImageList.GetImage(IMG_DBTABLE);
Image aDBImg = aImageList.GetImage(IMG_DB);
Image aQueryImg = aImageList.GetImage(IMG_DBQUERY);
- Image aHCTableImg = aImageListHC.GetImage(IMG_DBTABLE);
- Image aHCDBImg = aImageListHC.GetImage(IMG_DB);
- Image aHCQueryImg = aImageListHC.GetImage(IMG_DBQUERY);
Image& rToInsert = nCommandType ? aQueryImg : aTableImg;
- Image& rHCToInsert = nCommandType ? aHCQueryImg : aHCTableImg;
while ((pParent = aUsedDBTLB.GetEntry(nParent++)) != NULL)
{
if (sDBName == aUsedDBTLB.GetEntryText(pParent))
@@ -222,19 +191,13 @@ SvLBoxEntry* SwChangeDBDlg::Insert(const String& rDBName)
return pChild;
}
SvLBoxEntry* pRet = aUsedDBTLB.InsertEntry(sTableName, rToInsert, rToInsert, pParent);
- aUsedDBTLB.SetExpandedEntryBmp(pRet, rHCToInsert, BMP_COLOR_HIGHCONTRAST);
- aUsedDBTLB.SetCollapsedEntryBmp(pRet, rHCToInsert, BMP_COLOR_HIGHCONTRAST);
pRet->SetUserData((void*)nCommandType);
return pRet;
}
}
pParent = aUsedDBTLB.InsertEntry(sDBName, aDBImg, aDBImg);
- aUsedDBTLB.SetExpandedEntryBmp(pParent, aHCDBImg, BMP_COLOR_HIGHCONTRAST);
- aUsedDBTLB.SetCollapsedEntryBmp(pParent, aHCDBImg, BMP_COLOR_HIGHCONTRAST);
SvLBoxEntry* pRet = aUsedDBTLB.InsertEntry(sTableName, rToInsert, rToInsert, pParent);
- aUsedDBTLB.SetExpandedEntryBmp(pRet, rHCToInsert, BMP_COLOR_HIGHCONTRAST);
- aUsedDBTLB.SetCollapsedEntryBmp(pRet, rHCToInsert, BMP_COLOR_HIGHCONTRAST);
pRet->SetUserData((void*)nCommandType);
return pRet;
}
@@ -242,7 +205,7 @@ SvLBoxEntry* SwChangeDBDlg::Insert(const String& rDBName)
/*--------------------------------------------------------------------
Beschreibung: Dialog zerstoeren
--------------------------------------------------------------------*/
-__EXPORT SwChangeDBDlg::~SwChangeDBDlg()
+SwChangeDBDlg::~SwChangeDBDlg()
{
delete pMgr;
}
@@ -250,13 +213,11 @@ __EXPORT SwChangeDBDlg::~SwChangeDBDlg()
/*--------------------------------------------------------------------
Beschreibung: Schliessen
--------------------------------------------------------------------*/
-void __EXPORT SwChangeDBDlg::Apply()
+void SwChangeDBDlg::Apply()
{
UpdateFlds();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
+
void SwChangeDBDlg::UpdateFlds()
{
SvStringsDtor aDBNames( (sal_uInt8)aUsedDBTLB.GetSelectionCount(), 1 );
@@ -290,11 +251,6 @@ void SwChangeDBDlg::UpdateFlds()
pSh->EndAllAction();
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
IMPL_LINK( SwChangeDBDlg, ButtonHdl, Button *, EMPTYARG )
{
String sTableName, sColumnName;
@@ -310,11 +266,6 @@ IMPL_LINK( SwChangeDBDlg, ButtonHdl, Button *, EMPTYARG )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
IMPL_LINK( SwChangeDBDlg, TreeSelectHdl, SvTreeListBox *, EMPTYARG )
{
sal_Bool bEnable = sal_False;
@@ -333,7 +284,6 @@ IMPL_LINK( SwChangeDBDlg, TreeSelectHdl, SvTreeListBox *, EMPTYARG )
/*--------------------------------------------------------------------
Beschreibung: Datenbankname fuer Anzeige wandeln
--------------------------------------------------------------------*/
-
void SwChangeDBDlg::ShowDBName(const SwDBData& rDBData)
{
String sTmp(rDBData.sDataSource);
@@ -350,9 +300,7 @@ void SwChangeDBDlg::ShowDBName(const SwDBData& rDBData)
aDocDBNameFT.SetText(sName);
}
-/*-- 27.05.2004 09:14:01---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwChangeDBDlg, AddDBHdl, PushButton *, EMPTYARG )
{
String sNewDB = SwNewDBMgr::LoadAndRegisterDataSource();
@@ -361,3 +309,4 @@ IMPL_LINK( SwChangeDBDlg, AddDBHdl, PushButton *, EMPTYARG )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/changedb.hrc b/sw/source/ui/fldui/changedb.hrc
index 7bccd2fa9363..f5d54aa3ad42 100644
--- a/sw/source/ui/fldui/changedb.hrc
+++ b/sw/source/ui/fldui/changedb.hrc
@@ -28,8 +28,6 @@
#ifndef _CHANGEDB_HRC
#define _CHANGEDB_HRC
-// #include -----------------------------------------------------------------
-
// Elemente -----------------------------------------------------------------
#define FT_DESC 1
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 44fd4bc213ee..cacd4f024ab7 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,38 +34,21 @@
#include <swmodule.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <dbfld.hxx>
-#ifndef _FLDTDLG_HXX
#include <fldtdlg.hxx>
-#endif
#include <numrule.hxx>
-#ifndef _FLDTDLG_HRC
#include <fldtdlg.hrc>
-#endif
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
-#ifndef _FLDDB_HXX
#include <flddb.hxx>
-#endif
#include <dbconfig.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#define USER_DATA_VERSION_1 "1"
#define USER_DATA_VERSION USER_DATA_VERSION_1
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
SwFldDBPage::SwFldDBPage(Window* pParent, const SfxItemSet& rCoreSet ) :
SwFldPage( pParent, SW_RES( TP_FLD_DB ), rCoreSet ),
@@ -97,19 +81,14 @@ SwFldDBPage::SwFldDBPage(Window* pParent, const SfxItemSet& rCoreSet ) :
aAddDBPB.SetClickHdl(LINK(this, SwFldDBPage, AddDBHdl));
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-__EXPORT SwFldDBPage::~SwFldDBPage()
+SwFldDBPage::~SwFldDBPage()
{
}
/*--------------------------------------------------------------------
Beschreibung: TabPage initialisieren
--------------------------------------------------------------------*/
-
-void __EXPORT SwFldDBPage::Reset(const SfxItemSet&)
+void SwFldDBPage::Reset(const SfxItemSet&)
{
Init(); // Allgemeine initialisierung
@@ -212,11 +191,7 @@ void __EXPORT SwFldDBPage::Reset(const SfxItemSet&)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-sal_Bool __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldDBPage::FillItemSet(SfxItemSet& )
{
String sTableName, sColumnName;
SwDBData aData;
@@ -285,29 +260,17 @@ sal_Bool __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& )
return sal_False;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-SfxTabPage* __EXPORT SwFldDBPage::Create( Window* pParent,
+SfxTabPage* SwFldDBPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return ( new SwFldDBPage( pParent, rAttrSet ) );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwFldDBPage::GetGroup()
{
return GRP_DB;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
{
// Alte ListBoxPos sichern
@@ -433,10 +396,6 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldDBPage, NumSelectHdl, NumFormatListBox *, pLB )
{
aNewFormatRB.Check();
@@ -445,10 +404,6 @@ IMPL_LINK( SwFldDBPage, NumSelectHdl, NumFormatListBox *, pLB )
return 0;
}
-/*---------------------------------------------------------------------
- Beschreibung:
----------------------------------------------------------------------*/
-
void SwFldDBPage::CheckInsert()
{
sal_Bool bInsert = sal_True;
@@ -478,10 +433,6 @@ void SwFldDBPage::CheckInsert()
EnableInsert(bInsert);
}
-/*---------------------------------------------------------------------
- Beschreibung:
----------------------------------------------------------------------*/
-
IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox )
{
SvLBoxEntry* pColEntry;
@@ -523,9 +474,7 @@ IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox )
}
return 0;
}
-/*-- 27.05.2004 09:14:01---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK( SwFldDBPage, AddDBHdl, PushButton *, EMPTYARG )
{
String sNewDB = SwNewDBMgr::LoadAndRegisterDataSource();
@@ -539,16 +488,12 @@ IMPL_LINK( SwFldDBPage, AddDBHdl, PushButton *, EMPTYARG )
/*--------------------------------------------------------------------
Beschreibung: Modify
--------------------------------------------------------------------*/
-
IMPL_LINK( SwFldDBPage, ModifyHdl, Edit *, EMPTYARG )
{
CheckInsert();
return 0;
}
-/* -----------------12.01.99 11:21-------------------
- *
- * --------------------------------------------------*/
void SwFldDBPage::FillUserData()
{
String sData( String::CreateFromAscii(
@@ -563,9 +508,7 @@ void SwFldDBPage::FillUserData()
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
-/* -----------------12.12.2002 11:33-----------------
- *
- * --------------------------------------------------*/
+
void SwFldDBPage::ActivateMailMergeAddress()
{
sal_uLong nData = TYP_DBFLD;
@@ -574,10 +517,10 @@ void SwFldDBPage::ActivateMailMergeAddress()
const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource();
aDatabaseTLB.Select(rData.sDataSource, rData.sCommand, aEmptyStr);
}
-/*-- 07.10.2003 13:59:04---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwFldDBPage::SetWrtShell(SwWrtShell& rSh)
{
aDatabaseTLB.SetWrtShell(rSh);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx
index 8f93d97f8b16..07e76a171708 100644
--- a/sw/source/ui/fldui/flddb.hxx
+++ b/sw/source/ui/fldui/flddb.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <vcl/group.hxx>
#include "condedit.hxx"
@@ -40,10 +39,6 @@
#include "fldpage.hxx"
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
class SwFldDBPage : public SwFldPage
{
FixedText aTypeFT;
@@ -104,3 +99,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 549593bc3496..22409a6cc86b 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,16 +48,10 @@
#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>
-#endif
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/util/Time.hpp>
#include <com/sun/star/util/DateTime.hpp>
@@ -67,9 +62,6 @@
using namespace nsSwDocInfoSubType;
using namespace com::sun::star;
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
SwFldDokInfPage::SwFldDokInfPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
SwFldPage( pWindow, SW_RES( TP_FLD_DOKINF ), rCoreSet ),
@@ -103,19 +95,11 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
pItem->GetValue() >>= xCustomPropertySet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-__EXPORT SwFldDokInfPage::~SwFldDokInfPage()
+SwFldDokInfPage::~SwFldDokInfPage()
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-void __EXPORT SwFldDokInfPage::Reset(const SfxItemSet& )
+void SwFldDokInfPage::Reset(const SfxItemSet& )
{
Init(); // Allgemeine initialisierung
@@ -169,11 +153,7 @@ void __EXPORT SwFldDokInfPage::Reset(const SfxItemSet& )
{
uno::Reference< beans::XPropertySetInfo > xSetInfo = xCustomPropertySet->getPropertySetInfo();
const uno::Sequence< beans::Property > rProperties = xSetInfo->getProperties();
-// uno::Sequence< ::rtl::OUString > aPropertyNames(rProperties.getLength());
-// for (sal_Int32 i = 0; i < rProperties.getLength(); ++i) {
-// aPropertyNames[i] = rProperties[i].Name;
-// }
- //if ( !IsFldEdit() )
+
if( rProperties.getLength() )
{
pInfo = aTypeTLB.InsertEntry( String(SW_RES( STR_CUSTOM )) );
@@ -237,10 +217,6 @@ void __EXPORT SwFldDokInfPage::Reset(const SfxItemSet& )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldDokInfPage, TypeHdl, ListBox *, EMPTYARG )
{
// Alte ListBoxPos sichern
@@ -264,9 +240,6 @@ IMPL_LINK( SwFldDokInfPage, TypeHdl, ListBox *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
{
sal_uInt16 nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
@@ -402,10 +375,6 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType)
{
// Format-Listbox fuellen
@@ -460,11 +429,7 @@ sal_uInt16 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType)
return nSize;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-sal_Bool __EXPORT SwFldDokInfPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldDokInfPage::FillItemSet(SfxItemSet& )
{
if (!pSelEntry || (sal_uInt16)(sal_uLong)pSelEntry->GetUserData() == USHRT_MAX)
return sal_False;
@@ -501,27 +466,17 @@ sal_Bool __EXPORT SwFldDokInfPage::FillItemSet(SfxItemSet& )
return sal_False;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-SfxTabPage* __EXPORT SwFldDokInfPage::Create( Window* pParent,
+SfxTabPage* SwFldDokInfPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return ( new SwFldDokInfPage( pParent, rAttrSet ) );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwFldDokInfPage::GetGroup()
{
return GRP_REG;
}
-/* -----------------12.01.99 11:21-------------------
- *
- * --------------------------------------------------*/
+
void SwFldDokInfPage::FillUserData()
{
String sData( String::CreateFromAscii(
@@ -535,3 +490,4 @@ void SwFldDokInfPage::FillUserData()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx
index 05bee2dc32c3..ac19388d5c9f 100644
--- a/sw/source/ui/fldui/flddinf.hxx
+++ b/sw/source/ui/fldui/flddinf.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,9 +41,6 @@
namespace com{namespace sun{ namespace star{ namespace beans{
class XPropertySet;
}}}}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
class SwFldDokInfPage : public SwFldPage
{
@@ -87,3 +85,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index d405245ed704..953a055a5081 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,23 +36,13 @@
#include <vcl/svapp.hxx>
#include <flddat.hxx>
#include <docufld.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <chpfld.hxx>
-#ifndef _FLDTDLG_HRC
#include <fldtdlg.hrc>
-#endif
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
-#ifndef _FLDDOK_HXX
#include <flddok.hxx>
-#endif
#include <swmodule.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <svl/zformat.hxx>
@@ -60,10 +51,6 @@
#define USER_DATA_VERSION_1 "1"
#define USER_DATA_VERSION USER_DATA_VERSION_1
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFldDokPage::SwFldDokPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
SwFldPage( pWindow, SW_RES( TP_FLD_DOK ), rCoreSet ),
@@ -99,19 +86,11 @@ SwFldDokPage::SwFldDokPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
aNumFormatLB.SetShowLanguageControl(sal_True);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-__EXPORT SwFldDokPage::~SwFldDokPage()
+SwFldDokPage::~SwFldDokPage()
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-void __EXPORT SwFldDokPage::Reset(const SfxItemSet& )
+void SwFldDokPage::Reset(const SfxItemSet& )
{
SavePos(&aTypeLB);
Init(); // Allgemeine initialisierung
@@ -213,10 +192,6 @@ void __EXPORT SwFldDokPage::Reset(const SfxItemSet& )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
{
// Alte ListBoxPos sichern
@@ -471,20 +446,12 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFldDokPage::AddSubType(sal_uInt16 nTypeId)
{
sal_uInt16 nPos = aSelectionLB.InsertEntry(SwFieldType::GetTypeStr(nTypeId));
aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldDokPage, SubTypeHdl, ListBox *, EMPTYARG )
{
sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
@@ -519,10 +486,6 @@ IMPL_LINK( SwFldDokPage, SubTypeHdl, ListBox *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwFldDokPage::FillFormatLB(sal_uInt16 nTypeId)
{
// Format-Listbox fuellen
@@ -558,10 +521,6 @@ sal_uInt16 SwFldDokPage::FillFormatLB(sal_uInt16 nTypeId)
return nSize;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldDokPage, FormatHdl, ListBox *, EMPTYARG )
{
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
@@ -594,13 +553,8 @@ IMPL_LINK( SwFldDokPage, FormatHdl, ListBox *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-sal_Bool __EXPORT SwFldDokPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldDokPage::FillItemSet(SfxItemSet& )
{
- sal_Bool bPage = sal_False;
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if (nTypeId == USHRT_MAX)
@@ -609,7 +563,6 @@ sal_Bool __EXPORT SwFldDokPage::FillItemSet(SfxItemSet& )
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
- bPage = sal_True;
}
String aVal(aValueED.GetText());
@@ -692,28 +645,17 @@ sal_Bool __EXPORT SwFldDokPage::FillItemSet(SfxItemSet& )
return sal_False;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-SfxTabPage* __EXPORT SwFldDokPage::Create( Window* pParent,
+SfxTabPage* SwFldDokPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return ( new SwFldDokPage( pParent, rAttrSet ) );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwFldDokPage::GetGroup()
{
return GRP_DOC;
}
-/* -----------------12.01.99 10:09-------------------
- *
- * --------------------------------------------------*/
void SwFldDokPage::FillUserData()
{
String sData( String::CreateFromAscii(
@@ -728,4 +670,4 @@ void SwFldDokPage::FillUserData()
SetUserData(sData);
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx
index d5720a4e2872..9bff88a0bb9c 100644
--- a/sw/source/ui/fldui/flddok.hxx
+++ b/sw/source/ui/fldui/flddok.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <vcl/group.hxx>
#include <vcl/edit.hxx>
#include <vcl/field.hxx>
@@ -40,10 +39,6 @@
#include "numfmtlb.hxx"
#include "fldpage.hxx"
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
class SwFldDokPage : public SwFldPage
{
FixedText aTypeFT;
@@ -93,3 +88,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 3d6d52659c9d..027dd580591a 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,61 +38,34 @@
#include <sfx2/app.hxx>
#include <svx/optgenrl.hxx>
#include <docufld.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <dbfld.hxx>
#include <wrtsh.hxx>
-#ifndef _FLDDB_HXX
#include <flddb.hxx>
-#endif
-#ifndef _FLDDINF_HXX
#include <flddinf.hxx>
-#endif
-#ifndef _FLDVAR_HXX
#include <fldvar.hxx>
-#endif
-#ifndef _FLDDOK_HXX
#include <flddok.hxx>
-#endif
-#ifndef _FLDFUNC_HXX
#include <fldfunc.hxx>
-#endif
-#ifndef _FLDREF_HXX
#include <fldref.hxx>
-#endif
#include <fldedt.hxx>
#include <crsskip.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
#include "swabstdlg.hxx"
#include "dialog.hrc"
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
-
namespace swui
{
SwAbstractDialogFactory * GetFactory();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFldEditDlg::SwFldEditDlg(SwView& rVw) :
SfxSingleTabDialog(&rVw.GetViewFrame()->GetWindow(), 0, 0),
pSh (rVw.GetWrtShellPtr()),
@@ -149,7 +123,6 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) :
/*--------------------------------------------------------------------
Beschreibung: Controlls initialisieren
--------------------------------------------------------------------*/
-
void SwFldEditDlg::Init()
{
SwFldPage* pTabPage = (SwFldPage*)GetTabPage();
@@ -187,10 +160,6 @@ void SwFldEditDlg::Init()
!pSh->HasReadonlySel() );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup)
{
// TabPage erzeugen
@@ -223,14 +192,6 @@ SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup)
uno::Reference< beans::XPropertySet > xUDProps(
xDocProps->getUserDefinedProperties(),
uno::UNO_QUERY_THROW);
-// uno::Reference< beans::XPropertySetInfo > xSetInfo
-// = xUDProps->getPropertySetInfo();
-// const uno::Sequence< beans::Property > props
-// = xSetInfo->getProperties();
-// uno::Sequence< ::rtl::OUString > names(props.getLength());
-// for (sal_Int32 i = 0; i < props.getLength(); ++i) {
-// names[i] = props[i].Name;
-// }
pSet->Put( SfxUnoAnyItem( SID_DOCINFO, uno::makeAny(xUDProps) ) );
pTabPage = SwFldDokInfPage::Create(this, *pSet);
pHelpId = HID_EDIT_FLD_DOKINF;
@@ -261,20 +222,12 @@ SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup)
return pTabPage;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFldEditDlg::~SwFldEditDlg()
{
pSh->SetCareWin(NULL);
pSh->EnterStdMode();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFldEditDlg::EnableInsert(sal_Bool bEnable)
{
if( bEnable && pSh->IsReadOnlyAvailable() && pSh->HasReadonlySel() )
@@ -282,10 +235,6 @@ void SwFldEditDlg::EnableInsert(sal_Bool bEnable)
GetOKButton()->Enable( bEnable );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFldEditDlg::InsertHdl()
{
GetOKButton()->Click();
@@ -294,7 +243,6 @@ void SwFldEditDlg::InsertHdl()
/*--------------------------------------------------------------------
Beschreibung: Aendern des Feldes anstossen
--------------------------------------------------------------------*/
-
IMPL_LINK( SwFldEditDlg, OKHdl, Button *, EMPTYARG )
{
if (GetOKButton()->IsEnabled())
@@ -311,10 +259,6 @@ IMPL_LINK( SwFldEditDlg, OKHdl, Button *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
short SwFldEditDlg::Execute()
{
// Ohne TabPage kein Dialog
@@ -324,7 +268,6 @@ short SwFldEditDlg::Execute()
/*--------------------------------------------------------------------
Beschreibung: Traveling zwishen Feldern gleichen Typs
--------------------------------------------------------------------*/
-
IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton )
{
sal_Bool bNext = pButton == &aNextBT;
@@ -366,10 +309,6 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldEditDlg, AddressHdl, PushButton *, EMPTYARG )
{
SwFldPage* pTabPage = (SwFldPage*)GetTabPage();
@@ -405,12 +344,12 @@ IMPL_LINK( SwFldEditDlg, AddressHdl, PushButton *, EMPTYARG )
}
aSet.Put(SfxUInt16Item(SID_FIELD_GRABFOCUS, nEditPos));
SwAbstractDialogFactory* pFact = swui::GetFactory();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( this, aSet,
pSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(),
RC_DLG_ADDR );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
pSh->UpdateFlds( *pCurFld );
@@ -419,4 +358,4 @@ IMPL_LINK( SwFldEditDlg, AddressHdl, PushButton *, EMPTYARG )
return 0;
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 1f3030686a1a..dd6365056043 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,26 +38,16 @@
#include <basic/sbmod.hxx>
#include <docsh.hxx>
#include <swtypes.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <fldbas.hxx>
#include <docufld.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <swmodule.hxx>
-#ifndef _FLDFUNC_HXX
#include <fldfunc.hxx>
-#endif
#include <flddropdown.hxx>
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
-#ifndef _FLDTDLG_HRC
#include <fldtdlg.hrc>
-#endif
#define USER_DATA_VERSION_1 "1"
#define USER_DATA_VERSION USER_DATA_VERSION_1
@@ -65,10 +56,6 @@ using namespace ::com::sun::star;
using rtl::OUString;
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFldFuncPage::SwFldFuncPage(Window* pParent, const SfxItemSet& rCoreSet ) :
SwFldPage( pParent, SW_RES( TP_FLD_FUNC ), rCoreSet ),
@@ -111,21 +98,12 @@ SwFldFuncPage::SwFldFuncPage(Window* pParent, const SfxItemSet& rCoreSet ) :
aCond1ED.ShowBrackets(sal_False);
aCond2ED.ShowBrackets(sal_False);
-// SwWrtShell* pSh = (SwWrtShell*)ViewShell::GetCurrShell();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFldFuncPage::~SwFldFuncPage()
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFldFuncPage::Reset(const SfxItemSet& )
{
SavePos(&aTypeLB);
@@ -213,10 +191,6 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
{
// Alte ListBoxPos sichern
@@ -386,7 +360,6 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
case TYP_INPUTFLD:
aValueFT.SetText(SW_RESSTR(STR_PROMPT));
bValue = sal_True;
- // bShowSelection = TRUE;
aNameED.SetAccessibleName(aNameFT.GetText());
aValueED.SetAccessibleName(aValueFT.GetText());
break;
@@ -439,10 +412,6 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldFuncPage, SelectHdl, ListBox *, EMPTYARG )
{
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
@@ -453,10 +422,6 @@ IMPL_LINK( SwFldFuncPage, SelectHdl, ListBox *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldFuncPage, InsertMacroHdl, ListBox *, EMPTYARG )
{
SelectHdl();
@@ -464,9 +429,7 @@ IMPL_LINK( SwFldFuncPage, InsertMacroHdl, ListBox *, EMPTYARG )
return 0;
}
-/* -----------------16.06.2003 16:24-----------------
- --------------------------------------------------*/
IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
{
aListItemsLB.SetUpdateMode(sal_False);
@@ -513,9 +476,7 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
ListEnableHdl(0);
return 0;
}
-/* -----------------17.06.2003 08:36-----------------
- --------------------------------------------------*/
IMPL_LINK( SwFldFuncPage, ListEnableHdl, void*, EMPTYARG)
{
//enable "Add" button when text is in the Edit that's not already member of the box
@@ -533,8 +494,6 @@ IMPL_LINK( SwFldFuncPage, ListEnableHdl, void*, EMPTYARG)
/*--------------------------------------------------------------------
Beschreibung: Typen in der SelectionBox erneuern
--------------------------------------------------------------------*/
-
-
void SwFldFuncPage::UpdateSubType()
{
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
@@ -582,7 +541,6 @@ void SwFldFuncPage::UpdateSubType()
/*--------------------------------------------------------------------
Beschreibung: MacroBrowser aufrufen, Listbox mit Macros fuellen
--------------------------------------------------------------------*/
-
IMPL_LINK( SwFldFuncPage, MacroHdl, Button *, pBtn )
{
Window* pDefModalDlgParent = Application::GetDefDialogParent();
@@ -599,10 +557,6 @@ IMPL_LINK( SwFldFuncPage, MacroHdl, Button *, pBtn )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwFldFuncPage::FillItemSet(SfxItemSet& )
{
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
@@ -671,10 +625,6 @@ sal_Bool SwFldFuncPage::FillItemSet(SfxItemSet& )
return sal_False;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
String SwFldFuncPage::TurnMacroString(const String &rMacro)
{
if (rMacro.Len())
@@ -700,28 +650,17 @@ String SwFldFuncPage::TurnMacroString(const String &rMacro)
return rMacro;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SfxTabPage* SwFldFuncPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return ( new SwFldFuncPage( pParent, rAttrSet ) );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwFldFuncPage::GetGroup()
{
return GRP_FKT;
}
-/* -----------------12.01.99 10:09-------------------
- *
- * --------------------------------------------------*/
void SwFldFuncPage::FillUserData()
{
String sData( String::CreateFromAscii(
@@ -753,6 +692,4 @@ IMPL_LINK( SwFldFuncPage, ModifyHdl, Edit *, EMPTYARG )
return 0;
}
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx
index 9a052bed7034..9df5911abe51 100644
--- a/sw/source/ui/fldui/fldfunc.hxx
+++ b/sw/source/ui/fldui/fldfunc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,18 +31,13 @@
#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <vcl/group.hxx>
#include <vcl/edit.hxx>
#include "condedit.hxx"
#include "fldpage.hxx"
#include <actctrl.hxx>
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
class SwFldFuncPage : public SwFldPage
{
@@ -111,3 +107,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 2d001a8c9577..a2e810c19805 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -143,7 +144,7 @@ enum
/*--------------------------------------------------------------------
Beschreibung: Formate in der richtigen Reihenfolge
--------------------------------------------------------------------*/
-static const sal_uInt16 __FAR_DATA aSetFmt[] =
+static const sal_uInt16 aSetFmt[] =
{
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_SETVAR_???
// uebereinstimmen
@@ -151,14 +152,14 @@ static const sal_uInt16 __FAR_DATA aSetFmt[] =
0
};
-static const sal_uInt16 __FAR_DATA aGetFmt[] =
+static const sal_uInt16 aGetFmt[] =
{
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_GETVAR_???
// uebereinstimmen
0
};
-static const sal_uInt16 __FAR_DATA aUsrFmt[] =
+static const sal_uInt16 aUsrFmt[] =
{
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_SETVAR_???
// uebereinstimmen
@@ -166,7 +167,7 @@ static const sal_uInt16 __FAR_DATA aUsrFmt[] =
nsSwExtendedSubType::SUB_CMD
};
-static const sal_uInt16 __FAR_DATA aDBFmt[] =
+static const sal_uInt16 aDBFmt[] =
{
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_DBFLD_???
// uebereinstimmen
@@ -194,9 +195,9 @@ struct SwFldPack
/*--------------------------------------------------------------------
Beschreibung: Strings und Formate
--------------------------------------------------------------------*/
-static const SwFldPack __FAR_DATA aSwFlds[] =
+static const SwFldPack aSwFlds[] =
{
- // Dokument
+ // Document
{ TYP_EXTUSERFLD, FLD_EU_BEGIN, FLD_EU_END, 0, 0 },
{ TYP_AUTHORFLD, 0, 0, FMT_AUTHOR_BEGIN, FMT_AUTHOR_END },
{ TYP_DATEFLD, FLD_DATE_BEGIN, FLD_DATE_END, 0, 0 },
@@ -210,7 +211,7 @@ static const SwFldPack __FAR_DATA aSwFlds[] =
{ TYP_CHAPTERFLD, 0, 0, FMT_CHAPTER_BEGIN, FMT_CHAPTER_END },
{ TYP_TEMPLNAMEFLD, 0, 0, FMT_FF_BEGIN, FMT_FF_END },
- // Funktion
+ // Functions
{ TYP_CONDTXTFLD, 0, 0, 0, 0 },
{ TYP_DROPDOWN, 0, 0, 0, 0 },
{ TYP_INPUTFLD, FLD_INPUT_BEGIN, FLD_INPUT_END, 0, 0 },
@@ -220,21 +221,21 @@ static const SwFldPack __FAR_DATA aSwFlds[] =
{ TYP_HIDDENTXTFLD, 0, 0, 0, 0 },
{ TYP_HIDDENPARAFLD, 0, 0, 0, 0 },
- // Referenzen
+ // Cross-References
{ TYP_SETREFFLD, 0, 0, 0, 0 },
{ TYP_GETREFFLD, 0, 0, FMT_REF_BEGIN, FMT_REF_END },
- // Ablage
+ // DocInformation
{ TYP_DOCINFOFLD, 0, 0, FMT_REG_BEGIN, FMT_REG_END },
- // Datenbank
+ // Database
{ TYP_DBFLD, 0, 0, FMT_DBFLD_BEGIN, FMT_DBFLD_END },
{ TYP_DBNEXTSETFLD, 0, 0, 0, 0 },
{ TYP_DBNUMSETFLD, 0, 0, 0, 0 },
{ TYP_DBSETNUMBERFLD, 0, 0, FMT_NUM_BEGIN, FMT_NUM_END-2 },
{ TYP_DBNAMEFLD, 0, 0, 0, 0 },
- // Variablen
+ // Variables
{ TYP_SETFLD, 0, 0, FMT_SETVAR_BEGIN, FMT_SETVAR_END },
{ TYP_GETFLD, 0, 0, FMT_GETVAR_BEGIN, FMT_GETVAR_END },
@@ -256,7 +257,7 @@ static SwWrtShell* lcl_GetShell()
SwView* pView;
if ( 0 != (pView = ::GetActiveView()) )
return pView->GetWrtShellPtr();
- DBG_ERROR("no current shell found!");
+ OSL_ENSURE(false, "no current shell found!");
return 0;
}
@@ -290,7 +291,7 @@ sal_Bool SwFldMgr::CanInsertRefMark( const String& rStr )
{
sal_Bool bRet = sal_False;
SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell();
- DBG_ASSERT(pSh, "no SwWrtShell found");
+ OSL_ENSURE(pSh, "no SwWrtShell found");
if(pSh)
{
sal_uInt16 nCnt = pSh->GetCrsrCnt();
@@ -311,7 +312,7 @@ sal_Bool SwFldMgr::CanInsertRefMark( const String& rStr )
void SwFldMgr::RemoveFldType(sal_uInt16 nResId, const String& rName )
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
- DBG_ASSERT(pSh, "no SwWrtShell found");
+ OSL_ENSURE(pSh, "no SwWrtShell found");
if( pSh )
pSh->RemoveFldType(nResId, rName);
}
@@ -319,7 +320,7 @@ void SwFldMgr::RemoveFldType(sal_uInt16 nResId, const String& rName )
sal_uInt16 SwFldMgr::GetFldTypeCount(sal_uInt16 nResId) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
- DBG_ASSERT(pSh, "no SwWrtShell found");
+ OSL_ENSURE(pSh, "no SwWrtShell found");
return pSh ? pSh->GetFldTypeCount(nResId) : 0;
}
@@ -327,7 +328,7 @@ sal_uInt16 SwFldMgr::GetFldTypeCount(sal_uInt16 nResId) const
SwFieldType* SwFldMgr::GetFldType(sal_uInt16 nResId, sal_uInt16 nId) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
- DBG_ASSERT(pSh, "no SwWrtShell found");
+ OSL_ENSURE(pSh, "no SwWrtShell found");
return pSh ? pSh->GetFldType(nId, nResId) : 0;
}
@@ -335,7 +336,7 @@ SwFieldType* SwFldMgr::GetFldType(sal_uInt16 nResId, sal_uInt16 nId) const
SwFieldType* SwFldMgr::GetFldType(sal_uInt16 nResId, const String& rName) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
- DBG_ASSERT(pSh, "no SwWrtShell found");
+ OSL_ENSURE(pSh, "no SwWrtShell found");
return pSh ? pSh->GetFldType(nResId, rName) : 0;
}
@@ -390,23 +391,23 @@ SwField* SwFldMgr::GetCurFld()
const SwFldGroupRgn& SwFldMgr::GetGroupRange(sal_Bool bHtmlMode, sal_uInt16 nGrpId) const
{
-static SwFldGroupRgn __READONLY_DATA aRanges[] =
+static SwFldGroupRgn const aRanges[] =
{
- { /* Dokument */ GRP_DOC_BEGIN, GRP_DOC_END },
- { /* Funktionen */ GRP_FKT_BEGIN, GRP_FKT_END },
- { /* Referenzen */ GRP_REF_BEGIN, GRP_REF_END },
- { /* Ablage */ GRP_REG_BEGIN, GRP_REG_END },
- { /* DB */ GRP_DB_BEGIN, GRP_DB_END },
+ { /* Document */ GRP_DOC_BEGIN, GRP_DOC_END },
+ { /* Functions */ GRP_FKT_BEGIN, GRP_FKT_END },
+ { /* Cross-Refs */ GRP_REF_BEGIN, GRP_REF_END },
+ { /* DocInfos */ GRP_REG_BEGIN, GRP_REG_END },
+ { /* Database */ GRP_DB_BEGIN, GRP_DB_END },
{ /* User */ GRP_VAR_BEGIN, GRP_VAR_END }
};
-static SwFldGroupRgn __READONLY_DATA aWebRanges[] =
+static SwFldGroupRgn const aWebRanges[] =
{
- { /* Dokument */ GRP_WEB_DOC_BEGIN, GRP_WEB_DOC_END },
- { /* Funktionen */ GRP_WEB_FKT_BEGIN, GRP_WEB_FKT_END },
- { /* Referenzen */ GRP_WEB_REF_BEGIN, GRP_WEB_REF_END },
- { /* Ablage */ GRP_WEB_REG_BEGIN, GRP_WEB_REG_END },
- { /* DB */ GRP_WEB_DB_BEGIN, GRP_WEB_DB_END },
- { /* User */ GRP_WEB_VAR_BEGIN, GRP_WEB_VAR_END }
+ { /* Document */ GRP_WEB_DOC_BEGIN, GRP_WEB_DOC_END },
+ { /* Functions */ GRP_WEB_FKT_BEGIN, GRP_WEB_FKT_END },
+ { /* Cross-Refs */ GRP_WEB_REF_BEGIN, GRP_WEB_REF_END },
+ { /* DocInfos */ GRP_WEB_REG_BEGIN, GRP_WEB_REG_END },
+ { /* Database */ GRP_WEB_DB_BEGIN, GRP_WEB_DB_END },
+ { /* User */ GRP_WEB_VAR_BEGIN, GRP_WEB_VAR_END }
};
if (bHtmlMode)
@@ -453,14 +454,14 @@ sal_uInt16 SwFldMgr::GetGroup(sal_Bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16
sal_uInt16 SwFldMgr::GetTypeId(sal_uInt16 nPos)
{
- ASSERT(nPos < ::GetPackCount(), "unzulaessige Pos");
+ OSL_ENSURE(nPos < ::GetPackCount(), "forbidden Pos");
return aSwFlds[ nPos ].nTypeId;
}
const String& SwFldMgr::GetTypeStr(sal_uInt16 nPos)
{
- ASSERT(nPos < ::GetPackCount(), "unzulaessige TypeId");
+ OSL_ENSURE(nPos < ::GetPackCount(), "forbidden TypeId");
sal_uInt16 nFldWh = aSwFlds[ nPos ].nTypeId;
@@ -509,7 +510,7 @@ sal_Bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, SvStringsDtor& rToFill)
{
sal_Bool bRet = sal_False;
SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell();
- DBG_ASSERT(pSh, "no SwWrtShell found");
+ OSL_ENSURE(pSh, "no SwWrtShell found");
if(pSh)
{
const sal_uInt16 nPos = GetPos(nTypeId);
@@ -618,7 +619,7 @@ sal_Bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, SvStringsDtor& rToFill)
sal_uInt16 SwFldMgr::GetFormatCount(sal_uInt16 nTypeId, sal_Bool bIsText, sal_Bool bHtmlMode) const
{
- ASSERT(nTypeId < TYP_END, "unzulaessige TypeId");
+ OSL_ENSURE(nTypeId < TYP_END, "forbidden TypeId");
{
const sal_uInt16 nPos = GetPos(nTypeId);
@@ -676,7 +677,7 @@ sal_uInt16 SwFldMgr::GetFormatCount(sal_uInt16 nTypeId, sal_Bool bIsText, sal_Bo
String SwFldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const
{
String aRet;
- ASSERT(nTypeId < TYP_END, "unzulaessige TypeId");
+ OSL_ENSURE(nTypeId < TYP_END, "forbidden TypeId");
const sal_uInt16 nPos = GetPos(nTypeId);
@@ -836,7 +837,7 @@ sal_Bool SwFldMgr::GoNextPrev( sal_Bool bNext, SwFieldType* pTyp )
void SwFldMgr::InsertFldType(SwFieldType& rType)
{
SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
- DBG_ASSERT(pSh, "no SwWrtShell found");
+ OSL_ENSURE(pSh, "no SwWrtShell found");
if(pSh)
pSh->InsertFldType(rType);
}
@@ -868,7 +869,7 @@ sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwWrtShell* pCurShell = rData.pSh;
if(!pCurShell)
pCurShell = pWrtShell ? pWrtShell : ::lcl_GetShell();
- DBG_ASSERT(pCurShell, "no SwWrtShell found");
+ OSL_ENSURE(pCurShell, "no SwWrtShell found");
if(!pCurShell)
return sal_False;
@@ -1335,11 +1336,6 @@ sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pCurShell->EndAllAction();
return sal_True;
-/* // In der Tabelle Tabellenformeln einfuegen
- SwTblFieldType* pTyp = (SwTblFieldType*)pCurShell->GetFldType(
- 0, RES_TABLEFLD);
- pFld = new SwTblField(pTyp, rData.sPar2, nsSwGetSetExpType::GSE_EXPR, nFormatId);
- bTbl = sal_True;*/
}
else
{
@@ -1376,11 +1372,11 @@ sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
}
break;
default:
- { ASSERT(!this, "Falscher Feldtyp");
+ { OSL_ENSURE(!this, "wrong field type");
return sal_False;
}
}
- ASSERT(pFld, "Feld nicht vorhanden");
+ OSL_ENSURE(pFld, "field not available");
//the auto language flag has to be set prior to the language!
@@ -1425,7 +1421,7 @@ void SwFldMgr::UpdateCurFld(sal_uLong nFormat,
SwField * _pTmpFld) // #111840#
{
// Format aendern
- ASSERT(pCurFld, "kein Feld an der CursorPos");
+ OSL_ENSURE(pCurFld, "no field at CursorPos");
bool bDelete = false;
SwField *pTmpFld; // mb: fixed memory leak
@@ -1443,7 +1439,7 @@ void SwFldMgr::UpdateCurFld(sal_uLong nFormat,
const sal_uInt16 nTypeId = pTmpFld->GetTypeId();
SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
- DBG_ASSERT(pSh, "no SwWrtShell found");
+ OSL_ENSURE(pSh, "no SwWrtShell found");
if(!pSh)
return;
pSh->StartAllAction();
@@ -1619,7 +1615,7 @@ void SwFieldType::_GetFldName()
{
static const sal_uInt16 coFldCnt = STR_TYPE_END - STR_TYPE_BEGIN;
- static sal_uInt16 __READONLY_DATA coFldNms[ coFldCnt ] = {
+ static sal_uInt16 coFldNms[ coFldCnt ] = {
FLD_DATE_STD,
FLD_TIME_STD,
STR_FILENAMEFLD,
@@ -1675,10 +1671,6 @@ void SwFieldType::_GetFldName()
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwFldMgr::ChooseMacro(const String&)
{
sal_Bool bRet = sal_False;
@@ -1709,8 +1701,8 @@ void SwFldMgr::SetMacroPath(const String& rPath)
Reference< uri::XUriReferenceFactory >
xFactory( xSMgr->createInstance(
- ::rtl::OUString::createFromAscii(
- "com.sun.star.uri.UriReferenceFactory" ) ), UNO_QUERY );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.uri.UriReferenceFactory" )) ), UNO_QUERY );
if ( xFactory.is() )
{
@@ -1724,10 +1716,6 @@ void SwFldMgr::SetMacroPath(const String& rPath)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uLong SwFldMgr::GetDefaultFormat(sal_uInt16 nTypeId, sal_Bool bIsText, SvNumberFormatter* pFormatter, double* pVal)
{
double fValue;
@@ -1774,20 +1762,19 @@ sal_uLong SwFldMgr::GetDefaultFormat(sal_uInt16 nTypeId, sal_Bool bIsText, SvNum
return pFormatter->GetStandardFormat(nDefFormat, GetCurrLanguage());
}
-/* -----------------------------01.03.01 16:46--------------------------------
-
- ---------------------------------------------------------------------------*/
Reference<XNumberingTypeInfo> SwFldMgr::GetNumberingInfo() const
{
if(!xNumberingInfo.is())
{
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
Reference < XInterface > xI = xMSF->createInstance(
- ::rtl::OUString::createFromAscii(
- "com.sun.star.text.DefaultNumberingProvider" ));
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.text.DefaultNumberingProvider" )));
Reference<XDefaultNumberingProvider> xDefNum(xI, UNO_QUERY);
- DBG_ASSERT(xDefNum.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\"");
+ OSL_ENSURE(xDefNum.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\"");
((SwFldMgr*)this)->xNumberingInfo = Reference<XNumberingTypeInfo>(xDefNum, UNO_QUERY);
}
return xNumberingInfo;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 3e6db5e1bf1e..c6d9dc1e673a 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,10 +57,6 @@
using namespace ::com::sun::star;
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFldPage::SwFldPage( Window *pParent, const ResId &rId,
const SfxItemSet &rAttrSet )
:SfxTabPage (pParent, rId, rAttrSet),
@@ -74,12 +71,8 @@ SwFldPage::SwFldPage( Window *pParent, const ResId &rId,
m_bRefresh (sal_False),
m_bFirstHTMLInit (sal_True)
{
-// FreeResource();
-}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
+}
SwFldPage::~SwFldPage()
{
@@ -210,7 +203,6 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const Str
String sPar1(rPar1);
String sPar2(rPar2);
- sal_Bool bDBChanged = sal_False;
switch( nTypeId )
{
case TYP_DATEFLD:
@@ -233,7 +225,6 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const Str
sPar1 = rPar1.Copy(nPos);
((SwDBNameInfField*)pTmpFld)->SetDBData(aData);
- bDBChanged = sal_True;
}
break;
@@ -261,7 +252,6 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const Str
break;
}
}
- bDBChanged = sal_True;
}
break;
@@ -322,10 +312,6 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const Str
return bRet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2,
const ListBox* pLst3 )
{
@@ -339,10 +325,6 @@ void SwFldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2,
m_aLstStrArr[ i ].Erase();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3)
{
sal_uInt16 nPos = 0;
@@ -401,21 +383,17 @@ void SwFldPage::EnableInsert(sal_Bool bEnable)
m_bInsert = bEnable;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldPage, NumFormatHdl, ListBox *, EMPTYARG )
{
InsertHdl();
return 0;
}
-/*-- 19.12.2005 14:05:47---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwFldPage::SetWrtShell( SwWrtShell* pShell )
{
m_pWrtShell = pShell;
m_aMgr.SetWrtShell( pShell );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx
index 00517a154efa..db5ce3a5f4c8 100644
--- a/sw/source/ui/fldui/fldpage.hxx
+++ b/sw/source/ui/fldui/fldpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,10 +33,6 @@
class ListBox;
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
const int coLBCount = 3;
class SwFldPage : public SfxTabPage
@@ -105,3 +102,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 7ef5b58e9b8b..3f1c671b4439 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,21 +40,13 @@
#include <IMark.hxx>
#include <expfld.hxx>
#include <swmodule.hxx>
-#ifndef _FLDREF_HXX
#include <fldref.hxx>
-#endif
#include <reffld.hxx>
#include <wrtsh.hxx>
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
-#ifndef _FLDTDLG_HRC
#include <fldtdlg.hrc>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
// --> OD 2007-11-14 #i83479#
#include <SwNodeNum.hxx>
#include <IDocumentMarkAccess.hxx>
@@ -77,11 +70,6 @@ sal_uInt16 nFldDlgFmtSel = 0;
#define USER_DATA_VERSION_1 "1"
#define USER_DATA_VERSION USER_DATA_VERSION_1
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFldRefPage::SwFldRefPage(Window* pParent, const SfxItemSet& rCoreSet ) :
SwFldPage( pParent, SW_RES( TP_FLD_REF ), rCoreSet ),
@@ -130,10 +118,6 @@ SwFldRefPage::SwFldRefPage(Window* pParent, const SfxItemSet& rCoreSet ) :
// <--
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFldRefPage::~SwFldRefPage()
{
}
@@ -186,10 +170,6 @@ sal_uInt16 SwFldRefPage::GetSavedSelectedPos() const
// <--
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFldRefPage::Reset(const SfxItemSet& )
{
if (!IsFldEdit())
@@ -246,7 +226,7 @@ void SwFldRefPage::Reset(const SfxItemSet& )
if ((nsSwGetSetExpType::GSE_SEQ & pType->GetType()) && pType->GetDepends() && pSh->IsUsed(*pType))
{
nPos = aTypeLB.InsertEntry(pType->GetName());
- aTypeLB.SetEntryData(nPos, (void*)(REFFLDFLAG | n));
+ aTypeLB.SetEntryData(nPos, (void*)(sal_uIntPtr)(REFFLDFLAG | n));
}
}
@@ -307,10 +287,6 @@ void SwFldRefPage::Reset(const SfxItemSet& )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
{
// Alte ListBoxPos sichern
@@ -332,8 +308,6 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
case REF_BOOKMARK:
{
// --> OD 2007-11-14 #i83479#
-// sName = sBookmarkTxt;
-// nFlag = REFFLDFLAG_BOOKMARK;
SwGetRefField* pRefFld = dynamic_cast<SwGetRefField*>(GetCurField());
if ( pRefFld &&
pRefFld->IsRefToHeadingCrossRefBookmark() )
@@ -452,10 +426,6 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldRefPage, SubTypeHdl, ListBox *, EMPTYARG )
{
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
@@ -726,10 +696,6 @@ void SwFldRefPage::UpdateSubType()
// <--
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwFldRefPage::FillFormatLB(sal_uInt16 nTypeId)
{
String sOldSel;
@@ -762,9 +728,7 @@ sal_uInt16 SwFldRefPage::FillFormatLB(sal_uInt16 nTypeId)
default:
// --> OD 2007-11-16 #i83479#
-// nSize = GetFldMgr().GetFormatCount( (REFFLDFLAG & nTypeId)
-// ? (sal_uInt16)TYP_GETREFFLD : nTypeId,
-// sal_False, IsFldDlgHtmlMode() );
+
if ( REFFLDFLAG & nTypeId )
{
nSize = FMT_REF_ONLYSEQNO - FMT_REF_BEGIN + 1;
@@ -843,10 +807,6 @@ IMPL_LINK( SwFldRefPage, ModifyHdl, Edit *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwFldRefPage::FillItemSet(SfxItemSet& )
{
sal_Bool bModified = sal_False;
@@ -868,7 +828,6 @@ sal_Bool SwFldRefPage::FillItemSet(SfxItemSet& )
switch(nTypeId)
{
case TYP_GETREFFLD:
- // aName = aSelectionLB.GetSelectEntry();
nSubType = REF_SETREFATTR;
break;
@@ -947,7 +906,7 @@ sal_Bool SwFldRefPage::FillItemSet(SfxItemSet& )
else if ( nTypeId == REFFLDFLAG_HEADING )
{
SvLBoxEntry* pEntry = aSelectionToolTipLB.GetCurEntry();
- ASSERT( pEntry,
+ OSL_ENSURE( pEntry,
"<SwFldRefPage::FillItemSet(..)> - no entry selected in selection tool tip listbox!" );
if ( pEntry )
{
@@ -967,7 +926,7 @@ sal_Bool SwFldRefPage::FillItemSet(SfxItemSet& )
else if ( nTypeId == REFFLDFLAG_NUMITEM )
{
SvLBoxEntry* pEntry = aSelectionToolTipLB.GetCurEntry();
- ASSERT( pEntry,
+ OSL_ENSURE( pEntry,
"<SwFldRefPage::FillItemSet(..)> - no entry selected in selection tool tip listbox!" );
if ( pEntry )
{
@@ -1035,28 +994,17 @@ sal_Bool SwFldRefPage::FillItemSet(SfxItemSet& )
return sal_False;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SfxTabPage* SwFldRefPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return ( new SwFldRefPage( pParent, rAttrSet ) );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwFldRefPage::GetGroup()
{
return GRP_REF;
}
-/* -----------------12.01.99 10:09-------------------
- *
- * --------------------------------------------------*/
void SwFldRefPage::FillUserData()
{
String sData( String::CreateFromAscii(
@@ -1071,3 +1019,4 @@ void SwFldRefPage::FillUserData()
SetUserData(sData);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx
index e65e05b19d2f..f0b407c36ecf 100644
--- a/sw/source/ui/fldui/fldref.hxx
+++ b/sw/source/ui/fldui/fldref.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <vcl/group.hxx>
#include <vcl/edit.hxx>
@@ -44,10 +43,6 @@
class SwTxtNode;
// <--
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
class SwFldRefPage : public SwFldPage
{
FixedText aTypeFT;
@@ -112,3 +107,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index 9efc63519459..4e26ec2cb204 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,9 +35,7 @@
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <swtypes.hxx>
#include <unotools/confignode.hxx>
#include <comphelper/processfactory.hxx>
@@ -130,18 +129,10 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFldDlg::~SwFldDlg()
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwFldDlg::Close()
{
m_pBindings->GetDispatcher()->
@@ -150,10 +141,6 @@ sal_Bool SwFldDlg::Close()
return sal_True;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFldDlg::Initialize(SfxChildWinInfo *pInfo)
{
Point aPos;
@@ -200,10 +187,6 @@ void SwFldDlg::Initialize(SfxChildWinInfo *pInfo)
SetPosPixel( aPos );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SfxItemSet* SwFldDlg::CreateInputItemSet( sal_uInt16 nID )
{
if ( nID == TP_FLD_DOKINF )
@@ -315,16 +298,12 @@ void SwFldDlg::Activate()
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFldDlg::EnableInsert(sal_Bool bEnable)
{
if( bEnable )
{
SwView* pView = ::GetActiveView();
- DBG_ASSERT(pView, "no view found");
+ OSL_ENSURE(pView, "no view found");
if( !pView ||
(pView->GetWrtShell().IsReadOnlyAvailable() &&
pView->GetWrtShell().HasReadonlySel()) )
@@ -333,17 +312,11 @@ void SwFldDlg::EnableInsert(sal_Bool bEnable)
GetOKButton().Enable(bEnable);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFldDlg::InsertHdl()
{
GetOKButton().Click();
}
-/* -----------------27.11.2002 15:24-----------------
- *
- * --------------------------------------------------*/
+
void SwFldDlg::ActivateDatabasePage()
{
m_bDataBaseMode = sal_True;
@@ -360,9 +333,7 @@ void SwFldDlg::ActivateDatabasePage()
RemoveTabPage(TP_FLD_REF);
RemoveTabPage(TP_FLD_FUNC);
}
-/*-- 07.10.2003 14:01:44---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwFldDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
{
if( TP_FLD_DB == nId)
@@ -384,3 +355,4 @@ void SwFldDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldtdlg.hrc b/sw/source/ui/fldui/fldtdlg.hrc
index 221b943779c0..c90ece9fe4c7 100644
--- a/sw/source/ui/fldui/fldtdlg.hrc
+++ b/sw/source/ui/fldui/fldtdlg.hrc
@@ -28,10 +28,6 @@
#ifndef _FLDTDLG_HRC
#define _FLDTDLG_HRC
-// #include -----------------------------------------------------------------
-
-// #define ------------------------------------------------------------------
-
#define RC_FLDTDLG_BEGIN 0
// Datenbankfeld-TabPage:
diff --git a/sw/source/ui/fldui/fldui.src b/sw/source/ui/fldui/fldui.src
index 7fb6a2e730c8..c99d0f2fc1db 100644
--- a/sw/source/ui/fldui/fldui.src
+++ b/sw/source/ui/fldui/fldui.src
@@ -103,11 +103,6 @@ String STR_INPUTFLD
};
String STR_SETINPUTFLD
{
- /* ### ACHTUNG: Neuer Text in Resource? Eingabefeld (Variable) : Eingabefeld (Varibale) */
- /* ### ACHTUNG: Neuer Text in Resource? Eingabefeld (Variable) : Eingabefeld (Varibale) */
- /* ### ACHTUNG: Neuer Text in Resource? Eingabefeld (Variable) : Eingabefeld (Varibale) */
- /* ### ACHTUNG: Neuer Text in Resource? Eingabefeld (Variable) : Eingabefeld (Varibale) */
- /* ### ACHTUNG: Neuer Text in Resource? Eingabefeld (Variable) : Eingabefeld (Varibale) */
Text [ en-US ] = "Input field (variable)" ;
};
String STR_USRINPUTFLD
@@ -406,7 +401,6 @@ String FMT_CHAPTER_NO_NOSEPARATOR
};
String FMT_CHAPTER_NAMENO
{
- /* ### ACHTUNG: Neuer Text in Resource? Kapitelnummer und Name : Nummer und Name */
Text [ en-US ] = "Chapter number and name" ;
};
/*--------------------------------------------------------------------
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 74256233560d..d2418506b47b 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,33 +39,20 @@
#include <docufld.hxx>
#include <expfld.hxx>
#include <ddefld.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <doc.hxx>
#include <docary.hxx>
#include <swmodule.hxx>
-#ifndef _FLDVAR_HXX
#include <fldvar.hxx>
-#endif
#include <calc.hxx>
#include <svl/zformat.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
-#ifndef _FLDTDLG_HRC
#include <fldtdlg.hrc>
-#endif
#define USER_DATA_VERSION_1 "1"
#define USER_DATA_VERSION USER_DATA_VERSION_1
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) :
SwFldPage ( pParent, SW_RES( TP_FLD_VAR ), rCoreSet ),
@@ -109,18 +97,10 @@ SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) :
aNumFormatLB.SetShowLanguageControl(sal_True);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFldVarPage::~SwFldVarPage()
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFldVarPage::Reset(const SfxItemSet& )
{
SavePos(&aTypeLB);
@@ -214,10 +194,6 @@ void SwFldVarPage::Reset(const SfxItemSet& )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG )
{
// Alte ListBoxPos sichern
@@ -250,10 +226,6 @@ IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
{
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
@@ -308,7 +280,6 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
}
else
aValueED.SetText(pType->GetContent());
-// aValueED.SetText(pType->GetContent(aNumFormatLB.GetFormat()));
}
}
else
@@ -497,7 +468,6 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
case TYP_SEQFLD:
{
- // aNumRB.Check(sal_True);
bName = bValue = bSeparator = bChapterLevel = sal_True;
SwFieldType* pFldTyp;
@@ -621,7 +591,6 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
/*--------------------------------------------------------------------
Beschreibung: Typen in der SelectionBox erneuern
--------------------------------------------------------------------*/
-
void SwFldVarPage::UpdateSubType()
{
String sOldSel;
@@ -725,10 +694,6 @@ void SwFldVarPage::UpdateSubType()
aSelectionLB.SetUpdateMode(sal_True);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
{
String sOldSel, sOldNumSel;
@@ -861,7 +826,6 @@ sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
/*--------------------------------------------------------------------
Beschreibung: Modify
--------------------------------------------------------------------*/
-
IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
{
String sValue(aValueED.GetText());
@@ -988,10 +952,6 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
@@ -1140,10 +1100,6 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
return sal_True;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldVarPage, ChapterHdl, ListBox *, EMPTYARG )
{
sal_Bool bEnable = aChapterLevelLB.GetSelectEntryPos() != 0;
@@ -1155,10 +1111,6 @@ IMPL_LINK( SwFldVarPage, ChapterHdl, ListBox *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldVarPage, SeparatorHdl, Edit *, EMPTYARG )
{
sal_Bool bEnable = aSeparatorED.GetText().Len() != 0 ||
@@ -1168,10 +1120,6 @@ IMPL_LINK( SwFldVarPage, SeparatorHdl, Edit *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
{
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
@@ -1265,7 +1213,6 @@ sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
}
case TYP_SEQFLD:
{
- // nSubType = nsSwGetSetExpType::GSE_SEQ; // nsSwGetSetExpType::GSE_SEQ wird im Fldmgr fest gesetzt, kann also entfallen
nSubType = aChapterLevelLB.GetSelectEntryPos();
if (nSubType == 0)
nSubType = 0x7f;
@@ -1274,7 +1221,6 @@ sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
nSubType--;
String sSeparator(aSeparatorED.GetText().GetChar(0));
cSeparator = sSeparator.Len() ? sSeparator.GetChar(0) : ' ';
- //nSubType |= (sal_uInt16)(((sal_uInt8)) << 8);
}
break;
}
@@ -1303,30 +1249,17 @@ sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
return sal_False;
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SfxTabPage* SwFldVarPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return ( new SwFldVarPage( pParent, rAttrSet ) );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwFldVarPage::GetGroup()
{
return GRP_VAR;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SelectionListBox::SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId ) :
ListBox (pDialog, rResId),
pDlg (pDialog),
@@ -1334,21 +1267,15 @@ SelectionListBox::SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId )
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
long SelectionListBox::PreNotify( NotifyEvent& rNEvt )
{
long nHandled = ListBox::PreNotify( rNEvt );
- //sal_Bool bAddSel = sal_False;
if ( rNEvt.GetType() == EVENT_KEYUP )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
const KeyCode aKeyCode = pKEvt->GetKeyCode();
const sal_uInt16 nModifier = aKeyCode.GetModifier();
if( aKeyCode.GetCode() == KEY_SPACE && !nModifier)
-// bAddSel = sal_True;
bCallAddSelection = sal_True;
}
if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
@@ -1356,18 +1283,12 @@ long SelectionListBox::PreNotify( NotifyEvent& rNEvt )
const MouseEvent* pMEvt = rNEvt.GetMouseEvent();
if (pMEvt && (pMEvt->IsMod1() || pMEvt->IsMod2())) // Alt oder Ctrl
- //bAddSel = sal_True;
bCallAddSelection = sal_True;
}
-// if (bAddSel)
-// pDlg->AddSelection(this);
-
return nHandled;
}
-/* -----------------12.01.99 11:14-------------------
- *
- * --------------------------------------------------*/
+
void SwFldVarPage::FillUserData()
{
String sData(String::CreateFromAscii(USER_DATA_VERSION));
@@ -1381,3 +1302,4 @@ void SwFldVarPage::FillUserData()
SetUserData(sData);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx
index 3c3ecf60b983..7cc8c15a54ba 100644
--- a/sw/source/ui/fldui/fldvar.hxx
+++ b/sw/source/ui/fldui/fldvar.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <vcl/group.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/edit.hxx>
@@ -43,10 +42,6 @@
class SwFldVarPage;
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
class SelectionListBox : public ListBox
{
SwFldVarPage* pDlg;
@@ -62,10 +57,6 @@ public:
void ResetCallAddSelection() {bCallAddSelection = sal_False;}
};
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
class SwFldVarPage : public SwFldPage
{
friend class SelectionListBox;
@@ -124,3 +115,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldwrap.cxx b/sw/source/ui/fldui/fldwrap.cxx
index bda3a14282f8..d24aa5f89b04 100644
--- a/sw/source/ui/fldui/fldwrap.cxx
+++ b/sw/source/ui/fldui/fldwrap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,43 +31,27 @@
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <swtypes.hxx>
#include <sfx2/basedlgs.hxx>
#include <sfx2/dispatch.hxx>
#include <vcl/msgbox.hxx>
#include <svx/htmlmode.hxx>
#include <viewopt.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <fldwrap.hxx>
#include <wrtsh.hxx>
#include <view.hxx>
#include <swmodule.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _FLDTDLG_HRC
#include <fldtdlg.hrc>
-#endif
#include "swabstdlg.hxx"
SFX_IMPL_CHILDWINDOW(SwFldDlgWrapper, FN_INSERT_FIELD)
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwChildWinWrapper::SwChildWinWrapper(Window *pParentWindow, sal_uInt16 nId) :
SfxChildWindow(pParentWindow, nId),
m_pDocSh(0)
@@ -76,10 +61,6 @@ SwChildWinWrapper::SwChildWinWrapper(Window *pParentWindow, sal_uInt16 nId) :
m_aUpdateTimer.SetTimeoutHdl(LINK(this, SwChildWinWrapper, UpdateHdl));
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwChildWinWrapper, UpdateHdl, void*, EMPTYARG )
{
GetWindow()->Activate(); // Dialog aktualisieren
@@ -90,7 +71,6 @@ IMPL_LINK( SwChildWinWrapper, UpdateHdl, void*, EMPTYARG )
/*--------------------------------------------------------------------
Beschreibung: Nach Dok-Wechsel Dialog neu initialisieren
--------------------------------------------------------------------*/
-
sal_Bool SwChildWinWrapper::ReInitDlg(SwDocShell *)
{
sal_Bool bRet = sal_False;
@@ -106,10 +86,6 @@ sal_Bool SwChildWinWrapper::ReInitDlg(SwDocShell *)
return bRet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SfxChildWinInfo SwFldDlgWrapper::GetInfo() const
{
SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
@@ -117,21 +93,16 @@ SfxChildWinInfo SwFldDlgWrapper::GetInfo() const
return aInfo;
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFldDlgWrapper::SwFldDlgWrapper( Window* _pParent, sal_uInt16 nId,
SfxBindings* pB,
SfxChildWinInfo* )
: SwChildWinWrapper( _pParent, nId )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwFldDlg* pDlg = pFact->CreateSwFldDlg(pB, this, _pParent, DLG_FLD_INSERT );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlgInterface = pDlg;
pWindow = pDlg->GetWindow();
pDlg->Start();
@@ -141,7 +112,6 @@ SwFldDlgWrapper::SwFldDlgWrapper( Window* _pParent, sal_uInt16 nId,
/*--------------------------------------------------------------------
Beschreibung: Nach Dok-Wechsel Dialog neu initialisieren
--------------------------------------------------------------------*/
-
sal_Bool SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
{
sal_Bool bRet;
@@ -154,10 +124,6 @@ sal_Bool SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
return bRet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFldDlgWrapper::ShowPage(sal_uInt16 nPage)
{
pDlgInterface->ShowPage(nPage ? nPage : TP_FLD_REF);
@@ -165,9 +131,6 @@ void SwFldDlgWrapper::ShowPage(sal_uInt16 nPage)
SFX_IMPL_CHILDWINDOW(SwFldDataOnlyDlgWrapper, FN_INSERT_FIELD_DATA_ONLY)
-/* -----------------04.02.2003 14:17-----------------
- *
- * --------------------------------------------------*/
SfxChildWinInfo SwFldDataOnlyDlgWrapper::GetInfo() const
{
SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
@@ -176,19 +139,17 @@ SfxChildWinInfo SwFldDataOnlyDlgWrapper::GetInfo() const
aInfo.bVisible = sal_False;
return aInfo;
}
-/* -----------------04.02.2003 14:17-----------------
- *
- * --------------------------------------------------*/
+
SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( Window* _pParent, sal_uInt16 nId,
SfxBindings* pB,
SfxChildWinInfo* pInfo )
: SwChildWinWrapper( _pParent, nId )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwFldDlg* pDlg = pFact->CreateSwFldDlg(pB, this, _pParent, DLG_FLD_INSERT );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlgInterface = pDlg;
pWindow = pDlg->GetWindow();
@@ -197,6 +158,7 @@ SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( Window* _pParent, sal_uInt16 n
pDlg->Initialize( pInfo );
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
}
+
/* -----------------04.02.2003 14:17-----------------
* re-init after doc activation
* --------------------------------------------------*/
@@ -210,3 +172,5 @@ sal_Bool SwFldDataOnlyDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
return bRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx
index b8c26c701b04..404d27034e63 100644
--- a/sw/source/ui/fldui/inpdlg.cxx
+++ b/sw/source/ui/fldui/inpdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -129,7 +130,7 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS,
// JP 31.3.00: Inputfields in readonly regions must be allowed to
// input any content. - 74639
sal_Bool bEnable = !rSh.IsCrsrReadonly();
- /*!rSh.IsReadOnlyAvailable() || !rSh.HasReadonlySel()*/;
+
aOKBT.Enable( bEnable );
aEditED.SetReadOnly( !bEnable );
@@ -199,3 +200,4 @@ IMPL_LINK(SwFldInputDlg, NextHdl, PushButton*, EMPTYARG)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index cd8081701b31..60db0ab163e3 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,14 +40,10 @@
#define _JAVAEDIT_CXX
#include <hintids.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <vcl/svapp.hxx>
#include <svl/urihelper.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <sfx2/docfile.hxx>
#include <sfx2/filedlghelper.hxx>
#include <docsh.hxx>
@@ -55,16 +52,10 @@
#include <fldmgr.hxx>
#include <docufld.hxx>
#include <uitool.hxx>
-#ifndef _JAVAEDIT_HXX
#include <javaedit.hxx>
-#endif
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
-#ifndef _JAVAEDIT_HRC
#include <javaedit.hrc>
-#endif
// static ----------------------------------------------------------------
@@ -130,12 +121,6 @@ SwJavaEditDialog::SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh) :
RadioButtonHdl(NULL);
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
-
SwJavaEditDialog::~SwJavaEditDialog()
{
delete pMgr;
@@ -143,12 +128,6 @@ SwJavaEditDialog::~SwJavaEditDialog()
Application::SetDefDialogParent( pOldDefDlgParent );
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
-
IMPL_LINK_INLINE_START( SwJavaEditDialog, PrevHdl, Button *, EMPTYARG )
{
SetFld();
@@ -161,12 +140,6 @@ IMPL_LINK_INLINE_START( SwJavaEditDialog, PrevHdl, Button *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwJavaEditDialog, PrevHdl, Button *, EMPTYARG )
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
-
IMPL_LINK_INLINE_START( SwJavaEditDialog, NextHdl, Button *, EMPTYARG )
{
SetFld();
@@ -179,12 +152,6 @@ IMPL_LINK_INLINE_START( SwJavaEditDialog, NextHdl, Button *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwJavaEditDialog, NextHdl, Button *, EMPTYARG )
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
-
IMPL_LINK( SwJavaEditDialog, OKHdl, Button *, EMPTYARG )
{
SetFld();
@@ -192,22 +159,10 @@ IMPL_LINK( SwJavaEditDialog, OKHdl, Button *, EMPTYARG )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
-
void SwJavaEditDialog::Apply()
{
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
-
void SwJavaEditDialog::CheckTravel()
{
sal_Bool bTravel = sal_False;
@@ -264,12 +219,6 @@ void SwJavaEditDialog::CheckTravel()
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
-
void SwJavaEditDialog::SetFld()
{
if( !aOKBtn.IsEnabled() )
@@ -304,10 +253,6 @@ sal_Bool SwJavaEditDialog::IsUpdate()
return pFld && ( bIsUrl != pFld->GetFormat() || pFld->GetPar2() != aType || pFld->GetPar1() != aText );
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwJavaEditDialog, RadioButtonHdl, RadioButton *, EMPTYARG )
{
sal_Bool bEnable = aUrlRB.IsChecked();
@@ -328,10 +273,6 @@ IMPL_LINK( SwJavaEditDialog, RadioButtonHdl, RadioButton *, EMPTYARG )
return 0;
}
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
IMPL_LINK( SwJavaEditDialog, InsertFileHdl, PushButton *, pBtn )
{
if ( !pFileDlg )
@@ -364,3 +305,4 @@ IMPL_LINK( SwJavaEditDialog, DlgClosedHdl, sfx2::FileDialogHelper *, EMPTYARG )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/javaedit.src b/sw/source/ui/fldui/javaedit.src
index bae88ed1adc5..a5ebb890fb50 100644
--- a/sw/source/ui/fldui/javaedit.src
+++ b/sw/source/ui/fldui/javaedit.src
@@ -142,7 +142,6 @@ ModalDialog DLG_JAVAEDIT
};
String STR_JAVA_INSERT
{
- /* ### ACHTUNG: Neuer Text in Resource? Script einfügen : Script einf³gen */
Text [ en-US ] = "Insert Script" ;
};
Text [ en-US ] = "Edit Script" ;
diff --git a/sw/source/ui/fldui/xfldui.cxx b/sw/source/ui/fldui/xfldui.cxx
index 15cb04547b41..2bbcd4e65598 100644
--- a/sw/source/ui/fldui/xfldui.cxx
+++ b/sw/source/ui/fldui/xfldui.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#include "precompiled_sw.hxx"
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp>
@@ -40,13 +41,9 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <comphelper/processfactory.hxx>
#include <fldmgr.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <wrtsh.hxx> // Actives Fenster
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <swmodule.hxx>
@@ -92,7 +89,7 @@ sal_Bool SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName
if(xTSupplier.is())
{
Reference<XNameAccess> xTbls = xTSupplier->getTables();
- DBG_ASSERT(xTbls->hasByName(rTblQryName), "table not available anymore?");
+ OSL_ENSURE(xTbls->hasByName(rTblQryName), "table not available anymore?");
try
{
Any aTable = xTbls->getByName(rTblQryName);
@@ -109,7 +106,7 @@ sal_Bool SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName
if(xQSupplier.is())
{
Reference<XNameAccess> xQueries = xQSupplier->getQueries();
- DBG_ASSERT(xQueries->hasByName(rTblQryName), "table not available anymore?");
+ OSL_ENSURE(xQueries->hasByName(rTblQryName), "table not available anymore?");
try
{
Any aQuery = xQueries->getByName(rTblQryName);
@@ -130,7 +127,7 @@ sal_Bool SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName
}
catch(Exception& )
{
- DBG_ERROR("Exception in getColumns()");
+ OSL_ENSURE(false, "Exception in getColumns()");
}
if(xCols.is() && xCols->hasByName(rFldName))
{
@@ -182,3 +179,4 @@ sal_Bool SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index bacee1ee3a5e..588660b83995 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,20 +51,13 @@
#include <fmtclds.hxx>
#include <swtypes.hxx>
#include <swmodule.hxx>
-#include <errhdl.hxx> // fuer Create-Methoden
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wdocsh.hxx>
#include <viewopt.hxx>
#include <pgfnote.hxx>
-#ifndef _PGFGRID_HXX
#include <pggrid.hxx>
-#endif
-#ifndef _TMPDLG_HXX
#include <tmpdlg.hxx> // der Dialog
-#endif
#include <column.hxx> // Spalten
#include <drpcps.hxx> // Initialen
#include <frmpage.hxx> // Rahmen
@@ -78,18 +72,10 @@
#include <uitool.hxx>
#include <shellres.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _FMTUI_HRC
#include <fmtui.hrc>
-#endif
#include <SwStyleNameMapper.hxx>
#include <svx/svxids.hrc>
#include <svl/stritem.hxx>
@@ -126,31 +112,31 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
nHtmlMode = ::GetHtmlMode(pWrtShell->GetView().GetDocShell());
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
// TabPages zusammenfieseln
switch( nRegion )
{
// Zeichenvorlagen
case SFX_STYLE_FAMILY_CHAR:
{
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ) , "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ) , "GetTabPageRangesFunc fail!");
AddTabPage(TP_CHAR_STD, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ) , "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ) , "GetTabPageRangesFunc fail!");
AddTabPage(TP_CHAR_EXT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) , "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) , "GetTabPageRangesFunc fail!");
AddTabPage(TP_CHAR_POS, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) , "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) , "GetTabPageRangesFunc fail!");
AddTabPage(TP_CHAR_TWOLN, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) , "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) , "GetTabPageRangesFunc fail!");
AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
SvtCJKOptions aCJKOptions;
@@ -161,41 +147,41 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
// Absatzvorlagen
case SFX_STYLE_FAMILY_PARA:
{
- DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH), "GetTabPageRangesFunc fail!");
AddTabPage( TP_PARA_STD, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), "GetTabPageRangesFunc fail!");
AddTabPage( TP_PARA_ALIGN, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageRangesFunc fail!");
AddTabPage( TP_PARA_EXT, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageRangesFunc fail!");
AddTabPage( TP_PARA_ASIAN, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageRangesFunc fail!");
AddTabPage(TP_CHAR_STD, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageRangesFunc fail!");
AddTabPage(TP_CHAR_EXT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) , "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) , "GetTabPageRangesFunc fail!");
AddTabPage(TP_CHAR_POS, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) , "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) , "GetTabPageRangesFunc fail!");
AddTabPage(TP_CHAR_TWOLN, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR), "GetTabPageRangesFunc fail!");
AddTabPage( TP_TABULATOR, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR) );
@@ -203,11 +189,11 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
SwParagraphNumTabPage::GetRanges);
AddTabPage(TP_DROPCAPS, SwDropCapsPage::Create,
SwDropCapsPage::GetRanges );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
AddTabPage(TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
AddTabPage( TP_CONDCOLL, SwCondCollPage::Create,
@@ -252,11 +238,11 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
SwFrmAddPage::GetRanges );
AddTabPage(TP_FRM_WRAP, SwWrapTabPage::Create,
SwWrapTabPage::GetRanges );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
AddTabPage(TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
AddTabPage(TP_COLUMN, SwColumnPage::Create,
@@ -264,22 +250,13 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
AddTabPage( TP_MACRO_ASSIGN, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), 0);
- // Auskommentiert wegen Bug #45776 (per default keine Breite&Groesse in Rahmenvorlagen)
-/* SwFmtFrmSize aSize( (const SwFmtFrmSize&)rBase.
- GetItemSet().Get(RES_FRM_SIZE));
- if( !aSize.GetWidth() )
- {
- aSize.SetWidth( DFLT_WIDTH );
- aSize.SetHeight( DFLT_HEIGHT );
- rBase.GetItemSet().Put( aSize );
- }*/
break;
}
// Seitenvorlagen
case SFX_STYLE_FAMILY_PAGE:
{
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
AddTabPage(TP_HEADER_PAGE, String(SW_RES(STR_PAGE_HEADER)),
SvxHeaderPage::Create,
@@ -290,8 +267,8 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
if(bColumn)
SetCurPageId(TP_COLUMN);
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ), "GetTabPageRangesFunc fail!");
AddTabPage(TP_PAGE_STD, String(SW_RES(STR_PAGE_STD)),
pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ),
pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ),
@@ -299,8 +276,8 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
1 ); // nach der Verwalten-Page
if(!pActShell || 0 == ::GetHtmlMode(pWrtShell->GetView().GetDocShell()))
{
- DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
- DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
+ OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
AddTabPage(TP_BORDER, String(SW_RES(STR_PAGE_BORDER)),
pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
AddTabPage(TP_COLUMN, String(SW_RES(STR_PAGE_COLUMN)),
@@ -330,35 +307,19 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
AddTabPage( RID_SVXPAGE_NUM_OPTIONS );
AddTabPage( RID_SVXPAGE_NUM_POSITION );
-
-/* const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rBase.GetItemSet().GetItemState(
- FN_PARAM_ACT_NUMBER, sal_False, &pItem ))
- {
-// pActNum = (ActNumberFormat*)((const SwPtrItem*)pItem)->GetValue();
- }
-*/
}
break;
default:
- ASSERT(!this, "Falsche Familie");
+ OSL_ENSURE(!this, "wrong family");
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwTemplateDlg::~SwTemplateDlg()
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
short SwTemplateDlg::Ok()
{
short nRet = SfxTabDialog::Ok();
@@ -385,10 +346,6 @@ short SwTemplateDlg::Ok()
return nRet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
const SfxItemSet* SwTemplateDlg::GetRefreshedSet()
{
SfxItemSet* pInSet = GetInputSetImpl();
@@ -397,10 +354,6 @@ const SfxItemSet* SwTemplateDlg::GetRefreshedSet()
return pInSet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
//Namen der Vorlagen und Metric setzen
@@ -413,7 +366,7 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
case TP_CHAR_STD:
{
- ASSERT(::GetActiveView(), "keine View aktiv");
+ OSL_ENSURE(::GetActiveView(), "no active view");
SvxFontListItem aFontListItem( *( (SvxFontListItem*)::GetActiveView()->
GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ) ) );
@@ -645,3 +598,4 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fmtui/tmpdlg.src b/sw/source/ui/fmtui/tmpdlg.src
index da2479717373..b9cde9c9494c 100644
--- a/sw/source/ui/fmtui/tmpdlg.src
+++ b/sw/source/ui/fmtui/tmpdlg.src
@@ -89,7 +89,6 @@ TabDialog DLG_TEMPLATE_2
PageItem
{
Identifier = TP_PARA_STD ;
- /* ### ACHTUNG: Neuer Text in Resource? Einzüge und Abstände : Einz³ge und Abstõnde */
Text [ en-US ] = "Indents & Spacing" ;
PageResID = TP_PARA_STD ;
};
@@ -102,7 +101,6 @@ TabDialog DLG_TEMPLATE_2
PageItem
{
Identifier = TP_PARA_EXT ;
- /* ### ACHTUNG: Neuer Text in Resource? Textflu?: Textflu?*/
Text [ en-US ] = "Text Flow" ;
PageResID = TP_PARA_EXT ;
};
@@ -253,7 +251,6 @@ String STR_PAGE_HEADER
};
String STR_PAGE_FOOTER
{
- /* ### ACHTUNG: Neuer Text in Resource? Fußzeile : Fu˜zeile */
Text [ en-US ] = "Footer" ;
};
String STR_PAGE_TEXTGRID
@@ -266,7 +263,6 @@ String STR_PAGE_COLUMN
};
String STR_PAGE_FOOTNOTE
{
- /* ### ACHTUNG: Neuer Text in Resource? Fußnote : Fu˜note */
Text [ en-US ] = "Footnote" ;
};
TabDialog DLG_TEMPLATE_3
@@ -300,7 +296,6 @@ TabDialog DLG_TEMPLATE_3
{
Identifier = TP_FRM_ADD ;
PageResID = TP_FRM_ADD ;
- /* ### ACHTUNG: Neuer Text in Resource? Zusätze : Zusõtze */
Text [ en-US ] = "Options" ;
};
PageItem
diff --git a/sw/source/ui/frmdlg/colex.cxx b/sw/source/ui/frmdlg/colex.cxx
index f9b3a678f8f2..ece5a214851e 100644
--- a/sw/source/ui/frmdlg/colex.cxx
+++ b/sw/source/ui/frmdlg/colex.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -204,10 +205,6 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
Invalidate();
}
-/*-----------------------------------------------------------------------
- Beschreibung:
- -----------------------------------------------------------------------*/
-
void SwColExample::DrawPage( const Point& rOrg,
const sal_Bool bSecond,
@@ -307,11 +304,6 @@ void SwColExample::DrawPage( const Point& rOrg,
}
}
-/*-----------------25.10.96 09.15-------------------
-
---------------------------------------------------*/
-
-
SwColumnOnlyExample::SwColumnOnlyExample( Window* pParent, const ResId& rResId) :
Window(pParent, rResId),
m_aFrmSize(1,1)
@@ -336,11 +328,6 @@ SwColumnOnlyExample::SwColumnOnlyExample( Window* pParent, const ResId& rResId)
SetMapMode( aMapMode );
}
-/*-----------------25.10.96 09.16-------------------
-
---------------------------------------------------*/
-
-
void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -429,11 +416,6 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
}
}
-/*-----------------25.10.96 12.05-------------------
-
---------------------------------------------------*/
-
-
void SwColumnOnlyExample::SetColumns(const SwFmtCol& rCol)
{
m_aCols = rCol;
@@ -477,16 +459,12 @@ void SwColumnOnlyExample::SetColumns(const SwFmtCol& rCol)
}
}
}
-/* -----------------------------08.02.2002 11:44------------------------------
- ---------------------------------------------------------------------------*/
SwPageGridExample::~SwPageGridExample()
{
delete pGridItem;
}
-/* -----------------------------08.02.2002 11:48------------------------------
- ---------------------------------------------------------------------------*/
#define MAX_ROWS 10
#define MAX_LINES 15
void SwPageGridExample::DrawPage( const Point& rOrg,
@@ -589,9 +567,7 @@ void SwPageGridExample::DrawPage( const Point& rOrg,
}
}
}
-/* -----------------------------08.02.2002 11:48------------------------------
- ---------------------------------------------------------------------------*/
void SwPageGridExample::UpdateExample( const SfxItemSet& rSet )
{
DELETEZ(pGridItem);
@@ -608,3 +584,4 @@ void SwPageGridExample::UpdateExample( const SfxItemSet& rSet )
SwPageExample::UpdateExample(rSet);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/frmdlg/colmgr.cxx b/sw/source/ui/frmdlg/colmgr.cxx
index 90f695aa8ae5..a4275c0039ad 100644
--- a/sw/source/ui/frmdlg/colmgr.cxx
+++ b/sw/source/ui/frmdlg/colmgr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,9 +43,6 @@
/*------------------------------------------------------------------------
Beschreibung: Spaltenbreite auf aktuelle Breite einstellen
------------------------------------------------------------------------*/
-
-
-
void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth)
{
const sal_uInt16 nCount = rCol.GetColumns().Count();
@@ -56,14 +54,10 @@ void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth)
rCol.SetWishWidth(nWidth);
}
-
// PUBLIC METHODES -------------------------------------------------------
/*------------------------------------------------------------------------
Beschreibung: Setzen Spaltenanzahl und Gutterwidth
------------------------------------------------------------------------*/
-
-
-
void SwColMgr::SetCount(sal_uInt16 nCount, sal_uInt16 nGutterWidth)
{
aFmtCol.Init(nCount, nGutterWidth, nWidth);
@@ -71,8 +65,6 @@ void SwColMgr::SetCount(sal_uInt16 nCount, sal_uInt16 nGutterWidth)
aFmtCol.SetGutterWidth(nGutterWidth, nWidth);
}
-
-
sal_uInt16 SwColMgr::GetGutterWidth( sal_uInt16 nPos ) const
{
sal_uInt16 nRet;
@@ -80,25 +72,20 @@ sal_uInt16 SwColMgr::GetGutterWidth( sal_uInt16 nPos ) const
nRet = GetCount() > 1 ? aFmtCol.GetGutterWidth() : DEF_GUTTER_WIDTH;
else
{
- DBG_ASSERT(nPos < GetCount() - 1, "Spalte ueberindiziert" );
+ OSL_ENSURE(nPos < GetCount() - 1, "Spalte ueberindiziert" );
const SwColumns& rCols = aFmtCol.GetColumns();
nRet = rCols.GetObject(nPos)->GetRight() + rCols.GetObject(nPos + 1)->GetLeft();
}
return nRet;
}
-/*-----------------22.10.96 14.28-------------------
-
---------------------------------------------------*/
-
-
void SwColMgr::SetGutterWidth(sal_uInt16 nGutterWidth, sal_uInt16 nPos )
{
if(nPos == USHRT_MAX)
aFmtCol.SetGutterWidth(nGutterWidth, nWidth);
else
{
- DBG_ASSERT(nPos < GetCount() - 1, "Spalte ueberindiziert" );
+ OSL_ENSURE(nPos < GetCount() - 1, "Spalte ueberindiziert" );
SwColumns& rCols = aFmtCol.GetColumns();
sal_uInt16 nGutterWidth2 = nGutterWidth / 2;
rCols.GetObject(nPos)->SetRight(nGutterWidth2);
@@ -109,38 +96,29 @@ void SwColMgr::SetGutterWidth(sal_uInt16 nGutterWidth, sal_uInt16 nPos )
/*------------------------------------------------------------------------
Beschreibung: Hoehe Trennlinie
------------------------------------------------------------------------*/
-
-
-
short SwColMgr::GetLineHeightPercent() const
{
return (short)aFmtCol.GetLineHeight();
}
-
-
void SwColMgr::SetLineHeightPercent(short nPercent)
{
- ASSERT(nPercent <= 100, LineHeight darf nur bis 100 % gross sein);
+ OSL_ENSURE(nPercent <= 100, "line height may only be 100 \%");
aFmtCol.SetLineHeight((sal_uInt8)nPercent);
}
+
/*------------------------------------------------------------------------
Beschreibung: Spaltenbreite
------------------------------------------------------------------------*/
-
-
-
sal_uInt16 SwColMgr::GetColWidth(sal_uInt16 nIdx) const
{
- ASSERT(nIdx < GetCount(), Spaltenarray ueberindiziert.);
+ OSL_ENSURE(nIdx < GetCount(), "Spaltenarray ueberindiziert.");
return aFmtCol.CalcPrtColWidth(nIdx, nWidth);
}
-
-
void SwColMgr::SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWd)
{
- ASSERT(nIdx < GetCount(), Spaltenarray ueberindiziert.);
+ OSL_ENSURE(nIdx < GetCount(), "Spaltenarray ueberindiziert.");
aFmtCol.GetColumns()[nIdx]->SetWishWidth(nWd);
}
@@ -148,9 +126,6 @@ void SwColMgr::SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWd)
/*--------------------------------------------------------------------
Beschreibung: Groesse neu setzen
--------------------------------------------------------------------*/
-
-
-
void SwColMgr::SetActualWidth(sal_uInt16 nW)
{
nWidth = nW;
@@ -160,9 +135,6 @@ void SwColMgr::SetActualWidth(sal_uInt16 nW)
/*--------------------------------------------------------------------
Beschreibung: ctor
--------------------------------------------------------------------*/
-
-
-
SwColMgr::SwColMgr(const SfxItemSet& rSet, sal_uInt16 nActWidth) :
aFmtCol((const SwFmtCol&)rSet.Get(RES_COL)),
nWidth(nActWidth)
@@ -179,13 +151,8 @@ SwColMgr::SwColMgr(const SfxItemSet& rSet, sal_uInt16 nActWidth) :
::FitToActualSize(aFmtCol, nWidth);
}
+SwColMgr::~SwColMgr()
+{
+}
-
-
-SwColMgr::~SwColMgr() {}
-
-
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 9859f4875b46..07b9bd10d720 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,6 +46,7 @@
#include <sfx2/dispatch.hxx>
#include <vcl/msgbox.hxx>
#include <swmodule.hxx>
+#include <sal/macros.h>
#include <helpid.h>
#include "globals.hrc"
@@ -78,8 +80,7 @@ SV_IMPL_PTRARR( SwColumns, SwColumnPtr )
/*--------------------------------------------------------------------
Beschreibung: Statische Daten
--------------------------------------------------------------------*/
-
-static const sal_uInt16 __FAR_DATA nLines[] = {
+static const sal_uInt16 nLines[] = {
DEF_LINE_WIDTH_0,
DEF_LINE_WIDTH_1,
DEF_LINE_WIDTH_2,
@@ -87,7 +88,7 @@ static const sal_uInt16 __FAR_DATA nLines[] = {
DEF_LINE_WIDTH_4
};
-static const sal_uInt16 nLineCount = sizeof(nLines) / sizeof(nLines[0]);
+static const sal_uInt16 nLineCount = SAL_N_ELEMENTS(nLines);
static const sal_uInt16 nVisCols = 3;
inline sal_Bool IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
@@ -98,10 +99,6 @@ inline sal_Bool IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect
return bRet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
SfxModalDialog(pParent, SW_RES(DLG_COLUMN)),
aOK(this, SW_RES(PB_OK)),
@@ -129,7 +126,7 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
nSelectionWidth = aRect.Width();
SfxItemSet* pColPgSet = 0;
- static sal_uInt16 __READONLY_DATA aSectIds[] = { RES_COL, RES_COL,
+ static sal_uInt16 const aSectIds[] = { RES_COL, RES_COL,
RES_FRM_SIZE, RES_FRM_SIZE,
RES_COLUMNBALANCE, RES_FRAMEDIR,
0 };
@@ -145,14 +142,14 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
pSectionSet->Put( pCurrSection->GetFmt()->GetAttrSet() );
pColPgSet = pSectionSet;
aApplyToLB.RemoveEntry( aApplyToLB.GetEntryPos(
- (void*)( 1 >= nFullSectCnt
+ (void*)(sal_IntPtr)( 1 >= nFullSectCnt
? LISTBOX_SECTIONS
: LISTBOX_SECTION )));
}
else
{
- aApplyToLB.RemoveEntry(aApplyToLB.GetEntryPos( (void*) LISTBOX_SECTION ));
- aApplyToLB.RemoveEntry(aApplyToLB.GetEntryPos( (void*) LISTBOX_SECTIONS ));
+ aApplyToLB.RemoveEntry(aApplyToLB.GetEntryPos( (void*)(sal_IntPtr)LISTBOX_SECTION ));
+ aApplyToLB.RemoveEntry(aApplyToLB.GetEntryPos( (void*)(sal_IntPtr)LISTBOX_SECTIONS ));
}
if( rWrtShell.HasSelection() && rWrtShell.IsInsRegionAvailable() &&
@@ -163,7 +160,7 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
pColPgSet = pSelectionSet;
}
else
- aApplyToLB.RemoveEntry(aApplyToLB.GetEntryPos( (void*) LISTBOX_SELECTION ));
+ aApplyToLB.RemoveEntry(aApplyToLB.GetEntryPos( (void*)(sal_IntPtr)LISTBOX_SELECTION ));
if( rWrtShell.GetFlyFrmFmt() )
{
@@ -207,8 +204,7 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
else
aApplyToLB.RemoveEntry( nPagePos );
-
- ASSERT( pColPgSet, "" );
+ OSL_ENSURE( pColPgSet, "" );
// TabPage erzeugen
SwColumnPage* pPage = (SwColumnPage*) SwColumnPage::Create( this,
*pColPgSet );
@@ -233,10 +229,6 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
pTabPage->ActivateColumnControl();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwColumnDlg::~SwColumnDlg()
{
delete pTabPage;
@@ -245,9 +237,6 @@ SwColumnDlg::~SwColumnDlg()
delete pSelectionSet;
}
-/* -----------------26.05.99 11:40-------------------
- *
- * --------------------------------------------------*/
IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox)
{
SfxItemSet* pSet = 0;
@@ -310,9 +299,7 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox)
pTabPage->Reset(*pSet);
return 0;
}
-/* -----------------26.05.99 12:32-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
{
//aktuelle Selektion auswerten
@@ -394,10 +381,6 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
#if OSL_DEBUG_LEVEL < 2
inline
#endif
@@ -409,16 +392,13 @@ sal_uInt16 GetMaxWidth( SwColMgr* pColMgr, sal_uInt16 nCols )
return nMax;
}
-static sal_uInt16 __FAR_DATA aPageRg[] = {
+static sal_uInt16 aPageRg[] = {
RES_COL, RES_COL,
0
};
-
DBG_NAME(columnhdl)
-
-
sal_uInt16 lcl_LineWidthToPos(sal_uLong nWidth)
{
const sal_uInt16 nUShortWidth = (sal_uInt16)nWidth;
@@ -428,8 +408,6 @@ sal_uInt16 lcl_LineWidthToPos(sal_uLong nWidth)
return 0;
}
-
-
void SwColumnPage::ResetColWidth()
{
if( nCols )
@@ -446,9 +424,6 @@ void SwColumnPage::ResetColWidth()
/*--------------------------------------------------------------------
Beschreibung: Jetzt als TabPage
--------------------------------------------------------------------*/
-
-
-
SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, SW_RES(TP_COLUMN), rSet),
@@ -569,18 +544,11 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet)
aLineTypeDLB.InsertEntry( 100 * nLines[ i ] );
}
-
-
SwColumnPage::~SwColumnPage()
{
delete pColMgr;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwColumnPage::SetPageWidth(long nPageWidth)
{
long nNewMaxWidth = static_cast< long >(aEd1.NormalizePercent(nPageWidth));
@@ -592,12 +560,6 @@ void SwColumnPage::SetPageWidth(long nPageWidth)
aEd3.SetMax(nNewMaxWidth, FUNIT_TWIP);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
void SwColumnPage::Reset(const SfxItemSet &rSet)
{
sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
@@ -643,7 +605,7 @@ void SwColumnPage::Reset(const SfxItemSet &rSet)
if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( RES_FRAMEDIR ) )
{
const SvxFrameDirectionItem& rItem = (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR);
- sal_uInt32 nVal = rItem.GetValue();
+ sal_uIntPtr nVal = rItem.GetValue();
sal_uInt16 nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
aTextDirectionLB.SelectEntryPos( nPos );
aTextDirectionLB.SaveValue();
@@ -656,9 +618,6 @@ void SwColumnPage::Reset(const SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: TabPage erzeugen
--------------------------------------------------------------------*/
-
-
-
SfxTabPage* SwColumnPage::Create(Window *pParent, const SfxItemSet &rSet)
{
return new SwColumnPage(pParent, rSet);
@@ -667,9 +626,6 @@ SfxTabPage* SwColumnPage::Create(Window *pParent, const SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: Attribute in den Set stopfen bei OK
--------------------------------------------------------------------*/
-
-
-
sal_Bool SwColumnPage::FillItemSet(SfxItemSet &rSet)
{
if(aCLNrEdt.HasChildPathFocus())
@@ -702,9 +658,6 @@ sal_Bool SwColumnPage::FillItemSet(SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: ColumnManager updaten
--------------------------------------------------------------------*/
-
-
-
IMPL_LINK( SwColumnPage, UpdateColMgr, void *, /*pField*/ )
{
long nGutterWidth = pColMgr->GetGutterWidth();
@@ -795,9 +748,6 @@ IMPL_LINK( SwColumnPage, UpdateColMgr, void *, /*pField*/ )
/*------------------------------------------------------------------------
Beschreibung: Initialisierung
------------------------------------------------------------------------*/
-
-
-
void SwColumnPage::Init()
{
aCLNrEdt.SetValue(nCols);
@@ -866,9 +816,6 @@ void SwColumnPage::Init()
Andernfalls werden die Edits jeweils fuer die entsprechenden
Spaltenzahl enabled; eine Spalte kann nicht bearbeitet werden.
------------------------------------------------------------------------*/
-
-
-
void SwColumnPage::UpdateCols()
{
sal_Bool bEnableBtns= sal_False;
@@ -963,7 +910,6 @@ void SwColumnPage::SetLabels( sal_uInt16 nVis )
Breiteneinstellungen des Benutzers; alle Spalten sind
gleich breit.
------------------------------------------------------------------------*/
-
IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF )
{
nCols = (sal_uInt16)aCLNrEdt.GetValue();
@@ -999,9 +945,6 @@ IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF )
eine Aenderung der Spaltenzahl kehrt wieder zu diesem
Default zurueck.
------------------------------------------------------------------------*/
-
-
-
IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
{
long nActValue = static_cast< long >(pFld->DenormalizePercent(pFld->GetValue(FUNIT_TWIP)));
@@ -1010,7 +953,7 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
if(aAutoWidthBox.IsChecked())
{
sal_uInt16 nMaxGap = pColMgr->GetActualSize() - nCols * MINLAY;
- DBG_ASSERT(nCols, "Abstand kann nicht ohne Spalten eingestellt werden");
+ OSL_ENSURE(nCols, "Abstand kann nicht ohne Spalten eingestellt werden");
nMaxGap /= nCols - 1;
if(nActValue > nMaxGap)
{
@@ -1073,26 +1016,18 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
-
IMPL_LINK( SwColumnPage, EdModify, PercentField *, pField )
{
pModifiedField = pField;
Timeout(0);
return 0;
}
+
/*------------------------------------------------------------------------
Beschreibung: Handler hinter der Checkbox fuer automatische Breite.
Ist die Box gecheckt, koennen keine expliziten Werte
fuer die Spaltenbreite eingegeben werden.
------------------------------------------------------------------------*/
-
-
-
IMPL_LINK( SwColumnPage, AutoWidthHdl, CheckBox *, pBox )
{
long nDist = static_cast< long >(aDistEd1.DenormalizePercent(aDistEd1.GetValue(FUNIT_TWIP)));
@@ -1113,7 +1048,6 @@ IMPL_LINK( SwColumnPage, AutoWidthHdl, CheckBox *, pBox )
/*------------------------------------------------------------------------
Beschreibung: Raufscrollen der Inhalte der Edits.
------------------------------------------------------------------------*/
-
IMPL_LINK( SwColumnPage, Up, Button *, EMPTYARG )
{
if( nFirstVis )
@@ -1124,10 +1058,10 @@ IMPL_LINK( SwColumnPage, Up, Button *, EMPTYARG )
}
return 0;
}
+
/*------------------------------------------------------------------------
Beschreibung: Runterscrollen der Inhalte der Edits.
------------------------------------------------------------------------*/
-
IMPL_LINK( SwColumnPage, Down, Button *, EMPTYARG )
{
if( nFirstVis + nVisCols < nCols )
@@ -1138,12 +1072,12 @@ IMPL_LINK( SwColumnPage, Down, Button *, EMPTYARG )
}
return 0;
}
+
/*------------------------------------------------------------------------
Beschreibung: Relikt aus alten Zeiten - jetzt direkt ohne time
* Timer- Handler; angetriggert durch eine Aenderung der
Spaltenbreite oder des Spaltenabstandes.
------------------------------------------------------------------------*/
-
IMPL_LINK( SwColumnPage, Timeout, Timer *, EMPTYARG )
{
DBG_PROFSTART(columnhdl) ;
@@ -1155,8 +1089,6 @@ IMPL_LINK( SwColumnPage, Timeout, Timer *, EMPTYARG )
++nChanged;
else if(pModifiedField == &aEd3)
nChanged += 2;
- /*else if(pModifiedField == &aEd4)
- nChanged += 3;*/
long nNewWidth = (sal_uInt16)
pModifiedField->DenormalizePercent(pModifiedField->GetValue(FUNIT_TWIP));
@@ -1189,12 +1121,10 @@ IMPL_LINK( SwColumnPage, Timeout, Timer *, EMPTYARG )
DBG_PROFSTOP(columnhdl) ;
return 0;
}
+
/*------------------------------------------------------------------------
Beschreibung: Aktualisierung der Anzeige
------------------------------------------------------------------------*/
-
-
-
void SwColumnPage::Update()
{
aBalanceColsCB.Enable(nCols > 1);
@@ -1228,9 +1158,6 @@ void SwColumnPage::Update()
/*--------------------------------------------------------------------
Beschreibung: Update Bsp
--------------------------------------------------------------------*/
-
-
-
void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
{
if(!bFrm)
@@ -1305,12 +1232,6 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
Update();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
int SwColumnPage::DeactivatePage(SfxItemSet *_pSet)
{
if(_pSet)
@@ -1319,19 +1240,11 @@ int SwColumnPage::DeactivatePage(SfxItemSet *_pSet)
return sal_True;
}
-
-
sal_uInt16* SwColumnPage::GetRanges()
{
return aPageRg;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS )
{
sal_uInt16 nItem = pVS->GetSelectItemId();
@@ -1368,18 +1281,11 @@ IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS )
return 0;
}
-/*-----------------25.10.96 11.41-------------------
-
---------------------------------------------------*/
-
-
void SwColumnPage::SetFrmMode(sal_Bool bMod)
{
bFrm = bMod;
}
-/* -----------------------------2002/06/19 13:08------------------------------
- ---------------------------------------------------------------------------*/
void SwColumnPage::SetInSection(sal_Bool bSet)
{
if(!SW_MOD()->GetCTLOptions().IsCTLFontEnabled())
@@ -1406,11 +1312,6 @@ void SwColumnPage::SetInSection(sal_Bool bSet)
}
}
-/*-----------------07.03.97 08.33-------------------
-
---------------------------------------------------*/
-
-
void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt )
{
OutputDevice* pDev = rUDEvt.GetDevice();
@@ -1476,16 +1377,10 @@ void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt )
pDev->SetLineColor(aLineColor);
}
-/*-----------------07.03.97 08.48-------------------
-
---------------------------------------------------*/
-
ColumnValueSet::~ColumnValueSet()
{
}
-/* -----------------------------02.04.2002 16:01------------------------------
- ---------------------------------------------------------------------------*/
void ColumnValueSet::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
@@ -1496,3 +1391,4 @@ void ColumnValueSet::DataChanged( const DataChangedEvent& rDCEvt )
ValueSet::DataChanged( rDCEvt );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 0a7863270034..4e8cb977e3b4 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,7 @@
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <cption.hxx>
#include <fldmgr.hxx>
@@ -61,12 +60,8 @@
#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/text/XTextFrame.hpp>
-#ifndef _FRMUI_HRC
#include <frmui.hrc>
-#endif
-#ifndef _CPTION_HRC
#include <cption.hrc>
-#endif
#include <SwStyleNameMapper.hxx>
using namespace ::com::sun::star;
@@ -346,8 +341,6 @@ IMPL_LINK_INLINE_START( SwCaptionDialog, SelectHdl, ListBox *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwCaptionDialog, SelectHdl, ListBox *, EMPTYARG )
-
-
IMPL_LINK( SwCaptionDialog, ModifyHdl, Edit *, EMPTYARG )
{
SwWrtShell &rSh = rView.GetWrtShell();
@@ -426,7 +419,6 @@ void SwCaptionDialog::DrawSample()
case SVX_NUM_CHARS_LOWER_LETTER_N: aStr += 'a'; break;
case SVX_NUM_ROMAN_UPPER: aStr += 'I'; break;
case SVX_NUM_ROMAN_LOWER: aStr += 'i'; break;
- //case ARABIC:
default: aStr += '1'; break;
}
//#i61007# order of captions
@@ -438,7 +430,7 @@ void SwCaptionDialog::DrawSample()
}
if( sCaption.Len() > 0 )
- {
+ {
aStr += aSepEdit.GetText();
}
}
@@ -466,7 +458,7 @@ void SwCaptionDialog::CheckButtonWidth()
&aOKButton, &aCancelButton, &aHelpButton, &aAutoCaptionButton, &aOptionButton
};
Button** pCurrent = pBtns;
- for ( sal_uInt32 i = 0; i < sizeof( pBtns ) / sizeof( pBtns[ 0 ] ); ++i, ++pCurrent )
+ for ( sal_uInt32 i = 0; i < SAL_N_ELEMENTS(pBtns); ++i, ++pCurrent )
{
aNewSize = (*pCurrent)->GetSizePixel();
aNewSize.Width() += nDelta;
@@ -483,8 +475,6 @@ SwCaptionDialog::~SwCaptionDialog()
{
delete pMgr;
}
-/* */
-
SwSequenceOptionDialog::SwSequenceOptionDialog( Window *pParent, SwView &rV,
const String& rSeqFldType )
@@ -566,9 +556,6 @@ void SwSequenceOptionDialog::Apply()
rSh.UpdateExpFlds();
}
-/*-- 24.08.2004 16:13:53---------------------------------------------------
-
- -----------------------------------------------------------------------*/
String SwSequenceOptionDialog::GetCharacterStyle() const
{
String sRet;
@@ -577,9 +564,6 @@ String SwSequenceOptionDialog::GetCharacterStyle() const
return sRet;
}
-/*-- 24.08.2004 16:14:00---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwSequenceOptionDialog::SetCharacterStyle(const String& rStyle)
{
aLbCharStyle.SelectEntryPos(0);
@@ -613,6 +597,7 @@ long SwCaptionDialog::CategoryBox::PreNotify( NotifyEvent& rNEvt )
nHandled = ComboBox::PreNotify( rNEvt );
return nHandled;
}
+
/*-- 01.11.2007 10:45:51---------------------------------------------------
//#i61007# order of captions
-----------------------------------------------------------------------*/
@@ -622,6 +607,7 @@ void lcl_MoveH( Window& rWin, sal_Int32 nMove )
aPos.Y() += nMove;
rWin.SetPosPixel(aPos);
}
+
void SwCaptionDialog::ApplyCaptionOrder()
{
//have the settings changed?
@@ -650,3 +636,5 @@ void SwCaptionDialog::ApplyCaptionOrder()
SetSizePixel( aDlgSize );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/frmdlg/cption.src b/sw/source/ui/frmdlg/cption.src
index c93efab586f1..ea63227e8695 100644
--- a/sw/source/ui/frmdlg/cption.src
+++ b/sw/source/ui/frmdlg/cption.src
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
- // #include *****************************************************************
+
#include "helpid.h"
#include "frmui.hrc"
#include "cption.hrc"
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index f25d8186b83e..adc5b2d3ec89 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,14 +35,11 @@
#include <svx/dialogs.hrc>
#include <hintids.hxx>
-#include <tools/list.hxx>
#include <sfx2/viewfrm.hxx>
#include <svx/htmlmode.hxx>
#include <fmtfsize.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <docsh.hxx>
#include <viewopt.hxx>
#include <frmdlg.hxx>
@@ -50,12 +48,8 @@
#include <column.hxx>
#include <macassgn.hxx>
-#ifndef _FRMUI_HRC
#include <frmui.hrc>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <svx/svxids.hrc>
#include <svx/flagsdef.hxx>
#include <svx/svxdlg.hxx>
@@ -63,7 +57,6 @@
/*--------------------------------------------------------------------
Beschreibung: Der Traeger des Dialoges
--------------------------------------------------------------------*/
-
SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
Window* pParent,
const SfxItemSet& rCoreSet,
@@ -108,7 +101,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
AddTabPage(TP_COLUMN, SwColumnPage::Create, 0);
}
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
AddTabPage( TP_MACRO_ASSIGN, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), 0);
AddTabPage( TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), 0 );
@@ -142,17 +135,10 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
SetCurPageId(nDefPage);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFrmDlg::~SwFrmDlg()
{
}
-
-
-
void SwFrmDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
@@ -219,3 +205,4 @@ void SwFrmDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx
index dd709b8243d4..a045a2e80635 100644
--- a/sw/source/ui/frmdlg/frmmgr.cxx
+++ b/sw/source/ui/frmdlg/frmmgr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,9 +55,8 @@
#include <com/sun/star/text/RelOrientation.hpp>
using namespace ::com::sun::star;
-//using namespace text;
-static sal_uInt16 __FAR_DATA aFrmMgrRange[] = {
+static sal_uInt16 aFrmMgrRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
FN_SET_FRM_NAME, FN_SET_FRM_NAME,
@@ -65,7 +65,6 @@ static sal_uInt16 __FAR_DATA aFrmMgrRange[] = {
/*--------------------------------------------------------------------
Beschreibung: Rahmen-Attribute ueber Shell ermitteln
--------------------------------------------------------------------*/
-
SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, sal_uInt8 nType ) :
aSet( (SwAttrPool&)pSh->GetAttrPool(), aFrmMgrRange ),
pOwnSh( pSh ),
@@ -113,11 +112,9 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, const SfxItemS
}
}
-
/*--------------------------------------------------------------------
Beschreibung: Initialisieren
--------------------------------------------------------------------*/
-
void SwFlyFrmAttrMgr::UpdateAttrMgr()
{
if ( !bNewFrm && pOwnSh->IsFrmSelected() )
@@ -144,11 +141,10 @@ void SwFlyFrmAttrMgr::_UpdateFlyFrm()
/*--------------------------------------------------------------------
Beschreibung: Bestehenden Fly-Frame aendern
--------------------------------------------------------------------*/
-
void SwFlyFrmAttrMgr::UpdateFlyFrm()
{
- ASSERT( pOwnSh->IsFrmSelected(),
- "Kein Rahmen selektiert oder keine Shell, Update nicht moeglich");
+ OSL_ENSURE( pOwnSh->IsFrmSelected(),
+ "no frame selected or no shell, update not possible");
if( pOwnSh->IsFrmSelected() )
{
@@ -178,7 +174,6 @@ void SwFlyFrmAttrMgr::UpdateFlyFrm()
/*--------------------------------------------------------------------
Beschreibung: Rahmen einfuegen
--------------------------------------------------------------------*/
-
sal_Bool SwFlyFrmAttrMgr::InsertFlyFrm()
{
pOwnSh->StartAllAction();
@@ -202,13 +197,12 @@ sal_Bool SwFlyFrmAttrMgr::InsertFlyFrm()
Nicht erlaubte Werte des Aufzaehlungstypes werden
korrigiert.
------------------------------------------------------------------------*/
-
void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType,
const Point &rPos,
const Size &rSize,
sal_Bool bAbs )
{
- ASSERT( eAnchorType == FLY_AT_PAGE ||
+ OSL_ENSURE( eAnchorType == FLY_AT_PAGE ||
eAnchorType == FLY_AT_PARA ||
eAnchorType == FLY_AT_CHAR ||
eAnchorType == FLY_AT_FLY ||
@@ -227,7 +221,6 @@ void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType,
/*--------------------------------------------------------------------
Beschreibung: Anker setzen
--------------------------------------------------------------------*/
-
void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId )
{
sal_uInt16 nPhyPageNum, nVirtPageNum;
@@ -249,15 +242,14 @@ void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId )
/*------------------------------------------------------------------------
Beschreibung: Setzen des Attributs fuer Spalten
------------------------------------------------------------------------*/
-
void SwFlyFrmAttrMgr::SetCol( const SwFmtCol &rCol )
{
aSet.Put( rCol );
}
+
/*--------------------------------------------------------------------
Beschreibung: Absolute Position setzen
--------------------------------------------------------------------*/
-
void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint )
{
bAbsPos = sal_True;
@@ -517,7 +509,6 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
/*--------------------------------------------------------------------
Beschreibung: Korrektur fuer Umrandung
--------------------------------------------------------------------*/
-
SwTwips SwFlyFrmAttrMgr::CalcTopSpace()
{
const SvxShadowItem& rShadow = GetShadow();
@@ -546,7 +537,6 @@ SwTwips SwFlyFrmAttrMgr::CalcRightSpace()
return rShadow.CalcShadowSpace(SHADOW_RIGHT) + rBox.CalcLineSpace(BOX_LINE_RIGHT);
}
-
/*--------------------------------------------------------------------
Beschreibung: Attribut aus dem Set loeschen
--------------------------------------------------------------------*/
@@ -557,7 +547,7 @@ void SwFlyFrmAttrMgr::DelAttr( sal_uInt16 nId )
void SwFlyFrmAttrMgr::SetLRSpace( long nLeft, long nRight )
{
- ASSERT( LONG_MAX != nLeft && LONG_MAX != nRight, "Welchen Raend setzen?" );
+ OSL_ENSURE( LONG_MAX != nLeft && LONG_MAX != nRight, "Welchen Raend setzen?" );
SvxLRSpaceItem aTmp( (SvxLRSpaceItem&)aSet.Get( RES_LR_SPACE ) );
if( LONG_MAX != nLeft )
@@ -569,7 +559,7 @@ void SwFlyFrmAttrMgr::SetLRSpace( long nLeft, long nRight )
void SwFlyFrmAttrMgr::SetULSpace( long nTop, long nBottom )
{
- ASSERT(LONG_MAX != nTop && LONG_MAX != nBottom, "Welchen Raend setzen?" );
+ OSL_ENSURE(LONG_MAX != nTop && LONG_MAX != nBottom, "Welchen Raend setzen?" );
SvxULSpaceItem aTmp( (SvxULSpaceItem&)aSet.Get( RES_UL_SPACE ) );
if( LONG_MAX != nTop )
@@ -627,3 +617,5 @@ void SwFlyFrmAttrMgr::SetAttrSet(const SfxItemSet& rSet)
aSet.ClearItem();
aSet.Put( rSet );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index e64ec62f6c3a..be483c12545e 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,7 +71,6 @@
#include <colmgr.hxx>
#include <grfatr.hxx>
#include <uiitems.hxx>
-// OD 19.09.2003 #i18732#
#include <fmtfollowtextflow.hxx>
#include <frmui.hrc>
@@ -113,7 +113,6 @@ struct StringIdPair_Impl
#define MAX_PERCENT_WIDTH 254L
#define MAX_PERCENT_HEIGHT 254L
-// OD 19.09.2003 #i18732# - change order of alignments
#define LB_FRAME 0x00000001L // Textbereich des Absatzes
#define LB_PRTAREA 0x00000002L // Textbereich des Absatzes + Einzuege
#define LB_VERT_FRAME 0x00000004L // Vertikaler Textbereich des Absatzes
@@ -135,14 +134,12 @@ struct StringIdPair_Impl
#define LB_REL_CHAR 0x00020000L // Zeichenausrichtung Zeichen
#define LB_REL_ROW 0x00040000L // Zeichenausrichtung Zeile
-// OD 10.11.2003 #i22305#
#define LB_FLY_VERT_FRAME 0x00100000L // vertical entire frame
#define LB_FLY_VERT_PRTAREA 0x00200000L // vertical frame text area
-// OD 11.11.2003 #i22341#
#define LB_VERT_LINE 0x00400000L // vertical text line
-static RelationMap __FAR_DATA aRelationMap[] =
+static RelationMap aRelationMap[] =
{
{SwFPos::FRAME, SwFPos::FRAME, LB_FRAME, text::RelOrientation::FRAME},
{SwFPos::PRTAREA, SwFPos::PRTAREA, LB_PRTAREA, text::RelOrientation::PRINT_AREA},
@@ -162,15 +159,13 @@ static RelationMap __FAR_DATA aRelationMap[] =
{SwFPos::REL_BORDER, SwFPos::REL_BORDER, LB_VERT_FRAME, text::RelOrientation::FRAME},
{SwFPos::REL_PRTAREA, SwFPos::REL_PRTAREA, LB_VERT_PRTAREA, text::RelOrientation::PRINT_AREA},
- // OD 10.11.2003 #i22305#
{SwFPos::FLY_REL_PG_FRAME, SwFPos::FLY_REL_PG_FRAME, LB_FLY_VERT_FRAME, text::RelOrientation::FRAME},
{SwFPos::FLY_REL_PG_PRTAREA, SwFPos::FLY_REL_PG_PRTAREA, LB_FLY_VERT_PRTAREA, text::RelOrientation::PRINT_AREA},
- // OD 11.11.2003 #i22341#
{SwFPos::REL_LINE, SwFPos::REL_LINE, LB_VERT_LINE, text::RelOrientation::TEXT_LINE}
};
-static RelationMap __FAR_DATA aAsCharRelationMap[] =
+static RelationMap aAsCharRelationMap[] =
{
{SwFPos::REL_BASE, SwFPos::REL_BASE, LB_REL_BASE, text::RelOrientation::FRAME},
{SwFPos::REL_CHAR, SwFPos::REL_CHAR, LB_REL_CHAR, text::RelOrientation::FRAME},
@@ -180,11 +175,10 @@ static RelationMap __FAR_DATA aAsCharRelationMap[] =
/*--------------------------------------------------------------------
Beschreibung: Seite verankert
--------------------------------------------------------------------*/
-
#define HORI_PAGE_REL (LB_REL_PG_FRAME|LB_REL_PG_PRTAREA|LB_REL_PG_LEFT| \
LB_REL_PG_RIGHT)
-static FrmMap __FAR_DATA aHPageMap[] =
+static FrmMap aHPageMap[] =
{
{SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, HORI_PAGE_REL},
{SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT, HORI_PAGE_REL},
@@ -192,14 +186,14 @@ static FrmMap __FAR_DATA aHPageMap[] =
{SwFPos::FROMLEFT, SwFPos::MIR_FROMLEFT, text::HoriOrientation::NONE, HORI_PAGE_REL}
};
-static FrmMap __FAR_DATA aHPageHtmlMap[] =
+static FrmMap aHPageHtmlMap[] =
{
{SwFPos::FROMLEFT, SwFPos::MIR_FROMLEFT, text::HoriOrientation::NONE, LB_REL_PG_FRAME}
};
#define VERT_PAGE_REL (LB_REL_PG_FRAME|LB_REL_PG_PRTAREA)
-static FrmMap __FAR_DATA aVPageMap[] =
+static FrmMap aVPageMap[] =
{
{SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, VERT_PAGE_REL},
{SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::BOTTOM, VERT_PAGE_REL},
@@ -207,7 +201,7 @@ static FrmMap __FAR_DATA aVPageMap[] =
{SwFPos::FROMTOP, SwFPos::FROMTOP, text::VertOrientation::NONE, VERT_PAGE_REL}
};
-static FrmMap __FAR_DATA aVPageHtmlMap[] =
+static FrmMap aVPageHtmlMap[] =
{
{SwFPos::FROMTOP, SwFPos::FROMTOP, text::VertOrientation::NONE, LB_REL_PG_FRAME}
};
@@ -215,11 +209,10 @@ static FrmMap __FAR_DATA aVPageHtmlMap[] =
/*--------------------------------------------------------------------
Beschreibung: Rahmen verankert
--------------------------------------------------------------------*/
-
#define HORI_FRAME_REL (LB_FLY_REL_PG_FRAME|LB_FLY_REL_PG_PRTAREA| \
LB_FLY_REL_PG_LEFT|LB_FLY_REL_PG_RIGHT)
-static FrmMap __FAR_DATA aHFrameMap[] =
+static FrmMap aHFrameMap[] =
{
{SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, HORI_FRAME_REL},
{SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT, HORI_FRAME_REL},
@@ -227,17 +220,16 @@ static FrmMap __FAR_DATA aHFrameMap[] =
{SwFPos::FROMLEFT, SwFPos::MIR_FROMLEFT, text::HoriOrientation::NONE, HORI_FRAME_REL}
};
-static FrmMap __FAR_DATA aHFlyHtmlMap[] =
+static FrmMap aHFlyHtmlMap[] =
{
{SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, LB_FLY_REL_PG_FRAME},
{SwFPos::FROMLEFT, SwFPos::MIR_FROMLEFT, text::HoriOrientation::NONE, LB_FLY_REL_PG_FRAME}
};
-// OD 19.09.2003 #i18732# - own vertical alignment map for to frame anchored objects
-// OD 10.11.2003 #i22305#
+// own vertical alignment map for to frame anchored objects
#define VERT_FRAME_REL (LB_FLY_VERT_FRAME|LB_FLY_VERT_PRTAREA)
-static FrmMap __FAR_DATA aVFrameMap[] =
+static FrmMap aVFrameMap[] =
{
{SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, VERT_FRAME_REL},
{SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::BOTTOM, VERT_FRAME_REL},
@@ -245,9 +237,8 @@ static FrmMap __FAR_DATA aVFrameMap[] =
{SwFPos::FROMTOP, SwFPos::FROMTOP, text::VertOrientation::NONE, VERT_FRAME_REL}
};
-static FrmMap __FAR_DATA aVFlyHtmlMap[] =
+static FrmMap aVFlyHtmlMap[] =
{
- // OD 10.11.2003 #i22305#
{SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB_FLY_VERT_FRAME},
{SwFPos::FROMTOP, SwFPos::FROMTOP, text::VertOrientation::NONE, LB_FLY_VERT_FRAME}
};
@@ -255,12 +246,11 @@ static FrmMap __FAR_DATA aVFlyHtmlMap[] =
/*--------------------------------------------------------------------
Beschreibung: Absatz verankert
--------------------------------------------------------------------*/
-
#define HORI_PARA_REL (LB_FRAME|LB_PRTAREA|LB_REL_PG_LEFT|LB_REL_PG_RIGHT| \
LB_REL_PG_FRAME|LB_REL_PG_PRTAREA|LB_REL_FRM_LEFT| \
LB_REL_FRM_RIGHT)
-static FrmMap __FAR_DATA aHParaMap[] =
+static FrmMap aHParaMap[] =
{
{SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, HORI_PARA_REL},
{SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT, HORI_PARA_REL},
@@ -270,23 +260,23 @@ static FrmMap __FAR_DATA aHParaMap[] =
#define HTML_HORI_PARA_REL (LB_FRAME|LB_PRTAREA)
-static FrmMap __FAR_DATA aHParaHtmlMap[] =
+static FrmMap aHParaHtmlMap[] =
{
{SwFPos::LEFT, SwFPos::LEFT, text::HoriOrientation::LEFT, HTML_HORI_PARA_REL},
{SwFPos::RIGHT, SwFPos::RIGHT, text::HoriOrientation::RIGHT, HTML_HORI_PARA_REL}
};
-static FrmMap __FAR_DATA aHParaHtmlAbsMap[] =
+static FrmMap aHParaHtmlAbsMap[] =
{
{SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, HTML_HORI_PARA_REL},
{SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT, HTML_HORI_PARA_REL}
};
-// OD 19.09.2003 #i18732# - allow vertical alignment at page areas
+// allow vertical alignment at page areas
#define VERT_PARA_REL (LB_VERT_FRAME|LB_VERT_PRTAREA| \
LB_REL_PG_FRAME|LB_REL_PG_PRTAREA)
-static FrmMap __FAR_DATA aVParaMap[] =
+static FrmMap aVParaMap[] =
{
{SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, VERT_PARA_REL},
{SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::BOTTOM, VERT_PARA_REL},
@@ -294,7 +284,7 @@ static FrmMap __FAR_DATA aVParaMap[] =
{SwFPos::FROMTOP, SwFPos::FROMTOP, text::VertOrientation::NONE, VERT_PARA_REL}
};
-static FrmMap __FAR_DATA aVParaHtmlMap[] =
+static FrmMap aVParaHtmlMap[] =
{
{SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB_VERT_PRTAREA}
};
@@ -302,12 +292,11 @@ static FrmMap __FAR_DATA aVParaHtmlMap[] =
/*--------------------------------------------------------------------
Beschreibung: Relativ zum Zeichen verankert
--------------------------------------------------------------------*/
-
#define HORI_CHAR_REL (LB_FRAME|LB_PRTAREA|LB_REL_PG_LEFT|LB_REL_PG_RIGHT| \
LB_REL_PG_FRAME|LB_REL_PG_PRTAREA|LB_REL_FRM_LEFT| \
LB_REL_FRM_RIGHT|LB_REL_CHAR)
-static FrmMap __FAR_DATA aHCharMap[] =
+static FrmMap aHCharMap[] =
{
{SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, HORI_CHAR_REL},
{SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT, HORI_CHAR_REL},
@@ -317,27 +306,25 @@ static FrmMap __FAR_DATA aHCharMap[] =
#define HTML_HORI_CHAR_REL (LB_FRAME|LB_PRTAREA|LB_REL_CHAR)
-static FrmMap __FAR_DATA aHCharHtmlMap[] =
+static FrmMap aHCharHtmlMap[] =
{
{SwFPos::LEFT, SwFPos::LEFT, text::HoriOrientation::LEFT, HTML_HORI_CHAR_REL},
{SwFPos::RIGHT, SwFPos::RIGHT, text::HoriOrientation::RIGHT, HTML_HORI_CHAR_REL}
};
-static FrmMap __FAR_DATA aHCharHtmlAbsMap[] =
+static FrmMap aHCharHtmlAbsMap[] =
{
{SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, LB_PRTAREA|LB_REL_CHAR},
{SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT, LB_PRTAREA},
{SwFPos::FROMLEFT, SwFPos::MIR_FROMLEFT, text::HoriOrientation::NONE, LB_REL_PG_FRAME}
};
-// OD 19.09.2003 #i18732# - allow vertical alignment at page areas
-// OD 12.11.2003 #i22341# - handle <LB_REL_CHAR> on its own
+// allow vertical alignment at page areas
#define VERT_CHAR_REL (LB_VERT_FRAME|LB_VERT_PRTAREA| \
LB_REL_PG_FRAME|LB_REL_PG_PRTAREA)
-static FrmMap __FAR_DATA aVCharMap[] =
+static FrmMap aVCharMap[] =
{
- // OD 11.11.2003 #i22341#
// introduce mappings for new vertical alignment at top of line <LB_VERT_LINE>
// and correct mapping for vertical alignment at character for position <FROM_BOTTOM>
// Note: Because of these adjustments the map becomes ambigous in its values
@@ -355,22 +342,21 @@ static FrmMap __FAR_DATA aVCharMap[] =
{SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::LINE_CENTER, LB_VERT_LINE}
};
-
-static FrmMap __FAR_DATA aVCharHtmlMap[] =
+static FrmMap aVCharHtmlMap[] =
{
{SwFPos::BELOW, SwFPos::BELOW, text::VertOrientation::CHAR_BOTTOM, LB_REL_CHAR}
};
-static FrmMap __FAR_DATA aVCharHtmlAbsMap[] =
+static FrmMap aVCharHtmlAbsMap[] =
{
{SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB_REL_CHAR},
{SwFPos::BELOW, SwFPos::BELOW, text::VertOrientation::CHAR_BOTTOM, LB_REL_CHAR}
};
+
/*--------------------------------------------------------------------
Beschreibung: Als Zeichen verankert
--------------------------------------------------------------------*/
-
-static FrmMap __FAR_DATA aVAsCharMap[] =
+static FrmMap aVAsCharMap[] =
{
{SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB_REL_BASE},
{SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::BOTTOM, LB_REL_BASE},
@@ -387,7 +373,7 @@ static FrmMap __FAR_DATA aVAsCharMap[] =
{SwFPos::FROMBOTTOM, SwFPos::FROMBOTTOM, text::VertOrientation::NONE, LB_REL_BASE}
};
-static FrmMap __FAR_DATA aVAsCharHtmlMap[] =
+static FrmMap aVAsCharHtmlMap[] =
{
{SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB_REL_BASE},
{SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::CENTER, LB_REL_BASE},
@@ -399,14 +385,14 @@ static FrmMap __FAR_DATA aVAsCharHtmlMap[] =
{SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::LINE_CENTER, LB_REL_ROW}
};
-static sal_uInt16 __FAR_DATA aPageRg[] = {
+static sal_uInt16 aPageRg[] = {
RES_FRM_SIZE, RES_FRM_SIZE,
RES_VERT_ORIENT, RES_ANCHOR,
RES_COL, RES_COL,
RES_FOLLOW_TEXT_FLOW, RES_FOLLOW_TEXT_FLOW,
0
};
-static sal_uInt16 __FAR_DATA aAddPgRg[] = {
+static sal_uInt16 aAddPgRg[] = {
RES_PROTECT, RES_PROTECT,
RES_PRINT, RES_PRINT,
FN_SET_FRM_NAME, FN_SET_FRM_NAME,
@@ -414,10 +400,6 @@ static sal_uInt16 __FAR_DATA aAddPgRg[] = {
0
};
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
size_t lcl_GetFrmMapCount( const FrmMap* pMap)
{
if ( pMap )
@@ -443,7 +425,6 @@ size_t lcl_GetFrmMapCount( const FrmMap* pMap)
return sizeof(aHParaMap) / aSizeOf;
if ( pMap == aHFrameMap )
return sizeof(aHFrameMap) / aSizeOf;
- // OD 19.09.2003 #i18732# - own vertical alignment map for to frame anchored objects
if ( pMap == aVFrameMap )
return sizeof(aVFrameMap) / aSizeOf;
if ( pMap == aHCharMap )
@@ -468,9 +449,7 @@ size_t lcl_GetFrmMapCount( const FrmMap* pMap)
}
return 0;
}
-/* -----------------------------08.08.2002 14:45------------------------------
- ---------------------------------------------------------------------------*/
void lcl_InsertVectors(ListBox& rBox,
const ::std::vector< String >& rPrev, const ::std::vector< String >& rThis,
const ::std::vector< String >& rNext, const ::std::vector< String >& rRemain)
@@ -497,9 +476,6 @@ void lcl_InsertVectors(ListBox& rBox,
::InsertStringSorted(*aIt, rBox, nStartPos );
}
-/* -----------------------------20.08.2002 16:12------------------------------
-
- ---------------------------------------------------------------------------*/
// --> OD 2009-08-31 #mongolianlayout#
// add input parameter
SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, sal_Bool bVertical, sal_Bool bVerticalL2R, sal_Bool bRTL)
@@ -598,7 +574,7 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString
return eStringId;
}
-// OD 12.11.2003 #i22341# - helper method in order to determine all possible
+// helper method in order to determine all possible
// listbox relations in a relation map for a given relation
sal_uLong lcl_GetLBRelationsForRelations( const sal_uInt16 _nRel )
{
@@ -616,7 +592,7 @@ sal_uLong lcl_GetLBRelationsForRelations( const sal_uInt16 _nRel )
return nLBRelations;
}
-// OD 14.11.2003 #i22341# - helper method on order to determine all possible
+// helper method on order to determine all possible
// listbox relations in a relation map for a given string ID
sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap,
const SvxSwFramePosString::StringId _eStrId,
@@ -640,7 +616,6 @@ sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap,
/*--------------------------------------------------------------------
Beschreibung: StandardRahmenTabPage
--------------------------------------------------------------------*/
-
namespace
{
void HandleAutoCB( sal_Bool _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto )
@@ -650,7 +625,6 @@ namespace
}
}
-
SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
SfxTabPage (pParent, SW_RES(TP_FRM_STD), rSet),
@@ -690,7 +664,6 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
aAtVertPosED (this, SW_RES(ED_AT_VERT_POS)),
aVertRelationFT (this, SW_RES(FT_VERT_RELATION)),
aVertRelationLB (this, SW_RES(LB_VERT_RELATION)),
- // OD 19.09.2003 #i18732# - new checkbox
aFollowTextFlowCB(this, SW_RES(CB_FOLLOWTEXTFLOW)),
aExampleWN (this, SW_RES(WN_BSP)),
@@ -701,12 +674,10 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
bNew(sal_True),
bNoModifyHdl(sal_True),
// --> OD 2009-08-31 #mongolianlayout# - no used
-// bVerticalChanged(FALSE),
+// bVerticalChanged(sal_False),
// <--
bIsVerticalFrame(sal_False),
- // --> OD 2009-08-31 #mongolianlayou#
bIsVerticalL2R(sal_False),
- // <--
bIsInRightToLeft(sal_False),
bHtmlMode(sal_False),
nHtmlMode(0),
@@ -714,7 +685,6 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
nUpperBorder(0),
nLowerBorder(0),
fWidthHeightRatio(1.0),
- // OD 12.11.2003 #i22341#
mpToCharCntntPos( NULL ),
nOldH(text::HoriOrientation::CENTER),
@@ -737,7 +707,6 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
aHeightED. SetLoseFocusHdl( aLk );
aAtHorzPosED.SetLoseFocusHdl( aLk );
aAtVertPosED.SetLoseFocusHdl( aLk );
- // OD 25.09.2003 #i18732# - click handler for new checkbox
aFollowTextFlowCB.SetClickHdl( aLk );
aLk = LINK(this, SwFrmPage, ModifyHdl);
@@ -772,7 +741,6 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
/*--------------------------------------------------------------------
Beschreibung: Dtor
--------------------------------------------------------------------*/
-
SwFrmPage::~SwFrmPage()
{
}
@@ -794,7 +762,7 @@ namespace
void SwFrmPage::EnableGraficMode( void )
{
- // #i39692# mustn't be called more than once
+ // i#39692 - mustn't be called more than once
if(!aRealSizeBT.IsVisible())
{
long nOffset1 = aRelWidthCB.GetPosPixel().Y() - aAutoWidthCB.GetPosPixel().Y();
@@ -833,7 +801,6 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
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, sal_False, &pItem))
@@ -872,7 +839,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
if ( nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE )
{
- ASSERT(pSh , "shell not found");
+ OSL_ENSURE(pSh , "shell not found");
//OS: nur fuer die Variante Einfuegen/Grafik/Eigenschaften
if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_GRF_REALSIZE, sal_False, &pItem))
aGrfSize = ((const SvxSizeItem*)pItem)->GetSize();
@@ -884,8 +851,6 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
aRealSizeBT.SetClickHdl(LINK(this, SwFrmPage, RealSizeHdl));
EnableGraficMode();
}
-// else
-// aTypeFL.SetSizePixel(Size(aTypeFL.GetSizePixel().Width(), aSizeFL.GetSizePixel().Height()));
if ( nDlgType == DLG_FRM_GRF )
aFixedRatioCB.Check( sal_False );
@@ -899,11 +864,10 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
}
else
{
-// aTypeFL.SetSizePixel(Size(aTypeFL.GetSizePixel().Width(), aSizeFL.GetSizePixel().Height()));
aGrfSize = ((const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE)).GetSize();
}
- //Prozenteingabe ermoeglichen.
+ // entering procent value made possible
aWidthED. SetBaseValue( aWidthED.Normalize(aGrfSize.Width()), FUNIT_TWIP );
aHeightED.SetBaseValue( aHeightED.Normalize(aGrfSize.Height()), FUNIT_TWIP );
//the available space is not yet known so the RefValue has to be calculated from size and relative size values
@@ -936,11 +900,11 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
default:; //prevent warning
}
- // OD 12.11.2003 #i22341# - determine content position of character
+ // i#22341 - determine content position of character
// Note: content position can be NULL
mpToCharCntntPos = rAnchor.GetCntntAnchor();
- // OD 19.09.2003 #i18732# - init checkbox value
+ // i#18732 - init checkbox value
{
const bool bFollowTextFlow =
static_cast<const SwFmtFollowTextFlow&>(rSet.Get(RES_FOLLOW_TEXT_FLOW)).GetValue();
@@ -969,16 +933,16 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
aMirrorPagesCB.Show(sal_False);
if(nDlgType == DLG_FRM_STD)
aFixedRatioCB.Enable(sal_False);
- // OD 19.09.2003 #i18732# - hide checkbox in HTML mode
+ // i#18732 hide checkbox in HTML mode
aFollowTextFlowCB.Show(sal_False);
}
else
{
- // OD 06.11.2003 #i18732# correct enable/disable of check box 'Mirror on..'
+ // enable/disable of check box 'Mirror on..'
aMirrorPagesCB.Enable(!aAnchorAsCharRB.IsChecked());
- // OD 06.11.2003 #i18732# - enable/disable check box 'Follow text flow'.
- // OD 10.11.2003 #i22305# - enable check box 'Follow text
+ // enable/disable check box 'Follow text flow'.
+ // enable check box 'Follow text
// flow' also for anchor type to-frame.
aFollowTextFlowCB.Enable( aAnchorAtParaRB.IsChecked() ||
aAnchorAtCharRB.IsChecked() ||
@@ -988,7 +952,6 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
Init( rSet, sal_True );
aAtVertPosED.SaveValue();
aAtHorzPosED.SaveValue();
- // OD 19.09.2003 #i18732#
aFollowTextFlowCB.SaveValue();
bNoModifyHdl = sal_False;
@@ -1007,17 +970,15 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
fWidthHeightRatio = nHeight ? double(nWidth) / double(nHeight) : 1.0;
}
-
/*--------------------------------------------------------------------
Beschreibung: Attribute in den Set stopfen bei OK
--------------------------------------------------------------------*/
-
sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
{
sal_Bool bRet = sal_False;
SwWrtShell* pSh = bFormat ? ::GetActiveWrtShell()
: ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
- ASSERT( pSh , "shell not found");
+ OSL_ENSURE( pSh , "shell not found");
const SfxItemSet& rOldSet = GetItemSet();
const SfxPoolItem* pOldItem = 0;
@@ -1126,12 +1087,6 @@ sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
const SwFmtFrmSize& rOldSize = (const SwFmtFrmSize& )rOldSet.Get(RES_FRM_SIZE);
SwFmtFrmSize aSz( rOldSize );
-/* // Folgende Zeilen nur zum debuggen:
- sal_Bool bModified = aWidthED.IsValueModified();
- sal_uInt16 nOldWidth = rOldSize.GetWidth ();
- sal_uInt16 nWidth = aWidthED .GetValue();
- sal_uInt16 nMinWidth = aWidthED .GetMin();*/
-
sal_Bool bValueModified = (aWidthED.IsValueModified() || aHeightED.IsValueModified());
sal_Bool bCheckChanged = (aRelWidthCB.GetSavedValue() != aRelWidthCB.IsChecked()
|| aRelHeightCB.GetSavedValue() != aRelHeightCB.IsChecked());
@@ -1192,11 +1147,10 @@ sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
(aSz.GetHeight() > 0 || aSz.GetHeightPercent() > 0)))
{
if (aSz.GetHeightSizeType() == ATT_VAR_SIZE) // VAR_SIZE gibts nicht bei Rahmen
- aSz.SetHeightSizeType(ATT_MIN_SIZE); // Bug #45776 (Vorlagen ohne Breite/Hoehe)
+ aSz.SetHeightSizeType(ATT_MIN_SIZE);
bRet |= 0 != rSet.Put( aSz );
}
- // OD 19.09.2003 #i18732#
if(aFollowTextFlowCB.IsChecked() != aFollowTextFlowCB.GetSavedValue())
{
bRet |= 0 != rSet.Put(SwFmtFollowTextFlow(aFollowTextFlowCB.IsChecked()));
@@ -1207,7 +1161,6 @@ sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: Horizontale und vertikale Pos initialisieren
--------------------------------------------------------------------*/
-
void SwFrmPage::InitPos(RndStdIds eId,
sal_uInt16 nH,
sal_uInt16 nHRel,
@@ -1244,7 +1197,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
}
else if ( eId == FLY_AT_FLY )
{
- // OD 19.09.2003 #i18732# - own vertical alignment map for to frame
+ // own vertical alignment map for to frame
// anchored objects.
pVMap = bHtmlMode ? aVFlyHtmlMap : aVFrameMap;
pHMap = bHtmlMode ? aHFlyHtmlMap : aHFrameMap;
@@ -1291,7 +1244,6 @@ void SwFrmPage::InitPos(RndStdIds eId,
nH = nOldH;
nHRel = nOldHRel;
}
- // OD 12.11.2003 #i22341# - pass <nHRel> as 3rd parameter to method <FillPosLB>
sal_uInt16 nMapPos = FillPosLB(pHMap, nH, nHRel, aHorizontalDLB);
FillRelLB(pHMap, nMapPos, nH, nHRel, aHoriRelationLB, aHoriRelationFT);
@@ -1301,11 +1253,9 @@ void SwFrmPage::InitPos(RndStdIds eId,
nV = nOldV;
nVRel = nOldVRel;
}
- // OD 12.11.2003 #i22341# - pass <nVRel> as 3rd parameter to method <FillPosLB>
nMapPos = FillPosLB(pVMap, nV, nVRel, aVerticalDLB);
FillRelLB(pVMap, nMapPos, nV, nVRel, aVertRelationLB, aVertRelationFT);
- // Edits init
bEnable = nH == text::HoriOrientation::NONE && eId != FLY_AS_CHAR;
if (!bEnable)
{
@@ -1345,10 +1295,6 @@ void SwFrmPage::InitPos(RndStdIds eId,
UpdateExample();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwFrmPage::FillPosLB(const FrmMap* _pMap,
const sal_uInt16 _nAlign,
const sal_uInt16 _nRel,
@@ -1359,7 +1305,7 @@ sal_uInt16 SwFrmPage::FillPosLB(const FrmMap* _pMap,
_rLB.Clear();
- // OD 12.11.2003 #i22341# - determine all possible listbox relations for
+ // i#22341 determine all possible listbox relations for
// given relation for map <aVCharMap>
const sal_uLong nLBRelations = (_pMap != aVCharMap)
? 0L
@@ -1369,8 +1315,7 @@ sal_uInt16 SwFrmPage::FillPosLB(const FrmMap* _pMap,
size_t nCount = ::lcl_GetFrmMapCount(_pMap);
for (size_t i = 0; _pMap && i < nCount; ++i)
{
-// #61359# Warum nicht von links/von innen bzw. von oben?
-// if (!bFormat || (pMap[i].eStrId != SwFPos::FROMLEFT && pMap[i].eStrId != SwFPos::FROMTOP))
+// Warum nicht von links/von innen bzw. von oben?
{
SvxSwFramePosString::StringId eStrId = aMirrorPagesCB.IsChecked() ? _pMap[i].eMirrorStrId : _pMap[i].eStrId;
// --> OD 2009-08-31 #mongolianlayout#
@@ -1385,7 +1330,7 @@ sal_uInt16 SwFrmPage::FillPosLB(const FrmMap* _pMap,
// bei zeichengebundenen Rahmen keine doppelten Eintraege einfuegen
_rLB.InsertEntry(sEntry);
}
- // OD 12.11.2003 #i22341# - add condition to handle map <aVCharMap>
+ // i#22341 - add condition to handle map <aVCharMap>
// that is ambigous in the alignment.
if ( _pMap[i].nAlign == _nAlign &&
( !(_pMap == aVCharMap) || _pMap[i].nLBRelations & nLBRelations ) )
@@ -1407,9 +1352,6 @@ sal_uInt16 SwFrmPage::FillPosLB(const FrmMap* _pMap,
return GetMapPos(_pMap, _rLB);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap,
const sal_uInt16 _nLBSelPos,
const sal_uInt16 _nAlign,
@@ -1483,7 +1425,7 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap,
{
sal_uInt16 nRelCount = sizeof(aRelationMap) / sizeof(RelationMap);
- // OD 14.11.2003 #i22341# - special handling for map <aVCharMap>,
+ // special handling for map <aVCharMap>,
// because its ambigous in its <eStrId>/<eMirrorStrId>.
if ( _pMap == aVCharMap )
{
@@ -1575,10 +1517,6 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap,
return nLBRelations;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
short SwFrmPage::GetRelation(FrmMap * /*pMap*/, ListBox &rRelationLB)
{
short nRel = 0;
@@ -1593,16 +1531,12 @@ short SwFrmPage::GetRelation(FrmMap * /*pMap*/, ListBox &rRelationLB)
return nRel;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
short SwFrmPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos,
ListBox &/*rAlignLB*/, ListBox &rRelationLB)
{
short nAlign = 0;
- // OD 14.11.2003 #i22341# - special handling also for map <aVCharMap>,
+ // i#22341 special handling also for map <aVCharMap>,
// because it contains ambigous items for alignment
if ( pMap == aVAsCharHtmlMap || pMap == aVAsCharMap ||
pMap == aVCharMap )
@@ -1633,10 +1567,6 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos,
return nAlign;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
{
sal_uInt16 nMapPos = 0;
@@ -1670,10 +1600,6 @@ sal_uInt16 SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
return nMapPos;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
RndStdIds SwFrmPage::GetAnchor()
{
RndStdIds nRet = FLY_AT_PAGE;
@@ -1699,7 +1625,6 @@ RndStdIds SwFrmPage::GetAnchor()
/*--------------------------------------------------------------------
Beschreibung: Bsp - Update
--------------------------------------------------------------------*/
-
void SwFrmPage::ActivatePage(const SfxItemSet& rSet)
{
bNoModifyHdl = sal_True;
@@ -1736,7 +1661,6 @@ int SwFrmPage::DeactivatePage(SfxItemSet * _pSet)
/*--------------------------------------------------------------------
Beschreibung: Links/rechts mit Innen/aussen tauschen
--------------------------------------------------------------------*/
-
IMPL_LINK( SwFrmPage, MirrorHdl, CheckBox *, EMPTYARG )
{
RndStdIds eId = GetAnchor();
@@ -1745,10 +1669,6 @@ IMPL_LINK( SwFrmPage, MirrorHdl, CheckBox *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFrmPage, RelSizeClickHdl, CheckBox *, pBtn )
{
if (pBtn == &aRelWidthCB)
@@ -1778,7 +1698,6 @@ IMPL_LINK( SwFrmPage, RelSizeClickHdl, CheckBox *, pBtn )
/*--------------------------------------------------------------------
Beschreibung: Bereichspruefung
--------------------------------------------------------------------*/
-
IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
{
if (bNoModifyHdl)
@@ -1786,7 +1705,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
SwWrtShell* pSh = bFormat ? ::GetActiveWrtShell()
:((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
- ASSERT(pSh , "shell not found");
+ OSL_ENSURE(pSh , "shell not found");
SwFlyFrmAttrMgr aMgr( bNew, pSh, (const SwAttrSet&)GetItemSet() );
SvxSwFrameValidation aVal;
@@ -1794,7 +1713,6 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
aVal.bAutoHeight = aAutoHeightCB.IsChecked();
aVal.bAutoWidth = aAutoWidthCB.IsChecked();
aVal.bMirror = aMirrorPagesCB.IsChecked();
- // OD 18.09.2003 #i18732#
aVal.bFollowTextFlow = aFollowTextFlowCB.IsChecked();
if ( pHMap )
@@ -1911,9 +1829,9 @@ IMPL_LINK( SwFrmPage, AnchorTypeHdl, RadioButton *, EMPTYARG )
{
aMirrorPagesCB.Enable(!aAnchorAsCharRB.IsChecked());
- // OD 06.11.2003 #i18732# - enable check box 'Follow text flow' for anchor
+ // i#18732 - enable check box 'Follow text flow' for anchor
// type to-paragraph' and to-character
- // OD 10.11.2003 #i22305# - enable check box 'Follow text
+ // i#22305 - enable check box 'Follow text
// flow' also for anchor type to-frame.
aFollowTextFlowCB.Enable( aAnchorAtParaRB.IsChecked() ||
aAnchorAtCharRB.IsChecked() ||
@@ -1936,10 +1854,6 @@ IMPL_LINK( SwFrmPage, AnchorTypeHdl, RadioButton *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
{
sal_Bool bHori = pLB == &aHorizontalDLB;
@@ -2047,7 +1961,6 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
/*--------------------------------------------------------------------
Beschreibung: Horizontale Pos
--------------------------------------------------------------------*/
-
IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB )
{
sal_Bool bHori = pLB == &aHoriRelationLB;
@@ -2080,7 +1993,6 @@ IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB )
return 0;
}
-
IMPL_LINK_INLINE_START( SwFrmPage, RealSizeHdl, Button *, EMPTYARG )
{
aWidthED.SetUserValue( aWidthED. NormalizePercent(aGrfSize.Width() ), FUNIT_TWIP);
@@ -2091,7 +2003,6 @@ IMPL_LINK_INLINE_START( SwFrmPage, RealSizeHdl, Button *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwFrmPage, RealSizeHdl, Button *, EMPTYARG )
-
IMPL_LINK( SwFrmPage, AutoWidthClickHdl, void*, EMPTYARG )
{
if( !IsInGraficMode() )
@@ -2128,10 +2039,6 @@ IMPL_LINK( SwFrmPage, ModifyHdl, Edit *, pEdit )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFrmPage::UpdateExample()
{
sal_uInt16 nPos = aHorizontalDLB.GetSelectEntryPos();
@@ -2363,9 +2270,7 @@ sal_uInt16* SwFrmPage::GetRanges()
{
return aPageRg;
}
-/* -----------------------------03.11.00 10:52--------------------------------
- ---------------------------------------------------------------------------*/
void SwFrmPage::SetFormatUsed(sal_Bool bFmt)
{
bFormat = bFmt;
@@ -2378,12 +2283,6 @@ void SwFrmPage::SetFormatUsed(sal_Bool bFmt)
aAnchorAtFrameRB.Hide();
aTypeFL.Hide();
aTypeSepFL.Hide();
-
-// Point aSizePos = aSizeFL.GetPosPixel();
-// Size aSizeSize = aSizeFL.GetSizePixel();
-// aSizeSize.Width() = aTypeFL.GetPosPixel().X() +
-// aTypeFL.GetSizePixel().Width() - aSizePos.X();
-// aSizeFL.SetSizePixel(aSizeSize);
}
}
@@ -2400,10 +2299,6 @@ void SwFrmPage::EnableVerticalPositioning( bool bEnable )
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwGrfExtPage::SwGrfExtPage(Window *pParent, const SfxItemSet &rSet) :
SfxTabPage( pParent, SW_RES(TP_GRF_EXT), rSet ),
aMirrorFL (this, SW_RES( FL_MIRROR )),
@@ -2412,7 +2307,7 @@ SwGrfExtPage::SwGrfExtPage(Window *pParent, const SfxItemSet &rSet) :
aAllPagesRB (this, SW_RES( RB_MIRROR_ALL_PAGES )),
aLeftPagesRB (this, SW_RES( RB_MIRROR_LEFT_PAGES )),
aRightPagesRB (this, SW_RES( RB_MIRROR_RIGHT_PAGES )),
- aBmpWin (this, WN_BMP, Graphic(), BitmapEx(SW_RES(BMP_EXAMPLE)), BitmapEx(SW_RES(BMP_EXAMPLE_HC)) ),
+ aBmpWin (this, WN_BMP, Graphic(), BitmapEx(SW_RES(BMP_EXAMPLE))),
aConnectFL (this, SW_RES( FL_CONNECT )),
aConnectFT (this, SW_RES( FT_CONNECT )),
aConnectED (this, SW_RES( ED_CONNECT )),
@@ -2429,28 +2324,16 @@ SwGrfExtPage::SwGrfExtPage(Window *pParent, const SfxItemSet &rSet) :
aBrowseBT.SetClickHdl ( LINK(this, SwGrfExtPage, BrowseHdl));
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwGrfExtPage::~SwGrfExtPage()
{
delete pGrfDlg;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SfxTabPage* SwGrfExtPage::Create( Window *pParent, const SfxItemSet &rSet )
{
return new SwGrfExtPage( pParent, rSet );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwGrfExtPage::Reset(const SfxItemSet &rSet)
{
const SfxPoolItem* pItem;
@@ -2467,10 +2350,6 @@ void SwGrfExtPage::Reset(const SfxItemSet &rSet)
ActivatePage(rSet);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
{
const SvxProtectItem& rProt = (const SvxProtectItem& )rSet.Get(RES_PROTECT);
@@ -2556,10 +2435,6 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
aBmpWin.Invalidate();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
{
sal_Bool bModified = sal_False;
@@ -2598,9 +2473,6 @@ sal_Bool SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
}
return bModified;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
int SwGrfExtPage::DeactivatePage(SfxItemSet *_pSet)
{
@@ -2609,10 +2481,6 @@ int SwGrfExtPage::DeactivatePage(SfxItemSet *_pSet)
return sal_True;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwGrfExtPage, BrowseHdl, Button *, EMPTYARG )
{
if(!pGrfDlg)
@@ -2661,9 +2529,6 @@ IMPL_LINK( SwGrfExtPage, BrowseHdl, Button *, EMPTYARG )
}
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
IMPL_LINK( SwGrfExtPage, MirrorHdl, CheckBox *, EMPTYARG )
{
@@ -2685,13 +2550,11 @@ IMPL_LINK( SwGrfExtPage, MirrorHdl, CheckBox *, EMPTYARG )
/*--------------------------------------------------------------------
Beschreibung: BeispielWindow
--------------------------------------------------------------------*/
-
BmpWindow::BmpWindow( Window* pPar, sal_uInt16 nId,
- const Graphic& rGraphic, const BitmapEx& rBmp, const BitmapEx& rBmpHC ) :
+ const Graphic& rGraphic, const BitmapEx& rBmp ) :
Window(pPar, SW_RES(nId)),
aGraphic(rGraphic),
aBmp(rBmp),
- aBmpHC(rBmpHC),
bHorz(sal_False),
bVert(sal_False),
bGraphic(sal_False),
@@ -2738,8 +2601,7 @@ void BmpWindow::Paint( const Rectangle& )
aGraphic.Draw( this, aPntPos, aPntSz );
else
{
- bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
- DrawBitmapEx( aPntPos, aPntSz, bHC ? aBmpHC : aBmp );
+ DrawBitmapEx( aPntPos, aPntSz, aBmp );
}
}
@@ -2758,8 +2620,6 @@ void BmpWindow::SetGraphic(const Graphic& rGrf)
/***************************************************************************
Beschreibung: URL und ImageMap an Rahmen einstellen
***************************************************************************/
-
-
SwFrmURLPage::SwFrmURLPage( Window *pParent, const SfxItemSet &rSet ) :
SfxTabPage(pParent, SW_RES(TP_FRM_URL), rSet),
aHyperLinkFL (this, SW_RES( FL_HYPERLINK )),
@@ -2779,18 +2639,10 @@ SwFrmURLPage::SwFrmURLPage( Window *pParent, const SfxItemSet &rSet ) :
aSearchPB.SetClickHdl(LINK(this, SwFrmURLPage, InsertFileHdl));
}
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
SwFrmURLPage::~SwFrmURLPage()
{
}
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
void SwFrmURLPage::Reset( const SfxItemSet &rSet )
{
const SfxPoolItem* pItem;
@@ -2798,17 +2650,16 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet )
{
TargetList* pList = new TargetList;
((const SfxFrameItem*)pItem)->GetFrame()->GetTargetList(*pList);
- sal_uInt16 nCount = (sal_uInt16)pList->Count();
- if( nCount )
+ if( !pList->empty() )
{
- sal_uInt16 i;
- for ( i = 0; i < nCount; i++ )
+ size_t nCount = pList->size();
+ for ( size_t i = 0; i < nCount; i++ )
{
- aFrameCB.InsertEntry(*pList->GetObject(i));
+ aFrameCB.InsertEntry( *pList->at( i ) );
}
- for ( i = nCount; i; i-- )
+ for ( size_t i = nCount; i; )
{
- delete pList->GetObject( i - 1 );
+ delete pList->at( --i );
}
}
delete pList;
@@ -2837,12 +2688,6 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet )
aClientCB.SaveValue();
}
-
-
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
sal_Bool SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
{
sal_Bool bModified = sal_False;
@@ -2882,19 +2727,11 @@ sal_Bool SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
return bModified;
}
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
SfxTabPage* SwFrmURLPage::Create(Window *pParent, const SfxItemSet &rSet)
{
return new SwFrmURLPage( pParent, rSet );
}
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
IMPL_LINK( SwFrmURLPage, InsertFileHdl, PushButton *, EMPTYARG )
{
FileDialogHelper aDlgHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
@@ -2918,9 +2755,6 @@ IMPL_LINK( SwFrmURLPage, InsertFileHdl, PushButton *, EMPTYARG )
return 0;
}
-/* -----------------------------03.11.00 10:56--------------------------------
-
- ---------------------------------------------------------------------------*/
void lcl_Move(Window& rWin, sal_Int32 nDiff)
{
Point aPos(rWin.GetPosPixel());
@@ -2928,10 +2762,6 @@ void lcl_Move(Window& rWin, sal_Int32 nDiff)
rWin.SetPosPixel(aPos);
}
-/*-----------------13.11.96 13.15-------------------
-
---------------------------------------------------*/
-
SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) :
SfxTabPage(pParent, SW_RES(TP_FRM_ADD), rSet),
@@ -2967,27 +2797,15 @@ SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) :
}
-/*-----------------13.11.96 13.15-------------------
-
---------------------------------------------------*/
-
SwFrmAddPage::~SwFrmAddPage()
{
}
-/*-----------------13.11.96 13.15-------------------
-
---------------------------------------------------*/
-
SfxTabPage* SwFrmAddPage::Create(Window *pParent, const SfxItemSet &rSet)
{
return new SwFrmAddPage(pParent, rSet);
}
-/*-----------------13.11.96 13.14-------------------
-
---------------------------------------------------*/
-
void SwFrmAddPage::Reset(const SfxItemSet &rSet )
{
const SfxPoolItem* pItem;
@@ -3025,7 +2843,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
aTmpName1 = ((const SfxStringItem*)pItem)->GetValue();
}
- DBG_ASSERT(pWrtSh, "keine Shell?");
+ OSL_ENSURE(pWrtSh, "keine Shell?");
if( bNew || !aTmpName1.Len() )
switch( nDlgType )
@@ -3126,7 +2944,6 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
aThisPageFrames.erase(aThisPageFrames.begin(), aThisPageFrames.end());
aRemainFrames.erase(aRemainFrames.begin(), aRemainFrames.end());
-
pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, sal_True,
aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames );
lcl_InsertVectors(aNextLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames);
@@ -3152,7 +2969,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
const SwFmtEditInReadonly& rEdit = (const SwFmtEditInReadonly& )rSet.Get(RES_EDIT_IN_READONLY);
aEditInReadonlyCB.Check(rEdit.GetValue()); aEditInReadonlyCB.SaveValue();
- // drucken
+ // print
const SvxPrintItem& rPrt = (const SvxPrintItem&)rSet.Get(RES_PRINT);
aPrintFrameCB.Check(rPrt.GetValue()); aPrintFrameCB.SaveValue();
@@ -3186,10 +3003,6 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
}
}
-/*-----------------13.11.96 13.20-------------------
-
---------------------------------------------------*/
-
sal_Bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
{
sal_Bool bRet = sal_False;
@@ -3252,19 +3065,11 @@ sal_Bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
return bRet;
}
-/*-----------------13.11.96 15.05-------------------
-
---------------------------------------------------*/
-
sal_uInt16* SwFrmAddPage::GetRanges()
{
return aAddPgRg;
}
-/*-----------------13.11.96 16.12-------------------
-
---------------------------------------------------*/
-
IMPL_LINK(SwFrmAddPage, EditModifyHdl, Edit*, EMPTYARG)
{
sal_Bool bEnable = 0 != aNameED.GetText().Len();
@@ -3273,7 +3078,7 @@ IMPL_LINK(SwFrmAddPage, EditModifyHdl, Edit*, EMPTYARG)
return 0;
}
-//-----------------------------------------------------------------------------
+
void SwFrmAddPage::SetFormatUsed(sal_Bool bFmt)
{
bFormat = bFmt;
@@ -3308,9 +3113,7 @@ void SwFrmAddPage::SetFormatUsed(sal_Bool bFmt)
lcl_Move(*aWindows[nIdx++], nDiff);
}
}
-/* -----------------------------08.08.2002 16:24------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox)
{
String sCurrentPrevChain, sCurrentNextChain;
@@ -3343,3 +3146,5 @@ IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox)
}
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/frmdlg/frmpage.hrc b/sw/source/ui/frmdlg/frmpage.hrc
index 044d2fdd4e05..ed58d821f032 100644
--- a/sw/source/ui/frmdlg/frmpage.hrc
+++ b/sw/source/ui/frmdlg/frmpage.hrc
@@ -105,7 +105,6 @@
#define ED_URL 59
#define BMP_EXAMPLE 62
-#define BMP_EXAMPLE_HC 63
#define RB_MIRROR_ALL_PAGES 64
#define RB_MIRROR_LEFT_PAGES 65
#define RB_MIRROR_RIGHT_PAGES 66
diff --git a/sw/source/ui/frmdlg/frmpage.src b/sw/source/ui/frmdlg/frmpage.src
index 782607000386..f813471c5b76 100644
--- a/sw/source/ui/frmdlg/frmpage.src
+++ b/sw/source/ui/frmdlg/frmpage.src
@@ -543,10 +543,6 @@ TabPage TP_GRF_EXT
{
File = "dog.bmp" ;
};
- Bitmap BMP_EXAMPLE_HC
- {
- File = "dog_h.bmp" ;
- };
FixedLine FL_CONNECT
{
Pos = MAP_APPFONT ( 6 , 87 ) ;
diff --git a/sw/source/ui/frmdlg/frmui.src b/sw/source/ui/frmdlg/frmui.src
index 5e3abb1286e4..d6fdfb157267 100644
--- a/sw/source/ui/frmdlg/frmui.src
+++ b/sw/source/ui/frmdlg/frmui.src
@@ -100,7 +100,6 @@ String STR_CHAR_CENTER
};
String STR_OLE_INSERT
{
- /* ### ACHTUNG: Neuer Text in Resource? Objekt einfügen : Objekt einf³gen */
Text [ en-US ] = "Insert object" ;
};
String STR_OLE_EDIT
@@ -127,7 +126,6 @@ InfoBox MSG_COLUMN_ERR_BOUNDWIDTH
{
BUTTONS = WB_OK ;
DEFBUTTON = WB_DEF_OK ;
- /* ### ACHTUNG: Neuer Text in Resource? Der Spaltenabstand ist zu groß für die Spaltenbreite. : Der Spaltenabstand ist zu gro˜ f³r die Spaltenbreite. */
Message [ en-US ] = "Column spacing exceeds the column width." ;
};
diff --git a/sw/source/ui/frmdlg/pattern.cxx b/sw/source/ui/frmdlg/pattern.cxx
index 9b2de83e8f59..d59d6778f919 100644
--- a/sw/source/ui/frmdlg/pattern.cxx
+++ b/sw/source/ui/frmdlg/pattern.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,7 +55,7 @@ SwBackgroundDlg::SwBackgroundDlg(Window* pParent, const SfxItemSet& rSet) :
{
SetText(SW_RESSTR(STR_FRMUI_PATTERN));
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND );
if ( fnCreatePage )
{
@@ -73,3 +74,4 @@ SwBackgroundDlg::~SwBackgroundDlg()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx
index 8a7ddfd6b5f9..5b1e402f94cb 100644
--- a/sw/source/ui/frmdlg/uiborder.cxx
+++ b/sw/source/ui/frmdlg/uiborder.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,7 +57,7 @@ SwBorderDlg::SwBorderDlg(Window* pParent, SfxItemSet& rSet, sal_uInt16 nType) :
// TabPage erzeugen
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER );
if ( fnCreatePage )
{
@@ -77,3 +78,4 @@ SwBorderDlg::~SwBorderDlg()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index fc988a3ab0e6..6a7a4d194ae9 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,7 @@
#include <editeng/opaqitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/lrspitem.hxx>
-// OD 18.09.2003 #i18732#
+// #i18732#
#include <fmtfollowtextflow.hxx>
#include <svx/swframevalidation.hxx>
@@ -60,25 +61,13 @@
using namespace ::com::sun::star;
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-static sal_uInt16 __FAR_DATA aWrapPageRg[] = {
+static sal_uInt16 aWrapPageRg[] = {
RES_LR_SPACE, RES_UL_SPACE,
RES_PROTECT, RES_SURROUND,
RES_PRINT, RES_PRINT,
0
};
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode) :
SfxSingleTabDialog(pParent, rSet, 0),
pWrtShell(pSh)
@@ -94,18 +83,10 @@ SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Boo
SetText(sTitle);
}
-
-
SwWrapDlg::~SwWrapDlg()
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet) :
SfxTabPage(pParent, SW_RES(TP_FRM_WRAP), rSet),
@@ -135,7 +116,6 @@ SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet) :
aWrapOutsideCB (this, SW_RES(CB_ONLYOUTSIDE)),
aWrapIL (SW_RES(IL_WRAP)),
- aWrapILH (SW_RES(ILH_WRAP)),
nAnchorId(FLY_AT_PARA),
nHtmlMode(0),
@@ -187,23 +167,14 @@ SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet) :
aWrapOutlineCB.SetClickHdl(LINK(this, SwWrapTabPage, ContourHdl));
}
-
-
SwWrapTabPage::~SwWrapTabPage()
{
}
-
-
SfxTabPage* SwWrapTabPage::Create(Window *pParent, const SfxItemSet &rSet)
{
return new SwWrapTabPage(pParent, rSet);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwWrapTabPage::Reset(const SfxItemSet &rSet)
{
@@ -337,9 +308,6 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: Attribute in den Set stopfen bei OK
--------------------------------------------------------------------*/
-
-
-
sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
{
sal_Bool bModified = sal_False;
@@ -445,9 +413,6 @@ sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: Bsp - Update
--------------------------------------------------------------------*/
-
-
-
void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
{
// Anchor
@@ -481,7 +446,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aVal.bAutoHeight = rFrmSize.GetHeightSizeType() == ATT_MIN_SIZE;
aVal.bAutoWidth = rFrmSize.GetWidthSizeType() == ATT_MIN_SIZE;
aVal.bMirror = rHori.IsPosToggle();
- // OD 18.09.2003 #i18732#
+ // #i18732#
aVal.bFollowTextFlow =
static_cast<const SwFmtFollowTextFlow&>(rSet.Get(RES_FOLLOW_TEXT_FLOW)).GetValue();
@@ -642,8 +607,6 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
ContourHdl(0);
}
-
-
int SwWrapTabPage::DeactivatePage(SfxItemSet* _pSet)
{
if(_pSet)
@@ -655,9 +618,6 @@ int SwWrapTabPage::DeactivatePage(SfxItemSet* _pSet)
/*--------------------------------------------------------------------
Beschreibung: Bereichspruefung
--------------------------------------------------------------------*/
-
-
-
IMPL_LINK( SwWrapTabPage, RangeModifyHdl, MetricField *, pEdit )
{
if(bHtmlMode && 0 == (nHtmlMode & HTMLMODE_FULL_ABS_POS))
@@ -686,21 +646,20 @@ IMPL_LINK( SwWrapTabPage, RangeModifyHdl, MetricField *, pEdit )
else if (pEdit == &aBottomMarginED)
pOpposite = &aTopMarginED;
- sal_Int64 nOpposite = pOpposite->GetValue();
+ OSL_ASSERT(pOpposite);
- if (nValue + nOpposite > Max(pEdit->GetMax(), pOpposite->GetMax()))
- pOpposite->SetValue(pOpposite->GetMax() - nValue);
+ if (pOpposite)
+ {
+ sal_Int64 nOpposite = pOpposite->GetValue();
+
+ if (nValue + nOpposite > Max(pEdit->GetMax(), pOpposite->GetMax()))
+ pOpposite->SetValue(pOpposite->GetMax() - nValue);
+ }
}
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn )
{
sal_Bool bWrapThrough = (pBtn == &aWrapThroughRB);
@@ -716,12 +675,6 @@ IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
IMPL_LINK( SwWrapTabPage, ContourHdl, CheckBox *, EMPTYARG )
{
sal_Bool bEnable = !(aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled());
@@ -738,16 +691,11 @@ IMPL_LINK( SwWrapTabPage, ContourHdl, CheckBox *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
sal_uInt16* SwWrapTabPage::GetRanges()
{
return aWrapPageRg;
}
-/* -----------------------------08.05.2002 14:28------------------------------
- ---------------------------------------------------------------------------*/
void SwWrapTabPage::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
@@ -756,30 +704,29 @@ void SwWrapTabPage::DataChanged( const DataChangedEvent& rDCEvt )
SfxTabPage::DataChanged( rDCEvt );
}
-/* -----------------------------08.05.2002 14:28------------------------------
- ---------------------------------------------------------------------------*/
void SwWrapTabPage::ApplyImageList()
{
- ImageList& rImgLst = GetSettings().GetStyleSettings().GetHighContrastMode() ?
- aWrapILH : aWrapIL;
+ ImageList& rImgLst = aWrapIL;
aWrapThroughRB.SetModeRadioImage(rImgLst.GetImage(IMG_THROUGH));
sal_Bool bWrapOutline = !aWrapOutlineCB.IsChecked();
if(bWrapOutline)
{
- aNoWrapRB.SetModeRadioImage(rImgLst.GetImage(IMG_NONE));
- aWrapLeftRB.SetModeRadioImage(rImgLst.GetImage(IMG_LEFT));
- aWrapRightRB.SetModeRadioImage(rImgLst.GetImage(IMG_RIGHT));
- aWrapParallelRB.SetModeRadioImage(rImgLst.GetImage(IMG_PARALLEL));
- aIdealWrapRB.SetModeRadioImage(rImgLst.GetImage(IMG_IDEAL));
+ aNoWrapRB.SetModeRadioImage( rImgLst.GetImage( IMG_NONE ));
+ aWrapLeftRB.SetModeRadioImage( rImgLst.GetImage( IMG_LEFT ));
+ aWrapRightRB.SetModeRadioImage( rImgLst.GetImage( IMG_RIGHT ));
+ aWrapParallelRB.SetModeRadioImage( rImgLst.GetImage( IMG_PARALLEL ));
+ aIdealWrapRB.SetModeRadioImage( rImgLst.GetImage( IMG_IDEAL ));
}
else
{
- aNoWrapRB.SetModeRadioImage(rImgLst.GetImage( IMG_KON_NONE ));
- aWrapLeftRB.SetModeRadioImage(rImgLst.GetImage( IMG_KON_LEFT ));
- aWrapRightRB.SetModeRadioImage(rImgLst.GetImage( IMG_KON_RIGHT ));
- aWrapParallelRB.SetModeRadioImage(rImgLst.GetImage(IMG_KON_PARALLEL ));
- aIdealWrapRB.SetModeRadioImage(rImgLst.GetImage( IMG_KON_IDEAL ));
+ aNoWrapRB.SetModeRadioImage( rImgLst.GetImage( IMG_KON_NONE ));
+ aWrapLeftRB.SetModeRadioImage( rImgLst.GetImage( IMG_KON_LEFT ));
+ aWrapRightRB.SetModeRadioImage( rImgLst.GetImage( IMG_KON_RIGHT ));
+ aWrapParallelRB.SetModeRadioImage( rImgLst.GetImage( IMG_KON_PARALLEL ));
+ aIdealWrapRB.SetModeRadioImage( rImgLst.GetImage( IMG_KON_IDEAL ));
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/frmdlg/wrap.hrc b/sw/source/ui/frmdlg/wrap.hrc
index be19dbe702c2..5874b161e012 100644
--- a/sw/source/ui/frmdlg/wrap.hrc
+++ b/sw/source/ui/frmdlg/wrap.hrc
@@ -24,13 +24,13 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#define RB_NO_WRAP 2
-#define RB_WRAP_LEFT 3
-#define RB_WRAP_RIGHT 4
-#define RB_WRAP_PARALLEL 5
-#define RB_WRAP_THROUGH 6
-#define RB_WRAP_IDEAL 7
-#define CB_ANCHOR_ONLY 8
+#define RB_NO_WRAP 2
+#define RB_WRAP_LEFT 3
+#define RB_WRAP_RIGHT 4
+#define RB_WRAP_PARALLEL 5
+#define RB_WRAP_THROUGH 6
+#define RB_WRAP_IDEAL 7
+#define CB_ANCHOR_ONLY 8
#define FT_LEFT_MARGIN 13
#define ED_LEFT_MARGIN 14
#define FT_RIGHT_MARGIN 15
@@ -39,28 +39,25 @@
#define ED_TOP_MARGIN 18
#define ED_BOTTOM_MARGIN 19
#define FT_BOTTOM_MARGIN 20
-#define FL_MARGIN 21
+#define FL_MARGIN 21
#define CB_TRANSPARENT 22
#define CB_OUTLINE 23
-#define FL_OPTION 24
+#define FL_OPTION 24
#define CB_ONLYOUTSIDE 25
-#define FL_OPTION_SEP 26
-#define C_WRAP_FL 31
+#define FL_OPTION_SEP 26
+#define C_WRAP_FL 31
#define IL_WRAP 32
-#define ILH_WRAP 33
// nur fuer die ImageList
-#define IMG_BEGIN 1
-#define IMG_NONE (IMG_BEGIN)
-#define IMG_LEFT (IMG_BEGIN + 1)
-#define IMG_RIGHT (IMG_BEGIN + 2)
-#define IMG_PARALLEL (IMG_BEGIN + 3)
-#define IMG_THROUGH (IMG_BEGIN + 4)
-#define IMG_IDEAL (IMG_BEGIN + 5)
-#define IMG_KON_NONE (IMG_BEGIN + 6)
-#define IMG_KON_LEFT (IMG_BEGIN + 7)
-#define IMG_KON_RIGHT (IMG_BEGIN + 8)
-#define IMG_KON_PARALLEL (IMG_BEGIN + 9)
-#define IMG_KON_IDEAL (IMG_BEGIN + 10)
-
-
+#define IMG_BEGIN 1
+#define IMG_NONE (IMG_BEGIN)
+#define IMG_LEFT (IMG_BEGIN + 1)
+#define IMG_RIGHT (IMG_BEGIN + 2)
+#define IMG_PARALLEL (IMG_BEGIN + 3)
+#define IMG_THROUGH (IMG_BEGIN + 4)
+#define IMG_IDEAL (IMG_BEGIN + 5)
+#define IMG_KON_NONE (IMG_BEGIN + 6)
+#define IMG_KON_LEFT (IMG_BEGIN + 7)
+#define IMG_KON_RIGHT (IMG_BEGIN + 8)
+#define IMG_KON_PARALLEL (IMG_BEGIN + 9)
+#define IMG_KON_IDEAL (IMG_BEGIN + 10)
diff --git a/sw/source/ui/frmdlg/wrap.src b/sw/source/ui/frmdlg/wrap.src
index a3f23e79624b..5b4bbd19a48d 100644
--- a/sw/source/ui/frmdlg/wrap.src
+++ b/sw/source/ui/frmdlg/wrap.src
@@ -260,12 +260,4 @@ TabPage TP_FRM_WRAP
MaskColor = IMAGE_MASK_COLOR ;
WRAP_IDLIST
};
- ImageList ILH_WRAP
- {
- Prefix = "wrh";
- MaskColor = IMAGE_MASK_COLOR ;
- WRAP_IDLIST
- };
-
};
-
diff --git a/sw/source/ui/globdoc/globdoc.cxx b/sw/source/ui/globdoc/globdoc.cxx
index a4572f0a16da..1b92ec6d794a 100644
--- a/sw/source/ui/globdoc/globdoc.cxx
+++ b/sw/source/ui/globdoc/globdoc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,13 +43,11 @@
#include "cfgid.h"
-/*--------------------------------------------------------------------
- Beschreibung: Alle Filter registrieren
- --------------------------------------------------------------------*/
+
+// Description: Register all filters
TYPEINIT1(SwGlobalDocShell, SwDocShell);
-//-------------------------------------------------------------------------
SFX_IMPL_OBJECTFACTORY( SwGlobalDocShell, SvGlobalName(SO3_SWGLOB_CLASSID), SFXOBJECTSHELL_STD_NORMAL|SFXOBJECTSHELL_HASMENU, "swriter/GlobalDocument" )
SwGlobalDocShell::SwGlobalDocShell(SfxObjectCreateMode eMode ) :
@@ -69,7 +68,7 @@ void SwGlobalDocShell::FillClass( SvGlobalName * pClassName,
sal_Bool bTemplate /* = sal_False */) const
{
(void)bTemplate;
- DBG_ASSERT( bTemplate == sal_False, "No template for Writer Global" );
+ OSL_ENSURE( bTemplate == sal_False, "No template for Writer Global" );
if (nVersion == SOFFICE_FILEFORMAT_60)
{
@@ -89,3 +88,4 @@ void SwGlobalDocShell::FillClass( SvGlobalName * pClassName,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/DropDownFieldDialog.hxx b/sw/source/ui/inc/DropDownFieldDialog.hxx
index 9800783c2e48..cabf71ac46c1 100644
--- a/sw/source/ui/inc/DropDownFieldDialog.hxx
+++ b/sw/source/ui/inc/DropDownFieldDialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <svx/stddlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
class SwDropDownField;
class SwField;
@@ -67,5 +66,6 @@ public:
};
} //namespace sw
-
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/SidebarWindowsConsts.hxx b/sw/source/ui/inc/SidebarWindowsConsts.hxx
index 378b2be0790a..5df62bdee181 100644
--- a/sw/source/ui/inc/SidebarWindowsConsts.hxx
+++ b/sw/source/ui/inc/SidebarWindowsConsts.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,10 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- *
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,3 +36,5 @@ const sal_Int8 ANCHORLINE_WIDTH = 1;
} } // end of namespace sw::sidebarwindows
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
index b45dd1a6cd2d..0d3cf88faac2 100644
--- a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
+++ b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#define SW_SPELL_DIALOG_CHILD_WINDOW_HXX
#include <svx/SpellDialogChildWindow.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
class SwWrtShell;
struct SpellState;
@@ -74,3 +73,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/SwXFilterOptions.hxx b/sw/source/ui/inc/SwXFilterOptions.hxx
index c1dcc3676447..e5d6030be989 100644
--- a/sw/source/ui/inc/SwXFilterOptions.hxx
+++ b/sw/source/ui/inc/SwXFilterOptions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,10 +39,6 @@ namespace com { namespace sun { namespace star { namespace io {
class XInputStream;
} } } }
-
-/* -----------------------------2002/06/21 12:07------------------------------
-
- ---------------------------------------------------------------------------*/
class SwXFilterOptions : public ::cppu::WeakImplHelper5<
::com::sun::star::beans::XPropertyAccess,
::com::sun::star::ui::dialogs::XExecutableDialog,
@@ -111,3 +108,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/abstract.hxx b/sw/source/ui/inc/abstract.hxx
index 4dd8f3a56b65..755d30b61503 100644
--- a/sw/source/ui/inc/abstract.hxx
+++ b/sw/source/ui/inc/abstract.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,22 +30,12 @@
#include <sfx2/basedlgs.hxx>
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-
-
-/*-----------------22.02.97 15.06-------------------
---------------------------------------------------*/
class SwInsertAbstractDlg : public SfxModalDialog
{
FixedLine aFL;
@@ -71,3 +62,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/actctrl.hxx b/sw/source/ui/inc/actctrl.hxx
index d1e9a3d82907..7d9e618ef3ee 100644
--- a/sw/source/ui/inc/actctrl.hxx
+++ b/sw/source/ui/inc/actctrl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,12 @@
#ifndef _ACTCTRL_HXX
#define _ACTCTRL_HXX
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
#include "swdllapi.h"
/*--------------------------------------------------------------------
Beschreibung: numerische Eingabe
--------------------------------------------------------------------*/
-
class SW_DLLPUBLIC NumEditAction: public NumericField
{
Link aActionLink;
@@ -52,7 +50,7 @@ public:
};
-/* -----------------21.04.98 08:11-------------------
+/* --------------------------------------------------
* Edit, dass keine Spaces akzeptiert
* --------------------------------------------------*/
class SW_DLLPUBLIC NoSpaceEdit : public Edit
@@ -69,7 +67,7 @@ public:
const String& GetForbiddenChars(){return sForbiddenChars;}
};
-/* -----------------21.04.98 08:33-------------------
+/* --------------------------------------------------
* Kein Space und kein Punkt
* --------------------------------------------------*/
class TableNameEdit : public NoSpaceEdit
@@ -79,7 +77,8 @@ public:
NoSpaceEdit(pWin, rResId)
{SetForbiddenChars(String::CreateFromAscii(" .<>"));}
};
-/* -----------------25.06.2003 15:55-----------------
+
+/* --------------------------------------------------
call a link when KEY_RETURN is pressed
--------------------------------------------------*/
class SW_DLLPUBLIC ReturnActionEdit : public Edit
@@ -96,3 +95,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/addrdlg.hxx b/sw/source/ui/inc/addrdlg.hxx
index 9e8370d1e2fc..de798ad12f5d 100644
--- a/sw/source/ui/inc/addrdlg.hxx
+++ b/sw/source/ui/inc/addrdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/annotsh.hxx b/sw/source/ui/inc/annotsh.hxx
index ee8d8e9ccf17..12de8a18618b 100755..100644
--- a/sw/source/ui/inc/annotsh.hxx
+++ b/sw/source/ui/inc/annotsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/app.hrc b/sw/source/ui/inc/app.hrc
index edf7014a4e4f..15b569ebcd23 100644
--- a/sw/source/ui/inc/app.hrc
+++ b/sw/source/ui/inc/app.hrc
@@ -30,138 +30,90 @@
#include "rcid.hrc"
-// Default Bitmap fuer ToolBox
-#define BMP_FEHLT (RC_APP_BEGIN + 1)
-
// Document-Icon
-#define RC_DOC_ICON (RC_APP_BEGIN + 2)
+#define RC_DOC_ICON (RC_APP_BEGIN + 2)
//Soll das Clipboard fuer andere Applikationen...
-#define MSG_CLPBRD_CLEAR (RC_APP_BEGIN + 3)
+#define MSG_CLPBRD_CLEAR (RC_APP_BEGIN + 3)
-#define STR_CANTCREATE (RC_APP_BEGIN + 4)
-#define STR_CANTOPEN (RC_APP_BEGIN + 5)
+#define STR_CANTCREATE (RC_APP_BEGIN + 4)
+#define STR_CANTOPEN (RC_APP_BEGIN + 5)
// Messages
-#define MSG_ERROR_SEND_MAIL ( RC_APP_BEGIN + 6)
-#define MSG_SAVE_HTML_QUERY ( RC_APP_BEGIN + 7)
+#define MSG_ERROR_SEND_MAIL ( RC_APP_BEGIN + 6)
+#define MSG_SAVE_HTML_QUERY ( RC_APP_BEGIN + 7)
//Fuer das Interface, weil der RID_APP_BEGIN jetzt Desktop ist.
-#define RID_SW_NAME ( RC_APP_BEGIN + 8)
-#define MSG_SAVEAS_HTML_QUERY ( RC_APP_BEGIN + 9)
+#define RID_SW_NAME ( RC_APP_BEGIN + 8)
+#define MSG_SAVEAS_HTML_QUERY ( RC_APP_BEGIN + 9)
-#define STR_UNBENANNT (RC_APP_BEGIN + 13)
-#define STR_VERSION (RC_APP_BEGIN + 14)
-#define STR_PRINT_MERGE_MACRO (RC_APP_BEGIN + 15)
-#define STR_PAGE_COUNT_MACRO (RC_APP_BEGIN + 16)
+#define STR_UNBENANNT (RC_APP_BEGIN + 13)
+#define STR_VERSION (RC_APP_BEGIN + 14)
+#define STR_PRINT_MERGE_MACRO (RC_APP_BEGIN + 15)
+#define STR_PAGE_COUNT_MACRO (RC_APP_BEGIN + 16)
// Bitmap fuer die NumerierungsVorlagen im Organizer
-#define BMP_STYLES_FAMILY_NUM (RC_APP_BEGIN + 17)
-#define BMP_STYLES_FAMILY_NUM_HC (RC_APP_BEGIN + 18)
+#define BMP_STYLES_FAMILY_NUM (RC_APP_BEGIN + 17)
// Strings fuer Bereiche in der Konfiguration
-#define STR_GRP_FILE (RC_APP_BEGIN + 56)
-#define STR_GRP_EDIT (RC_APP_BEGIN + 57)
-#define STR_GRP_TRAVELLING (RC_APP_BEGIN + 58)
-#define STR_GRP_VIEW (RC_APP_BEGIN + 59)
-#define STR_GRP_INSERT (RC_APP_BEGIN + 60)
-#define STR_GRP_FORMAT (RC_APP_BEGIN + 61)
-#define STR_GRP_STYLE (RC_APP_BEGIN + 62)
-#define STR_GRP_TEXT (RC_APP_BEGIN + 63)
-#define STR_GRP_FRAME (RC_APP_BEGIN + 64)
-#define STR_GRP_GRAPHIC (RC_APP_BEGIN + 65)
-#define STR_GRP_TABLE (RC_APP_BEGIN + 66)
-#define STR_GRP_TOOLS (RC_APP_BEGIN + 67)
-#define STR_GRP_NUMBERING (RC_APP_BEGIN + 68)
-#define STR_GRP_WINDOW (RC_APP_BEGIN + 69)
-#define STR_GRP_MISC (RC_APP_BEGIN + 70)
-#define STR_GRP_MACRO (RC_APP_BEGIN + 71)
-#define RES_EXT_HELP_STRING (RC_APP_BEGIN + 72)
-#define RES_STD_HELP_STRING (RC_APP_BEGIN + 73)
-#define STR_PAGEOFFSET (RC_APP_BEGIN + 74)
-#define STR_PAGEBREAK (RC_APP_BEGIN + 75)
-#define STR_REDLINE_UNKNOWN_AUTHOR (RC_APP_BEGIN + 76)
-#define STR_WESTERN_FONT (RC_APP_BEGIN + 77)
-#define STR_CJK_FONT (RC_APP_BEGIN + 78)
-//#define MSG_INS_MERGE_FIELDS (RC_APP_BEGIN + 79)
-#define MSG_PRINT_AS_MERGE (RC_APP_BEGIN + 80)
-#define MSG_DATA_SOURCES_UNAVAILABLE (RC_APP_BEGIN + 82)
-#define DLG_MERGE_SOURCE_UNAVAILABLE (RC_APP_BEGIN + 83)
-#define ST_MERGE_SOURCE_UNAVAILABLE 1
-#define PB_MERGE_OK 2
-#define PB_MERGE_CANCEL 3
-#define IMG_MERGE 4
-#define SID_TOGGLETOOLBOX (RC_APP_BEGIN + 89)
-
-#define STR_ENV_TITLE (RC_APP_BEGIN + 91)
-#define STR_LAB_TITLE (RC_APP_BEGIN + 92)
-
-#define STR_HUMAN_SWDOC_NAME (RC_APP_BEGIN + 93)
-
-#define RID_SW_ERRHDL (RC_APP_BEGIN + 95)
-
-#define STR_FDLG_TEMPLATE_BUTTON (RC_APP_BEGIN + 1)
-#define STR_FDLG_TEMPLATE_NAME (RC_APP_BEGIN + 2)
+#define STR_GRP_FILE (RC_APP_BEGIN + 56)
+#define STR_GRP_EDIT (RC_APP_BEGIN + 57)
+#define STR_GRP_TRAVELLING (RC_APP_BEGIN + 58)
+#define STR_GRP_VIEW (RC_APP_BEGIN + 59)
+#define STR_GRP_INSERT (RC_APP_BEGIN + 60)
+#define STR_GRP_FORMAT (RC_APP_BEGIN + 61)
+#define STR_GRP_STYLE (RC_APP_BEGIN + 62)
+#define STR_GRP_TEXT (RC_APP_BEGIN + 63)
+#define STR_GRP_FRAME (RC_APP_BEGIN + 64)
+#define STR_GRP_GRAPHIC (RC_APP_BEGIN + 65)
+#define STR_GRP_TABLE (RC_APP_BEGIN + 66)
+#define STR_GRP_TOOLS (RC_APP_BEGIN + 67)
+#define STR_GRP_NUMBERING (RC_APP_BEGIN + 68)
+#define STR_GRP_WINDOW (RC_APP_BEGIN + 69)
+#define STR_GRP_MISC (RC_APP_BEGIN + 70)
+#define STR_GRP_MACRO (RC_APP_BEGIN + 71)
+#define RES_EXT_HELP_STRING (RC_APP_BEGIN + 72)
+#define RES_STD_HELP_STRING (RC_APP_BEGIN + 73)
+#define STR_PAGEOFFSET (RC_APP_BEGIN + 74)
+#define STR_PAGEBREAK (RC_APP_BEGIN + 75)
+#define STR_REDLINE_UNKNOWN_AUTHOR (RC_APP_BEGIN + 76)
+#define STR_WESTERN_FONT (RC_APP_BEGIN + 77)
+#define STR_CJK_FONT (RC_APP_BEGIN + 78)
+#define MSG_PRINT_AS_MERGE (RC_APP_BEGIN + 80)
+#define MSG_DATA_SOURCES_UNAVAILABLE (RC_APP_BEGIN + 82)
+#define DLG_MERGE_SOURCE_UNAVAILABLE (RC_APP_BEGIN + 83)
+
+#define ST_MERGE_SOURCE_UNAVAILABLE 1
+#define PB_MERGE_OK 2
+#define PB_MERGE_CANCEL 3
+#define IMG_MERGE 4
+
+#define SID_TOGGLETOOLBOX (RC_APP_BEGIN + 89)
+
+#define STR_ENV_TITLE (RC_APP_BEGIN + 91)
+#define STR_LAB_TITLE (RC_APP_BEGIN + 92)
+
+#define STR_HUMAN_SWDOC_NAME (RC_APP_BEGIN + 93)
+
+#define RID_SW_ERRHDL (RC_APP_BEGIN + 95)
+
+#define STR_FDLG_TEMPLATE_BUTTON (RC_APP_BEGIN + 1)
+#define STR_FDLG_TEMPLATE_NAME (RC_APP_BEGIN + 2)
// Ids fuer die einzelnen PopUpMenues
-//#define MN_WIZARD (RC_APP_BEGIN + 9)
-//#define MN_INDEX (RC_APP_BEGIN + 10)
-//#define MN_FILE (RC_APP_BEGIN + 11)
-//#define MN_EDIT (RC_APP_BEGIN + 12)
-//#define MN_VIEW (RC_APP_BEGIN + 13)
-//#define MN_INS (RC_APP_BEGIN + 14)
-//#define MN_TEXT (RC_APP_BEGIN + 15)
-//#define MN_FORMAT (RC_APP_BEGIN + 16)
-#define MN_FORMAT_STYLE (RC_APP_BEGIN + 17)
-#define MN_FORMAT_ALGN (RC_APP_BEGIN + 18)
-#define MN_FORMAT_LINESPACE (RC_APP_BEGIN + 19)
-//#define MN_EXTRA (RC_APP_BEGIN + 20)
-//#define MN_WIN (RC_APP_BEGIN + 21)
-//#define MN_HELP (RC_APP_BEGIN + 22)
-#define MN_FORMAT_FRM_HORZ (RC_APP_BEGIN + 23)
-//#define MN_FORMAT_FRM_VERT (RC_APP_BEGIN + 24)
-//#define MN_PICKLIST (RC_APP_BEGIN + 25)
-//#define MN_WINLIST (RC_APP_BEGIN + 26)
-//#define MN_MACRO (RC_APP_BEGIN + 27)
-//#define MN_FORMAT_HIERARCHY (RC_APP_BEGIN + 28)
-#define MN_CELL (RC_APP_BEGIN + 29)
-//#define MN_HELP_TIP (RC_APP_BEGIN + 30)
-//#define MN_HELP_SEARCH (RC_APP_BEGIN + 31)
-//#define MN_HELP_ACTIVE (RC_APP_BEGIN + 32)
-//#define MN_HELP_INDEX (RC_APP_BEGIN + 33)
-//#define MN_OBJECT (RC_APP_BEGIN + 34)
-//#define MN_DATABASE (RC_APP_BEGIN + 35)
-//#define MN_DIRSUBMENU (RC_APP_BEGIN + 36)
-//#define MN_MAIL (RC_APP_BEGIN + 37)
-#define MN_WRAP (RC_APP_BEGIN + 38)
-#define MN_SUB_TBLROW (RC_APP_BEGIN + 39)
-#define MN_SUB_TBLCOL (RC_APP_BEGIN + 40)
-//#define MN_SUB_AUTOFORMAT (RC_APP_BEGIN + 41)
-//#define MN_SUB_TOOLBAR (RC_APP_BEGIN + 42)
-//#define MN_SUB_FIELD (RC_APP_BEGIN + 43)
-//#define MN_SUB_GRAPHIC (RC_APP_BEGIN + 44)
-//#define MN_SUB_TEMPLATES (RC_APP_BEGIN + 45)
-#define MN_SUB_ARRANGE (RC_APP_BEGIN + 46)
-
-//#define MN_SUB_UPDATE (RC_APP_BEGIN + 48)
-//#define MN_SUB_MIRROR (RC_APP_BEGIN + 49)
-#define MN_SUB_ALIGN (RC_APP_BEGIN + 50)
-//#define MN_SUB_OPTIONS (RC_APP_BEGIN + 51)
-//#define MN_SUB_SENDTO (RC_APP_BEGIN + 52)
-//#define MN_SUB_REVISE (RC_APP_BEGIN + 53)
-//#define MN_TEMPLATES (RC_APP_BEGIN + 54)
-//#define MN_FILE_PORT (RC_APP_BEGIN + 55)
-//#define MN_EDIT_PORT (RC_APP_BEGIN + 56)
-//#define MN_VIEW_PORT (RC_APP_BEGIN + 57)
-//#define MN_INS_PORT (RC_APP_BEGIN + 58)
-//#define MN_FORMAT_PORT (RC_APP_BEGIN + 59)
-//#define MN_EXTRA_PORT (RC_APP_BEGIN + 60)
-//#define MN_WIN_PORT (RC_APP_BEGIN + 61)
-//#define MN_HELP_PORT (RC_APP_BEGIN + 62)
-//#define MN_SUB_TRANSLITERATE (RC_APP_BEGIN + 63)
-//#define MN_SUB_MACRO (RC_APP_BEGIN + 64)
+#define MN_FORMAT_STYLE (RC_APP_BEGIN + 17)
+#define MN_FORMAT_ALGN (RC_APP_BEGIN + 18)
+#define MN_FORMAT_LINESPACE (RC_APP_BEGIN + 19)
+#define MN_FORMAT_FRM_HORZ (RC_APP_BEGIN + 23)
+#define MN_CELL (RC_APP_BEGIN + 29)
+#define MN_WRAP (RC_APP_BEGIN + 38)
+#define MN_SUB_TBLROW (RC_APP_BEGIN + 39)
+#define MN_SUB_TBLCOL (RC_APP_BEGIN + 40)
+#define MN_SUB_ARRANGE (RC_APP_BEGIN + 46)
+
+#define MN_SUB_ALIGN (RC_APP_BEGIN + 50)
#define STR_WRITER_DOCUMENT_FULLTYPE (RC_APP_BEGIN + 100)
#define STR_ABSTRACT_TITLE (RC_APP_BEGIN + 102)
@@ -170,8 +122,8 @@
#define STR_OUTLINE_NUMBERING (RC_APP_BEGIN + 104)
// <--
//#outline level,zhaojianwei
-#define STR_FDLG_OUTLINE_LEVEL (RC_APP_BEGIN + 105)
-#define STR_FDLG_STYLE (RC_APP_BEGIN + 106)
+#define STR_FDLG_OUTLINE_LEVEL (RC_APP_BEGIN + 105)
+#define STR_FDLG_STYLE (RC_APP_BEGIN + 106)
//<-end,zhaojianwei
#define APP_ACT_END STR_FDLG_STYLE
diff --git a/sw/source/ui/inc/ascfldlg.hxx b/sw/source/ui/inc/ascfldlg.hxx
index 9fc1b98d044a..763eaba3e55c 100644
--- a/sw/source/ui/inc/ascfldlg.hxx
+++ b/sw/source/ui/inc/ascfldlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#define _ASCFLDLG_HXX
#include <vcl/fixed.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <vcl/lstbox.hxx>
#include <sfx2/basedlgs.hxx>
#include <svx/txencbox.hxx>
@@ -76,3 +75,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/autoedit.hxx b/sw/source/ui/inc/autoedit.hxx
index 535bc04bf9ca..7c3a9f197362 100644
--- a/sw/source/ui/inc/autoedit.hxx
+++ b/sw/source/ui/inc/autoedit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef _AUTOEDIT_HXX
#define _AUTOEDIT_HXX
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
class AutoEdit : public Edit
@@ -48,3 +47,4 @@ protected:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/barcfg.hxx b/sw/source/ui/inc/barcfg.hxx
index 6b88039eddbe..cb5f06a76b47 100644
--- a/sw/source/ui/inc/barcfg.hxx
+++ b/sw/source/ui/inc/barcfg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,3 +46,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/basesh.hxx b/sw/source/ui/inc/basesh.hxx
index 03e183b81116..a3a97af2916d 100644
--- a/sw/source/ui/inc/basesh.hxx
+++ b/sw/source/ui/inc/basesh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -125,3 +126,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/beziersh.hxx b/sw/source/ui/inc/beziersh.hxx
index c9c88adb441e..1fa2750c0433 100644
--- a/sw/source/ui/inc/beziersh.hxx
+++ b/sw/source/ui/inc/beziersh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/bmpwin.hxx b/sw/source/ui/inc/bmpwin.hxx
index aa7c6287de8d..180e033f1b44 100644
--- a/sw/source/ui/inc/bmpwin.hxx
+++ b/sw/source/ui/inc/bmpwin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,24 +29,18 @@
#ifndef _BMPWIN_HXX
#define _BMPWIN_HXX
-#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
-#endif
-#ifndef _BITMAPEX_HXX
#include <vcl/bitmapex.hxx>
-#endif
#include <vcl/window.hxx>
/*--------------------------------------------------------------------
Beschreibung: Extended Page fuer Grafiken
--------------------------------------------------------------------*/
-
class BmpWindow : public Window
{
private:
Graphic aGraphic;
BitmapEx aBmp;
- BitmapEx aBmpHC;
sal_Bool bHorz : 1;
sal_Bool bVert : 1;
@@ -56,7 +51,7 @@ private:
public:
BmpWindow(Window* pPar, sal_uInt16 nId,
- const Graphic& rGraphic, const BitmapEx& rBmp, const BitmapEx& rBmpHC);
+ const Graphic& rGraphic, const BitmapEx& rBmp);
BmpWindow(Window* pParent, const ResId rResId) :
Window(pParent, rResId),
bHorz(sal_False), bVert(sal_False),bGraphic(sal_False), bLeftAlign(sal_True) {}
@@ -67,3 +62,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/bookctrl.hxx b/sw/source/ui/inc/bookctrl.hxx
index 8955276579fb..0f9e96f50d73 100644
--- a/sw/source/ui/inc/bookctrl.hxx
+++ b/sw/source/ui/inc/bookctrl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/bookmark.hxx b/sw/source/ui/inc/bookmark.hxx
index 3b53b3f1bd77..effdba914367 100644
--- a/sw/source/ui/inc/bookmark.hxx
+++ b/sw/source/ui/inc/bookmark.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,19 +31,13 @@
#include <svx/stddlg.hxx>
#include <vcl/fixed.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include "swlbox.hxx" // SwComboBox
class SwWrtShell;
class SfxRequest;
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
class BookmarkCombo : public SwComboBox
{
sal_uInt16 GetFirstSelEntryPos() const;
@@ -59,10 +54,6 @@ public:
static const String aForbiddenChars;
};
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
class SwInsertBookmarkDlg: public SvxStandardDialog
{
FixedLine aBookmarkFl;
@@ -86,3 +77,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/break.hxx b/sw/source/ui/inc/break.hxx
index 8c6c53744ad4..9ff55fde5d2b 100644
--- a/sw/source/ui/inc/break.hxx
+++ b/sw/source/ui/inc/break.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,21 +30,13 @@
#include <svx/stddlg.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
class SwWrtShell;
@@ -90,3 +83,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/caption.hxx b/sw/source/ui/inc/caption.hxx
index 17cb80f3b518..cf1260094ee2 100644
--- a/sw/source/ui/inc/caption.hxx
+++ b/sw/source/ui/inc/caption.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,17 +29,10 @@
#define _CAPTION_HXX
#include <tools/string.hxx>
-//#ifndef _STREAM_HXX //autogen
-//#include <tools/stream.hxx>
-//#endif
#include <tools/globname.hxx>
#include <SwCapObjType.hxx>
#include "swdllapi.h"
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
class SW_DLLPUBLIC InsCaptionOpt
{
private:
@@ -116,3 +110,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/cfgdesc.hxx b/sw/source/ui/inc/cfgdesc.hxx
index 6a45826c9019..8ecc19a00b5c 100644
--- a/sw/source/ui/inc/cfgdesc.hxx
+++ b/sw/source/ui/inc/cfgdesc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,5 +66,6 @@ inline String SwCfgDesc::GetFuncText() const { return aFuncText; }
inline String SwCfgDesc::GetMacro() const { return aFuncText; }
inline String SwCfgDesc::GetLib() const { return aLibName; }
-
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/cfgid.h b/sw/source/ui/inc/cfgid.h
index 71f061e7b094..d4602a2e89e5 100644
--- a/sw/source/ui/inc/cfgid.h
+++ b/sw/source/ui/inc/cfgid.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,3 +39,5 @@
#define CFG_SWGLOBAL_MENU (SFX_ITEMTYPE_SW_BEGIN +29)
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/cfgitems.hxx b/sw/source/ui/inc/cfgitems.hxx
index 2b98f70cbdca..d0d1103459c8 100644
--- a/sw/source/ui/inc/cfgitems.hxx
+++ b/sw/source/ui/inc/cfgitems.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,7 @@
class SwWriterApp;
class SwModule;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
class SwTestTabPage;
#endif
class SwAddPrinterTabPage;
@@ -50,7 +51,6 @@ class SwDocEditDialog;
SfxPrinter* GetPrt( ViewShell* );
void SetPrt( SfxPrinter* );
-
/*--------OS 12.01.95 -----------------------------------
Item fuer Einstellungsdialog - Dokumentanzeige
--------------------------------------------------------- */
@@ -87,6 +87,7 @@ public:
void operator=( const SwDocDisplayItem& );
void FillViewOptions( SwViewOption& rVOpt) const;
};
+
/*--------OS 12.01.95 -----------------------------------
Item fuer Einstellungsdialog, Elementeseite
--------------------------------------------------------- */
@@ -127,10 +128,10 @@ public:
void FillViewOptions( SwViewOption& rVOpt) const;
};
+
/*--------OS 12.01.95 -----------------------------------
Item fuer Einstellungsdialog - Drucker/Zusaetze
--------------------------------------------------------- */
-
class SW_DLLPUBLIC SwAddPrinterItem : public SfxPoolItem, public SwPrintData
{
friend class SwAddPrinterTabPage;
@@ -175,11 +176,9 @@ public:
};
-
/*--------OS 12.01.95 -----------------------------------
Item fuer Einstellungsdialog, ShadowCursorSeite
--------------------------------------------------------- */
-
class SW_DLLPUBLIC SwShadowCursorItem : public SfxPoolItem
{
sal_uInt8 eMode;
@@ -204,7 +203,8 @@ public:
void SetOn( sal_Bool bFlag ) { bOn = bFlag; }
};
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
+
/*--------OS 12.01.95 -----------------------------------
Item fuer Einstellungsdialog - Testeinstellungen
--------------------------------------------------------- */
@@ -239,4 +239,4 @@ public:
#endif
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/changedb.hxx b/sw/source/ui/inc/changedb.hxx
index 210f81907cc5..07c9a8c47d01 100644
--- a/sw/source/ui/inc/changedb.hxx
+++ b/sw/source/ui/inc/changedb.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,20 +29,13 @@
#define _CHANGEDB_HXX
-#ifndef _BITMAP_HXX //autogen
#include <vcl/bitmap.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
#include <svtools/stdctrl.hxx>
#include <svtools/svtreebx.hxx>
#include <svx/stddlg.hxx>
#include "dbtree.hxx"
-#include <vcl/fixed.hxx>
class SwFldMgr;
class SwView;
@@ -51,7 +45,6 @@ struct SwDBData;
/*--------------------------------------------------------------------
Beschreibung: Datenbank an Feldern austauschen
--------------------------------------------------------------------*/
-
class SwChangeDBDlg: public SvxStandardDialog
{
FixedLine aDBListFL;
@@ -66,10 +59,8 @@ class SwChangeDBDlg: public SvxStandardDialog
OKButton aOKBT;
CancelButton aCancelBT;
HelpButton aHelpBT;
-// PushButton aChangeBT;
ImageList aImageList;
- ImageList aImageListHC;
SwWrtShell *pSh;
SwFldMgr *pMgr;
@@ -90,3 +81,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/chartins.hxx b/sw/source/ui/inc/chartins.hxx
index 15050f946227..4b6de648be57 100644
--- a/sw/source/ui/inc/chartins.hxx
+++ b/sw/source/ui/inc/chartins.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,3 +34,4 @@ void SwInsertChart( Window *pParent, SfxBindings *pBindings );
#endif /*_CHARTINS_HXX*/
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/chldwrap.hxx b/sw/source/ui/inc/chldwrap.hxx
index 6a6bfe0f9a97..70b4e4385ab6 100644
--- a/sw/source/ui/inc/chldwrap.hxx
+++ b/sw/source/ui/inc/chldwrap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/chrdlg.hxx b/sw/source/ui/inc/chrdlg.hxx
index 300874ffaeb6..db5bf5bc50cb 100644
--- a/sw/source/ui/inc/chrdlg.hxx
+++ b/sw/source/ui/inc/chrdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,29 +29,17 @@
#define _SWCHARDLG_HXX
#include <sfx2/tabdlg.hxx>
-#ifndef _GROUP_HXX //autogen
#include <vcl/group.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
-#ifndef _COMBOBOX_HXX //autogen
#include <vcl/combobox.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
class SwView;
class SvxMacroItem;
@@ -117,3 +106,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/cnttab.hxx b/sw/source/ui/inc/cnttab.hxx
index d263be129b56..9c1a3fca65cb 100644
--- a/sw/source/ui/inc/cnttab.hxx
+++ b/sw/source/ui/inc/cnttab.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,32 +30,24 @@
#include <svx/stddlg.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
#include <vcl/lstbox.hxx>
#include <sfx2/tabdlg.hxx>
#include "tox.hxx"
-#include <tools/list.hxx>
#include <toxmgr.hxx>
#include <svx/checklbx.hxx>
#include <tools/resary.hxx>
#include <svtools/svtreebx.hxx>
#include <vcl/menubtn.hxx>
#include <svx/langbox.hxx>
+
#define TOX_PAGE_SELECT 1
#define TOX_PAGE_ENTRY 2
#define TOX_PAGE_STYLES 3
@@ -88,3 +81,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/colex.hxx b/sw/source/ui/inc/colex.hxx
index 22cd2b6ff507..f8d194a5fe7e 100644
--- a/sw/source/ui/inc/colex.hxx
+++ b/sw/source/ui/inc/colex.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,9 +37,6 @@
class SwColMgr;
class SfxItemSet;
-/* -----------------------------08.02.2002 11:32------------------------------
-
- ---------------------------------------------------------------------------*/
class SW_DLLPUBLIC SwPageExample : public SvxPageWindow
{
public:
@@ -48,10 +46,9 @@ public:
void UpdateExample( const SfxItemSet& rSet );
};
-/* -----------------------------08.02.2002 11:34------------------------------
- ---------------------------------------------------------------------------*/
class SwTextGridItem;
+
class SW_DLLPUBLIC SwPageGridExample : public SwPageExample
{
SwTextGridItem* pGridItem;
@@ -68,9 +65,6 @@ public:
~SwPageGridExample();
void UpdateExample( const SfxItemSet& rSet );
};
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
class SW_DLLPUBLIC SwColExample : public SwPageExample
{
@@ -94,9 +88,6 @@ public:
}
};
-/*-----------------25.10.96 08.23-------------------
-
---------------------------------------------------*/
class SW_DLLPUBLIC SwColumnOnlyExample : public Window
{
private:
@@ -116,3 +107,5 @@ public:
};
#endif // _COLEX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/colmgr.hxx b/sw/source/ui/inc/colmgr.hxx
index 0d9ebdf5123c..44273b8cc41e 100644
--- a/sw/source/ui/inc/colmgr.hxx
+++ b/sw/source/ui/inc/colmgr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,11 +82,11 @@ private:
};
// INLINE METHODE --------------------------------------------------------
-
inline sal_uInt16 SwColMgr::GetCount() const
{
return aFmtCol.GetNumCols();
}
+
inline void SwColMgr::SetLineWidthAndColor(sal_uLong nLWidth, const Color& rCol)
{
aFmtCol.SetLineWidth(nLWidth);
@@ -95,14 +96,17 @@ inline sal_uLong SwColMgr::GetLineWidth() const
{
return aFmtCol.GetLineWidth();
}
+
inline const Color& SwColMgr::GetLineColor() const
{
return aFmtCol.GetLineColor();
}
+
inline SwColLineAdj SwColMgr::GetAdjust() const
{
return aFmtCol.GetLineAdj();
}
+
inline void SwColMgr::SetAdjust(SwColLineAdj eAdj)
{
aFmtCol.SetLineAdj(eAdj);
@@ -115,6 +119,7 @@ inline void SwColMgr::SetAutoWidth(sal_Bool bOn, sal_uInt16 nGutterWidth)
{
aFmtCol.SetOrtho(bOn, nGutterWidth, nWidth);
}
+
inline void SwColMgr::NoCols()
{
aFmtCol.GetColumns().DeleteAndDestroy(0, aFmtCol.GetColumns().Count());
@@ -123,9 +128,12 @@ inline sal_Bool SwColMgr::HasLine() const
{
return GetAdjust() != COLADJ_NONE;
}
+
inline void SwColMgr::SetNoLine()
{
SetAdjust(COLADJ_NONE);
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx
index 86c10c647836..aceb0ae3ddef 100644
--- a/sw/source/ui/inc/column.hxx
+++ b/sw/source/ui/inc/column.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,28 +30,14 @@
#define _COLUMN_HXX
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
-#ifndef _IMAGE_HXX //autogen
#include <vcl/image.hxx>
-#endif
-#ifndef _GROUP_HXX //autogen
#include <vcl/group.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <vcl/timer.hxx>
-#ifndef _IMAGEBTN_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <svtools/ctrlbox.hxx>
#include <svtools/valueset.hxx>
#include <sfx2/basedlgs.hxx>
@@ -63,9 +50,6 @@ const int nMaxCols = 99;
class SwColMgr;
class SwWrtShell;
class SwColumnPage;
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
class SwColumnDlg : public SfxModalDialog
{
@@ -103,9 +87,6 @@ public:
SwWrtShell& GetWrtShell() { return rWrtShell; }
};
-/*-----------------07.03.97 08.26-------------------
-
---------------------------------------------------*/
class ColumnValueSet : public ValueSet
{
public:
@@ -225,3 +206,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/conarc.hxx b/sw/source/ui/inc/conarc.hxx
index 739a27e309cc..5b8241e31c04 100644
--- a/sw/source/ui/inc/conarc.hxx
+++ b/sw/source/ui/inc/conarc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,4 @@ public:
#endif // _CONARC_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/concustomshape.hxx b/sw/source/ui/inc/concustomshape.hxx
index 20b9cf798f77..2fd1990dd864 100644
--- a/sw/source/ui/inc/concustomshape.hxx
+++ b/sw/source/ui/inc/concustomshape.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,3 +71,4 @@ class ConstCustomShape : public SwDrawBase
#endif // _SW_CONRECT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/condedit.hxx b/sw/source/ui/inc/condedit.hxx
index 1cbd29d52a78..8287d54665c9 100644
--- a/sw/source/ui/inc/condedit.hxx
+++ b/sw/source/ui/inc/condedit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,16 +28,10 @@
#ifndef _CONDEDTI_HXX
#define _CONDEDTI_HXX
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
#include <svtools/transfer.hxx>
#include "swdllapi.h"
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
class SW_DLLPUBLIC ConditionEdit : public Edit, public DropTargetHelper
{
sal_Bool bBrackets, bEnableDrop;
@@ -55,18 +50,4 @@ public:
#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/conform.hxx b/sw/source/ui/inc/conform.hxx
index db62dc3deada..82c7cd6f967a 100644
--- a/sw/source/ui/inc/conform.hxx
+++ b/sw/source/ui/inc/conform.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,3 +46,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/conpoly.hxx b/sw/source/ui/inc/conpoly.hxx
index 3733c7a71b61..09220d15e1c7 100644
--- a/sw/source/ui/inc/conpoly.hxx
+++ b/sw/source/ui/inc/conpoly.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,4 @@ public:
#endif // _CONPOLY_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/conrect.hxx b/sw/source/ui/inc/conrect.hxx
index 0280cf173a00..0ad80cfbc79a 100644
--- a/sw/source/ui/inc/conrect.hxx
+++ b/sw/source/ui/inc/conrect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,3 +59,4 @@ class ConstRectangle : public SwDrawBase
#endif // _SW_CONRECT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/content.hxx b/sw/source/ui/inc/content.hxx
index c7bc20ebb65b..31aeb8fdd6fc 100644
--- a/sw/source/ui/inc/content.hxx
+++ b/sw/source/ui/inc/content.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include <limits.h> // USHRT_MAX
#include "swcont.hxx"
-#ifndef _MENU_HXX //autogen
#include <vcl/menu.hxx>
-#endif
class SwWrtShell;
class SwContentArr;
@@ -223,3 +222,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/conttree.hxx b/sw/source/ui/inc/conttree.hxx
index 10e222b3787b..433a8ebae34d 100644
--- a/sw/source/ui/inc/conttree.hxx
+++ b/sw/source/ui/inc/conttree.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,6 +31,8 @@
#include <svtools/svtreebx.hxx>
#include "swcont.hxx"
+#include <map>
+
class SwWrtShell;
class SwContentType;
class SwNavigationPI;
@@ -74,6 +77,8 @@ class SwContentTree : public SvTreeListBox
SwWrtShell* pActiveShell; // die aktive oder eine konst. offene View
SwNavigationConfig* pConfig;
+ std::map< void*, sal_Bool > mOutLineNodeMap;
+
sal_Int32 nActiveBlock;
sal_uInt16 nHiddenBlock;
sal_uInt16 nRootType;
@@ -103,7 +108,6 @@ class SwContentTree : public SvTreeListBox
using SvListView::Select;
protected:
-// virtual void Command( const CommandEvent& rCEvt );
virtual void RequestHelp( const HelpEvent& rHEvt );
virtual void InitEntry(SvLBoxEntry*,const XubString&,const Image&,const Image&,SvLBoxButtonKind);
virtual void DataChanged( const DataChangedEvent& rDCEvt );
@@ -191,7 +195,6 @@ public:
SwWrtShell* GetHiddenWrtShell() {return pHiddenShell;}
DECL_LINK( ContentDoubleClickHdl, SwContentTree * );
-// DECL_LINK( PopupHdl, Menu* );
DECL_LINK( TimerUpdate, Timer * );
virtual long GetTabPos( SvLBoxEntry*, SvLBoxTab* );
@@ -332,3 +335,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/convert.hxx b/sw/source/ui/inc/convert.hxx
index fc1879bc4f2d..3fc218459f68 100644
--- a/sw/source/ui/inc/convert.hxx
+++ b/sw/source/ui/inc/convert.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#define _SW_CONVERT_HXX
#include <vcl/fixed.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <vcl/edit.hxx>
#include <sfx2/basedlgs.hxx>
#include <textcontrolcombo.hxx>
@@ -89,3 +88,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/cption.hxx b/sw/source/ui/inc/cption.hxx
index edb8590d5c8f..b2a74794d7de 100644
--- a/sw/source/ui/inc/cption.hxx
+++ b/sw/source/ui/inc/cption.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,25 +30,15 @@
#include <svx/stddlg.hxx>
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
-#ifndef _GROUP_HXX //autogen
#include <vcl/group.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <actctrl.hxx>
@@ -135,3 +126,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/dbconfig.hxx b/sw/source/ui/inc/dbconfig.hxx
index 2e82249b84b9..f8da4b00c8d9 100644
--- a/sw/source/ui/inc/dbconfig.hxx
+++ b/sw/source/ui/inc/dbconfig.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/dbinsdlg.hxx b/sw/source/ui/inc/dbinsdlg.hxx
index 4cc46b7ff964..56adecbaad8f 100644
--- a/sw/source/ui/inc/dbinsdlg.hxx
+++ b/sw/source/ui/inc/dbinsdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,18 +30,10 @@
#define _DBINSDLG_HXX
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _GROUP_HXX //autogen
#include <vcl/group.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
#include <vcl/lstbox.hxx>
#include <svtools/svmedit.hxx>
#include <sfx2/basedlgs.hxx>
@@ -186,3 +179,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/dbtree.hxx b/sw/source/ui/inc/dbtree.hxx
index 44236edf7b00..090654b3f55c 100644
--- a/sw/source/ui/inc/dbtree.hxx
+++ b/sw/source/ui/inc/dbtree.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,7 +44,6 @@ class SwWrtShell;
class SW_DLLPUBLIC SwDBTreeList : public SvTreeListBox
{
ImageList aImageList;
- ImageList aImageListHC;
Image aDBBMP;
Image aTableBMP;
Image aQueryBMP;
@@ -84,3 +84,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/dbui.hxx b/sw/source/ui/inc/dbui.hxx
index 2c8e9cdf02c7..95a5864ef9d1 100644
--- a/sw/source/ui/inc/dbui.hxx
+++ b/sw/source/ui/inc/dbui.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include <svx/stddlg.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <vcl/fixed.hxx>
@@ -84,3 +83,4 @@ private: //member
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/dialmgr.hxx b/sw/source/ui/inc/dialmgr.hxx
index ebd9731c5e0a..7be3129b8a5b 100644
--- a/sw/source/ui/inc/dialmgr.hxx
+++ b/sw/source/ui/inc/dialmgr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,6 +35,7 @@
// forward ---------------------------------------------------------------
class ResMgr;
+
struct SwDialogsResMgr
{
static ResMgr* GetResMgr();
@@ -46,3 +48,4 @@ struct SwDialogsResMgr
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/docfnote.hxx b/sw/source/ui/inc/docfnote.hxx
index 7804773be5ff..172ca409317a 100644
--- a/sw/source/ui/inc/docfnote.hxx
+++ b/sw/source/ui/inc/docfnote.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/docstdlg.hxx b/sw/source/ui/inc/docstdlg.hxx
index b45700534d48..c8e007dd0f89 100644
--- a/sw/source/ui/inc/docstdlg.hxx
+++ b/sw/source/ui/inc/docstdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include <sfx2/tabdlg.hxx>
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
#include <svtools/stdctrl.hxx>
#include "docstat.hxx"
@@ -39,7 +38,6 @@
/*--------------------------------------------------------------------
Beschreibung: DocInfo jetzt als Page
--------------------------------------------------------------------*/
-
class SwDocStatPage: public SfxTabPage
{
public:
@@ -82,3 +80,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/drawbase.hxx b/sw/source/ui/inc/drawbase.hxx
index 2a63c6db360c..ebcd7fed227c 100644
--- a/sw/source/ui/inc/drawbase.hxx
+++ b/sw/source/ui/inc/drawbase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,4 @@ public:
#endif // _SW_DRAWBASE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/drawsh.hxx b/sw/source/ui/inc/drawsh.hxx
index deb0849d66a0..4325661414f9 100644
--- a/sw/source/ui/inc/drawsh.hxx
+++ b/sw/source/ui/inc/drawsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/drformsh.hxx b/sw/source/ui/inc/drformsh.hxx
index 8648742b1f99..061b2f4aad23 100644
--- a/sw/source/ui/inc/drformsh.hxx
+++ b/sw/source/ui/inc/drformsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,3 +46,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/drpcps.hxx b/sw/source/ui/inc/drpcps.hxx
index 6e7d6547053c..f9a8f7316c93 100644
--- a/sw/source/ui/inc/drpcps.hxx
+++ b/sw/source/ui/inc/drpcps.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,25 +31,15 @@
#include <sfx2/basedlgs.hxx>
#include <sfx2/tabdlg.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
class SwWrtShell;
@@ -123,3 +114,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/drwbassh.hxx b/sw/source/ui/inc/drwbassh.hxx
index 00b18f2fb143..0b5628b99cad 100644
--- a/sw/source/ui/inc/drwbassh.hxx
+++ b/sw/source/ui/inc/drwbassh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,3 +63,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/drwtxtsh.hxx b/sw/source/ui/inc/drwtxtsh.hxx
index add257a36ac2..493a8ede30de 100644
--- a/sw/source/ui/inc/drwtxtsh.hxx
+++ b/sw/source/ui/inc/drwtxtsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/dselect.hxx b/sw/source/ui/inc/dselect.hxx
index 65b778181947..ecd0eb7c8df3 100644
--- a/sw/source/ui/inc/dselect.hxx
+++ b/sw/source/ui/inc/dselect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,4 @@ class DrawSelection : public SwDrawBase
#endif // _SW_DSELECT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/edtwin.hxx b/sw/source/ui/inc/edtwin.hxx
index 3ca6259c41a4..a81aa116aeca 100644
--- a/sw/source/ui/inc/edtwin.hxx
+++ b/sw/source/ui/inc/edtwin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -305,3 +306,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/envimg.hxx b/sw/source/ui/inc/envimg.hxx
index 659fe46892db..4e221ea487d4 100644
--- a/sw/source/ui/inc/envimg.hxx
+++ b/sw/source/ui/inc/envimg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,11 +33,9 @@
#include "swdllapi.h"
// MakeSender -----------------------------------------------------------------
-
SW_DLLPUBLIC String MakeSender();
// enum -----------------------------------------------------------------------
-
enum SwEnvAlign
{
ENV_HOR_LEFT = 0,
@@ -48,7 +47,6 @@ enum SwEnvAlign
};
// class SwEnvItem ------------------------------------------------------------
-
class SW_DLLPUBLIC SwEnvItem : public SfxPoolItem
{
public:
@@ -77,8 +75,8 @@ public:
virtual int operator ==(const SfxPoolItem& rItem) const;
virtual SfxPoolItem* Clone(SfxItemPool* = 0) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
};
// class SwEnvCfgItem -------------------------------------------------------
@@ -96,5 +94,7 @@ public:
virtual void Commit();
virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
};
+
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/envlop.hxx b/sw/source/ui/inc/envlop.hxx
index 85f87c71d7c0..1deb5c788b2c 100644
--- a/sw/source/ui/inc/envlop.hxx
+++ b/sw/source/ui/inc/envlop.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,26 +28,16 @@
#ifndef _ENVLOP_HXX
#define _ENVLOP_HXX
-#ifndef _SV_MEDIT_HXX
#include <svtools/svmedit.hxx>
-#endif
#include <sfx2/tabdlg.hxx>
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _IMAGEBTN_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include "envimg.hxx"
@@ -59,7 +50,6 @@ class SwWrtShell;
class Printer;
// class SwEnvPreview ---------------------------------------------------------
-
class SwEnvPreview : public Window
{
void Paint(const Rectangle&);
@@ -74,7 +64,6 @@ protected:
};
// class SwEnvDlg -----------------------------------------------------------
-
class SwEnvDlg : public SfxTabDialog
{
friend class SwEnvPage;
@@ -99,7 +88,6 @@ public:
};
// class SwEnvPage ----------------------------------------------------------
-
class SwEnvPage : public SfxTabPage
{
FixedText aAddrText;
@@ -146,4 +134,4 @@ public:
#endif
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/extedit.hxx b/sw/source/ui/inc/extedit.hxx
new file mode 100644
index 000000000000..d013890a338d
--- /dev/null
+++ b/sw/source/ui/inc/extedit.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * [ Surendran Mahendran <surenspost@gmail.com>]
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef _EXTEDIT_HXX
+#define _EXTEDIT_HXX
+
+#include <osl/file.hxx>
+#include <osl/process.h>
+#include <vcl/graph.hxx>
+#include <svtools/grfmgr.hxx>
+#include <wrtsh.hxx>
+#include <vcl/timer.hxx>
+
+struct Data
+{
+ GraphicObject *pGraphicObject;
+ rtl::OUString fileName;
+ SwWrtShell *rSh ;
+};
+
+class ExternalProcessClass_Impl
+{
+ public:
+ DECL_LINK( CloseEvent, void *pEvent );
+ DECL_LINK( StartListeningEvent, void *pEvent );
+};
+
+void EditWithExternalTool(GraphicObject *pGraphic, SwWrtShell *rSh);
+
+#endif
diff --git a/sw/source/ui/inc/fldedt.hxx b/sw/source/ui/inc/fldedt.hxx
index 35b0b19be6c8..d41557e1636f 100644
--- a/sw/source/ui/inc/fldedt.hxx
+++ b/sw/source/ui/inc/fldedt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,10 +33,6 @@
class SwView;
class SwWrtShell;
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
class SwFldEditDlg : public SfxSingleTabDialog
{
SwWrtShell* pSh;
@@ -62,5 +59,6 @@ public:
void InsertHdl();
};
-
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/fldmgr.hxx b/sw/source/ui/inc/fldmgr.hxx
index 009084c633a2..84c3be977a11 100644
--- a/sw/source/ui/inc/fldmgr.hxx
+++ b/sw/source/ui/inc/fldmgr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,10 +53,10 @@ class SbModule;
class SvxMacroItem;
class SvNumberFormatter;
class Window;
+
/*--------------------------------------------------------------------
Beschreibung: Die Gruppen von Feldern
--------------------------------------------------------------------*/
-
enum SwFldGroups
{
GRP_DOC,
@@ -229,6 +230,6 @@ inline const String& SwFldMgr::GetCurFldPar2() const
inline sal_uLong SwFldMgr::GetCurFldFmt() const
{ return nCurFmt; }
-
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/fldtdlg.hxx b/sw/source/ui/inc/fldtdlg.hxx
index 9ee45e91cbe8..013002276b9c 100644
--- a/sw/source/ui/inc/fldtdlg.hxx
+++ b/sw/source/ui/inc/fldtdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,10 +34,6 @@ class SfxTabPage;
class SwChildWinWrapper;
struct SfxChildWinInfo;
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
class SwFldDlg: public SfxTabDialog
{
SwChildWinWrapper* m_pChildWin;
@@ -66,3 +63,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/fldwrap.hxx b/sw/source/ui/inc/fldwrap.hxx
index 9d8435e60bfc..5b5597a5096b 100644
--- a/sw/source/ui/inc/fldwrap.hxx
+++ b/sw/source/ui/inc/fldwrap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,6 +43,7 @@ public:
virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
void ShowPage(sal_uInt16 nPage = 0);
};
+
/* -----------------04.02.2003 14:14-----------------
* field dialog only showing database page to support
* mail merge
@@ -58,6 +60,6 @@ public:
virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
};
-
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/fontcfg.hxx b/sw/source/ui/inc/fontcfg.hxx
index 23f585863a07..5acd526bd16e 100644
--- a/sw/source/ui/inc/fontcfg.hxx
+++ b/sw/source/ui/inc/fontcfg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <unotools/configitem.hxx>
#include <tools/string.hxx>
#include <i18npool/lang.h>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include "swdllapi.h"
#define FONT_STANDARD 0
@@ -58,6 +59,7 @@
//pt-size of fonts
#define FONTSIZE_DEFAULT 240
+#define FONTSIZE_CJK_DEFAULT 210
#define FONTSIZE_OUTLINE 280
@@ -118,3 +120,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/formatclipboard.hxx b/sw/source/ui/inc/formatclipboard.hxx
index ca35d7b5f8ab..07891a0b5874 100644
--- a/sw/source/ui/inc/formatclipboard.hxx
+++ b/sw/source/ui/inc/formatclipboard.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/formedt.hxx b/sw/source/ui/inc/formedt.hxx
index 333f76f093ae..77968261799a 100644
--- a/sw/source/ui/inc/formedt.hxx
+++ b/sw/source/ui/inc/formedt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,21 +30,13 @@
#include <svx/stddlg.hxx>
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
#include "toxe.hxx"
@@ -53,7 +46,6 @@ class SwForm;
/*--------------------------------------------------------------------
Beschreibung: Markierung fuer Verzeichniseintrag einfuegen
--------------------------------------------------------------------*/
-
class SwIdxFormDlg : public SvxStandardDialog
{
DECL_LINK( EntryHdl, Button * );
@@ -106,3 +98,5 @@ inline const SwForm& SwIdxFormDlg::GetTOXForm()
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/frmdlg.hxx b/sw/source/ui/inc/frmdlg.hxx
index 69d17759b625..61be18818f41 100644
--- a/sw/source/ui/inc/frmdlg.hxx
+++ b/sw/source/ui/inc/frmdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,6 @@ class SwWrtShell;
/*--------------------------------------------------------------------
Beschreibung: Rahmendialog
--------------------------------------------------------------------*/
-
class SwFrmDlg : public SfxTabDialog
{
sal_Bool m_bFormat;
@@ -63,5 +63,6 @@ public:
inline SwWrtShell* GetWrtShell() { return m_pWrtShell; }
};
-
#endif // _FRMDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/frmmgr.hxx b/sw/source/ui/inc/frmmgr.hxx
index 0d4d0131de43..ce31fa734ab6 100644
--- a/sw/source/ui/inc/frmmgr.hxx
+++ b/sw/source/ui/inc/frmmgr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -194,3 +195,5 @@ inline sal_uInt16 SwFlyFrmAttrMgr::GetHeightPercent() const
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx
index 29983a275e59..36ee618380ea 100644
--- a/sw/source/ui/inc/frmpage.hxx
+++ b/sw/source/ui/inc/frmpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,6 @@
#include <prcntfld.hxx>
#include <globals.hrc>
-
namespace sfx2{class FileDialogHelper;}
class SwWrtShell;
struct FrmMap;
@@ -50,7 +50,6 @@ struct SwPosition;
/*--------------------------------------------------------------------
Beschreibung: Rahmendialog
--------------------------------------------------------------------*/
-
class SwFrmPage: public SfxTabPage
{
// Size
@@ -248,7 +247,6 @@ public:
virtual int DeactivatePage(SfxItemSet *pSet);
};
-
class SwFrmURLPage : public SfxTabPage
{
//Hyperlink
@@ -283,10 +281,6 @@ public:
virtual void Reset(const SfxItemSet &rSet);
};
-/*-----------------13.11.96 12.59-------------------
-
---------------------------------------------------*/
-
class SwFrmAddPage : public SfxTabPage
{
FixedLine aNamesFL;
@@ -340,3 +334,5 @@ public:
};
#endif // _FRMPAGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/frmsh.hxx b/sw/source/ui/inc/frmsh.hxx
index d4f4c546acf1..0e83ccbc6bf7 100644
--- a/sw/source/ui/inc/frmsh.hxx
+++ b/sw/source/ui/inc/frmsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/globals.h b/sw/source/ui/inc/globals.h
index 46a2fba86397..530fef285f9a 100644
--- a/sw/source/ui/inc/globals.h
+++ b/sw/source/ui/inc/globals.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,3 +36,5 @@ enum SwChangeState
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/glosbib.hxx b/sw/source/ui/inc/glosbib.hxx
index 0046e4f46e87..c886ad6cea92 100644
--- a/sw/source/ui/inc/glosbib.hxx
+++ b/sw/source/ui/inc/glosbib.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,19 +29,13 @@
#ifndef _GLOSBIB_HXX
#define _GLOSBIB_HXX
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
#include <svx/stddlg.hxx>
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
#include <svtools/svtabbx.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <vcl/fixed.hxx>
class SwGlossaryHdl;
@@ -54,15 +49,14 @@ class FEdit : public Edit
virtual void KeyInput( const KeyEvent& rKEvent );
};
-/* -----------------------------08.02.00 15:04--------------------------------
- ---------------------------------------------------------------------------*/
struct GlosBibUserData
{
String sPath;
String sGroupName;
String sGroupTitle;
};
+
class SwGlossaryGroupTLB : public SvTabListBox
{
public:
@@ -115,6 +109,6 @@ public:
const String& GetCreatedGroupName() const {return sCreatedGroup;}
};
-
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/glosdoc.hxx b/sw/source/ui/inc/glosdoc.hxx
index ff7c01ee0b88..b85e6fa74283 100644
--- a/sw/source/ui/inc/glosdoc.hxx
+++ b/sw/source/ui/inc/glosdoc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -146,3 +147,5 @@ public:
#endif // _GLOSDOC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/gloshdl.hxx b/sw/source/ui/inc/gloshdl.hxx
index 9bda46e4afef..365e56c4afd6 100644
--- a/sw/source/ui/inc/gloshdl.hxx
+++ b/sw/source/ui/inc/gloshdl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108,3 +109,5 @@ public:
};
#endif // _GLOSHDL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/gloslst.hxx b/sw/source/ui/inc/gloslst.hxx
index 676c3f3c4afd..1ce560ecceca 100644
--- a/sw/source/ui/inc/gloslst.hxx
+++ b/sw/source/ui/inc/gloslst.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/glossary.hxx b/sw/source/ui/inc/glossary.hxx
index 11328575fa4c..3f499a8c0def 100644
--- a/sw/source/ui/inc/glossary.hxx
+++ b/sw/source/ui/inc/glossary.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,32 +28,16 @@
#ifndef _GLOSSARY_HXX
#define _GLOSSARY_HXX
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
#include <svtools/svtreebx.hxx>
#include <svx/stddlg.hxx>
-#ifndef _BUTTON_HXX //autogen
-#include <vcl/button.hxx>
-#endif
-#include <vcl/fixed.hxx>
-
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _COMBOBOX_HXX //autogen
#include <vcl/combobox.hxx>
-#endif
-#ifndef _MENUBTN_HXX //autogen
#include <vcl/menubtn.hxx>
-#endif
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -195,3 +180,4 @@ inline String SwGlossaryDlg::GetCurrShortName() const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/glshell.hxx b/sw/source/ui/inc/glshell.hxx
index 85f01396910e..2c073f8b3e07 100644
--- a/sw/source/ui/inc/glshell.hxx
+++ b/sw/source/ui/inc/glshell.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112,3 +113,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/grfsh.hxx b/sw/source/ui/inc/grfsh.hxx
index f8448ae9bc68..231cc170baab 100644
--- a/sw/source/ui/inc/grfsh.hxx
+++ b/sw/source/ui/inc/grfsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/hidfunc.h b/sw/source/ui/inc/hidfunc.h
index d5cff23e616b..819f63ecbe72 100644
--- a/sw/source/ui/inc/hidfunc.h
+++ b/sw/source/ui/inc/hidfunc.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -348,3 +349,5 @@
#define HID_FAX_WIZZARD 1661
#define HID_LETTER_WIZZARD 1660
#define HID_LAUNCH_REGISTRY 1002
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/hyp.hxx b/sw/source/ui/inc/hyp.hxx
index 330507024f3c..110c02540473 100644
--- a/sw/source/ui/inc/hyp.hxx
+++ b/sw/source/ui/inc/hyp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/idxmrk.hxx b/sw/source/ui/inc/idxmrk.hxx
index 6d569bb798dd..22e71dbc6168 100644
--- a/sw/source/ui/inc/idxmrk.hxx
+++ b/sw/source/ui/inc/idxmrk.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,6 @@
class SwWrtShell;
-/* -----------------07.09.99 08:02-------------------
-
- --------------------------------------------------*/
class SwInsertIdxMarkWrapper : public SfxChildWindow
{
AbstractMarkFloatDlg* pAbstDlg;
@@ -51,9 +49,6 @@ public:
void ReInitDlg(SwWrtShell& rWrtShell);
};
-/* -----------------07.09.99 08:02-------------------
-
- --------------------------------------------------*/
class SwInsertAuthMarkWrapper : public SfxChildWindow
{
AbstractMarkFloatDlg* pAbstDlg;
@@ -71,3 +66,4 @@ public:
#endif // _IDXMRK_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/imaildsplistener.hxx b/sw/source/ui/inc/imaildsplistener.hxx
index 9cb7d11f2684..f12fbc1f3256 100644
--- a/sw/source/ui/inc/imaildsplistener.hxx
+++ b/sw/source/ui/inc/imaildsplistener.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,3 +76,5 @@ public:
};
#endif // INCLUDED_IMAILDISPATCHERLISTENER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/initui.hxx b/sw/source/ui/inc/initui.hxx
index 6c5b5b694445..897f1773d318 100644
--- a/sw/source/ui/inc/initui.hxx
+++ b/sw/source/ui/inc/initui.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,5 @@ extern void _FinitSpell();
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/inpdlg.hxx b/sw/source/ui/inc/inpdlg.hxx
index f2ed1b22f0d4..b57a59bb0228 100644
--- a/sw/source/ui/inc/inpdlg.hxx
+++ b/sw/source/ui/inc/inpdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,13 +30,9 @@
#include <svx/stddlg.hxx>
-#ifndef _SV_SVMEDIT_HXX //autogen
#include <svtools/svmedit.hxx>
-#endif
#include <vcl/fixed.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
class SwInputField;
class SwSetExpField;
@@ -76,3 +73,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/inputwin.hxx b/sw/source/ui/inc/inputwin.hxx
index 2f9aaa669205..1c0e7dc6fc4b 100644
--- a/sw/source/ui/inc/inputwin.hxx
+++ b/sw/source/ui/inc/inputwin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -131,3 +132,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/insfnote.hxx b/sw/source/ui/inc/insfnote.hxx
index e9483eea02c3..8e01cbc3b78e 100644
--- a/sw/source/ui/inc/insfnote.hxx
+++ b/sw/source/ui/inc/insfnote.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,13 +30,9 @@
#include <svx/stddlg.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
#include <vcl/fixed.hxx>
class SwWrtShell;
@@ -95,3 +92,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/insrule.hxx b/sw/source/ui/inc/insrule.hxx
index fff497ca2c0e..385fdaa1cade 100644
--- a/sw/source/ui/inc/insrule.hxx
+++ b/sw/source/ui/inc/insrule.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
class SwRulerValueSet;
class ValueSet;
-/*-----------------14.02.97 12.30-------------------
---------------------------------------------------*/
class SwInsertGrfRulerDlg : public SfxModalDialog
{
FixedLine aSelectionFL;
@@ -64,3 +63,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/instable.hxx b/sw/source/ui/inc/instable.hxx
index 24e54e4c0f86..9f222c918176 100644
--- a/sw/source/ui/inc/instable.hxx
+++ b/sw/source/ui/inc/instable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,10 @@
#ifndef _INSTABLE_HXX
#define _INSTABLE_HXX
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
#include <sfx2/basedlgs.hxx>
#include <actctrl.hxx>
#include <textcontrolcombo.hxx>
@@ -98,3 +91,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/javaedit.hxx b/sw/source/ui/inc/javaedit.hxx
index d78e77597d4d..767d05a7028c 100644
--- a/sw/source/ui/inc/javaedit.hxx
+++ b/sw/source/ui/inc/javaedit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,21 +32,13 @@
#include <svx/stddlg.hxx>
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_SVMEDIT_HXX //autogen
#include <svtools/svmedit.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _IMAGEBTN_HXX //autogen
#include <vcl/button.hxx>
-#endif
class SwWrtShell;
class SwFldMgr;
@@ -116,3 +109,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/label.hxx b/sw/source/ui/inc/label.hxx
index 46bf210bd8da..8a23e1e845ce 100644
--- a/sw/source/ui/inc/label.hxx
+++ b/sw/source/ui/inc/label.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,3 +98,4 @@ inline void SwLabDlg::ReplaceGroup( const String &rMake )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/labelcfg.hxx b/sw/source/ui/inc/labelcfg.hxx
index ab01d365bbe1..34b5e0786d8e 100644
--- a/sw/source/ui/inc/labelcfg.hxx
+++ b/sw/source/ui/inc/labelcfg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/labimg.hxx b/sw/source/ui/inc/labimg.hxx
index cb435bd38925..197887906b45 100644
--- a/sw/source/ui/inc/labimg.hxx
+++ b/sw/source/ui/inc/labimg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,8 +34,8 @@
#include "swdllapi.h"
// class SwLabItem ----------------------------------------------------------
-
class SwLabCfgItem;
+
class SW_DLLPUBLIC SwLabItem : public SfxPoolItem
{
@@ -111,7 +112,6 @@ public:
};
// class SwLabCfgItem -------------------------------------------------------
-
class SwLabCfgItem : public utl::ConfigItem
{
SwLabItem aItem;
@@ -129,3 +129,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/langhelper.hxx b/sw/source/ui/inc/langhelper.hxx
index 213092062a00..90a8503cea6f 100755..100644
--- a/sw/source/ui/inc/langhelper.hxx
+++ b/sw/source/ui/inc/langhelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,3 +67,5 @@ namespace SwLangHelper
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/linenum.hxx b/sw/source/ui/inc/linenum.hxx
index 8d727b771750..a91490634e73 100644
--- a/sw/source/ui/inc/linenum.hxx
+++ b/sw/source/ui/inc/linenum.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,7 @@
#include <vcl/field.hxx>
#include <numberingtypelistbox.hxx>
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
class Window;
class SfxItemSet;
@@ -45,7 +44,6 @@ class SwWrtShell;
/*--------------------------------------------------------------------
Beschreibung: SingleTabDialog
--------------------------------------------------------------------*/
-
class SwLineNumberingDlg : public SfxSingleTabDialog
{
SwWrtShell* pSh;
@@ -62,7 +60,6 @@ public:
/*--------------------------------------------------------------------
Beschreibung: TabPage
--------------------------------------------------------------------*/
-
class SwLineNumberingPage : public SfxTabPage
{
CheckBox aNumberingOnCB;
@@ -107,4 +104,4 @@ public:
#endif
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/listsh.hxx b/sw/source/ui/inc/listsh.hxx
index 61fea6ece214..30a97c04c0f2 100644
--- a/sw/source/ui/inc/listsh.hxx
+++ b/sw/source/ui/inc/listsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/macassgn.hxx b/sw/source/ui/inc/macassgn.hxx
index ac8be8d2dd87..291129d20ada 100644
--- a/sw/source/ui/inc/macassgn.hxx
+++ b/sw/source/ui/inc/macassgn.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,7 @@ class SvxMacroItem;
enum DlgEventType
{
- MACASSGN_TEXTBAUST,
+ MACASSGN_AUTOTEXT,
MACASSGN_GRAPHIC,
MACASSGN_OLE,
MACASSGN_FRMURL,
@@ -52,3 +53,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/mailconfigpage.hxx b/sw/source/ui/inc/mailconfigpage.hxx
index cf0022b378c8..4c01efb74a90 100644
--- a/sw/source/ui/inc/mailconfigpage.hxx
+++ b/sw/source/ui/inc/mailconfigpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,25 +29,15 @@
#define _MAILCONFIGPAGE_HXX
#include <sfx2/tabdlg.hxx>
-#ifndef _BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef _LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _FIELD_HXX
#include <vcl/field.hxx>
-#endif
-#ifndef _FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
#include <sfx2/basedlgs.hxx>
class SwTestAccountSettingsDialog;
class SwMailMergeConfigItem;
-/*-- 05.05.2004 16:45:45---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailConfigPage : public SfxTabPage
{
friend class SwTestAccountSettingsDialog;
@@ -95,9 +86,6 @@ public:
};
-/*-- 18.08.2004 12:02:02---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SwMailConfigDlg : public SfxSingleTabDialog
{
public:
@@ -108,3 +96,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/maildispatcher.hxx b/sw/source/ui/inc/maildispatcher.hxx
index bc8afb829fdf..ad5521d3814a 100644
--- a/sw/source/ui/inc/maildispatcher.hxx
+++ b/sw/source/ui/inc/maildispatcher.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,6 @@
#ifndef INCLUDED_MAILDISPATCHER_HXX
#define INCLUDED_MAILDISPATCHER_HXX
-//#ifndef _COM_SUN_STAR_MAIL_XMAILSERVER_HPP_
-//#include "com/sun/star/mail/XMailServer.hpp"
-//#endif
#include "com/sun/star/mail/XSmtpService.hpp"
#include "com/sun/star/mail/XMailMessage.hpp"
#include <osl/thread.hxx>
@@ -166,3 +164,5 @@ private:
};
#endif // INCLUDED_MAILDISPATCHER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/mailmergechildwindow.hxx b/sw/source/ui/inc/mailmergechildwindow.hxx
index fb4f529f10cf..a02ca949180c 100644
--- a/sw/source/ui/inc/mailmergechildwindow.hxx
+++ b/sw/source/ui/inc/mailmergechildwindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,6 @@
#include <vcl/toolbox.hxx>
#include "swdllapi.h"
-/*-- 25.05.2004 15:25:56---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SwMailMergeChildWin : public SfxFloatingWindow
{
ToolBox m_aBackTB;
@@ -47,10 +45,8 @@ public:
virtual void FillInfo(SfxChildWinInfo&) const;
};
-/*-- 25.05.2004 15:25:56---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SwSendMailDialog;
+
class SwMailMergeChildWindow : public SfxChildWindow
{
public:
@@ -64,3 +60,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/mailmergehelper.hxx b/sw/source/ui/inc/mailmergehelper.hxx
index 954ce643d8e9..f2e160ab81c7 100644
--- a/sw/source/ui/inc/mailmergehelper.hxx
+++ b/sw/source/ui/inc/mailmergehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,8 +43,8 @@
#include <vcl/scrbar.hxx>
#include "swdllapi.h"
-
class SwMailMergeConfigItem;
+
namespace com{ namespace sun{ namespace star{
namespace uno{
class XComponentContext;
@@ -56,9 +57,7 @@ namespace com{ namespace sun{ namespace star{
class XMailService;
}
}}}
-/*-- 14.06.2004 12:27:42---------------------------------------------------
- -----------------------------------------------------------------------*/
namespace SwMailMergeHelper
{
SW_DLLPUBLIC String CallSaveAsDialog(String& rFilter);
@@ -70,9 +69,7 @@ namespace SwMailMergeHelper
const String& rOutMailServerPassword,
Window* pDialogParentWindow = 0 );
}
-/* -----------------06.04.2004 10:29-----------------
- --------------------------------------------------*/
class SW_DLLPUBLIC SwBoldFixedInfo : public FixedInfo
{
public:
@@ -156,6 +153,7 @@ struct SwMergeAddressItem
bIsColumn(false),
bIsReturn(false) {}
};
+
class SW_DLLPUBLIC SwAddressIterator
{
String sAddress;
@@ -167,9 +165,6 @@ public:
bool HasMore() const{return sAddress.Len() > 0;}
};
-/*-- 21.05.2004 10:31:15---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SW_DLLPUBLIC SwAuthenticator :
public cppu::WeakImplHelper1< ::com::sun::star::mail::XAuthenticator>
{
@@ -189,9 +184,7 @@ public:
virtual ::rtl::OUString SAL_CALL getPassword( ) throw (::com::sun::star::uno::RuntimeException);
};
-/*-- 25.08.2004 12:48:47---------------------------------------------------
- -----------------------------------------------------------------------*/
class SW_DLLPUBLIC SwConnectionContext :
public cppu::WeakImplHelper1< ::com::sun::star::uno::XCurrentContext >
{
@@ -206,17 +199,13 @@ public:
virtual ::com::sun::star::uno::Any SAL_CALL getValueByName( const ::rtl::OUString& Name )
throw (::com::sun::star::uno::RuntimeException);
};
-/*-- 21.05.2004 10:39:20---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMutexBase
{
public:
osl::Mutex m_aMutex;
};
-/*-- 21.05.2004 10:39:20---------------------------------------------------
- -----------------------------------------------------------------------*/
class SW_DLLPUBLIC SwConnectionListener :
public SwMutexBase,
public cppu::WeakComponentImplHelper1< ::com::sun::star::mail::XConnectionListener >
@@ -239,9 +228,6 @@ public:
throw(com::sun::star::uno::RuntimeException);
};
-/*-- 13.07.2004 09:02:12---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SwMailTransferable :
public SwMutexBase,
public cppu::WeakComponentImplHelper2
@@ -281,9 +267,6 @@ class SwMailTransferable :
};
-/*-- 22.06.2004 16:38:34---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SwMailMessage :
public SwMutexBase,
public cppu::WeakComponentImplHelper1< ::com::sun::star::mail::XMailMessage >
@@ -338,12 +321,11 @@ public:
void SetSenderAddress(const ::rtl::OUString& rSenderAddress)
{m_sSenderAddress = rSenderAddress;}
};
-/*-- 21.05.2004 10:17:22---------------------------------------------------
- -----------------------------------------------------------------------*/
SW_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>
getCurrentCmpCtx(
::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory> rSrvMgr);
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/mailmergewizard.hxx b/sw/source/ui/inc/mailmergewizard.hxx
index 7a582693b013..ea413b445b13 100644
--- a/sw/source/ui/inc/mailmergewizard.hxx
+++ b/sw/source/ui/inc/mailmergewizard.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -101,3 +102,4 @@ public:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/mailmrge.hxx b/sw/source/ui/inc/mailmrge.hxx
index 43534f76a3da..359027244a3e 100644
--- a/sw/source/ui/inc/mailmrge.hxx
+++ b/sw/source/ui/inc/mailmrge.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,25 +30,15 @@
#include <svx/stddlg.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
#include <svtools/stdctrl.hxx>
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/uno/Reference.h>
@@ -161,9 +152,7 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const;
};
-/* -----------------27.11.2002 12:05-----------------
- *
- * --------------------------------------------------*/
+
class SwMailMergeCreateFromDlg : public ModalDialog
{
FixedLine aCreateFromFL;
@@ -179,9 +168,7 @@ public:
sal_Bool IsThisDocument() const {return aThisDocRB.IsChecked();}
};
-/* -----------------04.02.2003 13:41-----------------
- *
- * --------------------------------------------------*/
+
class SwMailMergeFieldConnectionsDlg : public ModalDialog
{
FixedLine aConnectionsFL;
@@ -202,3 +189,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/mediash.hxx b/sw/source/ui/inc/mediash.hxx
index 035c03656119..d01dc6692d96 100644
--- a/sw/source/ui/inc/mediash.hxx
+++ b/sw/source/ui/inc/mediash.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,3 +42,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/mergetbl.hxx b/sw/source/ui/inc/mergetbl.hxx
index 239f776ee938..8923a2a1c2f3 100644
--- a/sw/source/ui/inc/mergetbl.hxx
+++ b/sw/source/ui/inc/mergetbl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,13 +28,9 @@
#ifndef _MERGETBL_HXX
#define _MERGETBL_HXX
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
#include <svx/stddlg.hxx>
@@ -57,3 +54,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/misc.hrc b/sw/source/ui/inc/misc.hrc
index f7c7cfcde9a0..39f33d39d677 100644
--- a/sw/source/ui/inc/misc.hrc
+++ b/sw/source/ui/inc/misc.hrc
@@ -96,6 +96,7 @@
#define MN_REDLINE_POPUP (RC_MISC_BEGIN + 61)
#define STR_REMOVE_WARNING (RC_MISC_BEGIN + 62)
#define STRRES_NUMTYPES (RC_MISC_BEGIN + 63)
+#define STR_MY_AUTOTEXT (RC_MISC_BEGIN + 64)
#define MISC_ACT_END STRRES_NUMTYPES
diff --git a/sw/source/ui/inc/mmconfigitem.hxx b/sw/source/ui/inc/mmconfigitem.hxx
index e647e934792d..4ac5eab0da00 100644
--- a/sw/source/ui/inc/mmconfigitem.hxx
+++ b/sw/source/ui/inc/mmconfigitem.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,18 +45,17 @@ namespace com{namespace sun{namespace star{
class XColumnsSupplier;
}
}}}
+
class SwMailMergeConfigItem_Impl;
class SwView;
-/*-- 06.04.2004 10:43:35---------------------------------------------------
-
- -----------------------------------------------------------------------*/
struct SwDocMergeInfo
{
long nStartPageInTarget;
long nEndPageInTarget;
long nDBRow;
};
+
class SW_DLLPUBLIC SwMailMergeConfigItem
{
// com::sun::star::uno::Sequence< ::rtl::OUString> m_aSavedDocuments;
@@ -275,5 +275,7 @@ public:
//helper methods
::rtl::OUString GetAssignedColumn(sal_uInt32 nColumn)const;
};
+
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/multmrk.hxx b/sw/source/ui/inc/multmrk.hxx
index e56da31afc47..e3f182b9583c 100644
--- a/sw/source/ui/inc/multmrk.hxx
+++ b/sw/source/ui/inc/multmrk.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,20 +31,10 @@
#include <svx/stddlg.hxx>
-
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
#include <svtools/stdctrl.hxx>
-
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#include <vcl/fixed.hxx>
-
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
class SwTOXMgr;
@@ -75,3 +66,4 @@ public:
#endif // _MULTMRK_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/navicfg.hxx b/sw/source/ui/inc/navicfg.hxx
index de400eca916e..e7993325209c 100644
--- a/sw/source/ui/inc/navicfg.hxx
+++ b/sw/source/ui/inc/navicfg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#define _NAVICFG_HXX
#include <unotools/configitem.hxx>
-/* -----------------------------08.09.00 16:27--------------------------------
- ---------------------------------------------------------------------------*/
class SwNavigationConfig : public utl::ConfigItem
{
sal_Int32 nRootType; //RootType
@@ -115,5 +114,7 @@ public:
}
}
};
+
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/navicont.hxx b/sw/source/ui/inc/navicont.hxx
index d1f0a70272aa..db5208049990 100644
--- a/sw/source/ui/inc/navicont.hxx
+++ b/sw/source/ui/inc/navicont.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/navipi.hxx b/sw/source/ui/inc/navipi.hxx
index 36dcbd7fa2e3..f5ef00cff8a4 100644
--- a/sw/source/ui/inc/navipi.hxx
+++ b/sw/source/ui/inc/navipi.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
// INCLUDE ---------------------------------------------------------------
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
#include <svl/lstner.hxx>
#include <svtools/transfer.hxx>
#include <sfx2/childwin.hxx>
@@ -49,9 +48,8 @@ class SwView;
class SwNavigationConfig;
class SfxObjectShellLock;
class SfxChildWindowContext;
-
-//-----------------------------------------------------------------------
class SwNavigationPI;
+
class SwNavHelpToolBox : public SwHelpToolBox
{
virtual void MouseButtonDown(const MouseEvent &rEvt);
@@ -60,7 +58,6 @@ class SwNavHelpToolBox : public SwHelpToolBox
SwNavHelpToolBox(SwNavigationPI* pParent, const ResId &rResId);
};
-
// CLASS -----------------------------------------------------------------
class SwNavigationPI : public Window,
public SfxControllerItem, public SfxListener
@@ -73,7 +70,6 @@ class SwNavigationPI : public Window,
SwNavHelpToolBox aContentToolBox;
SwHelpToolBox aGlobalToolBox;
ImageList aContentImageList;
- ImageList aContentImageListH;
SwContentTree aContentTree;
SwGlobalTree aGlobalTree;
ListBox aDocListBox;
@@ -196,3 +192,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/navmgr.hxx b/sw/source/ui/inc/navmgr.hxx
new file mode 100644
index 000000000000..2a86172e6c1b
--- /dev/null
+++ b/sw/source/ui/inc/navmgr.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * [ Maja Djordjevic < ovcica@gmail.com > ]
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Cédric Bosdonnat <cbosdonnat@novell.com>
+ * Caolan McNamara <caolanm@redhat.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef _NAVMGR_HXX
+#define _NAVMGR_HXX
+
+#include "swtypes.hxx"
+#include "pam.hxx"
+#include "swdllapi.h"
+
+class SwWrtShell;
+struct SwPosition;
+
+class SW_DLLPUBLIC SwNavigationMgr
+{
+private:
+ /*
+ * List of entries in the navigation history
+ * Each entry is a SwPosition, which represents a position within the document
+ * SwPosition is given by a node index (SwNodeIndex) which usually represents the paragraph the position is in
+ * and an index (SwIndex), which represents the position inside this paragraph.
+ * You can find more on SwPositions at http://wiki.services.openoffice.org/wiki/Writer_Core_And_Layout
+ *
+ * The navigation history behaves as a stack, to which items are added when we jump to a new position
+ * (e.g. click a link, or double click an entry from the navigator).
+ * Every use of the back/forward buttons results in moving the stack pointer within the navigation history
+ */
+ std::vector<SwPosition> _entries;
+ std::vector<SwPosition>::size_type _nCurrent; /* Current position within the navigation history */
+ SwWrtShell* _pMyShell; /* The active shell within which the navigation occurs */
+
+ void GotoSwPosition(const SwPosition &rPos);
+
+public:
+ /* Constructor that initializes the shell to the current shell */
+ SwNavigationMgr( SwWrtShell* pShell );
+ /* Can we go back in the history ? */
+ sal_Bool backEnabled() ;
+ /* Can we go forward in the history ? */
+ sal_Bool forwardEnabled();
+ /* The method that is called when we click the back button */
+ void goBack() ;
+ /* The method that is called when we click the forward button */
+ void goForward() ;
+ /* The method that adds the position pPos to the navigation history */
+ bool addEntry(const SwPosition& rPos);
+};
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/navsh.hxx b/sw/source/ui/inc/navsh.hxx
new file mode 100644
index 000000000000..7c12ddc3b1cb
--- /dev/null
+++ b/sw/source/ui/inc/navsh.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * [ Maja Djordjevic < ovcica@gmail.com > ]
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Cédric Bosdonnat <cbosdonnat@novell.com>
+ * Caolan McNamara <caolanm@redhat.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef _SWNAVIGATIONSH_HXX
+#define _SWNAVIGATIONSH_HXX
+
+#include "frmsh.hxx"
+
+class SfxItemSet;
+class SwWrtShell;
+
+
+
+class SwNavigationShell: public SwBaseShell
+{
+public:
+ SFX_DECL_INTERFACE(SW_NAVIGATIONSHELL)
+
+ SwNavigationShell(SwView &rView);
+
+ void GetState(SfxItemSet &);
+ void Execute(SfxRequest &);
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/num.hxx b/sw/source/ui/inc/num.hxx
index c999bf25eb93..32cab6675abd 100644
--- a/sw/source/ui/inc/num.hxx
+++ b/sw/source/ui/inc/num.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,25 +30,13 @@
#include <sfx2/tabdlg.hxx>
-#ifndef _MENUBTN_HXX //autogen
#include <vcl/menubtn.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
#include <svtools/stdctrl.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
#include <svx/stddlg.hxx>
#include <numprevw.hxx>
#include "numrule.hxx"
@@ -56,36 +45,23 @@ class SwWrtShell;
class SvxBrushItem;
class SwOutlineTabDialog;
-
-/*-----------------13.02.97 14.02-------------------
-
---------------------------------------------------*/
-
struct SwBmpItemInfo
{
SvxBrushItem* pBrushItem;
sal_uInt16 nItemId;
};
-
-/*-----------------07.02.97 15.37-------------------
-
---------------------------------------------------*/
#define NUM_PAGETYPE_BULLET 0
#define NUM_PAGETYPE_SINGLENUM 1
#define NUM_PAGETYPE_NUM 2
#define NUM_PAGETYPE_BMP 3
#define PAGETYPE_USER_START 10
-/*-----------------03.12.97 10:18-------------------
-
---------------------------------------------------*/
class SwNumPositionTabPage : public SfxTabPage
{
FixedLine aLevelFL;
MultiListBox aLevelLB;
- // --> OD 2008-02-01 #newlistlevelattrs#
// former set of controls shown for numbering rules containing list level
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
FixedLine aPositionFL;
@@ -98,9 +74,7 @@ class SwNumPositionTabPage : public SfxTabPage
MetricField aDistNumMF;
FixedText aAlignFT;
ListBox aAlignLB;
- // <--
- // --> OD 2008-02-01 #newlistlevelattrs#
// new set of controls shown for numbering rules containing list level
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT
FixedText aLabelFollowedByFT;
@@ -113,7 +87,6 @@ class SwNumPositionTabPage : public SfxTabPage
MetricField aAlignedAtMF;
FixedText aIndentAtFT;
MetricField aIndentAtMF;
- // <--
PushButton aStandardPB;
@@ -129,9 +102,7 @@ class SwNumPositionTabPage : public SfxTabPage
sal_Bool bModified : 1;
sal_Bool bPreset : 1;
sal_Bool bInInintControl : 1; //Modify-Fehler umgehen, soll ab 391 behoben sein
- // --> OD 2008-02-01 #newlistlevelattrs#
bool bLabelAlignmentPosAndSpaceModeActive;
- // <--
void InitControls();
@@ -141,7 +112,6 @@ class SwNumPositionTabPage : public SfxTabPage
DECL_LINK( RelativeHdl, CheckBox * );
DECL_LINK( StandardHdl, PushButton * );
- // --> OD 2008-02-01 #newlistlevelattrs#
void InitPosAndSpaceMode();
void ShowControlsDependingOnPosAndSpaceMode();
@@ -149,7 +119,6 @@ class SwNumPositionTabPage : public SfxTabPage
DECL_LINK( ListtabPosHdl_Impl, MetricField* );
DECL_LINK( AlignAtHdl_Impl, MetricField* );
DECL_LINK( IndentAtHdl_Impl, MetricField* );
- // <--
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
@@ -203,3 +172,4 @@ class SwSvxNumBulletTabDialog : public SfxTabDialog
};
#endif // _NUM_CXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/numberingtypelistbox.hxx b/sw/source/ui/inc/numberingtypelistbox.hxx
index eaf35c349417..747328dd1378 100644
--- a/sw/source/ui/inc/numberingtypelistbox.hxx
+++ b/sw/source/ui/inc/numberingtypelistbox.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/numfmtlb.hxx b/sw/source/ui/inc/numfmtlb.hxx
index d21380f30358..e19d7206535e 100644
--- a/sw/source/ui/inc/numfmtlb.hxx
+++ b/sw/source/ui/inc/numfmtlb.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,3 +86,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/numpara.hxx b/sw/source/ui/inc/numpara.hxx
index 6fb8fe446154..2cf7d903338c 100644
--- a/sw/source/ui/inc/numpara.hxx
+++ b/sw/source/ui/inc/numpara.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,9 +33,7 @@
#include <vcl/lstbox.hxx>
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
/* --- class SwParagraphNumTabPage ----------------------------------------
@@ -96,3 +95,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/numprevw.hxx b/sw/source/ui/inc/numprevw.hxx
index 5324fa8189db..e40e49b41347 100644
--- a/sw/source/ui/inc/numprevw.hxx
+++ b/sw/source/ui/inc/numprevw.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,9 +33,6 @@
#include <vcl/window.hxx>
class SwNumRule;
-/*-----------------02.12.97 10:31-------------------
-
---------------------------------------------------*/
class NumberingPreview : public Window
{
@@ -69,3 +67,4 @@ class NumberingPreview : public Window
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/olesh.hxx b/sw/source/ui/inc/olesh.hxx
index 32a413300f36..c4c220b795e0 100644
--- a/sw/source/ui/inc/olesh.hxx
+++ b/sw/source/ui/inc/olesh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/olmenu.hxx b/sw/source/ui/inc/olmenu.hxx
index 270c8d8e458c..bc2c7a1e8973 100644
--- a/sw/source/ui/inc/olmenu.hxx
+++ b/sw/source/ui/inc/olmenu.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/optcomp.hxx b/sw/source/ui/inc/optcomp.hxx
index ae9de51f1ba8..b9e95f5722bf 100644
--- a/sw/source/ui/inc/optcomp.hxx
+++ b/sw/source/ui/inc/optcomp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,6 @@
#include <svx/checklbx.hxx>
// class SwCompatibilityOptPage ------------------------------------------
-
class SwWrtShell;
struct SwCompatibilityOptPage_Impl;
@@ -85,3 +85,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/optload.hxx b/sw/source/ui/inc/optload.hxx
index d883a63060c1..1c5d0bd4d5b0 100644
--- a/sw/source/ui/inc/optload.hxx
+++ b/sw/source/ui/inc/optload.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include <sfx2/tabdlg.hxx>
-#ifndef _GROUP_HXX
#include <vcl/group.hxx>
-#endif
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/field.hxx>
@@ -45,10 +44,6 @@ class SwFldMgr;
class SvLBoxEntry;
class SwWrtShell;
-/*-----------------31.08.96 10.09-------------------
-
---------------------------------------------------*/
-
class SwLoadOptPage : public SfxTabPage
{
private:
@@ -68,6 +63,7 @@ private:
FixedText aTabFT;
MetricField aTabMF;
CheckBox aUseSquaredPageMode;
+ CheckBox aUseCharUnit;
SwWrtShell* pWrtShell;
sal_Bool bHTMLMode;
@@ -88,18 +84,12 @@ public:
virtual void Reset( const SfxItemSet& rSet );
};
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
class SwCaptionOptDlg : public SfxSingleTabDialog
{
public:
SwCaptionOptDlg(Window* pParent, const SfxItemSet& rSet);
~SwCaptionOptDlg();
};
-/* -----------------23.10.98 13:19-------------------
- *
- * --------------------------------------------------*/
class CaptionComboBox : public SwComboBox
{
@@ -112,10 +102,6 @@ public:
{}
};
-/*-----------------31.08.96 10.09-------------------
-
---------------------------------------------------*/
-
class SwCaptionPreview : public Window
{
private:
@@ -210,4 +196,4 @@ public:
#endif
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx
index 4ee11b8757c6..9c175fecd680 100644
--- a/sw/source/ui/inc/optpage.hxx
+++ b/sw/source/ui/inc/optpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,25 +29,15 @@
#define _OPTPAGE_HXX
#include <sfx2/tabdlg.hxx>
-#ifndef _GROUP_HXX //autogen
#include <vcl/group.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
#include <svtools/ctrlbox.hxx>
#include <svx/fntctrl.hxx>
#include <fontcfg.hxx>
@@ -56,10 +47,6 @@ class SwStdFontConfig;
class SwWrtShell;
class FontList;
-/*-----------------31.08.96 10.09-------------------
-
---------------------------------------------------*/
-
class SwContentOptPage : public SfxTabPage
{
//visual aids
@@ -107,11 +94,9 @@ public:
};
-/*-------- OS 27.01.95 -----------------------------------
+/*--------------------------------------------------------
TabPage Druckereinstellungen Zusaetze
--------------------------------------------------------- */
-
-
class SwAddPrinterTabPage : public SfxTabPage
{
FixedLine aFL1;
@@ -172,10 +157,6 @@ public:
};
-/*-----------------03.09.96 11.50-------------------
-
---------------------------------------------------*/
-
class SwStdFontTabPage : public SfxTabPage
{
FixedLine aStdChrFL ;
@@ -260,10 +241,6 @@ public:
virtual void PageCreated (SfxAllItemSet aSet);
};
-/*-----------------18.01.97 12.10-------------------
-
---------------------------------------------------*/
-
class SwTableOptionsTabPage : public SfxTabPage
{
FixedLine aTableFL;
@@ -322,7 +299,8 @@ public:
virtual void PageCreated (SfxAllItemSet aSet);
};
-/*-----------------31.10.97 17:55-------------------
+
+/*--------------------------------------------------
TabPage fuer ShadowCrsr
--------------------------------------------------*/
class SwShdwCrsrOptionsTabPage : public SfxTabPage
@@ -376,7 +354,6 @@ public:
/*-----------------------------------------------------------------------
Beschreibung: Markierungsvorschau
-----------------------------------------------------------------------*/
-
class SwMarkPreview : public Window
{
Color m_aBgCol; // background
@@ -414,7 +391,6 @@ public:
/*-----------------------------------------------------------------------
Beschreibung: Redlining-Optionen
-----------------------------------------------------------------------*/
-
class SwRedlineOptionsTabPage : public SfxTabPage
{
FixedLine aInsertFL;
@@ -468,11 +444,11 @@ public:
virtual void Reset( const SfxItemSet& rSet );
};
-/*--------OS 11.01.95 -----------------------------------
+/*-------------------------------------------------------
TabPage Testeinstellungen fuer SW
--------------------------------------------------------- */
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
class SwTestTabPage : public SfxTabPage
{
@@ -506,4 +482,6 @@ private:
};
#endif //PRODUCT
+
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/ui/inc/outline.hxx b/sw/source/ui/inc/outline.hxx
index f626de0c0fa3..f19969660392 100644
--- a/sw/source/ui/inc/outline.hxx
+++ b/sw/source/ui/inc/outline.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,26 +33,16 @@
#include <vcl/menu.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <svtools/stdctrl.hxx>
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
#include "swtypes.hxx" //fuer MAXLEVEL
#include <numprevw.hxx>
@@ -61,9 +52,6 @@ class SwWrtShell;
class SwNumRule;
class SwChapterNumRules;
-/* -----------------07.07.98 13:38-------------------
- *
- * --------------------------------------------------*/
class SwOutlineTabDialog : public SfxTabDialog
{
static sal_uInt16 nNumLevel;
@@ -99,9 +87,7 @@ class SwOutlineTabDialog : public SfxTabDialog
static sal_uInt16 GetActNumLevel() {return nNumLevel;}
static void SetActNumLevel(sal_uInt16 nSet) {nNumLevel = nSet;}
};
-/* -----------------07.07.98 13:47-------------------
- *
- * --------------------------------------------------*/
+
class SwOutlineSettingsTabPage : public SfxTabPage
{
FixedLine aLevelFL;
@@ -163,4 +149,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
};
+
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/pardlg.hxx b/sw/source/ui/inc/pardlg.hxx
index 3946300dc248..2bb0be8dc5fe 100644
--- a/sw/source/ui/inc/pardlg.hxx
+++ b/sw/source/ui/inc/pardlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,3 +38,5 @@ class SfxItemSet;
#define DLG_ENVELOP 2
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/pattern.hxx b/sw/source/ui/inc/pattern.hxx
index 2ee7cb079afd..d8bfd1a5e179 100644
--- a/sw/source/ui/inc/pattern.hxx
+++ b/sw/source/ui/inc/pattern.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/pgfnote.hxx b/sw/source/ui/inc/pgfnote.hxx
index 5f8c147bf374..a69d7b121aba 100644
--- a/sw/source/ui/inc/pgfnote.hxx
+++ b/sw/source/ui/inc/pgfnote.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,23 +30,16 @@
#include <sfx2/tabdlg.hxx>
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _GROUP_HXX //autogen
#include <vcl/group.hxx>
-#endif
#include <svtools/ctrlbox.hxx>
/*--------------------------------------------------------------------
Beschreibung: Fussnoteneinstellungs-TabPage
--------------------------------------------------------------------*/
-
class SwFootNotePage: public SfxTabPage
{
public:
@@ -91,3 +85,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/pggrid.hxx b/sw/source/ui/inc/pggrid.hxx
index 165f77be8302..974b48690465 100644
--- a/sw/source/ui/inc/pggrid.hxx
+++ b/sw/source/ui/inc/pggrid.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,17 +30,13 @@
#include <sfx2/tabdlg.hxx>
#include <colex.hxx>
-#ifndef _FIELD_HXX
#include <vcl/field.hxx>
-#endif
-#ifndef _FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
#include <svtools/ctrlbox.hxx>
+
/*--------------------------------------------------------------------
Description: TabPage Format/(Styles/)Page/Text grid
--------------------------------------------------------------------*/
-
class SwTextGridPage: public SfxTabPage
{
FixedLine aGridTypeFL;
@@ -54,12 +51,14 @@ class SwTextGridPage: public SfxTabPage
FixedText aLinesPerPageFT;
NumericField aLinesPerPageNF;
+ FixedText aLinesRangeFT;
FixedText aTextSizeFT;
MetricField aTextSizeMF;
FixedText aCharsPerLineFT;
NumericField aCharsPerLineNF;
+ FixedText aCharsRangeFT;
FixedText aCharWidthFT;
MetricField aCharWidthMF;
@@ -76,19 +75,22 @@ class SwTextGridPage: public SfxTabPage
FixedText aColorFT;
ColorListBox aColorLB;
- Window* aControls[18];
+ Window* aControls[20];
sal_Int32 m_nRubyUserValue;
sal_Bool m_bRubyUserValue;
Size m_aPageSize;
sal_Bool m_bVertical;
sal_Bool m_bSquaredMode;
+ sal_Bool m_bHRulerChanged;
+ sal_Bool m_bVRulerChanged;
SwTextGridPage(Window *pParent, const SfxItemSet &rSet);
~SwTextGridPage();
void UpdatePageSize(const SfxItemSet& rSet);
void PutGridItem(SfxItemSet& rSet);
+ void SetLinesOrCharsRanges(FixedText & rField, const sal_Int32 nValue );
DECL_LINK(GridTypeHdl, RadioButton*);
DECL_LINK(CharorLineChangedHdl, SpinField*);
@@ -111,3 +113,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/popbox.hxx b/sw/source/ui/inc/popbox.hxx
index bc9fa1855287..6377f43c81b4 100644
--- a/sw/source/ui/inc/popbox.hxx
+++ b/sw/source/ui/inc/popbox.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#define _POPBOX_HXX
-#ifndef _TOOLBOX_HXX
#include <vcl/toolbox.hxx>
-#endif
#include <svtools/transfer.hxx>
class SwNavigationPI;
@@ -65,3 +64,5 @@ inline void SwHelpToolBox::SetRightClickLink(const Link &rLink) {
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/prcntfld.hxx b/sw/source/ui/inc/prcntfld.hxx
index e36d330f22b5..7eb84042ddc0 100644
--- a/sw/source/ui/inc/prcntfld.hxx
+++ b/sw/source/ui/inc/prcntfld.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,9 +28,7 @@
#ifndef _PRCNTFLD_HXX
#define _PRCNTFLD_HXX
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
#include "swdllapi.h"
class SW_DLLPUBLIC PercentField : public MetricField
@@ -97,3 +96,4 @@ public:
#endif // _PRCNTFLD_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx
index 35146bcc1ae0..dfa0cb23316c 100644
--- a/sw/source/ui/inc/pview.hxx
+++ b/sw/source/ui/inc/pview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -170,11 +171,9 @@ public:
CreateAccessible();
};
-
/*--------------------------------------------------------------------
Beschreibung: Sicht auf ein Dokument
--------------------------------------------------------------------*/
-
class SW_DLLPUBLIC SwPagePreView: public SfxViewShell
{
// ViewWindow und Henkel zur Core
@@ -326,11 +325,11 @@ public:
};
// ----------------- inline Methoden ----------------------
-
-
inline void SwPagePreView::AdjustEditWin()
{
OuterResizePixel( Point(), GetFrameWindow()->GetOutputSizePixel() );
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/redlndlg.hxx b/sw/source/ui/inc/redlndlg.hxx
index 159e71628f46..f67aeb5a3291 100644
--- a/sw/source/ui/inc/redlndlg.hxx
+++ b/sw/source/ui/inc/redlndlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <redline.hxx>
#include <tools/datetime.hxx>
#include <vcl/msgbox.hxx>
-#ifndef _SVSTDARR_HXX
#include <svl/svstdarr.hxx>
-#endif
#include <svl/eitem.hxx>
#include <sfx2/basedlgs.hxx>
#include <sfx2/viewfrm.hxx>
@@ -145,10 +144,6 @@ public:
virtual void Resize();
};
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
class SwModelessRedlineAcceptDlg : public SfxModelessDialog
{
SwRedlineAcceptDlg* pImplDlg;
@@ -165,11 +160,6 @@ public:
void Initialize (SfxChildWinInfo* pInfo);
};
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
class SwRedlineAcceptChild : public SwChildWinWrapper
{
public:
@@ -187,3 +177,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx
index bcdb06393f6c..416684f3af9f 100644
--- a/sw/source/ui/inc/regionsw.hxx
+++ b/sw/source/ui/inc/regionsw.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,7 +52,6 @@
#include <svx/paraprev.hxx>
#include <editeng/lrspitem.hxx>
-
class SwWrtShell;
class EditRegionDlg;
@@ -64,7 +64,6 @@ namespace sfx2
/*************************************************************************
Dialog "Bereiche bearbeiten"
*************************************************************************/
-
class SectRepr;
typedef SectRepr* SectReprPtr;
SV_DECL_PTRARR_SORT( SectReprArr, SectReprPtr, 0, 4 )
@@ -107,7 +106,6 @@ class SwEditRegionDlg : public SfxModalDialog
PushButton aDismiss;
HelpButton aHelp;
ImageList aImageIL;
- ImageList aImageILH;
SwWrtShell& rSh;
SectReprArr aSectReprArr;
@@ -120,7 +118,7 @@ class SwEditRegionDlg : public SfxModalDialog
sal_Bool bWeb :1;
- Image BuildBitmap(sal_Bool bProtect,sal_Bool bHidden,sal_Bool bHighContrast);
+ Image BuildBitmap(sal_Bool bProtect,sal_Bool bHidden);
void RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry);
sal_uInt16 FindArrPos(const SwSectionFmt* pFmt);
@@ -156,13 +154,10 @@ public:
void SelectSection(const String& rSectionName);
};
+
/*************************************************************************
Dialog "Bereich einfuegen"
*************************************************************************/
-
-/* -----------------21.05.99 11:05-------------------
- *
- * --------------------------------------------------*/
class SwInsertSectionTabPage : public SfxTabPage
{
FixedLine aNameFL;
@@ -272,9 +267,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
};
-/* -----------------13.06.2003 09:51-----------------
- --------------------------------------------------*/
class SwSectionIndentTabPage : public SfxTabPage
{
FixedLine aIndentFL;
@@ -299,9 +292,6 @@ public:
void SetWrtShell(SwWrtShell& rSh);
};
-/* -----------------21.05.99 13:07-------------------
- *
- * --------------------------------------------------*/
class SwInsertSectionTabDialog : public SfxTabDialog
{
SwWrtShell& rWrtSh;
@@ -318,9 +308,6 @@ public:
SwSectionData * GetSectionData() { return m_pSectionData.get(); }
};
-/* -----------------21.05.99 13:07-------------------
- *
- * --------------------------------------------------*/
class SwSectionPropertyTabDialog : public SfxTabDialog
{
SwWrtShell& rWrtSh;
@@ -333,4 +320,4 @@ public:
#endif
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/rowht.hxx b/sw/source/ui/inc/rowht.hxx
index 6ad4e5f7ab19..0302fcefe4bb 100644
--- a/sw/source/ui/inc/rowht.hxx
+++ b/sw/source/ui/inc/rowht.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,22 +29,9 @@
#define _ROWHT_HXX
#include <svx/stddlg.hxx>
-
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
-
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-
-#ifndef _BUTTON_HXX //autogen
-#include <vcl/button.hxx>
-#endif
class SwWrtShell;
@@ -65,3 +53,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/scroll.hxx b/sw/source/ui/inc/scroll.hxx
index 49d023d17605..134ce9d284ad 100644
--- a/sw/source/ui/inc/scroll.hxx
+++ b/sw/source/ui/inc/scroll.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,9 +27,7 @@
************************************************************************/
#ifndef _SCROLL_HXX
#define _SCROLL_HXX
-#ifndef _SCRBAR_HXX //autogen
#include <vcl/scrbar.hxx>
-#endif
class SwScrollbar: public ScrollBar
{
@@ -69,3 +68,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/selglos.hxx b/sw/source/ui/inc/selglos.hxx
index 357600a31c0d..4ce626454d25 100644
--- a/sw/source/ui/inc/selglos.hxx
+++ b/sw/source/ui/inc/selglos.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,12 @@
#ifndef _SELGLOS_HXX
#define _SELGLOS_HXX
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
#include <vcl/fixed.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
class SwSelGlossaryDlg : public ModalDialog
{
@@ -72,3 +67,5 @@ inline void SwSelGlossaryDlg::SelectEntryPos(sal_uInt16 nIdx)
{ aGlosBox.SelectEntryPos(nIdx); }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/sharedconnection.hxx b/sw/source/ui/inc/sharedconnection.hxx
index cbb6f41d17ad..cf61e646b9cc 100644
--- a/sw/source/ui/inc/sharedconnection.hxx
+++ b/sw/source/ui/inc/sharedconnection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,3 +35,5 @@
typedef ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XConnection > SharedConnection;
#endif // SW_UI_SHARED_CONNECTION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/shdwcrsr.hxx b/sw/source/ui/inc/shdwcrsr.hxx
index 0652596b128c..7a6c85047dc0 100644
--- a/sw/source/ui/inc/shdwcrsr.hxx
+++ b/sw/source/ui/inc/shdwcrsr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/shells.hrc b/sw/source/ui/inc/shells.hrc
index 2058b6432ed8..569dba2a05ac 100644
--- a/sw/source/ui/inc/shells.hrc
+++ b/sw/source/ui/inc/shells.hrc
@@ -102,7 +102,9 @@
#define RID_MEDIA_TOOLBOX (RC_SHELLS_BEGIN + 61)
-#define SHELLS_ACT_END RID_MEDIA_TOOLBOX
+#define STR_SHELLNAME_NAVIGATION (RC_SHELLS_BEGIN + 62)
+
+#define SHELLS_ACT_END STR_SHELLNAME_NAVIGATION
#if SHELLS_ACT_END > RC_SHELLS_END
#error Resource-Id Ueberlauf in #file, #line
diff --git a/sw/source/ui/inc/split.hxx b/sw/source/ui/inc/split.hxx
index 6d515acf22b5..5d9dd5aa2178 100644
--- a/sw/source/ui/inc/split.hxx
+++ b/sw/source/ui/inc/split.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,21 +30,13 @@
#include <svx/stddlg.hxx>
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
-#ifndef _IMAGEBTN_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
class SwWrtShell;
@@ -74,3 +67,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/splittbl.hxx b/sw/source/ui/inc/splittbl.hxx
index 4bc4ec45f23b..7ce7c65e898e 100644
--- a/sw/source/ui/inc/splittbl.hxx
+++ b/sw/source/ui/inc/splittbl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/srcedtw.hxx b/sw/source/ui/inc/srcedtw.hxx
index 5b4aafddbcb8..9e9a74f900af 100644
--- a/sw/source/ui/inc/srcedtw.hxx
+++ b/sw/source/ui/inc/srcedtw.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,9 +33,7 @@
#include <unotools/options.hxx>
#include <vcl/timer.hxx>
-#ifndef _TABLE_HXX //autogen
#include <tools/table.hxx>
-#endif
#include <svtools/xtextedt.hxx>
class ScrollBar;
@@ -162,3 +161,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/srcview.hxx b/sw/source/ui/inc/srcview.hxx
index e6574f5bfdce..42fd797c9e74 100644
--- a/sw/source/ui/inc/srcview.hxx
+++ b/sw/source/ui/inc/srcview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,10 +39,6 @@ class SwDocShell;
class SvxSearchItem;
class SfxMedium;
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
class SwSrcView: public SfxViewShell
{
SwSrcEditWindow aEditWin;
@@ -101,26 +98,6 @@ public:
};
-
#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/srtdlg.hxx b/sw/source/ui/inc/srtdlg.hxx
index 25840e7ae2c0..3f17aff5d01a 100644
--- a/sw/source/ui/inc/srtdlg.hxx
+++ b/sw/source/ui/inc/srtdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,18 +28,10 @@
#ifndef _SRTDLG_HXX
#define _SRTDLG_HXX
-#ifndef _FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef _BUTTON_HXX
#include <vcl/button.hxx>
-#endif
-#ifndef _FIELD_HXX
#include <vcl/field.hxx>
-#endif
-#ifndef _LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
#include <svx/stddlg.hxx>
#include <svx/langbox.hxx>
@@ -116,3 +109,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/stmenu.hxx b/sw/source/ui/inc/stmenu.hxx
index a761d60a12ed..f72de63e0c81 100644
--- a/sw/source/ui/inc/stmenu.hxx
+++ b/sw/source/ui/inc/stmenu.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,16 +31,12 @@
#ifndef _STMENU_HXX
#define _STMENU_HXX
-#ifndef _MENU_HXX //autogen
#include <vcl/menu.hxx>
-#endif
#include <vector>
#include <com/sun/star/smarttags/XSmartTagAction.hpp>
-#ifndef _COM_SUN_STAR_SMARTTAGS_XSTRINGKEYMAP_HPP_
#include <com/sun/star/container/XStringKeyMap.hpp>
-#endif
#include <com/sun/star/text/XTextRange.hpp>
class SwView;
@@ -83,3 +80,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swcont.hxx b/sw/source/ui/inc/swcont.hxx
index 4c906ee8eacb..0472ed3bc470 100644
--- a/sw/source/ui/inc/swcont.hxx
+++ b/sw/source/ui/inc/swcont.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -111,3 +112,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx
index 25a0871c9944..de826236705c 100644
--- a/sw/source/ui/inc/swdtflvr.hxx
+++ b/sw/source/ui/inc/swdtflvr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -220,3 +221,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx
index 7bc40b394013..7b8a958006b5 100644
--- a/sw/source/ui/inc/swlbox.hxx
+++ b/sw/source/ui/inc/swlbox.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,13 +30,9 @@
#include <svl/svarray.hxx>
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _COMBOBOX_HXX //autogen
#include <vcl/combobox.hxx>
-#endif
#include "swdllapi.h"
class SwBoxEntry;
@@ -46,7 +43,6 @@ SV_DECL_PTRARR_DEL(SwEntryLst, SwBoxEntry*, 10, 10)
/*--------------------------------------------------------------------
Beschreibung: SwBoxEntry
--------------------------------------------------------------------*/
-
class SW_DLLPUBLIC SwBoxEntry
{
friend class SwComboBox;
@@ -68,8 +64,8 @@ public:
/*--------------------------------------------------------------------
Beschreibung: fuer ComboBoxen
--------------------------------------------------------------------*/
-
typedef sal_uInt16 SwComboBoxStyle;
+
namespace nsSwComboBoxStyle
{
const SwComboBoxStyle CBS_UPPER = 0x01;
@@ -122,3 +118,5 @@ public:
};
#endif /* _SWLBOX_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
index 90bc788e3c54..2e983566c6f2 100644
--- a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
+++ b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swrenamexnameddlg.hxx b/sw/source/ui/inc/swrenamexnameddlg.hxx
index d15c90935c85..de02fa8b06fc 100644
--- a/sw/source/ui/inc/swrenamexnameddlg.hxx
+++ b/sw/source/ui/inc/swrenamexnameddlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <vcl/dialog.hxx>
#include <vcl/fixed.hxx>
#include <vcl/edit.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <actctrl.hxx>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/text/XTextCursor.hpp>
@@ -43,11 +42,6 @@
#include <tools/resary.hxx>
#include <swunodef.hxx>
-
-
-/* -----------------09.06.99 14:36-------------------
- *
- * --------------------------------------------------*/
class SwRenameXNamedDlg : public ModalDialog
{
FixedLine aNameFL;
@@ -85,3 +79,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swtablerep.hxx b/sw/source/ui/inc/swtablerep.hxx
index e874c78aa624..d0b341456cb0 100644
--- a/sw/source/ui/inc/swtablerep.hxx
+++ b/sw/source/ui/inc/swtablerep.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,3 +93,4 @@ public:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swuiccoll.hxx b/sw/source/ui/inc/swuiccoll.hxx
index 1ed54fafe629..b665a068828e 100644
--- a/sw/source/ui/inc/swuiccoll.hxx
+++ b/sw/source/ui/inc/swuiccoll.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx
index a47bcb5a5e3a..63298235243f 100644
--- a/sw/source/ui/inc/swuicnttab.hxx
+++ b/sw/source/ui/inc/swuicnttab.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,35 +28,26 @@
#ifndef _SWUI_CNTTAB_HXX
#define _SWUI_CNTTAB_HXX
-#include <svx/stddlg.hxx>
+#include <boost/ptr_container/ptr_vector.hpp>
-#ifndef _BUTTON_HXX //autogen
+#include <tools/resary.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <svtools/svtreebx.hxx>
+#include <svx/checklbx.hxx>
+#include <svx/langbox.hxx>
+#include <svx/stddlg.hxx>
#include <vcl/button.hxx>
-#endif
-
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
-
-#ifndef _FIXED_HXX //autogen
-#include <vcl/fixed.hxx>
-#endif
-
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
+#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
-#include <sfx2/tabdlg.hxx>
-
-#include "tox.hxx"
-#include <tools/list.hxx>
-#include <toxmgr.hxx>
-#include <svx/checklbx.hxx>
-#include <tools/resary.hxx>
-#include <svtools/svtreebx.hxx>
#include <vcl/menubtn.hxx>
-#include <svx/langbox.hxx>
+
#include <cnttab.hxx>
+#include <toxmgr.hxx>
+
+#include "tox.hxx"
+
class SwWrtShell;
class SwTOXMgr;
namespace com{namespace sun{namespace star{
@@ -65,15 +57,14 @@ namespace com{namespace sun{namespace star{
}
}}}
-//-----------------------------------------------------------------------------
struct SwIndexSections_Impl
{
com::sun::star::uno::Reference< com::sun::star::text::XTextSection > xContainerSection;
com::sun::star::uno::Reference< com::sun::star::text::XDocumentIndex > xDocumentIndex;
};
-//-----------------------------------------------------------------------------
class SwOneExampleFrame;
+
struct SwIndexSections_Impl;
class SwMultiTOXTabDialog : public SfxTabDialog
@@ -136,9 +127,7 @@ public:
static sal_Bool IsNoNum(SwWrtShell& rSh, const String& rName);
};
-/* -----------------14.07.99 12:17-------------------
- --------------------------------------------------*/
class IndexEntryRessource;
class IndexEntrySupplierWrapper;
@@ -160,7 +149,6 @@ class SwTOXSelectTabPage : public SfxTabPage
//content
FixedLine aCreateFromFL; // content, user, illustration
CheckBox aFromHeadingsCB;
-// PushButton aChapterDlgPB; //#outline level,removed by zhaojianwei
CheckBox aAddStylesCB;
PushButton aAddStylesPB;
Point aAddStylesPosDef;
@@ -233,7 +221,6 @@ class SwTOXSelectTabPage : public SfxTabPage
DECL_LINK(TOXTypeHdl, ListBox* );
DECL_LINK(TOXAreaHdl, ListBox* );
-// DECL_LINK(ChapterHdl, PushButton* ); //#outline level,removed by zhaojianwei
DECL_LINK(AddStylesHdl, PushButton* );
DECL_LINK(MenuEnableHdl, Menu*);
DECL_LINK(MenuExecuteHdl, Menu*);
@@ -265,11 +252,6 @@ public:
void SelectType(TOXTypes eSet); //preset TOXType, GlobalDoc
void SetWrtShell(SwWrtShell& rSh);
};
-/* -----------------16.06.99 08:33-------------------
-
- --------------------------------------------------*/
-
-DECLARE_LIST(TOXControlList, Control*)
class SwTOXEdit;
class SwTOXButton;
@@ -277,6 +259,12 @@ class SwTOXEntryTabPage;
class SwTokenWindow : public Window
{
+ typedef boost::ptr_vector<Control> TOXControlList;
+ typedef TOXControlList::iterator ctrl_iterator;
+ typedef TOXControlList::const_iterator ctrl_const_iterator;
+ typedef TOXControlList::reverse_iterator ctrl_reverse_iterator;
+ typedef TOXControlList::const_reverse_iterator ctrl_const_reverse_iterator;
+
ImageButton aLeftScrollWin;
Window aCtrlParentWin;
ImageButton aRightScrollWin;
@@ -342,10 +330,9 @@ public:
virtual void Resize();
virtual void GetFocus();
};
-/* -----------------------------23.12.99 14:16--------------------------------
- ---------------------------------------------------------------------------*/
class SwTOXEntryTabPage;
+
class SwIdxTreeListBox : public SvTreeListBox
{
SwTOXEntryTabPage* pParent;
@@ -355,9 +342,6 @@ public:
SwIdxTreeListBox(SwTOXEntryTabPage* pPar, const ResId& rResId);
};
-/* -----------------16.06.99 12:49-------------------
-
- --------------------------------------------------*/
class SwTOXEntryTabPage : public SfxTabPage
{
FixedText aLevelFT;
@@ -487,9 +471,7 @@ public:
void PreTokenButtonRemoved(const SwFormToken& rToken);
};
-/* -----------------05.07.99 13:00-------------------
- --------------------------------------------------*/
class SwTOXStylesTabPage : public SfxTabPage
{
FixedLine aFormatFL;
@@ -502,7 +484,6 @@ class SwTOXStylesTabPage : public SfxTabPage
PushButton aEditStyleBT;
SwForm* m_pCurrentForm;
-// void UpdatePattern();
DECL_LINK( EditStyleHdl, Button *);
DECL_LINK( StdHdl, Button * );
@@ -537,3 +518,4 @@ public:
#endif // _SWUI_CNTTAB_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swuiidxmrk.hxx b/sw/source/ui/inc/swuiidxmrk.hxx
index ad3adcce78ca..098010ad7134 100644
--- a/sw/source/ui/inc/swuiidxmrk.hxx
+++ b/sw/source/ui/inc/swuiidxmrk.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,30 +31,18 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <sfx2/basedlgs.hxx>
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
#include <vcl/lstbox.hxx>
-#ifndef _COMBOBOX_HXX //autogen
#include <vcl/combobox.hxx>
-#endif
#include <svx/stddlg.hxx>
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
-#ifndef _GROUP_HXX //autogen
#include <vcl/group.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _IMAGEBTN_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <sfx2/childwin.hxx>
#include "toxe.hxx"
#include <svtools/stdctrl.hxx>
@@ -67,6 +56,7 @@ class SwTOXMark;
--------------------------------------------------------------------*/
class SwIndexMarkFloatDlg;
class SwIndexMarkModalDlg;
+
class SwIndexMarkDlg : public Window
{
friend class SwIndexMarkFloatDlg;
@@ -173,9 +163,7 @@ public:
sal_Bool IsTOXType(const String& rName)
{return LISTBOX_ENTRY_NOTFOUND != aTypeDCB.GetEntryPos(rName);}
};
-/* -----------------06.10.99 10:11-------------------
- --------------------------------------------------*/
class SwIndexMarkFloatDlg : public SfxModelessDialog
{
SwIndexMarkDlg aDlg;
@@ -188,9 +176,7 @@ class SwIndexMarkFloatDlg : public SfxModelessDialog
sal_Bool bNew=sal_True);
void ReInitDlg(SwWrtShell& rWrtShell);
};
-/* -----------------06.10.99 10:33-------------------
- --------------------------------------------------*/
class SwIndexMarkModalDlg : public SvxStandardDialog
{
SwIndexMarkDlg aDlg;
@@ -201,10 +187,8 @@ public:
void ReInitDlg(SwWrtShell& rWrtShell);
};
-/* -----------------15.09.99 08:39-------------------
-
- --------------------------------------------------*/
class SwAuthMarkModalDlg;
+
class SwAuthMarkDlg : public Window
{
static sal_Bool bIsFromComponent;
@@ -262,9 +246,7 @@ public:
void ReInitDlg(SwWrtShell& rWrtShell);
};
-/* -----------------06.10.99 10:11-------------------
- --------------------------------------------------*/
class SwAuthMarkFloatDlg : public SfxModelessDialog
{
SwAuthMarkDlg aDlg;
@@ -277,9 +259,7 @@ class SwAuthMarkFloatDlg : public SfxModelessDialog
sal_Bool bNew=sal_True);
void ReInitDlg(SwWrtShell& rWrtShell);
};
-/* -----------------06.10.99 10:33-------------------
- --------------------------------------------------*/
class SwAuthMarkModalDlg : public SvxStandardDialog
{
SwAuthMarkDlg aDlg;
@@ -290,6 +270,6 @@ public:
void ReInitDlg(SwWrtShell& rWrtShell);
};
-
#endif // _SWUI_IDXMRK_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swuipardlg.hxx b/sw/source/ui/inc/swuipardlg.hxx
index 74f798d7d6ca..62ea87544fd5 100644
--- a/sw/source/ui/inc/swuipardlg.hxx
+++ b/sw/source/ui/inc/swuipardlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,3 +50,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swvset.hxx b/sw/source/ui/inc/swvset.hxx
index 4e6b2a46f856..d8253b3c3b52 100644
--- a/sw/source/ui/inc/swvset.hxx
+++ b/sw/source/ui/inc/swvset.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,7 +27,6 @@
************************************************************************/
#ifndef _SWVSET_HXX
#define _SWVSET_HXX
-#include <tools/list.hxx>
#include <svx/numvset.hxx>
class SwRulerValueSet : public SvxBmpNumValueSet
@@ -39,3 +39,4 @@ class SwRulerValueSet : public SvxBmpNumValueSet
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swwrtshitem.hxx b/sw/source/ui/inc/swwrtshitem.hxx
index 661cedfc2502..f8e272702e45 100644
--- a/sw/source/ui/inc/swwrtshitem.hxx
+++ b/sw/source/ui/inc/swwrtshitem.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/syncbtn.hxx b/sw/source/ui/inc/syncbtn.hxx
index 5022881a4854..c176dc13cb6d 100644
--- a/sw/source/ui/inc/syncbtn.hxx
+++ b/sw/source/ui/inc/syncbtn.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,13 +32,7 @@
#ifdef _SYNCDLG
#include <sfx2/basedlgs.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
class SwSyncBtnDlg : public SfxFloatingWindow
{
@@ -51,10 +46,6 @@ public:
};
#endif
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
class SwSyncChildWin : public SfxChildWindow
{
public:
@@ -69,3 +60,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/tabledlg.hxx b/sw/source/ui/inc/tabledlg.hxx
index 9f1553a2ccd0..572637109aa6 100644
--- a/sw/source/ui/inc/tabledlg.hxx
+++ b/sw/source/ui/inc/tabledlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/tablemgr.hxx b/sw/source/ui/inc/tablemgr.hxx
index 844f76833cbc..b8035c681327 100644
--- a/sw/source/ui/inc/tablemgr.hxx
+++ b/sw/source/ui/inc/tablemgr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,5 @@ inline SwTableFUNC::SwTableFUNC(SwFrmFmt &rFmt) :
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/tabsh.hxx b/sw/source/ui/inc/tabsh.hxx
index a1e5c37dcc27..49c8a06558a7 100644
--- a/sw/source/ui/inc/tabsh.hxx
+++ b/sw/source/ui/inc/tabsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,7 @@ class SwWrtShell;
SW_DLLPUBLIC void ItemSetToTableParam( const SfxItemSet& rSet, SwWrtShell &rSh );
-extern const sal_uInt16 __FAR_DATA aUITableAttrRange[];
+extern const sal_uInt16 aUITableAttrRange[];
SW_DLLPUBLIC const sal_uInt16* SwuiGetUITableAttrRange();
class SwTableShell: public SwBaseShell
@@ -56,3 +57,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/tautofmt.hxx b/sw/source/ui/inc/tautofmt.hxx
index bf581291c12e..5ba02135aa62 100644
--- a/sw/source/ui/inc/tautofmt.hxx
+++ b/sw/source/ui/inc/tautofmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,25 +29,15 @@
#define SW_TAUTOFMT_HXX
#include <sfx2/basedlgs.hxx>
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _MOREBTN_HXX //autogen
#include <vcl/morebtn.hxx>
-#endif
-#ifndef _VIRDEV_HXX //autogen
#include <vcl/virdev.hxx>
-#endif
class SwTableAutoFmt;
class AutoFmtPreview;
@@ -116,3 +107,4 @@ public:
#endif // SW_AUTOFMT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/tblctrl.hxx b/sw/source/ui/inc/tblctrl.hxx
index d96b85f21208..4616174ac0f3 100644
--- a/sw/source/ui/inc/tblctrl.hxx
+++ b/sw/source/ui/inc/tblctrl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/tblnumfm.hxx b/sw/source/ui/inc/tblnumfm.hxx
index b6118f3943fe..ca93e3a0ec07 100644
--- a/sw/source/ui/inc/tblnumfm.hxx
+++ b/sw/source/ui/inc/tblnumfm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/tbxanchr.hxx b/sw/source/ui/inc/tbxanchr.hxx
index 9edc1e22fbe2..c27dbcc88b14 100644
--- a/sw/source/ui/inc/tbxanchr.hxx
+++ b/sw/source/ui/inc/tbxanchr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/textcontrolcombo.hxx b/sw/source/ui/inc/textcontrolcombo.hxx
index 08209cd70403..d730a4d701b6 100644
--- a/sw/source/ui/inc/textcontrolcombo.hxx
+++ b/sw/source/ui/inc/textcontrolcombo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef _TEXTCONTROLCOMBO_HXX
#define _TEXTCONTROLCOMBO_HXX
-#ifndef _FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
#include <vcl/field.hxx>
#include "swdllapi.h"
@@ -64,3 +63,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/textsh.hxx b/sw/source/ui/inc/textsh.hxx
index 5e3358c2b20a..9571e6645580 100644
--- a/sw/source/ui/inc/textsh.hxx
+++ b/sw/source/ui/inc/textsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,10 +48,6 @@ public:
SFX_DECL_INTERFACE(SW_TEXTSHELL)
TYPEINFO();
-//CHINA001 DECL_LINK( PostItNextHdl, Button * );
-//CHINA001 DECL_LINK( PostItPrevHdl, Button * );
-//CHINA001 DECL_LINK( RedlineNextHdl, Button * );
-//CHINA001 DECL_LINK( RedlinePrevHdl, Button * );
DECL_LINK( RedlineNextHdl, AbstractSvxPostItDialog * );
DECL_LINK( RedlinePrevHdl, AbstractSvxPostItDialog * );
@@ -88,3 +85,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/titlepage.hxx b/sw/source/ui/inc/titlepage.hxx
new file mode 100644
index 000000000000..5f102e008201
--- /dev/null
+++ b/sw/source/ui/inc/titlepage.hxx
@@ -0,0 +1,102 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Caolán McNamara <caolanm@redhat.com> (Red Hat, Inc.)
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Caolán McNamara <caolanm@redhat.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef _SWTITLEPAGE_HXX
+#define _SWTITLEPAGE_HXX
+
+#include <sfx2/basedlgs.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/field.hxx>
+#include <vcl/lstbox.hxx>
+#include <numberingtypelistbox.hxx>
+
+class Window;
+class SfxItemSet;
+class SwView;
+class SwWrtShell;
+class SwPageDesc;
+
+class SwTitlePageDlg : public SfxModalDialog
+{
+private:
+ FixedLine aMakeInsertFL;
+ RadioButton aUseExistingPagesRB;
+ RadioButton aInsertNewPagesRB;
+ FixedText aPageCountFT;
+ NumericField aPageCountNF;
+ FixedText aPagePagesFT;
+
+ FixedText aPageStartFT;
+ RadioButton aDocumentStartRB;
+ RadioButton aPageStartRB;
+ NumericField aPageStartNF;
+
+ FixedLine aNumberingFL;
+ CheckBox aRestartNumberingCB;
+ FixedText aRestartNumberingFT;
+ NumericField aRestartNumberingNF;
+ CheckBox aSetPageNumberCB;
+ FixedText aSetPageNumberFT;
+ NumericField aSetPageNumberNF;
+
+ FixedLine aPagePropertiesFL;
+ ListBox aPagePropertiesLB;
+ PushButton aPagePropertiesPB;
+
+ FixedLine aBottomFL;
+ OKButton aOkPB;
+ CancelButton aCancelPB;
+ HelpButton aHelpPB;
+
+ SwWrtShell *mpSh;
+
+ const SwFmtPageDesc *mpPageFmtDesc;
+
+ SwPageDesc *mpTitleDesc;
+ const SwPageDesc *mpIndexDesc;
+ const SwPageDesc *mpNormalDesc;
+
+ void FillList();
+
+ sal_uInt16 GetInsertPosition() const;
+
+ DECL_LINK( OKHdl, Button * );
+ DECL_LINK( EditHdl, Button * );
+ DECL_LINK( RestartNumberingHdl, CheckBox* );
+ DECL_LINK( SetPageNumberHdl, CheckBox* );
+ DECL_LINK( UpHdl, NumericField * );
+ DECL_LINK( DownHdl, NumericField * );
+ DECL_LINK( StartPageHdl, RadioButton * );
+public:
+ SwTitlePageDlg( Window *pParent );
+ ~SwTitlePageDlg();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/tmpdlg.hxx b/sw/source/ui/inc/tmpdlg.hxx
index f3feddfc89ed..cc2a9c18d441 100644
--- a/sw/source/ui/inc/tmpdlg.hxx
+++ b/sw/source/ui/inc/tmpdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,6 @@ class SwWrtShell;
/*--------------------------------------------------------------------
Beschreibung: Der Tabdialog Traeger der TabPages
--------------------------------------------------------------------*/
-
class SwTemplateDlg: public SfxStyleDialog
{
@@ -61,6 +61,6 @@ public:
virtual short Ok();
};
-
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/tmplctrl.hxx b/sw/source/ui/inc/tmplctrl.hxx
index 1c684d6c599a..f0579d0ec96c 100644
--- a/sw/source/ui/inc/tmplctrl.hxx
+++ b/sw/source/ui/inc/tmplctrl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,13 +29,10 @@
#define _TMPLCTRL_HXX
// include ---------------------------------------------------------------
-
#include <sfx2/stbitem.hxx>
#include <tools/string.hxx>
-
// class BookmarkToolBoxControl -------------------------------------------
-
class SwTemplateControl : public SfxStatusBarControl
{
protected:
@@ -53,6 +51,6 @@ private:
String sTemplate;
};
-
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/toxmgr.hxx b/sw/source/ui/inc/toxmgr.hxx
index a1cc17d4c470..d80bcf05b577 100644
--- a/sw/source/ui/inc/toxmgr.hxx
+++ b/sw/source/ui/inc/toxmgr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,6 @@ class SwForm;
Beschreibung: Manager fuer Verzeichnisfunktionalitaet
--------------------------------------------------------------------*/
//one single method will be sufficient to insert AND upate indexes
-
class SW_DLLPUBLIC SwTOXDescription
{
TOXTypes eTOXType;
@@ -183,7 +183,7 @@ public:
void ApplyTo(SwTOXBase& rTOXBase);
};
-// --------------------------------------------------------------------------------
+
class SwTOXMarkDescription
{
TOXTypes eTOXType;
@@ -309,16 +309,15 @@ public:
};
-
/*--------------------------------------------------------------------
Beschreibung: Inlines
--------------------------------------------------------------------*/
-
inline sal_uInt16 SwTOXMgr::GetTOXMarkCount()
{ return aCurMarks.Count(); }
-
inline SwTOXMark* SwTOXMgr::GetCurTOXMark()
{ return pCurTOXMark; }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/uiborder.hxx b/sw/source/ui/inc/uiborder.hxx
index 573bef720d49..b734427f0124 100644
--- a/sw/source/ui/inc/uiborder.hxx
+++ b/sw/source/ui/inc/uiborder.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/uiitems.hxx b/sw/source/ui/inc/uiitems.hxx
index 55155e35fe59..f33a2b01418b 100644
--- a/sw/source/ui/inc/uiitems.hxx
+++ b/sw/source/ui/inc/uiitems.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,16 +57,14 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
SwPageFtnInfo& GetPageFtnInfo() { return aFtnInfo; }
const SwPageFtnInfo& GetPageFtnInfo() const { return aFtnInfo; }
void SetPageFtnInfo(SwPageFtnInfo& rInf) { aFtnInfo = rInf; }
};
-/*******************************************************************/
-
class SW_DLLPUBLIC SwPtrItem : public SfxPoolItem
{
void* pMisc;
@@ -81,8 +80,6 @@ public:
void* GetValue() const { return pMisc; }
};
-/*******************************************************************/
-
class SW_DLLPUBLIC SwUINumRuleItem : public SfxPoolItem
{
SwNumRule* pRule;
@@ -95,16 +92,13 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
const SwNumRule* GetNumRule() const { return pRule; }
SwNumRule* GetNumRule() { return pRule; }
};
-/* -----------------17.06.98 17:40-------------------
- *
- * --------------------------------------------------*/
class SwBackgroundDestinationItem : public SfxUInt16Item
{
public:
@@ -114,3 +108,5 @@ public:
};
#endif // _UIITEMS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/uinums.hxx b/sw/source/ui/inc/uinums.hxx
index 1fe7e6e5f82e..b748eafe4a04 100644
--- a/sw/source/ui/inc/uinums.hxx
+++ b/sw/source/ui/inc/uinums.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,6 @@ class SvStream;
typedef SfxPoolItem* SfxPoolItemPtr;
SV_DECL_PTRARR_DEL( _SwNumFmtsAttrs, SfxPoolItemPtr, 5,0 )
-//------------------------------------------------------------------------
class SW_DLLPUBLIC SwNumRulesWithName
{
String aName;
@@ -83,9 +83,7 @@ public:
void Store( SvStream& );
};
-/********************************************************************
-********************************************************************/
class SwBaseNumRules
{
public:
@@ -112,9 +110,6 @@ public:
};
-/********************************************************************
-
-********************************************************************/
class SwChapterNumRules : public SwBaseNumRules
{
@@ -129,8 +124,10 @@ public:
// INLINE METHODE --------------------------------------------------------
inline const SwNumRulesWithName *SwBaseNumRules::GetRules(sal_uInt16 nIdx) const
{
- ASSERT(nIdx < nMaxRules, Array der NumRules ueberindiziert.);
+ OSL_ENSURE(nIdx < nMaxRules, "Array der NumRules ueberindiziert.");
return pNumRules[nIdx];
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/uitool.hxx b/sw/source/ui/inc/uitool.hxx
index 07d9054438c7..374c00780300 100644
--- a/sw/source/ui/inc/uitool.hxx
+++ b/sw/source/ui/inc/uitool.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,6 +74,9 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet );
SW_DLLPUBLIC FieldUnit GetDfltMetric(sal_Bool bWeb);
void SetDfltMetric(FieldUnit eMetric, sal_Bool bWeb);
+SW_DLLPUBLIC sal_Bool HasCharUnit( sal_Bool bWeb );
+void SetApplyCharUnit(sal_Bool bApplyChar, sal_Bool bWeb);
+
// ListBox mit allen Zeichenvorlagen fuellen - ausser Standard!
SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, sal_Bool bSorted = sal_False, sal_Bool bWithDefault = sal_False);
@@ -90,3 +94,5 @@ String GetAppLangDateTimeString( const DateTime& );
bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 nId );
#endif // _UITOOL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/uivwimp.hxx b/sw/source/ui/inc/uivwimp.hxx
index 1e68678cdb72..4c349a047c67 100644
--- a/sw/source/ui/inc/uivwimp.hxx
+++ b/sw/source/ui/inc/uivwimp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,9 +53,6 @@ namespace com{ namespace sun{ namespace star {
}
}}}
-/* -----------------------------29.05.00 08:22--------------------------------
-
- ---------------------------------------------------------------------------*/
class SwScannerEventListener : public ::cppu::WeakImplHelper1<
STAR_NMSPC::lang::XEventListener >
{
@@ -73,7 +71,6 @@ public:
};
// --------------------------- Clipboard EventListener ------------------
-
class SwClipboardChangeListener : public ::cppu::WeakImplHelper1<
CLIP_NMSPC::XClipboardListener >
{
@@ -96,11 +93,8 @@ public:
void AddRemoveListener( sal_Bool bAdd );
};
-
-/* ---------------------------------------------------------------------------
-
- ---------------------------------------------------------------------------*/
class SwMailMergeConfigItem;
+
class SwView_Impl
{
STAR_REFERENCE( lang::XEventListener ) xScanEvtLstnr;
@@ -186,3 +180,4 @@ public:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/unodispatch.hxx b/sw/source/ui/inc/unodispatch.hxx
index 884d647725e5..039769abda5f 100644
--- a/sw/source/ui/inc/unodispatch.hxx
+++ b/sw/source/ui/inc/unodispatch.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,13 +36,10 @@
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase3.hxx>
#include <list>
-//#ifndef _OSL_MUTEX_HXX_
-//#include <osl/mutex.hxx>
-//#endif
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
class SwView;
-//---------------------------------------------------------------------------------------------------------------------
+
class SwXDispatchProviderInterceptor : public cppu::WeakImplHelper3
<
::com::sun::star::frame::XDispatchProviderInterceptor,
@@ -52,7 +50,7 @@ class SwXDispatchProviderInterceptor : public cppu::WeakImplHelper3
class DispatchMutexLock_Impl
{
//::osl::MutexGuard aGuard; #102295# solar mutex has to be used currently
- vos::OGuard aGuard;
+ osl::SolarGuard aGuard;
DispatchMutexLock_Impl();
public:
DispatchMutexLock_Impl(SwXDispatchProviderInterceptor&);
@@ -132,3 +130,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/unotools.hxx b/sw/source/ui/inc/unotools.hxx
index 4a94628a03ad..aa710f182a6f 100644
--- a/sw/source/ui/inc/unotools.hxx
+++ b/sw/source/ui/inc/unotools.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <vcl/dialog.hxx>
#include <vcl/fixed.hxx>
#include <vcl/edit.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <actctrl.hxx>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/text/XTextCursor.hpp>
@@ -44,10 +43,8 @@
#include <swunodef.hxx>
#include "swdllapi.h"
-/* -----------------------------15.12.99 09:55--------------------------------
-
- ---------------------------------------------------------------------------*/
class SwOneExampleFrame;
+
class SwFrmCtrlWindow : public Window
{
SwOneExampleFrame* pExampleFrame;
@@ -56,9 +53,7 @@ public:
virtual void Command( const CommandEvent& rCEvt );
};
-/* -----------------------------15.12.99 12:56--------------------------------
- ---------------------------------------------------------------------------*/
class MenuResource : public Resource
{
ResStringArray aMenuArray;
@@ -68,9 +63,7 @@ public:
ResStringArray& GetMenuArray() {return aMenuArray;}
};
-/* -----------------27.07.99 15:20-------------------
- --------------------------------------------------*/
#define EX_SHOW_ONLINE_LAYOUT 0x001
// hard zoom value
@@ -79,6 +72,7 @@ public:
#define EX_SHOW_DEFAULT_PAGE 0x04
class SwView;
+
class SW_DLLPUBLIC SwOneExampleFrame
{
::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > _xControl;
@@ -133,3 +127,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx
index 8a0d2b2662af..0e11b99e946a 100644
--- a/sw/source/ui/inc/unotxvw.hxx
+++ b/sw/source/ui/inc/unotxvw.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,9 +58,6 @@ class SwView;
typedef ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener > * XSelectionChangeListenerPtr;
SV_DECL_PTRARR_DEL( SelectionChangeListenerArr, XSelectionChangeListenerPtr, 4, 4 )
-/******************************************************************************
- *
- ******************************************************************************/
class SwXTextView :
public ::com::sun::star::view::XSelectionSupplier,
public ::com::sun::star::lang::XServiceInfo,
@@ -159,10 +157,6 @@ public:
SfxObjectShellLock BuildTmpSelectionDoc();
};
-/* -----------------17.09.98 12:52-------------------
- *
- * --------------------------------------------------*/
-
typedef cppu::WeakImplHelper8<
::com::sun::star::text::XTextViewCursor,
::com::sun::star::lang::XServiceInfo,
@@ -269,6 +263,7 @@ public:
virtual const SwDoc* GetDoc() const;
virtual SwDoc* GetDoc();
};
-#endif
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/usrpref.hxx b/sw/source/ui/inc/usrpref.hxx
index d9abd8193c2b..fbf1971fe959 100644
--- a/sw/source/ui/inc/usrpref.hxx
+++ b/sw/source/ui/inc/usrpref.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,10 +35,8 @@
#include "viewopt.hxx"
#include <tools/fldunit.hxx>
-/* -----------------------------28.09.00 09:45--------------------------------
-
- ---------------------------------------------------------------------------*/
class SwMasterUsrPref;
+
class SwContentViewConfig : public utl::ConfigItem
{
SwMasterUsrPref& rParent;
@@ -55,9 +54,7 @@ class SwContentViewConfig : public utl::ConfigItem
void Load();
void SetModified(){ConfigItem::SetModified();}
};
-/* -----------------------------28.09.00 09:45--------------------------------
- ---------------------------------------------------------------------------*/
class SwLayoutViewConfig : public utl::ConfigItem
{
SwMasterUsrPref& rParent;
@@ -73,9 +70,7 @@ class SwLayoutViewConfig : public utl::ConfigItem
void Load();
void SetModified(){ConfigItem::SetModified();}
};
-/* -----------------------------19.01.01 13:06--------------------------------
- ---------------------------------------------------------------------------*/
class SwGridConfig : public utl::ConfigItem
{
SwMasterUsrPref& rParent;
@@ -91,9 +86,7 @@ class SwGridConfig : public utl::ConfigItem
void Load();
void SetModified(){ConfigItem::SetModified();}
};
-/* -----------------------------19.01.01 13:06--------------------------------
- ---------------------------------------------------------------------------*/
class SwCursorConfig : public utl::ConfigItem
{
SwMasterUsrPref& rParent;
@@ -108,9 +101,7 @@ class SwCursorConfig : public utl::ConfigItem
void Load();
void SetModified(){ConfigItem::SetModified();}
};
-/* -----------------------------28.09.00 09:45--------------------------------
- ---------------------------------------------------------------------------*/
class SwWebColorConfig : public utl::ConfigItem
{
SwMasterUsrPref& rParent;
@@ -125,9 +116,7 @@ class SwWebColorConfig : public utl::ConfigItem
void Load();
void SetModified(){ConfigItem::SetModified();}
};
-/* -----------------------------28.09.00 09:45--------------------------------
- ---------------------------------------------------------------------------*/
class SwMasterUsrPref : public SwViewOption
{
friend class SwContentViewConfig;
@@ -155,6 +144,7 @@ class SwMasterUsrPref : public SwViewOption
SwCursorConfig aCursorConfig;
SwWebColorConfig* pWebColorConfig;
+ sal_Bool bApplyCharUnit; // apply_char_unit
public:
SwMasterUsrPref(sal_Bool bWeb);
~SwMasterUsrPref();
@@ -256,6 +246,17 @@ public:
aLayoutConfig.SetModified();
}
+ sal_Bool IsApplyCharUnit() const
+ {
+ return bApplyCharUnit;
+ }
+ void SetApplyCharUnit(sal_Bool bSet, sal_Bool bNoModify = sal_False)
+ {
+ bApplyCharUnit = bSet;
+ if(!bNoModify)
+ aLayoutConfig.SetModified();
+ }
+
sal_Int32 GetDefTab() const { return nDefTab;}
void SetDefTab( sal_Int32 nSet, sal_Bool bNoModify = sal_False )
{
@@ -284,3 +285,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/utlui.hrc b/sw/source/ui/inc/utlui.hrc
index aa7dab24054a..41655ce860c0 100644
--- a/sw/source/ui/inc/utlui.hrc
+++ b/sw/source/ui/inc/utlui.hrc
@@ -154,15 +154,7 @@
#define DLG_GLOSSARY_DECIDE_DLG (RC_UTLUI_BEGIN + 3)
#define IMG_NAVI_ENTRYBMP (RC_UTLUI_BEGIN + 4)
-#define IMG_NAVI_ENTRYBMPH (RC_UTLUI_BEGIN + 5)
#define ILIST_DB_DLG (RC_UTLUI_BEGIN + 6)
-#define ILIST_DB_DLG_HC (RC_UTLUI_BEGIN + 7)
-
-#define IMG_ONE_LEFT_HC (RC_UTLUI_BEGIN + 8)
-#define IMG_ONE_RIGHT_HC (RC_UTLUI_BEGIN + 9)
-#define IMG_ALL_LEFT_HC (RC_UTLUI_BEGIN + 10)
-#define IMG_ALL_RIGHT_HC (RC_UTLUI_BEGIN + 11)
-
#define IMG_VIEWLAYOUT_AUTOMATIC (RC_UTLUI_BEGIN + 12)
#define IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE (RC_UTLUI_BEGIN + 13)
@@ -170,12 +162,6 @@
#define IMG_VIEWLAYOUT_BOOKMODE_ACTIVE (RC_UTLUI_BEGIN + 15)
#define IMG_VIEWLAYOUT_SINGLECOLUMN (RC_UTLUI_BEGIN + 16)
#define IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE (RC_UTLUI_BEGIN + 17)
-#define IMG_VIEWLAYOUT_AUTOMATIC_HC (RC_UTLUI_BEGIN + 18)
-#define IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE_HC (RC_UTLUI_BEGIN + 19)
-#define IMG_VIEWLAYOUT_BOOKMODE_HC (RC_UTLUI_BEGIN + 20)
-#define IMG_VIEWLAYOUT_BOOKMODE_ACTIVE_HC (RC_UTLUI_BEGIN + 21)
-#define IMG_VIEWLAYOUT_SINGLECOLUMN_HC (RC_UTLUI_BEGIN + 22)
-#define IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE_HC (RC_UTLUI_BEGIN + 23)
//local ids of the Database ImageLists
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index ba6f5cb9dfaa..56285b11d52a 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,6 +30,7 @@
#include <vcl/timer.hxx>
#include <vcl/field.hxx>
+#include <vcl/floatwin.hxx>
#include <svtools/htmlcfg.hxx>
#include <sfx2/viewfac.hxx>
#include <sfx2/viewsh.hxx>
@@ -127,13 +129,13 @@ enum ShellModes
SHELL_MODE_MEDIA,
SHELL_MODE_EXTRUDED_CUSTOMSHAPE,
SHELL_MODE_FONTWORK,
- SHELL_MODE_POSTIT
+ SHELL_MODE_POSTIT,
+ SHELL_MODE_NAVIGATION
};
/*--------------------------------------------------------------------
Beschreibung: Anwendung einer Vorlage
--------------------------------------------------------------------*/
-
struct SwApplyTemplate
{
union
@@ -160,11 +162,9 @@ struct SwApplyTemplate
}
};
-
/*--------------------------------------------------------------------
Beschreibung: Sicht auf ein Dokument
--------------------------------------------------------------------*/
-
class SW_DLLPUBLIC SwView: public SfxViewShell
{
//Messehack (MA,MBA)
@@ -246,6 +246,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
SwPostItMgr *mpPostItMgr;
int nSelectionType;
+ FloatingWindow *mpFieldPopup;
static const int MASTERENUMCOMMANDS = 6;
@@ -307,6 +308,8 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
SW_DLLPRIVATE DECL_LINK( HtmlOptionsHdl, void * );
+ SW_DLLPRIVATE DECL_LINK( FieldPopupModeEndHdl, FloatingWindow * );
+
inline long GetXScroll() const;
inline long GetYScroll() const;
SW_DLLPRIVATE Point AlignToPixel(const Point& rPt) const;
@@ -329,6 +332,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
SW_DLLPRIVATE sal_Bool UpdateScrollbars();
+ SW_DLLPRIVATE DECL_LINK( WindowChildEventListener, VclSimpleEvent* );
SW_DLLPRIVATE void CalcVisArea( const Size &rPixelSz );
SW_DLLPRIVATE void CreatePageButtons(sal_Bool bShow);
@@ -418,7 +422,7 @@ public:
void GotFocus() const;
virtual SdrView* GetDrawView() const;
virtual sal_Bool HasUIFeature( sal_uInt32 nFeature );
- virtual void ShowCursor( FASTBOOL bOn = sal_True );
+ virtual void ShowCursor( bool bOn = sal_True );
virtual ErrCode DoVerb( long nVerb );
virtual sal_uInt16 SetPrinter( SfxPrinter* pNew,
@@ -468,7 +472,8 @@ public:
DECL_LINK( SpellError, LanguageType * );
sal_Bool ExecSpellPopup( const Point& rPt );
- sal_Bool ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
+ void ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
+
// SMARTTAGS
sal_Bool ExecSmartTagPopup( const Point& rPt );
@@ -669,7 +674,6 @@ public:
};
// ----------------- inline Methoden ----------------------
-
inline long SwView::GetXScroll() const
{
return aVisArea.GetWidth() * nScrollX / 100L;
@@ -685,11 +689,10 @@ inline const SwDocShell *SwView::GetDocShell() const
return ((SwView*)this)->GetDocShell();
}
-//***********************************************************
-
SfxTabPage* CreatePrintOptionsPage( Window *pParent,
const SfxItemSet &rOptions,
sal_Bool bPreview);
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/viewlayoutctrl.hxx b/sw/source/ui/inc/viewlayoutctrl.hxx
index 999f4b845636..fd02906129a8 100644
--- a/sw/source/ui/inc/viewlayoutctrl.hxx
+++ b/sw/source/ui/inc/viewlayoutctrl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,11 +29,9 @@
#define _VIEWLAYOUTCTRL_HXX
// include ---------------------------------------------------------------
-
#include <sfx2/stbitem.hxx>
// class SwViewLayoutControl ----------------------------------------------
-
class SwViewLayoutControl : public SfxStatusBarControl
{
private:
@@ -54,3 +53,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/wformsh.hxx b/sw/source/ui/inc/wformsh.hxx
index abd98d510e65..38e587ff5e35 100644
--- a/sw/source/ui/inc/wformsh.hxx
+++ b/sw/source/ui/inc/wformsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/wfrmsh.hxx b/sw/source/ui/inc/wfrmsh.hxx
index dfe5bd5f422f..a141842440f2 100644
--- a/sw/source/ui/inc/wfrmsh.hxx
+++ b/sw/source/ui/inc/wfrmsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/wgrfsh.hxx b/sw/source/ui/inc/wgrfsh.hxx
index b53743885d66..eaf5e4625007 100644
--- a/sw/source/ui/inc/wgrfsh.hxx
+++ b/sw/source/ui/inc/wgrfsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/wlistsh.hxx b/sw/source/ui/inc/wlistsh.hxx
index e3503a54e448..dd3fe48ac9ba 100644
--- a/sw/source/ui/inc/wlistsh.hxx
+++ b/sw/source/ui/inc/wlistsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,3 +41,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/wolesh.hxx b/sw/source/ui/inc/wolesh.hxx
index 87b48db5593e..6d714580b8e4 100644
--- a/sw/source/ui/inc/wolesh.hxx
+++ b/sw/source/ui/inc/wolesh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/wordcountdialog.hxx b/sw/source/ui/inc/wordcountdialog.hxx
index a228b8bdea77..5c6dbabea04f 100644
--- a/sw/source/ui/inc/wordcountdialog.hxx
+++ b/sw/source/ui/inc/wordcountdialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#define SW_WORDCOUNTDIALOG_HXX
#include <sfx2/basedlgs.hxx>
#include <svtools/stdctrl.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <layout/layout.hxx>
#include <layout/layout-pre.hxx>
struct SwDocStat;
@@ -41,12 +40,16 @@ class SwWordCountDialog : public SfxModalDialog
FixedInfo aCurrentWordFI;
FixedText aCurrentCharacterFT;
FixedInfo aCurrentCharacterFI;
+ FixedText aCurrentCharacterExcludingSpacesFT;
+ FixedInfo aCurrentCharacterExcludingSpacesFI;
FixedLine aDocFL;
FixedText aDocWordFT;
FixedInfo aDocWordFI;
FixedText aDocCharacterFT;
FixedInfo aDocCharacterFI;
+ FixedText aDocCharacterExcludingSpacesFT;
+ FixedInfo aDocCharacterExcludingSpacesFI;
FixedLine aBottomFL;
@@ -63,3 +66,5 @@ public:
#include <layout/layout-post.hxx>
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/workctrl.hxx b/sw/source/ui/inc/workctrl.hxx
index 297c343a7391..805f7382babc 100644
--- a/sw/source/ui/inc/workctrl.hxx
+++ b/sw/source/ui/inc/workctrl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <sfx2/tbxctrl.hxx>
#include <vcl/toolbox.hxx>
#include <svtools/stdctrl.hxx>
-#ifndef _IMAGEBTN_HXX //autogen
#include <vcl/button.hxx>
-#endif
class PopupMenu;
class SwView;
@@ -137,7 +136,6 @@ class SwScrollNaviPopup : public SfxPopupWindow
FixedLine aSeparator;
FixedInfo aInfoField;
ImageList aIList;
- ImageList aIListH;
String sQuickHelp[2 * NID_COUNT];
@@ -170,7 +168,6 @@ class SwNaviImageButton : public ImageButton
{
SwScrollNaviPopup* pPopup;
Image aImage;
- Image aImageH;
String sQuickText;
SfxPopupWindow* pPopupWindow;
SfxPopupWindow* pFloatingWindow;
@@ -202,9 +199,7 @@ class SwHlpImageButton : public ImageButton
virtual void RequestHelp( const HelpEvent& rHEvt );
};
-/* -----------------26.11.2002 09:25-----------------
- *
- * --------------------------------------------------*/
+
class SwPreviewZoomControl : public SfxToolBoxControl
{
public:
@@ -223,3 +218,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/wrap.hxx b/sw/source/ui/inc/wrap.hxx
index 6ca664ea5d84..94e5e7f9be3f 100644
--- a/sw/source/ui/inc/wrap.hxx
+++ b/sw/source/ui/inc/wrap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,21 +31,13 @@
#include <sfx2/tabdlg.hxx>
#include <sfx2/basedlgs.hxx>
-#ifndef _IMAGEBTN_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
class Window;
class SfxItemSet;
@@ -149,3 +142,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index 70847d8d2e75..db1f651b099f 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,6 +34,7 @@
#include <sortopt.hxx>
#include <swurl.hxx>
#include <IMark.hxx>
+#include "navmgr.hxx"
class Window;
class OutputDevice;
@@ -471,6 +473,21 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)();
String GetSelDescr() const;
+ SwNavigationMgr& GetNavigationMgr();
+ void addCurrentPosition();
+ sal_Bool GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL,
+ sal_Bool bSelFrame = sal_True );
+ sal_Bool GotoINetAttr( const SwTxtINetFmt& rAttr );
+ void GotoOutline( sal_uInt16 nIdx );
+ sal_Bool GotoOutline( const String& rName );
+ sal_Bool GotoRegion( const String& rName );
+ sal_Bool GotoRefMark( const String& rRefMark, sal_uInt16 nSubType = 0,
+ sal_uInt16 nSeqNo = 0 );
+ sal_Bool GotoNextTOXBase( const String* pName = 0);
+ sal_Bool GotoTable( const String& rName );
+ sal_Bool GotoFld( const SwFmtFld& rFld );
+ const SwRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = sal_False);
+
private:
SW_DLLPRIVATE void OpenMark();
@@ -527,6 +544,7 @@ private:
} *pCrsrStack;
SwView &rView;
+ SwNavigationMgr aNavigationMgr;
Point aDest;
sal_Bool bDestOnStack;
@@ -648,3 +666,5 @@ inline sal_Bool SwWrtShell::Is_FnDragEQBeginDrag() const
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/wtabsh.hxx b/sw/source/ui/inc/wtabsh.hxx
index 5ab809821de8..fbb5b4d9c57f 100644
--- a/sw/source/ui/inc/wtabsh.hxx
+++ b/sw/source/ui/inc/wtabsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,3 +41,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/wtextsh.hxx b/sw/source/ui/inc/wtextsh.hxx
index cc03de602400..b94199828613 100644
--- a/sw/source/ui/inc/wtextsh.hxx
+++ b/sw/source/ui/inc/wtextsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/wview.hxx b/sw/source/ui/inc/wview.hxx
index 2b36bbf97dce..c76d8bd7d5e1 100644
--- a/sw/source/ui/inc/wview.hxx
+++ b/sw/source/ui/inc/wview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,10 +31,6 @@
#include "swdllapi.h"
#include "view.hxx"
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
class SW_DLLPUBLIC SwWebView: public SwView
{
protected:
@@ -49,3 +46,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/zoomctrl.hxx b/sw/source/ui/inc/zoomctrl.hxx
index 05880e12189e..29818393d9a2 100644
--- a/sw/source/ui/inc/zoomctrl.hxx
+++ b/sw/source/ui/inc/zoomctrl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx
index 66c2b7d67b7e..84dbd3e6c30f 100644
--- a/sw/source/ui/index/cntex.cxx
+++ b/sw/source/ui/index/cntex.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,6 @@
#include <rsc/rscsfx.hxx>
#include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
-#include <com/sun/star/text/XDocumentIndex.hpp>
#include <com/sun/star/text/XTextSectionsSupplier.hpp>
#include <com/sun/star/style/BreakType.hpp>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
@@ -52,9 +52,7 @@
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <cnttab.hxx>
#include <poolfmt.hxx>
#include <unoprnms.hxx>
@@ -63,21 +61,11 @@
#include <docsh.hxx>
#include <swmodule.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _UTLUI_HRC
#include <utlui.hrc>
-#endif
-#ifndef _INDEX_HRC
#include <index.hrc>
-#endif
-#ifndef _CNTTAB_HRC
#include <cnttab.hrc>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <SwStyleNameMapper.hxx>
#include <swuicnttab.hxx>
#include <unomid.h>
@@ -102,14 +90,11 @@ using ::rtl::OUString;
#endif
#define SW_PROP_NAME_STR(nId) SwGetPropName((nId)).pName
-/* -----------------04.11.99 11:28-------------------
-
- --------------------------------------------------*/
void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
uno::Reference< XPropertySet > & xProps,
const char* pPropName, const String& rValue)
{
- OUString uPropName(C2U(pPropName));
+ OUString uPropName(rtl::OUString::createFromAscii(pPropName));
if(xInfo->hasPropertyByName(uPropName))
{
uno::Any aValue;
@@ -117,17 +102,19 @@ void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
xProps->setPropertyValue(uPropName, aValue);
}
}
+
void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
uno::Reference< XPropertySet > & xProps,
sal_uInt16 nId, const String& rValue)
{
lcl_SetProp( xInfo, xProps, SW_PROP_NAME_STR(nId), rValue);
}
+
void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
uno::Reference< XPropertySet > & xProps,
sal_uInt16 nId, sal_Int16 nValue )
{
- OUString uPropName(C2U(SW_PROP_NAME_STR(nId)));
+ OUString uPropName(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(nId)));
if(xInfo->hasPropertyByName(uPropName))
{
uno::Any aValue;
@@ -141,7 +128,7 @@ void lcl_SetBOOLProp(
uno::Reference< beans::XPropertySet > & xProps,
sal_uInt16 nId, sal_Bool bValue )
{
- OUString uPropName(C2U(SW_PROP_NAME_STR(nId)));
+ OUString uPropName(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(nId)));
if(xInfo->hasPropertyByName(uPropName))
{
uno::Any aValue;
@@ -149,7 +136,7 @@ void lcl_SetBOOLProp(
xProps->setPropertyValue(uPropName, aValue);
}
}
-//-----------------------------------------------------------------------------
+
IMPL_LINK( SwMultiTOXTabDialog, CreateExample_Hdl, void*, EMPTYARG )
{
try
@@ -191,21 +178,18 @@ IMPL_LINK( SwMultiTOXTabDialog, CreateExample_Hdl, void*, EMPTYARG )
}
catch(Exception&)
{
- DBG_ERROR("::CreateExample() - exception caught");
+ OSL_ENSURE(false, "::CreateExample() - exception caught");
}
return 0;
}
-/* --------------------------------------------------
-
- --------------------------------------------------*/
void SwMultiTOXTabDialog::CreateOrUpdateExample(
TOXTypes nTOXIndex, sal_uInt16 nPage, sal_uInt16 nCurrentLevel)
{
if(!pExampleFrame || !pExampleFrame->IsInitialized())
return;
- const char* __FAR_DATA IndexServiceNames[] =
+ const char* IndexServiceNames[] =
{
"com.sun.star.text.DocumentIndex",
"com.sun.star.text.UserIndex",
@@ -218,7 +202,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
try
{
- DBG_ASSERT(pxIndexSectionsArr[nTOXIndex] &&
+ OSL_ENSURE(pxIndexSectionsArr[nTOXIndex] &&
pxIndexSectionsArr[nTOXIndex]->xContainerSection.is(),
"Section not created");
uno::Reference< frame::XModel > & xModel = pExampleFrame->GetModel();
@@ -243,7 +227,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
uno::Reference< text::XTextRange > xRg(xCrsr, uno::UNO_QUERY);
xCrsr->getText()->insertTextContent(xRg, xContent, sal_False);
}
- OUString uIsVisible(C2U(SW_PROP_NAME_STR(UNO_NAME_IS_VISIBLE)));
+ OUString uIsVisible(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_IS_VISIBLE)));
for(sal_uInt16 i = 0 ; i <= TOX_AUTHORITIES; i++)
{
uno::Reference< beans::XPropertySet > xSectPr(pxIndexSectionsArr[i]->xContainerSection, uno::UNO_QUERY);
@@ -269,10 +253,10 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
//stylenames
sal_uInt16 nContentOptions = rDesc.GetContentOptions();
- if(xInfo->hasPropertyByName(C2U(SW_PROP_NAME_STR(UNO_NAME_LEVEL_PARAGRAPH_STYLES))))
+ if(xInfo->hasPropertyByName(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LEVEL_PARAGRAPH_STYLES))))
{
sal_Bool bOn = 0!=(nContentOptions&nsSwTOXElement::TOX_TEMPLATE );
- uno::Any aStyleNames(xIdxProps->getPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_LEVEL_PARAGRAPH_STYLES))));
+ uno::Any aStyleNames(xIdxProps->getPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LEVEL_PARAGRAPH_STYLES))));
uno::Reference< container::XIndexReplace > xAcc;
aStyleNames >>= xAcc;
@@ -329,8 +313,6 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_CREATE_FROM_STAR_CALC, 0 != (nsSwTOOElements::TOO_CALC &nOLEOptions ));
lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_CREATE_FROM_STAR_DRAW, 0 != (nsSwTOOElements::TOO_DRAW_IMPRESS&nOLEOptions));
lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_CREATE_FROM_OTHER_EMBEDDED_OBJECTS, 0 != (nsSwTOOElements::TOO_OTHER|nOLEOptions ));
-
- //lcl_SetBOOLProp(xInfo, xIdxProps, , rDesc.IsLevelFromChapter());
}
const SwForm* pForm = GetForm(eCurrentTOXType);
if(bInitialCreate || !nPage || nPage == TOX_PAGE_ENTRY)
@@ -347,7 +329,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
nEndLevel = pForm->GetFormMax() - 1;
}
- if(xInfo->hasPropertyByName(C2U(SW_PROP_NAME_STR(UNO_NAME_LEVEL_FORMAT))))
+ if(xInfo->hasPropertyByName(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LEVEL_FORMAT))))
{
for(sal_uInt16 nCurrLevel = nStartLevel; nCurrLevel <= nEndLevel; nCurrLevel++)
{
@@ -440,12 +422,12 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
pValues[nTokenIndex] = aPropVals;
nTokenIndex++;
- aIt++; // #i24377#
+ ++aIt; // #i24377#
}
aSequPropVals.realloc(nTokenIndex);
- uno::Any aFormatAccess = xIdxProps->getPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_LEVEL_FORMAT)));
- DBG_ASSERT(aFormatAccess.getValueType() == ::getCppuType((uno::Reference<container::XIndexReplace>*)0),
+ uno::Any aFormatAccess = xIdxProps->getPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LEVEL_FORMAT)));
+ OSL_ENSURE(aFormatAccess.getValueType() == ::getCppuType((uno::Reference<container::XIndexReplace>*)0),
"wrong property type");
@@ -485,32 +467,13 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
pForm->GetTemplate(i + nOffset));
}
}
-/*
- const String& GetAutoMarkURL() const { return sAutoMarkURL;}
- const String& GetMainEntryCharStyle() const {return sMainEntryCharStyle;}
-
- String GetAuthBrackets() const {return sAuthBrackets;}
- sal_Bool IsAuthSequence() const {return bIsAuthSequence;}
- sal_Bool IsSortByDocument()const {return bSortByDocument ;}
-
- SwTOXSortKey GetSortKey1() const {return eSortKey1;}
- SwTOXSortKey GetSortKey2() const {return eSortKey2;}
- SwTOXSortKey GetSortKey3() const {return eSortKey3;}
-*/
- //
pxIndexSectionsArr[nTOXIndex]->xDocumentIndex->update();
-//#if OSL_DEBUG_LEVEL > 1
-// uno::Reference< frame::XStorable > xStor(xModel, uno::UNO_QUERY);
-// String sURL("file:///e|/temp/sw/idxexample.sdw");
-// uno::Sequence< beans::PropertyValue > aArgs(0);
-// xStor->storeToURL(S2U(sURL), aArgs);
-//#endif
-
}
catch(Exception&)
{
- DBG_ERROR("::CreateExample() - exception caught");
+ OSL_ENSURE(false, "::CreateExample() - exception caught");
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 905caaf6f0ef..e549450a2149 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,20 +58,14 @@
#include <authfld.hxx>
#include <swtypes.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
#include <outline.hxx>
#include <cnttab.hxx>
#include <swuicnttab.hxx>
#include <formedt.hxx>
#include <poolfmt.hxx>
-#ifndef _POOLFMT_HRC
#include <poolfmt.hrc>
-#endif
#include <uitool.hxx>
#include <fmtcol.hxx>
#include <fldbas.hxx>
@@ -81,34 +76,18 @@
#include <swmodule.hxx>
#include <modcfg.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _UTLUI_HRC
#include <utlui.hrc>
-#endif
-#ifndef _INDEX_HRC
#include <index.hrc>
-#endif
-#ifndef _CNTTAB_HRC
#include <cnttab.hrc>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <SwStyleNameMapper.hxx>
#include <sfx2/filedlghelper.hxx>
-#ifndef _TOXHLP_HXX
#include <toxwrap.hxx>
-#endif
#include <chpfld.hxx>
-#ifndef _UTLUI_HRC
#include "utlui.hrc"
-#endif
#include <sfx2/app.hxx>
@@ -132,10 +111,17 @@ static const sal_Unicode aDeliEnd = ']'; //fuer die form
#define IDX_FILE_EXTENSION String::CreateFromAscii( \
RTL_CONSTASCII_STRINGPARAM( "*.sdi" ))
+static boost::ptr_vector<Control>::iterator FindControl (boost::ptr_vector<Control> &list, Control *ctrl)
+{
+ for (boost::ptr_vector<Control>::iterator it = list.begin(); it != list.end(); ++it)
+ {
+ if ((&(*it)) == ctrl)
+ return it;
+ }
-/* -----------------14.06.99 13:10-------------------
+ return list.end();
+}
- --------------------------------------------------*/
String lcl_CreateAutoMarkFileDlg( const String& rURL,
const String& rFileString, sal_Bool bOpen )
{
@@ -168,9 +154,7 @@ String lcl_CreateAutoMarkFileDlg( const String& rURL,
rLastSaveDir = sSaveDir;
return sRet;
}
-/* -----------------------------19.01.00 11:09--------------------------------
- ---------------------------------------------------------------------------*/
struct AutoMarkEntry
{
String sSearch;
@@ -218,8 +202,6 @@ class SwEntryBrowseBox : public SwEntryBrowseBox_Base
protected:
virtual sal_Bool SeekRow( long nRow );
-// virtual void PaintField( OutputDevice& rDev, const awt::Rectangle& rRect,
-// sal_uInt16 nColumnId ) const;
virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId) const;
virtual void InitController(::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol);
virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol);
@@ -257,9 +239,7 @@ public:
~SwAutoMarkDlg_Impl();
};
-/* -----------------04.11.99 11:02-------------------
- --------------------------------------------------*/
sal_uInt16 CurTOXType::GetFlatIndex() const
{
sal_uInt16 nRet = static_cast< sal_uInt16 >(eType);
@@ -269,14 +249,9 @@ sal_uInt16 CurTOXType::GetFlatIndex() const
}
return nRet;
}
-/*************************************************************************
-*************************************************************************/
#define EDIT_MINWIDTH 15
-/* -----------------14.06.99 12:12-------------------
-
- --------------------------------------------------*/
SwMultiTOXTabDialog::SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet,
SwWrtShell &rShell,
SwTOXBase* pCurTOX,
@@ -362,7 +337,7 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet
}
}
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AddTabPage(TP_TOX_SELECT, SwTOXSelectTabPage::Create, 0);
AddTabPage(TP_TOX_STYLES, SwTOXStylesTabPage::Create, 0);
AddTabPage(TP_COLUMN, SwColumnPage::Create, 0);
@@ -389,9 +364,7 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet
if(aNewPos.X() < 0)
SetPosPixel(aOldPos);
}
-/*-- 14.06.99 13:11:40---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMultiTOXTabDialog::~SwMultiTOXTabDialog()
{
SW_MOD()->GetModuleConfig()->SetShowIndexPreview(aShowExampleCB.IsChecked());
@@ -409,9 +382,7 @@ SwMultiTOXTabDialog::~SwMultiTOXTabDialog()
delete pMgr;
delete pExampleFrame;
}
-/*-- 14.06.99 13:11:40---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwMultiTOXTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
if( TP_BACKGROUND == nId )
@@ -435,9 +406,7 @@ void SwMultiTOXTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
((SwTOXSelectTabPage&)rPage).SelectType((TOXTypes)nInitialTOXType);
}
}
-/*-- 14.06.99 13:11:40---------------------------------------------------
- -----------------------------------------------------------------------*/
short SwMultiTOXTabDialog::Ok()
{
short nRet = SfxTabDialog::Ok();
@@ -468,9 +437,7 @@ short SwMultiTOXTabDialog::Ok()
return nRet;
}
-/* -----------------16.06.99 11:59-------------------
- --------------------------------------------------*/
SwForm* SwMultiTOXTabDialog::GetForm(CurTOXType eType)
{
sal_uInt16 nIndex = eType.GetFlatIndex();
@@ -478,9 +445,7 @@ SwForm* SwMultiTOXTabDialog::GetForm(CurTOXType eType)
pFormArr[nIndex] = new SwForm(eType.eType);
return pFormArr[nIndex];
}
-/* -----------------09.09.99 11:29-------------------
- --------------------------------------------------*/
SwTOXDescription& SwMultiTOXTabDialog::GetTOXDescription(CurTOXType eType)
{
sal_uInt16 nIndex = eType.GetFlatIndex();
@@ -520,9 +485,7 @@ SwTOXDescription& SwMultiTOXTabDialog::GetTOXDescription(CurTOXType eType)
}
return *pDescArr[nIndex];
}
-/* -----------------09.09.99 11:36-------------------
- --------------------------------------------------*/
SwTOXDescription* SwMultiTOXTabDialog::CreateTOXDescFromTOXBase(
const SwTOXBase*pCurTOX)
{
@@ -551,10 +514,6 @@ SwTOXDescription* SwMultiTOXTabDialog::CreateTOXDescFromTOXBase(
return pDesc;
}
-/* -----------------------------29.12.99 09:53--------------------------------
-
- ---------------------------------------------------------------------------*/
-
IMPL_LINK( SwMultiTOXTabDialog, ShowPreviewHdl, CheckBox *, pBox )
{
if(aShowExampleCB.IsChecked())
@@ -635,28 +594,20 @@ IMPL_LINK( SwMultiTOXTabDialog, ShowPreviewHdl, CheckBox *, pBox )
return 0;
}
-
-/* -----------------05.07.99 09:49-------------------
-
- --------------------------------------------------*/
sal_Bool SwMultiTOXTabDialog::IsNoNum(SwWrtShell& rSh, const String& rName)
{
SwTxtFmtColl* pColl = rSh.GetParaStyle(rName);
- //if(pColl && pColl->GetOutlineLevel() == NO_NUMBERING) //#outline level,zhaojianwei
if(pColl && ! pColl->IsAssignedToListLevelOfOutlineStyle()) //<-end,zhaojianwei
return sal_True;
sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
if(nId != USHRT_MAX &&
- //rSh.GetTxtCollFromPool(nId)->GetOutlineLevel() == NO_NUMBERING) //#outline level,zhaojianwei
! rSh.GetTxtCollFromPool(nId)->IsAssignedToListLevelOfOutlineStyle()) //<-end,zhaojianwei
return sal_True;
return sal_False;
}
-/* -----------------14.07.99 16:01-------------------
- --------------------------------------------------*/
class SwIndexTreeLB : public SvTreeListBox
{
const HeaderBar* pHeaderBar;
@@ -668,9 +619,7 @@ public:
virtual long GetTabPos( SvLBoxEntry*, SvLBoxTab* );
void SetHeaderBar(const HeaderBar* pHB) {pHeaderBar = pHB;}
};
-/* -----------------14.07.99 16:03-------------------
- --------------------------------------------------*/
long SwIndexTreeLB::GetTabPos( SvLBoxEntry* pEntry, SvLBoxTab* pTab)
{
long nData = (long)pEntry->GetUserData();
@@ -684,9 +633,7 @@ long SwIndexTreeLB::GetTabPos( SvLBoxEntry* pEntry, SvLBoxTab* pTab)
nData += pTab->GetPos();
return nData;
}
-/* -----------------25.08.99 11:14-------------------
- --------------------------------------------------*/
void SwIndexTreeLB::KeyInput( const KeyEvent& rKEvt )
{
SvLBoxEntry* pEntry = FirstSelected();
@@ -721,9 +668,6 @@ void SwIndexTreeLB::KeyInput( const KeyEvent& rKEvt )
SvTreeListBox::KeyInput(rKEvt);
}
-/* -----------------16.07.99 10:01-------------------
-
- --------------------------------------------------*/
class SwHeaderTree : public Control
{
HeaderBar aStylesHB;
@@ -737,9 +681,7 @@ public:
virtual void GetFocus();
};
-/* -----------------16.07.99 10:11-------------------
- --------------------------------------------------*/
SwHeaderTree::SwHeaderTree(Window* pParent, const ResId rResId) :
Control(pParent, rResId),
aStylesHB( this, ResId(HB_STYLES, *rResId.GetResMgr())),
@@ -756,17 +698,13 @@ SwHeaderTree::SwHeaderTree(Window* pParent, const ResId rResId) :
aStylesTLB.SetSizePixel(aTLBSize);
aStylesTLB.SetHeaderBar(&aStylesHB);
}
-/* -----------------25.08.99 10:38-------------------
- --------------------------------------------------*/
void SwHeaderTree::GetFocus()
{
Control::GetFocus();
aStylesTLB.GrabFocus();
}
-/* -----------------13.07.99 15:29-------------------
- --------------------------------------------------*/
class SwAddStylesDlg_Impl : public SfxModalDialog
{
OKButton aOk;
@@ -789,9 +727,7 @@ public:
SwAddStylesDlg_Impl(Window* pParent, SwWrtShell& rWrtSh, String rStringArr[]);
~SwAddStylesDlg_Impl();
};
-/* -----------------13.07.99 15:39-------------------
- --------------------------------------------------*/
SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent,
SwWrtShell& rWrtSh, String rStringArr[]) :
SfxModalDialog(pParent, SW_RES(DLG_ADD_IDX_STYLES)),
@@ -813,9 +749,6 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent,
aLeftPB.SetAccessibleRelationMemberOf(&aStylesFL);
aRightPB.SetAccessibleRelationMemberOf(&aStylesFL);
- aLeftPB.SetModeImage( Image( SW_RES( IMG_ALL_LEFT_HC ) ), BMP_COLOR_HIGHCONTRAST );
- aRightPB.SetModeImage( Image( SW_RES( IMG_ALL_RIGHT_HC ) ), BMP_COLOR_HIGHCONTRAST );
-
aOk.SetClickHdl(LINK(this, SwAddStylesDlg_Impl, OkHdl));
aLeftPB.SetClickHdl(LINK(this, SwAddStylesDlg_Impl, LeftRightHdl));
aRightPB.SetClickHdl(LINK(this, SwAddStylesDlg_Impl, LeftRightHdl));
@@ -835,7 +768,6 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent,
SwIndexTreeLB& rTLB = aHeaderTree.GetTreeListBox();
rTLB.SetStyle(rTLB.GetStyle()|WB_CLIPCHILDREN|WB_SORT);
- //aStylesTLB.SetSelectHdl(LINK(this, SwAddStylesDlg_Impl, SelectHdl));
rTLB.GetModel()->SetSortMode(SortAscending);
for(i = 0; i < MAXLEVEL; ++i)
{
@@ -879,15 +811,10 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent,
rTLB.GetModel()->Resort();
}
-/* -----------------13.07.99 15:39-------------------
-
- --------------------------------------------------*/
SwAddStylesDlg_Impl::~SwAddStylesDlg_Impl()
{
}
-/* -----------------13.07.99 15:39-------------------
- --------------------------------------------------*/
IMPL_LINK(SwAddStylesDlg_Impl, OkHdl, OKButton*, EMPTYARG)
{
for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
@@ -912,17 +839,13 @@ IMPL_LINK(SwAddStylesDlg_Impl, OkHdl, OKButton*, EMPTYARG)
EndDialog(RET_OK);
return 0;
}
-/* -----------------16.07.99 09:27-------------------
- --------------------------------------------------*/
IMPL_LINK(SwAddStylesDlg_Impl, HeaderDragHdl, HeaderBar*, EMPTYARG)
{
aHeaderTree.GetTreeListBox().Invalidate();
return 0;
}
-/* -----------------13.07.99 15:39-------------------
- --------------------------------------------------*/
IMPL_LINK(SwAddStylesDlg_Impl, LeftRightHdl, PushButton*, pBtn)
{
sal_Bool bLeft = pBtn == &aLeftPB;
@@ -950,9 +873,6 @@ IMPL_LINK(SwAddStylesDlg_Impl, LeftRightHdl, PushButton*, pBtn)
return 0;
}
-/*-- 14.06.99 13:11:40---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrSet) :
SfxTabPage(pParent, SW_RES(TP_TOX_SELECT), rAttrSet),
@@ -971,7 +891,6 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS
aCreateFromFL( this, SW_RES(FL_CREATEFROM )),
aFromHeadingsCB( this, SW_RES(CB_FROMHEADINGS )),
-// aChapterDlgPB( this, SW_RES(PB_CHAPTERDLG )),//#outline level,removed by zhaojianwei
aAddStylesCB( this, SW_RES(CB_ADDSTYLES )),
aAddStylesPB( this, SW_RES(PB_ADDSTYLES )),
@@ -1053,7 +972,6 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS
aTypeLB.SetSelectHdl(LINK(this, SwTOXSelectTabPage, TOXTypeHdl));
aAddStylesPB.SetClickHdl(LINK(this, SwTOXSelectTabPage, AddStylesHdl));
- //aChapterDlgPB.SetClickHdl(LINK(this, SwTOXSelectTabPage, ChapterHdl));//#outline level,removed by zhaojianwei
PopupMenu* pMenu = aAutoMarkPB.GetPopupMenu();
pMenu->SetActivateHdl(LINK(this, SwTOXSelectTabPage, MenuEnableHdl));
@@ -1084,17 +1002,13 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS
aTypeLB.SelectEntryPos(0);
aTitleED.SaveValue();
}
-/*-- 14.06.99 13:11:41---------------------------------------------------
- -----------------------------------------------------------------------*/
SwTOXSelectTabPage::~SwTOXSelectTabPage()
{
delete pIndexRes;
delete pIndexEntryWrapper;
}
-/* -----------------21.10.99 17:03-------------------
- --------------------------------------------------*/
void SwTOXSelectTabPage::SetWrtShell(SwWrtShell& rSh)
{
sal_uInt16 nUserTypeCount = rSh.GetTOXTypeCount(TOX_USER);
@@ -1106,22 +1020,18 @@ void SwTOXSelectTabPage::SetWrtShell(SwWrtShell& rSh)
for(sal_uInt16 nUser = 1; nUser < nUserTypeCount; nUser++)
{
nPos = aTypeLB.InsertEntry(rSh.GetTOXType(TOX_USER, nUser)->GetTypeName(), nPos);
- sal_uInt32 nEntryData = nUser << 8;
+ sal_uIntPtr nEntryData = nUser << 8;
nEntryData |= TO_USER;
aTypeLB.SetEntryData(nPos, (void*)nEntryData);
}
}
}
-/* -----------------14.06.99 13:10-------------------
- --------------------------------------------------*/
sal_Bool SwTOXSelectTabPage::FillItemSet( SfxItemSet& )
{
return sal_True;
}
-/* -----------------25.08.99 14:31-------------------
- --------------------------------------------------*/
long lcl_TOXTypesToUserData(CurTOXType eType)
{
sal_uInt16 nRet = TOX_INDEX;
@@ -1142,7 +1052,7 @@ long lcl_TOXTypesToUserData(CurTOXType eType)
}
return nRet;
}
-//-----------------------------------------------------------------
+
void SwTOXSelectTabPage::SelectType(TOXTypes eSet)
{
CurTOXType eCurType (eSet, 0);
@@ -1154,10 +1064,6 @@ void SwTOXSelectTabPage::SelectType(TOXTypes eSet)
TOXTypeHdl(&aTypeLB);
}
-/*-- 14.06.99 13:10:45---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-//-----------------------------------------------------------------
CurTOXType lcl_UserData2TOXTypes(sal_uInt16 nData)
{
CurTOXType eRet;
@@ -1176,13 +1082,11 @@ CurTOXType lcl_UserData2TOXTypes(sal_uInt16 nData)
case TO_OBJECT : eRet.eType = TOX_OBJECTS; break;
case TO_TABLE : eRet.eType = TOX_TABLES; break;
case TO_AUTHORITIES : eRet.eType = TOX_AUTHORITIES; break;
- default: DBG_ERROR("what a type?");
+ default: OSL_ENSURE(false, "what a type?");
}
return eRet;
}
-/* -----------------02.09.99 08:16-------------------
- --------------------------------------------------*/
void SwTOXSelectTabPage::ApplyTOXDescription()
{
SwMultiTOXTabDialog* pTOXDlg = (SwMultiTOXTabDialog*)GetTabDialog();
@@ -1231,7 +1135,6 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
if(TOX_CONTENT == aCurType.eType)
{
aFromHeadingsCB.Check( 0 != (nCreateType & nsSwTOXElement::TOX_OUTLINELEVEL) );
- //aChapterDlgPB.Enable(aFromHeadingsCB.IsChecked());//#outline level,removed by zhaojianwei
aAddStylesCB.SetText(sAddStyleContent);
aAddStylesPB.Enable(aAddStylesCB.IsChecked());
}
@@ -1289,7 +1192,7 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
for( long nCnt = 0; nCnt < aSortAlgorithmLB.GetEntryCount(); ++nCnt )
{
const String* pEntryData = (const String*)aSortAlgorithmLB.GetEntryData( (sal_uInt16)nCnt );
- DBG_ASSERT(pEntryData, "no entry data available");
+ OSL_ENSURE(pEntryData, "no entry data available");
if( pEntryData && *pEntryData == rDesc.GetSortAlgorithm())
{
aSortAlgorithmLB.SelectEntryPos( (sal_uInt16)nCnt );
@@ -1297,9 +1200,7 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
}
}
}
-/* -----------------09.09.99 11:57-------------------
- --------------------------------------------------*/
void SwTOXSelectTabPage::FillTOXDescription()
{
SwMultiTOXTabDialog* pTOXDlg = (SwMultiTOXTabDialog*)GetTabDialog();
@@ -1406,13 +1307,11 @@ void SwTOXSelectTabPage::FillTOXDescription()
rDesc.SetLanguage(aLanguageLB.GetSelectLanguage());
const String* pEntryData = (const String*)aSortAlgorithmLB.GetEntryData(
aSortAlgorithmLB.GetSelectEntryPos() );
- DBG_ASSERT(pEntryData, "no entry data available");
+ OSL_ENSURE(pEntryData, "no entry data available");
if(pEntryData)
rDesc.SetSortAlgorithm(*pEntryData);
}
-/* -----------------05.07.99 15:09-------------------
- --------------------------------------------------*/
void SwTOXSelectTabPage::Reset( const SfxItemSet& )
{
SwMultiTOXTabDialog* pTOXDlg = (SwMultiTOXTabDialog*)GetTabDialog();
@@ -1445,16 +1344,12 @@ void SwTOXSelectTabPage::Reset( const SfxItemSet& )
TOXTypeHdl(&aTypeLB);
CheckBoxHdl(&aAddStylesCB);
}
-/*-- 14.06.99 13:10:52---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwTOXSelectTabPage::ActivatePage( const SfxItemSet& )
{
//nothing to do
}
-/*-- 14.06.99 13:11:00---------------------------------------------------
- -----------------------------------------------------------------------*/
int SwTOXSelectTabPage::DeactivatePage( SfxItemSet* _pSet )
{
if(_pSet)
@@ -1463,16 +1358,12 @@ int SwTOXSelectTabPage::DeactivatePage( SfxItemSet* _pSet )
FillTOXDescription();
return LEAVE_PAGE;
}
-/* -----------------14.06.99 13:10-------------------
- --------------------------------------------------*/
SfxTabPage* SwTOXSelectTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet)
{
return new SwTOXSelectTabPage(pParent, rAttrSet);
}
-/* -----------------14.06.99 13:10-------------------
- --------------------------------------------------*/
IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox)
{
SwMultiTOXTabDialog* pTOXDlg = (SwMultiTOXTabDialog*)GetTabDialog();
@@ -1495,7 +1386,6 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox)
aAreaFL.Show( 0 != (nType & (TO_CONTENT|TO_ILLUSTRATION|TO_USER|TO_INDEX|TO_TABLE|TO_OBJECT)) );
aFromHeadingsCB.Show( 0 != (nType & (TO_CONTENT)) );
- // aChapterDlgPB.Show( 0 != (nType & (TO_CONTENT)) );//#outline level,removed by zhaojianwei
aAddStylesCB.Show( 0 != (nType & (TO_CONTENT|TO_USER)) );
aAddStylesPB.Show( 0 != (nType & (TO_CONTENT|TO_USER)) );
@@ -1527,13 +1417,6 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox)
aSortAlgorithmFT.Show(bEnableSortLanguage);
aSortAlgorithmLB.Show(bEnableSortLanguage);
- //if(nType & TO_CONTENT) //#outline level,removed by zhaojianwei
- //{
- //Point aPos(aAddStylesPB.GetPosPixel());
- //aPos.X() = aChapterDlgPB.GetPosPixel().X();
- //aAddStylesPB.SetPosPixel(aPos);
- //}
- //else if( nType & TO_ILLUSTRATION )//<-removed end.
// initialize button positions
//#i111993# add styles button has two different positions
@@ -1570,8 +1453,6 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox)
aKeyAsEntryCB.Show( 0 != (nType & TO_INDEX) );
aFromFileCB.Show( 0 != (nType & TO_INDEX) );
aAutoMarkPB.Show( 0 != (nType & TO_INDEX) );
-// aCreateAutoMarkPB.Show(nType &TO_INDEX);
-// aEditAutoMarkPB.Show(nType & TO_INDEX);
aIdxOptionsFL.Show( 0 != (nType & TO_INDEX) );
@@ -1592,9 +1473,7 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox)
ModifyHdl(0);
return 0;
}
-/* -----------------30.11.99 12:48-------------------
- --------------------------------------------------*/
IMPL_LINK(SwTOXSelectTabPage, ModifyHdl, void*, EMPTYARG)
{
SwMultiTOXTabDialog* pTOXDlg = (SwMultiTOXTabDialog*)GetTabDialog();
@@ -1605,9 +1484,7 @@ IMPL_LINK(SwTOXSelectTabPage, ModifyHdl, void*, EMPTYARG)
}
return 0;
}
-/* -----------------05.07.99 10:13-------------------
- --------------------------------------------------*/
IMPL_LINK(SwTOXSelectTabPage, CheckBoxHdl, CheckBox*, pBox )
{
SwMultiTOXTabDialog* pTOXDlg = (SwMultiTOXTabDialog*)GetTabDialog();
@@ -1621,7 +1498,6 @@ IMPL_LINK(SwTOXSelectTabPage, CheckBoxHdl, CheckBox*, pBox )
pBox->Check(sal_True);
}
aAddStylesPB.Enable(aAddStylesCB.IsChecked());
- //aChapterDlgPB.Enable(aFromHeadingsCB.IsChecked());//#outline level,removed by zhaojianwei
}
if(TOX_USER == aCurType.eType)
{
@@ -1637,9 +1513,7 @@ IMPL_LINK(SwTOXSelectTabPage, CheckBoxHdl, CheckBox*, pBox )
ModifyHdl(0);
return 0;
};
-/* -----------------14.07.99 14:21-------------------
- --------------------------------------------------*/
IMPL_LINK(SwTOXSelectTabPage, RadioButtonHdl, RadioButton*, EMPTYARG )
{
sal_Bool bEnable = aFromCaptionsRB.IsChecked();
@@ -1650,9 +1524,7 @@ IMPL_LINK(SwTOXSelectTabPage, RadioButtonHdl, RadioButton*, EMPTYARG )
ModifyHdl(0);
return 0;
}
-/* -----------------------------06.06.01 09:33--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox)
{
Locale aLcl( SvxCreateLocale( aLanguageLB.GetSelectLanguage() ) );
@@ -1691,12 +1563,10 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox)
ModifyHdl(0);
return 0;
};
-/* -----------------14.06.99 13:10-------------------
- --------------------------------------------------*/
IMPL_LINK(SwTOXSelectTabPage, TOXAreaHdl, ListBox*, pBox)
{
- DBG_WARNING("not implemented");
+ OSL_ENSURE(false, "not implemented");
switch((long)pBox->GetEntryData( pBox->GetSelectEntryPos() ))
{
case AREA_DOCUMENT : break;
@@ -1705,47 +1575,6 @@ IMPL_LINK(SwTOXSelectTabPage, TOXAreaHdl, ListBox*, pBox)
return 0;
}
-//#outline level, removed by zhaojianwei
-//It is no longer used!
-///* -----------------14.06.99 13:10-------------------
-//
-// --------------------------------------------------*/
-//IMPL_LINK(SwTOXSelectTabPage, ChapterHdl, PushButton*, pButton)
-//{
-// SwMultiTOXTabDialog* pTOXDlg = (SwMultiTOXTabDialog*)GetTabDialog();
-// SwWrtShell& rSh = pTOXDlg->GetWrtShell();
-//
-// SfxItemSet aTmp(rSh.GetView().GetPool(), FN_PARAM_1, FN_PARAM_1);
-// SwOutlineTabDialog* pDlg = new SwOutlineTabDialog(pButton, &aTmp, rSh);
-//
-// if(RET_OK == pDlg->Execute())
-// {
-// CurTOXType aCurType = pTOXDlg->GetCurrentTOXType();
-// SwForm* pForm = ((SwMultiTOXTabDialog*)GetTabDialog())->GetForm(aCurType);
-// // jetzt muss ueberprueft werden, ob dem sdbcx::Index Ueberschriftenvorlagen
-// // zugewiesen wurden
-// String sStr;
-// for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
-// {
-// sal_Bool bNum = !SwMultiTOXTabDialog::IsNoNum(rSh, pForm->GetTemplate( i + 1 ));
-// if(bNum)
-// {
-// //es gibt getrennte Resourcebereiche fuer die Inhaltsverzeichnisse
-// if(i < 5)
-// SwStyleNameMapper::FillUIName( static_cast< sal_uInt16 >(RES_POOLCOLL_TOX_CNTNT1 + i), sStr );
-// else
-// SwStyleNameMapper::FillUIName( static_cast< sal_uInt16 >(RES_POOLCOLL_TOX_CNTNT6 + i - 5), sStr );
-// pForm->SetTemplate( i + 1, sStr );
-// }
-// }
-//
-// }
-// delete pDlg;
-// return 0;
-//}
-/* -----------------14.06.99 13:10-------------------
-
- --------------------------------------------------*/
IMPL_LINK(SwTOXSelectTabPage, AddStylesHdl, PushButton*, pButton)
{
SwAddStylesDlg_Impl* pDlg = new SwAddStylesDlg_Impl(pButton,
@@ -1756,9 +1585,6 @@ IMPL_LINK(SwTOXSelectTabPage, AddStylesHdl, PushButton*, pButton)
ModifyHdl(0);
return 0;
}
-/* -----------------------------19.01.00 10:59--------------------------------
-
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwTOXSelectTabPage, MenuEnableHdl, Menu*, pMenu)
{
@@ -1797,9 +1623,6 @@ IMPL_LINK(SwTOXSelectTabPage, MenuExecuteHdl, Menu*, pMenu)
return 0;
}
-/* -----------------16.06.99 10:46-------------------
-
- --------------------------------------------------*/
class SwTOXEdit : public Edit
{
SwFormToken aFormToken;
@@ -1838,19 +1661,18 @@ public:
void AdjustSize();
};
-//---------------------------------------------------
void SwTOXEdit::RequestHelp( const HelpEvent& rHEvt )
{
if(!m_pParent->CreateQuickHelp(this, aFormToken, rHEvt))
Edit::RequestHelp(rHEvt);
}
-//---------------------------------------------------
+
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();
@@ -1871,9 +1693,7 @@ void SwTOXEdit::KeyInput( const KeyEvent& rKEvt )
}
Edit::KeyInput(rKEvt);
}
-/* -----------------16.07.99 12:41-------------------
- --------------------------------------------------*/
void SwTOXEdit::AdjustSize()
{
Size aSize(GetSizePixel());
@@ -1883,8 +1703,6 @@ void SwTOXEdit::AdjustSize()
SetSizePixel(aSize);
}
-//---------------------------------------------------
-//---------------------------------------------------
class SwTOXButton : public PushButton
{
SwFormToken aFormToken;
@@ -1963,7 +1781,7 @@ public:
void SetLinkEnd()
{
- DBG_ASSERT(TOKEN_LINK_START == aFormToken.eTokenType,
+ OSL_ENSURE(TOKEN_LINK_START == aFormToken.eTokenType,
"call SetLinkEnd for link start only!");
aFormToken.eTokenType = TOKEN_LINK_END;
aFormToken.sText.AssignAscii(SwForm::aFormLinkEnd);
@@ -1971,7 +1789,7 @@ public:
}
void SetLinkStart()
{
- DBG_ASSERT(TOKEN_LINK_END == aFormToken.eTokenType,
+ OSL_ENSURE(TOKEN_LINK_END == aFormToken.eTokenType,
"call SetLinkStart for link start only!");
aFormToken.eTokenType = TOKEN_LINK_START;
aFormToken.sText.AssignAscii(SwForm::aFormLinkStt);
@@ -1979,7 +1797,6 @@ public:
}
};
-//---------------------------------------------------
void SwTOXButton::KeyInput( const KeyEvent& rKEvt )
{
sal_Bool bCall = sal_False;
@@ -2005,23 +1822,19 @@ void SwTOXButton::KeyInput( const KeyEvent& rKEvt )
else
PushButton::KeyInput(rKEvt);
}
-//---------------------------------------------------
+
void SwTOXButton::RequestHelp( const HelpEvent& rHEvt )
{
if(!m_pParent->CreateQuickHelp(this, aFormToken, rHEvt))
Button::RequestHelp(rHEvt);
}
-/* -----------------------------23.12.99 14:28--------------------------------
- ---------------------------------------------------------------------------*/
SwIdxTreeListBox::SwIdxTreeListBox(SwTOXEntryTabPage* pPar, const ResId& rResId) :
SvTreeListBox(pPar, rResId),
pParent(pPar)
{
}
-/* -----------------------------23.12.99 14:19--------------------------------
- ---------------------------------------------------------------------------*/
void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt )
{
if( rHEvt.GetMode() & HELPMODE_QUICK )
@@ -2059,7 +1872,7 @@ void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt )
else
SvTreeListBox::RequestHelp(rHEvt);
}
-//---------------------------------------------------
+
SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet) :
SfxTabPage(pParent, SW_RES(TP_TOX_ENTRY), rAttrSet),
aLevelFT(this, SW_RES(FT_LEVEL )),
@@ -2146,15 +1959,6 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
aTokenWIN.SetAccessibleRelationMemberOf(&aEntryFL);
aTokenWIN.SetAccessibleRelationLabeledBy(&aTokenFT);
- Image aSortUpHC(SW_RES(IMG_SORTUP_HC ));
- aFirstSortUpRB.SetModeRadioImage(aSortUpHC,BMP_COLOR_HIGHCONTRAST);
- aSecondSortUpRB.SetModeRadioImage(aSortUpHC,BMP_COLOR_HIGHCONTRAST);
- aThirdSortUpRB.SetModeRadioImage(aSortUpHC,BMP_COLOR_HIGHCONTRAST);
-
- Image aSortDownHC(SW_RES(IMG_SORTDOWN_HC ));
- aFirstSortDownRB.SetModeRadioImage(aSortDownHC,BMP_COLOR_HIGHCONTRAST);
- aSecondSortDownRB.SetModeRadioImage(aSortDownHC,BMP_COLOR_HIGHCONTRAST);
- aThirdSortDownRB.SetModeRadioImage(aSortDownHC,BMP_COLOR_HIGHCONTRAST);
FreeResource();
sLevelStr = aLevelFT.GetText();
@@ -2167,7 +1971,6 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
aLastTOXType.eType = (TOXTypes)USHRT_MAX;
aLastTOXType.nIndex = 0;
- //aLevelGBSize = aLevelGB.GetSizePixel();
aLevelFLSize = aLevelFT.GetSizePixel();
SetExchangeSupport();
@@ -2223,7 +2026,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
(aRelToStyleIdxPos.Y() - aAlphaDelimCB.GetPosPixel().Y());
aEditStylePB.Enable(sal_False);
-//get position for Numbering and other stuff
+ //get position for Numbering and other stuff
aChapterEntryFTPosition = aChapterEntryFT.GetPosPixel();
aEntryOutlineLevelFTPosition = aEntryOutlineLevelFT.GetPosPixel();
nBiasToEntryPoint = aEntryOutlineLevelNF.GetPosPixel().X() -
@@ -2259,7 +2062,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
aSecondKeyLB.SelectEntryPos(0);
aThirdKeyLB.SelectEntryPos(0);
}
-/* -----------------30.11.99 13:37-------------------
+/* --------------------------------------------------
pVoid is used as signal to change all levels of the example
--------------------------------------------------*/
IMPL_LINK(SwTOXEntryTabPage, ModifyHdl, void*, pVoid)
@@ -2278,23 +2081,16 @@ IMPL_LINK(SwTOXEntryTabPage, ModifyHdl, void*, pVoid)
return 0;
}
-/*-- 16.06.99 10:47:33---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwTOXEntryTabPage::~SwTOXEntryTabPage()
{
}
-/*-- 16.06.99 10:47:33---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwTOXEntryTabPage::FillItemSet( SfxItemSet& )
{
// nothing to do
return sal_True;
}
-/*-- 16.06.99 10:47:34---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwTOXEntryTabPage::Reset( const SfxItemSet& )
{
SwMultiTOXTabDialog* pTOXDlg = (SwMultiTOXTabDialog*)GetTabDialog();
@@ -2319,27 +2115,21 @@ void SwTOXEntryTabPage::Reset( const SfxItemSet& )
aRelToStyleCB.Check(m_pCurrentForm->IsRelTabPos());
aCommaSeparatedCB.Check(m_pCurrentForm->IsCommaSeparated());
}
-/*-- 16.06.99 10:47:34---------------------------------------------------
- -----------------------------------------------------------------------*/
void lcl_ChgWidth(Window& rWin, long nDiff)
{
Size aTempSz(rWin.GetSizePixel());
aTempSz.Width() += nDiff;
rWin.SetSizePixel(aTempSz);
}
-/* ----------------------------------------------------------------------
- -----------------------------------------------------------------------*/
void lcl_ChgXPos(Window& rWin, long nDiff)
{
Point aTempPos(rWin.GetPosPixel());
aTempPos.X() += nDiff;
rWin.SetPosPixel(aTempPos);
}
-/* ----------------------------------------------------------------------
- -----------------------------------------------------------------------*/
void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
{
SwMultiTOXTabDialog* pTOXDlg = (SwMultiTOXTabDialog*)GetTabDialog();
@@ -2386,7 +2176,7 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
{
const SwTOXSortKey* pKey = pFType->GetSortKey(0);
aFirstKeyLB.SelectEntryPos(
- aFirstKeyLB.GetEntryPos((void*)(sal_uInt32)pKey->eField));
+ aFirstKeyLB.GetEntryPos((void*)(sal_uIntPtr)pKey->eField));
aFirstSortUpRB.Check(pKey->bSortAscending);
aFirstSortDownRB.Check(!pKey->bSortAscending);
}
@@ -2394,7 +2184,7 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
{
const SwTOXSortKey* pKey = pFType->GetSortKey(1);
aSecondKeyLB.SelectEntryPos(
- aSecondKeyLB.GetEntryPos((void*)(sal_uInt32)pKey->eField));
+ aSecondKeyLB.GetEntryPos((void*)(sal_uIntPtr)pKey->eField));
aSecondSortUpRB.Check(pKey->bSortAscending);
aSecondSortDownRB.Check(!pKey->bSortAscending);
}
@@ -2402,7 +2192,7 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
{
const SwTOXSortKey* pKey = pFType->GetSortKey(2);
aThirdKeyLB.SelectEntryPos(
- aThirdKeyLB.GetEntryPos((void*)(sal_uInt32)pKey->eField));
+ aThirdKeyLB.GetEntryPos((void*)(sal_uIntPtr)pKey->eField));
aThirdSortUpRB.Check(pKey->bSortAscending);
aThirdSortDownRB.Check(!pKey->bSortAscending);
}
@@ -2425,13 +2215,11 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
if(nDiff)
{
-// lcl_ChgWidth(aLevelFL, nDiff);
lcl_ChgWidth(aLevelFT, nDiff);
lcl_ChgWidth(aLevelLB, nDiff);
lcl_ChgXPos(aCharStyleFT, nDiff);
lcl_ChgXPos(aCharStyleLB, nDiff);
lcl_ChgWidth(aCharStyleLB, -nDiff);
- // lcl_ChgXPos(aEditStylePB, -nDiff);
lcl_ChgXPos(aFillCharFT, nDiff);
lcl_ChgXPos(aFillCharCB, nDiff);
lcl_ChgXPos(aTabPosFT, nDiff);
@@ -2514,8 +2302,6 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
aRelToStyleCB.SetPosPixel( bToxIsIndex ? aRelToStyleIdxPos
: aRelToStylePos );
-// aRecalcTabCB.Show( aCurType.eType == TOX_CONTENT);
-
aMainEntryStyleFT.Show( bToxIsIndex );
aMainEntryStyleLB.Show( bToxIsIndex );
aAlphaDelimCB.Show( bToxIsIndex );
@@ -2527,9 +2313,7 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
aTokenWIN.SetInvalid();
LevelHdl(&aLevelLB);
}
-/* -----------------30.11.99 15:04-------------------
- --------------------------------------------------*/
void SwTOXEntryTabPage::UpdateDescriptor()
{
WriteBackLevel();
@@ -2569,24 +2353,18 @@ void SwTOXEntryTabPage::UpdateDescriptor()
if(aCommaSeparatedCB.IsVisible())
pCurrentForm->SetCommaSeparated(aCommaSeparatedCB.IsChecked());
}
-/*-- 16.06.99 10:47:34---------------------------------------------------
- -----------------------------------------------------------------------*/
int SwTOXEntryTabPage::DeactivatePage( SfxItemSet* /*pSet*/)
{
UpdateDescriptor();
return LEAVE_PAGE;
}
-/*-- 16.06.99 10:47:34---------------------------------------------------
- -----------------------------------------------------------------------*/
SfxTabPage* SwTOXEntryTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet)
{
return new SwTOXEntryTabPage(pParent, rAttrSet);
}
-/*-- 16.06.99 10:47:35---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwTOXEntryTabPage, EditStyleHdl, PushButton*, pBtn)
{
if( LISTBOX_ENTRY_NOTFOUND != aCharStyleLB.GetSelectEntryPos())
@@ -2605,9 +2383,7 @@ IMPL_LINK(SwTOXEntryTabPage, EditStyleHdl, PushButton*, pBtn)
}
return 0;
}
-/* -----------------04.10.99 11:34-------------------
- --------------------------------------------------*/
IMPL_LINK(SwTOXEntryTabPage, RemoveInsertAuthHdl, PushButton*, pButton)
{
sal_Bool bInsert = pButton == &aAuthInsertPB;
@@ -2625,7 +2401,7 @@ IMPL_LINK(SwTOXEntryTabPage, RemoveInsertAuthHdl, PushButton*, pButton)
else
{
Control* pCtrl = aTokenWIN.GetActiveControl();
- DBG_ASSERT(WINDOW_EDIT != pCtrl->GetType(), "Remove should be disabled");
+ OSL_ENSURE(WINDOW_EDIT != pCtrl->GetType(), "Remove should be disabled");
if( WINDOW_EDIT != pCtrl->GetType() )
{
//fill it into the ListBox
@@ -2637,18 +2413,16 @@ IMPL_LINK(SwTOXEntryTabPage, RemoveInsertAuthHdl, PushButton*, pButton)
ModifyHdl(0);
return 0;
}
-/* -----------------------------17.01.00 13:44--------------------------------
- ---------------------------------------------------------------------------*/
void SwTOXEntryTabPage::PreTokenButtonRemoved(const SwFormToken& rToken)
{
//fill it into the ListBox
sal_uInt32 nData = rToken.nAuthorityField;
String sTemp(SW_RES(STR_AUTH_FIELD_START + nData));
sal_uInt16 nPos = aAuthFieldsLB.InsertEntry(sTemp);
- aAuthFieldsLB.SetEntryData(nPos, (void*)(nData));
+ aAuthFieldsLB.SetEntryData(nPos, (void*)(sal_uIntPtr)(nData));
}
-/*-- 16.06.99 10:47:35---------------------------------------------------
+/*-----------------------------------------------------------------------
This function inizializes the default value in the Token
put here the UI dependent initializations
@@ -2707,9 +2481,7 @@ IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, PushButton*, pBtn)
ModifyHdl(0);
return 0;
}
-/* -----------------------------14.01.00 11:53--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwTOXEntryTabPage, AllLevelsHdl, PushButton*, EMPTYARG)
{
//get current level
@@ -2725,9 +2497,6 @@ IMPL_LINK(SwTOXEntryTabPage, AllLevelsHdl, PushButton*, EMPTYARG)
return 0;
}
-/* -----------------02.12.99 12:40-------------------
-
- --------------------------------------------------*/
void SwTOXEntryTabPage::WriteBackLevel()
{
if(aTokenWIN.IsValid())
@@ -2738,9 +2507,7 @@ void SwTOXEntryTabPage::WriteBackLevel()
m_pCurrentForm->SetPattern(nLastLevel + 1, sNewToken );
}
}
-/*-- 16.06.99 10:47:35---------------------------------------------------
- -----------------------------------------------------------------------*/
IMPL_LINK(SwTOXEntryTabPage, LevelHdl, SvTreeListBox*, pBox)
{
if(bInLevelHdl)
@@ -2758,7 +2525,7 @@ IMPL_LINK(SwTOXEntryTabPage, LevelHdl, SvTreeListBox*, pBox)
{
String sTmp(SW_RES(STR_AUTH_FIELD_START + i));
sal_uInt16 nPos = aAuthFieldsLB.InsertEntry(sTmp);
- aAuthFieldsLB.SetEntryData(nPos, (void*)(i));
+ aAuthFieldsLB.SetEntryData(nPos, (void*)(sal_uIntPtr)(i));
}
// #i21237#
@@ -2771,12 +2538,12 @@ IMPL_LINK(SwTOXEntryTabPage, LevelHdl, SvTreeListBox*, pBox)
if(TOKEN_AUTHORITY == aToken.eTokenType)
{
sal_uInt32 nSearch = aToken.nAuthorityField;
- sal_uInt16 nLstBoxPos = aAuthFieldsLB.GetEntryPos( (void*) nSearch );
- DBG_ASSERT(LISTBOX_ENTRY_NOTFOUND != nLstBoxPos, "Entry not found?");
+ sal_uInt16 nLstBoxPos = aAuthFieldsLB.GetEntryPos( (void*)(sal_uIntPtr)nSearch );
+ OSL_ENSURE(LISTBOX_ENTRY_NOTFOUND != nLstBoxPos, "Entry not found?");
aAuthFieldsLB.RemoveEntry(nLstBoxPos);
}
- aIt++; // #i21237#
+ ++aIt; // #i21237#
}
aAuthFieldsLB.SelectEntryPos(0);
}
@@ -2784,9 +2551,7 @@ IMPL_LINK(SwTOXEntryTabPage, LevelHdl, SvTreeListBox*, pBox)
pBox->GrabFocus();
return 0;
}
-/* -----------------20.10.99 13:16-------------------
- --------------------------------------------------*/
IMPL_LINK(SwTOXEntryTabPage, SortKeyHdl, RadioButton*, pButton)
{
sal_Bool bEnable = &aSortContentRB == pButton;
@@ -2805,16 +2570,13 @@ IMPL_LINK(SwTOXEntryTabPage, SortKeyHdl, RadioButton*, pButton)
aThirdSortDownRB.Enable(bEnable);
return 0;
}
-/* -----------------01.07.99 12:21-------------------
- --------------------------------------------------*/
IMPL_LINK(SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken*, pToken)
{
if(pToken->sCharStyleName.Len())
aCharStyleLB.SelectEntry(pToken->sCharStyleName);
else
aCharStyleLB.SelectEntry(sNoCharStyle);
- //StyleSelectHdl(&aCharStyleLB);
String sEntry = aCharStyleLB.GetSelectEntry();
aEditStylePB.Enable(sEntry != sNoCharStyle);
@@ -2839,13 +2601,6 @@ IMPL_LINK(SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken*, pToken)
}
//<---
//i53420
-//move into position the fixed text
-// aEntryOutlineLevelFT.SetPosPixel( aEntryOutlineLevelFTPosition );
-// // then the entry
-// Point aPoint;
-// aPoint.Y() = aEntryOutlineLevelFTPosition.Y();
-// aPoint.X() = aEntryOutlineLevelFTPosition.X() + nBiasToEntryPoint;
-// aEntryOutlineLevelNF.SetPosPixel( aPoint );
aEntryOutlineLevelNF.SetValue(pToken->nOutlineLevel);
}
@@ -2853,14 +2608,6 @@ IMPL_LINK(SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken*, pToken)
//i53420
if(pToken->eTokenType == TOKEN_ENTRY_NO)
{
-//move into position the fixed text
-// aEntryOutlineLevelFT.SetPosPixel( aChapterEntryFTPosition );
-// // then the entry
-// Point aPoint;
-// aPoint.Y() = aChapterEntryFTPosition.Y();
-// aPoint.X() = aChapterEntryFTPosition.X() + nBiasToEntryPoint;
-// aEntryOutlineLevelNF.SetPosPixel( aPoint );
-
aEntryOutlineLevelNF.SetValue(pToken->nOutlineLevel);
sal_uInt16 nFormat = 0;
if( pToken->nChapterFormat == CF_NUM_NOPREPST_TITLE )
@@ -2941,9 +2688,7 @@ IMPL_LINK(SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken*, pToken)
return 0;
}
-/* -----------------01.07.99 12:36-------------------
- --------------------------------------------------*/
IMPL_LINK(SwTOXEntryTabPage, StyleSelectHdl, ListBox*, pBox)
{
String sEntry = pBox->GetSelectEntry();
@@ -2952,7 +2697,7 @@ IMPL_LINK(SwTOXEntryTabPage, StyleSelectHdl, ListBox*, pBox)
if(sEntry == sNoCharStyle)
sEntry.Erase();
Control* pCtrl = aTokenWIN.GetActiveControl();
- DBG_ASSERT(pCtrl, "no active control?");
+ OSL_ENSURE(pCtrl, "no active control?");
if(pCtrl)
{
if(WINDOW_EDIT == pCtrl->GetType())
@@ -2964,16 +2709,14 @@ IMPL_LINK(SwTOXEntryTabPage, StyleSelectHdl, ListBox*, pBox)
ModifyHdl(0);
return 0;
}
-/* -----------------------------11.01.00 12:54--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwTOXEntryTabPage, ChapterInfoHdl, ListBox*, pBox)
{
sal_uInt16 nPos = pBox->GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nPos)
{
Control* pCtrl = aTokenWIN.GetActiveControl();
- DBG_ASSERT(pCtrl, "no active control?");
+ OSL_ENSURE(pCtrl, "no active control?");
if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
((SwTOXButton*)pCtrl)->SetChapterInfo(nPos);
@@ -2987,7 +2730,7 @@ IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, NumericField*, pField)
const sal_uInt16 nLevel = static_cast<sal_uInt8>(pField->GetValue());
Control* pCtrl = aTokenWIN.GetActiveControl();
- DBG_ASSERT(pCtrl, "no active control?");
+ OSL_ENSURE(pCtrl, "no active control?");
if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
((SwTOXButton*)pCtrl)->SetOutlineLevel(nLevel);
@@ -3002,7 +2745,7 @@ IMPL_LINK(SwTOXEntryTabPage, NumberFormatHdl, ListBox*, pBox)
if(LISTBOX_ENTRY_NOTFOUND != nPos)
{
Control* pCtrl = aTokenWIN.GetActiveControl();
- DBG_ASSERT(pCtrl, "no active control?");
+ OSL_ENSURE(pCtrl, "no active control?");
if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
{
((SwTOXButton*)pCtrl)->SetEntryNumberFormat(nPos);//i89791
@@ -3012,13 +2755,10 @@ IMPL_LINK(SwTOXEntryTabPage, NumberFormatHdl, ListBox*, pBox)
return 0;
}
-/* -----------------19.08.99 15:37-------------------
-
- --------------------------------------------------*/
IMPL_LINK(SwTOXEntryTabPage, TabPosHdl, MetricField*, pField)
{
Control* pCtrl = aTokenWIN.GetActiveControl();
- DBG_ASSERT(pCtrl && WINDOW_EDIT != pCtrl->GetType() &&
+ OSL_ENSURE(pCtrl && WINDOW_EDIT != pCtrl->GetType() &&
TOKEN_TAB_STOP == ((SwTOXButton*)pCtrl)->GetFormToken().eTokenType,
"no active style::TabStop control?");
if( pCtrl && WINDOW_EDIT != pCtrl->GetType() )
@@ -3029,13 +2769,11 @@ IMPL_LINK(SwTOXEntryTabPage, TabPosHdl, MetricField*, pField)
ModifyHdl(0);
return 0;
}
-/* -----------------09.09.99 15:37-------------------
- --------------------------------------------------*/
IMPL_LINK(SwTOXEntryTabPage, FillCharHdl, ComboBox*, pBox)
{
Control* pCtrl = aTokenWIN.GetActiveControl();
- DBG_ASSERT(pCtrl && WINDOW_EDIT != pCtrl->GetType() &&
+ OSL_ENSURE(pCtrl && WINDOW_EDIT != pCtrl->GetType() &&
TOKEN_TAB_STOP == ((SwTOXButton*)pCtrl)->GetFormToken().eTokenType,
"no active style::TabStop control?");
if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
@@ -3051,14 +2789,11 @@ IMPL_LINK(SwTOXEntryTabPage, FillCharHdl, ComboBox*, pBox)
return 0;
}
-/*-- 16.06.99 10:47:36---------------------------------------------------
-
- -----------------------------------------------------------------------*/
IMPL_LINK(SwTOXEntryTabPage, AutoRightHdl, CheckBox*, pBox)
{
//the most right style::TabStop is usually right aligned
Control* pCurCtrl = aTokenWIN.GetActiveControl();
- DBG_ASSERT(WINDOW_EDIT != pCurCtrl->GetType() &&
+ OSL_ENSURE(WINDOW_EDIT != pCurCtrl->GetType() &&
((SwTOXButton*)pCurCtrl)->GetFormToken().eTokenType == TOKEN_TAB_STOP,
"no style::TabStop selected!");
@@ -3072,9 +2807,7 @@ IMPL_LINK(SwTOXEntryTabPage, AutoRightHdl, CheckBox*, pBox)
ModifyHdl(0);
return 0;
}
-/* -----------------16.06.99 11:00-------------------
- --------------------------------------------------*/
void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh)
{
SwDocShell* pDocSh = rSh.GetView().GetDocShell();
@@ -3092,9 +2825,7 @@ void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh)
aMainEntryStyleLB.SelectEntry( SwStyleNameMapper::GetUIName(
RES_POOLCHR_IDX_MAIN_ENTRY, aEmptyStr ));
}
-/* -----------------------------23.12.99 14:23--------------------------------
- ---------------------------------------------------------------------------*/
String SwTOXEntryTabPage::GetLevelHelp(sal_uInt16 nLevel) const
{
String sRet;
@@ -3111,9 +2842,6 @@ String SwTOXEntryTabPage::GetLevelHelp(sal_uInt16 nLevel) const
}
return sRet;
}
-/* -----------------16.06.99 15:18-------------------
-
- --------------------------------------------------*/
SwTokenWindow::SwTokenWindow(SwTOXEntryTabPage* pParent, const ResId& rResId) :
Window( pParent, rResId ),
@@ -3148,50 +2876,25 @@ SwTokenWindow::SwTokenWindow(SwTOXEntryTabPage* pParent, const ResId& rResId) :
aLeftScrollWin.SetClickHdl(aLink);
aRightScrollWin.SetClickHdl(aLink);
}
-/* -----------------01.07.99 12:17-------------------
- --------------------------------------------------*/
SwTokenWindow::~SwTokenWindow()
{
-// for(sal_uInt16 i = GetItemCount(); i ; i--)
-// RemoveItem(i - 1);
-
- for( sal_uInt32 n = 0; n < aControlList.Count(); ++n )
- {
- Control* pControl = aControlList.GetObject( n );
- pControl->SetGetFocusHdl( Link() );
- pControl->SetLoseFocusHdl( Link() );
- }
-
- for( sal_uLong i = aControlList.Count(); i; )
- {
- Control* pControl = aControlList.Remove( --i );
- delete pControl;
- }
}
-/* -----------------16.06.99 13:56-------------------
- --------------------------------------------------*/
void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
{
SetActiveControl(0);
bValid = sal_True;
+
+ //apply current level settings to the form
if(pForm)
- {
- //apply current level settings to the form
- for( sal_uLong i = aControlList.Count(); i; )
- {
- Control* pControl = aControlList.Remove( --i );
- delete pControl;
- }
- }
+ aControlList.clear();
+
nLevel = nL;
pForm = &rForm;
//now the display
if(nLevel < MAXLEVEL || rForm.GetTOXType() == TOX_AUTHORITIES)
{
- Size aToolBoxSize = GetSizePixel();
-
// #i21237#
SwFormTokens aPattern = pForm->GetPattern(nLevel + 1);
SwFormTokens::iterator aIt = aPattern.begin();
@@ -3204,7 +2907,7 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
if(TOKEN_TEXT == aToken.eTokenType)
{
- DBG_ASSERT(!bLastWasText, "text following text is invalid");
+ OSL_ENSURE(!bLastWasText, "text following text is invalid");
Control* pCtrl = InsertItem(aToken.sText, aToken);
bLastWasText = sal_True;
if(!GetActiveControl())
@@ -3240,7 +2943,7 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
bLastWasText = sal_False;
}
- aIt++; // #i21237#
+ ++aIt; // #i21237#
}
if(!bLastWasText)
{
@@ -3254,9 +2957,7 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
}
AdjustScrolling();
}
-/* -----------------19.08.99 13:00-------------------
- --------------------------------------------------*/
void SwTokenWindow::SetActiveControl(Control* pSet)
{
if( pSet != pActiveCtrl )
@@ -3278,28 +2979,30 @@ void SwTokenWindow::SetActiveControl(Control* pSet)
}
}
-/* -----------------17.06.99 09:53-------------------
-
- --------------------------------------------------*/
Control* SwTokenWindow::InsertItem(const String& rText, const SwFormToken& rToken)
{
Control* pRet = 0;
- Control* pLast = aControlList.Last();
Size aControlSize(GetOutputSizePixel());
- Point aControlPos;
- if( pLast )
- {
- aControlSize = pLast->GetSizePixel();
- aControlPos = pLast->GetPosPixel();
+ Point aControlPos;
+
+ if(!aControlList.empty())
+ {
+ ctrl_const_reverse_iterator iterLast = aControlList.rbegin();
+
+ aControlSize = iterLast->GetSizePixel();
+ aControlPos = iterLast->GetPosPixel();
aControlPos.X() += aControlSize.Width();
}
+
if(TOKEN_TEXT == rToken.eTokenType)
{
- SwTOXEdit* pEdit = new SwTOXEdit(&aCtrlParentWin, this, rToken);
+ SwTOXEdit *pEdit = new SwTOXEdit(&aCtrlParentWin, this, rToken);
pEdit->SetPosPixel(aControlPos);
- aControlList.Insert(pEdit, aControlList.Count());
+
+ aControlList.push_back(pEdit);
+
pEdit->SetText(rText);
- Size aEditSize(aControlSize);
+ Size aEditSize(aControlSize);
aEditSize.Width() = pEdit->GetTextWidth(rText) + EDIT_MINWIDTH;
pEdit->SetSizePixel(aEditSize);
pEdit->SetModifyHdl(LINK(this, SwTokenWindow, EditResize ));
@@ -3312,14 +3015,15 @@ Control* SwTokenWindow::InsertItem(const String& rText, const SwFormToken& rT
{
SwTOXButton* pButton = new SwTOXButton(&aCtrlParentWin, this, rToken);
pButton->SetPosPixel(aControlPos);
- aControlList.Insert(pButton, aControlList.Count());
- Size aEditSize(aControlSize);
+
+ aControlList.push_back(pButton);
+
+ Size aEditSize(aControlSize);
aEditSize.Width() = pButton->GetTextWidth(rText) + 5;
-// pButton->SetControlBackground(aCtrlColor);
-// pButton->SetControlForeground(aTextColor);
pButton->SetSizePixel(aEditSize);
pButton->SetPrevNextLink(LINK(this, SwTokenWindow, NextItemBtnHdl));
pButton->SetGetFocusHdl(LINK(this, SwTokenWindow, TbxFocusBtnHdl));
+
if(TOKEN_AUTHORITY != rToken.eTokenType)
pButton->SetText(aButtonTexts[rToken.eTokenType]);
else
@@ -3329,22 +3033,25 @@ Control* SwTokenWindow::InsertItem(const String& rText, const SwFormToken& rT
(ToxAuthorityField)rToken.nAuthorityField));
pButton->SetText(sTmp.Copy(0, 2));
}
+
pButton->Show();
pRet = pButton;
}
+
return pRet;
}
-/* -----------------16.07.99 11:50-------------------
- --------------------------------------------------*/
void SwTokenWindow::InsertAtSelection(
const String& rText,
const SwFormToken& rToken)
{
- DBG_ASSERT(pActiveCtrl, "no active control!");
+ OSL_ENSURE(pActiveCtrl, "no active control!");
+
if(!pActiveCtrl)
return;
+
SwFormToken aToInsertToken(rToken);
+
if(TOKEN_LINK_START == aToInsertToken.eTokenType)
{
//determine if start or end of hyperlink is appropriate
@@ -3356,69 +3063,75 @@ void SwTokenWindow::InsertAtSelection(
//<insert> LS
//<insert> LE
//<insert>
- sal_Bool bPreStartLinkFound = sal_False; //
- sal_Bool bPreEndLinkFound = sal_False;
+ bool bPreStartLinkFound = false;
+ bool bPreEndLinkFound = false;
+
+ const Control *pExchange = 0;
+ ctrl_const_iterator it = aControlList.begin();
- const Control* pControl = aControlList.First();
- const Control* pExchange = 0;
- while( pControl && pActiveCtrl != pControl )
+ while ( it != aControlList.end())
{
- if( WINDOW_EDIT != pControl->GetType())
+ if ((&(*it)) == pActiveCtrl)
+ break;
+
+ if( WINDOW_EDIT != it->GetType())
{
const SwFormToken& rNewToken =
- ((SwTOXButton*)pControl)->GetFormToken();
+ (reinterpret_cast<const SwTOXButton&>(*it)).GetFormToken();
+
if( TOKEN_LINK_START == rNewToken.eTokenType )
{
- bPreStartLinkFound = sal_True;
+ bPreStartLinkFound = true;
pExchange = 0;
}
else if(TOKEN_LINK_END == rNewToken.eTokenType)
{
if( bPreStartLinkFound )
- bPreStartLinkFound = sal_False;
+ bPreStartLinkFound = false;
else
{
- bPreEndLinkFound = sal_False;
- pExchange = pControl;
+ bPreEndLinkFound = false;
+ pExchange = const_cast<Control*>(&(*it));
}
}
}
- pControl = aControlList.Next();
+
+ ++it;
}
- sal_Bool bPostLinkEndFound = sal_False;
- sal_Bool bPostLinkStartFound = sal_False;
+ bool bPostLinkStartFound = false;
+
if(!bPreStartLinkFound && !bPreEndLinkFound)
- while(pControl)
+ {
+ while(it != aControlList.end())
{
- if( pControl != pActiveCtrl &&
- WINDOW_EDIT != pControl->GetType())
+ if( (&(*it)) != pActiveCtrl &&
+ WINDOW_EDIT != it->GetType())
{
const SwFormToken& rNewToken =
- ((SwTOXButton*)pControl)->GetFormToken();
+ reinterpret_cast<const SwTOXButton&>(*it).GetFormToken();
+
if( TOKEN_LINK_START == rNewToken.eTokenType )
{
if(bPostLinkStartFound)
break;
- bPostLinkStartFound = sal_True;
- pExchange = pControl;
+ bPostLinkStartFound = true;
+ pExchange = const_cast<Control*>(&(*it));
}
else if(TOKEN_LINK_END == rNewToken.eTokenType )
{
if(bPostLinkStartFound)
{
- bPostLinkStartFound = sal_False;
+ bPostLinkStartFound = false;
pExchange = 0;
}
- else
- {
- bPostLinkEndFound = sal_True;
- }
break;
}
}
- pControl = aControlList.Next();
+
+ ++it;
}
+ }
if(bPreStartLinkFound)
{
@@ -3428,7 +3141,8 @@ void SwTokenWindow::InsertAtSelection(
if(bPostLinkStartFound)
{
- DBG_ASSERT(pExchange, "no control to exchange?");
+ OSL_ENSURE(pExchange, "no control to exchange?");
+
if(pExchange)
{
((SwTOXButton*)pExchange)->SetLinkEnd();
@@ -3438,7 +3152,8 @@ void SwTokenWindow::InsertAtSelection(
if(bPreEndLinkFound)
{
- DBG_ASSERT(pExchange, "no control to exchange?");
+ OSL_ENSURE(pExchange, "no control to exchange?");
+
if(pExchange)
{
((SwTOXButton*)pExchange)->SetLinkStart();
@@ -3449,15 +3164,18 @@ void SwTokenWindow::InsertAtSelection(
//if the active control is text then insert a new button at the selection
//else replace the button
- sal_uInt32 nActivePos = aControlList.GetPos(pActiveCtrl);
- sal_uInt32 nInsertPos = nActivePos;
+ ctrl_iterator iterActive = FindControl(aControlList,pActiveCtrl);
+ ctrl_iterator iterInsert = iterActive;
Size aControlSize(GetOutputSizePixel());
+
if( WINDOW_EDIT == pActiveCtrl->GetType())
{
- nInsertPos++;
- Selection aSel = ((SwTOXEdit*)pActiveCtrl)->GetSelection();
+ ++iterInsert;
+
+ Selection aSel = ((SwTOXEdit*)pActiveCtrl)->GetSelection();
aSel.Justify();
+
String sEditText = ((SwTOXEdit*)pActiveCtrl)->GetText();
String sLeft = sEditText.Copy( 0, static_cast< sal_uInt16 >(aSel.A()) );
String sRight = sEditText.Copy( static_cast< sal_uInt16 >(aSel.B()),
@@ -3468,7 +3186,9 @@ void SwTokenWindow::InsertAtSelection(
SwFormToken aTmpToken(TOKEN_TEXT);
SwTOXEdit* pEdit = new SwTOXEdit(&aCtrlParentWin, this, aTmpToken);
- aControlList.Insert(pEdit, nActivePos + 1);
+
+ aControlList.insert(iterInsert,pEdit);
+
pEdit->SetText(sRight);
pEdit->SetSizePixel(aControlSize);
pEdit->AdjustSize();
@@ -3479,18 +3199,21 @@ void SwTokenWindow::InsertAtSelection(
}
else
{
- aControlList.Remove(pActiveCtrl);
pActiveCtrl->Hide();
- delete pActiveCtrl;
+ aControlList.erase(iterActive);
}
//now the new button
SwTOXButton* pButton = new SwTOXButton(&aCtrlParentWin, this, aToInsertToken);
- aControlList.Insert(pButton, nInsertPos);
+ aControlList.insert(iterInsert,pButton);
+
pButton->SetPrevNextLink(LINK(this, SwTokenWindow, NextItemBtnHdl));
pButton->SetGetFocusHdl(LINK(this, SwTokenWindow, TbxFocusBtnHdl));
+
if(TOKEN_AUTHORITY != aToInsertToken.eTokenType)
+ {
pButton->SetText(aButtonTexts[aToInsertToken.eTokenType]);
+ }
else
{
//use the first two chars as symbol
@@ -3499,7 +3222,7 @@ void SwTokenWindow::InsertAtSelection(
pButton->SetText(sTmp.Copy(0, 2));
}
- Size aEditSize(GetOutputSizePixel());
+ Size aEditSize(GetOutputSizePixel());
aEditSize.Width() = pButton->GetTextWidth(rText) + 5;
pButton->SetSizePixel(aEditSize);
pButton->Check(sal_True);
@@ -3508,252 +3231,264 @@ void SwTokenWindow::InsertAtSelection(
AdjustPositions();
}
-/* -----------------19.08.99 12:42-------------------
- --------------------------------------------------*/
void SwTokenWindow::RemoveControl(SwTOXButton* pDel, sal_Bool bInternalCall )
{
if(bInternalCall && TOX_AUTHORITIES == pForm->GetTOXType())
m_pParent->PreTokenButtonRemoved(pDel->GetFormToken());
- sal_uInt32 nActivePos = aControlList.GetPos(pDel);
- DBG_ASSERT(nActivePos != 0xffffffff, "Control does not exist!");
+ ctrl_iterator it = FindControl(aControlList,pDel);
+
+ OSL_ENSURE(it != aControlList.end(), "Control does not exist!");
+
// the two neighbours of the box must be merged
// the properties of the right one will be lost
- DBG_ASSERT(nActivePos && nActivePos < aControlList.Count() - 1,
+ OSL_ENSURE(it != aControlList.begin() && it != aControlList.end() - 1,
"Button at first or last position?");
- aControlList.Seek(nActivePos - 1);
- Control* pLeftEdit = aControlList.GetCurObject();
- aControlList.Seek(nActivePos + 1);
- Control* pRightEdit = aControlList.GetCurObject();
- String sTemp(((SwTOXEdit*)pLeftEdit)->GetText());
- sTemp += ((SwTOXEdit*)pRightEdit)->GetText();
- ((SwTOXEdit*)pLeftEdit)->SetText(sTemp);
- ((SwTOXEdit*)pLeftEdit)->AdjustSize();
-
- aControlList.Remove(pRightEdit);
- delete pRightEdit;
-
- aControlList.Remove(pDel);
+
+ Control *pLeftCtrl = const_cast<Control*>(&(*(it-1)));
+ Control *pRightCtrl = const_cast<Control*>(&(*(it+1)));
+
+ String sTemp(((SwTOXEdit*)pLeftCtrl)->GetText());
+ sTemp += ((SwTOXEdit*)pRightCtrl)->GetText();
+ ((SwTOXEdit*)pLeftCtrl)->SetText(sTemp);
+ ((SwTOXEdit*)pLeftCtrl)->AdjustSize();
+
+ aControlList.erase(it+1);
+ aControlList.erase(it);
+
pActiveCtrl->Hide();
- delete pActiveCtrl;
- SetActiveControl(pLeftEdit);
+
+ SetActiveControl(pLeftCtrl);
AdjustPositions();
+
if(aModifyHdl.IsSet())
aModifyHdl.Call(0);
}
-/* -----------------16.07.99 12:39-------------------
-
- --------------------------------------------------*/
void SwTokenWindow::AdjustPositions()
{
- if(aControlList.Count() > 1)
+ if(aControlList.size() > 1)
{
- Control* pCtrl = aControlList.First();
- Point aNextPos = pCtrl->GetPosPixel();
- aNextPos.X() += pCtrl->GetSizePixel().Width();
- while(0 != (pCtrl = aControlList.Next()))
- {
- pCtrl->SetPosPixel(aNextPos);
- aNextPos.X() += pCtrl->GetSizePixel().Width();
+ ctrl_iterator it = aControlList.begin();
+
+ Point aNextPos = it->GetPosPixel();
+ aNextPos.X() += it->GetSizePixel().Width();
+
+ for (++it; it != aControlList.end(); ++it)
+ {
+ it->SetPosPixel(aNextPos);
+ aNextPos.X() += it->GetSizePixel().Width();
}
+
AdjustScrolling();
}
};
-/* -----------------------------16.08.00 13:22--------------------------------
- ---------------------------------------------------------------------------*/
void SwTokenWindow::MoveControls(long nOffset)
{
// move the complete list
- Control* pCtrl = aControlList.First();
- do
+ for (ctrl_iterator it = aControlList.begin(); it != aControlList.end(); ++it)
{
- Point aPos = pCtrl->GetPosPixel();
+ Point aPos = it->GetPosPixel();
aPos.X() += nOffset;
- pCtrl->SetPosPixel(aPos);
- }while(0 != (pCtrl = aControlList.Next()));
+
+ it->SetPosPixel(aPos);
+ }
}
-/* -----------------------------14.01.00 13:03--------------------------------
- ---------------------------------------------------------------------------*/
void SwTokenWindow::AdjustScrolling()
{
- if(aControlList.Count() > 1)
+ if(aControlList.size() > 1)
{
//validate scroll buttons
- Control* pLastCtrl = aControlList.Last();
- Control* pFirstCtrl = aControlList.First();
+ ctrl_const_reverse_iterator iterLast = aControlList.rbegin();
+ ctrl_const_iterator iterFirst = aControlList.begin();
+
long nSpace = aCtrlParentWin.GetSizePixel().Width();
- long nWidth = pLastCtrl->GetPosPixel().X() - pFirstCtrl->GetPosPixel().X()
- + pLastCtrl->GetSizePixel().Width();
- sal_Bool bEnable = nWidth > nSpace;
+ long nWidth = iterLast->GetPosPixel().X() - iterFirst->GetPosPixel().X()
+ + iterLast->GetSizePixel().Width();
+ bool bEnable = nWidth > nSpace;
//the active control must be visible
if(bEnable && pActiveCtrl)
{
- Point aActivePos(pActiveCtrl->GetPosPixel());
long nMove = 0;
+ Point aActivePos(pActiveCtrl->GetPosPixel());
+
if(aActivePos.X() < 0)
nMove = -aActivePos.X();
else if((aActivePos.X() + pActiveCtrl->GetSizePixel().Width()) > nSpace)
nMove = -(aActivePos.X() + pActiveCtrl->GetSizePixel().Width() - nSpace);
+
if(nMove)
MoveControls(nMove);
- aLeftScrollWin.Enable(aControlList.First()->GetPosPixel().X() < 0);
- Control* pCtrl = aControlList.Last();
- aRightScrollWin.Enable((pCtrl->GetPosPixel().X() + pCtrl->GetSizePixel().Width()) > nSpace);
+
+ aLeftScrollWin.Enable(iterFirst->GetPosPixel().X() < 0);
+ aRightScrollWin.Enable((iterLast->GetPosPixel().X() + iterLast->GetSizePixel().Width()) > nSpace);
}
else
{
- if(pFirstCtrl)
- {
- //if the control fits into the space then the first control must be at postion 0
- long nFirstPos = pFirstCtrl->GetPosPixel().X();
- if(nFirstPos != 0)
- MoveControls(-nFirstPos);
- }
- aRightScrollWin.Enable(sal_False);
- aLeftScrollWin.Enable(sal_False);
+ //if the control fits into the space then the first control must be at postion 0
+ long nFirstPos = iterFirst->GetPosPixel().X();
+
+ if(nFirstPos != 0)
+ MoveControls(-nFirstPos);
+
+ aRightScrollWin.Enable(false);
+ aLeftScrollWin.Enable(false);
}
}
}
-/* -----------------------------14.01.00 13:57--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwTokenWindow, ScrollHdl, ImageButton*, pBtn )
{
- if(aControlList.Count())
- {
- const long nSpace = aCtrlParentWin.GetSizePixel().Width();
+ if(aControlList.empty())
+ return 0;
+
+ const long nSpace = aCtrlParentWin.GetSizePixel().Width();
+
#if OSL_DEBUG_LEVEL > 1
//find all start/end positions and print it
String sMessage(String::CreateFromAscii("Space: "));
sMessage += String::CreateFromInt32(nSpace);
sMessage += String::CreateFromAscii(" | ");
- Control* pDebugCtrl = aControlList.First();
- do
+
+ for (ctrl_const_iterator it = aControlList.begin(); it != aControlList.end(); ++it)
{
- long nDebugXPos = pDebugCtrl->GetPosPixel().X();
- long nDebugWidth = pDebugCtrl->GetSizePixel().Width();
+ long nDebugXPos = it->GetPosPixel().X();
+ long nDebugWidth = it->GetSizePixel().Width();
+
sMessage += String::CreateFromInt32( nDebugXPos );
sMessage += String::CreateFromAscii(" ");
sMessage += String::CreateFromInt32(nDebugXPos + nDebugWidth);
sMessage += String::CreateFromAscii(" | ");
-
- }while(0 != (pDebugCtrl = aControlList.Next()));
+ }
#endif
- long nMove = 0;
- if(pBtn == &aLeftScrollWin)
+ long nMove = 0;
+ if(pBtn == &aLeftScrollWin)
+ {
+ //find the first completely visible control (left edge visible)
+ for (ctrl_iterator it = aControlList.begin(); it != aControlList.end(); ++it)
{
- //find the first completely visible control (left edge visible)
- for(sal_uInt16 i = 0; i < aControlList.Count(); i++ )
+ long nXPos = it->GetPosPixel().X();
+
+ if (nXPos >= 0)
{
- Control* pCtrl = aControlList.GetObject(i);
- long nXPos = pCtrl->GetPosPixel().X();
- if(nXPos >= 0)
+ if(it == aControlList.begin())
{
- if(!i)
- //move the current control to the left edge
- nMove = -nXPos;
- else
- //move the left neighbor to the start position
- nMove = -aControlList.GetObject(i - 1)->GetPosPixel().X();
- break;
+ //move the current control to the left edge
+ nMove = -nXPos;
}
+ else
+ {
+ //move the left neighbor to the start position
+ ctrl_iterator iterLeft = it-1;
+ nMove = -iterLeft->GetPosPixel().X();
+ }
+
+ break;
}
}
- else
+ }
+ else
+ {
+ //find the first completely visible control (right edge visible)
+ for (ctrl_reverse_iterator it = aControlList.rbegin(); it != aControlList.rend(); ++it)
{
- //find the first completely visible control (left edge visible)
- for(sal_uLong i = aControlList.Count(); i; i-- )
+ long nCtrlWidth = it->GetSizePixel().Width();
+ long nXPos = it->GetPosPixel().X() + nCtrlWidth;
+
+ if (nXPos <= nSpace)
{
- Control* pCtrl = aControlList.GetObject(i - 1);
- long nCtrlWidth = pCtrl->GetSizePixel().Width();
- long nXPos = pCtrl->GetPosPixel().X() + nCtrlWidth;
- if(nXPos <= nSpace)
+ if (it != aControlList.rbegin())
{
- if( i < aControlList.Count())
- {
- //move the right neighbor to the right edge right aligned
- Control* pRight = aControlList.GetObject(i);
- nMove = nSpace - pRight->GetPosPixel().X() - pRight->GetSizePixel().Width();
- }
- break;
+ //move the right neighbor to the right edge right aligned
+ ctrl_reverse_iterator iterRight = it-1;
+ nMove = nSpace - iterRight->GetPosPixel().X() - iterRight->GetSizePixel().Width();
}
- }
- //move it left until it's completely visible
+ break;
+ }
}
- if(nMove)
+
+ //move it left until it's completely visible
+ }
+
+ if(nMove)
+ {
+ // move the complete list
+ for (ctrl_iterator it = aControlList.begin(); it != aControlList.end(); ++it)
{
- // move the complete list
- Control* pCtrl = aControlList.First();
- do
- {
- Point aPos = pCtrl->GetPosPixel();
- aPos.X() += nMove;
- pCtrl->SetPosPixel(aPos);
- }while(0 != (pCtrl = aControlList.Next()));
- aLeftScrollWin.Enable(aControlList.First()->GetPosPixel().X() < 0);
- pCtrl = aControlList.Last();
- aRightScrollWin.Enable((pCtrl->GetPosPixel().X() + pCtrl->GetSizePixel().Width()) > nSpace);
+ Point aPos = it->GetPosPixel();
+
+ aPos.X() += nMove;
+
+ it->SetPosPixel(aPos);
+ }
+
+ ctrl_iterator iterCtrl = aControlList.begin();
+ aLeftScrollWin.Enable(iterCtrl->GetPosPixel().X() < 0);
+
+ iterCtrl = aControlList.end()-1;
+ aRightScrollWin.Enable((iterCtrl->GetPosPixel().X() + iterCtrl->GetSizePixel().Width()) > nSpace);
#if OSL_DEBUG_LEVEL > 1
- sMessage.AppendAscii("Move: ");
- sMessage += String::CreateFromInt32(nMove);
- GetParent()->GetParent()->GetParent()->SetText(sMessage);
+ sMessage.AppendAscii("Move: ");
+ sMessage += String::CreateFromInt32(nMove);
+ GetParent()->GetParent()->GetParent()->SetText(sMessage);
#endif
- }
}
+
return 0;
}
-/* -----------------17.06.99 11:59-------------------
- --------------------------------------------------*/
String SwTokenWindow::GetPattern() const
{
String sRet;
- const Control* pControl = ((SwTokenWindow*)this)->aControlList.First();
- while(pControl)
+ const Control *ctrl = 0;
+ for (ctrl_const_iterator it = aControlList.begin(); it != aControlList.end(); ++it)
{
- const SwFormToken& rNewToken = WINDOW_EDIT == pControl->GetType()
- ? ((SwTOXEdit*)pControl)->GetFormToken()
- : ((SwTOXButton*)pControl)->GetFormToken();
+ ctrl = &(*it);
+
+ const SwFormToken& rNewToken = WINDOW_EDIT == ctrl->GetType()
+ ? ((SwTOXEdit*)ctrl)->GetFormToken()
+ : ((SwTOXButton*)ctrl)->GetFormToken();
//TODO: prevent input of TOX_STYLE_DELIMITER in KeyInput
sRet += rNewToken.GetString();
-
- pControl = ((SwTokenWindow*)this)->aControlList.Next();
}
+
return sRet;
}
-/* -----------------19.08.99 11:27-------------------
+/* --------------------------------------------------
Description: Check if a control of the specified
TokenType is already contained in the list
--------------------------------------------------*/
sal_Bool SwTokenWindow::Contains(FormTokenType eSearchFor) const
{
- sal_Bool bRet = sal_False;
- const Control* pControl = ((SwTokenWindow*)this)->aControlList.First();
- while(pControl)
+ bool bRet = false;
+ const Control* pControl = 0;
+
+ for (ctrl_const_iterator it = aControlList.begin(); it != aControlList.end(); ++it)
{
+ pControl = &(*it);
+
const SwFormToken& rNewToken = WINDOW_EDIT == pControl->GetType()
? ((SwTOXEdit*)pControl)->GetFormToken()
: ((SwTOXButton*)pControl)->GetFormToken();
- if(eSearchFor == rNewToken.eTokenType)
+ if (eSearchFor == rNewToken.eTokenType)
{
- bRet = sal_True;
+ bRet = true;
break;
}
- pControl = ((SwTokenWindow*)this)->aControlList.Next();
}
+
return bRet;
}
-//---------------------------------------------------
+
sal_Bool SwTokenWindow::CreateQuickHelp(Control* pCtrl,
const SwFormToken& rToken,
const HelpEvent& rHEvt)
@@ -3775,8 +3510,6 @@ sal_Bool SwTokenWindow::CreateQuickHelp(Control* pCtrl,
Rectangle aItemRect( aPos, pCtrl->GetSizePixel() );
if(rToken.eTokenType == TOKEN_TAB_STOP )
{
-// sEntry += '\n';
-// sEntry += rToken.nTabStopPosition;
}
else
{
@@ -3801,9 +3534,7 @@ sal_Bool SwTokenWindow::CreateQuickHelp(Control* pCtrl,
}
return bRet;
}
-/* -----------------------------14.01.00 12:22--------------------------------
- ---------------------------------------------------------------------------*/
void SwTokenWindow::Resize()
{
Size aCompleteSize(GetOutputSizePixel());
@@ -3821,9 +3552,6 @@ void SwTokenWindow::Resize()
aCtrlParentWin.SetSizePixel(aMiddleSize);
}
-/* -----------------16.06.99 15:23-------------------
-
- --------------------------------------------------*/
IMPL_LINK(SwTokenWindow, EditResize, Edit*, pEdit)
{
((SwTOXEdit*)pEdit)->AdjustSize();
@@ -3832,106 +3560,122 @@ IMPL_LINK(SwTokenWindow, EditResize, Edit*, pEdit)
aModifyHdl.Call(0);
return 0;
}
-/* -----------------16.06.99 15:56-------------------
- --------------------------------------------------*/
IMPL_LINK(SwTokenWindow, NextItemHdl, SwTOXEdit*, pEdit)
{
- sal_uInt16 nPos = (sal_uInt16)aControlList.GetPos(pEdit);
- if( (nPos && !pEdit->IsNextControl()) ||
- (nPos < aControlList.Count() - 1 && pEdit->IsNextControl()))
+ ctrl_iterator it = FindControl(aControlList,pEdit);
+
+ if (it == aControlList.end())
+ return 0;
+
+ ctrl_iterator lastIter = aControlList.end()-1;
+
+ if ((it != aControlList.begin() && !pEdit->IsNextControl()) ||
+ (it != lastIter && pEdit->IsNextControl()))
{
- aControlList.Seek(nPos);
- Control* pNextPrev = pEdit->IsNextControl() ? aControlList.Next() : aControlList.Prev();
- nPos += pEdit->IsNextControl() ? 1 : -1;
- pNextPrev->GrabFocus();
- ((SwTOXButton*)pNextPrev)->Check();
+ ctrl_iterator iterFocus = it;
+
+ pEdit->IsNextControl() ? ++iterFocus : --iterFocus;
+
+ Control *pCtrlFocus = &(*iterFocus);
+
+ pCtrlFocus->GrabFocus();
+
+ reinterpret_cast<SwTOXButton*>(pCtrlFocus)->Check();
+
AdjustScrolling();
}
+
return 0;
}
-/* -----------------17.06.99 08:58-------------------
- --------------------------------------------------*/
IMPL_LINK(SwTokenWindow, TbxFocusHdl, SwTOXEdit*, pEdit)
{
- for(sal_uInt16 i = 0; i < aControlList.Count(); i++)
+ for (ctrl_iterator it = aControlList.begin(); it != aControlList.end(); ++it)
{
- Control* pControl = aControlList.First();
- while(pControl)
- {
- if(WINDOW_EDIT != pControl->GetType() )
- ((SwTOXButton*)pControl)->Check(sal_False);
- pControl = aControlList.Next();
- }
+ Control *pCtrl = &(*it);
+
+ if (pCtrl && pCtrl->GetType() != WINDOW_EDIT)
+ reinterpret_cast<SwTOXButton*>(pCtrl)->Check(false);
}
+
SetActiveControl(pEdit);
+
return 0;
}
-/* -----------------17.06.99 10:05-------------------
- --------------------------------------------------*/
IMPL_LINK(SwTokenWindow, NextItemBtnHdl, SwTOXButton*, pBtn )
{
- sal_uInt16 nPos = (sal_uInt16)aControlList.GetPos(pBtn);
- if( (nPos && !pBtn->IsNextControl()) ||
- (nPos < aControlList.Count() - 1 && pBtn->IsNextControl()))
+ ctrl_iterator iter = FindControl(aControlList,pBtn);
+
+ if (iter == aControlList.end())
+ return 0;
+
+ ctrl_iterator lastIter = aControlList.end()-1;
+
+ if((iter != aControlList.begin() && !pBtn->IsNextControl()) ||
+ (iter != lastIter && pBtn->IsNextControl()))
{
- aControlList.Seek(nPos);
- sal_Bool bNext = pBtn->IsNextControl();
- Control* pNextPrev = bNext ? aControlList.Next() : aControlList.Prev();
- pNextPrev->GrabFocus();
- Selection aSel(0, 0);
+ bool bNext = pBtn->IsNextControl();
+
+ ctrl_iterator iterFocus = iter;
+
+ bNext ? ++iterFocus : --iterFocus;
+
+ Control *pCtrlFocus = &(*iterFocus);
+
+ pCtrlFocus->GrabFocus();
+
+ Selection aSel(0,0);
+
if(!bNext)
{
- sal_uInt16 nLen = ((SwTOXEdit*)pNextPrev)->GetText().Len();
+ sal_uInt16 nLen = ((SwTOXEdit*)pCtrlFocus)->GetText().Len();
aSel.A() = nLen;
aSel.B() = nLen;
}
- ((SwTOXEdit*)pNextPrev)->SetSelection(aSel);
- pBtn->Check(sal_False);
+
+ reinterpret_cast<SwTOXEdit*>(pCtrlFocus)->SetSelection(aSel);
+
+ pBtn->Check(false);
+
AdjustScrolling();
}
+
return 0;
}
-/* -----------------17.06.99 10:04-------------------
-
- --------------------------------------------------*/
IMPL_LINK(SwTokenWindow, TbxFocusBtnHdl, SwTOXButton*, pBtn )
{
- for(sal_uInt16 i = 0; i < aControlList.Count(); i++)
+ Control *pControl = 0;
+ for (ctrl_iterator sit = aControlList.begin(); sit != aControlList.end(); ++sit)
{
- Control* pControl = aControlList.First();
- while(pControl)
- {
- if(WINDOW_EDIT != pControl->GetType() )
- ((SwTOXButton*)pControl)->Check(pBtn == pControl);
- pControl = aControlList.Next();
- }
+ pControl = &(*sit);
+
+ if (pControl && WINDOW_EDIT != pControl->GetType())
+ reinterpret_cast<SwTOXButton*>(pControl)->Check(pBtn == pControl);
}
+
SetActiveControl(pBtn);
+
return 0;
}
-/* -----------------------------28.01.2002 12:22------------------------------
- ---------------------------------------------------------------------------*/
void SwTokenWindow::GetFocus()
{
if(GETFOCUS_TAB & GetGetFocusFlags())
{
- Control* pFirst = aControlList.First();
- if(pFirst)
- {
+ if (!aControlList.empty())
+ {
+ Control *pFirst = &(*aControlList.begin());
+
pFirst->GrabFocus();
SetActiveControl(pFirst);
AdjustScrolling();
- }
+ }
}
}
-/* -----------------25.03.99 15:17-------------------
- *
- * --------------------------------------------------*/
+
SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrSet ) :
SfxTabPage(pParent, SW_RES(TP_TOX_STYLES), rAttrSet),
aFormatFL(this, SW_RES(FL_FORMAT )),
@@ -3948,8 +3692,6 @@ SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrS
SetExchangeSupport( sal_True );
- aAssignBT.SetModeImage( Image( SW_RES( IMG_ONE_LEFT_HC ) ), BMP_COLOR_HIGHCONTRAST );
-
aEditStyleBT.SetClickHdl (LINK( this, SwTOXStylesTabPage, EditStyleHdl));
aAssignBT.SetClickHdl (LINK( this, SwTOXStylesTabPage, AssignHdl));
aStdBT.SetClickHdl (LINK( this, SwTOXStylesTabPage, StdHdl));
@@ -3962,30 +3704,22 @@ SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrS
aEditStyleBT.SetAccessibleRelationMemberOf(&aFormatFL);
}
-/* -----------------25.03.99 15:17-------------------
- *
- * --------------------------------------------------*/
+
SwTOXStylesTabPage::~SwTOXStylesTabPage()
{
delete m_pCurrentForm;
}
-/* -----------------25.03.99 15:17-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwTOXStylesTabPage::FillItemSet( SfxItemSet& )
{
return sal_True;
}
-/* -----------------25.03.99 15:17-------------------
- *
- * --------------------------------------------------*/
+
void SwTOXStylesTabPage::Reset( const SfxItemSet& rSet )
{
ActivatePage(rSet);
}
-/* -----------------25.03.99 15:17-------------------
- *
- * --------------------------------------------------*/
+
void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& )
{
m_pCurrentForm = new SwForm(GetForm());
@@ -4052,39 +3786,31 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& )
EnableSelectHdl(&aParaLayLB);
}
-/* -----------------25.03.99 15:17-------------------
- *
- * --------------------------------------------------*/
+
int SwTOXStylesTabPage::DeactivatePage( SfxItemSet* /*pSet*/ )
{
GetForm() = *m_pCurrentForm;
return LEAVE_PAGE;
}
-/* -----------------25.03.99 15:17-------------------
- *
- * --------------------------------------------------*/
SfxTabPage* SwTOXStylesTabPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
return new SwTOXStylesTabPage(pParent, rAttrSet);
}
-/* -----------------26.03.99 12:47-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwTOXStylesTabPage, EditStyleHdl, Button *, pBtn )
{
if( LISTBOX_ENTRY_NOTFOUND != aParaLayLB.GetSelectEntryPos())
{
SfxStringItem aStyle(SID_STYLE_EDIT, aParaLayLB.GetSelectEntry());
SfxUInt16Item aFamily(SID_STYLE_FAMILY, SFX_STYLE_FAMILY_PARA);
-// SwPtrItem aShell(FN_PARAM_WRTSHELL, pWrtShell);
Window* pDefDlgParent = Application::GetDefDialogParent();
Application::SetDefDialogParent( pBtn );
SwWrtShell& rSh = ((SwMultiTOXTabDialog*)GetTabDialog())->GetWrtShell();
rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(
SID_STYLE_EDIT, SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_MODAL,
- &aStyle, &aFamily/*, &aShell*/, 0L);
+ &aStyle, &aFamily, 0L);
Application::SetDefDialogParent( pDefDlgParent );
}
return 0;
@@ -4118,9 +3844,7 @@ IMPL_LINK( SwTOXStylesTabPage, AssignHdl, Button *, EMPTYARG )
}
return 0;
}
-/* -----------------26.03.99 09:10-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwTOXStylesTabPage, StdHdl, Button *, EMPTYARG )
{
sal_uInt16 nPos = aLevelLB.GetSelectEntryPos();
@@ -4137,9 +3861,7 @@ IMPL_LINK( SwTOXStylesTabPage, StdHdl, Button *, EMPTYARG )
}
return 0;
}
-/* -----------------26.03.99 09:11-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK_INLINE_START( SwTOXStylesTabPage, DoubleClickHdl, Button *, EMPTYARG )
{
String aTmpName( aParaLayLB.GetSelectEntry() );
@@ -4151,12 +3873,12 @@ IMPL_LINK_INLINE_START( SwTOXStylesTabPage, DoubleClickHdl, Button *, EMPTYARG )
return 0;
}
IMPL_LINK_INLINE_END( SwTOXStylesTabPage, DoubleClickHdl, Button *, EMPTYARG )
+
/*--------------------------------------------------------------------
Beschreibung: nur wenn selektiert enable
--------------------------------------------------------------------*/
IMPL_LINK( SwTOXStylesTabPage, EnableSelectHdl, ListBox *, EMPTYARG )
{
- //UpdatePattern();
aStdBT.Enable(aLevelLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND);
SwWrtShell& rSh = ((SwMultiTOXTabDialog*)GetTabDialog())->GetWrtShell();
@@ -4167,9 +3889,7 @@ IMPL_LINK( SwTOXStylesTabPage, EnableSelectHdl, ListBox *, EMPTYARG )
aEditStyleBT.Enable(aParaLayLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND );
return 0;
}
-/* -----------------------------18.01.00 16:54--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwTOXStylesTabPage, ModifyHdl, void*, EMPTYARG)
{
SwMultiTOXTabDialog* pTOXDlg = (SwMultiTOXTabDialog*)GetTabDialog();
@@ -4180,9 +3900,7 @@ IMPL_LINK(SwTOXStylesTabPage, ModifyHdl, void*, EMPTYARG)
}
return 0;
}
-/******************************************************************************
-******************************************************************************/
#define ITEM_SEARCH 1
#define ITEM_ALTERNATIVE 2
#define ITEM_PRIM_KEY 3
@@ -4251,17 +3969,13 @@ SwEntryBrowseBox::SwEntryBrowseBox(Window* pParent, const ResId& rId,
HIB_STDSTYLE, HEADERBAR_APPEND );
}
-/* -----------------------------19.01.00 11:29--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwEntryBrowseBox::SeekRow( long nRow )
{
nCurrentRow = nRow;
return sal_True;
}
-/* -----------------------------19.01.00 15:32--------------------------------
- ---------------------------------------------------------------------------*/
String SwEntryBrowseBox::GetCellText(long nRow, sal_uInt16 nColumn) const
{
const String* pRet = &aEmptyStr;
@@ -4282,9 +3996,6 @@ String SwEntryBrowseBox::GetCellText(long nRow, sal_uInt16 nColumn) const
return *pRet;
}
-/* -----------------------------19.01.00 11:29--------------------------------
-
- ---------------------------------------------------------------------------*/
void SwEntryBrowseBox::PaintCell(OutputDevice& rDev,
const Rectangle& rRect, sal_uInt16 nColumnId) const
{
@@ -4292,16 +4003,12 @@ void SwEntryBrowseBox::PaintCell(OutputDevice& rDev,
sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_CENTER;
rDev.DrawText( rRect, sPaint, nStyle );
}
-/* -----------------------------19.01.00 14:51--------------------------------
- ---------------------------------------------------------------------------*/
::svt::CellController* SwEntryBrowseBox::GetController(long /*nRow*/, sal_uInt16 nCol)
{
return nCol < ITEM_CASE ? xController : xCheckController;
}
-/* -----------------------------19.01.00 15:36--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwEntryBrowseBox::SaveModified()
{
SetModified();
@@ -4345,9 +4052,7 @@ sal_Bool SwEntryBrowseBox::SaveModified()
}
return sal_True;
}
-/* -----------------------------19.01.00 14:32--------------------------------
- ---------------------------------------------------------------------------*/
void SwEntryBrowseBox::InitController(
::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol)
{
@@ -4366,9 +4071,7 @@ void SwEntryBrowseBox::InitController(
rTxt == sYes );
}
}
-/* -----------------------------19.01.00 12:19--------------------------------
- ---------------------------------------------------------------------------*/
void SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
{
AutoMarkEntry* pToInsert = 0;
@@ -4421,9 +4124,7 @@ void SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
aEntryArr.Insert(pToInsert, aEntryArr.Count());
RowInserted(0, aEntryArr.Count() + 1, sal_True);
}
-/* -----------------------------19.01.00 12:19--------------------------------
- ---------------------------------------------------------------------------*/
void SwEntryBrowseBox::WriteEntries(SvStream& rOutStr)
{
//check if the current controller is modified
@@ -4463,9 +4164,7 @@ void SwEntryBrowseBox::WriteEntries(SvStream& rOutStr)
rOutStr.WriteByteStringLine( sWrite, eTEnc );
}
}
-/* -----------------------------21.01.00 11:49--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwEntryBrowseBox::IsModified()const
{
if(bModified)
@@ -4481,9 +4180,7 @@ sal_Bool SwEntryBrowseBox::IsModified()const
pController = xCheckController;
return pController ->IsModified();
}
-/* -----------------------------19.01.00 11:29--------------------------------
- ---------------------------------------------------------------------------*/
SwAutoMarkDlg_Impl::SwAutoMarkDlg_Impl(Window* pParent, const String& rAutoMarkURL,
const String& rAutoMarkType, sal_Bool bCreate) :
ModalDialog(pParent, SW_RES(DLG_CREATE_AUTOMARK)),
@@ -4518,15 +4215,11 @@ SwAutoMarkDlg_Impl::SwAutoMarkDlg_Impl(Window* pParent, const String& rAutoMarkU
if(bError)
EndDialog(RET_CANCEL);
}
-/* -----------------------------19.01.00 11:12--------------------------------
- ---------------------------------------------------------------------------*/
SwAutoMarkDlg_Impl::~SwAutoMarkDlg_Impl()
{
}
-/* -----------------------------19.01.00 16:43--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwAutoMarkDlg_Impl, OkHdl, OKButton*, EMPTYARG)
{
sal_Bool bError = sal_False;
@@ -4551,3 +4244,4 @@ IMPL_LINK(SwAutoMarkDlg_Impl, OkHdl, OKButton*, EMPTYARG)
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/index/cnttab.hrc b/sw/source/ui/index/cnttab.hrc
index 4a3457b3ce81..b6170bf53176 100644
--- a/sw/source/ui/index/cnttab.hrc
+++ b/sw/source/ui/index/cnttab.hrc
@@ -223,8 +223,6 @@
#define LB_LANGUAGE 146
#define FT_SORTALG 147
#define LB_SORTALG 148
-#define IMG_SORTUP_HC 149
-#define IMG_SORTDOWN_HC 150
#define ST_NO_BRACKET 151
#define FT_LEVEL_OL 152
diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src
index a21d8920c78d..9559aee6fab5 100644
--- a/sw/source/ui/index/cnttab.src
+++ b/sw/source/ui/index/cnttab.src
@@ -964,16 +964,6 @@ TabPage TP_TOX_ENTRY
Border = TRUE;
DropDown = TRUE;
};
- Image IMG_SORTUP_HC
- {
- ImageBitmap = Bitmap{File = "sch10712.bmp"; };
- MaskColor = IMAGE_MASK_COLOR ;
- };
- Image IMG_SORTDOWN_HC
- {
- ImageBitmap = Bitmap{File = "sch10713.bmp"; };
- MaskColor = IMAGE_MASK_COLOR ;
- };
ImageRadioButton RB_SORTUP1
{
HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP1";
diff --git a/sw/source/ui/index/idxmrk.cxx b/sw/source/ui/index/idxmrk.cxx
index 24a3c7ddf91e..5884f12b67aa 100644
--- a/sw/source/ui/index/idxmrk.cxx
+++ b/sw/source/ui/index/idxmrk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <hintids.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#define _SVSTDARR_STRINGSSORT
#include <svl/svstdarr.hxx>
#include <comphelper/processfactory.hxx>
@@ -43,9 +42,7 @@
#include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp>
#include <svl/stritem.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/dispatch.hxx>
#include <svl/eitem.hxx>
#include <svtools/txtcmp.hxx>
@@ -56,20 +53,12 @@
#include <idxmrk.hxx>
#include <txttxmrk.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <multmrk.hxx>
#include <swundo.hxx> // fuer Undo-Ids
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _INDEX_HRC
#include <index.hrc>
-#endif
-#ifndef _IDXMRK_HRC
#include <idxmrk.hrc>
-#endif
#include <swmodule.hxx>
#include <fldmgr.hxx>
#include <fldbas.hxx>
@@ -79,10 +68,6 @@
#include <ndtxt.hxx>
#include <breakit.hxx>
-
-/* -----------------07.09.99 08:15-------------------
-
- --------------------------------------------------*/
SFX_IMPL_CHILDWINDOW(SwInsertIdxMarkWrapper, FN_INSERT_IDX_ENTRY_DLG)
SwInsertIdxMarkWrapper::SwInsertIdxMarkWrapper( Window *pParentWindow,
@@ -92,17 +77,15 @@ SwInsertIdxMarkWrapper::SwInsertIdxMarkWrapper( Window *pParentWindow,
SfxChildWindow(pParentWindow, nId)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pAbstDlg = pFact->CreateIndexMarkFloatDlg( DLG_INSIDXMARK , pBindings, this, pParentWindow, pInfo );
- DBG_ASSERT(pAbstDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pAbstDlg, "Dialogdiet fail!");
pWindow = pAbstDlg->GetWindow();
pWindow->Show(); // at this point,because before pSh has to be initialized in ReInitDlg()
// -> Show() will invoke StateChanged() and save pos
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
}
-/* -----------------07.09.99 09:14-------------------
- --------------------------------------------------*/
SfxChildWinInfo SwInsertIdxMarkWrapper::GetInfo() const
{
SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
@@ -115,10 +98,6 @@ void SwInsertIdxMarkWrapper::ReInitDlg(SwWrtShell& rWrtShell)
pAbstDlg->ReInitDlg(rWrtShell);
}
-
-/* -----------------07.09.99 08:15-------------------
-
- --------------------------------------------------*/
SFX_IMPL_CHILDWINDOW(SwInsertAuthMarkWrapper, FN_INSERT_AUTH_ENTRY_DLG)
SwInsertAuthMarkWrapper::SwInsertAuthMarkWrapper( Window *pParentWindow,
@@ -128,26 +107,23 @@ SwInsertAuthMarkWrapper::SwInsertAuthMarkWrapper( Window *pParentWindow,
SfxChildWindow(pParentWindow, nId)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pAbstDlg = pFact->CreateAuthMarkFloatDlg( DLG_INSAUTHMARK, pBindings, this, pParentWindow, pInfo );
- DBG_ASSERT(pAbstDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pAbstDlg, "Dialogdiet fail!");
pWindow = pAbstDlg->GetWindow();
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
}
-/* -----------------07.09.99 09:14-------------------
- --------------------------------------------------*/
SfxChildWinInfo SwInsertAuthMarkWrapper::GetInfo() const
{
SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
return aInfo;
}
-/* -----------------19.10.99 11:16-------------------
- --------------------------------------------------*/
void SwInsertAuthMarkWrapper::ReInitDlg(SwWrtShell& rWrtShell)
{
pAbstDlg->ReInitDlg(rWrtShell);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/index/idxmrk.src b/sw/source/ui/index/idxmrk.src
index 5bd78240e5c5..0fdb84db1980 100644
--- a/sw/source/ui/index/idxmrk.src
+++ b/sw/source/ui/index/idxmrk.src
@@ -408,7 +408,6 @@ String STR_IDXMRK_EDIT
};
String STR_IDXMRK_INSERT
{
- /* ### ACHTUNG: Neuer Text in Resource? Verzeichniseintrag einfügen : Verzeichniseintrag einf³gen */
Text [ en-US ] = "Insert Index Entry" ;
};
diff --git a/sw/source/ui/index/multmrk.cxx b/sw/source/ui/index/multmrk.cxx
index 0433f83a2a18..61c87315e8da 100644
--- a/sw/source/ui/index/multmrk.cxx
+++ b/sw/source/ui/index/multmrk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,7 +88,7 @@ void SwMultiTOXMarkDlg::Apply()
rMgr.SetCurTOXMark(nPos);
}
-/*-----------------25.02.94 22:06-------------------
+/*--------------------------------------------------
dtor ueberladen
--------------------------------------------------*/
@@ -96,3 +97,4 @@ SwMultiTOXMarkDlg::~SwMultiTOXMarkDlg() {}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 74fbc4383f96..5c55f4cb9f65 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,7 +73,6 @@
#include <breakit.hxx>
#include <SwRewriter.hxx>
-#include "swuiidxmrk.hxx"
#include <unomid.h>
@@ -198,7 +198,6 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent,
aPrevSameBT.SetClickHdl(LINK(this,SwIndexMarkDlg, PrevSameHdl));
aNextBT.SetClickHdl(LINK(this,SwIndexMarkDlg, NextHdl));
aNextSameBT.SetClickHdl(LINK(this,SwIndexMarkDlg, NextSameHdl));
- //aTypeDCB.SetModifyHdl(LINK(this,SwIndexMarkDlg, ModifyHdl));
aTypeDCB.SetSelectHdl(LINK(this,SwIndexMarkDlg, ModifyHdl));
aKeyDCB.SetModifyHdl(LINK(this,SwIndexMarkDlg, KeyDCBModifyHdl));
aKey2DCB.SetModifyHdl(LINK(this,SwIndexMarkDlg, KeyDCBModifyHdl));
@@ -214,16 +213,8 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent,
if(bNewMark)
{
aDelBT.Hide();
-
- {
- ImageList aTempList( SW_RES( IMG_NAVI_ENTRYBMPH ) );
- aNewBT.SetModeImage( aTempList.GetImage( SID_SW_START + CONTENT_TYPE_INDEX ), BMP_COLOR_HIGHCONTRAST );
- }
-
- {
- ImageList aTempList( SW_RES( IMG_NAVI_ENTRYBMP ) );
- aNewBT.SetModeImage( aTempList.GetImage( SID_SW_START + CONTENT_TYPE_INDEX ), BMP_COLOR_NORMAL );
- }
+ ImageList aTempList( SW_RES( IMG_NAVI_ENTRYBMP ) );
+ aNewBT.SetModeImage( aTempList.GetImage( SID_SW_START + CONTENT_TYPE_INDEX ) );
}
else
{
@@ -239,14 +230,12 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent,
Beschreibung: Controls neu initialisieren mit der aktuellen
Markierung
--------------------------------------------------------------------*/
-
-
void SwIndexMarkDlg::InitControls()
{
- DBG_ASSERT(pSh && pTOXMgr, "Shell nicht da?");
+ OSL_ENSURE(pSh && pTOXMgr, "no shell?");
// Inhalts-Verzeichnis
const SwTOXType* pType = pTOXMgr->GetTOXType(TOX_CONTENT, 0);
- ASSERT(pType, "Kein Verzeichnistyp !!");
+ OSL_ENSURE(pType, "Kein Verzeichnistyp !!");
String sTmpTypeSelection;
if(aTypeDCB.GetSelectEntryCount())
sTmpTypeSelection = aTypeDCB.GetSelectEntry();
@@ -255,7 +244,7 @@ void SwIndexMarkDlg::InitControls()
// Stichwort-Verzeichnis
pType = pTOXMgr->GetTOXType(TOX_INDEX, 0);
- ASSERT(pType, "Kein Verzeichnistyp !!");
+ OSL_ENSURE(pType, "Kein Verzeichnistyp !!");
aTypeDCB.InsertEntry(pType->GetTypeName());
// Benutzerverzeichnisse
@@ -370,19 +359,19 @@ void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading()
//get the current language
if(!bNewMark) //if dialog is opened to iterate existing marks
{
- ASSERT(pTOXMgr, "need TOXMgr")
+ OSL_ENSURE(pTOXMgr, "need TOXMgr");
if(!pTOXMgr)
return;
SwTOXMark* pMark = pTOXMgr->GetCurTOXMark();
- ASSERT(pMark, "need current SwTOXMark");
+ OSL_ENSURE(pMark, "need current SwTOXMark");
if(!pMark)
return;
SwTxtTOXMark* pTxtTOXMark = pMark->GetTxtTOXMark();
- ASSERT(pTxtTOXMark, "need current SwTxtTOXMark");
+ OSL_ENSURE(pTxtTOXMark, "need current SwTxtTOXMark");
if(!pTxtTOXMark)
return;
const SwTxtNode* pTxtNode = pTxtTOXMark->GetpTxtNd();
- ASSERT(pTxtNode, "need current SwTxtNode");
+ OSL_ENSURE(pTxtNode, "need current SwTxtNode");
if(!pTxtNode)
return;
xub_StrLen nTextIndex = *pTxtTOXMark->GetStart();
@@ -396,7 +385,6 @@ void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading()
{
case SCRIPTTYPE_ASIAN: nWhich = RES_CHRATR_CJK_LANGUAGE; break;
case SCRIPTTYPE_COMPLEX:nWhich = RES_CHRATR_CTL_LANGUAGE; break;
- //case SCRIPTTYPE_LATIN:
default:nWhich = RES_CHRATR_LANGUAGE; break;
}
SfxItemSet aLangSet(pSh->GetAttrPool(), nWhich, nWhich);
@@ -404,13 +392,6 @@ void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading()
nLangForPhoneticReading = ((const SvxLanguageItem&)aLangSet.Get(nWhich)).GetLanguage();
}
- /*
- //enable phonetic reading dependent on the current language
- {
- lang::Locale aLocale( SvxCreateLocale( LanguageType( nLangForPhoneticReading ) ) );
- bIsPhoneticReadingEnabled = xExtendedIndexEntrySupplier->usePhoneticEntry( aLocale );
- }
- */
}
String SwIndexMarkDlg::GetDefaultPhoneticReading( const String& rText )
@@ -422,10 +403,9 @@ String SwIndexMarkDlg::GetDefaultPhoneticReading( const String& rText )
return xExtendedIndexEntrySupplier->getPhoneticCandidate(rText, aLocale);
}
-/* -----------------07.09.99 10:43-------------------
+/* --------------------------------------------------
Change the content of aEntryED if text is selected
--------------------------------------------------*/
-
void SwIndexMarkDlg::Activate()
{
// aktuelle Selektion (1.Element) anzeigen ????
@@ -465,8 +445,6 @@ void SwIndexMarkDlg::Apply()
/*--------------------------------------------------------------------
Beschreibung: Aenderungen uebernehmen
--------------------------------------------------------------------*/
-
-
void SwIndexMarkDlg::InsertUpdate()
{
pSh->StartUndo(bDel ? UNDO_INDEX_ENTRY_DELETE : UNDO_INDEX_ENTRY_INSERT);
@@ -586,8 +564,6 @@ void SwIndexMarkDlg::InsertMark()
/*--------------------------------------------------------------------
Beschreibung: Marke Updaten
--------------------------------------------------------------------*/
-
-
void SwIndexMarkDlg::UpdateMark()
{
String aAltText(aEntryED.GetText());
@@ -630,8 +606,6 @@ void SwIndexMarkDlg::UpdateMark()
/*--------------------------------------------------------------------
Beschreibung: Neue Keys eintragen
--------------------------------------------------------------------*/
-
-
void SwIndexMarkDlg::UpdateKeyBoxes()
{
String aKey(aKeyDCB.GetText());
@@ -650,9 +624,7 @@ void SwIndexMarkDlg::UpdateKeyBoxes()
aKey2DCB.InsertEntry(aKey);
}
}
-/* -----------------13.10.99 15:10-------------------
- --------------------------------------------------*/
class SwNewUserIdxDlg : public ModalDialog
{
OKButton aOKPB;
@@ -708,9 +680,7 @@ IMPL_LINK( SwIndexMarkDlg, NewUserIdxHdl, Button*, EMPTYARG)
delete pDlg;
return 0;
}
-/* -----------------------------17.01.00 12:18--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK( SwIndexMarkDlg, SearchTypeHdl, CheckBox*, pBox)
{
sal_Bool bEnable = pBox->IsChecked() && pBox->IsEnabled();
@@ -718,9 +688,7 @@ IMPL_LINK( SwIndexMarkDlg, SearchTypeHdl, CheckBox*, pBox)
aSearchCaseSensitiveCB.Enable(bEnable);
return 0;
}
-/* -----------------07.09.99 10:30-------------------
- --------------------------------------------------*/
IMPL_LINK( SwIndexMarkDlg, InsertHdl, Button *, pButton )
{
Apply();
@@ -729,9 +697,7 @@ IMPL_LINK( SwIndexMarkDlg, InsertHdl, Button *, pButton )
CloseHdl(pButton);
return 0;
}
-/* -----------------07.09.99 10:29-------------------
- --------------------------------------------------*/
IMPL_LINK( SwIndexMarkDlg, CloseHdl, Button *, EMPTYARG )
{
if(bNewMark)
@@ -746,6 +712,7 @@ IMPL_LINK( SwIndexMarkDlg, CloseHdl, Button *, EMPTYARG )
}
return 0;
}
+
/*--------------------------------------------------------------------
Beschreibung: VerzeichnisTyp auswaehlen nur bei Einfuegen
--------------------------------------------------------------------*/
@@ -824,11 +791,6 @@ IMPL_LINK( SwIndexMarkDlg, ModifyHdl, ListBox *, pBox )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
IMPL_LINK_INLINE_START( SwIndexMarkDlg, NextHdl, Button *, EMPTYARG )
{
InsertUpdate();
@@ -838,7 +800,6 @@ IMPL_LINK_INLINE_START( SwIndexMarkDlg, NextHdl, Button *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwIndexMarkDlg, NextHdl, Button *, EMPTYARG )
-
IMPL_LINK_INLINE_START( SwIndexMarkDlg, NextSameHdl, Button *, EMPTYARG )
{
InsertUpdate();
@@ -848,7 +809,6 @@ IMPL_LINK_INLINE_START( SwIndexMarkDlg, NextSameHdl, Button *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwIndexMarkDlg, NextSameHdl, Button *, EMPTYARG )
-
IMPL_LINK_INLINE_START( SwIndexMarkDlg, PrevHdl, Button *, EMPTYARG )
{
InsertUpdate();
@@ -858,7 +818,6 @@ IMPL_LINK_INLINE_START( SwIndexMarkDlg, PrevHdl, Button *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwIndexMarkDlg, PrevHdl, Button *, EMPTYARG )
-
IMPL_LINK_INLINE_START( SwIndexMarkDlg, PrevSameHdl, Button *, EMPTYARG )
{
InsertUpdate();
@@ -869,7 +828,6 @@ IMPL_LINK_INLINE_START( SwIndexMarkDlg, PrevSameHdl, Button *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwIndexMarkDlg, PrevSameHdl, Button *, EMPTYARG )
-
IMPL_LINK( SwIndexMarkDlg, DelHdl, Button *, EMPTYARG )
{
bDel = sal_True;
@@ -889,13 +847,11 @@ IMPL_LINK( SwIndexMarkDlg, DelHdl, Button *, EMPTYARG )
/*--------------------------------------------------------------------
Beschreibung: Dialoganzeige erneuern
--------------------------------------------------------------------*/
-
-
void SwIndexMarkDlg::UpdateDialog()
{
- DBG_ASSERT(pSh && pTOXMgr, "Shell nicht da?");
+ OSL_ENSURE(pSh && pTOXMgr, "no shell?");
SwTOXMark* pMark = pTOXMgr->GetCurTOXMark();
- ASSERT(pMark, "Keine aktuelle Markierung");
+ OSL_ENSURE(pMark, "no current marker");
if(!pMark)
return;
@@ -995,7 +951,6 @@ void SwIndexMarkDlg::UpdateDialog()
/*--------------------------------------------------------------------
Remind wether the edit boxes for Phonetic reading are changed manually
--------------------------------------------------------------------*/
-
IMPL_LINK( SwIndexMarkDlg, PhoneticEDModifyHdl, Edit *, pEdit )
{
if(&aPhoneticED0 == pEdit)
@@ -1016,7 +971,6 @@ IMPL_LINK( SwIndexMarkDlg, PhoneticEDModifyHdl, Edit *, pEdit )
/*--------------------------------------------------------------------
Beschreibung: Enable Disable des 2. Schluessels
--------------------------------------------------------------------*/
-
IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox )
{
if(&aKeyDCB == pBox)
@@ -1072,19 +1026,15 @@ IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox )
return 0;
}
-/*-----------------25.02.94 21:19-------------------
+/*--------------------------------------------------
dtor ueberladen
--------------------------------------------------*/
-
-
SwIndexMarkDlg::~SwIndexMarkDlg()
{
delete pTOXMgr;
ViewShell::SetCareWin( 0 );
}
-/* -----------------07.09.99 08:41-------------------
- --------------------------------------------------*/
void SwIndexMarkDlg::ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark)
{
pSh = &rWrtShell;
@@ -1101,9 +1051,7 @@ void SwIndexMarkDlg::ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark)
}
InitControls();
}
-/* -----------------06.10.99 10:00-------------------
- --------------------------------------------------*/
SwIndexMarkFloatDlg::SwIndexMarkFloatDlg(SfxBindings* _pBindings,
SfxChildWindow* pChild,
Window *pParent,
@@ -1116,9 +1064,7 @@ SfxModelessDialog(_pBindings, pChild, pParent, SvtCJKOptions().IsCJKFontEnabled(
aDlg.ReInitDlg(*::GetActiveWrtShell());
Initialize(pInfo);
}
-/* -----------------06.10.99 10:27-------------------
- --------------------------------------------------*/
void SwIndexMarkFloatDlg::Activate()
{
SfxModelessDialog::Activate();
@@ -1130,9 +1076,6 @@ void SwIndexMarkFloatDlg::ReInitDlg(SwWrtShell& rWrtShell)
aDlg.ReInitDlg( rWrtShell );
}
-/* -----------------06.10.99 10:35-------------------
-
- --------------------------------------------------*/
SwIndexMarkModalDlg::SwIndexMarkModalDlg(Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark) :
SvxStandardDialog(pParent, SvtCJKOptions().IsCJKFontEnabled()?SW_RES(DLG_EDIT_IDXMARK_CJK):SW_RES(DLG_EDIT_IDXMARK)),
aDlg(this, sal_False, SW_RES(WIN_DLG), SvtCJKOptions().IsCJKFontEnabled()?DLG_EDIT_IDXMARK_CJK:DLG_EDIT_IDXMARK, rSh)
@@ -1140,16 +1083,12 @@ SvxStandardDialog(pParent, SvtCJKOptions().IsCJKFontEnabled()?SW_RES(DLG_EDIT_ID
FreeResource();
aDlg.ReInitDlg(rSh, pCurTOXMark);
}
-/* -----------------06.10.99 10:46-------------------
- --------------------------------------------------*/
void SwIndexMarkModalDlg::Apply()
{
aDlg.Apply();
}
-/* -----------------16.09.99 14:19-------------------
- --------------------------------------------------*/
class SwCreateAuthEntryDlg_Impl : public ModalDialog
{
FixedLine aEntriesFL;
@@ -1187,9 +1126,7 @@ public:
void SetCheckNameHdl(const Link& rLink) {aShortNameCheckLink = rLink;}
};
-/*-- 15.09.99 08:43:24---------------------------------------------------
- -----------------------------------------------------------------------*/
struct TextInfo
{
sal_uInt16 nToxField;
@@ -1302,23 +1239,17 @@ SwAuthMarkDlg::SwAuthMarkDlg( Window *pParent,
aEntryLB.SetSelectHdl(LINK(this, SwAuthMarkDlg, CompEntryHdl));
}
}
-/*-- 15.09.99 08:43:25---------------------------------------------------
- -----------------------------------------------------------------------*/
SwAuthMarkDlg::~SwAuthMarkDlg()
{
}
-/*-- 15.09.99 08:43:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwAuthMarkDlg::ReInitDlg(SwWrtShell& rWrtShell)
{
pSh = &rWrtShell;
InitControls();
}
-/* -----------------15.09.99 08:57-------------------
- --------------------------------------------------*/
IMPL_LINK( SwAuthMarkDlg, CloseHdl, PushButton *, EMPTYARG )
{
if(bNewEntry)
@@ -1333,9 +1264,7 @@ IMPL_LINK( SwAuthMarkDlg, CloseHdl, PushButton *, EMPTYARG )
}
return 0;
}
-/* -----------------06.12.99 13:54-------------------
- --------------------------------------------------*/
static String lcl_FindColumnEntry(const beans::PropertyValue* pFields, sal_Int32 nLen, const String& rColumnTitle)
{
String sRet;
@@ -1352,9 +1281,7 @@ static String lcl_FindColumnEntry(const beans::PropertyValue* pFields, sal_Int32
}
return sRet;
}
-/* -----------------------------07.12.99 15:39--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK( SwAuthMarkDlg, CompEntryHdl, ListBox*, pBox)
{
String sEntry(pBox->GetSelectEntry());
@@ -1401,17 +1328,14 @@ IMPL_LINK( SwAuthMarkDlg, CompEntryHdl, ListBox*, pBox)
return 0;
}
-/* -----------------15.09.99 08:57-------------------
-
- --------------------------------------------------*/
IMPL_LINK( SwAuthMarkDlg, InsertHdl, PushButton *, EMPTYARG )
{
//insert or update the SwAuthorityField...
if(pSh)
{
sal_Bool bDifferent = sal_False;
- DBG_ASSERT(m_sFields[AUTH_FIELD_IDENTIFIER].Len() , "No Id is set!");
- DBG_ASSERT(m_sFields[AUTH_FIELD_AUTHORITY_TYPE].Len() , "No authority type is set!");
+ OSL_ENSURE(m_sFields[AUTH_FIELD_IDENTIFIER].Len() , "No Id is set!");
+ OSL_ENSURE(m_sFields[AUTH_FIELD_AUTHORITY_TYPE].Len() , "No authority type is set!");
//check if the entry already exists with different content
const SwAuthorityFieldType* pFType = (const SwAuthorityFieldType*)
pSh->GetFldType(RES_AUTHORITY, aEmptyStr);
@@ -1458,9 +1382,7 @@ IMPL_LINK( SwAuthMarkDlg, InsertHdl, PushButton *, EMPTYARG )
CloseHdl(0);
return 0;
}
-/* -----------------17.09.99 13:06-------------------
- --------------------------------------------------*/
IMPL_LINK(SwAuthMarkDlg, CreateEntryHdl, PushButton*, pButton)
{
sal_Bool bCreate = pButton == &aCreateEntryPB;
@@ -1492,7 +1414,7 @@ IMPL_LINK(SwAuthMarkDlg, CreateEntryHdl, PushButton*, pButton)
}
if(bCreate)
{
- DBG_ASSERT(LISTBOX_ENTRY_NOTFOUND ==
+ OSL_ENSURE(LISTBOX_ENTRY_NOTFOUND ==
aEntryLB.GetEntryPos(m_sFields[AUTH_FIELD_IDENTIFIER]),
"entry exists!");
aEntryLB.InsertEntry(m_sFields[AUTH_FIELD_IDENTIFIER]);
@@ -1505,9 +1427,7 @@ IMPL_LINK(SwAuthMarkDlg, CreateEntryHdl, PushButton*, pButton)
}
return 0;
}
-/* -----------------------------20.12.99 14:26--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwAuthMarkDlg, ChangeSourceHdl, RadioButton*, pButton)
{
sal_Bool bFromComp = (pButton == &aFromComponentRB);
@@ -1571,9 +1491,7 @@ IMPL_LINK(SwAuthMarkDlg, ChangeSourceHdl, RadioButton*, pButton)
CompEntryHdl(&aEntryLB);
return 0;
}
-/* -----------------15.10.2002 13:16-----------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK(SwAuthMarkDlg, EditModifyHdl, Edit*, pEdit)
{
Link aAllowed = LINK(this, SwAuthMarkDlg, IsEntryAllowedHdl);
@@ -1587,9 +1505,7 @@ IMPL_LINK(SwAuthMarkDlg, EditModifyHdl, Edit*, pEdit)
}
return 0;
};
-/* -----------------------------20.12.99 15:11--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwAuthMarkDlg, IsEntryAllowedHdl, Edit*, pEdit)
{
String sEntry = pEdit->GetText();
@@ -1611,14 +1527,12 @@ IMPL_LINK(SwAuthMarkDlg, IsEntryAllowedHdl, Edit*, pEdit)
}
return bAllowed;
}
-/* -----------------21.09.99 14:19-------------------
- --------------------------------------------------*/
void SwAuthMarkDlg::InitControls()
{
- DBG_ASSERT(pSh, "Shell nicht da?");
+ OSL_ENSURE(pSh, "no shell?");
SwField* pField = pSh->GetCurFld();
- ASSERT(bNewEntry || pField, "Keine aktuelle Markierung");
+ OSL_ENSURE(bNewEntry || pField, "no current marker");
if(bNewEntry)
{
ChangeSourceHdl(aFromComponentRB.IsChecked() ? &aFromComponentRB : &aFromDocContentRB);
@@ -1633,7 +1547,7 @@ void SwAuthMarkDlg::InitControls()
const SwAuthEntry* pEntry = ((SwAuthorityFieldType*)pField->GetTyp())->
GetEntryByHandle(((SwAuthorityField*)pField)->GetHandle());
- DBG_ASSERT(pEntry, "No authority entry found");
+ OSL_ENSURE(pEntry, "No authority entry found");
if(!pEntry)
return;
for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
@@ -1643,17 +1557,13 @@ void SwAuthMarkDlg::InitControls()
aAuthorFI.SetText(pEntry->GetAuthorField(AUTH_FIELD_AUTHOR));
aTitleFI.SetText(pEntry->GetAuthorField(AUTH_FIELD_TITLE));
}
-/* -----------------------------05.09.2002 09:44------------------------------
- ---------------------------------------------------------------------------*/
void SwAuthMarkDlg::Activate()
{
aOKBT.Enable(!pSh->HasReadonlySel());
Window::Activate();
}
-/* -----------------16.09.99 14:27-------------------
- --------------------------------------------------*/
SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent,
const String pFields[],
SwWrtShell& rSh,
@@ -1799,15 +1709,12 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent,
long nHeightDiff = - aFLSz.Height();
aFLSz.Height() = aTL1.Y();
nHeightDiff += aFLSz.Height();
-// aEntriesFL.SetSizePixel(aFLSz);
Size aDlgSize(GetSizePixel());
aDlgSize.Height() += nHeightDiff;
SetSizePixel(aDlgSize);
}
-/* -----------------16.09.99 14:47-------------------
- --------------------------------------------------*/
SwCreateAuthEntryDlg_Impl::~SwCreateAuthEntryDlg_Impl()
{
for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
@@ -1818,20 +1725,18 @@ SwCreateAuthEntryDlg_Impl::~SwCreateAuthEntryDlg_Impl()
delete pTypeListBox;
delete pIdentifierBox;
}
-/* -----------------16.09.99 14:27-------------------
- --------------------------------------------------*/
String SwCreateAuthEntryDlg_Impl::GetEntryText(ToxAuthorityField eField) const
{
String sRet;
if( AUTH_FIELD_AUTHORITY_TYPE == eField )
{
- DBG_ASSERT(pTypeListBox, "No ListBox");
+ OSL_ENSURE(pTypeListBox, "No ListBox");
sRet = String::CreateFromInt32(pTypeListBox->GetSelectEntryPos());
}
else if( AUTH_FIELD_IDENTIFIER == eField && !m_bNewEntryMode)
{
- DBG_ASSERT(pIdentifierBox, "No ComboBox");
+ OSL_ENSURE(pIdentifierBox, "No ComboBox");
sRet = pIdentifierBox->GetText();
}
else
@@ -1848,9 +1753,7 @@ String SwCreateAuthEntryDlg_Impl::GetEntryText(ToxAuthorityField eField) const
}
return sRet;
}
-/* -----------------21.09.99 13:54-------------------
- --------------------------------------------------*/
IMPL_LINK(SwCreateAuthEntryDlg_Impl, IdentifierHdl, ComboBox*, pBox)
{
const SwAuthorityFieldType* pFType = (const SwAuthorityFieldType*)
@@ -1876,9 +1779,6 @@ IMPL_LINK(SwCreateAuthEntryDlg_Impl, IdentifierHdl, ComboBox*, pBox)
}
return 0;
}
-/* -----------------------------20.12.99 15:07--------------------------------
-
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwCreateAuthEntryDlg_Impl, ShortNameHdl, Edit*, pEdit)
{
@@ -1890,17 +1790,13 @@ IMPL_LINK(SwCreateAuthEntryDlg_Impl, ShortNameHdl, Edit*, pEdit)
}
return 0;
}
-/* -----------------------------20.12.99 15:54--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwCreateAuthEntryDlg_Impl, EnableHdl, ListBox*, pBox)
{
aOKBT.Enable(m_bNameAllowed && pBox->GetSelectEntryCount());
return 0;
};
-/* -----------------06.10.99 10:00-------------------
- --------------------------------------------------*/
SwAuthMarkFloatDlg::SwAuthMarkFloatDlg(SfxBindings* _pBindings,
SfxChildWindow* pChild,
Window *pParent,
@@ -1912,12 +1808,10 @@ SwAuthMarkFloatDlg::SwAuthMarkFloatDlg(SfxBindings* _pBindings,
FreeResource();
Initialize(pInfo);
SwWrtShell* pWrtShell = ::GetActiveWrtShell();
- DBG_ASSERT(pWrtShell, "No shell?");
+ OSL_ENSURE(pWrtShell, "No shell?");
aDlg.ReInitDlg(*pWrtShell);
}
-/* -----------------06.10.99 10:27-------------------
- --------------------------------------------------*/
void SwAuthMarkFloatDlg::Activate()
{
SfxModelessDialog::Activate();
@@ -1929,9 +1823,6 @@ void SwAuthMarkFloatDlg::ReInitDlg(SwWrtShell& rWrtShell)
aDlg.ReInitDlg( rWrtShell );
}
-/* -----------------06.10.99 10:35-------------------
-
- --------------------------------------------------*/
SwAuthMarkModalDlg::SwAuthMarkModalDlg(Window *pParent, SwWrtShell& rSh) :
SvxStandardDialog(pParent, SW_RES(DLG_EDIT_AUTHMARK)),
aDlg(this, SW_RES(WIN_DLG), sal_False)
@@ -1939,11 +1830,10 @@ SwAuthMarkModalDlg::SwAuthMarkModalDlg(Window *pParent, SwWrtShell& rSh) :
FreeResource();
aDlg.ReInitDlg(rSh);
}
-/* -----------------06.10.99 10:46-------------------
- --------------------------------------------------*/
void SwAuthMarkModalDlg::Apply()
{
aDlg.InsertHdl(0);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/index/toxmgr.cxx b/sw/source/ui/index/toxmgr.cxx
index 76b06194b9e6..f3afd0c21d15 100644
--- a/sw/source/ui/index/toxmgr.cxx
+++ b/sw/source/ui/index/toxmgr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,9 +86,7 @@ void SwTOXMgr::DeleteTOXMark()
// zur naechsten wandern
pCurTOXMark = pNext;
}
-/* -----------------20.08.99 10:48-------------------
- --------------------------------------------------*/
void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc)
{
SwTOXMark* pMark = 0;
@@ -95,8 +94,8 @@ void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc)
{
case TOX_CONTENT:
{
- ASSERT(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL,
- ungueltiger Level InsertTOCMark);
+ OSL_ENSURE(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL,
+ "invalid InsertTOCMark level");
pMark = new SwTOXMark(pSh->GetTOXType(TOX_CONTENT, 0));
pMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) );
@@ -130,8 +129,8 @@ void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc)
break;
case TOX_USER:
{
- ASSERT(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL,
- ungueltiger Level InsertTOCMark);
+ OSL_ENSURE(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL,
+ "invalid InsertTOCMark level");
sal_uInt16 nId = rDesc.GetTOUName() ?
GetUserTypeID(*rDesc.GetTOUName()) : 0;
pMark = new SwTOXMark(pSh->GetTOXType(TOX_USER, nId));
@@ -154,7 +153,7 @@ void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc)
void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc)
{
- ASSERT(pCurTOXMark, "kein aktuelles TOXMark");
+ OSL_ENSURE(pCurTOXMark, "no current TOXMark");
pSh->StartAllAction();
if(pCurTOXMark->GetTOXType()->GetType() == TOX_INDEX)
@@ -252,7 +251,7 @@ sal_uInt16 SwTOXMgr::GetUserTypeID(const String& rStr)
void SwTOXMgr::NextTOXMark(sal_Bool bSame)
{
- ASSERT(pCurTOXMark, "kein aktuelles TOXMark");
+ OSL_ENSURE(pCurTOXMark, "no current TOXMark");
if( pCurTOXMark )
{
SwTOXSearch eDir = bSame ? TOX_SAME_NXT : TOX_NXT;
@@ -263,7 +262,7 @@ void SwTOXMgr::NextTOXMark(sal_Bool bSame)
void SwTOXMgr::PrevTOXMark(sal_Bool bSame)
{
- ASSERT(pCurTOXMark, "kein aktuelles TOXMark");
+ OSL_ENSURE(pCurTOXMark, "no current TOXMark");
if( pCurTOXMark )
{
SwTOXSearch eDir = bSame ? TOX_SAME_PRV : TOX_PRV;
@@ -289,10 +288,6 @@ void SwTOXMgr::SetCurTOXMark(sal_uInt16 nId)
pCurTOXMark = (nId < aCurMarks.Count()) ? aCurMarks[nId] : 0;
}
-/* -----------------01.07.99 16:23-------------------
-
- --------------------------------------------------*/
-
sal_Bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
SwTOXBase** ppBase,
const SfxItemSet* pSet)
@@ -407,7 +402,6 @@ sal_Bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
pSh->DelRight();
pNewTOX = (SwTOXBase*)pCurTOX;
}
-// pTOX->SetOptions(rDesc.GetIndexOptions());
pNewTOX->SetFromObjectNames(rDesc.IsCreateFromObjectNames());
pNewTOX->SetOLEOptions(rDesc.GetOLEOptions());
}
@@ -415,7 +409,7 @@ sal_Bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
}
- DBG_ASSERT(pNewTOX, "no TOXBase created!" );
+ OSL_ENSURE(pNewTOX, "no TOXBase created!" );
if(!pNewTOX)
return sal_False;
@@ -478,9 +472,7 @@ sal_Bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
return bRet;
}
-/* -----------------20.10.99 14:11-------------------
- --------------------------------------------------*/
void SwTOXDescription::SetSortKeys(SwTOXSortKey eKey1,
SwTOXSortKey eKey2,
SwTOXSortKey eKey3)
@@ -499,9 +491,6 @@ void SwTOXDescription::SetSortKeys(SwTOXSortKey eKey1,
eSortKey3 = aArr[2];
}
-/* -----------------10.09.99 10:02-------------------
-
- --------------------------------------------------*/
void SwTOXDescription::ApplyTo(SwTOXBase& rTOXBase)
{
for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
@@ -527,3 +516,4 @@ void SwTOXDescription::ApplyTo(SwTOXBase& rTOXBase)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index 98280db3f63e..8636b7fd03be 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,20 +34,14 @@
#include <hintids.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <swundo.hxx> // fuer Undo-Ids
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <splargs.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <editeng/unolingu.hxx>
#include <editeng/langitem.hxx>
#include <editeng/fontitem.hxx>
@@ -67,11 +62,8 @@
#include <ndtxt.hxx>
#include <fmtruby.hxx>
#include <breakit.hxx>
-#include <docsh.hxx>
-#ifndef _OLMENU_HRC
#include <olmenu.hrc>
-#endif
#include <unomid.h>
@@ -196,11 +188,6 @@ SwHHCWrapper::~SwHHCWrapper()
}
}
-
-/*
- if( bInfoBox )
- InfoBox(&pView->GetEditWin(), String(SW_RES(STR_SPELL_OK)) ).Execute();
-*/
}
@@ -244,7 +231,7 @@ void SwHHCWrapper::SelectNewUnit_impl( sal_Int32 nUnitStart, sal_Int32 nUnitEnd
void SwHHCWrapper::HandleNewUnit(
const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd )
{
- DBG_ASSERT( nUnitStart >= 0 && nUnitEnd >= nUnitStart, "wrong arguments" );
+ OSL_ENSURE( nUnitStart >= 0 && nUnitEnd >= nUnitStart, "wrong arguments" );
if (!(0 <= nUnitStart && nUnitStart <= nUnitEnd))
return;
@@ -267,7 +254,7 @@ void SwHHCWrapper::ChangeText( const String &rNewText,
//!! please see also TextConvWrapper::ChangeText with is a modified
//!! copy of this code
- DBG_ASSERT( rNewText.Len() != 0, "unexpected empty string" );
+ OSL_ENSURE( rNewText.Len() != 0, "unexpected empty string" );
if (rNewText.Len() == 0)
return;
@@ -293,7 +280,7 @@ void SwHHCWrapper::ChangeText( const String &rNewText,
// different length. Negative values allowed!
long nCorrectionOffset = 0;
- DBG_ASSERT(nIndices == 0 || nIndices == nConvTextLen,
+ OSL_ENSURE(nIndices == 0 || nIndices == nConvTextLen,
"mismatch between string length and sequence length!" );
// find all substrings that need to be replaced (and only those)
@@ -324,7 +311,7 @@ void SwHHCWrapper::ChangeText( const String &rNewText,
// set selection to sub string to be replaced in original text
xub_StrLen nChgInNodeStartIndex = static_cast< xub_StrLen >( nStartIndex + nCorrectionOffset + nChgPos );
- DBG_ASSERT( rWrtShell.GetCrsr()->HasMark(), "cursor misplaced (nothing selected)" );
+ OSL_ENSURE( rWrtShell.GetCrsr()->HasMark(), "cursor misplaced (nothing selected)" );
rWrtShell.GetCrsr()->GetMark()->nContent.Assign( pStartTxtNode, nChgInNodeStartIndex );
rWrtShell.GetCrsr()->GetPoint()->nContent.Assign( pStartTxtNode, nChgInNodeStartIndex + nChgLen );
#ifdef DEBUG
@@ -425,7 +412,7 @@ void SwHHCWrapper::ReplaceUnit(
static OUString aBracketedStart( C2U( "(" ) );
static OUString aBracketedEnd( C2U( ")" ) );
- DBG_ASSERT( nUnitStart >= 0 && nUnitEnd >= nUnitStart, "wrong arguments" );
+ OSL_ENSURE( nUnitStart >= 0 && nUnitEnd >= nUnitStart, "wrong arguments" );
if (!(nUnitStart >= 0 && nUnitEnd >= nUnitStart))
return;
@@ -439,7 +426,7 @@ void SwHHCWrapper::ReplaceUnit(
OUString aOrigTxt( rWrtShell.GetSelTxt() );
OUString aNewTxt( rReplaceWith );
- DBG_ASSERT( aOrigTxt == rOrigText, "!! text mismatch !!" );
+ OSL_ENSURE( aOrigTxt == rOrigText, "!! text mismatch !!" );
SwFmtRuby *pRuby = 0;
sal_Bool bRubyBelow = sal_False;
String aNewOrigText;
@@ -482,7 +469,7 @@ void SwHHCWrapper::ReplaceUnit(
}
break;
default:
- DBG_ERROR( "unexpected case" );
+ OSL_ENSURE(false, "unexpected case" );
}
nUnitOffset += nUnitStart + aNewTxt.getLength();
@@ -509,9 +496,7 @@ void SwHHCWrapper::ReplaceUnit(
pRuby->SetPosition( bRubyBelow );
pRuby->SetAdjustment( RubyAdjust_CENTER );
- //!! the following seem not to be needed
- //pRuby->SetCharFmtName( const String& rNm );
- //pRuby->SetCharFmtId( sal_uInt16 nNew );
+
#ifdef DEBUG
SwPaM *pPaM = rWrtShell.GetCrsr();
(void)pPaM;
@@ -539,7 +524,7 @@ void SwHHCWrapper::ReplaceUnit(
rWrtShell.SetMark();
rWrtShell.GetCrsr()->GetMark()->nContent -= (xub_StrLen) aNewTxt.getLength();
- DBG_ASSERT( GetTargetLanguage() == LANGUAGE_CHINESE_SIMPLIFIED || GetTargetLanguage() == LANGUAGE_CHINESE_TRADITIONAL,
+ OSL_ENSURE( GetTargetLanguage() == LANGUAGE_CHINESE_SIMPLIFIED || GetTargetLanguage() == LANGUAGE_CHINESE_TRADITIONAL,
"SwHHCWrapper::ReplaceUnit : unexpected target language" );
sal_uInt16 aRanges[] = {
@@ -550,13 +535,11 @@ void SwHHCWrapper::ReplaceUnit(
SfxItemSet aSet( rWrtShell.GetAttrPool(), aRanges );
if (pNewUnitLanguage)
{
- //DBG_ASSERT(!IsSimilarChinese( *pNewUnitLanguage, nOldLang ),
- // "similar language should not be changed!");
aSet.Put( SvxLanguageItem( *pNewUnitLanguage, RES_CHRATR_CJK_LANGUAGE ) );
}
const Font *pTargetFont = GetTargetFont();
- DBG_ASSERT( pTargetFont, "target font missing?" );
+ OSL_ENSURE( pTargetFont, "target font missing?" );
if (pTargetFont && pNewUnitLanguage)
{
SvxFontItem aFontItem = (SvxFontItem&) aSet.Get( RES_CHRATR_CJK_FONT );
@@ -588,7 +571,7 @@ sal_Bool SwHHCWrapper::HasRubySupport() const
void SwHHCWrapper::Convert()
{
- DBG_ASSERT( pConvArgs == 0, "NULL pointer expected" );
+ OSL_ENSURE( pConvArgs == 0, "NULL pointer expected" );
{
SwPaM *pCrsr = pView->GetWrtShell().GetCrsr();
SwPosition* pSttPos = pCrsr->Start();
@@ -618,13 +601,13 @@ void SwHHCWrapper::Convert()
pTxtNode, pSttPos->nContent,
pTxtNode, pSttPos->nContent );
}
- DBG_ASSERT( pConvArgs->pStartNode && pConvArgs->pStartNode->IsTxtNode(),
+ OSL_ENSURE( pConvArgs->pStartNode && pConvArgs->pStartNode->IsTxtNode(),
"failed to get proper start text node" );
- DBG_ASSERT( pConvArgs->pEndNode && pConvArgs->pEndNode->IsTxtNode(),
+ OSL_ENSURE( pConvArgs->pEndNode && pConvArgs->pEndNode->IsTxtNode(),
"failed to get proper end text node" );
// chinese conversion specific settings
- DBG_ASSERT( IsChinese( GetSourceLanguage() ) == IsChinese( GetTargetLanguage() ),
+ OSL_ENSURE( IsChinese( GetSourceLanguage() ) == IsChinese( GetTargetLanguage() ),
"source and target language mismatch?" );
if (IsChinese( GetTargetLanguage() ))
{
@@ -702,7 +685,6 @@ sal_Bool SwHHCWrapper::ConvNext_impl( )
return sal_False;
}
- //ResMgr* pMgr = DIALOG_MGR();
sal_Bool bGoOn = sal_False;
if ( bIsOtherCntnt )
@@ -724,29 +706,9 @@ sal_Bool SwHHCWrapper::ConvNext_impl( )
}
else
{
- // Ein BODY_Bereich erledigt, Frage nach dem anderen BODY_Bereich
-/*
- //pWin->LeaveWait();
-
- sal_uInt16 nResId = RID_SVXQB_CONTINUE;
- QueryBox aBox( pWin, ResId( nResId, pMgr ) );
- if ( aBox.Execute() != RET_YES )
- {
- // Verzicht auf den anderen Bereich, ggf. Frage nach Sonderbereich
- //pWin->EnterWait();
- bStartDone = bEndDone = sal_True;
- return SpellNext();
- }
- else
- {
-*/
bStartChk = !bStartDone;
ConvStart_impl( pConvArgs, bStartChk ? SVX_SPELL_BODY_START : SVX_SPELL_BODY_END );
bGoOn = sal_True;
-/*
- }
- pWin->EnterWait();
-*/
}
return bGoOn;
}
@@ -756,8 +718,6 @@ sal_Bool SwHHCWrapper::FindConvText_impl()
{
//! modified version of SvxSpellWrapper::FindSpellError
- //ShowLanguageErrors();
-
sal_Bool bFound = sal_False;
pWin->EnterWait();
@@ -797,22 +757,20 @@ void SwHHCWrapper::ConvStart_impl( SwConversionArgs /* [out] */ *pConversionArgs
void SwHHCWrapper::ConvEnd_impl( SwConversionArgs *pConversionArgs )
{
pView->SpellEnd( pConversionArgs );
- //ShowLanguageErrors();
}
sal_Bool SwHHCWrapper::ConvContinue_impl( SwConversionArgs *pConversionArgs )
{
sal_Bool bProgress = !bIsDrawObj && !bIsSelection;
-// bLastRet = aConvText.getLength() == 0;
pConversionArgs->aConvText = OUString();
pConversionArgs->nConvTextLang = LANGUAGE_NONE;
uno::Any aRet = bProgress ?
pView->GetWrtShell().SpellContinue( &nPageCount, &nPageStart, pConversionArgs ) :
pView->GetWrtShell().SpellContinue( &nPageCount, NULL, pConversionArgs );
- //aRet >>= aConvText;
return pConversionArgs->aConvText.getLength() != 0;
}
//////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/lingu/hyp.cxx b/sw/source/ui/lingu/hyp.cxx
index 69c3db509fed..d066fff361a9 100644
--- a/sw/source/ui/lingu/hyp.cxx
+++ b/sw/source/ui/lingu/hyp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,9 +37,7 @@
#include "wrtsh.hxx"
#include "globals.hrc"
#include <vcl/msgbox.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <linguistic/lngprops.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <swwait.hxx>
@@ -174,3 +173,4 @@ SwHyphWrapper::~SwHyphWrapper()
InfoBox( &pView->GetEditWin(), SW_RESSTR(STR_HYP_OK) ).Execute();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index 0bdbb6b60bb5..a548363957f6 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,9 +53,6 @@
#include "viewopt.hxx"
#include "wrtsh.hxx"
#include "wview.hxx"
-#include "swabstdlg.hxx"
-#include "chrdlg.hrc"
-
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
@@ -81,7 +79,6 @@
#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>
@@ -89,6 +86,7 @@
#include <vcl/msgbox.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
+#include <sal/macros.h>
#include <map>
@@ -177,8 +175,8 @@ LanguageType lcl_CheckLanguage(
lang::Locale a3( SvxCreateLocale( aLangList[3] ) );
#endif
- sal_Int32 nCount = sizeof(aLangList) / sizeof(aLangList[0]);
- for (sal_Int32 i = 0; i < nCount; i++)
+ sal_Int32 nCount = SAL_N_ELEMENTS(aLangList);
+ for (sal_Int32 i = 0; i < nCount; i++)
{
sal_Int16 nTmpLang = aLangList[i];
if (nTmpLang != LANGUAGE_NONE && nTmpLang != LANGUAGE_DONTKNOW)
@@ -307,7 +305,7 @@ void SwSpellPopup::fillLangPopupMenu(
aEntryTxt != sAsterix &&
aEntryTxt != sEmpty)
{
- DBG_ASSERT( nLangItemIdStart <= nItemId && nItemId <= nLangItemIdStart + MN_MAX_NUM_LANG,
+ OSL_ENSURE( nLangItemIdStart <= nItemId && nItemId <= nLangItemIdStart + MN_MAX_NUM_LANG,
"nItemId outside of expected range!" );
pPopupMenu->InsertItem( nItemId, aEntryTxt, MIB_RADIOCHECK );
if (aEntryTxt == aCurLang)
@@ -331,9 +329,8 @@ static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl )
Image aRes;
OUString aTmp;
osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp );
-// ::rtl::OString aPath = OString( aTmp.getStr(), aTmp.getLength(), osl_getThreadTextEncoding() );
#if defined(WNT)
-// aTmp = lcl_Win_GetShortPathName( aTmp );
+
#endif
Graphic aGraphic;
const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) );
@@ -352,7 +349,7 @@ OUString RetrieveLabelFromCommand( const OUString& aCmdURL )
{
try
{
- uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.UICommandDescription")) ), uno::UNO_QUERY );
if ( xNameAccess.is() )
{
uno::Reference< container::XNameAccess > xUICommandLabels;
@@ -367,7 +364,7 @@ OUString RetrieveLabelFromCommand( const OUString& aCmdURL )
{
for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
{
- if ( aPropSeq[i].Name.equalsAscii( "Name" ))
+ if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" ) ) )
{
aPropSeq[i].Value >>= aStr;
break;
@@ -389,15 +386,14 @@ OUString RetrieveLabelFromCommand( const OUString& aCmdURL )
SwSpellPopup::SwSpellPopup(
SwWrtShell* pWrtSh,
const uno::Reference< linguistic2::XSpellAlternatives > &xAlt,
- const String &rParaText ) :
-PopupMenu( SW_RES(MN_SPELL_POPUP) ),
-pSh( pWrtSh ),
-xSpellAlt(xAlt),
-bGrammarResults(false)
+ const String &rParaText
+) : PopupMenu( SW_RES(MN_SPELL_POPUP) )
+ , pSh( pWrtSh )
+ , xSpellAlt(xAlt)
+ , bGrammarResults(false)
{
- DBG_ASSERT(xSpellAlt.is(), "no spelling alternatives available");
+ OSL_ENSURE(xSpellAlt.is(), "no spelling alternatives available");
-// CreateAutoMnemonics();
SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
nCheckedLanguage = LANGUAGE_NONE;
@@ -409,7 +405,6 @@ bGrammarResults(false)
sal_Int16 nStringCount = static_cast< sal_Int16 >( aSuggestions.getLength() );
SvtLinguConfig aCfg;
- const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
PopupMenu *pMenu = GetPopupMenu(MN_AUTOCORR);
pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
@@ -421,7 +416,7 @@ bGrammarResults(false)
uno::Reference< container::XNamed > xNamed( xSpellAlt, uno::UNO_QUERY );
if (xNamed.is())
{
- aSuggestionImageUrl = aCfg.GetSpellAndGrammarContextSuggestionImage( xNamed->getName(), bHC );
+ aSuggestionImageUrl = aCfg.GetSpellAndGrammarContextSuggestionImage( xNamed->getName() );
aImage = Image( lcl_GetImageFromPngUrl( aSuggestionImageUrl ) );
}
@@ -472,7 +467,6 @@ bGrammarResults(false)
}
pMenu = GetPopupMenu(MN_ADD_TO_DIC);
-// pMenu->CreateAutoMnemonics();
pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); //! necessary to retrieve the correct dictionary name in 'Execute' below
bEnable = sal_False; // enable MN_ADD_TO_DIC?
uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
@@ -512,7 +506,7 @@ bGrammarResults(false)
if (xSvcInfo.is())
{
OUString aDictionaryImageUrl( aCfg.GetSpellAndGrammarContextDictionaryImage(
- xSvcInfo->getImplementationName(), bHC) );
+ xSvcInfo->getImplementationName() ) );
if (aDictionaryImageUrl.getLength() > 0)
{
Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) );
@@ -560,15 +554,10 @@ bGrammarResults(false)
pMenu = GetPopupMenu(MN_SET_LANGUAGE_PARAGRAPH);
fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, aLangTable_Paragraph );
EnableItem( MN_SET_LANGUAGE_PARAGRAPH, true );
-/*
- pMenu = GetPopupMenu(MN_SET_LANGUAGE_ALL_TEXT);
- fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, aLangTable_Document );
- EnableItem( MN_SET_LANGUAGE_ALL_TEXT, true );
-*/
+
uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
Image rImg = ::GetImage( xFrame,
- OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False,
- Application::GetSettings().GetStyleSettings().GetHighContrastMode() );
+ OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SpellingAndGrammarDialog")), sal_False );
SetItemImage( MN_SPELLING_DLG, rImg );
//////////////////////////////////////////////////////////////////////////////////
@@ -600,7 +589,6 @@ aInfo16( SW_RES(IMG_INFO_16) )
InsertItem( MN_SHORT_COMMENT, aMessageText, MIB_NOSELECT, nPos++ );
SetItemImage( MN_SHORT_COMMENT, aInfo16 );
-// CreateAutoMnemonics();
SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
InsertSeparator( nPos++ );
@@ -644,7 +632,6 @@ aInfo16( SW_RES(IMG_INFO_16) )
nGuessLangPara = LANGUAGE_NONE;
if (xLG.is())
{
-// nGuessLangWord = lcl_CheckLanguage( xSpellAlt->getWord(), ::GetSpellChecker(), xLG, sal_False );
nGuessLangPara = lcl_CheckLanguage( rParaText, ::GetSpellChecker(), xLG, sal_True );
}
if (nGuessLangWord != LANGUAGE_NONE || nGuessLangPara != LANGUAGE_NONE)
@@ -693,15 +680,10 @@ aInfo16( SW_RES(IMG_INFO_16) )
pMenu = GetPopupMenu(MN_SET_LANGUAGE_PARAGRAPH);
fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, aLangTable_Paragraph );
EnableItem( MN_SET_LANGUAGE_PARAGRAPH, true );
-/*
- pMenu = GetPopupMenu(MN_SET_LANGUAGE_ALL_TEXT);
- fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, aLangTable_Document );
- EnableItem( MN_SET_LANGUAGE_ALL_TEXT, true );
-*/
+
uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
Image rImg = ::GetImage( xFrame,
- OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False,
- Application::GetSettings().GetStyleSettings().GetHighContrastMode() );
+ OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SpellingAndGrammarDialog")), sal_False );
SetItemImage( MN_SPELLING_DLG, rImg );
//////////////////////////////////////////////////////////////////////////////////
@@ -714,14 +696,11 @@ aInfo16( SW_RES(IMG_INFO_16) )
---------------------------------------------------------------------------*/
sal_uInt16 SwSpellPopup::Execute( const Rectangle& rWordPos, Window* pWin )
{
-// SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
sal_uInt16 nRet = PopupMenu::Execute(pWin, pWin->LogicToPixel(rWordPos));
Execute( nRet );
return nRet;
}
-/*-- 19.01.2006 08:15:48---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwSpellPopup::Execute( sal_uInt16 nId )
{
if (nId == USHRT_MAX)
@@ -735,7 +714,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
{
sal_Int32 nAltIdx = (MN_SUGGESTION_START <= nId && nId <= MN_SUGGESTION_END) ?
nId - MN_SUGGESTION_START : nId - MN_AUTOCORR_START;
- DBG_ASSERT( 0 <= nAltIdx && nAltIdx < aSuggestions.getLength(), "index out of range" );
+ OSL_ENSURE( 0 <= nAltIdx && nAltIdx < aSuggestions.getLength(), "index out of range" );
if (0 <= nAltIdx && nAltIdx < aSuggestions.getLength() && (bGrammarResults || xSpellAlt.is()))
{
sal_Bool bOldIns = pSh->IsInsMode();
@@ -913,25 +892,9 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
lcl_CharDialog( *pSh, true, nId, 0, 0 );
pSh->Pop( sal_False ); // restore cursor
}
-#if 0
- else if (nId == MN_SET_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries - 1)
- {
- //Set Language_None as the default language
- SwLangHelper::SetLanguage_None( *pSh, false, aCoreSet );
- }
- else if (nId == MN_SET_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries)
- {
- // open the dialog "Tools/Options/Language Settings - Language"
- SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- if (pFact)
- {
- VclAbstractDialog* pDlg = pFact->CreateVclDialog( pSh->GetView().GetWindow(), SID_LANGUAGE_OPTIONS );
- pDlg->Execute();
- delete pDlg;
- }
- }
-#endif
}
pSh->EnterStdMode();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/lingu/sdrhhcwrap.cxx b/sw/source/ui/lingu/sdrhhcwrap.cxx
index 32127f413e1a..2e910d09e329 100644
--- a/sw/source/ui/lingu/sdrhhcwrap.cxx
+++ b/sw/source/ui/lingu/sdrhhcwrap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,13 +45,9 @@
#include <unotools/localedatawrapper.hxx>
#include <sdrhhcwrap.hxx>
#include <frmfmt.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx> // " " "
-#endif
#include <wrtsh.hxx> // MakeVisible
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <dcontact.hxx> // Spelling von DrawObj
#include <doc.hxx> // " " "
#include <docary.hxx>
@@ -109,13 +106,10 @@ SdrHHCWrapper::~SdrHHCWrapper()
if (pTextObj)
{
SdrView *pSdrView = pView->GetWrtShell().GetDrawView();
- ASSERT( pSdrView, "SdrHHCWrapper without DrawView?" );
+ OSL_ENSURE( pSdrView, "SdrHHCWrapper without DrawView?" );
pSdrView->SdrEndTextEdit( sal_True );
SetUpdateMode(sal_False);
pOutlView->SetOutputArea( Rectangle( Point(), Size(1, 1) ) );
-// SetPaperSize( Size(1, 1) );
-// SetText(NULL);
-// pTextObj = NULL;
}
RemoveView( pOutlView );
delete pOutlView;
@@ -135,7 +129,7 @@ sal_Bool SdrHHCWrapper::ConvertNextDocument()
if ( pTextObj )
{
SdrView *pSdrView = pView->GetWrtShell().GetDrawView();
- ASSERT( pSdrView, "SdrHHCWrapper without DrawView?" );
+ OSL_ENSURE( pSdrView, "SdrHHCWrapper without DrawView?" );
pSdrView->SdrEndTextEdit( sal_True );
SetUpdateMode(sal_False);
pOutlView->SetOutputArea( Rectangle( Point(), Size(1, 1) ) );
@@ -207,7 +201,7 @@ sal_Bool SdrHHCWrapper::ConvertNextDocument()
if (HasConvertibleTextPortion( nSourceLang ))
{
SdrView *pSdrView = pView->GetWrtShell().GetDrawView();
- ASSERT( pSdrView, "SdrHHCWrapper without DrawView?" );
+ OSL_ENSURE( pSdrView, "SdrHHCWrapper without DrawView?" );
SdrPageView* pPV = pSdrView->GetSdrPageView();
nDocIndex = n;
bNextDoc = sal_True;
@@ -233,3 +227,4 @@ sal_Bool SdrHHCWrapper::ConvertNextDocument()
//////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/lingu/sdrhhcwrap.hxx b/sw/source/ui/lingu/sdrhhcwrap.hxx
index 795e357e28c3..c9e202dcfc56 100644
--- a/sw/source/ui/lingu/sdrhhcwrap.hxx
+++ b/sw/source/ui/lingu/sdrhhcwrap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 5df6fc1fca5d..1d5489da0a01 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,10 +48,8 @@
#include "bookmark.hrc"
#include "misc.hrc"
-
const String BookmarkCombo::aForbiddenChars = String::CreateFromAscii("/\\@:*?\";,.#");
-
IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox )
{
sal_Bool bSelEntries = pBox->GetSelectEntryCount() != 0;
@@ -88,7 +87,6 @@ IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox )
/*------------------------------------------------------------------------
Beschreibung: Callback zum Loeschen einer Textmarke
-----------------------------------------------------------------------*/
-
IMPL_LINK( SwInsertBookmarkDlg, DeleteHdl, Button *, EMPTYARG )
{
// Textmarken aus der ComboBox entfernen
@@ -98,7 +96,6 @@ IMPL_LINK( SwInsertBookmarkDlg, DeleteHdl, Button *, EMPTYARG )
aBookmarkBox.SetText(aEmptyStr);
aDeleteBtn.Enable(sal_False); // keine weiteren Eintraege vorhanden
- // aBookmarkBox.SetText(aEmptyStr);
aOkBtn.Enable(); // Im OK Handler wird geloescht
return 0;
@@ -109,8 +106,6 @@ IMPL_LINK( SwInsertBookmarkDlg, DeleteHdl, Button *, EMPTYARG )
an die akt. Position ein. Geloeschte Textmarken werden auch am Modell
entfernt.
-----------------------------------------------------------------------*/
-
-
void SwInsertBookmarkDlg::Apply()
{
//at first remove deleted bookmarks to prevent multiple bookmarks with the same
@@ -147,8 +142,6 @@ void SwInsertBookmarkDlg::Apply()
/*------------------------------------------------------------------------
Beschreibung: CTOR
-----------------------------------------------------------------------*/
-
-
SwInsertBookmarkDlg::SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rS, SfxRequest& rRequest ) :
SvxStandardDialog(pParent,SW_RES(DLG_INSERT_BOOKMARK)),
@@ -180,45 +173,25 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rS, SfxRe
sRemoveWarning = String(SW_RES(STR_REMOVE_WARNING));
}
-/*------------------------------------------------------------------------
- Beschreibung:
- -----------------------------------------------------------------------*/
-
SwInsertBookmarkDlg::~SwInsertBookmarkDlg()
{
}
-/*------------------------------------------------------------------------
- Beschreibung:
- -----------------------------------------------------------------------*/
-
BookmarkCombo::BookmarkCombo( Window* pWin, const ResId& rResId ) :
SwComboBox(pWin, rResId)
{
}
-/*------------------------------------------------------------------------
- Beschreibung:
- -----------------------------------------------------------------------*/
-
sal_uInt16 BookmarkCombo::GetFirstSelEntryPos() const
{
return GetSelEntryPos(0);
}
-/*------------------------------------------------------------------------
- Beschreibung:
- -----------------------------------------------------------------------*/
-
sal_uInt16 BookmarkCombo::GetNextSelEntryPos(sal_uInt16 nPos) const
{
return GetSelEntryPos(nPos + 1);
}
-/*------------------------------------------------------------------------
- Beschreibung:
- -----------------------------------------------------------------------*/
-
sal_uInt16 BookmarkCombo::GetSelEntryPos(sal_uInt16 nPos) const
{
sal_Unicode cSep = GetMultiSelectionSeparator();
@@ -237,10 +210,6 @@ sal_uInt16 BookmarkCombo::GetSelEntryPos(sal_uInt16 nPos) const
return COMBOBOX_ENTRY_NOTFOUND;
}
-/*------------------------------------------------------------------------
- Beschreibung:
- -----------------------------------------------------------------------*/
-
sal_uInt16 BookmarkCombo::GetSelectEntryCount() const
{
sal_uInt16 nCnt = 0;
@@ -258,7 +227,6 @@ sal_uInt16 BookmarkCombo::GetSelectEntryCount() const
/*------------------------------------------------------------------------
Beschreibung: Position in der Listbox (der ComboBox)
-----------------------------------------------------------------------*/
-
sal_uInt16 BookmarkCombo::GetSelectEntryPos( sal_uInt16 nSelIndex ) const
{
sal_uInt16 nCnt = 0;
@@ -281,9 +249,7 @@ sal_uInt16 BookmarkCombo::GetSelectEntryPos( sal_uInt16 nSelIndex ) const
return COMBOBOX_ENTRY_NOTFOUND;
}
-/* -----------------05.02.99 08:39-------------------
- *
- * --------------------------------------------------*/
+
long BookmarkCombo::PreNotify( NotifyEvent& rNEvt )
{
long nHandled = 0;
@@ -299,5 +265,4 @@ long BookmarkCombo::PreNotify( NotifyEvent& rNEvt )
return nHandled;
}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/bookmark.src b/sw/source/ui/misc/bookmark.src
index 54e4bad5c5cf..da27b5553b79 100644
--- a/sw/source/ui/misc/bookmark.src
+++ b/sw/source/ui/misc/bookmark.src
@@ -34,7 +34,6 @@ ModalDialog DLG_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 */
Text [ en-US ] = "Insert Bookmark" ;
MOVEABLE = TRUE ;
SVLOOK = TRUE ;
@@ -66,7 +65,6 @@ ModalDialog DLG_INSERT_BOOKMARK
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 */
Text [ en-US ] = "~Delete" ;
TABSTOP = TRUE ;
DISABLE = TRUE ;
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 731e1451bd32..ab70140228e6 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,14 +35,9 @@
#include <svl/style.hxx>
-#include <errhdl.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <docfnote.hxx>
#include <impfnote.hxx>
#include <ftninfo.hxx>
@@ -53,18 +49,10 @@
#include <uitool.hxx>
#include <poolfmt.hxx>
#include <swstyle.h>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _MISC_HRC
#include <misc.hrc>
-#endif
-#ifndef _DOCFNOTE_HRC
#include <docfnote.hrc>
-#endif
-#ifndef _FRMUI_HRC
#include <frmui.hrc>
-#endif
#include <SwStyleNameMapper.hxx>
SwFootNoteOptionDlg::SwFootNoteOptionDlg( Window *pParent, SwWrtShell &rS ) :
@@ -203,7 +191,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
aPageTemplLbl.Enable(sal_False);
aPageTemplBox.Enable(sal_False);
}
- else // if ( rInf.ePos == FTNPOS_CHAPTER )
+ else
{
aPosChapterBox.Check();
aNumCountBox.RemoveEntry(aNumPage);
@@ -256,7 +244,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
aParaTemplBox.SelectEntry( sStr ); // Default
else
{
- ASSERT(!pColl->IsDefault(), "Defaultvorlage fuer Fussnoten ist falsch.");
+ OSL_ENSURE(!pColl->IsDefault(), "default style for footnotes is wrong");
const sal_uInt16 nPos = aParaTemplBox.GetEntryPos(pColl->GetName());
if( LISTBOX_ENTRY_NOTFOUND != nPos )
aParaTemplBox.SelectEntryPos( nPos );
@@ -312,9 +300,9 @@ void SwEndNoteOptionPage::SelectNumbering(int eNum)
case FTNNUM_CHAPTER:
sSelect = aNumChapter;
break;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
default:
- DBG_ERROR("Which numbering type?");
+ OSL_ENSURE(false, "Which numbering type?");
#endif
}
aNumCountBox.SelectEntry(sSelect);
@@ -329,9 +317,6 @@ int SwEndNoteOptionPage::GetNumbering() const
return (int) bPosDoc? nPos + 1: nPos;
}
-/*-----------------09.02.98 11:17-------------------
-
---------------------------------------------------*/
void SwEndNoteOptionPage::SetShell( SwWrtShell &rShell )
{
pSh = &rShell;
@@ -369,11 +354,6 @@ IMPL_LINK( SwEndNoteOptionPage, PosPageHdl, Button *, EMPTYARG )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
IMPL_LINK( SwEndNoteOptionPage, NumCountHdl, ListBox*, EMPTYARG )
{
sal_Bool bEnable = sal_True;
@@ -454,7 +434,7 @@ sal_Bool SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
{
const String aFmtName( aParaTemplBox.GetSelectEntry() );
SwTxtFmtColl *pColl = pSh->GetParaStyle(aFmtName, SwWrtShell::GETSTYLE_CREATEANY);
- ASSERT(pColl, "Absatzvorlage nicht gefunden.");
+ OSL_ENSURE(pColl, "paragraph style not found");
pInf->SetFtnTxtColl(*pColl);
}
@@ -501,3 +481,4 @@ SfxTabPage *SwFootNoteOptionPage::Create(Window *pParent, const SfxItemSet &rSet
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/docfnote.src b/sw/source/ui/misc/docfnote.src
index 5e1b1e4ac71b..171cb5bc0dad 100644
--- a/sw/source/ui/misc/docfnote.src
+++ b/sw/source/ui/misc/docfnote.src
@@ -523,7 +523,6 @@ TabPage TP_ENDNOTEOPTION
{
Pos = MAP_APPFONT ( 80 , 91 ) ;
Size = MAP_APPFONT ( 174 , 8 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Hinweistext mehrseitige Fußnoten : Hinweistext mehrseitige Fu˜noten */
Text [ en-US ] = "Continuation notice" ;
};
FixedText FT_CONT
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index de1342c91ae9..96177f96b5a2 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,9 +37,7 @@
#define _SVSTDARR_STRINGS
#include <tools/urlobj.hxx>
#include <tools/stream.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <vcl/help.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <unotools/tempfile.hxx>
@@ -53,15 +52,9 @@
#include <glosdoc.hxx>
#include <swunohelper.hxx>
-#ifndef _GLOSBIB_HRC
#include <glosbib.hrc>
-#endif
-#ifndef _MISC_HRC
#include <misc.hrc>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#define PATH_CASE_SENSITIVE 0x01
@@ -69,9 +62,6 @@
#define RENAME_TOKEN_DELIM (sal_Unicode)1
-/*-----------------09.06.97 13:05-------------------
-
---------------------------------------------------*/
SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
const SvStrings* pPathArr,
SwGlossaryHdl *pHdl) :
@@ -143,7 +133,6 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
pData->sGroupName = sGroup;
pData->sGroupTitle = sTitle;
String sTemp(sTitle);
- //sGroup.GetToken(0, GLOS_DELIM)
sTemp += '\t';
pData->sPath = aPathLB.GetEntry((sal_uInt16)sGroup.GetToken(1, GLOS_DELIM).ToInt32());
sTemp += pData->sPath;
@@ -154,9 +143,6 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
aGroupTLB.GetModel()->Resort();
}
-/*-----------------09.06.97 13:05-------------------
-
---------------------------------------------------*/
SwGlossaryGroupDlg::~SwGlossaryGroupDlg()
{
@@ -178,11 +164,7 @@ SwGlossaryGroupDlg::~SwGlossaryGroupDlg()
}
-/*-----------------09.06.97 13:11-------------------
-
---------------------------------------------------*/
-
-void __EXPORT SwGlossaryGroupDlg::Apply()
+void SwGlossaryGroupDlg::Apply()
{
if(aNewPB.IsEnabled())
NewHdl(&aNewPB);
@@ -252,9 +234,7 @@ void __EXPORT SwGlossaryGroupDlg::Apply()
}
}
}
-/*-----------------09.06.97 13:12-------------------
---------------------------------------------------*/
IMPL_LINK( SwGlossaryGroupDlg, SelectHdl, SvTabListBox*, EMPTYARG )
{
aNewPB.Enable(sal_False);
@@ -280,21 +260,16 @@ IMPL_LINK( SwGlossaryGroupDlg, SelectHdl, SvTabListBox*, EMPTYARG )
return 0;
}
-/*-----------------09.06.97 13:22-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwGlossaryGroupDlg, NewHdl, Button*, EMPTYARG )
{
String sGroup(aNameED.GetText());
-// sGroup.ToLower();
sGroup += GLOS_DELIM;
sGroup += String::CreateFromInt32(aPathLB.GetSelectEntryPos());
- DBG_ASSERT(!pGlosHdl->FindGroupName(sGroup), "Gruppe bereits vorhanden!");
+ OSL_ENSURE(!pGlosHdl->FindGroupName(sGroup), "group already available!");
if(!pInsertedArr)
pInsertedArr = new SvStrings;
pInsertedArr->Insert(new String(sGroup), pInsertedArr->Count());
String sTemp(aNameED.GetText());
-// sTemp.ToLower();
sTemp += '\t';
sTemp += aPathLB.GetSelectEntry();
SvLBoxEntry* pEntry = aGroupTLB.InsertEntry(sTemp);
@@ -309,9 +284,7 @@ IMPL_LINK( SwGlossaryGroupDlg, NewHdl, Button*, EMPTYARG )
return 0;
}
-/*-----------------09.06.97 13:22-------------------
---------------------------------------------------*/
IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
{
SvLBoxEntry* pEntry = aGroupTLB.FirstSelected();
@@ -377,9 +350,6 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
return 0;
}
-/* -----------------23.11.98 12:26-------------------
- *
- * --------------------------------------------------*/
IMPL_LINK( SwGlossaryGroupDlg, RenameHdl, Button *, EMPTYARG )
{
SvLBoxEntry* pEntry = aGroupTLB.FirstSelected();
@@ -392,7 +362,7 @@ IMPL_LINK( SwGlossaryGroupDlg, RenameHdl, Button *, EMPTYARG )
sNewName += GLOS_DELIM;
sNewName += String::CreateFromInt32(aPathLB.GetSelectEntryPos());
- DBG_ASSERT(!pGlosHdl->FindGroupName(sNewName), "Gruppe bereits vorhanden!");
+ OSL_ENSURE(!pGlosHdl->FindGroupName(sNewName), "group already available!");
// befindet sich der umzubenennende Name unter den
// den neuen - dann austauschen
@@ -425,7 +395,6 @@ IMPL_LINK( SwGlossaryGroupDlg, RenameHdl, Button *, EMPTYARG )
delete (GlosBibUserData*)pEntry->GetUserData();
aGroupTLB.GetModel()->Remove(pEntry);
String sTemp(aNameED.GetText());
-// sTemp.ToLower();
sTemp += '\t';
sTemp += aPathLB.GetSelectEntry();
pEntry = aGroupTLB.InsertEntry(sTemp);
@@ -439,13 +408,10 @@ IMPL_LINK( SwGlossaryGroupDlg, RenameHdl, Button *, EMPTYARG )
aGroupTLB.GetModel()->Resort();
return 0;
}
-/*-----------------09.06.97 13:42-------------------
---------------------------------------------------*/
IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
{
String sEntry(aNameED.GetText());
-// sEntry.ToLower();
sal_Bool bEnableNew = sal_True;
sal_Bool bEnableDel = sal_False;
sal_uLong nCaseReadonly =
@@ -490,11 +456,6 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
{
GlosBibUserData* pUserData = (GlosBibUserData*)pEntry->GetUserData();
bEnableDel = IsDeleteAllowed(pUserData->sGroupName);
-
-// String sGroup = aGroupTLB.GetEntryText(pEntry, 0);
-// sGroup += GLOS_DELIM;
-// sGroup += String::CreateFromInt32(aPathLB.GetEntryPos(aGroupTLB.GetEntryText(pEntry, 1)));
-// bEnableDel = IsDeleteAllowed(sGroup);
}
aDelPB.Enable(bEnableDel);
@@ -503,10 +464,6 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
sal_Bool SwGlossaryGroupDlg::IsDeleteAllowed(const String &rGroup)
{
sal_Bool bDel = (!pGlosHdl->IsReadOnly(&rGroup));
@@ -532,9 +489,6 @@ sal_Bool SwGlossaryGroupDlg::IsDeleteAllowed(const String &rGroup)
return bDel;
}
-/*-----------------18.07.97 19:06-------------------
-
---------------------------------------------------*/
void FEdit::KeyInput( const KeyEvent& rKEvent )
{
KeyCode aCode = rKEvent.GetKeyCode();
@@ -544,9 +498,7 @@ void FEdit::KeyInput( const KeyEvent& rKEvent )
SVT_SEARCHPATH_DELIMITER != rKEvent.GetCharCode() )
Edit::KeyInput( rKEvent );
}
-/* -----------------------------08.02.00 15:07--------------------------------
- ---------------------------------------------------------------------------*/
void SwGlossaryGroupTLB::RequestHelp( const HelpEvent& rHEvt )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
@@ -577,3 +529,5 @@ void SwGlossaryGroupTLB::RequestHelp( const HelpEvent& rHEvt )
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/glosbib.src b/sw/source/ui/misc/glosbib.src
index 97d83c4fdd90..25b83bf27d68 100644
--- a/sw/source/ui/misc/glosbib.src
+++ b/sw/source/ui/misc/glosbib.src
@@ -50,7 +50,6 @@ ModalDialog DLG_BIB_BASE
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 */
Text [ en-US ] = "~Delete" ;
TabStop = TRUE ;
Disable = TRUE ;
diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx
index 2545da326b11..357813684d5e 100644
--- a/sw/source/ui/misc/glosdoc.cxx
+++ b/sw/source/ui/misc/glosdoc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,15 +41,12 @@
#ifndef __RSC //autogen
#include <tools/errinf.hxx>
#endif
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <svl/urihelper.hxx>
-#ifndef SVTOOLS_FSTATHELPER_HXX
#include <svl/fstathelper.hxx>
-#endif
#include <unotools/pathoptions.hxx>
#include <unotools/tempfile.hxx>
#include <swtypes.hxx>
-#include <errhdl.hxx> // ASSERT
#include <uitool.hxx>
#include <glosdoc.hxx>
#include <shellio.hxx>
@@ -56,18 +54,12 @@
#include <unoatxt.hxx>
#include <swerror.h>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-
// PUBLIC METHODES -------------------------------------------------------
-/* -----------------------------08.02.00 15:54--------------------------------
-
- ---------------------------------------------------------------------------*/
String lcl_CheckFileName( const String& rNewFilePath,
const String& rNewGroupName )
{
@@ -111,25 +103,24 @@ String lcl_CheckFileName( const String& rNewFilePath,
}
return sRet;
}
+
/*------------------------------------------------------------------------
Beschreibung: Liefert den Namen der Default-Gruppe
------------------------------------------------------------------------*/
-
-
String SwGlossaries::GetDefName()
{
return String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "standard" ));
}
+
/*------------------------------------------------------------------------
Beschreibung: Liefert die Anzahl der Textbausteingruppen
------------------------------------------------------------------------*/
-
-
sal_uInt16 SwGlossaries::GetGroupCnt()
{
return GetNameList()->Count();
}
+
/*------------------------------------------------------------------------
Beschreibung: Liefert den Gruppennamen
------------------------------------------------------------------------*/
@@ -165,18 +156,13 @@ sal_Bool SwGlossaries::FindGroupName(String & rGroup)
}
return sal_False;
}
-/* ---------------------------------------------------------------------------
-
- ---------------------------------------------------------------------------*/
String SwGlossaries::GetGroupName(sal_uInt16 nGroupId)
{
- ASSERT(nGroupId < m_pGlosArr->Count(), Textbausteinarray ueberindiziert);
+ OSL_ENSURE(nGroupId < m_pGlosArr->Count(), "Textbausteinarray ueberindiziert");
return *(*m_pGlosArr)[nGroupId];
}
-/* -----------------------------08.02.00 13:04--------------------------------
- ---------------------------------------------------------------------------*/
String SwGlossaries::GetGroupTitle( const String& rGroupName )
{
String sRet;
@@ -195,7 +181,6 @@ String SwGlossaries::GetGroupTitle( const String& rGroupName )
/*------------------------------------------------------------------------
Beschreibung: Liefert das Textbaustein-Dokument der Gruppe rName
------------------------------------------------------------------------*/
-
SwTextBlocks* SwGlossaries::GetGroupDoc(const String &rName,
sal_Bool bCreate) const
{
@@ -224,17 +209,15 @@ SwTextBlocks* SwGlossaries::GetGroupDoc(const String &rName,
/*------------------------------------------------------------------------
Beschreibung: Loeschen Textblock
------------------------------------------------------------------------*/
-
void SwGlossaries::PutGroupDoc(SwTextBlocks *pBlock) {
delete pBlock;
}
+
/*------------------------------------------------------------------------
Beschreibung: Erzeugt ein neues Dokument mit dem Gruppenname
Wird temp. auch als File angelegt, damit die
Gruppen auch spaeter (ohne Zugriff) vorhanden sind.
------------------------------------------------------------------------*/
-
-
sal_Bool SwGlossaries::NewGroupDoc(String& rGroupName, const String& rTitle)
{
sal_uInt16 nNewPath = (sal_uInt16)rGroupName.GetToken(1, GLOS_DELIM).ToInt32();
@@ -256,9 +239,7 @@ sal_Bool SwGlossaries::NewGroupDoc(String& rGroupName, const String& rTitle)
}
return sal_False;
}
-/* -----------------23.11.98 13:13-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwGlossaries::RenameGroupDoc(
const String& rOldGroup, String& rNewGroup, const String& rNewTitle )
{
@@ -271,7 +252,7 @@ sal_Bool SwGlossaries::RenameGroupDoc(
sOldFileURL += rOldGroup.GetToken(0, GLOS_DELIM);
sOldFileURL += SwGlossaries::GetExtension();
sal_Bool bExist = FStatHelper::IsDocument( sOldFileURL );
- DBG_ASSERT(bExist, "Gruppe existiert nicht!");
+ OSL_ENSURE(bExist, "group doesn't exist!");
if(bExist)
{
sal_uInt16 nNewPath = (sal_uInt16)rNewGroup.GetToken(1, GLOS_DELIM).ToInt32();
@@ -280,14 +261,13 @@ sal_Bool SwGlossaries::RenameGroupDoc(
String sNewFilePath(*(*m_pPathArr)[nNewPath]);
String sNewFileName = lcl_CheckFileName(
sNewFilePath, rNewGroup.GetToken(0, GLOS_DELIM));
- //String aTmp( rNewGroup.GetToken(0, GLOS_DELIM));
const sal_uInt16 nFileNameLen = sNewFileName.Len();
sNewFileName += SwGlossaries::GetExtension();
String sTempNewFilePath(sNewFilePath);
sTempNewFilePath += INET_PATH_TOKEN;
sTempNewFilePath += sNewFileName ;
bExist = FStatHelper::IsDocument( sTempNewFilePath );
- DBG_ASSERT(!bExist, "Gruppe existiert bereits!");
+ OSL_ENSURE(!bExist, "group already exists!");
if(!bExist)
{
sal_Bool bCopyCompleted = SWUnoHelper::UCB_CopyFile(
@@ -322,8 +302,6 @@ sal_Bool SwGlossaries::RenameGroupDoc(
/*------------------------------------------------------------------------
Beschreibung: Loescht eine Textbausteingruppe
------------------------------------------------------------------------*/
-
-
sal_Bool SwGlossaries::DelGroupDoc(const String &rName)
{
sal_uInt16 nPath = (sal_uInt16)rName.GetToken(1, GLOS_DELIM).ToInt32();
@@ -342,15 +320,14 @@ sal_Bool SwGlossaries::DelGroupDoc(const String &rName)
// der Textbausteinbereiche entfernt werden
// Kein && wegen CFfront
sal_Bool bRemoved = SWUnoHelper::UCB_DeleteFile( sFileURL );
- DBG_ASSERT(bRemoved, "file has not been removed");
+ OSL_ENSURE(bRemoved, "file has not been removed");
RemoveFileFromList( aName );
return bRemoved;
}
+
/*------------------------------------------------------------------------
Beschreibung: DTOR
------------------------------------------------------------------------*/
-
-
SwGlossaries::~SwGlossaries()
{
sal_uInt16 nCount = m_pGlosArr? m_pGlosArr->Count() : 0;
@@ -372,11 +349,10 @@ SwGlossaries::~SwGlossaries()
InvalidateUNOOjects();
}
+
/*------------------------------------------------------------------------
Beschreibung: Bausteindokument einlesen
------------------------------------------------------------------------*/
-
-
SwTextBlocks* SwGlossaries::GetGlosDoc( const String &rName, sal_Bool bCreate ) const
{
sal_uInt16 nPath = (sal_uInt16)rName.GetToken(1, GLOS_DELIM).ToInt32();
@@ -414,7 +390,6 @@ SwTextBlocks* SwGlossaries::GetGlosDoc( const String &rName, sal_Bool bCreate )
/*------------------------------------------------------------------------
Beschreibung: Zugriff auf die Liste der Name; diese wird gfs. eingelesen
------------------------------------------------------------------------*/
-
SvStrings* SwGlossaries::GetNameList()
{
if( !m_pGlosArr )
@@ -455,8 +430,6 @@ SvStrings* SwGlossaries::GetNameList()
/*------------------------------------------------------------------------
Beschreibung: CTOR
------------------------------------------------------------------------*/
-
-
SwGlossaries::SwGlossaries() :
m_pPathArr(0),
m_pGlosArr(0)
@@ -469,7 +442,7 @@ SwGlossaries::SwGlossaries() :
Beschreibung: Neuen Pfad einstellen und internes Array neu aufbauen
------------------------------------------------------------------------*/
-/* -----------------21.01.99 15:36-------------------
+/* --------------------------------------------------
* #61050# Doppelte Pfade fuehren zu Verwirrung - als raus damit
* --------------------------------------------------*/
sal_Bool lcl_FindSameEntry(const SvStrings& rDirArr, const String& rEntryURL)
@@ -548,27 +521,18 @@ void SwGlossaries::UpdateGlosPath(sal_Bool bFull)
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
void SwGlossaries::ShowError()
{
sal_uInt32 nPathError = *new StringErrorInfo(ERR_AUTOPATH_ERROR,
m_sErrPath, ERRCODE_BUTTON_OK );
ErrorHandler::HandleError( nPathError );
}
-/* -----------------------------09.02.00 11:37--------------------------------
- ---------------------------------------------------------------------------*/
String SwGlossaries::GetExtension()
{
return String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( ".bau" ));
}
-
-
void SwGlossaries::RemoveFileFromList( const String& rGroup )
{
if(m_pGlosArr)
@@ -630,7 +594,6 @@ void SwGlossaries::RemoveFileFromList( const String& rGroup )
}
}
-
String SwGlossaries::GetCompleteGroupName( const rtl::OUString& GroupName )
{
sal_uInt16 nCount = GetGroupCnt();
@@ -650,7 +613,6 @@ String SwGlossaries::GetCompleteGroupName( const rtl::OUString& GroupName )
return aEmptyStr;
}
-
void SwGlossaries::InvalidateUNOOjects()
{
// invalidate all the AutoTextGroup-objects
@@ -685,9 +647,6 @@ void SwGlossaries::InvalidateUNOOjects()
m_aGlossaryEntries.swap( aTmpe );
}
-//-----------------------------------------------------------------------
-//--- 03.03.2003 14:15:32 -----------------------------------------------
-
Reference< text::XAutoTextGroup > SwGlossaries::GetAutoTextGroup( const ::rtl::OUString& _rGroupName, bool _bCreate )
{
// first, find the name with path-extension
@@ -742,9 +701,6 @@ Reference< text::XAutoTextGroup > SwGlossaries::GetAutoTextGroup( const ::rtl::O
return xGroup;
}
-//-----------------------------------------------------------------------
-//--- 03.03.2003 13:46:06 -----------------------------------------------
-
Reference< text::XAutoTextEntry > SwGlossaries::GetAutoTextEntry( const String& _rCompleteGroupName, const ::rtl::OUString& _rGroupName, const ::rtl::OUString& _rEntryName,
bool _bCreate )
{
@@ -802,5 +758,4 @@ Reference< text::XAutoTextEntry > SwGlossaries::GetAutoTextEntry( const String&
return xReturn;
}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 9835b2f4d681..24e3417747c0 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,9 +40,7 @@
#include <vcl/menu.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/help.hxx>
-#ifndef _SVSTDARR_HXX
#include <svl/svstdarr.hxx>
-#endif
#include <svl/stritem.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/lingucfg.hxx>
@@ -79,15 +78,9 @@
#include <cmdid.h>
#include <helpid.h>
#include <swerror.h>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _MISC_HRC
#include <misc.hrc>
-#endif
-#ifndef _GLOSSARY_HRC
#include <glossary.hrc>
-#endif
#include <swmodule.hxx>
#include <sfx2/filedlghelper.hxx>
@@ -129,9 +122,6 @@ String lcl_GetValidShortCut( const String& rName )
return aBuf;
}
-/* -----------------------------08.02.00 10:28--------------------------------
-
- ---------------------------------------------------------------------------*/
struct GroupUserData
{
String sGroupName;
@@ -204,7 +194,6 @@ SwNewGlosNameDlg::SwNewGlosNameDlg(Window* pParent,
/*------------------------------------------------------------------------
Beschreibung: aktuell eingestellte Gruppe erfragen / setzen
------------------------------------------------------------------------*/
-
String SwGlossaryDlg::GetCurrGroup()
{
if( ::GetCurrGlosGroup() && ::GetCurrGlosGroup()->Len() )
@@ -212,8 +201,6 @@ String SwGlossaryDlg::GetCurrGroup()
return SwGlossaries::GetDefName();
}
-
-
void SwGlossaryDlg::SetActGroup(const String &rGrp)
{
if( !::GetCurrGlosGroup() )
@@ -221,8 +208,6 @@ void SwGlossaryDlg::SetActGroup(const String &rGrp)
*(::GetCurrGlosGroup()) = rGrp;
}
-
-
SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame,
SwGlossaryHdl * pGlosHdl, SwWrtShell *pWrtShell) :
@@ -306,10 +291,6 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame,
Init();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwGlossaryDlg::~SwGlossaryDlg()
{
@@ -321,11 +302,10 @@ SwGlossaryDlg::~SwGlossaryDlg()
delete pMenu;
delete pExampleFrame;
}
+
/*------------------------------------------------------------------------
Beschreibung: Auswahl neue Gruppe
------------------------------------------------------------------------*/
-
-
IMPL_LINK( SwGlossaryDlg, GrpSelect, SvTreeListBox *, pBox )
{
SvLBoxEntry* pEntry = pBox->FirstSelected();
@@ -368,10 +348,6 @@ IMPL_LINK( SwGlossaryDlg, GrpSelect, SvTreeListBox *, pBox )
}
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwGlossaryDlg::Apply()
{
@@ -389,16 +365,14 @@ void SwGlossaryDlg::Apply()
aReq.Done();
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
+
/* inline */ void SwGlossaryDlg::EnableShortName(sal_Bool bOn)
{
aShortNameLbl.Enable(bOn);
aShortNameEdit.Enable(bOn);
}
-/* -----------------26.11.98 16:15-------------------
+/* --------------------------------------------------
* existiert der Titel in der ausgewaehlten Gruppe?
* --------------------------------------------------*/
SvLBoxEntry* SwGlossaryDlg::DoesBlockExist(const String& rBlock,
@@ -424,11 +398,6 @@ SvLBoxEntry* SwGlossaryDlg::DoesBlockExist(const String& rBlock,
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
IMPL_LINK( SwGlossaryDlg, NameModify, Edit *, pEdit )
{
String aName(aNameED.GetText());
@@ -472,10 +441,6 @@ IMPL_LINK( SwGlossaryDlg, NameModify, Edit *, pEdit )
}
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK_INLINE_START( SwGlossaryDlg, NameDoubleClick, SvTreeListBox*, pBox )
{
@@ -485,10 +450,6 @@ IMPL_LINK_INLINE_START( SwGlossaryDlg, NameDoubleClick, SvTreeListBox*, pBox )
return 0;
}
IMPL_LINK_INLINE_END( SwGlossaryDlg, NameDoubleClick, SvTreeListBox*, EMPTYARG )
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwGlossaryDlg, EnableHdl, Menu *, pMn )
{
@@ -513,10 +474,6 @@ IMPL_LINK( SwGlossaryDlg, EnableHdl, Menu *, pMn )
pMn->EnableItem( FN_GL_IMPORT, bEnable );
return 1;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
{
@@ -612,7 +569,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
if(aTitle.Len() && pGlossaryHdl->DelGlossary(aShortName))
{
SvLBoxEntry* pChild = DoesBlockExist(aTitle, aShortName);
- DBG_ASSERT(pChild, "Eintrag nicht gefunden!");
+ OSL_ENSURE(pChild, "entry not found!");
SvLBoxEntry* pParent = aCategoryBox.GetParent(pChild);
aCategoryBox.Select(pParent);
@@ -638,7 +595,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
aItem.SetMacro( SW_EVENT_END_INS_GLOSSARY, aEnd );
aSet.Put( aItem );
- aSet.Put( SwMacroAssignDlg::AddEvents( MACASSGN_TEXTBAUST ) );
+ aSet.Put( SwMacroAssignDlg::AddEvents( MACASSGN_AUTOTEXT ) );
const SfxPoolItem* pItem;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -700,11 +657,10 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
}
return 1;
}
+
/*--------------------------------------------------------------------
Beschreibung: Dialog Verwaltung Bereiche
--------------------------------------------------------------------*/
-
-
IMPL_LINK( SwGlossaryDlg, BibHdl, Button *, EMPTYARG )
{
SwGlossaries* pGloss = ::GetGlossaries();
@@ -782,8 +738,6 @@ IMPL_LINK( SwGlossaryDlg, BibHdl, Button *, EMPTYARG )
/*------------------------------------------------------------------------
Beschreibung: Initialisierung; aus Ctor und nach Bearbeiten Bereiche
------------------------------------------------------------------------*/
-
-
void SwGlossaryDlg::Init()
{
aCategoryBox.SetUpdateMode( sal_False );
@@ -793,6 +747,9 @@ void SwGlossaryDlg::Init()
SvLBoxEntry* pSelEntry = 0;
const String sSelStr(::GetCurrGlosGroup()->GetToken(0, GLOS_DELIM));
const sal_uInt16 nSelPath = static_cast< sal_uInt16 >(::GetCurrGlosGroup()->GetToken(1, GLOS_DELIM).ToInt32());
+ // #i66304# - "My AutoText" comes from mytexts.bau, but should be translated
+ const String sMyAutoTextEnglish(RTL_CONSTASCII_USTRINGPARAM("My AutoText"));
+ const String sMyAutoTextTranslated(SW_RESSTR(STR_MY_AUTOTEXT));
for(sal_uInt16 nId = 0; nId < nCnt; ++nId )
{
String sTitle;
@@ -801,6 +758,8 @@ void SwGlossaryDlg::Init()
continue;
if(!sTitle.Len())
sTitle = sGroupName.GetToken( 0, GLOS_DELIM );
+ if(sTitle == sMyAutoTextEnglish)
+ sTitle = sMyAutoTextTranslated;
SvLBoxEntry* pEntry = aCategoryBox.InsertEntry( sTitle );
sal_uInt16 nPath = static_cast< sal_uInt16 >(sGroupName.GetToken( 1, GLOS_DELIM ).ToInt32());
@@ -872,10 +831,6 @@ void SwGlossaryDlg::Init()
aInsertTipCB.Check( pCfg->IsAutoTextTip() );
aInsertTipCB.SetClickHdl(LINK(this, SwGlossaryDlg, CheckBoxHdl));
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK_INLINE_START( SwGlossaryDlg, EditHdl, Button *, EMPTYARG )
{
@@ -895,7 +850,6 @@ IMPL_LINK_INLINE_END( SwGlossaryDlg, EditHdl, Button *, EMPTYARG )
/*------------------------------------------------------------------------
Beschreibung: KeyInput fuer ShortName - Edits ohne Spaces
------------------------------------------------------------------------*/
-
IMPL_LINK( SwNewGlosNameDlg, Modify, Edit *, pBox )
{
String aName(aNewName.GetText());
@@ -910,9 +864,6 @@ IMPL_LINK( SwNewGlosNameDlg, Modify, Edit *, pBox )
aOk.Enable(bEnable);
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
IMPL_LINK( SwNewGlosNameDlg, Rename, Button *, EMPTYARG )
{
@@ -930,10 +881,6 @@ IMPL_LINK( SwNewGlosNameDlg, Rename, Button *, EMPTYARG )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwGlossaryDlg, CheckBoxHdl, CheckBox *, pBox )
{
SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
@@ -947,7 +894,7 @@ IMPL_LINK( SwGlossaryDlg, CheckBoxHdl, CheckBox *, pBox )
return 0;
}
-/* -----------------26.11.98 15:18-------------------
+/* --------------------------------------------------
* TreeListBox fuer Gruppen und Bausteine
* --------------------------------------------------*/
SwGlTreeListBox::SwGlTreeListBox(Window* pParent, const ResId& rResId) :
@@ -958,9 +905,7 @@ SwGlTreeListBox::SwGlTreeListBox(Window* pParent, const ResId& rResId) :
FreeResource();
SetDragDropMode( SV_DRAGDROP_CTRL_MOVE|SV_DRAGDROP_CTRL_COPY );
}
-/* -----------------30.11.98 10:49-------------------
- *
- * --------------------------------------------------*/
+
void SwGlTreeListBox::Clear()
{
SvLBoxEntry* pEntry = First();
@@ -975,9 +920,6 @@ void SwGlTreeListBox::Clear()
SvTreeListBox::Clear();
}
-/*-----------------10.06.97 14.52-------------------
-
---------------------------------------------------*/
void SwGlTreeListBox::RequestHelp( const HelpEvent& rHEvt )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
@@ -1029,9 +971,7 @@ void SwGlTreeListBox::RequestHelp( const HelpEvent& rHEvt )
}
}
}
-/* -----------------26.11.98 14:42-------------------
- *
- * --------------------------------------------------*/
+
DragDropMode SwGlTreeListBox::NotifyStartDrag(
TransferDataContainer& /*rContainer*/,
SvLBoxEntry* pEntry )
@@ -1060,9 +1000,7 @@ DragDropMode SwGlTreeListBox::NotifyStartDrag(
}
return eRet;
}
-/* -----------------27.11.98 09:35-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwGlTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry)
{
// TODO: Readonly - Ueberpruefung fehlt noch!
@@ -1072,9 +1010,7 @@ sal_Bool SwGlTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry)
return pDestParent != pSrcParent;
}
-/* -----------------26.11.98 14:42-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwGlTreeListBox::NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& /*rpNewParent*/,
@@ -1120,9 +1056,7 @@ sal_Bool SwGlTreeListBox::NotifyMoving( SvLBoxEntry* pTarget,
}
return sal_False; //sonst wird der Eintrag automatisch vorgenommen
}
-/* -----------------26.11.98 14:42-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwGlTreeListBox::NotifyCopying( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& /*rpNewParent*/,
@@ -1170,10 +1104,6 @@ sal_Bool SwGlTreeListBox::NotifyCopying( SvLBoxEntry* pTarget,
return sal_False; //sonst wird der Eintrag automatisch vorgenommen
}
-
-/*-----------------10.06.97 15.18-------------------
-
---------------------------------------------------*/
String SwGlossaryDlg::GetCurrGrpName() const
{
SvLBoxEntry* pEntry = aCategoryBox.FirstSelected();
@@ -1190,16 +1120,13 @@ String SwGlossaryDlg::GetCurrGrpName() const
return sRet;
}
-/*-----------------11.06.97 08.17-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwGlossaryDlg, PathHdl, Button *, pBtn )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
AbstractSvxMultiPathDialog* pDlg = pFact->CreateSvxMultiPathDialog( pBtn );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
SvtPathOptions aPathOpt;
String sGlosPath( aPathOpt.GetAutoTextPath() );
pDlg->SetPath(sGlosPath);
@@ -1217,9 +1144,7 @@ IMPL_LINK( SwGlossaryDlg, PathHdl, Button *, pBtn )
}
return 0;
}
-/* -----------------28.07.99 13:48-------------------
- --------------------------------------------------*/
IMPL_LINK( SwGlossaryDlg, ShowPreviewHdl, CheckBox *, pBox )
{
sal_Bool bCreated = sal_False;
@@ -1243,9 +1168,7 @@ IMPL_LINK( SwGlossaryDlg, ShowPreviewHdl, CheckBox *, pBox )
return 0;
};
-/* -----------------18.11.99 17:09-------------------
- --------------------------------------------------*/
IMPL_LINK( SwGlossaryDlg, PreviewLoadedHdl, void *, EMPTYARG )
{
sal_Bool bShow = aShowExampleCB.IsChecked();
@@ -1255,9 +1178,6 @@ IMPL_LINK( SwGlossaryDlg, PreviewLoadedHdl, void *, EMPTYARG )
return 0;
}
-/* -----------------28.07.99 16:28-------------------
-
- --------------------------------------------------*/
void SwGlossaryDlg::ShowAutoText(const String& rGroup, const String& rShortName)
{
if(aExampleWIN.IsVisible())
@@ -1267,9 +1187,7 @@ void SwGlossaryDlg::ShowAutoText(const String& rGroup, const String& rShortName)
pExampleFrame->ClearDocument( sal_True );
}
}
-/* -----------------------------21.12.00 11:33--------------------------------
- ---------------------------------------------------------------------------*/
void SwGlossaryDlg::ResumeShowAutoText()
{
String sGroup, sShortName;
@@ -1307,4 +1225,4 @@ void SwGlossaryDlg::ResumeShowAutoText()
ResetResumeData();
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src
index 1302f02fbf9a..4e2db6dcfe49 100644
--- a/sw/source/ui/misc/glossary.src
+++ b/sw/source/ui/misc/glossary.src
@@ -138,9 +138,7 @@ ModalDialog DLG_GLOSSARY
{
Pos = MAP_APPFONT ( 319 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? ~Einfügen : ~Einf³gen */
Text [ en-US ] = "~Insert" ;
- /* ### ACHTUNG: Neuer Text in Resource? Fügt den aktuellen Textblock ein und schließt das Dialogfeld : F³gt den aktuellen Textblock ein und schlie˜t das Dialogfeld */
TabStop = TRUE ;
DefButton = TRUE ;
};
@@ -148,7 +146,6 @@ ModalDialog DLG_GLOSSARY
{
Pos = MAP_APPFONT ( 319 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? ~Schließen : ~Schlie˜en */
Text [ en-US ] = "~Close" ;
TabStop = TRUE ;
};
@@ -229,7 +226,6 @@ ModalDialog DLG_GLOSSARY
{
Identifier = FN_GL_DELETE ;
HelpID = HID_MD_GLOS_DELETE ;
- /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
Text [ en-US ] = "~Delete" ;
};
MenuItem
@@ -267,14 +263,12 @@ ModalDialog DLG_GLOSSARY
};
InfoBox MSG_DOUBLE_SHORTNAME
{
- /* ### ACHTUNG: Neuer Text in Resource? Kürzel wird bereits verwendet. Bitte einen anderen Namen vergeben! : K³rzel wird bereits verwendet. Bitte einen anderen Namen vergeben! */
Message [ en-US ] = "Shortcut name already exists. Please choose another name." ;
};
QueryBox MSG_QUERY_DELETE
{
BUTTONS = WB_YES_NO ;
DEFBUTTON = WB_DEF_NO ;
- /* ### ACHTUNG: Neuer Text in Resource? Soll der AutoText gelöscht werden? : Soll der AutoText gel÷scht werden? */
Message [ en-US ] = "Delete AutoText?" ;
};
String STR_QUERY_DELETE_GROUP1
@@ -283,7 +277,6 @@ String STR_QUERY_DELETE_GROUP1
};
String STR_QUERY_DELETE_GROUP2
{
- /* ### ACHTUNG: Neuer Text in Resource? gelöscht werden? : gel÷scht werden? */
Text [ en-US ] = "?" ;
};
String STR_GLOSSARY
@@ -393,92 +386,7 @@ InfoBox MSG_NO_GLOSSARIES
Message [ en-US ] = "There is no AutoText in this file.";
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+String STR_MY_AUTOTEXT
+{
+ Text[ en-US ] = "My AutoText";
+};
diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx
index ce41c2906e45..a0d6693e74ae 100644
--- a/sw/source/ui/misc/glshell.cxx
+++ b/sw/source/ui/misc/glshell.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,6 @@
#include <com/sun/star/frame/XTitle.hpp>
-#include <tools/list.hxx>
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
#include <sfx2/printer.hxx>
@@ -57,9 +57,9 @@
#include <swerror.h>
#include <misc.hrc>
-
#define SwWebGlosDocShell
#define SwGlosDocShell
+
#include <sfx2/msg.hxx>
#include <swslots.hxx>
@@ -73,11 +73,9 @@ SFX_IMPL_INTERFACE( SwWebGlosDocShell, SwWebDocShell, SW_RES(0) )
{
}
-
TYPEINIT1( SwGlosDocShell, SwDocShell );
TYPEINIT1( SwWebGlosDocShell, SwWebDocShell );
-
void lcl_Execute( SwDocShell& rSh, SfxRequest& rReq )
{
if ( rReq.GetSlot() == SID_SAVEDOC )
@@ -97,7 +95,6 @@ void lcl_Execute( SwDocShell& rSh, SfxRequest& rReq )
}
}
-
void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet )
{
if( SFX_ITEM_AVAILABLE >= rSet.GetItemState( SID_SAVEDOC, sal_False ))
@@ -109,7 +106,6 @@ void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet )
}
}
-
sal_Bool lcl_Save( SwWrtShell& rSh, const String& rGroupName,
const String& rShortNm, const String& rLongNm )
{
@@ -141,11 +137,6 @@ sal_Bool lcl_Save( SwWrtShell& rSh, const String& rGroupName,
return nRet != USHRT_MAX;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwGlosDocShell::SwGlosDocShell(sal_Bool bNewShow)
: SwDocShell( (bNewShow)
? SFX_CREATE_MODE_STANDARD : SFX_CREATE_MODE_INTERNAL )
@@ -154,40 +145,20 @@ SwGlosDocShell::SwGlosDocShell(sal_Bool bNewShow)
SetHelpId(SW_GLOSDOCSHELL);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwGlosDocShell::~SwGlosDocShell( )
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwGlosDocShell::Execute( SfxRequest& rReq )
{
::lcl_Execute( *this, rReq );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwGlosDocShell::GetState( SfxItemSet& rSet )
{
::lcl_GetState( *this, rSet );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
sal_Bool SwGlosDocShell::Save()
{
// In case of an API object which holds this document, it is possible that the WrtShell is already
@@ -204,53 +175,26 @@ sal_Bool SwGlosDocShell::Save()
}
}
-
-/* */
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwWebGlosDocShell::SwWebGlosDocShell()
: SwWebDocShell( SFX_CREATE_MODE_STANDARD )
{
SetHelpId(SW_WEBGLOSDOCSHELL);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwWebGlosDocShell::~SwWebGlosDocShell( )
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwWebGlosDocShell::Execute( SfxRequest& rReq )
{
::lcl_Execute( *this, rReq );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwWebGlosDocShell::GetState( SfxItemSet& rSet )
{
::lcl_GetState( *this, rSet );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
sal_Bool SwWebGlosDocShell::Save()
{
// same comment as in SwGlosDocShell::Save - see there
@@ -263,10 +207,6 @@ sal_Bool SwWebGlosDocShell::Save()
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SV_IMPL_REF ( SwDocShell )
SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rShortName, sal_Bool bShow )
@@ -346,4 +286,4 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS
return xDocSh;
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx
index 9dc2b28e721c..ad90331808f0 100644
--- a/sw/source/ui/misc/impfnote.hxx
+++ b/sw/source/ui/misc/impfnote.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,10 @@
#define _IMPFNOTE_HXX
#include <sfx2/tabdlg.hxx>
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _FIELD_HXX //autogen
#include <vcl/field.hxx>
-#endif
#include <numberingtypelistbox.hxx>
class SwWrtShell;
@@ -118,3 +111,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 7e9d4894faaa..3fbb9effb9f8 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,7 +59,7 @@ static sal_Bool bFootnote = sal_True;
Beschreibung: Einfuegen der Fussnote durch OK
------------------------------------------------------------------------*/
-void __EXPORT SwInsFootNoteDlg::Apply()
+void SwInsFootNoteDlg::Apply()
{
String aStr;
@@ -92,37 +93,12 @@ void __EXPORT SwInsFootNoteDlg::Apply()
}
else
{
-/*
- rSh.StartUndo( UNDO_UI_INSERT_FOOTNOTE );
- rSh.InsertFootnote( aStr, aEndNoteBtn.IsChecked(), !bExtCharAvailable );
- if ( bExtCharAvailable )
- {
- rSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False );
- SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
- rSh.GetAttr( aSet );
- SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
- SvxFontItem aFont( rFont.GetFamily(), aFontName,
- rFont.GetStyleName(), rFont.GetPitch(),
- eCharSet );
- aSet.Put( aFont );
- rSh.SetAttr( aSet, SETATTR_DONTEXPAND );
- // zur Bearbeitung des Fussnotentextes
- rSh.ResetSelect(0, sal_False);
- rSh.GotoFtnTxt();
- }
- rSh.EndUndo( UNDO_UI_INSERT_FOOTNOTE );
-*/
}
bFootnote = aFtnBtn.IsChecked();
}
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberCharHdl, Button *, EMPTYARG )
{
aNumberCharEdit.GrabFocus();
@@ -131,10 +107,6 @@ IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberCharHdl, Button *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberCharHdl, Button *, EMPTYARG )
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG )
{
aNumberCharBtn.Check( sal_True );
@@ -144,10 +116,6 @@ IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG )
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG )
{
aOkBtn.Enable( sal_True );
@@ -155,10 +123,6 @@ IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG )
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG )
{
aNumberCharBtn.Check( sal_True );
@@ -202,10 +166,6 @@ IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn )
{
Apply();
@@ -222,10 +182,6 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, sal_Bool bEd) :
SvxStandardDialog(pParent,SW_RES(DLG_INS_FOOTNOTE)),
@@ -275,11 +231,6 @@ SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, sal_Bool
}
}
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwInsFootNoteDlg::~SwInsFootNoteDlg()
{
rSh.SetCareWin(0);
@@ -288,10 +239,6 @@ SwInsFootNoteDlg::~SwInsFootNoteDlg()
rSh.ResetSelect(0, sal_False);
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwInsFootNoteDlg::Init()
{
SwFmtFtn aFtnNote;
@@ -355,3 +302,4 @@ void SwInsFootNoteDlg::Init()
rSh.EndAction();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/insfnote.src b/sw/source/ui/misc/insfnote.src
index 964f174f189b..a37f03817374 100644
--- a/sw/source/ui/misc/insfnote.src
+++ b/sw/source/ui/misc/insfnote.src
@@ -35,7 +35,6 @@ ModalDialog DLG_INS_FOOTNOTE
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 160 , 100 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Fußnote einfügen : Fu˜note einf³gen */
Text [ en-US ] = "Insert Footnote/Endnote" ;
Moveable = TRUE ;
Edit ED_NUMBER_CHAR
diff --git a/sw/source/ui/misc/insrule.cxx b/sw/source/ui/misc/insrule.cxx
index 2409b773850a..d861f085c86f 100644
--- a/sw/source/ui/misc/insrule.cxx
+++ b/sw/source/ui/misc/insrule.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,9 +37,7 @@
#include "hintids.hxx"
#include <svx/gallery.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <editeng/brshitem.hxx>
#include <svl/urihelper.hxx>
#include <vcl/graph.hxx>
@@ -51,11 +50,6 @@
#include "misc.hrc"
#include "helpid.h"
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
SwInsertGrfRulerDlg::SwInsertGrfRulerDlg( Window* pParent ) :
SfxModalDialog(pParent, SW_RES(DLG_INSERT_RULER)),
aSelectionFL(this, SW_RES(FL_SEL )),
@@ -90,9 +84,6 @@ SwInsertGrfRulerDlg::SwInsertGrfRulerDlg( Window* pParent ) :
pExampleVS->Show();
}
-/*-----------------14.02.97 13.18-------------------
-
---------------------------------------------------*/
SwInsertGrfRulerDlg::~SwInsertGrfRulerDlg()
{
@@ -100,10 +91,6 @@ SwInsertGrfRulerDlg::~SwInsertGrfRulerDlg()
delete pExampleVS;
}
-/*-----------------14.02.97 13.17-------------------
-
---------------------------------------------------*/
-
String SwInsertGrfRulerDlg::GetGraphicName()
{
String sRet;
@@ -115,10 +102,6 @@ String SwInsertGrfRulerDlg::GetGraphicName()
return sRet;
}
-/*-----------------14.02.97 13.20-------------------
-
---------------------------------------------------*/
-
IMPL_LINK(SwInsertGrfRulerDlg, SelectHdl, ValueSet*, pVS)
{
nSelPos = pVS->GetSelectItemId();
@@ -126,24 +109,17 @@ IMPL_LINK(SwInsertGrfRulerDlg, SelectHdl, ValueSet*, pVS)
return 0;
}
-/*-----------------14.02.97 14.17-------------------
-
---------------------------------------------------*/
SwRulerValueSet::SwRulerValueSet( Window* pParent, const ResId& rResId ) :
SvxBmpNumValueSet(pParent, rResId)
{
SetStyle( GetStyle() & ~WB_ITEMBORDER );
}
-/*-----------------14.02.97 14.17-------------------
---------------------------------------------------*/
SwRulerValueSet::~SwRulerValueSet()
{
}
-/*-----------------14.02.97 13.42-------------------
---------------------------------------------------*/
-void __EXPORT SwRulerValueSet::UserDraw( const UserDrawEvent& rUDEvt )
+void SwRulerValueSet::UserDraw( const UserDrawEvent& rUDEvt )
{
Rectangle aRect = rUDEvt.GetRect();
OutputDevice* pDev = rUDEvt.GetDevice();
@@ -214,13 +190,10 @@ void __EXPORT SwRulerValueSet::UserDraw( const UserDrawEvent& rUDEvt )
}
}
-/*-----------------15.02.97 10.03-------------------
-
---------------------------------------------------*/
-
IMPL_LINK(SwInsertGrfRulerDlg, DoubleClickHdl, ValueSet*, EMPTYARG)
{
EndDialog(RET_OK);
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index 4b03871e9f7d..74f479424079 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,11 +42,6 @@
#include <docsh.hxx>
#include <charfmt.hxx>
-//#ifndef _FLDMGR_HXX //autogen
-//#include <fldmgr.hxx>
-//#endif
-
-
#include <docstyle.hxx>
#include "fldbas.hxx"
@@ -57,10 +53,6 @@
#include <IDocumentStylePoolAccess.hxx>
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw) :
SfxSingleTabDialog(&pVw->GetViewFrame()->GetWindow(), 0, 0),
pSh(pVw->GetWrtShellPtr())
@@ -71,18 +63,10 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw) :
GetOKButton()->SetClickHdl(LINK(this, SwLineNumberingDlg, OKHdl));
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-__EXPORT SwLineNumberingDlg::~SwLineNumberingDlg()
+SwLineNumberingDlg::~SwLineNumberingDlg()
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwLineNumberingDlg, OKHdl, Button *, EMPTYARG )
{
if (GetOKButton()->IsEnabled())
@@ -97,10 +81,6 @@ IMPL_LINK( SwLineNumberingDlg, OKHdl, Button *, EMPTYARG )
return 0;
}
-/*-----------------------------------------------------------------------
- Beschreibung:
- -----------------------------------------------------------------------*/
-
SwLineNumberingPage::SwLineNumberingPage( Window* pParent,
const SfxItemSet& rSet )
: SfxTabPage(pParent, SW_RES(TP_LINENUMBERING), rSet),
@@ -147,28 +127,16 @@ SwLineNumberingPage::SwLineNumberingPage( Window* pParent,
::FillCharStyleListBox(aCharStyleLB, pSh->GetView().GetDocShell());
}
-/*-----------------------------------------------------------------------
- Beschreibung:
- -----------------------------------------------------------------------*/
-
-__EXPORT SwLineNumberingPage::~SwLineNumberingPage()
+SwLineNumberingPage::~SwLineNumberingPage()
{
}
-/*-----------------------------------------------------------------------
- Beschreibung:
- -----------------------------------------------------------------------*/
-
-SfxTabPage* __EXPORT SwLineNumberingPage::Create( Window* pParent, const SfxItemSet& rSet )
+SfxTabPage* SwLineNumberingPage::Create( Window* pParent, const SfxItemSet& rSet )
{
return new SwLineNumberingPage( pParent, rSet );
}
-/*-----------------------------------------------------------------------
- Beschreibung:
- -----------------------------------------------------------------------*/
-
-void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& )
+void SwLineNumberingPage::Reset( const SfxItemSet& )
{
const SwLineNumberInfo &rInf = pSh->GetLineNumberInfo();
IDocumentStylePoolAccess* pIDSPA = pSh->getIDocumentStylePoolAccess();
@@ -188,22 +156,9 @@ void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& )
}
// Format
-// SwFldMgr aMgr( pSh );
sal_uInt16 nSelFmt = rInf.GetNumType().GetNumberingType();
-// sal_uInt16 nCnt = aMgr.GetFormatCount( TYP_SEQFLD, sal_False );
-
-// for( sal_uInt16 i = 0; i < nCnt; i++)
-// {
-// aFormatLB.InsertEntry(aMgr.GetFormatStr( TYP_SEQFLD, i));
-// sal_uInt16 nFmtId = aMgr.GetFormatId( TYP_SEQFLD, i );
-// aFormatLB.SetEntryData( i, (void*)nFmtId );
-// if( nFmtId == nSelFmt )
-// aFormatLB.SelectEntryPos( i );
-// }
- aFormatLB.SelectNumberingType(nSelFmt);
-// if ( !aFormatLB.GetSelectEntryCount() )
-// aFormatLB.SelectEntryPos(aFormatLB.GetEntryCount() - 1);
+ aFormatLB.SelectNumberingType(nSelFmt);
// Position
aPosLB.SelectEntryPos((sal_uInt16)rInf.GetPos());
@@ -240,7 +195,6 @@ void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& )
/*--------------------------------------------------------------------
Beschreibung: Modify
--------------------------------------------------------------------*/
-
IMPL_LINK( SwLineNumberingPage, ModifyHdl, Edit *, EMPTYARG )
{
sal_Bool bHasValue = aDivisorED.GetText().Len() != 0;
@@ -255,7 +209,6 @@ IMPL_LINK( SwLineNumberingPage, ModifyHdl, Edit *, EMPTYARG )
/*--------------------------------------------------------------------
Beschreibung: On/Off
--------------------------------------------------------------------*/
-
IMPL_LINK( SwLineNumberingPage, LineOnOffHdl, CheckBox *, EMPTYARG )
{
sal_Bool bEnable = aNumberingOnCB.IsChecked();
@@ -286,11 +239,7 @@ IMPL_LINK( SwLineNumberingPage, LineOnOffHdl, CheckBox *, EMPTYARG )
return 0;
}
-/*-----------------------------------------------------------------------
- Beschreibung:
- -----------------------------------------------------------------------*/
-
-sal_Bool __EXPORT SwLineNumberingPage::FillItemSet( SfxItemSet& )
+sal_Bool SwLineNumberingPage::FillItemSet( SfxItemSet& )
{
SwLineNumberInfo aInf(pSh->GetLineNumberInfo());
@@ -343,4 +292,4 @@ sal_Bool __EXPORT SwLineNumberingPage::FillItemSet( SfxItemSet& )
return sal_False;
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 4b6b48e5ccea..b15ebfbbc007 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,9 +38,7 @@
#define _NUM_CXX
#include <hintids.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <tools/urlobj.hxx>
#include <sfx2/app.hxx>
#include <sfx2/imgmgr.hxx>
@@ -50,16 +49,10 @@
#include <swvset.hxx>
#include <swmodule.hxx>
#include <wrtsh.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
-#ifndef _WVIEW_HXX
#include <wview.hxx>
-#endif
#include <uitool.hxx>
-#ifndef _WDOCSH_HXX
#include <wdocsh.hxx>
-#endif
#include <uiitems.hxx>
#include <docstyle.hxx>
#include <charfmt.hxx>
@@ -71,21 +64,11 @@
#include <viewopt.hxx>
#include <frmmgr.hxx>
-#ifndef _MISC_HRC
#include <misc.hrc>
-#endif
-#ifndef _FRMUI_HRC
#include <frmui.hrc>
-#endif
-#ifndef _NUM_HRC
#include <num.hrc>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#include <SwStyleNameMapper.hxx>
#include <svx/svxids.hrc>
#include <svx/dialogs.hrc>
@@ -95,9 +78,6 @@
static sal_Bool bLastRelative = sal_False;
-/*-----------------03.12.97 10:02-------------------
-
---------------------------------------------------*/
SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
const SfxItemSet& rSet) :
SfxTabPage( pParent, SW_RES( TP_NUM_POSITION ), rSet ),
@@ -114,7 +94,6 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
aDistNumMF( this, SW_RES(MF_NUMDIST )),
aAlignFT( this, SW_RES(FT_ALIGN )),
aAlignLB( this, SW_RES(LB_ALIGN )),
- // --> OD 2008-02-01 #newlistlevelattrs#
aLabelFollowedByFT( this, SW_RES(FT_LABEL_FOLLOWED_BY) ),
aLabelFollowedByLB( this, SW_RES(LB_LABEL_FOLLOWED_BY) ),
aListtabFT( this, SW_RES(FT_LISTTAB) ),
@@ -125,7 +104,6 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
aAlignedAtMF( this, SW_RES(MF_ALIGNED_AT) ),
aIndentAtFT( this, SW_RES(FT_INDENT_AT) ),
aIndentAtMF( this, SW_RES(MF_INDENT_AT) ),
- // <--
aStandardPB( this, SW_RES(PB_STANDARD )),
aPreviewWIN( this, SW_RES(WIN_PREVIEW )),
@@ -136,9 +114,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
pOutlineDlg(0),
bPreset( sal_False ),
bInInintControl(sal_False),
- // --> OD 2008-02-01 #newlistlevelattrs#
bLabelAlignmentPosAndSpaceModeActive( false )
- // <--
{
FreeResource();
SetExchangeSupport();
@@ -149,7 +125,6 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
aRelativeCB.Check();
aAlignLB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl));
- // --> OD 2008-02-01 #newlistlevelattrs#
aAlign2LB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl));
for ( sal_uInt16 i = 0; i < aAlignLB.GetEntryCount(); ++i )
{
@@ -157,7 +132,6 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
}
aAlign2LB.SetDropDownLineCount( aAlign2LB.GetEntryCount() );
aAlign2FT.SetText( aAlignFT.GetText() );
- // <--
Link aLk = LINK(this, SwNumPositionTabPage, DistanceHdl);
aDistBorderMF.SetUpHdl(aLk);
@@ -170,7 +144,6 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
aDistNumMF.SetLoseFocusHdl(aLk);
aIndentMF.SetLoseFocusHdl(aLk);
- // --> OD 2008-02-01 #newlistlevelattrs#
aLabelFollowedByLB.SetDropDownLineCount( aLabelFollowedByLB.GetEntryCount() );
aLabelFollowedByLB.SetSelectHdl( LINK(this, SwNumPositionTabPage, LabelFollowedByHdl_Impl) );
@@ -188,7 +161,6 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
aIndentAtMF.SetUpHdl(aLk);
aIndentAtMF.SetDownHdl(aLk);
aIndentAtMF.SetLoseFocusHdl(aLk);
- // <--
aLevelLB.SetSelectHdl(LINK(this, SwNumPositionTabPage, LevelHdl));
aRelativeCB.SetClickHdl(LINK(this, SwNumPositionTabPage, RelativeHdl));
@@ -205,20 +177,15 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
aRelativeCB.Check(bLastRelative);
aPreviewWIN.SetPositionMode();
}
-/*-----------------03.12.97 10:02-------------------
---------------------------------------------------*/
SwNumPositionTabPage::~SwNumPositionTabPage()
{
delete pActNum;
}
-/*-----------------03.12.97 10:06-------------------
---------------------------------------------------*/
void SwNumPositionTabPage::InitControls()
{
bInInintControl = sal_True;
- // --> OD 2008-02-01 #newlistlevelattrs#
const bool bRelative = !bLabelAlignmentPosAndSpaceModeActive &&
aRelativeCB.IsEnabled() && aRelativeCB.IsChecked();
const bool bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 &&
@@ -228,7 +195,6 @@ void SwNumPositionTabPage::InitControls()
( bSingleSelection || bRelative || pOutlineDlg != 0 ) );
aDistBorderFT.Enable( !bLabelAlignmentPosAndSpaceModeActive &&
( bSingleSelection || bRelative || pOutlineDlg != 0 ) );
- // <--
bool bSetDistEmpty = false;
bool bSameDistBorderNum = !bLabelAlignmentPosAndSpaceModeActive;
@@ -236,18 +202,14 @@ void SwNumPositionTabPage::InitControls()
bool bSameIndent = !bLabelAlignmentPosAndSpaceModeActive;
bool bSameAdjust = true;
- // --> OD 2008-02-01 #newlistlevelattrs#
bool bSameLabelFollowedBy = bLabelAlignmentPosAndSpaceModeActive;
bool bSameListtab = bLabelAlignmentPosAndSpaceModeActive;
bool bSameAlignAt = bLabelAlignmentPosAndSpaceModeActive;
bool bSameIndentAt = bLabelAlignmentPosAndSpaceModeActive;
- // <--
const SwNumFmt* aNumFmtArr[MAXLEVEL];
- const SwFmtVertOrient* pFirstOrient = 0;
sal_uInt16 nMask = 1;
sal_uInt16 nLvl = USHRT_MAX;
- long nFirstBorderText = 0;
long nFirstBorderTextRelative = -1;
for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
@@ -257,21 +219,10 @@ void SwNumPositionTabPage::InitControls()
if(USHRT_MAX == nLvl)
{
nLvl = i;
- // --> OD 2008-02-01 #newlistlevelattrs#
- if ( !bLabelAlignmentPosAndSpaceModeActive )
- {
- pFirstOrient = aNumFmtArr[nLvl]->GetGraphicOrientation();
- nFirstBorderText = nLvl > 0 ?
- aNumFmtArr[nLvl]->GetAbsLSpace() + aNumFmtArr[nLvl]->GetFirstLineOffset() -
- aNumFmtArr[nLvl - 1]->GetAbsLSpace() + aNumFmtArr[nLvl - 1]->GetFirstLineOffset():
- aNumFmtArr[nLvl]->GetAbsLSpace() + aNumFmtArr[nLvl]->GetFirstLineOffset();
- }
- // <--
}
if( i > nLvl)
{
- // --> OD 2008-02-01 #newlistlevelattrs#
bSameAdjust &= aNumFmtArr[i]->GetNumAdjust() == aNumFmtArr[nLvl]->GetNumAdjust();
if ( !bLabelAlignmentPosAndSpaceModeActive )
{
@@ -309,8 +260,6 @@ void SwNumPositionTabPage::InitControls()
bSameIndentAt &=
aNumFmtArr[i]->GetIndentAt() == aNumFmtArr[nLvl]->GetIndentAt();
}
- // <--
-
}
}
nMask <<= 1;
@@ -351,19 +300,14 @@ void SwNumPositionTabPage::InitControls()
else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
nPos = 2;
aAlignLB.SelectEntryPos(nPos);
- // --> OD 2008-02-01 #newlistlevelattrs#
aAlign2LB.SelectEntryPos( nPos );
- // <--
}
else
{
aAlignLB.SetNoSelection();
- // --> OD 2008-02-01 #newlistlevelattrs#
aAlign2LB.SetNoSelection();
- // <--
}
- // --> OD 2008-02-01 #newlistlevelattrs#
if ( bSameLabelFollowedBy )
{
sal_uInt16 nPos = 0; // LISTTAB
@@ -423,7 +367,6 @@ void SwNumPositionTabPage::InitControls()
{
aIndentAtMF.SetText(aEmptyStr);
}
- // <--
if(sal_True == bSetDistEmpty)
aDistBorderMF.SetText(aEmptyStr);
@@ -431,9 +374,6 @@ void SwNumPositionTabPage::InitControls()
bInInintControl = sal_False;
}
-/*-----------------03.12.97 10:02-------------------
-
---------------------------------------------------*/
void SwNumPositionTabPage::ActivatePage(const SfxItemSet& )
{
const SfxPoolItem* pItem;
@@ -444,7 +384,6 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& )
{
bPreset = ((const SfxBoolItem*)pItem)->GetValue();
}
- //
bModified = (!pActNum->GetNumFmt( 0 ) || bPreset);
if(*pActNum != *pSaveNum ||
nActNumLvl != nTmpNumLvl )
@@ -464,10 +403,8 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& )
}
aLevelLB.SetUpdateMode(sal_True);
- // --> OD 2008-02-01 #newlistlevelattrs#
InitPosAndSpaceMode();
ShowControlsDependingOnPosAndSpaceMode();
- // <--
InitControls();
}
@@ -475,9 +412,6 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& )
aPreviewWIN.Invalidate();
}
-/*-----------------03.12.97 10:02-------------------
-
---------------------------------------------------*/
int SwNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet)
{
SwOutlineTabDialog::SetActNumLevel(nActNumLvl);
@@ -487,9 +421,6 @@ int SwNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet)
}
-/*-----------------03.12.97 10:02-------------------
-
---------------------------------------------------*/
sal_Bool SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
{
if(pOutlineDlg)
@@ -503,9 +434,6 @@ sal_Bool SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
return bModified;
}
-/*-----------------03.12.97 10:02-------------------
-
---------------------------------------------------*/
void SwNumPositionTabPage::Reset( const SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
@@ -539,20 +467,17 @@ void SwNumPositionTabPage::Reset( const SfxItemSet& rSet )
else if(*pSaveNum != *pActNum)
*pActNum = *pSaveNum;
aPreviewWIN.SetNumRule(pActNum);
- // --> OD 2008-02-01 #newlistlevelattrs#
InitPosAndSpaceMode();
ShowControlsDependingOnPosAndSpaceMode();
- // <--
InitControls();
bModified = sal_False;
}
-// --> OD 2008-01-11 #newlistlevelattrs#
void SwNumPositionTabPage::InitPosAndSpaceMode()
{
if ( pActNum == 0 )
{
- DBG_ASSERT( false,
+ OSL_ENSURE( false,
"<SwNumPositionTabPage::InitPosAndSpaceMode()> - misusage of method -> <pAktNum> has to be already set!" );
return;
}
@@ -601,45 +526,32 @@ void SwNumPositionTabPage::ShowControlsDependingOnPosAndSpaceMode()
aIndentAtFT.Show( bLabelAlignmentPosAndSpaceModeActive );
aIndentAtMF.Show( bLabelAlignmentPosAndSpaceModeActive );
}
-// <--
-/*-----------------03.12.97 10:02-------------------
-
---------------------------------------------------*/
SfxTabPage* SwNumPositionTabPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
return new SwNumPositionTabPage(pParent, rAttrSet);
}
-/*-----------------04.12.97 12:51-------------------
-
---------------------------------------------------*/
void SwNumPositionTabPage::SetWrtShell(SwWrtShell* pSh)
{
pWrtSh = pSh;
- // --> OD 2008-02-01 #newlistlevelattrs#
const SwTwips nWidth = pWrtSh->GetAnyCurRect(RECT_FRM).Width();
aDistBorderMF.SetMax(aDistBorderMF.Normalize( nWidth ), FUNIT_TWIP );
aDistNumMF .SetMax(aDistNumMF .Normalize( nWidth ), FUNIT_TWIP );
aIndentMF .SetMax(aIndentMF .Normalize( nWidth ), FUNIT_TWIP );
- // --> OD 2008-02-18 #newlistlevelattrs#
aListtabMF.SetMax(aListtabMF.Normalize( nWidth ), FUNIT_TWIP );
aAlignedAtMF.SetMax(aAlignedAtMF.Normalize( nWidth ), FUNIT_TWIP );
aIndentAtMF.SetMax(aIndentAtMF.Normalize( nWidth ), FUNIT_TWIP );
- // <--
const SwTwips nLast2 = nWidth /2;
aDistBorderMF.SetLast( aDistBorderMF.Normalize( nLast2 ), FUNIT_TWIP );
aDistNumMF .SetLast( aDistNumMF .Normalize( nLast2 ), FUNIT_TWIP );
aIndentMF .SetLast( aIndentMF .Normalize( nLast2 ), FUNIT_TWIP );
- // --> OD 2008-02-18 #newlistlevelattrs#
aListtabMF.SetLast(aListtabMF.Normalize( nLast2 ), FUNIT_TWIP );
aAlignedAtMF.SetLast(aAlignedAtMF.Normalize( nLast2 ), FUNIT_TWIP );
aIndentAtMF.SetLast(aIndentAtMF.Normalize( nLast2 ), FUNIT_TWIP );
- // <--
- // <--
const SwRect& rPrtRect = pWrtSh->GetAnyCurRect(RECT_PAGE);
aPreviewWIN.SetPageWidth(rPrtRect.Width());
@@ -649,25 +561,18 @@ void SwNumPositionTabPage::SetWrtShell(SwWrtShell* pSh)
aDistBorderMF .SetDecimalDigits(1);
aDistNumMF .SetDecimalDigits(1);
aIndentMF .SetDecimalDigits(1);
- // --> OD 2008-02-18 #newlistlevelattrs#
aListtabMF.SetDecimalDigits(1);
aAlignedAtMF.SetDecimalDigits(1);
aIndentAtMF.SetDecimalDigits(1);
- // <--
}
aDistBorderMF .SetUnit( eMetric );
aDistNumMF .SetUnit( eMetric );
aIndentMF .SetUnit( eMetric );
- // --> OD 2008-02-18 #newlistlevelattrs#
aListtabMF.SetUnit( eMetric );
aAlignedAtMF.SetUnit( eMetric );
aIndentAtMF.SetUnit( eMetric );
- // <--
}
-/*-----------------03.12.97 11:06-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwNumPositionTabPage, EditModifyHdl, Edit *, EMPTYARG )
{
sal_uInt16 nMask = 1;
@@ -677,11 +582,9 @@ IMPL_LINK( SwNumPositionTabPage, EditModifyHdl, Edit *, EMPTYARG )
{
SwNumFmt aNumFmt(pActNum->Get(i));
- // --> OD 2008-02-01 #newlistlevelattrs#
const sal_uInt16 nPos = aAlignLB.IsVisible()
? aAlignLB.GetSelectEntryPos()
: aAlign2LB.GetSelectEntryPos();
- // <--
SvxAdjust eAdjust = SVX_ADJUST_CENTER;
if(nPos == 0)
eAdjust = SVX_ADJUST_LEFT;
@@ -695,9 +598,7 @@ IMPL_LINK( SwNumPositionTabPage, EditModifyHdl, Edit *, EMPTYARG )
SetModified();
return 0;
}
-/*-----------------03.12.97 11:11-------------------
---------------------------------------------------*/
IMPL_LINK( SwNumPositionTabPage, LevelHdl, ListBox *, pBox )
{
sal_uInt16 nSaveNumLvl = nActNumLvl;
@@ -738,16 +639,12 @@ IMPL_LINK( SwNumPositionTabPage, LevelHdl, ListBox *, pBox )
}
aRelativeCB.Enable(1 != nActNumLvl);
SetModified();
- // --> OD 2008-02-01 #newlistlevelattrs#
InitPosAndSpaceMode();
ShowControlsDependingOnPosAndSpaceMode();
- // <--
InitControls();
return 0;
}
-/*-----------------03.12.97 12:24-------------------
---------------------------------------------------*/
IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
{
if(bInInintControl)
@@ -808,9 +705,6 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
return 0;
}
-/*-----------------04.12.97 12:35-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox )
{
sal_Bool bOn = pBox->IsChecked();
@@ -850,7 +744,6 @@ IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox )
return 0;
}
-// --> OD 2008-02-01 #newlistlevelattrs#
IMPL_LINK( SwNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG )
{
// determine value to be set at the chosen list levels
@@ -912,9 +805,7 @@ IMPL_LINK( SwNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG )
return 0;
}
-// <--
-// --> OD 2008-02-01 #newlistlevelattrs#
IMPL_LINK( SwNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pFld )
{
// determine value to be set at the chosen list levels
@@ -937,9 +828,7 @@ IMPL_LINK( SwNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pFld )
return 0;
}
-// <--
-// --> OD 2008-02-01 #newlistlevelattrs#
IMPL_LINK( SwNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pFld )
{
// determine value to be set at the chosen list levels
@@ -963,9 +852,7 @@ IMPL_LINK( SwNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pFld )
return 0;
}
-// <--
-// --> OD 2008-02-01 #newlistlevelattrs#
IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld )
{
// determine value to be set at the chosen list levels
@@ -992,11 +879,7 @@ IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld )
return 0;
}
-// <--
-/*-----------------05.12.97 15:33-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwNumPositionTabPage, StandardHdl, PushButton *, EMPTYARG )
{
sal_uInt16 nMask = 1;
@@ -1005,13 +888,10 @@ IMPL_LINK( SwNumPositionTabPage, StandardHdl, PushButton *, EMPTYARG )
if(nActNumLvl & nMask)
{
SwNumFmt aNumFmt( pActNum->Get( i ) );
- // --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule aTmpNumRule( pWrtSh->GetUniqueNumRuleName(),
aNumFmt.GetPositionAndSpaceMode(),
pOutlineDlg ? OUTLINE_RULE : NUM_RULE );
- // <--
SwNumFmt aTempFmt(aTmpNumRule.Get( i ));
- // --> OD 2008-02-05 #newlistlevelattrs#
aNumFmt.SetPositionAndSpaceMode( aTempFmt.GetPositionAndSpaceMode() );
if ( aTempFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -1027,8 +907,6 @@ IMPL_LINK( SwNumPositionTabPage, StandardHdl, PushButton *, EMPTYARG )
aNumFmt.SetFirstLineIndent( aTempFmt.GetFirstLineIndent() );
aNumFmt.SetIndentAt( aTempFmt.GetIndentAt() );
}
- // <--
-
pActNum->Set( i, aNumFmt );
}
nMask <<= 1;
@@ -1052,12 +930,6 @@ void SwNumPositionTabPage::SetModified(sal_Bool bRepaint)
#endif
-/**************************************************************************/
-/* */
-/* */
-/**************************************************************************/
-
-
SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(Window* pParent,
const SfxItemSet* pSwItemSet, SwWrtShell & rSh) :
SfxTabDialog(pParent, SW_RES(DLG_SVXTEST_NUM_BULLET), pSwItemSet, sal_False, &aEmptyStr),
@@ -1079,18 +951,11 @@ SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(Window* pParent,
AddTabPage( RID_SVXPAGE_NUM_POSITION );
}
-/*-----------------07.02.97 12.08-------------------
-
---------------------------------------------------*/
SwSvxNumBulletTabDialog::~SwSvxNumBulletTabDialog()
{
}
-/*-----------------07.02.97 14.48-------------------
-
---------------------------------------------------*/
-
void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
{
//Namen der Vorlagen und Metric setzen
@@ -1150,27 +1015,22 @@ void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)) );
rPage.PageCreated(aSet);
-// ((SvxNumPositionTabPage&)rPage).SetWrtShell(&rWrtSh);
}
break;
}
}
-/*-----------------17.02.97 16.52-------------------
---------------------------------------------------*/
short SwSvxNumBulletTabDialog::Ok()
{
short nRet = SfxTabDialog::Ok();
pExampleSet->ClearItem(SID_PARAM_NUM_PRESET);
return nRet;
}
-/* -----------------02.12.98 08:35-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK(SwSvxNumBulletTabDialog, RemoveNumberingHdl, PushButton*, EMPTYARG)
{
EndDialog(RET_USER);
return 0;
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/num.src b/sw/source/ui/misc/num.src
index 600175cc4c8d..3f19d847f607 100644
--- a/sw/source/ui/misc/num.src
+++ b/sw/source/ui/misc/num.src
@@ -338,7 +338,6 @@ TabDialog DLG_SVXTEST_NUM_BULLET
PageItem
{
Identifier = RID_SVXPAGE_NUM_OPTIONS ;
- /* ### ACHTUNG: Neuer Text in Resource? Optionen : ~Optionen */
Text [ en-US ] = "Options" ;
};
};
diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx
index 39186bb6de60..04befa93cd6b 100644
--- a/sw/source/ui/misc/numberingtypelistbox.cxx
+++ b/sw/source/ui/misc/numberingtypelistbox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
#include <numberingtypelistbox.hxx>
-#ifndef _MISC_HRC
#include <misc.hrc>
-#endif
#include <cnttab.hxx>
#include <com/sun/star/style/NumberingType.hpp>
#include <com/sun/star/text/XDefaultNumberingProvider.hpp>
@@ -40,18 +39,14 @@
#include <unomid.h>
using namespace com::sun::star;
-using namespace rtl;
-/* -----------------------------01.03.01 16:04--------------------------------
+using ::rtl::OUString;
- ---------------------------------------------------------------------------*/
struct SwNumberingTypeListBox_Impl
{
uno::Reference<text::XNumberingTypeInfo> xInfo;
};
-/* -----------------------------01.03.01 14:46--------------------------------
- ---------------------------------------------------------------------------*/
SwNumberingTypeListBox::SwNumberingTypeListBox( Window* pWin, const ResId& rResId,
sal_uInt16 nTypeFlags ) :
ListBox(pWin, rResId),
@@ -59,23 +54,19 @@ SwNumberingTypeListBox::SwNumberingTypeListBox( Window* pWin, const ResId& rResI
{
uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
uno::Reference < uno::XInterface > xI = xMSF->createInstance(
- ::rtl::OUString::createFromAscii( "com.sun.star.text.DefaultNumberingProvider" ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.DefaultNumberingProvider")) );
uno::Reference<text::XDefaultNumberingProvider> xDefNum(xI, uno::UNO_QUERY);
- DBG_ASSERT(xDefNum.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\"");
+ OSL_ENSURE(xDefNum.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\"");
pImpl->xInfo = uno::Reference<text::XNumberingTypeInfo>(xDefNum, uno::UNO_QUERY);
Reload(nTypeFlags);
}
-/* -----------------------------01.03.01 14:46--------------------------------
- ---------------------------------------------------------------------------*/
SwNumberingTypeListBox::~SwNumberingTypeListBox()
{
delete pImpl;
}
-/* -----------------------------01.03.01 16:02--------------------------------
- ---------------------------------------------------------------------------*/
void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
{
Clear();
@@ -150,24 +141,20 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
SelectEntryPos(0);
}
}
-/* -----------------------------01.03.01 14:46--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType()
{
sal_Int16 nRet = 0;
sal_uInt16 nSelPos = GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nSelPos)
nRet = (sal_Int16)(sal_uLong)GetEntryData(nSelPos);
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
- DBG_ERROR("SwNumberingTypeListBox not selected");
+ OSL_ENSURE(false, "SwNumberingTypeListBox not selected");
#endif
return nRet;
}
-/* -----------------------------01.03.01 14:46--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwNumberingTypeListBox::SelectNumberingType(sal_Int16 nType)
{
sal_uInt16 nPos = GetEntryPos((void*)(sal_uLong)nType);
@@ -175,3 +162,4 @@ sal_Bool SwNumberingTypeListBox::SelectNumberingType(sal_Int16 nType)
return LISTBOX_ENTRY_NOTFOUND != nPos;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 3f67fb5cdb1a..a70fe224ed88 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,12 +33,8 @@
#endif
#include <hintids.hxx>
#include <tools/shl.hxx>
-#ifndef _MENU_HXX //autogen
#include <vcl/menu.hxx>
-#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/tabdlg.hxx>
#include <editeng/brshitem.hxx>
#include <unotools/configmgr.hxx>
@@ -47,14 +44,9 @@
#define USE_NUMTABPAGES
#include <num.hxx>
#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <uitool.hxx>
-#include <errhdl.hxx>
#include <wrtsh.hxx>
#include <swmodule.hxx>
#include <fmtcol.hxx>
@@ -67,26 +59,16 @@
#include <docstyle.hxx>
#include <viewopt.hxx>
#include <svtools/ctrlbox.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc> // fuer Vorlagenname 'keins'
-#endif
-#ifndef _MISC_HRC
#include <misc.hrc>
-#endif
-#ifndef _OUTLINE_HRC
#include <outline.hrc>
-#endif
#include <paratr.hxx>
#include <unomid.h>
#include <IDocumentOutlineNodes.hxx>
-// --> OD 2008-04-14 #outlinelevel#
#include <app.hrc>
-// <--
#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
#include <com/sun/star/accessibility/AccessibleRole.hpp>
@@ -94,16 +76,8 @@
using namespace ::com::sun::star;
-/* -----------------------------31.01.01 10:23--------------------------------
-
- ---------------------------------------------------------------------------*/
-
DBG_NAME(outlinehdl)
-/*---------------------------------------------------------------------
-
----------------------------------------------------------------------*/
-
class SwNumNamesDlg: public ModalDialog
{
FixedLine aFormFL;
@@ -128,8 +102,6 @@ public:
/*------------------------------------------------------------------------
Beschreibung: selektierten Eintrag merken
------------------------------------------------------------------------*/
-
-
IMPL_LINK_INLINE_START( SwNumNamesDlg, SelectHdl, ListBox *, pBox )
{
aFormEdit.SetText(pBox->GetSelectEntry());
@@ -143,8 +115,6 @@ IMPL_LINK_INLINE_END( SwNumNamesDlg, SelectHdl, ListBox *, pBox )
Parameter: Liste der vom Benutzer vergebenen Namen;
nicht vom Benutzer benannte Positionen sind 0.
------------------------------------------------------------------------*/
-
-
void SwNumNamesDlg::SetUserNames(const String *pList[])
{
sal_uInt16 nSelect = 0;
@@ -161,22 +131,20 @@ void SwNumNamesDlg::SetUserNames(const String *pList[])
aFormBox.SelectEntryPos(nSelect);
SelectHdl(&aFormBox);
}
+
/*------------------------------------------------------------------------
Beschreibung: OK-Button freischalten, wenn Text im Edit steht.
------------------------------------------------------------------------*/
-
-
IMPL_LINK_INLINE_START( SwNumNamesDlg, ModifyHdl, Edit *, pBox )
{
aOKBtn.Enable(0 != pBox->GetText().Len());
return 0;
}
IMPL_LINK_INLINE_END( SwNumNamesDlg, ModifyHdl, Edit *, pBox )
+
/*------------------------------------------------------------------------
Beschreibung: DoubleClickHdl
------------------------------------------------------------------------*/
-
-
IMPL_LINK_INLINE_START( SwNumNamesDlg, DoubleClickHdl, ListBox *, EMPTYARG )
{
EndDialog(RET_OK);
@@ -184,10 +152,6 @@ IMPL_LINK_INLINE_START( SwNumNamesDlg, DoubleClickHdl, ListBox *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwNumNamesDlg, DoubleClickHdl, ListBox *, EMPTYARG )
-/*--------------------------------------------------
-
---------------------------------------------------*/
-
SwNumNamesDlg::SwNumNamesDlg(Window *pParent)
: ModalDialog(pParent, SW_RES(DLG_NUM_NAMES)),
aFormFL(this, SW_RES(FL_FORM)),
@@ -204,16 +168,8 @@ SwNumNamesDlg::SwNumNamesDlg(Window *pParent)
SelectHdl(&aFormBox);
}
-/*--------------------------------------------------
+SwNumNamesDlg::~SwNumNamesDlg() {}
---------------------------------------------------*/
-
-__EXPORT SwNumNamesDlg::~SwNumNamesDlg() {}
-
-
-/* -----------------08.07.98 08:46-------------------
- *
- * --------------------------------------------------*/
sal_uInt16 lcl_BitToLevel(sal_uInt16 nActLevel)
{
sal_uInt16 nTmp = nActLevel;
@@ -223,9 +179,6 @@ sal_uInt16 lcl_BitToLevel(sal_uInt16 nActLevel)
return nTmpLevel;
}
-/* -----------------07.07.98 14:13-------------------
- *
- * --------------------------------------------------*/
sal_uInt16 SwOutlineTabDialog::nNumLevel = 1;
SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
const SfxItemSet* pSwItemSet,
@@ -273,8 +226,6 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i);
if(!rTxtColl.IsDefault())
{
- //sal_uInt8 nOutLevel = rTxtColl.GetOutlineLevel(); //<-#outline level, removed out by zhaojianwei
- //if(nOutLevel != NO_NUMBERING)
//->added by zhaojianwei
if(rTxtColl.IsAssignedToListLevelOfOutlineStyle())
{
@@ -286,17 +237,11 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
}
}
-/* -----------------07.07.98 14:13-------------------
- *
- * --------------------------------------------------*/
SwOutlineTabDialog::~SwOutlineTabDialog()
{
delete pNumRule;
}
-/* -----------------07.07.98 14:13-------------------
- *
- * --------------------------------------------------*/
void SwOutlineTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
{
switch ( nPageId )
@@ -310,9 +255,7 @@ void SwOutlineTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
break;
}
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwOutlineTabDialog, CancelHdl, Button *, EMPTYARG )
{
if (!bModified)
@@ -320,9 +263,7 @@ IMPL_LINK( SwOutlineTabDialog, CancelHdl, Button *, EMPTYARG )
EndDialog(RET_CANCEL);
return 0;
}
-/* -----------------08.07.98 12:14-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn )
{
//PopupMenu auffuellen
@@ -337,9 +278,6 @@ IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn )
return 0;
}
-/* -----------------08.07.98 12:14-------------------
- *
- * --------------------------------------------------*/
IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
{
sal_uInt8 nLevelNo = 0;
@@ -400,9 +338,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
return 0;
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
+
sal_uInt16 SwOutlineTabDialog::GetLevel(const String &rFmtName) const
{
for(sal_uInt16 i = 0; i < MAXLEVEL; ++i)
@@ -413,9 +349,7 @@ sal_uInt16 SwOutlineTabDialog::GetLevel(const String &rFmtName) const
return MAXLEVEL;//NO_NUMBERING; //#outline level,zhaojianwei
}
-/* -----------------07.07.98 16:30-------------------
- *
- * --------------------------------------------------*/
+
short SwOutlineTabDialog::Ok()
{
SfxTabDialog::Ok();
@@ -437,28 +371,10 @@ short SwOutlineTabDialog::Ok()
SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i);
if( !rTxtColl.IsDefault() )
{
- //rTxtColl.SetOutlineLevel( (sal_uInt8)GetLevel(rTxtColl.GetName()));//#outline level,removed by zhaojianwei
const SfxPoolItem & rItem =
rTxtColl.GetFmtAttr(RES_PARATR_NUMRULE, sal_False);
- //if ((sal_uInt8)GetLevel(rTxtColl.GetName()) == NO_NUMBERING) //#outline level,removed by zhaojianwei
- //{
- // if (static_cast<const SwNumRuleItem &>(rItem).GetValue() ==
- // pOutlineRule->GetName())
- // {
- // rTxtColl.ResetFmtAttr(RES_PARATR_NUMRULE);
- // }
- //}
- //else
- //{
- // if (static_cast<const SwNumRuleItem &>(rItem).GetValue() !=
- // pOutlineRule->GetName())
- // {
- // SwNumRuleItem aItem(pOutlineRule->GetName());
- // rTxtColl.SetFmtAttr(aItem);
- // }
- //}
if ((sal_uInt8)GetLevel(rTxtColl.GetName()) == MAXLEVEL) //add by zhaojianwei
{
if(rTxtColl.IsAssignedToListLevelOfOutlineStyle())
@@ -493,25 +409,6 @@ short SwOutlineTabDialog::Ok()
SwTxtFmtColl* pColl = rWrtSh.FindTxtFmtCollByName( sHeadline );
if( !pColl )
{
- //if( !aCollNames[i].Len() ) //#outline level,removed by zhaojianwei
- //{
- // SwTxtFmtColl* pTxtColl = rWrtSh.GetTxtCollFromPool(
- // static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i) );
- // pTxtColl->SetOutlineLevel( NO_NUMBERING );
- // pTxtColl->ResetFmtAttr(RES_PARATR_NUMRULE);
- //}
- //else if(aCollNames[i] != sHeadline)
- //{
- // SwTxtFmtColl* pTxtColl = rWrtSh.GetParaStyle(
- // aCollNames[i], SwWrtShell::GETSTYLE_CREATESOME);
- // if(pTxtColl)
- // {
- // pTxtColl->SetOutlineLevel( static_cast< sal_uInt8 >(i) );
-
- // SwNumRuleItem aItem(pOutlineRule->GetName());
- // pTxtColl->SetFmtAttr(aItem);
- // }
- //}
if(aCollNames[i] != sHeadline)//->added by zhaojianwei
{
SwTxtFmtColl* pTxtColl = rWrtSh.GetTxtCollFromPool(
@@ -543,9 +440,6 @@ short SwOutlineTabDialog::Ok()
return RET_OK;
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_OUTLINE_NUM), rSet),
aLevelFL( this, SW_RES(FL_LEVEL )),
@@ -588,9 +482,7 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(Window* pParent, const SfxIte
aCharFmtLB.SetSelectHdl(LINK(this, SwOutlineSettingsTabPage, CharFmtHdl));
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
+
void SwOutlineSettingsTabPage::Update()
{
// falls eine Vorlage fuer diese Ebene bereits selektiert wurde,
@@ -704,9 +596,6 @@ void SwOutlineSettingsTabPage::Update()
SetModified();
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox )
{
nActLevel = 0;
@@ -727,9 +616,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox )
Update();
return 0;
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pFld )
{
sal_uInt16 nMask = 1;
@@ -747,9 +634,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pFld )
SetModified();
return 0;
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox )
{
sal_uInt8 i;
@@ -800,13 +685,10 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelectGetFocus, ListBox *, EMPTYARG )
return 0;
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBox )
{
sal_uInt16 nMask = 1;
- sal_Int16 nNumberType = pBox->GetSelectedNumberingType();//(sal_Int16)(sal_uLong)pBox->GetEntryData(pBox->GetSelectEntryPos());
+ sal_Int16 nNumberType = pBox->GetSelectedNumberingType();
for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
@@ -821,9 +703,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBo
SetModified();
return 0;
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwOutlineSettingsTabPage, DelimModify, Edit *, EMPTYARG )
{
sal_uInt16 nMask = 1;
@@ -841,9 +721,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, DelimModify, Edit *, EMPTYARG )
SetModified();
return 0;
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pFld )
{
sal_uInt16 nMask = 1;
@@ -860,12 +738,9 @@ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pFld )
SetModified();
return 0;
}
-/* -----------------21.09.98 12:21-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwOutlineSettingsTabPage, CharFmtHdl, ListBox *, EMPTYARG )
{
-// bAutomaticCharStyles = sal_False;
String sEntry = aCharFmtLB.GetSelectEntry();
sal_uInt16 nMask = 1;
sal_Bool bFormatNone = sEntry == ViewShell::GetShellRes()->aStrNone;
@@ -909,15 +784,11 @@ IMPL_LINK( SwOutlineSettingsTabPage, CharFmtHdl, ListBox *, EMPTYARG )
}
return RET_OK;
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
+
SwOutlineSettingsTabPage::~SwOutlineSettingsTabPage()
{
}
-/* -----------------07.07.98 16:27-------------------
- *
- * --------------------------------------------------*/
+
void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
{
pSh = pShell;
@@ -925,8 +796,6 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
pNumRule = ((SwOutlineTabDialog*)GetTabDialog())->GetNumRule();
pCollNames = ((SwOutlineTabDialog*)GetTabDialog())->GetCollNames();
- //pNumRule = new SwNumRule( *rSh.GetOutlineNumRule() );
-
aPreviewWIN.SetNumRule(pNumRule);
aPreviewWIN.SetOutlineNames(pCollNames);
// Startwert setzen - nActLevel muss hier 1 sein
@@ -978,9 +847,7 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
pSh->GetView().GetDocShell());
Update();
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
+
void SwOutlineSettingsTabPage::ActivatePage(const SfxItemSet& )
{
nActLevel = SwOutlineTabDialog::GetActNumLevel();
@@ -990,39 +857,29 @@ void SwOutlineSettingsTabPage::ActivatePage(const SfxItemSet& )
aLevelLB.SelectEntryPos(MAXLEVEL);
LevelHdl(&aLevelLB);
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
+
int SwOutlineSettingsTabPage::DeactivatePage(SfxItemSet*)
{
SwOutlineTabDialog::SetActNumLevel(nActLevel);
return LEAVE_PAGE;
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwOutlineSettingsTabPage::FillItemSet( SfxItemSet& )
{
return sal_True;
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
+
void SwOutlineSettingsTabPage::Reset( const SfxItemSet& rSet )
{
ActivatePage(rSet);
}
-/* -----------------07.07.98 14:19-------------------
- *
- * --------------------------------------------------*/
+
SfxTabPage* SwOutlineSettingsTabPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
return new SwOutlineSettingsTabPage(pParent, rAttrSet);
}
-/* -----------------07.11.2002 15:13-----------------
- *
- * --------------------------------------------------*/
+
void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType)
{
sal_Bool bIsNull = aStartEdit.GetValue() == 0;
@@ -1033,9 +890,7 @@ void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType
if(bIsNull && bNoZeroAllowed)
aStartEdit.GetModifyHdl().Call(&aStartEdit);
}
-/*-----------------09.12.97 11:54-------------------
---------------------------------------------------*/
sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev,
const SwNumFmt& rFmt, sal_uInt16 nXStart,
sal_uInt16 nYStart, const Size& rSize)
@@ -1053,9 +908,7 @@ sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev,
pVDev->SetFont(aTmpFont);
return nRet;
}
-/*-----------------09.12.97 11:49-------------------
---------------------------------------------------*/
sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, sal_uInt16 nXStart,
sal_uInt16 nYStart, sal_uInt16 nDivision)
{
@@ -1077,7 +930,8 @@ sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, sal_uInt1
return nRet;
}
-/*-----------------02.12.97 10:34-------------------
+
+/*--------------------------------------------------
Vorschau der Numerierung painten
--------------------------------------------------*/
void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
@@ -1120,7 +974,6 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
// #101524# OJ
aStdFont.SetColor( SwViewOption::GetFontColor() );
- //
sal_uInt16 nFontHeight = nYStep * 6 / 10;
if(bPosition)
nFontHeight = nYStep * 15 / 10;
@@ -1146,7 +999,6 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
const SwNumFmt &rFmt = pActNum->Get(nLevel);
aNumVector.push_back(rFmt.GetStart());
- // --> OD 2008-02-01 #newlistlevelattrs#
sal_uInt16 nXStart( 0 );
short nTextOffset( 0 );
sal_uInt16 nNumberXPos( 0 );
@@ -1176,7 +1028,6 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
nNumberXPos = static_cast<sal_uInt16>(nTmpNumberXPos);
}
}
- // <--
sal_uInt16 nBulletWidth = 0;
if( SVX_NUM_BITMAP == rFmt.GetNumberingType() )
@@ -1201,7 +1052,6 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
nBulletWidth = (sal_uInt16)pVDev->GetTextWidth(aText);
nPreNum++;
}
- // --> OD 2008-02-01 #newlistlevelattrs#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT &&
rFmt.GetLabelFollowedBy() == SvxNumberFormat::SPACE )
{
@@ -1210,9 +1060,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
nBulletWidth = nBulletWidth + (sal_uInt16)pVDev->GetTextWidth(aText);
}
- // <--
- // --> OD 2008-02-01 #newlistlevelattrs#
sal_uInt16 nTextXPos( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -1246,7 +1094,6 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
nXStart = static_cast<sal_uInt16>( rFmt.GetIndentAt() / nWidthRelation );
}
- // <--
Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2));
@@ -1267,7 +1114,6 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
{
const SwNumFmt &rFmt = pActNum->Get(nLevel);
aNumVector.push_back(rFmt.GetStart());
- // --> OD 2008-02-01 #newlistlevelattrs#
sal_uInt16 nXStart( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -1289,7 +1135,6 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
}
nXStart /= 2;
nXStart += 2;
- // <--
sal_uInt16 nTextOffset = 2 * nXStep;
if( SVX_NUM_BITMAP == rFmt.GetNumberingType() )
{
@@ -1317,7 +1162,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
pVDev->SetFont(aStdFont);
// Changed as per BugID 79541 Branding/Configuration
- uno::Any MyAny = ::utl::ConfigManager::GetConfigManager()->
+ uno::Any MyAny = ::utl::ConfigManager::GetConfigManager().
GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTNAME );
::rtl::OUString aProductName;
@@ -1338,11 +1183,8 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
}
-/*-----------------02.12.97 10:34-------------------
-
---------------------------------------------------*/
NumberingPreview::~NumberingPreview()
{
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 593dbebae5ef..d0309d632e4d 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,14 +35,11 @@
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <hintids.hxx>
#include <tools/ref.hxx>
-#ifndef _SVX_DIALOGS_HRC
#include <svx/dialogs.hrc>
-#endif
+#include <sal/macros.h>
#include <vcl/field.hxx>
#include <vcl/svapp.hxx>
#include <unotools/localedatawrapper.hxx>
@@ -55,22 +53,16 @@
#include <pgfnote.hxx>
#include <uiitems.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _MISC_HRC
#include <misc.hrc>
-#endif
-#ifndef _PGFNOTE_HRC
#include <pgfnote.hrc>
-#endif
#define TWIP_TO_LBOX 5
+
/*-----------------------------------------------------#---------------
Beschreibung: vordefinierte Linien in Point
--------------------------------------------------------------------*/
-
-static const sal_uInt16 __FAR_DATA nLines[] = {
+static const sal_uInt16 nLines[] = {
0,
50,
100,
@@ -79,20 +71,17 @@ static const sal_uInt16 __FAR_DATA nLines[] = {
500
};
-static const sal_uInt16 nLineCount = sizeof(nLines) / sizeof(nLines[0]);
+static const sal_uInt16 nLineCount = SAL_N_ELEMENTS(nLines);
-static sal_uInt16 __FAR_DATA aPageRg[] = {
+static sal_uInt16 aPageRg[] = {
FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO,
0
};
-
/*------------------------------------------------------------------------
Beschreibung: liefert zurueck, ob die Linienbreite nWidth bereits
in der Listbox enthalten ist.
------------------------------------------------------------------------*/
-
-
sal_Bool lcl_HasLineWidth(sal_uInt16 nWidth)
{
for(sal_uInt16 i = 0; i < nLineCount; ++i) {
@@ -107,8 +96,6 @@ sal_Bool lcl_HasLineWidth(sal_uInt16 nWidth)
Arten, wie die Hoehe des Fussnotenbereiches angegeben
werden kann.
------------------------------------------------------------------------*/
-
-
IMPL_LINK_INLINE_START( SwFootNotePage, HeightPage, Button *, EMPTYARG )
{
aMaxHeightEdit.Enable(sal_False);
@@ -128,8 +115,6 @@ IMPL_LINK_INLINE_END( SwFootNotePage, HeightMetric, Button *, EMPTYARG )
/*------------------------------------------------------------------------
Beschreibung: Handler Grenzwerte
------------------------------------------------------------------------*/
-
-
IMPL_LINK( SwFootNotePage, HeightModify, MetricField *, EMPTYARG )
{
aMaxHeightEdit.SetMax(aMaxHeightEdit.Normalize(lMaxHeight -
@@ -190,18 +175,11 @@ SwFootNotePage::~SwFootNotePage()
{
}
-
SfxTabPage* SwFootNotePage::Create(Window *pParent, const SfxItemSet &rSet)
{
return new SwFootNotePage(pParent, rSet);
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwFootNotePage::Reset(const SfxItemSet &rSet)
{
// Falls noch kein Bsp vorhanden Init hier sonst im Activate
@@ -267,8 +245,6 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: Attribute in den Set stopfen bei OK
--------------------------------------------------------------------*/
-
-
sal_Bool SwFootNotePage::FillItemSet(SfxItemSet &rSet)
{
SwPageFtnInfoItem aItem((const SwPageFtnInfoItem&)GetItemSet().Get(FN_PARAM_FTN_INFO));
@@ -369,5 +345,4 @@ sal_uInt16* SwFootNotePage::GetRanges()
return aPageRg;
}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 90d600301a56..443dbea06389 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,14 +37,10 @@
#include <sfx2/app.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <hintids.hxx>
#include <swtypes.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <svx/xtable.hxx>
#include <uitool.hxx>
#include <editeng/sizeitem.hxx>
@@ -51,6 +48,7 @@
#include <editeng/ulspitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/frmdiritem.hxx>
+#include <svx/ruler.hxx>
#include <pggrid.hxx>
#include <tgrditem.hxx>
#include <pggrid.hrc>
@@ -60,9 +58,7 @@
#include "uiitems.hxx"
#include "swmodule.hxx"
#include "view.hxx"
-/*-- 06.02.2002 15:25:39---------------------------------------------------
- -----------------------------------------------------------------------*/
SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) :
SfxTabPage(pParent, SW_RES(TP_TEXTGRID_PAGE), rSet),
aGridTypeFL (this, SW_RES(FL_GRID_TYPE )),
@@ -74,10 +70,12 @@ SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) :
aLayoutFL (this, SW_RES(FL_LAYOUT )),
aLinesPerPageFT (this, SW_RES(FT_LINESPERPAGE )),
aLinesPerPageNF (this, SW_RES(NF_LINESPERPAGE )),
+ aLinesRangeFT (this, SW_RES(FT_LINERANGE )),
aTextSizeFT (this, SW_RES(FT_TEXTSIZE )),
aTextSizeMF (this, SW_RES(MF_TEXTSIZE )),
aCharsPerLineFT (this, SW_RES(FT_CHARSPERLINE )),
aCharsPerLineNF (this, SW_RES(NF_CHARSPERLINE )),
+ aCharsRangeFT (this, SW_RES(FT_CHARRANGE )),
aCharWidthFT (this, SW_RES(FT_CHARWIDTH )),
aCharWidthMF (this, SW_RES(MF_CHARWIDTH )),
aRubySizeFT (this, SW_RES(FT_RUBYSIZE )),
@@ -92,7 +90,9 @@ SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) :
m_bRubyUserValue(sal_False),
m_aPageSize(MM50, MM50),
m_bVertical(sal_False),
- m_bSquaredMode(sal_False)
+ m_bSquaredMode(sal_False),
+ m_bHRulerChanged( sal_False ),
+ m_bVRulerChanged( sal_False )
{
FreeResource();
@@ -113,7 +113,9 @@ SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) :
aControls[14] =&aPrintCB;
aControls[15] =&aColorFT;
aControls[16] =&aColorLB;
- aControls[17] =0;
+ aControls[17] =&aLinesRangeFT;
+ aControls[18] =&aCharsRangeFT;
+ aControls[19] =0;
Link aLink = LINK(this, SwTextGridPage, CharorLineChangedHdl);
aCharsPerLineNF.SetUpHdl(aLink);
@@ -186,22 +188,16 @@ SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) :
aCharWidthMF.Show();
}
}
-/*-- 06.02.2002 15:25:40---------------------------------------------------
- -----------------------------------------------------------------------*/
SwTextGridPage::~SwTextGridPage()
{
}
-/*-- 06.02.2002 15:25:40---------------------------------------------------
- -----------------------------------------------------------------------*/
SfxTabPage *SwTextGridPage::Create(Window *pParent, const SfxItemSet &rSet)
{
return new SwTextGridPage(pParent, rSet);
}
-/*-- 06.02.2002 15:25:40---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwTextGridPage::FillItemSet(SfxItemSet &rSet)
{
sal_Bool bRet = sal_False;
@@ -224,11 +220,15 @@ sal_Bool SwTextGridPage::FillItemSet(SfxItemSet &rSet)
bRet = sal_True;
}
+ // draw ticks of ruler
+ SwView * pView = ::GetActiveView();
+ if ( m_bHRulerChanged )
+ pView->GetHLineal().DrawTicks();
+ if ( m_bVRulerChanged )
+ pView->GetVLineal().DrawTicks();
return bRet;
}
-/*-- 06.02.2002 15:25:40---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwTextGridPage::Reset(const SfxItemSet &rSet)
{
if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, sal_True))
@@ -246,6 +246,7 @@ void SwTextGridPage::Reset(const SfxItemSet &rSet)
GridTypeHdl(pButton);
aSnapToCharsCB.Check(rGridItem.IsSnapToChars());
aLinesPerPageNF.SetValue(rGridItem.GetLines());
+ SetLinesOrCharsRanges( aLinesRangeFT , aLinesPerPageNF.GetMax() );
m_nRubyUserValue = rGridItem.GetBaseHeight();
m_bRubyUserValue = sal_True;
aTextSizeMF.SetValue(aTextSizeMF.Normalize(m_nRubyUserValue), FUNIT_TWIP);
@@ -270,9 +271,7 @@ void SwTextGridPage::Reset(const SfxItemSet &rSet)
aPrintCB.SaveValue();
aColorLB.SaveValue();
}
-/*-- 06.02.2002 15:25:41---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwTextGridPage::ActivatePage( const SfxItemSet& rSet )
{
aExampleWN.Hide();
@@ -281,16 +280,12 @@ void SwTextGridPage::ActivatePage( const SfxItemSet& rSet )
aExampleWN.Show();
aExampleWN.Invalidate();
}
-/*-- 06.02.2002 15:25:41---------------------------------------------------
- -----------------------------------------------------------------------*/
int SwTextGridPage::DeactivatePage( SfxItemSet* )
{
return LEAVE_PAGE;
}
-/* -----------------------------08.02.2002 11:57------------------------------
- ---------------------------------------------------------------------------*/
void SwTextGridPage::PutGridItem(SfxItemSet& rSet)
{
SwTextGridItem aGridItem;
@@ -309,10 +304,20 @@ void SwTextGridPage::PutGridItem(SfxItemSet& rSet)
aGridItem.SetPrintGrid(aPrintCB.IsChecked());
aGridItem.SetColor(aColorLB.GetSelectEntryColor());
rSet.Put(aGridItem);
+/// Amelia
+ SwView * pView = ::GetActiveView();
+ if ( aGridItem.GetGridType() != GRID_NONE )
+ {
+ if ( aGridItem.GetGridType() == GRID_LINES_CHARS )
+ {
+ m_bHRulerChanged = sal_True;
+ }
+ m_bVRulerChanged = sal_True;
+ pView->GetHLineal().SetCharWidth((long)(aCharWidthMF.GetValue(FUNIT_TWIP)/56.7));
+ pView->GetVLineal().SetLineHeight((long)(aTextSizeMF.GetValue(FUNIT_TWIP)/56.7));
+ }
}
-/* -----------------------------08.02.2002 10:54------------------------------
- ---------------------------------------------------------------------------*/
void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
{
if( SFX_ITEM_UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, sal_True ))
@@ -359,6 +364,12 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
if ( m_bSquaredMode )
{
aCharsPerLineNF.SetValue(m_aPageSize.Width() / nTextSize);
+ aCharsPerLineNF.SetMax( aCharsPerLineNF.GetValue() );
+ aLinesPerPageNF.SetMax( m_aPageSize.Height() /
+ ( aTextSizeMF.Denormalize(aTextSizeMF.GetValue(FUNIT_TWIP)) +
+ aRubySizeMF.Denormalize(aRubySizeMF.GetValue(FUNIT_TWIP))));
+ SetLinesOrCharsRanges( aCharsRangeFT , aCharsPerLineNF.GetMax() );
+ SetLinesOrCharsRanges( aLinesRangeFT , aLinesPerPageNF.GetMax() );
}
else
{
@@ -368,22 +379,28 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
aCharsPerLineNF.SetValue(m_aPageSize.Width() / nTextWidth);
else
aCharsPerLineNF.SetValue( 45 );
+ SetLinesOrCharsRanges( aCharsRangeFT , aCharsPerLineNF.GetMax() );
+ SetLinesOrCharsRanges( aLinesRangeFT , aLinesPerPageNF.GetMax() );
}
}
}
-/* -----------------------------06.02.2002 15:24------------------------------
- ---------------------------------------------------------------------------*/
+void SwTextGridPage::SetLinesOrCharsRanges(FixedText & rField, const sal_Int32 nValue )
+{
+ String aFieldStr = String::CreateFromAscii("( 1 -");
+ aFieldStr += String::CreateFromInt32( nValue );
+ aFieldStr += String::CreateFromAscii(" )");
+ rField.SetText( aFieldStr );
+}
+
sal_uInt16* SwTextGridPage::GetRanges()
{
- static sal_uInt16 __FAR_DATA aPageRg[] = {
+ static sal_uInt16 aPageRg[] = {
RES_TEXTGRID, RES_TEXTGRID,
0};
return aPageRg;
}
-/* -----------------------------08.02.2002 10:56------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, SpinField*, pField)
{
//if in squared mode
@@ -405,6 +422,8 @@ IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, SpinField*, pField)
aRubySizeMF.Denormalize(aRubySizeMF.GetValue(FUNIT_TWIP))));
aLinesPerPageNF.SetMax(nMaxLines);
}
+ SetLinesOrCharsRanges( aLinesRangeFT , aLinesPerPageNF.GetMax() );
+ SetLinesOrCharsRanges( aCharsRangeFT , aCharsPerLineNF.GetMax() );
}
else//in normal mode
{
@@ -413,6 +432,7 @@ IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, SpinField*, pField)
long nHeight = static_cast< sal_Int32 >(m_aPageSize.Height() / aLinesPerPageNF.GetValue());
aTextSizeMF.SetValue(aTextSizeMF.Normalize(nHeight), FUNIT_TWIP);
aRubySizeMF.SetValue(0, FUNIT_TWIP);
+ SetLinesOrCharsRanges( aLinesRangeFT , aLinesPerPageNF.GetMax() );
m_nRubyUserValue = nHeight;
m_bRubyUserValue = sal_True;
@@ -421,13 +441,13 @@ IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, SpinField*, pField)
{
long nWidth = static_cast< sal_Int32 >(m_aPageSize.Width() / aCharsPerLineNF.GetValue());
aCharWidthMF.SetValue(aCharWidthMF.Normalize(nWidth), FUNIT_TWIP);
+ SetLinesOrCharsRanges( aCharsRangeFT , aCharsPerLineNF.GetMax() );
}
}
GridModifyHdl(0);
return 0;
}
-/* -----------------------------04.09.2006 15:46------------------------------
- ---------------------------------------------------------------------------*/
+
IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField)
{
//if in squared mode
@@ -435,8 +455,6 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField)
{
if (&aTextSizeMF == pField)
{
- sal_Int32 nTextSize = static_cast< sal_Int32 >(aTextSizeMF.Denormalize(aTextSizeMF.GetValue(FUNIT_TWIP)));
- aCharsPerLineNF.SetValue(m_aPageSize.Width() / nTextSize);
m_bRubyUserValue = sal_False;
}
//set maximum line per page
@@ -445,6 +463,7 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField)
( aTextSizeMF.Denormalize(aTextSizeMF.GetValue(FUNIT_TWIP)) +
aRubySizeMF.Denormalize(aRubySizeMF.GetValue(FUNIT_TWIP))));
aLinesPerPageNF.SetMax(nMaxLines);
+ SetLinesOrCharsRanges( aLinesRangeFT , aLinesPerPageNF.GetMax() );
}
}
else
@@ -454,23 +473,23 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField)
sal_Int32 nTextSize = static_cast< sal_Int32 >(aTextSizeMF.Denormalize(aTextSizeMF.GetValue(FUNIT_TWIP)));
aLinesPerPageNF.SetValue(m_aPageSize.Height() / nTextSize);
m_bRubyUserValue = sal_False;
+ SetLinesOrCharsRanges( aLinesRangeFT , aLinesPerPageNF.GetMax() );
}
else if (&aCharWidthMF == pField)
{
sal_Int32 nTextWidth = static_cast< sal_Int32 >(aCharWidthMF.Denormalize(aCharWidthMF.GetValue(FUNIT_TWIP)));
+ sal_Int32 nMaxChar = 45 ;
if (nTextWidth)
- aCharsPerLineNF.SetValue(m_aPageSize.Width() / nTextWidth);
- else
- aCharsPerLineNF.SetValue( 45 );
+ nMaxChar = m_aPageSize.Width() / nTextWidth;
+ aCharsPerLineNF.SetValue( nMaxChar );
+ SetLinesOrCharsRanges( aCharsRangeFT , aCharsPerLineNF.GetMax() );
}
//rubySize is disabled
}
GridModifyHdl(0);
return 0;
}
-/* -----------------------------22.04.2002 14:53------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwTextGridPage, GridTypeHdl, RadioButton*, pButton)
{
sal_Bool bEnable = &aNoGridRB != pButton;
@@ -489,6 +508,7 @@ IMPL_LINK(SwTextGridPage, GridTypeHdl, RadioButton*, pButton)
{
aCharsPerLineFT.Enable(sal_False);
aCharsPerLineNF.Enable(sal_False);
+ aCharsRangeFT.Enable(sal_False);
aCharWidthFT.Enable(sal_False);
aCharWidthMF.Enable(sal_False);
}
@@ -496,17 +516,13 @@ IMPL_LINK(SwTextGridPage, GridTypeHdl, RadioButton*, pButton)
GridModifyHdl(0);
return 0;
}
-/* -----------------------------22.04.2002 15:46------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwTextGridPage, DisplayGridHdl, CheckBox*, EMPTYARG)
{
aPrintCB.Enable(aDisplayCB.IsChecked());
return 0;
}
-/* -----------------------------08.02.2002 11:54------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwTextGridPage, GridModifyHdl, void*, EMPTYARG)
{
const SfxItemSet& rOldSet = GetItemSet();
@@ -519,3 +535,4 @@ IMPL_LINK(SwTextGridPage, GridModifyHdl, void*, EMPTYARG)
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/pggrid.hrc b/sw/source/ui/misc/pggrid.hrc
index e156792c955d..e736e5040dbb 100644
--- a/sw/source/ui/misc/pggrid.hrc
+++ b/sw/source/ui/misc/pggrid.hrc
@@ -50,3 +50,5 @@
#define CB_SNAPTOCHARS 23
#define FT_CHARWIDTH 24
#define MF_CHARWIDTH 25
+#define FT_LINERANGE 26
+#define FT_CHARRANGE 27
diff --git a/sw/source/ui/misc/pggrid.src b/sw/source/ui/misc/pggrid.src
index 9fb24c12029f..b226b4ce8bc8 100644
--- a/sw/source/ui/misc/pggrid.src
+++ b/sw/source/ui/misc/pggrid.src
@@ -102,6 +102,12 @@ TabPage TP_TEXTGRID_PAGE
Last = 154 ;
SpinSize = 1 ;
};
+ FixedText FT_LINERANGE
+ {
+ Pos = MAP_APPFONT ( 103 , 82 ) ;
+ Size = MAP_APPFONT ( 25 , 8 );
+ Text [ en-US ] = "( 1 - 48 )" ;
+ };
FixedText FT_TEXTSIZE
{
Pos = MAP_APPFONT ( 133 , 82 ) ;
@@ -174,6 +180,12 @@ TabPage TP_TEXTGRID_PAGE
Last = 5600 ;
SpinSize = 5 ;
};
+ FixedText FT_CHARRANGE
+ {
+ Pos = MAP_APPFONT ( 103 , 96 ) ;
+ Size = MAP_APPFONT ( 25 , 8 ) ;
+ Text [ en-US ] = "( 1 - 45 )" ;
+ };
FixedText FT_RUBYSIZE
{
Pos = MAP_APPFONT ( 133 , 98 ) ;
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index e1971af27497..644ba83140c1 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,10 +77,6 @@
#include <IDocumentRedlineAccess.hxx>
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SFX_IMPL_MODELESSDIALOG( SwRedlineAcceptChild, FN_REDLINE_ACCEPT )
SV_IMPL_PTRARR(SwRedlineDataParentArr, SwRedlineDataParentPtr)
@@ -90,10 +87,6 @@ SV_IMPL_PTRARR(SvLBoxEntryArr, SvLBoxEntryPtr)
static sal_uInt16 nSortMode = 0xffff;
static sal_Bool bSortDir = sal_True;
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwRedlineAcceptChild::SwRedlineAcceptChild( Window* _pParent,
sal_uInt16 nId,
SfxBindings* pBindings,
@@ -108,7 +101,6 @@ SwRedlineAcceptChild::SwRedlineAcceptChild( Window* _pParent,
/*--------------------------------------------------------------------
Beschreibung: Nach Dok-Wechsel Dialog neu initialisieren
--------------------------------------------------------------------*/
-
sal_Bool SwRedlineAcceptChild::ReInitDlg(SwDocShell *pDocSh)
{
sal_Bool bRet;
@@ -119,10 +111,6 @@ sal_Bool SwRedlineAcceptChild::ReInitDlg(SwDocShell *pDocSh)
return bRet;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwModelessRedlineAcceptDlg::SwModelessRedlineAcceptDlg( SfxBindings* _pBindings,
SwChildWinWrapper* pChild,
Window *_pParent) :
@@ -134,10 +122,6 @@ SwModelessRedlineAcceptDlg::SwModelessRedlineAcceptDlg( SfxBindings* _pBindings,
FreeResource();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwModelessRedlineAcceptDlg::Activate()
{
SwView *pView = ::GetActiveView();
@@ -168,10 +152,6 @@ void SwModelessRedlineAcceptDlg::Activate()
pImplDlg->Activate();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwModelessRedlineAcceptDlg::Initialize(SfxChildWinInfo *pInfo)
{
String aStr;
@@ -181,39 +161,23 @@ void SwModelessRedlineAcceptDlg::Initialize(SfxChildWinInfo *pInfo)
SfxModelessDialog::Initialize(pInfo);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwModelessRedlineAcceptDlg::FillInfo(SfxChildWinInfo& rInfo) const
{
SfxModelessDialog::FillInfo(rInfo);
pImplDlg->FillInfo(rInfo.aExtraString);
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwModelessRedlineAcceptDlg::Resize()
{
pImplDlg->Resize();
SfxModelessDialog::Resize();
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwModelessRedlineAcceptDlg::~SwModelessRedlineAcceptDlg()
{
delete pImplDlg;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt) :
pParentDlg (pParent),
aTabPagesCTRL (pParent, SW_RES(CTRL_TABPAGES)),
@@ -300,18 +264,10 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt) :
aSelectTimer.SetTimeoutHdl(LINK(this, SwRedlineAcceptDlg, GotoHdl));
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwRedlineAcceptDlg::~SwRedlineAcceptDlg()
{
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwRedlineAcceptDlg::Init(sal_uInt16 nStart)
{
SwWait aWait( *::GetActiveView()->GetDocShell(), sal_False );
@@ -338,10 +294,6 @@ void SwRedlineAcceptDlg::Init(sal_uInt16 nStart)
pTable->MakeVisible( pSelEntry, sal_True ); //#i70937#, force the scroll
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwRedlineAcceptDlg::InitAuthors()
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
@@ -369,10 +321,6 @@ void SwRedlineAcceptDlg::InitAuthors()
if( bOnlyFormatedRedlines && nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType() )
bOnlyFormatedRedlines = sal_False;
-//JP 27.9.2001: make no sense if we handle readonly sections
-// if( !bHasReadonlySel && rRedln.HasReadonlySel() )
-// bHasReadonlySel = sal_True;
-
String *pAuthor = new String(rRedln.GetAuthorString());
if (!aStrings.Insert(pAuthor))
delete pAuthor;
@@ -411,10 +359,6 @@ void SwRedlineAcceptDlg::InitAuthors()
!bOnlyFormatedRedlines );
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
String SwRedlineAcceptDlg::GetRedlineText( const SwRedline& rRedln,
DateTime &rDateTime, sal_uInt16 nStack)
{
@@ -434,10 +378,6 @@ String SwRedlineAcceptDlg::GetRedlineText( const SwRedline& rRedln,
return sEntry;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
const String &SwRedlineAcceptDlg::GetActionText(const SwRedline& rRedln, sal_uInt16 nStack)
{
switch( rRedln.GetType(nStack) )
@@ -453,10 +393,6 @@ const String &SwRedlineAcceptDlg::GetActionText(const SwRedline& rRedln, sal_uIn
return aEmptyStr;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwRedlineAcceptDlg::Resize()
{
Size aSz(pParentDlg->GetOutputSizePixel());
@@ -472,7 +408,6 @@ void SwRedlineAcceptDlg::Resize()
/*--------------------------------------------------------------------
Beschreibung: Nach Aktivierung neu initialisieren
--------------------------------------------------------------------*/
-
void SwRedlineAcceptDlg::Activate()
{
// prevent update if flag is set (#102547#)
@@ -487,12 +422,6 @@ void SwRedlineAcceptDlg::Activate()
if (!pView) // Kann passieren, wenn man auf eine andere App umschaltet, wenn
return; // vorher eine Listbox im Dialog den Focus hatte (eigentlich THs Bug)
-/* if (HasRedlineAutoFmt())
- {
- Init();
- return;
- }*/
-
// Hat sich was geaendert?
SwWrtShell* pSh = pView->GetWrtShellPtr();
sal_uInt16 nCount = pSh->GetRedlineCount();
@@ -578,10 +507,6 @@ void SwRedlineAcceptDlg::Activate()
InitAuthors();
}
-/* -----------------05.06.98 13:06-------------------
- *
- * --------------------------------------------------*/
-
sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, sal_Bool bChild)
{
if (!nStart)
@@ -655,10 +580,6 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, sal_Bool bChild)
return USHRT_MAX;
}
-/* -----------------05.06.98 13:57-------------------
- *
- * --------------------------------------------------*/
-
void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const sal_uInt16 nAutoFmt)
{
String sChild;
@@ -738,10 +659,6 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl
}
}
-/* -----------------05.06.98 15:20-------------------
- *
- * --------------------------------------------------*/
-
void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
@@ -816,10 +733,6 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
aRedlineParents.DeleteAndDestroy( nStart, nEnd - nStart + 1);
}
-/* -----------------05.06.98 15:20-------------------
- *
- * --------------------------------------------------*/
-
void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
{
SwView *pView = ::GetActiveView();
@@ -883,10 +796,6 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
}
}
-/* -----------------05.06.98 13:06-------------------
- *
- * --------------------------------------------------*/
-
void SwRedlineAcceptDlg::CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept )
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
@@ -897,7 +806,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept )
ListBoxEntries_t aRedlines;
// don't activate
- DBG_ASSERT( bInhibitActivate == false,
+ OSL_ENSURE( bInhibitActivate == false,
"recursive call of CallAcceptReject?");
bInhibitActivate = true;
@@ -951,7 +860,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept )
ListBoxEntries_t::iterator aEnd = aRedlines.end();
for( ListBoxEntries_t::iterator aIter = aRedlines.begin();
aIter != aEnd;
- aIter++ )
+ ++aIter )
{
sal_uInt16 nPosition = GetRedlinePos( **aIter );
if( nPosition != USHRT_MAX )
@@ -986,10 +895,6 @@ void SwRedlineAcceptDlg::CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept )
pTPView->EnableUndo();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
@@ -997,50 +902,30 @@ sal_uInt16 SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const
rEntry.GetUserData())->pData)->pData );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwRedlineAcceptDlg, AcceptHdl, void*, EMPTYARG)
{
CallAcceptReject( sal_True, sal_True );
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwRedlineAcceptDlg, AcceptAllHdl, void*, EMPTYARG )
{
CallAcceptReject( sal_False, sal_True );
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwRedlineAcceptDlg, RejectHdl, void*, EMPTYARG )
{
CallAcceptReject( sal_True, sal_False );
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwRedlineAcceptDlg, RejectAllHdl, void*, EMPTYARG )
{
CallAcceptReject( sal_False, sal_False );
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwRedlineAcceptDlg, UndoHdl, void*, EMPTYARG )
{
SwView * pView = ::GetActiveView();
@@ -1053,10 +938,6 @@ IMPL_LINK( SwRedlineAcceptDlg, UndoHdl, void*, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwRedlineAcceptDlg, FilterChangedHdl, void*, EMPTYARG )
{
SvxTPFilter *pFilterTP = aTabPagesCTRL.GetFilterPage();
@@ -1071,10 +952,6 @@ IMPL_LINK( SwRedlineAcceptDlg, FilterChangedHdl, void*, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwRedlineAcceptDlg, DeselectHdl, void*, EMPTYARG )
{
// Flackern der Buttons vermeiden:
@@ -1083,10 +960,6 @@ IMPL_LINK( SwRedlineAcceptDlg, DeselectHdl, void*, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwRedlineAcceptDlg, SelectHdl, void*, EMPTYARG )
{
aDeselectTimer.Stop();
@@ -1095,10 +968,6 @@ IMPL_LINK( SwRedlineAcceptDlg, SelectHdl, void*, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
@@ -1106,7 +975,6 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
sal_Bool bIsNotFormated = sal_False;
sal_Bool bSel = sal_False;
-// sal_Bool bReadonlySel = sal_False;
//#98883# don't select redlines while the dialog is not focussed
//#107938# But not only ask pTable if it has the focus. To move
@@ -1147,10 +1015,6 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
const SwRedline& rRedln = pSh->GetRedline( nPos );
bIsNotFormated |= nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType();
-//JP 27.9.2001: make no sense if we handle readonly sections
-// if( !bReadonlySel && rRedln.HasReadonlySel() )
-// bReadonlySel = sal_True;
-
if (pSh->GotoRedline(nPos, sal_True))
{
pSh->SetInSelect();
@@ -1173,10 +1037,6 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
{
const CommandEvent aCEvt(pTable->GetCommandEvent());
@@ -1246,16 +1106,16 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
/* enable again once we have redline comments in the margin
sComment = rRedline.GetComment();
- if ( sComment == String(::rtl::OUString::createFromAscii("")) )
+ if ( !sComment.Len() )
GetActiveView()->GetDocShell()->Broadcast(SwRedlineHint(&rRedline,SWREDLINE_INSERTED));
const_cast<SwRedline&>(rRedline).Broadcast(SwRedlineHint(&rRedline,SWREDLINE_FOCUS));
*/
sComment = rRedline.GetComment();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::DialogGetRanges fnGetRange = pFact->GetDialogGetRangesFunc( RID_SVXDLG_POSTIT );
- DBG_ASSERT(fnGetRange, "Dialogdiet fail! GetRanges()");
+ OSL_ENSURE(fnGetRange, "Dialogdiet fail! GetRanges()");
SfxItemSet aSet( pSh->GetAttrPool(), fnGetRange() );
aSet.Put(SvxPostItTextItem(sComment.ConvertLineEnd(), SID_ATTR_POSTIT_TEXT));
@@ -1266,7 +1126,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
SID_ATTR_POSTIT_DATE ));
AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, sal_False );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->HideAuthor();
@@ -1343,10 +1203,6 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwRedlineAcceptDlg::Initialize(const String& rExtraData)
{
if (rExtraData.Len())
@@ -1384,10 +1240,6 @@ void SwRedlineAcceptDlg::Initialize(const String& rExtraData)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwRedlineAcceptDlg::FillInfo(String &rExtraData) const
{
rExtraData.AppendAscii("AcceptChgDat:(");
@@ -1403,3 +1255,5 @@ void SwRedlineAcceptDlg::FillInfo(String &rExtraData) const
}
rExtraData += ')';
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/redlndlg.src b/sw/source/ui/misc/redlndlg.src
index 39418495363c..861b1b4c3fe5 100644
--- a/sw/source/ui/misc/redlndlg.src
+++ b/sw/source/ui/misc/redlndlg.src
@@ -52,7 +52,6 @@
ModelessDialog DLG_REDLINE_ACCEPT
{
HelpID = HID_REDLINE_ACCEPT ;
- /* ### ACHTUNG: Neuer Text in Resource? Änderungen akzeptieren oder verwerfen : Redlining */
Text [ en-US ] = "Accept or Reject Changes" ;
REDLNDLG
};
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index 678b0c917e3c..ad6fc7830e57 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,7 @@
#include "srtdlg.hxx"
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <svl/intitem.hxx>
#include <svl/eitem.hxx>
#include <sfx2/dispatch.hxx>
@@ -86,7 +85,6 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
using ::rtl::OUString;
-
void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox )
{
void* pDel;
@@ -100,8 +98,6 @@ void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox )
Beschreibung: Fuer Tabellenselektion sel. Zeilen und Spalten
feststellen
--------------------------------------------------------------------*/
-
-
sal_Bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY )
{
const SwTableNode* pTblNd = rSh.IsCrsrInTbl();
@@ -129,7 +125,6 @@ sal_Bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY )
/*--------------------------------------------------------------------
Beschreibung: Init-Liste
--------------------------------------------------------------------*/
-
SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
SvxStandardDialog(pParent, SW_RES(DLG_SORTING)),
@@ -407,9 +402,6 @@ void SwSortDlg::Apply()
InfoBox( this->GetParent(), SW_RES(MSG_SRTERR)).Execute();
}
-/* -----------------30.09.98 10:03-------------------
- *
- * --------------------------------------------------*/
IMPL_LINK( SwSortDlg, DelimHdl, RadioButton*, pButton )
{
sal_Bool bEnable = pButton == &aDelimFreeRB && aDelimFreeRB.IsEnabled();
@@ -439,7 +431,6 @@ IMPL_LINK( SwSortDlg, DelimCharHdl, PushButton*, EMPTYARG )
return 0;
}
-
IMPL_LINK( SwSortDlg, CheckHdl, CheckBox *, pCheck )
{
if( pCheck == ( CheckBox* ) &aRowRB)
@@ -525,8 +516,4 @@ IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox )
return 0;
}
-
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/srtdlg.src b/sw/source/ui/misc/srtdlg.src
index 5bfbc4600e10..90ce866a3b20 100644
--- a/sw/source/ui/misc/srtdlg.src
+++ b/sw/source/ui/misc/srtdlg.src
@@ -68,7 +68,6 @@ ModalDialog DLG_SORTING
{
Pos = MAP_APPFONT ( 101, 12 ) ;
Size = MAP_APPFONT ( 48 , 8 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Schlüsseltyp : Schl³sseltyp */
Text [ en-US ] = "Key type" ;
Left = TRUE ;
};
@@ -83,7 +82,6 @@ ModalDialog DLG_SORTING
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 */
Text [ en-US ] = "Key ~1" ;
Check = TRUE ;
};
@@ -141,7 +139,6 @@ ModalDialog DLG_SORTING
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 */
Text [ en-US ] = "Key ~2" ;
};
NumericField ED_KEY2
@@ -193,7 +190,6 @@ ModalDialog DLG_SORTING
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 */
Text [ en-US ] = "Key ~3" ;
};
NumericField ED_KEY3
diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
index 08ac516e4b31..0fd7cf7c9f11 100644
--- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
+++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,9 +42,7 @@
#include <redline.hxx>
#include <tools/datetime.hxx>
#include <vcl/msgbox.hxx>
-#ifndef _SVSTDARR_HXX
#include <svl/svstdarr.hxx>
-#endif
#include <svl/eitem.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
@@ -51,28 +50,16 @@
#include <svx/postattr.hxx>
#include <swtypes.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <swmodule.hxx>
#include <swwait.hxx>
#include <uitool.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _MISC_HRC
#include <misc.hrc>
-#endif
-#ifndef _REDLNDLG_HRC
#include <redlndlg.hrc>
-#endif
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
#include <vector>
#ifndef _REDLNDLG_HXX
@@ -83,7 +70,6 @@
#include <unomid.h>
-
SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) :
SfxModalDialog(pParent, SW_RES(DLG_MOD_REDLINE_ACCEPT))
{
@@ -95,10 +81,6 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) :
FreeResource();
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg()
{
AcceptAll(sal_False); // Alles uebriggebliebene ablehnen
@@ -107,28 +89,16 @@ SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg()
delete pImplDlg;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwModalRedlineAcceptDlg::Activate()
{
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwModalRedlineAcceptDlg::Resize()
{
pImplDlg->Resize();
SfxModalDialog::Resize();
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwModalRedlineAcceptDlg::AcceptAll( sal_Bool bAccept )
{
SvxTPFilter* pFilterTP = pImplDlg->GetChgCtrl()->GetFilterPage();
@@ -145,3 +115,5 @@ void SwModalRedlineAcceptDlg::AcceptAll( sal_Bool bAccept )
pImplDlg->CallAcceptReject( sal_False, bAccept );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
new file mode 100644
index 000000000000..f41bc49c9d63
--- /dev/null
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -0,0 +1,367 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Caolán McNamara <caolanm@redhat.com> (Red Hat, Inc.)
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Caolán McNamara <caolanm@redhat.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+#ifdef SW_DLLIMPLEMENTATION
+#undef SW_DLLIMPLEMENTATION
+#endif
+
+#include <sfx2/viewfrm.hxx>
+#include <vcl/msgbox.hxx>
+#include <view.hxx>
+#include <swmodule.hxx>
+#include <wrtsh.hxx>
+#include <poolfmt.hxx>
+#include <docsh.hxx>
+#include <charfmt.hxx>
+#include <docstyle.hxx>
+
+#include "fldbas.hxx"
+#include "lineinfo.hxx"
+#include "globals.hrc"
+#include "titlepage.hrc"
+#include "titlepage.hxx"
+#include "uitool.hxx"
+#include "fmtpdsc.hxx"
+#include "pagedesc.hxx"
+
+#include <IDocumentStylePoolAccess.hxx>
+
+namespace
+{
+ bool lcl_GetPageDesc(SwWrtShell *pSh, sal_uInt16 &rPageNo, const SwFmtPageDesc **ppPageFmtDesc)
+ {
+ bool bRet = false;
+ SfxItemSet aSet( pSh->GetAttrPool(), RES_PAGEDESC, RES_PAGEDESC );
+ if (pSh->GetCurAttr( aSet ))
+ {
+ const SfxPoolItem* pItem(0);
+ if (SFX_ITEM_SET == aSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) && pItem)
+ {
+ rPageNo = ((const SwFmtPageDesc *)pItem)->GetNumOffset();
+ if (ppPageFmtDesc)
+ (*ppPageFmtDesc) = (const SwFmtPageDesc *)(pItem->Clone());
+ bRet = true;
+ }
+ }
+ return bRet;
+ }
+
+ bool lcl_SkipNPages(SwWrtShell *pSh, sal_uInt16 nNoPages)
+ {
+ bool bAllOk = true;
+ for (sal_uInt16 nI = 0; nI < nNoPages && bAllOk; ++nI)
+ bAllOk = pSh->SttNxtPg();
+ return bAllOk;
+ }
+
+ void lcl_ChangePage(SwWrtShell *pSh, sal_uInt16 nNewNumber,
+ const SwPageDesc *pNewDesc)
+ {
+ const sal_uInt16 nCurIdx = pSh->GetCurPageDesc();
+ const SwPageDesc &rCurrentDesc = pSh->GetPageDesc( nCurIdx );
+
+ const SwFmtPageDesc *pPageFmtDesc(0);
+ sal_uInt16 nDontCare;
+ lcl_GetPageDesc(pSh, nDontCare, &pPageFmtDesc);
+
+ //If we want a new number then set it, otherwise reuse the existing one
+ sal_uInt16 nPgNo = nNewNumber ?
+ nNewNumber : ( pPageFmtDesc ? pPageFmtDesc->GetNumOffset() : 0 );
+
+ //If we want a new descriptior then set it, otherwise reuse the existing one
+ if (!pNewDesc)
+ {
+ SwFmtPageDesc aPageFmtDesc(pPageFmtDesc ? *pPageFmtDesc : &rCurrentDesc);
+ if (nPgNo) aPageFmtDesc.SetNumOffset(nPgNo);
+ pSh->SetAttr(aPageFmtDesc);
+ }
+ else
+ {
+ SwFmtPageDesc aPageFmtDesc(pNewDesc);
+ if (nPgNo) aPageFmtDesc.SetNumOffset(nPgNo);
+ pSh->SetAttr(aPageFmtDesc);
+ }
+
+ delete pPageFmtDesc;
+ }
+
+ void lcl_PushCursor(SwWrtShell *pSh)
+ {
+ pSh->LockView( sal_True );
+ pSh->StartAllAction();
+ pSh->SwCrsrShell::Push();
+ }
+
+ void lcl_PopCursor(SwWrtShell *pSh)
+ {
+ pSh->SwCrsrShell::Pop( sal_False );
+ pSh->EndAllAction();
+ pSh->LockView( sal_False );
+ }
+
+ sal_uInt16 lcl_GetCurrentPage(SwWrtShell *pSh)
+ {
+ String sDummy;
+ sal_uInt16 nPhyNum=1, nVirtNum=1;
+ pSh->GetPageNumber(0, true, nPhyNum, nVirtNum, sDummy);
+ return nPhyNum;
+ }
+}
+
+/*
+ * Only include the Index page in the list if the page count implies one
+ * to reduce confusing things
+ */
+void SwTitlePageDlg::FillList()
+{
+ sal_uInt16 nTitlePages = aPageCountNF.GetValue();
+ aPagePropertiesLB.Clear();
+ if (mpTitleDesc)
+ aPagePropertiesLB.InsertEntry(mpTitleDesc->GetName());
+ if (nTitlePages > 1 && mpIndexDesc)
+ aPagePropertiesLB.InsertEntry(mpIndexDesc->GetName());
+ if (mpNormalDesc)
+ aPagePropertiesLB.InsertEntry(mpNormalDesc->GetName());
+ aPagePropertiesLB.SelectEntryPos(0);
+}
+
+sal_uInt16 SwTitlePageDlg::GetInsertPosition() const
+{
+ sal_uInt16 nPage = 1;
+ if (aPageStartNF.IsEnabled())
+ nPage = aPageStartNF.GetValue();
+ return nPage;
+}
+
+SwTitlePageDlg::SwTitlePageDlg( Window *pParent ) :
+ SfxModalDialog( pParent, SW_RES(DLG_TITLEPAGE) ),
+#ifdef MSC
+#pragma warning (disable : 4355)
+#endif
+ aMakeInsertFL ( this, SW_RES( FL_MAKEINSERT )),
+ aUseExistingPagesRB ( this, SW_RES( RB_USE_EXISTING_PAGES )),
+ aInsertNewPagesRB ( this, SW_RES( RB_INSERT_NEW_PAGES )),
+ aPageCountFT ( this, SW_RES( FT_PAGE_COUNT )),
+ aPageCountNF ( this, SW_RES( NF_PAGE_COUNT )),
+ aPagePagesFT ( this, SW_RES( FT_PAGE_PAGES )),
+ aPageStartFT ( this, SW_RES( FT_PAGE_START )),
+ aDocumentStartRB ( this, SW_RES( RB_DOCUMENT_START )),
+ aPageStartRB ( this, SW_RES( RB_PAGE_START )),
+ aPageStartNF ( this, SW_RES( NF_PAGE_START )),
+ aNumberingFL ( this, SW_RES( FL_NUMBERING )),
+ aRestartNumberingCB ( this, SW_RES( CB_RESTART_NUMBERING )),
+ aRestartNumberingFT ( this, SW_RES( FT_RESTART_NUMBERING )),
+ aRestartNumberingNF ( this, SW_RES( NF_RESTART_NUMBERING )),
+ aSetPageNumberCB ( this, SW_RES( CB_SET_PAGE_NUMBER )),
+ aSetPageNumberFT ( this, SW_RES( FT_SET_PAGE_NUMBER )),
+ aSetPageNumberNF ( this, SW_RES( NF_SET_PAGE_NUMBER )),
+ aPagePropertiesFL ( this, SW_RES( FL_PAGE_PROPERTIES )),
+ aPagePropertiesLB ( this, SW_RES( LB_PAGE_PROPERTIES )),
+ aPagePropertiesPB ( this, SW_RES( PB_PAGE_PROPERTIES )),
+ aBottomFL ( this, SW_RES( FL_BOTTOM )),
+ aOkPB ( this, SW_RES( PB_OK )),
+ aCancelPB ( this, SW_RES( PB_CANCEL )),
+ aHelpPB ( this, SW_RES( PB_HELP )),
+ mpPageFmtDesc (0)
+#ifdef MSC
+#pragma warning (default : 4355)
+#endif
+{
+ FreeResource();
+
+ aOkPB.SetClickHdl(LINK(this, SwTitlePageDlg, OKHdl));
+ aRestartNumberingCB.SetClickHdl(LINK(this, SwTitlePageDlg, RestartNumberingHdl));
+ aSetPageNumberCB.SetClickHdl(LINK(this, SwTitlePageDlg, SetPageNumberHdl));
+
+ sal_uInt16 nSetPage = 1;
+ sal_uInt16 nResetPage = 1;
+ sal_uInt16 nTitlePages = 1;
+ mpSh = ::GetActiveView()->GetWrtShellPtr();
+ lcl_PushCursor(mpSh);
+
+ SwView& rView = mpSh->GetView();
+ rView.InvalidateRulerPos();
+
+ bool bMaybeResetNumbering = false;
+
+ mpTitleDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_FIRST);
+ mpIndexDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_REGISTER);
+ mpNormalDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_STANDARD);
+
+ mpSh->SttDoc();
+ if (lcl_GetPageDesc( mpSh, nSetPage, &mpPageFmtDesc ))
+ {
+ if (mpPageFmtDesc->GetPageDesc() == mpTitleDesc)
+ {
+ while (mpSh->SttNxtPg())
+ {
+ const sal_uInt16 nCurIdx = mpSh->GetCurPageDesc();
+ const SwPageDesc &rPageDesc = mpSh->GetPageDesc( nCurIdx );
+
+ if (mpIndexDesc != &rPageDesc)
+ {
+ mpNormalDesc = &rPageDesc;
+ bMaybeResetNumbering = lcl_GetPageDesc(mpSh, nResetPage, NULL);
+ break;
+ }
+ ++nTitlePages;
+ }
+ }
+ }
+ lcl_PopCursor(mpSh);
+
+ aUseExistingPagesRB.Check();
+ aPageCountNF.SetValue(nTitlePages);
+ aPageCountNF.SetUpHdl(LINK(this, SwTitlePageDlg, UpHdl));
+ aPageCountNF.SetDownHdl(LINK(this, SwTitlePageDlg, DownHdl));
+
+ aDocumentStartRB.Check();
+ aPageStartNF.Enable(false);
+ aPageStartNF.SetValue(lcl_GetCurrentPage(mpSh));
+ Link aStartPageHdl = LINK(this, SwTitlePageDlg, StartPageHdl);
+ aDocumentStartRB.SetClickHdl(aStartPageHdl);
+ aPageStartRB.SetClickHdl(aStartPageHdl);
+
+ if (bMaybeResetNumbering && nResetPage > 0)
+ {
+ aRestartNumberingCB.Check();
+ aRestartNumberingNF.SetValue(nResetPage);
+ }
+ aRestartNumberingNF.Enable(aRestartNumberingCB.IsChecked());
+
+ aSetPageNumberNF.SetValue(nSetPage);
+ if (nSetPage > 1)
+ aSetPageNumberCB.Check();
+ aSetPageNumberNF.Enable(aSetPageNumberCB.IsChecked());
+
+ FillList();
+ aPagePropertiesPB.SetClickHdl(LINK(this, SwTitlePageDlg, EditHdl));
+}
+
+IMPL_LINK(SwTitlePageDlg, UpHdl, NumericField *, EMPTYARG)
+{
+ if (aPageCountNF.GetValue() == 2)
+ FillList();
+ return 0;
+}
+
+IMPL_LINK(SwTitlePageDlg, DownHdl, NumericField *, EMPTYARG)
+{
+ if (aPageCountNF.GetValue() == 1)
+ FillList();
+ return 0;
+}
+
+IMPL_LINK(SwTitlePageDlg, RestartNumberingHdl, CheckBox*, EMPTYARG)
+{
+ aRestartNumberingNF.Enable(aRestartNumberingCB.IsChecked());
+ return 0;
+}
+
+IMPL_LINK(SwTitlePageDlg, SetPageNumberHdl, CheckBox*, EMPTYARG)
+{
+ aSetPageNumberNF.Enable(aSetPageNumberCB.IsChecked());
+ return 0;
+}
+
+IMPL_LINK(SwTitlePageDlg, StartPageHdl, RadioButton*, EMPTYARG)
+{
+ aPageStartNF.Enable(aPageStartRB.IsChecked());
+ return 0;
+}
+
+SwTitlePageDlg::~SwTitlePageDlg()
+{
+ delete mpPageFmtDesc;
+}
+
+IMPL_LINK( SwTitlePageDlg, EditHdl, Button *, /*pBtn*/ )
+{
+ SwView& rView = mpSh->GetView();
+ rView.GetDocShell()->FormatPage(aPagePropertiesLB.GetSelectEntry(), false, mpSh);
+ rView.InvalidateRulerPos();
+
+ return 0;
+}
+
+IMPL_LINK( SwTitlePageDlg, OKHdl, Button *, /*pBtn*/ )
+{
+ lcl_PushCursor(mpSh);
+
+ mpSh->StartUndo();
+
+ SwFmtPageDesc aTitleDesc(mpTitleDesc);
+
+ if (aSetPageNumberCB.IsChecked())
+ aTitleDesc.SetNumOffset(aSetPageNumberNF.GetValue());
+ else if (mpPageFmtDesc)
+ aTitleDesc.SetNumOffset(mpPageFmtDesc->GetNumOffset());
+
+ sal_uInt16 nNoPages = aPageCountNF.GetValue();
+ if (!aUseExistingPagesRB.IsChecked())
+ {
+ mpSh->GotoPage(GetInsertPosition(), false);
+ for (sal_uInt16 nI=0; nI < nNoPages; ++nI)
+ mpSh->InsertPageBreak();
+ }
+
+ mpSh->GotoPage(GetInsertPosition(), false);
+ for (sal_uInt16 nI=1; nI < nNoPages; ++nI)
+ {
+ if (mpSh->SttNxtPg())
+ lcl_ChangePage(mpSh, 0, mpIndexDesc);
+ }
+
+ mpSh->GotoPage(GetInsertPosition(), false);
+ mpSh->SetAttr(aTitleDesc);
+
+ if (nNoPages > 1 && mpSh->GotoPage(GetInsertPosition() + nNoPages, false))
+ {
+ SwFmtPageDesc aPageFmtDesc(mpNormalDesc);
+ mpSh->SetAttr(aPageFmtDesc);
+ }
+
+ if (aRestartNumberingCB.IsChecked() || nNoPages > 1)
+ {
+ sal_uInt16 nPgNo = aRestartNumberingCB.IsChecked() ? aRestartNumberingNF.GetValue() : 0;
+ const SwPageDesc *pNewDesc = nNoPages > 1 ? mpNormalDesc : 0;
+ mpSh->GotoPage(GetInsertPosition() + nNoPages, false);
+ lcl_ChangePage(mpSh, nPgNo, pNewDesc);
+ }
+
+ mpSh->EndUndo();
+ lcl_PopCursor(mpSh);
+ if (!aUseExistingPagesRB.IsChecked())
+ mpSh->GotoPage(GetInsertPosition(), false);
+ EndDialog( RET_OK );
+ return 0;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/titlepage.hrc b/sw/source/ui/misc/titlepage.hrc
new file mode 100644
index 000000000000..63678427cfca
--- /dev/null
+++ b/sw/source/ui/misc/titlepage.hrc
@@ -0,0 +1,50 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Caolán McNamara <caolanm@redhat.com> (Red Hat, Inc.)
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Caolán McNamara <caolanm@redhat.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#define FL_MAKEINSERT 1
+#define RB_USE_EXISTING_PAGES 2
+#define RB_INSERT_NEW_PAGES 3
+#define FT_PAGE_COUNT 4
+#define NF_PAGE_COUNT 5
+#define FT_PAGE_PAGES 6
+#define FT_PAGE_START 7
+#define RB_DOCUMENT_START 8
+#define RB_PAGE_START 9
+#define NF_PAGE_START 10
+#define FL_NUMBERING 11
+#define CB_RESTART_NUMBERING 12
+#define FT_RESTART_NUMBERING 13
+#define NF_RESTART_NUMBERING 14
+#define CB_SET_PAGE_NUMBER 15
+#define FT_SET_PAGE_NUMBER 16
+#define NF_SET_PAGE_NUMBER 17
+#define FL_PAGE_PROPERTIES 18
+#define LB_PAGE_PROPERTIES 19
+#define PB_PAGE_PROPERTIES 20
+#define FL_BOTTOM 21
+#define PB_OK 22
+#define PB_CANCEL 23
+#define PB_HELP 24
diff --git a/sw/source/ui/misc/titlepage.src b/sw/source/ui/misc/titlepage.src
new file mode 100644
index 000000000000..8e6aec6cffd7
--- /dev/null
+++ b/sw/source/ui/misc/titlepage.src
@@ -0,0 +1,248 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Caolán McNamara <caolanm@redhat.com> (Red Hat, Inc.)
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Caolán McNamara <caolanm@redhat.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+/* StarView ressource file */
+
+#include <sfx2/sfx.hrc>
+#include <svx/dialogs.hrc>
+#include "globals.hrc"
+#include "misc.hrc"
+#include "titlepage.hrc"
+#include "helpid.h"
+/**************************************************************************/
+/* */
+/**************************************************************************/
+ModalDialog DLG_TITLEPAGE
+{
+ HelpID = HID_TITLEPAGE ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 216 , 229 ) ;
+ Text [ en-US ] = "Title Pages" ;
+ Moveable = TRUE ;
+
+ FixedLine FL_MAKEINSERT
+ {
+ Pos = MAP_APPFONT ( 6 , 5 ) ;
+ Size = MAP_APPFONT ( 204 , 8 ) ;
+ Text [ en-US ] = "Make Title Pages" ;
+ Text [ x-comment ] = " ";
+ };
+ RadioButton RB_USE_EXISTING_PAGES
+ {
+ Pos = MAP_APPFONT ( 12 , 18 ) ;
+ Size = MAP_APPFONT ( 198 , 10 ) ;
+ Text [ en-US ] = "Convert existing pages to title pages" ;
+ TabStop = TRUE ;
+ Check = TRUE ;
+ Text [ x-comment ] = " ";
+ };
+ RadioButton RB_INSERT_NEW_PAGES
+ {
+ Pos = MAP_APPFONT ( 12 , 34 ) ;
+ Size = MAP_APPFONT ( 198 , 10 ) ;
+ Text [ en-US ] = "Insert new title pages" ;
+ Text [ x-comment ] = " ";
+ };
+ FixedText FT_PAGE_COUNT
+ {
+ Pos = MAP_APPFONT ( 12 , 50 ) ;
+ Size = MAP_APPFONT ( 82 , 8 ) ;
+ Text [ en-US ] = "Number of title pages" ;
+ Text [ x-comment ] = " ";
+ };
+ NumericField NF_PAGE_COUNT
+ {
+ Pos = MAP_APPFONT ( 100 , 50 ) ;
+ Size = MAP_APPFONT ( 30 , 12 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 65535;
+ First = 1 ;
+ Last = 65535;
+ SpinSize = 1 ;
+ };
+ FixedText FT_PAGE_PAGES
+ {
+ Pos = MAP_APPFONT ( 136 , 50 ) ;
+ Size = MAP_APPFONT ( 80 , 10 ) ;
+ Text [ en-US ] = "pages" ;
+ Text [ x-comment ] = " ";
+ };
+ FixedText FT_PAGE_START
+ {
+ Pos = MAP_APPFONT ( 12 , 66 ) ;
+ Size = MAP_APPFONT ( 82 , 8 ) ;
+ Text [ en-US ] = "Place title pages at" ;
+ Text [ x-comment ] = " ";
+ };
+ RadioButton RB_DOCUMENT_START
+ {
+ Pos = MAP_APPFONT ( 100 , 66 ) ;
+ Size = MAP_APPFONT ( 110 , 10 ) ;
+ Text [ en-US ] = "Document Start" ;
+ TabStop = TRUE ;
+ Check = TRUE ;
+ Text [ x-comment ] = " ";
+ };
+ RadioButton RB_PAGE_START
+ {
+ Pos = MAP_APPFONT ( 100 , 78 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text [ en-US ] = "Page" ;
+ Text [ x-comment ] = " ";
+ };
+ NumericField NF_PAGE_START
+ {
+ Pos = MAP_APPFONT ( 131 , 78 ) ;
+ Size = MAP_APPFONT ( 30 , 12 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 65535;
+ First = 1 ;
+ Last = 65535;
+ SpinSize = 1 ;
+ };
+ FixedLine FL_NUMBERING
+ {
+ Pos = MAP_APPFONT ( 6 , 98 ) ;
+ Size = MAP_APPFONT ( 204 , 8 ) ;
+ Text [ en-US ] = "Page Numbering" ;
+ Text [ x-comment ] = " ";
+ };
+ CheckBox CB_RESTART_NUMBERING
+ {
+ Pos = MAP_APPFONT ( 12, 111 ) ;
+ Size = MAP_APPFONT ( 198 , 10 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Reset Page Numbering after title pages" ;
+ Text [ x-comment ] = " ";
+ };
+ FixedText FT_RESTART_NUMBERING
+ {
+ Pos = MAP_APPFONT ( 20 , 125 ) ;
+ Size = MAP_APPFONT ( 74 , 10 ) ;
+ Text [ en-US ] = "Page Number" ;
+ Text [ x-comment ] = " ";
+ };
+ NumericField NF_RESTART_NUMBERING
+ {
+ Pos = MAP_APPFONT ( 100 , 125 ) ;
+ Size = MAP_APPFONT ( 30 , 12 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 65535;
+ First = 1 ;
+ Last = 65535;
+ SpinSize = 1 ;
+ };
+ CheckBox CB_SET_PAGE_NUMBER
+ {
+ Pos = MAP_APPFONT ( 12 , 139 ) ;
+ Size = MAP_APPFONT ( 198 , 10 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Set Page Number for first title page" ;
+ Text [ x-comment ] = " ";
+ };
+ FixedText FT_SET_PAGE_NUMBER
+ {
+ Pos = MAP_APPFONT ( 20 , 153 ) ;
+ Size = MAP_APPFONT ( 74 , 10 ) ;
+ Text [ en-US ] = "Page Number" ;
+ Text [ x-comment ] = " ";
+ };
+ NumericField NF_SET_PAGE_NUMBER
+ {
+ Pos = MAP_APPFONT ( 100 , 153 ) ;
+ Size = MAP_APPFONT ( 30 , 12 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 65535;
+ First = 1 ;
+ Last = 65535;
+ SpinSize = 1 ;
+ };
+ FixedLine FL_PAGE_PROPERTIES
+ {
+ Pos = MAP_APPFONT ( 6 , 169 ) ;
+ Size = MAP_APPFONT ( 204 , 8 ) ;
+ Text [ en-US ] = "Edit Page Properties" ;
+ Text [ x-comment ] = " ";
+ };
+ ListBox LB_PAGE_PROPERTIES
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 182 ) ;
+ Size = MAP_APPFONT ( 132 , 80 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ CurPos = 0 ;
+ };
+ PushButton PB_PAGE_PROPERTIES
+ {
+ Pos = MAP_APPFONT ( 150 , 182 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ Text [ en-US ] = "Edit..." ;
+ };
+ FixedLine FL_BOTTOM
+ {
+ Pos = MAP_APPFONT ( 6 , 198 ) ;
+ Size = MAP_APPFONT ( 204 , 8 ) ;
+ };
+ OKButton PB_OK
+ {
+ Pos = MAP_APPFONT ( 54 , 209 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE ;
+ };
+ CancelButton PB_CANCEL
+ {
+ Pos = MAP_APPFONT ( 107 , 209 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE ;
+ };
+ HelpButton PB_HELP
+ {
+ Pos = MAP_APPFONT ( 160 , 209 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+};
diff --git a/sw/source/ui/ribbar/conarc.cxx b/sw/source/ui/ribbar/conarc.cxx
index 60f733f328c7..3996b7c9bc00 100644
--- a/sw/source/ui/ribbar/conarc.cxx
+++ b/sw/source/ui/ribbar/conarc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -106,11 +107,6 @@ sal_Bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
m_pSh->EndCreate(SDRCREATE_NEXTPOINT);
}
}
-/* else if ( pView->IsCreateObj() && rMEvt.IsRight() )
- {
- pView->EndCreateObj( SDRCREATE_FORCEEND );
- bReturn = sal_True;
- }*/
return (bReturn);
}
@@ -159,3 +155,4 @@ void ConstArc::Deactivate()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/ribbar/concustomshape.cxx b/sw/source/ui/ribbar/concustomshape.cxx
index ebf3e8beba65..df887850220b 100644
--- a/sw/source/ui/ribbar/concustomshape.cxx
+++ b/sw/source/ui/ribbar/concustomshape.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,24 +41,16 @@
#include <svx/svdview.hxx>
#include <svx/svdocapt.hxx>
#include <editeng/outlobj.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <edtwin.hxx>
#include <wrtsh.hxx>
#include <viewopt.hxx>
-#ifndef _DRAWBASE_HXX
#include <drawbase.hxx>
-#endif
#include <concustomshape.hxx>
#include <svx/gallery.hxx>
#include <sfx2/request.hxx>
-#ifndef _FM_FMMODEL_HXX
#include <svx/fmmodel.hxx>
-#endif
#include <svl/itempool.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdoashp.hxx>
@@ -116,13 +109,9 @@ sal_Bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
if ( pObj )
{
SetAttributes( pObj );
- sal_Bool bForceFillStyle = sal_True;
sal_Bool bForceNoFillStyle = sal_False;
if ( ((SdrObjCustomShape*)pObj)->UseNoFillStyle() )
- {
- bForceFillStyle = sal_False;
bForceNoFillStyle = sal_True;
- }
SfxItemSet aAttr( m_pView->GetPool() );
if ( bForceNoFillStyle )
@@ -250,3 +239,5 @@ bool ConstCustomShape::doConstructOrthogonal() const
}
// eof
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/ribbar/conform.cxx b/sw/source/ui/ribbar/conform.cxx
index 1e6133d7703d..9ab0e2efeda2 100644
--- a/sw/source/ui/ribbar/conform.cxx
+++ b/sw/source/ui/ribbar/conform.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -120,9 +121,7 @@ void ConstFormControl::Activate(const sal_uInt16 nSlotId)
m_pWin->SetPointer(Pointer(POINTER_DRAW_RECT));
}
-/* -----------------------------19.04.2002 12:42------------------------------
- ---------------------------------------------------------------------------*/
void ConstFormControl::CreateDefaultObject()
{
Point aStartPos(GetDefaultCenterPos());
@@ -142,3 +141,4 @@ void ConstFormControl::CreateDefaultObject()
m_pSh->EndCreate(SDRCREATE_FORCEEND);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/ribbar/conpoly.cxx b/sw/source/ui/ribbar/conpoly.cxx
index 00f0067435b8..430e3d7ba6f5 100644
--- a/sw/source/ui/ribbar/conpoly.cxx
+++ b/sw/source/ui/ribbar/conpoly.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -161,3 +162,4 @@ void ConstPolygon::Activate(const sal_uInt16 nSlotId)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/ribbar/conrect.cxx b/sw/source/ui/ribbar/conrect.cxx
index c1debe9eab34..f8c25ed7ceba 100644
--- a/sw/source/ui/ribbar/conrect.cxx
+++ b/sw/source/ui/ribbar/conrect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -227,3 +228,4 @@ void ConstRectangle::Activate(const sal_uInt16 nSlotId)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx
index f41e0ce2835a..52f9f6897644 100644
--- a/sw/source/ui/ribbar/drawbase.cxx
+++ b/sw/source/ui/ribbar/drawbase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#include "precompiled_sw.hxx"
#include <hintids.hxx>
-#include <tools/list.hxx>
#include <svx/svdview.hxx>
#include <svx/svdobj.hxx>
#include <svl/ptitem.hxx>
@@ -81,7 +81,7 @@ SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* pSwV
|*
\************************************************************************/
-__EXPORT SwDrawBase::~SwDrawBase()
+SwDrawBase::~SwDrawBase()
{
if (m_pView->GetWrtShellPtr()) // Im view-Dtor koennte die wrtsh bereits geloescht worden sein...
m_pSh->GetDrawView()->SetEditMode(sal_True);
@@ -101,7 +101,6 @@ sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
SdrView *pSdrView = m_pSh->GetDrawView();
// #i33136#
- // pSdrView->SetOrtho(rMEvt.IsShift());
pSdrView->SetOrtho(doConstructOrthogonal() ? !rMEvt.IsShift() : rMEvt.IsShift());
pSdrView->SetAngleSnapEnabled(rMEvt.IsShift());
@@ -212,8 +211,6 @@ sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
{
bNoInterrupt = sal_True;
pSdrView->MarkPoint(*pHdl);
-// bReturn = pSdrView->BegDragObj(m_aStartPos, (OutputDevice*) NULL, pHdl);
-// m_pWin->SetDrawAction(sal_True);
}
}
}
@@ -240,11 +237,9 @@ sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
{
if (!pSdrView->HasMarkablePoints())
{
- //JP 10.10.2001: Bug 89619 - don't scroll the
- // cursor into the visible area
sal_Bool bUnlockView = !m_pSh->IsViewLocked();
m_pSh->LockView( sal_True ); //lock visible section
- m_pSh->SelectObj(Point(LONG_MAX, LONG_MAX)); // Alles deselektieren
+ m_pSh->SelectObj(Point(LONG_MAX, LONG_MAX)); // deselect all
if( bUnlockView )
m_pSh->LockView( sal_False );
}
@@ -281,7 +276,6 @@ sal_Bool SwDrawBase::MouseMove(const MouseEvent& rMEvt)
if (IsCreateObj() && !m_pWin->IsDrawSelMode() && pSdrView->IsCreateObj())
{
// #i33136#
- // pSdrView->SetOrtho(rMEvt.IsShift());
pSdrView->SetOrtho(doConstructOrthogonal() ? !rMEvt.IsShift() : rMEvt.IsShift());
pSdrView->SetAngleSnapEnabled(rMEvt.IsShift());
@@ -519,7 +513,7 @@ void SwDrawBase::Activate(const sal_uInt16 nSlot)
\************************************************************************/
-void __EXPORT SwDrawBase::Deactivate()
+void SwDrawBase::Deactivate()
{
SdrView *pSdrView = m_pSh->GetDrawView();
pSdrView->SetOrtho(sal_False);
@@ -533,9 +527,6 @@ void __EXPORT SwDrawBase::Deactivate()
m_pWin->ReleaseMouse();
bNoInterrupt = sal_False;
-// if(!m_pSh->IsObjSelected())
-// m_pSh->Edit();
-
if(m_pWin->GetApplyTemplate())
m_pWin->SetApplyTemplate(SwApplyTemplate());
m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
@@ -649,7 +640,6 @@ void SwDrawBase::BreakCreate()
m_pWin->ReleaseMouse();
Deactivate();
-// m_pView->LeaveDrawCreate();
}
/*************************************************************************
@@ -702,9 +692,7 @@ void SwDrawBase::EnterSelectMode(const MouseEvent& rMEvt)
m_pView->NoRotate();
}
}
-/* -----------------------------03.04.2002 10:52------------------------------
- ---------------------------------------------------------------------------*/
void SwDrawBase::CreateDefaultObject()
{
Point aStartPos = GetDefaultCenterPos();
@@ -716,9 +704,7 @@ void SwDrawBase::CreateDefaultObject()
Rectangle aRect(aStartPos, aEndPos);
m_pSh->CreateDefaultShape( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId);
}
-/* -----------------25.10.2002 14:14-----------------
- *
- * --------------------------------------------------*/
+
Point SwDrawBase::GetDefaultCenterPos()
{
Size aDocSz(m_pSh->GetDocSize());
@@ -738,3 +724,5 @@ bool SwDrawBase::doConstructOrthogonal() const
}
// eof
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/ribbar/dselect.cxx b/sw/source/ui/ribbar/dselect.cxx
index c810abe1a740..b67eaae297b0 100644
--- a/sw/source/ui/ribbar/dselect.cxx
+++ b/sw/source/ui/ribbar/dselect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,3 +101,4 @@ void DrawSelection::Activate(const sal_uInt16 nSlotId)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx
index fe148ff04841..6c988d9b265e 100755
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,10 +100,9 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind )
InsertWindow( ED_FORMULA, &aEdit);
SetHelpId(ED_FORMULA, HID_EDIT_FORMULA);
- sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
- SetItemImage( FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC, bHC ));
- SetItemImage( FN_FORMULA_CANCEL, pManager->GetImage(FN_FORMULA_CANCEL, bHC ));
- SetItemImage( FN_FORMULA_APPLY, pManager->GetImage(FN_FORMULA_APPLY, bHC ));
+ SetItemImage( FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC ));
+ SetItemImage( FN_FORMULA_CANCEL, pManager->GetImage(FN_FORMULA_CANCEL ));
+ SetItemImage( FN_FORMULA_APPLY, pManager->GetImage(FN_FORMULA_APPLY ));
SetItemBits( FN_FORMULA_CALC, GetItemBits( FN_FORMULA_CALC ) | TIB_DROPDOWNONLY );
SetDropdownClickHdl( LINK( this, SwInputWindow, DropdownClickHdl ));
@@ -133,7 +133,7 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind )
//==================================================================
-__EXPORT SwInputWindow::~SwInputWindow()
+SwInputWindow::~SwInputWindow()
{
SfxImageManager::GetImageManager( SW_MOD() )->ReleaseToolBox(this);
@@ -178,11 +178,9 @@ void SwInputWindow::DataChanged( const DataChangedEvent& rDCEvt )
// update item images
SwModule *pMod = SW_MOD();
SfxImageManager *pImgMgr = SfxImageManager::GetImageManager( pMod );
- sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
- //
- SetItemImage( FN_FORMULA_CALC, pImgMgr->GetImage(FN_FORMULA_CALC, bHC ));
- SetItemImage( FN_FORMULA_CANCEL, pImgMgr->GetImage(FN_FORMULA_CANCEL, bHC ));
- SetItemImage( FN_FORMULA_APPLY, pImgMgr->GetImage(FN_FORMULA_APPLY, bHC ));
+ SetItemImage( FN_FORMULA_CALC, pImgMgr->GetImage(FN_FORMULA_CALC ));
+ SetItemImage( FN_FORMULA_CANCEL, pImgMgr->GetImage(FN_FORMULA_CANCEL ));
+ SetItemImage( FN_FORMULA_APPLY, pImgMgr->GetImage(FN_FORMULA_APPLY ));
}
ToolBox::DataChanged( rDCEvt );
@@ -190,7 +188,7 @@ void SwInputWindow::DataChanged( const DataChangedEvent& rDCEvt )
//==================================================================
-void __EXPORT SwInputWindow::Resize()
+void SwInputWindow::Resize()
{
ToolBox::Resize();
@@ -214,7 +212,7 @@ void SwInputWindow::ShowWin()
pView->GetHLineal().SetActive( sal_False );
pView->GetVLineal().SetActive( sal_False );
- DBG_ASSERT(pWrtShell, "Keine WrtShell!");
+ OSL_ENSURE(pWrtShell, "no WrtShell!");
// Cursor in Tabelle
bIsTable = pWrtShell->IsCrsrInTbl() ? sal_True : sal_False;
@@ -235,11 +233,11 @@ void SwInputWindow::ShowWin()
aPos.SetText(SW_RESSTR(STR_TBL_FORMULA));
// Aktuelles Feld bearbeiten
- ASSERT(pMgr == 0, FieldManager nicht geloescht.);
+ OSL_ENSURE(pMgr == 0, "FieldManager not deleted");
pMgr = new SwFldMgr;
- // JP 13.01.97: Formel soll immer mit einem "=" beginnen, hier
- // also setzen
+ // Formel soll immer mit einem "=" beginnen, hier
+ // also setzen
String sEdit( '=' );
if( pMgr->GetCurFld() && TYP_FORMELFLD == pMgr->GetCurTypeId() )
{
@@ -314,7 +312,7 @@ void SwInputWindow::ShowWin()
IMPL_LINK( SwInputWindow, MenuHdl, Menu *, pMenu )
{
-static const char * __READONLY_DATA aStrArr[] = {
+static const char * const aStrArr[] = {
sCalc_Phd,
sCalc_Sqrt,
sCalc_Or,
@@ -373,7 +371,7 @@ IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG )
//==================================================================
-void __EXPORT SwInputWindow::Click( )
+void SwInputWindow::Click( )
{
sal_uInt16 nCurID = GetCurItemId();
EndSelection(); // setzt CurItemId zurueck !
@@ -401,8 +399,8 @@ void SwInputWindow::ApplyFormula()
CleanupUglyHackWithUndo();
pWrtShell->Pop( sal_False );
- // JP 13.01.97: Formel soll immer mit einem "=" beginnen, hier
- // also wieder entfernen
+ // Formel soll immer mit einem "=" beginnen, hier
+ // also wieder entfernen
String sEdit( aEdit.GetText() );
sEdit.EraseLeadingChars().EraseTrailingChars();
if( sEdit.Len() && '=' == sEdit.GetChar( 0 ) )
@@ -536,7 +534,7 @@ void SwInputWindow::DelBoxCntnt()
//==================================================================
-void __EXPORT InputEdit::KeyInput(const KeyEvent& rEvent)
+void InputEdit::KeyInput(const KeyEvent& rEvent)
{
const KeyCode aCode = rEvent.GetKeyCode();
if(aCode == KEY_RETURN || aCode == KEY_F2 )
@@ -549,7 +547,7 @@ void __EXPORT InputEdit::KeyInput(const KeyEvent& rEvent)
//==================================================================
-void __EXPORT InputEdit::UpdateRange(const String& rBoxes,
+void InputEdit::UpdateRange(const String& rBoxes,
const String& rName )
{
if( !rBoxes.Len() )
@@ -582,7 +580,7 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes,
aStr += cClose;
SetText(aStr);
sal_uInt16 nPos = aStr.Search( cClose );
- ASSERT(nPos < aStr.Len(), Delimiter nicht gefunden.);
+ OSL_ENSURE(nPos < aStr.Len(), "delimiter not found");
++nPos;
SetSelection( Selection( nPos, nPos ));
}
@@ -608,8 +606,7 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes,
nEndPos = nStartPos;
while( nEndPos < nLen )
{
- if( cClose == (cCh = aActText.GetChar( nEndPos )) /*||
- cCh == cCloseBracket*/ )
+ if( cClose == (cCh = aActText.GetChar( nEndPos )))
{
bFound = sal_True;
break;
@@ -641,7 +638,6 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes,
{
SetText( aActText );
SetSelection( Selection( nPos, nPos ) );
-// GetModifyHdl().Call( this );
}
}
GrabFocus();
@@ -649,7 +645,6 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes,
}
//==================================================================
-
SwInputChild::SwInputChild(Window* _pParent,
sal_uInt16 nId,
SfxBindings* pBindings,
@@ -663,16 +658,17 @@ SwInputChild::SwInputChild(Window* _pParent,
}
-__EXPORT SwInputChild::~SwInputChild()
+SwInputChild::~SwInputChild()
{
if(pDispatch)
pDispatch->Lock(sal_False);
}
-SfxChildWinInfo __EXPORT SwInputChild::GetInfo() const
+SfxChildWinInfo SwInputChild::GetInfo() const
{
SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
return aInfo;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/ribbar/inputwin.src b/sw/source/ui/ribbar/inputwin.src
index 5686fd7ae6c2..bd88014a3554 100644
--- a/sw/source/ui/ribbar/inputwin.src
+++ b/sw/source/ui/ribbar/inputwin.src
@@ -47,22 +47,18 @@ ToolBox RID_TBX_FORMULA
HelpId = HID_TBX_FORMULA_CALC ;
DropDown = TRUE ;
Text [ en-US ] = "Formula" ;
- /* ### ACHTUNG: Neuer Text in Resource? Formel auswählen : Formel auswõhlen */
};
ToolBoxItem
{
Identifier = 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 = 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 */
};
};
Edit ED_POS
@@ -152,7 +148,6 @@ Menu MN_CALC_POPUP
{
Identifier = MN_CALC_GEQ ;
HelpID = HID_MN_CALC_GEQ ;
- /* ### ACHTUNG: Neuer Text in Resource? Gr~ößer Gleich : Gr~÷˜er Gleich */
Text [ en-US ] = "Greater Than or Equal" ;
};
MenuItem
@@ -165,7 +160,6 @@ Menu MN_CALC_POPUP
{
Identifier = MN_CALC_GRE ;
HelpID = HID_MN_CALC_GRE ;
- /* ### ACHTUNG: Neuer Text in Resource? G~rößer : G~r÷˜er */
Text [ en-US ] = "Greater" ;
};
MenuItem
@@ -289,22 +283,18 @@ String STR_TBL_FORMULA
Identifier = 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 = 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 = 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/tblctrl.cxx b/sw/source/ui/ribbar/tblctrl.cxx
index a5cc0d6725ba..fae82b2c568b 100644
--- a/sw/source/ui/ribbar/tblctrl.cxx
+++ b/sw/source/ui/ribbar/tblctrl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,3 +92,5 @@ SfxPopupWindowType SwTableOptimizeCtrl::GetPopupWindowType() const
{
return SFX_POPUPWINDOW_ONCLICK;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/ribbar/tbxanchr.cxx b/sw/source/ui/ribbar/tbxanchr.cxx
index 31e3c21f5e13..272b07374d8c 100644
--- a/sw/source/ui/ribbar/tbxanchr.cxx
+++ b/sw/source/ui/ribbar/tbxanchr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,15 +31,13 @@
-#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
+#include <string>
#include <vcl/timer.hxx>
#include <sfx2/app.hxx>
#include <svx/htmlmode.hxx>
#include <svl/intitem.hxx>
#include <sfx2/dispatch.hxx>
-#ifndef _TOOLBOX_HXX //autogen
#include <vcl/toolbox.hxx>
-#endif
#include <sfx2/mnumgr.hxx>
@@ -49,7 +48,6 @@
#include "wrtsh.hxx"
#include "view.hxx"
#include "viewopt.hxx"
-#include "errhdl.hxx"
#include "ribbar.hrc"
#include "tbxanchr.hxx"
@@ -57,10 +55,6 @@
SFX_IMPL_TOOLBOX_CONTROL(SwTbxAnchor, SfxUInt16Item);
-/******************************************************************************
- * Beschreibung:
- ******************************************************************************/
-
SwTbxAnchor::SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
nActAnchorId(0)
@@ -68,18 +62,10 @@ SwTbxAnchor::SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
}
-/******************************************************************************
- * Beschreibung:
- ******************************************************************************/
-
SwTbxAnchor::~SwTbxAnchor()
{
}
-/******************************************************************************
- * Beschreibung:
- ******************************************************************************/
-
void SwTbxAnchor::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) );
@@ -93,20 +79,12 @@ void SwTbxAnchor::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const
}
-/******************************************************************************
- * Beschreibung:
- ******************************************************************************/
-
SfxPopupWindow* SwTbxAnchor::CreatePopupWindow()
{
SwTbxAnchor::Click();
return 0;
}
-/******************************************************************************
- * Beschreibung:
- ******************************************************************************/
-
void SwTbxAnchor::Click()
{
PopupMenu aPopMenu(SW_RES(MN_ANCHOR_POPUP));
@@ -122,8 +100,6 @@ void SwTbxAnchor::Click()
pDispatch = pViewFrame->GetDispatcher();
}
-// SfxDispatcher* pDispatch = GetBindings().GetDispatcher();
-// SfxViewFrame* pViewFrame = pDispatch ? pDispatch->GetFrame() : 0;
SwView* pActiveView = 0;
if(pViewFrame)
{
@@ -141,7 +117,7 @@ void SwTbxAnchor::Click()
}
if(!pActiveView)
{
- DBG_ERROR("No active view could be found");
+ OSL_ENSURE(false, "No active view found");
return;
}
SwWrtShell* pWrtShell = pActiveView->GetWrtShellPtr();
@@ -164,3 +140,5 @@ void SwTbxAnchor::Click()
if (nSlotId)
pDispatch->Execute(nSlotId, SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index 2e46b44cf82d..6cf63fe81ce5 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,37 +30,24 @@
#include "precompiled_sw.hxx"
-
-#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
+#include <string>
#include <svl/eitem.hxx>
#include <svx/htmlmode.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/bindings.hxx>
-#ifndef _SFX_IMAGEMGR_HXX
#include <sfx2/imagemgr.hxx>
-#endif
#include <swmodule.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <initui.hxx>
#include <viewopt.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <gloshdl.hxx>
#include <glosdoc.hxx>
#include <gloslst.hxx>
#include <workctrl.hxx>
-#ifndef _WORKCTRL_HRC
#include <workctrl.hrc>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#include <wrtsh.hxx>
#include <svl/imageitm.hxx>
#include <vcl/lstbox.hxx>
@@ -69,7 +57,7 @@
#include <vcl/svapp.hxx>
-//JP 14.01.99: Size Abpruefung
+// Size Abpruefung
#define NAVI_ENTRIES 20
#if NAVI_ENTRIES != NID_COUNT
#error SwScrollNaviPopup-CTOR static Array falsche Size. Wurden neue IDs zugefuegt ??
@@ -84,9 +72,6 @@ using namespace ::com::sun::star::frame;
SFX_IMPL_TOOLBOX_CONTROL( SwTbxInsertCtrl, SfxImageItem);
SFX_IMPL_TOOLBOX_CONTROL( SwTbxAutoTextCtrl, SfxBoolItem );
-/**********************************************************************
-
-**********************************************************************/
SwTbxInsertCtrl::SwTbxInsertCtrl(
sal_uInt16 nSlotId,
sal_uInt16 nId,
@@ -96,9 +81,7 @@ SwTbxInsertCtrl::SwTbxInsertCtrl(
{
rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
}
-/**********************************************************************
-**********************************************************************/
SwTbxInsertCtrl::~SwTbxInsertCtrl()
{
}
@@ -108,10 +91,7 @@ void SAL_CALL SwTbxInsertCtrl::update() throw (uno::RuntimeException)
ToolBox& rTbx = GetToolBox();
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( nLastSlotId ));
- Image aImage = GetImage( m_xFrame,
- aSlotURL,
- hasBigImages(),
- rTbx.GetSettings().GetStyleSettings().GetHighContrastMode() );
+ Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages() );
rTbx.SetItemImage(GetId(), aImage);
rTbx.Invalidate();
@@ -119,11 +99,6 @@ void SAL_CALL SwTbxInsertCtrl::update() throw (uno::RuntimeException)
SfxToolBoxControl::update();
}
-/**********************************************************************
-
-**********************************************************************/
-
-
void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* pState )
@@ -143,10 +118,7 @@ void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/,
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( nId ));
ToolBox& rBox = GetToolBox();
- Image aImage = GetImage( m_xFrame,
- aSlotURL,
- hasBigImages(),
- rBox.GetSettings().GetStyleSettings().GetHighContrastMode() );
+ Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages() );
rBox.SetItemImage(GetId(), aImage);
rBox.SetItemImageMirrorMode( GetId(), sal_False );
rBox.SetItemImageAngle( GetId(), pItem->GetRotation() );
@@ -155,10 +127,6 @@ void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/,
}
}
-/**********************************************************************
-
-**********************************************************************/
-
SfxPopupWindow* SwTbxInsertCtrl::CreatePopupWindow()
{
@@ -175,22 +143,12 @@ SfxPopupWindow* SwTbxInsertCtrl::CreatePopupWindow()
return NULL;
}
-/**********************************************************************
-
-**********************************************************************/
-
-
SfxPopupWindowType SwTbxInsertCtrl::GetPopupWindowType() const
{
return nLastSlotId ? SFX_POPUPWINDOW_ONTIMEOUT : SFX_POPUPWINDOW_ONCLICK;
}
-/**********************************************************************
-
-**********************************************************************/
-
-
void SwTbxInsertCtrl::Select( sal_Bool /*bMod1*/ )
{
if( nLastSlotId )
@@ -210,11 +168,6 @@ void SwTbxInsertCtrl::Select( sal_Bool /*bMod1*/ )
}
}
-/**********************************************************************
-
-**********************************************************************/
-
-
SwTbxAutoTextCtrl::SwTbxAutoTextCtrl(
sal_uInt16 nSlotId,
sal_uInt16 nId,
@@ -225,21 +178,12 @@ SwTbxAutoTextCtrl::SwTbxAutoTextCtrl(
{
rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
}
-/**********************************************************************
-
-**********************************************************************/
-
SwTbxAutoTextCtrl::~SwTbxAutoTextCtrl()
{
DelPopup();
}
-/**********************************************************************
-
-**********************************************************************/
-
-
SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow()
{
pView = ::GetActiveView();
@@ -315,21 +259,11 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow()
}
-/**********************************************************************
-
-**********************************************************************/
-
-
SfxPopupWindowType SwTbxAutoTextCtrl::GetPopupWindowType() const
{
return SFX_POPUPWINDOW_ONTIMEOUT;
}
-/**********************************************************************
-
-**********************************************************************/
-
-
void SwTbxAutoTextCtrl::StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState )
@@ -341,11 +275,6 @@ void SwTbxAutoTextCtrl::StateChanged( sal_uInt16 nSID,
}
}
-/**********************************************************************
-
-**********************************************************************/
-
-
IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu)
{
sal_uInt16 nId = pMenu->GetCurItemId();
@@ -393,7 +322,7 @@ IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu)
SwGlossaryHdl* pGlosHdl = pView->GetGlosHdl();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( sGroup );
@@ -403,11 +332,6 @@ IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu)
return 0;
}
-/**********************************************************************
-
-**********************************************************************/
-
-
void SwTbxAutoTextCtrl::DelPopup()
{
if(pPopup)
@@ -425,11 +349,9 @@ void SwTbxAutoTextCtrl::DelPopup()
}
}
-/*-----------------19.02.97 10.52-------------------
- Navigations-Popup
---------------------------------------------------*/
+/* Navigations-Popup */
// determine the order of the toolbox items
-static sal_uInt16 __READONLY_DATA aNavigationInsertIds[ NAVI_ENTRIES ] =
+static sal_uInt16 aNavigationInsertIds[ NAVI_ENTRIES ] =
{
// -- first line
NID_TBL,
@@ -454,7 +376,7 @@ static sal_uInt16 __READONLY_DATA aNavigationInsertIds[ NAVI_ENTRIES ] =
NID_TABLE_FORMULA_ERROR,
NID_NEXT
};
-static const char* __READONLY_DATA aNavigationHelpIds[ NAVI_ENTRIES ] =
+static const char* aNavigationHelpIds[ NAVI_ENTRIES ] =
{
// -- first line
HID_NID_TBL,
@@ -486,7 +408,6 @@ SwScrollNaviPopup::SwScrollNaviPopup( sal_uInt16 nId, const Reference< XFrame >&
aSeparator(this, SW_RES(FL_SEP)),
aInfoField(this, SW_RES(FI_INFO)),
aIList(SW_RES(IL_VALUES)),
- aIListH(SW_RES(ILH_VALUES)),
nFwdId(FN_START_OF_NEXT_PAGE),
nBackId(FN_START_OF_PREV_PAGE)
{
@@ -545,16 +466,11 @@ SwScrollNaviPopup::SwScrollNaviPopup( sal_uInt16 nId, const Reference< XFrame >&
aToolBox.StartSelection();
aToolBox.Show();
}
-/*-----------------19.02.97 12.45-------------------
-
---------------------------------------------------*/
SwScrollNaviPopup::~SwScrollNaviPopup()
{
}
-/* -----------------------------08.05.2002 14:00------------------------------
- ---------------------------------------------------------------------------*/
void SwScrollNaviPopup::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
@@ -563,32 +479,22 @@ void SwScrollNaviPopup::DataChanged( const DataChangedEvent& rDCEvt )
Window::DataChanged( rDCEvt );
}
-/* -----------------------------08.05.2002 14:02------------------------------
- ---------------------------------------------------------------------------*/
void SwScrollNaviPopup::ApplyImageList()
{
- ImageList& rImgLst = aToolBox.GetSettings().GetStyleSettings().GetHighContrastMode() ?
- aIListH : aIList;
+ ImageList& rImgLst = aIList;
for(sal_uInt16 i = 0; i < NID_COUNT; i++)
{
sal_uInt16 nNaviId = aNavigationInsertIds[i];
aToolBox.SetItemImage(nNaviId, rImgLst.GetImage(nNaviId));
}
}
-/*-----------------19.02.97 13.58-------------------
-
---------------------------------------------------*/
SfxPopupWindow* SwScrollNaviPopup::Clone() const
{
return new SwScrollNaviPopup( GetId(), GetFrame() );
}
-/*-----------------19.02.97 14.10-------------------
-
---------------------------------------------------*/
-
IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet)
{
sal_uInt16 nSet = pSet->GetCurItemId();
@@ -619,9 +525,6 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet)
}
return 0;
}
-/*-----------------23.02.97 18.21-------------------
-
---------------------------------------------------*/
void SwScrollNaviToolBox::MouseButtonUp( const MouseEvent& rMEvt )
{
@@ -630,9 +533,6 @@ void SwScrollNaviToolBox::MouseButtonUp( const MouseEvent& rMEvt )
((SwScrollNaviPopup*)GetParent())->EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL );
}
-/*-----------------20.06.97 13:28-------------------
-
---------------------------------------------------*/
void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt )
{
SetItemText(NID_NEXT, SwScrollNaviPopup::GetQuickHelpText(sal_True));
@@ -641,9 +541,6 @@ void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt )
}
-/*-----------------20.06.97 13:41-------------------
-
---------------------------------------------------*/
String SwScrollNaviPopup::GetQuickHelpText(sal_Bool bNext)
{
sal_uInt16 nResId = STR_IMGBTN_START;
@@ -652,17 +549,12 @@ String SwScrollNaviPopup::GetQuickHelpText(sal_Bool bNext)
nResId += NID_COUNT;
return String(SW_RES(nResId));
}
-/* -----------------------------05.09.2002 13:53------------------------------
- ---------------------------------------------------------------------------*/
void SwNaviImageButton::Click()
{
-// SfxBindings& rBind = SfxViewFrame::Current()->GetBindings();
-// rBind.ENTERREGISTRATIONS();
pPopup = new
SwScrollNaviPopup( FN_SCROLL_NAVIGATION,
m_xFrame );
-// rBind.LEAVEREGISTRATIONS();
Point aPos = OutputToScreenPixel(Point(0,0));
Rectangle aRect(aPos, GetSizePixel());
SetPopupWindow( pPopup );
@@ -711,10 +603,6 @@ IMPL_LINK( SwNaviImageButton, ClosePopupWindow, SfxPopupWindow *, pWindow )
return 1;
}
-/*-----------------21.02.97 09:41-------------------
-
---------------------------------------------------*/
-
void SwHlpImageButton::RequestHelp( const HelpEvent& rHEvt )
{
@@ -723,17 +611,12 @@ void SwHlpImageButton::RequestHelp( const HelpEvent& rHEvt )
ImageButton::RequestHelp(rHEvt);
}
-/*-----------------25.02.97 12:38-------------------
-
---------------------------------------------------*/
-
SwNaviImageButton::SwNaviImageButton(
Window* pParent,
const Reference< XFrame >& rFrame ) :
ImageButton(pParent, SW_RES(BTN_NAVI)),
pPopup(0),
aImage(SW_RES(IMG_BTN)),
- aImageH(SW_RES(IMG_BTN_H)),
sQuickText(SW_RES(ST_QUICK)),
pPopupWindow(0),
pFloatingWindow(0),
@@ -742,22 +625,18 @@ SwNaviImageButton::SwNaviImageButton(
FreeResource();
SetStyle(GetStyle()|WB_NOPOINTERFOCUS);
SetQuickHelpText(sQuickText);
- SetModeImage( GetSettings().GetStyleSettings().GetHighContrastMode() ? aImageH : aImage);
+ SetModeImage( aImage );
}
-/* -----------------------------2002/07/05 9:41-------------------------------
- ---------------------------------------------------------------------------*/
void SwNaviImageButton::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
- SetModeImage( GetSettings().GetStyleSettings().GetHighContrastMode() ? aImageH : aImage);
+ SetModeImage( aImage );
Window::DataChanged( rDCEvt );
}
-/* -----------------26.11.2002 09:28-----------------
- *
- * --------------------------------------------------*/
+
class SwZoomBox_Impl : public ComboBox
{
sal_uInt16 nSlotId;
@@ -778,9 +657,7 @@ protected:
void ReleaseFocus();
};
-/* -----------------26.11.2002 09:29-----------------
- *
- * --------------------------------------------------*/
+
SwZoomBox_Impl::SwZoomBox_Impl(
Window* pParent,
sal_uInt16 nSlot,
@@ -800,14 +677,10 @@ SwZoomBox_Impl::SwZoomBox_Impl(
InsertEntry(sEntry);
}
}
-/* -----------------26.11.2002 09:29-----------------
- *
- * --------------------------------------------------*/
+
SwZoomBox_Impl::~SwZoomBox_Impl()
{}
-/* -----------------26.11.2002 09:34-----------------
- *
- * --------------------------------------------------*/
+
void SwZoomBox_Impl::Select()
{
if ( !IsTravelSelect() )
@@ -837,9 +710,7 @@ void SwZoomBox_Impl::Select()
ReleaseFocus();
}
}
-/* -----------------02.12.2002 07:49-----------------
- *
- * --------------------------------------------------*/
+
long SwZoomBox_Impl::Notify( NotifyEvent& rNEvt )
{
long nHandled = 0;
@@ -876,9 +747,7 @@ long SwZoomBox_Impl::Notify( NotifyEvent& rNEvt )
return nHandled ? nHandled : ComboBox::Notify( rNEvt );
}
-/* -----------------02.12.2002 07:51-----------------
- *
- * --------------------------------------------------*/
+
void SwZoomBox_Impl::ReleaseFocus()
{
if ( !bRelease )
@@ -897,9 +766,6 @@ void SwZoomBox_Impl::ReleaseFocus()
}
}
-/* -----------------26.11.2002 09:29-----------------
- *
- * --------------------------------------------------*/
SFX_IMPL_TOOLBOX_CONTROL( SwPreviewZoomControl, SfxUInt16Item);
SwPreviewZoomControl::SwPreviewZoomControl(
@@ -909,15 +775,11 @@ SwPreviewZoomControl::SwPreviewZoomControl(
SfxToolBoxControl( nSlotId, nId, rTbx )
{
}
-/* -----------------26.11.2002 09:29-----------------
- *
- * --------------------------------------------------*/
+
SwPreviewZoomControl::~SwPreviewZoomControl()
{
}
-/* -----------------26.11.2002 09:29-----------------
- *
- * --------------------------------------------------*/
+
void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* pState )
@@ -933,11 +795,11 @@ void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/,
pBox->SaveValue();
}
}
-/* -----------------26.11.2002 09:29-----------------
- *
- * --------------------------------------------------*/
+
Window* SwPreviewZoomControl::CreateItemWindow( Window *pParent )
{
SwZoomBox_Impl* pRet = new SwZoomBox_Impl( pParent, GetSlotId(), Reference< XDispatchProvider >( m_xFrame->getController(), UNO_QUERY ));
return pRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/ribbar/workctrl.hrc b/sw/source/ui/ribbar/workctrl.hrc
index 5e5180f363aa..51ac45b2ae87 100644
--- a/sw/source/ui/ribbar/workctrl.hrc
+++ b/sw/source/ui/ribbar/workctrl.hrc
@@ -37,9 +37,6 @@
#define ST_QUICK 7
#define FI_INFO 8
#define FL_SEP 9
-#define ILH_VALUES 10
-#define IMG_BTN_H 11
-
#define ST_TBL 12
#define ST_FRM 13
diff --git a/sw/source/ui/ribbar/workctrl.src b/sw/source/ui/ribbar/workctrl.src
index 4fff5c4a9260..ce0163974f6d 100644
--- a/sw/source/ui/ribbar/workctrl.src
+++ b/sw/source/ui/ribbar/workctrl.src
@@ -51,7 +51,6 @@ Menu RID_INSERT_FIELD_CTRL
HelpId = CMD_FN_INSERT_FLD_TIME ;
Text [ en-US ] = "Time" ;
};
- //#ifndef MN_SW_WEB
MenuItem
{
Identifier = FN_INSERT_FLD_PGNUMBER ;
@@ -76,7 +75,6 @@ Menu RID_INSERT_FIELD_CTRL
HelpId = CMD_FN_INSERT_FLD_TITLE ;
Text [ en-US ] = "Title" ;
};
- //#endif
MenuItem
{
Identifier = FN_INSERT_FLD_AUTHOR ;
@@ -134,12 +132,6 @@ FloatingWindow RID_SCROLL_NAVIGATION_WIN
MaskColor = IMAGE_MASK_COLOR ;
SCROLL_IMAGE_IDLIST
};
- ImageList ILH_VALUES
- {
- Prefix = "srh";
- MaskColor = IMAGE_MASK_COLOR ;
- SCROLL_IMAGE_IDLIST
- };
FixedLine FL_SEP
{
//no position, no text
@@ -189,7 +181,6 @@ FloatingWindow RID_SCROLL_NAVIGATION_WIN
};
String ST_OUTL
{
- /* ### ACHTUNG: Neuer Text in Resource? Überschrift : šberschrift */
Text [ en-US ] = "Headings" ;
};
String ST_SEL
@@ -198,7 +189,6 @@ FloatingWindow RID_SCROLL_NAVIGATION_WIN
};
String ST_FTN
{
- /* ### ACHTUNG: Neuer Text in Resource? Fußnote : Fu˜note */
Text [ en-US ] = "Footnote" ;
};
String ST_MARK
@@ -227,31 +217,6 @@ FloatingWindow RID_SCROLL_NAVIGATION_WIN
};
Text [ en-US ] = "Navigation" ;
};
-/*
-Noch ein paar Reserven
- ToolBoxItem
- {
- Identifier = NID_NEXT;
- Text = "Vorwärts" ;
- };
- ToolBoxItem
- {
- Identifier = NID_PREV;
- Text = "Rückwärts" ;
- };
- ToolBoxItem
- {
- Identifier = NID_CTRL;
- Text = "Control" ;
- };
- ToolBoxItem
- {
- Identifier = NID_DRW;
- Text = "Zeichenobjekt" ;
- };
-
-
-*/
/***************************************************************
Strings fuer die Quickhelp der View-PgUp/Down-Buttons
***************************************************************/
@@ -265,73 +230,58 @@ String STR_IMGBTN_PREV_DOWN
};
String STR_IMGBTN_TBL_DOWN
{
- /* ### 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 */
Text [ en-US ] = "Next text frame" ;
};
String STR_IMGBTN_PGE_DOWN
{
- /* ### 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 */
Text [ en-US ] = "Next drawing" ;
};
String STR_IMGBTN_CTRL_DOWN
{
- /* ### 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 */
Text [ en-US ] = "Next section" ;
};
String STR_IMGBTN_BKM_DOWN
{
- /* ### 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 */
Text [ en-US ] = "Next graphic" ;
};
String STR_IMGBTN_OLE_DOWN
{
- /* ### ACHTUNG: Neuer Text in Resource? Nächstes OLE-Objekt : Nächstes OLE object */
- /* ### 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 */
Text [ en-US ] = "Next heading" ;
};
String STR_IMGBTN_SEL_DOWN
{
- /* ### 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 */
Text [ en-US ] = "Next footnote" ;
};
String STR_IMGBTN_MARK_DOWN
{
- /* ### 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 */
Text [ en-US ] = "Next Note" ;
};
String STR_IMGBTN_SRCH_REP_DOWN
@@ -384,12 +334,10 @@ String STR_IMGBTN_GRF_UP
};
String STR_IMGBTN_OLE_UP
{
- /* ### ACHTUNG: Neuer Text in Resource? Voriges OLE-Objekt : Voriges OLE object */
Text [ en-US ] = "Previous OLE object" ;
};
String STR_IMGBTN_OUTL_UP
{
- /* ### ACHTUNG: Neuer Text in Resource? Vorige Überschrift : Vorige šberschrift */
Text [ en-US ] = "Previous heading" ;
};
String STR_IMGBTN_SEL_UP
@@ -398,7 +346,6 @@ String STR_IMGBTN_SEL_UP
};
String STR_IMGBTN_FTN_UP
{
- /* ### ACHTUNG: Neuer Text in Resource? Vorige Fußnote : Vorige Fu˜note */
Text [ en-US ] = "Previous footnote" ;
};
String STR_IMGBTN_MARK_UP
@@ -445,11 +392,6 @@ ImageButton BTN_NAVI
ImageBitmap = Bitmap { File = "punkt.bmp" ; };
MaskColor = IMAGE_MASK_COLOR ;
};
- Image IMG_BTN_H
- {
- ImageBitmap = Bitmap { File = "punkt_h.bmp" ; };
- MaskColor = IMAGE_MASK_COLOR ;
- };
String ST_QUICK
{
Text [ en-US ] = "Navigation" ;
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index 608c3e8afff0..fa80e015f081 100755..100644
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115,9 +116,7 @@
#include <editeng/editview.hxx>
#include <svl/languageoptions.hxx>
-#include <editeng/langitem.hxx>
#include <svtools/langtab.hxx>
-#include <svl/slstitm.hxx>
#include <docsh.hxx>
#include <svl/undo.hxx>
@@ -167,7 +166,7 @@ SwAnnotationShell::~SwAnnotationShell()
if ( !pPostItMgr ||
!pPostItMgr->HasActiveSidebarWin() )
{
- DBG_ASSERT(pPostItMgr,"PostItMgr::Layout(): We are looping forever");
+ OSL_ENSURE(pPostItMgr,"PostItMgr::Layout(): We are looping forever");
return 0;
}
return &pPostItMgr->GetActiveSidebarWin()->GetOutlinerView()->GetOutliner()->GetUndoManager();
@@ -372,10 +371,10 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
case FN_FORMAT_FOOTNOTE_DLG:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( rView.GetWindow(), rView.GetWrtShell(), DLG_DOC_FOOTNOTE );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
break;
@@ -384,10 +383,10 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
{
SfxItemSet aTmp(GetPool(), FN_PARAM_1, FN_PARAM_1);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_TAB_OUTLINE,
rView.GetWindow(), &aTmp, rView.GetWrtShell());
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
rReq.Done();
@@ -397,7 +396,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
{
try
{
- uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
+ uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY);
if( xDialog.is() )
{
xDialog->execute();
@@ -423,7 +422,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractSwWordCountDialog* pDialog = pFact->CreateSwWordCountDialog( rView.GetWindow() );
pDialog->SetValues(aCurr, aDocStat );
pDialog->Execute();
@@ -448,12 +447,11 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
aDlgAttr.Put( aEditAttr );
aDlgAttr.Put( SvxKerningItem(0, RES_CHRATR_KERNING) );
- //CHINA001 SwCharDlg* pDlg = new SwCharDlg(pView->GetWindow(), *pView, aDlgAttr, 0, sal_True);
- SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();//CHINA001
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");//CHINA001
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( rView.GetWindow(), rView, aDlgAttr, DLG_CHAR,0, sal_True );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet )
{
@@ -496,13 +494,12 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
aDlgAttr.Put( SvxWidowsItem( 0, RES_PARATR_WIDOWS ) );
aDlgAttr.Put( SvxOrphansItem( 0, RES_PARATR_ORPHANS ) );
- //CHINA001 SwParaDlg* pDlg = new SwParaDlg(GetView().GetWindow(), GetView(), aDlgAttr, DLG_STD, 0, sal_True);
- SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();//CHINA001
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");//CHINA001
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
{
@@ -903,7 +900,6 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet)
SvxClipboardFmtItem aFormats( SID_CLIPBOARD_FORMAT_ITEMS );
if ( aDataHelper.HasFormat( SOT_FORMAT_RTF ) )
aFormats.AddClipbrdFormat( SOT_FORMAT_RTF );
- //if ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) )
aFormats.AddClipbrdFormat( SOT_FORMAT_STRING );
rSet.Put( aFormats );
}
@@ -1024,15 +1020,6 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
break;
}
case FN_HIDE_NOTE:
- /*
- if ( Mgr()->GetActiveSidebarWin() == this )
- {
- Mgr()->SetActivePostIt(0);
- // put the cursor back into the document
- SwitchToFieldPos();
- }
- Mgr()->Hide(mpFld);
- */
break;
case FN_HIDE_ALL_NOTES:
pPostItMgr->Hide();
@@ -1164,7 +1151,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
{
Reference< ui::dialogs::XExecutableDialog > xDialog(
xMCF->createInstanceWithContext(
- rtl::OUString::createFromAscii("com.sun.star.linguistic2.ChineseTranslationDialog")
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ChineseTranslationDialog"))
, xContext), UNO_QUERY);
Reference< lang::XInitialization > xInit( xDialog, UNO_QUERY );
if( xInit.is() )
@@ -1174,7 +1161,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
Sequence<Any> aSeq(1);
Any* pArray = aSeq.getArray();
PropertyValue aParam;
- aParam.Name = rtl::OUString::createFromAscii("ParentWindow");
+ aParam.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow"));
aParam.Value <<= makeAny(xDialogParentWindow);
pArray[0] <<= makeAny(aParam);
xInit->initialize( aSeq );
@@ -1345,7 +1332,7 @@ void SwAnnotationShell::ExecTransliteration(SfxRequest &rReq)
break;
default:
- ASSERT(!this, "falscher Dispatcher");
+ OSL_ENSURE(!this, "wrong dispatcher");
}
if( nMode )
@@ -1680,3 +1667,5 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
rReq.Done();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 3c95ad5635d0..19667a21d70f 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,7 +120,6 @@
FlyMode SwBaseShell::eFrameMode = FLY_DRAG_END;
-
//Fuer die Erkennung der Id, die variable von Gallery mit SID_GALLERY_BG_BRUSH
//ankommt.
static sal_uInt8 nParagraphPos;
@@ -152,7 +152,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::lang;
-
SFX_IMPL_INTERFACE(SwBaseShell, SfxShell, SW_RES(0))
{
SFX_CHILDWINDOW_REGISTRATION(SvxIMapDlgChildWindow::GetChildWindowId());
@@ -164,8 +163,6 @@ TYPEINIT1(SwBaseShell,SfxShell)
/*--------------------------------------------------------------------
Beschreibung: statics
--------------------------------------------------------------------*/
-
-
void lcl_UpdateIMapDlg( SwWrtShell& rSh )
{
Graphic aGrf( rSh.GetIMapGraphic() );
@@ -181,16 +178,11 @@ void lcl_UpdateIMapDlg( SwWrtShell& rSh )
SvxIMapDlgChildWindow::UpdateIMapDlg(
aGrf, rURL.GetMap(), pList, pEditObj );
- sal_uInt16 nCount = (sal_uInt16)pList->Count();
- if(nCount)
- for( sal_uInt16 i = nCount; i; i-- )
- {
- delete pList->GetObject(i-1);
- }
+ for ( size_t i = 0, n = pList->size(); i < n; ++i )
+ delete pList->at( i );
delete pList;
}
-
sal_Bool lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
{
Graphic aGraf( rSh.GetIMapGraphic() );
@@ -212,7 +204,6 @@ sal_Bool lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
/*--------------------------------------------------------------------
Beschreibung: loeschen
--------------------------------------------------------------------*/
-
void SwBaseShell::ExecDelete(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
@@ -231,10 +222,6 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq)
sal_Bool bLeft = rSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False );
if( bLeft )
{
- // JP 28.03.96: ein Backspace im Absatz ohne Nummer wird zum Delete
- //rSh.SwapPam();
- //rSh.DelRight( sal_False );
-
rSh.DelLeft();
}
else
@@ -252,7 +239,7 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq)
rSh.DelLeft();
break;
default:
- DBG_ERROR("falscher Dispatcher");
+ OSL_ENSURE(false, "wrong Dispatcher");
return;
}
rReq.Done();
@@ -261,10 +248,6 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq)
rTmpEditWin.SetUseInputLanguage( sal_False );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
{
//Achtung: Suizid gefaehrdet! Nach Paste, Paste special kann der die
@@ -420,7 +403,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
}
break;
default:
- DBG_ERROR("falscher Dispatcher");
+ OSL_ENSURE(false, "wrong Dispatcher");
return;
}
if(!bIgnore)
@@ -430,7 +413,6 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
/*--------------------------------------------------------------------
Beschreibung: ClipBoard-Status
--------------------------------------------------------------------*/
-
void SwBaseShell::StateClpbrd(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
@@ -487,7 +469,6 @@ void SwBaseShell::StateClpbrd(SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: Undo ausfuehren
--------------------------------------------------------------------*/
-
void SwBaseShell::ExecUndo(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
@@ -519,7 +500,7 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
rSh.Do( SwWrtShell::REPEAT );
break;
default:
- DBG_ERROR("falscher Dispatcher");
+ OSL_ENSURE(false, "wrong Dispatcher");
}
if (pViewFrame) { pViewFrame->GetBindings().InvalidateAll(sal_False); }
@@ -528,7 +509,6 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
/*--------------------------------------------------------------------
Beschreibung: Zustand Undo
--------------------------------------------------------------------*/
-
void SwBaseShell::StateUndo(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
@@ -602,7 +582,6 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: Slot-Id auswerten bzw. Dispatchen
--------------------------------------------------------------------*/
-
void SwBaseShell::Execute(SfxRequest &rReq)
{
const SfxPoolItem *pItem;
@@ -765,22 +744,6 @@ void SwBaseShell::Execute(SfxRequest &rReq)
{
const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGal->GetURL().GetMainURL( INetURLObject::NO_DECODE ) );
GetView().GetViewFrame()->GetDispatcher()->Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON, &aMediaURLItem, 0L );
-/*
- String sURL( pGal->GetURL().GetMainURL( INetURLObject::NO_DECODE ) );
- String sLabel( pGal->GetURL().getBase() );
- String sTarget; // empty string!
-
- bool bIsHTMLMode =
- 0 == ( HTMLMODE_ON &
- ::GetHtmlMode( GetView().GetDocShell() ) );
-
- // in Writer, we insert a button which plays the
- // sound. In Writer/Web, we just insert a (text) link.
- if( bIsHTMLMode )
- InsertURLButton( sURL, sTarget, sLabel );
- else
- rSh.InsertURL( SwFmtINetFmt( sURL, sTarget ), sLabel );
-*/
}
}
}
@@ -875,11 +838,11 @@ void SwBaseShell::Execute(SfxRequest &rReq)
else
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwConvertTableDlg* pDlg = pFact->CreateSwConvertTableDlg(
GetView(),DLG_CONV_TEXT_TABLE , bToTable);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute() )
{
pDlg->GetValues( cDelim, aInsTblOpts, pTAFmt );
@@ -1182,7 +1145,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
static_cast<const SfxBoolItem*>( pItem )->GetValue();
// set form design mode
- DBG_ASSERT( GetView().GetFormShell() != NULL, "form shell?" );
+ OSL_ENSURE( GetView().GetFormShell() != NULL, "form shell?" );
SfxRequest aReq( GetView().GetViewFrame(), SID_FM_DESIGN_MODE );
aReq.AppendItem( SfxBoolItem( SID_FM_DESIGN_MODE, bDesignMode ) );
GetView().GetFormShell()->Execute( aReq );
@@ -1241,7 +1204,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
case FN_PAGE_STYLE_SET_PAPER_SIZE:
case FN_PAGE_STYLE_SET_PAPER_BIN:
{
- DBG_ERROR("not implemented");
+ OSL_ENSURE(false, "not implemented");
}
break;
@@ -1268,13 +1231,13 @@ void SwBaseShell::Execute(SfxRequest &rReq)
}
break;
default:
- DBG_ERROR("falscher Dispatcher");
+ OSL_ENSURE(false, "wrong Dispatcher");
}
}
}
-/* -----------------14.04.99 15:10-------------------
+/* --------------------------------------------------
* Hier wird der State fuer SID_IMAP / SID_CONTOUR behandelt,
* wenn die Grafik ausgeswappt ist
* --------------------------------------------------*/
@@ -1820,8 +1783,6 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
/*--------------------------------------------------------------------
Beschreibung: Slots mit dieser Statusmethode disablen
--------------------------------------------------------------------*/
-
-
void SwBaseShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
@@ -1837,8 +1798,6 @@ void SwBaseShell::StateDisableItems( SfxItemSet &rSet )
/*--------------------------------------------------------------------
Beschreibung: Slots mit dieser Statusmethode disablen
--------------------------------------------------------------------*/
-
-
void SwBaseShell::StateStyle( SfxItemSet &rSet )
{
sal_Bool bParentCntProt = GetShell().IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
@@ -1863,11 +1822,6 @@ void SwBaseShell::StateStyle( SfxItemSet &rSet )
GetView().GetDocShell()->StateStyleSheet(rSet, &GetShell());
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
{
SwWrtShell &rSh = GetShell();
@@ -1959,7 +1913,6 @@ void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
/*--------------------------------------------------------------------
Beschreibung: Update der Statuszeile erzwingen
--------------------------------------------------------------------*/
-
void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh )
{
eFrameMode = eMode;
@@ -1975,7 +1928,7 @@ void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh )
}
else if( eMode == FLY_DRAG_END )
{
- static sal_uInt16 __READONLY_DATA aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_POSITION, SID_ATTR_SIZE, 0
};
@@ -1986,7 +1939,6 @@ void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh )
/*--------------------------------------------------------------------
Beschreibung: Ctor
--------------------------------------------------------------------*/
-
SwBaseShell::SwBaseShell(SwView& rVw) :
SfxShell( &rVw ),
rView(rVw),
@@ -1999,7 +1951,6 @@ SwBaseShell::SwBaseShell(SwView& rVw) :
rWrtSh.SetGrfArrivedLnk( LINK( this, SwBaseShell, GraphicArrivedHdl));
}
-
SwBaseShell::~SwBaseShell()
{
if( rView.GetCurShell() == this )
@@ -2010,10 +1961,6 @@ SwBaseShell::~SwBaseShell()
rView.GetWrtShell().SetGrfArrivedLnk( Link() );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
{
const SfxItemSet *pArgs = rReq.GetArgs();
@@ -2139,10 +2086,6 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
rReq.Done();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwBaseShell::GetTxtCtrlState( SfxItemSet& rSet )
{
SwWrtShell &rSh = GetShell();
@@ -2229,10 +2172,6 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
delete pFntCoreSet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwBaseShell::GetBckColState(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
@@ -2240,7 +2179,6 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet)
sal_uInt16 nWhich = aIter.FirstWhich();
int nSelType = rSh.GetSelectionType();
-// if ( nSelType & nsSelectionType::SEL_GRF ||
if( nSelType & nsSelectionType::SEL_OLE )
{
rSet.DisableItem( SID_BACKGROUND_COLOR );
@@ -2290,10 +2228,6 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwBaseShell::ExecBckCol(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
@@ -2324,8 +2258,6 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND);
}
-// sal_Bool bMsgOk = sal_False;
-
switch (nSlot)
{
// RES_BACKGROUND (=SID_ATTR_BRUSH) muss ueber zwei IDs
@@ -2334,7 +2266,6 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
{
aBrushItem.SetGraphicPos(GPOS_NONE);
- //Brush &rBrush = aBrushItem.GetBrush();
if(pArgs)
{
const SvxColorItem& rNewColorItem = (const SvxColorItem&)
@@ -2360,9 +2291,8 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
}
break;
default:
-// bMsgOk = sal_False;
rReq.Ignore();
- DBG_ERROR( "Unbekannte Message bei ExecuteAttr!" );
+ OSL_ENSURE(false, "unknown message in ExecuteAttr!" );
return;
}
@@ -2398,11 +2328,6 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
rReq.Done();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwBaseShell::GetBorderState(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
@@ -2434,11 +2359,6 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet)
rSet.Put( SfxBoolItem( SID_BORDER_REDUCED_MODE, !bTableMode ));
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwBaseShell::ExecDlg(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
@@ -2456,6 +2376,14 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
switch ( nSlot )
{
+ case FN_FORMAT_TITLEPAGE_DLG:
+ {
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+ VclAbstractDialog* pDlg = pFact->CreateTitlePageDlg( pMDI );
+ pDlg->Execute();
+ delete pDlg;
+ }
+ break;
case FN_FORMAT_PAGE_COLUMN_DLG:
case FN_FORMAT_PAGE_DLG:
{
@@ -2487,10 +2415,10 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
::PrepareBoxInfo( aSet, rSh );
rSh.GetTabBorders( aSet );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pDlg = pFact->CreateSwBorderDlg( pMDI, aSet, SW_BORDER_MODE_TABLE, RC_DLG_SWBORDERDLG );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() == RET_OK )
{
rSh.SetTabBorders( *pDlg->GetOutputItemSet() );
@@ -2504,10 +2432,10 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
aSet.Put( aMgr.GetAttrSet() );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pDlg = pFact->CreateSwBorderDlg( pMDI, aSet, SW_BORDER_MODE_FRAME, RC_DLG_SWBORDERDLG );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() == RET_OK )
{
aMgr.SetAttrSet( *pDlg->GetOutputItemSet() );
@@ -2522,10 +2450,10 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
::PrepareBoxInfo( aSet, rSh );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pDlg = pFact->CreateSwBorderDlg( pMDI, aSet, SW_BORDER_MODE_PARA, RC_DLG_SWBORDERDLG );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() == RET_OK )
{
rSh.SetAttr( *pDlg->GetOutputItemSet() );
@@ -2547,7 +2475,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
SfxAbstractDialog * pDlg = 0;
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
// Tabellenzelle(n) selektiert?
@@ -2559,11 +2487,10 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
pDlg = pFact->CreateSfxDialog( pMDI, aSet,
rView.GetViewFrame()->GetFrame().GetFrameInterface(),
RC_SWDLG_BACKGROUND );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
aSet.Put( aBrush );
if ( pDlg->Execute() == RET_OK )
{
- //aBrush = (SvxBrushItem) pDlg->GetOutputItemSet()->Get( RES_BACKGROUND );
rSh.SetBoxBackground( (SvxBrushItem&)
pDlg->GetOutputItemSet()->Get( RES_BACKGROUND ));
@@ -2578,7 +2505,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
pDlg = pFact->CreateSfxDialog( pMDI, aSet,
rView.GetViewFrame()->GetFrame().GetFrameInterface(),
RC_SWDLG_BACKGROUND );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() == RET_OK )
{
rSh.SetFlyFrmAttr((SfxItemSet &) *pDlg->GetOutputItemSet() );
@@ -2593,7 +2520,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
pDlg = pFact->CreateSfxDialog( pMDI, aSet,
rView.GetViewFrame()->GetFrame().GetFrameInterface(),
RC_SWDLG_BACKGROUND );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() == RET_OK )
{
rSh.SetAttr( *pDlg->GetOutputItemSet() );
@@ -2609,29 +2536,22 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
}
break;
- default:DBG_ERROR("falscher Dispatcher (basesh.cxx)");
+ default:OSL_ENSURE(false, "wrong Dispatcher (basesh.cxx)");
}
if(!bDone)
rReq.Done();
}
-// ----------------------------------------------------------------------------
-
-
SwWrtShell& SwBaseShell::GetShell()
{
return rView.GetWrtShell();
}
-// ----------------------------------------------------------------------------
-
SwWrtShell* SwBaseShell::GetShellPtr()
{
return rView.GetWrtShellPtr();
}
-// ----------------------------------------------------------------------------
-
void SwBaseShell::InsertTable( SfxRequest& _rRequest )
{
const SfxItemSet* pArgs = _rRequest.GetArgs();
@@ -2710,9 +2630,9 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
if( !nCols || !nRows )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractInsTableDlg* pDlg = pFact->CreateInsTableDlg( DLG_INSERT_TABLE, rTempView );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute() )
{
pDlg->GetValues( aTableName, nRows, nCols, aInsTblOpts, aAutoName, pTAFmt );
@@ -2768,8 +2688,6 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
}
}
-// ----------------------------------------------------------------------------
-
void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
{
SwWrtShell &rSh = GetShell();
@@ -2850,7 +2768,6 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
}
}
-
void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
@@ -2919,16 +2836,17 @@ void SwBaseShell::ExecField( SfxRequest& rReq )
case FN_CHANGE_DBFIELD:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
VclAbstractDialog* pDlg = pFact->CreateSwChangeDBDlg(GetView(), DLG_CHANGE_DB );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
}
break;
default:
- ASSERT(sal_False, falscher Dispatcher);
+ OSL_ENSURE(false, "wrong dispatcher");
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/beziersh.cxx b/sw/source/ui/shells/beziersh.cxx
index ce3f3c9cc1f6..2b047d644c19 100644
--- a/sw/source/ui/shells/beziersh.cxx
+++ b/sw/source/ui/shells/beziersh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,7 +55,6 @@
#include <unomid.h>
-
SFX_IMPL_INTERFACE(SwBezierShell, SwBaseShell, SW_RES(STR_SHELLNAME_BEZIER))
{
SFX_POPUPMENU_REGISTRATION(SW_RES(MN_DRAW_POPUPMENU));
@@ -63,11 +63,6 @@ SFX_IMPL_INTERFACE(SwBezierShell, SwBaseShell, SW_RES(STR_SHELLNAME_BEZIER))
TYPEINIT1(SwBezierShell,SwBaseShell)
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwBezierShell::SwBezierShell(SwView &_rView):
SwBaseShell( _rView )
{
@@ -79,11 +74,6 @@ SwBezierShell::SwBezierShell(SwView &_rView):
pSdrView->SetEliminatePolyPointLimitAngle(1500L);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwBezierShell::Execute(SfxRequest &rReq)
{
SwWrtShell *pSh = &GetShell();
@@ -140,7 +130,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
case SID_BEZIER_INSERT:
{
GetView().GetEditWin().SetBezierMode(nSlotId);
- static sal_uInt16 __READONLY_DATA aInva[] =
+ static sal_uInt16 aInva[] =
{
SID_BEZIER_INSERT,
SID_BEZIER_MOVE,
@@ -200,7 +190,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
{
pSdrView->SetMarkedPointsSmooth(eKind);
- static sal_uInt16 __READONLY_DATA aInva[] =
+ static sal_uInt16 aInva[] =
{
SID_BEZIER_SMOOTH,
SID_BEZIER_EDGE,
@@ -239,11 +229,6 @@ void SwBezierShell::Execute(SfxRequest &rReq)
pSdrView->GetModel()->SetChanged(sal_True);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwBezierShell::GetState(SfxItemSet &rSet)
{
SdrView* pSdrView = GetShell().GetDrawView();
@@ -352,5 +337,4 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
}
}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/drawdlg.cxx b/sw/source/ui/shells/drawdlg.cxx
index 7798c49ac119..997da1784e0a 100644
--- a/sw/source/ui/shells/drawdlg.cxx
+++ b/sw/source/ui/shells/drawdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,15 +30,8 @@
#include "precompiled_sw.hxx"
-
-
-
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/request.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/svdview.hxx>
@@ -55,11 +49,6 @@
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
{
SwWrtShell* pSh = &GetShell();
@@ -104,12 +93,12 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
sal_Bool bHasMarked = pView->AreObjectsMarked();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet Factory fail!");
+ OSL_ENSURE(pFact, "Dialogdiet Factory fail!");
AbstractSvxAreaTabDialog * pDlg = pFact->CreateSvxAreaTabDialog( NULL,
&aNewAttr,
pDoc,
pView);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
const SvxColorTableItem* pColorItem = (const SvxColorTableItem*)
GetView().GetDocShell()->GetItem(SID_COLOR_TABLE);
if(pColorItem->GetColorTable() == XColorTable::GetStdColorTable())
@@ -123,7 +112,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), sal_False);
pSh->EndAction();
- static sal_uInt16 __READONLY_DATA aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_FILL_STYLE, SID_ATTR_FILL_COLOR, 0
};
@@ -146,13 +135,13 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet Factory fail!");
+ OSL_ENSURE(pFact, "Dialogdiet Factory fail!");
SfxAbstractTabDialog * pDlg = pFact->CreateSvxLineTabDialog( NULL,
&aNewAttr,
pDoc,
pObj,
bHasMarked);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if (pDlg->Execute() == RET_OK)
{
pSh->StartAction();
@@ -162,7 +151,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), sal_False);
pSh->EndAction();
- static sal_uInt16 __READONLY_DATA aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_LINE_STYLE, SID_ATTR_LINE_WIDTH,
SID_ATTR_LINE_COLOR, 0
@@ -186,11 +175,6 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
pDoc->SetChanged(sal_True);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
{
SwWrtShell* pSh = &GetShell();
@@ -235,11 +219,6 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
pView->GetModel()->SetChanged(sal_True);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet)
{
SdrView* pSdrView = GetShell().GetDrawView();
@@ -255,5 +234,4 @@ void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet)
rSet.Put(pSdrView->GetDefaultAttr());
}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx
index dd632b66edcb..483db1b7f08b 100644
--- a/sw/source/ui/shells/drawsh.cxx
+++ b/sw/source/ui/shells/drawsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,7 +69,7 @@
#define SwDrawShell
#include <sfx2/msg.hxx>
#include "swslots.hxx"
-#include "swabstdlg.hxx" //CHINA001
+#include "swabstdlg.hxx"
#include "misc.hrc"
using namespace ::com::sun::star;
@@ -83,11 +84,6 @@ SFX_IMPL_INTERFACE(SwDrawShell, SwDrawBaseShell, SW_RES(STR_SHELLNAME_DRAW))
TYPEINIT1(SwDrawShell,SwDrawBaseShell)
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwDrawShell::Execute(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
@@ -197,10 +193,10 @@ void SwDrawShell::Execute(SfxRequest &rReq)
case FN_FORMAT_FOOTNOTE_DLG:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( GetView().GetWindow(), GetView().GetWrtShell(), DLG_DOC_FOOTNOTE );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
break;
@@ -209,10 +205,10 @@ void SwDrawShell::Execute(SfxRequest &rReq)
{
SfxItemSet aTmp(GetPool(), FN_PARAM_1, FN_PARAM_1);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_TAB_OUTLINE,
GetView().GetWindow(), &aTmp, GetView().GetWrtShell());
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
rReq.Done();
@@ -222,7 +218,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
{
try
{
- uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
+ uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY);
if( xDialog.is() )
{
xDialog->execute();
@@ -247,7 +243,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractSwWordCountDialog* pDialog = pFact->CreateSwWordCountDialog( GetView().GetWindow() );
pDialog->SetValues(aCurr, aDocStat );
pDialog->Execute();
@@ -289,7 +285,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
break;
default:
- DBG_ASSERT(!this, "falscher Dispatcher");
+ OSL_ENSURE(!this, "wrong dispatcher");
return;
}
if (pSdrView->GetModel()->IsChanged())
@@ -298,12 +294,6 @@ void SwDrawShell::Execute(SfxRequest &rReq)
pSdrView->GetModel()->SetChanged(sal_True);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
void SwDrawShell::GetState(SfxItemSet& rSet)
{
SwWrtShell &rSh = GetShell();
@@ -377,12 +367,6 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
svx::FontworkBar::getState( pSdrView, rSet );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
SwDrawShell::SwDrawShell(SwView &_rView) :
SwDrawBaseShell(_rView)
{
@@ -395,9 +379,6 @@ SwDrawShell::SwDrawShell(SwView &_rView) :
|* SfxRequests fuer FontWork bearbeiten
|*
\************************************************************************/
-
-
-
void SwDrawShell::ExecFormText(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
@@ -449,9 +430,6 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq)
|* Statuswerte fuer FontWork zurueckgeben
|*
\************************************************************************/
-
-
-
void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
{
SwWrtShell &rSh = GetShell();
@@ -492,6 +470,4 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
}
}
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/drformsh.cxx b/sw/source/ui/shells/drformsh.cxx
index 13b1f1059b8d..fca6bb3aaf07 100644
--- a/sw/source/ui/shells/drformsh.cxx
+++ b/sw/source/ui/shells/drformsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,7 +120,7 @@ void SwDrawFormShell::Execute(SfxRequest &rReq)
{
uno::Reference< awt::XControlModel > xControlModel = pUnoCtrl->GetUnoControlModel();
- ASSERT( xControlModel.is(), "UNO-Control ohne Model" );
+ OSL_ENSURE( xControlModel.is(), "UNO-Control without Model" );
if( !xControlModel.is() )
return;
@@ -169,7 +170,7 @@ void SwDrawFormShell::Execute(SfxRequest &rReq)
break;
default:
- DBG_ASSERT(!this, "falscher Dispatcher");
+ OSL_ENSURE(!this, "wrong dispatcher");
return;
}
}
@@ -196,7 +197,7 @@ void SwDrawFormShell::GetState(SfxItemSet& rSet)
{
uno::Reference< awt::XControlModel > xControlModel = pUnoCtrl->GetUnoControlModel();
- ASSERT( xControlModel.is(), "UNO-Control ohne Model" );
+ OSL_ENSURE( xControlModel.is(), "UNO-Control without Model" );
if( !xControlModel.is() )
return;
@@ -274,3 +275,4 @@ SwDrawFormShell::~SwDrawFormShell()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx
index 70aba0ae2a8f..9a03c26a19f8 100644
--- a/sw/source/ui/shells/drwbassh.cxx
+++ b/sw/source/ui/shells/drwbassh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,11 +86,6 @@ SFX_IMPL_INTERFACE(SwDrawBaseShell, SwBaseShell, SW_RES(0))
TYPEINIT1(SwDrawBaseShell,SwBaseShell)
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwDrawBaseShell::SwDrawBaseShell(SwView &_rView):
SwBaseShell( _rView )
{
@@ -105,11 +101,6 @@ SwDrawBaseShell::SwDrawBaseShell(SwView &_rView):
SwTransferable::CreateSelection( GetShell() );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwDrawBaseShell::~SwDrawBaseShell()
{
GetView().ExitDraw();
@@ -117,11 +108,6 @@ SwDrawBaseShell::~SwDrawBaseShell()
SwTransferable::ClearSelection( GetShell() );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwDrawBaseShell::Execute(SfxRequest &rReq)
{
SwWrtShell *pSh = &GetShell();
@@ -137,7 +123,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
//Sonderfall Align per Menue
if(pItem && nSlotId == SID_OBJECT_ALIGN)
{
- DBG_ASSERT(PTR_CAST(SfxEnumItem, pItem),"SfxEnumItem erwartet");
+ OSL_ENSURE(PTR_CAST(SfxEnumItem, pItem),"SfxEnumItem expected");
nSlotId = nSlotId + ((const SfxEnumItem*)pItem)->GetValue();
nSlotId++;
}
@@ -174,10 +160,10 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
pSh->GetObjAttr(aSet);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
SfxAbstractDialog* pDlg = pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh, sal_True, RC_DLG_SWWRAPDLG );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if (pDlg->Execute() == RET_OK)
{
@@ -236,7 +222,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
pFact->CreateCaptionDialog( NULL, pSdrView, nAllowedAnchors );
pCaptionDlg->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) );
pDlg = pCaptionDlg;
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
}
}
else
@@ -249,7 +235,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
pFact->CreateSvxTransformTabDialog( NULL, NULL, pSdrView, nAllowedAnchors );
pTransform->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) );
pDlg = pTransform;
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
}
}
SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked());
@@ -422,7 +408,6 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{
pSh->LeaveSelFrmMode();
// #105852# FME
-// pSh->NoEdit();
}
bNotify = sal_True;
}
@@ -616,7 +601,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
}
default:
- DBG_ASSERT(!this, "falscher Dispatcher");
+ OSL_ENSURE(!this, "wrong Dispatcher");
return;
}
if(!bDone)
@@ -632,6 +617,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
GetView().AttrChangedNotify(pSh); // ggf Shellwechsel...
}
}
+
/* -----------------------------27.02.2002 15:27------------------------------
Checks whether a given name is allowed for a group shape
---------------------------------------------------------------------------*/
@@ -640,7 +626,7 @@ IMPL_LINK( SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxNameDialog*, pNam
SwWrtShell &rSh = GetShell();
SdrView *pSdrView = rSh.GetDrawView();
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
- DBG_ASSERT(rMarkList.GetMarkCount() == 1, "wrong draw selection");
+ OSL_ENSURE(rMarkList.GetMarkCount() == 1, "wrong draw selection");
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
const String sCurrentName = pObj->GetName();
String sNewName;
@@ -652,19 +638,6 @@ IMPL_LINK( SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxNameDialog*, pNam
{
nRet = 1;
SdrModel* pModel = rSh.getIDocumentDrawModelAccess()->GetDrawModel();
- // --> OD 2006-03-09 #i51726# - all drawing objects can be named now.
- // consider also drawing objects inside group objects
-// SdrPage* pPage = pModel->GetPage(0);
-// sal_uInt32 nCount = pPage->GetObjCount();
-// for( sal_uInt32 i=0; i< nCount; i++ )
-// {
-// SdrObject* pTemp = pPage->GetObj(i);
-// if(pObj != pTemp && pTemp->ISA(SdrObjGroup) && pTemp->GetName() == sNewName)
-// {
-// nRet = 0;
-// break;
-// }
-// }
SdrObjListIter aIter( *(pModel->GetPage(0)), IM_DEEPWITHGROUPS );
while( aIter.IsMore() )
{
@@ -679,9 +652,7 @@ IMPL_LINK( SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxNameDialog*, pNam
}
return nRet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
+
void SwDrawBaseShell::GetState(SfxItemSet& rSet)
{
SwWrtShell &rSh = GetShell();
@@ -774,11 +745,6 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
sal_Bool SwDrawBaseShell::Disable(SfxItemSet& rSet, sal_uInt16 nWhich)
{
sal_Bool bDisable = GetShell().IsSelObjProtected(FLYPROTECT_CONTENT);
@@ -995,6 +961,4 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
return 0;
}
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index c9381d68db04..17499ed667c9 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,7 +48,6 @@
#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,18 +63,13 @@
#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 <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>
@@ -86,26 +81,6 @@
#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>
@@ -132,14 +107,8 @@
#include "misc.hrc"
-#include <langhelper.hxx>
-
using namespace ::com::sun::star;
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDrawTextShell::Execute( SfxRequest &rReq )
{
SwWrtShell &rSh = GetShell();
@@ -317,10 +286,10 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
aDlgAttr.Put( SvxKerningItem(0, RES_CHRATR_KERNING) );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( pView->GetWindow(), *pView, aDlgAttr, DLG_CHAR,0, sal_True );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet )
{
@@ -338,10 +307,10 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
case FN_FORMAT_FOOTNOTE_DLG:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( GetView().GetWindow(), rView.GetWrtShell(), DLG_DOC_FOOTNOTE );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
break;
@@ -350,10 +319,10 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
{
SfxItemSet aTmp(GetPool(), FN_PARAM_1, FN_PARAM_1);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_TAB_OUTLINE,
GetView().GetWindow(), &aTmp, GetView().GetWrtShell());
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
rReq.Done();
@@ -363,7 +332,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
{
try
{
- uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
+ uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY);
if( xDialog.is() )
{
xDialog->execute();
@@ -388,7 +357,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractSwWordCountDialog* pDialog = pFact->CreateSwWordCountDialog( GetView().GetWindow() );
pDialog->SetValues(aCurr, aDocStat );
pDialog->Execute();
@@ -414,10 +383,6 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
aDlgAttr.Put(aEditAttr);
- // Die Werte sind erst einmal uebernommen worden, um den Dialog anzuzeigen.
- // Muss natuerlich noch geaendert werden
- // aDlgAttr.Put( SvxParaDlgLimitsItem( 567 * 50, 5670) );
-
aDlgAttr.Put( SvxHyphenZoneItem( sal_False, RES_PARATR_HYPHENZONE) );
aDlgAttr.Put( SvxFmtBreakItem( SVX_BREAK_NONE, RES_BREAK ) );
aDlgAttr.Put( SvxFmtSplitItem( sal_True, RES_PARATR_SPLIT ) );
@@ -425,10 +390,10 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
aDlgAttr.Put( SvxOrphansItem( 0, RES_PARATR_ORPHANS ) );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
{
@@ -555,7 +520,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
}
return;
default:
- ASSERT(!this, falscher Dispatcher);
+ OSL_ENSURE(!this, "wrong dispatcher");
return;
}
if(nEEWhich && pNewAttrs)
@@ -575,10 +540,6 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDrawTextShell::GetState(SfxItemSet& rSet)
{
if (!IsTextEdit()) // Sonst manchmal Absturz!
@@ -801,9 +762,6 @@ ASK_ESCAPE:
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet)
{
if (!IsTextEdit()) // Sonst Absturz!
@@ -868,9 +826,6 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
void SwDrawTextShell::ExecClpbrd(SfxRequest &rReq)
{
if (!IsTextEdit()) // Sonst Absturz!
@@ -898,7 +853,7 @@ void SwDrawTextShell::ExecClpbrd(SfxRequest &rReq)
break;
default:
- DBG_ERROR("falscher Dispatcher");
+ OSL_ENSURE(false, "wrong dispatcher");
return;
}
}
@@ -958,7 +913,6 @@ void SwDrawTextShell::StateClpbrd(SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: Hyperlink-Status
--------------------------------------------------------------------*/
-
void SwDrawTextShell::StateInsert(SfxItemSet &rSet)
{
if (!IsTextEdit()) // Sonst Absturz!
@@ -1010,3 +964,4 @@ void SwDrawTextShell::StateInsert(SfxItemSet &rSet)
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index 8e4dfd362c15..6efdd202ed6e 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,19 +68,13 @@
#include <cmdid.h>
#include <helpid.h>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
#define SwDrawTextShell
#include <sfx2/msg.hxx>
#include <swslots.hxx>
-#ifndef _POPUP_HRC
#include <popup.hrc>
-#endif
#include <uitool.hxx>
#include <wview.hxx>
#include <swmodule.hxx>
@@ -88,12 +83,9 @@
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
-#include <svx/svxdlg.hxx>
-#include <svx/dialogs.hrc>
-
#include <cppuhelper/bootstrap.hxx>
-#include "swabstdlg.hxx" //CHINA001
+#include "swabstdlg.hxx"
#include "misc.hrc"
using namespace ::com::sun::star;
@@ -101,8 +93,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::i18n;
-
-
SFX_IMPL_INTERFACE(SwDrawTextShell, SfxShell, SW_RES(STR_SHELLNAME_DRAW_TEXT))
{
SFX_POPUPMENU_REGISTRATION(SW_RES(MN_DRWTXT_POPUPMENU));
@@ -112,12 +102,6 @@ SFX_IMPL_INTERFACE(SwDrawTextShell, SfxShell, SW_RES(STR_SHELLNAME_DRAW_TEXT))
TYPEINIT1(SwDrawTextShell,SfxShell)
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
void SwDrawTextShell::Init()
{
SwWrtShell &rSh = GetShell();
@@ -146,11 +130,6 @@ void SwDrawTextShell::Init()
pOLV->ShowCursor();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwDrawTextShell::SwDrawTextShell(SwView &rV) :
SfxShell(&rV),
rView(rV)
@@ -165,28 +144,10 @@ SwDrawTextShell::SwDrawTextShell(SwView &rV) :
SetHelpId(SW_DRWTXTSHELL);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
-__EXPORT SwDrawTextShell::~SwDrawTextShell()
+SwDrawTextShell::~SwDrawTextShell()
{
if ( GetView().GetCurShell() == this )
rView.ResetSubShell();
-
- //MA 13. Nov. 96: Das kommt durchaus vor #33141#:
- //(doppel-)Klick von einem Texteditmode in ein anderes Objekt, zwischendurch
- //wird eine andere (Draw-)Shell gepusht, die alte aber noch nicht deletet.
- //Dann wird vor dem Flush wieder ein DrawTextShell gepusht und der Mode ist
- //eingeschaltet. In diesem Moment wird der Dispatcher geflusht und die alte
- //DrawTextShell zerstoert.
-// ASSERT( !pSdrView->IsTextEdit(), "TextEdit in DTor DrwTxtSh?" );
-// if (pSdrView->IsTextEdit())
-// GetShell().EndTextEdit(); // Danebengeklickt, Ende mit Edit
-
-// GetShell().Edit();
}
SwWrtShell& SwDrawTextShell::GetShell()
@@ -194,11 +155,9 @@ SwWrtShell& SwDrawTextShell::GetShell()
return rView.GetWrtShell();
}
-
/*--------------------------------------------------------------------
Beschreibung: Slots mit dieser Statusmethode disablen
--------------------------------------------------------------------*/
-
void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
@@ -211,15 +170,11 @@ void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet )
}
}
-
/*************************************************************************
|*
|* Attribute setzen
|*
\************************************************************************/
-
-
-
void SwDrawTextShell::SetAttrToMarked(const SfxItemSet& rAttr)
{
Rectangle aNullRect;
@@ -233,23 +188,11 @@ void SwDrawTextShell::SetAttrToMarked(const SfxItemSet& rAttr)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
sal_Bool SwDrawTextShell::IsTextEdit()
{
return pSdrView->IsTextEdit();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
void SwDrawTextShell::ExecFontWork(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
@@ -268,12 +211,6 @@ void SwDrawTextShell::ExecFontWork(SfxRequest& rReq)
pVFrame->GetBindings().Invalidate(SID_FONTWORK);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
void SwDrawTextShell::StateFontWork(SfxItemSet& rSet)
{
const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
@@ -285,9 +222,6 @@ void SwDrawTextShell::StateFontWork(SfxItemSet& rSet)
|* SfxRequests fuer FontWork bearbeiten
|*
\************************************************************************/
-
-
-
void SwDrawTextShell::ExecFormText(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
@@ -337,9 +271,6 @@ void SwDrawTextShell::ExecFormText(SfxRequest& rReq)
|* Statuswerte fuer FontWork zurueckgeben
|*
\************************************************************************/
-
-
-
void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
{
SwWrtShell &rSh = GetShell();
@@ -379,12 +310,6 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
@@ -414,7 +339,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq)
{
Reference< ui::dialogs::XExecutableDialog > xDialog(
xMCF->createInstanceWithContext(
- rtl::OUString::createFromAscii("com.sun.star.linguistic2.ChineseTranslationDialog")
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ChineseTranslationDialog"))
, xContext), UNO_QUERY);
Reference< lang::XInitialization > xInit( xDialog, UNO_QUERY );
if( xInit.is() )
@@ -424,7 +349,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq)
Sequence<Any> aSeq(1);
Any* pArray = aSeq.getArray();
PropertyValue aParam;
- aParam.Name = rtl::OUString::createFromAscii("ParentWindow");
+ aParam.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow"));
aParam.Value <<= makeAny(xDialogParentWindow);
pArray[0] <<= makeAny(aParam);
xInit->initialize( aSeq );
@@ -473,14 +398,11 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq)
break;
default:
- ASSERT(!this, "unexpected slot-id");
+ OSL_ENSURE(!this, "unexpected slot-id");
}
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
@@ -589,7 +511,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
break;
default:
- ASSERT(!this, "unexpected slot-id");
+ OSL_ENSURE(!this, "unexpected slot-id");
return;
}
@@ -602,9 +524,6 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
/*--------------------------------------------------------------------
Beschreibung: Undo ausfuehren
--------------------------------------------------------------------*/
-
-
-
void SwDrawTextShell::ExecUndo(SfxRequest &rReq)
{
if( IsTextEdit() )
@@ -650,9 +569,6 @@ void SwDrawTextShell::ExecUndo(SfxRequest &rReq)
/*--------------------------------------------------------------------
Beschreibung: Zustand Undo
--------------------------------------------------------------------*/
-
-
-
void SwDrawTextShell::StateUndo(SfxItemSet &rSet)
{
if ( !IsTextEdit() )
@@ -749,7 +665,7 @@ void SwDrawTextShell::ExecTransliteration( SfxRequest & rReq )
break;
default:
- ASSERT(!this, "falscher Dispatcher");
+ OSL_ENSURE(!this, "wrong dispatcher");
}
if( nMode )
@@ -763,7 +679,6 @@ void SwDrawTextShell::ExecTransliteration( SfxRequest & rReq )
/*--------------------------------------------------------------------
Beschreibung: Sonderzeichen einfuegen (siehe SDraw: FUBULLET.CXX)
--------------------------------------------------------------------*/
-
void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
{
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
@@ -896,9 +811,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
rReq.Done();
}
}
-/*-- 22.10.2003 14:26:32---------------------------------------------------
- -----------------------------------------------------------------------*/
::svl::IUndoManager* SwDrawTextShell::GetUndoManager()
{
SwWrtShell &rSh = GetShell();
@@ -908,5 +821,4 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
return &pOutliner->GetUndoManager();
}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index 07d88ea5ac5d..40689c614392 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,6 +33,7 @@
#include <hintids.hxx>
#include <svl/whiter.hxx>
#include <svtools/imapobj.hxx>
+#include <svtools/miscopt.hxx>
#include <svl/srchitem.hxx>
#include <svtools/imap.hxx>
#include <sfx2/viewfrm.hxx>
@@ -88,11 +90,17 @@
#include <svx/dialogs.hrc>
// <--
+#include <sfx2/filedlghelper.hxx>
+#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+#include <com/sun/star/beans/PropertyValues.hpp>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/uno/Any.h>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
// Prototypen ------------------------------------------------------------
-
void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine);
const SwFrmFmt* lcl_GetFrmFmtByName(SwWrtShell& rSh, const String& rName)
{
@@ -116,7 +124,9 @@ SFX_IMPL_INTERFACE(SwFrameShell, SwBaseShell, SW_RES(STR_SHELLNAME_FRAME))
SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_FRAME_TOOLBOX));
}
-
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/frame/XDispatchHelper.hpp>
void SwFrameShell::Execute(SfxRequest &rReq)
{
@@ -129,6 +139,135 @@ void SwFrameShell::Execute(SfxRequest &rReq)
switch ( nSlot )
{
+ case FN_EXPORT_OLE_AS_GRAPHIC:
+ {
+ const int nSel = rSh.GetSelectionType();
+ if (nSel & nsSelectionType::SEL_OLE)
+ {
+ sfx2::FileDialogHelper aDlgHelper( ::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, 0 );
+ aDlgHelper.SetTitle(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Export as JPG" )));
+ String aExt(RTL_CONSTASCII_USTRINGPARAM("*.jpg"));
+ aDlgHelper.AddFilter( aExt, aExt );
+ aDlgHelper.SetCurrentFilter( aExt );
+ if( aDlgHelper.Execute() == ERRCODE_NONE )
+ {
+ String aFile(aDlgHelper.GetPath());
+ // copy the object
+ uno::Reference< frame::XController > xController = rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface()->getController();
+ uno::Reference< frame::XFrame > xFrame = xController->getFrame();
+ uno::Reference< frame::XDispatchHelper > xDispatchHelper(::comphelper::getProcessServiceFactory()->createInstance(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.DispatchHelper" )) ),
+ uno::UNO_QUERY );
+ uno::Reference< frame::XDispatchProvider > xDispatchProvider(xFrame,UNO_QUERY);
+ xDispatchHelper->executeDispatch(xDispatchProvider, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Copy")),
+ ::rtl::OUString(), 0,
+ Sequence < ::com::sun::star::beans::PropertyValue >());
+ // create new draw document
+ ::beans::PropertyValues aPropertyValue(1);
+ aPropertyValue[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Hidden" ) );
+ aPropertyValue[0].Value <<= sal_Bool(sal_False);
+
+ uno::Reference< ::frame::XComponentLoader > xLoader(xFrame, UNO_QUERY);
+ uno::Reference< ::lang::XComponent > xDrawComponent( xLoader->loadComponentFromURL(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:factory/sdraw" ) ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_blank" ) ), 0,
+ aPropertyValue));
+
+ // paste it into draw
+ uno::Reference< frame::XModel > xDrawModel(xDrawComponent, UNO_QUERY);
+ xController = xDrawModel->getCurrentController();
+ xFrame = xController->getFrame();
+ uno::Reference< frame::XDispatchProvider > xDrawDispatchProvider(xFrame,UNO_QUERY);
+
+ xDispatchHelper->executeDispatch(xDrawDispatchProvider,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Paste")),
+ ::rtl::OUString(), 0,
+ Sequence < ::com::sun::star::beans::PropertyValue >());
+ xDispatchHelper->executeDispatch(xDrawDispatchProvider,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:AlignUp")),
+ ::rtl::OUString(), 0,
+ Sequence < ::com::sun::star::beans::PropertyValue >());
+ xDispatchHelper->executeDispatch(xDrawDispatchProvider,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:AlignCenter")),
+ ::rtl::OUString(), 0,
+ Sequence < ::com::sun::star::beans::PropertyValue >());
+ // export as jpeg
+ xController = xFrame->getController();
+ aPropertyValue[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) );
+ aPropertyValue[0].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "draw_jpg_Export" ) );
+ uno::Reference< frame::XStorable > xStorable(xController->getModel(), uno::UNO_QUERY );
+ xStorable->storeToURL(aFile, aPropertyValue);
+
+ // destroy draw document
+ xDrawComponent->dispose();
+ }
+ }
+ rReq.Ignore();
+ }
+ break;
+ case FN_EXPORT_OLE_AS_PDF:
+ {
+ const int nSel = rSh.GetSelectionType();
+ if (nSel & nsSelectionType::SEL_OLE)
+ {
+ sfx2::FileDialogHelper aDlgHelper( ::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, 0 );
+ aDlgHelper.SetTitle(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Export as PDF" )));
+ String aExt(RTL_CONSTASCII_USTRINGPARAM("*.pdf"));
+ aDlgHelper.AddFilter( aExt, aExt );
+ aDlgHelper.SetCurrentFilter( aExt );
+ if( aDlgHelper.Execute() == ERRCODE_NONE )
+ {
+ String aFile(aDlgHelper.GetPath());
+ Reference< frame::XController > xController = rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface()->getController();
+ ::beans::PropertyValues aPropertyValue(3);
+ aPropertyValue[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) );
+ aPropertyValue[0].Value <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "writer_pdf_Export" ) );
+ Sequence< ::beans::PropertyValue > aSequence(10);
+ ::beans::PropertyValue aValue;
+ aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UseLosslessCompression" ));
+ aValue.Value <<= sal_Bool(sal_False);
+ aSequence[0] = aValue;
+ aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Quality" ));
+ aValue.Value <<= sal_Int32(90);
+ aSequence[1] = aValue;
+ aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ReduceImageResolution" ));
+ aValue.Value <<= sal_Bool(sal_False);
+ aSequence[2] = aValue;
+ aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MaxImageResolution" ));
+ aValue.Value <<= sal_Int32(300);
+ aSequence[3] = aValue;
+ aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UseTaggedPDF" ));
+ aValue.Value <<= sal_Bool(sal_False);
+ aSequence[4] = aValue;
+ aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ));
+ aValue.Value <<= sal_Bool(sal_False);
+ aSequence[5] = aValue;
+ aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UseTransitionEffects" ));
+ aValue.Value <<= sal_Bool(sal_True);
+ aSequence[6] = aValue;
+ aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FormsType" ));
+ aValue.Value <<= sal_Int32(0);
+ aSequence[7] = aValue;
+ uno::Any aAny;
+ Reference< view::XSelectionSupplier > xView( xController, UNO_QUERY );
+ xView->getSelection() >>= aAny;
+ aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Selection" ));
+ aValue.Value <<= aAny;
+ aSequence[8] = aValue;
+ aValue.Name = rtl::OUString();
+ aValue.Value <<= sal_Int32(0);
+ aSequence[9] = aValue;
+ aPropertyValue[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterData" ) );
+ aPropertyValue[1].Value <<= aSequence;
+ aPropertyValue[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Selection" ) );
+ aPropertyValue[2].Value <<= sal_Bool(sal_True);
+ Reference< frame::XStorable > xStorable(xController->getModel(), uno::UNO_QUERY );
+ xStorable->storeToURL(aFile, aPropertyValue);
+ }
+ }
+ rReq.Ignore();
+ }
+ break;
case FN_FRAME_TO_ANCHOR:
if ( rSh.IsFrmSelected() )
{
@@ -241,10 +380,10 @@ void SwFrameShell::Execute(SfxRequest &rReq)
case FN_FORMAT_FOOTNOTE_DLG:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( GetView().GetWindow(), GetView().GetWrtShell(), DLG_DOC_FOOTNOTE );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
break;
@@ -253,10 +392,10 @@ void SwFrameShell::Execute(SfxRequest &rReq)
{
SfxItemSet aTmp(GetPool(), FN_PARAM_1, FN_PARAM_1);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_TAB_OUTLINE,
GetView().GetWindow(), &aTmp, GetView().GetWrtShell());
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
rReq.Done();
@@ -266,7 +405,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
{
try
{
- uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
+ uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY);
if( xDialog.is() )
{
xDialog->execute();
@@ -291,7 +430,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractSwWordCountDialog* pDialog = pFact->CreateSwWordCountDialog( GetView().GetWindow() );
pDialog->SetValues(aCurr, aDocStat );
pDialog->Execute();
@@ -420,10 +559,8 @@ void SwFrameShell::Execute(SfxRequest &rReq)
aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
if( nSel & nsSelectionType::SEL_OLE )
{
- // --> OD 2009-07-13 #i73249#
-// aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText()));
+ // #i73249#
aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
- // <--
}
const SwRect &rPg = rSh.GetAnyCurRect(RECT_PAGE);
@@ -460,7 +597,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView()));
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric) ));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_STD,
GetView().GetViewFrame(),
GetView().GetWindow(),
@@ -470,7 +607,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
DLG_FRM_STD,
sal_False,
nDefPage);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() )
{
@@ -487,10 +624,8 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, sal_True, &pItem))
{
- // --> OD 2009-07-13 #i73249#
-// rSh.SetAlternateText(((const SfxStringItem*)pItem)->GetValue());
+ // #i73249#
rSh.SetObjTitle(((const SfxStringItem*)pItem)->GetValue());
- // <--
}
// Vorlagen-AutoUpdate
SwFrmFmt* pFmt = rSh.GetCurFrmFmt();
@@ -542,7 +677,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
//needs cast - no non-const method available
SwFrmFmt* pPrevFmt = (SwFrmFmt*)
lcl_GetFrmFmtByName(rSh, sPrevName);
- DBG_ASSERT(pPrevFmt, "No frame found!");
+ OSL_ENSURE(pPrevFmt, "No frame found!");
if(pPrevFmt)
{
rSh.Chain(*pPrevFmt, *pCurrFlyFmt);
@@ -576,7 +711,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
//needs cast - no non-const method available
SwFrmFmt* pNextFmt = (SwFrmFmt*)
lcl_GetFrmFmtByName(rSh, sNextName);
- DBG_ASSERT(pNextFmt, "No frame found!");
+ OSL_ENSURE(pNextFmt, "No frame found!");
if(pNextFmt)
{
rSh.Chain(*(SwFrmFmt*)
@@ -639,7 +774,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
break;
// <--
default:
- ASSERT( !this, "falscher Dispatcher" );
+ OSL_ENSURE( !this, "wrong dispatcher" );
return;
}
// Vorlagen-AutoUpdate
@@ -656,11 +791,6 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwFrameShell::GetState(SfxItemSet& rSet)
{
SwWrtShell &rSh = GetShell();
@@ -716,8 +846,9 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
case FN_FRAME_ALIGN_HORZ_RIGHT:
case FN_FRAME_ALIGN_HORZ_LEFT:
if ( (eFrmType & FRMTYPE_FLY_INCNT) ||
- bProtect ||
- ((nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER)&& bHtmlMode) )
+ bProtect ||
+ ((nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER) &&
+ bHtmlMode ))
rSet.DisableItem( nWhich );
break;
case FN_FRAME_ALIGN_VERT_ROW_TOP:
@@ -727,10 +858,20 @@ 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;
+ case FN_EXPORT_OLE:
+ case FN_EXPORT_OLE_AS_PDF:
+ case FN_EXPORT_OLE_AS_GRAPHIC:
+ {
+ SvtMiscOptions aMiscOptions;
+ if ( !aMiscOptions.IsExperimentalMode() )
+ rSet.DisableItem( nWhich );
+ break;
+ }
+
case SID_OBJECT_ALIGN_UP :
case SID_OBJECT_ALIGN_MIDDLE :
case SID_OBJECT_ALIGN_DOWN :
@@ -738,7 +879,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
{
@@ -899,8 +1040,6 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
/*--------------------------------------------------------------------
Beschreibung: Ctor fuer FrameShell
--------------------------------------------------------------------*/
-
-
SwFrameShell::SwFrameShell(SwView &_rView) :
SwBaseShell( _rView )
{
@@ -919,12 +1058,6 @@ SwFrameShell::~SwFrameShell()
SwTransferable::ClearSelection( GetShell(), (ViewShell *) this );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
@@ -1100,8 +1233,6 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
}
-
-
void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine)
{
if(pBorderLine->GetInWidth() > rBorderLine.GetInWidth())
@@ -1116,8 +1247,6 @@ void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBo
rBorderLine.SetColor(pBorderLine->GetColor());
}
-
-
void SwFrameShell::GetLineStyleState(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
@@ -1153,3 +1282,4 @@ void SwFrameShell::StateInsert(SfxItemSet &rSet)
rSet.DisableItem(FN_INSERT_FRAME);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index 4b94089ded3d..c7504550fc1b 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <hintids.hxx>
#include <tools/urlobj.hxx>
#include <vcl/msgbox.hxx>
@@ -77,7 +76,7 @@
#include <swwait.hxx>
#include <shells.hrc>
#include <popup.hrc>
-
+#include <extedit.hxx>
#define SwGrfShell
#include <sfx2/msg.hxx>
#include "swslots.hxx"
@@ -115,6 +114,19 @@ void SwGrfShell::Execute(SfxRequest &rReq)
}
}
break;
+ case FN_EXTERNAL_EDIT:
+ {
+ /* When the graphic is selected to be opened via some external tool
+ * for advanced editing
+ */
+ GraphicObject *pGraphicObject = (GraphicObject *) rSh.GetGraphicObj();
+ if(0 != pGraphicObject)
+ {
+ EditWithExternalTool(pGraphicObject, &rSh);
+ }
+ }
+ break;
+
case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
{
@@ -153,10 +165,8 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
if ( nSlot == FN_FORMAT_GRAFIC_DLG )
{
- // --> OD 2009-07-13 #i73249#
-// aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText()));
+ // #i73249#
aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
- // <--
}
pRect = &rSh.GetAnyCurRect(RECT_PAGE_PRT);
@@ -228,12 +238,12 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame()));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_GRF,
GetView().GetViewFrame(),
GetView().GetWindow(),
aSet, sal_False, DLG_FRM_GRF);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( pDlg->Execute() )
{
rSh.StartAllAction();
@@ -329,11 +339,8 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if ( SFX_ITEM_SET == pSet->GetItemState(
FN_SET_FRM_ALT_NAME, sal_True, &pItem ))
{
- // --> OD 2009-07-13 #i73249#
-// rSh.SetAlternateText(
-// ((const SfxStringItem*)pItem)->GetValue() );
+ // #i73249#
rSh.SetObjTitle( ((const SfxStringItem*)pItem)->GetValue() );
- // <--
}
SfxItemSet aGrfSet( rSh.GetAttrPool(), RES_GRFATR_BEGIN,
@@ -360,7 +367,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
break;
default:
- ASSERT(!this, falscher Dispatcher);
+ OSL_ENSURE(!this, "wrong dispatcher");
return;
}
}
@@ -504,7 +511,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
break;
default:
- ASSERT(!this, falscher Dispatcher);
+ OSL_ENSURE(!this, "wrong dispatcher");
}
if( aGrfSet.Count() )
GetShell().SetAttr( aGrfSet );
@@ -519,10 +526,6 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
rSh.GetCurAttr( aCoreSet );
sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
sal_Bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
- // --> OD 2006-11-03 #i59688#
-// sal_Bool bSwappedOut = rSh.IsGrfSwapOut( sal_True );
-// sal_Bool bBitmapType = !bSwappedOut && GRAPHIC_BITMAP == rSh.GetGraphicType();
- // <--
SetGetStateSet( &rSet );
@@ -543,6 +546,13 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
if( rSh.GetGraphicType() == GRAPHIC_NONE )
bDisable = sal_True;
break;
+ /*
+ * If the Graphic is None type it should be externally editable
+ */
+ case FN_EXTERNAL_EDIT:
+ if( rSh.GetGraphicType() == GRAPHIC_NONE )
+ bDisable = sal_True;
+ break;
case SID_COLOR_SETTINGS:
{
if ( bParentCntProt || !bIsGrfCntnt )
@@ -652,16 +662,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
{
if( bParentCntProt || !bIsGrfCntnt )
bDisable = sal_True;
- // --> OD 2006-11-03 #i59688#
- // load graphic only if type is unknown
-// else if( bSwappedOut )
-// {
-// rSet.DisableItem( nWhich );
-// if( AddGrfUpdateSlot( nWhich ))
-// rSh.GetGraphic(sal_False); // start the loading
-// }
-// else
-// bDisable = !bBitmapType;
+ // #i59688# load graphic only if type is unknown
else
{
const sal_uInt16 eGraphicType( rSh.GetGraphicType() );
@@ -705,3 +706,4 @@ SwGrfShell::SwGrfShell(SwView &_rView) :
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/grfshex.cxx b/sw/source/ui/shells/grfshex.cxx
index 8669c4e201c1..55dd195d84fe 100644
--- a/sw/source/ui/shells/grfshex.cxx
+++ b/sw/source/ui/shells/grfshex.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,7 +34,6 @@
#include <grfsh.hxx>
#include <wrtsh.hxx>
#include <view.hxx>
-#include <docary.hxx>
#include <textsh.hxx>
#include <viewopt.hxx>
#include <swundo.hxx>
@@ -148,3 +148,5 @@ bool SwTextShell::InsertMediaDlg( SfxRequest& rReq )
return bRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx
index 6f00f198e33f..75fa588e7bee 100755
--- a/sw/source/ui/shells/langhelper.cxx
+++ b/sw/source/ui/shells/langhelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -255,7 +256,7 @@ namespace SwLangHelper
sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL;
- DBG_ASSERT( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
+ OSL_ENSURE( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
//get ScriptType
sal_uInt16 nLangWhichId = 0;
@@ -267,7 +268,7 @@ namespace SwLangHelper
case SCRIPTTYPE_COMPLEX : nLangWhichId = pEditEngine ? EE_CHAR_LANGUAGE_CTL : RES_CHRATR_CTL_LANGUAGE; break;
default:
bIsSingleScriptType = false;
- DBG_ERROR( "unexpected case" );
+ OSL_ENSURE(false, "unexpected case" );
}
if (bIsSingleScriptType)
{
@@ -338,7 +339,7 @@ namespace SwLangHelper
// whole paragraph)
EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL;
- DBG_ASSERT( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
+ OSL_ENSURE( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
if (pEditEngine)
{
for (sal_uInt16 i = 0; i < 3; ++i)
@@ -436,7 +437,7 @@ namespace SwLangHelper
// there is more than one language...
nLang = LANGUAGE_DONTKNOW;
}
- DBG_ASSERT( nLang != LANGUAGE_SYSTEM, "failed to get the language?" );
+ OSL_ENSURE( nLang != LANGUAGE_SYSTEM, "failed to get the language?" );
return nLang;
}
@@ -487,7 +488,7 @@ namespace SwLangHelper
}
}
}
- DBG_ASSERT( nCurrentLang != LANGUAGE_SYSTEM, "failed to get the language?" );
+ OSL_ENSURE( nCurrentLang != LANGUAGE_SYSTEM, "failed to get the language?" );
return nCurrentLang;
}
@@ -535,7 +536,7 @@ namespace SwLangHelper
}
}
}
- DBG_ASSERT( nCurrentLang != LANGUAGE_SYSTEM, "failed to get the language?" );
+ OSL_ENSURE( nCurrentLang != LANGUAGE_SYSTEM, "failed to get the language?" );
return nCurrentLang;
}
@@ -608,3 +609,4 @@ namespace SwLangHelper
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/listsh.cxx b/sw/source/ui/shells/listsh.cxx
index 45746e286857..322fb5adb31f 100644
--- a/sw/source/ui/shells/listsh.cxx
+++ b/sw/source/ui/shells/listsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,9 +46,7 @@
#include <tools/shl.hxx>
#include <svl/srchitem.hxx>
-// --> FME 2005-01-04 #i35572#
#include <numrule.hxx>
-// <--
#include <fmtornt.hxx>
#include "wrtsh.hxx"
#include "swmodule.hxx"
@@ -152,11 +151,10 @@ void SwListShell::Execute(SfxRequest &rReq)
sal_uInt16 nSlot = rReq.GetSlot();
SwWrtShell& rSh = GetShell();
- // --> FME 2005-01-04 #i35572#
+ // #i35572#
const SwNumRule* pCurRule = rSh.GetCurNumRule();
- ASSERT( pCurRule, "SwListShell::Execute without NumRule" )
+ OSL_ENSURE( pCurRule, "SwListShell::Execute without NumRule" );
bool bOutline = pCurRule && pCurRule->IsOutlineRule();
- // <--
switch (nSlot)
{
@@ -242,7 +240,7 @@ void SwListShell::Execute(SfxRequest &rReq)
}
break;
default:
- ASSERT(!this, falscher Dispatcher);
+ OSL_ENSURE(!this, "wrong dispatcher");
return;
}
}
@@ -293,3 +291,4 @@ SwListShell::SwListShell(SwView &_rView) :
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/mediash.cxx b/sw/source/ui/shells/mediash.cxx
index ed73541da8d6..f65827e42f1b 100644
--- a/sw/source/ui/shells/mediash.cxx
+++ b/sw/source/ui/shells/mediash.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,11 +30,7 @@
#include "precompiled_sw.hxx"
-
-
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <hintids.hxx>
#include <tools/urlobj.hxx>
#include <vcl/msgbox.hxx>
@@ -71,12 +68,8 @@
#include <usrpref.hxx>
#include <edtwin.hxx>
#include <swwait.hxx>
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
-#ifndef _POPUP_HRC
#include <popup.hrc>
-#endif
#include <sfx2/objface.hxx>
#include <svx/svdomedia.hxx>
@@ -94,8 +87,6 @@ SFX_IMPL_INTERFACE(SwMediaShell, SwBaseShell, SW_RES(STR_SHELLNAME_MEDIA))
SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_MEDIA_TOOLBOX));
}
-// ------------------------------------------------------------------------------
-
void SwMediaShell::ExecMedia(SfxRequest &rReq)
{
SwWrtShell* pSh = &GetShell();
@@ -167,8 +158,6 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
}
}
-// ------------------------------------------------------------------------------
-
void SwMediaShell::GetMediaState(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
@@ -211,8 +200,6 @@ void SwMediaShell::GetMediaState(SfxItemSet &rSet)
}
}
-// ------------------------------------------------------------------------------
-
SwMediaShell::SwMediaShell(SwView &_rView) :
SwBaseShell(_rView)
@@ -220,3 +207,5 @@ SwMediaShell::SwMediaShell(SwView &_rView) :
SetName(String::CreateFromAscii("Media Playback"));
SetHelpId(SW_MEDIASHELL);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/navsh.cxx b/sw/source/ui/shells/navsh.cxx
new file mode 100644
index 000000000000..506c7e99f747
--- /dev/null
+++ b/sw/source/ui/shells/navsh.cxx
@@ -0,0 +1,139 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * [ Maja Djordjevic < ovcica@gmail.com > ]
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Cédric Bosdonnat <cbosdonnat@novell.com>
+ * Caolan McNamara <caolanm@redhat.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include "cmdid.h"
+#include <svx/svdview.hxx>
+#include <svl/srchitem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/whiter.hxx>
+#include <svx/svdopath.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/objface.hxx>
+
+#include "wrtsh.hxx"
+#include "view.hxx"
+#include "edtwin.hxx"
+#include "helpid.h"
+#include "globals.hrc"
+
+#include "navsh.hxx"
+
+
+#include "popup.hrc"
+#include "shells.hrc"
+#define SwNavigationShell
+#include "swslots.hxx"
+
+#include <unomid.h>
+
+#include "navmgr.hxx"
+
+
+SFX_IMPL_INTERFACE(SwNavigationShell, SwBaseShell, SW_RES(STR_SHELLNAME_NAVIGATION))
+{
+}
+
+SwNavigationShell::SwNavigationShell(SwView &_rView):
+ SwBaseShell( _rView )
+
+{
+ SetName(C2S("Navigation"));
+ SetHelpId(SW_NAVIGATIONSHELL);
+}
+
+void SwNavigationShell::Execute(SfxRequest &rReq)
+{
+ SwWrtShell *pSh = &GetShell();
+ SdrView* pSdrView = pSh->GetDrawView();
+ const SfxItemSet *pArgs = rReq.GetArgs();
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
+ pSdrView->GetModel()->SetChanged(sal_False);
+ SwNavigationMgr& aSwNavigationMgr = pSh->GetNavigationMgr();
+ const SfxPoolItem* pItem;
+ if(pArgs)
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
+ switch (nSlotId)
+ {
+ case FN_NAVIGATION_BACK:
+ aSwNavigationMgr.goBack();
+ break;
+
+ case FN_NAVIGATION_FORWARD:
+ aSwNavigationMgr.goForward();
+ break;
+ default:
+ break;
+ }
+ if (pSdrView->GetModel()->IsChanged())
+ GetShell().SetModified();
+ else if (bChanged)
+ pSdrView->GetModel()->SetChanged(sal_True);
+}
+
+/*--------------------------------------------------------------------
+ determine if the buttons should be enabled/disabled
+ --------------------------------------------------------------------*/
+
+
+void SwNavigationShell::GetState(SfxItemSet &rSet)
+{
+ SwWrtShell *pSh = &GetShell();
+ SfxWhichIter aIter( rSet );
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ SwNavigationMgr& aNavigationMgr = pSh->GetNavigationMgr();
+ while( nWhich )
+ {
+ switch( nWhich )
+ {
+ case FN_NAVIGATION_BACK:
+ {
+ if (!aNavigationMgr.backEnabled()) {
+ rSet.DisableItem(FN_NAVIGATION_BACK);
+ }
+ }
+ break;
+ case FN_NAVIGATION_FORWARD:
+ {
+ if (!aNavigationMgr.forwardEnabled())
+ rSet.DisableItem(FN_NAVIGATION_FORWARD);
+ }
+ break;
+ default:
+ break;
+ }
+ nWhich = aIter.NextWhich();
+ }
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/olesh.cxx b/sw/source/ui/shells/olesh.cxx
index a4eef5cdbf1d..a971998beb74 100644
--- a/sw/source/ui/shells/olesh.cxx
+++ b/sw/source/ui/shells/olesh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,26 +36,14 @@
#include <sfx2/objitem.hxx>
#include <wrtsh.hxx>
#include <view.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <frmsh.hxx>
-#ifndef _OLESH_HXX
#include <olesh.hxx>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _POPUP_HRC
#include <popup.hrc>
-#endif
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
#define SwOleShell
@@ -78,3 +67,4 @@ SwOleShell::SwOleShell(SwView &_rView) :
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/shells.src b/sw/source/ui/shells/shells.src
index 8e6527206d77..23efd4977883 100644
--- a/sw/source/ui/shells/shells.src
+++ b/sw/source/ui/shells/shells.src
@@ -152,7 +152,6 @@ String STR_PAGE
};
String RID_TEXT_TOOLBOX
{
- /* ### ACHTUNG: Neuer Text in Resource? Textobjektleiste : Textleiste */
Text [ en-US ] = "Text Object Bar" ;
Text [ x-comment ] = " ";
};
diff --git a/sw/source/ui/shells/slotadd.cxx b/sw/source/ui/shells/slotadd.cxx
index 9d162f57aa6f..ab6850ce6aae 100644
--- a/sw/source/ui/shells/slotadd.cxx
+++ b/sw/source/ui/shells/slotadd.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,9 +53,7 @@
#include <editeng/wrlmitem.hxx>
#include <editeng/protitem.hxx>
#include <editeng/opaqitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <editeng/tstpitem.hxx>
-#endif
#include <editeng/akrnitem.hxx>
#include <editeng/keepitem.hxx>
#include <editeng/kernitem.hxx>
@@ -82,9 +81,7 @@
#include <editeng/udlnitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/fhgtitem.hxx>
-#ifndef _SVX_CNTRITEM_HXX //autogen
#include <editeng/cntritem.hxx>
-#endif
#include <editeng/colritem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/sizeitem.hxx>
@@ -148,3 +145,4 @@
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index 9f0639d9622c..98cd4a16cea2 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,8 +86,6 @@
#include <dialog.hrc>
-
-
//!!! new: insert table
/*
#include <svx/htmlmode.hxx>
@@ -96,19 +95,10 @@
*/
//!!!
-#ifndef _POPUP_HRC
#include <popup.hrc>
-#endif
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
-#ifndef _TABLE_HRC
-#include <table.hrc>
-#endif
#include <cmdid.h>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <helpid.h>
#include <unobaseclass.hxx>
@@ -121,20 +111,15 @@
using namespace ::com::sun::star;
-//-----------------------------------------------------------------------------
-
SFX_IMPL_INTERFACE(SwTableShell, SwBaseShell, SW_RES(STR_SHELLNAME_TABLE))
{
SFX_POPUPMENU_REGISTRATION(SW_RES(MN_TAB_POPUPMENU));
SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TABLE_TOOLBOX));
}
-
TYPEINIT1(SwTableShell,SwBaseShell)
-/************************************************************************/
-
-const sal_uInt16 __FAR_DATA aUITableAttrRange[] =
+const sal_uInt16 aUITableAttrRange[] =
{
FN_PARAM_TABLE_NAME, FN_PARAM_TABLE_NAME,
FN_PARAM_TABLE_HEADLINE, FN_PARAM_TABLE_HEADLINE,
@@ -173,9 +158,6 @@ static void lcl_SetAttr( SwWrtShell &rSh, const SfxPoolItem &rItem )
rSh.SetTblAttr( aSet );
}
-/************************************************************************/
-
-
static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
{
SwFrmFmt *pFmt = rSh.GetTableFmt();
@@ -195,8 +177,6 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
sal_uInt16 nBackgroundDestination = rSh.GetViewOptions()->GetTblDest();
rSet.Put(SwBackgroundDestinationItem(SID_BACKGRND_DESTINATION, nBackgroundDestination ));
SvxBrushItem aBrush( RES_BACKGROUND );
-// rSh.GetBoxBackground(aBrush);
-// rSet.Put( aBrush );
if(rSh.GetRowBackground(aBrush))
rSet.Put( aBrush, SID_ATTR_BRUSH_ROW );
else
@@ -303,9 +283,6 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
return pRep;
}
-/************************************************************************/
-
-
void ItemSetToTableParam( const SfxItemSet& rSet,
SwWrtShell &rSh )
{
@@ -451,7 +428,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
rSh.SetTableName( *pFmt, ((const SfxStringItem*)pItem)->GetValue() );
// kopiere die ausgesuchten Attribute in den ItemSet
- static sal_uInt16 __READONLY_DATA aIds[] =
+ static sal_uInt16 aIds[] =
{
RES_PAGEDESC,
RES_BREAK,
@@ -483,9 +460,6 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
rSh.EndAllAction();
}
-/************************************************************************/
-
-
static void lcl_TabGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine)
{
if(pBorderLine->GetInWidth() > rBorderLine.GetInWidth())
@@ -500,7 +474,6 @@ static void lcl_TabGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLi
rBorderLine.SetColor(pBorderLine->GetColor());
}
-
void SwTableShell::Execute(SfxRequest &rReq)
{
sal_Bool bUseDialog = sal_True;
@@ -518,23 +491,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
{
case SID_ATTR_BORDER:
{
-/* sal_Bool bPopCrsr = sal_False;
- if ( !rReq.IsAPI() )
- {
- //Keine Tabellenselektion -> Aenderung wird auf die gesamte
- //Tabelle.
- if ( !rSh.IsTableMode() )
- {
- rSh.StartAction();
- bPopCrsr = sal_True;
- rSh.Push();
- rSh.EnterStdMode();
- rSh.MoveTable( fnTableCurr, fnTableStart );
- rSh.SttSelect();
- rSh.MoveTable( fnTableCurr, fnTableEnd );
- rSh.EndSelect();
- }
- }*/
if(!pArgs)
break;
//Items erzeugen, weil wir sowieso nacharbeiten muessen
@@ -558,7 +514,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
aBox.SetDistance( Max(rCoreBox.GetDistance(),(sal_uInt16)MIN_BORDER_DIST) );
}
else
- {ASSERT( !this, "Wo ist das Box-Item?" )}
+ OSL_ENSURE( !this, "where is BoxItem?" );
//since the drawing layer also supports borders the which id might be a different one
SvxBoxInfoItem aInfo( SID_ATTR_BORDER_INNER );
@@ -610,9 +566,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
if ((pBorderLine = aInfo.GetVert()) != NULL)
aInfo.SetLine(&aBorderLine, BOXINFO_LINE_VERT), bLine |= sal_True;
-// if ( bPopCrsr && !bLine )
-// aBox.SetDistance( 0 );
-
aCoreSet.Put( aBox );
aCoreSet.Put( aInfo );
rSh.SetTabBorders( aCoreSet );
@@ -624,12 +577,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
rReq.AppendItem( aInfo );
bCallDone = sal_True;
-/* if ( bPopCrsr )
- {
- rSh.KillPams();
- rSh.Pop(sal_False);
- rSh.EndAction();
- }*/
}
break;
case FN_INSERT_TABLE:
@@ -649,10 +596,10 @@ void SwTableShell::Execute(SfxRequest &rReq)
if ( bUseDialog )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pDlg = pFact->CreateSwTableTabDlg( GetView().GetWindow(), GetPool(), &aCoreSet, &rSh, DLG_FORMAT_TABLE );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
}
aCoreSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell())));
rSh.GetTblAttr(aCoreSet);
@@ -726,12 +673,12 @@ void SwTableShell::Execute(SfxRequest &rReq)
sCurText, SID_ATTR_NUMBERFORMAT_INFO ));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(),aCoreSet,
pView->GetViewFrame()->GetFrame().GetFrameInterface(),
RC_DLG_SWNUMFMTDLG );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if (RET_OK == pDlg->Execute())
{
@@ -821,7 +768,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
aInfoBox.Execute();
break;
}
- default: ASSERT( !this, "unbekannter Returnwert MergeTab.");
+ default: OSL_ENSURE( !this, "unknown return value MergeTab.");
}
break;
case FN_TABLE_ADJUST_CELLS:
@@ -874,10 +821,10 @@ void SwTableShell::Execute(SfxRequest &rReq)
case SID_AUTOFORMAT:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(&GetView().GetViewFrame()->GetWindow(), &rSh , DLG_AUTOFMT_TABLE );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
}
@@ -885,17 +832,17 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_SET_ROW_HEIGHT:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
VclAbstractDialog* pDlg = pFact->CreateVclAbstractDialog( GetView().GetWindow(), rSh, DLG_ROW_HEIGHT );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
}
break;
case FN_NUMBER_BULLETS:
case FN_NUM_BULLET_ON:
- ASSERT( !this, "Funktion darf zur Zeit nicht gerufen werden." );
+ OSL_ENSURE( !this, "function may not be called now." );
break;
case FN_TABLE_INSERT_COL:
@@ -1044,10 +991,10 @@ void SwTableShell::Execute(SfxRequest &rReq)
else
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSplitTableDialog* pDlg = pFact->CreateSplitTblDialog( GetView().GetWindow(), rSh );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
rReq.AppendItem( SfxUInt16Item( FN_PARAM_1, pDlg->GetSplitMode() ) );
delete pDlg;
@@ -1064,9 +1011,9 @@ void SwTableShell::Execute(SfxRequest &rReq)
if( bPrev && bNext )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
VclAbstractDialog* pDlg = pFact->CreateSwVclDialog( DLG_MERGE_TABLE, GetView().GetWindow(), bPrev );
- DBG_ASSERT(pDlg, "dialogdiet pDlg fail!");
+ OSL_ENSURE(pDlg, "dialogdiet pDlg fail!");
if( RET_OK != pDlg->Execute())
bPrev = bNext = sal_False;
delete pDlg;
@@ -1087,7 +1034,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
: TBLVAR_CHGABS ) );
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
- static sal_uInt16 __READONLY_DATA aInva[] =
+ static sal_uInt16 aInva[] =
{ FN_TABLE_MODE_FIX,
FN_TABLE_MODE_FIX_PROP,
FN_TABLE_MODE_VARIABLE,
@@ -1237,15 +1184,12 @@ void SwTableShell::Execute(SfxRequest &rReq)
break;
default:
- ASSERT( !this, "falscher Dispatcher" );
+ OSL_ENSURE( !this, "wrong Dispatcher" );
return;
}
if(bCallDone)
rReq.Done();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
void SwTableShell::GetState(SfxItemSet &rSet)
{
@@ -1296,7 +1240,6 @@ void SwTableShell::GetState(SfxItemSet &rSet)
case FN_INSERT_TABLE:
// Irgendeinen Wert "putten", damit Controller enabled bleibt.
// Statt "Insert:Table" erscheint dann "Format:Table".
-// rSet.Put(SfxUInt16Item(nSlot, 1));
break;
case FN_TABLE_OPTIMAL_HEIGHT:
@@ -1428,10 +1371,6 @@ void SwTableShell::GetState(SfxItemSet &rSet)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwTableShell::SwTableShell(SwView &_rView) :
SwBaseShell(_rView)
{
@@ -1439,10 +1378,6 @@ SwTableShell::SwTableShell(SwView &_rView) :
SetHelpId(SW_TABSHELL);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwTableShell::GetFrmBorderState(SfxItemSet &rSet)
{
SfxItemSet aCoreSet( GetPool(),
@@ -1454,10 +1389,6 @@ void SwTableShell::GetFrmBorderState(SfxItemSet &rSet)
rSet.Put( aCoreSet );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwTableShell::ExecTableStyle(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
@@ -1468,24 +1399,6 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
case SID_FRAME_LINESTYLE:
case SID_FRAME_LINECOLOR:
{
-/* Tabellenselektion ist abgeschafft
- sal_Bool bPopCrsr = sal_False;
- if ( !rReq.IsAPI() )
- {
- //Keine Tabellenselektion -> Aenderung wird auf die gesamte
- //Tabelle.
- if ( !rSh.IsTableMode() )
- {
- bPopCrsr = sal_True;
- rSh.Push();
- rSh.StartAction();
- rSh.EnterStdMode();
- rSh.MoveTable( fnTableCurr, fnTableStart );
- rSh.SttSelect();
- rSh.MoveTable( fnTableCurr, fnTableEnd );
- rSh.EndSelect();
- }
- }*/
if ( rReq.GetSlot() == SID_FRAME_LINESTYLE )
{
const SvxLineItem &rLineItem = (const SvxLineItem&)pArgs->
@@ -1501,18 +1414,12 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
}
rReq.Done();
-/* if ( bPopCrsr )
- {
- rSh.KillPams();
- rSh.Pop(sal_False);
- rSh.EndAction();
- }*/
+
break;
}
}
}
-
void SwTableShell::GetLineStyleState(SfxItemSet &rSet)
{
SfxItemSet aCoreSet( GetPool(),
@@ -1580,7 +1487,7 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq)
break;
default:
- ASSERT(sal_False, falscher Dispatcher);
+ OSL_ENSURE(false, "wrong dispatcher");
return;
}
@@ -1596,3 +1503,4 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx
index 584da30a17ca..16e47464ad21 100644
--- a/sw/source/ui/shells/textdrw.cxx
+++ b/sw/source/ui/shells/textdrw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,9 +43,7 @@
#include <swundo.hxx>
#include <basesh.hxx>
-#ifndef _POOLFMT_HRC
#include <poolfmt.hrc>
-#endif
#include <docsh.hxx>
#include <sfx2/docfile.hxx>
@@ -53,12 +52,8 @@
#include <unomid.h>
-
using namespace ::com::sun::star;
using ::rtl::OUString;
-/*---------------------------------------------------------------------------
- Beschreibung:
- ----------------------------------------------------------------------------*/
void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, const String& rTxt)
{
@@ -92,7 +87,7 @@ void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, con
SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, rMarkList.GetMark(0)->GetMarkedSdrObj());
uno::Reference< awt::XControlModel > xControlModel = pUnoCtrl->GetUnoControlModel();
- ASSERT( xControlModel.is(), "UNO-Control ohne Model" );
+ OSL_ENSURE( xControlModel.is(), "UNO-Control without Model" );
if( !xControlModel.is() )
return;
@@ -140,4 +135,4 @@ void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, con
rSh.EndAction();
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index ea30db9235c5..f0c92a514839 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/************ *************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,7 +56,6 @@
#include <view.hxx>
#include <wrtsh.hxx>
#include <basesh.hxx>
-#include <wrtsh.hxx>
#include <flddat.hxx>
#include <numrule.hxx>
#include <textsh.hxx>
@@ -71,7 +71,6 @@
#include <shells.hrc>
#include <sfx2/app.hxx>
-#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
#include "swabstdlg.hxx"
#include "dialog.hrc"
@@ -84,7 +83,6 @@
using namespace nsSwDocInfoSubType;
-
extern sal_Bool bNoInterrupt; // in mainwn.cxx
String& lcl_AppendRedlineStr( String& rStr, sal_uInt16 nRedlId )
@@ -104,7 +102,6 @@ String& lcl_AppendRedlineStr( String& rStr, sal_uInt16 nRedlId )
}
// STATIC DATA -----------------------------------------------------------
-
void SwTextShell::ExecField(SfxRequest &rReq)
{
SwWrtShell& rSh = GetShell();
@@ -150,10 +147,10 @@ void SwTextShell::ExecField(SfxRequest &rReq)
default:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
SfxAbstractDialog* pDlg = pFact->CreateSwFldEditDlg( GetView(),RC_DLG_SWFLDEDITDLG );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
}
@@ -241,7 +238,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
if( SFX_ITEM_SET == pArgs->GetItemState(
FN_PARAM_FIELD_FORMAT, sal_False, &pItem ))
nFormat = ((SfxUInt32Item *)pItem)->GetValue();
- DBG_WARNING("Command is not yet used");
+ OSL_ENSURE(false, "Command is not yet used");
sal_Unicode cSeparator = ' ';
SwInsertFld_Data aData(nType, 0, aPar1, aPar2, nFormat, GetShellPtr(), cSeparator );
bRes = aFldMgr.InsertFld(aData);
@@ -402,7 +399,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
if (pRedline)
{
sComment = pRedline->GetComment();
- if ( sComment == String(rtl::OUString::createFromAscii("")) )
+ if ( !sComment.Len() )
GetView().GetDocShell()->Broadcast(SwRedlineHint(pRedline,SWREDLINE_INSERTED));
const_cast<SwRedline*>(pRedline)->Broadcast(SwRedlineHint(pRedline,SWREDLINE_FOCUS,&GetView()));
}
@@ -419,9 +416,9 @@ void SwTextShell::ExecField(SfxRequest &rReq)
sal_Bool bTravel = sal_False;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::DialogGetRanges fnGetRange = pFact->GetDialogGetRangesFunc( RID_SVXDLG_POSTIT );
- DBG_ASSERT(fnGetRange, "Dialogdiet fail! GetRanges()");
+ OSL_ENSURE(fnGetRange, "Dialogdiet fail! GetRanges()");
SfxItemSet aSet(GetPool(), fnGetRange());
aSet.Put(SvxPostItTextItem(sComment.ConvertLineEnd(), SID_ATTR_POSTIT_TEXT));
aSet.Put(SvxPostItAuthorItem(pRedline->GetAuthorString(), SID_ATTR_POSTIT_AUTHOR));
@@ -464,9 +461,9 @@ void SwTextShell::ExecField(SfxRequest &rReq)
bTravel |= bNext|bPrev;
SvxAbstractDialogFactory* pFact2 = SvxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact2, "Dialogdiet fail!");
+ OSL_ENSURE(pFact2, "Dialogdiet fail!");
AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, sal_True );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->HideAuthor();
String sTitle(SW_RES(STR_REDLINE_COMMENT));
@@ -525,10 +522,10 @@ void SwTextShell::ExecField(SfxRequest &rReq)
else
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractJavaEditDialog* pDlg = pFact->CreateJavaEditDialog( DLG_JAVAEDIT,
pMDI, &rSh);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() )
{
aType = pDlg->GetType();
@@ -604,7 +601,7 @@ FIELD_INSERT:
}
break;
default:
- ASSERT(sal_False, falscher Dispatcher);
+ OSL_ENSURE(false, "wrong dispatcher");
return;
}
}
@@ -641,12 +638,6 @@ void SwTextShell::StateField( SfxItemSet &rSet )
break;
case FN_EDIT_FIELD:
{
- /* #108536# Fields can be selected, too now. Removed
-
- if( rSh.HasSelection() )
- rSet.DisableItem(nWhich);
- else ...
- */
if( !bGetField )
{
@@ -722,11 +713,6 @@ void SwTextShell::StateField( SfxItemSet &rSet )
}
}
-/*---------------------------------------------------------------------------
- Beschreibung:
- ----------------------------------------------------------------------------*/
-
-
void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
{
const String& rName = rHlnkItem.GetName();
@@ -891,4 +877,4 @@ IMPL_LINK( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog *, pBtn )
return 0;
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/textglos.cxx b/sw/source/ui/shells/textglos.cxx
index fab748cf45f8..17d8a6cbb40e 100644
--- a/sw/source/ui/shells/textglos.cxx
+++ b/sw/source/ui/shells/textglos.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,7 @@
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
-#include "errhdl.hxx"
#include "view.hxx"
-#include "initui.hxx"
#include "cmdid.h"
#include "textsh.hxx"
#include "initui.hxx"
@@ -46,7 +45,6 @@
#include <misc.hrc>
// STATIC DATA -----------------------------------------------------------
-
void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
sal_uInt16 nSlot = rReq.GetSlot();
@@ -88,7 +86,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
aShortName = (( const SfxStringItem *)pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
@@ -104,7 +102,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
String aGroup = (( const SfxStringItem *)pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
@@ -120,7 +118,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem ))
aName = (( const SfxStringItem *)pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
@@ -131,7 +129,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
}
break;
default:
- ASSERT(sal_False, falscher Dispatcher);
+ OSL_ENSURE(false, "wrong dispatcher");
return;
}
if(bUpdateList)
@@ -142,4 +140,4 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
}
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx
index 81238471dcbe..c052ff5d6963 100644
--- a/sw/source/ui/shells/textidx.cxx
+++ b/sw/source/ui/shells/textidx.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,9 +52,7 @@
#include <index.hrc>
#include <globals.hrc>
-
// STATIC DATA -----------------------------------------------------------
-
void SwTextShell::ExecIdx(SfxRequest &rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
@@ -70,9 +69,9 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
case FN_EDIT_AUTH_ENTRY_DLG :
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
VclAbstractDialog* pDlg = pFact->CreateVclAbstractDialog( pMDI, GetShell(), DLG_EDIT_AUTHMARK);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
}
@@ -98,19 +97,19 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
{ // Mehrere Marken, welche solls denn sein ?
//
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
VclAbstractDialog* pMultDlg = pFact->CreateMultiTOXMarkDlg( DLG_MULTMRK,
pMDI, aMgr);
- DBG_ASSERT(pMultDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pMultDlg, "Dialogdiet fail!");
nRet = pMultDlg->Execute();
delete pMultDlg;
}
if( nRet == RET_OK)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
VclAbstractDialog* pDlg = pFact->CreateIndexMarkModalDlg( DLG_EDIT_IDXMARK, pMDI, GetShell(), aMgr.GetCurTOXMark() );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
}
@@ -155,11 +154,11 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
aSet.Put(*pSet);
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractMultiTOXTabDialog* pDlg = pFact->CreateMultiTOXTabDialog( DLG_MULTI_TOX,
pMDI, aSet, rSh, (SwTOXBase* )pCurTOX,
USHRT_MAX, bGlobal);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
}
@@ -168,18 +167,17 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
{
SwWrtShell& rSh = GetShell();
const SwTOXBase* pBase = rSh.GetCurTOX();
- DBG_ASSERT(pBase, "no TOXBase to remove");
+ OSL_ENSURE(pBase, "no TOXBase to remove");
if( pBase )
rSh.DeleteTOX(*pBase, sal_True);
}
break;
default:
- ASSERT(!this, falscher Dispatcher);
+ OSL_ENSURE(!this, "wrong dispatcher");
return;
}
}
-
void SwTextShell::GetIdxState(SfxItemSet &rSet)
{
SwWrtShell& rSh = GetShell();
@@ -215,7 +213,7 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, sal_True));
}
- else //if( SFX_ITEM_UNKNOWN != rSet.GetItemState( FN_EDIT_IDX_ENTRY_DLG ))
+ else
{
sal_Bool bEnableEdit = sal_True;
@@ -257,5 +255,4 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
}
}
-// -----------------------------------------------------------------------
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 6ed0e3050f26..c3e8248a5578 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -127,12 +128,6 @@ using ::rtl::OUString;
#include <frmui.hrc>
#include <unomid.h>
-
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SFX_IMPL_INTERFACE(SwTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_TEXT))
{
SFX_POPUPMENU_REGISTRATION(SW_RES(MN_TEXT_POPUPMENU));
@@ -144,18 +139,14 @@ SFX_IMPL_INTERFACE(SwTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_TEXT))
SFX_CHILDWINDOW_REGISTRATION(SID_RUBY_DIALOG);
}
-
-
TYPEINIT1(SwTextShell,SwBaseShell)
-
-
void SwTextShell::ExecInsert(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- ASSERT( !rSh.IsObjSelected() && !rSh.IsFrmSelected(),
- "Falsche Shell auf dem Dispatcher" );
+ OSL_ENSURE( !rSh.IsObjSelected() && !rSh.IsFrmSelected(),
+ "wrong shell on dispatcher" );
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
@@ -261,7 +252,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY );
if ( xSet.is() )
{
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginURL"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")),
uno::makeAny( ::rtl::OUString( pURL->GetMainURL( INetURLObject::NO_DECODE ) ) ) );
}
}
@@ -312,7 +303,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
try
{
if ( sClassLocation.Len() )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginURL"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")),
uno::makeAny(
::rtl::OUString(
URIHelper::SmartRel2Abs(
@@ -322,7 +313,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
if ( aCommandList.Count() )
{
aCommandList.FillSequence( aSeq );
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginCommands"), uno::makeAny( aSeq ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")), uno::makeAny( aSeq ) );
}
}
catch ( uno::Exception& )
@@ -336,7 +327,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
else
{
- DBG_ASSERT( !pNameItem || nSlot == SID_INSERT_OBJECT, "Superfluous argument!" );
+ OSL_ENSURE( !pNameItem || nSlot == SID_INSERT_OBJECT, "Superfluous argument!" );
rSh.InsertObject( xObj, pName, sal_True, nSlot);
rReq.Done();
}
@@ -372,31 +363,27 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
aMargin = pMarginItem->GetSize();
if ( pURLItem )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameURL"), uno::makeAny( ::rtl::OUString( pURLItem->GetValue() ) ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")), uno::makeAny( ::rtl::OUString( pURLItem->GetValue() ) ) );
if ( pNameItem )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameName"), uno::makeAny( ::rtl::OUString( pNameItem->GetValue() ) ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")), uno::makeAny( ::rtl::OUString( pNameItem->GetValue() ) ) );
if ( eScroll == ScrollingAuto )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoScroll"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll")),
uno::makeAny( sal_True ) );
else
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsScrollingMode"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode")),
uno::makeAny( (sal_Bool) ( eScroll == ScrollingYes) ) );
- //if ( aFrmDescr.IsFrameBorderSet() )
if ( pBorderItem )
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsBorder"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder")),
uno::makeAny( (sal_Bool) pBorderItem->GetValue() ) );
- /*else
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoBorder"),
- makeAny( sal_True ) );*/
if ( pMarginItem )
{
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginWidth"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth")),
uno::makeAny( sal_Int32( aMargin.Width() ) ) );
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginHeight"),
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight")),
uno::makeAny( sal_Int32( aMargin.Height() ) ) );
}
}
@@ -433,9 +420,6 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
{
SwFrmFmt* pTblFmt = GetShell().GetTableFmt();
String aCurrentTblName = pTblFmt->GetName();
- // String aText( String::CreateFromAscii("<.>") ); // was used for UI
- // aText.Insert( rWrtShell.GetBoxNms(), 2);
- // aText.Insert( aCurrentTblName, 1 );
aRangeString = aCurrentTblName;
aRangeString += OUString::valueOf( sal_Unicode('.') );
aRangeString += GetShell().GetBoxNms();
@@ -576,7 +560,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
else
{
- static sal_uInt16 __READONLY_DATA aFrmAttrRange[] =
+ static sal_uInt16 aFrmAttrRange[] =
{
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
@@ -612,10 +596,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, GetView().GetDocShell()));
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_STD,
GetView().GetViewFrame(), &GetView().GetViewFrame()->GetWindow(), aSet, sal_True);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(pDlg->Execute() && pDlg->GetOutputItemSet())
{
//local variable necessary at least after call of .AutoCaption() because this could be deleted at this point
@@ -678,10 +662,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
else
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractInsertGrfRulerDlg* pDlg = pFact->CreateInsertGrfRulerDlg( DLG_INSERT_RULER,
pParent );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
// MessageBox fuer fehlende Grafiken
if(!pDlg->HasImages())
InfoBox( pParent, SW_RES(MSG_NO_RULER)).Execute();
@@ -733,16 +717,16 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_FORMAT_COLUMN :
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
VclAbstractDialog* pColDlg = pFact->CreateVclAbstractDialog( GetView().GetWindow(), rSh, DLG_COLUMN);
- DBG_ASSERT(pColDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pColDlg, "Dialogdiet fail!");
pColDlg->Execute();
delete pColDlg;
}
break;
default:
- ASSERT( !this, "falscher Dispatcher" );
+ OSL_ENSURE(!this, "wrong dispatcher");
return;
}
}
@@ -755,7 +739,6 @@ bool lcl_IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
return bRet;
}
-
void SwTextShell::StateInsert( SfxItemSet &rSet )
{
sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
@@ -893,7 +876,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 :
@@ -923,10 +906,6 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwTextShell::ExecDelete(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
@@ -966,7 +945,7 @@ void SwTextShell::ExecDelete(SfxRequest &rReq)
rSh.DelLine();
break;
default:
- ASSERT(!this, "falscher Dispatcher");
+ OSL_ENSURE(!this, "wrong dispatcher");
return;
}
rReq.Done();
@@ -1011,7 +990,7 @@ void SwTextShell::ExecTransliteration( SfxRequest & rReq )
break;
default:
- ASSERT(!this, "falscher Dispatcher");
+ OSL_ENSURE(!this, "wrong dispatcher");
}
if( nMode )
@@ -1019,13 +998,6 @@ void SwTextShell::ExecTransliteration( SfxRequest & rReq )
}
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
SwTextShell::SwTextShell(SwView &_rView) :
SwBaseShell(_rView), pPostItFldMgr( 0 )
{
@@ -1033,18 +1005,10 @@ SwTextShell::SwTextShell(SwView &_rView) :
SetHelpId(SW_TEXTSHELL);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwTextShell::~SwTextShell()
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwTextShell::InsertSymbol( SfxRequest& rReq )
{
const SfxItemSet *pArgs = rReq.GetArgs();
@@ -1126,7 +1090,6 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
delete pDlg;
}
- sal_Bool bFontChanged = sal_False;
if( aChars.Len() )
{
rSh.StartAllAction();
@@ -1159,7 +1122,6 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
// #108876# a font attribute has to be set always due to a guessed script type
if( aNewFont.GetName().Len() )
{
- bFontChanged = sal_True;
SvxFontItem aNewFontItem( aFont );
aNewFontItem.GetFamilyName() = aNewFont.GetName();
aNewFontItem.GetFamily() = aNewFont.GetFamily();
@@ -1219,4 +1181,4 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
}
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index db0bbe8599e5..c987ba495d1f 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,7 +103,6 @@
#include <web.hrc>
#include "paratr.hxx"
#include <crsskip.hxx>
-#include <docstat.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/app.hxx>
#include <breakit.hxx>
@@ -116,7 +116,6 @@
#include <IDocumentStatistics.hxx>
#include <sfx2/sfxdlg.hxx>
-#include <svl/languageoptions.hxx>
#include <unotools/lingucfg.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/util/XChangesBatch.hpp>
@@ -132,7 +131,6 @@
using namespace ::com::sun::star;
-
void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq )
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rWrtSh.GetView()));
@@ -182,10 +180,10 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,c
if ( bUseDialog && GetActiveView() )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pDlg = pFact->CreateSwCharDlg( rWrtSh.GetView().GetWindow(), rWrtSh.GetView(), aCoreSet, DLG_CHAR );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( FN_INSERT_HYPERLINK == nSlot )
pDlg->SetCurPageId(TP_CHAR_URL);
}
@@ -262,10 +260,6 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,c
delete pDlg;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
short lcl_AskRedlineMode(Window *pWin)
{
MessBox aQBox( pWin, 0,
@@ -429,7 +423,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
String aStr;
SFX_REQUEST_ARG( rReq, pFont, SfxStringItem, FN_PARAM_1 , sal_False );
-// SFX_REQUEST_ARG( rReq, pCharset, SfxInt16Item, FN_PARAM_2 , sal_False );
SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, nSlot , sal_False );
if ( pNameItem )
aStr = pNameItem->GetValue();
@@ -444,7 +437,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
SvxFontItem aFont( rFont.GetFamily(), pFont->GetValue(),
rFont.GetStyleName(), rFont.GetPitch(), RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT );
- //pCharset ? (CharSet) pCharset->GetValue() : RTL_TEXTENCODING_DONTKNOW );
rWrtSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
rWrtSh.ResetSelect(0, sal_False);
rWrtSh.EndSelect();
@@ -457,10 +449,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_INSERT_FOOTNOTE_DLG:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE,
GetView().GetWindow(), rWrtSh, sal_False );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->SetHelpId(GetStaticInterface()->GetSlot(nSlot)->GetCommand());
if ( pDlg->Execute() == RET_OK )
{
@@ -470,7 +462,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
aReq.AppendItem( SfxStringItem( nId, pDlg->GetStr() ) );
if ( pDlg->GetFontName().Len() )
aReq.AppendItem( SfxStringItem( FN_PARAM_1, pDlg->GetFontName() ) );
- //aReq.AppendItem( SfxStringItem( FN_PARAM_2, pDlg->GetCharSet() ) );
ExecuteSlot( aReq );
}
@@ -481,10 +472,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_FORMAT_FOOTNOTE_DLG:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( GetView().GetWindow(), rWrtSh, DLG_DOC_FOOTNOTE );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
break;
@@ -501,21 +492,19 @@ void SwTextShell::Execute(SfxRequest &rReq)
// remove the languages from that)
SvUShortsSort aAttribs;
- sal_uInt16 __FAR_DATA aResetableSetRange[] = {
+ sal_uInt16 aResetableSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_LANGUAGE - 1,
RES_CHRATR_LANGUAGE + 1, RES_CHRATR_CJK_LANGUAGE - 1,
RES_CHRATR_CJK_LANGUAGE + 1, RES_CHRATR_CTL_LANGUAGE - 1,
RES_CHRATR_CTL_LANGUAGE + 1, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
- RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY,
RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
- sal_uInt16 __FAR_DATA *pUShorts = aResetableSetRange;
+ sal_uInt16 *pUShorts = aResetableSetRange;
while (*pUShorts)
{
sal_uInt16 nL = pUShorts[1] - pUShorts[0] + 1;
@@ -546,10 +535,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
else
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwBreakDlg* pDlg = pFact->CreateSwBreakDlg( GetView().GetWindow(), rWrtSh, DLG_BREAK );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() == RET_OK )
{
nKind = pDlg->GetKind();
@@ -594,10 +583,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
else
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
VclAbstractDialog* pDlg = pFact->CreateSwInsertBookmarkDlg( GetView().GetWindow(), rWrtSh, rReq, DLG_INSERT_BOOKMARK );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
}
@@ -627,10 +616,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
pVFrame->ToggleChildWindow(FN_REDLINE_ACCEPT);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwModalRedlineAcceptDlg* pDlg = pFact->CreateSwModalRedlineAcceptDlg( &GetView().GetEditWin(), DLG_MOD_REDLINE_ACCEPT );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
switch (lcl_AskRedlineMode(&GetView().GetEditWin()))
{
@@ -692,10 +681,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_SORTING_DLG:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
VclAbstractDialog* pDlg = pFact->CreateVclAbstractDialog( GetView().GetWindow(), rWrtSh, DLG_SORTING );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
rReq.Done();
@@ -705,10 +694,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
SfxItemSet aTmp(GetPool(), FN_PARAM_1, FN_PARAM_1);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_TAB_OUTLINE,
GetView().GetWindow(), &aTmp, rWrtSh);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
rReq.Done();
@@ -877,11 +866,13 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView()));
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
+
+ sal_Bool bApplyCharUnit = ::HasCharUnit(0 != PTR_CAST(SwWebView, &GetView()));
+ SW_MOD()->PutItem(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bApplyCharUnit));
+
SfxItemSet aCoreSet( GetPool(),
RES_PARATR_BEGIN, RES_PARATR_END - 1,
- // --> OD 2008-02-25 #refactorlists#
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1,
- // <--
RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
SID_ATTR_TABSTOP_POS, SID_ATTR_TABSTOP_POS,
SID_ATTR_TABSTOP_DEFAULTS, SID_ATTR_TABSTOP_DEFAULTS,
@@ -894,10 +885,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
FN_NUMBER_NEWSTART, FN_NUMBER_NEWSTART_AT,
FN_DROP_TEXT, FN_DROP_CHAR_STYLE_NAME,
0);
- // --> OD 2008-01-16 #newlistlevelattrs#
// get also the list level indent values merged as LR-SPACE item, if needed.
rWrtSh.GetCurAttr( aCoreSet, true );
- // <--
aCoreSet.Put(SfxUInt16Item(SID_HTML_MODE,
::GetHtmlMode(GetView().GetDocShell())));
@@ -935,12 +924,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
SfxBoolItem aStart( FN_NUMBER_NEWSTART, rWrtSh.IsNumRuleStart() );
aCoreSet.Put(aStart);
- // --> OD 2008-02-29 #refactorlists#
-// SfxUInt16Item aStartAt(FN_NUMBER_NEWSTART_AT,
-// rWrtSh.IsNodeNumStart());
SfxUInt16Item aStartAt( FN_NUMBER_NEWSTART_AT,
rWrtSh.GetNodeNumStart() );
- // <--
aCoreSet.Put(aStartAt);
}
SfxAbstractTabDialog* pDlg = NULL;
@@ -948,10 +933,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
if ( bUseDialog && GetActiveView() )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet,DLG_STD, DLG_PARA,NULL, sal_False, nDefPage );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
}
SfxItemSet* pSet = NULL;
if ( !bUseDialog )
@@ -1006,14 +991,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
if( pSet->Count() )
{
rWrtSh.StartAction();
-// rWrtSh.StartUndo( UNDO_START );
if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, sal_False, &pItem) )
{
if ( ((SfxStringItem*)pItem)->GetValue().Len() )
rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
}
rWrtSh.SetAttr( *pSet );
-// rWrtSh.EndUndo( UNDO_END );
rWrtSh.EndAction();
SwTxtFmtColl* pColl = rWrtSh.GetCurTxtFmtColl();
if(pColl && pColl->IsAutoUpdateFmt())
@@ -1062,7 +1045,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
break;
case FN_NUM_CONTINUE:
{
- // --> OD 2008-03-18 #refactorlists#
String sContinuedListId;
const SwNumRule* pRule =
rWrtSh.SearchNumRule( false, true, false, -1, sContinuedListId );
@@ -1077,7 +1059,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
rWrtSh.SetCurNumRule( *pRule, false, sContinuedListId );
}
- // <--
}
break;
case FN_SELECT_PARA:
@@ -1111,30 +1092,15 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwEditWin& rEditWin = GetView().GetEditWin();
rEditWin.SetTextColor(aSet);
SwApplyTemplate* pApply = rEditWin.GetApplyTemplate();
- SvxColorItem aItem(aSet, RES_CHRATR_COLOR);
- // besteht eine Selektion, wird sie gleich gefaerbt
- if(!pApply && rWrtSh.HasSelection())
+ // If there is a selection, then set the color on it
+ // otherwise, it'll be the color for the next text to be typed
+ if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT)
{
rWrtSh.SetAttr(SvxColorItem (aSet, RES_CHRATR_COLOR));
}
- else if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT)
- {
- GetView().GetViewFrame()->GetDispatcher()->Execute(SID_ATTR_CHAR_COLOR_EXT);
- }
rReq.Done();
-/* OS 22.02.97 18:40 Das alte Verhalten ist unerwuenscht
- SwEditWin& rEdtWin = GetView().GetEditWin();
-
- SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
- SvxColorItem aItem(aSet, RES_CHRATR_COLOR);
-
- if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT)
- {
- GetShell().SetAttr(aItem);
- }
-*/
}
}
break;
@@ -1165,15 +1131,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
rReq.Done();
-/* OS 22.02.97 18:40 Das alte Verhalten ist unerwuenscht
- if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_BACKGROUND_EXT)
- {
- Brush aBrush(pItem ? BRUSH_SOLID : BRUSH_NULL);
- if(pItem)
- aBrush.SetColor( aSet );
- GetShell().SetAttr( SvxBrushItem(aBrush, RES_CHRATR_BACKGROUND) );
- }
-*/
}
break;
case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT:
@@ -1288,7 +1245,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
try
{
- uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
+ uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY);
if( xDialog.is() )
{
xDialog->execute();
@@ -1334,7 +1291,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractSwWordCountDialog* pDialog = pFact->CreateSwWordCountDialog( GetView().GetWindow() );
pDialog->SetValues(aCurr, aDocStat );
pDialog->Execute();
@@ -1342,17 +1299,11 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
break;
default:
- ASSERT(!this, falscher Dispatcher);
+ OSL_ENSURE(!this, "wrong dispatcher");
return;
}
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwTextShell::GetState( SfxItemSet &rSet )
{
SwWrtShell &rSh = GetShell();
@@ -1592,7 +1543,6 @@ void SwTextShell::GetState( SfxItemSet &rSet )
GetViewFrame()->GetChildWindow( nWhich ) ));
break;
case FN_EDIT_HYPERLINK:
- case FN_REMOVE_HYPERLINK:
case FN_COPY_HYPERLINK_LOCATION:
{
SfxItemSet aSet(GetPool(),
@@ -1605,6 +1555,20 @@ void SwTextShell::GetState( SfxItemSet &rSet )
}
}
break;
+ case FN_REMOVE_HYPERLINK:
+ {
+ SfxItemSet aSet(GetPool(),
+ RES_TXTATR_INETFMT,
+ RES_TXTATR_INETFMT);
+ rSh.GetCurAttr(aSet);
+
+ // If a hyperlink is selected, either alone or along with other text...
+ if( ((SFX_ITEM_DONTCARE & aSet.GetItemState( RES_TXTATR_INETFMT, sal_True )) == 0) || rSh.HasReadonlySel())
+ {
+ rSet.DisableItem(nWhich);
+ }
+ }
+ break;
case SID_TRANSLITERATE_HALFWIDTH:
case SID_TRANSLITERATE_FULLWIDTH:
case SID_TRANSLITERATE_HIRAGANA:
@@ -1683,13 +1647,6 @@ void SwTextShell::GetState( SfxItemSet &rSet )
break;
case FN_NUM_CONTINUE:
{
- // --> OD 2009-08-26 #i86492#
- // Allow continuation of previous list, even if at current cursor
- // a list is active.
-// if ( rSh.GetCurNumRule() )
-// rSet.DisableItem(nWhich);
-// else
- // <--
{
// --> OD 2009-08-26 #i86492#
// Search also for bullet list
@@ -1722,6 +1679,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
nWhich = aIter.NextWhich();
}
}
+
/* -----------------------------2002/07/05 10:31------------------------------
Switch on/off header of footer of a page style - if an empty name is
given all styles are changed
@@ -1730,6 +1688,7 @@ void SwTextShell::ChangeHeaderOrFooter(
const String& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning)
{
SwWrtShell& rSh = GetShell();
+ rSh.addCurrentPosition();
rSh.StartAllAction();
rSh.StartUndo( UNDO_HEADER_FOOTER ); // #i7983#
sal_Bool bExecute = sal_True;
@@ -1742,9 +1701,9 @@ void SwTextShell::ChangeHeaderOrFooter(
String sTmp(aDesc.GetName());
if( !rStyleName.Len() || rStyleName == sTmp )
{
- if( bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() &&
- ((bHeader && aDesc.GetMaster().GetHeader().IsActive()) ||
- (!bHeader && aDesc.GetMaster().GetFooter().IsActive())))
+ if( (bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() &&
+ (bHeader && aDesc.GetMaster().GetHeader().IsActive())) ||
+ (!bHeader && aDesc.GetMaster().GetFooter().IsActive()))
{
bShowWarning = sal_False;
//Actions have to be closed while the dialog is showing
@@ -1788,3 +1747,4 @@ void SwTextShell::ChangeHeaderOrFooter(
rSh.EndAllAction();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/textsh2.cxx b/sw/source/ui/shells/textsh2.cxx
index 3fe98d06eb45..00f0b25c8f7c 100644
--- a/sw/source/ui/shells/textsh2.cxx
+++ b/sw/source/ui/shells/textsh2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
-#if STLPORT_VERSION>=321
#include <cstdarg>
-#endif
#include <svtools/svmedit.hxx>
#include <svl/eitem.hxx>
@@ -40,9 +39,7 @@
#include <sfx2/event.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <svl/stritem.hxx>
#include <svl/itemset.hxx>
#include <sfx2/request.hxx>
@@ -90,7 +87,6 @@ using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::beans;
-
#define DB_DD_DELIM 0x0b
struct DBTextStruct_Impl
@@ -100,10 +96,7 @@ struct DBTextStruct_Impl
Reference<XResultSet> xCursor;
Reference<XConnection> xConnection;
};
-inline void AddSelList( List& rLst, long nRow )
-{
- rLst.Insert( (void*)nRow , LIST_APPEND );
-}
+
void SwTextShell::ExecDB(SfxRequest &rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
@@ -251,15 +244,11 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
break;
default:
- ASSERT(!this, falscher Dispatcher);
+ OSL_ENSURE(!this, "wrong dispatcher");
return;
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl*, pDBStruct )
{
if( pDBStruct )
@@ -288,7 +277,7 @@ IMPL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl*, pDBStruct )
{
SwDBData aDBData = pDBStruct->aDBData;
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
::std::auto_ptr<AbstractSwInsertDBColAutoPilot>pDlg (pFact->CreateSwInsertDBColAutoPilot( pThis->GetView(),
xSource,
xColSupp,
@@ -308,5 +297,4 @@ IMPL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl*, pDBStruct )
return 0;
}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx
index f699e2cc3853..31a179e3549d 100644
--- a/sw/source/ui/shells/txtattr.cxx
+++ b/sw/source/ui/shells/txtattr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <hintids.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <svl/whiter.hxx>
#include <svl/stritem.hxx>
#include <svl/itemiter.hxx>
@@ -52,29 +51,19 @@
#include "paratr.hxx"
#include <fmtinfmt.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <viewopt.hxx>
#include <uitool.hxx>
-#ifndef _TEXTSH_HXX
#include <textsh.hxx>
-#endif
#include <num.hxx>
#include <swundo.hxx>
#include <fmtcol.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <globals.h>
-#ifndef _SHELLS_HRC
#include <shells.hrc>
-#endif
#include <SwStyleNameMapper.hxx>
#include "swabstdlg.hxx"
#include "chrdlg.hrc"
@@ -191,7 +180,7 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
rSh.DontExpandFmt();
break;
default:
- ASSERT(sal_False, falscher Dispatcher);
+ OSL_ENSURE(false, "wrong dispatcher");
return;
}
}
@@ -291,72 +280,11 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
break;
default:
- ASSERT(sal_False, falscher Dispatcher);
+ OSL_ENSURE(false, "wrong dispatcher");
return;
}
}
-
-
-#ifdef CFRONT
-
-void lcl_SetAdjust(SvxAdjust eAdjst, SfxItemSet& rSet)
-{
- rSet.Put(SvxAdjustItem(eAdjst,RES_PARATR_ADJUST ));
-}
-
-
-
-void lcl_SetLineSpace(sal_uInt8 ePropL,SfxItemSet& rSet)
-{
- SvxLineSpacingItem aLineSpacing(ePropL, RES_PARATR_LINESPACING );
- aLineSpacing.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
- if( 100 == ePropL )
- aLineSpacing.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF;
- else
- aLineSpacing.SetPropLineSpace(ePropL);
- rSet.Put( aLineSpacing );
-}
-
-
-
-void SwTextShell::ExecParaAttr(SfxRequest &rReq)
-{
- // gleiche beide Attribute holen, ist nicht teuerer !!
- SfxItemSet aSet( GetPool(), RES_PARATR_LINESPACING, RES_PARATR_ADJUST );
-
- switch (rReq.GetSlot())
- {
- case FN_SET_LEFT_PARA: lcl_SetAdjust(ADJLEFT,aSet); break;
- case FN_SET_RIGHT_PARA: lcl_SetAdjust(ADJRIGHT,aSet); break;
- case FN_SET_CENTER_PARA: lcl_SetAdjust(ADJCENTER,aSet); break;
- case SID_ATTR_PARA_ADJUST_BLOCK:lcl_SetAdjust(ADJBLOCK,aSet); break;
-
- case FN_SET_LINE_SPACE_1: lcl_SetLineSpace(100,aSet); break;
- case FN_SET_LINE_SPACE_15: lcl_SetLineSpace(150,aSet); break;
- case FN_SET_LINE_SPACE_2: lcl_SetLineSpace(200,aSet); break;
-
- default:
- DBG_ERROR("SwTextShell::ExecParaAttr falscher Dispatcher");
- return;
- }
- SwWrtShell& rWrtSh = GetShell();
- SwTxtFmtColl* pColl = rWrtSh.GetCurTxtFmtColl();
- if(pColl && pColl->IsAutoUpdateFmt())
- {
- rWrtSh.AutoUpdatePara(pColl, *pSet);
- }
- else
- {
- rWrtSh.SetAttr( aSet );
- rReq.Done( aSet );
- }
-}
-
-#else
-
-
-
void SwTextShell::ExecParaAttr(SfxRequest &rReq)
{
SvxAdjust eAdjst;
@@ -431,14 +359,7 @@ SET_LINESPACE:
int eState = pArgs ? pArgs->GetItemState(nSlot) : SFX_ITEM_DISABLED;
if (pArgs && SFX_ITEM_SET == eState)
bSet = ((const SfxBoolItem&)pArgs->Get(nSlot)).GetValue();
-/*
-// toggling of the slots not used anymore
-
- if(!bSet)
- nSlot = SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot ?
- SID_ATTR_PARA_RIGHT_TO_LEFT :
- SID_ATTR_PARA_LEFT_TO_RIGHT;
-*/
+
SfxItemSet aAdjustSet( GetPool(),
RES_PARATR_ADJUST, RES_PARATR_ADJUST );
GetShell().GetCurAttr(aAdjustSet);
@@ -448,7 +369,6 @@ SET_LINESPACE:
{
int eAdjust = (int)(( const SvxAdjustItem& )
aAdjustSet.Get(RES_PARATR_ADJUST)).GetAdjust();
-// bChgAdjust = SVX_ADJUST_CENTER != eAdjust && SVX_ADJUST_BLOCK != eAdjust;
bChgAdjust = (SVX_ADJUST_LEFT == eAdjust && SID_ATTR_PARA_RIGHT_TO_LEFT == nSlot) ||
(SVX_ADJUST_RIGHT == eAdjust && SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot);
}
@@ -485,23 +405,19 @@ SET_LINESPACE:
aRule.SetLevel(i, aFmt, aRule.Get(i) != 0);
}
- // --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule aSetRule( pCurRule->GetName(),
pCurRule->Get( 0 ).GetPositionAndSpaceMode() );
- // <--
aSetRule.SetSvxRule( aRule, GetShell().GetDoc());
aSetRule.SetAutoRule( sal_True );
- // --> OD 2008-03-17 #refactorlists#
// no start or continuation of a list - list style is only changed
GetShell().SetCurNumRule( aSetRule, false );
- // <--
}
}
}
break;
default:
- ASSERT(sal_False, falscher Dispatcher);
+ OSL_ENSURE(false, "wrong dispatcher");
return;
}
SwWrtShell& rWrtSh = GetShell();
@@ -515,10 +431,6 @@ SET_LINESPACE:
rReq.Done();
}
-#endif
-
-
-
void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
@@ -558,11 +470,11 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
HINT_END, HINT_END, 0);
rSh.GetCurAttr(aSet);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(), aSet,
rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), DLG_SWDROPCAPS );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if (pDlg->Execute() == RET_OK)
{
rSh.StartAction();
@@ -604,7 +516,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
break;
default:
- ASSERT(sal_False, falscher Dispatcher);
+ OSL_ENSURE(false, "wrong dispatcher");
return;
}
}
@@ -845,3 +757,4 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx
index 8670a296f4bb..8d302fb8f9de 100644
--- a/sw/source/ui/shells/txtcrsr.cxx
+++ b/sw/source/ui/shells/txtcrsr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,32 +32,22 @@
#include <sfx2/request.hxx>
#include <svl/eitem.hxx>
-#ifndef __SBX_SBXVARIABLE_HXX //autogen
#include <basic/sbxvar.hxx>
-#endif
#include <sfx2/viewfrm.hxx>
#include <sfx2/bindings.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _TEXTSH_HXX
#include <textsh.hxx>
-#endif
#include <num.hxx>
#include <edtwin.hxx>
#include <crsskip.hxx>
#include <doc.hxx>
#include <docsh.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <globals.h>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <svx/svdouno.hxx>
#include <svx/fmshell.hxx>
@@ -106,7 +97,7 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
case FN_CHAR_RIGHT: rSh.Right( CRSR_SKIP_CELLS, bSelect, 1, sal_False, sal_True ); break;
case FN_LINE_UP: rSh.Up ( bSelect, 1 ); break;
case FN_LINE_DOWN: rSh.Down ( bSelect, 1 ); break;
- default: ASSERT(sal_False, falscher Dispatcher); return;
+ default: OSL_ENSURE(false, "wrong Dispatcher"); return;
}
}
@@ -143,7 +134,7 @@ void SwTextShell::ExecMove(SfxRequest &rReq)
case FN_SELECT_WORD: bRet = rSh.SelNearestWrd(); break;
case SID_SELECTALL: bRet = 0 != rSh.SelAll(); break;
- default: ASSERT(sal_False, falscher Dispatcher); return;
+ default: OSL_ENSURE(false, "wrong dispatcher"); return;
}
if ( bRet )
@@ -180,7 +171,7 @@ void SwTextShell::ExecMovePage(SfxRequest &rReq)
case FN_END_OF_PAGE_SEL:
case FN_END_OF_PAGE: rSh.EndPg ( FN_END_OF_PAGE_SEL == nSlot ); break;
- default: ASSERT(sal_False, falscher Dispatcher); return;
+ default: OSL_ENSURE(false, "wrong dispatcher"); return;
}
rReq.Done();
}
@@ -197,7 +188,7 @@ void SwTextShell::ExecMoveCol(SfxRequest &rReq)
case FN_END_OF_NEXT_COLUMN: rSh.EndOfNextColumn ( sal_False ); break;
case FN_START_OF_PREV_COLUMN: rSh.StartOfPrevColumn( sal_False ); break;
case FN_END_OF_PREV_COLUMN: rSh.EndOfPrevColumn ( sal_False ); break;
- default: ASSERT(sal_False, falscher Dispatcher); return;
+ default: OSL_ENSURE(false, "wrong dispatcher"); return;
}
rReq.Done();
}
@@ -208,39 +199,38 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
GetView().GetEditWin().FlushInBuffer();
sal_uInt16 nSlot = rReq.GetSlot();
- sal_Bool bRet = sal_False;
switch ( nSlot )
{
case FN_NEXT_WORD_SEL:
- case FN_NEXT_WORD: bRet = rSh.NxtWrd( FN_NEXT_WORD_SEL == nSlot );
+ case FN_NEXT_WORD: rSh.NxtWrd( FN_NEXT_WORD_SEL == nSlot );
break;
case FN_START_OF_PARA_SEL:
- case FN_START_OF_PARA: bRet = rSh.SttPara( FN_START_OF_PARA_SEL == nSlot );
+ case FN_START_OF_PARA: rSh.SttPara( FN_START_OF_PARA_SEL == nSlot );
break;
case FN_END_OF_PARA_SEL:
- case FN_END_OF_PARA: bRet = rSh.EndPara( FN_END_OF_PARA_SEL == nSlot );
+ case FN_END_OF_PARA: rSh.EndPara( FN_END_OF_PARA_SEL == nSlot );
break;
case FN_PREV_WORD_SEL:
- case FN_PREV_WORD: bRet = rSh.PrvWrd( FN_PREV_WORD_SEL == nSlot );
+ case FN_PREV_WORD: rSh.PrvWrd( FN_PREV_WORD_SEL == nSlot );
break;
case FN_NEXT_SENT_SEL:
- case FN_NEXT_SENT: bRet = rSh.FwdSentence( FN_NEXT_SENT_SEL == nSlot );
+ case FN_NEXT_SENT: rSh.FwdSentence( FN_NEXT_SENT_SEL == nSlot );
break;
case FN_PREV_SENT_SEL:
- case FN_PREV_SENT: bRet = rSh.BwdSentence( FN_PREV_SENT_SEL == nSlot );
+ case FN_PREV_SENT: rSh.BwdSentence( FN_PREV_SENT_SEL == nSlot );
break;
- case FN_NEXT_PARA: bRet = rSh.FwdPara ( sal_False );
+ case FN_NEXT_PARA: rSh.FwdPara ( sal_False );
break;
- case FN_PREV_PARA: bRet = rSh.BwdPara ( sal_False );
+ case FN_PREV_PARA: rSh.BwdPara ( sal_False );
break;
- default: ASSERT(sal_False, falscher Dispatcher); return;
+ default: OSL_ENSURE(false, "wrong dispatcher"); return;
}
rReq.Done();
}
@@ -358,7 +348,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
default:
- ASSERT(sal_False, falscher Dispatcher);
+ OSL_ENSURE(false, "wrong dispatcher");
return;
}
@@ -368,3 +358,4 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx
index d3a8338e9416..6bb50e1e2143 100644
--- a/sw/source/ui/shells/txtnum.cxx
+++ b/sw/source/ui/shells/txtnum.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <hintids.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/request.hxx>
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
@@ -96,10 +95,6 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
break;
case FN_NUMBER_BULLETS:
{
- // --> OD 2008-02-29 #refactorlists#
-// // per default sal_True, damit die Schleife im Dialog richtig arbeitet!
-// sal_Bool bHasChild = sal_True;
- // <--
SfxItemSet aSet(GetPool(),
SID_HTML_MODE, SID_HTML_MODE,
SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
@@ -130,11 +125,9 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False);
aSet.Put(SvxNumBulletItem(aRule));
- // --> OD 2008-02-29 #refactorlists# - removed <bHasChild>
- ASSERT( GetShell().GetNumLevel() < MAXLEVEL,
+ OSL_ENSURE( GetShell().GetNumLevel() < MAXLEVEL,
"<SwTextShell::ExecEnterNum()> - numbered node without valid list level. Serious defect -> please inform OD." );
sal_uInt16 nLevel = GetShell().GetNumLevel();
- // <--
if( nLevel < MAXLEVEL )
{
nLevel = 1<<nLevel;
@@ -143,12 +136,10 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
else
{
- // --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule aRule( GetShell().GetUniqueNumRuleName(),
// --> OD 2008-06-06 #i89178#
numfunc::GetDefaultPositionAndSpaceMode() );
// <--
- // <--
SvxNumRule aSvxRule = aRule.MakeSvxNumRule();
const bool bRightToLeft = GetShell().IsInRightToLeftText( 0 );
@@ -183,10 +174,10 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
pDocSh->PutItem(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(pDocSh)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_SVXTEST_NUM_BULLET,
GetView().GetWindow(), &aSet, GetShell());
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
sal_uInt16 nRet = pDlg->Execute();
const SfxPoolItem* pItem;
if( RET_OK == nRet )
@@ -197,22 +188,18 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
rReq.Done();
SvxNumRule* pSetRule = ((SvxNumBulletItem*)pItem)->GetNumRule();
pSetRule->UnLinkGraphics();
- // --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule aSetRule( pCurRule
? pCurRule->GetName()
: GetShell().GetUniqueNumRuleName(),
// --> OD 2008-06-06 #i89178#
numfunc::GetDefaultPositionAndSpaceMode() );
// <--
- // <--
aSetRule.SetSvxRule( *pSetRule, GetShell().GetDoc());
aSetRule.SetAutoRule( sal_True );
- // --> OD 2008-03-17 #refactorlists#
// No start of new list, if an existing list style is edited.
// Otherwise start a new list.
const bool bCreateList = (pCurRule == 0);
GetShell().SetCurNumRule( aSetRule, bCreateList );
- // <--
}
// wenn der Dialog mit OK verlassen wurde, aber nichts ausgewaehlt
// wurde dann muss die Numerierung zumindest eingeschaltet werden,
@@ -222,18 +209,14 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
rReq.AppendItem( *pItem );
rReq.Done();
SvxNumRule* pSetRule = ((SvxNumBulletItem*)pItem)->GetNumRule();
- // --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule aSetRule( GetShell().GetUniqueNumRuleName(),
// --> OD 2008-06-06 #i89178#
numfunc::GetDefaultPositionAndSpaceMode() );
// <--
- // <--
aSetRule.SetSvxRule(*pSetRule, GetShell().GetDoc());
aSetRule.SetAutoRule( sal_True );
- // --> OD 2008-03-17 #refactorlists#
// start new list
GetShell().SetCurNumRule( aSetRule, true );
- // <--
}
}
else if(RET_USER == nRet)
@@ -243,9 +226,10 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
break;
default:
- ASSERT(sal_False, falscher Dispatcher);
+ OSL_ENSURE(false, "wrong dispatcher");
return;
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/smartmenu/stmenu.cxx b/sw/source/ui/smartmenu/stmenu.cxx
index 2181cc989ca6..16e02a3d13ab 100644
--- a/sw/source/ui/smartmenu/stmenu.cxx
+++ b/sw/source/ui/smartmenu/stmenu.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,12 +37,8 @@
#include <SwSmartTagMgr.hxx>
-#ifndef _STMENU_HRC
#include <stmenu.hrc>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <breakit.hxx>
#define C2U(cChar) rtl::OUString::createFromAscii(cChar)
@@ -57,8 +54,6 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
mpSwView ( pSwView ),
mxTextRange( xTextRange )
{
- //CreateAutoMnemonics();
-
Reference <frame::XController> xController = mpSwView->GetController();
const lang::Locale aLocale( SW_BREAKITER()->GetLocale( (LanguageType)GetAppLanguage() ) );
@@ -184,3 +179,5 @@ sal_uInt16 SwSmartTagPopup::Execute( const Rectangle& rWordPos, Window* pWin )
return nId;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx
index ce370ced3304..3df6dab4a02e 100644
--- a/sw/source/ui/table/chartins.cxx
+++ b/sw/source/ui/table/chartins.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,7 +83,7 @@ Point SwGetChartDialogPos( const Window *pParentWin, const Size& rDialogSize, co
Point aRet;
- DBG_ASSERT( pParentWin, "Window not found" );
+ OSL_ENSURE( pParentWin, "Window not found" );
if (pParentWin)
{
Rectangle aObjPixel = pParentWin->LogicToPixel( rLogicChart, pParentWin->GetMapMode() );
@@ -148,11 +149,6 @@ Point SwGetChartDialogPos( const Window *pParentWin, const Size& rDialogSize, co
return aRet;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
void SwInsertChart(Window* pParent, SfxBindings* pBindings )
{
(void) pParent;
@@ -177,9 +173,6 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
{
SwFrmFmt* pTblFmt = rWrtShell.GetTableFmt();
String aCurrentTblName = pTblFmt->GetName();
-// String aText( String::CreateFromAscii("<.>") ); // was used for UI
-// aText.Insert( rWrtShell.GetBoxNms(), 2);
-// aText.Insert( aCurrentTblName, 1 );
aRangeString = aCurrentTblName;
aRangeString += OUString::valueOf( sal_Unicode('.') );
aRangeString += rWrtShell.GetBoxNms();
@@ -203,7 +196,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
{
uno::Reference< ui::dialogs::XExecutableDialog > xDialog(
xMCF->createInstanceWithContext(
- C2U("com.sun.star.comp.chart2.WizardDialog")
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.chart2.WizardDialog"))
, xContext), uno::UNO_QUERY);
uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY );
if( xInit.is() )
@@ -213,10 +206,10 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
uno::Sequence<uno::Any> aSeq(2);
uno::Any* pArray = aSeq.getArray();
beans::PropertyValue aParam1;
- aParam1.Name = C2U("ParentWindow");
+ aParam1.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow"));
aParam1.Value <<= uno::makeAny(xDialogParentWindow);
beans::PropertyValue aParam2;
- aParam2.Name = C2U("ChartModel");
+ aParam2.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ChartModel"));
aParam2.Value <<= uno::makeAny(xChartModel);
pArray[0] <<= uno::makeAny(aParam1);
pArray[1] <<= uno::makeAny(aParam2);
@@ -230,7 +223,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
{
//get dialog size:
awt::Size aDialogAWTSize;
- if( xDialogProps->getPropertyValue( ::rtl::OUString::createFromAscii("Size") )
+ if( xDialogProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) )
>>= aDialogAWTSize )
{
Size aDialogSize( aDialogAWTSize.Width, aDialogAWTSize.Height );
@@ -242,14 +235,14 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
aSwRect = pFlyFrmFmt->GetAnchoredObj()->GetObjRectWithSpaces();
Rectangle aRect( aSwRect.SVRect() );
Point aDialogPos = SwGetChartDialogPos( &rWrtShell.GetView().GetEditWin(), aDialogSize, aRect );
- xDialogProps->setPropertyValue( ::rtl::OUString::createFromAscii("Position"),
+ xDialogProps->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Position")),
uno::makeAny( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) );
}
}
}
catch( uno::Exception& )
{
- DBG_ERROR( "Chart wizard couldn't be positioned automatically\n" );
+ OSL_ENSURE(false, "Chart wizard couldn't be positioned automatically\n" );
}
}
@@ -261,7 +254,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
}
else
{
- DBG_ASSERT( nDialogRet == ui::dialogs::ExecutableDialogResults::OK,
+ OSL_ENSURE( nDialogRet == ui::dialogs::ExecutableDialogResults::OK,
"dialog execution failed" );
}
}
@@ -273,7 +266,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
}
-void __EXPORT AutoEdit::KeyInput( const KeyEvent& rEvt )
+void AutoEdit::KeyInput( const KeyEvent& rEvt )
{
sal_uInt16 nCode = rEvt.GetKeyCode().GetCode();
if( nCode != KEY_SPACE )
@@ -283,3 +276,4 @@ void __EXPORT AutoEdit::KeyInput( const KeyEvent& rEvt )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/chartins.src b/sw/source/ui/table/chartins.src
index b4cd8fdbeff0..a65c8801db20 100644
--- a/sw/source/ui/table/chartins.src
+++ b/sw/source/ui/table/chartins.src
@@ -102,8 +102,6 @@ ModelessDialog DLG_INSERT_CHART
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
- /* ### ACHTUNG: Neuer Text in Resource? << ~Zurück : << ~Zur³ck */
TabStop = TRUE ;
Disable = TRUE ;
Text [ en-US ] = "<< ~Back" ;
diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx
index d9e3d64b22e2..e3cb3f1b3536 100644
--- a/sw/source/ui/table/colwd.cxx
+++ b/sw/source/ui/table/colwd.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,27 +39,15 @@
#include <colwd.hxx>
#include <tablemgr.hxx>
#include <wrtsh.hxx>
-#ifndef _WDOCSH_HXX
#include <wdocsh.hxx>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <swmodule.hxx>
-#ifndef _MODCFG_HXX
#include <modcfg.hxx>
-#endif
#include <usrpref.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _COLWD_HRC
#include <colwd.hrc>
-#endif
-#ifndef _TABLE_HRC
#include <table.hrc>
-#endif
IMPL_LINK_INLINE_START( SwTableWidthDlg, LoseFocusHdl, Edit *, EMPTYARG )
@@ -121,3 +110,4 @@ void SwTableWidthDlg::Apply()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index 411868ac6b3d..f2752fe92781 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -233,10 +234,10 @@ SwConvertTableDlg:: ~SwConvertTableDlg()
IMPL_LINK( SwConvertTableDlg, AutoFmtHdl, PushButton*, pButton )
{
SwAbstractDialogFactory* pFact = swui::GetFactory();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pShell, DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
delete pDlg;
@@ -279,3 +280,5 @@ IMPL_LINK(SwConvertTableDlg, ReapeatHeaderCheckBoxHdl, void*, EMPTYARG)
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index e6ad93335c0d..9f8a711c4533 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -184,9 +185,6 @@ IMPL_LINK_INLINE_START( SwInsTableDlg, ModifyName, Edit *, pEdit )
}
IMPL_LINK_INLINE_END( SwInsTableDlg, ModifyName, Edit *, EMPTYARG )
-/*-----------------15.04.98 11:36-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwInsTableDlg, ModifyRowCol, NumericField *, pField )
{
if(pField == &aColEdit)
@@ -220,10 +218,10 @@ IMPL_LINK( SwInsTableDlg, ModifyRowCol, NumericField *, pField )
IMPL_LINK( SwInsTableDlg, AutoFmtHdl, PushButton*, pButton )
{
SwAbstractDialogFactory* pFact = swui::GetFactory();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton,pShell, DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
delete pDlg;
@@ -251,3 +249,4 @@ IMPL_LINK(SwInsTableDlg, ModifyRepeatHeaderNF_Hdl, void*, EMPTYARG)
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/mergetbl.cxx b/sw/source/ui/table/mergetbl.cxx
index 377959ec89cc..dc5c41cec24a 100644
--- a/sw/source/ui/table/mergetbl.cxx
+++ b/sw/source/ui/table/mergetbl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,12 +36,8 @@
#include <swtypes.hxx>
#include <mergetbl.hxx>
-#ifndef _MERGETBL_HRC
#include <mergetbl.hrc>
-#endif
-#ifndef _TABLE_HRC
#include <table.hrc>
-#endif
SwMergeTblDlg::SwMergeTblDlg( Window *pParent, sal_Bool& rWithPrev )
@@ -64,3 +61,4 @@ void SwMergeTblDlg::Apply()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/rowht.cxx b/sw/source/ui/table/rowht.cxx
index a1d1770136d7..676bc8a038db 100644
--- a/sw/source/ui/table/rowht.cxx
+++ b/sw/source/ui/table/rowht.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,24 +45,14 @@
#include <rowht.hxx>
#include <wrtsh.hxx>
#include <frmatr.hxx>
-#ifndef _WDOCSH_HXX
#include <wdocsh.hxx>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <swmodule.hxx>
#include <usrpref.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _ROWHT_HRC
#include <rowht.hrc>
-#endif
-#ifndef _TABLE_HRC
#include <table.hrc>
-#endif
@@ -118,3 +109,4 @@ SwTableHeightDlg::SwTableHeightDlg( Window *pParent, SwWrtShell &rS ) :
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/rowht.src b/sw/source/ui/table/rowht.src
index b9abcd05ce94..c947ed7405d5 100644
--- a/sw/source/ui/table/rowht.src
+++ b/sw/source/ui/table/rowht.src
@@ -35,7 +35,6 @@ ModalDialog DLG_ROW_HEIGHT
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 157 , 60 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Zeilenhöhe : Zellenhöhe */
Text [ en-US ] = "Row Height" ;
Moveable = TRUE ;
OKButton BT_OK
@@ -80,7 +79,6 @@ ModalDialog DLG_ROW_HEIGHT
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 */
TabStop = TRUE ;
Text [ en-US ] = "~Fit to size" ;
};
diff --git a/sw/source/ui/table/splittbl.cxx b/sw/source/ui/table/splittbl.cxx
index 7037e2b0aa05..35315ca22ef2 100644
--- a/sw/source/ui/table/splittbl.cxx
+++ b/sw/source/ui/table/splittbl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,9 +39,7 @@
#include <splittbl.hrc>
#include <table.hrc>
#include <tblenum.hxx>
-/*-----------------17.03.98 10:56-------------------
---------------------------------------------------*/
SwSplitTblDlg::SwSplitTblDlg( Window *pParent, SwWrtShell &rSh ) :
SvxStandardDialog(pParent, SW_RES(DLG_SPLIT_TABLE)),
aOKPB( this, SW_RES(PB_OK )),
@@ -58,9 +57,6 @@ SwSplitTblDlg::SwSplitTblDlg( Window *pParent, SwWrtShell &rSh ) :
aCntntCopyRB.Check();
}
-/*-----------------17.03.98 10:56-------------------
-
---------------------------------------------------*/
void SwSplitTblDlg::Apply()
{
m_nSplit = HEADLINE_CNTNTCOPY;
@@ -77,3 +73,4 @@ void SwSplitTblDlg::Apply()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx
index a6b96ab8930c..a3ca467f4d1a 100644
--- a/sw/source/ui/table/swtablerep.cxx
+++ b/sw/source/ui/table/swtablerep.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,13 +29,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
-#include <tools/list.hxx>
#include <vcl/msgbox.hxx>
#include <svl/stritem.hxx>
#include <svl/intitem.hxx>
-#include <svx/htmlmode.hxx>
#include <editeng/keepitem.hxx>
#include <editeng/brkitem.hxx>
#include <editeng/ulspitem.hxx>
@@ -49,53 +47,25 @@
#include <fmtrowsplt.hxx>
#include <svx/htmlmode.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <viewopt.hxx>
#include <uitool.hxx>
#include <frmatr.hxx>
-#ifndef _TABLEPG_HXX
#include <tablepg.hxx>
-#endif
#include <tablemgr.hxx>
#include <pagedesc.hxx>
#include <poolfmt.hxx>
#include <SwStyleNameMapper.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _TABLEDLG_HRC
#include <tabledlg.hrc>
-#endif
-#ifndef _TABLE_HRC
#include <table.hrc>
-#endif
#include "swtablerep.hxx"
-#ifdef DEBUG_TBLDLG
-void DbgTColumn(TColumn* pTColumn, sal_uInt16 nCount)
-{
- for(sal_uInt16 i = 0; i < nCount; i++)
- {
- String sMsg(i);
- sMsg += pTColumn[i].bVisible ? " v " : " h ";
- sMsg += pTColumn[i].nWidth;
- DBG_ERROR(sMsg)
- }
-}
-#endif
-
-
-/*-----------------20.08.96 09.43-------------------
---------------------------------------------------*/
SwTableRep::SwTableRep( const SwTabCols& rTabCol, sal_Bool bCplx )
:
nTblWidth(0),
@@ -128,15 +98,11 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol, sal_Bool bCplx )
nAllCols++;
}
-/*-----------------20.08.96 09.43-------------------
---------------------------------------------------*/
SwTableRep::~SwTableRep()
{
delete[] pTColumns;
}
-/*-----------------20.08.96 13.33-------------------
---------------------------------------------------*/
sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
{
long nOldLeft = rTabCols.GetLeft(),
@@ -152,10 +118,6 @@ sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
break;
}
-#ifdef DEBUG_TBLDLG
-#define DbgTColumn(pTColumns, nAllCols);
-#endif
-
SwTwips nPos = 0;
SwTwips nLeft = GetLeftSpace();
rTabCols.SetLeft(nLeft);
@@ -176,10 +138,6 @@ sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
pOldTColumns[nAllCols - 1].nWidth = rTabCols.GetRight() - rTabCols.GetLeft() - nStart;
pOldTColumns[nAllCols - 1].bVisible = sal_True;
-#ifdef DEBUG_TBLDLG
-#define DbgTColumn(pOldTColumns, nAllCols);
-#endif
-
sal_uInt16 nOldPos = 0;
sal_uInt16 nNewPos = 0;
SwTwips nOld = 0;
@@ -239,3 +197,5 @@ sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
rTabCols.SetRight(rTabCols.GetRightMax());
return bSingleLine;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 45eab49d553d..00feb4218076 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,13 +33,10 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
#include <hintids.hxx>
-#include <tools/list.hxx>
#include <vcl/msgbox.hxx>
#include <svl/stritem.hxx>
#include <svl/intitem.hxx>
-#include <svx/htmlmode.hxx>
#include <editeng/keepitem.hxx>
#include <editeng/brkitem.hxx>
#include <editeng/ulspitem.hxx>
@@ -55,35 +53,23 @@
#include "access.hrc"
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <viewopt.hxx>
#include <uitool.hxx>
#include <frmatr.hxx>
#include <tabledlg.hxx>
-#ifndef _TABLEPG_HXX
#include <tablepg.hxx>
-#endif
#include <tablemgr.hxx>
#include <pagedesc.hxx>
#include <uiitems.hxx>
#include <poolfmt.hxx>
#include <SwStyleNameMapper.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _TABLEDLG_HRC
#include <tabledlg.hrc>
-#endif
-#ifndef _TABLE_HRC
#include <table.hrc>
-#endif
#include <svx/svxids.hrc>
#include <svx/dialogs.hrc>
#include <svx/flagsdef.hxx>
@@ -92,41 +78,6 @@
using namespace ::com::sun::star;
-#ifdef DEBUG_TBLDLG
-void DbgTblRep(SwTableRep* pRep)
-{
- DBG_ERROR(String(pRep->GetColCount()))
- DBG_ERROR(String(pRep->GetAllColCount()))
- SwTwips nSum = 0;
- for(sal_uInt16 i = 0; i < pRep->GetAllColCount(); i++)
- {
- String sMsg(i);
- sMsg += pRep->GetColumns()[i].bVisible ? " v " : " h ";
- sMsg += pRep->GetColumns()[i].nWidth;
- nSum +=pRep->GetColumns()[i].nWidth;
- DBG_ERROR(sMsg)
- }
- String sMsg("Spaltensumme: ");
- sMsg += nSum;
- sMsg += " Tblbreite: ";
- sMsg += pRep->GetWidth();
- DBG_ERROR(sMsg)
- sMsg = "Gesamt/Links/Rechts: ";
- sMsg += pRep->GetSpace();
- sMsg += '/';
- sMsg += pRep->GetLeftSpace();
- sMsg += '/';
- sMsg += pRep->GetRightSpace();
- DBG_ERROR(sMsg)
- sMsg = "Align: ";
- sMsg += pRep->GetAlign();
- DBG_ERROR(sMsg)
-
-};
-
-#endif
-
-
SwFormatTablePage::SwFormatTablePage( Window* pParent, const SfxItemSet& rSet ) :
SfxTabPage(pParent, SW_RES( TP_FORMAT_TABLE ), rSet ),
aOptionsFL(this, SW_RES( FL_OPTIONS )),
@@ -225,7 +176,7 @@ void SwFormatTablePage::Init()
IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn )
{
- DBG_ASSERT(pTblData, "Tabellendaten nicht da?");
+ OSL_ENSURE(pTblData, "table data not available?");
sal_Bool bIsChecked = pBtn->IsChecked();
sal_Int64 nLeft = aLeftMF.DenormalizePercent(aLeftMF.GetValue(FUNIT_TWIP ));
sal_Int64 nRight = aRightMF.DenormalizePercent(aRightMF.GetValue(FUNIT_TWIP ));
@@ -332,9 +283,7 @@ IMPL_LINK( SwFormatTablePage, RightModifyHdl, MetricField *, EMPTYARG )
if(aFreeBtn.IsChecked())
{
sal_Bool bEnable = aRightMF.GetValue() == 0;
-// aWidthMF.Enable(bEnable);
aRelWidthCB.Enable(bEnable);
-// aWidthFT.Enable(bEnable);
if ( !bEnable )
{
aRelWidthCB.Check(sal_False);
@@ -654,7 +603,7 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
//text direction
if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem ) )
{
- sal_uInt32 nVal = ((SvxFrameDirectionItem*)pItem)->GetValue();
+ sal_uIntPtr nVal = ((SvxFrameDirectionItem*)pItem)->GetValue();
sal_uInt16 nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
aTextDirectionLB.SelectEntryPos( nPos );
aTextDirectionLB.SaveValue();
@@ -671,7 +620,7 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
------------------------------------------------------------------------*/
void SwFormatTablePage::ActivatePage( const SfxItemSet& rSet )
{
- DBG_ASSERT(pTblData, "Tabellendaten nicht da?");
+ OSL_ENSURE(pTblData, "table data not available?");
if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP ))
{
SwTwips nCurWidth = text::HoriOrientation::FULL != pTblData->GetAlign() ?
@@ -799,8 +748,6 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
pTblData->SetAlign(nAlign);
}
-
- // if( text::HoriOrientation::CENTER && lWidth != (SwTwips)aWidthMF.GetSavedValue())
if(pTblData->GetWidth() != lWidth )
{
pTblData->SetWidthChanged();
@@ -810,9 +757,6 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
if(pTblData->HasWidthChanged())
_pSet->Put(SwPtrItem(FN_TABLE_REP, pTblData));
}
-#ifdef DEBUG_TBLDLG
-DbgTblRep(pTblData)
-#endif
}
return sal_True;
}
@@ -1139,7 +1083,7 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
nDiff = 0;
SetVisibleWidth(nAktPos, GetVisibleWidth(nAktPos) -nDiff);
}
- DBG_ASSERT(nDiff >= 0, "nDiff < 0 kann hier nicht sein!");
+ OSL_ENSURE(nDiff >= 0, "nDiff < 0 cannot be here!");
}
}
}
@@ -1147,7 +1091,7 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
{
// Differenz wird ueber die Tabellenbreite ausgeglichen,
// andere Spalten bleiben unveraendert
- DBG_ASSERT(nDiff <= pTblData->GetSpace() - nTableWidth, "Maximum falsch eingestellt" );
+ OSL_ENSURE(nDiff <= pTblData->GetSpace() - nTableWidth, "wrong maximum" );
SwTwips nActSpace = pTblData->GetSpace() - nTableWidth;
if(nDiff > nActSpace)
{
@@ -1163,7 +1107,7 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
{
// Alle Spalten werden proportional mitveraendert, die Tabellenbreite wird
// entsprechend angepasst
- DBG_ASSERT(nDiff * nNoOfVisibleCols <= pTblData->GetSpace() - nTableWidth, "Maximum falsch eingestellt" );
+ OSL_ENSURE(nDiff * nNoOfVisibleCols <= pTblData->GetSpace() - nTableWidth, "wrong maximum" );
long nAdd = nDiff;
if(nDiff * nNoOfVisibleCols > pTblData->GetSpace() - nTableWidth)
{
@@ -1190,34 +1134,7 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
}
nTableWidth += nAdd;
-
}
- else
- {
-// Die Differenz wird gleichmaessig auf alle anderen Spalten aufgeteilt
-// die Tabellenbreite bleibt konstant
-/*
- SwTwips nDiffn = nDiff/(nNoOfVisibleCols - 1);
- if(nDiff < 0 && (nNoOfVisibleCols - 1) * nDiffn != nDiff)
- nDiffn-- ;
- sal_uInt16 nStart = nAktPos++;
- if(nAktPos == nNoOfVisibleCols)
- nStart = 0;
- for(sal_uInt16 i = 0; i < nNoOfVisibleCols; i++ )
- {
- if((nVisWidth = GetVisibleWidth(i)) + nDiff < MINLAY)
- {
- nAdd += nVisWidth - MINLAY;
- SetVisibleWidth(i, MINLAY);
- }
- }
-*/
-
- }
-
-#ifdef DEBUG_TBLDLG
-DbgTblRep(pTblData)
-#endif
if(!bPercentMode)
aSpaceED.SetValue(aSpaceED.Normalize( pTblData->GetSpace() - nTableWidth) , FUNIT_TWIP);
@@ -1271,10 +1188,6 @@ void SwTableColumnPage::ActivatePage( const SfxItemSet& )
aModifyTableCB.Enable( !bPercentMode && bModifyTbl );
aProportionalCB.Enable(!bPercentMode && bModifyTbl );
-/* if(pTblData->IsLineSelected() && pTblData->IsComplex())
- {
-
- }*/
aSpaceED.SetValue(aSpaceED.Normalize(
pTblData->GetSpace() - nTableWidth) , FUNIT_TWIP);
@@ -1339,9 +1252,6 @@ int SwTableColumnPage::DeactivatePage( SfxItemSet* _pSet )
}
pTblData->SetWidthChanged();
}
-#ifdef DEBUG_TBLDLG
-DbgTblRep(pTblData)
-#endif
_pSet->Put(SwPtrItem( FN_TABLE_REP, pTblData ));
}
return sal_True;
@@ -1360,11 +1270,10 @@ SwTwips SwTableColumnPage::GetVisibleWidth(sal_uInt16 nPos)
i++;
}
SwTwips nReturn = pTblData->GetColumns()[i].nWidth;
- DBG_ASSERT(i < nNoOfCols, "Array index out of range");
+ OSL_ENSURE(i < nNoOfCols, "Array index out of range");
while(!pTblData->GetColumns()[i].bVisible && (i + 1) < nNoOfCols)
nReturn += pTblData->GetColumns()[++i].nWidth;
-// return (*ppTableColumns)[i].nWidth;
return nReturn;
}
@@ -1379,7 +1288,7 @@ void SwTableColumnPage::SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth)
nPos--;
i++;
}
- DBG_ASSERT(i < nNoOfCols, "Array index out of range");
+ OSL_ENSURE(i < nNoOfCols, "Array index out of range");
pTblData->GetColumns()[i].nWidth = nNewWidth;
while(!pTblData->GetColumns()[i].bVisible && (i + 1) < nNoOfCols)
pTblData->GetColumns()[++i].nWidth = 0;
@@ -1396,7 +1305,7 @@ SwTableTabDlg::SwTableTabDlg(Window* pParent, SfxItemPool& ,
{
FreeResource();
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AddTabPage(TP_FORMAT_TABLE, &SwFormatTablePage::Create, 0 );
AddTabPage(TP_TABLE_TEXTFLOW, &SwTextFlowPage::Create, 0 );
AddTabPage(TP_TABLE_COLUMN, &SwTableColumnPage::Create, 0 );
@@ -1433,8 +1342,6 @@ void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
}
}
-/*-----------------12.12.96 12.22-------------------
---------------------------------------------------*/
SwTextFlowPage::SwTextFlowPage( Window* pParent,
const SfxItemSet& rSet ) :
SfxTabPage(pParent, SW_RES( TP_TABLE_TEXTFLOW ), rSet ),
@@ -1511,22 +1418,16 @@ SwTextFlowPage::SwTextFlowPage( Window* pParent,
HeadLineCBClickHdl();
}
-/*-----------------12.12.96 12.22-------------------
---------------------------------------------------*/
SwTextFlowPage::~SwTextFlowPage()
{
}
-/*-----------------12.12.96 12.22-------------------
---------------------------------------------------*/
SfxTabPage* SwTextFlowPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
return new SwTextFlowPage(pParent, rAttrSet);
}
-/*-----------------12.12.96 12.22-------------------
---------------------------------------------------*/
sal_Bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
{
sal_Bool bModified = sal_False;
@@ -1643,8 +1544,6 @@ sal_Bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
}
-/*-----------------12.12.96 12.22-------------------
---------------------------------------------------*/
void SwTextFlowPage::Reset( const SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
@@ -1829,9 +1728,6 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
HeadLineCBClickHdl();
}
-/*-----------------16.04.98 14:48-------------------
-
---------------------------------------------------*/
void SwTextFlowPage::SetShell(SwWrtShell* pSh)
{
@@ -1844,8 +1740,6 @@ void SwTextFlowPage::SetShell(SwWrtShell* pSh)
}
}
-/*-----------------12.12.96 16.18-------------------
---------------------------------------------------*/
IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG )
{
if( aPgBrkCB.IsChecked() )
@@ -1884,8 +1778,6 @@ IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG )
return 0;
}
-/*-----------------12.12.96 16.18-------------------
---------------------------------------------------*/
IMPL_LINK( SwTextFlowPage, ApplyCollClickHdl_Impl, CheckBox*, EMPTYARG )
{
sal_Bool bEnable = sal_False;
@@ -1908,8 +1800,6 @@ IMPL_LINK( SwTextFlowPage, ApplyCollClickHdl_Impl, CheckBox*, EMPTYARG )
return 0;
}
-/*-----------------12.12.96 16.18-------------------
---------------------------------------------------*/
IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn )
{
if ( aPgBrkCB.IsChecked() )
@@ -1940,8 +1830,6 @@ IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn )
return 0;
}
-/*-----------------12.12.96 16.18-------------------
---------------------------------------------------*/
IMPL_LINK( SwTextFlowPage, PageBreakTypeHdl_Impl, RadioButton*, pBtn )
{
if ( pBtn == &aColBrkRB || aPgBrkAfterRB.IsChecked() )
@@ -1956,17 +1844,13 @@ IMPL_LINK( SwTextFlowPage, PageBreakTypeHdl_Impl, RadioButton*, pBtn )
PageBreakPosHdl_Impl( &aPgBrkBeforeRB );
return 0;
}
-/*-----------------17.11.2003 11:30-----------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwTextFlowPage, SplitHdl_Impl, CheckBox*, pBox )
{
aSplitRowCB.Enable(pBox->IsChecked());
return 0;
}
-/*-----------------17.11.2003 11:30-----------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwTextFlowPage, SplitRowHdl_Impl, TriStateBox*, pBox )
{
pBox->EnableTriState(sal_False);
@@ -1980,9 +1864,6 @@ IMPL_LINK( SwTextFlowPage, HeadLineCBClickHdl, void*, EMPTYARG )
return 0;
}
-/*-----------------30.05.97 07:37-------------------
-
---------------------------------------------------*/
void SwTextFlowPage::DisablePageBreak()
{
bPageBreak = sal_False;
@@ -1999,3 +1880,4 @@ void SwTextFlowPage::DisablePageBreak()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/tabledlg.src b/sw/source/ui/table/tabledlg.src
index 51248119c5f1..1a0fc0ea55ee 100644
--- a/sw/source/ui/table/tabledlg.src
+++ b/sw/source/ui/table/tabledlg.src
@@ -616,7 +616,6 @@ TabPage TP_TABLE_TEXTFLOW
// Disable = TRUE;
Pos = MAP_APPFONT ( 178 , 14 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
- // ### ACHTUNG: Neuer Text in Resource? S~palte : ~Spalte
Text [ en-US ] = "Col~umn" ;
};
RadioButton RB_PAGEBREAKBEFORE
diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx
index 7d4272880643..db1506bcf478 100644
--- a/sw/source/ui/table/tablemgr.cxx
+++ b/sw/source/ui/table/tablemgr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,7 +38,6 @@
#include <sot/clsids.hxx>
#include "edtwin.hxx"
-#include "errhdl.hxx"
#include "wrtsh.hxx"
#include "cmdid.h"
#include "frmatr.hxx"
@@ -66,10 +66,10 @@ void SwTableFUNC::ColWidthDlg( Window *pParent )
{
InitTabCols();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
VclAbstractDialog* pDlg = pFact->CreateSwTableWidthDlg( pParent, *this ,DLG_COL_WIDTH );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
}
@@ -113,7 +113,7 @@ SwTwips SwTableFUNC::GetColWidth(sal_uInt16 nNum) const
SwTwips SwTableFUNC::GetMaxColWidth( sal_uInt16 nNum ) const
{
- ASSERT(nNum <= aCols.Count(), "Index out of Area");
+ OSL_ENSURE(nNum <= aCols.Count(), "Index out of Area");
if ( GetColCount() > 0 )
{
@@ -138,13 +138,12 @@ void SwTableFUNC::SetColWidth(sal_uInt16 nNum, SwTwips nNewWidth )
// aktuelle Breite setzen
// alle folgenden Verschieben
sal_Bool bCurrentOnly = sal_False;
- SwTwips nWidth = 0;
if ( aCols.Count() > 0 )
{
if(aCols.Count() != GetColCount())
bCurrentOnly = sal_True;
- nWidth = GetColWidth(nNum);
+ SwTwips nWidth = GetColWidth(nNum);
int nDiff = (int)(nNewWidth - nWidth);
if( !nNum )
@@ -175,7 +174,7 @@ void SwTableFUNC::SetColWidth(sal_uInt16 nNum, SwTwips nNewWidth )
void SwTableFUNC::InitTabCols()
{
- ASSERT(pSh, keine Shell);
+ OSL_ENSURE(pSh, "no Shell");
if( pFmt && pSh)
pSh->GetTabCols( aCols );
@@ -314,22 +313,22 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
else if (nColLen > 1)
eDataRowSource = chart::ChartDataRowSource_COLUMNS;
else {
- DBG_ERROR( "unexpected state" );
+ OSL_ENSURE(false, "unexpected state" );
}
}
uno::Sequence< beans::PropertyValue > aArgs( 4 );
aArgs[0] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("CellRangeRepresentation"), -1,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CellRangeRepresentation")), -1,
uno::makeAny( rCellRange ), beans::PropertyState_DIRECT_VALUE );
aArgs[1] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("HasCategories"), -1,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasCategories")), -1,
uno::makeAny( bHasCategories ), beans::PropertyState_DIRECT_VALUE );
aArgs[2] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("FirstCellAsLabel"), -1,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FirstCellAsLabel")), -1,
uno::makeAny( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE );
aArgs[3] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("DataRowSource"), -1,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataRowSource")), -1,
uno::makeAny( eDataRowSource ), beans::PropertyState_DIRECT_VALUE );
xDataReceiver->setArguments( aArgs );
}
@@ -367,7 +366,7 @@ sal_uInt16 SwTableFUNC::GetColCount() const
int SwTableFUNC::GetRightSeparator(int nNum) const
{
- DBG_ASSERT( nNum < (int)GetColCount() ,"Index out of range");
+ OSL_ENSURE( nNum < (int)GetColCount() ,"Index out of range");
int i = 0;
while( nNum >= 0 )
{
@@ -380,3 +379,4 @@ int SwTableFUNC::GetRightSeparator(int nNum) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx
index 07f408ec8556..d18f23dcfd74 100644
--- a/sw/source/ui/table/tablepg.hxx
+++ b/sw/source/ui/table/tablepg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef _SWTABLEPG_HXX
#define _SWTABLEPG_HXX
#include <sfx2/tabdlg.hxx>
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _IMAGEBTN_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
#include <actctrl.hxx>
#include "prcntfld.hxx"
#include "swtypes.hxx"
@@ -236,3 +231,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index e64c5110a942..4ba64561840b 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,12 +36,8 @@
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <vcl/svapp.hxx>
#include <svl/zforlist.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -51,18 +48,12 @@
#include <svx/framelinkarray.hxx>
#include "swmodule.hxx"
#include "swtypes.hxx"
-#ifndef _VIEW_HXX
#include "view.hxx"
-#endif
#include "wrtsh.hxx"
#include "tblafmt.hxx"
-#ifndef _TAUTOFMT_HXX
#include "tautofmt.hxx"
-#endif
#include "shellres.hxx"
-#ifndef _TAUTOFMT_HRC
#include "tautofmt.hrc"
-#endif
using namespace com::sun::star;
@@ -170,7 +161,7 @@ void SwStringInputDlg::GetInputString( String& rString ) const
}
-__EXPORT SwStringInputDlg::~SwStringInputDlg()
+SwStringInputDlg::~SwStringInputDlg()
{
}
@@ -224,7 +215,7 @@ SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell,
//------------------------------------------------------------------------
-__EXPORT SwAutoFormatDlg::~SwAutoFormatDlg()
+SwAutoFormatDlg::~SwAutoFormatDlg()
{
delete pWndPreview;
@@ -337,8 +328,6 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
pData->SetBackground( bCheck );
else if ( pBtn == &aBtnAlignment )
pData->SetJustify( bCheck );
-// else if ( pBtn == &aBtnAdjust )
-// pData->SetIncludeWidthHeight( bCheck );
else
bDataChgd = sal_False;
@@ -608,12 +597,12 @@ AutoFmtPreview::AutoFmtPreview( Window* pParent, const ResId& rRes, SwWrtShell*
else
mbRTL = pWrtShell->IsTableRightToLeft();
- DBG_ASSERT( m_xMSF.is(), "AutoFmtPreview: no MultiServiceFactory");
+ OSL_ENSURE( m_xMSF.is(), "AutoFmtPreview: no MultiServiceFactory");
if ( m_xMSF.is() )
{
m_xBreak = uno::Reference< i18n::XBreakIterator >(
m_xMSF->createInstance (
- rtl::OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator")) ),
uno::UNO_QUERY);
}
pNumFmt = new SvNumberFormatter( m_xMSF, LANGUAGE_SYSTEM );
@@ -623,7 +612,7 @@ AutoFmtPreview::AutoFmtPreview( Window* pParent, const ResId& rRes, SwWrtShell*
//------------------------------------------------------------------------
-__EXPORT AutoFmtPreview::~AutoFmtPreview()
+AutoFmtPreview::~AutoFmtPreview()
{
delete pNumFmt;
}
@@ -764,9 +753,6 @@ MAKENUMSTR:
Rectangle cellRect = maArray.GetCellRect( nCol, nRow );
Point aPos = cellRect.TopLeft();
sal_uInt16 nRightX = 0;
-// sal_Bool bJustify = aCurData.IsJustify();
-// ScHorJustifyAttr aHorJustifyItem;
-// CellHorJustify eJustification;
Size theMaxStrSize( cellRect.GetWidth() - FRAME_OFFSET,
cellRect.GetHeight() - FRAME_OFFSET );
@@ -795,9 +781,6 @@ MAKENUMSTR:
while( theMaxStrSize.Width() <= aStrSize.Width() &&
cellString.Len() > 1 )
{
-// if( eJustification == SVX_HOR_JUSTIFY_RIGHT )
-// cellString.Erase( 0, 1 );
-// else
cellString.Erase( cellString.Len() - 1 );
aScriptedText.SetText( cellString, m_xBreak );
aStrSize = aScriptedText.GetTextSize();
@@ -806,18 +789,6 @@ MAKENUMSTR:
nRightX = (sal_uInt16)( cellRect.GetWidth()
- aStrSize.Width()
- FRAME_OFFSET );
- //-------------
- // Ausrichtung:
- //-------------
- /* if ( bJustify )
- {
- aCurData.GetHorJustify( nFmtIndex, aHorJustifyItem );
- eJustification = (CellHorJustify)aHorJustifyItem.GetValue();
- }
- else
- {
- eJustification = SC_HOR_JUSTIFY_STANDARD;
- }*/
//-----------------------------
// vertikal (immer zentrieren):
@@ -827,7 +798,6 @@ MAKENUMSTR:
//-----------
// horizontal
//-----------
-/* if ( eJustification != SC_HOR_JUSTIFY_STANDARD )*/
if( mbRTL )
aPos.X() += nRightX;
else if (aCurData.IsJustify())
@@ -922,7 +892,7 @@ void AutoFmtPreview::PaintCells()
//------------------------------------------------------------------------
-void __EXPORT AutoFmtPreview::Init()
+void AutoFmtPreview::Init()
{
SetBorderStyle( GetBorderStyle() | WINDOW_BORDER_MONO );
maArray.Initialize( 5, 5 );
@@ -1051,7 +1021,9 @@ void AutoFmtPreview::DoPaint( const Rectangle& /*rRect*/ )
//------------------------------------------------------------------------
-void __EXPORT AutoFmtPreview::Paint( const Rectangle& rRect )
+void AutoFmtPreview::Paint( const Rectangle& rRect )
{
DoPaint( rRect );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/tautofmt.src b/sw/source/ui/table/tautofmt.src
index e338dc9a4b73..1b3d66b79905 100644
--- a/sw/source/ui/table/tautofmt.src
+++ b/sw/source/ui/table/tautofmt.src
@@ -214,8 +214,6 @@ ModalDialog DLG_AUTOFMT_TABLE
};
String STR_INVALID_AFNAME
{
- /* ### ACHTUNG: Neuer Text in Resource? Sie haben einen ungültigen Namen angegeben.\nDas AutoFormat konnte nicht angelegt werden.\nWählen Sie einen anderen Namen. : Sie haben einen ungültigen Namen angegeben.\nDas Autoformat konnte nicht angelegt werden.\nWählen Sie einen anderen Namen. */
- /* ### ACHTUNG: Neuer Text in Resource? Sie haben einen ungültigen Namen angegeben.\nDas AutoFormat konnte nicht angelegt werden.\nWählen Sie einen anderen Namen. : Sie haben einen ungültigen Namen angegeben.\nDas Autoformat konnte nicht angelegt werden.\nWählen Sie einen anderen Namen. */
Text [ en-US ] = "You have entered an invalid name.\nThe desired AutoFormat could not be created. \nTry again using a different name." ;
};
};
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index c3927935870b..10e95d2bb703 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,12 +33,8 @@
#include <hintids.hxx>
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <format.hxx>
#include <charfmt.hxx>
#include <fmtcol.hxx>
@@ -67,12 +64,6 @@
#include <swundo.hxx> // fuer die UndoIds
#include <boost/shared_ptr.hpp>
-//#define FORMAT_PAINTBRUSH_ALSO_COPY_NUMBERFORMAT_FOR_TABLES 1
-
-#ifdef FORMAT_PAINTBRUSH_ALSO_COPY_NUMBERFORMAT_FOR_TABLES
-#include <cellatr.hxx>
-#endif
-
/*--------------------------------------------------------------------
--------------------------------------------------------------------*/
@@ -129,9 +120,6 @@ SfxItemSet* lcl_CreateEmptyItemSet( int nSelectionType, SfxItemPool& rPool
FN_PARAM_TABLE_HEADLINE, FN_PARAM_TABLE_HEADLINE,
FN_TABLE_BOX_TEXTDIRECTION, FN_TABLE_BOX_TEXTDIRECTION,
FN_TABLE_SET_VERT_ALIGN, FN_TABLE_SET_VERT_ALIGN,
-#ifdef FORMAT_PAINTBRUSH_ALSO_COPY_NUMBERFORMAT_FOR_TABLES
- RES_BOXATR_FORMAT, RES_BOXATR_FORMAT,
-#endif
0);
}
else if( nSelectionType & nsSelectionType::SEL_TXT )
@@ -192,11 +180,6 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh )
rSh.GetRowSplit(pSplit);
if(pSplit)
rSet.Put(*pSplit);
-
- //-- numberformat in cells
-#ifdef FORMAT_PAINTBRUSH_ALSO_COPY_NUMBERFORMAT_FOR_TABLES
- rSh.GetTblBoxFormulaAttrs( rSet ); //RES_BOXATR_FORMAT
-#endif
}
void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
@@ -285,17 +268,6 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
if( SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pItem) )
rSh.SetRowSplit(*static_cast<const SwFmtRowSplit*>(pItem));
-
- //-- numberformat in cells
-#ifdef FORMAT_PAINTBRUSH_ALSO_COPY_NUMBERFORMAT_FOR_TABLES
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem ))
- {
- SfxItemSet aBoxSet( *rSet.GetPool(), RES_BOXATR_FORMAT, RES_BOXATR_FORMAT );
- aBoxSet.Put( SwTblBoxNumFormat( ((SfxUInt32Item*)pItem)->GetValue() ));
- rSh.SetTblBoxFormulaAttrs( aBoxSet );
-
- }
-#endif
}
}//end anonymous namespace
@@ -451,7 +423,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
}
typedef boost::shared_ptr< SfxPoolItem > SfxPoolItemSharedPtr;
typedef std::vector< SfxPoolItemSharedPtr > ItemVector;
-// #144857# collect all PoolItems from the applied styles
+// collect all PoolItems from the applied styles
void lcl_AppendSetItems( ItemVector& rItemVector, const SfxItemSet& rStyleAttrSet )
{
const sal_uInt16* pRanges = rStyleAttrSet.GetRanges();
@@ -468,7 +440,7 @@ void lcl_AppendSetItems( ItemVector& rItemVector, const SfxItemSet& rStyleAttrSe
pRanges += 2;
}
}
-// #144857# remove all items that are inherited from the styles
+// remove all items that are inherited from the styles
void lcl_RemoveEqualItems( SfxItemSet& rTemplateItemSet, ItemVector& rItemVector )
{
ItemVector::iterator aEnd = rItemVector.end();
@@ -510,9 +482,9 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
if( pStyle )
{
SwFmtCharFmt aFmt(pStyle->GetCharFmt());
- // #144857# collect items from character style
+ // collect items from character style
lcl_AppendSetItems( aItemVector, aFmt.GetCharFmt()->GetAttrSet());
- sal_uInt16 nFlags=0; //(nMode & KEY_SHIFT) ? SETATTR_DONTREPLACE : SETATTR_DEFAULT;
+ sal_uInt16 nFlags=0;
rWrtShell.SetAttr( aFmt, nFlags );
}
}
@@ -521,7 +493,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
SwDocStyleSheet* pStyle = (SwDocStyleSheet*)pPool->Find(m_aParaStyle, SFX_STYLE_FAMILY_PARA);
if( pStyle )
{
- // #144857# collect items from paragraph style
+ // collect items from paragraph style
lcl_AppendSetItems( aItemVector, pStyle->GetCollection()->GetAttrSet());
rWrtShell.SetTxtFmtColl( pStyle->GetCollection() );
}
@@ -547,7 +519,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
if(pTemplateItemSet)
{
pTemplateItemSet->Put( *m_pItemSet );
- // #144857# only _set_ attributes that differ from style attributes should be applied - the style is applied anyway
+ // only _set_ attributes that differ from style attributes should be applied - the style is applied anyway
lcl_RemoveEqualItems( *pTemplateItemSet, aItemVector );
if( nSelectionType & (nsSelectionType::SEL_FRM | nsSelectionType::SEL_OLE | nsSelectionType::SEL_GRF) )
@@ -615,3 +587,5 @@ void SwFormatClipboard::Erase()
m_bPersistentCopy = false;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index b69f2edca327..3ef8d405315e 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,16 +82,14 @@
#define SwPagePreView
#include <sfx2/msg.hxx>
#include <swslots.hxx>
-// OD 12.12.2002 #103492#
#include <pagepreviewlayout.hxx>
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
using namespace ::com::sun::star;
-
SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreView, "PrintPreview")
{
SFX_VIEW_REGISTRATION(SwDocShell);
@@ -107,17 +106,13 @@ SFX_IMPL_INTERFACE(SwPagePreView, SfxViewShell, SW_RES(RID_PVIEW_TOOLBOX))
SW_RES(RID_PVIEW_TOOLBOX));
}
-
TYPEINIT1(SwPagePreView,SfxViewShell)
#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT|SFX_VIEW_HAS_PRINTOPTIONS )
#define MIN_PREVIEW_ZOOM 25
#define MAX_PREVIEW_ZOOM 600
-/* */
-/* -----------------26.11.2002 10:41-----------------
- *
- * --------------------------------------------------*/
+
sal_uInt16 lcl_GetNextZoomStep(sal_uInt16 nCurrentZoom, sal_Bool bZoomIn)
{
static sal_uInt16 aZoomArr[] =
@@ -139,24 +134,18 @@ sal_uInt16 lcl_GetNextZoomStep(sal_uInt16 nCurrentZoom, sal_Bool bZoomIn)
}
return bZoomIn ? MAX_PREVIEW_ZOOM : MIN_PREVIEW_ZOOM;
};
-/* -----------------02.12.2002 09:11-----------------
- *
- * --------------------------------------------------*/
+
void lcl_InvalidateZoomSlots(SfxBindings& rBindings)
{
- static sal_uInt16 __READONLY_DATA aInval[] =
+ static sal_uInt16 const aInval[] =
{
SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN, SID_ATTR_ZOOMSLIDER, FN_PREVIEW_ZOOM, FN_STAT_ZOOM,
0
};
rBindings.Invalidate( aInval );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
// erstmal der Zoom-Dialog
-
class SwPreViewZoomDlg : public SvxStandardDialog
{
FixedText aRowLbl;
@@ -175,11 +164,6 @@ public:
~SwPreViewZoomDlg();
};
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwPreViewZoomDlg::SwPreViewZoomDlg( SwPagePreViewWin& rParent ) :
SvxStandardDialog( &rParent, SW_RES(DLG_PAGEPREVIEW_ZOOM) ),
aRowLbl(this,SW_RES(FT_ROW)),
@@ -196,13 +180,7 @@ SwPreViewZoomDlg::SwPreViewZoomDlg( SwPagePreViewWin& rParent ) :
aColEdit.SetValue( rParent.GetCol() );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwPreViewZoomDlg::~SwPreViewZoomDlg() {}
-
-
void SwPreViewZoomDlg::Apply()
{
((SwPagePreViewWin*)GetParent())->CalcWish(
@@ -210,13 +188,7 @@ void SwPreViewZoomDlg::Apply()
sal_uInt8(aColEdit.GetValue()) );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
// alles fuers SwPagePreViewWin
-
-
SwPagePreViewWin::SwPagePreViewWin( Window *pParent, SwPagePreView& rPView )
: Window( pParent, WinBits( WB_CLIPCHILDREN) ),
mpViewShell( 0 ),
@@ -224,7 +196,7 @@ SwPagePreViewWin::SwPagePreViewWin( Window *pParent, SwPagePreView& rPView )
mbCalcScaleForPreviewLayout( true ),
maPaintedPreviewDocRect( Rectangle(0,0,0,0) )
{
- SetOutDevViewType( OUTDEV_VIEWTYPE_PRINTPREVIEW ); //#106611#
+ SetOutDevViewType( OUTDEV_VIEWTYPE_PRINTPREVIEW );
SetHelpId(HID_PAGEPREVIEW);
SetFillColor( GetBackground().GetColor() );
SetLineColor( GetBackground().GetColor());
@@ -233,26 +205,15 @@ SwPagePreViewWin::SwPagePreViewWin( Window *pParent, SwPagePreView& rPView )
const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(sal_False);
mnRow = pUsrPref->GetPagePrevRow(); // 1 Zeile
mnCol = pUsrPref->GetPagePrevCol(); // 1 Spalte
- // OD 24.03.2003 #108282# - member <mnVirtPage> no longer exists.
mnSttPage = USHRT_MAX;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwPagePreViewWin::~SwPagePreViewWin()
{
if( mpViewShell )
delete mpViewShell;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwPagePreViewWin::Paint( const Rectangle& rRect )
{
if( !mpViewShell || !mpViewShell->GetLayout() )
@@ -281,16 +242,12 @@ void SwPagePreViewWin::Paint( const Rectangle& rRect )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
void SwPagePreViewWin::CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol )
{
if( !mpViewShell || !mpViewShell->GetLayout() )
return;
sal_uInt16 nOldCol = mnCol;
- // OD 02.12.2002 #103492# - update <mnRow> and <mnCol>.
mnRow = nNewRow;
mnCol = nNewCol;
sal_uInt16 nPages = mnRow * mnCol,
@@ -312,8 +269,8 @@ void SwPagePreViewWin::CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol )
mrView.ScrollDocSzChg();
// Sortierung muss eingehalten werden!!
- // OD 24.03.2003 #108282# - additional invalidate page status.
- static sal_uInt16 __READONLY_DATA aInval[] =
+ // additional invalidate page status.
+ static sal_uInt16 aInval[] =
{
SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN,
FN_PREVIEW_ZOOM,
@@ -326,23 +283,20 @@ void SwPagePreViewWin::CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol )
rBindings.Invalidate( aInval );
rBindings.Update( FN_SHOW_TWO_PAGES );
rBindings.Update( FN_SHOW_MULTIPLE_PAGES );
- // OD 18.12.2002 #103492# - adjust scrollbars
+ // adjust scrollbars
mrView.ScrollViewSzChg();
}
+
/*--------------------------------------------------------------------
Beschreibung:, mnSttPage is Absolute
--------------------------------------------------------------------*/
-
-
int SwPagePreViewWin::MovePage( int eMoveMode )
{
// soviele Seiten hoch
sal_uInt16 nPages = mnRow * mnCol;
sal_uInt16 nNewSttPage = mnSttPage;
- // OD 04.12.2002 #103492#
sal_uInt16 nPageCount = mrView.GetPageCount();
sal_uInt16 nDefSttPg = GetDefSttPage();
- // OD 06.12.2002 #103492#
bool bPaintPageAtFirstCol = true;
switch( eMoveMode )
@@ -380,37 +334,36 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
SetSelectedPage( mpPgPrevwLayout->ConvertRelativeToAbsolutePageNum( nNewSttPage ? nNewSttPage : 1 ) );
break;
case MV_DOC_END:
- // OD 03.12.2002 #103492# - correct calculation of new start page.
+ // correct calculation of new start page.
nNewSttPage = nPageCount;
SetSelectedPage( nPageCount );
break;
- // OD 12.12.2002 #103492# - add new move mode
case MV_SELPAGE:
// <nNewSttPage> and <SelectedPage()> are already set.
- // OD 20.02.2003 #107369# - not start at first column, only if the
+ // not start at first column, only if the
// complete preview layout columns doesn't fit into window.
if ( !mpPgPrevwLayout->DoesPreviewLayoutColsFitIntoWindow() )
bPaintPageAtFirstCol = false;
break;
case MV_SCROLL:
- // OD 17.01.2003 #103492# - check, if paint page at first column
+ // check, if paint page at first column
// has to be avoided
if ( !mpPgPrevwLayout->DoesPreviewLayoutRowsFitIntoWindow() ||
!mpPgPrevwLayout->DoesPreviewLayoutColsFitIntoWindow() )
bPaintPageAtFirstCol = false;
break;
case MV_NEWWINSIZE:
- // OD 18.12.2002 #103492# - nothing special to do.
+ // nothing special to do.
break;
case MV_CALC:
- // OD 18.12.2002 #103492# - re-init page preview layout.
+ // re-init page preview layout.
mpPgPrevwLayout->ReInit();
- // OD 03.12.2002 #103492# - correct calculation of new start page.
+ // correct calculation of new start page.
if( nNewSttPage > nPageCount )
nNewSttPage = nPageCount;
- // OD 18.12.2002 #103492# - correct selected page number
+ // correct selected page number
if( SelectedPage() > nPageCount )
SetSelectedPage( nNewSttPage ? nNewSttPage : 1 );
}
@@ -425,8 +378,8 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
SetPagePreview(mnRow, mnCol);
mnSttPage = nNewSttPage;
- // OD 24.03.2003 #108282# - additional invalidate page status.
- static sal_uInt16 __READONLY_DATA aInval[] =
+ // additional invalidate page status.
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -438,11 +391,6 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
return sal_True;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwPagePreViewWin::SetWinSize( const Size& rNewSize )
{
// die Size wollen wir aber immer in Pixel-Einheiten haben
@@ -470,15 +418,9 @@ void SwPagePreViewWin::SetWinSize( const Size& rNewSize )
maScale = GetMapMode().GetScaleX();
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwPagePreViewWin::GetStatusStr( String& rStr, sal_uInt16 nPageCnt ) const
{
- // OD 24.03.2003 #108282# - show physical and virtual page number of
+ // show physical and virtual page number of
// selected page, if it's visible.
sal_uInt16 nPageNum;
if ( mpPgPrevwLayout->IsPageVisible( mpPgPrevwLayout->SelectedPage() ) )
@@ -500,11 +442,6 @@ void SwPagePreViewWin::GetStatusStr( String& rStr, sal_uInt16 nPageCnt ) const
rStr += String::CreateFromInt32( nPageCnt );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt )
{
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
@@ -530,10 +467,6 @@ void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt )
Window::KeyInput( rKEvt );
}
-/******************************************************************************
- * Beschreibung:
- ******************************************************************************/
-
void SwPagePreViewWin::Command( const CommandEvent& rCEvt )
{
sal_Bool bCallBase = sal_True;
@@ -561,7 +494,6 @@ void SwPagePreViewWin::Command( const CommandEvent& rCEvt )
}
break;
default:
- // OD 17.12.2002 #103492# - delete assertion
;
}
@@ -571,7 +503,7 @@ void SwPagePreViewWin::Command( const CommandEvent& rCEvt )
void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
{
- // OD 17.12.2002 #103492# - consider single-click to set selected page
+ // consider single-click to set selected page
if( MOUSE_LEFT == ( rMEvt.GetModifier() + rMEvt.GetButtons() ) )
{
Point aPrevwPos( PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -596,18 +528,17 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
SFX_CALLMODE_ASYNCHRON );
}
else if ( bIsDocPos || bPosInEmptyPage )
- // OD 2004-03-04 #i20684# - add missing parenthesis
{
// show clicked page as the selected one
mpPgPrevwLayout->MarkNewSelectedPage( nNewSelectedPage );
GetViewShell()->ShowPreViewSelection( nNewSelectedPage );
- // OD 19.02.2003 #107369# - adjust position at vertical scrollbar.
+ // adjust position at vertical scrollbar.
if ( mpPgPrevwLayout->DoesPreviewLayoutRowsFitIntoWindow() )
{
mrView.SetVScrollbarThumbPos( nNewSelectedPage );
}
- // OD 24.03.2003 #108282# - invalidate page status.
- static sal_uInt16 __READONLY_DATA aInval[] =
+ // invalidate page status.
+ static sal_uInt16 aInval[] =
{
FN_STAT_PAGE, 0
};
@@ -620,8 +551,6 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
/******************************************************************************
* Beschreibung: Userprefs bzw Viewoptions setzen
******************************************************************************/
-
-
void SwPagePreViewWin::SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol )
{
SwMasterUsrPref *pOpt = (SwMasterUsrPref *)SW_MOD()->GetUsrPref(sal_False);
@@ -639,8 +568,6 @@ void SwPagePreViewWin::SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol )
/** get selected page in document preview
- OD 13.12.2002 #103492#
-
@author OD
*/
sal_uInt16 SwPagePreViewWin::SelectedPage() const
@@ -650,8 +577,6 @@ sal_uInt16 SwPagePreViewWin::SelectedPage() const
/** set selected page number in document preview
- OD 13.12.2002 #103492#
-
@author OD
*/
void SwPagePreViewWin::SetSelectedPage( sal_uInt16 _nSelectedPageNum )
@@ -661,8 +586,6 @@ void SwPagePreViewWin::SetSelectedPage( sal_uInt16 _nSelectedPageNum )
/** method to enable/disable book preview
- OD 2004-03-05 #i18143#
-
@author OD
*/
bool SwPagePreViewWin::SetBookPreviewMode( const bool _bBookPreview )
@@ -685,7 +608,7 @@ void SwPagePreViewWin::DataChanged( const DataChangedEvent& rDCEvt )
// den Settings abgefragt werden.
if( rDCEvt.GetFlags() & SETTINGS_STYLE )
mrView.InvalidateBorder(); //Scrollbarbreiten
- //#106746# zoom has to be disabled if Accessibility support is switched on
+ // zoom has to be disabled if Accessibility support is switched on
lcl_InvalidateZoomSlots(mrView.GetViewFrame()->GetBindings());
break;
@@ -702,8 +625,6 @@ void SwPagePreViewWin::DataChanged( const DataChangedEvent& rDCEvt )
/** help method to execute SfxRequest FN_PAGEUP and FN_PAGEDOWN
- OD 04.03.2003 #107369#
-
@author OD
*/
void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
@@ -762,8 +683,8 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
aViewWin.SetSelectedPage( nNewSelectedPageNum );
}
ScrollViewSzChg();
- // OD 24.03.2003 #108282# - additional invalidate page status.
- static sal_uInt16 __READONLY_DATA aInval[] =
+ // additional invalidate page status.
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -778,9 +699,6 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
_pReq->Done();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
// dann mal alles fuer die SwPagePreView
void SwPagePreView::Execute( SfxRequest &rReq )
{
@@ -829,7 +747,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
// book preview mode changed. Thus, adjust scrollbars and
// invalidate corresponding states.
ScrollViewSzChg();
- static sal_uInt16 __READONLY_DATA aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, FN_SHOW_BOOKVIEW, 0
@@ -870,7 +788,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
if(pFact)
{
pDlg = pFact->CreateSvxZoomDialog(&GetViewFrame()->GetWindow(), aCoreSet);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
}
pDlg->SetLimits( MINZOOM, MAXZOOM );
@@ -941,7 +859,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
if ( pPagePrevwLay->IsPageVisible( nNewSelectedPage ) )
{
pPagePrevwLay->MarkNewSelectedPage( nNewSelectedPage );
- // OD 19.02.2003 #107369# - adjust position at vertical scrollbar.
+ // adjust position at vertical scrollbar.
SetVScrollbarThumbPos( nNewSelectedPage );
bRefresh = false;
}
@@ -953,8 +871,8 @@ void SwPagePreView::Execute( SfxRequest &rReq )
bRefresh = 0 != nRet;
}
GetViewShell()->ShowPreViewSelection( nNewSelectedPage );
- // OD 24.03.2003 #108282# - invalidate page status.
- static sal_uInt16 __READONLY_DATA aInval[] =
+ // invalidate page status.
+ static sal_uInt16 aInval[] =
{
FN_STAT_PAGE, 0
};
@@ -1040,7 +958,7 @@ MOVEPAGE:
}
break;
default:
- ASSERT(!this, falscher Dispatcher);
+ OSL_ENSURE(!this, "wrong dispatcher");
return;
}
@@ -1048,20 +966,14 @@ MOVEPAGE:
aViewWin.Invalidate();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwPagePreView::GetState( SfxItemSet& rSet )
{
SfxWhichIter aIter(rSet);
sal_uInt8 nRow = 1;
sal_uInt16 nWhich = aIter.FirstWhich();
- ASSERT(nWhich, leeres Set);
+ OSL_ENSURE(nWhich, "empty set");
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
- //#106746# zoom has to be disabled if Accessibility support is switched on
- // MT 2010/01, see #110498#
+ // zoom has to be disabled if Accessibility support is switched on
sal_Bool bZoomEnabled = sal_True; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
while(nWhich)
@@ -1207,11 +1119,6 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwPagePreView::StateUndo(SfxItemSet& rSet)
{
SfxWhichIter aIter(rSet);
@@ -1224,11 +1131,6 @@ void SwPagePreView::StateUndo(SfxItemSet& rSet)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwPagePreView::Init(const SwViewOption * pPrefs)
{
if ( GetViewShell()->HasDrawView() )
@@ -1274,7 +1176,7 @@ void SwPagePreView::Init(const SwViewOption * pPrefs)
GetViewShell()->ApplyViewOptions( aOpt );
GetViewShell()->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions());
- // OD 09.01.2003 #i6467# - adjust view shell option to the same as for print
+ // adjust view shell option to the same as for print
SwPrintData const aPrintOptions = *SW_MOD()->GetPrtOptions(false);
GetViewShell()->AdjustOptionsForPagePreview( aPrintOptions );
@@ -1296,12 +1198,6 @@ void SwPagePreView::Init(const SwViewOption * pPrefs)
pScrollFill->Show(pPrefs->IsViewVScrollBar() && pPrefs->IsViewHScrollBar());
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
SfxViewShell( pViewFrame, SWVIEWFLAGS ),
aViewWin( &pViewFrame->GetWindow(), *this ),
@@ -1313,7 +1209,6 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
pScrollFill(new ScrollBarBox( &pViewFrame->GetWindow(),
pViewFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
mnPageCount( 0 ),
- // OD 09.01.2003 #106334#
mbResetFormDesignMode( false ),
mbFormDesignModeToReset( false )
{
@@ -1352,14 +1247,14 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
{
// setze die akt. Seite als die erste
sal_uInt16 nPhysPg, nVirtPg;
- ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, /*sal_False*/sal_True, sal_False );
+ ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, sal_True, sal_False );
if( 1 != aViewWin.GetCol() && 1 == nPhysPg )
--nPhysPg;
aViewWin.SetSttPage( nPhysPg );
}
}
- // OD 09.01.2003 #106334# - for form shell remember design mode of draw view
+ // for form shell remember design mode of draw view
// of previous view shell
if ( pVS && pVS->HasDrawView() )
{
@@ -1379,13 +1274,7 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
Init();
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
- SwPagePreView::~SwPagePreView()
+SwPagePreView::~SwPagePreView()
{
SetWindow( 0 );
@@ -1395,39 +1284,19 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
delete pPageUpBtn;
delete pPageDownBtn;
-/* SfxObjectShell* pDocSh = GetDocShell();
- for( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocSh );
- pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh ) )
- if( pFrame != GetViewFrame() )
- {
- // es gibt noch eine weitere Sicht auf unser Dokument, also
- // aktiviere dieses
- pFrame->GetFrame().Appear();
- break;
- }
-*/}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
+}
SwDocShell* SwPagePreView::GetDocShell()
{
return PTR_CAST(SwDocShell, GetViewFrame()->GetObjectShell());
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
int SwPagePreView::_CreateScrollbar( sal_Bool bHori )
{
Window *pMDI = &GetViewFrame()->GetWindow();
SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar;
- ASSERT( !*ppScrollbar, "vorher abpruefen!" )
+ OSL_ENSURE( !*ppScrollbar, "vorher abpruefen!" );
if( !bHori )
{
@@ -1457,33 +1326,18 @@ int SwPagePreView::_CreateScrollbar( sal_Bool bHori )
return 1;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
/*
* Button-Handler
*/
IMPL_LINK_INLINE_START( SwPagePreView, BtnPage, Button *, pButton )
{
- // OD 04.03.2003 #107369# - use new helper method to perform page up
+ // use new helper method to perform page up
// respectively page down.
_ExecPgUpAndPgDown( pButton == pPageUpBtn );
return 0;
}
IMPL_LINK_INLINE_END( SwPagePreView, BtnPage, Button *, pButton )
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
{
Rectangle aPixVisArea( aViewWin.LogicToPixel( aVisArea ) );
@@ -1503,7 +1357,7 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
{
ScrollViewSzChg();
- static sal_uInt16 __READONLY_DATA aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT,
FN_PAGEUP, FN_PAGEDOWN, 0
@@ -1515,21 +1369,11 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
return bChg;
}
-
-/* */
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
// ab hier alles aus der SwView uebernommen
-
-
void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
{
-// const long nAdd = bInner ? 0 : ScrollBar::GetWindowOverlapPixel();
const StyleSettings &rSet = aViewWin.GetSettings().GetStyleSettings();
- const long nTmp = rSet.GetScrollBarSize();// - nAdd;
+ const long nTmp = rSet.GetScrollBarSize();
if ( pVScrollbar->IsVisible( sal_False ))
rToFill.Right() = nTmp;
if ( pHScrollbar->IsVisible( sal_False ) )
@@ -1537,11 +1381,6 @@ void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*
SetBorderPixel( rToFill );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwPagePreView::InnerResizePixel( const Point &rOfst, const Size &rSize )
{
SvBorder aBorder;
@@ -1558,11 +1397,6 @@ void SwPagePreView::InnerResizePixel( const Point &rOfst, const Size &rSize )
//VisArea niemals einstellen!
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize )
{
SvBorder aBorder;
@@ -1586,11 +1420,6 @@ void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwPagePreView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollbar )
{
const Point aTopLeft(AlignToPixel(rRect.TopLeft()));
@@ -1615,7 +1444,7 @@ void SwPagePreView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollba
if(aLR.Right() < 0) aLR.Right() = 0;
if(aLR.Bottom() < 0) aLR.Bottom() = 0;
if(aLR == aVisArea ||
- // JP 29.10.97: Bug 45173 - Leeres Rechteck nicht beachten
+ // Leeres Rechteck nicht beachten
( 0 == aLR.Bottom() - aLR.Top() && 0 == aLR.Right() - aLR.Left() ) )
return;
@@ -1634,17 +1463,11 @@ void SwPagePreView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollba
// setze am View-Win die aktuelle Size
aVisArea = aLR;
aViewWin.SetWinSize( aLR.GetSize() );
- // OD 18.12.2002 #103492# - use new mode
ChgPage( SwPagePreViewWin::MV_NEWWINSIZE, bUpdateScrollbar );
aViewWin.Invalidate();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
IMPL_LINK( SwPagePreView, ScrollHdl, SwScrollbar *, pScrollbar )
{
if(!GetViewShell())
@@ -1663,7 +1486,6 @@ IMPL_LINK( SwPagePreView, ScrollHdl, SwScrollbar *, pScrollbar )
Point aPos = pScrollbar->GetParent()->OutputToScreenPixel(
pScrollbar->GetPosPixel());
aPos.Y() = pScrollbar->OutputToScreenPixel(pScrollbar->GetPointerPosPixel()).Y();
- Size aSize = pScrollbar->GetSizePixel();
Rectangle aRect;
aRect.Left() = aPos.X() -8;
aRect.Right() = aRect.Left();
@@ -1679,17 +1501,12 @@ IMPL_LINK( SwPagePreView, ScrollHdl, SwScrollbar *, pScrollbar )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
{
if(!GetViewShell())
return 0;
- // OD 04.03.2003 #107369# - boolean to avoid unnecessary invalidation of the window.
+ // boolean to avoid unnecessary invalidation of the window.
bool bInvalidateWin = true;
if( !pScrollbar->IsHoriScroll() ) // scroll vertically
@@ -1700,33 +1517,33 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
{
// wieviele Seiten scrollen ??
sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos();
- // OD 05.12.2002 #103492# - adjust to new preview functionality
+ // adjust to new preview functionality
if( nThmbPos != aViewWin.SelectedPage() )
{
- // OD 17.01.2003 #103492# - consider case that page <nThmbPos>
+ // consider case that page <nThmbPos>
// is already visible
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
if ( pPagePrevwLay->IsPageVisible( nThmbPos ) )
{
pPagePrevwLay->MarkNewSelectedPage( nThmbPos );
- // OD 04.03.2003 #107369# - invalidation of window is unnecessary
+ // invalidation of window is unnecessary
bInvalidateWin = false;
}
else
{
- // OD 17.01.2003 #103492# - consider whether layout columns
+ // consider whether layout columns
// fit or not.
if ( !pPagePrevwLay->DoesPreviewLayoutColsFitIntoWindow() )
{
aViewWin.SetSttPage( nThmbPos );
aViewWin.SetSelectedPage( nThmbPos );
ChgPage( SwPagePreViewWin::MV_SCROLL, sal_False );
- // OD 20.01.2003 #103492# - update scrollbars
+ // update scrollbars
ScrollViewSzChg();
}
else
{
- // OD 04.03.2003 #107369# - correct scroll amount
+ // correct scroll amount
const sal_Int16 nPageDiff = nThmbPos - aViewWin.SelectedPage();
const sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
sal_Int16 nWinPagesToScroll = nPageDiff / nVisPages;
@@ -1739,12 +1556,12 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
aViewWin.Scroll( 0, pPagePrevwLay->GetWinPagesScrollAmount( nWinPagesToScroll ) );
}
}
- // OD 17.01.2003 #103492# - update accessibility
+ // update accessibility
GetViewShell()->ShowPreViewSelection( nThmbPos );
}
else
{
- // OD 04.03.2003 #107369# - invalidation of window is unnecessary
+ // invalidation of window is unnecessary
bInvalidateWin = false;
}
}
@@ -1759,36 +1576,27 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
long nThmbPos = pScrollbar->GetThumbPos();
aViewWin.Scroll(nThmbPos - aViewWin.GetPaintedPreviewDocRect().Left(), 0);
}
- // OD 24.03.2003 #108282# - additional invalidate page status.
- static sal_uInt16 __READONLY_DATA aInval[] =
+ // additional invalidate page status.
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
};
SfxBindings& rBindings = GetViewFrame()->GetBindings();
rBindings.Invalidate( aInval );
- // OD 04.03.2003 #107369# - control invalidation of window
+ // control invalidation of window
if ( bInvalidateWin )
{
aViewWin.Invalidate();
}
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
Point SwPagePreView::AlignToPixel(const Point &rPt) const
{
return aViewWin.PixelToLogic( aViewWin.LogicToPixel( rPt ) );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwPagePreView::DocSzChgd( const Size &rSz )
{
if( aDocSz == rSz )
@@ -1796,7 +1604,7 @@ void SwPagePreView::DocSzChgd( const Size &rSz )
aDocSz = rSz;
- // --> OD 2009-08-20 #i96726#
+ // #i96726#
// Due to the multiple page layout it is needed to trigger recalculation
// of the page preview layout, even if the count of pages is not changing.
mnPageCount = GetViewShell()->GetNumPages();
@@ -1808,14 +1616,8 @@ void SwPagePreView::DocSzChgd( const Size &rSz )
aViewWin.Invalidate();
}
- // <--
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwPagePreView::ScrollViewSzChg()
{
if(!GetViewShell())
@@ -1825,10 +1627,10 @@ void SwPagePreView::ScrollViewSzChg()
if(GetViewShell()->PagePreviewLayout()->DoesPreviewLayoutRowsFitIntoWindow())
{
//vertical scrolling by row
- // OD 04.12.2002 #103492# - adjust to new preview functionality
+ // adjust to new preview functionality
sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
pVScrollbar->SetVisibleSize( nVisPages );
- // OD 19.02.2003 #107369# - set selected page as scroll bar position,
+ // set selected page as scroll bar position,
// if it is visible.
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
if ( pPagePrevwLay->IsPageVisible( aViewWin.SelectedPage() ) )
@@ -1845,7 +1647,7 @@ void SwPagePreView::ScrollViewSzChg()
Range aScrollbarRange( 1, mnPageCount );
// increase range by one, because left-top-corner is left blank.
++aScrollbarRange.Max();
- // OD 17.01.2003 #103492# - increase range in order to access all pages
+ // increase range in order to access all pages
aScrollbarRange.Max() += ( nVisPages - 1 );
pVScrollbar->SetRange( aScrollbarRange );
}
@@ -1885,35 +1687,17 @@ void SwPagePreView::ScrollViewSzChg()
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwPagePreView::ScrollDocSzChg()
{
ScrollViewSzChg();
}
-
-/* */
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
// alles zum Thema Drucken
-
SfxPrinter* SwPagePreView::GetPrinter( sal_Bool bCreate )
{
return aViewWin.GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
sal_uInt16 SwPagePreView::SetPrinter( SfxPrinter *pNew, sal_uInt16 nDiffFlags, bool )
{
ViewShell &rSh = *GetViewShell();
@@ -1948,16 +1732,16 @@ sal_uInt16 SwPagePreView::SetPrinter( SfxPrinter *pNew, sal_uInt16 nDiffFlags,
rESh.SetModified();
rESh.EndAllAction();
- static sal_uInt16 __READONLY_DATA aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE,
SID_RULER_BORDERS, SID_RULER_PAGE_POS, 0
};
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
{
const sal_uInt16* pPtr = aInval + 1;
do {
- ASSERT( *(pPtr - 1) < *pPtr, "falsche Sortierung!" );
+ OSL_ENSURE( *(pPtr - 1) < *pPtr, "wrong sorting!" );
} while( *++pPtr );
}
#endif
@@ -1968,58 +1752,18 @@ sal_uInt16 SwPagePreView::SetPrinter( SfxPrinter *pNew, sal_uInt16 nDiffFlags,
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SfxTabPage* SwPagePreView::CreatePrintOptionsPage( Window *pParent,
const SfxItemSet &rOptions )
{
return ::CreatePrintOptionsPage( pParent, rOptions, !bNormalPrint );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-// OD 18.12.2002 #103492# - no longer needed ??
Size SwPagePreView::GetOptimalSizePixel() const
{
- ASSERT( false, "overloaded virtual method <SwPagePreView::GetOptimalSizePixel()> needed ??" )
+ OSL_ENSURE( false, "overloaded virtual method <SwPagePreView::GetOptimalSizePixel()> needed ??" );
return Size( -1, -1 );
-/*
- //JP 09.06.99: was wird hier errechnet ?????
-// ALT:
-// SfxApplicationWindow* pWin = SFX_APPWINDOW ;
-// Rectangle aRect = pWin->GetClientAreaPixel();
-
- Window& rWin = GetViewFrame()->GetWindow();
- Rectangle aRect( Point(0, 0), rWin.GetOutputSizePixel() );
- Size aMaxSize( aRect.GetWidth(), aRect.GetHeight() );
- Size aInSize = rWin.GetOutputSizePixel();
- Size aOutSize = rWin.GetSizePixel();
- sal_uInt16 nXBorder = sal_uInt16(aOutSize.Width() - aInSize.Width());
- sal_uInt16 nYBorder = sal_uInt16(aOutSize.Height() - aInSize.Height());
- aMaxSize.Width() -= nXBorder;
- //'auf Verdacht' etwas vom Border abziehen (Menue)
- nYBorder -= (nYBorder - nXBorder) / 2;
- aMaxSize.Height() -= nYBorder;
- //mit der max. moeglichen Outputsize guenstigstes Verhaeltnis ausrechnen
- aViewWin.GetOptimalSize(aMaxSize);
- // Border wieder dazuzaehlen
- aMaxSize.Height() += nYBorder;
- aMaxSize.Width() += nXBorder;
- return aMaxSize;
-*/
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-// OD 12.12.2002 #103492#
void SwPagePreViewWin::SetViewShell( ViewShell* pShell )
{
mpViewShell = pShell;
@@ -2031,7 +1775,7 @@ void SwPagePreViewWin::SetViewShell( ViewShell* pShell )
void SwPagePreViewWin::RepaintCoreRect( const SwRect& rRect )
{
- // OD 2004-03-04 #i24183#
+ // #i24183#
if ( mpPgPrevwLayout->PreviewLayoutValid() )
{
mpPgPrevwLayout->Repaint( Rectangle( rRect.Pos(), rRect.SSize() ) );
@@ -2040,13 +1784,12 @@ void SwPagePreViewWin::RepaintCoreRect( const SwRect& rRect )
/** method to adjust preview to a new zoom factor
- OD 02.12.2002 #103492#
- OD 24.09.2003 #i19975# - also consider zoom type - adding parameter <_eZoomType>
+ #i19975# also consider zoom type - adding parameter <_eZoomType>
*/
void SwPagePreViewWin::AdjustPreviewToNewZoom( const sal_uInt16 _nZoomFactor,
const SvxZoomType _eZoomType )
{
- // OD 24.09.2003 #i19975# - consider zoom type
+ // #i19975# consider zoom type
if ( _eZoomType == SVX_ZOOM_WHOLEPAGE )
{
mnRow = 1;
@@ -2081,11 +1824,12 @@ void SwPagePreViewWin::AdjustPreviewToNewZoom( const sal_uInt16 _nZoomFactor,
}
}
-/* -----------------04.12.2002 10:46-----------------
+
+/**
* pixel scrolling - horizontally always or vertically
* when less than the desired number of rows fits into
* the view
- * --------------------------------------------------*/
+ */
void SwPagePreViewWin::Scroll(long nXMove, long nYMove, sal_uInt16 /*nFlags*/)
{
maPaintedPreviewDocRect.Move(nXMove, nYMove);
@@ -2126,50 +1870,37 @@ sal_Bool SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
return bOk;
}
-
uno::Reference< ::com::sun::star::accessibility::XAccessible >
SwPagePreViewWin::CreateAccessible()
{
- vos::OGuard aGuard(Application::GetSolarMutex()); // this should have
- // happend already!!!
+ SolarMutexGuard aGuard; // this should have happend already!!!
- DBG_ASSERT( GetViewShell() != NULL, "We need a view shell" );
+ OSL_ENSURE( GetViewShell() != NULL, "We need a view shell" );
return GetViewShell()->CreateAccessiblePreview();
}
-/* -----------------------------06.05.2002 13:18------------------------------
-
- ---------------------------------------------------------------------------*/
void SwPagePreView::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions)
{
GetViewShell()->ApplyAccessiblityOptions(rAccessibilityOptions);
}
-/* -----------------------------2002/06/26 14:30------------------------------
- ---------------------------------------------------------------------------*/
void SwPagePreView::ShowHScrollbar(sal_Bool bShow)
{
pHScrollbar->Show(bShow);
InvalidateBorder();
}
-/* -----------------------------2002/06/26 14:30------------------------------
-
- ---------------------------------------------------------------------------*/
void SwPagePreView::ShowVScrollbar(sal_Bool bShow)
{
pVScrollbar->Show(bShow);
InvalidateBorder();
}
-/* -----------------25.11.2002 16:36-----------------
- *
- * --------------------------------------------------*/
void SwPagePreView::SetZoom(SvxZoomType eType, sal_uInt16 nFactor)
{
ViewShell& rSh = *GetViewShell();
SwViewOption aOpt(*rSh.GetViewOptions());
- // OD 16.12.2002 #103492# - perform action only on changes of zoom or zoom type.
+ // perform action only on changes of zoom or zoom type.
if ( aOpt.GetZoom() != nFactor ||
aOpt.GetZoomType() != eType )
{
@@ -2177,8 +1908,7 @@ void SwPagePreView::SetZoom(SvxZoomType eType, sal_uInt16 nFactor)
aOpt.SetZoomType(eType);
rSh.ApplyViewOptions( aOpt );
lcl_InvalidateZoomSlots(GetViewFrame()->GetBindings());
- // OD 02.12.2002 #103492#
- // OD 24.09.2003 #i19975# - also consider zoom type
+ // #i19975# also consider zoom type
aViewWin.AdjustPreviewToNewZoom( nFactor, eType );
ScrollViewSzChg();
}
@@ -2186,8 +1916,6 @@ void SwPagePreView::SetZoom(SvxZoomType eType, sal_uInt16 nFactor)
/** adjust position of vertical scrollbar
- OD 19.02.2003 #107369
-
@author OD
*/
void SwPagePreView::SetVScrollbarThumbPos( const sal_uInt16 _nNewThumbPos )
@@ -2197,3 +1925,5 @@ void SwPagePreView::SetVScrollbarThumbPos( const sal_uInt16 _nNewThumbPos )
pVScrollbar->SetThumbPos( _nNewThumbPos );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/pview.src b/sw/source/ui/uiview/pview.src
index f2fd88d6d754..8f60e4d3a5be 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 ;
diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx
index 22109be8a039..23cdaad2979a 100644
--- a/sw/source/ui/uiview/scroll.cxx
+++ b/sw/source/ui/uiview/scroll.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "swtypes.hxx"
#include "swrect.hxx"
#include "scroll.hxx"
@@ -65,7 +64,6 @@ void SwScrollbar::DocSzChgd( const Size &rSize )
SetRange( Range( 0, bHori ? rSize.Width() : rSize.Height()) );
const sal_uLong nVisSize = GetVisibleSize();
SetLineSize( SCROLL_LINE_SIZE );
-// SetLineSize( nVisSize * 10 / 100 );
SetPageSize( nVisSize * 77 / 100 );
}
@@ -97,9 +95,6 @@ void SwScrollbar::ViewPortChgd( const Rectangle &rRect )
AutoShow();
}
-/*-----------------10/21/97 02:48pm-----------------
-
---------------------------------------------------*/
void SwScrollbar::ExtendedShow( sal_Bool bSet )
{
bVisible = bSet;
@@ -107,9 +102,6 @@ void SwScrollbar::ExtendedShow( sal_Bool bSet )
ScrollBar::Show(bSet);
}
-/*-----------------10/21/97 03:23pm-----------------
-
---------------------------------------------------*/
void SwScrollbar::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
{
ScrollBar::SetPosSizePixel(rNewPos, rNewSize);
@@ -119,10 +111,6 @@ void SwScrollbar::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
}
-
-/*-----------------14.04.98 11:38-------------------
-
---------------------------------------------------*/
void SwScrollbar::SetAuto(sal_Bool bSet)
{
if(bAuto != bSet)
@@ -136,14 +124,11 @@ void SwScrollbar::SetAuto(sal_Bool bSet)
AutoShow(); // oder automatisch verstecken
}
}
-/*-----------------14.04.98 11:43-------------------
---------------------------------------------------*/
void SwScrollbar::AutoShow()
{
long nVis = GetVisibleSize();
long nLen = GetRange().Len();
- {
if( nVis >= nLen - 1)
{
if(ScrollBar::IsVisible())
@@ -156,5 +141,6 @@ void SwScrollbar::AutoShow()
{
ScrollBar::Show(sal_True);
}
- }
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index e94b1952707f..abaf5aefd615 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -137,11 +138,6 @@ SFX_IMPL_INTERFACE( SwSrcView, SfxViewShell, SW_RES(0) )
TYPEINIT1(SwSrcView, SfxViewShell)
-/*-----------------18.11.96 08.05-------------------
-
---------------------------------------------------*/
-
-
void lcl_PrintHeader( OutputDevice &rOutDev, sal_uInt16 nPages, sal_uInt16 nCurPage, const String& rTitle )
{
short nLeftMargin = LMARGPRN;
@@ -195,9 +191,7 @@ void lcl_PrintHeader( OutputDevice &rOutDev, sal_uInt16 nPages, sal_uInt16 nCurP
rOutDev.SetFont( aOldFont );
rOutDev.SetFillColor( aOldFillColor );
}
-/* -----------------13.11.2003 16:24-----------------
- --------------------------------------------------*/
rtl_TextEncoding lcl_GetStreamCharSet(rtl_TextEncoding eLoadEncoding)
{
rtl_TextEncoding eRet = eLoadEncoding;
@@ -210,9 +204,6 @@ rtl_TextEncoding lcl_GetStreamCharSet(rtl_TextEncoding eLoadEncoding)
}
return eRet;
}
-/*-----------------18.11.96 08.21-------------------
-
---------------------------------------------------*/
void lcl_ConvertTabsToSpaces( String& rLine )
{
@@ -236,11 +227,6 @@ void lcl_ConvertTabsToSpaces( String& rLine )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) :
SfxViewShell( pViewFrame, SWSRCVIEWFLAGS ),
aEditWin( &pViewFrame->GetWindow(), this ),
@@ -251,15 +237,10 @@ SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) :
Init();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwSrcView::~SwSrcView()
{
SwDocShell* pDocShell = GetDocShell();
- DBG_ASSERT(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?");
+ OSL_ENSURE(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?");
const TextSelection& rSel = aEditWin.GetTextView()->GetSelection();
((SwWebDocShell*)pDocShell)->SetSourcePara( static_cast< sal_uInt16 >( rSel.GetStart().GetPara() ) );
@@ -270,27 +251,18 @@ SwSrcView::~SwSrcView()
::rtl::OUString url = xDocProps->getAutoloadURL();
sal_Int32 delay = xDocProps->getAutoloadSecs();
pDocShell->SetAutoLoad(INetURLObject(url), delay,
- (delay != 0) || !url.equalsAscii(""));
-// EndListening(*GetViewFrame());
+ (delay != 0) || url.getLength());
EndListening(*pDocShell);
delete pSearchItem;
}
-/*-----------------24.04.97 10:37-------------------
-
---------------------------------------------------*/
void SwSrcView::SaveContentTo(SfxMedium& rMed)
{
SvStream* pOutStream = rMed.GetOutStream();
pOutStream->SetStreamCharSet(lcl_GetStreamCharSet(eLoadEncoding));
- aEditWin.Write( *pOutStream );//, EE_FORMAT_TEXT);
+ aEditWin.Write( *pOutStream );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwSrcView::Init()
{
SetHelpId(SW_SRC_VIEWSHELL);
@@ -306,39 +278,24 @@ void SwSrcView::Init()
aEditWin.SetReadonly(sal_True);
}
-// StartListening(*GetViewFrame());
StartListening(*pDocShell,sal_True);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwDocShell* SwSrcView::GetDocShell()
{
SfxObjectShell* pObjShell = GetViewFrame()->GetObjectShell();
return PTR_CAST(SwDocShell, pObjShell);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwSrcView::SaveContent(const String& rTmpFile)
{
SfxMedium aMedium( rTmpFile, STREAM_WRITE, sal_True);
SvStream* pOutStream = aMedium.GetOutStream();
pOutStream->SetStreamCharSet( lcl_GetStreamCharSet(eLoadEncoding) );
- aEditWin.Write(*pOutStream);//, EE_FORMAT_TEXT);
+ aEditWin.Write(*pOutStream);
aMedium.Commit();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwSrcView::Execute(SfxRequest& rReq)
{
sal_uInt16 nSlot = rReq.GetSlot();
@@ -353,7 +310,6 @@ void SwSrcView::Execute(SfxRequest& rReq)
TemplateDescription::FILESAVE_AUTOEXTENSION,
TemplateDescription::FILESAVE_SIMPLE );
uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
-// pFileDlg->SetHelpId(HID_FILEDLG_SRCVIEW);
uno::Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
// search for an html filter for export
@@ -421,7 +377,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
const SfxItemSet* pTmpArgs = rReq.GetArgs();
sal_uInt16 nWhich = pTmpArgs->GetWhichByPos( 0 );
- DBG_ASSERT( nWhich, "Wich fuer SearchItem ?" );
+ OSL_ENSURE( nWhich, "Wich fuer SearchItem ?" );
const SfxPoolItem& rItem = pTmpArgs->Get( nWhich );
SetSearchItem( (const SvxSearchItem&)rItem);
StartSearchAndReplace( (const SvxSearchItem&)rItem, sal_False, rReq.IsAPI() );
@@ -474,11 +430,6 @@ void SwSrcView::Execute(SfxRequest& rReq)
aEditWin.Invalidate();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwSrcView::GetState(SfxItemSet& rSet)
{
SfxWhichIter aIter(rSet);
@@ -608,11 +559,6 @@ void SwSrcView::GetState(SfxItemSet& rSet)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SvxSearchItem* SwSrcView::GetSearchItem()
{
if(!pSearchItem)
@@ -622,22 +568,12 @@ SvxSearchItem* SwSrcView::GetSearchItem()
return pSearchItem;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwSrcView::SetSearchItem( const SvxSearchItem& rItem )
{
delete pSearchItem;
pSearchItem = (SvxSearchItem*)rItem.Clone();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
sal_Bool bFromStart,
sal_Bool bApi,
@@ -720,10 +656,6 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
return nFound;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool )
{
SwDocShell* pDocSh = GetDocShell();
@@ -745,18 +677,11 @@ sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SfxPrinter* SwSrcView::GetPrinter( sal_Bool bCreate )
{
return GetDocShell()->GetDoc()->getPrinter( bCreate );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
sal_Int32 SwSrcView::PrintSource(
OutputDevice *pOutDev,
sal_Int32 nPage,
@@ -827,16 +752,10 @@ sal_Int32 SwSrcView::PrintSource(
pOutDev->Pop();
- DBG_ASSERT( bCalcNumPagesOnly || nPage <= nCurPage, "page number out of range" );
+ OSL_ENSURE( bCalcNumPagesOnly || nPage <= nCurPage, "page number out of range" );
return nCurPage;
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwSrcView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if ( rHint.ISA(SfxSimpleHint) &&
@@ -857,9 +776,6 @@ void SwSrcView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SfxViewShell::Notify(rBC, rHint);
}
-/*-----------------19.04.97 10:19-------------------
-
---------------------------------------------------*/
void SwSrcView::Load(SwDocShell* pDocShell)
{
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
@@ -898,7 +814,7 @@ void SwSrcView::Load(SwDocShell* pDocShell)
pStream->Seek(0);
TextEngine* pTextEngine = aEditWin.GetTextEngine();
pTextEngine->EnableUndo(sal_False);
- aEditWin.Read(*pStream);//, EE_FORMAT_TEXT);
+ aEditWin.Read(*pStream);
pTextEngine->EnableUndo(sal_True);
}
else
@@ -934,7 +850,7 @@ void SwSrcView::Load(SwDocShell* pDocShell)
pInStream->SetStreamCharSet( eDestEnc );
- aEditWin.Read(*pInStream);//, EE_FORMAT_TEXT);
+ aEditWin.Read(*pInStream);
}
}
aEditWin.ClearModifyFlag();
@@ -945,7 +861,7 @@ void SwSrcView::Load(SwDocShell* pDocShell)
pDocShell->SetModified();// das Flag wird zwischendurch zurueckgesetzt
// AutoLoad abschalten
pDocShell->SetAutoLoad(INetURLObject(), 0, sal_False);
- DBG_ASSERT(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?");
+ OSL_ENSURE(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?");
sal_uInt16 nLine = ((SwWebDocShell*)pDocShell)->GetSourcePara();
aEditWin.SetStartLine(nLine);
aEditWin.GetTextEngine()->ResetUndo();
@@ -953,3 +869,4 @@ void SwSrcView::Load(SwDocShell* pDocShell)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx
index eca1b71052fc..1724efeedacd 100644
--- a/sw/source/ui/uiview/swcli.cxx
+++ b/sw/source/ui/uiview/swcli.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#include "precompiled_sw.hxx"
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
-
#include <wrtsh.hxx>
#include <doc.hxx>
#include <swtypes.hxx>
@@ -142,8 +142,8 @@ void SwOleClient::ViewChanged()
Size aVisSize( aSz.Width, aSz.Height );
- // Bug 24833: solange keine vernuenftige Size vom Object kommt,
- // kann nichts skaliert werden
+ // solange keine vernuenftige Size vom Object kommt,
+ // kann nichts skaliert werden
if( !aVisSize.Width() || !aVisSize.Height() )
return;
@@ -171,7 +171,6 @@ void SwOleClient::MakeVisible()
rSh.MakeObjVisible( GetObject() );
}
-// --> #i972#
void SwOleClient::FormatChanged()
{
const uno::Reference < embed::XEmbeddedObject >& xObj( GetObject() );
@@ -183,5 +182,5 @@ void SwOleClient::FormatChanged()
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 7050b8284d18..aff53fe8f20a 100644
--- a/sw/source/ui/uiview/uivwimp.cxx
+++ b/sw/source/ui/uiview/uivwimp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <cmdid.h>
#include "globals.hrc"
@@ -38,7 +38,7 @@
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/msgbox.hxx>
@@ -58,16 +58,12 @@
#include <view.hrc>
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::scanner;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::datatransfer::clipboard;
-/* -----------------02.06.98 15:31-------------------
- *
- * --------------------------------------------------*/
SwView_Impl::SwView_Impl(SwView* pShell) :
pxXTextView(new uno::Reference<view::XSelectionSupplier>),
pView(pShell),
@@ -84,9 +80,6 @@ SwView_Impl::SwView_Impl(SwView* pShell) :
xDisProvInterceptor = new SwXDispatchProviderInterceptor(*pView);
}
-/*-----------------13.12.97 09:51-------------------
-
---------------------------------------------------*/
SwView_Impl::~SwView_Impl()
{
Reference<XUnoTunnel> xDispTunnel(xDisProvInterceptor, UNO_QUERY);
@@ -114,31 +107,22 @@ SwView_Impl::~SwView_Impl()
delete m_pRequest;
}
-/*-----------------13.12.97 09:54-------------------
-
---------------------------------------------------*/
void SwView_Impl::SetShellMode(ShellModes eSet)
{
eShellMode = eSet;
}
-/*-----------------13.12.97 09:59-------------------
---------------------------------------------------*/
view::XSelectionSupplier* SwView_Impl::GetUNOObject()
{
return pxXTextView->get();
}
-/* -----------------02.06.98 15:29-------------------
- *
- * --------------------------------------------------*/
+
SwXTextView* SwView_Impl::GetUNOObject_Impl()
{
view::XSelectionSupplier* pTextView = pxXTextView->get();
return ((SwXTextView*)pTextView);
}
-/* -----------------------------29.05.00 09:04--------------------------------
- ---------------------------------------------------------------------------*/
void SwView_Impl::ExecuteScan( SfxRequest& rReq )
{
sal_uInt16 nSlot = rReq.GetSlot();
@@ -172,8 +156,6 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
else
{
rReq.Ignore();
-// KA 04.07.2002
-// InfoBox( 0, SW_RES(MSG_SCAN_NOSOURCE) ).Execute();
}
}
break;
@@ -218,9 +200,6 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
}
}
-/* -----------------------------29.05.00 08:26--------------------------------
-
- ---------------------------------------------------------------------------*/
SwScannerEventListener& SwView_Impl::GetScannerEventListener()
{
if(!xScanEvtLstnr.is())
@@ -228,7 +207,6 @@ SwScannerEventListener& SwView_Impl::GetScannerEventListener()
return *pScanEvtLstnr;
}
-
void SwView_Impl::AddClipboardListener()
{
if(!xClipEvtLstnr.is())
@@ -237,9 +215,7 @@ void SwView_Impl::AddClipboardListener()
pClipEvtLstnr->AddRemoveListener( sal_True );
}
}
-/* -----------------3/31/2003 11:42AM----------------
- --------------------------------------------------*/
void SwView_Impl::Invalidate()
{
GetUNOObject_Impl()->Invalidate();
@@ -254,9 +230,7 @@ void SwView_Impl::Invalidate()
pTransferable->Invalidate();
}
}
-/* -----------------3/31/2003 12:40PM----------------
- --------------------------------------------------*/
void SwView_Impl::AddTransferable(SwTransferable& rTransferable)
{
//prevent removing of the non-referenced SwTransferable
@@ -285,23 +259,19 @@ void SwView_Impl::InitRequest( const SfxRequest& rRequest )
m_pRequest = new SfxRequest( rRequest );
}
-// ------------------------- SwScannerEventListener ---------------------
-
SwScannerEventListener::~SwScannerEventListener()
{
}
void SAL_CALL SwScannerEventListener::disposing( const EventObject& rEventObject) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
#if defined WNT || defined UNX
+ SolarMutexGuard aGuard;
if( pView )
pView->ScannerEventHdl( rEventObject );
#endif
}
-// ------------------------- SwClipboardChangeListener ---------------------
-
SwClipboardChangeListener::~SwClipboardChangeListener()
{
}
@@ -315,7 +285,7 @@ void SAL_CALL SwClipboardChangeListener::changedContents( const CLIP_NMSPC::Clip
throw ( RuntimeException )
{
- const ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ const SolarMutexGuard aGuard;
if( pView )
{
{
@@ -343,3 +313,4 @@ void SwClipboardChangeListener::AddRemoveListener( sal_Bool bAdd )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index e9e3bc34dc31..e892760914d3 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,8 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
+#include <string>
#include <stdlib.h>
#include <hintids.hxx>
#include <rtl/logfile.hxx>
@@ -72,6 +72,7 @@
#include <drformsh.hxx>
#include <drwtxtsh.hxx>
#include <beziersh.hxx>
+#include <navsh.hxx>
#include <globdoc.hxx>
#include <scroll.hxx>
#include <navipi.hxx>
@@ -95,7 +96,6 @@
#include <prtopt.hxx>
#include <linguistic/lngprops.hxx>
#include <editeng/unolingu.hxx>
-//#include <sfx2/app.hxx>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/scanner/ScannerContext.hpp>
#include <com/sun/star/scanner/XScannerManager.hpp>
@@ -114,6 +114,7 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <svl/cjkoptions.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -122,7 +123,6 @@ using namespace ::com::sun::star::scanner;
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
-
extern sal_Bool bNoInterrupt; // in mainwn.cxx
#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT| \
@@ -144,26 +144,17 @@ sal_Bool SwView::bExtra = sal_False;
sal_Bool SwView::bFound = sal_False;
sal_Bool SwView::bJustOpened = sal_False;
-
SvxSearchDialog* SwView::pSrchDlg = 0;
SearchAttrItemList* SwView::pSrchList = 0;
SearchAttrItemList* SwView::pReplList = 0;
DBG_NAME(viewhdl)
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
inline SfxDispatcher &SwView::GetDispatcher()
{
return *GetViewFrame()->GetDispatcher();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwView::ImpSetVerb( int nSelType )
{
sal_Bool bResetVerbs = bVerbsActive;
@@ -191,7 +182,6 @@ void SwView::ImpSetVerb( int nSelType )
Description:
called by the SwEditWin when it gets the focus
--------------------------------------------------------------------*/
-
void SwView::GotFocus() const
{
// if we got the focus, and the form shell *is* on the top of the dispatcher
@@ -222,7 +212,6 @@ void SwView::GotFocus() const
a request to put the form shell on the top of the dispatcher
stack
--------------------------------------------------------------------*/
-
IMPL_LINK( SwView, FormControlActivated, FmFormShell*, EMPTYARG )
{
// if a form control has been activated, and the form shell is not on the top
@@ -262,7 +251,7 @@ void SwView::SelectShell()
}
pLastTableFormat = pCurTableFmt;
- //SEL_TBL und SEL_TBL_CELLS koennen verodert sein!
+ //SEL_TBL and SEL_TBL_CELLS can be changed!
int nNewSelectionType = (pWrtShell->GetSelectionType()
& ~nsSelectionType::SEL_TBL_CELLS);
@@ -283,7 +272,6 @@ void SwView::SelectShell()
SfxDispatcher &rDispatcher = GetDispatcher();
SwToolbarConfigItem *pBarCfg = SW_MOD()->GetToolbarConfig();
- // DELETEZ(pxSelectionObj); //Selektionsobjekt loeschen
if ( pShell )
{
rDispatcher.Flush(); // alle gecachten Shells wirklich loeschen
@@ -331,6 +319,10 @@ void SwView::SelectShell()
if ( !( nSelectionType & nsSelectionType::SEL_FOC_FRM_CTRL ) )
rDispatcher.Push( *pFormShell );
+ eShellMode = SHELL_MODE_NAVIGATION;
+ pShell = new SwNavigationShell( *this );
+ rDispatcher.Push( *pShell );
+
if ( nSelectionType & nsSelectionType::SEL_OLE )
{
eShellMode = SHELL_MODE_OBJECT;
@@ -470,7 +462,7 @@ void SwView::SelectShell()
if ( GetDocShell()->GetDoc()->IsOLEPrtNotifyPending() )
GetDocShell()->GetDoc()->PrtOLENotify( sal_False );
- //jetzt das Tabellen-Update
+ // now the table-update
if(bUpdateTable)
pWrtShell->UpdateTable();
@@ -483,8 +475,6 @@ void SwView::SelectShell()
//Da wir aber keine Stati mehr liefern koennen und wollen locken wir
//stattdessen den Dispatcher.
-
-
extern "C"
{
int lcl_CmpIds( const void *pFirst, const void *pSecond)
@@ -493,8 +483,6 @@ extern "C"
}
}
-
-
IMPL_LINK( SwView, AttrChangedNotify, SwWrtShell *, EMPTYARG )
{
if ( GetEditWin().IsChainMode() )
@@ -506,7 +494,6 @@ IMPL_LINK( SwView, AttrChangedNotify, SwWrtShell *, EMPTYARG )
GetDocShell()->IsReadOnly() )
_CheckReadonlyState();
- // JP 19.01.99: Cursor in Readonly Bereichen
if( !pWrtShell->IsPaintLocked() && !bNoInterrupt )
_CheckReadonlySelection();
@@ -534,34 +521,17 @@ IMPL_LINK( SwView, AttrChangedNotify, SwWrtShell *, EMPTYARG )
}
- //#i6193#, change ui if cursor is at a SwPostItField
+ // change ui if cursor is at a SwPostItField
if (mpPostItMgr)
{
- // --> OD 2008-06-19 #i90516#
// only perform the code that is needed to determine, if at the
// actual cursor position is a post-it field
-// SwRect aFldRect;
-// SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD);
-// if( pWrtShell->GetContentAtPos( pWrtShell->GetCrsrDocPos(), aCntntAtPos, sal_False, &aFldRect ) )
-// {
-// const SwField* pFld = aCntntAtPos.aFnd.pFld;
-// if (pFld->Which()== RES_POSTITFLD)
-// {
-// mpPostItMgr->SetShadowState(reinterpret_cast<const SwPostItField*>(pFld));
-// }
-// else
-// mpPostItMgr->SetShadowState(0);
-// }
-// else
-// mpPostItMgr->SetShadowState(0);
mpPostItMgr->SetShadowState( pWrtShell->GetPostItFieldAtCursor() );
}
return 0;
}
-
-
IMPL_LINK( SwView, TimeoutHdl, Timer *, EMPTYARG )
{
DBG_PROFSTART(viewhdl);
@@ -599,8 +569,8 @@ void SwView::_CheckReadonlyState()
//Um erkennen zu koennen ob bereits disabled ist!
SfxItemState eStateRO, eStateProtAll;
const SfxPoolItem *pItem;
- // JP 29.04.97: von einem nur uns bekannten Slot den Status abfragen.
- // Ansonsten kennen andere den Slot; wie z.B. die BasidIde
+ // von einem nur uns bekannten Slot den Status abfragen.
+ // Ansonsten kennen andere den Slot; wie z.B. die BasidIde
eStateRO = rDis.QueryState( FN_INSERT_BOOKMARK, pItem );
eStateProtAll = rDis.QueryState( FN_EDIT_REGION, pItem );
sal_Bool bChgd = sal_False;
@@ -705,7 +675,7 @@ void SwView::_CheckReadonlySelection()
case SHELL_MODE_TABLE_TEXT:
case SHELL_MODE_TABLE_LIST_TEXT:
{
-//JP 22.01.99: temporaere Loesung!!! Sollte bei jeder Cursorbewegung
+// temporaere Loesung!!! Sollte bei jeder Cursorbewegung
// den Font von der akt. Einfuegeposition setzen, also ausserhalb
// dieses if's. Aber TH wertet den Font zur Zeit nicht aus und
// das besorgen erscheint mir hier zu teuer zu sein.
@@ -736,13 +706,12 @@ void SwView::_CheckReadonlySelection()
}
}
-
SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
: SfxViewShell( _pFrame, SWVIEWFLAGS ),
aPageStr( SW_RES( STR_PAGE )),
nNewPage(USHRT_MAX),
- pNumRuleNodeFromDoc(0), // #i23726#
+ pNumRuleNodeFromDoc(0),
pEditWin( new SwEditWin( &_pFrame->GetWindow(), *this ) ),
pWrtShell(0),
pShell(0),
@@ -783,7 +752,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
bInDtor(sal_False),
bOldShellWasPagePreView(sal_False)
{
- // OD 18.12.2002 #103492# - According to discussion with MBA and further
+ // According to discussion with MBA and further
// investigations, no old SfxViewShell will be set as parameter <pOldSh>,
// if function "New Window" is performed to open an additional view beside
// an already existing one.
@@ -812,7 +781,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
sal_Bool bOldModifyFlag = pDocSh->IsEnableSetModified();
if(bOldModifyFlag)
pDocSh->EnableSetModified( sal_False );
- ASSERT( pDocSh, "View ohne DocShell." );
+ OSL_ENSURE( pDocSh, "view without DocShell." );
SwWebDocShell* pWebDShell = PTR_CAST( SwWebDocShell, pDocSh );
const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(0 != pWebDShell);
@@ -827,7 +796,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
sal_Bool bOldShellWasSrcView = sal_False;
- // OD 18.12.2002 #103492# - determine, if there is an existing view for
+ // determine if there is an existing view for
// document
SfxViewShell* pExistingSh = 0;
if ( pOldSh )
@@ -882,20 +851,20 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
aUsrPref.SetViewLayoutColumns( 1 );
}
pWrtShell = new SwWrtShell( rDoc, pEditWin, *this, &aUsrPref );
- //#97610# creating an SwView from a SwPagePreView needs to
+ // creating an SwView from a SwPagePreView needs to
// add the ViewShell to the ring of the other ViewShell(s)
if(bOldShellWasPagePreView)
{
ViewShell& rPreviewViewShell = *((SwPagePreView*)pExistingSh)->GetViewShell();
pWrtShell->MoveTo(&rPreviewViewShell);
- //#95521# to update the field command et.al. if necessary
+ // to update the field command et.al. if necessary
const SwViewOption* pPreViewOpt = rPreviewViewShell.GetViewOptions();
if( pPreViewOpt->IsFldName() != aUsrPref.IsFldName() ||
pPreViewOpt->IsShowHiddenField() != aUsrPref.IsShowHiddenField() ||
pPreViewOpt->IsShowHiddenPara() != aUsrPref.IsShowHiddenPara() ||
pPreViewOpt->IsShowHiddenChar() != aUsrPref.IsShowHiddenChar() )
rPreviewViewShell.ApplyViewOptions(aUsrPref);
- // OD 09.01.2003 #106334# - reset design mode at draw view for form
+ // reset design mode at draw view for form
// shell, if needed.
if ( ((SwPagePreView*)pExistingSh)->ResetFormDesignMode() &&
pWrtShell->HasDrawView() )
@@ -907,16 +876,15 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
}
RTL_LOGFILE_CONTEXT_TRACE( aLog, "after create WrtShell" );
- // --> OD 2005-02-11 #i38810# - assure that modified state of document
+ // assure that modified state of document
// isn't reset, if document is already modified.
const bool bIsDocModified = pWrtShell->GetDoc()->IsModified();
- // <--
- // JP 05.02.99: Bug 61495 - damit unter anderem das HLineal im
+ // damit unter anderem das HLineal im
// ReadonlyFall nicht angezeigt wird
aUsrPref.SetReadonly( pWrtShell->GetViewOptions()->IsReadonly() );
- //Kein Margin fuer OLE!
+ // no margin for OLE!
Size aBrwsBorder;
if( SFX_CREATE_MODE_EMBEDDED != pDocSh->GetCreateMode() )
aBrwsBorder = GetMargin();
@@ -942,16 +910,20 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
StartListening( *pViewFrame, sal_True );
StartListening( *pDocSh, sal_True );
- // Vom HLineal den ZOOM-Faktor einstellen
+ // Set Zoom-factor from HLineal
Fraction aZoomFract( aUsrPref.GetZoom(), 100 );
pHRuler->SetZoom( aZoomFract );
pVRuler->SetZoom( aZoomFract );
pHRuler->SetDoubleClickHdl(LINK( this, SwView, ExecRulerClick ));
FieldUnit eMetric = pUsrPref->GetHScrollMetric();
pHRuler->SetUnit( eMetric );
+
eMetric = pUsrPref->GetVScrollMetric();
pVRuler->SetUnit( eMetric );
+ pHRuler->SetCharWidth( 371 ); // default character width
+ pVRuler->SetLineHeight( 551 ); // default line height
+
// DocShell setzen
pDocSh->SetView( this );
SW_MOD()->SetView( this );
@@ -1014,14 +986,13 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
SfxViewFrame* pFirst = SfxViewFrame::GetFirst(pDocSh);
// zur Zeit(360) wird die View erst nach dem Ctor eingetragen
// der folgende Ausdruck funktioniert auch, wenn sich das aendert
- //JP 27.07.98: wenn per Undo nicht mehr die Modifizierung aufhebar ist,
+ // wenn per Undo nicht mehr die Modifizierung aufhebar ist,
// so setze das Modified NICHT zurueck.
- // --> OD 2005-02-11 #i38810# - no reset of modified state, if document
+ // no reset of modified state, if document
// was already modified.
if (!pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() &&
( !pFirst || pFirst == pVFrame ) &&
!bIsDocModified )
- // <--
{
pWrtShell->ResetModified();
}
@@ -1036,15 +1007,10 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
GetDispatcher().Execute(SID_NAVIGATOR, SFX_CALLMODE_ASYNCHRON, &aNavi, 0L);
}
-
- /*uno::Reference< awt::XWindow > aTmpRef;
- _pFrame->GetFrame().GetFrameInterface()->setComponent( aTmpRef,
- pViewImpl->GetUNOObject_Impl());*/
-
- uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame().GetFrameInterface();
+ uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame().GetFrameInterface();
uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame(
- OUString::createFromAscii("_beamer"), frame::FrameSearchFlag::CHILDREN);
+ OUString(RTL_CONSTASCII_USTRINGPARAM("_beamer")), frame::FrameSearchFlag::CHILDREN);
if(xBeamerFrame.is())
{
SwDBData aData = pWrtShell->GetDBData();
@@ -1065,19 +1031,19 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
pDocSh->EnableSetModified( sal_True );
InvalidateBorder();
-}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
+ if( !pHScrollbar->IsVisible( sal_True ) )
+ ShowHScrollbar( sal_False );
+ if( !pVScrollbar->IsVisible( sal_True ) )
+ ShowVScrollbar( sal_False );
+ GetViewFrame()->GetWindow().AddChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
+}
SwView::~SwView()
{
+ GetViewFrame()->GetWindow().RemoveChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
delete mpPostItMgr;
- // --> OD 2009-03-10 #i100035#
mpPostItMgr = 0;
- // <--
bInDtor = sal_True;
pEditWin->Hide(); // damit kein Paint Aerger machen kann!
@@ -1091,7 +1057,7 @@ SwView::~SwView()
if( aTimer.IsActive() && bAttrChgNotifiedWithRegistrations )
GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
- //JP 27.11.00: Bug 80631 - the last view must end the text edit
+ // the last view must end the text edit
SdrView *pSdrView = pWrtShell ? pWrtShell->GetDrawView() : 0;
if( pSdrView && pSdrView->IsTextEdit() )
pSdrView->SdrEndTextEdit( sal_True );
@@ -1122,8 +1088,6 @@ SwView::~SwView()
/*--------------------------------------------------------------------
Beschreibung: DocShell rausgrabbeln ueber das FrameWindow
--------------------------------------------------------------------*/
-
-
SwDocShell* SwView::GetDocShell()
{
SfxObjectShell* pDocShell = GetViewFrame()->GetObjectShell();
@@ -1133,8 +1097,6 @@ SwDocShell* SwView::GetDocShell()
/*--------------------------------------------------------------------
Beschreibung: CursorPos merken
--------------------------------------------------------------------*/
-
-
void SwView::WriteUserData( String &rUserData, sal_Bool bBrowse )
{
//Das Browse-Flag wird vom Sfx durchgereicht, wenn Dokumente gebrowsed
@@ -1163,10 +1125,10 @@ void SwView::WriteUserData( String &rUserData, sal_Bool bBrowse )
rUserData += ';';
rUserData += FRMTYPE_NONE == pWrtShell->GetSelFrmType() ? '0' : '1';
}
+
/*--------------------------------------------------------------------
Beschreibung: CursorPos setzen
--------------------------------------------------------------------*/
-//#i43146# go to the last editing position when opening own files
bool lcl_IsOwnDocument( SwView& rView )
{
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
@@ -1181,7 +1143,6 @@ bool lcl_IsOwnDocument( SwView& rView )
(!Changed.Len() && Created.Len() && Created == FullName );
}
-
void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse )
{
if ( rUserData.GetTokenCount() > 1 &&
@@ -1189,7 +1150,6 @@ void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse )
//Forward/Backward
(!pWrtShell->IsNewLayout() || pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) || bBrowse) )
{
- //#i43146# go to the last editing position when opening own files
bool bIsOwnDocument = lcl_IsOwnDocument( *this );
SET_CURR_SHELL(pWrtShell);
@@ -1230,14 +1190,13 @@ void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse )
sal_Bool bSelectObj = (0 != rUserData.GetToken( nOff, ';', nPos ).ToInt32())
&& pWrtShell->IsObjSelectable( aCrsrPos );
- //#i33307# restore editing position
+ // restore editing position
pViewImpl->SetRestorePosition(aCrsrPos, bSelectObj);
- // OD 11.02.2003 #100556# - set flag value to avoid macro execution.
+ // set flag value to avoid macro execution.
bool bSavedFlagValue = pWrtShell->IsMacroExecAllowed();
pWrtShell->SetMacroExecAllowed( false );
-//!!! pb (11.08.2004): #i32536#
// os: changed: The user data has to be read if the view is switched back from page preview
-//#i43146# go to the last editing position when opening own files
+// go to the last editing position when opening own files
if(bOldShellWasPagePreView || bIsOwnDocument)
{
pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos, !bSelectObj );
@@ -1248,15 +1207,14 @@ void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse )
}
}
- // OD 11.02.2003 #100556# - reset flag value
+ // reset flag value
pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
- // OD 08.04.2003 #108693# - set visible area before applying
+ // set visible area before applying
// information from print preview. Otherwise, the applied information
// is lost.
-//!!! pb (11.08.2004): #i32536#
// os: changed: The user data has to be read if the view is switched back from page preview
-//#i43146# go to the last editing position when opening own files
+// go to the last editing position when opening own files
if(bOldShellWasPagePreView || bIsOwnDocument )
{
if ( bBrowse )
@@ -1307,7 +1265,6 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
{
if(GetDocShell()->IsPreview())
return;
- //#i43146# go to the last editing position when opening own files
bool bIsOwnDocument = lcl_IsOwnDocument( *this );
sal_Int32 nLength = rSequence.getLength();
if (nLength && (!pWrtShell->IsNewLayout() || pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) || bBrowse) )
@@ -1326,7 +1283,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
sal_Int16 nViewLayoutColumns = pVOpt->GetViewLayoutColumns();
sal_Bool bSelectedFrame = ( pWrtShell->GetSelFrmType() != FRMTYPE_NONE ),
- bGotViewLeft = sal_False, bGotViewTop = sal_False, bGotVisibleLeft = sal_False,
+ bGotVisibleLeft = sal_False,
bGotVisibleTop = sal_False, bGotVisibleRight = sal_False,
bGotVisibleBottom = sal_False, bGotZoomType = sal_False,
bGotZoomFactor = sal_False, bGotIsSelectedFrame = sal_False,
@@ -1338,13 +1295,11 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
{
pValue->Value >>= nX;
nX = MM100_TO_TWIP( nX );
- bGotViewLeft = sal_True;
}
else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ViewTop" ) ) )
{
pValue->Value >>= nY;
nY = MM100_TO_TWIP( nY );
- bGotViewTop = sal_True;
}
else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VisibleLeft" ) ) )
{
@@ -1420,13 +1375,11 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
sal_Bool bSelectObj = (sal_False != bSelectedFrame )
&& pWrtShell->IsObjSelectable( aCrsrPos );
- // OD 11.02.2003 #100556# - set flag value to avoid macro execution.
+ // set flag value to avoid macro execution.
bool bSavedFlagValue = pWrtShell->IsMacroExecAllowed();
pWrtShell->SetMacroExecAllowed( false );
-//!!! pb (11.08.2004): #i32536#
// os: changed: The user data has to be read if the view is switched back from page preview
-//#i43146# go to the last editing position when opening own files
- //#i33307# restore editing position
+// go to the last editing position when opening own files
pViewImpl->SetRestorePosition(aCrsrPos, bSelectObj);
if(bOldShellWasPagePreView|| bIsOwnDocument)
{
@@ -1438,7 +1391,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
}
}
- // OD 11.02.2003 #100556# - reset flag value
+ // reset flag value
pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
}
SelectShell();
@@ -1459,7 +1412,6 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
bSetViewSettings &&
eZoom != SVX_ZOOM_PERCENT;
-
if ( !bZoomNeedsViewLayout )
pWrtShell->StartAction();
@@ -1472,15 +1424,14 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
if ( bSetViewSettings )
SetZoom( eZoom, nZoomFactor, sal_True );
-//!!! pb (11.08.2004): #i32536#
// os: changed: The user data has to be read if the view is switched back from page preview
-//#i43146# go to the last editing position when opening own files
+// go to the last editing position when opening own files
if(bOldShellWasPagePreView||bIsOwnDocument)
{
if ( bBrowse && bGotVisibleLeft && bGotVisibleTop )
{
Point aTopLeft(aVis.TopLeft());
- //#i76699# make sure the document is still centered
+ // make sure the document is still centered
const SwTwips lBorder = IsDocumentBorder() ? DOCUMENTBORDER : 2 * DOCUMENTBORDER;
SwTwips nEditWidth = GetEditWin().GetOutputSize().Width();
if(nEditWidth > (aDocSz.Width() + lBorder ))
@@ -1506,6 +1457,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
}
}
}
+
#define NUM_VIEW_SETTINGS 12
void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSequence, sal_Bool bBrowse )
{
@@ -1577,11 +1529,9 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe
}
#undef NUM_VIEW_SETTINGS
-
-
-void SwView::ShowCursor( FASTBOOL bOn )
+void SwView::ShowCursor( bool bOn )
{
- //JP 10.10.2001: Bug 90461 - don't scroll the cursor into the visible area
+ //don't scroll the cursor into the visible area
sal_Bool bUnlockView = !pWrtShell->IsViewLocked();
pWrtShell->LockView( sal_True ); //lock visible section
@@ -1594,8 +1544,6 @@ void SwView::ShowCursor( FASTBOOL bOn )
pWrtShell->LockView( sal_False );
}
-
-
ErrCode SwView::DoVerb( long nVerb )
{
if ( !GetViewFrame()->GetFrame().IsInPlace() )
@@ -1608,27 +1556,19 @@ ErrCode SwView::DoVerb( long nVerb )
return ERRCODE_NONE;
}
-/*-----------------17.02.98 13:33-------------------
- nur sal_True fuer eine Textselektion zurueck geben
---------------------------------------------------*/
+/* only return sal_True for a text selection
+*/
sal_Bool SwView::HasSelection( sal_Bool bText ) const
{
return bText ? GetWrtShell().SwCrsrShell::HasSelection()
: GetWrtShell().HasSelection();
}
-/*-----------------09/16/97 09:50am-----------------
-
---------------------------------------------------*/
-
String SwView::GetSelectionText( sal_Bool bCompleteWrds )
{
return GetSelectionTextParam( bCompleteWrds, sal_True );
}
-/*-----------------09/16/97 09:50am-----------------
-
---------------------------------------------------*/
String SwView::GetSelectionTextParam( sal_Bool bCompleteWrds,
sal_Bool bEraseTrail )
{
@@ -1642,12 +1582,6 @@ String SwView::GetSelectionTextParam( sal_Bool bCompleteWrds,
return sReturn;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
SwGlossaryHdl* SwView::GetGlosHdl()
{
if(!pGlosHdl)
@@ -1655,12 +1589,6 @@ SwGlossaryHdl* SwView::GetGlosHdl()
return pGlosHdl;
}
-/*-----------------05.09.96 15.50-------------------
-
---------------------------------------------------*/
-
-
-
void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
sal_Bool bCallBase = sal_True;
@@ -1669,7 +1597,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
sal_uInt32 nId = ((SfxSimpleHint&)rHint).GetId();
switch ( nId )
{
- // --> OD 2005-03-03 #i43775# - sub shells will be destroyed by the
+ // sub shells will be destroyed by the
// dispatcher, if the view frame is dying. Thus, reset member <pShell>.
case SFX_HINT_DYING:
{
@@ -1679,7 +1607,6 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
}
break;
- // <--
case SFX_HINT_MODECHANGED:
{
// Modalmodus-Umschaltung?
@@ -1688,7 +1615,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
pVRuler->SetActive( !bModal );
}
- /* kein break hier */
+ /* no break here */
case SFX_HINT_TITLECHANGED:
if ( GetDocShell()->IsReadOnly() != GetWrtShell().GetViewOptions()->IsReadonly() )
@@ -1705,7 +1632,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else
KillTab();
bool bReadonly = GetDocShell()->IsReadOnly();
- //#i76332# if document is to be opened in alive-mode then this has to be regarded while switching from readonly-mode to edit-mode
+ // if document is to be opened in alive-mode then this has to be regarded while switching from readonly-mode to edit-mode
if( !bReadonly )
{
SwDrawDocument * pDrawDoc = 0;
@@ -1752,9 +1679,6 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SfxViewShell::Notify(rBC, rHint);
}
-/*-----------------02.12.96 12:36-------------------
-
---------------------------------------------------*/
#if defined WNT || defined UNX
void SwView::ScannerEventHdl( const EventObject& /*rEventObject*/ )
@@ -1787,11 +1711,6 @@ void SwView::ScannerEventHdl( const EventObject& /*rEventObject*/ )
}
#endif
-/*-----------------04.03.97 15:07-------------------
-
---------------------------------------------------*/
-
-
void SwView::StopShellTimer()
{
if(aTimer.IsActive())
@@ -1807,9 +1726,6 @@ void SwView::StopShellTimer()
}
}
-/*-----------------09/03/97 04:12pm-----------------
-
---------------------------------------------------*/
sal_uInt16 SwView::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
{
SfxViewFrame* pVFrame = GetViewFrame();
@@ -1827,10 +1743,8 @@ sal_uInt16 SwView::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
return SfxViewShell::PrepareClose( bUI, bForBrowsing );
}
-
-
- // status methods for clipboard.
- // Status changes now notified from the clipboard.
+// status methods for clipboard.
+// Status changes now notified from the clipboard.
sal_Bool SwView::IsPasteAllowed()
{
sal_uInt16 nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
@@ -1880,9 +1794,7 @@ sal_Bool SwView::IsPasteSpecialAllowed()
}
return bPasteSpecialState;
}
-/* -----------------------------12.07.01 13:25--------------------------------
- ---------------------------------------------------------------------------*/
void SwView::NotifyDBChanged()
{
GetViewImpl()->GetUNOObject_Impl()->NotifyDBChanged();
@@ -1891,17 +1803,11 @@ void SwView::NotifyDBChanged()
/*--------------------------------------------------------------------
Beschreibung: Drucken
--------------------------------------------------------------------*/
-
-/* -----------------------------28.10.02 13:25--------------------------------
-
- ---------------------------------------------------------------------------*/
SfxObjectShellLock & SwView::GetTmpSelectionDoc()
{
return GetViewImpl()->GetTmpSelectionDoc();
}
-/* -----------------------------31.10.02 13:25--------------------------------
- ---------------------------------------------------------------------------*/
SfxObjectShellLock & SwView::GetOrCreateTmpSelectionDoc()
{
SfxObjectShellLock &rxTmpDoc = GetViewImpl()->GetTmpSelectionDoc();
@@ -1912,16 +1818,12 @@ SfxObjectShellLock & SwView::GetOrCreateTmpSelectionDoc()
}
return rxTmpDoc;
}
-/* -----------------3/31/2003 12:39PM----------------
- --------------------------------------------------*/
void SwView::AddTransferable(SwTransferable& rTransferable)
{
GetViewImpl()->AddTransferable(rTransferable);
}
-/* --------------------------------------------------*/
-
namespace sw {
void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb)
@@ -1931,3 +1833,4 @@ void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb)
} // namespace sw
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index 6e0ba4cba6bd..ba44f7b3fcab 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "hintids.hxx"
#include <vcl/graph.hxx>
#include <svx/galbrws.hxx>
@@ -88,7 +87,6 @@
#include "swslots.hxx"
#include <PostItMgr.hxx>
-
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -121,7 +119,6 @@ SFX_IMPL_INTERFACE( SwView, SfxViewShell, SW_RES(RID_TOOLS_TOOLBOX) )
SFX_CHILDWINDOW_REGISTRATION(FN_INSERT_FIELD_DATA_ONLY);
SFX_FEATURED_CHILDWINDOW_REGISTRATION(FN_SYNC_LABELS, CHILDWIN_LABEL );
SFX_FEATURED_CHILDWINDOW_REGISTRATION(FN_MAILMERGE_CHILDWINDOW, CHILDWIN_MAILMERGE);
-// SFX_CHILDWINDOW_REGISTRATION(FN_MAILMERGE_SENDMAIL_CHILDWINDOW);
SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_TOOLS|
SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
SW_RES(RID_TOOLS_TOOLBOX) );
@@ -129,24 +126,16 @@ SFX_IMPL_INTERFACE( SwView, SfxViewShell, SW_RES(RID_TOOLS_TOOLBOX) )
TYPEINIT1(SwView,SfxViewShell)
-/*-----------------13.12.97 11:06-------------------
-
---------------------------------------------------*/
ShellModes SwView::GetShellMode()
{
return pViewImpl->GetShellMode();
}
-/*-----------------13.12.97 11:28-------------------
-
---------------------------------------------------*/
view::XSelectionSupplier* SwView::GetUNOObject()
{
return pViewImpl->GetUNOObject();
}
-/* -----------------------------06.05.2002 13:18------------------------------
- ---------------------------------------------------------------------------*/
void SwView::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions)
{
pWrtShell->ApplyAccessiblityOptions(rAccessibilityOptions);
@@ -155,39 +144,29 @@ void SwView::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOpt
pWrtShell->ShowCrsr();
}
-/*-- 26.05.2004 09:14:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwView::SetMailMergeConfigItem(SwMailMergeConfigItem* pConfigItem,
sal_uInt16 nRestart, sal_Bool bIsSource)
{
pViewImpl->SetMailMergeConfigItem(pConfigItem, nRestart, bIsSource);
UIFeatureChanged();
}
-/*-- 26.05.2004 09:14:25---------------------------------------------------
- -----------------------------------------------------------------------*/
SwMailMergeConfigItem* SwView::GetMailMergeConfigItem()
{
return pViewImpl->GetMailMergeConfigItem();
}
-/*-- 26.05.2004 09:14:25---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_uInt16 SwView::GetMailMergeRestartPage() const
{
return pViewImpl->GetMailMergeRestartPage();
}
-/*-- 03.09.2004 11:56:33---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwView::IsMailMergeSourceView() const
{
return pViewImpl->IsMailMergeSourceView();
}
-/*-- 12.04.2006 11:51:40---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool lcl_IsViewMarks( const SwViewOption& rVOpt )
{
return rVOpt.IsHardBlank() &&
@@ -506,7 +485,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
break;
default:
- ASSERT(sal_False, Falsche Request-Methode);
+ OSL_ENSURE(sal_False, "wrong request method");
return;
}
@@ -531,7 +510,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
pModule->ApplyUsrPref( *pOpt, this, bWebView ? VIEWOPT_DEST_WEB : VIEWOPT_DEST_TEXT );
- //mod #i6193# let postits know about new spellcheck setting
+ // #i6193# let postits know about new spellcheck setting
if ( nSlot == SID_AUTOSPELL_CHECK )
GetPostItMgr()->SetSpellChecking();
@@ -553,3 +532,5 @@ IMPL_LINK( SwView, HtmlOptionsHdl, void*, EMPTYARG )
GetViewFrame()->GetBindings().Invalidate(SID_DRAW_TEXT_MARQUEE);
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/view1.cxx b/sw/source/ui/uiview/view1.cxx
index 2f9bdcbe9a83..09de8dc9a0c8 100644
--- a/sw/source/ui/uiview/view1.cxx
+++ b/sw/source/ui/uiview/view1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,34 +29,23 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <svx/svdpagv.hxx>
#include <svx/svdview.hxx>
#include <svx/ruler.hxx>
#include <idxmrk.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <swmodule.hxx>
#include <viewopt.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
-#ifndef _GLOBDOC_HXX
#include <globdoc.hxx>
-#endif
#include <navipi.hxx>
#include <fldwrap.hxx>
-#ifndef _REDLNDLG_HXX
#include <redlndlg.hxx>
-#endif
#include <dpage.hxx>
#include <edtwin.hxx>
#include "formatclipboard.hxx"
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
// header for class SfxRequest
#include <sfx2/request.hxx>
@@ -63,12 +53,6 @@
extern int bDocSzUpdated;
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwView::Activate(sal_Bool bMDIActivate)
{
// aktuelle View anmelden an der DocShell
@@ -85,7 +69,7 @@ void SwView::Activate(sal_Bool bMDIActivate)
if(!bDocSzUpdated)
DocSzChgd(aDocSz);
- // #b6330459# make selection visible
+ // make selection visible
if(bMakeSelectionVisible)
{
pWrtShell->MakeSelVisible();
@@ -139,11 +123,6 @@ void SwView::Activate(sal_Bool bMDIActivate)
SfxViewShell::Activate(bMDIActivate);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void SwView::Deactivate(sal_Bool bMDIActivate)
{
extern sal_Bool bFlushCharBuffer ;
@@ -161,18 +140,11 @@ void SwView::Deactivate(sal_Bool bMDIActivate)
SfxViewShell::Deactivate(bMDIActivate);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwView::MarginChanged()
{
GetWrtShell().SetBrowseBorder( GetMargin() );
}
-/*--------------------------------------------------------------------
- --------------------------------------------------------------------*/
-
void SwView::ExecFormatPaintbrush(SfxRequest& rReq)
{
if(!pFormatClipboard)
@@ -217,3 +189,5 @@ void SwView::StateFormatPaintbrush(SfxItemSet &rSet)
rSet.DisableItem( SID_FORMATPAINTBRUSH );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 35b5c5648c96..d9079827bd14 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,6 +50,7 @@
#include <caption.hxx>
#include <svl/PasswordHelper.hxx>
#include <svl/urihelper.hxx>
+#include <svtools/miscopt.hxx>
#include <sfx2/passwd.hxx>
#include <sfx2/sfxdlg.hxx>
#include <sfx2/filedlghelper.hxx>
@@ -57,6 +59,7 @@
#include <svx/viewlayoutitem.hxx>
#include <svx/zoomslideritem.hxx>
#include <svtools/xwindowitem.hxx>
+#include <svx/linkwarn.hxx>
#include <svx/htmlmode.hxx>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
@@ -142,8 +145,8 @@
#include <svx/ofaitem.hxx>
#include <unomid.h>
-const char __FAR_DATA sStatusDelim[] = " : ";
-const char __FAR_DATA sStatusComma[] = " , ";//#outlinelevel, define a Variable for "," add by zhaojianwei
+const char sStatusDelim[] = " : ";
+const char sStatusComma[] = " , ";//#outlinelevel, define a Variable for "," add by zhaojianwei
using ::rtl::OUString;
using namespace sfx2;
@@ -158,7 +161,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::ui::dialogs;
-
static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, sal_uInt16 nWhichId )
{
if (nWhichId == RES_CHRATR_LANGUAGE ||
@@ -187,7 +189,6 @@ static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, sal_uInt16 nWhi
/*---------------------------------------------------------------------------
Beschreibung: String fuer die Seitenanzeige in der Statusbar basteln.
----------------------------------------------------------------------------*/
-
String SwView::GetPageStr( sal_uInt16 nPg, sal_uInt16 nLogPg,
const String& rDisplay )
{
@@ -208,7 +209,6 @@ String SwView::GetPageStr( sal_uInt16 nPg, sal_uInt16 nLogPg,
return aStr;
}
-
int SwView::InsertGraphic( const String &rPath, const String &rFilter,
sal_Bool bLink, GraphicFilter *pFlt,
Graphic* pPreviewGrf, sal_Bool bRule )
@@ -223,7 +223,7 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter,
{
if( !pFlt )
pFlt = GraphicFilter::GetGraphicFilter();
- nRes = GraphicFilter::LoadGraphic( rPath, rFilter, aGrf, pFlt /*, nFilter*/ );
+ nRes = GraphicFilter::LoadGraphic( rPath, rFilter, aGrf, pFlt );
}
if( GRFILTER_OK == nRes )
@@ -254,7 +254,6 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter,
return nRes;
}
-
sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
{
#ifndef ENABLE_PROP_WITHOUTLINK
@@ -324,7 +323,7 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
}
catch(Exception& )
{
- DBG_ERROR("control acces failed");
+ OSL_ENSURE(false, "control acces failed");
}
SFX_REQUEST_ARG( rReq, pName, SfxStringItem, SID_INSERT_GRAPHIC , sal_False );
@@ -355,7 +354,7 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
try
{
Any aVal = xCtrlAcc->getValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0);
- DBG_ASSERT(aVal.hasValue(), "Value CBX_INSERT_AS_LINK not found");
+ OSL_ENSURE(aVal.hasValue(), "Value CBX_INSERT_AS_LINK not found");
bAsLink = aVal.hasValue() ? *(sal_Bool*) aVal.getValue() : sal_True;
Any aTemplateValue = xCtrlAcc->getValue(
ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE,
@@ -366,7 +365,7 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
}
catch(Exception& )
{
- DBG_ERROR("control acces failed");
+ OSL_ENSURE(false, "control access failed");
}
}
rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bAsLink ) );
@@ -390,7 +389,7 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
else
{
Any aVal = xCtrlAcc->getValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0);
- DBG_ASSERT(aVal.hasValue(), "Value CBX_INSERT_AS_LINK not found");
+ OSL_ENSURE(aVal.hasValue(), "Value CBX_INSERT_AS_LINK not found");
bAsLink = aVal.hasValue() ? *(sal_Bool*) aVal.getValue() : sal_True;
Any aTemplateValue = xCtrlAcc->getValue(
ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE,
@@ -402,13 +401,20 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
rReq.AppendItem( SfxStringItem( FN_PARAM_2, sGraphicFormat ) );
rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bAsLink ) );
}
+
+ // really store as link only?
+ if( bAsLink && SvtMiscOptions().ShowLinkWarningDialog() )
+ {
+ SvxLinkWarningDialog aWarnDlg(GetWindow(),pFileDlg->GetPath());
+ if( aWarnDlg.Execute() != RET_OK )
+ bAsLink=sal_False; // don't store as link
+ }
}
SwWrtShell& rSh = GetWrtShell();
rSh.LockPaint();
rSh.StartAction();
- /// #111827#
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, String(SW_RES(STR_GRAPHIC_DEFNAME)));
@@ -479,8 +485,7 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
return bReturn;
}
-
-void __EXPORT SwView::Execute(SfxRequest &rReq)
+void SwView::Execute(SfxRequest &rReq)
{
sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -489,17 +494,15 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
switch( nSlot )
{
case SID_CREATE_SW_DRAWVIEW:
- // --> OD 2005-08-08 #i52858# - method name changed
pWrtShell->getIDocumentDrawModelAccess()->GetOrCreateDrawModel();
- // <--
break;
case FN_LINE_NUMBERING_DLG:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
VclAbstractDialog* pDlg = pFact->CreateVclSwViewDialog( DLG_LINE_NUMBERING, *this);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
break;
@@ -537,7 +540,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword();
if( aPasswd.getLength() )
{
- DBG_ASSERT( !((const SfxBoolItem*)pItem)->GetValue(), "SwView::Execute(): password set an redlining off doesn't match!" );
+ OSL_ENSURE( !((const SfxBoolItem*)pItem)->GetValue(), "SwView::Execute(): password set an redlining off doesn't match!" );
// xmlsec05: new password dialog
Window* pParent;
const SfxPoolItem* pParentItem;
@@ -855,8 +858,8 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
pWrtShell->ApplyAutoMark();
bAutoMarkApplied = sal_True;
}
- // JP 15.07.96: das pBase wird nur fuer die Schnittstelle
- // benoetigt. Muss mal umgetstellt werden!!!
+ // das pBase wird nur fuer die Schnittstelle
+ // benoetigt. Muss mal umgetstellt werden!!!
pWrtShell->UpdateTableOf( *pBase );
if( pWrtShell->GotoNextTOXBase() )
@@ -969,10 +972,10 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
JumpToSwMark( (( const SfxStringItem*)pItem)->GetValue() );
break;
case SID_GALLERY :
- GetViewFrame()->ChildWindowExecute(rReq);//ToggleChildWindow(SID_GALLERY);
+ GetViewFrame()->ChildWindowExecute(rReq);
break;
case SID_AVMEDIA_PLAYER :
- GetViewFrame()->ChildWindowExecute(rReq);//ToggleChildWindow(SID_AVMEDIA_PLAYER);
+ GetViewFrame()->ChildWindowExecute(rReq);
break;
case SID_VIEW_DATA_SOURCE_BROWSER:
{
@@ -991,7 +994,6 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
if( pArgs &&
SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ))
bShow = ((const SfxBoolItem*)pItem)->GetValue();
- //GetViewFrame()->ShowChildWindow(nSlot, bShow && bInMailMerge);
if((bShow && bInMailMerge) != GetViewFrame()->HasChildWindow(nSlot))
GetViewFrame()->ToggleChildWindow(nSlot);
//if fields have been succesfully inserted call the "real"
@@ -1033,10 +1035,10 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
SfxViewFrame* pTmpFrame = GetViewFrame();
SfxHelp::OpenHelpAgent( &pTmpFrame->GetFrame(), HID_MAIL_MERGE_SELECT );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractMailMergeCreateFromDlg* pDlg = pFact->CreateMailMergeCreateFromDlg( DLG_MERGE_CREATE,
&pTmpFrame->GetWindow());
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
bUseCurrentDocument = pDlg->IsThisDocument();
else
@@ -1151,7 +1153,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
default:
- ASSERT(!this, falscher Dispatcher);
+ OSL_ENSURE(!this, "wrong dispatcher");
return;
}
if(!bIgnore)
@@ -1161,7 +1163,6 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
/*--------------------------------------------------------------------
Beschreibung: SeitenNr-Feld invalidieren
--------------------------------------------------------------------*/
-
void SwView::UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr)
{
String sTemp(GetPageStr( nPhyNum, nVirtNum, rPgStr ));
@@ -1174,33 +1175,19 @@ void SwView::UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const Strin
/*--------------------------------------------------------------------
Beschreibung: Status der Stauszeile
--------------------------------------------------------------------*/
-
-
void SwView::StateStatusLine(SfxItemSet &rSet)
{
SwWrtShell& rShell = GetWrtShell();
SfxWhichIter aIter( rSet );
sal_uInt16 nWhich = aIter.FirstWhich();
- ASSERT( nWhich, "leeres Set");
+ OSL_ENSURE( nWhich, "empty set");
while( nWhich )
{
switch( nWhich )
{
- case FN_STAT_PAGE:
-/*
-//JP 07.01.00: is a nice feature - show the selektion of DrawObjects
- if( rShell.IsObjSelected()
-//??? || rShell.IsFrmSelected()
- )
- {
- String sDisplay( rShell.GetDrawView()->GetMarkedObjectList().
- GetDescriptionOfMarkedObjects() );
- rSet.Put( SfxStringItem( FN_STAT_PAGE, sDisplay ));
- }
- else
-*/ {
+ case FN_STAT_PAGE: {
// Anzahl der Seiten, log. SeitenNr. SeitenNr ermitteln
sal_uInt16 nPage, nLogPage;
String sDisplay;
@@ -1371,7 +1358,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
sStr = pTOX->GetTOXName();
else
{
- ASSERT( !this,
+ OSL_ENSURE( !this,
"was ist das fuer ein Verzeichnis?" );
sStr = pCurrSect->GetSectionName();
}
@@ -1383,75 +1370,26 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
}
}
}
-
- //#outline level, removed by zhaojianwei
- //const SwNumRule* pNumRule = rShell.GetCurNumRule();
- //if (pNumRule) // Cursor in Numerierung
- //{
- // sal_uInt8 nNumLevel = rShell.GetNumLevel();
- // if( IsShowNum(nNumLevel) && MAXLEVEL >
- // ( nNumLevel = GetRealLevel( nNumLevel )) )
- // {
- // if( sStr.Len() )
- // sStr.AppendAscii(sStatusDelim);
- // sStr += SW_RESSTR(STR_NUM_LEVEL);
- // sStr += String::CreateFromInt32( nNumLevel + 1 );
- // if(!pNumRule->IsAutoRule())
- // {
- // SfxItemSet aSet(GetPool(),
- // RES_PARATR_NUMRULE, RES_PARATR_NUMRULE);
- // rShell.GetCurAttr(aSet);
- // /* const SfxPoolItem* pItem; */
- // if(SFX_ITEM_AVAILABLE <=
- // aSet.GetItemState(RES_PARATR_NUMRULE, sal_True
- // /*, &pItem */ ))
- // {
- // const String& rNumStyle =
- // ((const SfxStringItem &)
- // aSet.Get(RES_PARATR_NUMRULE)).GetValue();
- // /* #i5116# GetItemState does not necessarily
- // change pItem */
- // // ((const SfxStringItem*)pItem)->GetValue();
- // if(rNumStyle.Len())
- // {
- // sStr.AppendAscii(sStatusDelim);
- // sStr += rNumStyle;
- // }
- // }
- // }
- // }
- //}//<-removed end ,zhaojianwei
-
//-->#outline level,added by zhaojianwei
const SwNumRule* pNumRule = rShell.GetCurNumRule();
const bool bOutlineNum = pNumRule ? pNumRule->IsOutlineRule() : 0;
- //((SwTxtFmtColl*)rShell.GetCrsr()->GetNode()->GetTxtNode()->GetFmtColl())->IsAssignedToListLevelOfOutlineStyle();
if (pNumRule && !bOutlineNum ) // Cursor in Numerierung
{
sal_uInt8 nNumLevel = rShell.GetNumLevel();
- // --> OD 2008-04-02 #refactorlists#
-// if( IsShowNum(nNumLevel) && MAXLEVEL >
-// ( nNumLevel = GetRealLevel( nNumLevel )) )
if ( nNumLevel < MAXLEVEL )
- // <--
{
if(!pNumRule->IsAutoRule())
{
SfxItemSet aSet(GetPool(),
RES_PARATR_NUMRULE, RES_PARATR_NUMRULE);
rShell.GetCurAttr(aSet);
- /* const SfxPoolItem* pItem; */
if(SFX_ITEM_AVAILABLE <=
- aSet.GetItemState(RES_PARATR_NUMRULE, sal_True
- /*, &pItem */ ))
+ aSet.GetItemState(RES_PARATR_NUMRULE, sal_True))
{
const String& rNumStyle =
((const SfxStringItem &)
aSet.Get(RES_PARATR_NUMRULE)).GetValue();
- /* #i5116# GetItemState does not necessarily
- change pItem */
- // ((const SfxStringItem*)pItem)->GetValue();
if(rNumStyle.Len())
{
if( sStr.Len() )
@@ -1522,8 +1460,6 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: Execute fuer die Stauszeile
--------------------------------------------------------------------*/
-
-
void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
SwWrtShell &rSh = GetWrtShell();
@@ -1604,7 +1540,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
if(pFact)
{
pDlg = pFact->CreateSvxZoomDialog(&GetViewFrame()->GetWindow(), aCoreSet);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
}
pDlg->SetLimits( MINZOOM, MAXZOOM );
@@ -1809,7 +1745,6 @@ void SwView::InsFrmMode(sal_uInt16 nCols)
/*--------------------------------------------------------------------
Beschreibung: Links bearbeiten
--------------------------------------------------------------------*/
-
void SwView::EditLinkDlg()
{
sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
@@ -1820,13 +1755,6 @@ void SwView::EditLinkDlg()
pDlg->Execute();
delete pDlg;
}
-/*
- SwLinkDlg* pDlg = new SwLinkDlg(GetFrameWindow());
- pDlg->SetShell(&GetWrtShell());
- pDlg->Execute();
-
- DELETEZ(pDlg);
-*/
}
sal_Bool SwView::JumpToSwMark( const String& rMark )
@@ -1839,7 +1767,6 @@ sal_Bool SwView::JumpToSwMark( const String& rMark )
sal_Bool bSaveCT = IsCrsrAtTop();
SetCrsrAtTop( sal_True );
- //JP 27.04.98: Bug 49786
// Damit in FrameSet auch gescrollt werden kann, muss die
// entsprechende Shell auch das Focus-Flag gesetzt haben!
sal_Bool bHasShFocus = pWrtShell->HasShFcs();
@@ -1909,8 +1836,10 @@ sal_Bool SwView::JumpToSwMark( const String& rMark )
}
else if( pMarkAccess->getMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)) )
pWrtShell->GotoMark( ppMark->get(), sal_False, sal_True ), bRet = sal_True;
- else if( 0 != ( pINet = pWrtShell->FindINetAttr( sMark ) ))
+ else if( 0 != ( pINet = pWrtShell->FindINetAttr( sMark ) )) {
+ pWrtShell->addCurrentPosition();
bRet = pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() );
+ }
// fuer alle Arten von Flys
if( FLYCNTTYPE_ALL != eFlyType && pWrtShell->GotoFly( sName, eFlyType ))
@@ -1947,11 +1876,10 @@ sal_Bool SwView::JumpToSwMark( const String& rMark )
return bRet;
}
-// #i67305, #1367991: Undo after insert from file:
+// #i67305# Undo after insert from file:
// Undo "Insert form file" crashes with documents imported from binary filter (.sdw) => disabled
// Undo "Insert form file" crashes with (.odt) documents crashes if these documents contains
// page styles with active header/footer => disabled for those documents
-
sal_uInt16 lcl_PageDescWithHeader( const SwDoc& rDoc )
{
sal_uInt16 nRet = 0;
@@ -1973,7 +1901,6 @@ sal_uInt16 lcl_PageDescWithHeader( const SwDoc& rDoc )
/*--------------------------------------------------------------------
Beschreibung: Links bearbeiten
--------------------------------------------------------------------*/
-
void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
{
pViewImpl->InitRequest( rRequest );
@@ -2041,18 +1968,18 @@ long SwView::InsertDoc( sal_uInt16 nSlotId, const String& rFileName, const Strin
long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion )
{
- sal_Bool bInsert = sal_False, bCompare = sal_False, bMerge = sal_False;
+ sal_Bool bInsert = sal_False, bCompare = sal_False;
long nFound = 0;
SwDocShell* pDocSh = GetDocShell();
switch( nSlotId )
{
- case SID_DOCUMENT_MERGE: bMerge = sal_True; break;
+ case SID_DOCUMENT_MERGE: break;
case SID_DOCUMENT_COMPARE: bCompare = sal_True; break;
case SID_INSERTDOC: bInsert = sal_True; break;
default:
- ASSERT( !this, "Unbekannte SlotId!" );
+ OSL_ENSURE( !this, "unknown SlotId!" );
bInsert = sal_True;
nSlotId = SID_INSERTDOC;
break;
@@ -2122,8 +2049,8 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe
}
if( pDoc )
- { // Disable Undo for .sdw (136991) or
- // if the number of page styles with header/footer has changed (#i67305)
+ { // Disable Undo for .sdw or
+ // if the number of page styles with header/footer has changed
if( !pRead || nUndoCheck != lcl_PageDescWithHeader( *pDoc ) )
{
pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
@@ -2181,9 +2108,7 @@ extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, SfxObjectShellLock& xLoc
delete pMedium;
return nFound;
}
-/* -----------------05.02.2003 12:06-----------------
- *
- * --------------------------------------------------*/
+
void SwView::EnableMailMerge(sal_Bool bEnable )
{
bInMailMerge = bEnable;
@@ -2191,8 +2116,7 @@ void SwView::EnableMailMerge(sal_Bool bEnable )
rBind.Invalidate(FN_INSERT_FIELD_DATA_ONLY);
rBind.Update(FN_INSERT_FIELD_DATA_ONLY);
}
-/*
-*/
+
namespace
{
sal_Bool lcl_NeedAdditionalDataSource( const uno::Reference< XNameAccess >& _rDatasourceContext )
@@ -2207,10 +2131,6 @@ namespace
}
}
-/* -----------------27.11.2002 12:12-----------------
- *
- * --------------------------------------------------*/
-
class SwMergeSourceWarningBox_Impl : public ModalDialog
{
FixedInfo aMessageFI;
@@ -2257,9 +2177,6 @@ class SwMergeSourceWarningBox_Impl : public ModalDialog
void SetMessText( const String& rText ) { aMessageFI.SetText( rText ); }
};
-
-
-
void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument)
{
if(bUseCurrentDocument)
@@ -2272,7 +2189,7 @@ void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument)
if( xMgr.is() )
{
uno::Reference<XInterface> xInstance = xMgr->createInstance(
- OUString::createFromAscii( "com.sun.star.sdb.DatabaseContext" ));
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DatabaseContext")));
xDBContext = uno::Reference<XNameAccess>(xInstance, UNO_QUERY) ;
}
if(!xDBContext.is())
@@ -2293,11 +2210,11 @@ void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument)
{
//take an existing data source or create a new one?
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractMailMergeFieldConnectionsDlg* pConnectionsDlg = pFact->CreateMailMergeFieldConnectionsDlg(
DLG_MERGE_FIELD_CONNECTIONS,
&GetViewFrame()->GetWindow());
- DBG_ASSERT(pConnectionsDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pConnectionsDlg, "Dialogdiet fail!");
if(RET_OK == pConnectionsDlg->Execute())
bCallAddressPilot = !pConnectionsDlg->IsUseExistingConnections();
else
@@ -2354,7 +2271,17 @@ void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument)
SwDBData aData;
SwWrtShell &rSh = GetWrtShell();
- aData = rSh.GetDBData();
+
+ SvStringsDtor aDBNameList(5, 1);
+ SvStringsDtor aAllDBNames(5, 5);
+ rSh.GetAllUsedDB( aDBNameList, &aAllDBNames );
+ if ( aDBNameList.Count( ) )
+ {
+ String sDBName = *aDBNameList[0];
+ aData.sDataSource = sDBName.GetToken(0, DB_DELIM);
+ aData.sCommand = sDBName.GetToken(1, DB_DELIM);
+ aData.nCommandType = sDBName.GetToken(2, DB_DELIM ).ToInt32();
+ }
rSh.EnterStdMode(); // Wechsel in Textshell erzwingen; ist fuer
// das Mischen von DB-Feldern notwendig.
AttrChangedNotify( &rSh );
@@ -2398,8 +2325,6 @@ void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument)
// after the destruction of the dialogue its parent comes to top,
// but we want that the new document is on top
pTopWin->ToTop();
-
-// return;
}
}
@@ -2453,3 +2378,4 @@ void SwView::ExecuteScan( SfxRequest& rReq )
pViewImpl->ExecuteScan(rReq) ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/viewcoll.cxx b/sw/source/ui/uiview/viewcoll.cxx
index 853c5639348d..ae8162992697 100644
--- a/sw/source/ui/uiview/viewcoll.cxx
+++ b/sw/source/ui/uiview/viewcoll.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,24 +29,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "cmdid.h"
#include "uiitems.hxx"
-#include <tools/list.hxx>
#include <vcl/window.hxx>
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
#include <svl/stritem.hxx>
#include <rsc/rscsfx.hxx>
-
-#include "errhdl.hxx"
#include "view.hxx"
#include "wrtsh.hxx"
#include "basesh.hxx"
-
void SwView::ExecColl(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -55,7 +50,7 @@ void SwView::ExecColl(SfxRequest &rReq)
{
case FN_SET_PAGE:
{
- DBG_ASSERT(!this, "Not implemented");
+ OSL_ENSURE(!this, "Not implemented");
}
break;
case FN_SET_PAGE_STYLE:
@@ -89,10 +84,11 @@ void SwView::ExecColl(SfxRequest &rReq)
}
break;
default:
- ASSERT(sal_False, falscher CommandProcessor fuer Dispatch);
+ OSL_ENSURE(false, "wrong CommandProcessor for Dispatch");
return;
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/viewdlg.cxx b/sw/source/ui/uiview/viewdlg.cxx
index fa045a740b40..73bcb5078cad 100644
--- a/sw/source/ui/uiview/viewdlg.cxx
+++ b/sw/source/ui/uiview/viewdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "hintids.hxx"
#include <sfx2/viewfrm.hxx>
#include <editeng/tstpitem.hxx>
#include <svl/stritem.hxx>
#include <sfx2/request.hxx>
-
#include "view.hxx"
#include "wrtsh.hxx"
#include "basesh.hxx"
@@ -83,7 +81,7 @@ void SwView::ExecDlg(SfxRequest &rReq)
break;
default:
- ASSERT(!this, falscher Dispatcher);
+ OSL_ENSURE(!this, "wrong dispatcher");
return;
}
@@ -96,3 +94,4 @@ void SwView::ExecDlg(SfxRequest &rReq)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/viewdlg2.cxx b/sw/source/ui/uiview/viewdlg2.cxx
index 6a867b7e28a7..14a5d64b03d7 100644
--- a/sw/source/ui/uiview/viewdlg2.cxx
+++ b/sw/source/ui/uiview/viewdlg2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,11 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/objface.hxx>
-
#include <fldmgr.hxx>
#include <expfld.hxx>
#include <modcfg.hxx>
@@ -60,10 +59,6 @@ extern String* pOldTabCat;
extern String* pOldFrmCat;
extern String* pOldDrwCat;
-/* -----------------06.11.98 13:45-------------------
- *
- * --------------------------------------------------*/
-
void SwView::ExecDlgExt(SfxRequest &rReq)
{
Window *pMDI = &GetViewFrame()->GetWindow();
@@ -73,10 +68,10 @@ void SwView::ExecDlgExt(SfxRequest &rReq)
case FN_INSERT_CAPTION:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
VclAbstractDialog* pDialog = pFact->CreateSwCaptionDialog( pMDI, *this, DLG_CAPTION );
- DBG_ASSERT(pDialog, "Dialogdiet fail!");
+ OSL_ENSURE(pDialog, "Dialogdiet fail!");
if ( pDialog )
{
pDialog->Execute();
@@ -87,10 +82,10 @@ void SwView::ExecDlgExt(SfxRequest &rReq)
case FN_EDIT_FOOTNOTE:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE,
pMDI, *pWrtShell, sal_True );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->SetHelpId(GetStaticInterface()->GetSlot(FN_EDIT_FOOTNOTE)->GetCommand());
pDlg->SetText( SW_RESSTR(STR_EDIT_FOOTNOTE) );
@@ -101,10 +96,6 @@ void SwView::ExecDlgExt(SfxRequest &rReq)
}
}
-/* -----------------06.11.98 14:53-------------------
- *
- * --------------------------------------------------*/
-
void SwView::AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId)
{
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
@@ -118,10 +109,6 @@ void SwView::AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId)
}
}
-/* -----------------06.11.98 12:58-------------------
- *
- * --------------------------------------------------*/
-
void SwView::InsertCaption(const InsCaptionOpt *pOpt)
{
if (!pOpt)
@@ -239,3 +226,4 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx
index 4250b8a4f0e8..87309088ffcf 100644
--- a/sw/source/ui/uiview/viewdraw.cxx
+++ b/sw/source/ui/uiview/viewdraw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include "hintids.hxx"
#include <svl/aeitem.hxx>
#include <svl/itempool.hxx>
@@ -73,19 +73,17 @@
#include "dselect.hxx"
#include "edtwin.hxx"
-// #108784#
#include <dcontact.hxx>
-// #108784#
#include <svx/svdpagv.hxx>
#include <svx/extrusionbar.hxx>
#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
+
/*--------------------------------------------------------------------
Beschreibung: Drawing-Ids ausfuehren
--------------------------------------------------------------------*/
-
void SwView::ExecDraw(SfxRequest& rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
@@ -145,7 +143,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
if ( pFormView )
{
SFX_REQUEST_ARG( rReq, pDescriptorItem, SfxUnoAnyItem, SID_FM_DATACCESS_DESCRIPTOR, sal_False );
- DBG_ASSERT( pDescriptorItem, "SwView::ExecDraw(SID_FM_CREATE_FIELDCONTROL): invalid request args!" );
+ OSL_ENSURE( pDescriptorItem, "SwView::ExecDraw(SID_FM_CREATE_FIELDCONTROL): invalid request args!" );
if( pDescriptorItem )
{
::svx::ODataAccessDescriptor aDescriptor( pDescriptorItem->GetValue() );
@@ -346,7 +344,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
break;
}
- static sal_uInt16 __READONLY_DATA aInval[] =
+ static sal_uInt16 const aInval[] =
{
// Slot-Ids muessen beim Aufruf von Invalidate sortiert sein!
SID_ATTRIBUTES_AREA,
@@ -410,16 +408,13 @@ void SwView::ExecDraw(SfxRequest& rReq)
/*--------------------------------------------------------------------
Beschreibung: Drawing beenden
--------------------------------------------------------------------*/
-
-
-
void SwView::ExitDraw()
{
NoRotate();
if(pShell)
{
- //#126062 # the shell may be invalid at close/reload/SwitchToViewShell
+ // the shell may be invalid at close/reload/SwitchToViewShell
SfxDispatcher* pDispatch = GetViewFrame()->GetDispatcher();
sal_uInt16 nIdx = 0;
SfxShell* pTest = 0;
@@ -464,9 +459,6 @@ void SwView::ExitDraw()
/*--------------------------------------------------------------------
Beschreibung: Rotate-Mode abschalten
--------------------------------------------------------------------*/
-
-
-
void SwView::NoRotate()
{
if (IsDrawRotate())
@@ -482,14 +474,13 @@ void SwView::NoRotate()
/******************************************************************************
* Beschreibung: DrawTextEditMode einschalten
******************************************************************************/
-
sal_Bool SwView::EnterDrawTextMode(const Point& aDocPos)
{
SdrObject* pObj;
SdrPageView* pPV;
SwWrtShell *pSh = &GetWrtShell();
SdrView *pSdrView = pSh->GetDrawView();
- ASSERT( pSdrView, "EnterDrawTextMode without DrawView?" );
+ OSL_ENSURE( pSdrView, "EnterDrawTextMode without DrawView?" );
sal_Bool bReturn = sal_False;
@@ -500,9 +491,7 @@ sal_Bool SwView::EnterDrawTextMode(const Point& aDocPos)
!pSdrView->PickHandle( aDocPos ) && IsTextTool() &&
pSdrView->PickObj( aDocPos, pSdrView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKTEXTEDIT ) &&
- // #108784#
// To allow SwDrawVirtObj text objects to be activated, allow their type, too.
- //pObj->ISA( SdrTextObj ) &&
( pObj->ISA( SdrTextObj ) ||
( pObj->ISA(SwDrawVirtObj) &&
((SwDrawVirtObj*)pObj)->GetReferencedObj().ISA(SdrTextObj) ) ) &&
@@ -558,24 +547,18 @@ sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin,
if( bIsNewObj )
pOutliner->SetVertical( SID_DRAW_TEXT_VERTICAL == nDrawSfxId ||
SID_DRAW_CAPTION_VERTICAL == nDrawSfxId );
- // #i7672#
- // No longer necessary, see text below
- // Color aBackground(pSh->GetShapeBackgrd());
- // pOutliner->SetBackgroundColor(aBackground);
- // OD 09.12.2002 #103045# - set default horizontal text direction at outliner
+ // set default horizontal text direction at outliner
EEHorizontalTextDirection aDefHoriTextDir =
pSh->IsShapeDefaultHoriTextDirR2L() ? EE_HTEXTDIR_R2L : EE_HTEXTDIR_L2R;
pOutliner->SetDefaultHorizontalTextDirection( aDefHoriTextDir );
}
- // #108784#
// To allow editing the referenced object from a SwDrawVirtObj here
// the original needs to be fetched evenually. This ATM activates the
// text edit mode for the original object.
SdrObject* pToBeActivated = pObj;
- // #108784#
// Always the original object is edited. To allow the TextEdit to happen
// where the VirtObj is positioned, on demand a occurring offset is set at
// the TextEdit object. That offset is used for creating and managing the
@@ -621,15 +604,12 @@ sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin,
/******************************************************************************
* Beschreibung: Ist ein DrawTextObjekt selektiert?
******************************************************************************/
-
-
-
sal_Bool SwView::IsTextTool() const
{
sal_uInt16 nId;
sal_uInt32 nInvent;
SdrView *pSdrView = GetWrtShell().GetDrawView();
- ASSERT( pSdrView, "IsTextTool without DrawView?" );
+ OSL_ENSURE( pSdrView, "IsTextTool without DrawView?" );
if (pSdrView->IsCreateMode())
pSdrView->SetCreateMode(sal_False);
@@ -638,32 +618,16 @@ sal_Bool SwView::IsTextTool() const
return (nInvent==SdrInventor);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
SdrView* SwView::GetDrawView() const
{
return GetWrtShell().GetDrawView();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
sal_Bool SwView::IsBezierEditMode()
{
return (!IsDrawSelMode() && GetWrtShell().GetDrawView()->HasMarkablePoints());
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwView::IsFormMode() const
{
if (GetDrawFuncPtr() && GetDrawFuncPtr()->IsCreateObj())
@@ -674,12 +638,6 @@ sal_Bool SwView::IsFormMode() const
return AreOnlyFormsSelected();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
void SwView::SetDrawFuncPtr(SwDrawBase* pFuncPtr)
{
if (pDrawActual)
@@ -687,20 +645,12 @@ void SwView::SetDrawFuncPtr(SwDrawBase* pFuncPtr)
pDrawActual = pFuncPtr;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwView::SetSelDrawSlot()
{
nDrawSfxId = SID_OBJECT_SELECT;
sDrawCustom.Erase();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwView::AreOnlyFormsSelected() const
{
if ( GetWrtShell().IsFrmSelected() )
@@ -733,10 +683,6 @@ sal_Bool SwView::AreOnlyFormsSelected() const
return bForm;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwView::HasDrwObj(SdrObject *pSdrObj) const
{
sal_Bool bRet = sal_False;
@@ -756,10 +702,6 @@ sal_Bool SwView::HasDrwObj(SdrObject *pSdrObj) const
return bRet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwView::HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const
{
sal_Bool bRet = sal_False;
@@ -779,7 +721,6 @@ sal_Bool SwView::HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const
return bRet;
}
-
//#i87414# mod
IMPL_LINK(SwView, OnlineSpellCallback, SpellCallbackInfo*, pInfo)
{
@@ -788,9 +729,6 @@ IMPL_LINK(SwView, OnlineSpellCallback, SpellCallbackInfo*, pInfo)
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
sal_Bool SwView::ExecDrwTxtSpellPopup(const Point& rPt)
{
sal_Bool bRet = sal_False;
@@ -807,12 +745,6 @@ sal_Bool SwView::ExecDrwTxtSpellPopup(const Point& rPt)
return bRet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
sal_Bool SwView::IsDrawTextHyphenate()
{
SdrView *pSdrView = pWrtShell->GetDrawView();
@@ -828,12 +760,6 @@ sal_Bool SwView::IsDrawTextHyphenate()
return bHyphenate;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
void SwView::HyphenateDrawText()
{
SdrView *pSdrView = pWrtShell->GetDrawView();
@@ -845,5 +771,4 @@ void SwView::HyphenateDrawText()
GetViewFrame()->GetBindings().Invalidate(FN_HYPHENATE_OPT_DLG);
}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/viewfunc.hxx b/sw/source/ui/uiview/viewfunc.hxx
index 2ac704db114f..61ffcd735375 100644
--- a/sw/source/ui/uiview/viewfunc.hxx
+++ b/sw/source/ui/uiview/viewfunc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,5 @@ void ViewResizePixel( const Window &rRef,
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 4414a96cdf72..ef6d2325dd14 100755..100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -114,8 +115,6 @@ using namespace ::com::sun::star::smarttags;
/*--------------------------------------------------------------------
Beschreibung: Lingu-Dispatcher
--------------------------------------------------------------------*/
-
-
void SwView::ExecLingu(SfxRequest &rReq)
{
switch(rReq.GetSlot())
@@ -140,7 +139,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
{
Reference< ui::dialogs::XExecutableDialog > xDialog(
xMCF->createInstanceWithContext(
- rtl::OUString::createFromAscii("com.sun.star.linguistic2.ChineseTranslationDialog")
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ChineseTranslationDialog"))
, xContext), UNO_QUERY);
Reference< lang::XInitialization > xInit( xDialog, UNO_QUERY );
if( xInit.is() )
@@ -150,7 +149,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
Sequence<Any> aSeq(1);
Any* pArray = aSeq.getArray();
PropertyValue aParam;
- aParam.Name = rtl::OUString::createFromAscii("ParentWindow");
+ aParam.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow"));
aParam.Value <<= makeAny(xDialogParentWindow);
pArray[0] <<= makeAny(aParam);
xInit->initialize( aSeq );
@@ -210,7 +209,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
{
SwTxtNode *pTxtNode = aPointNodeIndex.GetNode().GetTxtNode();
// check for unexpected error case
- DBG_ASSERT( pTxtNode && pTxtNode->GetTxt().Len() >= nPointIndex,
+ OSL_ENSURE( pTxtNode && pTxtNode->GetTxt().Len() >= nPointIndex,
"text missing: corrupted node?" );
if (!pTxtNode || pTxtNode->GetTxt().Len() < nPointIndex)
nPointIndex = 0;
@@ -233,7 +232,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
HyphenateDocument();
break;
default:
- ASSERT(!this, falscher Dispatcher);
+ OSL_ENSURE(!this, "wrong Dispatcher");
return;
}
}
@@ -241,7 +240,6 @@ void SwView::ExecLingu(SfxRequest &rReq)
/*--------------------------------------------------------------------
Description: start language specific text conversion
--------------------------------------------------------------------*/
-
void SwView::StartTextConversion(
LanguageType nSourceLang,
LanguageType nTargetLang,
@@ -287,7 +285,6 @@ void SwView::StartTextConversion(
/*--------------------------------------------------------------------
spellcheck and text conversion related stuff
--------------------------------------------------------------------*/
-
void SwView::SpellStart( SvxSpellArea eWhich,
sal_Bool bStartDone, sal_Bool bEndDone,
SwConversionArgs *pConvArgs )
@@ -342,7 +339,7 @@ void SwView::SpellStart( SvxSpellArea eWhich,
}
break;
default:
- ASSERT( !this, "SpellStart with unknown Area" );
+ OSL_ENSURE( !this, "SpellStart with unknown Area" );
}
pWrtShell->SpellStart( eStart, eEnde, eCurr, pConvArgs );
}
@@ -350,8 +347,6 @@ void SwView::SpellStart( SvxSpellArea eWhich,
/*--------------------------------------------------------------------
Beschreibung: Fehlermeldung beim Spelling
--------------------------------------------------------------------*/
-
-
// Der uebergebene Pointer nLang ist selbst der Wert
IMPL_LINK( SwView, SpellError, LanguageType *, pLang )
{
@@ -415,8 +410,6 @@ IMPL_LINK( SwView, SpellError, LanguageType *, pLang )
/*--------------------------------------------------------------------
Beschreibung: Spelling beenden und Cursor wiederherstellen
--------------------------------------------------------------------*/
-
-
void SwView::SpellEnd( SwConversionArgs *pConvArgs )
{
pWrtShell->SpellEnd( pConvArgs );
@@ -424,7 +417,6 @@ void SwView::SpellEnd( SwConversionArgs *pConvArgs )
pWrtShell->SetMark();
}
-
void SwView::HyphStart( SvxSpellArea eWhich )
{
switch ( eWhich )
@@ -442,15 +434,13 @@ void SwView::HyphStart( SvxSpellArea eWhich )
pWrtShell->HyphStart( DOCPOS_OTHERSTART, DOCPOS_OTHEREND );
break;
default:
- ASSERT( !this, "HyphStart with unknown Area" );
+ OSL_ENSURE( !this, "HyphStart with unknown Area" );
}
}
/*--------------------------------------------------------------------
Beschreibung: Interaktive Trennung
--------------------------------------------------------------------*/
-
-
void SwView::HyphenateDocument()
{
// do not hyphenate if interactive hyphenationg is active elsewhere
@@ -523,9 +513,6 @@ void SwView::HyphenateDocument()
}
}
-/*--------------------------------------------------------------------
- --------------------------------------------------------------------*/
-
bool SwView::IsValidSelectionForThesaurus() const
{
// must not be a multi-selection, and if it is a selection it needs
@@ -536,13 +523,11 @@ bool SwView::IsValidSelectionForThesaurus() const
return !bMultiSel && (!bSelection || pWrtShell->IsSelOnePara() );
}
-
String SwView::GetThesaurusLookUpText( bool bSelection ) const
{
return bSelection ? pWrtShell->GetSelTxt() : pWrtShell->GetCurWord();
}
-
void SwView::InsertThesaurusSynonym( const String &rSynonmText, const String &rLookUpText, bool bSelection )
{
sal_Bool bOldIns = pWrtShell->IsInsMode();
@@ -574,8 +559,8 @@ void SwView::InsertThesaurusSynonym( const String &rSynonmText, const String &rL
// adjust existing selection
SwPaM *pCrsr = pWrtShell->GetCrsr();
- pCrsr->GetPoint()->nContent/*.nIndex*/ -= nRight;
- pCrsr->GetMark()->nContent/*.nIndex*/ += nLeft;
+ pCrsr->GetPoint()->nContent -= nRight;
+ pCrsr->GetMark()->nContent += nLeft;
}
pWrtShell->Insert( rSynonmText );
@@ -586,12 +571,9 @@ void SwView::InsertThesaurusSynonym( const String &rSynonmText, const String &rL
pWrtShell->SetInsMode( bOldIns );
}
-
/*--------------------------------------------------------------------
Beschreibung: Thesaurus starten
--------------------------------------------------------------------*/
-
-
void SwView::StartThesaurus()
{
if (!IsValidSelectionForThesaurus())
@@ -648,7 +630,6 @@ void SwView::StartThesaurus()
/*--------------------------------------------------------------------
Beschreibung: Online-Vorschlaege anbieten
*--------------------------------------------------------------------*/
-
//!! Start of extra code for context menu modifying extensions
struct ExecuteInfo
{
@@ -704,13 +685,13 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
// default context menu.
bool bUseGrammarContext = false;
Reference< XSpellAlternatives > xAlt( pWrtShell->GetCorrection(&rPt, aToFill) );
- /*linguistic2::*/ProofreadingResult aGrammarCheckRes;
- sal_Int32 nErrorPosInText = -1;
+ ProofreadingResult aGrammarCheckRes;
sal_Int32 nErrorInResult = -1;
uno::Sequence< rtl::OUString > aSuggestions;
bool bCorrectionRes = false;
if (!xAlt.is() || xAlt->getAlternatives().getLength() == 0)
{
+ sal_Int32 nErrorPosInText = -1;
bCorrectionRes = pWrtShell->GetGrammarCorrection( aGrammarCheckRes, nErrorPosInText, nErrorInResult, aSuggestions, &rPt, aToFill );
::rtl::OUString aMessageText;
if (nErrorInResult >= 0)
@@ -734,7 +715,7 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
aParaText = pNode->GetTxt(); // this may include hidden text but that should be Ok
else
{
- DBG_ERROR( "text node expected but not found" );
+ OSL_ENSURE(false, "text node expected but not found" );
}
bRet = sal_True;
@@ -756,8 +737,8 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
aEvent.ExecutePosition.Y = aPixPos.Y();
Menu* pMenu = 0;
- ::rtl::OUString sMenuName = ::rtl::OUString::createFromAscii(
- bUseGrammarContext ? "private:resource/GrammarContextMenu" : "private:resource/SpellContextMenu");
+ ::rtl::OUString sMenuName = bUseGrammarContext ?
+ OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/GrammarContextMenu")) : OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/SpellContextMenu"));
if(TryContextMenuInterception( *pPopup, sMenuName, pMenu, aEvent ))
{
@@ -833,7 +814,6 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
This function shows the popup menu for smarttag
actions.
*/
-
sal_Bool SwView::ExecSmartTagPopup( const Point& rPt )
{
sal_Bool bRet = sal_False;
@@ -864,58 +844,32 @@ 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
+class SwFieldDialog : public FloatingWindow
{
private:
- SwFieldListBox aListBox;
- Edit aText;
- int selection;
+ ListBox aListBox;
+ IFieldmark *pFieldmark;
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) {
+ SwFieldDialog( SwEditWin* parent, IFieldmark *fieldBM );
+};
- assert(fieldBM!=NULL);
- if (fieldBM!=NULL) {
+SwFieldDialog::SwFieldDialog( SwEditWin* parent, IFieldmark *fieldBM ) :
+ FloatingWindow( parent, WB_BORDER | WB_SYSTEMWINDOW ),
+ aListBox(this),
+ pFieldmark( fieldBM )
+{
+ 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));
+
+ rtl::OUString sListKey = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ODF_FORMDROPDOWN_LISTENTRY ) );
+ IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find( sListKey );
if(pListEntries != pParameters->end())
{
- Sequence< ::rtl::OUString> vListEntries;
+ Sequence< ::rtl::OUString > vListEntries;
pListEntries->second >>= vListEntries;
for( ::rtl::OUString* pCurrent = vListEntries.getArray();
pCurrent != vListEntries.getArray() + vListEntries.getLength();
@@ -924,82 +878,68 @@ public:
aListBox.InsertEntry(*pCurrent);
}
}
+
+ // Select the current one
+ rtl::OUString sResultKey = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_FORMDROPDOWN_RESULT ) );
+ IFieldmark::parameter_map_t::const_iterator pResult = pParameters->find( sResultKey );
+ if ( pResult != pParameters->end() )
+ {
+ sal_Int32 nSelection = -1;
+ pResult->second >>= nSelection;
+ aListBox.SelectEntryPos( nSelection );
+ }
}
+
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);
- }
-};
+ SetSizePixel( lbSize );
+}
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;
+ short res = 0;
+ if ( !pBox->IsTravelSelect() )
+ {
+ sal_Int32 selection = pBox->GetSelectEntryPos();
+ if ( selection >= 0 )
+ {
+ rtl::OUString sKey = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ODF_FORMDROPDOWN_RESULT ) );
+ (*pFieldmark->GetParameters())[ sKey ] = makeAny(selection);
+ pFieldmark->Invalidate();
+ SwView& rView = ( ( SwEditWin* )GetParent() )->GetView();
+ rView.GetDocShell()->SetModified( sal_True );
+ }
+
+ EndPopupMode();
+ res = 1;
}
+ return res;
}
-
-sal_Bool SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM )
+IMPL_LINK( SwView, FieldPopupModeEndHdl, FloatingWindow*, EMPTYARG )
{
- sal_Bool bRet = sal_False;
- const sal_Bool bOldViewLock = pWrtShell->IsViewLocked();
- pWrtShell->LockView( sal_True );
- pWrtShell->Push();
+ if ( mpFieldPopup )
+ {
+ delete mpFieldPopup;
+ mpFieldPopup = NULL;
+ }
+ return 0;
+}
- bRet=sal_True;
+void SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM )
+{
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);
- }
+ mpFieldPopup = new SwFieldDialog( pEditWin, fieldBM );
+ mpFieldPopup->SetPopupModeEndHdl( LINK( this, SwView, FieldPopupModeEndHdl ) );
- pWrtShell->Pop( sal_False );
- pWrtShell->LockView( bOldViewLock );
-
- return bRet;
+ Rectangle aRect( pEditWin->OutputToScreenPixel( aPixPos ), Size( 0, 0 ) );
+ mpFieldPopup->StartPopupMode( aRect, FLOATWIN_POPUPMODE_DOWN|FLOATWIN_POPUPMODE_GRABFOCUS );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 84bce4002f11..fbf5c6d3249a 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
-#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
+#include <string>
#include "hintids.hxx"
#include <vcl/svapp.hxx>
@@ -40,18 +39,12 @@
#include <svl/srchitem.hxx>
#include <sfx2/request.hxx>
#include <swmodule.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <viewopt.hxx>
#include <frmatr.hxx>
-#ifndef _WDOCSH_HXX
#include <wdocsh.hxx>
-#endif
#include <uitool.hxx>
#include <edtwin.hxx>
#include <pagedesc.hxx>
@@ -60,25 +53,13 @@
#include <workctrl.hxx>
#include <usrpref.hxx>
#include <scroll.hxx>
-#ifndef _WVIEW_HXX
#include <wview.hxx>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _VIEW_HRC
#include <view.hrc>
-#endif
-#ifndef _RIBBAR_HRC
#include <ribbar.hrc>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <IDocumentSettingAccess.hxx>
#include <PostItMgr.hxx>
@@ -142,15 +123,9 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
if( SVX_ZOOM_OPTIMAL == eZoomType )
{
- if (pPostItMgr->HasNotes() && pPostItMgr->ShowNotes())
- {
- lLeftMargin = long(rLRSpace.GetLeft()) + aPageRect.Left() + nLeftOfst;
- }
- else
- {
+ if (!pPostItMgr->HasNotes() || !pPostItMgr->ShowNotes())
aPageSize.Width() -= ( rLRSpace.GetLeft() + rLRSpace.GetRight() + nLeftOfst * 2 );
- lLeftMargin = long(rLRSpace.GetLeft()) + aPageRect.Left() + nLeftOfst;
- }
+ lLeftMargin = long(rLRSpace.GetLeft()) + DOCUMENTBORDER + nLeftOfst;
nFac = aWindowSize.Width() * 100 / aPageSize.Width();
}
else if(SVX_ZOOM_WHOLEPAGE == eZoomType || SVX_ZOOM_PAGEWIDTH == eZoomType )
@@ -167,7 +142,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
nFac = Min( nFac, nVisPercent );
}
}
- else /*if( SVX_ZOOM_PAGEWIDTH_NOBORDER == eZoomType )*/
+ else
{
const long nTmpWidth = bAutomaticViewLayout ? aPageSize.Width() : aRootSize.Width();
nFac = aWindowSize.Width() * 100 / nTmpWidth;
@@ -239,15 +214,6 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
pWrtShell->UnlockPaint();
if( bUnLockView )
pWrtShell->LockView( sal_False );
-
-// if ( mpPostItMgr )
-// {
-// mpPostItMgr->Rescale();
-// mpPostItMgr->CalcRects();
-// mpPostItMgr->LayoutPostIts();
-// }
-
-// eZoom = eZoomType;
}
void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly )
@@ -307,13 +273,41 @@ void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewO
/*
* Scrollbar - Handler
*/
+IMPL_LINK( SwView, WindowChildEventListener, VclSimpleEvent*, pEvent )
+{
+ OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
+ if ( pEvent && pEvent->ISA( VclWindowEvent ) )
+ {
+ VclWindowEvent *pVclEvent = static_cast< VclWindowEvent * >( pEvent );
+ OSL_ENSURE( pVclEvent->GetWindow(), "Window???" );
+ Window* pChildWin = static_cast< Window* >( pVclEvent->GetData() );
+
+ switch ( pVclEvent->GetId() )
+ {
+ case VCLEVENT_WINDOW_HIDE:
+ if( pChildWin == pHScrollbar )
+ ShowHScrollbar( sal_False );
+ else if( pChildWin == pVScrollbar )
+ ShowVScrollbar( sal_False );
+ break;
+ case VCLEVENT_WINDOW_SHOW:
+ if( pChildWin == pHScrollbar )
+ ShowHScrollbar( sal_True );
+ else if( pChildWin == pVScrollbar )
+ ShowVScrollbar( sal_True );
+ break;
+ }
+ }
+
+ return 0;
+}
int SwView::_CreateScrollbar( sal_Bool bHori )
{
Window *pMDI = &GetViewFrame()->GetWindow();
SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar;
- ASSERT( !*ppScrollbar, "vorher abpruefen!" )
+ OSL_ENSURE( !*ppScrollbar, "vorher abpruefen!" );
if( !bHori )
CreatePageButtons( !bShowAtResize );
@@ -328,6 +322,8 @@ int SwView::_CreateScrollbar( sal_Bool bHori )
(*ppScrollbar)->EnableDrag( sal_True );
+ (*ppScrollbar)->SetAuto( sal_True );
+
if(GetWindow())
InvalidateBorder();
@@ -376,9 +372,7 @@ IMPL_LINK( SwView, BtnPage, Button *, pButton )
Application::PostUserEvent( STATIC_LINK(this, SwView, MoveNavigationHdl), pbNext );
return 0;
}
-/*-----------------20.06.97 10:46-------------------
---------------------------------------------------*/
IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
{
if ( !pbNext )
@@ -528,16 +522,6 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
return 0;
}
-/*************************************************************************
-|*
-|* SwView::CreateTab()
-|*
-|* Beschreibung
-|* Ersterstellung VB 29.05.91
-|* Letzte Aenderung OS 09.05.96
-|*
-*************************************************************************/
-
int SwView::CreateTab()
{
pHRuler->SetActive(GetFrame() && IsActive());
@@ -547,16 +531,6 @@ int SwView::CreateTab()
return 1;
}
-/*************************************************************************
-|*
-|* SwView::KillTab()
-|*
-|* Beschreibung
-|* Ersterstellung VB 29.05.91
-|* Letzte Aenderung OS 09.05.96
-|*
-*************************************************************************/
-
int SwView::KillTab()
{
pHRuler->Hide();
@@ -581,28 +555,16 @@ void SwView::ChangeVLinealMetric( FieldUnit eUnit )
pVRuler->Invalidate();
}
}
-/* -----------------------------07.04.01 17:09--------------------------------
- ---------------------------------------------------------------------------*/
void SwView::GetVLinealMetric(FieldUnit& eToFill) const
{
eToFill = pVRuler->GetUnit();
}
-/* -----------------------------07.04.01 17:09--------------------------------
- ---------------------------------------------------------------------------*/
void SwView::GetHLinealMetric(FieldUnit& eToFill) const
{
eToFill = pHRuler->GetUnit();
}
-/*************************************************************************
-|*
-|* SwView::CreateVLineal()
-|*
-|* Beschreibung
-|* Ersterstellung VB 29.05.91
-|*
-*************************************************************************/
int SwView::CreateVLineal()
{
@@ -614,15 +576,6 @@ int SwView::CreateVLineal()
return 1;
}
-/*************************************************************************
-|*
-|* SwView::KillVLineal()
-|*
-|* Beschreibung
-|* Ersterstellung VB 29.05.91
-|*
-*************************************************************************/
-
int SwView::KillVLineal()
{
pVRuler->Hide();
@@ -630,15 +583,6 @@ int SwView::KillVLineal()
InvalidateBorder();
return 1;
}
-/*************************************************************************
-|*
-|* SwView::ExecRulerClick()
-|*
-|* Beschreibung
-|* Ersterstellung OS 15.06.95
-|* Letzte Aenderung
-|*
-*************************************************************************/
IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler )
{
@@ -664,18 +608,10 @@ IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler )
return 0;
}
-
-/*-----------------20.02.97 09:11-------------------
-
---------------------------------------------------*/
-
sal_uInt16 SwView::GetMoveType()
{
return nMoveType;
}
-/*-----------------20.02.97 09:11-------------------
-
---------------------------------------------------*/
void SwView::SetMoveType(sal_uInt16 nSet)
{
@@ -695,18 +631,11 @@ void SwView::SetMoveType(sal_uInt16 nSet)
}
}
-/*-----------------20.06.97 11:18-------------------
-
---------------------------------------------------*/
void SwView::SetActMark(sal_Int32 nSet)
{
nActMark = nSet;
}
-/*-----------------15.03.97 10:53-------------------
-
---------------------------------------------------*/
-
void SwView::SetImageButtonColor(Color& rColor)
{
if(pPageUpBtn)
@@ -715,40 +644,33 @@ void SwView::SetImageButtonColor(Color& rColor)
pPageDownBtn->SetControlForeground(rColor);
}
}
-/* -----------------------------2002/06/26 13:57------------------------------
- ---------------------------------------------------------------------------*/
void SwView::ShowHScrollbar(sal_Bool bShow)
{
- DBG_ASSERT(pHScrollbar, "Scrollbar invalid");
+ OSL_ENSURE(pHScrollbar, "Scrollbar invalid");
pHScrollbar->ExtendedShow(bShow);
}
-/* -----------------------------2002/06/26 13:57------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwView::IsHScrollbarVisible()const
{
- DBG_ASSERT(pHScrollbar, "Scrollbar invalid");
+ OSL_ENSURE(pHScrollbar, "Scrollbar invalid");
return pHScrollbar->IsVisible( sal_False ) || pHScrollbar->IsAuto();
}
-/* -----------------------------2002/06/26 13:57------------------------------
- ---------------------------------------------------------------------------*/
void SwView::ShowVScrollbar(sal_Bool bShow)
{
- DBG_ASSERT(pVScrollbar, "Scrollbar invalid");
+ OSL_ENSURE(pVScrollbar, "Scrollbar invalid");
pVScrollbar->ExtendedShow(bShow);
pPageUpBtn->Show(bShow);
pPageDownBtn->Show(bShow);
pNaviBtn->Show(bShow);
}
-/* -----------------------------2002/06/26 13:57------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwView::IsVScrollbarVisible()const
{
- DBG_ASSERT(pVScrollbar, "Scrollbar invalid");
+ OSL_ENSURE(pVScrollbar, "Scrollbar invalid");
return pVScrollbar->IsVisible( sal_False );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 465227dbd0bb..edbb2ef5f4dc 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,31 +29,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include "hintids.hxx"
#include <vcl/help.hxx>
#include <svx/ruler.hxx>
#include <editeng/paperinf.hxx>
#include <editeng/lrspitem.hxx>
#include <sfx2/bindings.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <swmodule.hxx>
#include <viewopt.hxx>
#include <frmatr.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <edtwin.hxx>
#include <scroll.hxx>
-#ifndef _WVIEW_HXX
#include <wview.hxx>
-#endif
#include <usrpref.hxx>
#include <pagedesc.hxx>
#include <workctrl.hxx>
@@ -88,8 +80,6 @@ inline long GetLeftMargin( SwView &rView )
lRet + DOCUMENTBORDER + nLeftOfst;
}
-//-------------------------------------------------------------------------
-
void lcl_GetPos(SwView* pView,
Point& rPos,
SwScrollbar* pScrollbar,
@@ -107,8 +97,8 @@ void lcl_GetPos(SwView* pView,
long lDelta = lPos - rSh.VisArea().Pos().*pPt;
const long lSize = aDocSz.*pSz + lBorder;
- // Bug 11693: sollte rechts oder unten zuviel Wiese sein, dann muss
- // diese von der VisArea herausgerechnet werden!
+ // sollte rechts oder unten zuviel Wiese sein, dann muss
+ // diese von der VisArea herausgerechnet werden!
long nTmp = pView->GetVisArea().Right()+lDelta;
if ( bHori && nTmp > lSize )
lDelta -= nTmp - lSize;
@@ -124,10 +114,9 @@ void lcl_GetPos(SwView* pView,
/*--------------------------------------------------------------------
Beschreibung: Nullpunkt Lineal setzen
--------------------------------------------------------------------*/
-
void SwView::InvalidateRulerPos()
{
- static sal_uInt16 __READONLY_DATA aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_PARA_LRSPACE, SID_RULER_BORDERS, SID_RULER_PAGE_POS,
SID_RULER_LR_MIN_MAX, SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE,
@@ -140,7 +129,7 @@ void SwView::InvalidateRulerPos()
GetViewFrame()->GetBindings().Invalidate(aInval);
- DBG_ASSERT(pHRuler, "warum ist das Lineal nicht da?");
+ OSL_ENSURE(pHRuler, "warum ist das Lineal nicht da?");
pHRuler->ForceUpdate();
pVRuler->ForceUpdate();
}
@@ -150,7 +139,6 @@ void SwView::InvalidateRulerPos()
viertel Bildschirm bis vor das Ende des Dokumentes
gescrollt werden kann.
--------------------------------------------------------------------*/
-
long SwView::SetHScrollMax( long lMax )
{
const long lBorder = IsDocumentBorder() ? DOCUMENTBORDER : DOCUMENTBORDER * 2;
@@ -161,7 +149,6 @@ long SwView::SetHScrollMax( long lMax )
return Max( Min( lMax, lSize ), 0L );
}
-
long SwView::SetVScrollMax( long lMax )
{
const long lBorder = IsDocumentBorder() ? DOCUMENTBORDER : DOCUMENTBORDER * 2;
@@ -169,7 +156,6 @@ long SwView::SetVScrollMax( long lMax )
return Max( Min( lMax, lSize), 0L ); // siehe horz.
}
-
Point SwView::AlignToPixel(const Point &rPt) const
{
return GetEditWin().PixelToLogic( GetEditWin().LogicToPixel( rPt ) );
@@ -178,7 +164,6 @@ Point SwView::AlignToPixel(const Point &rPt) const
/*--------------------------------------------------------------------
Beschreibung: Dokumentgroesse hat sich geaendert
--------------------------------------------------------------------*/
-
void SwView::DocSzChgd(const Size &rSz)
{
@@ -229,7 +214,6 @@ aDocSz = rSz;
/*--------------------------------------------------------------------
Beschreibung: Visarea neu setzen
--------------------------------------------------------------------*/
-
void SwView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollbar )
{
const Size aOldSz( aVisArea.GetSize() );
@@ -323,7 +307,6 @@ void SwView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollbar )
/*--------------------------------------------------------------------
Beschreibung: Pos VisArea setzen
--------------------------------------------------------------------*/
-
void SwView::SetVisArea( const Point &rPt, sal_Bool bUpdateScrollbar )
{
//einmal alignen, damit Brushes korrekt angesetzt werden.
@@ -351,7 +334,6 @@ void SwView::SetVisArea( const Point &rPt, sal_Bool bUpdateScrollbar )
bUpdateScrollbar);
}
-
void SwView::CheckVisArea()
{
pHScrollbar->SetAuto( pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
@@ -379,7 +361,6 @@ void SwView::CheckVisArea()
sal_uInt16 nRange optional exakte Angabe des Bereiches,
um den ggfs. gescrollt werden soll
--------------------------------------------------------------------*/
-
void SwView::CalcPt( Point *pPt, const Rectangle &rRect,
sal_uInt16 nRangeX, sal_uInt16 nRangeY)
{
@@ -427,13 +408,11 @@ void SwView::CalcPt( Point *pPt, const Rectangle &rRect,
/*--------------------------------------------------------------------
Beschreibung: Scrolling
--------------------------------------------------------------------*/
-
sal_Bool SwView::IsScroll( const Rectangle &rRect ) const
{
return bCenterCrsr || bTopCrsr || !aVisArea.IsInside(rRect);
}
-
void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRangeY )
{
if ( aVisArea.IsEmpty() )
@@ -560,7 +539,6 @@ void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRan
Beschreibung: Seitenweises Scrollen
Liefern den Wert, um den bei PageUp / -Down gescrollt werden soll
--------------------------------------------------------------------*/
-
sal_Bool SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
{
if ( !aVisArea.Top() || !aVisArea.GetHeight() )
@@ -575,7 +553,6 @@ sal_Bool SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
return sal_True;
}
-
sal_Bool SwView::GetPageScrollDownOffset( SwTwips &rOff ) const
{
if ( !aVisArea.GetHeight() ||
@@ -593,7 +570,6 @@ sal_Bool SwView::GetPageScrollDownOffset( SwTwips &rOff ) const
}
// Seitenweises Blaettern
-
long SwView::PageUp()
{
if (!aVisArea.GetHeight())
@@ -606,7 +582,6 @@ long SwView::PageUp()
return 1;
}
-
long SwView::PageDown()
{
if ( !aVisArea.GetHeight() )
@@ -618,7 +593,6 @@ long SwView::PageDown()
return 1;
}
-
long SwView::PhyPageUp()
{
//aktuell sichtbare Seite erfragen, nicht formatieren
@@ -639,7 +613,6 @@ long SwView::PhyPageUp()
return 1;
}
-
long SwView::PhyPageDown()
{
//aktuell sichtbare Seite erfragen, nicht formatieren
@@ -659,7 +632,6 @@ long SwView::PhyPageDown()
return 1;
}
-
long SwView::PageUpCrsr( sal_Bool bSelect )
{
if ( !bSelect )
@@ -686,7 +658,6 @@ long SwView::PageUpCrsr( sal_Bool bSelect )
return sal_False;
}
-
long SwView::PageDownCrsr(sal_Bool bSelect)
{
SwTwips lOff = 0;
@@ -704,7 +675,6 @@ long SwView::PageDownCrsr(sal_Bool bSelect)
/*------------------------------------------------------------------------
Beschreibung: Handler der Scrollbars
------------------------------------------------------------------------*/
-
IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
{
if ( GetWrtShell().ActionPend() )
@@ -717,8 +687,8 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
pScrollbar->GetType() == SCROLL_DRAG)
{
//Hier wieder auskommentieren wenn das mitscrollen nicht gewuenscht ist.
- // JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE,
- // so we dont must do it agin.
+ // the end scrollhandler invalidate the FN_STAT_PAGE,
+ // so we dont must do it agin.
EndScrollHdl(pScrollbar);
Point aPos( aVisArea.TopLeft() );
@@ -730,10 +700,6 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
String sDisplay;
if(pWrtShell->GetPageNumber( aPos.Y(), sal_False, nPhNum, nVirtNum, sDisplay ))
{
- // JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE,
- // so we dont must do it agin.
-// if(!GetViewFrame()->GetFrame().IsInPlace())
-// S F X_BINDINGS().Update(FN_STAT_PAGE);
//QuickHelp:
if( pWrtShell->GetPageCnt() > 1 && Help::IsQuickHelpEnabled() )
@@ -775,10 +741,10 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
return 0;
}
+
/*------------------------------------------------------------------------
Beschreibung: Handler der Scrollbars
------------------------------------------------------------------------*/
-
IMPL_LINK( SwView, EndScrollHdl, SwScrollbar *, pScrollbar )
{
if ( !GetWrtShell().ActionPend() )
@@ -803,12 +769,9 @@ IMPL_LINK( SwView, EndScrollHdl, SwScrollbar *, pScrollbar )
/*--------------------------------------------------------------------
Beschreibung:
-
berechnet die Groesse von aVisArea abhaengig von der Groesse
des EditWin auf dem Schirm.
-
--------------------------------------------------------------------*/
-
void SwView::CalcVisArea( const Size &rOutPixel )
{
Point aTopLeft;
@@ -852,8 +815,6 @@ void SwView::CalcVisArea( const Size &rOutPixel )
/*--------------------------------------------------------------------
Beschreibung: Bedienelemente neu anordnen
--------------------------------------------------------------------*/
-
-
void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
{
sal_Bool bRightVRuler = pWrtShell->GetViewOptions()->IsVRulerRight();
@@ -866,7 +827,7 @@ void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
rToFill.Left() = nWidth;
}
- DBG_ASSERT(pHRuler, "warum ist das Lineal nicht da?");
+ OSL_ENSURE(pHRuler, "warum ist das Lineal nicht da?");
if ( pHRuler->IsVisible() )
rToFill.Top() = pHRuler->GetSizePixel().Height();
@@ -887,7 +848,6 @@ void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
SetBorderPixel( rToFill );
}
-
void ViewResizePixel( const Window &rRef,
const Point &rOfst,
const Size &rSize,
@@ -946,7 +906,7 @@ void ViewResizePixel( const Window &rRef,
if(!aSize.Height())
aSize.Height() = pHLineal->GetSizePixel().Height();
pHLineal->SetPosSizePixel( rOfst, aSize );
-// #46802 VCL ruft an unsichtbaren Fenstern kein Resize
+// VCL ruft an unsichtbaren Fenstern kein Resize
// fuer das Lineal ist das aber keine gute Idee
if(!pHLineal->IsVisible())
pHLineal->Resize();
@@ -984,7 +944,7 @@ void ViewResizePixel( const Window &rRef,
Size aImgSz( nVBSzWidth, nVBSzWidth );
- //#55949# wenn der Platz fuer Scrollbar und Page-Buttons zu klein wird, dann
+ // wenn der Platz fuer Scrollbar und Page-Buttons zu klein wird, dann
// werden die Buttons versteckt
sal_uInt16 nCnt = pNaviBtn ? 3 : 2;
long nSubSize = (aImgSz.Width() * nCnt );
@@ -1021,7 +981,6 @@ void ViewResizePixel( const Window &rRef,
}
}
-
void SwView::ShowAtResize()
{
bShowAtResize = sal_False;
@@ -1029,7 +988,6 @@ void SwView::ShowAtResize()
pHRuler->Show();
}
-
void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
{
Size aObjSize = GetObjectShell()->GetVisArea().GetSize();
@@ -1112,10 +1070,9 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
bInInnerResizePixel = sal_False;
}
-
void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
{
- // FME 22.08.2003 #i16909# - return, if no size (caused by minimize window).
+ // #i16909# return, if no size (caused by minimize window).
if ( bInOuterResizePixel || ( !rSize.Width() && !rSize.Height() ) )
return;
bInOuterResizePixel = sal_True;
@@ -1135,6 +1092,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
{
bShowH = pVOpt->IsViewHScrollBar();
bShowV = pVOpt->IsViewVScrollBar();
+ bAuto = bHAuto = sal_True;
break;
}
}
@@ -1156,10 +1114,10 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
{
bShowH = bShowV = bHAuto = bAuto = sal_False;
}
- if(pHScrollbar->IsVisible(sal_False) != bShowH)
+ if(pHScrollbar->IsVisible(sal_False) != bShowH && !bHAuto)
ShowHScrollbar(bShowH);
pHScrollbar->SetAuto( bHAuto );
- if(pVScrollbar->IsVisible(sal_False) != bShowV)
+ if(pVScrollbar->IsVisible(sal_False) != bShowV && !bAuto)
ShowVScrollbar(bShowV);
pVScrollbar->SetAuto(bAuto);
@@ -1194,7 +1152,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
//nicht mehr zum aktuell sichtbaren Bereich passen
pWrtShell->ResetCursorStack();
- ASSERT( !GetEditWin().IsVisible() ||
+ OSL_ENSURE( !GetEditWin().IsVisible() ||
(( aEditSz.Width() > 0 && aEditSz.Height() > 0 )
|| !aVisArea.IsEmpty()), "Small world, isn't it?" );
@@ -1259,7 +1217,6 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
}
}
-
void SwView::SetZoomFactor( const Fraction &rX, const Fraction &rY )
{
const Fraction &rFrac = rX < rY ? rX : rY;
@@ -1270,7 +1227,6 @@ void SwView::SetZoomFactor( const Fraction &rX, const Fraction &rY )
SfxViewShell::SetZoomFactor( rX, rY );
}
-
Size SwView::GetOptimalSizePixel() const
{
Size aPgSize;
@@ -1292,7 +1248,6 @@ Size SwView::GetOptimalSizePixel() const
return GetEditWin().LogicToPixel( aPgSize );
}
-
sal_Bool SwView::UpdateScrollbars()
{
sal_Bool bRet = sal_False;
@@ -1341,11 +1296,10 @@ sal_Bool SwView::UpdateScrollbars()
return bRet;
}
-
void SwView::Move()
{
if ( GetWrtShell().IsInSelect() )
- GetWrtShell().EndSelect(); //#32427#
+ GetWrtShell().EndSelect();
SfxViewShell::Move();
}
@@ -1381,4 +1335,4 @@ sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt )
return bOk;
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx
index 4ba284987091..0459611cb39a 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,13 +31,9 @@
#include <com/sun/star/text/NotePrintMode.hpp>
-#if STLPORT_VERSION>=321
#include <cstdarg>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
@@ -46,7 +43,6 @@
#include <sfx2/progress.hxx>
#include <sfx2/app.hxx>
-#include <svl/flagitem.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/oldprintadaptor.hxx>
#include <sfx2/printer.hxx>
@@ -82,7 +78,6 @@
#include <globals.hrc>
#include <view.hrc>
#include <app.hrc>
-#include <svl/eitem.hxx>
#include <swwrtshitem.hxx>
#include "swabstdlg.hxx"
#include <svl/slstitm.hxx>
@@ -91,13 +86,10 @@
using namespace ::com::sun::star;
-
/*--------------------------------------------------------------------
Beschreibung: Drucker an Sfx uebergeben
--------------------------------------------------------------------*/
-
-
-SfxPrinter* __EXPORT SwView::GetPrinter( sal_Bool bCreate )
+SfxPrinter* SwView::GetPrinter( sal_Bool bCreate )
{
const IDocumentDeviceAccess* pIDDA = GetWrtShell().getIDocumentDeviceAccess();
SfxPrinter *pOld = pIDDA->getPrinter( false );
@@ -113,7 +105,6 @@ SfxPrinter* __EXPORT SwView::GetPrinter( sal_Bool bCreate )
/*--------------------------------------------------------------------
Beschreibung: Druckerwechsel weitermelden
--------------------------------------------------------------------*/
-
void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, sal_Bool bWeb )
{
SwPrintOptions* pOpt = SW_MOD()->GetPrtOptions(bWeb);
@@ -134,8 +125,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, sal_Bool bWeb )
}
}
-
-sal_uInt16 __EXPORT SwView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool )
+sal_uInt16 SwView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool )
{
SwWrtShell &rSh = GetWrtShell();
SfxPrinter* pOld = rSh.getIDocumentDeviceAccess()->getPrinter( false );
@@ -174,8 +164,7 @@ sal_uInt16 __EXPORT SwView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags,
/*--------------------------------------------------------------------
Beschreibung: TabPage fuer applikationsspezifische Druckoptionen
--------------------------------------------------------------------*/
-
-SfxTabPage* __EXPORT SwView::CreatePrintOptionsPage(Window* pParent,
+SfxTabPage* SwView::CreatePrintOptionsPage(Window* pParent,
const SfxItemSet& rSet)
{
return ::CreatePrintOptionsPage( pParent, rSet, sal_False );
@@ -184,8 +173,7 @@ SfxTabPage* __EXPORT SwView::CreatePrintOptionsPage(Window* pParent,
/*--------------------------------------------------------------------
Beschreibung: Print-Dispatcher
--------------------------------------------------------------------*/
-
-void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
+void SwView::ExecutePrint(SfxRequest& rReq)
{
sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
::SetAppPrintOptions( &GetWrtShell(), bWeb );
@@ -246,8 +234,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
}
else if( rReq.GetSlot() == SID_PRINTDOCDIRECT && ! bSilent )
{
- if( /*!bIsAPI && */
- ( pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected() ) )
+ if( ( pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected() ) )
{
short nBtn = SvxPrtQryBox(&GetEditWin()).Execute();
if( RET_CANCEL == nBtn )
@@ -270,7 +257,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
return;
}
default:
- ASSERT(!this, falscher Dispatcher);
+ OSL_ENSURE(!this, "wrong dispatcher");
return;
}
}
@@ -279,26 +266,31 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
Beschreibung: Page Drucker/Zusaetze erzeugen fuer SwView und
SwPagePreview
--------------------------------------------------------------------*/
-
SfxTabPage* CreatePrintOptionsPage( Window *pParent,
const SfxItemSet &rOptions, sal_Bool bPreview )
{
- SfxTabPage* pPage = NULL;
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- if ( pFact )
- {
- ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( TP_OPTPRINT_PAGE );
- if ( fnCreatePage )
- pPage = (*fnCreatePage)( pParent, rOptions );
- }
+ OSL_ENSURE(pFact, "No Print Dialog");
+ if (!pFact)
+ return NULL;
+
+ ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc(TP_OPTPRINT_PAGE);
+ OSL_ENSURE(pFact, "No Page Creator");
+ if (!fnCreatePage)
+ return NULL;
+
+ SfxTabPage* pPage = (*fnCreatePage)(pParent, rOptions);
+ OSL_ENSURE(pPage, "No page");
+ if (!pPage)
+ return NULL;
+
SfxAllItemSet aSet(*(rOptions.GetPool()));
- aSet.Put (SfxBoolItem(SID_PREVIEWFLAG_TYPE, bPreview));
- aSet.Put (SfxBoolItem(SID_FAX_LIST, sal_True));
+ aSet.Put(SfxBoolItem(SID_PREVIEWFLAG_TYPE, bPreview));
+ aSet.Put(SfxBoolItem(SID_FAX_LIST, sal_True));
pPage->PageCreated(aSet);
return pPage;
}
-
void SetAppPrintOptions( ViewShell* pSh, sal_Bool bWeb )
{
const IDocumentDeviceAccess* pIDDA = pSh->getIDocumentDeviceAccess();
@@ -331,3 +323,5 @@ void SetAppPrintOptions( ViewShell* pSh, sal_Bool bWeb )
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index 1c702dddab3d..ed0d0413d6fa 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,8 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
+#include <string>
#include <hintids.hxx>
#include <com/sun/star/util/SearchOptions.hpp>
#include <svl/cjkoptions.hxx>
@@ -42,6 +42,7 @@
#include <svl/itempool.hxx>
#include <svl/eitem.hxx>
#include <svl/srchitem.hxx>
+#include <sal/macros.h>
#include <sfx2/request.hxx>
#include <svx/srchdlg.hxx>
#include <vcl/msgbox.hxx>
@@ -96,12 +97,6 @@ inline Window* GetParentWindow( SvxSearchDialog* pSrchDlg )
return pWin;
}
-
-/*-----------------12.04.97 13:04-------------------
-
---------------------------------------------------*/
-
-
void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
{
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -195,14 +190,14 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
if (nSlot == FN_REPEAT_SEARCH)
{
- ASSERT(pSrchItem, "Search-Item fehlt");
+ OSL_ENSURE(pSrchItem, "SearchItem missing");
if( !pSrchItem )
pSrchItem = new SvxSearchItem(SID_SEARCH_ITEM);
}
else
{
// SearchItem aus Request besorgen
- ASSERT(pArgs, "Args fehlen");
+ OSL_ENSURE(pArgs, "Args missing");
if ( pArgs )
{
delete pSrchItem;
@@ -288,7 +283,7 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
case SVX_SEARCHCMD_REPLACE_ALL:
{
SwSearchOptions aOpts( pWrtShell, pSrchItem->GetBackward() );
-
+ SwCrsrSaveState aSaveCursor( *pWrtShell->GetSwCrsr());
if( !pSrchItem->GetSelection() )
{
@@ -308,8 +303,11 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
nFound = FUNC_Search( aOpts );
+ // #i8288# Now that everything has been replaced, restore the original cursor position.
+ pWrtShell->GetSwCrsr()->RestoreSavePos(); // (position saved by SwCrsrSaveState above)
pWrtShell->EndAllAction();
}
+
rReq.SetReturnValue(SfxBoolItem(nSlot, nFound != 0 && ULONG_MAX != nFound));
if( !nFound )
{
@@ -378,16 +376,16 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
SvUShorts aArr( 0, 16 );
aArr.Insert( aNormalAttr,
- sizeof( aNormalAttr ) / sizeof( aNormalAttr[0] ),
+ SAL_N_ELEMENTS( aNormalAttr ),
0 );
if( SW_MOD()->GetCTLOptions().IsCTLFontEnabled() )
aArr.Insert( aCTLAttr,
- sizeof( aCTLAttr ) / sizeof( aCTLAttr[0] ),
+ SAL_N_ELEMENTS( aCTLAttr ),
14 );
SvtCJKOptions aCJKOpt;
if( aCJKOpt.IsAnyEnabled() )
aArr.Insert( aCJKAttr,
- sizeof( aCJKAttr ) / sizeof( aCJKAttr[0] ),
+ SAL_N_ELEMENTS( aCJKAttr ),
14 );
SfxItemSet aSet( pWrtShell->GetAttrPool(), aArr.GetData() );
@@ -412,13 +410,13 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
}
break;
default:
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
if(nSlot)
{
ByteString sStr( "nSlot: " );
sStr += ByteString::CreateFromInt32( nSlot );
- sStr += " falscher Dispatcher (viewsrch.cxx)";
- DBG_ERROR( sStr.GetBuffer() );
+ sStr += " wrong Dispatcher (viewsrch.cxx)";
+ OSL_ENSURE(false, sStr.GetBuffer() );
}
#endif
return;
@@ -579,13 +577,13 @@ void SwView::Replace()
aRewriter.AddRule(UNDO_ARG2, SW_RES(STR_YIELDS));
aRewriter.AddRule(UNDO_ARG3, pSrchItem->GetReplaceString());
- pWrtShell->StartUndo(UNDO_UI_REPLACE_STYLE, &aRewriter); // #111827#
+ pWrtShell->StartUndo(UNDO_UI_REPLACE_STYLE, &aRewriter);
pWrtShell->SetTxtFmtColl( pWrtShell->GetParaStyle(
pSrchItem->GetReplaceString(),
SwWrtShell::GETSTYLE_CREATESOME ));
- pWrtShell->EndUndo(); // #111827#
+ pWrtShell->EndUndo();
}
else
{
@@ -639,7 +637,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
pWrtShell->SttSelect();
- static sal_uInt16 __READONLY_DATA aSearchAttrRange[] = {
+ static sal_uInt16 aSearchAttrRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -767,38 +765,6 @@ void SwView::StateSearch(SfxItemSet &rSet)
rSet.Put( *pSrchItem );
}
break;
-
-/* case SID_SEARCH_REPLACESET:
- case SID_SEARCH_SEARCHSET:
- {
- static sal_uInt16 __READONLY_DATA aSearchAttrRange[] =
- {
- RES_CHRATR_CASEMAP, RES_CHRATR_POSTURE,
- RES_CHRATR_SHADOWED, RES_CHRATR_WORDLINEMODE,
- RES_PARATR_LINESPACING, RES_PARATR_HYPHENZONE,
- RES_LR_SPACE, RES_UL_SPACE,
- SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP,
- 0
- };
-
- SfxItemSet aSet(pWrtShell->GetAttrPool(), aSearchAttrRange );
- if( SID_SEARCH_REPLACESET==nWhich )
- {
- if( pReplList )
- {
- pReplList->Get( aSet );
- DELETEZ( pReplList );
- }
- }
- else if( pSrchList )
- {
- pSrchList->Get( aSet );
- DELETEZ( pSrchList );
- }
- rSet.Put( SvxSetItem( nWhich, aSet ));
- }
- break;
-*/
}
nWhich = aIter.NextWhich();
}
@@ -806,3 +772,4 @@ void SwView::StateSearch(SfxItemSet &rSet)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index fed08c5e90c9..a7d1dae9ae11 100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,10 +70,6 @@
using namespace ::com::sun::star;
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwView::GetState(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
@@ -161,8 +158,8 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case SID_UNDO:
{
- //JP 21.07.98: Bug 53429 - die muss noch nicht vorhanden sein
- // also lasse sie mal anlegen:
+ // die muss noch nicht vorhanden sein
+ // also lasse sie mal anlegen:
if( !pShell )
SelectShell();
@@ -335,7 +332,6 @@ void SwView::GetState(SfxItemSet &rSet)
case SID_DOCUMENT_COMPARE:
case SID_DOCUMENT_MERGE:
if( GetDocShell()->IsA( SwGlobalDocShell::StaticType() ) ||
-// pWrtShell->IsAnySectionInDoc( sal_True, sal_True, sal_True )||
(SID_DOCUMENT_MERGE == nWhich && pWrtShell->getIDocumentRedlineAccess()->GetRedlinePassword().getLength()))
rSet.DisableItem(nWhich);
break;
@@ -436,11 +432,6 @@ void SwView::GetState(SfxItemSet &rSet)
}
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwView::GetDrawState(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
@@ -468,7 +459,6 @@ void SwView::GetDrawState(SfxItemSet &rSet)
case SID_SHOW_HIDDEN:
case SID_SHOW_FORMS:
rSet.DisableItem( nWhich );
- // rSet.Put( SfxBoolItem(nWhich,sal_True ));
break;
case SID_DRAW_TEXT_MARQUEE:
@@ -506,10 +496,6 @@ void SwView::GetDrawState(SfxItemSet &rSet)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwView::HasUIFeature( sal_uInt32 nFeature )
{
sal_Bool bRet = sal_False;
@@ -521,3 +507,4 @@ sal_Bool SwView::HasUIFeature( sal_uInt32 nFeature )
return bRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 1e96297a3464..2636015dc9c1 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-#include <tools/list.hxx>
-
#include <hintids.hxx>
#include "uitool.hxx"
#include <sfx2/app.hxx>
@@ -65,10 +63,8 @@
#include "fmtcol.hxx"
#include "section.hxx"
-// -> #i23726#
#include "ndtxt.hxx"
#include "pam.hxx"
-// <- #i23726#
#include <IDocumentSettingAccess.hxx>
@@ -79,12 +75,9 @@ using namespace ::com::sun::star;
Beschreibung: Debug-Methode
--------------------------------------------------------------------*/
-
/*--------------------------------------------------------------------
Beschreibung: Columns eintueten
--------------------------------------------------------------------*/
-
-
void lcl_FillSvxColumn(const SwFmtCol& rCol,
sal_uInt16 nTotalWidth,
SvxColumnItem& rColItem,
@@ -126,14 +119,12 @@ void lcl_FillSvxColumn(const SwFmtCol& rCol,
/*--------------------------------------------------------------------
Beschreibung: ColumnItem in ColumnInfo ueberfuehren
--------------------------------------------------------------------*/
-
-
void lcl_ConvertToCols(const SvxColumnItem& rColItem,
sal_uInt16 nTotalWidth,
SwFmtCol& rCols)
{
- ASSERT( rCols.GetNumCols() == rColItem.Count(), "Column count mismatch" );
- // #126939# ruler executes that change the columns shortly after the selection has changed
+ OSL_ENSURE( rCols.GetNumCols() == rColItem.Count(), "Column count mismatch" );
+ // ruler executes that change the columns shortly after the selection has changed
// can result in a crash
if(rCols.GetNumCols() != rColItem.Count())
return;
@@ -146,7 +137,7 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
// Tabcols der Reihe nach
for( sal_uInt16 i=0; i < rColItem.Count()-1; ++i )
{
- DBG_ASSERT(rColItem[i+1].nStart >= rColItem[i].nEnd,"\201berlappende Spalten" );
+ OSL_ENSURE(rColItem[i+1].nStart >= rColItem[i].nEnd,"overlapping columns" );
sal_uInt16 nStart = static_cast< sal_uInt16 >(rColItem[i+1].nStart);
sal_uInt16 nEnd = static_cast< sal_uInt16 >(rColItem[i].nEnd);
if(nStart < nEnd)
@@ -178,8 +169,6 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
/*--------------------------------------------------------------------
Beschreibung: Tabs loeschen
--------------------------------------------------------------------*/
-
-
void lcl_EraseDefTabs(SvxTabStopItem& rTabStops)
{
// Def Tabs loeschen
@@ -199,8 +188,6 @@ void lcl_EraseDefTabs(SvxTabStopItem& rTabStops)
/*--------------------------------------------------------------------
Beschreibung: Seitenrand umdrehen
--------------------------------------------------------------------*/
-
-
void SwView::SwapPageMargin(const SwPageDesc& rDesc, SvxLRSpaceItem& rLRSpace)
{
sal_uInt16 nPhyPage, nVirPage;
@@ -218,8 +205,6 @@ void SwView::SwapPageMargin(const SwPageDesc& rDesc, SvxLRSpaceItem& rLRSpace)
Beschreibung: Wenn der Rahmenrand verschoben wird, sollen die
Spaltentrenner an der gleichen absoluten Position bleiben
--------------------------------------------------------------------*/
-
-
void lcl_Scale(long& nVal, long nScale)
{
nVal *= nScale;
@@ -264,12 +249,11 @@ void ResizeFrameCols(SwFmtCol& rCol,
//reset auto width
rCol.SetOrtho(sal_False, 0, 0 );
}
+
/*--------------------------------------------------------------------
Beschreibung: Hier werden alle Aenderungen der Tableiste
wieder in das Modell geschossen
--------------------------------------------------------------------*/
-
-
void SwView::ExecTabWin( SfxRequest& rReq )
{
SwWrtShell &rSh = GetWrtShell();
@@ -604,21 +588,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
SvxLRSpaceItem aParaMargin((const SvxLRSpaceItem&)rReq.
GetArgs()->Get(nSlot));
- if(nFrmType & FRMTYPE_FLY_ANY)
- {
- sal_Bool bFirstColumn = sal_True;
- sal_Bool bLastColumn = sal_True;
- if(nFrmType & FRMTYPE_COLUMN)
- {
- sal_uInt16 nCurFrameCol = rSh.GetCurColNum() - 1;
- bFirstColumn = !nCurFrameCol;
- const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt();
- const SwFmtCol* pCols = &pFmt->GetCol();
- const SwColumns& rCols = pCols->GetColumns();
- sal_uInt16 nColumnCount = rCols.Count();
- bLastColumn = nColumnCount == nCurFrameCol + 1;
- }
- }
+
aParaMargin.SetRight( aParaMargin.GetRight() - nRightBorderDistance );
aParaMargin.SetTxtLeft(aParaMargin.GetTxtLeft() - nLeftBorderDistance );
@@ -628,7 +598,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
// #i23726#
if (pNumRuleNodeFromDoc)
{
- // --> FME 2005-02-22 #i42922# Mouse move of numbering label
+ // --> #i42922# Mouse move of numbering label
// has to consider the left indent of the paragraph
SfxItemSet aSet( GetPool(), RES_LR_SPACE, RES_LR_SPACE );
rSh.GetCurAttr( aSet );
@@ -637,11 +607,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
// <--
SwPosition aPos(*pNumRuleNodeFromDoc);
- // --> OD 2008-06-09 #i90078#
+ // #i90078#
rSh.SetIndent( static_cast< short >(aParaMargin.GetTxtLeft() - rLR.GetTxtLeft()), aPos);
- // <--
- // --> OD 2005-02-18 #i42921# - invalidate state of indent in order
- // to get a ruler update.
+ // #i42921# invalidate state of indent in order to get a ruler update.
aParaMargin.SetWhich( nSlot );
GetViewFrame()->GetBindings().SetState( aParaMargin );
// <--
@@ -705,7 +673,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) )
{
- ASSERT(aColItem.Count(), "ColDesc ist leer!!");
+ OSL_ENSURE(aColItem.Count(), "ColDesc is empty!!");
const sal_Bool bSingleLine = ((const SfxBoolItem&)rReq.
GetArgs()->Get(SID_RULER_ACT_LINE_ONLY)).GetValue();
@@ -722,13 +690,6 @@ void SwView::ExecTabWin( SfxRequest& rReq )
nBorder = (bVerticalWriting ? nPageHeight : nPageWidth) - aTabCols.GetLeftMin() - aColItem.GetRight();
-#ifdef DEBUG
- long nTmp1 = nPageWidth;
- long nTmp2 = aTabCols.GetLeftMin() + nBorder;
- (void)nTmp1;
- (void)nTmp2;
-#endif
-
if ( aColItem.GetRight() > 0 )
aTabCols.SetRight( nBorder );
@@ -742,7 +703,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(bIsTableRTL)
{
sal_uInt16 nColCount = aColItem.Count() - 1;
- for ( sal_uInt16 i = 0; i < nColCount; ++i )
+ for ( sal_uInt16 i = 0; i < nColCount && i < aTabCols.Count(); ++i )
{
const SvxColumnDescription& rCol = aColItem[nColCount - i];
aTabCols[i] = aTabCols.GetRight() - rCol.nStart;
@@ -751,7 +712,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{
- for ( sal_uInt16 i = 0; i < aColItem.Count()-1; ++i )
+ for ( sal_uInt16 i = 0; i < aColItem.Count()-1 && i < aTabCols.Count(); ++i )
{
const SvxColumnDescription& rCol = aColItem[i];
aTabCols[i] = rCol.nEnd + aTabCols.GetLeft();
@@ -782,7 +743,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(bSect)
{
const SwSection *pSect = rSh.GetAnySection();
- ASSERT( pSect, "Welcher Bereich?");
+ OSL_ENSURE( pSect, "Which section?");
pSectFmt = pSect->GetFmt();
}
else
@@ -837,7 +798,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) )
{
- ASSERT(aColItem.Count(), "ColDesc ist leer!!");
+ OSL_ENSURE(aColItem.Count(), "ColDesc is empty!!");
SwTabCols aTabCols;
if ( bSetTabRowFromDoc )
@@ -895,7 +856,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
break;
default:
- ASSERT( !this, "Falsche SlotId");
+ OSL_ENSURE( !this, "wrong SlotId");
}
rSh.EndAllAction();
@@ -911,8 +872,6 @@ void SwView::ExecTabWin( SfxRequest& rReq )
sprich alle relevanten Attribute an der CursorPos
werden der Tableiste uebermittelt
--------------------------------------------------------------------*/
-
-
void SwView::StateTabWin(SfxItemSet& rSet)
{
SwWrtShell &rSh = GetWrtShell();
@@ -954,10 +913,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SfxItemSet aCoreSet( GetPool(), RES_PARATR_TABSTOP, RES_PARATR_TABSTOP,
RES_LR_SPACE, RES_UL_SPACE, 0 );
- // --> OD 2008-01-17 #newlistlevelattrs#
// get also the list level indent values merged as LR-SPACE item, if needed.
rSh.GetCurAttr( aCoreSet, true );
- // <--
SelectionType nSelType = rSh.GetSelectionType();
SfxWhichIter aIter( rSet );
@@ -968,8 +925,6 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
switch ( nWhich )
{
-// case RES_LR_SPACE:
-// case SID_ATTR_LRSPACE:
case SID_ATTR_LONG_LRSPACE:
{
SvxLongLRSpaceItem aLongLR( (long)aPageLRSpace.GetLeft(),
@@ -1032,8 +987,6 @@ void SwView::StateTabWin(SfxItemSet& rSet)
break;
}
case SID_ATTR_LONG_ULSPACE:
-// case SID_ATTR_ULSPACE:
-// case RES_UL_SPACE:
{
// Rand Seite Oben Unten
SvxULSpaceItem aUL( rDesc.GetMaster().GetULSpace() );
@@ -1083,13 +1036,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
if ( ISA( SwWebView ) ||
IsTabColFromDoc() ||
IsTabRowFromDoc() ||
- ( nSelType & nsSelectionType::SEL_GRF) ||
- (nSelType & nsSelectionType::SEL_FRM) ||
- (nSelType & nsSelectionType::SEL_OLE) ||
- SFX_ITEM_AVAILABLE > aCoreSet.GetItemState(RES_LR_SPACE)||
- (!bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich))||
- (bVerticalWriting && (RES_PARATR_TABSTOP == nWhich))
- )
+ ( nSelType & nsSelectionType::SEL_GRF ) ||
+ ( nSelType & nsSelectionType::SEL_FRM ) ||
+ ( nSelType & nsSelectionType::SEL_OLE ) ||
+ ( SFX_ITEM_AVAILABLE > aCoreSet.GetItemState(RES_LR_SPACE) ) ||
+ (!bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich) ) ||
+ ( bVerticalWriting && (RES_PARATR_TABSTOP == nWhich))
+ )
rSet.DisableItem( nWhich );
else
{
@@ -1099,7 +1052,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&)
rSh.GetDefault(RES_PARATR_TABSTOP);
- DBG_ASSERT(pHRuler, "warum ist das Lineal nicht da?");
+ OSL_ENSURE(pHRuler, "why is there no ruler?");
long nDefTabDist = ::GetTabDist(rDefTabs);
pHRuler->SetDefTabDist( nDefTabDist );
pVRuler->SetDefTabDist( nDefTabDist );
@@ -1112,12 +1065,12 @@ void SwView::StateTabWin(SfxItemSet& rSet)
case SID_ATTR_PARA_LRSPACE:
{
if ( nSelType & nsSelectionType::SEL_GRF ||
- nSelType & nsSelectionType::SEL_FRM ||
- nSelType & nsSelectionType::SEL_OLE ||
- nFrmType == FRMTYPE_DRAWOBJ ||
- (!bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich))||
- (bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich))
- )
+ nSelType & nsSelectionType::SEL_FRM ||
+ nSelType & nsSelectionType::SEL_OLE ||
+ nFrmType == FRMTYPE_DRAWOBJ ||
+ (!bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich)) ||
+ ( bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich))
+ )
{
rSet.DisableItem(nWhich);
}
@@ -1132,7 +1085,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
if (pNumRuleNodeFromDoc)
{
short nOffset = static_cast< short >(aLR.GetTxtLeft() +
- // --> FME 2005-02-22 #i42922# Mouse move of numbering label
+ // #i42922# Mouse move of numbering label
// has to consider the left indent of the paragraph
pNumRuleNodeFromDoc->GetLeftMarginWithNum( sal_True ) );
// <--
@@ -1296,12 +1249,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
sal_Bool bTableVertical = bHasTable && rSh.IsTableVertical();
- if( ( (SID_RULER_BORDERS_VERTICAL == nWhich) &&
- ((bHasTable && !bTableVertical)||
- (!bVerticalWriting && !bFrmSelection && !bHasTable ) || (bFrmSelection && !bFrameHasVerticalColumns)) ) ||
- ((SID_RULER_BORDERS == nWhich) &&
- ((bHasTable && bTableVertical)||
- (bVerticalWriting && !bFrmSelection&& !bHasTable) || bFrameHasVerticalColumns)))
+ if(((SID_RULER_BORDERS_VERTICAL == nWhich) &&
+ ((bHasTable && !bTableVertical) ||
+ (!bVerticalWriting && !bFrmSelection && !bHasTable ) ||
+ ( bFrmSelection && !bFrameHasVerticalColumns))) ||
+ ((SID_RULER_BORDERS == nWhich) &&
+ ((bHasTable && bTableVertical) ||
+ (bVerticalWriting && !bFrmSelection&& !bHasTable) || bFrameHasVerticalColumns)))
rSet.DisableItem(nWhich);
else if ( bHasTable )
{
@@ -1320,7 +1274,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
nNum = aTabCols.Count() - nNum;
}
- ASSERT(nNum <= aTabCols.Count(), "TabCol not found");
+ OSL_ENSURE(nNum <= aTabCols.Count(), "TabCol not found");
const int nLft = aTabCols.GetLeftMin() + aTabCols.GetLeft();
const int nRgt = (sal_uInt16)(bTableVertical ? nPageHeight : nPageWidth) -
(aTabCols.GetLeftMin() +
@@ -1395,7 +1349,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
nFrmType & FRMTYPE_COLSECT )
{
const SwSection *pSect = rSh.GetAnySection(sal_False, pPt);
- ASSERT( pSect, "Welcher Bereich?");
+ OSL_ENSURE( pSect, "Which section?");
if( pSect )
{
SwSectionFmt *pFmt = pSect->GetFmt();
@@ -1520,10 +1474,10 @@ void SwView::StateTabWin(SfxItemSet& rSet)
bFrmSelection;
}
- if( ( (SID_RULER_ROWS == nWhich) &&
- ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) ) ||
- ((SID_RULER_ROWS_VERTICAL == nWhich) &&
- ((bVerticalWriting && !bFrmSelection) || bFrameHasVerticalColumns)))
+ if(((SID_RULER_ROWS == nWhich) &&
+ ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns))) ||
+ ((SID_RULER_ROWS_VERTICAL == nWhich) &&
+ ((bVerticalWriting && !bFrmSelection) || bFrameHasVerticalColumns)))
rSet.DisableItem(nWhich);
else if ( IsTabRowFromDoc() ||
( rSh.GetTableFmt() && !bFrmSelection &&
@@ -1541,7 +1495,6 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rSh.GetTabRows( aTabCols );
}
-// ASSERT(nNum <= aTabCols.Count(), "TabCol not found");
const int nLft = aTabCols.GetLeftMin();
const int nRgt = (sal_uInt16)(bVerticalWriting ? nPageWidth : nPageHeight) -
(aTabCols.GetLeftMin() +
@@ -1751,7 +1704,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
eRecType = bSectOutTbl ? RECT_OUTTABSECTION
: RECT_SECTION;
const SwSection *pSect = rSh.GetAnySection( bSectOutTbl, pPt );
- ASSERT( pSect, "Welcher Bereich?");
+ OSL_ENSURE( pSect, "Which section?");
pFmt = pSect->GetFmt();
}
else if( bFrame )
@@ -1783,7 +1736,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
if( nNum > rCols.Count() )
{
- ASSERT( !this, "es wird auf dem falschen FmtCol gearbeitet!" );
+ OSL_ENSURE( !this, "wrong FmtCol is being edited!" );
nNum = rCols.Count();
}
@@ -1864,4 +1817,4 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/RefreshListenerContainer.cxx b/sw/source/ui/uno/RefreshListenerContainer.cxx
index 39d28a6347c1..ddfcec93a54d 100644
--- a/sw/source/ui/uno/RefreshListenerContainer.cxx
+++ b/sw/source/ui/uno/RefreshListenerContainer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,5 @@ void SwRefreshListenerContainer::Refreshed ()
xRefreshListener->refreshed(aObj);
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index fba5ac67a8d4..a9d2f0b9b9c0 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <sfx2/sfxbasecontroller.hxx>
#include <SwXDocumentSettings.hxx>
#include <comphelper/MasterPropertySetInfo.hxx>
@@ -53,11 +54,6 @@
#include "cfgitems.hxx"
#include "prtopt.hxx"
-
-#include "swmodule.hxx"
-#include "cfgitems.hxx"
-#include "prtopt.hxx"
-
using rtl::OUString;
using namespace comphelper;
@@ -124,7 +120,9 @@ enum SwDocumentSettingsPropertyHandles
HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
// <--
HANDLE_MODIFYPASSWORDINFO,
- HANDLE_MATH_BASELINE_ALIGNMENT
+ HANDLE_MATH_BASELINE_ALIGNMENT,
+ HANDLE_INVERT_BORDER_SPACING,
+ HANDLE_COLLAPSE_EMPTY_CELL_PARA
};
MasterPropertySetInfo * lcl_createSettingsInfo()
@@ -180,7 +178,8 @@ 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("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT, CPPUTYPE_BOOLEAN, 0, 0},
-
+ { RTL_CONSTASCII_STRINGPARAM("InvertBorderSpacing"), HANDLE_INVERT_BORDER_SPACING, 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
* find another solution before adding them to this property set - MTG
@@ -257,7 +256,7 @@ void SwXDocumentSettings::release ()
uno::Sequence< uno::Type > SAL_CALL SwXDocumentSettings::getTypes( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< uno::Type > aBaseTypes( 5 );
uno::Type* pBaseTypes = aBaseTypes.getArray();
@@ -276,7 +275,7 @@ uno::Sequence< uno::Type > SAL_CALL SwXDocumentSettings::getTypes( )
uno::Sequence< sal_Int8 > SAL_CALL SwXDocumentSettings::getImplementationId( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -302,7 +301,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
{
if (rInfo.mnAttributes & PropertyAttribute::READONLY)
- throw PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + C2U(rInfo.mpName), static_cast < cppu::OWeakObject * > ( 0 ) );
+ throw PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rtl::OUString::createFromAscii(rInfo.mpName), static_cast < cppu::OWeakObject * > ( 0 ) );
switch( rInfo.mnHandle )
{
@@ -406,7 +405,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
SvMemoryStream aStream (aSequence.getArray(), nSize,
STREAM_READ );
aStream.Seek ( STREAM_SEEK_TO_BEGIN );
- static sal_uInt16 __READONLY_DATA nRange[] =
+ static sal_uInt16 const nRange[] =
{
FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
SID_HTML_MODE, SID_HTML_MODE,
@@ -694,6 +693,18 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
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;
+ case HANDLE_COLLAPSE_EMPTY_CELL_PARA:
+ {
+ sal_Bool bTmp = *(sal_Bool*)rValue.getValue();
+ mpDoc->set(IDocumentSettingAccess::COLLAPSE_EMPTY_CELL_PARA, bTmp);
+ }
+ break;
default:
throw UnknownPropertyException();
}
@@ -807,7 +818,6 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_IS_KERN_ASIAN_PUNCTUATION:
{
- //sal_Bool bParaSpace = mpDoc->IsKernAsianPunctuation();
sal_Bool bParaSpace = mpDoc->get(IDocumentSettingAccess::KERN_ASIAN_PUNCTUATION);
rValue.setValue(&bParaSpace, ::getBooleanCppuType());
}
@@ -1028,7 +1038,18 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
rValue.setValue( &bTmp, ::getBooleanCppuType() );
}
break;
-
+ case HANDLE_INVERT_BORDER_SPACING:
+ {
+ sal_Bool bTmp = mpDoc->get(IDocumentSettingAccess::INVERT_BORDER_SPACING);
+ rValue.setValue( &bTmp, ::getBooleanCppuType() );
+ }
+ break;
+ case HANDLE_COLLAPSE_EMPTY_CELL_PARA:
+ {
+ sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::COLLAPSE_EMPTY_CELL_PARA );
+ rValue.setValue( &bTmp, ::getBooleanCppuType() );
+ }
+ break;
default:
throw UnknownPropertyException();
}
@@ -1074,3 +1095,4 @@ Sequence< OUString > SAL_CALL SwXDocumentSettings::getSupportedServiceNames( )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/SwXDocumentSettings.hxx b/sw/source/ui/uno/SwXDocumentSettings.hxx
index 6ea168716e40..e79aa94db2c0 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.hxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,12 +33,8 @@
#include "ui_pch.hxx"
#endif
-#ifndef _COMPHELPER_MASTERPROPERTYSET_HXX_
#include <comphelper/MasterPropertySet.hxx>
-#endif
-#ifndef _COM_SUN_STAR_TEXT_XTEXTDOCUMENT_HPP
#include <com/sun/star/text/XTextDocument.hpp>
-#endif
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <cppuhelper/weak.hxx>
@@ -107,3 +104,5 @@ public:
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/SwXFilterOptions.cxx b/sw/source/ui/uno/SwXFilterOptions.cxx
index 015a75de2ab0..f0b647c9fc29 100644
--- a/sw/source/ui/uno/SwXFilterOptions.cxx
+++ b/sw/source/ui/uno/SwXFilterOptions.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
#include <shellio.hxx>
#include <swdll.hxx>
#include <unoprnms.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <vcl/msgbox.hxx>
#include <com/sun/star/lang/XUnoTunnel.hpp>
@@ -50,37 +51,27 @@ using namespace ::com::sun::star::lang;
#define SWFILTEROPTIONSOBJ_SERVICE RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.FilterOptionsDialog")
#define SWFILTEROPTIONSOBJ_IMPLNAME RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Writer.FilterOptionsDialog")
#define FILTER_OPTIONS_NAME RTL_CONSTASCII_USTRINGPARAM("FilterOptions")
-/*-- 2002/06/21 11:01:23---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXFilterOptions::SwXFilterOptions() :
bExport( sal_False )
{
}
-/*-- 2002/06/21 11:01:24---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXFilterOptions::~SwXFilterOptions()
{
}
-/*-- 2002/06/21 11:01:24---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwXFilterOptions::getImplementationName_Static()
{
return ::rtl::OUString(SWFILTEROPTIONSOBJ_IMPLNAME);
}
-/*-- 2002/06/21 11:01:24---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< ::rtl::OUString> SwXFilterOptions::getSupportedServiceNames_Static()
{
::rtl::OUString sService(SWFILTEROPTIONSOBJ_SERVICE);
return uno::Sequence< ::rtl::OUString> (&sService, 1);
}
-/*-- 2002/06/21 11:01:25---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< beans::PropertyValue > SwXFilterOptions::getPropertyValues() throw (uno::RuntimeException)
{
uno::Sequence<beans::PropertyValue> aRet(1);
@@ -91,9 +82,7 @@ uno::Sequence< beans::PropertyValue > SwXFilterOptions::getPropertyValues() thro
return aRet;
}
-/*-- 2002/06/21 11:01:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFilterOptions::setPropertyValues( const uno::Sequence<beans::PropertyValue >& aProps )
throw (beans::UnknownPropertyException, beans::PropertyVetoException,
IllegalArgumentException, WrappedTargetException, uno::RuntimeException)
@@ -109,20 +98,16 @@ void SwXFilterOptions::setPropertyValues( const uno::Sequence<beans::PropertyV
rProp.Value >>= sFilterName;
else if ( aPropName == ::rtl::OUString(FILTER_OPTIONS_NAME) )
rProp.Value >>= sFilterOptions;
- else if ( aPropName.equalsAscii( "InputStream" ) )
+ else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InputStream" ) ) )
rProp.Value >>= xInputStream;
}
}
-/*-- 2002/06/21 11:01:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFilterOptions::setTitle( const ::rtl::OUString& /*rTitle*/ )
throw (uno::RuntimeException)
{
}
-/*-- 2002.06.21 11:01:25---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException)
{
sal_Int16 nRet = ui::dialogs::ExecutableDialogResults::CANCEL;
@@ -143,10 +128,10 @@ sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwAsciiFilterDlg* pAsciiDlg = pFact->CreateSwAsciiFilterDlg( NULL, *pDocShell,pInStream, DLG_ASCII_FILTER );
- DBG_ASSERT(pAsciiDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pAsciiDlg, "Dialogdiet fail!");
if(RET_OK == pAsciiDlg->Execute())
{
SwAsciiOptions aOptions;
@@ -164,54 +149,44 @@ sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException)
return nRet;
}
-/*-- 2002/06/21 11:01:26---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFilterOptions::setTargetDocument( const uno::Reference< XComponent >& xDoc )
throw (IllegalArgumentException, uno::RuntimeException)
{
bExport = sal_False;
xModel = xDoc;
}
-/*-- 2002/06/21 11:01:26---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXFilterOptions::setSourceDocument( const uno::Reference<XComponent >& xDoc )
throw (IllegalArgumentException,uno::RuntimeException)
{
bExport = sal_True;
xModel = xDoc;
}
-/*-- 2002/06/21 11:01:26---------------------------------------------------
- -----------------------------------------------------------------------*/
::rtl::OUString SwXFilterOptions::getImplementationName() throw(uno::RuntimeException)
{
return ::rtl::OUString(SWFILTEROPTIONSOBJ_IMPLNAME);
}
-/*-- 2002/06/21 11:01:27---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXFilterOptions::supportsService( const ::rtl::OUString& rServiceName )
throw(uno::RuntimeException)
{
return rServiceName == ::rtl::OUString(SWFILTEROPTIONSOBJ_SERVICE);
}
-/*-- 2002/06/21 11:01:28---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< ::rtl::OUString > SwXFilterOptions::getSupportedServiceNames()
throw(uno::RuntimeException)
{
return SwXFilterOptions::getSupportedServiceNames_Static();
}
-
uno::Reference<uno::XInterface> SAL_CALL SwXFilterOptions_createInstance(
const uno::Reference<lang::XMultiServiceFactory>& )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwDLL::Init();
return (::cppu::OWeakObject*) new SwXFilterOptions;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/detreg.cxx b/sw/source/ui/uno/detreg.cxx
index 65f4e6379a17..69cf4888eb74 100644
--- a/sw/source/ui/uno/detreg.cxx
+++ b/sw/source/ui/uno/detreg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -83,3 +84,4 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/dlelstnr.cxx b/sw/source/ui/uno/dlelstnr.cxx
index c163feda46b5..d81f27bcf934 100644
--- a/sw/source/ui/uno/dlelstnr.cxx
+++ b/sw/source/ui/uno/dlelstnr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
-
#include <com/sun/star/linguistic2/DictionaryListEventFlags.hpp>
#include <com/sun/star/linguistic2/XDictionaryList.hpp>
#include <com/sun/star/linguistic2/XLinguServiceManager.hpp>
@@ -42,7 +40,7 @@
#include <com/sun/star/uno/Reference.h>
#include <comphelper/processfactory.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <tools/shl.hxx>
#include "dlelstnr.hxx"
@@ -50,7 +48,6 @@
#include <wrtsh.hxx>
#include <view.hxx>
-
using ::rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
@@ -59,11 +56,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::linguistic2;
using namespace ::com::sun::star::linguistic2::LinguServiceEventFlags;
-#define A2OU(x) OUString::createFromAscii(x)
-
-/* -----------------------------17.03.00 09:07--------------------------------
-
- ---------------------------------------------------------------------------*/
SwLinguServiceEventListener::SwLinguServiceEventListener()
{
Reference< XMultiServiceFactory > xMgr( comphelper::getProcessServiceFactory() );
@@ -71,20 +63,20 @@ SwLinguServiceEventListener::SwLinguServiceEventListener()
{
try
{
- OUString aSvcName( A2OU( "com.sun.star.frame.Desktop" ) );
+ OUString aSvcName( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) );
xDesktop = Reference< frame::XDesktop >(
xMgr->createInstance( aSvcName ), UNO_QUERY );
if (xDesktop.is())
xDesktop->addTerminateListener( this );
- aSvcName = A2OU( "com.sun.star.linguistic2.LinguServiceManager" );
+ aSvcName = OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.linguistic2.LinguServiceManager" ));
xLngSvcMgr = Reference< XLinguServiceManager >( xMgr->createInstance( aSvcName ), UNO_QUERY );
if (xLngSvcMgr.is())
xLngSvcMgr->addLinguServiceManagerListener( (XLinguServiceEventListener *) this );
if (SvtLinguConfig().HasGrammarChecker())
{
- aSvcName = A2OU( "com.sun.star.linguistic2.ProofreadingIterator" );
+ aSvcName = OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.linguistic2.ProofreadingIterator" ));
xGCIterator = Reference< XProofreadingIterator >( xMgr->createInstance( aSvcName ), UNO_QUERY );
Reference< XLinguServiceEventBroadcaster > xBC( xGCIterator, UNO_QUERY );
if (xBC.is())
@@ -93,26 +85,20 @@ SwLinguServiceEventListener::SwLinguServiceEventListener()
}
catch (uno::Exception &)
{
- DBG_ASSERT(0, "exception caught in SwLinguServiceEventListener c-tor" );
+ OSL_ENSURE(0, "exception caught in SwLinguServiceEventListener c-tor" );
}
}
}
-/* -----------------------------17.03.00 09:07--------------------------------
- ---------------------------------------------------------------------------*/
SwLinguServiceEventListener::~SwLinguServiceEventListener()
{
}
-/* -----------------------------17.03.00 09:06--------------------------------
-
- ---------------------------------------------------------------------------*/
-
void SwLinguServiceEventListener::processDictionaryListEvent(
const DictionaryListEvent& rDicListEvent)
throw( RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Int16 nEvt = rDicListEvent.nCondensedEvent;
@@ -133,12 +119,11 @@ void SwLinguServiceEventListener::processDictionaryListEvent(
SW_MOD()->CheckSpellChanges( sal_False, bIsSpellWrong, bIsSpellAll, sal_False );
}
-
void SAL_CALL SwLinguServiceEventListener::processLinguServiceEvent(
const LinguServiceEvent& rLngSvcEvent )
throw(RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bIsSpellWrong = 0 != (rLngSvcEvent.nEvent & SPELL_WRONG_WORDS_AGAIN);
sal_Bool bIsSpellAll = 0 != (rLngSvcEvent.nEvent & SPELL_CORRECT_WORDS_AGAIN);
@@ -164,12 +149,11 @@ void SAL_CALL SwLinguServiceEventListener::processLinguServiceEvent(
}
}
-
void SAL_CALL SwLinguServiceEventListener::disposing(
const EventObject& rEventObj )
throw(RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (xLngSvcMgr.is() && rEventObj.Source == xLngSvcMgr)
xLngSvcMgr = 0;
@@ -177,20 +161,17 @@ void SAL_CALL SwLinguServiceEventListener::disposing(
xGCIterator = 0;
}
-
void SAL_CALL SwLinguServiceEventListener::queryTermination(
const EventObject& /*rEventObj*/ )
throw(TerminationVetoException, RuntimeException)
{
- //vos::OGuard aGuard(Application::GetSolarMutex());
}
-
void SAL_CALL SwLinguServiceEventListener::notifyTermination(
const EventObject& rEventObj )
throw(RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if (xDesktop.is() && rEventObj.Source == xDesktop)
{
@@ -202,3 +183,4 @@ void SAL_CALL SwLinguServiceEventListener::notifyTermination(
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/swdet2.cxx b/sw/source/ui/uno/swdet2.cxx
index 2adba8f5c841..f38cf9a810e7 100644
--- a/sw/source/ui/uno/swdet2.cxx
+++ b/sw/source/ui/uno/swdet2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,36 +76,7 @@ sal_uLong SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** pp
const SfxFilter* pTmp = SwIoSystem::GetFileFilter( rMedium.GetPhysicalName(), aPrefFlt, &rMedium );
if( !pTmp )
return ERRCODE_ABORT;
- /*
- else if( *ppFilter && (*ppFilter)->GetUserData().EqualsAscii( "W4W", 0, 3 )
- && pTmp->GetUserData().EqualsAscii( FILTER_TEXT, 0, 4 ) )
- {
- // Bug 95262 - if the user (or short detect) select a
- // Word 4 Word filter, but the autodect of mastersoft
- // can't detect it, we normally return the ascii filter
- // But the user may have a change to use the W4W filter,
- // so the SFX must show now a dialog with the 2 filters
- nRet = ERRCODE_SFX_CONSULTUSER;
- *ppFilter = pTmp;
- } */
- // sollte der voreingestellte Filter ASCII sein und wir haben
- // ASCII erkannt, dann ist das ein gultiger Filter, ansonsten ist das
- // ein Fehler und wir wollen die Filterbox sehen
- /*
- else if( pTmp->GetUserData().EqualsAscii( FILTER_TEXT ) )
- {
- // Bug 28974: "Text" erkannt, aber "Text Dos" "Text ..." eingestellt
- // -> keine FilterBox, sondern den eingestellten Filter benutzen
- if( *ppFilter && (*ppFilter)->GetUserData().EqualsAscii( FILTER_TEXT, 0, 4 ) )
- ;
- else
-// if( !*ppFilter || COMPARE_EQUAL != pTmp->GetUserData().Compare((*ppFilter)->GetUserData(), 4 ))
- {
-// nRet = ERRCODE_ABORT;
- *ppFilter = pTmp;
- }
- } */
else
{
//Bug 41417: JP 09.07.97: HTML documents should be loaded by WebWriter
@@ -120,3 +92,4 @@ sal_uLong SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** pp
return nRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index 133935a5330c..aea3ff13f29c 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,7 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
#include <comphelper/processfactory.hxx>
-#endif
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
@@ -44,9 +43,7 @@
#include <com/sun/star/ucb/InteractiveAppException.hpp>
#include <com/sun/star/ucb/XContent.hpp>
#include <com/sun/star/packages/zip/ZipIOException.hpp>
-#ifndef _TOOLKIT_UNOHLP_HXX
#include <toolkit/helper/vclunohelper.hxx>
-#endif
#include <ucbhelper/simpleinteractionrequest.hxx>
#include <rtl/ustring.h>
#include <rtl/logfile.hxx>
@@ -55,7 +52,7 @@
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
#include <tools/urlobj.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <svtools/sfxecode.hxx>
#include <svtools/ehdl.hxx>
#include <sot/storinfo.hxx>
@@ -116,7 +113,6 @@ SwFilterDetect::~SwFilterDetect()
// now some parameters that can already be in the array, but may be overwritten or new inserted here
// remember their indices in the case new values must be added to the array
sal_Int32 nPropertyCount = lDescriptor.getLength();
- sal_Int32 nIndexOfFilterName = -1;
sal_Int32 nIndexOfInputStream = -1;
sal_Int32 nIndexOfContent = -1;
sal_Int32 nIndexOfReadOnlyFlag = -1;
@@ -146,10 +142,6 @@ SwFilterDetect::~SwFilterDetect()
{
lDescriptor[nProperty].Value >>= sTemp;
aPreselectedFilterName = sTemp;
-
- // if the preselected filter name is not correct, it must be erased after detection
- // remember index of property to get access to it later
- nIndexOfFilterName = nProperty;
}
else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream")) )
nIndexOfInputStream = nProperty;
@@ -173,9 +165,7 @@ SwFilterDetect::~SwFilterDetect()
nIndexOfDocumentTitle = nProperty;
}
- // can't check the type for external filters, so set the "dont" flag accordingly
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
- //SfxFilterFlags nMust = SFX_FILTER_IMPORT, nDont = SFX_FILTER_NOTINSTALLED;
+ SolarMutexGuard aGuard;
SfxApplication* pApp = SFX_APP();
SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() );
@@ -193,7 +183,6 @@ SwFilterDetect::~SwFilterDetect()
String aPattern( aPrefix );
aPattern += String::CreateFromAscii("swriter");
if ( aURL.Match( aPattern ) >= aPattern.Len() )
- //pFilter = SfxFilter::GetDefaultFilterFromFactory( aURL );
return aTypeName;
}
}
@@ -240,7 +229,7 @@ SwFilterDetect::~SwFilterDetect()
}
else
{
- DBG_ASSERT( xStorage.is(), "At this point storage must exist!" );
+ OSL_ENSURE( xStorage.is(), "At this point storage must exist!" );
try
{
@@ -366,7 +355,7 @@ SwFilterDetect::~SwFilterDetect()
{
// if input stream wasn't part of the descriptor, now it should be, otherwise the content would be opend twice
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("InputStream");
+ lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream"));
lDescriptor[nPropertyCount].Value <<= xStream;
nPropertyCount++;
}
@@ -375,7 +364,7 @@ SwFilterDetect::~SwFilterDetect()
{
// if input stream wasn't part of the descriptor, now it should be, otherwise the content would be opend twice
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("UCBContent");
+ lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UCBContent"));
lDescriptor[nPropertyCount].Value <<= xContent;
nPropertyCount++;
}
@@ -385,7 +374,7 @@ SwFilterDetect::~SwFilterDetect()
if ( nIndexOfReadOnlyFlag == -1 )
{
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("ReadOnly");
+ lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
lDescriptor[nPropertyCount].Value <<= bReadOnly;
nPropertyCount++;
}
@@ -396,7 +385,7 @@ SwFilterDetect::~SwFilterDetect()
if ( !bRepairPackage && bRepairAllowed )
{
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("RepairPackage");
+ lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage"));
lDescriptor[nPropertyCount].Value <<= bRepairAllowed;
nPropertyCount++;
bOpenAsTemplate = sal_True;
@@ -408,7 +397,7 @@ SwFilterDetect::~SwFilterDetect()
if ( nIndexOfTemplateFlag == -1 )
{
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("AsTemplate");
+ lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate"));
lDescriptor[nPropertyCount].Value <<= bOpenAsTemplate;
nPropertyCount++;
}
@@ -422,7 +411,7 @@ SwFilterDetect::~SwFilterDetect()
if ( nIndexOfDocumentTitle == -1 )
{
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("DocumentTitle");
+ lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle"));
lDescriptor[nPropertyCount].Value <<= aDocumentTitle;
nPropertyCount++;
}
@@ -468,16 +457,16 @@ UNOSEQUENCE< UNOOUSTRING > SwFilterDetect::impl_getStaticSupportedServiceNames()
{
UNOMUTEXGUARD aGuard( UNOMUTEX::getGlobalMutex() );
UNOSEQUENCE< UNOOUSTRING > seqServiceNames( 3 );
- seqServiceNames.getArray() [0] = UNOOUSTRING::createFromAscii( "com.sun.star.frame.ExtendedTypeDetection" );
- seqServiceNames.getArray() [1] = UNOOUSTRING::createFromAscii( "com.sun.star.text.FormatDetector" );
- seqServiceNames.getArray() [2] = UNOOUSTRING::createFromAscii( "com.sun.star.text.W4WFormatDetector" );
+ seqServiceNames.getArray() [0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ExtendedTypeDetection" ));
+ seqServiceNames.getArray() [1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.FormatDetector" ));
+ seqServiceNames.getArray() [2] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.W4WFormatDetector" ));
return seqServiceNames ;
}
/* Helper for XServiceInfo */
UNOOUSTRING SwFilterDetect::impl_getStaticImplementationName()
{
- return UNOOUSTRING::createFromAscii( "com.sun.star.comp.writer.FormatDetector" );
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.writer.FormatDetector" ));
}
/* Helper for registry */
@@ -486,3 +475,4 @@ UNOREFERENCE< UNOXINTERFACE > SAL_CALL SwFilterDetect::impl_createInstance( cons
return UNOREFERENCE< UNOXINTERFACE >( *new SwFilterDetect( xServiceManager ) );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx
index 507d6eb0c386..124a443025cf 100644
--- a/sw/source/ui/uno/swdetect.hxx
+++ b/sw/source/ui/uno/swdetect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,7 @@
#define _SW_TYPEDETECT_HXX
#include <rtl/ustring.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <com/sun/star/document/XExtendedFilterDetection.hpp>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/Reference.h>
@@ -93,3 +94,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index f763792a3ef9..e5943aab71e7 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,8 +33,8 @@
#define _SVSTDARR_STRINGS
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <vos/mutex.hxx>
-#include <tools/debug.hxx>
+#include <osl/mutex.hxx>
+#include <osl/diagnose.h>
#include <vcl/svapp.hxx>
#include <svl/svstdarr.hxx>
#include <svtools/unoevent.hxx>
@@ -70,67 +71,48 @@ SV_IMPL_REF ( SwDocShell )
using namespace ::com::sun::star;
using ::rtl::OUString;
-/******************************************************************
- *
- ******************************************************************/
-/* -----------------30.03.99 14:31-------------------
- *
- * --------------------------------------------------*/
uno::Reference< uno::XInterface > SAL_CALL SwXAutoTextContainer_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & ) throw( uno::Exception )
{
//the module may not be loaded
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwDLL::Init();
static uno::Reference< uno::XInterface > xAText = (cppu::OWeakObject*)new SwXAutoTextContainer();;
return xAText;
}
-/* -----------------------------17.04.01 13:17--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SAL_CALL SwXAutoTextContainer_getSupportedServiceNames() throw()
{
OUString sService( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.AutoTextContainer"));
const uno::Sequence< OUString > aSeq( &sService, 1 );
return aSeq;
}
-/* -----------------------------17.04.01 13:18--------------------------------
- ---------------------------------------------------------------------------*/
OUString SAL_CALL SwXAutoTextContainer_getImplementationName() throw()
{
return OUString( RTL_CONSTASCII_USTRINGPARAM("SwXAutoTextContainer" ) );
}
-/*-- 21.12.98 12:42:16---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXAutoTextContainer::SwXAutoTextContainer()
{
pGlossaries = ::GetGlossaries();
}
-/*-- 21.12.98 12:42:17---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXAutoTextContainer::~SwXAutoTextContainer()
{
}
-/*-- 21.12.98 12:42:17---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXAutoTextContainer::getCount(void) throw( uno::RuntimeException )
{
return pGlossaries->GetGroupCnt();
}
-/*-- 21.12.98 12:42:18---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXAutoTextContainer::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
sal_uInt16 nCount = pGlossaries->GetGroupCnt();
if ( 0 <= nIndex && nIndex < nCount )
@@ -139,29 +121,23 @@ uno::Any SwXAutoTextContainer::getByIndex(sal_Int32 nIndex)
throw lang::IndexOutOfBoundsException();
return aRet;
}
-/*-- 21.12.98 12:42:18---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SwXAutoTextContainer::getElementType(void) throw( uno::RuntimeException )
{
return ::getCppuType((const uno::Reference<text::XAutoTextGroup>*)0);
}
-/*-- 21.12.98 12:42:18---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXAutoTextContainer::hasElements(void) throw( uno::RuntimeException )
{
//zumindest Standard sollte es immer geben!
return sal_True;
}
-/*-- 21.12.98 12:42:18---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXAutoTextContainer::getByName(const OUString& GroupName)
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XAutoTextGroup > xGroup;
if ( pGlossaries && hasByName( GroupName ) ) // group name already known?
@@ -173,12 +149,10 @@ uno::Any SwXAutoTextContainer::getByName(const OUString& GroupName)
return makeAny( xGroup );
}
-/*-- 21.12.98 12:42:19---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXAutoTextContainer::getElementNames(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_uInt16 nCount = pGlossaries->GetGroupCnt();
uno::Sequence< OUString > aGroupNames(nCount);
@@ -192,26 +166,24 @@ uno::Sequence< OUString > SwXAutoTextContainer::getElementNames(void) throw( uno
}
return aGroupNames;
}
-/*-- 21.12.98 12:42:19---------------------------------------------------
+/*-----------------------------------------------------------------------
findet Gruppennamen mit und ohne Pfadindex
-----------------------------------------------------------------------*/
sal_Bool SwXAutoTextContainer::hasByName(const OUString& Name)
throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
String sGroupName( pGlossaries->GetCompleteGroupName( Name ) );
if(sGroupName.Len())
return sal_True;
return sal_False;
}
-/*-- 21.12.98 12:42:19---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XAutoTextGroup > SwXAutoTextContainer::insertNewByName(
const OUString& aGroupName)
throw( lang::IllegalArgumentException, container::ElementExistException, uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(hasByName(aGroupName))
throw container::ElementExistException();
//check for non-ASCII characters
@@ -246,34 +218,28 @@ uno::Reference< text::XAutoTextGroup > SwXAutoTextContainer::insertNewByName(
pGlossaries->NewGroupDoc(sGroup, sGroup.GetToken(0, GLOS_DELIM));
uno::Reference< text::XAutoTextGroup > xGroup = pGlossaries->GetAutoTextGroup( sGroup, true );
- DBG_ASSERT( xGroup.is(), "SwXAutoTextContainer::insertNewByName: no UNO object created? How this?" );
+ OSL_ENSURE( xGroup.is(), "SwXAutoTextContainer::insertNewByName: no UNO object created? How this?" );
// we just inserted the group into the glossaries, so why doesn't it exist?
return xGroup;
}
-/*-- 21.12.98 12:42:19---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextContainer::removeByName(const OUString& aGroupName)
throw( container::NoSuchElementException, uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
//zunaechst den Namen mit Pfad-Extension finden
String sGroupName = pGlossaries->GetCompleteGroupName( aGroupName );
if(!sGroupName.Len())
throw container::NoSuchElementException();
pGlossaries->DelGroupDoc(sGroupName);
}
-/* -----------------------------06.04.00 11:11--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXAutoTextContainer::getImplementationName(void) throw( uno::RuntimeException )
{
return SwXAutoTextContainer_getImplementationName();
}
-/* -----------------------------06.04.00 11:11--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXAutoTextContainer::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
const uno::Sequence< OUString > aNames = SwXAutoTextContainer_getSupportedServiceNames();
@@ -284,27 +250,18 @@ sal_Bool SwXAutoTextContainer::supportsService(const OUString& rServiceName) thr
}
return sal_False;
}
-/* -----------------------------06.04.00 11:11--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXAutoTextContainer::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
return SwXAutoTextContainer_getSupportedServiceNames();
}
-/******************************************************************
- *
- ******************************************************************/
-/* -----------------------------10.03.00 18:02--------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXAutoTextGroup::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXAutoTextGroup::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -317,9 +274,6 @@ sal_Int64 SAL_CALL SwXAutoTextGroup::getSomething( const uno::Sequence< sal_Int8
return 0;
}
-/*-- 21.12.98 12:42:24---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXAutoTextGroup::SwXAutoTextGroup(const OUString& rName,
SwGlossaries* pGlos) :
pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_AUTO_TEXT_GROUP)),
@@ -327,25 +281,17 @@ SwXAutoTextGroup::SwXAutoTextGroup(const OUString& rName,
sName(rName),
m_sGroupName(rName)
{
- DBG_ASSERT( -1 != rName.indexOf( GLOS_DELIM ),
+ OSL_ENSURE( -1 != rName.indexOf( GLOS_DELIM ),
"SwXAutoTextGroup::SwXAutoTextGroup: to be constructed with a complete name only!" );
}
-/*-- 21.12.98 12:42:24---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXAutoTextGroup::~SwXAutoTextGroup()
{
}
-/*-- 21.12.98 12:42:24---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-/*-- 21.12.98 12:42:25---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXAutoTextGroup::getTitles(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_uInt16 nCount = 0;
SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName, sal_False) : 0;
if(pGlosGroup && !pGlosGroup->GetError())
@@ -361,15 +307,13 @@ uno::Sequence< OUString > SwXAutoTextGroup::getTitles(void) throw( uno::RuntimeE
delete pGlosGroup;
return aEntryTitles;
}
-/*-- 21.12.98 12:42:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextGroup::renameByName(const OUString& aElementName,
const OUString& aNewElementName, const OUString& aNewElementTitle)
throw( lang::IllegalArgumentException, container::ElementExistException, io::IOException,
uno::RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// throw exception only if the programmatic name is to be changed into an existing name
if(aNewElementName != aElementName && hasByName(aNewElementName))
throw container::ElementExistException();
@@ -400,7 +344,7 @@ void SwXAutoTextGroup::renameByName(const OUString& aElementName,
sal_Bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTextRange* pxRange)
{
- ASSERT( pInsDoc, "kein Ins.Dokument" );
+ OSL_ENSURE( pInsDoc, "no InsDoc");
SwNodes& rNds = pInsDoc->GetNodes();
@@ -435,14 +379,12 @@ sal_Bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTextR
return bRet;
}
-/*-- 21.12.98 12:42:25---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const OUString& aName,
const OUString& aTitle, const uno::Reference< text::XTextRange > & xTextRange)
throw( container::ElementExistException, uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(hasByName(aName))
throw container::ElementExistException();
if(!xTextRange.is())
@@ -453,10 +395,6 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
String sLongName(aTitle);
if(pGlosGroup && !pGlosGroup->GetError())
{
- /*if( pGlosGroup->IsOld() && pGlosGroup->ConvertToNew())
- {
- throw uno::RuntimeException();
- } */
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
SwXTextRange* pxRange = 0;
OTextCursorHelper* pxCursor = 0;
@@ -515,17 +453,15 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
}
uno::Reference< text::XAutoTextEntry > xEntry = pGlossaries->GetAutoTextEntry( m_sGroupName, sName, sShortName, true );
- DBG_ASSERT( xEntry.is(), "SwXAutoTextGroup::insertNewByName: no UNO object created? How this?" );
+ OSL_ENSURE( xEntry.is(), "SwXAutoTextGroup::insertNewByName: no UNO object created? How this?" );
// we just inserted the entry into the group, so why doesn't it exist?
return xEntry;
}
-/*-- 21.12.98 12:42:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextGroup::removeByName(const OUString& aEntryName) throw( container::NoSuchElementException, uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName, sal_False) : 0;
if(pGlosGroup && !pGlosGroup->GetError())
{
@@ -537,20 +473,16 @@ void SwXAutoTextGroup::removeByName(const OUString& aEntryName) throw( container
else
throw container::NoSuchElementException();
}
-/*-- 21.12.98 12:42:25---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwXAutoTextGroup::getName(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return sName;
}
-/*-- 21.12.98 12:42:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextGroup::setName(const OUString& rName) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if( !pGlossaries )
throw uno::RuntimeException();
@@ -593,12 +525,10 @@ void SwXAutoTextGroup::setName(const OUString& rName) throw( uno::RuntimeExcepti
pGlossaries = pTempGlossaries;
}
}
-/*-- 21.12.98 12:42:26---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXAutoTextGroup::getCount(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
int nCount = 0;
SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName, sal_False) : 0;
if(pGlosGroup && !pGlosGroup->GetError())
@@ -608,13 +538,11 @@ sal_Int32 SwXAutoTextGroup::getCount(void) throw( uno::RuntimeException )
delete pGlosGroup;
return nCount;
}
-/*-- 21.12.98 12:42:26---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXAutoTextGroup::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
sal_uInt16 nCount = 0;
SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName, sal_False) : 0;
@@ -629,20 +557,16 @@ uno::Any SwXAutoTextGroup::getByIndex(sal_Int32 nIndex)
delete pGlosGroup;
return aRet;
}
-/*-- 21.12.98 12:42:26---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SwXAutoTextGroup::getElementType(void) throw( uno::RuntimeException )
{
return ::getCppuType((uno::Reference<text::XAutoTextEntry>*)0);
}
-/*-- 21.12.98 12:42:26---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXAutoTextGroup::hasElements(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName, sal_False) : 0;
sal_uInt16 nCount = 0;
if(pGlosGroup && !pGlosGroup->GetError())
@@ -653,25 +577,21 @@ sal_Bool SwXAutoTextGroup::hasElements(void) throw( uno::RuntimeException )
return nCount > 0;
}
-/*-- 21.12.98 12:42:27---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXAutoTextGroup::getByName(const OUString& _rName)
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XAutoTextEntry > xEntry = pGlossaries->GetAutoTextEntry( m_sGroupName, sName, _rName, true );
- DBG_ASSERT( xEntry.is(), "SwXAutoTextGroup::getByName: GetAutoTextEntry is fractious!" );
+ OSL_ENSURE( xEntry.is(), "SwXAutoTextGroup::getByName: GetAutoTextEntry is fractious!" );
// we told it to create the object, so why didn't it?
return makeAny( xEntry );
}
-/*-- 21.12.98 12:42:27---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< OUString > SwXAutoTextGroup::getElementNames(void)
throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_uInt16 nCount = 0;
SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName, sal_False) : 0;
if(pGlosGroup && !pGlosGroup->GetError())
@@ -687,13 +607,11 @@ uno::Sequence< OUString > SwXAutoTextGroup::getElementNames(void)
delete pGlosGroup;
return aEntryNames;
}
-/*-- 21.12.98 12:42:27---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXAutoTextGroup::hasByName(const OUString& rName)
throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
sal_uInt16 nCount = 0;
SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName, sal_False) : 0;
@@ -715,24 +633,19 @@ sal_Bool SwXAutoTextGroup::hasByName(const OUString& rName)
return bRet;
}
-/*-- 09.02.00 15:33:30---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXAutoTextGroup::getPropertySetInfo(void)
throw( uno::RuntimeException )
{
static uno::Reference< beans::XPropertySetInfo > xRet = pPropSet->getPropertySetInfo();
return xRet;
}
-/*-- 09.02.00 15:33:31---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextGroup::setPropertyValue(
const OUString& rPropertyName, const uno::Any& aValue)
throw( beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName );
if(!pEntry)
@@ -758,13 +671,11 @@ void SwXAutoTextGroup::setPropertyValue(
}
delete pGlosGroup;
}
-/*-- 09.02.00 15:33:31---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXAutoTextGroup::getPropertyValue(const OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName);
if(!pEntry)
@@ -786,64 +697,48 @@ uno::Any SwXAutoTextGroup::getPropertyValue(const OUString& rPropertyName)
delete pGlosGroup;
return aAny;
}
-/*-- 09.02.00 15:33:31---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextGroup::addPropertyChangeListener(
const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
}
-/*-- 09.02.00 15:33:31---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextGroup::removePropertyChangeListener(
const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
}
-/*-- 09.02.00 15:33:32---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextGroup::addVetoableChangeListener(
const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
}
-/*-- 09.02.00 15:33:32---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextGroup::removeVetoableChangeListener(
const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
}
-/*-- 21.12.98 12:42:27---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextGroup::Invalidate()
{
pGlossaries = 0;
sName = aEmptyStr;
m_sGroupName = aEmptyStr;
}
-/* -----------------------------06.04.00 11:11--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXAutoTextGroup::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXAutoTextGroup");
}
-/* -----------------------------06.04.00 11:11--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXAutoTextGroup::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.text.AutoTextGroup") == rServiceName;
}
-/* -----------------------------06.04.00 11:11--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXAutoTextGroup::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(1);
@@ -851,20 +746,13 @@ uno::Sequence< OUString > SwXAutoTextGroup::getSupportedServiceNames(void) throw
pArray[0] = C2U("com.sun.star.text.AutoTextGroup");
return aRet;
}
-/******************************************************************
- *
- ******************************************************************/
-/* -----------------------------10.03.00 18:02--------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXAutoTextEntry::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXAutoTextEntry::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -876,9 +764,7 @@ sal_Int64 SAL_CALL SwXAutoTextEntry::getSomething( const uno::Sequence< sal_Int8
}
return 0;
}
-/*-- 21.12.98 12:42:33---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXAutoTextEntry::SwXAutoTextEntry(SwGlossaries* pGlss, const String& rGroupName,
const String& rEntryName) :
pGlossaries(pGlss),
@@ -887,13 +773,11 @@ SwXAutoTextEntry::SwXAutoTextEntry(SwGlossaries* pGlss, const String& rGroupName
pBodyText ( NULL )
{
}
-/*-- 21.12.98 12:42:33---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXAutoTextEntry::~SwXAutoTextEntry()
{
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// ensure that any pending modifications are written
implFlushDocument( true );
@@ -905,9 +789,6 @@ SwXAutoTextEntry::~SwXAutoTextEntry()
}
}
-//---------------------------------------------------------------------
-//--- 03.03.2003 13:24:58 -----------------------------------------------
-
void SwXAutoTextEntry::implFlushDocument( bool _bCloseDoc )
{
if ( xDocSh.Is() )
@@ -926,9 +807,6 @@ void SwXAutoTextEntry::implFlushDocument( bool _bCloseDoc )
}
}
-//-----------------------------------------------------------------------
-//--- 03.03.2003 15:51:52 -----------------------------------------------
-
void SwXAutoTextEntry::Notify( SfxBroadcaster& _rBC, const SfxHint& _rHint )
{
if ( &_rBC == &xDocSh )
@@ -959,10 +837,10 @@ void SwXAutoTextEntry::Notify( SfxBroadcaster& _rBC, const SfxHint& _rHint )
void SwXAutoTextEntry::GetBodyText ()
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
xDocSh = pGlossaries->EditGroupDoc ( sGroupName, sEntryName, sal_False );
- DBG_ASSERT( xDocSh.Is(), "SwXAutoTextEntry::GetBodyText: unexpected: no doc returned by EditGroupDoc!" );
+ OSL_ENSURE( xDocSh.Is(), "SwXAutoTextEntry::GetBodyText: unexpected: no doc returned by EditGroupDoc!" );
// start listening at the document
StartListening( *&xDocSh );
@@ -973,114 +851,92 @@ void SwXAutoTextEntry::GetBodyText ()
uno::Reference< text::XTextCursor > SwXAutoTextEntry::createTextCursor(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
EnsureBodyText();
return pBodyText->createTextCursor();
}
-/*-- 21.12.98 12:42:34---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextCursor > SwXAutoTextEntry::createTextCursorByRange(
const uno::Reference< text::XTextRange > & aTextPosition) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
EnsureBodyText();
return pBodyText->createTextCursorByRange ( aTextPosition );
}
-/*-- 21.12.98 12:42:34---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextEntry::insertString(const uno::Reference< text::XTextRange > & xRange, const OUString& aString, sal_Bool bAbsorb) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
EnsureBodyText();
pBodyText->insertString ( xRange, aString, bAbsorb );
}
-/*-- 21.12.98 12:42:34---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextEntry::insertControlCharacter(const uno::Reference< text::XTextRange > & xRange,
sal_Int16 nControlCharacter, sal_Bool bAbsorb)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
EnsureBodyText();
pBodyText->insertControlCharacter ( xRange, nControlCharacter, bAbsorb );
}
-/*-- 21.12.98 12:42:34---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextEntry::insertTextContent(
const uno::Reference< text::XTextRange > & xRange,
const uno::Reference< text::XTextContent > & xContent, sal_Bool bAbsorb)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
EnsureBodyText();
pBodyText->insertTextContent ( xRange, xContent, bAbsorb );
}
-/*-- 21.12.98 12:42:34---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextEntry::removeTextContent(
const uno::Reference< text::XTextContent > & xContent)
throw( container::NoSuchElementException, uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
EnsureBodyText();
pBodyText->removeTextContent ( xContent );
}
-/*-- 21.12.98 12:42:35---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XText > SwXAutoTextEntry::getText(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XText > xRet = (text::XText*)this;
return xRet;
}
-/*-- 21.12.98 12:42:35---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SwXAutoTextEntry::getStart(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
EnsureBodyText();
return pBodyText->getStart();
}
-/*-- 21.12.98 12:42:36---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SwXAutoTextEntry::getEnd(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
EnsureBodyText();
return pBodyText->getEnd();
}
-/*-- 21.12.98 12:42:36---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwXAutoTextEntry::getString(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
EnsureBodyText();
return pBodyText->getString();
}
-/*-- 21.12.98 12:42:36---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXAutoTextEntry::setString(const OUString& aString) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
EnsureBodyText();
pBodyText->setString( aString );
}
-/* -----------------15.07.99 10:11-------------------
- --------------------------------------------------*/
void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextRange)throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// ensure that any pending modifications are written
// reason is that we're holding the _copy_ of the auto text, while the real auto text
@@ -1149,23 +1005,17 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR
if(!bResult)
throw uno::RuntimeException();
}
-/* -----------------------------06.04.00 11:11--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXAutoTextEntry::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXAutoTextEntry");
}
-/* -----------------------------06.04.00 11:11--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXAutoTextEntry::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.text.AutoTextEntry") == rServiceName;
}
-/* -----------------------------06.04.00 11:11--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< OUString > SwXAutoTextEntry::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< OUString > aRet(1);
@@ -1173,17 +1023,13 @@ uno::Sequence< OUString > SwXAutoTextEntry::getSupportedServiceNames(void) throw
pArray[0] = C2U("com.sun.star.text.AutoTextEntry");
return aRet;
}
-/* -----------------------------06.04.00 11:11--------------------------------
- ---------------------------------------------------------------------------*/
uno::Reference< container::XNameReplace > SwXAutoTextEntry::getEvents()
throw( uno::RuntimeException )
{
return new SwAutoTextEventDescriptor( *this );
}
-/* -----------------------------30.01.01 18:40--------------------------------
- ---------------------------------------------------------------------------*/
const struct SvEventDescription aAutotextEvents[] =
{
{ SW_EVENT_START_INS_GLOSSARY, "OnInsertStart" },
@@ -1191,9 +1037,6 @@ const struct SvEventDescription aAutotextEvents[] =
{ 0, NULL }
};
-/* -----------------------------30.01.01 18:40--------------------------------
-
- ---------------------------------------------------------------------------*/
SwAutoTextEventDescriptor::SwAutoTextEventDescriptor(
SwXAutoTextEntry& rAutoText ) :
SvBaseEventDescriptor(aAutotextEvents),
@@ -1202,23 +1045,17 @@ SwAutoTextEventDescriptor::SwAutoTextEventDescriptor(
rAutoTextEntry(rAutoText)
{
}
-/* -----------------------------30.01.01 18:40--------------------------------
- ---------------------------------------------------------------------------*/
SwAutoTextEventDescriptor::~SwAutoTextEventDescriptor()
{
}
-/* -----------------------------30.01.01 18:40--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwAutoTextEventDescriptor::getImplementationName()
throw( uno::RuntimeException )
{
return sSwAutoTextEventDescriptor;
}
-/* -----------------------------30.01.01 18:40--------------------------------
- ---------------------------------------------------------------------------*/
void SwAutoTextEventDescriptor::replaceByName(
const sal_uInt16 nEvent,
const SvxMacro& rMacro)
@@ -1228,16 +1065,16 @@ void SwAutoTextEventDescriptor::replaceByName(
lang::WrappedTargetException,
uno::RuntimeException)
{
- DBG_ASSERT( NULL != rAutoTextEntry.GetGlossaries(),
+ OSL_ENSURE( NULL != rAutoTextEntry.GetGlossaries(),
"Strangely enough, the AutoText vanished!" );
- DBG_ASSERT( (nEvent == SW_EVENT_END_INS_GLOSSARY) ||
+ OSL_ENSURE( (nEvent == SW_EVENT_END_INS_GLOSSARY) ||
(nEvent == SW_EVENT_START_INS_GLOSSARY) ,
"Unknown event ID" );
const SwGlossaries* pGlossaries = rAutoTextEntry.GetGlossaries();
SwTextBlocks* pBlocks =
pGlossaries->GetGroupDoc( rAutoTextEntry.GetGroupName() );
- DBG_ASSERT( NULL != pBlocks,
+ OSL_ENSURE( NULL != pBlocks,
"can't get autotext group; SwAutoTextEntry has illegal name?");
if( pBlocks && !pBlocks->GetError())
@@ -1258,9 +1095,7 @@ void SwAutoTextEventDescriptor::replaceByName(
}
// else: ignore
}
-/* -----------------------------30.01.01 18:40--------------------------------
- ---------------------------------------------------------------------------*/
void SwAutoTextEventDescriptor::getByName(
SvxMacro& rMacro,
const sal_uInt16 nEvent )
@@ -1269,15 +1104,15 @@ void SwAutoTextEventDescriptor::getByName(
lang::WrappedTargetException,
uno::RuntimeException)
{
- DBG_ASSERT( NULL != rAutoTextEntry.GetGlossaries(), "no AutoText" );
- DBG_ASSERT( (nEvent == SW_EVENT_END_INS_GLOSSARY) ||
+ OSL_ENSURE( NULL != rAutoTextEntry.GetGlossaries(), "no AutoText" );
+ OSL_ENSURE( (nEvent == SW_EVENT_END_INS_GLOSSARY) ||
(nEvent == SW_EVENT_START_INS_GLOSSARY) ,
"Unknown event ID" );
const SwGlossaries* pGlossaries = rAutoTextEntry.GetGlossaries();
SwTextBlocks* pBlocks =
pGlossaries->GetGroupDoc( rAutoTextEntry.GetGroupName() );
- DBG_ASSERT( NULL != pBlocks,
+ OSL_ENSURE( NULL != pBlocks,
"can't get autotext group; SwAutoTextEntry has illegal name?");
// return empty macro, unless macro is found
@@ -1306,3 +1141,4 @@ void SwAutoTextEventDescriptor::getByName(
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/unodefaults.cxx b/sw/source/ui/uno/unodefaults.cxx
index 87104a4fd4cb..e6d25ae50a7b 100644
--- a/sw/source/ui/uno/unodefaults.cxx
+++ b/sw/source/ui/uno/unodefaults.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,23 +35,16 @@
#include <svx/unoprov.hxx>
#include <doc.hxx>
-/* -----------------------------13.03.01 14:16--------------------------------
-
- ---------------------------------------------------------------------------*/
SwSvxUnoDrawPool::SwSvxUnoDrawPool( SwDoc* pDoc ) throw() :
SvxUnoDrawPool(pDoc->GetDrawModel(), SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER),
m_pDoc(pDoc)
{
}
-/* -----------------------------13.03.01 14:16--------------------------------
- ---------------------------------------------------------------------------*/
SwSvxUnoDrawPool::~SwSvxUnoDrawPool() throw()
{
}
-/* -----------------------------13.03.01 14:16--------------------------------
- ---------------------------------------------------------------------------*/
SfxItemPool* SwSvxUnoDrawPool::getModelPool( sal_Bool /*bReadOnly*/ ) throw()
{
if(m_pDoc)
@@ -68,5 +62,4 @@ SfxItemPool* SwSvxUnoDrawPool::getModelPool( sal_Bool /*bReadOnly*/ ) throw()
return 0;
}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/unodefaults.hxx b/sw/source/ui/uno/unodefaults.hxx
index eda851f1c8b5..2f61e566231a 100644
--- a/sw/source/ui/uno/unodefaults.hxx
+++ b/sw/source/ui/uno/unodefaults.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/unodispatch.cxx b/sw/source/ui/uno/unodispatch.cxx
index 7f0347ac8bf7..716696354680 100644
--- a/sw/source/ui/uno/unodispatch.cxx
+++ b/sw/source/ui/uno/unodispatch.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,8 +43,8 @@
using namespace ::com::sun::star;
-using namespace rtl;
-using namespace vos;
+
+using ::rtl::OUString;
const char* cURLStart = ".uno:DataSourceBrowser/";
const char* cURLFormLetter = ".uno:DataSourceBrowser/FormLetter";
@@ -51,9 +52,7 @@ const char* cURLInsertContent = ".uno:DataSourceBrowser/InsertContent";//data
const char* cURLInsertColumns = ".uno:DataSourceBrowser/InsertColumns";//data into text
const char* cURLDocumentDataSource = ".uno:DataSourceBrowser/DocumentDataSource";//current data source of the document
const sal_Char* cInternalDBChangeNotification = ".uno::Writer/DataSourceChanged";
-/*-- 07.11.00 13:25:51---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXDispatchProviderInterceptor::SwXDispatchProviderInterceptor(SwView& rVw) :
m_pView(&rVw)
{
@@ -71,15 +70,11 @@ SwXDispatchProviderInterceptor::SwXDispatchProviderInterceptor(SwView& rVw) :
m_refCount--;
}
}
-/*-- 07.11.00 13:25:51---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXDispatchProviderInterceptor::~SwXDispatchProviderInterceptor()
{
}
-/*-- 07.11.00 13:25:51---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< frame::XDispatch > SwXDispatchProviderInterceptor::queryDispatch(
const util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags )
throw(uno::RuntimeException)
@@ -106,9 +101,7 @@ uno::Reference< frame::XDispatch > SwXDispatchProviderInterceptor::queryDispatch
return xResult;
}
-/*-- 07.11.00 13:25:52---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Sequence< uno::Reference< frame::XDispatch > > SwXDispatchProviderInterceptor::queryDispatches(
const uno::Sequence< frame::DispatchDescriptor >& aDescripts ) throw(uno::RuntimeException)
{
@@ -123,45 +116,35 @@ uno::Sequence< uno::Reference< frame::XDispatch > > SwXDispatchProviderIntercept
}
return aReturn;
}
-/*-- 07.11.00 13:25:52---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< frame::XDispatchProvider > SwXDispatchProviderInterceptor::getSlaveDispatchProvider( )
throw(uno::RuntimeException)
{
DispatchMutexLock_Impl aLock(*this);
return m_xSlaveDispatcher;
}
-/*-- 07.11.00 13:25:52---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXDispatchProviderInterceptor::setSlaveDispatchProvider(
const uno::Reference< frame::XDispatchProvider >& xNewDispatchProvider ) throw(uno::RuntimeException)
{
DispatchMutexLock_Impl aLock(*this);
m_xSlaveDispatcher = xNewDispatchProvider;
}
-/*-- 07.11.00 13:25:52---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< frame::XDispatchProvider > SwXDispatchProviderInterceptor::getMasterDispatchProvider( )
throw(uno::RuntimeException)
{
DispatchMutexLock_Impl aLock(*this);
return m_xMasterDispatcher;
}
-/*-- 07.11.00 13:25:52---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXDispatchProviderInterceptor::setMasterDispatchProvider(
const uno::Reference< frame::XDispatchProvider >& xNewSupplier ) throw(uno::RuntimeException)
{
DispatchMutexLock_Impl aLock(*this);
m_xMasterDispatcher = xNewSupplier;
}
-/*-- 07.11.00 13:25:53---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXDispatchProviderInterceptor::disposing( const lang::EventObject& )
throw(uno::RuntimeException)
{
@@ -176,17 +159,13 @@ void SwXDispatchProviderInterceptor::disposing( const lang::EventObject& )
}
m_xIntercepted = NULL;
}
-/* -----------------------------01.10.2001 14:31------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXDispatchProviderInterceptor::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------01.10.2001 14:31------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SwXDispatchProviderInterceptor::getSomething(
const uno::Sequence< sal_Int8 >& aIdentifier )
throw(uno::RuntimeException)
@@ -199,9 +178,7 @@ sal_Int64 SwXDispatchProviderInterceptor::getSomething(
}
return 0;
}
-/* -----------------------------01.10.2001 14:32------------------------------
- ---------------------------------------------------------------------------*/
void SwXDispatchProviderInterceptor::Invalidate()
{
DispatchMutexLock_Impl aLock(*this);
@@ -216,18 +193,14 @@ void SwXDispatchProviderInterceptor::Invalidate()
m_xIntercepted = NULL;
m_pView = 0;
}
-/* -----------------------------07.11.00 14:26--------------------------------
- ---------------------------------------------------------------------------*/
SwXDispatch::SwXDispatch(SwView& rVw) :
m_pView(&rVw),
m_bOldEnable(sal_False),
m_bListenerAdded(sal_False)
{
}
-/*-- 07.11.00 14:26:13---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXDispatch::~SwXDispatch()
{
if(m_bListenerAdded && m_pView)
@@ -237,9 +210,7 @@ SwXDispatch::~SwXDispatch()
xSupplier->removeSelectionChangeListener(xThis);
}
}
-/*-- 07.11.00 14:26:13---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXDispatch::dispatch(
const util::URL& aURL, const uno::Sequence< beans::PropertyValue >& aArgs ) throw(uno::RuntimeException)
{
@@ -264,7 +235,6 @@ void SwXDispatch::dispatch(
FN_MAILMERGE_WIZARD,
SFX_CALLMODE_ASYNCHRON,
&aDBProperties, 0L);
-// pNewDBMgr->ExecuteFormLetter(rSh, aArgs);
}
else if(!aURL.Complete.compareToAscii(cURLDocumentDataSource))
{
@@ -300,9 +270,7 @@ void SwXDispatch::dispatch(
throw uno::RuntimeException();
}
-/*-- 07.11.00 14:26:13---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXDispatch::addStatusListener(
const uno::Reference< frame::XStatusListener >& xControl, const util::URL& aURL ) throw(uno::RuntimeException)
{
@@ -351,9 +319,7 @@ void SwXDispatch::addStatusListener(
m_bListenerAdded = sal_True;
}
}
-/*-- 07.11.00 14:26:15---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXDispatch::removeStatusListener(
const uno::Reference< frame::XStatusListener >& xControl, const util::URL& ) throw(uno::RuntimeException)
{
@@ -375,9 +341,7 @@ void SwXDispatch::removeStatusListener(
m_bListenerAdded = sal_False;
}
}
-/* -----------------------------07.03.01 10:27--------------------------------
- ---------------------------------------------------------------------------*/
void SwXDispatch::selectionChanged( const lang::EventObject& ) throw(uno::RuntimeException)
{
ShellModes eMode = m_pView->GetShellMode();
@@ -403,9 +367,7 @@ void SwXDispatch::selectionChanged( const lang::EventObject& ) throw(uno::Runti
}
}
}
-/* -----------------------------07.03.01 10:46--------------------------------
- ---------------------------------------------------------------------------*/
void SwXDispatch::disposing( const lang::EventObject& rSource ) throw(uno::RuntimeException)
{
uno::Reference<view::XSelectionSupplier> xSupplier(rSource.Source, uno::UNO_QUERY);
@@ -423,26 +385,20 @@ void SwXDispatch::disposing( const lang::EventObject& rSource ) throw(uno::Runti
}
m_pView = 0;
}
-/* -----------------------------12.07.01 13:30--------------------------------
- ---------------------------------------------------------------------------*/
const sal_Char* SwXDispatch::GetDBChangeURL()
{
return cInternalDBChangeNotification;
}
-/* -----------------------------09.09.2002 08:48------------------------------
- ---------------------------------------------------------------------------*/
SwXDispatchProviderInterceptor::DispatchMutexLock_Impl::DispatchMutexLock_Impl(
SwXDispatchProviderInterceptor& ) :
-// aGuard(rInterceptor.m_aMutex) #102295# solar mutex has to be used currently
aGuard(Application::GetSolarMutex())
{
}
-/* -----------------------------09.09.2002 08:48------------------------------
- ---------------------------------------------------------------------------*/
SwXDispatchProviderInterceptor::DispatchMutexLock_Impl::~DispatchMutexLock_Impl()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/unodoc.cxx b/sw/source/ui/uno/unodoc.cxx
index 3558b5391a06..30b8c0d79e87 100644
--- a/sw/source/ui/uno/unodoc.cxx
+++ b/sw/source/ui/uno/unodoc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,7 @@
#include "docsh.hxx"
#include "globdoc.hxx"
#include "wdocsh.hxx"
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
@@ -64,7 +65,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwTextDocument_createInstance(
const uno::Reference< lang::XMultiServiceFactory >&, const sal_uInt64 _nCreationFlags )
throw( uno::Exception )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
SwDLL::Init();
SfxObjectShell* pShell = new SwDocShell( _nCreationFlags );
return uno::Reference< uno::XInterface >( pShell->GetModel() );
@@ -93,7 +94,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwWebDocument_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & )
throw( uno::Exception )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
SwDLL::Init();
SfxObjectShell* pShell = new SwWebDocShell( SFX_CREATE_MODE_STANDARD );
return uno::Reference< uno::XInterface >( pShell->GetModel() );
@@ -120,9 +121,10 @@ uno::Reference< uno::XInterface > SAL_CALL SwGlobalDocument_createInstance(
const uno::Reference< lang::XMultiServiceFactory > &)
throw( uno::Exception )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
SwDLL::Init();
SfxObjectShell* pShell = new SwGlobalDocShell( SFX_CREATE_MODE_STANDARD );
return uno::Reference< uno::XInterface >( pShell->GetModel() );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/unofreg.cxx b/sw/source/ui/uno/unofreg.cxx
index a76aaa3cd0e5..d74485f7ab42 100644
--- a/sw/source/ui/uno/unofreg.cxx
+++ b/sw/source/ui/uno/unofreg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,10 +39,11 @@
#define INCLUDED_STRING_H
#endif
-using namespace rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
+using ::rtl::OUString;
+
// module
extern uno::Sequence< OUString > SAL_CALL SwUnoModule_getSupportedServiceNames() throw();
extern OUString SAL_CALL SwUnoModule_getImplementationName() throw();
@@ -381,3 +383,5 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
#ifdef __cplusplus
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index 1c4a838ae1ca..75637d39fe88 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,6 @@
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
#include <osl/mutex.hxx>
#include <svl/itemprop.hxx>
#include <svl/urihelper.hxx>
@@ -54,9 +54,7 @@
#include <com/sun/star/sdbc/XRowSet.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/util/XCloseable.hpp>
-#ifndef _COM_SUN_STAR_UTIL_CloseVetoException_HPP_
#include <com/sun/star/util/CloseVetoException.hpp>
-#endif
#include <com/sun/star/sdbcx/XRowLocate.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include "com/sun/star/mail/XSmtpService.hpp"
@@ -70,9 +68,7 @@
#include <unomap.hxx>
#include <swunohelper.hxx>
#include <docsh.hxx>
-#ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED
#include <IDocumentDeviceAccess.hxx>
-#endif
#include <view.hxx>
#include <dbmgr.hxx>
#include <unotxdoc.hxx>
@@ -264,12 +260,12 @@ namespace
acquire();
}
else {
- DBG_ERROR( "DelayedFileDeletion::DelayedFileDeletion: model is no component!" );
+ OSL_ENSURE(false, "DelayedFileDeletion::DelayedFileDeletion: model is no component!" );
}
}
catch( const Exception& )
{
- DBG_ERROR( "DelayedFileDeletion::DelayedFileDeletion: could not register as event listener at the model!" );
+ OSL_ENSURE(false, "DelayedFileDeletion::DelayedFileDeletion: could not register as event listener at the model!" );
}
osl_decrementInterlockedCount( &m_refCount );
}
@@ -302,7 +298,7 @@ namespace
}
catch( const Exception& )
{
- DBG_ERROR( "DelayedFileDeletion::OnTryDeleteFile: caught a strange exception!" );
+ OSL_ENSURE(false, "DelayedFileDeletion::OnTryDeleteFile: caught a strange exception!" );
bSuccess = sal_True;
// can't do anything here ...
}
@@ -326,7 +322,7 @@ namespace
}
catch( const Exception & )
{
- DBG_ERROR( "DelayedFileDeletion::implTakeOwnership: could not revoke the listener!" );
+ OSL_ENSURE(false, "DelayedFileDeletion::implTakeOwnership: could not revoke the listener!" );
}
m_aDeleteTimer.SetTimeout( 3000 ); // 3 seconds
@@ -350,7 +346,7 @@ namespace
//--------------------------------------------------------------------
void SAL_CALL DelayedFileDeletion::notifyClosing( const EventObject& ) throw (RuntimeException)
{
- DBG_ERROR( "DelayedFileDeletion::notifyClosing: how this?" );
+ OSL_ENSURE(false, "DelayedFileDeletion::notifyClosing: how this?" );
// this should not happen:
// Either, a foreign instance closes the document, then we should veto this, and take the ownership
// Or, we ourself close the document, then we should not be a listener anymore
@@ -359,7 +355,7 @@ namespace
//------------------------------------------------------
void SAL_CALL DelayedFileDeletion::disposing( const EventObject& ) throw (RuntimeException)
{
- DBG_ERROR( "DelayedFileDeletion::disposing: how this?" );
+ OSL_ENSURE(false, "DelayedFileDeletion::disposing: how this?" );
// this should not happen:
// Either, a foreign instance closes the document, then we should veto this, and take the ownership
// Or, we ourself close the document, then we should not be a listener anymore
@@ -452,7 +448,7 @@ SwXMailMerge::~SwXMailMerge()
//! because there is no automatism that will do that later.
//! #120086#
if ( eVetoed == CloseModelAndDocSh( xModel, xDocSh ) )
- DBG_WARNING( "owner ship transfered to vetoing object!" );
+ OSL_ENSURE(false, "owner ship transfered to vetoing object!" );
xModel = 0;
xDocSh = 0; // destroy doc shell
@@ -463,7 +459,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
const uno::Sequence< beans::NamedValue >& rArguments )
throw (IllegalArgumentException, Exception, RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
//
// get property values to be used
@@ -643,7 +639,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
{
if (!aCurDataSourceName.getLength() || !aCurDataCommand.getLength() )
{
- DBG_ERROR("PropertyValues missing or unset");
+ OSL_ENSURE(false, "PropertyValues missing or unset");
throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Either the ResultSet or DataSourceName and DataCommand must be set." ) ), static_cast < cppu::OWeakObject * > ( this ), 0 );
}
@@ -657,7 +653,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
C2U( "com.sun.star.sdb.RowSet" ));
aRowSetDisposeHelper.reset( xInstance, SharedComponent::TakeOwnership );
Reference< XPropertySet > xRowSetPropSet( xInstance, UNO_QUERY );
- DBG_ASSERT( xRowSetPropSet.is(), "failed to get XPropertySet interface from RowSet" );
+ OSL_ENSURE( xRowSetPropSet.is(), "failed to get XPropertySet interface from RowSet" );
if (xRowSetPropSet.is())
{
if (xCurConnection.is())
@@ -675,7 +671,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
if( !xCurConnection.is() )
xCurConnection.set( xRowSetPropSet->getPropertyValue( C2U( "ActiveConnection" )), UNO_QUERY );
xCurResultSet = Reference< sdbc::XResultSet >( xRowSet, UNO_QUERY );
- DBG_ASSERT( xCurResultSet.is(), "failed to build ResultSet" );
+ OSL_ENSURE( xCurResultSet.is(), "failed to build ResultSet" );
}
}
}
@@ -704,7 +700,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
SwNewDBMgr* pMgr = rSh.GetNewDBMgr();
//force layout creation
rSh.CalcLayout();
- DBG_ASSERT( pMgr, "database manager missing" );
+ OSL_ENSURE( pMgr, "database manager missing" );
SwMergeDescriptor aMergeDesc( nMergeType, rSh, aDescriptor );
@@ -736,7 +732,6 @@ uno::Any SAL_CALL SwXMailMerge::execute(
aCurFileNamePrefix = aURLObj.GetBase(); // filename without extension
if (!aCurOutputURL.getLength())
{
- //aCurOutputURL = aURLObj.GetURLPath();
aURLObj.removeSegment();
aCurOutputURL = aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
}
@@ -769,7 +764,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
aMergeDesc.aSaveToFilterData = aSaveFilterData;
aMergeDesc.bCreateSingleFile = bSaveAsSingleFile;
}
- else /*if(MailMergeType::MAIL == nCurOutputType)*/
+ else
{
pMgr->SetEMailColumn( sAddressFromColumn );
if(!sAddressFromColumn.getLength())
@@ -823,7 +818,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
pMgr->SetMergeSilent( sal_True ); // suppress dialogs, message boxes, etc.
const SwXMailMerge *pOldSrc = pMgr->GetMailMergeEvtSrc();
- DBG_ASSERT( !pOldSrc || pOldSrc == this, "Ooops... different event source already set." );
+ OSL_ENSURE( !pOldSrc || pOldSrc == this, "Ooops... different event source already set." );
pMgr->SetMailMergeEvtSrc( this ); // launch events for listeners
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), xCurDocSh));
@@ -882,7 +877,7 @@ void SwXMailMerge::launchEvent( const PropertyChangeEvent &rEvt ) const
uno::Reference< beans::XPropertySetInfo > SAL_CALL SwXMailMerge::getPropertySetInfo( )
throw (RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
static Reference< XPropertySetInfo > aRef = pPropSet->getPropertySetInfo();
return aRef;
}
@@ -891,7 +886,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
const OUString& rPropertyName, const uno::Any& rValue )
throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const SfxItemPropertySimpleEntry* pCur = pPropSet->getPropertyMap()->getByName( rPropertyName );
if (!pCur)
@@ -936,7 +931,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
case WID_IN_SERVER_PASSWORD: pData = &sInServerPassword; break;
case WID_OUT_SERVER_PASSWORD: pData = &sOutServerPassword; break;
default :
- DBG_ERROR("unknown WID");
+ OSL_ENSURE(false, "unknown WID");
}
Any aOld( pData, *pType );
@@ -1025,9 +1020,9 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
else if(pData == &sOutServerPassword)
bOK = rValue >>= sInServerPassword;
else {
- DBG_ERROR( "invalid pointer" );
+ OSL_ENSURE(false, "invalid pointer" );
}
- DBG_ASSERT( bOK, "set value failed" );
+ OSL_ENSURE( bOK, "set value failed" );
bChanged = sal_True;
}
if (!bOK)
@@ -1046,7 +1041,7 @@ uno::Any SAL_CALL SwXMailMerge::getPropertyValue(
const OUString& rPropertyName )
throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
Any aRet;
@@ -1089,7 +1084,7 @@ uno::Any SAL_CALL SwXMailMerge::getPropertyValue(
case WID_IN_SERVER_PASSWORD: aRet <<= sInServerPassword; break;
case WID_OUT_SERVER_PASSWORD: aRet <<= sOutServerPassword; break;
default :
- DBG_ERROR("unknown WID");
+ OSL_ENSURE(false, "unknown WID");
}
}
@@ -1101,7 +1096,7 @@ void SAL_CALL SwXMailMerge::addPropertyChangeListener(
const uno::Reference< beans::XPropertyChangeListener >& rListener )
throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (!bDisposing && rListener.is())
{
const SfxItemPropertySimpleEntry* pCur = pPropSet->getPropertyMap()->getByName( rPropertyName );
@@ -1117,7 +1112,7 @@ void SAL_CALL SwXMailMerge::removePropertyChangeListener(
const uno::Reference< beans::XPropertyChangeListener >& rListener )
throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (!bDisposing && rListener.is())
{
const SfxItemPropertySimpleEntry* pCur = pPropSet->getPropertyMap()->getByName( rPropertyName );
@@ -1134,7 +1129,7 @@ void SAL_CALL SwXMailMerge::addVetoableChangeListener(
throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
// no vetoable property, thus no support for vetoable change listeners
- DBG_WARNING( "not implemented");
+ OSL_ENSURE(false, "not implemented");
}
void SAL_CALL SwXMailMerge::removeVetoableChangeListener(
@@ -1143,14 +1138,14 @@ void SAL_CALL SwXMailMerge::removeVetoableChangeListener(
throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
// no vetoable property, thus no support for vetoable change listeners
- DBG_WARNING( "not implemented");
+ OSL_ENSURE(false,"not implemented");
}
void SAL_CALL SwXMailMerge::dispose()
throw(RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (!bDisposing)
{
@@ -1167,7 +1162,7 @@ void SAL_CALL SwXMailMerge::addEventListener(
const Reference< XEventListener >& rxListener )
throw(RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (!bDisposing && rxListener.is())
aEvtListeners.addInterface( rxListener );
}
@@ -1176,7 +1171,7 @@ void SAL_CALL SwXMailMerge::removeEventListener(
const Reference< XEventListener >& rxListener )
throw(RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (!bDisposing && rxListener.is())
aEvtListeners.removeInterface( rxListener );
}
@@ -1185,7 +1180,7 @@ void SAL_CALL SwXMailMerge::addMailMergeEventListener(
const uno::Reference< XMailMergeListener >& rxListener )
throw (RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (!bDisposing && rxListener.is())
aMergeListeners.addInterface( rxListener );
}
@@ -1194,7 +1189,7 @@ void SAL_CALL SwXMailMerge::removeMailMergeEventListener(
const uno::Reference< XMailMergeListener >& rxListener )
throw (RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if (!bDisposing && rxListener.is())
aMergeListeners.removeInterface( rxListener );
}
@@ -1202,14 +1197,14 @@ void SAL_CALL SwXMailMerge::removeMailMergeEventListener(
OUString SAL_CALL SwXMailMerge::getImplementationName()
throw(RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return SwXMailMerge_getImplementationName();
}
sal_Bool SAL_CALL SwXMailMerge::supportsService( const OUString& rServiceName )
throw(RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return C2U( SN_MAIL_MERGE ) == rServiceName ||
C2U( SN_DATA_ACCESS_DESCRIPTOR ) == rServiceName;
}
@@ -1217,7 +1212,7 @@ sal_Bool SAL_CALL SwXMailMerge::supportsService( const OUString& rServiceName )
uno::Sequence< OUString > SAL_CALL SwXMailMerge::getSupportedServiceNames()
throw(RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return SwXMailMerge_getSupportedServiceNames();
}
@@ -1243,7 +1238,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMailMerge_createInstance(
const uno::Reference< XMultiServiceFactory > & /*rSMgr*/)
throw( uno::Exception )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
//the module may not be loaded
SwDLL::Init();
@@ -1251,3 +1246,4 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMailMerge_createInstance(
return xRef;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx
index c19587f514f2..a478dbd00f4d 100644
--- a/sw/source/ui/uno/unomod.cxx
+++ b/sw/source/ui/uno/unomod.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <swtypes.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <unomod.hxx>
#include <unomid.h>
#include <unoprnms.hxx>
@@ -42,7 +43,7 @@
#include <docsh.hxx>
#include <wrtsh.hxx>
#include <viewopt.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <com/sun/star/text/NotePrintMode.hpp>
#include <doc.hxx>
@@ -53,7 +54,6 @@
#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;
@@ -106,6 +106,7 @@ enum SwViewSettingsPropertyHandles
HANDLE_VIEWSET_HORI_RULER_METRIC,
HANDLE_VIEWSET_VERT_RULER_METRIC
};
+
enum SwPrintSettingsPropertyHandles
{
HANDLE_PRINTSET_ANNOTATION_MODE,
@@ -177,6 +178,7 @@ static ChainablePropertySetInfo * lcl_createViewSettingsInfo()
};
return new ChainablePropertySetInfo ( aViewSettingsMap_Impl );
}
+
static ChainablePropertySetInfo * lcl_createPrintSettingsInfo()
{
static PropertyInfo aPrintSettingsMap_Impl[] =
@@ -207,85 +209,66 @@ static ChainablePropertySetInfo * lcl_createPrintSettingsInfo()
/******************************************************************
* SwXModule
******************************************************************/
-/* -----------------30.03.99 15:10-------------------
- *
- * --------------------------------------------------*/
Reference< uno::XInterface > SAL_CALL SwXModule_createInstance(
const Reference< XMultiServiceFactory > & /*rSMgr*/) throw( Exception )
{
static Reference< uno::XInterface > xModule = (cppu::OWeakObject*)new SwXModule();;
return xModule;
}
-/* -----------------------------17.04.01 13:11--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SAL_CALL SwXModule_getSupportedServiceNames() throw()
{
OUString sService( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.GlobalSettings"));
const Sequence< OUString > aSeq( &sService, 1 );
return aSeq;
}
-/* -----------------------------17.04.01 13:11--------------------------------
- ---------------------------------------------------------------------------*/
OUString SAL_CALL SwXModule_getImplementationName() throw()
{
return OUString( RTL_CONSTASCII_USTRINGPARAM("SwXModule" ) );
}
-/*-- 17.12.98 12:19:01---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXModule::SwXModule() :
pxViewSettings(0),
pxPrintSettings(0)
{
}
-/*-- 17.12.98 12:19:02---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXModule::~SwXModule()
{
delete pxViewSettings;
delete pxPrintSettings;
}
-/*-- 17.12.98 12:19:03---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XPropertySet > SwXModule::getViewSettings(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pxViewSettings)
{
((SwXModule*)this)->pxViewSettings = new Reference< XPropertySet > ;
- DBG_ERROR("Web oder Text?");
+ OSL_ENSURE(false, "Web or Text?");
*pxViewSettings = static_cast < HelperBaseNoState * > ( new SwXViewSettings( sal_False, 0 ) );
}
return *pxViewSettings;
}
-/*-- 17.12.98 12:19:03---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XPropertySet > SwXModule::getPrintSettings(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pxPrintSettings)
{
((SwXModule*)this)->pxPrintSettings = new Reference< XPropertySet > ;
- DBG_ERROR("Web oder Text?");
+ OSL_ENSURE(false, "Web or Text?");
*pxPrintSettings = static_cast < HelperBaseNoState * > ( new SwXPrintSettings ( PRINT_SETTINGS_MODULE ) );
}
return *pxPrintSettings;
}
-/* -----------------------------06.04.00 10:59--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXModule::getImplementationName(void) throw( RuntimeException )
{
return SwXModule_getImplementationName();
}
-/* -----------------------------06.04.00 10:59--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXModule::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
const Sequence< OUString > aNames = SwXModule_getSupportedServiceNames();
@@ -296,9 +279,7 @@ sal_Bool SwXModule::supportsService(const OUString& rServiceName) throw( Runtime
}
return sal_False;
}
-/* -----------------------------06.04.00 10:59--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXModule::getSupportedServiceNames(void) throw( RuntimeException )
{
return SwXModule_getSupportedServiceNames();
@@ -307,9 +288,6 @@ Sequence< OUString > SwXModule::getSupportedServiceNames(void) throw( RuntimeExc
/******************************************************************
* SwXPrintSettings
******************************************************************/
-/*-- 17.12.98 12:54:04---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXPrintSettings::SwXPrintSettings(SwXPrintSettingsType eType, SwDoc* pDoc)
: ChainableHelperNoState ( lcl_createPrintSettingsInfo (), &Application::GetSolarMutex() )
, meType(eType)
@@ -317,9 +295,7 @@ SwXPrintSettings::SwXPrintSettings(SwXPrintSettingsType eType, SwDoc* pDoc)
, mpDoc ( pDoc )
{
}
-/*-- 17.12.98 12:54:05---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXPrintSettings::~SwXPrintSettings()
throw()
{
@@ -475,6 +451,7 @@ void SwXPrintSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo,
throw UnknownPropertyException();
}
}
+
void SwXPrintSettings::_postSetValues ()
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
{
@@ -501,6 +478,7 @@ void SwXPrintSettings::_preGetValues ()
break;
}
}
+
void SwXPrintSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue )
throw(UnknownPropertyException, WrappedTargetException )
{
@@ -574,28 +552,23 @@ void SwXPrintSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo,
throw UnknownPropertyException();
}
}
+
void SwXPrintSettings::_postGetValues ()
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
{
mpPrtOpt = NULL;
}
-/* -----------------------------06.04.00 11:02--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXPrintSettings::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXPrintSettings");
}
-/* -----------------------------06.04.00 11:02--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXPrintSettings::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.PrintSettings") == rServiceName;
}
-/* -----------------------------06.04.00 11:02--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXPrintSettings::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
@@ -604,13 +577,6 @@ Sequence< OUString > SwXPrintSettings::getSupportedServiceNames(void) throw( Run
return aRet;
}
-
-/******************************************************************
- *
- ******************************************************************/
-/*-- 18.12.98 11:01:10---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXViewSettings::SwXViewSettings(sal_Bool bWebView, SwView* pVw)
: ChainableHelperNoState( lcl_createViewSettingsInfo (), &Application::GetSolarMutex() )
, pView(pVw)
@@ -628,14 +594,13 @@ SwXViewSettings::SwXViewSettings(sal_Bool bWebView, SwView* pVw)
mpInfo->remove ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "HelpURL" ) ) );
}
-/*-- 18.12.98 11:01:10---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXViewSettings::~SwXViewSettings()
throw()
{
}
+
void SwXViewSettings::_preSetValues ()
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
{
@@ -654,6 +619,7 @@ void SwXViewSettings::_preSetValues ()
if(pView)
mpViewOption->SetStarOneSetting(sal_True);
}
+
void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, const uno::Any &rValue )
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
{
@@ -763,8 +729,8 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
break;
default:
throw IllegalArgumentException(
- ::rtl::OUString::createFromAscii(
- "SwXViewSettings: invalid zoom type"), 0, 0);
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "SwXViewSettings: invalid zoom type")), 0, 0);
break;
}
if(eZoom < USHRT_MAX)
@@ -875,6 +841,7 @@ void SwXViewSettings::_preGetValues ()
else
mpConstViewOption = SW_MOD()->GetViewOption(bWeb);
}
+
void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue )
throw(UnknownPropertyException, WrappedTargetException )
{
@@ -1012,11 +979,12 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u
bBool = sal_False;
}
break;
- default: DBG_ERROR("Diese Id gibt's nicht!");
+ default: OSL_ENSURE(false, "there is no such ID!");
}
if( bBool )
rValue.setValue(&bBoolVal, ::getBooleanCppuType());
}
+
void SwXViewSettings::_postGetValues ()
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
{
@@ -1041,3 +1009,4 @@ Sequence< OUString > SwXViewSettings::getSupportedServiceNames(void) throw( Runt
return aRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/unomodule.cxx b/sw/source/ui/uno/unomodule.cxx
index 85ef0f10c1d7..91a3d07098e9 100644
--- a/sw/source/ui/uno/unomodule.cxx
+++ b/sw/source/ui/uno/unomodule.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,7 +38,7 @@
#include <sfx2/objface.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
@@ -57,7 +58,7 @@ uno::Sequence< rtl::OUString > SAL_CALL SwUnoModule_getSupportedServiceNames() t
uno::Reference< uno::XInterface > SAL_CALL SwUnoModule_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return uno::Reference< uno::XInterface >( dynamic_cast< frame::XDispatch * >(new SwUnoModule( rSMgr )), uno::UNO_QUERY );
}
@@ -69,7 +70,7 @@ void SAL_CALL SwUnoModule::dispatchWithNotification( const util::URL& aURL, cons
// asynchronous ...
uno::Reference< uno::XInterface > xThis(static_cast< frame::XNotifyingDispatch* >(this));
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
SwDLL::Init();
const SfxSlot* pSlot = SW_MOD()->GetInterface()->GetSlot( aURL.Complete );
@@ -136,7 +137,7 @@ REFERENCE< XDISPATCH > SAL_CALL SwUnoModule::queryDispatch(
{
REFERENCE< XDISPATCH > xReturn;
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
SwDLL::Init();
const SfxSlot* pSlot = SW_MOD()->GetInterface()->GetSlot( aURL.Complete );
if ( pSlot )
@@ -170,3 +171,4 @@ uno::Sequence< ::rtl::OUString > SAL_CALL SwUnoModule::getSupportedServiceNames(
return SwUnoModule_getSupportedServiceNames();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/unomodule.hxx b/sw/source/ui/uno/unomodule.hxx
index 0fc02fc21562..84a2b54d6704 100644
--- a/sw/source/ui/uno/unomodule.hxx
+++ b/sw/source/ui/uno/unomodule.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96,3 +97,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 35f3c0e8e172..e7f0022ad93e 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/image.hxx>
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
@@ -42,9 +43,7 @@
#include <swtypes.hxx>
#include <wdocsh.hxx>
#include <wrtsh.hxx>
-#include <view.hxx>
#include <pview.hxx>
-#include <srcview.hxx>
#include <viewsh.hxx>
#include <pvprtdat.hxx>
#include <printdata.hxx>
@@ -77,7 +76,6 @@
#include <globdoc.hxx>
#include <viewopt.hxx>
#include <unochart.hxx>
-#include <doc.hxx>
#include <charatr.hxx>
#include <svx/xmleohlp.hxx>
#include <globals.hrc>
@@ -115,17 +113,12 @@
#include <osl/file.hxx>
#include <comphelper/storagehelper.hxx>
-
// --> FME 2004-06-08 #i12836# enhanced pdf export
#include <EnhancedPDFExportHelper.hxx>
// <--
#include <numrule.hxx>
-///////////////////////////Modified on Jun. 14th//////////////////////////
-///////////////////////for getDocumentLanguages///////////////////////////
-//-->
#include <editeng/langitem.hxx>
-#include <doc.hxx>
#include <docary.hxx> //SwCharFmts
#include <i18npool/mslangid.hxx>
@@ -140,7 +133,6 @@
#include <view.hxx>
#include <srcview.hxx>
-//#include <com/sun/star/i18n/ScriptType.hpp>
#include <svtools/langtab.hxx>
#include <map>
#include <set>
@@ -152,8 +144,6 @@
#include <svl/languageoptions.hxx>
#include <svx/svdview.hxx>
-//
-//<--
using namespace ::com::sun::star;
using namespace ::com::sun::star::text;
using namespace ::com::sun::star::i18n;
@@ -166,9 +156,6 @@ using namespace ::com::sun::star::i18n;
using ::rtl::OUString;
using ::osl::FileBase;
-/* -----------------------------17.01.01 15:43--------------------------------
-
- ---------------------------------------------------------------------------*/
#define SW_CREATE_DASH_TABLE 0x01
#define SW_CREATE_GRADIENT_TABLE 0x02
#define SW_CREATE_HATCH_TABLE 0x03
@@ -177,6 +164,7 @@ using ::osl::FileBase;
#define SW_CREATE_MARKER_TABLE 0x06
#define SW_CREATE_DRAW_DEFAULTS 0x07
+#include <comphelper/processfactory.hxx>
/******************************************************************************
*
@@ -203,9 +191,6 @@ SwPrintUIOptions * lcl_GetPrintUIOptions(
return new SwPrintUIOptions( bWebDoc, bSwSrcView, bHasSelection, bHasPostIts, rPrintData );
}
-////////////////////////////////////////////////////////////
-
-
SwTxtFmtColl *lcl_GetParaStyle(const String& rCollName, SwDoc* pDoc)
{
SwTxtFmtColl* pColl = pDoc->FindTxtFmtCollByName( rCollName );
@@ -217,6 +202,7 @@ SwTxtFmtColl *lcl_GetParaStyle(const String& rCollName, SwDoc* pDoc)
}
return pColl;
}
+
void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell )
{
// check if the view frame still exists
@@ -234,17 +220,13 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell )
sal_False );
}
}
-/* -----------------------------10.03.00 18:02--------------------------------
- ---------------------------------------------------------------------------*/
const Sequence< sal_Int8 > & SwXTextDocument::getUnoTunnelId()
{
static Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXTextDocument::getSomething( const Sequence< sal_Int8 >& rId )
throw(RuntimeException)
{
@@ -254,6 +236,12 @@ sal_Int64 SAL_CALL SwXTextDocument::getSomething( const Sequence< sal_Int8 >& rI
{
return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this ));
}
+ if( rId.getLength() == 16
+ && 0 == rtl_compareMemory( SfxObjectShell::getUnoTunnelId().getConstArray(),
+ rId.getConstArray(), 16 ) )
+ {
+ return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(pDocShell ));
+ }
sal_Int64 nRet = SfxBaseModel::getSomething( rId );
if ( nRet )
@@ -270,9 +258,7 @@ sal_Int64 SAL_CALL SwXTextDocument::getSomething( const Sequence< sal_Int8 >& rI
return SfxBaseModel::getSomething( rId );
}
-/* -----------------------------16.03.00 14:12--------------------------------
- ---------------------------------------------------------------------------*/
Any SAL_CALL SwXTextDocument::queryInterface( const uno::Type& rType ) throw(RuntimeException)
{
Any aRet = SwXTextDocumentBaseClass::queryInterface(rType);
@@ -300,30 +286,22 @@ Any SAL_CALL SwXTextDocument::queryInterface( const uno::Type& rType ) throw(Run
}
return aRet;
}
-/* -----------------------------16.03.00 14:12--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextDocument::acquire()throw()
{
SfxBaseModel::acquire();
}
-/* -----------------------------16.03.00 14:12--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextDocument::release()throw()
{
SfxBaseModel::release();
}
-/* -----------------------------07.12.00 11:37--------------------------------
- ---------------------------------------------------------------------------*/
Reference< XAdapter > SwXTextDocument::queryAdapter( ) throw(RuntimeException)
{
return SfxBaseModel::queryAdapter();
}
-/* -----------------------------16.03.00 14:12--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< uno::Type > SAL_CALL SwXTextDocument::getTypes() throw(RuntimeException)
{
Sequence< uno::Type > aBaseTypes = SfxBaseModel::getTypes();
@@ -359,9 +337,7 @@ Sequence< uno::Type > SAL_CALL SwXTextDocument::getTypes() throw(RuntimeExceptio
pBaseTypes[nIndex++] = ::getCppuType((Reference<lang::XMultiServiceFactory>*)0);
return aBaseTypes;
}
-/*-- 18.12.98 11:52:59---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextDocument::SwXTextDocument(SwDocShell* pShell) :
SfxBaseModel(pShell),
@@ -402,10 +378,11 @@ SwXTextDocument::SwXTextDocument(SwDocShell* pShell) :
m_pPrintUIOptions( NULL ),
m_pRenderData( NULL )
{
+ uno::Reference< document::XDocumentProperties > xWriterProps( ::comphelper::getProcessServiceFactory()->createInstance( DEFINE_CONST_UNICODE("com.sun.star.writer.DocumentProperties") ), uno::UNO_QUERY_THROW);
+
+ SfxBaseModel::setDocumentProperties( xWriterProps );
}
-/*-- 18.12.98 11:53:00---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextDocument::~SwXTextDocument()
{
InitNewDoc();
@@ -419,13 +396,6 @@ SwXTextDocument::~SwXTextDocument()
delete m_pRenderData;
}
-
-/*-- 18.12.98 11:55:08---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-/* -----------------18.12.98 12:49-------------------
- *
- * --------------------------------------------------*/
SwXDocumentPropertyHelper * SwXTextDocument::GetPropertyHelper ()
{
if(!xPropertyHelper.is())
@@ -435,6 +405,7 @@ SwXDocumentPropertyHelper * SwXTextDocument::GetPropertyHelper ()
}
return pPropertyHelper;
}
+
void SwXTextDocument::GetNumberFormatter()
{
if(IsValid())
@@ -463,18 +434,16 @@ void SwXTextDocument::GetNumberFormatter()
xNumTunnel->getSomething(SvNumberFormatsSupplierObj::getUnoTunnelId()));
}
- DBG_ASSERT(pNumFmt, "No number formatter available");
+ OSL_ENSURE(pNumFmt, "No number formatter available");
if(!pNumFmt->GetNumberFormatter())
pNumFmt->SetNumberFormatter(pDocShell->GetDoc()->GetNumberFormatter( sal_True ));
}
}
}
-/*-- 18.12.98 11:55:11---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XText > SwXTextDocument::getText(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!xBodyText.is())
@@ -484,21 +453,17 @@ Reference< XText > SwXTextDocument::getText(void) throw( RuntimeException )
}
return xBodyText;
}
-/*-- 18.12.98 11:55:11---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::reformat(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
}
-/*-- 18.12.98 11:55:16---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::lockControllers(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(IsValid())
{
UnoActionContext* pContext = new UnoActionContext(pDocShell->GetDoc());
@@ -507,12 +472,10 @@ void SwXTextDocument::lockControllers(void) throw( RuntimeException )
else
throw RuntimeException();
}
-/*-- 18.12.98 11:55:16---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::unlockControllers(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(aActionArr.Count())
{
UnoActionContext* pContext = aActionArr.GetObject(0);
@@ -522,35 +485,27 @@ void SwXTextDocument::unlockControllers(void) throw( RuntimeException )
else
throw RuntimeException();
}
-/*-- 18.12.98 11:55:17---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextDocument::hasControllersLocked(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return aActionArr.Count() > 0;
}
-/*-- 18.12.98 13:12:23---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< frame::XController > SwXTextDocument::getCurrentController(void) throw( RuntimeException )
{
return SfxBaseModel::getCurrentController();
}
-/*-- 18.12.98 13:12:24---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::setCurrentController(const Reference< frame::XController > & xController)
throw( NoSuchElementException, RuntimeException )
{
SfxBaseModel::setCurrentController(xController);
}
-/* -----------------27.01.99 11:48-------------------
- *
- * --------------------------------------------------*/
+
Reference< XInterface > SwXTextDocument::getCurrentSelection() throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Reference< XInterface > xRef;
if(IsValid())
{
@@ -570,80 +525,58 @@ Reference< XInterface > SwXTextDocument::getCurrentSelection() throw( RuntimeEx
return xRef;
}
-/*-- 18.12.98 13:12:24---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SwXTextDocument::attachResource(const OUString& aURL, const Sequence< beans::PropertyValue >& aArgs)
throw( RuntimeException )
{
return SfxBaseModel::attachResource(aURL, aArgs);
}
-/*-- 18.12.98 13:12:24---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwXTextDocument::getURL(void) throw( RuntimeException )
{
return SfxBaseModel::getURL();
}
-/*-- 18.12.98 13:12:24---------------------------------------------------
- -----------------------------------------------------------------------*/
Sequence< beans::PropertyValue > SwXTextDocument::getArgs(void) throw( RuntimeException )
{
return SfxBaseModel::getArgs();
}
-/*-- 18.12.98 13:12:24---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::connectController(const Reference< frame::XController > & xController) throw( RuntimeException )
{
SfxBaseModel::connectController(xController);
}
-/*-- 18.12.98 13:12:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::disconnectController(const Reference< frame::XController > & xController) throw( RuntimeException )
{
SfxBaseModel::disconnectController(xController);
}
-/*-- 18.12.98 13:12:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::dispose(void) throw( RuntimeException )
{
SfxBaseModel::dispose();
}
-/*-- 10.05.2005 14:14:39---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::close( sal_Bool bDeliverOwnership ) throw( util::CloseVetoException, RuntimeException )
{
if(IsValid() && m_pHiddenViewFrame)
lcl_DisposeView( m_pHiddenViewFrame, pDocShell);
SfxBaseModel::close(bDeliverOwnership);
}
-/*-- 18.12.98 13:12:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::addEventListener(const Reference< lang::XEventListener > & aListener) throw( RuntimeException )
{
SfxBaseModel::addEventListener(aListener);
}
-/*-- 18.12.98 13:12:26---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::removeEventListener(const Reference< lang::XEventListener > & aListener) throw( RuntimeException )
{
SfxBaseModel::removeEventListener(aListener);
}
-/*-- 18.12.98 11:55:19---------------------------------------------------
-
- -----------------------------------------------------------------------*/
Reference< XPropertySet > SwXTextDocument::getLineNumberingProperties(void)
throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(IsValid())
{
if(!pxXLineNumberingProperties)
@@ -656,13 +589,11 @@ Reference< XPropertySet > SwXTextDocument::getLineNumberingProperties(void)
throw RuntimeException();
return *pxXLineNumberingProperties;
}
-/*-- 18.12.98 11:55:20---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XIndexReplace > SwXTextDocument::getChapterNumberingRules(void)
throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXChapterNumbering)
@@ -675,7 +606,7 @@ Reference< XIndexReplace > SwXTextDocument::getChapterNumberingRules(void)
Reference< XIndexAccess > SwXTextDocument::getNumberingRules(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXNumberingRules )
@@ -686,12 +617,9 @@ Reference< XIndexAccess > SwXTextDocument::getNumberingRules(void) throw( Runti
return *pxXNumberingRules;
}
-/*-- 18.12.98 11:55:21---------------------------------------------------
-
- -----------------------------------------------------------------------*/
Reference< XIndexAccess > SwXTextDocument::getFootnotes(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXFootnotes)
@@ -701,13 +629,11 @@ Reference< XIndexAccess > SwXTextDocument::getFootnotes(void) throw( RuntimeExc
}
return *pxXFootnotes;
}
-/*-- 18.12.98 11:55:21---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XPropertySet > SAL_CALL
SwXTextDocument::getFootnoteSettings(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXFootnoteSettings)
@@ -717,12 +643,10 @@ Reference< XPropertySet > SAL_CALL
}
return *pxXFootnoteSettings;
}
-/*-- 18.12.98 11:55:21---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XIndexAccess > SwXTextDocument::getEndnotes(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXEndnotes)
@@ -732,12 +656,10 @@ Reference< XIndexAccess > SwXTextDocument::getEndnotes(void) throw( RuntimeExce
}
return *pxXEndnotes;
}
-/*-- 18.12.98 11:55:22---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XPropertySet > SwXTextDocument::getEndnoteSettings(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXEndnoteSettings)
@@ -747,19 +669,15 @@ Reference< XPropertySet > SwXTextDocument::getEndnoteSettings(void) throw( Runt
}
return *pxXEndnoteSettings;
}
-/*-- 18.12.98 11:55:22---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< util::XReplaceDescriptor > SwXTextDocument::createReplaceDescriptor(void)
throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Reference< util::XReplaceDescriptor > xRet = new SwXTextSearch;
return xRet;
}
-/* -----------------26.02.99 15:52-------------------
- *
- * --------------------------------------------------*/
+
SwUnoCrsr* SwXTextDocument::CreateCursorForSearch(Reference< XTextCursor > & xCrsr)
{
getText();
@@ -773,13 +691,10 @@ SwUnoCrsr* SwXTextDocument::CreateCursorForSearch(Reference< XTextCursor > & xC
return pUnoCrsr;
}
-/*-- 18.12.98 11:55:22---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > & xDesc)
throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Reference< XUnoTunnel > xDescTunnel(xDesc, UNO_QUERY);
if(!IsValid() || !xDescTunnel.is() || !xDescTunnel->getSomething(SwXTextSearch::getUnoTunnelId()))
throw RuntimeException();
@@ -848,18 +763,17 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
return (sal_Int32)nResult;
}
-/*-- 18.12.98 11:55:22---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< util::XSearchDescriptor > SwXTextDocument::createSearchDescriptor(void)
throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Reference< util::XSearchDescriptor > xRet = new SwXTextSearch;
return xRet;
}
-/* -----------------26.02.99 16:08-------------------
+
+/* --------------------------------------------------
* wird fuer findAll/First/Next verwendet
* --------------------------------------------------*/
SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & xDesc,
@@ -984,14 +898,12 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
}
return pUnoCrsr;
}
-/*-- 18.12.98 11:55:23---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XIndexAccess >
SwXTextDocument::findAll(const Reference< util::XSearchDescriptor > & xDesc)
throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Reference< XInterface > xTmp;
sal_Int32 nResult = 0;
Reference< XTextCursor > xCrsr;
@@ -1003,13 +915,11 @@ Reference< XIndexAccess >
delete pResultCrsr;
return xRet;
}
-/*-- 18.12.98 11:55:23---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XInterface > SwXTextDocument::findFirst(const Reference< util::XSearchDescriptor > & xDesc)
throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Reference< XInterface > xTmp;
sal_Int32 nResult = 0;
Reference< XTextCursor > xCrsr;
@@ -1027,14 +937,12 @@ Reference< XInterface > SwXTextDocument::findFirst(const Reference< util::XSear
}
return xRet;
}
-/*-- 18.12.98 11:55:24---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XInterface > SwXTextDocument::findNext(const Reference< XInterface > & xStartAt,
const Reference< util::XSearchDescriptor > & xDesc)
throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Reference< XInterface > xTmp;
sal_Int32 nResult = 0;
Reference< XTextCursor > xCrsr;
@@ -1055,13 +963,11 @@ Reference< XInterface > SwXTextDocument::findNext(const Reference< XInterface >
}
return xRet;
}
-/*-- 18.12.98 11:55:24---------------------------------------------------
- -----------------------------------------------------------------------*/
Sequence< beans::PropertyValue > SwXTextDocument::getPagePrintSettings(void)
throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Sequence< beans::PropertyValue > aSeq(9);
if(IsValid())
{
@@ -1095,9 +1001,7 @@ Sequence< beans::PropertyValue > SwXTextDocument::getPagePrintSettings(void)
throw RuntimeException();
return aSeq;
}
-/* -----------------24.02.99 10:57-------------------
- *
- * --------------------------------------------------*/
+
sal_uInt32 lcl_Any_To_ULONG(const Any& rValue, sal_Bool& bException)
{
bException = sal_False;
@@ -1116,9 +1020,7 @@ sal_uInt32 lcl_Any_To_ULONG(const Any& rValue, sal_Bool& bException)
return nRet;
}
-/*-- 09.06.2004 12:18:10---------------------------------------------------
- -----------------------------------------------------------------------*/
String lcl_CreateOutlineString( sal_uInt16 nIndex,
const SwOutlineNodes& rOutlineNodes, const SwNumRule* pOutlRule)
{
@@ -1140,13 +1042,11 @@ String lcl_CreateOutlineString( sal_uInt16 nIndex,
GetTxtNode()->GetExpandTxt( 0, STRING_LEN, sal_False );
return sEntry;
}
-/*-- 18.12.98 11:55:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::setPagePrintSettings(const Sequence< beans::PropertyValue >& aSettings)
throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(IsValid())
{
SwPagePreViewPrtData aData;
@@ -1213,13 +1113,11 @@ void SwXTextDocument::setPagePrintSettings(const Sequence< beans::PropertyValue
else
throw RuntimeException();
}
-/*-- 18.12.98 11:55:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::printPages(const Sequence< beans::PropertyValue >& xOptions)
throw( IllegalArgumentException, RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(IsValid())
{
SfxViewFrame* pFrame = SfxViewFrame::LoadHiddenDocument( *pDocShell, 7 );
@@ -1227,11 +1125,11 @@ void SwXTextDocument::printPages(const Sequence< beans::PropertyValue >& xOption
pDocShell->GetDoc()->GetAttrPool());
aReq.AppendItem(SfxBoolItem(FN_PRINT_PAGEPREVIEW, sal_True));
- OUString sFileName( C2U(SW_PROP_NAME_STR(UNO_NAME_FILE_NAME)));
- OUString sCopyCount(C2U(SW_PROP_NAME_STR(UNO_NAME_COPY_COUNT)));
- OUString sCollate(C2U(SW_PROP_NAME_STR(UNO_NAME_COLLATE)));
- OUString sSort(C2U(SW_PROP_NAME_STR(UNO_NAME_SORT)));
- OUString sPages(C2U(SW_PROP_NAME_STR(UNO_NAME_PAGES)));
+ OUString sFileName(OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_FILE_NAME)));
+ OUString sCopyCount(OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_COPY_COUNT)));
+ OUString sCollate(OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_COLLATE)));
+ OUString sSort(OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SORT)));
+ OUString sPages(OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_PAGES)));
for ( int n = 0; n < xOptions.getLength(); ++n )
{
@@ -1301,13 +1199,11 @@ void SwXTextDocument::printPages(const Sequence< beans::PropertyValue >& xOption
else
throw RuntimeException();
}
-/*-- 18.12.98 11:55:25---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XNameAccess > SwXTextDocument::getReferenceMarks(void)
throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXReferenceMarks)
@@ -1317,12 +1213,10 @@ Reference< XNameAccess > SwXTextDocument::getReferenceMarks(void)
}
return *pxXReferenceMarks;
}
-/* -----------------21.12.98 10:20-------------------
- *
- * --------------------------------------------------*/
+
Reference< XEnumerationAccess > SwXTextDocument::getTextFields(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXTextFieldTypes)
@@ -1332,13 +1226,11 @@ Reference< XEnumerationAccess > SwXTextDocument::getTextFields(void) throw( Run
}
return *pxXTextFieldTypes;
}
-/*-- 21.12.98 10:21:12---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XNameAccess > SwXTextDocument::getTextFieldMasters(void)
throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXTextFieldMasters)
@@ -1348,12 +1240,10 @@ Reference< XNameAccess > SwXTextDocument::getTextFieldMasters(void)
}
return *pxXTextFieldMasters;
}
-/*-- 21.12.98 10:21:12---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XNameAccess > SwXTextDocument::getEmbeddedObjects(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXEmbeddedObjects)
@@ -1363,12 +1253,10 @@ Reference< XNameAccess > SwXTextDocument::getEmbeddedObjects(void) throw( Runti
}
return *pxXEmbeddedObjects;
}
-/*-- 21.12.98 10:21:13---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XNameAccess > SwXTextDocument::getBookmarks(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXBookmarks)
@@ -1378,12 +1266,10 @@ Reference< XNameAccess > SwXTextDocument::getBookmarks(void) throw( RuntimeExce
}
return *pxXBookmarks;
}
-/*-- 21.12.98 10:21:13---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XNameAccess > SwXTextDocument::getTextSections(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXTextSections)
@@ -1393,12 +1279,10 @@ Reference< XNameAccess > SwXTextDocument::getTextSections(void) throw( RuntimeE
}
return *pxXTextSections;
}
-/*-- 21.12.98 10:21:13---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XNameAccess > SwXTextDocument::getTextTables(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXTextTables)
@@ -1408,12 +1292,10 @@ Reference< XNameAccess > SwXTextDocument::getTextTables(void) throw( RuntimeExc
}
return *pxXTextTables;
}
-/*-- 21.12.98 10:21:13---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XNameAccess > SwXTextDocument::getGraphicObjects(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXGraphicObjects)
@@ -1423,12 +1305,10 @@ Reference< XNameAccess > SwXTextDocument::getGraphicObjects(void) throw( Runtim
}
return *pxXGraphicObjects;
}
-/*-- 21.12.98 10:21:14---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XNameAccess > SwXTextDocument::getTextFrames(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXTextFrames)
@@ -1438,12 +1318,10 @@ Reference< XNameAccess > SwXTextDocument::getTextFrames(void) throw( RuntimeExc
}
return *pxXTextFrames;
}
-/* -----------------21.12.98 10:56-------------------
- *
- * --------------------------------------------------*/
+
Reference< XNameAccess > SwXTextDocument::getStyleFamilies(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXStyleFamilies)
@@ -1453,13 +1331,11 @@ Reference< XNameAccess > SwXTextDocument::getStyleFamilies(void) throw( Runtime
}
return *pxXStyleFamilies;
}
-/*-- 19.05.06 10:15:22---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< style::XAutoStyles > SwXTextDocument::getAutoStyles( )
throw (uno::RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXAutoStyles)
@@ -1470,12 +1346,10 @@ uno::Reference< style::XAutoStyles > SwXTextDocument::getAutoStyles( )
return *pxXAutoStyles;
}
-/*-- 22.01.99 10:18:03---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< drawing::XDrawPage > SwXTextDocument::getDrawPage(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXDrawPage)
@@ -1484,17 +1358,10 @@ Reference< drawing::XDrawPage > SwXTextDocument::getDrawPage(void) throw( Runti
// for the case that it did something by purpose
((SwXTextDocument*)this)->pDrawPage = new SwXDrawPage(pDocShell->GetDoc());
((SwXTextDocument*)this)->pxXDrawPage = new Reference< drawing::XDrawPage >(pDrawPage);
-
- //((SwXTextDocument*)this)->pxXDrawPage = new Reference< drawing::XDrawPage > ;
- //((SwXTextDocument*)this)->pDrawPage = new SwXDrawPage(pDocShell->GetDoc());
- //Reference< drawing::XShapes > xTmp = pDrawPage;
- //*pxXDrawPage = Reference< drawing::XDrawPage>(xTmp, UNO_QUERY);
}
return *pxXDrawPage;
}
-/* -----------------07.04.99 10:11-------------------
- *
- * --------------------------------------------------*/
+
SwXDrawPage* SwXTextDocument::GetDrawPage()
{
if(!IsValid())
@@ -1503,9 +1370,7 @@ SwXDrawPage* SwXTextDocument::GetDrawPage()
getDrawPage();
return pDrawPage;
}
-/*-- 18.12.98 11:55:26---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::Invalidate()
{
bObjectValid = sal_False;
@@ -1521,15 +1386,13 @@ void SwXTextDocument::Invalidate()
xNumTunnel->getSomething(SvNumberFormatsSupplierObj::getUnoTunnelId()));
pNumFmt->SetNumberFormatter(0);
}
- DBG_ASSERT(pNumFmt, "No number formatter available");
+ OSL_ENSURE(pNumFmt, "No number formatter available");
}
InitNewDoc();
pDocShell = 0;
aRefreshCont.Disposing();
}
-/* -----------------------------13.07.00 15:59--------------------------------
- ---------------------------------------------------------------------------*/
void SwXTextDocument::Reactivate(SwDocShell* pNewDocShell)
{
if(pDocShell && pDocShell != pNewDocShell)
@@ -1537,9 +1400,7 @@ void SwXTextDocument::Reactivate(SwDocShell* pNewDocShell)
pDocShell = pNewDocShell;
bObjectValid = sal_True;
}
-/*-- 18.12.98 11:55:26---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::InitNewDoc()
{
// zunaechst alle Collections invalidieren, dann Referenzen loeschen und Null setzen
@@ -1593,7 +1454,7 @@ void SwXTextDocument::InitNewDoc()
xNumTunnel->getSomething(SvNumberFormatsSupplierObj::getUnoTunnelId()));
}
- DBG_ASSERT(pNumFmt, "No number formatter available");
+ OSL_ENSURE(pNumFmt, "No number formatter available");
pNumFmt->SetNumberFormatter(0);
}
@@ -1748,14 +1609,11 @@ void SwXTextDocument::InitNewDoc()
}
}
-/*-- 11.03.99 11:51:40---------------------------------------------------
-
- -----------------------------------------------------------------------*/
#define COM_SUN_STAR__DRAWING_LENGTH 13
Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServiceName)
throw( Exception, RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
Reference< XInterface > xRet;
@@ -1833,7 +1691,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic
if ( bShape &&
rServiceName.compareToAscii( "com.sun.star.drawing.temporaryForXMLImportOLE2Shape" ) == 0 )
{
- aTmpServiceName = OUString::createFromAscii( "com.sun.star.drawing.OLE2Shape" );
+ aTmpServiceName = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape"));
}
//hier den Draw - Service suchen
Reference< XInterface > xTmp = SvxFmMSFactory::createInstance(aTmpServiceName);
@@ -1856,9 +1714,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic
}
return xRet;
}
-/*-- 11.03.99 11:51:40---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XInterface > SwXTextDocument::createInstanceWithArguments(
const OUString& ServiceSpecifier,
const Sequence< Any >& /*Arguments*/)
@@ -1869,9 +1725,7 @@ Reference< XInterface > SwXTextDocument::createInstanceWithArguments(
//Parameter zwingend angewiesen sind - bis jetzt haben wir das nicht
return xInt;
}
-/*-- 11.03.99 11:51:41---------------------------------------------------
- -----------------------------------------------------------------------*/
Sequence< OUString > SwXTextDocument::getAvailableServiceNames(void)
throw( RuntimeException )
{
@@ -1895,16 +1749,12 @@ Sequence< OUString > SwXTextDocument::getAvailableServiceNames(void)
return aServices;
}
-/* -----------------18.03.99 11:36-------------------
- *
- * --------------------------------------------------*/
+
OUString SwXTextDocument::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXTextDocument");
}
-/* -----------------20.01.04 10:14-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
if (
@@ -1923,9 +1773,7 @@ sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( R
(bTextDoc && rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextDocument" )))
);
}
-/* -----------------20.01.04 10:17-------------------
- *
- * --------------------------------------------------*/
+
Sequence< OUString > SwXTextDocument::getSupportedServiceNames(void) throw( RuntimeException )
{
sal_Bool bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell));
@@ -1949,12 +1797,10 @@ Sequence< OUString > SwXTextDocument::getSupportedServiceNames(void) throw( Runt
return aRet;
}
-/* -----------------05.05.99 12:10-------------------
- *
- * --------------------------------------------------*/
+
Reference< XIndexAccess > SwXTextDocument::getDocumentIndexes(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
if(!pxXDocumentIndexes)
@@ -1965,23 +1811,18 @@ Reference< XIndexAccess > SwXTextDocument::getDocumentIndexes(void) throw( Runt
return *pxXDocumentIndexes;
}
-/*-- 10.05.99 13:58:58---------------------------------------------------
-
- -----------------------------------------------------------------------*/
Reference< XPropertySetInfo > SwXTextDocument::getPropertySetInfo(void) throw( RuntimeException )
{
static Reference< XPropertySetInfo > xRet = pPropSet->getPropertySetInfo();
return xRet;
}
-/*-- 10.05.99 13:58:58---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::setPropertyValue(const OUString& rPropertyName,
const Any& aValue)
throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException,
WrappedTargetException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName);
@@ -2153,13 +1994,11 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName,
}
}
}
-/*-- 10.05.99 13:58:59---------------------------------------------------
- -----------------------------------------------------------------------*/
Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName);
@@ -2169,6 +2008,9 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
Any aAny;
switch(pEntry->nWID)
{
+ case WID_DOC_ISTEMPLATEID :
+ aAny <<= pDocShell->IsTemplate();
+ break;
case WID_DOC_CHAR_COUNT :
case WID_DOC_PARA_COUNT :
case WID_DOC_WORD_COUNT :
@@ -2277,6 +2119,14 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
case WID_DOC_DIALOG_LIBRARIES:
aAny <<= pDocShell->GetDialogContainer();
break;
+ case WID_DOC_VBA_DOCOBJ:
+ {
+ beans::PropertyValue aProp;
+ aProp.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisWordDoc") );
+ aProp.Value <<= pDocShell->GetModel();
+ aAny <<= aProp;
+ }
+ break;
case WID_DOC_RUNTIME_UID:
aAny <<= getRuntimeUID();
break;
@@ -2305,45 +2155,35 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
}
return aAny;
}
-/*-- 10.05.99 13:58:59---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::addPropertyChangeListener(const OUString& /*PropertyName*/,
const Reference< XPropertyChangeListener > & /*aListener*/)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
- DBG_WARNING("not implemented");
+ OSL_ENSURE(false, "not implemented");
}
-/*-- 10.05.99 13:58:59---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::removePropertyChangeListener(const OUString& /*PropertyName*/,
const Reference< XPropertyChangeListener > & /*aListener*/)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
- DBG_WARNING("not implemented");
+ OSL_ENSURE(false, "not implemented");
}
-/*-- 10.05.99 13:59:00---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::addVetoableChangeListener(const OUString& /*PropertyName*/,
const Reference< XVetoableChangeListener > & /*aListener*/)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
- DBG_WARNING("not implemented");
+ OSL_ENSURE(false, "not implemented");
}
-/*-- 10.05.99 13:59:00---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::removeVetoableChangeListener(const OUString& /*PropertyName*/,
const Reference< XVetoableChangeListener > & /*aListener*/)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
- DBG_WARNING("not implemented");
+ OSL_ENSURE(false, "not implemented");
}
-/* -----------------25.10.99 10:42-------------------
- --------------------------------------------------*/
Reference< XNameAccess > SwXTextDocument::getLinks(void) throw( RuntimeException )
{
if(!pxLinkTargetSupplier)
@@ -2353,9 +2193,7 @@ Reference< XNameAccess > SwXTextDocument::getLinks(void) throw( RuntimeExceptio
}
return (*pxLinkTargetSupplier);
}
-/* -----------------------------11.01.01 15:01--------------------------------
- ---------------------------------------------------------------------------*/
Reference< XEnumerationAccess > SwXTextDocument::getRedlines( ) throw(RuntimeException)
{
if(!pxXRedlines)
@@ -2365,12 +2203,10 @@ Reference< XEnumerationAccess > SwXTextDocument::getRedlines( ) throw(RuntimeEx
}
return *pxXRedlines;
}
-/*-- 21.02.00 08:41:06---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::refresh(void) throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
SwWrtShell *pWrtShell = pDocShell->GetWrtShell();
@@ -2378,33 +2214,27 @@ void SwXTextDocument::refresh(void) throw( RuntimeException )
if(pWrtShell)
pWrtShell->CalcLayout();
}
-/*-- 21.02.00 08:41:06---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::addRefreshListener(const Reference< util::XRefreshListener > & l)
throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if ( !IsValid() )
throw RuntimeException();
aRefreshCont.AddListener ( reinterpret_cast < const Reference < lang::XEventListener > &> ( l ));
}
-/*-- 21.02.00 08:41:07---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextDocument::removeRefreshListener(const Reference< util::XRefreshListener > & l)
throw( RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if ( !IsValid() || !aRefreshCont.RemoveListener ( reinterpret_cast < const Reference < lang::XEventListener > &> ( l ) ) )
throw RuntimeException();
}
-/* -----------------------------26.02.01 12:22--------------------------------
- ---------------------------------------------------------------------------*/
void SwXTextDocument::updateLinks( ) throw(RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
SwDoc* pDoc = pDocShell->GetDoc();
@@ -2415,11 +2245,12 @@ void SwXTextDocument::updateLinks( ) throw(RuntimeException)
rLnkMan.UpdateAllLinks( sal_False, sal_False, sal_True );
}
}
+
//XPropertyState
PropertyState SAL_CALL SwXTextDocument::getPropertyState( const OUString& rPropertyName )
throw (UnknownPropertyException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
PropertyState eRet = PropertyState_DIRECT_VALUE;
if(!IsValid())
throw RuntimeException();
@@ -2434,6 +2265,7 @@ PropertyState SAL_CALL SwXTextDocument::getPropertyState( const OUString& rPrope
}
return eRet;
}
+
Sequence< PropertyState > SAL_CALL SwXTextDocument::getPropertyStates( const Sequence< OUString >& rPropertyNames )
throw (UnknownPropertyException, RuntimeException)
{
@@ -2447,10 +2279,11 @@ Sequence< PropertyState > SAL_CALL SwXTextDocument::getPropertyStates( const Seq
return aRet;
}
+
void SAL_CALL SwXTextDocument::setPropertyToDefault( const OUString& rPropertyName )
throw (UnknownPropertyException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName);
@@ -2461,10 +2294,11 @@ void SAL_CALL SwXTextDocument::setPropertyToDefault( const OUString& rPropertyNa
case 0:default:break;
}
}
+
Any SAL_CALL SwXTextDocument::getPropertyDefault( const OUString& rPropertyName )
throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName);
@@ -2494,7 +2328,6 @@ static OutputDevice * lcl_GetOutputDevice( const SwPrintUIOptions &rPrintUIOptio
return pOut;
}
-
static bool lcl_SeqHasProperty(
const uno::Sequence< beans::PropertyValue >& rOptions,
const sal_Char *pPropName )
@@ -2510,7 +2343,6 @@ static bool lcl_SeqHasProperty(
return bRes;
}
-
SfxViewShell * SwXTextDocument::GetRenderView(
bool &rbIsSwSrcView,
const uno::Sequence< beans::PropertyValue >& rOptions,
@@ -2527,7 +2359,7 @@ SfxViewShell * SwXTextDocument::GetRenderView(
const beans::PropertyValue *pProps = rOptions.getConstArray();
for (sal_Int32 i = 0; i < nLen; ++i)
{
- if (pProps[i].Name.equalsAscii( "View" ))
+ if (pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "View" ) ))
{
aTmp = pProps[i].Value;
break;
@@ -2537,14 +2369,13 @@ SfxViewShell * SwXTextDocument::GetRenderView(
uno::Reference< frame::XController > xController;
if (aTmp >>= xController)
{
- DBG_ASSERT( xController.is(), "controller is empty!" );
+ OSL_ENSURE( xController.is(), "controller is empty!" );
pView = GuessViewShell( rbIsSwSrcView, xController );
}
}
return pView;
}
-
/*
* GetRenderDoc:
* returns the document to be rendered, usually this will be the 'regular'
@@ -2553,7 +2384,6 @@ SfxViewShell * SwXTextDocument::GetRenderView(
* The rpView variable will be set (if not already done) to the used
* SfxViewShell.
*/
-
SwDoc * SwXTextDocument::GetRenderDoc(
SfxViewShell *&rpView,
const uno::Any& rSelection,
@@ -2567,7 +2397,7 @@ SwDoc * SwXTextDocument::GetRenderDoc(
pDoc = pDocShell->GetDoc();
else
{
- DBG_ASSERT( !xModel.is(), "unexpected model found" );
+ OSL_ENSURE( !xModel.is(), "unexpected model found" );
if (rSelection.hasValue()) // is anything selected ?
{
@@ -2579,11 +2409,11 @@ SwDoc * SwXTextDocument::GetRenderDoc(
{
(void) bIsPDFExport;
// aside from maybe PDF export the view should always have been provided!
- DBG_ASSERT( bIsPDFExport, "view is missing, guessing one..." );
+ OSL_ENSURE( bIsPDFExport, "view is missing, guessing one..." );
rpView = GuessViewShell( bIsSwSrcView );
}
- DBG_ASSERT( rpView, "ViewShell missing" );
+ OSL_ENSURE( rpView, "ViewShell missing" );
// the view shell should be SwView for documents PDF export.
// for the page preview no selection should be possible
// (the export dialog does not allow for this option)
@@ -2599,17 +2429,13 @@ SwDoc * SwXTextDocument::GetRenderDoc(
}
else
{
- DBG_ERROR( "unexpected ViewShell" );
+ OSL_ENSURE(false, "unexpected ViewShell" );
}
}
}
return pDoc;
}
-/* -----------------------------23.08.02 16:00--------------------------------
-
- ---------------------------------------------------------------------------*/
-
static void lcl_SavePrintUIOptionsToDocumentPrintData(
SwDoc &rDoc,
const SwPrintUIOptions &rPrintUIOptions,
@@ -2639,13 +2465,12 @@ static void lcl_SavePrintUIOptionsToDocumentPrintData(
rDoc.setPrintData( aDocPrintData );
}
-
sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
const uno::Any& rSelection,
const uno::Sequence< beans::PropertyValue >& rxOptions )
throw (IllegalArgumentException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
@@ -2658,10 +2483,9 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
if (!m_pPrintUIOptions)
m_pPrintUIOptions = lcl_GetPrintUIOptions( pDocShell, pView );
bool bFormat = m_pPrintUIOptions->processPropertiesAndCheckFormat( rxOptions );
- // const bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport );
SwDoc *pDoc = GetRenderDoc( pView, rSelection, bIsPDFExport );
- DBG_ASSERT( pDoc && pView, "doc or view shell missing!" );
+ OSL_ENSURE( pDoc && pView, "doc or view shell missing!" );
if (!pDoc || !pView)
return 0;
@@ -2786,20 +2610,18 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
nRet = m_pRenderData->GetPagesToPrint().size();
}
}
- DBG_ASSERT( nRet >= 0, "negative number of pages???" );
+ OSL_ENSURE( nRet >= 0, "negative number of pages???" );
return nRet;
}
-/* -----------------------------23.08.02 16:00--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
sal_Int32 nRenderer,
const uno::Any& rSelection,
const uno::Sequence< beans::PropertyValue >& rxOptions )
throw (IllegalArgumentException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
@@ -2822,7 +2644,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
const bool bPrintPaperFromSetup = m_pPrintUIOptions->getBoolValue( "PrintPaperFromSetup", false );
SwDoc *pDoc = GetRenderDoc( pView, rSelection, bIsPDFExport );
- DBG_ASSERT( pDoc && pView, "doc or view shell missing!" );
+ OSL_ENSURE( pDoc && pView, "doc or view shell missing!" );
if (!pDoc || !pView)
return uno::Sequence< beans::PropertyValue >();
@@ -2834,7 +2656,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
sal_Int32 nMaxRenderer = 0;
if (!bIsSwSrcView && m_pRenderData)
{
- DBG_ASSERT( m_pRenderData, "m_pRenderData missing!!" );
+ OSL_ENSURE( m_pRenderData, "m_pRenderData missing!!" );
nMaxRenderer = bPrintProspect?
m_pRenderData->GetPagePairsForProspectPrinting().size() - 1 :
m_pRenderData->GetPagesToPrint().size() - 1;
@@ -2952,9 +2774,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
return aRenderer;
}
-/* -----------------------------28.10.02 16:00--------------------------------
- ---------------------------------------------------------------------------*/
SfxViewShell * SwXTextDocument::GuessViewShell(
/* out */ bool &rbIsSwSrcView,
const uno::Reference< css::frame::XController > xController )
@@ -2988,23 +2808,19 @@ SfxViewShell * SwXTextDocument::GuessViewShell(
pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, sal_False );
}
- DBG_ASSERT( pSwView || pSwPagePreView || pSwSrcView, "failed to get view shell" );
+ OSL_ENSURE( pSwView || pSwPagePreView || pSwSrcView, "failed to get view shell" );
if (pView)
rbIsSwSrcView = pSwSrcView != 0;
return pView;
-// return pSwView ? dynamic_cast< SfxViewShell * >(pSwView) :
-// (pSwSrcView ? dynamic_cast< SfxViewShell * >(pSwSrcView) :
-// dynamic_cast< SfxViewShell * >(pSwPagePreView) );
}
-
void SAL_CALL SwXTextDocument::render(
sal_Int32 nRenderer,
const uno::Any& rSelection,
const uno::Sequence< beans::PropertyValue >& rxOptions )
throw (IllegalArgumentException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
@@ -3018,8 +2834,8 @@ void SAL_CALL SwXTextDocument::render(
bool bIsSwSrcView = false;
SfxViewShell *pView = GetRenderView( bIsSwSrcView, rxOptions, bIsPDFExport );
- DBG_ASSERT( m_pRenderData, "data should have been created already in getRendererCount..." );
- DBG_ASSERT( m_pPrintUIOptions, "data should have been created already in getRendererCount..." );
+ OSL_ENSURE( m_pRenderData, "data should have been created already in getRendererCount..." );
+ OSL_ENSURE( m_pPrintUIOptions, "data should have been created already in getRendererCount..." );
if (!bIsSwSrcView && !m_pRenderData)
m_pRenderData = new SwRenderData;
if (!m_pPrintUIOptions)
@@ -3029,13 +2845,13 @@ void SAL_CALL SwXTextDocument::render(
const bool bLastPage = m_pPrintUIOptions->getBoolValue( "IsLastPage", sal_False );
SwDoc *pDoc = GetRenderDoc( pView, rSelection, bIsPDFExport );
- DBG_ASSERT( pDoc && pView, "doc or view shell missing!" );
+ OSL_ENSURE( pDoc && pView, "doc or view shell missing!" );
if (pDoc && pView)
{
sal_Int32 nMaxRenderer = 0;
if (!bIsSwSrcView)
{
- DBG_ASSERT( m_pRenderData, "m_pRenderData missing!!" );
+ OSL_ENSURE( m_pRenderData, "m_pRenderData missing!!" );
nMaxRenderer = bPrintProspect?
m_pRenderData->GetPagePairsForProspectPrinting().size() - 1 :
m_pRenderData->GetPagesToPrint().size() - 1;
@@ -3055,7 +2871,7 @@ void SAL_CALL SwXTextDocument::render(
// the view shell should be SwView for documents PDF export
// or SwPagePreView for PDF export of the page preview
//!! (check for SwView first as in GuessViewShell) !!
- DBG_ASSERT( pView, "!! view missing !!" );
+ OSL_ENSURE( pView, "!! view missing !!" );
const TypeId aSwViewTypeId = TYPE(SwView);
ViewShell* pVwSh = 0;
if (pView)
@@ -3074,7 +2890,7 @@ void SAL_CALL SwXTextDocument::render(
const bool bFirstPage = m_pPrintUIOptions->getBoolValue( "IsFirstPage", sal_False );
bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport );
- DBG_ASSERT(( pView->IsA(aSwViewTypeId) && m_pRenderData->IsViewOptionAdjust())
+ OSL_ENSURE(( pView->IsA(aSwViewTypeId) && m_pRenderData->IsViewOptionAdjust())
|| (!pView->IsA(aSwViewTypeId) && !m_pRenderData->IsViewOptionAdjust()),
"SwView / SwViewOptionAdjust_Impl availability mismatch" );
@@ -3152,10 +2968,8 @@ void SAL_CALL SwXTextDocument::render(
delete m_pPrintUIOptions; m_pPrintUIOptions = NULL;
}
}
-/* -----------------------------03.10.04 -------------------------------------
- ---------------------------------------------------------------------------*/
- // xforms::XFormsSupplier
+// xforms::XFormsSupplier
Reference<XNameContainer> SAL_CALL SwXTextDocument::getXForms()
throw( RuntimeException )
{
@@ -3165,20 +2979,15 @@ Reference<XNameContainer> SAL_CALL SwXTextDocument::getXForms()
return pDoc->getXForms();
}
-/* -----------------------------25.09.07 -------------------------------------
-
- ---------------------------------------------------------------------------*/
uno::Reference< text::XFlatParagraphIterator > SAL_CALL SwXTextDocument::getFlatParagraphIterator(::sal_Int32 nTextMarkupType, sal_Bool bAutomatic)
throw ( uno::RuntimeException )
{
return new SwXFlatParagraphIterator( *pDocShell->GetDoc(), nTextMarkupType, bAutomatic );
}
-/*-- 07.05.2009 09:21:12---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< util::XCloneable > SwXTextDocument::createClone( ) throw (uno::RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
@@ -3195,22 +3004,17 @@ uno::Reference< util::XCloneable > SwXTextDocument::createClone( ) throw (uno::
xStorageDoc->loadFromStorage( xNewStorage, aTempMediaDescriptor );
return uno::Reference< util::XCloneable >( xNewModel, UNO_QUERY );
}
-/* -----------------------------20.06.00 09:54--------------------------------
- ---------------------------------------------------------------------------*/
void * SAL_CALL SwXTextDocument::operator new( size_t t) throw()
{
return SwXTextDocumentBaseClass::operator new(t);
}
-/* -----------------------------20.06.00 09:54--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextDocument::operator delete( void * p) throw()
{
SwXTextDocumentBaseClass::operator delete(p);
}
-
/*---------------------------------------------------
retrieve languages already used in current document
-----------------------------------------------------*/
@@ -3219,7 +3023,8 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages(
::sal_Int16 nMaxCount )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
+
// possible canonical values for nScriptTypes
// any bit wise combination is allowed
@@ -3233,7 +3038,7 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages(
const bool bComplex = 0 != (nScriptTypes & nComplex);
if (nScriptTypes < nLatin || nScriptTypes > (nLatin | nAsian | nComplex))
- throw IllegalArgumentException(::rtl::OUString::createFromAscii("nScriptTypes ranges from 1 to 7!"), Reference< XInterface >(), 1);
+ throw IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nScriptTypes ranges from 1 to 7!")), Reference< XInterface >(), 1);
if (!pDocShell)
throw DisposedException();
SwDoc* pDoc = pDocShell->GetDoc();
@@ -3385,11 +3190,11 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages(
nMaxCount = static_cast< sal_Int16 >( aAllLangs.size() );
// build return value
- sal_Int32 nCount = 0;
uno::Sequence< lang::Locale > aLanguages( nMaxCount );
lang::Locale* pLanguage = aLanguages.getArray();
if (nMaxCount > 0)
{
+ sal_Int32 nCount = 0;
const SvtLanguageTable aLangTab;
for (std::set< LanguageType >::const_iterator it = aAllLangs.begin(); it != aAllLangs.end(); ++it)
{
@@ -3407,9 +3212,6 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages(
return aLanguages;
}
-/* -----------------25.10.99 11:06-------------------
-
- --------------------------------------------------*/
SwXLinkTargetSupplier::SwXLinkTargetSupplier(SwXTextDocument& rxDoc) :
pxDoc(&rxDoc)
{
@@ -3421,16 +3223,11 @@ SwXLinkTargetSupplier::SwXLinkTargetSupplier(SwXTextDocument& rxDoc) :
sOutlines = String(SW_RES(STR_CONTENT_TYPE_OUTLINE));
sBookmarks = String(SW_RES(STR_CONTENT_TYPE_BOOKMARK));
}
-/* -----------------25.10.99 11:11-------------------
- --------------------------------------------------*/
SwXLinkTargetSupplier::~SwXLinkTargetSupplier()
{
}
-/*-- 25.10.99 11:12:45---------------------------------------------------
-
- -----------------------------------------------------------------------*/
Any SwXLinkTargetSupplier::getByName(const OUString& rName)
throw( NoSuchElementException, WrappedTargetException, RuntimeException )
{
@@ -3464,14 +3261,6 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName)
Reference< XPropertySet > xRet(xTbls, UNO_QUERY);
aRet.setValue(&xRet, ::getCppuType((Reference< XPropertySet>*)0));
}
-/* else if(sToCompare == )
- {
- sSuffix += UniString::CreateFromAscii(pMarkToText);
- Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper(
- pxDoc->, sSuffix );
- Reference< XPropertySet > xRet(xTbls, UNO_QUERY);
- aRet.setValue(&xRet, ::getCppuType((const XPropertySet*)0));
- }*/
else if(sToCompare == sGraphics)
{
sSuffix += UniString::CreateFromAscii(pMarkToGraphic);
@@ -3508,9 +3297,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName)
throw NoSuchElementException();
return aRet;
}
-/*-- 25.10.99 11:12:46---------------------------------------------------
- -----------------------------------------------------------------------*/
Sequence< OUString > SwXLinkTargetSupplier::getElementNames(void)
throw( RuntimeException )
{
@@ -3525,9 +3312,7 @@ Sequence< OUString > SwXLinkTargetSupplier::getElementNames(void)
pNames[6] = sBookmarks;
return aRet;
}
-/*-- 25.10.99 11:12:46---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXLinkTargetSupplier::hasByName(const OUString& rName)
throw( RuntimeException )
{
@@ -3542,40 +3327,30 @@ sal_Bool SwXLinkTargetSupplier::hasByName(const OUString& rName)
return sal_True;
return sal_False;
}
-/*-- 25.10.99 11:12:47---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SwXLinkTargetSupplier::getElementType(void)
throw( RuntimeException )
{
return ::getCppuType((Reference< XPropertySet>*)0);
}
-/*-- 25.10.99 11:12:47---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXLinkTargetSupplier::hasElements(void) throw( RuntimeException )
{
return 0 != pxDoc;
}
-/*-- 25.10.99 11:12:47---------------------------------------------------
- -----------------------------------------------------------------------*/
OUString SwXLinkTargetSupplier::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXLinkTargetSupplier");
}
-/*-- 25.10.99 11:12:48---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXLinkTargetSupplier::supportsService(const OUString& rServiceName)
throw( RuntimeException )
{
return (rServiceName == C2U("com.sun.star.document.LinkTargets"));
}
-/*-- 25.10.99 11:12:48---------------------------------------------------
- -----------------------------------------------------------------------*/
Sequence< OUString > SwXLinkTargetSupplier::getSupportedServiceNames(void)
throw( RuntimeException )
{
@@ -3585,9 +3360,6 @@ Sequence< OUString > SwXLinkTargetSupplier::getSupportedServiceNames(void)
return aRet;
}
-/*-- 26.10.99 09:16:23---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(
Reference< XNameAccess > xAccess, const String& rLinkDisplayName, String sSuffix ) :
xRealAccess(xAccess),
@@ -3597,9 +3369,7 @@ SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(
pxDoc(0)
{
}
-/* -----------------26.10.99 14:17-------------------
- --------------------------------------------------*/
SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(SwXTextDocument& rxDoc,
const String& rLinkDisplayName, String sSuffix) :
pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
@@ -3609,15 +3379,11 @@ SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(SwXTextDocument& rxDoc,
pxDoc(&rxDoc)
{
}
-/*-- 26.10.99 09:16:23---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXLinkNameAccessWrapper::~SwXLinkNameAccessWrapper()
{
}
-/*-- 26.10.99 09:16:24---------------------------------------------------
- -----------------------------------------------------------------------*/
Any SwXLinkNameAccessWrapper::getByName(const OUString& rName)
throw( NoSuchElementException, WrappedTargetException, RuntimeException )
{
@@ -3669,9 +3435,7 @@ Any SwXLinkNameAccessWrapper::getByName(const OUString& rName)
throw NoSuchElementException();
return aRet;
}
-/*-- 26.10.99 09:16:24---------------------------------------------------
- -----------------------------------------------------------------------*/
Sequence< OUString > SwXLinkNameAccessWrapper::getElementNames(void)
throw( RuntimeException )
{
@@ -3709,9 +3473,7 @@ Sequence< OUString > SwXLinkNameAccessWrapper::getElementNames(void)
}
return aRet;
}
-/*-- 26.10.99 09:16:25---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXLinkNameAccessWrapper::hasByName(const OUString& rName)
throw( RuntimeException )
{
@@ -3750,23 +3512,19 @@ sal_Bool SwXLinkNameAccessWrapper::hasByName(const OUString& rName)
}
return bRet;
}
-/*-- 26.10.99 09:16:25---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SwXLinkNameAccessWrapper::getElementType(void)
throw( RuntimeException )
{
return ::getCppuType((Reference<XPropertySet>*)0);
}
-/*-- 26.10.99 09:16:25---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXLinkNameAccessWrapper::hasElements(void) throw( RuntimeException )
{
sal_Bool bRet = sal_False;
if(pxDoc)
{
- DBG_ERROR("not implemented");
+ OSL_ENSURE(false, "not implemented");
}
else
{
@@ -3774,18 +3532,14 @@ sal_Bool SwXLinkNameAccessWrapper::hasElements(void) throw( RuntimeException )
}
return bRet;
}
-/*-- 26.10.99 09:16:26---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XPropertySetInfo > SwXLinkNameAccessWrapper::getPropertySetInfo(void)
throw( RuntimeException )
{
static Reference< XPropertySetInfo > xRet = pPropSet->getPropertySetInfo();
return xRet;
}
-/*-- 26.10.99 09:16:26---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXLinkNameAccessWrapper::setPropertyValue(
const OUString& , const Any& )
throw( UnknownPropertyException,
@@ -3796,9 +3550,7 @@ void SwXLinkNameAccessWrapper::setPropertyValue(
{
throw UnknownPropertyException();
}
-/* -----------------------------08.12.99 11:10--------------------------------
- ---------------------------------------------------------------------------*/
Any lcl_GetDisplayBitmap(String sLinkSuffix)
{
Any aRet;
@@ -3814,8 +3566,6 @@ Any lcl_GetDisplayBitmap(String sLinkSuffix)
nImgId = CONTENT_TYPE_FRAME;
else if(COMPARE_EQUAL == sLinkSuffix.CompareToAscii(pMarkToGraphic))
nImgId = CONTENT_TYPE_GRAPHIC;
-// else if(== sLinkSuffix)
-// nImgId = CONTENT_TYPE_BOOKMARK;
else if(COMPARE_EQUAL == sLinkSuffix.CompareToAscii(pMarkToRegion))
nImgId = CONTENT_TYPE_REGION;
else if(COMPARE_EQUAL == sLinkSuffix.CompareToAscii(pMarkToOLE))
@@ -3825,8 +3575,7 @@ Any lcl_GetDisplayBitmap(String sLinkSuffix)
if(USHRT_MAX != nImgId)
{
nImgId += 20000;
- sal_Bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
- ImageList aEntryImages( SW_RES(bHighContrast ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP) );
+ ImageList aEntryImages( SW_RES(IMG_NAVI_ENTRYBMP) );
const Image& rImage = aEntryImages.GetImage( nImgId );
Bitmap aBitmap( rImage.GetBitmapEx().GetBitmap() );
Reference<awt::XBitmap> xBmp = VCLUnoHelper::CreateBitmap( aBitmap );
@@ -3834,9 +3583,7 @@ Any lcl_GetDisplayBitmap(String sLinkSuffix)
}
return aRet;
}
-/*-- 26.10.99 09:16:27---------------------------------------------------
- -----------------------------------------------------------------------*/
Any SwXLinkNameAccessWrapper::getPropertyValue(const OUString& rPropertyName)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
@@ -3853,62 +3600,44 @@ Any SwXLinkNameAccessWrapper::getPropertyValue(const OUString& rPropertyName)
throw UnknownPropertyException();
return aRet;
}
-/*-- 26.10.99 09:16:27---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXLinkNameAccessWrapper::addPropertyChangeListener(
const OUString& /*PropertyName*/, const Reference< XPropertyChangeListener > & /*aListener*/)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{}
-/*-- 26.10.99 09:16:28---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXLinkNameAccessWrapper::removePropertyChangeListener(
const OUString& /*PropertyName*/, const Reference< XPropertyChangeListener > & /*aListener*/)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{}
-/*-- 26.10.99 09:16:28---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXLinkNameAccessWrapper::addVetoableChangeListener(
const OUString& /*PropertyName*/, const Reference< XVetoableChangeListener > & /*aListener*/)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{}
-/*-- 26.10.99 09:16:29---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXLinkNameAccessWrapper::removeVetoableChangeListener(
const OUString& /*PropertyName*/, const Reference< XVetoableChangeListener > & /*aListener*/)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{}
-/*-- 26.10.99 09:16:32---------------------------------------------------
-
- -----------------------------------------------------------------------*/
Reference< XNameAccess > SwXLinkNameAccessWrapper::getLinks(void)
throw( RuntimeException )
{
return (SwXLinkNameAccessWrapper*)this;
}
-/*-- 26.10.99 09:21:48---------------------------------------------------
-
- -----------------------------------------------------------------------*/
OUString SwXLinkNameAccessWrapper::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXLinkNameAccessWrapper");
}
-/*-- 26.10.99 09:21:48---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXLinkNameAccessWrapper::supportsService(const OUString& rServiceName)
throw( RuntimeException )
{
return (rServiceName == C2U("com.sun.star.document.LinkTargets"));
}
-/*-- 26.10.99 09:21:48---------------------------------------------------
- -----------------------------------------------------------------------*/
Sequence< OUString > SwXLinkNameAccessWrapper::getSupportedServiceNames(void)
throw( RuntimeException )
{
@@ -3917,31 +3646,23 @@ Sequence< OUString > SwXLinkNameAccessWrapper::getSupportedServiceNames(void)
pNames[0] = C2U("com.sun.star.document.LinkTargets");
return aRet;
}
-/* -----------------26.10.99 15:50-------------------
- --------------------------------------------------*/
SwXOutlineTarget::SwXOutlineTarget(const String& rOutlineText) :
pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
sOutlineText(rOutlineText)
{
}
-/*-- 26.10.99 15:51:45---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXOutlineTarget::~SwXOutlineTarget()
{
}
-/*-- 26.10.99 15:51:46---------------------------------------------------
- -----------------------------------------------------------------------*/
Reference< XPropertySetInfo > SwXOutlineTarget::getPropertySetInfo(void) throw( RuntimeException )
{
static Reference< XPropertySetInfo > xRet = pPropSet->getPropertySetInfo();
return xRet;
}
-/*-- 26.10.99 15:51:46---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXOutlineTarget::setPropertyValue(
const OUString& /*PropertyName*/, const Any& /*aValue*/)
throw( UnknownPropertyException, PropertyVetoException,
@@ -3949,9 +3670,7 @@ void SwXOutlineTarget::setPropertyValue(
{
throw UnknownPropertyException();
}
-/*-- 26.10.99 15:51:46---------------------------------------------------
- -----------------------------------------------------------------------*/
Any SwXOutlineTarget::getPropertyValue(const OUString& rPropertyName)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
@@ -3962,55 +3681,41 @@ Any SwXOutlineTarget::getPropertyValue(const OUString& rPropertyName)
throw UnknownPropertyException();
return aRet;
}
-/*-- 26.10.99 15:51:46---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXOutlineTarget::addPropertyChangeListener(
const OUString& /*PropertyName*/, const Reference< XPropertyChangeListener > & /*aListener*/)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
}
-/*-- 26.10.99 15:51:47---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXOutlineTarget::removePropertyChangeListener(
const OUString& /*PropertyName*/, const Reference< XPropertyChangeListener > & /*aListener*/)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
}
-/*-- 26.10.99 15:51:47---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXOutlineTarget::addVetoableChangeListener(
const OUString& /*PropertyName*/, const Reference< XVetoableChangeListener > & /*aListener*/)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
}
-/*-- 26.10.99 15:51:47---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXOutlineTarget::removeVetoableChangeListener(
const OUString& /*PropertyName*/, const Reference< XVetoableChangeListener > & /*aListener*/)
throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
{
}
-/* -----------------03.05.99 12:28-------------------
- *
- * --------------------------------------------------*/
+
OUString SwXOutlineTarget::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXOutlineTarget");
}
-/* -----------------03.05.99 12:28-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwXOutlineTarget::supportsService(const OUString& ServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.document.LinkTarget") == ServiceName;
}
-/* -----------------03.05.99 12:28-------------------
- *
- * --------------------------------------------------*/
+
Sequence< OUString > SwXOutlineTarget::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence < OUString > aRet(1);
@@ -4019,23 +3724,17 @@ Sequence< OUString > SwXOutlineTarget::getSupportedServiceNames(void) throw( Run
return aRet;
}
-/* -----------------------------17.01.01 16:06--------------------------------
- ---------------------------------------------------------------------------*/
SwXDocumentPropertyHelper::SwXDocumentPropertyHelper(SwDoc& rDoc) :
SvxUnoForbiddenCharsTable ( rDoc.getForbiddenCharacterTable() )
,m_pDoc(&rDoc)
{
}
-/* -----------------------------17.01.01 16:06--------------------------------
- ---------------------------------------------------------------------------*/
SwXDocumentPropertyHelper::~SwXDocumentPropertyHelper()
{
}
-/* -----------------------------17.01.01 16:06--------------------------------
- ---------------------------------------------------------------------------*/
Reference<XInterface> SwXDocumentPropertyHelper::GetDrawTable(short nWhich)
{
Reference<XInterface> xRet;
@@ -4081,8 +3780,8 @@ Reference<XInterface> SwXDocumentPropertyHelper::GetDrawTable(short nWhich)
xDrawDefaults = (cppu::OWeakObject*)new SwSvxUnoDrawPool(m_pDoc);
xRet = xDrawDefaults;
break;
-#ifdef DBG_UTIL
- default: DBG_ERROR("which table?");
+#if OSL_DEBUG_LEVEL > 1
+ default: OSL_ENSURE(false, "which table?");
#endif
}
}
@@ -4099,33 +3798,26 @@ void SwXDocumentPropertyHelper::Invalidate()
xMarkerTable = 0;
xDrawDefaults = 0;
m_pDoc = 0;
- SvxUnoForbiddenCharsTable::mxForbiddenChars.unbind();
+ SvxUnoForbiddenCharsTable::mxForbiddenChars.clear();
}
-/* -----------------13.08.2003 12:43-----------------
- --------------------------------------------------*/
void SwXDocumentPropertyHelper::onChange()
{
if(m_pDoc)
m_pDoc->SetModified();
}
-
-/*****************************************************************************/
-
SwViewOptionAdjust_Impl::SwViewOptionAdjust_Impl( SwWrtShell& rSh, const SwViewOption &rViewOptions ) :
m_rShell( rSh ),
m_aOldViewOptions( rViewOptions )
{
}
-
SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl()
{
m_rShell.ApplyViewOptions( m_aOldViewOptions );
}
-
void
SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions)
{
@@ -4182,7 +3874,4 @@ SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions)
}
}
-
-/*****************************************************************************/
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index 788fd4cce9cb..995f146a45a2 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,7 +61,7 @@
#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
#include <frmatr.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <IMark.hxx>
#include <unotxdoc.hxx>
#include <unodraw.hxx>
@@ -85,7 +86,6 @@
#include "swdtflvr.hxx"
#include <vcl/svapp.hxx>
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -93,28 +93,24 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::text;
using namespace ::com::sun::star::view;
using namespace ::com::sun::star::frame;
-using namespace rtl;
using ::com::sun::star::util::URL;
using comphelper::HelperBaseNoState;
+using ::rtl::OUString;
+
SV_IMPL_PTRARR( SelectionChangeListenerArr, XSelectionChangeListenerPtr );
-/* -----------------22.05.98 12:20-------------------
- *
- * --------------------------------------------------*/
SwPaM* lcl_createPamCopy(const SwPaM& rPam)
{
SwPaM *const pRet = new SwPaM(*rPam.GetPoint());
::sw::DeepCopyPaM(rPam, *pRet);
return pRet;
}
+
/******************************************************************
* SwXTextView
******************************************************************/
-/*-- 17.12.98 09:34:25---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextView::SwXTextView(SwView* pSwView) :
SfxBaseController(pSwView),
m_pView(pSwView),
@@ -124,16 +120,12 @@ SwXTextView::SwXTextView(SwView* pSwView) :
{
}
-/*-- 17.12.98 09:34:25---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextView::~SwXTextView()
{
Invalidate();
}
-/* -----------------------------09.03.01 15:47--------------------------------
- ---------------------------------------------------------------------------*/
void SwXTextView::Invalidate()
{
if(pxViewSettings)
@@ -174,12 +166,8 @@ void SwXTextView::Invalidate()
m_pView = 0;
}
-/* -----------------------------18.05.00 10:18--------------------------------
-
- ---------------------------------------------------------------------------*/
Sequence< uno::Type > SAL_CALL SwXTextView::getTypes( ) throw(uno::RuntimeException)
{
-// uno::Sequence< uno::Type > aViewTypes = SwXTextViewBaseClass::getTypes();
uno::Sequence< uno::Type > aBaseTypes = SfxBaseController::getTypes();
long nIndex = aBaseTypes.getLength();
@@ -197,12 +185,10 @@ Sequence< uno::Type > SAL_CALL SwXTextView::getTypes( ) throw(uno::RuntimeExcep
pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<datatransfer::XTransferableSupplier >*)0);
return aBaseTypes;
}
-/* -----------------------------18.05.00 10:18--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< sal_Int8 > SAL_CALL SwXTextView::getImplementationId( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
static Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
@@ -212,23 +198,17 @@ Sequence< sal_Int8 > SAL_CALL SwXTextView::getImplementationId( ) throw(uno::Ru
}
return aId;
}
-/* -----------------------------18.05.00 10:18--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextView::acquire( )throw()
{
SfxBaseController::acquire();
}
-/* -----------------------------18.05.00 10:18--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextView::release( )throw()
{
SfxBaseController::release();
}
-/* -----------------------------18.05.00 10:23--------------------------------
- ---------------------------------------------------------------------------*/
uno::Any SAL_CALL SwXTextView::queryInterface( const uno::Type& aType )
throw (RuntimeException)
{
@@ -282,12 +262,10 @@ uno::Any SAL_CALL SwXTextView::queryInterface( const uno::Type& aType )
aRet = SfxBaseController::queryInterface(aType);
return aRet;
}
-/*-- 17.12.98 09:34:26---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< uno::XInterface > xInterface;
if(GetView() && (aInterface >>= xInterface))
{
@@ -476,7 +454,6 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
SdrObject *pObj = pSvxShape->GetSdrObject();
if (pObj)
{
-// lcl_ShowObject( *m_pViewSh, *pDrawView, pObj );
SdrPageView* pPV = pDrawView->GetSdrPageView();
if ( pPV && pObj->GetPage() == pPV->GetPage() )
{
@@ -509,7 +486,6 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
{
if (!pPV) // erstes Objekt
{
-// lcl_ShowObject( *m_pViewSh, *pDrawView, pObj );
pPV = pDrawView->GetSdrPageView();
}
if ( pPV && pObj->GetPage() == pPV->GetPage() )
@@ -529,12 +505,10 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
return sal_False;
}
-/*-- 17.12.98 09:34:26---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXTextView::getSelection(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< uno::XInterface > aRef;
if(GetView())
{
@@ -549,7 +523,7 @@ uno::Any SwXTextView::getSelection(void) throw( uno::RuntimeException )
{
if(rSh.GetTableCrsr())
{
- DBG_ASSERT(rSh.GetTableFmt(), "kein Tabellenformat?");
+ OSL_ENSURE(rSh.GetTableFmt(), "kein Tabellenformat?");
uno::Reference< text::XTextTableCursor > xCrsr = new SwXTextTableCursor(*rSh.GetTableFmt(),
rSh.GetTableCrsr());
aRef = uno::Reference< uno::XInterface > (xCrsr, uno::UNO_QUERY);;
@@ -635,26 +609,22 @@ uno::Any SwXTextView::getSelection(void) throw( uno::RuntimeException )
uno::Any aRet(&aRef, ::getCppuType((uno::Reference<uno::XInterface>*)0));
return aRet;
}
-/*-- 17.12.98 09:34:27---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextView::addSelectionChangeListener(
const uno::Reference< view::XSelectionChangeListener > & rxListener)
throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< view::XSelectionChangeListener > * pInsert = new uno::Reference< view::XSelectionChangeListener > ;
*pInsert = rxListener;
aSelChangedListeners.Insert(pInsert, aSelChangedListeners.Count());
}
-/*-- 17.12.98 09:34:27---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextView::removeSelectionChangeListener(
const uno::Reference< view::XSelectionChangeListener > & rxListener)
throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
view::XSelectionChangeListener* pLeft = rxListener.get();
for(sal_uInt16 i = 0; i < aSelChangedListeners.Count(); i++)
{
@@ -668,9 +638,7 @@ void SwXTextView::removeSelectionChangeListener(
}
}
}
-/* -----------------------------01.06.01 14:41--------------------------------
- ---------------------------------------------------------------------------*/
SdrObject* SwXTextView::GetControl(
const uno::Reference< awt::XControlModel > & xModel,
uno::Reference< awt::XControl >& xToFill )
@@ -680,37 +648,32 @@ SdrObject* SwXTextView::GetControl(
SdrView* pDrawView = pView2 ? pView2->GetDrawView() : NULL;
Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL;
- DBG_ASSERT( pFormShell && pDrawView && pWindow, "SwXTextView::GetControl: how could I?" );
+ OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::GetControl: how could I?" );
SdrObject* pControl = NULL;
if ( pFormShell && pDrawView && pWindow )
pControl = pFormShell->GetFormControl( xModel, *pDrawView, *pWindow, xToFill );
return pControl;
}
-/*-- 17.12.98 09:34:27---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< awt::XControl > SwXTextView::getControl(const uno::Reference< awt::XControlModel > & xModel)
throw( container::NoSuchElementException, uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< awt::XControl > xRet;
GetControl(xModel, xRet);
return xRet;
}
-/*-- 08.03.07 13:55------------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< form::runtime::XFormController > SAL_CALL SwXTextView::getFormController( const uno::Reference< form::XForm >& _Form ) throw (RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
SwView* pView2 = GetView();
FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
SdrView* pDrawView = pView2 ? pView2->GetDrawView() : NULL;
Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL;
- DBG_ASSERT( pFormShell && pDrawView && pWindow, "SwXTextView::getFormController: how could I?" );
+ OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::getFormController: how could I?" );
uno::Reference< form::runtime::XFormController > xController;
if ( pFormShell && pDrawView && pWindow )
@@ -718,35 +681,26 @@ uno::Reference< form::runtime::XFormController > SAL_CALL SwXTextView::getFormCo
return xController;
}
-/*-- 08.03.07 13:55------------------------------------------------------
-
- -----------------------------------------------------------------------*/
::sal_Bool SAL_CALL SwXTextView::isFormDesignMode( ) throw (uno::RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
SwView* pView2 = GetView();
FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
return pFormShell ? pFormShell->IsDesignMode() : sal_True;
}
-/*-- 08.03.07 13:55------------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SAL_CALL SwXTextView::setFormDesignMode( ::sal_Bool _DesignMode ) throw (RuntimeException)
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
SwView* pView2 = GetView();
FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
if ( pFormShell )
pFormShell->SetDesignMode( _DesignMode );
}
-/*-- 17.12.98 09:34:28---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextViewCursor > SwXTextView::getViewCursor(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(GetView())
{
if(!pxTextViewCursor)
@@ -759,12 +713,10 @@ uno::Reference< text::XTextViewCursor > SwXTextView::getViewCursor(void) throw(
else
throw uno::RuntimeException();
}
-/*-- 17.12.98 09:34:28---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySet > SwXTextView::getViewSettings(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_pView)
{
if(!pxViewSettings)
@@ -777,12 +729,10 @@ uno::Reference< beans::XPropertySet > SwXTextView::getViewSettings(void) throw(
throw uno::RuntimeException();
return *pxViewSettings;
}
-/* -----------------------------30.01.01 15:01--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAutomatic*/ ) throw(RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!GetView())
throw RuntimeException();
@@ -810,29 +760,27 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto
pRet[n].realloc(5);
PropertyValue* pValues = pRet[n].getArray();
- pValues[0].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_RUBY_BASE_TEXT));
+ pValues[0].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_BASE_TEXT));
pValues[0].Value <<= OUString(rEntryText);
- pValues[1].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_RUBY_TEXT));
+ pValues[1].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_TEXT));
pValues[1].Value <<= OUString(rAttr.GetText());
- pValues[2].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_RUBY_CHAR_STYLE_NAME));
+ pValues[2].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_CHAR_STYLE_NAME));
SwStyleNameMapper::FillProgName(rAttr.GetCharFmtName(), aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True );
pValues[2].Value <<= OUString( aString );
- pValues[3].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_RUBY_ADJUST));
+ pValues[3].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_ADJUST));
pValues[3].Value <<= (sal_Int16)rAttr.GetAdjustment();
- pValues[4].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_RUBY_IS_ABOVE));
+ pValues[4].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_IS_ABOVE));
sal_Bool bVal = !rAttr.GetPosition();
pValues[4].Value.setValue(&bVal, ::getBooleanCppuType());
}
return aRet;
}
-/* -----------------------------30.01.01 15:02--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextView::setRubyList(
const Sequence< Sequence< PropertyValue > >& rRubyList, sal_Bool /*bAutomatic*/ )
throw(RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!GetView() || !rRubyList.getLength())
throw RuntimeException();
@@ -900,9 +848,7 @@ void SAL_CALL SwXTextView::setRubyList(
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
pDoc->SetRubyList( *rSh.GetCrsr(), aList, 0 );
}
-/*-- 29.12.02 15:45:29---------------------------------------------------
- -----------------------------------------------------------------------*/
SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc()
{
SwWrtShell& rOldSh = m_pView->GetWrtShell();
@@ -938,12 +884,9 @@ SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc()
return xDocSh;
}
-/*-- 17.12.98 09:34:29---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXTextView::NotifySelChanged()
{
- DBG_ASSERT( m_pView, "view is missing" );
+ OSL_ENSURE( m_pView, "view is missing" );
// destroy temporary document with selected text that is used
// in PDF export of (multi-)selections.
@@ -964,13 +907,11 @@ void SwXTextView::NotifySelChanged()
(*pObj)->selectionChanged(aEvent);
}
}
-/* -----------------------------12.07.01 13:26--------------------------------
- ---------------------------------------------------------------------------*/
void SwXTextView::NotifyDBChanged()
{
URL aURL;
- aURL.Complete = C2U(SwXDispatch::GetDBChangeURL());
+ aURL.Complete = rtl::OUString::createFromAscii(SwXDispatch::GetDBChangeURL());
sal_uInt16 nCount = aSelChangedListeners.Count();
for ( sal_uInt16 i = nCount; i--; )
@@ -982,24 +923,19 @@ void SwXTextView::NotifyDBChanged()
}
}
-/* -----------------------------10.12.04 11:07--------------------------------
-
- ---------------------------------------------------------------------------*/
-
uno::Reference< beans::XPropertySetInfo > SAL_CALL SwXTextView::getPropertySetInfo( )
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
static uno::Reference< XPropertySetInfo > aRef = m_pPropSet->getPropertySetInfo();
return aRef;
}
-
void SAL_CALL SwXTextView::setPropertyValue(
const OUString& rPropertyName, const uno::Any& rValue )
throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( rPropertyName );
if (!pEntry)
throw UnknownPropertyException();
@@ -1025,17 +961,16 @@ void SAL_CALL SwXTextView::setPropertyValue(
}
break;
default :
- DBG_ERROR("unknown WID");
+ OSL_ENSURE(false, "unknown WID");
}
}
}
-
uno::Any SAL_CALL SwXTextView::getPropertyValue(
const OUString& rPropertyName )
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
Any aRet;
@@ -1076,67 +1011,56 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue(
}
break;
default :
- DBG_ERROR("unknown WID");
+ OSL_ENSURE(false, "unknown WID");
}
}
return aRet;
}
-
void SAL_CALL SwXTextView::addPropertyChangeListener(
const OUString& /*rPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*rxListener*/ )
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- DBG_WARNING("not implemented");
+ OSL_ENSURE(false, "not implemented");
}
-
void SAL_CALL SwXTextView::removePropertyChangeListener(
const OUString& /*rPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*rxListener*/ )
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- DBG_WARNING("not implemented");
+ OSL_ENSURE(false, "not implemented");
}
-
void SAL_CALL SwXTextView::addVetoableChangeListener(
const OUString& /*rPropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*rxListener*/ )
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- DBG_WARNING("not implemented");
+ OSL_ENSURE(false, "not implemented");
}
-
void SAL_CALL SwXTextView::removeVetoableChangeListener(
const OUString& /*rPropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*rxListener*/ )
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- DBG_WARNING("not implemented");
+ OSL_ENSURE(false, "not implemented");
}
-/* -----------------------------06.04.00 11:07--------------------------------
-
- ---------------------------------------------------------------------------*/
OUString SwXTextView::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXTextView");
}
-/* -----------------------------06.04.00 11:07--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXTextView::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return rServiceName.equalsAscii("com.sun.star.text.TextDocumentView") ||
- rServiceName.equalsAscii("com.sun.star.view.OfficeDocumentView");
+ return rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextDocumentView")) ||
+ rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.view.OfficeDocumentView"));
}
-/* -----------------------------06.04.00 11:07--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXTextView::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(2);
@@ -1149,23 +1073,15 @@ Sequence< OUString > SwXTextView::getSupportedServiceNames(void) throw( RuntimeE
/******************************************************************
* SwXTextViewCursor
******************************************************************/
-/*-- 17.12.98 09:36:23---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXTextViewCursor::SwXTextViewCursor(SwView* pVw) :
m_pView(pVw),
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR))
{
}
-/*-- 17.12.98 09:36:24---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXTextViewCursor::~SwXTextViewCursor()
{
}
-/*-- 06.10.04 09:36:25---------------------------------------------------
-
- -----------------------------------------------------------------------*/
// used to determine if there is a text selction or not.
// If there is no text selection the functions that need a working
@@ -1175,12 +1091,11 @@ SwXTextViewCursor::~SwXTextViewCursor()
// - XTextCursor
// - XTextRange
// - XLineCursor
-
sal_Bool SwXTextViewCursor::IsTextSelection( sal_Bool bAllowTables ) const
{
sal_Bool bRes = sal_False;
- DBG_ASSERT(m_pView, "m_pView is NULL ???");
+ OSL_ENSURE(m_pView, "m_pView is NULL ???");
if(m_pView)
{
//! m_pView->GetShellMode() will only work after the shell
@@ -1193,29 +1108,22 @@ sal_Bool SwXTextViewCursor::IsTextSelection( sal_Bool bAllowTables ) const
return bRes;
}
-/*-- 17.12.98 09:36:25---------------------------------------------------
-
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::isVisible(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
- DBG_WARNING("not implemented");
+ SolarMutexGuard aGuard;
+ OSL_ENSURE(false, "not implemented");
return sal_True;
}
-/*-- 17.12.98 09:36:25---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextViewCursor::setVisible(sal_Bool /*bVisible*/) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
- DBG_WARNING("not implemented");
+ SolarMutexGuard aGuard;
+ OSL_ENSURE(false, "not implemented");
}
-/*-- 17.12.98 09:36:26---------------------------------------------------
- -----------------------------------------------------------------------*/
awt::Point SwXTextViewCursor::getPosition(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
awt::Point aRet;
if(m_pView)
{
@@ -1236,12 +1144,10 @@ awt::Point SwXTextViewCursor::getPosition(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return aRet;
}
-/*-- 17.12.98 09:36:26---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextViewCursor::collapseToStart(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_pView)
{
if (!IsTextSelection())
@@ -1261,12 +1167,10 @@ void SwXTextViewCursor::collapseToStart(void) throw( uno::RuntimeException )
else
throw uno::RuntimeException();
}
-/*-- 17.12.98 09:36:26---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextViewCursor::collapseToEnd(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_pView)
{
if (!IsTextSelection())
@@ -1286,12 +1190,10 @@ void SwXTextViewCursor::collapseToEnd(void) throw( uno::RuntimeException )
else
throw uno::RuntimeException();
}
-/*-- 17.12.98 09:36:27---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::isCollapsed(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
{
@@ -1306,12 +1208,10 @@ sal_Bool SwXTextViewCursor::isCollapsed(void) throw( uno::RuntimeException )
return bRet;
}
-/*-- 17.12.98 09:36:27---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::goLeft(sal_Int16 nCount, sal_Bool bExpand) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
{
@@ -1325,12 +1225,10 @@ sal_Bool SwXTextViewCursor::goLeft(sal_Int16 nCount, sal_Bool bExpand) throw( un
throw uno::RuntimeException();
return bRet;
}
-/*-- 17.12.98 09:36:27---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::goRight(sal_Int16 nCount, sal_Bool bExpand) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
{
@@ -1345,15 +1243,13 @@ sal_Bool SwXTextViewCursor::goRight(sal_Int16 nCount, sal_Bool bExpand) throw( u
return bRet;
}
-/* -----------------08.03.99 11:18-------------------
- *
- * --------------------------------------------------*/
+
void SwXTextViewCursor::gotoRange(
const uno::Reference< text::XTextRange > & xRange,
sal_Bool bExpand)
throw(RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_pView && xRange.is())
{
if (!IsTextSelection())
@@ -1489,12 +1385,10 @@ void SwXTextViewCursor::gotoRange(
throw uno::RuntimeException();
}
-/*-- 17.12.98 09:36:28---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextViewCursor::gotoStart(sal_Bool bExpand) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_pView)
{
if (!IsTextSelection())
@@ -1505,12 +1399,10 @@ void SwXTextViewCursor::gotoStart(sal_Bool bExpand) throw( uno::RuntimeException
else
throw uno::RuntimeException();
}
-/*-- 17.12.98 09:36:28---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextViewCursor::gotoEnd(sal_Bool bExpand) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_pView)
{
if (!IsTextSelection())
@@ -1521,12 +1413,10 @@ void SwXTextViewCursor::gotoEnd(sal_Bool bExpand) throw( uno::RuntimeException )
else
throw uno::RuntimeException();
}
-/*-- 17.12.98 09:36:28---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::jumpToFirstPage(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
{
@@ -1543,12 +1433,10 @@ sal_Bool SwXTextViewCursor::jumpToFirstPage(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return bRet;
}
-/*-- 17.12.98 09:36:29---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::jumpToLastPage(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
{
@@ -1566,12 +1454,10 @@ sal_Bool SwXTextViewCursor::jumpToLastPage(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return bRet;
}
-/*-- 17.12.98 09:36:30---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::jumpToPage(sal_Int16 nPage) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
bRet = m_pView->GetWrtShell().GotoPage(nPage, sal_True);
@@ -1579,12 +1465,10 @@ sal_Bool SwXTextViewCursor::jumpToPage(sal_Int16 nPage) throw( uno::RuntimeExcep
throw uno::RuntimeException();
return bRet;
}
-/*-- 17.12.98 09:36:30---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::jumpToNextPage(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
bRet = m_pView->GetWrtShell().SttNxtPg();
@@ -1592,12 +1476,10 @@ sal_Bool SwXTextViewCursor::jumpToNextPage(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return bRet;
}
-/*-- 17.12.98 09:36:31---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::jumpToPreviousPage(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
bRet = m_pView->GetWrtShell().EndPrvPg();
@@ -1605,12 +1487,10 @@ sal_Bool SwXTextViewCursor::jumpToPreviousPage(void) throw( uno::RuntimeExceptio
throw uno::RuntimeException();
return bRet;
}
-/*-- 17.12.98 09:36:32---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::jumpToEndOfPage(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
bRet = m_pView->GetWrtShell().EndPg();
@@ -1618,12 +1498,10 @@ sal_Bool SwXTextViewCursor::jumpToEndOfPage(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return bRet;
}
-/*-- 17.12.98 09:36:32---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::jumpToStartOfPage(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
bRet = m_pView->GetWrtShell().SttPg();
@@ -1631,12 +1509,10 @@ sal_Bool SwXTextViewCursor::jumpToStartOfPage(void) throw( uno::RuntimeException
throw uno::RuntimeException();
return bRet;
}
-/* -----------------04.10.99 14:21-------------------
- --------------------------------------------------*/
sal_Int16 SwXTextViewCursor::getPage(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
short nRet = 0;
if(m_pView)
{
@@ -1648,12 +1524,10 @@ sal_Int16 SwXTextViewCursor::getPage(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return nRet;
}
-/*-- 17.12.98 09:36:33---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::screenDown(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
{
@@ -1666,12 +1540,10 @@ sal_Bool SwXTextViewCursor::screenDown(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return bRet;
}
-/*-- 17.12.98 09:36:33---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::screenUp(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
{
@@ -1684,12 +1556,10 @@ sal_Bool SwXTextViewCursor::screenUp(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return bRet;
}
-/*-- 17.12.98 11:59:05---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XText > SwXTextViewCursor::getText(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XText > xRet;
if(m_pView)
{
@@ -1705,12 +1575,10 @@ uno::Reference< text::XText > SwXTextViewCursor::getText(void) throw( uno::Runt
throw uno::RuntimeException();
return xRet;
}
-/*-- 17.12.98 11:59:05---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SwXTextViewCursor::getStart(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > xRet;
if(m_pView)
{
@@ -1726,12 +1594,10 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart(void) throw( uno
throw uno::RuntimeException();
return xRet;
}
-/*-- 17.12.98 11:59:06---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > xRet;
if(m_pView)
{
@@ -1747,12 +1613,10 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd(void) throw( uno::
throw uno::RuntimeException();
return xRet;
}
-/* -----------------12.10.99 09:03-------------------
- --------------------------------------------------*/
OUString SwXTextViewCursor::getString(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
OUString uRet;
if(m_pView)
{
@@ -1780,12 +1644,10 @@ OUString SwXTextViewCursor::getString(void) throw( uno::RuntimeException )
}
return uRet;
}
-/*-- 17.12.98 11:59:06---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextViewCursor::setString(const OUString& aString) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_pView)
{
if (!IsTextSelection( sal_False ))
@@ -1812,22 +1674,17 @@ void SwXTextViewCursor::setString(const OUString& aString) throw( uno::RuntimeEx
}
}
-/*-- 29.06.00 17:33:38---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< XPropertySetInfo > SwXTextViewCursor::getPropertySetInfo( ) throw(RuntimeException)
{
static uno::Reference< XPropertySetInfo > xRef = m_pPropSet->getPropertySetInfo();
return xRef;
}
-/*-- 29.06.00 17:33:39---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextViewCursor::setPropertyValue( const OUString& rPropertyName, const Any& aValue )
throw(UnknownPropertyException, PropertyVetoException,
IllegalArgumentException, WrappedTargetException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_pView)
{
SwWrtShell& rSh = m_pView->GetWrtShell();
@@ -1844,13 +1701,11 @@ void SwXTextViewCursor::setPropertyValue( const OUString& rPropertyName, const
else
throw RuntimeException();
}
-/*-- 29.06.00 17:33:39---------------------------------------------------
- -----------------------------------------------------------------------*/
Any SwXTextViewCursor::getPropertyValue( const OUString& rPropertyName )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Any aRet;
if(m_pView)
{
@@ -1863,44 +1718,34 @@ Any SwXTextViewCursor::getPropertyValue( const OUString& rPropertyName )
throw RuntimeException();
return aRet;
}
-/*-- 29.06.00 17:33:40---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextViewCursor::addPropertyChangeListener(
const OUString& /*aPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
}
-/*-- 29.06.00 17:33:40---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextViewCursor::removePropertyChangeListener(
const OUString& /*aPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*aListener*/ )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
}
-/*-- 29.06.00 17:33:41---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextViewCursor::addVetoableChangeListener(
const OUString& /*PropertyName*/, const uno::Reference< XVetoableChangeListener >& /*aListener*/ )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
}
-/*-- 29.06.00 17:33:41---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextViewCursor::removeVetoableChangeListener(
const OUString& /*PropertyName*/, const uno::Reference< XVetoableChangeListener >& /*aListener*/ ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
}
-/*-- 29.06.00 17:33:41---------------------------------------------------
- -----------------------------------------------------------------------*/
PropertyState SwXTextViewCursor::getPropertyState( const OUString& rPropertyName )
throw(UnknownPropertyException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
PropertyState eState;
if(m_pView)
{
@@ -1913,13 +1758,11 @@ PropertyState SwXTextViewCursor::getPropertyState( const OUString& rPropertyNam
throw RuntimeException();
return eState;
}
-/*-- 29.06.00 17:33:42---------------------------------------------------
- -----------------------------------------------------------------------*/
Sequence< PropertyState > SwXTextViewCursor::getPropertyStates(
const Sequence< OUString >& rPropertyNames ) throw(UnknownPropertyException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Sequence< PropertyState > aRet;
if(m_pView)
{
@@ -1930,13 +1773,11 @@ Sequence< PropertyState > SwXTextViewCursor::getPropertyStates(
}
return aRet;
}
-/*-- 29.06.00 17:33:42---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextViewCursor::setPropertyToDefault( const OUString& rPropertyName )
throw(UnknownPropertyException, RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_pView)
{
SwWrtShell& rSh = m_pView->GetWrtShell();
@@ -1945,14 +1786,12 @@ void SwXTextViewCursor::setPropertyToDefault( const OUString& rPropertyName )
*pShellCrsr, *m_pPropSet, rPropertyName);
}
}
-/*-- 29.06.00 17:33:43---------------------------------------------------
- -----------------------------------------------------------------------*/
Any SwXTextViewCursor::getPropertyDefault( const OUString& rPropertyName )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
Any aRet;
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_pView)
{
SwWrtShell& rSh = m_pView->GetWrtShell();
@@ -1962,12 +1801,10 @@ Any SwXTextViewCursor::getPropertyDefault( const OUString& rPropertyName )
}
return aRet;
}
-/*-- 28.09.99 08:31:19---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::goDown(sal_Int16 nCount, sal_Bool bExpand) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
{
@@ -1981,12 +1818,10 @@ sal_Bool SwXTextViewCursor::goDown(sal_Int16 nCount, sal_Bool bExpand) throw( un
throw uno::RuntimeException();
return bRet;
}
-/*-- 28.09.99 08:31:20---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::goUp(sal_Int16 nCount, sal_Bool bExpand) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
{
@@ -2000,12 +1835,10 @@ sal_Bool SwXTextViewCursor::goUp(sal_Int16 nCount, sal_Bool bExpand) throw( uno:
throw uno::RuntimeException();
return bRet;
}
-/*-- 28.09.99 08:31:20---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::isAtStartOfLine(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
{
@@ -2018,12 +1851,10 @@ sal_Bool SwXTextViewCursor::isAtStartOfLine(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return bRet;
}
-/*-- 28.09.99 08:31:21---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::isAtEndOfLine(void) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
{
@@ -2036,12 +1867,10 @@ sal_Bool SwXTextViewCursor::isAtEndOfLine(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return bRet;
}
-/*-- 28.09.99 08:31:21---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextViewCursor::gotoEndOfLine(sal_Bool bExpand) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_pView)
{
if (!IsTextSelection( sal_False ))
@@ -2052,12 +1881,10 @@ void SwXTextViewCursor::gotoEndOfLine(sal_Bool bExpand) throw( uno::RuntimeExcep
else
throw uno::RuntimeException();
}
-/*-- 28.09.99 08:31:22---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXTextViewCursor::gotoStartOfLine(sal_Bool bExpand) throw( uno::RuntimeException )
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_pView)
{
if (!IsTextSelection( sal_False ))
@@ -2068,16 +1895,12 @@ void SwXTextViewCursor::gotoStartOfLine(sal_Bool bExpand) throw( uno::RuntimeExc
else
throw uno::RuntimeException();
}
-/* -----------------------------06.04.00 11:07--------------------------------
- ---------------------------------------------------------------------------*/
OUString SwXTextViewCursor::getImplementationName(void) throw( RuntimeException )
{
return C2U("SwXTextViewCursor");
}
-/* -----------------------------06.04.00 11:07--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXTextViewCursor::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return !rServiceName.compareToAscii("com.sun.star.text.TextViewCursor") ||
@@ -2088,9 +1911,7 @@ sal_Bool SwXTextViewCursor::supportsService(const OUString& rServiceName) throw(
!rServiceName.compareToAscii("com.sun.star.style.ParagraphPropertiesAsian") ||
!rServiceName.compareToAscii("com.sun.star.style.ParagraphPropertiesComplex");
}
-/* -----------------------------06.04.00 11:07--------------------------------
- ---------------------------------------------------------------------------*/
Sequence< OUString > SwXTextViewCursor::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(7);
@@ -2104,17 +1925,13 @@ Sequence< OUString > SwXTextViewCursor::getSupportedServiceNames(void) throw( Ru
pArray[6] = C2U("com.sun.star.style.ParagraphPropertiesComplex");
return aRet;
}
-/* -----------------------------03.03.03 11:07--------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXTextViewCursor::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------03.03.03 11:07--------------------------------
- ---------------------------------------------------------------------------*/
//XUnoTunnel
sal_Int64 SAL_CALL SwXTextViewCursor::getSomething(
const uno::Sequence< sal_Int8 >& rId )
@@ -2128,7 +1945,6 @@ sal_Int64 SAL_CALL SwXTextViewCursor::getSomething(
}
return OTextCursorHelper::getSomething(rId);;
}
-// -----------------------------------------------------------------------------
IMPLEMENT_FORWARD_XINTERFACE2(SwXTextViewCursor,SwXTextViewCursor_Base,OTextCursorHelper)
const SwDoc* SwXTextViewCursor::GetDoc() const
@@ -2136,19 +1952,19 @@ const SwDoc* SwXTextViewCursor::GetDoc() const
SwWrtShell& rSh = m_pView->GetWrtShell();
return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : 0;
}
-// -----------------------------------------------------------------------------
+
SwDoc* SwXTextViewCursor::GetDoc()
{
SwWrtShell& rSh = m_pView->GetWrtShell();
return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : 0;
}
-// -----------------------------------------------------------------------------
+
const SwPaM* SwXTextViewCursor::GetPaM() const
{
SwWrtShell& rSh = m_pView->GetWrtShell();
return rSh.GetCrsr();
}
-// -----------------------------------------------------------------------------
+
SwPaM* SwXTextViewCursor::GetPaM()
{
SwWrtShell& rSh = m_pView->GetWrtShell();
@@ -2157,7 +1973,7 @@ SwPaM* SwXTextViewCursor::GetPaM()
uno::Reference< datatransfer::XTransferable > SAL_CALL SwXTextView::getTransferable( ) throw (uno::RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
//force immediat shell update
GetView()->StopShellTimer();
@@ -2181,7 +1997,7 @@ uno::Reference< datatransfer::XTransferable > SAL_CALL SwXTextView::getTransfera
void SAL_CALL SwXTextView::insertTransferable( const uno::Reference< datatransfer::XTransferable >& xTrans ) throw (datatransfer::UnsupportedFlavorException, uno::RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
//force immediat shell update
GetView()->StopShellTimer();
@@ -2205,5 +2021,4 @@ void SAL_CALL SwXTextView::insertTransferable( const uno::Reference< datatransfe
}
}
-// -----------------------------------------------------------------------------
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index 1b4dcc90f82d..79b59b8b66ea 100644
--- a/sw/source/ui/utlui/attrdesc.cxx
+++ b/sw/source/ui/utlui/attrdesc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,9 +61,7 @@
#include <charfmt.hxx>
#include <fmtcol.hxx>
#include <tox.hxx>
-#ifndef _ATTRDESC_HRC
#include <attrdesc.hrc>
-#endif
#include <fmtftntx.hxx>
#include <fmtfollowtextflow.hxx>
@@ -72,14 +71,14 @@ using namespace com::sun::star;
TYPEINIT2(SwFmtCharFmt,SfxPoolItem,SwClient);
-// erfrage die Attribut-Beschreibung
+// query the attribute descriptions
void SwAttrSet::GetPresentation(
SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText ) const
{
-static sal_Char __READONLY_DATA sKomma[] = ", ";
+static sal_Char const sKomma[] = ", ";
rText.Erase();
String aStr;
@@ -912,20 +911,12 @@ SfxItemPresentation SwFmtFtnEndAtTxtEnd::GetPresentation
switch( GetValue() )
{
case FTNEND_ATPGORDOCEND:
-// rText = SW_RESSTR( STR_LAYOUT_FTN );
break;
case FTNEND_ATTXTEND:
break;
case FTNEND_ATTXTEND_OWNNUMSEQ:
- {
-// String sPrefix;
-// String sSuffix;
-// SvxNumberType aFmt;
-// sal_uInt16 nOffset;
-// rText +=
- }
break;
}
}
@@ -1063,20 +1054,6 @@ SfxItemPresentation SwHeaderAndFooterEatSpacingItem::GetPresentation
const IntlWrapper* /*pIntl*/
) const
{
-// rText.Erase();
-// switch ( ePres )
-// {
-// case SFX_ITEM_PRESENTATION_NONE:
-// rText.Erase();
-// break;
-// case SFX_ITEM_PRESENTATION_NAMELESS:
-// case SFX_ITEM_PRESENTATION_COMPLETE:
-// {
-// if ( GetValue() )
-// rText = SW_RESSTR(STR_EDIT_IN_READONLY);
-// return ePres;
-// }
-// }
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -1348,3 +1325,4 @@ SfxItemPresentation SwFmtFollowTextFlow::GetPresentation( SfxItemPresentation eP
return ePres;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/attrdesc.src b/sw/source/ui/utlui/attrdesc.src
index 809af110da6f..474ff791e7ec 100644
--- a/sw/source/ui/utlui/attrdesc.src
+++ b/sw/source/ui/utlui/attrdesc.src
@@ -32,7 +32,6 @@
---------------------------------------------------------------------*/
String STR_DROP_OVER
{
- /* ### ACHTUNG: Neuer Text in Resource? Initialen über : Initialen ³ber */
Text [ en-US ] = "Drop Caps over" ;
};
String STR_DROP_LINES
@@ -77,12 +76,10 @@ String STR_NO_CHARFMT
};
String STR_FOOTER
{
- /* ### ACHTUNG: Neuer Text in Resource? Fußzeile : Fu˜zeile */
Text [ en-US ] = "Footer" ;
};
String STR_NO_FOOTER
{
- /* ### ACHTUNG: Neuer Text in Resource? keine Fußzeile : keine Fu˜zeile */
Text [ en-US ] = "No footer" ;
};
String STR_HEADER
@@ -127,7 +124,6 @@ String STR_SURROUND_INSIDE
};
String STR_SURROUND_OUTSIDE
{
- /* ### ACHTUNG: Neuer Text in Resource? Umlauf außen : Umlauf au˜en */
Text [ en-US ] = "Outer wrap" ;
};
String STR_SURROUND_ANCHORONLY
@@ -140,12 +136,10 @@ String STR_FRM_WIDTH
};
String STR_FRM_FIXEDHEIGHT
{
- /* ### ACHTUNG: Neuer Text in Resource? feste Höhe: : feste H÷he: */
Text [ en-US ] = "Fixed height:" ;
};
String STR_FRM_MINHEIGHT
{
- /* ### ACHTUNG: Neuer Text in Resource? min. Höhe: : min. H÷he: */
Text [ en-US ] = "Min. height:" ;
};
String STR_FLY_AT_PARA
@@ -218,7 +212,6 @@ String STR_HORI_INSIDE
};
String STR_HORI_OUTSIDE
{
- /* ### ACHTUNG: Neuer Text in Resource? außen : au˜en */
Text [ en-US ] = "outside" ;
};
String STR_HORI_FULL
@@ -235,17 +228,10 @@ String STR_LINE_WIDTH
};
String STR_MAX_FTN_HEIGHT
{
- /* ### ACHTUNG: Neuer Text in Resource? max. Fußnotenbereich: : max. Fu˜notenbereich: */
Text [ en-US ] = "Max. footnote area:" ;
};
String STR_EDIT_IN_READONLY
{
- /* ### ACHTUNG: Neuer Text in Resource? editierbar im schreibgeschütztem Dokument : editierbar im Schreibeschütztem Dokument */
- /* ### ACHTUNG: Neuer Text in Resource? editierbar im schreibgeschütztem Dokument : editierbar im Schreibeschütztem Dokument */
- /* ### ACHTUNG: Neuer Text in Resource? editierbar im schreibgeschütztem Dokument : editierbar im Schreibeschütztem Dokument */
- /* ### ACHTUNG: Neuer Text in Resource? editierbar im schreibgeschütztem Dokument : editierbar im Schreibeschütztem Dokument */
- /* ### ACHTUNG: Neuer Text in Resource? editierbar im schreibgeschütztem Dokument : editierbar im Schreibeschütztem Dokument */
- /* ### ACHTUNG: Neuer Text in Resource? editierbar im schreibgeschütztem Dokument : editierbar im schreibgesch³tztem Dokument */
Text [ en-US ] = "Editable in read-only document" ;
};
String STR_LAYOUT_SPLIT
diff --git a/sw/source/ui/utlui/bookctrl.cxx b/sw/source/ui/utlui/bookctrl.cxx
index 5b112f84ba0d..9836dc827e05 100644
--- a/sw/source/ui/utlui/bookctrl.cxx
+++ b/sw/source/ui/utlui/bookctrl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,17 +38,10 @@
#include <svl/intitem.hxx>
#include <svl/stritem.hxx>
#include <sfx2/dispatch.hxx>
-#ifndef _EVENT_HXX //autogen
#include <vcl/event.hxx>
-#endif
-#ifndef _STATUS_HXX //autogen
#include <vcl/status.hxx>
-#endif
-#ifndef _MENU_HXX //autogen
#include <vcl/menu.hxx>
-#endif
#include "cmdid.h"
-#include "errhdl.hxx"
#include "swmodule.hxx"
#include "wrtsh.hxx"
#include "IMark.hxx"
@@ -71,16 +65,12 @@ private:
virtual void Select();
};
-// -----------------------------------------------------------------------
-
BookmarkPopup_Impl::BookmarkPopup_Impl() :
PopupMenu(),
nCurId(USHRT_MAX)
{
}
-// -----------------------------------------------------------------------
-
void BookmarkPopup_Impl::Select()
{
nCurId = GetCurItemId();
@@ -95,14 +85,10 @@ SwBookmarkControl::SwBookmarkControl( sal_uInt16 _nSlotId,
{
}
-// -----------------------------------------------------------------------
-
SwBookmarkControl::~SwBookmarkControl()
{
}
-// -----------------------------------------------------------------------
-
void SwBookmarkControl::StateChanged(
sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
@@ -115,15 +101,11 @@ void SwBookmarkControl::StateChanged(
}
}
-// -----------------------------------------------------------------------
-
void SwBookmarkControl::Paint( const UserDrawEvent& )
{
GetStatusBar().SetItemText( GetId(), sPageNumber );
}
-// -----------------------------------------------------------------------
-
void SwBookmarkControl::Command( const CommandEvent& rCEvt )
{
if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU &&
@@ -162,3 +144,5 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt )
ReleaseMouse();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/condedit.cxx b/sw/source/ui/utlui/condedit.cxx
index ed2379dae8b1..72994ff0f671 100644
--- a/sw/source/ui/utlui/condedit.cxx
+++ b/sw/source/ui/utlui/condedit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,14 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-// include ---------------------------------------------------------------
-
-
#include <sot/formats.hxx>
-#ifndef _CONDEDIT_HXX
#include <condedit.hxx>
-#endif
#include <svx/dbaexchange.hxx>
using namespace ::svx;
using ::rtl::OUString;
@@ -44,10 +40,6 @@ using namespace ::com::sun::star::uno;
// STATIC DATA -----------------------------------------------------------
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
ConditionEdit::ConditionEdit( Window* pParent, const ResId& rResId )
: Edit( pParent, rResId ),
DropTargetHelper( this ),
@@ -58,7 +50,6 @@ ConditionEdit::ConditionEdit( Window* pParent, const ResId& rResId )
/*--------------------------------------------------------------------
Beschreibung: Drop moeglich, bzw Format bekannt?
--------------------------------------------------------------------*/
-
sal_Int8 ConditionEdit::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
{
return OColumnTransferable::canExtractColumnDescriptor
@@ -106,3 +97,4 @@ sal_Int8 ConditionEdit::ExecuteDrop( const ExecuteDropEvent& rEvt )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 62ceb3860fe6..51f45297805d 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,7 +47,6 @@
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <view.hxx>
-#include <errhdl.hxx>
#include <docsh.hxx>
#include <content.hxx>
#include <frmfmt.hxx>
@@ -83,7 +83,6 @@
#include <svx/svdpage.hxx>
#include <svx/svdview.hxx>
#include <vcl/scrbar.hxx>
-#include <comcore.hrc>
#include <SwRewriter.hxx>
#include <hints.hxx>
#include <numrule.hxx>
@@ -98,6 +97,7 @@
#include "globals.hrc"
#include <unomid.h>
+#include "navmgr.hxx"
#define CTYPE_CNT 0
#define CTYPE_CTT 1
@@ -108,20 +108,14 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
-
#define NAVI_BOOKMARK_DELIM (sal_Unicode)1
-/***************************************************************************
-
-***************************************************************************/
-
typedef SwContent* SwContentPtr;
SV_DECL_PTRARR_SORT_DEL( SwContentArr, SwContentPtr, 0,4)
SV_IMPL_OP_PTRARR_SORT(SwContentArr, SwContentPtr)
sal_Bool SwContentTree::bIsInDrag = sal_False;
-
namespace
{
static sal_Bool lcl_IsContent(SvLBoxEntry* pEntry)
@@ -129,13 +123,11 @@ namespace
return ((SwTypeNumber*)pEntry->GetUserData())->GetTypeId() == CTYPE_CNT;
}
-
static sal_Bool lcl_IsContentType(SvLBoxEntry* pEntry)
{
return ((SwTypeNumber*)pEntry->GetUserData())->GetTypeId() == CTYPE_CTT;
}
-
static sal_Bool lcl_FindShell(SwWrtShell* pShell)
{
sal_Bool bFound = sal_False;
@@ -162,7 +154,6 @@ namespace
Beschreibung: Inhalt, enthaelt Namen und Verweis auf den Inhalstyp
***************************************************************************/
-
SwContent::SwContent(const SwContentType* pCnt, const String& rName, long nYPos) :
SwTypeNumber(CTYPE_CNT),
pParent(pCnt),
@@ -172,7 +163,6 @@ SwContent::SwContent(const SwContentType* pCnt, const String& rName, long nYPos)
{
}
-
sal_uInt8 SwTypeNumber::GetTypeId()
{
return nTypeId;
@@ -203,6 +193,7 @@ sal_Bool SwURLFieldContent::IsProtect() const
SwGraphicContent::~SwGraphicContent()
{
}
+
SwTOXBaseContent::~SwTOXBaseContent()
{
}
@@ -211,7 +202,6 @@ SwTOXBaseContent::~SwTOXBaseContent()
Beschreibung: Inhaltstyp, kennt seine Inhalte und die WrtShell
***************************************************************************/
-
SwContentType::SwContentType(SwWrtShell* pShell, sal_uInt16 nType, sal_uInt8 nLevel) :
SwTypeNumber(CTYPE_CTT),
pWrtShell(pShell),
@@ -233,7 +223,6 @@ SwContentType::SwContentType(SwWrtShell* pShell, sal_uInt16 nType, sal_uInt8 nLe
Beschreibung: Initialisierung
***************************************************************************/
-
void SwContentType::Init(sal_Bool* pbInvalidateWindow)
{
// wenn sich der MemberCount aendert ...
@@ -336,7 +325,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
if( !pFmt->GetInfo( aAskItem ) &&
!aAskItem.pObject ) // not visible
pCnt->SetInvisible();
- pMember->Insert(pCnt);//, pMember->Count());
+ pMember->Insert(pCnt);
sal_uInt16 nPos = pMember->Count() - 1;
if(nOldRegionCount > nPos &&
@@ -394,7 +383,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
RTL_TEXTENCODING_UTF8 ),
&p->rINetAttr,
n );
- pMember->Insert( pCnt );//, n );
+ pMember->Insert( pCnt );
}
bEdit = sal_True;
nOldMemberCount = nMemberCount;
@@ -431,28 +420,8 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
nMemberCount++;
}
}
- /*
- // this code can be used once we want redline comments in the margin
- else // redcomment
- {
- SwRedline* pRedline = static_cast<SwRedline*>((*i)->GetBroadCaster());
- if ( pRedline->GetComment() != String(::rtl::OUString::createFromAscii("")) )
- {
- String sEntry = pRedline->GetComment();
- RemoveNewline(sEntry);
- SwPostItContent* pCnt = new SwPostItContent(
- this,
- sEntry, // hier steht der Text
- pRedline,
- nMemberCount);
- pMember->Insert(pCnt);
- nMemberCount++;
- }
- }
- */
}
}
- //
sTypeToken = aEmptyStr;
bEdit = sal_True;
nOldMemberCount = nMemberCount;
@@ -470,10 +439,8 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
for( sal_uInt32 i=0; i< nCount; i++ )
{
SdrObject* pTemp = pPage->GetObj(i);
- // --> OD 2006-03-09 #i51726# - all drawing objects can be named now
-// if(pTemp->ISA(SdrObjGroup) && pTemp->GetName().Len())
+ // #i51726# - all drawing objects can be named now
if ( pTemp->GetName().Len() )
- // <--
nMemberCount++;
}
}
@@ -487,11 +454,6 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
bDataValid = sal_False;
}
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
-
SwContentType::~SwContentType()
{
delete pMember;
@@ -501,7 +463,6 @@ SwContentType::~SwContentType()
Beschreibung: Inhalt liefern, dazu gfs. die Liste fuellen
***************************************************************************/
-
const SwContent* SwContentType::GetMember(sal_uInt16 nIndex)
{
if(!bDataValid || !pMember)
@@ -515,12 +476,6 @@ const SwContent* SwContentType::GetMember(sal_uInt16 nIndex)
}
-
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
-
void SwContentType::Invalidate()
{
bDataValid = sal_False;
@@ -530,7 +485,6 @@ void SwContentType::Invalidate()
Beschreibung: Liste der Inhalte fuellen
***************************************************************************/
-
void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
{
SwContentArr* pOldMember = 0;
@@ -584,9 +538,8 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
case CONTENT_TYPE_TABLE :
{
- DBG_ASSERT(nMemberCount ==
- pWrtShell->GetTblFrmFmtCount(sal_True),
- "MemberCount differiert");
+ OSL_ENSURE(nMemberCount == pWrtShell->GetTblFrmFmtCount(sal_True),
+ "MemberCount differs");
Point aNullPt;
nMemberCount = pWrtShell->GetTblFrmFmtCount(sal_True);
for(sal_uInt16 i = 0; i < nMemberCount; i++)
@@ -600,7 +553,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
!aAskItem.pObject ) // not visible
pCnt->SetInvisible();
- pMember->Insert(pCnt);//, i);
+ pMember->Insert(pCnt);
if(nOldMemberCount > (int)i &&
(pOldMember->GetObject(i))->IsInvisible() != pCnt->IsInvisible())
@@ -617,8 +570,8 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
eType = FLYCNTTYPE_OLE;
else if(nContentType == CONTENT_TYPE_GRAPHIC)
eType = FLYCNTTYPE_GRF;
- DBG_ASSERT(nMemberCount == pWrtShell->GetFlyCount(eType),
- "MemberCount differiert");
+ OSL_ENSURE(nMemberCount == pWrtShell->GetFlyCount(eType),
+ "MemberCount differs");
Point aNullPt;
nMemberCount = pWrtShell->GetFlyCount(eType);
for(sal_uInt16 i = 0; i < nMemberCount; i++)
@@ -645,7 +598,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
if( !pFrmFmt->GetInfo( aAskItem ) &&
!aAskItem.pObject ) // not visible
pCnt->SetInvisible();
- pMember->Insert(pCnt);//, i);
+ pMember->Insert(pCnt);
if(nOldMemberCount > (int)i &&
(pOldMember->GetObject(i))->IsInvisible() != pCnt->IsInvisible())
*pbLevelOrVisibiblityChanged = sal_True;
@@ -664,7 +617,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
const String& rBkmName = ppBookmark->get()->GetName();
//nYPos von 0 -> text::Bookmarks werden nach Alphabet sortiert
SwContent* pCnt = new SwContent(this, rBkmName, 0);
- pMember->Insert(pCnt);//, pMember->Count());
+ pMember->Insert(pCnt);
}
}
}
@@ -697,7 +650,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
if( !pFmt->GetInfo( aAskItem ) &&
!aAskItem.pObject ) // not visible
pCnt->SetInvisible();
- pMember->Insert(pCnt);//, pMember->Count());
+ pMember->Insert(pCnt);
sal_uInt16 nPos = pMember->Count() - 1;
if(nOldMemberCount > nPos &&
@@ -719,7 +672,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
//Referenzen nach Alphabet sortiert
SwContent* pCnt = new SwContent(
this, *aRefMarks.GetObject(i), 0);
- pMember->Insert(pCnt);//, i);
+ pMember->Insert(pCnt);
}
}
break;
@@ -740,7 +693,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
RTL_TEXTENCODING_UTF8 ),
&p->rINetAttr,
n );
- pMember->Insert( pCnt );//, n );
+ pMember->Insert( pCnt );
}
}
break;
@@ -760,7 +713,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
!aAskItem.pObject ) // not visible
pCnt->SetInvisible();
- pMember->Insert( pCnt );//, nTox );
+ pMember->Insert( pCnt );
sal_uInt16 nPos = pMember->Count() - 1;
if(nOldMemberCount > nPos &&
(pOldMember->GetObject(nPos))->IsInvisible()
@@ -798,27 +751,8 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
nMemberCount++;
}
}
- /* this code can be used once we want redline comments in the margin
- else // redcomment
- {
- SwRedline* pRedline = static_cast<SwRedline*>((*i)->GetBroadCaster());
- if ( pRedline->GetComment() != String(::rtl::OUString::createFromAscii("")) )
- {
- String sEntry = pRedline->GetComment();
- RemoveNewline(sEntry);
- SwPostItContent* pCnt = new SwPostItContent(
- this,
- sEntry,
- pRedline,
- nMemberCount);
- pMember->Insert(pCnt);
- nMemberCount++;
- }
- }
- */
}
}
- //
}
break;
case CONTENT_TYPE_DRAWOBJECT:
@@ -838,10 +772,8 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
for( sal_uInt32 i=0; i< nCount; i++ )
{
SdrObject* pTemp = pPage->GetObj(i);
- // --> OD 2006-03-09 #i51726# - all drawing objects can be named now
-// if(pTemp->ISA(SdrObjGroup) && pTemp->GetName().Len())
+ // #i51726# - all drawing objects can be named now
if ( pTemp->GetName().Len() )
- // <--
{
SwContact* pContact = (SwContact*)pTemp->GetUserCall();
long nYPos = 0;
@@ -875,7 +807,6 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
Beschreibung: TreeListBox fuer Inhaltsanzeige
***************************************************************************/
-
SwContentTree::SwContentTree(Window* pParent, const ResId& rResId) :
SvTreeListBox( pParent, rResId ),
@@ -939,11 +870,6 @@ SwContentTree::SwContentTree(Window* pParent, const ResId& rResId) :
SetStyle( GetStyle() | WB_QUICK_SEARCH );
}
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
-
SwContentTree::~SwContentTree()
{
Clear(); // vorher gfs. Inhaltstypen loeschen
@@ -953,7 +879,6 @@ SwContentTree::~SwContentTree()
/***************************************************************************
Drag&Drop methods
***************************************************************************/
-
void SwContentTree::StartDrag( sal_Int8 nAction, const Point& rPosPixel )
{
if( !bIsRoot || nRootType != CONTENT_TYPE_OUTLINE )
@@ -1003,14 +928,50 @@ sal_Int8 SwContentTree::AcceptDrop( const AcceptDropEvent& rEvt )
/***************************************************************************
Beschreibung: Drop wird im Navigator ausgefuehrt
***************************************************************************/
+void* lcl_GetOutlineKey( SwContentTree* pTree, SwOutlineContent* pContent)
+{
+ void* key = 0;
+ if( pTree && pContent )
+ {
+ SwWrtShell* pShell = pTree->GetWrtShell();
+ sal_Int32 nPos = pContent->GetYPos();
+ if( nPos )
+ {
+ key = (void*)pShell->getIDocumentOutlineNodesAccess()->getOutlineNode( nPos );
+ }
+ }
+ return key;
+}
+
sal_Int8 SwContentTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
+ SvLBoxEntry* pEntry = pTargetEntry;
+ if( pEntry && ( nRootType == CONTENT_TYPE_OUTLINE ) && lcl_IsContent( pEntry ) )
+ {
+ SwOutlineContent* pOutlineContent = ( SwOutlineContent* )( pEntry->GetUserData() );
+ if( pOutlineContent )
+ {
+ void* key = lcl_GetOutlineKey(this, pOutlineContent);
+ if( !mOutLineNodeMap[key] )
+ {
+ while( pEntry->HasChilds() )
+ {
+ SvLBoxEntry* pChildEntry = FirstChild( pEntry );
+ while( pChildEntry )
+ {
+ pEntry = pChildEntry;
+ pChildEntry = NextSibling( pChildEntry );
+ }
+ }
+ pTargetEntry = pEntry;
+ }
+ }
+ }
if( bIsRoot )
return SvTreeListBox::ExecuteDrop( rEvt );
return bIsInDrag ? DND_ACTION_NONE : GetParentWindow()->ExecuteDrop(rEvt);
}
-
/***************************************************************************
Beschreibung: Handler fuer Dragging und ContextMenu
***************************************************************************/
@@ -1165,14 +1126,6 @@ PopupMenu* SwContentTree::CreateContextMenu( void )
pSubPop4->InsertItem(600, sPostItShow );
pSubPop4->InsertItem(601, sPostItHide );
pSubPop4->InsertItem(602, sPostItDelete );
- /*
- pSubPop4->InsertItem(603,rtl::OUString::createFromAscii("Sort"));
- PopupMenu* pMenuSort = new PopupMenu;
- pMenuSort->InsertItem(604,rtl::OUString::createFromAscii("By Position"));
- pMenuSort->InsertItem(605,rtl::OUString::createFromAscii("By Author"));
- pMenuSort->InsertItem(606,rtl::OUString::createFromAscii("By Date"));
- pSubPop4->SetPopupMenu(603, pMenuSort);
- */
pPop->InsertItem(4, pType->GetSingleName());
pPop->SetPopupMenu(4, pSubPop4);
}
@@ -1184,11 +1137,10 @@ PopupMenu* SwContentTree::CreateContextMenu( void )
return pPop;
}
+
/***************************************************************************
Beschreibung: Einrueckung fuer outlines (und sections)
***************************************************************************/
-
-
long SwContentTree::GetTabPos( SvLBoxEntry* pEntry, SvLBoxTab* pTab)
{
sal_uInt16 nLevel = 0;
@@ -1212,8 +1164,6 @@ long SwContentTree::GetTabPos( SvLBoxEntry* pEntry, SvLBoxTab* pTab)
/***************************************************************************
Beschreibung: Inhalte werden erst auf Anforderung in die Box eingefuegt
***************************************************************************/
-
-
void SwContentTree::RequestingChilds( SvLBoxEntry* pParent )
{
// ist es ein Inhaltstyp?
@@ -1221,34 +1171,79 @@ void SwContentTree::RequestingChilds( SvLBoxEntry* pParent )
{
if(!pParent->HasChilds())
{
- DBG_ASSERT(pParent->GetUserData(), "keine UserData?");
+ OSL_ENSURE(pParent->GetUserData(), "no UserData?");
SwContentType* pCntType = (SwContentType*)pParent->GetUserData();
sal_uInt16 nCount = pCntType->GetMemberCount();
- for(sal_uInt16 i = 0; i < nCount; i++)
- {
- const SwContent* pCnt = pCntType->GetMember(i);
- if(pCnt)
- {
- String sEntry = pCnt->GetName();
- if(!sEntry.Len())
- sEntry = sSpace;
- InsertEntry(sEntry, pParent,
- sal_False, LIST_APPEND, (void*)pCnt);
- }
-
+ /**************************************************************
+ Add for outline plus/minus
+ ***************************************************************/
+ if(pCntType->GetType() == CONTENT_TYPE_OUTLINE)
+ {
+ SvLBoxEntry* pChild = 0;
+ for(sal_uInt16 i = 0; i < nCount; i++)
+ {
+ const SwContent* pCnt = pCntType->GetMember(i);
+ if(pCnt)
+ {
+ sal_uInt16 nLevel = ((SwOutlineContent*)pCnt)->GetOutlineLevel();
+ String sEntry = pCnt->GetName();
+ if(!sEntry.Len())
+ sEntry = sSpace;
+ if(!pChild || (nLevel == 0))
+ pChild = InsertEntry(sEntry, pParent,
+ sal_False, LIST_APPEND,(void*)pCnt);
+ else
+ {
+ //back search parent.
+ if(((SwOutlineContent*)pCntType->GetMember(i-1))->GetOutlineLevel() < nLevel)
+ pChild = InsertEntry(sEntry, pChild,
+ sal_False, LIST_APPEND, (void*)pCnt);
+ else
+ {
+ pChild = Prev(pChild);
+ while(pChild &&
+ lcl_IsContent(pChild) &&
+ !(((SwOutlineContent*)pChild->GetUserData())->GetOutlineLevel() < nLevel)
+ )
+ {
+ pChild = Prev(pChild);
+ }
+ if(pChild)
+ pChild = InsertEntry(sEntry, pChild,
+ sal_False, LIST_APPEND, (void*)pCnt);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ for(sal_uInt16 i = 0; i < nCount; i++)
+ {
+ const SwContent* pCnt = pCntType->GetMember(i);
+ if(pCnt)
+ {
+ String sEntry = pCnt->GetName();
+ if(!sEntry.Len())
+ sEntry = sSpace;
+ InsertEntry(sEntry, pParent,
+ sal_False, LIST_APPEND, (void*)pCnt);
+ }
+
+ }
}
}
}
}
+
/***************************************************************************
Beschreibung: Expand - Zustand fuer Inhaltstypen merken
***************************************************************************/
-
-
sal_Bool SwContentTree::Expand( SvLBoxEntry* pParent )
{
- if(!bIsRoot)
+ if(!bIsRoot || (((SwContentType*)pParent->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE) ||
+ (nRootType == CONTENT_TYPE_OUTLINE))
{
if(lcl_IsContentType(pParent))
{
@@ -1261,22 +1256,58 @@ sal_Bool SwContentTree::Expand( SvLBoxEntry* pParent )
}
else
nHiddenBlock |= nOr;
+ if((pCntType->GetType() == CONTENT_TYPE_OUTLINE))
+ {
+ std::map< void*, sal_Bool > mCurrOutLineNodeMap;
+
+ SwWrtShell* pShell = GetWrtShell();
+ sal_Bool bBool = SvTreeListBox::Expand(pParent);
+ SvLBoxEntry* pChild = Next(pParent);
+ while(pChild && lcl_IsContent(pChild) && pParent->HasChilds())
+ {
+ if(pChild->HasChilds())
+ {
+ sal_Int32 nPos = ((SwContent*)pChild->GetUserData())->GetYPos();
+ void* key = (void*)pShell->getIDocumentOutlineNodesAccess()->getOutlineNode( nPos );
+ mCurrOutLineNodeMap.insert(std::map<void*, sal_Bool>::value_type( key, sal_False ) );
+ std::map<void*,sal_Bool>::iterator iter = mOutLineNodeMap.find( key );
+ if( iter != mOutLineNodeMap.end() && mOutLineNodeMap[key])
+ {
+ mCurrOutLineNodeMap[key] = sal_True;
+ SvTreeListBox::Expand(pChild);
+ }
+ }
+ pChild = Next(pChild);
+ }
+ mOutLineNodeMap = mCurrOutLineNodeMap;
+ return bBool;
+ }
+
+ }
+ else if( lcl_IsContent(pParent) )
+ {
+ SwWrtShell* pShell = GetWrtShell();
+ sal_Int32 nPos = ((SwContent*)pParent->GetUserData())->GetYPos();
+ void* key = (void*)pShell->getIDocumentOutlineNodesAccess()->getOutlineNode( nPos );
+ mOutLineNodeMap[key] = sal_True;
}
}
return SvTreeListBox::Expand(pParent);
}
+
/***************************************************************************
Beschreibung: Collapse - Zustand fuer Inhaltstypen merken
***************************************************************************/
-
-
sal_Bool SwContentTree::Collapse( SvLBoxEntry* pParent )
{
sal_Bool bRet;
- if(!bIsRoot)
+ if(!bIsRoot || (((SwContentType*)pParent->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE) ||
+ (nRootType == CONTENT_TYPE_OUTLINE))
{
if(lcl_IsContentType(pParent))
{
+ if(bIsRoot)
+ return bRet = sal_False;
SwContentType* pCntType = (SwContentType*)pParent->GetUserData();
sal_uInt16 nAnd = 1 << pCntType->GetType();
nAnd = ~nAnd;
@@ -1288,29 +1319,33 @@ sal_Bool SwContentTree::Collapse( SvLBoxEntry* pParent )
else
nHiddenBlock &= nAnd;
}
+ else if( lcl_IsContent(pParent) )
+ {
+ SwWrtShell* pShell = GetWrtShell();
+ sal_Int32 nPos = ((SwContent*)pParent->GetUserData())->GetYPos();
+ void* key = (void*)pShell->getIDocumentOutlineNodesAccess()->getOutlineNode( nPos );
+ mOutLineNodeMap[key] = sal_False;
+ }
bRet = SvTreeListBox::Collapse(pParent);
}
else
- bRet = sal_False;
+ bRet = SvTreeListBox::Collapse(pParent);
return bRet;
}
-
/***************************************************************************
Beschreibung: Auch auf Doppelclick wird zunaechst nur aufgeklappt
***************************************************************************/
-
-
IMPL_LINK( SwContentTree, ContentDoubleClickHdl, SwContentTree *, EMPTYARG )
{
SvLBoxEntry* pEntry = GetCurEntry();
// ist es ein Inhaltstyp?
- DBG_ASSERT(pEntry, "kein aktueller Eintrag!");
+ OSL_ENSURE(pEntry, "no current entry!");
if(pEntry)
{
- if(lcl_IsContentType(pEntry))
+ if(lcl_IsContentType(pEntry) && !pEntry->HasChilds())
RequestingChilds(pEntry);
- else if(bIsActive || bIsConstant)
+ else if(!lcl_IsContentType(pEntry) && (bIsActive || bIsConstant))
{
if(bIsConstant)
{
@@ -1318,7 +1353,7 @@ IMPL_LINK( SwContentTree, ContentDoubleClickHdl, SwContentTree *, EMPTYARG )
}
//Inhaltstyp anspringen:
SwContent* pCnt = (SwContent*)pEntry->GetUserData();
- DBG_ASSERT( pCnt, "keine UserData");
+ OSL_ENSURE( pCnt, "no UserData");
GotoContent(pCnt);
if(pCnt->GetParent()->GetType() == CONTENT_TYPE_FRAME)
pActiveShell->EnterStdMode();
@@ -1330,14 +1365,11 @@ IMPL_LINK( SwContentTree, ContentDoubleClickHdl, SwContentTree *, EMPTYARG )
/***************************************************************************
Beschreibung: Anzeigen der Datei
***************************************************************************/
-
-
void SwContentTree::Display( sal_Bool bActive )
{
if(!bIsImageListInitialized)
{
- sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
- aEntryImages = ImageList(SW_RES(nResId));
+ aEntryImages = ImageList(SW_RES(IMG_NAVI_ENTRYBMP));
bIsImageListInitialized = sal_True;
}
// erst den selektierten Eintrag auslesen, um ihn spaeter evtl. wieder
@@ -1354,9 +1386,14 @@ void SwContentTree::Display( sal_Bool bActive )
nOldScrollPos = pVScroll->GetThumbPos();
sEntryName = GetEntryText(pOldSelEntry);
+ SvLBoxEntry* pParantEntry = pOldSelEntry;
+ while( GetParent(pParantEntry))
+ {
+ pParantEntry = GetParent(pParantEntry);
+ }
if(GetParent(pOldSelEntry))
{
- nEntryRelPos = (sal_uInt16)(GetModel()->GetAbsPos(pOldSelEntry) - GetModel()->GetAbsPos(GetParent(pOldSelEntry)));
+ nEntryRelPos = (sal_uInt16)(GetModel()->GetAbsPos(pOldSelEntry) - GetModel()->GetAbsPos(pParantEntry));
}
}
Clear();
@@ -1391,7 +1428,6 @@ void SwContentTree::Display( sal_Bool bActive )
if(!*ppContentT)
(*ppContentT) = new SwContentType(pShell, nCntType, nOutlineLevel );
-
String sEntry = (*ppContentT)->GetName();
SvLBoxEntry* pEntry;
const Image& rImage = aEntryImages.GetImage(SID_SW_START + nCntType);
@@ -1450,18 +1486,23 @@ void SwContentTree::Display( sal_Bool bActive )
(*ppRootContentT)->GetName(), rImage, rImage,
0, sal_False, LIST_APPEND, *ppRootContentT);
- for(sal_uInt16 i = 0; i < (*ppRootContentT)->GetMemberCount(); i++ )
+ if(nRootType != CONTENT_TYPE_OUTLINE)
{
- const SwContent* pCnt = (*ppRootContentT)->GetMember(i);
- if(pCnt)
+ for(sal_uInt16 i = 0; i < (*ppRootContentT)->GetMemberCount(); i++ )
{
- String sEntry = pCnt->GetName();
- if(!sEntry.Len())
- sEntry = sSpace;
- InsertEntry( sEntry, pParent,
- sal_False, LIST_APPEND, (void*)pCnt);
+ const SwContent* pCnt = (*ppRootContentT)->GetMember(i);
+ if(pCnt)
+ {
+ String sEntry = pCnt->GetName();
+ if(!sEntry.Len())
+ sEntry = sSpace;
+ InsertEntry( sEntry, pParent,
+ sal_False, LIST_APPEND, (void*)pCnt);
+ }
}
- }
+ }
+ else
+ RequestingChilds(pParent);
Expand(pParent);
if( nRootType == CONTENT_TYPE_OUTLINE && bIsActive )
{
@@ -1522,8 +1563,6 @@ void SwContentTree::Display( sal_Bool bActive )
/***************************************************************************
Beschreibung: Im Clear muessen auch die ContentTypes geloescht werden
***************************************************************************/
-
-
void SwContentTree::Clear()
{
SetUpdateMode(sal_False);
@@ -1531,15 +1570,11 @@ void SwContentTree::Clear()
SetUpdateMode(sal_True);
}
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
sal_Bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer,
sal_Int8& rDragMode )
{
SwWrtShell* pWrtShell = GetWrtShell();
- DBG_ASSERT(pWrtShell, "keine Shell!");
+ OSL_ENSURE(pWrtShell, "no Shell!");
SvLBoxEntry* pEntry = GetCurEntry();
if(!pEntry || lcl_IsContentType(pEntry) || !pWrtShell)
return sal_False;
@@ -1555,10 +1590,10 @@ sal_Bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer,
case CONTENT_TYPE_OUTLINE:
{
sal_uInt16 nPos = ((SwOutlineContent*)pCnt)->GetPos();
- DBG_ASSERT(nPos < pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineNodesCount(),
- "outlinecnt veraendert");
+ OSL_ENSURE(nPos < pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineNodesCount(),
+ "outlinecnt changed");
- // #100738# make sure outline may actually be copied
+ // make sure outline may actually be copied
if( pWrtShell->IsOutlineCopyable( nPos ) )
{
const SwNumRule* pOutlRule = pWrtShell->GetOutlineNumRule();
@@ -1593,7 +1628,7 @@ sal_Bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer,
break;
case CONTENT_TYPE_URLFIELD:
sUrl = ((SwURLFieldContent*)pCnt)->GetURL();
- // kein break;
+ // no break;
case CONTENT_TYPE_OLE:
case CONTENT_TYPE_GRAPHIC:
if(GetParentWindow()->GetRegionDropMode() != REGION_MODE_NONE)
@@ -1674,11 +1709,10 @@ sal_Bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer,
}
return bRet;
}
+
/***************************************************************************
Beschreibung: Umschalten der Anzeige auf Root
***************************************************************************/
-
-
sal_Bool SwContentTree::ToggleToRoot()
{
if(!bIsRoot)
@@ -1711,8 +1745,6 @@ sal_Bool SwContentTree::ToggleToRoot()
/***************************************************************************
Beschreibung: Angezeigten Inhalt auf Gueltigkeit pruefen
***************************************************************************/
-
-
sal_Bool SwContentTree::HasContentChanged()
{
/*
@@ -1836,9 +1868,9 @@ sal_Bool SwContentTree::HasContentChanged()
// or if the visibility of objects (frames, sections, tables) has changed
// i.e. in header/footer
pArrType->FillMemberList(&bLevelOrVisibiblityChanged);
- if(bLevelOrVisibiblityChanged)
- bInvalidate = sal_True;
sal_uInt16 nChildCount = (sal_uInt16)GetChildCount(pEntry);
+ if((nType == CONTENT_TYPE_OUTLINE) && bLevelOrVisibiblityChanged)
+ bRepaint = sal_True;
if(bLevelOrVisibiblityChanged)
bInvalidate = sal_True;
@@ -1945,8 +1977,6 @@ void SwContentTree::FindActiveTypeAndRemoveUserData()
if(pEntry->GetUserData() && lcl_IsContentType(pEntry))
nLastSelType = ((SwContentType*)pEntry->GetUserData())->GetType();
}
-// else
-// nLastSelType = USHRT_MAX;
pEntry = First();
while(pEntry)
{
@@ -1959,8 +1989,6 @@ void SwContentTree::FindActiveTypeAndRemoveUserData()
Beschreibung: Nachdem ein File auf den Navigator gedroppt wurde,
wird die neue Shell gesetzt
***************************************************************************/
-
-
void SwContentTree::SetHiddenShell(SwWrtShell* pSh)
{
pHiddenShell = pSh;
@@ -1978,8 +2006,6 @@ void SwContentTree::SetHiddenShell(SwWrtShell* pSh)
/***************************************************************************
Beschreibung: Dokumentwechsel - neue Shell setzen
***************************************************************************/
-
-
void SwContentTree::SetActiveShell(SwWrtShell* pSh)
{
if(bIsInternalDrag)
@@ -2017,8 +2043,6 @@ void SwContentTree::SetActiveShell(SwWrtShell* pSh)
/***************************************************************************
Beschreibung: Eine offene View als aktiv festlegen
***************************************************************************/
-
-
void SwContentTree::SetConstantShell(SwWrtShell* pSh)
{
pActiveShell = pSh;
@@ -2031,11 +2055,10 @@ void SwContentTree::SetConstantShell(SwWrtShell* pSh)
}
Display(sal_True);
}
+
/***************************************************************************
Beschreibung: Kommandos des Navigators ausfuehren
***************************************************************************/
-
-
void SwContentTree::ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier)
{
sal_Bool nMove = sal_False;
@@ -2055,7 +2078,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)
{
@@ -2073,8 +2096,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
@@ -2192,10 +2215,6 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier)
}
}
}
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
void SwContentTree::ShowTree()
{
@@ -2206,8 +2225,6 @@ void SwContentTree::ShowTree()
/***************************************************************************
Beschreibung: zusammengefaltet wird nicht geidlet
***************************************************************************/
-
-
void SwContentTree::HideTree()
{
aUpdTimer.Stop();
@@ -2217,8 +2234,6 @@ void SwContentTree::HideTree()
/***************************************************************************
Beschreibung: Kein Idle mit Focus oder waehrend des Dragging
***************************************************************************/
-
-
IMPL_LINK( SwContentTree, TimerUpdate, Timer*, EMPTYARG)
{
// kein Update waehrend D&D
@@ -2256,11 +2271,6 @@ IMPL_LINK( SwContentTree, TimerUpdate, Timer*, EMPTYARG)
return 0;
}
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
-
DragDropMode SwContentTree::NotifyStartDrag(
TransferDataContainer& rContainer,
SvLBoxEntry* pEntry )
@@ -2280,13 +2290,10 @@ DragDropMode SwContentTree::NotifyStartDrag(
return eMode;
}
-
/***************************************************************************
Beschreibung : Nach dem Drag wird der aktuelle Absatz m i t
Childs verschoben
***************************************************************************/
-
-
sal_Bool SwContentTree::NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry, SvLBoxEntry*& , sal_uLong& )
{
@@ -2309,8 +2316,8 @@ sal_Bool SwContentTree::NotifyMoving( SvLBoxEntry* pTarget,
}
- DBG_ASSERT( pEntry &&
- lcl_IsContent(pEntry),"Source == 0 oder Source hat keinen Content" );
+ OSL_ENSURE( pEntry &&
+ lcl_IsContent(pEntry),"Source == 0 or Source has no Content" );
GetParentWindow()->MoveOutline( nSourcePos,
nTargetPos,
sal_True);
@@ -2318,15 +2325,14 @@ sal_Bool SwContentTree::NotifyMoving( SvLBoxEntry* pTarget,
aActiveContentArr[CONTENT_TYPE_OUTLINE]->Invalidate();
Display(sal_True);
}
- //TreeListBox wird aus dem Dokument neu geladen
+ //TreeListBox will be reloaded from the document
return sal_False;
}
+
/***************************************************************************
Beschreibung : Nach dem Drag wird der aktuelle Absatz o h n e
Childs verschoben
***************************************************************************/
-
-
sal_Bool SwContentTree::NotifyCopying( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry, SvLBoxEntry*& , sal_uLong& )
{
@@ -2350,9 +2356,8 @@ sal_Bool SwContentTree::NotifyCopying( SvLBoxEntry* pTarget,
}
-
- DBG_ASSERT( pEntry &&
- lcl_IsContent(pEntry),"Source == 0 oder Source hat keinen Content" );
+ OSL_ENSURE( pEntry &&
+ lcl_IsContent(pEntry),"Source == 0 or Source has no Content" );
GetParentWindow()->MoveOutline( nSourcePos, nTargetPos, sal_False);
//TreeListBox wird aus dem Dokument neu geladen
@@ -2365,13 +2370,11 @@ sal_Bool SwContentTree::NotifyCopying( SvLBoxEntry* pTarget,
/***************************************************************************
Beschreibung: Kein Drop vor den ersten Eintrag - es ist ein SwContentType
***************************************************************************/
-
sal_Bool SwContentTree::NotifyAcceptDrop( SvLBoxEntry* pEntry)
{
return pEntry != 0;
}
-
/***************************************************************************
Beschreibung: Wird ein Ctrl+DoubleClick in einen freien Bereich ausgefuehrt,
* dann soll die Basisfunktion des Controls gerufen werden
@@ -2389,8 +2392,6 @@ void SwContentTree::MouseButtonDown( const MouseEvent& rMEvt )
/***************************************************************************
Beschreibung: sofort aktualisieren
***************************************************************************/
-
-
void SwContentTree::GetFocus()
{
SwView* pActView = GetParentWindow()->GetCreateView();
@@ -2415,11 +2416,6 @@ void SwContentTree::GetFocus()
SvTreeListBox::GetFocus();
}
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
-
void SwContentTree::KeyInput(const KeyEvent& rEvent)
{
const KeyCode aCode = rEvent.GetKeyCode();
@@ -2471,11 +2467,6 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
}
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
-
void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
{
sal_Bool bCallBase = sal_True;
@@ -2591,11 +2582,6 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
Window::RequestHelp( rHEvt );
}
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
-
void SwContentTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
{
SvLBoxEntry* pFirst = FirstSelected();
@@ -2660,7 +2646,7 @@ void SwContentTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
break;
}
//Anzeige
- default: // nSelectedPopupEntry > 300
+ default:
if(nSelectedPopupEntry > 300 && nSelectedPopupEntry < 400)
{
nSelectedPopupEntry -= 300;
@@ -2686,11 +2672,6 @@ void SwContentTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
GetParentWindow()->UpdateListBox();
}
-/***************************************************************************
- Beschreibung:
-***************************************************************************/
-
-
void SwContentTree::SetOutlineLevel(sal_uInt8 nSet)
{
nOutlineLevel = nSet;
@@ -2709,8 +2690,6 @@ void SwContentTree::SetOutlineLevel(sal_uInt8 nSet)
/***************************************************************************
Beschreibung: Moduswechsel: gedropptes Doc anzeigen
***************************************************************************/
-
-
void SwContentTree::ShowHiddenShell()
{
if(pHiddenShell)
@@ -2724,8 +2703,6 @@ void SwContentTree::ShowHiddenShell()
/***************************************************************************
Beschreibung: Moduswechsel: aktive Sicht anzeigen
***************************************************************************/
-
-
void SwContentTree::ShowActualView()
{
bIsActive = sal_True;
@@ -2734,20 +2711,23 @@ void SwContentTree::ShowActualView()
GetParentWindow()->UpdateListBox();
}
-/*-----------------20.11.96 13.34-------------------
+/***************************************************************************
Beschreibung: Hier sollen die Buttons zum Verschieben von
Outlines en-/disabled werden
---------------------------------------------------*/
-
+***************************************************************************/
sal_Bool SwContentTree::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
if(!pEntry)
return sal_False;
sal_Bool bEnable = sal_False;
SvLBoxEntry* pParentEntry = GetParent(pEntry);
+ while(pParentEntry && (!lcl_IsContentType(pParentEntry)))
+ {
+ 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);
@@ -2758,10 +2738,6 @@ sal_Bool SwContentTree::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
return SvTreeListBox::Select(pEntry, bSelect);
}
-/*-----------------27.11.96 12.56-------------------
-
---------------------------------------------------*/
-
void SwContentTree::SetRootType(sal_uInt16 nType)
{
nRootType = nType;
@@ -2769,10 +2745,6 @@ void SwContentTree::SetRootType(sal_uInt16 nType)
pConfig->SetRootType( nRootType );
}
-/*-----------------10.01.97 12.19-------------------
-
---------------------------------------------------*/
-
void SwContentType::RemoveNewline(String& rEntry)
{
sal_Unicode* pStr = rEntry.GetBufferAccess();
@@ -2783,10 +2755,6 @@ void SwContentType::RemoveNewline(String& rEntry)
}
}
-/*-----------------14.01.97 16.38-------------------
-
---------------------------------------------------*/
-
void SwContentTree::EditEntry(SvLBoxEntry* pEntry, sal_uInt8 nMode)
{
SwContent* pCnt = (SwContent*)pEntry->GetUserData();
@@ -2920,15 +2888,6 @@ void SwContentTree::EditEntry(SvLBoxEntry* pEntry, sal_uInt8 nMode)
pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(0);
pActiveShell->DelRight();
}
- /*
- // this code can be used once we want redline comments in the margin
- else
- {
- SwMarginWin* pComment = pActiveShell->GetView().GetPostItMgr()->GetPostIt(((SwPostItContent*)pCnt)->GetRedline());
- if (pComment)
- pComment->Delete();
- }
- */
}
else
{
@@ -2996,10 +2955,10 @@ void SwContentTree::EditEntry(SvLBoxEntry* pEntry, sal_uInt8 nMode)
aObj >>= xTmp;
uno::Reference< container::XNamed > xNamed(xTmp, uno::UNO_QUERY);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwRenameXNamedDlg* pDlg = pFact->CreateSwRenameXNamedDlg( this, xNamed, xNameAccess, DLG_RENAME_XNAMED );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(xSecond.is())
pDlg->SetAlternativeAccess( xSecond, xThird);
@@ -3018,10 +2977,6 @@ void SwContentTree::EditEntry(SvLBoxEntry* pEntry, sal_uInt8 nMode)
}
}
-/*-----------------14.01.97 16.53-------------------
-
---------------------------------------------------*/
-
void SwContentTree::GotoContent(SwContent* pCnt)
{
pActiveShell->EnterStdMode();
@@ -3091,6 +3046,7 @@ void SwContentTree::GotoContent(SwContent* pCnt)
break;
case CONTENT_TYPE_DRAWOBJECT:
{
+ SwPosition aPos = *pActiveShell->GetCrsr()->GetPoint();
SdrView* pDrawView = pActiveShell->GetDrawView();
if (pDrawView)
{
@@ -3102,10 +3058,8 @@ void SwContentTree::GotoContent(SwContent* pCnt)
for( sal_uInt32 i=0; i< nCount; i++ )
{
SdrObject* pTemp = pPage->GetObj(i);
- // --> OD 2006-03-09 #i51726# - all drawing objects can be named now
-// if(pTemp->ISA(SdrObjGroup) && pTemp->GetName() == pCnt->GetName())
+ // #i51726# - all drawing objects can be named now
if ( pTemp->GetName() == pCnt->GetName() )
- // <--
{
SdrPageView* pPV = pDrawView->GetSdrPageView();
if( pPV )
@@ -3114,6 +3068,7 @@ void SwContentTree::GotoContent(SwContent* pCnt)
}
}
}
+ pActiveShell->GetNavigationMgr().addEntry(aPos);
}
}
break;
@@ -3128,10 +3083,8 @@ void SwContentTree::GotoContent(SwContent* pCnt)
rView.GetPostItMgr()->SetActiveSidebarWin(0);
rView.GetEditWin().GrabFocus();
}
-/*-----------------06.02.97 19.14-------------------
- Jetzt nochtdie passende text::Bookmark
---------------------------------------------------*/
+/* Jetzt nochtdie passende text::Bookmark */
NaviContentBookmark::NaviContentBookmark()
:
nDocSh(0),
@@ -3139,10 +3092,6 @@ NaviContentBookmark::NaviContentBookmark()
{
}
-/*-----------------06.02.97 20.12-------------------
-
---------------------------------------------------*/
-
NaviContentBookmark::NaviContentBookmark( const String &rUrl,
const String& rDesc,
sal_uInt16 nDragType,
@@ -3183,10 +3132,6 @@ sal_Bool NaviContentBookmark::Paste( TransferableDataHelper& rData )
return bRet;
}
-
-/* -----------------------------09.12.99 13:50--------------------------------
-
- ---------------------------------------------------------------------------*/
class SwContentLBoxString : public SvLBoxString
{
public:
@@ -3197,9 +3142,6 @@ public:
SvLBoxEntry* pEntry);
};
-/* -----------------------------09.12.99 13:49--------------------------------
-
- ---------------------------------------------------------------------------*/
void SwContentTree::InitEntry(SvLBoxEntry* pEntry,
const XubString& rStr ,const Image& rImg1,const Image& rImg2,
SvLBoxButtonKind eButtonKind)
@@ -3210,16 +3152,13 @@ void SwContentTree::InitEntry(SvLBoxEntry* pEntry,
SwContentLBoxString* pStr = new SwContentLBoxString( pEntry, 0, pCol->GetText() );
pEntry->ReplaceItem( pStr, nColToHilite );
}
-/* -----------------------------09.12.99 13:49--------------------------------
- ---------------------------------------------------------------------------*/
void SwContentLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
SvLBoxEntry* pEntry )
{
if(lcl_IsContent(pEntry) &&
((SwContent *)pEntry->GetUserData())->IsInvisible())
{
- //* pCont = (SwContent*)pEntry->GetUserData();
Font aOldFont( rDev.GetFont());
Font aFont(aOldFont);
Color aCol( COL_LIGHTGRAY );
@@ -3231,20 +3170,17 @@ void SwContentLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFl
else
SvLBoxString::Paint( rPos, rDev, nFlags, pEntry);
}
-/* -----------------------------06.05.2002 10:20------------------------------
- ---------------------------------------------------------------------------*/
void SwContentTree::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
- aEntryImages = ImageList(SW_RES(nResId));
+ aEntryImages = ImageList(SW_RES(IMG_NAVI_ENTRYBMP));
FindActiveTypeAndRemoveUserData();
Display(sal_True);
}
SvTreeListBox::DataChanged( rDCEvt );
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index 2b7efb0037b5..1855d9f23277 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,7 +52,6 @@
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <view.hxx>
-#include <errhdl.hxx>
#include <docsh.hxx>
#include <content.hxx>
#include <edglbldc.hxx>
@@ -66,26 +66,17 @@
#include <cmdid.h>
#include <helpid.h>
-#ifndef _NAVIPI_HRC
#include <navipi.hrc>
-#endif
-#ifndef _UTLUI_HRC
#include <utlui.hrc>
-#endif
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <globals.hrc>
#include "swabstdlg.hxx"
using namespace ::com::sun::star::uno;
using ::rtl::OUString;
-
// Kontextmenue fuer GlobalTree
#define CTX_INSERT_ANY_INDEX 10
-//#define CTX_INSERT_CNTIDX 11
-//#define CTX_INSERT_USRIDX 12
#define CTX_INSERT_FILE 11
#define CTX_INSERT_NEW_FILE 12
#define CTX_INSERT_TEXT 13
@@ -117,7 +108,7 @@ using ::rtl::OUString;
#define GLBL_TABPOS_SUB 5
const SfxObjectShell* SwGlobalTree::pShowShell = 0;
-static const char* __FAR_DATA aHelpForMenu[] =
+static const char* aHelpForMenu[] =
{
0, //
HID_GLBLTREE_UPDATE, //CTX_UPDATE
@@ -145,12 +136,6 @@ static const char* __FAR_DATA aHelpForMenu[] =
HID_GLBLTREEUPD_ALL //CTX_UPDATE_ALL
};
-/************************************************************************/
-/* */
-/************************************************************************/
-/* -----------------------------24.08.00 12:04--------------------------------
-
- ---------------------------------------------------------------------------*/
class SwGlobalFrameListener_Impl : public SfxListener
{
sal_Bool bValid;
@@ -165,9 +150,7 @@ public:
sal_Bool IsValid() const {return bValid;}
};
-/* -----------------------------24.08.00 12:05--------------------------------
- ---------------------------------------------------------------------------*/
void SwGlobalFrameListener_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
if( rHint.ISA(SfxSimpleHint) &&
@@ -175,9 +158,6 @@ void SwGlobalFrameListener_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHi
bValid = sal_False;
}
-/*-----------------12.06.97 09:38-------------------
-
---------------------------------------------------*/
SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) :
SvTreeListBox(pParent, rResId),
@@ -212,18 +192,12 @@ SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) :
EnableContextMenuHandling();
}
-/*-----------------12.06.97 09:38-------------------
-
---------------------------------------------------*/
SwGlobalTree::~SwGlobalTree()
{
delete pSwGlblDocContents;
delete pDocInserter;
}
-/*-----------------12.06.97 09:38-------------------
-
---------------------------------------------------*/
sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
sal_Int8 nRet = DND_ACTION_NONE;
@@ -303,9 +277,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
return nRet;
}
-/*-----------------12.06.97 09:38-------------------
---------------------------------------------------*/
sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
{
sal_Int8 nRet = rEvt.mnAction;
@@ -364,9 +336,7 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
}
return nRet;
}
-/*-----------------12.06.97 09:38-------------------
---------------------------------------------------*/
PopupMenu* SwGlobalTree::CreateContextMenu()
{
PopupMenu* pPop = 0;
@@ -427,9 +397,7 @@ PopupMenu* SwGlobalTree::CreateContextMenu()
}
return pPop;
}
-/*-----------------16.06.97 10:41-------------------
---------------------------------------------------*/
void SwGlobalTree::TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox)
{
sal_uInt16 nEnableFlags = GetEnableFlags();
@@ -442,8 +410,6 @@ void SwGlobalTree::TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox)
pMenu->SetHelpId(i, aHelpForMenu[i] );
}
pMenu->EnableItem(CTX_INSERT_ANY_INDEX, 0 != (nEnableFlags & ENABLE_INSERT_IDX ));
-// pMenu->EnableItem(CTX_INSERT_CNTIDX, 0 != (nEnableFlags & ENABLE_INSERT_IDX ));
-// pMenu->EnableItem(CTX_INSERT_USRIDX, 0 != (nEnableFlags & ENABLE_INSERT_IDX ));
pMenu->EnableItem(CTX_INSERT_TEXT, 0 != (nEnableFlags & ENABLE_INSERT_TEXT));
pMenu->EnableItem(CTX_INSERT_FILE, 0 != (nEnableFlags & ENABLE_INSERT_FILE));
pMenu->EnableItem(CTX_INSERT_NEW_FILE, 0 != (nEnableFlags & ENABLE_INSERT_FILE));
@@ -469,9 +435,7 @@ void SwGlobalTree::TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox)
pBox->Invalidate();
}
}
-/*-----------------16.06.97 11:02-------------------
---------------------------------------------------*/
sal_uInt16 SwGlobalTree::GetEnableFlags() const
{
SvLBoxEntry* pEntry = FirstSelected();
@@ -502,9 +466,6 @@ sal_uInt16 SwGlobalTree::GetEnableFlags() const
return nRet;
}
-/*-----------------12.06.97 09:38-------------------
-
---------------------------------------------------*/
void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
{
sal_Bool bParent = sal_True;
@@ -552,9 +513,7 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
if(bParent)
SvTreeListBox::RequestHelp(rHEvt);
}
-/*-----------------16.06.97 16:15-------------------
---------------------------------------------------*/
void SwGlobalTree::SelectHdl()
{
@@ -573,17 +532,12 @@ void SwGlobalTree::SelectHdl()
nSelCount == 1 && nAbsPos < ((sal_uInt16)GetEntryCount()) - 1 && !bReadonly);
}
-/*-----------------16.06.97 16:15-------------------
---------------------------------------------------*/
void SwGlobalTree::DeselectHdl()
{
SelectHdl();
}
-/*-----------------17.06.97 13:11-------------------
-
---------------------------------------------------*/
DragDropMode SwGlobalTree::NotifyStartDrag( TransferDataContainer& ,
SvLBoxEntry* pEntry )
{
@@ -592,17 +546,11 @@ DragDropMode SwGlobalTree::NotifyStartDrag( TransferDataContainer& ,
return SV_DRAGDROP_CTRL_MOVE;
}
-/*-----------------21.06.97 12:44-------------------
-
---------------------------------------------------*/
long SwGlobalTree::GetTabPos( SvLBoxEntry*, SvLBoxTab* pTab)
{
return pTab->GetPos() - GLBL_TABPOS_SUB;
}
-/*-----------------12.06.97 09:38-------------------
-
---------------------------------------------------*/
sal_Bool SwGlobalTree::NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry*&,
@@ -619,9 +567,7 @@ sal_Bool SwGlobalTree::NotifyMoving( SvLBoxEntry* pTarget,
Display();
return sal_False;
}
-/*-----------------12.06.97 09:39-------------------
---------------------------------------------------*/
sal_Bool SwGlobalTree::NotifyCopying( SvLBoxEntry* /*pTarget*/,
SvLBoxEntry* /*pEntry*/,
SvLBoxEntry*& /*rpNewParent*/,
@@ -630,24 +576,18 @@ sal_Bool SwGlobalTree::NotifyCopying( SvLBoxEntry* /*pTarget*/,
{
return sal_False;
}
-/*-----------------12.06.97 09:39-------------------
---------------------------------------------------*/
sal_Bool SwGlobalTree::NotifyAcceptDrop( SvLBoxEntry* pEntry)
{
return pEntry != 0;
}
-/*-----------------12.06.97 09:39-------------------
---------------------------------------------------*/
void SwGlobalTree::StartDrag( sal_Int8 nAction, const Point& rPt )
{
if( 1 == GetSelectionCount() )
SvTreeListBox::StartDrag( nAction, rPt );
}
-/*-----------------12.06.97 09:39-------------------
---------------------------------------------------*/
void SwGlobalTree::DragFinished( sal_Int8 nAction )
{
SvTreeListBox::DragFinished( nAction );
@@ -668,9 +608,6 @@ void SwGlobalTree::MouseButtonDown( const MouseEvent& rMEvt )
SvTreeListBox::MouseButtonDown( rMEvt );
}
-/*-----------------12.06.97 13:08-------------------
-
---------------------------------------------------*/
void SwGlobalTree::GetFocus()
{
if(Update( sal_False ))
@@ -678,9 +615,6 @@ void SwGlobalTree::GetFocus()
SvTreeListBox::GetFocus();
}
-/*-----------------12.06.97 12:34-------------------
-
---------------------------------------------------*/
void SwGlobalTree::KeyInput(const KeyEvent& rKEvt)
{
const KeyCode aCode = rKEvt.GetKeyCode();
@@ -698,23 +632,17 @@ void SwGlobalTree::KeyInput(const KeyEvent& rKEvt)
SvTreeListBox::KeyInput(rKEvt);
}
-/*-----------------17.06.97 11:59-------------------
-
---------------------------------------------------*/
void SwGlobalTree::Clear()
{
pEmphasisEntry = 0;
SvTreeListBox::Clear();
}
-/*-----------------12.06.97 12:38-------------------
---------------------------------------------------*/
void SwGlobalTree::Display(sal_Bool bOnlyUpdateUserData)
{
if(!bIsImageListInitialized)
{
- sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
- aEntryImages = ImageList(SW_RES(nResId));
+ aEntryImages = ImageList(SW_RES(IMG_NAVI_ENTRYBMP));
bIsImageListInitialized = sal_True;
}
sal_uInt16 nCount = pSwGlblDocContents->Count();
@@ -795,9 +723,6 @@ void SwGlobalTree::Display(sal_Bool bOnlyUpdateUserData)
}
}
-/*-----------------13.06.97 10:32-------------------
-
---------------------------------------------------*/
void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const String* pFileName )
{
Sequence< OUString > aFileNames;
@@ -820,9 +745,6 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const String* pF
}
}
-/*-----------------18.06.97 12:42-------------------
-
---------------------------------------------------*/
void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
{
sal_uInt16 nSlot = 0;
@@ -857,21 +779,14 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
}
}
-/*-----------------13.06.97 14:22-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwGlobalTree, PopupHdl, Menu* , pMenu)
{
ExcecuteContextMenuAction( pMenu->GetCurItemId());
return sal_True;
}
-/* -----------------26.08.2003 11:57-----------------
- --------------------------------------------------*/
void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
-//IMPL_LINK( SwGlobalTree, PopupHdl, Menu* , pMenu)
{
-// sal_uInt16 nId = pMenu->GetCurItemId();
SvLBoxEntry* pEntry = FirstSelected();
SwGlblDocContent* pCont = pEntry ? (SwGlblDocContent*)pEntry->GetUserData() : 0;
// wird waehrend des Dialogs ein RequestHelp gerufen,
@@ -928,13 +843,13 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
break;
case CTX_EDIT:
{
- DBG_ASSERT(pCont, "Edit ohne Entry ? " );
+ OSL_ENSURE(pCont, "edit without entry ? " );
EditContent(pCont);
}
break;
case CTX_EDIT_LINK:
{
- DBG_ASSERT(pCont, "Edit ohne Entry ? " );
+ OSL_ENSURE(pCont, "edit without entry ? " );
SfxStringItem aName(FN_EDIT_REGION,
pCont->GetSection()->GetSectionName());
rDispatch.Execute(FN_EDIT_REGION, SFX_CALLMODE_ASYNCHRON, &aName, 0L);
@@ -966,8 +881,6 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
}
break;
case CTX_INSERT_ANY_INDEX:
-// case CTX_INSERT_CNTIDX:
-// case CTX_INSERT_USRIDX:
{
if(pContCopy)
{
@@ -981,14 +894,14 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
0);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractMultiTOXTabDialog* pDlg = pFact->CreateMultiTOXTabDialog( DLG_MULTI_TOX,
this, aSet,
*pActiveShell,
0,
USHRT_MAX,
sal_True);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
SwTOXDescription& rDesc = pDlg->GetTOXDescription(
@@ -1101,12 +1014,8 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
delete pContCopy;
else
bDeleteContentCopy = true;
-// return sal_True;
}
-/*-----------------16.06.97 07:57-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwGlobalTree, Timeout, Timer*, EMPTYARG )
{
if(!HasFocus() && Update( sal_False ))
@@ -1114,9 +1023,6 @@ IMPL_LINK( SwGlobalTree, Timeout, Timer*, EMPTYARG )
return 0;
}
-/*-----------------13.06.97 16:56-------------------
-
---------------------------------------------------*/
void SwGlobalTree::GotoContent(const SwGlblDocContent* pCont)
{
pActiveShell->EnterStdMode();
@@ -1138,29 +1044,23 @@ void SwGlobalTree::GotoContent(const SwGlblDocContent* pCont)
}
}
-/*-----------------16.06.97 07:42-------------------
---------------------------------------------------*/
void SwGlobalTree::ShowTree()
{
aUpdateTimer.Start();
SvTreeListBox::Show();
}
-/*-----------------16.06.97 07:42-------------------
---------------------------------------------------*/
void SwGlobalTree::HideTree()
{
aUpdateTimer.Stop();
SvTreeListBox::Hide();
}
-/*-----------------18.06.97 10:02-------------------
---------------------------------------------------*/
void SwGlobalTree::ExecCommand(sal_uInt16 nCmd)
{
SvLBoxEntry* pEntry = FirstSelected();
- DBG_ASSERT(pEntry, "gleich knallt's");
+ OSL_ENSURE(pEntry, "gleich knallt's");
if(FN_GLOBAL_EDIT == nCmd)
{
const SwGlblDocContent* pCont = (const SwGlblDocContent*)
@@ -1199,9 +1099,6 @@ void SwGlobalTree::ExecCommand(sal_uInt16 nCmd)
}
}
-/*-----------------16.06.97 07:43-------------------
-
---------------------------------------------------*/
sal_Bool SwGlobalTree::Update(sal_Bool bHard)
{
SwView* pActView = GetParentWindow()->GetCreateView();
@@ -1284,9 +1181,6 @@ sal_Bool SwGlobalTree::Update(sal_Bool bHard)
return bRet;
}
-/*-----------------25.06.97 16:20-------------------
-
---------------------------------------------------*/
void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
{
String sFileName(pCont->GetSection()->GetLinkFileName().GetToken(0,
@@ -1320,9 +1214,6 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
}
}
-/*-----------------25.06.97 16:08-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwGlobalTree, DoubleClickHdl, SwGlobalTree *, EMPTYARG )
{
SvLBoxEntry* pEntry = GetCurEntry();
@@ -1337,9 +1228,6 @@ IMPL_LINK( SwGlobalTree, DoubleClickHdl, SwGlobalTree *, EMPTYARG )
return 0;
}
-/*-----------------07.10.97 08:09-------------------
-
---------------------------------------------------*/
IMPL_STATIC_LINK_NOINSTANCE(SwGlobalTree, ShowFrameHdl, SwGlobalTree*, EMPTYARG)
{
if(SwGlobalTree::GetShowShell())
@@ -1347,9 +1235,7 @@ IMPL_STATIC_LINK_NOINSTANCE(SwGlobalTree, ShowFrameHdl, SwGlobalTree*, EMPTYARG)
SwGlobalTree::SetShowShell(0);
return 0;
}
-/* -----------------04.11.98 10:43-------------------
- *
- * --------------------------------------------------*/
+
void SwGlobalTree::InitEntry(SvLBoxEntry* pEntry,
const XubString& rStr ,const Image& rImg1,const Image& rImg2,
SvLBoxButtonKind eButtonKind)
@@ -1360,17 +1246,13 @@ void SwGlobalTree::InitEntry(SvLBoxEntry* pEntry,
SwLBoxString* pStr = new SwLBoxString( pEntry, 0, pCol->GetText() );
pEntry->ReplaceItem( pStr, nColToHilite );
}
-/* -----------------04.11.98 10:39-------------------
- *
- * --------------------------------------------------*/
void SwLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
SvLBoxEntry* pEntry )
{
SwGlblDocContent* pCont = (SwGlblDocContent*)pEntry->GetUserData();
- const SwSection* pSect;
if(pCont->GetType() == GLBLDOC_SECTION &&
- !(pSect = pCont->GetSection())->IsConnectFlag() )
+ !(pCont->GetSection())->IsConnectFlag() )
{
Font aOldFont( rDev.GetFont());
Font aFont(aOldFont);
@@ -1383,16 +1265,13 @@ void SwLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
else
SvLBoxString::Paint( rPos, rDev, nFlags, pEntry);
}
-/* -----------------------------06.05.2002 10:20------------------------------
- ---------------------------------------------------------------------------*/
void SwGlobalTree::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
- aEntryImages = ImageList(SW_RES(nResId));
+ aEntryImages = ImageList(SW_RES(IMG_NAVI_ENTRYBMP));
Update(sal_True);
}
SvTreeListBox::DataChanged( rDCEvt );
@@ -1435,7 +1314,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
//update the global document content after each inserted document
rSh.GetGlobalDocContent(aTempContents);
SwGlblDocContent* pAnchorContent = 0;
- DBG_ASSERT(aTempContents.Count() > (nAnchorContent + nFile), "invalid anchor content -> last insertion failed");
+ OSL_ENSURE(aTempContents.Count() > (nAnchorContent + nFile), "invalid anchor content -> last insertion failed");
if ( aTempContents.Count() > (nAnchorContent + nFile) )
pAnchorContent = aTempContents.GetObject(nAnchorContent + (sal_uInt16)nFile);
else
@@ -1500,18 +1379,17 @@ IMPL_LINK( SwGlobalTree, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
SfxMediumList* pMedList = pDocInserter->CreateMediumList();
if ( pMedList )
{
- Sequence< OUString >aFileNames( pMedList->Count() );
+ Sequence< OUString >aFileNames( pMedList->size() );
OUString* pFileNames = aFileNames.getArray();
- SfxMedium* pMed = pMedList->First();
sal_Int32 nPos = 0;
- while ( pMed )
+ for ( size_t i = 0, n = pMedList->size(); i < n; ++i )
{
+ SfxMedium* pMed = pMedList->at( i );
String sFileName = pMed->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
sFileName += sfx2::cTokenSeperator;
sFileName += pMed->GetFilter()->GetFilterName();
sFileName += sfx2::cTokenSeperator;
pFileNames[nPos++] = sFileName;
- pMed = pMedList->Next();
}
delete pMedList;
InsertRegion( pDocContent, aFileNames );
@@ -1521,3 +1399,4 @@ IMPL_LINK( SwGlobalTree, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/gloslst.cxx b/sw/source/ui/utlui/gloslst.cxx
index 3d80e55e1ace..a5f35394b33c 100644
--- a/sw/source/ui/utlui/gloslst.cxx
+++ b/sw/source/ui/utlui/gloslst.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,16 +38,10 @@
#include <tools/urlobj.hxx>
#include <vcl/dialog.hxx>
#include <vcl/msgbox.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
#include <vcl/lstbox.hxx>
-#ifndef SVTOOLS_FSTATHELPER_HXX
#include <svl/fstathelper.hxx>
-#endif
#include <unotools/pathoptions.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <swtypes.hxx>
@@ -57,12 +52,8 @@
#include <gloslst.hxx>
#include <swunohelper.hxx>
-#ifndef _UTLUI_HRC
#include <utlui.hrc>
-#endif
-#ifndef _GLOSLST_HRC
#include <gloslst.hrc>
-#endif
#define STRING_DELIM (char)0x0A
@@ -97,10 +88,6 @@ class SwGlossDecideDlg : public ModalDialog
ListBox& GetListBox() {return aListLB;}
};
-/*-----------------21.01.97 13.25-------------------
-
---------------------------------------------------*/
-
SwGlossDecideDlg::SwGlossDecideDlg(Window* pParent) :
ModalDialog(pParent, SW_RES(DLG_GLOSSARY_DECIDE_DLG)),
aOk(this, SW_RES(PB_OK)),
@@ -114,18 +101,11 @@ SwGlossDecideDlg::SwGlossDecideDlg(Window* pParent) :
aListLB.SetSelectHdl(LINK(this, SwGlossDecideDlg, SelectHdl));
}
-/*-----------------21.01.97 13.25-------------------
-
---------------------------------------------------*/
-
IMPL_LINK(SwGlossDecideDlg, DoubleClickHdl, ListBox*, EMPTYARG)
{
EndDialog(RET_OK);
return 0;
}
-/*-----------------21.01.97 13.29-------------------
-
---------------------------------------------------*/
IMPL_LINK(SwGlossDecideDlg, SelectHdl, ListBox*, EMPTYARG)
{
@@ -246,7 +226,7 @@ sal_uInt16 SwGlossaryList::GetGroupCount()
String SwGlossaryList::GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath, String* pTitle)
{
- DBG_ASSERT(aGroupArr.Count() > nPos, "Gruppe nicht vorhanden");
+ OSL_ENSURE(aGroupArr.Count() > nPos, "group not available");
String sRet(aEmptyStr);
if(nPos < aGroupArr.Count())
{
@@ -268,7 +248,7 @@ String SwGlossaryList::GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath, String* p
sal_uInt16 SwGlossaryList::GetBlockCount(sal_uInt16 nGroup)
{
- DBG_ASSERT(aGroupArr.Count() > nGroup, "Gruppe nicht vorhanden");
+ OSL_ENSURE(aGroupArr.Count() > nGroup, "group not available");
if(nGroup < aGroupArr.Count())
{
AutoTextGroup* pGroup = aGroupArr.GetObject(nGroup);
@@ -284,7 +264,7 @@ sal_uInt16 SwGlossaryList::GetBlockCount(sal_uInt16 nGroup)
String SwGlossaryList::GetBlockName(sal_uInt16 nGroup, sal_uInt16 nBlock, String& rShortName)
{
- DBG_ASSERT(aGroupArr.Count() > nGroup, "Gruppe nicht vorhanden");
+ OSL_ENSURE(aGroupArr.Count() > nGroup, "group not available");
if(nGroup < aGroupArr.Count())
{
AutoTextGroup* pGroup = aGroupArr.GetObject(nGroup);
@@ -512,3 +492,4 @@ void SwGlossaryList::ClearGroups()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx
index 565b32339792..8e8a833c66d0 100644
--- a/sw/source/ui/utlui/initui.cxx
+++ b/sw/source/ui/utlui/initui.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,19 +39,11 @@
#include <glosdoc.hxx>
#include <gloslst.hxx>
-#ifndef _UTLUI_HRC
#include <utlui.hrc>
-#endif
-#ifndef _INITUI_HRC
#include <initui.hrc>
-#endif
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <authfld.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <unotools/syslocale.hxx>
#include <unomid.h>
@@ -205,11 +198,24 @@ ShellResource::~ShellResource()
delete pAutoFmtNameLst, pAutoFmtNameLst = 0;
}
-String ShellResource::GetPageDescName( sal_uInt16 nNo, sal_Bool bIsFirst, sal_Bool bFollow )
+String ShellResource::GetPageDescName( sal_uInt16 nNo, PageNameMode eMode )
{
- String sRet( bIsFirst ? sPageDescFirstName
- : bFollow ? sPageDescFollowName
- : sPageDescName );
+ String sRet;
+
+ switch (eMode)
+ {
+ case NORMAL_PAGE:
+ sRet = sPageDescName;
+ break;
+ break;
+ case FIRST_PAGE:
+ sRet = sPageDescFirstName;
+ break;
+ case FOLLOW_PAGE:
+ sRet = sPageDescFollowName;
+ break;
+ }
+
sRet.SearchAndReplaceAscii( "$(ARG1)", String::CreateFromInt32( nNo ));
return sRet;
}
@@ -271,9 +277,7 @@ ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( SvStringsDtor& rLst )
}
FreeResource();
}
-/* -----------------16.09.99 12:28-------------------
- --------------------------------------------------*/
const String& SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType)
{
if(!pAuthFieldNameList)
@@ -287,9 +291,7 @@ const String& SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType)
}
return *pAuthFieldNameList->GetObject( static_cast< sal_uInt16 >(eType) );
}
-/* -----------------16.09.99 12:29-------------------
- --------------------------------------------------*/
const String& SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType)
{
if(!pAuthFieldTypeList)
@@ -305,3 +307,4 @@ const String& SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/initui.src b/sw/source/ui/utlui/initui.src
index 3b08e771a309..ccb3243ea776 100644
--- a/sw/source/ui/utlui/initui.src
+++ b/sw/source/ui/utlui/initui.src
@@ -62,7 +62,6 @@ Resource RID_SW_SHELLRES
String STR_CALC_POW
{
Text [ en-US ] = "** Square function overflow **" ;
- /* ### ACHTUNG: Neuer Text in Resource? ** Überlauf in Quadratfunktion ** : ** šberlauf in Quadratfunktion ** */
};
String STR_CALC_VARNFND
{
@@ -71,7 +70,6 @@ Resource RID_SW_SHELLRES
String STR_CALC_OVERFLOW
{
Text [ en-US ] = "** Overflow **" ;
- /* ### ACHTUNG: Neuer Text in Resource? ** Überlauf ** : ** šberlauf ** */
};
String STR_CALC_WRONGTIME
{
@@ -162,7 +160,6 @@ Resource RID_SW_SHELLRES
};
String FLD_DOCINFO_KEYS
{
- /* ### ACHTUNG: Neuer Text in Resource? Schlüsselwörter : Schl³sselw÷rter */
Text [ en-US ] = "Keywords" ;
};
String FLD_DOCINFO_COMMENT
diff --git a/sw/source/ui/utlui/navicfg.cxx b/sw/source/ui/utlui/navicfg.cxx
index 2edc5e9d8f71..4f53ee64d5e2 100644
--- a/sw/source/ui/utlui/navicfg.cxx
+++ b/sw/source/ui/utlui/navicfg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,7 @@
#include <swtypes.hxx> // fuer Pathfinder
#include <navicfg.hxx>
#include <swcont.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
@@ -42,9 +43,6 @@ using namespace ::utl;
using namespace ::rtl;
using namespace ::com::sun::star::uno;
-/* -----------------------------08.09.00 16:30--------------------------------
-
- ---------------------------------------------------------------------------*/
Sequence<OUString> SwNavigationConfig::GetPropertyNames()
{
static const char* aPropNames[] =
@@ -66,9 +64,6 @@ Sequence<OUString> SwNavigationConfig::GetPropertyNames()
}
return aNames;
}
-/*-----------------13.11.96 11.03-------------------
-
---------------------------------------------------*/
SwNavigationConfig::SwNavigationConfig() :
utl::ConfigItem(C2U("Office.Writer/Navigator")),
@@ -82,9 +77,8 @@ SwNavigationConfig::SwNavigationConfig() :
{
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
-// EnableNotification(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength())
{
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -105,14 +99,11 @@ SwNavigationConfig::SwNavigationConfig() :
}
}
}
-/* -----------------------------08.09.00 16:35--------------------------------
- ---------------------------------------------------------------------------*/
SwNavigationConfig::~SwNavigationConfig()
-{}
-/* -----------------------------08.09.00 16:35--------------------------------
+{
+}
- ---------------------------------------------------------------------------*/
void SwNavigationConfig::Commit()
{
Sequence<OUString> aNames = GetPropertyNames();
@@ -139,3 +130,4 @@ void SwNavigationConfig::Commit()
void SwNavigationConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx
index d88ecdf6be73..20ef695485bc 100644
--- a/sw/source/ui/utlui/navipi.cxx
+++ b/sw/source/ui/utlui/navipi.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,12 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#define NAVIPI_CXX
-#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
-#include <tools/list.hxx>
+#include <string>
#include <svl/urlbmk.hxx>
#include <svl/stritem.hxx>
#include <svtools/filter.hxx>
@@ -46,16 +44,11 @@
#include <sfx2/dockwin.hxx>
#include <vcl/toolbox.hxx>
#include <swtypes.hxx> // fuer Pathfinder
-#include <errhdl.hxx>
#include <swmodule.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <navicfg.hxx>
#include <wrtsh.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <actctrl.hxx>
#include <IMark.hxx>
#include <navipi.hxx>
@@ -64,27 +57,16 @@
#include <section.hxx>
#include <edtwin.hxx>
#include <sfx2/app.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _RIBBAR_HRC
#include <ribbar.hrc>
-#endif
-#ifndef _NAVIPI_HRC
#include <navipi.hrc>
-#endif
-#ifndef _UTLUI_HRC
#include <utlui.hrc>
-#endif
#include "access.hrc"
#include <unomid.h>
-
#define PAGE_CHANGE_TIMEOUT 1000 //Timeout fuer Seitenwechsel
#define JUMP_TYPE_TBL 0
@@ -299,7 +281,6 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
}
}
return sal_True;
- //break;
// Funktionen, die eine direkte Aktion ausloesen
case FN_SELECT_FOOTER:
@@ -415,9 +396,6 @@ IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox )
return sal_True;
}
-/*-----------------13.07.04 -------------------
- ----------------------------------------------*/
-
IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox )
{
const sal_uInt16 nCurrItemId = pBox->GetCurItemId();
@@ -479,15 +457,11 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox )
return sal_True;
}
-/*-----------------13.07.04 -------------------
---------------------------------------------------*/
SwNavHelpToolBox::SwNavHelpToolBox(SwNavigationPI* pParent, const ResId &rResId) :
SwHelpToolBox(pParent, rResId)
{}
-/*-----------------19.06.97 09:09-------------------
---------------------------------------------------*/
void SwNavHelpToolBox::MouseButtonDown(const MouseEvent &rEvt)
{
if(rEvt.GetButtons() == MOUSE_LEFT &&
@@ -498,18 +472,13 @@ void SwNavHelpToolBox::MouseButtonDown(const MouseEvent &rEvt)
else
SwHelpToolBox::MouseButtonDown(rEvt);
}
-/* -----------------------------12.03.2002 16:55------------------------------
- ---------------------------------------------------------------------------*/
void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, sal_Bool bSetFocus)
{
-// SfxBindings& rBind = GetCreateView()->GetViewFrame()->GetBindings();
-// rBind.ENTERREGISTRATIONS();
Reference< XFrame > xFrame = GetCreateView()->GetViewFrame()->GetFrame().GetFrameInterface();
SwScrollNaviPopup* pPopup = new
SwScrollNaviPopup(FN_SCROLL_NAVIGATION,
xFrame );
-// rBind.LEAVEREGISTRATIONS();
Rectangle aRect(rRect);
Point aT1 = aRect.TopLeft();
@@ -524,9 +493,6 @@ void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, sal_Bool bSetF
}
}
-/*-----------------19.06.97 10:12-------------------
-
---------------------------------------------------*/
void SwNavHelpToolBox::RequestHelp( const HelpEvent& rHEvt )
{
sal_uInt16 nItemId = GetItemId(ScreenToOutputPixel(rHEvt.GetMousePosPixel()));
@@ -576,10 +542,6 @@ IMPL_LINK( SwNavigationPI, EditGetFocus, NumEditAction *, pEdit )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
sal_Bool SwNavigationPI::Close()
{
SfxViewFrame* pVFrame = pCreateView->GetViewFrame();
@@ -622,10 +584,6 @@ void SwNavigationPI::MakeMark()
nAutoMarkIdx = 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwNavigationPI::GotoPage()
{
if ( pContextWin->GetFloatingWindow() && pContextWin->GetFloatingWindow()->IsRollUp())
@@ -636,10 +594,6 @@ void SwNavigationPI::GotoPage()
GetPageEdit().GrabFocus();
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwNavigationPI::_ZoomOut()
{
if (_IsZoomedIn())
@@ -670,10 +624,6 @@ void SwNavigationPI::_ZoomOut()
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwNavigationPI::_ZoomIn()
{
FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
@@ -700,9 +650,6 @@ void SwNavigationPI::_ZoomIn()
aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_False);
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
void SwNavigationPI::Resize()
{
@@ -752,11 +699,6 @@ void SwNavigationPI::Resize()
}
}
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
SfxChildWindowContext* pCw,
Window* pParent) :
@@ -767,7 +709,6 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
aContentToolBox(this, SW_RES(TB_CONTENT)),
aGlobalToolBox(this, SW_RES(TB_GLOBAL)),
aContentImageList(SW_RES(IL_CONTENT)),
- aContentImageListH(SW_RES(ILH_CONTENT)),
aContentTree(this, SW_RES(TL_CONTENT)),
aGlobalTree(this, SW_RES(TL_GLOBAL)),
aDocListBox(this, SW_RES(LB_DOCS)),
@@ -813,8 +754,6 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
pEdit->SetAccessibleName(pEdit->GetQuickHelpText());
bPageCtrlsVisible = sal_True;
-// Rectangle aFirstRect = aContentToolBox.GetItemRect(FN_SHOW_ROOT);
-// sal_uInt16 nWidth = 2 * (sal_uInt16)aFirstRect.Left();
//doppelte Separatoren sind nicht erlaubt, also muss
//die passende Groesse anders ermittelt werden
Rectangle aFirstRect = aContentToolBox.GetItemRect(FN_SELECT_FOOTNOTE);
@@ -941,10 +880,6 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
aDocListBox.SetAccessibleName(aStatusArr[3]);
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwNavigationPI::~SwNavigationPI()
{
if(IsGlobalDoc() && !IsGlobalMode())
@@ -975,10 +910,6 @@ SwNavigationPI::~SwNavigationPI()
rBindings.Release(*this);
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwNavigationPI::SetPopupWindow( SfxPopupWindow* pWindow )
{
pPopupWindow = pWindow;
@@ -986,10 +917,6 @@ void SwNavigationPI::SetPopupWindow( SfxPopupWindow* pWindow )
pPopupWindow->SetDeleteLink_Impl( LINK( this, SwNavigationPI, ClosePopupWindow ));
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwNavigationPI, PopupModeEndHdl, void *, EMPTYARG )
{
if ( pPopupWindow->IsVisible() )
@@ -1010,10 +937,6 @@ IMPL_LINK( SwNavigationPI, PopupModeEndHdl, void *, EMPTYARG )
return 1;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwNavigationPI, ClosePopupWindow, SfxPopupWindow *, pWindow )
{
if ( pWindow == pFloatingWindow )
@@ -1024,10 +947,6 @@ IMPL_LINK( SwNavigationPI, ClosePopupWindow, SfxPopupWindow *, pWindow )
return 1;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
const SfxPoolItem* /*pState*/ )
{
@@ -1067,10 +986,6 @@ NumEditAction& SwNavigationPI::GetPageEdit()
return *(NumEditAction*)aContentToolBox.GetItemWindow(FN_PAGENUMBER);
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SfxChildAlignment SwNavigationPI::CheckAlignment
(
SfxChildAlignment eActAlign,
@@ -1155,10 +1070,6 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwNavigationPI, MenuSelectHdl, Menu *, pMenu )
{
sal_uInt16 nMenuId = pMenu->GetCurItemId();
@@ -1172,11 +1083,6 @@ IMPL_LINK( SwNavigationPI, MenuSelectHdl, Menu *, pMenu )
return 0;
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwNavigationPI::UpdateListBox()
{
aDocListBox.SetUpdateMode(sal_False);
@@ -1194,7 +1100,7 @@ void SwNavigationPI::UpdateListBox()
while (pView)
{
SfxObjectShell* pDoc = pView->GetDocShell();
- // pb: #i53333# don't show help pages here
+ // #i53333# don't show help pages here
if ( !pDoc->IsHelpDocument() )
{
String sEntry = pDoc->GetTitle();
@@ -1247,14 +1153,6 @@ void SwNavigationPI::UpdateListBox()
aDocListBox.SetUpdateMode(sal_True);
}
-/*-----------------16.06.97 15:05-------------------
-
---------------------------------------------------*/
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem *, pItem)
{
const SfxViewFrameItem* pFrameItem = PTR_CAST(SfxViewFrameItem, pItem );
@@ -1265,7 +1163,7 @@ IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem *, pItem)
{
aContentTree.Clear();
pContentView = PTR_CAST(SwView, pFrame->GetViewShell());
- DBG_ASSERT(pContentView, "keine SwView");
+ OSL_ENSURE(pContentView, "no SwView");
if(pContentView)
pContentWrtShell = pContentView->GetWrtShellPtr();
else
@@ -1309,10 +1207,6 @@ String SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData )
return sFileName;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
sal_Int8 SwNavigationPI::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
{
return ( !aContentTree.IsInDrag() &&
@@ -1366,10 +1260,6 @@ sal_Int8 SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt )
return nRet;
}
-/*-----------------27.11.96 13.00-------------------
-
---------------------------------------------------*/
-
void SwNavigationPI::SetRegionDropMode(sal_uInt16 nNewMode)
{
nRegionMode = nNewMode;
@@ -1381,18 +1271,12 @@ void SwNavigationPI::SetRegionDropMode(sal_uInt16 nNewMode)
else if(nRegionMode == REGION_MODE_EMBEDDED)
nDropId = FN_DROP_REGION_COPY;
- ImageList& rImgLst = aContentToolBox.GetSettings().GetStyleSettings().GetHighContrastMode()
- ? aContentImageListH : aContentImageList;
+ ImageList& rImgLst = aContentImageList;
- aContentToolBox.SetItemImage( FN_DROP_REGION,
- rImgLst.GetImage(nDropId));
+ aContentToolBox.SetItemImage( FN_DROP_REGION, rImgLst.GetImage(nDropId));
}
-/*-----------------12.06.97 09:47-------------------
-
---------------------------------------------------*/
-
sal_Bool SwNavigationPI::ToggleTree()
{
sal_Bool bRet = sal_True;
@@ -1426,9 +1310,6 @@ sal_Bool SwNavigationPI::ToggleTree()
return bRet;
}
-/*-----------------13.06.97 09:42-------------------
-
---------------------------------------------------*/
sal_Bool SwNavigationPI::IsGlobalDoc() const
{
sal_Bool bRet = sal_False;
@@ -1440,18 +1321,14 @@ sal_Bool SwNavigationPI::IsGlobalDoc() const
}
return bRet;
}
-/* -----------------26.10.98 08:10-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwNavigationPI, ChangePageHdl, Timer*, EMPTYARG )
{
EditAction(&GetPageEdit());
GetPageEdit().GrabFocus();
return 0;
}
-/* -----------------26.10.98 08:14-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwNavigationPI, PageEditModifyHdl, Edit*, EMPTYARG )
{
if(aPageChgTimer.IsActive())
@@ -1460,9 +1337,6 @@ IMPL_LINK( SwNavigationPI, PageEditModifyHdl, Edit*, EMPTYARG )
return 0;
}
-/* -----------------------------23.04.01 07:34--------------------------------
-
- ---------------------------------------------------------------------------*/
SwView* SwNavigationPI::GetCreateView() const
{
if(!pCreateView)
@@ -1482,11 +1356,6 @@ SwView* SwNavigationPI::GetCreateView() const
return pCreateView;
}
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwNavigationChild::SwNavigationChild( Window* pParent,
sal_uInt16 nId,
SfxBindings* _pBindings,
@@ -1514,9 +1383,7 @@ SwNavigationChild::SwNavigationChild( Window* pParent,
pNavi->_ZoomIn();
}
}
-/* -----------------------------06.05.2002 10:06------------------------------
- ---------------------------------------------------------------------------*/
void SwNavigationPI::DataChanged( const DataChangedEvent& rDCEvt )
{
Window::DataChanged( rDCEvt );
@@ -1530,15 +1397,12 @@ void SwNavigationPI::DataChanged( const DataChangedEvent& rDCEvt )
SetBackground( aBack );
}
}
-/* -----------------------------06.05.2002 10:07------------------------------
- ---------------------------------------------------------------------------*/
void SwNavigationPI::InitImageList()
{
sal_uInt16 k;
- ImageList& rImgLst = aContentToolBox.GetSettings().GetStyleSettings().GetHighContrastMode() ?
- aContentImageListH : aContentImageList;
+ ImageList& rImgLst = aContentImageList;
for( k = 0; k < aContentToolBox.GetItemCount(); k++)
aContentToolBox.SetItemImage(aContentToolBox.GetItemId(k),
rImgLst.GetImage(aContentToolBox.GetItemId(k)));
@@ -1556,3 +1420,4 @@ void SwNavigationPI::InitImageList()
rImgLst.GetImage(nDropId));
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/navipi.hrc b/sw/source/ui/utlui/navipi.hrc
index 70fd1dc6e14a..bba57cf53d6b 100644
--- a/sw/source/ui/utlui/navipi.hrc
+++ b/sw/source/ui/utlui/navipi.hrc
@@ -31,7 +31,6 @@
#define BT_UP 5
#define BT_DOWN 6
#define IL_CONTENT 7
-#define ILH_CONTENT 8
#define FT_PAGE 10
#define ED_PAGE 11
#define LB_SELECT 22
diff --git a/sw/source/ui/utlui/navipi.src b/sw/source/ui/utlui/navipi.src
index fde6b82f139b..df11c6aee86a 100644
--- a/sw/source/ui/utlui/navipi.src
+++ b/sw/source/ui/utlui/navipi.src
@@ -92,12 +92,6 @@ Window DLG_NAVIGATION_PI
MaskColor = IMAGE_MASK_COLOR ;
NAVI_IDLIST
};
- ImageList ILH_CONTENT
- {
- Prefix = "sch";
- MaskColor = IMAGE_MASK_COLOR ;
- NAVI_IDLIST
- };
Toolbox TB_CONTENT
{
Pos = MAP_PIXEL ( 5 , 5 ) ;
@@ -123,7 +117,6 @@ Window DLG_NAVIGATION_PI
Identifier = FN_UP ;
// ItemBitmap = Bitmap { File = "navup.bmp"; };
HelpID = HID_NAVI_TBX2 ;
- /* ### ACHTUNG: Neuer Text in Resource? Rückwärts : R³ckwõrts */
Text [ en-US ] = "Back" ;
};
ToolBoxItem
@@ -131,14 +124,12 @@ Window DLG_NAVIGATION_PI
Identifier = FN_DOWN ;
// ItemBitmap = Bitmap { File = "navdn.bmp"; };
HelpID = HID_NAVI_TBX3 ;
- /* ### ACHTUNG: Neuer Text in Resource? Vorwärts : Vorwõrts */
Text [ en-US ] = "Forward" ;
};
ToolBoxItem
{
Identifier = FN_DROP_REGION ;
HelpID = HID_NAVI_TBX4 ;
- /* ### ACHTUNG: Neuer Text in Resource? Modus für Drag & Drop auswählen : Modus f³r Drag & Drop auswõhlen */
DropDown = TRUE ;
Text [ en-US ] = "Drag Mode" ;
};
@@ -204,9 +195,7 @@ Window DLG_NAVIGATION_PI
Identifier = FN_SELECT_FOOTER ;
// ItemBitmap = Bitmap { File = "navfoot.bmp"; };
HelpID = HID_NAVI_TBX11 ;
- /* ### ACHTUNG: Neuer Text in Resource? Fußzeile : Fu˜zeile */
Text [ en-US ] = "Footer" ;
- /* ### ACHTUNG: Neuer Text in Resource? Springen zur Fußzeile : Springen zur Fu˜zeile */
};
ToolBoxItem
{
@@ -214,7 +203,6 @@ Window DLG_NAVIGATION_PI
// ItemBitmap = Bitmap { File = "navnote.bmp"; };
HelpID = HID_NAVI_TBX12 ;
Text [ en-US ] = "Anchor<->Text" ;
- /* ### ACHTUNG: Neuer Text in Resource? Springen zwischen Fußnotenankern und dem Fußnotentext : Springen zwischen Fu˜notenankern und dem Fu˜notentext */
};
ToolBoxItem
{
@@ -224,7 +212,6 @@ Window DLG_NAVIGATION_PI
{
Identifier = FN_OUTLINE_LEVEL ;
HelpID = HID_NAVI_TBX13 ;
- /* ### ACHTUNG: Neuer Text in Resource? Angezeigte Überschriftenebenen : Angezeigte šberschriftenebenen */
Text [ en-US ] = "Heading Levels Shown" ;
DropDown = TRUE ;
};
@@ -282,7 +269,6 @@ Window DLG_NAVIGATION_PI
{
Identifier = FN_GLOBAL_OPEN ;
HelpID = HID_NAVI_TBX20 ;
- /* ### ACHTUNG: Neuer Text in Resource? Einfügen : Einf³gen */
Text [ en-US ] = "Insert" ;
};
ToolBoxItem
@@ -303,14 +289,12 @@ Window DLG_NAVIGATION_PI
{
Identifier = FN_ITEM_UP ;
HelpID = HID_NAVI_TBX22 ;
- /* ### ACHTUNG: Neuer Text in Resource? Nach oben verschieben : Nach unten verschieben */
Text [ en-US ] = "Move Up" ;
};
ToolBoxItem
{
Identifier = FN_ITEM_DOWN ;
HelpID = HID_NAVI_TBX23 ;
- /* ### ACHTUNG: Neuer Text in Resource? Nach unten verschieben : Nach oben verschieben */
Text [ en-US ] = "Move Down" ;
};
};
@@ -369,17 +353,14 @@ Window DLG_NAVIGATION_PI
};
String ST_HYPERLINK
{
- /* ### ACHTUNG: Neuer Text in Resource? Als Hyperlink einfügen : Als Hyperlink einf³gen */
Text [ en-US ] = "Insert as Hyperlink" ;
};
String ST_LINK_REGION
{
- /* ### ACHTUNG: Neuer Text in Resource? Als Verknüpfung einfügen : Als Verkn³pfung einf³gen */
Text [ en-US ] = "Insert as Link" ;
};
String ST_COPY_REGION
{
- /* ### ACHTUNG: Neuer Text in Resource? Als Kopie einfügen : Als Kopie einf³gen */
Text [ en-US ] = "Insert as Copy" ;
};
String ST_DISPLAY
@@ -420,7 +401,6 @@ Window DLG_NAVIGATION_PI
};
String ST_INSERT
{
- /* ### ACHTUNG: Neuer Text in Resource? Einfügen : Einf³gen */
Text [ en-US ] = "Insert" ;
};
String ST_INDEX
@@ -441,7 +421,6 @@ Window DLG_NAVIGATION_PI
};
String ST_DELETE
{
- /* ### ACHTUNG: Neuer Text in Resource? Löschen : L÷schen */
Text [ en-US ] = "Delete" ;
};
String ST_DELETE_ENTRY
@@ -458,7 +437,6 @@ Window DLG_NAVIGATION_PI
};
String ST_UPDATE_LINK
{
- /* ### ACHTUNG: Neuer Text in Resource? Verknüpfungen : Verkn³pfungen */
Text [ en-US ] = "Links" ;
};
String ST_UPDATE_ALL
@@ -520,8 +498,6 @@ Window DLG_NAVIGATION_PI
}; \
IdCount = { 12 ; };
-
-
ImageList IMG_NAVI_ENTRYBMP
{
Prefix = "nc";
@@ -529,12 +505,6 @@ ImageList IMG_NAVI_ENTRYBMP
NAVI_ENTRY_IDS
};
-ImageList IMG_NAVI_ENTRYBMPH
-{
- Prefix = "nch";
- MaskColor = IMAGE_MASK_COLOR ;
- NAVI_ENTRY_IDS
-};
//IAccessibility2 Implementation 2009-----
String STR_ACCESS_TL_GLOBAL
@@ -546,4 +516,3 @@ String STR_ACCESS_TL_CONTENT
Text [ en-US ] = "Content View";
};
//-----IAccessibility2 Implementation 2009
-
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index 03b3d58ec5a7..56adbce27f60 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,10 +87,6 @@ NumFormatListBox::NumFormatListBox( Window* pWin, const ResId& rResId,
Init(nFormatType, bUsrFmts);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
NumFormatListBox::NumFormatListBox( Window* pWin, SwView* pView,
const ResId& rResId, short nFormatType,
sal_uLong nDefFmt, sal_Bool bUsrFmts ) :
@@ -106,10 +103,6 @@ NumFormatListBox::NumFormatListBox( Window* pWin, SwView* pView,
Init(nFormatType, bUsrFmts);
}
-/* -----------------15.06.98 11:29-------------------
- *
- * --------------------------------------------------*/
-
void NumFormatListBox::Init(short nFormatType, sal_Bool bUsrFmts)
{
SwView *pView = GetView();
@@ -131,18 +124,11 @@ void NumFormatListBox::Init(short nFormatType, sal_Bool bUsrFmts)
SetSelectHdl(LINK(this, NumFormatListBox, SelectHdl));
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
NumFormatListBox::~NumFormatListBox()
{
if (pOwnFormatter)
delete pOwnFormatter;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
SwView* NumFormatListBox::GetView()
{
@@ -151,10 +137,6 @@ SwView* NumFormatListBox::GetView()
return ::GetActiveView();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void NumFormatListBox::SetFormatType(const short nFormatType)
{
if (nCurrFormatType == -1 ||
@@ -167,7 +149,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
else
{
SwView *pView = GetView();
- DBG_ASSERT(pView, "no view found");
+ OSL_ENSURE(pView, "no view found");
if(!pView)
return;
SwWrtShell &rSh = pView->GetWrtShell();
@@ -237,7 +219,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
break;
default:
- DBG_ERROR("what a format?");
+ OSL_ENSURE(false, "what a format?");
break;
}
@@ -298,10 +280,6 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
{
if (nDefFmt == ULONG_MAX)
@@ -316,7 +294,7 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
else
{
SwView *pView = GetView();
- DBG_ASSERT(pView, "no view found");
+ OSL_ENSURE(pView, "no view found");
if(!pView)
return;
SwWrtShell &rSh = pView->GetWrtShell();
@@ -357,7 +335,6 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
while ((sal_uLong)GetEntryData(nPos) == ULONG_MAX)
nPos++;
-//
sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage);
sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage);
@@ -391,10 +368,6 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
nDefFormat = GetFormat();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uLong NumFormatListBox::GetFormat() const
{
sal_uInt16 nPos = GetSelectEntryPos();
@@ -402,10 +375,6 @@ sal_uLong NumFormatListBox::GetFormat() const
return (sal_uLong)GetEntryData(nPos);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
{
sal_uInt16 nPos = pBox->GetSelectEntryPos();
@@ -441,12 +410,12 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
aCoreSet.Put(SfxBoolItem(SID_ATTR_NUMBERFORMAT_ADD_AUTO, bUseAutomaticLanguage));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( this, aCoreSet,
GetView()->GetViewFrame()->GetFrame().GetFrameInterface(),
RC_DLG_SWNUMFMTDLG );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if (RET_OK == pDlg->Execute())
{
@@ -487,10 +456,6 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
double NumFormatListBox::GetDefValue(const short nFormatType) const
{
double fDefValue = 0.0;
@@ -505,12 +470,6 @@ double NumFormatListBox::GetDefValue(const short nFormatType) const
case NUMBERFORMAT_TIME:
fDefValue = SVX_NUMVAL_TIME;
break;
-/* {
- String sValue("31.8.1997 16:57:34");
- sal_uLong nFormat = pFormatter->GetStandardFormat(nFormatType, LANGUAGE_GERMAN);
- pFormatter->IsNumberFormat( sValue, nFormat, fDefValue );
- }
- break;*/
case NUMBERFORMAT_TEXT:
case NUMBERFORMAT_UNDEFINED:
@@ -537,13 +496,10 @@ double NumFormatListBox::GetDefValue(const short nFormatType) const
return fDefValue;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void NumFormatListBox::Clear()
{
ListBox::Clear();
nCurrFormatType = -1;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/prcntfld.cxx b/sw/source/ui/utlui/prcntfld.cxx
index f439c1fe1139..cddb79dcf5dd 100644
--- a/sw/source/ui/utlui/prcntfld.cxx
+++ b/sw/source/ui/utlui/prcntfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,17 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-// include ---------------------------------------------------------------
-
-
#include "prcntfld.hxx"
-// STATIC DATA -----------------------------------------------------------
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
PercentField::PercentField( Window* pWin, const ResId& rResId ) :
MetricField ( pWin, rResId ),
@@ -56,10 +48,6 @@ PercentField::PercentField( Window* pWin, const ResId& rResId ) :
SetCustomUnitText('%');
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void PercentField::SetRefValue(sal_Int64 nValue)
{
sal_Int64 nRealValue = GetRealValue(eOldUnit);
@@ -70,10 +58,6 @@ void PercentField::SetRefValue(sal_Int64 nValue)
SetPrcntValue(nRealValue, eOldUnit);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void PercentField::ShowPercent(sal_Bool bPercent)
{
if ((bPercent && GetUnit() == FUNIT_CUSTOM) ||
@@ -98,7 +82,7 @@ void PercentField::ShowPercent(sal_Bool bPercent)
SetDecimalDigits( 0 );
nAktWidth = ConvertValue(nOldMin, 0, nOldDigits, eOldUnit, FUNIT_TWIP);
- // Um 0.5 Prozent aufrunden
+ // round to 0.5 percent
nPercent = ((nAktWidth * 10) / nRefValue + 5) / 10;
MetricField::SetMin(Max(static_cast< sal_Int64 >(1), nPercent));
@@ -115,7 +99,6 @@ void PercentField::ShowPercent(sal_Bool bPercent)
}
else
MetricFormatter::SetValue(nLastPercent);
-// SetValue(100, FUNIT_CUSTOM);
}
else
{
@@ -141,16 +124,11 @@ void PercentField::ShowPercent(sal_Bool bPercent)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
void PercentField::SetValue(sal_Int64 nNewValue, FieldUnit eInUnit)
{
MetricFormatter::SetValue(nNewValue, eInUnit);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
+
void PercentField::SetPrcntValue(sal_Int64 nNewValue, FieldUnit eInUnit)
{
if (GetUnit() != FUNIT_CUSTOM || eInUnit == FUNIT_CUSTOM)
@@ -174,10 +152,6 @@ void PercentField::SetPrcntValue(sal_Int64 nNewValue, FieldUnit eInUnit)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void PercentField::SetUserValue( sal_Int64 nNewValue, FieldUnit eInUnit )
{
if (GetUnit() != FUNIT_CUSTOM || eInUnit == FUNIT_CUSTOM)
@@ -202,10 +176,6 @@ void PercentField::SetUserValue( sal_Int64 nNewValue, FieldUnit eInUnit )
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void PercentField::SetBaseValue(sal_Int64 nNewValue, FieldUnit eInUnit)
{
if (GetUnit() == FUNIT_CUSTOM)
@@ -214,19 +184,11 @@ void PercentField::SetBaseValue(sal_Int64 nNewValue, FieldUnit eInUnit)
MetricField::SetBaseValue(nNewValue, eInUnit);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Int64 PercentField::GetValue( FieldUnit eOutUnit )
{
return Convert(MetricField::GetValue(), GetUnit(), eOutUnit);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void PercentField::SetMin(sal_Int64 nNewMin, FieldUnit eInUnit)
{
if (GetUnit() != FUNIT_CUSTOM)
@@ -242,10 +204,6 @@ void PercentField::SetMin(sal_Int64 nNewMin, FieldUnit eInUnit)
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void PercentField::SetMax(sal_Int64 nNewMax, FieldUnit eInUnit)
{
if (GetUnit() != FUNIT_CUSTOM)
@@ -254,14 +212,9 @@ void PercentField::SetMax(sal_Int64 nNewMax, FieldUnit eInUnit)
{
if (eInUnit == FUNIT_NONE)
eInUnit = eOldUnit;
-// SetRefValue(Convert(nNewMax, eInUnit, FUNIT_TWIP));
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Int64 PercentField::NormalizePercent(sal_Int64 nValue)
{
if (GetUnit() != FUNIT_CUSTOM)
@@ -272,10 +225,6 @@ sal_Int64 PercentField::NormalizePercent(sal_Int64 nValue)
return nValue;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Int64 PercentField::DenormalizePercent(sal_Int64 nValue)
{
if (GetUnit() != FUNIT_CUSTOM)
@@ -289,10 +238,6 @@ sal_Int64 PercentField::DenormalizePercent(sal_Int64 nValue)
return nValue;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool PercentField::IsValueModified()
{
if (GetUnit() == FUNIT_CUSTOM)
@@ -301,10 +246,6 @@ sal_Bool PercentField::IsValueModified()
return MetricField::IsValueModified();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Int64 PercentField::ImpPower10( sal_uInt16 n )
{
sal_uInt16 i;
@@ -316,10 +257,6 @@ sal_Int64 PercentField::ImpPower10( sal_uInt16 n )
return nValue;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Int64 PercentField::GetRealValue(FieldUnit eOutUnit)
{
if (GetUnit() != FUNIT_CUSTOM)
@@ -328,10 +265,6 @@ sal_Int64 PercentField::GetRealValue(FieldUnit eOutUnit)
return Convert(GetValue(), GetUnit(), eOutUnit);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Int64 PercentField::Convert(sal_Int64 nValue, FieldUnit eInUnit, FieldUnit eOutUnit)
{
if (eInUnit == eOutUnit ||
@@ -360,7 +293,7 @@ sal_Int64 PercentField::Convert(sal_Int64 nValue, FieldUnit eInUnit, FieldUnit e
nAktWidth = nValue;
else
nAktWidth = ConvertValue(nValue, 0, nOldDigits, eInUnit, FUNIT_TWIP);
- // Um 0.5 Prozent runden
+ // Round to 0.5 percent
return ((nAktWidth * 1000) / nRefValue + 5) / 10;
}
@@ -368,3 +301,4 @@ sal_Int64 PercentField::Convert(sal_Int64 nValue, FieldUnit eInUnit, FieldUnit e
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/shdwcrsr.cxx b/sw/source/ui/utlui/shdwcrsr.cxx
index 58acbd39d8ec..c785cd5edd8a 100644
--- a/sw/source/ui/utlui/shdwcrsr.cxx
+++ b/sw/source/ui/utlui/shdwcrsr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -133,3 +134,4 @@ Rectangle SwShadowCursor::GetRect() const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx
index 94363dfbbbcf..11567ca50a7b 100644
--- a/sw/source/ui/utlui/swrenamexnameddlg.cxx
+++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,7 @@
#include <utlui.hrc>
#include <unotools.hrc>
#include <unoprnms.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <vcl/msgbox.hxx>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/view/XScreenCursor.hpp>
@@ -94,9 +95,7 @@ SwRenameXNamedDlg::SwRenameXNamedDlg( Window* pWin,
aNewNameED.SetModifyHdl(LINK(this, SwRenameXNamedDlg, ModifyHdl));
aOk.Enable(sal_False);
}
-/* -----------------09.06.99 15:34-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK(SwRenameXNamedDlg, OkHdl, OKButton*, EMPTYARG)
{
try
@@ -105,14 +104,12 @@ IMPL_LINK(SwRenameXNamedDlg, OkHdl, OKButton*, EMPTYARG)
}
catch(uno::RuntimeException&)
{
- DBG_ERROR("Name wurde nicht geaendert");
+ OSL_ENSURE(false, "name wasn't changed");
}
EndDialog(RET_OK);
return 0;
}
-/* -----------------09.06.99 15:48-------------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK(SwRenameXNamedDlg, ModifyHdl, NoSpaceEdit*, pEdit)
{
String sTmp(pEdit->GetText());
@@ -141,3 +138,5 @@ IMPL_LINK(SwRenameXNamedDlg, ModifyHdl, NoSpaceEdit*, pEdit)
);
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/textcontrolcombo.cxx b/sw/source/ui/utlui/textcontrolcombo.cxx
index 629d527ca872..a613088c3f76 100644
--- a/sw/source/ui/utlui/textcontrolcombo.cxx
+++ b/sw/source/ui/utlui/textcontrolcombo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,7 +63,7 @@ void TextControlCombo::Arrange( FixedText& _rFTcomplete, sal_Bool /*bShow*/ )
nYCtrl += aMetricVals.Height();
// separate text parts
- const String aReplStr( RTL_CONSTASCII_STRINGPARAM( "%POSITION_OF_CONTROL" ) );
+ const String aReplStr( RTL_CONSTASCII_USTRINGPARAM( "%POSITION_OF_CONTROL" ) );
String aTxtBefore( _rFTcomplete.GetText() );
String aTxtAfter;
xub_StrLen nReplPos = aTxtBefore.Search( aReplStr );
@@ -111,3 +112,4 @@ void TextControlCombo::Enable( sal_Bool _bEnable, sal_Bool _bChild )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/tmplctrl.cxx b/sw/source/ui/utlui/tmplctrl.cxx
index bcae8fa9cd24..21028f9f4781 100644
--- a/sw/source/ui/utlui/tmplctrl.cxx
+++ b/sw/source/ui/utlui/tmplctrl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,18 +29,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-// include ---------------------------------------------------------------
-
-
#include <svl/style.hxx>
-#ifndef _MENU_HXX //autogen
#include <vcl/menu.hxx>
-#endif
#include <svl/stritem.hxx>
#include <sfx2/dispatch.hxx>
-#ifndef _STATUS_HXX //autogen
#include <vcl/status.hxx>
-#endif
#include "wrtsh.hxx"
#include "view.hxx"
@@ -51,7 +45,6 @@
// STATIC DATA -----------------------------------------------------------
-
SFX_IMPL_STATUSBAR_CONTROL( SwTemplateControl, SfxStringItem );
// class TemplatePopup_Impl --------------------------------------------------
@@ -69,16 +62,12 @@ private:
virtual void Select();
};
-// -----------------------------------------------------------------------
-
TemplatePopup_Impl::TemplatePopup_Impl() :
PopupMenu(),
nCurId(USHRT_MAX)
{
}
-// -----------------------------------------------------------------------
-
void TemplatePopup_Impl::Select()
{
nCurId = GetCurItemId();
@@ -93,14 +82,10 @@ SwTemplateControl::SwTemplateControl( sal_uInt16 _nSlotId,
{
}
-// -----------------------------------------------------------------------
-
SwTemplateControl::~SwTemplateControl()
{
}
-// -----------------------------------------------------------------------
-
void SwTemplateControl::StateChanged(
sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
@@ -113,15 +98,11 @@ void SwTemplateControl::StateChanged(
}
}
-// -----------------------------------------------------------------------
-
void SwTemplateControl::Paint( const UserDrawEvent& )
{
GetStatusBar().SetItemText( GetId(), sTemplate );
}
-// -----------------------------------------------------------------------
-
void SwTemplateControl::Command( const CommandEvent& rCEvt )
{
if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU &&
@@ -172,3 +153,4 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/uiitems.cxx b/sw/source/ui/utlui/uiitems.cxx
index b539adea4353..8241f85f1624 100644
--- a/sw/source/ui/utlui/uiitems.cxx
+++ b/sw/source/ui/utlui/uiitems.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,16 +39,14 @@
#include "utlui.hrc"
#include "attrdesc.hrc"
-#ifndef _UNOMID_H
#include <unomid.h>
-#endif
#include <numrule.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
// Breitenangaben der Fussnotenlinien, mit TabPage abstimmen
-static const sal_uInt16 __FAR_DATA nFtnLines[] = {
+static const sal_uInt16 nFtnLines[] = {
0,
10,
50,
@@ -86,7 +85,7 @@ SfxPoolItem* SwPageFtnInfoItem::Clone( SfxItemPool * /*pPool*/ ) const
int SwPageFtnInfoItem::operator==( const SfxPoolItem& rAttr ) const
{
- DBG_ASSERT( Which() == rAttr.Which(), "keine gleichen Attribute" );
+ OSL_ENSURE( Which() == rAttr.Which(), "keine gleichen Attribute" );
return ( aFtnInfo == ((SwPageFtnInfoItem&)rAttr).GetPageFtnInfo());
}
@@ -122,12 +121,10 @@ SfxItemPresentation SwPageFtnInfoItem::GetPresentation
}
return SFX_ITEM_PRESENTATION_NONE;
}
-/* -----------------------------26.04.01 12:25--------------------------------
- ---------------------------------------------------------------------------*/
-sal_Bool SwPageFtnInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
+bool SwPageFtnInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch(nMemberId & ~CONVERT_TWIPS)
{
case MID_FTN_HEIGHT : rVal <<= (sal_Int32)TWIP_TO_MM100(aFtnInfo.GetHeight());break;
@@ -144,17 +141,15 @@ sal_Bool SwPageFtnInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
case MID_LINE_TEXT_DIST : rVal <<= (sal_Int32)TWIP_TO_MM100(aFtnInfo.GetTopDist());break;
case MID_LINE_FOOTNOTE_DIST: rVal <<= (sal_Int32)TWIP_TO_MM100(aFtnInfo.GetBottomDist());break;
default:
- bRet = sal_False;
+ bRet = false;
}
return bRet;
}
-/* -----------------------------26.04.01 12:26--------------------------------
- ---------------------------------------------------------------------------*/
-sal_Bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
+bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
{
sal_Int32 nSet32 = 0;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
switch(nMemberId & ~CONVERT_TWIPS)
{
case MID_LINE_COLOR :
@@ -166,7 +161,7 @@ sal_Bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
case MID_LINE_FOOTNOTE_DIST:
rVal >>= nSet32;
if(nSet32 < 0)
- bRet = sal_False;
+ bRet = false;
else
{
nSet32 = MM100_TO_TWIP(nSet32);
@@ -185,7 +180,7 @@ sal_Bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
if(nSet >= 0)
aFtnInfo.SetLineWidth(MM100_TO_TWIP(nSet));
else
- bRet = sal_False;
+ bRet = false;
}
break;
case MID_LINE_RELWIDTH :
@@ -193,7 +188,7 @@ sal_Bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
sal_Int8 nSet = 0;
rVal >>= nSet;
if(nSet < 0)
- bRet = sal_False;
+ bRet = false;
else
aFtnInfo.SetWidth(Fraction(nSet, 100));
}
@@ -205,11 +200,11 @@ sal_Bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
if(nSet >= 0 && nSet < 3) //text::HorizontalAdjust
aFtnInfo.SetAdj((SwFtnAdj)nSet);
else
- bRet = sal_False;
+ bRet = false;
}
break;
default:
- bRet = sal_False;
+ bRet = false;
}
return bRet;
}
@@ -240,20 +235,15 @@ SfxPoolItem* SwPtrItem::Clone( SfxItemPool * /*pPool*/ ) const
return new SwPtrItem( *this );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
int SwPtrItem::operator==( const SfxPoolItem& rAttr ) const
{
- DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+ OSL_ENSURE( SfxPoolItem::operator==(rAttr), "unequal types" );
const SwPtrItem& rItem = (SwPtrItem&)rAttr;
return ( pMisc == rItem.pMisc );
}
-/*-----------------12.11.97 12:55-------------------------------
+/*--------------------------------------------------------------
SwUINumRuleItem fuer die NumTabPages der FormatNumRule/Stylisten
---------------------------------------------------------------*/
SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul, const sal_uInt16 nId )
@@ -280,17 +270,17 @@ SfxPoolItem* SwUINumRuleItem::Clone( SfxItemPool * /*pPool*/ ) const
int SwUINumRuleItem::operator==( const SfxPoolItem& rAttr ) const
{
- DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+ OSL_ENSURE( SfxPoolItem::operator==(rAttr), "unequal types" );
return *pRule == *((SwUINumRuleItem&)rAttr).pRule;
}
-sal_Bool SwUINumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
+bool SwUINumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
uno::Reference< container::XIndexReplace >xRules = new SwXNumberingRules(*pRule);
rVal.setValue(&xRules, ::getCppuType((uno::Reference< container::XIndexReplace>*)0));
- return sal_True;
+ return true;
}
-sal_Bool SwUINumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
+bool SwUINumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
uno::Reference< container::XIndexReplace> xRulesRef;
if(rVal >>= xRulesRef)
@@ -303,18 +293,14 @@ sal_Bool SwUINumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*
*pRule = *pSwXRules->GetNumRule();
}
}
- return sal_True;
+ return true;
}
-/* -----------------17.06.98 17:43-------------------
- *
- * --------------------------------------------------*/
+
SwBackgroundDestinationItem::SwBackgroundDestinationItem(sal_uInt16 _nWhich, sal_uInt16 nValue) :
SfxUInt16Item(_nWhich, nValue)
{
}
-/* -----------------17.06.98 17:44-------------------
- *
- * --------------------------------------------------*/
+
SfxPoolItem* SwBackgroundDestinationItem::Clone( SfxItemPool * /*pPool*/ ) const
{
return new SwBackgroundDestinationItem(Which(), GetValue());
@@ -322,3 +308,4 @@ SfxPoolItem* SwBackgroundDestinationItem::Clone( SfxItemPool * /*pPool*/ ) c
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index 9ccb68c3bef4..4a81e75889f9 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,6 +32,7 @@
#include <hintids.hxx>
+#include <osl/diagnose.h>
#include <tools/datetime.hxx>
#include <vcl/svapp.hxx>
#include <unotools/collatorwrapper.hxx>
@@ -41,17 +43,13 @@
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <editeng/pmdlitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <editeng/tstpitem.hxx>
-#endif
#include <editeng/boxitem.hxx>
#include <editeng/sizeitem.hxx>
#include <svx/pageitem.hxx>
#include <editeng/lrspitem.hxx>
#include <svl/style.hxx>
-#ifndef _VCL_LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
#include <unotools/localedatawrapper.hxx>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
@@ -66,14 +64,10 @@
#include <fmtpdsc.hxx>
#include <wview.hxx>
#include <uiitems.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <wrtsh.hxx>
#include <swmodule.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <uitool.hxx>
#include <frmatr.hxx>
#include <paratr.hxx>
@@ -81,18 +75,9 @@
#include <poolfmt.hxx>
#include "usrpref.hxx"
-#ifndef _ERROR_H
-#include <error.h>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _UTLUI_HRC
#include <utlui.hrc>
-#endif
#include <doc.hxx>
#include <docary.hxx>
#include <charfmt.hxx>
@@ -231,7 +216,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
//
SwFmtHeader aHeaderFmt(rMaster.GetHeader());
SwFrmFmt *pHeaderFmt = aHeaderFmt.GetHeaderFmt();
- ASSERT(pHeaderFmt != 0, "kein HeaderFormat");
+ OSL_ENSURE(pHeaderFmt != 0, "no header format");
::FillHdFt(pHeaderFmt, rHeaderSet);
@@ -267,7 +252,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
//
SwFmtFooter aFooterFmt(rMaster.GetFooter());
SwFrmFmt *pFooterFmt = aFooterFmt.GetFooterFmt();
- ASSERT(pFooterFmt != 0, "kein FooterFormat");
+ OSL_ENSURE(pFooterFmt != 0, "no footer format");
::FillHdFt(pFooterFmt, rFooterSet);
@@ -326,11 +311,6 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
{
const SwFrmFmt& rMaster = rPageDesc.GetMaster();
@@ -385,7 +365,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
{
const SwFmtHeader &rHeaderFmt = rMaster.GetHeader();
const SwFrmFmt *pHeaderFmt = rHeaderFmt.GetHeaderFmt();
- ASSERT(pHeaderFmt != 0, kein HeaderFormat.);
+ OSL_ENSURE(pHeaderFmt != 0, "no header format");
// HeaderInfo, Raender, Hintergrund, Umrandung
//
@@ -431,7 +411,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
{
const SwFmtFooter &rFooterFmt = rMaster.GetFooter();
const SwFrmFmt *pFooterFmt = rFooterFmt.GetFooterFmt();
- ASSERT(pFooterFmt != 0, kein FooterFormat.);
+ OSL_ENSURE(pFooterFmt != 0, "no footer format");
// FooterInfo, Raender, Hintergrund, Umrandung
//
@@ -622,9 +602,6 @@ void SetDfltMetric( FieldUnit eMetric, sal_Bool bWeb )
SW_MOD()->ApplyUserMetric(eMetric, bWeb);
}
-/*-----------------09.04.98 16:58-------------------
-
---------------------------------------------------*/
sal_uInt16 InsertStringSorted(const String& rEntry, ListBox& rToFill, sal_uInt16 nOffset )
{
sal_uInt16 i = nOffset;
@@ -681,9 +658,6 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, sal_Bool bSorted
}
};
-/* -----------------27.04.98 08:26-------------------
- *
- * --------------------------------------------------*/
SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent,
SwWrtShell* pSh )
{
@@ -715,7 +689,7 @@ SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent,
}
else
{
- DBG_ERROR("wo soll die Breite denn herkommen?");
+ OSL_ENSURE(false, "where to get the actual width from?");
}
const SvxLRSpaceItem& rLRSpace = pFmt->GetLRSpace();
nWidth -= (rLRSpace.GetRight() + rLRSpace.GetLeft());
@@ -726,8 +700,6 @@ SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent,
return nWidth;
}
-/*------------------------------------------------------------------------*/
-
String GetAppLangDateTimeString( const DateTime& rDT )
{
const SvtSysLocale aSysLocale;
@@ -737,9 +709,19 @@ String GetAppLangDateTimeString( const DateTime& rDT )
return sRet;
}
-/*-- 26.01.2006 08:06:33---------------------------------------------------
+/*----------------------------------------------------------------------------
+ * add a new function which can get and set the current "SID_ATTR_APPLYCHARUNIT" value
+ *---------------------------------------------------------------------------*/
+sal_Bool HasCharUnit( sal_Bool bWeb)
+{
+ return SW_MOD()->GetUsrPref(bWeb)->IsApplyCharUnit();
+}
+
+void SetApplyCharUnit(sal_Bool bApplyChar, sal_Bool bWeb)
+{
+ SW_MOD()->ApplyUserCharUnit(bApplyChar, bWeb);
+}
- -----------------------------------------------------------------------*/
bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 nId )
{
bool bRet = false;
@@ -761,7 +743,7 @@ bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16
uno::Reference < frame::XDispatchProvider > xProv( xFrame, uno::UNO_QUERY );
util::URL aURL;
aURL.Complete = sCommand;
- uno::Reference < util::XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), uno::UNO_QUERY );
+ uno::Reference < util::XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer"))), uno::UNO_QUERY );
xTrans->parseStrict( aURL );
uno::Reference< frame::XDispatch > xDisp = xProv->queryDispatch( aURL, ::rtl::OUString(), 0 );
if( xDisp.is() )
@@ -773,3 +755,5 @@ bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16
}
return bRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index 42df7d4a8dac..cbefd877ee42 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,7 @@
#include <unotools.hrc>
#include <unotools.hxx>
#include <unoprnms.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <vcl/msgbox.hxx>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/view/XScreenCursor.hpp>
@@ -62,21 +63,14 @@
#include <unomid.h>
-
using namespace ::com::sun::star;
using ::rtl::OUString;
const sal_Char cFrameControl[] = "com.sun.star.frame.FrameControl";
const sal_Char cFactory[] = "private:factory/swriter";
-/************************************************************************
-
-************************************************************************/
sal_Bool SwOneExampleFrame::bShowServiceNotAvailableMessage = sal_True;
-/* -----------------27.07.99 15:26-------------------
-
- --------------------------------------------------*/
SwOneExampleFrame::SwOneExampleFrame( Window& rWin,
sal_uInt32 nFlags,
const Link* pInitializedLink,
@@ -103,7 +97,6 @@ SwOneExampleFrame::SwOneExampleFrame( Window& rWin,
// the controller is asynchronously set
aLoadedTimer.SetTimeoutHdl(LINK(this, SwOneExampleFrame, TimeoutHdl));
-// aLoadedTimer.SetTimeout(500);
aLoadedTimer.SetTimeout(200);
rWin.Enable(sal_False);
@@ -112,9 +105,6 @@ SwOneExampleFrame::SwOneExampleFrame( Window& rWin,
aTopWindow.Show();
}
-/* -----------------------------08.12.99 13:44--------------------------------
-
- ---------------------------------------------------------------------------*/
void SwOneExampleFrame::CreateErrorMessage(Window* pParent)
{
if(SwOneExampleFrame::bShowServiceNotAvailableMessage)
@@ -125,16 +115,12 @@ void SwOneExampleFrame::CreateErrorMessage(Window* pParent)
SwOneExampleFrame::bShowServiceNotAvailableMessage = sal_False;
}
}
-/* -----------------27.07.99 15:26-------------------
- --------------------------------------------------*/
SwOneExampleFrame::~SwOneExampleFrame()
{
DisposeControl();
}
-/* -----------------------------21.12.00 10:16--------------------------------
- ---------------------------------------------------------------------------*/
void SwOneExampleFrame::CreateControl()
{
if(_xControl.is())
@@ -159,7 +145,6 @@ void SwOneExampleFrame::CreateControl()
uno::Reference< beans::XPropertySet > xPrSet(xInst, uno::UNO_QUERY);
uno::Any aURL;
- //
// create new doc
String sTempURL = C2S(cFactory);
if(sArgumentURL.Len())
@@ -189,10 +174,6 @@ void SwOneExampleFrame::CreateControl()
}
}
-
-/* -----------------------------21.12.00 10:16--------------------------------
-
- ---------------------------------------------------------------------------*/
void SwOneExampleFrame::DisposeControl()
{
_xCursor = 0;
@@ -202,9 +183,7 @@ void SwOneExampleFrame::DisposeControl()
_xModel = 0;
_xController = 0;
}
-/* -----------------27.07.99 15:26-------------------
- --------------------------------------------------*/
IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
{
if(!_xControl.is())
@@ -247,32 +226,32 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
if( !bIsInitialized )
{
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_BREAKS )), aFalseSet);
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_DRAWINGS )), aTrueSet);
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_FIELD_COMMANDS )), aFalseSet);
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_GRAPHICS )), aTrueSet);
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_HIDDEN_PARAGRAPHS )), aFalseSet);
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_HIDDEN_TEXT )), aFalseSet);
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_HORI_RULER )), aFalseSet);
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_PARA_BREAKS )), aFalseSet);
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_PROTECTED_SPACES )), aFalseSet);
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_SOFT_HYPHENS )), aFalseSet);
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_SPACES )), aFalseSet);
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_TABLES )), aTrueSet);
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_TABSTOPS )), aFalseSet);
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_VERT_RULER )), aFalseSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_BREAKS)), aFalseSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_DRAWINGS)), aTrueSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_FIELD_COMMANDS)), aFalseSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_GRAPHICS)), aTrueSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_HIDDEN_PARAGRAPHS)), aFalseSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_HIDDEN_TEXT)), aFalseSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_HORI_RULER)), aFalseSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_PARA_BREAKS)), aFalseSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_PROTECTED_SPACES)), aFalseSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_SOFT_HYPHENS)), aFalseSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_SPACES)), aFalseSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_TABLES)), aTrueSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_TABSTOPS)), aFalseSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_VERT_RULER)), aFalseSet);
if(0 ==(nStyleFlags&EX_SHOW_ONLINE_LAYOUT))
{
uno::Any aZoom;
aZoom <<= (sal_Int16)view::DocumentZoomType::PAGE_WIDTH_EXACT;
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom);
}
else
{
uno::Any aZoom;
aZoom <<= (sal_Int16)view::DocumentZoomType::BY_VALUE;
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom);
sal_Int16 nZoomValue = 50;
if(EX_SHOW_BUSINESS_CARDS == nStyleFlags)
@@ -280,10 +259,10 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
nZoomValue = 80;
}
aZoom <<= nZoomValue;
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)), aZoom);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)), aZoom);
}
// set onlinelayout property behind setting the zoom
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_ONLINE_LAYOUT)),
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_ONLINE_LAYOUT)),
(nStyleFlags&EX_SHOW_ONLINE_LAYOUT) ? aTrueSet : aFalseSet );
bIsInitialized = sal_True;
}
@@ -293,7 +272,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
_xCursor = xText->createTextCursor();
uno::Reference< beans::XPropertySet > xCrsrProp(_xCursor, uno::UNO_QUERY);
uno::Any aPageStyle = xCrsrProp->getPropertyValue(
- C2U(SW_PROP_NAME_STR(UNO_NAME_PAGE_STYLE_NAME)));
+ rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_PAGE_STYLE_NAME)));
OUString sPageStyle;
aPageStyle >>= sPageStyle;
@@ -309,27 +288,26 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
uno::Reference< style::XStyle > xPStyle;
aPStyle >>= xPStyle;
uno::Reference< beans::XPropertySet > xPProp(xPStyle, uno::UNO_QUERY);
- uno::Any aSize = xPProp->getPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SIZE)));
+ uno::Any aSize = xPProp->getPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SIZE)));
awt::Size aPSize;
aSize >>= aPSize;
//TODO: set page width to card width
aPSize.Width = 10000;
aSize.setValue(&aPSize, ::getCppuType((awt::Size*)0));
- xPProp->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SIZE)), aSize);
+ xPProp->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SIZE)), aSize);
uno::Any aZero; aZero <<= (sal_Int32)0;
- xPProp->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_LEFT_MARGIN)), aZero);
- xPProp->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_RIGHT_MARGIN)), aZero);
+ xPProp->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LEFT_MARGIN)), aZero);
+ xPProp->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RIGHT_MARGIN)), aZero);
}
// can only be done here - the SFX changes the ScrollBar values
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_HORI_SCROLL_BAR )), aFalseSet);
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_VERT_SCROLL_BAR )), aFalseSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_HORI_SCROLL_BAR )), aFalseSet);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_VERT_SCROLL_BAR )), aFalseSet);
if( aInitializedLink.IsSet() )
{
rWindow.Enable(sal_False, sal_True);
- //rWindow.Enable(sal_True, sal_False);
aInitializedLink.Call(this);
}
@@ -364,9 +342,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
pTimer->Start();
return 0;
}
-/* -----------------------------27.12.99 09:59--------------------------------
- ---------------------------------------------------------------------------*/
void SwOneExampleFrame::ClearDocument( sal_Bool bStartUpdateTimer )
{
uno::Reference< lang::XUnoTunnel> xTunnel( _xCursor, uno::UNO_QUERY);
@@ -398,9 +374,7 @@ void SwOneExampleFrame::ClearDocument( sal_Bool bStartUpdateTimer )
}
}
}
-/* -----------------------------15.12.99 11:09--------------------------------
- ---------------------------------------------------------------------------*/
static const sal_Int16 nZoomValues[] =
{
20,
@@ -409,7 +383,7 @@ static const sal_Int16 nZoomValues[] =
75,
100
};
-//---------------------------------------------------------------------------
+
#define ITEM_UP 100
#define ITEM_DOWN 200
#define ITEM_ZOOM 300
@@ -432,7 +406,7 @@ void SwOneExampleFrame::CreatePopup(const Point& rPt)
uno::Reference< view::XViewSettingsSupplier > xSettings(_xController, uno::UNO_QUERY);
uno::Reference< beans::XPropertySet > xViewProps = xSettings->getViewSettings();
- uno::Any aZoom = xViewProps->getPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)));
+ uno::Any aZoom = xViewProps->getPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)));
sal_Int16 nZoom = 0;
aZoom >>= nZoom;
@@ -451,9 +425,7 @@ void SwOneExampleFrame::CreatePopup(const Point& rPt)
aPop.Execute( &aTopWindow, rPt );
}
-/* -----------------------------15.12.99 11:09--------------------------------
- ---------------------------------------------------------------------------*/
IMPL_LINK(SwOneExampleFrame, PopupHdl, Menu*, pMenu )
{
sal_uInt16 nId = pMenu->GetCurItemId();
@@ -465,9 +437,9 @@ IMPL_LINK(SwOneExampleFrame, PopupHdl, Menu*, pMenu )
uno::Any aZoom;
aZoom <<= nZoom;
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)), aZoom);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)), aZoom);
aZoom <<= (sal_Int16)view::DocumentZoomType::BY_VALUE;
- xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom);
+ xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom);
}
else if(ITEM_UP == nId || ITEM_DOWN == nId)
{
@@ -480,18 +452,14 @@ IMPL_LINK(SwOneExampleFrame, PopupHdl, Menu*, pMenu )
}
return 0;
};
-/* -----------------------------15.12.99 10:37--------------------------------
- ---------------------------------------------------------------------------*/
SwFrmCtrlWindow::SwFrmCtrlWindow(Window* pParent, WinBits nBits,
SwOneExampleFrame* pFrame) :
Window(pParent, nBits),
pExampleFrame(pFrame)
{
}
-/* -----------------------------15.12.99 09:57--------------------------------
- ---------------------------------------------------------------------------*/
void SwFrmCtrlWindow::Command( const CommandEvent& rCEvt )
{
switch ( rCEvt.GetCommand() )
@@ -510,9 +478,7 @@ void SwFrmCtrlWindow::Command( const CommandEvent& rCEvt )
default:;
}
}
-/* -----------------------------15.12.99 12:57--------------------------------
- ---------------------------------------------------------------------------*/
MenuResource::MenuResource(const ResId& rResId) :
Resource(rResId),
aMenuArray(ResId(1,*rResId.GetResMgr()))
@@ -520,3 +486,4 @@ MenuResource::MenuResource(const ResId& rResId) :
FreeResource();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/utlui.src b/sw/source/ui/utlui/utlui.src
index dfa3e07f9053..db93aceacc04 100644
--- a/sw/source/ui/utlui/utlui.src
+++ b/sw/source/ui/utlui/utlui.src
@@ -319,51 +319,6 @@ ImageList ILIST_DB_DLG
MaskColor = IMAGE_MASK_COLOR;
IMGLIST_IDS;
};
-
-ImageList ILIST_DB_DLG_HC
-{
- Prefix = "sxh";
- MaskColor = IMAGE_MASK_COLOR ;
- IMGLIST_IDS;
-};
-
-Image IMG_ONE_LEFT_HC
-{
- ImageBitmap = Bitmap
- {
- File = "one_left_h.bmp" ;
- };
- MaskColor = IMAGE_MASK_COLOR ;
-};
-
-Image IMG_ONE_RIGHT_HC
-{
- ImageBitmap = Bitmap
- {
- File = "one_right_h.bmp" ;
- };
- MaskColor = IMAGE_MASK_COLOR ;
-};
-
-Image IMG_ALL_LEFT_HC
-{
- ImageBitmap = Bitmap
- {
- File = "all_left_h.bmp" ;
- };
- MaskColor = IMAGE_MASK_COLOR ;
-};
-
-Image IMG_ALL_RIGHT_HC
-{
- ImageBitmap = Bitmap
- {
- File = "all_right_h.bmp" ;
- };
- MaskColor = IMAGE_MASK_COLOR ;
-};
-
-
Image IMG_VIEWLAYOUT_AUTOMATIC
{
ImageBitmap = Bitmap
@@ -414,59 +369,6 @@ Image IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE
};
MaskColor = IMAGE_MASK_COLOR;
};
-
-Image IMG_VIEWLAYOUT_AUTOMATIC_HC
-{
- ImageBitmap = Bitmap
- {
- File = "twopages_11x25_h.png" ;
- };
- MaskColor = IMAGE_MASK_COLOR;
-};
-Image IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE_HC
-{
- ImageBitmap = Bitmap
- {
- File = "twopages_a_11x25_h.png" ;
- };
- MaskColor = IMAGE_MASK_COLOR;
-};
-
-Image IMG_VIEWLAYOUT_BOOKMODE_HC
-{
- ImageBitmap = Bitmap
- {
- File = "doublepage_11x23_h.png" ;
- };
- MaskColor = IMAGE_MASK_COLOR;
-};
-Image IMG_VIEWLAYOUT_BOOKMODE_ACTIVE_HC
-{
- ImageBitmap = Bitmap
- {
- File = "doublepage_a_11x23_h.png" ;
- };
- MaskColor = IMAGE_MASK_COLOR;
-};
-Image IMG_VIEWLAYOUT_SINGLECOLUMN_HC
-{
- ImageBitmap = Bitmap
- {
- File = "emptypage_11x15_h.png" ;
- };
- MaskColor = IMAGE_MASK_COLOR;
-};
-Image IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE_HC
-{
- ImageBitmap = Bitmap
- {
- File = "emptypage_a_11x15_h.png" ;
- };
- MaskColor = IMAGE_MASK_COLOR;
-};
-
-
-
String STR_HYPERCTRL_SEL
{
Text [ en-US ] = "SEL";
@@ -475,4 +377,3 @@ String STR_HYPERCTRL_HYP
{
Text [ en-US ] = "HYP";
};
-
diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx
index 1b755391c319..ac8e4a526f80 100644
--- a/sw/source/ui/utlui/viewlayoutctrl.cxx
+++ b/sw/source/ui/utlui/viewlayoutctrl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,31 +32,23 @@
// include ---------------------------------------------------------------
#include <viewlayoutctrl.hxx>
-#ifndef _STATUS_HXX //autogen
#include <vcl/status.hxx>
-#endif
#include <vcl/image.hxx>
#include <svl/eitem.hxx>
#include <svx/viewlayoutitem.hxx>
-#ifndef _UTLUI_HRC
#include <utlui.hrc>
-#endif
#include <swtypes.hxx> // fuer Pathfinder
// STATIC DATA -----------------------------------------------------------
SFX_IMPL_STATUSBAR_CONTROL( SwViewLayoutControl, SvxViewLayoutItem );
-// -----------------------------------------------------------------------
-
const long nImageWidthSingle = 15;
const long nImageWidthAuto = 25;
const long nImageWidthBook = 23;
const long nImageWidthSum = 63;
const long nImageHeight = 11;
-// -----------------------------------------------------------------------
-
struct SwViewLayoutControl::SwViewLayoutControl_Impl
{
sal_uInt16 mnState; // 0 = single, 1 = auto, 2 = book, 3 = none
@@ -75,31 +68,26 @@ SwViewLayoutControl::SwViewLayoutControl( sal_uInt16 _nSlotId, sal_uInt16 _nId,
{
mpImpl->mnState = 0;
- const sal_Bool bHC = GetStatusBar().GetSettings().GetStyleSettings().GetHighContrastMode();
- mpImpl->maImageSingleColumn = Image( bHC ? SW_RES(IMG_VIEWLAYOUT_SINGLECOLUMN_HC) : SW_RES(IMG_VIEWLAYOUT_SINGLECOLUMN) );
- mpImpl->maImageSingleColumn_Active = Image( bHC ? SW_RES(IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE_HC) : SW_RES(IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE) );
- mpImpl->maImageAutomatic = Image( bHC ? SW_RES(IMG_VIEWLAYOUT_AUTOMATIC_HC) : SW_RES(IMG_VIEWLAYOUT_AUTOMATIC) );
- mpImpl->maImageAutomatic_Active = Image( bHC ? SW_RES(IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE_HC) : SW_RES(IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE) );
- mpImpl->maImageBookMode = Image( bHC ? SW_RES(IMG_VIEWLAYOUT_BOOKMODE_HC) : SW_RES(IMG_VIEWLAYOUT_BOOKMODE) );
- mpImpl->maImageBookMode_Active = Image( bHC ? SW_RES(IMG_VIEWLAYOUT_BOOKMODE_ACTIVE_HC) : SW_RES(IMG_VIEWLAYOUT_BOOKMODE_ACTIVE) );
+ mpImpl->maImageSingleColumn = Image( SW_RES(IMG_VIEWLAYOUT_SINGLECOLUMN) );
+ mpImpl->maImageSingleColumn_Active = Image( SW_RES(IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE) );
+ mpImpl->maImageAutomatic = Image( SW_RES(IMG_VIEWLAYOUT_AUTOMATIC) );
+ mpImpl->maImageAutomatic_Active = Image( SW_RES(IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE) );
+ mpImpl->maImageBookMode = Image( SW_RES(IMG_VIEWLAYOUT_BOOKMODE) );
+ mpImpl->maImageBookMode_Active = Image( SW_RES(IMG_VIEWLAYOUT_BOOKMODE_ACTIVE) );
}
-// -----------------------------------------------------------------------
-
SwViewLayoutControl::~SwViewLayoutControl()
{
delete mpImpl;
}
-// -----------------------------------------------------------------------
-
void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
if ( SFX_ITEM_AVAILABLE != eState || pState->ISA( SfxVoidItem ) )
GetStatusBar().SetItemText( GetId(), String() );
else
{
- DBG_ASSERT( pState->ISA( SvxViewLayoutItem ), "invalid item type" );
+ OSL_ENSURE( pState->ISA( SvxViewLayoutItem ), "invalid item type" );
const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem*>( pState )->GetValue();
const bool bBookMode = static_cast<const SvxViewLayoutItem*>( pState )->IsBookMode();
@@ -120,17 +108,10 @@ void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState
GetStatusBar().SetItemData( GetId(), 0 ); // force repaint
}
-// -----------------------------------------------------------------------
-
void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt )
{
OutputDevice* pDev = rUsrEvt.GetDevice();
Rectangle aRect = rUsrEvt.GetRect();
- Color aOldLineColor = pDev->GetLineColor();
- Color aOldFillColor = pDev->GetFillColor();
-
- //pDev->SetLineColor();
- //pDev->SetFillColor( pDev->GetBackground().GetColor() );
const bool bSingleColumn = 0 == mpImpl->mnState;
const bool bAutomatic = 1 == mpImpl->mnState;
@@ -152,17 +133,6 @@ void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt )
// draw bookmode image:
aRect.Left() += nImageWidthAuto;
pDev->DrawImage( aRect.TopLeft(), bBookMode ? mpImpl->maImageBookMode_Active : mpImpl->maImageBookMode );
-
- // draw separators
- //aRect = rUsrEvt.GetRect();
- //aRect.Left() += nImageWidth;
- //aRect.setWidth( 1 );
- //pDev->DrawRect( aRect );
- //aRect.Left() += nImageWidth;
- //pDev->DrawRect( aRect );
-
- //pDev->SetLineColor( aOldLineColor );
- //pDev->SetFillColor( aOldFillColor );
}
sal_Bool SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
@@ -207,3 +177,5 @@ sal_Bool SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
return sal_True;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/zoomctrl.cxx b/sw/source/ui/utlui/zoomctrl.cxx
index 13cc237812d6..80c5bf66eddc 100644
--- a/sw/source/ui/utlui/zoomctrl.cxx
+++ b/sw/source/ui/utlui/zoomctrl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,13 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "hintids.hxx"
-#ifndef _STATUS_HXX //autogen
#include <vcl/status.hxx>
-#endif
#include <sfx2/app.hxx>
#include <svl/stritem.hxx>
#include <svx/zoomitem.hxx>
@@ -42,10 +39,8 @@
#include "swtypes.hxx"
#include "zoomctrl.hxx"
-
SFX_IMPL_STATUSBAR_CONTROL( SwZoomControl, SvxZoomItem );
-
SwZoomControl::SwZoomControl( sal_uInt16 _nSlotId,
sal_uInt16 _nId,
StatusBar& rStb ) :
@@ -53,14 +48,10 @@ SwZoomControl::SwZoomControl( sal_uInt16 _nSlotId,
{
}
-// -----------------------------------------------------------------------
-
SwZoomControl::~SwZoomControl()
{
}
-// -----------------------------------------------------------------------
-
void SwZoomControl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState )
{
@@ -76,8 +67,6 @@ void SwZoomControl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
}
}
-// -----------------------------------------------------------------------
-
void SwZoomControl::Paint( const UserDrawEvent& rUsrEvt )
{
if(!sPreviewZoom.Len())
@@ -86,8 +75,6 @@ void SwZoomControl::Paint( const UserDrawEvent& rUsrEvt )
GetStatusBar().SetItemText( GetId(), sPreviewZoom );
}
-// -----------------------------------------------------------------------
-
void SwZoomControl::Command( const CommandEvent& rCEvt )
{
if(!sPreviewZoom.Len())
@@ -97,3 +84,4 @@ void SwZoomControl::Command( const CommandEvent& rCEvt )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx
index bff007751562..3217c4cf7385 100644
--- a/sw/source/ui/vba/service.cxx
+++ b/sw/source/ui/vba/service.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,6 +58,11 @@ namespace vbaeventshelper
extern sdecl::ServiceDecl const serviceDecl;
}
+namespace vbaeventshelper
+{
+extern sdecl::ServiceDecl const serviceDecl;
+}
+
extern "C"
{
SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
@@ -78,3 +84,4 @@ extern "C"
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaaddin.cxx b/sw/source/ui/vba/vbaaddin.cxx
index 8929ae96a914..3e0873c00646 100644
--- a/sw/source/ui/vba/vbaaddin.cxx
+++ b/sw/source/ui/vba/vbaaddin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,4 @@ SwVbaAddin::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaaddin.hxx b/sw/source/ui/vba/vbaaddin.hxx
index 090f5bcc580f..9f4e8c5f797f 100644
--- a/sw/source/ui/vba/vbaaddin.hxx
+++ b/sw/source/ui/vba/vbaaddin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_ADDIN_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx
index f51e11e359b0..2e206cca07c0 100644
--- a/sw/source/ui/vba/vbaaddins.cxx
+++ b/sw/source/ui/vba/vbaaddins.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,7 @@ uno::Reference< container::XIndexAccess > lcl_getAddinCollection( const uno::Ref
// first get the autoload addins in the directory STARTUP
uno::Reference< lang::XMultiComponentFactory > xMCF( xContext->getServiceManager(), uno::UNO_QUERY_THROW );
- uno::Reference< ucb::XSimpleFileAccess > xSFA( xMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), xContext), uno::UNO_QUERY_THROW );
+ uno::Reference< ucb::XSimpleFileAccess > xSFA( xMCF->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")), xContext), uno::UNO_QUERY_THROW );
SvtPathOptions aPathOpt;
// FIXME: temporary the STARTUP path is located in $OO/basic3.1/program/addin
String aAddinPath = aPathOpt.GetAddinPath();
@@ -105,3 +106,5 @@ SwVbaAddins::getServiceNames()
}
return sNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaaddins.hxx b/sw/source/ui/vba/vbaaddins.hxx
index 6d160f78e27b..2d5b651f76fe 100644
--- a/sw/source/ui/vba/vbaaddins.hxx
+++ b/sw/source/ui/vba/vbaaddins.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,5 @@ public:
};
#endif /* SW_VBA_ADDINS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx
index 8056f9ae3deb..c1da3cc3eb61 100644
--- a/sw/source/ui/vba/vbaapplication.cxx
+++ b/sw/source/ui/vba/vbaapplication.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,6 +41,7 @@
#include <editeng/acorrcfg.hxx>
#include "wordvbahelper.hxx"
#include <docsh.hxx>
+#include "vbalistgalleries.hxx"
using namespace ::ooo;
using namespace ::ooo::vba;
@@ -151,6 +153,16 @@ SwVbaApplication::Dialogs( const uno::Any& index ) throw (uno::RuntimeException)
return uno::makeAny( xCol );
}
+uno::Any SAL_CALL
+SwVbaApplication::ListGalleries( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< text::XTextDocument > xTextDoc( getCurrentDocument(), uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xCol( new SwVbaListGalleries( this, mxContext, xTextDoc ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
sal_Bool SAL_CALL SwVbaApplication::getDisplayAutoCompleteTips() throw (css::uno::RuntimeException)
{
return SvxAutoCorrCfg::Get()->IsAutoTextTip();
@@ -201,3 +213,5 @@ SwVbaApplication::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaapplication.hxx b/sw/source/ui/vba/vbaapplication.hxx
index 1261590d7c56..9d741013a7a8 100644
--- a/sw/source/ui/vba/vbaapplication.hxx
+++ b/sw/source/ui/vba/vbaapplication.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,6 +61,7 @@ public:
virtual css::uno::Any SAL_CALL Documents( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Addins( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Dialogs( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL ListGalleries( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual sal_Bool SAL_CALL getDisplayAutoCompleteTips() throw (css::uno::RuntimeException);
virtual void SAL_CALL setDisplayAutoCompleteTips( sal_Bool _displayAutoCompleteTips ) throw (css::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getEnableCancelKey() throw (css::uno::RuntimeException);
@@ -72,3 +74,5 @@ protected:
virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() throw (css::uno::RuntimeException);
};
#endif /* SW_VBA_APPLICATION_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx
index d4c153913553..8ad0f0f45673 100644
--- a/sw/source/ui/vba/vbaautotextentry.cxx
+++ b/sw/source/ui/vba/vbaautotextentry.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,7 +27,9 @@
************************************************************************/
#include "vbaautotextentry.hxx"
#include <vbahelper/vbahelper.hxx>
+#include <com/sun/star/text/XParagraphCursor.hpp>
#include <tools/diagnose_ex.h>
+#include "wordvbahelper.hxx"
#include "vbarange.hxx"
using namespace ::ooo::vba;
@@ -41,7 +44,7 @@ SwVbaAutoTextEntry::~SwVbaAutoTextEntry()
{
}
-uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::Reference< word::XRange >& _where, const uno::Any& /*_richtext*/ ) throw ( uno::RuntimeException )
+uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::Reference< word::XRange >& _where, const uno::Any& _richtext ) throw ( uno::RuntimeException )
{
SwVbaRange* pWhere = dynamic_cast<SwVbaRange*>( _where.get() );
if( pWhere )
@@ -55,8 +58,27 @@ uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::R
uno::Reference< text::XTextCursor > xTC = xText->createTextCursorByRange( xTextRange->getStart() );
xTC->goRight( 1, sal_True );
xTC->setString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("") ) ); // remove marker
+ // remove the blank paragraph if it is a rich text
+ sal_Bool bRich = sal_False;
+ _richtext >>= bRich;
+ if( bRich )
+ {
+ // check if it is a blank paragraph
+ uno::Reference< text::XParagraphCursor > xParaCursor( xTC, uno::UNO_QUERY_THROW );
+ if( xParaCursor->isStartOfParagraph() && xParaCursor->isEndOfParagraph() )
+ {
+ //remove the blank paragraph
+ uno::Reference< frame::XModel > xModel( getCurrentWordDoc( mxContext ), uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextViewCursor > xTVCursor = word::getXTextViewCursor( xModel );
+ uno::Reference< text::XTextRange > xCurrentRange( xTC->getEnd(), uno::UNO_QUERY_THROW );
+ xTVCursor->gotoRange( xCurrentRange, sal_False );
+ rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Delete"));
+ dispatchRequests( xModel,url );
+ xTVCursor->gotoRange( xEndMarker->getEnd(), sal_False );
+ }
+ }
xEndMarker->setString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("") ) ); // remove marker
- xTC->gotoRange( xEndMarker, sal_True );
+ xTC = xText->createTextCursorByRange( xEndMarker->getEnd() );
pWhere->setXTextCursor( xTC );
}
return uno::Reference< word::XRange >( pWhere );
@@ -95,8 +117,7 @@ SwVbaAutoTextEntries::getElementType() throw (uno::RuntimeException)
uno::Reference< container::XEnumeration >
SwVbaAutoTextEntries::createEnumeration() throw (uno::RuntimeException)
{
- uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
- return xEnumerationAccess->createEnumeration();
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
}
uno::Any
@@ -124,3 +145,5 @@ SwVbaAutoTextEntries::getServiceNames()
}
return sNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaautotextentry.hxx b/sw/source/ui/vba/vbaautotextentry.hxx
index 4ec2d986a877..c5c22da79b56 100644
--- a/sw/source/ui/vba/vbaautotextentry.hxx
+++ b/sw/source/ui/vba/vbaautotextentry.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,3 +79,5 @@ public:
};
#endif /* SW_VBA_AUTOTEXTENTRY_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbabookmark.cxx b/sw/source/ui/vba/vbabookmark.cxx
index a710682c5194..d254659ac260 100644
--- a/sw/source/ui/vba/vbabookmark.cxx
+++ b/sw/source/ui/vba/vbabookmark.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,12 @@
#include <tools/diagnose_ex.h>
#include <com/sun/star/text/XTextDocument.hpp>
#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/text/XTextViewCursor.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
#include "vbarange.hxx"
+#include "wordvbahelper.hxx"
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -65,8 +69,8 @@ void SAL_CALL SwVbaBookmark::Delete() throw ( uno::RuntimeException )
void SAL_CALL SwVbaBookmark::Select() throw ( uno::RuntimeException )
{
checkVality();
- uno::Reference< text::XTextViewCursorSupplier > xViewCursorSupplier( mxModel->getCurrentController(), uno::UNO_QUERY_THROW );
- xViewCursorSupplier->getViewCursor()->gotoRange( mxBookmark->getAnchor(),sal_False );
+ uno::Reference< view::XSelectionSupplier > xSelectSupp( mxModel->getCurrentController(), uno::UNO_QUERY_THROW );
+ xSelectSupp->select( uno::makeAny( mxBookmark ) );
}
rtl::OUString SAL_CALL SwVbaBookmark::getName() throw ( uno::RuntimeException )
@@ -107,3 +111,4 @@ SwVbaBookmark::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbabookmark.hxx b/sw/source/ui/vba/vbabookmark.hxx
index 632046c935d8..42aee48ca0bb 100644
--- a/sw/source/ui/vba/vbabookmark.hxx
+++ b/sw/source/ui/vba/vbabookmark.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_BOOKMARK_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx
index 609b8f9df767..2990feaf9487 100644
--- a/sw/source/ui/vba/vbabookmarks.cxx
+++ b/sw/source/ui/vba/vbabookmarks.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -117,9 +118,6 @@ SwVbaBookmarks::SwVbaBookmarks( const uno::Reference< XHelperInterface >& xParen
{
mxBookmarksSupplier.set( mxModel, uno::UNO_QUERY_THROW );
uno::Reference< text::XTextDocument > xDocument( mxModel, uno::UNO_QUERY_THROW );
- // use view cursor to insert bookmark, or it will fail if insert bookmark in table
- // mxText = xDocument->getText();
- mxText = word::getXTextViewCursor( mxModel )->getText();
}
// XEnumerationAccess
uno::Type
@@ -145,16 +143,16 @@ SwVbaBookmarks::createCollectionObject( const css::uno::Any& aSource )
void SwVbaBookmarks::removeBookmarkByName( const rtl::OUString& rName ) throw (uno::RuntimeException)
{
uno::Reference< text::XTextContent > xBookmark( m_xNameAccess->getByName( rName ), uno::UNO_QUERY_THROW );
- mxText->removeTextContent( xBookmark );
+ word::getXTextViewCursor( mxModel )->getText()->removeTextContent( xBookmark );
}
-void SwVbaBookmarks::addBookmarkByName( const rtl::OUString& rName, const uno::Reference< text::XTextRange >& rTextRange ) throw (uno::RuntimeException)
+void SwVbaBookmarks::addBookmarkByName( const uno::Reference< frame::XModel >& xModel, const rtl::OUString& rName, const uno::Reference< text::XTextRange >& rTextRange ) throw (uno::RuntimeException)
{
- uno::Reference< lang::XMultiServiceFactory > xDocMSF( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< lang::XMultiServiceFactory > xDocMSF( xModel, uno::UNO_QUERY_THROW );
uno::Reference< text::XTextContent > xBookmark( xDocMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmark")) ), uno::UNO_QUERY_THROW );
uno::Reference< container::XNamed > xNamed( xBookmark, uno::UNO_QUERY_THROW );
xNamed->setName( rName );
- mxText->insertTextContent( rTextRange, xBookmark, sal_False );
+ rTextRange->getText()->insertTextContent( rTextRange, xBookmark, sal_False );
}
uno::Any SAL_CALL
@@ -175,12 +173,11 @@ SwVbaBookmarks::Add( const rtl::OUString& rName, const uno::Any& rRange ) throw
}
// remove the exist bookmark
- // rtl::OUString aName = rName.toAsciiLowerCase();
rtl::OUString aName = rName;
if( m_xNameAccess->hasByName( aName ) )
removeBookmarkByName( aName );
- addBookmarkByName( aName, xTextRange );
+ addBookmarkByName( mxModel, aName, xTextRange );
return uno::makeAny( uno::Reference< word::XBookmark >( new SwVbaBookmark( getParent(), mxContext, mxModel, aName ) ) );
}
@@ -234,3 +231,5 @@ SwVbaBookmarks::getServiceNames()
}
return sNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbabookmarks.hxx b/sw/source/ui/vba/vbabookmarks.hxx
index d9047b33d49c..0060bb67c357 100644
--- a/sw/source/ui/vba/vbabookmarks.hxx
+++ b/sw/source/ui/vba/vbabookmarks.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,12 +48,12 @@ private:
private:
void removeBookmarkByName( const rtl::OUString& rName ) throw (css::uno::RuntimeException);
- void addBookmarkByName( const rtl::OUString& rName, const css::uno::Reference< css::text::XTextRange >& rTextRange ) throw (css::uno::RuntimeException);
public:
SwVbaBookmarks( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xBookmarks, const css::uno::Reference< css::frame::XModel >& xModel );
virtual ~SwVbaBookmarks() {}
+ static void addBookmarkByName( const css::uno::Reference< css::frame::XModel >& xModel, const rtl::OUString& rName, const css::uno::Reference< css::text::XTextRange >& rTextRange ) throw (css::uno::RuntimeException);
// XEnumerationAccess
virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
@@ -73,3 +74,5 @@ public:
};
#endif /* SW_VBA_BOOKMARKS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx
index 184f406c49ac..26d5a6bf18be 100644
--- a/sw/source/ui/vba/vbaborders.cxx
+++ b/sw/source/ui/vba/vbaborders.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,6 +29,7 @@
#include <ooo/vba/word/XBorder.hpp>
#include <ooo/vba/word/WdBorderType.hpp>
#include <ooo/vba/word/WdLineStyle.hpp>
+#include <sal/macros.h>
#include <cppuhelper/implbase3.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/table/TableBorder.hpp>
@@ -268,7 +270,7 @@ public:
// XIndexAccess
virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
{
- return sizeof( supportedIndexTable ) / sizeof( supportedIndexTable[0] );
+ return SAL_N_ELEMENTS( supportedIndexTable );
}
virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
{
@@ -348,14 +350,14 @@ SwVbaBorders::getItemByIntIndex( const sal_Int32 nIndex ) throw (uno::RuntimeEx
sal_Bool SAL_CALL SwVbaBorders::getShadow() throw (uno::RuntimeException)
{
- table::ShadowFormat aShadowFormat;
- m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShadowFormat") ) ) >>= aShadowFormat;
- return ( aShadowFormat.Location != table::ShadowLocation_NONE );
+ // always return False for table border in MS Word
+ return sal_False;
}
void SAL_CALL SwVbaBorders::setShadow( sal_Bool /*_shadow*/ ) throw (uno::RuntimeException)
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ // not support in Table border in Word
+ // TODO:
}
rtl::OUString&
@@ -376,3 +378,5 @@ SwVbaBorders::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaborders.hxx b/sw/source/ui/vba/vbaborders.hxx
index e8a5ff487b98..536960aeee84 100644
--- a/sw/source/ui/vba/vbaborders.hxx
+++ b/sw/source/ui/vba/vbaborders.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,4 @@ public:
#endif //SW_VBA_BORDERS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbacell.cxx b/sw/source/ui/vba/vbacell.cxx
new file mode 100644
index 000000000000..cbba50de681c
--- /dev/null
+++ b/sw/source/ui/vba/vbacell.cxx
@@ -0,0 +1,119 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbacell.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include "vbatable.hxx"
+#include <com/sun/star/table/XCellRange.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <rtl/ustrbuf.hxx>
+#include "wordvbahelper.hxx"
+#include "vbatablehelper.hxx"
+#include "vbarow.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaCell::SwVbaCell( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextTable >& xTextTable, sal_Int32 nColumn, sal_Int32 nRow ) throw ( uno::RuntimeException ) :
+ SwVbaCell_BASE( rParent, rContext ), mxTextTable( xTextTable ), mnColumn( nColumn ), mnRow( nRow )
+{
+}
+
+SwVbaCell::~SwVbaCell()
+{
+}
+
+::sal_Int32 SAL_CALL SwVbaCell::getWidth() throw (css::uno::RuntimeException)
+{
+ SwVbaTableHelper aTableHelper( mxTextTable );
+ return aTableHelper.GetColWidth( mnColumn, mnRow, sal_True );
+}
+
+void SAL_CALL SwVbaCell::setWidth( ::sal_Int32 _width ) throw (css::uno::RuntimeException)
+{
+ SwVbaTableHelper aTableHelper( mxTextTable );
+ aTableHelper.SetColWidth( _width, mnColumn, mnRow, sal_True );
+}
+
+uno::Any SAL_CALL SwVbaCell::getHeight() throw (css::uno::RuntimeException)
+{
+ uno::Reference< word::XRow > xRow( new SwVbaRow( getParent(), mxContext, mxTextTable, mnRow ) );
+ return xRow->getHeight();
+}
+
+void SAL_CALL SwVbaCell::setHeight( const uno::Any& _height ) throw (css::uno::RuntimeException)
+{
+ uno::Reference< word::XRow > xRow( new SwVbaRow( getParent(), mxContext, mxTextTable, mnRow ) );
+ xRow->setHeight( _height );
+}
+
+::sal_Int32 SAL_CALL SwVbaCell::getHeightRule() throw (css::uno::RuntimeException)
+{
+ uno::Reference< word::XRow > xRow( new SwVbaRow( getParent(), mxContext, mxTextTable, mnRow ) );
+ return xRow->getHeightRule();
+}
+
+void SAL_CALL SwVbaCell::setHeightRule( ::sal_Int32 _heightrule ) throw (css::uno::RuntimeException)
+{
+ uno::Reference< word::XRow > xRow( new SwVbaRow( getParent(), mxContext, mxTextTable, mnRow ) );
+ xRow->setHeightRule( _heightrule );
+}
+
+void SAL_CALL SwVbaCell::SetWidth( float width, sal_Int32 /*rulestyle*/ ) throw (css::uno::RuntimeException)
+{
+ // FIXME: handle the argument: rulestyle
+ setWidth( width );
+}
+
+void SAL_CALL SwVbaCell::SetHeight( float height, sal_Int32 heightrule ) throw (css::uno::RuntimeException)
+{
+ // FIXME: handle the argument: heightrule
+ setHeightRule( heightrule );
+ setHeight( uno::makeAny( height ) );
+}
+
+rtl::OUString&
+SwVbaCell::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaCell") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaCell::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Cell" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbacell.hxx b/sw/source/ui/vba/vbacell.hxx
new file mode 100644
index 000000000000..1e26b79440ca
--- /dev/null
+++ b/sw/source/ui/vba/vbacell.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_CELL_HXX
+#define SW_VBA_CELL_HXX
+
+#include <ooo/vba/word/XCell.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XTextTable.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XCell > SwVbaCell_BASE;
+
+class SwVbaCell : public SwVbaCell_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextTable > mxTextTable;
+ sal_Int32 mnColumn;
+ sal_Int32 mnRow;
+
+public:
+ SwVbaCell( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, sal_Int32 nColumn, sal_Int32 nRow ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaCell();
+
+ // Attributes
+ virtual ::sal_Int32 SAL_CALL getWidth() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setWidth( ::sal_Int32 _width ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getHeight() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setHeight( const css::uno::Any& _height ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getHeightRule() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setHeightRule( ::sal_Int32 _heightrule ) throw (css::uno::RuntimeException);
+
+ // Methods
+ virtual void SAL_CALL SetWidth( float width, sal_Int32 rulestyle ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL SetHeight( float height, sal_Int32 heightrule ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_CELL_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbacells.cxx b/sw/source/ui/vba/vbacells.cxx
new file mode 100644
index 000000000000..a104ea29c1ca
--- /dev/null
+++ b/sw/source/ui/vba/vbacells.cxx
@@ -0,0 +1,223 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbacells.hxx"
+#include "vbacell.hxx"
+#include "wordvbahelper.hxx"
+#include "vbatablehelper.hxx"
+#include "vbarow.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XEnumerationAccess > CellCollectionHelper_Base;
+
+class CellsEnumWrapper : public EnumerationHelper_BASE
+{
+ uno::Reference< container::XIndexAccess > mxIndexAccess;
+ sal_Int32 nIndex;
+
+public:
+ CellsEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : mxIndexAccess( xIndexAccess ), nIndex( 0 )
+ {
+ }
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( nIndex < mxIndexAccess->getCount() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if( nIndex < mxIndexAccess->getCount() )
+ {
+ return mxIndexAccess->getByIndex( nIndex++ );
+ }
+ throw container::NoSuchElementException();
+ }
+};
+
+class CellCollectionHelper : public CellCollectionHelper_Base
+{
+private:
+ uno::Reference< XHelperInterface > mxParent;
+ uno::Reference< uno::XComponentContext > mxContext;
+ uno::Reference< css::text::XTextTable > mxTextTable;
+ sal_Int32 mnLeft;
+ sal_Int32 mnTop;
+ sal_Int32 mnRight;
+ sal_Int32 mnBottom;
+
+public:
+ CellCollectionHelper( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw ( css::uno::RuntimeException ): mxParent( xParent ), mxContext( xContext ), mxTextTable( xTextTable ), mnLeft( nLeft ), mnTop( nTop ), mnRight( nRight ), mnBottom( nBottom )
+ {
+ }
+ virtual ~CellCollectionHelper() {}
+
+ virtual sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ return ( mnRight - mnLeft + 1 ) * ( mnBottom - mnTop + 1 );
+ }
+ virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( Index < 0 || Index >= getCount() )
+ throw css::lang::IndexOutOfBoundsException();
+
+ for( sal_Int32 row = mnTop; row <= mnBottom; row++ )
+ {
+ for( sal_Int32 col = mnLeft; col <= mnRight; col++ )
+ {
+ if( Index == ( ( row - mnTop ) * ( mnRight - mnLeft + 1 ) + ( col - mnLeft ) ) )
+ return uno::makeAny( uno::Reference< word::XCell >( new SwVbaCell( mxParent, mxContext, mxTextTable, col, row ) ) );
+ }
+ }
+ throw css::lang::IndexOutOfBoundsException();
+
+ }
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException)
+ {
+ return word::XCell::static_type(0);
+ }
+ virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
+ {
+ return sal_True;
+ }
+ // XEnumerationAccess
+ virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException)
+ {
+ return new CellsEnumWrapper( this );
+ }
+};
+
+SwVbaCells::SwVbaCells( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextTable >& xTextTable, sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw (uno::RuntimeException) : SwVbaCells_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new CellCollectionHelper( xParent, xContext, xTextTable, nLeft, nTop, nRight, nBottom ) ) ), mxTextTable( xTextTable ), mnLeft( nLeft ), mnTop( nTop ), mnRight( nRight ), mnBottom( nBottom )
+{
+}
+
+::sal_Int32 SAL_CALL SwVbaCells::getWidth() throw (css::uno::RuntimeException)
+{
+ uno::Reference< word::XCell > xCell( m_xIndexAccess->getByIndex( 0 ), uno::UNO_QUERY_THROW );
+ return xCell->getWidth();
+}
+
+void SAL_CALL SwVbaCells::setWidth( ::sal_Int32 _width ) throw (css::uno::RuntimeException)
+{
+ sal_Int32 nIndex = 0;
+ while( nIndex < m_xIndexAccess->getCount() )
+ {
+ uno::Reference< word::XCell > xCell( m_xIndexAccess->getByIndex( nIndex++ ), uno::UNO_QUERY_THROW );
+ xCell->setWidth( _width );
+ }
+}
+
+uno::Any SAL_CALL SwVbaCells::getHeight() throw (css::uno::RuntimeException)
+{
+ uno::Reference< word::XRow > xRow( new SwVbaRow( getParent(), mxContext, mxTextTable, mnTop ) );
+ return xRow->getHeight();
+}
+
+void SAL_CALL SwVbaCells::setHeight( const uno::Any& _height ) throw (css::uno::RuntimeException)
+{
+ for( sal_Int32 row = mnTop; row <= mnBottom; row++ )
+ {
+ uno::Reference< word::XRow > xRow( new SwVbaRow( getParent(), mxContext, mxTextTable, row ) );
+ xRow->setHeight( _height );
+ }
+}
+
+::sal_Int32 SAL_CALL SwVbaCells::getHeightRule() throw (css::uno::RuntimeException)
+{
+ uno::Reference< word::XRow > xRow( new SwVbaRow( getParent(), mxContext, mxTextTable, mnTop ) );
+ return xRow->getHeightRule();
+}
+
+void SAL_CALL SwVbaCells::setHeightRule( ::sal_Int32 _heightrule ) throw (css::uno::RuntimeException)
+{
+ for( sal_Int32 row = mnTop; row <= mnBottom; row++ )
+ {
+ uno::Reference< word::XRow > xRow( new SwVbaRow( getParent(), mxContext, mxTextTable, row ) );
+ xRow->setHeightRule( _heightrule );
+ }
+}
+
+void SAL_CALL SwVbaCells::SetWidth( float width, sal_Int32 rulestyle ) throw (css::uno::RuntimeException)
+{
+ sal_Int32 nIndex = 0;
+ while( nIndex < m_xIndexAccess->getCount() )
+ {
+ uno::Reference< word::XCell > xCell( m_xIndexAccess->getByIndex( nIndex++ ), uno::UNO_QUERY_THROW );
+ xCell->SetWidth( width, rulestyle );
+ }
+}
+
+void SAL_CALL SwVbaCells::SetHeight( float height, sal_Int32 heightrule ) throw (css::uno::RuntimeException)
+{
+ for( sal_Int32 row = mnTop; row <= mnBottom; row++ )
+ {
+ uno::Reference< word::XRow > xRow( new SwVbaRow( getParent(), mxContext, mxTextTable, row ) );
+ xRow->SetHeight( height, heightrule );
+ }
+}
+
+// XEnumerationAccess
+uno::Type
+SwVbaCells::getElementType() throw (uno::RuntimeException)
+{
+ return word::XCell::static_type(0);
+}
+
+uno::Reference< container::XEnumeration >
+SwVbaCells::createEnumeration() throw (uno::RuntimeException)
+{
+ uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
+ return xEnumAccess->createEnumeration();
+}
+
+uno::Any
+SwVbaCells::createCollectionObject( const uno::Any& aSource )
+{
+ return aSource;
+}
+
+rtl::OUString&
+SwVbaCells::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaCells") );
+ return sImplName;
+}
+
+uno::Sequence<rtl::OUString>
+SwVbaCells::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Cells") );
+ }
+ return sNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbacells.hxx b/sw/source/ui/vba/vbacells.hxx
new file mode 100644
index 000000000000..e3fe940aa256
--- /dev/null
+++ b/sw/source/ui/vba/vbacells.hxx
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_CELLS_HXX
+#define SW_VBA_CELLS_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XCells.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/text/XTextTable.hpp>
+
+typedef CollTestImplHelper< ooo::vba::word::XCells > SwVbaCells_BASE;
+
+class SwVbaCells : public SwVbaCells_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextTable > mxTextTable;
+ sal_Int32 mnLeft;
+ sal_Int32 mnTop;
+ sal_Int32 mnRight;
+ sal_Int32 mnBottom;
+
+public:
+ SwVbaCells( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaCells() {}
+
+ // Attributes
+ virtual ::sal_Int32 SAL_CALL getWidth() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setWidth( ::sal_Int32 _width ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getHeight() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setHeight( const css::uno::Any& _height ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getHeightRule() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setHeightRule( ::sal_Int32 _heightrule ) throw (css::uno::RuntimeException);
+
+ // Methods
+ virtual void SAL_CALL SetWidth( float width, sal_Int32 rulestyle ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL SetHeight( float height, sal_Int32 heightrule ) throw (css::uno::RuntimeException);
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaCells_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_CELLS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbacheckbox.cxx b/sw/source/ui/vba/vbacheckbox.cxx
new file mode 100644
index 000000000000..65b55a3142da
--- /dev/null
+++ b/sw/source/ui/vba/vbacheckbox.cxx
@@ -0,0 +1,97 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbacheckbox.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <ecmaflds.hxx>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaCheckBox::SwVbaCheckBox( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& rModel, const uno::Reference< text::XFormField >& xFormField ) throw ( uno::RuntimeException ) : SwVbaCheckBox_BASE( rParent, rContext ), mxModel( rModel ), mxFormField( xFormField )
+{
+ rtl::OUString sType = mxFormField->getFieldType();
+ if( !sType.equalsIgnoreAsciiCaseAscii( ECMA_FORMCHECKBOX ) )
+ {
+ throw uno::RuntimeException( rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("It is not a CheckBox")), uno::Reference< uno::XInterface >() );
+ }
+}
+
+SwVbaCheckBox::~SwVbaCheckBox()
+{
+}
+
+sal_Bool SAL_CALL SwVbaCheckBox::getValue() throw ( uno::RuntimeException )
+{
+ sal_Bool bValue = sal_False;
+ sal_Int32 nCount = mxFormField->getParamCount();
+ for( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ if( mxFormField->getParamName(i).equalsIgnoreAsciiCaseAscii( ECMA_FORMCHECKBOX_CHECKED ) )
+ {
+ if( mxFormField->getParamValue(i).equalsIgnoreAsciiCaseAscii("on") )
+ bValue = sal_True;
+ else
+ bValue = sal_False;
+ break;
+ }
+ }
+ return bValue;
+}
+
+void SAL_CALL SwVbaCheckBox::setValue( sal_Bool value ) throw ( uno::RuntimeException )
+{
+ rtl::OUString sValue = value ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("on")) : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("off"));
+ mxFormField->addParam( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ECMA_FORMCHECKBOX_CHECKED )), sValue, sal_True );
+}
+
+rtl::OUString&
+SwVbaCheckBox::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaCheckBox") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaCheckBox::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.CheckBox" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbacheckbox.hxx b/sw/source/ui/vba/vbacheckbox.hxx
new file mode 100644
index 000000000000..e8e4da8e2efa
--- /dev/null
+++ b/sw/source/ui/vba/vbacheckbox.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_CHECKBOX_HXX
+#define SW_VBA_CHECKBOX_HXX
+
+#include <ooo/vba/word/XCheckBox.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XFormField.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XCheckBox > SwVbaCheckBox_BASE;
+
+class SwVbaCheckBox : public SwVbaCheckBox_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::text::XFormField > mxFormField;
+
+public:
+ SwVbaCheckBox( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel, const css::uno::Reference< css::text::XFormField >& xFormField ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaCheckBox();
+
+ // Methods
+ sal_Bool SAL_CALL getValue() throw ( css::uno::RuntimeException );
+ void SAL_CALL setValue( sal_Bool value ) throw ( css::uno::RuntimeException );
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_CHECKBOX_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbacolumn.cxx b/sw/source/ui/vba/vbacolumn.cxx
new file mode 100644
index 000000000000..86b2f27daed5
--- /dev/null
+++ b/sw/source/ui/vba/vbacolumn.cxx
@@ -0,0 +1,165 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbacolumn.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include "vbatable.hxx"
+#include <com/sun/star/table/XCellRange.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <rtl/ustrbuf.hxx>
+#include "wordvbahelper.hxx"
+#include "vbatablehelper.hxx"
+
+#define RELATIVE_TABLE_WIDTH 10000
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaColumn::SwVbaColumn( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextTable >& xTextTable, sal_Int32 nIndex ) throw ( uno::RuntimeException ) :
+ SwVbaColumn_BASE( rParent, rContext ), mxTextTable( xTextTable ), mnIndex( nIndex )
+{
+ mxTableColumns = mxTextTable->getColumns();
+}
+
+SwVbaColumn::~SwVbaColumn()
+{
+}
+
+void SwVbaColumn::calculateAbsoluteColumnWidth( sal_Int32 nTableWidth, const css::uno::Sequence< css::text::TableColumnSeparator >& aSeparators, double* pAbsWidth )
+{
+ const text::TableColumnSeparator* pArray = aSeparators.getConstArray();
+ sal_Int32 nSepCount = aSeparators.getLength();
+ for( sal_Int32 i = 0; i <= nSepCount; i++ )
+ {
+ sal_Int32 nRelColWidth = 0;
+ if( i == 0 )
+ {
+ if( nSepCount != 0 )
+ {
+ nRelColWidth = pArray[0].Position;
+ }
+ else
+ {
+ nRelColWidth = RELATIVE_TABLE_WIDTH;
+ }
+ }
+ else
+ {
+ if( i == nSepCount )
+ {
+ nRelColWidth = RELATIVE_TABLE_WIDTH - pArray[i-1].Position;
+ }
+ else
+ {
+ nRelColWidth = pArray[i].Position - pArray[i-1].Position;
+ }
+ }
+ pAbsWidth[i] = ( (double)nRelColWidth / RELATIVE_TABLE_WIDTH ) * (double) nTableWidth;
+ }
+}
+
+void SwVbaColumn::calculateRelativeColumnWidth( const double* pAbsWidth, double* pRelWidth, sal_Int32 nCount )
+{
+ double tableWidth = 0.0;
+ for( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ tableWidth += pAbsWidth[i];
+ }
+
+ pRelWidth[ nCount - 1 ] = tableWidth;
+ for( sal_Int32 i = 0; i < nCount - 1; i++ )
+ {
+ if( i == 0 )
+ {
+ pRelWidth[i] = ( pAbsWidth[i] * RELATIVE_TABLE_WIDTH ) / tableWidth;
+ }
+ else
+ {
+ pRelWidth[i] = pRelWidth[i-1] + ( pAbsWidth[i] * RELATIVE_TABLE_WIDTH ) / tableWidth;
+ }
+ }
+}
+
+sal_Int32 SAL_CALL
+SwVbaColumn::getWidth( ) throw ( css::uno::RuntimeException )
+{
+ SwVbaTableHelper aTableHelper( mxTextTable );
+ return aTableHelper.GetColWidth( mnIndex );
+}
+
+void SAL_CALL
+SwVbaColumn::setWidth( sal_Int32 _width ) throw ( css::uno::RuntimeException )
+{
+
+ SwVbaTableHelper aTableHelper( mxTextTable );
+ aTableHelper.SetColWidth( _width, mnIndex );
+}
+
+void SAL_CALL
+SwVbaColumn::Select( ) throw ( uno::RuntimeException )
+{
+ SelectColumn( getCurrentWordDoc(mxContext), mxTextTable, mnIndex, mnIndex );
+}
+
+void SwVbaColumn::SelectColumn( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextTable >& xTextTable, sal_Int32 nStartColumn, sal_Int32 nEndColumn ) throw ( uno::RuntimeException )
+{
+ rtl::OUStringBuffer aRangeName;
+ rtl::OUString sStartCol = SwVbaTableHelper::getColumnStr( nStartColumn );
+ aRangeName.append(sStartCol).append(sal_Int32( 1 ) );
+ rtl::OUString sEndCol = SwVbaTableHelper::getColumnStr( nEndColumn );
+ sal_Int32 nRowCount = xTextTable->getRows()->getCount();
+ aRangeName.appendAscii(":").append( sEndCol ).append( sal_Int32( nRowCount ) );
+
+ uno::Reference< table::XCellRange > xCellRange( xTextTable, uno::UNO_QUERY_THROW );
+ rtl::OUString sSelRange = aRangeName.makeStringAndClear();
+ uno::Reference< table::XCellRange > xSelRange = xCellRange->getCellRangeByName( sSelRange );
+
+ uno::Reference< view::XSelectionSupplier > xSelection( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
+ xSelection->select( uno::makeAny( xSelRange ) );
+}
+
+rtl::OUString&
+SwVbaColumn::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaColumn") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaColumn::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Column" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbacolumn.hxx b/sw/source/ui/vba/vbacolumn.hxx
new file mode 100644
index 000000000000..3ab42d6491d8
--- /dev/null
+++ b/sw/source/ui/vba/vbacolumn.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_COLUMN_HXX
+#define SW_VBA_COLUMN_HXX
+
+#include <ooo/vba/word/XColumn.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/table/XTableColumns.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/TableColumnSeparator.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XColumn > SwVbaColumn_BASE;
+
+class SwVbaColumn : public SwVbaColumn_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextTable > mxTextTable;
+ css::uno::Reference< css::table::XTableColumns > mxTableColumns;
+ sal_Int32 mnIndex;
+
+private:
+ void calculateAbsoluteColumnWidth( sal_Int32 nTableWidth, const css::uno::Sequence< css::text::TableColumnSeparator >& aSeparators, double* pAbsWidth );
+ void calculateRelativeColumnWidth( const double* pAbsWidth, double* pRelWidth, sal_Int32 nCount );
+
+public:
+ SwVbaColumn( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, sal_Int32 nIndex ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaColumn();
+
+ // Methods
+ virtual sal_Int32 SAL_CALL getWidth() throw ( css::uno::RuntimeException );
+ virtual void SAL_CALL setWidth( sal_Int32 _width ) throw ( css::uno::RuntimeException );
+ virtual void SAL_CALL Select( ) throw (css::uno::RuntimeException);
+
+ static void SelectColumn( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XTextTable >& xTextTable, sal_Int32 nStartColumn, sal_Int32 nEndColumn ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_COLUMN_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbacolumns.cxx b/sw/source/ui/vba/vbacolumns.cxx
new file mode 100644
index 000000000000..1d8cc55fc406
--- /dev/null
+++ b/sw/source/ui/vba/vbacolumns.cxx
@@ -0,0 +1,160 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbacolumns.hxx"
+#include "vbacolumn.hxx"
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
+#include <ooo/vba/word/WdConstants.hpp>
+#include <ooo/vba/word/WdRulerStyle.hpp>
+#include "wordvbahelper.hxx"
+#include "vbatablehelper.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+class ColumnsEnumWrapper : public EnumerationHelper_BASE
+{
+ uno::WeakReference< XHelperInterface > mxParent;
+ uno::Reference< uno::XComponentContext > mxContext;
+ uno::Reference< text::XTextTable > mxTextTable;
+ uno::Reference< container::XIndexAccess > mxIndexAccess;
+ sal_Int32 nIndex;
+
+public:
+ ColumnsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< text::XTextTable >& xTextTable ) : mxParent( xParent ), mxContext( xContext ), mxTextTable( xTextTable ), nIndex( 0 )
+ {
+ mxIndexAccess.set( mxTextTable->getColumns(), uno::UNO_QUERY );
+ }
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( nIndex < mxIndexAccess->getCount() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if( nIndex < mxIndexAccess->getCount() )
+ {
+ return uno::makeAny( uno::Reference< word::XColumn > ( new SwVbaColumn( mxParent, mxContext, mxTextTable, nIndex++ ) ) );
+ }
+ throw container::NoSuchElementException();
+ }
+};
+
+SwVbaColumns::SwVbaColumns( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextTable >& xTextTable, const uno::Reference< table::XTableColumns >& xTableColumns ) throw (uno::RuntimeException) : SwVbaColumns_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xTableColumns, uno::UNO_QUERY_THROW ) ), mxTextTable( xTextTable ), mxTableColumns( xTableColumns )
+{
+ mnStartColumnIndex = 0;
+ SwVbaTableHelper aTableHelper( mxTextTable );
+ mnEndColumnIndex = aTableHelper.getTabColumnsMaxCount( ) - 1;
+}
+
+SwVbaColumns::SwVbaColumns( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextTable >& xTextTable, const uno::Reference< table::XTableColumns >& xTableColumns, sal_Int32 nStartCol, sal_Int32 nEndCol ) throw (uno::RuntimeException) : SwVbaColumns_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xTableColumns, uno::UNO_QUERY_THROW ) ), mxTextTable( xTextTable ), mxTableColumns( xTableColumns ), mnStartColumnIndex( nStartCol ), mnEndColumnIndex( nEndCol )
+{
+ if( mnEndColumnIndex < mnStartColumnIndex )
+ throw uno::RuntimeException();
+}
+
+uno::Reference< word::XColumn > SwVbaColumns::getColumnAtIndex( sal_Int32 index ) throw (uno::RuntimeException)
+{
+ return uno::Reference< word::XColumn >( new SwVbaColumn( this, mxContext, mxTextTable, index ) );
+}
+
+::sal_Int32 SAL_CALL SwVbaColumns::getWidth() throw (uno::RuntimeException)
+{
+ return getColumnAtIndex( mnStartColumnIndex )->getWidth();
+}
+
+void SAL_CALL SwVbaColumns::setWidth( ::sal_Int32 _width ) throw (uno::RuntimeException)
+{
+ for( sal_Int32 index = mnStartColumnIndex; index <= mnEndColumnIndex; index++ )
+ {
+ getColumnAtIndex( index )->setWidth( _width );
+ }
+}
+
+void SAL_CALL SwVbaColumns::Select( ) throw (uno::RuntimeException)
+{
+ SwVbaColumn::SelectColumn( getCurrentWordDoc(mxContext), mxTextTable, mnStartColumnIndex, mnEndColumnIndex );
+}
+
+::sal_Int32 SAL_CALL SwVbaColumns::getCount() throw (uno::RuntimeException)
+{
+ return ( mnEndColumnIndex - mnStartColumnIndex + 1 );
+}
+
+uno::Any SAL_CALL SwVbaColumns::Item( const uno::Any& Index1, const uno::Any& /*not processed in this base class*/ ) throw (uno::RuntimeException)
+{
+ sal_Int32 nIndex = 0;
+ if( ( Index1 >>= nIndex ) == sal_True )
+ {
+ if( nIndex <= 0 || nIndex > getCount() )
+ {
+ throw lang::IndexOutOfBoundsException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Index out of bounds") ), uno::Reference< uno::XInterface >() );
+ }
+ return uno::makeAny( uno::Reference< word::XColumn >( new SwVbaColumn( this, mxContext, mxTextTable, nIndex - 1 ) ) );
+ }
+ throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Index out of bounds") ), uno::Reference< uno::XInterface >() );
+}
+
+// XEnumerationAccess
+uno::Type
+SwVbaColumns::getElementType() throw (uno::RuntimeException)
+{
+ return word::XColumn::static_type(0);
+}
+uno::Reference< container::XEnumeration >
+SwVbaColumns::createEnumeration() throw (uno::RuntimeException)
+{
+ return new ColumnsEnumWrapper( this, mxContext, mxTextTable );
+}
+
+uno::Any
+SwVbaColumns::createCollectionObject( const uno::Any& aSource )
+{
+ return aSource;
+}
+
+rtl::OUString&
+SwVbaColumns::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaColumns") );
+ return sImplName;
+}
+
+uno::Sequence<rtl::OUString>
+SwVbaColumns::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Columns") );
+ }
+ return sNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbacolumns.hxx b/sw/source/ui/vba/vbacolumns.hxx
new file mode 100644
index 000000000000..f6f14ea098e3
--- /dev/null
+++ b/sw/source/ui/vba/vbacolumns.hxx
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_COLUMNS_HXX
+#define SW_VBA_COLUMNS_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XColumns.hpp>
+#include <ooo/vba/word/XColumn.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/table/XTableColumns.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+
+typedef CollTestImplHelper< ooo::vba::word::XColumns > SwVbaColumns_BASE;
+
+class SwVbaColumns : public SwVbaColumns_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextTable > mxTextTable;
+ css::uno::Reference< css::table::XTableColumns > mxTableColumns;
+ sal_Int32 mnStartColumnIndex;
+ sal_Int32 mnEndColumnIndex;
+
+private:
+ css::uno::Reference< ooo::vba::word::XColumn > getColumnAtIndex( sal_Int32 index ) throw (css::uno::RuntimeException);
+
+public:
+ SwVbaColumns( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, const css::uno::Reference< css::table::XTableColumns >& xTableColumns ) throw ( css::uno::RuntimeException );
+ SwVbaColumns( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, const css::uno::Reference< css::table::XTableColumns >& xTableColumns, sal_Int32 nStartCol, sal_Int32 nEndCol ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaColumns() {}
+
+ virtual sal_Int32 SAL_CALL getWidth( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setWidth( sal_Int32 _width ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Select( ) throw (css::uno::RuntimeException);
+
+ //XCollection
+ virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& /*not processed in this base class*/ ) throw ( css::uno::RuntimeException );
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaColumns_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_COLUMNS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbadialog.cxx b/sw/source/ui/vba/vbadialog.cxx
index a62fd289ca5d..14f9a40da019 100644
--- a/sw/source/ui/vba/vbadialog.cxx
+++ b/sw/source/ui/vba/vbadialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,5 @@ SwVbaDialog::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbadialog.hxx b/sw/source/ui/vba/vbadialog.hxx
index 591c77bdb41c..763fc192cb04 100644
--- a/sw/source/ui/vba/vbadialog.hxx
+++ b/sw/source/ui/vba/vbadialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,5 @@ public:
};
#endif /* SW_VBA_DIALOG_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbadialogs.cxx b/sw/source/ui/vba/vbadialogs.cxx
index f81e66dd5488..3bebd662e0cf 100644
--- a/sw/source/ui/vba/vbadialogs.cxx
+++ b/sw/source/ui/vba/vbadialogs.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,4 @@ SwVbaDialogs::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbadialogs.hxx b/sw/source/ui/vba/vbadialogs.hxx
index 075849c18a98..7895bbb385ea 100644
--- a/sw/source/ui/vba/vbadialogs.hxx
+++ b/sw/source/ui/vba/vbadialogs.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,5 @@ public:
};
#endif /* SW_VBA_DIALOGS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx
index cef47c7e32dc..8c7e60e549fb 100644
--- a/sw/source/ui/vba/vbadocument.cxx
+++ b/sw/source/ui/vba/vbadocument.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,9 +37,10 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
-#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/form/XFormsSupplier.hpp>
+#include <com/sun/star/document/XRedlinesSupplier.hpp>
#include <ooo/vba/XControlProvider.hpp>
+#include <ooo/vba/word/WdProtectionType.hpp>
#include <vbahelper/helperdecl.hxx>
#include <wordvbahelper.hxx>
@@ -50,7 +52,14 @@
#include "vbafield.hxx"
#include "vbapagesetup.hxx"
#include "vbasections.hxx"
+#include "vbatablesofcontents.hxx"
#include <vbahelper/vbashapes.hxx>
+#include <vbahelper/vbahelper.hxx>
+#include "vbarevisions.hxx"
+#include "vbaframes.hxx"
+#include "vbaformfields.hxx"
+#include <osl/file.hxx>
+#include <tools/urlobj.hxx>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -200,7 +209,6 @@ uno::Any SAL_CALL
SwVbaDocument::Shapes( const uno::Any& index ) throw (uno::RuntimeException)
{
uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( getModel(), uno::UNO_QUERY_THROW );
- //uno::Reference< drawing::XShapes > xShapes( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
uno::Reference< XCollection > xCol( new ScVbaShapes( this, mxContext, xIndexAccess, xModel ) );
@@ -220,6 +228,22 @@ SwVbaDocument::Sections( const uno::Any& index ) throw (uno::RuntimeException)
}
uno::Any SAL_CALL
+SwVbaDocument::TablesOfContents( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< XCollection > xCol( new SwVbaTablesOfContents( this, mxContext, mxTextDocument ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::FormFields( const uno::Any& /*index*/ ) throw (uno::RuntimeException)
+{
+ uno::Reference< XCollection > xCol;
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
SwVbaDocument::PageSetup( ) throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xPageProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW );
@@ -239,16 +263,34 @@ SwVbaDocument::getAttachedTemplate() throw (uno::RuntimeException)
uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( getModel(), uno::UNO_QUERY_THROW );
uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW );
uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW );
- rtl::OUString sTemplateName = xDocProps->getTemplateName();
+ rtl::OUString sTemplateUrl = xDocProps->getTemplateURL();
- xTemplate = new SwVbaTemplate( this, mxContext, getModel(), sTemplateName );
+ xTemplate = new SwVbaTemplate( this, mxContext, getModel(), sTemplateUrl );
return uno::makeAny( xTemplate );
}
void SAL_CALL
-SwVbaDocument::setAttachedTemplate( const css::uno::Any& /*_attachedtemplate*/ ) throw (uno::RuntimeException)
+SwVbaDocument::setAttachedTemplate( const css::uno::Any& _attachedtemplate ) throw (uno::RuntimeException)
{
- throw uno::RuntimeException();
+ rtl::OUString sTemplate;
+ if( !( _attachedtemplate >>= sTemplate ) )
+ {
+ throw uno::RuntimeException();
+ }
+ rtl::OUString aURL;
+ INetURLObject aObj;
+ aObj.SetURL( sTemplate );
+ bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ if ( bIsURL )
+ aURL = sTemplate;
+ else
+ osl::FileBase::getFileURLFromSystemPath( sTemplate, aURL );
+
+ uno::Reference< word::XTemplate > xTemplate;
+ uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( getModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW );
+ xDocProps->setTemplateURL( aURL );
}
uno::Any SAL_CALL
@@ -267,6 +309,116 @@ void SAL_CALL SwVbaDocument::Activate() throw (uno::RuntimeException)
VbaDocumentBase::Activate();
}
+::sal_Int32 SAL_CALL SwVbaDocument::getProtectionType() throw (css::uno::RuntimeException)
+{
+ //TODO
+ return word::WdProtectionType::wdNoProtection;
+}
+
+void SAL_CALL SwVbaDocument::setProtectionType( ::sal_Int32 /*_protectiontype*/ ) throw (css::uno::RuntimeException)
+{
+ //TODO
+}
+
+::sal_Bool SAL_CALL SwVbaDocument::getUpdateStylesOnOpen() throw (css::uno::RuntimeException)
+{
+ //TODO
+ return sal_False;
+}
+
+void SAL_CALL SwVbaDocument::setUpdateStylesOnOpen( ::sal_Bool /*_updatestylesonopen*/ ) throw (uno::RuntimeException)
+{
+ //TODO
+}
+
+::sal_Bool SAL_CALL SwVbaDocument::getAutoHyphenation() throw (uno::RuntimeException)
+{
+ // check this property only in default paragraph style
+ sal_Bool IsAutoHyphenation = sal_False;
+ uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW );
+ xParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaIsHyphenation")) ) >>= IsAutoHyphenation;
+ return IsAutoHyphenation;
+}
+
+void SAL_CALL SwVbaDocument::setAutoHyphenation( ::sal_Bool _autohyphenation ) throw (uno::RuntimeException)
+{
+ //TODO
+ uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW );
+ xParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaIsHyphenation")), uno::makeAny( _autohyphenation ) );
+}
+
+::sal_Int32 SAL_CALL SwVbaDocument::getHyphenationZone() throw (uno::RuntimeException)
+{
+ //TODO
+ return 0;
+}
+
+void SAL_CALL SwVbaDocument::setHyphenationZone( ::sal_Int32 /*_hyphenationzone*/ ) throw (uno::RuntimeException)
+{
+ //TODO
+}
+
+::sal_Int32 SAL_CALL SwVbaDocument::getConsecutiveHyphensLimit() throw (uno::RuntimeException)
+{
+ //TODO
+ sal_Int16 nHyphensLimit = 0;
+ uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW );
+ xParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaHyphenationMaxHyphens")) ) >>= nHyphensLimit;
+ return nHyphensLimit;
+}
+
+void SAL_CALL SwVbaDocument::setConsecutiveHyphensLimit( ::sal_Int32 _consecutivehyphenslimit ) throw (uno::RuntimeException)
+{
+ sal_Int16 nHyphensLimit = static_cast< sal_Int16 >( _consecutivehyphenslimit );
+ uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW );
+ xParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaHyphenationMaxHyphens")), uno::makeAny( nHyphensLimit ) );
+}
+
+void SAL_CALL SwVbaDocument::Protect( ::sal_Int32 /*Type*/, const uno::Any& /*NOReset*/, const uno::Any& /*Password*/, const uno::Any& /*UseIRM*/, const uno::Any& /*EnforceStyleLock*/ ) throw (uno::RuntimeException)
+{
+ // Seems not support in Writer
+ // VbaDocumentBase::Protect( Password );
+}
+
+void SAL_CALL SwVbaDocument::PrintOut( const uno::Any& /*Background*/, const uno::Any& /*Append*/, const uno::Any& /*Range*/, const uno::Any& /*OutputFileName*/, const uno::Any& /*From*/, const uno::Any& /*To*/, const uno::Any& /*Item*/, const uno::Any& /*Copies*/, const uno::Any& /*Pages*/, const uno::Any& /*PageType*/, const uno::Any& /*PrintToFile*/, const uno::Any& /*Collate*/, const uno::Any& /*FileName*/, const uno::Any& /*ActivePrinterMacGX*/, const uno::Any& /*ManualDuplexPrint*/, const uno::Any& /*PrintZoomColumn*/, const uno::Any& /*PrintZoomRow*/, const uno::Any& /*PrintZoomPaperWidth*/, const uno::Any& /*PrintZoomPaperHeight*/ ) throw (uno::RuntimeException)
+{
+ //TODO
+}
+
+void SAL_CALL SwVbaDocument::PrintPreview( ) throw (uno::RuntimeException)
+{
+ rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrintPreview"));
+ dispatchRequests( mxModel,url );
+}
+
+void SAL_CALL SwVbaDocument::ClosePrintPreview( ) throw (uno::RuntimeException)
+{
+ rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ClosePreview"));
+ dispatchRequests( mxModel,url );
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::Revisions( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< document::XRedlinesSupplier > xRedlinesSupp( mxTextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xRedlines( xRedlinesSupp->getRedlines(), uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xCol( new SwVbaRevisions( this, mxContext, getModel(), xRedlines ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
+SwVbaDocument::Frames( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< text::XTextFramesSupplier > xTextFramesSupp( mxTextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xFrames( xTextFramesSupp->getTextFrames(), uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xCol( new SwVbaFrames( this, mxContext, xFrames, getModel() ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
uno::Any
SwVbaDocument::getControlShape( const ::rtl::OUString& sName )
{
@@ -379,3 +531,4 @@ extern sdecl::ServiceDecl const serviceDecl(
"ooo.vba.word.Document" );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbadocument.hxx b/sw/source/ui/vba/vbadocument.hxx
index ab87798a8ded..12907e02be83 100644
--- a/sw/source/ui/vba/vbadocument.hxx
+++ b/sw/source/ui/vba/vbadocument.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,6 +66,25 @@ public:
virtual css::uno::Any SAL_CALL Sections( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL PageSetup() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL TablesOfContents( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL FormFields( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getProtectionType() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setProtectionType( ::sal_Int32 _protectiontype ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getUpdateStylesOnOpen() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setUpdateStylesOnOpen( ::sal_Bool _updatestylesonopen ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getAutoHyphenation() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutoHyphenation( ::sal_Bool _autohyphenation ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getHyphenationZone() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setHyphenationZone( ::sal_Int32 _hyphenationzone ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getConsecutiveHyphensLimit() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setConsecutiveHyphensLimit( ::sal_Int32 _consecutivehyphenslimit ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Protect( ::sal_Int32 Type, const css::uno::Any& NOReset, const css::uno::Any& Password, const css::uno::Any& UseIRM, const css::uno::Any& EnforceStyleLock ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL PrintOut( const css::uno::Any& Background, const css::uno::Any& Append, const css::uno::Any& Range, const css::uno::Any& OutputFileName, const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Item, const css::uno::Any& Copies, const css::uno::Any& Pages, const css::uno::Any& PageType, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& FileName, const css::uno::Any& ActivePrinterMacGX, const css::uno::Any& ManualDuplexPrint, const css::uno::Any& PrintZoomColumn, const css::uno::Any& PrintZoomRow, const css::uno::Any& PrintZoomPaperWidth, const css::uno::Any& PrintZoomPaperHeight ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL PrintPreview( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL ClosePrintPreview( ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Revisions( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Frames( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+
// XInvocation
virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection( ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL invoke( const ::rtl::OUString& aFunctionName, const css::uno::Sequence< css::uno::Any >& aParams, css::uno::Sequence< ::sal_Int16 >& aOutParamIndex, css::uno::Sequence< css::uno::Any >& aOutParam ) throw (css::lang::IllegalArgumentException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
@@ -78,3 +98,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_DOCUMENT_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx
index d68df940810b..963fca41fb7d 100644
--- a/sw/source/ui/vba/vbadocumentproperties.cxx
+++ b/sw/source/ui/vba/vbadocumentproperties.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -135,7 +136,6 @@ public:
{
// Characters, ParagraphCount & WordCount are available from
// the model ( and addtionally these also update the statics object )
- //return mxProps->getPropertyValue( rPropName );
return mxModelProps->getPropertyValue( rPropName );
}
catch( uno::Exception& )
@@ -203,16 +203,16 @@ public:
static DocPropInfo createDocPropInfo( const rtl::OUString& sDesc, const rtl::OUString& sPropName, boost::shared_ptr< PropertGetSetHelper >& rHelper )
{
- return createDocPropInfo( rtl::OUStringToOString( sDesc, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( sPropName, RTL_TEXTENCODING_UTF8 ).getStr(), rHelper );
+ DocPropInfo aItem;
+ aItem.msMSODesc = sDesc;
+ aItem.msOOOPropName = sPropName;
+ aItem.mpPropGetSetHelper = rHelper;
+ return aItem;
}
static DocPropInfo createDocPropInfo( const sal_Char* sDesc, const sal_Char* sPropName, boost::shared_ptr< PropertGetSetHelper >& rHelper )
{
- DocPropInfo aItem;
- aItem.msMSODesc = rtl::OUString::createFromAscii( sDesc );
- aItem.msOOOPropName = rtl::OUString::createFromAscii( sPropName );
- aItem.mpPropGetSetHelper = rHelper;
- return aItem;
+ return createDocPropInfo( rtl::OUString::createFromAscii( sDesc ), rtl::OUString::createFromAscii( sPropName ), rHelper );
}
uno::Any getValue()
{
@@ -236,7 +236,7 @@ public:
};
-typedef std::hash_map< sal_Int32, DocPropInfo > MSOIndexToOODocPropInfo;
+typedef boost::unordered_map< sal_Int32, DocPropInfo > MSOIndexToOODocPropInfo;
class BuiltInIndexHelper
{
@@ -305,7 +305,7 @@ public:
virtual rtl::OUString SAL_CALL getLinkSource( ) throw (script::BasicErrorException, uno::RuntimeException);
virtual void SAL_CALL setLinkSource( const rtl::OUString& LinkSource ) throw (script::BasicErrorException, uno::RuntimeException);
//XDefaultProperty
- virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (uno::RuntimeException) { return rtl::OUString::createFromAscii("Value"); }
+ virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (uno::RuntimeException) { return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual uno::Sequence<rtl::OUString> getServiceNames();
@@ -482,7 +482,7 @@ typedef ::cppu::WeakImplHelper3< com::sun::star::container::XIndexAccess
,com::sun::star::container::XEnumerationAccess
> PropertiesImpl_BASE;
-typedef std::hash_map< sal_Int32, uno::Reference< XDocumentProperty > > DocProps;
+typedef boost::unordered_map< sal_Int32, uno::Reference< XDocumentProperty > > DocProps;
typedef ::cppu::WeakImplHelper1< com::sun::star::container::XEnumeration > DocPropEnumeration_BASE;
class DocPropEnumeration : public DocPropEnumeration_BASE
@@ -504,7 +504,7 @@ public:
}
};
-typedef std::hash_map< rtl::OUString, uno::Reference< XDocumentProperty >, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > DocPropsByName;
+typedef boost::unordered_map< rtl::OUString, uno::Reference< XDocumentProperty >, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > DocPropsByName;
class BuiltInPropertiesImpl : public PropertiesImpl_BASE
{
@@ -762,3 +762,5 @@ SwVbaCustomDocumentProperties::getServiceImplName()
static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaCustomDocumentProperties") );
return sImplName;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbadocumentproperties.hxx b/sw/source/ui/vba/vbadocumentproperties.hxx
index 5159ea580601..3f9a6c193741 100644
--- a/sw/source/ui/vba/vbadocumentproperties.hxx
+++ b/sw/source/ui/vba/vbadocumentproperties.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <ooo/vba/XDocumentProperties.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <vbahelper/vbacollectionimpl.hxx>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
typedef CollTestImplHelper< ov::XDocumentProperties > SwVbaDocumentproperties_BASE;
@@ -65,3 +66,5 @@ public:
};
#endif /* SW_VBA_DOCUMENTPROPERTY_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx
index 195adb2ffca4..3c977f654ccd 100644
--- a/sw/source/ui/vba/vbadocuments.cxx
+++ b/sw/source/ui/vba/vbadocuments.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,7 +56,7 @@
#include "vbadocuments.hxx"
#include <vbahelper/vbahelper.hxx>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <osl/file.hxx>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -176,3 +177,5 @@ SwVbaDocuments::getServiceNames()
}
return sNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbadocuments.hxx b/sw/source/ui/vba/vbadocuments.hxx
index dc0f75543979..050817e7f95f 100644
--- a/sw/source/ui/vba/vbadocuments.hxx
+++ b/sw/source/ui/vba/vbadocuments.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,5 @@ public:
};
#endif /* SW_VBA_DOCUMENTS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaeventshelper.cxx b/sw/source/ui/vba/vbaeventshelper.cxx
index b2270b009ca9..e837785be3ab 100755..100644
--- a/sw/source/ui/vba/vbaeventshelper.cxx
+++ b/sw/source/ui/vba/vbaeventshelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -101,3 +102,5 @@ extern sdecl::ServiceDecl const serviceDecl(
}
// ============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaeventshelper.hxx b/sw/source/ui/vba/vbaeventshelper.hxx
index 7f951bdaa452..a5817eef2d37 100755..100644
--- a/sw/source/ui/vba/vbaeventshelper.hxx
+++ b/sw/source/ui/vba/vbaeventshelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,4 @@ protected:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index 1b4fc953b04d..0ff4295a1218 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,6 +34,7 @@
#include <ooo/vba/word/WdFieldType.hpp>
#include <com/sun/star/text/FilenameDisplayFormat.hpp>
#include <com/sun/star/util/XRefreshable.hpp>
+#include <com/sun/star/util/XUpdatable.hpp>
#include <swtypes.hxx>
using namespace ::ooo::vba;
@@ -45,6 +47,17 @@ SwVbaField::SwVbaField( const uno::Reference< ooo::vba::XHelperInterface >& rPa
mxTextField.set( xTextField, uno::UNO_QUERY_THROW );
}
+sal_Bool SAL_CALL SwVbaField::Update() throw (uno::RuntimeException)
+{
+ uno::Reference< util::XUpdatable > xUpdatable( mxTextField, uno::UNO_QUERY );
+ if( xUpdatable.is() )
+ {
+ xUpdatable->update();
+ return sal_True;
+ }
+ return sal_False;
+}
+
// XHelperInterface
rtl::OUString&
SwVbaField::getServiceImplName()
@@ -113,13 +126,11 @@ _ReadFieldParams::_ReadFieldParams( const String& _rData )
nFnd = nNext;
nSavPtr = nNext;
aFieldName = aData.Copy( 0, nFnd );
-// cLastChar = aData.GetChar( nSavPtr );
}
_ReadFieldParams::~_ReadFieldParams()
{
-// aData.SetChar( nSavPtr, cLastChar );
}
@@ -368,6 +379,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range,
{
_ReadFieldParams aReadParam(sText);
sFieldName = aReadParam.GetFieldName();
+ OSL_TRACE("SwVbaFields::Add, the field name is %s ",rtl::OUStringToOString( sFieldName, RTL_TEXTENCODING_UTF8 ).getStr() );
}
uno::Reference< text::XTextContent > xTextField;
@@ -375,6 +387,10 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range,
{
xTextField.set( Create_Field_FileName( sText ), uno::UNO_QUERY_THROW );
}
+ else if( nType == word::WdFieldType::wdFieldDocProperty || sFieldName.EqualsIgnoreCaseAscii("DOCPROPERTY") )
+ {
+ xTextField.set( Create_Field_DocProperty( sText ), uno::UNO_QUERY_THROW );
+ }
else
{
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
@@ -389,7 +405,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range,
uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const rtl::OUString _text ) throw (uno::RuntimeException)
{
- uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( rtl::OUString::createFromAscii("com.sun.star.text.TextField.FileName") ), uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.FileName")) ), uno::UNO_QUERY_THROW );
sal_Int16 nFileFormat = text::FilenameDisplayFormat::NAME_AND_EXT;
if( _text.getLength() > 0 )
{
@@ -419,6 +435,104 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const rtl
return xTextField;
}
+struct DocPropertyTable
+{
+ const char* sDocPropertyName;
+ const char* sFieldService;
+};
+
+static const DocPropertyTable aDocPropertyTables[] =
+{
+ { "Author", "com.sun.star.text.textfield.docinfo.CreateAuthor" },
+ { "Bytes", NULL },
+ { "Category", NULL },
+ { "Characters",NULL },
+ { "CharactersWithSpaces", NULL },
+ { "Comments", "com.sun.star.text.textfield.docinfo.Description" },
+ { "Company", NULL },
+ { "CreateTime", "com.sun.star.text.textfield.docinfo.CreateDateTime" },
+ { "HyperlinkBase", NULL },
+ { "Keywords", "com.sun.star.text.textfield.docinfo.Keywords" },
+ { "LastPrinted", "com.sun.star.text.textfield.docinfo.PrintDateTime" },
+ { "LastSavedBy", "com.sun.star.text.textfield.docinfo.ChangeAuthor" },
+ { "LastSavedTime", "com.sun.star.text.textfield.docinfo.ChangeDateTime" },
+ { "Lines", NULL },
+ { "Manager", NULL },
+ { "NameofApplication", NULL },
+ { "ODMADocID", NULL },
+ { "Pages", "com.sun.star.text.textfield.PageCount" },
+ { "Paragraphs", "com.sun.star.text.textfield.ParagraphCount" },
+ { "RevisionNumber", "com.sun.star.text.textfield.docinfo.Revision" },
+ { "Security", NULL },
+ { "Subject", "com.sun.star.text.textfield.docinfo.Subject" },
+ { "Template", "com.sun.star.text.textfield.TemplateName" },
+ { "Title", "com.sun.star.text.textfield.docinfo.Title" },
+ { "TotalEditingTime", "com.sun.star.text.textfield.docinfo.EditTime" },
+ { "Words", "com.sun.star.text.textfield.WordCount" },
+ { NULL, NULL }
+};
+
+uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const rtl::OUString _text ) throw (uno::RuntimeException)
+{
+ String aDocProperty;
+ _ReadFieldParams aReadParam( _text );
+ long nRet;
+ while( -1 != ( nRet = aReadParam.SkipToNextToken() ))
+ {
+ switch( nRet )
+ {
+ case -2:
+ if( !aDocProperty.Len() )
+ aDocProperty = aReadParam.GetResult();
+ break;
+ case '*':
+ //Skip over MERGEFORMAT
+ aReadParam.SkipToNextToken();
+ break;
+ }
+ }
+ aDocProperty.EraseAllChars('"');
+ OSL_TRACE("SwVbaFields::Create_Field_DocProperty, the document property name is %s ",rtl::OUStringToOString( aDocProperty, RTL_TEXTENCODING_UTF8 ).getStr() );
+ if( aDocProperty.Len() == 0 )
+ {
+ throw uno::RuntimeException();
+ }
+
+ sal_Bool bCustom = sal_True;
+ rtl::OUString sFieldService;
+ // find the build in document properties
+ for( const DocPropertyTable* pTable = aDocPropertyTables; pTable->sDocPropertyName != NULL; pTable++ )
+ {
+ if( aDocProperty.EqualsIgnoreCaseAscii( pTable->sDocPropertyName ) )
+ {
+ if( pTable->sFieldService != NULL )
+ sFieldService = rtl::OUString::createFromAscii(pTable->sFieldService);
+ bCustom = sal_False;
+ break;
+ }
+ }
+
+ if( bCustom )
+ {
+ sFieldService = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.textfield.docinfo.Custom" ) );
+ }
+ else if( sFieldService.getLength() == 0 )
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+
+ uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( sFieldService ), uno::UNO_QUERY_THROW );
+
+ if( bCustom )
+ {
+ uno::Reference< beans::XPropertySet > xProps( xTextField, uno::UNO_QUERY_THROW );
+ rtl::OUString sDocPropertyName( aDocProperty );
+ xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ), uno::makeAny( sDocPropertyName ) );
+ }
+
+ return xTextField;
+}
+
uno::Reference< container::XEnumeration > SAL_CALL
SwVbaFields::createEnumeration() throw (uno::RuntimeException)
{
@@ -476,3 +590,4 @@ SwVbaFields::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbafield.hxx b/sw/source/ui/vba/vbafield.hxx
index 3c55acf73e9d..57bdf44bb2cf 100644
--- a/sw/source/ui/vba/vbafield.hxx
+++ b/sw/source/ui/vba/vbafield.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,6 +43,7 @@ class SwVbaField : public SwVbaField_BASE
public:
SwVbaField( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rDocument, const css::uno::Reference< css::text::XTextField >& xTextField) throw ( css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL Update() throw ( css::uno::RuntimeException);
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
@@ -57,6 +59,7 @@ class SwVbaFields : public SwVbaFields_BASE
css::uno::Reference< css::lang::XMultiServiceFactory > mxMSF;
private:
css::uno::Reference< css::text::XTextField > Create_Field_FileName( const rtl::OUString _text ) throw (css::uno::RuntimeException);
+ css::uno::Reference< css::text::XTextField > Create_Field_DocProperty( const rtl::OUString _text ) throw (css::uno::RuntimeException);
public:
SwVbaFields( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel );
@@ -75,3 +78,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx
index fccf04181993..c995527e20a6 100644
--- a/sw/source/ui/vba/vbafind.cxx
+++ b/sw/source/ui/vba/vbafind.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,13 +81,6 @@ void SwVbaFind::SetReplace( sal_Int32 type )
mnReplaceType = type;
mbReplace = sal_True;
}
-#ifdef TOMORROW
-rtl::OUString SwVbaFind::ReplaceWildcards( const rtl::OUString& /*rText*/ ) throw ( uno::RuntimeException )
-{
- // TODO:
- return rtl::OUString();
-}
-#endif
uno::Reference< text::XTextRange > SwVbaFind::FindOneElement() throw ( uno::RuntimeException )
{
uno::Reference< text::XTextRange > xFoundOne;
@@ -426,3 +420,4 @@ SwVbaFind::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbafind.hxx b/sw/source/ui/vba/vbafind.hxx
index ef971866500d..41c256391e4a 100644
--- a/sw/source/ui/vba/vbafind.hxx
+++ b/sw/source/ui/vba/vbafind.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,9 +59,6 @@ private:
void SetReplace( sal_Int32 type );
void SetReplaceWith( const rtl::OUString& rText ) throw ( css::uno::RuntimeException );
rtl::OUString GetReplaceWith() throw ( css::uno::RuntimeException );
-#ifdef TOMORROW
- rtl::OUString ReplaceWildcards( const rtl::OUString& rText ) throw ( css::uno::RuntimeException );
-#endif
css::uno::Reference< css::text::XTextRange > FindOneElement() throw ( css::uno::RuntimeException );
sal_Bool SearchReplace() throw ( css::uno::RuntimeException );
@@ -101,3 +99,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_FIND_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbafont.cxx b/sw/source/ui/vba/vbafont.cxx
index 47f39bcbefda..89ce1801c334 100644
--- a/sw/source/ui/vba/vbafont.cxx
+++ b/sw/source/ui/vba/vbafont.cxx
@@ -1,7 +1,9 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "vbafont.hxx"
#include <com/sun/star/awt/FontUnderline.hpp>
#include <ooo/vba/word/WdUnderline.hpp>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
+#include <sal/macros.h>
#include <ooo/vba/word/WdColorIndex.hpp>
using namespace ::ooo::vba;
@@ -37,7 +39,7 @@ static MapPair UnderLineTable[] = {
{ word::WdUnderline::wdUnderlineDashLongHeavy, com::sun::star::awt::FontUnderline::BOLDLONGDASH },
};
-typedef std::hash_map< sal_Int32, sal_Int32 > ConstToConst;
+typedef boost::unordered_map< sal_Int32, sal_Int32 > ConstToConst;
class UnderLineMapper
{
ConstToConst MSO2OOO;
@@ -45,7 +47,7 @@ class UnderLineMapper
private:
UnderLineMapper()
{
- sal_Int32 nLen = sizeof( UnderLineTable )/ sizeof( UnderLineTable[0] );
+ sal_Int32 nLen = SAL_N_ELEMENTS( UnderLineTable );
for ( sal_Int32 index=0; index<nLen; ++index )
{
@@ -214,3 +216,4 @@ SwVbaFont::getServiceNames()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbafont.hxx b/sw/source/ui/vba/vbafont.hxx
index 1500c2a314dd..2e42936c345e 100644
--- a/sw/source/ui/vba/vbafont.hxx
+++ b/sw/source/ui/vba/vbafont.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef VBA_FONT_HXX
#define VBA_FONT_HXX
@@ -29,3 +30,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaformfield.cxx b/sw/source/ui/vba/vbaformfield.cxx
new file mode 100644
index 000000000000..ed6bf39a6018
--- /dev/null
+++ b/sw/source/ui/vba/vbaformfield.cxx
@@ -0,0 +1,138 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbaformfield.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <ecmaflds.hxx>
+#include "vbacheckbox.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaFormField::SwVbaFormField( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& rModel, const uno::Reference< text::XFormField >& xFormField ) throw ( uno::RuntimeException ) : SwVbaFormField_BASE( rParent, rContext ), mxModel( rModel ), mxFormField( xFormField )
+{
+}
+
+SwVbaFormField::~SwVbaFormField()
+{
+}
+
+rtl::OUString SAL_CALL SwVbaFormField::getResult() throw ( uno::RuntimeException )
+{
+ rtl::OUString sResult;
+ rtl::OUString sType = mxFormField->getFieldType();
+ if( sType.equalsIgnoreAsciiCaseAscii( ECMA_FORMTEXT ) )
+ {
+ uno::Reference< text::XTextContent > xTextContent( mxFormField, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextRange > xTextRange = xTextContent->getAnchor();
+ sResult = xTextRange->getString();
+ }
+ else if( sType.equalsIgnoreAsciiCaseAscii( ECMA_FORMCHECKBOX ) )
+ {
+ sal_Int32 nValue = 0;
+ sal_Int32 nCount = mxFormField->getParamCount();
+ for( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ if( mxFormField->getParamName(i).equalsIgnoreAsciiCaseAscii( ECMA_FORMCHECKBOX_CHECKED ) )
+ {
+ if( mxFormField->getParamValue(i).equalsIgnoreAsciiCaseAscii("on") )
+ nValue = 1;
+ else
+ nValue = 0;
+ break;
+ }
+
+ }
+ sResult = rtl::OUString::valueOf( nValue );
+ }
+ else
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+ return sResult;
+}
+
+void SAL_CALL SwVbaFormField::setResult( const rtl::OUString& result ) throw ( uno::RuntimeException )
+{
+ rtl::OUString sType = mxFormField->getFieldType();
+ if( sType.equalsIgnoreAsciiCaseAscii( ECMA_FORMTEXT ) )
+ {
+ uno::Reference< text::XTextContent > xTextContent( mxFormField, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextRange > xTextRange = xTextContent->getAnchor();
+ xTextRange->setString( result );
+ }
+ else if( sType.equalsIgnoreAsciiCaseAscii( ECMA_FORMCHECKBOX ) )
+ {
+ // do nothing
+ }
+ else
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+}
+
+sal_Bool SAL_CALL SwVbaFormField::getEnabled() throw ( uno::RuntimeException )
+{
+ //allways return true
+ return sal_True;
+}
+
+void SAL_CALL SwVbaFormField::setEnabled( sal_Bool/* enabled */ ) throw ( uno::RuntimeException )
+{
+ // not support in Writer
+}
+
+uno::Any SAL_CALL SwVbaFormField::CheckBox() throw ( uno::RuntimeException )
+{
+ return uno::makeAny( uno::Reference< word::XCheckBox >( new SwVbaCheckBox( this, mxContext, mxModel, mxFormField ) ) );
+}
+
+rtl::OUString&
+SwVbaFormField::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaFormField") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaFormField::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.FormField" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaformfield.hxx b/sw/source/ui/vba/vbaformfield.hxx
new file mode 100644
index 000000000000..00ba837443cb
--- /dev/null
+++ b/sw/source/ui/vba/vbaformfield.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_FORMFIELD_HXX
+#define SW_VBA_FORMFIELD_HXX
+
+#include <ooo/vba/word/XFormField.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XFormField.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XFormField > SwVbaFormField_BASE;
+
+class SwVbaFormField : public SwVbaFormField_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::text::XFormField > mxFormField;
+
+public:
+ SwVbaFormField( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel, const css::uno::Reference< css::text::XFormField >& xFormField ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaFormField();
+
+ // Methods
+ rtl::OUString SAL_CALL getResult() throw ( css::uno::RuntimeException );
+ void SAL_CALL setResult( const rtl::OUString& result ) throw ( css::uno::RuntimeException );
+ sal_Bool SAL_CALL getEnabled() throw ( css::uno::RuntimeException );
+ void SAL_CALL setEnabled( sal_Bool enabled ) throw ( css::uno::RuntimeException );
+ css::uno::Any SAL_CALL CheckBox() throw ( css::uno::RuntimeException );
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_FORMFIELD_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaformfields.cxx b/sw/source/ui/vba/vbaformfields.cxx
new file mode 100644
index 000000000000..43c8e3cd5efa
--- /dev/null
+++ b/sw/source/ui/vba/vbaformfields.cxx
@@ -0,0 +1,205 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbaformfields.hxx"
+#include "vbaformfield.hxx"
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include "wordvbahelper.hxx"
+#include <cppuhelper/implbase3.hxx>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+typedef std::vector< uno::Reference< text::XFormField > > XFormFieldVec;
+typedef ::cppu::WeakImplHelper1< container::XEnumeration > FormFiledEnumeration_BASE;
+typedef ::cppu::WeakImplHelper3< container::XNameAccess, container::XIndexAccess, container::XEnumerationAccess > FormFieldCollectionHelper_BASE;
+
+rtl::OUString lcl_getFormFieldName( const uno::Reference< text::XFormField >& xFormField )
+{
+ rtl::OUString sName;
+ sal_Int32 nCount = xFormField->getParamCount();
+ for( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ if( xFormField->getParamName(i).equalsIgnoreAsciiCaseAscii( "Name" ) )
+ {
+ sName = xFormField->getParamValue(i);
+ OSL_TRACE("lcl_getFormFieldName: %s", rtl::OUStringToOString( sName, RTL_TEXTENCODING_UTF8 ).getStr() );
+ break;
+ }
+ }
+ return sName;
+}
+
+class FormFieldsEnumeration : public FormFiledEnumeration_BASE
+{
+private:
+ uno::Reference< XHelperInterface > mxParent;
+ uno::Reference< uno::XComponentContext > mxContext;
+ uno::Reference< frame::XModel > mxModel;
+ XFormFieldVec mxFormFields;
+ XFormFieldVec::iterator cachePos;
+public:
+ FormFieldsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel, const XFormFieldVec& xFormFiels ) throw (uno::RuntimeException) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ), mxFormFields( xFormFiels ), cachePos( mxFormFields.begin() )
+ {
+ }
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( cachePos != mxFormFields.end() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( !hasMoreElements() )
+ throw container::NoSuchElementException();
+ uno::Reference< text::XFormField > xFormField( *cachePos++ );
+ return uno::makeAny( uno::Reference< word::XFormField > ( new SwVbaFormField( mxParent, mxContext, mxModel, xFormField ) ) );
+ }
+
+};
+
+class FormFieldCollectionHelper : public FormFieldCollectionHelper_BASE
+{
+private:
+ uno::Reference< XHelperInterface > mxParent;
+ uno::Reference< uno::XComponentContext > mxContext;
+ uno::Reference< frame::XModel > mxModel;
+ XFormFieldVec mxFormFields;
+ XFormFieldVec::iterator cachePos;
+public:
+ FormFieldCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel )
+ {
+ uno::Reference< text::XBookmarksSupplier > xBookmarksSupplier( xModel,uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xIndexAccess( xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY_THROW );
+ sal_Int32 nCount = xIndexAccess->getCount();
+ for( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ uno::Reference< text::XFormField > xFormField( xIndexAccess->getByIndex( i ), uno::UNO_QUERY );
+ if( xFormField.is() )
+ mxFormFields.push_back( xFormField );
+ }
+ cachePos = mxFormFields.begin();
+ }
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return word::XFormField::static_type(0); }
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { return getCount() > 0 ; }
+ // XNameAcess
+ virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( !hasByName(aName) )
+ throw container::NoSuchElementException();
+ uno::Reference< text::XFormField > xFormField( *cachePos, uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XFormField >( new SwVbaFormField( mxParent, mxContext, mxModel, xFormField ) ) );
+ }
+ virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException)
+ {
+ uno::Sequence< rtl::OUString > sNames( mxFormFields.size() );
+ rtl::OUString* pString = sNames.getArray();
+ XFormFieldVec::iterator it = mxFormFields.begin();
+ XFormFieldVec::iterator it_end = mxFormFields.end();
+ for ( ; it != it_end; ++it, ++pString )
+ {
+ uno::Reference< text::XFormField > xFormField( *cachePos, uno::UNO_QUERY_THROW );
+ *pString = lcl_getFormFieldName( xFormField );
+ }
+ return sNames;
+ }
+ virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
+ {
+ cachePos = mxFormFields.begin();
+ XFormFieldVec::iterator it_end = mxFormFields.end();
+ for ( ; cachePos != it_end; ++cachePos )
+ {
+ //uno::Reference< container::XNamed > xName( *cachePos, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XFormField > xFormField( *cachePos, uno::UNO_QUERY_THROW );
+ if ( aName.equalsIgnoreAsciiCase( lcl_getFormFieldName( xFormField )) )
+ break;
+ }
+ return ( cachePos != it_end );
+ }
+ // XIndexAccess
+ virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ return mxFormFields.size();
+ }
+ virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
+ {
+ if ( Index < 0 || Index >= getCount() )
+ throw lang::IndexOutOfBoundsException();
+ return uno::makeAny( uno::Reference< word::XFormField >( new SwVbaFormField( mxParent, mxContext, mxModel, mxFormFields[ Index ] ) ) );
+ }
+ // XEnumerationAccess
+ virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException)
+ {
+ return new FormFieldsEnumeration( mxParent, mxContext, mxModel, mxFormFields );
+ }
+};
+
+SwVbaFormFields::SwVbaFormFields( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ): SwVbaFormFields_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new FormFieldCollectionHelper( xParent, xContext, xModel ) ) ), mxModel( xModel )
+{
+}
+// XEnumerationAccess
+uno::Type
+SwVbaFormFields::getElementType() throw (uno::RuntimeException)
+{
+ return word::XFormField::static_type(0);
+}
+uno::Reference< container::XEnumeration >
+SwVbaFormFields::createEnumeration() throw (uno::RuntimeException)
+{
+ uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
+ return xEnumAccess->createEnumeration();
+}
+
+uno::Any
+SwVbaFormFields::createCollectionObject( const css::uno::Any& aSource )
+{
+ return aSource;
+}
+
+rtl::OUString&
+SwVbaFormFields::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaFormFields") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+SwVbaFormFields::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.FormFields") );
+ }
+ return sNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaformfields.hxx b/sw/source/ui/vba/vbaformfields.hxx
new file mode 100644
index 000000000000..335fceb74379
--- /dev/null
+++ b/sw/source/ui/vba/vbaformfields.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_FORMFIELDS_HXX
+#define SW_VBA_FORMFIELDS_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XFormFields.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/text/XBookmarksSupplier.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+
+typedef CollTestImplHelper< ooo::vba::word::XFormFields > SwVbaFormFields_BASE;
+
+class SwVbaFormFields : public SwVbaFormFields_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+
+public:
+ SwVbaFormFields( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel );
+ virtual ~SwVbaFormFields() {}
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaFormFields_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_FORMFIELDS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaframe.cxx b/sw/source/ui/vba/vbaframe.cxx
new file mode 100644
index 000000000000..04d13a09674c
--- /dev/null
+++ b/sw/source/ui/vba/vbaframe.cxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbaframe.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaFrame::SwVbaFrame( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const css::uno::Reference< frame::XModel >& rModel, const css::uno::Reference< text::XTextFrame >& xTextFrame ) throw ( css::uno::RuntimeException ) :
+ SwVbaFrame_BASE( rParent, rContext ), mxModel( rModel ), mxTextFrame( xTextFrame )
+{
+}
+
+SwVbaFrame::~SwVbaFrame()
+{
+}
+
+void SAL_CALL SwVbaFrame::Select() throw ( uno::RuntimeException )
+{
+ uno::Reference< view::XSelectionSupplier > xSelectSupp( mxModel->getCurrentController(), uno::UNO_QUERY_THROW );
+ xSelectSupp->select( uno::makeAny( mxTextFrame ) );
+}
+
+rtl::OUString&
+SwVbaFrame::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaFrame") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaFrame::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Frame" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaframe.hxx b/sw/source/ui/vba/vbaframe.hxx
new file mode 100644
index 000000000000..745d5f2096c0
--- /dev/null
+++ b/sw/source/ui/vba/vbaframe.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_FRAME_HXX
+#define SW_VBA_FRAME_HXX
+
+#include <ooo/vba/word/XFrame.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XTextFrame.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XFrame > SwVbaFrame_BASE;
+
+class SwVbaFrame : public SwVbaFrame_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::text::XTextFrame > mxTextFrame;
+
+public:
+ SwVbaFrame( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel, const css::uno::Reference< css::text::XTextFrame >& xTextFrame ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaFrame();
+
+ // Methods
+ virtual void SAL_CALL Select() throw ( css::uno::RuntimeException );
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_FRAME_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaframes.cxx b/sw/source/ui/vba/vbaframes.cxx
new file mode 100644
index 000000000000..e3aba63cfb02
--- /dev/null
+++ b/sw/source/ui/vba/vbaframes.cxx
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbaframes.hxx"
+#include "vbaframe.hxx"
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include "wordvbahelper.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+typedef ::cppu::WeakImplHelper1< container::XEnumeration > FramesEnumeration_Base;
+class FramesEnumeration : public FramesEnumeration_Base
+{
+private:
+ uno::Reference< XHelperInterface > mxParent;
+ uno::Reference< uno::XComponentContext > mxContext;
+ uno::Reference< container::XIndexAccess> mxIndexAccess;
+ uno::Reference< frame::XModel > mxModel;
+ sal_Int32 nCurrentPos;
+public:
+ FramesEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : mxParent( xParent ), mxContext( xContext), mxIndexAccess( xIndexAccess ), mxModel( xModel ), nCurrentPos(0)
+ {
+ }
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( nCurrentPos < mxIndexAccess->getCount() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( !hasMoreElements() )
+ throw container::NoSuchElementException();
+ uno::Reference< text::XTextFrame > xTextFrame( mxIndexAccess->getByIndex( nCurrentPos++ ), uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XFrame > ( new SwVbaFrame( mxParent, mxContext, mxModel, xTextFrame ) ) );
+ }
+
+};
+
+SwVbaFrames::SwVbaFrames( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xFrames, const uno::Reference< frame::XModel >& xModel ): SwVbaFrames_BASE( xParent, xContext, xFrames ), mxModel( xModel )
+{
+ mxFramesSupplier.set( mxModel, uno::UNO_QUERY_THROW );
+}
+// XEnumerationAccess
+uno::Type
+SwVbaFrames::getElementType() throw (uno::RuntimeException)
+{
+ return word::XFrame::static_type(0);
+}
+
+uno::Reference< container::XEnumeration >
+SwVbaFrames::createEnumeration() throw (uno::RuntimeException)
+{
+ return new FramesEnumeration( this, mxContext,m_xIndexAccess, mxModel );
+}
+
+uno::Any
+SwVbaFrames::createCollectionObject( const css::uno::Any& aSource )
+{
+ uno::Reference< text::XTextFrame > xTextFrame( aSource, uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XFrame > ( new SwVbaFrame( this, mxContext, mxModel, xTextFrame ) ) );
+}
+
+rtl::OUString&
+SwVbaFrames::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaFrames") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+SwVbaFrames::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Frames") );
+ }
+ return sNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaframes.hxx b/sw/source/ui/vba/vbaframes.hxx
new file mode 100644
index 000000000000..38015fd47c44
--- /dev/null
+++ b/sw/source/ui/vba/vbaframes.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_FRAMES_HXX
+#define SW_VBA_FRAMES_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XFrames.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/text/XTextFramesSupplier.hpp>
+
+typedef CollTestImplHelper< ooo::vba::word::XFrames > SwVbaFrames_BASE;
+
+class SwVbaFrames : public SwVbaFrames_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::text::XTextFramesSupplier > mxFramesSupplier;
+
+public:
+ SwVbaFrames( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xFrames, const css::uno::Reference< css::frame::XModel >& xModel );
+ virtual ~SwVbaFrames() {}
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaFrames_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+
+};
+
+#endif /* SW_VBA_FRAMES_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaglobals.cxx b/sw/source/ui/vba/vbaglobals.cxx
index b95c5e5c9e3d..19ba048b1426 100644
--- a/sw/source/ui/vba/vbaglobals.cxx
+++ b/sw/source/ui/vba/vbaglobals.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,7 +27,7 @@
************************************************************************/
#include <vbahelper/helperdecl.hxx>
#include "vbaglobals.hxx"
-
+#include <sal/macros.h>
#include <comphelper/unwrapargs.hxx>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
@@ -49,7 +50,7 @@ SwVbaGlobals::SwVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Refere
{
OSL_TRACE("SwVbaGlobals::SwVbaGlobals()");
uno::Sequence< beans::PropertyValue > aInitArgs( 2 );
- aInitArgs[ 0 ].Name = rtl::OUString::createFromAscii("Application");
+ aInitArgs[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Application"));
aInitArgs[ 0 ].Value = uno::makeAny( getApplication() );
aInitArgs[ 1 ].Name = sDocCtxName;
aInitArgs[ 1 ].Value = uno::makeAny( getXSomethingFromArgs< frame::XModel >( aArgs, 0 ) );
@@ -129,6 +130,12 @@ SwVbaGlobals::Dialogs( const uno::Any& index ) throw (uno::RuntimeException)
return getApplication()->Dialogs( index );
}
+uno::Any SAL_CALL
+SwVbaGlobals::ListGalleries( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ return getApplication()->ListGalleries( index );
+}
+
uno::Reference<word::XSelection > SAL_CALL
SwVbaGlobals::getSelection() throw (uno::RuntimeException)
{
@@ -171,7 +178,7 @@ SwVbaGlobals::getAvailableServiceNames( ) throw (uno::RuntimeException)
// #FIXME #TODO make Application a proper service
// ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.word.Application" ) ),
};
- sal_Int32 nWordServices = ( sizeof( names )/ sizeof( names[0] ) );
+ sal_Int32 nWordServices = SAL_N_ELEMENTS( names );
sal_Int32 startIndex = serviceNames.getLength();
serviceNames.realloc( serviceNames.getLength() + nWordServices );
for ( sal_Int32 index = 0; index < nWordServices; ++index )
@@ -191,3 +198,4 @@ extern sdecl::ServiceDecl const serviceDecl(
"ooo.vba.word.Globals" );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaglobals.hxx b/sw/source/ui/vba/vbaglobals.hxx
index 9bb2e8fa606d..3ad5cf4195e4 100644
--- a/sw/source/ui/vba/vbaglobals.hxx
+++ b/sw/source/ui/vba/vbaglobals.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,6 +70,7 @@ public:
virtual css::uno::Any SAL_CALL Documents( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Addins( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Dialogs( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL ListGalleries( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual float SAL_CALL CentimetersToPoints( float _Centimeters ) throw (css::uno::RuntimeException);
// XMultiServiceFactory
virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames( ) throw (css::uno::RuntimeException);
@@ -78,3 +80,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_GLOBALS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaheaderfooter.cxx b/sw/source/ui/vba/vbaheaderfooter.cxx
index 6fb7061c573f..0a7bd993d6d3 100644
--- a/sw/source/ui/vba/vbaheaderfooter.cxx
+++ b/sw/source/ui/vba/vbaheaderfooter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,6 +82,7 @@ uno::Reference< word::XRange > SAL_CALL SwVbaHeaderFooter::getRange() throw (uno
uno::Any SAL_CALL
SwVbaHeaderFooter::Shapes( const uno::Any& index ) throw (uno::RuntimeException)
{
+ // #FIXME: only get the shapes in the current header/footer
uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxModel, uno::UNO_QUERY_THROW );
//uno::Reference< drawing::XShapes > xShapes( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
@@ -109,3 +111,4 @@ SwVbaHeaderFooter::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaheaderfooter.hxx b/sw/source/ui/vba/vbaheaderfooter.hxx
index dba10ff767d8..91c18e8958d9 100644
--- a/sw/source/ui/vba/vbaheaderfooter.hxx
+++ b/sw/source/ui/vba/vbaheaderfooter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,3 +59,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_HEADERFOOTER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx
index 604cc1e11d8c..c1d04f6369a9 100644
--- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx
+++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,8 +30,12 @@
#include <comphelper/processfactory.hxx>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/text/XTextRangeCompare.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
using namespace ::com::sun::star;
using namespace ::ooo::vba;
@@ -38,41 +43,61 @@ using namespace ::ooo::vba;
#define FIRST_PAGE 1;
// Class HeaderFooterHelper
+sal_Bool HeaderFooterHelper::isHeaderFooter( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
+{
+ return isHeaderFooter( word::getCurrentXText( xModel ) );
+}
-sal_Bool HeaderFooterHelper::isHeader( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
+sal_Bool HeaderFooterHelper::isHeaderFooter( const uno::Reference< text::XText >& xText ) throw (uno::RuntimeException)
{
- uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW );
+ uno::Reference< lang::XServiceInfo > xServiceInfo( xText, uno::UNO_QUERY_THROW );
+ rtl::OUString aImplName = xServiceInfo->getImplementationName();
+ if( aImplName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SwXHeadFootText")) )
+ return sal_True;
+ return sal_False;
+}
- sal_Bool isOn = sal_False;
- xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn"))) >>= isOn;
- if( !isOn )
+sal_Bool HeaderFooterHelper::isHeader( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
+{
+ const uno::Reference< text::XText > xCurrentText = word::getCurrentXText( xModel );
+ if( !isHeaderFooter( xCurrentText ) )
return sal_False;
- sal_Bool isShared = sal_False;
- xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsShared"))) >>= isShared;
-
+ rtl::OUString aPropIsShared = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsShared") );
rtl::OUString aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderText") );
+ uno::Reference< style::XStyle > xPageStyle = word::getCurrentPageStyle( xModel );
+ uno::Reference< beans::XPropertySet > xPageProps( xPageStyle, uno::UNO_QUERY_THROW );
+ sal_Bool isShared = sal_True;
+ xPageProps->getPropertyValue( aPropIsShared ) >>= isShared;
if( !isShared )
{
+ uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
if( 0 == xPageCursor->getPage() % 2 )
- {
aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderTextLeft") );
- }
else
- {
aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderTextRight") );
- }
}
- uno::Reference< text::XText > xText( xStyleProps->getPropertyValue( aPropText ), uno::UNO_QUERY_THROW );
- //FIXME: can not compare in this way?
- return ( xText == xCurrentText );
+ uno::Reference< text::XText > xHeaderText( xPageProps->getPropertyValue( aPropText ), uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextRangeCompare > xTRC( xHeaderText, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextRange > xTR1( xCurrentText, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextRange > xTR2( xHeaderText, uno::UNO_QUERY_THROW );
+ try
+ {
+ if( xTRC->compareRegionStarts( xTR1, xTR2 ) == 0 )
+ return sal_True;
+ }
+ catch( lang::IllegalArgumentException& )
+ {
+ return sal_False;
+ }
+
+ return sal_False;
}
-sal_Bool HeaderFooterHelper::isFirstPageHeader( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
+sal_Bool HeaderFooterHelper::isFirstPageHeader( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
{
- if( isHeader( xModel, xCurrentText ) )
+ if( isHeader( xModel ) )
{
uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
// FIXME: getPage allways returns 1
@@ -82,9 +107,9 @@ sal_Bool HeaderFooterHelper::isFirstPageHeader( const uno::Reference< frame::XMo
return sal_False;
}
-sal_Bool HeaderFooterHelper::isEvenPagesHeader( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
+sal_Bool HeaderFooterHelper::isEvenPagesHeader( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
{
- if( isHeader( xModel, xCurrentText ) )
+ if( isHeader( xModel ) )
{
uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW );
sal_Bool isShared = sal_False;
@@ -98,40 +123,47 @@ sal_Bool HeaderFooterHelper::isEvenPagesHeader( const uno::Reference< frame::XMo
return sal_False;
}
-sal_Bool HeaderFooterHelper::isFooter( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
+sal_Bool HeaderFooterHelper::isFooter( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
{
- uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW );
-
- sal_Bool isOn = sal_False;
- xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn"))) >>= isOn;
- if( !isOn )
+ const uno::Reference< text::XText > xCurrentText = word::getCurrentXText( xModel );
+ if( !isHeaderFooter( xCurrentText ) )
return sal_False;
- sal_Bool isShared = sal_False;
- xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsShared"))) >>= isShared;
-
+ rtl::OUString aPropIsShared = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsShared") );
rtl::OUString aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterText") );
+ uno::Reference< style::XStyle > xPageStyle = word::getCurrentPageStyle( xModel );
+ uno::Reference< beans::XPropertySet > xPageProps( xPageStyle, uno::UNO_QUERY_THROW );
+ sal_Bool isShared = sal_True;
+ xPageProps->getPropertyValue( aPropIsShared ) >>= isShared;
if( !isShared )
{
+ uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
if( 0 == xPageCursor->getPage() % 2 )
- {
aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterTextLeft") );
- }
else
- {
aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterTextRight") );
- }
}
- uno::Reference< text::XText > xText( xStyleProps->getPropertyValue( aPropText ), uno::UNO_QUERY_THROW );
+ uno::Reference< text::XText > xFooterText( xPageProps->getPropertyValue( aPropText ), uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextRangeCompare > xTRC( xFooterText, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextRange > xTR1( xCurrentText, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextRange > xTR2( xFooterText, uno::UNO_QUERY_THROW );
+ try
+ {
+ if( xTRC->compareRegionStarts( xTR1, xTR2 ) == 0 )
+ return sal_True;
+ }
+ catch( lang::IllegalArgumentException& )
+ {
+ return sal_False;
+ }
- return ( xText == xCurrentText );
+ return sal_False;
}
-sal_Bool HeaderFooterHelper::isFirstPageFooter( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
+sal_Bool HeaderFooterHelper::isFirstPageFooter( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
{
- if( isFooter( xModel, xCurrentText ) )
+ if( isFooter( xModel ) )
{
uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
sal_Int32 nPage = xPageCursor->getPage();
@@ -140,9 +172,9 @@ sal_Bool HeaderFooterHelper::isFirstPageFooter( const uno::Reference< frame::XMo
return sal_False;
}
-sal_Bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
+sal_Bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
{
- if( isFooter( xModel, xCurrentText ) )
+ if( isFooter( xModel ) )
{
uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW );
sal_Bool isShared = sal_False;
@@ -155,22 +187,5 @@ sal_Bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XMo
}
return sal_False;
}
-#ifdef TOMORROW
-sal_Bool HeaderFooterHelper::isPrimaryHeader( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
-{
- if( isHeader( xModel, xCurrentText ) )
- {
- return( !( isFirstPageHeader( xModel, xCurrentText ) && isEvenPagesHeader( xModel, xCurrentText ) ) );
- }
- return sal_False;
-}
-sal_Bool HeaderFooterHelper::isPrimaryFooter( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
-{
- if( isHeader( xModel, xCurrentText ) )
- {
- return( !( isFirstPageFooter( xModel, xCurrentText ) && isEvenPagesFooter( xModel, xCurrentText ) ) );
- }
- return sal_False;
-}
-#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.hxx b/sw/source/ui/vba/vbaheaderfooterhelper.hxx
index fd29a16015ab..cf5e2d7b28ef 100644
--- a/sw/source/ui/vba/vbaheaderfooterhelper.hxx
+++ b/sw/source/ui/vba/vbaheaderfooterhelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,16 +37,18 @@
class HeaderFooterHelper
{
public:
- static sal_Bool isHeader( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
- static sal_Bool isFirstPageHeader( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
- static sal_Bool isEvenPagesHeader( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
- static sal_Bool isFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
- static sal_Bool isFirstPageFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
- static sal_Bool isEvenPagesFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
-#ifdef TOMORROW
- static sal_Bool isPrimaryHeader( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
- static sal_Bool isPrimaryFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
-#endif
+ static sal_Bool isHeaderFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
+ static sal_Bool isHeaderFooter( const css::uno::Reference< css::text::XText >& xText ) throw (css::uno::RuntimeException);
+ static sal_Bool isHeader( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
+ static sal_Bool isFirstPageHeader( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
+ static sal_Bool isEvenPagesHeader( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
+ static sal_Bool isFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
+ static sal_Bool isFirstPageFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
+ static sal_Bool isEvenPagesFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
+ static sal_Bool isPrimaryHeader( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
+ static sal_Bool isPrimaryFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaheadersfooters.cxx b/sw/source/ui/vba/vbaheadersfooters.cxx
new file mode 100644
index 000000000000..27b27569988b
--- /dev/null
+++ b/sw/source/ui/vba/vbaheadersfooters.cxx
@@ -0,0 +1,150 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbaheadersfooters.hxx"
+#include "vbaheaderfooter.hxx"
+#include <ooo/vba/word/WdHeaderFooterIndex.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+// I assume there is only one headersfooters in Writer
+typedef ::cppu::WeakImplHelper1<container::XIndexAccess > HeadersFootersIndexAccess_Base;
+class HeadersFootersIndexAccess : public HeadersFootersIndexAccess_Base
+{
+private:
+ uno::Reference< XHelperInterface > mxParent;
+ uno::Reference< uno::XComponentContext > mxContext;
+ uno::Reference< frame::XModel > mxModel;
+ uno::Reference< beans::XPropertySet > mxPageStyleProps;
+ sal_Bool mbHeader;
+
+public:
+ HeadersFootersIndexAccess( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xPageStyleProps, sal_Bool bHeader ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ), mxPageStyleProps( xPageStyleProps ), mbHeader( bHeader ) {}
+ ~HeadersFootersIndexAccess(){}
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ // first page, evenpages and primary page
+ return 3;
+ }
+ virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if( Index < 1 || Index > 3 )
+ throw container::NoSuchElementException();
+ return uno::makeAny( uno::Reference< word::XHeaderFooter >( new SwVbaHeaderFooter( mxParent, mxContext, mxModel, mxPageStyleProps, mbHeader, Index ) ) );
+ }
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException)
+ {
+ return word::XHeaderFooter::static_type(0);
+ }
+ virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
+ {
+ return sal_True;
+ }
+};
+
+class HeadersFootersEnumWrapper : public EnumerationHelper_BASE
+{
+ SwVbaHeadersFooters* pHeadersFooters;
+ sal_Int32 nIndex;
+public:
+ HeadersFootersEnumWrapper( SwVbaHeadersFooters* _pHeadersFooters ) : pHeadersFooters( _pHeadersFooters ), nIndex( 0 ) {}
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( nIndex < pHeadersFooters->getCount() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( nIndex < pHeadersFooters->getCount() )
+ return pHeadersFooters->Item( uno::makeAny( ++nIndex ), uno::Any() );
+ throw container::NoSuchElementException();
+ }
+};
+
+SwVbaHeadersFooters::SwVbaHeadersFooters( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xPageStyleProps, sal_Bool isHeader ): SwVbaHeadersFooters_BASE( xParent, xContext, new HeadersFootersIndexAccess( xParent, xContext, xModel, xPageStyleProps, isHeader ) ), mxModel( xModel ), mxPageStyleProps( xPageStyleProps ), mbHeader( isHeader )
+{
+}
+
+::sal_Int32 SAL_CALL SwVbaHeadersFooters::getCount() throw (uno::RuntimeException)
+{
+ // wdHeaderFooterFirstPage, wdHeaderFooterPrimary and wdHeaderFooterEvenPages
+ return 3;
+}
+
+uno::Any SAL_CALL SwVbaHeadersFooters::Item( const uno::Any& Index1, const uno::Any& ) throw (uno::RuntimeException)
+{
+ sal_Int32 nIndex = 0;
+ Index1 >>= nIndex;
+ if( ( nIndex < 1 ) || ( nIndex > 3 ) )
+ {
+ throw container::NoSuchElementException();
+ }
+ return uno::makeAny( uno::Reference< word::XHeaderFooter >( new SwVbaHeaderFooter( this, mxContext, mxModel, mxPageStyleProps, mbHeader, nIndex ) ) );
+}
+
+// XEnumerationAccess
+uno::Type
+SwVbaHeadersFooters::getElementType() throw (uno::RuntimeException)
+{
+ return word::XHeaderFooter::static_type(0);
+}
+uno::Reference< container::XEnumeration >
+
+SwVbaHeadersFooters::createEnumeration() throw (uno::RuntimeException)
+{
+ return new HeadersFootersEnumWrapper( this );
+}
+
+uno::Any
+SwVbaHeadersFooters::createCollectionObject( const uno::Any& aSource )
+{
+ return aSource;
+}
+
+rtl::OUString&
+SwVbaHeadersFooters::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaHeadersFooters") );
+ return sImplName;
+}
+
+uno::Sequence<rtl::OUString>
+SwVbaHeadersFooters::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.HeadersFooters") );
+ }
+ return sNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaheadersfooters.hxx b/sw/source/ui/vba/vbaheadersfooters.hxx
new file mode 100644
index 000000000000..253942b0b164
--- /dev/null
+++ b/sw/source/ui/vba/vbaheadersfooters.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_HEADERSFOOTERS_HXX
+#define SW_VBA_HEADERSFOOTERS_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XHeadersFooters.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+
+typedef CollTestImplHelper< ooo::vba::word::XHeadersFooters > SwVbaHeadersFooters_BASE;
+
+class SwVbaHeadersFooters : public SwVbaHeadersFooters_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::beans::XPropertySet > mxPageStyleProps;
+ sal_Bool mbHeader;
+
+public:
+ SwVbaHeadersFooters( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& xProps, sal_Bool isHeader );
+ virtual ~SwVbaHeadersFooters() {}
+
+ virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& )throw (css::uno::RuntimeException);
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaHeadersFooters_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_HEADERSFOOTERS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbainformationhelper.cxx b/sw/source/ui/vba/vbainformationhelper.cxx
index 6fdf8f9f9449..e46f62961541 100644
--- a/sw/source/ui/vba/vbainformationhelper.cxx
+++ b/sw/source/ui/vba/vbainformationhelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,3 +67,5 @@ double SwVbaInformationHelper::handleWdVerticalPositionRelativeToPage( const css
nCurrentPos = nCurrentPos + nTopMargin - ( DEFAULT_PAGE_DISTANCE + TWIP_TO_MM100( nPageHeight ) ) * ( nCurrentPage - 1 );
return Millimeter::getInPoints( nCurrentPos );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbainformationhelper.hxx b/sw/source/ui/vba/vbainformationhelper.hxx
index 6aeb8439812b..7212c5504e3b 100644
--- a/sw/source/ui/vba/vbainformationhelper.hxx
+++ b/sw/source/ui/vba/vbainformationhelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,3 +42,5 @@ public:
};
#endif /* SW_VBA_INFORMATIONHELPER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalistformat.cxx b/sw/source/ui/vba/vbalistformat.cxx
new file mode 100644
index 000000000000..15eed9a8b421
--- /dev/null
+++ b/sw/source/ui/vba/vbalistformat.cxx
@@ -0,0 +1,120 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbalistformat.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <ooo/vba/word/WdListApplyTo.hpp>
+#include <ooo/vba/word/WdDefaultListBehavior.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include "vbalisttemplate.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaListFormat::SwVbaListFormat( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextRange >& xTextRange ) throw ( uno::RuntimeException ) : SwVbaListFormat_BASE( rParent, rContext ), mxTextRange( xTextRange )
+{
+}
+
+SwVbaListFormat::~SwVbaListFormat()
+{
+}
+
+void SAL_CALL SwVbaListFormat::ApplyListTemplate( const css::uno::Reference< word::XListTemplate >& ListTemplate, const css::uno::Any& ContinuePreviousList, const css::uno::Any& ApplyTo, const css::uno::Any& DefaultListBehavior ) throw (css::uno::RuntimeException)
+{
+ sal_Bool bContinuePreviousList = sal_True;
+ if( ContinuePreviousList.hasValue() )
+ ContinuePreviousList >>= bContinuePreviousList;
+
+ // "applyto" must be current selection
+ sal_Int32 bApplyTo = word::WdListApplyTo::wdListApplyToSelection;
+ if( ApplyTo.hasValue() )
+ ApplyTo >>= bApplyTo;
+ if( bApplyTo != word::WdListApplyTo::wdListApplyToSelection )
+ throw uno::RuntimeException();
+
+ // default behaviour must be wdWord8ListBehavior
+ sal_Int32 nDefaultListBehavior = word::WdDefaultListBehavior::wdWord8ListBehavior;
+ if( DefaultListBehavior.hasValue() )
+ DefaultListBehavior >>= nDefaultListBehavior;
+ if( nDefaultListBehavior != word::WdDefaultListBehavior::wdWord8ListBehavior )
+ throw uno::RuntimeException();
+
+ SwVbaListTemplate* pListTemplate = dynamic_cast< SwVbaListTemplate* >( ListTemplate.get() );
+
+ uno::Reference< container::XEnumerationAccess > xEnumAccess( mxTextRange, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XEnumeration > xEnum = xEnumAccess->createEnumeration();
+ sal_Bool isFirstElement = sal_True;
+ while( xEnum->hasMoreElements() )
+ {
+ uno::Reference< beans::XPropertySet > xProps( xEnum->nextElement(), uno::UNO_QUERY_THROW );
+ if( isFirstElement )
+ {
+ sal_Bool isNumberingRestart = !bContinuePreviousList;
+ xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaIsNumberingRestart") ), uno::makeAny( isNumberingRestart ) );
+ if( isNumberingRestart )
+ {
+ sal_Int16 nStartValue = 1;
+ xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingStartValue") ), uno::makeAny( nStartValue ) );
+ }
+ isFirstElement = sal_False;
+ }
+ else
+ {
+ xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaIsNumberingRestart") ), uno::makeAny( sal_False ) );
+ }
+ pListTemplate->applyListTemplate( xProps );
+ }
+}
+
+void SAL_CALL SwVbaListFormat::ConvertNumbersToText( ) throw (css::uno::RuntimeException)
+{
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+}
+
+rtl::OUString&
+SwVbaListFormat::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaListFormat") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaListFormat::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ListFormat" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalistformat.hxx b/sw/source/ui/vba/vbalistformat.hxx
new file mode 100644
index 000000000000..0483df54e02a
--- /dev/null
+++ b/sw/source/ui/vba/vbalistformat.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_LISTFORMAT_HXX
+#define SW_VBA_LISTFORMAT_HXX
+
+#include <ooo/vba/word/XListFormat.hpp>
+#include <ooo/vba/word/XListTemplate.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XTextRange.hpp>
+#include "vbalisthelper.hxx"
+
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XListFormat > SwVbaListFormat_BASE;
+
+class SwVbaListFormat : public SwVbaListFormat_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextRange > mxTextRange;
+
+public:
+ SwVbaListFormat( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextRange >& xTextRange ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaListFormat();
+
+ // Methods
+ virtual void SAL_CALL ApplyListTemplate( const css::uno::Reference< ::ooo::vba::word::XListTemplate >& ListTemplate, const css::uno::Any& ContinuePreviousList, const css::uno::Any& ApplyTo, const css::uno::Any& DefaultListBehavior ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL ConvertNumbersToText( ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_LISTFORMAT_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalistgalleries.cxx b/sw/source/ui/vba/vbalistgalleries.cxx
new file mode 100644
index 000000000000..7ddd7145a6c2
--- /dev/null
+++ b/sw/source/ui/vba/vbalistgalleries.cxx
@@ -0,0 +1,115 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbalistgalleries.hxx"
+#include "vbalistgallery.hxx"
+#include <ooo/vba/word/WdListGalleryType.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+class ListGalleriesEnumWrapper : public EnumerationHelper_BASE
+{
+ SwVbaListGalleries* pListGalleries;
+ sal_Int32 nIndex;
+public:
+ ListGalleriesEnumWrapper( SwVbaListGalleries* pGalleries ) : pListGalleries( pGalleries ), nIndex( 1 ) {}
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( nIndex <= pListGalleries->getCount() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( nIndex <= pListGalleries->getCount() )
+ return pListGalleries->Item( uno::makeAny( nIndex++ ), uno::Any() );
+ throw container::NoSuchElementException();
+ }
+};
+
+SwVbaListGalleries::SwVbaListGalleries( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextDocument >& xTextDoc ) throw (uno::RuntimeException) : SwVbaListGalleries_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >() ), mxTextDocument( xTextDoc )
+{
+}
+
+::sal_Int32 SAL_CALL SwVbaListGalleries::getCount() throw (uno::RuntimeException)
+{
+ // 3 types of list( bullet, numbered and outline )
+ return 3;
+}
+
+uno::Any SAL_CALL SwVbaListGalleries::Item( const uno::Any& Index1, const uno::Any& /*not processed in this base class*/ ) throw (uno::RuntimeException)
+{
+ sal_Int32 nIndex = 0;
+ if( ( Index1 >>= nIndex ) == sal_True )
+ {
+ if( nIndex == word::WdListGalleryType::wdBulletGallery
+ || nIndex == word::WdListGalleryType::wdNumberGallery
+ || nIndex == word::WdListGalleryType::wdOutlineNumberGallery )
+ return uno::makeAny( uno::Reference< word::XListGallery >( new SwVbaListGallery( this, mxContext, mxTextDocument, nIndex ) ) );
+ }
+ throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Index out of bounds") ), uno::Reference< uno::XInterface >() );
+}
+
+// XEnumerationAccess
+uno::Type
+SwVbaListGalleries::getElementType() throw (uno::RuntimeException)
+{
+ return word::XListGallery::static_type(0);
+}
+
+uno::Reference< container::XEnumeration >
+SwVbaListGalleries::createEnumeration() throw (uno::RuntimeException)
+{
+ return new ListGalleriesEnumWrapper( this );
+}
+
+uno::Any
+SwVbaListGalleries::createCollectionObject( const css::uno::Any& aSource )
+{
+ return aSource;
+}
+
+rtl::OUString&
+SwVbaListGalleries::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaListGalleries") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+SwVbaListGalleries::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ListGalleries") );
+ }
+ return sNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalistgalleries.hxx b/sw/source/ui/vba/vbalistgalleries.hxx
new file mode 100644
index 000000000000..a6e829783a27
--- /dev/null
+++ b/sw/source/ui/vba/vbalistgalleries.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_LISTGALLERIES_HXX
+#define SW_VBA_LISTGALLERIES_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XListGalleries.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/text/XTextDocument.hpp>
+
+typedef CollTestImplHelper< ooo::vba::word::XListGalleries > SwVbaListGalleries_BASE;
+
+class SwVbaListGalleries : public SwVbaListGalleries_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextDocument > mxTextDocument;
+
+public:
+ SwVbaListGalleries( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextDocument >& xTextDoc ) throw (css::uno::RuntimeException);
+ virtual ~SwVbaListGalleries() {}
+
+ virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& /*not processed in this base class*/ ) throw ( css::uno::RuntimeException );
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaListGalleries_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_LISTGALLERIES_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalistgallery.cxx b/sw/source/ui/vba/vbalistgallery.cxx
new file mode 100644
index 000000000000..016de8c7ba70
--- /dev/null
+++ b/sw/source/ui/vba/vbalistgallery.cxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbalistgallery.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include "vbalisttemplates.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaListGallery::SwVbaListGallery( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& xTextDoc, sal_Int32 nType ) throw ( uno::RuntimeException ) : SwVbaListGallery_BASE( rParent, rContext ), mxTextDocument( xTextDoc ), mnType( nType )
+{
+}
+
+SwVbaListGallery::~SwVbaListGallery()
+{
+}
+
+uno::Any SAL_CALL
+SwVbaListGallery::ListTemplates( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< XCollection > xCol( new SwVbaListTemplates( mxParent, mxContext, mxTextDocument, mnType ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+rtl::OUString&
+SwVbaListGallery::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaListGallery") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaListGallery::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ListGallery" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalistgallery.hxx b/sw/source/ui/vba/vbalistgallery.hxx
new file mode 100644
index 000000000000..6371e8613f5d
--- /dev/null
+++ b/sw/source/ui/vba/vbalistgallery.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_LISTGALLERY_HXX
+#define SW_VBA_LISTGALLERY_HXX
+
+#include <ooo/vba/word/XListGallery.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XTextDocument.hpp>
+
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XListGallery > SwVbaListGallery_BASE;
+
+class SwVbaListGallery : public SwVbaListGallery_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextDocument > mxTextDocument;
+ sal_Int32 mnType;
+
+public:
+ SwVbaListGallery( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& xTextDoc, sal_Int32 nType ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaListGallery();
+
+ // Methods
+ virtual css::uno::Any SAL_CALL ListTemplates( const css::uno::Any& index ) throw ( css::uno::RuntimeException );
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_LISTGALLERY_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx
new file mode 100644
index 000000000000..65949d650277
--- /dev/null
+++ b/sw/source/ui/vba/vbalisthelper.cxx
@@ -0,0 +1,705 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbalisthelper.hxx"
+#include <tools/diagnose_ex.h>
+#include <ooo/vba/word/WdListGalleryType.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/style/NumberingType.hpp>
+#include <com/sun/star/container/XIndexReplace.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+static const sal_Int32 LIST_LEVEL_COUNT = 9;
+
+static const char WORD_BULLET_GALLERY[] = "WdBullet";
+static const char WORD_NUMBER_GALLERY[] = "WdNumber";
+static const char WORD_OUTLINE_NUMBER_GALLERY[] = "WdOutlineNumber";
+
+static const char UNO_NAME_ADJUST[] = "Adjust";
+static const char UNO_NAME_PARENT_NUMBERING[] = "ParentNumbering";
+static const char UNO_NAME_PREFIX[] = "Prefix";
+static const char UNO_NAME_SUFFIX[] = "Suffix";
+static const char UNO_NAME_CHAR_STYLE_NAME[] = "CharStyleName";
+static const char UNO_NAME_START_WITH[] = "StartWith";
+static const char UNO_NAME_POSITION_AND_SPACE_MODE[] = "PositionAndSpaceMode";
+static const char UNO_NAME_LABEL_FOLLOWED_BY[] = "LabelFollowedBy";
+static const char UNO_NAME_LIST_TAB_STOP_POSITION[] = "ListtabStopPosition";
+static const char UNO_NAME_FIRST_LINE_INDENT[] = "FirstLineIndent";
+static const char UNO_NAME_INDENT_AT[] = "IndentAt";
+static const char UNO_NAME_NUMBERING_TYPE[] = "NumberingType";
+static const char UNO_NAME_BULLET_ID[] = "BulletId";
+static const char UNO_NAME_BULLET_CHAR[] = "BulletChar";
+static const char UNO_NAME_BULLET_FONT_NAME[] = "BulletFontName";
+static const char UNO_NAME_BULLET_FONT[] = "BulletFont";
+
+static const sal_Int16 CHAR_CLOSED_DOT = 8226;
+static const sal_Int16 CHAR_EMPTY_DOT = 111;
+static const sal_Int16 CHAR_SQUARE = 9632;
+static const sal_Int16 CHAR_STAR_SYMBOL = 10026;
+static const sal_Int16 CHAR_FOUR_DIAMONDS = 10070;
+static const sal_Int16 CHAR_DIAMOND = 10022;
+static const sal_Int16 CHAR_ARROW = 10146;
+static const sal_Int16 CHAR_CHECK_MARK = 10003;
+
+SwVbaListHelper::SwVbaListHelper( const css::uno::Reference< css::text::XTextDocument >& xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType ) throw( css::uno::RuntimeException ) : mxTextDocument( xTextDoc ), mnGalleryType( nGalleryType ), mnTemplateType( nTemplateType )
+{
+ Init();
+}
+
+void SwVbaListHelper::Init() throw( css::uno::RuntimeException )
+{
+ // set the numbering style name
+ switch( mnGalleryType )
+ {
+ case word::WdListGalleryType::wdBulletGallery:
+ {
+ msStyleName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WORD_BULLET_GALLERY ));
+ break;
+ }
+ case word::WdListGalleryType::wdNumberGallery:
+ {
+ msStyleName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WORD_NUMBER_GALLERY ));
+ break;
+ }
+ case word::WdListGalleryType::wdOutlineNumberGallery:
+ {
+ msStyleName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WORD_OUTLINE_NUMBER_GALLERY ));
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException();
+ }
+ }
+ msStyleName += rtl::OUString::valueOf( mnTemplateType );
+
+ // get the numbering style
+ uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( mxTextDocument, uno::UNO_QUERY_THROW );
+ mxStyleFamily.set( xStyleSupplier->getStyleFamilies()->getByName(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingStyles") ) ), uno::UNO_QUERY_THROW );
+ OSL_TRACE("SwVbaListHelper::Init: numbering style name: %s", rtl::OUStringToOString( msStyleName, RTL_TEXTENCODING_UTF8 ).getStr() );
+ if( mxStyleFamily->hasByName( msStyleName ) )
+ {
+ mxStyleProps.set( mxStyleFamily->getByName( msStyleName ), uno::UNO_QUERY_THROW );
+ mxNumberingRules.set( mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingRules") ) ), uno::UNO_QUERY_THROW );
+ }
+ else
+ {
+ // create new numbering style
+ uno::Reference< lang::XMultiServiceFactory > xDocMSF( mxTextDocument, uno::UNO_QUERY_THROW );
+ mxStyleProps.set( xDocMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.NumberingStyle") ) ), uno::UNO_QUERY_THROW );
+ // insert this style into style family, or the property NumberingRules doesn't exist.
+ mxStyleFamily->insertByName( msStyleName, uno::makeAny( mxStyleProps ) );
+ mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingRules") ) ) >>= mxNumberingRules;
+
+ CreateListTemplate();
+
+ mxStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingRules") ) , uno::makeAny( mxNumberingRules ) );
+ }
+}
+
+void SwVbaListHelper::CreateListTemplate() throw( css::uno::RuntimeException )
+{
+ switch( mnGalleryType )
+ {
+ case word::WdListGalleryType::wdBulletGallery:
+ {
+ CreateBulletListTemplate();
+ break;
+ }
+ case word::WdListGalleryType::wdNumberGallery:
+ {
+ CreateNumberListTemplate();
+ break;
+ }
+ case word::WdListGalleryType::wdOutlineNumberGallery:
+ {
+ CreateOutlineNumberListTemplate();
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException();
+ }
+ }
+}
+
+void SwVbaListHelper::CreateBulletListTemplate() throw( css::uno::RuntimeException )
+{
+ // there is only 1 level for each bullet list in MSWord
+ sal_Int32 nLevel = 0;
+ uno::Sequence< beans::PropertyValue > aPropertyValues;
+ mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues;
+ rtl::OUString sCharStyleName( RTL_CONSTASCII_USTRINGPARAM("Bullet Symbols") );
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_CHAR_STYLE_NAME )), uno::makeAny( sCharStyleName ) );
+ sal_Int16 nNumberingType = style::NumberingType::CHAR_SPECIAL;
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_NUMBERING_TYPE )), uno::makeAny( nNumberingType ) );
+
+ rtl::OUString aBulletChar;
+ switch( mnTemplateType )
+ {
+ case 1:
+ {
+ aBulletChar = rtl::OUString( sal_Unicode( CHAR_CLOSED_DOT ) );
+ break;
+ }
+ case 2:
+ {
+ aBulletChar = rtl::OUString( sal_Unicode( CHAR_EMPTY_DOT ) );
+ break;
+ }
+ case 3:
+ {
+ aBulletChar = rtl::OUString( sal_Unicode( CHAR_SQUARE ) );
+ break;
+ }
+ case 4:
+ {
+ aBulletChar = rtl::OUString( sal_Unicode( CHAR_STAR_SYMBOL ) );
+ break;
+ }
+ case 5:
+ {
+ aBulletChar = rtl::OUString( sal_Unicode( CHAR_FOUR_DIAMONDS ) );
+ break;
+ }
+ case 6:
+ {
+ aBulletChar = rtl::OUString( sal_Unicode( CHAR_ARROW ) );
+ break;
+ }
+ case 7:
+ {
+ aBulletChar = rtl::OUString( sal_Unicode( CHAR_CHECK_MARK ) );
+ break;
+ }
+ default:
+ {
+ // we only support 7 types template now
+ throw css::uno::RuntimeException();
+ }
+ }
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_BULLET_CHAR )), uno::makeAny( aBulletChar ) );
+
+ mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) );
+}
+
+void SwVbaListHelper::CreateNumberListTemplate() throw( css::uno::RuntimeException )
+{
+ // there is only 1 level for each bullet list in MSWord
+ sal_Int32 nLevel = 0;
+ uno::Sequence< beans::PropertyValue > aPropertyValues;
+ mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues;
+
+ sal_Int16 nNumberingType = 0;
+ rtl::OUString sSuffix;
+ switch( mnTemplateType )
+ {
+ case 1:
+ {
+ nNumberingType = style::NumberingType::ARABIC;
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ case 2:
+ {
+ nNumberingType = style::NumberingType::ARABIC;
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 3:
+ {
+ nNumberingType = style::NumberingType::ROMAN_UPPER;
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ case 4:
+ {
+ nNumberingType = style::NumberingType::CHARS_UPPER_LETTER;
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ case 5:
+ {
+ nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 6:
+ {
+ nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ case 7:
+ {
+ nNumberingType = style::NumberingType::ROMAN_LOWER;
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ default:
+ {
+ // we only support 7 types template now
+ throw css::uno::RuntimeException();
+ }
+ }
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_NUMBERING_TYPE )), uno::makeAny( nNumberingType ) );
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_SUFFIX )), uno::makeAny( sSuffix ) );
+
+ mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) );
+}
+
+void SwVbaListHelper::CreateOutlineNumberListTemplate() throw( css::uno::RuntimeException )
+{
+ switch( mnTemplateType )
+ {
+ case 1:
+ {
+ CreateOutlineNumberForType1();
+ break;
+ }
+ case 2:
+ {
+ CreateOutlineNumberForType2();
+ break;
+ }
+ case 3:
+ {
+ CreateOutlineNumberForType3();
+ break;
+ }
+ case 4:
+ {
+ CreateOutlineNumberForType4();
+ break;
+ }
+ case 5:
+ {
+ CreateOutlineNumberForType5();
+ break;
+ }
+ case 6:
+ {
+ CreateOutlineNumberForType6();
+ break;
+ }
+ case 7:
+ {
+ CreateOutlineNumberForType7();
+ break;
+ }
+ default:
+ {
+ // we only support 7 types template now
+ throw css::uno::RuntimeException();
+ }
+ }
+}
+
+void SwVbaListHelper::CreateOutlineNumberForType1() throw( css::uno::RuntimeException )
+{
+ sal_Int16 nNumberingType = 0;
+ rtl::OUString sPrefix;
+ rtl::OUString sSuffix;
+ uno::Sequence< beans::PropertyValue > aPropertyValues;
+
+ for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ )
+ {
+ mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues;
+ switch( nLevel )
+ {
+ case 0:
+ case 1:
+ {
+ nNumberingType = style::NumberingType::ARABIC;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 2:
+ {
+ nNumberingType = style::NumberingType::ROMAN_LOWER;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 3:
+ {
+ nNumberingType = style::NumberingType::ARABIC;
+ sPrefix = rtl::OUString::valueOf( sal_Unicode('(') );
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 4:
+ {
+ nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
+ sPrefix = rtl::OUString::valueOf( sal_Unicode('(') );
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 5:
+ {
+ nNumberingType = style::NumberingType::ROMAN_LOWER;
+ sPrefix = rtl::OUString::valueOf( sal_Unicode('(') );
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 6:
+ {
+ nNumberingType = style::NumberingType::ARABIC;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ case 7:
+ {
+ nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ case 8:
+ {
+ nNumberingType = style::NumberingType::ROMAN_LOWER;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException();
+ }
+ }
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_NUMBERING_TYPE )), uno::makeAny( nNumberingType ) );
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_PREFIX )), uno::makeAny( sPrefix ) );
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_SUFFIX )), uno::makeAny( sSuffix ) );
+ mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) );
+ }
+}
+
+void SwVbaListHelper::CreateOutlineNumberForType2() throw( css::uno::RuntimeException )
+{
+ sal_Int16 nNumberingType = style::NumberingType::ARABIC;
+ sal_Int16 nParentNumbering = 0;
+ rtl::OUString sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ uno::Sequence< beans::PropertyValue > aPropertyValues;
+
+ for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ )
+ {
+ mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues;
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_NUMBERING_TYPE )), uno::makeAny( nNumberingType ) );
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_SUFFIX )), uno::makeAny( sSuffix ) );
+ if( nLevel != 0 )
+ {
+ nParentNumbering = sal_Int16( nLevel - 1 );
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_PARENT_NUMBERING )), uno::makeAny( nParentNumbering ) );
+ }
+ mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) );
+ }
+}
+
+void SwVbaListHelper::CreateOutlineNumberForType3() throw( css::uno::RuntimeException )
+{
+ sal_Int16 nNumberingType = style::NumberingType::CHAR_SPECIAL;
+ rtl::OUString sCharStyleName( RTL_CONSTASCII_USTRINGPARAM("Bullet Symbols") );
+ rtl::OUString aBulletChar;
+ uno::Sequence< beans::PropertyValue > aPropertyValues;
+
+ for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ )
+ {
+ mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues;
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_NUMBERING_TYPE )), uno::makeAny( nNumberingType ) );
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_CHAR_STYLE_NAME )), uno::makeAny( sCharStyleName ) );
+ switch( nLevel )
+ {
+ case 0:
+ {
+ aBulletChar = rtl::OUString( sal_Unicode( CHAR_FOUR_DIAMONDS ) );
+ break;
+ }
+ case 1:
+ case 5:
+ {
+ aBulletChar = rtl::OUString( sal_Unicode( CHAR_ARROW ) );
+ break;
+ }
+ case 2:
+ case 6:
+ {
+ aBulletChar = rtl::OUString( sal_Unicode( CHAR_SQUARE ) );
+ break;
+ }
+ case 3:
+ case 7:
+ {
+ aBulletChar = rtl::OUString( sal_Unicode( CHAR_CLOSED_DOT ) );
+ break;
+ }
+ case 4:
+ case 8:
+ {
+ aBulletChar = rtl::OUString( sal_Unicode( CHAR_DIAMOND ) );
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException();
+ }
+ }
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_BULLET_CHAR )), uno::makeAny( aBulletChar ) );
+ mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) );
+ }
+}
+
+void SwVbaListHelper::CreateOutlineNumberForType4() throw( css::uno::RuntimeException )
+{
+ sal_Int16 nNumberingType = 0;
+ rtl::OUString sPrefix;
+ rtl::OUString sSuffix;
+ uno::Sequence< beans::PropertyValue > aPropertyValues;
+
+ for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ )
+ {
+ mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues;
+ switch( nLevel )
+ {
+ case 0:
+ {
+ nNumberingType = style::NumberingType::ROMAN_UPPER;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ case 1:
+ {
+ nNumberingType = style::NumberingType::ARABIC;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ sal_Int16 nParentNumbering = 0;
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_PARENT_NUMBERING )), uno::makeAny( nParentNumbering ) );
+ break;
+ }
+ case 2:
+ {
+ nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
+ sPrefix = rtl::OUString::valueOf( sal_Unicode('(') );
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 3:
+ {
+ nNumberingType = style::NumberingType::ROMAN_LOWER;
+ sPrefix = rtl::OUString::valueOf( sal_Unicode('(') );
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 4:
+ {
+ nNumberingType = style::NumberingType::ARABIC;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 5:
+ {
+ nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 6:
+ {
+ nNumberingType = style::NumberingType::ROMAN_LOWER;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 7:
+ {
+ nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ case 8:
+ {
+ nNumberingType = style::NumberingType::ROMAN_LOWER;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException();
+ }
+ }
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_NUMBERING_TYPE )), uno::makeAny( nNumberingType ) );
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_PREFIX )), uno::makeAny( sPrefix ) );
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_SUFFIX )), uno::makeAny( sSuffix ) );
+ mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) );
+ }
+}
+
+void SwVbaListHelper::CreateOutlineNumberForType5() throw( css::uno::RuntimeException )
+{
+ sal_Int16 nNumberingType = style::NumberingType::ARABIC;
+ sal_Int16 nParentNumbering = 0;
+ uno::Sequence< beans::PropertyValue > aPropertyValues;
+
+ for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ )
+ {
+ mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues;
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_NUMBERING_TYPE )), uno::makeAny( nNumberingType ) );
+ if( nLevel != 0 )
+ {
+ nParentNumbering = sal_Int16( nLevel - 1 );
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_PARENT_NUMBERING )), uno::makeAny( nParentNumbering ) );
+ }
+ mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) );
+ }
+}
+
+void SwVbaListHelper::CreateOutlineNumberForType6() throw( css::uno::RuntimeException )
+{
+ sal_Int16 nNumberingType = 0;
+ rtl::OUString sPrefix;
+ rtl::OUString sSuffix;
+ uno::Sequence< beans::PropertyValue > aPropertyValues;
+
+ for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ )
+ {
+ mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues;
+ switch( nLevel )
+ {
+ case 0:
+ {
+ nNumberingType = style::NumberingType::ROMAN_UPPER;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ case 1:
+ {
+ nNumberingType = style::NumberingType::CHARS_UPPER_LETTER;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ case 2:
+ {
+ nNumberingType = style::NumberingType::ARABIC;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 3:
+ {
+ nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
+ sPrefix = rtl::OUString();
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 4:
+ {
+ nNumberingType = style::NumberingType::ARABIC;
+ sPrefix = rtl::OUString::valueOf( sal_Unicode('(') );
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 5:
+ {
+ nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
+ sPrefix = rtl::OUString::valueOf( sal_Unicode('(') );
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 6:
+ {
+ nNumberingType = style::NumberingType::ROMAN_LOWER;
+ sPrefix = rtl::OUString::valueOf( sal_Unicode('(') );
+ sSuffix = rtl::OUString::valueOf( sal_Unicode(')') );
+ break;
+ }
+ case 7:
+ {
+ nNumberingType = style::NumberingType::CHARS_LOWER_LETTER;
+ sPrefix = rtl::OUString::valueOf( sal_Unicode('(') );
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ case 8:
+ {
+ nNumberingType = style::NumberingType::ROMAN_LOWER;
+ sPrefix = rtl::OUString::valueOf( sal_Unicode('(') );
+ sSuffix = rtl::OUString::valueOf( sal_Unicode('.') );
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException();
+ }
+ }
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_NUMBERING_TYPE )), uno::makeAny( nNumberingType ) );
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_PREFIX )), uno::makeAny( sPrefix ) );
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_SUFFIX )), uno::makeAny( sSuffix ) );
+ mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) );
+ }
+}
+
+void SwVbaListHelper::CreateOutlineNumberForType7() throw( css::uno::RuntimeException )
+{
+ sal_Int16 nNumberingType = style::NumberingType::ARABIC;
+ uno::Sequence< beans::PropertyValue > aPropertyValues;
+ rtl::OUString sPrefix(RTL_CONSTASCII_USTRINGPARAM("Chapter "));
+
+ for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ )
+ {
+ mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues;
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_NUMBERING_TYPE )), uno::makeAny( nNumberingType ) );
+ setOrAppendPropertyValue( aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_PREFIX )), uno::makeAny( sPrefix ) );
+ mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) );
+ }
+}
+
+uno::Any SwVbaListHelper::getPropertyValueWithNameAndLevel( sal_Int32 nLevel, const rtl::OUString& sName ) throw( css::uno::RuntimeException )
+{
+ uno::Sequence< beans::PropertyValue > aPropertyValues;
+ mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues;
+ return getPropertyValue( aPropertyValues, sName );
+}
+
+void SwVbaListHelper::setPropertyValueWithNameAndLevel( sal_Int32 nLevel, const rtl::OUString& sName, const css::uno::Any& aValue ) throw( css::uno::RuntimeException )
+{
+ uno::Sequence< beans::PropertyValue > aPropertyValues;
+ mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues;
+ setOrAppendPropertyValue( aPropertyValues, sName, aValue );
+ mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) );
+ mxStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingRules") ) , uno::makeAny( mxNumberingRules ) );
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalisthelper.hxx b/sw/source/ui/vba/vbalisthelper.hxx
new file mode 100644
index 000000000000..0e862fa0dd2c
--- /dev/null
+++ b/sw/source/ui/vba/vbalisthelper.hxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): <pflin@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef SW_VBA_LISTHELPER_HXX
+#define SW_VBA_LISTHELPER_HXX
+
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/container/XIndexReplace.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <boost/shared_ptr.hpp>
+
+
+class SwVbaListHelper;
+typedef ::boost::shared_ptr< SwVbaListHelper > SwVbaListHelperRef;
+
+class SwVbaListHelper
+{
+private:
+ css::uno::Reference< css::text::XTextDocument > mxTextDocument;
+ css::uno::Reference< css::container::XIndexReplace > mxNumberingRules;
+ css::uno::Reference< css::container::XNameContainer > mxStyleFamily;
+ css::uno::Reference< css::beans::XPropertySet > mxStyleProps;
+ sal_Int32 mnGalleryType;
+ sal_Int32 mnTemplateType;
+ rtl::OUString msStyleName;
+
+ void Init() throw( css::uno::RuntimeException );
+ void CreateListTemplate() throw( css::uno::RuntimeException );
+ void CreateBulletListTemplate() throw( css::uno::RuntimeException );
+ void CreateNumberListTemplate() throw( css::uno::RuntimeException );
+ void CreateOutlineNumberListTemplate() throw( css::uno::RuntimeException );
+ void CreateOutlineNumberForType1() throw( css::uno::RuntimeException );
+ void CreateOutlineNumberForType2() throw( css::uno::RuntimeException );
+ void CreateOutlineNumberForType3() throw( css::uno::RuntimeException );
+ void CreateOutlineNumberForType4() throw( css::uno::RuntimeException );
+ void CreateOutlineNumberForType5() throw( css::uno::RuntimeException );
+ void CreateOutlineNumberForType6() throw( css::uno::RuntimeException );
+ void CreateOutlineNumberForType7() throw( css::uno::RuntimeException );
+
+public:
+ SwVbaListHelper( const css::uno::Reference< css::text::XTextDocument >& xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType ) throw( css::uno::RuntimeException );
+
+ sal_Int32 getGalleryType() const { return mnGalleryType; }
+ css::uno::Reference< css::container::XIndexReplace > getNumberingRules() const { return mxNumberingRules; }
+ css::uno::Any getPropertyValueWithNameAndLevel( sal_Int32 nLevel, const rtl::OUString& sName ) throw( css::uno::RuntimeException );
+ void setPropertyValueWithNameAndLevel( sal_Int32 nLevel, const rtl::OUString& sName, const css::uno::Any& aValue ) throw( css::uno::RuntimeException );
+
+};
+
+#endif//SW_VBA_LISTHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalistlevel.cxx b/sw/source/ui/vba/vbalistlevel.cxx
new file mode 100644
index 000000000000..b35f7b52f590
--- /dev/null
+++ b/sw/source/ui/vba/vbalistlevel.cxx
@@ -0,0 +1,400 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbalistlevel.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <com/sun/star/style/NumberingType.hpp>
+#include <ooo/vba/word/WdListNumberStyle.hpp>
+#include <ooo/vba/word/WdTrailingCharacter.hpp>
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <ooo/vba/word/WdListLevelAlignment.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaListLevel::SwVbaListLevel( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, SwVbaListHelperRef pHelper, sal_Int32 nLevel ) throw ( uno::RuntimeException ) : SwVbaListLevel_BASE( rParent, rContext ), pListHelper( pHelper ), mnLevel( nLevel )
+{
+}
+
+SwVbaListLevel::~SwVbaListLevel()
+{
+}
+
+::sal_Int32 SAL_CALL SwVbaListLevel::getAlignment() throw (uno::RuntimeException)
+{
+ sal_Int16 nAlignment = 0;
+ pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Adjust") ) ) >>= nAlignment;
+ switch( nAlignment )
+ {
+ case text::HoriOrientation::LEFT:
+ {
+ nAlignment = word::WdListLevelAlignment::wdListLevelAlignLeft;
+ break;
+ }
+ case text::HoriOrientation::RIGHT:
+ {
+ nAlignment = word::WdListLevelAlignment::wdListLevelAlignRight;
+ break;
+ }
+ case text::HoriOrientation::CENTER:
+ {
+ nAlignment = word::WdListLevelAlignment::wdListLevelAlignCenter;
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException();
+ }
+ }
+ return nAlignment;
+}
+
+void SAL_CALL SwVbaListLevel::setAlignment( ::sal_Int32 _alignment ) throw (uno::RuntimeException)
+{
+ sal_Int16 nAlignment = text::HoriOrientation::LEFT;
+ switch( _alignment )
+ {
+ case word::WdListLevelAlignment::wdListLevelAlignLeft:
+ {
+ nAlignment = text::HoriOrientation::LEFT;
+ break;
+ }
+ case word::WdListLevelAlignment::wdListLevelAlignRight:
+ {
+ nAlignment = text::HoriOrientation::RIGHT;
+ break;
+ }
+ case word::WdListLevelAlignment::wdListLevelAlignCenter:
+ {
+ nAlignment = text::HoriOrientation::CENTER;
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException();
+ }
+ }
+ pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Adjust") ), uno::makeAny( nAlignment ) );
+}
+
+uno::Reference< ::ooo::vba::word::XFont > SAL_CALL SwVbaListLevel::getFont() throw (uno::RuntimeException)
+{
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ return uno::Reference< word::XFont >();
+}
+
+void SAL_CALL SwVbaListLevel::setFont( const uno::Reference< ::ooo::vba::word::XFont >& /*_font*/ ) throw (uno::RuntimeException)
+{
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+}
+
+::sal_Int32 SAL_CALL SwVbaListLevel::getIndex() throw (uno::RuntimeException)
+{
+ return mnLevel + 1;
+}
+
+::rtl::OUString SAL_CALL SwVbaListLevel::getLinkedStyle() throw (uno::RuntimeException)
+{
+ // TODO:
+ return rtl::OUString();
+}
+
+void SAL_CALL SwVbaListLevel::setLinkedStyle( const ::rtl::OUString& /*_linkedstyle*/ ) throw (uno::RuntimeException)
+{
+ // TODO:
+}
+
+::rtl::OUString SAL_CALL SwVbaListLevel::getNumberFormat() throw (uno::RuntimeException)
+{
+ // TODO::
+ return rtl::OUString();
+}
+
+void SAL_CALL SwVbaListLevel::setNumberFormat( const ::rtl::OUString& /*_numberformat*/ ) throw (uno::RuntimeException)
+{
+ // TODO::
+}
+
+float SAL_CALL SwVbaListLevel::getNumberPosition() throw (uno::RuntimeException)
+{
+ // indentAt + firstlineindent
+ sal_Int32 nIndentAt = 0;
+ sal_Int32 nFirstLineIndent = 0;
+ pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IndentAt") ) ) >>= nIndentAt;
+ pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstLineIndent") ) ) >>= nFirstLineIndent;
+
+ sal_Int32 nResult = nIndentAt + nFirstLineIndent;
+
+ return static_cast< float >( Millimeter::getInPoints( nResult ) );
+}
+
+void SAL_CALL SwVbaListLevel::setNumberPosition( float _numberposition ) throw (uno::RuntimeException)
+{
+ sal_Int32 nNumberPosition = Millimeter::getInHundredthsOfOneMillimeter( _numberposition );
+
+ sal_Int32 nIndentAt = 0;
+ pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IndentAt") ) ) >>= nIndentAt;
+
+ sal_Int32 nFirstLineIndent = nNumberPosition - nIndentAt;
+ pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstLineIndent") ), uno::makeAny( nFirstLineIndent ) );
+}
+
+::sal_Int32 SAL_CALL SwVbaListLevel::getNumberStyle() throw (uno::RuntimeException)
+{
+ sal_Int16 nNumberingType = 0;
+ pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingType") ) ) >>= nNumberingType;
+ switch( nNumberingType )
+ {
+ case style::NumberingType::CHAR_SPECIAL:
+ {
+ nNumberingType = word::WdListNumberStyle::wdListNumberStyleBullet;
+ break;
+ }
+ case style::NumberingType::CHARS_UPPER_LETTER:
+ {
+ nNumberingType = word::WdListNumberStyle::wdListNumberStyleUppercaseLetter;
+ break;
+ }
+ case style::NumberingType::CHARS_LOWER_LETTER:
+ {
+ nNumberingType = word::WdListNumberStyle::wdListNumberStyleLowercaseLetter;
+ break;
+ }
+ case style::NumberingType::ROMAN_UPPER:
+ {
+ nNumberingType = word::WdListNumberStyle::wdListNumberStyleUppercaseRoman;
+ break;
+ }
+ case style::NumberingType::ROMAN_LOWER:
+ {
+ nNumberingType = word::WdListNumberStyle::wdListNumberStyleLowercaseRoman;
+ break;
+ }
+ case style::NumberingType::ARABIC:
+ {
+ nNumberingType = word::WdListNumberStyle::wdListNumberStyleArabic;
+ break;
+ }
+ case style::NumberingType::NUMBER_NONE:
+ {
+ nNumberingType = word::WdListNumberStyle::wdListNumberStyleNone;
+ break;
+ }
+ case style::NumberingType::FULLWIDTH_ARABIC:
+ {
+ nNumberingType = word::WdListNumberStyle::wdListNumberStyleArabicFullWidth;
+ break;
+ }
+ case style::NumberingType::CIRCLE_NUMBER:
+ {
+ nNumberingType = word::WdListNumberStyle::wdListNumberStyleNumberInCircle;
+ break;
+ }
+ case style::NumberingType::CHARS_ARABIC:
+ {
+ nNumberingType = word::WdListNumberStyle::wdListNumberStyleCardinalText;
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+ }
+ return nNumberingType;
+}
+
+void SAL_CALL SwVbaListLevel::setNumberStyle( ::sal_Int32 _numberstyle ) throw (uno::RuntimeException)
+{
+ sal_Int16 nNumberingType = 0;
+ switch( _numberstyle )
+ {
+ case word::WdListNumberStyle::wdListNumberStyleBullet:
+ {
+ nNumberingType = style::NumberingType::CHAR_SPECIAL;
+ break;
+ }
+ case word::WdListNumberStyle::wdListNumberStyleUppercaseLetter:
+ {
+ nNumberingType = style::NumberingType::CHARS_UPPER_LETTER_N;
+ break;
+ }
+ case word::WdListNumberStyle::wdListNumberStyleLowercaseLetter:
+ {
+ nNumberingType = style::NumberingType::CHARS_LOWER_LETTER_N;
+ break;
+ }
+ case word::WdListNumberStyle::wdListNumberStyleUppercaseRoman:
+ {
+ nNumberingType = style::NumberingType::ROMAN_UPPER;
+ break;
+ }
+ case word::WdListNumberStyle::wdListNumberStyleLowercaseRoman:
+ {
+ nNumberingType = style::NumberingType::ROMAN_LOWER;
+ break;
+ }
+ case word::WdListNumberStyle::wdListNumberStyleArabic:
+ {
+ nNumberingType = style::NumberingType::ARABIC;
+ break;
+ }
+ case word::WdListNumberStyle::wdListNumberStyleNone:
+ {
+ nNumberingType = style::NumberingType::NUMBER_NONE;
+ break;
+ }
+ case word::WdListNumberStyle::wdListNumberStyleArabicFullWidth:
+ {
+ nNumberingType = style::NumberingType::FULLWIDTH_ARABIC;
+ break;
+ }
+ case word::WdListNumberStyle::wdListNumberStyleNumberInCircle:
+ {
+ nNumberingType = style::NumberingType::CIRCLE_NUMBER;
+ break;
+ }
+ case word::WdListNumberStyle::wdListNumberStyleCardinalText:
+ {
+ nNumberingType = style::NumberingType::CHARS_ARABIC;
+ break;
+ }
+ case word::WdListNumberStyle::wdListNumberStyleOrdinal:
+ case word::WdListNumberStyle::wdListNumberStyleOrdinalText:
+ case word::WdListNumberStyle::wdListNumberStyleKanji:
+ case word::WdListNumberStyle::wdListNumberStyleKanjiDigit:
+ case word::WdListNumberStyle::wdListNumberStyleAiueoHalfWidth:
+ case word::WdListNumberStyle::wdListNumberStyleIrohaHalfWidth:
+ {
+ nNumberingType = style::NumberingType::ARABIC;
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+ }
+
+ pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingType") ), uno::makeAny( nNumberingType ) );
+}
+
+::sal_Int32 SAL_CALL SwVbaListLevel::getResetOnHigher() throw (uno::RuntimeException)
+{
+ //seems not support?
+ return 0;
+}
+
+void SAL_CALL SwVbaListLevel::setResetOnHigher( ::sal_Int32 /*_resetonhigher*/ ) throw (uno::RuntimeException)
+{
+ //seems not support?
+}
+
+::sal_Int32 SAL_CALL SwVbaListLevel::getStartAt() throw (uno::RuntimeException)
+{
+ sal_Int16 nStartWith = 0;
+ pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StartWith") ) ) >>= nStartWith;
+ return nStartWith;
+}
+
+void SAL_CALL SwVbaListLevel::setStartAt( ::sal_Int32 _startat ) throw (uno::RuntimeException)
+{
+ sal_Int16 nStartWith = (sal_Int16)_startat;
+ pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StartWith") ), uno::makeAny( nStartWith ) );
+}
+
+float SAL_CALL SwVbaListLevel::getTabPosition() throw (uno::RuntimeException)
+{
+ sal_Int32 nTabPosition = 0;
+ pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ListtabStopPosition") ) ) >>= nTabPosition;
+
+ return static_cast< float >( Millimeter::getInPoints( nTabPosition ) );
+}
+
+void SAL_CALL SwVbaListLevel::setTabPosition( float _tabposition ) throw (uno::RuntimeException)
+{
+ sal_Int32 nTabPosition = Millimeter::getInHundredthsOfOneMillimeter( _tabposition );
+ pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ListtabStopPosition") ), uno::makeAny( nTabPosition ) );
+}
+
+float SAL_CALL SwVbaListLevel::getTextPosition() throw (uno::RuntimeException)
+{
+ // indentAt
+ sal_Int32 nIndentAt = 0;
+ pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IndentAt") ) ) >>= nIndentAt;
+
+ return static_cast< float >( Millimeter::getInPoints( nIndentAt ) );
+}
+
+void SAL_CALL SwVbaListLevel::setTextPosition( float _textposition ) throw (uno::RuntimeException)
+{
+ sal_Int32 nIndentAt = 0;
+ sal_Int32 nFirstLineIndent = 0;
+ pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IndentAt") ) ) >>= nIndentAt;
+ pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstLineIndent") ) ) >>= nFirstLineIndent;
+
+ sal_Int32 nAlignedAt = nIndentAt + nFirstLineIndent;
+
+ nIndentAt = Millimeter::getInHundredthsOfOneMillimeter( _textposition );
+ nFirstLineIndent = nAlignedAt - nIndentAt;
+ pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IndentAt") ), uno::makeAny( nIndentAt ) );
+ pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstLineIndent") ), uno::makeAny( nFirstLineIndent ) );
+}
+
+::sal_Int32 SAL_CALL SwVbaListLevel::getTrailingCharacter() throw (uno::RuntimeException)
+{
+ sal_Int16 nLabelFollowedBy= 0;
+ pListHelper->getPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LabelFollowedBy") ) ) >>= nLabelFollowedBy;
+
+ return nLabelFollowedBy;
+}
+
+void SAL_CALL SwVbaListLevel::setTrailingCharacter( ::sal_Int32 _trailingcharacter ) throw (uno::RuntimeException)
+{
+ sal_Int16 nLabelFollowedBy = (sal_Int16)_trailingcharacter;
+ pListHelper->setPropertyValueWithNameAndLevel( mnLevel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LabelFollowedBy") ), uno::makeAny( nLabelFollowedBy ) );
+}
+
+rtl::OUString&
+SwVbaListLevel::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaListLevel") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaListLevel::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ListLevel" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalistlevel.hxx b/sw/source/ui/vba/vbalistlevel.hxx
new file mode 100644
index 000000000000..9be001ae3ecc
--- /dev/null
+++ b/sw/source/ui/vba/vbalistlevel.hxx
@@ -0,0 +1,81 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_LISTLEVEL_HXX
+#define SW_VBA_LISTLEVEL_HXX
+
+#include <ooo/vba/word/XListLevel.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include "vbalisthelper.hxx"
+
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XListLevel > SwVbaListLevel_BASE;
+
+class SwVbaListLevel : public SwVbaListLevel_BASE
+{
+private:
+ SwVbaListHelperRef pListHelper;
+ sal_Int32 mnLevel;
+
+public:
+ SwVbaListLevel( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, SwVbaListHelperRef pHelper, sal_Int32 nLevel ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaListLevel();
+
+ // Attributes
+ virtual ::sal_Int32 SAL_CALL getAlignment() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAlignment( ::sal_Int32 _alignment ) throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ::ooo::vba::word::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setFont( const css::uno::Reference< ::ooo::vba::word::XFont >& _font ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getIndex() throw (css::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getLinkedStyle() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLinkedStyle( const ::rtl::OUString& _linkedstyle ) throw (css::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getNumberFormat() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setNumberFormat( const ::rtl::OUString& _numberformat ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL getNumberPosition() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setNumberPosition( float _numberposition ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getNumberStyle() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setNumberStyle( ::sal_Int32 _numberstyle ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getResetOnHigher() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setResetOnHigher( ::sal_Int32 _resetonhigher ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getStartAt() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setStartAt( ::sal_Int32 _startat ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL getTabPosition() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setTabPosition( float _tabposition ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL getTextPosition() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setTextPosition( float _textposition ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getTrailingCharacter() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setTrailingCharacter( ::sal_Int32 _trailingcharacter ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_LISTLEVEL_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalistlevels.cxx b/sw/source/ui/vba/vbalistlevels.cxx
new file mode 100644
index 000000000000..2c1301127dd1
--- /dev/null
+++ b/sw/source/ui/vba/vbalistlevels.cxx
@@ -0,0 +1,118 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbalistlevels.hxx"
+#include "vbalistlevel.hxx"
+#include <ooo/vba/word/WdListGalleryType.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+class ListLevelsEnumWrapper : public EnumerationHelper_BASE
+{
+ SwVbaListLevels* pListLevels;
+ sal_Int32 nIndex;
+public:
+ ListLevelsEnumWrapper( SwVbaListLevels* pLevels ) : pListLevels( pLevels ), nIndex( 1 ) {}
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( nIndex <= pListLevels->getCount() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( nIndex <= pListLevels->getCount() )
+ return pListLevels->Item( uno::makeAny( nIndex++ ), uno::Any() );
+ throw container::NoSuchElementException();
+ }
+};
+
+SwVbaListLevels::SwVbaListLevels( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, SwVbaListHelperRef pHelper ) throw (uno::RuntimeException) : SwVbaListLevels_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >() ), pListHelper( pHelper )
+{
+}
+
+::sal_Int32 SAL_CALL SwVbaListLevels::getCount() throw (uno::RuntimeException)
+{
+ sal_Int32 nGalleryType = pListHelper->getGalleryType();
+ if( nGalleryType == word::WdListGalleryType::wdBulletGallery
+ || nGalleryType == word::WdListGalleryType::wdNumberGallery )
+ return 1;
+ else if( nGalleryType == word::WdListGalleryType::wdOutlineNumberGallery )
+ return 9;
+ return 0;
+}
+
+uno::Any SAL_CALL SwVbaListLevels::Item( const uno::Any& Index1, const uno::Any& /*not processed in this base class*/ ) throw (uno::RuntimeException)
+{
+ sal_Int32 nIndex = 0;
+ if( ( Index1 >>= nIndex ) == sal_False )
+ throw uno::RuntimeException();
+ if( nIndex <=0 || nIndex > getCount() )
+ throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Index out of bounds") ), uno::Reference< uno::XInterface >() );
+
+ return uno::makeAny( uno::Reference< word::XListLevel >( new SwVbaListLevel( this, mxContext, pListHelper, nIndex - 1 ) ) );
+}
+
+// XEnumerationAccess
+uno::Type
+SwVbaListLevels::getElementType() throw (uno::RuntimeException)
+{
+ return word::XListLevel::static_type(0);
+}
+
+uno::Reference< container::XEnumeration >
+SwVbaListLevels::createEnumeration() throw (uno::RuntimeException)
+{
+ return new ListLevelsEnumWrapper( this );
+}
+
+uno::Any
+SwVbaListLevels::createCollectionObject( const css::uno::Any& aSource )
+{
+ return aSource;
+}
+
+rtl::OUString&
+SwVbaListLevels::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaListLevels") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+SwVbaListLevels::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ListLevels") );
+ }
+ return sNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalistlevels.hxx b/sw/source/ui/vba/vbalistlevels.hxx
new file mode 100644
index 000000000000..595c0fb34bf2
--- /dev/null
+++ b/sw/source/ui/vba/vbalistlevels.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_LISTLEVELS_HXX
+#define SW_VBA_LISTLEVELS_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XListLevels.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include "vbalisthelper.hxx"
+
+
+typedef CollTestImplHelper< ooo::vba::word::XListLevels > SwVbaListLevels_BASE;
+
+class SwVbaListLevels : public SwVbaListLevels_BASE
+{
+private:
+ SwVbaListHelperRef pListHelper;
+
+public:
+ SwVbaListLevels( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, SwVbaListHelperRef pHelper ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaListLevels() {}
+
+ virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& /*not processed in this base class*/ ) throw ( css::uno::RuntimeException );
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaListLevels_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_LISTLEVELS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalisttemplate.cxx b/sw/source/ui/vba/vbalisttemplate.cxx
new file mode 100644
index 000000000000..49305c74e5a5
--- /dev/null
+++ b/sw/source/ui/vba/vbalisttemplate.cxx
@@ -0,0 +1,79 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbalisttemplate.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include "vbalistlevels.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaListTemplate::SwVbaListTemplate( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType ) throw ( uno::RuntimeException ) : SwVbaListTemplate_BASE( rParent, rContext )
+{
+ pListHelper.reset( new SwVbaListHelper( xTextDoc, nGalleryType, nTemplateType ) );
+}
+
+SwVbaListTemplate::~SwVbaListTemplate()
+{
+}
+
+uno::Any SAL_CALL
+SwVbaListTemplate::ListLevels( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< XCollection > xCol( new SwVbaListLevels( mxParent, mxContext, pListHelper ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+void SwVbaListTemplate::applyListTemplate( uno::Reference< beans::XPropertySet >& xProps ) throw (uno::RuntimeException)
+{
+ uno::Reference< container::XIndexReplace > xNumberingRules = pListHelper->getNumberingRules();
+ xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingRules") ) , uno::makeAny( xNumberingRules ) );
+}
+
+rtl::OUString&
+SwVbaListTemplate::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaListTemplate") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaListTemplate::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ListTemplate" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalisttemplate.hxx b/sw/source/ui/vba/vbalisttemplate.hxx
new file mode 100644
index 000000000000..d876cffb0300
--- /dev/null
+++ b/sw/source/ui/vba/vbalisttemplate.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_LISTTEMPLATE_HXX
+#define SW_VBA_LISTTEMPLATE_HXX
+
+#include <ooo/vba/word/XListTemplate.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include "vbalisthelper.hxx"
+
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XListTemplate > SwVbaListTemplate_BASE;
+
+class SwVbaListTemplate : public SwVbaListTemplate_BASE
+{
+private:
+ SwVbaListHelperRef pListHelper;
+
+public:
+ SwVbaListTemplate( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaListTemplate();
+
+ void applyListTemplate( css::uno::Reference< css::beans::XPropertySet >& xProps ) throw ( css::uno::RuntimeException );
+
+ // Methods
+ virtual css::uno::Any SAL_CALL ListLevels( const css::uno::Any& index ) throw ( css::uno::RuntimeException );
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_LISTTEMPLATE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalisttemplates.cxx b/sw/source/ui/vba/vbalisttemplates.cxx
new file mode 100644
index 000000000000..e54aa1637291
--- /dev/null
+++ b/sw/source/ui/vba/vbalisttemplates.cxx
@@ -0,0 +1,112 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbalisttemplates.hxx"
+#include "vbalisttemplate.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+class ListTemplatesEnumWrapper : public EnumerationHelper_BASE
+{
+ SwVbaListTemplates* pListTemplates;
+ sal_Int32 nIndex;
+public:
+ ListTemplatesEnumWrapper( SwVbaListTemplates* pTemplates ) : pListTemplates( pTemplates ), nIndex( 1 ) {}
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( nIndex <= pListTemplates->getCount() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( nIndex <= pListTemplates->getCount() )
+ return pListTemplates->Item( uno::makeAny( nIndex++ ), uno::Any() );
+ throw container::NoSuchElementException();
+ }
+};
+
+SwVbaListTemplates::SwVbaListTemplates( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextDocument >& xTextDoc, sal_Int32 nType ) throw (uno::RuntimeException) : SwVbaListTemplates_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >() ), mxTextDocument( xTextDoc ), mnGalleryType( nType )
+{
+}
+
+::sal_Int32 SAL_CALL SwVbaListTemplates::getCount() throw (uno::RuntimeException)
+{
+ // 3 types of list( bullet, numbered and outline )
+ return 7;
+}
+
+uno::Any SAL_CALL SwVbaListTemplates::Item( const uno::Any& Index1, const uno::Any& /*not processed in this base class*/ ) throw (uno::RuntimeException)
+{
+ sal_Int32 nIndex = 0;
+ if( ( Index1 >>= nIndex ) == sal_False )
+ throw uno::RuntimeException();
+ if( nIndex <=0 || nIndex > getCount() )
+ throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Index out of bounds") ), uno::Reference< uno::XInterface >() );
+
+ return uno::makeAny( uno::Reference< word::XListTemplate >( new SwVbaListTemplate( this, mxContext, mxTextDocument, mnGalleryType, nIndex ) ) );
+}
+
+// XEnumerationAccess
+uno::Type
+SwVbaListTemplates::getElementType() throw (uno::RuntimeException)
+{
+ return word::XListTemplate::static_type(0);
+}
+
+uno::Reference< container::XEnumeration >
+SwVbaListTemplates::createEnumeration() throw (uno::RuntimeException)
+{
+ return new ListTemplatesEnumWrapper( this );
+}
+
+uno::Any
+SwVbaListTemplates::createCollectionObject( const css::uno::Any& aSource )
+{
+ return aSource;
+}
+
+rtl::OUString&
+SwVbaListTemplates::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaListTemplates") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+SwVbaListTemplates::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.ListTemplates") );
+ }
+ return sNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbalisttemplates.hxx b/sw/source/ui/vba/vbalisttemplates.hxx
new file mode 100644
index 000000000000..a42137984899
--- /dev/null
+++ b/sw/source/ui/vba/vbalisttemplates.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_LISTTEMPLATES_HXX
+#define SW_VBA_LISTTEMPLATES_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XListTemplates.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/text/XTextDocument.hpp>
+
+typedef CollTestImplHelper< ooo::vba::word::XListTemplates > SwVbaListTemplates_BASE;
+
+class SwVbaListTemplates : public SwVbaListTemplates_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextDocument > mxTextDocument;
+ sal_Int32 mnGalleryType;
+
+public:
+ SwVbaListTemplates( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextDocument >& xTextDoc, sal_Int32 nType ) throw (css::uno::RuntimeException);
+ virtual ~SwVbaListTemplates() {}
+
+ virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& /*not processed in this base class*/ ) throw ( css::uno::RuntimeException );
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaListTemplates_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_LISTTEMPLATES_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaoptions.cxx b/sw/source/ui/vba/vbaoptions.cxx
index d59d0326cf5e..47a81de0da0f 100644
--- a/sw/source/ui/vba/vbaoptions.cxx
+++ b/sw/source/ui/vba/vbaoptions.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,7 +104,7 @@ void SwVbaOptions::setValueEvent( const uno::Any& value )
value >>= sNewPath;
rtl::OUString sNewPathUrl;
::osl::File::getFileURLFromSystemPath( sNewPath, sNewPathUrl );
- uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.PathSettings") ), uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSettings")) ), uno::UNO_QUERY_THROW );
rtl::OUString sOldPathUrl;
xPathSettings->getPropertyValue( msDefaultFilePath ) >>= sOldPathUrl;
// path could be a multipath, Microsoft doesn't support this feature in Word currently
@@ -118,7 +119,7 @@ void SwVbaOptions::setValueEvent( const uno::Any& value )
uno::Any SwVbaOptions::getValueEvent()
{
- uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.PathSettings") ), uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSettings")) ), uno::UNO_QUERY_THROW );
rtl::OUString sPathUrl;
xPathSettings->getPropertyValue( msDefaultFilePath ) >>= sPathUrl;
// path could be a multipath, Microsoft doesn't support this feature in Word currently
@@ -282,3 +283,5 @@ SwVbaOptions::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaoptions.hxx b/sw/source/ui/vba/vbaoptions.hxx
index ec1f70068e48..7ef21fd3b406 100644
--- a/sw/source/ui/vba/vbaoptions.hxx
+++ b/sw/source/ui/vba/vbaoptions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,3 +86,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_OPTIONS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx
index 1cdda8152207..c0f1bf6dad20 100644
--- a/sw/source/ui/vba/vbapagesetup.cxx
+++ b/sw/source/ui/vba/vbapagesetup.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -144,7 +145,7 @@ void SAL_CALL SwVbaPageSetup::setFooterDistance( double _footerdistance ) throw
sal_Bool SAL_CALL SwVbaPageSetup::getDifferentFirstPageHeaderFooter() throw (uno::RuntimeException)
{
rtl::OUString pageStyle = getStyleOfFirstPage();
- if( pageStyle.equalsAscii( "First Page" ) )
+ if( pageStyle.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "First Page" ) ) )
return sal_True;
return sal_False;
@@ -236,10 +237,9 @@ rtl::OUString SwVbaPageSetup::getStyleOfFirstPage() throw (uno::RuntimeException
sal_Int32 wdSectionStart = word::WdSectionStart::wdSectionNewPage;
uno::Reference< container::XNamed > xNamed( mxPageProps, uno::UNO_QUERY_THROW );
rtl::OUString sStyleName = xNamed->getName();
- //mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ) ) >>= sStyleName;
- if( sStyleName.equalsAscii("Left Page") )
+ if( sStyleName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Left Page")) )
wdSectionStart = word::WdSectionStart::wdSectionEvenPage;
- else if( sStyleName.equalsAscii("Right Page") )
+ else if( sStyleName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Right Page")) )
wdSectionStart = word::WdSectionStart::wdSectionOddPage;
else
wdSectionStart = word::WdSectionStart::wdSectionNewPage;
@@ -270,3 +270,5 @@ SwVbaPageSetup::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbapagesetup.hxx b/sw/source/ui/vba/vbapagesetup.hxx
index df7c59a728ce..243ffca33e28 100644
--- a/sw/source/ui/vba/vbapagesetup.hxx
+++ b/sw/source/ui/vba/vbapagesetup.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbapalette.cxx b/sw/source/ui/vba/vbapalette.cxx
index 12554e792e5e..3639d0e63638 100644
--- a/sw/source/ui/vba/vbapalette.cxx
+++ b/sw/source/ui/vba/vbapalette.cxx
@@ -1,8 +1,10 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "vbapalette.hxx"
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <ooo/vba/word/WdColor.hpp>
#include <ooo/vba/word/WdColorIndex.hpp>
+#include <sal/macros.h>
using namespace ::ooo::vba;
using namespace ::ooo::vba::word;
@@ -39,7 +41,7 @@ public:
// Methods XIndexAccess
virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException)
{
- return sizeof(ColorTable) / sizeof(ColorTable[0]);
+ return SAL_N_ELEMENTS(ColorTable);
}
virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
@@ -73,3 +75,4 @@ VbaPalette::getPalette() const
return mxPalette;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbapalette.hxx b/sw/source/ui/vba/vbapalette.hxx
index 6179f1723c0b..8d6d63f2dd3a 100644
--- a/sw/source/ui/vba/vbapalette.hxx
+++ b/sw/source/ui/vba/vbapalette.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef VBAPALETTE_HXX
#define VBAPALETTE_HXX
#include <vbahelper/vbahelper.hxx>
@@ -13,3 +14,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbapane.cxx b/sw/source/ui/vba/vbapane.cxx
index dc5d5ccff882..2db1d8a27850 100644
--- a/sw/source/ui/vba/vbapane.cxx
+++ b/sw/source/ui/vba/vbapane.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,4 @@ SwVbaPane::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbapane.hxx b/sw/source/ui/vba/vbapane.hxx
index b8a6fff38da3..e496272bbed6 100644
--- a/sw/source/ui/vba/vbapane.hxx
+++ b/sw/source/ui/vba/vbapane.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_PANE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbapanes.cxx b/sw/source/ui/vba/vbapanes.cxx
index b536c800a854..a69eb236a219 100644
--- a/sw/source/ui/vba/vbapanes.cxx
+++ b/sw/source/ui/vba/vbapanes.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -122,3 +123,5 @@ SwVbaPanes::getServiceNames()
}
return sNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbapanes.hxx b/sw/source/ui/vba/vbapanes.hxx
index 76c24166cfa7..82fa5391bb25 100644
--- a/sw/source/ui/vba/vbapanes.hxx
+++ b/sw/source/ui/vba/vbapanes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,5 @@ public:
};
#endif /* SW_VBA_PANES_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaparagraph.cxx b/sw/source/ui/vba/vbaparagraph.cxx
index 333fd4ca9a98..1861f316cf87 100644
--- a/sw/source/ui/vba/vbaparagraph.cxx
+++ b/sw/source/ui/vba/vbaparagraph.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,6 +49,20 @@ SwVbaParagraph::getRange( ) throw ( uno::RuntimeException )
return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, mxTextDocument, mxTextRange->getStart(), mxTextRange->getEnd(), mxTextRange->getText(), sal_True ) );
}
+uno::Any SAL_CALL
+SwVbaParagraph::getStyle( ) throw ( uno::RuntimeException )
+{
+ uno::Reference< word::XRange > xRange = getRange();
+ return xRange->getStyle();
+}
+
+void SAL_CALL
+SwVbaParagraph::setStyle( const uno::Any& style ) throw ( uno::RuntimeException )
+{
+ uno::Reference< word::XRange > xRange = getRange();
+ xRange->setStyle( style );
+}
+
rtl::OUString&
SwVbaParagraph::getServiceImplName()
{
@@ -67,8 +82,6 @@ SwVbaParagraph::getServiceNames()
return aServiceNames;
}
-
-//typedef ::cppu::WeakImplHelper1< container::XEnumeration > ParagraphEnumeration_BASE;
typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XEnumerationAccess > ParagraphCollectionHelper_BASE;
class ParagraphCollectionHelper : public ParagraphCollectionHelper_BASE
@@ -172,3 +185,5 @@ SwVbaParagraphs::getServiceNames()
}
return sNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaparagraph.hxx b/sw/source/ui/vba/vbaparagraph.hxx
index 894ac61cc7e6..c7b185690cfc 100644
--- a/sw/source/ui/vba/vbaparagraph.hxx
+++ b/sw/source/ui/vba/vbaparagraph.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,6 +51,8 @@ public:
// XParagraph
virtual css::uno::Reference< ooo::vba::word::XRange > SAL_CALL getRange() throw ( css::uno::RuntimeException );
+ virtual css::uno::Any SAL_CALL getStyle() throw ( css::uno::RuntimeException );
+ virtual void SAL_CALL setStyle( const css::uno::Any& style ) throw ( css::uno::RuntimeException );
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
@@ -79,3 +82,5 @@ public:
};
#endif /* SW_VBA_PARAGRAPH_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx
index 07a822ad5752..1fcd264b129a 100644
--- a/sw/source/ui/vba/vbaparagraphformat.cxx
+++ b/sw/source/ui/vba/vbaparagraphformat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,6 +35,7 @@
#include <ooo/vba/word/WdOutlineLevel.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <com/sun/star/style/BreakType.hpp>
+#include "vbatabstops.hxx"
using namespace ::ooo::vba;
@@ -200,9 +202,12 @@ sal_Int32 SAL_CALL SwVbaParagraphFormat::getOutlineLevel() throw (uno::RuntimeEx
return nLevel;
}
-void SAL_CALL SwVbaParagraphFormat::setOutlineLevel( sal_Int32 /*_outlinelevel*/ ) throw (uno::RuntimeException)
+void SAL_CALL SwVbaParagraphFormat::setOutlineLevel( sal_Int32 _outlinelevel ) throw (uno::RuntimeException)
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ if( _outlinelevel != getOutlineLevel() )
+ {
+ // TODO: in my test in msword, there is no effect for this function.
+ }
}
uno::Any SAL_CALL SwVbaParagraphFormat::getPageBreakBefore() throw (uno::RuntimeException)
@@ -296,7 +301,7 @@ void SAL_CALL SwVbaParagraphFormat::setRightIndent( float _rightindent ) throw (
uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() throw (uno::RuntimeException)
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ return uno::makeAny( uno::Reference< word::XTabStops >( new SwVbaTabStops( this, mxContext, mxParaProps ) ) );
}
void SAL_CALL SwVbaParagraphFormat::setTabStops( const uno::Any& /*_tabstops*/ ) throw (uno::RuntimeException)
@@ -571,3 +576,4 @@ SwVbaParagraphFormat::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaparagraphformat.hxx b/sw/source/ui/vba/vbaparagraphformat.hxx
index 684390820e13..c827cd40bffa 100644
--- a/sw/source/ui/vba/vbaparagraphformat.hxx
+++ b/sw/source/ui/vba/vbaparagraphformat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_PARAGRAPHFORMAT_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx
index 647aedb34791..f58f7ab89be3 100644
--- a/sw/source/ui/vba/vbarange.cxx
+++ b/sw/source/ui/vba/vbarange.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,12 +33,21 @@
#include <com/sun/star/style/BreakType.hpp>
#include <com/sun/star/text/ControlCharacter.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
-#include "wordvbahelper.hxx"
+#include <com/sun/star/text/XTextRangeCompare.hpp>
+#include <com/sun/star/text/XWordCursor.hpp>
+#include <com/sun/star/text/XParagraphCursor.hpp>
+#include <ooo/vba/word/WdUnits.hpp>
+#include <ooo/vba/word/WdMovementType.hpp>
#include "vbaparagraphformat.hxx"
#include "vbastyle.hxx"
#include "vbafont.hxx"
#include "vbapalette.hxx"
#include "vbapagesetup.hxx"
+#include "vbalistformat.hxx"
+#include "vbarevisions.hxx"
+#include "vbabookmarks.hxx"
+#include "vbasections.hxx"
+#include "vbafield.hxx"
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -70,6 +80,8 @@ void SwVbaRange::initialize( const uno::Reference< text::XTextRange >& rStart, c
}
mxTextCursor = SwVbaRangeHelper::initCursor( rStart, mxText );
+ if( !mxTextCursor.is() )
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Fails to create text cursor") ), uno::Reference< uno::XInterface >() );
mxTextCursor->collapseToStart();
if( rEnd.is() )
@@ -84,13 +96,7 @@ SwVbaRange::getXTextRange() throw (uno::RuntimeException)
uno::Reference< text::XTextRange > xTextRange( mxTextCursor, uno::UNO_QUERY_THROW );
return xTextRange;
}
-#ifdef TOMORROW
-void SwVbaRange::setXTextRange( const uno::Reference< text::XTextRange >& xRange ) throw (uno::RuntimeException)
-{
- mxTextCursor->gotoRange( xRange->getStart(), sal_False );
- mxTextCursor->gotoRange( xRange->getEnd(), sal_True );
-}
-#endif
+
/**
* The complexity in this method is because we need to workaround
* an issue that the last paragraph in a document does not have a trailing CRLF.
@@ -128,17 +134,46 @@ SwVbaRange::getText() throw ( uno::RuntimeException )
void SAL_CALL
SwVbaRange::setText( const rtl::OUString& rText ) throw ( uno::RuntimeException )
{
+ // Emulate the MSWord behavior, Don't delete the bookmark
+ // which contains no text string in current inserting position,
+ rtl::OUString sName;
+ uno::Reference< text::XTextRange > xRange( mxTextCursor, uno::UNO_QUERY_THROW );
+ try
+ {
+ uno::Reference< text::XTextContent > xBookmark = SwVbaRangeHelper::findBookmarkByPosition( mxTextDocument, xRange->getStart() );
+ if( xBookmark.is() )
+ {
+ uno::Reference< container::XNamed > xNamed( xBookmark, uno::UNO_QUERY_THROW );
+ sName = xNamed->getName();
+ }
+ }
+ catch( uno::Exception& )
+ {
+ // do nothing
+ }
+
if( rText.indexOf( '\n' ) != -1 )
{
mxTextCursor->setString( rtl::OUString() );
// process CR in strings
- uno::Reference< text::XTextRange > xRange( mxTextCursor, uno::UNO_QUERY_THROW );
SwVbaRangeHelper::insertString( xRange, mxText, rText, sal_True );
}
else
{
mxTextCursor->setString( rText );
}
+
+ // insert the bookmark if the bookmark is deleted during setting text string
+ if( sName.getLength() )
+ {
+ uno::Reference< text::XBookmarksSupplier > xBookmarksSupplier( mxTextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xNameAccess( xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY_THROW );
+ if( !xNameAccess->hasByName( sName ) )
+ {
+ uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
+ SwVbaBookmarks::addBookmarkByName( xModel, sName, xRange->getStart() );
+ }
+ }
}
// FIXME: test is not pass
@@ -229,11 +264,8 @@ SwVbaRange::setParagraphFormat( const uno::Reference< word::XParagraphFormat >&
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
}
-uno::Reference< word::XStyle > SAL_CALL
-SwVbaRange::getStyle() throw ( uno::RuntimeException )
+void SwVbaRange::GetStyleInfo(rtl::OUString& aStyleName, rtl::OUString& aStyleType ) throw ( uno::RuntimeException )
{
- rtl::OUString aStyleName;
- rtl::OUString aStyleType;
uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW );
if( ( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharStyleName") ) ) >>= aStyleName ) && aStyleName.getLength() )
{
@@ -247,14 +279,23 @@ SwVbaRange::getStyle() throw ( uno::RuntimeException )
{
DebugHelper::exception( SbERR_INTERNAL_ERROR, rtl::OUString() );
}
+}
+
+uno::Any SAL_CALL
+SwVbaRange::getStyle() throw ( uno::RuntimeException )
+{
+ rtl::OUString aStyleName;
+ rtl::OUString aStyleType;
+ GetStyleInfo( aStyleName, aStyleType );
uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( mxTextDocument, uno::UNO_QUERY_THROW);
uno::Reference< container::XNameAccess > xStylesAccess( xStyleSupplier->getStyleFamilies()->getByName( aStyleType ), uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xStyleProps( xStylesAccess->getByName( aStyleName ), uno::UNO_QUERY_THROW );
- return uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, xStyleProps ) );
+ uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, xModel, xStyleProps ) ) );
}
void SAL_CALL
-SwVbaRange::setStyle( const uno::Reference< word::XStyle >& rStyle ) throw ( uno::RuntimeException )
+SwVbaRange::setStyle( const uno::Any& rStyle ) throw ( uno::RuntimeException )
{
uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
SwVbaStyle::setStyle( xParaProps, rStyle );
@@ -267,6 +308,12 @@ SwVbaRange::getFont() throw ( uno::RuntimeException )
return new SwVbaFont( mxParent, mxContext, aColors.getPalette(), uno::Reference< beans::XPropertySet >( getXTextRange(), uno::UNO_QUERY_THROW ) );
}
+uno::Reference< word::XListFormat > SAL_CALL
+SwVbaRange::getListFormat() throw ( uno::RuntimeException )
+{
+ return uno::Reference< word::XListFormat >( new SwVbaListFormat( this, mxContext, getXTextRange() ) );
+}
+
::sal_Int32 SAL_CALL SwVbaRange::getLanguageID() throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
@@ -324,6 +371,50 @@ void SAL_CALL SwVbaRange::setEnd( ::sal_Int32 _end ) throw (uno::RuntimeExceptio
mxTextCursor->gotoRange( xEnd, sal_True );
}
+::sal_Bool SAL_CALL SwVbaRange::InRange( const uno::Reference< ::ooo::vba::word::XRange >& Range ) throw (uno::RuntimeException)
+{
+ SwVbaRange* pRange = dynamic_cast< SwVbaRange* >( Range.get() );
+ if( !pRange )
+ throw uno::RuntimeException();
+ uno::Reference< text::XTextRange > xTextRange = pRange->getXTextRange();
+ uno::Reference< text::XTextRangeCompare > xTRC( mxTextCursor->getText(), uno::UNO_QUERY_THROW );
+ if( xTRC->compareRegionStarts( xTextRange, getXTextRange() ) >= 0 && xTRC->compareRegionEnds( xTextRange, getXTextRange() ) <= 0 )
+ return sal_True;
+ return sal_False;
+}
+
+uno::Any SAL_CALL
+SwVbaRange::Revisions( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< text::XTextRange > xTextRange = getXTextRange();
+ uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xCol( new SwVbaRevisions( mxParent, mxContext, xModel, xTextRange ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
+SwVbaRange::Sections( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< text::XTextRange > xTextRange = getXTextRange();
+ uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xCol( new SwVbaSections( mxParent, mxContext, xModel, xTextRange ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
+SwVbaRange::Fields( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ //FIXME: should be get the field in current range
+ uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xCol( new SwVbaFields( mxParent, mxContext, xModel ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
rtl::OUString&
SwVbaRange::getServiceImplName()
{
@@ -343,3 +434,4 @@ SwVbaRange::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbarange.hxx b/sw/source/ui/vba/vbarange.hxx
index 1f1b3a3bbc8b..e2a623630cb8 100644
--- a/sw/source/ui/vba/vbarange.hxx
+++ b/sw/source/ui/vba/vbarange.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,6 +36,8 @@
#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
#include <ooo/vba/word/XStyle.hpp>
+#include <ooo/vba/word/XListFormat.hpp>
+#include "wordvbahelper.hxx"
typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XRange > SwVbaRange_BASE;
@@ -48,29 +51,29 @@ private:
private:
void initialize( const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd ) throw (css::uno::RuntimeException);
+ void GetStyleInfo(rtl::OUString& aStyleName, rtl::OUString& aStyleType ) throw ( css::uno::RuntimeException );
public:
SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, sal_Bool _bMaySpanEndOfDocument = sal_False ) throw (css::uno::RuntimeException);
SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, sal_Bool _bMaySpanEndOfDocument = sal_False ) throw (css::uno::RuntimeException);
SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, const css::uno::Reference< css::text::XText >& rText, sal_Bool _bMaySpanEndOfDocument = sal_False ) throw (css::uno::RuntimeException);
virtual ~SwVbaRange();
- css::uno::Reference< css::text::XTextDocument > getDocument() { return mxTextDocument; }
+ css::uno::Reference< css::text::XTextDocument > getDocument() const { return mxTextDocument; }
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getXTextRange() throw (css::uno::RuntimeException);
-#ifdef TOMORROW
- void setXTextRange( const css::uno::Reference< css::text::XTextRange >& xRange ) throw (css::uno::RuntimeException);
-#endif
- css::uno::Reference< css::text::XText > getXText() { return mxText; }
+ css::uno::Reference< css::text::XText > getXText() const { 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);
// Attribute
virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
virtual void SAL_CALL setText( const rtl::OUString& rText ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< ooo::vba::word::XParagraphFormat > SAL_CALL getParagraphFormat() throw (css::uno::RuntimeException);
virtual void SAL_CALL setParagraphFormat( const css::uno::Reference< ooo::vba::word::XParagraphFormat >& rParagraphFormat ) throw (css::uno::RuntimeException);
- virtual css::uno::Reference< ooo::vba::word::XStyle > SAL_CALL getStyle() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setStyle( const css::uno::Reference< ooo::vba::word::XStyle >& _xStyle ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getStyle() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setStyle( const css::uno::Any& _xStyle ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< ooo::vba::word::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ooo::vba::word::XListFormat > SAL_CALL getListFormat() throw (css::uno::RuntimeException);
// Methods
virtual void SAL_CALL InsertBreak( const css::uno::Any& _breakType ) throw (css::uno::RuntimeException);
virtual void SAL_CALL Select() throw (css::uno::RuntimeException);
@@ -84,9 +87,15 @@ public:
virtual void SAL_CALL setStart( ::sal_Int32 _start ) throw (css::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getEnd() throw (css::uno::RuntimeException);
virtual void SAL_CALL setEnd( ::sal_Int32 _end ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL InRange( const css::uno::Reference< ::ooo::vba::word::XRange >& Range ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Revisions( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Sections( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Fields( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_RANGE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbarangehelper.cxx b/sw/source/ui/vba/vbarangehelper.cxx
index 4fd9e5f143f1..8e4d1f348e02 100644
--- a/sw/source/ui/vba/vbarangehelper.cxx
+++ b/sw/source/ui/vba/vbarangehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,6 +28,7 @@
#include "vbarangehelper.hxx"
#include <com/sun/star/text/ControlCharacter.hpp>
#include <com/sun/star/text/XTextRangeCompare.hpp>
+#include <com/sun/star/text/XBookmarksSupplier.hpp>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -111,7 +113,7 @@ uno::Reference< text::XTextCursor > SwVbaRangeHelper::initCursor( const uno::Ref
DebugHelper::exception(e);
}
- if( !bGotTextCursor )
+ if( !bGotTextCursor || !xTextCursor.is() )
{
try
{
@@ -125,7 +127,7 @@ uno::Reference< text::XTextCursor > SwVbaRangeHelper::initCursor( const uno::Ref
}
}
- if( !bGotTextCursor )
+ if( !bGotTextCursor || !xTextCursor.is() )
{
try
{
@@ -169,3 +171,30 @@ sal_Int32 SwVbaRangeHelper::getPosition( const uno::Reference< text::XText >& rT
return nPosition;
}
+
+uno::Reference< text::XTextContent > SwVbaRangeHelper::findBookmarkByPosition( const uno::Reference< text::XTextDocument >& xTextDoc, const uno::Reference< text::XTextRange >& xTextRange ) throw ( css::uno::RuntimeException )
+{
+ uno::Reference< text::XBookmarksSupplier > xBookmarksSupplier( xTextDoc, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xIndexAccess( xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY_THROW );
+ for( sal_Int32 index = 0; index < xIndexAccess->getCount(); index++ )
+ {
+ uno::Reference< text::XTextContent > xBookmark( xIndexAccess->getByIndex( index ), uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextRange > xBkAnchor = xBookmark->getAnchor();
+ uno::Reference< text::XTextRangeCompare > xCompare( xBkAnchor->getText(), uno::UNO_QUERY_THROW );
+ if( xCompare->compareRegionStarts( xBkAnchor->getStart(), xBkAnchor->getEnd() ) == 0 )
+ {
+ try
+ {
+ if( xCompare->compareRegionStarts( xTextRange, xBkAnchor->getStart() ) == 0 )
+ return xBookmark;
+ }
+ catch( uno::Exception& )
+ {
+ continue;
+ }
+ }
+ }
+ return uno::Reference< text::XTextContent >();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbarangehelper.hxx b/sw/source/ui/vba/vbarangehelper.hxx
index 71bdf20f94a2..29758fd5a55b 100644
--- a/sw/source/ui/vba/vbarangehelper.hxx
+++ b/sw/source/ui/vba/vbarangehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,6 +31,8 @@
#include <vbahelper/vbahelperinterface.hxx>
#include <com/sun/star/text/XTextViewCursor.hpp>
#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
class SwVbaRangeHelper
{
@@ -38,6 +41,9 @@ public:
static void insertString( css::uno::Reference< css::text::XTextRange >& rTextRange, css::uno::Reference< css::text::XText >& rText, const rtl::OUString& rStr, sal_Bool _bAbsorb ) throw ( css::uno::RuntimeException );
static css::uno::Reference< css::text::XTextCursor > initCursor( const css::uno::Reference< css::text::XTextRange >& rTextRange, const css::uno::Reference< css::text::XText >& rText ) throw ( css::uno::RuntimeException );
static sal_Int32 getPosition( const css::uno::Reference< css::text::XText >& rText, const css::uno::Reference< css::text::XTextRange >& rTextRange ) throw ( css::uno::RuntimeException );
+ static css::uno::Reference< css::text::XTextContent > findBookmarkByPosition( const css::uno::Reference< css::text::XTextDocument >& xTextDoc, const css::uno::Reference< css::text::XTextRange >& xTextRange ) throw ( css::uno::RuntimeException );
};
#endif /* SW_VBA_RANGEHELPER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbareplacement.cxx b/sw/source/ui/vba/vbareplacement.cxx
index 81f2bb193412..2cc874f17ed6 100644
--- a/sw/source/ui/vba/vbareplacement.cxx
+++ b/sw/source/ui/vba/vbareplacement.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,6 +51,12 @@ void SAL_CALL SwVbaReplacement::setText( const ::rtl::OUString& _text ) throw (u
mxPropertyReplace->setReplaceString( _text );
}
+void SAL_CALL SwVbaReplacement::ClearFormatting( ) throw (uno::RuntimeException)
+{
+ uno::Sequence< beans::PropertyValue > aPropValues;
+ mxPropertyReplace->setReplaceAttributes( aPropValues );
+}
+
rtl::OUString&
SwVbaReplacement::getServiceImplName()
{
@@ -69,3 +76,4 @@ SwVbaReplacement::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbareplacement.hxx b/sw/source/ui/vba/vbareplacement.hxx
index b257fb7a3abc..020265cf2c41 100644
--- a/sw/source/ui/vba/vbareplacement.hxx
+++ b/sw/source/ui/vba/vbareplacement.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,8 +48,13 @@ public:
virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
virtual void SAL_CALL setText( const ::rtl::OUString& _text ) throw (css::uno::RuntimeException);
+ //Methods
+ virtual void SAL_CALL ClearFormatting() throw (css::uno::RuntimeException);
+
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_REPLACEMENT_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbarevision.cxx b/sw/source/ui/vba/vbarevision.cxx
new file mode 100644
index 000000000000..5c1f0e841bce
--- /dev/null
+++ b/sw/source/ui/vba/vbarevision.cxx
@@ -0,0 +1,104 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbarevision.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <com/sun/star/document/XRedlinesSupplier.hpp>
+#include "wordvbahelper.hxx"
+#include <docsh.hxx>
+#include <doc.hxx>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaRevision::SwVbaRevision( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xRedlineProps ) throw ( uno::RuntimeException ) : SwVbaRevision_BASE( rParent, rContext ), mxModel( xModel ), mxRedlineProps( xRedlineProps )
+{
+}
+
+SwVbaRevision::~SwVbaRevision()
+{
+}
+
+sal_Int32 SwVbaRevision::GetPosition() throw (css::uno::RuntimeException)
+{
+ sal_Int32 nPos = -1;
+ uno::Reference< document::XRedlinesSupplier > xRedlinesSupp( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xRedlines( xRedlinesSupp->getRedlines(), uno::UNO_QUERY_THROW );
+ sal_Int32 nCount = xRedlines->getCount();
+ for( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ uno::Reference< beans::XPropertySet > xProps( xRedlines->getByIndex( i ), uno::UNO_QUERY_THROW );
+ if( xProps == mxRedlineProps )
+ {
+ nPos = i;
+ OSL_TRACE(" SwVbaRevision::SwVbaRevision, the redline position is %d, ", nPos );
+ break;
+ }
+ }
+ if( nPos == -1 )
+ throw uno::RuntimeException();
+
+ return nPos;
+}
+
+void SAL_CALL
+SwVbaRevision::Accept() throw ( css::uno::RuntimeException )
+{
+ SwDoc* pDoc = word::getDocShell( mxModel )->GetDoc();
+ if( pDoc )
+ pDoc->AcceptRedline( GetPosition(), sal_True );
+}
+
+void SAL_CALL
+SwVbaRevision::Reject( ) throw ( css::uno::RuntimeException )
+{
+ SwDoc* pDoc = word::getDocShell( mxModel )->GetDoc();
+ if( pDoc )
+ pDoc->RejectRedline( GetPosition(), sal_True );
+}
+
+rtl::OUString&
+SwVbaRevision::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaRevision") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaRevision::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Revision" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbarevision.hxx b/sw/source/ui/vba/vbarevision.hxx
new file mode 100644
index 000000000000..1ecadcd1f6bc
--- /dev/null
+++ b/sw/source/ui/vba/vbarevision.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_REVISION_HXX
+#define SW_VBA_REVISION_HXX
+
+#include <ooo/vba/word/XRevision.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XRevision > SwVbaRevision_BASE;
+
+class SwVbaRevision : public SwVbaRevision_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+ css::uno::Reference< css::beans::XPropertySet > mxRedlineProps;
+
+private:
+ sal_Int32 GetPosition() throw (css::uno::RuntimeException);
+
+public:
+ SwVbaRevision( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& xRedlineProps ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaRevision();
+
+ // Methods
+ virtual void SAL_CALL Accept( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Reject( ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_REVISION_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbarevisions.cxx b/sw/source/ui/vba/vbarevisions.cxx
new file mode 100644
index 000000000000..85f4d8b112ec
--- /dev/null
+++ b/sw/source/ui/vba/vbarevisions.cxx
@@ -0,0 +1,188 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbarevisions.hxx"
+#include "vbarevision.hxx"
+#include <cppuhelper/implbase2.hxx>
+#include <com/sun/star/document/XRedlinesSupplier.hpp>
+#include <com/sun/star/text/XTextRangeCompare.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+typedef ::cppu::WeakImplHelper1< container::XEnumeration > RevisionEnumeration_BASE;
+typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XEnumerationAccess > RevisionCollectionHelper_BASE;
+typedef std::vector< uno::Reference< beans::XPropertySet > > RevisionMap;
+
+class RedlinesEnumeration : public RevisionEnumeration_BASE
+{
+ RevisionMap mRevisionMap;
+ RevisionMap::iterator mIt;
+public:
+ RedlinesEnumeration( const RevisionMap& sMap ) : mRevisionMap( sMap ), mIt( mRevisionMap.begin() ) {}
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( mIt != mRevisionMap.end() );
+ }
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( !hasMoreElements() )
+ throw container::NoSuchElementException();
+ uno::Reference< beans::XPropertySet > xRevision( *mIt++ );
+ return uno::makeAny( xRevision ) ;
+ }
+};
+
+class RevisionCollectionHelper : public RevisionCollectionHelper_BASE
+{
+ RevisionMap mRevisionMap;
+public:
+RevisionCollectionHelper( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextRange >& xTextRange ) throw (uno::RuntimeException);
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return beans::XPropertySet::static_type(0); }
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { return ( mRevisionMap.size() > 0 ); }
+ // XIndexAccess
+ virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException) { return mRevisionMap.size(); }
+ virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
+ {
+ if ( Index < 0 || Index >= getCount() )
+ throw lang::IndexOutOfBoundsException();
+
+ return uno::makeAny( mRevisionMap[ Index ] );
+
+ }
+ // XEnumerationAccess
+ virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException)
+ {
+ return new RedlinesEnumeration( mRevisionMap );
+ }
+};
+
+RevisionCollectionHelper::RevisionCollectionHelper( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextRange >& xTextRange ) throw (uno::RuntimeException)
+ {
+ uno::Reference< text::XTextRangeCompare > xTRC( xTextRange->getText(), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XRedlinesSupplier > xRedlinesSupp( xModel, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xRedlines( xRedlinesSupp->getRedlines(), uno::UNO_QUERY_THROW );
+ sal_Int32 nCount = xRedlines->getCount();
+ for( sal_Int32 index = 0; index < nCount; index++ )
+ {
+ uno::Reference< text::XTextRange > xRedlineRange( xRedlines->getByIndex( index ), uno::UNO_QUERY_THROW );
+ if( xTRC->compareRegionStarts( xTextRange, xRedlineRange ) >= 0 && xTRC->compareRegionEnds( xTextRange, xRedlineRange ) <= 0 )
+ {
+ uno::Reference< beans::XPropertySet > xRedlineProps( xRedlineRange, uno::UNO_QUERY_THROW );
+ mRevisionMap.push_back( xRedlineProps );
+ }
+ }
+ }
+class RevisionsEnumeration : public EnumerationHelperImpl
+{
+ uno::Reference< frame::XModel > m_xModel;
+public:
+ RevisionsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel( xModel ) {}
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ uno::Reference< beans::XPropertySet > xRevision( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XRevision > ( new SwVbaRevision( m_xParent, m_xContext, m_xModel, xRevision ) ) );
+ }
+
+};
+
+SwVbaRevisions::SwVbaRevisions( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextRange >& xTextRange ): SwVbaRevisions_BASE( xParent, xContext, new RevisionCollectionHelper( xModel, xTextRange ) ), mxModel( xModel )
+{
+}
+
+SwVbaRevisions::SwVbaRevisions( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< container::XIndexAccess >& xIndexAccess ): SwVbaRevisions_BASE( xParent, xContext, xIndexAccess ), mxModel( xModel )
+{
+}
+
+// XEnumerationAccess
+uno::Type
+SwVbaRevisions::getElementType() throw (uno::RuntimeException)
+{
+ return word::XRevision::static_type(0);
+}
+uno::Reference< container::XEnumeration >
+SwVbaRevisions::createEnumeration() throw (uno::RuntimeException)
+{
+ uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
+ return new RevisionsEnumeration( this, mxContext, xEnumAccess->createEnumeration(), mxModel );
+}
+
+uno::Any
+SwVbaRevisions::createCollectionObject( const css::uno::Any& aSource )
+{
+ uno::Reference< beans::XPropertySet > xRevision( aSource, uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XRevision > ( new SwVbaRevision( this, mxContext, mxModel, xRevision ) ) );
+}
+
+void SAL_CALL SwVbaRevisions::AcceptAll( ) throw (css::uno::RuntimeException)
+{
+ // First we need to put all the redline into a vector, because if the redline is accepted,
+ // it will auto delete in the document.
+ std::vector< uno::Reference< word::XRevision > > aRevisions;
+ uno::Reference< container::XEnumeration > xEnumeration = createEnumeration();
+ while( xEnumeration->hasMoreElements() )
+ {
+ uno::Reference< word::XRevision > xRevision( xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
+ aRevisions.push_back( xRevision );
+ }
+
+ std::vector< uno::Reference< word::XRevision > >::iterator it = aRevisions.begin();
+ for( ; it != aRevisions.end(); ++it )
+ {
+ uno::Reference< word::XRevision > xRevision( *it );
+ xRevision->Accept();
+ }
+}
+
+void SAL_CALL SwVbaRevisions::RejectAll( ) throw (css::uno::RuntimeException)
+{
+ throw uno::RuntimeException();
+}
+
+rtl::OUString&
+SwVbaRevisions::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaRevisions") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+SwVbaRevisions::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Revisions") );
+ }
+ return sNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbarevisions.hxx b/sw/source/ui/vba/vbarevisions.hxx
new file mode 100644
index 000000000000..142bf8987b48
--- /dev/null
+++ b/sw/source/ui/vba/vbarevisions.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_PANES_HXX
+#define SW_VBA_PANES_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XRevisions.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/text/XTextRange.hpp>
+
+
+typedef CollTestImplHelper< ooo::vba::word::XRevisions > SwVbaRevisions_BASE;
+
+class SwVbaRevisions : public SwVbaRevisions_BASE
+{
+private:
+ css::uno::Reference< css::frame::XModel > mxModel;
+
+public:
+ SwVbaRevisions( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XTextRange >& xTextRange );
+
+ SwVbaRevisions( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
+ virtual ~SwVbaRevisions() {}
+
+ // Methods
+ virtual void SAL_CALL AcceptAll( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL RejectAll( ) throw (css::uno::RuntimeException);
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaRevisions_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_PANES_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbarow.cxx b/sw/source/ui/vba/vbarow.cxx
new file mode 100644
index 000000000000..7199b99f4ba7
--- /dev/null
+++ b/sw/source/ui/vba/vbarow.cxx
@@ -0,0 +1,135 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbarow.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <com/sun/star/table/XCellRange.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <ooo/vba/word/WdRowHeightRule.hpp>
+#include <ooo/vba/word/WdConstants.hpp>
+#include <rtl/ustrbuf.hxx>
+#include "wordvbahelper.hxx"
+#include "vbatablehelper.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaRow::SwVbaRow( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext,const uno::Reference< text::XTextTable >& xTextTable, sal_Int32 nIndex ) throw ( uno::RuntimeException ) :
+ SwVbaRow_BASE( rParent, rContext ), mxTextTable( xTextTable ), mnIndex( nIndex )
+{
+ mxTableRows = mxTextTable->getRows();
+ mxRowProps.set( mxTableRows->getByIndex( mnIndex ), uno::UNO_QUERY_THROW );
+}
+
+SwVbaRow::~SwVbaRow()
+{
+}
+
+uno::Any SAL_CALL SwVbaRow::getHeight() throw (css::uno::RuntimeException)
+{
+ if( getHeightRule() == word::WdRowHeightRule::wdRowHeightAuto )
+ return uno::makeAny( sal_Int32( word::WdConstants::wdUndefined ) );
+
+ sal_Int32 nHeight = 0;
+ mxRowProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Height") ) ) >>= nHeight;
+ return uno::makeAny( (float)Millimeter::getInPoints( nHeight ) );
+}
+
+void SAL_CALL SwVbaRow::setHeight( const uno::Any& _height ) throw (css::uno::RuntimeException)
+{
+ float height = 0;
+ _height >>= height;
+
+ sal_Int32 nHeight = Millimeter::getInHundredthsOfOneMillimeter( height );
+ mxRowProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Height") ), uno::makeAny( nHeight ) );
+}
+
+::sal_Int32 SAL_CALL SwVbaRow::getHeightRule() throw (css::uno::RuntimeException)
+{
+ sal_Bool isAutoHeight = sal_False;
+ mxRowProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsAutoHeight") ) ) >>= isAutoHeight;
+ return isAutoHeight ? word::WdRowHeightRule::wdRowHeightAuto : word::WdRowHeightRule::wdRowHeightExactly;
+}
+
+void SAL_CALL SwVbaRow::setHeightRule( ::sal_Int32 _heightrule ) throw (css::uno::RuntimeException)
+{
+ sal_Bool isAutoHeight = ( _heightrule == word::WdRowHeightRule::wdRowHeightAuto );
+ mxRowProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsAutoHeight") ), uno::makeAny( isAutoHeight ) );
+}
+
+void SAL_CALL
+SwVbaRow::Select( ) throw ( uno::RuntimeException )
+{
+ SelectRow( getCurrentWordDoc(mxContext), mxTextTable, mnIndex, mnIndex );
+}
+
+void SwVbaRow::SelectRow( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextTable >& xTextTable, sal_Int32 nStartRow, sal_Int32 nEndRow ) throw ( uno::RuntimeException )
+{
+ rtl::OUStringBuffer aRangeName;
+ aRangeName.appendAscii("A").append(sal_Int32( nStartRow + 1 ) );
+ SwVbaTableHelper aTableHelper( xTextTable );
+ sal_Int32 nColCount = aTableHelper.getTabColumnsCount( nEndRow );
+ // FIXME: the column count > 26
+ //sal_Char cCol = 'A' + nColCount - 1;
+ rtl::OUString sCol = aTableHelper.getColumnStr( nColCount - 1);
+ aRangeName.appendAscii(":").append( sCol ).append( sal_Int32( nEndRow + 1 ) );
+
+ uno::Reference< table::XCellRange > xCellRange( xTextTable, uno::UNO_QUERY_THROW );
+ rtl::OUString sSelRange = aRangeName.makeStringAndClear();
+ uno::Reference< table::XCellRange > xSelRange = xCellRange->getCellRangeByName( sSelRange );
+
+ uno::Reference< view::XSelectionSupplier > xSelection( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
+ xSelection->select( uno::makeAny( xSelRange ) );
+}
+
+void SAL_CALL SwVbaRow::SetHeight( float height, sal_Int32 heightrule ) throw (css::uno::RuntimeException)
+{
+ setHeightRule( heightrule );
+ setHeight( uno::makeAny( height ) );
+}
+
+rtl::OUString&
+SwVbaRow::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaRow") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaRow::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Row" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbarow.hxx b/sw/source/ui/vba/vbarow.hxx
new file mode 100644
index 000000000000..e4cf51f4e99a
--- /dev/null
+++ b/sw/source/ui/vba/vbarow.hxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_ROW_HXX
+#define SW_VBA_ROW_HXX
+
+#include <ooo/vba/word/XRow.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/table/XTableRows.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XRow > SwVbaRow_BASE;
+
+class SwVbaRow : public SwVbaRow_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextTable > mxTextTable;
+ css::uno::Reference< css::table::XTableRows > mxTableRows;
+ css::uno::Reference< css::beans::XPropertySet > mxRowProps;
+ sal_Int32 mnIndex;
+
+public:
+ SwVbaRow( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, sal_Int32 nIndex ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaRow();
+
+ // Attributes
+ virtual css::uno::Any SAL_CALL getHeight() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setHeight( const css::uno::Any& _height ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getHeightRule() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setHeightRule( ::sal_Int32 _heightrule ) throw (css::uno::RuntimeException);
+
+ // Methods
+ virtual void SAL_CALL Select( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL SetHeight( float height, sal_Int32 heightrule ) throw (css::uno::RuntimeException);
+
+ static void SelectRow( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XTextTable >& xTextTable, sal_Int32 nStartRow, sal_Int32 nEndRow ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_ROW_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx
new file mode 100644
index 000000000000..7b1f93925106
--- /dev/null
+++ b/sw/source/ui/vba/vbarows.cxx
@@ -0,0 +1,368 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbarows.hxx"
+#include "vbarow.hxx"
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
+#include <ooo/vba/word/WdRowAlignment.hpp>
+#include <ooo/vba/word/WdConstants.hpp>
+#include <ooo/vba/word/WdRulerStyle.hpp>
+#include "wordvbahelper.hxx"
+#include "vbacolumns.hxx"
+#include "vbatablehelper.hxx"
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+class RowsEnumWrapper : public EnumerationHelper_BASE
+{
+ uno::WeakReference< XHelperInterface > mxParent;
+ uno::Reference< uno::XComponentContext > mxContext;
+ uno::Reference< text::XTextTable > mxTextTable;
+ uno::Reference< container::XIndexAccess > mxIndexAccess;
+ sal_Int32 nIndex;
+
+public:
+ RowsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< text::XTextTable >& xTextTable ) : mxParent( xParent ), mxContext( xContext ), mxTextTable( xTextTable ), nIndex( 0 )
+ {
+ mxIndexAccess.set( mxTextTable->getRows(), uno::UNO_QUERY );
+ }
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( nIndex < mxIndexAccess->getCount() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if( nIndex < mxIndexAccess->getCount() )
+ {
+ return uno::makeAny( uno::Reference< word::XRow > ( new SwVbaRow( mxParent, mxContext, mxTextTable, nIndex++ ) ) );
+ }
+ throw container::NoSuchElementException();
+ }
+};
+
+SwVbaRows::SwVbaRows( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextTable >& xTextTable, const uno::Reference< table::XTableRows >& xTableRows ) throw (uno::RuntimeException) : SwVbaRows_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xTableRows, uno::UNO_QUERY_THROW ) ), mxTextTable( xTextTable ), mxTableRows( xTableRows )
+{
+ mnStartRowIndex = 0;
+ mnEndRowIndex = m_xIndexAccess->getCount() - 1;
+}
+
+SwVbaRows::SwVbaRows( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextTable >& xTextTable, const uno::Reference< table::XTableRows >& xTableRows, sal_Int32 nStarIndex, sal_Int32 nEndIndex ) throw (uno::RuntimeException) : SwVbaRows_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xTableRows, uno::UNO_QUERY_THROW ) ), mxTextTable( xTextTable ), mxTableRows( xTableRows ), mnStartRowIndex( nStarIndex ), mnEndRowIndex( nEndIndex )
+{
+ if( mnEndRowIndex < mnStartRowIndex )
+ throw uno::RuntimeException();
+}
+
+/**
+ * get the alignment of the rows: SO format com.sun.star.text.HoriOrientation
+ * is mapped to WdRowAlignment in Word
+ * @return the alignment
+ */
+::sal_Int32 SAL_CALL SwVbaRows::getAlignment() throw (uno::RuntimeException)
+{
+ sal_Int16 nAlignment = text::HoriOrientation::LEFT;
+ uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW );
+ xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HoriOrient") ) ) >>= nAlignment;
+ sal_Int32 nRet = 0;
+ switch( nAlignment )
+ {
+ case text::HoriOrientation::CENTER:
+ {
+ nRet = word::WdRowAlignment::wdAlignRowCenter;
+ break;
+ }
+ case text::HoriOrientation::RIGHT:
+ {
+ nRet = word::WdRowAlignment::wdAlignRowRight;
+ break;
+ }
+ default:
+ {
+ nRet = word::WdRowAlignment::wdAlignRowLeft;
+ }
+ }
+ return nRet;
+}
+
+void SAL_CALL SwVbaRows::setAlignment( ::sal_Int32 _alignment ) throw (uno::RuntimeException)
+{
+ sal_Int16 nAlignment = text::HoriOrientation::LEFT;
+ switch( _alignment )
+ {
+ case word::WdRowAlignment::wdAlignRowCenter:
+ {
+ nAlignment = text::HoriOrientation::CENTER;
+ break;
+ }
+ case word::WdRowAlignment::wdAlignRowRight:
+ {
+ nAlignment = text::HoriOrientation::RIGHT;
+ break;
+ }
+ default:
+ {
+ nAlignment = text::HoriOrientation::LEFT;
+ }
+ }
+ uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW );
+ xTableProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HoriOrient") ), uno::makeAny( nAlignment ) );
+}
+
+uno::Any SAL_CALL SwVbaRows::getAllowBreakAcrossPages() throw (uno::RuntimeException)
+{
+ sal_Bool bAllowBreak = sal_False;
+ uno::Reference< container::XIndexAccess > xRowsAccess( mxTableRows, uno::UNO_QUERY_THROW );
+ for( sal_Int32 index = mnStartRowIndex; index <= mnEndRowIndex; ++index )
+ {
+ uno::Reference< beans::XPropertySet > xRowProps( xRowsAccess->getByIndex( index ), uno::UNO_QUERY_THROW );
+ sal_Bool bSplit = sal_False;
+ xRowProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsSplitAllowed") ) ) >>= bSplit;
+ if( index == 0 )
+ {
+ bAllowBreak = bSplit;
+ }
+ if( bSplit != bAllowBreak )
+ {
+ sal_Int32 nRet = word::WdConstants::wdUndefined;
+ return uno::makeAny( nRet );
+ }
+ }
+ return uno::makeAny( bAllowBreak );
+}
+
+void SAL_CALL SwVbaRows::setAllowBreakAcrossPages( const uno::Any& _allowbreakacrosspages ) throw (uno::RuntimeException)
+{
+ sal_Bool bAllowBreak = sal_False;
+ _allowbreakacrosspages >>= bAllowBreak;
+ uno::Reference< container::XIndexAccess > xRowsAccess( mxTableRows, uno::UNO_QUERY_THROW );
+ for( sal_Int32 index = mnStartRowIndex; index <= mnEndRowIndex; ++index )
+ {
+ uno::Reference< beans::XPropertySet > xRowProps( xRowsAccess->getByIndex( index ), uno::UNO_QUERY_THROW );
+ xRowProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsSplitAllowed") ), uno::makeAny( bAllowBreak ) );
+ }
+}
+
+float SAL_CALL SwVbaRows::getSpaceBetweenColumns() throw (uno::RuntimeException)
+{
+ // just get the first spacing of the first cell
+ uno::Reference< table::XCellRange > xCellRange( mxTextTable, uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xCellProps( xCellRange->getCellByPosition( 0, mnStartRowIndex ), uno::UNO_QUERY_THROW );
+ sal_Int32 nLeftBorderDistance = 0;
+ sal_Int32 nRightBorderDistance = 0;
+ xCellProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftBorderDistance") ) ) >>= nLeftBorderDistance;
+ xCellProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightBorderDistance") ) ) >>= nRightBorderDistance;
+ return static_cast< float >( Millimeter::getInPoints( nLeftBorderDistance + nRightBorderDistance ) );
+}
+
+void SAL_CALL SwVbaRows::setSpaceBetweenColumns( float _spacebetweencolumns ) throw (uno::RuntimeException)
+{
+ sal_Int32 nSpace = Millimeter::getInHundredthsOfOneMillimeter( _spacebetweencolumns ) / 2;
+ uno::Reference< container::XIndexAccess > xColumnAccess( mxTextTable->getColumns(), uno::UNO_QUERY_THROW );
+ uno::Reference< table::XCellRange > xCellRange( mxTextTable, uno::UNO_QUERY_THROW );
+ SwVbaTableHelper aTableHelper( mxTextTable );
+ for( sal_Int32 row = mnStartRowIndex; row <= mnEndRowIndex; ++row )
+ {
+ sal_Int32 nColumns = aTableHelper.getTabColumnsCount( row );
+ for( sal_Int32 column = 0; column < nColumns; ++column )
+ {
+ uno::Reference< beans::XPropertySet > xCellProps( xCellRange->getCellByPosition( column, row ), uno::UNO_QUERY_THROW );
+ xCellProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftBorderDistance") ), uno::makeAny( nSpace ) );
+ xCellProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightBorderDistance") ), uno::makeAny( nSpace ) );
+ }
+ }
+}
+
+void SAL_CALL SwVbaRows::Delete( ) throw (uno::RuntimeException)
+{
+ mxTableRows->removeByIndex( mnStartRowIndex, getCount() );
+}
+
+void SAL_CALL SwVbaRows::SetLeftIndent( float LeftIndent, ::sal_Int32 RulerStyle ) throw (uno::RuntimeException)
+{
+ uno::Reference< word::XColumns > xColumns( new SwVbaColumns( getParent(), mxContext, mxTextTable, mxTextTable->getColumns() ) );
+ sal_Int32 nIndent = (sal_Int32)( LeftIndent );
+ switch( RulerStyle )
+ {
+ case word::WdRulerStyle::wdAdjustFirstColumn:
+ {
+ setIndentWithAdjustFirstColumn( xColumns, nIndent );
+ break;
+ }
+ case word::WdRulerStyle::wdAdjustNone:
+ {
+ setIndentWithAdjustNone( nIndent );
+ break;
+ }
+ case word::WdRulerStyle::wdAdjustProportional:
+ {
+ setIndentWithAdjustProportional( xColumns, nIndent );
+ break;
+ }
+ case word::WdRulerStyle::wdAdjustSameWidth:
+ {
+ setIndentWithAdjustSameWidth( xColumns, nIndent );
+ break;
+ }
+ default:
+ {
+ DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
+ }
+ }
+}
+
+void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeException)
+{
+ uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW );
+ sal_Int32 nMargin = 0;
+ xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin") ) ) >>= nMargin;
+ nMargin += indent;
+ xTableProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin") ), uno::makeAny( nMargin ) );
+}
+
+ void SwVbaRows::setIndentWithAdjustFirstColumn( const uno::Reference< word::XColumns >& xColumns, sal_Int32 indent ) throw (uno::RuntimeException)
+ {
+ sal_Int32 nIndex = 1;
+ uno::Reference< XCollection > xCol( xColumns, uno::UNO_QUERY_THROW );
+ uno::Reference< word::XColumn > xColumn( xCol->Item( uno::makeAny( nIndex ), uno::Any() ), uno::UNO_QUERY_THROW );
+ sal_Int32 nWidth = xColumn->getWidth();
+ nWidth -= indent;
+ xColumn->setWidth( nWidth );
+ setIndentWithAdjustNone( indent );
+ }
+
+ void SwVbaRows::setIndentWithAdjustProportional( const uno::Reference< word::XColumns >& xColumns, sal_Int32 indent ) throw (uno::RuntimeException)
+ {
+ // calculate the new width and get the proportion between old and new
+ uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW );
+ sal_Int32 nWidth = 0;
+ xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ) ) >>= nWidth;
+ sal_Int32 nNewWidth = nWidth - indent;
+ double propFactor = (double)nNewWidth/(double)nWidth;
+
+ // get all columns, calculate and set the new width of the columns
+ uno::Reference< XCollection > xCol( xColumns, uno::UNO_QUERY_THROW );
+ sal_Int32 nColCount = xCol->getCount();
+ for( sal_Int32 i = 0; i < nColCount; i++ )
+ {
+ uno::Reference< word::XColumn > xColumn( xCol->Item( uno::makeAny( i ), uno::Any() ), uno::UNO_QUERY_THROW );
+ sal_Int32 nColWidth = xColumn->getWidth();
+ sal_Int32 nNewColWidth = ( sal_Int32 )( propFactor * nColWidth );
+ xColumn->setWidth( nNewColWidth );
+ }
+
+ // set the width and position of the table
+ setIndentWithAdjustNone( indent );
+ xTableProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ), uno::makeAny( nNewWidth ) );
+ }
+
+ void SwVbaRows::setIndentWithAdjustSameWidth( const uno::Reference< word::XColumns >& xColumns, sal_Int32 indent ) throw (uno::RuntimeException)
+ {
+ // calculate the new width and get the width of all columns
+ uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW );
+ sal_Int32 nWidth = 0;
+ xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ) ) >>= nWidth;
+ sal_Int32 nNewWidth = nWidth - indent;
+
+ // get all columns, calculate and set the new width of the columns
+ uno::Reference< XCollection > xCol( xColumns, uno::UNO_QUERY_THROW );
+ sal_Int32 nColCount = xCol->getCount();
+ sal_Int32 nNewColWidth = (sal_Int32)( double( nNewWidth )/nColCount );
+ for( sal_Int32 i = 0; i < nColCount; i++ )
+ {
+ uno::Reference< word::XColumn > xColumn( xCol->Item( uno::makeAny( i ), uno::Any() ), uno::UNO_QUERY_THROW );
+ xColumn->setWidth( nNewColWidth );
+ }
+
+ // set the width and position of the table
+ setIndentWithAdjustNone( indent );
+ xTableProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ), uno::makeAny( nNewWidth ) );
+ }
+
+void SAL_CALL SwVbaRows::Select( ) throw (uno::RuntimeException)
+{
+ SwVbaRow::SelectRow( getCurrentWordDoc(mxContext), mxTextTable, mnStartRowIndex, mnEndRowIndex );
+}
+
+::sal_Int32 SAL_CALL SwVbaRows::getCount() throw (uno::RuntimeException)
+{
+ return ( mnEndRowIndex - mnStartRowIndex + 1 );
+}
+
+uno::Any SAL_CALL SwVbaRows::Item( const uno::Any& Index1, const uno::Any& /*not processed in this base class*/ ) throw (uno::RuntimeException)
+{
+ sal_Int32 nIndex = 0;
+ if( ( Index1 >>= nIndex ) == sal_True )
+ {
+ if( nIndex <= 0 || nIndex > getCount() )
+ {
+ throw lang::IndexOutOfBoundsException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Index out of bounds") ), uno::Reference< uno::XInterface >() );
+ }
+ return uno::makeAny( uno::Reference< word::XRow >( new SwVbaRow( this, mxContext, mxTextTable, nIndex - 1 ) ) );
+ }
+ throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Index out of bounds") ), uno::Reference< uno::XInterface >() );
+}
+
+// XEnumerationAccess
+uno::Type
+SwVbaRows::getElementType() throw (uno::RuntimeException)
+{
+ return word::XRow::static_type(0);
+}
+uno::Reference< container::XEnumeration >
+SwVbaRows::createEnumeration() throw (uno::RuntimeException)
+{
+ return new RowsEnumWrapper( this, mxContext, mxTextTable );
+}
+
+uno::Any
+SwVbaRows::createCollectionObject( const uno::Any& aSource )
+{
+ return aSource;
+}
+
+rtl::OUString&
+SwVbaRows::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaRows") );
+ return sImplName;
+}
+
+uno::Sequence<rtl::OUString>
+SwVbaRows::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Rows") );
+ }
+ return sNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbarows.hxx b/sw/source/ui/vba/vbarows.hxx
new file mode 100644
index 000000000000..eb310dc0e1e6
--- /dev/null
+++ b/sw/source/ui/vba/vbarows.hxx
@@ -0,0 +1,87 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_ROWS_HXX
+#define SW_VBA_ROWS_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XRows.hpp>
+#include <ooo/vba/word/XColumns.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/table/XTableRows.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+
+typedef CollTestImplHelper< ooo::vba::word::XRows > SwVbaRows_BASE;
+
+class SwVbaRows : public SwVbaRows_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextTable > mxTextTable;
+ css::uno::Reference< css::table::XTableRows > mxTableRows;
+ sal_Int32 mnStartRowIndex;
+ sal_Int32 mnEndRowIndex;
+
+private:
+ void setIndentWithAdjustNone( sal_Int32 indent ) throw (css::uno::RuntimeException);
+ void setIndentWithAdjustFirstColumn( const css::uno::Reference< ooo::vba::word::XColumns >& xColumns, sal_Int32 indent ) throw (css::uno::RuntimeException);
+ void setIndentWithAdjustProportional( const css::uno::Reference< ooo::vba::word::XColumns >& xColumns, sal_Int32 indent ) throw (css::uno::RuntimeException);
+ void setIndentWithAdjustSameWidth( const css::uno::Reference< ooo::vba::word::XColumns >& xColumns, sal_Int32 indent ) throw (css::uno::RuntimeException);
+
+public:
+ SwVbaRows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, const css::uno::Reference< css::table::XTableRows >& xTableRows ) throw ( css::uno::RuntimeException );
+ SwVbaRows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextTable >& xTextTable, const css::uno::Reference< css::table::XTableRows >& xTableRows, sal_Int32 nStarIndex, sal_Int32 nEndIndex ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaRows() {}
+
+ // Attributes
+ virtual ::sal_Int32 SAL_CALL getAlignment() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAlignment( ::sal_Int32 _alignment ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getAllowBreakAcrossPages() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAllowBreakAcrossPages( const css::uno::Any& _allowbreakacrosspages ) throw (css::uno::RuntimeException);
+ virtual float SAL_CALL getSpaceBetweenColumns() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setSpaceBetweenColumns( float _spacebetweencolumns ) throw (css::uno::RuntimeException);
+
+ // Methods
+ virtual void SAL_CALL Delete( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL SetLeftIndent( float LeftIndent, ::sal_Int32 RulerStyle ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Select( ) throw (css::uno::RuntimeException);
+
+ //XCollection
+ virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& /*not processed in this base class*/ ) throw ( css::uno::RuntimeException );
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaRows_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_ROWS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbasection.cxx b/sw/source/ui/vba/vbasection.cxx
index 2e685fbb1676..6ca39e55dbfd 100644
--- a/sw/source/ui/vba/vbasection.cxx
+++ b/sw/source/ui/vba/vbasection.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,6 +29,7 @@
#include <vbahelper/vbahelper.hxx>
#include <tools/diagnose_ex.h>
#include "vbapagesetup.hxx"
+#include "vbaheadersfooters.hxx"
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -50,14 +52,20 @@ void SAL_CALL SwVbaSection::setProtectedForForms( ::sal_Bool /*_protectedforform
{
}
-uno::Any SAL_CALL SwVbaSection::Headers( ) throw (uno::RuntimeException)
+uno::Any SAL_CALL SwVbaSection::Headers( const uno::Any& index ) throw (uno::RuntimeException)
{
- return uno::Any();
+ uno::Reference< XCollection > xCol( new SwVbaHeadersFooters( this, mxContext, mxModel, mxPageProps, sal_True ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
}
-uno::Any SAL_CALL SwVbaSection::Footers( ) throw (uno::RuntimeException)
+uno::Any SAL_CALL SwVbaSection::Footers( const uno::Any& index ) throw (uno::RuntimeException)
{
- return uno::Any();
+ uno::Reference< XCollection > xCol( new SwVbaHeadersFooters( this, mxContext, mxModel, mxPageProps, sal_False ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
}
uno::Any SAL_CALL
@@ -85,3 +93,4 @@ SwVbaSection::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbasection.hxx b/sw/source/ui/vba/vbasection.hxx
index 90a2972c2f52..648d03cfbe00 100644
--- a/sw/source/ui/vba/vbasection.hxx
+++ b/sw/source/ui/vba/vbasection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,8 +49,8 @@ public:
virtual void SAL_CALL setProtectedForForms( ::sal_Bool _protectedforforms ) throw (css::uno::RuntimeException);
// Methods
- virtual css::uno::Any SAL_CALL Headers( ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL Footers( ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Headers( const css::uno::Any& index ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Footers( const css::uno::Any& index ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL PageSetup( ) throw (css::uno::RuntimeException);
// XHelperInterface
@@ -57,3 +58,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_SECTION_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx
index c0f887f0f249..ab1a4cd04787 100644
--- a/sw/source/ui/vba/vbasections.cxx
+++ b/sw/source/ui/vba/vbasections.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,6 +88,15 @@ public:
}
}
+ SectionCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextRange >& xTextRange ) throw (uno::RuntimeException) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel )
+ {
+ // Hacky implementation of Range.Sections, only support 1 secction
+ uno::Reference< beans::XPropertySet > xRangeProps( xTextRange, uno::UNO_QUERY_THROW );
+ uno::Reference< style::XStyle > xStyle = word::getCurrentPageStyle( mxModel, xRangeProps );
+ uno::Reference< beans::XPropertySet > xPageProps( xStyle, uno::UNO_QUERY_THROW );
+ mxSections.push_back( xPageProps );
+ }
+
~SectionCollectionHelper(){}
// XIndexAccess
@@ -134,6 +144,10 @@ SwVbaSections::SwVbaSections( const uno::Reference< XHelperInterface >& xParent,
{
}
+SwVbaSections::SwVbaSections( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextRange >& xTextRange ): SwVbaSections_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new SectionCollectionHelper( xParent, xContext, xModel, xTextRange ) ) ), mxModel( xModel )
+{
+}
+
uno::Any SAL_CALL
SwVbaSections::PageSetup( ) throw (uno::RuntimeException)
{
@@ -184,3 +198,5 @@ SwVbaSections::getServiceNames()
}
return sNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbasections.hxx b/sw/source/ui/vba/vbasections.hxx
index 3204689af5d8..6aa6fd83dced 100644
--- a/sw/source/ui/vba/vbasections.hxx
+++ b/sw/source/ui/vba/vbasections.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,6 +32,7 @@
#include <ooo/vba/word/XSections.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
#include <vbahelper/vbahelperinterface.hxx>
typedef CollTestImplHelper< ooo::vba::word::XSections > SwVbaSections_BASE;
@@ -42,6 +44,7 @@ private:
public:
SwVbaSections( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel );
+ SwVbaSections( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XTextRange >& xTextRange );
virtual ~SwVbaSections() {}
// XEnumerationAccess
@@ -57,3 +60,5 @@ public:
};
#endif /* SW_VBA_SECTIONS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index 2143cd079a93..3b115ad4c7bd 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#include <tools/diagnose_ex.h>
#include "vbarange.hxx"
#include "vbafind.hxx"
-#include "wordvbahelper.hxx"
#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/text/XTextTableCursor.hpp>
@@ -41,14 +41,19 @@
#include <ooo/vba/word/WdGoToDirection.hpp>
#include <ooo/vba/word/XBookmark.hpp>
#include <ooo/vba/word/XApplication.hpp>
+#include <ooo/vba/word/WdCollapseDirection.hpp>
#include <com/sun/star/text/XPageCursor.hpp>
#include "unotbl.hxx"
#include "unocoll.hxx"
#include "vbatable.hxx"
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/view/XViewCursor.hpp>
+#include <com/sun/star/view/XLineCursor.hpp>
+#include <com/sun/star/text/XWordCursor.hpp>
+#include <com/sun/star/text/XParagraphCursor.hpp>
#include <ooo/vba/word/WdInformation.hpp>
#include <ooo/vba/word/WdHeaderFooterIndex.hpp>
+#include <ooo/vba/word/WdSeekView.hpp>
#include "vbainformationhelper.hxx"
#include "vbafield.hxx"
#include "vbaheaderfooter.hxx"
@@ -56,6 +61,16 @@
#include <vbahelper/vbashaperange.hxx>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
+#include "vbarows.hxx"
+#include "vbacolumns.hxx"
+#include "vbatablehelper.hxx"
+#include "vbacells.hxx"
+#include "vbaview.hxx"
+#include "vbaparagraph.hxx"
+#include "vbastyle.hxx"
+#include <docsh.hxx>
+#include <tblenum.hxx>
+#include <fesh.hxx>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -123,23 +138,25 @@ SwVbaSelection::HomeKey( const uno::Any& _unit, const uno::Any& _extend ) throw
sal_Int32 nExtend = word::WdMovementType::wdMove;
_unit >>= nUnit;
_extend >>= nExtend;
+ sal_Bool bExtend = ( nExtend == word::WdMovementType::wdExtend ) ? sal_True : sal_False;
switch( nUnit )
{
case word::WdUnits::wdStory:
{
+ // go to the valid text first so that the current view cursor is valid to call gotoRange.
+ word::gotoSelectedObjectAnchor(mxModel);
// go to the begin of the document
- rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:GoToStartOfDoc"));
- dispatchRequests( mxModel,url );
- // If something is selected, it needs to go twice
- dispatchRequests( mxModel,url );
+ uno::Reference< text::XText > xCurrentText = word::getCurrentXText( mxModel );
+ uno::Reference< text::XTextRange > xFirstRange = word::getFirstObjectPosition( xCurrentText );
+ mxTextViewCursor->gotoRange( xFirstRange, bExtend );
break;
}
case word::WdUnits::wdLine:
{
// go to the begin of the Line
- rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:GoToStartOfLine"));
- dispatchRequests( mxModel,url );
+ uno::Reference< view::XLineCursor > xLineCursor( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ xLineCursor->gotoStartOfLine( bExtend );
break;
}
default:
@@ -157,23 +174,25 @@ SwVbaSelection::EndKey( const uno::Any& _unit, const uno::Any& _extend ) throw (
sal_Int32 nExtend = word::WdMovementType::wdMove;
_unit >>= nUnit;
_extend >>= nExtend;
+ sal_Bool bExtend = ( nExtend == word::WdMovementType::wdExtend ) ? sal_True : sal_False;
switch( nUnit )
{
case word::WdUnits::wdStory:
{
+ // go to the valid text first so that the current view cursor is valid to call gotoRange.
+ word::gotoSelectedObjectAnchor(mxModel);
// go to the end of the document
- rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:GoToEndOfDoc"));
- dispatchRequests( mxModel,url );
- // If something is selected, it needs to go twice
- dispatchRequests( mxModel,url );
+ uno::Reference< text::XText > xCurrentText = word::getCurrentXText( mxModel );
+ uno::Reference< text::XTextRange > xEnd = xCurrentText->getEnd();
+ mxTextViewCursor->gotoRange( xEnd, bExtend );
break;
}
case word::WdUnits::wdLine:
{
// go to the end of the Line
- rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:GoToEndOfLine"));
- dispatchRequests( mxModel,url );
+ uno::Reference< view::XLineCursor > xLineCursor( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ xLineCursor->gotoEndOfLine( bExtend );
break;
}
default:
@@ -185,14 +204,161 @@ SwVbaSelection::EndKey( const uno::Any& _unit, const uno::Any& _extend ) throw (
}
void SAL_CALL
-SwVbaSelection::Delete( const uno::Any& /*_unit*/, const uno::Any& /*_count*/ ) throw ( uno::RuntimeException )
+SwVbaSelection::Delete( const uno::Any& _unit, const uno::Any& _count ) throw ( uno::RuntimeException )
{
- // FIXME: handle the arguments: _unit and _count
+ sal_Int32 nUnit = word::WdUnits::wdLine;
+ sal_Int32 nCount = 0;
+ if( _count.hasValue() )
+ _count >>= nCount;
+ if( _unit.hasValue() && ( nCount > 0 ) )
+ {
+ _unit >>= nUnit;
+ switch( nUnit )
+ {
+ case word::WdUnits::wdCharacter:
+ {
+ if( HasSelection() )
+ nCount--;
+ mxTextViewCursor->goRight( nCount, sal_True );
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+ }
+ }
rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Delete"));
dispatchRequests( mxModel,url );
}
-void SwVbaSelection::NextCell( sal_Int32 nCount, E_DIRECTION eDirection ) throw ( uno::RuntimeException )
+void
+SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno::Any& _extend, word::E_DIRECTION eDirection ) throw ( uno::RuntimeException )
+{
+ sal_Int32 nUnit = word::WdUnits::wdCharacter;
+ sal_Int32 nCount = 1;
+ sal_Int32 nExtend = word::WdMovementType::wdMove;
+
+ if( _unit.hasValue() )
+ _unit >>= nUnit;
+ if( _count.hasValue() )
+ _count >>= nCount;
+ if( _extend.hasValue() )
+ _extend >>= nExtend;
+
+ if( nCount == 0 )
+ return;
+
+ sal_Bool bExpand = ( nExtend == word::WdMovementType::wdMove ) ? sal_False : sal_True;
+
+ switch( nUnit )
+ {
+ case word::WdUnits::wdCell:
+ {
+ if( nExtend == word::WdMovementType::wdExtend )
+ {
+ DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
+ return;
+ }
+ NextCell( nCount, eDirection );
+ break;
+ }
+ case word::WdUnits::wdLine:
+ {
+ if( eDirection == word::MOVE_LEFT || eDirection == word::MOVE_RIGHT )
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+ uno::Reference< view::XViewCursor > xViewCursor( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ if( eDirection == word::MOVE_UP )
+ xViewCursor->goUp( nCount, bExpand );
+ else if( eDirection == word::MOVE_DOWN )
+ xViewCursor->goDown( nCount, bExpand );
+ break;
+ }
+ case word::WdUnits::wdCharacter:
+ {
+ if( eDirection == word::MOVE_UP || eDirection == word::MOVE_DOWN )
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+ if( word::gotoSelectedObjectAnchor( mxModel ) )
+ {
+ nCount--;
+ }
+ uno::Reference< view::XViewCursor > xViewCursor( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ if( eDirection == word::MOVE_LEFT )
+ {
+ // if current select is a cellrange or table,
+ // the first count of move should move to the first selected cell.
+ uno::Reference< text::XTextTableCursor > xTextTableCursor( mxModel->getCurrentSelection(), uno::UNO_QUERY );
+ if ( xTextTableCursor.is() )
+ {
+ uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextTable > xTextTable;
+ xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextTable;
+ if( xTextTable.is() )
+ {
+ uno::Reference< text::XTextRange > xRange( xTextTable->getCellByName( xTextTableCursor->getRangeName()), uno::UNO_QUERY_THROW );
+ mxTextViewCursor->gotoRange( xRange->getStart(), bExpand );
+ nCount--;
+ }
+ }
+ xViewCursor->goLeft( nCount, bExpand );
+ }
+ else if( eDirection == word::MOVE_RIGHT )
+ xViewCursor->goRight( nCount, bExpand );
+ break;
+ }
+ case word::WdUnits::wdWord:
+ case word::WdUnits::wdParagraph:
+ {
+ uno::Reference< text::XTextRange > xRange = GetSelectedRange();
+ uno::Reference< text::XText > xText = xRange->getText();
+ uno::Reference< text::XTextCursor > xTextCursor = xText->createTextCursorByRange( xRange );
+ if( nUnit == word::WdUnits::wdParagraph )
+ {
+ if( eDirection == word::MOVE_LEFT || eDirection == word::MOVE_RIGHT )
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+ uno::Reference< text::XParagraphCursor > xParagraphCursor( xTextCursor, uno::UNO_QUERY_THROW );
+ for( sal_Int32 i=0; i<nCount; i++ )
+ {
+ if( ( eDirection == word::MOVE_UP ) && ( xParagraphCursor->gotoPreviousParagraph( bExpand ) == sal_False ) )
+ break;
+ else if( ( eDirection == word::MOVE_DOWN ) && ( xParagraphCursor->gotoNextParagraph( bExpand ) == sal_False ) )
+ break;
+ }
+ }
+ else if( nUnit == word::WdUnits::wdWord )
+ {
+ if( eDirection == word::MOVE_UP || eDirection == word::MOVE_DOWN )
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ }
+ uno::Reference< text::XWordCursor > xWordCursor( xTextCursor, uno::UNO_QUERY_THROW );
+ for( sal_Int32 i=0; i<nCount; i++ )
+ {
+ if( (eDirection == word::MOVE_LEFT ) && ( xWordCursor->gotoPreviousWord( bExpand ) == sal_False ) )
+ break;
+ else if( ( eDirection == word::MOVE_RIGHT ) && ( xWordCursor->gotoNextWord( bExpand ) == sal_False ) )
+ break;
+ }
+ }
+ mxTextViewCursor->gotoRange( xTextCursor->getStart(), sal_False );
+ mxTextViewCursor->gotoRange( xTextCursor->getEnd(), sal_True );
+ break;
+ }
+ default:
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ break;
+ }
+ }
+}
+
+void SwVbaSelection::NextCell( sal_Int32 nCount, word::E_DIRECTION eDirection ) throw ( uno::RuntimeException )
{
uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW );
uno::Reference< text::XTextTable > xTextTable;
@@ -211,22 +377,22 @@ void SwVbaSelection::NextCell( sal_Int32 nCount, E_DIRECTION eDirection ) throw
// move the table cursor
switch( eDirection )
{
- case MOVE_LEFT:
+ case word::MOVE_LEFT:
{
xTextTableCursor->goLeft( nCount, sal_False );
break;
}
- case MOVE_RIGHT:
+ case word::MOVE_RIGHT:
{
xTextTableCursor->goRight( nCount, sal_False );
break;
}
- case MOVE_UP:
+ case word::MOVE_UP:
{
xTextTableCursor->goUp( nCount, sal_False );
break;
}
- case MOVE_DOWN:
+ case word::MOVE_DOWN:
{
xTextTableCursor->goDown( nCount, sal_False );
break;
@@ -245,61 +411,29 @@ void SwVbaSelection::NextCell( sal_Int32 nCount, E_DIRECTION eDirection ) throw
void SAL_CALL
SwVbaSelection::MoveRight( const uno::Any& _unit, const uno::Any& _count, const uno::Any& _extend ) throw ( uno::RuntimeException )
{
- sal_Int32 nUnit = word::WdUnits::wdCharacter;
sal_Int32 nCount = 1;
- sal_Int32 nExtend = word::WdMovementType::wdMove;
- if( _unit.hasValue() )
- _unit >>= nUnit;
if( _count.hasValue() )
_count >>= nCount;
- if( _extend.hasValue() )
- _extend >>= nExtend;
if( nCount == 0 )
return;
if( nCount < 0 )
{
- // TODO: call MoveLeft;
MoveLeft( _unit, uno::makeAny( -nCount ), _extend );
return;
}
- switch( nUnit )
- {
- case word::WdUnits::wdCell:
- {
- if( nExtend == word::WdMovementType::wdExtend )
- {
- DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
- return;
- }
- NextCell( nCount, MOVE_RIGHT );
- break;
- }
- default:
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
- break;
- }
- }
-
+ Move( _unit, _count, _extend, word::MOVE_RIGHT );
}
void SAL_CALL
SwVbaSelection::MoveLeft( const uno::Any& _unit, const uno::Any& _count, const uno::Any& _extend ) throw ( uno::RuntimeException )
{
- sal_Int32 nUnit = word::WdUnits::wdCharacter;
sal_Int32 nCount = 1;
- sal_Int32 nExtend = word::WdMovementType::wdMove;
-
- if( _unit.hasValue() )
- _unit >>= nUnit;
if( _count.hasValue() )
_count >>= nCount;
- if( _extend.hasValue() )
- _extend >>= nExtend;
if( nCount == 0 )
return;
@@ -310,67 +444,47 @@ SwVbaSelection::MoveLeft( const uno::Any& _unit, const uno::Any& _count, const u
return;
}
- switch( nUnit )
- {
- case word::WdUnits::wdCell:
- {
- if( nExtend == word::WdMovementType::wdExtend )
- {
- DebugHelper::exception(SbERR_BAD_ARGUMENT, rtl::OUString());
- return;
- }
- NextCell( nCount, MOVE_LEFT );
- break;
- }
- default:
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
- break;
- }
- }
-
+ Move( _unit, _count, _extend, word::MOVE_LEFT );
}
void SAL_CALL
SwVbaSelection::MoveDown( const uno::Any& _unit, const uno::Any& _count, const uno::Any& _extend ) throw ( uno::RuntimeException )
{
- sal_Int32 nUnit = word::WdUnits::wdCharacter;
sal_Int32 nCount = 1;
- sal_Int32 nExtend = word::WdMovementType::wdMove;
- if( _unit.hasValue() )
- _unit >>= nUnit;
if( _count.hasValue() )
_count >>= nCount;
- if( _extend.hasValue() )
- _extend >>= nExtend;
if( nCount == 0 )
return;
if( nCount < 0 )
{
- // TODO: call MoveLeft;
- //MoveUp( _unit, uno::makeAny( -nCount ), _extend );
+ MoveUp( _unit, uno::makeAny( -nCount ), _extend );
return;
}
- switch( nUnit )
+ Move( _unit, _count, _extend, word::MOVE_DOWN );
+}
+
+void SAL_CALL
+SwVbaSelection::MoveUp( const uno::Any& _unit, const uno::Any& _count, const uno::Any& _extend ) throw ( uno::RuntimeException )
+{
+ sal_Int32 nCount = 1;
+
+ if( _count.hasValue() )
+ _count >>= nCount;
+
+ if( nCount == 0 )
+ return;
+
+ if( nCount < 0 )
{
- case word::WdUnits::wdLine:
- {
- uno::Reference< view::XViewCursor > xViewCursor( mxTextViewCursor, uno::UNO_QUERY_THROW );
- sal_Bool bExpand = ( nExtend == word::WdMovementType::wdMove ) ? sal_False : sal_True;
- xViewCursor->goDown( nCount, bExpand );
- break;
- }
- default:
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
- break;
- }
+ MoveDown( _unit, uno::makeAny( -nCount ), _extend );
+ return;
}
+ Move( _unit, _count, _extend, word::MOVE_UP );
}
void SAL_CALL
@@ -422,16 +536,17 @@ SwVbaSelection::getFind() throw ( uno::RuntimeException )
return uno::Reference< word::XFind >( new SwVbaFind( this, mxContext, mxModel, xTextRange ) );
}
-uno::Reference< word::XStyle > SAL_CALL
+uno::Any SAL_CALL
SwVbaSelection::getStyle() throw ( uno::RuntimeException )
{
return getRange()->getStyle();
}
void SAL_CALL
-SwVbaSelection::setStyle( const uno::Reference< word::XStyle >& rStyle ) throw ( uno::RuntimeException )
+SwVbaSelection::setStyle( const uno::Any& rStyle ) throw ( uno::RuntimeException )
{
- return getRange()->setStyle( rStyle );
+ uno::Reference< beans::XPropertySet > xParaProps( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ return SwVbaStyle::setStyle( xParaProps, rStyle );
}
uno::Reference< word::XFont > SAL_CALL
@@ -460,7 +575,6 @@ uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _w
uno::Reference< word::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
uno::Reference< word::XBookmark > xBookmark( xApplication->getActiveDocument()->Bookmarks(_name), uno::UNO_QUERY_THROW );
xBookmark->Select();
- //return uno::Reference< word::XRange >( xBookmark->Range(), uno::UNO_QUERY_THROW );
break;
}
case word::WdGoToItem::wdGoToPage:
@@ -474,39 +588,79 @@ uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _w
sal_Int32 nWhich = 0;
if( _which.hasValue() )
_which >>= nWhich;
- sal_Int32 nPage = 0;
- switch( nWhich )
- {
- case word::WdGoToDirection::wdGoToLast:
- {
- nPage = nLastPage;
- break;
- }
- case word::WdGoToDirection::wdGoToNext:
- {
- nPage = nCurrPage + 1;
- break;
- }
- case word::WdGoToDirection::wdGoToPrevious:
- {
- nPage = nCurrPage - 1;
- break;
- }
- default:
- {
- nPage = nCount;
- }
- }
- if( nPage <= 0 )
- nPage = 1;
- if( nPage > nLastPage )
- nPage = nLastPage;
- xPageCursor->jumpToPage( ( sal_Int16 )( nPage ) );
- break;
+ sal_Int32 nPage = 0;
+ switch( nWhich )
+ {
+ case word::WdGoToDirection::wdGoToLast:
+ {
+ nPage = nLastPage;
+ break;
+ }
+ case word::WdGoToDirection::wdGoToNext:
+ {
+ if( nCount !=0 )
+ nPage = nCurrPage + nCount;
+ else
+ nPage = nCurrPage + 1;
+ break;
+ }
+ case word::WdGoToDirection::wdGoToPrevious:
+ {
+ if( nCount !=0 )
+ nPage = nCurrPage - nCount;
+ else
+ nPage = nCurrPage - 1;
+ break;
+ }
+ default:
+ {
+ nPage = nCount;
+ }
+ }
+ if( _name.hasValue() )
+ {
+ rtl::OUString sName;
+ _name >>= sName;
+ sal_Int32 nName = sName.toInt32();
+ if( nName !=0 )
+ nPage = nName;
+ }
+ if( nPage <= 0 )
+ nPage = 1;
+ if( nPage > nLastPage )
+ nPage = nLastPage;
+ xPageCursor->jumpToPage( ( sal_Int16 )( nPage ) );
+ break;
}
case word::WdGoToItem::wdGoToSection:
{
- // TODO: implement Section object
+ uno::Reference< text::XPageCursor > xPageCursor( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ sal_Int32 nCount = 0;
+ if( _count.hasValue() )
+ _count >>= nCount;
+ sal_Int32 nWhich = 0;
+ if( _which.hasValue() )
+ _which >>= nWhich;
+ sal_Int32 nPage = 0;
+ switch( nWhich )
+ {
+ case word::WdGoToDirection::wdGoToAbsolute:
+ {
+ // currently only support this type
+ if( nCount == 1 )
+ nPage = 1;
+ break;
+ }
+ default:
+ {
+ nPage = 0;
+ }
+ }
+ if( nPage != 0 )
+ xPageCursor->jumpToPage( ( sal_Int16 )( nPage ) );
+ else
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ break;
}
default:
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
@@ -527,8 +681,6 @@ void SAL_CALL SwVbaSelection::setLanguageID( ::sal_Int32 _languageid ) throw (un
uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::RuntimeException)
{
uno::Any result;
- //uno::Reference< view::XSelectionSupplier > xSel( mxModel->getCurrentController(), uno::UNO_QUERY_THROW );
- //uno::Any aSelectedObject = xSel->getSelection();
switch( _type )
{
case word::WdInformation::wdActiveEndPageNumber:
@@ -546,11 +698,85 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::Run
result = uno::makeAny( SwVbaInformationHelper::handleWdVerticalPositionRelativeToPage( mxModel, mxTextViewCursor ) );
break;
}
+ case word::WdInformation::wdWithInTable:
+ {
+ uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextTable > xTextTable;
+ xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextTable;
+ if( xTextTable.is() )
+ result = uno::makeAny( sal_True );
+ else
+ result = uno::makeAny( sal_False );
+ break;
+ }
+ case word::WdInformation::wdHeaderFooterType:
+ {
+ uno::Reference< word::XView > xView( new SwVbaView( this, mxContext, mxModel ) );
+ sal_Int32 nView = xView->getSeekView();
+ sal_Int32 nHeaderFooterType = 0;
+ switch( nView )
+ {
+ case word::WdSeekView::wdSeekMainDocument:
+ {
+ nHeaderFooterType = -1; // not in a header or footer
+ break;
+ }
+ case word::WdSeekView::wdSeekEvenPagesHeader:
+ {
+ nHeaderFooterType = 0; // even page header
+ break;
+ }
+ case word::WdSeekView::wdSeekPrimaryHeader:
+ {
+ nHeaderFooterType = 1; // odd page header
+ break;
+ }
+ case word::WdSeekView::wdSeekEvenPagesFooter:
+ {
+ nHeaderFooterType = 2; // even page footer
+ break;
+ }
+ case word::WdSeekView::wdSeekPrimaryFooter:
+ {
+ nHeaderFooterType = 3; // odd page footer
+ break;
+ }
+ case word::WdSeekView::wdSeekFirstPageHeader:
+ case word::WdSeekView::wdSeekFirstPageFooter:
+ {
+ uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ rtl::OUString aPageStyleName;
+ xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName;
+ sal_Bool bFirstPage = sal_False;
+ if( aPageStyleName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "First Page" ) ) )
+ bFirstPage = sal_True;
+ if( nView == word::WdSeekView::wdSeekFirstPageHeader )
+ {
+ if( bFirstPage )
+ nHeaderFooterType = 4;
+ else
+ nHeaderFooterType = 1;
+ }
+ else
+ {
+ if( bFirstPage )
+ nHeaderFooterType = 5;
+ else
+ nHeaderFooterType = 3;
+ }
+ break;
+ }
+ default:
+ {
+ nHeaderFooterType = -1;
+ }
+ }
+ result = uno::makeAny( nHeaderFooterType );
+ break;
+ }
default:
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
}
- // This method fails to restore the previouse selection
- //xSel->select( aSelectedObject );
return result;
}
@@ -566,11 +792,6 @@ SwVbaSelection::Tables( const uno::Any& aIndex ) throw (uno::RuntimeException)
// we can only support a selection that is a single table
if ( !aIndex.hasValue() ) // currently we can't support multiple tables in a selection
throw uno::RuntimeException();
- // if the current selection is a XTextTableCursor and the index is 1 then we can service this request, otherwise we just have to throw
- uno::Reference< text::XTextTableCursor > xTextTableCursor( mxModel->getCurrentSelection(), uno::UNO_QUERY );
-
- if ( !xTextTableCursor.is() )
- throw uno::RuntimeException();
sal_Int32 nIndex = 0;
aIndex >>= nIndex;
@@ -579,6 +800,24 @@ SwVbaSelection::Tables( const uno::Any& aIndex ) throw (uno::RuntimeException)
if ( nIndex != 1 )
throw uno::RuntimeException();
+
+ uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextTable > xTextTable;
+ xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextTable;
+ if( xTextTable.is() )
+ {
+ uno::Reference< css::text::XTextDocument > xTextDoc( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< word::XTable > xVBATbl = new SwVbaTable( mxParent, mxContext, xTextDoc, xTextTable );
+ aRet <<= xVBATbl;
+ return aRet;
+ }
+
+ // if the current selection is a XTextTableCursor and the index is 1 then we can service this request, otherwise we just have to throw
+ uno::Reference< text::XTextTableCursor > xTextTableCursor( mxModel->getCurrentSelection(), uno::UNO_QUERY );
+
+ if ( !xTextTableCursor.is() )
+ throw uno::RuntimeException();
+
SwXTextTableCursor* pTTCursor = dynamic_cast< SwXTextTableCursor* >( xTextTableCursor.get() );
if ( pTTCursor )
{
@@ -608,15 +847,14 @@ SwVbaSelection::Fields( const uno::Any& index ) throw (uno::RuntimeException)
uno::Reference< word::XHeaderFooter > SAL_CALL
SwVbaSelection::getHeaderFooter() throw ( uno::RuntimeException )
{
- uno::Reference< text::XText > xCurrentText = word::getXTextViewCursor( mxModel )->getText();
- if( HeaderFooterHelper::isHeader( mxModel, xCurrentText ) || HeaderFooterHelper::isFooter( mxModel, xCurrentText ) )
+ if( HeaderFooterHelper::isHeaderFooter( mxModel ) )
{
uno::Reference< beans::XPropertySet > xPageStyleProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW );
sal_Int32 nIndex = word::WdHeaderFooterIndex::wdHeaderFooterPrimary;
- sal_Bool isHeader = HeaderFooterHelper::isHeader( mxModel, xCurrentText );
- if( HeaderFooterHelper::isEvenPagesHeader( mxModel, xCurrentText ) || HeaderFooterHelper::isEvenPagesFooter( mxModel, xCurrentText ) )
+ sal_Bool isHeader = HeaderFooterHelper::isHeader( mxModel );
+ if( HeaderFooterHelper::isEvenPagesHeader( mxModel ) || HeaderFooterHelper::isEvenPagesFooter( mxModel ) )
nIndex = word::WdHeaderFooterIndex::wdHeaderFooterEvenPages;
- else if( HeaderFooterHelper::isFirstPageHeader( mxModel, xCurrentText ) || HeaderFooterHelper::isFirstPageFooter( mxModel, xCurrentText ) )
+ else if( HeaderFooterHelper::isFirstPageHeader( mxModel ) || HeaderFooterHelper::isFirstPageFooter( mxModel ) )
nIndex = word::WdHeaderFooterIndex::wdHeaderFooterFirstPage;
return uno::Reference< word::XHeaderFooter >( new SwVbaHeaderFooter( this, mxContext, mxModel, xPageStyleProps, isHeader, nIndex ) );
@@ -629,9 +867,13 @@ uno::Any SAL_CALL
SwVbaSelection::ShapeRange( ) throw (uno::RuntimeException)
{
uno::Reference< drawing::XShapes > xShapes( mxModel->getCurrentSelection(), uno::UNO_QUERY );
-
if ( !xShapes.is() )
- throw uno::RuntimeException();
+ {
+ uno::Reference< drawing::XShape > xShape( mxModel->getCurrentSelection(), uno::UNO_QUERY_THROW );
+ uno::Reference< lang::XMultiServiceFactory > xMSF( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
+ xShapes.set( xMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ShapeCollection")) ), uno::UNO_QUERY_THROW );
+ xShapes->add( xShape );
+ }
uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxModel, uno::UNO_QUERY_THROW );
uno::Reference< drawing::XDrawPage > xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -658,6 +900,281 @@ void SAL_CALL SwVbaSelection::setEnd( ::sal_Int32 _end ) throw (uno::RuntimeExce
getRange()->setEnd( _end );
}
+void SAL_CALL SwVbaSelection::SelectRow() throw (uno::RuntimeException)
+{
+ uno::Reference< word::XRows > xRows( Rows( uno::Any() ), uno::UNO_QUERY_THROW );
+ xRows->Select();
+}
+
+void SAL_CALL SwVbaSelection::SelectColumn() throw (uno::RuntimeException)
+{
+ uno::Reference< word::XColumns > xColumns( Columns( uno::Any() ), uno::UNO_QUERY_THROW );
+ xColumns->Select();
+}
+
+uno::Any SAL_CALL SwVbaSelection::Rows( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ rtl::OUString sTLName;
+ rtl::OUString sBRName;
+ GetSelectedCellRange( sTLName, sBRName );
+
+ sal_Int32 nStartRow = 0;
+ sal_Int32 nEndRow = 0;
+ uno::Reference< text::XTextTable > xTextTable = GetXTextTable();
+ SwVbaTableHelper aTableHelper( xTextTable );
+ nStartRow = aTableHelper.getTabRowIndex( sTLName );
+ if( sBRName.getLength() > 0 )
+ {
+ nEndRow = aTableHelper.getTabRowIndex( sBRName );
+ }
+ else
+ {
+ nEndRow = nStartRow;
+ }
+
+ uno::Reference< XCollection > xCol( new SwVbaRows( this, mxContext, xTextTable, xTextTable->getRows(), nStartRow, nEndRow ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL SwVbaSelection::Columns( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ rtl::OUString sTLName;
+ rtl::OUString sBRName;
+ GetSelectedCellRange( sTLName, sBRName );
+ sal_Int32 nStartColumn = 0;
+ sal_Int32 nEndColumn = 0;
+
+ uno::Reference< text::XTextTable > xTextTable = GetXTextTable();
+ SwVbaTableHelper aTableHelper( xTextTable );
+ nStartColumn = aTableHelper.getTabColIndex( sTLName );
+ if( sBRName.getLength() > 0 )
+ {
+ nEndColumn = aTableHelper.getTabColIndex( sBRName );
+ }
+ else
+ {
+ nEndColumn = nStartColumn;
+ }
+
+ uno::Reference< XCollection > xCol( new SwVbaColumns( this, mxContext, xTextTable, xTextTable->getColumns(), nStartColumn, nEndColumn ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Reference< text::XTextTable > SwVbaSelection::GetXTextTable() throw( uno::RuntimeException )
+{
+ uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextTable > xTextTable;
+ xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextTable;
+ return xTextTable;
+}
+
+sal_Bool SwVbaSelection::IsInTable() throw( uno::RuntimeException )
+{
+ uno::Reference< text::XTextTable > xTextTable = GetXTextTable();
+ if( xTextTable.is() )
+ return sal_True;
+ return sal_False;
+}
+
+sal_Bool SwVbaSelection::HasSelection() throw( uno::RuntimeException )
+{
+ uno::Reference< text::XTextRange > xStart = mxTextViewCursor->getStart();
+ uno::Reference< text::XTextRange > xEnd = mxTextViewCursor->getEnd();
+ uno::Reference< text::XTextRangeCompare > xTRC( mxTextViewCursor->getText(), uno::UNO_QUERY_THROW );
+ if( xTRC->compareRegionStarts( xStart, xEnd ) == 0 && xTRC->compareRegionEnds( xStart, xEnd ) == 0 )
+ return sal_False;
+ return sal_True;
+}
+
+void SwVbaSelection::GetSelectedCellRange( rtl::OUString& sTLName, rtl::OUString& sBRName ) throw( uno::RuntimeException )
+{
+ uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextTable > xTextTable;
+ xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextTable;
+ if( !xTextTable.is() )
+ throw uno::RuntimeException( );
+
+ uno::Reference< text::XTextTableCursor > xTextTableCursor( mxModel->getCurrentSelection(), uno::UNO_QUERY );
+ if( xTextTableCursor.is() )
+ {
+ String sRange( xTextTableCursor->getRangeName() );
+ if( sRange.GetTokenCount(':') > 0 )
+ {
+ sTLName = sRange.GetToken(0, ':');
+ sBRName = sRange.GetToken(1, ':');
+ }
+ }
+ if( !sTLName.getLength() )
+ {
+ uno::Reference< table::XCell > xCell;
+ xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Cell") ) ) >>= xCell;
+ if( !xCell.is() )
+ {
+ throw uno::RuntimeException( );
+ }
+ uno::Reference< beans::XPropertySet > xCellProps( xCell, uno::UNO_QUERY_THROW );
+ xCellProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CellName") ) ) >>= sTLName;
+ }
+}
+
+uno::Any SAL_CALL SwVbaSelection::Cells( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ rtl::OUString sTLName;
+ rtl::OUString sBRName;
+ GetSelectedCellRange( sTLName, sBRName );
+ sal_Int32 nLeft = 0;
+ sal_Int32 nTop = 0;
+ sal_Int32 nRight = 0;
+ sal_Int32 nBottom = 0;
+
+ uno::Reference< text::XTextTable > xTextTable = GetXTextTable();
+ SwVbaTableHelper aTableHelper( xTextTable );
+ nLeft = aTableHelper.getTabColIndex( sTLName );
+ nTop = aTableHelper.getTabRowIndex( sTLName );
+ if( sBRName.getLength() > 0 )
+ {
+ nRight = aTableHelper.getTabColIndex( sBRName );
+ nBottom = aTableHelper.getTabRowIndex( sBRName );
+ }
+ else
+ {
+ nRight = nLeft;
+ nBottom = nTop;
+ }
+
+ uno::Reference< XCollection > xCol( new SwVbaCells( this, mxContext, xTextTable, nLeft, nTop, nRight, nBottom ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+void SAL_CALL SwVbaSelection::Copy( ) throw (uno::RuntimeException)
+{
+ rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Copy"));
+ dispatchRequests( mxModel,url );
+}
+
+void SAL_CALL SwVbaSelection::CopyAsPicture( ) throw (uno::RuntimeException)
+{
+ // seems not support in Writer
+ Copy();
+}
+
+void SAL_CALL SwVbaSelection::Paste( ) throw (uno::RuntimeException)
+{
+ rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Paste"));
+ dispatchRequests( mxModel,url );
+}
+
+void SAL_CALL SwVbaSelection::Collapse( const uno::Any& Direction ) throw (uno::RuntimeException)
+{
+ if( word::gotoSelectedObjectAnchor( mxModel ) )
+ return;
+
+ sal_Int32 nDirection = word::WdCollapseDirection::wdCollapseStart;
+ if( Direction.hasValue() )
+ Direction >>= nDirection;
+
+ uno::Reference< text::XTextViewCursor > xTextViewCursor = word::getXTextViewCursor( mxModel );
+ if( nDirection == word::WdCollapseDirection::wdCollapseStart )
+ {
+ // it is inaccurate if current seleciton is multipul cells, so it needs to go to start
+ uno::Reference< text::XTextRange > xTextRange = mxTextViewCursor->getStart();
+ xTextViewCursor->gotoRange( xTextRange, sal_False );
+ xTextViewCursor->collapseToStart();
+ }
+ else if( nDirection == word::WdCollapseDirection::wdCollapseEnd )
+ {
+ uno::Reference< text::XTextRange > xTextRange = mxTextViewCursor->getEnd();
+ xTextViewCursor->gotoRange( xTextRange, sal_False );
+ xTextViewCursor->collapseToEnd();
+ }
+ else
+ {
+ throw uno::RuntimeException();
+ }
+}
+
+void SAL_CALL SwVbaSelection::WholeStory( ) throw (uno::RuntimeException)
+{
+ uno::Reference< text::XText > xText = word::getCurrentXText( mxModel );
+ // FIXME: for i#7747,if the first line is a table, it fails to select all the contents in the story.
+ // Temporary solution, insert an empty line before the table so that it could select all the contents.
+ uno::Reference< container::XEnumerationAccess > xParaAccess( xText, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XEnumeration> xParaEnum = xParaAccess->createEnumeration();
+ if( xParaEnum->hasMoreElements() )
+ {
+ uno::Reference< text::XTextTable > xTextTable( xParaEnum->nextElement(), uno::UNO_QUERY );
+ if( xTextTable.is() )
+ {
+ // insert an empty line
+ uno::Reference< text::XTextRange > xFirstCellRange = word::getFirstObjectPosition( xText );
+ mxTextViewCursor->gotoRange( xFirstCellRange, sal_False );
+ rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertPara"));
+ dispatchRequests( mxModel,url );
+ }
+ }
+ uno::Reference< text::XTextRange > xStart = xText->getStart();
+ uno::Reference< text::XTextRange > xEnd = xText->getEnd();
+ mxTextViewCursor->gotoRange( xStart, sal_False );
+ mxTextViewCursor->gotoRange( xEnd, sal_True );
+}
+
+::sal_Bool SAL_CALL SwVbaSelection::InRange( const uno::Reference< ::ooo::vba::word::XRange >& Range ) throw (uno::RuntimeException)
+{
+ return getRange()->InRange( Range );
+}
+
+void SAL_CALL SwVbaSelection::SplitTable( ) throw (uno::RuntimeException)
+{
+ if( !IsInTable() )
+ throw uno::RuntimeException();
+
+ SwDocShell* pDocShell = word::getDocShell( mxModel );
+ if( pDocShell )
+ {
+ SwFEShell* pFEShell = pDocShell->GetFEShell();
+ if( pFEShell )
+ {
+ pFEShell->SplitTable( HEADLINE_CNTNTCOPY );
+ }
+ }
+}
+
+uno::Any SAL_CALL
+SwVbaSelection::Paragraphs( const uno::Any& aIndex ) throw (uno::RuntimeException)
+{
+ // Hacky implementation due to missing api ( and lack of knowledge )
+ // we can only support a selection that is a single paragraph
+ if ( !aIndex.hasValue() ) // currently we can't support multiple paragraphs in a selection
+ throw uno::RuntimeException();
+
+ sal_Int32 nIndex = 0;
+ aIndex >>= nIndex;
+
+ uno::Any aRet;
+
+ if ( nIndex != 1 )
+ throw uno::RuntimeException();
+
+ uno::Reference< text::XTextRange > xTextRange = mxTextViewCursor->getStart();
+ uno::Reference< text::XText > xText = xTextRange->getText();
+ uno::Reference< text::XParagraphCursor > xParaCursor( xText->createTextCursor(), uno::UNO_QUERY_THROW );
+ xParaCursor->gotoStartOfParagraph( sal_False );
+ xParaCursor->gotoStartOfParagraph( sal_True );
+
+ uno::Reference< text::XTextDocument > xTextDoc( mxModel, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XTextRange > xParaRange( xParaCursor, uno::UNO_QUERY_THROW );
+ uno::Reference< word::XParagraph > xParagraph = new SwVbaParagraph( mxParent, mxContext, xTextDoc, xParaRange );
+
+ aRet <<= xParagraph;
+ return aRet;
+}
+
rtl::OUString&
SwVbaSelection::getServiceImplName()
{
@@ -677,3 +1194,4 @@ SwVbaSelection::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaselection.hxx b/sw/source/ui/vba/vbaselection.hxx
index a5079340ee19..c1a089a48a9d 100644
--- a/sw/source/ui/vba/vbaselection.hxx
+++ b/sw/source/ui/vba/vbaselection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,11 +32,13 @@
#include <ooo/vba/word/XRange.hpp>
#include <vbahelper/vbahelperinterface.hxx>
#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
#include <ooo/vba/word/XParagraphFormat.hpp>
#include <ooo/vba/word/XFind.hpp>
#include <ooo/vba/word/XStyle.hpp>
#include <ooo/vba/word/XFont.hpp>
#include <ooo/vba/word/XHeaderFooter.hpp>
+#include "wordvbahelper.hxx"
typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XSelection > SwVbaSelection_BASE;
@@ -46,17 +49,14 @@ private:
css::uno::Reference< css::text::XTextViewCursor > mxTextViewCursor;
css::uno::Reference< ooo::vba::word::XRange > mxRange;
- enum E_DIRECTION
- {
- MOVE_LEFT = 1,
- MOVE_RIGHT,
- MOVE_UP,
- MOVE_DOWN
- };
-
private:
- void NextCell( sal_Int32 nCount, E_DIRECTION eDirection ) throw ( css::uno::RuntimeException );
+ 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);
+ void NextCell( sal_Int32 nCount, ooo::vba::word::E_DIRECTION eDirection ) throw ( css::uno::RuntimeException );
css::uno::Reference< css::text::XTextRange > GetSelectedRange() throw ( css::uno::RuntimeException );
+ void GetSelectedCellRange( rtl::OUString& sTLName, rtl::OUString& sBRName ) throw ( css::uno::RuntimeException );
+ css::uno::Reference< css::text::XTextTable > GetXTextTable() throw ( css::uno::RuntimeException );
+ sal_Bool IsInTable() throw ( css::uno::RuntimeException );
+ sal_Bool HasSelection() throw ( css::uno::RuntimeException );
public:
SwVbaSelection( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel ) throw ( css::uno::RuntimeException );
@@ -73,6 +73,7 @@ public:
virtual void SAL_CALL MoveRight( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend ) throw (css::uno::RuntimeException);
virtual void SAL_CALL MoveLeft( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend ) throw (css::uno::RuntimeException);
virtual void SAL_CALL MoveDown( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL MoveUp( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend ) throw (css::uno::RuntimeException);
virtual void SAL_CALL TypeParagraph() throw (css::uno::RuntimeException);
virtual void SAL_CALL InsertParagraph() throw (css::uno::RuntimeException);
virtual void SAL_CALL InsertParagraphBefore() throw (css::uno::RuntimeException);
@@ -80,8 +81,8 @@ public:
virtual css::uno::Reference< ooo::vba::word::XParagraphFormat > SAL_CALL getParagraphFormat() throw (css::uno::RuntimeException);
virtual void SAL_CALL setParagraphFormat( const css::uno::Reference< ooo::vba::word::XParagraphFormat >& rParagraphFormat ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< ooo::vba::word::XFind > SAL_CALL getFind() throw (css::uno::RuntimeException);
- virtual css::uno::Reference< ooo::vba::word::XStyle > SAL_CALL getStyle() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setStyle( const css::uno::Reference< ooo::vba::word::XStyle >& _xStyle ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getStyle() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setStyle( const css::uno::Any& _xStyle ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< ooo::vba::word::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
virtual void SAL_CALL TypeBackspace() throw (css::uno::RuntimeException);
virtual css::uno::Reference< ooo::vba::word::XRange > SAL_CALL GoTo( const css::uno::Any& _what, const css::uno::Any& _which, const css::uno::Any& _count, const css::uno::Any& _name ) throw (css::uno::RuntimeException);
@@ -97,9 +98,24 @@ public:
virtual void SAL_CALL setStart( ::sal_Int32 _start ) throw (css::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getEnd() throw (css::uno::RuntimeException);
virtual void SAL_CALL setEnd( ::sal_Int32 _end ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL SelectRow() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL SelectColumn() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Rows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Columns( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Cells( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Copy( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL CopyAsPicture( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Paste( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Collapse( const css::uno::Any& Direction ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL WholeStory( ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL InRange( const css::uno::Reference< ::ooo::vba::word::XRange >& Range ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL SplitTable( ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Paragraphs( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_SELECTION_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx
index cf49da020284..fe701565f146 100644
--- a/sw/source/ui/vba/vbastyle.cxx
+++ b/sw/source/ui/vba/vbastyle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,15 +29,18 @@
#include "vbastyle.hxx"
#include <ooo/vba/word/WdStyleType.hpp>
#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
#include <i18npool/mslangid.hxx>
#include "vbafont.hxx"
#include "vbapalette.hxx"
+#include "vbaparagraphformat.hxx"
+#include "vbastyles.hxx"
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-SwVbaStyle::SwVbaStyle( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet ) throw ( script::BasicErrorException, uno::RuntimeException ) : SwVbaStyle_BASE( xParent, xContext ) , mxStyleProps( _xPropertySet )
+SwVbaStyle::SwVbaStyle( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel>& xModel, const uno::Reference< beans::XPropertySet >& _xPropertySet ) throw ( script::BasicErrorException, uno::RuntimeException ) : SwVbaStyle_BASE( xParent, xContext ) , mxModel( xModel ), mxStyleProps( _xPropertySet )
{
mxStyle.set( _xPropertySet, uno::UNO_QUERY_THROW );
}
@@ -84,7 +88,7 @@ void SAL_CALL SwVbaStyle::setLanguageID( ::sal_Int32 _languageid ) throw (uno::R
nType = word::WdStyleType::wdStyleTypeParagraph;
else if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.CharacterStyle") ) ) )
nType = word::WdStyleType::wdStyleTypeCharacter;
- else // if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.NumberingStyle") ) ) )
+ else
nType = word::WdStyleType::wdStyleTypeList;
return nType;
}
@@ -96,10 +100,31 @@ SwVbaStyle::getFont() throw ( uno::RuntimeException )
return new SwVbaFont( mxParent, mxContext, aColors.getPalette(), mxStyleProps );
}
-void SwVbaStyle::setStyle( const uno::Reference< beans::XPropertySet >& xTCProps, const uno::Reference< ooo::vba::word::XStyle >& xStyle )throw (uno::RuntimeException)
+
+void SAL_CALL SwVbaStyle::LinkToListTemplate( const uno::Reference< word::XListTemplate >& /*ListTemplate*/, const uno::Any& /*ListLevelNumber*/ ) throw (uno::RuntimeException)
+{
+}
+
+void SwVbaStyle::setStyle( const uno::Reference< beans::XPropertySet >& xParaProps, const uno::Any& rStyle )throw (uno::RuntimeException)
{
- rtl::OUString aStyleType = getOOoStyleTypeFromMSWord( xStyle->getType() );
- xTCProps->setPropertyValue( aStyleType, uno::makeAny( xStyle->getName() ) );
+ rtl::OUString sStyle;
+ uno::Reference< word::XStyle > xStyle;
+ if( rStyle >>= xStyle )
+ {
+ sStyle = xStyle->getName();
+ }
+ else
+ {
+ rStyle >>= sStyle;
+ }
+
+ if( sStyle.getLength() )
+ {
+ xParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName") ), uno::makeAny( sStyle ) );
+ return;
+ }
+
+ throw uno::RuntimeException();
}
rtl::OUString SwVbaStyle::getOOoStyleTypeFromMSWord( sal_Int32 _wdStyleType )
@@ -129,6 +154,115 @@ rtl::OUString SwVbaStyle::getOOoStyleTypeFromMSWord( sal_Int32 _wdStyleType )
return aStyleType;
}
+::rtl::OUString SAL_CALL SwVbaStyle::getNameLocal() throw (uno::RuntimeException)
+{
+ rtl::OUString sNameLocal;
+ mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DisplayName") ) ) >>= sNameLocal;
+ return sNameLocal;
+}
+
+void SAL_CALL SwVbaStyle::setNameLocal( const ::rtl::OUString& _namelocal ) throw (uno::RuntimeException)
+{
+ mxStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DisplayName") ), uno::makeAny( _namelocal ) );
+}
+
+uno::Reference< word::XParagraphFormat > SAL_CALL SwVbaStyle::getParagraphFormat() throw (uno::RuntimeException)
+{
+ if( word::WdStyleType::wdStyleTypeParagraph == getType() )
+ {
+ uno::Reference< text::XTextDocument > xTextDocument( mxModel, uno::UNO_QUERY_THROW );
+ return uno::Reference< word::XParagraphFormat >( new SwVbaParagraphFormat( this, mxContext, xTextDocument, mxStyleProps ) );
+ }
+ else
+ {
+ throw uno::RuntimeException();
+ }
+ return uno::Reference< word::XParagraphFormat >();
+}
+
+::sal_Bool SAL_CALL SwVbaStyle::getAutomaticallyUpdate() throw (uno::RuntimeException)
+{
+ sal_Bool isAutoUpdate = sal_False;
+ mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsAutoUpdate") ) ) >>= isAutoUpdate;
+ return isAutoUpdate;
+}
+
+void SAL_CALL SwVbaStyle::setAutomaticallyUpdate( ::sal_Bool _automaticallyupdate ) throw (uno::RuntimeException)
+{
+ mxStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsAutoUpdate") ), uno::makeAny( _automaticallyupdate ) );
+}
+
+uno::Any SAL_CALL SwVbaStyle::getBaseStyle() throw (uno::RuntimeException)
+{
+ // ParentStyle
+ rtl::OUString sBaseStyle;
+ mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParentStyle") ) ) >>= sBaseStyle;
+ if( sBaseStyle.getLength() > 0 )
+ {
+ uno::Reference< XCollection > xCol( new SwVbaStyles( this, mxContext, mxModel ) );
+ return xCol->Item( uno::makeAny( sBaseStyle ), uno::Any() );
+ }
+ else
+ {
+ throw uno::RuntimeException();
+ }
+ return uno::Any();
+}
+
+void SAL_CALL SwVbaStyle::setBaseStyle( const uno::Any& _basestyle ) throw (uno::RuntimeException)
+{
+ uno::Reference< word::XStyle > xStyle;
+ _basestyle >>= xStyle;
+ if( xStyle.is() )
+ {
+ rtl::OUString sBaseStyle = xStyle->getName();
+ mxStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParentStyle") ), uno::makeAny( sBaseStyle ) );
+ }
+ else
+ {
+ throw uno::RuntimeException();
+ }
+}
+
+uno::Any SAL_CALL SwVbaStyle::getNextParagraphStyle() throw (uno::RuntimeException)
+{
+ //FollowStyle
+ rtl::OUString sFollowStyle;
+ mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FollowStyle") ) ) >>= sFollowStyle;
+ if( sFollowStyle.getLength() > 0 )
+ {
+ uno::Reference< XCollection > xCol( new SwVbaStyles( this, mxContext, mxModel ) );
+ return xCol->Item( uno::makeAny( sFollowStyle ), uno::Any() );
+ }
+ else
+ {
+ throw uno::RuntimeException();
+ }
+ return uno::Any();
+}
+
+void SAL_CALL SwVbaStyle::setNextParagraphStyle( const uno::Any& _nextparagraphstyle ) throw (uno::RuntimeException)
+{
+ uno::Reference< word::XStyle > xStyle;
+ _nextparagraphstyle >>= xStyle;
+ if( xStyle.is() )
+ {
+ rtl::OUString sFollowStyle = xStyle->getName();
+ mxStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FollowStyle") ), uno::makeAny( sFollowStyle ) );
+ }
+ else
+ {
+ throw uno::RuntimeException();
+ }
+}
+
+::sal_Int32 SAL_CALL SwVbaStyle::getListLevelNumber() throw (uno::RuntimeException)
+{
+ sal_Int16 nNumberingLevel = 0;
+ mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingLevel") ) ) >>= nNumberingLevel;
+ return nNumberingLevel;
+}
+
rtl::OUString&
SwVbaStyle::getServiceImplName()
{
@@ -147,3 +281,5 @@ SwVbaStyle::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbastyle.hxx b/sw/source/ui/vba/vbastyle.hxx
index 401baa5337a1..4052a6bd8162 100644
--- a/sw/source/ui/vba/vbastyle.hxx
+++ b/sw/source/ui/vba/vbastyle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,6 +34,7 @@
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/style/XStyle.hpp>
#include <ooo/vba/word/XFont.hpp>
+#include <ooo/vba/word/XListTemplate.hpp>
typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XStyle > SwVbaStyle_BASE;
@@ -40,13 +42,14 @@ typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XStyle > SwVbaStyle_BASE;
class SwVbaStyle : public SwVbaStyle_BASE
{
private:
+ css::uno::Reference< css::frame::XModel > mxModel;
css::uno::Reference< css::beans::XPropertySet > mxStyleProps;
css::uno::Reference< css::style::XStyle > mxStyle;
public:
- SwVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
+ SwVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet ) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
virtual ~SwVbaStyle(){}
- static void setStyle( const css::uno::Reference< css::beans::XPropertySet >& xTCProps, const css::uno::Reference< ooo::vba::word::XStyle >& xStyle ) throw (css::uno::RuntimeException);
+ static void setStyle( const css::uno::Reference< css::beans::XPropertySet >& xParaProps, const css::uno::Any& xStyle ) throw (css::uno::RuntimeException);
static rtl::OUString getOOoStyleTypeFromMSWord( sal_Int32 _wdStyleType );
static sal_Int32 getLanguageID( const css::uno::Reference< css::beans::XPropertySet >& xTCProps ) throw (css::uno::RuntimeException);
static void setLanguageID( const css::uno::Reference< css::beans::XPropertySet >& xTCProps, sal_Int32 _languageid ) throw (css::uno::RuntimeException);
@@ -58,6 +61,20 @@ public:
virtual void SAL_CALL setLanguageID( ::sal_Int32 _languageid ) throw (css::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException);
virtual css::uno::Reference< ooo::vba::word::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL LinkToListTemplate( const css::uno::Reference< ooo::vba::word::XListTemplate >& ListTemplate, const css::uno::Any& ListLevelNumber ) throw (css::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getNameLocal() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setNameLocal( const ::rtl::OUString& _namelocal ) throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ::ooo::vba::word::XParagraphFormat > SAL_CALL getParagraphFormat() throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getAutomaticallyUpdate() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setAutomaticallyUpdate( ::sal_Bool _automaticallyupdate ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getBaseStyle() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setBaseStyle( const css::uno::Any& _basestyle ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getNextParagraphStyle() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setNextParagraphStyle( const css::uno::Any& _nextparagraphstyle ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getListLevelNumber() throw (css::uno::RuntimeException);
+
+ //XDefaultProperty
+ virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")); }
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
@@ -65,3 +82,5 @@ public:
};
#endif //SW_VBA_AXIS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx
index 371c1225cafa..cd4f353d29d4 100644
--- a/sw/source/ui/vba/vbastyles.cxx
+++ b/sw/source/ui/vba/vbastyles.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,7 +45,7 @@ struct BuiltinStyleTable
sal_Int32 wdStyleType;
};
-const BuiltinStyleTable aBuiltinStyleTable[] =
+static const BuiltinStyleTable aBuiltinStyleTable[] =
{
{ word::WdBuiltinStyle::wdStyleBlockQuotation, "", word::WdStyleType::wdStyleTypeParagraph },
{ word::WdBuiltinStyle::wdStyleBodyText, "Text body", word::WdStyleType::wdStyleTypeParagraph },
@@ -152,51 +153,36 @@ const BuiltinStyleTable aBuiltinStyleTable[] =
{ 0, 0, 0 }
};
+struct MSOStyleNameTable
+{
+ const sal_Char* pMSOStyleName;
+ const sal_Char* pOOoStyleName;
+ const sal_Char* pOOoStyleType;
+};
-static uno::Sequence< rtl::OUString > getStyleTypes()
+static const MSOStyleNameTable aMSOStyleNameTable[] =
{
- uno::Sequence< rtl::OUString > aRet(3);
- rtl::OUString* pArray = aRet.getArray();
- pArray[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") );
- pArray[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharacterStyles") );
- pArray[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingStyles") );
- return aRet;
-}
+ { "Normal", "Default", "ParagraphStyles" },
+ { 0, 0, 0 }
+};
typedef ::cppu::WeakImplHelper1< container::XEnumeration > StyleEnumeration_BASE;
typedef ::cppu::WeakImplHelper3< container::XNameAccess, container::XIndexAccess, container::XEnumerationAccess > StyleCollectionHelper_BASE;
-/*
-class StylesEnumeration : public StyleEnumeration_BASE
-{
-public:
- StylesEnumeration( const SheetMap& sMap ) : mSheetMap( sMap ), mIt( mSheetMap.begin() ) {}
- virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
- {
- return ( mIt != mSheetMap.end() );
- }
- virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
- {
- if ( !hasMoreElements() )
- throw container::NoSuchElementException();
- uno::Reference< sheet::XSpreadsheet > xSheet( *mIt++ );
- return uno::makeAny( xSheet ) ;
- }
-};
-*/
+
class StyleCollectionHelper : public StyleCollectionHelper_BASE
{
private:
uno::Reference< frame::XModel > mxModel;
- uno::Reference< container::XNameAccess > mxStyleFamilies;
- uno::Reference< container::XNameContainer > mxCurrentStyleFamily;
+ uno::Reference< container::XNameAccess > mxParaStyles;
uno::Any cachePos;
public:
StyleCollectionHelper( const uno::Reference< frame::XModel >& _xModel ) : mxModel( _xModel )
{
+ // we only concern about the Paragraph styles
uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( _xModel, uno::UNO_QUERY_THROW);
- mxStyleFamilies = xStyleSupplier->getStyleFamilies();
+ uno::Reference< container::XNameAccess > xStyleFamilies = xStyleSupplier->getStyleFamilies();
+ mxParaStyles.set( xStyleFamilies->getByName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") ) ), uno::UNO_QUERY_THROW );
}
- uno::Reference< container::XNameContainer > getCurrentStyleFamily(){ return mxCurrentStyleFamily; }
// XElementAccess
virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return style::XStyle::static_type(0); }
virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { return getCount() > 0; }
@@ -209,32 +195,42 @@ public:
}
virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException)
{
- uno::Sequence< rtl::OUString > sNames( getCount() );
- rtl::OUString* pString = sNames.getArray();
- uno::Sequence< rtl::OUString > aStyleTypes = getStyleTypes();
- sal_Int32 nCount = 0;
- for( sal_Int32 i = 0; i < aStyleTypes.getLength(); i++ )
+ return mxParaStyles->getElementNames();
+ }
+ virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
+ {
+ // search in the MSOStyleName table first
+ for( const MSOStyleNameTable* pTable = aMSOStyleNameTable; pTable->pMSOStyleName != NULL; pTable++ )
{
- uno::Reference< container::XNameAccess > xNameAccess( mxStyleFamilies->getByName( aStyleTypes[i] ), uno::UNO_QUERY_THROW );
- uno::Sequence< rtl::OUString > sElementNames = xNameAccess->getElementNames();
- for( sal_Int32 j = 0; j < sElementNames.getLength(); j++ )
+ if( aName.equalsIgnoreAsciiCaseAscii( pTable->pMSOStyleName ) )
{
- pString[nCount++] = sElementNames[j];
+ //Found it
+ rtl::OUString sStyleName = rtl::OUString::createFromAscii( pTable->pOOoStyleName );
+ if( mxParaStyles->hasByName( sStyleName ) )
+ {
+ cachePos = mxParaStyles->getByName( sStyleName );
+ return sal_True;
+ }
+ return sal_False;
}
}
- return sNames;
- }
- virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
- {
- uno::Sequence< rtl::OUString > aStyleTypes = getStyleTypes();
- for( sal_Int32 i = 0; i < aStyleTypes.getLength(); i++ )
+
+ if( mxParaStyles->hasByName( aName ) )
{
- uno::Reference< container::XNameAccess > xNameAccess( mxStyleFamilies->getByName( aStyleTypes[i] ), uno::UNO_QUERY_THROW );
- if( xNameAccess->hasByName( aName ) )
+ cachePos = mxParaStyles->getByName( aName );
+ return sal_True;
+ }
+ else
+ {
+ uno::Sequence< rtl::OUString > sElementNames = mxParaStyles->getElementNames();
+ for( sal_Int32 j = 0; j < sElementNames.getLength(); j++ )
{
- cachePos = xNameAccess->getByName( aName );
- mxCurrentStyleFamily.set( xNameAccess, uno::UNO_QUERY_THROW );
- return sal_True;
+ rtl::OUString aStyleName = sElementNames[j];
+ if( aStyleName.equalsIgnoreAsciiCase( aName ) )
+ {
+ cachePos = mxParaStyles->getByName( aStyleName );
+ return sal_True;
+ }
}
}
return sal_False;
@@ -243,44 +239,43 @@ public:
// XIndexAccess
virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
{
- uno::Sequence< rtl::OUString > aStyleTypes = getStyleTypes();
- sal_Int32 nCount = 0;
- for( sal_Int32 i = 0; i < aStyleTypes.getLength(); i++ )
- {
- uno::Reference< container::XIndexAccess > xIndexAccess( mxStyleFamilies->getByName( aStyleTypes[i] ), uno::UNO_QUERY_THROW );
- nCount += xIndexAccess->getCount();
- }
- return nCount;
+ uno::Reference< container::XIndexAccess > xIndexAccess( mxParaStyles, uno::UNO_QUERY_THROW );
+ return xIndexAccess->getCount();
}
virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
{
if ( Index < 0 || Index >= getCount() )
throw lang::IndexOutOfBoundsException();
- // FIXME: need to make a alphabetically sorted list of style names
- uno::Sequence< rtl::OUString > aStyleTypes = getStyleTypes();
- for( sal_Int32 i = 0; i < aStyleTypes.getLength(); i++ )
- {
- uno::Reference< container::XIndexAccess > xIndexAccess( mxStyleFamilies->getByName( aStyleTypes[i] ), uno::UNO_QUERY_THROW );
- sal_Int32 nCount = xIndexAccess->getCount();
- if( Index >= nCount )
- Index -= nCount;
- else
- {
- mxCurrentStyleFamily.set( xIndexAccess, uno::UNO_QUERY_THROW );
- return xIndexAccess->getByIndex( Index );
- }
- }
- throw lang::IndexOutOfBoundsException();
+ uno::Reference< container::XIndexAccess > xIndexAccess( mxParaStyles, uno::UNO_QUERY_THROW );
+ return xIndexAccess->getByIndex( Index );
}
// XEnumerationAccess
virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException)
{
- // FIXME:
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
}
};
+class StylesEnumWrapper : public EnumerationHelper_BASE
+{
+ SwVbaStyles* pStyles;
+ sal_Int32 nIndex;
+public:
+ StylesEnumWrapper( SwVbaStyles* _pStyles ) : pStyles( _pStyles ), nIndex( 1 ) {}
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( nIndex <= pStyles->getCount() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( nIndex <= pStyles->getCount() )
+ return pStyles->Item( uno::makeAny( nIndex++ ), uno::Any() );
+ throw container::NoSuchElementException();
+ }
+};
+
SwVbaStyles::SwVbaStyles( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ) throw ( script::BasicErrorException ) : SwVbaStyles_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new StyleCollectionHelper( xModel ) ) ), mxModel( xModel )
{
mxMSF.set( mxModel, uno::UNO_QUERY_THROW );
@@ -290,7 +285,7 @@ uno::Any
SwVbaStyles::createCollectionObject(const uno::Any& aObject)
{
uno::Reference< beans::XPropertySet > xStyleProp( aObject, uno::UNO_QUERY_THROW );
- return uno::makeAny( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, xStyleProp ) ) );
+ return uno::makeAny( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, mxModel, xStyleProp ) ) );
}
uno::Type SAL_CALL
@@ -302,7 +297,7 @@ SwVbaStyles::getElementType() throw (uno::RuntimeException)
uno::Reference< container::XEnumeration > SAL_CALL
SwVbaStyles::createEnumeration() throw (uno::RuntimeException)
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+ return new StylesEnumWrapper( this );
}
uno::Any SAL_CALL
@@ -319,7 +314,7 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) throw (uno::
rtl::OUString aStyleName = rtl::OUString::createFromAscii( pTable->pOOoStyleName );
if( aStyleName.getLength() > 0 )
{
- rtl::OUString aStyleType = SwVbaStyle::getOOoStyleTypeFromMSWord( pTable->wdStyleType );
+ rtl::OUString aStyleType;
switch( pTable->wdStyleType )
{
case word::WdStyleType::wdStyleTypeParagraph:
@@ -335,7 +330,8 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) throw (uno::
}
case word::WdStyleType::wdStyleTypeList:
{
- aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingStyles") );
+ // should use Paragraph style and set the property "NumberingStyleName"
+ aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") );
break;
}
default:
@@ -344,7 +340,12 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) throw (uno::
uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( mxModel, uno::UNO_QUERY_THROW);
uno::Reference< container::XNameAccess > xStylesAccess( xStyleSupplier->getStyleFamilies()->getByName( aStyleType ), uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xStyleProps( xStylesAccess->getByName( aStyleName ), uno::UNO_QUERY_THROW );
- return uno::makeAny( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, xStyleProps ) ) );
+ // set the property "NumberingStyleName" if it is a listbullet
+ if( pTable->wdStyleType == word::WdStyleType::wdStyleTypeList )
+ {
+ xStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingStyleName") ), uno::makeAny( aStyleName ) );
+ }
+ return uno::makeAny( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, mxModel, xStyleProps ) ) );
}
else
{
@@ -375,3 +376,5 @@ SwVbaStyles::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbastyles.hxx b/sw/source/ui/vba/vbastyles.hxx
index 9cd2e2ff5b1a..209d58a1caa9 100644
--- a/sw/source/ui/vba/vbastyles.hxx
+++ b/sw/source/ui/vba/vbastyles.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,3 +50,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx
index 42d1c09ccbac..baac088c1490 100644
--- a/sw/source/ui/vba/vbasystem.cxx
+++ b/sw/source/ui/vba/vbasystem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,12 @@
#include <tools/string.hxx>
#include <osl/file.hxx>
#include <tools/urlobj.hxx>
-#include <tools/string.hxx>
+
+#ifdef WNT
+#include <prewin.h>
+#include <postwin.h>
+#include <tchar.h>
+#endif
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -47,13 +53,79 @@ void PrivateProfileStringListener::Initialize( const rtl::OUString& rFileName, c
maGroupName = rGroupName;
maKey = rKey;
}
+#ifdef WNT
+void lcl_getRegKeyInfo( const ByteString& sKeyInfo, HKEY& hBaseKey, ByteString& sSubKey )
+{
+ sal_Int32 nBaseKeyIndex = sKeyInfo.Search('\\');
+ if( nBaseKeyIndex > 0 )
+ {
+ ByteString sBaseKey = sKeyInfo.Copy( 0, nBaseKeyIndex );
+ sSubKey = sKeyInfo.Copy( nBaseKeyIndex + 1 );
+ if( sBaseKey.Equals("HKEY_CURRENT_USER") )
+ {
+ hBaseKey = HKEY_CURRENT_USER;
+ }
+ else if( sBaseKey.Equals("HKEY_LOCAL_MACHINE") )
+ {
+ hBaseKey = HKEY_LOCAL_MACHINE;
+ }
+ else if( sBaseKey.Equals("HKEY_CLASSES_ROOT") )
+ {
+ hBaseKey = HKEY_CLASSES_ROOT;
+ }
+ else if( sBaseKey.Equals("HKEY_USERS") )
+ {
+ hBaseKey = HKEY_USERS;
+ }
+ else if( sBaseKey.Equals("HKEY_CURRENT_CONFIG") )
+ {
+ hBaseKey = HKEY_CURRENT_CONFIG;
+ }
+ }
+}
+#endif
uno::Any PrivateProfileStringListener::getValueEvent()
{
// get the private profile string
- Config aCfg( maFileName );
- aCfg.SetGroup( maGroupName );
- rtl::OUString sValue = String( aCfg.ReadKey( maKey ), RTL_TEXTENCODING_DONTKNOW );
+ rtl::OUString sValue;
+ if(maFileName.getLength())
+ {
+ // get key/value from a file
+ Config aCfg( maFileName );
+ aCfg.SetGroup( maGroupName );
+ sValue = String( aCfg.ReadKey( maKey ), RTL_TEXTENCODING_DONTKNOW );
+ }
+ else
+ {
+ // get key/value from windows register
+#ifdef WNT
+ HKEY hBaseKey = NULL;
+ ByteString sSubKey;
+ sal_Int32 nBaseKeyIndex = maGroupName.Search('\\');
+ lcl_getRegKeyInfo( maGroupName, hBaseKey, sSubKey );
+ if( hBaseKey != NULL )
+ {
+ HKEY hKey = NULL;
+ LONG lResult;
+ LPCTSTR lpSubKey = TEXT( sSubKey.GetBuffer());
+ TCHAR szBuffer[1024];
+ DWORD cbData = sizeof( szBuffer );
+ lResult = RegOpenKeyEx( hBaseKey, lpSubKey, 0, KEY_QUERY_VALUE, &hKey );
+ if( ERROR_SUCCESS == lResult )
+ {
+ LPCTSTR lpValueName = TEXT(maKey.GetBuffer());
+ lResult = RegQueryValueEx( hKey, lpValueName, NULL, NULL, (LPBYTE)szBuffer, &cbData );
+ RegCloseKey( hKey );
+ sValue = rtl::OUString::createFromAscii(szBuffer);
+ }
+ }
+
+ return uno::makeAny( sValue );
+#endif
+ throw uno::RuntimeException( rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("Only support on Windows")), uno::Reference< uno::XInterface >() );
+ }
return uno::makeAny( sValue );
}
@@ -61,12 +133,44 @@ uno::Any PrivateProfileStringListener::getValueEvent()
void PrivateProfileStringListener::setValueEvent( const css::uno::Any& value )
{
// set the private profile string
- Config aCfg( maFileName );
- aCfg.SetGroup( maGroupName );
-
rtl::OUString aValue;
value >>= aValue;
- aCfg.WriteKey( maKey, ByteString( aValue.getStr(), RTL_TEXTENCODING_DONTKNOW ) );
+ if(maFileName.getLength())
+ {
+ // set value into a file
+ Config aCfg( maFileName );
+ aCfg.SetGroup( maGroupName );
+ aCfg.WriteKey( maKey, ByteString( aValue.getStr(), RTL_TEXTENCODING_DONTKNOW ) );
+ }
+ else
+ {
+ //set value into windows register
+#ifdef WNT
+ HKEY hBaseKey = NULL;
+ ByteString sSubKey;
+ sal_Int32 nBaseKeyIndex = maGroupName.Search('\\');
+ lcl_getRegKeyInfo( maGroupName, hBaseKey, sSubKey );
+ if( hBaseKey != NULL )
+ {
+ HKEY hKey = NULL;
+ LONG lResult;
+ LPCTSTR lpSubKey = TEXT( sSubKey.GetBuffer());
+ lResult = RegCreateKeyEx( hBaseKey, lpSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, NULL );
+ if( ERROR_SUCCESS == lResult )
+ {
+ LPCTSTR szValue = TEXT( rtl::OUStringToOString( aValue, RTL_TEXTENCODING_UTF8 ).getStr() );
+ DWORD cbData = sizeof(TCHAR) * (_tcslen(szValue) + 1);
+ LPCTSTR lpValueName = TEXT(maKey.GetBuffer());
+ lResult = RegSetValueEx( hKey, lpValueName, NULL, REG_SZ, (LPBYTE)szValue, cbData );
+ RegCloseKey( hKey );
+ }
+ }
+ return;
+#endif
+ throw uno::RuntimeException( rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("Not implemented")), uno::Reference< uno::XInterface >() );
+ }
+
}
SwVbaSystem::SwVbaSystem( uno::Reference<uno::XComponentContext >& xContext ): SwVbaSystem_BASE( uno::Reference< XHelperInterface >(), xContext )
@@ -146,19 +250,19 @@ SwVbaSystem::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException)
uno::Any SAL_CALL
SwVbaSystem::PrivateProfileString( const rtl::OUString& rFilename, const rtl::OUString& rSection, const rtl::OUString& rKey ) throw ( uno::RuntimeException )
{
- if( rFilename.getLength() == 0 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
-
// FIXME: need to detect whether it is a relative file path
// we need to detect if this is a URL, if not then assume its a file path
rtl::OUString sFileUrl;
- INetURLObject aObj;
- aObj.SetURL( rFilename );
- bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
- if ( bIsURL )
- sFileUrl = rFilename;
- else
- osl::FileBase::getFileURLFromSystemPath( rFilename, sFileUrl);
+ if( rFilename.getLength() )
+ {
+ INetURLObject aObj;
+ aObj.SetURL( rFilename );
+ bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ if ( bIsURL )
+ sFileUrl = rFilename;
+ else
+ osl::FileBase::getFileURLFromSystemPath( rFilename, sFileUrl);
+ }
ByteString aGroupName = ByteString( rSection.getStr(), RTL_TEXTENCODING_DONTKNOW);
ByteString aKey = ByteString( rKey.getStr(), RTL_TEXTENCODING_DONTKNOW);
@@ -185,3 +289,5 @@ SwVbaSystem::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbasystem.hxx b/sw/source/ui/vba/vbasystem.hxx
index deeb6f00fdf4..043f35f56440 100644
--- a/sw/source/ui/vba/vbasystem.hxx
+++ b/sw/source/ui/vba/vbasystem.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,3 +70,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_SYSTEM_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatable.cxx b/sw/source/ui/vba/vbatable.cxx
index 11969d6717a0..b60e9249b34e 100644
--- a/sw/source/ui/vba/vbatable.cxx
+++ b/sw/source/ui/vba/vbatable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "vbatable.hxx"
#include "vbarange.hxx"
#include <com/sun/star/frame/XModel.hpp>
@@ -9,11 +10,13 @@
#include <com/sun/star/container/XNamed.hpp>
#include "vbaborders.hxx"
#include "vbapalette.hxx"
+#include "vbarows.hxx"
+#include "vbacolumns.hxx"
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-SwVbaTable::SwVbaTable( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rDocument, const uno::Reference< css::text::XTextTable >& xTextTable) throw ( uno::RuntimeException ) : SwVbaTable_BASE( rParent, rContext ), mxTextDocument( rDocument )
+SwVbaTable::SwVbaTable( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rDocument, const uno::Reference< text::XTextTable >& xTextTable) throw ( uno::RuntimeException ) : SwVbaTable_BASE( rParent, rContext ), mxTextDocument( rDocument )
{
mxTextTable.set( xTextTable, uno::UNO_QUERY_THROW );
}
@@ -75,6 +78,26 @@ SwVbaTable::Borders( const uno::Any& index ) throw (uno::RuntimeException)
return uno::makeAny( xCol );
}
+uno::Any SAL_CALL
+SwVbaTable::Rows( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< table::XTableRows > xTableRows( mxTextTable->getRows(), uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xCol( new SwVbaRows( this, mxContext, mxTextTable, xTableRows ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
+uno::Any SAL_CALL
+SwVbaTable::Columns( const uno::Any& index ) throw (uno::RuntimeException)
+{
+ uno::Reference< table::XTableColumns > xTableColumns( mxTextTable->getColumns(), uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xCol( new SwVbaColumns( this, mxContext, mxTextTable, xTableColumns ) );
+ if ( index.hasValue() )
+ return xCol->Item( index, uno::Any() );
+ return uno::makeAny( xCol );
+}
+
// XHelperInterface
rtl::OUString&
SwVbaTable::getServiceImplName()
@@ -95,3 +118,4 @@ SwVbaTable::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatable.hxx b/sw/source/ui/vba/vbatable.hxx
index 7d913d718895..16345024381d 100644
--- a/sw/source/ui/vba/vbatable.hxx
+++ b/sw/source/ui/vba/vbatable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef SW_VBA_TABLE_HXX
#define SW_VBA_TABLE_HXX
#include <vbahelper/vbahelperinterface.hxx>
@@ -14,15 +15,20 @@ class SwVbaTable : public SwVbaTable_BASE
css::uno::Reference< css::text::XTextTable > mxTextTable;
public:
SwVbaTable( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rDocument, const css::uno::Reference< css::text::XTextTable >& xTextTable) throw ( css::uno::RuntimeException);
- css::uno::Reference< css::text::XTextDocument > getDocument() { return mxTextDocument; };
+ css::uno::Reference< css::text::XTextDocument > getDocument() const { return mxTextDocument; };
virtual css::uno::Reference< ::ooo::vba::word::XRange > SAL_CALL Range( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual void SAL_CALL Select( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual void SAL_CALL Delete( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual css::uno::Reference< ::ooo::vba::word::XRange > SAL_CALL ConvertToText( const css::uno::Any& Separator, const css::uno::Any& NestedTables ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual rtl::OUString SAL_CALL getName( ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Rows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Columns( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx
new file mode 100644
index 000000000000..072c39485a3e
--- /dev/null
+++ b/sw/source/ui/vba/vbatablehelper.cxx
@@ -0,0 +1,295 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbatablehelper.hxx"
+#include <swtable.hxx>
+#include <unotbl.hxx>
+#include <docsh.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::ooo::vba;
+
+#define UNO_TABLE_COLUMN_SUM 10000
+
+SwVbaTableHelper::SwVbaTableHelper( const uno::Reference< text::XTextTable >& xTextTable ) throw (uno::RuntimeException) : mxTextTable( xTextTable ), pDoc( NULL )
+{
+ pTable = GetSwTable( mxTextTable );
+}
+
+SwTable* SwVbaTableHelper::GetSwTable( const uno::Reference< text::XTextTable >& xTextTable ) throw (uno::RuntimeException)
+{
+ uno::Reference< lang::XUnoTunnel > xTunnel( xTextTable, uno::UNO_QUERY_THROW );
+ SwXTextTable* pXTextTable = reinterpret_cast< SwXTextTable * >( sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething(SwXTextTable::getUnoTunnelId())));
+ if( !pXTextTable )
+ throw uno::RuntimeException();
+
+ SwFrmFmt* pFrmFmt = pXTextTable->GetFrmFmt();
+ if( !pFrmFmt )
+ throw uno::RuntimeException();
+
+ SwTable* pTable = SwTable::FindTable( pFrmFmt );
+ return pTable;
+}
+
+sal_Int32 SwVbaTableHelper::getTabColumnsCount( sal_Int32 nRowIndex ) throw (uno::RuntimeException)
+{
+ sal_Int32 nRet = 0;
+ if(!pTable->IsTblComplex())
+ {
+ SwTableLines& rLines = pTable->GetTabLines();
+ SwTableLine* pLine = rLines.GetObject( nRowIndex );
+ nRet = pLine->GetTabBoxes().Count();
+ }
+ return nRet;
+}
+
+sal_Int32 SwVbaTableHelper::getTabColumnsMaxCount( ) throw (uno::RuntimeException)
+{
+ sal_Int32 nRet = 0;
+ //sal_Int32 nRowCount = mxTextTable->getRows()->getCount();
+ sal_Int32 nRowCount = pTable->GetTabLines().Count();
+ for( sal_Int32 index = 0; index < nRowCount; index++ )
+ {
+ sal_Int32 nColCount = getTabColumnsCount( index );
+ if( nRet < nColCount )
+ nRet = nColCount;
+ }
+ return nRet;
+}
+
+sal_Int32 SwVbaTableHelper::getTabRowIndex( const rtl::OUString& CellName ) throw (uno::RuntimeException)
+{
+ sal_Int32 nRet = 0;
+ String sCellName(CellName);
+ SwTableBox* pBox = (SwTableBox*)pTable->GetTblBox( sCellName );
+ if( !pBox )
+ throw uno::RuntimeException();
+
+ const SwTableLine* pLine = pBox->GetUpper();
+ const SwTableLines* pLines = pLine->GetUpper()
+ ? &pLine->GetUpper()->GetTabLines() : &pTable->GetTabLines();
+ nRet = pLines->GetPos( pLine );
+ return nRet;
+}
+
+sal_Int32 SwVbaTableHelper::getTabColIndex( const rtl::OUString& CellName ) throw (uno::RuntimeException)
+{
+ sal_Int32 nRet = 0;
+ String sCellName(CellName);
+ const SwTableBox* pBox = (SwTableBox*)pTable->GetTblBox( sCellName );
+ if( !pBox )
+ throw uno::RuntimeException();
+ const SwTableBoxes* pBoxes = &pBox->GetUpper()->GetTabBoxes();
+ nRet = pBoxes->GetPos( pBox );
+ return nRet;
+}
+
+rtl::OUString SwVbaTableHelper::getColumnStr( sal_Int32 nCol )
+{
+ const sal_Int32 coDiff = 52; // 'A'-'Z' 'a' - 'z'
+ sal_Int32 nCalc = 0;
+
+ String sRet;
+ do{
+ nCalc = nCol % coDiff;
+ if( nCalc >= 26 )
+ sRet.Insert( sal_Unicode('a' - 26 + nCalc ), 0 );
+ else
+ sRet.Insert( sal_Unicode('A' + nCalc ), 0 );
+
+ if( 0 == ( nCol = nCol - nCalc ) )
+ break;
+ nCol /= coDiff;
+ --nCol;
+ }while(1);
+ return sRet;
+}
+
+sal_Int32 SwVbaTableHelper::getTableWidth( ) throw (uno::RuntimeException)
+{
+ sal_Int32 nWidth = 0;
+ sal_Bool isWidthRelatvie = sal_False;
+ uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW );
+ xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsWidthRelative") ) ) >>= isWidthRelatvie;
+ if( isWidthRelatvie )
+ {
+ xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RelativeWidth") ) ) >>= nWidth;
+ }
+ else
+ {
+ xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ) ) >>= nWidth;
+ }
+ return nWidth;
+}
+
+void SwVbaTableHelper::setTableWidth( sal_Int32 _width ) throw (uno::RuntimeException)
+{
+ sal_Bool isWidthRelatvie = sal_False;
+ uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW );
+ xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsWidthRelative") ) ) >>= isWidthRelatvie;
+ if( isWidthRelatvie )
+ {
+ xTableProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RelativeWidth") ), uno::makeAny( _width ));
+ }
+ else
+ {
+ xTableProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ), uno::makeAny( _width ) );
+ }
+}
+
+SwTableBox* SwVbaTableHelper::GetTabBox( sal_Int32 nCol, sal_Int32 nRow ) throw (css::uno::RuntimeException)
+{
+ SwTableLines& rLines = pTable->GetTabLines();
+ sal_Int32 nRowCount = rLines.Count();
+ if( nRowCount < nRow )
+ throw uno::RuntimeException();
+
+ SwTableBox* pStart = NULL;
+ SwTableLine* pLine = rLines.GetObject( nRow );
+ if( pLine->GetTabBoxes().Count() < nCol )
+ throw uno::RuntimeException();
+
+ pStart = pLine->GetTabBoxes()[ nCol ];
+
+ if( !pStart )
+ throw uno::RuntimeException();
+
+ return pStart;
+}
+
+void SwVbaTableHelper::InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, sal_Bool /*bCurRowOnly*/ )
+{
+ rCols.SetLeftMin ( 0 );
+ rCols.SetLeft ( 0 );
+ rCols.SetRight ( UNO_TABLE_COLUMN_SUM );
+ rCols.SetRightMax( UNO_TABLE_COLUMN_SUM );
+ pTable->GetTabCols( rCols, pStart, sal_False, sal_False );
+}
+
+sal_Int32 SwVbaTableHelper::GetColCount( SwTabCols& rCols ) const
+{
+ sal_Int32 nCount = 0;
+ for(sal_Int32 i = 0; i < rCols.Count(); i++ )
+ if(rCols.IsHidden(i))
+ nCount ++;
+ return rCols.Count() - nCount;
+}
+
+sal_Int32 SwVbaTableHelper::GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum) const
+{
+ OSL_ENSURE( nNum < (sal_Int32)GetColCount( rCols ) ,"Index out of range");
+ sal_Int32 i = 0;
+ while( nNum >= 0 )
+ {
+ if( !rCols.IsHidden( static_cast< sal_uInt16 >(i)) )
+ nNum--;
+ i++;
+ }
+ return i - 1;
+}
+
+sal_Int32 SwVbaTableHelper::GetColWidth( sal_Int32 nCol, sal_Int32 nRow, sal_Bool bCurRowOnly ) throw (uno::RuntimeException)
+{
+ SwTableBox* pStart = GetTabBox( nCol, nRow );
+ SwTabCols aCols;
+ InitTabCols( aCols, pStart, bCurRowOnly );
+ sal_Int32 nWidth = GetColWidth( aCols, nCol );
+
+ sal_Int32 nTableWidth = getTableWidth( );
+ double dAbsWidth = ( (double)nWidth / UNO_TABLE_COLUMN_SUM ) * (double) nTableWidth;
+ return ( sal_Int32 )Millimeter::getInPoints( dAbsWidth );
+}
+
+sal_Int32 SwVbaTableHelper::GetColWidth( SwTabCols& rCols, sal_Int32 nNum ) throw (uno::RuntimeException)
+{
+ SwTwips nWidth = 0;
+
+ if( rCols.Count() > 0 )
+ {
+ if(rCols.Count() == GetColCount( rCols ))
+ {
+ nWidth = (SwTwips)((nNum == rCols.Count()) ?
+ rCols.GetRight() - rCols[nNum-1] :
+ nNum == 0 ? rCols[nNum] - rCols.GetLeft() :
+ rCols[nNum] - rCols[nNum-1]);
+ }
+ else
+ {
+ SwTwips nRValid = nNum < GetColCount( rCols ) ?
+ rCols[(sal_uInt16)GetRightSeparator( rCols, nNum)]:
+ rCols.GetRight();
+ SwTwips nLValid = nNum ?
+ rCols[(sal_uInt16)GetRightSeparator( rCols, nNum - 1)]:
+ rCols.GetLeft();
+ nWidth = nRValid - nLValid;
+ }
+ }
+ else
+ nWidth = rCols.GetRight();
+
+ return nWidth;
+}
+
+void SwVbaTableHelper::SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 nRow, sal_Bool bCurRowOnly ) throw (css::uno::RuntimeException)
+{
+ double dAbsWidth = Millimeter::getInHundredthsOfOneMillimeter( _width );
+ sal_Int32 nTableWidth = getTableWidth( );
+ sal_Int32 nNewWidth = (sal_Int32)( dAbsWidth/nTableWidth * UNO_TABLE_COLUMN_SUM );
+
+ SwTableBox* pStart = GetTabBox( nCol, nRow );
+ SwTabCols aOldCols;
+ InitTabCols( aOldCols, pStart, bCurRowOnly );
+
+ SwTabCols aCols( aOldCols );
+ if ( aCols.Count() > 0 )
+ {
+ SwTwips nWidth = GetColWidth( aCols, nCol);
+
+ int nDiff = (int)(nNewWidth - nWidth);
+ if( !nCol )
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(aCols, 0)) ] += nDiff;
+ else if( nCol < GetColCount( aCols ) )
+ {
+ if(nDiff < GetColWidth( aCols, nCol + 1) - MINLAY)
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator( aCols, nCol)) ] += nDiff;
+ else
+ {
+ int nDiffLeft = nDiff - (int)GetColWidth( aCols, nCol + 1) + (int)MINLAY;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator( aCols, nCol)) ] += (nDiff - nDiffLeft);
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator( aCols, nCol - 1)) ] -= nDiffLeft;
+ }
+ }
+ else
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator( aCols, nCol-1)) ] -= nDiff;
+ }
+ else
+ aCols.SetRight( Min( (long)nNewWidth, aCols.GetRightMax()) );
+
+ pTable->SetTabCols(aCols, aOldCols, pStart, bCurRowOnly );
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatablehelper.hxx b/sw/source/ui/vba/vbatablehelper.hxx
new file mode 100644
index 000000000000..0dcd630d07b8
--- /dev/null
+++ b/sw/source/ui/vba/vbatablehelper.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_WORD_VBA_TABLEHELPER_HXX
+#define SW_WORD_VBA_TABLEHELPER_HXX
+
+#include <com/sun/star/text/XTextTable.hpp>
+#include "wordvbahelper.hxx"
+#include <swtable.hxx>
+#include <tabcol.hxx>
+#include <doc.hxx>
+
+class SwVbaTableHelper
+{
+private:
+ css::uno::Reference< css::text::XTextTable > mxTextTable;
+ SwTable* pTable;
+ SwDoc* pDoc;
+
+private:
+ SwTableBox* GetTabBox( sal_Int32 nCol, sal_Int32 nRow ) throw (css::uno::RuntimeException);
+ void InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, sal_Bool bCurRowOnly = sal_False );
+ sal_Int32 GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum) const;
+ sal_Int32 GetColCount( SwTabCols& rCols ) const;
+ sal_Int32 GetColWidth( SwTabCols& rCols, sal_Int32 nNum ) throw (css::uno::RuntimeException);
+
+public:
+ SwVbaTableHelper( const css::uno::Reference< css::text::XTextTable >& xTextTable ) throw (css::uno::RuntimeException);
+ ~SwVbaTableHelper() {}
+ sal_Int32 getTabColumnsCount( sal_Int32 nRowIndex ) throw (css::uno::RuntimeException);
+ sal_Int32 getTabColumnsMaxCount( ) throw (css::uno::RuntimeException);
+ sal_Int32 getTabRowIndex( const rtl::OUString& sCellName ) throw (css::uno::RuntimeException);
+ sal_Int32 getTabColIndex( const rtl::OUString& sCellName ) throw (css::uno::RuntimeException);
+ sal_Int32 getTableWidth( ) throw (css::uno::RuntimeException);
+ void setTableWidth( sal_Int32 _width ) throw (css::uno::RuntimeException);
+
+ sal_Int32 GetColWidth( sal_Int32 nCol, sal_Int32 nRow = 0, sal_Bool bCurRowOnly = sal_False ) throw (css::uno::RuntimeException);
+ void SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 nRow = 0, sal_Bool bCurRowOnly = sal_False ) throw (css::uno::RuntimeException);
+
+ static SwTable* GetSwTable( const css::uno::Reference< css::text::XTextTable >& xTextTable ) throw (css::uno::RuntimeException);
+ static rtl::OUString getColumnStr( sal_Int32 nCol );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatableofcontents.cxx b/sw/source/ui/vba/vbatableofcontents.cxx
new file mode 100644
index 000000000000..09a29238bafe
--- /dev/null
+++ b/sw/source/ui/vba/vbatableofcontents.cxx
@@ -0,0 +1,124 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbatableofcontents.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <ooo/vba/word/WdTabLeader.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaTableOfContents::SwVbaTableOfContents( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& xDoc, const uno::Reference< text::XDocumentIndex >& xDocumentIndex ) throw ( uno::RuntimeException ) :
+ SwVbaTableOfContents_BASE( rParent, rContext ), mxTextDocument( xDoc ), mxDocumentIndex( xDocumentIndex )
+{
+ mxTocProps.set( mxDocumentIndex, uno::UNO_QUERY_THROW );
+}
+
+
+SwVbaTableOfContents::~SwVbaTableOfContents()
+{
+}
+
+::sal_Int32 SAL_CALL SwVbaTableOfContents::getLowerHeadingLevel() throw (uno::RuntimeException)
+{
+ sal_Int16 nLevel = 0;
+ mxTocProps->getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Level") ) ) >>= nLevel;
+ return nLevel;
+}
+
+void SAL_CALL SwVbaTableOfContents::setLowerHeadingLevel( ::sal_Int32 _lowerheadinglevel ) throw (uno::RuntimeException)
+{
+ mxTocProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Level") ), uno::makeAny( sal_Int8( _lowerheadinglevel ) ) );
+}
+
+::sal_Int32 SAL_CALL SwVbaTableOfContents::getTabLeader() throw (uno::RuntimeException)
+{
+ // not support in Writer
+ return word::WdTabLeader::wdTabLeaderDots;
+}
+
+void SAL_CALL SwVbaTableOfContents::setTabLeader( ::sal_Int32 /*_tableader*/ ) throw (uno::RuntimeException)
+{
+ // not support in Writer
+}
+
+::sal_Bool SAL_CALL SwVbaTableOfContents::getUseFields() throw (css::uno::RuntimeException)
+{
+ sal_Bool bUseFields = sal_False;
+ mxTocProps->getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CreateFromMarks") ) ) >>= bUseFields;
+ return bUseFields;
+}
+
+void SAL_CALL SwVbaTableOfContents::setUseFields( ::sal_Bool _useFields ) throw (css::uno::RuntimeException)
+{
+ mxTocProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CreateFromMarks") ), uno::makeAny( _useFields ) );
+}
+
+::sal_Bool SAL_CALL SwVbaTableOfContents::getUseOutlineLevels() throw (css::uno::RuntimeException)
+{
+ sal_Bool bUseOutlineLevels = sal_False;
+ mxTocProps->getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CreateFromOutline") ) ) >>= bUseOutlineLevels;
+ return bUseOutlineLevels;
+}
+
+void SAL_CALL SwVbaTableOfContents::setUseOutlineLevels( ::sal_Bool _useOutlineLevels ) throw (css::uno::RuntimeException)
+{
+ mxTocProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CreateFromOutline") ), uno::makeAny( _useOutlineLevels ) );
+}
+
+void SAL_CALL SwVbaTableOfContents::Delete( ) throw (uno::RuntimeException)
+{
+ uno::Reference< text::XTextContent > xTextContent( mxDocumentIndex, uno::UNO_QUERY_THROW );
+ mxTextDocument->getText()->removeTextContent( xTextContent );
+}
+
+void SAL_CALL SwVbaTableOfContents::Update( ) throw (uno::RuntimeException)
+{
+ mxDocumentIndex->update();
+}
+
+rtl::OUString&
+SwVbaTableOfContents::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaTableOfContents") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaTableOfContents::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.TableOfContents" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatableofcontents.hxx b/sw/source/ui/vba/vbatableofcontents.hxx
new file mode 100644
index 000000000000..27b39a5da234
--- /dev/null
+++ b/sw/source/ui/vba/vbatableofcontents.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_TABLEOFCONTENTS_HXX
+#define SW_VBA_TABLEOFCONTENTS_HXX
+
+#include <ooo/vba/word/XTableOfContents.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XDocumentIndex.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XTableOfContents > SwVbaTableOfContents_BASE;
+
+class SwVbaTableOfContents : public SwVbaTableOfContents_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextDocument > mxTextDocument;
+ css::uno::Reference< css::text::XDocumentIndex > mxDocumentIndex;
+ css::uno::Reference< css::beans::XPropertySet > mxTocProps;
+
+public:
+ SwVbaTableOfContents( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& xDoc, const css::uno::Reference< css::text::XDocumentIndex >& xDocumentIndex ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaTableOfContents();
+
+ // Attributes
+ virtual ::sal_Int32 SAL_CALL getLowerHeadingLevel() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLowerHeadingLevel( ::sal_Int32 _lowerheadinglevel ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getTabLeader() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setTabLeader( ::sal_Int32 _tableader ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getUseFields() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setUseFields( ::sal_Bool _useFields ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getUseOutlineLevels() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setUseOutlineLevels( ::sal_Bool _useOutlineLevels ) throw (css::uno::RuntimeException);
+
+ // Methods
+ virtual void SAL_CALL Delete( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Update( ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_TABLEOFCONTENTS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatables.cxx b/sw/source/ui/vba/vbatables.cxx
index 9a10622400d3..b35624c3d176 100644
--- a/sw/source/ui/vba/vbatables.cxx
+++ b/sw/source/ui/vba/vbatables.cxx
@@ -1,9 +1,13 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "vbatables.hxx"
#include "vbatable.hxx"
#include "vbarange.hxx"
#include <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
#include <comphelper/componentcontext.hxx>
using namespace ::ooo::vba;
@@ -26,7 +30,89 @@ uno::Any lcl_createTable( const uno::Reference< XHelperInterface >& xParent, con
return uno::makeAny( xTable );
}
+sal_Bool lcl_isInHeaderFooter( const uno::Reference< text::XTextTable >& xTable )
+{
+ uno::Reference< text::XTextContent > xTextContent( xTable, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XText > xText = xTextContent->getAnchor()->getText();
+ uno::Reference< lang::XServiceInfo > xServiceInfo( xText, uno::UNO_QUERY_THROW );
+ rtl::OUString aImplName = xServiceInfo->getImplementationName();
+ if( aImplName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SwXHeadFootText")) )
+ return sal_True;
+ return sal_False;
+}
+
typedef ::cppu::WeakImplHelper1< css::container::XEnumeration > EnumBase;
+typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XNameAccess > TableCollectionHelper_Base;
+typedef std::vector< uno::Reference< text::XTextTable > > XTextTableVec;
+
+class TableCollectionHelper : public TableCollectionHelper_Base
+{
+ XTextTableVec mxTables;
+ XTextTableVec::iterator cachePos;
+
+public:
+ TableCollectionHelper( const uno::Reference< frame::XModel >& xDocument )
+ {
+ // only count the tables in the body text, not in the header/footer
+ uno::Reference< container::XIndexAccess > xTables = lcl_getTables( xDocument );
+ sal_Int32 nCount = xTables->getCount();
+ for( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ uno::Reference< text::XTextTable > xTable( xTables->getByIndex( i ) , uno::UNO_QUERY_THROW );
+ if( !lcl_isInHeaderFooter( xTable ) )
+ mxTables.push_back( xTable );
+ }
+ cachePos = mxTables.begin();
+ }
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ return mxTables.size();
+ }
+ virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( Index < 0 || Index >= getCount() )
+ throw lang::IndexOutOfBoundsException();
+ uno::Reference< text::XTextTable > xTable( mxTables[ Index ], uno::UNO_QUERY_THROW );
+ return uno::makeAny( xTable );
+ }
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return text::XTextTable::static_type(0); }
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { return getCount() > 0 ; }
+ // XNameAcess
+ virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( !hasByName(aName) )
+ throw container::NoSuchElementException();
+ uno::Reference< text::XTextTable > xTable( *cachePos, uno::UNO_QUERY_THROW );
+ return uno::makeAny( xTable );
+ }
+ virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException)
+ {
+ uno::Sequence< rtl::OUString > sNames( mxTables.size() );
+ rtl::OUString* pString = sNames.getArray();
+ XTextTableVec::iterator it = mxTables.begin();
+ XTextTableVec::iterator it_end = mxTables.end();
+ for ( ; it != it_end; ++it, ++pString )
+ {
+ uno::Reference< container::XNamed > xName( *it, uno::UNO_QUERY_THROW );
+ *pString = xName->getName();
+ }
+ return sNames;
+ }
+ virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
+ {
+ cachePos = mxTables.begin();
+ XTextTableVec::iterator it_end = mxTables.end();
+ for ( ; cachePos != it_end; ++cachePos )
+ {
+ uno::Reference< container::XNamed > xName( *cachePos, uno::UNO_QUERY_THROW );
+ if ( aName.equalsIgnoreAsciiCase( xName->getName() ) )
+ break;
+ }
+ return ( cachePos != it_end );
+ }
+};
class TableEnumerationImpl : public EnumBase
{
@@ -52,7 +138,7 @@ public:
};
-SwVbaTables::SwVbaTables( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xDocument ) : SwVbaTables_BASE( xParent, xContext , lcl_getTables( xDocument ) ), mxDocument( xDocument )
+SwVbaTables::SwVbaTables( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xDocument ) : SwVbaTables_BASE( xParent, xContext , uno::Reference< container::XIndexAccess >( new TableCollectionHelper( xDocument ) ) ), mxDocument( xDocument )
{
}
@@ -74,17 +160,19 @@ SwVbaTables::Add( const uno::Reference< word::XRange >& Range, const uno::Any& N
uno::Reference< text::XTextRange > xTextRange = pVbaRange->getXTextRange();
uno::Reference< text::XTextTable > xTable;
- xTable.set( xMsf->createInstance( rtl::OUString::createFromAscii("com.sun.star.text.TextTable") ), uno::UNO_QUERY_THROW );
-/*
- comphelper::ComponentContext aCtx( xMsf );
- if ( !aCtx.createComponent( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextTable") ), xTable ) );
- throw uno::RuntimeException(); // #FIXME better exception??
-*/
+ xTable.set( xMsf->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextTable")) ), uno::UNO_QUERY_THROW );
+
xTable->initialize( nRows, nCols );
uno::Reference< text::XText > xText = xTextRange->getText();
uno::Reference< text::XTextContent > xContext( xTable, uno::UNO_QUERY_THROW );
xText->insertTextContent( xTextRange, xContext, true );
+
+ // move the current cursor to the first table cell
+ uno::Reference< table::XCellRange > xCellRange( xTable, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XText> xFirstCellText( xCellRange->getCellByPosition(0, 0), uno::UNO_QUERY_THROW );
+ word::getXTextViewCursor( mxDocument )->gotoRange( xFirstCellText->getStart(), sal_False );
+
uno::Reference< word::XTable > xVBATable( new SwVbaTable( mxParent, mxContext, pVbaRange->getDocument(), xTable ) );
return xVBATable;
}
@@ -129,3 +217,4 @@ SwVbaTables::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatables.hxx b/sw/source/ui/vba/vbatables.hxx
index a789337a2839..e2f002f5c5fc 100644
--- a/sw/source/ui/vba/vbatables.hxx
+++ b/sw/source/ui/vba/vbatables.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef SW_VBA_TABLES_HXX
#define SW_VBA_TABLES_HXX
@@ -26,3 +27,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatablesofcontents.cxx b/sw/source/ui/vba/vbatablesofcontents.cxx
new file mode 100644
index 000000000000..0401e8add560
--- /dev/null
+++ b/sw/source/ui/vba/vbatablesofcontents.cxx
@@ -0,0 +1,195 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbatablesofcontents.hxx"
+#include "vbatableofcontents.hxx"
+#include "vbarange.hxx"
+#include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XEnumerationAccess > TableOfContentsCollectionHelper_Base;
+typedef std::vector< uno::Reference< text::XDocumentIndex > > XTocVec;
+
+class TablesOfContentsEnumWrapper : public EnumerationHelper_BASE
+{
+ uno::Reference< container::XIndexAccess > mxIndexAccess;
+ sal_Int32 nIndex;
+
+public:
+ TablesOfContentsEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : mxIndexAccess( xIndexAccess ), nIndex( 0 )
+ {
+ }
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( nIndex < mxIndexAccess->getCount() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if( nIndex < mxIndexAccess->getCount() )
+ {
+ return mxIndexAccess->getByIndex( nIndex++ );
+ }
+ throw container::NoSuchElementException();
+ }
+};
+
+class TableOfContentsCollectionHelper : public TableOfContentsCollectionHelper_Base
+{
+private:
+ uno::Reference< XHelperInterface > mxParent;
+ uno::Reference< uno::XComponentContext > mxContext;
+ uno::Reference< text::XTextDocument > mxTextDocument;
+ XTocVec maToc;
+
+public:
+ TableOfContentsCollectionHelper( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextDocument >& xDoc ) throw ( uno::RuntimeException ): mxParent( xParent ), mxContext( xContext ), mxTextDocument( xDoc )
+ {
+ uno::Reference< text::XDocumentIndexesSupplier > xDocIndexSupp( mxTextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xDocIndexes = xDocIndexSupp->getDocumentIndexes();
+ sal_Int32 nCount = xDocIndexes->getCount();
+ for( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ uno::Reference< text::XDocumentIndex > xToc( xDocIndexes->getByIndex(i), uno::UNO_QUERY_THROW );
+ if( xToc->getServiceName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.ContentIndex")) )
+ {
+ maToc.push_back( xToc );
+ }
+ }
+ }
+
+ virtual ~TableOfContentsCollectionHelper() {}
+
+ virtual sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ return maToc.size();
+ }
+ virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( Index < 0 || Index >= getCount() )
+ throw lang::IndexOutOfBoundsException();
+
+ uno::Reference< text::XDocumentIndex > xToc( maToc[Index], uno::UNO_QUERY_THROW );
+ return uno::makeAny( uno::Reference< word::XTableOfContents >( new SwVbaTableOfContents( mxParent, mxContext, mxTextDocument, xToc ) ) );
+ }
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException)
+ {
+ return word::XTableOfContents::static_type(0);
+ }
+ virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
+ {
+ return sal_True;
+ }
+ // XEnumerationAccess
+ virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException)
+ {
+ return new TablesOfContentsEnumWrapper( this );
+ }
+};
+
+SwVbaTablesOfContents::SwVbaTablesOfContents( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< text::XTextDocument >& xDoc ) throw (uno::RuntimeException) : SwVbaTablesOfContents_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new TableOfContentsCollectionHelper( xParent, xContext, xDoc ) ) ), mxTextDocument( xDoc )
+{
+}
+
+uno::Reference< word::XTableOfContents > SAL_CALL
+SwVbaTablesOfContents::Add( const uno::Reference< word::XRange >& Range, const uno::Any& /*UseHeadingStyles*/, const uno::Any& /*UpperHeadingLevel*/, const uno::Any& LowerHeadingLevel, const uno::Any& UseFields, const uno::Any& /*TableID*/, const uno::Any& /*RightAlignPageNumbers*/, const uno::Any& /*IncludePageNumbers*/, const uno::Any& /*AddedStyles*/, const uno::Any& /*UseHyperlinks*/, const uno::Any& /*HidePageNumbersInWeb*/, const uno::Any& /*UseOutlineLevels*/ ) throw (uno::RuntimeException)
+{
+ uno::Reference< lang::XMultiServiceFactory > xDocMSF( mxTextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XDocumentIndex > xDocumentIndex( xDocMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.ContentIndex")) ), uno::UNO_QUERY_THROW );
+
+ uno::Reference< beans::XPropertySet > xTocProps( xDocumentIndex, uno::UNO_QUERY_THROW );
+ sal_Bool isProtected = sal_False;
+ xTocProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsProtected") ), uno::makeAny( isProtected ) );
+
+ uno::Reference< word::XTableOfContents > xToc( new SwVbaTableOfContents( this, mxContext, mxTextDocument, xDocumentIndex ) );
+
+ sal_Int32 nLowerHeadingLevel = 9;
+ if( LowerHeadingLevel.hasValue() )
+ LowerHeadingLevel >>= nLowerHeadingLevel;
+ xToc->setLowerHeadingLevel( nLowerHeadingLevel );
+
+ sal_Bool bUseFields = sal_False;
+ if( UseFields.hasValue() )
+ UseFields >>= bUseFields;
+ xToc->setUseFields( bUseFields );
+
+ sal_Bool bUseOutlineLevels = sal_True;
+ xToc->setUseOutlineLevels( bUseOutlineLevels );
+
+ SwVbaRange* pVbaRange = dynamic_cast<SwVbaRange*>( Range.get() );
+ if( !pVbaRange )
+ throw uno::RuntimeException();
+
+ uno::Reference< text::XTextRange > xTextRange = pVbaRange->getXTextRange();
+ uno::Reference< text::XText > xText = pVbaRange->getXText();
+ uno::Reference< text::XTextContent > xTextContent( xDocumentIndex, uno::UNO_QUERY_THROW );
+ xText->insertTextContent( xTextRange, xTextContent, sal_False );
+ xToc->Update();
+
+ return xToc;
+}
+
+// XEnumerationAccess
+uno::Type
+SwVbaTablesOfContents::getElementType() throw (uno::RuntimeException)
+{
+ return word::XTableOfContents::static_type(0);
+}
+uno::Reference< container::XEnumeration >
+SwVbaTablesOfContents::createEnumeration() throw (uno::RuntimeException)
+{
+ return new TablesOfContentsEnumWrapper( m_xIndexAccess );
+}
+
+uno::Any
+SwVbaTablesOfContents::createCollectionObject( const uno::Any& aSource )
+{
+ return aSource;
+}
+
+rtl::OUString&
+SwVbaTablesOfContents::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaTablesOfContents") );
+ return sImplName;
+}
+
+uno::Sequence<rtl::OUString>
+SwVbaTablesOfContents::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.TablesOfContents") );
+ }
+ return sNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatablesofcontents.hxx b/sw/source/ui/vba/vbatablesofcontents.hxx
new file mode 100644
index 000000000000..04b30d0b12db
--- /dev/null
+++ b/sw/source/ui/vba/vbatablesofcontents.hxx
@@ -0,0 +1,64 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_TABLESOFCONTENTS_HXX
+#define SW_VBA_TABLESOFCONTENTS_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XTablesOfContents.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <ooo/vba/word/XTableOfContents.hpp>
+#include <ooo/vba/word/XRange.hpp>
+
+typedef CollTestImplHelper< ooo::vba::word::XTablesOfContents > SwVbaTablesOfContents_BASE;
+
+class SwVbaTablesOfContents : public SwVbaTablesOfContents_BASE
+{
+private:
+ css::uno::Reference< css::text::XTextDocument > mxTextDocument;
+
+public:
+ SwVbaTablesOfContents( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::text::XTextDocument >& xDoc ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaTablesOfContents() {}
+
+ // Methods
+ virtual css::uno::Reference< ::ooo::vba::word::XTableOfContents > SAL_CALL Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, const css::uno::Any& UseHeadingStyles, const css::uno::Any& UpperHeadingLevel, const css::uno::Any& LowerHeadingLevel, const css::uno::Any& UseFields, const css::uno::Any& TableID, const css::uno::Any& RightAlignPageNumbers, const css::uno::Any& IncludePageNumbers, const css::uno::Any& AddedStyles, const css::uno::Any& UseHyperlinks, const css::uno::Any& HidePageNumbersInWeb, const css::uno::Any& UseOutlineLevels ) throw (css::uno::RuntimeException);
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaTablesOfContents_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_TABLESOFCONTENTS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatabstop.cxx b/sw/source/ui/vba/vbatabstop.cxx
new file mode 100644
index 000000000000..4ed72202bc95
--- /dev/null
+++ b/sw/source/ui/vba/vbatabstop.cxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbatabstop.hxx"
+#include <vbahelper/vbahelper.hxx>
+#include <tools/diagnose_ex.h>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+SwVbaTabStop::SwVbaTabStop( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< beans::XPropertySet >& xParaProps, const style::TabStop& aTabStop ) throw ( uno::RuntimeException ) : SwVbaTabStop_BASE( rParent, rContext ), mxParaProps( xParaProps ), maTabStop( aTabStop )
+{
+}
+
+SwVbaTabStop::~SwVbaTabStop()
+{
+}
+
+rtl::OUString&
+SwVbaTabStop::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaTabStop") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+SwVbaTabStop::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.TabStop" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatabstop.hxx b/sw/source/ui/vba/vbatabstop.hxx
new file mode 100644
index 000000000000..0de7c0d7e4ba
--- /dev/null
+++ b/sw/source/ui/vba/vbatabstop.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_TABSTOP_HXX
+#define SW_VBA_TABSTOP_HXX
+
+#include <ooo/vba/word/XTabStop.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/style/TabStop.hpp>
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XTabStop > SwVbaTabStop_BASE;
+
+class SwVbaTabStop : public SwVbaTabStop_BASE
+{
+private:
+ css::uno::Reference< css::beans::XPropertySet > mxParaProps;
+ css::style::TabStop maTabStop;
+
+public:
+ SwVbaTabStop( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::beans::XPropertySet >& xParaProps, const css::style::TabStop& aTabStop ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaTabStop();
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif /* SW_VBA_TABSTOP_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatabstops.cxx b/sw/source/ui/vba/vbatabstops.cxx
new file mode 100644
index 000000000000..a8b0abd5cb12
--- /dev/null
+++ b/sw/source/ui/vba/vbatabstops.cxx
@@ -0,0 +1,280 @@
+/* -*- Mode: 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.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "vbatabstops.hxx"
+#include "vbatabstop.hxx"
+#include <com/sun/star/style/TabAlign.hpp>
+#include <ooo/vba/word/WdTabLeader.hpp>
+#include <ooo/vba/word/WdTabAlignment.hpp>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+
+uno::Sequence< style::TabStop > lcl_getTabStops( const uno::Reference< beans::XPropertySet >& xParaProps ) throw (uno::RuntimeException)
+{
+ uno::Sequence< style::TabStop > aSeq;
+ xParaProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaTabStops") ) ) >>= aSeq;
+ return aSeq;
+}
+
+void lcl_setTabStops( const uno::Reference< beans::XPropertySet >& xParaProps, const uno::Sequence< style::TabStop >& aSeq ) throw (uno::RuntimeException)
+{
+ xParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaTabStops") ), uno::makeAny( aSeq ) );
+}
+
+typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XEnumerationAccess > TabStopCollectionHelper_Base;
+
+class TabStopsEnumWrapper : public EnumerationHelper_BASE
+{
+ uno::Reference< container::XIndexAccess > mxIndexAccess;
+ sal_Int32 nIndex;
+
+public:
+ TabStopsEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : mxIndexAccess( xIndexAccess ), nIndex( 0 )
+ {
+ }
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
+ {
+ return ( nIndex < mxIndexAccess->getCount() );
+ }
+
+ virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if( nIndex < mxIndexAccess->getCount() )
+ {
+ return mxIndexAccess->getByIndex( nIndex++ );
+ }
+ throw container::NoSuchElementException();
+ }
+};
+
+class TabStopCollectionHelper : public TabStopCollectionHelper_Base
+{
+private:
+ uno::Reference< XHelperInterface > mxParent;
+ uno::Reference< uno::XComponentContext > mxContext;
+ uno::Reference< beans::XPropertySet > mxParaProps;
+ uno::Sequence< style::TabStop > maTabStops;
+
+public:
+ TabStopCollectionHelper( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& xParaProps ) throw ( css::uno::RuntimeException ): mxParent( xParent ), mxContext( xContext ), mxParaProps( xParaProps )
+ {
+ maTabStops = lcl_getTabStops( xParaProps );
+ }
+
+ virtual ~TabStopCollectionHelper() {}
+
+ virtual sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
+ {
+ return maTabStops.getLength();
+ }
+ virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ if ( Index < 0 || Index >= getCount() )
+ throw css::lang::IndexOutOfBoundsException();
+
+ const style::TabStop* pTabs = maTabStops.getConstArray();
+ return uno::makeAny( uno::Reference< word::XTabStop >( new SwVbaTabStop( mxParent, mxContext, mxParaProps, pTabs[ Index ] ) ) );
+ }
+ virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException)
+ {
+ return word::XTabStop::static_type(0);
+ }
+ virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
+ {
+ return sal_True;
+ }
+ // XEnumerationAccess
+ virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException)
+ {
+ return new TabStopsEnumWrapper( this );
+ }
+};
+
+SwVbaTabStops::SwVbaTabStops( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& xParaProps ) throw (uno::RuntimeException) : SwVbaTabStops_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new TabStopCollectionHelper( xParent, xContext, xParaProps ) ) ), mxParaProps( xParaProps )
+{
+}
+
+uno::Reference< word::XTabStop > SAL_CALL SwVbaTabStops::Add( float Position, const uno::Any& Alignment, const uno::Any& Leader ) throw (uno::RuntimeException)
+{
+ sal_Int32 nPosition = Millimeter::getInHundredthsOfOneMillimeter( Position );
+
+ style::TabAlign nAlign = style::TabAlign_LEFT;
+ if( Alignment.hasValue() )
+ {
+ sal_Int32 wdAlign = word::WdTabAlignment::wdAlignTabLeft;
+ Alignment >>= wdAlign;
+ switch( wdAlign )
+ {
+ case word::WdTabAlignment::wdAlignTabLeft:
+ {
+ nAlign = style::TabAlign_LEFT;
+ break;
+ }
+ case word::WdTabAlignment::wdAlignTabRight:
+ {
+ nAlign = style::TabAlign_RIGHT;
+ break;
+ }
+ case word::WdTabAlignment::wdAlignTabCenter:
+ {
+ nAlign = style::TabAlign_CENTER;
+ break;
+ }
+ case word::WdTabAlignment::wdAlignTabDecimal:
+ {
+ nAlign = style::TabAlign_DECIMAL;
+ break;
+ }
+ case word::WdTabAlignment::wdAlignTabBar:
+ case word::WdTabAlignment::wdAlignTabList:
+ {
+ DebugHelper::exception( SbERR_NOT_IMPLEMENTED, rtl::OUString() );
+ break;
+ }
+ default:
+ {
+ //left
+ }
+ }
+ }
+
+ sal_Char cLeader = ' '; // default is space
+ if( Leader.hasValue() )
+ {
+ sal_Int32 wdLeader = word::WdTabLeader::wdTabLeaderSpaces;
+ Leader >>= wdLeader;
+ switch( wdLeader )
+ {
+ case word::WdTabLeader::wdTabLeaderSpaces:
+ {
+ cLeader = ' ';
+ break;
+ }
+ case word::WdTabLeader::wdTabLeaderMiddleDot:
+ {
+ cLeader = 183;
+ break;
+ }
+ case word::WdTabLeader::wdTabLeaderDots:
+ {
+ cLeader = '.';
+ break;
+ }
+ case word::WdTabLeader::wdTabLeaderDashes:
+ case word::WdTabLeader::wdTabLeaderHeavy:
+ case word::WdTabLeader::wdTabLeaderLines:
+ {
+ cLeader = '_';
+ break;
+ }
+ default:
+ {
+ //left
+ }
+ }
+ }
+
+ sal_Char cDecimal = '.'; // default value
+
+ style::TabStop aTab;
+ aTab.Position = nPosition;
+ aTab.Alignment = nAlign;
+ aTab.DecimalChar = cDecimal;
+ aTab.FillChar = cLeader;
+
+ uno::Sequence< style::TabStop > aOldTabs = lcl_getTabStops( mxParaProps );
+ sal_Bool bOverWriter = sal_False;
+
+ sal_Int32 nTabs = aOldTabs.getLength();
+ uno::Sequence< style::TabStop > aNewTabs( nTabs + 1 );
+
+ style::TabStop* pOldTab = aOldTabs.getArray();
+ style::TabStop* pNewTab = aNewTabs.getArray();
+ pNewTab[0] = aTab;
+ for( sal_Int32 nIndex = 0; nIndex < nTabs && !bOverWriter; nIndex++ )
+ {
+ if( pOldTab[nIndex].Position == nPosition )
+ {
+ bOverWriter = sal_True;
+ pOldTab[nIndex] = aTab;
+ break;
+ }
+ pNewTab[ nIndex+1 ] = pOldTab[ nIndex ];
+ }
+ if( bOverWriter )
+ lcl_setTabStops( mxParaProps, aOldTabs );
+ else
+ lcl_setTabStops( mxParaProps, aNewTabs );
+
+ return uno::Reference< word::XTabStop >( new SwVbaTabStop( this, mxContext, mxParaProps, aTab ) );
+}
+
+void SAL_CALL SwVbaTabStops::ClearAll() throw (uno::RuntimeException)
+{
+ uno::Sequence< style::TabStop > aSeq;
+ lcl_setTabStops( mxParaProps, aSeq );
+}
+
+// XEnumerationAccess
+uno::Type
+SwVbaTabStops::getElementType() throw (uno::RuntimeException)
+{
+ return word::XTabStop::static_type(0);
+}
+uno::Reference< container::XEnumeration >
+SwVbaTabStops::createEnumeration() throw (uno::RuntimeException)
+{
+ return new TabStopsEnumWrapper( m_xIndexAccess );
+}
+
+uno::Any
+SwVbaTabStops::createCollectionObject( const css::uno::Any& aSource )
+{
+ return aSource;
+}
+
+rtl::OUString&
+SwVbaTabStops::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaTabStops") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+SwVbaTabStops::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > sNames;
+ if ( sNames.getLength() == 0 )
+ {
+ sNames.realloc( 1 );
+ sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.TabStops") );
+ }
+ return sNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatabstops.hxx b/sw/source/ui/vba/vbatabstops.hxx
new file mode 100644
index 000000000000..f5b000131ebe
--- /dev/null
+++ b/sw/source/ui/vba/vbatabstops.hxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VBA_TABSTOPS_HXX
+#define SW_VBA_TABSTOPS_HXX
+
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <ooo/vba/word/XTabStops.hpp>
+#include <ooo/vba/word/XTabStop.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+
+typedef CollTestImplHelper< ooo::vba::word::XTabStops > SwVbaTabStops_BASE;
+
+class SwVbaTabStops : public SwVbaTabStops_BASE
+{
+private:
+ css::uno::Reference< css::beans::XPropertySet > mxParaProps;
+
+public:
+ SwVbaTabStops( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& xParaProps ) throw ( css::uno::RuntimeException );
+ virtual ~SwVbaTabStops() {}
+
+ // Methods
+ virtual css::uno::Reference< ::ooo::vba::word::XTabStop > SAL_CALL Add( float Position, const css::uno::Any& Alignment, const css::uno::Any& Leader ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL ClearAll( ) throw (css::uno::RuntimeException);
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // SwVbaTabStops_BASE
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif /* SW_VBA_TABSTOPS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx
index 68476b301a17..6216b853ee3e 100644
--- a/sw/source/ui/vba/vbatemplate.cxx
+++ b/sw/source/ui/vba/vbatemplate.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,12 +31,35 @@
#include "vbaautotextentry.hxx"
#include <comphelper/processfactory.hxx>
#include <com/sun/star/text/XAutoTextContainer.hpp>
+#include <tools/urlobj.hxx>
+#include <osl/file.hxx>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-SwVbaTemplate::SwVbaTemplate( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel, const rtl::OUString& rName )
- : SwVbaTemplate_BASE( rParent, rContext ), mxModel( rModel ), msName( rName )
+String lcl_CheckGroupName( const String& rGroupName )
+{
+ String sRet;
+ //group name should contain only A-Z and a-z and spaces
+ for( xub_StrLen i = 0; i < rGroupName.Len(); i++ )
+ {
+ sal_Unicode cChar = rGroupName.GetChar(i);
+ if( (cChar >= 'A' && cChar <= 'Z') ||
+ (cChar >= 'a' && cChar <= 'z') ||
+ (cChar >= '0' && cChar <= '9') ||
+ cChar == '_' || cChar == 0x20 )
+ {
+ sRet += cChar;
+ }
+ }
+ sRet.EraseLeadingChars();
+ sRet.EraseTrailingChars();
+ return sRet;
+}
+
+
+SwVbaTemplate::SwVbaTemplate( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel, const rtl::OUString& rFullUrl )
+ : SwVbaTemplate_BASE( rParent, rContext ), mxModel( rModel ), msFullUrl( rFullUrl )
{
}
@@ -47,7 +71,27 @@ SwVbaTemplate::~SwVbaTemplate()
rtl::OUString
SwVbaTemplate::getName() throw ( css::uno::RuntimeException )
{
- return msName;
+ rtl::OUString sName;
+ if( msFullUrl.getLength() )
+ {
+ INetURLObject aURL( msFullUrl );
+ ::osl::File::getSystemPathFromFileURL( aURL.GetLastName(), sName );
+ }
+ return sName;
+}
+
+rtl::OUString
+SwVbaTemplate::getPath() throw ( css::uno::RuntimeException )
+{
+ rtl::OUString sPath;
+ if( msFullUrl.getLength() )
+ {
+ INetURLObject aURL( msFullUrl );
+ rtl::OUString sURL( aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ sURL = sURL.copy( 0, sURL.getLength() - aURL.GetLastName().getLength() - 1 );
+ ::osl::File::getSystemPathFromFileURL( sURL, sPath );
+ }
+ return sPath;
}
uno::Any SAL_CALL
@@ -58,22 +102,22 @@ SwVbaTemplate::AutoTextEntries( const uno::Any& index ) throw (uno::RuntimeExcep
// the default template is "Normal.dot" in Word.
rtl::OUString sGroup( RTL_CONSTASCII_USTRINGPARAM("Normal") );
- sal_Int32 nIndex = msName.lastIndexOf( sal_Unicode('.') );
+ rtl::OUString sName = getName();
+ sal_Int32 nIndex = sName.lastIndexOf( sal_Unicode('.') );
if( nIndex > 0 )
{
- sGroup = msName.copy( 0, msName.lastIndexOf( sal_Unicode('.') ) );
- // OSL_TRACE("SwVbaTemplate::AutoTextEntries: %s", rtl::OUStringToOString( sGroup, RTL_TEXTENCODING_UTF8 ).getStr() );
+ sGroup = sName.copy( 0, sName.lastIndexOf( sal_Unicode('.') ) );
}
+ String sNewGroup = lcl_CheckGroupName( sGroup );
uno::Reference< container::XIndexAccess > xGroup;
- if( xAutoTextContainer->hasByName( sGroup ) )
+ if( xAutoTextContainer->hasByName( sNewGroup ) )
{
- xGroup.set( xAutoTextContainer->getByName( sGroup ), uno::UNO_QUERY_THROW );
+ xGroup.set( xAutoTextContainer->getByName( sNewGroup ), uno::UNO_QUERY_THROW );
}
else
{
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Auto Text Entry doesn't exist") ), uno::Reference< uno::XInterface >() );
- //xGroup.set( xAutoTextContainer->insertNewByName( sGroup ), uno::UNO_QUERY_THROW );
}
uno::Reference< XCollection > xCol( new SwVbaAutoTextEntries( this, mxContext, xGroup ) );
@@ -101,3 +145,4 @@ SwVbaTemplate::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbatemplate.hxx b/sw/source/ui/vba/vbatemplate.hxx
index 073e5cc5db1e..138841855560 100644
--- a/sw/source/ui/vba/vbatemplate.hxx
+++ b/sw/source/ui/vba/vbatemplate.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,7 @@ class SwVbaTemplate : public SwVbaTemplate_BASE
{
private:
css::uno::Reference< css::frame::XModel > mxModel;
- rtl::OUString msName;
+ rtl::OUString msFullUrl;
public:
SwVbaTemplate( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext,
const css::uno::Reference< css::frame::XModel >& rModel, const rtl::OUString& );
@@ -44,9 +45,12 @@ public:
// XTemplate
virtual rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
+ virtual rtl::OUString SAL_CALL getPath() throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL AutoTextEntries( const css::uno::Any& index ) throw (css::uno::RuntimeException);
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_TEMPLATE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbavariable.cxx b/sw/source/ui/vba/vbavariable.cxx
index b62dc5642114..4004fa6aba35 100644
--- a/sw/source/ui/vba/vbavariable.cxx
+++ b/sw/source/ui/vba/vbavariable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,3 +104,4 @@ SwVbaVariable::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbavariable.hxx b/sw/source/ui/vba/vbavariable.hxx
index af076804ef17..bee3654f3b4e 100644
--- a/sw/source/ui/vba/vbavariable.hxx
+++ b/sw/source/ui/vba/vbavariable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_VARIABLE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbavariables.cxx b/sw/source/ui/vba/vbavariables.cxx
index 6aa662702a12..1886707fd365 100644
--- a/sw/source/ui/vba/vbavariables.cxx
+++ b/sw/source/ui/vba/vbavariables.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,3 +101,5 @@ SwVbaVariables::getServiceNames()
}
return sNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbavariables.hxx b/sw/source/ui/vba/vbavariables.hxx
index 4933ef6e75a4..9897709bc9a4 100644
--- a/sw/source/ui/vba/vbavariables.hxx
+++ b/sw/source/ui/vba/vbavariables.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,5 @@ public:
};
#endif /* SW_VBA_VARIABLES_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx
index 9cb8bf1490ce..e17fd7a0d766 100644
--- a/sw/source/ui/vba/vbaview.cxx
+++ b/sw/source/ui/vba/vbaview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,32 +87,32 @@ SwVbaView::getSeekView() throw (css::uno::RuntimeException)
}
uno::Reference< lang::XServiceInfo > xServiceInfo( xCurrentText, uno::UNO_QUERY_THROW );
rtl::OUString aImplName = xServiceInfo->getImplementationName();
- if( aImplName.equalsAscii("SwXBodyText") )
+ if( aImplName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SwXBodyText")) )
{
return word::WdSeekView::wdSeekMainDocument;
}
- else if( aImplName.equalsAscii("SwXHeadFootText") )
+ else if( aImplName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SwXHeadFootText")) )
{
- if( HeaderFooterHelper::isHeader( mxModel, xCurrentText ) )
+ if( HeaderFooterHelper::isHeader( mxModel ) )
{
- if( HeaderFooterHelper::isFirstPageHeader( mxModel, xCurrentText ) )
+ if( HeaderFooterHelper::isFirstPageHeader( mxModel ) )
return word::WdSeekView::wdSeekFirstPageHeader;
- else if( HeaderFooterHelper::isEvenPagesHeader( mxModel, xCurrentText ) )
+ else if( HeaderFooterHelper::isEvenPagesHeader( mxModel ) )
return word::WdSeekView::wdSeekEvenPagesHeader;
else
return word::WdSeekView::wdSeekPrimaryHeader;
}
else
{
- if( HeaderFooterHelper::isFirstPageFooter( mxModel, xCurrentText ) )
+ if( HeaderFooterHelper::isFirstPageFooter( mxModel ) )
return word::WdSeekView::wdSeekFirstPageFooter;
- else if( HeaderFooterHelper::isEvenPagesFooter( mxModel, xCurrentText ) )
+ else if( HeaderFooterHelper::isEvenPagesFooter( mxModel ) )
return word::WdSeekView::wdSeekEvenPagesFooter;
else
return word::WdSeekView::wdSeekPrimaryFooter;
}
}
- else if( aImplName.equalsAscii("SwXFootnote") )
+ else if( aImplName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SwXFootnote")) )
{
if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Endnote") ) ) )
return word::WdSeekView::wdSeekEndnotes;
@@ -129,9 +130,7 @@ SwVbaView::setSeekView( ::sal_Int32 _seekview ) throw (css::uno::RuntimeExceptio
// document, so we can jump back to this position, if the macro sets
// the ViewMode back to wdSeekMainDocument
- // if( _seekview == getSeekView() )
- // return;
-
+ word::gotoSelectedObjectAnchor( mxModel );
switch( _seekview )
{
case word::WdSeekView::wdSeekFirstPageFooter:
@@ -181,7 +180,7 @@ SwVbaView::setSeekView( ::sal_Int32 _seekview ) throw (css::uno::RuntimeExceptio
{
uno::Reference< text::XTextDocument > xTextDocument( mxModel, uno::UNO_QUERY_THROW );
uno::Reference< text::XText > xText = xTextDocument->getText();
- mxViewCursor->gotoRange( getFirstObjectPosition( xText ), sal_False );
+ mxViewCursor->gotoRange( word::getFirstObjectPosition( xText ), sal_False );
break;
}
}
@@ -314,7 +313,7 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType )
uno::Reference< beans::XPropertySet > xCursorProps( mxViewCursor, uno::UNO_QUERY_THROW );
rtl::OUString aPageStyleName;
xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName;
- if( aPageStyleName.equalsAscii("First Page") )
+ if( aPageStyleName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("First Page")) )
{
// go to the beginning of where the next style is used
sal_Bool hasNextPage = sal_False;
@@ -376,28 +375,7 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType )
{
DebugHelper::exception( SbERR_INTERNAL_ERROR, rtl::OUString() );
}
- uno::Reference< text::XTextRange > xTextRange = getFirstObjectPosition( xText );
- return xTextRange;
-}
-
-uno::Reference< text::XTextRange > SwVbaView::getFirstObjectPosition( const uno::Reference< text::XText >& xText ) throw (uno::RuntimeException)
-{
- // if the first object is table, get the position of first cell
- uno::Reference< text::XTextRange > xTextRange;
- uno::Reference< container::XEnumerationAccess > xParaAccess( xText, uno::UNO_QUERY_THROW );
- uno::Reference< container::XEnumeration> xParaEnum = xParaAccess->createEnumeration();
- if( xParaEnum->hasMoreElements() )
- {
- uno::Reference< lang::XServiceInfo > xServiceInfo( xParaEnum->nextElement(), uno::UNO_QUERY_THROW );
- if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextTable") ) ) )
- {
- uno::Reference< table::XCellRange > xCellRange( xServiceInfo, uno::UNO_QUERY_THROW );
- uno::Reference< text::XText> xFirstCellText( xCellRange->getCellByPosition(0, 0), uno::UNO_QUERY_THROW );
- xTextRange = xFirstCellText->getStart();
- }
- }
- if( !xTextRange.is() )
- xTextRange = xText->getStart();
+ uno::Reference< text::XTextRange > xTextRange = word::getFirstObjectPosition( xText );
return xTextRange;
}
@@ -420,3 +398,4 @@ SwVbaView::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaview.hxx b/sw/source/ui/vba/vbaview.hxx
index 03e183ec38a3..bfe77313489b 100644
--- a/sw/source/ui/vba/vbaview.hxx
+++ b/sw/source/ui/vba/vbaview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,3 +67,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SW_VBA_VIEW_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx
index e3d9bddbc7aa..cb245e9b2a09 100644
--- a/sw/source/ui/vba/vbawindow.cxx
+++ b/sw/source/ui/vba/vbawindow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,12 +26,17 @@
*
************************************************************************/
#include <vbahelper/helperdecl.hxx>
+#include <ooo/vba/word/WdWindowState.hpp>
+#include <vcl/wrkwin.hxx>
+
#include "vbawindow.hxx"
#include "vbaglobals.hxx"
#include "vbadocument.hxx"
#include "vbaview.hxx"
#include "vbapanes.hxx"
#include "vbapane.hxx"
+#include "wordvbahelper.hxx"
+#include <view.hxx>
using namespace ::com::sun::star;
using namespace ::ooo::vba;
@@ -73,6 +79,44 @@ void SAL_CALL SwVbaWindow::setView( const uno::Any& _view ) throw (uno::RuntimeE
}
uno::Any SAL_CALL
+SwVbaWindow::getWindowState() throw (uno::RuntimeException)
+{
+ sal_Int32 nwindowState = word::WdWindowState::wdWindowStateNormal;
+ SwView* pView = word::getView( m_xModel );
+ SfxViewFrame* pViewFrame = pView -> GetViewFrame();
+ WorkWindow* pWork = (WorkWindow*) pViewFrame->GetFrame().GetSystemWindow();
+ if ( pWork )
+ {
+ if ( pWork -> IsMaximized())
+ nwindowState = word::WdWindowState::wdWindowStateMaximize;
+ else if (pWork -> IsMinimized())
+ nwindowState = word::WdWindowState::wdWindowStateMinimize;
+ }
+ return uno::makeAny( nwindowState );
+}
+
+void SAL_CALL
+SwVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeException)
+{
+ sal_Int32 nwindowState = word::WdWindowState::wdWindowStateMaximize;
+ _windowstate >>= nwindowState;
+ SwView* pView = word::getView( m_xModel );
+ SfxViewFrame* pViewFrame = pView -> GetViewFrame();
+ WorkWindow* pWork = (WorkWindow*) pViewFrame->GetFrame().GetSystemWindow();
+ if ( pWork )
+ {
+ if ( nwindowState == word::WdWindowState::wdWindowStateMaximize )
+ pWork -> Maximize();
+ else if (nwindowState == word::WdWindowState::wdWindowStateMinimize)
+ pWork -> Minimize();
+ else if (nwindowState == word::WdWindowState::wdWindowStateNormal)
+ pWork -> Restore();
+ else
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid Parameter" ) ), uno::Reference< uno::XInterface >() );
+ }
+}
+
+uno::Any SAL_CALL
SwVbaWindow::Panes( const uno::Any& aIndex ) throw (uno::RuntimeException)
{
uno::Reference< XCollection > xPanes( new SwVbaPanes( this, mxContext, m_xModel ) );
@@ -106,3 +150,5 @@ SwVbaWindow::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbawindow.hxx b/sw/source/ui/vba/vbawindow.hxx
index 0809d2b73685..65cdc50b6516 100644
--- a/sw/source/ui/vba/vbawindow.hxx
+++ b/sw/source/ui/vba/vbawindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,6 +45,8 @@ public:
// Attributes
virtual css::uno::Any SAL_CALL getView() throw (css::uno::RuntimeException);
virtual void SAL_CALL setView( const css::uno::Any& _view ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getWindowState() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setWindowState( const css::uno::Any& _windowstate ) throw (css::uno::RuntimeException);
// Methods
virtual void SAL_CALL Activate( ) throw (css::uno::RuntimeException);
virtual void SAL_CALL Close( const css::uno::Any& SaveChanges, const css::uno::Any& RouteDocument ) throw (css::uno::RuntimeException);
@@ -55,3 +58,5 @@ public:
};
#endif //SW_VBA_WINDOW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbawrapformat.cxx b/sw/source/ui/vba/vbawrapformat.cxx
index 4125cc00aaa0..5320e0a2af32 100644
--- a/sw/source/ui/vba/vbawrapformat.cxx
+++ b/sw/source/ui/vba/vbawrapformat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -250,3 +251,4 @@ extern sdecl::ServiceDecl const serviceDecl(
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbawrapformat.hxx b/sw/source/ui/vba/vbawrapformat.hxx
index 71520d78aaae..ed00df65a8c1 100644
--- a/sw/source/ui/vba/vbawrapformat.hxx
+++ b/sw/source/ui/vba/vbawrapformat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,5 @@ public:
};
#endif//SW_VBA_XWRAPFORMAT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx
index 82dfacf4f18d..aa63b8b21712 100644
--- a/sw/source/ui/vba/wordvbahelper.cxx
+++ b/sw/source/ui/vba/wordvbahelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,11 +30,16 @@
#include <comphelper/processfactory.hxx>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <unotxdoc.hxx>
#include <doc.hxx>
+#include <view.hxx>
using namespace ::com::sun::star;
using namespace ::ooo::vba;
@@ -71,8 +77,13 @@ uno::Reference< text::XTextViewCursor > getXTextViewCursor( const uno::Reference
uno::Reference< style::XStyle > getCurrentPageStyle( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xCursorProps( getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
+ return getCurrentPageStyle( xModel, xCursorProps );
+}
+
+uno::Reference< style::XStyle > getCurrentPageStyle( const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xProps ) throw (uno::RuntimeException)
+{
rtl::OUString aPageStyleName;
- xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName;
+ xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName;
uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( xModel, uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyles") ) ), uno::UNO_QUERY_THROW );
@@ -87,6 +98,94 @@ sal_Int32 getPageCount( const uno::Reference< frame::XModel>& xModel ) throw (un
return pDocShell ? pDocShell->GetDoc()->GetPageCount() : 0;
}
+uno::Reference< style::XStyle > getDefaultParagraphStyle( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
+{
+ uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( xModel, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xParaStyles( xSytleFamNames->getByName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") ) ), uno::UNO_QUERY_THROW );
+ uno::Reference< style::XStyle > xStyle( xParaStyles->getByName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Standard") ) ), uno::UNO_QUERY_THROW );
+
+ return xStyle;
+}
+
+uno::Reference< text::XTextRange > getFirstObjectPosition( const uno::Reference< text::XText >& xText ) throw (uno::RuntimeException)
+{
+ // if the first object is table, get the position of first cell
+ uno::Reference< text::XTextRange > xTextRange;
+ uno::Reference< container::XEnumerationAccess > xParaAccess( xText, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XEnumeration> xParaEnum = xParaAccess->createEnumeration();
+ if( xParaEnum->hasMoreElements() )
+ {
+ uno::Reference< lang::XServiceInfo > xServiceInfo( xParaEnum->nextElement(), uno::UNO_QUERY_THROW );
+ if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextTable") ) ) )
+ {
+ uno::Reference< table::XCellRange > xCellRange( xServiceInfo, uno::UNO_QUERY_THROW );
+ uno::Reference< text::XText> xFirstCellText( xCellRange->getCellByPosition(0, 0), uno::UNO_QUERY_THROW );
+ xTextRange = xFirstCellText->getStart();
+ }
+ }
+ if( !xTextRange.is() )
+ xTextRange = xText->getStart();
+ return xTextRange;
+}
+
+uno::Reference< text::XText > getCurrentXText( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
+{
+ uno::Reference< text::XTextRange > xTextRange;
+ uno::Reference< text::XTextContent > xTextContent( xModel->getCurrentSelection(), uno::UNO_QUERY );
+ if( !xTextContent.is() )
+ {
+ uno::Reference< container::XIndexAccess > xIndexAccess( xModel->getCurrentSelection(), uno::UNO_QUERY );
+ if( xIndexAccess.is() )
+ {
+ xTextContent.set( xIndexAccess->getByIndex(0), uno::UNO_QUERY );
+ }
+ }
+
+ if( xTextContent.is() )
+ xTextRange.set( xTextContent->getAnchor(), uno::UNO_QUERY );
+
+ if( !xTextRange.is() )
+ xTextRange.set( getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW );
+
+ uno::Reference< text::XText > xText;
+ try
+ {
+ xText.set( xTextRange->getText(), uno::UNO_QUERY );
+ }
+ catch( uno::RuntimeException& )
+ {
+ //catch exception "no text selection"
+ }
+ uno::Reference< beans::XPropertySet > xVCProps( xTextRange, uno::UNO_QUERY_THROW );
+ while( xVCProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ) >>= xTextContent )
+ {
+ xText = xTextContent->getAnchor()->getText();
+ xVCProps.set( xText->createTextCursor(), uno::UNO_QUERY_THROW );
+ }
+
+ if( !xText.is() )
+ throw uno::RuntimeException( rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), uno::Reference< uno::XInterface >() );
+
+ return xText;
+}
+
+sal_Bool gotoSelectedObjectAnchor( const uno::Reference< frame::XModel>& xModel ) throw (uno::RuntimeException)
+{
+ sal_Bool isObjectSelected = sal_False;
+ uno::Reference< text::XTextContent > xTextContent( xModel->getCurrentSelection(), uno::UNO_QUERY );
+ if( xTextContent.is() )
+ {
+ uno::Reference< text::XTextRange > xTextRange( xTextContent->getAnchor(), uno::UNO_QUERY_THROW );
+ uno::Reference< view::XSelectionSupplier > xSelectSupp( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
+ xSelectSupp->select( uno::makeAny( xTextRange ) );
+ isObjectSelected = sal_True;
+ }
+ return isObjectSelected;
+}
+
} // word
} //
} //
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/wordvbahelper.hxx b/sw/source/ui/vba/wordvbahelper.hxx
index 0629d613a724..fd91822649a1 100644
--- a/sw/source/ui/vba/wordvbahelper.hxx
+++ b/sw/source/ui/vba/wordvbahelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,6 +33,8 @@
#include <com/sun/star/text/XTextViewCursor.hpp>
#include <com/sun/star/text/XPageCursor.hpp>
#include <com/sun/star/style/XStyle.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
class SwDocShell;
class SwView;
@@ -46,9 +49,24 @@ namespace ooo
SwView* getView( const css::uno::Reference< css::frame::XModel>& xModel );
css::uno::Reference< css::text::XTextViewCursor > getXTextViewCursor( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
css::uno::Reference< css::style::XStyle > getCurrentPageStyle( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
+ css::uno::Reference< css::style::XStyle > getCurrentPageStyle( const css::uno::Reference< css::frame::XModel>& xModel, const css::uno::Reference< css::beans::XPropertySet >& xProps ) throw (css::uno::RuntimeException);
sal_Int32 getPageCount( const css::uno::Reference< css::frame::XModel>& xModel ) throw (css::uno::RuntimeException);
+ css::uno::Reference< css::style::XStyle > getDefaultParagraphStyle( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
+ css::uno::Reference< css::text::XTextRange > getFirstObjectPosition( const css::uno::Reference< css::text::XText >& xText ) throw (css::uno::RuntimeException);
+ css::uno::Reference< css::text::XText > getCurrentXText( const css::uno::Reference< css::frame::XModel>& xModel ) throw (css::uno::RuntimeException);
+ sal_Bool gotoSelectedObjectAnchor( const css::uno::Reference< css::frame::XModel>& xModel ) throw (css::uno::RuntimeException);
+
+ enum E_DIRECTION
+ {
+ MOVE_LEFT = 1,
+ MOVE_RIGHT,
+ MOVE_UP,
+ MOVE_DOWN
+ };
} // word
} // vba
} // ooo
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/web/wdocsh.cxx b/sw/source/ui/web/wdocsh.cxx
index 4953e715fe45..82344aeafb3c 100644
--- a/sw/source/ui/web/wdocsh.cxx
+++ b/sw/source/ui/web/wdocsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,7 @@
#include <svl/srchitem.hxx>
#include <sfx2/app.hxx>
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
#include <sot/clsids.hxx>
#include <sfx2/objface.hxx>
@@ -64,20 +63,12 @@ TYPEINIT1(SwWebDocShell, SwDocShell);
SFX_IMPL_OBJECTFACTORY(SwWebDocShell, SvGlobalName(SO3_SWWEB_CLASSID), SFXOBJECTSHELL_STD_NORMAL|SFXOBJECTSHELL_HASMENU, "swriter/web" )
-/*-----------------22.01.97 09.29-------------------
-
---------------------------------------------------*/
-
SwWebDocShell::SwWebDocShell(SfxObjectCreateMode eMode ) :
SwDocShell(eMode),
nSourcePara(0)
{
}
-/*-----------------22.01.97 09.29-------------------
-
---------------------------------------------------*/
-
SwWebDocShell::~SwWebDocShell()
{
}
@@ -93,7 +84,7 @@ void SwWebDocShell::FillClass( SvGlobalName * pClassName,
sal_Bool bTemplate /* = sal_False */) const
{
(void)bTemplate;
- DBG_ASSERT( bTemplate == sal_False, "No template for Writer Web" );
+ OSL_ENSURE( bTemplate == sal_False, "No template for Writer Web" );
if (nVersion == SOFFICE_FILEFORMAT_60)
{
@@ -112,3 +103,4 @@ void SwWebDocShell::FillClass( SvGlobalName * pClassName,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/web/wformsh.cxx b/sw/source/ui/web/wformsh.cxx
index 0ce34812216f..4f05755330c2 100644
--- a/sw/source/ui/web/wformsh.cxx
+++ b/sw/source/ui/web/wformsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,9 +33,7 @@
#include <sfx2/msg.hxx>
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include <svl/srchitem.hxx>
#include <sfx2/objface.hxx>
#include <tools/globname.hxx>
@@ -64,8 +63,9 @@ SwWebDrawFormShell::SwWebDrawFormShell(SwView& rVw) :
{
}
-__EXPORT SwWebDrawFormShell::~SwWebDrawFormShell()
+SwWebDrawFormShell::~SwWebDrawFormShell()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/web/wfrmsh.cxx b/sw/source/ui/web/wfrmsh.cxx
index df391080d467..900dd380d9c5 100644
--- a/sw/source/ui/web/wfrmsh.cxx
+++ b/sw/source/ui/web/wfrmsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,11 +51,6 @@
#include <sfx2/msg.hxx>
#include "swslots.hxx"
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SFX_IMPL_INTERFACE(SwWebFrameShell, SwFrameShell, SW_RES(STR_SHELLNAME_WEBFRAME))
{
SFX_POPUPMENU_REGISTRATION(SW_RES(MN_FRM_POPUPMENU));
@@ -65,24 +61,12 @@ SFX_IMPL_INTERFACE(SwWebFrameShell, SwFrameShell, SW_RES(STR_SHELLNAME_WEBFRAME)
TYPEINIT1(SwWebFrameShell, SwFrameShell)
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
SwWebFrameShell::SwWebFrameShell(SwView &_rView) :
SwFrameShell(_rView)
{
SetHelpId(SW_WEBFRAMESHELL);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-
SwWebFrameShell::~SwWebFrameShell()
{
}
@@ -93,3 +77,4 @@ SwWebFrameShell::~SwWebFrameShell()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/web/wgrfsh.cxx b/sw/source/ui/web/wgrfsh.cxx
index a8c85f5b0627..7b8917ab017e 100644
--- a/sw/source/ui/web/wgrfsh.cxx
+++ b/sw/source/ui/web/wgrfsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,3 +73,4 @@ SwWebGrfShell::~SwWebGrfShell()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/web/wlistsh.cxx b/sw/source/ui/web/wlistsh.cxx
index 3c2c578ea628..eaa9500f36c2 100644
--- a/sw/source/ui/web/wlistsh.cxx
+++ b/sw/source/ui/web/wlistsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,8 +61,9 @@ SwWebListShell::SwWebListShell(SwView &_rView) :
SetHelpId(SW_LISTSHELL);
}
-__EXPORT SwWebListShell::~SwWebListShell()
+SwWebListShell::~SwWebListShell()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/web/wolesh.cxx b/sw/source/ui/web/wolesh.cxx
index db23229adb36..47e1d959ad04 100644
--- a/sw/source/ui/web/wolesh.cxx
+++ b/sw/source/ui/web/wolesh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,8 +62,9 @@ SwWebOleShell::SwWebOleShell(SwView &_rView) :
SetHelpId(SW_OLESHELL);
}
-__EXPORT SwWebOleShell::~SwWebOleShell()
+SwWebOleShell::~SwWebOleShell()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/web/wtabsh.cxx b/sw/source/ui/web/wtabsh.cxx
index ebf8d18a5dd7..3d5e01b2101a 100644
--- a/sw/source/ui/web/wtabsh.cxx
+++ b/sw/source/ui/web/wtabsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,9 +69,10 @@ SwWebTableShell::SwWebTableShell(SwView &_rView) :
SetHelpId(SW_TABSHELL);
}
-__EXPORT SwWebTableShell::~SwWebTableShell()
+SwWebTableShell::~SwWebTableShell()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/web/wtextsh.cxx b/sw/source/ui/web/wtextsh.cxx
index 6a77edb155b8..12912b55cc3c 100644
--- a/sw/source/ui/web/wtextsh.cxx
+++ b/sw/source/ui/web/wtextsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,9 +36,7 @@
#include <sfx2/app.hxx>
#include <svl/srchitem.hxx> //***
#include <basic/sbxvar.hxx>
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
#include "swtypes.hxx"
#include "cmdid.h"
@@ -61,11 +60,6 @@
#include <sfx2/msg.hxx>
#include "swslots.hxx"
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SFX_IMPL_INTERFACE(SwWebTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_WEBTEXT))
{
SFX_POPUPMENU_REGISTRATION(SW_RES(MN_TEXT_POPUPMENU));
@@ -76,24 +70,16 @@ SFX_IMPL_INTERFACE(SwWebTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_WEBTEXT))
TYPEINIT1(SwWebTextShell, SwTextShell)
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwWebTextShell::SwWebTextShell(SwView &_rView) :
SwTextShell(_rView)
{
SetHelpId(SW_WEBTEXTSHELL);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SwWebTextShell::~SwWebTextShell()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx
index 9f8c73faf152..6ab11faad338 100644
--- a/sw/source/ui/web/wview.cxx
+++ b/sw/source/ui/web/wview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,30 +104,15 @@ SFX_IMPL_INTERFACE( SwWebView, SwView, SW_RES(RID_WEBTOOLS_TOOLBOX) )
TYPEINIT1(SwWebView,SwView)
-/*-----------------22.01.97 14.27-------------------
-
---------------------------------------------------*/
-
-
SwWebView::SwWebView(SfxViewFrame* _pFrame, SfxViewShell* _pShell) :
SwView(_pFrame, _pShell)
{
}
-/*-----------------22.01.97 14.27-------------------
-
---------------------------------------------------*/
-
-
SwWebView::~SwWebView()
{
}
-/*-----------------23.01.97 09.01-------------------
-
---------------------------------------------------*/
-
-
void SwWebView::SelectShell()
{
// Entscheidung, ob UpdateTable gerufen werden muss
@@ -152,8 +138,6 @@ void SwWebView::SelectShell()
}
else
{
-
- // DELETEZ(pxSelectionObj); //Selektionsobjekt loeschen
SfxDispatcher &rDispatcher = *GetViewFrame()->GetDispatcher();
SwToolbarConfigItem *pBarCfg = SW_MOD()->GetWebToolbarConfig();
@@ -176,7 +160,7 @@ void SwWebView::SelectShell()
break;
}
pSfxShell = rDispatcher.GetShell( --i );
- ASSERT( pSfxShell, "My Shell ist lost in space" );
+ OSL_ENSURE( pSfxShell, "My Shell ist lost in space" );
rDispatcher.Pop( *pSfxShell, SFX_SHELL_POP_UNTIL | SFX_SHELL_POP_DELETE);
}
@@ -328,3 +312,4 @@ void SwWebView::SelectShell()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/wrtsh/delete.cxx b/sw/source/ui/wrtsh/delete.cxx
index d307f75af908..52ca6af91e93 100644
--- a/sw/source/ui/wrtsh/delete.cxx
+++ b/sw/source/ui/wrtsh/delete.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,12 +35,8 @@
#include <swcrsr.hxx>
#include <editeng/lrspitem.hxx> // #i23725#
// --> OD 2006-07-10 #134369#
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _DRAWBASE_HXX
#include <drawbase.hxx>
-#endif
// <--
inline void SwWrtShell::OpenMark()
@@ -115,9 +112,7 @@ long SwWrtShell::DelLine()
SwCrsrShell::LeftMargin();
SetMark();
SwCrsrShell::RightMargin();
-//Warum soll hier noch ein Zeichen in der naechsten Zeile geloescht werden?
-// if(!IsEndOfPara())
-// SwCrsrShell::Right();
+
long nRet = Delete();
Pop(sal_False);
if( nRet )
@@ -391,8 +386,8 @@ long SwWrtShell::DelRight()
LeaveSelFrmMode();
UnSelectFrm();
// --> OD 2006-07-06 #134369#
- ASSERT( !IsFrmSelected(),
- "<SwWrtShell::DelRight(..)> - <SwWrtShell::UnSelectFrm()> should unmark all objects" )
+ OSL_ENSURE( !IsFrmSelected(),
+ "<SwWrtShell::DelRight(..)> - <SwWrtShell::UnSelectFrm()> should unmark all objects" );
// <--
// --> OD 2006-07-10 #134369#
// leave draw mode, if necessary.
@@ -568,3 +563,4 @@ long SwWrtShell::DelPrvWord()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/wrtsh/move.cxx b/sw/source/ui/wrtsh/move.cxx
index 34a9b5554c36..0e04be3665d5 100644
--- a/sw/source/ui/wrtsh/move.cxx
+++ b/sw/source/ui/wrtsh/move.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <sfx2/bindings.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <viewopt.hxx>
#include <crsskip.hxx>
@@ -523,7 +522,6 @@ sal_Bool SwWrtShell::PushCrsr(SwTwips lOffset, sal_Bool bSelect)
if( bIsFrmSel )
{
-// CallChgLnk();
// bei Frames immer nur die obere Ecke nehmen, damit dieser
// wieder selektiert werden kann
aOldRect.SSize( 5, 5 );
@@ -670,7 +668,97 @@ sal_Bool SwWrtShell::GotoPage(sal_uInt16 nPage, sal_Bool bRecord)
sal_Bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, sal_Bool bSelect, sal_Bool bStart )
{
ShellMoveCrsr aTmp( this, bSelect );
- return SwCrsrShell::GotoMark( pMark, bStart );
+ SwPosition aPos = *GetCrsr()->GetPoint();
+ bool bRet = SwCrsrShell::GotoMark( pMark, bStart );
+ if (bRet)
+ aNavigationMgr.addEntry(aPos);
+ return bRet;
+}
+
+sal_Bool SwWrtShell::GotoFly( const String& rName, FlyCntType eType, sal_Bool bSelFrame )
+{
+ SwPosition aPos = *GetCrsr()->GetPoint();
+ bool bRet = SwFEShell::GotoFly(rName, eType, bSelFrame);
+ if (bRet)
+ aNavigationMgr.addEntry(aPos);
+ return bRet;
+}
+
+sal_Bool SwWrtShell::GotoINetAttr( const SwTxtINetFmt& rAttr )
+{
+ SwPosition aPos = *GetCrsr()->GetPoint();
+ bool bRet = SwCrsrShell::GotoINetAttr(rAttr);
+ if (bRet)
+ aNavigationMgr.addEntry(aPos);
+ return bRet;
+}
+
+void SwWrtShell::GotoOutline( sal_uInt16 nIdx )
+{
+ addCurrentPosition();
+ return SwCrsrShell::GotoOutline (nIdx);
+}
+
+sal_Bool SwWrtShell::GotoOutline( const String& rName )
+{
+ SwPosition aPos = *GetCrsr()->GetPoint();
+ bool bRet = SwCrsrShell::GotoOutline (rName);
+ if (bRet)
+ aNavigationMgr.addEntry(aPos);
+ return bRet;
+}
+
+sal_Bool SwWrtShell::GotoRegion( const String& rName )
+{
+ SwPosition aPos = *GetCrsr()->GetPoint();
+ bool bRet = SwCrsrShell::GotoRegion (rName);
+ if (bRet)
+ aNavigationMgr.addEntry(aPos);
+ return bRet;
+ }
+
+sal_Bool SwWrtShell::GotoRefMark( const String& rRefMark, sal_uInt16 nSubType,
+ sal_uInt16 nSeqNo )
+{
+ SwPosition aPos = *GetCrsr()->GetPoint();
+ bool bRet = SwCrsrShell::GotoRefMark(rRefMark, nSubType, nSeqNo);
+ if (bRet)
+ aNavigationMgr.addEntry(aPos);
+ return bRet;
+}
+
+sal_Bool SwWrtShell::GotoNextTOXBase( const String* pName )
+{
+ SwPosition aPos = *GetCrsr()->GetPoint();
+ bool bRet = SwCrsrShell::GotoNextTOXBase(pName);
+ if (bRet)
+ aNavigationMgr.addEntry(aPos);
+ return bRet;
+}
+
+sal_Bool SwWrtShell::GotoTable( const String& rName )
+{
+ SwPosition aPos = *GetCrsr()->GetPoint();
+ bool bRet = SwCrsrShell::GotoTable(rName);
+ if (bRet)
+ aNavigationMgr.addEntry(aPos);
+ return bRet;
+}
+
+sal_Bool SwWrtShell::GotoFld( const SwFmtFld& rFld ) {
+ SwPosition aPos = *GetCrsr()->GetPoint();
+ bool bRet = SwCrsrShell::GotoFld(rFld);
+ if (bRet)
+ aNavigationMgr.addEntry(aPos);
+ return bRet;
+}
+
+const SwRedline* SwWrtShell::GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect ) {
+ SwPosition aPos = *GetCrsr()->GetPoint();
+ const SwRedline *pRedline = SwCrsrShell::GotoRedline(nArrPos, bSelect);
+ if (pRedline)
+ aNavigationMgr.addEntry(aPos);
+ return pRedline;
}
@@ -689,3 +777,4 @@ sal_Bool SwWrtShell::SelectTxtAttr( sal_uInt16 nWhich, const SwTxtAttr* pAttr )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/wrtsh/navmgr.cxx b/sw/source/ui/wrtsh/navmgr.cxx
new file mode 100644
index 000000000000..2ef5b17d5ef4
--- /dev/null
+++ b/sw/source/ui/wrtsh/navmgr.cxx
@@ -0,0 +1,224 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * [ Maja Djordjevic < ovcica@gmail.com > ]
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Cédric Bosdonnat <cbosdonnat@novell.com>
+ * Caolan McNamara <caolanm@redhat.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "precompiled_sw.hxx"
+
+#include "navmgr.hxx"
+#include "wrtsh.hxx"
+#include <sfx2/bindings.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <cmdid.h>
+#include <view.hxx>
+
+/**
+ * If SMART is defined, the navigation history has recency with temporal ordering enhancement,
+ * as described on http://zing.ncsl.nist.gov/hfweb/proceedings/greenberg/
+ */
+#define SMART 1
+
+/*
+ * This method positions the cursor to the position rPos
+ */
+void SwNavigationMgr::GotoSwPosition(const SwPosition &rPos) {
+ SwWrtShell& rSh = *_pMyShell;
+ /* EnterStdMode() prevents the cursor to 'block' the current shell when it should move from the image back to the normal shell */
+ rSh.EnterStdMode();
+ rSh.StartAllAction();
+ /*
+ * cursor consists of two SwPositions: Point and Mark.
+ * Such a pair is called a PaM. SwPaM is derived from SwRing.
+ * The Ring contains the single regions of a multi-selection.
+ */
+ SwPaM* pPaM = rSh.GetCrsr();
+
+ if(pPaM->HasMark())
+ pPaM->DeleteMark(); // If there was a selection, get rid of it
+ *pPaM->GetPoint() = rPos; // Position Cursor
+
+ rSh.EndAllAction();
+}
+/*
+ * Ctor for the SwNavigationMgr class
+ * Sets the shell to the current shell
+ * and the index of the current position to 0
+ */
+
+SwNavigationMgr::SwNavigationMgr(SwWrtShell* pShell)
+ : _nCurrent(0), _pMyShell(pShell) {
+}
+/*
+ * This method is used by the navigation shell - defined in sw/source/ui/inc/navsh.hxx
+ * and implemented in sw/source/ui/shells/navsh.cxx
+ * It is called when we want to check if the back button should be enabled or not.
+ * The back button should be enabled only if there are some entries in the navigation history
+ */
+sal_Bool SwNavigationMgr::backEnabled() {
+ return (_nCurrent > 0);
+}
+/*
+ * Similar to backEnabled() method.
+ * The forward button should be enabled if we ever clicked back
+ * Due to the implementation of the navigation class, this is when the
+ * current position within the navigation history entries in not the last one
+ * i.e. when the _nCurrent index is not at the end of the _entries vector
+ */
+sal_Bool SwNavigationMgr::forwardEnabled() {
+ return _nCurrent+1 < _entries.size();
+}
+
+
+/*
+ * The goBack() method positions the cursor to the previous entry in the navigation history
+ * If there was no history to go forward to, it adds the current position of the cursor
+ * to the history so we could go forward to where we came from
+ */
+void SwNavigationMgr::goBack() {
+ /*
+ * Although the button should be disabled whenever the backEnabled() returns false,
+ * the UI is sometimes not as responsive as we would like it to be :)
+ * this check prevents segmentation faults and in this way the class is not relying on the UI
+ */
+ if (backEnabled()) {
+ SwWrtShell& rSh = *_pMyShell;
+ /* Trying to get the current cursor */
+ SwPaM* pPaM = rSh.GetCrsr();
+ if (!pPaM) {
+ return;
+ }
+
+ /* This flag will be used to manually refresh the buttons */
+ bool bForwardWasDisabled = !forwardEnabled();
+ /*
+ * If we're going backwards in our history, but the current location is not
+ * in the history then we need to add *here* to it so that we can "go
+ * forward" to here again.
+ */
+
+ if (bForwardWasDisabled) {
+ /*
+ * the cursor consists of two SwPositions: Point and Mark.
+ * We are adding the current Point to the navigation history
+ * so we could later navigate forward to it
+ */
+ /* The addEntry() method returns true iff we should decrement the index before navigating back */
+ if (addEntry(*pPaM->GetPoint()) ) {
+ _nCurrent--;
+ }
+ }
+ _nCurrent--;
+ /* Position cursor to appropriate navigation history entry */
+ GotoSwPosition(_entries[_nCurrent]);
+ /* Refresh the buttons */
+ if (bForwardWasDisabled)
+ _pMyShell->GetView().GetViewFrame()->GetBindings().Invalidate(FN_NAVIGATION_FORWARD);
+ if (!backEnabled())
+ _pMyShell->GetView().GetViewFrame()->GetBindings().Invalidate(FN_NAVIGATION_BACK);
+ }
+}
+/*
+ * The goForward() method positions the cursor to the next entry in the navigation history
+ */
+
+void SwNavigationMgr::goForward() {
+ /*
+ * Although the button should be disabled whenever the backForward() returns false,
+ * the UI is sometimes not as responsive as we would like it to be :)
+ * this check prevents segmentation faults and in this way the class is not relying on the UI
+ */
+
+ if (forwardEnabled()) {
+ /* This flag will be used to manually refresh the buttons */
+ bool bBackWasDisabled = !backEnabled();
+ /*
+ * The current index is positioned at the current entry in the navigation history
+ * We have to increment it to go to the next entry
+ */
+ _nCurrent++;
+ GotoSwPosition(_entries[_nCurrent]);
+ /* Refresh the buttons */
+ if (bBackWasDisabled)
+ _pMyShell->GetView().GetViewFrame()->GetBindings().Invalidate(FN_NAVIGATION_BACK);
+ if (!forwardEnabled())
+ _pMyShell->GetView().GetViewFrame()->GetBindings().Invalidate(FN_NAVIGATION_FORWARD);
+ }
+}
+/*
+ * This method adds the SwPosition rPos to the navigation history
+ * rPos is usually the current position of the cursor in the document
+ */
+bool SwNavigationMgr::addEntry(const SwPosition& rPos) {
+ /* Flags that will be used for refreshing the buttons */
+ bool bBackWasDisabled = !backEnabled();
+ bool bForwardWasEnabled = forwardEnabled();
+
+ bool bRet = false; // return value of the function.
+ // Indicates weather the index should be decremented before jumping back or not
+#if SMART
+ /* If any forward history exists, twist the tail of the list from the current position to the end */
+ if (bForwardWasEnabled) {
+
+ size_t number_of_entries = _entries.size(); /* To avoid calling _entries.size() multiple times */
+ int curr = _nCurrent; /* Index from which we'll twist the tail. */
+ int n = (number_of_entries - curr) / 2; /* Number of entries that will swap places */
+ for (int i = 0; i < n; i++) {
+ SwPosition temp = _entries[curr + i];
+ _entries[curr + i] = _entries[number_of_entries -1 - i];
+ _entries[number_of_entries -1 - i] = temp;
+ }
+
+ if (_entries.back() != rPos)
+ _entries.push_back(rPos);
+
+
+ bRet = true;
+ }
+ else {
+ if ( (_entries.size() > 0 && _entries.back() != rPos) || (_entries.size() == 0) ) {
+ _entries.push_back(rPos);
+ bRet = true;
+ }
+ if (_entries.size() > 1 && _entries.back() == rPos)
+ bRet = true;
+ if (_entries.size() == 1 && _entries.back() == rPos)
+ bRet = false;
+ }
+#else
+ _entries.erase(_entries.begin() + _nCurrent, _entries.end());
+ _entries.push_back(rPos);
+ bRet = true;
+#endif
+ _nCurrent = _entries.size();
+
+ /* Refresh buttons */
+ if (bBackWasDisabled)
+ _pMyShell->GetView().GetViewFrame()->GetBindings().Invalidate(FN_NAVIGATION_BACK);
+ if (bForwardWasEnabled)
+ _pMyShell->GetView().GetViewFrame()->GetBindings().Invalidate(FN_NAVIGATION_FORWARD);
+ return bRet;
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index f0f1d8f88ff4..e07320f14511 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -619,7 +620,6 @@ long SwWrtShell::SttLeaveSelect(const Point *, sal_Bool )
if(SwCrsrShell::HasSelection() && !IsSelTblCells() && bClearMark) {
return 0;
}
-// if( IsSelTblCells() ) aSelTblLink.Call(this);
ClearMark();
return 1;
}
@@ -773,7 +773,7 @@ void SwWrtShell::LeaveSelFrmMode()
IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFmt )
{
const SwFrmFmt *pFmt = pFlyFmt ? (SwFrmFmt*)pFlyFmt : GetFlyFrmFmt();
- ASSERT(pFmt, kein FrameFormat.);
+ OSL_ENSURE(pFmt, "no frame format");
const SvxMacroItem &rFmtMac = pFmt->GetMacro();
if(rFmtMac.HasMacro(SW_EVENT_OBJECT_SELECT))
@@ -1070,3 +1070,4 @@ sal_Bool SwWrtShell::SelectNextPrevHyperlink( sal_Bool bNext )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index 2d0bcc433be1..5d920fb743a9 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,9 +38,7 @@
#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
-#endif
+#include <math.h>
#include <hintids.hxx>
#include <svx/svdview.hxx>
#include <sot/factory.hxx>
@@ -107,8 +106,6 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <sfx2/viewfrm.hxx>
-#include <editeng/acorrcfg.hxx>
-
#include "PostItMgr.hxx"
#include <sfx2/msgpool.hxx>
@@ -124,6 +121,7 @@ using namespace com::sun::star;
ePageMove(MV_NO),\
pCrsrStack(0), \
rView(rShell),\
+ aNavigationMgr(this), \
bDestOnStack(sal_False), \
fnLeaveSelect(&SwWrtShell::SttLeaveSelect)
@@ -258,18 +256,6 @@ void SwWrtShell::Insert( const String &rStr )
bDeleted = DelRight() != 0;
}
- /*
-JP 21.01.98: Ueberschreiben ueberschreibt nur die Selektion, nicht das
- naechste Zeichen.
- if( bHasSel && !bIns && 1 < rStr.Len() )
- {
- // falls mehrere Zeichen anstehen, nur das erste einfuegen,
- // der Rest muss dann aber Ueberschrieben werden.
- SwEditShell::Insert( rStr.GetChar( 0 ) );
- SwEditShell::Overwrite( rStr.Copy( 1 ) );
- }
- else
-*/
bCallIns ?
SwEditShell::Insert2( rStr, bDeleted ) : SwEditShell::Overwrite( rStr );
@@ -279,7 +265,6 @@ JP 21.01.98: Ueberschreiben ueberschreibt nur die Selektion, nicht das
EndAllAction();
EndUndo();
}
-// delete pChgFlg;
}
/* Begrenzung auf maximale Hoehe geht nicht, da die maximale Hoehe
@@ -422,27 +407,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
// TODO/LATER: recording! Convert properties to items
case SID_INSERT_PLUGIN:
- /*
- if(pReq)
- {
- INetURLObject* pURL = aDlg.GetURL();
- if(pURL)
- pReq->AppendItem(SfxStringItem(FN_PARAM_2, pURL->GetMainURL(INetURLObject::NO_DECODE)));
- pReq->AppendItem(SfxStringItem(FN_PARAM_3 , aDlg.GetCommands()));
- } */
case SID_INSERT_FLOATINGFRAME:
- /*
- if(pReq && xFloatingFrame.Is())
- {
- const SfxFrameDescriptor* pDescriptor = xFloatingFrame->GetFrameDescriptor();
- pReq->AppendItem(SfxStringItem(FN_PARAM_1, pDescriptor->GetName()));
- pReq->AppendItem(
- SfxStringItem( FN_PARAM_2,
- pDescriptor->GetURL().GetMainURL(INetURLObject::NO_DECODE)));
- pReq->AppendItem(SvxSizeItem(FN_PARAM_3, pDescriptor->GetMargin()));
- pReq->AppendItem(SfxByteItem(FN_PARAM_4, pDescriptor->GetScrollingMode()));
- pReq->AppendItem(SfxBoolItem(FN_PARAM_5, pDescriptor->HasFrameBorder()));
- }*/
{
SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool();
const SfxSlot* pSlot = pSlotPool->GetSlot(nSlotId);
@@ -502,8 +467,6 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
pClient->DoVerb( SVVERB_SHOW );
// TODO/LATER: set document name - should be done in Client
- //if ( !ERRCODE_TOERROR( nErr ) )
- // xIPObj->SetDocumentName( GetView().GetDocShell()->GetTitle() );
}
}
}
@@ -559,7 +522,7 @@ sal_Bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyF
{
try
{
- xSet->setPropertyValue( ::rtl::OUString::createFromAscii("Formula"), uno::makeAny( ::rtl::OUString( aMathData ) ) );
+ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Formula")), uno::makeAny( ::rtl::OUString( aMathData ) ) );
bActivate = sal_False;
}
catch ( uno::Exception& )
@@ -659,7 +622,7 @@ void SwWrtShell::LaunchOLEObj( long nVerb )
!GetView().GetViewFrame()->GetFrame().IsInPlace() )
{
svt::EmbeddedObjectRef& xRef = GetOLEObject();
- ASSERT( xRef.is(), "OLE not found" );
+ OSL_ENSURE( xRef.is(), "OLE not found" );
SfxInPlaceClient* pCli=0;
pCli = GetView().FindIPClient( xRef.GetObject(), &GetView().GetEditWin() );
@@ -705,7 +668,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
{
//Einstellen der Skalierung am Client. Diese ergibt sich aus der Differenz
//zwischen der VisArea des Objektes und der ObjArea.
- ASSERT( xObj.is(), "ObjectRef not valid" );
+ OSL_ENSURE( xObj.is(), "ObjectRef not valid" );
sal_Int64 nAspect = xObj.GetViewAspect();
if ( nAspect == embed::Aspects::MSOLE_ICON )
@@ -806,13 +769,13 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
}
catch( embed::NoVisualAreaSizeException& )
{
- DBG_ERROR( "Can't get visual area size!\n" );
+ OSL_ENSURE(false, "Can't get visual area size!\n" );
// the scaling will not be done
}
catch( uno::Exception& )
{
// TODO/LATER: handle the error
- DBG_ERROR( "Can't get visual area size!\n" );
+ OSL_ENSURE(false, "Can't get visual area size!\n" );
return;
}
@@ -900,7 +863,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
{
// --> 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." );
+ OSL_ENSURE( pFlyFrmFmt, "Could not find fly frame." );
if ( pFlyFrmFmt )
{
const Point &rPoint = pFlyFrmFmt->GetLastFlyFrmPrtRectPos();
@@ -953,6 +916,8 @@ void SwWrtShell::InsertPageBreak(const String *pPageDesc, sal_uInt16 nPgNum )
if(HasSelection())
DelRight();
SwFEShell::SplitNode();
+ // delete the numbered attribute of the last line if the last line is empty
+ GetDoc()->ClearLineNumAttrs( *GetCrsr()->GetPoint() );
}
const SwPageDesc *pDesc = pPageDesc
@@ -1034,7 +999,7 @@ void SwWrtShell::InsertFootnote(const String &rStr, sal_Bool bEndNote, sal_Bool
SwapPam();
ClearMark();
}
-
+ SwPosition aPos = *GetCrsr()->GetPoint();
SwFmtFtn aFootNote( bEndNote );
if(rStr.Len())
aFootNote.SetNumStr( rStr );
@@ -1047,6 +1012,7 @@ void SwWrtShell::InsertFootnote(const String &rStr, sal_Bool bEndNote, sal_Bool
Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
GotoFtnTxt();
}
+ aNavigationMgr.addEntry(aPos);
}
}
/*------------------------------------------------------------------------
@@ -1089,7 +1055,6 @@ void SwWrtShell::SplitNode( sal_Bool bAutoFmt, sal_Bool bCheckTableStart )
// extern void SetNumChrFmt( SwWrtShell*, SwNumRules& );
// -> #i40041#
-// --> OD 2005-10-25 #b6340308#
// Preconditions (as far as OD has figured out):
// - <SwEditShell::HasNumber()> is sal_False, if <bNum> is sal_True
// - <SwEditShell::HasBullet()> is sal_False, if <bNum> is sal_False
@@ -1104,7 +1069,6 @@ void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
const SwNumRule * pNumRule = pCurRule;
- // --> OD 2005-10-25 #b6340308#
// - activate outline rule respectively turning on outline rule for
// current text node. But, only for turning on a numbering (<bNum> == sal_True).
// - overwrite found numbering rule at current cursor position, if
@@ -1115,7 +1079,7 @@ void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
SwTxtFmtColl * pColl = GetCurTxtFmtColl();
if ( pColl )
{
- // --> OD 2005-10-25 #b6340308# - retrieve numbering rule at paragraph
+ // retrieve numbering rule at paragraph
// style, which is found at current cursor position in the document.
SwNumRule* pCollRule = pDoc->FindNumRulePtr(pColl->GetNumRule().GetValue());
// --> OD 2005-10-25 #125993# - The outline numbering rule isn't allowed
@@ -1131,29 +1095,15 @@ void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
pCollRule = 0;
}
}
- // --> OD 2006-11-20 #i71764#
- // Document setting OUTLINE_LEVEL_YIELDS_OUTLINE_RULE has no influence
- // any more.
-// if ( pCollRule == NULL &&
-// NO_NUMBERING != pColl->GetOutlineLevel() &&
-// GetDoc()->get(IDocumentSettingAccess::OUTLINE_LEVEL_YIELDS_OUTLINE_RULE) )
-// {
-// pCollRule = GetDoc()->GetOutlineNumRule();
-// }
- // <--
- // <--
- // --> OD 2005-10-25 #b6340308#
if ( !pCollRule )
{
pNumRule = pCollRule;
}
- // --> OD 2006-06-12 #b6435904#
// no activation or continuation of outline numbering in Writer/Web document
else if ( bNum &&
!dynamic_cast<SwWebDocShell*>(GetDoc()->GetDocShell()) &&
pCollRule == GetDoc()->GetOutlineNumRule() )
- // <--
{
if ( pNumRule == pCollRule )
{
@@ -1167,9 +1117,9 @@ void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
// check, if numbering of the outline level of the pararaph
// style is active. If not, activate this outline level.
nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();
- ASSERT( pColl->IsAssignedToListLevelOfOutlineStyle(), //<-end,zhaojianwei
+ OSL_ENSURE( pColl->IsAssignedToListLevelOfOutlineStyle(),
"<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
- if ( pColl->IsAssignedToListLevelOfOutlineStyle() && //<-end,zhaojianwei
+ if ( pColl->IsAssignedToListLevelOfOutlineStyle() &&
pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType()
== SVX_NUM_NUMBER_NONE )
{
@@ -1215,10 +1165,10 @@ void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
{
// check, if numbering of the outline level of the pararaph
// style is active. If not, activate this outline level.
- nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();//#outline level,zhaojianwei
- ASSERT( pColl->IsAssignedToListLevelOfOutlineStyle(),//#outline level,zhaojianwei
+ nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();
+ OSL_ENSURE( pColl->IsAssignedToListLevelOfOutlineStyle(),
"<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
- if ( pColl->IsAssignedToListLevelOfOutlineStyle() &&//#outline level,zhaojianwei
+ if ( pColl->IsAssignedToListLevelOfOutlineStyle() &&
pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType()
== SVX_NUM_NUMBER_NONE )
{
@@ -1235,7 +1185,6 @@ void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
}
}
- // --> OD 2005-10-25 #b6340308#
// Only automatic numbering/bullet rules should be changed.
// Note: The outline numbering rule is also an automatic one. It's only
// changed, if it has to be activated.
@@ -1251,11 +1200,8 @@ void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
pNumRule = 0;
}
}
- // <--
- // --> OD 2005-10-25 #b6340308#
// Search for a previous numbering/bullet rule to continue it.
- // --> OD 2008-03-18 #refactorlists#
String sContinuedListId;
if ( !pNumRule )
{
@@ -1264,13 +1210,11 @@ void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
sContinuedListId );
bContinueFoundNumRule = pNumRule != 0;
}
- // <--
if (pNumRule)
{
SwNumRule aNumRule(*pNumRule);
- // --> OD 2005-10-25 #b6340308#
// do not change found numbering/bullet rule, if it should only be continued.
if ( !bContinueFoundNumRule )
{
@@ -1278,12 +1222,10 @@ void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
if (pTxtNode)
{
- // --> OD 2005-10-26 #b6340308# - use above retrieve outline
- // level, if outline numbering has to be activated.
- int nLevel = bActivateOutlineRule ////#outline level,zhaojianwei,need more consideration
+ // use above retrieve outline level, if outline numbering has to be activated.
+ int nLevel = bActivateOutlineRule
? nActivateOutlineLvl
: pTxtNode->GetActualListLevel();
- // <--
if (nLevel < 0)
nLevel = 0;
@@ -1297,37 +1239,29 @@ void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
aFmt.SetNumberingType(SVX_NUM_ARABIC);
else
{
- // --> OD 2008-06-03 #i63395#
- // Only apply user defined default bullet font
+ // #i63395# Only apply user defined default bullet font
if ( numfunc::IsDefBulletFontUserDefined() )
{
const Font* pFnt = &numfunc::GetDefBulletFont();
aFmt.SetBulletFont( pFnt );
}
- // <--
aFmt.SetBulletChar( numfunc::GetBulletChar(static_cast<sal_uInt8>(nLevel)));
aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
}
aNumRule.Set(static_cast<sal_uInt16>(nLevel), aFmt);
}
}
- // <--
- // --> OD 2008-02-08 #newlistlevelattrs#
// reset indent attribute on applying list style
- // --> OD 2008-03-27 #refactorlists#
SetCurNumRule( aNumRule, false, sContinuedListId, true );
- // <--
}
else
{
// --> OD 2009-08-27 #i95907#
const SvxNumberFormat::SvxNumPositionAndSpaceMode ePosAndSpaceMode(
numfunc::GetDefaultPositionAndSpaceMode() );
- // --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule aNumRule( GetUniqueNumRuleName(), ePosAndSpaceMode );
// <--
- // <--
// Zeichenvorlage an die Numerierung haengen
SwCharFmt* pChrFmt;
SwDocShell* pDocSh = GetView().GetDocShell();
@@ -1403,11 +1337,7 @@ void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
if ( pTxtNode &&
ePosAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT )
{
- // --> OD 2010-01-05 #b6884103#
-// short nTxtNodeFirstLineOffset( 0 );
-// pTxtNode->GetFirstLineOfsWithNum( nTxtNodeFirstLineOffset );
-// const SwTwips nTxtNodeIndent = pTxtNode->GetLeftMarginForTabCalculation() +
-// nTxtNodeFirstLineOffset;
+
const SwTwips nTxtNodeIndent = pTxtNode->GetAdditionalIndentForStartingNewList();
// <--
if ( ( nTxtNodeIndent + nWidthOfTabs ) != 0 )
@@ -1430,12 +1360,9 @@ void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
}
}
// <--
- // --> OD 2008-02-08 #newlistlevelattrs#
// reset indent attribute on applying list style
- // --> OD 2008-03-17 #refactorlists#
// start new list
SetCurNumRule( aNumRule, true, String(), true );
- // <--
}
EndUndo(UNDO_NUMORNONUM);
@@ -1468,10 +1395,8 @@ void SwWrtShell::NumOrBulletOff()
aFmt.SetNumberingType(SVX_NUM_NUMBER_NONE);
aNumRule.Set(nLevel, aFmt);
- // --> OD 2008-03-17 #refactorlists#
// no start or continuation of a list - the outline style is only changed.
SetCurNumRule( aNumRule, false );
- // <--
}
}
else
@@ -1510,9 +1435,6 @@ SelectionType SwWrtShell::GetSelectionType() const
if ( BasicActionPend() )
return IsSelFrmMode() ? nsSelectionType::SEL_FRM : nsSelectionType::SEL_TXT;
-// if ( IsTableMode() )
-// return nsSelectionType::SEL_TBL | nsSelectionType::SEL_TBL_CELLS;
-
SwView &_rView = ((SwView&)GetView());
if (_rView.GetPostItMgr() && _rView.GetPostItMgr()->HasActiveSidebarWin() )
return nsSelectionType::SEL_POSTIT;
@@ -1578,9 +1500,7 @@ SelectionType SwWrtShell::GetSelectionType() const
const SwTxtNode* pTxtNd =
GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode();
- // --> OD 2008-03-19 #refactorlists#
if ( pTxtNd && pTxtNd->IsInList() )
- // <--
{
const SwNumFmt& rFmt = pNumRule->Get(sal::static_int_cast< sal_uInt8, sal_Int32>(pTxtNd->GetActualListLevel()));
if ( SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType() )
@@ -1651,7 +1571,14 @@ SwFrmFmt *SwWrtShell::GetTblStyle(const String &rFmtName)
return 0;
}
+SwNavigationMgr& SwWrtShell::GetNavigationMgr() {
+ return aNavigationMgr;
+}
+void SwWrtShell::addCurrentPosition() {
+ SwPaM* pPaM = GetCrsr();
+ aNavigationMgr.addEntry(*pPaM->GetPoint());
+}
/*------------------------------------------------------------------------
Beschreibung: Anwenden der Vorlagen
------------------------------------------------------------------------*/
@@ -1740,10 +1667,6 @@ void SwWrtShell::AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet
EndAction();
}
-/*-----------------12.03.97 12.24-------------------
-
---------------------------------------------------*/
-
void SwWrtShell::AutoUpdateFrame( SwFrmFmt* pFmt, const SfxItemSet& rStyleSet )
{
StartAction();
@@ -1812,6 +1735,12 @@ SwWrtShell::SwWrtShell( SwDoc& rDoc, Window *_pWin, SwView &rShell,
SET_CURR_SHELL( this );
SetSfxViewShell( (SfxViewShell *)&rShell );
SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) );
+
+ // place the cursor on the first field...
+ IFieldmark *pBM = NULL;
+ if ( IsFormProtected() && ( pBM = GetFieldmarkAfter( ) ) !=NULL ) {
+ GotoFieldmark(pBM);
+ }
}
/*
@@ -1841,9 +1770,6 @@ sal_Bool SwWrtShell::Pop( sal_Bool bOldCrsr )
return bRet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
sal_Bool SwWrtShell::CanInsert()
{
return (!(IsSelFrmMode() | IsObjSelected() | (GetView().GetDrawFuncPtr() != NULL) | (GetView().GetPostItMgr()->GetActiveSidebarWin()!= NULL)));
@@ -1895,3 +1821,4 @@ String SwWrtShell::GetSelDescr() const
return aResult;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index 297a9865722b..d5612caaceb6 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,11 +74,6 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwWrtShell::Insert(SwField &rFld)
{
ResetCursorStack();
@@ -153,15 +149,12 @@ void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, sal_Bool bOnlyInSel )
sal_Bool SwWrtShell::StartInputFldDlg( SwField* pFld, sal_Bool bNextButton,
Window* pParentWin, ByteString* pWindowState )
{
-//JP 14.08.96: Bug 30332 - nach Umbau der modularietaet im SFX, muss jetzt
-// das TopWindow der Application benutzt werden.
-// SwFldInputDlg* pDlg = new SwFldInputDlg( GetWin(), *this, pFld );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractFldInputDlg* pDlg = pFact->CreateFldInputDlg( DLG_FLD_INPUT,
pParentWin, *this, pFld, bNextButton);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(pWindowState && pWindowState->Len())
pDlg->SetWindowState(*pWindowState);
sal_Bool bRet = RET_CANCEL == pDlg->Execute();
@@ -172,16 +165,14 @@ sal_Bool SwWrtShell::StartInputFldDlg( SwField* pFld, sal_Bool bNextButton,
GetWin()->Update();
return bRet;
}
-/* -----------------17.06.2003 10:18-----------------
- --------------------------------------------------*/
sal_Bool SwWrtShell::StartDropDownFldDlg(SwField* pFld, sal_Bool bNextButton, ByteString* pWindowState)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractDropDownFieldDialog* pDlg = pFact->CreateDropDownFieldDialog( NULL, *this, pFld, DLG_FLD_DROPDOWN ,bNextButton );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(pWindowState && pWindowState->Len())
pDlg->SetWindowState(*pWindowState);
sal_uInt16 nRet = pDlg->Execute();
@@ -265,7 +256,6 @@ void SwWrtShell::ClickToField( const SwField& rFld )
case JE_FMT_GRAPHIC: nSlotId = SID_INSERT_GRAPHIC; break;
case JE_FMT_OLE: nSlotId = SID_INSERT_OBJECT; break;
-// case JE_FMT_TEXT:
}
Right( CRSR_SKIP_CHARS, sal_True, 1, sal_False ); // Feld selektieren
@@ -383,7 +373,7 @@ sal_Bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter )
void LoadURL( const String& rURL, ViewShell* pVSh, sal_uInt16 nFilter,
const String *pTargetFrameName )
{
- ASSERT( rURL.Len() && pVSh, "was soll hier geladen werden?" );
+ OSL_ENSURE( rURL.Len() && pVSh, "what should be loaded here?" );
if( !rURL.Len() || !pVSh )
return ;
@@ -398,7 +388,7 @@ void LoadURL( const String& rURL, ViewShell* pVSh, sal_uInt16 nFilter,
return;
SwDocShell* pDShell = pSh->GetView().GetDocShell();
- DBG_ASSERT( pDShell, "No DocShell?!");
+ OSL_ENSURE( pDShell, "No DocShell?!");
String sTargetFrame;
if( pTargetFrameName && pTargetFrameName->Len() )
sTargetFrame = *pTargetFrameName;
@@ -422,7 +412,6 @@ void LoadURL( const String& rURL, ViewShell* pVSh, sal_uInt16 nFilter,
SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_False );
//#39076# Silent kann lt. SFX entfernt werden.
-// SfxBoolItem aSilent( SID_SILENT, sal_True );
SfxBoolItem aBrowse( SID_BROWSE, sal_True );
if( nFilter & URLLOAD_NEWVIEW )
@@ -496,3 +485,4 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/wrtsh/wrtsh3.cxx b/sw/source/ui/wrtsh/wrtsh3.cxx
index 9988d42abd2a..db5df142c9ce 100644
--- a/sw/source/ui/wrtsh/wrtsh3.cxx
+++ b/sw/source/ui/wrtsh/wrtsh3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#include "precompiled_sw.hxx"
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/childwin.hxx>
#include <sfx2/bindings.hxx>
@@ -59,8 +58,7 @@ extern sal_Bool bNoInterrupt; // in mainwn.cxx
sal_Bool SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark)
{
-//JP 08.03.96: die Wizards brauchen die Selektion !!
-// EndSelect();
+ addCurrentPosition();
(this->*fnKillSel)( 0, sal_False );
sal_Bool bRet = sal_True;
@@ -129,7 +127,7 @@ bool SwWrtShell::GotoFieldmark(::sw::mark::IFieldmark const * const pMark)
void SwWrtShell::DrawSelChanged( )
{
- static sal_uInt16 __READONLY_DATA aInval[] =
+ static sal_uInt16 const aInval[] =
{
SID_ATTR_FILL_STYLE, SID_ATTR_FILL_COLOR, SID_ATTR_LINE_STYLE,
SID_ATTR_LINE_WIDTH, SID_ATTR_LINE_COLOR, 0
@@ -205,7 +203,7 @@ sal_Bool SwWrtShell::GetURLFromButton( String& rURL, String& rDescr ) const
{
uno::Reference< awt::XControlModel > xControlModel = pUnoCtrl->GetUnoControlModel();
- ASSERT( xControlModel.is(), "UNO-Control ohne Model" );
+ OSL_ENSURE( xControlModel.is(), "UNO-Control without Model" );
if( !xControlModel.is() )
return bRet;
@@ -245,3 +243,5 @@ sal_Bool SwWrtShell::GetURLFromButton( String& rURL, String& rDescr ) const
return bRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/wrtsh/wrtsh4.cxx b/sw/source/ui/wrtsh/wrtsh4.cxx
index abc1933560ca..9f8ba07ce204 100644
--- a/sw/source/ui/wrtsh/wrtsh4.cxx
+++ b/sw/source/ui/wrtsh/wrtsh4.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -247,16 +248,6 @@ sal_Bool SwWrtShell::_FwdPara()
{
Push();
ClearMark();
- // --> OD 2009-01-06 #i81824#
- // going right and back again left not needed and causes too much
- // accessibility events due to the cursor movements.
-// if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS))
-// {
-// Pop(sal_False);
-// return 0;
-// }
-// SwCrsrShell::Left(1,CRSR_SKIP_CHARS);
- // <--
sal_Bool bRet = SwCrsrShell::MovePara(fnParaNext, fnParaStart);
ClearMark();
@@ -269,22 +260,7 @@ sal_Bool SwWrtShell::_BwdPara()
{
Push();
ClearMark();
- // --> OD 2009-01-06 #i81824#
- // going left and back again right not needed and causes too much
- // accessibility events due to the cursor movements.
-// if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS))
-// {
-// Pop(sal_False);
-// return 0;
-// }
-// SwCrsrShell::Right(1,CRSR_SKIP_CHARS);
- // <--
- // --> OD 2009-01-06 #i81824#
- // going to start of paragraph only needed, if move to previous paragraph
- // does not happen. Otherwise, useless accessibility events are triggered
- // due to cursor movements.
-// if(!IsSttOfPara())
-// SttPara();
+
sal_Bool bRet = SwCrsrShell::MovePara(fnParaPrev, fnParaStart);
if ( !bRet && !IsSttOfPara() )
{
@@ -298,3 +274,4 @@ sal_Bool SwWrtShell::_BwdPara()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx
index 995315b5ada4..5ec7103246a7 100644
--- a/sw/source/ui/wrtsh/wrtundo.cxx
+++ b/sw/source/ui/wrtsh/wrtundo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -155,6 +156,7 @@ sal_uInt16 SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs )
OSL_ENSURE(comments[i].getLength(), "no Undo/Redo Text set");
buf.append(comments[i]);
buf.append(sal_Unicode('\n'));
+ OSL_ENSURE( !this, "no Undo/Redo Test set" );
}
rStrs.SetString(buf.makeStringAndClear());
return static_cast<sal_uInt16>(comments.size());
@@ -177,3 +179,4 @@ String SwWrtShell::GetRepeatString() const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/uiconfig/sglobal/menubar/menubar.xml b/sw/uiconfig/sglobal/menubar/menubar.xml
index c3bef67c8c12..46b5ba3ae5c4 100644
--- a/sw/uiconfig/sglobal/menubar/menubar.xml
+++ b/sw/uiconfig/sglobal/menubar/menubar.xml
@@ -85,6 +85,7 @@
</menu:menupopup>
</menu:menu>
<menu:menuitem menu:id=".uno:CompareDocuments"/>
+ <menu:menuitem menu:id="vnd.sun.star.findbar:FocusToFindbar"/>
<menu:menuitem menu:id=".uno:SearchDialog"/>
<menu:menuitem menu:id=".uno:EditGlossary"/>
<menu:menuseparator/>
@@ -103,8 +104,8 @@
</menu:menu>
<menu:menu menu:id=".uno:ViewMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:PrintLayout"/>
- <menu:menuitem menu:id=".uno:BrowseView"/>
+ <menu:menuitem menu:id=".uno:PrintLayout" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:BrowseView" menu:style="radio"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:AvailableToolbars"/>
<menu:menuitem menu:id=".uno:StatusBarVisible"/>
@@ -402,7 +403,6 @@
<menu:menuitem menu:id=".uno:FootnoteDialog"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:Gallery"/>
- <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:BibliographyComponent"/>
<menu:menuseparator/>
@@ -452,9 +452,9 @@
<menu:menuitem menu:id=".uno:HelpIndex"/>
<menu:menuitem menu:id=".uno:ExtendedHelp"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/sw/uiconfig/sglobal/statusbar/statusbar.xml b/sw/uiconfig/sglobal/statusbar/statusbar.xml
index ed69b127a07d..3e46300cd0e7 100644
--- a/sw/uiconfig/sglobal/statusbar/statusbar.xml
+++ b/sw/uiconfig/sglobal/statusbar/statusbar.xml
@@ -6,7 +6,7 @@
<statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
<statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
<statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
<statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
<statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
<statusbar:statusbaritem xlink:href=".uno:ViewLayout" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="63" statusbar:helpid="helpid:11064"/>
diff --git a/sw/uiconfig/sweb/menubar/menubar.xml b/sw/uiconfig/sweb/menubar/menubar.xml
index 4b482e373d3f..d208094c854a 100644
--- a/sw/uiconfig/sweb/menubar/menubar.xml
+++ b/sw/uiconfig/sweb/menubar/menubar.xml
@@ -60,6 +60,7 @@
</menu:menu>
<menu:menuitem menu:id=".uno:SelectAll"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id="vnd.sun.star.findbar:FocusToFindbar"/>
<menu:menuitem menu:id=".uno:SearchDialog"/>
<menu:menuitem menu:id=".uno:EditGlossary"/>
<menu:menuseparator/>
@@ -75,9 +76,9 @@
</menu:menu>
<menu:menu menu:id=".uno:ViewMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:PrintLayout"/>
- <menu:menuitem menu:id=".uno:BrowseView"/>
- <menu:menuitem menu:id=".uno:SourceView"/>
+ <menu:menuitem menu:id=".uno:PrintLayout" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:BrowseView" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SourceView" menu:style="radio"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:AvailableToolbars"/>
<menu:menuitem menu:id=".uno:StatusBarVisible"/>
@@ -381,9 +382,9 @@
<menu:menuitem menu:id=".uno:HelpIndex"/>
<menu:menuitem menu:id=".uno:ExtendedHelp"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/sw/uiconfig/sweb/statusbar/statusbar.xml b/sw/uiconfig/sweb/statusbar/statusbar.xml
index 24ec9032bb47..f6880369df08 100644
--- a/sw/uiconfig/sweb/statusbar/statusbar.xml
+++ b/sw/uiconfig/sweb/statusbar/statusbar.xml
@@ -6,7 +6,7 @@
<statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
<statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
<statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
<statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
<statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
<statusbar:statusbaritem xlink:href=".uno:ZoomSlider" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="130" statusbar:helpid="helpid:11065"/>
diff --git a/sw/uiconfig/swform/menubar/menubar.xml b/sw/uiconfig/swform/menubar/menubar.xml
index 69b65cfd3e59..33347d19cf23 100644
--- a/sw/uiconfig/swform/menubar/menubar.xml
+++ b/sw/uiconfig/swform/menubar/menubar.xml
@@ -85,6 +85,7 @@
</menu:menupopup>
</menu:menu>
<menu:menuitem menu:id=".uno:CompareDocuments"/>
+ <menu:menuitem menu:id="vnd.sun.star.findbar:FocusToFindbar"/>
<menu:menuitem menu:id=".uno:SearchDialog"/>
<menu:menuitem menu:id=".uno:EditGlossary"/>
<menu:menuseparator/>
@@ -103,8 +104,8 @@
</menu:menu>
<menu:menu menu:id=".uno:ViewMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:PrintLayout"/>
- <menu:menuitem menu:id=".uno:BrowseView"/>
+ <menu:menuitem menu:id=".uno:PrintLayout" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:BrowseView" menu:style="radio"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:AvailableToolbars"/>
<menu:menuitem menu:id=".uno:StatusBarVisible"/>
@@ -398,7 +399,6 @@
<menu:menuitem menu:id=".uno:FootnoteDialog"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:Gallery"/>
- <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:BibliographyComponent"/>
<menu:menuseparator/>
@@ -447,9 +447,9 @@
<menu:menuitem menu:id=".uno:HelpIndex"/>
<menu:menuitem menu:id=".uno:ExtendedHelp"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/sw/uiconfig/swform/statusbar/statusbar.xml b/sw/uiconfig/swform/statusbar/statusbar.xml
index 24ec9032bb47..f6880369df08 100644
--- a/sw/uiconfig/swform/statusbar/statusbar.xml
+++ b/sw/uiconfig/swform/statusbar/statusbar.xml
@@ -6,7 +6,7 @@
<statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
<statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
<statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
<statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
<statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
<statusbar:statusbaritem xlink:href=".uno:ZoomSlider" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="130" statusbar:helpid="helpid:11065"/>
diff --git a/sw/uiconfig/swreport/menubar/menubar.xml b/sw/uiconfig/swreport/menubar/menubar.xml
index 69b65cfd3e59..33347d19cf23 100644
--- a/sw/uiconfig/swreport/menubar/menubar.xml
+++ b/sw/uiconfig/swreport/menubar/menubar.xml
@@ -85,6 +85,7 @@
</menu:menupopup>
</menu:menu>
<menu:menuitem menu:id=".uno:CompareDocuments"/>
+ <menu:menuitem menu:id="vnd.sun.star.findbar:FocusToFindbar"/>
<menu:menuitem menu:id=".uno:SearchDialog"/>
<menu:menuitem menu:id=".uno:EditGlossary"/>
<menu:menuseparator/>
@@ -103,8 +104,8 @@
</menu:menu>
<menu:menu menu:id=".uno:ViewMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:PrintLayout"/>
- <menu:menuitem menu:id=".uno:BrowseView"/>
+ <menu:menuitem menu:id=".uno:PrintLayout" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:BrowseView" menu:style="radio"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:AvailableToolbars"/>
<menu:menuitem menu:id=".uno:StatusBarVisible"/>
@@ -398,7 +399,6 @@
<menu:menuitem menu:id=".uno:FootnoteDialog"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:Gallery"/>
- <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:BibliographyComponent"/>
<menu:menuseparator/>
@@ -447,9 +447,9 @@
<menu:menuitem menu:id=".uno:HelpIndex"/>
<menu:menuitem menu:id=".uno:ExtendedHelp"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/sw/uiconfig/swreport/statusbar/statusbar.xml b/sw/uiconfig/swreport/statusbar/statusbar.xml
index 24ec9032bb47..f6880369df08 100644
--- a/sw/uiconfig/swreport/statusbar/statusbar.xml
+++ b/sw/uiconfig/swreport/statusbar/statusbar.xml
@@ -6,7 +6,7 @@
<statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
<statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
<statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
<statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
<statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
<statusbar:statusbaritem xlink:href=".uno:ZoomSlider" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="130" statusbar:helpid="helpid:11065"/>
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml
index fb10ca615b50..ce213145ddb1 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -88,6 +88,7 @@
</menu:menupopup>
</menu:menu>
<menu:menuitem menu:id=".uno:CompareDocuments"/>
+ <menu:menuitem menu:id="vnd.sun.star.findbar:FocusToFindbar"/>
<menu:menuitem menu:id=".uno:SearchDialog"/>
<menu:menuitem menu:id=".uno:EditGlossary"/>
<menu:menuseparator/>
@@ -106,8 +107,8 @@
</menu:menu>
<menu:menu menu:id=".uno:ViewMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:PrintLayout"/>
- <menu:menuitem menu:id=".uno:BrowseView"/>
+ <menu:menuitem menu:id=".uno:PrintLayout" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:BrowseView" menu:style="radio"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:AvailableToolbars"/>
<menu:menuitem menu:id=".uno:StatusBarVisible"/>
@@ -217,6 +218,7 @@
<menu:menuitem menu:id=".uno:ParagraphDialog"/>
<menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
<menu:menuitem menu:id=".uno:PageDialog"/>
+ <menu:menuitem menu:id=".uno:TitlePageDialog"/>
<menu:menuseparator/>
<menu:menu menu:id=".uno:TransliterateMenu">
<menu:menupopup>
@@ -405,7 +407,6 @@
<menu:menuitem menu:id=".uno:FootnoteDialog"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:Gallery"/>
- <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:BibliographyComponent"/>
<menu:menuseparator/>
@@ -455,9 +456,9 @@
<menu:menuitem menu:id=".uno:HelpIndex"/>
<menu:menuitem menu:id=".uno:ExtendedHelp"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/sw/uiconfig/swriter/statusbar/statusbar.xml b/sw/uiconfig/swriter/statusbar/statusbar.xml
index ed69b127a07d..3e46300cd0e7 100644
--- a/sw/uiconfig/swriter/statusbar/statusbar.xml
+++ b/sw/uiconfig/swriter/statusbar/statusbar.xml
@@ -6,7 +6,7 @@
<statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
<statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
<statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
<statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
<statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
<statusbar:statusbaritem xlink:href=".uno:ViewLayout" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="63" statusbar:helpid="helpid:11064"/>
diff --git a/sw/uiconfig/swriter/toolbar/navigationobjectbar.xml b/sw/uiconfig/swriter/toolbar/navigationobjectbar.xml
new file mode 100644
index 000000000000..6cea7c3ca49c
--- /dev/null
+++ b/sw/uiconfig/swriter/toolbar/navigationobjectbar.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
+ <toolbar:toolbaritem xlink:href=".uno:NavigateBack" toolbar:helpid="helpid:22314"/>
+ <toolbar:toolbaritem xlink:href=".uno:NavigateForward" toolbar:helpid="helpid:22315"/>
+</toolbar:toolbar>
diff --git a/sw/uiconfig/swxform/menubar/menubar.xml b/sw/uiconfig/swxform/menubar/menubar.xml
index ae0df22748fe..37ff25cdf990 100644
--- a/sw/uiconfig/swxform/menubar/menubar.xml
+++ b/sw/uiconfig/swxform/menubar/menubar.xml
@@ -86,6 +86,7 @@
</menu:menupopup>
</menu:menu>
<menu:menuitem menu:id=".uno:CompareDocuments"/>
+ <menu:menuitem menu:id="vnd.sun.star.findbar:FocusToFindbar"/>
<menu:menuitem menu:id=".uno:SearchDialog"/>
<menu:menuitem menu:id=".uno:EditGlossary"/>
<menu:menuseparator/>
@@ -104,8 +105,8 @@
</menu:menu>
<menu:menu menu:id=".uno:ViewMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:PrintLayout"/>
- <menu:menuitem menu:id=".uno:BrowseView"/>
+ <menu:menuitem menu:id=".uno:PrintLayout" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:BrowseView" menu:style="radio"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:AvailableToolbars"/>
<menu:menuitem menu:id=".uno:StatusBarVisible"/>
@@ -399,7 +400,6 @@
<menu:menuitem menu:id=".uno:FootnoteDialog"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:Gallery"/>
- <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:BibliographyComponent"/>
<menu:menuseparator/>
@@ -448,9 +448,9 @@
<menu:menuitem menu:id=".uno:HelpIndex"/>
<menu:menuitem menu:id=".uno:ExtendedHelp"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/sw/uiconfig/swxform/statusbar/statusbar.xml b/sw/uiconfig/swxform/statusbar/statusbar.xml
index ed69b127a07d..3e46300cd0e7 100644
--- a/sw/uiconfig/swxform/statusbar/statusbar.xml
+++ b/sw/uiconfig/swxform/statusbar/statusbar.xml
@@ -6,7 +6,7 @@
<statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
<statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
<statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
<statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
<statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
<statusbar:statusbaritem xlink:href=".uno:ViewLayout" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="63" statusbar:helpid="helpid:11064"/>
diff --git a/sw/xml/writer.xml b/sw/xml/writer.xml
index c06350f66b10..0fe096e2970c 100644
--- a/sw/xml/writer.xml
+++ b/sw/xml/writer.xml
@@ -748,7 +748,7 @@
<language>c++</language>
<status value="final"/>
<supported-service>com::sun::star::util::SearchDescriptor</supported-service>
- <supported-service>com::sun::star::util::ReplaceDescriptor/supported-service>
+ <supported-service>com::sun::star::util::ReplaceDescriptor</supported-service>
</component-description>
<component-description>
<author>automatically generated by objects2xml</author>